diff --git a/.gitignore b/.gitignore index 2067d54f..8a181889 100644 --- a/.gitignore +++ b/.gitignore @@ -1,8 +1,11 @@ # Editor and IDE paraphernalia .idea .vscode +go.work.sum +# Directories bin +api/hapi # Lint/test output golangci-report.xml diff --git a/.golangci.yaml b/.golangci.yaml index 9ef8f83b..357e9fdc 100644 --- a/.golangci.yaml +++ b/.golangci.yaml @@ -9,6 +9,8 @@ issues: # don't skip warning about doc comments # don't exclude the default set of lint exclude-use-default: false + exclude-dirs: + - "api/apiutil" exclude-files: - ".*_test\\.go" diff --git a/CHANGELOG b/CHANGELOG deleted file mode 100644 index 5d99b60f..00000000 --- a/CHANGELOG +++ /dev/null @@ -1,4 +0,0 @@ -Version 4.5.0 -Tue May 7 19:34:22 UTC 2024 - Initial Release - diff --git a/OWNERS_ALIAS b/OWNERS_ALIAS index f49bfe7d..25db4332 100644 --- a/OWNERS_ALIAS +++ b/OWNERS_ALIAS @@ -1,4 +1,3 @@ aliases: palette-sdk-go-dev: - - nikchern - tylergillson diff --git a/api/README.md b/api/README.md new file mode 100644 index 00000000..a159b760 --- /dev/null +++ b/api/README.md @@ -0,0 +1,8 @@ +# Palette API - client & models + +A swagger client and models for Palette. + +## Update client & models +``` +./generate.sh ./ +``` diff --git a/api/apiutil/retry/retry.go b/api/apiutil/retry/retry.go new file mode 100644 index 00000000..ed633c3b --- /dev/null +++ b/api/apiutil/retry/retry.go @@ -0,0 +1,53 @@ +package retry + +import ( + "fmt" + "math/rand" + "time" +) + +type RetryOption struct { + retryMsg string + attempts int + sleep time.Duration + retryFlag bool +} + +func NewRetryOption(retryMsg string, attempts int, sleep time.Duration, retryFlag bool) *RetryOption { + return &RetryOption{retryMsg: retryMsg, attempts: attempts, sleep: sleep, retryFlag: retryFlag} +} + +func (retryOption *RetryOption) Retry(f func() error) error { + return retryOp(retryOption.retryMsg, retryOption.attempts, retryOption.sleep, f, retryOption.retryFlag) +} + +func Retry(retryMsg string, attempts int, sleep time.Duration, f func() error) error { + return retryOp(retryMsg, attempts, sleep, f, true) +} + +func RetryWithErrRetryCond(retryMsg string, attempts int, sleep time.Duration, f func() error) error { + return retryOp(retryMsg, attempts, sleep, f, false) +} + +func retryOp(retryMsg string, attempts int, sleep time.Duration, f func() error, retryFlag bool) error { + + rand.Seed(time.Now().UnixNano()) + var err error + t := attempts + for ; attempts >= 0; attempts-- { + if t > attempts { + fmt.Printf("retrying (%d/%d): %s ", t-attempts, t, retryMsg) + } + err = f() + if err != nil { + if sleep > 0 { + time.Sleep(sleep) + jitter := time.Duration(rand.Int63n(int64(sleep))) + sleep = (2 * sleep) + jitter/2 //exponential sleep with jitter + } + } else { + return nil + } + } + return err +} diff --git a/api/apiutil/transport/request.go b/api/apiutil/transport/request.go new file mode 100644 index 00000000..27b1065d --- /dev/null +++ b/api/apiutil/transport/request.go @@ -0,0 +1,487 @@ +package transport + +// Copyright 2015 go-swagger maintainers +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +//This file is modified from it's actual version to support reading headers from context + +import ( + "bytes" + "container/list" + "context" + "fmt" + "github.com/go-errors/errors" + "io" + "mime/multipart" + "net/http" + "net/http/httputil" + "net/url" + "os" + "path" + "path/filepath" + "strings" + "sync" + "time" + + log "github.com/sirupsen/logrus" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +var ( + printReq bool + requestQueue = list.New() + mut = &sync.Mutex{} +) + +// it will maintain last 5 request dump in queue +func addRequestDump(req string) { + defer mut.Unlock() + mut.Lock() + for i := requestQueue.Len(); i >= 5; i-- { + e := requestQueue.Front() + if e != nil { + requestQueue.Remove(e) + } + } + requestQueue.PushBack(fmt.Sprintf("%s\n%s", time.Now().String(), req)) +} + +func ReadRequestDump() []string { + requests := make([]string, 0, 1) + for requestQueue.Len() > 0 { + e := requestQueue.Front() + requests = append(requests, e.Value.(string)) + requestQueue.Remove(e) + } + return requests +} + +func init() { + if os.Getenv("LOG_REQUEST") == "true" || os.Getenv("LOG_LEVEL") == "TRACE" { + printReq = true + } +} + +// NewRequest creates a new swagger http client request +func newRequest(method, pathPattern string, writer runtime.ClientRequestWriter) (*request, error) { + return &request{ + pathPattern: pathPattern, + method: method, + writer: writer, + header: make(http.Header), + query: make(url.Values), + timeout: DefaultTimeout, + getBody: getRequestBuffer, + }, nil +} + +// Request represents a swagger client request. +// +// This Request struct converts to a HTTP request. +// There might be others that convert to other transports. +// There is no error checking here, it is assumed to be used after a spec has been validated. +// so impossible combinations should not arise (hopefully). +// +// The main purpose of this struct is to hide the machinery of adding params to a transport request. +// The generated code only implements what is necessary to turn a param into a valid value for these methods. +type request struct { + pathPattern string + method string + writer runtime.ClientRequestWriter + + pathParams map[string]string + header http.Header + query url.Values + formFields url.Values + fileFields map[string][]runtime.NamedReadCloser + payload interface{} + timeout time.Duration + buf *bytes.Buffer + + getBody func(r *request) []byte +} + +var ( + // ensure interface compliance + _ runtime.ClientRequest = new(request) +) + +func (r *request) isMultipart(mediaType string) bool { + if len(r.fileFields) > 0 { + return true + } + + return runtime.MultipartFormMime == mediaType +} + +func (r *request) buildHTTP(mediaType, basePath string, producers map[string]runtime.Producer, registry strfmt.Registry, + auth runtime.ClientAuthInfoWriter, ctx context.Context) (*http.Request, error) { + // build the data + if err := r.writer.WriteToRequest(r, registry); err != nil { + return nil, err + } + + // Our body must be an io.Reader. + // When we create the http.Request, if we pass it a + // bytes.Buffer then it will wrap it in an io.ReadCloser + // and set the content length automatically. + var body io.Reader + var pr *io.PipeReader + var pw *io.PipeWriter + + r.buf = bytes.NewBuffer(nil) + if r.payload != nil || len(r.formFields) > 0 || len(r.fileFields) > 0 { + body = r.buf + if r.isMultipart(mediaType) { + pr, pw = io.Pipe() + body = pr + } + } + + if ctx != nil && ctx.Value(CUSTOM_HEADERS) != nil { + value := ctx.Value(CUSTOM_HEADERS).(Values) + for k, v := range value.HeaderMap { + r.header.Set(k, v) + } + } + + // check if this is a form type request + if len(r.formFields) > 0 || len(r.fileFields) > 0 { + if !r.isMultipart(mediaType) { + r.header.Set(runtime.HeaderContentType, mediaType) + formString := r.formFields.Encode() + r.buf.WriteString(formString) + goto DoneChoosingBodySource + } + + mp := multipart.NewWriter(pw) + r.header.Set(runtime.HeaderContentType, mangleContentType(mediaType, mp.Boundary())) + + go func() { + defer func() { + mp.Close() + pw.Close() + }() + + for fn, v := range r.formFields { + for _, vi := range v { + if err := mp.WriteField(fn, vi); err != nil { + _ = pw.CloseWithError(err) + log.Println(err) + } + } + } + + defer func() { + for _, ff := range r.fileFields { + for _, ffi := range ff { + ffi.Close() + } + } + }() + for fn, f := range r.fileFields { + for _, fi := range f { + wrtr, err := mp.CreateFormFile(fn, filepath.Base(fi.Name())) + if err != nil { + _ = pw.CloseWithError(err) + log.Println(err) + } else if _, err := io.Copy(wrtr, fi); err != nil { + _ = pw.CloseWithError(err) + log.Println(err) + } + } + } + + }() + + goto DoneChoosingBodySource + } + + // if there is payload, use the producer to write the payload, and then + // set the header to the content-type appropriate for the payload produced + if r.payload != nil { + // TODO: infer most appropriate content type based on the producer used, + // and the `consumers` section of the spec/operation + r.header.Set(runtime.HeaderContentType, mediaType) + if rdr, ok := r.payload.(io.ReadCloser); ok { + body = rdr + goto DoneChoosingBodySource + } + + if rdr, ok := r.payload.(io.Reader); ok { + body = rdr + goto DoneChoosingBodySource + } + + producer := producers[mediaType] + if err := producer.Produce(r.buf, r.payload); err != nil { + return nil, err + } + } + +DoneChoosingBodySource: + + if runtime.CanHaveBody(r.method) && body == nil && r.header.Get(runtime.HeaderContentType) == "" { + r.header.Set(runtime.HeaderContentType, mediaType) + } + + if auth != nil { + + // If we're not using r.buf as our http.Request's body, + // either the payload is an io.Reader or io.ReadCloser, + // or we're doing a multipart form/file. + // + // In those cases, if the AuthenticateRequest call asks for the body, + // we must read it into a buffer and provide that, then use that buffer + // as the body of our http.Request. + // + // This is done in-line with the GetBody() request rather than ahead + // of time, because there's no way to know if the AuthenticateRequest + // will even ask for the body of the request. + // + // If for some reason the copy fails, there's no way to return that + // error to the GetBody() call, so return it afterwards. + // + // An error from the copy action is prioritized over any error + // from the AuthenticateRequest call, because the mis-read + // body may have interfered with the auth. + // + var copyErr error + if buf, ok := body.(*bytes.Buffer); body != nil && (!ok || buf != r.buf) { + + var copied bool + r.getBody = func(r *request) []byte { + + if copied { + return getRequestBuffer(r) + } + + defer func() { + copied = true + }() + + if _, copyErr = io.Copy(r.buf, body); copyErr != nil { + return nil + } + + if closer, ok := body.(io.ReadCloser); ok { + if copyErr = closer.Close(); copyErr != nil { + return nil + } + } + + body = r.buf + return getRequestBuffer(r) + } + } + + authErr := auth.AuthenticateRequest(r, registry) + + if copyErr != nil { + return nil, fmt.Errorf("error retrieving the response body: %v", copyErr) + } + + if authErr != nil { + return nil, authErr + } + + } + + // create http request + var reinstateSlash bool + if r.pathPattern != "" && r.pathPattern != "/" && r.pathPattern[len(r.pathPattern)-1] == '/' { + reinstateSlash = true + } + urlPath := path.Join(basePath, r.pathPattern) + for k, v := range r.pathParams { + urlPath = strings.Replace(urlPath, "{"+k+"}", url.PathEscape(v), -1) + } + if reinstateSlash { + urlPath = urlPath + "/" + } + + req, err := http.NewRequest(r.method, urlPath, body) + if err != nil { + return nil, err + } + + req.URL.RawQuery = r.query.Encode() + req.Header = r.header + + if os.Getenv("SKIP_DUMP_REQUEST") == "" { + dumpRequest(req) + } + return req, nil +} + +func dumpRequest(req *http.Request) { + defer recoverPanic() + // Save a copy of this request for debugging. + if requestDump, err := httputil.DumpRequest(req, true); err != nil { + + addRequestDump(fmt.Sprintf("Failed to dump request %s .%v", req.RequestURI, err)) + } else { + if printReq { + fmt.Println(string(requestDump)) + } + addRequestDump(string(requestDump)) + } +} + +func recoverPanic() { + if rec := recover(); rec != nil { + stackTrace := fmt.Sprintf("Request Panic: %v", rec) + wrappedError := errors.Wrap(rec, 0) + if wrappedError != nil { + stackTrace = fmt.Sprintf("Request Panic: %v\nStack Trace:\n%s\n", rec, wrappedError.ErrorStack()) + } + + log.Error(stackTrace) + } +} + +func mangleContentType(mediaType, boundary string) string { + if strings.ToLower(mediaType) == runtime.URLencodedFormMime { + return fmt.Sprintf("%s; boundary=%s", mediaType, boundary) + } + return "multipart/form-data; boundary=" + boundary +} + +func (r *request) GetMethod() string { + return r.method +} + +func (r *request) GetPath() string { + path := r.pathPattern + for k, v := range r.pathParams { + path = strings.Replace(path, "{"+k+"}", v, -1) + } + return path +} + +func (r *request) GetBody() []byte { + return r.getBody(r) +} + +func getRequestBuffer(r *request) []byte { + if r.buf == nil { + return nil + } + return r.buf.Bytes() +} + +// SetHeaderParam adds a header param to the request +// when there is only 1 value provided for the varargs, it will set it. +// when there are several values provided for the varargs it will add it (no overriding) +func (r *request) SetHeaderParam(name string, values ...string) error { + if r.header == nil { + r.header = make(http.Header) + } + r.header[http.CanonicalHeaderKey(name)] = values + return nil +} + +// GetHeaderParams returns the all headers currently set for the request +func (r *request) GetHeaderParams() http.Header { + return r.header +} + +// SetQueryParam adds a query param to the request +// when there is only 1 value provided for the varargs, it will set it. +// when there are several values provided for the varargs it will add it (no overriding) +func (r *request) SetQueryParam(name string, values ...string) error { + if r.query == nil { + r.query = make(url.Values) + } + r.query[name] = values + return nil +} + +// GetQueryParams returns a copy of all query params currently set for the request +func (r *request) GetQueryParams() url.Values { + var result = make(url.Values) + for key, value := range r.query { + result[key] = append([]string{}, value...) + } + return result +} + +// SetFormParam adds a forn param to the request +// when there is only 1 value provided for the varargs, it will set it. +// when there are several values provided for the varargs it will add it (no overriding) +func (r *request) SetFormParam(name string, values ...string) error { + if r.formFields == nil { + r.formFields = make(url.Values) + } + r.formFields[name] = values + return nil +} + +// SetPathParam adds a path param to the request +func (r *request) SetPathParam(name string, value string) error { + if r.pathParams == nil { + r.pathParams = make(map[string]string) + } + + r.pathParams[name] = value + return nil +} + +// SetFileParam adds a file param to the request +func (r *request) SetFileParam(name string, files ...runtime.NamedReadCloser) error { + for _, file := range files { + if actualFile, ok := file.(*os.File); ok { + fi, err := os.Stat(actualFile.Name()) + if err != nil { + return err + } + if fi.IsDir() { + return fmt.Errorf("%q is a directory, only files are supported", file.Name()) + } + } + } + + if r.fileFields == nil { + r.fileFields = make(map[string][]runtime.NamedReadCloser) + } + if r.formFields == nil { + r.formFields = make(url.Values) + } + + r.fileFields[name] = files + return nil +} + +func (r *request) GetFileParam() map[string][]runtime.NamedReadCloser { + return r.fileFields +} + +// SetBodyParam sets a body parameter on the request. +// This does not yet serialze the object, this happens as late as possible. +func (r *request) SetBodyParam(payload interface{}) error { + r.payload = payload + return nil +} + +func (r *request) GetBodyParam() interface{} { + return r.payload +} + +// SetTimeout sets the timeout for a request +func (r *request) SetTimeout(timeout time.Duration) error { + r.timeout = timeout + return nil +} diff --git a/api/apiutil/transport/response.go b/api/apiutil/transport/response.go new file mode 100644 index 00000000..438e1523 --- /dev/null +++ b/api/apiutil/transport/response.go @@ -0,0 +1,48 @@ +package transport + +// Copyright 2015 go-swagger maintainers +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +import ( + "io" + "net/http" + + "github.com/go-openapi/runtime" +) + +var _ runtime.ClientResponse = response{} + +type response struct { + resp *http.Response +} + +func (r response) Code() int { + return r.resp.StatusCode +} + +func (r response) Message() string { + return r.resp.Status +} + +func (r response) GetHeader(name string) string { + return r.resp.Header.Get(name) +} + +func (r response) GetHeaders(name string) []string { + return r.resp.Header.Values(name) +} + +func (r response) Body() io.ReadCloser { + return r.resp.Body +} diff --git a/api/apiutil/transport/runtime.go b/api/apiutil/transport/runtime.go new file mode 100644 index 00000000..7aaeb72b --- /dev/null +++ b/api/apiutil/transport/runtime.go @@ -0,0 +1,574 @@ +package transport + +// Copyright 2015 go-swagger maintainers +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +import ( + "context" + "crypto" + "crypto/ecdsa" + "crypto/rsa" + "crypto/tls" + "crypto/x509" + "encoding/pem" + "errors" + "fmt" + "io" + _ "math/rand" + "mime" + "net/http" + "net/http/httputil" + "os" + "strings" + "sync" + "sync/atomic" + "syscall" + "time" + + "github.com/spectrocloud/palette-sdk-go/api/apiutil/retry" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/runtime/logger" + "github.com/go-openapi/runtime/middleware" + "github.com/go-openapi/strfmt" +) + +// TLSClientOptions to configure client authentication with mutual TLS +type TLSClientOptions struct { + // Certificate is the path to a PEM-encoded certificate to be used for + // client authentication. If set then RootKey must also be set. + Certificate string + + // LoadedCertificate is the certificate to be used for client authentication. + // This field is ignored if Certificate is set. If this field is set, LoadedKey + // is also required. + LoadedCertificate *x509.Certificate + + // RootKey is the path to an unencrypted PEM-encoded private key for client + // authentication. This field is required if Certificate is set. + Key string + + // LoadedKey is the key for client authentication. This field is required if + // LoadedCertificate is set. + LoadedKey crypto.PrivateKey + + // CA is a path to a PEM-encoded certificate that specifies the root certificate + // to use when validating the TLS certificate presented by the server. If this field + // (and LoadedCA) is not set, the system certificate pool is used. This field is ignored if LoadedCA + // is set. + CA string + + // LoadedCA specifies the root certificate to use when validating the server's TLS certificate. + // If this field (and CA) is not set, the system certificate pool is used. + LoadedCA *x509.Certificate + + // ServerName specifies the hostname to use when verifying the server certificate. + // If this field is set then InsecureSkipVerify will be ignored and treated as + // false. + ServerName string + + // InsecureSkipVerify controls whether the certificate chain and hostname presented + // by the server are validated. If false, any certificate is accepted. + InsecureSkipVerify bool + + // VerifyPeerCertificate, if not nil, is called after normal + // certificate verification. It receives the raw ASN.1 certificates + // provided by the peer and also any verified chains that normal processing found. + // If it returns a non-nil error, the handshake is aborted and that error results. + // + // If normal verification fails then the handshake will abort before + // considering this callback. If normal verification is disabled by + // setting InsecureSkipVerify then this callback will be considered but + // the verifiedChains argument will always be nil. + VerifyPeerCertificate func(rawCerts [][]byte, verifiedChains [][]*x509.Certificate) error + + // SessionTicketsDisabled may be set to true to disable session ticket and + // PSK (resumption) support. Note that on clients, session ticket support is + // also disabled if ClientSessionCache is nil. + SessionTicketsDisabled bool + + // ClientSessionCache is a cache of ClientSessionState entries for TLS + // session resumption. It is only used by clients. + ClientSessionCache tls.ClientSessionCache + + // Prevents callers using unkeyed fields. + _ struct{} +} + +// TLSClientAuth creates a tls.Config for mutual auth +func TLSClientAuth(opts TLSClientOptions) (*tls.Config, error) { + // create client tls config + cfg := &tls.Config{} + + // load client cert if specified + if opts.Certificate != "" { + cert, err := tls.LoadX509KeyPair(opts.Certificate, opts.Key) + if err != nil { + return nil, fmt.Errorf("tls client cert: %v", err) + } + cfg.Certificates = []tls.Certificate{cert} + } else if opts.LoadedCertificate != nil { + block := pem.Block{Type: "CERTIFICATE", Bytes: opts.LoadedCertificate.Raw} + certPem := pem.EncodeToMemory(&block) + + var keyBytes []byte + switch k := opts.LoadedKey.(type) { + case *rsa.PrivateKey: + keyBytes = x509.MarshalPKCS1PrivateKey(k) + case *ecdsa.PrivateKey: + var err error + keyBytes, err = x509.MarshalECPrivateKey(k) + if err != nil { + return nil, fmt.Errorf("tls client priv key: %v", err) + } + default: + return nil, fmt.Errorf("tls client priv key: unsupported key type") + } + + block = pem.Block{Type: "PRIVATE KEY", Bytes: keyBytes} + keyPem := pem.EncodeToMemory(&block) + + cert, err := tls.X509KeyPair(certPem, keyPem) + if err != nil { + return nil, fmt.Errorf("tls client cert: %v", err) + } + cfg.Certificates = []tls.Certificate{cert} + } + + cfg.InsecureSkipVerify = opts.InsecureSkipVerify + + cfg.VerifyPeerCertificate = opts.VerifyPeerCertificate + cfg.SessionTicketsDisabled = opts.SessionTicketsDisabled + cfg.ClientSessionCache = opts.ClientSessionCache + + // When no CA certificate is provided, default to the system cert pool + // that way when a request is made to a server known by the system trust store, + // the name is still verified + if opts.LoadedCA != nil { + caCertPool := x509.NewCertPool() + caCertPool.AddCert(opts.LoadedCA) + cfg.RootCAs = caCertPool + } else if opts.CA != "" { + // load ca cert + caCert, err := os.ReadFile(opts.CA) + if err != nil { + return nil, fmt.Errorf("tls client ca: %v", err) + } + caCertPool := x509.NewCertPool() + caCertPool.AppendCertsFromPEM(caCert) + cfg.RootCAs = caCertPool + } + + // apply servername overrride + if opts.ServerName != "" { + cfg.InsecureSkipVerify = false + cfg.ServerName = opts.ServerName + } + + return cfg, nil +} + +// TLSTransport creates a http client transport suitable for mutual tls auth +func TLSTransport(opts TLSClientOptions) (http.RoundTripper, error) { + cfg, err := TLSClientAuth(opts) + if err != nil { + return nil, err + } + + return &http.Transport{TLSClientConfig: cfg}, nil +} + +// TLSClient creates a http.Client for mutual auth +func TLSClient(opts TLSClientOptions) (*http.Client, error) { + transport, err := TLSTransport(opts) + if err != nil { + return nil, err + } + return &http.Client{Transport: transport}, nil +} + +// DefaultTimeout the default request timeout +var DefaultTimeout = 30 * time.Second + +// Runtime represents an API client that uses the transport +// to make http requests based on a swagger specification. +type Runtime struct { + DefaultMediaType string + DefaultAuthentication runtime.ClientAuthInfoWriter + Consumers map[string]runtime.Consumer + Producers map[string]runtime.Producer + + Transport http.RoundTripper + Jar http.CookieJar + //Spec *spec.Document + Host string + BasePath string + Formats strfmt.Registry + Context context.Context + + RetryAttempts int + Debug bool + logger logger.Logger + + clientOnce *sync.Once + client *http.Client + schemes []string +} + +const PdfMime = "application/pdf" + +// New creates a new default runtime for a swagger api runtime.Client +func New(host, basePath string, schemes []string) *Runtime { + var rt Runtime + rt.DefaultMediaType = runtime.JSONMime + + // TODO: actually infer this stuff from the spec + rt.Consumers = map[string]runtime.Consumer{ + runtime.JSONMime: runtime.JSONConsumer(), + runtime.XMLMime: runtime.XMLConsumer(), + runtime.TextMime: runtime.TextConsumer(), + runtime.HTMLMime: runtime.TextConsumer(), + runtime.CSVMime: runtime.CSVConsumer(), + runtime.DefaultMime: runtime.ByteStreamConsumer(), + PdfMime: runtime.ByteStreamConsumer(), + } + rt.Producers = map[string]runtime.Producer{ + runtime.JSONMime: runtime.JSONProducer(), + runtime.XMLMime: runtime.XMLProducer(), + runtime.TextMime: runtime.TextProducer(), + runtime.HTMLMime: runtime.TextProducer(), + runtime.CSVMime: runtime.CSVProducer(), + runtime.DefaultMime: runtime.ByteStreamProducer(), + PdfMime: runtime.ByteStreamProducer(), + } + rt.Transport = http.DefaultTransport + rt.Jar = nil + rt.Host = host + rt.BasePath = basePath + rt.Context = context.Background() + rt.clientOnce = new(sync.Once) + if !strings.HasPrefix(rt.BasePath, "/") { + rt.BasePath = "/" + rt.BasePath + } + + rt.RetryAttempts = 3 + rt.Debug = logger.DebugEnabled() + rt.logger = logger.StandardLogger{} + + if len(schemes) > 0 { + rt.schemes = schemes + } + return &rt +} + +// NewWithClient allows you to create a new transport with a configured http.Client +func NewWithClient(host, basePath string, schemes []string, client *http.Client) *Runtime { + rt := New(host, basePath, schemes) + if client != nil { + rt.clientOnce.Do(func() { + rt.client = client + }) + } + return rt +} + +func (r *Runtime) pickScheme(schemes []string) string { + if v := r.selectScheme(r.schemes); v != "" { + return v + } + if v := r.selectScheme(schemes); v != "" { + return v + } + return "http" +} + +func (r *Runtime) selectScheme(schemes []string) string { + schLen := len(schemes) + if schLen == 0 { + return "" + } + + scheme := schemes[0] + // prefer https, but skip when not possible + if scheme != "https" && schLen > 1 { + for _, sch := range schemes { + if sch == "https" { + scheme = sch + break + } + } + } + return scheme +} +func transportOrDefault(left, right http.RoundTripper) http.RoundTripper { + if left == nil { + return right + } + return left +} + +func KeepAliveTransport(rt http.RoundTripper) http.RoundTripper { + return &keepAliveTransport{wrapped: rt} +} + +type keepAliveTransport struct { + wrapped http.RoundTripper +} + +func (k *keepAliveTransport) RoundTrip(r *http.Request) (*http.Response, error) { + resp, err := k.wrapped.RoundTrip(r) + if err != nil { + return resp, err + } + resp.Body = &drainingReadCloser{rdr: resp.Body} + return resp, nil +} + +type drainingReadCloser struct { + rdr io.ReadCloser + seenEOF uint32 +} + +func (d *drainingReadCloser) Read(p []byte) (n int, err error) { + n, err = d.rdr.Read(p) + if err == io.EOF || n == 0 { + atomic.StoreUint32(&d.seenEOF, 1) + } + return +} + +func (d *drainingReadCloser) Close() error { + // drain buffer + if atomic.LoadUint32(&d.seenEOF) != 1 { + //#nosec + _, _ = io.Copy(io.Discard, d.rdr) + } + return d.rdr.Close() +} + +// EnableConnectionReuse drains the remaining body from a response +// so that go will reuse the TCP connections. +// +// This is not enabled by default because there are servers where +// the response never gets closed and that would make the code hang forever. +// So instead it's provided as a http client middleware that can be used to override +// any request. +func (r *Runtime) EnableConnectionReuse() { + if r.client == nil { + r.Transport = KeepAliveTransport( + transportOrDefault(r.Transport, http.DefaultTransport), + ) + return + } + + r.client.Transport = KeepAliveTransport( + transportOrDefault(r.client.Transport, + transportOrDefault(r.Transport, http.DefaultTransport), + ), + ) +} + +// Submit a request and when there is a body on success it will turn that into the result +// all other things are turned into an api error for swagger which retains the status code +func (r *Runtime) Submit(operation *runtime.ClientOperation) (interface{}, error) { + + retryMsg := fmt.Sprintf("Request [%s]%s", operation.Method, operation.PathPattern) + var res interface{} + var err error + _ = retry.Retry(retryMsg, r.RetryAttempts, 2*time.Second, func() error { + res, err = r.submitRequest(operation) + if err == nil && res != nil { + if r, ok := res.(*http.Response); ok && (r.StatusCode > 500 || r.StatusCode == http.StatusTooManyRequests) { + return errors.New(printMsg(fmt.Sprintf("Failed %s error code: %d", retryMsg, r.StatusCode))) + } + } else if err != nil { + if e, ok := err.(*TransportError); ok { + if e.HttpCode > 500 || e.HttpCode == http.StatusTooManyRequests { + return errors.New(printMsg(fmt.Sprintf("Failed %s error: %s", retryMsg, e.Error()))) + } + if isErrToBeRetried(e) { + return errors.New(printMsg(fmt.Sprintf("Failed %s error: %s", retryMsg, e.Error()))) + } + return nil + } + if isErrToBeRetried(err) { + return errors.New(printMsg(fmt.Sprintf("Failed %s error: %s", retryMsg, err.Error()))) + } + printMsg(fmt.Sprintf("Failed %s error: %s", retryMsg, err.Error())) + } + return err + }) + return res, err +} + +var retryableErrors = map[syscall.Errno]string{ + syscall.ECONNRESET: "connection reset", +} + +func isErrToBeRetried(err error) bool { + if err == nil { + return false + } + for errNo, str := range retryableErrors { + if errors.Is(err, errNo) || strings.Contains(err.Error(), str) { + return true + } + } + return false +} + +func (r *Runtime) submitRequest(operation *runtime.ClientOperation) (interface{}, error) { + params, readResponse, auth := operation.Params, operation.Reader, operation.AuthInfo + request, err := newRequest(operation.Method, operation.PathPattern, params) + if err != nil { + return nil, err + } + + var accept []string + accept = append(accept, operation.ProducesMediaTypes...) + if err = request.SetHeaderParam(runtime.HeaderAccept, accept...); err != nil { + return nil, err + } + + if auth == nil && r.DefaultAuthentication != nil { + auth = r.DefaultAuthentication + } + + cmt := r.DefaultMediaType + for _, mediaType := range operation.ConsumesMediaTypes { + if mediaType != "" { + cmt = mediaType + break + } + } + + if _, ok := r.Producers[cmt]; !ok && cmt != runtime.MultipartFormMime && cmt != runtime.URLencodedFormMime { + return nil, fmt.Errorf("none of producers: %v registered. try %s", r.Producers, cmt) + } + + req, err := request.buildHTTP(cmt, r.BasePath, r.Producers, r.Formats, auth, operation.Context) + if err != nil { + return nil, err + } + req.URL.Scheme = r.pickScheme(operation.Schemes) + req.URL.Host = r.Host + req.Host = r.Host + + r.clientOnce.Do(func() { + r.client = &http.Client{ + Transport: r.Transport, + Jar: r.Jar, + } + }) + + if r.Debug { + b, err2 := httputil.DumpRequestOut(req, true) + if err2 != nil { + return nil, err2 + } + r.logger.Debugf("%s\n", string(b)) + } + + var hasTimeout bool + pctx := operation.Context + if pctx == nil { + pctx = r.Context + } else { + hasTimeout = true + } + if pctx == nil { + pctx = context.Background() + } + var ctx context.Context + var cancel context.CancelFunc + if hasTimeout { + ctx, cancel = context.WithCancel(pctx) + } else { + ctx, cancel = context.WithTimeout(pctx, r.getDefaultTimeOut(request)) + } + defer cancel() + + client := operation.Client + if client == nil { + client = r.client + } + req = req.WithContext(ctx) + res, err := client.Do(req) // make requests, by default follows 10 redirects before failing + if err != nil { + return nil, TcpErrorResponse(err) + } + defer res.Body.Close() + + if r.Debug { + b, err2 := httputil.DumpResponse(res, true) + if err2 != nil { + return nil, err2 + } + r.logger.Debugf("%s\n", string(b)) + } + + ct := res.Header.Get(runtime.HeaderContentType) + if ct == "" { // this should really really never occur + ct = r.DefaultMediaType + } + + mt, _, err := mime.ParseMediaType(ct) + if err != nil { + return nil, fmt.Errorf("parse content type: %s", err) + } + + cons, ok := r.Consumers[mt] + if !ok { + if cons, ok = r.Consumers["*/*"]; !ok { + // scream about not knowing what to do + return nil, fmt.Errorf("no consumer: %q", ct) + } + } + + //all 2xx, 3xx responses + if res.StatusCode >= 200 && res.StatusCode <= 399 { + return readResponse.ReadResponse(response{res}, cons) + } else if res.StatusCode == http.StatusTooManyRequests { + return ReadTooManyRequestError(req.Method, req.URL.Path) + } else { + return ReadErrorResponse(response{res}, cons) + } +} + +func (r *Runtime) getDefaultTimeOut(request *request) time.Duration { + timeout := 30 * time.Second + if timeout < request.timeout { + timeout = request.timeout + } + return timeout +} + +func printMsg(m string) string { + fmt.Println(m) + return m +} + +// SetDebug changes the debug flag. +// It ensures that client and middlewares have the set debug level. +func (r *Runtime) SetDebug(debug bool) { + r.Debug = debug + middleware.Debug = debug +} + +// SetLogger changes the logger stream. +// It ensures that client and middlewares use the same logger. +func (r *Runtime) SetLogger(logger logger.Logger) { + r.logger = logger + middleware.Logger = logger +} diff --git a/api/apiutil/transport/transport_error.go b/api/apiutil/transport/transport_error.go new file mode 100644 index 00000000..cb5da1fd --- /dev/null +++ b/api/apiutil/transport/transport_error.go @@ -0,0 +1,115 @@ +package transport + +import ( + "bytes" + "fmt" + "io" + "net" + "net/http" + "net/url" + "os" + + "github.com/go-openapi/runtime" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +func ReadTooManyRequestError(protocol, path string) (interface{}, error) { + + result := NewTransportError() + result.HttpCode = http.StatusTooManyRequests + msg := fmt.Sprintf("Too Many Requests, [%v] %v", protocol, path) + result.Payload = &models.V1Error{ + Code: "TooManyRequests", + Details: nil, + Message: msg, + Ref: "", + } + return nil, result +} + +func ReadErrorResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + + result := NewTransportError() + if err := result.readResponse(response, consumer); err != nil { + return nil, err + } + result.HttpCode = response.Code() + return nil, result +} + +func NewTransportError() *TransportError { + return &TransportError{} +} + +type TransportError struct { + Payload *models.V1Error + HttpCode int +} + +func (o *TransportError) Error() string { + return fmt.Sprintf(" %+v", o.Payload) +} + +func (o *TransportError) GetPayload() *models.V1Error { + return o.Payload +} + +func (o *TransportError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer) error { + o.Payload = new(models.V1Error) + reader := response.Body() + rawBody, err := io.ReadAll(response.Body()) + if err == nil { + reader = io.NopCloser(bytes.NewBuffer(rawBody)) + } + if err := consumer.Consume(reader, o.Payload); err != nil && err != io.EOF { + o.Payload = &models.V1Error{ + Code: http.StatusText(response.Code()), + Details: string(rawBody), + Message: response.Message(), + Ref: "", + } + } + return nil +} + +type TcpError struct { + Op string + Url string + Code string + Message string +} + +func NewTcpError() *TcpError { + return &TcpError{} +} + +func (t *TcpError) readResponse(err error) { + urlError, ok := err.(*url.Error) + t.Op = urlError.Op + t.Url = urlError.URL + if ok { + opError, ok := urlError.Err.(*net.OpError) + if ok { + sysCallError, ok := opError.Err.(*os.SyscallError) + if ok { + t.Code = sysCallError.Syscall + t.Message = sysCallError.Error() + return + } + } + + //BET-2377 : Return error message for Unhandled error types. Otherwise actual err message gets lost + t.Message = fmt.Sprintf("An Unknown error occurred. %s", urlError.Err) + } +} + +func (t *TcpError) Error() string { + return fmt.Sprintf(" %v", t.Message) +} + +func TcpErrorResponse(err error) error { + result := NewTcpError() + result.readResponse(err) + return result +} diff --git a/api/apiutil/transport/value_type.go b/api/apiutil/transport/value_type.go new file mode 100644 index 00000000..2f77be13 --- /dev/null +++ b/api/apiutil/transport/value_type.go @@ -0,0 +1,18 @@ +package transport + +type CustomHeader string + +const ( + CUSTOM_HEADERS CustomHeader = "CustomHeaders" +) + +type Values struct { + HeaderMap map[string]string +} + +func (v Values) Get(key string) string { + if v.HeaderMap == nil { + return "" + } + return v.HeaderMap[key] +} diff --git a/api/client/palette_api_client.go b/api/client/palette_api_client.go new file mode 100644 index 00000000..35d291f5 --- /dev/null +++ b/api/client/palette_api_client.go @@ -0,0 +1,112 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package client + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/runtime" + httptransport "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + v1 "github.com/spectrocloud/palette-sdk-go/api/client/v1" +) + +// Default palette API HTTP client. +var Default = NewHTTPClient(nil) + +const ( + // DefaultHost is the default Host + // found in Meta (info) section of spec file + DefaultHost string = "localhost" + // DefaultBasePath is the default BasePath + // found in Meta (info) section of spec file + DefaultBasePath string = "/" +) + +// DefaultSchemes are the default schemes found in Meta (info) section of spec file +var DefaultSchemes = []string{"http", "https"} + +// NewHTTPClient creates a new palette API HTTP client. +func NewHTTPClient(formats strfmt.Registry) *PaletteAPI { + return NewHTTPClientWithConfig(formats, nil) +} + +// NewHTTPClientWithConfig creates a new palette API HTTP client, +// using a customizable transport config. +func NewHTTPClientWithConfig(formats strfmt.Registry, cfg *TransportConfig) *PaletteAPI { + // ensure nullable parameters have default + if cfg == nil { + cfg = DefaultTransportConfig() + } + + // create transport and client + transport := httptransport.New(cfg.Host, cfg.BasePath, cfg.Schemes) + return New(transport, formats) +} + +// New creates a new palette API client +func New(transport runtime.ClientTransport, formats strfmt.Registry) *PaletteAPI { + // ensure nullable parameters have default + if formats == nil { + formats = strfmt.Default + } + + cli := new(PaletteAPI) + cli.Transport = transport + cli.V1 = v1.New(transport, formats) + return cli +} + +// DefaultTransportConfig creates a TransportConfig with the +// default settings taken from the meta section of the spec file. +func DefaultTransportConfig() *TransportConfig { + return &TransportConfig{ + Host: DefaultHost, + BasePath: DefaultBasePath, + Schemes: DefaultSchemes, + } +} + +// TransportConfig contains the transport related info, +// found in the meta section of the spec file. +type TransportConfig struct { + Host string + BasePath string + Schemes []string +} + +// WithHost overrides the default host, +// provided by the meta section of the spec file. +func (cfg *TransportConfig) WithHost(host string) *TransportConfig { + cfg.Host = host + return cfg +} + +// WithBasePath overrides the default basePath, +// provided by the meta section of the spec file. +func (cfg *TransportConfig) WithBasePath(basePath string) *TransportConfig { + cfg.BasePath = basePath + return cfg +} + +// WithSchemes overrides the default schemes, +// provided by the meta section of the spec file. +func (cfg *TransportConfig) WithSchemes(schemes []string) *TransportConfig { + cfg.Schemes = schemes + return cfg +} + +// PaletteAPI is a client for palette API +type PaletteAPI struct { + V1 v1.ClientService + + Transport runtime.ClientTransport +} + +// SetTransport changes the transport on the client and all its subresources +func (c *PaletteAPI) SetTransport(transport runtime.ClientTransport) { + c.Transport = transport + c.V1.SetTransport(transport) +} diff --git a/api/client/v1/v1_accounts_geolocation_patch_parameters.go b/api/client/v1/v1_accounts_geolocation_patch_parameters.go new file mode 100644 index 00000000..1fd19ce3 --- /dev/null +++ b/api/client/v1/v1_accounts_geolocation_patch_parameters.go @@ -0,0 +1,154 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1AccountsGeolocationPatchParams creates a new V1AccountsGeolocationPatchParams object +// with the default values initialized. +func NewV1AccountsGeolocationPatchParams() *V1AccountsGeolocationPatchParams { + var () + return &V1AccountsGeolocationPatchParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1AccountsGeolocationPatchParamsWithTimeout creates a new V1AccountsGeolocationPatchParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1AccountsGeolocationPatchParamsWithTimeout(timeout time.Duration) *V1AccountsGeolocationPatchParams { + var () + return &V1AccountsGeolocationPatchParams{ + + timeout: timeout, + } +} + +// NewV1AccountsGeolocationPatchParamsWithContext creates a new V1AccountsGeolocationPatchParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1AccountsGeolocationPatchParamsWithContext(ctx context.Context) *V1AccountsGeolocationPatchParams { + var () + return &V1AccountsGeolocationPatchParams{ + + Context: ctx, + } +} + +// NewV1AccountsGeolocationPatchParamsWithHTTPClient creates a new V1AccountsGeolocationPatchParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1AccountsGeolocationPatchParamsWithHTTPClient(client *http.Client) *V1AccountsGeolocationPatchParams { + var () + return &V1AccountsGeolocationPatchParams{ + HTTPClient: client, + } +} + +/* +V1AccountsGeolocationPatchParams contains all the parameters to send to the API endpoint +for the v1 accounts geolocation patch operation typically these are written to a http.Request +*/ +type V1AccountsGeolocationPatchParams struct { + + /*Body*/ + Body *models.V1GeolocationLatlong + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 accounts geolocation patch params +func (o *V1AccountsGeolocationPatchParams) WithTimeout(timeout time.Duration) *V1AccountsGeolocationPatchParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 accounts geolocation patch params +func (o *V1AccountsGeolocationPatchParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 accounts geolocation patch params +func (o *V1AccountsGeolocationPatchParams) WithContext(ctx context.Context) *V1AccountsGeolocationPatchParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 accounts geolocation patch params +func (o *V1AccountsGeolocationPatchParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 accounts geolocation patch params +func (o *V1AccountsGeolocationPatchParams) WithHTTPClient(client *http.Client) *V1AccountsGeolocationPatchParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 accounts geolocation patch params +func (o *V1AccountsGeolocationPatchParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 accounts geolocation patch params +func (o *V1AccountsGeolocationPatchParams) WithBody(body *models.V1GeolocationLatlong) *V1AccountsGeolocationPatchParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 accounts geolocation patch params +func (o *V1AccountsGeolocationPatchParams) SetBody(body *models.V1GeolocationLatlong) { + o.Body = body +} + +// WithUID adds the uid to the v1 accounts geolocation patch params +func (o *V1AccountsGeolocationPatchParams) WithUID(uid string) *V1AccountsGeolocationPatchParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 accounts geolocation patch params +func (o *V1AccountsGeolocationPatchParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1AccountsGeolocationPatchParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_accounts_geolocation_patch_responses.go b/api/client/v1/v1_accounts_geolocation_patch_responses.go new file mode 100644 index 00000000..2579d75a --- /dev/null +++ b/api/client/v1/v1_accounts_geolocation_patch_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1AccountsGeolocationPatchReader is a Reader for the V1AccountsGeolocationPatch structure. +type V1AccountsGeolocationPatchReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1AccountsGeolocationPatchReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1AccountsGeolocationPatchNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1AccountsGeolocationPatchNoContent creates a V1AccountsGeolocationPatchNoContent with default headers values +func NewV1AccountsGeolocationPatchNoContent() *V1AccountsGeolocationPatchNoContent { + return &V1AccountsGeolocationPatchNoContent{} +} + +/* +V1AccountsGeolocationPatchNoContent handles this case with default header values. + +The resource was updated successfully +*/ +type V1AccountsGeolocationPatchNoContent struct { +} + +func (o *V1AccountsGeolocationPatchNoContent) Error() string { + return fmt.Sprintf("[PATCH /v1/cloudaccounts/{uid}/geoLocation][%d] v1AccountsGeolocationPatchNoContent ", 204) +} + +func (o *V1AccountsGeolocationPatchNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_api_keys_create_parameters.go b/api/client/v1/v1_api_keys_create_parameters.go new file mode 100644 index 00000000..161ac56e --- /dev/null +++ b/api/client/v1/v1_api_keys_create_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1APIKeysCreateParams creates a new V1APIKeysCreateParams object +// with the default values initialized. +func NewV1APIKeysCreateParams() *V1APIKeysCreateParams { + var () + return &V1APIKeysCreateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1APIKeysCreateParamsWithTimeout creates a new V1APIKeysCreateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1APIKeysCreateParamsWithTimeout(timeout time.Duration) *V1APIKeysCreateParams { + var () + return &V1APIKeysCreateParams{ + + timeout: timeout, + } +} + +// NewV1APIKeysCreateParamsWithContext creates a new V1APIKeysCreateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1APIKeysCreateParamsWithContext(ctx context.Context) *V1APIKeysCreateParams { + var () + return &V1APIKeysCreateParams{ + + Context: ctx, + } +} + +// NewV1APIKeysCreateParamsWithHTTPClient creates a new V1APIKeysCreateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1APIKeysCreateParamsWithHTTPClient(client *http.Client) *V1APIKeysCreateParams { + var () + return &V1APIKeysCreateParams{ + HTTPClient: client, + } +} + +/* +V1APIKeysCreateParams contains all the parameters to send to the API endpoint +for the v1 Api keys create operation typically these are written to a http.Request +*/ +type V1APIKeysCreateParams struct { + + /*Body*/ + Body *models.V1APIKeyEntity + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 Api keys create params +func (o *V1APIKeysCreateParams) WithTimeout(timeout time.Duration) *V1APIKeysCreateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 Api keys create params +func (o *V1APIKeysCreateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 Api keys create params +func (o *V1APIKeysCreateParams) WithContext(ctx context.Context) *V1APIKeysCreateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 Api keys create params +func (o *V1APIKeysCreateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 Api keys create params +func (o *V1APIKeysCreateParams) WithHTTPClient(client *http.Client) *V1APIKeysCreateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 Api keys create params +func (o *V1APIKeysCreateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 Api keys create params +func (o *V1APIKeysCreateParams) WithBody(body *models.V1APIKeyEntity) *V1APIKeysCreateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 Api keys create params +func (o *V1APIKeysCreateParams) SetBody(body *models.V1APIKeyEntity) { + o.Body = body +} + +// WriteToRequest writes these params to a swagger request +func (o *V1APIKeysCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_api_keys_create_responses.go b/api/client/v1/v1_api_keys_create_responses.go new file mode 100644 index 00000000..3b7b9c75 --- /dev/null +++ b/api/client/v1/v1_api_keys_create_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1APIKeysCreateReader is a Reader for the V1APIKeysCreate structure. +type V1APIKeysCreateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1APIKeysCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 201: + result := NewV1APIKeysCreateCreated() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1APIKeysCreateCreated creates a V1APIKeysCreateCreated with default headers values +func NewV1APIKeysCreateCreated() *V1APIKeysCreateCreated { + return &V1APIKeysCreateCreated{} +} + +/* +V1APIKeysCreateCreated handles this case with default header values. + +APIKey Created successfully +*/ +type V1APIKeysCreateCreated struct { + Payload *models.V1APIKeyCreateResponse +} + +func (o *V1APIKeysCreateCreated) Error() string { + return fmt.Sprintf("[POST /v1/apiKeys][%d] v1ApiKeysCreateCreated %+v", 201, o.Payload) +} + +func (o *V1APIKeysCreateCreated) GetPayload() *models.V1APIKeyCreateResponse { + return o.Payload +} + +func (o *V1APIKeysCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1APIKeyCreateResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_api_keys_list_parameters.go b/api/client/v1/v1_api_keys_list_parameters.go new file mode 100644 index 00000000..8c8d6a21 --- /dev/null +++ b/api/client/v1/v1_api_keys_list_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1APIKeysListParams creates a new V1APIKeysListParams object +// with the default values initialized. +func NewV1APIKeysListParams() *V1APIKeysListParams { + + return &V1APIKeysListParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1APIKeysListParamsWithTimeout creates a new V1APIKeysListParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1APIKeysListParamsWithTimeout(timeout time.Duration) *V1APIKeysListParams { + + return &V1APIKeysListParams{ + + timeout: timeout, + } +} + +// NewV1APIKeysListParamsWithContext creates a new V1APIKeysListParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1APIKeysListParamsWithContext(ctx context.Context) *V1APIKeysListParams { + + return &V1APIKeysListParams{ + + Context: ctx, + } +} + +// NewV1APIKeysListParamsWithHTTPClient creates a new V1APIKeysListParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1APIKeysListParamsWithHTTPClient(client *http.Client) *V1APIKeysListParams { + + return &V1APIKeysListParams{ + HTTPClient: client, + } +} + +/* +V1APIKeysListParams contains all the parameters to send to the API endpoint +for the v1 Api keys list operation typically these are written to a http.Request +*/ +type V1APIKeysListParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 Api keys list params +func (o *V1APIKeysListParams) WithTimeout(timeout time.Duration) *V1APIKeysListParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 Api keys list params +func (o *V1APIKeysListParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 Api keys list params +func (o *V1APIKeysListParams) WithContext(ctx context.Context) *V1APIKeysListParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 Api keys list params +func (o *V1APIKeysListParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 Api keys list params +func (o *V1APIKeysListParams) WithHTTPClient(client *http.Client) *V1APIKeysListParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 Api keys list params +func (o *V1APIKeysListParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *V1APIKeysListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_api_keys_list_responses.go b/api/client/v1/v1_api_keys_list_responses.go new file mode 100644 index 00000000..25e26aac --- /dev/null +++ b/api/client/v1/v1_api_keys_list_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1APIKeysListReader is a Reader for the V1APIKeysList structure. +type V1APIKeysListReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1APIKeysListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1APIKeysListOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1APIKeysListOK creates a V1APIKeysListOK with default headers values +func NewV1APIKeysListOK() *V1APIKeysListOK { + return &V1APIKeysListOK{} +} + +/* +V1APIKeysListOK handles this case with default header values. + +Retrieves a list of API keys +*/ +type V1APIKeysListOK struct { + Payload *models.V1APIKeys +} + +func (o *V1APIKeysListOK) Error() string { + return fmt.Sprintf("[GET /v1/apiKeys][%d] v1ApiKeysListOK %+v", 200, o.Payload) +} + +func (o *V1APIKeysListOK) GetPayload() *models.V1APIKeys { + return o.Payload +} + +func (o *V1APIKeysListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1APIKeys) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_api_keys_uid_active_state_parameters.go b/api/client/v1/v1_api_keys_uid_active_state_parameters.go new file mode 100644 index 00000000..bb8cde06 --- /dev/null +++ b/api/client/v1/v1_api_keys_uid_active_state_parameters.go @@ -0,0 +1,157 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1APIKeysUIDActiveStateParams creates a new V1APIKeysUIDActiveStateParams object +// with the default values initialized. +func NewV1APIKeysUIDActiveStateParams() *V1APIKeysUIDActiveStateParams { + var () + return &V1APIKeysUIDActiveStateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1APIKeysUIDActiveStateParamsWithTimeout creates a new V1APIKeysUIDActiveStateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1APIKeysUIDActiveStateParamsWithTimeout(timeout time.Duration) *V1APIKeysUIDActiveStateParams { + var () + return &V1APIKeysUIDActiveStateParams{ + + timeout: timeout, + } +} + +// NewV1APIKeysUIDActiveStateParamsWithContext creates a new V1APIKeysUIDActiveStateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1APIKeysUIDActiveStateParamsWithContext(ctx context.Context) *V1APIKeysUIDActiveStateParams { + var () + return &V1APIKeysUIDActiveStateParams{ + + Context: ctx, + } +} + +// NewV1APIKeysUIDActiveStateParamsWithHTTPClient creates a new V1APIKeysUIDActiveStateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1APIKeysUIDActiveStateParamsWithHTTPClient(client *http.Client) *V1APIKeysUIDActiveStateParams { + var () + return &V1APIKeysUIDActiveStateParams{ + HTTPClient: client, + } +} + +/* +V1APIKeysUIDActiveStateParams contains all the parameters to send to the API endpoint +for the v1 Api keys Uid active state operation typically these are written to a http.Request +*/ +type V1APIKeysUIDActiveStateParams struct { + + /*Body*/ + Body *models.V1APIKeyActiveState + /*UID + Specify API key uid + + */ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 Api keys Uid active state params +func (o *V1APIKeysUIDActiveStateParams) WithTimeout(timeout time.Duration) *V1APIKeysUIDActiveStateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 Api keys Uid active state params +func (o *V1APIKeysUIDActiveStateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 Api keys Uid active state params +func (o *V1APIKeysUIDActiveStateParams) WithContext(ctx context.Context) *V1APIKeysUIDActiveStateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 Api keys Uid active state params +func (o *V1APIKeysUIDActiveStateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 Api keys Uid active state params +func (o *V1APIKeysUIDActiveStateParams) WithHTTPClient(client *http.Client) *V1APIKeysUIDActiveStateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 Api keys Uid active state params +func (o *V1APIKeysUIDActiveStateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 Api keys Uid active state params +func (o *V1APIKeysUIDActiveStateParams) WithBody(body *models.V1APIKeyActiveState) *V1APIKeysUIDActiveStateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 Api keys Uid active state params +func (o *V1APIKeysUIDActiveStateParams) SetBody(body *models.V1APIKeyActiveState) { + o.Body = body +} + +// WithUID adds the uid to the v1 Api keys Uid active state params +func (o *V1APIKeysUIDActiveStateParams) WithUID(uid string) *V1APIKeysUIDActiveStateParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 Api keys Uid active state params +func (o *V1APIKeysUIDActiveStateParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1APIKeysUIDActiveStateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_api_keys_uid_active_state_responses.go b/api/client/v1/v1_api_keys_uid_active_state_responses.go new file mode 100644 index 00000000..a8086f04 --- /dev/null +++ b/api/client/v1/v1_api_keys_uid_active_state_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1APIKeysUIDActiveStateReader is a Reader for the V1APIKeysUIDActiveState structure. +type V1APIKeysUIDActiveStateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1APIKeysUIDActiveStateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1APIKeysUIDActiveStateNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1APIKeysUIDActiveStateNoContent creates a V1APIKeysUIDActiveStateNoContent with default headers values +func NewV1APIKeysUIDActiveStateNoContent() *V1APIKeysUIDActiveStateNoContent { + return &V1APIKeysUIDActiveStateNoContent{} +} + +/* +V1APIKeysUIDActiveStateNoContent handles this case with default header values. + +The resource was updated successfully +*/ +type V1APIKeysUIDActiveStateNoContent struct { +} + +func (o *V1APIKeysUIDActiveStateNoContent) Error() string { + return fmt.Sprintf("[PATCH /v1/apiKeys/{uid}][%d] v1ApiKeysUidActiveStateNoContent ", 204) +} + +func (o *V1APIKeysUIDActiveStateNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_api_keys_uid_delete_parameters.go b/api/client/v1/v1_api_keys_uid_delete_parameters.go new file mode 100644 index 00000000..37ae5777 --- /dev/null +++ b/api/client/v1/v1_api_keys_uid_delete_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1APIKeysUIDDeleteParams creates a new V1APIKeysUIDDeleteParams object +// with the default values initialized. +func NewV1APIKeysUIDDeleteParams() *V1APIKeysUIDDeleteParams { + var () + return &V1APIKeysUIDDeleteParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1APIKeysUIDDeleteParamsWithTimeout creates a new V1APIKeysUIDDeleteParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1APIKeysUIDDeleteParamsWithTimeout(timeout time.Duration) *V1APIKeysUIDDeleteParams { + var () + return &V1APIKeysUIDDeleteParams{ + + timeout: timeout, + } +} + +// NewV1APIKeysUIDDeleteParamsWithContext creates a new V1APIKeysUIDDeleteParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1APIKeysUIDDeleteParamsWithContext(ctx context.Context) *V1APIKeysUIDDeleteParams { + var () + return &V1APIKeysUIDDeleteParams{ + + Context: ctx, + } +} + +// NewV1APIKeysUIDDeleteParamsWithHTTPClient creates a new V1APIKeysUIDDeleteParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1APIKeysUIDDeleteParamsWithHTTPClient(client *http.Client) *V1APIKeysUIDDeleteParams { + var () + return &V1APIKeysUIDDeleteParams{ + HTTPClient: client, + } +} + +/* +V1APIKeysUIDDeleteParams contains all the parameters to send to the API endpoint +for the v1 Api keys Uid delete operation typically these are written to a http.Request +*/ +type V1APIKeysUIDDeleteParams struct { + + /*UID + Specify API key uid + + */ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 Api keys Uid delete params +func (o *V1APIKeysUIDDeleteParams) WithTimeout(timeout time.Duration) *V1APIKeysUIDDeleteParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 Api keys Uid delete params +func (o *V1APIKeysUIDDeleteParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 Api keys Uid delete params +func (o *V1APIKeysUIDDeleteParams) WithContext(ctx context.Context) *V1APIKeysUIDDeleteParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 Api keys Uid delete params +func (o *V1APIKeysUIDDeleteParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 Api keys Uid delete params +func (o *V1APIKeysUIDDeleteParams) WithHTTPClient(client *http.Client) *V1APIKeysUIDDeleteParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 Api keys Uid delete params +func (o *V1APIKeysUIDDeleteParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithUID adds the uid to the v1 Api keys Uid delete params +func (o *V1APIKeysUIDDeleteParams) WithUID(uid string) *V1APIKeysUIDDeleteParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 Api keys Uid delete params +func (o *V1APIKeysUIDDeleteParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1APIKeysUIDDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_api_keys_uid_delete_responses.go b/api/client/v1/v1_api_keys_uid_delete_responses.go new file mode 100644 index 00000000..03b1a9fc --- /dev/null +++ b/api/client/v1/v1_api_keys_uid_delete_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1APIKeysUIDDeleteReader is a Reader for the V1APIKeysUIDDelete structure. +type V1APIKeysUIDDeleteReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1APIKeysUIDDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1APIKeysUIDDeleteNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1APIKeysUIDDeleteNoContent creates a V1APIKeysUIDDeleteNoContent with default headers values +func NewV1APIKeysUIDDeleteNoContent() *V1APIKeysUIDDeleteNoContent { + return &V1APIKeysUIDDeleteNoContent{} +} + +/* +V1APIKeysUIDDeleteNoContent handles this case with default header values. + +The resource was deleted successfully +*/ +type V1APIKeysUIDDeleteNoContent struct { +} + +func (o *V1APIKeysUIDDeleteNoContent) Error() string { + return fmt.Sprintf("[DELETE /v1/apiKeys/{uid}][%d] v1ApiKeysUidDeleteNoContent ", 204) +} + +func (o *V1APIKeysUIDDeleteNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_api_keys_uid_get_parameters.go b/api/client/v1/v1_api_keys_uid_get_parameters.go new file mode 100644 index 00000000..1d2fa7d6 --- /dev/null +++ b/api/client/v1/v1_api_keys_uid_get_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1APIKeysUIDGetParams creates a new V1APIKeysUIDGetParams object +// with the default values initialized. +func NewV1APIKeysUIDGetParams() *V1APIKeysUIDGetParams { + var () + return &V1APIKeysUIDGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1APIKeysUIDGetParamsWithTimeout creates a new V1APIKeysUIDGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1APIKeysUIDGetParamsWithTimeout(timeout time.Duration) *V1APIKeysUIDGetParams { + var () + return &V1APIKeysUIDGetParams{ + + timeout: timeout, + } +} + +// NewV1APIKeysUIDGetParamsWithContext creates a new V1APIKeysUIDGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1APIKeysUIDGetParamsWithContext(ctx context.Context) *V1APIKeysUIDGetParams { + var () + return &V1APIKeysUIDGetParams{ + + Context: ctx, + } +} + +// NewV1APIKeysUIDGetParamsWithHTTPClient creates a new V1APIKeysUIDGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1APIKeysUIDGetParamsWithHTTPClient(client *http.Client) *V1APIKeysUIDGetParams { + var () + return &V1APIKeysUIDGetParams{ + HTTPClient: client, + } +} + +/* +V1APIKeysUIDGetParams contains all the parameters to send to the API endpoint +for the v1 Api keys Uid get operation typically these are written to a http.Request +*/ +type V1APIKeysUIDGetParams struct { + + /*UID + Specify API key uid + + */ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 Api keys Uid get params +func (o *V1APIKeysUIDGetParams) WithTimeout(timeout time.Duration) *V1APIKeysUIDGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 Api keys Uid get params +func (o *V1APIKeysUIDGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 Api keys Uid get params +func (o *V1APIKeysUIDGetParams) WithContext(ctx context.Context) *V1APIKeysUIDGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 Api keys Uid get params +func (o *V1APIKeysUIDGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 Api keys Uid get params +func (o *V1APIKeysUIDGetParams) WithHTTPClient(client *http.Client) *V1APIKeysUIDGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 Api keys Uid get params +func (o *V1APIKeysUIDGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithUID adds the uid to the v1 Api keys Uid get params +func (o *V1APIKeysUIDGetParams) WithUID(uid string) *V1APIKeysUIDGetParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 Api keys Uid get params +func (o *V1APIKeysUIDGetParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1APIKeysUIDGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_api_keys_uid_get_responses.go b/api/client/v1/v1_api_keys_uid_get_responses.go new file mode 100644 index 00000000..8dfacf90 --- /dev/null +++ b/api/client/v1/v1_api_keys_uid_get_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1APIKeysUIDGetReader is a Reader for the V1APIKeysUIDGet structure. +type V1APIKeysUIDGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1APIKeysUIDGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1APIKeysUIDGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1APIKeysUIDGetOK creates a V1APIKeysUIDGetOK with default headers values +func NewV1APIKeysUIDGetOK() *V1APIKeysUIDGetOK { + return &V1APIKeysUIDGetOK{} +} + +/* +V1APIKeysUIDGetOK handles this case with default header values. + +(empty) +*/ +type V1APIKeysUIDGetOK struct { + Payload *models.V1APIKey +} + +func (o *V1APIKeysUIDGetOK) Error() string { + return fmt.Sprintf("[GET /v1/apiKeys/{uid}][%d] v1ApiKeysUidGetOK %+v", 200, o.Payload) +} + +func (o *V1APIKeysUIDGetOK) GetPayload() *models.V1APIKey { + return o.Payload +} + +func (o *V1APIKeysUIDGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1APIKey) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_api_keys_uid_state_parameters.go b/api/client/v1/v1_api_keys_uid_state_parameters.go new file mode 100644 index 00000000..8f0c4b2a --- /dev/null +++ b/api/client/v1/v1_api_keys_uid_state_parameters.go @@ -0,0 +1,157 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1APIKeysUIDStateParams creates a new V1APIKeysUIDStateParams object +// with the default values initialized. +func NewV1APIKeysUIDStateParams() *V1APIKeysUIDStateParams { + var () + return &V1APIKeysUIDStateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1APIKeysUIDStateParamsWithTimeout creates a new V1APIKeysUIDStateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1APIKeysUIDStateParamsWithTimeout(timeout time.Duration) *V1APIKeysUIDStateParams { + var () + return &V1APIKeysUIDStateParams{ + + timeout: timeout, + } +} + +// NewV1APIKeysUIDStateParamsWithContext creates a new V1APIKeysUIDStateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1APIKeysUIDStateParamsWithContext(ctx context.Context) *V1APIKeysUIDStateParams { + var () + return &V1APIKeysUIDStateParams{ + + Context: ctx, + } +} + +// NewV1APIKeysUIDStateParamsWithHTTPClient creates a new V1APIKeysUIDStateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1APIKeysUIDStateParamsWithHTTPClient(client *http.Client) *V1APIKeysUIDStateParams { + var () + return &V1APIKeysUIDStateParams{ + HTTPClient: client, + } +} + +/* +V1APIKeysUIDStateParams contains all the parameters to send to the API endpoint +for the v1 Api keys Uid state operation typically these are written to a http.Request +*/ +type V1APIKeysUIDStateParams struct { + + /*Body*/ + Body *models.V1APIKeyActiveState + /*UID + Specify API key uid + + */ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 Api keys Uid state params +func (o *V1APIKeysUIDStateParams) WithTimeout(timeout time.Duration) *V1APIKeysUIDStateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 Api keys Uid state params +func (o *V1APIKeysUIDStateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 Api keys Uid state params +func (o *V1APIKeysUIDStateParams) WithContext(ctx context.Context) *V1APIKeysUIDStateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 Api keys Uid state params +func (o *V1APIKeysUIDStateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 Api keys Uid state params +func (o *V1APIKeysUIDStateParams) WithHTTPClient(client *http.Client) *V1APIKeysUIDStateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 Api keys Uid state params +func (o *V1APIKeysUIDStateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 Api keys Uid state params +func (o *V1APIKeysUIDStateParams) WithBody(body *models.V1APIKeyActiveState) *V1APIKeysUIDStateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 Api keys Uid state params +func (o *V1APIKeysUIDStateParams) SetBody(body *models.V1APIKeyActiveState) { + o.Body = body +} + +// WithUID adds the uid to the v1 Api keys Uid state params +func (o *V1APIKeysUIDStateParams) WithUID(uid string) *V1APIKeysUIDStateParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 Api keys Uid state params +func (o *V1APIKeysUIDStateParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1APIKeysUIDStateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_api_keys_uid_state_responses.go b/api/client/v1/v1_api_keys_uid_state_responses.go new file mode 100644 index 00000000..e60ce09f --- /dev/null +++ b/api/client/v1/v1_api_keys_uid_state_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1APIKeysUIDStateReader is a Reader for the V1APIKeysUIDState structure. +type V1APIKeysUIDStateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1APIKeysUIDStateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1APIKeysUIDStateNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1APIKeysUIDStateNoContent creates a V1APIKeysUIDStateNoContent with default headers values +func NewV1APIKeysUIDStateNoContent() *V1APIKeysUIDStateNoContent { + return &V1APIKeysUIDStateNoContent{} +} + +/* +V1APIKeysUIDStateNoContent handles this case with default header values. + +The resource was updated successfully +*/ +type V1APIKeysUIDStateNoContent struct { +} + +func (o *V1APIKeysUIDStateNoContent) Error() string { + return fmt.Sprintf("[PUT /v1/apiKeys/{uid}/state][%d] v1ApiKeysUidStateNoContent ", 204) +} + +func (o *V1APIKeysUIDStateNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_api_keys_uid_update_parameters.go b/api/client/v1/v1_api_keys_uid_update_parameters.go new file mode 100644 index 00000000..5744ca09 --- /dev/null +++ b/api/client/v1/v1_api_keys_uid_update_parameters.go @@ -0,0 +1,157 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1APIKeysUIDUpdateParams creates a new V1APIKeysUIDUpdateParams object +// with the default values initialized. +func NewV1APIKeysUIDUpdateParams() *V1APIKeysUIDUpdateParams { + var () + return &V1APIKeysUIDUpdateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1APIKeysUIDUpdateParamsWithTimeout creates a new V1APIKeysUIDUpdateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1APIKeysUIDUpdateParamsWithTimeout(timeout time.Duration) *V1APIKeysUIDUpdateParams { + var () + return &V1APIKeysUIDUpdateParams{ + + timeout: timeout, + } +} + +// NewV1APIKeysUIDUpdateParamsWithContext creates a new V1APIKeysUIDUpdateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1APIKeysUIDUpdateParamsWithContext(ctx context.Context) *V1APIKeysUIDUpdateParams { + var () + return &V1APIKeysUIDUpdateParams{ + + Context: ctx, + } +} + +// NewV1APIKeysUIDUpdateParamsWithHTTPClient creates a new V1APIKeysUIDUpdateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1APIKeysUIDUpdateParamsWithHTTPClient(client *http.Client) *V1APIKeysUIDUpdateParams { + var () + return &V1APIKeysUIDUpdateParams{ + HTTPClient: client, + } +} + +/* +V1APIKeysUIDUpdateParams contains all the parameters to send to the API endpoint +for the v1 Api keys Uid update operation typically these are written to a http.Request +*/ +type V1APIKeysUIDUpdateParams struct { + + /*Body*/ + Body *models.V1APIKeyUpdate + /*UID + Specify API key uid + + */ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 Api keys Uid update params +func (o *V1APIKeysUIDUpdateParams) WithTimeout(timeout time.Duration) *V1APIKeysUIDUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 Api keys Uid update params +func (o *V1APIKeysUIDUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 Api keys Uid update params +func (o *V1APIKeysUIDUpdateParams) WithContext(ctx context.Context) *V1APIKeysUIDUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 Api keys Uid update params +func (o *V1APIKeysUIDUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 Api keys Uid update params +func (o *V1APIKeysUIDUpdateParams) WithHTTPClient(client *http.Client) *V1APIKeysUIDUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 Api keys Uid update params +func (o *V1APIKeysUIDUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 Api keys Uid update params +func (o *V1APIKeysUIDUpdateParams) WithBody(body *models.V1APIKeyUpdate) *V1APIKeysUIDUpdateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 Api keys Uid update params +func (o *V1APIKeysUIDUpdateParams) SetBody(body *models.V1APIKeyUpdate) { + o.Body = body +} + +// WithUID adds the uid to the v1 Api keys Uid update params +func (o *V1APIKeysUIDUpdateParams) WithUID(uid string) *V1APIKeysUIDUpdateParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 Api keys Uid update params +func (o *V1APIKeysUIDUpdateParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1APIKeysUIDUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_api_keys_uid_update_responses.go b/api/client/v1/v1_api_keys_uid_update_responses.go new file mode 100644 index 00000000..c4e33fd2 --- /dev/null +++ b/api/client/v1/v1_api_keys_uid_update_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1APIKeysUIDUpdateReader is a Reader for the V1APIKeysUIDUpdate structure. +type V1APIKeysUIDUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1APIKeysUIDUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1APIKeysUIDUpdateNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1APIKeysUIDUpdateNoContent creates a V1APIKeysUIDUpdateNoContent with default headers values +func NewV1APIKeysUIDUpdateNoContent() *V1APIKeysUIDUpdateNoContent { + return &V1APIKeysUIDUpdateNoContent{} +} + +/* +V1APIKeysUIDUpdateNoContent handles this case with default header values. + +The resource was updated successfully +*/ +type V1APIKeysUIDUpdateNoContent struct { +} + +func (o *V1APIKeysUIDUpdateNoContent) Error() string { + return fmt.Sprintf("[PUT /v1/apiKeys/{uid}][%d] v1ApiKeysUidUpdateNoContent ", 204) +} + +func (o *V1APIKeysUIDUpdateNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_app_deployments_cluster_group_create_parameters.go b/api/client/v1/v1_app_deployments_cluster_group_create_parameters.go new file mode 100644 index 00000000..9c4dc5d8 --- /dev/null +++ b/api/client/v1/v1_app_deployments_cluster_group_create_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1AppDeploymentsClusterGroupCreateParams creates a new V1AppDeploymentsClusterGroupCreateParams object +// with the default values initialized. +func NewV1AppDeploymentsClusterGroupCreateParams() *V1AppDeploymentsClusterGroupCreateParams { + var () + return &V1AppDeploymentsClusterGroupCreateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1AppDeploymentsClusterGroupCreateParamsWithTimeout creates a new V1AppDeploymentsClusterGroupCreateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1AppDeploymentsClusterGroupCreateParamsWithTimeout(timeout time.Duration) *V1AppDeploymentsClusterGroupCreateParams { + var () + return &V1AppDeploymentsClusterGroupCreateParams{ + + timeout: timeout, + } +} + +// NewV1AppDeploymentsClusterGroupCreateParamsWithContext creates a new V1AppDeploymentsClusterGroupCreateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1AppDeploymentsClusterGroupCreateParamsWithContext(ctx context.Context) *V1AppDeploymentsClusterGroupCreateParams { + var () + return &V1AppDeploymentsClusterGroupCreateParams{ + + Context: ctx, + } +} + +// NewV1AppDeploymentsClusterGroupCreateParamsWithHTTPClient creates a new V1AppDeploymentsClusterGroupCreateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1AppDeploymentsClusterGroupCreateParamsWithHTTPClient(client *http.Client) *V1AppDeploymentsClusterGroupCreateParams { + var () + return &V1AppDeploymentsClusterGroupCreateParams{ + HTTPClient: client, + } +} + +/* +V1AppDeploymentsClusterGroupCreateParams contains all the parameters to send to the API endpoint +for the v1 app deployments cluster group create operation typically these are written to a http.Request +*/ +type V1AppDeploymentsClusterGroupCreateParams struct { + + /*Body*/ + Body *models.V1AppDeploymentClusterGroupEntity + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 app deployments cluster group create params +func (o *V1AppDeploymentsClusterGroupCreateParams) WithTimeout(timeout time.Duration) *V1AppDeploymentsClusterGroupCreateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 app deployments cluster group create params +func (o *V1AppDeploymentsClusterGroupCreateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 app deployments cluster group create params +func (o *V1AppDeploymentsClusterGroupCreateParams) WithContext(ctx context.Context) *V1AppDeploymentsClusterGroupCreateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 app deployments cluster group create params +func (o *V1AppDeploymentsClusterGroupCreateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 app deployments cluster group create params +func (o *V1AppDeploymentsClusterGroupCreateParams) WithHTTPClient(client *http.Client) *V1AppDeploymentsClusterGroupCreateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 app deployments cluster group create params +func (o *V1AppDeploymentsClusterGroupCreateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 app deployments cluster group create params +func (o *V1AppDeploymentsClusterGroupCreateParams) WithBody(body *models.V1AppDeploymentClusterGroupEntity) *V1AppDeploymentsClusterGroupCreateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 app deployments cluster group create params +func (o *V1AppDeploymentsClusterGroupCreateParams) SetBody(body *models.V1AppDeploymentClusterGroupEntity) { + o.Body = body +} + +// WriteToRequest writes these params to a swagger request +func (o *V1AppDeploymentsClusterGroupCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_app_deployments_cluster_group_create_responses.go b/api/client/v1/v1_app_deployments_cluster_group_create_responses.go new file mode 100644 index 00000000..87c35dd2 --- /dev/null +++ b/api/client/v1/v1_app_deployments_cluster_group_create_responses.go @@ -0,0 +1,77 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1AppDeploymentsClusterGroupCreateReader is a Reader for the V1AppDeploymentsClusterGroupCreate structure. +type V1AppDeploymentsClusterGroupCreateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1AppDeploymentsClusterGroupCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 201: + result := NewV1AppDeploymentsClusterGroupCreateCreated() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1AppDeploymentsClusterGroupCreateCreated creates a V1AppDeploymentsClusterGroupCreateCreated with default headers values +func NewV1AppDeploymentsClusterGroupCreateCreated() *V1AppDeploymentsClusterGroupCreateCreated { + return &V1AppDeploymentsClusterGroupCreateCreated{} +} + +/* +V1AppDeploymentsClusterGroupCreateCreated handles this case with default header values. + +Created successfully +*/ +type V1AppDeploymentsClusterGroupCreateCreated struct { + /*Audit uid for the request + */ + AuditUID string + + Payload *models.V1UID +} + +func (o *V1AppDeploymentsClusterGroupCreateCreated) Error() string { + return fmt.Sprintf("[POST /v1/appDeployments/clusterGroup][%d] v1AppDeploymentsClusterGroupCreateCreated %+v", 201, o.Payload) +} + +func (o *V1AppDeploymentsClusterGroupCreateCreated) GetPayload() *models.V1UID { + return o.Payload +} + +func (o *V1AppDeploymentsClusterGroupCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header AuditUid + o.AuditUID = response.GetHeader("AuditUid") + + o.Payload = new(models.V1UID) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_app_deployments_profile_tiers_manifests_uid_get_parameters.go b/api/client/v1/v1_app_deployments_profile_tiers_manifests_uid_get_parameters.go new file mode 100644 index 00000000..89cf6198 --- /dev/null +++ b/api/client/v1/v1_app_deployments_profile_tiers_manifests_uid_get_parameters.go @@ -0,0 +1,178 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1AppDeploymentsProfileTiersManifestsUIDGetParams creates a new V1AppDeploymentsProfileTiersManifestsUIDGetParams object +// with the default values initialized. +func NewV1AppDeploymentsProfileTiersManifestsUIDGetParams() *V1AppDeploymentsProfileTiersManifestsUIDGetParams { + var () + return &V1AppDeploymentsProfileTiersManifestsUIDGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1AppDeploymentsProfileTiersManifestsUIDGetParamsWithTimeout creates a new V1AppDeploymentsProfileTiersManifestsUIDGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1AppDeploymentsProfileTiersManifestsUIDGetParamsWithTimeout(timeout time.Duration) *V1AppDeploymentsProfileTiersManifestsUIDGetParams { + var () + return &V1AppDeploymentsProfileTiersManifestsUIDGetParams{ + + timeout: timeout, + } +} + +// NewV1AppDeploymentsProfileTiersManifestsUIDGetParamsWithContext creates a new V1AppDeploymentsProfileTiersManifestsUIDGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1AppDeploymentsProfileTiersManifestsUIDGetParamsWithContext(ctx context.Context) *V1AppDeploymentsProfileTiersManifestsUIDGetParams { + var () + return &V1AppDeploymentsProfileTiersManifestsUIDGetParams{ + + Context: ctx, + } +} + +// NewV1AppDeploymentsProfileTiersManifestsUIDGetParamsWithHTTPClient creates a new V1AppDeploymentsProfileTiersManifestsUIDGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1AppDeploymentsProfileTiersManifestsUIDGetParamsWithHTTPClient(client *http.Client) *V1AppDeploymentsProfileTiersManifestsUIDGetParams { + var () + return &V1AppDeploymentsProfileTiersManifestsUIDGetParams{ + HTTPClient: client, + } +} + +/* +V1AppDeploymentsProfileTiersManifestsUIDGetParams contains all the parameters to send to the API endpoint +for the v1 app deployments profile tiers manifests Uid get operation typically these are written to a http.Request +*/ +type V1AppDeploymentsProfileTiersManifestsUIDGetParams struct { + + /*ManifestUID + Application deployment tier manifest uid + + */ + ManifestUID string + /*TierUID + Application deployment tier uid + + */ + TierUID string + /*UID + Application deployment uid + + */ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 app deployments profile tiers manifests Uid get params +func (o *V1AppDeploymentsProfileTiersManifestsUIDGetParams) WithTimeout(timeout time.Duration) *V1AppDeploymentsProfileTiersManifestsUIDGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 app deployments profile tiers manifests Uid get params +func (o *V1AppDeploymentsProfileTiersManifestsUIDGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 app deployments profile tiers manifests Uid get params +func (o *V1AppDeploymentsProfileTiersManifestsUIDGetParams) WithContext(ctx context.Context) *V1AppDeploymentsProfileTiersManifestsUIDGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 app deployments profile tiers manifests Uid get params +func (o *V1AppDeploymentsProfileTiersManifestsUIDGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 app deployments profile tiers manifests Uid get params +func (o *V1AppDeploymentsProfileTiersManifestsUIDGetParams) WithHTTPClient(client *http.Client) *V1AppDeploymentsProfileTiersManifestsUIDGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 app deployments profile tiers manifests Uid get params +func (o *V1AppDeploymentsProfileTiersManifestsUIDGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithManifestUID adds the manifestUID to the v1 app deployments profile tiers manifests Uid get params +func (o *V1AppDeploymentsProfileTiersManifestsUIDGetParams) WithManifestUID(manifestUID string) *V1AppDeploymentsProfileTiersManifestsUIDGetParams { + o.SetManifestUID(manifestUID) + return o +} + +// SetManifestUID adds the manifestUid to the v1 app deployments profile tiers manifests Uid get params +func (o *V1AppDeploymentsProfileTiersManifestsUIDGetParams) SetManifestUID(manifestUID string) { + o.ManifestUID = manifestUID +} + +// WithTierUID adds the tierUID to the v1 app deployments profile tiers manifests Uid get params +func (o *V1AppDeploymentsProfileTiersManifestsUIDGetParams) WithTierUID(tierUID string) *V1AppDeploymentsProfileTiersManifestsUIDGetParams { + o.SetTierUID(tierUID) + return o +} + +// SetTierUID adds the tierUid to the v1 app deployments profile tiers manifests Uid get params +func (o *V1AppDeploymentsProfileTiersManifestsUIDGetParams) SetTierUID(tierUID string) { + o.TierUID = tierUID +} + +// WithUID adds the uid to the v1 app deployments profile tiers manifests Uid get params +func (o *V1AppDeploymentsProfileTiersManifestsUIDGetParams) WithUID(uid string) *V1AppDeploymentsProfileTiersManifestsUIDGetParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 app deployments profile tiers manifests Uid get params +func (o *V1AppDeploymentsProfileTiersManifestsUIDGetParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1AppDeploymentsProfileTiersManifestsUIDGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param manifestUid + if err := r.SetPathParam("manifestUid", o.ManifestUID); err != nil { + return err + } + + // path param tierUid + if err := r.SetPathParam("tierUid", o.TierUID); err != nil { + return err + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_app_deployments_profile_tiers_manifests_uid_get_responses.go b/api/client/v1/v1_app_deployments_profile_tiers_manifests_uid_get_responses.go new file mode 100644 index 00000000..4fdb45b5 --- /dev/null +++ b/api/client/v1/v1_app_deployments_profile_tiers_manifests_uid_get_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1AppDeploymentsProfileTiersManifestsUIDGetReader is a Reader for the V1AppDeploymentsProfileTiersManifestsUIDGet structure. +type V1AppDeploymentsProfileTiersManifestsUIDGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1AppDeploymentsProfileTiersManifestsUIDGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1AppDeploymentsProfileTiersManifestsUIDGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1AppDeploymentsProfileTiersManifestsUIDGetOK creates a V1AppDeploymentsProfileTiersManifestsUIDGetOK with default headers values +func NewV1AppDeploymentsProfileTiersManifestsUIDGetOK() *V1AppDeploymentsProfileTiersManifestsUIDGetOK { + return &V1AppDeploymentsProfileTiersManifestsUIDGetOK{} +} + +/* +V1AppDeploymentsProfileTiersManifestsUIDGetOK handles this case with default header values. + +OK +*/ +type V1AppDeploymentsProfileTiersManifestsUIDGetOK struct { + Payload *models.V1Manifest +} + +func (o *V1AppDeploymentsProfileTiersManifestsUIDGetOK) Error() string { + return fmt.Sprintf("[GET /v1/appDeployments/{uid}/profile/tiers/{tierUid}/manifests/{manifestUid}][%d] v1AppDeploymentsProfileTiersManifestsUidGetOK %+v", 200, o.Payload) +} + +func (o *V1AppDeploymentsProfileTiersManifestsUIDGetOK) GetPayload() *models.V1Manifest { + return o.Payload +} + +func (o *V1AppDeploymentsProfileTiersManifestsUIDGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1Manifest) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_app_deployments_profile_tiers_manifests_uid_update_parameters.go b/api/client/v1/v1_app_deployments_profile_tiers_manifests_uid_update_parameters.go new file mode 100644 index 00000000..cfaf4d5f --- /dev/null +++ b/api/client/v1/v1_app_deployments_profile_tiers_manifests_uid_update_parameters.go @@ -0,0 +1,199 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1AppDeploymentsProfileTiersManifestsUIDUpdateParams creates a new V1AppDeploymentsProfileTiersManifestsUIDUpdateParams object +// with the default values initialized. +func NewV1AppDeploymentsProfileTiersManifestsUIDUpdateParams() *V1AppDeploymentsProfileTiersManifestsUIDUpdateParams { + var () + return &V1AppDeploymentsProfileTiersManifestsUIDUpdateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1AppDeploymentsProfileTiersManifestsUIDUpdateParamsWithTimeout creates a new V1AppDeploymentsProfileTiersManifestsUIDUpdateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1AppDeploymentsProfileTiersManifestsUIDUpdateParamsWithTimeout(timeout time.Duration) *V1AppDeploymentsProfileTiersManifestsUIDUpdateParams { + var () + return &V1AppDeploymentsProfileTiersManifestsUIDUpdateParams{ + + timeout: timeout, + } +} + +// NewV1AppDeploymentsProfileTiersManifestsUIDUpdateParamsWithContext creates a new V1AppDeploymentsProfileTiersManifestsUIDUpdateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1AppDeploymentsProfileTiersManifestsUIDUpdateParamsWithContext(ctx context.Context) *V1AppDeploymentsProfileTiersManifestsUIDUpdateParams { + var () + return &V1AppDeploymentsProfileTiersManifestsUIDUpdateParams{ + + Context: ctx, + } +} + +// NewV1AppDeploymentsProfileTiersManifestsUIDUpdateParamsWithHTTPClient creates a new V1AppDeploymentsProfileTiersManifestsUIDUpdateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1AppDeploymentsProfileTiersManifestsUIDUpdateParamsWithHTTPClient(client *http.Client) *V1AppDeploymentsProfileTiersManifestsUIDUpdateParams { + var () + return &V1AppDeploymentsProfileTiersManifestsUIDUpdateParams{ + HTTPClient: client, + } +} + +/* +V1AppDeploymentsProfileTiersManifestsUIDUpdateParams contains all the parameters to send to the API endpoint +for the v1 app deployments profile tiers manifests Uid update operation typically these are written to a http.Request +*/ +type V1AppDeploymentsProfileTiersManifestsUIDUpdateParams struct { + + /*Body*/ + Body *models.V1ManifestRefUpdateEntity + /*ManifestUID + Application deployment tier manifest uid + + */ + ManifestUID string + /*TierUID + Application deployment tier uid + + */ + TierUID string + /*UID + Application deployment uid + + */ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 app deployments profile tiers manifests Uid update params +func (o *V1AppDeploymentsProfileTiersManifestsUIDUpdateParams) WithTimeout(timeout time.Duration) *V1AppDeploymentsProfileTiersManifestsUIDUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 app deployments profile tiers manifests Uid update params +func (o *V1AppDeploymentsProfileTiersManifestsUIDUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 app deployments profile tiers manifests Uid update params +func (o *V1AppDeploymentsProfileTiersManifestsUIDUpdateParams) WithContext(ctx context.Context) *V1AppDeploymentsProfileTiersManifestsUIDUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 app deployments profile tiers manifests Uid update params +func (o *V1AppDeploymentsProfileTiersManifestsUIDUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 app deployments profile tiers manifests Uid update params +func (o *V1AppDeploymentsProfileTiersManifestsUIDUpdateParams) WithHTTPClient(client *http.Client) *V1AppDeploymentsProfileTiersManifestsUIDUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 app deployments profile tiers manifests Uid update params +func (o *V1AppDeploymentsProfileTiersManifestsUIDUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 app deployments profile tiers manifests Uid update params +func (o *V1AppDeploymentsProfileTiersManifestsUIDUpdateParams) WithBody(body *models.V1ManifestRefUpdateEntity) *V1AppDeploymentsProfileTiersManifestsUIDUpdateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 app deployments profile tiers manifests Uid update params +func (o *V1AppDeploymentsProfileTiersManifestsUIDUpdateParams) SetBody(body *models.V1ManifestRefUpdateEntity) { + o.Body = body +} + +// WithManifestUID adds the manifestUID to the v1 app deployments profile tiers manifests Uid update params +func (o *V1AppDeploymentsProfileTiersManifestsUIDUpdateParams) WithManifestUID(manifestUID string) *V1AppDeploymentsProfileTiersManifestsUIDUpdateParams { + o.SetManifestUID(manifestUID) + return o +} + +// SetManifestUID adds the manifestUid to the v1 app deployments profile tiers manifests Uid update params +func (o *V1AppDeploymentsProfileTiersManifestsUIDUpdateParams) SetManifestUID(manifestUID string) { + o.ManifestUID = manifestUID +} + +// WithTierUID adds the tierUID to the v1 app deployments profile tiers manifests Uid update params +func (o *V1AppDeploymentsProfileTiersManifestsUIDUpdateParams) WithTierUID(tierUID string) *V1AppDeploymentsProfileTiersManifestsUIDUpdateParams { + o.SetTierUID(tierUID) + return o +} + +// SetTierUID adds the tierUid to the v1 app deployments profile tiers manifests Uid update params +func (o *V1AppDeploymentsProfileTiersManifestsUIDUpdateParams) SetTierUID(tierUID string) { + o.TierUID = tierUID +} + +// WithUID adds the uid to the v1 app deployments profile tiers manifests Uid update params +func (o *V1AppDeploymentsProfileTiersManifestsUIDUpdateParams) WithUID(uid string) *V1AppDeploymentsProfileTiersManifestsUIDUpdateParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 app deployments profile tiers manifests Uid update params +func (o *V1AppDeploymentsProfileTiersManifestsUIDUpdateParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1AppDeploymentsProfileTiersManifestsUIDUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param manifestUid + if err := r.SetPathParam("manifestUid", o.ManifestUID); err != nil { + return err + } + + // path param tierUid + if err := r.SetPathParam("tierUid", o.TierUID); err != nil { + return err + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_app_deployments_profile_tiers_manifests_uid_update_responses.go b/api/client/v1/v1_app_deployments_profile_tiers_manifests_uid_update_responses.go new file mode 100644 index 00000000..fd7c3127 --- /dev/null +++ b/api/client/v1/v1_app_deployments_profile_tiers_manifests_uid_update_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1AppDeploymentsProfileTiersManifestsUIDUpdateReader is a Reader for the V1AppDeploymentsProfileTiersManifestsUIDUpdate structure. +type V1AppDeploymentsProfileTiersManifestsUIDUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1AppDeploymentsProfileTiersManifestsUIDUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1AppDeploymentsProfileTiersManifestsUIDUpdateNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1AppDeploymentsProfileTiersManifestsUIDUpdateNoContent creates a V1AppDeploymentsProfileTiersManifestsUIDUpdateNoContent with default headers values +func NewV1AppDeploymentsProfileTiersManifestsUIDUpdateNoContent() *V1AppDeploymentsProfileTiersManifestsUIDUpdateNoContent { + return &V1AppDeploymentsProfileTiersManifestsUIDUpdateNoContent{} +} + +/* +V1AppDeploymentsProfileTiersManifestsUIDUpdateNoContent handles this case with default header values. + +The resource was updated successfully +*/ +type V1AppDeploymentsProfileTiersManifestsUIDUpdateNoContent struct { +} + +func (o *V1AppDeploymentsProfileTiersManifestsUIDUpdateNoContent) Error() string { + return fmt.Sprintf("[PUT /v1/appDeployments/{uid}/profile/tiers/{tierUid}/manifests/{manifestUid}][%d] v1AppDeploymentsProfileTiersManifestsUidUpdateNoContent ", 204) +} + +func (o *V1AppDeploymentsProfileTiersManifestsUIDUpdateNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_app_deployments_profile_tiers_uid_get_parameters.go b/api/client/v1/v1_app_deployments_profile_tiers_uid_get_parameters.go new file mode 100644 index 00000000..a360c5de --- /dev/null +++ b/api/client/v1/v1_app_deployments_profile_tiers_uid_get_parameters.go @@ -0,0 +1,157 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1AppDeploymentsProfileTiersUIDGetParams creates a new V1AppDeploymentsProfileTiersUIDGetParams object +// with the default values initialized. +func NewV1AppDeploymentsProfileTiersUIDGetParams() *V1AppDeploymentsProfileTiersUIDGetParams { + var () + return &V1AppDeploymentsProfileTiersUIDGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1AppDeploymentsProfileTiersUIDGetParamsWithTimeout creates a new V1AppDeploymentsProfileTiersUIDGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1AppDeploymentsProfileTiersUIDGetParamsWithTimeout(timeout time.Duration) *V1AppDeploymentsProfileTiersUIDGetParams { + var () + return &V1AppDeploymentsProfileTiersUIDGetParams{ + + timeout: timeout, + } +} + +// NewV1AppDeploymentsProfileTiersUIDGetParamsWithContext creates a new V1AppDeploymentsProfileTiersUIDGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1AppDeploymentsProfileTiersUIDGetParamsWithContext(ctx context.Context) *V1AppDeploymentsProfileTiersUIDGetParams { + var () + return &V1AppDeploymentsProfileTiersUIDGetParams{ + + Context: ctx, + } +} + +// NewV1AppDeploymentsProfileTiersUIDGetParamsWithHTTPClient creates a new V1AppDeploymentsProfileTiersUIDGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1AppDeploymentsProfileTiersUIDGetParamsWithHTTPClient(client *http.Client) *V1AppDeploymentsProfileTiersUIDGetParams { + var () + return &V1AppDeploymentsProfileTiersUIDGetParams{ + HTTPClient: client, + } +} + +/* +V1AppDeploymentsProfileTiersUIDGetParams contains all the parameters to send to the API endpoint +for the v1 app deployments profile tiers Uid get operation typically these are written to a http.Request +*/ +type V1AppDeploymentsProfileTiersUIDGetParams struct { + + /*TierUID + Application deployment tier uid + + */ + TierUID string + /*UID + Application deployment uid + + */ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 app deployments profile tiers Uid get params +func (o *V1AppDeploymentsProfileTiersUIDGetParams) WithTimeout(timeout time.Duration) *V1AppDeploymentsProfileTiersUIDGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 app deployments profile tiers Uid get params +func (o *V1AppDeploymentsProfileTiersUIDGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 app deployments profile tiers Uid get params +func (o *V1AppDeploymentsProfileTiersUIDGetParams) WithContext(ctx context.Context) *V1AppDeploymentsProfileTiersUIDGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 app deployments profile tiers Uid get params +func (o *V1AppDeploymentsProfileTiersUIDGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 app deployments profile tiers Uid get params +func (o *V1AppDeploymentsProfileTiersUIDGetParams) WithHTTPClient(client *http.Client) *V1AppDeploymentsProfileTiersUIDGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 app deployments profile tiers Uid get params +func (o *V1AppDeploymentsProfileTiersUIDGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithTierUID adds the tierUID to the v1 app deployments profile tiers Uid get params +func (o *V1AppDeploymentsProfileTiersUIDGetParams) WithTierUID(tierUID string) *V1AppDeploymentsProfileTiersUIDGetParams { + o.SetTierUID(tierUID) + return o +} + +// SetTierUID adds the tierUid to the v1 app deployments profile tiers Uid get params +func (o *V1AppDeploymentsProfileTiersUIDGetParams) SetTierUID(tierUID string) { + o.TierUID = tierUID +} + +// WithUID adds the uid to the v1 app deployments profile tiers Uid get params +func (o *V1AppDeploymentsProfileTiersUIDGetParams) WithUID(uid string) *V1AppDeploymentsProfileTiersUIDGetParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 app deployments profile tiers Uid get params +func (o *V1AppDeploymentsProfileTiersUIDGetParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1AppDeploymentsProfileTiersUIDGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param tierUid + if err := r.SetPathParam("tierUid", o.TierUID); err != nil { + return err + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_app_deployments_profile_tiers_uid_get_responses.go b/api/client/v1/v1_app_deployments_profile_tiers_uid_get_responses.go new file mode 100644 index 00000000..fecebc54 --- /dev/null +++ b/api/client/v1/v1_app_deployments_profile_tiers_uid_get_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1AppDeploymentsProfileTiersUIDGetReader is a Reader for the V1AppDeploymentsProfileTiersUIDGet structure. +type V1AppDeploymentsProfileTiersUIDGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1AppDeploymentsProfileTiersUIDGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1AppDeploymentsProfileTiersUIDGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1AppDeploymentsProfileTiersUIDGetOK creates a V1AppDeploymentsProfileTiersUIDGetOK with default headers values +func NewV1AppDeploymentsProfileTiersUIDGetOK() *V1AppDeploymentsProfileTiersUIDGetOK { + return &V1AppDeploymentsProfileTiersUIDGetOK{} +} + +/* +V1AppDeploymentsProfileTiersUIDGetOK handles this case with default header values. + +OK +*/ +type V1AppDeploymentsProfileTiersUIDGetOK struct { + Payload *models.V1AppTier +} + +func (o *V1AppDeploymentsProfileTiersUIDGetOK) Error() string { + return fmt.Sprintf("[GET /v1/appDeployments/{uid}/profile/tiers/{tierUid}][%d] v1AppDeploymentsProfileTiersUidGetOK %+v", 200, o.Payload) +} + +func (o *V1AppDeploymentsProfileTiersUIDGetOK) GetPayload() *models.V1AppTier { + return o.Payload +} + +func (o *V1AppDeploymentsProfileTiersUIDGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1AppTier) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_app_deployments_profile_tiers_uid_manifests_get_parameters.go b/api/client/v1/v1_app_deployments_profile_tiers_uid_manifests_get_parameters.go new file mode 100644 index 00000000..88149541 --- /dev/null +++ b/api/client/v1/v1_app_deployments_profile_tiers_uid_manifests_get_parameters.go @@ -0,0 +1,157 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1AppDeploymentsProfileTiersUIDManifestsGetParams creates a new V1AppDeploymentsProfileTiersUIDManifestsGetParams object +// with the default values initialized. +func NewV1AppDeploymentsProfileTiersUIDManifestsGetParams() *V1AppDeploymentsProfileTiersUIDManifestsGetParams { + var () + return &V1AppDeploymentsProfileTiersUIDManifestsGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1AppDeploymentsProfileTiersUIDManifestsGetParamsWithTimeout creates a new V1AppDeploymentsProfileTiersUIDManifestsGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1AppDeploymentsProfileTiersUIDManifestsGetParamsWithTimeout(timeout time.Duration) *V1AppDeploymentsProfileTiersUIDManifestsGetParams { + var () + return &V1AppDeploymentsProfileTiersUIDManifestsGetParams{ + + timeout: timeout, + } +} + +// NewV1AppDeploymentsProfileTiersUIDManifestsGetParamsWithContext creates a new V1AppDeploymentsProfileTiersUIDManifestsGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1AppDeploymentsProfileTiersUIDManifestsGetParamsWithContext(ctx context.Context) *V1AppDeploymentsProfileTiersUIDManifestsGetParams { + var () + return &V1AppDeploymentsProfileTiersUIDManifestsGetParams{ + + Context: ctx, + } +} + +// NewV1AppDeploymentsProfileTiersUIDManifestsGetParamsWithHTTPClient creates a new V1AppDeploymentsProfileTiersUIDManifestsGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1AppDeploymentsProfileTiersUIDManifestsGetParamsWithHTTPClient(client *http.Client) *V1AppDeploymentsProfileTiersUIDManifestsGetParams { + var () + return &V1AppDeploymentsProfileTiersUIDManifestsGetParams{ + HTTPClient: client, + } +} + +/* +V1AppDeploymentsProfileTiersUIDManifestsGetParams contains all the parameters to send to the API endpoint +for the v1 app deployments profile tiers Uid manifests get operation typically these are written to a http.Request +*/ +type V1AppDeploymentsProfileTiersUIDManifestsGetParams struct { + + /*TierUID + Application deployment tier uid + + */ + TierUID string + /*UID + Application deployment uid + + */ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 app deployments profile tiers Uid manifests get params +func (o *V1AppDeploymentsProfileTiersUIDManifestsGetParams) WithTimeout(timeout time.Duration) *V1AppDeploymentsProfileTiersUIDManifestsGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 app deployments profile tiers Uid manifests get params +func (o *V1AppDeploymentsProfileTiersUIDManifestsGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 app deployments profile tiers Uid manifests get params +func (o *V1AppDeploymentsProfileTiersUIDManifestsGetParams) WithContext(ctx context.Context) *V1AppDeploymentsProfileTiersUIDManifestsGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 app deployments profile tiers Uid manifests get params +func (o *V1AppDeploymentsProfileTiersUIDManifestsGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 app deployments profile tiers Uid manifests get params +func (o *V1AppDeploymentsProfileTiersUIDManifestsGetParams) WithHTTPClient(client *http.Client) *V1AppDeploymentsProfileTiersUIDManifestsGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 app deployments profile tiers Uid manifests get params +func (o *V1AppDeploymentsProfileTiersUIDManifestsGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithTierUID adds the tierUID to the v1 app deployments profile tiers Uid manifests get params +func (o *V1AppDeploymentsProfileTiersUIDManifestsGetParams) WithTierUID(tierUID string) *V1AppDeploymentsProfileTiersUIDManifestsGetParams { + o.SetTierUID(tierUID) + return o +} + +// SetTierUID adds the tierUid to the v1 app deployments profile tiers Uid manifests get params +func (o *V1AppDeploymentsProfileTiersUIDManifestsGetParams) SetTierUID(tierUID string) { + o.TierUID = tierUID +} + +// WithUID adds the uid to the v1 app deployments profile tiers Uid manifests get params +func (o *V1AppDeploymentsProfileTiersUIDManifestsGetParams) WithUID(uid string) *V1AppDeploymentsProfileTiersUIDManifestsGetParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 app deployments profile tiers Uid manifests get params +func (o *V1AppDeploymentsProfileTiersUIDManifestsGetParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1AppDeploymentsProfileTiersUIDManifestsGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param tierUid + if err := r.SetPathParam("tierUid", o.TierUID); err != nil { + return err + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_app_deployments_profile_tiers_uid_manifests_get_responses.go b/api/client/v1/v1_app_deployments_profile_tiers_uid_manifests_get_responses.go new file mode 100644 index 00000000..f750a5e5 --- /dev/null +++ b/api/client/v1/v1_app_deployments_profile_tiers_uid_manifests_get_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1AppDeploymentsProfileTiersUIDManifestsGetReader is a Reader for the V1AppDeploymentsProfileTiersUIDManifestsGet structure. +type V1AppDeploymentsProfileTiersUIDManifestsGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1AppDeploymentsProfileTiersUIDManifestsGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1AppDeploymentsProfileTiersUIDManifestsGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1AppDeploymentsProfileTiersUIDManifestsGetOK creates a V1AppDeploymentsProfileTiersUIDManifestsGetOK with default headers values +func NewV1AppDeploymentsProfileTiersUIDManifestsGetOK() *V1AppDeploymentsProfileTiersUIDManifestsGetOK { + return &V1AppDeploymentsProfileTiersUIDManifestsGetOK{} +} + +/* +V1AppDeploymentsProfileTiersUIDManifestsGetOK handles this case with default header values. + +OK +*/ +type V1AppDeploymentsProfileTiersUIDManifestsGetOK struct { + Payload *models.V1AppTierManifests +} + +func (o *V1AppDeploymentsProfileTiersUIDManifestsGetOK) Error() string { + return fmt.Sprintf("[GET /v1/appDeployments/{uid}/profile/tiers/{tierUid}/manifests][%d] v1AppDeploymentsProfileTiersUidManifestsGetOK %+v", 200, o.Payload) +} + +func (o *V1AppDeploymentsProfileTiersUIDManifestsGetOK) GetPayload() *models.V1AppTierManifests { + return o.Payload +} + +func (o *V1AppDeploymentsProfileTiersUIDManifestsGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1AppTierManifests) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_app_deployments_profile_tiers_uid_update_parameters.go b/api/client/v1/v1_app_deployments_profile_tiers_uid_update_parameters.go new file mode 100644 index 00000000..1391c02c --- /dev/null +++ b/api/client/v1/v1_app_deployments_profile_tiers_uid_update_parameters.go @@ -0,0 +1,178 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1AppDeploymentsProfileTiersUIDUpdateParams creates a new V1AppDeploymentsProfileTiersUIDUpdateParams object +// with the default values initialized. +func NewV1AppDeploymentsProfileTiersUIDUpdateParams() *V1AppDeploymentsProfileTiersUIDUpdateParams { + var () + return &V1AppDeploymentsProfileTiersUIDUpdateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1AppDeploymentsProfileTiersUIDUpdateParamsWithTimeout creates a new V1AppDeploymentsProfileTiersUIDUpdateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1AppDeploymentsProfileTiersUIDUpdateParamsWithTimeout(timeout time.Duration) *V1AppDeploymentsProfileTiersUIDUpdateParams { + var () + return &V1AppDeploymentsProfileTiersUIDUpdateParams{ + + timeout: timeout, + } +} + +// NewV1AppDeploymentsProfileTiersUIDUpdateParamsWithContext creates a new V1AppDeploymentsProfileTiersUIDUpdateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1AppDeploymentsProfileTiersUIDUpdateParamsWithContext(ctx context.Context) *V1AppDeploymentsProfileTiersUIDUpdateParams { + var () + return &V1AppDeploymentsProfileTiersUIDUpdateParams{ + + Context: ctx, + } +} + +// NewV1AppDeploymentsProfileTiersUIDUpdateParamsWithHTTPClient creates a new V1AppDeploymentsProfileTiersUIDUpdateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1AppDeploymentsProfileTiersUIDUpdateParamsWithHTTPClient(client *http.Client) *V1AppDeploymentsProfileTiersUIDUpdateParams { + var () + return &V1AppDeploymentsProfileTiersUIDUpdateParams{ + HTTPClient: client, + } +} + +/* +V1AppDeploymentsProfileTiersUIDUpdateParams contains all the parameters to send to the API endpoint +for the v1 app deployments profile tiers Uid update operation typically these are written to a http.Request +*/ +type V1AppDeploymentsProfileTiersUIDUpdateParams struct { + + /*Body*/ + Body *models.V1AppTierUpdateEntity + /*TierUID + Application deployment tier uid + + */ + TierUID string + /*UID + Application deployment uid + + */ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 app deployments profile tiers Uid update params +func (o *V1AppDeploymentsProfileTiersUIDUpdateParams) WithTimeout(timeout time.Duration) *V1AppDeploymentsProfileTiersUIDUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 app deployments profile tiers Uid update params +func (o *V1AppDeploymentsProfileTiersUIDUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 app deployments profile tiers Uid update params +func (o *V1AppDeploymentsProfileTiersUIDUpdateParams) WithContext(ctx context.Context) *V1AppDeploymentsProfileTiersUIDUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 app deployments profile tiers Uid update params +func (o *V1AppDeploymentsProfileTiersUIDUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 app deployments profile tiers Uid update params +func (o *V1AppDeploymentsProfileTiersUIDUpdateParams) WithHTTPClient(client *http.Client) *V1AppDeploymentsProfileTiersUIDUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 app deployments profile tiers Uid update params +func (o *V1AppDeploymentsProfileTiersUIDUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 app deployments profile tiers Uid update params +func (o *V1AppDeploymentsProfileTiersUIDUpdateParams) WithBody(body *models.V1AppTierUpdateEntity) *V1AppDeploymentsProfileTiersUIDUpdateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 app deployments profile tiers Uid update params +func (o *V1AppDeploymentsProfileTiersUIDUpdateParams) SetBody(body *models.V1AppTierUpdateEntity) { + o.Body = body +} + +// WithTierUID adds the tierUID to the v1 app deployments profile tiers Uid update params +func (o *V1AppDeploymentsProfileTiersUIDUpdateParams) WithTierUID(tierUID string) *V1AppDeploymentsProfileTiersUIDUpdateParams { + o.SetTierUID(tierUID) + return o +} + +// SetTierUID adds the tierUid to the v1 app deployments profile tiers Uid update params +func (o *V1AppDeploymentsProfileTiersUIDUpdateParams) SetTierUID(tierUID string) { + o.TierUID = tierUID +} + +// WithUID adds the uid to the v1 app deployments profile tiers Uid update params +func (o *V1AppDeploymentsProfileTiersUIDUpdateParams) WithUID(uid string) *V1AppDeploymentsProfileTiersUIDUpdateParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 app deployments profile tiers Uid update params +func (o *V1AppDeploymentsProfileTiersUIDUpdateParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1AppDeploymentsProfileTiersUIDUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param tierUid + if err := r.SetPathParam("tierUid", o.TierUID); err != nil { + return err + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_app_deployments_profile_tiers_uid_update_responses.go b/api/client/v1/v1_app_deployments_profile_tiers_uid_update_responses.go new file mode 100644 index 00000000..9fc9a2f8 --- /dev/null +++ b/api/client/v1/v1_app_deployments_profile_tiers_uid_update_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1AppDeploymentsProfileTiersUIDUpdateReader is a Reader for the V1AppDeploymentsProfileTiersUIDUpdate structure. +type V1AppDeploymentsProfileTiersUIDUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1AppDeploymentsProfileTiersUIDUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1AppDeploymentsProfileTiersUIDUpdateNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1AppDeploymentsProfileTiersUIDUpdateNoContent creates a V1AppDeploymentsProfileTiersUIDUpdateNoContent with default headers values +func NewV1AppDeploymentsProfileTiersUIDUpdateNoContent() *V1AppDeploymentsProfileTiersUIDUpdateNoContent { + return &V1AppDeploymentsProfileTiersUIDUpdateNoContent{} +} + +/* +V1AppDeploymentsProfileTiersUIDUpdateNoContent handles this case with default header values. + +The resource was updated successfully +*/ +type V1AppDeploymentsProfileTiersUIDUpdateNoContent struct { +} + +func (o *V1AppDeploymentsProfileTiersUIDUpdateNoContent) Error() string { + return fmt.Sprintf("[PUT /v1/appDeployments/{uid}/profile/tiers/{tierUid}][%d] v1AppDeploymentsProfileTiersUidUpdateNoContent ", 204) +} + +func (o *V1AppDeploymentsProfileTiersUIDUpdateNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_app_deployments_uid_delete_parameters.go b/api/client/v1/v1_app_deployments_uid_delete_parameters.go new file mode 100644 index 00000000..57782ab2 --- /dev/null +++ b/api/client/v1/v1_app_deployments_uid_delete_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1AppDeploymentsUIDDeleteParams creates a new V1AppDeploymentsUIDDeleteParams object +// with the default values initialized. +func NewV1AppDeploymentsUIDDeleteParams() *V1AppDeploymentsUIDDeleteParams { + var () + return &V1AppDeploymentsUIDDeleteParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1AppDeploymentsUIDDeleteParamsWithTimeout creates a new V1AppDeploymentsUIDDeleteParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1AppDeploymentsUIDDeleteParamsWithTimeout(timeout time.Duration) *V1AppDeploymentsUIDDeleteParams { + var () + return &V1AppDeploymentsUIDDeleteParams{ + + timeout: timeout, + } +} + +// NewV1AppDeploymentsUIDDeleteParamsWithContext creates a new V1AppDeploymentsUIDDeleteParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1AppDeploymentsUIDDeleteParamsWithContext(ctx context.Context) *V1AppDeploymentsUIDDeleteParams { + var () + return &V1AppDeploymentsUIDDeleteParams{ + + Context: ctx, + } +} + +// NewV1AppDeploymentsUIDDeleteParamsWithHTTPClient creates a new V1AppDeploymentsUIDDeleteParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1AppDeploymentsUIDDeleteParamsWithHTTPClient(client *http.Client) *V1AppDeploymentsUIDDeleteParams { + var () + return &V1AppDeploymentsUIDDeleteParams{ + HTTPClient: client, + } +} + +/* +V1AppDeploymentsUIDDeleteParams contains all the parameters to send to the API endpoint +for the v1 app deployments Uid delete operation typically these are written to a http.Request +*/ +type V1AppDeploymentsUIDDeleteParams struct { + + /*UID + Application deployment uid + + */ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 app deployments Uid delete params +func (o *V1AppDeploymentsUIDDeleteParams) WithTimeout(timeout time.Duration) *V1AppDeploymentsUIDDeleteParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 app deployments Uid delete params +func (o *V1AppDeploymentsUIDDeleteParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 app deployments Uid delete params +func (o *V1AppDeploymentsUIDDeleteParams) WithContext(ctx context.Context) *V1AppDeploymentsUIDDeleteParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 app deployments Uid delete params +func (o *V1AppDeploymentsUIDDeleteParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 app deployments Uid delete params +func (o *V1AppDeploymentsUIDDeleteParams) WithHTTPClient(client *http.Client) *V1AppDeploymentsUIDDeleteParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 app deployments Uid delete params +func (o *V1AppDeploymentsUIDDeleteParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithUID adds the uid to the v1 app deployments Uid delete params +func (o *V1AppDeploymentsUIDDeleteParams) WithUID(uid string) *V1AppDeploymentsUIDDeleteParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 app deployments Uid delete params +func (o *V1AppDeploymentsUIDDeleteParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1AppDeploymentsUIDDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_app_deployments_uid_delete_responses.go b/api/client/v1/v1_app_deployments_uid_delete_responses.go new file mode 100644 index 00000000..8701c5b1 --- /dev/null +++ b/api/client/v1/v1_app_deployments_uid_delete_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1AppDeploymentsUIDDeleteReader is a Reader for the V1AppDeploymentsUIDDelete structure. +type V1AppDeploymentsUIDDeleteReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1AppDeploymentsUIDDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1AppDeploymentsUIDDeleteNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1AppDeploymentsUIDDeleteNoContent creates a V1AppDeploymentsUIDDeleteNoContent with default headers values +func NewV1AppDeploymentsUIDDeleteNoContent() *V1AppDeploymentsUIDDeleteNoContent { + return &V1AppDeploymentsUIDDeleteNoContent{} +} + +/* +V1AppDeploymentsUIDDeleteNoContent handles this case with default header values. + +The resource was deleted successfully +*/ +type V1AppDeploymentsUIDDeleteNoContent struct { +} + +func (o *V1AppDeploymentsUIDDeleteNoContent) Error() string { + return fmt.Sprintf("[DELETE /v1/appDeployments/{uid}][%d] v1AppDeploymentsUidDeleteNoContent ", 204) +} + +func (o *V1AppDeploymentsUIDDeleteNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_app_deployments_uid_get_parameters.go b/api/client/v1/v1_app_deployments_uid_get_parameters.go new file mode 100644 index 00000000..37cfb807 --- /dev/null +++ b/api/client/v1/v1_app_deployments_uid_get_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1AppDeploymentsUIDGetParams creates a new V1AppDeploymentsUIDGetParams object +// with the default values initialized. +func NewV1AppDeploymentsUIDGetParams() *V1AppDeploymentsUIDGetParams { + var () + return &V1AppDeploymentsUIDGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1AppDeploymentsUIDGetParamsWithTimeout creates a new V1AppDeploymentsUIDGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1AppDeploymentsUIDGetParamsWithTimeout(timeout time.Duration) *V1AppDeploymentsUIDGetParams { + var () + return &V1AppDeploymentsUIDGetParams{ + + timeout: timeout, + } +} + +// NewV1AppDeploymentsUIDGetParamsWithContext creates a new V1AppDeploymentsUIDGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1AppDeploymentsUIDGetParamsWithContext(ctx context.Context) *V1AppDeploymentsUIDGetParams { + var () + return &V1AppDeploymentsUIDGetParams{ + + Context: ctx, + } +} + +// NewV1AppDeploymentsUIDGetParamsWithHTTPClient creates a new V1AppDeploymentsUIDGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1AppDeploymentsUIDGetParamsWithHTTPClient(client *http.Client) *V1AppDeploymentsUIDGetParams { + var () + return &V1AppDeploymentsUIDGetParams{ + HTTPClient: client, + } +} + +/* +V1AppDeploymentsUIDGetParams contains all the parameters to send to the API endpoint +for the v1 app deployments Uid get operation typically these are written to a http.Request +*/ +type V1AppDeploymentsUIDGetParams struct { + + /*UID + Application deployment uid + + */ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 app deployments Uid get params +func (o *V1AppDeploymentsUIDGetParams) WithTimeout(timeout time.Duration) *V1AppDeploymentsUIDGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 app deployments Uid get params +func (o *V1AppDeploymentsUIDGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 app deployments Uid get params +func (o *V1AppDeploymentsUIDGetParams) WithContext(ctx context.Context) *V1AppDeploymentsUIDGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 app deployments Uid get params +func (o *V1AppDeploymentsUIDGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 app deployments Uid get params +func (o *V1AppDeploymentsUIDGetParams) WithHTTPClient(client *http.Client) *V1AppDeploymentsUIDGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 app deployments Uid get params +func (o *V1AppDeploymentsUIDGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithUID adds the uid to the v1 app deployments Uid get params +func (o *V1AppDeploymentsUIDGetParams) WithUID(uid string) *V1AppDeploymentsUIDGetParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 app deployments Uid get params +func (o *V1AppDeploymentsUIDGetParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1AppDeploymentsUIDGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_app_deployments_uid_get_responses.go b/api/client/v1/v1_app_deployments_uid_get_responses.go new file mode 100644 index 00000000..8ba9876b --- /dev/null +++ b/api/client/v1/v1_app_deployments_uid_get_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1AppDeploymentsUIDGetReader is a Reader for the V1AppDeploymentsUIDGet structure. +type V1AppDeploymentsUIDGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1AppDeploymentsUIDGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1AppDeploymentsUIDGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1AppDeploymentsUIDGetOK creates a V1AppDeploymentsUIDGetOK with default headers values +func NewV1AppDeploymentsUIDGetOK() *V1AppDeploymentsUIDGetOK { + return &V1AppDeploymentsUIDGetOK{} +} + +/* +V1AppDeploymentsUIDGetOK handles this case with default header values. + +OK +*/ +type V1AppDeploymentsUIDGetOK struct { + Payload *models.V1AppDeployment +} + +func (o *V1AppDeploymentsUIDGetOK) Error() string { + return fmt.Sprintf("[GET /v1/appDeployments/{uid}][%d] v1AppDeploymentsUidGetOK %+v", 200, o.Payload) +} + +func (o *V1AppDeploymentsUIDGetOK) GetPayload() *models.V1AppDeployment { + return o.Payload +} + +func (o *V1AppDeploymentsUIDGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1AppDeployment) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_app_deployments_uid_profile_apply_parameters.go b/api/client/v1/v1_app_deployments_uid_profile_apply_parameters.go new file mode 100644 index 00000000..2c433515 --- /dev/null +++ b/api/client/v1/v1_app_deployments_uid_profile_apply_parameters.go @@ -0,0 +1,168 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1AppDeploymentsUIDProfileApplyParams creates a new V1AppDeploymentsUIDProfileApplyParams object +// with the default values initialized. +func NewV1AppDeploymentsUIDProfileApplyParams() *V1AppDeploymentsUIDProfileApplyParams { + var () + return &V1AppDeploymentsUIDProfileApplyParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1AppDeploymentsUIDProfileApplyParamsWithTimeout creates a new V1AppDeploymentsUIDProfileApplyParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1AppDeploymentsUIDProfileApplyParamsWithTimeout(timeout time.Duration) *V1AppDeploymentsUIDProfileApplyParams { + var () + return &V1AppDeploymentsUIDProfileApplyParams{ + + timeout: timeout, + } +} + +// NewV1AppDeploymentsUIDProfileApplyParamsWithContext creates a new V1AppDeploymentsUIDProfileApplyParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1AppDeploymentsUIDProfileApplyParamsWithContext(ctx context.Context) *V1AppDeploymentsUIDProfileApplyParams { + var () + return &V1AppDeploymentsUIDProfileApplyParams{ + + Context: ctx, + } +} + +// NewV1AppDeploymentsUIDProfileApplyParamsWithHTTPClient creates a new V1AppDeploymentsUIDProfileApplyParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1AppDeploymentsUIDProfileApplyParamsWithHTTPClient(client *http.Client) *V1AppDeploymentsUIDProfileApplyParams { + var () + return &V1AppDeploymentsUIDProfileApplyParams{ + HTTPClient: client, + } +} + +/* +V1AppDeploymentsUIDProfileApplyParams contains all the parameters to send to the API endpoint +for the v1 app deployments Uid profile apply operation typically these are written to a http.Request +*/ +type V1AppDeploymentsUIDProfileApplyParams struct { + + /*Notify + Application deployment notification uid + + */ + Notify *string + /*UID + Application deployment uid + + */ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 app deployments Uid profile apply params +func (o *V1AppDeploymentsUIDProfileApplyParams) WithTimeout(timeout time.Duration) *V1AppDeploymentsUIDProfileApplyParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 app deployments Uid profile apply params +func (o *V1AppDeploymentsUIDProfileApplyParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 app deployments Uid profile apply params +func (o *V1AppDeploymentsUIDProfileApplyParams) WithContext(ctx context.Context) *V1AppDeploymentsUIDProfileApplyParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 app deployments Uid profile apply params +func (o *V1AppDeploymentsUIDProfileApplyParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 app deployments Uid profile apply params +func (o *V1AppDeploymentsUIDProfileApplyParams) WithHTTPClient(client *http.Client) *V1AppDeploymentsUIDProfileApplyParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 app deployments Uid profile apply params +func (o *V1AppDeploymentsUIDProfileApplyParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithNotify adds the notify to the v1 app deployments Uid profile apply params +func (o *V1AppDeploymentsUIDProfileApplyParams) WithNotify(notify *string) *V1AppDeploymentsUIDProfileApplyParams { + o.SetNotify(notify) + return o +} + +// SetNotify adds the notify to the v1 app deployments Uid profile apply params +func (o *V1AppDeploymentsUIDProfileApplyParams) SetNotify(notify *string) { + o.Notify = notify +} + +// WithUID adds the uid to the v1 app deployments Uid profile apply params +func (o *V1AppDeploymentsUIDProfileApplyParams) WithUID(uid string) *V1AppDeploymentsUIDProfileApplyParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 app deployments Uid profile apply params +func (o *V1AppDeploymentsUIDProfileApplyParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1AppDeploymentsUIDProfileApplyParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Notify != nil { + + // query param notify + var qrNotify string + if o.Notify != nil { + qrNotify = *o.Notify + } + qNotify := qrNotify + if qNotify != "" { + if err := r.SetQueryParam("notify", qNotify); err != nil { + return err + } + } + + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_app_deployments_uid_profile_apply_responses.go b/api/client/v1/v1_app_deployments_uid_profile_apply_responses.go new file mode 100644 index 00000000..99b14458 --- /dev/null +++ b/api/client/v1/v1_app_deployments_uid_profile_apply_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1AppDeploymentsUIDProfileApplyReader is a Reader for the V1AppDeploymentsUIDProfileApply structure. +type V1AppDeploymentsUIDProfileApplyReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1AppDeploymentsUIDProfileApplyReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1AppDeploymentsUIDProfileApplyNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1AppDeploymentsUIDProfileApplyNoContent creates a V1AppDeploymentsUIDProfileApplyNoContent with default headers values +func NewV1AppDeploymentsUIDProfileApplyNoContent() *V1AppDeploymentsUIDProfileApplyNoContent { + return &V1AppDeploymentsUIDProfileApplyNoContent{} +} + +/* +V1AppDeploymentsUIDProfileApplyNoContent handles this case with default header values. + +The resource was updated successfully +*/ +type V1AppDeploymentsUIDProfileApplyNoContent struct { +} + +func (o *V1AppDeploymentsUIDProfileApplyNoContent) Error() string { + return fmt.Sprintf("[PATCH /v1/appDeployments/{uid}/profile/apply][%d] v1AppDeploymentsUidProfileApplyNoContent ", 204) +} + +func (o *V1AppDeploymentsUIDProfileApplyNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_app_deployments_uid_profile_get_parameters.go b/api/client/v1/v1_app_deployments_uid_profile_get_parameters.go new file mode 100644 index 00000000..3a210ae5 --- /dev/null +++ b/api/client/v1/v1_app_deployments_uid_profile_get_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1AppDeploymentsUIDProfileGetParams creates a new V1AppDeploymentsUIDProfileGetParams object +// with the default values initialized. +func NewV1AppDeploymentsUIDProfileGetParams() *V1AppDeploymentsUIDProfileGetParams { + var () + return &V1AppDeploymentsUIDProfileGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1AppDeploymentsUIDProfileGetParamsWithTimeout creates a new V1AppDeploymentsUIDProfileGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1AppDeploymentsUIDProfileGetParamsWithTimeout(timeout time.Duration) *V1AppDeploymentsUIDProfileGetParams { + var () + return &V1AppDeploymentsUIDProfileGetParams{ + + timeout: timeout, + } +} + +// NewV1AppDeploymentsUIDProfileGetParamsWithContext creates a new V1AppDeploymentsUIDProfileGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1AppDeploymentsUIDProfileGetParamsWithContext(ctx context.Context) *V1AppDeploymentsUIDProfileGetParams { + var () + return &V1AppDeploymentsUIDProfileGetParams{ + + Context: ctx, + } +} + +// NewV1AppDeploymentsUIDProfileGetParamsWithHTTPClient creates a new V1AppDeploymentsUIDProfileGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1AppDeploymentsUIDProfileGetParamsWithHTTPClient(client *http.Client) *V1AppDeploymentsUIDProfileGetParams { + var () + return &V1AppDeploymentsUIDProfileGetParams{ + HTTPClient: client, + } +} + +/* +V1AppDeploymentsUIDProfileGetParams contains all the parameters to send to the API endpoint +for the v1 app deployments Uid profile get operation typically these are written to a http.Request +*/ +type V1AppDeploymentsUIDProfileGetParams struct { + + /*UID + Application deployment uid + + */ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 app deployments Uid profile get params +func (o *V1AppDeploymentsUIDProfileGetParams) WithTimeout(timeout time.Duration) *V1AppDeploymentsUIDProfileGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 app deployments Uid profile get params +func (o *V1AppDeploymentsUIDProfileGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 app deployments Uid profile get params +func (o *V1AppDeploymentsUIDProfileGetParams) WithContext(ctx context.Context) *V1AppDeploymentsUIDProfileGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 app deployments Uid profile get params +func (o *V1AppDeploymentsUIDProfileGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 app deployments Uid profile get params +func (o *V1AppDeploymentsUIDProfileGetParams) WithHTTPClient(client *http.Client) *V1AppDeploymentsUIDProfileGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 app deployments Uid profile get params +func (o *V1AppDeploymentsUIDProfileGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithUID adds the uid to the v1 app deployments Uid profile get params +func (o *V1AppDeploymentsUIDProfileGetParams) WithUID(uid string) *V1AppDeploymentsUIDProfileGetParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 app deployments Uid profile get params +func (o *V1AppDeploymentsUIDProfileGetParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1AppDeploymentsUIDProfileGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_app_deployments_uid_profile_get_responses.go b/api/client/v1/v1_app_deployments_uid_profile_get_responses.go new file mode 100644 index 00000000..f872175b --- /dev/null +++ b/api/client/v1/v1_app_deployments_uid_profile_get_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1AppDeploymentsUIDProfileGetReader is a Reader for the V1AppDeploymentsUIDProfileGet structure. +type V1AppDeploymentsUIDProfileGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1AppDeploymentsUIDProfileGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1AppDeploymentsUIDProfileGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1AppDeploymentsUIDProfileGetOK creates a V1AppDeploymentsUIDProfileGetOK with default headers values +func NewV1AppDeploymentsUIDProfileGetOK() *V1AppDeploymentsUIDProfileGetOK { + return &V1AppDeploymentsUIDProfileGetOK{} +} + +/* +V1AppDeploymentsUIDProfileGetOK handles this case with default header values. + +OK +*/ +type V1AppDeploymentsUIDProfileGetOK struct { + Payload *models.V1AppDeploymentProfileSpec +} + +func (o *V1AppDeploymentsUIDProfileGetOK) Error() string { + return fmt.Sprintf("[GET /v1/appDeployments/{uid}/profile][%d] v1AppDeploymentsUidProfileGetOK %+v", 200, o.Payload) +} + +func (o *V1AppDeploymentsUIDProfileGetOK) GetPayload() *models.V1AppDeploymentProfileSpec { + return o.Payload +} + +func (o *V1AppDeploymentsUIDProfileGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1AppDeploymentProfileSpec) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_app_deployments_uid_profile_update_parameters.go b/api/client/v1/v1_app_deployments_uid_profile_update_parameters.go new file mode 100644 index 00000000..d6b9f21f --- /dev/null +++ b/api/client/v1/v1_app_deployments_uid_profile_update_parameters.go @@ -0,0 +1,157 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1AppDeploymentsUIDProfileUpdateParams creates a new V1AppDeploymentsUIDProfileUpdateParams object +// with the default values initialized. +func NewV1AppDeploymentsUIDProfileUpdateParams() *V1AppDeploymentsUIDProfileUpdateParams { + var () + return &V1AppDeploymentsUIDProfileUpdateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1AppDeploymentsUIDProfileUpdateParamsWithTimeout creates a new V1AppDeploymentsUIDProfileUpdateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1AppDeploymentsUIDProfileUpdateParamsWithTimeout(timeout time.Duration) *V1AppDeploymentsUIDProfileUpdateParams { + var () + return &V1AppDeploymentsUIDProfileUpdateParams{ + + timeout: timeout, + } +} + +// NewV1AppDeploymentsUIDProfileUpdateParamsWithContext creates a new V1AppDeploymentsUIDProfileUpdateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1AppDeploymentsUIDProfileUpdateParamsWithContext(ctx context.Context) *V1AppDeploymentsUIDProfileUpdateParams { + var () + return &V1AppDeploymentsUIDProfileUpdateParams{ + + Context: ctx, + } +} + +// NewV1AppDeploymentsUIDProfileUpdateParamsWithHTTPClient creates a new V1AppDeploymentsUIDProfileUpdateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1AppDeploymentsUIDProfileUpdateParamsWithHTTPClient(client *http.Client) *V1AppDeploymentsUIDProfileUpdateParams { + var () + return &V1AppDeploymentsUIDProfileUpdateParams{ + HTTPClient: client, + } +} + +/* +V1AppDeploymentsUIDProfileUpdateParams contains all the parameters to send to the API endpoint +for the v1 app deployments Uid profile update operation typically these are written to a http.Request +*/ +type V1AppDeploymentsUIDProfileUpdateParams struct { + + /*Body*/ + Body *models.V1AppDeploymentProfileEntity + /*UID + Application deployment uid + + */ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 app deployments Uid profile update params +func (o *V1AppDeploymentsUIDProfileUpdateParams) WithTimeout(timeout time.Duration) *V1AppDeploymentsUIDProfileUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 app deployments Uid profile update params +func (o *V1AppDeploymentsUIDProfileUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 app deployments Uid profile update params +func (o *V1AppDeploymentsUIDProfileUpdateParams) WithContext(ctx context.Context) *V1AppDeploymentsUIDProfileUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 app deployments Uid profile update params +func (o *V1AppDeploymentsUIDProfileUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 app deployments Uid profile update params +func (o *V1AppDeploymentsUIDProfileUpdateParams) WithHTTPClient(client *http.Client) *V1AppDeploymentsUIDProfileUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 app deployments Uid profile update params +func (o *V1AppDeploymentsUIDProfileUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 app deployments Uid profile update params +func (o *V1AppDeploymentsUIDProfileUpdateParams) WithBody(body *models.V1AppDeploymentProfileEntity) *V1AppDeploymentsUIDProfileUpdateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 app deployments Uid profile update params +func (o *V1AppDeploymentsUIDProfileUpdateParams) SetBody(body *models.V1AppDeploymentProfileEntity) { + o.Body = body +} + +// WithUID adds the uid to the v1 app deployments Uid profile update params +func (o *V1AppDeploymentsUIDProfileUpdateParams) WithUID(uid string) *V1AppDeploymentsUIDProfileUpdateParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 app deployments Uid profile update params +func (o *V1AppDeploymentsUIDProfileUpdateParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1AppDeploymentsUIDProfileUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_app_deployments_uid_profile_update_responses.go b/api/client/v1/v1_app_deployments_uid_profile_update_responses.go new file mode 100644 index 00000000..95f12b58 --- /dev/null +++ b/api/client/v1/v1_app_deployments_uid_profile_update_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1AppDeploymentsUIDProfileUpdateReader is a Reader for the V1AppDeploymentsUIDProfileUpdate structure. +type V1AppDeploymentsUIDProfileUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1AppDeploymentsUIDProfileUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1AppDeploymentsUIDProfileUpdateNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1AppDeploymentsUIDProfileUpdateNoContent creates a V1AppDeploymentsUIDProfileUpdateNoContent with default headers values +func NewV1AppDeploymentsUIDProfileUpdateNoContent() *V1AppDeploymentsUIDProfileUpdateNoContent { + return &V1AppDeploymentsUIDProfileUpdateNoContent{} +} + +/* +V1AppDeploymentsUIDProfileUpdateNoContent handles this case with default header values. + +The resource was updated successfully +*/ +type V1AppDeploymentsUIDProfileUpdateNoContent struct { +} + +func (o *V1AppDeploymentsUIDProfileUpdateNoContent) Error() string { + return fmt.Sprintf("[PUT /v1/appDeployments/{uid}/profile][%d] v1AppDeploymentsUidProfileUpdateNoContent ", 204) +} + +func (o *V1AppDeploymentsUIDProfileUpdateNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_app_deployments_uid_profile_versions_get_parameters.go b/api/client/v1/v1_app_deployments_uid_profile_versions_get_parameters.go new file mode 100644 index 00000000..cae6e1f6 --- /dev/null +++ b/api/client/v1/v1_app_deployments_uid_profile_versions_get_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1AppDeploymentsUIDProfileVersionsGetParams creates a new V1AppDeploymentsUIDProfileVersionsGetParams object +// with the default values initialized. +func NewV1AppDeploymentsUIDProfileVersionsGetParams() *V1AppDeploymentsUIDProfileVersionsGetParams { + var () + return &V1AppDeploymentsUIDProfileVersionsGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1AppDeploymentsUIDProfileVersionsGetParamsWithTimeout creates a new V1AppDeploymentsUIDProfileVersionsGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1AppDeploymentsUIDProfileVersionsGetParamsWithTimeout(timeout time.Duration) *V1AppDeploymentsUIDProfileVersionsGetParams { + var () + return &V1AppDeploymentsUIDProfileVersionsGetParams{ + + timeout: timeout, + } +} + +// NewV1AppDeploymentsUIDProfileVersionsGetParamsWithContext creates a new V1AppDeploymentsUIDProfileVersionsGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1AppDeploymentsUIDProfileVersionsGetParamsWithContext(ctx context.Context) *V1AppDeploymentsUIDProfileVersionsGetParams { + var () + return &V1AppDeploymentsUIDProfileVersionsGetParams{ + + Context: ctx, + } +} + +// NewV1AppDeploymentsUIDProfileVersionsGetParamsWithHTTPClient creates a new V1AppDeploymentsUIDProfileVersionsGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1AppDeploymentsUIDProfileVersionsGetParamsWithHTTPClient(client *http.Client) *V1AppDeploymentsUIDProfileVersionsGetParams { + var () + return &V1AppDeploymentsUIDProfileVersionsGetParams{ + HTTPClient: client, + } +} + +/* +V1AppDeploymentsUIDProfileVersionsGetParams contains all the parameters to send to the API endpoint +for the v1 app deployments Uid profile versions get operation typically these are written to a http.Request +*/ +type V1AppDeploymentsUIDProfileVersionsGetParams struct { + + /*UID + Application deployment uid + + */ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 app deployments Uid profile versions get params +func (o *V1AppDeploymentsUIDProfileVersionsGetParams) WithTimeout(timeout time.Duration) *V1AppDeploymentsUIDProfileVersionsGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 app deployments Uid profile versions get params +func (o *V1AppDeploymentsUIDProfileVersionsGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 app deployments Uid profile versions get params +func (o *V1AppDeploymentsUIDProfileVersionsGetParams) WithContext(ctx context.Context) *V1AppDeploymentsUIDProfileVersionsGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 app deployments Uid profile versions get params +func (o *V1AppDeploymentsUIDProfileVersionsGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 app deployments Uid profile versions get params +func (o *V1AppDeploymentsUIDProfileVersionsGetParams) WithHTTPClient(client *http.Client) *V1AppDeploymentsUIDProfileVersionsGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 app deployments Uid profile versions get params +func (o *V1AppDeploymentsUIDProfileVersionsGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithUID adds the uid to the v1 app deployments Uid profile versions get params +func (o *V1AppDeploymentsUIDProfileVersionsGetParams) WithUID(uid string) *V1AppDeploymentsUIDProfileVersionsGetParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 app deployments Uid profile versions get params +func (o *V1AppDeploymentsUIDProfileVersionsGetParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1AppDeploymentsUIDProfileVersionsGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_app_deployments_uid_profile_versions_get_responses.go b/api/client/v1/v1_app_deployments_uid_profile_versions_get_responses.go new file mode 100644 index 00000000..7d585572 --- /dev/null +++ b/api/client/v1/v1_app_deployments_uid_profile_versions_get_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1AppDeploymentsUIDProfileVersionsGetReader is a Reader for the V1AppDeploymentsUIDProfileVersionsGet structure. +type V1AppDeploymentsUIDProfileVersionsGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1AppDeploymentsUIDProfileVersionsGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1AppDeploymentsUIDProfileVersionsGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1AppDeploymentsUIDProfileVersionsGetOK creates a V1AppDeploymentsUIDProfileVersionsGetOK with default headers values +func NewV1AppDeploymentsUIDProfileVersionsGetOK() *V1AppDeploymentsUIDProfileVersionsGetOK { + return &V1AppDeploymentsUIDProfileVersionsGetOK{} +} + +/* +V1AppDeploymentsUIDProfileVersionsGetOK handles this case with default header values. + +OK +*/ +type V1AppDeploymentsUIDProfileVersionsGetOK struct { + Payload *models.V1AppDeploymentProfileVersions +} + +func (o *V1AppDeploymentsUIDProfileVersionsGetOK) Error() string { + return fmt.Sprintf("[GET /v1/appDeployments/{uid}/profile/versions][%d] v1AppDeploymentsUidProfileVersionsGetOK %+v", 200, o.Payload) +} + +func (o *V1AppDeploymentsUIDProfileVersionsGetOK) GetPayload() *models.V1AppDeploymentProfileVersions { + return o.Payload +} + +func (o *V1AppDeploymentsUIDProfileVersionsGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1AppDeploymentProfileVersions) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_app_deployments_virtual_cluster_create_parameters.go b/api/client/v1/v1_app_deployments_virtual_cluster_create_parameters.go new file mode 100644 index 00000000..c035b36c --- /dev/null +++ b/api/client/v1/v1_app_deployments_virtual_cluster_create_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1AppDeploymentsVirtualClusterCreateParams creates a new V1AppDeploymentsVirtualClusterCreateParams object +// with the default values initialized. +func NewV1AppDeploymentsVirtualClusterCreateParams() *V1AppDeploymentsVirtualClusterCreateParams { + var () + return &V1AppDeploymentsVirtualClusterCreateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1AppDeploymentsVirtualClusterCreateParamsWithTimeout creates a new V1AppDeploymentsVirtualClusterCreateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1AppDeploymentsVirtualClusterCreateParamsWithTimeout(timeout time.Duration) *V1AppDeploymentsVirtualClusterCreateParams { + var () + return &V1AppDeploymentsVirtualClusterCreateParams{ + + timeout: timeout, + } +} + +// NewV1AppDeploymentsVirtualClusterCreateParamsWithContext creates a new V1AppDeploymentsVirtualClusterCreateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1AppDeploymentsVirtualClusterCreateParamsWithContext(ctx context.Context) *V1AppDeploymentsVirtualClusterCreateParams { + var () + return &V1AppDeploymentsVirtualClusterCreateParams{ + + Context: ctx, + } +} + +// NewV1AppDeploymentsVirtualClusterCreateParamsWithHTTPClient creates a new V1AppDeploymentsVirtualClusterCreateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1AppDeploymentsVirtualClusterCreateParamsWithHTTPClient(client *http.Client) *V1AppDeploymentsVirtualClusterCreateParams { + var () + return &V1AppDeploymentsVirtualClusterCreateParams{ + HTTPClient: client, + } +} + +/* +V1AppDeploymentsVirtualClusterCreateParams contains all the parameters to send to the API endpoint +for the v1 app deployments virtual cluster create operation typically these are written to a http.Request +*/ +type V1AppDeploymentsVirtualClusterCreateParams struct { + + /*Body*/ + Body *models.V1AppDeploymentVirtualClusterEntity + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 app deployments virtual cluster create params +func (o *V1AppDeploymentsVirtualClusterCreateParams) WithTimeout(timeout time.Duration) *V1AppDeploymentsVirtualClusterCreateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 app deployments virtual cluster create params +func (o *V1AppDeploymentsVirtualClusterCreateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 app deployments virtual cluster create params +func (o *V1AppDeploymentsVirtualClusterCreateParams) WithContext(ctx context.Context) *V1AppDeploymentsVirtualClusterCreateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 app deployments virtual cluster create params +func (o *V1AppDeploymentsVirtualClusterCreateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 app deployments virtual cluster create params +func (o *V1AppDeploymentsVirtualClusterCreateParams) WithHTTPClient(client *http.Client) *V1AppDeploymentsVirtualClusterCreateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 app deployments virtual cluster create params +func (o *V1AppDeploymentsVirtualClusterCreateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 app deployments virtual cluster create params +func (o *V1AppDeploymentsVirtualClusterCreateParams) WithBody(body *models.V1AppDeploymentVirtualClusterEntity) *V1AppDeploymentsVirtualClusterCreateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 app deployments virtual cluster create params +func (o *V1AppDeploymentsVirtualClusterCreateParams) SetBody(body *models.V1AppDeploymentVirtualClusterEntity) { + o.Body = body +} + +// WriteToRequest writes these params to a swagger request +func (o *V1AppDeploymentsVirtualClusterCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_app_deployments_virtual_cluster_create_responses.go b/api/client/v1/v1_app_deployments_virtual_cluster_create_responses.go new file mode 100644 index 00000000..c6d80136 --- /dev/null +++ b/api/client/v1/v1_app_deployments_virtual_cluster_create_responses.go @@ -0,0 +1,77 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1AppDeploymentsVirtualClusterCreateReader is a Reader for the V1AppDeploymentsVirtualClusterCreate structure. +type V1AppDeploymentsVirtualClusterCreateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1AppDeploymentsVirtualClusterCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 201: + result := NewV1AppDeploymentsVirtualClusterCreateCreated() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1AppDeploymentsVirtualClusterCreateCreated creates a V1AppDeploymentsVirtualClusterCreateCreated with default headers values +func NewV1AppDeploymentsVirtualClusterCreateCreated() *V1AppDeploymentsVirtualClusterCreateCreated { + return &V1AppDeploymentsVirtualClusterCreateCreated{} +} + +/* +V1AppDeploymentsVirtualClusterCreateCreated handles this case with default header values. + +Created successfully +*/ +type V1AppDeploymentsVirtualClusterCreateCreated struct { + /*Audit uid for the request + */ + AuditUID string + + Payload *models.V1UID +} + +func (o *V1AppDeploymentsVirtualClusterCreateCreated) Error() string { + return fmt.Sprintf("[POST /v1/appDeployments][%d] v1AppDeploymentsVirtualClusterCreateCreated %+v", 201, o.Payload) +} + +func (o *V1AppDeploymentsVirtualClusterCreateCreated) GetPayload() *models.V1UID { + return o.Payload +} + +func (o *V1AppDeploymentsVirtualClusterCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header AuditUid + o.AuditUID = response.GetHeader("AuditUid") + + o.Payload = new(models.V1UID) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_app_profiles_create_parameters.go b/api/client/v1/v1_app_profiles_create_parameters.go new file mode 100644 index 00000000..b16e94ec --- /dev/null +++ b/api/client/v1/v1_app_profiles_create_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1AppProfilesCreateParams creates a new V1AppProfilesCreateParams object +// with the default values initialized. +func NewV1AppProfilesCreateParams() *V1AppProfilesCreateParams { + var () + return &V1AppProfilesCreateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1AppProfilesCreateParamsWithTimeout creates a new V1AppProfilesCreateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1AppProfilesCreateParamsWithTimeout(timeout time.Duration) *V1AppProfilesCreateParams { + var () + return &V1AppProfilesCreateParams{ + + timeout: timeout, + } +} + +// NewV1AppProfilesCreateParamsWithContext creates a new V1AppProfilesCreateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1AppProfilesCreateParamsWithContext(ctx context.Context) *V1AppProfilesCreateParams { + var () + return &V1AppProfilesCreateParams{ + + Context: ctx, + } +} + +// NewV1AppProfilesCreateParamsWithHTTPClient creates a new V1AppProfilesCreateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1AppProfilesCreateParamsWithHTTPClient(client *http.Client) *V1AppProfilesCreateParams { + var () + return &V1AppProfilesCreateParams{ + HTTPClient: client, + } +} + +/* +V1AppProfilesCreateParams contains all the parameters to send to the API endpoint +for the v1 app profiles create operation typically these are written to a http.Request +*/ +type V1AppProfilesCreateParams struct { + + /*Body*/ + Body *models.V1AppProfileEntity + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 app profiles create params +func (o *V1AppProfilesCreateParams) WithTimeout(timeout time.Duration) *V1AppProfilesCreateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 app profiles create params +func (o *V1AppProfilesCreateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 app profiles create params +func (o *V1AppProfilesCreateParams) WithContext(ctx context.Context) *V1AppProfilesCreateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 app profiles create params +func (o *V1AppProfilesCreateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 app profiles create params +func (o *V1AppProfilesCreateParams) WithHTTPClient(client *http.Client) *V1AppProfilesCreateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 app profiles create params +func (o *V1AppProfilesCreateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 app profiles create params +func (o *V1AppProfilesCreateParams) WithBody(body *models.V1AppProfileEntity) *V1AppProfilesCreateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 app profiles create params +func (o *V1AppProfilesCreateParams) SetBody(body *models.V1AppProfileEntity) { + o.Body = body +} + +// WriteToRequest writes these params to a swagger request +func (o *V1AppProfilesCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_app_profiles_create_responses.go b/api/client/v1/v1_app_profiles_create_responses.go new file mode 100644 index 00000000..4b5a6825 --- /dev/null +++ b/api/client/v1/v1_app_profiles_create_responses.go @@ -0,0 +1,77 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1AppProfilesCreateReader is a Reader for the V1AppProfilesCreate structure. +type V1AppProfilesCreateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1AppProfilesCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 201: + result := NewV1AppProfilesCreateCreated() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1AppProfilesCreateCreated creates a V1AppProfilesCreateCreated with default headers values +func NewV1AppProfilesCreateCreated() *V1AppProfilesCreateCreated { + return &V1AppProfilesCreateCreated{} +} + +/* +V1AppProfilesCreateCreated handles this case with default header values. + +Created successfully +*/ +type V1AppProfilesCreateCreated struct { + /*Audit uid for the request + */ + AuditUID string + + Payload *models.V1UID +} + +func (o *V1AppProfilesCreateCreated) Error() string { + return fmt.Sprintf("[POST /v1/appProfiles][%d] v1AppProfilesCreateCreated %+v", 201, o.Payload) +} + +func (o *V1AppProfilesCreateCreated) GetPayload() *models.V1UID { + return o.Payload +} + +func (o *V1AppProfilesCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header AuditUid + o.AuditUID = response.GetHeader("AuditUid") + + o.Payload = new(models.V1UID) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_app_profiles_macros_list_parameters.go b/api/client/v1/v1_app_profiles_macros_list_parameters.go new file mode 100644 index 00000000..45867c69 --- /dev/null +++ b/api/client/v1/v1_app_profiles_macros_list_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1AppProfilesMacrosListParams creates a new V1AppProfilesMacrosListParams object +// with the default values initialized. +func NewV1AppProfilesMacrosListParams() *V1AppProfilesMacrosListParams { + + return &V1AppProfilesMacrosListParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1AppProfilesMacrosListParamsWithTimeout creates a new V1AppProfilesMacrosListParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1AppProfilesMacrosListParamsWithTimeout(timeout time.Duration) *V1AppProfilesMacrosListParams { + + return &V1AppProfilesMacrosListParams{ + + timeout: timeout, + } +} + +// NewV1AppProfilesMacrosListParamsWithContext creates a new V1AppProfilesMacrosListParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1AppProfilesMacrosListParamsWithContext(ctx context.Context) *V1AppProfilesMacrosListParams { + + return &V1AppProfilesMacrosListParams{ + + Context: ctx, + } +} + +// NewV1AppProfilesMacrosListParamsWithHTTPClient creates a new V1AppProfilesMacrosListParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1AppProfilesMacrosListParamsWithHTTPClient(client *http.Client) *V1AppProfilesMacrosListParams { + + return &V1AppProfilesMacrosListParams{ + HTTPClient: client, + } +} + +/* +V1AppProfilesMacrosListParams contains all the parameters to send to the API endpoint +for the v1 app profiles macros list operation typically these are written to a http.Request +*/ +type V1AppProfilesMacrosListParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 app profiles macros list params +func (o *V1AppProfilesMacrosListParams) WithTimeout(timeout time.Duration) *V1AppProfilesMacrosListParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 app profiles macros list params +func (o *V1AppProfilesMacrosListParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 app profiles macros list params +func (o *V1AppProfilesMacrosListParams) WithContext(ctx context.Context) *V1AppProfilesMacrosListParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 app profiles macros list params +func (o *V1AppProfilesMacrosListParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 app profiles macros list params +func (o *V1AppProfilesMacrosListParams) WithHTTPClient(client *http.Client) *V1AppProfilesMacrosListParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 app profiles macros list params +func (o *V1AppProfilesMacrosListParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *V1AppProfilesMacrosListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_app_profiles_macros_list_responses.go b/api/client/v1/v1_app_profiles_macros_list_responses.go new file mode 100644 index 00000000..64a365e9 --- /dev/null +++ b/api/client/v1/v1_app_profiles_macros_list_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1AppProfilesMacrosListReader is a Reader for the V1AppProfilesMacrosList structure. +type V1AppProfilesMacrosListReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1AppProfilesMacrosListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1AppProfilesMacrosListOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1AppProfilesMacrosListOK creates a V1AppProfilesMacrosListOK with default headers values +func NewV1AppProfilesMacrosListOK() *V1AppProfilesMacrosListOK { + return &V1AppProfilesMacrosListOK{} +} + +/* +V1AppProfilesMacrosListOK handles this case with default header values. + +OK +*/ +type V1AppProfilesMacrosListOK struct { + Payload *models.V1Macros +} + +func (o *V1AppProfilesMacrosListOK) Error() string { + return fmt.Sprintf("[GET /v1/appProfiles/macros][%d] v1AppProfilesMacrosListOK %+v", 200, o.Payload) +} + +func (o *V1AppProfilesMacrosListOK) GetPayload() *models.V1Macros { + return o.Payload +} + +func (o *V1AppProfilesMacrosListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1Macros) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_app_profiles_uid_clone_parameters.go b/api/client/v1/v1_app_profiles_uid_clone_parameters.go new file mode 100644 index 00000000..ec694cf6 --- /dev/null +++ b/api/client/v1/v1_app_profiles_uid_clone_parameters.go @@ -0,0 +1,157 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1AppProfilesUIDCloneParams creates a new V1AppProfilesUIDCloneParams object +// with the default values initialized. +func NewV1AppProfilesUIDCloneParams() *V1AppProfilesUIDCloneParams { + var () + return &V1AppProfilesUIDCloneParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1AppProfilesUIDCloneParamsWithTimeout creates a new V1AppProfilesUIDCloneParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1AppProfilesUIDCloneParamsWithTimeout(timeout time.Duration) *V1AppProfilesUIDCloneParams { + var () + return &V1AppProfilesUIDCloneParams{ + + timeout: timeout, + } +} + +// NewV1AppProfilesUIDCloneParamsWithContext creates a new V1AppProfilesUIDCloneParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1AppProfilesUIDCloneParamsWithContext(ctx context.Context) *V1AppProfilesUIDCloneParams { + var () + return &V1AppProfilesUIDCloneParams{ + + Context: ctx, + } +} + +// NewV1AppProfilesUIDCloneParamsWithHTTPClient creates a new V1AppProfilesUIDCloneParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1AppProfilesUIDCloneParamsWithHTTPClient(client *http.Client) *V1AppProfilesUIDCloneParams { + var () + return &V1AppProfilesUIDCloneParams{ + HTTPClient: client, + } +} + +/* +V1AppProfilesUIDCloneParams contains all the parameters to send to the API endpoint +for the v1 app profiles Uid clone operation typically these are written to a http.Request +*/ +type V1AppProfilesUIDCloneParams struct { + + /*Body*/ + Body *models.V1AppProfileCloneEntity + /*UID + Application profile uid + + */ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 app profiles Uid clone params +func (o *V1AppProfilesUIDCloneParams) WithTimeout(timeout time.Duration) *V1AppProfilesUIDCloneParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 app profiles Uid clone params +func (o *V1AppProfilesUIDCloneParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 app profiles Uid clone params +func (o *V1AppProfilesUIDCloneParams) WithContext(ctx context.Context) *V1AppProfilesUIDCloneParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 app profiles Uid clone params +func (o *V1AppProfilesUIDCloneParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 app profiles Uid clone params +func (o *V1AppProfilesUIDCloneParams) WithHTTPClient(client *http.Client) *V1AppProfilesUIDCloneParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 app profiles Uid clone params +func (o *V1AppProfilesUIDCloneParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 app profiles Uid clone params +func (o *V1AppProfilesUIDCloneParams) WithBody(body *models.V1AppProfileCloneEntity) *V1AppProfilesUIDCloneParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 app profiles Uid clone params +func (o *V1AppProfilesUIDCloneParams) SetBody(body *models.V1AppProfileCloneEntity) { + o.Body = body +} + +// WithUID adds the uid to the v1 app profiles Uid clone params +func (o *V1AppProfilesUIDCloneParams) WithUID(uid string) *V1AppProfilesUIDCloneParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 app profiles Uid clone params +func (o *V1AppProfilesUIDCloneParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1AppProfilesUIDCloneParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_app_profiles_uid_clone_responses.go b/api/client/v1/v1_app_profiles_uid_clone_responses.go new file mode 100644 index 00000000..5122d083 --- /dev/null +++ b/api/client/v1/v1_app_profiles_uid_clone_responses.go @@ -0,0 +1,77 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1AppProfilesUIDCloneReader is a Reader for the V1AppProfilesUIDClone structure. +type V1AppProfilesUIDCloneReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1AppProfilesUIDCloneReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 201: + result := NewV1AppProfilesUIDCloneCreated() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1AppProfilesUIDCloneCreated creates a V1AppProfilesUIDCloneCreated with default headers values +func NewV1AppProfilesUIDCloneCreated() *V1AppProfilesUIDCloneCreated { + return &V1AppProfilesUIDCloneCreated{} +} + +/* +V1AppProfilesUIDCloneCreated handles this case with default header values. + +Created successfully +*/ +type V1AppProfilesUIDCloneCreated struct { + /*Audit uid for the request + */ + AuditUID string + + Payload *models.V1UID +} + +func (o *V1AppProfilesUIDCloneCreated) Error() string { + return fmt.Sprintf("[POST /v1/appProfiles/{uid}/clone][%d] v1AppProfilesUidCloneCreated %+v", 201, o.Payload) +} + +func (o *V1AppProfilesUIDCloneCreated) GetPayload() *models.V1UID { + return o.Payload +} + +func (o *V1AppProfilesUIDCloneCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header AuditUid + o.AuditUID = response.GetHeader("AuditUid") + + o.Payload = new(models.V1UID) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_app_profiles_uid_clone_validate_parameters.go b/api/client/v1/v1_app_profiles_uid_clone_validate_parameters.go new file mode 100644 index 00000000..36366e09 --- /dev/null +++ b/api/client/v1/v1_app_profiles_uid_clone_validate_parameters.go @@ -0,0 +1,157 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1AppProfilesUIDCloneValidateParams creates a new V1AppProfilesUIDCloneValidateParams object +// with the default values initialized. +func NewV1AppProfilesUIDCloneValidateParams() *V1AppProfilesUIDCloneValidateParams { + var () + return &V1AppProfilesUIDCloneValidateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1AppProfilesUIDCloneValidateParamsWithTimeout creates a new V1AppProfilesUIDCloneValidateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1AppProfilesUIDCloneValidateParamsWithTimeout(timeout time.Duration) *V1AppProfilesUIDCloneValidateParams { + var () + return &V1AppProfilesUIDCloneValidateParams{ + + timeout: timeout, + } +} + +// NewV1AppProfilesUIDCloneValidateParamsWithContext creates a new V1AppProfilesUIDCloneValidateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1AppProfilesUIDCloneValidateParamsWithContext(ctx context.Context) *V1AppProfilesUIDCloneValidateParams { + var () + return &V1AppProfilesUIDCloneValidateParams{ + + Context: ctx, + } +} + +// NewV1AppProfilesUIDCloneValidateParamsWithHTTPClient creates a new V1AppProfilesUIDCloneValidateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1AppProfilesUIDCloneValidateParamsWithHTTPClient(client *http.Client) *V1AppProfilesUIDCloneValidateParams { + var () + return &V1AppProfilesUIDCloneValidateParams{ + HTTPClient: client, + } +} + +/* +V1AppProfilesUIDCloneValidateParams contains all the parameters to send to the API endpoint +for the v1 app profiles Uid clone validate operation typically these are written to a http.Request +*/ +type V1AppProfilesUIDCloneValidateParams struct { + + /*Body*/ + Body *models.V1AppProfileCloneMetaInputEntity + /*UID + Application profile uid + + */ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 app profiles Uid clone validate params +func (o *V1AppProfilesUIDCloneValidateParams) WithTimeout(timeout time.Duration) *V1AppProfilesUIDCloneValidateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 app profiles Uid clone validate params +func (o *V1AppProfilesUIDCloneValidateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 app profiles Uid clone validate params +func (o *V1AppProfilesUIDCloneValidateParams) WithContext(ctx context.Context) *V1AppProfilesUIDCloneValidateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 app profiles Uid clone validate params +func (o *V1AppProfilesUIDCloneValidateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 app profiles Uid clone validate params +func (o *V1AppProfilesUIDCloneValidateParams) WithHTTPClient(client *http.Client) *V1AppProfilesUIDCloneValidateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 app profiles Uid clone validate params +func (o *V1AppProfilesUIDCloneValidateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 app profiles Uid clone validate params +func (o *V1AppProfilesUIDCloneValidateParams) WithBody(body *models.V1AppProfileCloneMetaInputEntity) *V1AppProfilesUIDCloneValidateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 app profiles Uid clone validate params +func (o *V1AppProfilesUIDCloneValidateParams) SetBody(body *models.V1AppProfileCloneMetaInputEntity) { + o.Body = body +} + +// WithUID adds the uid to the v1 app profiles Uid clone validate params +func (o *V1AppProfilesUIDCloneValidateParams) WithUID(uid string) *V1AppProfilesUIDCloneValidateParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 app profiles Uid clone validate params +func (o *V1AppProfilesUIDCloneValidateParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1AppProfilesUIDCloneValidateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_app_profiles_uid_clone_validate_responses.go b/api/client/v1/v1_app_profiles_uid_clone_validate_responses.go new file mode 100644 index 00000000..81eab898 --- /dev/null +++ b/api/client/v1/v1_app_profiles_uid_clone_validate_responses.go @@ -0,0 +1,61 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1AppProfilesUIDCloneValidateReader is a Reader for the V1AppProfilesUIDCloneValidate structure. +type V1AppProfilesUIDCloneValidateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1AppProfilesUIDCloneValidateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1AppProfilesUIDCloneValidateNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1AppProfilesUIDCloneValidateNoContent creates a V1AppProfilesUIDCloneValidateNoContent with default headers values +func NewV1AppProfilesUIDCloneValidateNoContent() *V1AppProfilesUIDCloneValidateNoContent { + return &V1AppProfilesUIDCloneValidateNoContent{} +} + +/* +V1AppProfilesUIDCloneValidateNoContent handles this case with default header values. + +Ok response without content +*/ +type V1AppProfilesUIDCloneValidateNoContent struct { + /*Audit uid for the request + */ + AuditUID string +} + +func (o *V1AppProfilesUIDCloneValidateNoContent) Error() string { + return fmt.Sprintf("[POST /v1/appProfiles/{uid}/clone/validate][%d] v1AppProfilesUidCloneValidateNoContent ", 204) +} + +func (o *V1AppProfilesUIDCloneValidateNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header AuditUid + o.AuditUID = response.GetHeader("AuditUid") + + return nil +} diff --git a/api/client/v1/v1_app_profiles_uid_delete_parameters.go b/api/client/v1/v1_app_profiles_uid_delete_parameters.go new file mode 100644 index 00000000..4d1f0a33 --- /dev/null +++ b/api/client/v1/v1_app_profiles_uid_delete_parameters.go @@ -0,0 +1,133 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1AppProfilesUIDDeleteParams creates a new V1AppProfilesUIDDeleteParams object +// with the default values initialized. +func NewV1AppProfilesUIDDeleteParams() *V1AppProfilesUIDDeleteParams { + var () + return &V1AppProfilesUIDDeleteParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1AppProfilesUIDDeleteParamsWithTimeout creates a new V1AppProfilesUIDDeleteParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1AppProfilesUIDDeleteParamsWithTimeout(timeout time.Duration) *V1AppProfilesUIDDeleteParams { + var () + return &V1AppProfilesUIDDeleteParams{ + + timeout: timeout, + } +} + +// NewV1AppProfilesUIDDeleteParamsWithContext creates a new V1AppProfilesUIDDeleteParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1AppProfilesUIDDeleteParamsWithContext(ctx context.Context) *V1AppProfilesUIDDeleteParams { + var () + return &V1AppProfilesUIDDeleteParams{ + + Context: ctx, + } +} + +// NewV1AppProfilesUIDDeleteParamsWithHTTPClient creates a new V1AppProfilesUIDDeleteParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1AppProfilesUIDDeleteParamsWithHTTPClient(client *http.Client) *V1AppProfilesUIDDeleteParams { + var () + return &V1AppProfilesUIDDeleteParams{ + HTTPClient: client, + } +} + +/* +V1AppProfilesUIDDeleteParams contains all the parameters to send to the API endpoint +for the v1 app profiles Uid delete operation typically these are written to a http.Request +*/ +type V1AppProfilesUIDDeleteParams struct { + + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 app profiles Uid delete params +func (o *V1AppProfilesUIDDeleteParams) WithTimeout(timeout time.Duration) *V1AppProfilesUIDDeleteParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 app profiles Uid delete params +func (o *V1AppProfilesUIDDeleteParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 app profiles Uid delete params +func (o *V1AppProfilesUIDDeleteParams) WithContext(ctx context.Context) *V1AppProfilesUIDDeleteParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 app profiles Uid delete params +func (o *V1AppProfilesUIDDeleteParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 app profiles Uid delete params +func (o *V1AppProfilesUIDDeleteParams) WithHTTPClient(client *http.Client) *V1AppProfilesUIDDeleteParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 app profiles Uid delete params +func (o *V1AppProfilesUIDDeleteParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithUID adds the uid to the v1 app profiles Uid delete params +func (o *V1AppProfilesUIDDeleteParams) WithUID(uid string) *V1AppProfilesUIDDeleteParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 app profiles Uid delete params +func (o *V1AppProfilesUIDDeleteParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1AppProfilesUIDDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_app_profiles_uid_delete_responses.go b/api/client/v1/v1_app_profiles_uid_delete_responses.go new file mode 100644 index 00000000..481ca471 --- /dev/null +++ b/api/client/v1/v1_app_profiles_uid_delete_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1AppProfilesUIDDeleteReader is a Reader for the V1AppProfilesUIDDelete structure. +type V1AppProfilesUIDDeleteReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1AppProfilesUIDDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1AppProfilesUIDDeleteNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1AppProfilesUIDDeleteNoContent creates a V1AppProfilesUIDDeleteNoContent with default headers values +func NewV1AppProfilesUIDDeleteNoContent() *V1AppProfilesUIDDeleteNoContent { + return &V1AppProfilesUIDDeleteNoContent{} +} + +/* +V1AppProfilesUIDDeleteNoContent handles this case with default header values. + +The resource was deleted successfully +*/ +type V1AppProfilesUIDDeleteNoContent struct { +} + +func (o *V1AppProfilesUIDDeleteNoContent) Error() string { + return fmt.Sprintf("[DELETE /v1/appProfiles/{uid}][%d] v1AppProfilesUidDeleteNoContent ", 204) +} + +func (o *V1AppProfilesUIDDeleteNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_app_profiles_uid_get_parameters.go b/api/client/v1/v1_app_profiles_uid_get_parameters.go new file mode 100644 index 00000000..2c806d7a --- /dev/null +++ b/api/client/v1/v1_app_profiles_uid_get_parameters.go @@ -0,0 +1,133 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1AppProfilesUIDGetParams creates a new V1AppProfilesUIDGetParams object +// with the default values initialized. +func NewV1AppProfilesUIDGetParams() *V1AppProfilesUIDGetParams { + var () + return &V1AppProfilesUIDGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1AppProfilesUIDGetParamsWithTimeout creates a new V1AppProfilesUIDGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1AppProfilesUIDGetParamsWithTimeout(timeout time.Duration) *V1AppProfilesUIDGetParams { + var () + return &V1AppProfilesUIDGetParams{ + + timeout: timeout, + } +} + +// NewV1AppProfilesUIDGetParamsWithContext creates a new V1AppProfilesUIDGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1AppProfilesUIDGetParamsWithContext(ctx context.Context) *V1AppProfilesUIDGetParams { + var () + return &V1AppProfilesUIDGetParams{ + + Context: ctx, + } +} + +// NewV1AppProfilesUIDGetParamsWithHTTPClient creates a new V1AppProfilesUIDGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1AppProfilesUIDGetParamsWithHTTPClient(client *http.Client) *V1AppProfilesUIDGetParams { + var () + return &V1AppProfilesUIDGetParams{ + HTTPClient: client, + } +} + +/* +V1AppProfilesUIDGetParams contains all the parameters to send to the API endpoint +for the v1 app profiles Uid get operation typically these are written to a http.Request +*/ +type V1AppProfilesUIDGetParams struct { + + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 app profiles Uid get params +func (o *V1AppProfilesUIDGetParams) WithTimeout(timeout time.Duration) *V1AppProfilesUIDGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 app profiles Uid get params +func (o *V1AppProfilesUIDGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 app profiles Uid get params +func (o *V1AppProfilesUIDGetParams) WithContext(ctx context.Context) *V1AppProfilesUIDGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 app profiles Uid get params +func (o *V1AppProfilesUIDGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 app profiles Uid get params +func (o *V1AppProfilesUIDGetParams) WithHTTPClient(client *http.Client) *V1AppProfilesUIDGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 app profiles Uid get params +func (o *V1AppProfilesUIDGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithUID adds the uid to the v1 app profiles Uid get params +func (o *V1AppProfilesUIDGetParams) WithUID(uid string) *V1AppProfilesUIDGetParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 app profiles Uid get params +func (o *V1AppProfilesUIDGetParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1AppProfilesUIDGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_app_profiles_uid_get_responses.go b/api/client/v1/v1_app_profiles_uid_get_responses.go new file mode 100644 index 00000000..8f6889cf --- /dev/null +++ b/api/client/v1/v1_app_profiles_uid_get_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1AppProfilesUIDGetReader is a Reader for the V1AppProfilesUIDGet structure. +type V1AppProfilesUIDGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1AppProfilesUIDGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1AppProfilesUIDGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1AppProfilesUIDGetOK creates a V1AppProfilesUIDGetOK with default headers values +func NewV1AppProfilesUIDGetOK() *V1AppProfilesUIDGetOK { + return &V1AppProfilesUIDGetOK{} +} + +/* +V1AppProfilesUIDGetOK handles this case with default header values. + +OK +*/ +type V1AppProfilesUIDGetOK struct { + Payload *models.V1AppProfile +} + +func (o *V1AppProfilesUIDGetOK) Error() string { + return fmt.Sprintf("[GET /v1/appProfiles/{uid}][%d] v1AppProfilesUidGetOK %+v", 200, o.Payload) +} + +func (o *V1AppProfilesUIDGetOK) GetPayload() *models.V1AppProfile { + return o.Payload +} + +func (o *V1AppProfilesUIDGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1AppProfile) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_app_profiles_uid_metadata_update_parameters.go b/api/client/v1/v1_app_profiles_uid_metadata_update_parameters.go new file mode 100644 index 00000000..b9af1f90 --- /dev/null +++ b/api/client/v1/v1_app_profiles_uid_metadata_update_parameters.go @@ -0,0 +1,157 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1AppProfilesUIDMetadataUpdateParams creates a new V1AppProfilesUIDMetadataUpdateParams object +// with the default values initialized. +func NewV1AppProfilesUIDMetadataUpdateParams() *V1AppProfilesUIDMetadataUpdateParams { + var () + return &V1AppProfilesUIDMetadataUpdateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1AppProfilesUIDMetadataUpdateParamsWithTimeout creates a new V1AppProfilesUIDMetadataUpdateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1AppProfilesUIDMetadataUpdateParamsWithTimeout(timeout time.Duration) *V1AppProfilesUIDMetadataUpdateParams { + var () + return &V1AppProfilesUIDMetadataUpdateParams{ + + timeout: timeout, + } +} + +// NewV1AppProfilesUIDMetadataUpdateParamsWithContext creates a new V1AppProfilesUIDMetadataUpdateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1AppProfilesUIDMetadataUpdateParamsWithContext(ctx context.Context) *V1AppProfilesUIDMetadataUpdateParams { + var () + return &V1AppProfilesUIDMetadataUpdateParams{ + + Context: ctx, + } +} + +// NewV1AppProfilesUIDMetadataUpdateParamsWithHTTPClient creates a new V1AppProfilesUIDMetadataUpdateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1AppProfilesUIDMetadataUpdateParamsWithHTTPClient(client *http.Client) *V1AppProfilesUIDMetadataUpdateParams { + var () + return &V1AppProfilesUIDMetadataUpdateParams{ + HTTPClient: client, + } +} + +/* +V1AppProfilesUIDMetadataUpdateParams contains all the parameters to send to the API endpoint +for the v1 app profiles Uid metadata update operation typically these are written to a http.Request +*/ +type V1AppProfilesUIDMetadataUpdateParams struct { + + /*Body*/ + Body *models.V1AppProfileMetaEntity + /*UID + Application profile uid + + */ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 app profiles Uid metadata update params +func (o *V1AppProfilesUIDMetadataUpdateParams) WithTimeout(timeout time.Duration) *V1AppProfilesUIDMetadataUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 app profiles Uid metadata update params +func (o *V1AppProfilesUIDMetadataUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 app profiles Uid metadata update params +func (o *V1AppProfilesUIDMetadataUpdateParams) WithContext(ctx context.Context) *V1AppProfilesUIDMetadataUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 app profiles Uid metadata update params +func (o *V1AppProfilesUIDMetadataUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 app profiles Uid metadata update params +func (o *V1AppProfilesUIDMetadataUpdateParams) WithHTTPClient(client *http.Client) *V1AppProfilesUIDMetadataUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 app profiles Uid metadata update params +func (o *V1AppProfilesUIDMetadataUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 app profiles Uid metadata update params +func (o *V1AppProfilesUIDMetadataUpdateParams) WithBody(body *models.V1AppProfileMetaEntity) *V1AppProfilesUIDMetadataUpdateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 app profiles Uid metadata update params +func (o *V1AppProfilesUIDMetadataUpdateParams) SetBody(body *models.V1AppProfileMetaEntity) { + o.Body = body +} + +// WithUID adds the uid to the v1 app profiles Uid metadata update params +func (o *V1AppProfilesUIDMetadataUpdateParams) WithUID(uid string) *V1AppProfilesUIDMetadataUpdateParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 app profiles Uid metadata update params +func (o *V1AppProfilesUIDMetadataUpdateParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1AppProfilesUIDMetadataUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_app_profiles_uid_metadata_update_responses.go b/api/client/v1/v1_app_profiles_uid_metadata_update_responses.go new file mode 100644 index 00000000..9fe85202 --- /dev/null +++ b/api/client/v1/v1_app_profiles_uid_metadata_update_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1AppProfilesUIDMetadataUpdateReader is a Reader for the V1AppProfilesUIDMetadataUpdate structure. +type V1AppProfilesUIDMetadataUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1AppProfilesUIDMetadataUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1AppProfilesUIDMetadataUpdateNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1AppProfilesUIDMetadataUpdateNoContent creates a V1AppProfilesUIDMetadataUpdateNoContent with default headers values +func NewV1AppProfilesUIDMetadataUpdateNoContent() *V1AppProfilesUIDMetadataUpdateNoContent { + return &V1AppProfilesUIDMetadataUpdateNoContent{} +} + +/* +V1AppProfilesUIDMetadataUpdateNoContent handles this case with default header values. + +The resource was updated successfully +*/ +type V1AppProfilesUIDMetadataUpdateNoContent struct { +} + +func (o *V1AppProfilesUIDMetadataUpdateNoContent) Error() string { + return fmt.Sprintf("[PATCH /v1/appProfiles/{uid}/metadata][%d] v1AppProfilesUidMetadataUpdateNoContent ", 204) +} + +func (o *V1AppProfilesUIDMetadataUpdateNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_app_profiles_uid_tiers_create_parameters.go b/api/client/v1/v1_app_profiles_uid_tiers_create_parameters.go new file mode 100644 index 00000000..272434a2 --- /dev/null +++ b/api/client/v1/v1_app_profiles_uid_tiers_create_parameters.go @@ -0,0 +1,157 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1AppProfilesUIDTiersCreateParams creates a new V1AppProfilesUIDTiersCreateParams object +// with the default values initialized. +func NewV1AppProfilesUIDTiersCreateParams() *V1AppProfilesUIDTiersCreateParams { + var () + return &V1AppProfilesUIDTiersCreateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1AppProfilesUIDTiersCreateParamsWithTimeout creates a new V1AppProfilesUIDTiersCreateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1AppProfilesUIDTiersCreateParamsWithTimeout(timeout time.Duration) *V1AppProfilesUIDTiersCreateParams { + var () + return &V1AppProfilesUIDTiersCreateParams{ + + timeout: timeout, + } +} + +// NewV1AppProfilesUIDTiersCreateParamsWithContext creates a new V1AppProfilesUIDTiersCreateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1AppProfilesUIDTiersCreateParamsWithContext(ctx context.Context) *V1AppProfilesUIDTiersCreateParams { + var () + return &V1AppProfilesUIDTiersCreateParams{ + + Context: ctx, + } +} + +// NewV1AppProfilesUIDTiersCreateParamsWithHTTPClient creates a new V1AppProfilesUIDTiersCreateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1AppProfilesUIDTiersCreateParamsWithHTTPClient(client *http.Client) *V1AppProfilesUIDTiersCreateParams { + var () + return &V1AppProfilesUIDTiersCreateParams{ + HTTPClient: client, + } +} + +/* +V1AppProfilesUIDTiersCreateParams contains all the parameters to send to the API endpoint +for the v1 app profiles Uid tiers create operation typically these are written to a http.Request +*/ +type V1AppProfilesUIDTiersCreateParams struct { + + /*Body*/ + Body *models.V1AppTierEntity + /*UID + Application profile uid + + */ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 app profiles Uid tiers create params +func (o *V1AppProfilesUIDTiersCreateParams) WithTimeout(timeout time.Duration) *V1AppProfilesUIDTiersCreateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 app profiles Uid tiers create params +func (o *V1AppProfilesUIDTiersCreateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 app profiles Uid tiers create params +func (o *V1AppProfilesUIDTiersCreateParams) WithContext(ctx context.Context) *V1AppProfilesUIDTiersCreateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 app profiles Uid tiers create params +func (o *V1AppProfilesUIDTiersCreateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 app profiles Uid tiers create params +func (o *V1AppProfilesUIDTiersCreateParams) WithHTTPClient(client *http.Client) *V1AppProfilesUIDTiersCreateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 app profiles Uid tiers create params +func (o *V1AppProfilesUIDTiersCreateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 app profiles Uid tiers create params +func (o *V1AppProfilesUIDTiersCreateParams) WithBody(body *models.V1AppTierEntity) *V1AppProfilesUIDTiersCreateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 app profiles Uid tiers create params +func (o *V1AppProfilesUIDTiersCreateParams) SetBody(body *models.V1AppTierEntity) { + o.Body = body +} + +// WithUID adds the uid to the v1 app profiles Uid tiers create params +func (o *V1AppProfilesUIDTiersCreateParams) WithUID(uid string) *V1AppProfilesUIDTiersCreateParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 app profiles Uid tiers create params +func (o *V1AppProfilesUIDTiersCreateParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1AppProfilesUIDTiersCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_app_profiles_uid_tiers_create_responses.go b/api/client/v1/v1_app_profiles_uid_tiers_create_responses.go new file mode 100644 index 00000000..5659db21 --- /dev/null +++ b/api/client/v1/v1_app_profiles_uid_tiers_create_responses.go @@ -0,0 +1,77 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1AppProfilesUIDTiersCreateReader is a Reader for the V1AppProfilesUIDTiersCreate structure. +type V1AppProfilesUIDTiersCreateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1AppProfilesUIDTiersCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 201: + result := NewV1AppProfilesUIDTiersCreateCreated() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1AppProfilesUIDTiersCreateCreated creates a V1AppProfilesUIDTiersCreateCreated with default headers values +func NewV1AppProfilesUIDTiersCreateCreated() *V1AppProfilesUIDTiersCreateCreated { + return &V1AppProfilesUIDTiersCreateCreated{} +} + +/* +V1AppProfilesUIDTiersCreateCreated handles this case with default header values. + +Created successfully +*/ +type V1AppProfilesUIDTiersCreateCreated struct { + /*Audit uid for the request + */ + AuditUID string + + Payload *models.V1UID +} + +func (o *V1AppProfilesUIDTiersCreateCreated) Error() string { + return fmt.Sprintf("[POST /v1/appProfiles/{uid}/tiers][%d] v1AppProfilesUidTiersCreateCreated %+v", 201, o.Payload) +} + +func (o *V1AppProfilesUIDTiersCreateCreated) GetPayload() *models.V1UID { + return o.Payload +} + +func (o *V1AppProfilesUIDTiersCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header AuditUid + o.AuditUID = response.GetHeader("AuditUid") + + o.Payload = new(models.V1UID) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_app_profiles_uid_tiers_get_parameters.go b/api/client/v1/v1_app_profiles_uid_tiers_get_parameters.go new file mode 100644 index 00000000..ed4644d7 --- /dev/null +++ b/api/client/v1/v1_app_profiles_uid_tiers_get_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1AppProfilesUIDTiersGetParams creates a new V1AppProfilesUIDTiersGetParams object +// with the default values initialized. +func NewV1AppProfilesUIDTiersGetParams() *V1AppProfilesUIDTiersGetParams { + var () + return &V1AppProfilesUIDTiersGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1AppProfilesUIDTiersGetParamsWithTimeout creates a new V1AppProfilesUIDTiersGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1AppProfilesUIDTiersGetParamsWithTimeout(timeout time.Duration) *V1AppProfilesUIDTiersGetParams { + var () + return &V1AppProfilesUIDTiersGetParams{ + + timeout: timeout, + } +} + +// NewV1AppProfilesUIDTiersGetParamsWithContext creates a new V1AppProfilesUIDTiersGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1AppProfilesUIDTiersGetParamsWithContext(ctx context.Context) *V1AppProfilesUIDTiersGetParams { + var () + return &V1AppProfilesUIDTiersGetParams{ + + Context: ctx, + } +} + +// NewV1AppProfilesUIDTiersGetParamsWithHTTPClient creates a new V1AppProfilesUIDTiersGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1AppProfilesUIDTiersGetParamsWithHTTPClient(client *http.Client) *V1AppProfilesUIDTiersGetParams { + var () + return &V1AppProfilesUIDTiersGetParams{ + HTTPClient: client, + } +} + +/* +V1AppProfilesUIDTiersGetParams contains all the parameters to send to the API endpoint +for the v1 app profiles Uid tiers get operation typically these are written to a http.Request +*/ +type V1AppProfilesUIDTiersGetParams struct { + + /*UID + Application profile uid + + */ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 app profiles Uid tiers get params +func (o *V1AppProfilesUIDTiersGetParams) WithTimeout(timeout time.Duration) *V1AppProfilesUIDTiersGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 app profiles Uid tiers get params +func (o *V1AppProfilesUIDTiersGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 app profiles Uid tiers get params +func (o *V1AppProfilesUIDTiersGetParams) WithContext(ctx context.Context) *V1AppProfilesUIDTiersGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 app profiles Uid tiers get params +func (o *V1AppProfilesUIDTiersGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 app profiles Uid tiers get params +func (o *V1AppProfilesUIDTiersGetParams) WithHTTPClient(client *http.Client) *V1AppProfilesUIDTiersGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 app profiles Uid tiers get params +func (o *V1AppProfilesUIDTiersGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithUID adds the uid to the v1 app profiles Uid tiers get params +func (o *V1AppProfilesUIDTiersGetParams) WithUID(uid string) *V1AppProfilesUIDTiersGetParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 app profiles Uid tiers get params +func (o *V1AppProfilesUIDTiersGetParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1AppProfilesUIDTiersGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_app_profiles_uid_tiers_get_responses.go b/api/client/v1/v1_app_profiles_uid_tiers_get_responses.go new file mode 100644 index 00000000..7ca92422 --- /dev/null +++ b/api/client/v1/v1_app_profiles_uid_tiers_get_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1AppProfilesUIDTiersGetReader is a Reader for the V1AppProfilesUIDTiersGet structure. +type V1AppProfilesUIDTiersGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1AppProfilesUIDTiersGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1AppProfilesUIDTiersGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1AppProfilesUIDTiersGetOK creates a V1AppProfilesUIDTiersGetOK with default headers values +func NewV1AppProfilesUIDTiersGetOK() *V1AppProfilesUIDTiersGetOK { + return &V1AppProfilesUIDTiersGetOK{} +} + +/* +V1AppProfilesUIDTiersGetOK handles this case with default header values. + +OK +*/ +type V1AppProfilesUIDTiersGetOK struct { + Payload *models.V1AppProfileTiers +} + +func (o *V1AppProfilesUIDTiersGetOK) Error() string { + return fmt.Sprintf("[GET /v1/appProfiles/{uid}/tiers][%d] v1AppProfilesUidTiersGetOK %+v", 200, o.Payload) +} + +func (o *V1AppProfilesUIDTiersGetOK) GetPayload() *models.V1AppProfileTiers { + return o.Payload +} + +func (o *V1AppProfilesUIDTiersGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1AppProfileTiers) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_app_profiles_uid_tiers_patch_parameters.go b/api/client/v1/v1_app_profiles_uid_tiers_patch_parameters.go new file mode 100644 index 00000000..497f3579 --- /dev/null +++ b/api/client/v1/v1_app_profiles_uid_tiers_patch_parameters.go @@ -0,0 +1,157 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1AppProfilesUIDTiersPatchParams creates a new V1AppProfilesUIDTiersPatchParams object +// with the default values initialized. +func NewV1AppProfilesUIDTiersPatchParams() *V1AppProfilesUIDTiersPatchParams { + var () + return &V1AppProfilesUIDTiersPatchParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1AppProfilesUIDTiersPatchParamsWithTimeout creates a new V1AppProfilesUIDTiersPatchParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1AppProfilesUIDTiersPatchParamsWithTimeout(timeout time.Duration) *V1AppProfilesUIDTiersPatchParams { + var () + return &V1AppProfilesUIDTiersPatchParams{ + + timeout: timeout, + } +} + +// NewV1AppProfilesUIDTiersPatchParamsWithContext creates a new V1AppProfilesUIDTiersPatchParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1AppProfilesUIDTiersPatchParamsWithContext(ctx context.Context) *V1AppProfilesUIDTiersPatchParams { + var () + return &V1AppProfilesUIDTiersPatchParams{ + + Context: ctx, + } +} + +// NewV1AppProfilesUIDTiersPatchParamsWithHTTPClient creates a new V1AppProfilesUIDTiersPatchParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1AppProfilesUIDTiersPatchParamsWithHTTPClient(client *http.Client) *V1AppProfilesUIDTiersPatchParams { + var () + return &V1AppProfilesUIDTiersPatchParams{ + HTTPClient: client, + } +} + +/* +V1AppProfilesUIDTiersPatchParams contains all the parameters to send to the API endpoint +for the v1 app profiles Uid tiers patch operation typically these are written to a http.Request +*/ +type V1AppProfilesUIDTiersPatchParams struct { + + /*Body*/ + Body *models.V1AppTierPatchEntity + /*UID + Application profile uid + + */ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 app profiles Uid tiers patch params +func (o *V1AppProfilesUIDTiersPatchParams) WithTimeout(timeout time.Duration) *V1AppProfilesUIDTiersPatchParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 app profiles Uid tiers patch params +func (o *V1AppProfilesUIDTiersPatchParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 app profiles Uid tiers patch params +func (o *V1AppProfilesUIDTiersPatchParams) WithContext(ctx context.Context) *V1AppProfilesUIDTiersPatchParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 app profiles Uid tiers patch params +func (o *V1AppProfilesUIDTiersPatchParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 app profiles Uid tiers patch params +func (o *V1AppProfilesUIDTiersPatchParams) WithHTTPClient(client *http.Client) *V1AppProfilesUIDTiersPatchParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 app profiles Uid tiers patch params +func (o *V1AppProfilesUIDTiersPatchParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 app profiles Uid tiers patch params +func (o *V1AppProfilesUIDTiersPatchParams) WithBody(body *models.V1AppTierPatchEntity) *V1AppProfilesUIDTiersPatchParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 app profiles Uid tiers patch params +func (o *V1AppProfilesUIDTiersPatchParams) SetBody(body *models.V1AppTierPatchEntity) { + o.Body = body +} + +// WithUID adds the uid to the v1 app profiles Uid tiers patch params +func (o *V1AppProfilesUIDTiersPatchParams) WithUID(uid string) *V1AppProfilesUIDTiersPatchParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 app profiles Uid tiers patch params +func (o *V1AppProfilesUIDTiersPatchParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1AppProfilesUIDTiersPatchParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_app_profiles_uid_tiers_patch_responses.go b/api/client/v1/v1_app_profiles_uid_tiers_patch_responses.go new file mode 100644 index 00000000..180d15ca --- /dev/null +++ b/api/client/v1/v1_app_profiles_uid_tiers_patch_responses.go @@ -0,0 +1,77 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1AppProfilesUIDTiersPatchReader is a Reader for the V1AppProfilesUIDTiersPatch structure. +type V1AppProfilesUIDTiersPatchReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1AppProfilesUIDTiersPatchReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 201: + result := NewV1AppProfilesUIDTiersPatchCreated() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1AppProfilesUIDTiersPatchCreated creates a V1AppProfilesUIDTiersPatchCreated with default headers values +func NewV1AppProfilesUIDTiersPatchCreated() *V1AppProfilesUIDTiersPatchCreated { + return &V1AppProfilesUIDTiersPatchCreated{} +} + +/* +V1AppProfilesUIDTiersPatchCreated handles this case with default header values. + +Created successfully +*/ +type V1AppProfilesUIDTiersPatchCreated struct { + /*Audit uid for the request + */ + AuditUID string + + Payload *models.V1UID +} + +func (o *V1AppProfilesUIDTiersPatchCreated) Error() string { + return fmt.Sprintf("[PATCH /v1/appProfiles/{uid}/tiers][%d] v1AppProfilesUidTiersPatchCreated %+v", 201, o.Payload) +} + +func (o *V1AppProfilesUIDTiersPatchCreated) GetPayload() *models.V1UID { + return o.Payload +} + +func (o *V1AppProfilesUIDTiersPatchCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header AuditUid + o.AuditUID = response.GetHeader("AuditUid") + + o.Payload = new(models.V1UID) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_app_profiles_uid_tiers_uid_delete_parameters.go b/api/client/v1/v1_app_profiles_uid_tiers_uid_delete_parameters.go new file mode 100644 index 00000000..d36d7a21 --- /dev/null +++ b/api/client/v1/v1_app_profiles_uid_tiers_uid_delete_parameters.go @@ -0,0 +1,157 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1AppProfilesUIDTiersUIDDeleteParams creates a new V1AppProfilesUIDTiersUIDDeleteParams object +// with the default values initialized. +func NewV1AppProfilesUIDTiersUIDDeleteParams() *V1AppProfilesUIDTiersUIDDeleteParams { + var () + return &V1AppProfilesUIDTiersUIDDeleteParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1AppProfilesUIDTiersUIDDeleteParamsWithTimeout creates a new V1AppProfilesUIDTiersUIDDeleteParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1AppProfilesUIDTiersUIDDeleteParamsWithTimeout(timeout time.Duration) *V1AppProfilesUIDTiersUIDDeleteParams { + var () + return &V1AppProfilesUIDTiersUIDDeleteParams{ + + timeout: timeout, + } +} + +// NewV1AppProfilesUIDTiersUIDDeleteParamsWithContext creates a new V1AppProfilesUIDTiersUIDDeleteParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1AppProfilesUIDTiersUIDDeleteParamsWithContext(ctx context.Context) *V1AppProfilesUIDTiersUIDDeleteParams { + var () + return &V1AppProfilesUIDTiersUIDDeleteParams{ + + Context: ctx, + } +} + +// NewV1AppProfilesUIDTiersUIDDeleteParamsWithHTTPClient creates a new V1AppProfilesUIDTiersUIDDeleteParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1AppProfilesUIDTiersUIDDeleteParamsWithHTTPClient(client *http.Client) *V1AppProfilesUIDTiersUIDDeleteParams { + var () + return &V1AppProfilesUIDTiersUIDDeleteParams{ + HTTPClient: client, + } +} + +/* +V1AppProfilesUIDTiersUIDDeleteParams contains all the parameters to send to the API endpoint +for the v1 app profiles Uid tiers Uid delete operation typically these are written to a http.Request +*/ +type V1AppProfilesUIDTiersUIDDeleteParams struct { + + /*TierUID + Application profile tier uid + + */ + TierUID string + /*UID + Application profile uid + + */ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 app profiles Uid tiers Uid delete params +func (o *V1AppProfilesUIDTiersUIDDeleteParams) WithTimeout(timeout time.Duration) *V1AppProfilesUIDTiersUIDDeleteParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 app profiles Uid tiers Uid delete params +func (o *V1AppProfilesUIDTiersUIDDeleteParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 app profiles Uid tiers Uid delete params +func (o *V1AppProfilesUIDTiersUIDDeleteParams) WithContext(ctx context.Context) *V1AppProfilesUIDTiersUIDDeleteParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 app profiles Uid tiers Uid delete params +func (o *V1AppProfilesUIDTiersUIDDeleteParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 app profiles Uid tiers Uid delete params +func (o *V1AppProfilesUIDTiersUIDDeleteParams) WithHTTPClient(client *http.Client) *V1AppProfilesUIDTiersUIDDeleteParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 app profiles Uid tiers Uid delete params +func (o *V1AppProfilesUIDTiersUIDDeleteParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithTierUID adds the tierUID to the v1 app profiles Uid tiers Uid delete params +func (o *V1AppProfilesUIDTiersUIDDeleteParams) WithTierUID(tierUID string) *V1AppProfilesUIDTiersUIDDeleteParams { + o.SetTierUID(tierUID) + return o +} + +// SetTierUID adds the tierUid to the v1 app profiles Uid tiers Uid delete params +func (o *V1AppProfilesUIDTiersUIDDeleteParams) SetTierUID(tierUID string) { + o.TierUID = tierUID +} + +// WithUID adds the uid to the v1 app profiles Uid tiers Uid delete params +func (o *V1AppProfilesUIDTiersUIDDeleteParams) WithUID(uid string) *V1AppProfilesUIDTiersUIDDeleteParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 app profiles Uid tiers Uid delete params +func (o *V1AppProfilesUIDTiersUIDDeleteParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1AppProfilesUIDTiersUIDDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param tierUid + if err := r.SetPathParam("tierUid", o.TierUID); err != nil { + return err + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_app_profiles_uid_tiers_uid_delete_responses.go b/api/client/v1/v1_app_profiles_uid_tiers_uid_delete_responses.go new file mode 100644 index 00000000..73f66d3b --- /dev/null +++ b/api/client/v1/v1_app_profiles_uid_tiers_uid_delete_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1AppProfilesUIDTiersUIDDeleteReader is a Reader for the V1AppProfilesUIDTiersUIDDelete structure. +type V1AppProfilesUIDTiersUIDDeleteReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1AppProfilesUIDTiersUIDDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1AppProfilesUIDTiersUIDDeleteNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1AppProfilesUIDTiersUIDDeleteNoContent creates a V1AppProfilesUIDTiersUIDDeleteNoContent with default headers values +func NewV1AppProfilesUIDTiersUIDDeleteNoContent() *V1AppProfilesUIDTiersUIDDeleteNoContent { + return &V1AppProfilesUIDTiersUIDDeleteNoContent{} +} + +/* +V1AppProfilesUIDTiersUIDDeleteNoContent handles this case with default header values. + +The resource was deleted successfully +*/ +type V1AppProfilesUIDTiersUIDDeleteNoContent struct { +} + +func (o *V1AppProfilesUIDTiersUIDDeleteNoContent) Error() string { + return fmt.Sprintf("[DELETE /v1/appProfiles/{uid}/tiers/{tierUid}][%d] v1AppProfilesUidTiersUidDeleteNoContent ", 204) +} + +func (o *V1AppProfilesUIDTiersUIDDeleteNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_app_profiles_uid_tiers_uid_get_parameters.go b/api/client/v1/v1_app_profiles_uid_tiers_uid_get_parameters.go new file mode 100644 index 00000000..fe7ac590 --- /dev/null +++ b/api/client/v1/v1_app_profiles_uid_tiers_uid_get_parameters.go @@ -0,0 +1,157 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1AppProfilesUIDTiersUIDGetParams creates a new V1AppProfilesUIDTiersUIDGetParams object +// with the default values initialized. +func NewV1AppProfilesUIDTiersUIDGetParams() *V1AppProfilesUIDTiersUIDGetParams { + var () + return &V1AppProfilesUIDTiersUIDGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1AppProfilesUIDTiersUIDGetParamsWithTimeout creates a new V1AppProfilesUIDTiersUIDGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1AppProfilesUIDTiersUIDGetParamsWithTimeout(timeout time.Duration) *V1AppProfilesUIDTiersUIDGetParams { + var () + return &V1AppProfilesUIDTiersUIDGetParams{ + + timeout: timeout, + } +} + +// NewV1AppProfilesUIDTiersUIDGetParamsWithContext creates a new V1AppProfilesUIDTiersUIDGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1AppProfilesUIDTiersUIDGetParamsWithContext(ctx context.Context) *V1AppProfilesUIDTiersUIDGetParams { + var () + return &V1AppProfilesUIDTiersUIDGetParams{ + + Context: ctx, + } +} + +// NewV1AppProfilesUIDTiersUIDGetParamsWithHTTPClient creates a new V1AppProfilesUIDTiersUIDGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1AppProfilesUIDTiersUIDGetParamsWithHTTPClient(client *http.Client) *V1AppProfilesUIDTiersUIDGetParams { + var () + return &V1AppProfilesUIDTiersUIDGetParams{ + HTTPClient: client, + } +} + +/* +V1AppProfilesUIDTiersUIDGetParams contains all the parameters to send to the API endpoint +for the v1 app profiles Uid tiers Uid get operation typically these are written to a http.Request +*/ +type V1AppProfilesUIDTiersUIDGetParams struct { + + /*TierUID + Application profile tier uid + + */ + TierUID string + /*UID + Application profile uid + + */ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 app profiles Uid tiers Uid get params +func (o *V1AppProfilesUIDTiersUIDGetParams) WithTimeout(timeout time.Duration) *V1AppProfilesUIDTiersUIDGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 app profiles Uid tiers Uid get params +func (o *V1AppProfilesUIDTiersUIDGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 app profiles Uid tiers Uid get params +func (o *V1AppProfilesUIDTiersUIDGetParams) WithContext(ctx context.Context) *V1AppProfilesUIDTiersUIDGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 app profiles Uid tiers Uid get params +func (o *V1AppProfilesUIDTiersUIDGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 app profiles Uid tiers Uid get params +func (o *V1AppProfilesUIDTiersUIDGetParams) WithHTTPClient(client *http.Client) *V1AppProfilesUIDTiersUIDGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 app profiles Uid tiers Uid get params +func (o *V1AppProfilesUIDTiersUIDGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithTierUID adds the tierUID to the v1 app profiles Uid tiers Uid get params +func (o *V1AppProfilesUIDTiersUIDGetParams) WithTierUID(tierUID string) *V1AppProfilesUIDTiersUIDGetParams { + o.SetTierUID(tierUID) + return o +} + +// SetTierUID adds the tierUid to the v1 app profiles Uid tiers Uid get params +func (o *V1AppProfilesUIDTiersUIDGetParams) SetTierUID(tierUID string) { + o.TierUID = tierUID +} + +// WithUID adds the uid to the v1 app profiles Uid tiers Uid get params +func (o *V1AppProfilesUIDTiersUIDGetParams) WithUID(uid string) *V1AppProfilesUIDTiersUIDGetParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 app profiles Uid tiers Uid get params +func (o *V1AppProfilesUIDTiersUIDGetParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1AppProfilesUIDTiersUIDGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param tierUid + if err := r.SetPathParam("tierUid", o.TierUID); err != nil { + return err + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_app_profiles_uid_tiers_uid_get_responses.go b/api/client/v1/v1_app_profiles_uid_tiers_uid_get_responses.go new file mode 100644 index 00000000..065ee67d --- /dev/null +++ b/api/client/v1/v1_app_profiles_uid_tiers_uid_get_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1AppProfilesUIDTiersUIDGetReader is a Reader for the V1AppProfilesUIDTiersUIDGet structure. +type V1AppProfilesUIDTiersUIDGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1AppProfilesUIDTiersUIDGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1AppProfilesUIDTiersUIDGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1AppProfilesUIDTiersUIDGetOK creates a V1AppProfilesUIDTiersUIDGetOK with default headers values +func NewV1AppProfilesUIDTiersUIDGetOK() *V1AppProfilesUIDTiersUIDGetOK { + return &V1AppProfilesUIDTiersUIDGetOK{} +} + +/* +V1AppProfilesUIDTiersUIDGetOK handles this case with default header values. + +OK +*/ +type V1AppProfilesUIDTiersUIDGetOK struct { + Payload *models.V1AppTier +} + +func (o *V1AppProfilesUIDTiersUIDGetOK) Error() string { + return fmt.Sprintf("[GET /v1/appProfiles/{uid}/tiers/{tierUid}][%d] v1AppProfilesUidTiersUidGetOK %+v", 200, o.Payload) +} + +func (o *V1AppProfilesUIDTiersUIDGetOK) GetPayload() *models.V1AppTier { + return o.Payload +} + +func (o *V1AppProfilesUIDTiersUIDGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1AppTier) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_app_profiles_uid_tiers_uid_manifests_create_parameters.go b/api/client/v1/v1_app_profiles_uid_tiers_uid_manifests_create_parameters.go new file mode 100644 index 00000000..6113933b --- /dev/null +++ b/api/client/v1/v1_app_profiles_uid_tiers_uid_manifests_create_parameters.go @@ -0,0 +1,178 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1AppProfilesUIDTiersUIDManifestsCreateParams creates a new V1AppProfilesUIDTiersUIDManifestsCreateParams object +// with the default values initialized. +func NewV1AppProfilesUIDTiersUIDManifestsCreateParams() *V1AppProfilesUIDTiersUIDManifestsCreateParams { + var () + return &V1AppProfilesUIDTiersUIDManifestsCreateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1AppProfilesUIDTiersUIDManifestsCreateParamsWithTimeout creates a new V1AppProfilesUIDTiersUIDManifestsCreateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1AppProfilesUIDTiersUIDManifestsCreateParamsWithTimeout(timeout time.Duration) *V1AppProfilesUIDTiersUIDManifestsCreateParams { + var () + return &V1AppProfilesUIDTiersUIDManifestsCreateParams{ + + timeout: timeout, + } +} + +// NewV1AppProfilesUIDTiersUIDManifestsCreateParamsWithContext creates a new V1AppProfilesUIDTiersUIDManifestsCreateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1AppProfilesUIDTiersUIDManifestsCreateParamsWithContext(ctx context.Context) *V1AppProfilesUIDTiersUIDManifestsCreateParams { + var () + return &V1AppProfilesUIDTiersUIDManifestsCreateParams{ + + Context: ctx, + } +} + +// NewV1AppProfilesUIDTiersUIDManifestsCreateParamsWithHTTPClient creates a new V1AppProfilesUIDTiersUIDManifestsCreateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1AppProfilesUIDTiersUIDManifestsCreateParamsWithHTTPClient(client *http.Client) *V1AppProfilesUIDTiersUIDManifestsCreateParams { + var () + return &V1AppProfilesUIDTiersUIDManifestsCreateParams{ + HTTPClient: client, + } +} + +/* +V1AppProfilesUIDTiersUIDManifestsCreateParams contains all the parameters to send to the API endpoint +for the v1 app profiles Uid tiers Uid manifests create operation typically these are written to a http.Request +*/ +type V1AppProfilesUIDTiersUIDManifestsCreateParams struct { + + /*Body*/ + Body *models.V1ManifestInputEntity + /*TierUID + Application profile tier uid + + */ + TierUID string + /*UID + Application profile uid + + */ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 app profiles Uid tiers Uid manifests create params +func (o *V1AppProfilesUIDTiersUIDManifestsCreateParams) WithTimeout(timeout time.Duration) *V1AppProfilesUIDTiersUIDManifestsCreateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 app profiles Uid tiers Uid manifests create params +func (o *V1AppProfilesUIDTiersUIDManifestsCreateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 app profiles Uid tiers Uid manifests create params +func (o *V1AppProfilesUIDTiersUIDManifestsCreateParams) WithContext(ctx context.Context) *V1AppProfilesUIDTiersUIDManifestsCreateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 app profiles Uid tiers Uid manifests create params +func (o *V1AppProfilesUIDTiersUIDManifestsCreateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 app profiles Uid tiers Uid manifests create params +func (o *V1AppProfilesUIDTiersUIDManifestsCreateParams) WithHTTPClient(client *http.Client) *V1AppProfilesUIDTiersUIDManifestsCreateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 app profiles Uid tiers Uid manifests create params +func (o *V1AppProfilesUIDTiersUIDManifestsCreateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 app profiles Uid tiers Uid manifests create params +func (o *V1AppProfilesUIDTiersUIDManifestsCreateParams) WithBody(body *models.V1ManifestInputEntity) *V1AppProfilesUIDTiersUIDManifestsCreateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 app profiles Uid tiers Uid manifests create params +func (o *V1AppProfilesUIDTiersUIDManifestsCreateParams) SetBody(body *models.V1ManifestInputEntity) { + o.Body = body +} + +// WithTierUID adds the tierUID to the v1 app profiles Uid tiers Uid manifests create params +func (o *V1AppProfilesUIDTiersUIDManifestsCreateParams) WithTierUID(tierUID string) *V1AppProfilesUIDTiersUIDManifestsCreateParams { + o.SetTierUID(tierUID) + return o +} + +// SetTierUID adds the tierUid to the v1 app profiles Uid tiers Uid manifests create params +func (o *V1AppProfilesUIDTiersUIDManifestsCreateParams) SetTierUID(tierUID string) { + o.TierUID = tierUID +} + +// WithUID adds the uid to the v1 app profiles Uid tiers Uid manifests create params +func (o *V1AppProfilesUIDTiersUIDManifestsCreateParams) WithUID(uid string) *V1AppProfilesUIDTiersUIDManifestsCreateParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 app profiles Uid tiers Uid manifests create params +func (o *V1AppProfilesUIDTiersUIDManifestsCreateParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1AppProfilesUIDTiersUIDManifestsCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param tierUid + if err := r.SetPathParam("tierUid", o.TierUID); err != nil { + return err + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_app_profiles_uid_tiers_uid_manifests_create_responses.go b/api/client/v1/v1_app_profiles_uid_tiers_uid_manifests_create_responses.go new file mode 100644 index 00000000..1e10733a --- /dev/null +++ b/api/client/v1/v1_app_profiles_uid_tiers_uid_manifests_create_responses.go @@ -0,0 +1,77 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1AppProfilesUIDTiersUIDManifestsCreateReader is a Reader for the V1AppProfilesUIDTiersUIDManifestsCreate structure. +type V1AppProfilesUIDTiersUIDManifestsCreateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1AppProfilesUIDTiersUIDManifestsCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 201: + result := NewV1AppProfilesUIDTiersUIDManifestsCreateCreated() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1AppProfilesUIDTiersUIDManifestsCreateCreated creates a V1AppProfilesUIDTiersUIDManifestsCreateCreated with default headers values +func NewV1AppProfilesUIDTiersUIDManifestsCreateCreated() *V1AppProfilesUIDTiersUIDManifestsCreateCreated { + return &V1AppProfilesUIDTiersUIDManifestsCreateCreated{} +} + +/* +V1AppProfilesUIDTiersUIDManifestsCreateCreated handles this case with default header values. + +Created successfully +*/ +type V1AppProfilesUIDTiersUIDManifestsCreateCreated struct { + /*Audit uid for the request + */ + AuditUID string + + Payload *models.V1UID +} + +func (o *V1AppProfilesUIDTiersUIDManifestsCreateCreated) Error() string { + return fmt.Sprintf("[POST /v1/appProfiles/{uid}/tiers/{tierUid}/manifests][%d] v1AppProfilesUidTiersUidManifestsCreateCreated %+v", 201, o.Payload) +} + +func (o *V1AppProfilesUIDTiersUIDManifestsCreateCreated) GetPayload() *models.V1UID { + return o.Payload +} + +func (o *V1AppProfilesUIDTiersUIDManifestsCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header AuditUid + o.AuditUID = response.GetHeader("AuditUid") + + o.Payload = new(models.V1UID) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_app_profiles_uid_tiers_uid_manifests_get_parameters.go b/api/client/v1/v1_app_profiles_uid_tiers_uid_manifests_get_parameters.go new file mode 100644 index 00000000..d13ad49f --- /dev/null +++ b/api/client/v1/v1_app_profiles_uid_tiers_uid_manifests_get_parameters.go @@ -0,0 +1,157 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1AppProfilesUIDTiersUIDManifestsGetParams creates a new V1AppProfilesUIDTiersUIDManifestsGetParams object +// with the default values initialized. +func NewV1AppProfilesUIDTiersUIDManifestsGetParams() *V1AppProfilesUIDTiersUIDManifestsGetParams { + var () + return &V1AppProfilesUIDTiersUIDManifestsGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1AppProfilesUIDTiersUIDManifestsGetParamsWithTimeout creates a new V1AppProfilesUIDTiersUIDManifestsGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1AppProfilesUIDTiersUIDManifestsGetParamsWithTimeout(timeout time.Duration) *V1AppProfilesUIDTiersUIDManifestsGetParams { + var () + return &V1AppProfilesUIDTiersUIDManifestsGetParams{ + + timeout: timeout, + } +} + +// NewV1AppProfilesUIDTiersUIDManifestsGetParamsWithContext creates a new V1AppProfilesUIDTiersUIDManifestsGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1AppProfilesUIDTiersUIDManifestsGetParamsWithContext(ctx context.Context) *V1AppProfilesUIDTiersUIDManifestsGetParams { + var () + return &V1AppProfilesUIDTiersUIDManifestsGetParams{ + + Context: ctx, + } +} + +// NewV1AppProfilesUIDTiersUIDManifestsGetParamsWithHTTPClient creates a new V1AppProfilesUIDTiersUIDManifestsGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1AppProfilesUIDTiersUIDManifestsGetParamsWithHTTPClient(client *http.Client) *V1AppProfilesUIDTiersUIDManifestsGetParams { + var () + return &V1AppProfilesUIDTiersUIDManifestsGetParams{ + HTTPClient: client, + } +} + +/* +V1AppProfilesUIDTiersUIDManifestsGetParams contains all the parameters to send to the API endpoint +for the v1 app profiles Uid tiers Uid manifests get operation typically these are written to a http.Request +*/ +type V1AppProfilesUIDTiersUIDManifestsGetParams struct { + + /*TierUID + Application profile tier uid + + */ + TierUID string + /*UID + Application profile uid + + */ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 app profiles Uid tiers Uid manifests get params +func (o *V1AppProfilesUIDTiersUIDManifestsGetParams) WithTimeout(timeout time.Duration) *V1AppProfilesUIDTiersUIDManifestsGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 app profiles Uid tiers Uid manifests get params +func (o *V1AppProfilesUIDTiersUIDManifestsGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 app profiles Uid tiers Uid manifests get params +func (o *V1AppProfilesUIDTiersUIDManifestsGetParams) WithContext(ctx context.Context) *V1AppProfilesUIDTiersUIDManifestsGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 app profiles Uid tiers Uid manifests get params +func (o *V1AppProfilesUIDTiersUIDManifestsGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 app profiles Uid tiers Uid manifests get params +func (o *V1AppProfilesUIDTiersUIDManifestsGetParams) WithHTTPClient(client *http.Client) *V1AppProfilesUIDTiersUIDManifestsGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 app profiles Uid tiers Uid manifests get params +func (o *V1AppProfilesUIDTiersUIDManifestsGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithTierUID adds the tierUID to the v1 app profiles Uid tiers Uid manifests get params +func (o *V1AppProfilesUIDTiersUIDManifestsGetParams) WithTierUID(tierUID string) *V1AppProfilesUIDTiersUIDManifestsGetParams { + o.SetTierUID(tierUID) + return o +} + +// SetTierUID adds the tierUid to the v1 app profiles Uid tiers Uid manifests get params +func (o *V1AppProfilesUIDTiersUIDManifestsGetParams) SetTierUID(tierUID string) { + o.TierUID = tierUID +} + +// WithUID adds the uid to the v1 app profiles Uid tiers Uid manifests get params +func (o *V1AppProfilesUIDTiersUIDManifestsGetParams) WithUID(uid string) *V1AppProfilesUIDTiersUIDManifestsGetParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 app profiles Uid tiers Uid manifests get params +func (o *V1AppProfilesUIDTiersUIDManifestsGetParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1AppProfilesUIDTiersUIDManifestsGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param tierUid + if err := r.SetPathParam("tierUid", o.TierUID); err != nil { + return err + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_app_profiles_uid_tiers_uid_manifests_get_responses.go b/api/client/v1/v1_app_profiles_uid_tiers_uid_manifests_get_responses.go new file mode 100644 index 00000000..a34ef5ec --- /dev/null +++ b/api/client/v1/v1_app_profiles_uid_tiers_uid_manifests_get_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1AppProfilesUIDTiersUIDManifestsGetReader is a Reader for the V1AppProfilesUIDTiersUIDManifestsGet structure. +type V1AppProfilesUIDTiersUIDManifestsGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1AppProfilesUIDTiersUIDManifestsGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1AppProfilesUIDTiersUIDManifestsGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1AppProfilesUIDTiersUIDManifestsGetOK creates a V1AppProfilesUIDTiersUIDManifestsGetOK with default headers values +func NewV1AppProfilesUIDTiersUIDManifestsGetOK() *V1AppProfilesUIDTiersUIDManifestsGetOK { + return &V1AppProfilesUIDTiersUIDManifestsGetOK{} +} + +/* +V1AppProfilesUIDTiersUIDManifestsGetOK handles this case with default header values. + +OK +*/ +type V1AppProfilesUIDTiersUIDManifestsGetOK struct { + Payload *models.V1AppTierManifests +} + +func (o *V1AppProfilesUIDTiersUIDManifestsGetOK) Error() string { + return fmt.Sprintf("[GET /v1/appProfiles/{uid}/tiers/{tierUid}/manifests][%d] v1AppProfilesUidTiersUidManifestsGetOK %+v", 200, o.Payload) +} + +func (o *V1AppProfilesUIDTiersUIDManifestsGetOK) GetPayload() *models.V1AppTierManifests { + return o.Payload +} + +func (o *V1AppProfilesUIDTiersUIDManifestsGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1AppTierManifests) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_app_profiles_uid_tiers_uid_manifests_uid_delete_parameters.go b/api/client/v1/v1_app_profiles_uid_tiers_uid_manifests_uid_delete_parameters.go new file mode 100644 index 00000000..ff1fa3ce --- /dev/null +++ b/api/client/v1/v1_app_profiles_uid_tiers_uid_manifests_uid_delete_parameters.go @@ -0,0 +1,178 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1AppProfilesUIDTiersUIDManifestsUIDDeleteParams creates a new V1AppProfilesUIDTiersUIDManifestsUIDDeleteParams object +// with the default values initialized. +func NewV1AppProfilesUIDTiersUIDManifestsUIDDeleteParams() *V1AppProfilesUIDTiersUIDManifestsUIDDeleteParams { + var () + return &V1AppProfilesUIDTiersUIDManifestsUIDDeleteParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1AppProfilesUIDTiersUIDManifestsUIDDeleteParamsWithTimeout creates a new V1AppProfilesUIDTiersUIDManifestsUIDDeleteParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1AppProfilesUIDTiersUIDManifestsUIDDeleteParamsWithTimeout(timeout time.Duration) *V1AppProfilesUIDTiersUIDManifestsUIDDeleteParams { + var () + return &V1AppProfilesUIDTiersUIDManifestsUIDDeleteParams{ + + timeout: timeout, + } +} + +// NewV1AppProfilesUIDTiersUIDManifestsUIDDeleteParamsWithContext creates a new V1AppProfilesUIDTiersUIDManifestsUIDDeleteParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1AppProfilesUIDTiersUIDManifestsUIDDeleteParamsWithContext(ctx context.Context) *V1AppProfilesUIDTiersUIDManifestsUIDDeleteParams { + var () + return &V1AppProfilesUIDTiersUIDManifestsUIDDeleteParams{ + + Context: ctx, + } +} + +// NewV1AppProfilesUIDTiersUIDManifestsUIDDeleteParamsWithHTTPClient creates a new V1AppProfilesUIDTiersUIDManifestsUIDDeleteParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1AppProfilesUIDTiersUIDManifestsUIDDeleteParamsWithHTTPClient(client *http.Client) *V1AppProfilesUIDTiersUIDManifestsUIDDeleteParams { + var () + return &V1AppProfilesUIDTiersUIDManifestsUIDDeleteParams{ + HTTPClient: client, + } +} + +/* +V1AppProfilesUIDTiersUIDManifestsUIDDeleteParams contains all the parameters to send to the API endpoint +for the v1 app profiles Uid tiers Uid manifests Uid delete operation typically these are written to a http.Request +*/ +type V1AppProfilesUIDTiersUIDManifestsUIDDeleteParams struct { + + /*ManifestUID + Application profile tier manifest uid + + */ + ManifestUID string + /*TierUID + Application profile tier uid + + */ + TierUID string + /*UID + Application profile uid + + */ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 app profiles Uid tiers Uid manifests Uid delete params +func (o *V1AppProfilesUIDTiersUIDManifestsUIDDeleteParams) WithTimeout(timeout time.Duration) *V1AppProfilesUIDTiersUIDManifestsUIDDeleteParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 app profiles Uid tiers Uid manifests Uid delete params +func (o *V1AppProfilesUIDTiersUIDManifestsUIDDeleteParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 app profiles Uid tiers Uid manifests Uid delete params +func (o *V1AppProfilesUIDTiersUIDManifestsUIDDeleteParams) WithContext(ctx context.Context) *V1AppProfilesUIDTiersUIDManifestsUIDDeleteParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 app profiles Uid tiers Uid manifests Uid delete params +func (o *V1AppProfilesUIDTiersUIDManifestsUIDDeleteParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 app profiles Uid tiers Uid manifests Uid delete params +func (o *V1AppProfilesUIDTiersUIDManifestsUIDDeleteParams) WithHTTPClient(client *http.Client) *V1AppProfilesUIDTiersUIDManifestsUIDDeleteParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 app profiles Uid tiers Uid manifests Uid delete params +func (o *V1AppProfilesUIDTiersUIDManifestsUIDDeleteParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithManifestUID adds the manifestUID to the v1 app profiles Uid tiers Uid manifests Uid delete params +func (o *V1AppProfilesUIDTiersUIDManifestsUIDDeleteParams) WithManifestUID(manifestUID string) *V1AppProfilesUIDTiersUIDManifestsUIDDeleteParams { + o.SetManifestUID(manifestUID) + return o +} + +// SetManifestUID adds the manifestUid to the v1 app profiles Uid tiers Uid manifests Uid delete params +func (o *V1AppProfilesUIDTiersUIDManifestsUIDDeleteParams) SetManifestUID(manifestUID string) { + o.ManifestUID = manifestUID +} + +// WithTierUID adds the tierUID to the v1 app profiles Uid tiers Uid manifests Uid delete params +func (o *V1AppProfilesUIDTiersUIDManifestsUIDDeleteParams) WithTierUID(tierUID string) *V1AppProfilesUIDTiersUIDManifestsUIDDeleteParams { + o.SetTierUID(tierUID) + return o +} + +// SetTierUID adds the tierUid to the v1 app profiles Uid tiers Uid manifests Uid delete params +func (o *V1AppProfilesUIDTiersUIDManifestsUIDDeleteParams) SetTierUID(tierUID string) { + o.TierUID = tierUID +} + +// WithUID adds the uid to the v1 app profiles Uid tiers Uid manifests Uid delete params +func (o *V1AppProfilesUIDTiersUIDManifestsUIDDeleteParams) WithUID(uid string) *V1AppProfilesUIDTiersUIDManifestsUIDDeleteParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 app profiles Uid tiers Uid manifests Uid delete params +func (o *V1AppProfilesUIDTiersUIDManifestsUIDDeleteParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1AppProfilesUIDTiersUIDManifestsUIDDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param manifestUid + if err := r.SetPathParam("manifestUid", o.ManifestUID); err != nil { + return err + } + + // path param tierUid + if err := r.SetPathParam("tierUid", o.TierUID); err != nil { + return err + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_app_profiles_uid_tiers_uid_manifests_uid_delete_responses.go b/api/client/v1/v1_app_profiles_uid_tiers_uid_manifests_uid_delete_responses.go new file mode 100644 index 00000000..bccc2f94 --- /dev/null +++ b/api/client/v1/v1_app_profiles_uid_tiers_uid_manifests_uid_delete_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1AppProfilesUIDTiersUIDManifestsUIDDeleteReader is a Reader for the V1AppProfilesUIDTiersUIDManifestsUIDDelete structure. +type V1AppProfilesUIDTiersUIDManifestsUIDDeleteReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1AppProfilesUIDTiersUIDManifestsUIDDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1AppProfilesUIDTiersUIDManifestsUIDDeleteNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1AppProfilesUIDTiersUIDManifestsUIDDeleteNoContent creates a V1AppProfilesUIDTiersUIDManifestsUIDDeleteNoContent with default headers values +func NewV1AppProfilesUIDTiersUIDManifestsUIDDeleteNoContent() *V1AppProfilesUIDTiersUIDManifestsUIDDeleteNoContent { + return &V1AppProfilesUIDTiersUIDManifestsUIDDeleteNoContent{} +} + +/* +V1AppProfilesUIDTiersUIDManifestsUIDDeleteNoContent handles this case with default header values. + +The resource was deleted successfully +*/ +type V1AppProfilesUIDTiersUIDManifestsUIDDeleteNoContent struct { +} + +func (o *V1AppProfilesUIDTiersUIDManifestsUIDDeleteNoContent) Error() string { + return fmt.Sprintf("[DELETE /v1/appProfiles/{uid}/tiers/{tierUid}/manifests/{manifestUid}][%d] v1AppProfilesUidTiersUidManifestsUidDeleteNoContent ", 204) +} + +func (o *V1AppProfilesUIDTiersUIDManifestsUIDDeleteNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_app_profiles_uid_tiers_uid_manifests_uid_get_parameters.go b/api/client/v1/v1_app_profiles_uid_tiers_uid_manifests_uid_get_parameters.go new file mode 100644 index 00000000..376558b1 --- /dev/null +++ b/api/client/v1/v1_app_profiles_uid_tiers_uid_manifests_uid_get_parameters.go @@ -0,0 +1,178 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1AppProfilesUIDTiersUIDManifestsUIDGetParams creates a new V1AppProfilesUIDTiersUIDManifestsUIDGetParams object +// with the default values initialized. +func NewV1AppProfilesUIDTiersUIDManifestsUIDGetParams() *V1AppProfilesUIDTiersUIDManifestsUIDGetParams { + var () + return &V1AppProfilesUIDTiersUIDManifestsUIDGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1AppProfilesUIDTiersUIDManifestsUIDGetParamsWithTimeout creates a new V1AppProfilesUIDTiersUIDManifestsUIDGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1AppProfilesUIDTiersUIDManifestsUIDGetParamsWithTimeout(timeout time.Duration) *V1AppProfilesUIDTiersUIDManifestsUIDGetParams { + var () + return &V1AppProfilesUIDTiersUIDManifestsUIDGetParams{ + + timeout: timeout, + } +} + +// NewV1AppProfilesUIDTiersUIDManifestsUIDGetParamsWithContext creates a new V1AppProfilesUIDTiersUIDManifestsUIDGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1AppProfilesUIDTiersUIDManifestsUIDGetParamsWithContext(ctx context.Context) *V1AppProfilesUIDTiersUIDManifestsUIDGetParams { + var () + return &V1AppProfilesUIDTiersUIDManifestsUIDGetParams{ + + Context: ctx, + } +} + +// NewV1AppProfilesUIDTiersUIDManifestsUIDGetParamsWithHTTPClient creates a new V1AppProfilesUIDTiersUIDManifestsUIDGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1AppProfilesUIDTiersUIDManifestsUIDGetParamsWithHTTPClient(client *http.Client) *V1AppProfilesUIDTiersUIDManifestsUIDGetParams { + var () + return &V1AppProfilesUIDTiersUIDManifestsUIDGetParams{ + HTTPClient: client, + } +} + +/* +V1AppProfilesUIDTiersUIDManifestsUIDGetParams contains all the parameters to send to the API endpoint +for the v1 app profiles Uid tiers Uid manifests Uid get operation typically these are written to a http.Request +*/ +type V1AppProfilesUIDTiersUIDManifestsUIDGetParams struct { + + /*ManifestUID + Application profile tier manifest uid + + */ + ManifestUID string + /*TierUID + Application profile tier uid + + */ + TierUID string + /*UID + Application profile uid + + */ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 app profiles Uid tiers Uid manifests Uid get params +func (o *V1AppProfilesUIDTiersUIDManifestsUIDGetParams) WithTimeout(timeout time.Duration) *V1AppProfilesUIDTiersUIDManifestsUIDGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 app profiles Uid tiers Uid manifests Uid get params +func (o *V1AppProfilesUIDTiersUIDManifestsUIDGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 app profiles Uid tiers Uid manifests Uid get params +func (o *V1AppProfilesUIDTiersUIDManifestsUIDGetParams) WithContext(ctx context.Context) *V1AppProfilesUIDTiersUIDManifestsUIDGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 app profiles Uid tiers Uid manifests Uid get params +func (o *V1AppProfilesUIDTiersUIDManifestsUIDGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 app profiles Uid tiers Uid manifests Uid get params +func (o *V1AppProfilesUIDTiersUIDManifestsUIDGetParams) WithHTTPClient(client *http.Client) *V1AppProfilesUIDTiersUIDManifestsUIDGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 app profiles Uid tiers Uid manifests Uid get params +func (o *V1AppProfilesUIDTiersUIDManifestsUIDGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithManifestUID adds the manifestUID to the v1 app profiles Uid tiers Uid manifests Uid get params +func (o *V1AppProfilesUIDTiersUIDManifestsUIDGetParams) WithManifestUID(manifestUID string) *V1AppProfilesUIDTiersUIDManifestsUIDGetParams { + o.SetManifestUID(manifestUID) + return o +} + +// SetManifestUID adds the manifestUid to the v1 app profiles Uid tiers Uid manifests Uid get params +func (o *V1AppProfilesUIDTiersUIDManifestsUIDGetParams) SetManifestUID(manifestUID string) { + o.ManifestUID = manifestUID +} + +// WithTierUID adds the tierUID to the v1 app profiles Uid tiers Uid manifests Uid get params +func (o *V1AppProfilesUIDTiersUIDManifestsUIDGetParams) WithTierUID(tierUID string) *V1AppProfilesUIDTiersUIDManifestsUIDGetParams { + o.SetTierUID(tierUID) + return o +} + +// SetTierUID adds the tierUid to the v1 app profiles Uid tiers Uid manifests Uid get params +func (o *V1AppProfilesUIDTiersUIDManifestsUIDGetParams) SetTierUID(tierUID string) { + o.TierUID = tierUID +} + +// WithUID adds the uid to the v1 app profiles Uid tiers Uid manifests Uid get params +func (o *V1AppProfilesUIDTiersUIDManifestsUIDGetParams) WithUID(uid string) *V1AppProfilesUIDTiersUIDManifestsUIDGetParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 app profiles Uid tiers Uid manifests Uid get params +func (o *V1AppProfilesUIDTiersUIDManifestsUIDGetParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1AppProfilesUIDTiersUIDManifestsUIDGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param manifestUid + if err := r.SetPathParam("manifestUid", o.ManifestUID); err != nil { + return err + } + + // path param tierUid + if err := r.SetPathParam("tierUid", o.TierUID); err != nil { + return err + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_app_profiles_uid_tiers_uid_manifests_uid_get_responses.go b/api/client/v1/v1_app_profiles_uid_tiers_uid_manifests_uid_get_responses.go new file mode 100644 index 00000000..b1ba140b --- /dev/null +++ b/api/client/v1/v1_app_profiles_uid_tiers_uid_manifests_uid_get_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1AppProfilesUIDTiersUIDManifestsUIDGetReader is a Reader for the V1AppProfilesUIDTiersUIDManifestsUIDGet structure. +type V1AppProfilesUIDTiersUIDManifestsUIDGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1AppProfilesUIDTiersUIDManifestsUIDGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1AppProfilesUIDTiersUIDManifestsUIDGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1AppProfilesUIDTiersUIDManifestsUIDGetOK creates a V1AppProfilesUIDTiersUIDManifestsUIDGetOK with default headers values +func NewV1AppProfilesUIDTiersUIDManifestsUIDGetOK() *V1AppProfilesUIDTiersUIDManifestsUIDGetOK { + return &V1AppProfilesUIDTiersUIDManifestsUIDGetOK{} +} + +/* +V1AppProfilesUIDTiersUIDManifestsUIDGetOK handles this case with default header values. + +OK +*/ +type V1AppProfilesUIDTiersUIDManifestsUIDGetOK struct { + Payload *models.V1Manifest +} + +func (o *V1AppProfilesUIDTiersUIDManifestsUIDGetOK) Error() string { + return fmt.Sprintf("[GET /v1/appProfiles/{uid}/tiers/{tierUid}/manifests/{manifestUid}][%d] v1AppProfilesUidTiersUidManifestsUidGetOK %+v", 200, o.Payload) +} + +func (o *V1AppProfilesUIDTiersUIDManifestsUIDGetOK) GetPayload() *models.V1Manifest { + return o.Payload +} + +func (o *V1AppProfilesUIDTiersUIDManifestsUIDGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1Manifest) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_app_profiles_uid_tiers_uid_manifests_uid_update_parameters.go b/api/client/v1/v1_app_profiles_uid_tiers_uid_manifests_uid_update_parameters.go new file mode 100644 index 00000000..8ebda5a4 --- /dev/null +++ b/api/client/v1/v1_app_profiles_uid_tiers_uid_manifests_uid_update_parameters.go @@ -0,0 +1,199 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1AppProfilesUIDTiersUIDManifestsUIDUpdateParams creates a new V1AppProfilesUIDTiersUIDManifestsUIDUpdateParams object +// with the default values initialized. +func NewV1AppProfilesUIDTiersUIDManifestsUIDUpdateParams() *V1AppProfilesUIDTiersUIDManifestsUIDUpdateParams { + var () + return &V1AppProfilesUIDTiersUIDManifestsUIDUpdateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1AppProfilesUIDTiersUIDManifestsUIDUpdateParamsWithTimeout creates a new V1AppProfilesUIDTiersUIDManifestsUIDUpdateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1AppProfilesUIDTiersUIDManifestsUIDUpdateParamsWithTimeout(timeout time.Duration) *V1AppProfilesUIDTiersUIDManifestsUIDUpdateParams { + var () + return &V1AppProfilesUIDTiersUIDManifestsUIDUpdateParams{ + + timeout: timeout, + } +} + +// NewV1AppProfilesUIDTiersUIDManifestsUIDUpdateParamsWithContext creates a new V1AppProfilesUIDTiersUIDManifestsUIDUpdateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1AppProfilesUIDTiersUIDManifestsUIDUpdateParamsWithContext(ctx context.Context) *V1AppProfilesUIDTiersUIDManifestsUIDUpdateParams { + var () + return &V1AppProfilesUIDTiersUIDManifestsUIDUpdateParams{ + + Context: ctx, + } +} + +// NewV1AppProfilesUIDTiersUIDManifestsUIDUpdateParamsWithHTTPClient creates a new V1AppProfilesUIDTiersUIDManifestsUIDUpdateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1AppProfilesUIDTiersUIDManifestsUIDUpdateParamsWithHTTPClient(client *http.Client) *V1AppProfilesUIDTiersUIDManifestsUIDUpdateParams { + var () + return &V1AppProfilesUIDTiersUIDManifestsUIDUpdateParams{ + HTTPClient: client, + } +} + +/* +V1AppProfilesUIDTiersUIDManifestsUIDUpdateParams contains all the parameters to send to the API endpoint +for the v1 app profiles Uid tiers Uid manifests Uid update operation typically these are written to a http.Request +*/ +type V1AppProfilesUIDTiersUIDManifestsUIDUpdateParams struct { + + /*Body*/ + Body *models.V1ManifestRefUpdateEntity + /*ManifestUID + Application profile tier manifest uid + + */ + ManifestUID string + /*TierUID + Application profile tier uid + + */ + TierUID string + /*UID + Application profile uid + + */ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 app profiles Uid tiers Uid manifests Uid update params +func (o *V1AppProfilesUIDTiersUIDManifestsUIDUpdateParams) WithTimeout(timeout time.Duration) *V1AppProfilesUIDTiersUIDManifestsUIDUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 app profiles Uid tiers Uid manifests Uid update params +func (o *V1AppProfilesUIDTiersUIDManifestsUIDUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 app profiles Uid tiers Uid manifests Uid update params +func (o *V1AppProfilesUIDTiersUIDManifestsUIDUpdateParams) WithContext(ctx context.Context) *V1AppProfilesUIDTiersUIDManifestsUIDUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 app profiles Uid tiers Uid manifests Uid update params +func (o *V1AppProfilesUIDTiersUIDManifestsUIDUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 app profiles Uid tiers Uid manifests Uid update params +func (o *V1AppProfilesUIDTiersUIDManifestsUIDUpdateParams) WithHTTPClient(client *http.Client) *V1AppProfilesUIDTiersUIDManifestsUIDUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 app profiles Uid tiers Uid manifests Uid update params +func (o *V1AppProfilesUIDTiersUIDManifestsUIDUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 app profiles Uid tiers Uid manifests Uid update params +func (o *V1AppProfilesUIDTiersUIDManifestsUIDUpdateParams) WithBody(body *models.V1ManifestRefUpdateEntity) *V1AppProfilesUIDTiersUIDManifestsUIDUpdateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 app profiles Uid tiers Uid manifests Uid update params +func (o *V1AppProfilesUIDTiersUIDManifestsUIDUpdateParams) SetBody(body *models.V1ManifestRefUpdateEntity) { + o.Body = body +} + +// WithManifestUID adds the manifestUID to the v1 app profiles Uid tiers Uid manifests Uid update params +func (o *V1AppProfilesUIDTiersUIDManifestsUIDUpdateParams) WithManifestUID(manifestUID string) *V1AppProfilesUIDTiersUIDManifestsUIDUpdateParams { + o.SetManifestUID(manifestUID) + return o +} + +// SetManifestUID adds the manifestUid to the v1 app profiles Uid tiers Uid manifests Uid update params +func (o *V1AppProfilesUIDTiersUIDManifestsUIDUpdateParams) SetManifestUID(manifestUID string) { + o.ManifestUID = manifestUID +} + +// WithTierUID adds the tierUID to the v1 app profiles Uid tiers Uid manifests Uid update params +func (o *V1AppProfilesUIDTiersUIDManifestsUIDUpdateParams) WithTierUID(tierUID string) *V1AppProfilesUIDTiersUIDManifestsUIDUpdateParams { + o.SetTierUID(tierUID) + return o +} + +// SetTierUID adds the tierUid to the v1 app profiles Uid tiers Uid manifests Uid update params +func (o *V1AppProfilesUIDTiersUIDManifestsUIDUpdateParams) SetTierUID(tierUID string) { + o.TierUID = tierUID +} + +// WithUID adds the uid to the v1 app profiles Uid tiers Uid manifests Uid update params +func (o *V1AppProfilesUIDTiersUIDManifestsUIDUpdateParams) WithUID(uid string) *V1AppProfilesUIDTiersUIDManifestsUIDUpdateParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 app profiles Uid tiers Uid manifests Uid update params +func (o *V1AppProfilesUIDTiersUIDManifestsUIDUpdateParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1AppProfilesUIDTiersUIDManifestsUIDUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param manifestUid + if err := r.SetPathParam("manifestUid", o.ManifestUID); err != nil { + return err + } + + // path param tierUid + if err := r.SetPathParam("tierUid", o.TierUID); err != nil { + return err + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_app_profiles_uid_tiers_uid_manifests_uid_update_responses.go b/api/client/v1/v1_app_profiles_uid_tiers_uid_manifests_uid_update_responses.go new file mode 100644 index 00000000..4906c389 --- /dev/null +++ b/api/client/v1/v1_app_profiles_uid_tiers_uid_manifests_uid_update_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1AppProfilesUIDTiersUIDManifestsUIDUpdateReader is a Reader for the V1AppProfilesUIDTiersUIDManifestsUIDUpdate structure. +type V1AppProfilesUIDTiersUIDManifestsUIDUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1AppProfilesUIDTiersUIDManifestsUIDUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1AppProfilesUIDTiersUIDManifestsUIDUpdateNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1AppProfilesUIDTiersUIDManifestsUIDUpdateNoContent creates a V1AppProfilesUIDTiersUIDManifestsUIDUpdateNoContent with default headers values +func NewV1AppProfilesUIDTiersUIDManifestsUIDUpdateNoContent() *V1AppProfilesUIDTiersUIDManifestsUIDUpdateNoContent { + return &V1AppProfilesUIDTiersUIDManifestsUIDUpdateNoContent{} +} + +/* +V1AppProfilesUIDTiersUIDManifestsUIDUpdateNoContent handles this case with default header values. + +The resource was updated successfully +*/ +type V1AppProfilesUIDTiersUIDManifestsUIDUpdateNoContent struct { +} + +func (o *V1AppProfilesUIDTiersUIDManifestsUIDUpdateNoContent) Error() string { + return fmt.Sprintf("[PUT /v1/appProfiles/{uid}/tiers/{tierUid}/manifests/{manifestUid}][%d] v1AppProfilesUidTiersUidManifestsUidUpdateNoContent ", 204) +} + +func (o *V1AppProfilesUIDTiersUIDManifestsUIDUpdateNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_app_profiles_uid_tiers_uid_resolved_values_get_parameters.go b/api/client/v1/v1_app_profiles_uid_tiers_uid_resolved_values_get_parameters.go new file mode 100644 index 00000000..322943c2 --- /dev/null +++ b/api/client/v1/v1_app_profiles_uid_tiers_uid_resolved_values_get_parameters.go @@ -0,0 +1,157 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1AppProfilesUIDTiersUIDResolvedValuesGetParams creates a new V1AppProfilesUIDTiersUIDResolvedValuesGetParams object +// with the default values initialized. +func NewV1AppProfilesUIDTiersUIDResolvedValuesGetParams() *V1AppProfilesUIDTiersUIDResolvedValuesGetParams { + var () + return &V1AppProfilesUIDTiersUIDResolvedValuesGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1AppProfilesUIDTiersUIDResolvedValuesGetParamsWithTimeout creates a new V1AppProfilesUIDTiersUIDResolvedValuesGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1AppProfilesUIDTiersUIDResolvedValuesGetParamsWithTimeout(timeout time.Duration) *V1AppProfilesUIDTiersUIDResolvedValuesGetParams { + var () + return &V1AppProfilesUIDTiersUIDResolvedValuesGetParams{ + + timeout: timeout, + } +} + +// NewV1AppProfilesUIDTiersUIDResolvedValuesGetParamsWithContext creates a new V1AppProfilesUIDTiersUIDResolvedValuesGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1AppProfilesUIDTiersUIDResolvedValuesGetParamsWithContext(ctx context.Context) *V1AppProfilesUIDTiersUIDResolvedValuesGetParams { + var () + return &V1AppProfilesUIDTiersUIDResolvedValuesGetParams{ + + Context: ctx, + } +} + +// NewV1AppProfilesUIDTiersUIDResolvedValuesGetParamsWithHTTPClient creates a new V1AppProfilesUIDTiersUIDResolvedValuesGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1AppProfilesUIDTiersUIDResolvedValuesGetParamsWithHTTPClient(client *http.Client) *V1AppProfilesUIDTiersUIDResolvedValuesGetParams { + var () + return &V1AppProfilesUIDTiersUIDResolvedValuesGetParams{ + HTTPClient: client, + } +} + +/* +V1AppProfilesUIDTiersUIDResolvedValuesGetParams contains all the parameters to send to the API endpoint +for the v1 app profiles Uid tiers Uid resolved values get operation typically these are written to a http.Request +*/ +type V1AppProfilesUIDTiersUIDResolvedValuesGetParams struct { + + /*TierUID + Application profile tier uid + + */ + TierUID string + /*UID + Application profile uid + + */ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 app profiles Uid tiers Uid resolved values get params +func (o *V1AppProfilesUIDTiersUIDResolvedValuesGetParams) WithTimeout(timeout time.Duration) *V1AppProfilesUIDTiersUIDResolvedValuesGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 app profiles Uid tiers Uid resolved values get params +func (o *V1AppProfilesUIDTiersUIDResolvedValuesGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 app profiles Uid tiers Uid resolved values get params +func (o *V1AppProfilesUIDTiersUIDResolvedValuesGetParams) WithContext(ctx context.Context) *V1AppProfilesUIDTiersUIDResolvedValuesGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 app profiles Uid tiers Uid resolved values get params +func (o *V1AppProfilesUIDTiersUIDResolvedValuesGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 app profiles Uid tiers Uid resolved values get params +func (o *V1AppProfilesUIDTiersUIDResolvedValuesGetParams) WithHTTPClient(client *http.Client) *V1AppProfilesUIDTiersUIDResolvedValuesGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 app profiles Uid tiers Uid resolved values get params +func (o *V1AppProfilesUIDTiersUIDResolvedValuesGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithTierUID adds the tierUID to the v1 app profiles Uid tiers Uid resolved values get params +func (o *V1AppProfilesUIDTiersUIDResolvedValuesGetParams) WithTierUID(tierUID string) *V1AppProfilesUIDTiersUIDResolvedValuesGetParams { + o.SetTierUID(tierUID) + return o +} + +// SetTierUID adds the tierUid to the v1 app profiles Uid tiers Uid resolved values get params +func (o *V1AppProfilesUIDTiersUIDResolvedValuesGetParams) SetTierUID(tierUID string) { + o.TierUID = tierUID +} + +// WithUID adds the uid to the v1 app profiles Uid tiers Uid resolved values get params +func (o *V1AppProfilesUIDTiersUIDResolvedValuesGetParams) WithUID(uid string) *V1AppProfilesUIDTiersUIDResolvedValuesGetParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 app profiles Uid tiers Uid resolved values get params +func (o *V1AppProfilesUIDTiersUIDResolvedValuesGetParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1AppProfilesUIDTiersUIDResolvedValuesGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param tierUid + if err := r.SetPathParam("tierUid", o.TierUID); err != nil { + return err + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_app_profiles_uid_tiers_uid_resolved_values_get_responses.go b/api/client/v1/v1_app_profiles_uid_tiers_uid_resolved_values_get_responses.go new file mode 100644 index 00000000..803b5f35 --- /dev/null +++ b/api/client/v1/v1_app_profiles_uid_tiers_uid_resolved_values_get_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1AppProfilesUIDTiersUIDResolvedValuesGetReader is a Reader for the V1AppProfilesUIDTiersUIDResolvedValuesGet structure. +type V1AppProfilesUIDTiersUIDResolvedValuesGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1AppProfilesUIDTiersUIDResolvedValuesGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1AppProfilesUIDTiersUIDResolvedValuesGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1AppProfilesUIDTiersUIDResolvedValuesGetOK creates a V1AppProfilesUIDTiersUIDResolvedValuesGetOK with default headers values +func NewV1AppProfilesUIDTiersUIDResolvedValuesGetOK() *V1AppProfilesUIDTiersUIDResolvedValuesGetOK { + return &V1AppProfilesUIDTiersUIDResolvedValuesGetOK{} +} + +/* +V1AppProfilesUIDTiersUIDResolvedValuesGetOK handles this case with default header values. + +OK +*/ +type V1AppProfilesUIDTiersUIDResolvedValuesGetOK struct { + Payload *models.V1AppTierResolvedValues +} + +func (o *V1AppProfilesUIDTiersUIDResolvedValuesGetOK) Error() string { + return fmt.Sprintf("[GET /v1/appProfiles/{uid}/tiers/{tierUid}/resolvedValues][%d] v1AppProfilesUidTiersUidResolvedValuesGetOK %+v", 200, o.Payload) +} + +func (o *V1AppProfilesUIDTiersUIDResolvedValuesGetOK) GetPayload() *models.V1AppTierResolvedValues { + return o.Payload +} + +func (o *V1AppProfilesUIDTiersUIDResolvedValuesGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1AppTierResolvedValues) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_app_profiles_uid_tiers_uid_update_parameters.go b/api/client/v1/v1_app_profiles_uid_tiers_uid_update_parameters.go new file mode 100644 index 00000000..3759a5e1 --- /dev/null +++ b/api/client/v1/v1_app_profiles_uid_tiers_uid_update_parameters.go @@ -0,0 +1,178 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1AppProfilesUIDTiersUIDUpdateParams creates a new V1AppProfilesUIDTiersUIDUpdateParams object +// with the default values initialized. +func NewV1AppProfilesUIDTiersUIDUpdateParams() *V1AppProfilesUIDTiersUIDUpdateParams { + var () + return &V1AppProfilesUIDTiersUIDUpdateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1AppProfilesUIDTiersUIDUpdateParamsWithTimeout creates a new V1AppProfilesUIDTiersUIDUpdateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1AppProfilesUIDTiersUIDUpdateParamsWithTimeout(timeout time.Duration) *V1AppProfilesUIDTiersUIDUpdateParams { + var () + return &V1AppProfilesUIDTiersUIDUpdateParams{ + + timeout: timeout, + } +} + +// NewV1AppProfilesUIDTiersUIDUpdateParamsWithContext creates a new V1AppProfilesUIDTiersUIDUpdateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1AppProfilesUIDTiersUIDUpdateParamsWithContext(ctx context.Context) *V1AppProfilesUIDTiersUIDUpdateParams { + var () + return &V1AppProfilesUIDTiersUIDUpdateParams{ + + Context: ctx, + } +} + +// NewV1AppProfilesUIDTiersUIDUpdateParamsWithHTTPClient creates a new V1AppProfilesUIDTiersUIDUpdateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1AppProfilesUIDTiersUIDUpdateParamsWithHTTPClient(client *http.Client) *V1AppProfilesUIDTiersUIDUpdateParams { + var () + return &V1AppProfilesUIDTiersUIDUpdateParams{ + HTTPClient: client, + } +} + +/* +V1AppProfilesUIDTiersUIDUpdateParams contains all the parameters to send to the API endpoint +for the v1 app profiles Uid tiers Uid update operation typically these are written to a http.Request +*/ +type V1AppProfilesUIDTiersUIDUpdateParams struct { + + /*Body*/ + Body *models.V1AppTierUpdateEntity + /*TierUID + Application profile tier uid + + */ + TierUID string + /*UID + Application profile uid + + */ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 app profiles Uid tiers Uid update params +func (o *V1AppProfilesUIDTiersUIDUpdateParams) WithTimeout(timeout time.Duration) *V1AppProfilesUIDTiersUIDUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 app profiles Uid tiers Uid update params +func (o *V1AppProfilesUIDTiersUIDUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 app profiles Uid tiers Uid update params +func (o *V1AppProfilesUIDTiersUIDUpdateParams) WithContext(ctx context.Context) *V1AppProfilesUIDTiersUIDUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 app profiles Uid tiers Uid update params +func (o *V1AppProfilesUIDTiersUIDUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 app profiles Uid tiers Uid update params +func (o *V1AppProfilesUIDTiersUIDUpdateParams) WithHTTPClient(client *http.Client) *V1AppProfilesUIDTiersUIDUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 app profiles Uid tiers Uid update params +func (o *V1AppProfilesUIDTiersUIDUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 app profiles Uid tiers Uid update params +func (o *V1AppProfilesUIDTiersUIDUpdateParams) WithBody(body *models.V1AppTierUpdateEntity) *V1AppProfilesUIDTiersUIDUpdateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 app profiles Uid tiers Uid update params +func (o *V1AppProfilesUIDTiersUIDUpdateParams) SetBody(body *models.V1AppTierUpdateEntity) { + o.Body = body +} + +// WithTierUID adds the tierUID to the v1 app profiles Uid tiers Uid update params +func (o *V1AppProfilesUIDTiersUIDUpdateParams) WithTierUID(tierUID string) *V1AppProfilesUIDTiersUIDUpdateParams { + o.SetTierUID(tierUID) + return o +} + +// SetTierUID adds the tierUid to the v1 app profiles Uid tiers Uid update params +func (o *V1AppProfilesUIDTiersUIDUpdateParams) SetTierUID(tierUID string) { + o.TierUID = tierUID +} + +// WithUID adds the uid to the v1 app profiles Uid tiers Uid update params +func (o *V1AppProfilesUIDTiersUIDUpdateParams) WithUID(uid string) *V1AppProfilesUIDTiersUIDUpdateParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 app profiles Uid tiers Uid update params +func (o *V1AppProfilesUIDTiersUIDUpdateParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1AppProfilesUIDTiersUIDUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param tierUid + if err := r.SetPathParam("tierUid", o.TierUID); err != nil { + return err + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_app_profiles_uid_tiers_uid_update_responses.go b/api/client/v1/v1_app_profiles_uid_tiers_uid_update_responses.go new file mode 100644 index 00000000..137d2867 --- /dev/null +++ b/api/client/v1/v1_app_profiles_uid_tiers_uid_update_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1AppProfilesUIDTiersUIDUpdateReader is a Reader for the V1AppProfilesUIDTiersUIDUpdate structure. +type V1AppProfilesUIDTiersUIDUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1AppProfilesUIDTiersUIDUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1AppProfilesUIDTiersUIDUpdateNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1AppProfilesUIDTiersUIDUpdateNoContent creates a V1AppProfilesUIDTiersUIDUpdateNoContent with default headers values +func NewV1AppProfilesUIDTiersUIDUpdateNoContent() *V1AppProfilesUIDTiersUIDUpdateNoContent { + return &V1AppProfilesUIDTiersUIDUpdateNoContent{} +} + +/* +V1AppProfilesUIDTiersUIDUpdateNoContent handles this case with default header values. + +The resource was updated successfully +*/ +type V1AppProfilesUIDTiersUIDUpdateNoContent struct { +} + +func (o *V1AppProfilesUIDTiersUIDUpdateNoContent) Error() string { + return fmt.Sprintf("[PUT /v1/appProfiles/{uid}/tiers/{tierUid}][%d] v1AppProfilesUidTiersUidUpdateNoContent ", 204) +} + +func (o *V1AppProfilesUIDTiersUIDUpdateNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_app_profiles_uid_update_parameters.go b/api/client/v1/v1_app_profiles_uid_update_parameters.go new file mode 100644 index 00000000..9e362a35 --- /dev/null +++ b/api/client/v1/v1_app_profiles_uid_update_parameters.go @@ -0,0 +1,154 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1AppProfilesUIDUpdateParams creates a new V1AppProfilesUIDUpdateParams object +// with the default values initialized. +func NewV1AppProfilesUIDUpdateParams() *V1AppProfilesUIDUpdateParams { + var () + return &V1AppProfilesUIDUpdateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1AppProfilesUIDUpdateParamsWithTimeout creates a new V1AppProfilesUIDUpdateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1AppProfilesUIDUpdateParamsWithTimeout(timeout time.Duration) *V1AppProfilesUIDUpdateParams { + var () + return &V1AppProfilesUIDUpdateParams{ + + timeout: timeout, + } +} + +// NewV1AppProfilesUIDUpdateParamsWithContext creates a new V1AppProfilesUIDUpdateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1AppProfilesUIDUpdateParamsWithContext(ctx context.Context) *V1AppProfilesUIDUpdateParams { + var () + return &V1AppProfilesUIDUpdateParams{ + + Context: ctx, + } +} + +// NewV1AppProfilesUIDUpdateParamsWithHTTPClient creates a new V1AppProfilesUIDUpdateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1AppProfilesUIDUpdateParamsWithHTTPClient(client *http.Client) *V1AppProfilesUIDUpdateParams { + var () + return &V1AppProfilesUIDUpdateParams{ + HTTPClient: client, + } +} + +/* +V1AppProfilesUIDUpdateParams contains all the parameters to send to the API endpoint +for the v1 app profiles Uid update operation typically these are written to a http.Request +*/ +type V1AppProfilesUIDUpdateParams struct { + + /*Body*/ + Body *models.V1AppProfileEntity + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 app profiles Uid update params +func (o *V1AppProfilesUIDUpdateParams) WithTimeout(timeout time.Duration) *V1AppProfilesUIDUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 app profiles Uid update params +func (o *V1AppProfilesUIDUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 app profiles Uid update params +func (o *V1AppProfilesUIDUpdateParams) WithContext(ctx context.Context) *V1AppProfilesUIDUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 app profiles Uid update params +func (o *V1AppProfilesUIDUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 app profiles Uid update params +func (o *V1AppProfilesUIDUpdateParams) WithHTTPClient(client *http.Client) *V1AppProfilesUIDUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 app profiles Uid update params +func (o *V1AppProfilesUIDUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 app profiles Uid update params +func (o *V1AppProfilesUIDUpdateParams) WithBody(body *models.V1AppProfileEntity) *V1AppProfilesUIDUpdateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 app profiles Uid update params +func (o *V1AppProfilesUIDUpdateParams) SetBody(body *models.V1AppProfileEntity) { + o.Body = body +} + +// WithUID adds the uid to the v1 app profiles Uid update params +func (o *V1AppProfilesUIDUpdateParams) WithUID(uid string) *V1AppProfilesUIDUpdateParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 app profiles Uid update params +func (o *V1AppProfilesUIDUpdateParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1AppProfilesUIDUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_app_profiles_uid_update_responses.go b/api/client/v1/v1_app_profiles_uid_update_responses.go new file mode 100644 index 00000000..1d96aac8 --- /dev/null +++ b/api/client/v1/v1_app_profiles_uid_update_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1AppProfilesUIDUpdateReader is a Reader for the V1AppProfilesUIDUpdate structure. +type V1AppProfilesUIDUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1AppProfilesUIDUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1AppProfilesUIDUpdateNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1AppProfilesUIDUpdateNoContent creates a V1AppProfilesUIDUpdateNoContent with default headers values +func NewV1AppProfilesUIDUpdateNoContent() *V1AppProfilesUIDUpdateNoContent { + return &V1AppProfilesUIDUpdateNoContent{} +} + +/* +V1AppProfilesUIDUpdateNoContent handles this case with default header values. + +The resource was updated successfully +*/ +type V1AppProfilesUIDUpdateNoContent struct { +} + +func (o *V1AppProfilesUIDUpdateNoContent) Error() string { + return fmt.Sprintf("[PUT /v1/appProfiles/{uid}][%d] v1AppProfilesUidUpdateNoContent ", 204) +} + +func (o *V1AppProfilesUIDUpdateNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_audits_list_parameters.go b/api/client/v1/v1_audits_list_parameters.go new file mode 100644 index 00000000..a7f7f5ba --- /dev/null +++ b/api/client/v1/v1_audits_list_parameters.go @@ -0,0 +1,478 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// NewV1AuditsListParams creates a new V1AuditsListParams object +// with the default values initialized. +func NewV1AuditsListParams() *V1AuditsListParams { + var ( + limitDefault = int64(50) + ) + return &V1AuditsListParams{ + Limit: &limitDefault, + + timeout: cr.DefaultTimeout, + } +} + +// NewV1AuditsListParamsWithTimeout creates a new V1AuditsListParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1AuditsListParamsWithTimeout(timeout time.Duration) *V1AuditsListParams { + var ( + limitDefault = int64(50) + ) + return &V1AuditsListParams{ + Limit: &limitDefault, + + timeout: timeout, + } +} + +// NewV1AuditsListParamsWithContext creates a new V1AuditsListParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1AuditsListParamsWithContext(ctx context.Context) *V1AuditsListParams { + var ( + limitDefault = int64(50) + ) + return &V1AuditsListParams{ + Limit: &limitDefault, + + Context: ctx, + } +} + +// NewV1AuditsListParamsWithHTTPClient creates a new V1AuditsListParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1AuditsListParamsWithHTTPClient(client *http.Client) *V1AuditsListParams { + var ( + limitDefault = int64(50) + ) + return &V1AuditsListParams{ + Limit: &limitDefault, + HTTPClient: client, + } +} + +/* +V1AuditsListParams contains all the parameters to send to the API endpoint +for the v1 audits list operation typically these are written to a http.Request +*/ +type V1AuditsListParams struct { + + /*ActionType*/ + ActionType *string + /*Continue + continue token to paginate the subsequent data items + + */ + Continue *string + /*EndTime + Time is a wrapper around time.Time which supports correct marshaling to YAML and JSON. Wrappers are provided for many of the factory methods that the time package offers. + + */ + EndTime *strfmt.DateTime + /*Limit + limit is a maximum number of responses to return for a list call. Default and maximum value of the limit is 50. + If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. + + */ + Limit *int64 + /*Offset + offset is the next index number from which the response will start. The response offset value can be used along with continue token for the pagination. + + */ + Offset *int64 + /*ProjectUID + Specify the project uid, to retrieve the specific project audit logs + + */ + ProjectUID *string + /*ResourceKind + Specify the resource name, to retrieve the specific resource audit logs + + */ + ResourceKind *string + /*ResourceUID + Specify the resource uid, to retrieve the specific resource audit logs + + */ + ResourceUID *string + /*StartTime + Time is a wrapper around time.Time which supports correct marshaling to YAML and JSON. Wrappers are provided for many of the factory methods that the time package offers. + + */ + StartTime *strfmt.DateTime + /*TenantUID + Specify the tenant uid, to retrieve the specific tenant audit logs + + */ + TenantUID *string + /*UserUID + Specify the user uid, to retrieve the specific user audit logs + + */ + UserUID *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 audits list params +func (o *V1AuditsListParams) WithTimeout(timeout time.Duration) *V1AuditsListParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 audits list params +func (o *V1AuditsListParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 audits list params +func (o *V1AuditsListParams) WithContext(ctx context.Context) *V1AuditsListParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 audits list params +func (o *V1AuditsListParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 audits list params +func (o *V1AuditsListParams) WithHTTPClient(client *http.Client) *V1AuditsListParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 audits list params +func (o *V1AuditsListParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithActionType adds the actionType to the v1 audits list params +func (o *V1AuditsListParams) WithActionType(actionType *string) *V1AuditsListParams { + o.SetActionType(actionType) + return o +} + +// SetActionType adds the actionType to the v1 audits list params +func (o *V1AuditsListParams) SetActionType(actionType *string) { + o.ActionType = actionType +} + +// WithContinue adds the continueVar to the v1 audits list params +func (o *V1AuditsListParams) WithContinue(continueVar *string) *V1AuditsListParams { + o.SetContinue(continueVar) + return o +} + +// SetContinue adds the continue to the v1 audits list params +func (o *V1AuditsListParams) SetContinue(continueVar *string) { + o.Continue = continueVar +} + +// WithEndTime adds the endTime to the v1 audits list params +func (o *V1AuditsListParams) WithEndTime(endTime *strfmt.DateTime) *V1AuditsListParams { + o.SetEndTime(endTime) + return o +} + +// SetEndTime adds the endTime to the v1 audits list params +func (o *V1AuditsListParams) SetEndTime(endTime *strfmt.DateTime) { + o.EndTime = endTime +} + +// WithLimit adds the limit to the v1 audits list params +func (o *V1AuditsListParams) WithLimit(limit *int64) *V1AuditsListParams { + o.SetLimit(limit) + return o +} + +// SetLimit adds the limit to the v1 audits list params +func (o *V1AuditsListParams) SetLimit(limit *int64) { + o.Limit = limit +} + +// WithOffset adds the offset to the v1 audits list params +func (o *V1AuditsListParams) WithOffset(offset *int64) *V1AuditsListParams { + o.SetOffset(offset) + return o +} + +// SetOffset adds the offset to the v1 audits list params +func (o *V1AuditsListParams) SetOffset(offset *int64) { + o.Offset = offset +} + +// WithProjectUID adds the projectUID to the v1 audits list params +func (o *V1AuditsListParams) WithProjectUID(projectUID *string) *V1AuditsListParams { + o.SetProjectUID(projectUID) + return o +} + +// SetProjectUID adds the projectUid to the v1 audits list params +func (o *V1AuditsListParams) SetProjectUID(projectUID *string) { + o.ProjectUID = projectUID +} + +// WithResourceKind adds the resourceKind to the v1 audits list params +func (o *V1AuditsListParams) WithResourceKind(resourceKind *string) *V1AuditsListParams { + o.SetResourceKind(resourceKind) + return o +} + +// SetResourceKind adds the resourceKind to the v1 audits list params +func (o *V1AuditsListParams) SetResourceKind(resourceKind *string) { + o.ResourceKind = resourceKind +} + +// WithResourceUID adds the resourceUID to the v1 audits list params +func (o *V1AuditsListParams) WithResourceUID(resourceUID *string) *V1AuditsListParams { + o.SetResourceUID(resourceUID) + return o +} + +// SetResourceUID adds the resourceUid to the v1 audits list params +func (o *V1AuditsListParams) SetResourceUID(resourceUID *string) { + o.ResourceUID = resourceUID +} + +// WithStartTime adds the startTime to the v1 audits list params +func (o *V1AuditsListParams) WithStartTime(startTime *strfmt.DateTime) *V1AuditsListParams { + o.SetStartTime(startTime) + return o +} + +// SetStartTime adds the startTime to the v1 audits list params +func (o *V1AuditsListParams) SetStartTime(startTime *strfmt.DateTime) { + o.StartTime = startTime +} + +// WithTenantUID adds the tenantUID to the v1 audits list params +func (o *V1AuditsListParams) WithTenantUID(tenantUID *string) *V1AuditsListParams { + o.SetTenantUID(tenantUID) + return o +} + +// SetTenantUID adds the tenantUid to the v1 audits list params +func (o *V1AuditsListParams) SetTenantUID(tenantUID *string) { + o.TenantUID = tenantUID +} + +// WithUserUID adds the userUID to the v1 audits list params +func (o *V1AuditsListParams) WithUserUID(userUID *string) *V1AuditsListParams { + o.SetUserUID(userUID) + return o +} + +// SetUserUID adds the userUid to the v1 audits list params +func (o *V1AuditsListParams) SetUserUID(userUID *string) { + o.UserUID = userUID +} + +// WriteToRequest writes these params to a swagger request +func (o *V1AuditsListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.ActionType != nil { + + // query param actionType + var qrActionType string + if o.ActionType != nil { + qrActionType = *o.ActionType + } + qActionType := qrActionType + if qActionType != "" { + if err := r.SetQueryParam("actionType", qActionType); err != nil { + return err + } + } + + } + + if o.Continue != nil { + + // query param continue + var qrContinue string + if o.Continue != nil { + qrContinue = *o.Continue + } + qContinue := qrContinue + if qContinue != "" { + if err := r.SetQueryParam("continue", qContinue); err != nil { + return err + } + } + + } + + if o.EndTime != nil { + + // query param endTime + var qrEndTime strfmt.DateTime + if o.EndTime != nil { + qrEndTime = *o.EndTime + } + qEndTime := qrEndTime.String() + if qEndTime != "" { + if err := r.SetQueryParam("endTime", qEndTime); err != nil { + return err + } + } + + } + + if o.Limit != nil { + + // query param limit + var qrLimit int64 + if o.Limit != nil { + qrLimit = *o.Limit + } + qLimit := swag.FormatInt64(qrLimit) + if qLimit != "" { + if err := r.SetQueryParam("limit", qLimit); err != nil { + return err + } + } + + } + + if o.Offset != nil { + + // query param offset + var qrOffset int64 + if o.Offset != nil { + qrOffset = *o.Offset + } + qOffset := swag.FormatInt64(qrOffset) + if qOffset != "" { + if err := r.SetQueryParam("offset", qOffset); err != nil { + return err + } + } + + } + + if o.ProjectUID != nil { + + // query param projectUid + var qrProjectUID string + if o.ProjectUID != nil { + qrProjectUID = *o.ProjectUID + } + qProjectUID := qrProjectUID + if qProjectUID != "" { + if err := r.SetQueryParam("projectUid", qProjectUID); err != nil { + return err + } + } + + } + + if o.ResourceKind != nil { + + // query param resourceKind + var qrResourceKind string + if o.ResourceKind != nil { + qrResourceKind = *o.ResourceKind + } + qResourceKind := qrResourceKind + if qResourceKind != "" { + if err := r.SetQueryParam("resourceKind", qResourceKind); err != nil { + return err + } + } + + } + + if o.ResourceUID != nil { + + // query param resourceUid + var qrResourceUID string + if o.ResourceUID != nil { + qrResourceUID = *o.ResourceUID + } + qResourceUID := qrResourceUID + if qResourceUID != "" { + if err := r.SetQueryParam("resourceUid", qResourceUID); err != nil { + return err + } + } + + } + + if o.StartTime != nil { + + // query param startTime + var qrStartTime strfmt.DateTime + if o.StartTime != nil { + qrStartTime = *o.StartTime + } + qStartTime := qrStartTime.String() + if qStartTime != "" { + if err := r.SetQueryParam("startTime", qStartTime); err != nil { + return err + } + } + + } + + if o.TenantUID != nil { + + // query param tenantUid + var qrTenantUID string + if o.TenantUID != nil { + qrTenantUID = *o.TenantUID + } + qTenantUID := qrTenantUID + if qTenantUID != "" { + if err := r.SetQueryParam("tenantUid", qTenantUID); err != nil { + return err + } + } + + } + + if o.UserUID != nil { + + // query param userUid + var qrUserUID string + if o.UserUID != nil { + qrUserUID = *o.UserUID + } + qUserUID := qrUserUID + if qUserUID != "" { + if err := r.SetQueryParam("userUid", qUserUID); err != nil { + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_audits_list_responses.go b/api/client/v1/v1_audits_list_responses.go new file mode 100644 index 00000000..f46a754c --- /dev/null +++ b/api/client/v1/v1_audits_list_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1AuditsListReader is a Reader for the V1AuditsList structure. +type V1AuditsListReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1AuditsListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1AuditsListOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1AuditsListOK creates a V1AuditsListOK with default headers values +func NewV1AuditsListOK() *V1AuditsListOK { + return &V1AuditsListOK{} +} + +/* +V1AuditsListOK handles this case with default header values. + +(empty) +*/ +type V1AuditsListOK struct { + Payload *models.V1Audits +} + +func (o *V1AuditsListOK) Error() string { + return fmt.Sprintf("[GET /v1/audits][%d] v1AuditsListOK %+v", 200, o.Payload) +} + +func (o *V1AuditsListOK) GetPayload() *models.V1Audits { + return o.Payload +} + +func (o *V1AuditsListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1Audits) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_audits_uid_get_parameters.go b/api/client/v1/v1_audits_uid_get_parameters.go new file mode 100644 index 00000000..d2528bc5 --- /dev/null +++ b/api/client/v1/v1_audits_uid_get_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1AuditsUIDGetParams creates a new V1AuditsUIDGetParams object +// with the default values initialized. +func NewV1AuditsUIDGetParams() *V1AuditsUIDGetParams { + var () + return &V1AuditsUIDGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1AuditsUIDGetParamsWithTimeout creates a new V1AuditsUIDGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1AuditsUIDGetParamsWithTimeout(timeout time.Duration) *V1AuditsUIDGetParams { + var () + return &V1AuditsUIDGetParams{ + + timeout: timeout, + } +} + +// NewV1AuditsUIDGetParamsWithContext creates a new V1AuditsUIDGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1AuditsUIDGetParamsWithContext(ctx context.Context) *V1AuditsUIDGetParams { + var () + return &V1AuditsUIDGetParams{ + + Context: ctx, + } +} + +// NewV1AuditsUIDGetParamsWithHTTPClient creates a new V1AuditsUIDGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1AuditsUIDGetParamsWithHTTPClient(client *http.Client) *V1AuditsUIDGetParams { + var () + return &V1AuditsUIDGetParams{ + HTTPClient: client, + } +} + +/* +V1AuditsUIDGetParams contains all the parameters to send to the API endpoint +for the v1 audits Uid get operation typically these are written to a http.Request +*/ +type V1AuditsUIDGetParams struct { + + /*UID + Specify the audit uid + + */ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 audits Uid get params +func (o *V1AuditsUIDGetParams) WithTimeout(timeout time.Duration) *V1AuditsUIDGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 audits Uid get params +func (o *V1AuditsUIDGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 audits Uid get params +func (o *V1AuditsUIDGetParams) WithContext(ctx context.Context) *V1AuditsUIDGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 audits Uid get params +func (o *V1AuditsUIDGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 audits Uid get params +func (o *V1AuditsUIDGetParams) WithHTTPClient(client *http.Client) *V1AuditsUIDGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 audits Uid get params +func (o *V1AuditsUIDGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithUID adds the uid to the v1 audits Uid get params +func (o *V1AuditsUIDGetParams) WithUID(uid string) *V1AuditsUIDGetParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 audits Uid get params +func (o *V1AuditsUIDGetParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1AuditsUIDGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_audits_uid_get_responses.go b/api/client/v1/v1_audits_uid_get_responses.go new file mode 100644 index 00000000..4837ea59 --- /dev/null +++ b/api/client/v1/v1_audits_uid_get_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1AuditsUIDGetReader is a Reader for the V1AuditsUIDGet structure. +type V1AuditsUIDGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1AuditsUIDGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1AuditsUIDGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1AuditsUIDGetOK creates a V1AuditsUIDGetOK with default headers values +func NewV1AuditsUIDGetOK() *V1AuditsUIDGetOK { + return &V1AuditsUIDGetOK{} +} + +/* +V1AuditsUIDGetOK handles this case with default header values. + +(empty) +*/ +type V1AuditsUIDGetOK struct { + Payload *models.V1Audit +} + +func (o *V1AuditsUIDGetOK) Error() string { + return fmt.Sprintf("[GET /v1/audits/{uid}][%d] v1AuditsUidGetOK %+v", 200, o.Payload) +} + +func (o *V1AuditsUIDGetOK) GetPayload() *models.V1Audit { + return o.Payload +} + +func (o *V1AuditsUIDGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1Audit) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_audits_uid_get_sys_msg_parameters.go b/api/client/v1/v1_audits_uid_get_sys_msg_parameters.go new file mode 100644 index 00000000..0f79503f --- /dev/null +++ b/api/client/v1/v1_audits_uid_get_sys_msg_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1AuditsUIDGetSysMsgParams creates a new V1AuditsUIDGetSysMsgParams object +// with the default values initialized. +func NewV1AuditsUIDGetSysMsgParams() *V1AuditsUIDGetSysMsgParams { + var () + return &V1AuditsUIDGetSysMsgParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1AuditsUIDGetSysMsgParamsWithTimeout creates a new V1AuditsUIDGetSysMsgParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1AuditsUIDGetSysMsgParamsWithTimeout(timeout time.Duration) *V1AuditsUIDGetSysMsgParams { + var () + return &V1AuditsUIDGetSysMsgParams{ + + timeout: timeout, + } +} + +// NewV1AuditsUIDGetSysMsgParamsWithContext creates a new V1AuditsUIDGetSysMsgParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1AuditsUIDGetSysMsgParamsWithContext(ctx context.Context) *V1AuditsUIDGetSysMsgParams { + var () + return &V1AuditsUIDGetSysMsgParams{ + + Context: ctx, + } +} + +// NewV1AuditsUIDGetSysMsgParamsWithHTTPClient creates a new V1AuditsUIDGetSysMsgParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1AuditsUIDGetSysMsgParamsWithHTTPClient(client *http.Client) *V1AuditsUIDGetSysMsgParams { + var () + return &V1AuditsUIDGetSysMsgParams{ + HTTPClient: client, + } +} + +/* +V1AuditsUIDGetSysMsgParams contains all the parameters to send to the API endpoint +for the v1 audits Uid get sys msg operation typically these are written to a http.Request +*/ +type V1AuditsUIDGetSysMsgParams struct { + + /*UID + Specify the audit uid + + */ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 audits Uid get sys msg params +func (o *V1AuditsUIDGetSysMsgParams) WithTimeout(timeout time.Duration) *V1AuditsUIDGetSysMsgParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 audits Uid get sys msg params +func (o *V1AuditsUIDGetSysMsgParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 audits Uid get sys msg params +func (o *V1AuditsUIDGetSysMsgParams) WithContext(ctx context.Context) *V1AuditsUIDGetSysMsgParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 audits Uid get sys msg params +func (o *V1AuditsUIDGetSysMsgParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 audits Uid get sys msg params +func (o *V1AuditsUIDGetSysMsgParams) WithHTTPClient(client *http.Client) *V1AuditsUIDGetSysMsgParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 audits Uid get sys msg params +func (o *V1AuditsUIDGetSysMsgParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithUID adds the uid to the v1 audits Uid get sys msg params +func (o *V1AuditsUIDGetSysMsgParams) WithUID(uid string) *V1AuditsUIDGetSysMsgParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 audits Uid get sys msg params +func (o *V1AuditsUIDGetSysMsgParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1AuditsUIDGetSysMsgParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_audits_uid_get_sys_msg_responses.go b/api/client/v1/v1_audits_uid_get_sys_msg_responses.go new file mode 100644 index 00000000..de7ce494 --- /dev/null +++ b/api/client/v1/v1_audits_uid_get_sys_msg_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1AuditsUIDGetSysMsgReader is a Reader for the V1AuditsUIDGetSysMsg structure. +type V1AuditsUIDGetSysMsgReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1AuditsUIDGetSysMsgReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1AuditsUIDGetSysMsgOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1AuditsUIDGetSysMsgOK creates a V1AuditsUIDGetSysMsgOK with default headers values +func NewV1AuditsUIDGetSysMsgOK() *V1AuditsUIDGetSysMsgOK { + return &V1AuditsUIDGetSysMsgOK{} +} + +/* +V1AuditsUIDGetSysMsgOK handles this case with default header values. + +(empty) +*/ +type V1AuditsUIDGetSysMsgOK struct { + Payload *models.V1AuditSysMsg +} + +func (o *V1AuditsUIDGetSysMsgOK) Error() string { + return fmt.Sprintf("[GET /v1/audits/{uid}/sysMsg][%d] v1AuditsUidGetSysMsgOK %+v", 200, o.Payload) +} + +func (o *V1AuditsUIDGetSysMsgOK) GetPayload() *models.V1AuditSysMsg { + return o.Payload +} + +func (o *V1AuditsUIDGetSysMsgOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1AuditSysMsg) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_audits_uid_msg_update_parameters.go b/api/client/v1/v1_audits_uid_msg_update_parameters.go new file mode 100644 index 00000000..d3905b8e --- /dev/null +++ b/api/client/v1/v1_audits_uid_msg_update_parameters.go @@ -0,0 +1,157 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1AuditsUIDMsgUpdateParams creates a new V1AuditsUIDMsgUpdateParams object +// with the default values initialized. +func NewV1AuditsUIDMsgUpdateParams() *V1AuditsUIDMsgUpdateParams { + var () + return &V1AuditsUIDMsgUpdateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1AuditsUIDMsgUpdateParamsWithTimeout creates a new V1AuditsUIDMsgUpdateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1AuditsUIDMsgUpdateParamsWithTimeout(timeout time.Duration) *V1AuditsUIDMsgUpdateParams { + var () + return &V1AuditsUIDMsgUpdateParams{ + + timeout: timeout, + } +} + +// NewV1AuditsUIDMsgUpdateParamsWithContext creates a new V1AuditsUIDMsgUpdateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1AuditsUIDMsgUpdateParamsWithContext(ctx context.Context) *V1AuditsUIDMsgUpdateParams { + var () + return &V1AuditsUIDMsgUpdateParams{ + + Context: ctx, + } +} + +// NewV1AuditsUIDMsgUpdateParamsWithHTTPClient creates a new V1AuditsUIDMsgUpdateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1AuditsUIDMsgUpdateParamsWithHTTPClient(client *http.Client) *V1AuditsUIDMsgUpdateParams { + var () + return &V1AuditsUIDMsgUpdateParams{ + HTTPClient: client, + } +} + +/* +V1AuditsUIDMsgUpdateParams contains all the parameters to send to the API endpoint +for the v1 audits Uid msg update operation typically these are written to a http.Request +*/ +type V1AuditsUIDMsgUpdateParams struct { + + /*Body*/ + Body *models.V1AuditMsgUpdate + /*UID + Specify the audit uid + + */ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 audits Uid msg update params +func (o *V1AuditsUIDMsgUpdateParams) WithTimeout(timeout time.Duration) *V1AuditsUIDMsgUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 audits Uid msg update params +func (o *V1AuditsUIDMsgUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 audits Uid msg update params +func (o *V1AuditsUIDMsgUpdateParams) WithContext(ctx context.Context) *V1AuditsUIDMsgUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 audits Uid msg update params +func (o *V1AuditsUIDMsgUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 audits Uid msg update params +func (o *V1AuditsUIDMsgUpdateParams) WithHTTPClient(client *http.Client) *V1AuditsUIDMsgUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 audits Uid msg update params +func (o *V1AuditsUIDMsgUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 audits Uid msg update params +func (o *V1AuditsUIDMsgUpdateParams) WithBody(body *models.V1AuditMsgUpdate) *V1AuditsUIDMsgUpdateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 audits Uid msg update params +func (o *V1AuditsUIDMsgUpdateParams) SetBody(body *models.V1AuditMsgUpdate) { + o.Body = body +} + +// WithUID adds the uid to the v1 audits Uid msg update params +func (o *V1AuditsUIDMsgUpdateParams) WithUID(uid string) *V1AuditsUIDMsgUpdateParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 audits Uid msg update params +func (o *V1AuditsUIDMsgUpdateParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1AuditsUIDMsgUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_audits_uid_msg_update_responses.go b/api/client/v1/v1_audits_uid_msg_update_responses.go new file mode 100644 index 00000000..195ed22e --- /dev/null +++ b/api/client/v1/v1_audits_uid_msg_update_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1AuditsUIDMsgUpdateReader is a Reader for the V1AuditsUIDMsgUpdate structure. +type V1AuditsUIDMsgUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1AuditsUIDMsgUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1AuditsUIDMsgUpdateNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1AuditsUIDMsgUpdateNoContent creates a V1AuditsUIDMsgUpdateNoContent with default headers values +func NewV1AuditsUIDMsgUpdateNoContent() *V1AuditsUIDMsgUpdateNoContent { + return &V1AuditsUIDMsgUpdateNoContent{} +} + +/* +V1AuditsUIDMsgUpdateNoContent handles this case with default header values. + +The resource was updated successfully +*/ +type V1AuditsUIDMsgUpdateNoContent struct { +} + +func (o *V1AuditsUIDMsgUpdateNoContent) Error() string { + return fmt.Sprintf("[PATCH /v1/audits/{uid}/userMsg][%d] v1AuditsUidMsgUpdateNoContent ", 204) +} + +func (o *V1AuditsUIDMsgUpdateNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_auth_org_parameters.go b/api/client/v1/v1_auth_org_parameters.go new file mode 100644 index 00000000..1a604665 --- /dev/null +++ b/api/client/v1/v1_auth_org_parameters.go @@ -0,0 +1,144 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1AuthOrgParams creates a new V1AuthOrgParams object +// with the default values initialized. +func NewV1AuthOrgParams() *V1AuthOrgParams { + var () + return &V1AuthOrgParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1AuthOrgParamsWithTimeout creates a new V1AuthOrgParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1AuthOrgParamsWithTimeout(timeout time.Duration) *V1AuthOrgParams { + var () + return &V1AuthOrgParams{ + + timeout: timeout, + } +} + +// NewV1AuthOrgParamsWithContext creates a new V1AuthOrgParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1AuthOrgParamsWithContext(ctx context.Context) *V1AuthOrgParams { + var () + return &V1AuthOrgParams{ + + Context: ctx, + } +} + +// NewV1AuthOrgParamsWithHTTPClient creates a new V1AuthOrgParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1AuthOrgParamsWithHTTPClient(client *http.Client) *V1AuthOrgParams { + var () + return &V1AuthOrgParams{ + HTTPClient: client, + } +} + +/* +V1AuthOrgParams contains all the parameters to send to the API endpoint +for the v1 auth org operation typically these are written to a http.Request +*/ +type V1AuthOrgParams struct { + + /*OrgName*/ + OrgName *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 auth org params +func (o *V1AuthOrgParams) WithTimeout(timeout time.Duration) *V1AuthOrgParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 auth org params +func (o *V1AuthOrgParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 auth org params +func (o *V1AuthOrgParams) WithContext(ctx context.Context) *V1AuthOrgParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 auth org params +func (o *V1AuthOrgParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 auth org params +func (o *V1AuthOrgParams) WithHTTPClient(client *http.Client) *V1AuthOrgParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 auth org params +func (o *V1AuthOrgParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithOrgName adds the orgName to the v1 auth org params +func (o *V1AuthOrgParams) WithOrgName(orgName *string) *V1AuthOrgParams { + o.SetOrgName(orgName) + return o +} + +// SetOrgName adds the orgName to the v1 auth org params +func (o *V1AuthOrgParams) SetOrgName(orgName *string) { + o.OrgName = orgName +} + +// WriteToRequest writes these params to a swagger request +func (o *V1AuthOrgParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.OrgName != nil { + + // query param orgName + var qrOrgName string + if o.OrgName != nil { + qrOrgName = *o.OrgName + } + qOrgName := qrOrgName + if qOrgName != "" { + if err := r.SetQueryParam("orgName", qOrgName); err != nil { + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_auth_org_responses.go b/api/client/v1/v1_auth_org_responses.go new file mode 100644 index 00000000..b9b6cd17 --- /dev/null +++ b/api/client/v1/v1_auth_org_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1AuthOrgReader is a Reader for the V1AuthOrg structure. +type V1AuthOrgReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1AuthOrgReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1AuthOrgOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1AuthOrgOK creates a V1AuthOrgOK with default headers values +func NewV1AuthOrgOK() *V1AuthOrgOK { + return &V1AuthOrgOK{} +} + +/* +V1AuthOrgOK handles this case with default header values. + +OK +*/ +type V1AuthOrgOK struct { + Payload *models.V1LoginResponse +} + +func (o *V1AuthOrgOK) Error() string { + return fmt.Sprintf("[GET /v1/auth/org][%d] v1AuthOrgOK %+v", 200, o.Payload) +} + +func (o *V1AuthOrgOK) GetPayload() *models.V1LoginResponse { + return o.Payload +} + +func (o *V1AuthOrgOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1LoginResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_auth_org_switch_parameters.go b/api/client/v1/v1_auth_org_switch_parameters.go new file mode 100644 index 00000000..08a41f97 --- /dev/null +++ b/api/client/v1/v1_auth_org_switch_parameters.go @@ -0,0 +1,181 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// NewV1AuthOrgSwitchParams creates a new V1AuthOrgSwitchParams object +// with the default values initialized. +func NewV1AuthOrgSwitchParams() *V1AuthOrgSwitchParams { + var ( + setCookieDefault = bool(true) + ) + return &V1AuthOrgSwitchParams{ + SetCookie: &setCookieDefault, + + timeout: cr.DefaultTimeout, + } +} + +// NewV1AuthOrgSwitchParamsWithTimeout creates a new V1AuthOrgSwitchParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1AuthOrgSwitchParamsWithTimeout(timeout time.Duration) *V1AuthOrgSwitchParams { + var ( + setCookieDefault = bool(true) + ) + return &V1AuthOrgSwitchParams{ + SetCookie: &setCookieDefault, + + timeout: timeout, + } +} + +// NewV1AuthOrgSwitchParamsWithContext creates a new V1AuthOrgSwitchParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1AuthOrgSwitchParamsWithContext(ctx context.Context) *V1AuthOrgSwitchParams { + var ( + setCookieDefault = bool(true) + ) + return &V1AuthOrgSwitchParams{ + SetCookie: &setCookieDefault, + + Context: ctx, + } +} + +// NewV1AuthOrgSwitchParamsWithHTTPClient creates a new V1AuthOrgSwitchParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1AuthOrgSwitchParamsWithHTTPClient(client *http.Client) *V1AuthOrgSwitchParams { + var ( + setCookieDefault = bool(true) + ) + return &V1AuthOrgSwitchParams{ + SetCookie: &setCookieDefault, + HTTPClient: client, + } +} + +/* +V1AuthOrgSwitchParams contains all the parameters to send to the API endpoint +for the v1 auth org switch operation typically these are written to a http.Request +*/ +type V1AuthOrgSwitchParams struct { + + /*OrgName + Organization name for which switch request has to be created + + */ + OrgName string + /*SetCookie + Describes a way to set cookie from backend for switched organization + + */ + SetCookie *bool + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 auth org switch params +func (o *V1AuthOrgSwitchParams) WithTimeout(timeout time.Duration) *V1AuthOrgSwitchParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 auth org switch params +func (o *V1AuthOrgSwitchParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 auth org switch params +func (o *V1AuthOrgSwitchParams) WithContext(ctx context.Context) *V1AuthOrgSwitchParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 auth org switch params +func (o *V1AuthOrgSwitchParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 auth org switch params +func (o *V1AuthOrgSwitchParams) WithHTTPClient(client *http.Client) *V1AuthOrgSwitchParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 auth org switch params +func (o *V1AuthOrgSwitchParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithOrgName adds the orgName to the v1 auth org switch params +func (o *V1AuthOrgSwitchParams) WithOrgName(orgName string) *V1AuthOrgSwitchParams { + o.SetOrgName(orgName) + return o +} + +// SetOrgName adds the orgName to the v1 auth org switch params +func (o *V1AuthOrgSwitchParams) SetOrgName(orgName string) { + o.OrgName = orgName +} + +// WithSetCookie adds the setCookie to the v1 auth org switch params +func (o *V1AuthOrgSwitchParams) WithSetCookie(setCookie *bool) *V1AuthOrgSwitchParams { + o.SetSetCookie(setCookie) + return o +} + +// SetSetCookie adds the setCookie to the v1 auth org switch params +func (o *V1AuthOrgSwitchParams) SetSetCookie(setCookie *bool) { + o.SetCookie = setCookie +} + +// WriteToRequest writes these params to a swagger request +func (o *V1AuthOrgSwitchParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param orgName + if err := r.SetPathParam("orgName", o.OrgName); err != nil { + return err + } + + if o.SetCookie != nil { + + // query param setCookie + var qrSetCookie bool + if o.SetCookie != nil { + qrSetCookie = *o.SetCookie + } + qSetCookie := swag.FormatBool(qrSetCookie) + if qSetCookie != "" { + if err := r.SetQueryParam("setCookie", qSetCookie); err != nil { + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_auth_org_switch_responses.go b/api/client/v1/v1_auth_org_switch_responses.go new file mode 100644 index 00000000..2e0c45a7 --- /dev/null +++ b/api/client/v1/v1_auth_org_switch_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1AuthOrgSwitchReader is a Reader for the V1AuthOrgSwitch structure. +type V1AuthOrgSwitchReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1AuthOrgSwitchReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1AuthOrgSwitchOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1AuthOrgSwitchOK creates a V1AuthOrgSwitchOK with default headers values +func NewV1AuthOrgSwitchOK() *V1AuthOrgSwitchOK { + return &V1AuthOrgSwitchOK{} +} + +/* +V1AuthOrgSwitchOK handles this case with default header values. + +OK +*/ +type V1AuthOrgSwitchOK struct { + Payload *models.V1UserToken +} + +func (o *V1AuthOrgSwitchOK) Error() string { + return fmt.Sprintf("[POST /v1/auth/org/{orgName}/switch][%d] v1AuthOrgSwitchOK %+v", 200, o.Payload) +} + +func (o *V1AuthOrgSwitchOK) GetPayload() *models.V1UserToken { + return o.Payload +} + +func (o *V1AuthOrgSwitchOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1UserToken) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_auth_orgs_parameters.go b/api/client/v1/v1_auth_orgs_parameters.go new file mode 100644 index 00000000..24aae0ec --- /dev/null +++ b/api/client/v1/v1_auth_orgs_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1AuthOrgsParams creates a new V1AuthOrgsParams object +// with the default values initialized. +func NewV1AuthOrgsParams() *V1AuthOrgsParams { + + return &V1AuthOrgsParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1AuthOrgsParamsWithTimeout creates a new V1AuthOrgsParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1AuthOrgsParamsWithTimeout(timeout time.Duration) *V1AuthOrgsParams { + + return &V1AuthOrgsParams{ + + timeout: timeout, + } +} + +// NewV1AuthOrgsParamsWithContext creates a new V1AuthOrgsParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1AuthOrgsParamsWithContext(ctx context.Context) *V1AuthOrgsParams { + + return &V1AuthOrgsParams{ + + Context: ctx, + } +} + +// NewV1AuthOrgsParamsWithHTTPClient creates a new V1AuthOrgsParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1AuthOrgsParamsWithHTTPClient(client *http.Client) *V1AuthOrgsParams { + + return &V1AuthOrgsParams{ + HTTPClient: client, + } +} + +/* +V1AuthOrgsParams contains all the parameters to send to the API endpoint +for the v1 auth orgs operation typically these are written to a http.Request +*/ +type V1AuthOrgsParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 auth orgs params +func (o *V1AuthOrgsParams) WithTimeout(timeout time.Duration) *V1AuthOrgsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 auth orgs params +func (o *V1AuthOrgsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 auth orgs params +func (o *V1AuthOrgsParams) WithContext(ctx context.Context) *V1AuthOrgsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 auth orgs params +func (o *V1AuthOrgsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 auth orgs params +func (o *V1AuthOrgsParams) WithHTTPClient(client *http.Client) *V1AuthOrgsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 auth orgs params +func (o *V1AuthOrgsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *V1AuthOrgsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_auth_orgs_responses.go b/api/client/v1/v1_auth_orgs_responses.go new file mode 100644 index 00000000..a6805c0e --- /dev/null +++ b/api/client/v1/v1_auth_orgs_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1AuthOrgsReader is a Reader for the V1AuthOrgs structure. +type V1AuthOrgsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1AuthOrgsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1AuthOrgsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1AuthOrgsOK creates a V1AuthOrgsOK with default headers values +func NewV1AuthOrgsOK() *V1AuthOrgsOK { + return &V1AuthOrgsOK{} +} + +/* +V1AuthOrgsOK handles this case with default header values. + +OK +*/ +type V1AuthOrgsOK struct { + Payload *models.V1Organizations +} + +func (o *V1AuthOrgsOK) Error() string { + return fmt.Sprintf("[GET /v1/auth/orgs][%d] v1AuthOrgsOK %+v", 200, o.Payload) +} + +func (o *V1AuthOrgsOK) GetPayload() *models.V1Organizations { + return o.Payload +} + +func (o *V1AuthOrgsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1Organizations) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_auth_refresh_parameters.go b/api/client/v1/v1_auth_refresh_parameters.go new file mode 100644 index 00000000..4a275144 --- /dev/null +++ b/api/client/v1/v1_auth_refresh_parameters.go @@ -0,0 +1,181 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// NewV1AuthRefreshParams creates a new V1AuthRefreshParams object +// with the default values initialized. +func NewV1AuthRefreshParams() *V1AuthRefreshParams { + var ( + setCookieDefault = bool(true) + ) + return &V1AuthRefreshParams{ + SetCookie: &setCookieDefault, + + timeout: cr.DefaultTimeout, + } +} + +// NewV1AuthRefreshParamsWithTimeout creates a new V1AuthRefreshParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1AuthRefreshParamsWithTimeout(timeout time.Duration) *V1AuthRefreshParams { + var ( + setCookieDefault = bool(true) + ) + return &V1AuthRefreshParams{ + SetCookie: &setCookieDefault, + + timeout: timeout, + } +} + +// NewV1AuthRefreshParamsWithContext creates a new V1AuthRefreshParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1AuthRefreshParamsWithContext(ctx context.Context) *V1AuthRefreshParams { + var ( + setCookieDefault = bool(true) + ) + return &V1AuthRefreshParams{ + SetCookie: &setCookieDefault, + + Context: ctx, + } +} + +// NewV1AuthRefreshParamsWithHTTPClient creates a new V1AuthRefreshParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1AuthRefreshParamsWithHTTPClient(client *http.Client) *V1AuthRefreshParams { + var ( + setCookieDefault = bool(true) + ) + return &V1AuthRefreshParams{ + SetCookie: &setCookieDefault, + HTTPClient: client, + } +} + +/* +V1AuthRefreshParams contains all the parameters to send to the API endpoint +for the v1 auth refresh operation typically these are written to a http.Request +*/ +type V1AuthRefreshParams struct { + + /*SetCookie + Describes a way to set cookie from backend. + + */ + SetCookie *bool + /*Token + Non expired Authorization token + + */ + Token string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 auth refresh params +func (o *V1AuthRefreshParams) WithTimeout(timeout time.Duration) *V1AuthRefreshParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 auth refresh params +func (o *V1AuthRefreshParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 auth refresh params +func (o *V1AuthRefreshParams) WithContext(ctx context.Context) *V1AuthRefreshParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 auth refresh params +func (o *V1AuthRefreshParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 auth refresh params +func (o *V1AuthRefreshParams) WithHTTPClient(client *http.Client) *V1AuthRefreshParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 auth refresh params +func (o *V1AuthRefreshParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithSetCookie adds the setCookie to the v1 auth refresh params +func (o *V1AuthRefreshParams) WithSetCookie(setCookie *bool) *V1AuthRefreshParams { + o.SetSetCookie(setCookie) + return o +} + +// SetSetCookie adds the setCookie to the v1 auth refresh params +func (o *V1AuthRefreshParams) SetSetCookie(setCookie *bool) { + o.SetCookie = setCookie +} + +// WithToken adds the token to the v1 auth refresh params +func (o *V1AuthRefreshParams) WithToken(token string) *V1AuthRefreshParams { + o.SetToken(token) + return o +} + +// SetToken adds the token to the v1 auth refresh params +func (o *V1AuthRefreshParams) SetToken(token string) { + o.Token = token +} + +// WriteToRequest writes these params to a swagger request +func (o *V1AuthRefreshParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.SetCookie != nil { + + // query param setCookie + var qrSetCookie bool + if o.SetCookie != nil { + qrSetCookie = *o.SetCookie + } + qSetCookie := swag.FormatBool(qrSetCookie) + if qSetCookie != "" { + if err := r.SetQueryParam("setCookie", qSetCookie); err != nil { + return err + } + } + + } + + // path param token + if err := r.SetPathParam("token", o.Token); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_auth_refresh_responses.go b/api/client/v1/v1_auth_refresh_responses.go new file mode 100644 index 00000000..39c6ae60 --- /dev/null +++ b/api/client/v1/v1_auth_refresh_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1AuthRefreshReader is a Reader for the V1AuthRefresh structure. +type V1AuthRefreshReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1AuthRefreshReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1AuthRefreshOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1AuthRefreshOK creates a V1AuthRefreshOK with default headers values +func NewV1AuthRefreshOK() *V1AuthRefreshOK { + return &V1AuthRefreshOK{} +} + +/* +V1AuthRefreshOK handles this case with default header values. + +OK +*/ +type V1AuthRefreshOK struct { + Payload *models.V1UserToken +} + +func (o *V1AuthRefreshOK) Error() string { + return fmt.Sprintf("[GET /v1/auth/refresh/{token}][%d] v1AuthRefreshOK %+v", 200, o.Payload) +} + +func (o *V1AuthRefreshOK) GetPayload() *models.V1UserToken { + return o.Payload +} + +func (o *V1AuthRefreshOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1UserToken) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_auth_sso_providers_parameters.go b/api/client/v1/v1_auth_sso_providers_parameters.go new file mode 100644 index 00000000..ea46f862 --- /dev/null +++ b/api/client/v1/v1_auth_sso_providers_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1AuthSsoProvidersParams creates a new V1AuthSsoProvidersParams object +// with the default values initialized. +func NewV1AuthSsoProvidersParams() *V1AuthSsoProvidersParams { + + return &V1AuthSsoProvidersParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1AuthSsoProvidersParamsWithTimeout creates a new V1AuthSsoProvidersParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1AuthSsoProvidersParamsWithTimeout(timeout time.Duration) *V1AuthSsoProvidersParams { + + return &V1AuthSsoProvidersParams{ + + timeout: timeout, + } +} + +// NewV1AuthSsoProvidersParamsWithContext creates a new V1AuthSsoProvidersParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1AuthSsoProvidersParamsWithContext(ctx context.Context) *V1AuthSsoProvidersParams { + + return &V1AuthSsoProvidersParams{ + + Context: ctx, + } +} + +// NewV1AuthSsoProvidersParamsWithHTTPClient creates a new V1AuthSsoProvidersParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1AuthSsoProvidersParamsWithHTTPClient(client *http.Client) *V1AuthSsoProvidersParams { + + return &V1AuthSsoProvidersParams{ + HTTPClient: client, + } +} + +/* +V1AuthSsoProvidersParams contains all the parameters to send to the API endpoint +for the v1 auth sso providers operation typically these are written to a http.Request +*/ +type V1AuthSsoProvidersParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 auth sso providers params +func (o *V1AuthSsoProvidersParams) WithTimeout(timeout time.Duration) *V1AuthSsoProvidersParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 auth sso providers params +func (o *V1AuthSsoProvidersParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 auth sso providers params +func (o *V1AuthSsoProvidersParams) WithContext(ctx context.Context) *V1AuthSsoProvidersParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 auth sso providers params +func (o *V1AuthSsoProvidersParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 auth sso providers params +func (o *V1AuthSsoProvidersParams) WithHTTPClient(client *http.Client) *V1AuthSsoProvidersParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 auth sso providers params +func (o *V1AuthSsoProvidersParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *V1AuthSsoProvidersParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_auth_sso_providers_responses.go b/api/client/v1/v1_auth_sso_providers_responses.go new file mode 100644 index 00000000..45ae6e46 --- /dev/null +++ b/api/client/v1/v1_auth_sso_providers_responses.go @@ -0,0 +1,68 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1AuthSsoProvidersReader is a Reader for the V1AuthSsoProviders structure. +type V1AuthSsoProvidersReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1AuthSsoProvidersReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1AuthSsoProvidersOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1AuthSsoProvidersOK creates a V1AuthSsoProvidersOK with default headers values +func NewV1AuthSsoProvidersOK() *V1AuthSsoProvidersOK { + return &V1AuthSsoProvidersOK{} +} + +/* +V1AuthSsoProvidersOK handles this case with default header values. + +(empty) +*/ +type V1AuthSsoProvidersOK struct { + Payload models.V1SsoLogins +} + +func (o *V1AuthSsoProvidersOK) Error() string { + return fmt.Sprintf("[GET /v1/auth/sso/providers][%d] v1AuthSsoProvidersOK %+v", 200, o.Payload) +} + +func (o *V1AuthSsoProvidersOK) GetPayload() models.V1SsoLogins { + return o.Payload +} + +func (o *V1AuthSsoProvidersOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_auth_user_org_forgot_parameters.go b/api/client/v1/v1_auth_user_org_forgot_parameters.go new file mode 100644 index 00000000..94c18bb3 --- /dev/null +++ b/api/client/v1/v1_auth_user_org_forgot_parameters.go @@ -0,0 +1,140 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1AuthUserOrgForgotParams creates a new V1AuthUserOrgForgotParams object +// with the default values initialized. +func NewV1AuthUserOrgForgotParams() *V1AuthUserOrgForgotParams { + var () + return &V1AuthUserOrgForgotParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1AuthUserOrgForgotParamsWithTimeout creates a new V1AuthUserOrgForgotParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1AuthUserOrgForgotParamsWithTimeout(timeout time.Duration) *V1AuthUserOrgForgotParams { + var () + return &V1AuthUserOrgForgotParams{ + + timeout: timeout, + } +} + +// NewV1AuthUserOrgForgotParamsWithContext creates a new V1AuthUserOrgForgotParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1AuthUserOrgForgotParamsWithContext(ctx context.Context) *V1AuthUserOrgForgotParams { + var () + return &V1AuthUserOrgForgotParams{ + + Context: ctx, + } +} + +// NewV1AuthUserOrgForgotParamsWithHTTPClient creates a new V1AuthUserOrgForgotParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1AuthUserOrgForgotParamsWithHTTPClient(client *http.Client) *V1AuthUserOrgForgotParams { + var () + return &V1AuthUserOrgForgotParams{ + HTTPClient: client, + } +} + +/* +V1AuthUserOrgForgotParams contains all the parameters to send to the API endpoint +for the v1 auth user org forgot operation typically these are written to a http.Request +*/ +type V1AuthUserOrgForgotParams struct { + + /*EmailID + Describes user's email id for sending organzation(s) details via email. + + */ + EmailID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 auth user org forgot params +func (o *V1AuthUserOrgForgotParams) WithTimeout(timeout time.Duration) *V1AuthUserOrgForgotParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 auth user org forgot params +func (o *V1AuthUserOrgForgotParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 auth user org forgot params +func (o *V1AuthUserOrgForgotParams) WithContext(ctx context.Context) *V1AuthUserOrgForgotParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 auth user org forgot params +func (o *V1AuthUserOrgForgotParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 auth user org forgot params +func (o *V1AuthUserOrgForgotParams) WithHTTPClient(client *http.Client) *V1AuthUserOrgForgotParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 auth user org forgot params +func (o *V1AuthUserOrgForgotParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithEmailID adds the emailID to the v1 auth user org forgot params +func (o *V1AuthUserOrgForgotParams) WithEmailID(emailID string) *V1AuthUserOrgForgotParams { + o.SetEmailID(emailID) + return o +} + +// SetEmailID adds the emailId to the v1 auth user org forgot params +func (o *V1AuthUserOrgForgotParams) SetEmailID(emailID string) { + o.EmailID = emailID +} + +// WriteToRequest writes these params to a swagger request +func (o *V1AuthUserOrgForgotParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // query param emailId + qrEmailID := o.EmailID + qEmailID := qrEmailID + if qEmailID != "" { + if err := r.SetQueryParam("emailId", qEmailID); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_auth_user_org_forgot_responses.go b/api/client/v1/v1_auth_user_org_forgot_responses.go new file mode 100644 index 00000000..d628bc7b --- /dev/null +++ b/api/client/v1/v1_auth_user_org_forgot_responses.go @@ -0,0 +1,61 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1AuthUserOrgForgotReader is a Reader for the V1AuthUserOrgForgot structure. +type V1AuthUserOrgForgotReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1AuthUserOrgForgotReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1AuthUserOrgForgotNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1AuthUserOrgForgotNoContent creates a V1AuthUserOrgForgotNoContent with default headers values +func NewV1AuthUserOrgForgotNoContent() *V1AuthUserOrgForgotNoContent { + return &V1AuthUserOrgForgotNoContent{} +} + +/* +V1AuthUserOrgForgotNoContent handles this case with default header values. + +Ok response without content +*/ +type V1AuthUserOrgForgotNoContent struct { + /*Audit uid for the request + */ + AuditUID string +} + +func (o *V1AuthUserOrgForgotNoContent) Error() string { + return fmt.Sprintf("[GET /v1/auth/user/org/forgot][%d] v1AuthUserOrgForgotNoContent ", 204) +} + +func (o *V1AuthUserOrgForgotNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header AuditUid + o.AuditUID = response.GetHeader("AuditUid") + + return nil +} diff --git a/api/client/v1/v1_authenticate_parameters.go b/api/client/v1/v1_authenticate_parameters.go new file mode 100644 index 00000000..e3c955b9 --- /dev/null +++ b/api/client/v1/v1_authenticate_parameters.go @@ -0,0 +1,184 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1AuthenticateParams creates a new V1AuthenticateParams object +// with the default values initialized. +func NewV1AuthenticateParams() *V1AuthenticateParams { + var ( + setCookieDefault = bool(true) + ) + return &V1AuthenticateParams{ + SetCookie: &setCookieDefault, + + timeout: cr.DefaultTimeout, + } +} + +// NewV1AuthenticateParamsWithTimeout creates a new V1AuthenticateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1AuthenticateParamsWithTimeout(timeout time.Duration) *V1AuthenticateParams { + var ( + setCookieDefault = bool(true) + ) + return &V1AuthenticateParams{ + SetCookie: &setCookieDefault, + + timeout: timeout, + } +} + +// NewV1AuthenticateParamsWithContext creates a new V1AuthenticateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1AuthenticateParamsWithContext(ctx context.Context) *V1AuthenticateParams { + var ( + setCookieDefault = bool(true) + ) + return &V1AuthenticateParams{ + SetCookie: &setCookieDefault, + + Context: ctx, + } +} + +// NewV1AuthenticateParamsWithHTTPClient creates a new V1AuthenticateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1AuthenticateParamsWithHTTPClient(client *http.Client) *V1AuthenticateParams { + var ( + setCookieDefault = bool(true) + ) + return &V1AuthenticateParams{ + SetCookie: &setCookieDefault, + HTTPClient: client, + } +} + +/* +V1AuthenticateParams contains all the parameters to send to the API endpoint +for the v1 authenticate operation typically these are written to a http.Request +*/ +type V1AuthenticateParams struct { + + /*Body + Describes the credential details required for authentication + + */ + Body *models.V1AuthLogin + /*SetCookie + Describes a way to set cookie from backend. + + */ + SetCookie *bool + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 authenticate params +func (o *V1AuthenticateParams) WithTimeout(timeout time.Duration) *V1AuthenticateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 authenticate params +func (o *V1AuthenticateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 authenticate params +func (o *V1AuthenticateParams) WithContext(ctx context.Context) *V1AuthenticateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 authenticate params +func (o *V1AuthenticateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 authenticate params +func (o *V1AuthenticateParams) WithHTTPClient(client *http.Client) *V1AuthenticateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 authenticate params +func (o *V1AuthenticateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 authenticate params +func (o *V1AuthenticateParams) WithBody(body *models.V1AuthLogin) *V1AuthenticateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 authenticate params +func (o *V1AuthenticateParams) SetBody(body *models.V1AuthLogin) { + o.Body = body +} + +// WithSetCookie adds the setCookie to the v1 authenticate params +func (o *V1AuthenticateParams) WithSetCookie(setCookie *bool) *V1AuthenticateParams { + o.SetSetCookie(setCookie) + return o +} + +// SetSetCookie adds the setCookie to the v1 authenticate params +func (o *V1AuthenticateParams) SetSetCookie(setCookie *bool) { + o.SetCookie = setCookie +} + +// WriteToRequest writes these params to a swagger request +func (o *V1AuthenticateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + if o.SetCookie != nil { + + // query param setCookie + var qrSetCookie bool + if o.SetCookie != nil { + qrSetCookie = *o.SetCookie + } + qSetCookie := swag.FormatBool(qrSetCookie) + if qSetCookie != "" { + if err := r.SetQueryParam("setCookie", qSetCookie); err != nil { + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_authenticate_responses.go b/api/client/v1/v1_authenticate_responses.go new file mode 100644 index 00000000..04dd5aab --- /dev/null +++ b/api/client/v1/v1_authenticate_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1AuthenticateReader is a Reader for the V1Authenticate structure. +type V1AuthenticateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1AuthenticateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1AuthenticateOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1AuthenticateOK creates a V1AuthenticateOK with default headers values +func NewV1AuthenticateOK() *V1AuthenticateOK { + return &V1AuthenticateOK{} +} + +/* +V1AuthenticateOK handles this case with default header values. + +OK +*/ +type V1AuthenticateOK struct { + Payload *models.V1UserToken +} + +func (o *V1AuthenticateOK) Error() string { + return fmt.Sprintf("[POST /v1/auth/authenticate][%d] v1AuthenticateOK %+v", 200, o.Payload) +} + +func (o *V1AuthenticateOK) GetPayload() *models.V1UserToken { + return o.Payload +} + +func (o *V1AuthenticateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1UserToken) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_aws_account_sts_get_parameters.go b/api/client/v1/v1_aws_account_sts_get_parameters.go new file mode 100644 index 00000000..a5e1604a --- /dev/null +++ b/api/client/v1/v1_aws_account_sts_get_parameters.go @@ -0,0 +1,159 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1AwsAccountStsGetParams creates a new V1AwsAccountStsGetParams object +// with the default values initialized. +func NewV1AwsAccountStsGetParams() *V1AwsAccountStsGetParams { + var ( + partitionDefault = string("aws") + ) + return &V1AwsAccountStsGetParams{ + Partition: &partitionDefault, + + timeout: cr.DefaultTimeout, + } +} + +// NewV1AwsAccountStsGetParamsWithTimeout creates a new V1AwsAccountStsGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1AwsAccountStsGetParamsWithTimeout(timeout time.Duration) *V1AwsAccountStsGetParams { + var ( + partitionDefault = string("aws") + ) + return &V1AwsAccountStsGetParams{ + Partition: &partitionDefault, + + timeout: timeout, + } +} + +// NewV1AwsAccountStsGetParamsWithContext creates a new V1AwsAccountStsGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1AwsAccountStsGetParamsWithContext(ctx context.Context) *V1AwsAccountStsGetParams { + var ( + partitionDefault = string("aws") + ) + return &V1AwsAccountStsGetParams{ + Partition: &partitionDefault, + + Context: ctx, + } +} + +// NewV1AwsAccountStsGetParamsWithHTTPClient creates a new V1AwsAccountStsGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1AwsAccountStsGetParamsWithHTTPClient(client *http.Client) *V1AwsAccountStsGetParams { + var ( + partitionDefault = string("aws") + ) + return &V1AwsAccountStsGetParams{ + Partition: &partitionDefault, + HTTPClient: client, + } +} + +/* +V1AwsAccountStsGetParams contains all the parameters to send to the API endpoint +for the v1 aws account sts get operation typically these are written to a http.Request +*/ +type V1AwsAccountStsGetParams struct { + + /*Partition + AWS accounts are scoped to a single partition. Allowed values [aws, aws-us-gov], Default values + + */ + Partition *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 aws account sts get params +func (o *V1AwsAccountStsGetParams) WithTimeout(timeout time.Duration) *V1AwsAccountStsGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 aws account sts get params +func (o *V1AwsAccountStsGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 aws account sts get params +func (o *V1AwsAccountStsGetParams) WithContext(ctx context.Context) *V1AwsAccountStsGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 aws account sts get params +func (o *V1AwsAccountStsGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 aws account sts get params +func (o *V1AwsAccountStsGetParams) WithHTTPClient(client *http.Client) *V1AwsAccountStsGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 aws account sts get params +func (o *V1AwsAccountStsGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithPartition adds the partition to the v1 aws account sts get params +func (o *V1AwsAccountStsGetParams) WithPartition(partition *string) *V1AwsAccountStsGetParams { + o.SetPartition(partition) + return o +} + +// SetPartition adds the partition to the v1 aws account sts get params +func (o *V1AwsAccountStsGetParams) SetPartition(partition *string) { + o.Partition = partition +} + +// WriteToRequest writes these params to a swagger request +func (o *V1AwsAccountStsGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Partition != nil { + + // query param partition + var qrPartition string + if o.Partition != nil { + qrPartition = *o.Partition + } + qPartition := qrPartition + if qPartition != "" { + if err := r.SetQueryParam("partition", qPartition); err != nil { + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_aws_account_sts_get_responses.go b/api/client/v1/v1_aws_account_sts_get_responses.go new file mode 100644 index 00000000..a9485e9f --- /dev/null +++ b/api/client/v1/v1_aws_account_sts_get_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1AwsAccountStsGetReader is a Reader for the V1AwsAccountStsGet structure. +type V1AwsAccountStsGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1AwsAccountStsGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1AwsAccountStsGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1AwsAccountStsGetOK creates a V1AwsAccountStsGetOK with default headers values +func NewV1AwsAccountStsGetOK() *V1AwsAccountStsGetOK { + return &V1AwsAccountStsGetOK{} +} + +/* +V1AwsAccountStsGetOK handles this case with default header values. + +(empty) +*/ +type V1AwsAccountStsGetOK struct { + Payload *models.V1AwsAccountSts +} + +func (o *V1AwsAccountStsGetOK) Error() string { + return fmt.Sprintf("[GET /v1/clouds/aws/account/sts][%d] v1AwsAccountStsGetOK %+v", 200, o.Payload) +} + +func (o *V1AwsAccountStsGetOK) GetPayload() *models.V1AwsAccountSts { + return o.Payload +} + +func (o *V1AwsAccountStsGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1AwsAccountSts) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_aws_account_validate_parameters.go b/api/client/v1/v1_aws_account_validate_parameters.go new file mode 100644 index 00000000..bff931dc --- /dev/null +++ b/api/client/v1/v1_aws_account_validate_parameters.go @@ -0,0 +1,139 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1AwsAccountValidateParams creates a new V1AwsAccountValidateParams object +// with the default values initialized. +func NewV1AwsAccountValidateParams() *V1AwsAccountValidateParams { + var () + return &V1AwsAccountValidateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1AwsAccountValidateParamsWithTimeout creates a new V1AwsAccountValidateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1AwsAccountValidateParamsWithTimeout(timeout time.Duration) *V1AwsAccountValidateParams { + var () + return &V1AwsAccountValidateParams{ + + timeout: timeout, + } +} + +// NewV1AwsAccountValidateParamsWithContext creates a new V1AwsAccountValidateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1AwsAccountValidateParamsWithContext(ctx context.Context) *V1AwsAccountValidateParams { + var () + return &V1AwsAccountValidateParams{ + + Context: ctx, + } +} + +// NewV1AwsAccountValidateParamsWithHTTPClient creates a new V1AwsAccountValidateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1AwsAccountValidateParamsWithHTTPClient(client *http.Client) *V1AwsAccountValidateParams { + var () + return &V1AwsAccountValidateParams{ + HTTPClient: client, + } +} + +/* +V1AwsAccountValidateParams contains all the parameters to send to the API endpoint +for the v1 aws account validate operation typically these are written to a http.Request +*/ +type V1AwsAccountValidateParams struct { + + /*AwsCloudAccount + Request payload to validate AWS cloud account + + */ + AwsCloudAccount *models.V1AwsCloudAccount + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 aws account validate params +func (o *V1AwsAccountValidateParams) WithTimeout(timeout time.Duration) *V1AwsAccountValidateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 aws account validate params +func (o *V1AwsAccountValidateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 aws account validate params +func (o *V1AwsAccountValidateParams) WithContext(ctx context.Context) *V1AwsAccountValidateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 aws account validate params +func (o *V1AwsAccountValidateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 aws account validate params +func (o *V1AwsAccountValidateParams) WithHTTPClient(client *http.Client) *V1AwsAccountValidateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 aws account validate params +func (o *V1AwsAccountValidateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithAwsCloudAccount adds the awsCloudAccount to the v1 aws account validate params +func (o *V1AwsAccountValidateParams) WithAwsCloudAccount(awsCloudAccount *models.V1AwsCloudAccount) *V1AwsAccountValidateParams { + o.SetAwsCloudAccount(awsCloudAccount) + return o +} + +// SetAwsCloudAccount adds the awsCloudAccount to the v1 aws account validate params +func (o *V1AwsAccountValidateParams) SetAwsCloudAccount(awsCloudAccount *models.V1AwsCloudAccount) { + o.AwsCloudAccount = awsCloudAccount +} + +// WriteToRequest writes these params to a swagger request +func (o *V1AwsAccountValidateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.AwsCloudAccount != nil { + if err := r.SetBodyParam(o.AwsCloudAccount); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_aws_account_validate_responses.go b/api/client/v1/v1_aws_account_validate_responses.go new file mode 100644 index 00000000..8429503f --- /dev/null +++ b/api/client/v1/v1_aws_account_validate_responses.go @@ -0,0 +1,61 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1AwsAccountValidateReader is a Reader for the V1AwsAccountValidate structure. +type V1AwsAccountValidateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1AwsAccountValidateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1AwsAccountValidateNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1AwsAccountValidateNoContent creates a V1AwsAccountValidateNoContent with default headers values +func NewV1AwsAccountValidateNoContent() *V1AwsAccountValidateNoContent { + return &V1AwsAccountValidateNoContent{} +} + +/* +V1AwsAccountValidateNoContent handles this case with default header values. + +Ok response without content +*/ +type V1AwsAccountValidateNoContent struct { + /*Audit uid for the request + */ + AuditUID string +} + +func (o *V1AwsAccountValidateNoContent) Error() string { + return fmt.Sprintf("[POST /v1/clouds/aws/account/validate][%d] v1AwsAccountValidateNoContent ", 204) +} + +func (o *V1AwsAccountValidateNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header AuditUid + o.AuditUID = response.GetHeader("AuditUid") + + return nil +} diff --git a/api/client/v1/v1_aws_cloud_cost_parameters.go b/api/client/v1/v1_aws_cloud_cost_parameters.go new file mode 100644 index 00000000..55b708a8 --- /dev/null +++ b/api/client/v1/v1_aws_cloud_cost_parameters.go @@ -0,0 +1,139 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1AwsCloudCostParams creates a new V1AwsCloudCostParams object +// with the default values initialized. +func NewV1AwsCloudCostParams() *V1AwsCloudCostParams { + var () + return &V1AwsCloudCostParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1AwsCloudCostParamsWithTimeout creates a new V1AwsCloudCostParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1AwsCloudCostParamsWithTimeout(timeout time.Duration) *V1AwsCloudCostParams { + var () + return &V1AwsCloudCostParams{ + + timeout: timeout, + } +} + +// NewV1AwsCloudCostParamsWithContext creates a new V1AwsCloudCostParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1AwsCloudCostParamsWithContext(ctx context.Context) *V1AwsCloudCostParams { + var () + return &V1AwsCloudCostParams{ + + Context: ctx, + } +} + +// NewV1AwsCloudCostParamsWithHTTPClient creates a new V1AwsCloudCostParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1AwsCloudCostParamsWithHTTPClient(client *http.Client) *V1AwsCloudCostParams { + var () + return &V1AwsCloudCostParams{ + HTTPClient: client, + } +} + +/* +V1AwsCloudCostParams contains all the parameters to send to the API endpoint +for the v1 aws cloud cost operation typically these are written to a http.Request +*/ +type V1AwsCloudCostParams struct { + + /*Body + Request payload for AWS cloud cost + + */ + Body *models.V1AwsCloudCostSpec + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 aws cloud cost params +func (o *V1AwsCloudCostParams) WithTimeout(timeout time.Duration) *V1AwsCloudCostParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 aws cloud cost params +func (o *V1AwsCloudCostParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 aws cloud cost params +func (o *V1AwsCloudCostParams) WithContext(ctx context.Context) *V1AwsCloudCostParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 aws cloud cost params +func (o *V1AwsCloudCostParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 aws cloud cost params +func (o *V1AwsCloudCostParams) WithHTTPClient(client *http.Client) *V1AwsCloudCostParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 aws cloud cost params +func (o *V1AwsCloudCostParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 aws cloud cost params +func (o *V1AwsCloudCostParams) WithBody(body *models.V1AwsCloudCostSpec) *V1AwsCloudCostParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 aws cloud cost params +func (o *V1AwsCloudCostParams) SetBody(body *models.V1AwsCloudCostSpec) { + o.Body = body +} + +// WriteToRequest writes these params to a swagger request +func (o *V1AwsCloudCostParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_aws_cloud_cost_responses.go b/api/client/v1/v1_aws_cloud_cost_responses.go new file mode 100644 index 00000000..b4fc2107 --- /dev/null +++ b/api/client/v1/v1_aws_cloud_cost_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1AwsCloudCostReader is a Reader for the V1AwsCloudCost structure. +type V1AwsCloudCostReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1AwsCloudCostReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1AwsCloudCostOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1AwsCloudCostOK creates a V1AwsCloudCostOK with default headers values +func NewV1AwsCloudCostOK() *V1AwsCloudCostOK { + return &V1AwsCloudCostOK{} +} + +/* +V1AwsCloudCostOK handles this case with default header values. + +(empty) +*/ +type V1AwsCloudCostOK struct { + Payload *models.V1AwsCloudCostSummary +} + +func (o *V1AwsCloudCostOK) Error() string { + return fmt.Sprintf("[POST /v1/clouds/aws/cost][%d] v1AwsCloudCostOK %+v", 200, o.Payload) +} + +func (o *V1AwsCloudCostOK) GetPayload() *models.V1AwsCloudCostSummary { + return o.Payload +} + +func (o *V1AwsCloudCostOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1AwsCloudCostSummary) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_aws_cluster_name_validate_parameters.go b/api/client/v1/v1_aws_cluster_name_validate_parameters.go new file mode 100644 index 00000000..8a095771 --- /dev/null +++ b/api/client/v1/v1_aws_cluster_name_validate_parameters.go @@ -0,0 +1,186 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1AwsClusterNameValidateParams creates a new V1AwsClusterNameValidateParams object +// with the default values initialized. +func NewV1AwsClusterNameValidateParams() *V1AwsClusterNameValidateParams { + var () + return &V1AwsClusterNameValidateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1AwsClusterNameValidateParamsWithTimeout creates a new V1AwsClusterNameValidateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1AwsClusterNameValidateParamsWithTimeout(timeout time.Duration) *V1AwsClusterNameValidateParams { + var () + return &V1AwsClusterNameValidateParams{ + + timeout: timeout, + } +} + +// NewV1AwsClusterNameValidateParamsWithContext creates a new V1AwsClusterNameValidateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1AwsClusterNameValidateParamsWithContext(ctx context.Context) *V1AwsClusterNameValidateParams { + var () + return &V1AwsClusterNameValidateParams{ + + Context: ctx, + } +} + +// NewV1AwsClusterNameValidateParamsWithHTTPClient creates a new V1AwsClusterNameValidateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1AwsClusterNameValidateParamsWithHTTPClient(client *http.Client) *V1AwsClusterNameValidateParams { + var () + return &V1AwsClusterNameValidateParams{ + HTTPClient: client, + } +} + +/* +V1AwsClusterNameValidateParams contains all the parameters to send to the API endpoint +for the v1 aws cluster name validate operation typically these are written to a http.Request +*/ +type V1AwsClusterNameValidateParams struct { + + /*CloudAccountUID + Uid for the specific AWS cloud account + + */ + CloudAccountUID string + /*Name + cluster name to be validated + + */ + Name string + /*Region + Region for which cluster name is validated + + */ + Region string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 aws cluster name validate params +func (o *V1AwsClusterNameValidateParams) WithTimeout(timeout time.Duration) *V1AwsClusterNameValidateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 aws cluster name validate params +func (o *V1AwsClusterNameValidateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 aws cluster name validate params +func (o *V1AwsClusterNameValidateParams) WithContext(ctx context.Context) *V1AwsClusterNameValidateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 aws cluster name validate params +func (o *V1AwsClusterNameValidateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 aws cluster name validate params +func (o *V1AwsClusterNameValidateParams) WithHTTPClient(client *http.Client) *V1AwsClusterNameValidateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 aws cluster name validate params +func (o *V1AwsClusterNameValidateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithCloudAccountUID adds the cloudAccountUID to the v1 aws cluster name validate params +func (o *V1AwsClusterNameValidateParams) WithCloudAccountUID(cloudAccountUID string) *V1AwsClusterNameValidateParams { + o.SetCloudAccountUID(cloudAccountUID) + return o +} + +// SetCloudAccountUID adds the cloudAccountUid to the v1 aws cluster name validate params +func (o *V1AwsClusterNameValidateParams) SetCloudAccountUID(cloudAccountUID string) { + o.CloudAccountUID = cloudAccountUID +} + +// WithName adds the name to the v1 aws cluster name validate params +func (o *V1AwsClusterNameValidateParams) WithName(name string) *V1AwsClusterNameValidateParams { + o.SetName(name) + return o +} + +// SetName adds the name to the v1 aws cluster name validate params +func (o *V1AwsClusterNameValidateParams) SetName(name string) { + o.Name = name +} + +// WithRegion adds the region to the v1 aws cluster name validate params +func (o *V1AwsClusterNameValidateParams) WithRegion(region string) *V1AwsClusterNameValidateParams { + o.SetRegion(region) + return o +} + +// SetRegion adds the region to the v1 aws cluster name validate params +func (o *V1AwsClusterNameValidateParams) SetRegion(region string) { + o.Region = region +} + +// WriteToRequest writes these params to a swagger request +func (o *V1AwsClusterNameValidateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // query param cloudAccountUid + qrCloudAccountUID := o.CloudAccountUID + qCloudAccountUID := qrCloudAccountUID + if qCloudAccountUID != "" { + if err := r.SetQueryParam("cloudAccountUid", qCloudAccountUID); err != nil { + return err + } + } + + // query param name + qrName := o.Name + qName := qrName + if qName != "" { + if err := r.SetQueryParam("name", qName); err != nil { + return err + } + } + + // path param region + if err := r.SetPathParam("region", o.Region); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_aws_cluster_name_validate_responses.go b/api/client/v1/v1_aws_cluster_name_validate_responses.go new file mode 100644 index 00000000..0ffdcec0 --- /dev/null +++ b/api/client/v1/v1_aws_cluster_name_validate_responses.go @@ -0,0 +1,61 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1AwsClusterNameValidateReader is a Reader for the V1AwsClusterNameValidate structure. +type V1AwsClusterNameValidateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1AwsClusterNameValidateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1AwsClusterNameValidateNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1AwsClusterNameValidateNoContent creates a V1AwsClusterNameValidateNoContent with default headers values +func NewV1AwsClusterNameValidateNoContent() *V1AwsClusterNameValidateNoContent { + return &V1AwsClusterNameValidateNoContent{} +} + +/* +V1AwsClusterNameValidateNoContent handles this case with default header values. + +Ok response without content +*/ +type V1AwsClusterNameValidateNoContent struct { + /*Audit uid for the request + */ + AuditUID string +} + +func (o *V1AwsClusterNameValidateNoContent) Error() string { + return fmt.Sprintf("[GET /v1/clouds/aws/regions/{region}/eksClusters/name/validate][%d] v1AwsClusterNameValidateNoContent ", 204) +} + +func (o *V1AwsClusterNameValidateNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header AuditUid + o.AuditUID = response.GetHeader("AuditUid") + + return nil +} diff --git a/api/client/v1/v1_aws_copy_image_from_default_region_parameters.go b/api/client/v1/v1_aws_copy_image_from_default_region_parameters.go new file mode 100644 index 00000000..e783069f --- /dev/null +++ b/api/client/v1/v1_aws_copy_image_from_default_region_parameters.go @@ -0,0 +1,160 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1AwsCopyImageFromDefaultRegionParams creates a new V1AwsCopyImageFromDefaultRegionParams object +// with the default values initialized. +func NewV1AwsCopyImageFromDefaultRegionParams() *V1AwsCopyImageFromDefaultRegionParams { + var () + return &V1AwsCopyImageFromDefaultRegionParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1AwsCopyImageFromDefaultRegionParamsWithTimeout creates a new V1AwsCopyImageFromDefaultRegionParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1AwsCopyImageFromDefaultRegionParamsWithTimeout(timeout time.Duration) *V1AwsCopyImageFromDefaultRegionParams { + var () + return &V1AwsCopyImageFromDefaultRegionParams{ + + timeout: timeout, + } +} + +// NewV1AwsCopyImageFromDefaultRegionParamsWithContext creates a new V1AwsCopyImageFromDefaultRegionParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1AwsCopyImageFromDefaultRegionParamsWithContext(ctx context.Context) *V1AwsCopyImageFromDefaultRegionParams { + var () + return &V1AwsCopyImageFromDefaultRegionParams{ + + Context: ctx, + } +} + +// NewV1AwsCopyImageFromDefaultRegionParamsWithHTTPClient creates a new V1AwsCopyImageFromDefaultRegionParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1AwsCopyImageFromDefaultRegionParamsWithHTTPClient(client *http.Client) *V1AwsCopyImageFromDefaultRegionParams { + var () + return &V1AwsCopyImageFromDefaultRegionParams{ + HTTPClient: client, + } +} + +/* +V1AwsCopyImageFromDefaultRegionParams contains all the parameters to send to the API endpoint +for the v1 aws copy image from default region operation typically these are written to a http.Request +*/ +type V1AwsCopyImageFromDefaultRegionParams struct { + + /*Region + Region to copy AWS image from + + */ + Region string + /*SpectroClusterAwsImageTag + Request payload to copy the AWS image + + */ + SpectroClusterAwsImageTag *models.V1AwsFindImageRequest + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 aws copy image from default region params +func (o *V1AwsCopyImageFromDefaultRegionParams) WithTimeout(timeout time.Duration) *V1AwsCopyImageFromDefaultRegionParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 aws copy image from default region params +func (o *V1AwsCopyImageFromDefaultRegionParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 aws copy image from default region params +func (o *V1AwsCopyImageFromDefaultRegionParams) WithContext(ctx context.Context) *V1AwsCopyImageFromDefaultRegionParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 aws copy image from default region params +func (o *V1AwsCopyImageFromDefaultRegionParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 aws copy image from default region params +func (o *V1AwsCopyImageFromDefaultRegionParams) WithHTTPClient(client *http.Client) *V1AwsCopyImageFromDefaultRegionParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 aws copy image from default region params +func (o *V1AwsCopyImageFromDefaultRegionParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithRegion adds the region to the v1 aws copy image from default region params +func (o *V1AwsCopyImageFromDefaultRegionParams) WithRegion(region string) *V1AwsCopyImageFromDefaultRegionParams { + o.SetRegion(region) + return o +} + +// SetRegion adds the region to the v1 aws copy image from default region params +func (o *V1AwsCopyImageFromDefaultRegionParams) SetRegion(region string) { + o.Region = region +} + +// WithSpectroClusterAwsImageTag adds the spectroClusterAwsImageTag to the v1 aws copy image from default region params +func (o *V1AwsCopyImageFromDefaultRegionParams) WithSpectroClusterAwsImageTag(spectroClusterAwsImageTag *models.V1AwsFindImageRequest) *V1AwsCopyImageFromDefaultRegionParams { + o.SetSpectroClusterAwsImageTag(spectroClusterAwsImageTag) + return o +} + +// SetSpectroClusterAwsImageTag adds the spectroClusterAwsImageTag to the v1 aws copy image from default region params +func (o *V1AwsCopyImageFromDefaultRegionParams) SetSpectroClusterAwsImageTag(spectroClusterAwsImageTag *models.V1AwsFindImageRequest) { + o.SpectroClusterAwsImageTag = spectroClusterAwsImageTag +} + +// WriteToRequest writes these params to a swagger request +func (o *V1AwsCopyImageFromDefaultRegionParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param region + if err := r.SetPathParam("region", o.Region); err != nil { + return err + } + + if o.SpectroClusterAwsImageTag != nil { + if err := r.SetBodyParam(o.SpectroClusterAwsImageTag); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_aws_copy_image_from_default_region_responses.go b/api/client/v1/v1_aws_copy_image_from_default_region_responses.go new file mode 100644 index 00000000..bd45cee1 --- /dev/null +++ b/api/client/v1/v1_aws_copy_image_from_default_region_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1AwsCopyImageFromDefaultRegionReader is a Reader for the V1AwsCopyImageFromDefaultRegion structure. +type V1AwsCopyImageFromDefaultRegionReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1AwsCopyImageFromDefaultRegionReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1AwsCopyImageFromDefaultRegionOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1AwsCopyImageFromDefaultRegionOK creates a V1AwsCopyImageFromDefaultRegionOK with default headers values +func NewV1AwsCopyImageFromDefaultRegionOK() *V1AwsCopyImageFromDefaultRegionOK { + return &V1AwsCopyImageFromDefaultRegionOK{} +} + +/* +V1AwsCopyImageFromDefaultRegionOK handles this case with default header values. + +(empty) +*/ +type V1AwsCopyImageFromDefaultRegionOK struct { + Payload *models.V1AsyncOperationIDEntity +} + +func (o *V1AwsCopyImageFromDefaultRegionOK) Error() string { + return fmt.Sprintf("[POST /v1/clouds/aws/regions/{region}/copydefaultimages][%d] v1AwsCopyImageFromDefaultRegionOK %+v", 200, o.Payload) +} + +func (o *V1AwsCopyImageFromDefaultRegionOK) GetPayload() *models.V1AsyncOperationIDEntity { + return o.Payload +} + +func (o *V1AwsCopyImageFromDefaultRegionOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1AsyncOperationIDEntity) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_aws_find_image_parameters.go b/api/client/v1/v1_aws_find_image_parameters.go new file mode 100644 index 00000000..2ba9b45f --- /dev/null +++ b/api/client/v1/v1_aws_find_image_parameters.go @@ -0,0 +1,160 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1AwsFindImageParams creates a new V1AwsFindImageParams object +// with the default values initialized. +func NewV1AwsFindImageParams() *V1AwsFindImageParams { + var () + return &V1AwsFindImageParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1AwsFindImageParamsWithTimeout creates a new V1AwsFindImageParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1AwsFindImageParamsWithTimeout(timeout time.Duration) *V1AwsFindImageParams { + var () + return &V1AwsFindImageParams{ + + timeout: timeout, + } +} + +// NewV1AwsFindImageParamsWithContext creates a new V1AwsFindImageParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1AwsFindImageParamsWithContext(ctx context.Context) *V1AwsFindImageParams { + var () + return &V1AwsFindImageParams{ + + Context: ctx, + } +} + +// NewV1AwsFindImageParamsWithHTTPClient creates a new V1AwsFindImageParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1AwsFindImageParamsWithHTTPClient(client *http.Client) *V1AwsFindImageParams { + var () + return &V1AwsFindImageParams{ + HTTPClient: client, + } +} + +/* +V1AwsFindImageParams contains all the parameters to send to the API endpoint +for the v1 aws find image operation typically these are written to a http.Request +*/ +type V1AwsFindImageParams struct { + + /*AwsImageRequest + Request payload to find the AWS image + + */ + AwsImageRequest *models.V1AwsFindImageRequest + /*Region + Region to find AWS image + + */ + Region string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 aws find image params +func (o *V1AwsFindImageParams) WithTimeout(timeout time.Duration) *V1AwsFindImageParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 aws find image params +func (o *V1AwsFindImageParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 aws find image params +func (o *V1AwsFindImageParams) WithContext(ctx context.Context) *V1AwsFindImageParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 aws find image params +func (o *V1AwsFindImageParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 aws find image params +func (o *V1AwsFindImageParams) WithHTTPClient(client *http.Client) *V1AwsFindImageParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 aws find image params +func (o *V1AwsFindImageParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithAwsImageRequest adds the awsImageRequest to the v1 aws find image params +func (o *V1AwsFindImageParams) WithAwsImageRequest(awsImageRequest *models.V1AwsFindImageRequest) *V1AwsFindImageParams { + o.SetAwsImageRequest(awsImageRequest) + return o +} + +// SetAwsImageRequest adds the awsImageRequest to the v1 aws find image params +func (o *V1AwsFindImageParams) SetAwsImageRequest(awsImageRequest *models.V1AwsFindImageRequest) { + o.AwsImageRequest = awsImageRequest +} + +// WithRegion adds the region to the v1 aws find image params +func (o *V1AwsFindImageParams) WithRegion(region string) *V1AwsFindImageParams { + o.SetRegion(region) + return o +} + +// SetRegion adds the region to the v1 aws find image params +func (o *V1AwsFindImageParams) SetRegion(region string) { + o.Region = region +} + +// WriteToRequest writes these params to a swagger request +func (o *V1AwsFindImageParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.AwsImageRequest != nil { + if err := r.SetBodyParam(o.AwsImageRequest); err != nil { + return err + } + } + + // path param region + if err := r.SetPathParam("region", o.Region); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_aws_find_image_responses.go b/api/client/v1/v1_aws_find_image_responses.go new file mode 100644 index 00000000..5ed427d8 --- /dev/null +++ b/api/client/v1/v1_aws_find_image_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1AwsFindImageReader is a Reader for the V1AwsFindImage structure. +type V1AwsFindImageReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1AwsFindImageReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1AwsFindImageOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1AwsFindImageOK creates a V1AwsFindImageOK with default headers values +func NewV1AwsFindImageOK() *V1AwsFindImageOK { + return &V1AwsFindImageOK{} +} + +/* +V1AwsFindImageOK handles this case with default header values. + +(empty) +*/ +type V1AwsFindImageOK struct { + Payload *models.V1AwsImage +} + +func (o *V1AwsFindImageOK) Error() string { + return fmt.Sprintf("[POST /v1/clouds/aws/regions/{region}/images][%d] v1AwsFindImageOK %+v", 200, o.Payload) +} + +func (o *V1AwsFindImageOK) GetPayload() *models.V1AwsImage { + return o.Payload +} + +func (o *V1AwsFindImageOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1AwsImage) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_aws_iam_policies_parameters.go b/api/client/v1/v1_aws_iam_policies_parameters.go new file mode 100644 index 00000000..7a067f9c --- /dev/null +++ b/api/client/v1/v1_aws_iam_policies_parameters.go @@ -0,0 +1,171 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1AwsIamPoliciesParams creates a new V1AwsIamPoliciesParams object +// with the default values initialized. +func NewV1AwsIamPoliciesParams() *V1AwsIamPoliciesParams { + var () + return &V1AwsIamPoliciesParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1AwsIamPoliciesParamsWithTimeout creates a new V1AwsIamPoliciesParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1AwsIamPoliciesParamsWithTimeout(timeout time.Duration) *V1AwsIamPoliciesParams { + var () + return &V1AwsIamPoliciesParams{ + + timeout: timeout, + } +} + +// NewV1AwsIamPoliciesParamsWithContext creates a new V1AwsIamPoliciesParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1AwsIamPoliciesParamsWithContext(ctx context.Context) *V1AwsIamPoliciesParams { + var () + return &V1AwsIamPoliciesParams{ + + Context: ctx, + } +} + +// NewV1AwsIamPoliciesParamsWithHTTPClient creates a new V1AwsIamPoliciesParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1AwsIamPoliciesParamsWithHTTPClient(client *http.Client) *V1AwsIamPoliciesParams { + var () + return &V1AwsIamPoliciesParams{ + HTTPClient: client, + } +} + +/* +V1AwsIamPoliciesParams contains all the parameters to send to the API endpoint +for the v1 aws iam policies operation typically these are written to a http.Request +*/ +type V1AwsIamPoliciesParams struct { + + /*Account + Request payload for AWS Cloud Account + + */ + Account *models.V1AwsCloudAccount + /*CloudAccountUID + Uid for the specific AWS cloud account + + */ + CloudAccountUID *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 aws iam policies params +func (o *V1AwsIamPoliciesParams) WithTimeout(timeout time.Duration) *V1AwsIamPoliciesParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 aws iam policies params +func (o *V1AwsIamPoliciesParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 aws iam policies params +func (o *V1AwsIamPoliciesParams) WithContext(ctx context.Context) *V1AwsIamPoliciesParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 aws iam policies params +func (o *V1AwsIamPoliciesParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 aws iam policies params +func (o *V1AwsIamPoliciesParams) WithHTTPClient(client *http.Client) *V1AwsIamPoliciesParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 aws iam policies params +func (o *V1AwsIamPoliciesParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithAccount adds the account to the v1 aws iam policies params +func (o *V1AwsIamPoliciesParams) WithAccount(account *models.V1AwsCloudAccount) *V1AwsIamPoliciesParams { + o.SetAccount(account) + return o +} + +// SetAccount adds the account to the v1 aws iam policies params +func (o *V1AwsIamPoliciesParams) SetAccount(account *models.V1AwsCloudAccount) { + o.Account = account +} + +// WithCloudAccountUID adds the cloudAccountUID to the v1 aws iam policies params +func (o *V1AwsIamPoliciesParams) WithCloudAccountUID(cloudAccountUID *string) *V1AwsIamPoliciesParams { + o.SetCloudAccountUID(cloudAccountUID) + return o +} + +// SetCloudAccountUID adds the cloudAccountUid to the v1 aws iam policies params +func (o *V1AwsIamPoliciesParams) SetCloudAccountUID(cloudAccountUID *string) { + o.CloudAccountUID = cloudAccountUID +} + +// WriteToRequest writes these params to a swagger request +func (o *V1AwsIamPoliciesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Account != nil { + if err := r.SetBodyParam(o.Account); err != nil { + return err + } + } + + if o.CloudAccountUID != nil { + + // query param cloudAccountUid + var qrCloudAccountUID string + if o.CloudAccountUID != nil { + qrCloudAccountUID = *o.CloudAccountUID + } + qCloudAccountUID := qrCloudAccountUID + if qCloudAccountUID != "" { + if err := r.SetQueryParam("cloudAccountUid", qCloudAccountUID); err != nil { + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_aws_iam_policies_responses.go b/api/client/v1/v1_aws_iam_policies_responses.go new file mode 100644 index 00000000..2fd0d40b --- /dev/null +++ b/api/client/v1/v1_aws_iam_policies_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1AwsIamPoliciesReader is a Reader for the V1AwsIamPolicies structure. +type V1AwsIamPoliciesReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1AwsIamPoliciesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1AwsIamPoliciesOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1AwsIamPoliciesOK creates a V1AwsIamPoliciesOK with default headers values +func NewV1AwsIamPoliciesOK() *V1AwsIamPoliciesOK { + return &V1AwsIamPoliciesOK{} +} + +/* +V1AwsIamPoliciesOK handles this case with default header values. + +(empty) +*/ +type V1AwsIamPoliciesOK struct { + Payload *models.V1AwsPolicies +} + +func (o *V1AwsIamPoliciesOK) Error() string { + return fmt.Sprintf("[POST /v1/clouds/aws/policies][%d] v1AwsIamPoliciesOK %+v", 200, o.Payload) +} + +func (o *V1AwsIamPoliciesOK) GetPayload() *models.V1AwsPolicies { + return o.Payload +} + +func (o *V1AwsIamPoliciesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1AwsPolicies) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_aws_instance_types_parameters.go b/api/client/v1/v1_aws_instance_types_parameters.go new file mode 100644 index 00000000..3896dd8f --- /dev/null +++ b/api/client/v1/v1_aws_instance_types_parameters.go @@ -0,0 +1,265 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// NewV1AwsInstanceTypesParams creates a new V1AwsInstanceTypesParams object +// with the default values initialized. +func NewV1AwsInstanceTypesParams() *V1AwsInstanceTypesParams { + var () + return &V1AwsInstanceTypesParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1AwsInstanceTypesParamsWithTimeout creates a new V1AwsInstanceTypesParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1AwsInstanceTypesParamsWithTimeout(timeout time.Duration) *V1AwsInstanceTypesParams { + var () + return &V1AwsInstanceTypesParams{ + + timeout: timeout, + } +} + +// NewV1AwsInstanceTypesParamsWithContext creates a new V1AwsInstanceTypesParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1AwsInstanceTypesParamsWithContext(ctx context.Context) *V1AwsInstanceTypesParams { + var () + return &V1AwsInstanceTypesParams{ + + Context: ctx, + } +} + +// NewV1AwsInstanceTypesParamsWithHTTPClient creates a new V1AwsInstanceTypesParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1AwsInstanceTypesParamsWithHTTPClient(client *http.Client) *V1AwsInstanceTypesParams { + var () + return &V1AwsInstanceTypesParams{ + HTTPClient: client, + } +} + +/* +V1AwsInstanceTypesParams contains all the parameters to send to the API endpoint +for the v1 aws instance types operation typically these are written to a http.Request +*/ +type V1AwsInstanceTypesParams struct { + + /*CloudAccountUID + Uid for the specific AWS cloud account + + */ + CloudAccountUID *string + /*CPUGtEq + Filter for instances having cpu greater than or equal + + */ + CPUGtEq *float64 + /*GpuGtEq + Filter for instances having gpu greater than or equal + + */ + GpuGtEq *float64 + /*MemoryGtEq + Filter for instances having memory greater than or equal + + */ + MemoryGtEq *float64 + /*Region + Region for which AWS instances are requested + + */ + Region string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 aws instance types params +func (o *V1AwsInstanceTypesParams) WithTimeout(timeout time.Duration) *V1AwsInstanceTypesParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 aws instance types params +func (o *V1AwsInstanceTypesParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 aws instance types params +func (o *V1AwsInstanceTypesParams) WithContext(ctx context.Context) *V1AwsInstanceTypesParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 aws instance types params +func (o *V1AwsInstanceTypesParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 aws instance types params +func (o *V1AwsInstanceTypesParams) WithHTTPClient(client *http.Client) *V1AwsInstanceTypesParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 aws instance types params +func (o *V1AwsInstanceTypesParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithCloudAccountUID adds the cloudAccountUID to the v1 aws instance types params +func (o *V1AwsInstanceTypesParams) WithCloudAccountUID(cloudAccountUID *string) *V1AwsInstanceTypesParams { + o.SetCloudAccountUID(cloudAccountUID) + return o +} + +// SetCloudAccountUID adds the cloudAccountUid to the v1 aws instance types params +func (o *V1AwsInstanceTypesParams) SetCloudAccountUID(cloudAccountUID *string) { + o.CloudAccountUID = cloudAccountUID +} + +// WithCPUGtEq adds the cPUGtEq to the v1 aws instance types params +func (o *V1AwsInstanceTypesParams) WithCPUGtEq(cPUGtEq *float64) *V1AwsInstanceTypesParams { + o.SetCPUGtEq(cPUGtEq) + return o +} + +// SetCPUGtEq adds the cpuGtEq to the v1 aws instance types params +func (o *V1AwsInstanceTypesParams) SetCPUGtEq(cPUGtEq *float64) { + o.CPUGtEq = cPUGtEq +} + +// WithGpuGtEq adds the gpuGtEq to the v1 aws instance types params +func (o *V1AwsInstanceTypesParams) WithGpuGtEq(gpuGtEq *float64) *V1AwsInstanceTypesParams { + o.SetGpuGtEq(gpuGtEq) + return o +} + +// SetGpuGtEq adds the gpuGtEq to the v1 aws instance types params +func (o *V1AwsInstanceTypesParams) SetGpuGtEq(gpuGtEq *float64) { + o.GpuGtEq = gpuGtEq +} + +// WithMemoryGtEq adds the memoryGtEq to the v1 aws instance types params +func (o *V1AwsInstanceTypesParams) WithMemoryGtEq(memoryGtEq *float64) *V1AwsInstanceTypesParams { + o.SetMemoryGtEq(memoryGtEq) + return o +} + +// SetMemoryGtEq adds the memoryGtEq to the v1 aws instance types params +func (o *V1AwsInstanceTypesParams) SetMemoryGtEq(memoryGtEq *float64) { + o.MemoryGtEq = memoryGtEq +} + +// WithRegion adds the region to the v1 aws instance types params +func (o *V1AwsInstanceTypesParams) WithRegion(region string) *V1AwsInstanceTypesParams { + o.SetRegion(region) + return o +} + +// SetRegion adds the region to the v1 aws instance types params +func (o *V1AwsInstanceTypesParams) SetRegion(region string) { + o.Region = region +} + +// WriteToRequest writes these params to a swagger request +func (o *V1AwsInstanceTypesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.CloudAccountUID != nil { + + // query param cloudAccountUid + var qrCloudAccountUID string + if o.CloudAccountUID != nil { + qrCloudAccountUID = *o.CloudAccountUID + } + qCloudAccountUID := qrCloudAccountUID + if qCloudAccountUID != "" { + if err := r.SetQueryParam("cloudAccountUid", qCloudAccountUID); err != nil { + return err + } + } + + } + + if o.CPUGtEq != nil { + + // query param cpuGtEq + var qrCPUGtEq float64 + if o.CPUGtEq != nil { + qrCPUGtEq = *o.CPUGtEq + } + qCPUGtEq := swag.FormatFloat64(qrCPUGtEq) + if qCPUGtEq != "" { + if err := r.SetQueryParam("cpuGtEq", qCPUGtEq); err != nil { + return err + } + } + + } + + if o.GpuGtEq != nil { + + // query param gpuGtEq + var qrGpuGtEq float64 + if o.GpuGtEq != nil { + qrGpuGtEq = *o.GpuGtEq + } + qGpuGtEq := swag.FormatFloat64(qrGpuGtEq) + if qGpuGtEq != "" { + if err := r.SetQueryParam("gpuGtEq", qGpuGtEq); err != nil { + return err + } + } + + } + + if o.MemoryGtEq != nil { + + // query param memoryGtEq + var qrMemoryGtEq float64 + if o.MemoryGtEq != nil { + qrMemoryGtEq = *o.MemoryGtEq + } + qMemoryGtEq := swag.FormatFloat64(qrMemoryGtEq) + if qMemoryGtEq != "" { + if err := r.SetQueryParam("memoryGtEq", qMemoryGtEq); err != nil { + return err + } + } + + } + + // path param region + if err := r.SetPathParam("region", o.Region); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_aws_instance_types_responses.go b/api/client/v1/v1_aws_instance_types_responses.go new file mode 100644 index 00000000..452da5ae --- /dev/null +++ b/api/client/v1/v1_aws_instance_types_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1AwsInstanceTypesReader is a Reader for the V1AwsInstanceTypes structure. +type V1AwsInstanceTypesReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1AwsInstanceTypesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1AwsInstanceTypesOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1AwsInstanceTypesOK creates a V1AwsInstanceTypesOK with default headers values +func NewV1AwsInstanceTypesOK() *V1AwsInstanceTypesOK { + return &V1AwsInstanceTypesOK{} +} + +/* +V1AwsInstanceTypesOK handles this case with default header values. + +(empty) +*/ +type V1AwsInstanceTypesOK struct { + Payload *models.V1AwsInstanceTypes +} + +func (o *V1AwsInstanceTypesOK) Error() string { + return fmt.Sprintf("[GET /v1/clouds/aws/regions/{region}/instancetypes][%d] v1AwsInstanceTypesOK %+v", 200, o.Payload) +} + +func (o *V1AwsInstanceTypesOK) GetPayload() *models.V1AwsInstanceTypes { + return o.Payload +} + +func (o *V1AwsInstanceTypesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1AwsInstanceTypes) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_aws_key_pair_validate_parameters.go b/api/client/v1/v1_aws_key_pair_validate_parameters.go new file mode 100644 index 00000000..3644be00 --- /dev/null +++ b/api/client/v1/v1_aws_key_pair_validate_parameters.go @@ -0,0 +1,182 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1AwsKeyPairValidateParams creates a new V1AwsKeyPairValidateParams object +// with the default values initialized. +func NewV1AwsKeyPairValidateParams() *V1AwsKeyPairValidateParams { + var () + return &V1AwsKeyPairValidateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1AwsKeyPairValidateParamsWithTimeout creates a new V1AwsKeyPairValidateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1AwsKeyPairValidateParamsWithTimeout(timeout time.Duration) *V1AwsKeyPairValidateParams { + var () + return &V1AwsKeyPairValidateParams{ + + timeout: timeout, + } +} + +// NewV1AwsKeyPairValidateParamsWithContext creates a new V1AwsKeyPairValidateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1AwsKeyPairValidateParamsWithContext(ctx context.Context) *V1AwsKeyPairValidateParams { + var () + return &V1AwsKeyPairValidateParams{ + + Context: ctx, + } +} + +// NewV1AwsKeyPairValidateParamsWithHTTPClient creates a new V1AwsKeyPairValidateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1AwsKeyPairValidateParamsWithHTTPClient(client *http.Client) *V1AwsKeyPairValidateParams { + var () + return &V1AwsKeyPairValidateParams{ + HTTPClient: client, + } +} + +/* +V1AwsKeyPairValidateParams contains all the parameters to send to the API endpoint +for the v1 aws key pair validate operation typically these are written to a http.Request +*/ +type V1AwsKeyPairValidateParams struct { + + /*CloudAccountUID + Uid for the specific AWS cloud account + + */ + CloudAccountUID string + /*Keypair + AWS Key pair which is to be validated + + */ + Keypair string + /*Region + Region for which AWS key pairs is validated + + */ + Region string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 aws key pair validate params +func (o *V1AwsKeyPairValidateParams) WithTimeout(timeout time.Duration) *V1AwsKeyPairValidateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 aws key pair validate params +func (o *V1AwsKeyPairValidateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 aws key pair validate params +func (o *V1AwsKeyPairValidateParams) WithContext(ctx context.Context) *V1AwsKeyPairValidateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 aws key pair validate params +func (o *V1AwsKeyPairValidateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 aws key pair validate params +func (o *V1AwsKeyPairValidateParams) WithHTTPClient(client *http.Client) *V1AwsKeyPairValidateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 aws key pair validate params +func (o *V1AwsKeyPairValidateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithCloudAccountUID adds the cloudAccountUID to the v1 aws key pair validate params +func (o *V1AwsKeyPairValidateParams) WithCloudAccountUID(cloudAccountUID string) *V1AwsKeyPairValidateParams { + o.SetCloudAccountUID(cloudAccountUID) + return o +} + +// SetCloudAccountUID adds the cloudAccountUid to the v1 aws key pair validate params +func (o *V1AwsKeyPairValidateParams) SetCloudAccountUID(cloudAccountUID string) { + o.CloudAccountUID = cloudAccountUID +} + +// WithKeypair adds the keypair to the v1 aws key pair validate params +func (o *V1AwsKeyPairValidateParams) WithKeypair(keypair string) *V1AwsKeyPairValidateParams { + o.SetKeypair(keypair) + return o +} + +// SetKeypair adds the keypair to the v1 aws key pair validate params +func (o *V1AwsKeyPairValidateParams) SetKeypair(keypair string) { + o.Keypair = keypair +} + +// WithRegion adds the region to the v1 aws key pair validate params +func (o *V1AwsKeyPairValidateParams) WithRegion(region string) *V1AwsKeyPairValidateParams { + o.SetRegion(region) + return o +} + +// SetRegion adds the region to the v1 aws key pair validate params +func (o *V1AwsKeyPairValidateParams) SetRegion(region string) { + o.Region = region +} + +// WriteToRequest writes these params to a swagger request +func (o *V1AwsKeyPairValidateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // query param cloudAccountUid + qrCloudAccountUID := o.CloudAccountUID + qCloudAccountUID := qrCloudAccountUID + if qCloudAccountUID != "" { + if err := r.SetQueryParam("cloudAccountUid", qCloudAccountUID); err != nil { + return err + } + } + + // path param keypair + if err := r.SetPathParam("keypair", o.Keypair); err != nil { + return err + } + + // path param region + if err := r.SetPathParam("region", o.Region); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_aws_key_pair_validate_responses.go b/api/client/v1/v1_aws_key_pair_validate_responses.go new file mode 100644 index 00000000..331548c3 --- /dev/null +++ b/api/client/v1/v1_aws_key_pair_validate_responses.go @@ -0,0 +1,61 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1AwsKeyPairValidateReader is a Reader for the V1AwsKeyPairValidate structure. +type V1AwsKeyPairValidateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1AwsKeyPairValidateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1AwsKeyPairValidateNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1AwsKeyPairValidateNoContent creates a V1AwsKeyPairValidateNoContent with default headers values +func NewV1AwsKeyPairValidateNoContent() *V1AwsKeyPairValidateNoContent { + return &V1AwsKeyPairValidateNoContent{} +} + +/* +V1AwsKeyPairValidateNoContent handles this case with default header values. + +Ok response without content +*/ +type V1AwsKeyPairValidateNoContent struct { + /*Audit uid for the request + */ + AuditUID string +} + +func (o *V1AwsKeyPairValidateNoContent) Error() string { + return fmt.Sprintf("[POST /v1/clouds/aws/regions/{region}/keypairs/{keypair}/validate][%d] v1AwsKeyPairValidateNoContent ", 204) +} + +func (o *V1AwsKeyPairValidateNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header AuditUid + o.AuditUID = response.GetHeader("AuditUid") + + return nil +} diff --git a/api/client/v1/v1_aws_key_pairs_parameters.go b/api/client/v1/v1_aws_key_pairs_parameters.go new file mode 100644 index 00000000..f893b533 --- /dev/null +++ b/api/client/v1/v1_aws_key_pairs_parameters.go @@ -0,0 +1,161 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1AwsKeyPairsParams creates a new V1AwsKeyPairsParams object +// with the default values initialized. +func NewV1AwsKeyPairsParams() *V1AwsKeyPairsParams { + var () + return &V1AwsKeyPairsParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1AwsKeyPairsParamsWithTimeout creates a new V1AwsKeyPairsParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1AwsKeyPairsParamsWithTimeout(timeout time.Duration) *V1AwsKeyPairsParams { + var () + return &V1AwsKeyPairsParams{ + + timeout: timeout, + } +} + +// NewV1AwsKeyPairsParamsWithContext creates a new V1AwsKeyPairsParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1AwsKeyPairsParamsWithContext(ctx context.Context) *V1AwsKeyPairsParams { + var () + return &V1AwsKeyPairsParams{ + + Context: ctx, + } +} + +// NewV1AwsKeyPairsParamsWithHTTPClient creates a new V1AwsKeyPairsParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1AwsKeyPairsParamsWithHTTPClient(client *http.Client) *V1AwsKeyPairsParams { + var () + return &V1AwsKeyPairsParams{ + HTTPClient: client, + } +} + +/* +V1AwsKeyPairsParams contains all the parameters to send to the API endpoint +for the v1 aws key pairs operation typically these are written to a http.Request +*/ +type V1AwsKeyPairsParams struct { + + /*CloudAccountUID + Uid for the specific AWS cloud account + + */ + CloudAccountUID string + /*Region + Region for which AWS key pairs are requested + + */ + Region string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 aws key pairs params +func (o *V1AwsKeyPairsParams) WithTimeout(timeout time.Duration) *V1AwsKeyPairsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 aws key pairs params +func (o *V1AwsKeyPairsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 aws key pairs params +func (o *V1AwsKeyPairsParams) WithContext(ctx context.Context) *V1AwsKeyPairsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 aws key pairs params +func (o *V1AwsKeyPairsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 aws key pairs params +func (o *V1AwsKeyPairsParams) WithHTTPClient(client *http.Client) *V1AwsKeyPairsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 aws key pairs params +func (o *V1AwsKeyPairsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithCloudAccountUID adds the cloudAccountUID to the v1 aws key pairs params +func (o *V1AwsKeyPairsParams) WithCloudAccountUID(cloudAccountUID string) *V1AwsKeyPairsParams { + o.SetCloudAccountUID(cloudAccountUID) + return o +} + +// SetCloudAccountUID adds the cloudAccountUid to the v1 aws key pairs params +func (o *V1AwsKeyPairsParams) SetCloudAccountUID(cloudAccountUID string) { + o.CloudAccountUID = cloudAccountUID +} + +// WithRegion adds the region to the v1 aws key pairs params +func (o *V1AwsKeyPairsParams) WithRegion(region string) *V1AwsKeyPairsParams { + o.SetRegion(region) + return o +} + +// SetRegion adds the region to the v1 aws key pairs params +func (o *V1AwsKeyPairsParams) SetRegion(region string) { + o.Region = region +} + +// WriteToRequest writes these params to a swagger request +func (o *V1AwsKeyPairsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // query param cloudAccountUid + qrCloudAccountUID := o.CloudAccountUID + qCloudAccountUID := qrCloudAccountUID + if qCloudAccountUID != "" { + if err := r.SetQueryParam("cloudAccountUid", qCloudAccountUID); err != nil { + return err + } + } + + // path param region + if err := r.SetPathParam("region", o.Region); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_aws_key_pairs_responses.go b/api/client/v1/v1_aws_key_pairs_responses.go new file mode 100644 index 00000000..710d0809 --- /dev/null +++ b/api/client/v1/v1_aws_key_pairs_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1AwsKeyPairsReader is a Reader for the V1AwsKeyPairs structure. +type V1AwsKeyPairsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1AwsKeyPairsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1AwsKeyPairsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1AwsKeyPairsOK creates a V1AwsKeyPairsOK with default headers values +func NewV1AwsKeyPairsOK() *V1AwsKeyPairsOK { + return &V1AwsKeyPairsOK{} +} + +/* +V1AwsKeyPairsOK handles this case with default header values. + +(empty) +*/ +type V1AwsKeyPairsOK struct { + Payload *models.V1AwsKeyPairs +} + +func (o *V1AwsKeyPairsOK) Error() string { + return fmt.Sprintf("[GET /v1/clouds/aws/regions/{region}/keypairs][%d] v1AwsKeyPairsOK %+v", 200, o.Payload) +} + +func (o *V1AwsKeyPairsOK) GetPayload() *models.V1AwsKeyPairs { + return o.Payload +} + +func (o *V1AwsKeyPairsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1AwsKeyPairs) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_aws_kms_key_get_parameters.go b/api/client/v1/v1_aws_kms_key_get_parameters.go new file mode 100644 index 00000000..ae6fb591 --- /dev/null +++ b/api/client/v1/v1_aws_kms_key_get_parameters.go @@ -0,0 +1,182 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1AwsKmsKeyGetParams creates a new V1AwsKmsKeyGetParams object +// with the default values initialized. +func NewV1AwsKmsKeyGetParams() *V1AwsKmsKeyGetParams { + var () + return &V1AwsKmsKeyGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1AwsKmsKeyGetParamsWithTimeout creates a new V1AwsKmsKeyGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1AwsKmsKeyGetParamsWithTimeout(timeout time.Duration) *V1AwsKmsKeyGetParams { + var () + return &V1AwsKmsKeyGetParams{ + + timeout: timeout, + } +} + +// NewV1AwsKmsKeyGetParamsWithContext creates a new V1AwsKmsKeyGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1AwsKmsKeyGetParamsWithContext(ctx context.Context) *V1AwsKmsKeyGetParams { + var () + return &V1AwsKmsKeyGetParams{ + + Context: ctx, + } +} + +// NewV1AwsKmsKeyGetParamsWithHTTPClient creates a new V1AwsKmsKeyGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1AwsKmsKeyGetParamsWithHTTPClient(client *http.Client) *V1AwsKmsKeyGetParams { + var () + return &V1AwsKmsKeyGetParams{ + HTTPClient: client, + } +} + +/* +V1AwsKmsKeyGetParams contains all the parameters to send to the API endpoint +for the v1 aws kms key get operation typically these are written to a http.Request +*/ +type V1AwsKmsKeyGetParams struct { + + /*CloudAccountUID + Uid for the specific AWS cloud account + + */ + CloudAccountUID string + /*KeyID + The globally unique identifier for the KMS key + + */ + KeyID string + /*Region + Region for which AWS KMS key belongs + + */ + Region string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 aws kms key get params +func (o *V1AwsKmsKeyGetParams) WithTimeout(timeout time.Duration) *V1AwsKmsKeyGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 aws kms key get params +func (o *V1AwsKmsKeyGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 aws kms key get params +func (o *V1AwsKmsKeyGetParams) WithContext(ctx context.Context) *V1AwsKmsKeyGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 aws kms key get params +func (o *V1AwsKmsKeyGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 aws kms key get params +func (o *V1AwsKmsKeyGetParams) WithHTTPClient(client *http.Client) *V1AwsKmsKeyGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 aws kms key get params +func (o *V1AwsKmsKeyGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithCloudAccountUID adds the cloudAccountUID to the v1 aws kms key get params +func (o *V1AwsKmsKeyGetParams) WithCloudAccountUID(cloudAccountUID string) *V1AwsKmsKeyGetParams { + o.SetCloudAccountUID(cloudAccountUID) + return o +} + +// SetCloudAccountUID adds the cloudAccountUid to the v1 aws kms key get params +func (o *V1AwsKmsKeyGetParams) SetCloudAccountUID(cloudAccountUID string) { + o.CloudAccountUID = cloudAccountUID +} + +// WithKeyID adds the keyID to the v1 aws kms key get params +func (o *V1AwsKmsKeyGetParams) WithKeyID(keyID string) *V1AwsKmsKeyGetParams { + o.SetKeyID(keyID) + return o +} + +// SetKeyID adds the keyId to the v1 aws kms key get params +func (o *V1AwsKmsKeyGetParams) SetKeyID(keyID string) { + o.KeyID = keyID +} + +// WithRegion adds the region to the v1 aws kms key get params +func (o *V1AwsKmsKeyGetParams) WithRegion(region string) *V1AwsKmsKeyGetParams { + o.SetRegion(region) + return o +} + +// SetRegion adds the region to the v1 aws kms key get params +func (o *V1AwsKmsKeyGetParams) SetRegion(region string) { + o.Region = region +} + +// WriteToRequest writes these params to a swagger request +func (o *V1AwsKmsKeyGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // query param cloudAccountUid + qrCloudAccountUID := o.CloudAccountUID + qCloudAccountUID := qrCloudAccountUID + if qCloudAccountUID != "" { + if err := r.SetQueryParam("cloudAccountUid", qCloudAccountUID); err != nil { + return err + } + } + + // path param keyId + if err := r.SetPathParam("keyId", o.KeyID); err != nil { + return err + } + + // path param region + if err := r.SetPathParam("region", o.Region); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_aws_kms_key_get_responses.go b/api/client/v1/v1_aws_kms_key_get_responses.go new file mode 100644 index 00000000..cefed3d4 --- /dev/null +++ b/api/client/v1/v1_aws_kms_key_get_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1AwsKmsKeyGetReader is a Reader for the V1AwsKmsKeyGet structure. +type V1AwsKmsKeyGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1AwsKmsKeyGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1AwsKmsKeyGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1AwsKmsKeyGetOK creates a V1AwsKmsKeyGetOK with default headers values +func NewV1AwsKmsKeyGetOK() *V1AwsKmsKeyGetOK { + return &V1AwsKmsKeyGetOK{} +} + +/* +V1AwsKmsKeyGetOK handles this case with default header values. + +(empty) +*/ +type V1AwsKmsKeyGetOK struct { + Payload *models.V1AwsKmsKeyEntity +} + +func (o *V1AwsKmsKeyGetOK) Error() string { + return fmt.Sprintf("[GET /v1/clouds/aws/regions/{region}/kms/{keyId}][%d] v1AwsKmsKeyGetOK %+v", 200, o.Payload) +} + +func (o *V1AwsKmsKeyGetOK) GetPayload() *models.V1AwsKmsKeyEntity { + return o.Payload +} + +func (o *V1AwsKmsKeyGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1AwsKmsKeyEntity) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_aws_kms_key_validate_parameters.go b/api/client/v1/v1_aws_kms_key_validate_parameters.go new file mode 100644 index 00000000..3665e54f --- /dev/null +++ b/api/client/v1/v1_aws_kms_key_validate_parameters.go @@ -0,0 +1,186 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1AwsKmsKeyValidateParams creates a new V1AwsKmsKeyValidateParams object +// with the default values initialized. +func NewV1AwsKmsKeyValidateParams() *V1AwsKmsKeyValidateParams { + var () + return &V1AwsKmsKeyValidateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1AwsKmsKeyValidateParamsWithTimeout creates a new V1AwsKmsKeyValidateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1AwsKmsKeyValidateParamsWithTimeout(timeout time.Duration) *V1AwsKmsKeyValidateParams { + var () + return &V1AwsKmsKeyValidateParams{ + + timeout: timeout, + } +} + +// NewV1AwsKmsKeyValidateParamsWithContext creates a new V1AwsKmsKeyValidateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1AwsKmsKeyValidateParamsWithContext(ctx context.Context) *V1AwsKmsKeyValidateParams { + var () + return &V1AwsKmsKeyValidateParams{ + + Context: ctx, + } +} + +// NewV1AwsKmsKeyValidateParamsWithHTTPClient creates a new V1AwsKmsKeyValidateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1AwsKmsKeyValidateParamsWithHTTPClient(client *http.Client) *V1AwsKmsKeyValidateParams { + var () + return &V1AwsKmsKeyValidateParams{ + HTTPClient: client, + } +} + +/* +V1AwsKmsKeyValidateParams contains all the parameters to send to the API endpoint +for the v1 aws kms key validate operation typically these are written to a http.Request +*/ +type V1AwsKmsKeyValidateParams struct { + + /*CloudAccountUID + Uid for the specific AWS cloud account + + */ + CloudAccountUID string + /*KeyArn + AWS KEY ARN for validation + + */ + KeyArn string + /*Region + Region for which AWS KMS key is validated + + */ + Region string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 aws kms key validate params +func (o *V1AwsKmsKeyValidateParams) WithTimeout(timeout time.Duration) *V1AwsKmsKeyValidateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 aws kms key validate params +func (o *V1AwsKmsKeyValidateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 aws kms key validate params +func (o *V1AwsKmsKeyValidateParams) WithContext(ctx context.Context) *V1AwsKmsKeyValidateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 aws kms key validate params +func (o *V1AwsKmsKeyValidateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 aws kms key validate params +func (o *V1AwsKmsKeyValidateParams) WithHTTPClient(client *http.Client) *V1AwsKmsKeyValidateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 aws kms key validate params +func (o *V1AwsKmsKeyValidateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithCloudAccountUID adds the cloudAccountUID to the v1 aws kms key validate params +func (o *V1AwsKmsKeyValidateParams) WithCloudAccountUID(cloudAccountUID string) *V1AwsKmsKeyValidateParams { + o.SetCloudAccountUID(cloudAccountUID) + return o +} + +// SetCloudAccountUID adds the cloudAccountUid to the v1 aws kms key validate params +func (o *V1AwsKmsKeyValidateParams) SetCloudAccountUID(cloudAccountUID string) { + o.CloudAccountUID = cloudAccountUID +} + +// WithKeyArn adds the keyArn to the v1 aws kms key validate params +func (o *V1AwsKmsKeyValidateParams) WithKeyArn(keyArn string) *V1AwsKmsKeyValidateParams { + o.SetKeyArn(keyArn) + return o +} + +// SetKeyArn adds the keyArn to the v1 aws kms key validate params +func (o *V1AwsKmsKeyValidateParams) SetKeyArn(keyArn string) { + o.KeyArn = keyArn +} + +// WithRegion adds the region to the v1 aws kms key validate params +func (o *V1AwsKmsKeyValidateParams) WithRegion(region string) *V1AwsKmsKeyValidateParams { + o.SetRegion(region) + return o +} + +// SetRegion adds the region to the v1 aws kms key validate params +func (o *V1AwsKmsKeyValidateParams) SetRegion(region string) { + o.Region = region +} + +// WriteToRequest writes these params to a swagger request +func (o *V1AwsKmsKeyValidateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // query param cloudAccountUid + qrCloudAccountUID := o.CloudAccountUID + qCloudAccountUID := qrCloudAccountUID + if qCloudAccountUID != "" { + if err := r.SetQueryParam("cloudAccountUid", qCloudAccountUID); err != nil { + return err + } + } + + // query param keyArn + qrKeyArn := o.KeyArn + qKeyArn := qrKeyArn + if qKeyArn != "" { + if err := r.SetQueryParam("keyArn", qKeyArn); err != nil { + return err + } + } + + // path param region + if err := r.SetPathParam("region", o.Region); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_aws_kms_key_validate_responses.go b/api/client/v1/v1_aws_kms_key_validate_responses.go new file mode 100644 index 00000000..34519540 --- /dev/null +++ b/api/client/v1/v1_aws_kms_key_validate_responses.go @@ -0,0 +1,61 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1AwsKmsKeyValidateReader is a Reader for the V1AwsKmsKeyValidate structure. +type V1AwsKmsKeyValidateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1AwsKmsKeyValidateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1AwsKmsKeyValidateNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1AwsKmsKeyValidateNoContent creates a V1AwsKmsKeyValidateNoContent with default headers values +func NewV1AwsKmsKeyValidateNoContent() *V1AwsKmsKeyValidateNoContent { + return &V1AwsKmsKeyValidateNoContent{} +} + +/* +V1AwsKmsKeyValidateNoContent handles this case with default header values. + +Ok response without content +*/ +type V1AwsKmsKeyValidateNoContent struct { + /*Audit uid for the request + */ + AuditUID string +} + +func (o *V1AwsKmsKeyValidateNoContent) Error() string { + return fmt.Sprintf("[GET /v1/clouds/aws/regions/{region}/kmskeys/validate][%d] v1AwsKmsKeyValidateNoContent ", 204) +} + +func (o *V1AwsKmsKeyValidateNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header AuditUid + o.AuditUID = response.GetHeader("AuditUid") + + return nil +} diff --git a/api/client/v1/v1_aws_kms_keys_parameters.go b/api/client/v1/v1_aws_kms_keys_parameters.go new file mode 100644 index 00000000..1cd9fe72 --- /dev/null +++ b/api/client/v1/v1_aws_kms_keys_parameters.go @@ -0,0 +1,161 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1AwsKmsKeysParams creates a new V1AwsKmsKeysParams object +// with the default values initialized. +func NewV1AwsKmsKeysParams() *V1AwsKmsKeysParams { + var () + return &V1AwsKmsKeysParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1AwsKmsKeysParamsWithTimeout creates a new V1AwsKmsKeysParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1AwsKmsKeysParamsWithTimeout(timeout time.Duration) *V1AwsKmsKeysParams { + var () + return &V1AwsKmsKeysParams{ + + timeout: timeout, + } +} + +// NewV1AwsKmsKeysParamsWithContext creates a new V1AwsKmsKeysParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1AwsKmsKeysParamsWithContext(ctx context.Context) *V1AwsKmsKeysParams { + var () + return &V1AwsKmsKeysParams{ + + Context: ctx, + } +} + +// NewV1AwsKmsKeysParamsWithHTTPClient creates a new V1AwsKmsKeysParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1AwsKmsKeysParamsWithHTTPClient(client *http.Client) *V1AwsKmsKeysParams { + var () + return &V1AwsKmsKeysParams{ + HTTPClient: client, + } +} + +/* +V1AwsKmsKeysParams contains all the parameters to send to the API endpoint +for the v1 aws kms keys operation typically these are written to a http.Request +*/ +type V1AwsKmsKeysParams struct { + + /*CloudAccountUID + Uid for the specific AWS cloud account + + */ + CloudAccountUID string + /*Region + Region for which AWS KMS key are requested + + */ + Region string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 aws kms keys params +func (o *V1AwsKmsKeysParams) WithTimeout(timeout time.Duration) *V1AwsKmsKeysParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 aws kms keys params +func (o *V1AwsKmsKeysParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 aws kms keys params +func (o *V1AwsKmsKeysParams) WithContext(ctx context.Context) *V1AwsKmsKeysParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 aws kms keys params +func (o *V1AwsKmsKeysParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 aws kms keys params +func (o *V1AwsKmsKeysParams) WithHTTPClient(client *http.Client) *V1AwsKmsKeysParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 aws kms keys params +func (o *V1AwsKmsKeysParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithCloudAccountUID adds the cloudAccountUID to the v1 aws kms keys params +func (o *V1AwsKmsKeysParams) WithCloudAccountUID(cloudAccountUID string) *V1AwsKmsKeysParams { + o.SetCloudAccountUID(cloudAccountUID) + return o +} + +// SetCloudAccountUID adds the cloudAccountUid to the v1 aws kms keys params +func (o *V1AwsKmsKeysParams) SetCloudAccountUID(cloudAccountUID string) { + o.CloudAccountUID = cloudAccountUID +} + +// WithRegion adds the region to the v1 aws kms keys params +func (o *V1AwsKmsKeysParams) WithRegion(region string) *V1AwsKmsKeysParams { + o.SetRegion(region) + return o +} + +// SetRegion adds the region to the v1 aws kms keys params +func (o *V1AwsKmsKeysParams) SetRegion(region string) { + o.Region = region +} + +// WriteToRequest writes these params to a swagger request +func (o *V1AwsKmsKeysParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // query param cloudAccountUid + qrCloudAccountUID := o.CloudAccountUID + qCloudAccountUID := qrCloudAccountUID + if qCloudAccountUID != "" { + if err := r.SetQueryParam("cloudAccountUid", qCloudAccountUID); err != nil { + return err + } + } + + // path param region + if err := r.SetPathParam("region", o.Region); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_aws_kms_keys_responses.go b/api/client/v1/v1_aws_kms_keys_responses.go new file mode 100644 index 00000000..c7ac818e --- /dev/null +++ b/api/client/v1/v1_aws_kms_keys_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1AwsKmsKeysReader is a Reader for the V1AwsKmsKeys structure. +type V1AwsKmsKeysReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1AwsKmsKeysReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1AwsKmsKeysOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1AwsKmsKeysOK creates a V1AwsKmsKeysOK with default headers values +func NewV1AwsKmsKeysOK() *V1AwsKmsKeysOK { + return &V1AwsKmsKeysOK{} +} + +/* +V1AwsKmsKeysOK handles this case with default header values. + +(empty) +*/ +type V1AwsKmsKeysOK struct { + Payload *models.V1AwsKmsKeys +} + +func (o *V1AwsKmsKeysOK) Error() string { + return fmt.Sprintf("[GET /v1/clouds/aws/regions/{region}/kmskeys][%d] v1AwsKmsKeysOK %+v", 200, o.Payload) +} + +func (o *V1AwsKmsKeysOK) GetPayload() *models.V1AwsKmsKeys { + return o.Payload +} + +func (o *V1AwsKmsKeysOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1AwsKmsKeys) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_aws_policy_arns_validate_parameters.go b/api/client/v1/v1_aws_policy_arns_validate_parameters.go new file mode 100644 index 00000000..2ce37ff9 --- /dev/null +++ b/api/client/v1/v1_aws_policy_arns_validate_parameters.go @@ -0,0 +1,171 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1AwsPolicyArnsValidateParams creates a new V1AwsPolicyArnsValidateParams object +// with the default values initialized. +func NewV1AwsPolicyArnsValidateParams() *V1AwsPolicyArnsValidateParams { + var () + return &V1AwsPolicyArnsValidateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1AwsPolicyArnsValidateParamsWithTimeout creates a new V1AwsPolicyArnsValidateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1AwsPolicyArnsValidateParamsWithTimeout(timeout time.Duration) *V1AwsPolicyArnsValidateParams { + var () + return &V1AwsPolicyArnsValidateParams{ + + timeout: timeout, + } +} + +// NewV1AwsPolicyArnsValidateParamsWithContext creates a new V1AwsPolicyArnsValidateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1AwsPolicyArnsValidateParamsWithContext(ctx context.Context) *V1AwsPolicyArnsValidateParams { + var () + return &V1AwsPolicyArnsValidateParams{ + + Context: ctx, + } +} + +// NewV1AwsPolicyArnsValidateParamsWithHTTPClient creates a new V1AwsPolicyArnsValidateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1AwsPolicyArnsValidateParamsWithHTTPClient(client *http.Client) *V1AwsPolicyArnsValidateParams { + var () + return &V1AwsPolicyArnsValidateParams{ + HTTPClient: client, + } +} + +/* +V1AwsPolicyArnsValidateParams contains all the parameters to send to the API endpoint +for the v1 aws policy arns validate operation typically these are written to a http.Request +*/ +type V1AwsPolicyArnsValidateParams struct { + + /*CloudAccountUID + Uid for the specific AWS cloud account + + */ + CloudAccountUID *string + /*Spec + Request payload to validate AWS policy ARN + + */ + Spec *models.V1AwsPolicyArnsSpec + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 aws policy arns validate params +func (o *V1AwsPolicyArnsValidateParams) WithTimeout(timeout time.Duration) *V1AwsPolicyArnsValidateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 aws policy arns validate params +func (o *V1AwsPolicyArnsValidateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 aws policy arns validate params +func (o *V1AwsPolicyArnsValidateParams) WithContext(ctx context.Context) *V1AwsPolicyArnsValidateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 aws policy arns validate params +func (o *V1AwsPolicyArnsValidateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 aws policy arns validate params +func (o *V1AwsPolicyArnsValidateParams) WithHTTPClient(client *http.Client) *V1AwsPolicyArnsValidateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 aws policy arns validate params +func (o *V1AwsPolicyArnsValidateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithCloudAccountUID adds the cloudAccountUID to the v1 aws policy arns validate params +func (o *V1AwsPolicyArnsValidateParams) WithCloudAccountUID(cloudAccountUID *string) *V1AwsPolicyArnsValidateParams { + o.SetCloudAccountUID(cloudAccountUID) + return o +} + +// SetCloudAccountUID adds the cloudAccountUid to the v1 aws policy arns validate params +func (o *V1AwsPolicyArnsValidateParams) SetCloudAccountUID(cloudAccountUID *string) { + o.CloudAccountUID = cloudAccountUID +} + +// WithSpec adds the spec to the v1 aws policy arns validate params +func (o *V1AwsPolicyArnsValidateParams) WithSpec(spec *models.V1AwsPolicyArnsSpec) *V1AwsPolicyArnsValidateParams { + o.SetSpec(spec) + return o +} + +// SetSpec adds the spec to the v1 aws policy arns validate params +func (o *V1AwsPolicyArnsValidateParams) SetSpec(spec *models.V1AwsPolicyArnsSpec) { + o.Spec = spec +} + +// WriteToRequest writes these params to a swagger request +func (o *V1AwsPolicyArnsValidateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.CloudAccountUID != nil { + + // query param cloudAccountUid + var qrCloudAccountUID string + if o.CloudAccountUID != nil { + qrCloudAccountUID = *o.CloudAccountUID + } + qCloudAccountUID := qrCloudAccountUID + if qCloudAccountUID != "" { + if err := r.SetQueryParam("cloudAccountUid", qCloudAccountUID); err != nil { + return err + } + } + + } + + if o.Spec != nil { + if err := r.SetBodyParam(o.Spec); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_aws_policy_arns_validate_responses.go b/api/client/v1/v1_aws_policy_arns_validate_responses.go new file mode 100644 index 00000000..02ef199f --- /dev/null +++ b/api/client/v1/v1_aws_policy_arns_validate_responses.go @@ -0,0 +1,61 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1AwsPolicyArnsValidateReader is a Reader for the V1AwsPolicyArnsValidate structure. +type V1AwsPolicyArnsValidateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1AwsPolicyArnsValidateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1AwsPolicyArnsValidateNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1AwsPolicyArnsValidateNoContent creates a V1AwsPolicyArnsValidateNoContent with default headers values +func NewV1AwsPolicyArnsValidateNoContent() *V1AwsPolicyArnsValidateNoContent { + return &V1AwsPolicyArnsValidateNoContent{} +} + +/* +V1AwsPolicyArnsValidateNoContent handles this case with default header values. + +Ok response without content +*/ +type V1AwsPolicyArnsValidateNoContent struct { + /*Audit uid for the request + */ + AuditUID string +} + +func (o *V1AwsPolicyArnsValidateNoContent) Error() string { + return fmt.Sprintf("[POST /v1/clouds/aws/policyArns/validate][%d] v1AwsPolicyArnsValidateNoContent ", 204) +} + +func (o *V1AwsPolicyArnsValidateNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header AuditUid + o.AuditUID = response.GetHeader("AuditUid") + + return nil +} diff --git a/api/client/v1/v1_aws_properties_validate_parameters.go b/api/client/v1/v1_aws_properties_validate_parameters.go new file mode 100644 index 00000000..9c583463 --- /dev/null +++ b/api/client/v1/v1_aws_properties_validate_parameters.go @@ -0,0 +1,139 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1AwsPropertiesValidateParams creates a new V1AwsPropertiesValidateParams object +// with the default values initialized. +func NewV1AwsPropertiesValidateParams() *V1AwsPropertiesValidateParams { + var () + return &V1AwsPropertiesValidateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1AwsPropertiesValidateParamsWithTimeout creates a new V1AwsPropertiesValidateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1AwsPropertiesValidateParamsWithTimeout(timeout time.Duration) *V1AwsPropertiesValidateParams { + var () + return &V1AwsPropertiesValidateParams{ + + timeout: timeout, + } +} + +// NewV1AwsPropertiesValidateParamsWithContext creates a new V1AwsPropertiesValidateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1AwsPropertiesValidateParamsWithContext(ctx context.Context) *V1AwsPropertiesValidateParams { + var () + return &V1AwsPropertiesValidateParams{ + + Context: ctx, + } +} + +// NewV1AwsPropertiesValidateParamsWithHTTPClient creates a new V1AwsPropertiesValidateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1AwsPropertiesValidateParamsWithHTTPClient(client *http.Client) *V1AwsPropertiesValidateParams { + var () + return &V1AwsPropertiesValidateParams{ + HTTPClient: client, + } +} + +/* +V1AwsPropertiesValidateParams contains all the parameters to send to the API endpoint +for the v1 aws properties validate operation typically these are written to a http.Request +*/ +type V1AwsPropertiesValidateParams struct { + + /*Properties + Request payload for AWS properties validate spec + + */ + Properties *models.V1AwsPropertiesValidateSpec + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 aws properties validate params +func (o *V1AwsPropertiesValidateParams) WithTimeout(timeout time.Duration) *V1AwsPropertiesValidateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 aws properties validate params +func (o *V1AwsPropertiesValidateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 aws properties validate params +func (o *V1AwsPropertiesValidateParams) WithContext(ctx context.Context) *V1AwsPropertiesValidateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 aws properties validate params +func (o *V1AwsPropertiesValidateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 aws properties validate params +func (o *V1AwsPropertiesValidateParams) WithHTTPClient(client *http.Client) *V1AwsPropertiesValidateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 aws properties validate params +func (o *V1AwsPropertiesValidateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithProperties adds the properties to the v1 aws properties validate params +func (o *V1AwsPropertiesValidateParams) WithProperties(properties *models.V1AwsPropertiesValidateSpec) *V1AwsPropertiesValidateParams { + o.SetProperties(properties) + return o +} + +// SetProperties adds the properties to the v1 aws properties validate params +func (o *V1AwsPropertiesValidateParams) SetProperties(properties *models.V1AwsPropertiesValidateSpec) { + o.Properties = properties +} + +// WriteToRequest writes these params to a swagger request +func (o *V1AwsPropertiesValidateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Properties != nil { + if err := r.SetBodyParam(o.Properties); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_aws_properties_validate_responses.go b/api/client/v1/v1_aws_properties_validate_responses.go new file mode 100644 index 00000000..367a3dcd --- /dev/null +++ b/api/client/v1/v1_aws_properties_validate_responses.go @@ -0,0 +1,61 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1AwsPropertiesValidateReader is a Reader for the V1AwsPropertiesValidate structure. +type V1AwsPropertiesValidateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1AwsPropertiesValidateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1AwsPropertiesValidateNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1AwsPropertiesValidateNoContent creates a V1AwsPropertiesValidateNoContent with default headers values +func NewV1AwsPropertiesValidateNoContent() *V1AwsPropertiesValidateNoContent { + return &V1AwsPropertiesValidateNoContent{} +} + +/* +V1AwsPropertiesValidateNoContent handles this case with default header values. + +Ok response without content +*/ +type V1AwsPropertiesValidateNoContent struct { + /*Audit uid for the request + */ + AuditUID string +} + +func (o *V1AwsPropertiesValidateNoContent) Error() string { + return fmt.Sprintf("[POST /v1/clouds/aws/properties/validate][%d] v1AwsPropertiesValidateNoContent ", 204) +} + +func (o *V1AwsPropertiesValidateNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header AuditUid + o.AuditUID = response.GetHeader("AuditUid") + + return nil +} diff --git a/api/client/v1/v1_aws_regions_parameters.go b/api/client/v1/v1_aws_regions_parameters.go new file mode 100644 index 00000000..0068451b --- /dev/null +++ b/api/client/v1/v1_aws_regions_parameters.go @@ -0,0 +1,140 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1AwsRegionsParams creates a new V1AwsRegionsParams object +// with the default values initialized. +func NewV1AwsRegionsParams() *V1AwsRegionsParams { + var () + return &V1AwsRegionsParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1AwsRegionsParamsWithTimeout creates a new V1AwsRegionsParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1AwsRegionsParamsWithTimeout(timeout time.Duration) *V1AwsRegionsParams { + var () + return &V1AwsRegionsParams{ + + timeout: timeout, + } +} + +// NewV1AwsRegionsParamsWithContext creates a new V1AwsRegionsParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1AwsRegionsParamsWithContext(ctx context.Context) *V1AwsRegionsParams { + var () + return &V1AwsRegionsParams{ + + Context: ctx, + } +} + +// NewV1AwsRegionsParamsWithHTTPClient creates a new V1AwsRegionsParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1AwsRegionsParamsWithHTTPClient(client *http.Client) *V1AwsRegionsParams { + var () + return &V1AwsRegionsParams{ + HTTPClient: client, + } +} + +/* +V1AwsRegionsParams contains all the parameters to send to the API endpoint +for the v1 aws regions operation typically these are written to a http.Request +*/ +type V1AwsRegionsParams struct { + + /*CloudAccountUID + Uid for the specific AWS cloud account + + */ + CloudAccountUID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 aws regions params +func (o *V1AwsRegionsParams) WithTimeout(timeout time.Duration) *V1AwsRegionsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 aws regions params +func (o *V1AwsRegionsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 aws regions params +func (o *V1AwsRegionsParams) WithContext(ctx context.Context) *V1AwsRegionsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 aws regions params +func (o *V1AwsRegionsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 aws regions params +func (o *V1AwsRegionsParams) WithHTTPClient(client *http.Client) *V1AwsRegionsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 aws regions params +func (o *V1AwsRegionsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithCloudAccountUID adds the cloudAccountUID to the v1 aws regions params +func (o *V1AwsRegionsParams) WithCloudAccountUID(cloudAccountUID string) *V1AwsRegionsParams { + o.SetCloudAccountUID(cloudAccountUID) + return o +} + +// SetCloudAccountUID adds the cloudAccountUid to the v1 aws regions params +func (o *V1AwsRegionsParams) SetCloudAccountUID(cloudAccountUID string) { + o.CloudAccountUID = cloudAccountUID +} + +// WriteToRequest writes these params to a swagger request +func (o *V1AwsRegionsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // query param cloudAccountUid + qrCloudAccountUID := o.CloudAccountUID + qCloudAccountUID := qrCloudAccountUID + if qCloudAccountUID != "" { + if err := r.SetQueryParam("cloudAccountUid", qCloudAccountUID); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_aws_regions_responses.go b/api/client/v1/v1_aws_regions_responses.go new file mode 100644 index 00000000..69260509 --- /dev/null +++ b/api/client/v1/v1_aws_regions_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1AwsRegionsReader is a Reader for the V1AwsRegions structure. +type V1AwsRegionsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1AwsRegionsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1AwsRegionsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1AwsRegionsOK creates a V1AwsRegionsOK with default headers values +func NewV1AwsRegionsOK() *V1AwsRegionsOK { + return &V1AwsRegionsOK{} +} + +/* +V1AwsRegionsOK handles this case with default header values. + +(empty) +*/ +type V1AwsRegionsOK struct { + Payload *models.V1AwsRegions +} + +func (o *V1AwsRegionsOK) Error() string { + return fmt.Sprintf("[GET /v1/clouds/aws/regions][%d] v1AwsRegionsOK %+v", 200, o.Payload) +} + +func (o *V1AwsRegionsOK) GetPayload() *models.V1AwsRegions { + return o.Payload +} + +func (o *V1AwsRegionsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1AwsRegions) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_aws_s3_validate_parameters.go b/api/client/v1/v1_aws_s3_validate_parameters.go new file mode 100644 index 00000000..50192355 --- /dev/null +++ b/api/client/v1/v1_aws_s3_validate_parameters.go @@ -0,0 +1,139 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1AwsS3ValidateParams creates a new V1AwsS3ValidateParams object +// with the default values initialized. +func NewV1AwsS3ValidateParams() *V1AwsS3ValidateParams { + var () + return &V1AwsS3ValidateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1AwsS3ValidateParamsWithTimeout creates a new V1AwsS3ValidateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1AwsS3ValidateParamsWithTimeout(timeout time.Duration) *V1AwsS3ValidateParams { + var () + return &V1AwsS3ValidateParams{ + + timeout: timeout, + } +} + +// NewV1AwsS3ValidateParamsWithContext creates a new V1AwsS3ValidateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1AwsS3ValidateParamsWithContext(ctx context.Context) *V1AwsS3ValidateParams { + var () + return &V1AwsS3ValidateParams{ + + Context: ctx, + } +} + +// NewV1AwsS3ValidateParamsWithHTTPClient creates a new V1AwsS3ValidateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1AwsS3ValidateParamsWithHTTPClient(client *http.Client) *V1AwsS3ValidateParams { + var () + return &V1AwsS3ValidateParams{ + HTTPClient: client, + } +} + +/* +V1AwsS3ValidateParams contains all the parameters to send to the API endpoint +for the v1 aws s3 validate operation typically these are written to a http.Request +*/ +type V1AwsS3ValidateParams struct { + + /*AwsS3Credential + AWS S3 bucket credentials + + */ + AwsS3Credential *models.V1AwsS3BucketCredentials + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 aws s3 validate params +func (o *V1AwsS3ValidateParams) WithTimeout(timeout time.Duration) *V1AwsS3ValidateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 aws s3 validate params +func (o *V1AwsS3ValidateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 aws s3 validate params +func (o *V1AwsS3ValidateParams) WithContext(ctx context.Context) *V1AwsS3ValidateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 aws s3 validate params +func (o *V1AwsS3ValidateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 aws s3 validate params +func (o *V1AwsS3ValidateParams) WithHTTPClient(client *http.Client) *V1AwsS3ValidateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 aws s3 validate params +func (o *V1AwsS3ValidateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithAwsS3Credential adds the awsS3Credential to the v1 aws s3 validate params +func (o *V1AwsS3ValidateParams) WithAwsS3Credential(awsS3Credential *models.V1AwsS3BucketCredentials) *V1AwsS3ValidateParams { + o.SetAwsS3Credential(awsS3Credential) + return o +} + +// SetAwsS3Credential adds the awsS3Credential to the v1 aws s3 validate params +func (o *V1AwsS3ValidateParams) SetAwsS3Credential(awsS3Credential *models.V1AwsS3BucketCredentials) { + o.AwsS3Credential = awsS3Credential +} + +// WriteToRequest writes these params to a swagger request +func (o *V1AwsS3ValidateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.AwsS3Credential != nil { + if err := r.SetBodyParam(o.AwsS3Credential); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_aws_s3_validate_responses.go b/api/client/v1/v1_aws_s3_validate_responses.go new file mode 100644 index 00000000..47629435 --- /dev/null +++ b/api/client/v1/v1_aws_s3_validate_responses.go @@ -0,0 +1,61 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1AwsS3ValidateReader is a Reader for the V1AwsS3Validate structure. +type V1AwsS3ValidateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1AwsS3ValidateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1AwsS3ValidateNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1AwsS3ValidateNoContent creates a V1AwsS3ValidateNoContent with default headers values +func NewV1AwsS3ValidateNoContent() *V1AwsS3ValidateNoContent { + return &V1AwsS3ValidateNoContent{} +} + +/* +V1AwsS3ValidateNoContent handles this case with default header values. + +Ok response without content +*/ +type V1AwsS3ValidateNoContent struct { + /*Audit uid for the request + */ + AuditUID string +} + +func (o *V1AwsS3ValidateNoContent) Error() string { + return fmt.Sprintf("[POST /v1/clouds/aws/s3/validate][%d] v1AwsS3ValidateNoContent ", 204) +} + +func (o *V1AwsS3ValidateNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header AuditUid + o.AuditUID = response.GetHeader("AuditUid") + + return nil +} diff --git a/api/client/v1/v1_aws_security_groups_parameters.go b/api/client/v1/v1_aws_security_groups_parameters.go new file mode 100644 index 00000000..f09c29de --- /dev/null +++ b/api/client/v1/v1_aws_security_groups_parameters.go @@ -0,0 +1,197 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1AwsSecurityGroupsParams creates a new V1AwsSecurityGroupsParams object +// with the default values initialized. +func NewV1AwsSecurityGroupsParams() *V1AwsSecurityGroupsParams { + var () + return &V1AwsSecurityGroupsParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1AwsSecurityGroupsParamsWithTimeout creates a new V1AwsSecurityGroupsParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1AwsSecurityGroupsParamsWithTimeout(timeout time.Duration) *V1AwsSecurityGroupsParams { + var () + return &V1AwsSecurityGroupsParams{ + + timeout: timeout, + } +} + +// NewV1AwsSecurityGroupsParamsWithContext creates a new V1AwsSecurityGroupsParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1AwsSecurityGroupsParamsWithContext(ctx context.Context) *V1AwsSecurityGroupsParams { + var () + return &V1AwsSecurityGroupsParams{ + + Context: ctx, + } +} + +// NewV1AwsSecurityGroupsParamsWithHTTPClient creates a new V1AwsSecurityGroupsParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1AwsSecurityGroupsParamsWithHTTPClient(client *http.Client) *V1AwsSecurityGroupsParams { + var () + return &V1AwsSecurityGroupsParams{ + HTTPClient: client, + } +} + +/* +V1AwsSecurityGroupsParams contains all the parameters to send to the API endpoint +for the v1 aws security groups operation typically these are written to a http.Request +*/ +type V1AwsSecurityGroupsParams struct { + + /*CloudAccountUID + Uid for the specific AWS cloud account + + */ + CloudAccountUID *string + /*Region + Region for which security groups are requested + + */ + Region string + /*VpcID + Vpc Id for which security groups are requested + + */ + VpcID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 aws security groups params +func (o *V1AwsSecurityGroupsParams) WithTimeout(timeout time.Duration) *V1AwsSecurityGroupsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 aws security groups params +func (o *V1AwsSecurityGroupsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 aws security groups params +func (o *V1AwsSecurityGroupsParams) WithContext(ctx context.Context) *V1AwsSecurityGroupsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 aws security groups params +func (o *V1AwsSecurityGroupsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 aws security groups params +func (o *V1AwsSecurityGroupsParams) WithHTTPClient(client *http.Client) *V1AwsSecurityGroupsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 aws security groups params +func (o *V1AwsSecurityGroupsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithCloudAccountUID adds the cloudAccountUID to the v1 aws security groups params +func (o *V1AwsSecurityGroupsParams) WithCloudAccountUID(cloudAccountUID *string) *V1AwsSecurityGroupsParams { + o.SetCloudAccountUID(cloudAccountUID) + return o +} + +// SetCloudAccountUID adds the cloudAccountUid to the v1 aws security groups params +func (o *V1AwsSecurityGroupsParams) SetCloudAccountUID(cloudAccountUID *string) { + o.CloudAccountUID = cloudAccountUID +} + +// WithRegion adds the region to the v1 aws security groups params +func (o *V1AwsSecurityGroupsParams) WithRegion(region string) *V1AwsSecurityGroupsParams { + o.SetRegion(region) + return o +} + +// SetRegion adds the region to the v1 aws security groups params +func (o *V1AwsSecurityGroupsParams) SetRegion(region string) { + o.Region = region +} + +// WithVpcID adds the vpcID to the v1 aws security groups params +func (o *V1AwsSecurityGroupsParams) WithVpcID(vpcID string) *V1AwsSecurityGroupsParams { + o.SetVpcID(vpcID) + return o +} + +// SetVpcID adds the vpcId to the v1 aws security groups params +func (o *V1AwsSecurityGroupsParams) SetVpcID(vpcID string) { + o.VpcID = vpcID +} + +// WriteToRequest writes these params to a swagger request +func (o *V1AwsSecurityGroupsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.CloudAccountUID != nil { + + // query param cloudAccountUid + var qrCloudAccountUID string + if o.CloudAccountUID != nil { + qrCloudAccountUID = *o.CloudAccountUID + } + qCloudAccountUID := qrCloudAccountUID + if qCloudAccountUID != "" { + if err := r.SetQueryParam("cloudAccountUid", qCloudAccountUID); err != nil { + return err + } + } + + } + + // query param region + qrRegion := o.Region + qRegion := qrRegion + if qRegion != "" { + if err := r.SetQueryParam("region", qRegion); err != nil { + return err + } + } + + // query param vpcId + qrVpcID := o.VpcID + qVpcID := qrVpcID + if qVpcID != "" { + if err := r.SetQueryParam("vpcId", qVpcID); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_aws_security_groups_responses.go b/api/client/v1/v1_aws_security_groups_responses.go new file mode 100644 index 00000000..3bf82f72 --- /dev/null +++ b/api/client/v1/v1_aws_security_groups_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1AwsSecurityGroupsReader is a Reader for the V1AwsSecurityGroups structure. +type V1AwsSecurityGroupsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1AwsSecurityGroupsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1AwsSecurityGroupsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1AwsSecurityGroupsOK creates a V1AwsSecurityGroupsOK with default headers values +func NewV1AwsSecurityGroupsOK() *V1AwsSecurityGroupsOK { + return &V1AwsSecurityGroupsOK{} +} + +/* +V1AwsSecurityGroupsOK handles this case with default header values. + +(empty) +*/ +type V1AwsSecurityGroupsOK struct { + Payload *models.V1AwsSecurityGroups +} + +func (o *V1AwsSecurityGroupsOK) Error() string { + return fmt.Sprintf("[GET /v1/clouds/aws/securitygroups][%d] v1AwsSecurityGroupsOK %+v", 200, o.Payload) +} + +func (o *V1AwsSecurityGroupsOK) GetPayload() *models.V1AwsSecurityGroups { + return o.Payload +} + +func (o *V1AwsSecurityGroupsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1AwsSecurityGroups) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_aws_storage_types_parameters.go b/api/client/v1/v1_aws_storage_types_parameters.go new file mode 100644 index 00000000..d4d52cb1 --- /dev/null +++ b/api/client/v1/v1_aws_storage_types_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1AwsStorageTypesParams creates a new V1AwsStorageTypesParams object +// with the default values initialized. +func NewV1AwsStorageTypesParams() *V1AwsStorageTypesParams { + var () + return &V1AwsStorageTypesParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1AwsStorageTypesParamsWithTimeout creates a new V1AwsStorageTypesParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1AwsStorageTypesParamsWithTimeout(timeout time.Duration) *V1AwsStorageTypesParams { + var () + return &V1AwsStorageTypesParams{ + + timeout: timeout, + } +} + +// NewV1AwsStorageTypesParamsWithContext creates a new V1AwsStorageTypesParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1AwsStorageTypesParamsWithContext(ctx context.Context) *V1AwsStorageTypesParams { + var () + return &V1AwsStorageTypesParams{ + + Context: ctx, + } +} + +// NewV1AwsStorageTypesParamsWithHTTPClient creates a new V1AwsStorageTypesParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1AwsStorageTypesParamsWithHTTPClient(client *http.Client) *V1AwsStorageTypesParams { + var () + return &V1AwsStorageTypesParams{ + HTTPClient: client, + } +} + +/* +V1AwsStorageTypesParams contains all the parameters to send to the API endpoint +for the v1 aws storage types operation typically these are written to a http.Request +*/ +type V1AwsStorageTypesParams struct { + + /*Region + Region for which AWS storage types are requested + + */ + Region string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 aws storage types params +func (o *V1AwsStorageTypesParams) WithTimeout(timeout time.Duration) *V1AwsStorageTypesParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 aws storage types params +func (o *V1AwsStorageTypesParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 aws storage types params +func (o *V1AwsStorageTypesParams) WithContext(ctx context.Context) *V1AwsStorageTypesParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 aws storage types params +func (o *V1AwsStorageTypesParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 aws storage types params +func (o *V1AwsStorageTypesParams) WithHTTPClient(client *http.Client) *V1AwsStorageTypesParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 aws storage types params +func (o *V1AwsStorageTypesParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithRegion adds the region to the v1 aws storage types params +func (o *V1AwsStorageTypesParams) WithRegion(region string) *V1AwsStorageTypesParams { + o.SetRegion(region) + return o +} + +// SetRegion adds the region to the v1 aws storage types params +func (o *V1AwsStorageTypesParams) SetRegion(region string) { + o.Region = region +} + +// WriteToRequest writes these params to a swagger request +func (o *V1AwsStorageTypesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param region + if err := r.SetPathParam("region", o.Region); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_aws_storage_types_responses.go b/api/client/v1/v1_aws_storage_types_responses.go new file mode 100644 index 00000000..bda38373 --- /dev/null +++ b/api/client/v1/v1_aws_storage_types_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1AwsStorageTypesReader is a Reader for the V1AwsStorageTypes structure. +type V1AwsStorageTypesReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1AwsStorageTypesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1AwsStorageTypesOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1AwsStorageTypesOK creates a V1AwsStorageTypesOK with default headers values +func NewV1AwsStorageTypesOK() *V1AwsStorageTypesOK { + return &V1AwsStorageTypesOK{} +} + +/* +V1AwsStorageTypesOK handles this case with default header values. + +(empty) +*/ +type V1AwsStorageTypesOK struct { + Payload *models.V1AwsStorageTypes +} + +func (o *V1AwsStorageTypesOK) Error() string { + return fmt.Sprintf("[GET /v1/clouds/aws/regions/{region}/storagetypes][%d] v1AwsStorageTypesOK %+v", 200, o.Payload) +} + +func (o *V1AwsStorageTypesOK) GetPayload() *models.V1AwsStorageTypes { + return o.Payload +} + +func (o *V1AwsStorageTypesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1AwsStorageTypes) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_aws_volume_size_get_parameters.go b/api/client/v1/v1_aws_volume_size_get_parameters.go new file mode 100644 index 00000000..d36b1cfc --- /dev/null +++ b/api/client/v1/v1_aws_volume_size_get_parameters.go @@ -0,0 +1,186 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1AwsVolumeSizeGetParams creates a new V1AwsVolumeSizeGetParams object +// with the default values initialized. +func NewV1AwsVolumeSizeGetParams() *V1AwsVolumeSizeGetParams { + var () + return &V1AwsVolumeSizeGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1AwsVolumeSizeGetParamsWithTimeout creates a new V1AwsVolumeSizeGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1AwsVolumeSizeGetParamsWithTimeout(timeout time.Duration) *V1AwsVolumeSizeGetParams { + var () + return &V1AwsVolumeSizeGetParams{ + + timeout: timeout, + } +} + +// NewV1AwsVolumeSizeGetParamsWithContext creates a new V1AwsVolumeSizeGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1AwsVolumeSizeGetParamsWithContext(ctx context.Context) *V1AwsVolumeSizeGetParams { + var () + return &V1AwsVolumeSizeGetParams{ + + Context: ctx, + } +} + +// NewV1AwsVolumeSizeGetParamsWithHTTPClient creates a new V1AwsVolumeSizeGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1AwsVolumeSizeGetParamsWithHTTPClient(client *http.Client) *V1AwsVolumeSizeGetParams { + var () + return &V1AwsVolumeSizeGetParams{ + HTTPClient: client, + } +} + +/* +V1AwsVolumeSizeGetParams contains all the parameters to send to the API endpoint +for the v1 aws volume size get operation typically these are written to a http.Request +*/ +type V1AwsVolumeSizeGetParams struct { + + /*CloudAccountUID + Uid for the specific AWS cloud account + + */ + CloudAccountUID string + /*ImageID + AWS image id + + */ + ImageID string + /*Region + Specific AWS Region + + */ + Region string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 aws volume size get params +func (o *V1AwsVolumeSizeGetParams) WithTimeout(timeout time.Duration) *V1AwsVolumeSizeGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 aws volume size get params +func (o *V1AwsVolumeSizeGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 aws volume size get params +func (o *V1AwsVolumeSizeGetParams) WithContext(ctx context.Context) *V1AwsVolumeSizeGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 aws volume size get params +func (o *V1AwsVolumeSizeGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 aws volume size get params +func (o *V1AwsVolumeSizeGetParams) WithHTTPClient(client *http.Client) *V1AwsVolumeSizeGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 aws volume size get params +func (o *V1AwsVolumeSizeGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithCloudAccountUID adds the cloudAccountUID to the v1 aws volume size get params +func (o *V1AwsVolumeSizeGetParams) WithCloudAccountUID(cloudAccountUID string) *V1AwsVolumeSizeGetParams { + o.SetCloudAccountUID(cloudAccountUID) + return o +} + +// SetCloudAccountUID adds the cloudAccountUid to the v1 aws volume size get params +func (o *V1AwsVolumeSizeGetParams) SetCloudAccountUID(cloudAccountUID string) { + o.CloudAccountUID = cloudAccountUID +} + +// WithImageID adds the imageID to the v1 aws volume size get params +func (o *V1AwsVolumeSizeGetParams) WithImageID(imageID string) *V1AwsVolumeSizeGetParams { + o.SetImageID(imageID) + return o +} + +// SetImageID adds the imageId to the v1 aws volume size get params +func (o *V1AwsVolumeSizeGetParams) SetImageID(imageID string) { + o.ImageID = imageID +} + +// WithRegion adds the region to the v1 aws volume size get params +func (o *V1AwsVolumeSizeGetParams) WithRegion(region string) *V1AwsVolumeSizeGetParams { + o.SetRegion(region) + return o +} + +// SetRegion adds the region to the v1 aws volume size get params +func (o *V1AwsVolumeSizeGetParams) SetRegion(region string) { + o.Region = region +} + +// WriteToRequest writes these params to a swagger request +func (o *V1AwsVolumeSizeGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // query param cloudAccountUid + qrCloudAccountUID := o.CloudAccountUID + qCloudAccountUID := qrCloudAccountUID + if qCloudAccountUID != "" { + if err := r.SetQueryParam("cloudAccountUid", qCloudAccountUID); err != nil { + return err + } + } + + // path param imageId + if err := r.SetPathParam("imageId", o.ImageID); err != nil { + return err + } + + // query param region + qrRegion := o.Region + qRegion := qrRegion + if qRegion != "" { + if err := r.SetQueryParam("region", qRegion); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_aws_volume_size_get_responses.go b/api/client/v1/v1_aws_volume_size_get_responses.go new file mode 100644 index 00000000..1818fa1e --- /dev/null +++ b/api/client/v1/v1_aws_volume_size_get_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1AwsVolumeSizeGetReader is a Reader for the V1AwsVolumeSizeGet structure. +type V1AwsVolumeSizeGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1AwsVolumeSizeGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1AwsVolumeSizeGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1AwsVolumeSizeGetOK creates a V1AwsVolumeSizeGetOK with default headers values +func NewV1AwsVolumeSizeGetOK() *V1AwsVolumeSizeGetOK { + return &V1AwsVolumeSizeGetOK{} +} + +/* +V1AwsVolumeSizeGetOK handles this case with default header values. + +(empty) +*/ +type V1AwsVolumeSizeGetOK struct { + Payload *models.V1AwsVolumeSize +} + +func (o *V1AwsVolumeSizeGetOK) Error() string { + return fmt.Sprintf("[GET /v1/clouds/aws/imageIds/{imageId}/volumeSize][%d] v1AwsVolumeSizeGetOK %+v", 200, o.Payload) +} + +func (o *V1AwsVolumeSizeGetOK) GetPayload() *models.V1AwsVolumeSize { + return o.Payload +} + +func (o *V1AwsVolumeSizeGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1AwsVolumeSize) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_aws_volume_types_get_parameters.go b/api/client/v1/v1_aws_volume_types_get_parameters.go new file mode 100644 index 00000000..05bffdd6 --- /dev/null +++ b/api/client/v1/v1_aws_volume_types_get_parameters.go @@ -0,0 +1,140 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1AwsVolumeTypesGetParams creates a new V1AwsVolumeTypesGetParams object +// with the default values initialized. +func NewV1AwsVolumeTypesGetParams() *V1AwsVolumeTypesGetParams { + var () + return &V1AwsVolumeTypesGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1AwsVolumeTypesGetParamsWithTimeout creates a new V1AwsVolumeTypesGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1AwsVolumeTypesGetParamsWithTimeout(timeout time.Duration) *V1AwsVolumeTypesGetParams { + var () + return &V1AwsVolumeTypesGetParams{ + + timeout: timeout, + } +} + +// NewV1AwsVolumeTypesGetParamsWithContext creates a new V1AwsVolumeTypesGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1AwsVolumeTypesGetParamsWithContext(ctx context.Context) *V1AwsVolumeTypesGetParams { + var () + return &V1AwsVolumeTypesGetParams{ + + Context: ctx, + } +} + +// NewV1AwsVolumeTypesGetParamsWithHTTPClient creates a new V1AwsVolumeTypesGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1AwsVolumeTypesGetParamsWithHTTPClient(client *http.Client) *V1AwsVolumeTypesGetParams { + var () + return &V1AwsVolumeTypesGetParams{ + HTTPClient: client, + } +} + +/* +V1AwsVolumeTypesGetParams contains all the parameters to send to the API endpoint +for the v1 aws volume types get operation typically these are written to a http.Request +*/ +type V1AwsVolumeTypesGetParams struct { + + /*Region + Specific AWS Region + + */ + Region string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 aws volume types get params +func (o *V1AwsVolumeTypesGetParams) WithTimeout(timeout time.Duration) *V1AwsVolumeTypesGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 aws volume types get params +func (o *V1AwsVolumeTypesGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 aws volume types get params +func (o *V1AwsVolumeTypesGetParams) WithContext(ctx context.Context) *V1AwsVolumeTypesGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 aws volume types get params +func (o *V1AwsVolumeTypesGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 aws volume types get params +func (o *V1AwsVolumeTypesGetParams) WithHTTPClient(client *http.Client) *V1AwsVolumeTypesGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 aws volume types get params +func (o *V1AwsVolumeTypesGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithRegion adds the region to the v1 aws volume types get params +func (o *V1AwsVolumeTypesGetParams) WithRegion(region string) *V1AwsVolumeTypesGetParams { + o.SetRegion(region) + return o +} + +// SetRegion adds the region to the v1 aws volume types get params +func (o *V1AwsVolumeTypesGetParams) SetRegion(region string) { + o.Region = region +} + +// WriteToRequest writes these params to a swagger request +func (o *V1AwsVolumeTypesGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // query param region + qrRegion := o.Region + qRegion := qrRegion + if qRegion != "" { + if err := r.SetQueryParam("region", qRegion); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_aws_volume_types_get_responses.go b/api/client/v1/v1_aws_volume_types_get_responses.go new file mode 100644 index 00000000..15a20d60 --- /dev/null +++ b/api/client/v1/v1_aws_volume_types_get_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1AwsVolumeTypesGetReader is a Reader for the V1AwsVolumeTypesGet structure. +type V1AwsVolumeTypesGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1AwsVolumeTypesGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1AwsVolumeTypesGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1AwsVolumeTypesGetOK creates a V1AwsVolumeTypesGetOK with default headers values +func NewV1AwsVolumeTypesGetOK() *V1AwsVolumeTypesGetOK { + return &V1AwsVolumeTypesGetOK{} +} + +/* +V1AwsVolumeTypesGetOK handles this case with default header values. + +(empty) +*/ +type V1AwsVolumeTypesGetOK struct { + Payload *models.V1AWSVolumeTypes +} + +func (o *V1AwsVolumeTypesGetOK) Error() string { + return fmt.Sprintf("[GET /v1/clouds/aws/volumeTypes][%d] v1AwsVolumeTypesGetOK %+v", 200, o.Payload) +} + +func (o *V1AwsVolumeTypesGetOK) GetPayload() *models.V1AWSVolumeTypes { + return o.Payload +} + +func (o *V1AwsVolumeTypesGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1AWSVolumeTypes) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_aws_vpcs_parameters.go b/api/client/v1/v1_aws_vpcs_parameters.go new file mode 100644 index 00000000..7a8d8e89 --- /dev/null +++ b/api/client/v1/v1_aws_vpcs_parameters.go @@ -0,0 +1,161 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1AwsVpcsParams creates a new V1AwsVpcsParams object +// with the default values initialized. +func NewV1AwsVpcsParams() *V1AwsVpcsParams { + var () + return &V1AwsVpcsParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1AwsVpcsParamsWithTimeout creates a new V1AwsVpcsParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1AwsVpcsParamsWithTimeout(timeout time.Duration) *V1AwsVpcsParams { + var () + return &V1AwsVpcsParams{ + + timeout: timeout, + } +} + +// NewV1AwsVpcsParamsWithContext creates a new V1AwsVpcsParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1AwsVpcsParamsWithContext(ctx context.Context) *V1AwsVpcsParams { + var () + return &V1AwsVpcsParams{ + + Context: ctx, + } +} + +// NewV1AwsVpcsParamsWithHTTPClient creates a new V1AwsVpcsParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1AwsVpcsParamsWithHTTPClient(client *http.Client) *V1AwsVpcsParams { + var () + return &V1AwsVpcsParams{ + HTTPClient: client, + } +} + +/* +V1AwsVpcsParams contains all the parameters to send to the API endpoint +for the v1 aws vpcs operation typically these are written to a http.Request +*/ +type V1AwsVpcsParams struct { + + /*CloudAccountUID + Uid for the specific AWS cloud account + + */ + CloudAccountUID string + /*Region + Region for which VPCs are requested + + */ + Region string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 aws vpcs params +func (o *V1AwsVpcsParams) WithTimeout(timeout time.Duration) *V1AwsVpcsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 aws vpcs params +func (o *V1AwsVpcsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 aws vpcs params +func (o *V1AwsVpcsParams) WithContext(ctx context.Context) *V1AwsVpcsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 aws vpcs params +func (o *V1AwsVpcsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 aws vpcs params +func (o *V1AwsVpcsParams) WithHTTPClient(client *http.Client) *V1AwsVpcsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 aws vpcs params +func (o *V1AwsVpcsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithCloudAccountUID adds the cloudAccountUID to the v1 aws vpcs params +func (o *V1AwsVpcsParams) WithCloudAccountUID(cloudAccountUID string) *V1AwsVpcsParams { + o.SetCloudAccountUID(cloudAccountUID) + return o +} + +// SetCloudAccountUID adds the cloudAccountUid to the v1 aws vpcs params +func (o *V1AwsVpcsParams) SetCloudAccountUID(cloudAccountUID string) { + o.CloudAccountUID = cloudAccountUID +} + +// WithRegion adds the region to the v1 aws vpcs params +func (o *V1AwsVpcsParams) WithRegion(region string) *V1AwsVpcsParams { + o.SetRegion(region) + return o +} + +// SetRegion adds the region to the v1 aws vpcs params +func (o *V1AwsVpcsParams) SetRegion(region string) { + o.Region = region +} + +// WriteToRequest writes these params to a swagger request +func (o *V1AwsVpcsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // query param cloudAccountUid + qrCloudAccountUID := o.CloudAccountUID + qCloudAccountUID := qrCloudAccountUID + if qCloudAccountUID != "" { + if err := r.SetQueryParam("cloudAccountUid", qCloudAccountUID); err != nil { + return err + } + } + + // path param region + if err := r.SetPathParam("region", o.Region); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_aws_vpcs_responses.go b/api/client/v1/v1_aws_vpcs_responses.go new file mode 100644 index 00000000..c19a156c --- /dev/null +++ b/api/client/v1/v1_aws_vpcs_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1AwsVpcsReader is a Reader for the V1AwsVpcs structure. +type V1AwsVpcsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1AwsVpcsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1AwsVpcsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1AwsVpcsOK creates a V1AwsVpcsOK with default headers values +func NewV1AwsVpcsOK() *V1AwsVpcsOK { + return &V1AwsVpcsOK{} +} + +/* +V1AwsVpcsOK handles this case with default header values. + +(empty) +*/ +type V1AwsVpcsOK struct { + Payload *models.V1AwsVpcs +} + +func (o *V1AwsVpcsOK) Error() string { + return fmt.Sprintf("[GET /v1/clouds/aws/regions/{region}/vpcs][%d] v1AwsVpcsOK %+v", 200, o.Payload) +} + +func (o *V1AwsVpcsOK) GetPayload() *models.V1AwsVpcs { + return o.Payload +} + +func (o *V1AwsVpcsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1AwsVpcs) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_aws_zones_parameters.go b/api/client/v1/v1_aws_zones_parameters.go new file mode 100644 index 00000000..84d99441 --- /dev/null +++ b/api/client/v1/v1_aws_zones_parameters.go @@ -0,0 +1,161 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1AwsZonesParams creates a new V1AwsZonesParams object +// with the default values initialized. +func NewV1AwsZonesParams() *V1AwsZonesParams { + var () + return &V1AwsZonesParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1AwsZonesParamsWithTimeout creates a new V1AwsZonesParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1AwsZonesParamsWithTimeout(timeout time.Duration) *V1AwsZonesParams { + var () + return &V1AwsZonesParams{ + + timeout: timeout, + } +} + +// NewV1AwsZonesParamsWithContext creates a new V1AwsZonesParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1AwsZonesParamsWithContext(ctx context.Context) *V1AwsZonesParams { + var () + return &V1AwsZonesParams{ + + Context: ctx, + } +} + +// NewV1AwsZonesParamsWithHTTPClient creates a new V1AwsZonesParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1AwsZonesParamsWithHTTPClient(client *http.Client) *V1AwsZonesParams { + var () + return &V1AwsZonesParams{ + HTTPClient: client, + } +} + +/* +V1AwsZonesParams contains all the parameters to send to the API endpoint +for the v1 aws zones operation typically these are written to a http.Request +*/ +type V1AwsZonesParams struct { + + /*CloudAccountUID + Uid for the specific AWS cloud account + + */ + CloudAccountUID string + /*Region + Region for which zones are requested + + */ + Region string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 aws zones params +func (o *V1AwsZonesParams) WithTimeout(timeout time.Duration) *V1AwsZonesParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 aws zones params +func (o *V1AwsZonesParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 aws zones params +func (o *V1AwsZonesParams) WithContext(ctx context.Context) *V1AwsZonesParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 aws zones params +func (o *V1AwsZonesParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 aws zones params +func (o *V1AwsZonesParams) WithHTTPClient(client *http.Client) *V1AwsZonesParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 aws zones params +func (o *V1AwsZonesParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithCloudAccountUID adds the cloudAccountUID to the v1 aws zones params +func (o *V1AwsZonesParams) WithCloudAccountUID(cloudAccountUID string) *V1AwsZonesParams { + o.SetCloudAccountUID(cloudAccountUID) + return o +} + +// SetCloudAccountUID adds the cloudAccountUid to the v1 aws zones params +func (o *V1AwsZonesParams) SetCloudAccountUID(cloudAccountUID string) { + o.CloudAccountUID = cloudAccountUID +} + +// WithRegion adds the region to the v1 aws zones params +func (o *V1AwsZonesParams) WithRegion(region string) *V1AwsZonesParams { + o.SetRegion(region) + return o +} + +// SetRegion adds the region to the v1 aws zones params +func (o *V1AwsZonesParams) SetRegion(region string) { + o.Region = region +} + +// WriteToRequest writes these params to a swagger request +func (o *V1AwsZonesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // query param cloudAccountUid + qrCloudAccountUID := o.CloudAccountUID + qCloudAccountUID := qrCloudAccountUID + if qCloudAccountUID != "" { + if err := r.SetQueryParam("cloudAccountUid", qCloudAccountUID); err != nil { + return err + } + } + + // path param region + if err := r.SetPathParam("region", o.Region); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_aws_zones_responses.go b/api/client/v1/v1_aws_zones_responses.go new file mode 100644 index 00000000..e8a7f145 --- /dev/null +++ b/api/client/v1/v1_aws_zones_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1AwsZonesReader is a Reader for the V1AwsZones structure. +type V1AwsZonesReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1AwsZonesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1AwsZonesOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1AwsZonesOK creates a V1AwsZonesOK with default headers values +func NewV1AwsZonesOK() *V1AwsZonesOK { + return &V1AwsZonesOK{} +} + +/* +V1AwsZonesOK handles this case with default header values. + +(empty) +*/ +type V1AwsZonesOK struct { + Payload *models.V1AwsAvailabilityZones +} + +func (o *V1AwsZonesOK) Error() string { + return fmt.Sprintf("[GET /v1/clouds/aws/regions/{region}/availabilityzones][%d] v1AwsZonesOK %+v", 200, o.Payload) +} + +func (o *V1AwsZonesOK) GetPayload() *models.V1AwsAvailabilityZones { + return o.Payload +} + +func (o *V1AwsZonesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1AwsAvailabilityZones) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_azure_account_validate_parameters.go b/api/client/v1/v1_azure_account_validate_parameters.go new file mode 100644 index 00000000..ac63a1be --- /dev/null +++ b/api/client/v1/v1_azure_account_validate_parameters.go @@ -0,0 +1,139 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1AzureAccountValidateParams creates a new V1AzureAccountValidateParams object +// with the default values initialized. +func NewV1AzureAccountValidateParams() *V1AzureAccountValidateParams { + var () + return &V1AzureAccountValidateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1AzureAccountValidateParamsWithTimeout creates a new V1AzureAccountValidateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1AzureAccountValidateParamsWithTimeout(timeout time.Duration) *V1AzureAccountValidateParams { + var () + return &V1AzureAccountValidateParams{ + + timeout: timeout, + } +} + +// NewV1AzureAccountValidateParamsWithContext creates a new V1AzureAccountValidateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1AzureAccountValidateParamsWithContext(ctx context.Context) *V1AzureAccountValidateParams { + var () + return &V1AzureAccountValidateParams{ + + Context: ctx, + } +} + +// NewV1AzureAccountValidateParamsWithHTTPClient creates a new V1AzureAccountValidateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1AzureAccountValidateParamsWithHTTPClient(client *http.Client) *V1AzureAccountValidateParams { + var () + return &V1AzureAccountValidateParams{ + HTTPClient: client, + } +} + +/* +V1AzureAccountValidateParams contains all the parameters to send to the API endpoint +for the v1 azure account validate operation typically these are written to a http.Request +*/ +type V1AzureAccountValidateParams struct { + + /*AzureCloudAccount + Request payload for Azure cloud account + + */ + AzureCloudAccount *models.V1AzureCloudAccount + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 azure account validate params +func (o *V1AzureAccountValidateParams) WithTimeout(timeout time.Duration) *V1AzureAccountValidateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 azure account validate params +func (o *V1AzureAccountValidateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 azure account validate params +func (o *V1AzureAccountValidateParams) WithContext(ctx context.Context) *V1AzureAccountValidateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 azure account validate params +func (o *V1AzureAccountValidateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 azure account validate params +func (o *V1AzureAccountValidateParams) WithHTTPClient(client *http.Client) *V1AzureAccountValidateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 azure account validate params +func (o *V1AzureAccountValidateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithAzureCloudAccount adds the azureCloudAccount to the v1 azure account validate params +func (o *V1AzureAccountValidateParams) WithAzureCloudAccount(azureCloudAccount *models.V1AzureCloudAccount) *V1AzureAccountValidateParams { + o.SetAzureCloudAccount(azureCloudAccount) + return o +} + +// SetAzureCloudAccount adds the azureCloudAccount to the v1 azure account validate params +func (o *V1AzureAccountValidateParams) SetAzureCloudAccount(azureCloudAccount *models.V1AzureCloudAccount) { + o.AzureCloudAccount = azureCloudAccount +} + +// WriteToRequest writes these params to a swagger request +func (o *V1AzureAccountValidateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.AzureCloudAccount != nil { + if err := r.SetBodyParam(o.AzureCloudAccount); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_azure_account_validate_responses.go b/api/client/v1/v1_azure_account_validate_responses.go new file mode 100644 index 00000000..6eb4e266 --- /dev/null +++ b/api/client/v1/v1_azure_account_validate_responses.go @@ -0,0 +1,61 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1AzureAccountValidateReader is a Reader for the V1AzureAccountValidate structure. +type V1AzureAccountValidateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1AzureAccountValidateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1AzureAccountValidateNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1AzureAccountValidateNoContent creates a V1AzureAccountValidateNoContent with default headers values +func NewV1AzureAccountValidateNoContent() *V1AzureAccountValidateNoContent { + return &V1AzureAccountValidateNoContent{} +} + +/* +V1AzureAccountValidateNoContent handles this case with default header values. + +Ok response without content +*/ +type V1AzureAccountValidateNoContent struct { + /*Audit uid for the request + */ + AuditUID string +} + +func (o *V1AzureAccountValidateNoContent) Error() string { + return fmt.Sprintf("[POST /v1/clouds/azure/account/validate][%d] v1AzureAccountValidateNoContent ", 204) +} + +func (o *V1AzureAccountValidateNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header AuditUid + o.AuditUID = response.GetHeader("AuditUid") + + return nil +} diff --git a/api/client/v1/v1_azure_cluster_name_validate_parameters.go b/api/client/v1/v1_azure_cluster_name_validate_parameters.go new file mode 100644 index 00000000..1d9b373e --- /dev/null +++ b/api/client/v1/v1_azure_cluster_name_validate_parameters.go @@ -0,0 +1,232 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1AzureClusterNameValidateParams creates a new V1AzureClusterNameValidateParams object +// with the default values initialized. +func NewV1AzureClusterNameValidateParams() *V1AzureClusterNameValidateParams { + var () + return &V1AzureClusterNameValidateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1AzureClusterNameValidateParamsWithTimeout creates a new V1AzureClusterNameValidateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1AzureClusterNameValidateParamsWithTimeout(timeout time.Duration) *V1AzureClusterNameValidateParams { + var () + return &V1AzureClusterNameValidateParams{ + + timeout: timeout, + } +} + +// NewV1AzureClusterNameValidateParamsWithContext creates a new V1AzureClusterNameValidateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1AzureClusterNameValidateParamsWithContext(ctx context.Context) *V1AzureClusterNameValidateParams { + var () + return &V1AzureClusterNameValidateParams{ + + Context: ctx, + } +} + +// NewV1AzureClusterNameValidateParamsWithHTTPClient creates a new V1AzureClusterNameValidateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1AzureClusterNameValidateParamsWithHTTPClient(client *http.Client) *V1AzureClusterNameValidateParams { + var () + return &V1AzureClusterNameValidateParams{ + HTTPClient: client, + } +} + +/* +V1AzureClusterNameValidateParams contains all the parameters to send to the API endpoint +for the v1 azure cluster name validate operation typically these are written to a http.Request +*/ +type V1AzureClusterNameValidateParams struct { + + /*CloudAccountUID + Uid for the specific Azure cloud account + + */ + CloudAccountUID string + /*Name + cluster name to be validated + + */ + Name string + /*Region + region in which cluster name is to be validated + + */ + Region string + /*ResourceGroup + resourceGroup in which cluster name is to be validated + + */ + ResourceGroup string + /*SubscriptionID + subscriptionId in which cluster name is to be validated + + */ + SubscriptionID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 azure cluster name validate params +func (o *V1AzureClusterNameValidateParams) WithTimeout(timeout time.Duration) *V1AzureClusterNameValidateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 azure cluster name validate params +func (o *V1AzureClusterNameValidateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 azure cluster name validate params +func (o *V1AzureClusterNameValidateParams) WithContext(ctx context.Context) *V1AzureClusterNameValidateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 azure cluster name validate params +func (o *V1AzureClusterNameValidateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 azure cluster name validate params +func (o *V1AzureClusterNameValidateParams) WithHTTPClient(client *http.Client) *V1AzureClusterNameValidateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 azure cluster name validate params +func (o *V1AzureClusterNameValidateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithCloudAccountUID adds the cloudAccountUID to the v1 azure cluster name validate params +func (o *V1AzureClusterNameValidateParams) WithCloudAccountUID(cloudAccountUID string) *V1AzureClusterNameValidateParams { + o.SetCloudAccountUID(cloudAccountUID) + return o +} + +// SetCloudAccountUID adds the cloudAccountUid to the v1 azure cluster name validate params +func (o *V1AzureClusterNameValidateParams) SetCloudAccountUID(cloudAccountUID string) { + o.CloudAccountUID = cloudAccountUID +} + +// WithName adds the name to the v1 azure cluster name validate params +func (o *V1AzureClusterNameValidateParams) WithName(name string) *V1AzureClusterNameValidateParams { + o.SetName(name) + return o +} + +// SetName adds the name to the v1 azure cluster name validate params +func (o *V1AzureClusterNameValidateParams) SetName(name string) { + o.Name = name +} + +// WithRegion adds the region to the v1 azure cluster name validate params +func (o *V1AzureClusterNameValidateParams) WithRegion(region string) *V1AzureClusterNameValidateParams { + o.SetRegion(region) + return o +} + +// SetRegion adds the region to the v1 azure cluster name validate params +func (o *V1AzureClusterNameValidateParams) SetRegion(region string) { + o.Region = region +} + +// WithResourceGroup adds the resourceGroup to the v1 azure cluster name validate params +func (o *V1AzureClusterNameValidateParams) WithResourceGroup(resourceGroup string) *V1AzureClusterNameValidateParams { + o.SetResourceGroup(resourceGroup) + return o +} + +// SetResourceGroup adds the resourceGroup to the v1 azure cluster name validate params +func (o *V1AzureClusterNameValidateParams) SetResourceGroup(resourceGroup string) { + o.ResourceGroup = resourceGroup +} + +// WithSubscriptionID adds the subscriptionID to the v1 azure cluster name validate params +func (o *V1AzureClusterNameValidateParams) WithSubscriptionID(subscriptionID string) *V1AzureClusterNameValidateParams { + o.SetSubscriptionID(subscriptionID) + return o +} + +// SetSubscriptionID adds the subscriptionId to the v1 azure cluster name validate params +func (o *V1AzureClusterNameValidateParams) SetSubscriptionID(subscriptionID string) { + o.SubscriptionID = subscriptionID +} + +// WriteToRequest writes these params to a swagger request +func (o *V1AzureClusterNameValidateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // query param cloudAccountUid + qrCloudAccountUID := o.CloudAccountUID + qCloudAccountUID := qrCloudAccountUID + if qCloudAccountUID != "" { + if err := r.SetQueryParam("cloudAccountUid", qCloudAccountUID); err != nil { + return err + } + } + + // query param name + qrName := o.Name + qName := qrName + if qName != "" { + if err := r.SetQueryParam("name", qName); err != nil { + return err + } + } + + // path param region + if err := r.SetPathParam("region", o.Region); err != nil { + return err + } + + // query param resourceGroup + qrResourceGroup := o.ResourceGroup + qResourceGroup := qrResourceGroup + if qResourceGroup != "" { + if err := r.SetQueryParam("resourceGroup", qResourceGroup); err != nil { + return err + } + } + + // path param subscriptionId + if err := r.SetPathParam("subscriptionId", o.SubscriptionID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_azure_cluster_name_validate_responses.go b/api/client/v1/v1_azure_cluster_name_validate_responses.go new file mode 100644 index 00000000..c7456ec3 --- /dev/null +++ b/api/client/v1/v1_azure_cluster_name_validate_responses.go @@ -0,0 +1,61 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1AzureClusterNameValidateReader is a Reader for the V1AzureClusterNameValidate structure. +type V1AzureClusterNameValidateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1AzureClusterNameValidateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1AzureClusterNameValidateNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1AzureClusterNameValidateNoContent creates a V1AzureClusterNameValidateNoContent with default headers values +func NewV1AzureClusterNameValidateNoContent() *V1AzureClusterNameValidateNoContent { + return &V1AzureClusterNameValidateNoContent{} +} + +/* +V1AzureClusterNameValidateNoContent handles this case with default header values. + +Ok response without content +*/ +type V1AzureClusterNameValidateNoContent struct { + /*Audit uid for the request + */ + AuditUID string +} + +func (o *V1AzureClusterNameValidateNoContent) Error() string { + return fmt.Sprintf("[GET /v1/clouds/azure/regions/{region}/subscriptions/{subscriptionId}/aksClusters/name/validate][%d] v1AzureClusterNameValidateNoContent ", 204) +} + +func (o *V1AzureClusterNameValidateNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header AuditUid + o.AuditUID = response.GetHeader("AuditUid") + + return nil +} diff --git a/api/client/v1/v1_azure_groups_parameters.go b/api/client/v1/v1_azure_groups_parameters.go new file mode 100644 index 00000000..b0e1950a --- /dev/null +++ b/api/client/v1/v1_azure_groups_parameters.go @@ -0,0 +1,147 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1AzureGroupsParams creates a new V1AzureGroupsParams object +// with the default values initialized. +func NewV1AzureGroupsParams() *V1AzureGroupsParams { + var () + return &V1AzureGroupsParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1AzureGroupsParamsWithTimeout creates a new V1AzureGroupsParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1AzureGroupsParamsWithTimeout(timeout time.Duration) *V1AzureGroupsParams { + var () + return &V1AzureGroupsParams{ + + timeout: timeout, + } +} + +// NewV1AzureGroupsParamsWithContext creates a new V1AzureGroupsParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1AzureGroupsParamsWithContext(ctx context.Context) *V1AzureGroupsParams { + var () + return &V1AzureGroupsParams{ + + Context: ctx, + } +} + +// NewV1AzureGroupsParamsWithHTTPClient creates a new V1AzureGroupsParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1AzureGroupsParamsWithHTTPClient(client *http.Client) *V1AzureGroupsParams { + var () + return &V1AzureGroupsParams{ + HTTPClient: client, + } +} + +/* +V1AzureGroupsParams contains all the parameters to send to the API endpoint +for the v1 azure groups operation typically these are written to a http.Request +*/ +type V1AzureGroupsParams struct { + + /*CloudAccountUID + Uid for the specific Azure cloud account + + */ + CloudAccountUID *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 azure groups params +func (o *V1AzureGroupsParams) WithTimeout(timeout time.Duration) *V1AzureGroupsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 azure groups params +func (o *V1AzureGroupsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 azure groups params +func (o *V1AzureGroupsParams) WithContext(ctx context.Context) *V1AzureGroupsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 azure groups params +func (o *V1AzureGroupsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 azure groups params +func (o *V1AzureGroupsParams) WithHTTPClient(client *http.Client) *V1AzureGroupsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 azure groups params +func (o *V1AzureGroupsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithCloudAccountUID adds the cloudAccountUID to the v1 azure groups params +func (o *V1AzureGroupsParams) WithCloudAccountUID(cloudAccountUID *string) *V1AzureGroupsParams { + o.SetCloudAccountUID(cloudAccountUID) + return o +} + +// SetCloudAccountUID adds the cloudAccountUid to the v1 azure groups params +func (o *V1AzureGroupsParams) SetCloudAccountUID(cloudAccountUID *string) { + o.CloudAccountUID = cloudAccountUID +} + +// WriteToRequest writes these params to a swagger request +func (o *V1AzureGroupsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.CloudAccountUID != nil { + + // query param cloudAccountUid + var qrCloudAccountUID string + if o.CloudAccountUID != nil { + qrCloudAccountUID = *o.CloudAccountUID + } + qCloudAccountUID := qrCloudAccountUID + if qCloudAccountUID != "" { + if err := r.SetQueryParam("cloudAccountUid", qCloudAccountUID); err != nil { + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_azure_groups_responses.go b/api/client/v1/v1_azure_groups_responses.go new file mode 100644 index 00000000..ee19b737 --- /dev/null +++ b/api/client/v1/v1_azure_groups_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1AzureGroupsReader is a Reader for the V1AzureGroups structure. +type V1AzureGroupsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1AzureGroupsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1AzureGroupsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1AzureGroupsOK creates a V1AzureGroupsOK with default headers values +func NewV1AzureGroupsOK() *V1AzureGroupsOK { + return &V1AzureGroupsOK{} +} + +/* +V1AzureGroupsOK handles this case with default header values. + +(empty) +*/ +type V1AzureGroupsOK struct { + Payload *models.V1AzureGroups +} + +func (o *V1AzureGroupsOK) Error() string { + return fmt.Sprintf("[GET /v1/clouds/azure/groups][%d] v1AzureGroupsOK %+v", 200, o.Payload) +} + +func (o *V1AzureGroupsOK) GetPayload() *models.V1AzureGroups { + return o.Payload +} + +func (o *V1AzureGroupsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1AzureGroups) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_azure_instance_types_parameters.go b/api/client/v1/v1_azure_instance_types_parameters.go new file mode 100644 index 00000000..32a25905 --- /dev/null +++ b/api/client/v1/v1_azure_instance_types_parameters.go @@ -0,0 +1,233 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// NewV1AzureInstanceTypesParams creates a new V1AzureInstanceTypesParams object +// with the default values initialized. +func NewV1AzureInstanceTypesParams() *V1AzureInstanceTypesParams { + var () + return &V1AzureInstanceTypesParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1AzureInstanceTypesParamsWithTimeout creates a new V1AzureInstanceTypesParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1AzureInstanceTypesParamsWithTimeout(timeout time.Duration) *V1AzureInstanceTypesParams { + var () + return &V1AzureInstanceTypesParams{ + + timeout: timeout, + } +} + +// NewV1AzureInstanceTypesParamsWithContext creates a new V1AzureInstanceTypesParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1AzureInstanceTypesParamsWithContext(ctx context.Context) *V1AzureInstanceTypesParams { + var () + return &V1AzureInstanceTypesParams{ + + Context: ctx, + } +} + +// NewV1AzureInstanceTypesParamsWithHTTPClient creates a new V1AzureInstanceTypesParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1AzureInstanceTypesParamsWithHTTPClient(client *http.Client) *V1AzureInstanceTypesParams { + var () + return &V1AzureInstanceTypesParams{ + HTTPClient: client, + } +} + +/* +V1AzureInstanceTypesParams contains all the parameters to send to the API endpoint +for the v1 azure instance types operation typically these are written to a http.Request +*/ +type V1AzureInstanceTypesParams struct { + + /*CPUGtEq + Filter for instances having cpu greater than or equal + + */ + CPUGtEq *float64 + /*GpuGtEq + Filter for instances having gpu greater than or equal + + */ + GpuGtEq *float64 + /*MemoryGtEq + Filter for instances having memory greater than or equal + + */ + MemoryGtEq *float64 + /*Region + Region for which Azure instance types are requested + + */ + Region string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 azure instance types params +func (o *V1AzureInstanceTypesParams) WithTimeout(timeout time.Duration) *V1AzureInstanceTypesParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 azure instance types params +func (o *V1AzureInstanceTypesParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 azure instance types params +func (o *V1AzureInstanceTypesParams) WithContext(ctx context.Context) *V1AzureInstanceTypesParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 azure instance types params +func (o *V1AzureInstanceTypesParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 azure instance types params +func (o *V1AzureInstanceTypesParams) WithHTTPClient(client *http.Client) *V1AzureInstanceTypesParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 azure instance types params +func (o *V1AzureInstanceTypesParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithCPUGtEq adds the cPUGtEq to the v1 azure instance types params +func (o *V1AzureInstanceTypesParams) WithCPUGtEq(cPUGtEq *float64) *V1AzureInstanceTypesParams { + o.SetCPUGtEq(cPUGtEq) + return o +} + +// SetCPUGtEq adds the cpuGtEq to the v1 azure instance types params +func (o *V1AzureInstanceTypesParams) SetCPUGtEq(cPUGtEq *float64) { + o.CPUGtEq = cPUGtEq +} + +// WithGpuGtEq adds the gpuGtEq to the v1 azure instance types params +func (o *V1AzureInstanceTypesParams) WithGpuGtEq(gpuGtEq *float64) *V1AzureInstanceTypesParams { + o.SetGpuGtEq(gpuGtEq) + return o +} + +// SetGpuGtEq adds the gpuGtEq to the v1 azure instance types params +func (o *V1AzureInstanceTypesParams) SetGpuGtEq(gpuGtEq *float64) { + o.GpuGtEq = gpuGtEq +} + +// WithMemoryGtEq adds the memoryGtEq to the v1 azure instance types params +func (o *V1AzureInstanceTypesParams) WithMemoryGtEq(memoryGtEq *float64) *V1AzureInstanceTypesParams { + o.SetMemoryGtEq(memoryGtEq) + return o +} + +// SetMemoryGtEq adds the memoryGtEq to the v1 azure instance types params +func (o *V1AzureInstanceTypesParams) SetMemoryGtEq(memoryGtEq *float64) { + o.MemoryGtEq = memoryGtEq +} + +// WithRegion adds the region to the v1 azure instance types params +func (o *V1AzureInstanceTypesParams) WithRegion(region string) *V1AzureInstanceTypesParams { + o.SetRegion(region) + return o +} + +// SetRegion adds the region to the v1 azure instance types params +func (o *V1AzureInstanceTypesParams) SetRegion(region string) { + o.Region = region +} + +// WriteToRequest writes these params to a swagger request +func (o *V1AzureInstanceTypesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.CPUGtEq != nil { + + // query param cpuGtEq + var qrCPUGtEq float64 + if o.CPUGtEq != nil { + qrCPUGtEq = *o.CPUGtEq + } + qCPUGtEq := swag.FormatFloat64(qrCPUGtEq) + if qCPUGtEq != "" { + if err := r.SetQueryParam("cpuGtEq", qCPUGtEq); err != nil { + return err + } + } + + } + + if o.GpuGtEq != nil { + + // query param gpuGtEq + var qrGpuGtEq float64 + if o.GpuGtEq != nil { + qrGpuGtEq = *o.GpuGtEq + } + qGpuGtEq := swag.FormatFloat64(qrGpuGtEq) + if qGpuGtEq != "" { + if err := r.SetQueryParam("gpuGtEq", qGpuGtEq); err != nil { + return err + } + } + + } + + if o.MemoryGtEq != nil { + + // query param memoryGtEq + var qrMemoryGtEq float64 + if o.MemoryGtEq != nil { + qrMemoryGtEq = *o.MemoryGtEq + } + qMemoryGtEq := swag.FormatFloat64(qrMemoryGtEq) + if qMemoryGtEq != "" { + if err := r.SetQueryParam("memoryGtEq", qMemoryGtEq); err != nil { + return err + } + } + + } + + // path param region + if err := r.SetPathParam("region", o.Region); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_azure_instance_types_responses.go b/api/client/v1/v1_azure_instance_types_responses.go new file mode 100644 index 00000000..f874eaf5 --- /dev/null +++ b/api/client/v1/v1_azure_instance_types_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1AzureInstanceTypesReader is a Reader for the V1AzureInstanceTypes structure. +type V1AzureInstanceTypesReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1AzureInstanceTypesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1AzureInstanceTypesOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1AzureInstanceTypesOK creates a V1AzureInstanceTypesOK with default headers values +func NewV1AzureInstanceTypesOK() *V1AzureInstanceTypesOK { + return &V1AzureInstanceTypesOK{} +} + +/* +V1AzureInstanceTypesOK handles this case with default header values. + +(empty) +*/ +type V1AzureInstanceTypesOK struct { + Payload *models.V1AzureInstanceTypes +} + +func (o *V1AzureInstanceTypesOK) Error() string { + return fmt.Sprintf("[GET /v1/clouds/azure/regions/{region}/instancetypes][%d] v1AzureInstanceTypesOK %+v", 200, o.Payload) +} + +func (o *V1AzureInstanceTypesOK) GetPayload() *models.V1AzureInstanceTypes { + return o.Payload +} + +func (o *V1AzureInstanceTypesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1AzureInstanceTypes) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_azure_private_dns_zones_parameters.go b/api/client/v1/v1_azure_private_dns_zones_parameters.go new file mode 100644 index 00000000..0e6e2994 --- /dev/null +++ b/api/client/v1/v1_azure_private_dns_zones_parameters.go @@ -0,0 +1,186 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1AzurePrivateDNSZonesParams creates a new V1AzurePrivateDNSZonesParams object +// with the default values initialized. +func NewV1AzurePrivateDNSZonesParams() *V1AzurePrivateDNSZonesParams { + var () + return &V1AzurePrivateDNSZonesParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1AzurePrivateDNSZonesParamsWithTimeout creates a new V1AzurePrivateDNSZonesParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1AzurePrivateDNSZonesParamsWithTimeout(timeout time.Duration) *V1AzurePrivateDNSZonesParams { + var () + return &V1AzurePrivateDNSZonesParams{ + + timeout: timeout, + } +} + +// NewV1AzurePrivateDNSZonesParamsWithContext creates a new V1AzurePrivateDNSZonesParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1AzurePrivateDNSZonesParamsWithContext(ctx context.Context) *V1AzurePrivateDNSZonesParams { + var () + return &V1AzurePrivateDNSZonesParams{ + + Context: ctx, + } +} + +// NewV1AzurePrivateDNSZonesParamsWithHTTPClient creates a new V1AzurePrivateDNSZonesParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1AzurePrivateDNSZonesParamsWithHTTPClient(client *http.Client) *V1AzurePrivateDNSZonesParams { + var () + return &V1AzurePrivateDNSZonesParams{ + HTTPClient: client, + } +} + +/* +V1AzurePrivateDNSZonesParams contains all the parameters to send to the API endpoint +for the v1 azure private Dns zones operation typically these are written to a http.Request +*/ +type V1AzurePrivateDNSZonesParams struct { + + /*CloudAccountUID + Uid for the specific Azure cloud account + + */ + CloudAccountUID string + /*ResourceGroup + resourceGroup for which Azure private dns zones are requested + + */ + ResourceGroup string + /*SubscriptionID + subscriptionId for which Azure private dns zones are requested + + */ + SubscriptionID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 azure private Dns zones params +func (o *V1AzurePrivateDNSZonesParams) WithTimeout(timeout time.Duration) *V1AzurePrivateDNSZonesParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 azure private Dns zones params +func (o *V1AzurePrivateDNSZonesParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 azure private Dns zones params +func (o *V1AzurePrivateDNSZonesParams) WithContext(ctx context.Context) *V1AzurePrivateDNSZonesParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 azure private Dns zones params +func (o *V1AzurePrivateDNSZonesParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 azure private Dns zones params +func (o *V1AzurePrivateDNSZonesParams) WithHTTPClient(client *http.Client) *V1AzurePrivateDNSZonesParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 azure private Dns zones params +func (o *V1AzurePrivateDNSZonesParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithCloudAccountUID adds the cloudAccountUID to the v1 azure private Dns zones params +func (o *V1AzurePrivateDNSZonesParams) WithCloudAccountUID(cloudAccountUID string) *V1AzurePrivateDNSZonesParams { + o.SetCloudAccountUID(cloudAccountUID) + return o +} + +// SetCloudAccountUID adds the cloudAccountUid to the v1 azure private Dns zones params +func (o *V1AzurePrivateDNSZonesParams) SetCloudAccountUID(cloudAccountUID string) { + o.CloudAccountUID = cloudAccountUID +} + +// WithResourceGroup adds the resourceGroup to the v1 azure private Dns zones params +func (o *V1AzurePrivateDNSZonesParams) WithResourceGroup(resourceGroup string) *V1AzurePrivateDNSZonesParams { + o.SetResourceGroup(resourceGroup) + return o +} + +// SetResourceGroup adds the resourceGroup to the v1 azure private Dns zones params +func (o *V1AzurePrivateDNSZonesParams) SetResourceGroup(resourceGroup string) { + o.ResourceGroup = resourceGroup +} + +// WithSubscriptionID adds the subscriptionID to the v1 azure private Dns zones params +func (o *V1AzurePrivateDNSZonesParams) WithSubscriptionID(subscriptionID string) *V1AzurePrivateDNSZonesParams { + o.SetSubscriptionID(subscriptionID) + return o +} + +// SetSubscriptionID adds the subscriptionId to the v1 azure private Dns zones params +func (o *V1AzurePrivateDNSZonesParams) SetSubscriptionID(subscriptionID string) { + o.SubscriptionID = subscriptionID +} + +// WriteToRequest writes these params to a swagger request +func (o *V1AzurePrivateDNSZonesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // query param cloudAccountUid + qrCloudAccountUID := o.CloudAccountUID + qCloudAccountUID := qrCloudAccountUID + if qCloudAccountUID != "" { + if err := r.SetQueryParam("cloudAccountUid", qCloudAccountUID); err != nil { + return err + } + } + + // path param resourceGroup + if err := r.SetPathParam("resourceGroup", o.ResourceGroup); err != nil { + return err + } + + // query param subscriptionId + qrSubscriptionID := o.SubscriptionID + qSubscriptionID := qrSubscriptionID + if qSubscriptionID != "" { + if err := r.SetQueryParam("subscriptionId", qSubscriptionID); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_azure_private_dns_zones_responses.go b/api/client/v1/v1_azure_private_dns_zones_responses.go new file mode 100644 index 00000000..9d4150bc --- /dev/null +++ b/api/client/v1/v1_azure_private_dns_zones_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1AzurePrivateDNSZonesReader is a Reader for the V1AzurePrivateDNSZones structure. +type V1AzurePrivateDNSZonesReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1AzurePrivateDNSZonesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1AzurePrivateDNSZonesOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1AzurePrivateDNSZonesOK creates a V1AzurePrivateDNSZonesOK with default headers values +func NewV1AzurePrivateDNSZonesOK() *V1AzurePrivateDNSZonesOK { + return &V1AzurePrivateDNSZonesOK{} +} + +/* +V1AzurePrivateDNSZonesOK handles this case with default header values. + +(empty) +*/ +type V1AzurePrivateDNSZonesOK struct { + Payload *models.V1AzurePrivateDNSZones +} + +func (o *V1AzurePrivateDNSZonesOK) Error() string { + return fmt.Sprintf("[GET /v1/clouds/azure/resourceGroups/{resourceGroup}/privateDnsZones][%d] v1AzurePrivateDnsZonesOK %+v", 200, o.Payload) +} + +func (o *V1AzurePrivateDNSZonesOK) GetPayload() *models.V1AzurePrivateDNSZones { + return o.Payload +} + +func (o *V1AzurePrivateDNSZonesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1AzurePrivateDNSZones) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_azure_regions_parameters.go b/api/client/v1/v1_azure_regions_parameters.go new file mode 100644 index 00000000..564ff4b6 --- /dev/null +++ b/api/client/v1/v1_azure_regions_parameters.go @@ -0,0 +1,179 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1AzureRegionsParams creates a new V1AzureRegionsParams object +// with the default values initialized. +func NewV1AzureRegionsParams() *V1AzureRegionsParams { + var () + return &V1AzureRegionsParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1AzureRegionsParamsWithTimeout creates a new V1AzureRegionsParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1AzureRegionsParamsWithTimeout(timeout time.Duration) *V1AzureRegionsParams { + var () + return &V1AzureRegionsParams{ + + timeout: timeout, + } +} + +// NewV1AzureRegionsParamsWithContext creates a new V1AzureRegionsParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1AzureRegionsParamsWithContext(ctx context.Context) *V1AzureRegionsParams { + var () + return &V1AzureRegionsParams{ + + Context: ctx, + } +} + +// NewV1AzureRegionsParamsWithHTTPClient creates a new V1AzureRegionsParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1AzureRegionsParamsWithHTTPClient(client *http.Client) *V1AzureRegionsParams { + var () + return &V1AzureRegionsParams{ + HTTPClient: client, + } +} + +/* +V1AzureRegionsParams contains all the parameters to send to the API endpoint +for the v1 azure regions operation typically these are written to a http.Request +*/ +type V1AzureRegionsParams struct { + + /*CloudAccountUID + Uid for the specific Azure cloud account + + */ + CloudAccountUID *string + /*SubscriptionID + SubscriptionId for which resources is requested + + */ + SubscriptionID *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 azure regions params +func (o *V1AzureRegionsParams) WithTimeout(timeout time.Duration) *V1AzureRegionsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 azure regions params +func (o *V1AzureRegionsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 azure regions params +func (o *V1AzureRegionsParams) WithContext(ctx context.Context) *V1AzureRegionsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 azure regions params +func (o *V1AzureRegionsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 azure regions params +func (o *V1AzureRegionsParams) WithHTTPClient(client *http.Client) *V1AzureRegionsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 azure regions params +func (o *V1AzureRegionsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithCloudAccountUID adds the cloudAccountUID to the v1 azure regions params +func (o *V1AzureRegionsParams) WithCloudAccountUID(cloudAccountUID *string) *V1AzureRegionsParams { + o.SetCloudAccountUID(cloudAccountUID) + return o +} + +// SetCloudAccountUID adds the cloudAccountUid to the v1 azure regions params +func (o *V1AzureRegionsParams) SetCloudAccountUID(cloudAccountUID *string) { + o.CloudAccountUID = cloudAccountUID +} + +// WithSubscriptionID adds the subscriptionID to the v1 azure regions params +func (o *V1AzureRegionsParams) WithSubscriptionID(subscriptionID *string) *V1AzureRegionsParams { + o.SetSubscriptionID(subscriptionID) + return o +} + +// SetSubscriptionID adds the subscriptionId to the v1 azure regions params +func (o *V1AzureRegionsParams) SetSubscriptionID(subscriptionID *string) { + o.SubscriptionID = subscriptionID +} + +// WriteToRequest writes these params to a swagger request +func (o *V1AzureRegionsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.CloudAccountUID != nil { + + // query param cloudAccountUid + var qrCloudAccountUID string + if o.CloudAccountUID != nil { + qrCloudAccountUID = *o.CloudAccountUID + } + qCloudAccountUID := qrCloudAccountUID + if qCloudAccountUID != "" { + if err := r.SetQueryParam("cloudAccountUid", qCloudAccountUID); err != nil { + return err + } + } + + } + + if o.SubscriptionID != nil { + + // query param subscriptionId + var qrSubscriptionID string + if o.SubscriptionID != nil { + qrSubscriptionID = *o.SubscriptionID + } + qSubscriptionID := qrSubscriptionID + if qSubscriptionID != "" { + if err := r.SetQueryParam("subscriptionId", qSubscriptionID); err != nil { + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_azure_regions_responses.go b/api/client/v1/v1_azure_regions_responses.go new file mode 100644 index 00000000..9bc0c670 --- /dev/null +++ b/api/client/v1/v1_azure_regions_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1AzureRegionsReader is a Reader for the V1AzureRegions structure. +type V1AzureRegionsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1AzureRegionsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1AzureRegionsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1AzureRegionsOK creates a V1AzureRegionsOK with default headers values +func NewV1AzureRegionsOK() *V1AzureRegionsOK { + return &V1AzureRegionsOK{} +} + +/* +V1AzureRegionsOK handles this case with default header values. + +(empty) +*/ +type V1AzureRegionsOK struct { + Payload *models.V1AzureRegions +} + +func (o *V1AzureRegionsOK) Error() string { + return fmt.Sprintf("[GET /v1/clouds/azure/regions][%d] v1AzureRegionsOK %+v", 200, o.Payload) +} + +func (o *V1AzureRegionsOK) GetPayload() *models.V1AzureRegions { + return o.Payload +} + +func (o *V1AzureRegionsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1AzureRegions) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_azure_resource_group_list_parameters.go b/api/client/v1/v1_azure_resource_group_list_parameters.go new file mode 100644 index 00000000..64407beb --- /dev/null +++ b/api/client/v1/v1_azure_resource_group_list_parameters.go @@ -0,0 +1,182 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1AzureResourceGroupListParams creates a new V1AzureResourceGroupListParams object +// with the default values initialized. +func NewV1AzureResourceGroupListParams() *V1AzureResourceGroupListParams { + var () + return &V1AzureResourceGroupListParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1AzureResourceGroupListParamsWithTimeout creates a new V1AzureResourceGroupListParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1AzureResourceGroupListParamsWithTimeout(timeout time.Duration) *V1AzureResourceGroupListParams { + var () + return &V1AzureResourceGroupListParams{ + + timeout: timeout, + } +} + +// NewV1AzureResourceGroupListParamsWithContext creates a new V1AzureResourceGroupListParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1AzureResourceGroupListParamsWithContext(ctx context.Context) *V1AzureResourceGroupListParams { + var () + return &V1AzureResourceGroupListParams{ + + Context: ctx, + } +} + +// NewV1AzureResourceGroupListParamsWithHTTPClient creates a new V1AzureResourceGroupListParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1AzureResourceGroupListParamsWithHTTPClient(client *http.Client) *V1AzureResourceGroupListParams { + var () + return &V1AzureResourceGroupListParams{ + HTTPClient: client, + } +} + +/* +V1AzureResourceGroupListParams contains all the parameters to send to the API endpoint +for the v1 azure resource group list operation typically these are written to a http.Request +*/ +type V1AzureResourceGroupListParams struct { + + /*CloudAccountUID + Uid for the specific Azure cloud account + + */ + CloudAccountUID string + /*Region + Region for which Azure resource group are requested + + */ + Region string + /*SubscriptionID + Uid for which Azure resource group are requested + + */ + SubscriptionID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 azure resource group list params +func (o *V1AzureResourceGroupListParams) WithTimeout(timeout time.Duration) *V1AzureResourceGroupListParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 azure resource group list params +func (o *V1AzureResourceGroupListParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 azure resource group list params +func (o *V1AzureResourceGroupListParams) WithContext(ctx context.Context) *V1AzureResourceGroupListParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 azure resource group list params +func (o *V1AzureResourceGroupListParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 azure resource group list params +func (o *V1AzureResourceGroupListParams) WithHTTPClient(client *http.Client) *V1AzureResourceGroupListParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 azure resource group list params +func (o *V1AzureResourceGroupListParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithCloudAccountUID adds the cloudAccountUID to the v1 azure resource group list params +func (o *V1AzureResourceGroupListParams) WithCloudAccountUID(cloudAccountUID string) *V1AzureResourceGroupListParams { + o.SetCloudAccountUID(cloudAccountUID) + return o +} + +// SetCloudAccountUID adds the cloudAccountUid to the v1 azure resource group list params +func (o *V1AzureResourceGroupListParams) SetCloudAccountUID(cloudAccountUID string) { + o.CloudAccountUID = cloudAccountUID +} + +// WithRegion adds the region to the v1 azure resource group list params +func (o *V1AzureResourceGroupListParams) WithRegion(region string) *V1AzureResourceGroupListParams { + o.SetRegion(region) + return o +} + +// SetRegion adds the region to the v1 azure resource group list params +func (o *V1AzureResourceGroupListParams) SetRegion(region string) { + o.Region = region +} + +// WithSubscriptionID adds the subscriptionID to the v1 azure resource group list params +func (o *V1AzureResourceGroupListParams) WithSubscriptionID(subscriptionID string) *V1AzureResourceGroupListParams { + o.SetSubscriptionID(subscriptionID) + return o +} + +// SetSubscriptionID adds the subscriptionId to the v1 azure resource group list params +func (o *V1AzureResourceGroupListParams) SetSubscriptionID(subscriptionID string) { + o.SubscriptionID = subscriptionID +} + +// WriteToRequest writes these params to a swagger request +func (o *V1AzureResourceGroupListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // query param cloudAccountUid + qrCloudAccountUID := o.CloudAccountUID + qCloudAccountUID := qrCloudAccountUID + if qCloudAccountUID != "" { + if err := r.SetQueryParam("cloudAccountUid", qCloudAccountUID); err != nil { + return err + } + } + + // path param region + if err := r.SetPathParam("region", o.Region); err != nil { + return err + } + + // path param subscriptionId + if err := r.SetPathParam("subscriptionId", o.SubscriptionID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_azure_resource_group_list_responses.go b/api/client/v1/v1_azure_resource_group_list_responses.go new file mode 100644 index 00000000..4b4b8910 --- /dev/null +++ b/api/client/v1/v1_azure_resource_group_list_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1AzureResourceGroupListReader is a Reader for the V1AzureResourceGroupList structure. +type V1AzureResourceGroupListReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1AzureResourceGroupListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1AzureResourceGroupListOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1AzureResourceGroupListOK creates a V1AzureResourceGroupListOK with default headers values +func NewV1AzureResourceGroupListOK() *V1AzureResourceGroupListOK { + return &V1AzureResourceGroupListOK{} +} + +/* +V1AzureResourceGroupListOK handles this case with default header values. + +(empty) +*/ +type V1AzureResourceGroupListOK struct { + Payload *models.V1AzureResourceGroupList +} + +func (o *V1AzureResourceGroupListOK) Error() string { + return fmt.Sprintf("[GET /v1/clouds/azure/regions/{region}/subscriptions/{subscriptionId}/resourceGroups][%d] v1AzureResourceGroupListOK %+v", 200, o.Payload) +} + +func (o *V1AzureResourceGroupListOK) GetPayload() *models.V1AzureResourceGroupList { + return o.Payload +} + +func (o *V1AzureResourceGroupListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1AzureResourceGroupList) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_azure_storage_account_types_parameters.go b/api/client/v1/v1_azure_storage_account_types_parameters.go new file mode 100644 index 00000000..ac219b93 --- /dev/null +++ b/api/client/v1/v1_azure_storage_account_types_parameters.go @@ -0,0 +1,147 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1AzureStorageAccountTypesParams creates a new V1AzureStorageAccountTypesParams object +// with the default values initialized. +func NewV1AzureStorageAccountTypesParams() *V1AzureStorageAccountTypesParams { + var () + return &V1AzureStorageAccountTypesParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1AzureStorageAccountTypesParamsWithTimeout creates a new V1AzureStorageAccountTypesParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1AzureStorageAccountTypesParamsWithTimeout(timeout time.Duration) *V1AzureStorageAccountTypesParams { + var () + return &V1AzureStorageAccountTypesParams{ + + timeout: timeout, + } +} + +// NewV1AzureStorageAccountTypesParamsWithContext creates a new V1AzureStorageAccountTypesParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1AzureStorageAccountTypesParamsWithContext(ctx context.Context) *V1AzureStorageAccountTypesParams { + var () + return &V1AzureStorageAccountTypesParams{ + + Context: ctx, + } +} + +// NewV1AzureStorageAccountTypesParamsWithHTTPClient creates a new V1AzureStorageAccountTypesParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1AzureStorageAccountTypesParamsWithHTTPClient(client *http.Client) *V1AzureStorageAccountTypesParams { + var () + return &V1AzureStorageAccountTypesParams{ + HTTPClient: client, + } +} + +/* +V1AzureStorageAccountTypesParams contains all the parameters to send to the API endpoint +for the v1 azure storage account types operation typically these are written to a http.Request +*/ +type V1AzureStorageAccountTypesParams struct { + + /*Region + Region for which Azure storage account types are requested + + */ + Region *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 azure storage account types params +func (o *V1AzureStorageAccountTypesParams) WithTimeout(timeout time.Duration) *V1AzureStorageAccountTypesParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 azure storage account types params +func (o *V1AzureStorageAccountTypesParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 azure storage account types params +func (o *V1AzureStorageAccountTypesParams) WithContext(ctx context.Context) *V1AzureStorageAccountTypesParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 azure storage account types params +func (o *V1AzureStorageAccountTypesParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 azure storage account types params +func (o *V1AzureStorageAccountTypesParams) WithHTTPClient(client *http.Client) *V1AzureStorageAccountTypesParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 azure storage account types params +func (o *V1AzureStorageAccountTypesParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithRegion adds the region to the v1 azure storage account types params +func (o *V1AzureStorageAccountTypesParams) WithRegion(region *string) *V1AzureStorageAccountTypesParams { + o.SetRegion(region) + return o +} + +// SetRegion adds the region to the v1 azure storage account types params +func (o *V1AzureStorageAccountTypesParams) SetRegion(region *string) { + o.Region = region +} + +// WriteToRequest writes these params to a swagger request +func (o *V1AzureStorageAccountTypesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Region != nil { + + // query param region + var qrRegion string + if o.Region != nil { + qrRegion = *o.Region + } + qRegion := qrRegion + if qRegion != "" { + if err := r.SetQueryParam("region", qRegion); err != nil { + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_azure_storage_account_types_responses.go b/api/client/v1/v1_azure_storage_account_types_responses.go new file mode 100644 index 00000000..49d707da --- /dev/null +++ b/api/client/v1/v1_azure_storage_account_types_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1AzureStorageAccountTypesReader is a Reader for the V1AzureStorageAccountTypes structure. +type V1AzureStorageAccountTypesReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1AzureStorageAccountTypesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1AzureStorageAccountTypesOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1AzureStorageAccountTypesOK creates a V1AzureStorageAccountTypesOK with default headers values +func NewV1AzureStorageAccountTypesOK() *V1AzureStorageAccountTypesOK { + return &V1AzureStorageAccountTypesOK{} +} + +/* +V1AzureStorageAccountTypesOK handles this case with default header values. + +(empty) +*/ +type V1AzureStorageAccountTypesOK struct { + Payload *models.V1AzureStorageAccountEntity +} + +func (o *V1AzureStorageAccountTypesOK) Error() string { + return fmt.Sprintf("[GET /v1/clouds/azure/storageaccounttypes][%d] v1AzureStorageAccountTypesOK %+v", 200, o.Payload) +} + +func (o *V1AzureStorageAccountTypesOK) GetPayload() *models.V1AzureStorageAccountEntity { + return o.Payload +} + +func (o *V1AzureStorageAccountTypesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1AzureStorageAccountEntity) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_azure_storage_accounts_parameters.go b/api/client/v1/v1_azure_storage_accounts_parameters.go new file mode 100644 index 00000000..a6771c39 --- /dev/null +++ b/api/client/v1/v1_azure_storage_accounts_parameters.go @@ -0,0 +1,193 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1AzureStorageAccountsParams creates a new V1AzureStorageAccountsParams object +// with the default values initialized. +func NewV1AzureStorageAccountsParams() *V1AzureStorageAccountsParams { + var () + return &V1AzureStorageAccountsParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1AzureStorageAccountsParamsWithTimeout creates a new V1AzureStorageAccountsParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1AzureStorageAccountsParamsWithTimeout(timeout time.Duration) *V1AzureStorageAccountsParams { + var () + return &V1AzureStorageAccountsParams{ + + timeout: timeout, + } +} + +// NewV1AzureStorageAccountsParamsWithContext creates a new V1AzureStorageAccountsParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1AzureStorageAccountsParamsWithContext(ctx context.Context) *V1AzureStorageAccountsParams { + var () + return &V1AzureStorageAccountsParams{ + + Context: ctx, + } +} + +// NewV1AzureStorageAccountsParamsWithHTTPClient creates a new V1AzureStorageAccountsParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1AzureStorageAccountsParamsWithHTTPClient(client *http.Client) *V1AzureStorageAccountsParams { + var () + return &V1AzureStorageAccountsParams{ + HTTPClient: client, + } +} + +/* +V1AzureStorageAccountsParams contains all the parameters to send to the API endpoint +for the v1 azure storage accounts operation typically these are written to a http.Request +*/ +type V1AzureStorageAccountsParams struct { + + /*CloudAccountUID + Uid for the specific Azure cloud account + + */ + CloudAccountUID *string + /*ResourceGroup + resourceGroup for which Azure storage accounts are requested + + */ + ResourceGroup string + /*SubscriptionID + subscriptionId for which Azure storage accounts are requested + + */ + SubscriptionID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 azure storage accounts params +func (o *V1AzureStorageAccountsParams) WithTimeout(timeout time.Duration) *V1AzureStorageAccountsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 azure storage accounts params +func (o *V1AzureStorageAccountsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 azure storage accounts params +func (o *V1AzureStorageAccountsParams) WithContext(ctx context.Context) *V1AzureStorageAccountsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 azure storage accounts params +func (o *V1AzureStorageAccountsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 azure storage accounts params +func (o *V1AzureStorageAccountsParams) WithHTTPClient(client *http.Client) *V1AzureStorageAccountsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 azure storage accounts params +func (o *V1AzureStorageAccountsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithCloudAccountUID adds the cloudAccountUID to the v1 azure storage accounts params +func (o *V1AzureStorageAccountsParams) WithCloudAccountUID(cloudAccountUID *string) *V1AzureStorageAccountsParams { + o.SetCloudAccountUID(cloudAccountUID) + return o +} + +// SetCloudAccountUID adds the cloudAccountUid to the v1 azure storage accounts params +func (o *V1AzureStorageAccountsParams) SetCloudAccountUID(cloudAccountUID *string) { + o.CloudAccountUID = cloudAccountUID +} + +// WithResourceGroup adds the resourceGroup to the v1 azure storage accounts params +func (o *V1AzureStorageAccountsParams) WithResourceGroup(resourceGroup string) *V1AzureStorageAccountsParams { + o.SetResourceGroup(resourceGroup) + return o +} + +// SetResourceGroup adds the resourceGroup to the v1 azure storage accounts params +func (o *V1AzureStorageAccountsParams) SetResourceGroup(resourceGroup string) { + o.ResourceGroup = resourceGroup +} + +// WithSubscriptionID adds the subscriptionID to the v1 azure storage accounts params +func (o *V1AzureStorageAccountsParams) WithSubscriptionID(subscriptionID string) *V1AzureStorageAccountsParams { + o.SetSubscriptionID(subscriptionID) + return o +} + +// SetSubscriptionID adds the subscriptionId to the v1 azure storage accounts params +func (o *V1AzureStorageAccountsParams) SetSubscriptionID(subscriptionID string) { + o.SubscriptionID = subscriptionID +} + +// WriteToRequest writes these params to a swagger request +func (o *V1AzureStorageAccountsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.CloudAccountUID != nil { + + // query param cloudAccountUid + var qrCloudAccountUID string + if o.CloudAccountUID != nil { + qrCloudAccountUID = *o.CloudAccountUID + } + qCloudAccountUID := qrCloudAccountUID + if qCloudAccountUID != "" { + if err := r.SetQueryParam("cloudAccountUid", qCloudAccountUID); err != nil { + return err + } + } + + } + + // path param resourceGroup + if err := r.SetPathParam("resourceGroup", o.ResourceGroup); err != nil { + return err + } + + // query param subscriptionId + qrSubscriptionID := o.SubscriptionID + qSubscriptionID := qrSubscriptionID + if qSubscriptionID != "" { + if err := r.SetQueryParam("subscriptionId", qSubscriptionID); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_azure_storage_accounts_responses.go b/api/client/v1/v1_azure_storage_accounts_responses.go new file mode 100644 index 00000000..1f949ae0 --- /dev/null +++ b/api/client/v1/v1_azure_storage_accounts_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1AzureStorageAccountsReader is a Reader for the V1AzureStorageAccounts structure. +type V1AzureStorageAccountsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1AzureStorageAccountsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1AzureStorageAccountsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1AzureStorageAccountsOK creates a V1AzureStorageAccountsOK with default headers values +func NewV1AzureStorageAccountsOK() *V1AzureStorageAccountsOK { + return &V1AzureStorageAccountsOK{} +} + +/* +V1AzureStorageAccountsOK handles this case with default header values. + +(empty) +*/ +type V1AzureStorageAccountsOK struct { + Payload *models.V1AzureStorageAccounts +} + +func (o *V1AzureStorageAccountsOK) Error() string { + return fmt.Sprintf("[GET /v1/clouds/azure/resourceGroups/{resourceGroup}/storageAccounts][%d] v1AzureStorageAccountsOK %+v", 200, o.Payload) +} + +func (o *V1AzureStorageAccountsOK) GetPayload() *models.V1AzureStorageAccounts { + return o.Payload +} + +func (o *V1AzureStorageAccountsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1AzureStorageAccounts) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_azure_storage_containers_parameters.go b/api/client/v1/v1_azure_storage_containers_parameters.go new file mode 100644 index 00000000..f1b30c3e --- /dev/null +++ b/api/client/v1/v1_azure_storage_containers_parameters.go @@ -0,0 +1,214 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1AzureStorageContainersParams creates a new V1AzureStorageContainersParams object +// with the default values initialized. +func NewV1AzureStorageContainersParams() *V1AzureStorageContainersParams { + var () + return &V1AzureStorageContainersParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1AzureStorageContainersParamsWithTimeout creates a new V1AzureStorageContainersParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1AzureStorageContainersParamsWithTimeout(timeout time.Duration) *V1AzureStorageContainersParams { + var () + return &V1AzureStorageContainersParams{ + + timeout: timeout, + } +} + +// NewV1AzureStorageContainersParamsWithContext creates a new V1AzureStorageContainersParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1AzureStorageContainersParamsWithContext(ctx context.Context) *V1AzureStorageContainersParams { + var () + return &V1AzureStorageContainersParams{ + + Context: ctx, + } +} + +// NewV1AzureStorageContainersParamsWithHTTPClient creates a new V1AzureStorageContainersParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1AzureStorageContainersParamsWithHTTPClient(client *http.Client) *V1AzureStorageContainersParams { + var () + return &V1AzureStorageContainersParams{ + HTTPClient: client, + } +} + +/* +V1AzureStorageContainersParams contains all the parameters to send to the API endpoint +for the v1 azure storage containers operation typically these are written to a http.Request +*/ +type V1AzureStorageContainersParams struct { + + /*CloudAccountUID + Uid for the specific Azure cloud account + + */ + CloudAccountUID *string + /*ResourceGroup + resourceGroup for which Azure storage accounts are requested + + */ + ResourceGroup string + /*StorageAccountName + resourceGroup for which Azure storage accounts are requested + + */ + StorageAccountName string + /*SubscriptionID + subscriptionId for which Azure storage accounts are requested + + */ + SubscriptionID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 azure storage containers params +func (o *V1AzureStorageContainersParams) WithTimeout(timeout time.Duration) *V1AzureStorageContainersParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 azure storage containers params +func (o *V1AzureStorageContainersParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 azure storage containers params +func (o *V1AzureStorageContainersParams) WithContext(ctx context.Context) *V1AzureStorageContainersParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 azure storage containers params +func (o *V1AzureStorageContainersParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 azure storage containers params +func (o *V1AzureStorageContainersParams) WithHTTPClient(client *http.Client) *V1AzureStorageContainersParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 azure storage containers params +func (o *V1AzureStorageContainersParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithCloudAccountUID adds the cloudAccountUID to the v1 azure storage containers params +func (o *V1AzureStorageContainersParams) WithCloudAccountUID(cloudAccountUID *string) *V1AzureStorageContainersParams { + o.SetCloudAccountUID(cloudAccountUID) + return o +} + +// SetCloudAccountUID adds the cloudAccountUid to the v1 azure storage containers params +func (o *V1AzureStorageContainersParams) SetCloudAccountUID(cloudAccountUID *string) { + o.CloudAccountUID = cloudAccountUID +} + +// WithResourceGroup adds the resourceGroup to the v1 azure storage containers params +func (o *V1AzureStorageContainersParams) WithResourceGroup(resourceGroup string) *V1AzureStorageContainersParams { + o.SetResourceGroup(resourceGroup) + return o +} + +// SetResourceGroup adds the resourceGroup to the v1 azure storage containers params +func (o *V1AzureStorageContainersParams) SetResourceGroup(resourceGroup string) { + o.ResourceGroup = resourceGroup +} + +// WithStorageAccountName adds the storageAccountName to the v1 azure storage containers params +func (o *V1AzureStorageContainersParams) WithStorageAccountName(storageAccountName string) *V1AzureStorageContainersParams { + o.SetStorageAccountName(storageAccountName) + return o +} + +// SetStorageAccountName adds the storageAccountName to the v1 azure storage containers params +func (o *V1AzureStorageContainersParams) SetStorageAccountName(storageAccountName string) { + o.StorageAccountName = storageAccountName +} + +// WithSubscriptionID adds the subscriptionID to the v1 azure storage containers params +func (o *V1AzureStorageContainersParams) WithSubscriptionID(subscriptionID string) *V1AzureStorageContainersParams { + o.SetSubscriptionID(subscriptionID) + return o +} + +// SetSubscriptionID adds the subscriptionId to the v1 azure storage containers params +func (o *V1AzureStorageContainersParams) SetSubscriptionID(subscriptionID string) { + o.SubscriptionID = subscriptionID +} + +// WriteToRequest writes these params to a swagger request +func (o *V1AzureStorageContainersParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.CloudAccountUID != nil { + + // query param cloudAccountUid + var qrCloudAccountUID string + if o.CloudAccountUID != nil { + qrCloudAccountUID = *o.CloudAccountUID + } + qCloudAccountUID := qrCloudAccountUID + if qCloudAccountUID != "" { + if err := r.SetQueryParam("cloudAccountUid", qCloudAccountUID); err != nil { + return err + } + } + + } + + // path param resourceGroup + if err := r.SetPathParam("resourceGroup", o.ResourceGroup); err != nil { + return err + } + + // path param storageAccountName + if err := r.SetPathParam("storageAccountName", o.StorageAccountName); err != nil { + return err + } + + // query param subscriptionId + qrSubscriptionID := o.SubscriptionID + qSubscriptionID := qrSubscriptionID + if qSubscriptionID != "" { + if err := r.SetQueryParam("subscriptionId", qSubscriptionID); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_azure_storage_containers_responses.go b/api/client/v1/v1_azure_storage_containers_responses.go new file mode 100644 index 00000000..b905017e --- /dev/null +++ b/api/client/v1/v1_azure_storage_containers_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1AzureStorageContainersReader is a Reader for the V1AzureStorageContainers structure. +type V1AzureStorageContainersReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1AzureStorageContainersReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1AzureStorageContainersOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1AzureStorageContainersOK creates a V1AzureStorageContainersOK with default headers values +func NewV1AzureStorageContainersOK() *V1AzureStorageContainersOK { + return &V1AzureStorageContainersOK{} +} + +/* +V1AzureStorageContainersOK handles this case with default header values. + +(empty) +*/ +type V1AzureStorageContainersOK struct { + Payload *models.V1AzureStorageContainers +} + +func (o *V1AzureStorageContainersOK) Error() string { + return fmt.Sprintf("[GET /v1/clouds/azure/resourceGroups/{resourceGroup}/storageAccounts/{storageAccountName}/containers][%d] v1AzureStorageContainersOK %+v", 200, o.Payload) +} + +func (o *V1AzureStorageContainersOK) GetPayload() *models.V1AzureStorageContainers { + return o.Payload +} + +func (o *V1AzureStorageContainersOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1AzureStorageContainers) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_azure_storage_types_parameters.go b/api/client/v1/v1_azure_storage_types_parameters.go new file mode 100644 index 00000000..7283014e --- /dev/null +++ b/api/client/v1/v1_azure_storage_types_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1AzureStorageTypesParams creates a new V1AzureStorageTypesParams object +// with the default values initialized. +func NewV1AzureStorageTypesParams() *V1AzureStorageTypesParams { + var () + return &V1AzureStorageTypesParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1AzureStorageTypesParamsWithTimeout creates a new V1AzureStorageTypesParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1AzureStorageTypesParamsWithTimeout(timeout time.Duration) *V1AzureStorageTypesParams { + var () + return &V1AzureStorageTypesParams{ + + timeout: timeout, + } +} + +// NewV1AzureStorageTypesParamsWithContext creates a new V1AzureStorageTypesParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1AzureStorageTypesParamsWithContext(ctx context.Context) *V1AzureStorageTypesParams { + var () + return &V1AzureStorageTypesParams{ + + Context: ctx, + } +} + +// NewV1AzureStorageTypesParamsWithHTTPClient creates a new V1AzureStorageTypesParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1AzureStorageTypesParamsWithHTTPClient(client *http.Client) *V1AzureStorageTypesParams { + var () + return &V1AzureStorageTypesParams{ + HTTPClient: client, + } +} + +/* +V1AzureStorageTypesParams contains all the parameters to send to the API endpoint +for the v1 azure storage types operation typically these are written to a http.Request +*/ +type V1AzureStorageTypesParams struct { + + /*Region + Region for which Azure storage types are requested + + */ + Region string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 azure storage types params +func (o *V1AzureStorageTypesParams) WithTimeout(timeout time.Duration) *V1AzureStorageTypesParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 azure storage types params +func (o *V1AzureStorageTypesParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 azure storage types params +func (o *V1AzureStorageTypesParams) WithContext(ctx context.Context) *V1AzureStorageTypesParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 azure storage types params +func (o *V1AzureStorageTypesParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 azure storage types params +func (o *V1AzureStorageTypesParams) WithHTTPClient(client *http.Client) *V1AzureStorageTypesParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 azure storage types params +func (o *V1AzureStorageTypesParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithRegion adds the region to the v1 azure storage types params +func (o *V1AzureStorageTypesParams) WithRegion(region string) *V1AzureStorageTypesParams { + o.SetRegion(region) + return o +} + +// SetRegion adds the region to the v1 azure storage types params +func (o *V1AzureStorageTypesParams) SetRegion(region string) { + o.Region = region +} + +// WriteToRequest writes these params to a swagger request +func (o *V1AzureStorageTypesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param region + if err := r.SetPathParam("region", o.Region); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_azure_storage_types_responses.go b/api/client/v1/v1_azure_storage_types_responses.go new file mode 100644 index 00000000..ed0a9d8a --- /dev/null +++ b/api/client/v1/v1_azure_storage_types_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1AzureStorageTypesReader is a Reader for the V1AzureStorageTypes structure. +type V1AzureStorageTypesReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1AzureStorageTypesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1AzureStorageTypesOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1AzureStorageTypesOK creates a V1AzureStorageTypesOK with default headers values +func NewV1AzureStorageTypesOK() *V1AzureStorageTypesOK { + return &V1AzureStorageTypesOK{} +} + +/* +V1AzureStorageTypesOK handles this case with default header values. + +(empty) +*/ +type V1AzureStorageTypesOK struct { + Payload *models.V1AzureStorageTypes +} + +func (o *V1AzureStorageTypesOK) Error() string { + return fmt.Sprintf("[GET /v1/clouds/azure/regions/{region}/storagetypes][%d] v1AzureStorageTypesOK %+v", 200, o.Payload) +} + +func (o *V1AzureStorageTypesOK) GetPayload() *models.V1AzureStorageTypes { + return o.Payload +} + +func (o *V1AzureStorageTypesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1AzureStorageTypes) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_azure_subscription_list_parameters.go b/api/client/v1/v1_azure_subscription_list_parameters.go new file mode 100644 index 00000000..19256b52 --- /dev/null +++ b/api/client/v1/v1_azure_subscription_list_parameters.go @@ -0,0 +1,140 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1AzureSubscriptionListParams creates a new V1AzureSubscriptionListParams object +// with the default values initialized. +func NewV1AzureSubscriptionListParams() *V1AzureSubscriptionListParams { + var () + return &V1AzureSubscriptionListParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1AzureSubscriptionListParamsWithTimeout creates a new V1AzureSubscriptionListParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1AzureSubscriptionListParamsWithTimeout(timeout time.Duration) *V1AzureSubscriptionListParams { + var () + return &V1AzureSubscriptionListParams{ + + timeout: timeout, + } +} + +// NewV1AzureSubscriptionListParamsWithContext creates a new V1AzureSubscriptionListParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1AzureSubscriptionListParamsWithContext(ctx context.Context) *V1AzureSubscriptionListParams { + var () + return &V1AzureSubscriptionListParams{ + + Context: ctx, + } +} + +// NewV1AzureSubscriptionListParamsWithHTTPClient creates a new V1AzureSubscriptionListParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1AzureSubscriptionListParamsWithHTTPClient(client *http.Client) *V1AzureSubscriptionListParams { + var () + return &V1AzureSubscriptionListParams{ + HTTPClient: client, + } +} + +/* +V1AzureSubscriptionListParams contains all the parameters to send to the API endpoint +for the v1 azure subscription list operation typically these are written to a http.Request +*/ +type V1AzureSubscriptionListParams struct { + + /*CloudAccountUID + Uid for the specific Azure cloud account + + */ + CloudAccountUID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 azure subscription list params +func (o *V1AzureSubscriptionListParams) WithTimeout(timeout time.Duration) *V1AzureSubscriptionListParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 azure subscription list params +func (o *V1AzureSubscriptionListParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 azure subscription list params +func (o *V1AzureSubscriptionListParams) WithContext(ctx context.Context) *V1AzureSubscriptionListParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 azure subscription list params +func (o *V1AzureSubscriptionListParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 azure subscription list params +func (o *V1AzureSubscriptionListParams) WithHTTPClient(client *http.Client) *V1AzureSubscriptionListParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 azure subscription list params +func (o *V1AzureSubscriptionListParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithCloudAccountUID adds the cloudAccountUID to the v1 azure subscription list params +func (o *V1AzureSubscriptionListParams) WithCloudAccountUID(cloudAccountUID string) *V1AzureSubscriptionListParams { + o.SetCloudAccountUID(cloudAccountUID) + return o +} + +// SetCloudAccountUID adds the cloudAccountUid to the v1 azure subscription list params +func (o *V1AzureSubscriptionListParams) SetCloudAccountUID(cloudAccountUID string) { + o.CloudAccountUID = cloudAccountUID +} + +// WriteToRequest writes these params to a swagger request +func (o *V1AzureSubscriptionListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // query param cloudAccountUid + qrCloudAccountUID := o.CloudAccountUID + qCloudAccountUID := qrCloudAccountUID + if qCloudAccountUID != "" { + if err := r.SetQueryParam("cloudAccountUid", qCloudAccountUID); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_azure_subscription_list_responses.go b/api/client/v1/v1_azure_subscription_list_responses.go new file mode 100644 index 00000000..cdce6067 --- /dev/null +++ b/api/client/v1/v1_azure_subscription_list_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1AzureSubscriptionListReader is a Reader for the V1AzureSubscriptionList structure. +type V1AzureSubscriptionListReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1AzureSubscriptionListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1AzureSubscriptionListOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1AzureSubscriptionListOK creates a V1AzureSubscriptionListOK with default headers values +func NewV1AzureSubscriptionListOK() *V1AzureSubscriptionListOK { + return &V1AzureSubscriptionListOK{} +} + +/* +V1AzureSubscriptionListOK handles this case with default header values. + +(empty) +*/ +type V1AzureSubscriptionListOK struct { + Payload *models.V1AzureSubscriptionList +} + +func (o *V1AzureSubscriptionListOK) Error() string { + return fmt.Sprintf("[GET /v1/clouds/azure/subscriptions][%d] v1AzureSubscriptionListOK %+v", 200, o.Payload) +} + +func (o *V1AzureSubscriptionListOK) GetPayload() *models.V1AzureSubscriptionList { + return o.Payload +} + +func (o *V1AzureSubscriptionListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1AzureSubscriptionList) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_azure_vhd_url_parameters.go b/api/client/v1/v1_azure_vhd_url_parameters.go new file mode 100644 index 00000000..5759e229 --- /dev/null +++ b/api/client/v1/v1_azure_vhd_url_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1AzureVhdURLParams creates a new V1AzureVhdURLParams object +// with the default values initialized. +func NewV1AzureVhdURLParams() *V1AzureVhdURLParams { + var () + return &V1AzureVhdURLParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1AzureVhdURLParamsWithTimeout creates a new V1AzureVhdURLParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1AzureVhdURLParamsWithTimeout(timeout time.Duration) *V1AzureVhdURLParams { + var () + return &V1AzureVhdURLParams{ + + timeout: timeout, + } +} + +// NewV1AzureVhdURLParamsWithContext creates a new V1AzureVhdURLParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1AzureVhdURLParamsWithContext(ctx context.Context) *V1AzureVhdURLParams { + var () + return &V1AzureVhdURLParams{ + + Context: ctx, + } +} + +// NewV1AzureVhdURLParamsWithHTTPClient creates a new V1AzureVhdURLParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1AzureVhdURLParamsWithHTTPClient(client *http.Client) *V1AzureVhdURLParams { + var () + return &V1AzureVhdURLParams{ + HTTPClient: client, + } +} + +/* +V1AzureVhdURLParams contains all the parameters to send to the API endpoint +for the v1 azure vhd Url operation typically these are written to a http.Request +*/ +type V1AzureVhdURLParams struct { + + /*Vhd + vhd location for which Azure vhd url is requested + + */ + Vhd string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 azure vhd Url params +func (o *V1AzureVhdURLParams) WithTimeout(timeout time.Duration) *V1AzureVhdURLParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 azure vhd Url params +func (o *V1AzureVhdURLParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 azure vhd Url params +func (o *V1AzureVhdURLParams) WithContext(ctx context.Context) *V1AzureVhdURLParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 azure vhd Url params +func (o *V1AzureVhdURLParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 azure vhd Url params +func (o *V1AzureVhdURLParams) WithHTTPClient(client *http.Client) *V1AzureVhdURLParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 azure vhd Url params +func (o *V1AzureVhdURLParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithVhd adds the vhd to the v1 azure vhd Url params +func (o *V1AzureVhdURLParams) WithVhd(vhd string) *V1AzureVhdURLParams { + o.SetVhd(vhd) + return o +} + +// SetVhd adds the vhd to the v1 azure vhd Url params +func (o *V1AzureVhdURLParams) SetVhd(vhd string) { + o.Vhd = vhd +} + +// WriteToRequest writes these params to a swagger request +func (o *V1AzureVhdURLParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param vhd + if err := r.SetPathParam("vhd", o.Vhd); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_azure_vhd_url_responses.go b/api/client/v1/v1_azure_vhd_url_responses.go new file mode 100644 index 00000000..d6dbf93a --- /dev/null +++ b/api/client/v1/v1_azure_vhd_url_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1AzureVhdURLReader is a Reader for the V1AzureVhdURL structure. +type V1AzureVhdURLReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1AzureVhdURLReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1AzureVhdURLOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1AzureVhdURLOK creates a V1AzureVhdURLOK with default headers values +func NewV1AzureVhdURLOK() *V1AzureVhdURLOK { + return &V1AzureVhdURLOK{} +} + +/* +V1AzureVhdURLOK handles this case with default header values. + +(empty) +*/ +type V1AzureVhdURLOK struct { + Payload *models.V1AzureVhdURLEntity +} + +func (o *V1AzureVhdURLOK) Error() string { + return fmt.Sprintf("[GET /v1/clouds/azure/vhds/{vhd}/url][%d] v1AzureVhdUrlOK %+v", 200, o.Payload) +} + +func (o *V1AzureVhdURLOK) GetPayload() *models.V1AzureVhdURLEntity { + return o.Payload +} + +func (o *V1AzureVhdURLOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1AzureVhdURLEntity) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_azure_virtual_network_list_parameters.go b/api/client/v1/v1_azure_virtual_network_list_parameters.go new file mode 100644 index 00000000..c38aa528 --- /dev/null +++ b/api/client/v1/v1_azure_virtual_network_list_parameters.go @@ -0,0 +1,214 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1AzureVirtualNetworkListParams creates a new V1AzureVirtualNetworkListParams object +// with the default values initialized. +func NewV1AzureVirtualNetworkListParams() *V1AzureVirtualNetworkListParams { + var () + return &V1AzureVirtualNetworkListParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1AzureVirtualNetworkListParamsWithTimeout creates a new V1AzureVirtualNetworkListParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1AzureVirtualNetworkListParamsWithTimeout(timeout time.Duration) *V1AzureVirtualNetworkListParams { + var () + return &V1AzureVirtualNetworkListParams{ + + timeout: timeout, + } +} + +// NewV1AzureVirtualNetworkListParamsWithContext creates a new V1AzureVirtualNetworkListParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1AzureVirtualNetworkListParamsWithContext(ctx context.Context) *V1AzureVirtualNetworkListParams { + var () + return &V1AzureVirtualNetworkListParams{ + + Context: ctx, + } +} + +// NewV1AzureVirtualNetworkListParamsWithHTTPClient creates a new V1AzureVirtualNetworkListParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1AzureVirtualNetworkListParamsWithHTTPClient(client *http.Client) *V1AzureVirtualNetworkListParams { + var () + return &V1AzureVirtualNetworkListParams{ + HTTPClient: client, + } +} + +/* +V1AzureVirtualNetworkListParams contains all the parameters to send to the API endpoint +for the v1 azure virtual network list operation typically these are written to a http.Request +*/ +type V1AzureVirtualNetworkListParams struct { + + /*CloudAccountUID + Uid for the specific Azure cloud account + + */ + CloudAccountUID string + /*Region + Region for which Azure virtual networks are requested + + */ + Region string + /*ResourceGroup + Resource group for which Azure virtual networks are requested + + */ + ResourceGroup *string + /*SubscriptionID + Uid for which Azure virtual networks are requested + + */ + SubscriptionID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 azure virtual network list params +func (o *V1AzureVirtualNetworkListParams) WithTimeout(timeout time.Duration) *V1AzureVirtualNetworkListParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 azure virtual network list params +func (o *V1AzureVirtualNetworkListParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 azure virtual network list params +func (o *V1AzureVirtualNetworkListParams) WithContext(ctx context.Context) *V1AzureVirtualNetworkListParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 azure virtual network list params +func (o *V1AzureVirtualNetworkListParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 azure virtual network list params +func (o *V1AzureVirtualNetworkListParams) WithHTTPClient(client *http.Client) *V1AzureVirtualNetworkListParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 azure virtual network list params +func (o *V1AzureVirtualNetworkListParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithCloudAccountUID adds the cloudAccountUID to the v1 azure virtual network list params +func (o *V1AzureVirtualNetworkListParams) WithCloudAccountUID(cloudAccountUID string) *V1AzureVirtualNetworkListParams { + o.SetCloudAccountUID(cloudAccountUID) + return o +} + +// SetCloudAccountUID adds the cloudAccountUid to the v1 azure virtual network list params +func (o *V1AzureVirtualNetworkListParams) SetCloudAccountUID(cloudAccountUID string) { + o.CloudAccountUID = cloudAccountUID +} + +// WithRegion adds the region to the v1 azure virtual network list params +func (o *V1AzureVirtualNetworkListParams) WithRegion(region string) *V1AzureVirtualNetworkListParams { + o.SetRegion(region) + return o +} + +// SetRegion adds the region to the v1 azure virtual network list params +func (o *V1AzureVirtualNetworkListParams) SetRegion(region string) { + o.Region = region +} + +// WithResourceGroup adds the resourceGroup to the v1 azure virtual network list params +func (o *V1AzureVirtualNetworkListParams) WithResourceGroup(resourceGroup *string) *V1AzureVirtualNetworkListParams { + o.SetResourceGroup(resourceGroup) + return o +} + +// SetResourceGroup adds the resourceGroup to the v1 azure virtual network list params +func (o *V1AzureVirtualNetworkListParams) SetResourceGroup(resourceGroup *string) { + o.ResourceGroup = resourceGroup +} + +// WithSubscriptionID adds the subscriptionID to the v1 azure virtual network list params +func (o *V1AzureVirtualNetworkListParams) WithSubscriptionID(subscriptionID string) *V1AzureVirtualNetworkListParams { + o.SetSubscriptionID(subscriptionID) + return o +} + +// SetSubscriptionID adds the subscriptionId to the v1 azure virtual network list params +func (o *V1AzureVirtualNetworkListParams) SetSubscriptionID(subscriptionID string) { + o.SubscriptionID = subscriptionID +} + +// WriteToRequest writes these params to a swagger request +func (o *V1AzureVirtualNetworkListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // query param cloudAccountUid + qrCloudAccountUID := o.CloudAccountUID + qCloudAccountUID := qrCloudAccountUID + if qCloudAccountUID != "" { + if err := r.SetQueryParam("cloudAccountUid", qCloudAccountUID); err != nil { + return err + } + } + + // path param region + if err := r.SetPathParam("region", o.Region); err != nil { + return err + } + + if o.ResourceGroup != nil { + + // query param resourceGroup + var qrResourceGroup string + if o.ResourceGroup != nil { + qrResourceGroup = *o.ResourceGroup + } + qResourceGroup := qrResourceGroup + if qResourceGroup != "" { + if err := r.SetQueryParam("resourceGroup", qResourceGroup); err != nil { + return err + } + } + + } + + // path param subscriptionId + if err := r.SetPathParam("subscriptionId", o.SubscriptionID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_azure_virtual_network_list_responses.go b/api/client/v1/v1_azure_virtual_network_list_responses.go new file mode 100644 index 00000000..024ee31a --- /dev/null +++ b/api/client/v1/v1_azure_virtual_network_list_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1AzureVirtualNetworkListReader is a Reader for the V1AzureVirtualNetworkList structure. +type V1AzureVirtualNetworkListReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1AzureVirtualNetworkListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1AzureVirtualNetworkListOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1AzureVirtualNetworkListOK creates a V1AzureVirtualNetworkListOK with default headers values +func NewV1AzureVirtualNetworkListOK() *V1AzureVirtualNetworkListOK { + return &V1AzureVirtualNetworkListOK{} +} + +/* +V1AzureVirtualNetworkListOK handles this case with default header values. + +(empty) +*/ +type V1AzureVirtualNetworkListOK struct { + Payload *models.V1AzureVirtualNetworkList +} + +func (o *V1AzureVirtualNetworkListOK) Error() string { + return fmt.Sprintf("[GET /v1/clouds/azure/regions/{region}/subscriptions/{subscriptionId}/networks][%d] v1AzureVirtualNetworkListOK %+v", 200, o.Payload) +} + +func (o *V1AzureVirtualNetworkListOK) GetPayload() *models.V1AzureVirtualNetworkList { + return o.Payload +} + +func (o *V1AzureVirtualNetworkListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1AzureVirtualNetworkList) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_azure_zones_parameters.go b/api/client/v1/v1_azure_zones_parameters.go new file mode 100644 index 00000000..14ba4abd --- /dev/null +++ b/api/client/v1/v1_azure_zones_parameters.go @@ -0,0 +1,200 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1AzureZonesParams creates a new V1AzureZonesParams object +// with the default values initialized. +func NewV1AzureZonesParams() *V1AzureZonesParams { + var () + return &V1AzureZonesParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1AzureZonesParamsWithTimeout creates a new V1AzureZonesParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1AzureZonesParamsWithTimeout(timeout time.Duration) *V1AzureZonesParams { + var () + return &V1AzureZonesParams{ + + timeout: timeout, + } +} + +// NewV1AzureZonesParamsWithContext creates a new V1AzureZonesParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1AzureZonesParamsWithContext(ctx context.Context) *V1AzureZonesParams { + var () + return &V1AzureZonesParams{ + + Context: ctx, + } +} + +// NewV1AzureZonesParamsWithHTTPClient creates a new V1AzureZonesParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1AzureZonesParamsWithHTTPClient(client *http.Client) *V1AzureZonesParams { + var () + return &V1AzureZonesParams{ + HTTPClient: client, + } +} + +/* +V1AzureZonesParams contains all the parameters to send to the API endpoint +for the v1 azure zones operation typically these are written to a http.Request +*/ +type V1AzureZonesParams struct { + + /*CloudAccountUID + Uid for the specific Azure cloud account + + */ + CloudAccountUID *string + /*Region + Region for which Azure zones are requested + + */ + Region string + /*SubscriptionID + subscriptionId of azure account + + */ + SubscriptionID *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 azure zones params +func (o *V1AzureZonesParams) WithTimeout(timeout time.Duration) *V1AzureZonesParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 azure zones params +func (o *V1AzureZonesParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 azure zones params +func (o *V1AzureZonesParams) WithContext(ctx context.Context) *V1AzureZonesParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 azure zones params +func (o *V1AzureZonesParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 azure zones params +func (o *V1AzureZonesParams) WithHTTPClient(client *http.Client) *V1AzureZonesParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 azure zones params +func (o *V1AzureZonesParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithCloudAccountUID adds the cloudAccountUID to the v1 azure zones params +func (o *V1AzureZonesParams) WithCloudAccountUID(cloudAccountUID *string) *V1AzureZonesParams { + o.SetCloudAccountUID(cloudAccountUID) + return o +} + +// SetCloudAccountUID adds the cloudAccountUid to the v1 azure zones params +func (o *V1AzureZonesParams) SetCloudAccountUID(cloudAccountUID *string) { + o.CloudAccountUID = cloudAccountUID +} + +// WithRegion adds the region to the v1 azure zones params +func (o *V1AzureZonesParams) WithRegion(region string) *V1AzureZonesParams { + o.SetRegion(region) + return o +} + +// SetRegion adds the region to the v1 azure zones params +func (o *V1AzureZonesParams) SetRegion(region string) { + o.Region = region +} + +// WithSubscriptionID adds the subscriptionID to the v1 azure zones params +func (o *V1AzureZonesParams) WithSubscriptionID(subscriptionID *string) *V1AzureZonesParams { + o.SetSubscriptionID(subscriptionID) + return o +} + +// SetSubscriptionID adds the subscriptionId to the v1 azure zones params +func (o *V1AzureZonesParams) SetSubscriptionID(subscriptionID *string) { + o.SubscriptionID = subscriptionID +} + +// WriteToRequest writes these params to a swagger request +func (o *V1AzureZonesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.CloudAccountUID != nil { + + // query param cloudAccountUid + var qrCloudAccountUID string + if o.CloudAccountUID != nil { + qrCloudAccountUID = *o.CloudAccountUID + } + qCloudAccountUID := qrCloudAccountUID + if qCloudAccountUID != "" { + if err := r.SetQueryParam("cloudAccountUid", qCloudAccountUID); err != nil { + return err + } + } + + } + + // path param region + if err := r.SetPathParam("region", o.Region); err != nil { + return err + } + + if o.SubscriptionID != nil { + + // query param subscriptionId + var qrSubscriptionID string + if o.SubscriptionID != nil { + qrSubscriptionID = *o.SubscriptionID + } + qSubscriptionID := qrSubscriptionID + if qSubscriptionID != "" { + if err := r.SetQueryParam("subscriptionId", qSubscriptionID); err != nil { + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_azure_zones_responses.go b/api/client/v1/v1_azure_zones_responses.go new file mode 100644 index 00000000..9a795268 --- /dev/null +++ b/api/client/v1/v1_azure_zones_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1AzureZonesReader is a Reader for the V1AzureZones structure. +type V1AzureZonesReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1AzureZonesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1AzureZonesOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1AzureZonesOK creates a V1AzureZonesOK with default headers values +func NewV1AzureZonesOK() *V1AzureZonesOK { + return &V1AzureZonesOK{} +} + +/* +V1AzureZonesOK handles this case with default header values. + +(empty) +*/ +type V1AzureZonesOK struct { + Payload *models.V1AzureZoneEntity +} + +func (o *V1AzureZonesOK) Error() string { + return fmt.Sprintf("[GET /v1/clouds/azure/regions/{region}/zones][%d] v1AzureZonesOK %+v", 200, o.Payload) +} + +func (o *V1AzureZonesOK) GetPayload() *models.V1AzureZoneEntity { + return o.Payload +} + +func (o *V1AzureZonesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1AzureZoneEntity) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_basic_oci_registries_create_parameters.go b/api/client/v1/v1_basic_oci_registries_create_parameters.go new file mode 100644 index 00000000..5ae25656 --- /dev/null +++ b/api/client/v1/v1_basic_oci_registries_create_parameters.go @@ -0,0 +1,178 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1BasicOciRegistriesCreateParams creates a new V1BasicOciRegistriesCreateParams object +// with the default values initialized. +func NewV1BasicOciRegistriesCreateParams() *V1BasicOciRegistriesCreateParams { + var ( + skipPackSyncDefault = bool(false) + ) + return &V1BasicOciRegistriesCreateParams{ + SkipPackSync: &skipPackSyncDefault, + + timeout: cr.DefaultTimeout, + } +} + +// NewV1BasicOciRegistriesCreateParamsWithTimeout creates a new V1BasicOciRegistriesCreateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1BasicOciRegistriesCreateParamsWithTimeout(timeout time.Duration) *V1BasicOciRegistriesCreateParams { + var ( + skipPackSyncDefault = bool(false) + ) + return &V1BasicOciRegistriesCreateParams{ + SkipPackSync: &skipPackSyncDefault, + + timeout: timeout, + } +} + +// NewV1BasicOciRegistriesCreateParamsWithContext creates a new V1BasicOciRegistriesCreateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1BasicOciRegistriesCreateParamsWithContext(ctx context.Context) *V1BasicOciRegistriesCreateParams { + var ( + skipPackSyncDefault = bool(false) + ) + return &V1BasicOciRegistriesCreateParams{ + SkipPackSync: &skipPackSyncDefault, + + Context: ctx, + } +} + +// NewV1BasicOciRegistriesCreateParamsWithHTTPClient creates a new V1BasicOciRegistriesCreateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1BasicOciRegistriesCreateParamsWithHTTPClient(client *http.Client) *V1BasicOciRegistriesCreateParams { + var ( + skipPackSyncDefault = bool(false) + ) + return &V1BasicOciRegistriesCreateParams{ + SkipPackSync: &skipPackSyncDefault, + HTTPClient: client, + } +} + +/* +V1BasicOciRegistriesCreateParams contains all the parameters to send to the API endpoint +for the v1 basic oci registries create operation typically these are written to a http.Request +*/ +type V1BasicOciRegistriesCreateParams struct { + + /*Body*/ + Body *models.V1BasicOciRegistry + /*SkipPackSync*/ + SkipPackSync *bool + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 basic oci registries create params +func (o *V1BasicOciRegistriesCreateParams) WithTimeout(timeout time.Duration) *V1BasicOciRegistriesCreateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 basic oci registries create params +func (o *V1BasicOciRegistriesCreateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 basic oci registries create params +func (o *V1BasicOciRegistriesCreateParams) WithContext(ctx context.Context) *V1BasicOciRegistriesCreateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 basic oci registries create params +func (o *V1BasicOciRegistriesCreateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 basic oci registries create params +func (o *V1BasicOciRegistriesCreateParams) WithHTTPClient(client *http.Client) *V1BasicOciRegistriesCreateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 basic oci registries create params +func (o *V1BasicOciRegistriesCreateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 basic oci registries create params +func (o *V1BasicOciRegistriesCreateParams) WithBody(body *models.V1BasicOciRegistry) *V1BasicOciRegistriesCreateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 basic oci registries create params +func (o *V1BasicOciRegistriesCreateParams) SetBody(body *models.V1BasicOciRegistry) { + o.Body = body +} + +// WithSkipPackSync adds the skipPackSync to the v1 basic oci registries create params +func (o *V1BasicOciRegistriesCreateParams) WithSkipPackSync(skipPackSync *bool) *V1BasicOciRegistriesCreateParams { + o.SetSkipPackSync(skipPackSync) + return o +} + +// SetSkipPackSync adds the skipPackSync to the v1 basic oci registries create params +func (o *V1BasicOciRegistriesCreateParams) SetSkipPackSync(skipPackSync *bool) { + o.SkipPackSync = skipPackSync +} + +// WriteToRequest writes these params to a swagger request +func (o *V1BasicOciRegistriesCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + if o.SkipPackSync != nil { + + // query param skipPackSync + var qrSkipPackSync bool + if o.SkipPackSync != nil { + qrSkipPackSync = *o.SkipPackSync + } + qSkipPackSync := swag.FormatBool(qrSkipPackSync) + if qSkipPackSync != "" { + if err := r.SetQueryParam("skipPackSync", qSkipPackSync); err != nil { + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_basic_oci_registries_create_responses.go b/api/client/v1/v1_basic_oci_registries_create_responses.go new file mode 100644 index 00000000..af9d6758 --- /dev/null +++ b/api/client/v1/v1_basic_oci_registries_create_responses.go @@ -0,0 +1,77 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1BasicOciRegistriesCreateReader is a Reader for the V1BasicOciRegistriesCreate structure. +type V1BasicOciRegistriesCreateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1BasicOciRegistriesCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 201: + result := NewV1BasicOciRegistriesCreateCreated() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1BasicOciRegistriesCreateCreated creates a V1BasicOciRegistriesCreateCreated with default headers values +func NewV1BasicOciRegistriesCreateCreated() *V1BasicOciRegistriesCreateCreated { + return &V1BasicOciRegistriesCreateCreated{} +} + +/* +V1BasicOciRegistriesCreateCreated handles this case with default header values. + +Created successfully +*/ +type V1BasicOciRegistriesCreateCreated struct { + /*Audit uid for the request + */ + AuditUID string + + Payload *models.V1UID +} + +func (o *V1BasicOciRegistriesCreateCreated) Error() string { + return fmt.Sprintf("[POST /v1/registries/oci/basic][%d] v1BasicOciRegistriesCreateCreated %+v", 201, o.Payload) +} + +func (o *V1BasicOciRegistriesCreateCreated) GetPayload() *models.V1UID { + return o.Payload +} + +func (o *V1BasicOciRegistriesCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header AuditUid + o.AuditUID = response.GetHeader("AuditUid") + + o.Payload = new(models.V1UID) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_basic_oci_registries_uid_delete_parameters.go b/api/client/v1/v1_basic_oci_registries_uid_delete_parameters.go new file mode 100644 index 00000000..13530790 --- /dev/null +++ b/api/client/v1/v1_basic_oci_registries_uid_delete_parameters.go @@ -0,0 +1,133 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1BasicOciRegistriesUIDDeleteParams creates a new V1BasicOciRegistriesUIDDeleteParams object +// with the default values initialized. +func NewV1BasicOciRegistriesUIDDeleteParams() *V1BasicOciRegistriesUIDDeleteParams { + var () + return &V1BasicOciRegistriesUIDDeleteParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1BasicOciRegistriesUIDDeleteParamsWithTimeout creates a new V1BasicOciRegistriesUIDDeleteParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1BasicOciRegistriesUIDDeleteParamsWithTimeout(timeout time.Duration) *V1BasicOciRegistriesUIDDeleteParams { + var () + return &V1BasicOciRegistriesUIDDeleteParams{ + + timeout: timeout, + } +} + +// NewV1BasicOciRegistriesUIDDeleteParamsWithContext creates a new V1BasicOciRegistriesUIDDeleteParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1BasicOciRegistriesUIDDeleteParamsWithContext(ctx context.Context) *V1BasicOciRegistriesUIDDeleteParams { + var () + return &V1BasicOciRegistriesUIDDeleteParams{ + + Context: ctx, + } +} + +// NewV1BasicOciRegistriesUIDDeleteParamsWithHTTPClient creates a new V1BasicOciRegistriesUIDDeleteParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1BasicOciRegistriesUIDDeleteParamsWithHTTPClient(client *http.Client) *V1BasicOciRegistriesUIDDeleteParams { + var () + return &V1BasicOciRegistriesUIDDeleteParams{ + HTTPClient: client, + } +} + +/* +V1BasicOciRegistriesUIDDeleteParams contains all the parameters to send to the API endpoint +for the v1 basic oci registries Uid delete operation typically these are written to a http.Request +*/ +type V1BasicOciRegistriesUIDDeleteParams struct { + + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 basic oci registries Uid delete params +func (o *V1BasicOciRegistriesUIDDeleteParams) WithTimeout(timeout time.Duration) *V1BasicOciRegistriesUIDDeleteParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 basic oci registries Uid delete params +func (o *V1BasicOciRegistriesUIDDeleteParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 basic oci registries Uid delete params +func (o *V1BasicOciRegistriesUIDDeleteParams) WithContext(ctx context.Context) *V1BasicOciRegistriesUIDDeleteParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 basic oci registries Uid delete params +func (o *V1BasicOciRegistriesUIDDeleteParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 basic oci registries Uid delete params +func (o *V1BasicOciRegistriesUIDDeleteParams) WithHTTPClient(client *http.Client) *V1BasicOciRegistriesUIDDeleteParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 basic oci registries Uid delete params +func (o *V1BasicOciRegistriesUIDDeleteParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithUID adds the uid to the v1 basic oci registries Uid delete params +func (o *V1BasicOciRegistriesUIDDeleteParams) WithUID(uid string) *V1BasicOciRegistriesUIDDeleteParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 basic oci registries Uid delete params +func (o *V1BasicOciRegistriesUIDDeleteParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1BasicOciRegistriesUIDDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_basic_oci_registries_uid_delete_responses.go b/api/client/v1/v1_basic_oci_registries_uid_delete_responses.go new file mode 100644 index 00000000..dbf2db9f --- /dev/null +++ b/api/client/v1/v1_basic_oci_registries_uid_delete_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1BasicOciRegistriesUIDDeleteReader is a Reader for the V1BasicOciRegistriesUIDDelete structure. +type V1BasicOciRegistriesUIDDeleteReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1BasicOciRegistriesUIDDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1BasicOciRegistriesUIDDeleteNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1BasicOciRegistriesUIDDeleteNoContent creates a V1BasicOciRegistriesUIDDeleteNoContent with default headers values +func NewV1BasicOciRegistriesUIDDeleteNoContent() *V1BasicOciRegistriesUIDDeleteNoContent { + return &V1BasicOciRegistriesUIDDeleteNoContent{} +} + +/* +V1BasicOciRegistriesUIDDeleteNoContent handles this case with default header values. + +The resource was deleted successfully +*/ +type V1BasicOciRegistriesUIDDeleteNoContent struct { +} + +func (o *V1BasicOciRegistriesUIDDeleteNoContent) Error() string { + return fmt.Sprintf("[DELETE /v1/registries/oci/{uid}/basic][%d] v1BasicOciRegistriesUidDeleteNoContent ", 204) +} + +func (o *V1BasicOciRegistriesUIDDeleteNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_basic_oci_registries_uid_get_parameters.go b/api/client/v1/v1_basic_oci_registries_uid_get_parameters.go new file mode 100644 index 00000000..eba8f4c9 --- /dev/null +++ b/api/client/v1/v1_basic_oci_registries_uid_get_parameters.go @@ -0,0 +1,133 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1BasicOciRegistriesUIDGetParams creates a new V1BasicOciRegistriesUIDGetParams object +// with the default values initialized. +func NewV1BasicOciRegistriesUIDGetParams() *V1BasicOciRegistriesUIDGetParams { + var () + return &V1BasicOciRegistriesUIDGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1BasicOciRegistriesUIDGetParamsWithTimeout creates a new V1BasicOciRegistriesUIDGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1BasicOciRegistriesUIDGetParamsWithTimeout(timeout time.Duration) *V1BasicOciRegistriesUIDGetParams { + var () + return &V1BasicOciRegistriesUIDGetParams{ + + timeout: timeout, + } +} + +// NewV1BasicOciRegistriesUIDGetParamsWithContext creates a new V1BasicOciRegistriesUIDGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1BasicOciRegistriesUIDGetParamsWithContext(ctx context.Context) *V1BasicOciRegistriesUIDGetParams { + var () + return &V1BasicOciRegistriesUIDGetParams{ + + Context: ctx, + } +} + +// NewV1BasicOciRegistriesUIDGetParamsWithHTTPClient creates a new V1BasicOciRegistriesUIDGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1BasicOciRegistriesUIDGetParamsWithHTTPClient(client *http.Client) *V1BasicOciRegistriesUIDGetParams { + var () + return &V1BasicOciRegistriesUIDGetParams{ + HTTPClient: client, + } +} + +/* +V1BasicOciRegistriesUIDGetParams contains all the parameters to send to the API endpoint +for the v1 basic oci registries Uid get operation typically these are written to a http.Request +*/ +type V1BasicOciRegistriesUIDGetParams struct { + + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 basic oci registries Uid get params +func (o *V1BasicOciRegistriesUIDGetParams) WithTimeout(timeout time.Duration) *V1BasicOciRegistriesUIDGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 basic oci registries Uid get params +func (o *V1BasicOciRegistriesUIDGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 basic oci registries Uid get params +func (o *V1BasicOciRegistriesUIDGetParams) WithContext(ctx context.Context) *V1BasicOciRegistriesUIDGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 basic oci registries Uid get params +func (o *V1BasicOciRegistriesUIDGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 basic oci registries Uid get params +func (o *V1BasicOciRegistriesUIDGetParams) WithHTTPClient(client *http.Client) *V1BasicOciRegistriesUIDGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 basic oci registries Uid get params +func (o *V1BasicOciRegistriesUIDGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithUID adds the uid to the v1 basic oci registries Uid get params +func (o *V1BasicOciRegistriesUIDGetParams) WithUID(uid string) *V1BasicOciRegistriesUIDGetParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 basic oci registries Uid get params +func (o *V1BasicOciRegistriesUIDGetParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1BasicOciRegistriesUIDGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_basic_oci_registries_uid_get_responses.go b/api/client/v1/v1_basic_oci_registries_uid_get_responses.go new file mode 100644 index 00000000..faeabcbe --- /dev/null +++ b/api/client/v1/v1_basic_oci_registries_uid_get_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1BasicOciRegistriesUIDGetReader is a Reader for the V1BasicOciRegistriesUIDGet structure. +type V1BasicOciRegistriesUIDGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1BasicOciRegistriesUIDGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1BasicOciRegistriesUIDGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1BasicOciRegistriesUIDGetOK creates a V1BasicOciRegistriesUIDGetOK with default headers values +func NewV1BasicOciRegistriesUIDGetOK() *V1BasicOciRegistriesUIDGetOK { + return &V1BasicOciRegistriesUIDGetOK{} +} + +/* +V1BasicOciRegistriesUIDGetOK handles this case with default header values. + +OK +*/ +type V1BasicOciRegistriesUIDGetOK struct { + Payload *models.V1BasicOciRegistry +} + +func (o *V1BasicOciRegistriesUIDGetOK) Error() string { + return fmt.Sprintf("[GET /v1/registries/oci/{uid}/basic][%d] v1BasicOciRegistriesUidGetOK %+v", 200, o.Payload) +} + +func (o *V1BasicOciRegistriesUIDGetOK) GetPayload() *models.V1BasicOciRegistry { + return o.Payload +} + +func (o *V1BasicOciRegistriesUIDGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1BasicOciRegistry) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_basic_oci_registries_uid_sync_parameters.go b/api/client/v1/v1_basic_oci_registries_uid_sync_parameters.go new file mode 100644 index 00000000..2e709b5c --- /dev/null +++ b/api/client/v1/v1_basic_oci_registries_uid_sync_parameters.go @@ -0,0 +1,175 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// NewV1BasicOciRegistriesUIDSyncParams creates a new V1BasicOciRegistriesUIDSyncParams object +// with the default values initialized. +func NewV1BasicOciRegistriesUIDSyncParams() *V1BasicOciRegistriesUIDSyncParams { + var ( + forceSyncDefault = bool(false) + ) + return &V1BasicOciRegistriesUIDSyncParams{ + ForceSync: &forceSyncDefault, + + timeout: cr.DefaultTimeout, + } +} + +// NewV1BasicOciRegistriesUIDSyncParamsWithTimeout creates a new V1BasicOciRegistriesUIDSyncParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1BasicOciRegistriesUIDSyncParamsWithTimeout(timeout time.Duration) *V1BasicOciRegistriesUIDSyncParams { + var ( + forceSyncDefault = bool(false) + ) + return &V1BasicOciRegistriesUIDSyncParams{ + ForceSync: &forceSyncDefault, + + timeout: timeout, + } +} + +// NewV1BasicOciRegistriesUIDSyncParamsWithContext creates a new V1BasicOciRegistriesUIDSyncParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1BasicOciRegistriesUIDSyncParamsWithContext(ctx context.Context) *V1BasicOciRegistriesUIDSyncParams { + var ( + forceSyncDefault = bool(false) + ) + return &V1BasicOciRegistriesUIDSyncParams{ + ForceSync: &forceSyncDefault, + + Context: ctx, + } +} + +// NewV1BasicOciRegistriesUIDSyncParamsWithHTTPClient creates a new V1BasicOciRegistriesUIDSyncParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1BasicOciRegistriesUIDSyncParamsWithHTTPClient(client *http.Client) *V1BasicOciRegistriesUIDSyncParams { + var ( + forceSyncDefault = bool(false) + ) + return &V1BasicOciRegistriesUIDSyncParams{ + ForceSync: &forceSyncDefault, + HTTPClient: client, + } +} + +/* +V1BasicOciRegistriesUIDSyncParams contains all the parameters to send to the API endpoint +for the v1 basic oci registries Uid sync operation typically these are written to a http.Request +*/ +type V1BasicOciRegistriesUIDSyncParams struct { + + /*ForceSync*/ + ForceSync *bool + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 basic oci registries Uid sync params +func (o *V1BasicOciRegistriesUIDSyncParams) WithTimeout(timeout time.Duration) *V1BasicOciRegistriesUIDSyncParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 basic oci registries Uid sync params +func (o *V1BasicOciRegistriesUIDSyncParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 basic oci registries Uid sync params +func (o *V1BasicOciRegistriesUIDSyncParams) WithContext(ctx context.Context) *V1BasicOciRegistriesUIDSyncParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 basic oci registries Uid sync params +func (o *V1BasicOciRegistriesUIDSyncParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 basic oci registries Uid sync params +func (o *V1BasicOciRegistriesUIDSyncParams) WithHTTPClient(client *http.Client) *V1BasicOciRegistriesUIDSyncParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 basic oci registries Uid sync params +func (o *V1BasicOciRegistriesUIDSyncParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithForceSync adds the forceSync to the v1 basic oci registries Uid sync params +func (o *V1BasicOciRegistriesUIDSyncParams) WithForceSync(forceSync *bool) *V1BasicOciRegistriesUIDSyncParams { + o.SetForceSync(forceSync) + return o +} + +// SetForceSync adds the forceSync to the v1 basic oci registries Uid sync params +func (o *V1BasicOciRegistriesUIDSyncParams) SetForceSync(forceSync *bool) { + o.ForceSync = forceSync +} + +// WithUID adds the uid to the v1 basic oci registries Uid sync params +func (o *V1BasicOciRegistriesUIDSyncParams) WithUID(uid string) *V1BasicOciRegistriesUIDSyncParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 basic oci registries Uid sync params +func (o *V1BasicOciRegistriesUIDSyncParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1BasicOciRegistriesUIDSyncParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.ForceSync != nil { + + // query param forceSync + var qrForceSync bool + if o.ForceSync != nil { + qrForceSync = *o.ForceSync + } + qForceSync := swag.FormatBool(qrForceSync) + if qForceSync != "" { + if err := r.SetQueryParam("forceSync", qForceSync); err != nil { + return err + } + } + + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_basic_oci_registries_uid_sync_responses.go b/api/client/v1/v1_basic_oci_registries_uid_sync_responses.go new file mode 100644 index 00000000..307b49d8 --- /dev/null +++ b/api/client/v1/v1_basic_oci_registries_uid_sync_responses.go @@ -0,0 +1,61 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1BasicOciRegistriesUIDSyncReader is a Reader for the V1BasicOciRegistriesUIDSync structure. +type V1BasicOciRegistriesUIDSyncReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1BasicOciRegistriesUIDSyncReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 202: + result := NewV1BasicOciRegistriesUIDSyncAccepted() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1BasicOciRegistriesUIDSyncAccepted creates a V1BasicOciRegistriesUIDSyncAccepted with default headers values +func NewV1BasicOciRegistriesUIDSyncAccepted() *V1BasicOciRegistriesUIDSyncAccepted { + return &V1BasicOciRegistriesUIDSyncAccepted{} +} + +/* +V1BasicOciRegistriesUIDSyncAccepted handles this case with default header values. + +Ok response without content +*/ +type V1BasicOciRegistriesUIDSyncAccepted struct { + /*Audit uid for the request + */ + AuditUID string +} + +func (o *V1BasicOciRegistriesUIDSyncAccepted) Error() string { + return fmt.Sprintf("[POST /v1/registries/oci/{uid}/basic/sync][%d] v1BasicOciRegistriesUidSyncAccepted ", 202) +} + +func (o *V1BasicOciRegistriesUIDSyncAccepted) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header AuditUid + o.AuditUID = response.GetHeader("AuditUid") + + return nil +} diff --git a/api/client/v1/v1_basic_oci_registries_uid_sync_status_parameters.go b/api/client/v1/v1_basic_oci_registries_uid_sync_status_parameters.go new file mode 100644 index 00000000..eabe49a1 --- /dev/null +++ b/api/client/v1/v1_basic_oci_registries_uid_sync_status_parameters.go @@ -0,0 +1,133 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1BasicOciRegistriesUIDSyncStatusParams creates a new V1BasicOciRegistriesUIDSyncStatusParams object +// with the default values initialized. +func NewV1BasicOciRegistriesUIDSyncStatusParams() *V1BasicOciRegistriesUIDSyncStatusParams { + var () + return &V1BasicOciRegistriesUIDSyncStatusParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1BasicOciRegistriesUIDSyncStatusParamsWithTimeout creates a new V1BasicOciRegistriesUIDSyncStatusParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1BasicOciRegistriesUIDSyncStatusParamsWithTimeout(timeout time.Duration) *V1BasicOciRegistriesUIDSyncStatusParams { + var () + return &V1BasicOciRegistriesUIDSyncStatusParams{ + + timeout: timeout, + } +} + +// NewV1BasicOciRegistriesUIDSyncStatusParamsWithContext creates a new V1BasicOciRegistriesUIDSyncStatusParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1BasicOciRegistriesUIDSyncStatusParamsWithContext(ctx context.Context) *V1BasicOciRegistriesUIDSyncStatusParams { + var () + return &V1BasicOciRegistriesUIDSyncStatusParams{ + + Context: ctx, + } +} + +// NewV1BasicOciRegistriesUIDSyncStatusParamsWithHTTPClient creates a new V1BasicOciRegistriesUIDSyncStatusParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1BasicOciRegistriesUIDSyncStatusParamsWithHTTPClient(client *http.Client) *V1BasicOciRegistriesUIDSyncStatusParams { + var () + return &V1BasicOciRegistriesUIDSyncStatusParams{ + HTTPClient: client, + } +} + +/* +V1BasicOciRegistriesUIDSyncStatusParams contains all the parameters to send to the API endpoint +for the v1 basic oci registries Uid sync status operation typically these are written to a http.Request +*/ +type V1BasicOciRegistriesUIDSyncStatusParams struct { + + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 basic oci registries Uid sync status params +func (o *V1BasicOciRegistriesUIDSyncStatusParams) WithTimeout(timeout time.Duration) *V1BasicOciRegistriesUIDSyncStatusParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 basic oci registries Uid sync status params +func (o *V1BasicOciRegistriesUIDSyncStatusParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 basic oci registries Uid sync status params +func (o *V1BasicOciRegistriesUIDSyncStatusParams) WithContext(ctx context.Context) *V1BasicOciRegistriesUIDSyncStatusParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 basic oci registries Uid sync status params +func (o *V1BasicOciRegistriesUIDSyncStatusParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 basic oci registries Uid sync status params +func (o *V1BasicOciRegistriesUIDSyncStatusParams) WithHTTPClient(client *http.Client) *V1BasicOciRegistriesUIDSyncStatusParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 basic oci registries Uid sync status params +func (o *V1BasicOciRegistriesUIDSyncStatusParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithUID adds the uid to the v1 basic oci registries Uid sync status params +func (o *V1BasicOciRegistriesUIDSyncStatusParams) WithUID(uid string) *V1BasicOciRegistriesUIDSyncStatusParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 basic oci registries Uid sync status params +func (o *V1BasicOciRegistriesUIDSyncStatusParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1BasicOciRegistriesUIDSyncStatusParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_basic_oci_registries_uid_sync_status_responses.go b/api/client/v1/v1_basic_oci_registries_uid_sync_status_responses.go new file mode 100644 index 00000000..1a781884 --- /dev/null +++ b/api/client/v1/v1_basic_oci_registries_uid_sync_status_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1BasicOciRegistriesUIDSyncStatusReader is a Reader for the V1BasicOciRegistriesUIDSyncStatus structure. +type V1BasicOciRegistriesUIDSyncStatusReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1BasicOciRegistriesUIDSyncStatusReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1BasicOciRegistriesUIDSyncStatusOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1BasicOciRegistriesUIDSyncStatusOK creates a V1BasicOciRegistriesUIDSyncStatusOK with default headers values +func NewV1BasicOciRegistriesUIDSyncStatusOK() *V1BasicOciRegistriesUIDSyncStatusOK { + return &V1BasicOciRegistriesUIDSyncStatusOK{} +} + +/* +V1BasicOciRegistriesUIDSyncStatusOK handles this case with default header values. + +Oci registry sync status +*/ +type V1BasicOciRegistriesUIDSyncStatusOK struct { + Payload *models.V1RegistrySyncStatus +} + +func (o *V1BasicOciRegistriesUIDSyncStatusOK) Error() string { + return fmt.Sprintf("[GET /v1/registries/oci/{uid}/basic/sync/status][%d] v1BasicOciRegistriesUidSyncStatusOK %+v", 200, o.Payload) +} + +func (o *V1BasicOciRegistriesUIDSyncStatusOK) GetPayload() *models.V1RegistrySyncStatus { + return o.Payload +} + +func (o *V1BasicOciRegistriesUIDSyncStatusOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1RegistrySyncStatus) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_basic_oci_registries_uid_update_parameters.go b/api/client/v1/v1_basic_oci_registries_uid_update_parameters.go new file mode 100644 index 00000000..ef8231d6 --- /dev/null +++ b/api/client/v1/v1_basic_oci_registries_uid_update_parameters.go @@ -0,0 +1,154 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1BasicOciRegistriesUIDUpdateParams creates a new V1BasicOciRegistriesUIDUpdateParams object +// with the default values initialized. +func NewV1BasicOciRegistriesUIDUpdateParams() *V1BasicOciRegistriesUIDUpdateParams { + var () + return &V1BasicOciRegistriesUIDUpdateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1BasicOciRegistriesUIDUpdateParamsWithTimeout creates a new V1BasicOciRegistriesUIDUpdateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1BasicOciRegistriesUIDUpdateParamsWithTimeout(timeout time.Duration) *V1BasicOciRegistriesUIDUpdateParams { + var () + return &V1BasicOciRegistriesUIDUpdateParams{ + + timeout: timeout, + } +} + +// NewV1BasicOciRegistriesUIDUpdateParamsWithContext creates a new V1BasicOciRegistriesUIDUpdateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1BasicOciRegistriesUIDUpdateParamsWithContext(ctx context.Context) *V1BasicOciRegistriesUIDUpdateParams { + var () + return &V1BasicOciRegistriesUIDUpdateParams{ + + Context: ctx, + } +} + +// NewV1BasicOciRegistriesUIDUpdateParamsWithHTTPClient creates a new V1BasicOciRegistriesUIDUpdateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1BasicOciRegistriesUIDUpdateParamsWithHTTPClient(client *http.Client) *V1BasicOciRegistriesUIDUpdateParams { + var () + return &V1BasicOciRegistriesUIDUpdateParams{ + HTTPClient: client, + } +} + +/* +V1BasicOciRegistriesUIDUpdateParams contains all the parameters to send to the API endpoint +for the v1 basic oci registries Uid update operation typically these are written to a http.Request +*/ +type V1BasicOciRegistriesUIDUpdateParams struct { + + /*Body*/ + Body *models.V1BasicOciRegistry + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 basic oci registries Uid update params +func (o *V1BasicOciRegistriesUIDUpdateParams) WithTimeout(timeout time.Duration) *V1BasicOciRegistriesUIDUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 basic oci registries Uid update params +func (o *V1BasicOciRegistriesUIDUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 basic oci registries Uid update params +func (o *V1BasicOciRegistriesUIDUpdateParams) WithContext(ctx context.Context) *V1BasicOciRegistriesUIDUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 basic oci registries Uid update params +func (o *V1BasicOciRegistriesUIDUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 basic oci registries Uid update params +func (o *V1BasicOciRegistriesUIDUpdateParams) WithHTTPClient(client *http.Client) *V1BasicOciRegistriesUIDUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 basic oci registries Uid update params +func (o *V1BasicOciRegistriesUIDUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 basic oci registries Uid update params +func (o *V1BasicOciRegistriesUIDUpdateParams) WithBody(body *models.V1BasicOciRegistry) *V1BasicOciRegistriesUIDUpdateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 basic oci registries Uid update params +func (o *V1BasicOciRegistriesUIDUpdateParams) SetBody(body *models.V1BasicOciRegistry) { + o.Body = body +} + +// WithUID adds the uid to the v1 basic oci registries Uid update params +func (o *V1BasicOciRegistriesUIDUpdateParams) WithUID(uid string) *V1BasicOciRegistriesUIDUpdateParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 basic oci registries Uid update params +func (o *V1BasicOciRegistriesUIDUpdateParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1BasicOciRegistriesUIDUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_basic_oci_registries_uid_update_responses.go b/api/client/v1/v1_basic_oci_registries_uid_update_responses.go new file mode 100644 index 00000000..d76af57e --- /dev/null +++ b/api/client/v1/v1_basic_oci_registries_uid_update_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1BasicOciRegistriesUIDUpdateReader is a Reader for the V1BasicOciRegistriesUIDUpdate structure. +type V1BasicOciRegistriesUIDUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1BasicOciRegistriesUIDUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1BasicOciRegistriesUIDUpdateNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1BasicOciRegistriesUIDUpdateNoContent creates a V1BasicOciRegistriesUIDUpdateNoContent with default headers values +func NewV1BasicOciRegistriesUIDUpdateNoContent() *V1BasicOciRegistriesUIDUpdateNoContent { + return &V1BasicOciRegistriesUIDUpdateNoContent{} +} + +/* +V1BasicOciRegistriesUIDUpdateNoContent handles this case with default header values. + +The resource was updated successfully +*/ +type V1BasicOciRegistriesUIDUpdateNoContent struct { +} + +func (o *V1BasicOciRegistriesUIDUpdateNoContent) Error() string { + return fmt.Sprintf("[PUT /v1/registries/oci/{uid}/basic][%d] v1BasicOciRegistriesUidUpdateNoContent ", 204) +} + +func (o *V1BasicOciRegistriesUIDUpdateNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_basic_oci_registries_validate_parameters.go b/api/client/v1/v1_basic_oci_registries_validate_parameters.go new file mode 100644 index 00000000..d4a7f312 --- /dev/null +++ b/api/client/v1/v1_basic_oci_registries_validate_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1BasicOciRegistriesValidateParams creates a new V1BasicOciRegistriesValidateParams object +// with the default values initialized. +func NewV1BasicOciRegistriesValidateParams() *V1BasicOciRegistriesValidateParams { + var () + return &V1BasicOciRegistriesValidateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1BasicOciRegistriesValidateParamsWithTimeout creates a new V1BasicOciRegistriesValidateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1BasicOciRegistriesValidateParamsWithTimeout(timeout time.Duration) *V1BasicOciRegistriesValidateParams { + var () + return &V1BasicOciRegistriesValidateParams{ + + timeout: timeout, + } +} + +// NewV1BasicOciRegistriesValidateParamsWithContext creates a new V1BasicOciRegistriesValidateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1BasicOciRegistriesValidateParamsWithContext(ctx context.Context) *V1BasicOciRegistriesValidateParams { + var () + return &V1BasicOciRegistriesValidateParams{ + + Context: ctx, + } +} + +// NewV1BasicOciRegistriesValidateParamsWithHTTPClient creates a new V1BasicOciRegistriesValidateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1BasicOciRegistriesValidateParamsWithHTTPClient(client *http.Client) *V1BasicOciRegistriesValidateParams { + var () + return &V1BasicOciRegistriesValidateParams{ + HTTPClient: client, + } +} + +/* +V1BasicOciRegistriesValidateParams contains all the parameters to send to the API endpoint +for the v1 basic oci registries validate operation typically these are written to a http.Request +*/ +type V1BasicOciRegistriesValidateParams struct { + + /*Body*/ + Body *models.V1BasicOciRegistrySpec + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 basic oci registries validate params +func (o *V1BasicOciRegistriesValidateParams) WithTimeout(timeout time.Duration) *V1BasicOciRegistriesValidateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 basic oci registries validate params +func (o *V1BasicOciRegistriesValidateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 basic oci registries validate params +func (o *V1BasicOciRegistriesValidateParams) WithContext(ctx context.Context) *V1BasicOciRegistriesValidateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 basic oci registries validate params +func (o *V1BasicOciRegistriesValidateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 basic oci registries validate params +func (o *V1BasicOciRegistriesValidateParams) WithHTTPClient(client *http.Client) *V1BasicOciRegistriesValidateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 basic oci registries validate params +func (o *V1BasicOciRegistriesValidateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 basic oci registries validate params +func (o *V1BasicOciRegistriesValidateParams) WithBody(body *models.V1BasicOciRegistrySpec) *V1BasicOciRegistriesValidateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 basic oci registries validate params +func (o *V1BasicOciRegistriesValidateParams) SetBody(body *models.V1BasicOciRegistrySpec) { + o.Body = body +} + +// WriteToRequest writes these params to a swagger request +func (o *V1BasicOciRegistriesValidateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_basic_oci_registries_validate_responses.go b/api/client/v1/v1_basic_oci_registries_validate_responses.go new file mode 100644 index 00000000..1dc59c41 --- /dev/null +++ b/api/client/v1/v1_basic_oci_registries_validate_responses.go @@ -0,0 +1,61 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1BasicOciRegistriesValidateReader is a Reader for the V1BasicOciRegistriesValidate structure. +type V1BasicOciRegistriesValidateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1BasicOciRegistriesValidateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1BasicOciRegistriesValidateNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1BasicOciRegistriesValidateNoContent creates a V1BasicOciRegistriesValidateNoContent with default headers values +func NewV1BasicOciRegistriesValidateNoContent() *V1BasicOciRegistriesValidateNoContent { + return &V1BasicOciRegistriesValidateNoContent{} +} + +/* +V1BasicOciRegistriesValidateNoContent handles this case with default header values. + +Ok response without content +*/ +type V1BasicOciRegistriesValidateNoContent struct { + /*Audit uid for the request + */ + AuditUID string +} + +func (o *V1BasicOciRegistriesValidateNoContent) Error() string { + return fmt.Sprintf("[POST /v1/registries/oci/basic/validate][%d] v1BasicOciRegistriesValidateNoContent ", 204) +} + +func (o *V1BasicOciRegistriesValidateNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header AuditUid + o.AuditUID = response.GetHeader("AuditUid") + + return nil +} diff --git a/api/client/v1/v1_client.go b/api/client/v1/v1_client.go new file mode 100644 index 00000000..1c20e683 --- /dev/null +++ b/api/client/v1/v1_client.go @@ -0,0 +1,34913 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// New creates a new v1 API client. +func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { + return &Client{transport: transport, formats: formats} +} + +/* +Client for v1 API +*/ +type Client struct { + transport runtime.ClientTransport + formats strfmt.Registry +} + +// ClientService is the interface for Client methods +type ClientService interface { + V1AuthOrgs(params *V1AuthOrgsParams) (*V1AuthOrgsOK, error) + + V1AuthSsoProviders(params *V1AuthSsoProvidersParams) (*V1AuthSsoProvidersOK, error) + + V1AuthUserOrgForgot(params *V1AuthUserOrgForgotParams) (*V1AuthUserOrgForgotNoContent, error) + + V1AwsAccountStsGet(params *V1AwsAccountStsGetParams) (*V1AwsAccountStsGetOK, error) + + V1AwsAccountValidate(params *V1AwsAccountValidateParams) (*V1AwsAccountValidateNoContent, error) + + V1AwsClusterNameValidate(params *V1AwsClusterNameValidateParams) (*V1AwsClusterNameValidateNoContent, error) + + V1AwsCopyImageFromDefaultRegion(params *V1AwsCopyImageFromDefaultRegionParams) (*V1AwsCopyImageFromDefaultRegionOK, error) + + V1AwsFindImage(params *V1AwsFindImageParams) (*V1AwsFindImageOK, error) + + V1AwsIamPolicies(params *V1AwsIamPoliciesParams) (*V1AwsIamPoliciesOK, error) + + V1AwsInstanceTypes(params *V1AwsInstanceTypesParams) (*V1AwsInstanceTypesOK, error) + + V1AwsKeyPairValidate(params *V1AwsKeyPairValidateParams) (*V1AwsKeyPairValidateNoContent, error) + + V1AwsKeyPairs(params *V1AwsKeyPairsParams) (*V1AwsKeyPairsOK, error) + + V1AwsKmsKeyGet(params *V1AwsKmsKeyGetParams) (*V1AwsKmsKeyGetOK, error) + + V1AwsKmsKeyValidate(params *V1AwsKmsKeyValidateParams) (*V1AwsKmsKeyValidateNoContent, error) + + V1AwsKmsKeys(params *V1AwsKmsKeysParams) (*V1AwsKmsKeysOK, error) + + V1AwsPolicyArnsValidate(params *V1AwsPolicyArnsValidateParams) (*V1AwsPolicyArnsValidateNoContent, error) + + V1AwsPropertiesValidate(params *V1AwsPropertiesValidateParams) (*V1AwsPropertiesValidateNoContent, error) + + V1AwsRegions(params *V1AwsRegionsParams) (*V1AwsRegionsOK, error) + + V1AwsS3Validate(params *V1AwsS3ValidateParams) (*V1AwsS3ValidateNoContent, error) + + V1AwsSecurityGroups(params *V1AwsSecurityGroupsParams) (*V1AwsSecurityGroupsOK, error) + + V1AwsStorageTypes(params *V1AwsStorageTypesParams) (*V1AwsStorageTypesOK, error) + + V1AwsVolumeSizeGet(params *V1AwsVolumeSizeGetParams) (*V1AwsVolumeSizeGetOK, error) + + V1AwsVolumeTypesGet(params *V1AwsVolumeTypesGetParams) (*V1AwsVolumeTypesGetOK, error) + + V1AwsVpcs(params *V1AwsVpcsParams) (*V1AwsVpcsOK, error) + + V1AwsZones(params *V1AwsZonesParams) (*V1AwsZonesOK, error) + + V1AzureAccountValidate(params *V1AzureAccountValidateParams) (*V1AzureAccountValidateNoContent, error) + + V1AzureClusterNameValidate(params *V1AzureClusterNameValidateParams) (*V1AzureClusterNameValidateNoContent, error) + + V1AzureGroups(params *V1AzureGroupsParams) (*V1AzureGroupsOK, error) + + V1AzureInstanceTypes(params *V1AzureInstanceTypesParams) (*V1AzureInstanceTypesOK, error) + + V1AzurePrivateDNSZones(params *V1AzurePrivateDNSZonesParams) (*V1AzurePrivateDNSZonesOK, error) + + V1AzureRegions(params *V1AzureRegionsParams) (*V1AzureRegionsOK, error) + + V1AzureResourceGroupList(params *V1AzureResourceGroupListParams) (*V1AzureResourceGroupListOK, error) + + V1AzureStorageAccountTypes(params *V1AzureStorageAccountTypesParams) (*V1AzureStorageAccountTypesOK, error) + + V1AzureStorageAccounts(params *V1AzureStorageAccountsParams) (*V1AzureStorageAccountsOK, error) + + V1AzureStorageContainers(params *V1AzureStorageContainersParams) (*V1AzureStorageContainersOK, error) + + V1AzureStorageTypes(params *V1AzureStorageTypesParams) (*V1AzureStorageTypesOK, error) + + V1AzureSubscriptionList(params *V1AzureSubscriptionListParams) (*V1AzureSubscriptionListOK, error) + + V1AzureVhdURL(params *V1AzureVhdURLParams) (*V1AzureVhdURLOK, error) + + V1AzureVirtualNetworkList(params *V1AzureVirtualNetworkListParams) (*V1AzureVirtualNetworkListOK, error) + + V1AzureZones(params *V1AzureZonesParams) (*V1AzureZonesOK, error) + + V1CloudComputeRate(params *V1CloudComputeRateParams) (*V1CloudComputeRateOK, error) + + V1CloudInstanceSpotPriceGet(params *V1CloudInstanceSpotPriceGetParams) (*V1CloudInstanceSpotPriceGetOK, error) + + V1CloudStorageRate(params *V1CloudStorageRateParams) (*V1CloudStorageRateOK, error) + + V1CloudsAwsCloudWatchValidate(params *V1CloudsAwsCloudWatchValidateParams) (*V1CloudsAwsCloudWatchValidateNoContent, error) + + V1ClusterFeatureBackupLocationUIDChange(params *V1ClusterFeatureBackupLocationUIDChangeParams) (*V1ClusterFeatureBackupLocationUIDChangeNoContent, error) + + V1ClusterFeatureBackupLocationUIDGet(params *V1ClusterFeatureBackupLocationUIDGetParams) (*V1ClusterFeatureBackupLocationUIDGetOK, error) + + V1ClusterProfilesUIDExport(params *V1ClusterProfilesUIDExportParams, writer io.Writer) (*V1ClusterProfilesUIDExportOK, error) + + V1ClusterProfilesUIDExportTerraform(params *V1ClusterProfilesUIDExportTerraformParams, writer io.Writer) (*V1ClusterProfilesUIDExportTerraformOK, error) + + V1ClusterProfilesUIDPacksNameGet(params *V1ClusterProfilesUIDPacksNameGetParams) (*V1ClusterProfilesUIDPacksNameGetOK, error) + + V1ClusterProfilesUIDVariablesDelete(params *V1ClusterProfilesUIDVariablesDeleteParams) (*V1ClusterProfilesUIDVariablesDeleteNoContent, error) + + V1ClusterProfilesUIDVariablesGet(params *V1ClusterProfilesUIDVariablesGetParams) (*V1ClusterProfilesUIDVariablesGetOK, error) + + V1ClusterProfilesUIDVariablesPatch(params *V1ClusterProfilesUIDVariablesPatchParams) (*V1ClusterProfilesUIDVariablesPatchNoContent, error) + + V1ClusterProfilesUIDVariablesPut(params *V1ClusterProfilesUIDVariablesPutParams) (*V1ClusterProfilesUIDVariablesPutNoContent, error) + + V1ControlPlaneHealthCheckTimeoutUpdate(params *V1ControlPlaneHealthCheckTimeoutUpdateParams) (*V1ControlPlaneHealthCheckTimeoutUpdateNoContent, error) + + V1CustomCloudTypeBootstrapDelete(params *V1CustomCloudTypeBootstrapDeleteParams) (*V1CustomCloudTypeBootstrapDeleteNoContent, error) + + V1CustomCloudTypeBootstrapGet(params *V1CustomCloudTypeBootstrapGetParams) (*V1CustomCloudTypeBootstrapGetOK, error) + + V1CustomCloudTypeBootstrapUpdate(params *V1CustomCloudTypeBootstrapUpdateParams) (*V1CustomCloudTypeBootstrapUpdateNoContent, error) + + V1CustomCloudTypeCloudAccountKeysGet(params *V1CustomCloudTypeCloudAccountKeysGetParams) (*V1CustomCloudTypeCloudAccountKeysGetOK, error) + + V1CustomCloudTypeCloudAccountKeysUpdate(params *V1CustomCloudTypeCloudAccountKeysUpdateParams) (*V1CustomCloudTypeCloudAccountKeysUpdateNoContent, error) + + V1CustomCloudTypeCloudProviderDelete(params *V1CustomCloudTypeCloudProviderDeleteParams) (*V1CustomCloudTypeCloudProviderDeleteNoContent, error) + + V1CustomCloudTypeCloudProviderGet(params *V1CustomCloudTypeCloudProviderGetParams) (*V1CustomCloudTypeCloudProviderGetOK, error) + + V1CustomCloudTypeCloudProviderUpdate(params *V1CustomCloudTypeCloudProviderUpdateParams) (*V1CustomCloudTypeCloudProviderUpdateNoContent, error) + + V1CustomCloudTypeClusterTemplateDelete(params *V1CustomCloudTypeClusterTemplateDeleteParams) (*V1CustomCloudTypeClusterTemplateDeleteNoContent, error) + + V1CustomCloudTypeClusterTemplateGet(params *V1CustomCloudTypeClusterTemplateGetParams) (*V1CustomCloudTypeClusterTemplateGetOK, error) + + V1CustomCloudTypeClusterTemplateUpdate(params *V1CustomCloudTypeClusterTemplateUpdateParams) (*V1CustomCloudTypeClusterTemplateUpdateNoContent, error) + + V1CustomCloudTypeControlPlaneDelete(params *V1CustomCloudTypeControlPlaneDeleteParams) (*V1CustomCloudTypeControlPlaneDeleteNoContent, error) + + V1CustomCloudTypeControlPlaneGet(params *V1CustomCloudTypeControlPlaneGetParams) (*V1CustomCloudTypeControlPlaneGetOK, error) + + V1CustomCloudTypeControlPlanePoolTemplateDelete(params *V1CustomCloudTypeControlPlanePoolTemplateDeleteParams) (*V1CustomCloudTypeControlPlanePoolTemplateDeleteNoContent, error) + + V1CustomCloudTypeControlPlanePoolTemplateGet(params *V1CustomCloudTypeControlPlanePoolTemplateGetParams) (*V1CustomCloudTypeControlPlanePoolTemplateGetOK, error) + + V1CustomCloudTypeControlPlanePoolTemplateUpdate(params *V1CustomCloudTypeControlPlanePoolTemplateUpdateParams) (*V1CustomCloudTypeControlPlanePoolTemplateUpdateNoContent, error) + + V1CustomCloudTypeControlPlaneUpdate(params *V1CustomCloudTypeControlPlaneUpdateParams) (*V1CustomCloudTypeControlPlaneUpdateNoContent, error) + + V1CustomCloudTypeLogoGet(params *V1CustomCloudTypeLogoGetParams, writer io.Writer) (*V1CustomCloudTypeLogoGetOK, error) + + V1CustomCloudTypeLogoUpdate(params *V1CustomCloudTypeLogoUpdateParams) (*V1CustomCloudTypeLogoUpdateNoContent, error) + + V1CustomCloudTypeMetaGet(params *V1CustomCloudTypeMetaGetParams) (*V1CustomCloudTypeMetaGetOK, error) + + V1CustomCloudTypeMetaUpdate(params *V1CustomCloudTypeMetaUpdateParams) (*V1CustomCloudTypeMetaUpdateNoContent, error) + + V1CustomCloudTypeRegister(params *V1CustomCloudTypeRegisterParams) (*V1CustomCloudTypeRegisterCreated, error) + + V1CustomCloudTypeWorkerPoolTemplateDelete(params *V1CustomCloudTypeWorkerPoolTemplateDeleteParams) (*V1CustomCloudTypeWorkerPoolTemplateDeleteNoContent, error) + + V1CustomCloudTypeWorkerPoolTemplateGet(params *V1CustomCloudTypeWorkerPoolTemplateGetParams) (*V1CustomCloudTypeWorkerPoolTemplateGetOK, error) + + V1CustomCloudTypeWorkerPoolTemplateUpdate(params *V1CustomCloudTypeWorkerPoolTemplateUpdateParams) (*V1CustomCloudTypeWorkerPoolTemplateUpdateNoContent, error) + + V1CustomCloudTypesDelete(params *V1CustomCloudTypesDeleteParams) (*V1CustomCloudTypesDeleteNoContent, error) + + V1CustomCloudTypesGet(params *V1CustomCloudTypesGetParams) (*V1CustomCloudTypesGetOK, error) + + V1DashboardVMEnabledClustersList(params *V1DashboardVMEnabledClustersListParams) (*V1DashboardVMEnabledClustersListOK, error) + + V1DataSinksCloudWatchSink(params *V1DataSinksCloudWatchSinkParams) (*V1DataSinksCloudWatchSinkNoContent, error) + + V1EdgeHostsUIDReset(params *V1EdgeHostsUIDResetParams) (*V1EdgeHostsUIDResetNoContent, error) + + V1EksPropertiesValidate(params *V1EksPropertiesValidateParams) (*V1EksPropertiesValidateNoContent, error) + + V1GcpAccountValidate(params *V1GcpAccountValidateParams) (*V1GcpAccountValidateNoContent, error) + + V1GcpAvailabilityZones(params *V1GcpAvailabilityZonesParams) (*V1GcpAvailabilityZonesOK, error) + + V1GcpAzValidate(params *V1GcpAzValidateParams) (*V1GcpAzValidateNoContent, error) + + V1GcpBucketNameValidate(params *V1GcpBucketNameValidateParams) (*V1GcpBucketNameValidateNoContent, error) + + V1GcpContainerImageValidate(params *V1GcpContainerImageValidateParams) (*V1GcpContainerImageValidateNoContent, error) + + V1GcpImageURL(params *V1GcpImageURLParams) (*V1GcpImageURLOK, error) + + V1GcpInstanceTypes(params *V1GcpInstanceTypesParams) (*V1GcpInstanceTypesOK, error) + + V1GcpNetworks(params *V1GcpNetworksParams) (*V1GcpNetworksOK, error) + + V1GcpProjectValidate(params *V1GcpProjectValidateParams) (*V1GcpProjectValidateNoContent, error) + + V1GcpProjects(params *V1GcpProjectsParams) (*V1GcpProjectsOK, error) + + V1GcpPropertiesValidate(params *V1GcpPropertiesValidateParams) (*V1GcpPropertiesValidateNoContent, error) + + V1GcpRegions(params *V1GcpRegionsParams) (*V1GcpRegionsOK, error) + + V1GcpStorageTypes(params *V1GcpStorageTypesParams) (*V1GcpStorageTypesOK, error) + + V1GcpZones(params *V1GcpZonesParams) (*V1GcpZonesOK, error) + + V1HostClusterConfigUpdate(params *V1HostClusterConfigUpdateParams) (*V1HostClusterConfigUpdateNoContent, error) + + V1InvoiceUIDReportInvoicePdf(params *V1InvoiceUIDReportInvoicePdfParams, writer io.Writer) (*V1InvoiceUIDReportInvoicePdfOK, error) + + V1InvoiceUIDReportPdf(params *V1InvoiceUIDReportPdfParams, writer io.Writer) (*V1InvoiceUIDReportPdfOK, error) + + V1InvoiceUIDReportUsagePdf(params *V1InvoiceUIDReportUsagePdfParams, writer io.Writer) (*V1InvoiceUIDReportUsagePdfOK, error) + + V1MaasAccountValidate(params *V1MaasAccountValidateParams) (*V1MaasAccountValidateNoContent, error) + + V1MaasDomainsGet(params *V1MaasDomainsGetParams) (*V1MaasDomainsGetOK, error) + + V1MaasPoolsGet(params *V1MaasPoolsGetParams) (*V1MaasPoolsGetOK, error) + + V1MaasSubnetsGet(params *V1MaasSubnetsGetParams) (*V1MaasSubnetsGetOK, error) + + V1MaasTagsGet(params *V1MaasTagsGetParams) (*V1MaasTagsGetOK, error) + + V1MaasZonesGet(params *V1MaasZonesGetParams) (*V1MaasZonesGetOK, error) + + V1OidcCallback(params *V1OidcCallbackParams) (*V1OidcCallbackOK, error) + + V1OidcLogout(params *V1OidcLogoutParams) (*V1OidcLogoutNoContent, error) + + V1OpenStackAccountValidate(params *V1OpenStackAccountValidateParams) (*V1OpenStackAccountValidateNoContent, error) + + V1OpenStackAzsGet(params *V1OpenStackAzsGetParams) (*V1OpenStackAzsGetOK, error) + + V1OpenStackFlavorsGet(params *V1OpenStackFlavorsGetParams) (*V1OpenStackFlavorsGetOK, error) + + V1OpenStackKeypairsGet(params *V1OpenStackKeypairsGetParams) (*V1OpenStackKeypairsGetOK, error) + + V1OpenStackNetworksGet(params *V1OpenStackNetworksGetParams) (*V1OpenStackNetworksGetOK, error) + + V1OpenStackProjectsGet(params *V1OpenStackProjectsGetParams) (*V1OpenStackProjectsGetOK, error) + + V1OpenStackRegionsGet(params *V1OpenStackRegionsGetParams) (*V1OpenStackRegionsGetOK, error) + + V1OverlordsMaasManifest(params *V1OverlordsMaasManifestParams) (*V1OverlordsMaasManifestOK, error) + + V1OverlordsMigrate(params *V1OverlordsMigrateParams) (*V1OverlordsMigrateNoContent, error) + + V1OverlordsUIDMaasCloudConfigCreate(params *V1OverlordsUIDMaasCloudConfigCreateParams) (*V1OverlordsUIDMaasCloudConfigCreateCreated, error) + + V1OverlordsUIDMaasCloudConfigUpdate(params *V1OverlordsUIDMaasCloudConfigUpdateParams) (*V1OverlordsUIDMaasCloudConfigUpdateNoContent, error) + + V1PasswordsBlockListDelete(params *V1PasswordsBlockListDeleteParams) (*V1PasswordsBlockListDeleteNoContent, error) + + V1PasswordsBlockListUpdate(params *V1PasswordsBlockListUpdateParams) (*V1PasswordsBlockListUpdateNoContent, error) + + V1RegistriesHelmValidate(params *V1RegistriesHelmValidateParams) (*V1RegistriesHelmValidateNoContent, error) + + V1RegistriesPackValidate(params *V1RegistriesPackValidateParams) (*V1RegistriesPackValidateNoContent, error) + + V1SamlCallback(params *V1SamlCallbackParams) (*V1SamlCallbackOK, error) + + V1SamlLogout(params *V1SamlLogoutParams) (*V1SamlLogoutNoContent, error) + + V1SpectroClustersUIDKubeCtlRedirect(params *V1SpectroClustersUIDKubeCtlRedirectParams) (*V1SpectroClustersUIDKubeCtlRedirectOK, error) + + V1SpectroClustersUIDOIDC(params *V1SpectroClustersUIDOIDCParams) (*V1SpectroClustersUIDOIDCOK, error) + + V1SpectroClustersUIDOIDCDashboardURL(params *V1SpectroClustersUIDOIDCDashboardURLParams) (*V1SpectroClustersUIDOIDCDashboardURLOK, error) + + V1SpectroClustersUIDReset(params *V1SpectroClustersUIDResetParams) (*V1SpectroClustersUIDResetNoContent, error) + + V1SsoCallback(params *V1SsoCallbackParams) (*V1SsoCallbackOK, error) + + V1SsoIdps(params *V1SsoIdpsParams) (*V1SsoIdpsOK, error) + + V1SsoLogins(params *V1SsoLoginsParams) (*V1SsoLoginsOK, error) + + V1SystemConfigReverseProxyGet(params *V1SystemConfigReverseProxyGetParams) (*V1SystemConfigReverseProxyGetOK, error) + + V1SystemConfigReverseProxyUpdate(params *V1SystemConfigReverseProxyUpdateParams) (*V1SystemConfigReverseProxyUpdateNoContent, error) + + V1TeamsUIDTenantRolesGet(params *V1TeamsUIDTenantRolesGetParams) (*V1TeamsUIDTenantRolesGetOK, error) + + V1TeamsUIDTenantRolesUpdate(params *V1TeamsUIDTenantRolesUpdateParams) (*V1TeamsUIDTenantRolesUpdateNoContent, error) + + V1TenantDeveloperCreditGet(params *V1TenantDeveloperCreditGetParams) (*V1TenantDeveloperCreditGetOK, error) + + V1TenantDeveloperCreditUpdate(params *V1TenantDeveloperCreditUpdateParams) (*V1TenantDeveloperCreditUpdateNoContent, error) + + V1TenantPrefClusterGroupGet(params *V1TenantPrefClusterGroupGetParams) (*V1TenantPrefClusterGroupGetOK, error) + + V1TenantPrefClusterGroupUpdate(params *V1TenantPrefClusterGroupUpdateParams) (*V1TenantPrefClusterGroupUpdateNoContent, error) + + V1TenantUIDAssetsCertsList(params *V1TenantUIDAssetsCertsListParams) (*V1TenantUIDAssetsCertsListOK, error) + + V1TenantUIDAssetsCertsCreate(params *V1TenantUIDAssetsCertsCreateParams) (*V1TenantUIDAssetsCertsCreateCreated, error) + + V1TenantUIDAssetsCertsUIDDelete(params *V1TenantUIDAssetsCertsUIDDeleteParams) (*V1TenantUIDAssetsCertsUIDDeleteNoContent, error) + + V1TenantUIDAssetsCertsUIDGet(params *V1TenantUIDAssetsCertsUIDGetParams) (*V1TenantUIDAssetsCertsUIDGetOK, error) + + V1TenantUIDAssetsCertsUIDUpdate(params *V1TenantUIDAssetsCertsUIDUpdateParams) (*V1TenantUIDAssetsCertsUIDUpdateNoContent, error) + + V1TenantUIDAssetsDataSinksCreate(params *V1TenantUIDAssetsDataSinksCreateParams) (*V1TenantUIDAssetsDataSinksCreateCreated, error) + + V1TenantUIDAssetsDataSinksDelete(params *V1TenantUIDAssetsDataSinksDeleteParams) (*V1TenantUIDAssetsDataSinksDeleteNoContent, error) + + V1TenantUIDAssetsDataSinksGet(params *V1TenantUIDAssetsDataSinksGetParams) (*V1TenantUIDAssetsDataSinksGetOK, error) + + V1TenantUIDAssetsDataSinksUpdate(params *V1TenantUIDAssetsDataSinksUpdateParams) (*V1TenantUIDAssetsDataSinksUpdateNoContent, error) + + V1TenantUIDDomainsGet(params *V1TenantUIDDomainsGetParams) (*V1TenantUIDDomainsGetOK, error) + + V1TenantUIDDomainsUpdate(params *V1TenantUIDDomainsUpdateParams) (*V1TenantUIDDomainsUpdateNoContent, error) + + V1TenantUIDOidcConfigGet(params *V1TenantUIDOidcConfigGetParams) (*V1TenantUIDOidcConfigGetOK, error) + + V1TenantUIDOidcConfigUpdate(params *V1TenantUIDOidcConfigUpdateParams) (*V1TenantUIDOidcConfigUpdateNoContent, error) + + V1TenantUIDPasswordPolicyUpdate(params *V1TenantUIDPasswordPolicyUpdateParams) (*V1TenantUIDPasswordPolicyUpdateNoContent, error) + + V1TenantUIDSamlConfigSpecGet(params *V1TenantUIDSamlConfigSpecGetParams) (*V1TenantUIDSamlConfigSpecGetOK, error) + + V1TenantUIDSamlConfigUpdate(params *V1TenantUIDSamlConfigUpdateParams) (*V1TenantUIDSamlConfigUpdateNoContent, error) + + V1TenantUIDSsoAuthProvidersGet(params *V1TenantUIDSsoAuthProvidersGetParams) (*V1TenantUIDSsoAuthProvidersGetOK, error) + + V1TenantUIDSsoAuthProvidersUpdate(params *V1TenantUIDSsoAuthProvidersUpdateParams) (*V1TenantUIDSsoAuthProvidersUpdateNoContent, error) + + V1TencentAccountValidate(params *V1TencentAccountValidateParams) (*V1TencentAccountValidateNoContent, error) + + V1TencentInstanceTypes(params *V1TencentInstanceTypesParams) (*V1TencentInstanceTypesOK, error) + + V1TencentKeypairs(params *V1TencentKeypairsParams) (*V1TencentKeypairsOK, error) + + V1TencentRegions(params *V1TencentRegionsParams) (*V1TencentRegionsOK, error) + + V1TencentSecurityGroups(params *V1TencentSecurityGroupsParams) (*V1TencentSecurityGroupsOK, error) + + V1TencentStorageTypes(params *V1TencentStorageTypesParams) (*V1TencentStorageTypesOK, error) + + V1TencentVpcs(params *V1TencentVpcsParams) (*V1TencentVpcsOK, error) + + V1TencentZones(params *V1TencentZonesParams) (*V1TencentZonesOK, error) + + V1UsersConfigScarGet(params *V1UsersConfigScarGetParams) (*V1UsersConfigScarGetOK, error) + + V1UsersKubectlSessionUID(params *V1UsersKubectlSessionUIDParams) (*V1UsersKubectlSessionUIDOK, error) + + V1UsersPasswordChange(params *V1UsersPasswordChangeParams) (*V1UsersPasswordChangeNoContent, error) + + V1VsphereAccountValidate(params *V1VsphereAccountValidateParams) (*V1VsphereAccountValidateNoContent, error) + + V1VsphereComputeClusterResources(params *V1VsphereComputeClusterResourcesParams) (*V1VsphereComputeClusterResourcesOK, error) + + V1VsphereDatacenters(params *V1VsphereDatacentersParams) (*V1VsphereDatacentersOK, error) + + V1VsphereEnv(params *V1VsphereEnvParams) (*V1VsphereEnvOK, error) + + V1AccountsGeolocationPatch(params *V1AccountsGeolocationPatchParams) (*V1AccountsGeolocationPatchNoContent, error) + + V1APIKeysCreate(params *V1APIKeysCreateParams) (*V1APIKeysCreateCreated, error) + + V1APIKeysList(params *V1APIKeysListParams) (*V1APIKeysListOK, error) + + V1APIKeysUIDActiveState(params *V1APIKeysUIDActiveStateParams) (*V1APIKeysUIDActiveStateNoContent, error) + + V1APIKeysUIDDelete(params *V1APIKeysUIDDeleteParams) (*V1APIKeysUIDDeleteNoContent, error) + + V1APIKeysUIDGet(params *V1APIKeysUIDGetParams) (*V1APIKeysUIDGetOK, error) + + V1APIKeysUIDState(params *V1APIKeysUIDStateParams) (*V1APIKeysUIDStateNoContent, error) + + V1APIKeysUIDUpdate(params *V1APIKeysUIDUpdateParams) (*V1APIKeysUIDUpdateNoContent, error) + + V1AppDeploymentsClusterGroupCreate(params *V1AppDeploymentsClusterGroupCreateParams) (*V1AppDeploymentsClusterGroupCreateCreated, error) + + V1AppDeploymentsProfileTiersManifestsUIDGet(params *V1AppDeploymentsProfileTiersManifestsUIDGetParams) (*V1AppDeploymentsProfileTiersManifestsUIDGetOK, error) + + V1AppDeploymentsProfileTiersManifestsUIDUpdate(params *V1AppDeploymentsProfileTiersManifestsUIDUpdateParams) (*V1AppDeploymentsProfileTiersManifestsUIDUpdateNoContent, error) + + V1AppDeploymentsProfileTiersUIDGet(params *V1AppDeploymentsProfileTiersUIDGetParams) (*V1AppDeploymentsProfileTiersUIDGetOK, error) + + V1AppDeploymentsProfileTiersUIDManifestsGet(params *V1AppDeploymentsProfileTiersUIDManifestsGetParams) (*V1AppDeploymentsProfileTiersUIDManifestsGetOK, error) + + V1AppDeploymentsProfileTiersUIDUpdate(params *V1AppDeploymentsProfileTiersUIDUpdateParams) (*V1AppDeploymentsProfileTiersUIDUpdateNoContent, error) + + V1AppDeploymentsUIDDelete(params *V1AppDeploymentsUIDDeleteParams) (*V1AppDeploymentsUIDDeleteNoContent, error) + + V1AppDeploymentsUIDGet(params *V1AppDeploymentsUIDGetParams) (*V1AppDeploymentsUIDGetOK, error) + + V1AppDeploymentsUIDProfileApply(params *V1AppDeploymentsUIDProfileApplyParams) (*V1AppDeploymentsUIDProfileApplyNoContent, error) + + V1AppDeploymentsUIDProfileGet(params *V1AppDeploymentsUIDProfileGetParams) (*V1AppDeploymentsUIDProfileGetOK, error) + + V1AppDeploymentsUIDProfileUpdate(params *V1AppDeploymentsUIDProfileUpdateParams) (*V1AppDeploymentsUIDProfileUpdateNoContent, error) + + V1AppDeploymentsUIDProfileVersionsGet(params *V1AppDeploymentsUIDProfileVersionsGetParams) (*V1AppDeploymentsUIDProfileVersionsGetOK, error) + + V1AppDeploymentsVirtualClusterCreate(params *V1AppDeploymentsVirtualClusterCreateParams) (*V1AppDeploymentsVirtualClusterCreateCreated, error) + + V1AppProfilesCreate(params *V1AppProfilesCreateParams) (*V1AppProfilesCreateCreated, error) + + V1AppProfilesMacrosList(params *V1AppProfilesMacrosListParams) (*V1AppProfilesMacrosListOK, error) + + V1AppProfilesUIDClone(params *V1AppProfilesUIDCloneParams) (*V1AppProfilesUIDCloneCreated, error) + + V1AppProfilesUIDCloneValidate(params *V1AppProfilesUIDCloneValidateParams) (*V1AppProfilesUIDCloneValidateNoContent, error) + + V1AppProfilesUIDDelete(params *V1AppProfilesUIDDeleteParams) (*V1AppProfilesUIDDeleteNoContent, error) + + V1AppProfilesUIDGet(params *V1AppProfilesUIDGetParams) (*V1AppProfilesUIDGetOK, error) + + V1AppProfilesUIDMetadataUpdate(params *V1AppProfilesUIDMetadataUpdateParams) (*V1AppProfilesUIDMetadataUpdateNoContent, error) + + V1AppProfilesUIDTiersCreate(params *V1AppProfilesUIDTiersCreateParams) (*V1AppProfilesUIDTiersCreateCreated, error) + + V1AppProfilesUIDTiersGet(params *V1AppProfilesUIDTiersGetParams) (*V1AppProfilesUIDTiersGetOK, error) + + V1AppProfilesUIDTiersPatch(params *V1AppProfilesUIDTiersPatchParams) (*V1AppProfilesUIDTiersPatchCreated, error) + + V1AppProfilesUIDTiersUIDDelete(params *V1AppProfilesUIDTiersUIDDeleteParams) (*V1AppProfilesUIDTiersUIDDeleteNoContent, error) + + V1AppProfilesUIDTiersUIDGet(params *V1AppProfilesUIDTiersUIDGetParams) (*V1AppProfilesUIDTiersUIDGetOK, error) + + V1AppProfilesUIDTiersUIDManifestsCreate(params *V1AppProfilesUIDTiersUIDManifestsCreateParams) (*V1AppProfilesUIDTiersUIDManifestsCreateCreated, error) + + V1AppProfilesUIDTiersUIDManifestsGet(params *V1AppProfilesUIDTiersUIDManifestsGetParams) (*V1AppProfilesUIDTiersUIDManifestsGetOK, error) + + V1AppProfilesUIDTiersUIDManifestsUIDDelete(params *V1AppProfilesUIDTiersUIDManifestsUIDDeleteParams) (*V1AppProfilesUIDTiersUIDManifestsUIDDeleteNoContent, error) + + V1AppProfilesUIDTiersUIDManifestsUIDGet(params *V1AppProfilesUIDTiersUIDManifestsUIDGetParams) (*V1AppProfilesUIDTiersUIDManifestsUIDGetOK, error) + + V1AppProfilesUIDTiersUIDManifestsUIDUpdate(params *V1AppProfilesUIDTiersUIDManifestsUIDUpdateParams) (*V1AppProfilesUIDTiersUIDManifestsUIDUpdateNoContent, error) + + V1AppProfilesUIDTiersUIDResolvedValuesGet(params *V1AppProfilesUIDTiersUIDResolvedValuesGetParams) (*V1AppProfilesUIDTiersUIDResolvedValuesGetOK, error) + + V1AppProfilesUIDTiersUIDUpdate(params *V1AppProfilesUIDTiersUIDUpdateParams) (*V1AppProfilesUIDTiersUIDUpdateNoContent, error) + + V1AppProfilesUIDUpdate(params *V1AppProfilesUIDUpdateParams) (*V1AppProfilesUIDUpdateNoContent, error) + + V1AuditsList(params *V1AuditsListParams) (*V1AuditsListOK, error) + + V1AuditsUIDGet(params *V1AuditsUIDGetParams) (*V1AuditsUIDGetOK, error) + + V1AuditsUIDGetSysMsg(params *V1AuditsUIDGetSysMsgParams) (*V1AuditsUIDGetSysMsgOK, error) + + V1AuditsUIDMsgUpdate(params *V1AuditsUIDMsgUpdateParams) (*V1AuditsUIDMsgUpdateNoContent, error) + + V1AuthOrg(params *V1AuthOrgParams) (*V1AuthOrgOK, error) + + V1AuthRefresh(params *V1AuthRefreshParams) (*V1AuthRefreshOK, error) + + V1Authenticate(params *V1AuthenticateParams) (*V1AuthenticateOK, error) + + V1AwsCloudCost(params *V1AwsCloudCostParams) (*V1AwsCloudCostOK, error) + + V1BasicOciRegistriesCreate(params *V1BasicOciRegistriesCreateParams) (*V1BasicOciRegistriesCreateCreated, error) + + V1BasicOciRegistriesUIDDelete(params *V1BasicOciRegistriesUIDDeleteParams) (*V1BasicOciRegistriesUIDDeleteNoContent, error) + + V1BasicOciRegistriesUIDGet(params *V1BasicOciRegistriesUIDGetParams) (*V1BasicOciRegistriesUIDGetOK, error) + + V1BasicOciRegistriesUIDSync(params *V1BasicOciRegistriesUIDSyncParams) (*V1BasicOciRegistriesUIDSyncAccepted, error) + + V1BasicOciRegistriesUIDSyncStatus(params *V1BasicOciRegistriesUIDSyncStatusParams) (*V1BasicOciRegistriesUIDSyncStatusOK, error) + + V1BasicOciRegistriesUIDUpdate(params *V1BasicOciRegistriesUIDUpdateParams) (*V1BasicOciRegistriesUIDUpdateNoContent, error) + + V1BasicOciRegistriesValidate(params *V1BasicOciRegistriesValidateParams) (*V1BasicOciRegistriesValidateNoContent, error) + + V1CloudAccountsAwsCreate(params *V1CloudAccountsAwsCreateParams) (*V1CloudAccountsAwsCreateCreated, error) + + V1CloudAccountsAwsDelete(params *V1CloudAccountsAwsDeleteParams) (*V1CloudAccountsAwsDeleteNoContent, error) + + V1CloudAccountsAwsGet(params *V1CloudAccountsAwsGetParams) (*V1CloudAccountsAwsGetOK, error) + + V1CloudAccountsAwsList(params *V1CloudAccountsAwsListParams) (*V1CloudAccountsAwsListOK, error) + + V1CloudAccountsAwsUpdate(params *V1CloudAccountsAwsUpdateParams) (*V1CloudAccountsAwsUpdateNoContent, error) + + V1CloudAccountsAzureCreate(params *V1CloudAccountsAzureCreateParams) (*V1CloudAccountsAzureCreateCreated, error) + + V1CloudAccountsAzureDelete(params *V1CloudAccountsAzureDeleteParams) (*V1CloudAccountsAzureDeleteNoContent, error) + + V1CloudAccountsAzureGet(params *V1CloudAccountsAzureGetParams) (*V1CloudAccountsAzureGetOK, error) + + V1CloudAccountsAzureList(params *V1CloudAccountsAzureListParams) (*V1CloudAccountsAzureListOK, error) + + V1CloudAccountsAzureUpdate(params *V1CloudAccountsAzureUpdateParams) (*V1CloudAccountsAzureUpdateNoContent, error) + + V1CloudAccountsCustomCreate(params *V1CloudAccountsCustomCreateParams) (*V1CloudAccountsCustomCreateCreated, error) + + V1CloudAccountsCustomDelete(params *V1CloudAccountsCustomDeleteParams) (*V1CloudAccountsCustomDeleteNoContent, error) + + V1CloudAccountsCustomGet(params *V1CloudAccountsCustomGetParams) (*V1CloudAccountsCustomGetOK, error) + + V1CloudAccountsCustomList(params *V1CloudAccountsCustomListParams) (*V1CloudAccountsCustomListOK, error) + + V1CloudAccountsCustomUpdate(params *V1CloudAccountsCustomUpdateParams) (*V1CloudAccountsCustomUpdateNoContent, error) + + V1CloudAccountsGcpCreate(params *V1CloudAccountsGcpCreateParams) (*V1CloudAccountsGcpCreateCreated, error) + + V1CloudAccountsGcpDelete(params *V1CloudAccountsGcpDeleteParams) (*V1CloudAccountsGcpDeleteNoContent, error) + + V1CloudAccountsGcpGet(params *V1CloudAccountsGcpGetParams) (*V1CloudAccountsGcpGetOK, error) + + V1CloudAccountsGcpList(params *V1CloudAccountsGcpListParams) (*V1CloudAccountsGcpListOK, error) + + V1CloudAccountsGcpUpdate(params *V1CloudAccountsGcpUpdateParams) (*V1CloudAccountsGcpUpdateNoContent, error) + + V1CloudAccountsListSummary(params *V1CloudAccountsListSummaryParams) (*V1CloudAccountsListSummaryOK, error) + + V1CloudAccountsMaasCreate(params *V1CloudAccountsMaasCreateParams) (*V1CloudAccountsMaasCreateCreated, error) + + V1CloudAccountsMaasDelete(params *V1CloudAccountsMaasDeleteParams) (*V1CloudAccountsMaasDeleteNoContent, error) + + V1CloudAccountsMaasGet(params *V1CloudAccountsMaasGetParams) (*V1CloudAccountsMaasGetOK, error) + + V1CloudAccountsMaasList(params *V1CloudAccountsMaasListParams) (*V1CloudAccountsMaasListOK, error) + + V1CloudAccountsMaasPatch(params *V1CloudAccountsMaasPatchParams) (*V1CloudAccountsMaasPatchNoContent, error) + + V1CloudAccountsMaasUpdate(params *V1CloudAccountsMaasUpdateParams) (*V1CloudAccountsMaasUpdateNoContent, error) + + V1CloudAccountsOpenStackCreate(params *V1CloudAccountsOpenStackCreateParams) (*V1CloudAccountsOpenStackCreateCreated, error) + + V1CloudAccountsOpenStackDelete(params *V1CloudAccountsOpenStackDeleteParams) (*V1CloudAccountsOpenStackDeleteNoContent, error) + + V1CloudAccountsOpenStackGet(params *V1CloudAccountsOpenStackGetParams) (*V1CloudAccountsOpenStackGetOK, error) + + V1CloudAccountsOpenStackList(params *V1CloudAccountsOpenStackListParams) (*V1CloudAccountsOpenStackListOK, error) + + V1CloudAccountsOpenStackUpdate(params *V1CloudAccountsOpenStackUpdateParams) (*V1CloudAccountsOpenStackUpdateNoContent, error) + + V1CloudAccountsTencentCreate(params *V1CloudAccountsTencentCreateParams) (*V1CloudAccountsTencentCreateCreated, error) + + V1CloudAccountsTencentDelete(params *V1CloudAccountsTencentDeleteParams) (*V1CloudAccountsTencentDeleteNoContent, error) + + V1CloudAccountsTencentGet(params *V1CloudAccountsTencentGetParams) (*V1CloudAccountsTencentGetOK, error) + + V1CloudAccountsTencentList(params *V1CloudAccountsTencentListParams) (*V1CloudAccountsTencentListOK, error) + + V1CloudAccountsTencentUpdate(params *V1CloudAccountsTencentUpdateParams) (*V1CloudAccountsTencentUpdateNoContent, error) + + V1CloudAccountsVsphereCreate(params *V1CloudAccountsVsphereCreateParams) (*V1CloudAccountsVsphereCreateCreated, error) + + V1CloudAccountsVsphereDelete(params *V1CloudAccountsVsphereDeleteParams) (*V1CloudAccountsVsphereDeleteNoContent, error) + + V1CloudAccountsVsphereGet(params *V1CloudAccountsVsphereGetParams) (*V1CloudAccountsVsphereGetOK, error) + + V1CloudAccountsVsphereList(params *V1CloudAccountsVsphereListParams) (*V1CloudAccountsVsphereListOK, error) + + V1CloudAccountsVsphereUpdate(params *V1CloudAccountsVsphereUpdateParams) (*V1CloudAccountsVsphereUpdateNoContent, error) + + V1CloudConfigsAksGet(params *V1CloudConfigsAksGetParams) (*V1CloudConfigsAksGetOK, error) + + V1CloudConfigsAksMachinePoolCreate(params *V1CloudConfigsAksMachinePoolCreateParams) (*V1CloudConfigsAksMachinePoolCreateCreated, error) + + V1CloudConfigsAksMachinePoolDelete(params *V1CloudConfigsAksMachinePoolDeleteParams) (*V1CloudConfigsAksMachinePoolDeleteNoContent, error) + + V1CloudConfigsAksMachinePoolUpdate(params *V1CloudConfigsAksMachinePoolUpdateParams) (*V1CloudConfigsAksMachinePoolUpdateNoContent, error) + + V1CloudConfigsAksPoolMachinesAdd(params *V1CloudConfigsAksPoolMachinesAddParams) (*V1CloudConfigsAksPoolMachinesAddCreated, error) + + V1CloudConfigsAksPoolMachinesList(params *V1CloudConfigsAksPoolMachinesListParams) (*V1CloudConfigsAksPoolMachinesListOK, error) + + V1CloudConfigsAksPoolMachinesUIDDelete(params *V1CloudConfigsAksPoolMachinesUIDDeleteParams) (*V1CloudConfigsAksPoolMachinesUIDDeleteNoContent, error) + + V1CloudConfigsAksPoolMachinesUIDGet(params *V1CloudConfigsAksPoolMachinesUIDGetParams) (*V1CloudConfigsAksPoolMachinesUIDGetOK, error) + + V1CloudConfigsAksPoolMachinesUIDUpdate(params *V1CloudConfigsAksPoolMachinesUIDUpdateParams) (*V1CloudConfigsAksPoolMachinesUIDUpdateNoContent, error) + + V1CloudConfigsAksUIDClusterConfig(params *V1CloudConfigsAksUIDClusterConfigParams) (*V1CloudConfigsAksUIDClusterConfigNoContent, error) + + V1CloudConfigsAwsGet(params *V1CloudConfigsAwsGetParams) (*V1CloudConfigsAwsGetOK, error) + + V1CloudConfigsAwsMachinePoolCreate(params *V1CloudConfigsAwsMachinePoolCreateParams) (*V1CloudConfigsAwsMachinePoolCreateCreated, error) + + V1CloudConfigsAwsMachinePoolDelete(params *V1CloudConfigsAwsMachinePoolDeleteParams) (*V1CloudConfigsAwsMachinePoolDeleteNoContent, error) + + V1CloudConfigsAwsMachinePoolUpdate(params *V1CloudConfigsAwsMachinePoolUpdateParams) (*V1CloudConfigsAwsMachinePoolUpdateNoContent, error) + + V1CloudConfigsAwsPoolMachinesAdd(params *V1CloudConfigsAwsPoolMachinesAddParams) (*V1CloudConfigsAwsPoolMachinesAddCreated, error) + + V1CloudConfigsAwsPoolMachinesList(params *V1CloudConfigsAwsPoolMachinesListParams) (*V1CloudConfigsAwsPoolMachinesListOK, error) + + V1CloudConfigsAwsPoolMachinesUIDDelete(params *V1CloudConfigsAwsPoolMachinesUIDDeleteParams) (*V1CloudConfigsAwsPoolMachinesUIDDeleteNoContent, error) + + V1CloudConfigsAwsPoolMachinesUIDGet(params *V1CloudConfigsAwsPoolMachinesUIDGetParams) (*V1CloudConfigsAwsPoolMachinesUIDGetOK, error) + + V1CloudConfigsAwsPoolMachinesUIDUpdate(params *V1CloudConfigsAwsPoolMachinesUIDUpdateParams) (*V1CloudConfigsAwsPoolMachinesUIDUpdateNoContent, error) + + V1CloudConfigsAwsUIDClusterConfig(params *V1CloudConfigsAwsUIDClusterConfigParams) (*V1CloudConfigsAwsUIDClusterConfigNoContent, error) + + V1CloudConfigsAzureGet(params *V1CloudConfigsAzureGetParams) (*V1CloudConfigsAzureGetOK, error) + + V1CloudConfigsAzureMachinePoolCreate(params *V1CloudConfigsAzureMachinePoolCreateParams) (*V1CloudConfigsAzureMachinePoolCreateCreated, error) + + V1CloudConfigsAzureMachinePoolDelete(params *V1CloudConfigsAzureMachinePoolDeleteParams) (*V1CloudConfigsAzureMachinePoolDeleteNoContent, error) + + V1CloudConfigsAzureMachinePoolUpdate(params *V1CloudConfigsAzureMachinePoolUpdateParams) (*V1CloudConfigsAzureMachinePoolUpdateNoContent, error) + + V1CloudConfigsAzurePoolMachinesAdd(params *V1CloudConfigsAzurePoolMachinesAddParams) (*V1CloudConfigsAzurePoolMachinesAddCreated, error) + + V1CloudConfigsAzurePoolMachinesList(params *V1CloudConfigsAzurePoolMachinesListParams) (*V1CloudConfigsAzurePoolMachinesListOK, error) + + V1CloudConfigsAzurePoolMachinesUIDDelete(params *V1CloudConfigsAzurePoolMachinesUIDDeleteParams) (*V1CloudConfigsAzurePoolMachinesUIDDeleteNoContent, error) + + V1CloudConfigsAzurePoolMachinesUIDGet(params *V1CloudConfigsAzurePoolMachinesUIDGetParams) (*V1CloudConfigsAzurePoolMachinesUIDGetOK, error) + + V1CloudConfigsAzurePoolMachinesUIDUpdate(params *V1CloudConfigsAzurePoolMachinesUIDUpdateParams) (*V1CloudConfigsAzurePoolMachinesUIDUpdateNoContent, error) + + V1CloudConfigsAzureUIDClusterConfig(params *V1CloudConfigsAzureUIDClusterConfigParams) (*V1CloudConfigsAzureUIDClusterConfigNoContent, error) + + V1CloudConfigsCustomGet(params *V1CloudConfigsCustomGetParams) (*V1CloudConfigsCustomGetOK, error) + + V1CloudConfigsCustomMachinePoolCreate(params *V1CloudConfigsCustomMachinePoolCreateParams) (*V1CloudConfigsCustomMachinePoolCreateCreated, error) + + V1CloudConfigsCustomMachinePoolDelete(params *V1CloudConfigsCustomMachinePoolDeleteParams) (*V1CloudConfigsCustomMachinePoolDeleteNoContent, error) + + V1CloudConfigsCustomMachinePoolUpdate(params *V1CloudConfigsCustomMachinePoolUpdateParams) (*V1CloudConfigsCustomMachinePoolUpdateNoContent, error) + + V1CloudConfigsCustomPoolMachinesAdd(params *V1CloudConfigsCustomPoolMachinesAddParams) (*V1CloudConfigsCustomPoolMachinesAddCreated, error) + + V1CloudConfigsCustomPoolMachinesList(params *V1CloudConfigsCustomPoolMachinesListParams) (*V1CloudConfigsCustomPoolMachinesListOK, error) + + V1CloudConfigsCustomPoolMachinesUIDDelete(params *V1CloudConfigsCustomPoolMachinesUIDDeleteParams) (*V1CloudConfigsCustomPoolMachinesUIDDeleteNoContent, error) + + V1CloudConfigsCustomPoolMachinesUIDGet(params *V1CloudConfigsCustomPoolMachinesUIDGetParams) (*V1CloudConfigsCustomPoolMachinesUIDGetOK, error) + + V1CloudConfigsCustomPoolMachinesUIDUpdate(params *V1CloudConfigsCustomPoolMachinesUIDUpdateParams) (*V1CloudConfigsCustomPoolMachinesUIDUpdateNoContent, error) + + V1CloudConfigsCustomUIDClusterConfig(params *V1CloudConfigsCustomUIDClusterConfigParams) (*V1CloudConfigsCustomUIDClusterConfigNoContent, error) + + V1CloudConfigsEdgeNativeGet(params *V1CloudConfigsEdgeNativeGetParams) (*V1CloudConfigsEdgeNativeGetOK, error) + + V1CloudConfigsEdgeNativeMachinePoolCreate(params *V1CloudConfigsEdgeNativeMachinePoolCreateParams) (*V1CloudConfigsEdgeNativeMachinePoolCreateCreated, error) + + V1CloudConfigsEdgeNativeMachinePoolDelete(params *V1CloudConfigsEdgeNativeMachinePoolDeleteParams) (*V1CloudConfigsEdgeNativeMachinePoolDeleteNoContent, error) + + V1CloudConfigsEdgeNativeMachinePoolUpdate(params *V1CloudConfigsEdgeNativeMachinePoolUpdateParams) (*V1CloudConfigsEdgeNativeMachinePoolUpdateNoContent, error) + + V1CloudConfigsEdgeNativePoolMachinesAdd(params *V1CloudConfigsEdgeNativePoolMachinesAddParams) (*V1CloudConfigsEdgeNativePoolMachinesAddCreated, error) + + V1CloudConfigsEdgeNativePoolMachinesList(params *V1CloudConfigsEdgeNativePoolMachinesListParams) (*V1CloudConfigsEdgeNativePoolMachinesListOK, error) + + V1CloudConfigsEdgeNativePoolMachinesUIDDelete(params *V1CloudConfigsEdgeNativePoolMachinesUIDDeleteParams) (*V1CloudConfigsEdgeNativePoolMachinesUIDDeleteNoContent, error) + + V1CloudConfigsEdgeNativePoolMachinesUIDGet(params *V1CloudConfigsEdgeNativePoolMachinesUIDGetParams) (*V1CloudConfigsEdgeNativePoolMachinesUIDGetOK, error) + + V1CloudConfigsEdgeNativePoolMachinesUIDUpdate(params *V1CloudConfigsEdgeNativePoolMachinesUIDUpdateParams) (*V1CloudConfigsEdgeNativePoolMachinesUIDUpdateNoContent, error) + + V1CloudConfigsEdgeNativeUIDClusterConfig(params *V1CloudConfigsEdgeNativeUIDClusterConfigParams) (*V1CloudConfigsEdgeNativeUIDClusterConfigNoContent, error) + + V1CloudConfigsEksGet(params *V1CloudConfigsEksGetParams) (*V1CloudConfigsEksGetOK, error) + + V1CloudConfigsEksMachinePoolCreate(params *V1CloudConfigsEksMachinePoolCreateParams) (*V1CloudConfigsEksMachinePoolCreateCreated, error) + + V1CloudConfigsEksMachinePoolDelete(params *V1CloudConfigsEksMachinePoolDeleteParams) (*V1CloudConfigsEksMachinePoolDeleteNoContent, error) + + V1CloudConfigsEksMachinePoolUpdate(params *V1CloudConfigsEksMachinePoolUpdateParams) (*V1CloudConfigsEksMachinePoolUpdateNoContent, error) + + V1CloudConfigsEksPoolMachinesAdd(params *V1CloudConfigsEksPoolMachinesAddParams) (*V1CloudConfigsEksPoolMachinesAddCreated, error) + + V1CloudConfigsEksPoolMachinesList(params *V1CloudConfigsEksPoolMachinesListParams) (*V1CloudConfigsEksPoolMachinesListOK, error) + + V1CloudConfigsEksPoolMachinesUIDDelete(params *V1CloudConfigsEksPoolMachinesUIDDeleteParams) (*V1CloudConfigsEksPoolMachinesUIDDeleteNoContent, error) + + V1CloudConfigsEksPoolMachinesUIDGet(params *V1CloudConfigsEksPoolMachinesUIDGetParams) (*V1CloudConfigsEksPoolMachinesUIDGetOK, error) + + V1CloudConfigsEksPoolMachinesUIDUpdate(params *V1CloudConfigsEksPoolMachinesUIDUpdateParams) (*V1CloudConfigsEksPoolMachinesUIDUpdateNoContent, error) + + V1CloudConfigsEksUIDClusterConfig(params *V1CloudConfigsEksUIDClusterConfigParams) (*V1CloudConfigsEksUIDClusterConfigNoContent, error) + + V1CloudConfigsEksUIDFargateProfilesUpdate(params *V1CloudConfigsEksUIDFargateProfilesUpdateParams) (*V1CloudConfigsEksUIDFargateProfilesUpdateNoContent, error) + + V1CloudConfigsGcpGet(params *V1CloudConfigsGcpGetParams) (*V1CloudConfigsGcpGetOK, error) + + V1CloudConfigsGcpMachinePoolCreate(params *V1CloudConfigsGcpMachinePoolCreateParams) (*V1CloudConfigsGcpMachinePoolCreateCreated, error) + + V1CloudConfigsGcpMachinePoolDelete(params *V1CloudConfigsGcpMachinePoolDeleteParams) (*V1CloudConfigsGcpMachinePoolDeleteNoContent, error) + + V1CloudConfigsGcpMachinePoolUpdate(params *V1CloudConfigsGcpMachinePoolUpdateParams) (*V1CloudConfigsGcpMachinePoolUpdateNoContent, error) + + V1CloudConfigsGcpPoolMachinesAdd(params *V1CloudConfigsGcpPoolMachinesAddParams) (*V1CloudConfigsGcpPoolMachinesAddCreated, error) + + V1CloudConfigsGcpPoolMachinesList(params *V1CloudConfigsGcpPoolMachinesListParams) (*V1CloudConfigsGcpPoolMachinesListOK, error) + + V1CloudConfigsGcpPoolMachinesUIDDelete(params *V1CloudConfigsGcpPoolMachinesUIDDeleteParams) (*V1CloudConfigsGcpPoolMachinesUIDDeleteNoContent, error) + + V1CloudConfigsGcpPoolMachinesUIDGet(params *V1CloudConfigsGcpPoolMachinesUIDGetParams) (*V1CloudConfigsGcpPoolMachinesUIDGetOK, error) + + V1CloudConfigsGcpPoolMachinesUIDUpdate(params *V1CloudConfigsGcpPoolMachinesUIDUpdateParams) (*V1CloudConfigsGcpPoolMachinesUIDUpdateNoContent, error) + + V1CloudConfigsGcpUIDClusterConfig(params *V1CloudConfigsGcpUIDClusterConfigParams) (*V1CloudConfigsGcpUIDClusterConfigNoContent, error) + + V1CloudConfigsGenericGet(params *V1CloudConfigsGenericGetParams) (*V1CloudConfigsGenericGetOK, error) + + V1CloudConfigsGenericMachinePoolCreate(params *V1CloudConfigsGenericMachinePoolCreateParams) (*V1CloudConfigsGenericMachinePoolCreateCreated, error) + + V1CloudConfigsGenericMachinePoolDelete(params *V1CloudConfigsGenericMachinePoolDeleteParams) (*V1CloudConfigsGenericMachinePoolDeleteNoContent, error) + + V1CloudConfigsGenericMachinePoolUpdate(params *V1CloudConfigsGenericMachinePoolUpdateParams) (*V1CloudConfigsGenericMachinePoolUpdateNoContent, error) + + V1CloudConfigsGenericPoolMachinesAdd(params *V1CloudConfigsGenericPoolMachinesAddParams) (*V1CloudConfigsGenericPoolMachinesAddCreated, error) + + V1CloudConfigsGenericPoolMachinesList(params *V1CloudConfigsGenericPoolMachinesListParams) (*V1CloudConfigsGenericPoolMachinesListOK, error) + + V1CloudConfigsGenericPoolMachinesUIDDelete(params *V1CloudConfigsGenericPoolMachinesUIDDeleteParams) (*V1CloudConfigsGenericPoolMachinesUIDDeleteNoContent, error) + + V1CloudConfigsGenericPoolMachinesUIDGet(params *V1CloudConfigsGenericPoolMachinesUIDGetParams) (*V1CloudConfigsGenericPoolMachinesUIDGetOK, error) + + V1CloudConfigsGenericPoolMachinesUIDUpdate(params *V1CloudConfigsGenericPoolMachinesUIDUpdateParams) (*V1CloudConfigsGenericPoolMachinesUIDUpdateNoContent, error) + + V1CloudConfigsGenericUIDClusterConfig(params *V1CloudConfigsGenericUIDClusterConfigParams) (*V1CloudConfigsGenericUIDClusterConfigNoContent, error) + + V1CloudConfigsGkeGet(params *V1CloudConfigsGkeGetParams) (*V1CloudConfigsGkeGetOK, error) + + V1CloudConfigsGkeMachinePoolCreate(params *V1CloudConfigsGkeMachinePoolCreateParams) (*V1CloudConfigsGkeMachinePoolCreateCreated, error) + + V1CloudConfigsGkeMachinePoolDelete(params *V1CloudConfigsGkeMachinePoolDeleteParams) (*V1CloudConfigsGkeMachinePoolDeleteNoContent, error) + + V1CloudConfigsGkeMachinePoolUpdate(params *V1CloudConfigsGkeMachinePoolUpdateParams) (*V1CloudConfigsGkeMachinePoolUpdateNoContent, error) + + V1CloudConfigsGkePoolMachinesAdd(params *V1CloudConfigsGkePoolMachinesAddParams) (*V1CloudConfigsGkePoolMachinesAddCreated, error) + + V1CloudConfigsGkePoolMachinesList(params *V1CloudConfigsGkePoolMachinesListParams) (*V1CloudConfigsGkePoolMachinesListOK, error) + + V1CloudConfigsGkePoolMachinesUIDDelete(params *V1CloudConfigsGkePoolMachinesUIDDeleteParams) (*V1CloudConfigsGkePoolMachinesUIDDeleteNoContent, error) + + V1CloudConfigsGkePoolMachinesUIDGet(params *V1CloudConfigsGkePoolMachinesUIDGetParams) (*V1CloudConfigsGkePoolMachinesUIDGetOK, error) + + V1CloudConfigsGkePoolMachinesUIDUpdate(params *V1CloudConfigsGkePoolMachinesUIDUpdateParams) (*V1CloudConfigsGkePoolMachinesUIDUpdateNoContent, error) + + V1CloudConfigsGkeUIDClusterConfig(params *V1CloudConfigsGkeUIDClusterConfigParams) (*V1CloudConfigsGkeUIDClusterConfigNoContent, error) + + V1CloudConfigsMaasGet(params *V1CloudConfigsMaasGetParams) (*V1CloudConfigsMaasGetOK, error) + + V1CloudConfigsMaasMachinePoolCreate(params *V1CloudConfigsMaasMachinePoolCreateParams) (*V1CloudConfigsMaasMachinePoolCreateCreated, error) + + V1CloudConfigsMaasMachinePoolDelete(params *V1CloudConfigsMaasMachinePoolDeleteParams) (*V1CloudConfigsMaasMachinePoolDeleteNoContent, error) + + V1CloudConfigsMaasMachinePoolUpdate(params *V1CloudConfigsMaasMachinePoolUpdateParams) (*V1CloudConfigsMaasMachinePoolUpdateNoContent, error) + + V1CloudConfigsMaasPoolMachinesAdd(params *V1CloudConfigsMaasPoolMachinesAddParams) (*V1CloudConfigsMaasPoolMachinesAddCreated, error) + + V1CloudConfigsMaasPoolMachinesList(params *V1CloudConfigsMaasPoolMachinesListParams) (*V1CloudConfigsMaasPoolMachinesListOK, error) + + V1CloudConfigsMaasPoolMachinesUIDDelete(params *V1CloudConfigsMaasPoolMachinesUIDDeleteParams) (*V1CloudConfigsMaasPoolMachinesUIDDeleteNoContent, error) + + V1CloudConfigsMaasPoolMachinesUIDGet(params *V1CloudConfigsMaasPoolMachinesUIDGetParams) (*V1CloudConfigsMaasPoolMachinesUIDGetOK, error) + + V1CloudConfigsMaasPoolMachinesUIDUpdate(params *V1CloudConfigsMaasPoolMachinesUIDUpdateParams) (*V1CloudConfigsMaasPoolMachinesUIDUpdateNoContent, error) + + V1CloudConfigsMaasUIDClusterConfig(params *V1CloudConfigsMaasUIDClusterConfigParams) (*V1CloudConfigsMaasUIDClusterConfigNoContent, error) + + V1CloudConfigsMachinePoolsMachineUIDMaintenanceStatusUpdate(params *V1CloudConfigsMachinePoolsMachineUIDMaintenanceStatusUpdateParams) (*V1CloudConfigsMachinePoolsMachineUIDMaintenanceStatusUpdateNoContent, error) + + V1CloudConfigsMachinePoolsMachineUIDMaintenanceUpdate(params *V1CloudConfigsMachinePoolsMachineUIDMaintenanceUpdateParams) (*V1CloudConfigsMachinePoolsMachineUIDMaintenanceUpdateNoContent, error) + + V1CloudConfigsMachinePoolsMachineUidsGet(params *V1CloudConfigsMachinePoolsMachineUidsGetParams) (*V1CloudConfigsMachinePoolsMachineUidsGetOK, error) + + V1CloudConfigsOpenStackGet(params *V1CloudConfigsOpenStackGetParams) (*V1CloudConfigsOpenStackGetOK, error) + + V1CloudConfigsOpenStackMachinePoolCreate(params *V1CloudConfigsOpenStackMachinePoolCreateParams) (*V1CloudConfigsOpenStackMachinePoolCreateCreated, error) + + V1CloudConfigsOpenStackMachinePoolDelete(params *V1CloudConfigsOpenStackMachinePoolDeleteParams) (*V1CloudConfigsOpenStackMachinePoolDeleteNoContent, error) + + V1CloudConfigsOpenStackMachinePoolUpdate(params *V1CloudConfigsOpenStackMachinePoolUpdateParams) (*V1CloudConfigsOpenStackMachinePoolUpdateNoContent, error) + + V1CloudConfigsOpenStackPoolMachinesAdd(params *V1CloudConfigsOpenStackPoolMachinesAddParams) (*V1CloudConfigsOpenStackPoolMachinesAddCreated, error) + + V1CloudConfigsOpenStackPoolMachinesList(params *V1CloudConfigsOpenStackPoolMachinesListParams) (*V1CloudConfigsOpenStackPoolMachinesListOK, error) + + V1CloudConfigsOpenStackPoolMachinesUIDDelete(params *V1CloudConfigsOpenStackPoolMachinesUIDDeleteParams) (*V1CloudConfigsOpenStackPoolMachinesUIDDeleteNoContent, error) + + V1CloudConfigsOpenStackPoolMachinesUIDGet(params *V1CloudConfigsOpenStackPoolMachinesUIDGetParams) (*V1CloudConfigsOpenStackPoolMachinesUIDGetOK, error) + + V1CloudConfigsOpenStackPoolMachinesUIDUpdate(params *V1CloudConfigsOpenStackPoolMachinesUIDUpdateParams) (*V1CloudConfigsOpenStackPoolMachinesUIDUpdateNoContent, error) + + V1CloudConfigsOpenStackUIDClusterConfig(params *V1CloudConfigsOpenStackUIDClusterConfigParams) (*V1CloudConfigsOpenStackUIDClusterConfigNoContent, error) + + V1CloudConfigsTkeGet(params *V1CloudConfigsTkeGetParams) (*V1CloudConfigsTkeGetOK, error) + + V1CloudConfigsTkeMachinePoolCreate(params *V1CloudConfigsTkeMachinePoolCreateParams) (*V1CloudConfigsTkeMachinePoolCreateCreated, error) + + V1CloudConfigsTkeMachinePoolDelete(params *V1CloudConfigsTkeMachinePoolDeleteParams) (*V1CloudConfigsTkeMachinePoolDeleteNoContent, error) + + V1CloudConfigsTkeMachinePoolUpdate(params *V1CloudConfigsTkeMachinePoolUpdateParams) (*V1CloudConfigsTkeMachinePoolUpdateNoContent, error) + + V1CloudConfigsTkePoolMachinesAdd(params *V1CloudConfigsTkePoolMachinesAddParams) (*V1CloudConfigsTkePoolMachinesAddCreated, error) + + V1CloudConfigsTkePoolMachinesList(params *V1CloudConfigsTkePoolMachinesListParams) (*V1CloudConfigsTkePoolMachinesListOK, error) + + V1CloudConfigsTkePoolMachinesUIDDelete(params *V1CloudConfigsTkePoolMachinesUIDDeleteParams) (*V1CloudConfigsTkePoolMachinesUIDDeleteNoContent, error) + + V1CloudConfigsTkePoolMachinesUIDGet(params *V1CloudConfigsTkePoolMachinesUIDGetParams) (*V1CloudConfigsTkePoolMachinesUIDGetOK, error) + + V1CloudConfigsTkePoolMachinesUIDUpdate(params *V1CloudConfigsTkePoolMachinesUIDUpdateParams) (*V1CloudConfigsTkePoolMachinesUIDUpdateNoContent, error) + + V1CloudConfigsTkeUIDClusterConfig(params *V1CloudConfigsTkeUIDClusterConfigParams) (*V1CloudConfigsTkeUIDClusterConfigNoContent, error) + + V1CloudConfigsVirtualGet(params *V1CloudConfigsVirtualGetParams) (*V1CloudConfigsVirtualGetOK, error) + + V1CloudConfigsVirtualMachinePoolCreate(params *V1CloudConfigsVirtualMachinePoolCreateParams) (*V1CloudConfigsVirtualMachinePoolCreateCreated, error) + + V1CloudConfigsVirtualMachinePoolDelete(params *V1CloudConfigsVirtualMachinePoolDeleteParams) (*V1CloudConfigsVirtualMachinePoolDeleteNoContent, error) + + V1CloudConfigsVirtualMachinePoolUpdate(params *V1CloudConfigsVirtualMachinePoolUpdateParams) (*V1CloudConfigsVirtualMachinePoolUpdateNoContent, error) + + V1CloudConfigsVirtualPoolMachinesAdd(params *V1CloudConfigsVirtualPoolMachinesAddParams) (*V1CloudConfigsVirtualPoolMachinesAddCreated, error) + + V1CloudConfigsVirtualPoolMachinesList(params *V1CloudConfigsVirtualPoolMachinesListParams) (*V1CloudConfigsVirtualPoolMachinesListOK, error) + + V1CloudConfigsVirtualPoolMachinesUIDDelete(params *V1CloudConfigsVirtualPoolMachinesUIDDeleteParams) (*V1CloudConfigsVirtualPoolMachinesUIDDeleteNoContent, error) + + V1CloudConfigsVirtualPoolMachinesUIDGet(params *V1CloudConfigsVirtualPoolMachinesUIDGetParams) (*V1CloudConfigsVirtualPoolMachinesUIDGetOK, error) + + V1CloudConfigsVirtualPoolMachinesUIDUpdate(params *V1CloudConfigsVirtualPoolMachinesUIDUpdateParams) (*V1CloudConfigsVirtualPoolMachinesUIDUpdateNoContent, error) + + V1CloudConfigsVirtualUIDClusterConfig(params *V1CloudConfigsVirtualUIDClusterConfigParams) (*V1CloudConfigsVirtualUIDClusterConfigNoContent, error) + + V1CloudConfigsVirtualUIDUpdate(params *V1CloudConfigsVirtualUIDUpdateParams) (*V1CloudConfigsVirtualUIDUpdateNoContent, error) + + V1CloudConfigsVsphereGet(params *V1CloudConfigsVsphereGetParams) (*V1CloudConfigsVsphereGetOK, error) + + V1CloudConfigsVsphereMachinePoolCreate(params *V1CloudConfigsVsphereMachinePoolCreateParams) (*V1CloudConfigsVsphereMachinePoolCreateCreated, error) + + V1CloudConfigsVsphereMachinePoolDelete(params *V1CloudConfigsVsphereMachinePoolDeleteParams) (*V1CloudConfigsVsphereMachinePoolDeleteNoContent, error) + + V1CloudConfigsVsphereMachinePoolUpdate(params *V1CloudConfigsVsphereMachinePoolUpdateParams) (*V1CloudConfigsVsphereMachinePoolUpdateNoContent, error) + + V1CloudConfigsVspherePoolMachinesAdd(params *V1CloudConfigsVspherePoolMachinesAddParams) (*V1CloudConfigsVspherePoolMachinesAddCreated, error) + + V1CloudConfigsVspherePoolMachinesList(params *V1CloudConfigsVspherePoolMachinesListParams) (*V1CloudConfigsVspherePoolMachinesListOK, error) + + V1CloudConfigsVspherePoolMachinesUIDDelete(params *V1CloudConfigsVspherePoolMachinesUIDDeleteParams) (*V1CloudConfigsVspherePoolMachinesUIDDeleteNoContent, error) + + V1CloudConfigsVspherePoolMachinesUIDGet(params *V1CloudConfigsVspherePoolMachinesUIDGetParams) (*V1CloudConfigsVspherePoolMachinesUIDGetOK, error) + + V1CloudConfigsVspherePoolMachinesUIDUpdate(params *V1CloudConfigsVspherePoolMachinesUIDUpdateParams) (*V1CloudConfigsVspherePoolMachinesUIDUpdateNoContent, error) + + V1CloudConfigsVsphereUIDClusterConfig(params *V1CloudConfigsVsphereUIDClusterConfigParams) (*V1CloudConfigsVsphereUIDClusterConfigNoContent, error) + + V1ClusterFeatureBackupCreate(params *V1ClusterFeatureBackupCreateParams) (*V1ClusterFeatureBackupCreateCreated, error) + + V1ClusterFeatureBackupDelete(params *V1ClusterFeatureBackupDeleteParams) (*V1ClusterFeatureBackupDeleteNoContent, error) + + V1ClusterFeatureBackupGet(params *V1ClusterFeatureBackupGetParams) (*V1ClusterFeatureBackupGetOK, error) + + V1ClusterFeatureBackupOnDemandCreate(params *V1ClusterFeatureBackupOnDemandCreateParams) (*V1ClusterFeatureBackupOnDemandCreateCreated, error) + + V1ClusterFeatureBackupScheduleReset(params *V1ClusterFeatureBackupScheduleResetParams) (*V1ClusterFeatureBackupScheduleResetNoContent, error) + + V1ClusterFeatureBackupUpdate(params *V1ClusterFeatureBackupUpdateParams) (*V1ClusterFeatureBackupUpdateNoContent, error) + + V1ClusterFeatureComplianceScanCreate(params *V1ClusterFeatureComplianceScanCreateParams) (*V1ClusterFeatureComplianceScanCreateCreated, error) + + V1ClusterFeatureComplianceScanGet(params *V1ClusterFeatureComplianceScanGetParams) (*V1ClusterFeatureComplianceScanGetOK, error) + + V1ClusterFeatureComplianceScanLogDelete(params *V1ClusterFeatureComplianceScanLogDeleteParams) (*V1ClusterFeatureComplianceScanLogDeleteNoContent, error) + + V1ClusterFeatureComplianceScanLogsGet(params *V1ClusterFeatureComplianceScanLogsGetParams) (*V1ClusterFeatureComplianceScanLogsGetOK, error) + + V1ClusterFeatureComplianceScanOnDemandCreate(params *V1ClusterFeatureComplianceScanOnDemandCreateParams) (*V1ClusterFeatureComplianceScanOnDemandCreateCreated, error) + + V1ClusterFeatureComplianceScanUpdate(params *V1ClusterFeatureComplianceScanUpdateParams) (*V1ClusterFeatureComplianceScanUpdateNoContent, error) + + V1ClusterFeatureDriverLogDownload(params *V1ClusterFeatureDriverLogDownloadParams, writer io.Writer) (*V1ClusterFeatureDriverLogDownloadOK, error) + + V1ClusterFeatureHelmChartsGet(params *V1ClusterFeatureHelmChartsGetParams) (*V1ClusterFeatureHelmChartsGetOK, error) + + V1ClusterFeatureKubeBenchLogGet(params *V1ClusterFeatureKubeBenchLogGetParams) (*V1ClusterFeatureKubeBenchLogGetOK, error) + + V1ClusterFeatureKubeHunterLogGet(params *V1ClusterFeatureKubeHunterLogGetParams) (*V1ClusterFeatureKubeHunterLogGetOK, error) + + V1ClusterFeatureLogFetcherCreate(params *V1ClusterFeatureLogFetcherCreateParams) (*V1ClusterFeatureLogFetcherCreateCreated, error) + + V1ClusterFeatureLogFetcherGet(params *V1ClusterFeatureLogFetcherGetParams) (*V1ClusterFeatureLogFetcherGetOK, error) + + V1ClusterFeatureLogFetcherLogDownload(params *V1ClusterFeatureLogFetcherLogDownloadParams, writer io.Writer) (*V1ClusterFeatureLogFetcherLogDownloadOK, error) + + V1ClusterFeatureLogFetcherLogUpdate(params *V1ClusterFeatureLogFetcherLogUpdateParams) (*V1ClusterFeatureLogFetcherLogUpdateNoContent, error) + + V1ClusterFeatureManifestsGet(params *V1ClusterFeatureManifestsGetParams) (*V1ClusterFeatureManifestsGetOK, error) + + V1ClusterFeatureRestoreGet(params *V1ClusterFeatureRestoreGetParams) (*V1ClusterFeatureRestoreGetOK, error) + + V1ClusterFeatureRestoreOnDemandCreate(params *V1ClusterFeatureRestoreOnDemandCreateParams) (*V1ClusterFeatureRestoreOnDemandCreateCreated, error) + + V1ClusterFeatureScanKubeBenchLogUpdate(params *V1ClusterFeatureScanKubeBenchLogUpdateParams) (*V1ClusterFeatureScanKubeBenchLogUpdateNoContent, error) + + V1ClusterFeatureScanKubeHunterLogUpdate(params *V1ClusterFeatureScanKubeHunterLogUpdateParams) (*V1ClusterFeatureScanKubeHunterLogUpdateNoContent, error) + + V1ClusterFeatureScanSonobuoyLogUpdate(params *V1ClusterFeatureScanSonobuoyLogUpdateParams) (*V1ClusterFeatureScanSonobuoyLogUpdateNoContent, error) + + V1ClusterFeatureScanSyftLogUpdate(params *V1ClusterFeatureScanSyftLogUpdateParams) (*V1ClusterFeatureScanSyftLogUpdateNoContent, error) + + V1ClusterFeatureSonobuoyLogGet(params *V1ClusterFeatureSonobuoyLogGetParams) (*V1ClusterFeatureSonobuoyLogGetOK, error) + + V1ClusterFeatureSyftLogGet(params *V1ClusterFeatureSyftLogGetParams) (*V1ClusterFeatureSyftLogGetOK, error) + + V1ClusterGroupUIDHostClustersSummary(params *V1ClusterGroupUIDHostClustersSummaryParams) (*V1ClusterGroupUIDHostClustersSummaryOK, error) + + V1ClusterGroupUIDVirtualClustersSummary(params *V1ClusterGroupUIDVirtualClustersSummaryParams) (*V1ClusterGroupUIDVirtualClustersSummaryOK, error) + + V1ClusterGroupsCreate(params *V1ClusterGroupsCreateParams) (*V1ClusterGroupsCreateCreated, error) + + V1ClusterGroupsDeveloperCreditUsageGet(params *V1ClusterGroupsDeveloperCreditUsageGetParams) (*V1ClusterGroupsDeveloperCreditUsageGetOK, error) + + V1ClusterGroupsHostClusterMetadata(params *V1ClusterGroupsHostClusterMetadataParams) (*V1ClusterGroupsHostClusterMetadataOK, error) + + V1ClusterGroupsHostClusterSummary(params *V1ClusterGroupsHostClusterSummaryParams) (*V1ClusterGroupsHostClusterSummaryOK, error) + + V1ClusterGroupsUIDDelete(params *V1ClusterGroupsUIDDeleteParams) (*V1ClusterGroupsUIDDeleteNoContent, error) + + V1ClusterGroupsUIDGet(params *V1ClusterGroupsUIDGetParams) (*V1ClusterGroupsUIDGetOK, error) + + V1ClusterGroupsUIDHostClusterUpdate(params *V1ClusterGroupsUIDHostClusterUpdateParams) (*V1ClusterGroupsUIDHostClusterUpdateNoContent, error) + + V1ClusterGroupsUIDMetaUpdate(params *V1ClusterGroupsUIDMetaUpdateParams) (*V1ClusterGroupsUIDMetaUpdateNoContent, error) + + V1ClusterGroupsUIDPacksResolvedValuesGet(params *V1ClusterGroupsUIDPacksResolvedValuesGetParams) (*V1ClusterGroupsUIDPacksResolvedValuesGetOK, error) + + V1ClusterGroupsUIDProfilesGet(params *V1ClusterGroupsUIDProfilesGetParams) (*V1ClusterGroupsUIDProfilesGetOK, error) + + V1ClusterGroupsUIDProfilesUpdate(params *V1ClusterGroupsUIDProfilesUpdateParams) (*V1ClusterGroupsUIDProfilesUpdateNoContent, error) + + V1ClusterGroupsValidateName(params *V1ClusterGroupsValidateNameParams) (*V1ClusterGroupsValidateNameNoContent, error) + + V1ClusterNamespacesGet(params *V1ClusterNamespacesGetParams) (*V1ClusterNamespacesGetOK, error) + + V1ClusterProfilesBulkDelete(params *V1ClusterProfilesBulkDeleteParams) (*V1ClusterProfilesBulkDeleteOK, error) + + V1ClusterProfilesCreate(params *V1ClusterProfilesCreateParams) (*V1ClusterProfilesCreateCreated, error) + + V1ClusterProfilesDelete(params *V1ClusterProfilesDeleteParams) (*V1ClusterProfilesDeleteNoContent, error) + + V1ClusterProfilesFilterSummary(params *V1ClusterProfilesFilterSummaryParams) (*V1ClusterProfilesFilterSummaryOK, error) + + V1ClusterProfilesGet(params *V1ClusterProfilesGetParams) (*V1ClusterProfilesGetOK, error) + + V1ClusterProfilesImport(params *V1ClusterProfilesImportParams) (*V1ClusterProfilesImportCreated, error) + + V1ClusterProfilesImportFile(params *V1ClusterProfilesImportFileParams) (*V1ClusterProfilesImportFileCreated, error) + + V1ClusterProfilesImportValidate(params *V1ClusterProfilesImportValidateParams) (*V1ClusterProfilesImportValidateOK, error) + + V1ClusterProfilesMetadata(params *V1ClusterProfilesMetadataParams) (*V1ClusterProfilesMetadataOK, error) + + V1ClusterProfilesPacksRefUpdate(params *V1ClusterProfilesPacksRefUpdateParams) (*V1ClusterProfilesPacksRefUpdateNoContent, error) + + V1ClusterProfilesPublish(params *V1ClusterProfilesPublishParams) (*V1ClusterProfilesPublishNoContent, error) + + V1ClusterProfilesUIDClone(params *V1ClusterProfilesUIDCloneParams) (*V1ClusterProfilesUIDCloneCreated, error) + + V1ClusterProfilesUIDCloneValidate(params *V1ClusterProfilesUIDCloneValidateParams) (*V1ClusterProfilesUIDCloneValidateNoContent, error) + + V1ClusterProfilesUIDMetadataUpdate(params *V1ClusterProfilesUIDMetadataUpdateParams) (*V1ClusterProfilesUIDMetadataUpdateNoContent, error) + + V1ClusterProfilesUIDPacksAdd(params *V1ClusterProfilesUIDPacksAddParams) (*V1ClusterProfilesUIDPacksAddCreated, error) + + V1ClusterProfilesUIDPacksConfigGet(params *V1ClusterProfilesUIDPacksConfigGetParams) (*V1ClusterProfilesUIDPacksConfigGetOK, error) + + V1ClusterProfilesUIDPacksGet(params *V1ClusterProfilesUIDPacksGetParams) (*V1ClusterProfilesUIDPacksGetOK, error) + + V1ClusterProfilesUIDPacksManifestsGet(params *V1ClusterProfilesUIDPacksManifestsGetParams) (*V1ClusterProfilesUIDPacksManifestsGetOK, error) + + V1ClusterProfilesUIDPacksNameDelete(params *V1ClusterProfilesUIDPacksNameDeleteParams) (*V1ClusterProfilesUIDPacksNameDeleteNoContent, error) + + V1ClusterProfilesUIDPacksNameManifestsAdd(params *V1ClusterProfilesUIDPacksNameManifestsAddParams) (*V1ClusterProfilesUIDPacksNameManifestsAddCreated, error) + + V1ClusterProfilesUIDPacksNameManifestsUIDDelete(params *V1ClusterProfilesUIDPacksNameManifestsUIDDeleteParams) (*V1ClusterProfilesUIDPacksNameManifestsUIDDeleteNoContent, error) + + V1ClusterProfilesUIDPacksNameManifestsUIDGet(params *V1ClusterProfilesUIDPacksNameManifestsUIDGetParams) (*V1ClusterProfilesUIDPacksNameManifestsUIDGetOK, error) + + V1ClusterProfilesUIDPacksNameManifestsUIDUpdate(params *V1ClusterProfilesUIDPacksNameManifestsUIDUpdateParams) (*V1ClusterProfilesUIDPacksNameManifestsUIDUpdateNoContent, error) + + V1ClusterProfilesUIDPacksNameUpdate(params *V1ClusterProfilesUIDPacksNameUpdateParams) (*V1ClusterProfilesUIDPacksNameUpdateNoContent, error) + + V1ClusterProfilesUIDPacksResolvedValuesGet(params *V1ClusterProfilesUIDPacksResolvedValuesGetParams) (*V1ClusterProfilesUIDPacksResolvedValuesGetOK, error) + + V1ClusterProfilesUIDPacksUIDManifests(params *V1ClusterProfilesUIDPacksUIDManifestsParams) (*V1ClusterProfilesUIDPacksUIDManifestsOK, error) + + V1ClusterProfilesUIDSpcDownload(params *V1ClusterProfilesUIDSpcDownloadParams, writer io.Writer) (*V1ClusterProfilesUIDSpcDownloadOK, error) + + V1ClusterProfilesUIDSummary(params *V1ClusterProfilesUIDSummaryParams) (*V1ClusterProfilesUIDSummaryOK, error) + + V1ClusterProfilesUIDValidatePacks(params *V1ClusterProfilesUIDValidatePacksParams) (*V1ClusterProfilesUIDValidatePacksOK, error) + + V1ClusterProfilesUpdate(params *V1ClusterProfilesUpdateParams) (*V1ClusterProfilesUpdateNoContent, error) + + V1ClusterProfilesValidateNameVersion(params *V1ClusterProfilesValidateNameVersionParams) (*V1ClusterProfilesValidateNameVersionNoContent, error) + + V1ClusterProfilesValidatePacks(params *V1ClusterProfilesValidatePacksParams) (*V1ClusterProfilesValidatePacksOK, error) + + V1ClusterVMSnapshotsList(params *V1ClusterVMSnapshotsListParams) (*V1ClusterVMSnapshotsListOK, error) + + V1DashboardAppDeployments(params *V1DashboardAppDeploymentsParams) (*V1DashboardAppDeploymentsOK, error) + + V1DashboardAppProfiles(params *V1DashboardAppProfilesParams) (*V1DashboardAppProfilesOK, error) + + V1DashboardAppProfilesMetadata(params *V1DashboardAppProfilesMetadataParams) (*V1DashboardAppProfilesMetadataOK, error) + + V1DashboardCloudAccountsMetadata(params *V1DashboardCloudAccountsMetadataParams) (*V1DashboardCloudAccountsMetadataOK, error) + + V1DashboardClustersSearchSummaryExport(params *V1DashboardClustersSearchSummaryExportParams, writer io.Writer) (*V1DashboardClustersSearchSummaryExportOK, error) + + V1DashboardClustersSearchSummaryExportGet(params *V1DashboardClustersSearchSummaryExportGetParams, writer io.Writer) (*V1DashboardClustersSearchSummaryExportGetOK, error) + + V1DashboardEdgehostsSearch(params *V1DashboardEdgehostsSearchParams) (*V1DashboardEdgehostsSearchOK, error) + + V1DashboardEdgehostsSearchSchemaGet(params *V1DashboardEdgehostsSearchSchemaGetParams) (*V1DashboardEdgehostsSearchSchemaGetOK, error) + + V1DashboardPcgSearchSchemaGet(params *V1DashboardPcgSearchSchemaGetParams) (*V1DashboardPcgSearchSchemaGetOK, error) + + V1DashboardPcgsSearchSummary(params *V1DashboardPcgsSearchSummaryParams) (*V1DashboardPcgsSearchSummaryOK, error) + + V1DashboardSpectroClustersCostSummary(params *V1DashboardSpectroClustersCostSummaryParams) (*V1DashboardSpectroClustersCostSummaryOK, error) + + V1DashboardSpectroClustersRepaveList(params *V1DashboardSpectroClustersRepaveListParams) (*V1DashboardSpectroClustersRepaveListOK, error) + + V1DashboardSpectroClustersSearchInput(params *V1DashboardSpectroClustersSearchInputParams) (*V1DashboardSpectroClustersSearchInputOK, error) + + V1DashboardSpectroClustersUIDWorkloads(params *V1DashboardSpectroClustersUIDWorkloadsParams) (*V1DashboardSpectroClustersUIDWorkloadsOK, error) + + V1DashboardSpectroClustersUIDWorkloadsClusterRoleBinding(params *V1DashboardSpectroClustersUIDWorkloadsClusterRoleBindingParams) (*V1DashboardSpectroClustersUIDWorkloadsClusterRoleBindingOK, error) + + V1DashboardSpectroClustersUIDWorkloadsCronJob(params *V1DashboardSpectroClustersUIDWorkloadsCronJobParams) (*V1DashboardSpectroClustersUIDWorkloadsCronJobOK, error) + + V1DashboardSpectroClustersUIDWorkloadsDaemonSet(params *V1DashboardSpectroClustersUIDWorkloadsDaemonSetParams) (*V1DashboardSpectroClustersUIDWorkloadsDaemonSetOK, error) + + V1DashboardSpectroClustersUIDWorkloadsDeployment(params *V1DashboardSpectroClustersUIDWorkloadsDeploymentParams) (*V1DashboardSpectroClustersUIDWorkloadsDeploymentOK, error) + + V1DashboardSpectroClustersUIDWorkloadsJob(params *V1DashboardSpectroClustersUIDWorkloadsJobParams) (*V1DashboardSpectroClustersUIDWorkloadsJobOK, error) + + V1DashboardSpectroClustersUIDWorkloadsNamespace(params *V1DashboardSpectroClustersUIDWorkloadsNamespaceParams) (*V1DashboardSpectroClustersUIDWorkloadsNamespaceOK, error) + + V1DashboardSpectroClustersUIDWorkloadsPod(params *V1DashboardSpectroClustersUIDWorkloadsPodParams) (*V1DashboardSpectroClustersUIDWorkloadsPodOK, error) + + V1DashboardSpectroClustersUIDWorkloadsRoleBinding(params *V1DashboardSpectroClustersUIDWorkloadsRoleBindingParams) (*V1DashboardSpectroClustersUIDWorkloadsRoleBindingOK, error) + + V1DashboardSpectroClustersUIDWorkloadsStatefulSet(params *V1DashboardSpectroClustersUIDWorkloadsStatefulSetParams) (*V1DashboardSpectroClustersUIDWorkloadsStatefulSetOK, error) + + V1DashboardWorkspacesList(params *V1DashboardWorkspacesListParams) (*V1DashboardWorkspacesListOK, error) + + V1DashboardWorkspacesUIDSpectroClustersWorkloadsClusterRoleBinding(params *V1DashboardWorkspacesUIDSpectroClustersWorkloadsClusterRoleBindingParams) (*V1DashboardWorkspacesUIDSpectroClustersWorkloadsClusterRoleBindingOK, error) + + V1DashboardWorkspacesUIDSpectroClustersWorkloadsCronJob(params *V1DashboardWorkspacesUIDSpectroClustersWorkloadsCronJobParams) (*V1DashboardWorkspacesUIDSpectroClustersWorkloadsCronJobOK, error) + + V1DashboardWorkspacesUIDSpectroClustersWorkloadsDaemonSet(params *V1DashboardWorkspacesUIDSpectroClustersWorkloadsDaemonSetParams) (*V1DashboardWorkspacesUIDSpectroClustersWorkloadsDaemonSetOK, error) + + V1DashboardWorkspacesUIDSpectroClustersWorkloadsDeployment(params *V1DashboardWorkspacesUIDSpectroClustersWorkloadsDeploymentParams) (*V1DashboardWorkspacesUIDSpectroClustersWorkloadsDeploymentOK, error) + + V1DashboardWorkspacesUIDSpectroClustersWorkloadsJob(params *V1DashboardWorkspacesUIDSpectroClustersWorkloadsJobParams) (*V1DashboardWorkspacesUIDSpectroClustersWorkloadsJobOK, error) + + V1DashboardWorkspacesUIDSpectroClustersWorkloadsNamespace(params *V1DashboardWorkspacesUIDSpectroClustersWorkloadsNamespaceParams) (*V1DashboardWorkspacesUIDSpectroClustersWorkloadsNamespaceOK, error) + + V1DashboardWorkspacesUIDSpectroClustersWorkloadsPod(params *V1DashboardWorkspacesUIDSpectroClustersWorkloadsPodParams) (*V1DashboardWorkspacesUIDSpectroClustersWorkloadsPodOK, error) + + V1DashboardWorkspacesUIDSpectroClustersWorkloadsRoleBinding(params *V1DashboardWorkspacesUIDSpectroClustersWorkloadsRoleBindingParams) (*V1DashboardWorkspacesUIDSpectroClustersWorkloadsRoleBindingOK, error) + + V1DashboardWorkspacesUIDSpectroClustersWorkloadsStatefulSet(params *V1DashboardWorkspacesUIDSpectroClustersWorkloadsStatefulSetParams) (*V1DashboardWorkspacesUIDSpectroClustersWorkloadsStatefulSetOK, error) + + V1EcrRegistriesCreate(params *V1EcrRegistriesCreateParams) (*V1EcrRegistriesCreateCreated, error) + + V1EcrRegistriesUIDDelete(params *V1EcrRegistriesUIDDeleteParams) (*V1EcrRegistriesUIDDeleteNoContent, error) + + V1EcrRegistriesUIDGet(params *V1EcrRegistriesUIDGetParams) (*V1EcrRegistriesUIDGetOK, error) + + V1EcrRegistriesUIDSync(params *V1EcrRegistriesUIDSyncParams) (*V1EcrRegistriesUIDSyncAccepted, error) + + V1EcrRegistriesUIDSyncStatus(params *V1EcrRegistriesUIDSyncStatusParams) (*V1EcrRegistriesUIDSyncStatusOK, error) + + V1EcrRegistriesUIDUpdate(params *V1EcrRegistriesUIDUpdateParams) (*V1EcrRegistriesUIDUpdateNoContent, error) + + V1EcrRegistriesValidate(params *V1EcrRegistriesValidateParams) (*V1EcrRegistriesValidateNoContent, error) + + V1EdgeHostDeviceHostCheckSumUpdate(params *V1EdgeHostDeviceHostCheckSumUpdateParams) (*V1EdgeHostDeviceHostCheckSumUpdateNoContent, error) + + V1EdgeHostDeviceHostPairingKeyUpdate(params *V1EdgeHostDeviceHostPairingKeyUpdateParams) (*V1EdgeHostDeviceHostPairingKeyUpdateNoContent, error) + + V1EdgeHostDevicesCreate(params *V1EdgeHostDevicesCreateParams) (*V1EdgeHostDevicesCreateCreated, error) + + V1EdgeHostDevicesHealthUpdate(params *V1EdgeHostDevicesHealthUpdateParams) (*V1EdgeHostDevicesHealthUpdateNoContent, error) + + V1EdgeHostDevicesRegister(params *V1EdgeHostDevicesRegisterParams) (*V1EdgeHostDevicesRegisterOK, error) + + V1EdgeHostDevicesUIDClusterAssociate(params *V1EdgeHostDevicesUIDClusterAssociateParams) (*V1EdgeHostDevicesUIDClusterAssociateNoContent, error) + + V1EdgeHostDevicesUIDClusterDeassociate(params *V1EdgeHostDevicesUIDClusterDeassociateParams) (*V1EdgeHostDevicesUIDClusterDeassociateNoContent, error) + + V1EdgeHostDevicesUIDDelete(params *V1EdgeHostDevicesUIDDeleteParams) (*V1EdgeHostDevicesUIDDeleteNoContent, error) + + V1EdgeHostDevicesUIDGet(params *V1EdgeHostDevicesUIDGetParams) (*V1EdgeHostDevicesUIDGetOK, error) + + V1EdgeHostDevicesUIDMetaUpdate(params *V1EdgeHostDevicesUIDMetaUpdateParams) (*V1EdgeHostDevicesUIDMetaUpdateNoContent, error) + + V1EdgeHostDevicesUIDPackManifestsUIDGet(params *V1EdgeHostDevicesUIDPackManifestsUIDGetParams) (*V1EdgeHostDevicesUIDPackManifestsUIDGetOK, error) + + V1EdgeHostDevicesUIDPacksStatusPatch(params *V1EdgeHostDevicesUIDPacksStatusPatchParams) (*V1EdgeHostDevicesUIDPacksStatusPatchNoContent, error) + + V1EdgeHostDevicesUIDProfilesGet(params *V1EdgeHostDevicesUIDProfilesGetParams) (*V1EdgeHostDevicesUIDProfilesGetOK, error) + + V1EdgeHostDevicesUIDProfilesUpdate(params *V1EdgeHostDevicesUIDProfilesUpdateParams) (*V1EdgeHostDevicesUIDProfilesUpdateNoContent, error) + + V1EdgeHostDevicesUIDSpcDownload(params *V1EdgeHostDevicesUIDSpcDownloadParams, writer io.Writer) (*V1EdgeHostDevicesUIDSpcDownloadOK, error) + + V1EdgeHostDevicesUIDUpdate(params *V1EdgeHostDevicesUIDUpdateParams) (*V1EdgeHostDevicesUIDUpdateNoContent, error) + + V1EdgeHostDevicesUIDVspherePropertiesUpdate(params *V1EdgeHostDevicesUIDVspherePropertiesUpdateParams) (*V1EdgeHostDevicesUIDVspherePropertiesUpdateNoContent, error) + + V1EdgeHostsMetadata(params *V1EdgeHostsMetadataParams) (*V1EdgeHostsMetadataOK, error) + + V1EdgeHostsMetadataQuickFilterGet(params *V1EdgeHostsMetadataQuickFilterGetParams) (*V1EdgeHostsMetadataQuickFilterGetOK, error) + + V1EdgeHostsTagsGet(params *V1EdgeHostsTagsGetParams) (*V1EdgeHostsTagsGetOK, error) + + V1EdgeNativeClustersHostsList(params *V1EdgeNativeClustersHostsListParams) (*V1EdgeNativeClustersHostsListOK, error) + + V1EdgeTokensCreate(params *V1EdgeTokensCreateParams) (*V1EdgeTokensCreateCreated, error) + + V1EdgeTokensList(params *V1EdgeTokensListParams) (*V1EdgeTokensListOK, error) + + V1EdgeTokensUIDDelete(params *V1EdgeTokensUIDDeleteParams) (*V1EdgeTokensUIDDeleteNoContent, error) + + V1EdgeTokensUIDGet(params *V1EdgeTokensUIDGetParams) (*V1EdgeTokensUIDGetOK, error) + + V1EdgeTokensUIDState(params *V1EdgeTokensUIDStateParams) (*V1EdgeTokensUIDStateNoContent, error) + + V1EdgeTokensUIDUpdate(params *V1EdgeTokensUIDUpdateParams) (*V1EdgeTokensUIDUpdateNoContent, error) + + V1EventsComponentsCreate(params *V1EventsComponentsCreateParams) (*V1EventsComponentsCreateCreated, error) + + V1EventsComponentsCreateBulk(params *V1EventsComponentsCreateBulkParams) (*V1EventsComponentsCreateBulkCreated, error) + + V1EventsComponentsList(params *V1EventsComponentsListParams) (*V1EventsComponentsListOK, error) + + V1EventsComponentsObjTypeUIDDelete(params *V1EventsComponentsObjTypeUIDDeleteParams) (*V1EventsComponentsObjTypeUIDDeleteNoContent, error) + + V1EventsComponentsObjTypeUIDList(params *V1EventsComponentsObjTypeUIDListParams) (*V1EventsComponentsObjTypeUIDListOK, error) + + V1FeaturesList(params *V1FeaturesListParams) (*V1FeaturesListOK, error) + + V1FeaturesUpdate(params *V1FeaturesUpdateParams) (*V1FeaturesUpdateNoContent, error) + + V1FiltersList(params *V1FiltersListParams) (*V1FiltersListOK, error) + + V1FiltersMetadata(params *V1FiltersMetadataParams) (*V1FiltersMetadataOK, error) + + V1InvoicesUIDGet(params *V1InvoicesUIDGetParams) (*V1InvoicesUIDGetOK, error) + + V1MaasAccountsUIDAzs(params *V1MaasAccountsUIDAzsParams) (*V1MaasAccountsUIDAzsOK, error) + + V1MaasAccountsUIDDomains(params *V1MaasAccountsUIDDomainsParams) (*V1MaasAccountsUIDDomainsOK, error) + + V1MaasAccountsUIDPools(params *V1MaasAccountsUIDPoolsParams) (*V1MaasAccountsUIDPoolsOK, error) + + V1MaasAccountsUIDSubnets(params *V1MaasAccountsUIDSubnetsParams) (*V1MaasAccountsUIDSubnetsOK, error) + + V1MaasAccountsUIDTags(params *V1MaasAccountsUIDTagsParams) (*V1MaasAccountsUIDTagsOK, error) + + V1MacrosList(params *V1MacrosListParams) (*V1MacrosListOK, error) + + V1MetricsList(params *V1MetricsListParams) (*V1MetricsListOK, error) + + V1MetricsUIDDelete(params *V1MetricsUIDDeleteParams) (*V1MetricsUIDDeleteNoContent, error) + + V1MetricsUIDList(params *V1MetricsUIDListParams) (*V1MetricsUIDListOK, error) + + V1NotificationsEventCreate(params *V1NotificationsEventCreateParams) (*V1NotificationsEventCreateCreated, error) + + V1NotificationsList(params *V1NotificationsListParams) (*V1NotificationsListOK, error) + + V1NotificationsObjTypeUIDList(params *V1NotificationsObjTypeUIDListParams) (*V1NotificationsObjTypeUIDListOK, error) + + V1NotificationsUIDAck(params *V1NotificationsUIDAckParams) (*V1NotificationsUIDAckNoContent, error) + + V1NotificationsUIDDone(params *V1NotificationsUIDDoneParams) (*V1NotificationsUIDDoneNoContent, error) + + V1OciImageRegistryGet(params *V1OciImageRegistryGetParams) (*V1OciImageRegistryGetOK, error) + + V1OciRegistriesGet(params *V1OciRegistriesGetParams) (*V1OciRegistriesGetOK, error) + + V1OciRegistriesSummary(params *V1OciRegistriesSummaryParams) (*V1OciRegistriesSummaryOK, error) + + V1OpenstackAccountsUIDAzs(params *V1OpenstackAccountsUIDAzsParams) (*V1OpenstackAccountsUIDAzsOK, error) + + V1OpenstackAccountsUIDFlavors(params *V1OpenstackAccountsUIDFlavorsParams) (*V1OpenstackAccountsUIDFlavorsOK, error) + + V1OpenstackAccountsUIDKeypairs(params *V1OpenstackAccountsUIDKeypairsParams) (*V1OpenstackAccountsUIDKeypairsOK, error) + + V1OpenstackAccountsUIDNetworks(params *V1OpenstackAccountsUIDNetworksParams) (*V1OpenstackAccountsUIDNetworksOK, error) + + V1OpenstackAccountsUIDProjects(params *V1OpenstackAccountsUIDProjectsParams) (*V1OpenstackAccountsUIDProjectsOK, error) + + V1OpenstackAccountsUIDRegions(params *V1OpenstackAccountsUIDRegionsParams) (*V1OpenstackAccountsUIDRegionsOK, error) + + V1OverlordsList(params *V1OverlordsListParams) (*V1OverlordsListOK, error) + + V1OverlordsOpenStackManifest(params *V1OverlordsOpenStackManifestParams) (*V1OverlordsOpenStackManifestOK, error) + + V1OverlordsPairingCode(params *V1OverlordsPairingCodeParams) (*V1OverlordsPairingCodeOK, error) + + V1OverlordsUIDDelete(params *V1OverlordsUIDDeleteParams) (*V1OverlordsUIDDeleteOK, error) + + V1OverlordsUIDGet(params *V1OverlordsUIDGetParams) (*V1OverlordsUIDGetOK, error) + + V1OverlordsUIDMaasAccountCreate(params *V1OverlordsUIDMaasAccountCreateParams) (*V1OverlordsUIDMaasAccountCreateCreated, error) + + V1OverlordsUIDMaasAccountUpdate(params *V1OverlordsUIDMaasAccountUpdateParams) (*V1OverlordsUIDMaasAccountUpdateNoContent, error) + + V1OverlordsUIDMaasAccountValidate(params *V1OverlordsUIDMaasAccountValidateParams) (*V1OverlordsUIDMaasAccountValidateNoContent, error) + + V1OverlordsUIDMaasClusterProfile(params *V1OverlordsUIDMaasClusterProfileParams) (*V1OverlordsUIDMaasClusterProfileOK, error) + + V1OverlordsUIDMetadataUpdate(params *V1OverlordsUIDMetadataUpdateParams) (*V1OverlordsUIDMetadataUpdateNoContent, error) + + V1OverlordsUIDOpenStackAccountCreate(params *V1OverlordsUIDOpenStackAccountCreateParams) (*V1OverlordsUIDOpenStackAccountCreateCreated, error) + + V1OverlordsUIDOpenStackAccountUpdate(params *V1OverlordsUIDOpenStackAccountUpdateParams) (*V1OverlordsUIDOpenStackAccountUpdateNoContent, error) + + V1OverlordsUIDOpenStackAccountValidate(params *V1OverlordsUIDOpenStackAccountValidateParams) (*V1OverlordsUIDOpenStackAccountValidateNoContent, error) + + V1OverlordsUIDOpenStackCloudConfigCreate(params *V1OverlordsUIDOpenStackCloudConfigCreateParams) (*V1OverlordsUIDOpenStackCloudConfigCreateCreated, error) + + V1OverlordsUIDOpenStackCloudConfigUpdate(params *V1OverlordsUIDOpenStackCloudConfigUpdateParams) (*V1OverlordsUIDOpenStackCloudConfigUpdateNoContent, error) + + V1OverlordsUIDOpenStackClusterProfile(params *V1OverlordsUIDOpenStackClusterProfileParams) (*V1OverlordsUIDOpenStackClusterProfileOK, error) + + V1OverlordsUIDPoolCreate(params *V1OverlordsUIDPoolCreateParams) (*V1OverlordsUIDPoolCreateCreated, error) + + V1OverlordsUIDPoolDelete(params *V1OverlordsUIDPoolDeleteParams) (*V1OverlordsUIDPoolDeleteNoContent, error) + + V1OverlordsUIDPoolUpdate(params *V1OverlordsUIDPoolUpdateParams) (*V1OverlordsUIDPoolUpdateNoContent, error) + + V1OverlordsUIDPoolsList(params *V1OverlordsUIDPoolsListParams) (*V1OverlordsUIDPoolsListOK, error) + + V1OverlordsUIDReset(params *V1OverlordsUIDResetParams) (*V1OverlordsUIDResetOK, error) + + V1OverlordsUIDVsphereAccountCreate(params *V1OverlordsUIDVsphereAccountCreateParams) (*V1OverlordsUIDVsphereAccountCreateCreated, error) + + V1OverlordsUIDVsphereAccountUpdate(params *V1OverlordsUIDVsphereAccountUpdateParams) (*V1OverlordsUIDVsphereAccountUpdateNoContent, error) + + V1OverlordsUIDVsphereAccountValidate(params *V1OverlordsUIDVsphereAccountValidateParams) (*V1OverlordsUIDVsphereAccountValidateNoContent, error) + + V1OverlordsUIDVsphereCloudConfigCreate(params *V1OverlordsUIDVsphereCloudConfigCreateParams) (*V1OverlordsUIDVsphereCloudConfigCreateCreated, error) + + V1OverlordsUIDVsphereCloudConfigUpdate(params *V1OverlordsUIDVsphereCloudConfigUpdateParams) (*V1OverlordsUIDVsphereCloudConfigUpdateNoContent, error) + + V1OverlordsUIDVsphereClusterProfile(params *V1OverlordsUIDVsphereClusterProfileParams) (*V1OverlordsUIDVsphereClusterProfileOK, error) + + V1OverlordsUIDVsphereComputeclusterRes(params *V1OverlordsUIDVsphereComputeclusterResParams) (*V1OverlordsUIDVsphereComputeclusterResOK, error) + + V1OverlordsUIDVsphereDatacenters(params *V1OverlordsUIDVsphereDatacentersParams) (*V1OverlordsUIDVsphereDatacentersOK, error) + + V1OverlordsVsphereManifest(params *V1OverlordsVsphereManifestParams) (*V1OverlordsVsphereManifestOK, error) + + V1OverlordsVsphereOvaGet(params *V1OverlordsVsphereOvaGetParams) (*V1OverlordsVsphereOvaGetOK, error) + + V1PacksNameRegistryUIDList(params *V1PacksNameRegistryUIDListParams) (*V1PacksNameRegistryUIDListOK, error) + + V1PacksPackUIDLogo(params *V1PacksPackUIDLogoParams, writer io.Writer) (*V1PacksPackUIDLogoOK, error) + + V1PacksSearch(params *V1PacksSearchParams) (*V1PacksSearchOK, error) + + V1PacksSummaryDelete(params *V1PacksSummaryDeleteParams) (*V1PacksSummaryDeleteOK, error) + + V1PacksSummaryList(params *V1PacksSummaryListParams) (*V1PacksSummaryListOK, error) + + V1PacksUID(params *V1PacksUIDParams) (*V1PacksUIDOK, error) + + V1PacksUIDReadme(params *V1PacksUIDReadmeParams) (*V1PacksUIDReadmeOK, error) + + V1PasswordActivate(params *V1PasswordActivateParams) (*V1PasswordActivateNoContent, error) + + V1PasswordReset(params *V1PasswordResetParams) (*V1PasswordResetNoContent, error) + + V1PasswordResetRequest(params *V1PasswordResetRequestParams) (*V1PasswordResetRequestNoContent, error) + + V1PatchTenantAddress(params *V1PatchTenantAddressParams) (*V1PatchTenantAddressNoContent, error) + + V1PatchTenantEmailID(params *V1PatchTenantEmailIDParams) (*V1PatchTenantEmailIDNoContent, error) + + V1PcgSelfHosted(params *V1PcgSelfHostedParams) (*V1PcgSelfHostedOK, error) + + V1PcgUIDAllyManifestGet(params *V1PcgUIDAllyManifestGetParams, writer io.Writer) (*V1PcgUIDAllyManifestGetOK, error) + + V1PcgUIDJetManifestGet(params *V1PcgUIDJetManifestGetParams, writer io.Writer) (*V1PcgUIDJetManifestGetOK, error) + + V1PcgUIDRegister(params *V1PcgUIDRegisterParams) (*V1PcgUIDRegisterNoContent, error) + + V1PermissionsList(params *V1PermissionsListParams) (*V1PermissionsListOK, error) + + V1ProjectClusterSettingsGet(params *V1ProjectClusterSettingsGetParams) (*V1ProjectClusterSettingsGetOK, error) + + V1ProjectClustersNodesAutoRemediationSettingUpdate(params *V1ProjectClustersNodesAutoRemediationSettingUpdateParams) (*V1ProjectClustersNodesAutoRemediationSettingUpdateNoContent, error) + + V1ProjectsAlerts(params *V1ProjectsAlertsParams) (*V1ProjectsAlertsOK, error) + + V1ProjectsCreate(params *V1ProjectsCreateParams) (*V1ProjectsCreateCreated, error) + + V1ProjectsFilterSummary(params *V1ProjectsFilterSummaryParams) (*V1ProjectsFilterSummaryOK, error) + + V1ProjectsMetadata(params *V1ProjectsMetadataParams) (*V1ProjectsMetadataOK, error) + + V1ProjectsUIDAlertCreate(params *V1ProjectsUIDAlertCreateParams) (*V1ProjectsUIDAlertCreateCreated, error) + + V1ProjectsUIDAlertDelete(params *V1ProjectsUIDAlertDeleteParams) (*V1ProjectsUIDAlertDeleteNoContent, error) + + V1ProjectsUIDAlertUpdate(params *V1ProjectsUIDAlertUpdateParams) (*V1ProjectsUIDAlertUpdateNoContent, error) + + V1ProjectsUIDAlertsUIDDelete(params *V1ProjectsUIDAlertsUIDDeleteParams) (*V1ProjectsUIDAlertsUIDDeleteNoContent, error) + + V1ProjectsUIDAlertsUIDGet(params *V1ProjectsUIDAlertsUIDGetParams) (*V1ProjectsUIDAlertsUIDGetOK, error) + + V1ProjectsUIDAlertsUIDUpdate(params *V1ProjectsUIDAlertsUIDUpdateParams) (*V1ProjectsUIDAlertsUIDUpdateNoContent, error) + + V1ProjectsUIDDelete(params *V1ProjectsUIDDeleteParams) (*V1ProjectsUIDDeleteNoContent, error) + + V1ProjectsUIDGet(params *V1ProjectsUIDGetParams) (*V1ProjectsUIDGetOK, error) + + V1ProjectsUIDMacrosCreate(params *V1ProjectsUIDMacrosCreateParams) (*V1ProjectsUIDMacrosCreateNoContent, error) + + V1ProjectsUIDMacrosDeleteByMacroName(params *V1ProjectsUIDMacrosDeleteByMacroNameParams) (*V1ProjectsUIDMacrosDeleteByMacroNameNoContent, error) + + V1ProjectsUIDMacrosList(params *V1ProjectsUIDMacrosListParams) (*V1ProjectsUIDMacrosListOK, error) + + V1ProjectsUIDMacrosUpdate(params *V1ProjectsUIDMacrosUpdateParams) (*V1ProjectsUIDMacrosUpdateNoContent, error) + + V1ProjectsUIDMacrosUpdateByMacroName(params *V1ProjectsUIDMacrosUpdateByMacroNameParams) (*V1ProjectsUIDMacrosUpdateByMacroNameNoContent, error) + + V1ProjectsUIDMetaUpdate(params *V1ProjectsUIDMetaUpdateParams) (*V1ProjectsUIDMetaUpdateNoContent, error) + + V1ProjectsUIDTeamsUpdate(params *V1ProjectsUIDTeamsUpdateParams) (*V1ProjectsUIDTeamsUpdateNoContent, error) + + V1ProjectsUIDUpdate(params *V1ProjectsUIDUpdateParams) (*V1ProjectsUIDUpdateNoContent, error) + + V1ProjectsUIDUsersUpdate(params *V1ProjectsUIDUsersUpdateParams) (*V1ProjectsUIDUsersUpdateNoContent, error) + + V1ProjectsUIDValidate(params *V1ProjectsUIDValidateParams) (*V1ProjectsUIDValidateOK, error) + + V1RateConfigGet(params *V1RateConfigGetParams) (*V1RateConfigGetOK, error) + + V1RateConfigUpdate(params *V1RateConfigUpdateParams) (*V1RateConfigUpdateNoContent, error) + + V1RegistriesHelmCreate(params *V1RegistriesHelmCreateParams) (*V1RegistriesHelmCreateCreated, error) + + V1RegistriesHelmList(params *V1RegistriesHelmListParams) (*V1RegistriesHelmListOK, error) + + V1RegistriesHelmSummaryList(params *V1RegistriesHelmSummaryListParams) (*V1RegistriesHelmSummaryListOK, error) + + V1RegistriesHelmUIDDelete(params *V1RegistriesHelmUIDDeleteParams) (*V1RegistriesHelmUIDDeleteNoContent, error) + + V1RegistriesHelmUIDGet(params *V1RegistriesHelmUIDGetParams) (*V1RegistriesHelmUIDGetOK, error) + + V1RegistriesHelmUIDSync(params *V1RegistriesHelmUIDSyncParams) (*V1RegistriesHelmUIDSyncAccepted, error) + + V1RegistriesHelmUIDSyncStatus(params *V1RegistriesHelmUIDSyncStatusParams) (*V1RegistriesHelmUIDSyncStatusOK, error) + + V1RegistriesHelmUIDUpdate(params *V1RegistriesHelmUIDUpdateParams) (*V1RegistriesHelmUIDUpdateNoContent, error) + + V1RegistriesMetadata(params *V1RegistriesMetadataParams) (*V1RegistriesMetadataOK, error) + + V1RegistriesNameConfigGet(params *V1RegistriesNameConfigGetParams) (*V1RegistriesNameConfigGetOK, error) + + V1RegistriesPackCreate(params *V1RegistriesPackCreateParams) (*V1RegistriesPackCreateCreated, error) + + V1RegistriesPackList(params *V1RegistriesPackListParams) (*V1RegistriesPackListOK, error) + + V1RegistriesPackSummaryList(params *V1RegistriesPackSummaryListParams) (*V1RegistriesPackSummaryListOK, error) + + V1RegistriesPackUIDDelete(params *V1RegistriesPackUIDDeleteParams) (*V1RegistriesPackUIDDeleteNoContent, error) + + V1RegistriesPackUIDGet(params *V1RegistriesPackUIDGetParams) (*V1RegistriesPackUIDGetOK, error) + + V1RegistriesPackUIDSync(params *V1RegistriesPackUIDSyncParams) (*V1RegistriesPackUIDSyncAccepted, error) + + V1RegistriesPackUIDSyncStatus(params *V1RegistriesPackUIDSyncStatusParams) (*V1RegistriesPackUIDSyncStatusOK, error) + + V1RegistriesPackUIDUpdate(params *V1RegistriesPackUIDUpdateParams) (*V1RegistriesPackUIDUpdateNoContent, error) + + V1RegistriesUIDDelete(params *V1RegistriesUIDDeleteParams) (*V1RegistriesUIDDeleteNoContent, error) + + V1RolesClone(params *V1RolesCloneParams) (*V1RolesCloneCreated, error) + + V1RolesCreate(params *V1RolesCreateParams) (*V1RolesCreateCreated, error) + + V1RolesList(params *V1RolesListParams) (*V1RolesListOK, error) + + V1RolesUIDDelete(params *V1RolesUIDDeleteParams) (*V1RolesUIDDeleteNoContent, error) + + V1RolesUIDGet(params *V1RolesUIDGetParams) (*V1RolesUIDGetOK, error) + + V1RolesUIDUpdate(params *V1RolesUIDUpdateParams) (*V1RolesUIDUpdateNoContent, error) + + V1ServiceManifestGet(params *V1ServiceManifestGetParams) (*V1ServiceManifestGetOK, error) + + V1ServiceVersionGet(params *V1ServiceVersionGetParams) (*V1ServiceVersionGetOK, error) + + V1SpectroClustersAksCreate(params *V1SpectroClustersAksCreateParams) (*V1SpectroClustersAksCreateCreated, error) + + V1SpectroClustersAksRate(params *V1SpectroClustersAksRateParams) (*V1SpectroClustersAksRateOK, error) + + V1SpectroClustersAksValidate(params *V1SpectroClustersAksValidateParams) (*V1SpectroClustersAksValidateOK, error) + + V1SpectroClustersAwsCreate(params *V1SpectroClustersAwsCreateParams) (*V1SpectroClustersAwsCreateCreated, error) + + V1SpectroClustersAwsImport(params *V1SpectroClustersAwsImportParams) (*V1SpectroClustersAwsImportCreated, error) + + V1SpectroClustersAwsRate(params *V1SpectroClustersAwsRateParams) (*V1SpectroClustersAwsRateOK, error) + + V1SpectroClustersAwsValidate(params *V1SpectroClustersAwsValidateParams) (*V1SpectroClustersAwsValidateOK, error) + + V1SpectroClustersAzureCreate(params *V1SpectroClustersAzureCreateParams) (*V1SpectroClustersAzureCreateCreated, error) + + V1SpectroClustersAzureImport(params *V1SpectroClustersAzureImportParams) (*V1SpectroClustersAzureImportCreated, error) + + V1SpectroClustersAzureRate(params *V1SpectroClustersAzureRateParams) (*V1SpectroClustersAzureRateOK, error) + + V1SpectroClustersAzureValidate(params *V1SpectroClustersAzureValidateParams) (*V1SpectroClustersAzureValidateOK, error) + + V1SpectroClustersCertificatesRenew(params *V1SpectroClustersCertificatesRenewParams) (*V1SpectroClustersCertificatesRenewNoContent, error) + + V1SpectroClustersConfigEdgeInstaller(params *V1SpectroClustersConfigEdgeInstallerParams) (*V1SpectroClustersConfigEdgeInstallerOK, error) + + V1SpectroClustersCustomCreate(params *V1SpectroClustersCustomCreateParams) (*V1SpectroClustersCustomCreateCreated, error) + + V1SpectroClustersCustomValidate(params *V1SpectroClustersCustomValidateParams) (*V1SpectroClustersCustomValidateOK, error) + + V1SpectroClustersDelete(params *V1SpectroClustersDeleteParams) (*V1SpectroClustersDeleteNoContent, error) + + V1SpectroClustersDeleteProfiles(params *V1SpectroClustersDeleteProfilesParams) (*V1SpectroClustersDeleteProfilesNoContent, error) + + V1SpectroClustersEdgeNativeCreate(params *V1SpectroClustersEdgeNativeCreateParams) (*V1SpectroClustersEdgeNativeCreateCreated, error) + + V1SpectroClustersEdgeNativeImport(params *V1SpectroClustersEdgeNativeImportParams) (*V1SpectroClustersEdgeNativeImportCreated, error) + + V1SpectroClustersEdgeNativeRate(params *V1SpectroClustersEdgeNativeRateParams) (*V1SpectroClustersEdgeNativeRateOK, error) + + V1SpectroClustersEdgeNativeValidate(params *V1SpectroClustersEdgeNativeValidateParams) (*V1SpectroClustersEdgeNativeValidateOK, error) + + V1SpectroClustersEksCreate(params *V1SpectroClustersEksCreateParams) (*V1SpectroClustersEksCreateCreated, error) + + V1SpectroClustersEksRate(params *V1SpectroClustersEksRateParams) (*V1SpectroClustersEksRateOK, error) + + V1SpectroClustersEksValidate(params *V1SpectroClustersEksValidateParams) (*V1SpectroClustersEksValidateOK, error) + + V1SpectroClustersFiltersWorkspace(params *V1SpectroClustersFiltersWorkspaceParams) (*V1SpectroClustersFiltersWorkspaceOK, error) + + V1SpectroClustersGcpCreate(params *V1SpectroClustersGcpCreateParams) (*V1SpectroClustersGcpCreateCreated, error) + + V1SpectroClustersGcpImport(params *V1SpectroClustersGcpImportParams) (*V1SpectroClustersGcpImportCreated, error) + + V1SpectroClustersGcpRate(params *V1SpectroClustersGcpRateParams) (*V1SpectroClustersGcpRateOK, error) + + V1SpectroClustersGcpValidate(params *V1SpectroClustersGcpValidateParams) (*V1SpectroClustersGcpValidateOK, error) + + V1SpectroClustersGenericImport(params *V1SpectroClustersGenericImportParams) (*V1SpectroClustersGenericImportCreated, error) + + V1SpectroClustersGenericRate(params *V1SpectroClustersGenericRateParams) (*V1SpectroClustersGenericRateOK, error) + + V1SpectroClustersGet(params *V1SpectroClustersGetParams) (*V1SpectroClustersGetOK, error) + + V1SpectroClustersGetProfileUpdates(params *V1SpectroClustersGetProfileUpdatesParams) (*V1SpectroClustersGetProfileUpdatesOK, error) + + V1SpectroClustersGetProfiles(params *V1SpectroClustersGetProfilesParams) (*V1SpectroClustersGetProfilesOK, error) + + V1SpectroClustersGetProfilesPacksManifests(params *V1SpectroClustersGetProfilesPacksManifestsParams) (*V1SpectroClustersGetProfilesPacksManifestsOK, error) + + V1SpectroClustersGkeCreate(params *V1SpectroClustersGkeCreateParams) (*V1SpectroClustersGkeCreateCreated, error) + + V1SpectroClustersGkeRate(params *V1SpectroClustersGkeRateParams) (*V1SpectroClustersGkeRateOK, error) + + V1SpectroClustersGkeValidate(params *V1SpectroClustersGkeValidateParams) (*V1SpectroClustersGkeValidateOK, error) + + V1SpectroClustersK8Certificate(params *V1SpectroClustersK8CertificateParams) (*V1SpectroClustersK8CertificateOK, error) + + V1SpectroClustersMaasCreate(params *V1SpectroClustersMaasCreateParams) (*V1SpectroClustersMaasCreateCreated, error) + + V1SpectroClustersMaasImport(params *V1SpectroClustersMaasImportParams) (*V1SpectroClustersMaasImportCreated, error) + + V1SpectroClustersMaasRate(params *V1SpectroClustersMaasRateParams) (*V1SpectroClustersMaasRateOK, error) + + V1SpectroClustersMaasValidate(params *V1SpectroClustersMaasValidateParams) (*V1SpectroClustersMaasValidateOK, error) + + V1SpectroClustersMetadata(params *V1SpectroClustersMetadataParams) (*V1SpectroClustersMetadataOK, error) + + V1SpectroClustersMetadataGet(params *V1SpectroClustersMetadataGetParams) (*V1SpectroClustersMetadataGetOK, error) + + V1SpectroClustersMetadataSearch(params *V1SpectroClustersMetadataSearchParams) (*V1SpectroClustersMetadataSearchOK, error) + + V1SpectroClustersMetadataSearchSchema(params *V1SpectroClustersMetadataSearchSchemaParams) (*V1SpectroClustersMetadataSearchSchemaOK, error) + + V1SpectroClustersOpenStackCreate(params *V1SpectroClustersOpenStackCreateParams) (*V1SpectroClustersOpenStackCreateCreated, error) + + V1SpectroClustersOpenStackImport(params *V1SpectroClustersOpenStackImportParams) (*V1SpectroClustersOpenStackImportCreated, error) + + V1SpectroClustersOpenStackRate(params *V1SpectroClustersOpenStackRateParams) (*V1SpectroClustersOpenStackRateOK, error) + + V1SpectroClustersOpenStackValidate(params *V1SpectroClustersOpenStackValidateParams) (*V1SpectroClustersOpenStackValidateOK, error) + + V1SpectroClustersPacksRefUpdate(params *V1SpectroClustersPacksRefUpdateParams) (*V1SpectroClustersPacksRefUpdateNoContent, error) + + V1SpectroClustersPatchProfiles(params *V1SpectroClustersPatchProfilesParams) (*V1SpectroClustersPatchProfilesNoContent, error) + + V1SpectroClustersProfilesUIDPackManifestsGet(params *V1SpectroClustersProfilesUIDPackManifestsGetParams) (*V1SpectroClustersProfilesUIDPackManifestsGetOK, error) + + V1SpectroClustersProfilesUIDPackManifestsUpdate(params *V1SpectroClustersProfilesUIDPackManifestsUpdateParams) (*V1SpectroClustersProfilesUIDPackManifestsUpdateNoContent, error) + + V1SpectroClustersResourcesConsumption(params *V1SpectroClustersResourcesConsumptionParams) (*V1SpectroClustersResourcesConsumptionOK, error) + + V1SpectroClustersResourcesCostSummary(params *V1SpectroClustersResourcesCostSummaryParams) (*V1SpectroClustersResourcesCostSummaryOK, error) + + V1SpectroClustersResourcesUsageSummary(params *V1SpectroClustersResourcesUsageSummaryParams) (*V1SpectroClustersResourcesUsageSummaryOK, error) + + V1SpectroClustersSearchFilterSummary(params *V1SpectroClustersSearchFilterSummaryParams) (*V1SpectroClustersSearchFilterSummaryOK, error) + + V1SpectroClustersSearchSchema(params *V1SpectroClustersSearchSchemaParams) (*V1SpectroClustersSearchSchemaOK, error) + + V1SpectroClustersSpcDownload(params *V1SpectroClustersSpcDownloadParams, writer io.Writer) (*V1SpectroClustersSpcDownloadOK, error) + + V1SpectroClustersSummaryUID(params *V1SpectroClustersSummaryUIDParams) (*V1SpectroClustersSummaryUIDOK, error) + + V1SpectroClustersSummaryUIDOverview(params *V1SpectroClustersSummaryUIDOverviewParams) (*V1SpectroClustersSummaryUIDOverviewOK, error) + + V1SpectroClustersTkeCreate(params *V1SpectroClustersTkeCreateParams) (*V1SpectroClustersTkeCreateCreated, error) + + V1SpectroClustersTkeRate(params *V1SpectroClustersTkeRateParams) (*V1SpectroClustersTkeRateOK, error) + + V1SpectroClustersTkeValidate(params *V1SpectroClustersTkeValidateParams) (*V1SpectroClustersTkeValidateOK, error) + + V1SpectroClustersUIDAdminKubeConfig(params *V1SpectroClustersUIDAdminKubeConfigParams, writer io.Writer) (*V1SpectroClustersUIDAdminKubeConfigOK, error) + + V1SpectroClustersUIDAssets(params *V1SpectroClustersUIDAssetsParams) (*V1SpectroClustersUIDAssetsNoContent, error) + + V1SpectroClustersUIDAssetsGet(params *V1SpectroClustersUIDAssetsGetParams) (*V1SpectroClustersUIDAssetsGetOK, error) + + V1SpectroClustersUIDClusterMetaAttributeUpdate(params *V1SpectroClustersUIDClusterMetaAttributeUpdateParams) (*V1SpectroClustersUIDClusterMetaAttributeUpdateNoContent, error) + + V1SpectroClustersUIDConfigNamespacesGet(params *V1SpectroClustersUIDConfigNamespacesGetParams) (*V1SpectroClustersUIDConfigNamespacesGetOK, error) + + V1SpectroClustersUIDConfigNamespacesUIDGet(params *V1SpectroClustersUIDConfigNamespacesUIDGetParams) (*V1SpectroClustersUIDConfigNamespacesUIDGetOK, error) + + V1SpectroClustersUIDConfigNamespacesUIDUpdate(params *V1SpectroClustersUIDConfigNamespacesUIDUpdateParams) (*V1SpectroClustersUIDConfigNamespacesUIDUpdateNoContent, error) + + V1SpectroClustersUIDConfigNamespacesUpdate(params *V1SpectroClustersUIDConfigNamespacesUpdateParams) (*V1SpectroClustersUIDConfigNamespacesUpdateNoContent, error) + + V1SpectroClustersUIDConfigRbacsGet(params *V1SpectroClustersUIDConfigRbacsGetParams) (*V1SpectroClustersUIDConfigRbacsGetOK, error) + + V1SpectroClustersUIDConfigRbacsUIDGet(params *V1SpectroClustersUIDConfigRbacsUIDGetParams) (*V1SpectroClustersUIDConfigRbacsUIDGetOK, error) + + V1SpectroClustersUIDConfigRbacsUIDUpdate(params *V1SpectroClustersUIDConfigRbacsUIDUpdateParams) (*V1SpectroClustersUIDConfigRbacsUIDUpdateNoContent, error) + + V1SpectroClustersUIDConfigRbacsUpdate(params *V1SpectroClustersUIDConfigRbacsUpdateParams) (*V1SpectroClustersUIDConfigRbacsUpdateNoContent, error) + + V1SpectroClustersUIDCostSummary(params *V1SpectroClustersUIDCostSummaryParams) (*V1SpectroClustersUIDCostSummaryOK, error) + + V1SpectroClustersUIDDownload(params *V1SpectroClustersUIDDownloadParams, writer io.Writer) (*V1SpectroClustersUIDDownloadOK, error) + + V1SpectroClustersUIDFrpKubeConfigDelete(params *V1SpectroClustersUIDFrpKubeConfigDeleteParams) (*V1SpectroClustersUIDFrpKubeConfigDeleteNoContent, error) + + V1SpectroClustersUIDFrpKubeConfigGet(params *V1SpectroClustersUIDFrpKubeConfigGetParams, writer io.Writer) (*V1SpectroClustersUIDFrpKubeConfigGetOK, error) + + V1SpectroClustersUIDFrpKubeConfigUpdate(params *V1SpectroClustersUIDFrpKubeConfigUpdateParams) (*V1SpectroClustersUIDFrpKubeConfigUpdateNoContent, error) + + V1SpectroClustersUIDImportManifest(params *V1SpectroClustersUIDImportManifestParams, writer io.Writer) (*V1SpectroClustersUIDImportManifestOK, error) + + V1SpectroClustersUIDImportUpgradePatch(params *V1SpectroClustersUIDImportUpgradePatchParams) (*V1SpectroClustersUIDImportUpgradePatchNoContent, error) + + V1SpectroClustersUIDKubeConfig(params *V1SpectroClustersUIDKubeConfigParams, writer io.Writer) (*V1SpectroClustersUIDKubeConfigOK, error) + + V1SpectroClustersUIDKubeConfigClientDelete(params *V1SpectroClustersUIDKubeConfigClientDeleteParams) (*V1SpectroClustersUIDKubeConfigClientDeleteNoContent, error) + + V1SpectroClustersUIDKubeConfigClientGet(params *V1SpectroClustersUIDKubeConfigClientGetParams, writer io.Writer) (*V1SpectroClustersUIDKubeConfigClientGetOK, error) + + V1SpectroClustersUIDKubeConfigClientUpdate(params *V1SpectroClustersUIDKubeConfigClientUpdateParams) (*V1SpectroClustersUIDKubeConfigClientUpdateNoContent, error) + + V1SpectroClustersUIDKubeConfigUpdate(params *V1SpectroClustersUIDKubeConfigUpdateParams) (*V1SpectroClustersUIDKubeConfigUpdateNoContent, error) + + V1SpectroClustersUIDLifecycleConfigUpdate(params *V1SpectroClustersUIDLifecycleConfigUpdateParams) (*V1SpectroClustersUIDLifecycleConfigUpdateNoContent, error) + + V1SpectroClustersUIDLocationPut(params *V1SpectroClustersUIDLocationPutParams) (*V1SpectroClustersUIDLocationPutNoContent, error) + + V1SpectroClustersUIDManifestGet(params *V1SpectroClustersUIDManifestGetParams) (*V1SpectroClustersUIDManifestGetOK, error) + + V1SpectroClustersUIDManifestUpdate(params *V1SpectroClustersUIDManifestUpdateParams) (*V1SpectroClustersUIDManifestUpdateNoContent, error) + + V1SpectroClustersUIDMetadataUpdate(params *V1SpectroClustersUIDMetadataUpdateParams) (*V1SpectroClustersUIDMetadataUpdateNoContent, error) + + V1SpectroClustersUIDOsPatchUpdate(params *V1SpectroClustersUIDOsPatchUpdateParams) (*V1SpectroClustersUIDOsPatchUpdateNoContent, error) + + V1SpectroClustersUIDPackManifestsUIDGet(params *V1SpectroClustersUIDPackManifestsUIDGetParams) (*V1SpectroClustersUIDPackManifestsUIDGetOK, error) + + V1SpectroClustersUIDPackProperties(params *V1SpectroClustersUIDPackPropertiesParams) (*V1SpectroClustersUIDPackPropertiesOK, error) + + V1SpectroClustersUIDPacksResolvedValuesGet(params *V1SpectroClustersUIDPacksResolvedValuesGetParams) (*V1SpectroClustersUIDPacksResolvedValuesGetOK, error) + + V1SpectroClustersUIDPacksStatusPatch(params *V1SpectroClustersUIDPacksStatusPatchParams) (*V1SpectroClustersUIDPacksStatusPatchNoContent, error) + + V1SpectroClustersUIDProfilesUIDPacksConfigGet(params *V1SpectroClustersUIDProfilesUIDPacksConfigGetParams) (*V1SpectroClustersUIDProfilesUIDPacksConfigGetOK, error) + + V1SpectroClustersUIDRate(params *V1SpectroClustersUIDRateParams) (*V1SpectroClustersUIDRateOK, error) + + V1SpectroClustersUIDRepaveApproveUpdate(params *V1SpectroClustersUIDRepaveApproveUpdateParams) (*V1SpectroClustersUIDRepaveApproveUpdateNoContent, error) + + V1SpectroClustersUIDRepaveGet(params *V1SpectroClustersUIDRepaveGetParams) (*V1SpectroClustersUIDRepaveGetOK, error) + + V1SpectroClustersUIDResourcesConsumption(params *V1SpectroClustersUIDResourcesConsumptionParams) (*V1SpectroClustersUIDResourcesConsumptionOK, error) + + V1SpectroClustersUIDStatus(params *V1SpectroClustersUIDStatusParams) (*V1SpectroClustersUIDStatusOK, error) + + V1SpectroClustersUIDStatusSpcApply(params *V1SpectroClustersUIDStatusSpcApplyParams) (*V1SpectroClustersUIDStatusSpcApplyAccepted, error) + + V1SpectroClustersUIDStatusSpcApplyGet(params *V1SpectroClustersUIDStatusSpcApplyGetParams) (*V1SpectroClustersUIDStatusSpcApplyGetOK, error) + + V1SpectroClustersUIDStatusSpcPatchTime(params *V1SpectroClustersUIDStatusSpcPatchTimeParams) (*V1SpectroClustersUIDStatusSpcPatchTimeNoContent, error) + + V1SpectroClustersUIDUpgradeSettings(params *V1SpectroClustersUIDUpgradeSettingsParams) (*V1SpectroClustersUIDUpgradeSettingsNoContent, error) + + V1SpectroClustersUIDUpgradesPut(params *V1SpectroClustersUIDUpgradesPutParams) (*V1SpectroClustersUIDUpgradesPutNoContent, error) + + V1SpectroClustersUIDValidatePacks(params *V1SpectroClustersUIDValidatePacksParams) (*V1SpectroClustersUIDValidatePacksOK, error) + + V1SpectroClustersUIDValidateRepave(params *V1SpectroClustersUIDValidateRepaveParams) (*V1SpectroClustersUIDValidateRepaveOK, error) + + V1SpectroClustersUIDVariablesGet(params *V1SpectroClustersUIDVariablesGetParams) (*V1SpectroClustersUIDVariablesGetOK, error) + + V1SpectroClustersUIDWorkloadsKindSync(params *V1SpectroClustersUIDWorkloadsKindSyncParams) (*V1SpectroClustersUIDWorkloadsKindSyncAccepted, error) + + V1SpectroClustersUIDWorkloadsSync(params *V1SpectroClustersUIDWorkloadsSyncParams) (*V1SpectroClustersUIDWorkloadsSyncAccepted, error) + + V1SpectroClustersUpdateProfiles(params *V1SpectroClustersUpdateProfilesParams) (*V1SpectroClustersUpdateProfilesNoContent, error) + + V1SpectroClustersUpdateStatusCondition(params *V1SpectroClustersUpdateStatusConditionParams) (*V1SpectroClustersUpdateStatusConditionNoContent, error) + + V1SpectroClustersUpdateStatusConditions(params *V1SpectroClustersUpdateStatusConditionsParams) (*V1SpectroClustersUpdateStatusConditionsNoContent, error) + + V1SpectroClustersUpdateStatusEndpoints(params *V1SpectroClustersUpdateStatusEndpointsParams) (*V1SpectroClustersUpdateStatusEndpointsNoContent, error) + + V1SpectroClustersUpdateStatusImported(params *V1SpectroClustersUpdateStatusImportedParams) (*V1SpectroClustersUpdateStatusImportedNoContent, error) + + V1SpectroClustersUpdateStatusServices(params *V1SpectroClustersUpdateStatusServicesParams) (*V1SpectroClustersUpdateStatusServicesNoContent, error) + + V1SpectroClustersUpgradeSettings(params *V1SpectroClustersUpgradeSettingsParams) (*V1SpectroClustersUpgradeSettingsNoContent, error) + + V1SpectroClustersUpgradeSettingsGet(params *V1SpectroClustersUpgradeSettingsGetParams) (*V1SpectroClustersUpgradeSettingsGetOK, error) + + V1SpectroClustersVMAddVolume(params *V1SpectroClustersVMAddVolumeParams) (*V1SpectroClustersVMAddVolumeNoContent, error) + + V1SpectroClustersVMClone(params *V1SpectroClustersVMCloneParams) (*V1SpectroClustersVMCloneOK, error) + + V1SpectroClustersVMCreate(params *V1SpectroClustersVMCreateParams) (*V1SpectroClustersVMCreateOK, error) + + V1SpectroClustersVMDelete(params *V1SpectroClustersVMDeleteParams) (*V1SpectroClustersVMDeleteNoContent, error) + + V1SpectroClustersVMGet(params *V1SpectroClustersVMGetParams) (*V1SpectroClustersVMGetOK, error) + + V1SpectroClustersVMList(params *V1SpectroClustersVMListParams) (*V1SpectroClustersVMListOK, error) + + V1SpectroClustersVMMigrate(params *V1SpectroClustersVMMigrateParams) (*V1SpectroClustersVMMigrateNoContent, error) + + V1SpectroClustersVMPause(params *V1SpectroClustersVMPauseParams) (*V1SpectroClustersVMPauseNoContent, error) + + V1SpectroClustersVMRemoveVolume(params *V1SpectroClustersVMRemoveVolumeParams) (*V1SpectroClustersVMRemoveVolumeNoContent, error) + + V1SpectroClustersVMRestart(params *V1SpectroClustersVMRestartParams) (*V1SpectroClustersVMRestartNoContent, error) + + V1SpectroClustersVMResume(params *V1SpectroClustersVMResumeParams) (*V1SpectroClustersVMResumeNoContent, error) + + V1SpectroClustersVMStart(params *V1SpectroClustersVMStartParams) (*V1SpectroClustersVMStartNoContent, error) + + V1SpectroClustersVMStop(params *V1SpectroClustersVMStopParams) (*V1SpectroClustersVMStopNoContent, error) + + V1SpectroClustersVMUpdate(params *V1SpectroClustersVMUpdateParams) (*V1SpectroClustersVMUpdateOK, error) + + V1SpectroClustersValidateName(params *V1SpectroClustersValidateNameParams) (*V1SpectroClustersValidateNameNoContent, error) + + V1SpectroClustersValidatePacks(params *V1SpectroClustersValidatePacksParams) (*V1SpectroClustersValidatePacksOK, error) + + V1SpectroClustersVirtualCreate(params *V1SpectroClustersVirtualCreateParams) (*V1SpectroClustersVirtualCreateCreated, error) + + V1SpectroClustersVirtualValidate(params *V1SpectroClustersVirtualValidateParams) (*V1SpectroClustersVirtualValidateOK, error) + + V1SpectroClustersVsphereCreate(params *V1SpectroClustersVsphereCreateParams) (*V1SpectroClustersVsphereCreateCreated, error) + + V1SpectroClustersVsphereImport(params *V1SpectroClustersVsphereImportParams) (*V1SpectroClustersVsphereImportCreated, error) + + V1SpectroClustersVsphereRate(params *V1SpectroClustersVsphereRateParams) (*V1SpectroClustersVsphereRateOK, error) + + V1SpectroClustersVsphereValidate(params *V1SpectroClustersVsphereValidateParams) (*V1SpectroClustersVsphereValidateOK, error) + + V1SyftScanLogImageSBOMGet(params *V1SyftScanLogImageSBOMGetParams, writer io.Writer) (*V1SyftScanLogImageSBOMGetOK, error) + + V1TagFilterUIDDelete(params *V1TagFilterUIDDeleteParams) (*V1TagFilterUIDDeleteNoContent, error) + + V1TagFilterUIDGet(params *V1TagFilterUIDGetParams) (*V1TagFilterUIDGetOK, error) + + V1TagFilterUIDUpdate(params *V1TagFilterUIDUpdateParams) (*V1TagFilterUIDUpdateNoContent, error) + + V1TagFiltersCreate(params *V1TagFiltersCreateParams) (*V1TagFiltersCreateCreated, error) + + V1TeamsCreate(params *V1TeamsCreateParams) (*V1TeamsCreateCreated, error) + + V1TeamsList(params *V1TeamsListParams) (*V1TeamsListOK, error) + + V1TeamsProjectRoles(params *V1TeamsProjectRolesParams) (*V1TeamsProjectRolesOK, error) + + V1TeamsProjectRolesPut(params *V1TeamsProjectRolesPutParams) (*V1TeamsProjectRolesPutNoContent, error) + + V1TeamsResourceRolesUIDUpdate(params *V1TeamsResourceRolesUIDUpdateParams) (*V1TeamsResourceRolesUIDUpdateNoContent, error) + + V1TeamsSummaryGet(params *V1TeamsSummaryGetParams) (*V1TeamsSummaryGetOK, error) + + V1TeamsUIDDelete(params *V1TeamsUIDDeleteParams) (*V1TeamsUIDDeleteNoContent, error) + + V1TeamsUIDGet(params *V1TeamsUIDGetParams) (*V1TeamsUIDGetOK, error) + + V1TeamsUIDPatch(params *V1TeamsUIDPatchParams) (*V1TeamsUIDPatchNoContent, error) + + V1TeamsUIDResourceRoles(params *V1TeamsUIDResourceRolesParams) (*V1TeamsUIDResourceRolesOK, error) + + V1TeamsUIDResourceRolesCreate(params *V1TeamsUIDResourceRolesCreateParams) (*V1TeamsUIDResourceRolesCreateNoContent, error) + + V1TeamsUIDResourceRolesUIDDelete(params *V1TeamsUIDResourceRolesUIDDeleteParams) (*V1TeamsUIDResourceRolesUIDDeleteNoContent, error) + + V1TeamsUIDUpdate(params *V1TeamsUIDUpdateParams) (*V1TeamsUIDUpdateNoContent, error) + + V1TeamsWorkspaceGetRoles(params *V1TeamsWorkspaceGetRolesParams) (*V1TeamsWorkspaceGetRolesOK, error) + + V1TeamsWorkspaceRolesPut(params *V1TeamsWorkspaceRolesPutParams) (*V1TeamsWorkspaceRolesPutNoContent, error) + + V1TenantClusterSettingsGet(params *V1TenantClusterSettingsGetParams) (*V1TenantClusterSettingsGetOK, error) + + V1TenantClustersNodesAutoRemediationSettingUpdate(params *V1TenantClustersNodesAutoRemediationSettingUpdateParams) (*V1TenantClustersNodesAutoRemediationSettingUpdateNoContent, error) + + V1TenantFipsSettingsGet(params *V1TenantFipsSettingsGetParams) (*V1TenantFipsSettingsGetOK, error) + + V1TenantFipsSettingsUpdate(params *V1TenantFipsSettingsUpdateParams) (*V1TenantFipsSettingsUpdateNoContent, error) + + V1TenantFreemiumGet(params *V1TenantFreemiumGetParams) (*V1TenantFreemiumGetOK, error) + + V1TenantFreemiumUpdate(params *V1TenantFreemiumUpdateParams) (*V1TenantFreemiumUpdateNoContent, error) + + V1TenantFreemiumUsageGet(params *V1TenantFreemiumUsageGetParams) (*V1TenantFreemiumUsageGetOK, error) + + V1TenantResourceLimitsGet(params *V1TenantResourceLimitsGetParams) (*V1TenantResourceLimitsGetOK, error) + + V1TenantResourceLimitsUpdate(params *V1TenantResourceLimitsUpdateParams) (*V1TenantResourceLimitsUpdateNoContent, error) + + V1TenantUIDAuthTokenSettingsGet(params *V1TenantUIDAuthTokenSettingsGetParams) (*V1TenantUIDAuthTokenSettingsGetOK, error) + + V1TenantUIDAuthTokenSettingsUpdate(params *V1TenantUIDAuthTokenSettingsUpdateParams) (*V1TenantUIDAuthTokenSettingsUpdateNoContent, error) + + V1TenantUIDLoginBannerGet(params *V1TenantUIDLoginBannerGetParams) (*V1TenantUIDLoginBannerGetOK, error) + + V1TenantUIDLoginBannerUpdate(params *V1TenantUIDLoginBannerUpdateParams) (*V1TenantUIDLoginBannerUpdateNoContent, error) + + V1TenantsCreditAccountDelete(params *V1TenantsCreditAccountDeleteParams) (*V1TenantsCreditAccountDeleteNoContent, error) + + V1TenantsCreditAccountGet(params *V1TenantsCreditAccountGetParams) (*V1TenantsCreditAccountGetOK, error) + + V1TenantsUIDContractAccept(params *V1TenantsUIDContractAcceptParams) (*V1TenantsUIDContractAcceptNoContent, error) + + V1TenantsUIDMacrosCreate(params *V1TenantsUIDMacrosCreateParams) (*V1TenantsUIDMacrosCreateNoContent, error) + + V1TenantsUIDMacrosDeleteByMacroName(params *V1TenantsUIDMacrosDeleteByMacroNameParams) (*V1TenantsUIDMacrosDeleteByMacroNameNoContent, error) + + V1TenantsUIDMacrosList(params *V1TenantsUIDMacrosListParams) (*V1TenantsUIDMacrosListOK, error) + + V1TenantsUIDMacrosUpdate(params *V1TenantsUIDMacrosUpdateParams) (*V1TenantsUIDMacrosUpdateNoContent, error) + + V1TenantsUIDMacrosUpdateByMacroName(params *V1TenantsUIDMacrosUpdateByMacroNameParams) (*V1TenantsUIDMacrosUpdateByMacroNameNoContent, error) + + V1UserAssetsSSHCreate(params *V1UserAssetsSSHCreateParams) (*V1UserAssetsSSHCreateCreated, error) + + V1UsersAssetSSHDelete(params *V1UsersAssetSSHDeleteParams) (*V1UsersAssetSSHDeleteNoContent, error) + + V1UsersAssetSSHGetUID(params *V1UsersAssetSSHGetUIDParams) (*V1UsersAssetSSHGetUIDOK, error) + + V1UsersAssetSSHUpdate(params *V1UsersAssetSSHUpdateParams) (*V1UsersAssetSSHUpdateNoContent, error) + + V1UsersAssetsLocationAzureCreate(params *V1UsersAssetsLocationAzureCreateParams) (*V1UsersAssetsLocationAzureCreateCreated, error) + + V1UsersAssetsLocationAzureGet(params *V1UsersAssetsLocationAzureGetParams) (*V1UsersAssetsLocationAzureGetOK, error) + + V1UsersAssetsLocationAzureUpdate(params *V1UsersAssetsLocationAzureUpdateParams) (*V1UsersAssetsLocationAzureUpdateNoContent, error) + + V1UsersAssetsLocationDefaultUpdate(params *V1UsersAssetsLocationDefaultUpdateParams) (*V1UsersAssetsLocationDefaultUpdateNoContent, error) + + V1UsersAssetsLocationDelete(params *V1UsersAssetsLocationDeleteParams) (*V1UsersAssetsLocationDeleteNoContent, error) + + V1UsersAssetsLocationGcpCreate(params *V1UsersAssetsLocationGcpCreateParams) (*V1UsersAssetsLocationGcpCreateCreated, error) + + V1UsersAssetsLocationGcpGet(params *V1UsersAssetsLocationGcpGetParams) (*V1UsersAssetsLocationGcpGetOK, error) + + V1UsersAssetsLocationGcpUpdate(params *V1UsersAssetsLocationGcpUpdateParams) (*V1UsersAssetsLocationGcpUpdateNoContent, error) + + V1UsersAssetsLocationGet(params *V1UsersAssetsLocationGetParams) (*V1UsersAssetsLocationGetOK, error) + + V1UsersAssetsLocationMinioCreate(params *V1UsersAssetsLocationMinioCreateParams) (*V1UsersAssetsLocationMinioCreateCreated, error) + + V1UsersAssetsLocationMinioGet(params *V1UsersAssetsLocationMinioGetParams) (*V1UsersAssetsLocationMinioGetOK, error) + + V1UsersAssetsLocationMinioUpdate(params *V1UsersAssetsLocationMinioUpdateParams) (*V1UsersAssetsLocationMinioUpdateNoContent, error) + + V1UsersAssetsLocationS3Create(params *V1UsersAssetsLocationS3CreateParams) (*V1UsersAssetsLocationS3CreateCreated, error) + + V1UsersAssetsLocationS3Delete(params *V1UsersAssetsLocationS3DeleteParams) (*V1UsersAssetsLocationS3DeleteNoContent, error) + + V1UsersAssetsLocationS3Get(params *V1UsersAssetsLocationS3GetParams) (*V1UsersAssetsLocationS3GetOK, error) + + V1UsersAssetsLocationS3Update(params *V1UsersAssetsLocationS3UpdateParams) (*V1UsersAssetsLocationS3UpdateNoContent, error) + + V1UsersAssetsSSHGet(params *V1UsersAssetsSSHGetParams) (*V1UsersAssetsSSHGetOK, error) + + V1UsersAuthTokensRevoke(params *V1UsersAuthTokensRevokeParams) (*V1UsersAuthTokensRevokeNoContent, error) + + V1UsersCreate(params *V1UsersCreateParams) (*V1UsersCreateCreated, error) + + V1UsersEmailPasswordReset(params *V1UsersEmailPasswordResetParams) (*V1UsersEmailPasswordResetNoContent, error) + + V1UsersInfoGet(params *V1UsersInfoGetParams) (*V1UsersInfoGetOK, error) + + V1UsersList(params *V1UsersListParams) (*V1UsersListOK, error) + + V1UsersMetadata(params *V1UsersMetadataParams) (*V1UsersMetadataOK, error) + + V1UsersProjectRoles(params *V1UsersProjectRolesParams) (*V1UsersProjectRolesOK, error) + + V1UsersProjectRolesPut(params *V1UsersProjectRolesPutParams) (*V1UsersProjectRolesPutNoContent, error) + + V1UsersResourceRolesUIDUpdate(params *V1UsersResourceRolesUIDUpdateParams) (*V1UsersResourceRolesUIDUpdateNoContent, error) + + V1UsersStatusLoginMode(params *V1UsersStatusLoginModeParams) (*V1UsersStatusLoginModeNoContent, error) + + V1UsersSummaryGet(params *V1UsersSummaryGetParams) (*V1UsersSummaryGetOK, error) + + V1UsersSystemFeature(params *V1UsersSystemFeatureParams) (*V1UsersSystemFeatureOK, error) + + V1UsersSystemMacrosCreate(params *V1UsersSystemMacrosCreateParams) (*V1UsersSystemMacrosCreateNoContent, error) + + V1UsersSystemMacrosDeleteByMacroName(params *V1UsersSystemMacrosDeleteByMacroNameParams) (*V1UsersSystemMacrosDeleteByMacroNameNoContent, error) + + V1UsersSystemMacrosList(params *V1UsersSystemMacrosListParams) (*V1UsersSystemMacrosListOK, error) + + V1UsersSystemMacrosUpdate(params *V1UsersSystemMacrosUpdateParams) (*V1UsersSystemMacrosUpdateNoContent, error) + + V1UsersSystemMacrosUpdateByMacroName(params *V1UsersSystemMacrosUpdateByMacroNameParams) (*V1UsersSystemMacrosUpdateByMacroNameNoContent, error) + + V1UsersUIDDelete(params *V1UsersUIDDeleteParams) (*V1UsersUIDDeleteNoContent, error) + + V1UsersUIDGet(params *V1UsersUIDGetParams) (*V1UsersUIDGetOK, error) + + V1UsersUIDPasswordChange(params *V1UsersUIDPasswordChangeParams) (*V1UsersUIDPasswordChangeNoContent, error) + + V1UsersUIDPasswordReset(params *V1UsersUIDPasswordResetParams) (*V1UsersUIDPasswordResetNoContent, error) + + V1UsersUIDPatch(params *V1UsersUIDPatchParams) (*V1UsersUIDPatchNoContent, error) + + V1UsersUIDResourceRoles(params *V1UsersUIDResourceRolesParams) (*V1UsersUIDResourceRolesOK, error) + + V1UsersUIDResourceRolesCreate(params *V1UsersUIDResourceRolesCreateParams) (*V1UsersUIDResourceRolesCreateNoContent, error) + + V1UsersUIDResourceRolesUIDDelete(params *V1UsersUIDResourceRolesUIDDeleteParams) (*V1UsersUIDResourceRolesUIDDeleteNoContent, error) + + V1UsersUIDRoles(params *V1UsersUIDRolesParams) (*V1UsersUIDRolesOK, error) + + V1UsersUIDRolesUpdate(params *V1UsersUIDRolesUpdateParams) (*V1UsersUIDRolesUpdateNoContent, error) + + V1UsersUIDUpdate(params *V1UsersUIDUpdateParams) (*V1UsersUIDUpdateNoContent, error) + + V1UsersWorkspaceGetRoles(params *V1UsersWorkspaceGetRolesParams) (*V1UsersWorkspaceGetRolesOK, error) + + V1UsersWorkspaceRolesPut(params *V1UsersWorkspaceRolesPutParams) (*V1UsersWorkspaceRolesPutNoContent, error) + + V1VMSnapshotCreate(params *V1VMSnapshotCreateParams) (*V1VMSnapshotCreateOK, error) + + V1VMSnapshotDelete(params *V1VMSnapshotDeleteParams) (*V1VMSnapshotDeleteNoContent, error) + + V1VMSnapshotGet(params *V1VMSnapshotGetParams) (*V1VMSnapshotGetOK, error) + + V1VMSnapshotUpdate(params *V1VMSnapshotUpdateParams) (*V1VMSnapshotUpdateOK, error) + + V1VirtualClustersPacksValues(params *V1VirtualClustersPacksValuesParams) (*V1VirtualClustersPacksValuesOK, error) + + V1VsphereAccountsUIDClusterRes(params *V1VsphereAccountsUIDClusterResParams) (*V1VsphereAccountsUIDClusterResOK, error) + + V1VsphereAccountsUIDDatacenters(params *V1VsphereAccountsUIDDatacentersParams) (*V1VsphereAccountsUIDDatacentersOK, error) + + V1VsphereDNSMappingCreate(params *V1VsphereDNSMappingCreateParams) (*V1VsphereDNSMappingCreateCreated, error) + + V1VsphereDNSMappingDelete(params *V1VsphereDNSMappingDeleteParams) (*V1VsphereDNSMappingDeleteNoContent, error) + + V1VsphereDNSMappingGet(params *V1VsphereDNSMappingGetParams) (*V1VsphereDNSMappingGetOK, error) + + V1VsphereDNSMappingUpdate(params *V1VsphereDNSMappingUpdateParams) (*V1VsphereDNSMappingUpdateNoContent, error) + + V1VsphereDNSMappingsGet(params *V1VsphereDNSMappingsGetParams) (*V1VsphereDNSMappingsGetOK, error) + + V1VsphereMappingGet(params *V1VsphereMappingGetParams) (*V1VsphereMappingGetOK, error) + + V1WorkspaceOpsBackupCreate(params *V1WorkspaceOpsBackupCreateParams) (*V1WorkspaceOpsBackupCreateCreated, error) + + V1WorkspaceOpsBackupDelete(params *V1WorkspaceOpsBackupDeleteParams) (*V1WorkspaceOpsBackupDeleteNoContent, error) + + V1WorkspaceOpsBackupGet(params *V1WorkspaceOpsBackupGetParams) (*V1WorkspaceOpsBackupGetOK, error) + + V1WorkspaceOpsBackupOnDemandCreate(params *V1WorkspaceOpsBackupOnDemandCreateParams) (*V1WorkspaceOpsBackupOnDemandCreateCreated, error) + + V1WorkspaceOpsBackupUpdate(params *V1WorkspaceOpsBackupUpdateParams) (*V1WorkspaceOpsBackupUpdateNoContent, error) + + V1WorkspaceOpsRestoreGet(params *V1WorkspaceOpsRestoreGetParams) (*V1WorkspaceOpsRestoreGetOK, error) + + V1WorkspaceOpsRestoreOnDemandCreate(params *V1WorkspaceOpsRestoreOnDemandCreateParams) (*V1WorkspaceOpsRestoreOnDemandCreateCreated, error) + + V1WorkspacesClusterRbacCreate(params *V1WorkspacesClusterRbacCreateParams) (*V1WorkspacesClusterRbacCreateCreated, error) + + V1WorkspacesCreate(params *V1WorkspacesCreateParams) (*V1WorkspacesCreateCreated, error) + + V1WorkspacesUIDClusterNamespacesUpdate(params *V1WorkspacesUIDClusterNamespacesUpdateParams) (*V1WorkspacesUIDClusterNamespacesUpdateNoContent, error) + + V1WorkspacesUIDClusterRbacDelete(params *V1WorkspacesUIDClusterRbacDeleteParams) (*V1WorkspacesUIDClusterRbacDeleteNoContent, error) + + V1WorkspacesUIDClusterRbacUpdate(params *V1WorkspacesUIDClusterRbacUpdateParams) (*V1WorkspacesUIDClusterRbacUpdateNoContent, error) + + V1WorkspacesUIDDelete(params *V1WorkspacesUIDDeleteParams) (*V1WorkspacesUIDDeleteNoContent, error) + + V1WorkspacesUIDGet(params *V1WorkspacesUIDGetParams) (*V1WorkspacesUIDGetOK, error) + + V1WorkspacesUIDMetaUpdate(params *V1WorkspacesUIDMetaUpdateParams) (*V1WorkspacesUIDMetaUpdateNoContent, error) + + V1WorkspacesValidateName(params *V1WorkspacesValidateNameParams) (*V1WorkspacesValidateNameNoContent, error) + + SetTransport(transport runtime.ClientTransport) +} + +/* +V1AuthOrgs returns a list of user s organizations + +Returns a list of user's organizations details and login methods +*/ +func (a *Client) V1AuthOrgs(params *V1AuthOrgsParams) (*V1AuthOrgsOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1AuthOrgsParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "V1AuthOrgs", + Method: "GET", + PathPattern: "/v1/auth/orgs", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1AuthOrgsReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1AuthOrgsOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for V1AuthOrgs: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1AuthSsoProviders returns a list of supported sso auth providers + +Returns a list of supported sso auth providers +*/ +func (a *Client) V1AuthSsoProviders(params *V1AuthSsoProvidersParams) (*V1AuthSsoProvidersOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1AuthSsoProvidersParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "V1AuthSsoProviders", + Method: "GET", + PathPattern: "/v1/auth/sso/providers", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1AuthSsoProvidersReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1AuthSsoProvidersOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for V1AuthSsoProviders: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1AuthUserOrgForgot returns no content sends the user organization information via email + +Returns No Content. Sends the user organization(s) information via email +*/ +func (a *Client) V1AuthUserOrgForgot(params *V1AuthUserOrgForgotParams) (*V1AuthUserOrgForgotNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1AuthUserOrgForgotParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "V1AuthUserOrgForgot", + Method: "GET", + PathPattern: "/v1/auth/user/org/forgot", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1AuthUserOrgForgotReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1AuthUserOrgForgotNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for V1AuthUserOrgForgot: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1AwsAccountStsGet retrieves a w s external id and account id +*/ +func (a *Client) V1AwsAccountStsGet(params *V1AwsAccountStsGetParams) (*V1AwsAccountStsGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1AwsAccountStsGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "V1AwsAccountStsGet", + Method: "GET", + PathPattern: "/v1/clouds/aws/account/sts", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1AwsAccountStsGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1AwsAccountStsGetOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for V1AwsAccountStsGet: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1AwsAccountValidate validates the specified a w s account credentials +*/ +func (a *Client) V1AwsAccountValidate(params *V1AwsAccountValidateParams) (*V1AwsAccountValidateNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1AwsAccountValidateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "V1AwsAccountValidate", + Method: "POST", + PathPattern: "/v1/clouds/aws/account/validate", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1AwsAccountValidateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1AwsAccountValidateNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for V1AwsAccountValidate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1AwsClusterNameValidate checks if aws cluster name is valid + +Returns no contents if aws cluster name is valid else error. +*/ +func (a *Client) V1AwsClusterNameValidate(params *V1AwsClusterNameValidateParams) (*V1AwsClusterNameValidateNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1AwsClusterNameValidateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "V1AwsClusterNameValidate", + Method: "GET", + PathPattern: "/v1/clouds/aws/regions/{region}/eksClusters/name/validate", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1AwsClusterNameValidateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1AwsClusterNameValidateNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for V1AwsClusterNameValidate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1AwsCopyImageFromDefaultRegion copies the specified image from one region to another region +*/ +func (a *Client) V1AwsCopyImageFromDefaultRegion(params *V1AwsCopyImageFromDefaultRegionParams) (*V1AwsCopyImageFromDefaultRegionOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1AwsCopyImageFromDefaultRegionParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "V1AwsCopyImageFromDefaultRegion", + Method: "POST", + PathPattern: "/v1/clouds/aws/regions/{region}/copydefaultimages", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1AwsCopyImageFromDefaultRegionReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1AwsCopyImageFromDefaultRegionOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for V1AwsCopyImageFromDefaultRegion: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1AwsFindImage returns a w s image for the specified a m i name +*/ +func (a *Client) V1AwsFindImage(params *V1AwsFindImageParams) (*V1AwsFindImageOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1AwsFindImageParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "V1AwsFindImage", + Method: "POST", + PathPattern: "/v1/clouds/aws/regions/{region}/images", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1AwsFindImageReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1AwsFindImageOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for V1AwsFindImage: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1AwsIamPolicies retrieves a list of a w s policies for the specified account +*/ +func (a *Client) V1AwsIamPolicies(params *V1AwsIamPoliciesParams) (*V1AwsIamPoliciesOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1AwsIamPoliciesParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "V1AwsIamPolicies", + Method: "POST", + PathPattern: "/v1/clouds/aws/policies", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1AwsIamPoliciesReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1AwsIamPoliciesOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for V1AwsIamPolicies: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1AwsInstanceTypes retrieves a list of a w s instance types +*/ +func (a *Client) V1AwsInstanceTypes(params *V1AwsInstanceTypesParams) (*V1AwsInstanceTypesOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1AwsInstanceTypesParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "V1AwsInstanceTypes", + Method: "GET", + PathPattern: "/v1/clouds/aws/regions/{region}/instancetypes", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1AwsInstanceTypesReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1AwsInstanceTypesOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for V1AwsInstanceTypes: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1AwsKeyPairValidate validates the specified a w s keypair +*/ +func (a *Client) V1AwsKeyPairValidate(params *V1AwsKeyPairValidateParams) (*V1AwsKeyPairValidateNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1AwsKeyPairValidateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "V1AwsKeyPairValidate", + Method: "POST", + PathPattern: "/v1/clouds/aws/regions/{region}/keypairs/{keypair}/validate", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1AwsKeyPairValidateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1AwsKeyPairValidateNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for V1AwsKeyPairValidate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1AwsKeyPairs retrieves a list of a w s keypairs +*/ +func (a *Client) V1AwsKeyPairs(params *V1AwsKeyPairsParams) (*V1AwsKeyPairsOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1AwsKeyPairsParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "V1AwsKeyPairs", + Method: "GET", + PathPattern: "/v1/clouds/aws/regions/{region}/keypairs", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1AwsKeyPairsReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1AwsKeyPairsOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for V1AwsKeyPairs: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1AwsKmsKeyGet gets a w s k m s key by Id +*/ +func (a *Client) V1AwsKmsKeyGet(params *V1AwsKmsKeyGetParams) (*V1AwsKmsKeyGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1AwsKmsKeyGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "V1AwsKmsKeyGet", + Method: "GET", + PathPattern: "/v1/clouds/aws/regions/{region}/kms/{keyId}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1AwsKmsKeyGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1AwsKmsKeyGetOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for V1AwsKmsKeyGet: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1AwsKmsKeyValidate validates an aws k m s key for the specified account +*/ +func (a *Client) V1AwsKmsKeyValidate(params *V1AwsKmsKeyValidateParams) (*V1AwsKmsKeyValidateNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1AwsKmsKeyValidateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "V1AwsKmsKeyValidate", + Method: "GET", + PathPattern: "/v1/clouds/aws/regions/{region}/kmskeys/validate", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1AwsKmsKeyValidateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1AwsKmsKeyValidateNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for V1AwsKmsKeyValidate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1AwsKmsKeys retrieves a list of a w s k m s keys for the specified account +*/ +func (a *Client) V1AwsKmsKeys(params *V1AwsKmsKeysParams) (*V1AwsKmsKeysOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1AwsKmsKeysParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "V1AwsKmsKeys", + Method: "GET", + PathPattern: "/v1/clouds/aws/regions/{region}/kmskeys", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1AwsKmsKeysReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1AwsKmsKeysOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for V1AwsKmsKeys: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1AwsPolicyArnsValidate validates the aws policy arns validate +*/ +func (a *Client) V1AwsPolicyArnsValidate(params *V1AwsPolicyArnsValidateParams) (*V1AwsPolicyArnsValidateNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1AwsPolicyArnsValidateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "V1AwsPolicyArnsValidate", + Method: "POST", + PathPattern: "/v1/clouds/aws/policyArns/validate", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1AwsPolicyArnsValidateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1AwsPolicyArnsValidateNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for V1AwsPolicyArnsValidate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1AwsPropertiesValidate validates a w s properties +*/ +func (a *Client) V1AwsPropertiesValidate(params *V1AwsPropertiesValidateParams) (*V1AwsPropertiesValidateNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1AwsPropertiesValidateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "V1AwsPropertiesValidate", + Method: "POST", + PathPattern: "/v1/clouds/aws/properties/validate", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1AwsPropertiesValidateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1AwsPropertiesValidateNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for V1AwsPropertiesValidate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1AwsRegions retrieves a list of a w s regions for the specified account +*/ +func (a *Client) V1AwsRegions(params *V1AwsRegionsParams) (*V1AwsRegionsOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1AwsRegionsParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "V1AwsRegions", + Method: "GET", + PathPattern: "/v1/clouds/aws/regions", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1AwsRegionsReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1AwsRegionsOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for V1AwsRegions: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1AwsS3Validate validates the a w s s3 bucket +*/ +func (a *Client) V1AwsS3Validate(params *V1AwsS3ValidateParams) (*V1AwsS3ValidateNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1AwsS3ValidateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "V1AwsS3Validate", + Method: "POST", + PathPattern: "/v1/clouds/aws/s3/validate", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1AwsS3ValidateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1AwsS3ValidateNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for V1AwsS3Validate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1AwsSecurityGroups retrieves a list of a w s security groups for the specified account +*/ +func (a *Client) V1AwsSecurityGroups(params *V1AwsSecurityGroupsParams) (*V1AwsSecurityGroupsOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1AwsSecurityGroupsParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "V1AwsSecurityGroups", + Method: "GET", + PathPattern: "/v1/clouds/aws/securitygroups", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1AwsSecurityGroupsReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1AwsSecurityGroupsOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for V1AwsSecurityGroups: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1AwsStorageTypes retrieves a list of a w s storage types +*/ +func (a *Client) V1AwsStorageTypes(params *V1AwsStorageTypesParams) (*V1AwsStorageTypesOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1AwsStorageTypesParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "V1AwsStorageTypes", + Method: "GET", + PathPattern: "/v1/clouds/aws/regions/{region}/storagetypes", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1AwsStorageTypesReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1AwsStorageTypesOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for V1AwsStorageTypes: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1AwsVolumeSizeGet gets a w s volume size + +Get AWS Volume Size +*/ +func (a *Client) V1AwsVolumeSizeGet(params *V1AwsVolumeSizeGetParams) (*V1AwsVolumeSizeGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1AwsVolumeSizeGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "V1AwsVolumeSizeGet", + Method: "GET", + PathPattern: "/v1/clouds/aws/imageIds/{imageId}/volumeSize", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1AwsVolumeSizeGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1AwsVolumeSizeGetOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for V1AwsVolumeSizeGet: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1AwsVolumeTypesGet gets all a w s volume types + +List all AWS Volume Types +*/ +func (a *Client) V1AwsVolumeTypesGet(params *V1AwsVolumeTypesGetParams) (*V1AwsVolumeTypesGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1AwsVolumeTypesGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "V1AwsVolumeTypesGet", + Method: "GET", + PathPattern: "/v1/clouds/aws/volumeTypes", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1AwsVolumeTypesGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1AwsVolumeTypesGetOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for V1AwsVolumeTypesGet: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1AwsVpcs retrieves a list of v p cs for the specified account +*/ +func (a *Client) V1AwsVpcs(params *V1AwsVpcsParams) (*V1AwsVpcsOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1AwsVpcsParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "V1AwsVpcs", + Method: "GET", + PathPattern: "/v1/clouds/aws/regions/{region}/vpcs", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1AwsVpcsReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1AwsVpcsOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for V1AwsVpcs: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1AwsZones retrieves a list of a w s availability zones for the specified region +*/ +func (a *Client) V1AwsZones(params *V1AwsZonesParams) (*V1AwsZonesOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1AwsZonesParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "V1AwsZones", + Method: "GET", + PathPattern: "/v1/clouds/aws/regions/{region}/availabilityzones", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1AwsZonesReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1AwsZonesOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for V1AwsZones: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1AzureAccountValidate checks if azure account is valid + +Returns no contents if account is valid else error. +*/ +func (a *Client) V1AzureAccountValidate(params *V1AzureAccountValidateParams) (*V1AzureAccountValidateNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1AzureAccountValidateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "V1AzureAccountValidate", + Method: "POST", + PathPattern: "/v1/clouds/azure/account/validate", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1AzureAccountValidateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1AzureAccountValidateNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for V1AzureAccountValidate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1AzureClusterNameValidate checks if azure cluster name is valid + +Returns no contents if Azure cluster name is valid else error. +*/ +func (a *Client) V1AzureClusterNameValidate(params *V1AzureClusterNameValidateParams) (*V1AzureClusterNameValidateNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1AzureClusterNameValidateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "V1AzureClusterNameValidate", + Method: "GET", + PathPattern: "/v1/clouds/azure/regions/{region}/subscriptions/{subscriptionId}/aksClusters/name/validate", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1AzureClusterNameValidateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1AzureClusterNameValidateNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for V1AzureClusterNameValidate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1AzureGroups retrieves a list of azure groups +*/ +func (a *Client) V1AzureGroups(params *V1AzureGroupsParams) (*V1AzureGroupsOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1AzureGroupsParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "V1AzureGroups", + Method: "GET", + PathPattern: "/v1/clouds/azure/groups", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1AzureGroupsReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1AzureGroupsOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for V1AzureGroups: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1AzureInstanceTypes retrieves a list of azure instance types +*/ +func (a *Client) V1AzureInstanceTypes(params *V1AzureInstanceTypesParams) (*V1AzureInstanceTypesOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1AzureInstanceTypesParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "V1AzureInstanceTypes", + Method: "GET", + PathPattern: "/v1/clouds/azure/regions/{region}/instancetypes", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1AzureInstanceTypesReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1AzureInstanceTypesOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for V1AzureInstanceTypes: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1AzurePrivateDNSZones gets azure private DNS zones for the given resource group + +Returns Azure private DNS zones +*/ +func (a *Client) V1AzurePrivateDNSZones(params *V1AzurePrivateDNSZonesParams) (*V1AzurePrivateDNSZonesOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1AzurePrivateDNSZonesParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "V1AzurePrivateDnsZones", + Method: "GET", + PathPattern: "/v1/clouds/azure/resourceGroups/{resourceGroup}/privateDnsZones", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1AzurePrivateDNSZonesReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1AzurePrivateDNSZonesOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for V1AzurePrivateDnsZones: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1AzureRegions retrieves a list of azure regions +*/ +func (a *Client) V1AzureRegions(params *V1AzureRegionsParams) (*V1AzureRegionsOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1AzureRegionsParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "V1AzureRegions", + Method: "GET", + PathPattern: "/v1/clouds/azure/regions", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1AzureRegionsReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1AzureRegionsOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for V1AzureRegions: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1AzureResourceGroupList retrieves a list of azure resource group for the specified account +*/ +func (a *Client) V1AzureResourceGroupList(params *V1AzureResourceGroupListParams) (*V1AzureResourceGroupListOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1AzureResourceGroupListParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "V1AzureResourceGroupList", + Method: "GET", + PathPattern: "/v1/clouds/azure/regions/{region}/subscriptions/{subscriptionId}/resourceGroups", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1AzureResourceGroupListReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1AzureResourceGroupListOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for V1AzureResourceGroupList: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1AzureStorageAccountTypes gets azure storage account types + +Returns Azure storage account types. +*/ +func (a *Client) V1AzureStorageAccountTypes(params *V1AzureStorageAccountTypesParams) (*V1AzureStorageAccountTypesOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1AzureStorageAccountTypesParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "V1AzureStorageAccountTypes", + Method: "GET", + PathPattern: "/v1/clouds/azure/storageaccounttypes", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1AzureStorageAccountTypesReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1AzureStorageAccountTypesOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for V1AzureStorageAccountTypes: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1AzureStorageAccounts gets azure storage accounts + +Returns Azure storage accounts. +*/ +func (a *Client) V1AzureStorageAccounts(params *V1AzureStorageAccountsParams) (*V1AzureStorageAccountsOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1AzureStorageAccountsParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "V1AzureStorageAccounts", + Method: "GET", + PathPattern: "/v1/clouds/azure/resourceGroups/{resourceGroup}/storageAccounts", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1AzureStorageAccountsReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1AzureStorageAccountsOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for V1AzureStorageAccounts: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1AzureStorageContainers gets azure storage containers + +Returns Azure storage containers for the given account. +*/ +func (a *Client) V1AzureStorageContainers(params *V1AzureStorageContainersParams) (*V1AzureStorageContainersOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1AzureStorageContainersParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "V1AzureStorageContainers", + Method: "GET", + PathPattern: "/v1/clouds/azure/resourceGroups/{resourceGroup}/storageAccounts/{storageAccountName}/containers", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1AzureStorageContainersReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1AzureStorageContainersOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for V1AzureStorageContainers: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1AzureStorageTypes retrieves a list of azure storage types +*/ +func (a *Client) V1AzureStorageTypes(params *V1AzureStorageTypesParams) (*V1AzureStorageTypesOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1AzureStorageTypesParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "V1AzureStorageTypes", + Method: "GET", + PathPattern: "/v1/clouds/azure/regions/{region}/storagetypes", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1AzureStorageTypesReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1AzureStorageTypesOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for V1AzureStorageTypes: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1AzureSubscriptionList retrieves a list of azure subscription list for the specified account + +Returns list of Azure subscription list. +*/ +func (a *Client) V1AzureSubscriptionList(params *V1AzureSubscriptionListParams) (*V1AzureSubscriptionListOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1AzureSubscriptionListParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "V1AzureSubscriptionList", + Method: "GET", + PathPattern: "/v1/clouds/azure/subscriptions", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1AzureSubscriptionListReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1AzureSubscriptionListOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for V1AzureSubscriptionList: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1AzureVhdURL returns the azure vhd url for the specified vhd location +*/ +func (a *Client) V1AzureVhdURL(params *V1AzureVhdURLParams) (*V1AzureVhdURLOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1AzureVhdURLParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "V1AzureVhdUrl", + Method: "GET", + PathPattern: "/v1/clouds/azure/vhds/{vhd}/url", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1AzureVhdURLReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1AzureVhdURLOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for V1AzureVhdUrl: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1AzureVirtualNetworkList retrieves a list of azure virtual network list for the sepcified account +*/ +func (a *Client) V1AzureVirtualNetworkList(params *V1AzureVirtualNetworkListParams) (*V1AzureVirtualNetworkListOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1AzureVirtualNetworkListParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "V1AzureVirtualNetworkList", + Method: "GET", + PathPattern: "/v1/clouds/azure/regions/{region}/subscriptions/{subscriptionId}/networks", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1AzureVirtualNetworkListReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1AzureVirtualNetworkListOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for V1AzureVirtualNetworkList: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1AzureZones retrieves a list of azure zones for the specified region +*/ +func (a *Client) V1AzureZones(params *V1AzureZonesParams) (*V1AzureZonesOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1AzureZonesParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "V1AzureZones", + Method: "GET", + PathPattern: "/v1/clouds/azure/regions/{region}/zones", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1AzureZonesReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1AzureZonesOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for V1AzureZones: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1CloudComputeRate returns the cloud compute rate +*/ +func (a *Client) V1CloudComputeRate(params *V1CloudComputeRateParams) (*V1CloudComputeRateOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1CloudComputeRateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "V1CloudComputeRate", + Method: "GET", + PathPattern: "/v1/clouds/{cloud}/compute/{type}/rate", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1CloudComputeRateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1CloudComputeRateOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for V1CloudComputeRate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1CloudInstanceSpotPriceGet retrieves the cloud instance spot price based on zone and timestamp for a specific cloud +*/ +func (a *Client) V1CloudInstanceSpotPriceGet(params *V1CloudInstanceSpotPriceGetParams) (*V1CloudInstanceSpotPriceGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1CloudInstanceSpotPriceGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "V1CloudInstanceSpotPriceGet", + Method: "GET", + PathPattern: "/v1/clouds/{cloudType}/instance/spotprice", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1CloudInstanceSpotPriceGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1CloudInstanceSpotPriceGetOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for V1CloudInstanceSpotPriceGet: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1CloudStorageRate returns the cloud storage rate +*/ +func (a *Client) V1CloudStorageRate(params *V1CloudStorageRateParams) (*V1CloudStorageRateOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1CloudStorageRateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "V1CloudStorageRate", + Method: "GET", + PathPattern: "/v1/clouds/{cloud}/storage/{type}/rate", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1CloudStorageRateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1CloudStorageRateOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for V1CloudStorageRate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1CloudsAwsCloudWatchValidate validates aws cloud watch credentials + +Validates aws cloud watch credentials +*/ +func (a *Client) V1CloudsAwsCloudWatchValidate(params *V1CloudsAwsCloudWatchValidateParams) (*V1CloudsAwsCloudWatchValidateNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1CloudsAwsCloudWatchValidateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "V1CloudsAwsCloudWatchValidate", + Method: "POST", + PathPattern: "/v1/clouds/aws/cloudwatch/validate", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1CloudsAwsCloudWatchValidateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1CloudsAwsCloudWatchValidateNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for V1CloudsAwsCloudWatchValidate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1ClusterFeatureBackupLocationUIDChange changes cluster backup location +*/ +func (a *Client) V1ClusterFeatureBackupLocationUIDChange(params *V1ClusterFeatureBackupLocationUIDChangeParams) (*V1ClusterFeatureBackupLocationUIDChangeNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1ClusterFeatureBackupLocationUIDChangeParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "V1ClusterFeatureBackupLocationUidChange", + Method: "PUT", + PathPattern: "/v1/spectroclusters/features/backup/locations/{uid}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1ClusterFeatureBackupLocationUIDChangeReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1ClusterFeatureBackupLocationUIDChangeNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for V1ClusterFeatureBackupLocationUidChange: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1ClusterFeatureBackupLocationUIDGet returns the cluster object references based on location Uid +*/ +func (a *Client) V1ClusterFeatureBackupLocationUIDGet(params *V1ClusterFeatureBackupLocationUIDGetParams) (*V1ClusterFeatureBackupLocationUIDGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1ClusterFeatureBackupLocationUIDGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "V1ClusterFeatureBackupLocationUidGet", + Method: "GET", + PathPattern: "/v1/spectroclusters/features/backup/locations/{uid}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1ClusterFeatureBackupLocationUIDGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1ClusterFeatureBackupLocationUIDGetOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for V1ClusterFeatureBackupLocationUidGet: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1ClusterProfilesUIDExport exports the specified cluster profile +*/ +func (a *Client) V1ClusterProfilesUIDExport(params *V1ClusterProfilesUIDExportParams, writer io.Writer) (*V1ClusterProfilesUIDExportOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1ClusterProfilesUIDExportParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "V1ClusterProfilesUidExport", + Method: "GET", + PathPattern: "/v1/clusterprofiles/{uid}/export", + ProducesMediaTypes: []string{"application/octet-stream"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1ClusterProfilesUIDExportReader{formats: a.formats, writer: writer}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1ClusterProfilesUIDExportOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for V1ClusterProfilesUidExport: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1ClusterProfilesUIDExportTerraform downloads the specified cluster profile +*/ +func (a *Client) V1ClusterProfilesUIDExportTerraform(params *V1ClusterProfilesUIDExportTerraformParams, writer io.Writer) (*V1ClusterProfilesUIDExportTerraformOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1ClusterProfilesUIDExportTerraformParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "V1ClusterProfilesUidExportTerraform", + Method: "GET", + PathPattern: "/v1/clusterprofiles/{uid}/export/terraform", + ProducesMediaTypes: []string{"application/octet-stream"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1ClusterProfilesUIDExportTerraformReader{formats: a.formats, writer: writer}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1ClusterProfilesUIDExportTerraformOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for V1ClusterProfilesUidExportTerraform: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1ClusterProfilesUIDPacksNameGet returns the specified cluster profile pack +*/ +func (a *Client) V1ClusterProfilesUIDPacksNameGet(params *V1ClusterProfilesUIDPacksNameGetParams) (*V1ClusterProfilesUIDPacksNameGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1ClusterProfilesUIDPacksNameGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "V1ClusterProfilesUidPacksNameGet", + Method: "GET", + PathPattern: "/v1/clusterprofiles/{uid}/packs/{packName}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1ClusterProfilesUIDPacksNameGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1ClusterProfilesUIDPacksNameGetOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for V1ClusterProfilesUidPacksNameGet: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1ClusterProfilesUIDVariablesDelete deletes the specified cluster profile variables +*/ +func (a *Client) V1ClusterProfilesUIDVariablesDelete(params *V1ClusterProfilesUIDVariablesDeleteParams) (*V1ClusterProfilesUIDVariablesDeleteNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1ClusterProfilesUIDVariablesDeleteParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "V1ClusterProfilesUidVariablesDelete", + Method: "DELETE", + PathPattern: "/v1/clusterprofiles/{uid}/variables", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1ClusterProfilesUIDVariablesDeleteReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1ClusterProfilesUIDVariablesDeleteNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for V1ClusterProfilesUidVariablesDelete: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1ClusterProfilesUIDVariablesGet retrieves a list of variables defined for the cluster profile +*/ +func (a *Client) V1ClusterProfilesUIDVariablesGet(params *V1ClusterProfilesUIDVariablesGetParams) (*V1ClusterProfilesUIDVariablesGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1ClusterProfilesUIDVariablesGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "V1ClusterProfilesUidVariablesGet", + Method: "GET", + PathPattern: "/v1/clusterprofiles/{uid}/variables", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1ClusterProfilesUIDVariablesGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1ClusterProfilesUIDVariablesGetOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for V1ClusterProfilesUidVariablesGet: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1ClusterProfilesUIDVariablesPatch updates specific variables defined for a cluster profile +*/ +func (a *Client) V1ClusterProfilesUIDVariablesPatch(params *V1ClusterProfilesUIDVariablesPatchParams) (*V1ClusterProfilesUIDVariablesPatchNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1ClusterProfilesUIDVariablesPatchParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "V1ClusterProfilesUidVariablesPatch", + Method: "PATCH", + PathPattern: "/v1/clusterprofiles/{uid}/variables", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1ClusterProfilesUIDVariablesPatchReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1ClusterProfilesUIDVariablesPatchNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for V1ClusterProfilesUidVariablesPatch: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1ClusterProfilesUIDVariablesPut updates the variables defined for a cluster profile +*/ +func (a *Client) V1ClusterProfilesUIDVariablesPut(params *V1ClusterProfilesUIDVariablesPutParams) (*V1ClusterProfilesUIDVariablesPutNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1ClusterProfilesUIDVariablesPutParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "V1ClusterProfilesUidVariablesPut", + Method: "PUT", + PathPattern: "/v1/clusterprofiles/{uid}/variables", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1ClusterProfilesUIDVariablesPutReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1ClusterProfilesUIDVariablesPutNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for V1ClusterProfilesUidVariablesPut: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1ControlPlaneHealthCheckTimeoutUpdate updates the specified cluster control plane health check timeout +*/ +func (a *Client) V1ControlPlaneHealthCheckTimeoutUpdate(params *V1ControlPlaneHealthCheckTimeoutUpdateParams) (*V1ControlPlaneHealthCheckTimeoutUpdateNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1ControlPlaneHealthCheckTimeoutUpdateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "V1ControlPlaneHealthCheckTimeoutUpdate", + Method: "PATCH", + PathPattern: "/v1/spectroclusters/{uid}/clusterConfig/controlPlaneHealthCheckTimeout", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1ControlPlaneHealthCheckTimeoutUpdateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1ControlPlaneHealthCheckTimeoutUpdateNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for V1ControlPlaneHealthCheckTimeoutUpdate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1CustomCloudTypeBootstrapDelete deletes the custom cloud type bootstrap +*/ +func (a *Client) V1CustomCloudTypeBootstrapDelete(params *V1CustomCloudTypeBootstrapDeleteParams) (*V1CustomCloudTypeBootstrapDeleteNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1CustomCloudTypeBootstrapDeleteParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "V1CustomCloudTypeBootstrapDelete", + Method: "DELETE", + PathPattern: "/v1/clouds/cloudTypes/{cloudType}/content/bootstrap", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1CustomCloudTypeBootstrapDeleteReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1CustomCloudTypeBootstrapDeleteNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for V1CustomCloudTypeBootstrapDelete: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1CustomCloudTypeBootstrapGet returns the custom cloud type bootstrap +*/ +func (a *Client) V1CustomCloudTypeBootstrapGet(params *V1CustomCloudTypeBootstrapGetParams) (*V1CustomCloudTypeBootstrapGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1CustomCloudTypeBootstrapGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "V1CustomCloudTypeBootstrapGet", + Method: "GET", + PathPattern: "/v1/clouds/cloudTypes/{cloudType}/content/bootstrap", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1CustomCloudTypeBootstrapGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1CustomCloudTypeBootstrapGetOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for V1CustomCloudTypeBootstrapGet: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1CustomCloudTypeBootstrapUpdate updates the custom cloud type bootstrap +*/ +func (a *Client) V1CustomCloudTypeBootstrapUpdate(params *V1CustomCloudTypeBootstrapUpdateParams) (*V1CustomCloudTypeBootstrapUpdateNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1CustomCloudTypeBootstrapUpdateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "V1CustomCloudTypeBootstrapUpdate", + Method: "PUT", + PathPattern: "/v1/clouds/cloudTypes/{cloudType}/content/bootstrap", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"multipart/form-data"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1CustomCloudTypeBootstrapUpdateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1CustomCloudTypeBootstrapUpdateNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for V1CustomCloudTypeBootstrapUpdate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1CustomCloudTypeCloudAccountKeysGet returns valid keys for the cloud account used for custom cloud type +*/ +func (a *Client) V1CustomCloudTypeCloudAccountKeysGet(params *V1CustomCloudTypeCloudAccountKeysGetParams) (*V1CustomCloudTypeCloudAccountKeysGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1CustomCloudTypeCloudAccountKeysGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "V1CustomCloudTypeCloudAccountKeysGet", + Method: "GET", + PathPattern: "/v1/clouds/cloudTypes/{cloudType}/cloudAccountKeys", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1CustomCloudTypeCloudAccountKeysGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1CustomCloudTypeCloudAccountKeysGetOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for V1CustomCloudTypeCloudAccountKeysGet: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1CustomCloudTypeCloudAccountKeysUpdate updates the custom cloud type cloud account keys +*/ +func (a *Client) V1CustomCloudTypeCloudAccountKeysUpdate(params *V1CustomCloudTypeCloudAccountKeysUpdateParams) (*V1CustomCloudTypeCloudAccountKeysUpdateNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1CustomCloudTypeCloudAccountKeysUpdateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "V1CustomCloudTypeCloudAccountKeysUpdate", + Method: "PUT", + PathPattern: "/v1/clouds/cloudTypes/{cloudType}/cloudAccountKeys", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1CustomCloudTypeCloudAccountKeysUpdateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1CustomCloudTypeCloudAccountKeysUpdateNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for V1CustomCloudTypeCloudAccountKeysUpdate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1CustomCloudTypeCloudProviderDelete deletes the custom cloud type cloud provider +*/ +func (a *Client) V1CustomCloudTypeCloudProviderDelete(params *V1CustomCloudTypeCloudProviderDeleteParams) (*V1CustomCloudTypeCloudProviderDeleteNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1CustomCloudTypeCloudProviderDeleteParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "V1CustomCloudTypeCloudProviderDelete", + Method: "DELETE", + PathPattern: "/v1/clouds/cloudTypes/{cloudType}/content/cloudProvider", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1CustomCloudTypeCloudProviderDeleteReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1CustomCloudTypeCloudProviderDeleteNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for V1CustomCloudTypeCloudProviderDelete: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1CustomCloudTypeCloudProviderGet returns the custom cloud type cloud provider +*/ +func (a *Client) V1CustomCloudTypeCloudProviderGet(params *V1CustomCloudTypeCloudProviderGetParams) (*V1CustomCloudTypeCloudProviderGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1CustomCloudTypeCloudProviderGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "V1CustomCloudTypeCloudProviderGet", + Method: "GET", + PathPattern: "/v1/clouds/cloudTypes/{cloudType}/content/cloudProvider", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1CustomCloudTypeCloudProviderGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1CustomCloudTypeCloudProviderGetOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for V1CustomCloudTypeCloudProviderGet: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1CustomCloudTypeCloudProviderUpdate updates the custom cloud type cloud provider +*/ +func (a *Client) V1CustomCloudTypeCloudProviderUpdate(params *V1CustomCloudTypeCloudProviderUpdateParams) (*V1CustomCloudTypeCloudProviderUpdateNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1CustomCloudTypeCloudProviderUpdateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "V1CustomCloudTypeCloudProviderUpdate", + Method: "PUT", + PathPattern: "/v1/clouds/cloudTypes/{cloudType}/content/cloudProvider", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"multipart/form-data"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1CustomCloudTypeCloudProviderUpdateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1CustomCloudTypeCloudProviderUpdateNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for V1CustomCloudTypeCloudProviderUpdate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1CustomCloudTypeClusterTemplateDelete deletes the custom cloud type cluster template +*/ +func (a *Client) V1CustomCloudTypeClusterTemplateDelete(params *V1CustomCloudTypeClusterTemplateDeleteParams) (*V1CustomCloudTypeClusterTemplateDeleteNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1CustomCloudTypeClusterTemplateDeleteParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "V1CustomCloudTypeClusterTemplateDelete", + Method: "DELETE", + PathPattern: "/v1/clouds/cloudTypes/{cloudType}/content/templates/clusterTemplate", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1CustomCloudTypeClusterTemplateDeleteReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1CustomCloudTypeClusterTemplateDeleteNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for V1CustomCloudTypeClusterTemplateDelete: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1CustomCloudTypeClusterTemplateGet returns the custom cloud type cluster template +*/ +func (a *Client) V1CustomCloudTypeClusterTemplateGet(params *V1CustomCloudTypeClusterTemplateGetParams) (*V1CustomCloudTypeClusterTemplateGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1CustomCloudTypeClusterTemplateGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "V1CustomCloudTypeClusterTemplateGet", + Method: "GET", + PathPattern: "/v1/clouds/cloudTypes/{cloudType}/content/templates/clusterTemplate", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1CustomCloudTypeClusterTemplateGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1CustomCloudTypeClusterTemplateGetOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for V1CustomCloudTypeClusterTemplateGet: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1CustomCloudTypeClusterTemplateUpdate updates the custom cloud type cluster template +*/ +func (a *Client) V1CustomCloudTypeClusterTemplateUpdate(params *V1CustomCloudTypeClusterTemplateUpdateParams) (*V1CustomCloudTypeClusterTemplateUpdateNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1CustomCloudTypeClusterTemplateUpdateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "V1CustomCloudTypeClusterTemplateUpdate", + Method: "PUT", + PathPattern: "/v1/clouds/cloudTypes/{cloudType}/content/templates/clusterTemplate", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"multipart/form-data"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1CustomCloudTypeClusterTemplateUpdateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1CustomCloudTypeClusterTemplateUpdateNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for V1CustomCloudTypeClusterTemplateUpdate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1CustomCloudTypeControlPlaneDelete deletes the custom cloud type control plane +*/ +func (a *Client) V1CustomCloudTypeControlPlaneDelete(params *V1CustomCloudTypeControlPlaneDeleteParams) (*V1CustomCloudTypeControlPlaneDeleteNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1CustomCloudTypeControlPlaneDeleteParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "V1CustomCloudTypeControlPlaneDelete", + Method: "DELETE", + PathPattern: "/v1/clouds/cloudTypes/{cloudType}/content/controlPlane", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1CustomCloudTypeControlPlaneDeleteReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1CustomCloudTypeControlPlaneDeleteNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for V1CustomCloudTypeControlPlaneDelete: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1CustomCloudTypeControlPlaneGet returns the custom cloud type control plane +*/ +func (a *Client) V1CustomCloudTypeControlPlaneGet(params *V1CustomCloudTypeControlPlaneGetParams) (*V1CustomCloudTypeControlPlaneGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1CustomCloudTypeControlPlaneGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "V1CustomCloudTypeControlPlaneGet", + Method: "GET", + PathPattern: "/v1/clouds/cloudTypes/{cloudType}/content/controlPlane", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1CustomCloudTypeControlPlaneGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1CustomCloudTypeControlPlaneGetOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for V1CustomCloudTypeControlPlaneGet: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1CustomCloudTypeControlPlanePoolTemplateDelete deletes the custom cloud type control plane pool template +*/ +func (a *Client) V1CustomCloudTypeControlPlanePoolTemplateDelete(params *V1CustomCloudTypeControlPlanePoolTemplateDeleteParams) (*V1CustomCloudTypeControlPlanePoolTemplateDeleteNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1CustomCloudTypeControlPlanePoolTemplateDeleteParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "V1CustomCloudTypeControlPlanePoolTemplateDelete", + Method: "DELETE", + PathPattern: "/v1/clouds/cloudTypes/{cloudType}/content/templates/controlPlanePoolTemplate", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1CustomCloudTypeControlPlanePoolTemplateDeleteReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1CustomCloudTypeControlPlanePoolTemplateDeleteNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for V1CustomCloudTypeControlPlanePoolTemplateDelete: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1CustomCloudTypeControlPlanePoolTemplateGet returns the custom cloud type control plane pool template +*/ +func (a *Client) V1CustomCloudTypeControlPlanePoolTemplateGet(params *V1CustomCloudTypeControlPlanePoolTemplateGetParams) (*V1CustomCloudTypeControlPlanePoolTemplateGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1CustomCloudTypeControlPlanePoolTemplateGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "V1CustomCloudTypeControlPlanePoolTemplateGet", + Method: "GET", + PathPattern: "/v1/clouds/cloudTypes/{cloudType}/content/templates/controlPlanePoolTemplate", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1CustomCloudTypeControlPlanePoolTemplateGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1CustomCloudTypeControlPlanePoolTemplateGetOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for V1CustomCloudTypeControlPlanePoolTemplateGet: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1CustomCloudTypeControlPlanePoolTemplateUpdate updates the custom cloud type control plane pool template +*/ +func (a *Client) V1CustomCloudTypeControlPlanePoolTemplateUpdate(params *V1CustomCloudTypeControlPlanePoolTemplateUpdateParams) (*V1CustomCloudTypeControlPlanePoolTemplateUpdateNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1CustomCloudTypeControlPlanePoolTemplateUpdateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "V1CustomCloudTypeControlPlanePoolTemplateUpdate", + Method: "PUT", + PathPattern: "/v1/clouds/cloudTypes/{cloudType}/content/templates/controlPlanePoolTemplate", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"multipart/form-data"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1CustomCloudTypeControlPlanePoolTemplateUpdateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1CustomCloudTypeControlPlanePoolTemplateUpdateNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for V1CustomCloudTypeControlPlanePoolTemplateUpdate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1CustomCloudTypeControlPlaneUpdate updates the custom cloud type control plane +*/ +func (a *Client) V1CustomCloudTypeControlPlaneUpdate(params *V1CustomCloudTypeControlPlaneUpdateParams) (*V1CustomCloudTypeControlPlaneUpdateNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1CustomCloudTypeControlPlaneUpdateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "V1CustomCloudTypeControlPlaneUpdate", + Method: "PUT", + PathPattern: "/v1/clouds/cloudTypes/{cloudType}/content/controlPlane", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"multipart/form-data"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1CustomCloudTypeControlPlaneUpdateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1CustomCloudTypeControlPlaneUpdateNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for V1CustomCloudTypeControlPlaneUpdate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1CustomCloudTypeLogoGet returns the custom cloud type logo +*/ +func (a *Client) V1CustomCloudTypeLogoGet(params *V1CustomCloudTypeLogoGetParams, writer io.Writer) (*V1CustomCloudTypeLogoGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1CustomCloudTypeLogoGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "V1CustomCloudTypeLogoGet", + Method: "GET", + PathPattern: "/v1/clouds/cloudTypes/{cloudType}/logo", + ProducesMediaTypes: []string{"application/octet-stream"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1CustomCloudTypeLogoGetReader{formats: a.formats, writer: writer}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1CustomCloudTypeLogoGetOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for V1CustomCloudTypeLogoGet: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1CustomCloudTypeLogoUpdate updates the custom cloud type logo +*/ +func (a *Client) V1CustomCloudTypeLogoUpdate(params *V1CustomCloudTypeLogoUpdateParams) (*V1CustomCloudTypeLogoUpdateNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1CustomCloudTypeLogoUpdateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "V1CustomCloudTypeLogoUpdate", + Method: "PUT", + PathPattern: "/v1/clouds/cloudTypes/{cloudType}/logo", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"multipart/form-data"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1CustomCloudTypeLogoUpdateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1CustomCloudTypeLogoUpdateNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for V1CustomCloudTypeLogoUpdate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1CustomCloudTypeMetaGet returns the custom cloud type meta +*/ +func (a *Client) V1CustomCloudTypeMetaGet(params *V1CustomCloudTypeMetaGetParams) (*V1CustomCloudTypeMetaGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1CustomCloudTypeMetaGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "V1CustomCloudTypeMetaGet", + Method: "GET", + PathPattern: "/v1/clouds/cloudTypes/{cloudType}/meta", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1CustomCloudTypeMetaGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1CustomCloudTypeMetaGetOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for V1CustomCloudTypeMetaGet: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1CustomCloudTypeMetaUpdate updates the custom cloud type meta +*/ +func (a *Client) V1CustomCloudTypeMetaUpdate(params *V1CustomCloudTypeMetaUpdateParams) (*V1CustomCloudTypeMetaUpdateNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1CustomCloudTypeMetaUpdateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "V1CustomCloudTypeMetaUpdate", + Method: "PUT", + PathPattern: "/v1/clouds/cloudTypes/{cloudType}/meta", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1CustomCloudTypeMetaUpdateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1CustomCloudTypeMetaUpdateNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for V1CustomCloudTypeMetaUpdate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1CustomCloudTypeRegister registers the custom cloud type +*/ +func (a *Client) V1CustomCloudTypeRegister(params *V1CustomCloudTypeRegisterParams) (*V1CustomCloudTypeRegisterCreated, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1CustomCloudTypeRegisterParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "V1CustomCloudTypeRegister", + Method: "POST", + PathPattern: "/v1/clouds/cloudTypes/register", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1CustomCloudTypeRegisterReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1CustomCloudTypeRegisterCreated) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for V1CustomCloudTypeRegister: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1CustomCloudTypeWorkerPoolTemplateDelete deletes the custom cloud type worker pool template +*/ +func (a *Client) V1CustomCloudTypeWorkerPoolTemplateDelete(params *V1CustomCloudTypeWorkerPoolTemplateDeleteParams) (*V1CustomCloudTypeWorkerPoolTemplateDeleteNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1CustomCloudTypeWorkerPoolTemplateDeleteParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "V1CustomCloudTypeWorkerPoolTemplateDelete", + Method: "DELETE", + PathPattern: "/v1/clouds/cloudTypes/{cloudType}/content/templates/workerPoolTemplate", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1CustomCloudTypeWorkerPoolTemplateDeleteReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1CustomCloudTypeWorkerPoolTemplateDeleteNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for V1CustomCloudTypeWorkerPoolTemplateDelete: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1CustomCloudTypeWorkerPoolTemplateGet returns the custom cloud type worker pool template +*/ +func (a *Client) V1CustomCloudTypeWorkerPoolTemplateGet(params *V1CustomCloudTypeWorkerPoolTemplateGetParams) (*V1CustomCloudTypeWorkerPoolTemplateGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1CustomCloudTypeWorkerPoolTemplateGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "V1CustomCloudTypeWorkerPoolTemplateGet", + Method: "GET", + PathPattern: "/v1/clouds/cloudTypes/{cloudType}/content/templates/workerPoolTemplate", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1CustomCloudTypeWorkerPoolTemplateGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1CustomCloudTypeWorkerPoolTemplateGetOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for V1CustomCloudTypeWorkerPoolTemplateGet: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1CustomCloudTypeWorkerPoolTemplateUpdate updates the custom cloud type worker pool template +*/ +func (a *Client) V1CustomCloudTypeWorkerPoolTemplateUpdate(params *V1CustomCloudTypeWorkerPoolTemplateUpdateParams) (*V1CustomCloudTypeWorkerPoolTemplateUpdateNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1CustomCloudTypeWorkerPoolTemplateUpdateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "V1CustomCloudTypeWorkerPoolTemplateUpdate", + Method: "PUT", + PathPattern: "/v1/clouds/cloudTypes/{cloudType}/content/templates/workerPoolTemplate", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"multipart/form-data"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1CustomCloudTypeWorkerPoolTemplateUpdateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1CustomCloudTypeWorkerPoolTemplateUpdateNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for V1CustomCloudTypeWorkerPoolTemplateUpdate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1CustomCloudTypesDelete deletes the custom cloud type +*/ +func (a *Client) V1CustomCloudTypesDelete(params *V1CustomCloudTypesDeleteParams) (*V1CustomCloudTypesDeleteNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1CustomCloudTypesDeleteParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "V1CustomCloudTypesDelete", + Method: "DELETE", + PathPattern: "/v1/clouds/cloudTypes/{cloudType}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1CustomCloudTypesDeleteReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1CustomCloudTypesDeleteNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for V1CustomCloudTypesDelete: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1CustomCloudTypesGet returns the custom cloud types +*/ +func (a *Client) V1CustomCloudTypesGet(params *V1CustomCloudTypesGetParams) (*V1CustomCloudTypesGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1CustomCloudTypesGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "V1CustomCloudTypesGet", + Method: "GET", + PathPattern: "/v1/clouds/cloudTypes", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1CustomCloudTypesGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1CustomCloudTypesGetOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for V1CustomCloudTypesGet: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1DashboardVMEnabledClustersList retrieves a list of virtual machine enabled clusters +*/ +func (a *Client) V1DashboardVMEnabledClustersList(params *V1DashboardVMEnabledClustersListParams) (*V1DashboardVMEnabledClustersListOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1DashboardVMEnabledClustersListParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "V1DashboardVMEnabledClustersList", + Method: "GET", + PathPattern: "/v1/dashboard/spectroclusters/vms", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1DashboardVMEnabledClustersListReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1DashboardVMEnabledClustersListOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for V1DashboardVMEnabledClustersList: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1DataSinksCloudWatchSink syncs data to cloud watch + +Sync data to cloud watch +*/ +func (a *Client) V1DataSinksCloudWatchSink(params *V1DataSinksCloudWatchSinkParams) (*V1DataSinksCloudWatchSinkNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1DataSinksCloudWatchSinkParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "V1DataSinksCloudWatchSink", + Method: "POST", + PathPattern: "/v1/datasinks/cloudwatch", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1DataSinksCloudWatchSinkReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1DataSinksCloudWatchSinkNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for V1DataSinksCloudWatchSink: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1EdgeHostsUIDReset resets the cluster through edge host +*/ +func (a *Client) V1EdgeHostsUIDReset(params *V1EdgeHostsUIDResetParams) (*V1EdgeHostsUIDResetNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1EdgeHostsUIDResetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "V1EdgeHostsUidReset", + Method: "PUT", + PathPattern: "/v1/edgehosts/{uid}/reset", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1EdgeHostsUIDResetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1EdgeHostsUIDResetNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for V1EdgeHostsUidReset: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1EksPropertiesValidate validates e k s properties +*/ +func (a *Client) V1EksPropertiesValidate(params *V1EksPropertiesValidateParams) (*V1EksPropertiesValidateNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1EksPropertiesValidateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "V1EksPropertiesValidate", + Method: "POST", + PathPattern: "/v1/clouds/eks/properties/validate", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1EksPropertiesValidateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1EksPropertiesValidateNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for V1EksPropertiesValidate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1GcpAccountValidate validates the specified g c p account credentials +*/ +func (a *Client) V1GcpAccountValidate(params *V1GcpAccountValidateParams) (*V1GcpAccountValidateNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1GcpAccountValidateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "V1GcpAccountValidate", + Method: "POST", + PathPattern: "/v1/clouds/gcp/account/validate", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1GcpAccountValidateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1GcpAccountValidateNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for V1GcpAccountValidate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1GcpAvailabilityZones retrieves a list of g c p zones for the specified account +*/ +func (a *Client) V1GcpAvailabilityZones(params *V1GcpAvailabilityZonesParams) (*V1GcpAvailabilityZonesOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1GcpAvailabilityZonesParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "V1GcpAvailabilityZones", + Method: "GET", + PathPattern: "/v1/clouds/gcp/projects/{project}/zones", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1GcpAvailabilityZonesReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1GcpAvailabilityZonesOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for V1GcpAvailabilityZones: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1GcpAzValidate validates the specified g c p az +*/ +func (a *Client) V1GcpAzValidate(params *V1GcpAzValidateParams) (*V1GcpAzValidateNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1GcpAzValidateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "V1GcpAzValidate", + Method: "POST", + PathPattern: "/v1/clouds/gcp/azs/validate", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1GcpAzValidateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1GcpAzValidateNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for V1GcpAzValidate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1GcpBucketNameValidate validates the specified g c p bucket name credentials +*/ +func (a *Client) V1GcpBucketNameValidate(params *V1GcpBucketNameValidateParams) (*V1GcpBucketNameValidateNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1GcpBucketNameValidateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "V1GcpBucketNameValidate", + Method: "POST", + PathPattern: "/v1/clouds/gcp/bucketname/validate", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1GcpBucketNameValidateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1GcpBucketNameValidateNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for V1GcpBucketNameValidate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1GcpContainerImageValidate validates the image with tag +*/ +func (a *Client) V1GcpContainerImageValidate(params *V1GcpContainerImageValidateParams) (*V1GcpContainerImageValidateNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1GcpContainerImageValidateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "V1GcpContainerImageValidate", + Method: "GET", + PathPattern: "/v1/clouds/gcp/image/container/validate", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1GcpContainerImageValidateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1GcpContainerImageValidateNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for V1GcpContainerImageValidate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1GcpImageURL returns the gcp image url for the specified image location +*/ +func (a *Client) V1GcpImageURL(params *V1GcpImageURLParams) (*V1GcpImageURLOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1GcpImageURLParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "V1GcpImageUrl", + Method: "GET", + PathPattern: "/v1/clouds/gcp/images/{imageName}/url", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1GcpImageURLReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1GcpImageURLOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for V1GcpImageUrl: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1GcpInstanceTypes retrieves a list of g c p instance types +*/ +func (a *Client) V1GcpInstanceTypes(params *V1GcpInstanceTypesParams) (*V1GcpInstanceTypesOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1GcpInstanceTypesParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "V1GcpInstanceTypes", + Method: "GET", + PathPattern: "/v1/clouds/gcp/regions/{region}/instancetypes", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1GcpInstanceTypesReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1GcpInstanceTypesOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for V1GcpInstanceTypes: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1GcpNetworks retrieves a list of g c p networks for the specified account +*/ +func (a *Client) V1GcpNetworks(params *V1GcpNetworksParams) (*V1GcpNetworksOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1GcpNetworksParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "V1GcpNetworks", + Method: "GET", + PathPattern: "/v1/clouds/gcp/projects/{project}/regions/{region}/networks", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1GcpNetworksReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1GcpNetworksOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for V1GcpNetworks: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1GcpProjectValidate validates the specified g c p project +*/ +func (a *Client) V1GcpProjectValidate(params *V1GcpProjectValidateParams) (*V1GcpProjectValidateNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1GcpProjectValidateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "V1GcpProjectValidate", + Method: "POST", + PathPattern: "/v1/clouds/gcp/projects/{project}/validate", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1GcpProjectValidateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1GcpProjectValidateNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for V1GcpProjectValidate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1GcpProjects retrieves a list of g c p projects for the specified account +*/ +func (a *Client) V1GcpProjects(params *V1GcpProjectsParams) (*V1GcpProjectsOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1GcpProjectsParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "V1GcpProjects", + Method: "GET", + PathPattern: "/v1/clouds/gcp/projects", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1GcpProjectsReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1GcpProjectsOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for V1GcpProjects: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1GcpPropertiesValidate validates g c p properties +*/ +func (a *Client) V1GcpPropertiesValidate(params *V1GcpPropertiesValidateParams) (*V1GcpPropertiesValidateNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1GcpPropertiesValidateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "V1GcpPropertiesValidate", + Method: "POST", + PathPattern: "/v1/clouds/gcp/properties/validate", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1GcpPropertiesValidateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1GcpPropertiesValidateNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for V1GcpPropertiesValidate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1GcpRegions retrieves a list of g c p regions +*/ +func (a *Client) V1GcpRegions(params *V1GcpRegionsParams) (*V1GcpRegionsOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1GcpRegionsParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "V1GcpRegions", + Method: "GET", + PathPattern: "/v1/clouds/gcp/projects/{project}/regions", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1GcpRegionsReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1GcpRegionsOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for V1GcpRegions: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1GcpStorageTypes retrieves a list of gcp storage types +*/ +func (a *Client) V1GcpStorageTypes(params *V1GcpStorageTypesParams) (*V1GcpStorageTypesOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1GcpStorageTypesParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "V1GcpStorageTypes", + Method: "GET", + PathPattern: "/v1/clouds/gcp/regions/{region}/storagetypes", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1GcpStorageTypesReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1GcpStorageTypesOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for V1GcpStorageTypes: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1GcpZones retrieves a list of g c p zones for the specified account and region +*/ +func (a *Client) V1GcpZones(params *V1GcpZonesParams) (*V1GcpZonesOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1GcpZonesParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "V1GcpZones", + Method: "GET", + PathPattern: "/v1/clouds/gcp/projects/{project}/regions/{region}/zones", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1GcpZonesReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1GcpZonesOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for V1GcpZones: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1HostClusterConfigUpdate updates the specified cluster host config +*/ +func (a *Client) V1HostClusterConfigUpdate(params *V1HostClusterConfigUpdateParams) (*V1HostClusterConfigUpdateNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1HostClusterConfigUpdateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "V1HostClusterConfigUpdate", + Method: "PATCH", + PathPattern: "/v1/spectroclusters/{uid}/clusterConfig/hostCluster", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1HostClusterConfigUpdateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1HostClusterConfigUpdateNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for V1HostClusterConfigUpdate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1InvoiceUIDReportInvoicePdf downloads the specified invoice report +*/ +func (a *Client) V1InvoiceUIDReportInvoicePdf(params *V1InvoiceUIDReportInvoicePdfParams, writer io.Writer) (*V1InvoiceUIDReportInvoicePdfOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1InvoiceUIDReportInvoicePdfParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "V1InvoiceUidReportInvoicePdf", + Method: "GET", + PathPattern: "/v1/tenants/{tenantUid}/invoices/{invoiceUid}/report/invoice/pdf", + ProducesMediaTypes: []string{"application/octet-stream"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1InvoiceUIDReportInvoicePdfReader{formats: a.formats, writer: writer}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1InvoiceUIDReportInvoicePdfOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for V1InvoiceUidReportInvoicePdf: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1InvoiceUIDReportPdf downloads the specified monthly invoice report +*/ +func (a *Client) V1InvoiceUIDReportPdf(params *V1InvoiceUIDReportPdfParams, writer io.Writer) (*V1InvoiceUIDReportPdfOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1InvoiceUIDReportPdfParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "V1InvoiceUidReportPdf", + Method: "GET", + PathPattern: "/v1/tenants/{tenantUid}/invoices/{invoiceUid}/report/pdf", + ProducesMediaTypes: []string{"application/octet-stream"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1InvoiceUIDReportPdfReader{formats: a.formats, writer: writer}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1InvoiceUIDReportPdfOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for V1InvoiceUidReportPdf: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1InvoiceUIDReportUsagePdf downloads the specified tenant usage +*/ +func (a *Client) V1InvoiceUIDReportUsagePdf(params *V1InvoiceUIDReportUsagePdfParams, writer io.Writer) (*V1InvoiceUIDReportUsagePdfOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1InvoiceUIDReportUsagePdfParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "V1InvoiceUidReportUsagePdf", + Method: "GET", + PathPattern: "/v1/tenants/{tenantUid}/invoices/{invoiceUid}/report/usage/pdf", + ProducesMediaTypes: []string{"application/octet-stream"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1InvoiceUIDReportUsagePdfReader{formats: a.formats, writer: writer}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1InvoiceUIDReportUsagePdfOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for V1InvoiceUidReportUsagePdf: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1MaasAccountValidate checks if maas account is valid + +Returns no contents if account is valid else error. +*/ +func (a *Client) V1MaasAccountValidate(params *V1MaasAccountValidateParams) (*V1MaasAccountValidateNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1MaasAccountValidateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "V1MaasAccountValidate", + Method: "POST", + PathPattern: "/v1/clouds/maas/account/validate", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1MaasAccountValidateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1MaasAccountValidateNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for V1MaasAccountValidate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1MaasDomainsGet retrieves a list of maas domains +*/ +func (a *Client) V1MaasDomainsGet(params *V1MaasDomainsGetParams) (*V1MaasDomainsGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1MaasDomainsGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "V1MaasDomainsGet", + Method: "GET", + PathPattern: "/v1/clouds/maas/domains", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1MaasDomainsGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1MaasDomainsGetOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for V1MaasDomainsGet: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1MaasPoolsGet retrieves a list of maas pools for a particular account uid +*/ +func (a *Client) V1MaasPoolsGet(params *V1MaasPoolsGetParams) (*V1MaasPoolsGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1MaasPoolsGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "V1MaasPoolsGet", + Method: "GET", + PathPattern: "/v1/clouds/maas/resourcePools", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1MaasPoolsGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1MaasPoolsGetOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for V1MaasPoolsGet: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1MaasSubnetsGet retrieves a list of maas subnets for a particular account uid +*/ +func (a *Client) V1MaasSubnetsGet(params *V1MaasSubnetsGetParams) (*V1MaasSubnetsGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1MaasSubnetsGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "V1MaasSubnetsGet", + Method: "GET", + PathPattern: "/v1/clouds/maas/subnets", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1MaasSubnetsGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1MaasSubnetsGetOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for V1MaasSubnetsGet: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1MaasTagsGet retrieves a list of maas tags for a particular account uid +*/ +func (a *Client) V1MaasTagsGet(params *V1MaasTagsGetParams) (*V1MaasTagsGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1MaasTagsGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "V1MaasTagsGet", + Method: "GET", + PathPattern: "/v1/clouds/maas/tags", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1MaasTagsGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1MaasTagsGetOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for V1MaasTagsGet: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1MaasZonesGet retrieves a list of maas zones for a particular account uid +*/ +func (a *Client) V1MaasZonesGet(params *V1MaasZonesGetParams) (*V1MaasZonesGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1MaasZonesGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "V1MaasZonesGet", + Method: "GET", + PathPattern: "/v1/clouds/maas/azs", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1MaasZonesGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1MaasZonesGetOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for V1MaasZonesGet: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1OidcCallback idps authorization code callback + +Returns the Authorization token for the palette. This is called by the IDP as a callback url after IDP authenticates the user with its server. +*/ +func (a *Client) V1OidcCallback(params *V1OidcCallbackParams) (*V1OidcCallbackOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1OidcCallbackParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "V1OidcCallback", + Method: "GET", + PathPattern: "/v1/auth/org/{org}/oidc/callback", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1OidcCallbackReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1OidcCallbackOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for V1OidcCallback: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1OidcLogout identities provider logout url for the oidc + +Returns No Content. Works as a callback url after the IDP logout from their server. +*/ +func (a *Client) V1OidcLogout(params *V1OidcLogoutParams) (*V1OidcLogoutNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1OidcLogoutParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "V1OidcLogout", + Method: "GET", + PathPattern: "/v1/auth/org/{org}/oidc/logout", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1OidcLogoutReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1OidcLogoutNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for V1OidcLogout: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1OpenStackAccountValidate checks if open stack account is valid + +Returns no contents if account is valid else error. +*/ +func (a *Client) V1OpenStackAccountValidate(params *V1OpenStackAccountValidateParams) (*V1OpenStackAccountValidateNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1OpenStackAccountValidateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "V1OpenStackAccountValidate", + Method: "POST", + PathPattern: "/v1/clouds/openstack/account/validate", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1OpenStackAccountValidateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1OpenStackAccountValidateNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for V1OpenStackAccountValidate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1OpenStackAzsGet retrieves a list of open stack azs for a particular account uid +*/ +func (a *Client) V1OpenStackAzsGet(params *V1OpenStackAzsGetParams) (*V1OpenStackAzsGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1OpenStackAzsGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "V1OpenStackAzsGet", + Method: "GET", + PathPattern: "/v1/clouds/openstack/azs", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1OpenStackAzsGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1OpenStackAzsGetOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for V1OpenStackAzsGet: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1OpenStackFlavorsGet returns the open stack flavors +*/ +func (a *Client) V1OpenStackFlavorsGet(params *V1OpenStackFlavorsGetParams) (*V1OpenStackFlavorsGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1OpenStackFlavorsGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "V1OpenStackFlavorsGet", + Method: "GET", + PathPattern: "/v1/clouds/openstack/flavors", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1OpenStackFlavorsGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1OpenStackFlavorsGetOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for V1OpenStackFlavorsGet: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1OpenStackKeypairsGet returns the open stack keypair +*/ +func (a *Client) V1OpenStackKeypairsGet(params *V1OpenStackKeypairsGetParams) (*V1OpenStackKeypairsGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1OpenStackKeypairsGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "V1OpenStackKeypairsGet", + Method: "GET", + PathPattern: "/v1/clouds/openstack/keypairs", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1OpenStackKeypairsGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1OpenStackKeypairsGetOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for V1OpenStackKeypairsGet: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1OpenStackNetworksGet returns the open stack networks +*/ +func (a *Client) V1OpenStackNetworksGet(params *V1OpenStackNetworksGetParams) (*V1OpenStackNetworksGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1OpenStackNetworksGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "V1OpenStackNetworksGet", + Method: "GET", + PathPattern: "/v1/clouds/openstack/networks", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1OpenStackNetworksGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1OpenStackNetworksGetOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for V1OpenStackNetworksGet: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1OpenStackProjectsGet returns the open stack projects +*/ +func (a *Client) V1OpenStackProjectsGet(params *V1OpenStackProjectsGetParams) (*V1OpenStackProjectsGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1OpenStackProjectsGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "V1OpenStackProjectsGet", + Method: "GET", + PathPattern: "/v1/clouds/openstack/projects", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1OpenStackProjectsGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1OpenStackProjectsGetOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for V1OpenStackProjectsGet: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1OpenStackRegionsGet returns the open stack regions +*/ +func (a *Client) V1OpenStackRegionsGet(params *V1OpenStackRegionsGetParams) (*V1OpenStackRegionsGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1OpenStackRegionsGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "V1OpenStackRegionsGet", + Method: "GET", + PathPattern: "/v1/clouds/openstack/regions", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1OpenStackRegionsGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1OpenStackRegionsGetOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for V1OpenStackRegionsGet: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1OverlordsMaasManifest returns the manifests required for the private gateway installation +*/ +func (a *Client) V1OverlordsMaasManifest(params *V1OverlordsMaasManifestParams) (*V1OverlordsMaasManifestOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1OverlordsMaasManifestParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "V1OverlordsMaasManifest", + Method: "GET", + PathPattern: "/v1/overlords/maas/manifest", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1OverlordsMaasManifestReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1OverlordsMaasManifestOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for V1OverlordsMaasManifest: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1OverlordsMigrate migrates all the clusters from source overlord to target overlord +*/ +func (a *Client) V1OverlordsMigrate(params *V1OverlordsMigrateParams) (*V1OverlordsMigrateNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1OverlordsMigrateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "V1OverlordsMigrate", + Method: "POST", + PathPattern: "/v1/overlords/migrate", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1OverlordsMigrateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1OverlordsMigrateNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for V1OverlordsMigrate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1OverlordsUIDMaasCloudConfigCreate creates the maas cloud config for the private gateway +*/ +func (a *Client) V1OverlordsUIDMaasCloudConfigCreate(params *V1OverlordsUIDMaasCloudConfigCreateParams) (*V1OverlordsUIDMaasCloudConfigCreateCreated, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1OverlordsUIDMaasCloudConfigCreateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "V1OverlordsUidMaasCloudConfigCreate", + Method: "POST", + PathPattern: "/v1/overlords/maas/{uid}/cloudconfig", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1OverlordsUIDMaasCloudConfigCreateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1OverlordsUIDMaasCloudConfigCreateCreated) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for V1OverlordsUidMaasCloudConfigCreate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1OverlordsUIDMaasCloudConfigUpdate updates the maas cloud config for the private gateway +*/ +func (a *Client) V1OverlordsUIDMaasCloudConfigUpdate(params *V1OverlordsUIDMaasCloudConfigUpdateParams) (*V1OverlordsUIDMaasCloudConfigUpdateNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1OverlordsUIDMaasCloudConfigUpdateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "V1OverlordsUidMaasCloudConfigUpdate", + Method: "PUT", + PathPattern: "/v1/overlords/maas/{uid}/cloudconfig", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1OverlordsUIDMaasCloudConfigUpdateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1OverlordsUIDMaasCloudConfigUpdateNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for V1OverlordsUidMaasCloudConfigUpdate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1PasswordsBlockListDelete deletes a list of block listed passwords +*/ +func (a *Client) V1PasswordsBlockListDelete(params *V1PasswordsBlockListDeleteParams) (*V1PasswordsBlockListDeleteNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1PasswordsBlockListDeleteParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "V1PasswordsBlockListDelete", + Method: "DELETE", + PathPattern: "/v1/system/passwords/blocklist", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1PasswordsBlockListDeleteReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1PasswordsBlockListDeleteNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for V1PasswordsBlockListDelete: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1PasswordsBlockListUpdate lists of block listed passwords +*/ +func (a *Client) V1PasswordsBlockListUpdate(params *V1PasswordsBlockListUpdateParams) (*V1PasswordsBlockListUpdateNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1PasswordsBlockListUpdateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "V1PasswordsBlockListUpdate", + Method: "PATCH", + PathPattern: "/v1/system/passwords/blocklist", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1PasswordsBlockListUpdateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1PasswordsBlockListUpdateNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for V1PasswordsBlockListUpdate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1RegistriesHelmValidate checks if helm registry is valid + +Returns no contents if helm registry is valid else error. +*/ +func (a *Client) V1RegistriesHelmValidate(params *V1RegistriesHelmValidateParams) (*V1RegistriesHelmValidateNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1RegistriesHelmValidateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "V1RegistriesHelmValidate", + Method: "POST", + PathPattern: "/v1/registries/helm/validate", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1RegistriesHelmValidateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1RegistriesHelmValidateNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for V1RegistriesHelmValidate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1RegistriesPackValidate checks if pack registry is valid + +Returns no contents if pack registry is valid else error. +*/ +func (a *Client) V1RegistriesPackValidate(params *V1RegistriesPackValidateParams) (*V1RegistriesPackValidateNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1RegistriesPackValidateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "V1RegistriesPackValidate", + Method: "POST", + PathPattern: "/v1/registries/pack/validate", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1RegistriesPackValidateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1RegistriesPackValidateNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for V1RegistriesPackValidate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1SamlCallback identities provider callback url for the s m a l authentication + +Returns the Authorization token for the palette. This is called by the SAML based IDP as a callback url after IDP authenticates the user with its server. +*/ +func (a *Client) V1SamlCallback(params *V1SamlCallbackParams) (*V1SamlCallbackOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1SamlCallbackParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "V1SamlCallback", + Method: "POST", + PathPattern: "/v1/auth/org/{org}/saml/callback", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/x-www-form-urlencoded"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1SamlCallbackReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1SamlCallbackOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for V1SamlCallback: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1SamlLogout identities provider logout url for the s m a l + +Returns No Content. Works as a callback url after the IDP logout from their server. +*/ +func (a *Client) V1SamlLogout(params *V1SamlLogoutParams) (*V1SamlLogoutNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1SamlLogoutParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "V1SamlLogout", + Method: "POST", + PathPattern: "/v1/auth/org/{org}/saml/logout", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/x-www-form-urlencoded"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1SamlLogoutReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1SamlLogoutNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for V1SamlLogout: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1SpectroClustersUIDKubeCtlRedirect returns the specified cluster s kube config file +*/ +func (a *Client) V1SpectroClustersUIDKubeCtlRedirect(params *V1SpectroClustersUIDKubeCtlRedirectParams) (*V1SpectroClustersUIDKubeCtlRedirectOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1SpectroClustersUIDKubeCtlRedirectParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "V1SpectroClustersUidKubeCtlRedirect", + Method: "GET", + PathPattern: "/v1/spectroclusters/{uid}/kubectl/redirect", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1SpectroClustersUIDKubeCtlRedirectReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1SpectroClustersUIDKubeCtlRedirectOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for V1SpectroClustersUidKubeCtlRedirect: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1SpectroClustersUIDOIDC returns k8s spectrocluster oidc +*/ +func (a *Client) V1SpectroClustersUIDOIDC(params *V1SpectroClustersUIDOIDCParams) (*V1SpectroClustersUIDOIDCOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1SpectroClustersUIDOIDCParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "V1SpectroClustersUidOIDC", + Method: "GET", + PathPattern: "/v1/spectroclusters/{uid}/oidc", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1SpectroClustersUIDOIDCReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1SpectroClustersUIDOIDCOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for V1SpectroClustersUidOIDC: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1SpectroClustersUIDOIDCDashboardURL returns k8s dashboard url +*/ +func (a *Client) V1SpectroClustersUIDOIDCDashboardURL(params *V1SpectroClustersUIDOIDCDashboardURLParams) (*V1SpectroClustersUIDOIDCDashboardURLOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1SpectroClustersUIDOIDCDashboardURLParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "V1SpectroClustersUidOIDCDashboardUrl", + Method: "GET", + PathPattern: "/v1/spectroclusters/{uid}/oidc/dashboard/url", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1SpectroClustersUIDOIDCDashboardURLReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1SpectroClustersUIDOIDCDashboardURLOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for V1SpectroClustersUidOIDCDashboardUrl: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1SpectroClustersUIDReset resets the cluster s by deleting machine pools and condtions +*/ +func (a *Client) V1SpectroClustersUIDReset(params *V1SpectroClustersUIDResetParams) (*V1SpectroClustersUIDResetNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1SpectroClustersUIDResetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "V1SpectroClustersUidReset", + Method: "PUT", + PathPattern: "/v1/spectroclusters/{uid}/reset", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1SpectroClustersUIDResetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1SpectroClustersUIDResetNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for V1SpectroClustersUidReset: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1SsoCallback returns authorization token works as a callback url for the system defined sso apps + +Returns Authorization token. Works as a callback url for the system defined sso apps +*/ +func (a *Client) V1SsoCallback(params *V1SsoCallbackParams) (*V1SsoCallbackOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1SsoCallbackParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "V1SsoCallback", + Method: "GET", + PathPattern: "/v1/auth/sso/{ssoApp}/callback", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1SsoCallbackReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1SsoCallbackOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for V1SsoCallback: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1SsoIdps returns a list of predefined identity provider ID p + +Returns a list of predefined Identity Provider (IDP) +*/ +func (a *Client) V1SsoIdps(params *V1SsoIdpsParams) (*V1SsoIdpsOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1SsoIdpsParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "V1SsoIdps", + Method: "GET", + PathPattern: "/v1/auth/sso/idps", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1SsoIdpsReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1SsoIdpsOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for V1SsoIdps: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1SsoLogins returns a list of supported sso logins + +Returns a list of supported sso logins and their authentication mechanism +*/ +func (a *Client) V1SsoLogins(params *V1SsoLoginsParams) (*V1SsoLoginsOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1SsoLoginsParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "V1SsoLogins", + Method: "GET", + PathPattern: "/v1/auth/sso/logins", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1SsoLoginsReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1SsoLoginsOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for V1SsoLogins: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1SystemConfigReverseProxyGet gets the system config reverse proxy +*/ +func (a *Client) V1SystemConfigReverseProxyGet(params *V1SystemConfigReverseProxyGetParams) (*V1SystemConfigReverseProxyGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1SystemConfigReverseProxyGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "V1SystemConfigReverseProxyGet", + Method: "GET", + PathPattern: "/v1/system/config/reverseproxy", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1SystemConfigReverseProxyGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1SystemConfigReverseProxyGetOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for V1SystemConfigReverseProxyGet: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1SystemConfigReverseProxyUpdate updates the system config reverse proxy +*/ +func (a *Client) V1SystemConfigReverseProxyUpdate(params *V1SystemConfigReverseProxyUpdateParams) (*V1SystemConfigReverseProxyUpdateNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1SystemConfigReverseProxyUpdateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "V1SystemConfigReverseProxyUpdate", + Method: "PUT", + PathPattern: "/v1/system/config/reverseproxy", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1SystemConfigReverseProxyUpdateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1SystemConfigReverseProxyUpdateNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for V1SystemConfigReverseProxyUpdate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1TeamsUIDTenantRolesGet returns the specified team s tenant roles +*/ +func (a *Client) V1TeamsUIDTenantRolesGet(params *V1TeamsUIDTenantRolesGetParams) (*V1TeamsUIDTenantRolesGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1TeamsUIDTenantRolesGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "V1TeamsUidTenantRolesGet", + Method: "GET", + PathPattern: "/v1/teams/{uid}/roles", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1TeamsUIDTenantRolesGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1TeamsUIDTenantRolesGetOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for V1TeamsUidTenantRolesGet: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1TeamsUIDTenantRolesUpdate updates the tenant roles of the specified team +*/ +func (a *Client) V1TeamsUIDTenantRolesUpdate(params *V1TeamsUIDTenantRolesUpdateParams) (*V1TeamsUIDTenantRolesUpdateNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1TeamsUIDTenantRolesUpdateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "V1TeamsUidTenantRolesUpdate", + Method: "PUT", + PathPattern: "/v1/teams/{uid}/roles", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1TeamsUIDTenantRolesUpdateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1TeamsUIDTenantRolesUpdateNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for V1TeamsUidTenantRolesUpdate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1TenantDeveloperCreditGet gets developer credit enabled for a specific tenant +*/ +func (a *Client) V1TenantDeveloperCreditGet(params *V1TenantDeveloperCreditGetParams) (*V1TenantDeveloperCreditGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1TenantDeveloperCreditGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "V1TenantDeveloperCreditGet", + Method: "GET", + PathPattern: "/v1/tenants/{tenantUid}/preferences/developerCredit", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1TenantDeveloperCreditGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1TenantDeveloperCreditGetOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for V1TenantDeveloperCreditGet: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1TenantDeveloperCreditUpdate updates developer credit for a specific tenant +*/ +func (a *Client) V1TenantDeveloperCreditUpdate(params *V1TenantDeveloperCreditUpdateParams) (*V1TenantDeveloperCreditUpdateNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1TenantDeveloperCreditUpdateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "V1TenantDeveloperCreditUpdate", + Method: "PUT", + PathPattern: "/v1/tenants/{tenantUid}/preferences/developerCredit", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1TenantDeveloperCreditUpdateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1TenantDeveloperCreditUpdateNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for V1TenantDeveloperCreditUpdate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1TenantPrefClusterGroupGet gets is cluster group enabled for a specific tenant +*/ +func (a *Client) V1TenantPrefClusterGroupGet(params *V1TenantPrefClusterGroupGetParams) (*V1TenantPrefClusterGroupGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1TenantPrefClusterGroupGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "V1TenantPrefClusterGroupGet", + Method: "GET", + PathPattern: "/v1/tenants/{tenantUid}/preferences/clusterGroup", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1TenantPrefClusterGroupGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1TenantPrefClusterGroupGetOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for V1TenantPrefClusterGroupGet: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1TenantPrefClusterGroupUpdate enables or disable cluster group for a specific tenant +*/ +func (a *Client) V1TenantPrefClusterGroupUpdate(params *V1TenantPrefClusterGroupUpdateParams) (*V1TenantPrefClusterGroupUpdateNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1TenantPrefClusterGroupUpdateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "V1TenantPrefClusterGroupUpdate", + Method: "PUT", + PathPattern: "/v1/tenants/{tenantUid}/preferences/clusterGroup", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1TenantPrefClusterGroupUpdateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1TenantPrefClusterGroupUpdateNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for V1TenantPrefClusterGroupUpdate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1TenantUIDAssetsCertsList lists the certificates for the tenant +*/ +func (a *Client) V1TenantUIDAssetsCertsList(params *V1TenantUIDAssetsCertsListParams) (*V1TenantUIDAssetsCertsListOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1TenantUIDAssetsCertsListParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "V1TenantUIdAssetsCertsList", + Method: "GET", + PathPattern: "/v1/tenants/{tenantUid}/assets/certs", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1TenantUIDAssetsCertsListReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1TenantUIDAssetsCertsListOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for V1TenantUIdAssetsCertsList: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1TenantUIDAssetsCertsCreate creates the tenant certificate +*/ +func (a *Client) V1TenantUIDAssetsCertsCreate(params *V1TenantUIDAssetsCertsCreateParams) (*V1TenantUIDAssetsCertsCreateCreated, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1TenantUIDAssetsCertsCreateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "V1TenantUidAssetsCertsCreate", + Method: "POST", + PathPattern: "/v1/tenants/{tenantUid}/assets/certs", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1TenantUIDAssetsCertsCreateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1TenantUIDAssetsCertsCreateCreated) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for V1TenantUidAssetsCertsCreate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1TenantUIDAssetsCertsUIDDelete deletes the tenant certificate +*/ +func (a *Client) V1TenantUIDAssetsCertsUIDDelete(params *V1TenantUIDAssetsCertsUIDDeleteParams) (*V1TenantUIDAssetsCertsUIDDeleteNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1TenantUIDAssetsCertsUIDDeleteParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "V1TenantUidAssetsCertsUidDelete", + Method: "DELETE", + PathPattern: "/v1/tenants/{tenantUid}/assets/certs/{certificateUid}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1TenantUIDAssetsCertsUIDDeleteReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1TenantUIDAssetsCertsUIDDeleteNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for V1TenantUidAssetsCertsUidDelete: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1TenantUIDAssetsCertsUIDGet returns the ca certificate for the tenant +*/ +func (a *Client) V1TenantUIDAssetsCertsUIDGet(params *V1TenantUIDAssetsCertsUIDGetParams) (*V1TenantUIDAssetsCertsUIDGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1TenantUIDAssetsCertsUIDGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "V1TenantUidAssetsCertsUidGet", + Method: "GET", + PathPattern: "/v1/tenants/{tenantUid}/assets/certs/{certificateUid}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1TenantUIDAssetsCertsUIDGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1TenantUIDAssetsCertsUIDGetOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for V1TenantUidAssetsCertsUidGet: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1TenantUIDAssetsCertsUIDUpdate updates the tenant certificate +*/ +func (a *Client) V1TenantUIDAssetsCertsUIDUpdate(params *V1TenantUIDAssetsCertsUIDUpdateParams) (*V1TenantUIDAssetsCertsUIDUpdateNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1TenantUIDAssetsCertsUIDUpdateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "V1TenantUidAssetsCertsUidUpdate", + Method: "PUT", + PathPattern: "/v1/tenants/{tenantUid}/assets/certs/{certificateUid}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1TenantUIDAssetsCertsUIDUpdateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1TenantUIDAssetsCertsUIDUpdateNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for V1TenantUidAssetsCertsUidUpdate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1TenantUIDAssetsDataSinksCreate creates data sink config +*/ +func (a *Client) V1TenantUIDAssetsDataSinksCreate(params *V1TenantUIDAssetsDataSinksCreateParams) (*V1TenantUIDAssetsDataSinksCreateCreated, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1TenantUIDAssetsDataSinksCreateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "V1TenantUidAssetsDataSinksCreate", + Method: "POST", + PathPattern: "/v1/tenants/{tenantUid}/assets/dataSinks", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1TenantUIDAssetsDataSinksCreateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1TenantUIDAssetsDataSinksCreateCreated) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for V1TenantUidAssetsDataSinksCreate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1TenantUIDAssetsDataSinksDelete deletes the tenant data sink config +*/ +func (a *Client) V1TenantUIDAssetsDataSinksDelete(params *V1TenantUIDAssetsDataSinksDeleteParams) (*V1TenantUIDAssetsDataSinksDeleteNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1TenantUIDAssetsDataSinksDeleteParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "V1TenantUidAssetsDataSinksDelete", + Method: "DELETE", + PathPattern: "/v1/tenants/{tenantUid}/assets/dataSinks", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1TenantUIDAssetsDataSinksDeleteReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1TenantUIDAssetsDataSinksDeleteNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for V1TenantUidAssetsDataSinksDelete: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1TenantUIDAssetsDataSinksGet returns data sink config of tenant +*/ +func (a *Client) V1TenantUIDAssetsDataSinksGet(params *V1TenantUIDAssetsDataSinksGetParams) (*V1TenantUIDAssetsDataSinksGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1TenantUIDAssetsDataSinksGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "V1TenantUidAssetsDataSinksGet", + Method: "GET", + PathPattern: "/v1/tenants/{tenantUid}/assets/dataSinks", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1TenantUIDAssetsDataSinksGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1TenantUIDAssetsDataSinksGetOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for V1TenantUidAssetsDataSinksGet: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1TenantUIDAssetsDataSinksUpdate updates the tenant data sink config +*/ +func (a *Client) V1TenantUIDAssetsDataSinksUpdate(params *V1TenantUIDAssetsDataSinksUpdateParams) (*V1TenantUIDAssetsDataSinksUpdateNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1TenantUIDAssetsDataSinksUpdateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "V1TenantUidAssetsDataSinksUpdate", + Method: "PUT", + PathPattern: "/v1/tenants/{tenantUid}/assets/dataSinks", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1TenantUIDAssetsDataSinksUpdateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1TenantUIDAssetsDataSinksUpdateNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for V1TenantUidAssetsDataSinksUpdate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1TenantUIDDomainsGet retrieves the domains for tenant +*/ +func (a *Client) V1TenantUIDDomainsGet(params *V1TenantUIDDomainsGetParams) (*V1TenantUIDDomainsGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1TenantUIDDomainsGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "V1TenantUidDomainsGet", + Method: "GET", + PathPattern: "/v1/tenants/{tenantUid}/domains", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1TenantUIDDomainsGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1TenantUIDDomainsGetOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for V1TenantUidDomainsGet: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1TenantUIDDomainsUpdate creates or updates domains for tenant +*/ +func (a *Client) V1TenantUIDDomainsUpdate(params *V1TenantUIDDomainsUpdateParams) (*V1TenantUIDDomainsUpdateNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1TenantUIDDomainsUpdateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "V1TenantUidDomainsUpdate", + Method: "POST", + PathPattern: "/v1/tenants/{tenantUid}/domains", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1TenantUIDDomainsUpdateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1TenantUIDDomainsUpdateNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for V1TenantUidDomainsUpdate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1TenantUIDOidcConfigGet returns the oidc spec for tenant +*/ +func (a *Client) V1TenantUIDOidcConfigGet(params *V1TenantUIDOidcConfigGetParams) (*V1TenantUIDOidcConfigGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1TenantUIDOidcConfigGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "V1TenantUidOidcConfigGet", + Method: "GET", + PathPattern: "/v1/tenants/{tenantUid}/oidc/config", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1TenantUIDOidcConfigGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1TenantUIDOidcConfigGetOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for V1TenantUidOidcConfigGet: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1TenantUIDOidcConfigUpdate associates the oidc spec for the tenant +*/ +func (a *Client) V1TenantUIDOidcConfigUpdate(params *V1TenantUIDOidcConfigUpdateParams) (*V1TenantUIDOidcConfigUpdateNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1TenantUIDOidcConfigUpdateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "V1TenantUidOidcConfigUpdate", + Method: "POST", + PathPattern: "/v1/tenants/{tenantUid}/oidc/config", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1TenantUIDOidcConfigUpdateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1TenantUIDOidcConfigUpdateNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for V1TenantUidOidcConfigUpdate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1TenantUIDPasswordPolicyUpdate creates or updates a password policy for tenant +*/ +func (a *Client) V1TenantUIDPasswordPolicyUpdate(params *V1TenantUIDPasswordPolicyUpdateParams) (*V1TenantUIDPasswordPolicyUpdateNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1TenantUIDPasswordPolicyUpdateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "V1TenantUidPasswordPolicyUpdate", + Method: "POST", + PathPattern: "/v1/tenants/{tenantUid}/password/policy", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1TenantUIDPasswordPolicyUpdateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1TenantUIDPasswordPolicyUpdateNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for V1TenantUidPasswordPolicyUpdate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1TenantUIDSamlConfigSpecGet returns the specified service provider metadata and saml spec for tenant +*/ +func (a *Client) V1TenantUIDSamlConfigSpecGet(params *V1TenantUIDSamlConfigSpecGetParams) (*V1TenantUIDSamlConfigSpecGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1TenantUIDSamlConfigSpecGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "V1TenantUidSamlConfigSpecGet", + Method: "GET", + PathPattern: "/v1/tenants/{tenantUid}/saml/config", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1TenantUIDSamlConfigSpecGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1TenantUIDSamlConfigSpecGetOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for V1TenantUidSamlConfigSpecGet: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1TenantUIDSamlConfigUpdate associates the specified federation metadata for the tenant +*/ +func (a *Client) V1TenantUIDSamlConfigUpdate(params *V1TenantUIDSamlConfigUpdateParams) (*V1TenantUIDSamlConfigUpdateNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1TenantUIDSamlConfigUpdateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "V1TenantUidSamlConfigUpdate", + Method: "POST", + PathPattern: "/v1/tenants/{tenantUid}/saml/config", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1TenantUIDSamlConfigUpdateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1TenantUIDSamlConfigUpdateNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for V1TenantUidSamlConfigUpdate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1TenantUIDSsoAuthProvidersGet gets sso logins for the tenants +*/ +func (a *Client) V1TenantUIDSsoAuthProvidersGet(params *V1TenantUIDSsoAuthProvidersGetParams) (*V1TenantUIDSsoAuthProvidersGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1TenantUIDSsoAuthProvidersGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "V1TenantUidSsoAuthProvidersGet", + Method: "GET", + PathPattern: "/v1/tenants/{tenantUid}/sso/auth/providers", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1TenantUIDSsoAuthProvidersGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1TenantUIDSsoAuthProvidersGetOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for V1TenantUidSsoAuthProvidersGet: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1TenantUIDSsoAuthProvidersUpdate enables sso logins for the tenants +*/ +func (a *Client) V1TenantUIDSsoAuthProvidersUpdate(params *V1TenantUIDSsoAuthProvidersUpdateParams) (*V1TenantUIDSsoAuthProvidersUpdateNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1TenantUIDSsoAuthProvidersUpdateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "V1TenantUidSsoAuthProvidersUpdate", + Method: "POST", + PathPattern: "/v1/tenants/{tenantUid}/sso/auth/providers", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1TenantUIDSsoAuthProvidersUpdateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1TenantUIDSsoAuthProvidersUpdateNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for V1TenantUidSsoAuthProvidersUpdate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1TencentAccountValidate validates the specified tencent account credentials +*/ +func (a *Client) V1TencentAccountValidate(params *V1TencentAccountValidateParams) (*V1TencentAccountValidateNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1TencentAccountValidateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "V1TencentAccountValidate", + Method: "POST", + PathPattern: "/v1/clouds/tencent/account/validate", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1TencentAccountValidateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1TencentAccountValidateNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for V1TencentAccountValidate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1TencentInstanceTypes retrieves a list of tencent instance types +*/ +func (a *Client) V1TencentInstanceTypes(params *V1TencentInstanceTypesParams) (*V1TencentInstanceTypesOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1TencentInstanceTypesParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "V1TencentInstanceTypes", + Method: "GET", + PathPattern: "/v1/clouds/tencent/regions/{region}/instancetypes", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1TencentInstanceTypesReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1TencentInstanceTypesOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for V1TencentInstanceTypes: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1TencentKeypairs retrieves a list of keypairs for the specified account +*/ +func (a *Client) V1TencentKeypairs(params *V1TencentKeypairsParams) (*V1TencentKeypairsOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1TencentKeypairsParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "V1TencentKeypairs", + Method: "GET", + PathPattern: "/v1/clouds/tencent/regions/{region}/keypairs", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1TencentKeypairsReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1TencentKeypairsOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for V1TencentKeypairs: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1TencentRegions retrieves a list of tencent regions for the specified account +*/ +func (a *Client) V1TencentRegions(params *V1TencentRegionsParams) (*V1TencentRegionsOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1TencentRegionsParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "V1TencentRegions", + Method: "GET", + PathPattern: "/v1/clouds/tencent/regions", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1TencentRegionsReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1TencentRegionsOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for V1TencentRegions: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1TencentSecurityGroups retrieves a list of secutity groups for the specified account +*/ +func (a *Client) V1TencentSecurityGroups(params *V1TencentSecurityGroupsParams) (*V1TencentSecurityGroupsOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1TencentSecurityGroupsParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "V1TencentSecurityGroups", + Method: "GET", + PathPattern: "/v1/clouds/tencent/regions/{region}/securitygroups", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1TencentSecurityGroupsReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1TencentSecurityGroupsOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for V1TencentSecurityGroups: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1TencentStorageTypes retrieves a list of tencent storage types +*/ +func (a *Client) V1TencentStorageTypes(params *V1TencentStorageTypesParams) (*V1TencentStorageTypesOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1TencentStorageTypesParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "V1TencentStorageTypes", + Method: "GET", + PathPattern: "/v1/clouds/tencent/regions/{region}/storagetypes", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1TencentStorageTypesReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1TencentStorageTypesOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for V1TencentStorageTypes: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1TencentVpcs retrieves a list of v p cs for the specified account +*/ +func (a *Client) V1TencentVpcs(params *V1TencentVpcsParams) (*V1TencentVpcsOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1TencentVpcsParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "V1TencentVpcs", + Method: "GET", + PathPattern: "/v1/clouds/tencent/regions/{region}/vpcs", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1TencentVpcsReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1TencentVpcsOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for V1TencentVpcs: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1TencentZones retrieves a list of tencent availability zones for the specified region +*/ +func (a *Client) V1TencentZones(params *V1TencentZonesParams) (*V1TencentZonesOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1TencentZonesParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "V1TencentZones", + Method: "GET", + PathPattern: "/v1/clouds/tencent/regions/{region}/zones", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1TencentZonesReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1TencentZonesOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for V1TencentZones: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1UsersConfigScarGet gets the system spectro repository restricted to edge services +*/ +func (a *Client) V1UsersConfigScarGet(params *V1UsersConfigScarGetParams) (*V1UsersConfigScarGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1UsersConfigScarGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "V1UsersConfigScarGet", + Method: "GET", + PathPattern: "/v1/users/config/scar", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1UsersConfigScarGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1UsersConfigScarGetOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for V1UsersConfigScarGet: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1UsersKubectlSessionUID gets users kubectl session + +gets users kubectl session +*/ +func (a *Client) V1UsersKubectlSessionUID(params *V1UsersKubectlSessionUIDParams) (*V1UsersKubectlSessionUIDOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1UsersKubectlSessionUIDParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "V1UsersKubectlSessionUid", + Method: "GET", + PathPattern: "/v1/users/kubectl/session/{sessionUid}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1UsersKubectlSessionUIDReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1UsersKubectlSessionUIDOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for V1UsersKubectlSessionUid: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1UsersPasswordChange users password change request using the user email Id + +User password change request via current password and emailId +*/ +func (a *Client) V1UsersPasswordChange(params *V1UsersPasswordChangeParams) (*V1UsersPasswordChangeNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1UsersPasswordChangeParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "V1UsersPasswordChange", + Method: "PATCH", + PathPattern: "/v1/users/password/change", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1UsersPasswordChangeReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1UsersPasswordChangeNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for V1UsersPasswordChange: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1VsphereAccountValidate checks if vsphere account is valid + +Returns no contents if account is valid else error. +*/ +func (a *Client) V1VsphereAccountValidate(params *V1VsphereAccountValidateParams) (*V1VsphereAccountValidateNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1VsphereAccountValidateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "V1VsphereAccountValidate", + Method: "POST", + PathPattern: "/v1/clouds/vsphere/account/validate", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1VsphereAccountValidateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1VsphereAccountValidateNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for V1VsphereAccountValidate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1VsphereComputeClusterResources returns the resources for vsphere compute cluster +*/ +func (a *Client) V1VsphereComputeClusterResources(params *V1VsphereComputeClusterResourcesParams) (*V1VsphereComputeClusterResourcesOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1VsphereComputeClusterResourcesParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "V1VsphereComputeClusterResources", + Method: "GET", + PathPattern: "/v1/clouds/vsphere/datacenters/{uid}/computeclusters/{computecluster}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1VsphereComputeClusterResourcesReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1VsphereComputeClusterResourcesOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for V1VsphereComputeClusterResources: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1VsphereDatacenters returns the vsphere data centers +*/ +func (a *Client) V1VsphereDatacenters(params *V1VsphereDatacentersParams) (*V1VsphereDatacentersOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1VsphereDatacentersParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "V1VsphereDatacenters", + Method: "GET", + PathPattern: "/v1/clouds/vsphere/datacenters", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1VsphereDatacentersReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1VsphereDatacentersOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for V1VsphereDatacenters: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1VsphereEnv retrieves vsphere env +*/ +func (a *Client) V1VsphereEnv(params *V1VsphereEnvParams) (*V1VsphereEnvOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1VsphereEnvParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "V1VsphereEnv", + Method: "GET", + PathPattern: "/v1/clouds/vsphere/env", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1VsphereEnvReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1VsphereEnvOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for V1VsphereEnv: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1AccountsGeolocationPatch updates the geolocation annotation +*/ +func (a *Client) V1AccountsGeolocationPatch(params *V1AccountsGeolocationPatchParams) (*V1AccountsGeolocationPatchNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1AccountsGeolocationPatchParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1AccountsGeolocationPatch", + Method: "PATCH", + PathPattern: "/v1/cloudaccounts/{uid}/geoLocation", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1AccountsGeolocationPatchReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1AccountsGeolocationPatchNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1AccountsGeolocationPatch: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1APIKeysCreate creates an API key +*/ +func (a *Client) V1APIKeysCreate(params *V1APIKeysCreateParams) (*V1APIKeysCreateCreated, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1APIKeysCreateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1ApiKeysCreate", + Method: "POST", + PathPattern: "/v1/apiKeys", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1APIKeysCreateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1APIKeysCreateCreated) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1ApiKeysCreate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1APIKeysList retrieves a list of API keys +*/ +func (a *Client) V1APIKeysList(params *V1APIKeysListParams) (*V1APIKeysListOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1APIKeysListParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1ApiKeysList", + Method: "GET", + PathPattern: "/v1/apiKeys", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1APIKeysListReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1APIKeysListOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1ApiKeysList: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1APIKeysUIDActiveState activates or de active the specified API key +*/ +func (a *Client) V1APIKeysUIDActiveState(params *V1APIKeysUIDActiveStateParams) (*V1APIKeysUIDActiveStateNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1APIKeysUIDActiveStateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1ApiKeysUidActiveState", + Method: "PATCH", + PathPattern: "/v1/apiKeys/{uid}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1APIKeysUIDActiveStateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1APIKeysUIDActiveStateNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1ApiKeysUidActiveState: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1APIKeysUIDDelete deletes the specified API key +*/ +func (a *Client) V1APIKeysUIDDelete(params *V1APIKeysUIDDeleteParams) (*V1APIKeysUIDDeleteNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1APIKeysUIDDeleteParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1ApiKeysUidDelete", + Method: "DELETE", + PathPattern: "/v1/apiKeys/{uid}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1APIKeysUIDDeleteReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1APIKeysUIDDeleteNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1ApiKeysUidDelete: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1APIKeysUIDGet returns the specified API key +*/ +func (a *Client) V1APIKeysUIDGet(params *V1APIKeysUIDGetParams) (*V1APIKeysUIDGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1APIKeysUIDGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1ApiKeysUidGet", + Method: "GET", + PathPattern: "/v1/apiKeys/{uid}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1APIKeysUIDGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1APIKeysUIDGetOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1ApiKeysUidGet: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1APIKeysUIDState revokes or re activate the API key access +*/ +func (a *Client) V1APIKeysUIDState(params *V1APIKeysUIDStateParams) (*V1APIKeysUIDStateNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1APIKeysUIDStateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1ApiKeysUidState", + Method: "PUT", + PathPattern: "/v1/apiKeys/{uid}/state", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1APIKeysUIDStateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1APIKeysUIDStateNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1ApiKeysUidState: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1APIKeysUIDUpdate updates the specified API key +*/ +func (a *Client) V1APIKeysUIDUpdate(params *V1APIKeysUIDUpdateParams) (*V1APIKeysUIDUpdateNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1APIKeysUIDUpdateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1ApiKeysUidUpdate", + Method: "PUT", + PathPattern: "/v1/apiKeys/{uid}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1APIKeysUIDUpdateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1APIKeysUIDUpdateNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1ApiKeysUidUpdate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1AppDeploymentsClusterGroupCreate creates a application deployment in one of virtual clusters in the cluster group +*/ +func (a *Client) V1AppDeploymentsClusterGroupCreate(params *V1AppDeploymentsClusterGroupCreateParams) (*V1AppDeploymentsClusterGroupCreateCreated, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1AppDeploymentsClusterGroupCreateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1AppDeploymentsClusterGroupCreate", + Method: "POST", + PathPattern: "/v1/appDeployments/clusterGroup", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1AppDeploymentsClusterGroupCreateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1AppDeploymentsClusterGroupCreateCreated) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1AppDeploymentsClusterGroupCreate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1AppDeploymentsProfileTiersManifestsUIDGet returns the specified application deployment tier manifest information +*/ +func (a *Client) V1AppDeploymentsProfileTiersManifestsUIDGet(params *V1AppDeploymentsProfileTiersManifestsUIDGetParams) (*V1AppDeploymentsProfileTiersManifestsUIDGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1AppDeploymentsProfileTiersManifestsUIDGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1AppDeploymentsProfileTiersManifestsUidGet", + Method: "GET", + PathPattern: "/v1/appDeployments/{uid}/profile/tiers/{tierUid}/manifests/{manifestUid}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1AppDeploymentsProfileTiersManifestsUIDGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1AppDeploymentsProfileTiersManifestsUIDGetOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1AppDeploymentsProfileTiersManifestsUidGet: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1AppDeploymentsProfileTiersManifestsUIDUpdate updates the specified application deployment tier manifest information +*/ +func (a *Client) V1AppDeploymentsProfileTiersManifestsUIDUpdate(params *V1AppDeploymentsProfileTiersManifestsUIDUpdateParams) (*V1AppDeploymentsProfileTiersManifestsUIDUpdateNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1AppDeploymentsProfileTiersManifestsUIDUpdateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1AppDeploymentsProfileTiersManifestsUidUpdate", + Method: "PUT", + PathPattern: "/v1/appDeployments/{uid}/profile/tiers/{tierUid}/manifests/{manifestUid}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1AppDeploymentsProfileTiersManifestsUIDUpdateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1AppDeploymentsProfileTiersManifestsUIDUpdateNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1AppDeploymentsProfileTiersManifestsUidUpdate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1AppDeploymentsProfileTiersUIDGet returns the specified application deployment profile tier information +*/ +func (a *Client) V1AppDeploymentsProfileTiersUIDGet(params *V1AppDeploymentsProfileTiersUIDGetParams) (*V1AppDeploymentsProfileTiersUIDGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1AppDeploymentsProfileTiersUIDGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1AppDeploymentsProfileTiersUidGet", + Method: "GET", + PathPattern: "/v1/appDeployments/{uid}/profile/tiers/{tierUid}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1AppDeploymentsProfileTiersUIDGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1AppDeploymentsProfileTiersUIDGetOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1AppDeploymentsProfileTiersUidGet: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1AppDeploymentsProfileTiersUIDManifestsGet retrieves a list of manifests of the specified application deployment profile tier +*/ +func (a *Client) V1AppDeploymentsProfileTiersUIDManifestsGet(params *V1AppDeploymentsProfileTiersUIDManifestsGetParams) (*V1AppDeploymentsProfileTiersUIDManifestsGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1AppDeploymentsProfileTiersUIDManifestsGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1AppDeploymentsProfileTiersUidManifestsGet", + Method: "GET", + PathPattern: "/v1/appDeployments/{uid}/profile/tiers/{tierUid}/manifests", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1AppDeploymentsProfileTiersUIDManifestsGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1AppDeploymentsProfileTiersUIDManifestsGetOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1AppDeploymentsProfileTiersUidManifestsGet: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1AppDeploymentsProfileTiersUIDUpdate updates the specified application deployment profile tier information +*/ +func (a *Client) V1AppDeploymentsProfileTiersUIDUpdate(params *V1AppDeploymentsProfileTiersUIDUpdateParams) (*V1AppDeploymentsProfileTiersUIDUpdateNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1AppDeploymentsProfileTiersUIDUpdateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1AppDeploymentsProfileTiersUidUpdate", + Method: "PUT", + PathPattern: "/v1/appDeployments/{uid}/profile/tiers/{tierUid}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1AppDeploymentsProfileTiersUIDUpdateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1AppDeploymentsProfileTiersUIDUpdateNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1AppDeploymentsProfileTiersUidUpdate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1AppDeploymentsUIDDelete deletes the specified application deployment +*/ +func (a *Client) V1AppDeploymentsUIDDelete(params *V1AppDeploymentsUIDDeleteParams) (*V1AppDeploymentsUIDDeleteNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1AppDeploymentsUIDDeleteParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1AppDeploymentsUidDelete", + Method: "DELETE", + PathPattern: "/v1/appDeployments/{uid}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1AppDeploymentsUIDDeleteReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1AppDeploymentsUIDDeleteNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1AppDeploymentsUidDelete: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1AppDeploymentsUIDGet returns the specified application deployment +*/ +func (a *Client) V1AppDeploymentsUIDGet(params *V1AppDeploymentsUIDGetParams) (*V1AppDeploymentsUIDGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1AppDeploymentsUIDGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1AppDeploymentsUidGet", + Method: "GET", + PathPattern: "/v1/appDeployments/{uid}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1AppDeploymentsUIDGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1AppDeploymentsUIDGetOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1AppDeploymentsUidGet: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1AppDeploymentsUIDProfileApply applies the application deployment profile updates +*/ +func (a *Client) V1AppDeploymentsUIDProfileApply(params *V1AppDeploymentsUIDProfileApplyParams) (*V1AppDeploymentsUIDProfileApplyNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1AppDeploymentsUIDProfileApplyParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1AppDeploymentsUidProfileApply", + Method: "PATCH", + PathPattern: "/v1/appDeployments/{uid}/profile/apply", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1AppDeploymentsUIDProfileApplyReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1AppDeploymentsUIDProfileApplyNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1AppDeploymentsUidProfileApply: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1AppDeploymentsUIDProfileGet returns profile of the specified application deployment +*/ +func (a *Client) V1AppDeploymentsUIDProfileGet(params *V1AppDeploymentsUIDProfileGetParams) (*V1AppDeploymentsUIDProfileGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1AppDeploymentsUIDProfileGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1AppDeploymentsUidProfileGet", + Method: "GET", + PathPattern: "/v1/appDeployments/{uid}/profile", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1AppDeploymentsUIDProfileGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1AppDeploymentsUIDProfileGetOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1AppDeploymentsUidProfileGet: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1AppDeploymentsUIDProfileUpdate updates the specified application deployment profile +*/ +func (a *Client) V1AppDeploymentsUIDProfileUpdate(params *V1AppDeploymentsUIDProfileUpdateParams) (*V1AppDeploymentsUIDProfileUpdateNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1AppDeploymentsUIDProfileUpdateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1AppDeploymentsUidProfileUpdate", + Method: "PUT", + PathPattern: "/v1/appDeployments/{uid}/profile", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1AppDeploymentsUIDProfileUpdateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1AppDeploymentsUIDProfileUpdateNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1AppDeploymentsUidProfileUpdate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1AppDeploymentsUIDProfileVersionsGet retrieves a list of profile versions of the specified application deployment +*/ +func (a *Client) V1AppDeploymentsUIDProfileVersionsGet(params *V1AppDeploymentsUIDProfileVersionsGetParams) (*V1AppDeploymentsUIDProfileVersionsGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1AppDeploymentsUIDProfileVersionsGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1AppDeploymentsUidProfileVersionsGet", + Method: "GET", + PathPattern: "/v1/appDeployments/{uid}/profile/versions", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1AppDeploymentsUIDProfileVersionsGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1AppDeploymentsUIDProfileVersionsGetOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1AppDeploymentsUidProfileVersionsGet: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1AppDeploymentsVirtualClusterCreate creates a application deployment in the virtual cluster +*/ +func (a *Client) V1AppDeploymentsVirtualClusterCreate(params *V1AppDeploymentsVirtualClusterCreateParams) (*V1AppDeploymentsVirtualClusterCreateCreated, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1AppDeploymentsVirtualClusterCreateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1AppDeploymentsVirtualClusterCreate", + Method: "POST", + PathPattern: "/v1/appDeployments", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1AppDeploymentsVirtualClusterCreateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1AppDeploymentsVirtualClusterCreateCreated) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1AppDeploymentsVirtualClusterCreate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1AppProfilesCreate creates a application profile +*/ +func (a *Client) V1AppProfilesCreate(params *V1AppProfilesCreateParams) (*V1AppProfilesCreateCreated, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1AppProfilesCreateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1AppProfilesCreate", + Method: "POST", + PathPattern: "/v1/appProfiles", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1AppProfilesCreateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1AppProfilesCreateCreated) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1AppProfilesCreate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1AppProfilesMacrosList retrieves a list of application profile macros +*/ +func (a *Client) V1AppProfilesMacrosList(params *V1AppProfilesMacrosListParams) (*V1AppProfilesMacrosListOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1AppProfilesMacrosListParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1AppProfilesMacrosList", + Method: "GET", + PathPattern: "/v1/appProfiles/macros", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1AppProfilesMacrosListReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1AppProfilesMacrosListOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1AppProfilesMacrosList: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1AppProfilesUIDClone clones the specified application profile +*/ +func (a *Client) V1AppProfilesUIDClone(params *V1AppProfilesUIDCloneParams) (*V1AppProfilesUIDCloneCreated, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1AppProfilesUIDCloneParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1AppProfilesUidClone", + Method: "POST", + PathPattern: "/v1/appProfiles/{uid}/clone", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1AppProfilesUIDCloneReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1AppProfilesUIDCloneCreated) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1AppProfilesUidClone: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1AppProfilesUIDCloneValidate validates the specified application profile clone +*/ +func (a *Client) V1AppProfilesUIDCloneValidate(params *V1AppProfilesUIDCloneValidateParams) (*V1AppProfilesUIDCloneValidateNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1AppProfilesUIDCloneValidateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1AppProfilesUidCloneValidate", + Method: "POST", + PathPattern: "/v1/appProfiles/{uid}/clone/validate", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1AppProfilesUIDCloneValidateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1AppProfilesUIDCloneValidateNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1AppProfilesUidCloneValidate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1AppProfilesUIDDelete deletes the specified application profile +*/ +func (a *Client) V1AppProfilesUIDDelete(params *V1AppProfilesUIDDeleteParams) (*V1AppProfilesUIDDeleteNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1AppProfilesUIDDeleteParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1AppProfilesUidDelete", + Method: "DELETE", + PathPattern: "/v1/appProfiles/{uid}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1AppProfilesUIDDeleteReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1AppProfilesUIDDeleteNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1AppProfilesUidDelete: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1AppProfilesUIDGet returns the specified application profile +*/ +func (a *Client) V1AppProfilesUIDGet(params *V1AppProfilesUIDGetParams) (*V1AppProfilesUIDGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1AppProfilesUIDGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1AppProfilesUidGet", + Method: "GET", + PathPattern: "/v1/appProfiles/{uid}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1AppProfilesUIDGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1AppProfilesUIDGetOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1AppProfilesUidGet: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1AppProfilesUIDMetadataUpdate updates the specified application profile metadata +*/ +func (a *Client) V1AppProfilesUIDMetadataUpdate(params *V1AppProfilesUIDMetadataUpdateParams) (*V1AppProfilesUIDMetadataUpdateNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1AppProfilesUIDMetadataUpdateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1AppProfilesUidMetadataUpdate", + Method: "PATCH", + PathPattern: "/v1/appProfiles/{uid}/metadata", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1AppProfilesUIDMetadataUpdateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1AppProfilesUIDMetadataUpdateNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1AppProfilesUidMetadataUpdate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1AppProfilesUIDTiersCreate adds tier to the specified application profile +*/ +func (a *Client) V1AppProfilesUIDTiersCreate(params *V1AppProfilesUIDTiersCreateParams) (*V1AppProfilesUIDTiersCreateCreated, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1AppProfilesUIDTiersCreateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1AppProfilesUidTiersCreate", + Method: "POST", + PathPattern: "/v1/appProfiles/{uid}/tiers", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1AppProfilesUIDTiersCreateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1AppProfilesUIDTiersCreateCreated) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1AppProfilesUidTiersCreate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1AppProfilesUIDTiersGet retrieves a list of tiers of the specified application profile +*/ +func (a *Client) V1AppProfilesUIDTiersGet(params *V1AppProfilesUIDTiersGetParams) (*V1AppProfilesUIDTiersGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1AppProfilesUIDTiersGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1AppProfilesUidTiersGet", + Method: "GET", + PathPattern: "/v1/appProfiles/{uid}/tiers", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1AppProfilesUIDTiersGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1AppProfilesUIDTiersGetOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1AppProfilesUidTiersGet: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1AppProfilesUIDTiersPatch updates app tier of the specified application profile +*/ +func (a *Client) V1AppProfilesUIDTiersPatch(params *V1AppProfilesUIDTiersPatchParams) (*V1AppProfilesUIDTiersPatchCreated, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1AppProfilesUIDTiersPatchParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1AppProfilesUidTiersPatch", + Method: "PATCH", + PathPattern: "/v1/appProfiles/{uid}/tiers", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1AppProfilesUIDTiersPatchReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1AppProfilesUIDTiersPatchCreated) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1AppProfilesUidTiersPatch: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1AppProfilesUIDTiersUIDDelete deletes the specified application profile tier +*/ +func (a *Client) V1AppProfilesUIDTiersUIDDelete(params *V1AppProfilesUIDTiersUIDDeleteParams) (*V1AppProfilesUIDTiersUIDDeleteNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1AppProfilesUIDTiersUIDDeleteParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1AppProfilesUidTiersUidDelete", + Method: "DELETE", + PathPattern: "/v1/appProfiles/{uid}/tiers/{tierUid}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1AppProfilesUIDTiersUIDDeleteReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1AppProfilesUIDTiersUIDDeleteNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1AppProfilesUidTiersUidDelete: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1AppProfilesUIDTiersUIDGet returns the specified application profile tier information +*/ +func (a *Client) V1AppProfilesUIDTiersUIDGet(params *V1AppProfilesUIDTiersUIDGetParams) (*V1AppProfilesUIDTiersUIDGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1AppProfilesUIDTiersUIDGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1AppProfilesUidTiersUidGet", + Method: "GET", + PathPattern: "/v1/appProfiles/{uid}/tiers/{tierUid}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1AppProfilesUIDTiersUIDGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1AppProfilesUIDTiersUIDGetOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1AppProfilesUidTiersUidGet: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1AppProfilesUIDTiersUIDManifestsCreate adds manifest to the specified application profile tier +*/ +func (a *Client) V1AppProfilesUIDTiersUIDManifestsCreate(params *V1AppProfilesUIDTiersUIDManifestsCreateParams) (*V1AppProfilesUIDTiersUIDManifestsCreateCreated, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1AppProfilesUIDTiersUIDManifestsCreateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1AppProfilesUidTiersUidManifestsCreate", + Method: "POST", + PathPattern: "/v1/appProfiles/{uid}/tiers/{tierUid}/manifests", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1AppProfilesUIDTiersUIDManifestsCreateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1AppProfilesUIDTiersUIDManifestsCreateCreated) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1AppProfilesUidTiersUidManifestsCreate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1AppProfilesUIDTiersUIDManifestsGet retrieves a list of manifests of the specified application profile tier +*/ +func (a *Client) V1AppProfilesUIDTiersUIDManifestsGet(params *V1AppProfilesUIDTiersUIDManifestsGetParams) (*V1AppProfilesUIDTiersUIDManifestsGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1AppProfilesUIDTiersUIDManifestsGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1AppProfilesUidTiersUidManifestsGet", + Method: "GET", + PathPattern: "/v1/appProfiles/{uid}/tiers/{tierUid}/manifests", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1AppProfilesUIDTiersUIDManifestsGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1AppProfilesUIDTiersUIDManifestsGetOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1AppProfilesUidTiersUidManifestsGet: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1AppProfilesUIDTiersUIDManifestsUIDDelete deletes the specified application profile tier manifest +*/ +func (a *Client) V1AppProfilesUIDTiersUIDManifestsUIDDelete(params *V1AppProfilesUIDTiersUIDManifestsUIDDeleteParams) (*V1AppProfilesUIDTiersUIDManifestsUIDDeleteNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1AppProfilesUIDTiersUIDManifestsUIDDeleteParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1AppProfilesUidTiersUidManifestsUidDelete", + Method: "DELETE", + PathPattern: "/v1/appProfiles/{uid}/tiers/{tierUid}/manifests/{manifestUid}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1AppProfilesUIDTiersUIDManifestsUIDDeleteReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1AppProfilesUIDTiersUIDManifestsUIDDeleteNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1AppProfilesUidTiersUidManifestsUidDelete: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1AppProfilesUIDTiersUIDManifestsUIDGet returns the specified application profile tier manifest information +*/ +func (a *Client) V1AppProfilesUIDTiersUIDManifestsUIDGet(params *V1AppProfilesUIDTiersUIDManifestsUIDGetParams) (*V1AppProfilesUIDTiersUIDManifestsUIDGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1AppProfilesUIDTiersUIDManifestsUIDGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1AppProfilesUidTiersUidManifestsUidGet", + Method: "GET", + PathPattern: "/v1/appProfiles/{uid}/tiers/{tierUid}/manifests/{manifestUid}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1AppProfilesUIDTiersUIDManifestsUIDGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1AppProfilesUIDTiersUIDManifestsUIDGetOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1AppProfilesUidTiersUidManifestsUidGet: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1AppProfilesUIDTiersUIDManifestsUIDUpdate updates the specified application profile tier manifest information +*/ +func (a *Client) V1AppProfilesUIDTiersUIDManifestsUIDUpdate(params *V1AppProfilesUIDTiersUIDManifestsUIDUpdateParams) (*V1AppProfilesUIDTiersUIDManifestsUIDUpdateNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1AppProfilesUIDTiersUIDManifestsUIDUpdateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1AppProfilesUidTiersUidManifestsUidUpdate", + Method: "PUT", + PathPattern: "/v1/appProfiles/{uid}/tiers/{tierUid}/manifests/{manifestUid}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1AppProfilesUIDTiersUIDManifestsUIDUpdateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1AppProfilesUIDTiersUIDManifestsUIDUpdateNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1AppProfilesUidTiersUidManifestsUidUpdate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1AppProfilesUIDTiersUIDResolvedValuesGet returns the specified application profile tier resolved values +*/ +func (a *Client) V1AppProfilesUIDTiersUIDResolvedValuesGet(params *V1AppProfilesUIDTiersUIDResolvedValuesGetParams) (*V1AppProfilesUIDTiersUIDResolvedValuesGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1AppProfilesUIDTiersUIDResolvedValuesGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1AppProfilesUidTiersUidResolvedValuesGet", + Method: "GET", + PathPattern: "/v1/appProfiles/{uid}/tiers/{tierUid}/resolvedValues", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1AppProfilesUIDTiersUIDResolvedValuesGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1AppProfilesUIDTiersUIDResolvedValuesGetOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1AppProfilesUidTiersUidResolvedValuesGet: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1AppProfilesUIDTiersUIDUpdate updates the specified application profile tier +*/ +func (a *Client) V1AppProfilesUIDTiersUIDUpdate(params *V1AppProfilesUIDTiersUIDUpdateParams) (*V1AppProfilesUIDTiersUIDUpdateNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1AppProfilesUIDTiersUIDUpdateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1AppProfilesUidTiersUidUpdate", + Method: "PUT", + PathPattern: "/v1/appProfiles/{uid}/tiers/{tierUid}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1AppProfilesUIDTiersUIDUpdateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1AppProfilesUIDTiersUIDUpdateNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1AppProfilesUidTiersUidUpdate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1AppProfilesUIDUpdate updates the specified application profile +*/ +func (a *Client) V1AppProfilesUIDUpdate(params *V1AppProfilesUIDUpdateParams) (*V1AppProfilesUIDUpdateNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1AppProfilesUIDUpdateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1AppProfilesUidUpdate", + Method: "PUT", + PathPattern: "/v1/appProfiles/{uid}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1AppProfilesUIDUpdateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1AppProfilesUIDUpdateNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1AppProfilesUidUpdate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1AuditsList retrieves the list of audit logs +*/ +func (a *Client) V1AuditsList(params *V1AuditsListParams) (*V1AuditsListOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1AuditsListParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1AuditsList", + Method: "GET", + PathPattern: "/v1/audits", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1AuditsListReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1AuditsListOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1AuditsList: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1AuditsUIDGet returns the specified audit log +*/ +func (a *Client) V1AuditsUIDGet(params *V1AuditsUIDGetParams) (*V1AuditsUIDGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1AuditsUIDGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1AuditsUidGet", + Method: "GET", + PathPattern: "/v1/audits/{uid}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1AuditsUIDGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1AuditsUIDGetOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1AuditsUidGet: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1AuditsUIDGetSysMsg returns the specified system audit message +*/ +func (a *Client) V1AuditsUIDGetSysMsg(params *V1AuditsUIDGetSysMsgParams) (*V1AuditsUIDGetSysMsgOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1AuditsUIDGetSysMsgParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1AuditsUidGetSysMsg", + Method: "GET", + PathPattern: "/v1/audits/{uid}/sysMsg", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1AuditsUIDGetSysMsgReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1AuditsUIDGetSysMsgOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1AuditsUidGetSysMsg: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1AuditsUIDMsgUpdate updates the specified user message for the specified audit +*/ +func (a *Client) V1AuditsUIDMsgUpdate(params *V1AuditsUIDMsgUpdateParams) (*V1AuditsUIDMsgUpdateNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1AuditsUIDMsgUpdateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1AuditsUidMsgUpdate", + Method: "PATCH", + PathPattern: "/v1/audits/{uid}/userMsg", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1AuditsUIDMsgUpdateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1AuditsUIDMsgUpdateNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1AuditsUidMsgUpdate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1AuthOrg returns the user organization details + +Returns the allowed login method and information with the organization details +*/ +func (a *Client) V1AuthOrg(params *V1AuthOrgParams) (*V1AuthOrgOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1AuthOrgParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1AuthOrg", + Method: "GET", + PathPattern: "/v1/auth/org", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1AuthOrgReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1AuthOrgOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1AuthOrg: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1AuthRefresh refreshes authentication token + +Returns a new token within refresh timeout and same session id is maintained +*/ +func (a *Client) V1AuthRefresh(params *V1AuthRefreshParams) (*V1AuthRefreshOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1AuthRefreshParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1AuthRefresh", + Method: "GET", + PathPattern: "/v1/auth/refresh/{token}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1AuthRefreshReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1AuthRefreshOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1AuthRefresh: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1Authenticate authenticates the user for the specified crendentials + +Creates a authentication request with the specified credentials +*/ +func (a *Client) V1Authenticate(params *V1AuthenticateParams) (*V1AuthenticateOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1AuthenticateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1Authenticate", + Method: "POST", + PathPattern: "/v1/auth/authenticate", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1AuthenticateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1AuthenticateOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1Authenticate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1AwsCloudCost retrieves a w s cloud account usage cost from cost explorer +*/ +func (a *Client) V1AwsCloudCost(params *V1AwsCloudCostParams) (*V1AwsCloudCostOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1AwsCloudCostParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1AwsCloudCost", + Method: "POST", + PathPattern: "/v1/clouds/aws/cost", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1AwsCloudCostReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1AwsCloudCostOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1AwsCloudCost: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1BasicOciRegistriesCreate creates a basic oci registry +*/ +func (a *Client) V1BasicOciRegistriesCreate(params *V1BasicOciRegistriesCreateParams) (*V1BasicOciRegistriesCreateCreated, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1BasicOciRegistriesCreateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1BasicOciRegistriesCreate", + Method: "POST", + PathPattern: "/v1/registries/oci/basic", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1BasicOciRegistriesCreateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1BasicOciRegistriesCreateCreated) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1BasicOciRegistriesCreate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1BasicOciRegistriesUIDDelete deletes the specified basic oci registry +*/ +func (a *Client) V1BasicOciRegistriesUIDDelete(params *V1BasicOciRegistriesUIDDeleteParams) (*V1BasicOciRegistriesUIDDeleteNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1BasicOciRegistriesUIDDeleteParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1BasicOciRegistriesUidDelete", + Method: "DELETE", + PathPattern: "/v1/registries/oci/{uid}/basic", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1BasicOciRegistriesUIDDeleteReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1BasicOciRegistriesUIDDeleteNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1BasicOciRegistriesUidDelete: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1BasicOciRegistriesUIDGet returns the basic oci registry +*/ +func (a *Client) V1BasicOciRegistriesUIDGet(params *V1BasicOciRegistriesUIDGetParams) (*V1BasicOciRegistriesUIDGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1BasicOciRegistriesUIDGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1BasicOciRegistriesUidGet", + Method: "GET", + PathPattern: "/v1/registries/oci/{uid}/basic", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1BasicOciRegistriesUIDGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1BasicOciRegistriesUIDGetOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1BasicOciRegistriesUidGet: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1BasicOciRegistriesUIDSync syncs oci registry + +Sync all the content from the oci registry +*/ +func (a *Client) V1BasicOciRegistriesUIDSync(params *V1BasicOciRegistriesUIDSyncParams) (*V1BasicOciRegistriesUIDSyncAccepted, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1BasicOciRegistriesUIDSyncParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1BasicOciRegistriesUidSync", + Method: "POST", + PathPattern: "/v1/registries/oci/{uid}/basic/sync", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1BasicOciRegistriesUIDSyncReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1BasicOciRegistriesUIDSyncAccepted) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1BasicOciRegistriesUidSync: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1BasicOciRegistriesUIDSyncStatus gets oci registry sync status + +Get sync status for the oci specified registry +*/ +func (a *Client) V1BasicOciRegistriesUIDSyncStatus(params *V1BasicOciRegistriesUIDSyncStatusParams) (*V1BasicOciRegistriesUIDSyncStatusOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1BasicOciRegistriesUIDSyncStatusParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1BasicOciRegistriesUidSyncStatus", + Method: "GET", + PathPattern: "/v1/registries/oci/{uid}/basic/sync/status", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1BasicOciRegistriesUIDSyncStatusReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1BasicOciRegistriesUIDSyncStatusOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1BasicOciRegistriesUidSyncStatus: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1BasicOciRegistriesUIDUpdate updates the specified basic oci registry +*/ +func (a *Client) V1BasicOciRegistriesUIDUpdate(params *V1BasicOciRegistriesUIDUpdateParams) (*V1BasicOciRegistriesUIDUpdateNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1BasicOciRegistriesUIDUpdateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1BasicOciRegistriesUidUpdate", + Method: "PUT", + PathPattern: "/v1/registries/oci/{uid}/basic", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1BasicOciRegistriesUIDUpdateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1BasicOciRegistriesUIDUpdateNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1BasicOciRegistriesUidUpdate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1BasicOciRegistriesValidate checks if oci registry is valid + +Returns no contents if oci registry is valid else error. +*/ +func (a *Client) V1BasicOciRegistriesValidate(params *V1BasicOciRegistriesValidateParams) (*V1BasicOciRegistriesValidateNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1BasicOciRegistriesValidateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1BasicOciRegistriesValidate", + Method: "POST", + PathPattern: "/v1/registries/oci/basic/validate", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1BasicOciRegistriesValidateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1BasicOciRegistriesValidateNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1BasicOciRegistriesValidate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1CloudAccountsAwsCreate creates an a w s cloud account +*/ +func (a *Client) V1CloudAccountsAwsCreate(params *V1CloudAccountsAwsCreateParams) (*V1CloudAccountsAwsCreateCreated, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1CloudAccountsAwsCreateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1CloudAccountsAwsCreate", + Method: "POST", + PathPattern: "/v1/cloudaccounts/aws", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1CloudAccountsAwsCreateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1CloudAccountsAwsCreateCreated) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1CloudAccountsAwsCreate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1CloudAccountsAwsDelete deletes the specified a w s account +*/ +func (a *Client) V1CloudAccountsAwsDelete(params *V1CloudAccountsAwsDeleteParams) (*V1CloudAccountsAwsDeleteNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1CloudAccountsAwsDeleteParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1CloudAccountsAwsDelete", + Method: "DELETE", + PathPattern: "/v1/cloudaccounts/aws/{uid}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1CloudAccountsAwsDeleteReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1CloudAccountsAwsDeleteNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1CloudAccountsAwsDelete: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1CloudAccountsAwsGet returns the specified a w s account +*/ +func (a *Client) V1CloudAccountsAwsGet(params *V1CloudAccountsAwsGetParams) (*V1CloudAccountsAwsGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1CloudAccountsAwsGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1CloudAccountsAwsGet", + Method: "GET", + PathPattern: "/v1/cloudaccounts/aws/{uid}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1CloudAccountsAwsGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1CloudAccountsAwsGetOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1CloudAccountsAwsGet: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1CloudAccountsAwsList retrieves a list of a w s cloud accounts +*/ +func (a *Client) V1CloudAccountsAwsList(params *V1CloudAccountsAwsListParams) (*V1CloudAccountsAwsListOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1CloudAccountsAwsListParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1CloudAccountsAwsList", + Method: "GET", + PathPattern: "/v1/cloudaccounts/aws", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1CloudAccountsAwsListReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1CloudAccountsAwsListOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1CloudAccountsAwsList: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1CloudAccountsAwsUpdate updates the specified a w s account +*/ +func (a *Client) V1CloudAccountsAwsUpdate(params *V1CloudAccountsAwsUpdateParams) (*V1CloudAccountsAwsUpdateNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1CloudAccountsAwsUpdateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1CloudAccountsAwsUpdate", + Method: "PUT", + PathPattern: "/v1/cloudaccounts/aws/{uid}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1CloudAccountsAwsUpdateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1CloudAccountsAwsUpdateNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1CloudAccountsAwsUpdate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1CloudAccountsAzureCreate creates azure cloud account +*/ +func (a *Client) V1CloudAccountsAzureCreate(params *V1CloudAccountsAzureCreateParams) (*V1CloudAccountsAzureCreateCreated, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1CloudAccountsAzureCreateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1CloudAccountsAzureCreate", + Method: "POST", + PathPattern: "/v1/cloudaccounts/azure", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1CloudAccountsAzureCreateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1CloudAccountsAzureCreateCreated) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1CloudAccountsAzureCreate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1CloudAccountsAzureDelete deletes the specified azure account +*/ +func (a *Client) V1CloudAccountsAzureDelete(params *V1CloudAccountsAzureDeleteParams) (*V1CloudAccountsAzureDeleteNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1CloudAccountsAzureDeleteParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1CloudAccountsAzureDelete", + Method: "DELETE", + PathPattern: "/v1/cloudaccounts/azure/{uid}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1CloudAccountsAzureDeleteReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1CloudAccountsAzureDeleteNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1CloudAccountsAzureDelete: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1CloudAccountsAzureGet returns the specified azure cloud account +*/ +func (a *Client) V1CloudAccountsAzureGet(params *V1CloudAccountsAzureGetParams) (*V1CloudAccountsAzureGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1CloudAccountsAzureGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1CloudAccountsAzureGet", + Method: "GET", + PathPattern: "/v1/cloudaccounts/azure/{uid}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1CloudAccountsAzureGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1CloudAccountsAzureGetOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1CloudAccountsAzureGet: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1CloudAccountsAzureList retrieves a list of azure cloud accounts +*/ +func (a *Client) V1CloudAccountsAzureList(params *V1CloudAccountsAzureListParams) (*V1CloudAccountsAzureListOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1CloudAccountsAzureListParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1CloudAccountsAzureList", + Method: "GET", + PathPattern: "/v1/cloudaccounts/azure", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1CloudAccountsAzureListReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1CloudAccountsAzureListOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1CloudAccountsAzureList: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1CloudAccountsAzureUpdate updates the specified azure account +*/ +func (a *Client) V1CloudAccountsAzureUpdate(params *V1CloudAccountsAzureUpdateParams) (*V1CloudAccountsAzureUpdateNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1CloudAccountsAzureUpdateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1CloudAccountsAzureUpdate", + Method: "PUT", + PathPattern: "/v1/cloudaccounts/azure/{uid}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1CloudAccountsAzureUpdateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1CloudAccountsAzureUpdateNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1CloudAccountsAzureUpdate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1CloudAccountsCustomCreate creates an cloud account of specific cloud type +*/ +func (a *Client) V1CloudAccountsCustomCreate(params *V1CloudAccountsCustomCreateParams) (*V1CloudAccountsCustomCreateCreated, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1CloudAccountsCustomCreateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1CloudAccountsCustomCreate", + Method: "POST", + PathPattern: "/v1/cloudaccounts/cloudTypes/{cloudType}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1CloudAccountsCustomCreateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1CloudAccountsCustomCreateCreated) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1CloudAccountsCustomCreate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1CloudAccountsCustomDelete deletes the specified account by cloud type +*/ +func (a *Client) V1CloudAccountsCustomDelete(params *V1CloudAccountsCustomDeleteParams) (*V1CloudAccountsCustomDeleteNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1CloudAccountsCustomDeleteParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1CloudAccountsCustomDelete", + Method: "DELETE", + PathPattern: "/v1/cloudaccounts/cloudTypes/{cloudType}/{uid}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1CloudAccountsCustomDeleteReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1CloudAccountsCustomDeleteNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1CloudAccountsCustomDelete: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1CloudAccountsCustomGet returns the specified account by cloud type +*/ +func (a *Client) V1CloudAccountsCustomGet(params *V1CloudAccountsCustomGetParams) (*V1CloudAccountsCustomGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1CloudAccountsCustomGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1CloudAccountsCustomGet", + Method: "GET", + PathPattern: "/v1/cloudaccounts/cloudTypes/{cloudType}/{uid}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1CloudAccountsCustomGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1CloudAccountsCustomGetOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1CloudAccountsCustomGet: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1CloudAccountsCustomList retrieves a list of cloud accounts by cloud type +*/ +func (a *Client) V1CloudAccountsCustomList(params *V1CloudAccountsCustomListParams) (*V1CloudAccountsCustomListOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1CloudAccountsCustomListParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1CloudAccountsCustomList", + Method: "GET", + PathPattern: "/v1/cloudaccounts/cloudTypes/{cloudType}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1CloudAccountsCustomListReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1CloudAccountsCustomListOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1CloudAccountsCustomList: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1CloudAccountsCustomUpdate updates the specified account by cloud type +*/ +func (a *Client) V1CloudAccountsCustomUpdate(params *V1CloudAccountsCustomUpdateParams) (*V1CloudAccountsCustomUpdateNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1CloudAccountsCustomUpdateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1CloudAccountsCustomUpdate", + Method: "PUT", + PathPattern: "/v1/cloudaccounts/cloudTypes/{cloudType}/{uid}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1CloudAccountsCustomUpdateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1CloudAccountsCustomUpdateNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1CloudAccountsCustomUpdate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1CloudAccountsGcpCreate creates a g c p cloud account +*/ +func (a *Client) V1CloudAccountsGcpCreate(params *V1CloudAccountsGcpCreateParams) (*V1CloudAccountsGcpCreateCreated, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1CloudAccountsGcpCreateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1CloudAccountsGcpCreate", + Method: "POST", + PathPattern: "/v1/cloudaccounts/gcp", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1CloudAccountsGcpCreateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1CloudAccountsGcpCreateCreated) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1CloudAccountsGcpCreate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1CloudAccountsGcpDelete deletes the specified g c p account +*/ +func (a *Client) V1CloudAccountsGcpDelete(params *V1CloudAccountsGcpDeleteParams) (*V1CloudAccountsGcpDeleteNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1CloudAccountsGcpDeleteParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1CloudAccountsGcpDelete", + Method: "DELETE", + PathPattern: "/v1/cloudaccounts/gcp/{uid}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1CloudAccountsGcpDeleteReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1CloudAccountsGcpDeleteNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1CloudAccountsGcpDelete: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1CloudAccountsGcpGet returns the specified g c p cloud account +*/ +func (a *Client) V1CloudAccountsGcpGet(params *V1CloudAccountsGcpGetParams) (*V1CloudAccountsGcpGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1CloudAccountsGcpGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1CloudAccountsGcpGet", + Method: "GET", + PathPattern: "/v1/cloudaccounts/gcp/{uid}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1CloudAccountsGcpGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1CloudAccountsGcpGetOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1CloudAccountsGcpGet: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1CloudAccountsGcpList retrieves a list of gcp cloud accounts +*/ +func (a *Client) V1CloudAccountsGcpList(params *V1CloudAccountsGcpListParams) (*V1CloudAccountsGcpListOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1CloudAccountsGcpListParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1CloudAccountsGcpList", + Method: "GET", + PathPattern: "/v1/cloudaccounts/gcp", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1CloudAccountsGcpListReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1CloudAccountsGcpListOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1CloudAccountsGcpList: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1CloudAccountsGcpUpdate updates the specified g c p account +*/ +func (a *Client) V1CloudAccountsGcpUpdate(params *V1CloudAccountsGcpUpdateParams) (*V1CloudAccountsGcpUpdateNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1CloudAccountsGcpUpdateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1CloudAccountsGcpUpdate", + Method: "PUT", + PathPattern: "/v1/cloudaccounts/gcp/{uid}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1CloudAccountsGcpUpdateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1CloudAccountsGcpUpdateNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1CloudAccountsGcpUpdate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1CloudAccountsListSummary retrieves a list of cloud accounts summary +*/ +func (a *Client) V1CloudAccountsListSummary(params *V1CloudAccountsListSummaryParams) (*V1CloudAccountsListSummaryOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1CloudAccountsListSummaryParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1CloudAccountsListSummary", + Method: "GET", + PathPattern: "/v1/cloudaccounts/summary", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1CloudAccountsListSummaryReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1CloudAccountsListSummaryOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1CloudAccountsListSummary: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1CloudAccountsMaasCreate creates an maas cloud account +*/ +func (a *Client) V1CloudAccountsMaasCreate(params *V1CloudAccountsMaasCreateParams) (*V1CloudAccountsMaasCreateCreated, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1CloudAccountsMaasCreateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1CloudAccountsMaasCreate", + Method: "POST", + PathPattern: "/v1/cloudaccounts/maas", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1CloudAccountsMaasCreateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1CloudAccountsMaasCreateCreated) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1CloudAccountsMaasCreate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1CloudAccountsMaasDelete deletes the specified maas account +*/ +func (a *Client) V1CloudAccountsMaasDelete(params *V1CloudAccountsMaasDeleteParams) (*V1CloudAccountsMaasDeleteNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1CloudAccountsMaasDeleteParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1CloudAccountsMaasDelete", + Method: "DELETE", + PathPattern: "/v1/cloudaccounts/maas/{uid}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1CloudAccountsMaasDeleteReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1CloudAccountsMaasDeleteNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1CloudAccountsMaasDelete: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1CloudAccountsMaasGet returns the specified maas account +*/ +func (a *Client) V1CloudAccountsMaasGet(params *V1CloudAccountsMaasGetParams) (*V1CloudAccountsMaasGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1CloudAccountsMaasGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1CloudAccountsMaasGet", + Method: "GET", + PathPattern: "/v1/cloudaccounts/maas/{uid}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1CloudAccountsMaasGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1CloudAccountsMaasGetOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1CloudAccountsMaasGet: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1CloudAccountsMaasList retrieves a list of maas cloud accounts +*/ +func (a *Client) V1CloudAccountsMaasList(params *V1CloudAccountsMaasListParams) (*V1CloudAccountsMaasListOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1CloudAccountsMaasListParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1CloudAccountsMaasList", + Method: "GET", + PathPattern: "/v1/cloudaccounts/maas", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1CloudAccountsMaasListReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1CloudAccountsMaasListOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1CloudAccountsMaasList: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1CloudAccountsMaasPatch patches the specified cloud account maas +*/ +func (a *Client) V1CloudAccountsMaasPatch(params *V1CloudAccountsMaasPatchParams) (*V1CloudAccountsMaasPatchNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1CloudAccountsMaasPatchParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1CloudAccountsMaasPatch", + Method: "PATCH", + PathPattern: "/v1/cloudaccounts/maas/{uid}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1CloudAccountsMaasPatchReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1CloudAccountsMaasPatchNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1CloudAccountsMaasPatch: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1CloudAccountsMaasUpdate updates the specified maas account +*/ +func (a *Client) V1CloudAccountsMaasUpdate(params *V1CloudAccountsMaasUpdateParams) (*V1CloudAccountsMaasUpdateNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1CloudAccountsMaasUpdateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1CloudAccountsMaasUpdate", + Method: "PUT", + PathPattern: "/v1/cloudaccounts/maas/{uid}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1CloudAccountsMaasUpdateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1CloudAccountsMaasUpdateNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1CloudAccountsMaasUpdate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1CloudAccountsOpenStackCreate creates a open stack cloud account +*/ +func (a *Client) V1CloudAccountsOpenStackCreate(params *V1CloudAccountsOpenStackCreateParams) (*V1CloudAccountsOpenStackCreateCreated, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1CloudAccountsOpenStackCreateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1CloudAccountsOpenStackCreate", + Method: "POST", + PathPattern: "/v1/cloudaccounts/openstack", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1CloudAccountsOpenStackCreateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1CloudAccountsOpenStackCreateCreated) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1CloudAccountsOpenStackCreate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1CloudAccountsOpenStackDelete deletes the specified open stack account +*/ +func (a *Client) V1CloudAccountsOpenStackDelete(params *V1CloudAccountsOpenStackDeleteParams) (*V1CloudAccountsOpenStackDeleteNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1CloudAccountsOpenStackDeleteParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1CloudAccountsOpenStackDelete", + Method: "DELETE", + PathPattern: "/v1/cloudaccounts/openstack/{uid}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1CloudAccountsOpenStackDeleteReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1CloudAccountsOpenStackDeleteNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1CloudAccountsOpenStackDelete: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1CloudAccountsOpenStackGet returns the specified open stack account +*/ +func (a *Client) V1CloudAccountsOpenStackGet(params *V1CloudAccountsOpenStackGetParams) (*V1CloudAccountsOpenStackGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1CloudAccountsOpenStackGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1CloudAccountsOpenStackGet", + Method: "GET", + PathPattern: "/v1/cloudaccounts/openstack/{uid}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1CloudAccountsOpenStackGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1CloudAccountsOpenStackGetOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1CloudAccountsOpenStackGet: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1CloudAccountsOpenStackList retrieves a list of open stack cloud accounts +*/ +func (a *Client) V1CloudAccountsOpenStackList(params *V1CloudAccountsOpenStackListParams) (*V1CloudAccountsOpenStackListOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1CloudAccountsOpenStackListParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1CloudAccountsOpenStackList", + Method: "GET", + PathPattern: "/v1/cloudaccounts/openstack", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1CloudAccountsOpenStackListReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1CloudAccountsOpenStackListOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1CloudAccountsOpenStackList: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1CloudAccountsOpenStackUpdate updates the specified open stack account +*/ +func (a *Client) V1CloudAccountsOpenStackUpdate(params *V1CloudAccountsOpenStackUpdateParams) (*V1CloudAccountsOpenStackUpdateNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1CloudAccountsOpenStackUpdateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1CloudAccountsOpenStackUpdate", + Method: "PUT", + PathPattern: "/v1/cloudaccounts/openstack/{uid}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1CloudAccountsOpenStackUpdateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1CloudAccountsOpenStackUpdateNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1CloudAccountsOpenStackUpdate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1CloudAccountsTencentCreate creates an tencent cloud account +*/ +func (a *Client) V1CloudAccountsTencentCreate(params *V1CloudAccountsTencentCreateParams) (*V1CloudAccountsTencentCreateCreated, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1CloudAccountsTencentCreateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1CloudAccountsTencentCreate", + Method: "POST", + PathPattern: "/v1/cloudaccounts/tencent", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1CloudAccountsTencentCreateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1CloudAccountsTencentCreateCreated) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1CloudAccountsTencentCreate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1CloudAccountsTencentDelete deletes the specified tencent account +*/ +func (a *Client) V1CloudAccountsTencentDelete(params *V1CloudAccountsTencentDeleteParams) (*V1CloudAccountsTencentDeleteNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1CloudAccountsTencentDeleteParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1CloudAccountsTencentDelete", + Method: "DELETE", + PathPattern: "/v1/cloudaccounts/tencent/{uid}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1CloudAccountsTencentDeleteReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1CloudAccountsTencentDeleteNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1CloudAccountsTencentDelete: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1CloudAccountsTencentGet returns the specified tencent account +*/ +func (a *Client) V1CloudAccountsTencentGet(params *V1CloudAccountsTencentGetParams) (*V1CloudAccountsTencentGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1CloudAccountsTencentGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1CloudAccountsTencentGet", + Method: "GET", + PathPattern: "/v1/cloudaccounts/tencent/{uid}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1CloudAccountsTencentGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1CloudAccountsTencentGetOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1CloudAccountsTencentGet: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1CloudAccountsTencentList retrieves a list of tencent cloud accounts +*/ +func (a *Client) V1CloudAccountsTencentList(params *V1CloudAccountsTencentListParams) (*V1CloudAccountsTencentListOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1CloudAccountsTencentListParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1CloudAccountsTencentList", + Method: "GET", + PathPattern: "/v1/cloudaccounts/tencent", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1CloudAccountsTencentListReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1CloudAccountsTencentListOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1CloudAccountsTencentList: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1CloudAccountsTencentUpdate updates the specified tencent account +*/ +func (a *Client) V1CloudAccountsTencentUpdate(params *V1CloudAccountsTencentUpdateParams) (*V1CloudAccountsTencentUpdateNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1CloudAccountsTencentUpdateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1CloudAccountsTencentUpdate", + Method: "PUT", + PathPattern: "/v1/cloudaccounts/tencent/{uid}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1CloudAccountsTencentUpdateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1CloudAccountsTencentUpdateNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1CloudAccountsTencentUpdate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1CloudAccountsVsphereCreate creates a v sphere cloud account +*/ +func (a *Client) V1CloudAccountsVsphereCreate(params *V1CloudAccountsVsphereCreateParams) (*V1CloudAccountsVsphereCreateCreated, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1CloudAccountsVsphereCreateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1CloudAccountsVsphereCreate", + Method: "POST", + PathPattern: "/v1/cloudaccounts/vsphere", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1CloudAccountsVsphereCreateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1CloudAccountsVsphereCreateCreated) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1CloudAccountsVsphereCreate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1CloudAccountsVsphereDelete deletes the specified v sphere account +*/ +func (a *Client) V1CloudAccountsVsphereDelete(params *V1CloudAccountsVsphereDeleteParams) (*V1CloudAccountsVsphereDeleteNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1CloudAccountsVsphereDeleteParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1CloudAccountsVsphereDelete", + Method: "DELETE", + PathPattern: "/v1/cloudaccounts/vsphere/{uid}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1CloudAccountsVsphereDeleteReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1CloudAccountsVsphereDeleteNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1CloudAccountsVsphereDelete: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1CloudAccountsVsphereGet returns the specified v sphere account +*/ +func (a *Client) V1CloudAccountsVsphereGet(params *V1CloudAccountsVsphereGetParams) (*V1CloudAccountsVsphereGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1CloudAccountsVsphereGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1CloudAccountsVsphereGet", + Method: "GET", + PathPattern: "/v1/cloudaccounts/vsphere/{uid}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1CloudAccountsVsphereGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1CloudAccountsVsphereGetOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1CloudAccountsVsphereGet: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1CloudAccountsVsphereList retrieves a list of v sphere cloud accounts +*/ +func (a *Client) V1CloudAccountsVsphereList(params *V1CloudAccountsVsphereListParams) (*V1CloudAccountsVsphereListOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1CloudAccountsVsphereListParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1CloudAccountsVsphereList", + Method: "GET", + PathPattern: "/v1/cloudaccounts/vsphere", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1CloudAccountsVsphereListReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1CloudAccountsVsphereListOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1CloudAccountsVsphereList: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1CloudAccountsVsphereUpdate updates the specified v sphere account +*/ +func (a *Client) V1CloudAccountsVsphereUpdate(params *V1CloudAccountsVsphereUpdateParams) (*V1CloudAccountsVsphereUpdateNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1CloudAccountsVsphereUpdateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1CloudAccountsVsphereUpdate", + Method: "PUT", + PathPattern: "/v1/cloudaccounts/vsphere/{uid}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1CloudAccountsVsphereUpdateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1CloudAccountsVsphereUpdateNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1CloudAccountsVsphereUpdate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1CloudConfigsAksGet returns the specified a k s cloud config +*/ +func (a *Client) V1CloudConfigsAksGet(params *V1CloudConfigsAksGetParams) (*V1CloudConfigsAksGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1CloudConfigsAksGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1CloudConfigsAksGet", + Method: "GET", + PathPattern: "/v1/cloudconfigs/aks/{configUid}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1CloudConfigsAksGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1CloudConfigsAksGetOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1CloudConfigsAksGet: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1CloudConfigsAksMachinePoolCreate creates an a k s cloud config s machine pool +*/ +func (a *Client) V1CloudConfigsAksMachinePoolCreate(params *V1CloudConfigsAksMachinePoolCreateParams) (*V1CloudConfigsAksMachinePoolCreateCreated, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1CloudConfigsAksMachinePoolCreateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1CloudConfigsAksMachinePoolCreate", + Method: "POST", + PathPattern: "/v1/cloudconfigs/aks/{configUid}/machinePools", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1CloudConfigsAksMachinePoolCreateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1CloudConfigsAksMachinePoolCreateCreated) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1CloudConfigsAksMachinePoolCreate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1CloudConfigsAksMachinePoolDelete deletes the specified machine pool +*/ +func (a *Client) V1CloudConfigsAksMachinePoolDelete(params *V1CloudConfigsAksMachinePoolDeleteParams) (*V1CloudConfigsAksMachinePoolDeleteNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1CloudConfigsAksMachinePoolDeleteParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1CloudConfigsAksMachinePoolDelete", + Method: "DELETE", + PathPattern: "/v1/cloudconfigs/aks/{configUid}/machinePools/{machinePoolName}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1CloudConfigsAksMachinePoolDeleteReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1CloudConfigsAksMachinePoolDeleteNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1CloudConfigsAksMachinePoolDelete: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1CloudConfigsAksMachinePoolUpdate updates the specified a k s cloud config s machine pool +*/ +func (a *Client) V1CloudConfigsAksMachinePoolUpdate(params *V1CloudConfigsAksMachinePoolUpdateParams) (*V1CloudConfigsAksMachinePoolUpdateNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1CloudConfigsAksMachinePoolUpdateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1CloudConfigsAksMachinePoolUpdate", + Method: "PUT", + PathPattern: "/v1/cloudconfigs/aks/{configUid}/machinePools/{machinePoolName}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1CloudConfigsAksMachinePoolUpdateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1CloudConfigsAksMachinePoolUpdateNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1CloudConfigsAksMachinePoolUpdate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1CloudConfigsAksPoolMachinesAdd adds the machine to cloud config s machine pool +*/ +func (a *Client) V1CloudConfigsAksPoolMachinesAdd(params *V1CloudConfigsAksPoolMachinesAddParams) (*V1CloudConfigsAksPoolMachinesAddCreated, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1CloudConfigsAksPoolMachinesAddParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1CloudConfigsAksPoolMachinesAdd", + Method: "POST", + PathPattern: "/v1/cloudconfigs/aks/{configUid}/machinePools/{machinePoolName}/machines", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1CloudConfigsAksPoolMachinesAddReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1CloudConfigsAksPoolMachinesAddCreated) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1CloudConfigsAksPoolMachinesAdd: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1CloudConfigsAksPoolMachinesList retrieves a list of a k s machines +*/ +func (a *Client) V1CloudConfigsAksPoolMachinesList(params *V1CloudConfigsAksPoolMachinesListParams) (*V1CloudConfigsAksPoolMachinesListOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1CloudConfigsAksPoolMachinesListParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1CloudConfigsAksPoolMachinesList", + Method: "GET", + PathPattern: "/v1/cloudconfigs/aks/{configUid}/machinePools/{machinePoolName}/machines", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1CloudConfigsAksPoolMachinesListReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1CloudConfigsAksPoolMachinesListOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1CloudConfigsAksPoolMachinesList: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1CloudConfigsAksPoolMachinesUIDDelete deletes the specified azure machine +*/ +func (a *Client) V1CloudConfigsAksPoolMachinesUIDDelete(params *V1CloudConfigsAksPoolMachinesUIDDeleteParams) (*V1CloudConfigsAksPoolMachinesUIDDeleteNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1CloudConfigsAksPoolMachinesUIDDeleteParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1CloudConfigsAksPoolMachinesUidDelete", + Method: "DELETE", + PathPattern: "/v1/cloudconfigs/aks/{configUid}/machinePools/{machinePoolName}/machines/{machineUid}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1CloudConfigsAksPoolMachinesUIDDeleteReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1CloudConfigsAksPoolMachinesUIDDeleteNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1CloudConfigsAksPoolMachinesUidDelete: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1CloudConfigsAksPoolMachinesUIDGet returns the specified a k s machine +*/ +func (a *Client) V1CloudConfigsAksPoolMachinesUIDGet(params *V1CloudConfigsAksPoolMachinesUIDGetParams) (*V1CloudConfigsAksPoolMachinesUIDGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1CloudConfigsAksPoolMachinesUIDGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1CloudConfigsAksPoolMachinesUidGet", + Method: "GET", + PathPattern: "/v1/cloudconfigs/aks/{configUid}/machinePools/{machinePoolName}/machines/{machineUid}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1CloudConfigsAksPoolMachinesUIDGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1CloudConfigsAksPoolMachinesUIDGetOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1CloudConfigsAksPoolMachinesUidGet: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1CloudConfigsAksPoolMachinesUIDUpdate updates the specified machine to the cloud config s machine pool +*/ +func (a *Client) V1CloudConfigsAksPoolMachinesUIDUpdate(params *V1CloudConfigsAksPoolMachinesUIDUpdateParams) (*V1CloudConfigsAksPoolMachinesUIDUpdateNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1CloudConfigsAksPoolMachinesUIDUpdateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1CloudConfigsAksPoolMachinesUidUpdate", + Method: "PUT", + PathPattern: "/v1/cloudconfigs/aks/{configUid}/machinePools/{machinePoolName}/machines/{machineUid}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1CloudConfigsAksPoolMachinesUIDUpdateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1CloudConfigsAksPoolMachinesUIDUpdateNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1CloudConfigsAksPoolMachinesUidUpdate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1CloudConfigsAksUIDClusterConfig updates the cluster configuration information +*/ +func (a *Client) V1CloudConfigsAksUIDClusterConfig(params *V1CloudConfigsAksUIDClusterConfigParams) (*V1CloudConfigsAksUIDClusterConfigNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1CloudConfigsAksUIDClusterConfigParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1CloudConfigsAksUidClusterConfig", + Method: "PUT", + PathPattern: "/v1/cloudconfigs/aks/{configUid}/clusterConfig", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1CloudConfigsAksUIDClusterConfigReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1CloudConfigsAksUIDClusterConfigNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1CloudConfigsAksUidClusterConfig: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1CloudConfigsAwsGet returns the specified a w s cloud config +*/ +func (a *Client) V1CloudConfigsAwsGet(params *V1CloudConfigsAwsGetParams) (*V1CloudConfigsAwsGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1CloudConfigsAwsGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1CloudConfigsAwsGet", + Method: "GET", + PathPattern: "/v1/cloudconfigs/aws/{configUid}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1CloudConfigsAwsGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1CloudConfigsAwsGetOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1CloudConfigsAwsGet: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1CloudConfigsAwsMachinePoolCreate creates an a w s cloud config s machine pool +*/ +func (a *Client) V1CloudConfigsAwsMachinePoolCreate(params *V1CloudConfigsAwsMachinePoolCreateParams) (*V1CloudConfigsAwsMachinePoolCreateCreated, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1CloudConfigsAwsMachinePoolCreateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1CloudConfigsAwsMachinePoolCreate", + Method: "POST", + PathPattern: "/v1/cloudconfigs/aws/{configUid}/machinePools", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1CloudConfigsAwsMachinePoolCreateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1CloudConfigsAwsMachinePoolCreateCreated) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1CloudConfigsAwsMachinePoolCreate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1CloudConfigsAwsMachinePoolDelete deletes the specified machine pool +*/ +func (a *Client) V1CloudConfigsAwsMachinePoolDelete(params *V1CloudConfigsAwsMachinePoolDeleteParams) (*V1CloudConfigsAwsMachinePoolDeleteNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1CloudConfigsAwsMachinePoolDeleteParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1CloudConfigsAwsMachinePoolDelete", + Method: "DELETE", + PathPattern: "/v1/cloudconfigs/aws/{configUid}/machinePools/{machinePoolName}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1CloudConfigsAwsMachinePoolDeleteReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1CloudConfigsAwsMachinePoolDeleteNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1CloudConfigsAwsMachinePoolDelete: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1CloudConfigsAwsMachinePoolUpdate updates the specified a w s cloud config s machine pool +*/ +func (a *Client) V1CloudConfigsAwsMachinePoolUpdate(params *V1CloudConfigsAwsMachinePoolUpdateParams) (*V1CloudConfigsAwsMachinePoolUpdateNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1CloudConfigsAwsMachinePoolUpdateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1CloudConfigsAwsMachinePoolUpdate", + Method: "PUT", + PathPattern: "/v1/cloudconfigs/aws/{configUid}/machinePools/{machinePoolName}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1CloudConfigsAwsMachinePoolUpdateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1CloudConfigsAwsMachinePoolUpdateNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1CloudConfigsAwsMachinePoolUpdate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1CloudConfigsAwsPoolMachinesAdd adds the machine to cloud config s machine pool +*/ +func (a *Client) V1CloudConfigsAwsPoolMachinesAdd(params *V1CloudConfigsAwsPoolMachinesAddParams) (*V1CloudConfigsAwsPoolMachinesAddCreated, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1CloudConfigsAwsPoolMachinesAddParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1CloudConfigsAwsPoolMachinesAdd", + Method: "POST", + PathPattern: "/v1/cloudconfigs/aws/{configUid}/machinePools/{machinePoolName}/machines", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1CloudConfigsAwsPoolMachinesAddReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1CloudConfigsAwsPoolMachinesAddCreated) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1CloudConfigsAwsPoolMachinesAdd: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1CloudConfigsAwsPoolMachinesList retrieves a list of a w s machines +*/ +func (a *Client) V1CloudConfigsAwsPoolMachinesList(params *V1CloudConfigsAwsPoolMachinesListParams) (*V1CloudConfigsAwsPoolMachinesListOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1CloudConfigsAwsPoolMachinesListParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1CloudConfigsAwsPoolMachinesList", + Method: "GET", + PathPattern: "/v1/cloudconfigs/aws/{configUid}/machinePools/{machinePoolName}/machines", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1CloudConfigsAwsPoolMachinesListReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1CloudConfigsAwsPoolMachinesListOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1CloudConfigsAwsPoolMachinesList: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1CloudConfigsAwsPoolMachinesUIDDelete deletes the specified a w s machine +*/ +func (a *Client) V1CloudConfigsAwsPoolMachinesUIDDelete(params *V1CloudConfigsAwsPoolMachinesUIDDeleteParams) (*V1CloudConfigsAwsPoolMachinesUIDDeleteNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1CloudConfigsAwsPoolMachinesUIDDeleteParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1CloudConfigsAwsPoolMachinesUidDelete", + Method: "DELETE", + PathPattern: "/v1/cloudconfigs/aws/{configUid}/machinePools/{machinePoolName}/machines/{machineUid}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1CloudConfigsAwsPoolMachinesUIDDeleteReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1CloudConfigsAwsPoolMachinesUIDDeleteNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1CloudConfigsAwsPoolMachinesUidDelete: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1CloudConfigsAwsPoolMachinesUIDGet returns the specified a w s machine +*/ +func (a *Client) V1CloudConfigsAwsPoolMachinesUIDGet(params *V1CloudConfigsAwsPoolMachinesUIDGetParams) (*V1CloudConfigsAwsPoolMachinesUIDGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1CloudConfigsAwsPoolMachinesUIDGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1CloudConfigsAwsPoolMachinesUidGet", + Method: "GET", + PathPattern: "/v1/cloudconfigs/aws/{configUid}/machinePools/{machinePoolName}/machines/{machineUid}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1CloudConfigsAwsPoolMachinesUIDGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1CloudConfigsAwsPoolMachinesUIDGetOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1CloudConfigsAwsPoolMachinesUidGet: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1CloudConfigsAwsPoolMachinesUIDUpdate updates the specified machine to the cloud config s machine pool +*/ +func (a *Client) V1CloudConfigsAwsPoolMachinesUIDUpdate(params *V1CloudConfigsAwsPoolMachinesUIDUpdateParams) (*V1CloudConfigsAwsPoolMachinesUIDUpdateNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1CloudConfigsAwsPoolMachinesUIDUpdateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1CloudConfigsAwsPoolMachinesUidUpdate", + Method: "PUT", + PathPattern: "/v1/cloudconfigs/aws/{configUid}/machinePools/{machinePoolName}/machines/{machineUid}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1CloudConfigsAwsPoolMachinesUIDUpdateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1CloudConfigsAwsPoolMachinesUIDUpdateNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1CloudConfigsAwsPoolMachinesUidUpdate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1CloudConfigsAwsUIDClusterConfig updates the cluster configuration information +*/ +func (a *Client) V1CloudConfigsAwsUIDClusterConfig(params *V1CloudConfigsAwsUIDClusterConfigParams) (*V1CloudConfigsAwsUIDClusterConfigNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1CloudConfigsAwsUIDClusterConfigParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1CloudConfigsAwsUidClusterConfig", + Method: "PUT", + PathPattern: "/v1/cloudconfigs/aws/{configUid}/clusterConfig", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1CloudConfigsAwsUIDClusterConfigReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1CloudConfigsAwsUIDClusterConfigNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1CloudConfigsAwsUidClusterConfig: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1CloudConfigsAzureGet returns the specified azure cloud config +*/ +func (a *Client) V1CloudConfigsAzureGet(params *V1CloudConfigsAzureGetParams) (*V1CloudConfigsAzureGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1CloudConfigsAzureGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1CloudConfigsAzureGet", + Method: "GET", + PathPattern: "/v1/cloudconfigs/azure/{configUid}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1CloudConfigsAzureGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1CloudConfigsAzureGetOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1CloudConfigsAzureGet: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1CloudConfigsAzureMachinePoolCreate creates an azure cloud config s machine pool +*/ +func (a *Client) V1CloudConfigsAzureMachinePoolCreate(params *V1CloudConfigsAzureMachinePoolCreateParams) (*V1CloudConfigsAzureMachinePoolCreateCreated, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1CloudConfigsAzureMachinePoolCreateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1CloudConfigsAzureMachinePoolCreate", + Method: "POST", + PathPattern: "/v1/cloudconfigs/azure/{configUid}/machinePools", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1CloudConfigsAzureMachinePoolCreateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1CloudConfigsAzureMachinePoolCreateCreated) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1CloudConfigsAzureMachinePoolCreate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1CloudConfigsAzureMachinePoolDelete deletes the specified machine pool +*/ +func (a *Client) V1CloudConfigsAzureMachinePoolDelete(params *V1CloudConfigsAzureMachinePoolDeleteParams) (*V1CloudConfigsAzureMachinePoolDeleteNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1CloudConfigsAzureMachinePoolDeleteParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1CloudConfigsAzureMachinePoolDelete", + Method: "DELETE", + PathPattern: "/v1/cloudconfigs/azure/{configUid}/machinePools/{machinePoolName}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1CloudConfigsAzureMachinePoolDeleteReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1CloudConfigsAzureMachinePoolDeleteNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1CloudConfigsAzureMachinePoolDelete: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1CloudConfigsAzureMachinePoolUpdate updates the specified azure cloud config s machine pool +*/ +func (a *Client) V1CloudConfigsAzureMachinePoolUpdate(params *V1CloudConfigsAzureMachinePoolUpdateParams) (*V1CloudConfigsAzureMachinePoolUpdateNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1CloudConfigsAzureMachinePoolUpdateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1CloudConfigsAzureMachinePoolUpdate", + Method: "PUT", + PathPattern: "/v1/cloudconfigs/azure/{configUid}/machinePools/{machinePoolName}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1CloudConfigsAzureMachinePoolUpdateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1CloudConfigsAzureMachinePoolUpdateNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1CloudConfigsAzureMachinePoolUpdate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1CloudConfigsAzurePoolMachinesAdd adds the machine to cloud config s machine pool +*/ +func (a *Client) V1CloudConfigsAzurePoolMachinesAdd(params *V1CloudConfigsAzurePoolMachinesAddParams) (*V1CloudConfigsAzurePoolMachinesAddCreated, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1CloudConfigsAzurePoolMachinesAddParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1CloudConfigsAzurePoolMachinesAdd", + Method: "POST", + PathPattern: "/v1/cloudconfigs/azure/{configUid}/machinePools/{machinePoolName}/machines", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1CloudConfigsAzurePoolMachinesAddReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1CloudConfigsAzurePoolMachinesAddCreated) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1CloudConfigsAzurePoolMachinesAdd: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1CloudConfigsAzurePoolMachinesList retrieves a list of azure machines + +Returns all the Azure machines restricted to the user role and filters. +*/ +func (a *Client) V1CloudConfigsAzurePoolMachinesList(params *V1CloudConfigsAzurePoolMachinesListParams) (*V1CloudConfigsAzurePoolMachinesListOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1CloudConfigsAzurePoolMachinesListParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1CloudConfigsAzurePoolMachinesList", + Method: "GET", + PathPattern: "/v1/cloudconfigs/azure/{configUid}/machinePools/{machinePoolName}/machines", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1CloudConfigsAzurePoolMachinesListReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1CloudConfigsAzurePoolMachinesListOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1CloudConfigsAzurePoolMachinesList: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1CloudConfigsAzurePoolMachinesUIDDelete deletes the specified azure machine +*/ +func (a *Client) V1CloudConfigsAzurePoolMachinesUIDDelete(params *V1CloudConfigsAzurePoolMachinesUIDDeleteParams) (*V1CloudConfigsAzurePoolMachinesUIDDeleteNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1CloudConfigsAzurePoolMachinesUIDDeleteParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1CloudConfigsAzurePoolMachinesUidDelete", + Method: "DELETE", + PathPattern: "/v1/cloudconfigs/azure/{configUid}/machinePools/{machinePoolName}/machines/{machineUid}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1CloudConfigsAzurePoolMachinesUIDDeleteReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1CloudConfigsAzurePoolMachinesUIDDeleteNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1CloudConfigsAzurePoolMachinesUidDelete: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1CloudConfigsAzurePoolMachinesUIDGet returns the specified azure machine + +Returns a Azure machine for the specified uid. +*/ +func (a *Client) V1CloudConfigsAzurePoolMachinesUIDGet(params *V1CloudConfigsAzurePoolMachinesUIDGetParams) (*V1CloudConfigsAzurePoolMachinesUIDGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1CloudConfigsAzurePoolMachinesUIDGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1CloudConfigsAzurePoolMachinesUidGet", + Method: "GET", + PathPattern: "/v1/cloudconfigs/azure/{configUid}/machinePools/{machinePoolName}/machines/{machineUid}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1CloudConfigsAzurePoolMachinesUIDGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1CloudConfigsAzurePoolMachinesUIDGetOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1CloudConfigsAzurePoolMachinesUidGet: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1CloudConfigsAzurePoolMachinesUIDUpdate updates the specified machine to cloud config s machine pool +*/ +func (a *Client) V1CloudConfigsAzurePoolMachinesUIDUpdate(params *V1CloudConfigsAzurePoolMachinesUIDUpdateParams) (*V1CloudConfigsAzurePoolMachinesUIDUpdateNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1CloudConfigsAzurePoolMachinesUIDUpdateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1CloudConfigsAzurePoolMachinesUidUpdate", + Method: "PUT", + PathPattern: "/v1/cloudconfigs/azure/{configUid}/machinePools/{machinePoolName}/machines/{machineUid}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1CloudConfigsAzurePoolMachinesUIDUpdateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1CloudConfigsAzurePoolMachinesUIDUpdateNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1CloudConfigsAzurePoolMachinesUidUpdate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1CloudConfigsAzureUIDClusterConfig updates the cluster configuration information +*/ +func (a *Client) V1CloudConfigsAzureUIDClusterConfig(params *V1CloudConfigsAzureUIDClusterConfigParams) (*V1CloudConfigsAzureUIDClusterConfigNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1CloudConfigsAzureUIDClusterConfigParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1CloudConfigsAzureUidClusterConfig", + Method: "PUT", + PathPattern: "/v1/cloudconfigs/azure/{configUid}/clusterConfig", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1CloudConfigsAzureUIDClusterConfigReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1CloudConfigsAzureUIDClusterConfigNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1CloudConfigsAzureUidClusterConfig: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1CloudConfigsCustomGet returns the specified custom cloud config +*/ +func (a *Client) V1CloudConfigsCustomGet(params *V1CloudConfigsCustomGetParams) (*V1CloudConfigsCustomGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1CloudConfigsCustomGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1CloudConfigsCustomGet", + Method: "GET", + PathPattern: "/v1/cloudconfigs/cloudTypes/{cloudType}/{configUid}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1CloudConfigsCustomGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1CloudConfigsCustomGetOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1CloudConfigsCustomGet: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1CloudConfigsCustomMachinePoolCreate creates an custom cloud config s machine pool +*/ +func (a *Client) V1CloudConfigsCustomMachinePoolCreate(params *V1CloudConfigsCustomMachinePoolCreateParams) (*V1CloudConfigsCustomMachinePoolCreateCreated, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1CloudConfigsCustomMachinePoolCreateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1CloudConfigsCustomMachinePoolCreate", + Method: "POST", + PathPattern: "/v1/cloudconfigs/cloudTypes/{cloudType}/{configUid}/machinePools", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1CloudConfigsCustomMachinePoolCreateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1CloudConfigsCustomMachinePoolCreateCreated) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1CloudConfigsCustomMachinePoolCreate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1CloudConfigsCustomMachinePoolDelete deletes the specified machine pool +*/ +func (a *Client) V1CloudConfigsCustomMachinePoolDelete(params *V1CloudConfigsCustomMachinePoolDeleteParams) (*V1CloudConfigsCustomMachinePoolDeleteNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1CloudConfigsCustomMachinePoolDeleteParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1CloudConfigsCustomMachinePoolDelete", + Method: "DELETE", + PathPattern: "/v1/cloudconfigs/cloudTypes/{cloudType}/{configUid}/machinePools/{machinePoolName}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1CloudConfigsCustomMachinePoolDeleteReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1CloudConfigsCustomMachinePoolDeleteNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1CloudConfigsCustomMachinePoolDelete: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1CloudConfigsCustomMachinePoolUpdate updates the specified custom cloud config s machine pool +*/ +func (a *Client) V1CloudConfigsCustomMachinePoolUpdate(params *V1CloudConfigsCustomMachinePoolUpdateParams) (*V1CloudConfigsCustomMachinePoolUpdateNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1CloudConfigsCustomMachinePoolUpdateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1CloudConfigsCustomMachinePoolUpdate", + Method: "PUT", + PathPattern: "/v1/cloudconfigs/cloudTypes/{cloudType}/{configUid}/machinePools/{machinePoolName}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1CloudConfigsCustomMachinePoolUpdateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1CloudConfigsCustomMachinePoolUpdateNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1CloudConfigsCustomMachinePoolUpdate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1CloudConfigsCustomPoolMachinesAdd adds the machine to cloud config s machine pool +*/ +func (a *Client) V1CloudConfigsCustomPoolMachinesAdd(params *V1CloudConfigsCustomPoolMachinesAddParams) (*V1CloudConfigsCustomPoolMachinesAddCreated, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1CloudConfigsCustomPoolMachinesAddParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1CloudConfigsCustomPoolMachinesAdd", + Method: "POST", + PathPattern: "/v1/cloudconfigs/cloudTypes/{cloudType}/{configUid}/machinePools/{machinePoolName}/machines", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1CloudConfigsCustomPoolMachinesAddReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1CloudConfigsCustomPoolMachinesAddCreated) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1CloudConfigsCustomPoolMachinesAdd: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1CloudConfigsCustomPoolMachinesList retrieves a list of custom machines +*/ +func (a *Client) V1CloudConfigsCustomPoolMachinesList(params *V1CloudConfigsCustomPoolMachinesListParams) (*V1CloudConfigsCustomPoolMachinesListOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1CloudConfigsCustomPoolMachinesListParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1CloudConfigsCustomPoolMachinesList", + Method: "GET", + PathPattern: "/v1/cloudconfigs/cloudTypes/{cloudType}/{configUid}/machinePools/{machinePoolName}/machines", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1CloudConfigsCustomPoolMachinesListReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1CloudConfigsCustomPoolMachinesListOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1CloudConfigsCustomPoolMachinesList: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1CloudConfigsCustomPoolMachinesUIDDelete deletes the specified custom machine +*/ +func (a *Client) V1CloudConfigsCustomPoolMachinesUIDDelete(params *V1CloudConfigsCustomPoolMachinesUIDDeleteParams) (*V1CloudConfigsCustomPoolMachinesUIDDeleteNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1CloudConfigsCustomPoolMachinesUIDDeleteParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1CloudConfigsCustomPoolMachinesUidDelete", + Method: "DELETE", + PathPattern: "/v1/cloudconfigs/cloudTypes/{cloudType}/{configUid}/machinePools/{machinePoolName}/machines/{machineUid}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1CloudConfigsCustomPoolMachinesUIDDeleteReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1CloudConfigsCustomPoolMachinesUIDDeleteNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1CloudConfigsCustomPoolMachinesUidDelete: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1CloudConfigsCustomPoolMachinesUIDGet returns the specified custom machine +*/ +func (a *Client) V1CloudConfigsCustomPoolMachinesUIDGet(params *V1CloudConfigsCustomPoolMachinesUIDGetParams) (*V1CloudConfigsCustomPoolMachinesUIDGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1CloudConfigsCustomPoolMachinesUIDGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1CloudConfigsCustomPoolMachinesUidGet", + Method: "GET", + PathPattern: "/v1/cloudconfigs/cloudTypes/{cloudType}/{configUid}/machinePools/{machinePoolName}/machines/{machineUid}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1CloudConfigsCustomPoolMachinesUIDGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1CloudConfigsCustomPoolMachinesUIDGetOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1CloudConfigsCustomPoolMachinesUidGet: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1CloudConfigsCustomPoolMachinesUIDUpdate updates the specified machine to the cloud config s machine pool +*/ +func (a *Client) V1CloudConfigsCustomPoolMachinesUIDUpdate(params *V1CloudConfigsCustomPoolMachinesUIDUpdateParams) (*V1CloudConfigsCustomPoolMachinesUIDUpdateNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1CloudConfigsCustomPoolMachinesUIDUpdateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1CloudConfigsCustomPoolMachinesUidUpdate", + Method: "PUT", + PathPattern: "/v1/cloudconfigs/cloudTypes/{cloudType}/{configUid}/machinePools/{machinePoolName}/machines/{machineUid}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1CloudConfigsCustomPoolMachinesUIDUpdateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1CloudConfigsCustomPoolMachinesUIDUpdateNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1CloudConfigsCustomPoolMachinesUidUpdate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1CloudConfigsCustomUIDClusterConfig updates the cluster configuration information +*/ +func (a *Client) V1CloudConfigsCustomUIDClusterConfig(params *V1CloudConfigsCustomUIDClusterConfigParams) (*V1CloudConfigsCustomUIDClusterConfigNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1CloudConfigsCustomUIDClusterConfigParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1CloudConfigsCustomUidClusterConfig", + Method: "PUT", + PathPattern: "/v1/cloudconfigs/cloudTypes/{cloudType}/{configUid}/clusterConfig", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1CloudConfigsCustomUIDClusterConfigReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1CloudConfigsCustomUIDClusterConfigNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1CloudConfigsCustomUidClusterConfig: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1CloudConfigsEdgeNativeGet returns the specified edge native cloud config +*/ +func (a *Client) V1CloudConfigsEdgeNativeGet(params *V1CloudConfigsEdgeNativeGetParams) (*V1CloudConfigsEdgeNativeGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1CloudConfigsEdgeNativeGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1CloudConfigsEdgeNativeGet", + Method: "GET", + PathPattern: "/v1/cloudconfigs/edge-native/{configUid}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1CloudConfigsEdgeNativeGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1CloudConfigsEdgeNativeGetOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1CloudConfigsEdgeNativeGet: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1CloudConfigsEdgeNativeMachinePoolCreate creates a edge native cloud config s machine pool +*/ +func (a *Client) V1CloudConfigsEdgeNativeMachinePoolCreate(params *V1CloudConfigsEdgeNativeMachinePoolCreateParams) (*V1CloudConfigsEdgeNativeMachinePoolCreateCreated, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1CloudConfigsEdgeNativeMachinePoolCreateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1CloudConfigsEdgeNativeMachinePoolCreate", + Method: "POST", + PathPattern: "/v1/cloudconfigs/edge-native/{configUid}/machinePools", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1CloudConfigsEdgeNativeMachinePoolCreateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1CloudConfigsEdgeNativeMachinePoolCreateCreated) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1CloudConfigsEdgeNativeMachinePoolCreate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1CloudConfigsEdgeNativeMachinePoolDelete deletes the specified machine pool +*/ +func (a *Client) V1CloudConfigsEdgeNativeMachinePoolDelete(params *V1CloudConfigsEdgeNativeMachinePoolDeleteParams) (*V1CloudConfigsEdgeNativeMachinePoolDeleteNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1CloudConfigsEdgeNativeMachinePoolDeleteParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1CloudConfigsEdgeNativeMachinePoolDelete", + Method: "DELETE", + PathPattern: "/v1/cloudconfigs/edge-native/{configUid}/machinePools/{machinePoolName}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1CloudConfigsEdgeNativeMachinePoolDeleteReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1CloudConfigsEdgeNativeMachinePoolDeleteNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1CloudConfigsEdgeNativeMachinePoolDelete: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1CloudConfigsEdgeNativeMachinePoolUpdate updates the specified edge native cloud config s machine pool +*/ +func (a *Client) V1CloudConfigsEdgeNativeMachinePoolUpdate(params *V1CloudConfigsEdgeNativeMachinePoolUpdateParams) (*V1CloudConfigsEdgeNativeMachinePoolUpdateNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1CloudConfigsEdgeNativeMachinePoolUpdateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1CloudConfigsEdgeNativeMachinePoolUpdate", + Method: "PUT", + PathPattern: "/v1/cloudconfigs/edge-native/{configUid}/machinePools/{machinePoolName}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1CloudConfigsEdgeNativeMachinePoolUpdateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1CloudConfigsEdgeNativeMachinePoolUpdateNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1CloudConfigsEdgeNativeMachinePoolUpdate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1CloudConfigsEdgeNativePoolMachinesAdd adds the edge native machine to cloud config s machine pool +*/ +func (a *Client) V1CloudConfigsEdgeNativePoolMachinesAdd(params *V1CloudConfigsEdgeNativePoolMachinesAddParams) (*V1CloudConfigsEdgeNativePoolMachinesAddCreated, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1CloudConfigsEdgeNativePoolMachinesAddParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1CloudConfigsEdgeNativePoolMachinesAdd", + Method: "POST", + PathPattern: "/v1/cloudconfigs/edge-native/{configUid}/machinePools/{machinePoolName}/machines", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1CloudConfigsEdgeNativePoolMachinesAddReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1CloudConfigsEdgeNativePoolMachinesAddCreated) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1CloudConfigsEdgeNativePoolMachinesAdd: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1CloudConfigsEdgeNativePoolMachinesList retrieves a list of edge native machines +*/ +func (a *Client) V1CloudConfigsEdgeNativePoolMachinesList(params *V1CloudConfigsEdgeNativePoolMachinesListParams) (*V1CloudConfigsEdgeNativePoolMachinesListOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1CloudConfigsEdgeNativePoolMachinesListParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1CloudConfigsEdgeNativePoolMachinesList", + Method: "GET", + PathPattern: "/v1/cloudconfigs/edge-native/{configUid}/machinePools/{machinePoolName}/machines", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1CloudConfigsEdgeNativePoolMachinesListReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1CloudConfigsEdgeNativePoolMachinesListOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1CloudConfigsEdgeNativePoolMachinesList: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1CloudConfigsEdgeNativePoolMachinesUIDDelete deletes the specified edge native machine +*/ +func (a *Client) V1CloudConfigsEdgeNativePoolMachinesUIDDelete(params *V1CloudConfigsEdgeNativePoolMachinesUIDDeleteParams) (*V1CloudConfigsEdgeNativePoolMachinesUIDDeleteNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1CloudConfigsEdgeNativePoolMachinesUIDDeleteParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1CloudConfigsEdgeNativePoolMachinesUidDelete", + Method: "DELETE", + PathPattern: "/v1/cloudconfigs/edge-native/{configUid}/machinePools/{machinePoolName}/machines/{machineUid}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1CloudConfigsEdgeNativePoolMachinesUIDDeleteReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1CloudConfigsEdgeNativePoolMachinesUIDDeleteNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1CloudConfigsEdgeNativePoolMachinesUidDelete: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1CloudConfigsEdgeNativePoolMachinesUIDGet returns the specified edge native machine +*/ +func (a *Client) V1CloudConfigsEdgeNativePoolMachinesUIDGet(params *V1CloudConfigsEdgeNativePoolMachinesUIDGetParams) (*V1CloudConfigsEdgeNativePoolMachinesUIDGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1CloudConfigsEdgeNativePoolMachinesUIDGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1CloudConfigsEdgeNativePoolMachinesUidGet", + Method: "GET", + PathPattern: "/v1/cloudconfigs/edge-native/{configUid}/machinePools/{machinePoolName}/machines/{machineUid}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1CloudConfigsEdgeNativePoolMachinesUIDGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1CloudConfigsEdgeNativePoolMachinesUIDGetOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1CloudConfigsEdgeNativePoolMachinesUidGet: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1CloudConfigsEdgeNativePoolMachinesUIDUpdate updates the specified machine to cloud config s machine pool +*/ +func (a *Client) V1CloudConfigsEdgeNativePoolMachinesUIDUpdate(params *V1CloudConfigsEdgeNativePoolMachinesUIDUpdateParams) (*V1CloudConfigsEdgeNativePoolMachinesUIDUpdateNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1CloudConfigsEdgeNativePoolMachinesUIDUpdateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1CloudConfigsEdgeNativePoolMachinesUidUpdate", + Method: "PUT", + PathPattern: "/v1/cloudconfigs/edge-native/{configUid}/machinePools/{machinePoolName}/machines/{machineUid}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1CloudConfigsEdgeNativePoolMachinesUIDUpdateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1CloudConfigsEdgeNativePoolMachinesUIDUpdateNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1CloudConfigsEdgeNativePoolMachinesUidUpdate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1CloudConfigsEdgeNativeUIDClusterConfig updates the cluster configuration information +*/ +func (a *Client) V1CloudConfigsEdgeNativeUIDClusterConfig(params *V1CloudConfigsEdgeNativeUIDClusterConfigParams) (*V1CloudConfigsEdgeNativeUIDClusterConfigNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1CloudConfigsEdgeNativeUIDClusterConfigParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1CloudConfigsEdgeNativeUidClusterConfig", + Method: "PUT", + PathPattern: "/v1/cloudconfigs/edge-native/{configUid}/clusterConfig", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1CloudConfigsEdgeNativeUIDClusterConfigReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1CloudConfigsEdgeNativeUIDClusterConfigNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1CloudConfigsEdgeNativeUidClusterConfig: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1CloudConfigsEksGet returns the specified e k s cloud config +*/ +func (a *Client) V1CloudConfigsEksGet(params *V1CloudConfigsEksGetParams) (*V1CloudConfigsEksGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1CloudConfigsEksGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1CloudConfigsEksGet", + Method: "GET", + PathPattern: "/v1/cloudconfigs/eks/{configUid}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1CloudConfigsEksGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1CloudConfigsEksGetOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1CloudConfigsEksGet: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1CloudConfigsEksMachinePoolCreate creates an e k s cloud config s machine pool +*/ +func (a *Client) V1CloudConfigsEksMachinePoolCreate(params *V1CloudConfigsEksMachinePoolCreateParams) (*V1CloudConfigsEksMachinePoolCreateCreated, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1CloudConfigsEksMachinePoolCreateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1CloudConfigsEksMachinePoolCreate", + Method: "POST", + PathPattern: "/v1/cloudconfigs/eks/{configUid}/machinePools", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1CloudConfigsEksMachinePoolCreateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1CloudConfigsEksMachinePoolCreateCreated) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1CloudConfigsEksMachinePoolCreate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1CloudConfigsEksMachinePoolDelete deletes the specified machine pool +*/ +func (a *Client) V1CloudConfigsEksMachinePoolDelete(params *V1CloudConfigsEksMachinePoolDeleteParams) (*V1CloudConfigsEksMachinePoolDeleteNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1CloudConfigsEksMachinePoolDeleteParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1CloudConfigsEksMachinePoolDelete", + Method: "DELETE", + PathPattern: "/v1/cloudconfigs/eks/{configUid}/machinePools/{machinePoolName}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1CloudConfigsEksMachinePoolDeleteReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1CloudConfigsEksMachinePoolDeleteNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1CloudConfigsEksMachinePoolDelete: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1CloudConfigsEksMachinePoolUpdate updates the specified e k s cloud config s machine pool +*/ +func (a *Client) V1CloudConfigsEksMachinePoolUpdate(params *V1CloudConfigsEksMachinePoolUpdateParams) (*V1CloudConfigsEksMachinePoolUpdateNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1CloudConfigsEksMachinePoolUpdateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1CloudConfigsEksMachinePoolUpdate", + Method: "PUT", + PathPattern: "/v1/cloudconfigs/eks/{configUid}/machinePools/{machinePoolName}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1CloudConfigsEksMachinePoolUpdateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1CloudConfigsEksMachinePoolUpdateNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1CloudConfigsEksMachinePoolUpdate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1CloudConfigsEksPoolMachinesAdd adds the machine to cloud config s machine pool +*/ +func (a *Client) V1CloudConfigsEksPoolMachinesAdd(params *V1CloudConfigsEksPoolMachinesAddParams) (*V1CloudConfigsEksPoolMachinesAddCreated, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1CloudConfigsEksPoolMachinesAddParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1CloudConfigsEksPoolMachinesAdd", + Method: "POST", + PathPattern: "/v1/cloudconfigs/eks/{configUid}/machinePools/{machinePoolName}/machines", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1CloudConfigsEksPoolMachinesAddReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1CloudConfigsEksPoolMachinesAddCreated) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1CloudConfigsEksPoolMachinesAdd: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1CloudConfigsEksPoolMachinesList retrieves a list of e k s machines +*/ +func (a *Client) V1CloudConfigsEksPoolMachinesList(params *V1CloudConfigsEksPoolMachinesListParams) (*V1CloudConfigsEksPoolMachinesListOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1CloudConfigsEksPoolMachinesListParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1CloudConfigsEksPoolMachinesList", + Method: "GET", + PathPattern: "/v1/cloudconfigs/eks/{configUid}/machinePools/{machinePoolName}/machines", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1CloudConfigsEksPoolMachinesListReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1CloudConfigsEksPoolMachinesListOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1CloudConfigsEksPoolMachinesList: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1CloudConfigsEksPoolMachinesUIDDelete deletes the specified e k s machine +*/ +func (a *Client) V1CloudConfigsEksPoolMachinesUIDDelete(params *V1CloudConfigsEksPoolMachinesUIDDeleteParams) (*V1CloudConfigsEksPoolMachinesUIDDeleteNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1CloudConfigsEksPoolMachinesUIDDeleteParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1CloudConfigsEksPoolMachinesUidDelete", + Method: "DELETE", + PathPattern: "/v1/cloudconfigs/eks/{configUid}/machinePools/{machinePoolName}/machines/{machineUid}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1CloudConfigsEksPoolMachinesUIDDeleteReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1CloudConfigsEksPoolMachinesUIDDeleteNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1CloudConfigsEksPoolMachinesUidDelete: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1CloudConfigsEksPoolMachinesUIDGet returns the specified e k s machine +*/ +func (a *Client) V1CloudConfigsEksPoolMachinesUIDGet(params *V1CloudConfigsEksPoolMachinesUIDGetParams) (*V1CloudConfigsEksPoolMachinesUIDGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1CloudConfigsEksPoolMachinesUIDGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1CloudConfigsEksPoolMachinesUidGet", + Method: "GET", + PathPattern: "/v1/cloudconfigs/eks/{configUid}/machinePools/{machinePoolName}/machines/{machineUid}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1CloudConfigsEksPoolMachinesUIDGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1CloudConfigsEksPoolMachinesUIDGetOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1CloudConfigsEksPoolMachinesUidGet: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1CloudConfigsEksPoolMachinesUIDUpdate updates the specified machine to the cloud config s machine pool +*/ +func (a *Client) V1CloudConfigsEksPoolMachinesUIDUpdate(params *V1CloudConfigsEksPoolMachinesUIDUpdateParams) (*V1CloudConfigsEksPoolMachinesUIDUpdateNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1CloudConfigsEksPoolMachinesUIDUpdateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1CloudConfigsEksPoolMachinesUidUpdate", + Method: "PUT", + PathPattern: "/v1/cloudconfigs/eks/{configUid}/machinePools/{machinePoolName}/machines/{machineUid}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1CloudConfigsEksPoolMachinesUIDUpdateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1CloudConfigsEksPoolMachinesUIDUpdateNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1CloudConfigsEksPoolMachinesUidUpdate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1CloudConfigsEksUIDClusterConfig updates the cluster configuration information +*/ +func (a *Client) V1CloudConfigsEksUIDClusterConfig(params *V1CloudConfigsEksUIDClusterConfigParams) (*V1CloudConfigsEksUIDClusterConfigNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1CloudConfigsEksUIDClusterConfigParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1CloudConfigsEksUidClusterConfig", + Method: "PUT", + PathPattern: "/v1/cloudconfigs/eks/{configUid}/clusterConfig", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1CloudConfigsEksUIDClusterConfigReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1CloudConfigsEksUIDClusterConfigNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1CloudConfigsEksUidClusterConfig: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1CloudConfigsEksUIDFargateProfilesUpdate updates e k s cloud config s fargate profiles +*/ +func (a *Client) V1CloudConfigsEksUIDFargateProfilesUpdate(params *V1CloudConfigsEksUIDFargateProfilesUpdateParams) (*V1CloudConfigsEksUIDFargateProfilesUpdateNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1CloudConfigsEksUIDFargateProfilesUpdateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1CloudConfigsEksUidFargateProfilesUpdate", + Method: "PUT", + PathPattern: "/v1/cloudconfigs/eks/{configUid}/fargateProfiles", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1CloudConfigsEksUIDFargateProfilesUpdateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1CloudConfigsEksUIDFargateProfilesUpdateNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1CloudConfigsEksUidFargateProfilesUpdate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1CloudConfigsGcpGet returns the specified g c p cloud config +*/ +func (a *Client) V1CloudConfigsGcpGet(params *V1CloudConfigsGcpGetParams) (*V1CloudConfigsGcpGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1CloudConfigsGcpGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1CloudConfigsGcpGet", + Method: "GET", + PathPattern: "/v1/cloudconfigs/gcp/{configUid}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1CloudConfigsGcpGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1CloudConfigsGcpGetOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1CloudConfigsGcpGet: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1CloudConfigsGcpMachinePoolCreate creates a gcp cloud config s machine pool +*/ +func (a *Client) V1CloudConfigsGcpMachinePoolCreate(params *V1CloudConfigsGcpMachinePoolCreateParams) (*V1CloudConfigsGcpMachinePoolCreateCreated, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1CloudConfigsGcpMachinePoolCreateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1CloudConfigsGcpMachinePoolCreate", + Method: "POST", + PathPattern: "/v1/cloudconfigs/gcp/{configUid}/machinePools", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1CloudConfigsGcpMachinePoolCreateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1CloudConfigsGcpMachinePoolCreateCreated) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1CloudConfigsGcpMachinePoolCreate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1CloudConfigsGcpMachinePoolDelete deletes the specified machine pool +*/ +func (a *Client) V1CloudConfigsGcpMachinePoolDelete(params *V1CloudConfigsGcpMachinePoolDeleteParams) (*V1CloudConfigsGcpMachinePoolDeleteNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1CloudConfigsGcpMachinePoolDeleteParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1CloudConfigsGcpMachinePoolDelete", + Method: "DELETE", + PathPattern: "/v1/cloudconfigs/gcp/{configUid}/machinePools/{machinePoolName}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1CloudConfigsGcpMachinePoolDeleteReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1CloudConfigsGcpMachinePoolDeleteNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1CloudConfigsGcpMachinePoolDelete: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1CloudConfigsGcpMachinePoolUpdate updates the specified g c p cloud config s machine pool +*/ +func (a *Client) V1CloudConfigsGcpMachinePoolUpdate(params *V1CloudConfigsGcpMachinePoolUpdateParams) (*V1CloudConfigsGcpMachinePoolUpdateNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1CloudConfigsGcpMachinePoolUpdateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1CloudConfigsGcpMachinePoolUpdate", + Method: "PUT", + PathPattern: "/v1/cloudconfigs/gcp/{configUid}/machinePools/{machinePoolName}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1CloudConfigsGcpMachinePoolUpdateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1CloudConfigsGcpMachinePoolUpdateNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1CloudConfigsGcpMachinePoolUpdate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1CloudConfigsGcpPoolMachinesAdd adds the machine to cloud config s machine pool +*/ +func (a *Client) V1CloudConfigsGcpPoolMachinesAdd(params *V1CloudConfigsGcpPoolMachinesAddParams) (*V1CloudConfigsGcpPoolMachinesAddCreated, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1CloudConfigsGcpPoolMachinesAddParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1CloudConfigsGcpPoolMachinesAdd", + Method: "POST", + PathPattern: "/v1/cloudconfigs/gcp/{configUid}/machinePools/{machinePoolName}/machines", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1CloudConfigsGcpPoolMachinesAddReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1CloudConfigsGcpPoolMachinesAddCreated) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1CloudConfigsGcpPoolMachinesAdd: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1CloudConfigsGcpPoolMachinesList retrieves a list of g c p machines +*/ +func (a *Client) V1CloudConfigsGcpPoolMachinesList(params *V1CloudConfigsGcpPoolMachinesListParams) (*V1CloudConfigsGcpPoolMachinesListOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1CloudConfigsGcpPoolMachinesListParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1CloudConfigsGcpPoolMachinesList", + Method: "GET", + PathPattern: "/v1/cloudconfigs/gcp/{configUid}/machinePools/{machinePoolName}/machines", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1CloudConfigsGcpPoolMachinesListReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1CloudConfigsGcpPoolMachinesListOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1CloudConfigsGcpPoolMachinesList: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1CloudConfigsGcpPoolMachinesUIDDelete deletes the specified g c p machine +*/ +func (a *Client) V1CloudConfigsGcpPoolMachinesUIDDelete(params *V1CloudConfigsGcpPoolMachinesUIDDeleteParams) (*V1CloudConfigsGcpPoolMachinesUIDDeleteNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1CloudConfigsGcpPoolMachinesUIDDeleteParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1CloudConfigsGcpPoolMachinesUidDelete", + Method: "DELETE", + PathPattern: "/v1/cloudconfigs/gcp/{configUid}/machinePools/{machinePoolName}/machines/{machineUid}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1CloudConfigsGcpPoolMachinesUIDDeleteReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1CloudConfigsGcpPoolMachinesUIDDeleteNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1CloudConfigsGcpPoolMachinesUidDelete: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1CloudConfigsGcpPoolMachinesUIDGet returns the specified g c p machine +*/ +func (a *Client) V1CloudConfigsGcpPoolMachinesUIDGet(params *V1CloudConfigsGcpPoolMachinesUIDGetParams) (*V1CloudConfigsGcpPoolMachinesUIDGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1CloudConfigsGcpPoolMachinesUIDGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1CloudConfigsGcpPoolMachinesUidGet", + Method: "GET", + PathPattern: "/v1/cloudconfigs/gcp/{configUid}/machinePools/{machinePoolName}/machines/{machineUid}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1CloudConfigsGcpPoolMachinesUIDGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1CloudConfigsGcpPoolMachinesUIDGetOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1CloudConfigsGcpPoolMachinesUidGet: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1CloudConfigsGcpPoolMachinesUIDUpdate updates the specified machine to the cloud config s machine pool +*/ +func (a *Client) V1CloudConfigsGcpPoolMachinesUIDUpdate(params *V1CloudConfigsGcpPoolMachinesUIDUpdateParams) (*V1CloudConfigsGcpPoolMachinesUIDUpdateNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1CloudConfigsGcpPoolMachinesUIDUpdateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1CloudConfigsGcpPoolMachinesUidUpdate", + Method: "PUT", + PathPattern: "/v1/cloudconfigs/gcp/{configUid}/machinePools/{machinePoolName}/machines/{machineUid}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1CloudConfigsGcpPoolMachinesUIDUpdateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1CloudConfigsGcpPoolMachinesUIDUpdateNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1CloudConfigsGcpPoolMachinesUidUpdate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1CloudConfigsGcpUIDClusterConfig updates the cluster configuration information +*/ +func (a *Client) V1CloudConfigsGcpUIDClusterConfig(params *V1CloudConfigsGcpUIDClusterConfigParams) (*V1CloudConfigsGcpUIDClusterConfigNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1CloudConfigsGcpUIDClusterConfigParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1CloudConfigsGcpUidClusterConfig", + Method: "PUT", + PathPattern: "/v1/cloudconfigs/gcp/{configUid}/clusterConfig", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1CloudConfigsGcpUIDClusterConfigReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1CloudConfigsGcpUIDClusterConfigNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1CloudConfigsGcpUidClusterConfig: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1CloudConfigsGenericGet returns the specified generic cloud config +*/ +func (a *Client) V1CloudConfigsGenericGet(params *V1CloudConfigsGenericGetParams) (*V1CloudConfigsGenericGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1CloudConfigsGenericGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1CloudConfigsGenericGet", + Method: "GET", + PathPattern: "/v1/cloudconfigs/generic/{configUid}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1CloudConfigsGenericGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1CloudConfigsGenericGetOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1CloudConfigsGenericGet: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1CloudConfigsGenericMachinePoolCreate creates a generic cloud config s machine pool +*/ +func (a *Client) V1CloudConfigsGenericMachinePoolCreate(params *V1CloudConfigsGenericMachinePoolCreateParams) (*V1CloudConfigsGenericMachinePoolCreateCreated, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1CloudConfigsGenericMachinePoolCreateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1CloudConfigsGenericMachinePoolCreate", + Method: "POST", + PathPattern: "/v1/cloudconfigs/generic/{configUid}/machinePools", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1CloudConfigsGenericMachinePoolCreateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1CloudConfigsGenericMachinePoolCreateCreated) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1CloudConfigsGenericMachinePoolCreate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1CloudConfigsGenericMachinePoolDelete deletes the specified machine pool +*/ +func (a *Client) V1CloudConfigsGenericMachinePoolDelete(params *V1CloudConfigsGenericMachinePoolDeleteParams) (*V1CloudConfigsGenericMachinePoolDeleteNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1CloudConfigsGenericMachinePoolDeleteParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1CloudConfigsGenericMachinePoolDelete", + Method: "DELETE", + PathPattern: "/v1/cloudconfigs/generic/{configUid}/machinePools/{machinePoolName}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1CloudConfigsGenericMachinePoolDeleteReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1CloudConfigsGenericMachinePoolDeleteNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1CloudConfigsGenericMachinePoolDelete: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1CloudConfigsGenericMachinePoolUpdate updates the specified generic cloud config s machine pool +*/ +func (a *Client) V1CloudConfigsGenericMachinePoolUpdate(params *V1CloudConfigsGenericMachinePoolUpdateParams) (*V1CloudConfigsGenericMachinePoolUpdateNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1CloudConfigsGenericMachinePoolUpdateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1CloudConfigsGenericMachinePoolUpdate", + Method: "PUT", + PathPattern: "/v1/cloudconfigs/generic/{configUid}/machinePools/{machinePoolName}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1CloudConfigsGenericMachinePoolUpdateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1CloudConfigsGenericMachinePoolUpdateNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1CloudConfigsGenericMachinePoolUpdate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1CloudConfigsGenericPoolMachinesAdd adds the machine to cloud config s machine pool +*/ +func (a *Client) V1CloudConfigsGenericPoolMachinesAdd(params *V1CloudConfigsGenericPoolMachinesAddParams) (*V1CloudConfigsGenericPoolMachinesAddCreated, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1CloudConfigsGenericPoolMachinesAddParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1CloudConfigsGenericPoolMachinesAdd", + Method: "POST", + PathPattern: "/v1/cloudconfigs/generic/{configUid}/machinePools/{machinePoolName}/machines", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1CloudConfigsGenericPoolMachinesAddReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1CloudConfigsGenericPoolMachinesAddCreated) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1CloudConfigsGenericPoolMachinesAdd: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1CloudConfigsGenericPoolMachinesList retrieves a list of generic machines +*/ +func (a *Client) V1CloudConfigsGenericPoolMachinesList(params *V1CloudConfigsGenericPoolMachinesListParams) (*V1CloudConfigsGenericPoolMachinesListOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1CloudConfigsGenericPoolMachinesListParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1CloudConfigsGenericPoolMachinesList", + Method: "GET", + PathPattern: "/v1/cloudconfigs/generic/{configUid}/machinePools/{machinePoolName}/machines", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1CloudConfigsGenericPoolMachinesListReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1CloudConfigsGenericPoolMachinesListOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1CloudConfigsGenericPoolMachinesList: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1CloudConfigsGenericPoolMachinesUIDDelete deletes the specified machine +*/ +func (a *Client) V1CloudConfigsGenericPoolMachinesUIDDelete(params *V1CloudConfigsGenericPoolMachinesUIDDeleteParams) (*V1CloudConfigsGenericPoolMachinesUIDDeleteNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1CloudConfigsGenericPoolMachinesUIDDeleteParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1CloudConfigsGenericPoolMachinesUidDelete", + Method: "DELETE", + PathPattern: "/v1/cloudconfigs/generic/{configUid}/machinePools/{machinePoolName}/machines/{machineUid}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1CloudConfigsGenericPoolMachinesUIDDeleteReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1CloudConfigsGenericPoolMachinesUIDDeleteNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1CloudConfigsGenericPoolMachinesUidDelete: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1CloudConfigsGenericPoolMachinesUIDGet returns the specified generic machine +*/ +func (a *Client) V1CloudConfigsGenericPoolMachinesUIDGet(params *V1CloudConfigsGenericPoolMachinesUIDGetParams) (*V1CloudConfigsGenericPoolMachinesUIDGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1CloudConfigsGenericPoolMachinesUIDGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1CloudConfigsGenericPoolMachinesUidGet", + Method: "GET", + PathPattern: "/v1/cloudconfigs/generic/{configUid}/machinePools/{machinePoolName}/machines/{machineUid}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1CloudConfigsGenericPoolMachinesUIDGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1CloudConfigsGenericPoolMachinesUIDGetOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1CloudConfigsGenericPoolMachinesUidGet: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1CloudConfigsGenericPoolMachinesUIDUpdate updates the specified machine to the cloud config s machine pool +*/ +func (a *Client) V1CloudConfigsGenericPoolMachinesUIDUpdate(params *V1CloudConfigsGenericPoolMachinesUIDUpdateParams) (*V1CloudConfigsGenericPoolMachinesUIDUpdateNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1CloudConfigsGenericPoolMachinesUIDUpdateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1CloudConfigsGenericPoolMachinesUidUpdate", + Method: "PUT", + PathPattern: "/v1/cloudconfigs/generic/{configUid}/machinePools/{machinePoolName}/machines/{machineUid}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1CloudConfigsGenericPoolMachinesUIDUpdateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1CloudConfigsGenericPoolMachinesUIDUpdateNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1CloudConfigsGenericPoolMachinesUidUpdate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1CloudConfigsGenericUIDClusterConfig updates the cluster configuration information +*/ +func (a *Client) V1CloudConfigsGenericUIDClusterConfig(params *V1CloudConfigsGenericUIDClusterConfigParams) (*V1CloudConfigsGenericUIDClusterConfigNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1CloudConfigsGenericUIDClusterConfigParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1CloudConfigsGenericUidClusterConfig", + Method: "PUT", + PathPattern: "/v1/cloudconfigs/generic/{configUid}/clusterConfig", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1CloudConfigsGenericUIDClusterConfigReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1CloudConfigsGenericUIDClusterConfigNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1CloudConfigsGenericUidClusterConfig: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1CloudConfigsGkeGet returns the specified g k e cloud config +*/ +func (a *Client) V1CloudConfigsGkeGet(params *V1CloudConfigsGkeGetParams) (*V1CloudConfigsGkeGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1CloudConfigsGkeGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1CloudConfigsGkeGet", + Method: "GET", + PathPattern: "/v1/cloudconfigs/gke/{configUid}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1CloudConfigsGkeGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1CloudConfigsGkeGetOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1CloudConfigsGkeGet: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1CloudConfigsGkeMachinePoolCreate creates an g k e cloud config s machine pool +*/ +func (a *Client) V1CloudConfigsGkeMachinePoolCreate(params *V1CloudConfigsGkeMachinePoolCreateParams) (*V1CloudConfigsGkeMachinePoolCreateCreated, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1CloudConfigsGkeMachinePoolCreateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1CloudConfigsGkeMachinePoolCreate", + Method: "POST", + PathPattern: "/v1/cloudconfigs/gke/{configUid}/machinePools", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1CloudConfigsGkeMachinePoolCreateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1CloudConfigsGkeMachinePoolCreateCreated) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1CloudConfigsGkeMachinePoolCreate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1CloudConfigsGkeMachinePoolDelete deletes the specified machine pool +*/ +func (a *Client) V1CloudConfigsGkeMachinePoolDelete(params *V1CloudConfigsGkeMachinePoolDeleteParams) (*V1CloudConfigsGkeMachinePoolDeleteNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1CloudConfigsGkeMachinePoolDeleteParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1CloudConfigsGkeMachinePoolDelete", + Method: "DELETE", + PathPattern: "/v1/cloudconfigs/gke/{configUid}/machinePools/{machinePoolName}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1CloudConfigsGkeMachinePoolDeleteReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1CloudConfigsGkeMachinePoolDeleteNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1CloudConfigsGkeMachinePoolDelete: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1CloudConfigsGkeMachinePoolUpdate updates the specified g k e cloud config s machine pool +*/ +func (a *Client) V1CloudConfigsGkeMachinePoolUpdate(params *V1CloudConfigsGkeMachinePoolUpdateParams) (*V1CloudConfigsGkeMachinePoolUpdateNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1CloudConfigsGkeMachinePoolUpdateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1CloudConfigsGkeMachinePoolUpdate", + Method: "PUT", + PathPattern: "/v1/cloudconfigs/gke/{configUid}/machinePools/{machinePoolName}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1CloudConfigsGkeMachinePoolUpdateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1CloudConfigsGkeMachinePoolUpdateNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1CloudConfigsGkeMachinePoolUpdate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1CloudConfigsGkePoolMachinesAdd adds the machine to cloud config s machine pool +*/ +func (a *Client) V1CloudConfigsGkePoolMachinesAdd(params *V1CloudConfigsGkePoolMachinesAddParams) (*V1CloudConfigsGkePoolMachinesAddCreated, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1CloudConfigsGkePoolMachinesAddParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1CloudConfigsGkePoolMachinesAdd", + Method: "POST", + PathPattern: "/v1/cloudconfigs/gke/{configUid}/machinePools/{machinePoolName}/machines", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1CloudConfigsGkePoolMachinesAddReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1CloudConfigsGkePoolMachinesAddCreated) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1CloudConfigsGkePoolMachinesAdd: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1CloudConfigsGkePoolMachinesList retrieves a list of g k e machines +*/ +func (a *Client) V1CloudConfigsGkePoolMachinesList(params *V1CloudConfigsGkePoolMachinesListParams) (*V1CloudConfigsGkePoolMachinesListOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1CloudConfigsGkePoolMachinesListParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1CloudConfigsGkePoolMachinesList", + Method: "GET", + PathPattern: "/v1/cloudconfigs/gke/{configUid}/machinePools/{machinePoolName}/machines", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1CloudConfigsGkePoolMachinesListReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1CloudConfigsGkePoolMachinesListOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1CloudConfigsGkePoolMachinesList: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1CloudConfigsGkePoolMachinesUIDDelete deletes the specified gcp machine +*/ +func (a *Client) V1CloudConfigsGkePoolMachinesUIDDelete(params *V1CloudConfigsGkePoolMachinesUIDDeleteParams) (*V1CloudConfigsGkePoolMachinesUIDDeleteNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1CloudConfigsGkePoolMachinesUIDDeleteParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1CloudConfigsGkePoolMachinesUidDelete", + Method: "DELETE", + PathPattern: "/v1/cloudconfigs/gke/{configUid}/machinePools/{machinePoolName}/machines/{machineUid}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1CloudConfigsGkePoolMachinesUIDDeleteReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1CloudConfigsGkePoolMachinesUIDDeleteNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1CloudConfigsGkePoolMachinesUidDelete: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1CloudConfigsGkePoolMachinesUIDGet returns the specified g k e machine +*/ +func (a *Client) V1CloudConfigsGkePoolMachinesUIDGet(params *V1CloudConfigsGkePoolMachinesUIDGetParams) (*V1CloudConfigsGkePoolMachinesUIDGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1CloudConfigsGkePoolMachinesUIDGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1CloudConfigsGkePoolMachinesUidGet", + Method: "GET", + PathPattern: "/v1/cloudconfigs/gke/{configUid}/machinePools/{machinePoolName}/machines/{machineUid}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1CloudConfigsGkePoolMachinesUIDGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1CloudConfigsGkePoolMachinesUIDGetOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1CloudConfigsGkePoolMachinesUidGet: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1CloudConfigsGkePoolMachinesUIDUpdate updates the specified machine to the cloud config s machine pool +*/ +func (a *Client) V1CloudConfigsGkePoolMachinesUIDUpdate(params *V1CloudConfigsGkePoolMachinesUIDUpdateParams) (*V1CloudConfigsGkePoolMachinesUIDUpdateNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1CloudConfigsGkePoolMachinesUIDUpdateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1CloudConfigsGkePoolMachinesUidUpdate", + Method: "PUT", + PathPattern: "/v1/cloudconfigs/gke/{configUid}/machinePools/{machinePoolName}/machines/{machineUid}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1CloudConfigsGkePoolMachinesUIDUpdateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1CloudConfigsGkePoolMachinesUIDUpdateNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1CloudConfigsGkePoolMachinesUidUpdate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1CloudConfigsGkeUIDClusterConfig updates the cluster configuration information +*/ +func (a *Client) V1CloudConfigsGkeUIDClusterConfig(params *V1CloudConfigsGkeUIDClusterConfigParams) (*V1CloudConfigsGkeUIDClusterConfigNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1CloudConfigsGkeUIDClusterConfigParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1CloudConfigsGkeUidClusterConfig", + Method: "PUT", + PathPattern: "/v1/cloudconfigs/gke/{configUid}/clusterConfig", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1CloudConfigsGkeUIDClusterConfigReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1CloudConfigsGkeUIDClusterConfigNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1CloudConfigsGkeUidClusterConfig: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1CloudConfigsMaasGet returns the specified maas cloud config +*/ +func (a *Client) V1CloudConfigsMaasGet(params *V1CloudConfigsMaasGetParams) (*V1CloudConfigsMaasGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1CloudConfigsMaasGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1CloudConfigsMaasGet", + Method: "GET", + PathPattern: "/v1/cloudconfigs/maas/{configUid}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1CloudConfigsMaasGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1CloudConfigsMaasGetOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1CloudConfigsMaasGet: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1CloudConfigsMaasMachinePoolCreate creates an maas cloud config s machine pool +*/ +func (a *Client) V1CloudConfigsMaasMachinePoolCreate(params *V1CloudConfigsMaasMachinePoolCreateParams) (*V1CloudConfigsMaasMachinePoolCreateCreated, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1CloudConfigsMaasMachinePoolCreateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1CloudConfigsMaasMachinePoolCreate", + Method: "POST", + PathPattern: "/v1/cloudconfigs/maas/{configUid}/machinePools", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1CloudConfigsMaasMachinePoolCreateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1CloudConfigsMaasMachinePoolCreateCreated) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1CloudConfigsMaasMachinePoolCreate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1CloudConfigsMaasMachinePoolDelete deletes the specified machine pool +*/ +func (a *Client) V1CloudConfigsMaasMachinePoolDelete(params *V1CloudConfigsMaasMachinePoolDeleteParams) (*V1CloudConfigsMaasMachinePoolDeleteNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1CloudConfigsMaasMachinePoolDeleteParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1CloudConfigsMaasMachinePoolDelete", + Method: "DELETE", + PathPattern: "/v1/cloudconfigs/maas/{configUid}/machinePools/{machinePoolName}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1CloudConfigsMaasMachinePoolDeleteReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1CloudConfigsMaasMachinePoolDeleteNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1CloudConfigsMaasMachinePoolDelete: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1CloudConfigsMaasMachinePoolUpdate updates the specified maas cloud config s machine pool +*/ +func (a *Client) V1CloudConfigsMaasMachinePoolUpdate(params *V1CloudConfigsMaasMachinePoolUpdateParams) (*V1CloudConfigsMaasMachinePoolUpdateNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1CloudConfigsMaasMachinePoolUpdateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1CloudConfigsMaasMachinePoolUpdate", + Method: "PUT", + PathPattern: "/v1/cloudconfigs/maas/{configUid}/machinePools/{machinePoolName}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1CloudConfigsMaasMachinePoolUpdateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1CloudConfigsMaasMachinePoolUpdateNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1CloudConfigsMaasMachinePoolUpdate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1CloudConfigsMaasPoolMachinesAdd adds the machine to cloud config s machine pool +*/ +func (a *Client) V1CloudConfigsMaasPoolMachinesAdd(params *V1CloudConfigsMaasPoolMachinesAddParams) (*V1CloudConfigsMaasPoolMachinesAddCreated, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1CloudConfigsMaasPoolMachinesAddParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1CloudConfigsMaasPoolMachinesAdd", + Method: "POST", + PathPattern: "/v1/cloudconfigs/maas/{configUid}/machinePools/{machinePoolName}/machines", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1CloudConfigsMaasPoolMachinesAddReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1CloudConfigsMaasPoolMachinesAddCreated) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1CloudConfigsMaasPoolMachinesAdd: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1CloudConfigsMaasPoolMachinesList retrieves a list of maas machines +*/ +func (a *Client) V1CloudConfigsMaasPoolMachinesList(params *V1CloudConfigsMaasPoolMachinesListParams) (*V1CloudConfigsMaasPoolMachinesListOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1CloudConfigsMaasPoolMachinesListParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1CloudConfigsMaasPoolMachinesList", + Method: "GET", + PathPattern: "/v1/cloudconfigs/maas/{configUid}/machinePools/{machinePoolName}/machines", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1CloudConfigsMaasPoolMachinesListReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1CloudConfigsMaasPoolMachinesListOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1CloudConfigsMaasPoolMachinesList: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1CloudConfigsMaasPoolMachinesUIDDelete deletes the specified maas machine +*/ +func (a *Client) V1CloudConfigsMaasPoolMachinesUIDDelete(params *V1CloudConfigsMaasPoolMachinesUIDDeleteParams) (*V1CloudConfigsMaasPoolMachinesUIDDeleteNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1CloudConfigsMaasPoolMachinesUIDDeleteParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1CloudConfigsMaasPoolMachinesUidDelete", + Method: "DELETE", + PathPattern: "/v1/cloudconfigs/maas/{configUid}/machinePools/{machinePoolName}/machines/{machineUid}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1CloudConfigsMaasPoolMachinesUIDDeleteReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1CloudConfigsMaasPoolMachinesUIDDeleteNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1CloudConfigsMaasPoolMachinesUidDelete: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1CloudConfigsMaasPoolMachinesUIDGet returns the specified maas machine +*/ +func (a *Client) V1CloudConfigsMaasPoolMachinesUIDGet(params *V1CloudConfigsMaasPoolMachinesUIDGetParams) (*V1CloudConfigsMaasPoolMachinesUIDGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1CloudConfigsMaasPoolMachinesUIDGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1CloudConfigsMaasPoolMachinesUidGet", + Method: "GET", + PathPattern: "/v1/cloudconfigs/maas/{configUid}/machinePools/{machinePoolName}/machines/{machineUid}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1CloudConfigsMaasPoolMachinesUIDGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1CloudConfigsMaasPoolMachinesUIDGetOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1CloudConfigsMaasPoolMachinesUidGet: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1CloudConfigsMaasPoolMachinesUIDUpdate updates the specified machine to the cloud config s machine pool +*/ +func (a *Client) V1CloudConfigsMaasPoolMachinesUIDUpdate(params *V1CloudConfigsMaasPoolMachinesUIDUpdateParams) (*V1CloudConfigsMaasPoolMachinesUIDUpdateNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1CloudConfigsMaasPoolMachinesUIDUpdateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1CloudConfigsMaasPoolMachinesUidUpdate", + Method: "PUT", + PathPattern: "/v1/cloudconfigs/maas/{configUid}/machinePools/{machinePoolName}/machines/{machineUid}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1CloudConfigsMaasPoolMachinesUIDUpdateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1CloudConfigsMaasPoolMachinesUIDUpdateNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1CloudConfigsMaasPoolMachinesUidUpdate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1CloudConfigsMaasUIDClusterConfig updates the cluster configuration information +*/ +func (a *Client) V1CloudConfigsMaasUIDClusterConfig(params *V1CloudConfigsMaasUIDClusterConfigParams) (*V1CloudConfigsMaasUIDClusterConfigNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1CloudConfigsMaasUIDClusterConfigParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1CloudConfigsMaasUidClusterConfig", + Method: "PUT", + PathPattern: "/v1/cloudconfigs/maas/{configUid}/clusterConfig", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1CloudConfigsMaasUIDClusterConfigReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1CloudConfigsMaasUIDClusterConfigNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1CloudConfigsMaasUidClusterConfig: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1CloudConfigsMachinePoolsMachineUIDMaintenanceStatusUpdate updates the specified machine maintenance +*/ +func (a *Client) V1CloudConfigsMachinePoolsMachineUIDMaintenanceStatusUpdate(params *V1CloudConfigsMachinePoolsMachineUIDMaintenanceStatusUpdateParams) (*V1CloudConfigsMachinePoolsMachineUIDMaintenanceStatusUpdateNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1CloudConfigsMachinePoolsMachineUIDMaintenanceStatusUpdateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1CloudConfigsMachinePoolsMachineUidMaintenanceStatusUpdate", + Method: "PUT", + PathPattern: "/v1/cloudconfigs/{cloudType}/{configUid}/machinePools/{machinePoolName}/machines/{machineUid}/maintenance/status", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1CloudConfigsMachinePoolsMachineUIDMaintenanceStatusUpdateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1CloudConfigsMachinePoolsMachineUIDMaintenanceStatusUpdateNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1CloudConfigsMachinePoolsMachineUidMaintenanceStatusUpdate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1CloudConfigsMachinePoolsMachineUIDMaintenanceUpdate updates the specified machine maintenance +*/ +func (a *Client) V1CloudConfigsMachinePoolsMachineUIDMaintenanceUpdate(params *V1CloudConfigsMachinePoolsMachineUIDMaintenanceUpdateParams) (*V1CloudConfigsMachinePoolsMachineUIDMaintenanceUpdateNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1CloudConfigsMachinePoolsMachineUIDMaintenanceUpdateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1CloudConfigsMachinePoolsMachineUidMaintenanceUpdate", + Method: "PUT", + PathPattern: "/v1/cloudconfigs/{cloudType}/{configUid}/machinePools/{machinePoolName}/machines/{machineUid}/maintenance", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1CloudConfigsMachinePoolsMachineUIDMaintenanceUpdateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1CloudConfigsMachinePoolsMachineUIDMaintenanceUpdateNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1CloudConfigsMachinePoolsMachineUidMaintenanceUpdate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1CloudConfigsMachinePoolsMachineUidsGet returns the specified cloud config s machine pools and machine uid +*/ +func (a *Client) V1CloudConfigsMachinePoolsMachineUidsGet(params *V1CloudConfigsMachinePoolsMachineUidsGetParams) (*V1CloudConfigsMachinePoolsMachineUidsGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1CloudConfigsMachinePoolsMachineUidsGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1CloudConfigsMachinePoolsMachineUidsGet", + Method: "GET", + PathPattern: "/v1/cloudconfigs/{configUid}/machinePools/machineUids", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1CloudConfigsMachinePoolsMachineUidsGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1CloudConfigsMachinePoolsMachineUidsGetOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1CloudConfigsMachinePoolsMachineUidsGet: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1CloudConfigsOpenStackGet returns the specified open stack cloud config +*/ +func (a *Client) V1CloudConfigsOpenStackGet(params *V1CloudConfigsOpenStackGetParams) (*V1CloudConfigsOpenStackGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1CloudConfigsOpenStackGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1CloudConfigsOpenStackGet", + Method: "GET", + PathPattern: "/v1/cloudconfigs/openstack/{configUid}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1CloudConfigsOpenStackGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1CloudConfigsOpenStackGetOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1CloudConfigsOpenStackGet: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1CloudConfigsOpenStackMachinePoolCreate creates a open stack cloud config s machine pool +*/ +func (a *Client) V1CloudConfigsOpenStackMachinePoolCreate(params *V1CloudConfigsOpenStackMachinePoolCreateParams) (*V1CloudConfigsOpenStackMachinePoolCreateCreated, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1CloudConfigsOpenStackMachinePoolCreateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1CloudConfigsOpenStackMachinePoolCreate", + Method: "POST", + PathPattern: "/v1/cloudconfigs/openstack/{configUid}/machinePools", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1CloudConfigsOpenStackMachinePoolCreateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1CloudConfigsOpenStackMachinePoolCreateCreated) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1CloudConfigsOpenStackMachinePoolCreate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1CloudConfigsOpenStackMachinePoolDelete deletes the specified machine pool +*/ +func (a *Client) V1CloudConfigsOpenStackMachinePoolDelete(params *V1CloudConfigsOpenStackMachinePoolDeleteParams) (*V1CloudConfigsOpenStackMachinePoolDeleteNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1CloudConfigsOpenStackMachinePoolDeleteParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1CloudConfigsOpenStackMachinePoolDelete", + Method: "DELETE", + PathPattern: "/v1/cloudconfigs/openstack/{configUid}/machinePools/{machinePoolName}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1CloudConfigsOpenStackMachinePoolDeleteReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1CloudConfigsOpenStackMachinePoolDeleteNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1CloudConfigsOpenStackMachinePoolDelete: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1CloudConfigsOpenStackMachinePoolUpdate updates the specified open stack cloud config s machine pool +*/ +func (a *Client) V1CloudConfigsOpenStackMachinePoolUpdate(params *V1CloudConfigsOpenStackMachinePoolUpdateParams) (*V1CloudConfigsOpenStackMachinePoolUpdateNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1CloudConfigsOpenStackMachinePoolUpdateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1CloudConfigsOpenStackMachinePoolUpdate", + Method: "PUT", + PathPattern: "/v1/cloudconfigs/openstack/{configUid}/machinePools/{machinePoolName}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1CloudConfigsOpenStackMachinePoolUpdateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1CloudConfigsOpenStackMachinePoolUpdateNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1CloudConfigsOpenStackMachinePoolUpdate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1CloudConfigsOpenStackPoolMachinesAdd adds the open stack machine to cloud config s machine pool +*/ +func (a *Client) V1CloudConfigsOpenStackPoolMachinesAdd(params *V1CloudConfigsOpenStackPoolMachinesAddParams) (*V1CloudConfigsOpenStackPoolMachinesAddCreated, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1CloudConfigsOpenStackPoolMachinesAddParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1CloudConfigsOpenStackPoolMachinesAdd", + Method: "POST", + PathPattern: "/v1/cloudconfigs/openstack/{configUid}/machinePools/{machinePoolName}/machines", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1CloudConfigsOpenStackPoolMachinesAddReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1CloudConfigsOpenStackPoolMachinesAddCreated) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1CloudConfigsOpenStackPoolMachinesAdd: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1CloudConfigsOpenStackPoolMachinesList retrieves a list of open stack machines +*/ +func (a *Client) V1CloudConfigsOpenStackPoolMachinesList(params *V1CloudConfigsOpenStackPoolMachinesListParams) (*V1CloudConfigsOpenStackPoolMachinesListOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1CloudConfigsOpenStackPoolMachinesListParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1CloudConfigsOpenStackPoolMachinesList", + Method: "GET", + PathPattern: "/v1/cloudconfigs/openstack/{configUid}/machinePools/{machinePoolName}/machines", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1CloudConfigsOpenStackPoolMachinesListReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1CloudConfigsOpenStackPoolMachinesListOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1CloudConfigsOpenStackPoolMachinesList: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1CloudConfigsOpenStackPoolMachinesUIDDelete deletes the specified open stack machine +*/ +func (a *Client) V1CloudConfigsOpenStackPoolMachinesUIDDelete(params *V1CloudConfigsOpenStackPoolMachinesUIDDeleteParams) (*V1CloudConfigsOpenStackPoolMachinesUIDDeleteNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1CloudConfigsOpenStackPoolMachinesUIDDeleteParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1CloudConfigsOpenStackPoolMachinesUidDelete", + Method: "DELETE", + PathPattern: "/v1/cloudconfigs/openstack/{configUid}/machinePools/{machinePoolName}/machines/{machineUid}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1CloudConfigsOpenStackPoolMachinesUIDDeleteReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1CloudConfigsOpenStackPoolMachinesUIDDeleteNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1CloudConfigsOpenStackPoolMachinesUidDelete: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1CloudConfigsOpenStackPoolMachinesUIDGet returns the specified open stack machine +*/ +func (a *Client) V1CloudConfigsOpenStackPoolMachinesUIDGet(params *V1CloudConfigsOpenStackPoolMachinesUIDGetParams) (*V1CloudConfigsOpenStackPoolMachinesUIDGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1CloudConfigsOpenStackPoolMachinesUIDGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1CloudConfigsOpenStackPoolMachinesUidGet", + Method: "GET", + PathPattern: "/v1/cloudconfigs/openstack/{configUid}/machinePools/{machinePoolName}/machines/{machineUid}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1CloudConfigsOpenStackPoolMachinesUIDGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1CloudConfigsOpenStackPoolMachinesUIDGetOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1CloudConfigsOpenStackPoolMachinesUidGet: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1CloudConfigsOpenStackPoolMachinesUIDUpdate updates the specified machine to cloud config s machine pool +*/ +func (a *Client) V1CloudConfigsOpenStackPoolMachinesUIDUpdate(params *V1CloudConfigsOpenStackPoolMachinesUIDUpdateParams) (*V1CloudConfigsOpenStackPoolMachinesUIDUpdateNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1CloudConfigsOpenStackPoolMachinesUIDUpdateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1CloudConfigsOpenStackPoolMachinesUidUpdate", + Method: "PUT", + PathPattern: "/v1/cloudconfigs/openstack/{configUid}/machinePools/{machinePoolName}/machines/{machineUid}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1CloudConfigsOpenStackPoolMachinesUIDUpdateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1CloudConfigsOpenStackPoolMachinesUIDUpdateNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1CloudConfigsOpenStackPoolMachinesUidUpdate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1CloudConfigsOpenStackUIDClusterConfig updates the cluster configuration information +*/ +func (a *Client) V1CloudConfigsOpenStackUIDClusterConfig(params *V1CloudConfigsOpenStackUIDClusterConfigParams) (*V1CloudConfigsOpenStackUIDClusterConfigNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1CloudConfigsOpenStackUIDClusterConfigParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1CloudConfigsOpenStackUidClusterConfig", + Method: "PUT", + PathPattern: "/v1/cloudconfigs/openstack/{configUid}/clusterConfig", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1CloudConfigsOpenStackUIDClusterConfigReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1CloudConfigsOpenStackUIDClusterConfigNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1CloudConfigsOpenStackUidClusterConfig: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1CloudConfigsTkeGet returns the specified t k e cloud config +*/ +func (a *Client) V1CloudConfigsTkeGet(params *V1CloudConfigsTkeGetParams) (*V1CloudConfigsTkeGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1CloudConfigsTkeGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1CloudConfigsTkeGet", + Method: "GET", + PathPattern: "/v1/cloudconfigs/tke/{configUid}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1CloudConfigsTkeGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1CloudConfigsTkeGetOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1CloudConfigsTkeGet: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1CloudConfigsTkeMachinePoolCreate creates an t k e cloud config s machine pool +*/ +func (a *Client) V1CloudConfigsTkeMachinePoolCreate(params *V1CloudConfigsTkeMachinePoolCreateParams) (*V1CloudConfigsTkeMachinePoolCreateCreated, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1CloudConfigsTkeMachinePoolCreateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1CloudConfigsTkeMachinePoolCreate", + Method: "POST", + PathPattern: "/v1/cloudconfigs/tke/{configUid}/machinePools", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1CloudConfigsTkeMachinePoolCreateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1CloudConfigsTkeMachinePoolCreateCreated) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1CloudConfigsTkeMachinePoolCreate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1CloudConfigsTkeMachinePoolDelete deletes the specified machine pool +*/ +func (a *Client) V1CloudConfigsTkeMachinePoolDelete(params *V1CloudConfigsTkeMachinePoolDeleteParams) (*V1CloudConfigsTkeMachinePoolDeleteNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1CloudConfigsTkeMachinePoolDeleteParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1CloudConfigsTkeMachinePoolDelete", + Method: "DELETE", + PathPattern: "/v1/cloudconfigs/tke/{configUid}/machinePools/{machinePoolName}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1CloudConfigsTkeMachinePoolDeleteReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1CloudConfigsTkeMachinePoolDeleteNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1CloudConfigsTkeMachinePoolDelete: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1CloudConfigsTkeMachinePoolUpdate updates the specified t k e cloud config s machine pool +*/ +func (a *Client) V1CloudConfigsTkeMachinePoolUpdate(params *V1CloudConfigsTkeMachinePoolUpdateParams) (*V1CloudConfigsTkeMachinePoolUpdateNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1CloudConfigsTkeMachinePoolUpdateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1CloudConfigsTkeMachinePoolUpdate", + Method: "PUT", + PathPattern: "/v1/cloudconfigs/tke/{configUid}/machinePools/{machinePoolName}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1CloudConfigsTkeMachinePoolUpdateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1CloudConfigsTkeMachinePoolUpdateNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1CloudConfigsTkeMachinePoolUpdate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1CloudConfigsTkePoolMachinesAdd adds the machine to cloud config s machine pool +*/ +func (a *Client) V1CloudConfigsTkePoolMachinesAdd(params *V1CloudConfigsTkePoolMachinesAddParams) (*V1CloudConfigsTkePoolMachinesAddCreated, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1CloudConfigsTkePoolMachinesAddParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1CloudConfigsTkePoolMachinesAdd", + Method: "POST", + PathPattern: "/v1/cloudconfigs/tke/{configUid}/machinePools/{machinePoolName}/machines", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1CloudConfigsTkePoolMachinesAddReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1CloudConfigsTkePoolMachinesAddCreated) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1CloudConfigsTkePoolMachinesAdd: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1CloudConfigsTkePoolMachinesList retrieves a list of t k e machines +*/ +func (a *Client) V1CloudConfigsTkePoolMachinesList(params *V1CloudConfigsTkePoolMachinesListParams) (*V1CloudConfigsTkePoolMachinesListOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1CloudConfigsTkePoolMachinesListParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1CloudConfigsTkePoolMachinesList", + Method: "GET", + PathPattern: "/v1/cloudconfigs/tke/{configUid}/machinePools/{machinePoolName}/machines", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1CloudConfigsTkePoolMachinesListReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1CloudConfigsTkePoolMachinesListOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1CloudConfigsTkePoolMachinesList: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1CloudConfigsTkePoolMachinesUIDDelete deletes the specified tencent machine +*/ +func (a *Client) V1CloudConfigsTkePoolMachinesUIDDelete(params *V1CloudConfigsTkePoolMachinesUIDDeleteParams) (*V1CloudConfigsTkePoolMachinesUIDDeleteNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1CloudConfigsTkePoolMachinesUIDDeleteParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1CloudConfigsTkePoolMachinesUidDelete", + Method: "DELETE", + PathPattern: "/v1/cloudconfigs/tke/{configUid}/machinePools/{machinePoolName}/machines/{machineUid}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1CloudConfigsTkePoolMachinesUIDDeleteReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1CloudConfigsTkePoolMachinesUIDDeleteNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1CloudConfigsTkePoolMachinesUidDelete: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1CloudConfigsTkePoolMachinesUIDGet returns the specified tke machine +*/ +func (a *Client) V1CloudConfigsTkePoolMachinesUIDGet(params *V1CloudConfigsTkePoolMachinesUIDGetParams) (*V1CloudConfigsTkePoolMachinesUIDGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1CloudConfigsTkePoolMachinesUIDGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1CloudConfigsTkePoolMachinesUidGet", + Method: "GET", + PathPattern: "/v1/cloudconfigs/tke/{configUid}/machinePools/{machinePoolName}/machines/{machineUid}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1CloudConfigsTkePoolMachinesUIDGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1CloudConfigsTkePoolMachinesUIDGetOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1CloudConfigsTkePoolMachinesUidGet: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1CloudConfigsTkePoolMachinesUIDUpdate updates the specified machine to the cloud config s machine pool +*/ +func (a *Client) V1CloudConfigsTkePoolMachinesUIDUpdate(params *V1CloudConfigsTkePoolMachinesUIDUpdateParams) (*V1CloudConfigsTkePoolMachinesUIDUpdateNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1CloudConfigsTkePoolMachinesUIDUpdateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1CloudConfigsTkePoolMachinesUidUpdate", + Method: "PUT", + PathPattern: "/v1/cloudconfigs/tke/{configUid}/machinePools/{machinePoolName}/machines/{machineUid}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1CloudConfigsTkePoolMachinesUIDUpdateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1CloudConfigsTkePoolMachinesUIDUpdateNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1CloudConfigsTkePoolMachinesUidUpdate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1CloudConfigsTkeUIDClusterConfig updates the cluster configuration information +*/ +func (a *Client) V1CloudConfigsTkeUIDClusterConfig(params *V1CloudConfigsTkeUIDClusterConfigParams) (*V1CloudConfigsTkeUIDClusterConfigNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1CloudConfigsTkeUIDClusterConfigParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1CloudConfigsTkeUidClusterConfig", + Method: "PUT", + PathPattern: "/v1/cloudconfigs/tke/{configUid}/clusterConfig", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1CloudConfigsTkeUIDClusterConfigReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1CloudConfigsTkeUIDClusterConfigNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1CloudConfigsTkeUidClusterConfig: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1CloudConfigsVirtualGet returns the specified virtual cloud config +*/ +func (a *Client) V1CloudConfigsVirtualGet(params *V1CloudConfigsVirtualGetParams) (*V1CloudConfigsVirtualGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1CloudConfigsVirtualGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1CloudConfigsVirtualGet", + Method: "GET", + PathPattern: "/v1/cloudconfigs/virtual/{configUid}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1CloudConfigsVirtualGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1CloudConfigsVirtualGetOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1CloudConfigsVirtualGet: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1CloudConfigsVirtualMachinePoolCreate creates a virtual cloud config s machine pool +*/ +func (a *Client) V1CloudConfigsVirtualMachinePoolCreate(params *V1CloudConfigsVirtualMachinePoolCreateParams) (*V1CloudConfigsVirtualMachinePoolCreateCreated, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1CloudConfigsVirtualMachinePoolCreateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1CloudConfigsVirtualMachinePoolCreate", + Method: "POST", + PathPattern: "/v1/cloudconfigs/virtual/{configUid}/machinePools", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1CloudConfigsVirtualMachinePoolCreateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1CloudConfigsVirtualMachinePoolCreateCreated) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1CloudConfigsVirtualMachinePoolCreate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1CloudConfigsVirtualMachinePoolDelete deletes the specified machine pool +*/ +func (a *Client) V1CloudConfigsVirtualMachinePoolDelete(params *V1CloudConfigsVirtualMachinePoolDeleteParams) (*V1CloudConfigsVirtualMachinePoolDeleteNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1CloudConfigsVirtualMachinePoolDeleteParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1CloudConfigsVirtualMachinePoolDelete", + Method: "DELETE", + PathPattern: "/v1/cloudconfigs/virtual/{configUid}/machinePools/{machinePoolName}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1CloudConfigsVirtualMachinePoolDeleteReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1CloudConfigsVirtualMachinePoolDeleteNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1CloudConfigsVirtualMachinePoolDelete: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1CloudConfigsVirtualMachinePoolUpdate updates the specified virtual cloud config s machine pool +*/ +func (a *Client) V1CloudConfigsVirtualMachinePoolUpdate(params *V1CloudConfigsVirtualMachinePoolUpdateParams) (*V1CloudConfigsVirtualMachinePoolUpdateNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1CloudConfigsVirtualMachinePoolUpdateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1CloudConfigsVirtualMachinePoolUpdate", + Method: "PUT", + PathPattern: "/v1/cloudconfigs/virtual/{configUid}/machinePools/{machinePoolName}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1CloudConfigsVirtualMachinePoolUpdateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1CloudConfigsVirtualMachinePoolUpdateNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1CloudConfigsVirtualMachinePoolUpdate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1CloudConfigsVirtualPoolMachinesAdd adds the machine to cloud config s machine pool +*/ +func (a *Client) V1CloudConfigsVirtualPoolMachinesAdd(params *V1CloudConfigsVirtualPoolMachinesAddParams) (*V1CloudConfigsVirtualPoolMachinesAddCreated, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1CloudConfigsVirtualPoolMachinesAddParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1CloudConfigsVirtualPoolMachinesAdd", + Method: "POST", + PathPattern: "/v1/cloudconfigs/virtual/{configUid}/machinePools/{machinePoolName}/machines", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1CloudConfigsVirtualPoolMachinesAddReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1CloudConfigsVirtualPoolMachinesAddCreated) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1CloudConfigsVirtualPoolMachinesAdd: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1CloudConfigsVirtualPoolMachinesList retrieves a list of virtual machines +*/ +func (a *Client) V1CloudConfigsVirtualPoolMachinesList(params *V1CloudConfigsVirtualPoolMachinesListParams) (*V1CloudConfigsVirtualPoolMachinesListOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1CloudConfigsVirtualPoolMachinesListParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1CloudConfigsVirtualPoolMachinesList", + Method: "GET", + PathPattern: "/v1/cloudconfigs/virtual/{configUid}/machinePools/{machinePoolName}/machines", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1CloudConfigsVirtualPoolMachinesListReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1CloudConfigsVirtualPoolMachinesListOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1CloudConfigsVirtualPoolMachinesList: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1CloudConfigsVirtualPoolMachinesUIDDelete deletes the specified virtual machine +*/ +func (a *Client) V1CloudConfigsVirtualPoolMachinesUIDDelete(params *V1CloudConfigsVirtualPoolMachinesUIDDeleteParams) (*V1CloudConfigsVirtualPoolMachinesUIDDeleteNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1CloudConfigsVirtualPoolMachinesUIDDeleteParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1CloudConfigsVirtualPoolMachinesUidDelete", + Method: "DELETE", + PathPattern: "/v1/cloudconfigs/virtual/{configUid}/machinePools/{machinePoolName}/machines/{machineUid}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1CloudConfigsVirtualPoolMachinesUIDDeleteReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1CloudConfigsVirtualPoolMachinesUIDDeleteNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1CloudConfigsVirtualPoolMachinesUidDelete: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1CloudConfigsVirtualPoolMachinesUIDGet returns the specified virtual machine +*/ +func (a *Client) V1CloudConfigsVirtualPoolMachinesUIDGet(params *V1CloudConfigsVirtualPoolMachinesUIDGetParams) (*V1CloudConfigsVirtualPoolMachinesUIDGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1CloudConfigsVirtualPoolMachinesUIDGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1CloudConfigsVirtualPoolMachinesUidGet", + Method: "GET", + PathPattern: "/v1/cloudconfigs/virtual/{configUid}/machinePools/{machinePoolName}/machines/{machineUid}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1CloudConfigsVirtualPoolMachinesUIDGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1CloudConfigsVirtualPoolMachinesUIDGetOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1CloudConfigsVirtualPoolMachinesUidGet: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1CloudConfigsVirtualPoolMachinesUIDUpdate updates the specified machine to the cloud config s machine pool +*/ +func (a *Client) V1CloudConfigsVirtualPoolMachinesUIDUpdate(params *V1CloudConfigsVirtualPoolMachinesUIDUpdateParams) (*V1CloudConfigsVirtualPoolMachinesUIDUpdateNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1CloudConfigsVirtualPoolMachinesUIDUpdateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1CloudConfigsVirtualPoolMachinesUidUpdate", + Method: "PUT", + PathPattern: "/v1/cloudconfigs/virtual/{configUid}/machinePools/{machinePoolName}/machines/{machineUid}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1CloudConfigsVirtualPoolMachinesUIDUpdateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1CloudConfigsVirtualPoolMachinesUIDUpdateNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1CloudConfigsVirtualPoolMachinesUidUpdate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1CloudConfigsVirtualUIDClusterConfig updates the cluster configuration information +*/ +func (a *Client) V1CloudConfigsVirtualUIDClusterConfig(params *V1CloudConfigsVirtualUIDClusterConfigParams) (*V1CloudConfigsVirtualUIDClusterConfigNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1CloudConfigsVirtualUIDClusterConfigParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1CloudConfigsVirtualUidClusterConfig", + Method: "PUT", + PathPattern: "/v1/cloudconfigs/virtual/{configUid}/clusterConfig", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1CloudConfigsVirtualUIDClusterConfigReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1CloudConfigsVirtualUIDClusterConfigNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1CloudConfigsVirtualUidClusterConfig: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1CloudConfigsVirtualUIDUpdate updates and resizes the virtual cluster +*/ +func (a *Client) V1CloudConfigsVirtualUIDUpdate(params *V1CloudConfigsVirtualUIDUpdateParams) (*V1CloudConfigsVirtualUIDUpdateNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1CloudConfigsVirtualUIDUpdateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1CloudConfigsVirtualUidUpdate", + Method: "PUT", + PathPattern: "/v1/cloudconfigs/virtual/{configUid}/resize", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1CloudConfigsVirtualUIDUpdateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1CloudConfigsVirtualUIDUpdateNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1CloudConfigsVirtualUidUpdate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1CloudConfigsVsphereGet returns the specified v sphere cloud config +*/ +func (a *Client) V1CloudConfigsVsphereGet(params *V1CloudConfigsVsphereGetParams) (*V1CloudConfigsVsphereGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1CloudConfigsVsphereGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1CloudConfigsVsphereGet", + Method: "GET", + PathPattern: "/v1/cloudconfigs/vsphere/{configUid}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1CloudConfigsVsphereGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1CloudConfigsVsphereGetOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1CloudConfigsVsphereGet: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1CloudConfigsVsphereMachinePoolCreate creates a v sphere cloud config s machine pool +*/ +func (a *Client) V1CloudConfigsVsphereMachinePoolCreate(params *V1CloudConfigsVsphereMachinePoolCreateParams) (*V1CloudConfigsVsphereMachinePoolCreateCreated, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1CloudConfigsVsphereMachinePoolCreateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1CloudConfigsVsphereMachinePoolCreate", + Method: "POST", + PathPattern: "/v1/cloudconfigs/vsphere/{configUid}/machinePools", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1CloudConfigsVsphereMachinePoolCreateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1CloudConfigsVsphereMachinePoolCreateCreated) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1CloudConfigsVsphereMachinePoolCreate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1CloudConfigsVsphereMachinePoolDelete deletes the specified machine pool +*/ +func (a *Client) V1CloudConfigsVsphereMachinePoolDelete(params *V1CloudConfigsVsphereMachinePoolDeleteParams) (*V1CloudConfigsVsphereMachinePoolDeleteNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1CloudConfigsVsphereMachinePoolDeleteParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1CloudConfigsVsphereMachinePoolDelete", + Method: "DELETE", + PathPattern: "/v1/cloudconfigs/vsphere/{configUid}/machinePools/{machinePoolName}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1CloudConfigsVsphereMachinePoolDeleteReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1CloudConfigsVsphereMachinePoolDeleteNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1CloudConfigsVsphereMachinePoolDelete: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1CloudConfigsVsphereMachinePoolUpdate updates the specified v sphere cloud config s machine pool +*/ +func (a *Client) V1CloudConfigsVsphereMachinePoolUpdate(params *V1CloudConfigsVsphereMachinePoolUpdateParams) (*V1CloudConfigsVsphereMachinePoolUpdateNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1CloudConfigsVsphereMachinePoolUpdateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1CloudConfigsVsphereMachinePoolUpdate", + Method: "PUT", + PathPattern: "/v1/cloudconfigs/vsphere/{configUid}/machinePools/{machinePoolName}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1CloudConfigsVsphereMachinePoolUpdateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1CloudConfigsVsphereMachinePoolUpdateNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1CloudConfigsVsphereMachinePoolUpdate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1CloudConfigsVspherePoolMachinesAdd adds the v sphere machine to cloud config s machine pool +*/ +func (a *Client) V1CloudConfigsVspherePoolMachinesAdd(params *V1CloudConfigsVspherePoolMachinesAddParams) (*V1CloudConfigsVspherePoolMachinesAddCreated, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1CloudConfigsVspherePoolMachinesAddParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1CloudConfigsVspherePoolMachinesAdd", + Method: "POST", + PathPattern: "/v1/cloudconfigs/vsphere/{configUid}/machinePools/{machinePoolName}/machines", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1CloudConfigsVspherePoolMachinesAddReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1CloudConfigsVspherePoolMachinesAddCreated) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1CloudConfigsVspherePoolMachinesAdd: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1CloudConfigsVspherePoolMachinesList retrieves a list of v sphere machines +*/ +func (a *Client) V1CloudConfigsVspherePoolMachinesList(params *V1CloudConfigsVspherePoolMachinesListParams) (*V1CloudConfigsVspherePoolMachinesListOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1CloudConfigsVspherePoolMachinesListParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1CloudConfigsVspherePoolMachinesList", + Method: "GET", + PathPattern: "/v1/cloudconfigs/vsphere/{configUid}/machinePools/{machinePoolName}/machines", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1CloudConfigsVspherePoolMachinesListReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1CloudConfigsVspherePoolMachinesListOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1CloudConfigsVspherePoolMachinesList: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1CloudConfigsVspherePoolMachinesUIDDelete deletes the specified v sphere machine +*/ +func (a *Client) V1CloudConfigsVspherePoolMachinesUIDDelete(params *V1CloudConfigsVspherePoolMachinesUIDDeleteParams) (*V1CloudConfigsVspherePoolMachinesUIDDeleteNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1CloudConfigsVspherePoolMachinesUIDDeleteParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1CloudConfigsVspherePoolMachinesUidDelete", + Method: "DELETE", + PathPattern: "/v1/cloudconfigs/vsphere/{configUid}/machinePools/{machinePoolName}/machines/{machineUid}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1CloudConfigsVspherePoolMachinesUIDDeleteReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1CloudConfigsVspherePoolMachinesUIDDeleteNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1CloudConfigsVspherePoolMachinesUidDelete: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1CloudConfigsVspherePoolMachinesUIDGet returns the specified v sphere machine +*/ +func (a *Client) V1CloudConfigsVspherePoolMachinesUIDGet(params *V1CloudConfigsVspherePoolMachinesUIDGetParams) (*V1CloudConfigsVspherePoolMachinesUIDGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1CloudConfigsVspherePoolMachinesUIDGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1CloudConfigsVspherePoolMachinesUidGet", + Method: "GET", + PathPattern: "/v1/cloudconfigs/vsphere/{configUid}/machinePools/{machinePoolName}/machines/{machineUid}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1CloudConfigsVspherePoolMachinesUIDGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1CloudConfigsVspherePoolMachinesUIDGetOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1CloudConfigsVspherePoolMachinesUidGet: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1CloudConfigsVspherePoolMachinesUIDUpdate updates the specified machine to cloud config s machine pool +*/ +func (a *Client) V1CloudConfigsVspherePoolMachinesUIDUpdate(params *V1CloudConfigsVspherePoolMachinesUIDUpdateParams) (*V1CloudConfigsVspherePoolMachinesUIDUpdateNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1CloudConfigsVspherePoolMachinesUIDUpdateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1CloudConfigsVspherePoolMachinesUidUpdate", + Method: "PUT", + PathPattern: "/v1/cloudconfigs/vsphere/{configUid}/machinePools/{machinePoolName}/machines/{machineUid}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1CloudConfigsVspherePoolMachinesUIDUpdateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1CloudConfigsVspherePoolMachinesUIDUpdateNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1CloudConfigsVspherePoolMachinesUidUpdate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1CloudConfigsVsphereUIDClusterConfig updates the cluster configuration information +*/ +func (a *Client) V1CloudConfigsVsphereUIDClusterConfig(params *V1CloudConfigsVsphereUIDClusterConfigParams) (*V1CloudConfigsVsphereUIDClusterConfigNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1CloudConfigsVsphereUIDClusterConfigParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1CloudConfigsVsphereUidClusterConfig", + Method: "PUT", + PathPattern: "/v1/cloudconfigs/vsphere/{configUid}/clusterConfig", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1CloudConfigsVsphereUIDClusterConfigReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1CloudConfigsVsphereUIDClusterConfigNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1CloudConfigsVsphereUidClusterConfig: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1ClusterFeatureBackupCreate creates cluster backup settings +*/ +func (a *Client) V1ClusterFeatureBackupCreate(params *V1ClusterFeatureBackupCreateParams) (*V1ClusterFeatureBackupCreateCreated, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1ClusterFeatureBackupCreateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1ClusterFeatureBackupCreate", + Method: "POST", + PathPattern: "/v1/spectroclusters/{uid}/features/backup", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1ClusterFeatureBackupCreateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1ClusterFeatureBackupCreateCreated) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1ClusterFeatureBackupCreate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1ClusterFeatureBackupDelete deletes cluster backup +*/ +func (a *Client) V1ClusterFeatureBackupDelete(params *V1ClusterFeatureBackupDeleteParams) (*V1ClusterFeatureBackupDeleteNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1ClusterFeatureBackupDeleteParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1ClusterFeatureBackupDelete", + Method: "DELETE", + PathPattern: "/v1/spectroclusters/{uid}/features/backup/{backupName}/request/{requestUid}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1ClusterFeatureBackupDeleteReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1ClusterFeatureBackupDeleteNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1ClusterFeatureBackupDelete: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1ClusterFeatureBackupGet returns the cluster backup result +*/ +func (a *Client) V1ClusterFeatureBackupGet(params *V1ClusterFeatureBackupGetParams) (*V1ClusterFeatureBackupGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1ClusterFeatureBackupGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1ClusterFeatureBackupGet", + Method: "GET", + PathPattern: "/v1/spectroclusters/{uid}/features/backup", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1ClusterFeatureBackupGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1ClusterFeatureBackupGetOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1ClusterFeatureBackupGet: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1ClusterFeatureBackupOnDemandCreate creates on demand cluster backup +*/ +func (a *Client) V1ClusterFeatureBackupOnDemandCreate(params *V1ClusterFeatureBackupOnDemandCreateParams) (*V1ClusterFeatureBackupOnDemandCreateCreated, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1ClusterFeatureBackupOnDemandCreateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1ClusterFeatureBackupOnDemandCreate", + Method: "POST", + PathPattern: "/v1/spectroclusters/{uid}/features/backup/onDemand", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1ClusterFeatureBackupOnDemandCreateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1ClusterFeatureBackupOnDemandCreateCreated) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1ClusterFeatureBackupOnDemandCreate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1ClusterFeatureBackupScheduleReset resets cluster backup schedule settings +*/ +func (a *Client) V1ClusterFeatureBackupScheduleReset(params *V1ClusterFeatureBackupScheduleResetParams) (*V1ClusterFeatureBackupScheduleResetNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1ClusterFeatureBackupScheduleResetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1ClusterFeatureBackupScheduleReset", + Method: "DELETE", + PathPattern: "/v1/spectroclusters/{uid}/features/backup", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1ClusterFeatureBackupScheduleResetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1ClusterFeatureBackupScheduleResetNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1ClusterFeatureBackupScheduleReset: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1ClusterFeatureBackupUpdate updates cluster backup settings +*/ +func (a *Client) V1ClusterFeatureBackupUpdate(params *V1ClusterFeatureBackupUpdateParams) (*V1ClusterFeatureBackupUpdateNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1ClusterFeatureBackupUpdateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1ClusterFeatureBackupUpdate", + Method: "PUT", + PathPattern: "/v1/spectroclusters/{uid}/features/backup", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1ClusterFeatureBackupUpdateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1ClusterFeatureBackupUpdateNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1ClusterFeatureBackupUpdate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1ClusterFeatureComplianceScanCreate creates cluster compliance scan +*/ +func (a *Client) V1ClusterFeatureComplianceScanCreate(params *V1ClusterFeatureComplianceScanCreateParams) (*V1ClusterFeatureComplianceScanCreateCreated, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1ClusterFeatureComplianceScanCreateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1ClusterFeatureComplianceScanCreate", + Method: "POST", + PathPattern: "/v1/spectroclusters/{uid}/features/complianceScan", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1ClusterFeatureComplianceScanCreateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1ClusterFeatureComplianceScanCreateCreated) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1ClusterFeatureComplianceScanCreate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1ClusterFeatureComplianceScanGet returns the compliance scan of cluster if driver type is provided then specific status of driver type will be returned +*/ +func (a *Client) V1ClusterFeatureComplianceScanGet(params *V1ClusterFeatureComplianceScanGetParams) (*V1ClusterFeatureComplianceScanGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1ClusterFeatureComplianceScanGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1ClusterFeatureComplianceScanGet", + Method: "GET", + PathPattern: "/v1/spectroclusters/{uid}/features/complianceScan", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1ClusterFeatureComplianceScanGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1ClusterFeatureComplianceScanGetOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1ClusterFeatureComplianceScanGet: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1ClusterFeatureComplianceScanLogDelete deletes the compliance scan log by uid +*/ +func (a *Client) V1ClusterFeatureComplianceScanLogDelete(params *V1ClusterFeatureComplianceScanLogDeleteParams) (*V1ClusterFeatureComplianceScanLogDeleteNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1ClusterFeatureComplianceScanLogDeleteParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1ClusterFeatureComplianceScanLogDelete", + Method: "DELETE", + PathPattern: "/v1/spectroclusters/{uid}/features/complianceScan/logs/{logUid}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1ClusterFeatureComplianceScanLogDeleteReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1ClusterFeatureComplianceScanLogDeleteNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1ClusterFeatureComplianceScanLogDelete: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1ClusterFeatureComplianceScanLogsGet returns the compliance scan log by cluster uid and driver type +*/ +func (a *Client) V1ClusterFeatureComplianceScanLogsGet(params *V1ClusterFeatureComplianceScanLogsGetParams) (*V1ClusterFeatureComplianceScanLogsGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1ClusterFeatureComplianceScanLogsGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1ClusterFeatureComplianceScanLogsGet", + Method: "GET", + PathPattern: "/v1/spectroclusters/{uid}/features/complianceScan/logs/drivers", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1ClusterFeatureComplianceScanLogsGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1ClusterFeatureComplianceScanLogsGetOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1ClusterFeatureComplianceScanLogsGet: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1ClusterFeatureComplianceScanOnDemandCreate creates on demand cluster compliance scan +*/ +func (a *Client) V1ClusterFeatureComplianceScanOnDemandCreate(params *V1ClusterFeatureComplianceScanOnDemandCreateParams) (*V1ClusterFeatureComplianceScanOnDemandCreateCreated, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1ClusterFeatureComplianceScanOnDemandCreateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1ClusterFeatureComplianceScanOnDemandCreate", + Method: "POST", + PathPattern: "/v1/spectroclusters/{uid}/features/complianceScan/onDemand", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1ClusterFeatureComplianceScanOnDemandCreateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1ClusterFeatureComplianceScanOnDemandCreateCreated) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1ClusterFeatureComplianceScanOnDemandCreate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1ClusterFeatureComplianceScanUpdate updates cluster compliance scan settings +*/ +func (a *Client) V1ClusterFeatureComplianceScanUpdate(params *V1ClusterFeatureComplianceScanUpdateParams) (*V1ClusterFeatureComplianceScanUpdateNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1ClusterFeatureComplianceScanUpdateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1ClusterFeatureComplianceScanUpdate", + Method: "PUT", + PathPattern: "/v1/spectroclusters/{uid}/features/complianceScan", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1ClusterFeatureComplianceScanUpdateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1ClusterFeatureComplianceScanUpdateNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1ClusterFeatureComplianceScanUpdate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1ClusterFeatureDriverLogDownload downloads the driver cluster logs +*/ +func (a *Client) V1ClusterFeatureDriverLogDownload(params *V1ClusterFeatureDriverLogDownloadParams, writer io.Writer) (*V1ClusterFeatureDriverLogDownloadOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1ClusterFeatureDriverLogDownloadParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1ClusterFeatureDriverLogDownload", + Method: "GET", + PathPattern: "/v1/spectroclusters/{uid}/features/complianceScan/logs/{logUid}/drivers/{driver}/download", + ProducesMediaTypes: []string{"application/octet-stream"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1ClusterFeatureDriverLogDownloadReader{formats: a.formats, writer: writer}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1ClusterFeatureDriverLogDownloadOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1ClusterFeatureDriverLogDownload: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1ClusterFeatureHelmChartsGet gets the installed helm charts of a specified cluster +*/ +func (a *Client) V1ClusterFeatureHelmChartsGet(params *V1ClusterFeatureHelmChartsGetParams) (*V1ClusterFeatureHelmChartsGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1ClusterFeatureHelmChartsGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1ClusterFeatureHelmChartsGet", + Method: "GET", + PathPattern: "/v1/spectroclusters/{uid}/features/helmCharts", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1ClusterFeatureHelmChartsGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1ClusterFeatureHelmChartsGetOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1ClusterFeatureHelmChartsGet: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1ClusterFeatureKubeBenchLogGet returns the kube bench compliance scan log by uid +*/ +func (a *Client) V1ClusterFeatureKubeBenchLogGet(params *V1ClusterFeatureKubeBenchLogGetParams) (*V1ClusterFeatureKubeBenchLogGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1ClusterFeatureKubeBenchLogGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1ClusterFeatureKubeBenchLogGet", + Method: "GET", + PathPattern: "/v1/spectroclusters/{uid}/features/complianceScan/logs/{logUid}/drivers/kubeBench", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1ClusterFeatureKubeBenchLogGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1ClusterFeatureKubeBenchLogGetOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1ClusterFeatureKubeBenchLogGet: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1ClusterFeatureKubeHunterLogGet returns the kube hunter compliance scan log by uid +*/ +func (a *Client) V1ClusterFeatureKubeHunterLogGet(params *V1ClusterFeatureKubeHunterLogGetParams) (*V1ClusterFeatureKubeHunterLogGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1ClusterFeatureKubeHunterLogGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1ClusterFeatureKubeHunterLogGet", + Method: "GET", + PathPattern: "/v1/spectroclusters/{uid}/features/complianceScan/logs/{logUid}/drivers/kubeHunter", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1ClusterFeatureKubeHunterLogGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1ClusterFeatureKubeHunterLogGetOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1ClusterFeatureKubeHunterLogGet: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1ClusterFeatureLogFetcherCreate creates the log fetcher for cluster +*/ +func (a *Client) V1ClusterFeatureLogFetcherCreate(params *V1ClusterFeatureLogFetcherCreateParams) (*V1ClusterFeatureLogFetcherCreateCreated, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1ClusterFeatureLogFetcherCreateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1ClusterFeatureLogFetcherCreate", + Method: "POST", + PathPattern: "/v1/spectroclusters/{uid}/features/logFetcher", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1ClusterFeatureLogFetcherCreateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1ClusterFeatureLogFetcherCreateCreated) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1ClusterFeatureLogFetcherCreate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1ClusterFeatureLogFetcherGet gets the log fetcher for cluster +*/ +func (a *Client) V1ClusterFeatureLogFetcherGet(params *V1ClusterFeatureLogFetcherGetParams) (*V1ClusterFeatureLogFetcherGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1ClusterFeatureLogFetcherGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1ClusterFeatureLogFetcherGet", + Method: "GET", + PathPattern: "/v1/spectroclusters/{uid}/features/logFetcher", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1ClusterFeatureLogFetcherGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1ClusterFeatureLogFetcherGetOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1ClusterFeatureLogFetcherGet: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1ClusterFeatureLogFetcherLogDownload downloads log fetcher logs for cluster by log fetcher uid +*/ +func (a *Client) V1ClusterFeatureLogFetcherLogDownload(params *V1ClusterFeatureLogFetcherLogDownloadParams, writer io.Writer) (*V1ClusterFeatureLogFetcherLogDownloadOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1ClusterFeatureLogFetcherLogDownloadParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1ClusterFeatureLogFetcherLogDownload", + Method: "GET", + PathPattern: "/v1/spectroclusters/features/logFetcher/{uid}/download", + ProducesMediaTypes: []string{"application/octet-stream"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1ClusterFeatureLogFetcherLogDownloadReader{formats: a.formats, writer: writer}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1ClusterFeatureLogFetcherLogDownloadOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1ClusterFeatureLogFetcherLogDownload: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1ClusterFeatureLogFetcherLogUpdate updates log fetcher logs by log fetcher uid +*/ +func (a *Client) V1ClusterFeatureLogFetcherLogUpdate(params *V1ClusterFeatureLogFetcherLogUpdateParams) (*V1ClusterFeatureLogFetcherLogUpdateNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1ClusterFeatureLogFetcherLogUpdateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1ClusterFeatureLogFetcherLogUpdate", + Method: "POST", + PathPattern: "/v1/spectroclusters/features/logFetcher/{uid}/log", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"multipart/form-data"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1ClusterFeatureLogFetcherLogUpdateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1ClusterFeatureLogFetcherLogUpdateNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1ClusterFeatureLogFetcherLogUpdate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1ClusterFeatureManifestsGet gets the installed manifests of a specified cluster +*/ +func (a *Client) V1ClusterFeatureManifestsGet(params *V1ClusterFeatureManifestsGetParams) (*V1ClusterFeatureManifestsGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1ClusterFeatureManifestsGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1ClusterFeatureManifestsGet", + Method: "GET", + PathPattern: "/v1/spectroclusters/{uid}/features/manifests", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1ClusterFeatureManifestsGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1ClusterFeatureManifestsGetOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1ClusterFeatureManifestsGet: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1ClusterFeatureRestoreGet returns the cluster restore of cluster +*/ +func (a *Client) V1ClusterFeatureRestoreGet(params *V1ClusterFeatureRestoreGetParams) (*V1ClusterFeatureRestoreGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1ClusterFeatureRestoreGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1ClusterFeatureRestoreGet", + Method: "GET", + PathPattern: "/v1/spectroclusters/{uid}/features/restore", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1ClusterFeatureRestoreGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1ClusterFeatureRestoreGetOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1ClusterFeatureRestoreGet: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1ClusterFeatureRestoreOnDemandCreate creates on demand cluster restore +*/ +func (a *Client) V1ClusterFeatureRestoreOnDemandCreate(params *V1ClusterFeatureRestoreOnDemandCreateParams) (*V1ClusterFeatureRestoreOnDemandCreateCreated, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1ClusterFeatureRestoreOnDemandCreateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1ClusterFeatureRestoreOnDemandCreate", + Method: "POST", + PathPattern: "/v1/spectroclusters/{uid}/features/restore/onDemand", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1ClusterFeatureRestoreOnDemandCreateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1ClusterFeatureRestoreOnDemandCreateCreated) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1ClusterFeatureRestoreOnDemandCreate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1ClusterFeatureScanKubeBenchLogUpdate updates the kube bench compliance scan log by uid +*/ +func (a *Client) V1ClusterFeatureScanKubeBenchLogUpdate(params *V1ClusterFeatureScanKubeBenchLogUpdateParams) (*V1ClusterFeatureScanKubeBenchLogUpdateNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1ClusterFeatureScanKubeBenchLogUpdateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1ClusterFeatureScanKubeBenchLogUpdate", + Method: "PUT", + PathPattern: "/v1/spectroclusters/{uid}/features/complianceScan/logs/drivers/kubeBench", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1ClusterFeatureScanKubeBenchLogUpdateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1ClusterFeatureScanKubeBenchLogUpdateNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1ClusterFeatureScanKubeBenchLogUpdate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1ClusterFeatureScanKubeHunterLogUpdate updates the kube hunter compliance scan log by uid +*/ +func (a *Client) V1ClusterFeatureScanKubeHunterLogUpdate(params *V1ClusterFeatureScanKubeHunterLogUpdateParams) (*V1ClusterFeatureScanKubeHunterLogUpdateNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1ClusterFeatureScanKubeHunterLogUpdateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1ClusterFeatureScanKubeHunterLogUpdate", + Method: "PUT", + PathPattern: "/v1/spectroclusters/{uid}/features/complianceScan/logs/drivers/kubeHunter", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1ClusterFeatureScanKubeHunterLogUpdateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1ClusterFeatureScanKubeHunterLogUpdateNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1ClusterFeatureScanKubeHunterLogUpdate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1ClusterFeatureScanSonobuoyLogUpdate updates the sonobuoy compliance scan log by uid +*/ +func (a *Client) V1ClusterFeatureScanSonobuoyLogUpdate(params *V1ClusterFeatureScanSonobuoyLogUpdateParams) (*V1ClusterFeatureScanSonobuoyLogUpdateNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1ClusterFeatureScanSonobuoyLogUpdateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1ClusterFeatureScanSonobuoyLogUpdate", + Method: "PUT", + PathPattern: "/v1/spectroclusters/{uid}/features/complianceScan/logs/drivers/sonobuoy", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1ClusterFeatureScanSonobuoyLogUpdateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1ClusterFeatureScanSonobuoyLogUpdateNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1ClusterFeatureScanSonobuoyLogUpdate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1ClusterFeatureScanSyftLogUpdate updates the syft compliance scan log by uid +*/ +func (a *Client) V1ClusterFeatureScanSyftLogUpdate(params *V1ClusterFeatureScanSyftLogUpdateParams) (*V1ClusterFeatureScanSyftLogUpdateNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1ClusterFeatureScanSyftLogUpdateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1ClusterFeatureScanSyftLogUpdate", + Method: "PATCH", + PathPattern: "/v1/spectroclusters/{uid}/features/complianceScan/logs/drivers/syft", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1ClusterFeatureScanSyftLogUpdateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1ClusterFeatureScanSyftLogUpdateNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1ClusterFeatureScanSyftLogUpdate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1ClusterFeatureSonobuoyLogGet returns the sonobuoy compliance scan log by uid +*/ +func (a *Client) V1ClusterFeatureSonobuoyLogGet(params *V1ClusterFeatureSonobuoyLogGetParams) (*V1ClusterFeatureSonobuoyLogGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1ClusterFeatureSonobuoyLogGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1ClusterFeatureSonobuoyLogGet", + Method: "GET", + PathPattern: "/v1/spectroclusters/{uid}/features/complianceScan/logs/{logUid}/drivers/sonobuoy", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1ClusterFeatureSonobuoyLogGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1ClusterFeatureSonobuoyLogGetOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1ClusterFeatureSonobuoyLogGet: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1ClusterFeatureSyftLogGet returns the syft compliance scan log by uid +*/ +func (a *Client) V1ClusterFeatureSyftLogGet(params *V1ClusterFeatureSyftLogGetParams) (*V1ClusterFeatureSyftLogGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1ClusterFeatureSyftLogGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1ClusterFeatureSyftLogGet", + Method: "GET", + PathPattern: "/v1/spectroclusters/{uid}/features/complianceScan/logs/{logUid}/drivers/syft", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1ClusterFeatureSyftLogGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1ClusterFeatureSyftLogGetOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1ClusterFeatureSyftLogGet: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1ClusterGroupUIDHostClustersSummary retrieves a list of cluster summary for a given cluster group +*/ +func (a *Client) V1ClusterGroupUIDHostClustersSummary(params *V1ClusterGroupUIDHostClustersSummaryParams) (*V1ClusterGroupUIDHostClustersSummaryOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1ClusterGroupUIDHostClustersSummaryParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1ClusterGroupUidHostClustersSummary", + Method: "POST", + PathPattern: "/v1/dashboard/clustergroups/{uid}/hostClusters", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1ClusterGroupUIDHostClustersSummaryReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1ClusterGroupUIDHostClustersSummaryOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1ClusterGroupUidHostClustersSummary: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1ClusterGroupUIDVirtualClustersSummary retrieves a list of cluster summary for a given cluster group +*/ +func (a *Client) V1ClusterGroupUIDVirtualClustersSummary(params *V1ClusterGroupUIDVirtualClustersSummaryParams) (*V1ClusterGroupUIDVirtualClustersSummaryOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1ClusterGroupUIDVirtualClustersSummaryParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1ClusterGroupUidVirtualClustersSummary", + Method: "POST", + PathPattern: "/v1/dashboard/clustergroups/{uid}/virtualClusters", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1ClusterGroupUIDVirtualClustersSummaryReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1ClusterGroupUIDVirtualClustersSummaryOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1ClusterGroupUidVirtualClustersSummary: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1ClusterGroupsCreate creates cluster groups +*/ +func (a *Client) V1ClusterGroupsCreate(params *V1ClusterGroupsCreateParams) (*V1ClusterGroupsCreateCreated, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1ClusterGroupsCreateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1ClusterGroupsCreate", + Method: "POST", + PathPattern: "/v1/clustergroups", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1ClusterGroupsCreateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1ClusterGroupsCreateCreated) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1ClusterGroupsCreate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1ClusterGroupsDeveloperCreditUsageGet gets cluster group developer credit usage by scope +*/ +func (a *Client) V1ClusterGroupsDeveloperCreditUsageGet(params *V1ClusterGroupsDeveloperCreditUsageGetParams) (*V1ClusterGroupsDeveloperCreditUsageGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1ClusterGroupsDeveloperCreditUsageGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1ClusterGroupsDeveloperCreditUsageGet", + Method: "GET", + PathPattern: "/v1/clustergroups/developerCredit/usage/{scope}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1ClusterGroupsDeveloperCreditUsageGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1ClusterGroupsDeveloperCreditUsageGetOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1ClusterGroupsDeveloperCreditUsageGet: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1ClusterGroupsHostClusterMetadata retrieves a list of cluster groups host cluster metadata +*/ +func (a *Client) V1ClusterGroupsHostClusterMetadata(params *V1ClusterGroupsHostClusterMetadataParams) (*V1ClusterGroupsHostClusterMetadataOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1ClusterGroupsHostClusterMetadataParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1ClusterGroupsHostClusterMetadata", + Method: "GET", + PathPattern: "/v1/clustergroups/hostCluster/metadata", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1ClusterGroupsHostClusterMetadataReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1ClusterGroupsHostClusterMetadataOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1ClusterGroupsHostClusterMetadata: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1ClusterGroupsHostClusterSummary retrieves a list of cluster groups host cluster summary +*/ +func (a *Client) V1ClusterGroupsHostClusterSummary(params *V1ClusterGroupsHostClusterSummaryParams) (*V1ClusterGroupsHostClusterSummaryOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1ClusterGroupsHostClusterSummaryParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1ClusterGroupsHostClusterSummary", + Method: "GET", + PathPattern: "/v1/clustergroups/hostCluster", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1ClusterGroupsHostClusterSummaryReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1ClusterGroupsHostClusterSummaryOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1ClusterGroupsHostClusterSummary: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1ClusterGroupsUIDDelete deletes the specified cluster group +*/ +func (a *Client) V1ClusterGroupsUIDDelete(params *V1ClusterGroupsUIDDeleteParams) (*V1ClusterGroupsUIDDeleteNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1ClusterGroupsUIDDeleteParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1ClusterGroupsUidDelete", + Method: "DELETE", + PathPattern: "/v1/clustergroups/{uid}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1ClusterGroupsUIDDeleteReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1ClusterGroupsUIDDeleteNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1ClusterGroupsUidDelete: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1ClusterGroupsUIDGet returns the specified cluster groups +*/ +func (a *Client) V1ClusterGroupsUIDGet(params *V1ClusterGroupsUIDGetParams) (*V1ClusterGroupsUIDGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1ClusterGroupsUIDGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1ClusterGroupsUidGet", + Method: "GET", + PathPattern: "/v1/clustergroups/{uid}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1ClusterGroupsUIDGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1ClusterGroupsUIDGetOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1ClusterGroupsUidGet: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1ClusterGroupsUIDHostClusterUpdate updates cluster reference and host cluster config +*/ +func (a *Client) V1ClusterGroupsUIDHostClusterUpdate(params *V1ClusterGroupsUIDHostClusterUpdateParams) (*V1ClusterGroupsUIDHostClusterUpdateNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1ClusterGroupsUIDHostClusterUpdateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1ClusterGroupsUidHostClusterUpdate", + Method: "PUT", + PathPattern: "/v1/clustergroups/{uid}/hostCluster", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1ClusterGroupsUIDHostClusterUpdateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1ClusterGroupsUIDHostClusterUpdateNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1ClusterGroupsUidHostClusterUpdate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1ClusterGroupsUIDMetaUpdate updates the specified cluster groups meta +*/ +func (a *Client) V1ClusterGroupsUIDMetaUpdate(params *V1ClusterGroupsUIDMetaUpdateParams) (*V1ClusterGroupsUIDMetaUpdateNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1ClusterGroupsUIDMetaUpdateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1ClusterGroupsUidMetaUpdate", + Method: "PUT", + PathPattern: "/v1/clustergroups/{uid}/meta", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1ClusterGroupsUIDMetaUpdateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1ClusterGroupsUIDMetaUpdateNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1ClusterGroupsUidMetaUpdate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1ClusterGroupsUIDPacksResolvedValuesGet returns the specified clustergroup s profile packs resolved values +*/ +func (a *Client) V1ClusterGroupsUIDPacksResolvedValuesGet(params *V1ClusterGroupsUIDPacksResolvedValuesGetParams) (*V1ClusterGroupsUIDPacksResolvedValuesGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1ClusterGroupsUIDPacksResolvedValuesGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1ClusterGroupsUidPacksResolvedValuesGet", + Method: "GET", + PathPattern: "/v1/clustergroups/{uid}/packs/resolvedValues", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1ClusterGroupsUIDPacksResolvedValuesGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1ClusterGroupsUIDPacksResolvedValuesGetOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1ClusterGroupsUidPacksResolvedValuesGet: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1ClusterGroupsUIDProfilesGet returns the associated profiles of a specified cluster group +*/ +func (a *Client) V1ClusterGroupsUIDProfilesGet(params *V1ClusterGroupsUIDProfilesGetParams) (*V1ClusterGroupsUIDProfilesGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1ClusterGroupsUIDProfilesGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1ClusterGroupsUidProfilesGet", + Method: "GET", + PathPattern: "/v1/clustergroups/{uid}/profiles", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1ClusterGroupsUIDProfilesGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1ClusterGroupsUIDProfilesGetOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1ClusterGroupsUidProfilesGet: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1ClusterGroupsUIDProfilesUpdate updates the specified cluster groups profiles +*/ +func (a *Client) V1ClusterGroupsUIDProfilesUpdate(params *V1ClusterGroupsUIDProfilesUpdateParams) (*V1ClusterGroupsUIDProfilesUpdateNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1ClusterGroupsUIDProfilesUpdateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1ClusterGroupsUidProfilesUpdate", + Method: "PUT", + PathPattern: "/v1/clustergroups/{uid}/profiles", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1ClusterGroupsUIDProfilesUpdateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1ClusterGroupsUIDProfilesUpdateNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1ClusterGroupsUidProfilesUpdate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1ClusterGroupsValidateName validates the cluster groups name +*/ +func (a *Client) V1ClusterGroupsValidateName(params *V1ClusterGroupsValidateNameParams) (*V1ClusterGroupsValidateNameNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1ClusterGroupsValidateNameParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1ClusterGroupsValidateName", + Method: "GET", + PathPattern: "/v1/clustergroups/validate/name", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1ClusterGroupsValidateNameReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1ClusterGroupsValidateNameNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1ClusterGroupsValidateName: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1ClusterNamespacesGet returns available namespaces for the cluster +*/ +func (a *Client) V1ClusterNamespacesGet(params *V1ClusterNamespacesGetParams) (*V1ClusterNamespacesGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1ClusterNamespacesGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1ClusterNamespacesGet", + Method: "GET", + PathPattern: "/v1/spectroclusters/{uid}/namespaces", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1ClusterNamespacesGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1ClusterNamespacesGetOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1ClusterNamespacesGet: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1ClusterProfilesBulkDelete deletes list of cluster profiles +*/ +func (a *Client) V1ClusterProfilesBulkDelete(params *V1ClusterProfilesBulkDeleteParams) (*V1ClusterProfilesBulkDeleteOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1ClusterProfilesBulkDeleteParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1ClusterProfilesBulkDelete", + Method: "DELETE", + PathPattern: "/v1/clusterprofiles/bulk", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1ClusterProfilesBulkDeleteReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1ClusterProfilesBulkDeleteOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1ClusterProfilesBulkDelete: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1ClusterProfilesCreate creates a cluster profile +*/ +func (a *Client) V1ClusterProfilesCreate(params *V1ClusterProfilesCreateParams) (*V1ClusterProfilesCreateCreated, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1ClusterProfilesCreateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1ClusterProfilesCreate", + Method: "POST", + PathPattern: "/v1/clusterprofiles", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1ClusterProfilesCreateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1ClusterProfilesCreateCreated) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1ClusterProfilesCreate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1ClusterProfilesDelete deletes the specified cluster profile +*/ +func (a *Client) V1ClusterProfilesDelete(params *V1ClusterProfilesDeleteParams) (*V1ClusterProfilesDeleteNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1ClusterProfilesDeleteParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1ClusterProfilesDelete", + Method: "DELETE", + PathPattern: "/v1/clusterprofiles/{uid}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1ClusterProfilesDeleteReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1ClusterProfilesDeleteNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1ClusterProfilesDelete: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1ClusterProfilesFilterSummary retrieves a list of cluster profiles filter summary supported filter fields profile name tags profile type environment supported sort fields profile name environment profile type creation timestamp last modified timestamp +*/ +func (a *Client) V1ClusterProfilesFilterSummary(params *V1ClusterProfilesFilterSummaryParams) (*V1ClusterProfilesFilterSummaryOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1ClusterProfilesFilterSummaryParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1ClusterProfilesFilterSummary", + Method: "POST", + PathPattern: "/v1/dashboard/clusterprofiles", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1ClusterProfilesFilterSummaryReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1ClusterProfilesFilterSummaryOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1ClusterProfilesFilterSummary: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1ClusterProfilesGet returns a specified cluster profile +*/ +func (a *Client) V1ClusterProfilesGet(params *V1ClusterProfilesGetParams) (*V1ClusterProfilesGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1ClusterProfilesGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1ClusterProfilesGet", + Method: "GET", + PathPattern: "/v1/clusterprofiles/{uid}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1ClusterProfilesGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1ClusterProfilesGetOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1ClusterProfilesGet: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1ClusterProfilesImport imports a cluster profile +*/ +func (a *Client) V1ClusterProfilesImport(params *V1ClusterProfilesImportParams) (*V1ClusterProfilesImportCreated, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1ClusterProfilesImportParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1ClusterProfilesImport", + Method: "POST", + PathPattern: "/v1/clusterprofiles/import", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1ClusterProfilesImportReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1ClusterProfilesImportCreated) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1ClusterProfilesImport: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1ClusterProfilesImportFile imports a cluster profile via file +*/ +func (a *Client) V1ClusterProfilesImportFile(params *V1ClusterProfilesImportFileParams) (*V1ClusterProfilesImportFileCreated, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1ClusterProfilesImportFileParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1ClusterProfilesImportFile", + Method: "POST", + PathPattern: "/v1/clusterprofiles/import/file", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"multipart/form-data"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1ClusterProfilesImportFileReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1ClusterProfilesImportFileCreated) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1ClusterProfilesImportFile: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1ClusterProfilesImportValidate validates cluster profile import +*/ +func (a *Client) V1ClusterProfilesImportValidate(params *V1ClusterProfilesImportValidateParams) (*V1ClusterProfilesImportValidateOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1ClusterProfilesImportValidateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1ClusterProfilesImportValidate", + Method: "POST", + PathPattern: "/v1/clusterprofiles/import/validate", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1ClusterProfilesImportValidateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1ClusterProfilesImportValidateOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1ClusterProfilesImportValidate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1ClusterProfilesMetadata retrieves a list of cluster profiles metadata +*/ +func (a *Client) V1ClusterProfilesMetadata(params *V1ClusterProfilesMetadataParams) (*V1ClusterProfilesMetadataOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1ClusterProfilesMetadataParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1ClusterProfilesMetadata", + Method: "GET", + PathPattern: "/v1/dashboard/clusterprofiles/metadata", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1ClusterProfilesMetadataReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1ClusterProfilesMetadataOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1ClusterProfilesMetadata: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1ClusterProfilesPacksRefUpdate updates cluster profile packs ref +*/ +func (a *Client) V1ClusterProfilesPacksRefUpdate(params *V1ClusterProfilesPacksRefUpdateParams) (*V1ClusterProfilesPacksRefUpdateNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1ClusterProfilesPacksRefUpdateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1ClusterProfilesPacksRefUpdate", + Method: "PATCH", + PathPattern: "/v1/clusterprofiles/{uid}/packRefs", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1ClusterProfilesPacksRefUpdateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1ClusterProfilesPacksRefUpdateNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1ClusterProfilesPacksRefUpdate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + V1ClusterProfilesPublish publishes the specified cluster profile + + Publish the draft cluster profile with next revision, the current draft cluster profile will be marked to published + +and the draft cluster profile will be set to null in the cluster profile template. +*/ +func (a *Client) V1ClusterProfilesPublish(params *V1ClusterProfilesPublishParams) (*V1ClusterProfilesPublishNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1ClusterProfilesPublishParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1ClusterProfilesPublish", + Method: "PATCH", + PathPattern: "/v1/clusterprofiles/{uid}/publish", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1ClusterProfilesPublishReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1ClusterProfilesPublishNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1ClusterProfilesPublish: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1ClusterProfilesUIDClone creates a clone of the specified cluster profile +*/ +func (a *Client) V1ClusterProfilesUIDClone(params *V1ClusterProfilesUIDCloneParams) (*V1ClusterProfilesUIDCloneCreated, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1ClusterProfilesUIDCloneParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1ClusterProfilesUidClone", + Method: "POST", + PathPattern: "/v1/clusterprofiles/{uid}/clone", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1ClusterProfilesUIDCloneReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1ClusterProfilesUIDCloneCreated) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1ClusterProfilesUidClone: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1ClusterProfilesUIDCloneValidate validates the cluster profile clone + +Validates the cloned cluster profile name, version and target project uid +*/ +func (a *Client) V1ClusterProfilesUIDCloneValidate(params *V1ClusterProfilesUIDCloneValidateParams) (*V1ClusterProfilesUIDCloneValidateNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1ClusterProfilesUIDCloneValidateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1ClusterProfilesUidCloneValidate", + Method: "POST", + PathPattern: "/v1/clusterprofiles/{uid}/clone/validate", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1ClusterProfilesUIDCloneValidateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1ClusterProfilesUIDCloneValidateNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1ClusterProfilesUidCloneValidate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1ClusterProfilesUIDMetadataUpdate updates the specified cluster profile metadata +*/ +func (a *Client) V1ClusterProfilesUIDMetadataUpdate(params *V1ClusterProfilesUIDMetadataUpdateParams) (*V1ClusterProfilesUIDMetadataUpdateNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1ClusterProfilesUIDMetadataUpdateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1ClusterProfilesUidMetadataUpdate", + Method: "PATCH", + PathPattern: "/v1/clusterprofiles/{uid}/metadata", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1ClusterProfilesUIDMetadataUpdateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1ClusterProfilesUIDMetadataUpdateNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1ClusterProfilesUidMetadataUpdate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1ClusterProfilesUIDPacksAdd adds a new pack to the specified cluster profile and returns the created pack uid +*/ +func (a *Client) V1ClusterProfilesUIDPacksAdd(params *V1ClusterProfilesUIDPacksAddParams) (*V1ClusterProfilesUIDPacksAddCreated, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1ClusterProfilesUIDPacksAddParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1ClusterProfilesUidPacksAdd", + Method: "POST", + PathPattern: "/v1/clusterprofiles/{uid}/packs", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1ClusterProfilesUIDPacksAddReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1ClusterProfilesUIDPacksAddCreated) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1ClusterProfilesUidPacksAdd: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1ClusterProfilesUIDPacksConfigGet returns the specified cluster profile pack configuration +*/ +func (a *Client) V1ClusterProfilesUIDPacksConfigGet(params *V1ClusterProfilesUIDPacksConfigGetParams) (*V1ClusterProfilesUIDPacksConfigGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1ClusterProfilesUIDPacksConfigGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1ClusterProfilesUidPacksConfigGet", + Method: "GET", + PathPattern: "/v1/clusterprofiles/{uid}/packs/{packName}/config", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1ClusterProfilesUIDPacksConfigGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1ClusterProfilesUIDPacksConfigGetOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1ClusterProfilesUidPacksConfigGet: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1ClusterProfilesUIDPacksGet returns the specified cluster profile packs +*/ +func (a *Client) V1ClusterProfilesUIDPacksGet(params *V1ClusterProfilesUIDPacksGetParams) (*V1ClusterProfilesUIDPacksGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1ClusterProfilesUIDPacksGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1ClusterProfilesUidPacksGet", + Method: "GET", + PathPattern: "/v1/clusterprofiles/{uid}/packs", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1ClusterProfilesUIDPacksGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1ClusterProfilesUIDPacksGetOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1ClusterProfilesUidPacksGet: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1ClusterProfilesUIDPacksManifestsGet returns the specified cluster profile pack manifests +*/ +func (a *Client) V1ClusterProfilesUIDPacksManifestsGet(params *V1ClusterProfilesUIDPacksManifestsGetParams) (*V1ClusterProfilesUIDPacksManifestsGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1ClusterProfilesUIDPacksManifestsGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1ClusterProfilesUidPacksManifestsGet", + Method: "GET", + PathPattern: "/v1/clusterprofiles/{uid}/packs/manifests", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1ClusterProfilesUIDPacksManifestsGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1ClusterProfilesUIDPacksManifestsGetOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1ClusterProfilesUidPacksManifestsGet: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1ClusterProfilesUIDPacksNameDelete deletes the specified pack information in the cluster profile +*/ +func (a *Client) V1ClusterProfilesUIDPacksNameDelete(params *V1ClusterProfilesUIDPacksNameDeleteParams) (*V1ClusterProfilesUIDPacksNameDeleteNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1ClusterProfilesUIDPacksNameDeleteParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1ClusterProfilesUidPacksNameDelete", + Method: "DELETE", + PathPattern: "/v1/clusterprofiles/{uid}/packs/{packName}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1ClusterProfilesUIDPacksNameDeleteReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1ClusterProfilesUIDPacksNameDeleteNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1ClusterProfilesUidPacksNameDelete: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1ClusterProfilesUIDPacksNameManifestsAdd adds manifest to the profiles packs and returns the added manifests uid +*/ +func (a *Client) V1ClusterProfilesUIDPacksNameManifestsAdd(params *V1ClusterProfilesUIDPacksNameManifestsAddParams) (*V1ClusterProfilesUIDPacksNameManifestsAddCreated, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1ClusterProfilesUIDPacksNameManifestsAddParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1ClusterProfilesUidPacksNameManifestsAdd", + Method: "POST", + PathPattern: "/v1/clusterprofiles/{uid}/packs/{packName}/manifests", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1ClusterProfilesUIDPacksNameManifestsAddReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1ClusterProfilesUIDPacksNameManifestsAddCreated) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1ClusterProfilesUidPacksNameManifestsAdd: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1ClusterProfilesUIDPacksNameManifestsUIDDelete deletes the specified cluster profile pack manifest +*/ +func (a *Client) V1ClusterProfilesUIDPacksNameManifestsUIDDelete(params *V1ClusterProfilesUIDPacksNameManifestsUIDDeleteParams) (*V1ClusterProfilesUIDPacksNameManifestsUIDDeleteNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1ClusterProfilesUIDPacksNameManifestsUIDDeleteParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1ClusterProfilesUidPacksNameManifestsUidDelete", + Method: "DELETE", + PathPattern: "/v1/clusterprofiles/{uid}/packs/{packName}/manifests/{manifestUid}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1ClusterProfilesUIDPacksNameManifestsUIDDeleteReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1ClusterProfilesUIDPacksNameManifestsUIDDeleteNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1ClusterProfilesUidPacksNameManifestsUidDelete: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1ClusterProfilesUIDPacksNameManifestsUIDGet returns the specified cluster profile pack manifest +*/ +func (a *Client) V1ClusterProfilesUIDPacksNameManifestsUIDGet(params *V1ClusterProfilesUIDPacksNameManifestsUIDGetParams) (*V1ClusterProfilesUIDPacksNameManifestsUIDGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1ClusterProfilesUIDPacksNameManifestsUIDGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1ClusterProfilesUidPacksNameManifestsUidGet", + Method: "GET", + PathPattern: "/v1/clusterprofiles/{uid}/packs/{packName}/manifests/{manifestUid}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1ClusterProfilesUIDPacksNameManifestsUIDGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1ClusterProfilesUIDPacksNameManifestsUIDGetOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1ClusterProfilesUidPacksNameManifestsUidGet: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1ClusterProfilesUIDPacksNameManifestsUIDUpdate updates the specified manifest of the profile s pack +*/ +func (a *Client) V1ClusterProfilesUIDPacksNameManifestsUIDUpdate(params *V1ClusterProfilesUIDPacksNameManifestsUIDUpdateParams) (*V1ClusterProfilesUIDPacksNameManifestsUIDUpdateNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1ClusterProfilesUIDPacksNameManifestsUIDUpdateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1ClusterProfilesUidPacksNameManifestsUidUpdate", + Method: "PUT", + PathPattern: "/v1/clusterprofiles/{uid}/packs/{packName}/manifests/{manifestUid}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1ClusterProfilesUIDPacksNameManifestsUIDUpdateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1ClusterProfilesUIDPacksNameManifestsUIDUpdateNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1ClusterProfilesUidPacksNameManifestsUidUpdate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1ClusterProfilesUIDPacksNameUpdate updates the specified pack information in the cluster profile +*/ +func (a *Client) V1ClusterProfilesUIDPacksNameUpdate(params *V1ClusterProfilesUIDPacksNameUpdateParams) (*V1ClusterProfilesUIDPacksNameUpdateNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1ClusterProfilesUIDPacksNameUpdateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1ClusterProfilesUidPacksNameUpdate", + Method: "PUT", + PathPattern: "/v1/clusterprofiles/{uid}/packs/{packName}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1ClusterProfilesUIDPacksNameUpdateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1ClusterProfilesUIDPacksNameUpdateNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1ClusterProfilesUidPacksNameUpdate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1ClusterProfilesUIDPacksResolvedValuesGet returns the specified cluster profile packs resolved values +*/ +func (a *Client) V1ClusterProfilesUIDPacksResolvedValuesGet(params *V1ClusterProfilesUIDPacksResolvedValuesGetParams) (*V1ClusterProfilesUIDPacksResolvedValuesGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1ClusterProfilesUIDPacksResolvedValuesGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1ClusterProfilesUidPacksResolvedValuesGet", + Method: "GET", + PathPattern: "/v1/clusterprofiles/{uid}/packs/resolvedValues", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1ClusterProfilesUIDPacksResolvedValuesGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1ClusterProfilesUIDPacksResolvedValuesGetOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1ClusterProfilesUidPacksResolvedValuesGet: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1ClusterProfilesUIDPacksUIDManifests returns the associated manifests for the specified profile s pack +*/ +func (a *Client) V1ClusterProfilesUIDPacksUIDManifests(params *V1ClusterProfilesUIDPacksUIDManifestsParams) (*V1ClusterProfilesUIDPacksUIDManifestsOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1ClusterProfilesUIDPacksUIDManifestsParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1ClusterProfilesUidPacksUidManifests", + Method: "GET", + PathPattern: "/v1/clusterprofiles/{uid}/packs/{packName}/manifests", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1ClusterProfilesUIDPacksUIDManifestsReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1ClusterProfilesUIDPacksUIDManifestsOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1ClusterProfilesUidPacksUidManifests: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1ClusterProfilesUIDSpcDownload downloads the specified cluster profile +*/ +func (a *Client) V1ClusterProfilesUIDSpcDownload(params *V1ClusterProfilesUIDSpcDownloadParams, writer io.Writer) (*V1ClusterProfilesUIDSpcDownloadOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1ClusterProfilesUIDSpcDownloadParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1ClusterProfilesUidSpcDownload", + Method: "GET", + PathPattern: "/v1/clusterprofiles/{uid}/spc/download", + ProducesMediaTypes: []string{"application/octet-stream"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1ClusterProfilesUIDSpcDownloadReader{formats: a.formats, writer: writer}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1ClusterProfilesUIDSpcDownloadOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1ClusterProfilesUidSpcDownload: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1ClusterProfilesUIDSummary retrieves a specified cluster profile summary +*/ +func (a *Client) V1ClusterProfilesUIDSummary(params *V1ClusterProfilesUIDSummaryParams) (*V1ClusterProfilesUIDSummaryOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1ClusterProfilesUIDSummaryParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1ClusterProfilesUidSummary", + Method: "GET", + PathPattern: "/v1/dashboard/clusterprofiles/{uid}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1ClusterProfilesUIDSummaryReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1ClusterProfilesUIDSummaryOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1ClusterProfilesUidSummary: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1ClusterProfilesUIDValidatePacks validates specified cluster profile packs +*/ +func (a *Client) V1ClusterProfilesUIDValidatePacks(params *V1ClusterProfilesUIDValidatePacksParams) (*V1ClusterProfilesUIDValidatePacksOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1ClusterProfilesUIDValidatePacksParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1ClusterProfilesUidValidatePacks", + Method: "POST", + PathPattern: "/v1/clusterprofiles/{uid}/validate/packs", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1ClusterProfilesUIDValidatePacksReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1ClusterProfilesUIDValidatePacksOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1ClusterProfilesUidValidatePacks: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1ClusterProfilesUpdate updates the specified cluster profile +*/ +func (a *Client) V1ClusterProfilesUpdate(params *V1ClusterProfilesUpdateParams) (*V1ClusterProfilesUpdateNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1ClusterProfilesUpdateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1ClusterProfilesUpdate", + Method: "PUT", + PathPattern: "/v1/clusterprofiles/{uid}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1ClusterProfilesUpdateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1ClusterProfilesUpdateNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1ClusterProfilesUpdate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1ClusterProfilesValidateNameVersion validates the cluster profile metadata + +Validates the cluster profile name and version +*/ +func (a *Client) V1ClusterProfilesValidateNameVersion(params *V1ClusterProfilesValidateNameVersionParams) (*V1ClusterProfilesValidateNameVersionNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1ClusterProfilesValidateNameVersionParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1ClusterProfilesValidateNameVersion", + Method: "GET", + PathPattern: "/v1/clusterprofiles/validate/name", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1ClusterProfilesValidateNameVersionReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1ClusterProfilesValidateNameVersionNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1ClusterProfilesValidateNameVersion: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1ClusterProfilesValidatePacks validates cluster profile packs +*/ +func (a *Client) V1ClusterProfilesValidatePacks(params *V1ClusterProfilesValidatePacksParams) (*V1ClusterProfilesValidatePacksOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1ClusterProfilesValidatePacksParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1ClusterProfilesValidatePacks", + Method: "POST", + PathPattern: "/v1/clusterprofiles/validate/packs", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1ClusterProfilesValidatePacksReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1ClusterProfilesValidatePacksOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1ClusterProfilesValidatePacks: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1ClusterVMSnapshotsList returns the list of snapshots of given namespaces +*/ +func (a *Client) V1ClusterVMSnapshotsList(params *V1ClusterVMSnapshotsListParams) (*V1ClusterVMSnapshotsListOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1ClusterVMSnapshotsListParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1ClusterVMSnapshotsList", + Method: "GET", + PathPattern: "/v1/spectroclusters/{uid}/vms/snapshot", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1ClusterVMSnapshotsListReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1ClusterVMSnapshotsListOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1ClusterVMSnapshotsList: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1DashboardAppDeployments retrieves a list of application deployments filter summary supported filter fields app deployment name cluster Uid tags supported sort fields app deployment name creation timestamp last modified timestamp +*/ +func (a *Client) V1DashboardAppDeployments(params *V1DashboardAppDeploymentsParams) (*V1DashboardAppDeploymentsOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1DashboardAppDeploymentsParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1DashboardAppDeployments", + Method: "POST", + PathPattern: "/v1/dashboard/appDeployments", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1DashboardAppDeploymentsReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1DashboardAppDeploymentsOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1DashboardAppDeployments: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1DashboardAppProfiles retrieves a list of application profiles filter summary supported filter fields profile name tags supported sort fields profile name creation timestamp last modified timestamp +*/ +func (a *Client) V1DashboardAppProfiles(params *V1DashboardAppProfilesParams) (*V1DashboardAppProfilesOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1DashboardAppProfilesParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1DashboardAppProfiles", + Method: "POST", + PathPattern: "/v1/dashboard/appProfiles", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1DashboardAppProfilesReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1DashboardAppProfilesOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1DashboardAppProfiles: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1DashboardAppProfilesMetadata retrieves a list of application profile metadata +*/ +func (a *Client) V1DashboardAppProfilesMetadata(params *V1DashboardAppProfilesMetadataParams) (*V1DashboardAppProfilesMetadataOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1DashboardAppProfilesMetadataParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1DashboardAppProfilesMetadata", + Method: "GET", + PathPattern: "/v1/dashboard/appProfiles/metadata", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1DashboardAppProfilesMetadataReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1DashboardAppProfilesMetadataOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1DashboardAppProfilesMetadata: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1DashboardCloudAccountsMetadata retrieves a list of cloud accounts metadata +*/ +func (a *Client) V1DashboardCloudAccountsMetadata(params *V1DashboardCloudAccountsMetadataParams) (*V1DashboardCloudAccountsMetadataOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1DashboardCloudAccountsMetadataParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1DashboardCloudAccountsMetadata", + Method: "GET", + PathPattern: "/v1/dashboard/cloudaccounts/metadata", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1DashboardCloudAccountsMetadataReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1DashboardCloudAccountsMetadataOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1DashboardCloudAccountsMetadata: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1DashboardClustersSearchSummaryExport exports the list of cluster summary with matching search filter and download as a file csv supported sort fields environment cluster name health state creation timestamp last modified timestamp +*/ +func (a *Client) V1DashboardClustersSearchSummaryExport(params *V1DashboardClustersSearchSummaryExportParams, writer io.Writer) (*V1DashboardClustersSearchSummaryExportOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1DashboardClustersSearchSummaryExportParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1DashboardClustersSearchSummaryExport", + Method: "POST", + PathPattern: "/v1/dashboard/spectroclusters/search/export", + ProducesMediaTypes: []string{"application/octet-stream"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1DashboardClustersSearchSummaryExportReader{formats: a.formats, writer: writer}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1DashboardClustersSearchSummaryExportOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1DashboardClustersSearchSummaryExport: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1DashboardClustersSearchSummaryExportGet exports and download the list of cluster summary with matching search filter and download as a file csv +*/ +func (a *Client) V1DashboardClustersSearchSummaryExportGet(params *V1DashboardClustersSearchSummaryExportGetParams, writer io.Writer) (*V1DashboardClustersSearchSummaryExportGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1DashboardClustersSearchSummaryExportGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1DashboardClustersSearchSummaryExportGet", + Method: "GET", + PathPattern: "/v1/dashboard/spectroclusters/search/export", + ProducesMediaTypes: []string{"application/octet-stream"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1DashboardClustersSearchSummaryExportGetReader{formats: a.formats, writer: writer}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1DashboardClustersSearchSummaryExportGetOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1DashboardClustersSearchSummaryExportGet: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1DashboardEdgehostsSearch retrieves a list of edgehosts summary with provided search filter supported fields as per schema v1 dashboard edgehosts search schema +*/ +func (a *Client) V1DashboardEdgehostsSearch(params *V1DashboardEdgehostsSearchParams) (*V1DashboardEdgehostsSearchOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1DashboardEdgehostsSearchParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1DashboardEdgehostsSearch", + Method: "POST", + PathPattern: "/v1/dashboard/edgehosts/search", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1DashboardEdgehostsSearchReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1DashboardEdgehostsSearchOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1DashboardEdgehostsSearch: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1DashboardEdgehostsSearchSchemaGet retrieves a schema for the edgehost search filter +*/ +func (a *Client) V1DashboardEdgehostsSearchSchemaGet(params *V1DashboardEdgehostsSearchSchemaGetParams) (*V1DashboardEdgehostsSearchSchemaGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1DashboardEdgehostsSearchSchemaGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1DashboardEdgehostsSearchSchemaGet", + Method: "GET", + PathPattern: "/v1/dashboard/edgehosts/search/schema", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1DashboardEdgehostsSearchSchemaGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1DashboardEdgehostsSearchSchemaGetOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1DashboardEdgehostsSearchSchemaGet: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1DashboardPcgSearchSchemaGet retrieves a schema for the p c g search filter +*/ +func (a *Client) V1DashboardPcgSearchSchemaGet(params *V1DashboardPcgSearchSchemaGetParams) (*V1DashboardPcgSearchSchemaGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1DashboardPcgSearchSchemaGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1DashboardPcgSearchSchemaGet", + Method: "GET", + PathPattern: "/v1/dashboard/pcgs/search/schema", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1DashboardPcgSearchSchemaGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1DashboardPcgSearchSchemaGetOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1DashboardPcgSearchSchemaGet: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1DashboardPcgsSearchSummary retrieves a list of p c g summary with provided search filter supported fields as per schema v1 dashboard pcgs search schema +*/ +func (a *Client) V1DashboardPcgsSearchSummary(params *V1DashboardPcgsSearchSummaryParams) (*V1DashboardPcgsSearchSummaryOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1DashboardPcgsSearchSummaryParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1DashboardPcgsSearchSummary", + Method: "POST", + PathPattern: "/v1/dashboard/pcgs/search", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1DashboardPcgsSearchSummaryReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1DashboardPcgsSearchSummaryOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1DashboardPcgsSearchSummary: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1DashboardSpectroClustersCostSummary retrieves spectro clusters cloud cost summary information +*/ +func (a *Client) V1DashboardSpectroClustersCostSummary(params *V1DashboardSpectroClustersCostSummaryParams) (*V1DashboardSpectroClustersCostSummaryOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1DashboardSpectroClustersCostSummaryParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1DashboardSpectroClustersCostSummary", + Method: "POST", + PathPattern: "/v1/dashboard/spectroclusters/cost", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1DashboardSpectroClustersCostSummaryReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1DashboardSpectroClustersCostSummaryOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1DashboardSpectroClustersCostSummary: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1DashboardSpectroClustersRepaveList retrieves a list of clusters with the desired repave state +*/ +func (a *Client) V1DashboardSpectroClustersRepaveList(params *V1DashboardSpectroClustersRepaveListParams) (*V1DashboardSpectroClustersRepaveListOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1DashboardSpectroClustersRepaveListParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1DashboardSpectroClustersRepaveList", + Method: "GET", + PathPattern: "/v1/dashboard/spectroclusters/repaveStatus", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1DashboardSpectroClustersRepaveListReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1DashboardSpectroClustersRepaveListOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1DashboardSpectroClustersRepaveList: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1DashboardSpectroClustersSearchInput retrieves a supported input values for the cluster search filter +*/ +func (a *Client) V1DashboardSpectroClustersSearchInput(params *V1DashboardSpectroClustersSearchInputParams) (*V1DashboardSpectroClustersSearchInputOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1DashboardSpectroClustersSearchInputParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1DashboardSpectroClustersSearchInput", + Method: "GET", + PathPattern: "/v1/dashboard/spectroclusters/search/input", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1DashboardSpectroClustersSearchInputReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1DashboardSpectroClustersSearchInputOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1DashboardSpectroClustersSearchInput: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1DashboardSpectroClustersUIDWorkloads retrieves specified cluster workloads +*/ +func (a *Client) V1DashboardSpectroClustersUIDWorkloads(params *V1DashboardSpectroClustersUIDWorkloadsParams) (*V1DashboardSpectroClustersUIDWorkloadsOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1DashboardSpectroClustersUIDWorkloadsParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1DashboardSpectroClustersUidWorkloads", + Method: "POST", + PathPattern: "/v1/dashboard/spectroclusters/{uid}/workloads", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1DashboardSpectroClustersUIDWorkloadsReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1DashboardSpectroClustersUIDWorkloadsOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1DashboardSpectroClustersUidWorkloads: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1DashboardSpectroClustersUIDWorkloadsClusterRoleBinding retrieves specified cluster workload clusterrolebindings +*/ +func (a *Client) V1DashboardSpectroClustersUIDWorkloadsClusterRoleBinding(params *V1DashboardSpectroClustersUIDWorkloadsClusterRoleBindingParams) (*V1DashboardSpectroClustersUIDWorkloadsClusterRoleBindingOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1DashboardSpectroClustersUIDWorkloadsClusterRoleBindingParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1DashboardSpectroClustersUidWorkloadsClusterRoleBinding", + Method: "POST", + PathPattern: "/v1/dashboard/spectroclusters/{uid}/workloads/clusterrolebinding", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1DashboardSpectroClustersUIDWorkloadsClusterRoleBindingReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1DashboardSpectroClustersUIDWorkloadsClusterRoleBindingOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1DashboardSpectroClustersUidWorkloadsClusterRoleBinding: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1DashboardSpectroClustersUIDWorkloadsCronJob retrieves specified cluster workload cronjobs +*/ +func (a *Client) V1DashboardSpectroClustersUIDWorkloadsCronJob(params *V1DashboardSpectroClustersUIDWorkloadsCronJobParams) (*V1DashboardSpectroClustersUIDWorkloadsCronJobOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1DashboardSpectroClustersUIDWorkloadsCronJobParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1DashboardSpectroClustersUidWorkloadsCronJob", + Method: "POST", + PathPattern: "/v1/dashboard/spectroclusters/{uid}/workloads/cronjob", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1DashboardSpectroClustersUIDWorkloadsCronJobReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1DashboardSpectroClustersUIDWorkloadsCronJobOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1DashboardSpectroClustersUidWorkloadsCronJob: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1DashboardSpectroClustersUIDWorkloadsDaemonSet retrieves specified cluster workload daemonsets +*/ +func (a *Client) V1DashboardSpectroClustersUIDWorkloadsDaemonSet(params *V1DashboardSpectroClustersUIDWorkloadsDaemonSetParams) (*V1DashboardSpectroClustersUIDWorkloadsDaemonSetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1DashboardSpectroClustersUIDWorkloadsDaemonSetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1DashboardSpectroClustersUidWorkloadsDaemonSet", + Method: "POST", + PathPattern: "/v1/dashboard/spectroclusters/{uid}/workloads/daemonset", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1DashboardSpectroClustersUIDWorkloadsDaemonSetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1DashboardSpectroClustersUIDWorkloadsDaemonSetOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1DashboardSpectroClustersUidWorkloadsDaemonSet: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1DashboardSpectroClustersUIDWorkloadsDeployment retrieves specified cluster workload deployments +*/ +func (a *Client) V1DashboardSpectroClustersUIDWorkloadsDeployment(params *V1DashboardSpectroClustersUIDWorkloadsDeploymentParams) (*V1DashboardSpectroClustersUIDWorkloadsDeploymentOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1DashboardSpectroClustersUIDWorkloadsDeploymentParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1DashboardSpectroClustersUidWorkloadsDeployment", + Method: "POST", + PathPattern: "/v1/dashboard/spectroclusters/{uid}/workloads/deployment", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1DashboardSpectroClustersUIDWorkloadsDeploymentReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1DashboardSpectroClustersUIDWorkloadsDeploymentOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1DashboardSpectroClustersUidWorkloadsDeployment: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1DashboardSpectroClustersUIDWorkloadsJob retrieves specified cluster workload jobs +*/ +func (a *Client) V1DashboardSpectroClustersUIDWorkloadsJob(params *V1DashboardSpectroClustersUIDWorkloadsJobParams) (*V1DashboardSpectroClustersUIDWorkloadsJobOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1DashboardSpectroClustersUIDWorkloadsJobParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1DashboardSpectroClustersUidWorkloadsJob", + Method: "POST", + PathPattern: "/v1/dashboard/spectroclusters/{uid}/workloads/job", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1DashboardSpectroClustersUIDWorkloadsJobReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1DashboardSpectroClustersUIDWorkloadsJobOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1DashboardSpectroClustersUidWorkloadsJob: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1DashboardSpectroClustersUIDWorkloadsNamespace retrieves specified cluster workload namespaces +*/ +func (a *Client) V1DashboardSpectroClustersUIDWorkloadsNamespace(params *V1DashboardSpectroClustersUIDWorkloadsNamespaceParams) (*V1DashboardSpectroClustersUIDWorkloadsNamespaceOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1DashboardSpectroClustersUIDWorkloadsNamespaceParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1DashboardSpectroClustersUidWorkloadsNamespace", + Method: "POST", + PathPattern: "/v1/dashboard/spectroclusters/{uid}/workloads/namespace", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1DashboardSpectroClustersUIDWorkloadsNamespaceReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1DashboardSpectroClustersUIDWorkloadsNamespaceOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1DashboardSpectroClustersUidWorkloadsNamespace: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1DashboardSpectroClustersUIDWorkloadsPod retrieves specified cluster workload pods +*/ +func (a *Client) V1DashboardSpectroClustersUIDWorkloadsPod(params *V1DashboardSpectroClustersUIDWorkloadsPodParams) (*V1DashboardSpectroClustersUIDWorkloadsPodOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1DashboardSpectroClustersUIDWorkloadsPodParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1DashboardSpectroClustersUidWorkloadsPod", + Method: "POST", + PathPattern: "/v1/dashboard/spectroclusters/{uid}/workloads/pod", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1DashboardSpectroClustersUIDWorkloadsPodReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1DashboardSpectroClustersUIDWorkloadsPodOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1DashboardSpectroClustersUidWorkloadsPod: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1DashboardSpectroClustersUIDWorkloadsRoleBinding retrieves specified cluster workload rolebindings +*/ +func (a *Client) V1DashboardSpectroClustersUIDWorkloadsRoleBinding(params *V1DashboardSpectroClustersUIDWorkloadsRoleBindingParams) (*V1DashboardSpectroClustersUIDWorkloadsRoleBindingOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1DashboardSpectroClustersUIDWorkloadsRoleBindingParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1DashboardSpectroClustersUidWorkloadsRoleBinding", + Method: "POST", + PathPattern: "/v1/dashboard/spectroclusters/{uid}/workloads/rolebinding", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1DashboardSpectroClustersUIDWorkloadsRoleBindingReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1DashboardSpectroClustersUIDWorkloadsRoleBindingOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1DashboardSpectroClustersUidWorkloadsRoleBinding: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1DashboardSpectroClustersUIDWorkloadsStatefulSet retrieves specified cluster workload statefulsets +*/ +func (a *Client) V1DashboardSpectroClustersUIDWorkloadsStatefulSet(params *V1DashboardSpectroClustersUIDWorkloadsStatefulSetParams) (*V1DashboardSpectroClustersUIDWorkloadsStatefulSetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1DashboardSpectroClustersUIDWorkloadsStatefulSetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1DashboardSpectroClustersUidWorkloadsStatefulSet", + Method: "POST", + PathPattern: "/v1/dashboard/spectroclusters/{uid}/workloads/statefulset", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1DashboardSpectroClustersUIDWorkloadsStatefulSetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1DashboardSpectroClustersUIDWorkloadsStatefulSetOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1DashboardSpectroClustersUidWorkloadsStatefulSet: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1DashboardWorkspacesList retrieves a list of workspace +*/ +func (a *Client) V1DashboardWorkspacesList(params *V1DashboardWorkspacesListParams) (*V1DashboardWorkspacesListOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1DashboardWorkspacesListParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1DashboardWorkspacesList", + Method: "GET", + PathPattern: "/v1/dashboard/workspaces", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1DashboardWorkspacesListReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1DashboardWorkspacesListOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1DashboardWorkspacesList: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1DashboardWorkspacesUIDSpectroClustersWorkloadsClusterRoleBinding retrieves specified workspace clusters workload clusterrolebindings +*/ +func (a *Client) V1DashboardWorkspacesUIDSpectroClustersWorkloadsClusterRoleBinding(params *V1DashboardWorkspacesUIDSpectroClustersWorkloadsClusterRoleBindingParams) (*V1DashboardWorkspacesUIDSpectroClustersWorkloadsClusterRoleBindingOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1DashboardWorkspacesUIDSpectroClustersWorkloadsClusterRoleBindingParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1DashboardWorkspacesUidSpectroClustersWorkloadsClusterRoleBinding", + Method: "POST", + PathPattern: "/v1/dashboard/workspaces/{uid}/spectroclusters/workloads/clusterrolebinding", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1DashboardWorkspacesUIDSpectroClustersWorkloadsClusterRoleBindingReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1DashboardWorkspacesUIDSpectroClustersWorkloadsClusterRoleBindingOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1DashboardWorkspacesUidSpectroClustersWorkloadsClusterRoleBinding: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1DashboardWorkspacesUIDSpectroClustersWorkloadsCronJob retrieves specified workspace clusters workload cronjobs +*/ +func (a *Client) V1DashboardWorkspacesUIDSpectroClustersWorkloadsCronJob(params *V1DashboardWorkspacesUIDSpectroClustersWorkloadsCronJobParams) (*V1DashboardWorkspacesUIDSpectroClustersWorkloadsCronJobOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1DashboardWorkspacesUIDSpectroClustersWorkloadsCronJobParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1DashboardWorkspacesUidSpectroClustersWorkloadsCronJob", + Method: "POST", + PathPattern: "/v1/dashboard/workspaces/{uid}/spectroclusters/workloads/cronjob", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1DashboardWorkspacesUIDSpectroClustersWorkloadsCronJobReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1DashboardWorkspacesUIDSpectroClustersWorkloadsCronJobOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1DashboardWorkspacesUidSpectroClustersWorkloadsCronJob: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1DashboardWorkspacesUIDSpectroClustersWorkloadsDaemonSet retrieves specified workspace clusters workload daemonsets +*/ +func (a *Client) V1DashboardWorkspacesUIDSpectroClustersWorkloadsDaemonSet(params *V1DashboardWorkspacesUIDSpectroClustersWorkloadsDaemonSetParams) (*V1DashboardWorkspacesUIDSpectroClustersWorkloadsDaemonSetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1DashboardWorkspacesUIDSpectroClustersWorkloadsDaemonSetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1DashboardWorkspacesUidSpectroClustersWorkloadsDaemonSet", + Method: "POST", + PathPattern: "/v1/dashboard/workspaces/{uid}/spectroclusters/workloads/daemonset", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1DashboardWorkspacesUIDSpectroClustersWorkloadsDaemonSetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1DashboardWorkspacesUIDSpectroClustersWorkloadsDaemonSetOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1DashboardWorkspacesUidSpectroClustersWorkloadsDaemonSet: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1DashboardWorkspacesUIDSpectroClustersWorkloadsDeployment retrieves specified workspace clusters workload deployments +*/ +func (a *Client) V1DashboardWorkspacesUIDSpectroClustersWorkloadsDeployment(params *V1DashboardWorkspacesUIDSpectroClustersWorkloadsDeploymentParams) (*V1DashboardWorkspacesUIDSpectroClustersWorkloadsDeploymentOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1DashboardWorkspacesUIDSpectroClustersWorkloadsDeploymentParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1DashboardWorkspacesUidSpectroClustersWorkloadsDeployment", + Method: "POST", + PathPattern: "/v1/dashboard/workspaces/{uid}/spectroclusters/workloads/deployment", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1DashboardWorkspacesUIDSpectroClustersWorkloadsDeploymentReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1DashboardWorkspacesUIDSpectroClustersWorkloadsDeploymentOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1DashboardWorkspacesUidSpectroClustersWorkloadsDeployment: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1DashboardWorkspacesUIDSpectroClustersWorkloadsJob retrieves specified workspace clusters workload jobs +*/ +func (a *Client) V1DashboardWorkspacesUIDSpectroClustersWorkloadsJob(params *V1DashboardWorkspacesUIDSpectroClustersWorkloadsJobParams) (*V1DashboardWorkspacesUIDSpectroClustersWorkloadsJobOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1DashboardWorkspacesUIDSpectroClustersWorkloadsJobParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1DashboardWorkspacesUidSpectroClustersWorkloadsJob", + Method: "POST", + PathPattern: "/v1/dashboard/workspaces/{uid}/spectroclusters/workloads/job", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1DashboardWorkspacesUIDSpectroClustersWorkloadsJobReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1DashboardWorkspacesUIDSpectroClustersWorkloadsJobOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1DashboardWorkspacesUidSpectroClustersWorkloadsJob: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1DashboardWorkspacesUIDSpectroClustersWorkloadsNamespace retrieves specified workspace clusters workload namespaces +*/ +func (a *Client) V1DashboardWorkspacesUIDSpectroClustersWorkloadsNamespace(params *V1DashboardWorkspacesUIDSpectroClustersWorkloadsNamespaceParams) (*V1DashboardWorkspacesUIDSpectroClustersWorkloadsNamespaceOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1DashboardWorkspacesUIDSpectroClustersWorkloadsNamespaceParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1DashboardWorkspacesUidSpectroClustersWorkloadsNamespace", + Method: "POST", + PathPattern: "/v1/dashboard/workspaces/{uid}/spectroclusters/workloads/namespace", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1DashboardWorkspacesUIDSpectroClustersWorkloadsNamespaceReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1DashboardWorkspacesUIDSpectroClustersWorkloadsNamespaceOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1DashboardWorkspacesUidSpectroClustersWorkloadsNamespace: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1DashboardWorkspacesUIDSpectroClustersWorkloadsPod retrieves specified workspace clusters workload pods +*/ +func (a *Client) V1DashboardWorkspacesUIDSpectroClustersWorkloadsPod(params *V1DashboardWorkspacesUIDSpectroClustersWorkloadsPodParams) (*V1DashboardWorkspacesUIDSpectroClustersWorkloadsPodOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1DashboardWorkspacesUIDSpectroClustersWorkloadsPodParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1DashboardWorkspacesUidSpectroClustersWorkloadsPod", + Method: "POST", + PathPattern: "/v1/dashboard/workspaces/{uid}/spectroclusters/workloads/pod", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1DashboardWorkspacesUIDSpectroClustersWorkloadsPodReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1DashboardWorkspacesUIDSpectroClustersWorkloadsPodOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1DashboardWorkspacesUidSpectroClustersWorkloadsPod: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1DashboardWorkspacesUIDSpectroClustersWorkloadsRoleBinding retrieves specified workspace clusters workload rolebindings +*/ +func (a *Client) V1DashboardWorkspacesUIDSpectroClustersWorkloadsRoleBinding(params *V1DashboardWorkspacesUIDSpectroClustersWorkloadsRoleBindingParams) (*V1DashboardWorkspacesUIDSpectroClustersWorkloadsRoleBindingOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1DashboardWorkspacesUIDSpectroClustersWorkloadsRoleBindingParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1DashboardWorkspacesUidSpectroClustersWorkloadsRoleBinding", + Method: "POST", + PathPattern: "/v1/dashboard/workspaces/{uid}/spectroclusters/workloads/rolebinding", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1DashboardWorkspacesUIDSpectroClustersWorkloadsRoleBindingReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1DashboardWorkspacesUIDSpectroClustersWorkloadsRoleBindingOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1DashboardWorkspacesUidSpectroClustersWorkloadsRoleBinding: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1DashboardWorkspacesUIDSpectroClustersWorkloadsStatefulSet retrieves specified workspace clusters workload statefulsets +*/ +func (a *Client) V1DashboardWorkspacesUIDSpectroClustersWorkloadsStatefulSet(params *V1DashboardWorkspacesUIDSpectroClustersWorkloadsStatefulSetParams) (*V1DashboardWorkspacesUIDSpectroClustersWorkloadsStatefulSetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1DashboardWorkspacesUIDSpectroClustersWorkloadsStatefulSetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1DashboardWorkspacesUidSpectroClustersWorkloadsStatefulSet", + Method: "POST", + PathPattern: "/v1/dashboard/workspaces/{uid}/spectroclusters/workloads/statefulset", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1DashboardWorkspacesUIDSpectroClustersWorkloadsStatefulSetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1DashboardWorkspacesUIDSpectroClustersWorkloadsStatefulSetOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1DashboardWorkspacesUidSpectroClustersWorkloadsStatefulSet: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1EcrRegistriesCreate creates a ecr registry +*/ +func (a *Client) V1EcrRegistriesCreate(params *V1EcrRegistriesCreateParams) (*V1EcrRegistriesCreateCreated, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1EcrRegistriesCreateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1EcrRegistriesCreate", + Method: "POST", + PathPattern: "/v1/registries/oci/ecr", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1EcrRegistriesCreateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1EcrRegistriesCreateCreated) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1EcrRegistriesCreate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1EcrRegistriesUIDDelete deletes the specified ecr registry +*/ +func (a *Client) V1EcrRegistriesUIDDelete(params *V1EcrRegistriesUIDDeleteParams) (*V1EcrRegistriesUIDDeleteNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1EcrRegistriesUIDDeleteParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1EcrRegistriesUidDelete", + Method: "DELETE", + PathPattern: "/v1/registries/oci/{uid}/ecr", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1EcrRegistriesUIDDeleteReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1EcrRegistriesUIDDeleteNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1EcrRegistriesUidDelete: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1EcrRegistriesUIDGet returns the specified ecr registry +*/ +func (a *Client) V1EcrRegistriesUIDGet(params *V1EcrRegistriesUIDGetParams) (*V1EcrRegistriesUIDGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1EcrRegistriesUIDGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1EcrRegistriesUidGet", + Method: "GET", + PathPattern: "/v1/registries/oci/{uid}/ecr", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1EcrRegistriesUIDGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1EcrRegistriesUIDGetOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1EcrRegistriesUidGet: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1EcrRegistriesUIDSync syncs ecr registry + +Sync all the content from the ecr registry +*/ +func (a *Client) V1EcrRegistriesUIDSync(params *V1EcrRegistriesUIDSyncParams) (*V1EcrRegistriesUIDSyncAccepted, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1EcrRegistriesUIDSyncParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1EcrRegistriesUidSync", + Method: "POST", + PathPattern: "/v1/registries/oci/{uid}/ecr/sync", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1EcrRegistriesUIDSyncReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1EcrRegistriesUIDSyncAccepted) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1EcrRegistriesUidSync: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1EcrRegistriesUIDSyncStatus gets ecr registry sync status + +Get sync status for the ecr specified registry +*/ +func (a *Client) V1EcrRegistriesUIDSyncStatus(params *V1EcrRegistriesUIDSyncStatusParams) (*V1EcrRegistriesUIDSyncStatusOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1EcrRegistriesUIDSyncStatusParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1EcrRegistriesUidSyncStatus", + Method: "GET", + PathPattern: "/v1/registries/oci/{uid}/ecr/sync/status", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1EcrRegistriesUIDSyncStatusReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1EcrRegistriesUIDSyncStatusOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1EcrRegistriesUidSyncStatus: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1EcrRegistriesUIDUpdate updates the specified ecr registry +*/ +func (a *Client) V1EcrRegistriesUIDUpdate(params *V1EcrRegistriesUIDUpdateParams) (*V1EcrRegistriesUIDUpdateNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1EcrRegistriesUIDUpdateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1EcrRegistriesUidUpdate", + Method: "PUT", + PathPattern: "/v1/registries/oci/{uid}/ecr", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1EcrRegistriesUIDUpdateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1EcrRegistriesUIDUpdateNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1EcrRegistriesUidUpdate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1EcrRegistriesValidate checks if ecr registry is valid + +Returns no contents if ecr registry is valid else error. +*/ +func (a *Client) V1EcrRegistriesValidate(params *V1EcrRegistriesValidateParams) (*V1EcrRegistriesValidateNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1EcrRegistriesValidateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1EcrRegistriesValidate", + Method: "POST", + PathPattern: "/v1/registries/oci/ecr/validate", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1EcrRegistriesValidateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1EcrRegistriesValidateNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1EcrRegistriesValidate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1EdgeHostDeviceHostCheckSumUpdate updates the specified edge host device host check sum +*/ +func (a *Client) V1EdgeHostDeviceHostCheckSumUpdate(params *V1EdgeHostDeviceHostCheckSumUpdateParams) (*V1EdgeHostDeviceHostCheckSumUpdateNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1EdgeHostDeviceHostCheckSumUpdateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1EdgeHostDeviceHostCheckSumUpdate", + Method: "PATCH", + PathPattern: "/v1/edgehosts/{uid}/hostCheckSum", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1EdgeHostDeviceHostCheckSumUpdateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1EdgeHostDeviceHostCheckSumUpdateNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1EdgeHostDeviceHostCheckSumUpdate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1EdgeHostDeviceHostPairingKeyUpdate updates the specified edge host device host pairing key +*/ +func (a *Client) V1EdgeHostDeviceHostPairingKeyUpdate(params *V1EdgeHostDeviceHostPairingKeyUpdateParams) (*V1EdgeHostDeviceHostPairingKeyUpdateNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1EdgeHostDeviceHostPairingKeyUpdateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1EdgeHostDeviceHostPairingKeyUpdate", + Method: "PATCH", + PathPattern: "/v1/edgehosts/{uid}/hostPairingKey", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1EdgeHostDeviceHostPairingKeyUpdateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1EdgeHostDeviceHostPairingKeyUpdateNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1EdgeHostDeviceHostPairingKeyUpdate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1EdgeHostDevicesCreate creates the edge host device +*/ +func (a *Client) V1EdgeHostDevicesCreate(params *V1EdgeHostDevicesCreateParams) (*V1EdgeHostDevicesCreateCreated, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1EdgeHostDevicesCreateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1EdgeHostDevicesCreate", + Method: "POST", + PathPattern: "/v1/edgehosts", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1EdgeHostDevicesCreateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1EdgeHostDevicesCreateCreated) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1EdgeHostDevicesCreate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1EdgeHostDevicesHealthUpdate updates the edge host health +*/ +func (a *Client) V1EdgeHostDevicesHealthUpdate(params *V1EdgeHostDevicesHealthUpdateParams) (*V1EdgeHostDevicesHealthUpdateNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1EdgeHostDevicesHealthUpdateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1EdgeHostDevicesHealthUpdate", + Method: "PATCH", + PathPattern: "/v1/edgehosts/{uid}/health", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1EdgeHostDevicesHealthUpdateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1EdgeHostDevicesHealthUpdateNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1EdgeHostDevicesHealthUpdate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1EdgeHostDevicesRegister registers the edge host device +*/ +func (a *Client) V1EdgeHostDevicesRegister(params *V1EdgeHostDevicesRegisterParams) (*V1EdgeHostDevicesRegisterOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1EdgeHostDevicesRegisterParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1EdgeHostDevicesRegister", + Method: "POST", + PathPattern: "/v1/edgehosts/register", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1EdgeHostDevicesRegisterReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1EdgeHostDevicesRegisterOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1EdgeHostDevicesRegister: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1EdgeHostDevicesUIDClusterAssociate associates the clusters to the edge host +*/ +func (a *Client) V1EdgeHostDevicesUIDClusterAssociate(params *V1EdgeHostDevicesUIDClusterAssociateParams) (*V1EdgeHostDevicesUIDClusterAssociateNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1EdgeHostDevicesUIDClusterAssociateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1EdgeHostDevicesUidClusterAssociate", + Method: "PATCH", + PathPattern: "/v1/edgehosts/{uid}/cluster/associate", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1EdgeHostDevicesUIDClusterAssociateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1EdgeHostDevicesUIDClusterAssociateNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1EdgeHostDevicesUidClusterAssociate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1EdgeHostDevicesUIDClusterDeassociate deassociates the clusters to the edge host +*/ +func (a *Client) V1EdgeHostDevicesUIDClusterDeassociate(params *V1EdgeHostDevicesUIDClusterDeassociateParams) (*V1EdgeHostDevicesUIDClusterDeassociateNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1EdgeHostDevicesUIDClusterDeassociateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1EdgeHostDevicesUidClusterDeassociate", + Method: "DELETE", + PathPattern: "/v1/edgehosts/{uid}/cluster/associate", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1EdgeHostDevicesUIDClusterDeassociateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1EdgeHostDevicesUIDClusterDeassociateNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1EdgeHostDevicesUidClusterDeassociate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1EdgeHostDevicesUIDDelete deletes the specified edge host device +*/ +func (a *Client) V1EdgeHostDevicesUIDDelete(params *V1EdgeHostDevicesUIDDeleteParams) (*V1EdgeHostDevicesUIDDeleteNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1EdgeHostDevicesUIDDeleteParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1EdgeHostDevicesUidDelete", + Method: "DELETE", + PathPattern: "/v1/edgehosts/{uid}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1EdgeHostDevicesUIDDeleteReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1EdgeHostDevicesUIDDeleteNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1EdgeHostDevicesUidDelete: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1EdgeHostDevicesUIDGet returns the specified edge host device +*/ +func (a *Client) V1EdgeHostDevicesUIDGet(params *V1EdgeHostDevicesUIDGetParams) (*V1EdgeHostDevicesUIDGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1EdgeHostDevicesUIDGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1EdgeHostDevicesUidGet", + Method: "GET", + PathPattern: "/v1/edgehosts/{uid}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1EdgeHostDevicesUIDGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1EdgeHostDevicesUIDGetOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1EdgeHostDevicesUidGet: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1EdgeHostDevicesUIDMetaUpdate updates the specified edge host device meta +*/ +func (a *Client) V1EdgeHostDevicesUIDMetaUpdate(params *V1EdgeHostDevicesUIDMetaUpdateParams) (*V1EdgeHostDevicesUIDMetaUpdateNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1EdgeHostDevicesUIDMetaUpdateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1EdgeHostDevicesUidMetaUpdate", + Method: "PUT", + PathPattern: "/v1/edgehosts/{uid}/meta", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1EdgeHostDevicesUIDMetaUpdateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1EdgeHostDevicesUIDMetaUpdateNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1EdgeHostDevicesUidMetaUpdate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1EdgeHostDevicesUIDPackManifestsUIDGet returns the specified edge host s manifest +*/ +func (a *Client) V1EdgeHostDevicesUIDPackManifestsUIDGet(params *V1EdgeHostDevicesUIDPackManifestsUIDGetParams) (*V1EdgeHostDevicesUIDPackManifestsUIDGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1EdgeHostDevicesUIDPackManifestsUIDGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1EdgeHostDevicesUidPackManifestsUidGet", + Method: "GET", + PathPattern: "/v1/edgehosts/{uid}/pack/manifests/{manifestUid}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1EdgeHostDevicesUIDPackManifestsUIDGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1EdgeHostDevicesUIDPackManifestsUIDGetOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1EdgeHostDevicesUidPackManifestsUidGet: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1EdgeHostDevicesUIDPacksStatusPatch patches update specified edge host s packs status +*/ +func (a *Client) V1EdgeHostDevicesUIDPacksStatusPatch(params *V1EdgeHostDevicesUIDPacksStatusPatchParams) (*V1EdgeHostDevicesUIDPacksStatusPatchNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1EdgeHostDevicesUIDPacksStatusPatchParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1EdgeHostDevicesUidPacksStatusPatch", + Method: "PATCH", + PathPattern: "/v1/edgehosts/{uid}/packs/status", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1EdgeHostDevicesUIDPacksStatusPatchReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1EdgeHostDevicesUIDPacksStatusPatchNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1EdgeHostDevicesUidPacksStatusPatch: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1EdgeHostDevicesUIDProfilesGet returns the associated profiles of a specified edge host device +*/ +func (a *Client) V1EdgeHostDevicesUIDProfilesGet(params *V1EdgeHostDevicesUIDProfilesGetParams) (*V1EdgeHostDevicesUIDProfilesGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1EdgeHostDevicesUIDProfilesGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1EdgeHostDevicesUidProfilesGet", + Method: "GET", + PathPattern: "/v1/edgehosts/{uid}/profiles", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1EdgeHostDevicesUIDProfilesGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1EdgeHostDevicesUIDProfilesGetOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1EdgeHostDevicesUidProfilesGet: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1EdgeHostDevicesUIDProfilesUpdate associates cluster profiles to the specified edge host device +*/ +func (a *Client) V1EdgeHostDevicesUIDProfilesUpdate(params *V1EdgeHostDevicesUIDProfilesUpdateParams) (*V1EdgeHostDevicesUIDProfilesUpdateNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1EdgeHostDevicesUIDProfilesUpdateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1EdgeHostDevicesUidProfilesUpdate", + Method: "PUT", + PathPattern: "/v1/edgehosts/{uid}/profiles", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1EdgeHostDevicesUIDProfilesUpdateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1EdgeHostDevicesUIDProfilesUpdateNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1EdgeHostDevicesUidProfilesUpdate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1EdgeHostDevicesUIDSpcDownload downloads the specified edge host device spc +*/ +func (a *Client) V1EdgeHostDevicesUIDSpcDownload(params *V1EdgeHostDevicesUIDSpcDownloadParams, writer io.Writer) (*V1EdgeHostDevicesUIDSpcDownloadOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1EdgeHostDevicesUIDSpcDownloadParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1EdgeHostDevicesUidSpcDownload", + Method: "GET", + PathPattern: "/v1/edgehosts/{uid}/spc/download", + ProducesMediaTypes: []string{"application/octet-stream"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1EdgeHostDevicesUIDSpcDownloadReader{formats: a.formats, writer: writer}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1EdgeHostDevicesUIDSpcDownloadOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1EdgeHostDevicesUidSpcDownload: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1EdgeHostDevicesUIDUpdate updates the specified edge host device +*/ +func (a *Client) V1EdgeHostDevicesUIDUpdate(params *V1EdgeHostDevicesUIDUpdateParams) (*V1EdgeHostDevicesUIDUpdateNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1EdgeHostDevicesUIDUpdateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1EdgeHostDevicesUidUpdate", + Method: "PUT", + PathPattern: "/v1/edgehosts/{uid}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1EdgeHostDevicesUIDUpdateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1EdgeHostDevicesUIDUpdateNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1EdgeHostDevicesUidUpdate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1EdgeHostDevicesUIDVspherePropertiesUpdate updates the specified edge host device vsphere properties +*/ +func (a *Client) V1EdgeHostDevicesUIDVspherePropertiesUpdate(params *V1EdgeHostDevicesUIDVspherePropertiesUpdateParams) (*V1EdgeHostDevicesUIDVspherePropertiesUpdateNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1EdgeHostDevicesUIDVspherePropertiesUpdateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1EdgeHostDevicesUidVspherePropertiesUpdate", + Method: "PUT", + PathPattern: "/v1/edgehosts/{uid}/vsphere/properties", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1EdgeHostDevicesUIDVspherePropertiesUpdateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1EdgeHostDevicesUIDVspherePropertiesUpdateNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1EdgeHostDevicesUidVspherePropertiesUpdate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1EdgeHostsMetadata retrieves a list of edgehosts summary +*/ +func (a *Client) V1EdgeHostsMetadata(params *V1EdgeHostsMetadataParams) (*V1EdgeHostsMetadataOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1EdgeHostsMetadataParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1EdgeHostsMetadata", + Method: "POST", + PathPattern: "/v1/dashboard/appliances/metadata", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1EdgeHostsMetadataReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1EdgeHostsMetadataOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1EdgeHostsMetadata: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1EdgeHostsMetadataQuickFilterGet retrieves a list of edge hosts metadata matching the filter condition +*/ +func (a *Client) V1EdgeHostsMetadataQuickFilterGet(params *V1EdgeHostsMetadataQuickFilterGetParams) (*V1EdgeHostsMetadataQuickFilterGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1EdgeHostsMetadataQuickFilterGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1EdgeHostsMetadataQuickFilterGet", + Method: "GET", + PathPattern: "/v1/edgehosts/metadata", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1EdgeHostsMetadataQuickFilterGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1EdgeHostsMetadataQuickFilterGetOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1EdgeHostsMetadataQuickFilterGet: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1EdgeHostsTagsGet retrieves a list of edge hosts tags +*/ +func (a *Client) V1EdgeHostsTagsGet(params *V1EdgeHostsTagsGetParams) (*V1EdgeHostsTagsGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1EdgeHostsTagsGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1EdgeHostsTagsGet", + Method: "GET", + PathPattern: "/v1/edgehosts/tags", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1EdgeHostsTagsGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1EdgeHostsTagsGetOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1EdgeHostsTagsGet: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1EdgeNativeClustersHostsList retrieves a list of edge host of edge native cluster +*/ +func (a *Client) V1EdgeNativeClustersHostsList(params *V1EdgeNativeClustersHostsListParams) (*V1EdgeNativeClustersHostsListOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1EdgeNativeClustersHostsListParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1EdgeNativeClustersHostsList", + Method: "GET", + PathPattern: "/v1/spectroclusters/{uid}/edge-native/edgeHosts", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1EdgeNativeClustersHostsListReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1EdgeNativeClustersHostsListOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1EdgeNativeClustersHostsList: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1EdgeTokensCreate creates the edge token +*/ +func (a *Client) V1EdgeTokensCreate(params *V1EdgeTokensCreateParams) (*V1EdgeTokensCreateCreated, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1EdgeTokensCreateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1EdgeTokensCreate", + Method: "POST", + PathPattern: "/v1/edgehosts/tokens", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1EdgeTokensCreateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1EdgeTokensCreateCreated) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1EdgeTokensCreate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1EdgeTokensList retrieves a list of edge tokens +*/ +func (a *Client) V1EdgeTokensList(params *V1EdgeTokensListParams) (*V1EdgeTokensListOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1EdgeTokensListParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1EdgeTokensList", + Method: "GET", + PathPattern: "/v1/edgehosts/tokens", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1EdgeTokensListReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1EdgeTokensListOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1EdgeTokensList: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1EdgeTokensUIDDelete deletes the specified edge token +*/ +func (a *Client) V1EdgeTokensUIDDelete(params *V1EdgeTokensUIDDeleteParams) (*V1EdgeTokensUIDDeleteNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1EdgeTokensUIDDeleteParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1EdgeTokensUidDelete", + Method: "DELETE", + PathPattern: "/v1/edgehosts/tokens/{uid}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1EdgeTokensUIDDeleteReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1EdgeTokensUIDDeleteNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1EdgeTokensUidDelete: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1EdgeTokensUIDGet returns the specified edge token +*/ +func (a *Client) V1EdgeTokensUIDGet(params *V1EdgeTokensUIDGetParams) (*V1EdgeTokensUIDGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1EdgeTokensUIDGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1EdgeTokensUidGet", + Method: "GET", + PathPattern: "/v1/edgehosts/tokens/{uid}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1EdgeTokensUIDGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1EdgeTokensUIDGetOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1EdgeTokensUidGet: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1EdgeTokensUIDState revokes or re activate the edge token access +*/ +func (a *Client) V1EdgeTokensUIDState(params *V1EdgeTokensUIDStateParams) (*V1EdgeTokensUIDStateNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1EdgeTokensUIDStateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1EdgeTokensUidState", + Method: "PUT", + PathPattern: "/v1/edgehosts/tokens/{uid}/state", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1EdgeTokensUIDStateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1EdgeTokensUIDStateNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1EdgeTokensUidState: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1EdgeTokensUIDUpdate updates the specified edge token +*/ +func (a *Client) V1EdgeTokensUIDUpdate(params *V1EdgeTokensUIDUpdateParams) (*V1EdgeTokensUIDUpdateNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1EdgeTokensUIDUpdateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1EdgeTokensUidUpdate", + Method: "PUT", + PathPattern: "/v1/edgehosts/tokens/{uid}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1EdgeTokensUIDUpdateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1EdgeTokensUIDUpdateNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1EdgeTokensUidUpdate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1EventsComponentsCreate creates a component event + +Creates a component event +*/ +func (a *Client) V1EventsComponentsCreate(params *V1EventsComponentsCreateParams) (*V1EventsComponentsCreateCreated, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1EventsComponentsCreateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1EventsComponentsCreate", + Method: "POST", + PathPattern: "/v1/events/components", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1EventsComponentsCreateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1EventsComponentsCreateCreated) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1EventsComponentsCreate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1EventsComponentsCreateBulk creates the component events in bulk + +Creates the component events in bulk +*/ +func (a *Client) V1EventsComponentsCreateBulk(params *V1EventsComponentsCreateBulkParams) (*V1EventsComponentsCreateBulkCreated, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1EventsComponentsCreateBulkParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1EventsComponentsCreateBulk", + Method: "POST", + PathPattern: "/v1/events/components/bulk", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1EventsComponentsCreateBulkReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1EventsComponentsCreateBulkCreated) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1EventsComponentsCreateBulk: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1EventsComponentsList returns a paginated list of component events based on request parameters + +Returns a paginated list of component events based on request parameters +*/ +func (a *Client) V1EventsComponentsList(params *V1EventsComponentsListParams) (*V1EventsComponentsListOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1EventsComponentsListParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1EventsComponentsList", + Method: "GET", + PathPattern: "/v1/events/components", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1EventsComponentsListReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1EventsComponentsListOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1EventsComponentsList: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1EventsComponentsObjTypeUIDDelete deletes all the components events for the specified related object +*/ +func (a *Client) V1EventsComponentsObjTypeUIDDelete(params *V1EventsComponentsObjTypeUIDDeleteParams) (*V1EventsComponentsObjTypeUIDDeleteNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1EventsComponentsObjTypeUIDDeleteParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1EventsComponentsObjTypeUidDelete", + Method: "DELETE", + PathPattern: "/v1/events/components/{objectKind}/{objectUid}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1EventsComponentsObjTypeUIDDeleteReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1EventsComponentsObjTypeUIDDeleteNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1EventsComponentsObjTypeUidDelete: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1EventsComponentsObjTypeUIDList returns a list of components events for the specified related object + +Returns a list of components events for the specified related object +*/ +func (a *Client) V1EventsComponentsObjTypeUIDList(params *V1EventsComponentsObjTypeUIDListParams) (*V1EventsComponentsObjTypeUIDListOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1EventsComponentsObjTypeUIDListParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1EventsComponentsObjTypeUidList", + Method: "GET", + PathPattern: "/v1/events/components/{objectKind}/{objectUid}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1EventsComponentsObjTypeUIDListReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1EventsComponentsObjTypeUIDListOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1EventsComponentsObjTypeUidList: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1FeaturesList retrieves the list of features +*/ +func (a *Client) V1FeaturesList(params *V1FeaturesListParams) (*V1FeaturesListOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1FeaturesListParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1FeaturesList", + Method: "GET", + PathPattern: "/v1/features", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1FeaturesListReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1FeaturesListOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1FeaturesList: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1FeaturesUpdate updates a feature +*/ +func (a *Client) V1FeaturesUpdate(params *V1FeaturesUpdateParams) (*V1FeaturesUpdateNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1FeaturesUpdateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1FeaturesUpdate", + Method: "PUT", + PathPattern: "/v1/features/{uid}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1FeaturesUpdateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1FeaturesUpdateNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1FeaturesUpdate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1FiltersList returns a list of filters +*/ +func (a *Client) V1FiltersList(params *V1FiltersListParams) (*V1FiltersListOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1FiltersListParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1FiltersList", + Method: "GET", + PathPattern: "/v1/filters", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1FiltersListReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1FiltersListOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1FiltersList: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1FiltersMetadata returns a list of filters metadata +*/ +func (a *Client) V1FiltersMetadata(params *V1FiltersMetadataParams) (*V1FiltersMetadataOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1FiltersMetadataParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1FiltersMetadata", + Method: "GET", + PathPattern: "/v1/filters/metadata", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1FiltersMetadataReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1FiltersMetadataOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1FiltersMetadata: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1InvoicesUIDGet returns a specified invoice +*/ +func (a *Client) V1InvoicesUIDGet(params *V1InvoicesUIDGetParams) (*V1InvoicesUIDGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1InvoicesUIDGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1InvoicesUidGet", + Method: "GET", + PathPattern: "/v1/tenants/{tenantUid}/invoices/{invoiceUid}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1InvoicesUIDGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1InvoicesUIDGetOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1InvoicesUidGet: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1MaasAccountsUIDAzs gets the maas azs for a given account +*/ +func (a *Client) V1MaasAccountsUIDAzs(params *V1MaasAccountsUIDAzsParams) (*V1MaasAccountsUIDAzsOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1MaasAccountsUIDAzsParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1MaasAccountsUidAzs", + Method: "GET", + PathPattern: "/v1/cloudaccounts/maas/{uid}/properties/azs", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1MaasAccountsUIDAzsReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1MaasAccountsUIDAzsOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1MaasAccountsUidAzs: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1MaasAccountsUIDDomains gets the maas domains for a given account +*/ +func (a *Client) V1MaasAccountsUIDDomains(params *V1MaasAccountsUIDDomainsParams) (*V1MaasAccountsUIDDomainsOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1MaasAccountsUIDDomainsParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1MaasAccountsUidDomains", + Method: "GET", + PathPattern: "/v1/cloudaccounts/maas/{uid}/properties/domains", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1MaasAccountsUIDDomainsReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1MaasAccountsUIDDomainsOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1MaasAccountsUidDomains: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1MaasAccountsUIDPools gets the maas pools for a given account +*/ +func (a *Client) V1MaasAccountsUIDPools(params *V1MaasAccountsUIDPoolsParams) (*V1MaasAccountsUIDPoolsOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1MaasAccountsUIDPoolsParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1MaasAccountsUidPools", + Method: "GET", + PathPattern: "/v1/cloudaccounts/maas/{uid}/properties/resourcePools", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1MaasAccountsUIDPoolsReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1MaasAccountsUIDPoolsOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1MaasAccountsUidPools: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1MaasAccountsUIDSubnets gets the maas subnets for a given account +*/ +func (a *Client) V1MaasAccountsUIDSubnets(params *V1MaasAccountsUIDSubnetsParams) (*V1MaasAccountsUIDSubnetsOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1MaasAccountsUIDSubnetsParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1MaasAccountsUidSubnets", + Method: "GET", + PathPattern: "/v1/cloudaccounts/maas/{uid}/properties/subnets", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1MaasAccountsUIDSubnetsReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1MaasAccountsUIDSubnetsOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1MaasAccountsUidSubnets: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1MaasAccountsUIDTags gets the maas tags for a given account +*/ +func (a *Client) V1MaasAccountsUIDTags(params *V1MaasAccountsUIDTagsParams) (*V1MaasAccountsUIDTagsOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1MaasAccountsUIDTagsParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1MaasAccountsUidTags", + Method: "GET", + PathPattern: "/v1/cloudaccounts/maas/{uid}/properties/tags", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1MaasAccountsUIDTagsReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1MaasAccountsUIDTagsOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1MaasAccountsUidTags: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1MacrosList retrieves a list of macros +*/ +func (a *Client) V1MacrosList(params *V1MacrosListParams) (*V1MacrosListOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1MacrosListParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1MacrosList", + Method: "GET", + PathPattern: "/v1/clusterprofiles/macros", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1MacrosListReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1MacrosListOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1MacrosList: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1MetricsList retrieves the list of metrics for a specified resource kind + +Returns all the metrics for a given resource kind +*/ +func (a *Client) V1MetricsList(params *V1MetricsListParams) (*V1MetricsListOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1MetricsListParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1MetricsList", + Method: "GET", + PathPattern: "/v1/metrics/{resourceKind}/values", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1MetricsListReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1MetricsListOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1MetricsList: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1MetricsUIDDelete deletes the metrics of the specified resource +*/ +func (a *Client) V1MetricsUIDDelete(params *V1MetricsUIDDeleteParams) (*V1MetricsUIDDeleteNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1MetricsUIDDeleteParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1MetricsUidDelete", + Method: "DELETE", + PathPattern: "/v1/metrics/{resourceKind}/{resourceUid}/values", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1MetricsUIDDeleteReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1MetricsUIDDeleteNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1MetricsUidDelete: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1MetricsUIDList returns the metrics for a specified resource uid +*/ +func (a *Client) V1MetricsUIDList(params *V1MetricsUIDListParams) (*V1MetricsUIDListOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1MetricsUIDListParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1MetricsUidList", + Method: "GET", + PathPattern: "/v1/metrics/{resourceKind}/{resourceUid}/values", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1MetricsUIDListReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1MetricsUIDListOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1MetricsUidList: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1NotificationsEventCreate creates a notification event + +Creates a notification event +*/ +func (a *Client) V1NotificationsEventCreate(params *V1NotificationsEventCreateParams) (*V1NotificationsEventCreateCreated, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1NotificationsEventCreateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1NotificationsEventCreate", + Method: "POST", + PathPattern: "/v1/notifications/events", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1NotificationsEventCreateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1NotificationsEventCreateCreated) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1NotificationsEventCreate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1NotificationsList returns a paginated list of notifications based on request parameters + +Returns a paginated list of notifications based on request parameters +*/ +func (a *Client) V1NotificationsList(params *V1NotificationsListParams) (*V1NotificationsListOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1NotificationsListParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1NotificationsList", + Method: "GET", + PathPattern: "/v1/notifications/", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1NotificationsListReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1NotificationsListOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1NotificationsList: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1NotificationsObjTypeUIDList returns a list of notifications for the specified related object + +Returns a list of notifications for the specified related object +*/ +func (a *Client) V1NotificationsObjTypeUIDList(params *V1NotificationsObjTypeUIDListParams) (*V1NotificationsObjTypeUIDListOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1NotificationsObjTypeUIDListParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1NotificationsObjTypeUidList", + Method: "GET", + PathPattern: "/v1/notifications/{objectKind}/{objectUid}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1NotificationsObjTypeUIDListReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1NotificationsObjTypeUIDListOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1NotificationsObjTypeUidList: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1NotificationsUIDAck updates the specified notification for the acknowledgment + +Updates the specified notification for the acknowledgment +*/ +func (a *Client) V1NotificationsUIDAck(params *V1NotificationsUIDAckParams) (*V1NotificationsUIDAckNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1NotificationsUIDAckParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1NotificationsUidAck", + Method: "PATCH", + PathPattern: "/v1/notifications/{uid}/ack", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1NotificationsUIDAckReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1NotificationsUIDAckNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1NotificationsUidAck: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1NotificationsUIDDone updates the specified notification action as done + +Updates the specified notification action as done +*/ +func (a *Client) V1NotificationsUIDDone(params *V1NotificationsUIDDoneParams) (*V1NotificationsUIDDoneNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1NotificationsUIDDoneParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1NotificationsUidDone", + Method: "PATCH", + PathPattern: "/v1/notifications/{uid}/done", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1NotificationsUIDDoneReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1NotificationsUIDDoneNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1NotificationsUidDone: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1OciImageRegistryGet creates a image registry +*/ +func (a *Client) V1OciImageRegistryGet(params *V1OciImageRegistryGetParams) (*V1OciImageRegistryGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1OciImageRegistryGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1OciImageRegistryGet", + Method: "GET", + PathPattern: "/v1/registries/oci/image", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1OciImageRegistryGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1OciImageRegistryGetOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1OciImageRegistryGet: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1OciRegistriesGet returns the information of specified oci registry +*/ +func (a *Client) V1OciRegistriesGet(params *V1OciRegistriesGetParams) (*V1OciRegistriesGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1OciRegistriesGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1OciRegistriesGet", + Method: "GET", + PathPattern: "/v1/registries/oci/{uid}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1OciRegistriesGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1OciRegistriesGetOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1OciRegistriesGet: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1OciRegistriesSummary retrieves a oci registries summary +*/ +func (a *Client) V1OciRegistriesSummary(params *V1OciRegistriesSummaryParams) (*V1OciRegistriesSummaryOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1OciRegistriesSummaryParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1OciRegistriesSummary", + Method: "GET", + PathPattern: "/v1/registries/oci/summary", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1OciRegistriesSummaryReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1OciRegistriesSummaryOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1OciRegistriesSummary: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1OpenstackAccountsUIDAzs gets the openstack azs for a given account and region +*/ +func (a *Client) V1OpenstackAccountsUIDAzs(params *V1OpenstackAccountsUIDAzsParams) (*V1OpenstackAccountsUIDAzsOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1OpenstackAccountsUIDAzsParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1OpenstackAccountsUidAzs", + Method: "GET", + PathPattern: "/v1/cloudaccounts/openstack/{uid}/properties/azs", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1OpenstackAccountsUIDAzsReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1OpenstackAccountsUIDAzsOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1OpenstackAccountsUidAzs: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1OpenstackAccountsUIDFlavors gets the openstack keypairs for a given account and scope +*/ +func (a *Client) V1OpenstackAccountsUIDFlavors(params *V1OpenstackAccountsUIDFlavorsParams) (*V1OpenstackAccountsUIDFlavorsOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1OpenstackAccountsUIDFlavorsParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1OpenstackAccountsUidFlavors", + Method: "GET", + PathPattern: "/v1/cloudaccounts/openstack/{uid}/properties/flavors", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1OpenstackAccountsUIDFlavorsReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1OpenstackAccountsUIDFlavorsOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1OpenstackAccountsUidFlavors: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1OpenstackAccountsUIDKeypairs gets the openstack keypairs for a given account and scope +*/ +func (a *Client) V1OpenstackAccountsUIDKeypairs(params *V1OpenstackAccountsUIDKeypairsParams) (*V1OpenstackAccountsUIDKeypairsOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1OpenstackAccountsUIDKeypairsParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1OpenstackAccountsUidKeypairs", + Method: "GET", + PathPattern: "/v1/cloudaccounts/openstack/{uid}/properties/keypairs", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1OpenstackAccountsUIDKeypairsReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1OpenstackAccountsUIDKeypairsOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1OpenstackAccountsUidKeypairs: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1OpenstackAccountsUIDNetworks gets the openstack networks for a given account and scope +*/ +func (a *Client) V1OpenstackAccountsUIDNetworks(params *V1OpenstackAccountsUIDNetworksParams) (*V1OpenstackAccountsUIDNetworksOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1OpenstackAccountsUIDNetworksParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1OpenstackAccountsUidNetworks", + Method: "GET", + PathPattern: "/v1/cloudaccounts/openstack/{uid}/properties/networks", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1OpenstackAccountsUIDNetworksReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1OpenstackAccountsUIDNetworksOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1OpenstackAccountsUidNetworks: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1OpenstackAccountsUIDProjects gets the openstack projects for a given account +*/ +func (a *Client) V1OpenstackAccountsUIDProjects(params *V1OpenstackAccountsUIDProjectsParams) (*V1OpenstackAccountsUIDProjectsOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1OpenstackAccountsUIDProjectsParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1OpenstackAccountsUidProjects", + Method: "GET", + PathPattern: "/v1/cloudaccounts/openstack/{uid}/properties/projects", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1OpenstackAccountsUIDProjectsReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1OpenstackAccountsUIDProjectsOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1OpenstackAccountsUidProjects: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1OpenstackAccountsUIDRegions gets the openstack regions for a given account +*/ +func (a *Client) V1OpenstackAccountsUIDRegions(params *V1OpenstackAccountsUIDRegionsParams) (*V1OpenstackAccountsUIDRegionsOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1OpenstackAccountsUIDRegionsParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1OpenstackAccountsUidRegions", + Method: "GET", + PathPattern: "/v1/cloudaccounts/openstack/{uid}/properties/regions", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1OpenstackAccountsUIDRegionsReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1OpenstackAccountsUIDRegionsOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1OpenstackAccountsUidRegions: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1OverlordsList retrieves a list of overlords owned by the tenant +*/ +func (a *Client) V1OverlordsList(params *V1OverlordsListParams) (*V1OverlordsListOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1OverlordsListParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1OverlordsList", + Method: "GET", + PathPattern: "/v1/overlords", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1OverlordsListReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1OverlordsListOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1OverlordsList: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1OverlordsOpenStackManifest returns the manifests required for the private gateway installation +*/ +func (a *Client) V1OverlordsOpenStackManifest(params *V1OverlordsOpenStackManifestParams) (*V1OverlordsOpenStackManifestOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1OverlordsOpenStackManifestParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1OverlordsOpenStackManifest", + Method: "GET", + PathPattern: "/v1/overlords/openstack/manifest", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1OverlordsOpenStackManifestReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1OverlordsOpenStackManifestOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1OverlordsOpenStackManifest: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1OverlordsPairingCode returns the pairing code for the private gateway +*/ +func (a *Client) V1OverlordsPairingCode(params *V1OverlordsPairingCodeParams) (*V1OverlordsPairingCodeOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1OverlordsPairingCodeParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1OverlordsPairingCode", + Method: "GET", + PathPattern: "/v1/overlords/pairing/code", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1OverlordsPairingCodeReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1OverlordsPairingCodeOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1OverlordsPairingCode: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1OverlordsUIDDelete deletes the private gateway +*/ +func (a *Client) V1OverlordsUIDDelete(params *V1OverlordsUIDDeleteParams) (*V1OverlordsUIDDeleteOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1OverlordsUIDDeleteParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1OverlordsUidDelete", + Method: "DELETE", + PathPattern: "/v1/overlords/{uid}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1OverlordsUIDDeleteReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1OverlordsUIDDeleteOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1OverlordsUidDelete: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1OverlordsUIDGet returns the specified private gateway s for the given uid +*/ +func (a *Client) V1OverlordsUIDGet(params *V1OverlordsUIDGetParams) (*V1OverlordsUIDGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1OverlordsUIDGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1OverlordsUidGet", + Method: "GET", + PathPattern: "/v1/overlords/{uid}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1OverlordsUIDGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1OverlordsUIDGetOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1OverlordsUidGet: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1OverlordsUIDMaasAccountCreate creates the maas cloudaccount for the private gateway +*/ +func (a *Client) V1OverlordsUIDMaasAccountCreate(params *V1OverlordsUIDMaasAccountCreateParams) (*V1OverlordsUIDMaasAccountCreateCreated, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1OverlordsUIDMaasAccountCreateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1OverlordsUidMaasAccountCreate", + Method: "POST", + PathPattern: "/v1/overlords/maas/{uid}/account", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1OverlordsUIDMaasAccountCreateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1OverlordsUIDMaasAccountCreateCreated) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1OverlordsUidMaasAccountCreate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1OverlordsUIDMaasAccountUpdate updates the maas cloudaccount for the private gateway +*/ +func (a *Client) V1OverlordsUIDMaasAccountUpdate(params *V1OverlordsUIDMaasAccountUpdateParams) (*V1OverlordsUIDMaasAccountUpdateNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1OverlordsUIDMaasAccountUpdateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1OverlordsUidMaasAccountUpdate", + Method: "PUT", + PathPattern: "/v1/overlords/maas/{uid}/account", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1OverlordsUIDMaasAccountUpdateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1OverlordsUIDMaasAccountUpdateNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1OverlordsUidMaasAccountUpdate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1OverlordsUIDMaasAccountValidate validates the maas cloudaccount for the private gateway +*/ +func (a *Client) V1OverlordsUIDMaasAccountValidate(params *V1OverlordsUIDMaasAccountValidateParams) (*V1OverlordsUIDMaasAccountValidateNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1OverlordsUIDMaasAccountValidateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1OverlordsUidMaasAccountValidate", + Method: "POST", + PathPattern: "/v1/overlords/maas/{uid}/account/validate", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1OverlordsUIDMaasAccountValidateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1OverlordsUIDMaasAccountValidateNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1OverlordsUidMaasAccountValidate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1OverlordsUIDMaasClusterProfile returns the specified maas private gateway cluster profile +*/ +func (a *Client) V1OverlordsUIDMaasClusterProfile(params *V1OverlordsUIDMaasClusterProfileParams) (*V1OverlordsUIDMaasClusterProfileOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1OverlordsUIDMaasClusterProfileParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1OverlordsUidMaasClusterProfile", + Method: "GET", + PathPattern: "/v1/overlords/maas/{uid}/clusterprofile", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1OverlordsUIDMaasClusterProfileReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1OverlordsUIDMaasClusterProfileOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1OverlordsUidMaasClusterProfile: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1OverlordsUIDMetadataUpdate updates the private gateway s metadata +*/ +func (a *Client) V1OverlordsUIDMetadataUpdate(params *V1OverlordsUIDMetadataUpdateParams) (*V1OverlordsUIDMetadataUpdateNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1OverlordsUIDMetadataUpdateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1OverlordsUidMetadataUpdate", + Method: "PUT", + PathPattern: "/v1/overlords/{uid}/metadata", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1OverlordsUIDMetadataUpdateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1OverlordsUIDMetadataUpdateNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1OverlordsUidMetadataUpdate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1OverlordsUIDOpenStackAccountCreate creates the open stack cloudaccount for the private gateway +*/ +func (a *Client) V1OverlordsUIDOpenStackAccountCreate(params *V1OverlordsUIDOpenStackAccountCreateParams) (*V1OverlordsUIDOpenStackAccountCreateCreated, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1OverlordsUIDOpenStackAccountCreateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1OverlordsUidOpenStackAccountCreate", + Method: "POST", + PathPattern: "/v1/overlords/openstack/{uid}/account", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1OverlordsUIDOpenStackAccountCreateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1OverlordsUIDOpenStackAccountCreateCreated) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1OverlordsUidOpenStackAccountCreate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1OverlordsUIDOpenStackAccountUpdate updates the open stack cloudaccount for the private gateway +*/ +func (a *Client) V1OverlordsUIDOpenStackAccountUpdate(params *V1OverlordsUIDOpenStackAccountUpdateParams) (*V1OverlordsUIDOpenStackAccountUpdateNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1OverlordsUIDOpenStackAccountUpdateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1OverlordsUidOpenStackAccountUpdate", + Method: "PUT", + PathPattern: "/v1/overlords/openstack/{uid}/account", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1OverlordsUIDOpenStackAccountUpdateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1OverlordsUIDOpenStackAccountUpdateNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1OverlordsUidOpenStackAccountUpdate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1OverlordsUIDOpenStackAccountValidate validates the open stack cloudaccount for the private gateway +*/ +func (a *Client) V1OverlordsUIDOpenStackAccountValidate(params *V1OverlordsUIDOpenStackAccountValidateParams) (*V1OverlordsUIDOpenStackAccountValidateNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1OverlordsUIDOpenStackAccountValidateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1OverlordsUidOpenStackAccountValidate", + Method: "POST", + PathPattern: "/v1/overlords/openstack/{uid}/account/validate", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1OverlordsUIDOpenStackAccountValidateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1OverlordsUIDOpenStackAccountValidateNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1OverlordsUidOpenStackAccountValidate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1OverlordsUIDOpenStackCloudConfigCreate creates the open stack cloud config for the private gateway +*/ +func (a *Client) V1OverlordsUIDOpenStackCloudConfigCreate(params *V1OverlordsUIDOpenStackCloudConfigCreateParams) (*V1OverlordsUIDOpenStackCloudConfigCreateCreated, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1OverlordsUIDOpenStackCloudConfigCreateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1OverlordsUidOpenStackCloudConfigCreate", + Method: "POST", + PathPattern: "/v1/overlords/openstack/{uid}/cloudconfig", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1OverlordsUIDOpenStackCloudConfigCreateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1OverlordsUIDOpenStackCloudConfigCreateCreated) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1OverlordsUidOpenStackCloudConfigCreate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1OverlordsUIDOpenStackCloudConfigUpdate updates the open stack cloud config for the private gateway +*/ +func (a *Client) V1OverlordsUIDOpenStackCloudConfigUpdate(params *V1OverlordsUIDOpenStackCloudConfigUpdateParams) (*V1OverlordsUIDOpenStackCloudConfigUpdateNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1OverlordsUIDOpenStackCloudConfigUpdateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1OverlordsUidOpenStackCloudConfigUpdate", + Method: "PUT", + PathPattern: "/v1/overlords/openstack/{uid}/cloudconfig", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1OverlordsUIDOpenStackCloudConfigUpdateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1OverlordsUIDOpenStackCloudConfigUpdateNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1OverlordsUidOpenStackCloudConfigUpdate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1OverlordsUIDOpenStackClusterProfile returns the specified open stack private gateway cluster profile +*/ +func (a *Client) V1OverlordsUIDOpenStackClusterProfile(params *V1OverlordsUIDOpenStackClusterProfileParams) (*V1OverlordsUIDOpenStackClusterProfileOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1OverlordsUIDOpenStackClusterProfileParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1OverlordsUidOpenStackClusterProfile", + Method: "GET", + PathPattern: "/v1/overlords/openstack/{uid}/clusterprofile", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1OverlordsUIDOpenStackClusterProfileReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1OverlordsUIDOpenStackClusterProfileOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1OverlordsUidOpenStackClusterProfile: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1OverlordsUIDPoolCreate creates an IP pool defintion for the sepcified private gateway +*/ +func (a *Client) V1OverlordsUIDPoolCreate(params *V1OverlordsUIDPoolCreateParams) (*V1OverlordsUIDPoolCreateCreated, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1OverlordsUIDPoolCreateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1OverlordsUidPoolCreate", + Method: "POST", + PathPattern: "/v1/overlords/vsphere/{uid}/pools", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1OverlordsUIDPoolCreateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1OverlordsUIDPoolCreateCreated) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1OverlordsUidPoolCreate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1OverlordsUIDPoolDelete deletes the private gateways s specified IP pool data +*/ +func (a *Client) V1OverlordsUIDPoolDelete(params *V1OverlordsUIDPoolDeleteParams) (*V1OverlordsUIDPoolDeleteNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1OverlordsUIDPoolDeleteParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1OverlordsUidPoolDelete", + Method: "DELETE", + PathPattern: "/v1/overlords/vsphere/{uid}/pools/{poolUid}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1OverlordsUIDPoolDeleteReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1OverlordsUIDPoolDeleteNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1OverlordsUidPoolDelete: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1OverlordsUIDPoolUpdate updates the private gateways s specified IP pool data +*/ +func (a *Client) V1OverlordsUIDPoolUpdate(params *V1OverlordsUIDPoolUpdateParams) (*V1OverlordsUIDPoolUpdateNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1OverlordsUIDPoolUpdateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1OverlordsUidPoolUpdate", + Method: "PUT", + PathPattern: "/v1/overlords/vsphere/{uid}/pools/{poolUid}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1OverlordsUIDPoolUpdateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1OverlordsUIDPoolUpdateNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1OverlordsUidPoolUpdate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1OverlordsUIDPoolsList retrieves a list of IP pools for the specified private gateway +*/ +func (a *Client) V1OverlordsUIDPoolsList(params *V1OverlordsUIDPoolsListParams) (*V1OverlordsUIDPoolsListOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1OverlordsUIDPoolsListParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1OverlordsUidPoolsList", + Method: "GET", + PathPattern: "/v1/overlords/vsphere/{uid}/pools", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1OverlordsUIDPoolsListReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1OverlordsUIDPoolsListOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1OverlordsUidPoolsList: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1OverlordsUIDReset resets the private gateway by disaaociating the private gateway s resources +*/ +func (a *Client) V1OverlordsUIDReset(params *V1OverlordsUIDResetParams) (*V1OverlordsUIDResetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1OverlordsUIDResetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1OverlordsUidReset", + Method: "PUT", + PathPattern: "/v1/overlords/{uid}/reset", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1OverlordsUIDResetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1OverlordsUIDResetOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1OverlordsUidReset: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1OverlordsUIDVsphereAccountCreate creates the v sphere cloudaccount for the private gateway +*/ +func (a *Client) V1OverlordsUIDVsphereAccountCreate(params *V1OverlordsUIDVsphereAccountCreateParams) (*V1OverlordsUIDVsphereAccountCreateCreated, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1OverlordsUIDVsphereAccountCreateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1OverlordsUidVsphereAccountCreate", + Method: "POST", + PathPattern: "/v1/overlords/vsphere/{uid}/account", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1OverlordsUIDVsphereAccountCreateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1OverlordsUIDVsphereAccountCreateCreated) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1OverlordsUidVsphereAccountCreate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1OverlordsUIDVsphereAccountUpdate updates the v sphere cloudaccount for the private gateway +*/ +func (a *Client) V1OverlordsUIDVsphereAccountUpdate(params *V1OverlordsUIDVsphereAccountUpdateParams) (*V1OverlordsUIDVsphereAccountUpdateNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1OverlordsUIDVsphereAccountUpdateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1OverlordsUidVsphereAccountUpdate", + Method: "PUT", + PathPattern: "/v1/overlords/vsphere/{uid}/account", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1OverlordsUIDVsphereAccountUpdateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1OverlordsUIDVsphereAccountUpdateNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1OverlordsUidVsphereAccountUpdate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1OverlordsUIDVsphereAccountValidate validates the v sphere cloudaccount for the private gateway +*/ +func (a *Client) V1OverlordsUIDVsphereAccountValidate(params *V1OverlordsUIDVsphereAccountValidateParams) (*V1OverlordsUIDVsphereAccountValidateNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1OverlordsUIDVsphereAccountValidateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1OverlordsUidVsphereAccountValidate", + Method: "POST", + PathPattern: "/v1/overlords/vsphere/{uid}/account/validate", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1OverlordsUIDVsphereAccountValidateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1OverlordsUIDVsphereAccountValidateNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1OverlordsUidVsphereAccountValidate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1OverlordsUIDVsphereCloudConfigCreate creates the v sphere cloud config for the private gateway +*/ +func (a *Client) V1OverlordsUIDVsphereCloudConfigCreate(params *V1OverlordsUIDVsphereCloudConfigCreateParams) (*V1OverlordsUIDVsphereCloudConfigCreateCreated, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1OverlordsUIDVsphereCloudConfigCreateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1OverlordsUidVsphereCloudConfigCreate", + Method: "POST", + PathPattern: "/v1/overlords/vsphere/{uid}/cloudconfig", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1OverlordsUIDVsphereCloudConfigCreateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1OverlordsUIDVsphereCloudConfigCreateCreated) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1OverlordsUidVsphereCloudConfigCreate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1OverlordsUIDVsphereCloudConfigUpdate updates the v sphere cloud config for the private gateway +*/ +func (a *Client) V1OverlordsUIDVsphereCloudConfigUpdate(params *V1OverlordsUIDVsphereCloudConfigUpdateParams) (*V1OverlordsUIDVsphereCloudConfigUpdateNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1OverlordsUIDVsphereCloudConfigUpdateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1OverlordsUidVsphereCloudConfigUpdate", + Method: "PUT", + PathPattern: "/v1/overlords/vsphere/{uid}/cloudconfig", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1OverlordsUIDVsphereCloudConfigUpdateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1OverlordsUIDVsphereCloudConfigUpdateNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1OverlordsUidVsphereCloudConfigUpdate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1OverlordsUIDVsphereClusterProfile returns the specified vsphere private gateway cluster profile +*/ +func (a *Client) V1OverlordsUIDVsphereClusterProfile(params *V1OverlordsUIDVsphereClusterProfileParams) (*V1OverlordsUIDVsphereClusterProfileOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1OverlordsUIDVsphereClusterProfileParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1OverlordsUidVsphereClusterProfile", + Method: "GET", + PathPattern: "/v1/overlords/vsphere/{uid}/clusterprofile", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1OverlordsUIDVsphereClusterProfileReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1OverlordsUIDVsphereClusterProfileOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1OverlordsUidVsphereClusterProfile: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1OverlordsUIDVsphereComputeclusterRes retrieves the v sphere computecluster resources for the specified private gateway s account +*/ +func (a *Client) V1OverlordsUIDVsphereComputeclusterRes(params *V1OverlordsUIDVsphereComputeclusterResParams) (*V1OverlordsUIDVsphereComputeclusterResOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1OverlordsUIDVsphereComputeclusterResParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1OverlordsUidVsphereComputeclusterRes", + Method: "GET", + PathPattern: "/v1/overlords/vsphere/{uid}/properties/computecluster/resources", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1OverlordsUIDVsphereComputeclusterResReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1OverlordsUIDVsphereComputeclusterResOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1OverlordsUidVsphereComputeclusterRes: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1OverlordsUIDVsphereDatacenters retrieves the v sphere datacenters and datacluster for the specified private gateway s account +*/ +func (a *Client) V1OverlordsUIDVsphereDatacenters(params *V1OverlordsUIDVsphereDatacentersParams) (*V1OverlordsUIDVsphereDatacentersOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1OverlordsUIDVsphereDatacentersParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1OverlordsUidVsphereDatacenters", + Method: "GET", + PathPattern: "/v1/overlords/vsphere/{uid}/properties/datacenters", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1OverlordsUIDVsphereDatacentersReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1OverlordsUIDVsphereDatacentersOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1OverlordsUidVsphereDatacenters: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1OverlordsVsphereManifest returns the manifests required for the private gateway installation +*/ +func (a *Client) V1OverlordsVsphereManifest(params *V1OverlordsVsphereManifestParams) (*V1OverlordsVsphereManifestOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1OverlordsVsphereManifestParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1OverlordsVsphereManifest", + Method: "GET", + PathPattern: "/v1/overlords/vsphere/manifest", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1OverlordsVsphereManifestReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1OverlordsVsphereManifestOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1OverlordsVsphereManifest: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1OverlordsVsphereOvaGet returns overlord s ova information +*/ +func (a *Client) V1OverlordsVsphereOvaGet(params *V1OverlordsVsphereOvaGetParams) (*V1OverlordsVsphereOvaGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1OverlordsVsphereOvaGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1OverlordsVsphereOvaGet", + Method: "GET", + PathPattern: "/v1/overlords/vsphere/ova", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1OverlordsVsphereOvaGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1OverlordsVsphereOvaGetOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1OverlordsVsphereOvaGet: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1PacksNameRegistryUIDList retrieves a list of packs +*/ +func (a *Client) V1PacksNameRegistryUIDList(params *V1PacksNameRegistryUIDListParams) (*V1PacksNameRegistryUIDListOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1PacksNameRegistryUIDListParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1PacksNameRegistryUidList", + Method: "GET", + PathPattern: "/v1/packs/{packName}/registries/{registryUid}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1PacksNameRegistryUIDListReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1PacksNameRegistryUIDListOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1PacksNameRegistryUidList: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1PacksPackUIDLogo returns the logo for a specified pack +*/ +func (a *Client) V1PacksPackUIDLogo(params *V1PacksPackUIDLogoParams, writer io.Writer) (*V1PacksPackUIDLogoOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1PacksPackUIDLogoParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1PacksPackUidLogo", + Method: "GET", + PathPattern: "/v1/packs/{packUid}/logo", + ProducesMediaTypes: []string{"image/gif", "image/jpeg", "image/png"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1PacksPackUIDLogoReader{formats: a.formats, writer: writer}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1PacksPackUIDLogoOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1PacksPackUidLogo: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1PacksSearch retrieves a list of packs based on filter +*/ +func (a *Client) V1PacksSearch(params *V1PacksSearchParams) (*V1PacksSearchOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1PacksSearchParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1PacksSearch", + Method: "POST", + PathPattern: "/v1/packs/search", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1PacksSearchReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1PacksSearchOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1PacksSearch: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1PacksSummaryDelete deletes the packs +*/ +func (a *Client) V1PacksSummaryDelete(params *V1PacksSummaryDeleteParams) (*V1PacksSummaryDeleteOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1PacksSummaryDeleteParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1PacksSummaryDelete", + Method: "DELETE", + PathPattern: "/v1/packs", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1PacksSummaryDeleteReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1PacksSummaryDeleteOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1PacksSummaryDelete: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1PacksSummaryList retrieves a list of packs +*/ +func (a *Client) V1PacksSummaryList(params *V1PacksSummaryListParams) (*V1PacksSummaryListOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1PacksSummaryListParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1PacksSummaryList", + Method: "GET", + PathPattern: "/v1/packs", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1PacksSummaryListReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1PacksSummaryListOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1PacksSummaryList: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1PacksUID returns the specified pack +*/ +func (a *Client) V1PacksUID(params *V1PacksUIDParams) (*V1PacksUIDOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1PacksUIDParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1PacksUid", + Method: "GET", + PathPattern: "/v1/packs/{uid}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1PacksUIDReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1PacksUIDOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1PacksUid: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1PacksUIDReadme returns the readme of a specified pack +*/ +func (a *Client) V1PacksUIDReadme(params *V1PacksUIDReadmeParams) (*V1PacksUIDReadmeOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1PacksUIDReadmeParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1PacksUidReadme", + Method: "GET", + PathPattern: "/v1/packs/{uid}/readme", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1PacksUIDReadmeReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1PacksUIDReadmeOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1PacksUidReadme: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1PasswordActivate updates and activates the specified user password using the password token + +Updates and Activates user password with the help of password token +*/ +func (a *Client) V1PasswordActivate(params *V1PasswordActivateParams) (*V1PasswordActivateNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1PasswordActivateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1PasswordActivate", + Method: "PATCH", + PathPattern: "/v1/auth/password/{passwordToken}/activate", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1PasswordActivateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1PasswordActivateNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1PasswordActivate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1PasswordReset resets the user password using the password token + +Updates the new user password with the help of password token +*/ +func (a *Client) V1PasswordReset(params *V1PasswordResetParams) (*V1PasswordResetNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1PasswordResetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1PasswordReset", + Method: "PATCH", + PathPattern: "/v1/auth/password/{passwordToken}/reset", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1PasswordResetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1PasswordResetNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1PasswordReset: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1PasswordResetRequest creates request to reset password via email + +Creates request to reset password via email. Password reset email will be sent to the user. Sends 204 No Content. +*/ +func (a *Client) V1PasswordResetRequest(params *V1PasswordResetRequestParams) (*V1PasswordResetRequestNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1PasswordResetRequestParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1PasswordResetRequest", + Method: "POST", + PathPattern: "/v1/auth/user/password/reset", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1PasswordResetRequestReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1PasswordResetRequestNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1PasswordResetRequest: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1PatchTenantAddress updates tenant address +*/ +func (a *Client) V1PatchTenantAddress(params *V1PatchTenantAddressParams) (*V1PatchTenantAddressNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1PatchTenantAddressParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1PatchTenantAddress", + Method: "PATCH", + PathPattern: "/v1/tenants/{tenantUid}/address", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1PatchTenantAddressReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1PatchTenantAddressNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1PatchTenantAddress: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1PatchTenantEmailID updates tenant email Id +*/ +func (a *Client) V1PatchTenantEmailID(params *V1PatchTenantEmailIDParams) (*V1PatchTenantEmailIDNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1PatchTenantEmailIDParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1PatchTenantEmailId", + Method: "PATCH", + PathPattern: "/v1/tenants/{tenantUid}/emailId", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1PatchTenantEmailIDReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1PatchTenantEmailIDNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1PatchTenantEmailId: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1PcgSelfHosted returns the private gateway manifest link +*/ +func (a *Client) V1PcgSelfHosted(params *V1PcgSelfHostedParams) (*V1PcgSelfHostedOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1PcgSelfHostedParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1PcgSelfHosted", + Method: "POST", + PathPattern: "/v1/pcg/selfHosted", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1PcgSelfHostedReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1PcgSelfHostedOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1PcgSelfHosted: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1PcgUIDAllyManifestGet returns the pcg ally manifest +*/ +func (a *Client) V1PcgUIDAllyManifestGet(params *V1PcgUIDAllyManifestGetParams, writer io.Writer) (*V1PcgUIDAllyManifestGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1PcgUIDAllyManifestGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1PcgUidAllyManifestGet", + Method: "GET", + PathPattern: "/v1/pcg/{uid}/services/ally/manifest", + ProducesMediaTypes: []string{"application/octet-stream"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1PcgUIDAllyManifestGetReader{formats: a.formats, writer: writer}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1PcgUIDAllyManifestGetOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1PcgUidAllyManifestGet: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1PcgUIDJetManifestGet returns the pcg jet manifest +*/ +func (a *Client) V1PcgUIDJetManifestGet(params *V1PcgUIDJetManifestGetParams, writer io.Writer) (*V1PcgUIDJetManifestGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1PcgUIDJetManifestGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1PcgUidJetManifestGet", + Method: "GET", + PathPattern: "/v1/pcg/{uid}/services/jet/manifest", + ProducesMediaTypes: []string{"application/octet-stream"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1PcgUIDJetManifestGetReader{formats: a.formats, writer: writer}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1PcgUIDJetManifestGetOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1PcgUidJetManifestGet: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1PcgUIDRegister registers the pcg +*/ +func (a *Client) V1PcgUIDRegister(params *V1PcgUIDRegisterParams) (*V1PcgUIDRegisterNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1PcgUIDRegisterParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1PcgUidRegister", + Method: "POST", + PathPattern: "/v1/pcg/{uid}/register", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1PcgUIDRegisterReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1PcgUIDRegisterNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1PcgUidRegister: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1PermissionsList retrieves a list of permissions +*/ +func (a *Client) V1PermissionsList(params *V1PermissionsListParams) (*V1PermissionsListOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1PermissionsListParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1PermissionsList", + Method: "GET", + PathPattern: "/v1/permissions", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1PermissionsListReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1PermissionsListOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1PermissionsList: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1ProjectClusterSettingsGet gets project cluster settings +*/ +func (a *Client) V1ProjectClusterSettingsGet(params *V1ProjectClusterSettingsGetParams) (*V1ProjectClusterSettingsGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1ProjectClusterSettingsGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1ProjectClusterSettingsGet", + Method: "GET", + PathPattern: "/v1/projects/{uid}/preferences/clusterSettings", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1ProjectClusterSettingsGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1ProjectClusterSettingsGetOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1ProjectClusterSettingsGet: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1ProjectClustersNodesAutoRemediationSettingUpdate updates project clusters nodes auto remediation setting +*/ +func (a *Client) V1ProjectClustersNodesAutoRemediationSettingUpdate(params *V1ProjectClustersNodesAutoRemediationSettingUpdateParams) (*V1ProjectClustersNodesAutoRemediationSettingUpdateNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1ProjectClustersNodesAutoRemediationSettingUpdateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1ProjectClustersNodesAutoRemediationSettingUpdate", + Method: "PUT", + PathPattern: "/v1/projects/{uid}/preferences/clusterSettings/nodesAutoRemediationSetting", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1ProjectClustersNodesAutoRemediationSettingUpdateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1ProjectClustersNodesAutoRemediationSettingUpdateNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1ProjectClustersNodesAutoRemediationSettingUpdate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1ProjectsAlerts retrieves a list of supported alerts for a project +*/ +func (a *Client) V1ProjectsAlerts(params *V1ProjectsAlertsParams) (*V1ProjectsAlertsOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1ProjectsAlertsParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1ProjectsAlerts", + Method: "GET", + PathPattern: "/v1/projects/alerts", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1ProjectsAlertsReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1ProjectsAlertsOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1ProjectsAlerts: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1ProjectsCreate creates a project +*/ +func (a *Client) V1ProjectsCreate(params *V1ProjectsCreateParams) (*V1ProjectsCreateCreated, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1ProjectsCreateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1ProjectsCreate", + Method: "POST", + PathPattern: "/v1/projects", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1ProjectsCreateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1ProjectsCreateCreated) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1ProjectsCreate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1ProjectsFilterSummary v1 projects filter summary API +*/ +func (a *Client) V1ProjectsFilterSummary(params *V1ProjectsFilterSummaryParams) (*V1ProjectsFilterSummaryOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1ProjectsFilterSummaryParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1ProjectsFilterSummary", + Method: "POST", + PathPattern: "/v1/dashboard/projects", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1ProjectsFilterSummaryReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1ProjectsFilterSummaryOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1ProjectsFilterSummary: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1ProjectsMetadata retrieves a list of projects metadata +*/ +func (a *Client) V1ProjectsMetadata(params *V1ProjectsMetadataParams) (*V1ProjectsMetadataOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1ProjectsMetadataParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1ProjectsMetadata", + Method: "GET", + PathPattern: "/v1/dashboard/projects/metadata", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1ProjectsMetadataReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1ProjectsMetadataOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1ProjectsMetadata: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1ProjectsUIDAlertCreate creates the specified alert to the specified project +*/ +func (a *Client) V1ProjectsUIDAlertCreate(params *V1ProjectsUIDAlertCreateParams) (*V1ProjectsUIDAlertCreateCreated, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1ProjectsUIDAlertCreateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1ProjectsUidAlertCreate", + Method: "POST", + PathPattern: "/v1/projects/{uid}/alerts/{component}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1ProjectsUIDAlertCreateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1ProjectsUIDAlertCreateCreated) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1ProjectsUidAlertCreate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1ProjectsUIDAlertDelete deletes the specified alert to the specified project +*/ +func (a *Client) V1ProjectsUIDAlertDelete(params *V1ProjectsUIDAlertDeleteParams) (*V1ProjectsUIDAlertDeleteNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1ProjectsUIDAlertDeleteParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1ProjectsUidAlertDelete", + Method: "DELETE", + PathPattern: "/v1/projects/{uid}/alerts/{component}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1ProjectsUIDAlertDeleteReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1ProjectsUIDAlertDeleteNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1ProjectsUidAlertDelete: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1ProjectsUIDAlertUpdate upserts the specified alert to the specified project +*/ +func (a *Client) V1ProjectsUIDAlertUpdate(params *V1ProjectsUIDAlertUpdateParams) (*V1ProjectsUIDAlertUpdateNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1ProjectsUIDAlertUpdateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1ProjectsUidAlertUpdate", + Method: "PUT", + PathPattern: "/v1/projects/{uid}/alerts/{component}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1ProjectsUIDAlertUpdateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1ProjectsUIDAlertUpdateNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1ProjectsUidAlertUpdate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1ProjectsUIDAlertsUIDDelete deletes the specified alert of the specified project +*/ +func (a *Client) V1ProjectsUIDAlertsUIDDelete(params *V1ProjectsUIDAlertsUIDDeleteParams) (*V1ProjectsUIDAlertsUIDDeleteNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1ProjectsUIDAlertsUIDDeleteParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1ProjectsUidAlertsUidDelete", + Method: "DELETE", + PathPattern: "/v1/projects/{uid}/alerts/{component}/{alertUid}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1ProjectsUIDAlertsUIDDeleteReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1ProjectsUIDAlertsUIDDeleteNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1ProjectsUidAlertsUidDelete: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1ProjectsUIDAlertsUIDGet gets the specified alert of the specified project +*/ +func (a *Client) V1ProjectsUIDAlertsUIDGet(params *V1ProjectsUIDAlertsUIDGetParams) (*V1ProjectsUIDAlertsUIDGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1ProjectsUIDAlertsUIDGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1ProjectsUidAlertsUidGet", + Method: "GET", + PathPattern: "/v1/projects/{uid}/alerts/{component}/{alertUid}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1ProjectsUIDAlertsUIDGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1ProjectsUIDAlertsUIDGetOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1ProjectsUidAlertsUidGet: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1ProjectsUIDAlertsUIDUpdate updates the specified alert of the specified project +*/ +func (a *Client) V1ProjectsUIDAlertsUIDUpdate(params *V1ProjectsUIDAlertsUIDUpdateParams) (*V1ProjectsUIDAlertsUIDUpdateNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1ProjectsUIDAlertsUIDUpdateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1ProjectsUidAlertsUidUpdate", + Method: "PUT", + PathPattern: "/v1/projects/{uid}/alerts/{component}/{alertUid}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1ProjectsUIDAlertsUIDUpdateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1ProjectsUIDAlertsUIDUpdateNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1ProjectsUidAlertsUidUpdate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1ProjectsUIDDelete deletes the specified project +*/ +func (a *Client) V1ProjectsUIDDelete(params *V1ProjectsUIDDeleteParams) (*V1ProjectsUIDDeleteNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1ProjectsUIDDeleteParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1ProjectsUidDelete", + Method: "DELETE", + PathPattern: "/v1/projects/{uid}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1ProjectsUIDDeleteReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1ProjectsUIDDeleteNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1ProjectsUidDelete: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1ProjectsUIDGet returns the specified project +*/ +func (a *Client) V1ProjectsUIDGet(params *V1ProjectsUIDGetParams) (*V1ProjectsUIDGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1ProjectsUIDGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1ProjectsUidGet", + Method: "GET", + PathPattern: "/v1/projects/{uid}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1ProjectsUIDGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1ProjectsUIDGetOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1ProjectsUidGet: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1ProjectsUIDMacrosCreate creates or add new macros for the specified project +*/ +func (a *Client) V1ProjectsUIDMacrosCreate(params *V1ProjectsUIDMacrosCreateParams) (*V1ProjectsUIDMacrosCreateNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1ProjectsUIDMacrosCreateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1ProjectsUidMacrosCreate", + Method: "POST", + PathPattern: "/v1/projects/{uid}/macros", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1ProjectsUIDMacrosCreateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1ProjectsUIDMacrosCreateNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1ProjectsUidMacrosCreate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1ProjectsUIDMacrosDeleteByMacroName deletes the macros for the specified project by macro name +*/ +func (a *Client) V1ProjectsUIDMacrosDeleteByMacroName(params *V1ProjectsUIDMacrosDeleteByMacroNameParams) (*V1ProjectsUIDMacrosDeleteByMacroNameNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1ProjectsUIDMacrosDeleteByMacroNameParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1ProjectsUidMacrosDeleteByMacroName", + Method: "DELETE", + PathPattern: "/v1/projects/{uid}/macros", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1ProjectsUIDMacrosDeleteByMacroNameReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1ProjectsUIDMacrosDeleteByMacroNameNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1ProjectsUidMacrosDeleteByMacroName: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1ProjectsUIDMacrosList lists the macros of the specified project +*/ +func (a *Client) V1ProjectsUIDMacrosList(params *V1ProjectsUIDMacrosListParams) (*V1ProjectsUIDMacrosListOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1ProjectsUIDMacrosListParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1ProjectsUidMacrosList", + Method: "GET", + PathPattern: "/v1/projects/{uid}/macros", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1ProjectsUIDMacrosListReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1ProjectsUIDMacrosListOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1ProjectsUidMacrosList: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1ProjectsUIDMacrosUpdate updates the macros of the specified project +*/ +func (a *Client) V1ProjectsUIDMacrosUpdate(params *V1ProjectsUIDMacrosUpdateParams) (*V1ProjectsUIDMacrosUpdateNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1ProjectsUIDMacrosUpdateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1ProjectsUidMacrosUpdate", + Method: "PUT", + PathPattern: "/v1/projects/{uid}/macros", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1ProjectsUIDMacrosUpdateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1ProjectsUIDMacrosUpdateNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1ProjectsUidMacrosUpdate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1ProjectsUIDMacrosUpdateByMacroName updates the macros for the specified project by macro name +*/ +func (a *Client) V1ProjectsUIDMacrosUpdateByMacroName(params *V1ProjectsUIDMacrosUpdateByMacroNameParams) (*V1ProjectsUIDMacrosUpdateByMacroNameNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1ProjectsUIDMacrosUpdateByMacroNameParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1ProjectsUidMacrosUpdateByMacroName", + Method: "PATCH", + PathPattern: "/v1/projects/{uid}/macros", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1ProjectsUIDMacrosUpdateByMacroNameReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1ProjectsUIDMacrosUpdateByMacroNameNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1ProjectsUidMacrosUpdateByMacroName: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1ProjectsUIDMetaUpdate updates the metadata of the specified project +*/ +func (a *Client) V1ProjectsUIDMetaUpdate(params *V1ProjectsUIDMetaUpdateParams) (*V1ProjectsUIDMetaUpdateNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1ProjectsUIDMetaUpdateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1ProjectsUidMetaUpdate", + Method: "PUT", + PathPattern: "/v1/projects/{uid}/meta", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1ProjectsUIDMetaUpdateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1ProjectsUIDMetaUpdateNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1ProjectsUidMetaUpdate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1ProjectsUIDTeamsUpdate updates the teams association to the specified project +*/ +func (a *Client) V1ProjectsUIDTeamsUpdate(params *V1ProjectsUIDTeamsUpdateParams) (*V1ProjectsUIDTeamsUpdateNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1ProjectsUIDTeamsUpdateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1ProjectsUidTeamsUpdate", + Method: "PUT", + PathPattern: "/v1/projects/{uid}/teams", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1ProjectsUIDTeamsUpdateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1ProjectsUIDTeamsUpdateNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1ProjectsUidTeamsUpdate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1ProjectsUIDUpdate updates the specified project +*/ +func (a *Client) V1ProjectsUIDUpdate(params *V1ProjectsUIDUpdateParams) (*V1ProjectsUIDUpdateNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1ProjectsUIDUpdateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1ProjectsUidUpdate", + Method: "PUT", + PathPattern: "/v1/projects/{uid}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1ProjectsUIDUpdateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1ProjectsUIDUpdateNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1ProjectsUidUpdate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1ProjectsUIDUsersUpdate updates the users association to the specified project +*/ +func (a *Client) V1ProjectsUIDUsersUpdate(params *V1ProjectsUIDUsersUpdateParams) (*V1ProjectsUIDUsersUpdateNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1ProjectsUIDUsersUpdateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1ProjectsUidUsersUpdate", + Method: "PUT", + PathPattern: "/v1/projects/{uid}/users", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1ProjectsUIDUsersUpdateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1ProjectsUIDUsersUpdateNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1ProjectsUidUsersUpdate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1ProjectsUIDValidate validates and returns active resource of project before delete +*/ +func (a *Client) V1ProjectsUIDValidate(params *V1ProjectsUIDValidateParams) (*V1ProjectsUIDValidateOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1ProjectsUIDValidateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1ProjectsUidValidate", + Method: "DELETE", + PathPattern: "/v1/projects/{uid}/validate", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1ProjectsUIDValidateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1ProjectsUIDValidateOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1ProjectsUidValidate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1RateConfigGet gets all rate config for public and private cloud +*/ +func (a *Client) V1RateConfigGet(params *V1RateConfigGetParams) (*V1RateConfigGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1RateConfigGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1RateConfigGet", + Method: "GET", + PathPattern: "/v1/tenants/{tenantUid}/rateConfig", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1RateConfigGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1RateConfigGetOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1RateConfigGet: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1RateConfigUpdate updates the rate config for public and private cloud +*/ +func (a *Client) V1RateConfigUpdate(params *V1RateConfigUpdateParams) (*V1RateConfigUpdateNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1RateConfigUpdateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1RateConfigUpdate", + Method: "PUT", + PathPattern: "/v1/tenants/{tenantUid}/rateConfig", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1RateConfigUpdateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1RateConfigUpdateNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1RateConfigUpdate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1RegistriesHelmCreate creates a helm registry +*/ +func (a *Client) V1RegistriesHelmCreate(params *V1RegistriesHelmCreateParams) (*V1RegistriesHelmCreateCreated, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1RegistriesHelmCreateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1RegistriesHelmCreate", + Method: "POST", + PathPattern: "/v1/registries/helm", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1RegistriesHelmCreateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1RegistriesHelmCreateCreated) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1RegistriesHelmCreate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1RegistriesHelmList retrieves a list of helm registries +*/ +func (a *Client) V1RegistriesHelmList(params *V1RegistriesHelmListParams) (*V1RegistriesHelmListOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1RegistriesHelmListParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1RegistriesHelmList", + Method: "GET", + PathPattern: "/v1/registries/helm", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1RegistriesHelmListReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1RegistriesHelmListOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1RegistriesHelmList: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1RegistriesHelmSummaryList retrieves a list of helm registries as summary +*/ +func (a *Client) V1RegistriesHelmSummaryList(params *V1RegistriesHelmSummaryListParams) (*V1RegistriesHelmSummaryListOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1RegistriesHelmSummaryListParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1RegistriesHelmSummaryList", + Method: "GET", + PathPattern: "/v1/registries/helm/summary", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1RegistriesHelmSummaryListReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1RegistriesHelmSummaryListOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1RegistriesHelmSummaryList: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1RegistriesHelmUIDDelete deletes the specified helm registry +*/ +func (a *Client) V1RegistriesHelmUIDDelete(params *V1RegistriesHelmUIDDeleteParams) (*V1RegistriesHelmUIDDeleteNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1RegistriesHelmUIDDeleteParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1RegistriesHelmUidDelete", + Method: "DELETE", + PathPattern: "/v1/registries/helm/{uid}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1RegistriesHelmUIDDeleteReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1RegistriesHelmUIDDeleteNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1RegistriesHelmUidDelete: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1RegistriesHelmUIDGet returns the specified helm registry +*/ +func (a *Client) V1RegistriesHelmUIDGet(params *V1RegistriesHelmUIDGetParams) (*V1RegistriesHelmUIDGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1RegistriesHelmUIDGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1RegistriesHelmUidGet", + Method: "GET", + PathPattern: "/v1/registries/helm/{uid}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1RegistriesHelmUIDGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1RegistriesHelmUIDGetOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1RegistriesHelmUidGet: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1RegistriesHelmUIDSync syncs helm registry + +Sync all the helm charts from the registry +*/ +func (a *Client) V1RegistriesHelmUIDSync(params *V1RegistriesHelmUIDSyncParams) (*V1RegistriesHelmUIDSyncAccepted, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1RegistriesHelmUIDSyncParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1RegistriesHelmUidSync", + Method: "POST", + PathPattern: "/v1/registries/helm/{uid}/sync", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1RegistriesHelmUIDSyncReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1RegistriesHelmUIDSyncAccepted) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1RegistriesHelmUidSync: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1RegistriesHelmUIDSyncStatus gets helm registry sync status + +Get the sync status for the specified helm registry +*/ +func (a *Client) V1RegistriesHelmUIDSyncStatus(params *V1RegistriesHelmUIDSyncStatusParams) (*V1RegistriesHelmUIDSyncStatusOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1RegistriesHelmUIDSyncStatusParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1RegistriesHelmUidSyncStatus", + Method: "GET", + PathPattern: "/v1/registries/helm/{uid}/sync/status", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1RegistriesHelmUIDSyncStatusReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1RegistriesHelmUIDSyncStatusOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1RegistriesHelmUidSyncStatus: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1RegistriesHelmUIDUpdate updates the specified helm registry +*/ +func (a *Client) V1RegistriesHelmUIDUpdate(params *V1RegistriesHelmUIDUpdateParams) (*V1RegistriesHelmUIDUpdateNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1RegistriesHelmUIDUpdateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1RegistriesHelmUidUpdate", + Method: "PUT", + PathPattern: "/v1/registries/helm/{uid}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1RegistriesHelmUIDUpdateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1RegistriesHelmUIDUpdateNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1RegistriesHelmUidUpdate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1RegistriesMetadata retrieves a list of registries metadata +*/ +func (a *Client) V1RegistriesMetadata(params *V1RegistriesMetadataParams) (*V1RegistriesMetadataOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1RegistriesMetadataParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1RegistriesMetadata", + Method: "GET", + PathPattern: "/v1/registries/metadata", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1RegistriesMetadataReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1RegistriesMetadataOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1RegistriesMetadata: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1RegistriesNameConfigGet returns the specified system scope registry configuration +*/ +func (a *Client) V1RegistriesNameConfigGet(params *V1RegistriesNameConfigGetParams) (*V1RegistriesNameConfigGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1RegistriesNameConfigGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1RegistriesNameConfigGet", + Method: "GET", + PathPattern: "/v1/registries/{registryName}/config", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1RegistriesNameConfigGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1RegistriesNameConfigGetOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1RegistriesNameConfigGet: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1RegistriesPackCreate creates a pack registry +*/ +func (a *Client) V1RegistriesPackCreate(params *V1RegistriesPackCreateParams) (*V1RegistriesPackCreateCreated, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1RegistriesPackCreateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1RegistriesPackCreate", + Method: "POST", + PathPattern: "/v1/registries/pack", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1RegistriesPackCreateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1RegistriesPackCreateCreated) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1RegistriesPackCreate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1RegistriesPackList retrieves a list of pack registries +*/ +func (a *Client) V1RegistriesPackList(params *V1RegistriesPackListParams) (*V1RegistriesPackListOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1RegistriesPackListParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1RegistriesPackList", + Method: "GET", + PathPattern: "/v1/registries/pack", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1RegistriesPackListReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1RegistriesPackListOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1RegistriesPackList: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1RegistriesPackSummaryList retrieves a list of pack registries as summary +*/ +func (a *Client) V1RegistriesPackSummaryList(params *V1RegistriesPackSummaryListParams) (*V1RegistriesPackSummaryListOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1RegistriesPackSummaryListParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1RegistriesPackSummaryList", + Method: "GET", + PathPattern: "/v1/registries/pack/summary", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1RegistriesPackSummaryListReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1RegistriesPackSummaryListOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1RegistriesPackSummaryList: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1RegistriesPackUIDDelete deletes the specified pack registry +*/ +func (a *Client) V1RegistriesPackUIDDelete(params *V1RegistriesPackUIDDeleteParams) (*V1RegistriesPackUIDDeleteNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1RegistriesPackUIDDeleteParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1RegistriesPackUidDelete", + Method: "DELETE", + PathPattern: "/v1/registries/pack/{uid}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1RegistriesPackUIDDeleteReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1RegistriesPackUIDDeleteNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1RegistriesPackUidDelete: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1RegistriesPackUIDGet returns the specified pack registry +*/ +func (a *Client) V1RegistriesPackUIDGet(params *V1RegistriesPackUIDGetParams) (*V1RegistriesPackUIDGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1RegistriesPackUIDGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1RegistriesPackUidGet", + Method: "GET", + PathPattern: "/v1/registries/pack/{uid}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1RegistriesPackUIDGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1RegistriesPackUIDGetOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1RegistriesPackUidGet: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1RegistriesPackUIDSync syncs pack registry + +Sync all the packs from the registry +*/ +func (a *Client) V1RegistriesPackUIDSync(params *V1RegistriesPackUIDSyncParams) (*V1RegistriesPackUIDSyncAccepted, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1RegistriesPackUIDSyncParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1RegistriesPackUidSync", + Method: "POST", + PathPattern: "/v1/registries/pack/{uid}/sync", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1RegistriesPackUIDSyncReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1RegistriesPackUIDSyncAccepted) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1RegistriesPackUidSync: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1RegistriesPackUIDSyncStatus gets pack registry sync status + +Get sync status for the pack specified registry +*/ +func (a *Client) V1RegistriesPackUIDSyncStatus(params *V1RegistriesPackUIDSyncStatusParams) (*V1RegistriesPackUIDSyncStatusOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1RegistriesPackUIDSyncStatusParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1RegistriesPackUidSyncStatus", + Method: "GET", + PathPattern: "/v1/registries/pack/{uid}/sync/status", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1RegistriesPackUIDSyncStatusReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1RegistriesPackUIDSyncStatusOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1RegistriesPackUidSyncStatus: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1RegistriesPackUIDUpdate updates the specified pack registry +*/ +func (a *Client) V1RegistriesPackUIDUpdate(params *V1RegistriesPackUIDUpdateParams) (*V1RegistriesPackUIDUpdateNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1RegistriesPackUIDUpdateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1RegistriesPackUidUpdate", + Method: "PUT", + PathPattern: "/v1/registries/pack/{uid}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1RegistriesPackUIDUpdateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1RegistriesPackUIDUpdateNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1RegistriesPackUidUpdate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1RegistriesUIDDelete deletes the specified registry +*/ +func (a *Client) V1RegistriesUIDDelete(params *V1RegistriesUIDDeleteParams) (*V1RegistriesUIDDeleteNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1RegistriesUIDDeleteParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1RegistriesUidDelete", + Method: "DELETE", + PathPattern: "/v1/registries/{uid}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1RegistriesUIDDeleteReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1RegistriesUIDDeleteNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1RegistriesUidDelete: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1RolesClone clones the role +*/ +func (a *Client) V1RolesClone(params *V1RolesCloneParams) (*V1RolesCloneCreated, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1RolesCloneParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1RolesClone", + Method: "POST", + PathPattern: "/v1/roles/{uid}/clone", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1RolesCloneReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1RolesCloneCreated) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1RolesClone: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1RolesCreate creates a role with specified permissions +*/ +func (a *Client) V1RolesCreate(params *V1RolesCreateParams) (*V1RolesCreateCreated, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1RolesCreateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1RolesCreate", + Method: "POST", + PathPattern: "/v1/roles", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1RolesCreateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1RolesCreateCreated) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1RolesCreate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1RolesList retrieves a list of roles +*/ +func (a *Client) V1RolesList(params *V1RolesListParams) (*V1RolesListOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1RolesListParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1RolesList", + Method: "GET", + PathPattern: "/v1/roles", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1RolesListReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1RolesListOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1RolesList: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1RolesUIDDelete deletes the specified role +*/ +func (a *Client) V1RolesUIDDelete(params *V1RolesUIDDeleteParams) (*V1RolesUIDDeleteNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1RolesUIDDeleteParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1RolesUidDelete", + Method: "DELETE", + PathPattern: "/v1/roles/{uid}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1RolesUIDDeleteReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1RolesUIDDeleteNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1RolesUidDelete: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1RolesUIDGet returns the specified role +*/ +func (a *Client) V1RolesUIDGet(params *V1RolesUIDGetParams) (*V1RolesUIDGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1RolesUIDGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1RolesUidGet", + Method: "GET", + PathPattern: "/v1/roles/{uid}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1RolesUIDGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1RolesUIDGetOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1RolesUidGet: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1RolesUIDUpdate updates the specified role +*/ +func (a *Client) V1RolesUIDUpdate(params *V1RolesUIDUpdateParams) (*V1RolesUIDUpdateNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1RolesUIDUpdateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1RolesUidUpdate", + Method: "PUT", + PathPattern: "/v1/roles/{uid}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1RolesUIDUpdateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1RolesUIDUpdateNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1RolesUidUpdate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1ServiceManifestGet returns a service manifest for a given service name and version +*/ +func (a *Client) V1ServiceManifestGet(params *V1ServiceManifestGetParams) (*V1ServiceManifestGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1ServiceManifestGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1ServiceManifestGet", + Method: "GET", + PathPattern: "/v1/services/{serviceName}/versions/{version}/manifest", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1ServiceManifestGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1ServiceManifestGetOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1ServiceManifestGet: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1ServiceVersionGet returns a latest version for a given service name +*/ +func (a *Client) V1ServiceVersionGet(params *V1ServiceVersionGetParams) (*V1ServiceVersionGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1ServiceVersionGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1ServiceVersionGet", + Method: "GET", + PathPattern: "/v1/services/{serviceName}/version", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1ServiceVersionGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1ServiceVersionGetOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1ServiceVersionGet: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1SpectroClustersAksCreate creates an a k s cluster +*/ +func (a *Client) V1SpectroClustersAksCreate(params *V1SpectroClustersAksCreateParams) (*V1SpectroClustersAksCreateCreated, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1SpectroClustersAksCreateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1SpectroClustersAksCreate", + Method: "POST", + PathPattern: "/v1/spectroclusters/aks", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1SpectroClustersAksCreateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1SpectroClustersAksCreateCreated) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1SpectroClustersAksCreate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1SpectroClustersAksRate gets a k s cluster estimated rate information +*/ +func (a *Client) V1SpectroClustersAksRate(params *V1SpectroClustersAksRateParams) (*V1SpectroClustersAksRateOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1SpectroClustersAksRateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1SpectroClustersAksRate", + Method: "POST", + PathPattern: "/v1/spectroclusters/aks/rate", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1SpectroClustersAksRateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1SpectroClustersAksRateOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1SpectroClustersAksRate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1SpectroClustersAksValidate validates a k s cluster create operation +*/ +func (a *Client) V1SpectroClustersAksValidate(params *V1SpectroClustersAksValidateParams) (*V1SpectroClustersAksValidateOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1SpectroClustersAksValidateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1SpectroClustersAksValidate", + Method: "POST", + PathPattern: "/v1/spectroclusters/aks/validate", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1SpectroClustersAksValidateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1SpectroClustersAksValidateOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1SpectroClustersAksValidate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1SpectroClustersAwsCreate creates an a w s cluster +*/ +func (a *Client) V1SpectroClustersAwsCreate(params *V1SpectroClustersAwsCreateParams) (*V1SpectroClustersAwsCreateCreated, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1SpectroClustersAwsCreateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1SpectroClustersAwsCreate", + Method: "POST", + PathPattern: "/v1/spectroclusters/aws", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1SpectroClustersAwsCreateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1SpectroClustersAwsCreateCreated) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1SpectroClustersAwsCreate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1SpectroClustersAwsImport imports an a w s cluster +*/ +func (a *Client) V1SpectroClustersAwsImport(params *V1SpectroClustersAwsImportParams) (*V1SpectroClustersAwsImportCreated, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1SpectroClustersAwsImportParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1SpectroClustersAwsImport", + Method: "POST", + PathPattern: "/v1/spectroclusters/aws/import", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1SpectroClustersAwsImportReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1SpectroClustersAwsImportCreated) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1SpectroClustersAwsImport: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1SpectroClustersAwsRate gets a w s cluster estimated rate information +*/ +func (a *Client) V1SpectroClustersAwsRate(params *V1SpectroClustersAwsRateParams) (*V1SpectroClustersAwsRateOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1SpectroClustersAwsRateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1SpectroClustersAwsRate", + Method: "POST", + PathPattern: "/v1/spectroclusters/aws/rate", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1SpectroClustersAwsRateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1SpectroClustersAwsRateOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1SpectroClustersAwsRate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1SpectroClustersAwsValidate validates a w s cluster create operation +*/ +func (a *Client) V1SpectroClustersAwsValidate(params *V1SpectroClustersAwsValidateParams) (*V1SpectroClustersAwsValidateOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1SpectroClustersAwsValidateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1SpectroClustersAwsValidate", + Method: "POST", + PathPattern: "/v1/spectroclusters/aws/validate", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1SpectroClustersAwsValidateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1SpectroClustersAwsValidateOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1SpectroClustersAwsValidate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1SpectroClustersAzureCreate creates an azure cluster +*/ +func (a *Client) V1SpectroClustersAzureCreate(params *V1SpectroClustersAzureCreateParams) (*V1SpectroClustersAzureCreateCreated, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1SpectroClustersAzureCreateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1SpectroClustersAzureCreate", + Method: "POST", + PathPattern: "/v1/spectroclusters/azure", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1SpectroClustersAzureCreateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1SpectroClustersAzureCreateCreated) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1SpectroClustersAzureCreate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1SpectroClustersAzureImport imports an azure cluster +*/ +func (a *Client) V1SpectroClustersAzureImport(params *V1SpectroClustersAzureImportParams) (*V1SpectroClustersAzureImportCreated, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1SpectroClustersAzureImportParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1SpectroClustersAzureImport", + Method: "POST", + PathPattern: "/v1/spectroclusters/azure/import", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1SpectroClustersAzureImportReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1SpectroClustersAzureImportCreated) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1SpectroClustersAzureImport: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1SpectroClustersAzureRate gets azure cluster estimated rate information +*/ +func (a *Client) V1SpectroClustersAzureRate(params *V1SpectroClustersAzureRateParams) (*V1SpectroClustersAzureRateOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1SpectroClustersAzureRateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1SpectroClustersAzureRate", + Method: "POST", + PathPattern: "/v1/spectroclusters/azure/rate", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1SpectroClustersAzureRateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1SpectroClustersAzureRateOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1SpectroClustersAzureRate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1SpectroClustersAzureValidate validates azure cluster create operation +*/ +func (a *Client) V1SpectroClustersAzureValidate(params *V1SpectroClustersAzureValidateParams) (*V1SpectroClustersAzureValidateOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1SpectroClustersAzureValidateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1SpectroClustersAzureValidate", + Method: "POST", + PathPattern: "/v1/spectroclusters/azure/validate", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1SpectroClustersAzureValidateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1SpectroClustersAzureValidateOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1SpectroClustersAzureValidate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1SpectroClustersCertificatesRenew sets the cluster control plane nodes kubernetes certificates for renewal +*/ +func (a *Client) V1SpectroClustersCertificatesRenew(params *V1SpectroClustersCertificatesRenewParams) (*V1SpectroClustersCertificatesRenewNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1SpectroClustersCertificatesRenewParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1SpectroClustersCertificatesRenew", + Method: "PATCH", + PathPattern: "/v1/spectroclusters/{uid}/k8certificates/renew", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1SpectroClustersCertificatesRenewReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1SpectroClustersCertificatesRenewNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1SpectroClustersCertificatesRenew: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1SpectroClustersConfigEdgeInstaller clusters configuration for the edge installer +*/ +func (a *Client) V1SpectroClustersConfigEdgeInstaller(params *V1SpectroClustersConfigEdgeInstallerParams) (*V1SpectroClustersConfigEdgeInstallerOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1SpectroClustersConfigEdgeInstallerParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1SpectroClustersConfigEdgeInstaller", + Method: "GET", + PathPattern: "/v1/spectroclusters/config/edgeInstaller", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1SpectroClustersConfigEdgeInstallerReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1SpectroClustersConfigEdgeInstallerOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1SpectroClustersConfigEdgeInstaller: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1SpectroClustersCustomCreate creates a custom cluster +*/ +func (a *Client) V1SpectroClustersCustomCreate(params *V1SpectroClustersCustomCreateParams) (*V1SpectroClustersCustomCreateCreated, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1SpectroClustersCustomCreateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1SpectroClustersCustomCreate", + Method: "POST", + PathPattern: "/v1/spectroclusters/cloudTypes/{cloudType}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1SpectroClustersCustomCreateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1SpectroClustersCustomCreateCreated) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1SpectroClustersCustomCreate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1SpectroClustersCustomValidate validates custom cluster create operation +*/ +func (a *Client) V1SpectroClustersCustomValidate(params *V1SpectroClustersCustomValidateParams) (*V1SpectroClustersCustomValidateOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1SpectroClustersCustomValidateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1SpectroClustersCustomValidate", + Method: "POST", + PathPattern: "/v1/spectroclusters/cloudTypes/{cloudType}/validate", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1SpectroClustersCustomValidateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1SpectroClustersCustomValidateOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1SpectroClustersCustomValidate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1SpectroClustersDelete deletes the specified cluster +*/ +func (a *Client) V1SpectroClustersDelete(params *V1SpectroClustersDeleteParams) (*V1SpectroClustersDeleteNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1SpectroClustersDeleteParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1SpectroClustersDelete", + Method: "DELETE", + PathPattern: "/v1/spectroclusters/{uid}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1SpectroClustersDeleteReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1SpectroClustersDeleteNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1SpectroClustersDelete: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1SpectroClustersDeleteProfiles removes cluster profiles from the specified cluster +*/ +func (a *Client) V1SpectroClustersDeleteProfiles(params *V1SpectroClustersDeleteProfilesParams) (*V1SpectroClustersDeleteProfilesNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1SpectroClustersDeleteProfilesParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1SpectroClustersDeleteProfiles", + Method: "DELETE", + PathPattern: "/v1/spectroclusters/{uid}/profiles", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1SpectroClustersDeleteProfilesReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1SpectroClustersDeleteProfilesNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1SpectroClustersDeleteProfiles: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1SpectroClustersEdgeNativeCreate creates an edge native cluster +*/ +func (a *Client) V1SpectroClustersEdgeNativeCreate(params *V1SpectroClustersEdgeNativeCreateParams) (*V1SpectroClustersEdgeNativeCreateCreated, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1SpectroClustersEdgeNativeCreateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1SpectroClustersEdgeNativeCreate", + Method: "POST", + PathPattern: "/v1/spectroclusters/edge-native", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1SpectroClustersEdgeNativeCreateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1SpectroClustersEdgeNativeCreateCreated) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1SpectroClustersEdgeNativeCreate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1SpectroClustersEdgeNativeImport imports an edge native cluster +*/ +func (a *Client) V1SpectroClustersEdgeNativeImport(params *V1SpectroClustersEdgeNativeImportParams) (*V1SpectroClustersEdgeNativeImportCreated, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1SpectroClustersEdgeNativeImportParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1SpectroClustersEdgeNativeImport", + Method: "POST", + PathPattern: "/v1/spectroclusters/edge-native/import", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1SpectroClustersEdgeNativeImportReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1SpectroClustersEdgeNativeImportCreated) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1SpectroClustersEdgeNativeImport: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1SpectroClustersEdgeNativeRate gets edge native cluster estimated rate information +*/ +func (a *Client) V1SpectroClustersEdgeNativeRate(params *V1SpectroClustersEdgeNativeRateParams) (*V1SpectroClustersEdgeNativeRateOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1SpectroClustersEdgeNativeRateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1SpectroClustersEdgeNativeRate", + Method: "POST", + PathPattern: "/v1/spectroclusters/edge-native/rate", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1SpectroClustersEdgeNativeRateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1SpectroClustersEdgeNativeRateOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1SpectroClustersEdgeNativeRate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1SpectroClustersEdgeNativeValidate validates edge native cluster create operation +*/ +func (a *Client) V1SpectroClustersEdgeNativeValidate(params *V1SpectroClustersEdgeNativeValidateParams) (*V1SpectroClustersEdgeNativeValidateOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1SpectroClustersEdgeNativeValidateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1SpectroClustersEdgeNativeValidate", + Method: "POST", + PathPattern: "/v1/spectroclusters/edge-native/validate", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1SpectroClustersEdgeNativeValidateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1SpectroClustersEdgeNativeValidateOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1SpectroClustersEdgeNativeValidate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1SpectroClustersEksCreate creates an e k s cluster +*/ +func (a *Client) V1SpectroClustersEksCreate(params *V1SpectroClustersEksCreateParams) (*V1SpectroClustersEksCreateCreated, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1SpectroClustersEksCreateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1SpectroClustersEksCreate", + Method: "POST", + PathPattern: "/v1/spectroclusters/eks", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1SpectroClustersEksCreateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1SpectroClustersEksCreateCreated) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1SpectroClustersEksCreate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1SpectroClustersEksRate gets e k s cluster estimated rate information +*/ +func (a *Client) V1SpectroClustersEksRate(params *V1SpectroClustersEksRateParams) (*V1SpectroClustersEksRateOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1SpectroClustersEksRateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1SpectroClustersEksRate", + Method: "POST", + PathPattern: "/v1/spectroclusters/eks/rate", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1SpectroClustersEksRateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1SpectroClustersEksRateOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1SpectroClustersEksRate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1SpectroClustersEksValidate validates e k s cluster create operation +*/ +func (a *Client) V1SpectroClustersEksValidate(params *V1SpectroClustersEksValidateParams) (*V1SpectroClustersEksValidateOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1SpectroClustersEksValidateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1SpectroClustersEksValidate", + Method: "POST", + PathPattern: "/v1/spectroclusters/eks/validate", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1SpectroClustersEksValidateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1SpectroClustersEksValidateOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1SpectroClustersEksValidate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1SpectroClustersFiltersWorkspace retrieves a list of running non rbac configured clusters in a workspace +*/ +func (a *Client) V1SpectroClustersFiltersWorkspace(params *V1SpectroClustersFiltersWorkspaceParams) (*V1SpectroClustersFiltersWorkspaceOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1SpectroClustersFiltersWorkspaceParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1SpectroClustersFiltersWorkspace", + Method: "GET", + PathPattern: "/v1/dashboard/spectroclusters/filters/workspace", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1SpectroClustersFiltersWorkspaceReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1SpectroClustersFiltersWorkspaceOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1SpectroClustersFiltersWorkspace: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1SpectroClustersGcpCreate creates a g c p cluster +*/ +func (a *Client) V1SpectroClustersGcpCreate(params *V1SpectroClustersGcpCreateParams) (*V1SpectroClustersGcpCreateCreated, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1SpectroClustersGcpCreateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1SpectroClustersGcpCreate", + Method: "POST", + PathPattern: "/v1/spectroclusters/gcp", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1SpectroClustersGcpCreateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1SpectroClustersGcpCreateCreated) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1SpectroClustersGcpCreate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1SpectroClustersGcpImport imports a g c p cluster +*/ +func (a *Client) V1SpectroClustersGcpImport(params *V1SpectroClustersGcpImportParams) (*V1SpectroClustersGcpImportCreated, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1SpectroClustersGcpImportParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1SpectroClustersGcpImport", + Method: "POST", + PathPattern: "/v1/spectroclusters/gcp/import", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1SpectroClustersGcpImportReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1SpectroClustersGcpImportCreated) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1SpectroClustersGcpImport: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1SpectroClustersGcpRate gets g c p cluster estimated rate information +*/ +func (a *Client) V1SpectroClustersGcpRate(params *V1SpectroClustersGcpRateParams) (*V1SpectroClustersGcpRateOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1SpectroClustersGcpRateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1SpectroClustersGcpRate", + Method: "POST", + PathPattern: "/v1/spectroclusters/gcp/rate", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1SpectroClustersGcpRateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1SpectroClustersGcpRateOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1SpectroClustersGcpRate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1SpectroClustersGcpValidate validates g c p cluster create operation +*/ +func (a *Client) V1SpectroClustersGcpValidate(params *V1SpectroClustersGcpValidateParams) (*V1SpectroClustersGcpValidateOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1SpectroClustersGcpValidateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1SpectroClustersGcpValidate", + Method: "POST", + PathPattern: "/v1/spectroclusters/gcp/validate", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1SpectroClustersGcpValidateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1SpectroClustersGcpValidateOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1SpectroClustersGcpValidate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1SpectroClustersGenericImport imports a cluster of any cloud type in generic way + +The machines information will be captured, whereas the cloud specific configuration info will not be retrieved +*/ +func (a *Client) V1SpectroClustersGenericImport(params *V1SpectroClustersGenericImportParams) (*V1SpectroClustersGenericImportCreated, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1SpectroClustersGenericImportParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1SpectroClustersGenericImport", + Method: "POST", + PathPattern: "/v1/spectroclusters/generic/import", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1SpectroClustersGenericImportReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1SpectroClustersGenericImportCreated) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1SpectroClustersGenericImport: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1SpectroClustersGenericRate gets generic cluster estimated rate information +*/ +func (a *Client) V1SpectroClustersGenericRate(params *V1SpectroClustersGenericRateParams) (*V1SpectroClustersGenericRateOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1SpectroClustersGenericRateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1SpectroClustersGenericRate", + Method: "POST", + PathPattern: "/v1/spectroclusters/generic/rate", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1SpectroClustersGenericRateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1SpectroClustersGenericRateOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1SpectroClustersGenericRate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1SpectroClustersGet returns the specified cluster +*/ +func (a *Client) V1SpectroClustersGet(params *V1SpectroClustersGetParams) (*V1SpectroClustersGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1SpectroClustersGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1SpectroClustersGet", + Method: "GET", + PathPattern: "/v1/spectroclusters/{uid}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1SpectroClustersGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1SpectroClustersGetOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1SpectroClustersGet: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1SpectroClustersGetProfileUpdates returns the profile updates of a specified cluster +*/ +func (a *Client) V1SpectroClustersGetProfileUpdates(params *V1SpectroClustersGetProfileUpdatesParams) (*V1SpectroClustersGetProfileUpdatesOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1SpectroClustersGetProfileUpdatesParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1SpectroClustersGetProfileUpdates", + Method: "GET", + PathPattern: "/v1/spectroclusters/{uid}/profileUpdates", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1SpectroClustersGetProfileUpdatesReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1SpectroClustersGetProfileUpdatesOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1SpectroClustersGetProfileUpdates: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1SpectroClustersGetProfiles returns the associated profiles of a specified cluster +*/ +func (a *Client) V1SpectroClustersGetProfiles(params *V1SpectroClustersGetProfilesParams) (*V1SpectroClustersGetProfilesOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1SpectroClustersGetProfilesParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1SpectroClustersGetProfiles", + Method: "GET", + PathPattern: "/v1/spectroclusters/{uid}/profiles", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1SpectroClustersGetProfilesReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1SpectroClustersGetProfilesOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1SpectroClustersGetProfiles: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1SpectroClustersGetProfilesPacksManifests returns the associated profile s pack manifests of a specified cluster +*/ +func (a *Client) V1SpectroClustersGetProfilesPacksManifests(params *V1SpectroClustersGetProfilesPacksManifestsParams) (*V1SpectroClustersGetProfilesPacksManifestsOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1SpectroClustersGetProfilesPacksManifestsParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1SpectroClustersGetProfilesPacksManifests", + Method: "GET", + PathPattern: "/v1/spectroclusters/{uid}/profiles/packs/manifests", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1SpectroClustersGetProfilesPacksManifestsReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1SpectroClustersGetProfilesPacksManifestsOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1SpectroClustersGetProfilesPacksManifests: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1SpectroClustersGkeCreate creates an g k e cluster +*/ +func (a *Client) V1SpectroClustersGkeCreate(params *V1SpectroClustersGkeCreateParams) (*V1SpectroClustersGkeCreateCreated, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1SpectroClustersGkeCreateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1SpectroClustersGkeCreate", + Method: "POST", + PathPattern: "/v1/spectroclusters/gke", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1SpectroClustersGkeCreateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1SpectroClustersGkeCreateCreated) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1SpectroClustersGkeCreate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1SpectroClustersGkeRate gets g k e cluster estimated rate information +*/ +func (a *Client) V1SpectroClustersGkeRate(params *V1SpectroClustersGkeRateParams) (*V1SpectroClustersGkeRateOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1SpectroClustersGkeRateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1SpectroClustersGkeRate", + Method: "POST", + PathPattern: "/v1/spectroclusters/gke/rate", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1SpectroClustersGkeRateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1SpectroClustersGkeRateOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1SpectroClustersGkeRate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1SpectroClustersGkeValidate validates g k e cluster create operation +*/ +func (a *Client) V1SpectroClustersGkeValidate(params *V1SpectroClustersGkeValidateParams) (*V1SpectroClustersGkeValidateOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1SpectroClustersGkeValidateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1SpectroClustersGkeValidate", + Method: "POST", + PathPattern: "/v1/spectroclusters/gke/validate", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1SpectroClustersGkeValidateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1SpectroClustersGkeValidateOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1SpectroClustersGkeValidate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1SpectroClustersK8Certificate gets k8 certificate for spectro cluster +*/ +func (a *Client) V1SpectroClustersK8Certificate(params *V1SpectroClustersK8CertificateParams) (*V1SpectroClustersK8CertificateOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1SpectroClustersK8CertificateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1SpectroClustersK8Certificate", + Method: "GET", + PathPattern: "/v1/spectroclusters/{uid}/k8certificates", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1SpectroClustersK8CertificateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1SpectroClustersK8CertificateOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1SpectroClustersK8Certificate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1SpectroClustersMaasCreate creates a m a a s cluster +*/ +func (a *Client) V1SpectroClustersMaasCreate(params *V1SpectroClustersMaasCreateParams) (*V1SpectroClustersMaasCreateCreated, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1SpectroClustersMaasCreateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1SpectroClustersMaasCreate", + Method: "POST", + PathPattern: "/v1/spectroclusters/maas", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1SpectroClustersMaasCreateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1SpectroClustersMaasCreateCreated) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1SpectroClustersMaasCreate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1SpectroClustersMaasImport imports a maas cluster +*/ +func (a *Client) V1SpectroClustersMaasImport(params *V1SpectroClustersMaasImportParams) (*V1SpectroClustersMaasImportCreated, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1SpectroClustersMaasImportParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1SpectroClustersMaasImport", + Method: "POST", + PathPattern: "/v1/spectroclusters/maas/import", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1SpectroClustersMaasImportReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1SpectroClustersMaasImportCreated) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1SpectroClustersMaasImport: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1SpectroClustersMaasRate gets maas cluster estimated rate information +*/ +func (a *Client) V1SpectroClustersMaasRate(params *V1SpectroClustersMaasRateParams) (*V1SpectroClustersMaasRateOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1SpectroClustersMaasRateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1SpectroClustersMaasRate", + Method: "POST", + PathPattern: "/v1/spectroclusters/maas/rate", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1SpectroClustersMaasRateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1SpectroClustersMaasRateOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1SpectroClustersMaasRate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1SpectroClustersMaasValidate validates m a a s cluster create operation +*/ +func (a *Client) V1SpectroClustersMaasValidate(params *V1SpectroClustersMaasValidateParams) (*V1SpectroClustersMaasValidateOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1SpectroClustersMaasValidateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1SpectroClustersMaasValidate", + Method: "POST", + PathPattern: "/v1/spectroclusters/maas/validate", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1SpectroClustersMaasValidateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1SpectroClustersMaasValidateOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1SpectroClustersMaasValidate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1SpectroClustersMetadata retrieves a list of cluster summary +*/ +func (a *Client) V1SpectroClustersMetadata(params *V1SpectroClustersMetadataParams) (*V1SpectroClustersMetadataOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1SpectroClustersMetadataParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1SpectroClustersMetadata", + Method: "POST", + PathPattern: "/v1/dashboard/spectroclusters/metadata", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1SpectroClustersMetadataReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1SpectroClustersMetadataOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1SpectroClustersMetadata: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1SpectroClustersMetadataGet retrieves a list of cluster summary metadata +*/ +func (a *Client) V1SpectroClustersMetadataGet(params *V1SpectroClustersMetadataGetParams) (*V1SpectroClustersMetadataGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1SpectroClustersMetadataGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1SpectroClustersMetadataGet", + Method: "GET", + PathPattern: "/v1/dashboard/spectroclusters/metadata", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1SpectroClustersMetadataGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1SpectroClustersMetadataGetOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1SpectroClustersMetadataGet: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1SpectroClustersMetadataSearch retrieves a list of cluster metadata with provided search filter spec supported sort fields environment cluster name cluster state creation timestamp last modified timestamp +*/ +func (a *Client) V1SpectroClustersMetadataSearch(params *V1SpectroClustersMetadataSearchParams) (*V1SpectroClustersMetadataSearchOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1SpectroClustersMetadataSearchParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1SpectroClustersMetadataSearch", + Method: "POST", + PathPattern: "/v1/dashboard/spectroclusters/metadata/search", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1SpectroClustersMetadataSearchReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1SpectroClustersMetadataSearchOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1SpectroClustersMetadataSearch: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1SpectroClustersMetadataSearchSchema retrieves a schema for the cluster metadata search filter +*/ +func (a *Client) V1SpectroClustersMetadataSearchSchema(params *V1SpectroClustersMetadataSearchSchemaParams) (*V1SpectroClustersMetadataSearchSchemaOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1SpectroClustersMetadataSearchSchemaParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1SpectroClustersMetadataSearchSchema", + Method: "GET", + PathPattern: "/v1/dashboard/spectroclusters/metadata/search/schema", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1SpectroClustersMetadataSearchSchemaReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1SpectroClustersMetadataSearchSchemaOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1SpectroClustersMetadataSearchSchema: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1SpectroClustersOpenStackCreate creates a open stack cluster +*/ +func (a *Client) V1SpectroClustersOpenStackCreate(params *V1SpectroClustersOpenStackCreateParams) (*V1SpectroClustersOpenStackCreateCreated, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1SpectroClustersOpenStackCreateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1SpectroClustersOpenStackCreate", + Method: "POST", + PathPattern: "/v1/spectroclusters/openstack", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1SpectroClustersOpenStackCreateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1SpectroClustersOpenStackCreateCreated) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1SpectroClustersOpenStackCreate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1SpectroClustersOpenStackImport imports an open stack cluster +*/ +func (a *Client) V1SpectroClustersOpenStackImport(params *V1SpectroClustersOpenStackImportParams) (*V1SpectroClustersOpenStackImportCreated, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1SpectroClustersOpenStackImportParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1SpectroClustersOpenStackImport", + Method: "POST", + PathPattern: "/v1/spectroclusters/openstack/import", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1SpectroClustersOpenStackImportReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1SpectroClustersOpenStackImportCreated) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1SpectroClustersOpenStackImport: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1SpectroClustersOpenStackRate gets openstack cluster estimated rate information +*/ +func (a *Client) V1SpectroClustersOpenStackRate(params *V1SpectroClustersOpenStackRateParams) (*V1SpectroClustersOpenStackRateOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1SpectroClustersOpenStackRateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1SpectroClustersOpenStackRate", + Method: "POST", + PathPattern: "/v1/spectroclusters/openstack/rate", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1SpectroClustersOpenStackRateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1SpectroClustersOpenStackRateOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1SpectroClustersOpenStackRate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1SpectroClustersOpenStackValidate validates open stack cluster create operation +*/ +func (a *Client) V1SpectroClustersOpenStackValidate(params *V1SpectroClustersOpenStackValidateParams) (*V1SpectroClustersOpenStackValidateOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1SpectroClustersOpenStackValidateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1SpectroClustersOpenStackValidate", + Method: "POST", + PathPattern: "/v1/spectroclusters/openstack/validate", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1SpectroClustersOpenStackValidateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1SpectroClustersOpenStackValidateOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1SpectroClustersOpenStackValidate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1SpectroClustersPacksRefUpdate updates the cluster s pack references +*/ +func (a *Client) V1SpectroClustersPacksRefUpdate(params *V1SpectroClustersPacksRefUpdateParams) (*V1SpectroClustersPacksRefUpdateNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1SpectroClustersPacksRefUpdateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1SpectroClustersPacksRefUpdate", + Method: "PATCH", + PathPattern: "/v1/spectroclusters/{uid}/packRefs", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1SpectroClustersPacksRefUpdateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1SpectroClustersPacksRefUpdateNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1SpectroClustersPacksRefUpdate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1SpectroClustersPatchProfiles patches cluster profiles to the specified cluster +*/ +func (a *Client) V1SpectroClustersPatchProfiles(params *V1SpectroClustersPatchProfilesParams) (*V1SpectroClustersPatchProfilesNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1SpectroClustersPatchProfilesParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1SpectroClustersPatchProfiles", + Method: "PATCH", + PathPattern: "/v1/spectroclusters/{uid}/profiles", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1SpectroClustersPatchProfilesReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1SpectroClustersPatchProfilesNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1SpectroClustersPatchProfiles: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1SpectroClustersProfilesUIDPackManifestsGet returns the associated profiles pack manifests of the specified cluster +*/ +func (a *Client) V1SpectroClustersProfilesUIDPackManifestsGet(params *V1SpectroClustersProfilesUIDPackManifestsGetParams) (*V1SpectroClustersProfilesUIDPackManifestsGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1SpectroClustersProfilesUIDPackManifestsGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1SpectroClustersProfilesUidPackManifestsGet", + Method: "GET", + PathPattern: "/v1/spectroclusters/{uid}/profiles/{profileUid}/packs/{packName}/manifests", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1SpectroClustersProfilesUIDPackManifestsGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1SpectroClustersProfilesUIDPackManifestsGetOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1SpectroClustersProfilesUidPackManifestsGet: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1SpectroClustersProfilesUIDPackManifestsUpdate updates cluster profiles pack manifests to the specified cluster +*/ +func (a *Client) V1SpectroClustersProfilesUIDPackManifestsUpdate(params *V1SpectroClustersProfilesUIDPackManifestsUpdateParams) (*V1SpectroClustersProfilesUIDPackManifestsUpdateNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1SpectroClustersProfilesUIDPackManifestsUpdateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1SpectroClustersProfilesUidPackManifestsUpdate", + Method: "PUT", + PathPattern: "/v1/spectroclusters/{uid}/profiles/{profileUid}/packs/{packName}/manifests", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1SpectroClustersProfilesUIDPackManifestsUpdateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1SpectroClustersProfilesUIDPackManifestsUpdateNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1SpectroClustersProfilesUidPackManifestsUpdate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1SpectroClustersResourcesConsumption retrieves spectro clusters resource consumption +*/ +func (a *Client) V1SpectroClustersResourcesConsumption(params *V1SpectroClustersResourcesConsumptionParams) (*V1SpectroClustersResourcesConsumptionOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1SpectroClustersResourcesConsumptionParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1SpectroClustersResourcesConsumption", + Method: "POST", + PathPattern: "/v1/dashboard/spectroclusters/resources/consumption", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1SpectroClustersResourcesConsumptionReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1SpectroClustersResourcesConsumptionOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1SpectroClustersResourcesConsumption: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1SpectroClustersResourcesCostSummary retrieves spectro clusters resources cost summary information +*/ +func (a *Client) V1SpectroClustersResourcesCostSummary(params *V1SpectroClustersResourcesCostSummaryParams) (*V1SpectroClustersResourcesCostSummaryOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1SpectroClustersResourcesCostSummaryParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1SpectroClustersResourcesCostSummary", + Method: "POST", + PathPattern: "/v1/dashboard/spectroclusters/resources/cost", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1SpectroClustersResourcesCostSummaryReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1SpectroClustersResourcesCostSummaryOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1SpectroClustersResourcesCostSummary: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1SpectroClustersResourcesUsageSummary retrieves spectro clusters resources usage summary information +*/ +func (a *Client) V1SpectroClustersResourcesUsageSummary(params *V1SpectroClustersResourcesUsageSummaryParams) (*V1SpectroClustersResourcesUsageSummaryOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1SpectroClustersResourcesUsageSummaryParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1SpectroClustersResourcesUsageSummary", + Method: "POST", + PathPattern: "/v1/dashboard/spectroclusters/resources/usage", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1SpectroClustersResourcesUsageSummaryReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1SpectroClustersResourcesUsageSummaryOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1SpectroClustersResourcesUsageSummary: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1SpectroClustersSearchFilterSummary retrieves a list of cluster summary with provided search filter spec supported sort fields environment cluster name memory usage health state creation timestamp last modified timestamp +*/ +func (a *Client) V1SpectroClustersSearchFilterSummary(params *V1SpectroClustersSearchFilterSummaryParams) (*V1SpectroClustersSearchFilterSummaryOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1SpectroClustersSearchFilterSummaryParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1SpectroClustersSearchFilterSummary", + Method: "POST", + PathPattern: "/v1/dashboard/spectroclusters/search", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1SpectroClustersSearchFilterSummaryReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1SpectroClustersSearchFilterSummaryOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1SpectroClustersSearchFilterSummary: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1SpectroClustersSearchSchema retrieves a schema for the cluster search filter +*/ +func (a *Client) V1SpectroClustersSearchSchema(params *V1SpectroClustersSearchSchemaParams) (*V1SpectroClustersSearchSchemaOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1SpectroClustersSearchSchemaParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1SpectroClustersSearchSchema", + Method: "GET", + PathPattern: "/v1/dashboard/spectroclusters/search/schema", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1SpectroClustersSearchSchemaReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1SpectroClustersSearchSchemaOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1SpectroClustersSearchSchema: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1SpectroClustersSpcDownload downloads the cluster definition archive file +*/ +func (a *Client) V1SpectroClustersSpcDownload(params *V1SpectroClustersSpcDownloadParams, writer io.Writer) (*V1SpectroClustersSpcDownloadOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1SpectroClustersSpcDownloadParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1SpectroClustersSpcDownload", + Method: "POST", + PathPattern: "/v1/spectroclusters/spc/download", + ProducesMediaTypes: []string{"application/octet-stream"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1SpectroClustersSpcDownloadReader{formats: a.formats, writer: writer}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1SpectroClustersSpcDownloadOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1SpectroClustersSpcDownload: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1SpectroClustersSummaryUID returns the specified cluster summary +*/ +func (a *Client) V1SpectroClustersSummaryUID(params *V1SpectroClustersSummaryUIDParams) (*V1SpectroClustersSummaryUIDOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1SpectroClustersSummaryUIDParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1SpectroClustersSummaryUid", + Method: "GET", + PathPattern: "/v1/dashboard/spectroclusters/{uid}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1SpectroClustersSummaryUIDReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1SpectroClustersSummaryUIDOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1SpectroClustersSummaryUid: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1SpectroClustersSummaryUIDOverview returns the specified cluster summary overview +*/ +func (a *Client) V1SpectroClustersSummaryUIDOverview(params *V1SpectroClustersSummaryUIDOverviewParams) (*V1SpectroClustersSummaryUIDOverviewOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1SpectroClustersSummaryUIDOverviewParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1SpectroClustersSummaryUidOverview", + Method: "GET", + PathPattern: "/v1/dashboard/spectroclusters/{uid}/overview", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1SpectroClustersSummaryUIDOverviewReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1SpectroClustersSummaryUIDOverviewOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1SpectroClustersSummaryUidOverview: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1SpectroClustersTkeCreate creates a tke cluster +*/ +func (a *Client) V1SpectroClustersTkeCreate(params *V1SpectroClustersTkeCreateParams) (*V1SpectroClustersTkeCreateCreated, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1SpectroClustersTkeCreateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1SpectroClustersTkeCreate", + Method: "POST", + PathPattern: "/v1/spectroclusters/tke", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1SpectroClustersTkeCreateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1SpectroClustersTkeCreateCreated) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1SpectroClustersTkeCreate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1SpectroClustersTkeRate gets t k e cluster estimated rate information +*/ +func (a *Client) V1SpectroClustersTkeRate(params *V1SpectroClustersTkeRateParams) (*V1SpectroClustersTkeRateOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1SpectroClustersTkeRateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1SpectroClustersTkeRate", + Method: "POST", + PathPattern: "/v1/spectroclusters/tke/rate", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1SpectroClustersTkeRateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1SpectroClustersTkeRateOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1SpectroClustersTkeRate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1SpectroClustersTkeValidate validates t k e cluster create operation +*/ +func (a *Client) V1SpectroClustersTkeValidate(params *V1SpectroClustersTkeValidateParams) (*V1SpectroClustersTkeValidateOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1SpectroClustersTkeValidateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1SpectroClustersTkeValidate", + Method: "POST", + PathPattern: "/v1/spectroclusters/tke/validate", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1SpectroClustersTkeValidateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1SpectroClustersTkeValidateOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1SpectroClustersTkeValidate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1SpectroClustersUIDAdminKubeConfig returns the specified cluster s kube config file +*/ +func (a *Client) V1SpectroClustersUIDAdminKubeConfig(params *V1SpectroClustersUIDAdminKubeConfigParams, writer io.Writer) (*V1SpectroClustersUIDAdminKubeConfigOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1SpectroClustersUIDAdminKubeConfigParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1SpectroClustersUidAdminKubeConfig", + Method: "GET", + PathPattern: "/v1/spectroclusters/{uid}/assets/adminKubeconfig", + ProducesMediaTypes: []string{"application/octet-stream"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1SpectroClustersUIDAdminKubeConfigReader{formats: a.formats, writer: writer}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1SpectroClustersUIDAdminKubeConfigOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1SpectroClustersUidAdminKubeConfig: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1SpectroClustersUIDAssets associates the assets for the cluster +*/ +func (a *Client) V1SpectroClustersUIDAssets(params *V1SpectroClustersUIDAssetsParams) (*V1SpectroClustersUIDAssetsNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1SpectroClustersUIDAssetsParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1SpectroClustersUidAssets", + Method: "POST", + PathPattern: "/v1/spectroclusters/{uid}/assets", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1SpectroClustersUIDAssetsReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1SpectroClustersUIDAssetsNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1SpectroClustersUidAssets: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1SpectroClustersUIDAssetsGet gets the cluster asset doc +*/ +func (a *Client) V1SpectroClustersUIDAssetsGet(params *V1SpectroClustersUIDAssetsGetParams) (*V1SpectroClustersUIDAssetsGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1SpectroClustersUIDAssetsGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1SpectroClustersUidAssetsGet", + Method: "GET", + PathPattern: "/v1/spectroclusters/{uid}/assets", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1SpectroClustersUIDAssetsGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1SpectroClustersUIDAssetsGetOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1SpectroClustersUidAssetsGet: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1SpectroClustersUIDClusterMetaAttributeUpdate updates the specified cluster meta attribute +*/ +func (a *Client) V1SpectroClustersUIDClusterMetaAttributeUpdate(params *V1SpectroClustersUIDClusterMetaAttributeUpdateParams) (*V1SpectroClustersUIDClusterMetaAttributeUpdateNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1SpectroClustersUIDClusterMetaAttributeUpdateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1SpectroClustersUidClusterMetaAttributeUpdate", + Method: "PATCH", + PathPattern: "/v1/spectroclusters/{uid}/clusterConfig/clusterMetaAttribute", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1SpectroClustersUIDClusterMetaAttributeUpdateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1SpectroClustersUIDClusterMetaAttributeUpdateNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1SpectroClustersUidClusterMetaAttributeUpdate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1SpectroClustersUIDConfigNamespacesGet retrieves namespaces for the specified cluster +*/ +func (a *Client) V1SpectroClustersUIDConfigNamespacesGet(params *V1SpectroClustersUIDConfigNamespacesGetParams) (*V1SpectroClustersUIDConfigNamespacesGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1SpectroClustersUIDConfigNamespacesGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1SpectroClustersUidConfigNamespacesGet", + Method: "GET", + PathPattern: "/v1/spectroclusters/{uid}/config/namespaces", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1SpectroClustersUIDConfigNamespacesGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1SpectroClustersUIDConfigNamespacesGetOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1SpectroClustersUidConfigNamespacesGet: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1SpectroClustersUIDConfigNamespacesUIDGet retrieves the specified namespace of the cluster +*/ +func (a *Client) V1SpectroClustersUIDConfigNamespacesUIDGet(params *V1SpectroClustersUIDConfigNamespacesUIDGetParams) (*V1SpectroClustersUIDConfigNamespacesUIDGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1SpectroClustersUIDConfigNamespacesUIDGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1SpectroClustersUidConfigNamespacesUidGet", + Method: "GET", + PathPattern: "/v1/spectroclusters/{uid}/config/namespaces/{namespaceUid}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1SpectroClustersUIDConfigNamespacesUIDGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1SpectroClustersUIDConfigNamespacesUIDGetOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1SpectroClustersUidConfigNamespacesUidGet: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1SpectroClustersUIDConfigNamespacesUIDUpdate updates the specified namespace of the cluster +*/ +func (a *Client) V1SpectroClustersUIDConfigNamespacesUIDUpdate(params *V1SpectroClustersUIDConfigNamespacesUIDUpdateParams) (*V1SpectroClustersUIDConfigNamespacesUIDUpdateNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1SpectroClustersUIDConfigNamespacesUIDUpdateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1SpectroClustersUidConfigNamespacesUidUpdate", + Method: "PUT", + PathPattern: "/v1/spectroclusters/{uid}/config/namespaces/{namespaceUid}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1SpectroClustersUIDConfigNamespacesUIDUpdateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1SpectroClustersUIDConfigNamespacesUIDUpdateNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1SpectroClustersUidConfigNamespacesUidUpdate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1SpectroClustersUIDConfigNamespacesUpdate updates namespaces for the specified cluster +*/ +func (a *Client) V1SpectroClustersUIDConfigNamespacesUpdate(params *V1SpectroClustersUIDConfigNamespacesUpdateParams) (*V1SpectroClustersUIDConfigNamespacesUpdateNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1SpectroClustersUIDConfigNamespacesUpdateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1SpectroClustersUidConfigNamespacesUpdate", + Method: "PUT", + PathPattern: "/v1/spectroclusters/{uid}/config/namespaces", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1SpectroClustersUIDConfigNamespacesUpdateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1SpectroClustersUIDConfigNamespacesUpdateNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1SpectroClustersUidConfigNamespacesUpdate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1SpectroClustersUIDConfigRbacsGet retrieves r b a c information for the specified cluster +*/ +func (a *Client) V1SpectroClustersUIDConfigRbacsGet(params *V1SpectroClustersUIDConfigRbacsGetParams) (*V1SpectroClustersUIDConfigRbacsGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1SpectroClustersUIDConfigRbacsGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1SpectroClustersUidConfigRbacsGet", + Method: "GET", + PathPattern: "/v1/spectroclusters/{uid}/config/rbacs", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1SpectroClustersUIDConfigRbacsGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1SpectroClustersUIDConfigRbacsGetOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1SpectroClustersUidConfigRbacsGet: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1SpectroClustersUIDConfigRbacsUIDGet retrieves the specified r b a c of the cluster +*/ +func (a *Client) V1SpectroClustersUIDConfigRbacsUIDGet(params *V1SpectroClustersUIDConfigRbacsUIDGetParams) (*V1SpectroClustersUIDConfigRbacsUIDGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1SpectroClustersUIDConfigRbacsUIDGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1SpectroClustersUidConfigRbacsUidGet", + Method: "GET", + PathPattern: "/v1/spectroclusters/{uid}/config/rbacs/{rbacUid}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1SpectroClustersUIDConfigRbacsUIDGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1SpectroClustersUIDConfigRbacsUIDGetOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1SpectroClustersUidConfigRbacsUidGet: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1SpectroClustersUIDConfigRbacsUIDUpdate updates the specified r b a c of the cluster +*/ +func (a *Client) V1SpectroClustersUIDConfigRbacsUIDUpdate(params *V1SpectroClustersUIDConfigRbacsUIDUpdateParams) (*V1SpectroClustersUIDConfigRbacsUIDUpdateNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1SpectroClustersUIDConfigRbacsUIDUpdateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1SpectroClustersUidConfigRbacsUidUpdate", + Method: "PUT", + PathPattern: "/v1/spectroclusters/{uid}/config/rbacs/{rbacUid}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1SpectroClustersUIDConfigRbacsUIDUpdateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1SpectroClustersUIDConfigRbacsUIDUpdateNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1SpectroClustersUidConfigRbacsUidUpdate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1SpectroClustersUIDConfigRbacsUpdate updates r b a c information for the specified cluster +*/ +func (a *Client) V1SpectroClustersUIDConfigRbacsUpdate(params *V1SpectroClustersUIDConfigRbacsUpdateParams) (*V1SpectroClustersUIDConfigRbacsUpdateNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1SpectroClustersUIDConfigRbacsUpdateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1SpectroClustersUidConfigRbacsUpdate", + Method: "PUT", + PathPattern: "/v1/spectroclusters/{uid}/config/rbacs", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1SpectroClustersUIDConfigRbacsUpdateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1SpectroClustersUIDConfigRbacsUpdateNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1SpectroClustersUidConfigRbacsUpdate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1SpectroClustersUIDCostSummary retrieves the specified cluster cost summary +*/ +func (a *Client) V1SpectroClustersUIDCostSummary(params *V1SpectroClustersUIDCostSummaryParams) (*V1SpectroClustersUIDCostSummaryOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1SpectroClustersUIDCostSummaryParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1SpectroClustersUidCostSummary", + Method: "GET", + PathPattern: "/v1/dashboard/spectroclusters/{uid}/cost", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1SpectroClustersUIDCostSummaryReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1SpectroClustersUIDCostSummaryOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1SpectroClustersUidCostSummary: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1SpectroClustersUIDDownload downloads the specified cluster +*/ +func (a *Client) V1SpectroClustersUIDDownload(params *V1SpectroClustersUIDDownloadParams, writer io.Writer) (*V1SpectroClustersUIDDownloadOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1SpectroClustersUIDDownloadParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1SpectroClustersUidDownload", + Method: "GET", + PathPattern: "/v1/spectroclusters/{uid}/download", + ProducesMediaTypes: []string{"application/octet-stream"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1SpectroClustersUIDDownloadReader{formats: a.formats, writer: writer}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1SpectroClustersUIDDownloadOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1SpectroClustersUidDownload: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1SpectroClustersUIDFrpKubeConfigDelete deletes the cluster s frp kube config client data +*/ +func (a *Client) V1SpectroClustersUIDFrpKubeConfigDelete(params *V1SpectroClustersUIDFrpKubeConfigDeleteParams) (*V1SpectroClustersUIDFrpKubeConfigDeleteNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1SpectroClustersUIDFrpKubeConfigDeleteParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1SpectroClustersUidFrpKubeConfigDelete", + Method: "DELETE", + PathPattern: "/v1/spectroclusters/{uid}/assets/frpKubeconfig", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1SpectroClustersUIDFrpKubeConfigDeleteReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1SpectroClustersUIDFrpKubeConfigDeleteNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1SpectroClustersUidFrpKubeConfigDelete: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1SpectroClustersUIDFrpKubeConfigGet returns the specified cluster s frp kube config file +*/ +func (a *Client) V1SpectroClustersUIDFrpKubeConfigGet(params *V1SpectroClustersUIDFrpKubeConfigGetParams, writer io.Writer) (*V1SpectroClustersUIDFrpKubeConfigGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1SpectroClustersUIDFrpKubeConfigGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1SpectroClustersUidFrpKubeConfigGet", + Method: "GET", + PathPattern: "/v1/spectroclusters/{uid}/assets/frpKubeconfig", + ProducesMediaTypes: []string{"application/octet-stream"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1SpectroClustersUIDFrpKubeConfigGetReader{formats: a.formats, writer: writer}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1SpectroClustersUIDFrpKubeConfigGetOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1SpectroClustersUidFrpKubeConfigGet: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1SpectroClustersUIDFrpKubeConfigUpdate updates the cluster s frp kube config data +*/ +func (a *Client) V1SpectroClustersUIDFrpKubeConfigUpdate(params *V1SpectroClustersUIDFrpKubeConfigUpdateParams) (*V1SpectroClustersUIDFrpKubeConfigUpdateNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1SpectroClustersUIDFrpKubeConfigUpdateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1SpectroClustersUidFrpKubeConfigUpdate", + Method: "PUT", + PathPattern: "/v1/spectroclusters/{uid}/assets/frpKubeconfig", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1SpectroClustersUIDFrpKubeConfigUpdateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1SpectroClustersUIDFrpKubeConfigUpdateNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1SpectroClustersUidFrpKubeConfigUpdate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1SpectroClustersUIDImportManifest returns the specified cluster s import manifest file +*/ +func (a *Client) V1SpectroClustersUIDImportManifest(params *V1SpectroClustersUIDImportManifestParams, writer io.Writer) (*V1SpectroClustersUIDImportManifestOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1SpectroClustersUIDImportManifestParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1SpectroClustersUidImportManifest", + Method: "GET", + PathPattern: "/v1/spectroclusters/{uid}/import/manifest", + ProducesMediaTypes: []string{"application/octet-stream"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1SpectroClustersUIDImportManifestReader{formats: a.formats, writer: writer}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1SpectroClustersUIDImportManifestOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1SpectroClustersUidImportManifest: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1SpectroClustersUIDImportUpgradePatch upgrades the specified imported read only cluster with full permissions +*/ +func (a *Client) V1SpectroClustersUIDImportUpgradePatch(params *V1SpectroClustersUIDImportUpgradePatchParams) (*V1SpectroClustersUIDImportUpgradePatchNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1SpectroClustersUIDImportUpgradePatchParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1SpectroClustersUidImportUpgradePatch", + Method: "PATCH", + PathPattern: "/v1/spectroclusters/{uid}/import/upgrade", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1SpectroClustersUIDImportUpgradePatchReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1SpectroClustersUIDImportUpgradePatchNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1SpectroClustersUidImportUpgradePatch: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1SpectroClustersUIDKubeConfig returns the specified cluster s kube config file +*/ +func (a *Client) V1SpectroClustersUIDKubeConfig(params *V1SpectroClustersUIDKubeConfigParams, writer io.Writer) (*V1SpectroClustersUIDKubeConfigOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1SpectroClustersUIDKubeConfigParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1SpectroClustersUidKubeConfig", + Method: "GET", + PathPattern: "/v1/spectroclusters/{uid}/assets/kubeconfig", + ProducesMediaTypes: []string{"application/octet-stream"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1SpectroClustersUIDKubeConfigReader{formats: a.formats, writer: writer}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1SpectroClustersUIDKubeConfigOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1SpectroClustersUidKubeConfig: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1SpectroClustersUIDKubeConfigClientDelete deletes the cluster s kube config client data +*/ +func (a *Client) V1SpectroClustersUIDKubeConfigClientDelete(params *V1SpectroClustersUIDKubeConfigClientDeleteParams) (*V1SpectroClustersUIDKubeConfigClientDeleteNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1SpectroClustersUIDKubeConfigClientDeleteParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1SpectroClustersUidKubeConfigClientDelete", + Method: "DELETE", + PathPattern: "/v1/spectroclusters/{uid}/assets/kubeconfigclient", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1SpectroClustersUIDKubeConfigClientDeleteReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1SpectroClustersUIDKubeConfigClientDeleteNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1SpectroClustersUidKubeConfigClientDelete: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1SpectroClustersUIDKubeConfigClientGet returns the specified cluster s kube config client file +*/ +func (a *Client) V1SpectroClustersUIDKubeConfigClientGet(params *V1SpectroClustersUIDKubeConfigClientGetParams, writer io.Writer) (*V1SpectroClustersUIDKubeConfigClientGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1SpectroClustersUIDKubeConfigClientGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1SpectroClustersUidKubeConfigClientGet", + Method: "GET", + PathPattern: "/v1/spectroclusters/{uid}/assets/kubeconfigclient", + ProducesMediaTypes: []string{"application/octet-stream"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1SpectroClustersUIDKubeConfigClientGetReader{formats: a.formats, writer: writer}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1SpectroClustersUIDKubeConfigClientGetOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1SpectroClustersUidKubeConfigClientGet: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1SpectroClustersUIDKubeConfigClientUpdate updates the cluster s kube config client data +*/ +func (a *Client) V1SpectroClustersUIDKubeConfigClientUpdate(params *V1SpectroClustersUIDKubeConfigClientUpdateParams) (*V1SpectroClustersUIDKubeConfigClientUpdateNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1SpectroClustersUIDKubeConfigClientUpdateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1SpectroClustersUidKubeConfigClientUpdate", + Method: "PUT", + PathPattern: "/v1/spectroclusters/{uid}/assets/kubeconfigclient", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1SpectroClustersUIDKubeConfigClientUpdateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1SpectroClustersUIDKubeConfigClientUpdateNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1SpectroClustersUidKubeConfigClientUpdate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1SpectroClustersUIDKubeConfigUpdate updates the cluster s manifest data +*/ +func (a *Client) V1SpectroClustersUIDKubeConfigUpdate(params *V1SpectroClustersUIDKubeConfigUpdateParams) (*V1SpectroClustersUIDKubeConfigUpdateNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1SpectroClustersUIDKubeConfigUpdateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1SpectroClustersUidKubeConfigUpdate", + Method: "PUT", + PathPattern: "/v1/spectroclusters/{uid}/assets/kubeconfig", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1SpectroClustersUIDKubeConfigUpdateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1SpectroClustersUIDKubeConfigUpdateNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1SpectroClustersUidKubeConfigUpdate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1SpectroClustersUIDLifecycleConfigUpdate updates the specified cluster life cycle configuration +*/ +func (a *Client) V1SpectroClustersUIDLifecycleConfigUpdate(params *V1SpectroClustersUIDLifecycleConfigUpdateParams) (*V1SpectroClustersUIDLifecycleConfigUpdateNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1SpectroClustersUIDLifecycleConfigUpdateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1SpectroClustersUidLifecycleConfigUpdate", + Method: "PATCH", + PathPattern: "/v1/spectroclusters/{uid}/clusterConfig/lifecycleConfig", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1SpectroClustersUIDLifecycleConfigUpdateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1SpectroClustersUIDLifecycleConfigUpdateNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1SpectroClustersUidLifecycleConfigUpdate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1SpectroClustersUIDLocationPut associates the assets for the cluster +*/ +func (a *Client) V1SpectroClustersUIDLocationPut(params *V1SpectroClustersUIDLocationPutParams) (*V1SpectroClustersUIDLocationPutNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1SpectroClustersUIDLocationPutParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1SpectroClustersUidLocationPut", + Method: "PUT", + PathPattern: "/v1/spectroclusters/{uid}/location", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1SpectroClustersUIDLocationPutReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1SpectroClustersUIDLocationPutNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1SpectroClustersUidLocationPut: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1SpectroClustersUIDManifestGet returns the specified cluster s manifest data +*/ +func (a *Client) V1SpectroClustersUIDManifestGet(params *V1SpectroClustersUIDManifestGetParams) (*V1SpectroClustersUIDManifestGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1SpectroClustersUIDManifestGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1SpectroClustersUidManifestGet", + Method: "GET", + PathPattern: "/v1/spectroclusters/{uid}/assets/manifest", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1SpectroClustersUIDManifestGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1SpectroClustersUIDManifestGetOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1SpectroClustersUidManifestGet: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1SpectroClustersUIDManifestUpdate updates the specified cluster s manifest data +*/ +func (a *Client) V1SpectroClustersUIDManifestUpdate(params *V1SpectroClustersUIDManifestUpdateParams) (*V1SpectroClustersUIDManifestUpdateNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1SpectroClustersUIDManifestUpdateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1SpectroClustersUidManifestUpdate", + Method: "PUT", + PathPattern: "/v1/spectroclusters/{uid}/assets/manifest", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1SpectroClustersUIDManifestUpdateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1SpectroClustersUIDManifestUpdateNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1SpectroClustersUidManifestUpdate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1SpectroClustersUIDMetadataUpdate updates the specified spectro cluster metadata +*/ +func (a *Client) V1SpectroClustersUIDMetadataUpdate(params *V1SpectroClustersUIDMetadataUpdateParams) (*V1SpectroClustersUIDMetadataUpdateNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1SpectroClustersUIDMetadataUpdateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1SpectroClustersUidMetadataUpdate", + Method: "PATCH", + PathPattern: "/v1/spectroclusters/{uid}/metadata", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1SpectroClustersUIDMetadataUpdateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1SpectroClustersUIDMetadataUpdateNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1SpectroClustersUidMetadataUpdate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1SpectroClustersUIDOsPatchUpdate updates the specified cluster o s patch configuration +*/ +func (a *Client) V1SpectroClustersUIDOsPatchUpdate(params *V1SpectroClustersUIDOsPatchUpdateParams) (*V1SpectroClustersUIDOsPatchUpdateNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1SpectroClustersUIDOsPatchUpdateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1SpectroClustersUidOsPatchUpdate", + Method: "PATCH", + PathPattern: "/v1/spectroclusters/{uid}/clusterConfig/osPatch", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1SpectroClustersUIDOsPatchUpdateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1SpectroClustersUIDOsPatchUpdateNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1SpectroClustersUidOsPatchUpdate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1SpectroClustersUIDPackManifestsUIDGet returns the specified cluster s manifest +*/ +func (a *Client) V1SpectroClustersUIDPackManifestsUIDGet(params *V1SpectroClustersUIDPackManifestsUIDGetParams) (*V1SpectroClustersUIDPackManifestsUIDGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1SpectroClustersUIDPackManifestsUIDGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1SpectroClustersUidPackManifestsUidGet", + Method: "GET", + PathPattern: "/v1/spectroclusters/{uid}/pack/manifests/{manifestUid}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1SpectroClustersUIDPackManifestsUIDGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1SpectroClustersUIDPackManifestsUIDGetOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1SpectroClustersUidPackManifestsUidGet: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1SpectroClustersUIDPackProperties gets specified cluster pack properties +*/ +func (a *Client) V1SpectroClustersUIDPackProperties(params *V1SpectroClustersUIDPackPropertiesParams) (*V1SpectroClustersUIDPackPropertiesOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1SpectroClustersUIDPackPropertiesParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1SpectroClustersUidPackProperties", + Method: "GET", + PathPattern: "/v1/spectroclusters/{uid}/pack/properties", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1SpectroClustersUIDPackPropertiesReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1SpectroClustersUIDPackPropertiesOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1SpectroClustersUidPackProperties: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1SpectroClustersUIDPacksResolvedValuesGet returns the specified cluster s packs resolved values +*/ +func (a *Client) V1SpectroClustersUIDPacksResolvedValuesGet(params *V1SpectroClustersUIDPacksResolvedValuesGetParams) (*V1SpectroClustersUIDPacksResolvedValuesGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1SpectroClustersUIDPacksResolvedValuesGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1SpectroClustersUidPacksResolvedValuesGet", + Method: "GET", + PathPattern: "/v1/spectroclusters/{uid}/packs/resolvedValues", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1SpectroClustersUIDPacksResolvedValuesGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1SpectroClustersUIDPacksResolvedValuesGetOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1SpectroClustersUidPacksResolvedValuesGet: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1SpectroClustersUIDPacksStatusPatch patches update specified cluster s packs status +*/ +func (a *Client) V1SpectroClustersUIDPacksStatusPatch(params *V1SpectroClustersUIDPacksStatusPatchParams) (*V1SpectroClustersUIDPacksStatusPatchNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1SpectroClustersUIDPacksStatusPatchParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1SpectroClustersUidPacksStatusPatch", + Method: "PATCH", + PathPattern: "/v1/spectroclusters/{uid}/packs/status", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1SpectroClustersUIDPacksStatusPatchReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1SpectroClustersUIDPacksStatusPatchNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1SpectroClustersUidPacksStatusPatch: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1SpectroClustersUIDProfilesUIDPacksConfigGet returns the specified cluster s profile pack configuration +*/ +func (a *Client) V1SpectroClustersUIDProfilesUIDPacksConfigGet(params *V1SpectroClustersUIDProfilesUIDPacksConfigGetParams) (*V1SpectroClustersUIDProfilesUIDPacksConfigGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1SpectroClustersUIDProfilesUIDPacksConfigGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1SpectroClustersUidProfilesUidPacksConfigGet", + Method: "GET", + PathPattern: "/v1/spectroclusters/{uid}/profiles/{profileUid}/packs/{packName}/config", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1SpectroClustersUIDProfilesUIDPacksConfigGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1SpectroClustersUIDProfilesUIDPacksConfigGetOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1SpectroClustersUidProfilesUidPacksConfigGet: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1SpectroClustersUIDRate returns the estimated rate of the specified cluster +*/ +func (a *Client) V1SpectroClustersUIDRate(params *V1SpectroClustersUIDRateParams) (*V1SpectroClustersUIDRateOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1SpectroClustersUIDRateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1SpectroClustersUidRate", + Method: "GET", + PathPattern: "/v1/spectroclusters/{uid}/rate", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1SpectroClustersUIDRateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1SpectroClustersUIDRateOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1SpectroClustersUidRate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1SpectroClustersUIDRepaveApproveUpdate returns the spectrocluster repave approve update +*/ +func (a *Client) V1SpectroClustersUIDRepaveApproveUpdate(params *V1SpectroClustersUIDRepaveApproveUpdateParams) (*V1SpectroClustersUIDRepaveApproveUpdateNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1SpectroClustersUIDRepaveApproveUpdateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1SpectroClustersUidRepaveApproveUpdate", + Method: "PATCH", + PathPattern: "/v1/spectroclusters/{uid}/repave/approve", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1SpectroClustersUIDRepaveApproveUpdateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1SpectroClustersUIDRepaveApproveUpdateNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1SpectroClustersUidRepaveApproveUpdate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1SpectroClustersUIDRepaveGet returns the spectrocluster repave +*/ +func (a *Client) V1SpectroClustersUIDRepaveGet(params *V1SpectroClustersUIDRepaveGetParams) (*V1SpectroClustersUIDRepaveGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1SpectroClustersUIDRepaveGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1SpectroClustersUidRepaveGet", + Method: "GET", + PathPattern: "/v1/spectroclusters/{uid}/repave/status", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1SpectroClustersUIDRepaveGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1SpectroClustersUIDRepaveGetOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1SpectroClustersUidRepaveGet: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1SpectroClustersUIDResourcesConsumption retrieves specified spectro cluster resource consumption +*/ +func (a *Client) V1SpectroClustersUIDResourcesConsumption(params *V1SpectroClustersUIDResourcesConsumptionParams) (*V1SpectroClustersUIDResourcesConsumptionOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1SpectroClustersUIDResourcesConsumptionParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1SpectroClustersUidResourcesConsumption", + Method: "POST", + PathPattern: "/v1/dashboard/spectroclusters/{uid}/resources/consumption", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1SpectroClustersUIDResourcesConsumptionReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1SpectroClustersUIDResourcesConsumptionOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1SpectroClustersUidResourcesConsumption: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1SpectroClustersUIDStatus gets the cluster s status +*/ +func (a *Client) V1SpectroClustersUIDStatus(params *V1SpectroClustersUIDStatusParams) (*V1SpectroClustersUIDStatusOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1SpectroClustersUIDStatusParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1SpectroClustersUidStatus", + Method: "GET", + PathPattern: "/v1/spectroclusters/{uid}/status", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1SpectroClustersUIDStatusReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1SpectroClustersUIDStatusOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1SpectroClustersUidStatus: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1SpectroClustersUIDStatusSpcApply sets the can be applied to true on the spc apply status can be applied indicates the agent to orchestrate the spc changes +*/ +func (a *Client) V1SpectroClustersUIDStatusSpcApply(params *V1SpectroClustersUIDStatusSpcApplyParams) (*V1SpectroClustersUIDStatusSpcApplyAccepted, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1SpectroClustersUIDStatusSpcApplyParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1SpectroClustersUidStatusSpcApply", + Method: "POST", + PathPattern: "/v1/spectroclusters/{uid}/status/spcApply", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1SpectroClustersUIDStatusSpcApplyReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1SpectroClustersUIDStatusSpcApplyAccepted) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1SpectroClustersUidStatusSpcApply: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1SpectroClustersUIDStatusSpcApplyGet returns the s p c apply information for the agent +*/ +func (a *Client) V1SpectroClustersUIDStatusSpcApplyGet(params *V1SpectroClustersUIDStatusSpcApplyGetParams) (*V1SpectroClustersUIDStatusSpcApplyGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1SpectroClustersUIDStatusSpcApplyGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1SpectroClustersUidStatusSpcApplyGet", + Method: "GET", + PathPattern: "/v1/spectroclusters/{uid}/status/spcApply", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1SpectroClustersUIDStatusSpcApplyGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1SpectroClustersUIDStatusSpcApplyGetOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1SpectroClustersUidStatusSpcApplyGet: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1SpectroClustersUIDStatusSpcPatchTime updates the agent patch time for the s p c changes +*/ +func (a *Client) V1SpectroClustersUIDStatusSpcPatchTime(params *V1SpectroClustersUIDStatusSpcPatchTimeParams) (*V1SpectroClustersUIDStatusSpcPatchTimeNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1SpectroClustersUIDStatusSpcPatchTimeParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1SpectroClustersUidStatusSpcPatchTime", + Method: "PATCH", + PathPattern: "/v1/spectroclusters/{uid}/status/spcApply/patchTime", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1SpectroClustersUIDStatusSpcPatchTimeReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1SpectroClustersUIDStatusSpcPatchTimeNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1SpectroClustersUidStatusSpcPatchTime: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1SpectroClustersUIDUpgradeSettings updates specific cluster upgrade settings +*/ +func (a *Client) V1SpectroClustersUIDUpgradeSettings(params *V1SpectroClustersUIDUpgradeSettingsParams) (*V1SpectroClustersUIDUpgradeSettingsNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1SpectroClustersUIDUpgradeSettingsParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1SpectroClustersUidUpgradeSettings", + Method: "POST", + PathPattern: "/v1/spectroclusters/{uid}/upgrade/settings", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1SpectroClustersUIDUpgradeSettingsReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1SpectroClustersUIDUpgradeSettingsNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1SpectroClustersUidUpgradeSettings: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1SpectroClustersUIDUpgradesPut updates the cluster s upgrade status +*/ +func (a *Client) V1SpectroClustersUIDUpgradesPut(params *V1SpectroClustersUIDUpgradesPutParams) (*V1SpectroClustersUIDUpgradesPutNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1SpectroClustersUIDUpgradesPutParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1SpectroClustersUidUpgradesPut", + Method: "PUT", + PathPattern: "/v1/spectroclusters/{uid}/status/upgrades", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1SpectroClustersUIDUpgradesPutReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1SpectroClustersUIDUpgradesPutNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1SpectroClustersUidUpgradesPut: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1SpectroClustersUIDValidatePacks validates cluster packs +*/ +func (a *Client) V1SpectroClustersUIDValidatePacks(params *V1SpectroClustersUIDValidatePacksParams) (*V1SpectroClustersUIDValidatePacksOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1SpectroClustersUIDValidatePacksParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1SpectroClustersUidValidatePacks", + Method: "POST", + PathPattern: "/v1/spectroclusters/{uid}/validate/packs", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1SpectroClustersUIDValidatePacksReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1SpectroClustersUIDValidatePacksOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1SpectroClustersUidValidatePacks: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1SpectroClustersUIDValidateRepave validates if cluster gets repaved for the specified packs +*/ +func (a *Client) V1SpectroClustersUIDValidateRepave(params *V1SpectroClustersUIDValidateRepaveParams) (*V1SpectroClustersUIDValidateRepaveOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1SpectroClustersUIDValidateRepaveParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1SpectroClustersUidValidateRepave", + Method: "POST", + PathPattern: "/v1/spectroclusters/{uid}/validate/repave", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1SpectroClustersUIDValidateRepaveReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1SpectroClustersUIDValidateRepaveOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1SpectroClustersUidValidateRepave: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1SpectroClustersUIDVariablesGet retrieves a list of variables associated with the cluster +*/ +func (a *Client) V1SpectroClustersUIDVariablesGet(params *V1SpectroClustersUIDVariablesGetParams) (*V1SpectroClustersUIDVariablesGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1SpectroClustersUIDVariablesGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1SpectroClustersUidVariablesGet", + Method: "GET", + PathPattern: "/v1/spectroclusters/{uid}/variables", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1SpectroClustersUIDVariablesGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1SpectroClustersUIDVariablesGetOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1SpectroClustersUidVariablesGet: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1SpectroClustersUIDWorkloadsKindSync syncs specified cluster workload +*/ +func (a *Client) V1SpectroClustersUIDWorkloadsKindSync(params *V1SpectroClustersUIDWorkloadsKindSyncParams) (*V1SpectroClustersUIDWorkloadsKindSyncAccepted, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1SpectroClustersUIDWorkloadsKindSyncParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1SpectroClustersUidWorkloadsKindSync", + Method: "POST", + PathPattern: "/v1/spectroclusters/{uid}/workloads/{workloadKind}/sync", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1SpectroClustersUIDWorkloadsKindSyncReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1SpectroClustersUIDWorkloadsKindSyncAccepted) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1SpectroClustersUidWorkloadsKindSync: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1SpectroClustersUIDWorkloadsSync syncs specified cluster workload + +Sync specified cluster workload +*/ +func (a *Client) V1SpectroClustersUIDWorkloadsSync(params *V1SpectroClustersUIDWorkloadsSyncParams) (*V1SpectroClustersUIDWorkloadsSyncAccepted, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1SpectroClustersUIDWorkloadsSyncParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1SpectroClustersUidWorkloadsSync", + Method: "POST", + PathPattern: "/v1/spectroclusters/{uid}/workloads/sync", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1SpectroClustersUIDWorkloadsSyncReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1SpectroClustersUIDWorkloadsSyncAccepted) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1SpectroClustersUidWorkloadsSync: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1SpectroClustersUpdateProfiles associates cluster profiles to the specified cluster +*/ +func (a *Client) V1SpectroClustersUpdateProfiles(params *V1SpectroClustersUpdateProfilesParams) (*V1SpectroClustersUpdateProfilesNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1SpectroClustersUpdateProfilesParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1SpectroClustersUpdateProfiles", + Method: "PUT", + PathPattern: "/v1/spectroclusters/{uid}/profiles", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1SpectroClustersUpdateProfilesReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1SpectroClustersUpdateProfilesNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1SpectroClustersUpdateProfiles: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1SpectroClustersUpdateStatusCondition updates the specified cluster status condition +*/ +func (a *Client) V1SpectroClustersUpdateStatusCondition(params *V1SpectroClustersUpdateStatusConditionParams) (*V1SpectroClustersUpdateStatusConditionNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1SpectroClustersUpdateStatusConditionParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1SpectroClustersUpdateStatusCondition", + Method: "PUT", + PathPattern: "/v1/spectroclusters/{uid}/status/condition", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1SpectroClustersUpdateStatusConditionReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1SpectroClustersUpdateStatusConditionNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1SpectroClustersUpdateStatusCondition: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1SpectroClustersUpdateStatusConditions updates the specified cluster status conditions +*/ +func (a *Client) V1SpectroClustersUpdateStatusConditions(params *V1SpectroClustersUpdateStatusConditionsParams) (*V1SpectroClustersUpdateStatusConditionsNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1SpectroClustersUpdateStatusConditionsParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1SpectroClustersUpdateStatusConditions", + Method: "PATCH", + PathPattern: "/v1/spectroclusters/{uid}/status/conditions", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1SpectroClustersUpdateStatusConditionsReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1SpectroClustersUpdateStatusConditionsNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1SpectroClustersUpdateStatusConditions: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1SpectroClustersUpdateStatusEndpoints updates the specified cluster s service endpoints information +*/ +func (a *Client) V1SpectroClustersUpdateStatusEndpoints(params *V1SpectroClustersUpdateStatusEndpointsParams) (*V1SpectroClustersUpdateStatusEndpointsNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1SpectroClustersUpdateStatusEndpointsParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1SpectroClustersUpdateStatusEndpoints", + Method: "PUT", + PathPattern: "/v1/spectroclusters/{uid}/status/endpoints", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1SpectroClustersUpdateStatusEndpointsReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1SpectroClustersUpdateStatusEndpointsNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1SpectroClustersUpdateStatusEndpoints: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1SpectroClustersUpdateStatusImported updates the specified cluster status as imported +*/ +func (a *Client) V1SpectroClustersUpdateStatusImported(params *V1SpectroClustersUpdateStatusImportedParams) (*V1SpectroClustersUpdateStatusImportedNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1SpectroClustersUpdateStatusImportedParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1SpectroClustersUpdateStatusImported", + Method: "PATCH", + PathPattern: "/v1/spectroclusters/{uid}/status/imported", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1SpectroClustersUpdateStatusImportedReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1SpectroClustersUpdateStatusImportedNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1SpectroClustersUpdateStatusImported: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1SpectroClustersUpdateStatusServices updates the specified cluster s services information +*/ +func (a *Client) V1SpectroClustersUpdateStatusServices(params *V1SpectroClustersUpdateStatusServicesParams) (*V1SpectroClustersUpdateStatusServicesNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1SpectroClustersUpdateStatusServicesParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1SpectroClustersUpdateStatusServices", + Method: "PUT", + PathPattern: "/v1/spectroclusters/{uid}/status/services", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1SpectroClustersUpdateStatusServicesReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1SpectroClustersUpdateStatusServicesNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1SpectroClustersUpdateStatusServices: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1SpectroClustersUpgradeSettings updates all clusters upgrade settings +*/ +func (a *Client) V1SpectroClustersUpgradeSettings(params *V1SpectroClustersUpgradeSettingsParams) (*V1SpectroClustersUpgradeSettingsNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1SpectroClustersUpgradeSettingsParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1SpectroClustersUpgradeSettings", + Method: "POST", + PathPattern: "/v1/spectroclusters/upgrade/settings", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1SpectroClustersUpgradeSettingsReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1SpectroClustersUpgradeSettingsNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1SpectroClustersUpgradeSettings: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1SpectroClustersUpgradeSettingsGet gets cluster settings by context +*/ +func (a *Client) V1SpectroClustersUpgradeSettingsGet(params *V1SpectroClustersUpgradeSettingsGetParams) (*V1SpectroClustersUpgradeSettingsGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1SpectroClustersUpgradeSettingsGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1SpectroClustersUpgradeSettingsGet", + Method: "GET", + PathPattern: "/v1/spectroclusters/upgrade/settings", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1SpectroClustersUpgradeSettingsGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1SpectroClustersUpgradeSettingsGetOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1SpectroClustersUpgradeSettingsGet: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1SpectroClustersVMAddVolume adds volume to the virtual machine instance +*/ +func (a *Client) V1SpectroClustersVMAddVolume(params *V1SpectroClustersVMAddVolumeParams) (*V1SpectroClustersVMAddVolumeNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1SpectroClustersVMAddVolumeParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1SpectroClustersVMAddVolume", + Method: "PUT", + PathPattern: "/v1/spectroclusters/{uid}/vms/{vmName}/addVolume", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1SpectroClustersVMAddVolumeReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1SpectroClustersVMAddVolumeNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1SpectroClustersVMAddVolume: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1SpectroClustersVMClone clones virtual machine +*/ +func (a *Client) V1SpectroClustersVMClone(params *V1SpectroClustersVMCloneParams) (*V1SpectroClustersVMCloneOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1SpectroClustersVMCloneParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1SpectroClustersVMClone", + Method: "POST", + PathPattern: "/v1/spectroclusters/{uid}/vms/{vmName}/clone", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1SpectroClustersVMCloneReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1SpectroClustersVMCloneOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1SpectroClustersVMClone: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1SpectroClustersVMCreate creates virtual machine +*/ +func (a *Client) V1SpectroClustersVMCreate(params *V1SpectroClustersVMCreateParams) (*V1SpectroClustersVMCreateOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1SpectroClustersVMCreateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1SpectroClustersVMCreate", + Method: "POST", + PathPattern: "/v1/spectroclusters/{uid}/vms", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1SpectroClustersVMCreateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1SpectroClustersVMCreateOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1SpectroClustersVMCreate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1SpectroClustersVMDelete deletes the virtual machine +*/ +func (a *Client) V1SpectroClustersVMDelete(params *V1SpectroClustersVMDeleteParams) (*V1SpectroClustersVMDeleteNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1SpectroClustersVMDeleteParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1SpectroClustersVMDelete", + Method: "DELETE", + PathPattern: "/v1/spectroclusters/{uid}/vms/{vmName}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1SpectroClustersVMDeleteReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1SpectroClustersVMDeleteNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1SpectroClustersVMDelete: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1SpectroClustersVMGet gets virtual machine +*/ +func (a *Client) V1SpectroClustersVMGet(params *V1SpectroClustersVMGetParams) (*V1SpectroClustersVMGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1SpectroClustersVMGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1SpectroClustersVMGet", + Method: "GET", + PathPattern: "/v1/spectroclusters/{uid}/vms/{vmName}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1SpectroClustersVMGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1SpectroClustersVMGetOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1SpectroClustersVMGet: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1SpectroClustersVMList returns the list of virtual machines +*/ +func (a *Client) V1SpectroClustersVMList(params *V1SpectroClustersVMListParams) (*V1SpectroClustersVMListOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1SpectroClustersVMListParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1SpectroClustersVMList", + Method: "GET", + PathPattern: "/v1/spectroclusters/{uid}/vms", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1SpectroClustersVMListReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1SpectroClustersVMListOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1SpectroClustersVMList: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1SpectroClustersVMMigrate migrates the virtual machine +*/ +func (a *Client) V1SpectroClustersVMMigrate(params *V1SpectroClustersVMMigrateParams) (*V1SpectroClustersVMMigrateNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1SpectroClustersVMMigrateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1SpectroClustersVMMigrate", + Method: "PUT", + PathPattern: "/v1/spectroclusters/{uid}/vms/{vmName}/migrate", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1SpectroClustersVMMigrateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1SpectroClustersVMMigrateNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1SpectroClustersVMMigrate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1SpectroClustersVMPause pauses the virtual machine instance +*/ +func (a *Client) V1SpectroClustersVMPause(params *V1SpectroClustersVMPauseParams) (*V1SpectroClustersVMPauseNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1SpectroClustersVMPauseParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1SpectroClustersVMPause", + Method: "PUT", + PathPattern: "/v1/spectroclusters/{uid}/vms/{vmName}/pause", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1SpectroClustersVMPauseReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1SpectroClustersVMPauseNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1SpectroClustersVMPause: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1SpectroClustersVMRemoveVolume removes volume from the virtual machine instance +*/ +func (a *Client) V1SpectroClustersVMRemoveVolume(params *V1SpectroClustersVMRemoveVolumeParams) (*V1SpectroClustersVMRemoveVolumeNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1SpectroClustersVMRemoveVolumeParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1SpectroClustersVMRemoveVolume", + Method: "PUT", + PathPattern: "/v1/spectroclusters/{uid}/vms/{vmName}/removeVolume", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1SpectroClustersVMRemoveVolumeReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1SpectroClustersVMRemoveVolumeNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1SpectroClustersVMRemoveVolume: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1SpectroClustersVMRestart restarts the virtual machine +*/ +func (a *Client) V1SpectroClustersVMRestart(params *V1SpectroClustersVMRestartParams) (*V1SpectroClustersVMRestartNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1SpectroClustersVMRestartParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1SpectroClustersVMRestart", + Method: "PUT", + PathPattern: "/v1/spectroclusters/{uid}/vms/{vmName}/restart", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1SpectroClustersVMRestartReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1SpectroClustersVMRestartNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1SpectroClustersVMRestart: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1SpectroClustersVMResume resumes the virtual machine instance +*/ +func (a *Client) V1SpectroClustersVMResume(params *V1SpectroClustersVMResumeParams) (*V1SpectroClustersVMResumeNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1SpectroClustersVMResumeParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1SpectroClustersVMResume", + Method: "PUT", + PathPattern: "/v1/spectroclusters/{uid}/vms/{vmName}/resume", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1SpectroClustersVMResumeReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1SpectroClustersVMResumeNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1SpectroClustersVMResume: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1SpectroClustersVMStart starts the virtual machine +*/ +func (a *Client) V1SpectroClustersVMStart(params *V1SpectroClustersVMStartParams) (*V1SpectroClustersVMStartNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1SpectroClustersVMStartParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1SpectroClustersVMStart", + Method: "PUT", + PathPattern: "/v1/spectroclusters/{uid}/vms/{vmName}/start", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1SpectroClustersVMStartReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1SpectroClustersVMStartNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1SpectroClustersVMStart: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1SpectroClustersVMStop stops the virtual machine +*/ +func (a *Client) V1SpectroClustersVMStop(params *V1SpectroClustersVMStopParams) (*V1SpectroClustersVMStopNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1SpectroClustersVMStopParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1SpectroClustersVMStop", + Method: "PUT", + PathPattern: "/v1/spectroclusters/{uid}/vms/{vmName}/stop", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1SpectroClustersVMStopReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1SpectroClustersVMStopNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1SpectroClustersVMStop: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1SpectroClustersVMUpdate updates the specified virtual machine of the cluster +*/ +func (a *Client) V1SpectroClustersVMUpdate(params *V1SpectroClustersVMUpdateParams) (*V1SpectroClustersVMUpdateOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1SpectroClustersVMUpdateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1SpectroClustersVMUpdate", + Method: "PUT", + PathPattern: "/v1/spectroclusters/{uid}/vms/{vmName}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1SpectroClustersVMUpdateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1SpectroClustersVMUpdateOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1SpectroClustersVMUpdate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1SpectroClustersValidateName validates the cluster name +*/ +func (a *Client) V1SpectroClustersValidateName(params *V1SpectroClustersValidateNameParams) (*V1SpectroClustersValidateNameNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1SpectroClustersValidateNameParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1SpectroClustersValidateName", + Method: "GET", + PathPattern: "/v1/spectroclusters/validate/name", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1SpectroClustersValidateNameReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1SpectroClustersValidateNameNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1SpectroClustersValidateName: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1SpectroClustersValidatePacks validates spectro cluster packs +*/ +func (a *Client) V1SpectroClustersValidatePacks(params *V1SpectroClustersValidatePacksParams) (*V1SpectroClustersValidatePacksOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1SpectroClustersValidatePacksParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1SpectroClustersValidatePacks", + Method: "POST", + PathPattern: "/v1/spectroclusters/validate/packs", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1SpectroClustersValidatePacksReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1SpectroClustersValidatePacksOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1SpectroClustersValidatePacks: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1SpectroClustersVirtualCreate creates a virtual cluster +*/ +func (a *Client) V1SpectroClustersVirtualCreate(params *V1SpectroClustersVirtualCreateParams) (*V1SpectroClustersVirtualCreateCreated, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1SpectroClustersVirtualCreateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1SpectroClustersVirtualCreate", + Method: "POST", + PathPattern: "/v1/spectroclusters/virtual", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1SpectroClustersVirtualCreateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1SpectroClustersVirtualCreateCreated) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1SpectroClustersVirtualCreate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1SpectroClustersVirtualValidate validates virtual cluster create operation +*/ +func (a *Client) V1SpectroClustersVirtualValidate(params *V1SpectroClustersVirtualValidateParams) (*V1SpectroClustersVirtualValidateOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1SpectroClustersVirtualValidateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1SpectroClustersVirtualValidate", + Method: "POST", + PathPattern: "/v1/spectroclusters/virtual/validate", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1SpectroClustersVirtualValidateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1SpectroClustersVirtualValidateOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1SpectroClustersVirtualValidate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1SpectroClustersVsphereCreate creates a v sphere cluster +*/ +func (a *Client) V1SpectroClustersVsphereCreate(params *V1SpectroClustersVsphereCreateParams) (*V1SpectroClustersVsphereCreateCreated, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1SpectroClustersVsphereCreateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1SpectroClustersVsphereCreate", + Method: "POST", + PathPattern: "/v1/spectroclusters/vsphere", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1SpectroClustersVsphereCreateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1SpectroClustersVsphereCreateCreated) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1SpectroClustersVsphereCreate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1SpectroClustersVsphereImport imports a v sphere cluster +*/ +func (a *Client) V1SpectroClustersVsphereImport(params *V1SpectroClustersVsphereImportParams) (*V1SpectroClustersVsphereImportCreated, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1SpectroClustersVsphereImportParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1SpectroClustersVsphereImport", + Method: "POST", + PathPattern: "/v1/spectroclusters/vsphere/import", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1SpectroClustersVsphereImportReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1SpectroClustersVsphereImportCreated) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1SpectroClustersVsphereImport: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1SpectroClustersVsphereRate gets v sphere cluster estimated rate information +*/ +func (a *Client) V1SpectroClustersVsphereRate(params *V1SpectroClustersVsphereRateParams) (*V1SpectroClustersVsphereRateOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1SpectroClustersVsphereRateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1SpectroClustersVsphereRate", + Method: "POST", + PathPattern: "/v1/spectroclusters/vsphere/rate", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1SpectroClustersVsphereRateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1SpectroClustersVsphereRateOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1SpectroClustersVsphereRate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1SpectroClustersVsphereValidate validates v sphere cluster create operation +*/ +func (a *Client) V1SpectroClustersVsphereValidate(params *V1SpectroClustersVsphereValidateParams) (*V1SpectroClustersVsphereValidateOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1SpectroClustersVsphereValidateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1SpectroClustersVsphereValidate", + Method: "POST", + PathPattern: "/v1/spectroclusters/vsphere/validate", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1SpectroClustersVsphereValidateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1SpectroClustersVsphereValidateOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1SpectroClustersVsphereValidate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1SyftScanLogImageSBOMGet returns the image sbom of syft scan log of cluster +*/ +func (a *Client) V1SyftScanLogImageSBOMGet(params *V1SyftScanLogImageSBOMGetParams, writer io.Writer) (*V1SyftScanLogImageSBOMGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1SyftScanLogImageSBOMGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1SyftScanLogImageSBOMGet", + Method: "GET", + PathPattern: "/v1/spectroclusters/{uid}/features/complianceScan/logs/{logUid}/drivers/syft/sbom", + ProducesMediaTypes: []string{"application/octet-stream"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1SyftScanLogImageSBOMGetReader{formats: a.formats, writer: writer}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1SyftScanLogImageSBOMGetOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1SyftScanLogImageSBOMGet: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1TagFilterUIDDelete deletes the specified filter object +*/ +func (a *Client) V1TagFilterUIDDelete(params *V1TagFilterUIDDeleteParams) (*V1TagFilterUIDDeleteNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1TagFilterUIDDeleteParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1TagFilterUidDelete", + Method: "DELETE", + PathPattern: "/v1/filters/tag/{uid}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1TagFilterUIDDeleteReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1TagFilterUIDDeleteNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1TagFilterUidDelete: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1TagFilterUIDGet returns the specified filter object +*/ +func (a *Client) V1TagFilterUIDGet(params *V1TagFilterUIDGetParams) (*V1TagFilterUIDGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1TagFilterUIDGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1TagFilterUidGet", + Method: "GET", + PathPattern: "/v1/filters/tag/{uid}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1TagFilterUIDGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1TagFilterUIDGetOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1TagFilterUidGet: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1TagFilterUIDUpdate updates a tag filter +*/ +func (a *Client) V1TagFilterUIDUpdate(params *V1TagFilterUIDUpdateParams) (*V1TagFilterUIDUpdateNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1TagFilterUIDUpdateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1TagFilterUidUpdate", + Method: "PUT", + PathPattern: "/v1/filters/tag/{uid}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1TagFilterUIDUpdateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1TagFilterUIDUpdateNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1TagFilterUidUpdate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1TagFiltersCreate creates a tag filter +*/ +func (a *Client) V1TagFiltersCreate(params *V1TagFiltersCreateParams) (*V1TagFiltersCreateCreated, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1TagFiltersCreateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1TagFiltersCreate", + Method: "POST", + PathPattern: "/v1/filters/tag", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1TagFiltersCreateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1TagFiltersCreateCreated) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1TagFiltersCreate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1TeamsCreate creates a team with the specified users and roles +*/ +func (a *Client) V1TeamsCreate(params *V1TeamsCreateParams) (*V1TeamsCreateCreated, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1TeamsCreateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1TeamsCreate", + Method: "POST", + PathPattern: "/v1/teams", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1TeamsCreateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1TeamsCreateCreated) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1TeamsCreate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1TeamsList retrieves a list of teams +*/ +func (a *Client) V1TeamsList(params *V1TeamsListParams) (*V1TeamsListOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1TeamsListParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1TeamsList", + Method: "GET", + PathPattern: "/v1/teams", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1TeamsListReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1TeamsListOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1TeamsList: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1TeamsProjectRoles returns the specified team s project and roles data +*/ +func (a *Client) V1TeamsProjectRoles(params *V1TeamsProjectRolesParams) (*V1TeamsProjectRolesOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1TeamsProjectRolesParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1TeamsProjectRoles", + Method: "GET", + PathPattern: "/v1/teams/{uid}/projects", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1TeamsProjectRolesReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1TeamsProjectRolesOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1TeamsProjectRoles: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1TeamsProjectRolesPut updates the projects and roles for the specified team +*/ +func (a *Client) V1TeamsProjectRolesPut(params *V1TeamsProjectRolesPutParams) (*V1TeamsProjectRolesPutNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1TeamsProjectRolesPutParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1TeamsProjectRolesPut", + Method: "PUT", + PathPattern: "/v1/teams/{uid}/projects", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1TeamsProjectRolesPutReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1TeamsProjectRolesPutNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1TeamsProjectRolesPut: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1TeamsResourceRolesUIDUpdate updates the resource roles for team + +Specific resource roles fo team is updated +*/ +func (a *Client) V1TeamsResourceRolesUIDUpdate(params *V1TeamsResourceRolesUIDUpdateParams) (*V1TeamsResourceRolesUIDUpdateNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1TeamsResourceRolesUIDUpdateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1TeamsResourceRolesUidUpdate", + Method: "PATCH", + PathPattern: "/v1/teams/{uid}/resourceRoles/{resourceRoleUid}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1TeamsResourceRolesUIDUpdateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1TeamsResourceRolesUIDUpdateNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1TeamsResourceRolesUidUpdate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1TeamsSummaryGet retrieves a list of teams summary with provided filter spec +*/ +func (a *Client) V1TeamsSummaryGet(params *V1TeamsSummaryGetParams) (*V1TeamsSummaryGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1TeamsSummaryGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1TeamsSummaryGet", + Method: "POST", + PathPattern: "/v1/teams/summary", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1TeamsSummaryGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1TeamsSummaryGetOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1TeamsSummaryGet: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1TeamsUIDDelete deletes the specified team +*/ +func (a *Client) V1TeamsUIDDelete(params *V1TeamsUIDDeleteParams) (*V1TeamsUIDDeleteNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1TeamsUIDDeleteParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1TeamsUidDelete", + Method: "DELETE", + PathPattern: "/v1/teams/{uid}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1TeamsUIDDeleteReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1TeamsUIDDeleteNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1TeamsUidDelete: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1TeamsUIDGet returns the sepcified team +*/ +func (a *Client) V1TeamsUIDGet(params *V1TeamsUIDGetParams) (*V1TeamsUIDGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1TeamsUIDGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1TeamsUidGet", + Method: "GET", + PathPattern: "/v1/teams/{uid}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1TeamsUIDGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1TeamsUIDGetOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1TeamsUidGet: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1TeamsUIDPatch patches the specified team +*/ +func (a *Client) V1TeamsUIDPatch(params *V1TeamsUIDPatchParams) (*V1TeamsUIDPatchNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1TeamsUIDPatchParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1TeamsUidPatch", + Method: "PATCH", + PathPattern: "/v1/teams/{uid}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1TeamsUIDPatchReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1TeamsUIDPatchNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1TeamsUidPatch: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1TeamsUIDResourceRoles returns the specified individual and resource roles for a team + +Returns resource roles for team +*/ +func (a *Client) V1TeamsUIDResourceRoles(params *V1TeamsUIDResourceRolesParams) (*V1TeamsUIDResourceRolesOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1TeamsUIDResourceRolesParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1TeamsUidResourceRoles", + Method: "GET", + PathPattern: "/v1/teams/{uid}/resourceRoles", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1TeamsUIDResourceRolesReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1TeamsUIDResourceRolesOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1TeamsUidResourceRoles: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1TeamsUIDResourceRolesCreate adds resource roles for team + +Resource roles added to specific team +*/ +func (a *Client) V1TeamsUIDResourceRolesCreate(params *V1TeamsUIDResourceRolesCreateParams) (*V1TeamsUIDResourceRolesCreateNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1TeamsUIDResourceRolesCreateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1TeamsUidResourceRolesCreate", + Method: "POST", + PathPattern: "/v1/teams/{uid}/resourceRoles", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1TeamsUIDResourceRolesCreateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1TeamsUIDResourceRolesCreateNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1TeamsUidResourceRolesCreate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1TeamsUIDResourceRolesUIDDelete deleteds the resource roles from team +*/ +func (a *Client) V1TeamsUIDResourceRolesUIDDelete(params *V1TeamsUIDResourceRolesUIDDeleteParams) (*V1TeamsUIDResourceRolesUIDDeleteNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1TeamsUIDResourceRolesUIDDeleteParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1TeamsUidResourceRolesUidDelete", + Method: "DELETE", + PathPattern: "/v1/teams/{uid}/resourceRoles/{resourceRoleUid}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1TeamsUIDResourceRolesUIDDeleteReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1TeamsUIDResourceRolesUIDDeleteNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1TeamsUidResourceRolesUidDelete: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1TeamsUIDUpdate updates the sepcified team +*/ +func (a *Client) V1TeamsUIDUpdate(params *V1TeamsUIDUpdateParams) (*V1TeamsUIDUpdateNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1TeamsUIDUpdateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1TeamsUidUpdate", + Method: "PUT", + PathPattern: "/v1/teams/{uid}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1TeamsUIDUpdateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1TeamsUIDUpdateNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1TeamsUidUpdate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1TeamsWorkspaceGetRoles returns the specified team s workspaces and roles data +*/ +func (a *Client) V1TeamsWorkspaceGetRoles(params *V1TeamsWorkspaceGetRolesParams) (*V1TeamsWorkspaceGetRolesOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1TeamsWorkspaceGetRolesParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1TeamsWorkspaceGetRoles", + Method: "GET", + PathPattern: "/v1/workspaces/teams/{teamUid}/roles", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1TeamsWorkspaceGetRolesReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1TeamsWorkspaceGetRolesOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1TeamsWorkspaceGetRoles: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1TeamsWorkspaceRolesPut updates the workspace roles for the specified team +*/ +func (a *Client) V1TeamsWorkspaceRolesPut(params *V1TeamsWorkspaceRolesPutParams) (*V1TeamsWorkspaceRolesPutNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1TeamsWorkspaceRolesPutParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1TeamsWorkspaceRolesPut", + Method: "PUT", + PathPattern: "/v1/workspaces/teams/{teamUid}/roles", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1TeamsWorkspaceRolesPutReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1TeamsWorkspaceRolesPutNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1TeamsWorkspaceRolesPut: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1TenantClusterSettingsGet gets tenant cluster settings +*/ +func (a *Client) V1TenantClusterSettingsGet(params *V1TenantClusterSettingsGetParams) (*V1TenantClusterSettingsGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1TenantClusterSettingsGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1TenantClusterSettingsGet", + Method: "GET", + PathPattern: "/v1/tenants/{tenantUid}/preferences/clusterSettings", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1TenantClusterSettingsGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1TenantClusterSettingsGetOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1TenantClusterSettingsGet: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1TenantClustersNodesAutoRemediationSettingUpdate updates tenant clusters nodes auto remediation setting +*/ +func (a *Client) V1TenantClustersNodesAutoRemediationSettingUpdate(params *V1TenantClustersNodesAutoRemediationSettingUpdateParams) (*V1TenantClustersNodesAutoRemediationSettingUpdateNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1TenantClustersNodesAutoRemediationSettingUpdateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1TenantClustersNodesAutoRemediationSettingUpdate", + Method: "PUT", + PathPattern: "/v1/tenants/{tenantUid}/preferences/clusterSettings/nodesAutoRemediationSetting", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1TenantClustersNodesAutoRemediationSettingUpdateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1TenantClustersNodesAutoRemediationSettingUpdateNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1TenantClustersNodesAutoRemediationSettingUpdate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1TenantFipsSettingsGet gets tenant fips settings +*/ +func (a *Client) V1TenantFipsSettingsGet(params *V1TenantFipsSettingsGetParams) (*V1TenantFipsSettingsGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1TenantFipsSettingsGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1TenantFipsSettingsGet", + Method: "GET", + PathPattern: "/v1/tenants/{tenantUid}/preferences/fips", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1TenantFipsSettingsGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1TenantFipsSettingsGetOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1TenantFipsSettingsGet: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1TenantFipsSettingsUpdate updates tenant fips setting +*/ +func (a *Client) V1TenantFipsSettingsUpdate(params *V1TenantFipsSettingsUpdateParams) (*V1TenantFipsSettingsUpdateNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1TenantFipsSettingsUpdateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1TenantFipsSettingsUpdate", + Method: "PUT", + PathPattern: "/v1/tenants/{tenantUid}/preferences/fips", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1TenantFipsSettingsUpdateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1TenantFipsSettingsUpdateNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1TenantFipsSettingsUpdate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1TenantFreemiumGet gets tenant level freemium configuration +*/ +func (a *Client) V1TenantFreemiumGet(params *V1TenantFreemiumGetParams) (*V1TenantFreemiumGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1TenantFreemiumGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1TenantFreemiumGet", + Method: "GET", + PathPattern: "/v1/tenants/{tenantUid}/freemium", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1TenantFreemiumGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1TenantFreemiumGetOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1TenantFreemiumGet: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1TenantFreemiumUpdate updates tenant freemium configuration +*/ +func (a *Client) V1TenantFreemiumUpdate(params *V1TenantFreemiumUpdateParams) (*V1TenantFreemiumUpdateNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1TenantFreemiumUpdateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1TenantFreemiumUpdate", + Method: "PUT", + PathPattern: "/v1/tenants/{tenantUid}/freemium", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1TenantFreemiumUpdateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1TenantFreemiumUpdateNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1TenantFreemiumUpdate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1TenantFreemiumUsageGet gets tenant freemium usage +*/ +func (a *Client) V1TenantFreemiumUsageGet(params *V1TenantFreemiumUsageGetParams) (*V1TenantFreemiumUsageGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1TenantFreemiumUsageGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1TenantFreemiumUsageGet", + Method: "GET", + PathPattern: "/v1/tenants/{tenantUid}/freemiumUsage", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1TenantFreemiumUsageGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1TenantFreemiumUsageGetOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1TenantFreemiumUsageGet: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1TenantResourceLimitsGet gets tenant level resource limits configuration +*/ +func (a *Client) V1TenantResourceLimitsGet(params *V1TenantResourceLimitsGetParams) (*V1TenantResourceLimitsGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1TenantResourceLimitsGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1TenantResourceLimitsGet", + Method: "GET", + PathPattern: "/v1/tenants/{tenantUid}/resourceLimits", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1TenantResourceLimitsGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1TenantResourceLimitsGetOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1TenantResourceLimitsGet: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1TenantResourceLimitsUpdate updates tenant resource limits configuration +*/ +func (a *Client) V1TenantResourceLimitsUpdate(params *V1TenantResourceLimitsUpdateParams) (*V1TenantResourceLimitsUpdateNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1TenantResourceLimitsUpdateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1TenantResourceLimitsUpdate", + Method: "PATCH", + PathPattern: "/v1/tenants/{tenantUid}/resourceLimits", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1TenantResourceLimitsUpdateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1TenantResourceLimitsUpdateNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1TenantResourceLimitsUpdate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1TenantUIDAuthTokenSettingsGet gets tenant auth token settings +*/ +func (a *Client) V1TenantUIDAuthTokenSettingsGet(params *V1TenantUIDAuthTokenSettingsGetParams) (*V1TenantUIDAuthTokenSettingsGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1TenantUIDAuthTokenSettingsGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1TenantUidAuthTokenSettingsGet", + Method: "GET", + PathPattern: "/v1/tenants/{tenantUid}/authTokenSettings", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1TenantUIDAuthTokenSettingsGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1TenantUIDAuthTokenSettingsGetOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1TenantUidAuthTokenSettingsGet: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1TenantUIDAuthTokenSettingsUpdate updates tenant auth token settings +*/ +func (a *Client) V1TenantUIDAuthTokenSettingsUpdate(params *V1TenantUIDAuthTokenSettingsUpdateParams) (*V1TenantUIDAuthTokenSettingsUpdateNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1TenantUIDAuthTokenSettingsUpdateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1TenantUidAuthTokenSettingsUpdate", + Method: "PUT", + PathPattern: "/v1/tenants/{tenantUid}/authTokenSettings", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1TenantUIDAuthTokenSettingsUpdateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1TenantUIDAuthTokenSettingsUpdateNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1TenantUidAuthTokenSettingsUpdate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1TenantUIDLoginBannerGet gets tenant login banner settings +*/ +func (a *Client) V1TenantUIDLoginBannerGet(params *V1TenantUIDLoginBannerGetParams) (*V1TenantUIDLoginBannerGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1TenantUIDLoginBannerGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1TenantUidLoginBannerGet", + Method: "GET", + PathPattern: "/v1/tenants/{tenantUid}/loginBanner", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1TenantUIDLoginBannerGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1TenantUIDLoginBannerGetOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1TenantUidLoginBannerGet: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1TenantUIDLoginBannerUpdate updates tenant login banner settings +*/ +func (a *Client) V1TenantUIDLoginBannerUpdate(params *V1TenantUIDLoginBannerUpdateParams) (*V1TenantUIDLoginBannerUpdateNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1TenantUIDLoginBannerUpdateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1TenantUidLoginBannerUpdate", + Method: "PUT", + PathPattern: "/v1/tenants/{tenantUid}/loginBanner", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1TenantUIDLoginBannerUpdateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1TenantUIDLoginBannerUpdateNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1TenantUidLoginBannerUpdate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1TenantsCreditAccountDelete deletes the aws credit account for tenants +*/ +func (a *Client) V1TenantsCreditAccountDelete(params *V1TenantsCreditAccountDeleteParams) (*V1TenantsCreditAccountDeleteNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1TenantsCreditAccountDeleteParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1TenantsCreditAccountDelete", + Method: "DELETE", + PathPattern: "/v1/tenants/{tenantUid}/creditAccount/aws", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1TenantsCreditAccountDeleteReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1TenantsCreditAccountDeleteNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1TenantsCreditAccountDelete: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1TenantsCreditAccountGet gets the credit accounts for the tenants with free tier access +*/ +func (a *Client) V1TenantsCreditAccountGet(params *V1TenantsCreditAccountGetParams) (*V1TenantsCreditAccountGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1TenantsCreditAccountGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1TenantsCreditAccountGet", + Method: "GET", + PathPattern: "/v1/tenants/{tenantUid}/creditAccount/aws", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1TenantsCreditAccountGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1TenantsCreditAccountGetOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1TenantsCreditAccountGet: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1TenantsUIDContractAccept tenants to accept the contract agreement +*/ +func (a *Client) V1TenantsUIDContractAccept(params *V1TenantsUIDContractAcceptParams) (*V1TenantsUIDContractAcceptNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1TenantsUIDContractAcceptParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1TenantsUidContractAccept", + Method: "PATCH", + PathPattern: "/v1/tenants/{tenantUid}/contract/accept", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1TenantsUIDContractAcceptReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1TenantsUIDContractAcceptNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1TenantsUidContractAccept: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1TenantsUIDMacrosCreate creates or add new macros for the specified tenant +*/ +func (a *Client) V1TenantsUIDMacrosCreate(params *V1TenantsUIDMacrosCreateParams) (*V1TenantsUIDMacrosCreateNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1TenantsUIDMacrosCreateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1TenantsUidMacrosCreate", + Method: "POST", + PathPattern: "/v1/tenants/{tenantUid}/macros", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1TenantsUIDMacrosCreateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1TenantsUIDMacrosCreateNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1TenantsUidMacrosCreate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1TenantsUIDMacrosDeleteByMacroName deletes the macros for the specified tenant by given macro name +*/ +func (a *Client) V1TenantsUIDMacrosDeleteByMacroName(params *V1TenantsUIDMacrosDeleteByMacroNameParams) (*V1TenantsUIDMacrosDeleteByMacroNameNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1TenantsUIDMacrosDeleteByMacroNameParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1TenantsUidMacrosDeleteByMacroName", + Method: "DELETE", + PathPattern: "/v1/tenants/{tenantUid}/macros", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1TenantsUIDMacrosDeleteByMacroNameReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1TenantsUIDMacrosDeleteByMacroNameNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1TenantsUidMacrosDeleteByMacroName: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1TenantsUIDMacrosList lists the macros of the specified tenant +*/ +func (a *Client) V1TenantsUIDMacrosList(params *V1TenantsUIDMacrosListParams) (*V1TenantsUIDMacrosListOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1TenantsUIDMacrosListParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1TenantsUidMacrosList", + Method: "GET", + PathPattern: "/v1/tenants/{tenantUid}/macros", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1TenantsUIDMacrosListReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1TenantsUIDMacrosListOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1TenantsUidMacrosList: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1TenantsUIDMacrosUpdate updates the macros of the specified tenant +*/ +func (a *Client) V1TenantsUIDMacrosUpdate(params *V1TenantsUIDMacrosUpdateParams) (*V1TenantsUIDMacrosUpdateNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1TenantsUIDMacrosUpdateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1TenantsUidMacrosUpdate", + Method: "PUT", + PathPattern: "/v1/tenants/{tenantUid}/macros", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1TenantsUIDMacrosUpdateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1TenantsUIDMacrosUpdateNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1TenantsUidMacrosUpdate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1TenantsUIDMacrosUpdateByMacroName updates the macros for the specified tenant by given macro name +*/ +func (a *Client) V1TenantsUIDMacrosUpdateByMacroName(params *V1TenantsUIDMacrosUpdateByMacroNameParams) (*V1TenantsUIDMacrosUpdateByMacroNameNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1TenantsUIDMacrosUpdateByMacroNameParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1TenantsUidMacrosUpdateByMacroName", + Method: "PATCH", + PathPattern: "/v1/tenants/{tenantUid}/macros", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1TenantsUIDMacrosUpdateByMacroNameReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1TenantsUIDMacrosUpdateByMacroNameNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1TenantsUidMacrosUpdateByMacroName: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1UserAssetsSSHCreate creates a SSH key +*/ +func (a *Client) V1UserAssetsSSHCreate(params *V1UserAssetsSSHCreateParams) (*V1UserAssetsSSHCreateCreated, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1UserAssetsSSHCreateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1UserAssetsSshCreate", + Method: "POST", + PathPattern: "/v1/users/assets/sshkeys", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1UserAssetsSSHCreateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1UserAssetsSSHCreateCreated) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1UserAssetsSshCreate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1UsersAssetSSHDelete returns the specified user ssh key +*/ +func (a *Client) V1UsersAssetSSHDelete(params *V1UsersAssetSSHDeleteParams) (*V1UsersAssetSSHDeleteNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1UsersAssetSSHDeleteParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1UsersAssetSshDelete", + Method: "DELETE", + PathPattern: "/v1/users/assets/sshkeys/{uid}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1UsersAssetSSHDeleteReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1UsersAssetSSHDeleteNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1UsersAssetSshDelete: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1UsersAssetSSHGetUID returns the specified user ssh key +*/ +func (a *Client) V1UsersAssetSSHGetUID(params *V1UsersAssetSSHGetUIDParams) (*V1UsersAssetSSHGetUIDOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1UsersAssetSSHGetUIDParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1UsersAssetSshGetUid", + Method: "GET", + PathPattern: "/v1/users/assets/sshkeys/{uid}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1UsersAssetSSHGetUIDReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1UsersAssetSSHGetUIDOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1UsersAssetSshGetUid: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1UsersAssetSSHUpdate updates the specified user ssh key +*/ +func (a *Client) V1UsersAssetSSHUpdate(params *V1UsersAssetSSHUpdateParams) (*V1UsersAssetSSHUpdateNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1UsersAssetSSHUpdateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1UsersAssetSshUpdate", + Method: "PUT", + PathPattern: "/v1/users/assets/sshkeys/{uid}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1UsersAssetSSHUpdateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1UsersAssetSSHUpdateNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1UsersAssetSshUpdate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1UsersAssetsLocationAzureCreate creates a azure location +*/ +func (a *Client) V1UsersAssetsLocationAzureCreate(params *V1UsersAssetsLocationAzureCreateParams) (*V1UsersAssetsLocationAzureCreateCreated, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1UsersAssetsLocationAzureCreateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1UsersAssetsLocationAzureCreate", + Method: "POST", + PathPattern: "/v1/users/assets/locations/azure", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1UsersAssetsLocationAzureCreateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1UsersAssetsLocationAzureCreateCreated) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1UsersAssetsLocationAzureCreate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1UsersAssetsLocationAzureGet returns the specified azure location +*/ +func (a *Client) V1UsersAssetsLocationAzureGet(params *V1UsersAssetsLocationAzureGetParams) (*V1UsersAssetsLocationAzureGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1UsersAssetsLocationAzureGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1UsersAssetsLocationAzureGet", + Method: "GET", + PathPattern: "/v1/users/assets/locations/azure/{uid}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1UsersAssetsLocationAzureGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1UsersAssetsLocationAzureGetOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1UsersAssetsLocationAzureGet: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1UsersAssetsLocationAzureUpdate updates the specified azure location +*/ +func (a *Client) V1UsersAssetsLocationAzureUpdate(params *V1UsersAssetsLocationAzureUpdateParams) (*V1UsersAssetsLocationAzureUpdateNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1UsersAssetsLocationAzureUpdateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1UsersAssetsLocationAzureUpdate", + Method: "PUT", + PathPattern: "/v1/users/assets/locations/azure/{uid}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1UsersAssetsLocationAzureUpdateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1UsersAssetsLocationAzureUpdateNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1UsersAssetsLocationAzureUpdate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1UsersAssetsLocationDefaultUpdate updates the default backup location +*/ +func (a *Client) V1UsersAssetsLocationDefaultUpdate(params *V1UsersAssetsLocationDefaultUpdateParams) (*V1UsersAssetsLocationDefaultUpdateNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1UsersAssetsLocationDefaultUpdateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1UsersAssetsLocationDefaultUpdate", + Method: "PATCH", + PathPattern: "/v1/users/assets/locations/{type}/{uid}/default", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1UsersAssetsLocationDefaultUpdateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1UsersAssetsLocationDefaultUpdateNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1UsersAssetsLocationDefaultUpdate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1UsersAssetsLocationDelete deletes the specified location +*/ +func (a *Client) V1UsersAssetsLocationDelete(params *V1UsersAssetsLocationDeleteParams) (*V1UsersAssetsLocationDeleteNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1UsersAssetsLocationDeleteParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1UsersAssetsLocationDelete", + Method: "DELETE", + PathPattern: "/v1/users/assets/locations/{uid}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1UsersAssetsLocationDeleteReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1UsersAssetsLocationDeleteNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1UsersAssetsLocationDelete: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1UsersAssetsLocationGcpCreate creates a g c p location +*/ +func (a *Client) V1UsersAssetsLocationGcpCreate(params *V1UsersAssetsLocationGcpCreateParams) (*V1UsersAssetsLocationGcpCreateCreated, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1UsersAssetsLocationGcpCreateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1UsersAssetsLocationGcpCreate", + Method: "POST", + PathPattern: "/v1/users/assets/locations/gcp", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1UsersAssetsLocationGcpCreateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1UsersAssetsLocationGcpCreateCreated) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1UsersAssetsLocationGcpCreate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1UsersAssetsLocationGcpGet returns the specified g c p location +*/ +func (a *Client) V1UsersAssetsLocationGcpGet(params *V1UsersAssetsLocationGcpGetParams) (*V1UsersAssetsLocationGcpGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1UsersAssetsLocationGcpGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1UsersAssetsLocationGcpGet", + Method: "GET", + PathPattern: "/v1/users/assets/locations/gcp/{uid}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1UsersAssetsLocationGcpGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1UsersAssetsLocationGcpGetOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1UsersAssetsLocationGcpGet: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1UsersAssetsLocationGcpUpdate updates the specified g c p location +*/ +func (a *Client) V1UsersAssetsLocationGcpUpdate(params *V1UsersAssetsLocationGcpUpdateParams) (*V1UsersAssetsLocationGcpUpdateNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1UsersAssetsLocationGcpUpdateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1UsersAssetsLocationGcpUpdate", + Method: "PUT", + PathPattern: "/v1/users/assets/locations/gcp/{uid}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1UsersAssetsLocationGcpUpdateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1UsersAssetsLocationGcpUpdateNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1UsersAssetsLocationGcpUpdate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1UsersAssetsLocationGet returns the specified users location +*/ +func (a *Client) V1UsersAssetsLocationGet(params *V1UsersAssetsLocationGetParams) (*V1UsersAssetsLocationGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1UsersAssetsLocationGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1UsersAssetsLocationGet", + Method: "GET", + PathPattern: "/v1/users/assets/locations", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1UsersAssetsLocationGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1UsersAssetsLocationGetOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1UsersAssetsLocationGet: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1UsersAssetsLocationMinioCreate creates a min i o location +*/ +func (a *Client) V1UsersAssetsLocationMinioCreate(params *V1UsersAssetsLocationMinioCreateParams) (*V1UsersAssetsLocationMinioCreateCreated, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1UsersAssetsLocationMinioCreateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1UsersAssetsLocationMinioCreate", + Method: "POST", + PathPattern: "/v1/users/assets/locations/minio", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1UsersAssetsLocationMinioCreateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1UsersAssetsLocationMinioCreateCreated) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1UsersAssetsLocationMinioCreate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1UsersAssetsLocationMinioGet returns the specified min i o location +*/ +func (a *Client) V1UsersAssetsLocationMinioGet(params *V1UsersAssetsLocationMinioGetParams) (*V1UsersAssetsLocationMinioGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1UsersAssetsLocationMinioGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1UsersAssetsLocationMinioGet", + Method: "GET", + PathPattern: "/v1/users/assets/locations/minio/{uid}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1UsersAssetsLocationMinioGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1UsersAssetsLocationMinioGetOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1UsersAssetsLocationMinioGet: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1UsersAssetsLocationMinioUpdate updates the specified min i o location +*/ +func (a *Client) V1UsersAssetsLocationMinioUpdate(params *V1UsersAssetsLocationMinioUpdateParams) (*V1UsersAssetsLocationMinioUpdateNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1UsersAssetsLocationMinioUpdateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1UsersAssetsLocationMinioUpdate", + Method: "PUT", + PathPattern: "/v1/users/assets/locations/minio/{uid}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1UsersAssetsLocationMinioUpdateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1UsersAssetsLocationMinioUpdateNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1UsersAssetsLocationMinioUpdate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1UsersAssetsLocationS3Create creates a s3 location +*/ +func (a *Client) V1UsersAssetsLocationS3Create(params *V1UsersAssetsLocationS3CreateParams) (*V1UsersAssetsLocationS3CreateCreated, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1UsersAssetsLocationS3CreateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1UsersAssetsLocationS3Create", + Method: "POST", + PathPattern: "/v1/users/assets/locations/s3", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1UsersAssetsLocationS3CreateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1UsersAssetsLocationS3CreateCreated) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1UsersAssetsLocationS3Create: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1UsersAssetsLocationS3Delete returns the specified s3 location +*/ +func (a *Client) V1UsersAssetsLocationS3Delete(params *V1UsersAssetsLocationS3DeleteParams) (*V1UsersAssetsLocationS3DeleteNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1UsersAssetsLocationS3DeleteParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1UsersAssetsLocationS3Delete", + Method: "DELETE", + PathPattern: "/v1/users/assets/locations/s3/{uid}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1UsersAssetsLocationS3DeleteReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1UsersAssetsLocationS3DeleteNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1UsersAssetsLocationS3Delete: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1UsersAssetsLocationS3Get returns the specified s3 location +*/ +func (a *Client) V1UsersAssetsLocationS3Get(params *V1UsersAssetsLocationS3GetParams) (*V1UsersAssetsLocationS3GetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1UsersAssetsLocationS3GetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1UsersAssetsLocationS3Get", + Method: "GET", + PathPattern: "/v1/users/assets/locations/s3/{uid}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1UsersAssetsLocationS3GetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1UsersAssetsLocationS3GetOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1UsersAssetsLocationS3Get: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1UsersAssetsLocationS3Update updates the specified s3 location +*/ +func (a *Client) V1UsersAssetsLocationS3Update(params *V1UsersAssetsLocationS3UpdateParams) (*V1UsersAssetsLocationS3UpdateNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1UsersAssetsLocationS3UpdateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1UsersAssetsLocationS3Update", + Method: "PUT", + PathPattern: "/v1/users/assets/locations/s3/{uid}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1UsersAssetsLocationS3UpdateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1UsersAssetsLocationS3UpdateNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1UsersAssetsLocationS3Update: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1UsersAssetsSSHGet returns the SSH keys +*/ +func (a *Client) V1UsersAssetsSSHGet(params *V1UsersAssetsSSHGetParams) (*V1UsersAssetsSSHGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1UsersAssetsSSHGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1UsersAssetsSshGet", + Method: "GET", + PathPattern: "/v1/users/assets/sshkeys", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1UsersAssetsSSHGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1UsersAssetsSSHGetOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1UsersAssetsSshGet: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1UsersAuthTokensRevoke revokes access of specific token s +*/ +func (a *Client) V1UsersAuthTokensRevoke(params *V1UsersAuthTokensRevokeParams) (*V1UsersAuthTokensRevokeNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1UsersAuthTokensRevokeParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1UsersAuthTokensRevoke", + Method: "POST", + PathPattern: "/v1/users/auth/tokens/revoke", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1UsersAuthTokensRevokeReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1UsersAuthTokensRevokeNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1UsersAuthTokensRevoke: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1UsersCreate creates user + +A user is created for the given user context +*/ +func (a *Client) V1UsersCreate(params *V1UsersCreateParams) (*V1UsersCreateCreated, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1UsersCreateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1UsersCreate", + Method: "POST", + PathPattern: "/v1/users", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1UsersCreateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1UsersCreateCreated) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1UsersCreate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1UsersEmailPasswordReset users password reset request using the email id + +User password request will be sent to the supplied emailId +*/ +func (a *Client) V1UsersEmailPasswordReset(params *V1UsersEmailPasswordResetParams) (*V1UsersEmailPasswordResetNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1UsersEmailPasswordResetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1UsersEmailPasswordReset", + Method: "PATCH", + PathPattern: "/v1/users/password/reset", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1UsersEmailPasswordResetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1UsersEmailPasswordResetNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1UsersEmailPasswordReset: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1UsersInfoGet returns the base information of specified user + +Returns a basic information of User for the specified uid. +*/ +func (a *Client) V1UsersInfoGet(params *V1UsersInfoGetParams) (*V1UsersInfoGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1UsersInfoGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1UsersInfoGet", + Method: "GET", + PathPattern: "/v1/users/info", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1UsersInfoGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1UsersInfoGetOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1UsersInfoGet: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1UsersList lists users + +Lists users the given user context +*/ +func (a *Client) V1UsersList(params *V1UsersListParams) (*V1UsersListOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1UsersListParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1UsersList", + Method: "GET", + PathPattern: "/v1/users", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1UsersListReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1UsersListOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1UsersList: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1UsersMetadata retrieves a list of users metadata +*/ +func (a *Client) V1UsersMetadata(params *V1UsersMetadataParams) (*V1UsersMetadataOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1UsersMetadataParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1UsersMetadata", + Method: "GET", + PathPattern: "/v1/users/meta", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1UsersMetadataReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1UsersMetadataOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1UsersMetadata: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1UsersProjectRoles returns the specified user projects and roles information + +Returns a User with projects and roles +*/ +func (a *Client) V1UsersProjectRoles(params *V1UsersProjectRolesParams) (*V1UsersProjectRolesOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1UsersProjectRolesParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1UsersProjectRoles", + Method: "GET", + PathPattern: "/v1/users/{uid}/projects", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1UsersProjectRolesReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1UsersProjectRolesOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1UsersProjectRoles: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1UsersProjectRolesPut updates the projects and roles for user + +User is updated with projects and roles +*/ +func (a *Client) V1UsersProjectRolesPut(params *V1UsersProjectRolesPutParams) (*V1UsersProjectRolesPutNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1UsersProjectRolesPutParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1UsersProjectRolesPut", + Method: "PUT", + PathPattern: "/v1/users/{uid}/projects", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1UsersProjectRolesPutReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1UsersProjectRolesPutNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1UsersProjectRolesPut: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1UsersResourceRolesUIDUpdate updates the resource roles for user + +Specific resource roles fo user is updated +*/ +func (a *Client) V1UsersResourceRolesUIDUpdate(params *V1UsersResourceRolesUIDUpdateParams) (*V1UsersResourceRolesUIDUpdateNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1UsersResourceRolesUIDUpdateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1UsersResourceRolesUidUpdate", + Method: "PATCH", + PathPattern: "/v1/users/{uid}/resourceRoles/{resourceRoleUid}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1UsersResourceRolesUIDUpdateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1UsersResourceRolesUIDUpdateNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1UsersResourceRolesUidUpdate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1UsersStatusLoginMode users status login mode +*/ +func (a *Client) V1UsersStatusLoginMode(params *V1UsersStatusLoginModeParams) (*V1UsersStatusLoginModeNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1UsersStatusLoginModeParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1UsersStatusLoginMode", + Method: "PATCH", + PathPattern: "/v1/users/{uid}/status/loginMode", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1UsersStatusLoginModeReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1UsersStatusLoginModeNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1UsersStatusLoginMode: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1UsersSummaryGet retrieves a list of users summary with provided filter spec +*/ +func (a *Client) V1UsersSummaryGet(params *V1UsersSummaryGetParams) (*V1UsersSummaryGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1UsersSummaryGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1UsersSummaryGet", + Method: "POST", + PathPattern: "/v1/users/summary", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1UsersSummaryGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1UsersSummaryGetOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1UsersSummaryGet: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1UsersSystemFeature returns the users system feature + +Returns the users system feature +*/ +func (a *Client) V1UsersSystemFeature(params *V1UsersSystemFeatureParams) (*V1UsersSystemFeatureOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1UsersSystemFeatureParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1UsersSystemFeature", + Method: "GET", + PathPattern: "/v1/users/system/features", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1UsersSystemFeatureReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1UsersSystemFeatureOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1UsersSystemFeature: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1UsersSystemMacrosCreate creates or add new macros for the system user +*/ +func (a *Client) V1UsersSystemMacrosCreate(params *V1UsersSystemMacrosCreateParams) (*V1UsersSystemMacrosCreateNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1UsersSystemMacrosCreateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1UsersSystemMacrosCreate", + Method: "POST", + PathPattern: "/v1/users/system/macros", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1UsersSystemMacrosCreateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1UsersSystemMacrosCreateNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1UsersSystemMacrosCreate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1UsersSystemMacrosDeleteByMacroName deletes the macros for the system user by macro name +*/ +func (a *Client) V1UsersSystemMacrosDeleteByMacroName(params *V1UsersSystemMacrosDeleteByMacroNameParams) (*V1UsersSystemMacrosDeleteByMacroNameNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1UsersSystemMacrosDeleteByMacroNameParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1UsersSystemMacrosDeleteByMacroName", + Method: "DELETE", + PathPattern: "/v1/users/system/macros", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1UsersSystemMacrosDeleteByMacroNameReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1UsersSystemMacrosDeleteByMacroNameNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1UsersSystemMacrosDeleteByMacroName: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1UsersSystemMacrosList lists the macros of the system +*/ +func (a *Client) V1UsersSystemMacrosList(params *V1UsersSystemMacrosListParams) (*V1UsersSystemMacrosListOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1UsersSystemMacrosListParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1UsersSystemMacrosList", + Method: "GET", + PathPattern: "/v1/users/system/macros", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1UsersSystemMacrosListReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1UsersSystemMacrosListOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1UsersSystemMacrosList: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1UsersSystemMacrosUpdate updates the macros of the system +*/ +func (a *Client) V1UsersSystemMacrosUpdate(params *V1UsersSystemMacrosUpdateParams) (*V1UsersSystemMacrosUpdateNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1UsersSystemMacrosUpdateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1UsersSystemMacrosUpdate", + Method: "PUT", + PathPattern: "/v1/users/system/macros", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1UsersSystemMacrosUpdateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1UsersSystemMacrosUpdateNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1UsersSystemMacrosUpdate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1UsersSystemMacrosUpdateByMacroName updates the macros for the system user by macro name +*/ +func (a *Client) V1UsersSystemMacrosUpdateByMacroName(params *V1UsersSystemMacrosUpdateByMacroNameParams) (*V1UsersSystemMacrosUpdateByMacroNameNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1UsersSystemMacrosUpdateByMacroNameParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1UsersSystemMacrosUpdateByMacroName", + Method: "PATCH", + PathPattern: "/v1/users/system/macros", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1UsersSystemMacrosUpdateByMacroNameReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1UsersSystemMacrosUpdateByMacroNameNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1UsersSystemMacrosUpdateByMacroName: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1UsersUIDDelete deletes the specified user + +Deletes the specified User for given uid +*/ +func (a *Client) V1UsersUIDDelete(params *V1UsersUIDDeleteParams) (*V1UsersUIDDeleteNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1UsersUIDDeleteParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1UsersUidDelete", + Method: "DELETE", + PathPattern: "/v1/users/{uid}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1UsersUIDDeleteReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1UsersUIDDeleteNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1UsersUidDelete: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1UsersUIDGet returns the specified user + +Returns a User for the specified uid. +*/ +func (a *Client) V1UsersUIDGet(params *V1UsersUIDGetParams) (*V1UsersUIDGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1UsersUIDGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1UsersUidGet", + Method: "GET", + PathPattern: "/v1/users/{uid}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1UsersUIDGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1UsersUIDGetOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1UsersUidGet: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1UsersUIDPasswordChange users password change request using the user uid + +User password change request via current password +*/ +func (a *Client) V1UsersUIDPasswordChange(params *V1UsersUIDPasswordChangeParams) (*V1UsersUIDPasswordChangeNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1UsersUIDPasswordChangeParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1UsersUidPasswordChange", + Method: "PATCH", + PathPattern: "/v1/users/{uid}/password/change", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1UsersUIDPasswordChangeReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1UsersUIDPasswordChangeNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1UsersUidPasswordChange: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1UsersUIDPasswordReset users password reset request using the user uid + +User password reset request, will send the password reset option through the emailId +*/ +func (a *Client) V1UsersUIDPasswordReset(params *V1UsersUIDPasswordResetParams) (*V1UsersUIDPasswordResetNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1UsersUIDPasswordResetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1UsersUidPasswordReset", + Method: "PATCH", + PathPattern: "/v1/users/{uid}/password/reset", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1UsersUIDPasswordResetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1UsersUIDPasswordResetNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1UsersUidPasswordReset: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1UsersUIDPatch patches the specified user + +User is patched for the specified information +*/ +func (a *Client) V1UsersUIDPatch(params *V1UsersUIDPatchParams) (*V1UsersUIDPatchNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1UsersUIDPatchParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1UsersUidPatch", + Method: "PATCH", + PathPattern: "/v1/users/{uid}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1UsersUIDPatchReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1UsersUIDPatchNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1UsersUidPatch: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1UsersUIDResourceRoles returns the specified individual and resource roles for a user + +Returns resource roles for user +*/ +func (a *Client) V1UsersUIDResourceRoles(params *V1UsersUIDResourceRolesParams) (*V1UsersUIDResourceRolesOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1UsersUIDResourceRolesParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1UsersUidResourceRoles", + Method: "GET", + PathPattern: "/v1/users/{uid}/resourceRoles", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1UsersUIDResourceRolesReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1UsersUIDResourceRolesOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1UsersUidResourceRoles: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1UsersUIDResourceRolesCreate adds resource roles for user + +Resource roles added to specific user +*/ +func (a *Client) V1UsersUIDResourceRolesCreate(params *V1UsersUIDResourceRolesCreateParams) (*V1UsersUIDResourceRolesCreateNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1UsersUIDResourceRolesCreateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1UsersUidResourceRolesCreate", + Method: "POST", + PathPattern: "/v1/users/{uid}/resourceRoles", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1UsersUIDResourceRolesCreateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1UsersUIDResourceRolesCreateNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1UsersUidResourceRolesCreate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1UsersUIDResourceRolesUIDDelete deleteds the resource roles from user +*/ +func (a *Client) V1UsersUIDResourceRolesUIDDelete(params *V1UsersUIDResourceRolesUIDDeleteParams) (*V1UsersUIDResourceRolesUIDDeleteNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1UsersUIDResourceRolesUIDDeleteParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1UsersUidResourceRolesUidDelete", + Method: "DELETE", + PathPattern: "/v1/users/{uid}/resourceRoles/{resourceRoleUid}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1UsersUIDResourceRolesUIDDeleteReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1UsersUIDResourceRolesUIDDeleteNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1UsersUidResourceRolesUidDelete: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1UsersUIDRoles returns the specified individual and team roles for a user + +Returns roles clubbed from team +*/ +func (a *Client) V1UsersUIDRoles(params *V1UsersUIDRolesParams) (*V1UsersUIDRolesOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1UsersUIDRolesParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1UsersUidRoles", + Method: "GET", + PathPattern: "/v1/users/{uid}/roles", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1UsersUIDRolesReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1UsersUIDRolesOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1UsersUidRoles: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1UsersUIDRolesUpdate updates the roles for user + +User is updated with roles +*/ +func (a *Client) V1UsersUIDRolesUpdate(params *V1UsersUIDRolesUpdateParams) (*V1UsersUIDRolesUpdateNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1UsersUIDRolesUpdateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1UsersUidRolesUpdate", + Method: "PUT", + PathPattern: "/v1/users/{uid}/roles", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1UsersUIDRolesUpdateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1UsersUIDRolesUpdateNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1UsersUidRolesUpdate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1UsersUIDUpdate updates user + +A user is created for the given user context +*/ +func (a *Client) V1UsersUIDUpdate(params *V1UsersUIDUpdateParams) (*V1UsersUIDUpdateNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1UsersUIDUpdateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1UsersUidUpdate", + Method: "PUT", + PathPattern: "/v1/users/{uid}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1UsersUIDUpdateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1UsersUIDUpdateNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1UsersUidUpdate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1UsersWorkspaceGetRoles returns the specified user workspaces and roles information + +Returns a User with workspaces and roles +*/ +func (a *Client) V1UsersWorkspaceGetRoles(params *V1UsersWorkspaceGetRolesParams) (*V1UsersWorkspaceGetRolesOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1UsersWorkspaceGetRolesParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1UsersWorkspaceGetRoles", + Method: "GET", + PathPattern: "/v1/workspaces/users/{userUid}/roles", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1UsersWorkspaceGetRolesReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1UsersWorkspaceGetRolesOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1UsersWorkspaceGetRoles: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1UsersWorkspaceRolesPut updates the workspace roles for user + +User is updated with workspace roles +*/ +func (a *Client) V1UsersWorkspaceRolesPut(params *V1UsersWorkspaceRolesPutParams) (*V1UsersWorkspaceRolesPutNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1UsersWorkspaceRolesPutParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1UsersWorkspaceRolesPut", + Method: "PUT", + PathPattern: "/v1/workspaces/users/{userUid}/roles", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1UsersWorkspaceRolesPutReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1UsersWorkspaceRolesPutNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1UsersWorkspaceRolesPut: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1VMSnapshotCreate creates snapshot of virtual machine +*/ +func (a *Client) V1VMSnapshotCreate(params *V1VMSnapshotCreateParams) (*V1VMSnapshotCreateOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1VMSnapshotCreateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1VMSnapshotCreate", + Method: "POST", + PathPattern: "/v1/spectroclusters/{uid}/vms/{vmName}/snapshot", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1VMSnapshotCreateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1VMSnapshotCreateOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1VMSnapshotCreate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1VMSnapshotDelete deletes the snapshot of virtual machine +*/ +func (a *Client) V1VMSnapshotDelete(params *V1VMSnapshotDeleteParams) (*V1VMSnapshotDeleteNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1VMSnapshotDeleteParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1VMSnapshotDelete", + Method: "DELETE", + PathPattern: "/v1/spectroclusters/{uid}/vms/{vmName}/snapshot/{snapshotName}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1VMSnapshotDeleteReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1VMSnapshotDeleteNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1VMSnapshotDelete: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1VMSnapshotGet gets virtual machine snapshot +*/ +func (a *Client) V1VMSnapshotGet(params *V1VMSnapshotGetParams) (*V1VMSnapshotGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1VMSnapshotGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1VMSnapshotGet", + Method: "GET", + PathPattern: "/v1/spectroclusters/{uid}/vms/{vmName}/snapshot/{snapshotName}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1VMSnapshotGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1VMSnapshotGetOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1VMSnapshotGet: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1VMSnapshotUpdate updates the specified snapshot of a virtual machine +*/ +func (a *Client) V1VMSnapshotUpdate(params *V1VMSnapshotUpdateParams) (*V1VMSnapshotUpdateOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1VMSnapshotUpdateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1VMSnapshotUpdate", + Method: "PUT", + PathPattern: "/v1/spectroclusters/{uid}/vms/{vmName}/snapshot/{snapshotName}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1VMSnapshotUpdateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1VMSnapshotUpdateOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1VMSnapshotUpdate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1VirtualClustersPacksValues gets the cluster pack values yaml +*/ +func (a *Client) V1VirtualClustersPacksValues(params *V1VirtualClustersPacksValuesParams) (*V1VirtualClustersPacksValuesOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1VirtualClustersPacksValuesParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1VirtualClustersPacksValues", + Method: "GET", + PathPattern: "/v1/spectroclusters/virtual/packs/values", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1VirtualClustersPacksValuesReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1VirtualClustersPacksValuesOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1VirtualClustersPacksValues: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1VsphereAccountsUIDClusterRes gets the v sphere computecluster resources for the given overlord account +*/ +func (a *Client) V1VsphereAccountsUIDClusterRes(params *V1VsphereAccountsUIDClusterResParams) (*V1VsphereAccountsUIDClusterResOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1VsphereAccountsUIDClusterResParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1VsphereAccountsUidClusterRes", + Method: "GET", + PathPattern: "/v1/cloudaccounts/vsphere/{uid}/properties/computecluster/resources", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1VsphereAccountsUIDClusterResReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1VsphereAccountsUIDClusterResOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1VsphereAccountsUidClusterRes: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1VsphereAccountsUIDDatacenters gets the v sphere datacenters and datacluster for the given overlord account +*/ +func (a *Client) V1VsphereAccountsUIDDatacenters(params *V1VsphereAccountsUIDDatacentersParams) (*V1VsphereAccountsUIDDatacentersOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1VsphereAccountsUIDDatacentersParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1VsphereAccountsUidDatacenters", + Method: "GET", + PathPattern: "/v1/cloudaccounts/vsphere/{uid}/properties/datacenters", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1VsphereAccountsUIDDatacentersReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1VsphereAccountsUIDDatacentersOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1VsphereAccountsUidDatacenters: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1VsphereDNSMappingCreate creates a v sphere DNS mapping +*/ +func (a *Client) V1VsphereDNSMappingCreate(params *V1VsphereDNSMappingCreateParams) (*V1VsphereDNSMappingCreateCreated, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1VsphereDNSMappingCreateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1VsphereDnsMappingCreate", + Method: "POST", + PathPattern: "/v1/users/assets/vsphere/dnsMappings", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1VsphereDNSMappingCreateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1VsphereDNSMappingCreateCreated) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1VsphereDnsMappingCreate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1VsphereDNSMappingDelete deletes the specified v sphere DNS mapping +*/ +func (a *Client) V1VsphereDNSMappingDelete(params *V1VsphereDNSMappingDeleteParams) (*V1VsphereDNSMappingDeleteNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1VsphereDNSMappingDeleteParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1VsphereDnsMappingDelete", + Method: "DELETE", + PathPattern: "/v1/users/assets/vsphere/dnsMappings/{uid}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1VsphereDNSMappingDeleteReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1VsphereDNSMappingDeleteNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1VsphereDnsMappingDelete: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1VsphereDNSMappingGet returns the specified v sphere DNS mapping +*/ +func (a *Client) V1VsphereDNSMappingGet(params *V1VsphereDNSMappingGetParams) (*V1VsphereDNSMappingGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1VsphereDNSMappingGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1VsphereDnsMappingGet", + Method: "GET", + PathPattern: "/v1/users/assets/vsphere/dnsMappings/{uid}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1VsphereDNSMappingGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1VsphereDNSMappingGetOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1VsphereDnsMappingGet: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1VsphereDNSMappingUpdate updates the specified v sphere DNS mapping +*/ +func (a *Client) V1VsphereDNSMappingUpdate(params *V1VsphereDNSMappingUpdateParams) (*V1VsphereDNSMappingUpdateNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1VsphereDNSMappingUpdateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1VsphereDnsMappingUpdate", + Method: "PUT", + PathPattern: "/v1/users/assets/vsphere/dnsMappings/{uid}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1VsphereDNSMappingUpdateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1VsphereDNSMappingUpdateNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1VsphereDnsMappingUpdate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1VsphereDNSMappingsGet returns the specified v sphere DNS mappings +*/ +func (a *Client) V1VsphereDNSMappingsGet(params *V1VsphereDNSMappingsGetParams) (*V1VsphereDNSMappingsGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1VsphereDNSMappingsGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1VsphereDnsMappingsGet", + Method: "GET", + PathPattern: "/v1/users/assets/vsphere/dnsMappings", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1VsphereDNSMappingsGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1VsphereDNSMappingsGetOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1VsphereDnsMappingsGet: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1VsphereMappingGet returns the specified v sphere DNS mapping +*/ +func (a *Client) V1VsphereMappingGet(params *V1VsphereMappingGetParams) (*V1VsphereMappingGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1VsphereMappingGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1VsphereMappingGet", + Method: "GET", + PathPattern: "/v1/users/assets/vsphere/dnsMapping", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1VsphereMappingGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1VsphereMappingGetOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1VsphereMappingGet: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1WorkspaceOpsBackupCreate creates workspace backup settings +*/ +func (a *Client) V1WorkspaceOpsBackupCreate(params *V1WorkspaceOpsBackupCreateParams) (*V1WorkspaceOpsBackupCreateCreated, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1WorkspaceOpsBackupCreateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1WorkspaceOpsBackupCreate", + Method: "POST", + PathPattern: "/v1/workspaces/{uid}/backup", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1WorkspaceOpsBackupCreateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1WorkspaceOpsBackupCreateCreated) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1WorkspaceOpsBackupCreate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1WorkspaceOpsBackupDelete deletes workspace backup +*/ +func (a *Client) V1WorkspaceOpsBackupDelete(params *V1WorkspaceOpsBackupDeleteParams) (*V1WorkspaceOpsBackupDeleteNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1WorkspaceOpsBackupDeleteParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1WorkspaceOpsBackupDelete", + Method: "DELETE", + PathPattern: "/v1/workspaces/{uid}/backup", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1WorkspaceOpsBackupDeleteReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1WorkspaceOpsBackupDeleteNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1WorkspaceOpsBackupDelete: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1WorkspaceOpsBackupGet returns the workspace backup result +*/ +func (a *Client) V1WorkspaceOpsBackupGet(params *V1WorkspaceOpsBackupGetParams) (*V1WorkspaceOpsBackupGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1WorkspaceOpsBackupGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1WorkspaceOpsBackupGet", + Method: "GET", + PathPattern: "/v1/workspaces/{uid}/backup", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1WorkspaceOpsBackupGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1WorkspaceOpsBackupGetOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1WorkspaceOpsBackupGet: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1WorkspaceOpsBackupOnDemandCreate creates on demand workspace backup +*/ +func (a *Client) V1WorkspaceOpsBackupOnDemandCreate(params *V1WorkspaceOpsBackupOnDemandCreateParams) (*V1WorkspaceOpsBackupOnDemandCreateCreated, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1WorkspaceOpsBackupOnDemandCreateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1WorkspaceOpsBackupOnDemandCreate", + Method: "POST", + PathPattern: "/v1/workspaces/{uid}/backup/onDemand", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1WorkspaceOpsBackupOnDemandCreateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1WorkspaceOpsBackupOnDemandCreateCreated) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1WorkspaceOpsBackupOnDemandCreate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1WorkspaceOpsBackupUpdate updates workspace backup settings +*/ +func (a *Client) V1WorkspaceOpsBackupUpdate(params *V1WorkspaceOpsBackupUpdateParams) (*V1WorkspaceOpsBackupUpdateNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1WorkspaceOpsBackupUpdateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1WorkspaceOpsBackupUpdate", + Method: "PUT", + PathPattern: "/v1/workspaces/{uid}/backup", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1WorkspaceOpsBackupUpdateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1WorkspaceOpsBackupUpdateNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1WorkspaceOpsBackupUpdate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1WorkspaceOpsRestoreGet returns the workspace restore result +*/ +func (a *Client) V1WorkspaceOpsRestoreGet(params *V1WorkspaceOpsRestoreGetParams) (*V1WorkspaceOpsRestoreGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1WorkspaceOpsRestoreGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1WorkspaceOpsRestoreGet", + Method: "GET", + PathPattern: "/v1/workspaces/{uid}/restore", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1WorkspaceOpsRestoreGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1WorkspaceOpsRestoreGetOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1WorkspaceOpsRestoreGet: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1WorkspaceOpsRestoreOnDemandCreate creates on demand workspace restore +*/ +func (a *Client) V1WorkspaceOpsRestoreOnDemandCreate(params *V1WorkspaceOpsRestoreOnDemandCreateParams) (*V1WorkspaceOpsRestoreOnDemandCreateCreated, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1WorkspaceOpsRestoreOnDemandCreateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1WorkspaceOpsRestoreOnDemandCreate", + Method: "POST", + PathPattern: "/v1/workspaces/{uid}/restore/onDemand", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1WorkspaceOpsRestoreOnDemandCreateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1WorkspaceOpsRestoreOnDemandCreateCreated) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1WorkspaceOpsRestoreOnDemandCreate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1WorkspacesClusterRbacCreate creates cluster rbac in workspace +*/ +func (a *Client) V1WorkspacesClusterRbacCreate(params *V1WorkspacesClusterRbacCreateParams) (*V1WorkspacesClusterRbacCreateCreated, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1WorkspacesClusterRbacCreateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1WorkspacesClusterRbacCreate", + Method: "POST", + PathPattern: "/v1/workspaces/{uid}/clusterRbacs", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1WorkspacesClusterRbacCreateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1WorkspacesClusterRbacCreateCreated) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1WorkspacesClusterRbacCreate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1WorkspacesCreate creates workspace +*/ +func (a *Client) V1WorkspacesCreate(params *V1WorkspacesCreateParams) (*V1WorkspacesCreateCreated, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1WorkspacesCreateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1WorkspacesCreate", + Method: "POST", + PathPattern: "/v1/workspaces", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1WorkspacesCreateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1WorkspacesCreateCreated) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1WorkspacesCreate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1WorkspacesUIDClusterNamespacesUpdate updates the specified workspace namespaces +*/ +func (a *Client) V1WorkspacesUIDClusterNamespacesUpdate(params *V1WorkspacesUIDClusterNamespacesUpdateParams) (*V1WorkspacesUIDClusterNamespacesUpdateNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1WorkspacesUIDClusterNamespacesUpdateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1WorkspacesUidClusterNamespacesUpdate", + Method: "PUT", + PathPattern: "/v1/workspaces/{uid}/clusterNamespaces", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1WorkspacesUIDClusterNamespacesUpdateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1WorkspacesUIDClusterNamespacesUpdateNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1WorkspacesUidClusterNamespacesUpdate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1WorkspacesUIDClusterRbacDelete deletes the specified workspace cluster rbac +*/ +func (a *Client) V1WorkspacesUIDClusterRbacDelete(params *V1WorkspacesUIDClusterRbacDeleteParams) (*V1WorkspacesUIDClusterRbacDeleteNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1WorkspacesUIDClusterRbacDeleteParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1WorkspacesUidClusterRbacDelete", + Method: "DELETE", + PathPattern: "/v1/workspaces/{uid}/clusterRbacs/{clusterRbacUid}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1WorkspacesUIDClusterRbacDeleteReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1WorkspacesUIDClusterRbacDeleteNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1WorkspacesUidClusterRbacDelete: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1WorkspacesUIDClusterRbacUpdate updates the specified workspace cluster rbac +*/ +func (a *Client) V1WorkspacesUIDClusterRbacUpdate(params *V1WorkspacesUIDClusterRbacUpdateParams) (*V1WorkspacesUIDClusterRbacUpdateNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1WorkspacesUIDClusterRbacUpdateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1WorkspacesUidClusterRbacUpdate", + Method: "PUT", + PathPattern: "/v1/workspaces/{uid}/clusterRbacs/{clusterRbacUid}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1WorkspacesUIDClusterRbacUpdateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1WorkspacesUIDClusterRbacUpdateNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1WorkspacesUidClusterRbacUpdate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1WorkspacesUIDDelete deletes the specified workspace +*/ +func (a *Client) V1WorkspacesUIDDelete(params *V1WorkspacesUIDDeleteParams) (*V1WorkspacesUIDDeleteNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1WorkspacesUIDDeleteParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1WorkspacesUidDelete", + Method: "DELETE", + PathPattern: "/v1/workspaces/{uid}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1WorkspacesUIDDeleteReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1WorkspacesUIDDeleteNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1WorkspacesUidDelete: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1WorkspacesUIDGet returns the specified workspace +*/ +func (a *Client) V1WorkspacesUIDGet(params *V1WorkspacesUIDGetParams) (*V1WorkspacesUIDGetOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1WorkspacesUIDGetParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1WorkspacesUidGet", + Method: "GET", + PathPattern: "/v1/workspaces/{uid}", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1WorkspacesUIDGetReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1WorkspacesUIDGetOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1WorkspacesUidGet: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1WorkspacesUIDMetaUpdate updates the specified workspace meta +*/ +func (a *Client) V1WorkspacesUIDMetaUpdate(params *V1WorkspacesUIDMetaUpdateParams) (*V1WorkspacesUIDMetaUpdateNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1WorkspacesUIDMetaUpdateParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1WorkspacesUidMetaUpdate", + Method: "PUT", + PathPattern: "/v1/workspaces/{uid}/meta", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1WorkspacesUIDMetaUpdateReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1WorkspacesUIDMetaUpdateNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1WorkspacesUidMetaUpdate: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* +V1WorkspacesValidateName validates the workspace name +*/ +func (a *Client) V1WorkspacesValidateName(params *V1WorkspacesValidateNameParams) (*V1WorkspacesValidateNameNoContent, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewV1WorkspacesValidateNameParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "v1WorkspacesValidateName", + Method: "GET", + PathPattern: "/v1/workspaces/validate/name", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &V1WorkspacesValidateNameReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*V1WorkspacesValidateNameNoContent) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for v1WorkspacesValidateName: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +// SetTransport changes the transport on the client +func (a *Client) SetTransport(transport runtime.ClientTransport) { + a.transport = transport +} diff --git a/api/client/v1/v1_cloud_accounts_aws_create_parameters.go b/api/client/v1/v1_cloud_accounts_aws_create_parameters.go new file mode 100644 index 00000000..7f192024 --- /dev/null +++ b/api/client/v1/v1_cloud_accounts_aws_create_parameters.go @@ -0,0 +1,139 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1CloudAccountsAwsCreateParams creates a new V1CloudAccountsAwsCreateParams object +// with the default values initialized. +func NewV1CloudAccountsAwsCreateParams() *V1CloudAccountsAwsCreateParams { + var () + return &V1CloudAccountsAwsCreateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudAccountsAwsCreateParamsWithTimeout creates a new V1CloudAccountsAwsCreateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudAccountsAwsCreateParamsWithTimeout(timeout time.Duration) *V1CloudAccountsAwsCreateParams { + var () + return &V1CloudAccountsAwsCreateParams{ + + timeout: timeout, + } +} + +// NewV1CloudAccountsAwsCreateParamsWithContext creates a new V1CloudAccountsAwsCreateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudAccountsAwsCreateParamsWithContext(ctx context.Context) *V1CloudAccountsAwsCreateParams { + var () + return &V1CloudAccountsAwsCreateParams{ + + Context: ctx, + } +} + +// NewV1CloudAccountsAwsCreateParamsWithHTTPClient creates a new V1CloudAccountsAwsCreateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudAccountsAwsCreateParamsWithHTTPClient(client *http.Client) *V1CloudAccountsAwsCreateParams { + var () + return &V1CloudAccountsAwsCreateParams{ + HTTPClient: client, + } +} + +/* +V1CloudAccountsAwsCreateParams contains all the parameters to send to the API endpoint +for the v1 cloud accounts aws create operation typically these are written to a http.Request +*/ +type V1CloudAccountsAwsCreateParams struct { + + /*Body + Request payload to validate AWS cloud account + + */ + Body *models.V1AwsAccount + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud accounts aws create params +func (o *V1CloudAccountsAwsCreateParams) WithTimeout(timeout time.Duration) *V1CloudAccountsAwsCreateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud accounts aws create params +func (o *V1CloudAccountsAwsCreateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud accounts aws create params +func (o *V1CloudAccountsAwsCreateParams) WithContext(ctx context.Context) *V1CloudAccountsAwsCreateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud accounts aws create params +func (o *V1CloudAccountsAwsCreateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud accounts aws create params +func (o *V1CloudAccountsAwsCreateParams) WithHTTPClient(client *http.Client) *V1CloudAccountsAwsCreateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud accounts aws create params +func (o *V1CloudAccountsAwsCreateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 cloud accounts aws create params +func (o *V1CloudAccountsAwsCreateParams) WithBody(body *models.V1AwsAccount) *V1CloudAccountsAwsCreateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 cloud accounts aws create params +func (o *V1CloudAccountsAwsCreateParams) SetBody(body *models.V1AwsAccount) { + o.Body = body +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudAccountsAwsCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_accounts_aws_create_responses.go b/api/client/v1/v1_cloud_accounts_aws_create_responses.go new file mode 100644 index 00000000..1bda5b61 --- /dev/null +++ b/api/client/v1/v1_cloud_accounts_aws_create_responses.go @@ -0,0 +1,77 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1CloudAccountsAwsCreateReader is a Reader for the V1CloudAccountsAwsCreate structure. +type V1CloudAccountsAwsCreateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudAccountsAwsCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 201: + result := NewV1CloudAccountsAwsCreateCreated() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudAccountsAwsCreateCreated creates a V1CloudAccountsAwsCreateCreated with default headers values +func NewV1CloudAccountsAwsCreateCreated() *V1CloudAccountsAwsCreateCreated { + return &V1CloudAccountsAwsCreateCreated{} +} + +/* +V1CloudAccountsAwsCreateCreated handles this case with default header values. + +Created successfully +*/ +type V1CloudAccountsAwsCreateCreated struct { + /*Audit uid for the request + */ + AuditUID string + + Payload *models.V1UID +} + +func (o *V1CloudAccountsAwsCreateCreated) Error() string { + return fmt.Sprintf("[POST /v1/cloudaccounts/aws][%d] v1CloudAccountsAwsCreateCreated %+v", 201, o.Payload) +} + +func (o *V1CloudAccountsAwsCreateCreated) GetPayload() *models.V1UID { + return o.Payload +} + +func (o *V1CloudAccountsAwsCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header AuditUid + o.AuditUID = response.GetHeader("AuditUid") + + o.Payload = new(models.V1UID) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_cloud_accounts_aws_delete_parameters.go b/api/client/v1/v1_cloud_accounts_aws_delete_parameters.go new file mode 100644 index 00000000..f03fc66c --- /dev/null +++ b/api/client/v1/v1_cloud_accounts_aws_delete_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1CloudAccountsAwsDeleteParams creates a new V1CloudAccountsAwsDeleteParams object +// with the default values initialized. +func NewV1CloudAccountsAwsDeleteParams() *V1CloudAccountsAwsDeleteParams { + var () + return &V1CloudAccountsAwsDeleteParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudAccountsAwsDeleteParamsWithTimeout creates a new V1CloudAccountsAwsDeleteParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudAccountsAwsDeleteParamsWithTimeout(timeout time.Duration) *V1CloudAccountsAwsDeleteParams { + var () + return &V1CloudAccountsAwsDeleteParams{ + + timeout: timeout, + } +} + +// NewV1CloudAccountsAwsDeleteParamsWithContext creates a new V1CloudAccountsAwsDeleteParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudAccountsAwsDeleteParamsWithContext(ctx context.Context) *V1CloudAccountsAwsDeleteParams { + var () + return &V1CloudAccountsAwsDeleteParams{ + + Context: ctx, + } +} + +// NewV1CloudAccountsAwsDeleteParamsWithHTTPClient creates a new V1CloudAccountsAwsDeleteParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudAccountsAwsDeleteParamsWithHTTPClient(client *http.Client) *V1CloudAccountsAwsDeleteParams { + var () + return &V1CloudAccountsAwsDeleteParams{ + HTTPClient: client, + } +} + +/* +V1CloudAccountsAwsDeleteParams contains all the parameters to send to the API endpoint +for the v1 cloud accounts aws delete operation typically these are written to a http.Request +*/ +type V1CloudAccountsAwsDeleteParams struct { + + /*UID + AWS cloud account uid + + */ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud accounts aws delete params +func (o *V1CloudAccountsAwsDeleteParams) WithTimeout(timeout time.Duration) *V1CloudAccountsAwsDeleteParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud accounts aws delete params +func (o *V1CloudAccountsAwsDeleteParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud accounts aws delete params +func (o *V1CloudAccountsAwsDeleteParams) WithContext(ctx context.Context) *V1CloudAccountsAwsDeleteParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud accounts aws delete params +func (o *V1CloudAccountsAwsDeleteParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud accounts aws delete params +func (o *V1CloudAccountsAwsDeleteParams) WithHTTPClient(client *http.Client) *V1CloudAccountsAwsDeleteParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud accounts aws delete params +func (o *V1CloudAccountsAwsDeleteParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithUID adds the uid to the v1 cloud accounts aws delete params +func (o *V1CloudAccountsAwsDeleteParams) WithUID(uid string) *V1CloudAccountsAwsDeleteParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 cloud accounts aws delete params +func (o *V1CloudAccountsAwsDeleteParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudAccountsAwsDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_accounts_aws_delete_responses.go b/api/client/v1/v1_cloud_accounts_aws_delete_responses.go new file mode 100644 index 00000000..b863d767 --- /dev/null +++ b/api/client/v1/v1_cloud_accounts_aws_delete_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1CloudAccountsAwsDeleteReader is a Reader for the V1CloudAccountsAwsDelete structure. +type V1CloudAccountsAwsDeleteReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudAccountsAwsDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1CloudAccountsAwsDeleteNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudAccountsAwsDeleteNoContent creates a V1CloudAccountsAwsDeleteNoContent with default headers values +func NewV1CloudAccountsAwsDeleteNoContent() *V1CloudAccountsAwsDeleteNoContent { + return &V1CloudAccountsAwsDeleteNoContent{} +} + +/* +V1CloudAccountsAwsDeleteNoContent handles this case with default header values. + +The resource was deleted successfully +*/ +type V1CloudAccountsAwsDeleteNoContent struct { +} + +func (o *V1CloudAccountsAwsDeleteNoContent) Error() string { + return fmt.Sprintf("[DELETE /v1/cloudaccounts/aws/{uid}][%d] v1CloudAccountsAwsDeleteNoContent ", 204) +} + +func (o *V1CloudAccountsAwsDeleteNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_cloud_accounts_aws_get_parameters.go b/api/client/v1/v1_cloud_accounts_aws_get_parameters.go new file mode 100644 index 00000000..daf2dc98 --- /dev/null +++ b/api/client/v1/v1_cloud_accounts_aws_get_parameters.go @@ -0,0 +1,178 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// NewV1CloudAccountsAwsGetParams creates a new V1CloudAccountsAwsGetParams object +// with the default values initialized. +func NewV1CloudAccountsAwsGetParams() *V1CloudAccountsAwsGetParams { + var ( + assumeCredentialsDefault = bool(false) + ) + return &V1CloudAccountsAwsGetParams{ + AssumeCredentials: &assumeCredentialsDefault, + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudAccountsAwsGetParamsWithTimeout creates a new V1CloudAccountsAwsGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudAccountsAwsGetParamsWithTimeout(timeout time.Duration) *V1CloudAccountsAwsGetParams { + var ( + assumeCredentialsDefault = bool(false) + ) + return &V1CloudAccountsAwsGetParams{ + AssumeCredentials: &assumeCredentialsDefault, + + timeout: timeout, + } +} + +// NewV1CloudAccountsAwsGetParamsWithContext creates a new V1CloudAccountsAwsGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudAccountsAwsGetParamsWithContext(ctx context.Context) *V1CloudAccountsAwsGetParams { + var ( + assumeCredentialsDefault = bool(false) + ) + return &V1CloudAccountsAwsGetParams{ + AssumeCredentials: &assumeCredentialsDefault, + + Context: ctx, + } +} + +// NewV1CloudAccountsAwsGetParamsWithHTTPClient creates a new V1CloudAccountsAwsGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudAccountsAwsGetParamsWithHTTPClient(client *http.Client) *V1CloudAccountsAwsGetParams { + var ( + assumeCredentialsDefault = bool(false) + ) + return &V1CloudAccountsAwsGetParams{ + AssumeCredentials: &assumeCredentialsDefault, + HTTPClient: client, + } +} + +/* +V1CloudAccountsAwsGetParams contains all the parameters to send to the API endpoint +for the v1 cloud accounts aws get operation typically these are written to a http.Request +*/ +type V1CloudAccountsAwsGetParams struct { + + /*AssumeCredentials*/ + AssumeCredentials *bool + /*UID + AWS cloud account uid + + */ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud accounts aws get params +func (o *V1CloudAccountsAwsGetParams) WithTimeout(timeout time.Duration) *V1CloudAccountsAwsGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud accounts aws get params +func (o *V1CloudAccountsAwsGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud accounts aws get params +func (o *V1CloudAccountsAwsGetParams) WithContext(ctx context.Context) *V1CloudAccountsAwsGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud accounts aws get params +func (o *V1CloudAccountsAwsGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud accounts aws get params +func (o *V1CloudAccountsAwsGetParams) WithHTTPClient(client *http.Client) *V1CloudAccountsAwsGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud accounts aws get params +func (o *V1CloudAccountsAwsGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithAssumeCredentials adds the assumeCredentials to the v1 cloud accounts aws get params +func (o *V1CloudAccountsAwsGetParams) WithAssumeCredentials(assumeCredentials *bool) *V1CloudAccountsAwsGetParams { + o.SetAssumeCredentials(assumeCredentials) + return o +} + +// SetAssumeCredentials adds the assumeCredentials to the v1 cloud accounts aws get params +func (o *V1CloudAccountsAwsGetParams) SetAssumeCredentials(assumeCredentials *bool) { + o.AssumeCredentials = assumeCredentials +} + +// WithUID adds the uid to the v1 cloud accounts aws get params +func (o *V1CloudAccountsAwsGetParams) WithUID(uid string) *V1CloudAccountsAwsGetParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 cloud accounts aws get params +func (o *V1CloudAccountsAwsGetParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudAccountsAwsGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.AssumeCredentials != nil { + + // query param assumeCredentials + var qrAssumeCredentials bool + if o.AssumeCredentials != nil { + qrAssumeCredentials = *o.AssumeCredentials + } + qAssumeCredentials := swag.FormatBool(qrAssumeCredentials) + if qAssumeCredentials != "" { + if err := r.SetQueryParam("assumeCredentials", qAssumeCredentials); err != nil { + return err + } + } + + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_accounts_aws_get_responses.go b/api/client/v1/v1_cloud_accounts_aws_get_responses.go new file mode 100644 index 00000000..9cab9c40 --- /dev/null +++ b/api/client/v1/v1_cloud_accounts_aws_get_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1CloudAccountsAwsGetReader is a Reader for the V1CloudAccountsAwsGet structure. +type V1CloudAccountsAwsGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudAccountsAwsGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1CloudAccountsAwsGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudAccountsAwsGetOK creates a V1CloudAccountsAwsGetOK with default headers values +func NewV1CloudAccountsAwsGetOK() *V1CloudAccountsAwsGetOK { + return &V1CloudAccountsAwsGetOK{} +} + +/* +V1CloudAccountsAwsGetOK handles this case with default header values. + +OK +*/ +type V1CloudAccountsAwsGetOK struct { + Payload *models.V1AwsAccount +} + +func (o *V1CloudAccountsAwsGetOK) Error() string { + return fmt.Sprintf("[GET /v1/cloudaccounts/aws/{uid}][%d] v1CloudAccountsAwsGetOK %+v", 200, o.Payload) +} + +func (o *V1CloudAccountsAwsGetOK) GetPayload() *models.V1AwsAccount { + return o.Payload +} + +func (o *V1CloudAccountsAwsGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1AwsAccount) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_cloud_accounts_aws_list_parameters.go b/api/client/v1/v1_cloud_accounts_aws_list_parameters.go new file mode 100644 index 00000000..263ce5e1 --- /dev/null +++ b/api/client/v1/v1_cloud_accounts_aws_list_parameters.go @@ -0,0 +1,323 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// NewV1CloudAccountsAwsListParams creates a new V1CloudAccountsAwsListParams object +// with the default values initialized. +func NewV1CloudAccountsAwsListParams() *V1CloudAccountsAwsListParams { + var ( + limitDefault = int64(50) + ) + return &V1CloudAccountsAwsListParams{ + Limit: &limitDefault, + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudAccountsAwsListParamsWithTimeout creates a new V1CloudAccountsAwsListParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudAccountsAwsListParamsWithTimeout(timeout time.Duration) *V1CloudAccountsAwsListParams { + var ( + limitDefault = int64(50) + ) + return &V1CloudAccountsAwsListParams{ + Limit: &limitDefault, + + timeout: timeout, + } +} + +// NewV1CloudAccountsAwsListParamsWithContext creates a new V1CloudAccountsAwsListParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudAccountsAwsListParamsWithContext(ctx context.Context) *V1CloudAccountsAwsListParams { + var ( + limitDefault = int64(50) + ) + return &V1CloudAccountsAwsListParams{ + Limit: &limitDefault, + + Context: ctx, + } +} + +// NewV1CloudAccountsAwsListParamsWithHTTPClient creates a new V1CloudAccountsAwsListParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudAccountsAwsListParamsWithHTTPClient(client *http.Client) *V1CloudAccountsAwsListParams { + var ( + limitDefault = int64(50) + ) + return &V1CloudAccountsAwsListParams{ + Limit: &limitDefault, + HTTPClient: client, + } +} + +/* +V1CloudAccountsAwsListParams contains all the parameters to send to the API endpoint +for the v1 cloud accounts aws list operation typically these are written to a http.Request +*/ +type V1CloudAccountsAwsListParams struct { + + /*Continue + continue token to paginate the subsequent data items + + */ + Continue *string + /*Fields + Set of fields to be presented in the response with values. The fields are comma separated. Eg: metadata.uid,metadata.name + + */ + Fields *string + /*Filters + Filters can be combined with AND, OR operators with field path name. Eg: metadata.name=TestServiceANDspec.cloudType=aws + + Server will be restricted to certain fields based on the indexed data for each resource. + + */ + Filters *string + /*Limit + limit is a maximum number of responses to return for a list call. Default and maximum value of the limit is 50. + If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. + + */ + Limit *int64 + /*Offset + offset is the next index number from which the response will start. The response offset value can be used along with continue token for the pagination. + + */ + Offset *int64 + /*OrderBy + Specify the fields with sort order. 1 indicates ascending and -1 for descending. Eg: orderBy=metadata.name=1,metadata.uid=-1 + + */ + OrderBy *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud accounts aws list params +func (o *V1CloudAccountsAwsListParams) WithTimeout(timeout time.Duration) *V1CloudAccountsAwsListParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud accounts aws list params +func (o *V1CloudAccountsAwsListParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud accounts aws list params +func (o *V1CloudAccountsAwsListParams) WithContext(ctx context.Context) *V1CloudAccountsAwsListParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud accounts aws list params +func (o *V1CloudAccountsAwsListParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud accounts aws list params +func (o *V1CloudAccountsAwsListParams) WithHTTPClient(client *http.Client) *V1CloudAccountsAwsListParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud accounts aws list params +func (o *V1CloudAccountsAwsListParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithContinue adds the continueVar to the v1 cloud accounts aws list params +func (o *V1CloudAccountsAwsListParams) WithContinue(continueVar *string) *V1CloudAccountsAwsListParams { + o.SetContinue(continueVar) + return o +} + +// SetContinue adds the continue to the v1 cloud accounts aws list params +func (o *V1CloudAccountsAwsListParams) SetContinue(continueVar *string) { + o.Continue = continueVar +} + +// WithFields adds the fields to the v1 cloud accounts aws list params +func (o *V1CloudAccountsAwsListParams) WithFields(fields *string) *V1CloudAccountsAwsListParams { + o.SetFields(fields) + return o +} + +// SetFields adds the fields to the v1 cloud accounts aws list params +func (o *V1CloudAccountsAwsListParams) SetFields(fields *string) { + o.Fields = fields +} + +// WithFilters adds the filters to the v1 cloud accounts aws list params +func (o *V1CloudAccountsAwsListParams) WithFilters(filters *string) *V1CloudAccountsAwsListParams { + o.SetFilters(filters) + return o +} + +// SetFilters adds the filters to the v1 cloud accounts aws list params +func (o *V1CloudAccountsAwsListParams) SetFilters(filters *string) { + o.Filters = filters +} + +// WithLimit adds the limit to the v1 cloud accounts aws list params +func (o *V1CloudAccountsAwsListParams) WithLimit(limit *int64) *V1CloudAccountsAwsListParams { + o.SetLimit(limit) + return o +} + +// SetLimit adds the limit to the v1 cloud accounts aws list params +func (o *V1CloudAccountsAwsListParams) SetLimit(limit *int64) { + o.Limit = limit +} + +// WithOffset adds the offset to the v1 cloud accounts aws list params +func (o *V1CloudAccountsAwsListParams) WithOffset(offset *int64) *V1CloudAccountsAwsListParams { + o.SetOffset(offset) + return o +} + +// SetOffset adds the offset to the v1 cloud accounts aws list params +func (o *V1CloudAccountsAwsListParams) SetOffset(offset *int64) { + o.Offset = offset +} + +// WithOrderBy adds the orderBy to the v1 cloud accounts aws list params +func (o *V1CloudAccountsAwsListParams) WithOrderBy(orderBy *string) *V1CloudAccountsAwsListParams { + o.SetOrderBy(orderBy) + return o +} + +// SetOrderBy adds the orderBy to the v1 cloud accounts aws list params +func (o *V1CloudAccountsAwsListParams) SetOrderBy(orderBy *string) { + o.OrderBy = orderBy +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudAccountsAwsListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Continue != nil { + + // query param continue + var qrContinue string + if o.Continue != nil { + qrContinue = *o.Continue + } + qContinue := qrContinue + if qContinue != "" { + if err := r.SetQueryParam("continue", qContinue); err != nil { + return err + } + } + + } + + if o.Fields != nil { + + // query param fields + var qrFields string + if o.Fields != nil { + qrFields = *o.Fields + } + qFields := qrFields + if qFields != "" { + if err := r.SetQueryParam("fields", qFields); err != nil { + return err + } + } + + } + + if o.Filters != nil { + + // query param filters + var qrFilters string + if o.Filters != nil { + qrFilters = *o.Filters + } + qFilters := qrFilters + if qFilters != "" { + if err := r.SetQueryParam("filters", qFilters); err != nil { + return err + } + } + + } + + if o.Limit != nil { + + // query param limit + var qrLimit int64 + if o.Limit != nil { + qrLimit = *o.Limit + } + qLimit := swag.FormatInt64(qrLimit) + if qLimit != "" { + if err := r.SetQueryParam("limit", qLimit); err != nil { + return err + } + } + + } + + if o.Offset != nil { + + // query param offset + var qrOffset int64 + if o.Offset != nil { + qrOffset = *o.Offset + } + qOffset := swag.FormatInt64(qrOffset) + if qOffset != "" { + if err := r.SetQueryParam("offset", qOffset); err != nil { + return err + } + } + + } + + if o.OrderBy != nil { + + // query param orderBy + var qrOrderBy string + if o.OrderBy != nil { + qrOrderBy = *o.OrderBy + } + qOrderBy := qrOrderBy + if qOrderBy != "" { + if err := r.SetQueryParam("orderBy", qOrderBy); err != nil { + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_accounts_aws_list_responses.go b/api/client/v1/v1_cloud_accounts_aws_list_responses.go new file mode 100644 index 00000000..a0913721 --- /dev/null +++ b/api/client/v1/v1_cloud_accounts_aws_list_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1CloudAccountsAwsListReader is a Reader for the V1CloudAccountsAwsList structure. +type V1CloudAccountsAwsListReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudAccountsAwsListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1CloudAccountsAwsListOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudAccountsAwsListOK creates a V1CloudAccountsAwsListOK with default headers values +func NewV1CloudAccountsAwsListOK() *V1CloudAccountsAwsListOK { + return &V1CloudAccountsAwsListOK{} +} + +/* +V1CloudAccountsAwsListOK handles this case with default header values. + +An array of cloud account items +*/ +type V1CloudAccountsAwsListOK struct { + Payload *models.V1AwsAccounts +} + +func (o *V1CloudAccountsAwsListOK) Error() string { + return fmt.Sprintf("[GET /v1/cloudaccounts/aws][%d] v1CloudAccountsAwsListOK %+v", 200, o.Payload) +} + +func (o *V1CloudAccountsAwsListOK) GetPayload() *models.V1AwsAccounts { + return o.Payload +} + +func (o *V1CloudAccountsAwsListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1AwsAccounts) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_cloud_accounts_aws_update_parameters.go b/api/client/v1/v1_cloud_accounts_aws_update_parameters.go new file mode 100644 index 00000000..623b3657 --- /dev/null +++ b/api/client/v1/v1_cloud_accounts_aws_update_parameters.go @@ -0,0 +1,157 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1CloudAccountsAwsUpdateParams creates a new V1CloudAccountsAwsUpdateParams object +// with the default values initialized. +func NewV1CloudAccountsAwsUpdateParams() *V1CloudAccountsAwsUpdateParams { + var () + return &V1CloudAccountsAwsUpdateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudAccountsAwsUpdateParamsWithTimeout creates a new V1CloudAccountsAwsUpdateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudAccountsAwsUpdateParamsWithTimeout(timeout time.Duration) *V1CloudAccountsAwsUpdateParams { + var () + return &V1CloudAccountsAwsUpdateParams{ + + timeout: timeout, + } +} + +// NewV1CloudAccountsAwsUpdateParamsWithContext creates a new V1CloudAccountsAwsUpdateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudAccountsAwsUpdateParamsWithContext(ctx context.Context) *V1CloudAccountsAwsUpdateParams { + var () + return &V1CloudAccountsAwsUpdateParams{ + + Context: ctx, + } +} + +// NewV1CloudAccountsAwsUpdateParamsWithHTTPClient creates a new V1CloudAccountsAwsUpdateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudAccountsAwsUpdateParamsWithHTTPClient(client *http.Client) *V1CloudAccountsAwsUpdateParams { + var () + return &V1CloudAccountsAwsUpdateParams{ + HTTPClient: client, + } +} + +/* +V1CloudAccountsAwsUpdateParams contains all the parameters to send to the API endpoint +for the v1 cloud accounts aws update operation typically these are written to a http.Request +*/ +type V1CloudAccountsAwsUpdateParams struct { + + /*Body*/ + Body *models.V1AwsAccount + /*UID + AWS cloud account uid + + */ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud accounts aws update params +func (o *V1CloudAccountsAwsUpdateParams) WithTimeout(timeout time.Duration) *V1CloudAccountsAwsUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud accounts aws update params +func (o *V1CloudAccountsAwsUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud accounts aws update params +func (o *V1CloudAccountsAwsUpdateParams) WithContext(ctx context.Context) *V1CloudAccountsAwsUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud accounts aws update params +func (o *V1CloudAccountsAwsUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud accounts aws update params +func (o *V1CloudAccountsAwsUpdateParams) WithHTTPClient(client *http.Client) *V1CloudAccountsAwsUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud accounts aws update params +func (o *V1CloudAccountsAwsUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 cloud accounts aws update params +func (o *V1CloudAccountsAwsUpdateParams) WithBody(body *models.V1AwsAccount) *V1CloudAccountsAwsUpdateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 cloud accounts aws update params +func (o *V1CloudAccountsAwsUpdateParams) SetBody(body *models.V1AwsAccount) { + o.Body = body +} + +// WithUID adds the uid to the v1 cloud accounts aws update params +func (o *V1CloudAccountsAwsUpdateParams) WithUID(uid string) *V1CloudAccountsAwsUpdateParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 cloud accounts aws update params +func (o *V1CloudAccountsAwsUpdateParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudAccountsAwsUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_accounts_aws_update_responses.go b/api/client/v1/v1_cloud_accounts_aws_update_responses.go new file mode 100644 index 00000000..30e7091f --- /dev/null +++ b/api/client/v1/v1_cloud_accounts_aws_update_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1CloudAccountsAwsUpdateReader is a Reader for the V1CloudAccountsAwsUpdate structure. +type V1CloudAccountsAwsUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudAccountsAwsUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1CloudAccountsAwsUpdateNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudAccountsAwsUpdateNoContent creates a V1CloudAccountsAwsUpdateNoContent with default headers values +func NewV1CloudAccountsAwsUpdateNoContent() *V1CloudAccountsAwsUpdateNoContent { + return &V1CloudAccountsAwsUpdateNoContent{} +} + +/* +V1CloudAccountsAwsUpdateNoContent handles this case with default header values. + +The resource was updated successfully +*/ +type V1CloudAccountsAwsUpdateNoContent struct { +} + +func (o *V1CloudAccountsAwsUpdateNoContent) Error() string { + return fmt.Sprintf("[PUT /v1/cloudaccounts/aws/{uid}][%d] v1CloudAccountsAwsUpdateNoContent ", 204) +} + +func (o *V1CloudAccountsAwsUpdateNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_cloud_accounts_azure_create_parameters.go b/api/client/v1/v1_cloud_accounts_azure_create_parameters.go new file mode 100644 index 00000000..9c1853dc --- /dev/null +++ b/api/client/v1/v1_cloud_accounts_azure_create_parameters.go @@ -0,0 +1,139 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1CloudAccountsAzureCreateParams creates a new V1CloudAccountsAzureCreateParams object +// with the default values initialized. +func NewV1CloudAccountsAzureCreateParams() *V1CloudAccountsAzureCreateParams { + var () + return &V1CloudAccountsAzureCreateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudAccountsAzureCreateParamsWithTimeout creates a new V1CloudAccountsAzureCreateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudAccountsAzureCreateParamsWithTimeout(timeout time.Duration) *V1CloudAccountsAzureCreateParams { + var () + return &V1CloudAccountsAzureCreateParams{ + + timeout: timeout, + } +} + +// NewV1CloudAccountsAzureCreateParamsWithContext creates a new V1CloudAccountsAzureCreateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudAccountsAzureCreateParamsWithContext(ctx context.Context) *V1CloudAccountsAzureCreateParams { + var () + return &V1CloudAccountsAzureCreateParams{ + + Context: ctx, + } +} + +// NewV1CloudAccountsAzureCreateParamsWithHTTPClient creates a new V1CloudAccountsAzureCreateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudAccountsAzureCreateParamsWithHTTPClient(client *http.Client) *V1CloudAccountsAzureCreateParams { + var () + return &V1CloudAccountsAzureCreateParams{ + HTTPClient: client, + } +} + +/* +V1CloudAccountsAzureCreateParams contains all the parameters to send to the API endpoint +for the v1 cloud accounts azure create operation typically these are written to a http.Request +*/ +type V1CloudAccountsAzureCreateParams struct { + + /*Body + Request payload to validate Azure cloud account + + */ + Body *models.V1AzureAccount + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud accounts azure create params +func (o *V1CloudAccountsAzureCreateParams) WithTimeout(timeout time.Duration) *V1CloudAccountsAzureCreateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud accounts azure create params +func (o *V1CloudAccountsAzureCreateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud accounts azure create params +func (o *V1CloudAccountsAzureCreateParams) WithContext(ctx context.Context) *V1CloudAccountsAzureCreateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud accounts azure create params +func (o *V1CloudAccountsAzureCreateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud accounts azure create params +func (o *V1CloudAccountsAzureCreateParams) WithHTTPClient(client *http.Client) *V1CloudAccountsAzureCreateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud accounts azure create params +func (o *V1CloudAccountsAzureCreateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 cloud accounts azure create params +func (o *V1CloudAccountsAzureCreateParams) WithBody(body *models.V1AzureAccount) *V1CloudAccountsAzureCreateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 cloud accounts azure create params +func (o *V1CloudAccountsAzureCreateParams) SetBody(body *models.V1AzureAccount) { + o.Body = body +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudAccountsAzureCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_accounts_azure_create_responses.go b/api/client/v1/v1_cloud_accounts_azure_create_responses.go new file mode 100644 index 00000000..2496c603 --- /dev/null +++ b/api/client/v1/v1_cloud_accounts_azure_create_responses.go @@ -0,0 +1,77 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1CloudAccountsAzureCreateReader is a Reader for the V1CloudAccountsAzureCreate structure. +type V1CloudAccountsAzureCreateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudAccountsAzureCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 201: + result := NewV1CloudAccountsAzureCreateCreated() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudAccountsAzureCreateCreated creates a V1CloudAccountsAzureCreateCreated with default headers values +func NewV1CloudAccountsAzureCreateCreated() *V1CloudAccountsAzureCreateCreated { + return &V1CloudAccountsAzureCreateCreated{} +} + +/* +V1CloudAccountsAzureCreateCreated handles this case with default header values. + +Created successfully +*/ +type V1CloudAccountsAzureCreateCreated struct { + /*Audit uid for the request + */ + AuditUID string + + Payload *models.V1UID +} + +func (o *V1CloudAccountsAzureCreateCreated) Error() string { + return fmt.Sprintf("[POST /v1/cloudaccounts/azure][%d] v1CloudAccountsAzureCreateCreated %+v", 201, o.Payload) +} + +func (o *V1CloudAccountsAzureCreateCreated) GetPayload() *models.V1UID { + return o.Payload +} + +func (o *V1CloudAccountsAzureCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header AuditUid + o.AuditUID = response.GetHeader("AuditUid") + + o.Payload = new(models.V1UID) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_cloud_accounts_azure_delete_parameters.go b/api/client/v1/v1_cloud_accounts_azure_delete_parameters.go new file mode 100644 index 00000000..afc5aee5 --- /dev/null +++ b/api/client/v1/v1_cloud_accounts_azure_delete_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1CloudAccountsAzureDeleteParams creates a new V1CloudAccountsAzureDeleteParams object +// with the default values initialized. +func NewV1CloudAccountsAzureDeleteParams() *V1CloudAccountsAzureDeleteParams { + var () + return &V1CloudAccountsAzureDeleteParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudAccountsAzureDeleteParamsWithTimeout creates a new V1CloudAccountsAzureDeleteParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudAccountsAzureDeleteParamsWithTimeout(timeout time.Duration) *V1CloudAccountsAzureDeleteParams { + var () + return &V1CloudAccountsAzureDeleteParams{ + + timeout: timeout, + } +} + +// NewV1CloudAccountsAzureDeleteParamsWithContext creates a new V1CloudAccountsAzureDeleteParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudAccountsAzureDeleteParamsWithContext(ctx context.Context) *V1CloudAccountsAzureDeleteParams { + var () + return &V1CloudAccountsAzureDeleteParams{ + + Context: ctx, + } +} + +// NewV1CloudAccountsAzureDeleteParamsWithHTTPClient creates a new V1CloudAccountsAzureDeleteParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudAccountsAzureDeleteParamsWithHTTPClient(client *http.Client) *V1CloudAccountsAzureDeleteParams { + var () + return &V1CloudAccountsAzureDeleteParams{ + HTTPClient: client, + } +} + +/* +V1CloudAccountsAzureDeleteParams contains all the parameters to send to the API endpoint +for the v1 cloud accounts azure delete operation typically these are written to a http.Request +*/ +type V1CloudAccountsAzureDeleteParams struct { + + /*UID + Azure cloud account uid + + */ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud accounts azure delete params +func (o *V1CloudAccountsAzureDeleteParams) WithTimeout(timeout time.Duration) *V1CloudAccountsAzureDeleteParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud accounts azure delete params +func (o *V1CloudAccountsAzureDeleteParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud accounts azure delete params +func (o *V1CloudAccountsAzureDeleteParams) WithContext(ctx context.Context) *V1CloudAccountsAzureDeleteParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud accounts azure delete params +func (o *V1CloudAccountsAzureDeleteParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud accounts azure delete params +func (o *V1CloudAccountsAzureDeleteParams) WithHTTPClient(client *http.Client) *V1CloudAccountsAzureDeleteParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud accounts azure delete params +func (o *V1CloudAccountsAzureDeleteParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithUID adds the uid to the v1 cloud accounts azure delete params +func (o *V1CloudAccountsAzureDeleteParams) WithUID(uid string) *V1CloudAccountsAzureDeleteParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 cloud accounts azure delete params +func (o *V1CloudAccountsAzureDeleteParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudAccountsAzureDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_accounts_azure_delete_responses.go b/api/client/v1/v1_cloud_accounts_azure_delete_responses.go new file mode 100644 index 00000000..aa73a72e --- /dev/null +++ b/api/client/v1/v1_cloud_accounts_azure_delete_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1CloudAccountsAzureDeleteReader is a Reader for the V1CloudAccountsAzureDelete structure. +type V1CloudAccountsAzureDeleteReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudAccountsAzureDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1CloudAccountsAzureDeleteNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudAccountsAzureDeleteNoContent creates a V1CloudAccountsAzureDeleteNoContent with default headers values +func NewV1CloudAccountsAzureDeleteNoContent() *V1CloudAccountsAzureDeleteNoContent { + return &V1CloudAccountsAzureDeleteNoContent{} +} + +/* +V1CloudAccountsAzureDeleteNoContent handles this case with default header values. + +The resource was deleted successfully +*/ +type V1CloudAccountsAzureDeleteNoContent struct { +} + +func (o *V1CloudAccountsAzureDeleteNoContent) Error() string { + return fmt.Sprintf("[DELETE /v1/cloudaccounts/azure/{uid}][%d] v1CloudAccountsAzureDeleteNoContent ", 204) +} + +func (o *V1CloudAccountsAzureDeleteNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_cloud_accounts_azure_get_parameters.go b/api/client/v1/v1_cloud_accounts_azure_get_parameters.go new file mode 100644 index 00000000..eb648185 --- /dev/null +++ b/api/client/v1/v1_cloud_accounts_azure_get_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1CloudAccountsAzureGetParams creates a new V1CloudAccountsAzureGetParams object +// with the default values initialized. +func NewV1CloudAccountsAzureGetParams() *V1CloudAccountsAzureGetParams { + var () + return &V1CloudAccountsAzureGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudAccountsAzureGetParamsWithTimeout creates a new V1CloudAccountsAzureGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudAccountsAzureGetParamsWithTimeout(timeout time.Duration) *V1CloudAccountsAzureGetParams { + var () + return &V1CloudAccountsAzureGetParams{ + + timeout: timeout, + } +} + +// NewV1CloudAccountsAzureGetParamsWithContext creates a new V1CloudAccountsAzureGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudAccountsAzureGetParamsWithContext(ctx context.Context) *V1CloudAccountsAzureGetParams { + var () + return &V1CloudAccountsAzureGetParams{ + + Context: ctx, + } +} + +// NewV1CloudAccountsAzureGetParamsWithHTTPClient creates a new V1CloudAccountsAzureGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudAccountsAzureGetParamsWithHTTPClient(client *http.Client) *V1CloudAccountsAzureGetParams { + var () + return &V1CloudAccountsAzureGetParams{ + HTTPClient: client, + } +} + +/* +V1CloudAccountsAzureGetParams contains all the parameters to send to the API endpoint +for the v1 cloud accounts azure get operation typically these are written to a http.Request +*/ +type V1CloudAccountsAzureGetParams struct { + + /*UID + Azure cloud account uid + + */ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud accounts azure get params +func (o *V1CloudAccountsAzureGetParams) WithTimeout(timeout time.Duration) *V1CloudAccountsAzureGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud accounts azure get params +func (o *V1CloudAccountsAzureGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud accounts azure get params +func (o *V1CloudAccountsAzureGetParams) WithContext(ctx context.Context) *V1CloudAccountsAzureGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud accounts azure get params +func (o *V1CloudAccountsAzureGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud accounts azure get params +func (o *V1CloudAccountsAzureGetParams) WithHTTPClient(client *http.Client) *V1CloudAccountsAzureGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud accounts azure get params +func (o *V1CloudAccountsAzureGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithUID adds the uid to the v1 cloud accounts azure get params +func (o *V1CloudAccountsAzureGetParams) WithUID(uid string) *V1CloudAccountsAzureGetParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 cloud accounts azure get params +func (o *V1CloudAccountsAzureGetParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudAccountsAzureGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_accounts_azure_get_responses.go b/api/client/v1/v1_cloud_accounts_azure_get_responses.go new file mode 100644 index 00000000..2708ff34 --- /dev/null +++ b/api/client/v1/v1_cloud_accounts_azure_get_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1CloudAccountsAzureGetReader is a Reader for the V1CloudAccountsAzureGet structure. +type V1CloudAccountsAzureGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudAccountsAzureGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1CloudAccountsAzureGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudAccountsAzureGetOK creates a V1CloudAccountsAzureGetOK with default headers values +func NewV1CloudAccountsAzureGetOK() *V1CloudAccountsAzureGetOK { + return &V1CloudAccountsAzureGetOK{} +} + +/* +V1CloudAccountsAzureGetOK handles this case with default header values. + +OK +*/ +type V1CloudAccountsAzureGetOK struct { + Payload *models.V1AzureAccount +} + +func (o *V1CloudAccountsAzureGetOK) Error() string { + return fmt.Sprintf("[GET /v1/cloudaccounts/azure/{uid}][%d] v1CloudAccountsAzureGetOK %+v", 200, o.Payload) +} + +func (o *V1CloudAccountsAzureGetOK) GetPayload() *models.V1AzureAccount { + return o.Payload +} + +func (o *V1CloudAccountsAzureGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1AzureAccount) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_cloud_accounts_azure_list_parameters.go b/api/client/v1/v1_cloud_accounts_azure_list_parameters.go new file mode 100644 index 00000000..c0466c68 --- /dev/null +++ b/api/client/v1/v1_cloud_accounts_azure_list_parameters.go @@ -0,0 +1,323 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// NewV1CloudAccountsAzureListParams creates a new V1CloudAccountsAzureListParams object +// with the default values initialized. +func NewV1CloudAccountsAzureListParams() *V1CloudAccountsAzureListParams { + var ( + limitDefault = int64(50) + ) + return &V1CloudAccountsAzureListParams{ + Limit: &limitDefault, + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudAccountsAzureListParamsWithTimeout creates a new V1CloudAccountsAzureListParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudAccountsAzureListParamsWithTimeout(timeout time.Duration) *V1CloudAccountsAzureListParams { + var ( + limitDefault = int64(50) + ) + return &V1CloudAccountsAzureListParams{ + Limit: &limitDefault, + + timeout: timeout, + } +} + +// NewV1CloudAccountsAzureListParamsWithContext creates a new V1CloudAccountsAzureListParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudAccountsAzureListParamsWithContext(ctx context.Context) *V1CloudAccountsAzureListParams { + var ( + limitDefault = int64(50) + ) + return &V1CloudAccountsAzureListParams{ + Limit: &limitDefault, + + Context: ctx, + } +} + +// NewV1CloudAccountsAzureListParamsWithHTTPClient creates a new V1CloudAccountsAzureListParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudAccountsAzureListParamsWithHTTPClient(client *http.Client) *V1CloudAccountsAzureListParams { + var ( + limitDefault = int64(50) + ) + return &V1CloudAccountsAzureListParams{ + Limit: &limitDefault, + HTTPClient: client, + } +} + +/* +V1CloudAccountsAzureListParams contains all the parameters to send to the API endpoint +for the v1 cloud accounts azure list operation typically these are written to a http.Request +*/ +type V1CloudAccountsAzureListParams struct { + + /*Continue + continue token to paginate the subsequent data items + + */ + Continue *string + /*Fields + Set of fields to be presented in the response with values. The fields are comma separated. Eg: metadata.uid,metadata.name + + */ + Fields *string + /*Filters + Filters can be combined with AND, OR operators with field path name. Eg: metadata.name=TestServiceANDspec.cloudType=aws + + Server will be restricted to certain fields based on the indexed data for each resource. + + */ + Filters *string + /*Limit + limit is a maximum number of responses to return for a list call. Default and maximum value of the limit is 50. + If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. + + */ + Limit *int64 + /*Offset + offset is the next index number from which the response will start. The response offset value can be used along with continue token for the pagination. + + */ + Offset *int64 + /*OrderBy + Specify the fields with sort order. 1 indicates ascending and -1 for descending. Eg: orderBy=metadata.name=1,metadata.uid=-1 + + */ + OrderBy *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud accounts azure list params +func (o *V1CloudAccountsAzureListParams) WithTimeout(timeout time.Duration) *V1CloudAccountsAzureListParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud accounts azure list params +func (o *V1CloudAccountsAzureListParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud accounts azure list params +func (o *V1CloudAccountsAzureListParams) WithContext(ctx context.Context) *V1CloudAccountsAzureListParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud accounts azure list params +func (o *V1CloudAccountsAzureListParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud accounts azure list params +func (o *V1CloudAccountsAzureListParams) WithHTTPClient(client *http.Client) *V1CloudAccountsAzureListParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud accounts azure list params +func (o *V1CloudAccountsAzureListParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithContinue adds the continueVar to the v1 cloud accounts azure list params +func (o *V1CloudAccountsAzureListParams) WithContinue(continueVar *string) *V1CloudAccountsAzureListParams { + o.SetContinue(continueVar) + return o +} + +// SetContinue adds the continue to the v1 cloud accounts azure list params +func (o *V1CloudAccountsAzureListParams) SetContinue(continueVar *string) { + o.Continue = continueVar +} + +// WithFields adds the fields to the v1 cloud accounts azure list params +func (o *V1CloudAccountsAzureListParams) WithFields(fields *string) *V1CloudAccountsAzureListParams { + o.SetFields(fields) + return o +} + +// SetFields adds the fields to the v1 cloud accounts azure list params +func (o *V1CloudAccountsAzureListParams) SetFields(fields *string) { + o.Fields = fields +} + +// WithFilters adds the filters to the v1 cloud accounts azure list params +func (o *V1CloudAccountsAzureListParams) WithFilters(filters *string) *V1CloudAccountsAzureListParams { + o.SetFilters(filters) + return o +} + +// SetFilters adds the filters to the v1 cloud accounts azure list params +func (o *V1CloudAccountsAzureListParams) SetFilters(filters *string) { + o.Filters = filters +} + +// WithLimit adds the limit to the v1 cloud accounts azure list params +func (o *V1CloudAccountsAzureListParams) WithLimit(limit *int64) *V1CloudAccountsAzureListParams { + o.SetLimit(limit) + return o +} + +// SetLimit adds the limit to the v1 cloud accounts azure list params +func (o *V1CloudAccountsAzureListParams) SetLimit(limit *int64) { + o.Limit = limit +} + +// WithOffset adds the offset to the v1 cloud accounts azure list params +func (o *V1CloudAccountsAzureListParams) WithOffset(offset *int64) *V1CloudAccountsAzureListParams { + o.SetOffset(offset) + return o +} + +// SetOffset adds the offset to the v1 cloud accounts azure list params +func (o *V1CloudAccountsAzureListParams) SetOffset(offset *int64) { + o.Offset = offset +} + +// WithOrderBy adds the orderBy to the v1 cloud accounts azure list params +func (o *V1CloudAccountsAzureListParams) WithOrderBy(orderBy *string) *V1CloudAccountsAzureListParams { + o.SetOrderBy(orderBy) + return o +} + +// SetOrderBy adds the orderBy to the v1 cloud accounts azure list params +func (o *V1CloudAccountsAzureListParams) SetOrderBy(orderBy *string) { + o.OrderBy = orderBy +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudAccountsAzureListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Continue != nil { + + // query param continue + var qrContinue string + if o.Continue != nil { + qrContinue = *o.Continue + } + qContinue := qrContinue + if qContinue != "" { + if err := r.SetQueryParam("continue", qContinue); err != nil { + return err + } + } + + } + + if o.Fields != nil { + + // query param fields + var qrFields string + if o.Fields != nil { + qrFields = *o.Fields + } + qFields := qrFields + if qFields != "" { + if err := r.SetQueryParam("fields", qFields); err != nil { + return err + } + } + + } + + if o.Filters != nil { + + // query param filters + var qrFilters string + if o.Filters != nil { + qrFilters = *o.Filters + } + qFilters := qrFilters + if qFilters != "" { + if err := r.SetQueryParam("filters", qFilters); err != nil { + return err + } + } + + } + + if o.Limit != nil { + + // query param limit + var qrLimit int64 + if o.Limit != nil { + qrLimit = *o.Limit + } + qLimit := swag.FormatInt64(qrLimit) + if qLimit != "" { + if err := r.SetQueryParam("limit", qLimit); err != nil { + return err + } + } + + } + + if o.Offset != nil { + + // query param offset + var qrOffset int64 + if o.Offset != nil { + qrOffset = *o.Offset + } + qOffset := swag.FormatInt64(qrOffset) + if qOffset != "" { + if err := r.SetQueryParam("offset", qOffset); err != nil { + return err + } + } + + } + + if o.OrderBy != nil { + + // query param orderBy + var qrOrderBy string + if o.OrderBy != nil { + qrOrderBy = *o.OrderBy + } + qOrderBy := qrOrderBy + if qOrderBy != "" { + if err := r.SetQueryParam("orderBy", qOrderBy); err != nil { + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_accounts_azure_list_responses.go b/api/client/v1/v1_cloud_accounts_azure_list_responses.go new file mode 100644 index 00000000..af794261 --- /dev/null +++ b/api/client/v1/v1_cloud_accounts_azure_list_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1CloudAccountsAzureListReader is a Reader for the V1CloudAccountsAzureList structure. +type V1CloudAccountsAzureListReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudAccountsAzureListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1CloudAccountsAzureListOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudAccountsAzureListOK creates a V1CloudAccountsAzureListOK with default headers values +func NewV1CloudAccountsAzureListOK() *V1CloudAccountsAzureListOK { + return &V1CloudAccountsAzureListOK{} +} + +/* +V1CloudAccountsAzureListOK handles this case with default header values. + +An array of azure cloud account items +*/ +type V1CloudAccountsAzureListOK struct { + Payload *models.V1AzureAccounts +} + +func (o *V1CloudAccountsAzureListOK) Error() string { + return fmt.Sprintf("[GET /v1/cloudaccounts/azure][%d] v1CloudAccountsAzureListOK %+v", 200, o.Payload) +} + +func (o *V1CloudAccountsAzureListOK) GetPayload() *models.V1AzureAccounts { + return o.Payload +} + +func (o *V1CloudAccountsAzureListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1AzureAccounts) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_cloud_accounts_azure_update_parameters.go b/api/client/v1/v1_cloud_accounts_azure_update_parameters.go new file mode 100644 index 00000000..bb491748 --- /dev/null +++ b/api/client/v1/v1_cloud_accounts_azure_update_parameters.go @@ -0,0 +1,157 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1CloudAccountsAzureUpdateParams creates a new V1CloudAccountsAzureUpdateParams object +// with the default values initialized. +func NewV1CloudAccountsAzureUpdateParams() *V1CloudAccountsAzureUpdateParams { + var () + return &V1CloudAccountsAzureUpdateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudAccountsAzureUpdateParamsWithTimeout creates a new V1CloudAccountsAzureUpdateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudAccountsAzureUpdateParamsWithTimeout(timeout time.Duration) *V1CloudAccountsAzureUpdateParams { + var () + return &V1CloudAccountsAzureUpdateParams{ + + timeout: timeout, + } +} + +// NewV1CloudAccountsAzureUpdateParamsWithContext creates a new V1CloudAccountsAzureUpdateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudAccountsAzureUpdateParamsWithContext(ctx context.Context) *V1CloudAccountsAzureUpdateParams { + var () + return &V1CloudAccountsAzureUpdateParams{ + + Context: ctx, + } +} + +// NewV1CloudAccountsAzureUpdateParamsWithHTTPClient creates a new V1CloudAccountsAzureUpdateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudAccountsAzureUpdateParamsWithHTTPClient(client *http.Client) *V1CloudAccountsAzureUpdateParams { + var () + return &V1CloudAccountsAzureUpdateParams{ + HTTPClient: client, + } +} + +/* +V1CloudAccountsAzureUpdateParams contains all the parameters to send to the API endpoint +for the v1 cloud accounts azure update operation typically these are written to a http.Request +*/ +type V1CloudAccountsAzureUpdateParams struct { + + /*Body*/ + Body *models.V1AzureAccount + /*UID + Azure cloud account uid + + */ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud accounts azure update params +func (o *V1CloudAccountsAzureUpdateParams) WithTimeout(timeout time.Duration) *V1CloudAccountsAzureUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud accounts azure update params +func (o *V1CloudAccountsAzureUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud accounts azure update params +func (o *V1CloudAccountsAzureUpdateParams) WithContext(ctx context.Context) *V1CloudAccountsAzureUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud accounts azure update params +func (o *V1CloudAccountsAzureUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud accounts azure update params +func (o *V1CloudAccountsAzureUpdateParams) WithHTTPClient(client *http.Client) *V1CloudAccountsAzureUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud accounts azure update params +func (o *V1CloudAccountsAzureUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 cloud accounts azure update params +func (o *V1CloudAccountsAzureUpdateParams) WithBody(body *models.V1AzureAccount) *V1CloudAccountsAzureUpdateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 cloud accounts azure update params +func (o *V1CloudAccountsAzureUpdateParams) SetBody(body *models.V1AzureAccount) { + o.Body = body +} + +// WithUID adds the uid to the v1 cloud accounts azure update params +func (o *V1CloudAccountsAzureUpdateParams) WithUID(uid string) *V1CloudAccountsAzureUpdateParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 cloud accounts azure update params +func (o *V1CloudAccountsAzureUpdateParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudAccountsAzureUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_accounts_azure_update_responses.go b/api/client/v1/v1_cloud_accounts_azure_update_responses.go new file mode 100644 index 00000000..dfbbb261 --- /dev/null +++ b/api/client/v1/v1_cloud_accounts_azure_update_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1CloudAccountsAzureUpdateReader is a Reader for the V1CloudAccountsAzureUpdate structure. +type V1CloudAccountsAzureUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudAccountsAzureUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1CloudAccountsAzureUpdateNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudAccountsAzureUpdateNoContent creates a V1CloudAccountsAzureUpdateNoContent with default headers values +func NewV1CloudAccountsAzureUpdateNoContent() *V1CloudAccountsAzureUpdateNoContent { + return &V1CloudAccountsAzureUpdateNoContent{} +} + +/* +V1CloudAccountsAzureUpdateNoContent handles this case with default header values. + +The resource was updated successfully +*/ +type V1CloudAccountsAzureUpdateNoContent struct { +} + +func (o *V1CloudAccountsAzureUpdateNoContent) Error() string { + return fmt.Sprintf("[PUT /v1/cloudaccounts/azure/{uid}][%d] v1CloudAccountsAzureUpdateNoContent ", 204) +} + +func (o *V1CloudAccountsAzureUpdateNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_cloud_accounts_cox_edge_create_parameters.go b/api/client/v1/v1_cloud_accounts_cox_edge_create_parameters.go new file mode 100644 index 00000000..9cf99e44 --- /dev/null +++ b/api/client/v1/v1_cloud_accounts_cox_edge_create_parameters.go @@ -0,0 +1,139 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1CloudAccountsCoxEdgeCreateParams creates a new V1CloudAccountsCoxEdgeCreateParams object +// with the default values initialized. +func NewV1CloudAccountsCoxEdgeCreateParams() *V1CloudAccountsCoxEdgeCreateParams { + var () + return &V1CloudAccountsCoxEdgeCreateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudAccountsCoxEdgeCreateParamsWithTimeout creates a new V1CloudAccountsCoxEdgeCreateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudAccountsCoxEdgeCreateParamsWithTimeout(timeout time.Duration) *V1CloudAccountsCoxEdgeCreateParams { + var () + return &V1CloudAccountsCoxEdgeCreateParams{ + + timeout: timeout, + } +} + +// NewV1CloudAccountsCoxEdgeCreateParamsWithContext creates a new V1CloudAccountsCoxEdgeCreateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudAccountsCoxEdgeCreateParamsWithContext(ctx context.Context) *V1CloudAccountsCoxEdgeCreateParams { + var () + return &V1CloudAccountsCoxEdgeCreateParams{ + + Context: ctx, + } +} + +// NewV1CloudAccountsCoxEdgeCreateParamsWithHTTPClient creates a new V1CloudAccountsCoxEdgeCreateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudAccountsCoxEdgeCreateParamsWithHTTPClient(client *http.Client) *V1CloudAccountsCoxEdgeCreateParams { + var () + return &V1CloudAccountsCoxEdgeCreateParams{ + HTTPClient: client, + } +} + +/* +V1CloudAccountsCoxEdgeCreateParams contains all the parameters to send to the API endpoint +for the v1 cloud accounts cox edge create operation typically these are written to a http.Request +*/ +type V1CloudAccountsCoxEdgeCreateParams struct { + + /*Body + Request payload to validate CoxEdge cloud account + + */ + Body *models.V1CoxEdgeAccount + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud accounts cox edge create params +func (o *V1CloudAccountsCoxEdgeCreateParams) WithTimeout(timeout time.Duration) *V1CloudAccountsCoxEdgeCreateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud accounts cox edge create params +func (o *V1CloudAccountsCoxEdgeCreateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud accounts cox edge create params +func (o *V1CloudAccountsCoxEdgeCreateParams) WithContext(ctx context.Context) *V1CloudAccountsCoxEdgeCreateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud accounts cox edge create params +func (o *V1CloudAccountsCoxEdgeCreateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud accounts cox edge create params +func (o *V1CloudAccountsCoxEdgeCreateParams) WithHTTPClient(client *http.Client) *V1CloudAccountsCoxEdgeCreateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud accounts cox edge create params +func (o *V1CloudAccountsCoxEdgeCreateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 cloud accounts cox edge create params +func (o *V1CloudAccountsCoxEdgeCreateParams) WithBody(body *models.V1CoxEdgeAccount) *V1CloudAccountsCoxEdgeCreateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 cloud accounts cox edge create params +func (o *V1CloudAccountsCoxEdgeCreateParams) SetBody(body *models.V1CoxEdgeAccount) { + o.Body = body +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudAccountsCoxEdgeCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_accounts_cox_edge_create_responses.go b/api/client/v1/v1_cloud_accounts_cox_edge_create_responses.go new file mode 100644 index 00000000..d53d043a --- /dev/null +++ b/api/client/v1/v1_cloud_accounts_cox_edge_create_responses.go @@ -0,0 +1,77 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1CloudAccountsCoxEdgeCreateReader is a Reader for the V1CloudAccountsCoxEdgeCreate structure. +type V1CloudAccountsCoxEdgeCreateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudAccountsCoxEdgeCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 201: + result := NewV1CloudAccountsCoxEdgeCreateCreated() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudAccountsCoxEdgeCreateCreated creates a V1CloudAccountsCoxEdgeCreateCreated with default headers values +func NewV1CloudAccountsCoxEdgeCreateCreated() *V1CloudAccountsCoxEdgeCreateCreated { + return &V1CloudAccountsCoxEdgeCreateCreated{} +} + +/* +V1CloudAccountsCoxEdgeCreateCreated handles this case with default header values. + +Created successfully +*/ +type V1CloudAccountsCoxEdgeCreateCreated struct { + /*Audit uid for the request + */ + AuditUID string + + Payload *models.V1UID +} + +func (o *V1CloudAccountsCoxEdgeCreateCreated) Error() string { + return fmt.Sprintf("[POST /v1/cloudaccounts/coxedge][%d] v1CloudAccountsCoxEdgeCreateCreated %+v", 201, o.Payload) +} + +func (o *V1CloudAccountsCoxEdgeCreateCreated) GetPayload() *models.V1UID { + return o.Payload +} + +func (o *V1CloudAccountsCoxEdgeCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header AuditUid + o.AuditUID = response.GetHeader("AuditUid") + + o.Payload = new(models.V1UID) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_cloud_accounts_cox_edge_delete_parameters.go b/api/client/v1/v1_cloud_accounts_cox_edge_delete_parameters.go new file mode 100644 index 00000000..28e01850 --- /dev/null +++ b/api/client/v1/v1_cloud_accounts_cox_edge_delete_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1CloudAccountsCoxEdgeDeleteParams creates a new V1CloudAccountsCoxEdgeDeleteParams object +// with the default values initialized. +func NewV1CloudAccountsCoxEdgeDeleteParams() *V1CloudAccountsCoxEdgeDeleteParams { + var () + return &V1CloudAccountsCoxEdgeDeleteParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudAccountsCoxEdgeDeleteParamsWithTimeout creates a new V1CloudAccountsCoxEdgeDeleteParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudAccountsCoxEdgeDeleteParamsWithTimeout(timeout time.Duration) *V1CloudAccountsCoxEdgeDeleteParams { + var () + return &V1CloudAccountsCoxEdgeDeleteParams{ + + timeout: timeout, + } +} + +// NewV1CloudAccountsCoxEdgeDeleteParamsWithContext creates a new V1CloudAccountsCoxEdgeDeleteParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudAccountsCoxEdgeDeleteParamsWithContext(ctx context.Context) *V1CloudAccountsCoxEdgeDeleteParams { + var () + return &V1CloudAccountsCoxEdgeDeleteParams{ + + Context: ctx, + } +} + +// NewV1CloudAccountsCoxEdgeDeleteParamsWithHTTPClient creates a new V1CloudAccountsCoxEdgeDeleteParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudAccountsCoxEdgeDeleteParamsWithHTTPClient(client *http.Client) *V1CloudAccountsCoxEdgeDeleteParams { + var () + return &V1CloudAccountsCoxEdgeDeleteParams{ + HTTPClient: client, + } +} + +/* +V1CloudAccountsCoxEdgeDeleteParams contains all the parameters to send to the API endpoint +for the v1 cloud accounts cox edge delete operation typically these are written to a http.Request +*/ +type V1CloudAccountsCoxEdgeDeleteParams struct { + + /*UID + CoxEdge cloud account uid + + */ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud accounts cox edge delete params +func (o *V1CloudAccountsCoxEdgeDeleteParams) WithTimeout(timeout time.Duration) *V1CloudAccountsCoxEdgeDeleteParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud accounts cox edge delete params +func (o *V1CloudAccountsCoxEdgeDeleteParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud accounts cox edge delete params +func (o *V1CloudAccountsCoxEdgeDeleteParams) WithContext(ctx context.Context) *V1CloudAccountsCoxEdgeDeleteParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud accounts cox edge delete params +func (o *V1CloudAccountsCoxEdgeDeleteParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud accounts cox edge delete params +func (o *V1CloudAccountsCoxEdgeDeleteParams) WithHTTPClient(client *http.Client) *V1CloudAccountsCoxEdgeDeleteParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud accounts cox edge delete params +func (o *V1CloudAccountsCoxEdgeDeleteParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithUID adds the uid to the v1 cloud accounts cox edge delete params +func (o *V1CloudAccountsCoxEdgeDeleteParams) WithUID(uid string) *V1CloudAccountsCoxEdgeDeleteParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 cloud accounts cox edge delete params +func (o *V1CloudAccountsCoxEdgeDeleteParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudAccountsCoxEdgeDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_accounts_cox_edge_delete_responses.go b/api/client/v1/v1_cloud_accounts_cox_edge_delete_responses.go new file mode 100644 index 00000000..19dafa36 --- /dev/null +++ b/api/client/v1/v1_cloud_accounts_cox_edge_delete_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1CloudAccountsCoxEdgeDeleteReader is a Reader for the V1CloudAccountsCoxEdgeDelete structure. +type V1CloudAccountsCoxEdgeDeleteReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudAccountsCoxEdgeDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1CloudAccountsCoxEdgeDeleteNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudAccountsCoxEdgeDeleteNoContent creates a V1CloudAccountsCoxEdgeDeleteNoContent with default headers values +func NewV1CloudAccountsCoxEdgeDeleteNoContent() *V1CloudAccountsCoxEdgeDeleteNoContent { + return &V1CloudAccountsCoxEdgeDeleteNoContent{} +} + +/* +V1CloudAccountsCoxEdgeDeleteNoContent handles this case with default header values. + +The resource was deleted successfully +*/ +type V1CloudAccountsCoxEdgeDeleteNoContent struct { +} + +func (o *V1CloudAccountsCoxEdgeDeleteNoContent) Error() string { + return fmt.Sprintf("[DELETE /v1/cloudaccounts/coxedge/{uid}][%d] v1CloudAccountsCoxEdgeDeleteNoContent ", 204) +} + +func (o *V1CloudAccountsCoxEdgeDeleteNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_cloud_accounts_cox_edge_get_parameters.go b/api/client/v1/v1_cloud_accounts_cox_edge_get_parameters.go new file mode 100644 index 00000000..aa063f1d --- /dev/null +++ b/api/client/v1/v1_cloud_accounts_cox_edge_get_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1CloudAccountsCoxEdgeGetParams creates a new V1CloudAccountsCoxEdgeGetParams object +// with the default values initialized. +func NewV1CloudAccountsCoxEdgeGetParams() *V1CloudAccountsCoxEdgeGetParams { + var () + return &V1CloudAccountsCoxEdgeGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudAccountsCoxEdgeGetParamsWithTimeout creates a new V1CloudAccountsCoxEdgeGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudAccountsCoxEdgeGetParamsWithTimeout(timeout time.Duration) *V1CloudAccountsCoxEdgeGetParams { + var () + return &V1CloudAccountsCoxEdgeGetParams{ + + timeout: timeout, + } +} + +// NewV1CloudAccountsCoxEdgeGetParamsWithContext creates a new V1CloudAccountsCoxEdgeGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudAccountsCoxEdgeGetParamsWithContext(ctx context.Context) *V1CloudAccountsCoxEdgeGetParams { + var () + return &V1CloudAccountsCoxEdgeGetParams{ + + Context: ctx, + } +} + +// NewV1CloudAccountsCoxEdgeGetParamsWithHTTPClient creates a new V1CloudAccountsCoxEdgeGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudAccountsCoxEdgeGetParamsWithHTTPClient(client *http.Client) *V1CloudAccountsCoxEdgeGetParams { + var () + return &V1CloudAccountsCoxEdgeGetParams{ + HTTPClient: client, + } +} + +/* +V1CloudAccountsCoxEdgeGetParams contains all the parameters to send to the API endpoint +for the v1 cloud accounts cox edge get operation typically these are written to a http.Request +*/ +type V1CloudAccountsCoxEdgeGetParams struct { + + /*UID + CoxEdge cloud account uid + + */ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud accounts cox edge get params +func (o *V1CloudAccountsCoxEdgeGetParams) WithTimeout(timeout time.Duration) *V1CloudAccountsCoxEdgeGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud accounts cox edge get params +func (o *V1CloudAccountsCoxEdgeGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud accounts cox edge get params +func (o *V1CloudAccountsCoxEdgeGetParams) WithContext(ctx context.Context) *V1CloudAccountsCoxEdgeGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud accounts cox edge get params +func (o *V1CloudAccountsCoxEdgeGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud accounts cox edge get params +func (o *V1CloudAccountsCoxEdgeGetParams) WithHTTPClient(client *http.Client) *V1CloudAccountsCoxEdgeGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud accounts cox edge get params +func (o *V1CloudAccountsCoxEdgeGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithUID adds the uid to the v1 cloud accounts cox edge get params +func (o *V1CloudAccountsCoxEdgeGetParams) WithUID(uid string) *V1CloudAccountsCoxEdgeGetParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 cloud accounts cox edge get params +func (o *V1CloudAccountsCoxEdgeGetParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudAccountsCoxEdgeGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_accounts_cox_edge_get_responses.go b/api/client/v1/v1_cloud_accounts_cox_edge_get_responses.go new file mode 100644 index 00000000..969c5b89 --- /dev/null +++ b/api/client/v1/v1_cloud_accounts_cox_edge_get_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1CloudAccountsCoxEdgeGetReader is a Reader for the V1CloudAccountsCoxEdgeGet structure. +type V1CloudAccountsCoxEdgeGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudAccountsCoxEdgeGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1CloudAccountsCoxEdgeGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudAccountsCoxEdgeGetOK creates a V1CloudAccountsCoxEdgeGetOK with default headers values +func NewV1CloudAccountsCoxEdgeGetOK() *V1CloudAccountsCoxEdgeGetOK { + return &V1CloudAccountsCoxEdgeGetOK{} +} + +/* +V1CloudAccountsCoxEdgeGetOK handles this case with default header values. + +OK +*/ +type V1CloudAccountsCoxEdgeGetOK struct { + Payload *models.V1CoxEdgeAccount +} + +func (o *V1CloudAccountsCoxEdgeGetOK) Error() string { + return fmt.Sprintf("[GET /v1/cloudaccounts/coxedge/{uid}][%d] v1CloudAccountsCoxEdgeGetOK %+v", 200, o.Payload) +} + +func (o *V1CloudAccountsCoxEdgeGetOK) GetPayload() *models.V1CoxEdgeAccount { + return o.Payload +} + +func (o *V1CloudAccountsCoxEdgeGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1CoxEdgeAccount) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_cloud_accounts_cox_edge_list_parameters.go b/api/client/v1/v1_cloud_accounts_cox_edge_list_parameters.go new file mode 100644 index 00000000..6aefc7e7 --- /dev/null +++ b/api/client/v1/v1_cloud_accounts_cox_edge_list_parameters.go @@ -0,0 +1,323 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// NewV1CloudAccountsCoxEdgeListParams creates a new V1CloudAccountsCoxEdgeListParams object +// with the default values initialized. +func NewV1CloudAccountsCoxEdgeListParams() *V1CloudAccountsCoxEdgeListParams { + var ( + limitDefault = int64(50) + ) + return &V1CloudAccountsCoxEdgeListParams{ + Limit: &limitDefault, + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudAccountsCoxEdgeListParamsWithTimeout creates a new V1CloudAccountsCoxEdgeListParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudAccountsCoxEdgeListParamsWithTimeout(timeout time.Duration) *V1CloudAccountsCoxEdgeListParams { + var ( + limitDefault = int64(50) + ) + return &V1CloudAccountsCoxEdgeListParams{ + Limit: &limitDefault, + + timeout: timeout, + } +} + +// NewV1CloudAccountsCoxEdgeListParamsWithContext creates a new V1CloudAccountsCoxEdgeListParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudAccountsCoxEdgeListParamsWithContext(ctx context.Context) *V1CloudAccountsCoxEdgeListParams { + var ( + limitDefault = int64(50) + ) + return &V1CloudAccountsCoxEdgeListParams{ + Limit: &limitDefault, + + Context: ctx, + } +} + +// NewV1CloudAccountsCoxEdgeListParamsWithHTTPClient creates a new V1CloudAccountsCoxEdgeListParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudAccountsCoxEdgeListParamsWithHTTPClient(client *http.Client) *V1CloudAccountsCoxEdgeListParams { + var ( + limitDefault = int64(50) + ) + return &V1CloudAccountsCoxEdgeListParams{ + Limit: &limitDefault, + HTTPClient: client, + } +} + +/* +V1CloudAccountsCoxEdgeListParams contains all the parameters to send to the API endpoint +for the v1 cloud accounts cox edge list operation typically these are written to a http.Request +*/ +type V1CloudAccountsCoxEdgeListParams struct { + + /*Continue + continue token to paginate the subsequent data items + + */ + Continue *string + /*Fields + Set of fields to be presented in the response with values. The fields are comma separated. Eg: metadata.uid,metadata.name + + */ + Fields *string + /*Filters + Filters can be combined with AND, OR operators with field path name. Eg: metadata.name=TestServiceANDspec.cloudType=aws + + Server will be restricted to certain fields based on the indexed data for each resource. + + */ + Filters *string + /*Limit + limit is a maximum number of responses to return for a list call. Default and maximum value of the limit is 50. + If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. + + */ + Limit *int64 + /*Offset + offset is the next index number from which the response will start. The response offset value can be used along with continue token for the pagination. + + */ + Offset *int64 + /*OrderBy + Specify the fields with sort order. 1 indicates ascending and -1 for descending. Eg: orderBy=metadata.name=1,metadata.uid=-1 + + */ + OrderBy *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud accounts cox edge list params +func (o *V1CloudAccountsCoxEdgeListParams) WithTimeout(timeout time.Duration) *V1CloudAccountsCoxEdgeListParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud accounts cox edge list params +func (o *V1CloudAccountsCoxEdgeListParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud accounts cox edge list params +func (o *V1CloudAccountsCoxEdgeListParams) WithContext(ctx context.Context) *V1CloudAccountsCoxEdgeListParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud accounts cox edge list params +func (o *V1CloudAccountsCoxEdgeListParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud accounts cox edge list params +func (o *V1CloudAccountsCoxEdgeListParams) WithHTTPClient(client *http.Client) *V1CloudAccountsCoxEdgeListParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud accounts cox edge list params +func (o *V1CloudAccountsCoxEdgeListParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithContinue adds the continueVar to the v1 cloud accounts cox edge list params +func (o *V1CloudAccountsCoxEdgeListParams) WithContinue(continueVar *string) *V1CloudAccountsCoxEdgeListParams { + o.SetContinue(continueVar) + return o +} + +// SetContinue adds the continue to the v1 cloud accounts cox edge list params +func (o *V1CloudAccountsCoxEdgeListParams) SetContinue(continueVar *string) { + o.Continue = continueVar +} + +// WithFields adds the fields to the v1 cloud accounts cox edge list params +func (o *V1CloudAccountsCoxEdgeListParams) WithFields(fields *string) *V1CloudAccountsCoxEdgeListParams { + o.SetFields(fields) + return o +} + +// SetFields adds the fields to the v1 cloud accounts cox edge list params +func (o *V1CloudAccountsCoxEdgeListParams) SetFields(fields *string) { + o.Fields = fields +} + +// WithFilters adds the filters to the v1 cloud accounts cox edge list params +func (o *V1CloudAccountsCoxEdgeListParams) WithFilters(filters *string) *V1CloudAccountsCoxEdgeListParams { + o.SetFilters(filters) + return o +} + +// SetFilters adds the filters to the v1 cloud accounts cox edge list params +func (o *V1CloudAccountsCoxEdgeListParams) SetFilters(filters *string) { + o.Filters = filters +} + +// WithLimit adds the limit to the v1 cloud accounts cox edge list params +func (o *V1CloudAccountsCoxEdgeListParams) WithLimit(limit *int64) *V1CloudAccountsCoxEdgeListParams { + o.SetLimit(limit) + return o +} + +// SetLimit adds the limit to the v1 cloud accounts cox edge list params +func (o *V1CloudAccountsCoxEdgeListParams) SetLimit(limit *int64) { + o.Limit = limit +} + +// WithOffset adds the offset to the v1 cloud accounts cox edge list params +func (o *V1CloudAccountsCoxEdgeListParams) WithOffset(offset *int64) *V1CloudAccountsCoxEdgeListParams { + o.SetOffset(offset) + return o +} + +// SetOffset adds the offset to the v1 cloud accounts cox edge list params +func (o *V1CloudAccountsCoxEdgeListParams) SetOffset(offset *int64) { + o.Offset = offset +} + +// WithOrderBy adds the orderBy to the v1 cloud accounts cox edge list params +func (o *V1CloudAccountsCoxEdgeListParams) WithOrderBy(orderBy *string) *V1CloudAccountsCoxEdgeListParams { + o.SetOrderBy(orderBy) + return o +} + +// SetOrderBy adds the orderBy to the v1 cloud accounts cox edge list params +func (o *V1CloudAccountsCoxEdgeListParams) SetOrderBy(orderBy *string) { + o.OrderBy = orderBy +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudAccountsCoxEdgeListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Continue != nil { + + // query param continue + var qrContinue string + if o.Continue != nil { + qrContinue = *o.Continue + } + qContinue := qrContinue + if qContinue != "" { + if err := r.SetQueryParam("continue", qContinue); err != nil { + return err + } + } + + } + + if o.Fields != nil { + + // query param fields + var qrFields string + if o.Fields != nil { + qrFields = *o.Fields + } + qFields := qrFields + if qFields != "" { + if err := r.SetQueryParam("fields", qFields); err != nil { + return err + } + } + + } + + if o.Filters != nil { + + // query param filters + var qrFilters string + if o.Filters != nil { + qrFilters = *o.Filters + } + qFilters := qrFilters + if qFilters != "" { + if err := r.SetQueryParam("filters", qFilters); err != nil { + return err + } + } + + } + + if o.Limit != nil { + + // query param limit + var qrLimit int64 + if o.Limit != nil { + qrLimit = *o.Limit + } + qLimit := swag.FormatInt64(qrLimit) + if qLimit != "" { + if err := r.SetQueryParam("limit", qLimit); err != nil { + return err + } + } + + } + + if o.Offset != nil { + + // query param offset + var qrOffset int64 + if o.Offset != nil { + qrOffset = *o.Offset + } + qOffset := swag.FormatInt64(qrOffset) + if qOffset != "" { + if err := r.SetQueryParam("offset", qOffset); err != nil { + return err + } + } + + } + + if o.OrderBy != nil { + + // query param orderBy + var qrOrderBy string + if o.OrderBy != nil { + qrOrderBy = *o.OrderBy + } + qOrderBy := qrOrderBy + if qOrderBy != "" { + if err := r.SetQueryParam("orderBy", qOrderBy); err != nil { + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_accounts_cox_edge_list_responses.go b/api/client/v1/v1_cloud_accounts_cox_edge_list_responses.go new file mode 100644 index 00000000..2b983280 --- /dev/null +++ b/api/client/v1/v1_cloud_accounts_cox_edge_list_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1CloudAccountsCoxEdgeListReader is a Reader for the V1CloudAccountsCoxEdgeList structure. +type V1CloudAccountsCoxEdgeListReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudAccountsCoxEdgeListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1CloudAccountsCoxEdgeListOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudAccountsCoxEdgeListOK creates a V1CloudAccountsCoxEdgeListOK with default headers values +func NewV1CloudAccountsCoxEdgeListOK() *V1CloudAccountsCoxEdgeListOK { + return &V1CloudAccountsCoxEdgeListOK{} +} + +/* +V1CloudAccountsCoxEdgeListOK handles this case with default header values. + +An array of cloud account items +*/ +type V1CloudAccountsCoxEdgeListOK struct { + Payload *models.V1CoxEdgeAccounts +} + +func (o *V1CloudAccountsCoxEdgeListOK) Error() string { + return fmt.Sprintf("[GET /v1/cloudaccounts/coxedge][%d] v1CloudAccountsCoxEdgeListOK %+v", 200, o.Payload) +} + +func (o *V1CloudAccountsCoxEdgeListOK) GetPayload() *models.V1CoxEdgeAccounts { + return o.Payload +} + +func (o *V1CloudAccountsCoxEdgeListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1CoxEdgeAccounts) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_cloud_accounts_cox_edge_update_parameters.go b/api/client/v1/v1_cloud_accounts_cox_edge_update_parameters.go new file mode 100644 index 00000000..a3d4c456 --- /dev/null +++ b/api/client/v1/v1_cloud_accounts_cox_edge_update_parameters.go @@ -0,0 +1,157 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1CloudAccountsCoxEdgeUpdateParams creates a new V1CloudAccountsCoxEdgeUpdateParams object +// with the default values initialized. +func NewV1CloudAccountsCoxEdgeUpdateParams() *V1CloudAccountsCoxEdgeUpdateParams { + var () + return &V1CloudAccountsCoxEdgeUpdateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudAccountsCoxEdgeUpdateParamsWithTimeout creates a new V1CloudAccountsCoxEdgeUpdateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudAccountsCoxEdgeUpdateParamsWithTimeout(timeout time.Duration) *V1CloudAccountsCoxEdgeUpdateParams { + var () + return &V1CloudAccountsCoxEdgeUpdateParams{ + + timeout: timeout, + } +} + +// NewV1CloudAccountsCoxEdgeUpdateParamsWithContext creates a new V1CloudAccountsCoxEdgeUpdateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudAccountsCoxEdgeUpdateParamsWithContext(ctx context.Context) *V1CloudAccountsCoxEdgeUpdateParams { + var () + return &V1CloudAccountsCoxEdgeUpdateParams{ + + Context: ctx, + } +} + +// NewV1CloudAccountsCoxEdgeUpdateParamsWithHTTPClient creates a new V1CloudAccountsCoxEdgeUpdateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudAccountsCoxEdgeUpdateParamsWithHTTPClient(client *http.Client) *V1CloudAccountsCoxEdgeUpdateParams { + var () + return &V1CloudAccountsCoxEdgeUpdateParams{ + HTTPClient: client, + } +} + +/* +V1CloudAccountsCoxEdgeUpdateParams contains all the parameters to send to the API endpoint +for the v1 cloud accounts cox edge update operation typically these are written to a http.Request +*/ +type V1CloudAccountsCoxEdgeUpdateParams struct { + + /*Body*/ + Body *models.V1CoxEdgeAccount + /*UID + CoxEdge cloud account uid + + */ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud accounts cox edge update params +func (o *V1CloudAccountsCoxEdgeUpdateParams) WithTimeout(timeout time.Duration) *V1CloudAccountsCoxEdgeUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud accounts cox edge update params +func (o *V1CloudAccountsCoxEdgeUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud accounts cox edge update params +func (o *V1CloudAccountsCoxEdgeUpdateParams) WithContext(ctx context.Context) *V1CloudAccountsCoxEdgeUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud accounts cox edge update params +func (o *V1CloudAccountsCoxEdgeUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud accounts cox edge update params +func (o *V1CloudAccountsCoxEdgeUpdateParams) WithHTTPClient(client *http.Client) *V1CloudAccountsCoxEdgeUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud accounts cox edge update params +func (o *V1CloudAccountsCoxEdgeUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 cloud accounts cox edge update params +func (o *V1CloudAccountsCoxEdgeUpdateParams) WithBody(body *models.V1CoxEdgeAccount) *V1CloudAccountsCoxEdgeUpdateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 cloud accounts cox edge update params +func (o *V1CloudAccountsCoxEdgeUpdateParams) SetBody(body *models.V1CoxEdgeAccount) { + o.Body = body +} + +// WithUID adds the uid to the v1 cloud accounts cox edge update params +func (o *V1CloudAccountsCoxEdgeUpdateParams) WithUID(uid string) *V1CloudAccountsCoxEdgeUpdateParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 cloud accounts cox edge update params +func (o *V1CloudAccountsCoxEdgeUpdateParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudAccountsCoxEdgeUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_accounts_cox_edge_update_responses.go b/api/client/v1/v1_cloud_accounts_cox_edge_update_responses.go new file mode 100644 index 00000000..88001c2f --- /dev/null +++ b/api/client/v1/v1_cloud_accounts_cox_edge_update_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1CloudAccountsCoxEdgeUpdateReader is a Reader for the V1CloudAccountsCoxEdgeUpdate structure. +type V1CloudAccountsCoxEdgeUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudAccountsCoxEdgeUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1CloudAccountsCoxEdgeUpdateNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudAccountsCoxEdgeUpdateNoContent creates a V1CloudAccountsCoxEdgeUpdateNoContent with default headers values +func NewV1CloudAccountsCoxEdgeUpdateNoContent() *V1CloudAccountsCoxEdgeUpdateNoContent { + return &V1CloudAccountsCoxEdgeUpdateNoContent{} +} + +/* +V1CloudAccountsCoxEdgeUpdateNoContent handles this case with default header values. + +The resource was updated successfully +*/ +type V1CloudAccountsCoxEdgeUpdateNoContent struct { +} + +func (o *V1CloudAccountsCoxEdgeUpdateNoContent) Error() string { + return fmt.Sprintf("[PUT /v1/cloudaccounts/coxedge/{uid}][%d] v1CloudAccountsCoxEdgeUpdateNoContent ", 204) +} + +func (o *V1CloudAccountsCoxEdgeUpdateNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_cloud_accounts_custom_create_parameters.go b/api/client/v1/v1_cloud_accounts_custom_create_parameters.go new file mode 100644 index 00000000..bc74381b --- /dev/null +++ b/api/client/v1/v1_cloud_accounts_custom_create_parameters.go @@ -0,0 +1,160 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1CloudAccountsCustomCreateParams creates a new V1CloudAccountsCustomCreateParams object +// with the default values initialized. +func NewV1CloudAccountsCustomCreateParams() *V1CloudAccountsCustomCreateParams { + var () + return &V1CloudAccountsCustomCreateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudAccountsCustomCreateParamsWithTimeout creates a new V1CloudAccountsCustomCreateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudAccountsCustomCreateParamsWithTimeout(timeout time.Duration) *V1CloudAccountsCustomCreateParams { + var () + return &V1CloudAccountsCustomCreateParams{ + + timeout: timeout, + } +} + +// NewV1CloudAccountsCustomCreateParamsWithContext creates a new V1CloudAccountsCustomCreateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudAccountsCustomCreateParamsWithContext(ctx context.Context) *V1CloudAccountsCustomCreateParams { + var () + return &V1CloudAccountsCustomCreateParams{ + + Context: ctx, + } +} + +// NewV1CloudAccountsCustomCreateParamsWithHTTPClient creates a new V1CloudAccountsCustomCreateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudAccountsCustomCreateParamsWithHTTPClient(client *http.Client) *V1CloudAccountsCustomCreateParams { + var () + return &V1CloudAccountsCustomCreateParams{ + HTTPClient: client, + } +} + +/* +V1CloudAccountsCustomCreateParams contains all the parameters to send to the API endpoint +for the v1 cloud accounts custom create operation typically these are written to a http.Request +*/ +type V1CloudAccountsCustomCreateParams struct { + + /*Body + Request payload to validate Custom cloud account + + */ + Body *models.V1CustomAccountEntity + /*CloudType + Custom cloud type + + */ + CloudType string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud accounts custom create params +func (o *V1CloudAccountsCustomCreateParams) WithTimeout(timeout time.Duration) *V1CloudAccountsCustomCreateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud accounts custom create params +func (o *V1CloudAccountsCustomCreateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud accounts custom create params +func (o *V1CloudAccountsCustomCreateParams) WithContext(ctx context.Context) *V1CloudAccountsCustomCreateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud accounts custom create params +func (o *V1CloudAccountsCustomCreateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud accounts custom create params +func (o *V1CloudAccountsCustomCreateParams) WithHTTPClient(client *http.Client) *V1CloudAccountsCustomCreateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud accounts custom create params +func (o *V1CloudAccountsCustomCreateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 cloud accounts custom create params +func (o *V1CloudAccountsCustomCreateParams) WithBody(body *models.V1CustomAccountEntity) *V1CloudAccountsCustomCreateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 cloud accounts custom create params +func (o *V1CloudAccountsCustomCreateParams) SetBody(body *models.V1CustomAccountEntity) { + o.Body = body +} + +// WithCloudType adds the cloudType to the v1 cloud accounts custom create params +func (o *V1CloudAccountsCustomCreateParams) WithCloudType(cloudType string) *V1CloudAccountsCustomCreateParams { + o.SetCloudType(cloudType) + return o +} + +// SetCloudType adds the cloudType to the v1 cloud accounts custom create params +func (o *V1CloudAccountsCustomCreateParams) SetCloudType(cloudType string) { + o.CloudType = cloudType +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudAccountsCustomCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param cloudType + if err := r.SetPathParam("cloudType", o.CloudType); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_accounts_custom_create_responses.go b/api/client/v1/v1_cloud_accounts_custom_create_responses.go new file mode 100644 index 00000000..f6094309 --- /dev/null +++ b/api/client/v1/v1_cloud_accounts_custom_create_responses.go @@ -0,0 +1,77 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1CloudAccountsCustomCreateReader is a Reader for the V1CloudAccountsCustomCreate structure. +type V1CloudAccountsCustomCreateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudAccountsCustomCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 201: + result := NewV1CloudAccountsCustomCreateCreated() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudAccountsCustomCreateCreated creates a V1CloudAccountsCustomCreateCreated with default headers values +func NewV1CloudAccountsCustomCreateCreated() *V1CloudAccountsCustomCreateCreated { + return &V1CloudAccountsCustomCreateCreated{} +} + +/* +V1CloudAccountsCustomCreateCreated handles this case with default header values. + +Created successfully +*/ +type V1CloudAccountsCustomCreateCreated struct { + /*Audit uid for the request + */ + AuditUID string + + Payload *models.V1UID +} + +func (o *V1CloudAccountsCustomCreateCreated) Error() string { + return fmt.Sprintf("[POST /v1/cloudaccounts/cloudTypes/{cloudType}][%d] v1CloudAccountsCustomCreateCreated %+v", 201, o.Payload) +} + +func (o *V1CloudAccountsCustomCreateCreated) GetPayload() *models.V1UID { + return o.Payload +} + +func (o *V1CloudAccountsCustomCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header AuditUid + o.AuditUID = response.GetHeader("AuditUid") + + o.Payload = new(models.V1UID) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_cloud_accounts_custom_delete_parameters.go b/api/client/v1/v1_cloud_accounts_custom_delete_parameters.go new file mode 100644 index 00000000..546ba298 --- /dev/null +++ b/api/client/v1/v1_cloud_accounts_custom_delete_parameters.go @@ -0,0 +1,157 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1CloudAccountsCustomDeleteParams creates a new V1CloudAccountsCustomDeleteParams object +// with the default values initialized. +func NewV1CloudAccountsCustomDeleteParams() *V1CloudAccountsCustomDeleteParams { + var () + return &V1CloudAccountsCustomDeleteParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudAccountsCustomDeleteParamsWithTimeout creates a new V1CloudAccountsCustomDeleteParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudAccountsCustomDeleteParamsWithTimeout(timeout time.Duration) *V1CloudAccountsCustomDeleteParams { + var () + return &V1CloudAccountsCustomDeleteParams{ + + timeout: timeout, + } +} + +// NewV1CloudAccountsCustomDeleteParamsWithContext creates a new V1CloudAccountsCustomDeleteParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudAccountsCustomDeleteParamsWithContext(ctx context.Context) *V1CloudAccountsCustomDeleteParams { + var () + return &V1CloudAccountsCustomDeleteParams{ + + Context: ctx, + } +} + +// NewV1CloudAccountsCustomDeleteParamsWithHTTPClient creates a new V1CloudAccountsCustomDeleteParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudAccountsCustomDeleteParamsWithHTTPClient(client *http.Client) *V1CloudAccountsCustomDeleteParams { + var () + return &V1CloudAccountsCustomDeleteParams{ + HTTPClient: client, + } +} + +/* +V1CloudAccountsCustomDeleteParams contains all the parameters to send to the API endpoint +for the v1 cloud accounts custom delete operation typically these are written to a http.Request +*/ +type V1CloudAccountsCustomDeleteParams struct { + + /*CloudType + Custom cloud type + + */ + CloudType string + /*UID + Custom cloud account uid + + */ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud accounts custom delete params +func (o *V1CloudAccountsCustomDeleteParams) WithTimeout(timeout time.Duration) *V1CloudAccountsCustomDeleteParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud accounts custom delete params +func (o *V1CloudAccountsCustomDeleteParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud accounts custom delete params +func (o *V1CloudAccountsCustomDeleteParams) WithContext(ctx context.Context) *V1CloudAccountsCustomDeleteParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud accounts custom delete params +func (o *V1CloudAccountsCustomDeleteParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud accounts custom delete params +func (o *V1CloudAccountsCustomDeleteParams) WithHTTPClient(client *http.Client) *V1CloudAccountsCustomDeleteParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud accounts custom delete params +func (o *V1CloudAccountsCustomDeleteParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithCloudType adds the cloudType to the v1 cloud accounts custom delete params +func (o *V1CloudAccountsCustomDeleteParams) WithCloudType(cloudType string) *V1CloudAccountsCustomDeleteParams { + o.SetCloudType(cloudType) + return o +} + +// SetCloudType adds the cloudType to the v1 cloud accounts custom delete params +func (o *V1CloudAccountsCustomDeleteParams) SetCloudType(cloudType string) { + o.CloudType = cloudType +} + +// WithUID adds the uid to the v1 cloud accounts custom delete params +func (o *V1CloudAccountsCustomDeleteParams) WithUID(uid string) *V1CloudAccountsCustomDeleteParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 cloud accounts custom delete params +func (o *V1CloudAccountsCustomDeleteParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudAccountsCustomDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param cloudType + if err := r.SetPathParam("cloudType", o.CloudType); err != nil { + return err + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_accounts_custom_delete_responses.go b/api/client/v1/v1_cloud_accounts_custom_delete_responses.go new file mode 100644 index 00000000..1b3be27c --- /dev/null +++ b/api/client/v1/v1_cloud_accounts_custom_delete_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1CloudAccountsCustomDeleteReader is a Reader for the V1CloudAccountsCustomDelete structure. +type V1CloudAccountsCustomDeleteReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudAccountsCustomDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1CloudAccountsCustomDeleteNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudAccountsCustomDeleteNoContent creates a V1CloudAccountsCustomDeleteNoContent with default headers values +func NewV1CloudAccountsCustomDeleteNoContent() *V1CloudAccountsCustomDeleteNoContent { + return &V1CloudAccountsCustomDeleteNoContent{} +} + +/* +V1CloudAccountsCustomDeleteNoContent handles this case with default header values. + +The resource was deleted successfully +*/ +type V1CloudAccountsCustomDeleteNoContent struct { +} + +func (o *V1CloudAccountsCustomDeleteNoContent) Error() string { + return fmt.Sprintf("[DELETE /v1/cloudaccounts/cloudTypes/{cloudType}/{uid}][%d] v1CloudAccountsCustomDeleteNoContent ", 204) +} + +func (o *V1CloudAccountsCustomDeleteNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_cloud_accounts_custom_get_parameters.go b/api/client/v1/v1_cloud_accounts_custom_get_parameters.go new file mode 100644 index 00000000..6625d6d2 --- /dev/null +++ b/api/client/v1/v1_cloud_accounts_custom_get_parameters.go @@ -0,0 +1,157 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1CloudAccountsCustomGetParams creates a new V1CloudAccountsCustomGetParams object +// with the default values initialized. +func NewV1CloudAccountsCustomGetParams() *V1CloudAccountsCustomGetParams { + var () + return &V1CloudAccountsCustomGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudAccountsCustomGetParamsWithTimeout creates a new V1CloudAccountsCustomGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudAccountsCustomGetParamsWithTimeout(timeout time.Duration) *V1CloudAccountsCustomGetParams { + var () + return &V1CloudAccountsCustomGetParams{ + + timeout: timeout, + } +} + +// NewV1CloudAccountsCustomGetParamsWithContext creates a new V1CloudAccountsCustomGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudAccountsCustomGetParamsWithContext(ctx context.Context) *V1CloudAccountsCustomGetParams { + var () + return &V1CloudAccountsCustomGetParams{ + + Context: ctx, + } +} + +// NewV1CloudAccountsCustomGetParamsWithHTTPClient creates a new V1CloudAccountsCustomGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudAccountsCustomGetParamsWithHTTPClient(client *http.Client) *V1CloudAccountsCustomGetParams { + var () + return &V1CloudAccountsCustomGetParams{ + HTTPClient: client, + } +} + +/* +V1CloudAccountsCustomGetParams contains all the parameters to send to the API endpoint +for the v1 cloud accounts custom get operation typically these are written to a http.Request +*/ +type V1CloudAccountsCustomGetParams struct { + + /*CloudType + Custom cloud type + + */ + CloudType string + /*UID + Custom cloud account uid + + */ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud accounts custom get params +func (o *V1CloudAccountsCustomGetParams) WithTimeout(timeout time.Duration) *V1CloudAccountsCustomGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud accounts custom get params +func (o *V1CloudAccountsCustomGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud accounts custom get params +func (o *V1CloudAccountsCustomGetParams) WithContext(ctx context.Context) *V1CloudAccountsCustomGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud accounts custom get params +func (o *V1CloudAccountsCustomGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud accounts custom get params +func (o *V1CloudAccountsCustomGetParams) WithHTTPClient(client *http.Client) *V1CloudAccountsCustomGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud accounts custom get params +func (o *V1CloudAccountsCustomGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithCloudType adds the cloudType to the v1 cloud accounts custom get params +func (o *V1CloudAccountsCustomGetParams) WithCloudType(cloudType string) *V1CloudAccountsCustomGetParams { + o.SetCloudType(cloudType) + return o +} + +// SetCloudType adds the cloudType to the v1 cloud accounts custom get params +func (o *V1CloudAccountsCustomGetParams) SetCloudType(cloudType string) { + o.CloudType = cloudType +} + +// WithUID adds the uid to the v1 cloud accounts custom get params +func (o *V1CloudAccountsCustomGetParams) WithUID(uid string) *V1CloudAccountsCustomGetParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 cloud accounts custom get params +func (o *V1CloudAccountsCustomGetParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudAccountsCustomGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param cloudType + if err := r.SetPathParam("cloudType", o.CloudType); err != nil { + return err + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_accounts_custom_get_responses.go b/api/client/v1/v1_cloud_accounts_custom_get_responses.go new file mode 100644 index 00000000..779dfa0f --- /dev/null +++ b/api/client/v1/v1_cloud_accounts_custom_get_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1CloudAccountsCustomGetReader is a Reader for the V1CloudAccountsCustomGet structure. +type V1CloudAccountsCustomGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudAccountsCustomGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1CloudAccountsCustomGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudAccountsCustomGetOK creates a V1CloudAccountsCustomGetOK with default headers values +func NewV1CloudAccountsCustomGetOK() *V1CloudAccountsCustomGetOK { + return &V1CloudAccountsCustomGetOK{} +} + +/* +V1CloudAccountsCustomGetOK handles this case with default header values. + +OK +*/ +type V1CloudAccountsCustomGetOK struct { + Payload *models.V1CustomAccount +} + +func (o *V1CloudAccountsCustomGetOK) Error() string { + return fmt.Sprintf("[GET /v1/cloudaccounts/cloudTypes/{cloudType}/{uid}][%d] v1CloudAccountsCustomGetOK %+v", 200, o.Payload) +} + +func (o *V1CloudAccountsCustomGetOK) GetPayload() *models.V1CustomAccount { + return o.Payload +} + +func (o *V1CloudAccountsCustomGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1CustomAccount) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_cloud_accounts_custom_list_parameters.go b/api/client/v1/v1_cloud_accounts_custom_list_parameters.go new file mode 100644 index 00000000..fac9b6ba --- /dev/null +++ b/api/client/v1/v1_cloud_accounts_custom_list_parameters.go @@ -0,0 +1,344 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// NewV1CloudAccountsCustomListParams creates a new V1CloudAccountsCustomListParams object +// with the default values initialized. +func NewV1CloudAccountsCustomListParams() *V1CloudAccountsCustomListParams { + var ( + limitDefault = int64(50) + ) + return &V1CloudAccountsCustomListParams{ + Limit: &limitDefault, + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudAccountsCustomListParamsWithTimeout creates a new V1CloudAccountsCustomListParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudAccountsCustomListParamsWithTimeout(timeout time.Duration) *V1CloudAccountsCustomListParams { + var ( + limitDefault = int64(50) + ) + return &V1CloudAccountsCustomListParams{ + Limit: &limitDefault, + + timeout: timeout, + } +} + +// NewV1CloudAccountsCustomListParamsWithContext creates a new V1CloudAccountsCustomListParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudAccountsCustomListParamsWithContext(ctx context.Context) *V1CloudAccountsCustomListParams { + var ( + limitDefault = int64(50) + ) + return &V1CloudAccountsCustomListParams{ + Limit: &limitDefault, + + Context: ctx, + } +} + +// NewV1CloudAccountsCustomListParamsWithHTTPClient creates a new V1CloudAccountsCustomListParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudAccountsCustomListParamsWithHTTPClient(client *http.Client) *V1CloudAccountsCustomListParams { + var ( + limitDefault = int64(50) + ) + return &V1CloudAccountsCustomListParams{ + Limit: &limitDefault, + HTTPClient: client, + } +} + +/* +V1CloudAccountsCustomListParams contains all the parameters to send to the API endpoint +for the v1 cloud accounts custom list operation typically these are written to a http.Request +*/ +type V1CloudAccountsCustomListParams struct { + + /*CloudType + Custom cloud type + + */ + CloudType string + /*Continue + continue token to paginate the subsequent data items + + */ + Continue *string + /*Fields + Set of fields to be presented in the response with values. The fields are comma separated. Eg: metadata.uid,metadata.name + + */ + Fields *string + /*Filters + Filters can be combined with AND, OR operators with field path name. Eg: metadata.name=TestServiceANDspec.cloudType=aws + + Server will be restricted to certain fields based on the indexed data for each resource. + + */ + Filters *string + /*Limit + limit is a maximum number of responses to return for a list call. Default and maximum value of the limit is 50. + If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. + + */ + Limit *int64 + /*Offset + offset is the next index number from which the response will start. The response offset value can be used along with continue token for the pagination. + + */ + Offset *int64 + /*OrderBy + Specify the fields with sort order. 1 indicates ascending and -1 for descending. Eg: orderBy=metadata.name=1,metadata.uid=-1 + + */ + OrderBy *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud accounts custom list params +func (o *V1CloudAccountsCustomListParams) WithTimeout(timeout time.Duration) *V1CloudAccountsCustomListParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud accounts custom list params +func (o *V1CloudAccountsCustomListParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud accounts custom list params +func (o *V1CloudAccountsCustomListParams) WithContext(ctx context.Context) *V1CloudAccountsCustomListParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud accounts custom list params +func (o *V1CloudAccountsCustomListParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud accounts custom list params +func (o *V1CloudAccountsCustomListParams) WithHTTPClient(client *http.Client) *V1CloudAccountsCustomListParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud accounts custom list params +func (o *V1CloudAccountsCustomListParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithCloudType adds the cloudType to the v1 cloud accounts custom list params +func (o *V1CloudAccountsCustomListParams) WithCloudType(cloudType string) *V1CloudAccountsCustomListParams { + o.SetCloudType(cloudType) + return o +} + +// SetCloudType adds the cloudType to the v1 cloud accounts custom list params +func (o *V1CloudAccountsCustomListParams) SetCloudType(cloudType string) { + o.CloudType = cloudType +} + +// WithContinue adds the continueVar to the v1 cloud accounts custom list params +func (o *V1CloudAccountsCustomListParams) WithContinue(continueVar *string) *V1CloudAccountsCustomListParams { + o.SetContinue(continueVar) + return o +} + +// SetContinue adds the continue to the v1 cloud accounts custom list params +func (o *V1CloudAccountsCustomListParams) SetContinue(continueVar *string) { + o.Continue = continueVar +} + +// WithFields adds the fields to the v1 cloud accounts custom list params +func (o *V1CloudAccountsCustomListParams) WithFields(fields *string) *V1CloudAccountsCustomListParams { + o.SetFields(fields) + return o +} + +// SetFields adds the fields to the v1 cloud accounts custom list params +func (o *V1CloudAccountsCustomListParams) SetFields(fields *string) { + o.Fields = fields +} + +// WithFilters adds the filters to the v1 cloud accounts custom list params +func (o *V1CloudAccountsCustomListParams) WithFilters(filters *string) *V1CloudAccountsCustomListParams { + o.SetFilters(filters) + return o +} + +// SetFilters adds the filters to the v1 cloud accounts custom list params +func (o *V1CloudAccountsCustomListParams) SetFilters(filters *string) { + o.Filters = filters +} + +// WithLimit adds the limit to the v1 cloud accounts custom list params +func (o *V1CloudAccountsCustomListParams) WithLimit(limit *int64) *V1CloudAccountsCustomListParams { + o.SetLimit(limit) + return o +} + +// SetLimit adds the limit to the v1 cloud accounts custom list params +func (o *V1CloudAccountsCustomListParams) SetLimit(limit *int64) { + o.Limit = limit +} + +// WithOffset adds the offset to the v1 cloud accounts custom list params +func (o *V1CloudAccountsCustomListParams) WithOffset(offset *int64) *V1CloudAccountsCustomListParams { + o.SetOffset(offset) + return o +} + +// SetOffset adds the offset to the v1 cloud accounts custom list params +func (o *V1CloudAccountsCustomListParams) SetOffset(offset *int64) { + o.Offset = offset +} + +// WithOrderBy adds the orderBy to the v1 cloud accounts custom list params +func (o *V1CloudAccountsCustomListParams) WithOrderBy(orderBy *string) *V1CloudAccountsCustomListParams { + o.SetOrderBy(orderBy) + return o +} + +// SetOrderBy adds the orderBy to the v1 cloud accounts custom list params +func (o *V1CloudAccountsCustomListParams) SetOrderBy(orderBy *string) { + o.OrderBy = orderBy +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudAccountsCustomListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param cloudType + if err := r.SetPathParam("cloudType", o.CloudType); err != nil { + return err + } + + if o.Continue != nil { + + // query param continue + var qrContinue string + if o.Continue != nil { + qrContinue = *o.Continue + } + qContinue := qrContinue + if qContinue != "" { + if err := r.SetQueryParam("continue", qContinue); err != nil { + return err + } + } + + } + + if o.Fields != nil { + + // query param fields + var qrFields string + if o.Fields != nil { + qrFields = *o.Fields + } + qFields := qrFields + if qFields != "" { + if err := r.SetQueryParam("fields", qFields); err != nil { + return err + } + } + + } + + if o.Filters != nil { + + // query param filters + var qrFilters string + if o.Filters != nil { + qrFilters = *o.Filters + } + qFilters := qrFilters + if qFilters != "" { + if err := r.SetQueryParam("filters", qFilters); err != nil { + return err + } + } + + } + + if o.Limit != nil { + + // query param limit + var qrLimit int64 + if o.Limit != nil { + qrLimit = *o.Limit + } + qLimit := swag.FormatInt64(qrLimit) + if qLimit != "" { + if err := r.SetQueryParam("limit", qLimit); err != nil { + return err + } + } + + } + + if o.Offset != nil { + + // query param offset + var qrOffset int64 + if o.Offset != nil { + qrOffset = *o.Offset + } + qOffset := swag.FormatInt64(qrOffset) + if qOffset != "" { + if err := r.SetQueryParam("offset", qOffset); err != nil { + return err + } + } + + } + + if o.OrderBy != nil { + + // query param orderBy + var qrOrderBy string + if o.OrderBy != nil { + qrOrderBy = *o.OrderBy + } + qOrderBy := qrOrderBy + if qOrderBy != "" { + if err := r.SetQueryParam("orderBy", qOrderBy); err != nil { + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_accounts_custom_list_responses.go b/api/client/v1/v1_cloud_accounts_custom_list_responses.go new file mode 100644 index 00000000..bf18cfa8 --- /dev/null +++ b/api/client/v1/v1_cloud_accounts_custom_list_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1CloudAccountsCustomListReader is a Reader for the V1CloudAccountsCustomList structure. +type V1CloudAccountsCustomListReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudAccountsCustomListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1CloudAccountsCustomListOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudAccountsCustomListOK creates a V1CloudAccountsCustomListOK with default headers values +func NewV1CloudAccountsCustomListOK() *V1CloudAccountsCustomListOK { + return &V1CloudAccountsCustomListOK{} +} + +/* +V1CloudAccountsCustomListOK handles this case with default header values. + +An array of cloud account by specified cloud type items +*/ +type V1CloudAccountsCustomListOK struct { + Payload *models.V1CustomAccounts +} + +func (o *V1CloudAccountsCustomListOK) Error() string { + return fmt.Sprintf("[GET /v1/cloudaccounts/cloudTypes/{cloudType}][%d] v1CloudAccountsCustomListOK %+v", 200, o.Payload) +} + +func (o *V1CloudAccountsCustomListOK) GetPayload() *models.V1CustomAccounts { + return o.Payload +} + +func (o *V1CloudAccountsCustomListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1CustomAccounts) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_cloud_accounts_custom_update_parameters.go b/api/client/v1/v1_cloud_accounts_custom_update_parameters.go new file mode 100644 index 00000000..85f56d95 --- /dev/null +++ b/api/client/v1/v1_cloud_accounts_custom_update_parameters.go @@ -0,0 +1,178 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1CloudAccountsCustomUpdateParams creates a new V1CloudAccountsCustomUpdateParams object +// with the default values initialized. +func NewV1CloudAccountsCustomUpdateParams() *V1CloudAccountsCustomUpdateParams { + var () + return &V1CloudAccountsCustomUpdateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudAccountsCustomUpdateParamsWithTimeout creates a new V1CloudAccountsCustomUpdateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudAccountsCustomUpdateParamsWithTimeout(timeout time.Duration) *V1CloudAccountsCustomUpdateParams { + var () + return &V1CloudAccountsCustomUpdateParams{ + + timeout: timeout, + } +} + +// NewV1CloudAccountsCustomUpdateParamsWithContext creates a new V1CloudAccountsCustomUpdateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudAccountsCustomUpdateParamsWithContext(ctx context.Context) *V1CloudAccountsCustomUpdateParams { + var () + return &V1CloudAccountsCustomUpdateParams{ + + Context: ctx, + } +} + +// NewV1CloudAccountsCustomUpdateParamsWithHTTPClient creates a new V1CloudAccountsCustomUpdateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudAccountsCustomUpdateParamsWithHTTPClient(client *http.Client) *V1CloudAccountsCustomUpdateParams { + var () + return &V1CloudAccountsCustomUpdateParams{ + HTTPClient: client, + } +} + +/* +V1CloudAccountsCustomUpdateParams contains all the parameters to send to the API endpoint +for the v1 cloud accounts custom update operation typically these are written to a http.Request +*/ +type V1CloudAccountsCustomUpdateParams struct { + + /*Body*/ + Body *models.V1CustomAccountEntity + /*CloudType + Custom cloud type + + */ + CloudType string + /*UID + Custom cloud account uid + + */ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud accounts custom update params +func (o *V1CloudAccountsCustomUpdateParams) WithTimeout(timeout time.Duration) *V1CloudAccountsCustomUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud accounts custom update params +func (o *V1CloudAccountsCustomUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud accounts custom update params +func (o *V1CloudAccountsCustomUpdateParams) WithContext(ctx context.Context) *V1CloudAccountsCustomUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud accounts custom update params +func (o *V1CloudAccountsCustomUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud accounts custom update params +func (o *V1CloudAccountsCustomUpdateParams) WithHTTPClient(client *http.Client) *V1CloudAccountsCustomUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud accounts custom update params +func (o *V1CloudAccountsCustomUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 cloud accounts custom update params +func (o *V1CloudAccountsCustomUpdateParams) WithBody(body *models.V1CustomAccountEntity) *V1CloudAccountsCustomUpdateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 cloud accounts custom update params +func (o *V1CloudAccountsCustomUpdateParams) SetBody(body *models.V1CustomAccountEntity) { + o.Body = body +} + +// WithCloudType adds the cloudType to the v1 cloud accounts custom update params +func (o *V1CloudAccountsCustomUpdateParams) WithCloudType(cloudType string) *V1CloudAccountsCustomUpdateParams { + o.SetCloudType(cloudType) + return o +} + +// SetCloudType adds the cloudType to the v1 cloud accounts custom update params +func (o *V1CloudAccountsCustomUpdateParams) SetCloudType(cloudType string) { + o.CloudType = cloudType +} + +// WithUID adds the uid to the v1 cloud accounts custom update params +func (o *V1CloudAccountsCustomUpdateParams) WithUID(uid string) *V1CloudAccountsCustomUpdateParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 cloud accounts custom update params +func (o *V1CloudAccountsCustomUpdateParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudAccountsCustomUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param cloudType + if err := r.SetPathParam("cloudType", o.CloudType); err != nil { + return err + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_accounts_custom_update_responses.go b/api/client/v1/v1_cloud_accounts_custom_update_responses.go new file mode 100644 index 00000000..b61b1649 --- /dev/null +++ b/api/client/v1/v1_cloud_accounts_custom_update_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1CloudAccountsCustomUpdateReader is a Reader for the V1CloudAccountsCustomUpdate structure. +type V1CloudAccountsCustomUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudAccountsCustomUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1CloudAccountsCustomUpdateNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudAccountsCustomUpdateNoContent creates a V1CloudAccountsCustomUpdateNoContent with default headers values +func NewV1CloudAccountsCustomUpdateNoContent() *V1CloudAccountsCustomUpdateNoContent { + return &V1CloudAccountsCustomUpdateNoContent{} +} + +/* +V1CloudAccountsCustomUpdateNoContent handles this case with default header values. + +The resource was updated successfully +*/ +type V1CloudAccountsCustomUpdateNoContent struct { +} + +func (o *V1CloudAccountsCustomUpdateNoContent) Error() string { + return fmt.Sprintf("[PUT /v1/cloudaccounts/cloudTypes/{cloudType}/{uid}][%d] v1CloudAccountsCustomUpdateNoContent ", 204) +} + +func (o *V1CloudAccountsCustomUpdateNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_cloud_accounts_gcp_create_parameters.go b/api/client/v1/v1_cloud_accounts_gcp_create_parameters.go new file mode 100644 index 00000000..4c7c2c86 --- /dev/null +++ b/api/client/v1/v1_cloud_accounts_gcp_create_parameters.go @@ -0,0 +1,139 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1CloudAccountsGcpCreateParams creates a new V1CloudAccountsGcpCreateParams object +// with the default values initialized. +func NewV1CloudAccountsGcpCreateParams() *V1CloudAccountsGcpCreateParams { + var () + return &V1CloudAccountsGcpCreateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudAccountsGcpCreateParamsWithTimeout creates a new V1CloudAccountsGcpCreateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudAccountsGcpCreateParamsWithTimeout(timeout time.Duration) *V1CloudAccountsGcpCreateParams { + var () + return &V1CloudAccountsGcpCreateParams{ + + timeout: timeout, + } +} + +// NewV1CloudAccountsGcpCreateParamsWithContext creates a new V1CloudAccountsGcpCreateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudAccountsGcpCreateParamsWithContext(ctx context.Context) *V1CloudAccountsGcpCreateParams { + var () + return &V1CloudAccountsGcpCreateParams{ + + Context: ctx, + } +} + +// NewV1CloudAccountsGcpCreateParamsWithHTTPClient creates a new V1CloudAccountsGcpCreateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudAccountsGcpCreateParamsWithHTTPClient(client *http.Client) *V1CloudAccountsGcpCreateParams { + var () + return &V1CloudAccountsGcpCreateParams{ + HTTPClient: client, + } +} + +/* +V1CloudAccountsGcpCreateParams contains all the parameters to send to the API endpoint +for the v1 cloud accounts gcp create operation typically these are written to a http.Request +*/ +type V1CloudAccountsGcpCreateParams struct { + + /*Body + Request payload to validate GCP cloud account + + */ + Body *models.V1GcpAccountEntity + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud accounts gcp create params +func (o *V1CloudAccountsGcpCreateParams) WithTimeout(timeout time.Duration) *V1CloudAccountsGcpCreateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud accounts gcp create params +func (o *V1CloudAccountsGcpCreateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud accounts gcp create params +func (o *V1CloudAccountsGcpCreateParams) WithContext(ctx context.Context) *V1CloudAccountsGcpCreateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud accounts gcp create params +func (o *V1CloudAccountsGcpCreateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud accounts gcp create params +func (o *V1CloudAccountsGcpCreateParams) WithHTTPClient(client *http.Client) *V1CloudAccountsGcpCreateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud accounts gcp create params +func (o *V1CloudAccountsGcpCreateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 cloud accounts gcp create params +func (o *V1CloudAccountsGcpCreateParams) WithBody(body *models.V1GcpAccountEntity) *V1CloudAccountsGcpCreateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 cloud accounts gcp create params +func (o *V1CloudAccountsGcpCreateParams) SetBody(body *models.V1GcpAccountEntity) { + o.Body = body +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudAccountsGcpCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_accounts_gcp_create_responses.go b/api/client/v1/v1_cloud_accounts_gcp_create_responses.go new file mode 100644 index 00000000..358efa64 --- /dev/null +++ b/api/client/v1/v1_cloud_accounts_gcp_create_responses.go @@ -0,0 +1,77 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1CloudAccountsGcpCreateReader is a Reader for the V1CloudAccountsGcpCreate structure. +type V1CloudAccountsGcpCreateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudAccountsGcpCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 201: + result := NewV1CloudAccountsGcpCreateCreated() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudAccountsGcpCreateCreated creates a V1CloudAccountsGcpCreateCreated with default headers values +func NewV1CloudAccountsGcpCreateCreated() *V1CloudAccountsGcpCreateCreated { + return &V1CloudAccountsGcpCreateCreated{} +} + +/* +V1CloudAccountsGcpCreateCreated handles this case with default header values. + +Created successfully +*/ +type V1CloudAccountsGcpCreateCreated struct { + /*Audit uid for the request + */ + AuditUID string + + Payload *models.V1UID +} + +func (o *V1CloudAccountsGcpCreateCreated) Error() string { + return fmt.Sprintf("[POST /v1/cloudaccounts/gcp][%d] v1CloudAccountsGcpCreateCreated %+v", 201, o.Payload) +} + +func (o *V1CloudAccountsGcpCreateCreated) GetPayload() *models.V1UID { + return o.Payload +} + +func (o *V1CloudAccountsGcpCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header AuditUid + o.AuditUID = response.GetHeader("AuditUid") + + o.Payload = new(models.V1UID) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_cloud_accounts_gcp_delete_parameters.go b/api/client/v1/v1_cloud_accounts_gcp_delete_parameters.go new file mode 100644 index 00000000..795286d9 --- /dev/null +++ b/api/client/v1/v1_cloud_accounts_gcp_delete_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1CloudAccountsGcpDeleteParams creates a new V1CloudAccountsGcpDeleteParams object +// with the default values initialized. +func NewV1CloudAccountsGcpDeleteParams() *V1CloudAccountsGcpDeleteParams { + var () + return &V1CloudAccountsGcpDeleteParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudAccountsGcpDeleteParamsWithTimeout creates a new V1CloudAccountsGcpDeleteParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudAccountsGcpDeleteParamsWithTimeout(timeout time.Duration) *V1CloudAccountsGcpDeleteParams { + var () + return &V1CloudAccountsGcpDeleteParams{ + + timeout: timeout, + } +} + +// NewV1CloudAccountsGcpDeleteParamsWithContext creates a new V1CloudAccountsGcpDeleteParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudAccountsGcpDeleteParamsWithContext(ctx context.Context) *V1CloudAccountsGcpDeleteParams { + var () + return &V1CloudAccountsGcpDeleteParams{ + + Context: ctx, + } +} + +// NewV1CloudAccountsGcpDeleteParamsWithHTTPClient creates a new V1CloudAccountsGcpDeleteParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudAccountsGcpDeleteParamsWithHTTPClient(client *http.Client) *V1CloudAccountsGcpDeleteParams { + var () + return &V1CloudAccountsGcpDeleteParams{ + HTTPClient: client, + } +} + +/* +V1CloudAccountsGcpDeleteParams contains all the parameters to send to the API endpoint +for the v1 cloud accounts gcp delete operation typically these are written to a http.Request +*/ +type V1CloudAccountsGcpDeleteParams struct { + + /*UID + GCP cloud account uid + + */ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud accounts gcp delete params +func (o *V1CloudAccountsGcpDeleteParams) WithTimeout(timeout time.Duration) *V1CloudAccountsGcpDeleteParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud accounts gcp delete params +func (o *V1CloudAccountsGcpDeleteParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud accounts gcp delete params +func (o *V1CloudAccountsGcpDeleteParams) WithContext(ctx context.Context) *V1CloudAccountsGcpDeleteParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud accounts gcp delete params +func (o *V1CloudAccountsGcpDeleteParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud accounts gcp delete params +func (o *V1CloudAccountsGcpDeleteParams) WithHTTPClient(client *http.Client) *V1CloudAccountsGcpDeleteParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud accounts gcp delete params +func (o *V1CloudAccountsGcpDeleteParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithUID adds the uid to the v1 cloud accounts gcp delete params +func (o *V1CloudAccountsGcpDeleteParams) WithUID(uid string) *V1CloudAccountsGcpDeleteParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 cloud accounts gcp delete params +func (o *V1CloudAccountsGcpDeleteParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudAccountsGcpDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_accounts_gcp_delete_responses.go b/api/client/v1/v1_cloud_accounts_gcp_delete_responses.go new file mode 100644 index 00000000..ab6269b8 --- /dev/null +++ b/api/client/v1/v1_cloud_accounts_gcp_delete_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1CloudAccountsGcpDeleteReader is a Reader for the V1CloudAccountsGcpDelete structure. +type V1CloudAccountsGcpDeleteReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudAccountsGcpDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1CloudAccountsGcpDeleteNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudAccountsGcpDeleteNoContent creates a V1CloudAccountsGcpDeleteNoContent with default headers values +func NewV1CloudAccountsGcpDeleteNoContent() *V1CloudAccountsGcpDeleteNoContent { + return &V1CloudAccountsGcpDeleteNoContent{} +} + +/* +V1CloudAccountsGcpDeleteNoContent handles this case with default header values. + +The resource was deleted successfully +*/ +type V1CloudAccountsGcpDeleteNoContent struct { +} + +func (o *V1CloudAccountsGcpDeleteNoContent) Error() string { + return fmt.Sprintf("[DELETE /v1/cloudaccounts/gcp/{uid}][%d] v1CloudAccountsGcpDeleteNoContent ", 204) +} + +func (o *V1CloudAccountsGcpDeleteNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_cloud_accounts_gcp_get_parameters.go b/api/client/v1/v1_cloud_accounts_gcp_get_parameters.go new file mode 100644 index 00000000..345d3baf --- /dev/null +++ b/api/client/v1/v1_cloud_accounts_gcp_get_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1CloudAccountsGcpGetParams creates a new V1CloudAccountsGcpGetParams object +// with the default values initialized. +func NewV1CloudAccountsGcpGetParams() *V1CloudAccountsGcpGetParams { + var () + return &V1CloudAccountsGcpGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudAccountsGcpGetParamsWithTimeout creates a new V1CloudAccountsGcpGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudAccountsGcpGetParamsWithTimeout(timeout time.Duration) *V1CloudAccountsGcpGetParams { + var () + return &V1CloudAccountsGcpGetParams{ + + timeout: timeout, + } +} + +// NewV1CloudAccountsGcpGetParamsWithContext creates a new V1CloudAccountsGcpGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudAccountsGcpGetParamsWithContext(ctx context.Context) *V1CloudAccountsGcpGetParams { + var () + return &V1CloudAccountsGcpGetParams{ + + Context: ctx, + } +} + +// NewV1CloudAccountsGcpGetParamsWithHTTPClient creates a new V1CloudAccountsGcpGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudAccountsGcpGetParamsWithHTTPClient(client *http.Client) *V1CloudAccountsGcpGetParams { + var () + return &V1CloudAccountsGcpGetParams{ + HTTPClient: client, + } +} + +/* +V1CloudAccountsGcpGetParams contains all the parameters to send to the API endpoint +for the v1 cloud accounts gcp get operation typically these are written to a http.Request +*/ +type V1CloudAccountsGcpGetParams struct { + + /*UID + GCP cloud account uid + + */ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud accounts gcp get params +func (o *V1CloudAccountsGcpGetParams) WithTimeout(timeout time.Duration) *V1CloudAccountsGcpGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud accounts gcp get params +func (o *V1CloudAccountsGcpGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud accounts gcp get params +func (o *V1CloudAccountsGcpGetParams) WithContext(ctx context.Context) *V1CloudAccountsGcpGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud accounts gcp get params +func (o *V1CloudAccountsGcpGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud accounts gcp get params +func (o *V1CloudAccountsGcpGetParams) WithHTTPClient(client *http.Client) *V1CloudAccountsGcpGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud accounts gcp get params +func (o *V1CloudAccountsGcpGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithUID adds the uid to the v1 cloud accounts gcp get params +func (o *V1CloudAccountsGcpGetParams) WithUID(uid string) *V1CloudAccountsGcpGetParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 cloud accounts gcp get params +func (o *V1CloudAccountsGcpGetParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudAccountsGcpGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_accounts_gcp_get_responses.go b/api/client/v1/v1_cloud_accounts_gcp_get_responses.go new file mode 100644 index 00000000..11692c37 --- /dev/null +++ b/api/client/v1/v1_cloud_accounts_gcp_get_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1CloudAccountsGcpGetReader is a Reader for the V1CloudAccountsGcpGet structure. +type V1CloudAccountsGcpGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudAccountsGcpGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1CloudAccountsGcpGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudAccountsGcpGetOK creates a V1CloudAccountsGcpGetOK with default headers values +func NewV1CloudAccountsGcpGetOK() *V1CloudAccountsGcpGetOK { + return &V1CloudAccountsGcpGetOK{} +} + +/* +V1CloudAccountsGcpGetOK handles this case with default header values. + +OK +*/ +type V1CloudAccountsGcpGetOK struct { + Payload *models.V1GcpAccount +} + +func (o *V1CloudAccountsGcpGetOK) Error() string { + return fmt.Sprintf("[GET /v1/cloudaccounts/gcp/{uid}][%d] v1CloudAccountsGcpGetOK %+v", 200, o.Payload) +} + +func (o *V1CloudAccountsGcpGetOK) GetPayload() *models.V1GcpAccount { + return o.Payload +} + +func (o *V1CloudAccountsGcpGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1GcpAccount) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_cloud_accounts_gcp_list_parameters.go b/api/client/v1/v1_cloud_accounts_gcp_list_parameters.go new file mode 100644 index 00000000..5e6fe9b7 --- /dev/null +++ b/api/client/v1/v1_cloud_accounts_gcp_list_parameters.go @@ -0,0 +1,323 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// NewV1CloudAccountsGcpListParams creates a new V1CloudAccountsGcpListParams object +// with the default values initialized. +func NewV1CloudAccountsGcpListParams() *V1CloudAccountsGcpListParams { + var ( + limitDefault = int64(50) + ) + return &V1CloudAccountsGcpListParams{ + Limit: &limitDefault, + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudAccountsGcpListParamsWithTimeout creates a new V1CloudAccountsGcpListParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudAccountsGcpListParamsWithTimeout(timeout time.Duration) *V1CloudAccountsGcpListParams { + var ( + limitDefault = int64(50) + ) + return &V1CloudAccountsGcpListParams{ + Limit: &limitDefault, + + timeout: timeout, + } +} + +// NewV1CloudAccountsGcpListParamsWithContext creates a new V1CloudAccountsGcpListParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudAccountsGcpListParamsWithContext(ctx context.Context) *V1CloudAccountsGcpListParams { + var ( + limitDefault = int64(50) + ) + return &V1CloudAccountsGcpListParams{ + Limit: &limitDefault, + + Context: ctx, + } +} + +// NewV1CloudAccountsGcpListParamsWithHTTPClient creates a new V1CloudAccountsGcpListParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudAccountsGcpListParamsWithHTTPClient(client *http.Client) *V1CloudAccountsGcpListParams { + var ( + limitDefault = int64(50) + ) + return &V1CloudAccountsGcpListParams{ + Limit: &limitDefault, + HTTPClient: client, + } +} + +/* +V1CloudAccountsGcpListParams contains all the parameters to send to the API endpoint +for the v1 cloud accounts gcp list operation typically these are written to a http.Request +*/ +type V1CloudAccountsGcpListParams struct { + + /*Continue + continue token to paginate the subsequent data items + + */ + Continue *string + /*Fields + Set of fields to be presented in the response with values. The fields are comma separated. Eg: metadata.uid,metadata.name + + */ + Fields *string + /*Filters + Filters can be combined with AND, OR operators with field path name. Eg: metadata.name=TestServiceANDspec.cloudType=aws + + Server will be restricted to certain fields based on the indexed data for each resource. + + */ + Filters *string + /*Limit + limit is a maximum number of responses to return for a list call. Default and maximum value of the limit is 50. + If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. + + */ + Limit *int64 + /*Offset + offset is the next index number from which the response will start. The response offset value can be used along with continue token for the pagination. + + */ + Offset *int64 + /*OrderBy + Specify the fields with sort order. 1 indicates ascending and -1 for descending. Eg: orderBy=metadata.name=1,metadata.uid=-1 + + */ + OrderBy *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud accounts gcp list params +func (o *V1CloudAccountsGcpListParams) WithTimeout(timeout time.Duration) *V1CloudAccountsGcpListParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud accounts gcp list params +func (o *V1CloudAccountsGcpListParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud accounts gcp list params +func (o *V1CloudAccountsGcpListParams) WithContext(ctx context.Context) *V1CloudAccountsGcpListParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud accounts gcp list params +func (o *V1CloudAccountsGcpListParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud accounts gcp list params +func (o *V1CloudAccountsGcpListParams) WithHTTPClient(client *http.Client) *V1CloudAccountsGcpListParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud accounts gcp list params +func (o *V1CloudAccountsGcpListParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithContinue adds the continueVar to the v1 cloud accounts gcp list params +func (o *V1CloudAccountsGcpListParams) WithContinue(continueVar *string) *V1CloudAccountsGcpListParams { + o.SetContinue(continueVar) + return o +} + +// SetContinue adds the continue to the v1 cloud accounts gcp list params +func (o *V1CloudAccountsGcpListParams) SetContinue(continueVar *string) { + o.Continue = continueVar +} + +// WithFields adds the fields to the v1 cloud accounts gcp list params +func (o *V1CloudAccountsGcpListParams) WithFields(fields *string) *V1CloudAccountsGcpListParams { + o.SetFields(fields) + return o +} + +// SetFields adds the fields to the v1 cloud accounts gcp list params +func (o *V1CloudAccountsGcpListParams) SetFields(fields *string) { + o.Fields = fields +} + +// WithFilters adds the filters to the v1 cloud accounts gcp list params +func (o *V1CloudAccountsGcpListParams) WithFilters(filters *string) *V1CloudAccountsGcpListParams { + o.SetFilters(filters) + return o +} + +// SetFilters adds the filters to the v1 cloud accounts gcp list params +func (o *V1CloudAccountsGcpListParams) SetFilters(filters *string) { + o.Filters = filters +} + +// WithLimit adds the limit to the v1 cloud accounts gcp list params +func (o *V1CloudAccountsGcpListParams) WithLimit(limit *int64) *V1CloudAccountsGcpListParams { + o.SetLimit(limit) + return o +} + +// SetLimit adds the limit to the v1 cloud accounts gcp list params +func (o *V1CloudAccountsGcpListParams) SetLimit(limit *int64) { + o.Limit = limit +} + +// WithOffset adds the offset to the v1 cloud accounts gcp list params +func (o *V1CloudAccountsGcpListParams) WithOffset(offset *int64) *V1CloudAccountsGcpListParams { + o.SetOffset(offset) + return o +} + +// SetOffset adds the offset to the v1 cloud accounts gcp list params +func (o *V1CloudAccountsGcpListParams) SetOffset(offset *int64) { + o.Offset = offset +} + +// WithOrderBy adds the orderBy to the v1 cloud accounts gcp list params +func (o *V1CloudAccountsGcpListParams) WithOrderBy(orderBy *string) *V1CloudAccountsGcpListParams { + o.SetOrderBy(orderBy) + return o +} + +// SetOrderBy adds the orderBy to the v1 cloud accounts gcp list params +func (o *V1CloudAccountsGcpListParams) SetOrderBy(orderBy *string) { + o.OrderBy = orderBy +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudAccountsGcpListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Continue != nil { + + // query param continue + var qrContinue string + if o.Continue != nil { + qrContinue = *o.Continue + } + qContinue := qrContinue + if qContinue != "" { + if err := r.SetQueryParam("continue", qContinue); err != nil { + return err + } + } + + } + + if o.Fields != nil { + + // query param fields + var qrFields string + if o.Fields != nil { + qrFields = *o.Fields + } + qFields := qrFields + if qFields != "" { + if err := r.SetQueryParam("fields", qFields); err != nil { + return err + } + } + + } + + if o.Filters != nil { + + // query param filters + var qrFilters string + if o.Filters != nil { + qrFilters = *o.Filters + } + qFilters := qrFilters + if qFilters != "" { + if err := r.SetQueryParam("filters", qFilters); err != nil { + return err + } + } + + } + + if o.Limit != nil { + + // query param limit + var qrLimit int64 + if o.Limit != nil { + qrLimit = *o.Limit + } + qLimit := swag.FormatInt64(qrLimit) + if qLimit != "" { + if err := r.SetQueryParam("limit", qLimit); err != nil { + return err + } + } + + } + + if o.Offset != nil { + + // query param offset + var qrOffset int64 + if o.Offset != nil { + qrOffset = *o.Offset + } + qOffset := swag.FormatInt64(qrOffset) + if qOffset != "" { + if err := r.SetQueryParam("offset", qOffset); err != nil { + return err + } + } + + } + + if o.OrderBy != nil { + + // query param orderBy + var qrOrderBy string + if o.OrderBy != nil { + qrOrderBy = *o.OrderBy + } + qOrderBy := qrOrderBy + if qOrderBy != "" { + if err := r.SetQueryParam("orderBy", qOrderBy); err != nil { + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_accounts_gcp_list_responses.go b/api/client/v1/v1_cloud_accounts_gcp_list_responses.go new file mode 100644 index 00000000..da4b6b37 --- /dev/null +++ b/api/client/v1/v1_cloud_accounts_gcp_list_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1CloudAccountsGcpListReader is a Reader for the V1CloudAccountsGcpList structure. +type V1CloudAccountsGcpListReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudAccountsGcpListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1CloudAccountsGcpListOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudAccountsGcpListOK creates a V1CloudAccountsGcpListOK with default headers values +func NewV1CloudAccountsGcpListOK() *V1CloudAccountsGcpListOK { + return &V1CloudAccountsGcpListOK{} +} + +/* +V1CloudAccountsGcpListOK handles this case with default header values. + +An array of gcp cloud account items +*/ +type V1CloudAccountsGcpListOK struct { + Payload *models.V1GcpAccounts +} + +func (o *V1CloudAccountsGcpListOK) Error() string { + return fmt.Sprintf("[GET /v1/cloudaccounts/gcp][%d] v1CloudAccountsGcpListOK %+v", 200, o.Payload) +} + +func (o *V1CloudAccountsGcpListOK) GetPayload() *models.V1GcpAccounts { + return o.Payload +} + +func (o *V1CloudAccountsGcpListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1GcpAccounts) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_cloud_accounts_gcp_update_parameters.go b/api/client/v1/v1_cloud_accounts_gcp_update_parameters.go new file mode 100644 index 00000000..a518ce59 --- /dev/null +++ b/api/client/v1/v1_cloud_accounts_gcp_update_parameters.go @@ -0,0 +1,160 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1CloudAccountsGcpUpdateParams creates a new V1CloudAccountsGcpUpdateParams object +// with the default values initialized. +func NewV1CloudAccountsGcpUpdateParams() *V1CloudAccountsGcpUpdateParams { + var () + return &V1CloudAccountsGcpUpdateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudAccountsGcpUpdateParamsWithTimeout creates a new V1CloudAccountsGcpUpdateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudAccountsGcpUpdateParamsWithTimeout(timeout time.Duration) *V1CloudAccountsGcpUpdateParams { + var () + return &V1CloudAccountsGcpUpdateParams{ + + timeout: timeout, + } +} + +// NewV1CloudAccountsGcpUpdateParamsWithContext creates a new V1CloudAccountsGcpUpdateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudAccountsGcpUpdateParamsWithContext(ctx context.Context) *V1CloudAccountsGcpUpdateParams { + var () + return &V1CloudAccountsGcpUpdateParams{ + + Context: ctx, + } +} + +// NewV1CloudAccountsGcpUpdateParamsWithHTTPClient creates a new V1CloudAccountsGcpUpdateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudAccountsGcpUpdateParamsWithHTTPClient(client *http.Client) *V1CloudAccountsGcpUpdateParams { + var () + return &V1CloudAccountsGcpUpdateParams{ + HTTPClient: client, + } +} + +/* +V1CloudAccountsGcpUpdateParams contains all the parameters to send to the API endpoint +for the v1 cloud accounts gcp update operation typically these are written to a http.Request +*/ +type V1CloudAccountsGcpUpdateParams struct { + + /*Body + Request payload to validate GCP cloud account + + */ + Body *models.V1GcpAccountEntity + /*UID + GCP cloud account uid + + */ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud accounts gcp update params +func (o *V1CloudAccountsGcpUpdateParams) WithTimeout(timeout time.Duration) *V1CloudAccountsGcpUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud accounts gcp update params +func (o *V1CloudAccountsGcpUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud accounts gcp update params +func (o *V1CloudAccountsGcpUpdateParams) WithContext(ctx context.Context) *V1CloudAccountsGcpUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud accounts gcp update params +func (o *V1CloudAccountsGcpUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud accounts gcp update params +func (o *V1CloudAccountsGcpUpdateParams) WithHTTPClient(client *http.Client) *V1CloudAccountsGcpUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud accounts gcp update params +func (o *V1CloudAccountsGcpUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 cloud accounts gcp update params +func (o *V1CloudAccountsGcpUpdateParams) WithBody(body *models.V1GcpAccountEntity) *V1CloudAccountsGcpUpdateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 cloud accounts gcp update params +func (o *V1CloudAccountsGcpUpdateParams) SetBody(body *models.V1GcpAccountEntity) { + o.Body = body +} + +// WithUID adds the uid to the v1 cloud accounts gcp update params +func (o *V1CloudAccountsGcpUpdateParams) WithUID(uid string) *V1CloudAccountsGcpUpdateParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 cloud accounts gcp update params +func (o *V1CloudAccountsGcpUpdateParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudAccountsGcpUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_accounts_gcp_update_responses.go b/api/client/v1/v1_cloud_accounts_gcp_update_responses.go new file mode 100644 index 00000000..27ff99bd --- /dev/null +++ b/api/client/v1/v1_cloud_accounts_gcp_update_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1CloudAccountsGcpUpdateReader is a Reader for the V1CloudAccountsGcpUpdate structure. +type V1CloudAccountsGcpUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudAccountsGcpUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1CloudAccountsGcpUpdateNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudAccountsGcpUpdateNoContent creates a V1CloudAccountsGcpUpdateNoContent with default headers values +func NewV1CloudAccountsGcpUpdateNoContent() *V1CloudAccountsGcpUpdateNoContent { + return &V1CloudAccountsGcpUpdateNoContent{} +} + +/* +V1CloudAccountsGcpUpdateNoContent handles this case with default header values. + +The resource was updated successfully +*/ +type V1CloudAccountsGcpUpdateNoContent struct { +} + +func (o *V1CloudAccountsGcpUpdateNoContent) Error() string { + return fmt.Sprintf("[PUT /v1/cloudaccounts/gcp/{uid}][%d] v1CloudAccountsGcpUpdateNoContent ", 204) +} + +func (o *V1CloudAccountsGcpUpdateNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_cloud_accounts_list_summary_parameters.go b/api/client/v1/v1_cloud_accounts_list_summary_parameters.go new file mode 100644 index 00000000..a89ea5c0 --- /dev/null +++ b/api/client/v1/v1_cloud_accounts_list_summary_parameters.go @@ -0,0 +1,291 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// NewV1CloudAccountsListSummaryParams creates a new V1CloudAccountsListSummaryParams object +// with the default values initialized. +func NewV1CloudAccountsListSummaryParams() *V1CloudAccountsListSummaryParams { + var ( + limitDefault = int64(50) + ) + return &V1CloudAccountsListSummaryParams{ + Limit: &limitDefault, + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudAccountsListSummaryParamsWithTimeout creates a new V1CloudAccountsListSummaryParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudAccountsListSummaryParamsWithTimeout(timeout time.Duration) *V1CloudAccountsListSummaryParams { + var ( + limitDefault = int64(50) + ) + return &V1CloudAccountsListSummaryParams{ + Limit: &limitDefault, + + timeout: timeout, + } +} + +// NewV1CloudAccountsListSummaryParamsWithContext creates a new V1CloudAccountsListSummaryParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudAccountsListSummaryParamsWithContext(ctx context.Context) *V1CloudAccountsListSummaryParams { + var ( + limitDefault = int64(50) + ) + return &V1CloudAccountsListSummaryParams{ + Limit: &limitDefault, + + Context: ctx, + } +} + +// NewV1CloudAccountsListSummaryParamsWithHTTPClient creates a new V1CloudAccountsListSummaryParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudAccountsListSummaryParamsWithHTTPClient(client *http.Client) *V1CloudAccountsListSummaryParams { + var ( + limitDefault = int64(50) + ) + return &V1CloudAccountsListSummaryParams{ + Limit: &limitDefault, + HTTPClient: client, + } +} + +/* +V1CloudAccountsListSummaryParams contains all the parameters to send to the API endpoint +for the v1 cloud accounts list summary operation typically these are written to a http.Request +*/ +type V1CloudAccountsListSummaryParams struct { + + /*Continue + continue token to paginate the subsequent data items + + */ + Continue *string + /*Filters + Filters can be combined with AND, OR operators with field path name. Eg: metadata.name=TestServiceANDspec.cloudType=aws + + Server will be restricted to certain fields based on the indexed data for each resource. + + */ + Filters *string + /*Limit + limit is a maximum number of responses to return for a list call. Default and maximum value of the limit is 50. + If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. + + */ + Limit *int64 + /*Offset + offset is the next index number from which the response will start. The response offset value can be used along with continue token for the pagination. + + */ + Offset *int64 + /*OrderBy + Specify the fields with sort order. 1 indicates ascending and -1 for descending. Eg: orderBy=metadata.name=1,metadata.uid=-1 + + */ + OrderBy *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud accounts list summary params +func (o *V1CloudAccountsListSummaryParams) WithTimeout(timeout time.Duration) *V1CloudAccountsListSummaryParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud accounts list summary params +func (o *V1CloudAccountsListSummaryParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud accounts list summary params +func (o *V1CloudAccountsListSummaryParams) WithContext(ctx context.Context) *V1CloudAccountsListSummaryParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud accounts list summary params +func (o *V1CloudAccountsListSummaryParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud accounts list summary params +func (o *V1CloudAccountsListSummaryParams) WithHTTPClient(client *http.Client) *V1CloudAccountsListSummaryParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud accounts list summary params +func (o *V1CloudAccountsListSummaryParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithContinue adds the continueVar to the v1 cloud accounts list summary params +func (o *V1CloudAccountsListSummaryParams) WithContinue(continueVar *string) *V1CloudAccountsListSummaryParams { + o.SetContinue(continueVar) + return o +} + +// SetContinue adds the continue to the v1 cloud accounts list summary params +func (o *V1CloudAccountsListSummaryParams) SetContinue(continueVar *string) { + o.Continue = continueVar +} + +// WithFilters adds the filters to the v1 cloud accounts list summary params +func (o *V1CloudAccountsListSummaryParams) WithFilters(filters *string) *V1CloudAccountsListSummaryParams { + o.SetFilters(filters) + return o +} + +// SetFilters adds the filters to the v1 cloud accounts list summary params +func (o *V1CloudAccountsListSummaryParams) SetFilters(filters *string) { + o.Filters = filters +} + +// WithLimit adds the limit to the v1 cloud accounts list summary params +func (o *V1CloudAccountsListSummaryParams) WithLimit(limit *int64) *V1CloudAccountsListSummaryParams { + o.SetLimit(limit) + return o +} + +// SetLimit adds the limit to the v1 cloud accounts list summary params +func (o *V1CloudAccountsListSummaryParams) SetLimit(limit *int64) { + o.Limit = limit +} + +// WithOffset adds the offset to the v1 cloud accounts list summary params +func (o *V1CloudAccountsListSummaryParams) WithOffset(offset *int64) *V1CloudAccountsListSummaryParams { + o.SetOffset(offset) + return o +} + +// SetOffset adds the offset to the v1 cloud accounts list summary params +func (o *V1CloudAccountsListSummaryParams) SetOffset(offset *int64) { + o.Offset = offset +} + +// WithOrderBy adds the orderBy to the v1 cloud accounts list summary params +func (o *V1CloudAccountsListSummaryParams) WithOrderBy(orderBy *string) *V1CloudAccountsListSummaryParams { + o.SetOrderBy(orderBy) + return o +} + +// SetOrderBy adds the orderBy to the v1 cloud accounts list summary params +func (o *V1CloudAccountsListSummaryParams) SetOrderBy(orderBy *string) { + o.OrderBy = orderBy +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudAccountsListSummaryParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Continue != nil { + + // query param continue + var qrContinue string + if o.Continue != nil { + qrContinue = *o.Continue + } + qContinue := qrContinue + if qContinue != "" { + if err := r.SetQueryParam("continue", qContinue); err != nil { + return err + } + } + + } + + if o.Filters != nil { + + // query param filters + var qrFilters string + if o.Filters != nil { + qrFilters = *o.Filters + } + qFilters := qrFilters + if qFilters != "" { + if err := r.SetQueryParam("filters", qFilters); err != nil { + return err + } + } + + } + + if o.Limit != nil { + + // query param limit + var qrLimit int64 + if o.Limit != nil { + qrLimit = *o.Limit + } + qLimit := swag.FormatInt64(qrLimit) + if qLimit != "" { + if err := r.SetQueryParam("limit", qLimit); err != nil { + return err + } + } + + } + + if o.Offset != nil { + + // query param offset + var qrOffset int64 + if o.Offset != nil { + qrOffset = *o.Offset + } + qOffset := swag.FormatInt64(qrOffset) + if qOffset != "" { + if err := r.SetQueryParam("offset", qOffset); err != nil { + return err + } + } + + } + + if o.OrderBy != nil { + + // query param orderBy + var qrOrderBy string + if o.OrderBy != nil { + qrOrderBy = *o.OrderBy + } + qOrderBy := qrOrderBy + if qOrderBy != "" { + if err := r.SetQueryParam("orderBy", qOrderBy); err != nil { + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_accounts_list_summary_responses.go b/api/client/v1/v1_cloud_accounts_list_summary_responses.go new file mode 100644 index 00000000..5c5887e4 --- /dev/null +++ b/api/client/v1/v1_cloud_accounts_list_summary_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1CloudAccountsListSummaryReader is a Reader for the V1CloudAccountsListSummary structure. +type V1CloudAccountsListSummaryReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudAccountsListSummaryReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1CloudAccountsListSummaryOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudAccountsListSummaryOK creates a V1CloudAccountsListSummaryOK with default headers values +func NewV1CloudAccountsListSummaryOK() *V1CloudAccountsListSummaryOK { + return &V1CloudAccountsListSummaryOK{} +} + +/* +V1CloudAccountsListSummaryOK handles this case with default header values. + +An array of cloud account summary items +*/ +type V1CloudAccountsListSummaryOK struct { + Payload *models.V1CloudAccountsSummary +} + +func (o *V1CloudAccountsListSummaryOK) Error() string { + return fmt.Sprintf("[GET /v1/cloudaccounts/summary][%d] v1CloudAccountsListSummaryOK %+v", 200, o.Payload) +} + +func (o *V1CloudAccountsListSummaryOK) GetPayload() *models.V1CloudAccountsSummary { + return o.Payload +} + +func (o *V1CloudAccountsListSummaryOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1CloudAccountsSummary) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_cloud_accounts_maas_create_parameters.go b/api/client/v1/v1_cloud_accounts_maas_create_parameters.go new file mode 100644 index 00000000..119150f3 --- /dev/null +++ b/api/client/v1/v1_cloud_accounts_maas_create_parameters.go @@ -0,0 +1,139 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1CloudAccountsMaasCreateParams creates a new V1CloudAccountsMaasCreateParams object +// with the default values initialized. +func NewV1CloudAccountsMaasCreateParams() *V1CloudAccountsMaasCreateParams { + var () + return &V1CloudAccountsMaasCreateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudAccountsMaasCreateParamsWithTimeout creates a new V1CloudAccountsMaasCreateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudAccountsMaasCreateParamsWithTimeout(timeout time.Duration) *V1CloudAccountsMaasCreateParams { + var () + return &V1CloudAccountsMaasCreateParams{ + + timeout: timeout, + } +} + +// NewV1CloudAccountsMaasCreateParamsWithContext creates a new V1CloudAccountsMaasCreateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudAccountsMaasCreateParamsWithContext(ctx context.Context) *V1CloudAccountsMaasCreateParams { + var () + return &V1CloudAccountsMaasCreateParams{ + + Context: ctx, + } +} + +// NewV1CloudAccountsMaasCreateParamsWithHTTPClient creates a new V1CloudAccountsMaasCreateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudAccountsMaasCreateParamsWithHTTPClient(client *http.Client) *V1CloudAccountsMaasCreateParams { + var () + return &V1CloudAccountsMaasCreateParams{ + HTTPClient: client, + } +} + +/* +V1CloudAccountsMaasCreateParams contains all the parameters to send to the API endpoint +for the v1 cloud accounts maas create operation typically these are written to a http.Request +*/ +type V1CloudAccountsMaasCreateParams struct { + + /*Body + Request payload to validate Maas cloud account + + */ + Body *models.V1MaasAccount + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud accounts maas create params +func (o *V1CloudAccountsMaasCreateParams) WithTimeout(timeout time.Duration) *V1CloudAccountsMaasCreateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud accounts maas create params +func (o *V1CloudAccountsMaasCreateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud accounts maas create params +func (o *V1CloudAccountsMaasCreateParams) WithContext(ctx context.Context) *V1CloudAccountsMaasCreateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud accounts maas create params +func (o *V1CloudAccountsMaasCreateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud accounts maas create params +func (o *V1CloudAccountsMaasCreateParams) WithHTTPClient(client *http.Client) *V1CloudAccountsMaasCreateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud accounts maas create params +func (o *V1CloudAccountsMaasCreateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 cloud accounts maas create params +func (o *V1CloudAccountsMaasCreateParams) WithBody(body *models.V1MaasAccount) *V1CloudAccountsMaasCreateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 cloud accounts maas create params +func (o *V1CloudAccountsMaasCreateParams) SetBody(body *models.V1MaasAccount) { + o.Body = body +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudAccountsMaasCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_accounts_maas_create_responses.go b/api/client/v1/v1_cloud_accounts_maas_create_responses.go new file mode 100644 index 00000000..acb7cb5d --- /dev/null +++ b/api/client/v1/v1_cloud_accounts_maas_create_responses.go @@ -0,0 +1,77 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1CloudAccountsMaasCreateReader is a Reader for the V1CloudAccountsMaasCreate structure. +type V1CloudAccountsMaasCreateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudAccountsMaasCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 201: + result := NewV1CloudAccountsMaasCreateCreated() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudAccountsMaasCreateCreated creates a V1CloudAccountsMaasCreateCreated with default headers values +func NewV1CloudAccountsMaasCreateCreated() *V1CloudAccountsMaasCreateCreated { + return &V1CloudAccountsMaasCreateCreated{} +} + +/* +V1CloudAccountsMaasCreateCreated handles this case with default header values. + +Created successfully +*/ +type V1CloudAccountsMaasCreateCreated struct { + /*Audit uid for the request + */ + AuditUID string + + Payload *models.V1UID +} + +func (o *V1CloudAccountsMaasCreateCreated) Error() string { + return fmt.Sprintf("[POST /v1/cloudaccounts/maas][%d] v1CloudAccountsMaasCreateCreated %+v", 201, o.Payload) +} + +func (o *V1CloudAccountsMaasCreateCreated) GetPayload() *models.V1UID { + return o.Payload +} + +func (o *V1CloudAccountsMaasCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header AuditUid + o.AuditUID = response.GetHeader("AuditUid") + + o.Payload = new(models.V1UID) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_cloud_accounts_maas_delete_parameters.go b/api/client/v1/v1_cloud_accounts_maas_delete_parameters.go new file mode 100644 index 00000000..58945852 --- /dev/null +++ b/api/client/v1/v1_cloud_accounts_maas_delete_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1CloudAccountsMaasDeleteParams creates a new V1CloudAccountsMaasDeleteParams object +// with the default values initialized. +func NewV1CloudAccountsMaasDeleteParams() *V1CloudAccountsMaasDeleteParams { + var () + return &V1CloudAccountsMaasDeleteParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudAccountsMaasDeleteParamsWithTimeout creates a new V1CloudAccountsMaasDeleteParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudAccountsMaasDeleteParamsWithTimeout(timeout time.Duration) *V1CloudAccountsMaasDeleteParams { + var () + return &V1CloudAccountsMaasDeleteParams{ + + timeout: timeout, + } +} + +// NewV1CloudAccountsMaasDeleteParamsWithContext creates a new V1CloudAccountsMaasDeleteParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudAccountsMaasDeleteParamsWithContext(ctx context.Context) *V1CloudAccountsMaasDeleteParams { + var () + return &V1CloudAccountsMaasDeleteParams{ + + Context: ctx, + } +} + +// NewV1CloudAccountsMaasDeleteParamsWithHTTPClient creates a new V1CloudAccountsMaasDeleteParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudAccountsMaasDeleteParamsWithHTTPClient(client *http.Client) *V1CloudAccountsMaasDeleteParams { + var () + return &V1CloudAccountsMaasDeleteParams{ + HTTPClient: client, + } +} + +/* +V1CloudAccountsMaasDeleteParams contains all the parameters to send to the API endpoint +for the v1 cloud accounts maas delete operation typically these are written to a http.Request +*/ +type V1CloudAccountsMaasDeleteParams struct { + + /*UID + Maas cloud account uid + + */ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud accounts maas delete params +func (o *V1CloudAccountsMaasDeleteParams) WithTimeout(timeout time.Duration) *V1CloudAccountsMaasDeleteParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud accounts maas delete params +func (o *V1CloudAccountsMaasDeleteParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud accounts maas delete params +func (o *V1CloudAccountsMaasDeleteParams) WithContext(ctx context.Context) *V1CloudAccountsMaasDeleteParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud accounts maas delete params +func (o *V1CloudAccountsMaasDeleteParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud accounts maas delete params +func (o *V1CloudAccountsMaasDeleteParams) WithHTTPClient(client *http.Client) *V1CloudAccountsMaasDeleteParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud accounts maas delete params +func (o *V1CloudAccountsMaasDeleteParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithUID adds the uid to the v1 cloud accounts maas delete params +func (o *V1CloudAccountsMaasDeleteParams) WithUID(uid string) *V1CloudAccountsMaasDeleteParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 cloud accounts maas delete params +func (o *V1CloudAccountsMaasDeleteParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudAccountsMaasDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_accounts_maas_delete_responses.go b/api/client/v1/v1_cloud_accounts_maas_delete_responses.go new file mode 100644 index 00000000..a3152b12 --- /dev/null +++ b/api/client/v1/v1_cloud_accounts_maas_delete_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1CloudAccountsMaasDeleteReader is a Reader for the V1CloudAccountsMaasDelete structure. +type V1CloudAccountsMaasDeleteReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudAccountsMaasDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1CloudAccountsMaasDeleteNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudAccountsMaasDeleteNoContent creates a V1CloudAccountsMaasDeleteNoContent with default headers values +func NewV1CloudAccountsMaasDeleteNoContent() *V1CloudAccountsMaasDeleteNoContent { + return &V1CloudAccountsMaasDeleteNoContent{} +} + +/* +V1CloudAccountsMaasDeleteNoContent handles this case with default header values. + +The resource was deleted successfully +*/ +type V1CloudAccountsMaasDeleteNoContent struct { +} + +func (o *V1CloudAccountsMaasDeleteNoContent) Error() string { + return fmt.Sprintf("[DELETE /v1/cloudaccounts/maas/{uid}][%d] v1CloudAccountsMaasDeleteNoContent ", 204) +} + +func (o *V1CloudAccountsMaasDeleteNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_cloud_accounts_maas_get_parameters.go b/api/client/v1/v1_cloud_accounts_maas_get_parameters.go new file mode 100644 index 00000000..56c2b1eb --- /dev/null +++ b/api/client/v1/v1_cloud_accounts_maas_get_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1CloudAccountsMaasGetParams creates a new V1CloudAccountsMaasGetParams object +// with the default values initialized. +func NewV1CloudAccountsMaasGetParams() *V1CloudAccountsMaasGetParams { + var () + return &V1CloudAccountsMaasGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudAccountsMaasGetParamsWithTimeout creates a new V1CloudAccountsMaasGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudAccountsMaasGetParamsWithTimeout(timeout time.Duration) *V1CloudAccountsMaasGetParams { + var () + return &V1CloudAccountsMaasGetParams{ + + timeout: timeout, + } +} + +// NewV1CloudAccountsMaasGetParamsWithContext creates a new V1CloudAccountsMaasGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudAccountsMaasGetParamsWithContext(ctx context.Context) *V1CloudAccountsMaasGetParams { + var () + return &V1CloudAccountsMaasGetParams{ + + Context: ctx, + } +} + +// NewV1CloudAccountsMaasGetParamsWithHTTPClient creates a new V1CloudAccountsMaasGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudAccountsMaasGetParamsWithHTTPClient(client *http.Client) *V1CloudAccountsMaasGetParams { + var () + return &V1CloudAccountsMaasGetParams{ + HTTPClient: client, + } +} + +/* +V1CloudAccountsMaasGetParams contains all the parameters to send to the API endpoint +for the v1 cloud accounts maas get operation typically these are written to a http.Request +*/ +type V1CloudAccountsMaasGetParams struct { + + /*UID + Maas cloud account uid + + */ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud accounts maas get params +func (o *V1CloudAccountsMaasGetParams) WithTimeout(timeout time.Duration) *V1CloudAccountsMaasGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud accounts maas get params +func (o *V1CloudAccountsMaasGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud accounts maas get params +func (o *V1CloudAccountsMaasGetParams) WithContext(ctx context.Context) *V1CloudAccountsMaasGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud accounts maas get params +func (o *V1CloudAccountsMaasGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud accounts maas get params +func (o *V1CloudAccountsMaasGetParams) WithHTTPClient(client *http.Client) *V1CloudAccountsMaasGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud accounts maas get params +func (o *V1CloudAccountsMaasGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithUID adds the uid to the v1 cloud accounts maas get params +func (o *V1CloudAccountsMaasGetParams) WithUID(uid string) *V1CloudAccountsMaasGetParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 cloud accounts maas get params +func (o *V1CloudAccountsMaasGetParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudAccountsMaasGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_accounts_maas_get_responses.go b/api/client/v1/v1_cloud_accounts_maas_get_responses.go new file mode 100644 index 00000000..1a1fb51c --- /dev/null +++ b/api/client/v1/v1_cloud_accounts_maas_get_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1CloudAccountsMaasGetReader is a Reader for the V1CloudAccountsMaasGet structure. +type V1CloudAccountsMaasGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudAccountsMaasGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1CloudAccountsMaasGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudAccountsMaasGetOK creates a V1CloudAccountsMaasGetOK with default headers values +func NewV1CloudAccountsMaasGetOK() *V1CloudAccountsMaasGetOK { + return &V1CloudAccountsMaasGetOK{} +} + +/* +V1CloudAccountsMaasGetOK handles this case with default header values. + +OK +*/ +type V1CloudAccountsMaasGetOK struct { + Payload *models.V1MaasAccount +} + +func (o *V1CloudAccountsMaasGetOK) Error() string { + return fmt.Sprintf("[GET /v1/cloudaccounts/maas/{uid}][%d] v1CloudAccountsMaasGetOK %+v", 200, o.Payload) +} + +func (o *V1CloudAccountsMaasGetOK) GetPayload() *models.V1MaasAccount { + return o.Payload +} + +func (o *V1CloudAccountsMaasGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1MaasAccount) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_cloud_accounts_maas_list_parameters.go b/api/client/v1/v1_cloud_accounts_maas_list_parameters.go new file mode 100644 index 00000000..5d2aff0d --- /dev/null +++ b/api/client/v1/v1_cloud_accounts_maas_list_parameters.go @@ -0,0 +1,323 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// NewV1CloudAccountsMaasListParams creates a new V1CloudAccountsMaasListParams object +// with the default values initialized. +func NewV1CloudAccountsMaasListParams() *V1CloudAccountsMaasListParams { + var ( + limitDefault = int64(50) + ) + return &V1CloudAccountsMaasListParams{ + Limit: &limitDefault, + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudAccountsMaasListParamsWithTimeout creates a new V1CloudAccountsMaasListParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudAccountsMaasListParamsWithTimeout(timeout time.Duration) *V1CloudAccountsMaasListParams { + var ( + limitDefault = int64(50) + ) + return &V1CloudAccountsMaasListParams{ + Limit: &limitDefault, + + timeout: timeout, + } +} + +// NewV1CloudAccountsMaasListParamsWithContext creates a new V1CloudAccountsMaasListParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudAccountsMaasListParamsWithContext(ctx context.Context) *V1CloudAccountsMaasListParams { + var ( + limitDefault = int64(50) + ) + return &V1CloudAccountsMaasListParams{ + Limit: &limitDefault, + + Context: ctx, + } +} + +// NewV1CloudAccountsMaasListParamsWithHTTPClient creates a new V1CloudAccountsMaasListParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudAccountsMaasListParamsWithHTTPClient(client *http.Client) *V1CloudAccountsMaasListParams { + var ( + limitDefault = int64(50) + ) + return &V1CloudAccountsMaasListParams{ + Limit: &limitDefault, + HTTPClient: client, + } +} + +/* +V1CloudAccountsMaasListParams contains all the parameters to send to the API endpoint +for the v1 cloud accounts maas list operation typically these are written to a http.Request +*/ +type V1CloudAccountsMaasListParams struct { + + /*Continue + continue token to paginate the subsequent data items + + */ + Continue *string + /*Fields + Set of fields to be presented in the response with values. The fields are comma separated. Eg: metadata.uid,metadata.name + + */ + Fields *string + /*Filters + Filters can be combined with AND, OR operators with field path name. Eg: metadata.name=TestServiceANDspec.cloudType=aws + + Server will be restricted to certain fields based on the indexed data for each resource. + + */ + Filters *string + /*Limit + limit is a maximum number of responses to return for a list call. Default and maximum value of the limit is 50. + If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. + + */ + Limit *int64 + /*Offset + offset is the next index number from which the response will start. The response offset value can be used along with continue token for the pagination. + + */ + Offset *int64 + /*OrderBy + Specify the fields with sort order. 1 indicates ascending and -1 for descending. Eg: orderBy=metadata.name=1,metadata.uid=-1 + + */ + OrderBy *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud accounts maas list params +func (o *V1CloudAccountsMaasListParams) WithTimeout(timeout time.Duration) *V1CloudAccountsMaasListParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud accounts maas list params +func (o *V1CloudAccountsMaasListParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud accounts maas list params +func (o *V1CloudAccountsMaasListParams) WithContext(ctx context.Context) *V1CloudAccountsMaasListParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud accounts maas list params +func (o *V1CloudAccountsMaasListParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud accounts maas list params +func (o *V1CloudAccountsMaasListParams) WithHTTPClient(client *http.Client) *V1CloudAccountsMaasListParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud accounts maas list params +func (o *V1CloudAccountsMaasListParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithContinue adds the continueVar to the v1 cloud accounts maas list params +func (o *V1CloudAccountsMaasListParams) WithContinue(continueVar *string) *V1CloudAccountsMaasListParams { + o.SetContinue(continueVar) + return o +} + +// SetContinue adds the continue to the v1 cloud accounts maas list params +func (o *V1CloudAccountsMaasListParams) SetContinue(continueVar *string) { + o.Continue = continueVar +} + +// WithFields adds the fields to the v1 cloud accounts maas list params +func (o *V1CloudAccountsMaasListParams) WithFields(fields *string) *V1CloudAccountsMaasListParams { + o.SetFields(fields) + return o +} + +// SetFields adds the fields to the v1 cloud accounts maas list params +func (o *V1CloudAccountsMaasListParams) SetFields(fields *string) { + o.Fields = fields +} + +// WithFilters adds the filters to the v1 cloud accounts maas list params +func (o *V1CloudAccountsMaasListParams) WithFilters(filters *string) *V1CloudAccountsMaasListParams { + o.SetFilters(filters) + return o +} + +// SetFilters adds the filters to the v1 cloud accounts maas list params +func (o *V1CloudAccountsMaasListParams) SetFilters(filters *string) { + o.Filters = filters +} + +// WithLimit adds the limit to the v1 cloud accounts maas list params +func (o *V1CloudAccountsMaasListParams) WithLimit(limit *int64) *V1CloudAccountsMaasListParams { + o.SetLimit(limit) + return o +} + +// SetLimit adds the limit to the v1 cloud accounts maas list params +func (o *V1CloudAccountsMaasListParams) SetLimit(limit *int64) { + o.Limit = limit +} + +// WithOffset adds the offset to the v1 cloud accounts maas list params +func (o *V1CloudAccountsMaasListParams) WithOffset(offset *int64) *V1CloudAccountsMaasListParams { + o.SetOffset(offset) + return o +} + +// SetOffset adds the offset to the v1 cloud accounts maas list params +func (o *V1CloudAccountsMaasListParams) SetOffset(offset *int64) { + o.Offset = offset +} + +// WithOrderBy adds the orderBy to the v1 cloud accounts maas list params +func (o *V1CloudAccountsMaasListParams) WithOrderBy(orderBy *string) *V1CloudAccountsMaasListParams { + o.SetOrderBy(orderBy) + return o +} + +// SetOrderBy adds the orderBy to the v1 cloud accounts maas list params +func (o *V1CloudAccountsMaasListParams) SetOrderBy(orderBy *string) { + o.OrderBy = orderBy +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudAccountsMaasListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Continue != nil { + + // query param continue + var qrContinue string + if o.Continue != nil { + qrContinue = *o.Continue + } + qContinue := qrContinue + if qContinue != "" { + if err := r.SetQueryParam("continue", qContinue); err != nil { + return err + } + } + + } + + if o.Fields != nil { + + // query param fields + var qrFields string + if o.Fields != nil { + qrFields = *o.Fields + } + qFields := qrFields + if qFields != "" { + if err := r.SetQueryParam("fields", qFields); err != nil { + return err + } + } + + } + + if o.Filters != nil { + + // query param filters + var qrFilters string + if o.Filters != nil { + qrFilters = *o.Filters + } + qFilters := qrFilters + if qFilters != "" { + if err := r.SetQueryParam("filters", qFilters); err != nil { + return err + } + } + + } + + if o.Limit != nil { + + // query param limit + var qrLimit int64 + if o.Limit != nil { + qrLimit = *o.Limit + } + qLimit := swag.FormatInt64(qrLimit) + if qLimit != "" { + if err := r.SetQueryParam("limit", qLimit); err != nil { + return err + } + } + + } + + if o.Offset != nil { + + // query param offset + var qrOffset int64 + if o.Offset != nil { + qrOffset = *o.Offset + } + qOffset := swag.FormatInt64(qrOffset) + if qOffset != "" { + if err := r.SetQueryParam("offset", qOffset); err != nil { + return err + } + } + + } + + if o.OrderBy != nil { + + // query param orderBy + var qrOrderBy string + if o.OrderBy != nil { + qrOrderBy = *o.OrderBy + } + qOrderBy := qrOrderBy + if qOrderBy != "" { + if err := r.SetQueryParam("orderBy", qOrderBy); err != nil { + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_accounts_maas_list_responses.go b/api/client/v1/v1_cloud_accounts_maas_list_responses.go new file mode 100644 index 00000000..c45c10e1 --- /dev/null +++ b/api/client/v1/v1_cloud_accounts_maas_list_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1CloudAccountsMaasListReader is a Reader for the V1CloudAccountsMaasList structure. +type V1CloudAccountsMaasListReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudAccountsMaasListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1CloudAccountsMaasListOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudAccountsMaasListOK creates a V1CloudAccountsMaasListOK with default headers values +func NewV1CloudAccountsMaasListOK() *V1CloudAccountsMaasListOK { + return &V1CloudAccountsMaasListOK{} +} + +/* +V1CloudAccountsMaasListOK handles this case with default header values. + +An array of cloud account items +*/ +type V1CloudAccountsMaasListOK struct { + Payload *models.V1MaasAccounts +} + +func (o *V1CloudAccountsMaasListOK) Error() string { + return fmt.Sprintf("[GET /v1/cloudaccounts/maas][%d] v1CloudAccountsMaasListOK %+v", 200, o.Payload) +} + +func (o *V1CloudAccountsMaasListOK) GetPayload() *models.V1MaasAccounts { + return o.Payload +} + +func (o *V1CloudAccountsMaasListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1MaasAccounts) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_cloud_accounts_maas_patch_parameters.go b/api/client/v1/v1_cloud_accounts_maas_patch_parameters.go new file mode 100644 index 00000000..f125b8f7 --- /dev/null +++ b/api/client/v1/v1_cloud_accounts_maas_patch_parameters.go @@ -0,0 +1,157 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1CloudAccountsMaasPatchParams creates a new V1CloudAccountsMaasPatchParams object +// with the default values initialized. +func NewV1CloudAccountsMaasPatchParams() *V1CloudAccountsMaasPatchParams { + var () + return &V1CloudAccountsMaasPatchParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudAccountsMaasPatchParamsWithTimeout creates a new V1CloudAccountsMaasPatchParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudAccountsMaasPatchParamsWithTimeout(timeout time.Duration) *V1CloudAccountsMaasPatchParams { + var () + return &V1CloudAccountsMaasPatchParams{ + + timeout: timeout, + } +} + +// NewV1CloudAccountsMaasPatchParamsWithContext creates a new V1CloudAccountsMaasPatchParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudAccountsMaasPatchParamsWithContext(ctx context.Context) *V1CloudAccountsMaasPatchParams { + var () + return &V1CloudAccountsMaasPatchParams{ + + Context: ctx, + } +} + +// NewV1CloudAccountsMaasPatchParamsWithHTTPClient creates a new V1CloudAccountsMaasPatchParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudAccountsMaasPatchParamsWithHTTPClient(client *http.Client) *V1CloudAccountsMaasPatchParams { + var () + return &V1CloudAccountsMaasPatchParams{ + HTTPClient: client, + } +} + +/* +V1CloudAccountsMaasPatchParams contains all the parameters to send to the API endpoint +for the v1 cloud accounts maas patch operation typically these are written to a http.Request +*/ +type V1CloudAccountsMaasPatchParams struct { + + /*Body*/ + Body models.V1CloudAccountsPatch + /*UID + Maas cloud account uid + + */ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud accounts maas patch params +func (o *V1CloudAccountsMaasPatchParams) WithTimeout(timeout time.Duration) *V1CloudAccountsMaasPatchParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud accounts maas patch params +func (o *V1CloudAccountsMaasPatchParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud accounts maas patch params +func (o *V1CloudAccountsMaasPatchParams) WithContext(ctx context.Context) *V1CloudAccountsMaasPatchParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud accounts maas patch params +func (o *V1CloudAccountsMaasPatchParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud accounts maas patch params +func (o *V1CloudAccountsMaasPatchParams) WithHTTPClient(client *http.Client) *V1CloudAccountsMaasPatchParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud accounts maas patch params +func (o *V1CloudAccountsMaasPatchParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 cloud accounts maas patch params +func (o *V1CloudAccountsMaasPatchParams) WithBody(body models.V1CloudAccountsPatch) *V1CloudAccountsMaasPatchParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 cloud accounts maas patch params +func (o *V1CloudAccountsMaasPatchParams) SetBody(body models.V1CloudAccountsPatch) { + o.Body = body +} + +// WithUID adds the uid to the v1 cloud accounts maas patch params +func (o *V1CloudAccountsMaasPatchParams) WithUID(uid string) *V1CloudAccountsMaasPatchParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 cloud accounts maas patch params +func (o *V1CloudAccountsMaasPatchParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudAccountsMaasPatchParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_accounts_maas_patch_responses.go b/api/client/v1/v1_cloud_accounts_maas_patch_responses.go new file mode 100644 index 00000000..20fcfd05 --- /dev/null +++ b/api/client/v1/v1_cloud_accounts_maas_patch_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1CloudAccountsMaasPatchReader is a Reader for the V1CloudAccountsMaasPatch structure. +type V1CloudAccountsMaasPatchReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudAccountsMaasPatchReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1CloudAccountsMaasPatchNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudAccountsMaasPatchNoContent creates a V1CloudAccountsMaasPatchNoContent with default headers values +func NewV1CloudAccountsMaasPatchNoContent() *V1CloudAccountsMaasPatchNoContent { + return &V1CloudAccountsMaasPatchNoContent{} +} + +/* +V1CloudAccountsMaasPatchNoContent handles this case with default header values. + +The resource was updated successfully +*/ +type V1CloudAccountsMaasPatchNoContent struct { +} + +func (o *V1CloudAccountsMaasPatchNoContent) Error() string { + return fmt.Sprintf("[PATCH /v1/cloudaccounts/maas/{uid}][%d] v1CloudAccountsMaasPatchNoContent ", 204) +} + +func (o *V1CloudAccountsMaasPatchNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_cloud_accounts_maas_update_parameters.go b/api/client/v1/v1_cloud_accounts_maas_update_parameters.go new file mode 100644 index 00000000..ec3e16fb --- /dev/null +++ b/api/client/v1/v1_cloud_accounts_maas_update_parameters.go @@ -0,0 +1,157 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1CloudAccountsMaasUpdateParams creates a new V1CloudAccountsMaasUpdateParams object +// with the default values initialized. +func NewV1CloudAccountsMaasUpdateParams() *V1CloudAccountsMaasUpdateParams { + var () + return &V1CloudAccountsMaasUpdateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudAccountsMaasUpdateParamsWithTimeout creates a new V1CloudAccountsMaasUpdateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudAccountsMaasUpdateParamsWithTimeout(timeout time.Duration) *V1CloudAccountsMaasUpdateParams { + var () + return &V1CloudAccountsMaasUpdateParams{ + + timeout: timeout, + } +} + +// NewV1CloudAccountsMaasUpdateParamsWithContext creates a new V1CloudAccountsMaasUpdateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudAccountsMaasUpdateParamsWithContext(ctx context.Context) *V1CloudAccountsMaasUpdateParams { + var () + return &V1CloudAccountsMaasUpdateParams{ + + Context: ctx, + } +} + +// NewV1CloudAccountsMaasUpdateParamsWithHTTPClient creates a new V1CloudAccountsMaasUpdateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudAccountsMaasUpdateParamsWithHTTPClient(client *http.Client) *V1CloudAccountsMaasUpdateParams { + var () + return &V1CloudAccountsMaasUpdateParams{ + HTTPClient: client, + } +} + +/* +V1CloudAccountsMaasUpdateParams contains all the parameters to send to the API endpoint +for the v1 cloud accounts maas update operation typically these are written to a http.Request +*/ +type V1CloudAccountsMaasUpdateParams struct { + + /*Body*/ + Body *models.V1MaasAccount + /*UID + Maas cloud account uid + + */ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud accounts maas update params +func (o *V1CloudAccountsMaasUpdateParams) WithTimeout(timeout time.Duration) *V1CloudAccountsMaasUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud accounts maas update params +func (o *V1CloudAccountsMaasUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud accounts maas update params +func (o *V1CloudAccountsMaasUpdateParams) WithContext(ctx context.Context) *V1CloudAccountsMaasUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud accounts maas update params +func (o *V1CloudAccountsMaasUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud accounts maas update params +func (o *V1CloudAccountsMaasUpdateParams) WithHTTPClient(client *http.Client) *V1CloudAccountsMaasUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud accounts maas update params +func (o *V1CloudAccountsMaasUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 cloud accounts maas update params +func (o *V1CloudAccountsMaasUpdateParams) WithBody(body *models.V1MaasAccount) *V1CloudAccountsMaasUpdateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 cloud accounts maas update params +func (o *V1CloudAccountsMaasUpdateParams) SetBody(body *models.V1MaasAccount) { + o.Body = body +} + +// WithUID adds the uid to the v1 cloud accounts maas update params +func (o *V1CloudAccountsMaasUpdateParams) WithUID(uid string) *V1CloudAccountsMaasUpdateParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 cloud accounts maas update params +func (o *V1CloudAccountsMaasUpdateParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudAccountsMaasUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_accounts_maas_update_responses.go b/api/client/v1/v1_cloud_accounts_maas_update_responses.go new file mode 100644 index 00000000..181bd0c7 --- /dev/null +++ b/api/client/v1/v1_cloud_accounts_maas_update_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1CloudAccountsMaasUpdateReader is a Reader for the V1CloudAccountsMaasUpdate structure. +type V1CloudAccountsMaasUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudAccountsMaasUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1CloudAccountsMaasUpdateNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudAccountsMaasUpdateNoContent creates a V1CloudAccountsMaasUpdateNoContent with default headers values +func NewV1CloudAccountsMaasUpdateNoContent() *V1CloudAccountsMaasUpdateNoContent { + return &V1CloudAccountsMaasUpdateNoContent{} +} + +/* +V1CloudAccountsMaasUpdateNoContent handles this case with default header values. + +The resource was updated successfully +*/ +type V1CloudAccountsMaasUpdateNoContent struct { +} + +func (o *V1CloudAccountsMaasUpdateNoContent) Error() string { + return fmt.Sprintf("[PUT /v1/cloudaccounts/maas/{uid}][%d] v1CloudAccountsMaasUpdateNoContent ", 204) +} + +func (o *V1CloudAccountsMaasUpdateNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_cloud_accounts_open_stack_create_parameters.go b/api/client/v1/v1_cloud_accounts_open_stack_create_parameters.go new file mode 100644 index 00000000..350970db --- /dev/null +++ b/api/client/v1/v1_cloud_accounts_open_stack_create_parameters.go @@ -0,0 +1,139 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1CloudAccountsOpenStackCreateParams creates a new V1CloudAccountsOpenStackCreateParams object +// with the default values initialized. +func NewV1CloudAccountsOpenStackCreateParams() *V1CloudAccountsOpenStackCreateParams { + var () + return &V1CloudAccountsOpenStackCreateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudAccountsOpenStackCreateParamsWithTimeout creates a new V1CloudAccountsOpenStackCreateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudAccountsOpenStackCreateParamsWithTimeout(timeout time.Duration) *V1CloudAccountsOpenStackCreateParams { + var () + return &V1CloudAccountsOpenStackCreateParams{ + + timeout: timeout, + } +} + +// NewV1CloudAccountsOpenStackCreateParamsWithContext creates a new V1CloudAccountsOpenStackCreateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudAccountsOpenStackCreateParamsWithContext(ctx context.Context) *V1CloudAccountsOpenStackCreateParams { + var () + return &V1CloudAccountsOpenStackCreateParams{ + + Context: ctx, + } +} + +// NewV1CloudAccountsOpenStackCreateParamsWithHTTPClient creates a new V1CloudAccountsOpenStackCreateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudAccountsOpenStackCreateParamsWithHTTPClient(client *http.Client) *V1CloudAccountsOpenStackCreateParams { + var () + return &V1CloudAccountsOpenStackCreateParams{ + HTTPClient: client, + } +} + +/* +V1CloudAccountsOpenStackCreateParams contains all the parameters to send to the API endpoint +for the v1 cloud accounts open stack create operation typically these are written to a http.Request +*/ +type V1CloudAccountsOpenStackCreateParams struct { + + /*Body + Request payload to validate OpenStack cloud account + + */ + Body *models.V1OpenStackAccount + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud accounts open stack create params +func (o *V1CloudAccountsOpenStackCreateParams) WithTimeout(timeout time.Duration) *V1CloudAccountsOpenStackCreateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud accounts open stack create params +func (o *V1CloudAccountsOpenStackCreateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud accounts open stack create params +func (o *V1CloudAccountsOpenStackCreateParams) WithContext(ctx context.Context) *V1CloudAccountsOpenStackCreateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud accounts open stack create params +func (o *V1CloudAccountsOpenStackCreateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud accounts open stack create params +func (o *V1CloudAccountsOpenStackCreateParams) WithHTTPClient(client *http.Client) *V1CloudAccountsOpenStackCreateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud accounts open stack create params +func (o *V1CloudAccountsOpenStackCreateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 cloud accounts open stack create params +func (o *V1CloudAccountsOpenStackCreateParams) WithBody(body *models.V1OpenStackAccount) *V1CloudAccountsOpenStackCreateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 cloud accounts open stack create params +func (o *V1CloudAccountsOpenStackCreateParams) SetBody(body *models.V1OpenStackAccount) { + o.Body = body +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudAccountsOpenStackCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_accounts_open_stack_create_responses.go b/api/client/v1/v1_cloud_accounts_open_stack_create_responses.go new file mode 100644 index 00000000..c8a3eedd --- /dev/null +++ b/api/client/v1/v1_cloud_accounts_open_stack_create_responses.go @@ -0,0 +1,77 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1CloudAccountsOpenStackCreateReader is a Reader for the V1CloudAccountsOpenStackCreate structure. +type V1CloudAccountsOpenStackCreateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudAccountsOpenStackCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 201: + result := NewV1CloudAccountsOpenStackCreateCreated() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudAccountsOpenStackCreateCreated creates a V1CloudAccountsOpenStackCreateCreated with default headers values +func NewV1CloudAccountsOpenStackCreateCreated() *V1CloudAccountsOpenStackCreateCreated { + return &V1CloudAccountsOpenStackCreateCreated{} +} + +/* +V1CloudAccountsOpenStackCreateCreated handles this case with default header values. + +Created successfully +*/ +type V1CloudAccountsOpenStackCreateCreated struct { + /*Audit uid for the request + */ + AuditUID string + + Payload *models.V1UID +} + +func (o *V1CloudAccountsOpenStackCreateCreated) Error() string { + return fmt.Sprintf("[POST /v1/cloudaccounts/openstack][%d] v1CloudAccountsOpenStackCreateCreated %+v", 201, o.Payload) +} + +func (o *V1CloudAccountsOpenStackCreateCreated) GetPayload() *models.V1UID { + return o.Payload +} + +func (o *V1CloudAccountsOpenStackCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header AuditUid + o.AuditUID = response.GetHeader("AuditUid") + + o.Payload = new(models.V1UID) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_cloud_accounts_open_stack_delete_parameters.go b/api/client/v1/v1_cloud_accounts_open_stack_delete_parameters.go new file mode 100644 index 00000000..bf3422a1 --- /dev/null +++ b/api/client/v1/v1_cloud_accounts_open_stack_delete_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1CloudAccountsOpenStackDeleteParams creates a new V1CloudAccountsOpenStackDeleteParams object +// with the default values initialized. +func NewV1CloudAccountsOpenStackDeleteParams() *V1CloudAccountsOpenStackDeleteParams { + var () + return &V1CloudAccountsOpenStackDeleteParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudAccountsOpenStackDeleteParamsWithTimeout creates a new V1CloudAccountsOpenStackDeleteParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudAccountsOpenStackDeleteParamsWithTimeout(timeout time.Duration) *V1CloudAccountsOpenStackDeleteParams { + var () + return &V1CloudAccountsOpenStackDeleteParams{ + + timeout: timeout, + } +} + +// NewV1CloudAccountsOpenStackDeleteParamsWithContext creates a new V1CloudAccountsOpenStackDeleteParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudAccountsOpenStackDeleteParamsWithContext(ctx context.Context) *V1CloudAccountsOpenStackDeleteParams { + var () + return &V1CloudAccountsOpenStackDeleteParams{ + + Context: ctx, + } +} + +// NewV1CloudAccountsOpenStackDeleteParamsWithHTTPClient creates a new V1CloudAccountsOpenStackDeleteParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudAccountsOpenStackDeleteParamsWithHTTPClient(client *http.Client) *V1CloudAccountsOpenStackDeleteParams { + var () + return &V1CloudAccountsOpenStackDeleteParams{ + HTTPClient: client, + } +} + +/* +V1CloudAccountsOpenStackDeleteParams contains all the parameters to send to the API endpoint +for the v1 cloud accounts open stack delete operation typically these are written to a http.Request +*/ +type V1CloudAccountsOpenStackDeleteParams struct { + + /*UID + OpenStack cloud account uid + + */ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud accounts open stack delete params +func (o *V1CloudAccountsOpenStackDeleteParams) WithTimeout(timeout time.Duration) *V1CloudAccountsOpenStackDeleteParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud accounts open stack delete params +func (o *V1CloudAccountsOpenStackDeleteParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud accounts open stack delete params +func (o *V1CloudAccountsOpenStackDeleteParams) WithContext(ctx context.Context) *V1CloudAccountsOpenStackDeleteParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud accounts open stack delete params +func (o *V1CloudAccountsOpenStackDeleteParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud accounts open stack delete params +func (o *V1CloudAccountsOpenStackDeleteParams) WithHTTPClient(client *http.Client) *V1CloudAccountsOpenStackDeleteParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud accounts open stack delete params +func (o *V1CloudAccountsOpenStackDeleteParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithUID adds the uid to the v1 cloud accounts open stack delete params +func (o *V1CloudAccountsOpenStackDeleteParams) WithUID(uid string) *V1CloudAccountsOpenStackDeleteParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 cloud accounts open stack delete params +func (o *V1CloudAccountsOpenStackDeleteParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudAccountsOpenStackDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_accounts_open_stack_delete_responses.go b/api/client/v1/v1_cloud_accounts_open_stack_delete_responses.go new file mode 100644 index 00000000..5e02e0f6 --- /dev/null +++ b/api/client/v1/v1_cloud_accounts_open_stack_delete_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1CloudAccountsOpenStackDeleteReader is a Reader for the V1CloudAccountsOpenStackDelete structure. +type V1CloudAccountsOpenStackDeleteReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudAccountsOpenStackDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1CloudAccountsOpenStackDeleteNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudAccountsOpenStackDeleteNoContent creates a V1CloudAccountsOpenStackDeleteNoContent with default headers values +func NewV1CloudAccountsOpenStackDeleteNoContent() *V1CloudAccountsOpenStackDeleteNoContent { + return &V1CloudAccountsOpenStackDeleteNoContent{} +} + +/* +V1CloudAccountsOpenStackDeleteNoContent handles this case with default header values. + +The resource was deleted successfully +*/ +type V1CloudAccountsOpenStackDeleteNoContent struct { +} + +func (o *V1CloudAccountsOpenStackDeleteNoContent) Error() string { + return fmt.Sprintf("[DELETE /v1/cloudaccounts/openstack/{uid}][%d] v1CloudAccountsOpenStackDeleteNoContent ", 204) +} + +func (o *V1CloudAccountsOpenStackDeleteNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_cloud_accounts_open_stack_get_parameters.go b/api/client/v1/v1_cloud_accounts_open_stack_get_parameters.go new file mode 100644 index 00000000..2c8e26f5 --- /dev/null +++ b/api/client/v1/v1_cloud_accounts_open_stack_get_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1CloudAccountsOpenStackGetParams creates a new V1CloudAccountsOpenStackGetParams object +// with the default values initialized. +func NewV1CloudAccountsOpenStackGetParams() *V1CloudAccountsOpenStackGetParams { + var () + return &V1CloudAccountsOpenStackGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudAccountsOpenStackGetParamsWithTimeout creates a new V1CloudAccountsOpenStackGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudAccountsOpenStackGetParamsWithTimeout(timeout time.Duration) *V1CloudAccountsOpenStackGetParams { + var () + return &V1CloudAccountsOpenStackGetParams{ + + timeout: timeout, + } +} + +// NewV1CloudAccountsOpenStackGetParamsWithContext creates a new V1CloudAccountsOpenStackGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudAccountsOpenStackGetParamsWithContext(ctx context.Context) *V1CloudAccountsOpenStackGetParams { + var () + return &V1CloudAccountsOpenStackGetParams{ + + Context: ctx, + } +} + +// NewV1CloudAccountsOpenStackGetParamsWithHTTPClient creates a new V1CloudAccountsOpenStackGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudAccountsOpenStackGetParamsWithHTTPClient(client *http.Client) *V1CloudAccountsOpenStackGetParams { + var () + return &V1CloudAccountsOpenStackGetParams{ + HTTPClient: client, + } +} + +/* +V1CloudAccountsOpenStackGetParams contains all the parameters to send to the API endpoint +for the v1 cloud accounts open stack get operation typically these are written to a http.Request +*/ +type V1CloudAccountsOpenStackGetParams struct { + + /*UID + OpenStack cloud account uid + + */ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud accounts open stack get params +func (o *V1CloudAccountsOpenStackGetParams) WithTimeout(timeout time.Duration) *V1CloudAccountsOpenStackGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud accounts open stack get params +func (o *V1CloudAccountsOpenStackGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud accounts open stack get params +func (o *V1CloudAccountsOpenStackGetParams) WithContext(ctx context.Context) *V1CloudAccountsOpenStackGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud accounts open stack get params +func (o *V1CloudAccountsOpenStackGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud accounts open stack get params +func (o *V1CloudAccountsOpenStackGetParams) WithHTTPClient(client *http.Client) *V1CloudAccountsOpenStackGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud accounts open stack get params +func (o *V1CloudAccountsOpenStackGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithUID adds the uid to the v1 cloud accounts open stack get params +func (o *V1CloudAccountsOpenStackGetParams) WithUID(uid string) *V1CloudAccountsOpenStackGetParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 cloud accounts open stack get params +func (o *V1CloudAccountsOpenStackGetParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudAccountsOpenStackGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_accounts_open_stack_get_responses.go b/api/client/v1/v1_cloud_accounts_open_stack_get_responses.go new file mode 100644 index 00000000..6c64e0a8 --- /dev/null +++ b/api/client/v1/v1_cloud_accounts_open_stack_get_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1CloudAccountsOpenStackGetReader is a Reader for the V1CloudAccountsOpenStackGet structure. +type V1CloudAccountsOpenStackGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudAccountsOpenStackGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1CloudAccountsOpenStackGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudAccountsOpenStackGetOK creates a V1CloudAccountsOpenStackGetOK with default headers values +func NewV1CloudAccountsOpenStackGetOK() *V1CloudAccountsOpenStackGetOK { + return &V1CloudAccountsOpenStackGetOK{} +} + +/* +V1CloudAccountsOpenStackGetOK handles this case with default header values. + +OK +*/ +type V1CloudAccountsOpenStackGetOK struct { + Payload *models.V1OpenStackAccount +} + +func (o *V1CloudAccountsOpenStackGetOK) Error() string { + return fmt.Sprintf("[GET /v1/cloudaccounts/openstack/{uid}][%d] v1CloudAccountsOpenStackGetOK %+v", 200, o.Payload) +} + +func (o *V1CloudAccountsOpenStackGetOK) GetPayload() *models.V1OpenStackAccount { + return o.Payload +} + +func (o *V1CloudAccountsOpenStackGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1OpenStackAccount) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_cloud_accounts_open_stack_list_parameters.go b/api/client/v1/v1_cloud_accounts_open_stack_list_parameters.go new file mode 100644 index 00000000..cff68188 --- /dev/null +++ b/api/client/v1/v1_cloud_accounts_open_stack_list_parameters.go @@ -0,0 +1,323 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// NewV1CloudAccountsOpenStackListParams creates a new V1CloudAccountsOpenStackListParams object +// with the default values initialized. +func NewV1CloudAccountsOpenStackListParams() *V1CloudAccountsOpenStackListParams { + var ( + limitDefault = int64(50) + ) + return &V1CloudAccountsOpenStackListParams{ + Limit: &limitDefault, + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudAccountsOpenStackListParamsWithTimeout creates a new V1CloudAccountsOpenStackListParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudAccountsOpenStackListParamsWithTimeout(timeout time.Duration) *V1CloudAccountsOpenStackListParams { + var ( + limitDefault = int64(50) + ) + return &V1CloudAccountsOpenStackListParams{ + Limit: &limitDefault, + + timeout: timeout, + } +} + +// NewV1CloudAccountsOpenStackListParamsWithContext creates a new V1CloudAccountsOpenStackListParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudAccountsOpenStackListParamsWithContext(ctx context.Context) *V1CloudAccountsOpenStackListParams { + var ( + limitDefault = int64(50) + ) + return &V1CloudAccountsOpenStackListParams{ + Limit: &limitDefault, + + Context: ctx, + } +} + +// NewV1CloudAccountsOpenStackListParamsWithHTTPClient creates a new V1CloudAccountsOpenStackListParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudAccountsOpenStackListParamsWithHTTPClient(client *http.Client) *V1CloudAccountsOpenStackListParams { + var ( + limitDefault = int64(50) + ) + return &V1CloudAccountsOpenStackListParams{ + Limit: &limitDefault, + HTTPClient: client, + } +} + +/* +V1CloudAccountsOpenStackListParams contains all the parameters to send to the API endpoint +for the v1 cloud accounts open stack list operation typically these are written to a http.Request +*/ +type V1CloudAccountsOpenStackListParams struct { + + /*Continue + continue token to paginate the subsequent data items + + */ + Continue *string + /*Fields + Set of fields to be presented in the response with values. The fields are comma separated. Eg: metadata.uid,metadata.name + + */ + Fields *string + /*Filters + Filters can be combined with AND, OR operators with field path name. Eg: metadata.name=TestServiceANDspec.cloudType=aws + + Server will be restricted to certain fields based on the indexed data for each resource. + + */ + Filters *string + /*Limit + limit is a maximum number of responses to return for a list call. Default and maximum value of the limit is 50. + If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. + + */ + Limit *int64 + /*Offset + offset is the next index number from which the response will start. The response offset value can be used along with continue token for the pagination. + + */ + Offset *int64 + /*OrderBy + Specify the fields with sort order. 1 indicates ascending and -1 for descending. Eg: orderBy=metadata.name=1,metadata.uid=-1 + + */ + OrderBy *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud accounts open stack list params +func (o *V1CloudAccountsOpenStackListParams) WithTimeout(timeout time.Duration) *V1CloudAccountsOpenStackListParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud accounts open stack list params +func (o *V1CloudAccountsOpenStackListParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud accounts open stack list params +func (o *V1CloudAccountsOpenStackListParams) WithContext(ctx context.Context) *V1CloudAccountsOpenStackListParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud accounts open stack list params +func (o *V1CloudAccountsOpenStackListParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud accounts open stack list params +func (o *V1CloudAccountsOpenStackListParams) WithHTTPClient(client *http.Client) *V1CloudAccountsOpenStackListParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud accounts open stack list params +func (o *V1CloudAccountsOpenStackListParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithContinue adds the continueVar to the v1 cloud accounts open stack list params +func (o *V1CloudAccountsOpenStackListParams) WithContinue(continueVar *string) *V1CloudAccountsOpenStackListParams { + o.SetContinue(continueVar) + return o +} + +// SetContinue adds the continue to the v1 cloud accounts open stack list params +func (o *V1CloudAccountsOpenStackListParams) SetContinue(continueVar *string) { + o.Continue = continueVar +} + +// WithFields adds the fields to the v1 cloud accounts open stack list params +func (o *V1CloudAccountsOpenStackListParams) WithFields(fields *string) *V1CloudAccountsOpenStackListParams { + o.SetFields(fields) + return o +} + +// SetFields adds the fields to the v1 cloud accounts open stack list params +func (o *V1CloudAccountsOpenStackListParams) SetFields(fields *string) { + o.Fields = fields +} + +// WithFilters adds the filters to the v1 cloud accounts open stack list params +func (o *V1CloudAccountsOpenStackListParams) WithFilters(filters *string) *V1CloudAccountsOpenStackListParams { + o.SetFilters(filters) + return o +} + +// SetFilters adds the filters to the v1 cloud accounts open stack list params +func (o *V1CloudAccountsOpenStackListParams) SetFilters(filters *string) { + o.Filters = filters +} + +// WithLimit adds the limit to the v1 cloud accounts open stack list params +func (o *V1CloudAccountsOpenStackListParams) WithLimit(limit *int64) *V1CloudAccountsOpenStackListParams { + o.SetLimit(limit) + return o +} + +// SetLimit adds the limit to the v1 cloud accounts open stack list params +func (o *V1CloudAccountsOpenStackListParams) SetLimit(limit *int64) { + o.Limit = limit +} + +// WithOffset adds the offset to the v1 cloud accounts open stack list params +func (o *V1CloudAccountsOpenStackListParams) WithOffset(offset *int64) *V1CloudAccountsOpenStackListParams { + o.SetOffset(offset) + return o +} + +// SetOffset adds the offset to the v1 cloud accounts open stack list params +func (o *V1CloudAccountsOpenStackListParams) SetOffset(offset *int64) { + o.Offset = offset +} + +// WithOrderBy adds the orderBy to the v1 cloud accounts open stack list params +func (o *V1CloudAccountsOpenStackListParams) WithOrderBy(orderBy *string) *V1CloudAccountsOpenStackListParams { + o.SetOrderBy(orderBy) + return o +} + +// SetOrderBy adds the orderBy to the v1 cloud accounts open stack list params +func (o *V1CloudAccountsOpenStackListParams) SetOrderBy(orderBy *string) { + o.OrderBy = orderBy +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudAccountsOpenStackListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Continue != nil { + + // query param continue + var qrContinue string + if o.Continue != nil { + qrContinue = *o.Continue + } + qContinue := qrContinue + if qContinue != "" { + if err := r.SetQueryParam("continue", qContinue); err != nil { + return err + } + } + + } + + if o.Fields != nil { + + // query param fields + var qrFields string + if o.Fields != nil { + qrFields = *o.Fields + } + qFields := qrFields + if qFields != "" { + if err := r.SetQueryParam("fields", qFields); err != nil { + return err + } + } + + } + + if o.Filters != nil { + + // query param filters + var qrFilters string + if o.Filters != nil { + qrFilters = *o.Filters + } + qFilters := qrFilters + if qFilters != "" { + if err := r.SetQueryParam("filters", qFilters); err != nil { + return err + } + } + + } + + if o.Limit != nil { + + // query param limit + var qrLimit int64 + if o.Limit != nil { + qrLimit = *o.Limit + } + qLimit := swag.FormatInt64(qrLimit) + if qLimit != "" { + if err := r.SetQueryParam("limit", qLimit); err != nil { + return err + } + } + + } + + if o.Offset != nil { + + // query param offset + var qrOffset int64 + if o.Offset != nil { + qrOffset = *o.Offset + } + qOffset := swag.FormatInt64(qrOffset) + if qOffset != "" { + if err := r.SetQueryParam("offset", qOffset); err != nil { + return err + } + } + + } + + if o.OrderBy != nil { + + // query param orderBy + var qrOrderBy string + if o.OrderBy != nil { + qrOrderBy = *o.OrderBy + } + qOrderBy := qrOrderBy + if qOrderBy != "" { + if err := r.SetQueryParam("orderBy", qOrderBy); err != nil { + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_accounts_open_stack_list_responses.go b/api/client/v1/v1_cloud_accounts_open_stack_list_responses.go new file mode 100644 index 00000000..81975eba --- /dev/null +++ b/api/client/v1/v1_cloud_accounts_open_stack_list_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1CloudAccountsOpenStackListReader is a Reader for the V1CloudAccountsOpenStackList structure. +type V1CloudAccountsOpenStackListReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudAccountsOpenStackListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1CloudAccountsOpenStackListOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudAccountsOpenStackListOK creates a V1CloudAccountsOpenStackListOK with default headers values +func NewV1CloudAccountsOpenStackListOK() *V1CloudAccountsOpenStackListOK { + return &V1CloudAccountsOpenStackListOK{} +} + +/* +V1CloudAccountsOpenStackListOK handles this case with default header values. + +An array of cloud account items +*/ +type V1CloudAccountsOpenStackListOK struct { + Payload *models.V1OpenStackAccounts +} + +func (o *V1CloudAccountsOpenStackListOK) Error() string { + return fmt.Sprintf("[GET /v1/cloudaccounts/openstack][%d] v1CloudAccountsOpenStackListOK %+v", 200, o.Payload) +} + +func (o *V1CloudAccountsOpenStackListOK) GetPayload() *models.V1OpenStackAccounts { + return o.Payload +} + +func (o *V1CloudAccountsOpenStackListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1OpenStackAccounts) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_cloud_accounts_open_stack_update_parameters.go b/api/client/v1/v1_cloud_accounts_open_stack_update_parameters.go new file mode 100644 index 00000000..36db12a2 --- /dev/null +++ b/api/client/v1/v1_cloud_accounts_open_stack_update_parameters.go @@ -0,0 +1,157 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1CloudAccountsOpenStackUpdateParams creates a new V1CloudAccountsOpenStackUpdateParams object +// with the default values initialized. +func NewV1CloudAccountsOpenStackUpdateParams() *V1CloudAccountsOpenStackUpdateParams { + var () + return &V1CloudAccountsOpenStackUpdateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudAccountsOpenStackUpdateParamsWithTimeout creates a new V1CloudAccountsOpenStackUpdateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudAccountsOpenStackUpdateParamsWithTimeout(timeout time.Duration) *V1CloudAccountsOpenStackUpdateParams { + var () + return &V1CloudAccountsOpenStackUpdateParams{ + + timeout: timeout, + } +} + +// NewV1CloudAccountsOpenStackUpdateParamsWithContext creates a new V1CloudAccountsOpenStackUpdateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudAccountsOpenStackUpdateParamsWithContext(ctx context.Context) *V1CloudAccountsOpenStackUpdateParams { + var () + return &V1CloudAccountsOpenStackUpdateParams{ + + Context: ctx, + } +} + +// NewV1CloudAccountsOpenStackUpdateParamsWithHTTPClient creates a new V1CloudAccountsOpenStackUpdateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudAccountsOpenStackUpdateParamsWithHTTPClient(client *http.Client) *V1CloudAccountsOpenStackUpdateParams { + var () + return &V1CloudAccountsOpenStackUpdateParams{ + HTTPClient: client, + } +} + +/* +V1CloudAccountsOpenStackUpdateParams contains all the parameters to send to the API endpoint +for the v1 cloud accounts open stack update operation typically these are written to a http.Request +*/ +type V1CloudAccountsOpenStackUpdateParams struct { + + /*Body*/ + Body *models.V1OpenStackAccount + /*UID + OpenStack cloud account uid + + */ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud accounts open stack update params +func (o *V1CloudAccountsOpenStackUpdateParams) WithTimeout(timeout time.Duration) *V1CloudAccountsOpenStackUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud accounts open stack update params +func (o *V1CloudAccountsOpenStackUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud accounts open stack update params +func (o *V1CloudAccountsOpenStackUpdateParams) WithContext(ctx context.Context) *V1CloudAccountsOpenStackUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud accounts open stack update params +func (o *V1CloudAccountsOpenStackUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud accounts open stack update params +func (o *V1CloudAccountsOpenStackUpdateParams) WithHTTPClient(client *http.Client) *V1CloudAccountsOpenStackUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud accounts open stack update params +func (o *V1CloudAccountsOpenStackUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 cloud accounts open stack update params +func (o *V1CloudAccountsOpenStackUpdateParams) WithBody(body *models.V1OpenStackAccount) *V1CloudAccountsOpenStackUpdateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 cloud accounts open stack update params +func (o *V1CloudAccountsOpenStackUpdateParams) SetBody(body *models.V1OpenStackAccount) { + o.Body = body +} + +// WithUID adds the uid to the v1 cloud accounts open stack update params +func (o *V1CloudAccountsOpenStackUpdateParams) WithUID(uid string) *V1CloudAccountsOpenStackUpdateParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 cloud accounts open stack update params +func (o *V1CloudAccountsOpenStackUpdateParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudAccountsOpenStackUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_accounts_open_stack_update_responses.go b/api/client/v1/v1_cloud_accounts_open_stack_update_responses.go new file mode 100644 index 00000000..ddf35ade --- /dev/null +++ b/api/client/v1/v1_cloud_accounts_open_stack_update_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1CloudAccountsOpenStackUpdateReader is a Reader for the V1CloudAccountsOpenStackUpdate structure. +type V1CloudAccountsOpenStackUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudAccountsOpenStackUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1CloudAccountsOpenStackUpdateNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudAccountsOpenStackUpdateNoContent creates a V1CloudAccountsOpenStackUpdateNoContent with default headers values +func NewV1CloudAccountsOpenStackUpdateNoContent() *V1CloudAccountsOpenStackUpdateNoContent { + return &V1CloudAccountsOpenStackUpdateNoContent{} +} + +/* +V1CloudAccountsOpenStackUpdateNoContent handles this case with default header values. + +The resource was updated successfully +*/ +type V1CloudAccountsOpenStackUpdateNoContent struct { +} + +func (o *V1CloudAccountsOpenStackUpdateNoContent) Error() string { + return fmt.Sprintf("[PUT /v1/cloudaccounts/openstack/{uid}][%d] v1CloudAccountsOpenStackUpdateNoContent ", 204) +} + +func (o *V1CloudAccountsOpenStackUpdateNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_cloud_accounts_tencent_create_parameters.go b/api/client/v1/v1_cloud_accounts_tencent_create_parameters.go new file mode 100644 index 00000000..f9b5e4d9 --- /dev/null +++ b/api/client/v1/v1_cloud_accounts_tencent_create_parameters.go @@ -0,0 +1,139 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1CloudAccountsTencentCreateParams creates a new V1CloudAccountsTencentCreateParams object +// with the default values initialized. +func NewV1CloudAccountsTencentCreateParams() *V1CloudAccountsTencentCreateParams { + var () + return &V1CloudAccountsTencentCreateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudAccountsTencentCreateParamsWithTimeout creates a new V1CloudAccountsTencentCreateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudAccountsTencentCreateParamsWithTimeout(timeout time.Duration) *V1CloudAccountsTencentCreateParams { + var () + return &V1CloudAccountsTencentCreateParams{ + + timeout: timeout, + } +} + +// NewV1CloudAccountsTencentCreateParamsWithContext creates a new V1CloudAccountsTencentCreateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudAccountsTencentCreateParamsWithContext(ctx context.Context) *V1CloudAccountsTencentCreateParams { + var () + return &V1CloudAccountsTencentCreateParams{ + + Context: ctx, + } +} + +// NewV1CloudAccountsTencentCreateParamsWithHTTPClient creates a new V1CloudAccountsTencentCreateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudAccountsTencentCreateParamsWithHTTPClient(client *http.Client) *V1CloudAccountsTencentCreateParams { + var () + return &V1CloudAccountsTencentCreateParams{ + HTTPClient: client, + } +} + +/* +V1CloudAccountsTencentCreateParams contains all the parameters to send to the API endpoint +for the v1 cloud accounts tencent create operation typically these are written to a http.Request +*/ +type V1CloudAccountsTencentCreateParams struct { + + /*Body + Request payload to validate Tencent cloud account + + */ + Body *models.V1TencentAccount + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud accounts tencent create params +func (o *V1CloudAccountsTencentCreateParams) WithTimeout(timeout time.Duration) *V1CloudAccountsTencentCreateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud accounts tencent create params +func (o *V1CloudAccountsTencentCreateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud accounts tencent create params +func (o *V1CloudAccountsTencentCreateParams) WithContext(ctx context.Context) *V1CloudAccountsTencentCreateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud accounts tencent create params +func (o *V1CloudAccountsTencentCreateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud accounts tencent create params +func (o *V1CloudAccountsTencentCreateParams) WithHTTPClient(client *http.Client) *V1CloudAccountsTencentCreateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud accounts tencent create params +func (o *V1CloudAccountsTencentCreateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 cloud accounts tencent create params +func (o *V1CloudAccountsTencentCreateParams) WithBody(body *models.V1TencentAccount) *V1CloudAccountsTencentCreateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 cloud accounts tencent create params +func (o *V1CloudAccountsTencentCreateParams) SetBody(body *models.V1TencentAccount) { + o.Body = body +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudAccountsTencentCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_accounts_tencent_create_responses.go b/api/client/v1/v1_cloud_accounts_tencent_create_responses.go new file mode 100644 index 00000000..c4fa4301 --- /dev/null +++ b/api/client/v1/v1_cloud_accounts_tencent_create_responses.go @@ -0,0 +1,77 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1CloudAccountsTencentCreateReader is a Reader for the V1CloudAccountsTencentCreate structure. +type V1CloudAccountsTencentCreateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudAccountsTencentCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 201: + result := NewV1CloudAccountsTencentCreateCreated() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudAccountsTencentCreateCreated creates a V1CloudAccountsTencentCreateCreated with default headers values +func NewV1CloudAccountsTencentCreateCreated() *V1CloudAccountsTencentCreateCreated { + return &V1CloudAccountsTencentCreateCreated{} +} + +/* +V1CloudAccountsTencentCreateCreated handles this case with default header values. + +Created successfully +*/ +type V1CloudAccountsTencentCreateCreated struct { + /*Audit uid for the request + */ + AuditUID string + + Payload *models.V1UID +} + +func (o *V1CloudAccountsTencentCreateCreated) Error() string { + return fmt.Sprintf("[POST /v1/cloudaccounts/tencent][%d] v1CloudAccountsTencentCreateCreated %+v", 201, o.Payload) +} + +func (o *V1CloudAccountsTencentCreateCreated) GetPayload() *models.V1UID { + return o.Payload +} + +func (o *V1CloudAccountsTencentCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header AuditUid + o.AuditUID = response.GetHeader("AuditUid") + + o.Payload = new(models.V1UID) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_cloud_accounts_tencent_delete_parameters.go b/api/client/v1/v1_cloud_accounts_tencent_delete_parameters.go new file mode 100644 index 00000000..318c24e5 --- /dev/null +++ b/api/client/v1/v1_cloud_accounts_tencent_delete_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1CloudAccountsTencentDeleteParams creates a new V1CloudAccountsTencentDeleteParams object +// with the default values initialized. +func NewV1CloudAccountsTencentDeleteParams() *V1CloudAccountsTencentDeleteParams { + var () + return &V1CloudAccountsTencentDeleteParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudAccountsTencentDeleteParamsWithTimeout creates a new V1CloudAccountsTencentDeleteParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudAccountsTencentDeleteParamsWithTimeout(timeout time.Duration) *V1CloudAccountsTencentDeleteParams { + var () + return &V1CloudAccountsTencentDeleteParams{ + + timeout: timeout, + } +} + +// NewV1CloudAccountsTencentDeleteParamsWithContext creates a new V1CloudAccountsTencentDeleteParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudAccountsTencentDeleteParamsWithContext(ctx context.Context) *V1CloudAccountsTencentDeleteParams { + var () + return &V1CloudAccountsTencentDeleteParams{ + + Context: ctx, + } +} + +// NewV1CloudAccountsTencentDeleteParamsWithHTTPClient creates a new V1CloudAccountsTencentDeleteParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudAccountsTencentDeleteParamsWithHTTPClient(client *http.Client) *V1CloudAccountsTencentDeleteParams { + var () + return &V1CloudAccountsTencentDeleteParams{ + HTTPClient: client, + } +} + +/* +V1CloudAccountsTencentDeleteParams contains all the parameters to send to the API endpoint +for the v1 cloud accounts tencent delete operation typically these are written to a http.Request +*/ +type V1CloudAccountsTencentDeleteParams struct { + + /*UID + Tencent cloud account uid + + */ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud accounts tencent delete params +func (o *V1CloudAccountsTencentDeleteParams) WithTimeout(timeout time.Duration) *V1CloudAccountsTencentDeleteParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud accounts tencent delete params +func (o *V1CloudAccountsTencentDeleteParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud accounts tencent delete params +func (o *V1CloudAccountsTencentDeleteParams) WithContext(ctx context.Context) *V1CloudAccountsTencentDeleteParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud accounts tencent delete params +func (o *V1CloudAccountsTencentDeleteParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud accounts tencent delete params +func (o *V1CloudAccountsTencentDeleteParams) WithHTTPClient(client *http.Client) *V1CloudAccountsTencentDeleteParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud accounts tencent delete params +func (o *V1CloudAccountsTencentDeleteParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithUID adds the uid to the v1 cloud accounts tencent delete params +func (o *V1CloudAccountsTencentDeleteParams) WithUID(uid string) *V1CloudAccountsTencentDeleteParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 cloud accounts tencent delete params +func (o *V1CloudAccountsTencentDeleteParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudAccountsTencentDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_accounts_tencent_delete_responses.go b/api/client/v1/v1_cloud_accounts_tencent_delete_responses.go new file mode 100644 index 00000000..d62c6869 --- /dev/null +++ b/api/client/v1/v1_cloud_accounts_tencent_delete_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1CloudAccountsTencentDeleteReader is a Reader for the V1CloudAccountsTencentDelete structure. +type V1CloudAccountsTencentDeleteReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudAccountsTencentDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1CloudAccountsTencentDeleteNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudAccountsTencentDeleteNoContent creates a V1CloudAccountsTencentDeleteNoContent with default headers values +func NewV1CloudAccountsTencentDeleteNoContent() *V1CloudAccountsTencentDeleteNoContent { + return &V1CloudAccountsTencentDeleteNoContent{} +} + +/* +V1CloudAccountsTencentDeleteNoContent handles this case with default header values. + +The resource was deleted successfully +*/ +type V1CloudAccountsTencentDeleteNoContent struct { +} + +func (o *V1CloudAccountsTencentDeleteNoContent) Error() string { + return fmt.Sprintf("[DELETE /v1/cloudaccounts/tencent/{uid}][%d] v1CloudAccountsTencentDeleteNoContent ", 204) +} + +func (o *V1CloudAccountsTencentDeleteNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_cloud_accounts_tencent_get_parameters.go b/api/client/v1/v1_cloud_accounts_tencent_get_parameters.go new file mode 100644 index 00000000..b014a585 --- /dev/null +++ b/api/client/v1/v1_cloud_accounts_tencent_get_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1CloudAccountsTencentGetParams creates a new V1CloudAccountsTencentGetParams object +// with the default values initialized. +func NewV1CloudAccountsTencentGetParams() *V1CloudAccountsTencentGetParams { + var () + return &V1CloudAccountsTencentGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudAccountsTencentGetParamsWithTimeout creates a new V1CloudAccountsTencentGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudAccountsTencentGetParamsWithTimeout(timeout time.Duration) *V1CloudAccountsTencentGetParams { + var () + return &V1CloudAccountsTencentGetParams{ + + timeout: timeout, + } +} + +// NewV1CloudAccountsTencentGetParamsWithContext creates a new V1CloudAccountsTencentGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudAccountsTencentGetParamsWithContext(ctx context.Context) *V1CloudAccountsTencentGetParams { + var () + return &V1CloudAccountsTencentGetParams{ + + Context: ctx, + } +} + +// NewV1CloudAccountsTencentGetParamsWithHTTPClient creates a new V1CloudAccountsTencentGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudAccountsTencentGetParamsWithHTTPClient(client *http.Client) *V1CloudAccountsTencentGetParams { + var () + return &V1CloudAccountsTencentGetParams{ + HTTPClient: client, + } +} + +/* +V1CloudAccountsTencentGetParams contains all the parameters to send to the API endpoint +for the v1 cloud accounts tencent get operation typically these are written to a http.Request +*/ +type V1CloudAccountsTencentGetParams struct { + + /*UID + Tencent cloud account uid + + */ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud accounts tencent get params +func (o *V1CloudAccountsTencentGetParams) WithTimeout(timeout time.Duration) *V1CloudAccountsTencentGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud accounts tencent get params +func (o *V1CloudAccountsTencentGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud accounts tencent get params +func (o *V1CloudAccountsTencentGetParams) WithContext(ctx context.Context) *V1CloudAccountsTencentGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud accounts tencent get params +func (o *V1CloudAccountsTencentGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud accounts tencent get params +func (o *V1CloudAccountsTencentGetParams) WithHTTPClient(client *http.Client) *V1CloudAccountsTencentGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud accounts tencent get params +func (o *V1CloudAccountsTencentGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithUID adds the uid to the v1 cloud accounts tencent get params +func (o *V1CloudAccountsTencentGetParams) WithUID(uid string) *V1CloudAccountsTencentGetParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 cloud accounts tencent get params +func (o *V1CloudAccountsTencentGetParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudAccountsTencentGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_accounts_tencent_get_responses.go b/api/client/v1/v1_cloud_accounts_tencent_get_responses.go new file mode 100644 index 00000000..3628ad42 --- /dev/null +++ b/api/client/v1/v1_cloud_accounts_tencent_get_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1CloudAccountsTencentGetReader is a Reader for the V1CloudAccountsTencentGet structure. +type V1CloudAccountsTencentGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudAccountsTencentGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1CloudAccountsTencentGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudAccountsTencentGetOK creates a V1CloudAccountsTencentGetOK with default headers values +func NewV1CloudAccountsTencentGetOK() *V1CloudAccountsTencentGetOK { + return &V1CloudAccountsTencentGetOK{} +} + +/* +V1CloudAccountsTencentGetOK handles this case with default header values. + +OK +*/ +type V1CloudAccountsTencentGetOK struct { + Payload *models.V1TencentAccount +} + +func (o *V1CloudAccountsTencentGetOK) Error() string { + return fmt.Sprintf("[GET /v1/cloudaccounts/tencent/{uid}][%d] v1CloudAccountsTencentGetOK %+v", 200, o.Payload) +} + +func (o *V1CloudAccountsTencentGetOK) GetPayload() *models.V1TencentAccount { + return o.Payload +} + +func (o *V1CloudAccountsTencentGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1TencentAccount) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_cloud_accounts_tencent_list_parameters.go b/api/client/v1/v1_cloud_accounts_tencent_list_parameters.go new file mode 100644 index 00000000..50a17d61 --- /dev/null +++ b/api/client/v1/v1_cloud_accounts_tencent_list_parameters.go @@ -0,0 +1,323 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// NewV1CloudAccountsTencentListParams creates a new V1CloudAccountsTencentListParams object +// with the default values initialized. +func NewV1CloudAccountsTencentListParams() *V1CloudAccountsTencentListParams { + var ( + limitDefault = int64(50) + ) + return &V1CloudAccountsTencentListParams{ + Limit: &limitDefault, + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudAccountsTencentListParamsWithTimeout creates a new V1CloudAccountsTencentListParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudAccountsTencentListParamsWithTimeout(timeout time.Duration) *V1CloudAccountsTencentListParams { + var ( + limitDefault = int64(50) + ) + return &V1CloudAccountsTencentListParams{ + Limit: &limitDefault, + + timeout: timeout, + } +} + +// NewV1CloudAccountsTencentListParamsWithContext creates a new V1CloudAccountsTencentListParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudAccountsTencentListParamsWithContext(ctx context.Context) *V1CloudAccountsTencentListParams { + var ( + limitDefault = int64(50) + ) + return &V1CloudAccountsTencentListParams{ + Limit: &limitDefault, + + Context: ctx, + } +} + +// NewV1CloudAccountsTencentListParamsWithHTTPClient creates a new V1CloudAccountsTencentListParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudAccountsTencentListParamsWithHTTPClient(client *http.Client) *V1CloudAccountsTencentListParams { + var ( + limitDefault = int64(50) + ) + return &V1CloudAccountsTencentListParams{ + Limit: &limitDefault, + HTTPClient: client, + } +} + +/* +V1CloudAccountsTencentListParams contains all the parameters to send to the API endpoint +for the v1 cloud accounts tencent list operation typically these are written to a http.Request +*/ +type V1CloudAccountsTencentListParams struct { + + /*Continue + continue token to paginate the subsequent data items + + */ + Continue *string + /*Fields + Set of fields to be presented in the response with values. The fields are comma separated. Eg: metadata.uid,metadata.name + + */ + Fields *string + /*Filters + Filters can be combined with AND, OR operators with field path name. Eg: metadata.name=TestServiceANDspec.cloudType=aws + + Server will be restricted to certain fields based on the indexed data for each resource. + + */ + Filters *string + /*Limit + limit is a maximum number of responses to return for a list call. Default and maximum value of the limit is 50. + If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. + + */ + Limit *int64 + /*Offset + offset is the next index number from which the response will start. The response offset value can be used along with continue token for the pagination. + + */ + Offset *int64 + /*OrderBy + Specify the fields with sort order. 1 indicates ascending and -1 for descending. Eg: orderBy=metadata.name=1,metadata.uid=-1 + + */ + OrderBy *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud accounts tencent list params +func (o *V1CloudAccountsTencentListParams) WithTimeout(timeout time.Duration) *V1CloudAccountsTencentListParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud accounts tencent list params +func (o *V1CloudAccountsTencentListParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud accounts tencent list params +func (o *V1CloudAccountsTencentListParams) WithContext(ctx context.Context) *V1CloudAccountsTencentListParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud accounts tencent list params +func (o *V1CloudAccountsTencentListParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud accounts tencent list params +func (o *V1CloudAccountsTencentListParams) WithHTTPClient(client *http.Client) *V1CloudAccountsTencentListParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud accounts tencent list params +func (o *V1CloudAccountsTencentListParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithContinue adds the continueVar to the v1 cloud accounts tencent list params +func (o *V1CloudAccountsTencentListParams) WithContinue(continueVar *string) *V1CloudAccountsTencentListParams { + o.SetContinue(continueVar) + return o +} + +// SetContinue adds the continue to the v1 cloud accounts tencent list params +func (o *V1CloudAccountsTencentListParams) SetContinue(continueVar *string) { + o.Continue = continueVar +} + +// WithFields adds the fields to the v1 cloud accounts tencent list params +func (o *V1CloudAccountsTencentListParams) WithFields(fields *string) *V1CloudAccountsTencentListParams { + o.SetFields(fields) + return o +} + +// SetFields adds the fields to the v1 cloud accounts tencent list params +func (o *V1CloudAccountsTencentListParams) SetFields(fields *string) { + o.Fields = fields +} + +// WithFilters adds the filters to the v1 cloud accounts tencent list params +func (o *V1CloudAccountsTencentListParams) WithFilters(filters *string) *V1CloudAccountsTencentListParams { + o.SetFilters(filters) + return o +} + +// SetFilters adds the filters to the v1 cloud accounts tencent list params +func (o *V1CloudAccountsTencentListParams) SetFilters(filters *string) { + o.Filters = filters +} + +// WithLimit adds the limit to the v1 cloud accounts tencent list params +func (o *V1CloudAccountsTencentListParams) WithLimit(limit *int64) *V1CloudAccountsTencentListParams { + o.SetLimit(limit) + return o +} + +// SetLimit adds the limit to the v1 cloud accounts tencent list params +func (o *V1CloudAccountsTencentListParams) SetLimit(limit *int64) { + o.Limit = limit +} + +// WithOffset adds the offset to the v1 cloud accounts tencent list params +func (o *V1CloudAccountsTencentListParams) WithOffset(offset *int64) *V1CloudAccountsTencentListParams { + o.SetOffset(offset) + return o +} + +// SetOffset adds the offset to the v1 cloud accounts tencent list params +func (o *V1CloudAccountsTencentListParams) SetOffset(offset *int64) { + o.Offset = offset +} + +// WithOrderBy adds the orderBy to the v1 cloud accounts tencent list params +func (o *V1CloudAccountsTencentListParams) WithOrderBy(orderBy *string) *V1CloudAccountsTencentListParams { + o.SetOrderBy(orderBy) + return o +} + +// SetOrderBy adds the orderBy to the v1 cloud accounts tencent list params +func (o *V1CloudAccountsTencentListParams) SetOrderBy(orderBy *string) { + o.OrderBy = orderBy +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudAccountsTencentListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Continue != nil { + + // query param continue + var qrContinue string + if o.Continue != nil { + qrContinue = *o.Continue + } + qContinue := qrContinue + if qContinue != "" { + if err := r.SetQueryParam("continue", qContinue); err != nil { + return err + } + } + + } + + if o.Fields != nil { + + // query param fields + var qrFields string + if o.Fields != nil { + qrFields = *o.Fields + } + qFields := qrFields + if qFields != "" { + if err := r.SetQueryParam("fields", qFields); err != nil { + return err + } + } + + } + + if o.Filters != nil { + + // query param filters + var qrFilters string + if o.Filters != nil { + qrFilters = *o.Filters + } + qFilters := qrFilters + if qFilters != "" { + if err := r.SetQueryParam("filters", qFilters); err != nil { + return err + } + } + + } + + if o.Limit != nil { + + // query param limit + var qrLimit int64 + if o.Limit != nil { + qrLimit = *o.Limit + } + qLimit := swag.FormatInt64(qrLimit) + if qLimit != "" { + if err := r.SetQueryParam("limit", qLimit); err != nil { + return err + } + } + + } + + if o.Offset != nil { + + // query param offset + var qrOffset int64 + if o.Offset != nil { + qrOffset = *o.Offset + } + qOffset := swag.FormatInt64(qrOffset) + if qOffset != "" { + if err := r.SetQueryParam("offset", qOffset); err != nil { + return err + } + } + + } + + if o.OrderBy != nil { + + // query param orderBy + var qrOrderBy string + if o.OrderBy != nil { + qrOrderBy = *o.OrderBy + } + qOrderBy := qrOrderBy + if qOrderBy != "" { + if err := r.SetQueryParam("orderBy", qOrderBy); err != nil { + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_accounts_tencent_list_responses.go b/api/client/v1/v1_cloud_accounts_tencent_list_responses.go new file mode 100644 index 00000000..6e91208b --- /dev/null +++ b/api/client/v1/v1_cloud_accounts_tencent_list_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1CloudAccountsTencentListReader is a Reader for the V1CloudAccountsTencentList structure. +type V1CloudAccountsTencentListReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudAccountsTencentListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1CloudAccountsTencentListOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudAccountsTencentListOK creates a V1CloudAccountsTencentListOK with default headers values +func NewV1CloudAccountsTencentListOK() *V1CloudAccountsTencentListOK { + return &V1CloudAccountsTencentListOK{} +} + +/* +V1CloudAccountsTencentListOK handles this case with default header values. + +An array of cloud account items +*/ +type V1CloudAccountsTencentListOK struct { + Payload *models.V1TencentAccounts +} + +func (o *V1CloudAccountsTencentListOK) Error() string { + return fmt.Sprintf("[GET /v1/cloudaccounts/tencent][%d] v1CloudAccountsTencentListOK %+v", 200, o.Payload) +} + +func (o *V1CloudAccountsTencentListOK) GetPayload() *models.V1TencentAccounts { + return o.Payload +} + +func (o *V1CloudAccountsTencentListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1TencentAccounts) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_cloud_accounts_tencent_update_parameters.go b/api/client/v1/v1_cloud_accounts_tencent_update_parameters.go new file mode 100644 index 00000000..4de95215 --- /dev/null +++ b/api/client/v1/v1_cloud_accounts_tencent_update_parameters.go @@ -0,0 +1,157 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1CloudAccountsTencentUpdateParams creates a new V1CloudAccountsTencentUpdateParams object +// with the default values initialized. +func NewV1CloudAccountsTencentUpdateParams() *V1CloudAccountsTencentUpdateParams { + var () + return &V1CloudAccountsTencentUpdateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudAccountsTencentUpdateParamsWithTimeout creates a new V1CloudAccountsTencentUpdateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudAccountsTencentUpdateParamsWithTimeout(timeout time.Duration) *V1CloudAccountsTencentUpdateParams { + var () + return &V1CloudAccountsTencentUpdateParams{ + + timeout: timeout, + } +} + +// NewV1CloudAccountsTencentUpdateParamsWithContext creates a new V1CloudAccountsTencentUpdateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudAccountsTencentUpdateParamsWithContext(ctx context.Context) *V1CloudAccountsTencentUpdateParams { + var () + return &V1CloudAccountsTencentUpdateParams{ + + Context: ctx, + } +} + +// NewV1CloudAccountsTencentUpdateParamsWithHTTPClient creates a new V1CloudAccountsTencentUpdateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudAccountsTencentUpdateParamsWithHTTPClient(client *http.Client) *V1CloudAccountsTencentUpdateParams { + var () + return &V1CloudAccountsTencentUpdateParams{ + HTTPClient: client, + } +} + +/* +V1CloudAccountsTencentUpdateParams contains all the parameters to send to the API endpoint +for the v1 cloud accounts tencent update operation typically these are written to a http.Request +*/ +type V1CloudAccountsTencentUpdateParams struct { + + /*Body*/ + Body *models.V1TencentAccount + /*UID + Tencent cloud account uid + + */ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud accounts tencent update params +func (o *V1CloudAccountsTencentUpdateParams) WithTimeout(timeout time.Duration) *V1CloudAccountsTencentUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud accounts tencent update params +func (o *V1CloudAccountsTencentUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud accounts tencent update params +func (o *V1CloudAccountsTencentUpdateParams) WithContext(ctx context.Context) *V1CloudAccountsTencentUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud accounts tencent update params +func (o *V1CloudAccountsTencentUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud accounts tencent update params +func (o *V1CloudAccountsTencentUpdateParams) WithHTTPClient(client *http.Client) *V1CloudAccountsTencentUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud accounts tencent update params +func (o *V1CloudAccountsTencentUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 cloud accounts tencent update params +func (o *V1CloudAccountsTencentUpdateParams) WithBody(body *models.V1TencentAccount) *V1CloudAccountsTencentUpdateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 cloud accounts tencent update params +func (o *V1CloudAccountsTencentUpdateParams) SetBody(body *models.V1TencentAccount) { + o.Body = body +} + +// WithUID adds the uid to the v1 cloud accounts tencent update params +func (o *V1CloudAccountsTencentUpdateParams) WithUID(uid string) *V1CloudAccountsTencentUpdateParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 cloud accounts tencent update params +func (o *V1CloudAccountsTencentUpdateParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudAccountsTencentUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_accounts_tencent_update_responses.go b/api/client/v1/v1_cloud_accounts_tencent_update_responses.go new file mode 100644 index 00000000..34bd5713 --- /dev/null +++ b/api/client/v1/v1_cloud_accounts_tencent_update_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1CloudAccountsTencentUpdateReader is a Reader for the V1CloudAccountsTencentUpdate structure. +type V1CloudAccountsTencentUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudAccountsTencentUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1CloudAccountsTencentUpdateNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudAccountsTencentUpdateNoContent creates a V1CloudAccountsTencentUpdateNoContent with default headers values +func NewV1CloudAccountsTencentUpdateNoContent() *V1CloudAccountsTencentUpdateNoContent { + return &V1CloudAccountsTencentUpdateNoContent{} +} + +/* +V1CloudAccountsTencentUpdateNoContent handles this case with default header values. + +The resource was updated successfully +*/ +type V1CloudAccountsTencentUpdateNoContent struct { +} + +func (o *V1CloudAccountsTencentUpdateNoContent) Error() string { + return fmt.Sprintf("[PUT /v1/cloudaccounts/tencent/{uid}][%d] v1CloudAccountsTencentUpdateNoContent ", 204) +} + +func (o *V1CloudAccountsTencentUpdateNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_cloud_accounts_vsphere_create_parameters.go b/api/client/v1/v1_cloud_accounts_vsphere_create_parameters.go new file mode 100644 index 00000000..4bb76fa6 --- /dev/null +++ b/api/client/v1/v1_cloud_accounts_vsphere_create_parameters.go @@ -0,0 +1,139 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1CloudAccountsVsphereCreateParams creates a new V1CloudAccountsVsphereCreateParams object +// with the default values initialized. +func NewV1CloudAccountsVsphereCreateParams() *V1CloudAccountsVsphereCreateParams { + var () + return &V1CloudAccountsVsphereCreateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudAccountsVsphereCreateParamsWithTimeout creates a new V1CloudAccountsVsphereCreateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudAccountsVsphereCreateParamsWithTimeout(timeout time.Duration) *V1CloudAccountsVsphereCreateParams { + var () + return &V1CloudAccountsVsphereCreateParams{ + + timeout: timeout, + } +} + +// NewV1CloudAccountsVsphereCreateParamsWithContext creates a new V1CloudAccountsVsphereCreateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudAccountsVsphereCreateParamsWithContext(ctx context.Context) *V1CloudAccountsVsphereCreateParams { + var () + return &V1CloudAccountsVsphereCreateParams{ + + Context: ctx, + } +} + +// NewV1CloudAccountsVsphereCreateParamsWithHTTPClient creates a new V1CloudAccountsVsphereCreateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudAccountsVsphereCreateParamsWithHTTPClient(client *http.Client) *V1CloudAccountsVsphereCreateParams { + var () + return &V1CloudAccountsVsphereCreateParams{ + HTTPClient: client, + } +} + +/* +V1CloudAccountsVsphereCreateParams contains all the parameters to send to the API endpoint +for the v1 cloud accounts vsphere create operation typically these are written to a http.Request +*/ +type V1CloudAccountsVsphereCreateParams struct { + + /*Body + Request payload to validate VSphere cloud account + + */ + Body *models.V1VsphereAccount + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud accounts vsphere create params +func (o *V1CloudAccountsVsphereCreateParams) WithTimeout(timeout time.Duration) *V1CloudAccountsVsphereCreateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud accounts vsphere create params +func (o *V1CloudAccountsVsphereCreateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud accounts vsphere create params +func (o *V1CloudAccountsVsphereCreateParams) WithContext(ctx context.Context) *V1CloudAccountsVsphereCreateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud accounts vsphere create params +func (o *V1CloudAccountsVsphereCreateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud accounts vsphere create params +func (o *V1CloudAccountsVsphereCreateParams) WithHTTPClient(client *http.Client) *V1CloudAccountsVsphereCreateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud accounts vsphere create params +func (o *V1CloudAccountsVsphereCreateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 cloud accounts vsphere create params +func (o *V1CloudAccountsVsphereCreateParams) WithBody(body *models.V1VsphereAccount) *V1CloudAccountsVsphereCreateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 cloud accounts vsphere create params +func (o *V1CloudAccountsVsphereCreateParams) SetBody(body *models.V1VsphereAccount) { + o.Body = body +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudAccountsVsphereCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_accounts_vsphere_create_responses.go b/api/client/v1/v1_cloud_accounts_vsphere_create_responses.go new file mode 100644 index 00000000..a3041250 --- /dev/null +++ b/api/client/v1/v1_cloud_accounts_vsphere_create_responses.go @@ -0,0 +1,77 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1CloudAccountsVsphereCreateReader is a Reader for the V1CloudAccountsVsphereCreate structure. +type V1CloudAccountsVsphereCreateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudAccountsVsphereCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 201: + result := NewV1CloudAccountsVsphereCreateCreated() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudAccountsVsphereCreateCreated creates a V1CloudAccountsVsphereCreateCreated with default headers values +func NewV1CloudAccountsVsphereCreateCreated() *V1CloudAccountsVsphereCreateCreated { + return &V1CloudAccountsVsphereCreateCreated{} +} + +/* +V1CloudAccountsVsphereCreateCreated handles this case with default header values. + +Created successfully +*/ +type V1CloudAccountsVsphereCreateCreated struct { + /*Audit uid for the request + */ + AuditUID string + + Payload *models.V1UID +} + +func (o *V1CloudAccountsVsphereCreateCreated) Error() string { + return fmt.Sprintf("[POST /v1/cloudaccounts/vsphere][%d] v1CloudAccountsVsphereCreateCreated %+v", 201, o.Payload) +} + +func (o *V1CloudAccountsVsphereCreateCreated) GetPayload() *models.V1UID { + return o.Payload +} + +func (o *V1CloudAccountsVsphereCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header AuditUid + o.AuditUID = response.GetHeader("AuditUid") + + o.Payload = new(models.V1UID) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_cloud_accounts_vsphere_delete_parameters.go b/api/client/v1/v1_cloud_accounts_vsphere_delete_parameters.go new file mode 100644 index 00000000..76a0f824 --- /dev/null +++ b/api/client/v1/v1_cloud_accounts_vsphere_delete_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1CloudAccountsVsphereDeleteParams creates a new V1CloudAccountsVsphereDeleteParams object +// with the default values initialized. +func NewV1CloudAccountsVsphereDeleteParams() *V1CloudAccountsVsphereDeleteParams { + var () + return &V1CloudAccountsVsphereDeleteParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudAccountsVsphereDeleteParamsWithTimeout creates a new V1CloudAccountsVsphereDeleteParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudAccountsVsphereDeleteParamsWithTimeout(timeout time.Duration) *V1CloudAccountsVsphereDeleteParams { + var () + return &V1CloudAccountsVsphereDeleteParams{ + + timeout: timeout, + } +} + +// NewV1CloudAccountsVsphereDeleteParamsWithContext creates a new V1CloudAccountsVsphereDeleteParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudAccountsVsphereDeleteParamsWithContext(ctx context.Context) *V1CloudAccountsVsphereDeleteParams { + var () + return &V1CloudAccountsVsphereDeleteParams{ + + Context: ctx, + } +} + +// NewV1CloudAccountsVsphereDeleteParamsWithHTTPClient creates a new V1CloudAccountsVsphereDeleteParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudAccountsVsphereDeleteParamsWithHTTPClient(client *http.Client) *V1CloudAccountsVsphereDeleteParams { + var () + return &V1CloudAccountsVsphereDeleteParams{ + HTTPClient: client, + } +} + +/* +V1CloudAccountsVsphereDeleteParams contains all the parameters to send to the API endpoint +for the v1 cloud accounts vsphere delete operation typically these are written to a http.Request +*/ +type V1CloudAccountsVsphereDeleteParams struct { + + /*UID + VSphere cloud account uid + + */ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud accounts vsphere delete params +func (o *V1CloudAccountsVsphereDeleteParams) WithTimeout(timeout time.Duration) *V1CloudAccountsVsphereDeleteParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud accounts vsphere delete params +func (o *V1CloudAccountsVsphereDeleteParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud accounts vsphere delete params +func (o *V1CloudAccountsVsphereDeleteParams) WithContext(ctx context.Context) *V1CloudAccountsVsphereDeleteParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud accounts vsphere delete params +func (o *V1CloudAccountsVsphereDeleteParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud accounts vsphere delete params +func (o *V1CloudAccountsVsphereDeleteParams) WithHTTPClient(client *http.Client) *V1CloudAccountsVsphereDeleteParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud accounts vsphere delete params +func (o *V1CloudAccountsVsphereDeleteParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithUID adds the uid to the v1 cloud accounts vsphere delete params +func (o *V1CloudAccountsVsphereDeleteParams) WithUID(uid string) *V1CloudAccountsVsphereDeleteParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 cloud accounts vsphere delete params +func (o *V1CloudAccountsVsphereDeleteParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudAccountsVsphereDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_accounts_vsphere_delete_responses.go b/api/client/v1/v1_cloud_accounts_vsphere_delete_responses.go new file mode 100644 index 00000000..649871dc --- /dev/null +++ b/api/client/v1/v1_cloud_accounts_vsphere_delete_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1CloudAccountsVsphereDeleteReader is a Reader for the V1CloudAccountsVsphereDelete structure. +type V1CloudAccountsVsphereDeleteReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudAccountsVsphereDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1CloudAccountsVsphereDeleteNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudAccountsVsphereDeleteNoContent creates a V1CloudAccountsVsphereDeleteNoContent with default headers values +func NewV1CloudAccountsVsphereDeleteNoContent() *V1CloudAccountsVsphereDeleteNoContent { + return &V1CloudAccountsVsphereDeleteNoContent{} +} + +/* +V1CloudAccountsVsphereDeleteNoContent handles this case with default header values. + +The resource was deleted successfully +*/ +type V1CloudAccountsVsphereDeleteNoContent struct { +} + +func (o *V1CloudAccountsVsphereDeleteNoContent) Error() string { + return fmt.Sprintf("[DELETE /v1/cloudaccounts/vsphere/{uid}][%d] v1CloudAccountsVsphereDeleteNoContent ", 204) +} + +func (o *V1CloudAccountsVsphereDeleteNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_cloud_accounts_vsphere_get_parameters.go b/api/client/v1/v1_cloud_accounts_vsphere_get_parameters.go new file mode 100644 index 00000000..454e3616 --- /dev/null +++ b/api/client/v1/v1_cloud_accounts_vsphere_get_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1CloudAccountsVsphereGetParams creates a new V1CloudAccountsVsphereGetParams object +// with the default values initialized. +func NewV1CloudAccountsVsphereGetParams() *V1CloudAccountsVsphereGetParams { + var () + return &V1CloudAccountsVsphereGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudAccountsVsphereGetParamsWithTimeout creates a new V1CloudAccountsVsphereGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudAccountsVsphereGetParamsWithTimeout(timeout time.Duration) *V1CloudAccountsVsphereGetParams { + var () + return &V1CloudAccountsVsphereGetParams{ + + timeout: timeout, + } +} + +// NewV1CloudAccountsVsphereGetParamsWithContext creates a new V1CloudAccountsVsphereGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudAccountsVsphereGetParamsWithContext(ctx context.Context) *V1CloudAccountsVsphereGetParams { + var () + return &V1CloudAccountsVsphereGetParams{ + + Context: ctx, + } +} + +// NewV1CloudAccountsVsphereGetParamsWithHTTPClient creates a new V1CloudAccountsVsphereGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudAccountsVsphereGetParamsWithHTTPClient(client *http.Client) *V1CloudAccountsVsphereGetParams { + var () + return &V1CloudAccountsVsphereGetParams{ + HTTPClient: client, + } +} + +/* +V1CloudAccountsVsphereGetParams contains all the parameters to send to the API endpoint +for the v1 cloud accounts vsphere get operation typically these are written to a http.Request +*/ +type V1CloudAccountsVsphereGetParams struct { + + /*UID + VSphere cloud account uid + + */ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud accounts vsphere get params +func (o *V1CloudAccountsVsphereGetParams) WithTimeout(timeout time.Duration) *V1CloudAccountsVsphereGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud accounts vsphere get params +func (o *V1CloudAccountsVsphereGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud accounts vsphere get params +func (o *V1CloudAccountsVsphereGetParams) WithContext(ctx context.Context) *V1CloudAccountsVsphereGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud accounts vsphere get params +func (o *V1CloudAccountsVsphereGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud accounts vsphere get params +func (o *V1CloudAccountsVsphereGetParams) WithHTTPClient(client *http.Client) *V1CloudAccountsVsphereGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud accounts vsphere get params +func (o *V1CloudAccountsVsphereGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithUID adds the uid to the v1 cloud accounts vsphere get params +func (o *V1CloudAccountsVsphereGetParams) WithUID(uid string) *V1CloudAccountsVsphereGetParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 cloud accounts vsphere get params +func (o *V1CloudAccountsVsphereGetParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudAccountsVsphereGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_accounts_vsphere_get_responses.go b/api/client/v1/v1_cloud_accounts_vsphere_get_responses.go new file mode 100644 index 00000000..1b3e09e6 --- /dev/null +++ b/api/client/v1/v1_cloud_accounts_vsphere_get_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1CloudAccountsVsphereGetReader is a Reader for the V1CloudAccountsVsphereGet structure. +type V1CloudAccountsVsphereGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudAccountsVsphereGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1CloudAccountsVsphereGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudAccountsVsphereGetOK creates a V1CloudAccountsVsphereGetOK with default headers values +func NewV1CloudAccountsVsphereGetOK() *V1CloudAccountsVsphereGetOK { + return &V1CloudAccountsVsphereGetOK{} +} + +/* +V1CloudAccountsVsphereGetOK handles this case with default header values. + +OK +*/ +type V1CloudAccountsVsphereGetOK struct { + Payload *models.V1VsphereAccount +} + +func (o *V1CloudAccountsVsphereGetOK) Error() string { + return fmt.Sprintf("[GET /v1/cloudaccounts/vsphere/{uid}][%d] v1CloudAccountsVsphereGetOK %+v", 200, o.Payload) +} + +func (o *V1CloudAccountsVsphereGetOK) GetPayload() *models.V1VsphereAccount { + return o.Payload +} + +func (o *V1CloudAccountsVsphereGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1VsphereAccount) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_cloud_accounts_vsphere_list_parameters.go b/api/client/v1/v1_cloud_accounts_vsphere_list_parameters.go new file mode 100644 index 00000000..a6c02174 --- /dev/null +++ b/api/client/v1/v1_cloud_accounts_vsphere_list_parameters.go @@ -0,0 +1,323 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// NewV1CloudAccountsVsphereListParams creates a new V1CloudAccountsVsphereListParams object +// with the default values initialized. +func NewV1CloudAccountsVsphereListParams() *V1CloudAccountsVsphereListParams { + var ( + limitDefault = int64(50) + ) + return &V1CloudAccountsVsphereListParams{ + Limit: &limitDefault, + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudAccountsVsphereListParamsWithTimeout creates a new V1CloudAccountsVsphereListParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudAccountsVsphereListParamsWithTimeout(timeout time.Duration) *V1CloudAccountsVsphereListParams { + var ( + limitDefault = int64(50) + ) + return &V1CloudAccountsVsphereListParams{ + Limit: &limitDefault, + + timeout: timeout, + } +} + +// NewV1CloudAccountsVsphereListParamsWithContext creates a new V1CloudAccountsVsphereListParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudAccountsVsphereListParamsWithContext(ctx context.Context) *V1CloudAccountsVsphereListParams { + var ( + limitDefault = int64(50) + ) + return &V1CloudAccountsVsphereListParams{ + Limit: &limitDefault, + + Context: ctx, + } +} + +// NewV1CloudAccountsVsphereListParamsWithHTTPClient creates a new V1CloudAccountsVsphereListParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudAccountsVsphereListParamsWithHTTPClient(client *http.Client) *V1CloudAccountsVsphereListParams { + var ( + limitDefault = int64(50) + ) + return &V1CloudAccountsVsphereListParams{ + Limit: &limitDefault, + HTTPClient: client, + } +} + +/* +V1CloudAccountsVsphereListParams contains all the parameters to send to the API endpoint +for the v1 cloud accounts vsphere list operation typically these are written to a http.Request +*/ +type V1CloudAccountsVsphereListParams struct { + + /*Continue + continue token to paginate the subsequent data items + + */ + Continue *string + /*Fields + Set of fields to be presented in the response with values. The fields are comma separated. Eg: metadata.uid,metadata.name + + */ + Fields *string + /*Filters + Filters can be combined with AND, OR operators with field path name. Eg: metadata.name=TestServiceANDspec.cloudType=aws + + Server will be restricted to certain fields based on the indexed data for each resource. + + */ + Filters *string + /*Limit + limit is a maximum number of responses to return for a list call. Default and maximum value of the limit is 50. + If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. + + */ + Limit *int64 + /*Offset + offset is the next index number from which the response will start. The response offset value can be used along with continue token for the pagination. + + */ + Offset *int64 + /*OrderBy + Specify the fields with sort order. 1 indicates ascending and -1 for descending. Eg: orderBy=metadata.name=1,metadata.uid=-1 + + */ + OrderBy *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud accounts vsphere list params +func (o *V1CloudAccountsVsphereListParams) WithTimeout(timeout time.Duration) *V1CloudAccountsVsphereListParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud accounts vsphere list params +func (o *V1CloudAccountsVsphereListParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud accounts vsphere list params +func (o *V1CloudAccountsVsphereListParams) WithContext(ctx context.Context) *V1CloudAccountsVsphereListParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud accounts vsphere list params +func (o *V1CloudAccountsVsphereListParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud accounts vsphere list params +func (o *V1CloudAccountsVsphereListParams) WithHTTPClient(client *http.Client) *V1CloudAccountsVsphereListParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud accounts vsphere list params +func (o *V1CloudAccountsVsphereListParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithContinue adds the continueVar to the v1 cloud accounts vsphere list params +func (o *V1CloudAccountsVsphereListParams) WithContinue(continueVar *string) *V1CloudAccountsVsphereListParams { + o.SetContinue(continueVar) + return o +} + +// SetContinue adds the continue to the v1 cloud accounts vsphere list params +func (o *V1CloudAccountsVsphereListParams) SetContinue(continueVar *string) { + o.Continue = continueVar +} + +// WithFields adds the fields to the v1 cloud accounts vsphere list params +func (o *V1CloudAccountsVsphereListParams) WithFields(fields *string) *V1CloudAccountsVsphereListParams { + o.SetFields(fields) + return o +} + +// SetFields adds the fields to the v1 cloud accounts vsphere list params +func (o *V1CloudAccountsVsphereListParams) SetFields(fields *string) { + o.Fields = fields +} + +// WithFilters adds the filters to the v1 cloud accounts vsphere list params +func (o *V1CloudAccountsVsphereListParams) WithFilters(filters *string) *V1CloudAccountsVsphereListParams { + o.SetFilters(filters) + return o +} + +// SetFilters adds the filters to the v1 cloud accounts vsphere list params +func (o *V1CloudAccountsVsphereListParams) SetFilters(filters *string) { + o.Filters = filters +} + +// WithLimit adds the limit to the v1 cloud accounts vsphere list params +func (o *V1CloudAccountsVsphereListParams) WithLimit(limit *int64) *V1CloudAccountsVsphereListParams { + o.SetLimit(limit) + return o +} + +// SetLimit adds the limit to the v1 cloud accounts vsphere list params +func (o *V1CloudAccountsVsphereListParams) SetLimit(limit *int64) { + o.Limit = limit +} + +// WithOffset adds the offset to the v1 cloud accounts vsphere list params +func (o *V1CloudAccountsVsphereListParams) WithOffset(offset *int64) *V1CloudAccountsVsphereListParams { + o.SetOffset(offset) + return o +} + +// SetOffset adds the offset to the v1 cloud accounts vsphere list params +func (o *V1CloudAccountsVsphereListParams) SetOffset(offset *int64) { + o.Offset = offset +} + +// WithOrderBy adds the orderBy to the v1 cloud accounts vsphere list params +func (o *V1CloudAccountsVsphereListParams) WithOrderBy(orderBy *string) *V1CloudAccountsVsphereListParams { + o.SetOrderBy(orderBy) + return o +} + +// SetOrderBy adds the orderBy to the v1 cloud accounts vsphere list params +func (o *V1CloudAccountsVsphereListParams) SetOrderBy(orderBy *string) { + o.OrderBy = orderBy +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudAccountsVsphereListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Continue != nil { + + // query param continue + var qrContinue string + if o.Continue != nil { + qrContinue = *o.Continue + } + qContinue := qrContinue + if qContinue != "" { + if err := r.SetQueryParam("continue", qContinue); err != nil { + return err + } + } + + } + + if o.Fields != nil { + + // query param fields + var qrFields string + if o.Fields != nil { + qrFields = *o.Fields + } + qFields := qrFields + if qFields != "" { + if err := r.SetQueryParam("fields", qFields); err != nil { + return err + } + } + + } + + if o.Filters != nil { + + // query param filters + var qrFilters string + if o.Filters != nil { + qrFilters = *o.Filters + } + qFilters := qrFilters + if qFilters != "" { + if err := r.SetQueryParam("filters", qFilters); err != nil { + return err + } + } + + } + + if o.Limit != nil { + + // query param limit + var qrLimit int64 + if o.Limit != nil { + qrLimit = *o.Limit + } + qLimit := swag.FormatInt64(qrLimit) + if qLimit != "" { + if err := r.SetQueryParam("limit", qLimit); err != nil { + return err + } + } + + } + + if o.Offset != nil { + + // query param offset + var qrOffset int64 + if o.Offset != nil { + qrOffset = *o.Offset + } + qOffset := swag.FormatInt64(qrOffset) + if qOffset != "" { + if err := r.SetQueryParam("offset", qOffset); err != nil { + return err + } + } + + } + + if o.OrderBy != nil { + + // query param orderBy + var qrOrderBy string + if o.OrderBy != nil { + qrOrderBy = *o.OrderBy + } + qOrderBy := qrOrderBy + if qOrderBy != "" { + if err := r.SetQueryParam("orderBy", qOrderBy); err != nil { + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_accounts_vsphere_list_responses.go b/api/client/v1/v1_cloud_accounts_vsphere_list_responses.go new file mode 100644 index 00000000..c783ac64 --- /dev/null +++ b/api/client/v1/v1_cloud_accounts_vsphere_list_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1CloudAccountsVsphereListReader is a Reader for the V1CloudAccountsVsphereList structure. +type V1CloudAccountsVsphereListReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudAccountsVsphereListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1CloudAccountsVsphereListOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudAccountsVsphereListOK creates a V1CloudAccountsVsphereListOK with default headers values +func NewV1CloudAccountsVsphereListOK() *V1CloudAccountsVsphereListOK { + return &V1CloudAccountsVsphereListOK{} +} + +/* +V1CloudAccountsVsphereListOK handles this case with default header values. + +An array of cloud account items +*/ +type V1CloudAccountsVsphereListOK struct { + Payload *models.V1VsphereAccounts +} + +func (o *V1CloudAccountsVsphereListOK) Error() string { + return fmt.Sprintf("[GET /v1/cloudaccounts/vsphere][%d] v1CloudAccountsVsphereListOK %+v", 200, o.Payload) +} + +func (o *V1CloudAccountsVsphereListOK) GetPayload() *models.V1VsphereAccounts { + return o.Payload +} + +func (o *V1CloudAccountsVsphereListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1VsphereAccounts) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_cloud_accounts_vsphere_update_parameters.go b/api/client/v1/v1_cloud_accounts_vsphere_update_parameters.go new file mode 100644 index 00000000..fe79d41d --- /dev/null +++ b/api/client/v1/v1_cloud_accounts_vsphere_update_parameters.go @@ -0,0 +1,160 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1CloudAccountsVsphereUpdateParams creates a new V1CloudAccountsVsphereUpdateParams object +// with the default values initialized. +func NewV1CloudAccountsVsphereUpdateParams() *V1CloudAccountsVsphereUpdateParams { + var () + return &V1CloudAccountsVsphereUpdateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudAccountsVsphereUpdateParamsWithTimeout creates a new V1CloudAccountsVsphereUpdateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudAccountsVsphereUpdateParamsWithTimeout(timeout time.Duration) *V1CloudAccountsVsphereUpdateParams { + var () + return &V1CloudAccountsVsphereUpdateParams{ + + timeout: timeout, + } +} + +// NewV1CloudAccountsVsphereUpdateParamsWithContext creates a new V1CloudAccountsVsphereUpdateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudAccountsVsphereUpdateParamsWithContext(ctx context.Context) *V1CloudAccountsVsphereUpdateParams { + var () + return &V1CloudAccountsVsphereUpdateParams{ + + Context: ctx, + } +} + +// NewV1CloudAccountsVsphereUpdateParamsWithHTTPClient creates a new V1CloudAccountsVsphereUpdateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudAccountsVsphereUpdateParamsWithHTTPClient(client *http.Client) *V1CloudAccountsVsphereUpdateParams { + var () + return &V1CloudAccountsVsphereUpdateParams{ + HTTPClient: client, + } +} + +/* +V1CloudAccountsVsphereUpdateParams contains all the parameters to send to the API endpoint +for the v1 cloud accounts vsphere update operation typically these are written to a http.Request +*/ +type V1CloudAccountsVsphereUpdateParams struct { + + /*Body + Request payload to validate VSphere cloud account + + */ + Body *models.V1VsphereAccount + /*UID + VSphere cloud account uid + + */ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud accounts vsphere update params +func (o *V1CloudAccountsVsphereUpdateParams) WithTimeout(timeout time.Duration) *V1CloudAccountsVsphereUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud accounts vsphere update params +func (o *V1CloudAccountsVsphereUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud accounts vsphere update params +func (o *V1CloudAccountsVsphereUpdateParams) WithContext(ctx context.Context) *V1CloudAccountsVsphereUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud accounts vsphere update params +func (o *V1CloudAccountsVsphereUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud accounts vsphere update params +func (o *V1CloudAccountsVsphereUpdateParams) WithHTTPClient(client *http.Client) *V1CloudAccountsVsphereUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud accounts vsphere update params +func (o *V1CloudAccountsVsphereUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 cloud accounts vsphere update params +func (o *V1CloudAccountsVsphereUpdateParams) WithBody(body *models.V1VsphereAccount) *V1CloudAccountsVsphereUpdateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 cloud accounts vsphere update params +func (o *V1CloudAccountsVsphereUpdateParams) SetBody(body *models.V1VsphereAccount) { + o.Body = body +} + +// WithUID adds the uid to the v1 cloud accounts vsphere update params +func (o *V1CloudAccountsVsphereUpdateParams) WithUID(uid string) *V1CloudAccountsVsphereUpdateParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 cloud accounts vsphere update params +func (o *V1CloudAccountsVsphereUpdateParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudAccountsVsphereUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_accounts_vsphere_update_responses.go b/api/client/v1/v1_cloud_accounts_vsphere_update_responses.go new file mode 100644 index 00000000..bff2961f --- /dev/null +++ b/api/client/v1/v1_cloud_accounts_vsphere_update_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1CloudAccountsVsphereUpdateReader is a Reader for the V1CloudAccountsVsphereUpdate structure. +type V1CloudAccountsVsphereUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudAccountsVsphereUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1CloudAccountsVsphereUpdateNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudAccountsVsphereUpdateNoContent creates a V1CloudAccountsVsphereUpdateNoContent with default headers values +func NewV1CloudAccountsVsphereUpdateNoContent() *V1CloudAccountsVsphereUpdateNoContent { + return &V1CloudAccountsVsphereUpdateNoContent{} +} + +/* +V1CloudAccountsVsphereUpdateNoContent handles this case with default header values. + +The resource was updated successfully +*/ +type V1CloudAccountsVsphereUpdateNoContent struct { +} + +func (o *V1CloudAccountsVsphereUpdateNoContent) Error() string { + return fmt.Sprintf("[PUT /v1/cloudaccounts/vsphere/{uid}][%d] v1CloudAccountsVsphereUpdateNoContent ", 204) +} + +func (o *V1CloudAccountsVsphereUpdateNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_cloud_compute_rate_parameters.go b/api/client/v1/v1_cloud_compute_rate_parameters.go new file mode 100644 index 00000000..acf12e0d --- /dev/null +++ b/api/client/v1/v1_cloud_compute_rate_parameters.go @@ -0,0 +1,182 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1CloudComputeRateParams creates a new V1CloudComputeRateParams object +// with the default values initialized. +func NewV1CloudComputeRateParams() *V1CloudComputeRateParams { + var () + return &V1CloudComputeRateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudComputeRateParamsWithTimeout creates a new V1CloudComputeRateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudComputeRateParamsWithTimeout(timeout time.Duration) *V1CloudComputeRateParams { + var () + return &V1CloudComputeRateParams{ + + timeout: timeout, + } +} + +// NewV1CloudComputeRateParamsWithContext creates a new V1CloudComputeRateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudComputeRateParamsWithContext(ctx context.Context) *V1CloudComputeRateParams { + var () + return &V1CloudComputeRateParams{ + + Context: ctx, + } +} + +// NewV1CloudComputeRateParamsWithHTTPClient creates a new V1CloudComputeRateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudComputeRateParamsWithHTTPClient(client *http.Client) *V1CloudComputeRateParams { + var () + return &V1CloudComputeRateParams{ + HTTPClient: client, + } +} + +/* +V1CloudComputeRateParams contains all the parameters to send to the API endpoint +for the v1 cloud compute rate operation typically these are written to a http.Request +*/ +type V1CloudComputeRateParams struct { + + /*Cloud + cloud for which compute rate is requested + + */ + Cloud string + /*Region + region for which compute rate is requested + + */ + Region string + /*Type + instance type for which compute rate is requested + + */ + Type string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud compute rate params +func (o *V1CloudComputeRateParams) WithTimeout(timeout time.Duration) *V1CloudComputeRateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud compute rate params +func (o *V1CloudComputeRateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud compute rate params +func (o *V1CloudComputeRateParams) WithContext(ctx context.Context) *V1CloudComputeRateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud compute rate params +func (o *V1CloudComputeRateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud compute rate params +func (o *V1CloudComputeRateParams) WithHTTPClient(client *http.Client) *V1CloudComputeRateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud compute rate params +func (o *V1CloudComputeRateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithCloud adds the cloud to the v1 cloud compute rate params +func (o *V1CloudComputeRateParams) WithCloud(cloud string) *V1CloudComputeRateParams { + o.SetCloud(cloud) + return o +} + +// SetCloud adds the cloud to the v1 cloud compute rate params +func (o *V1CloudComputeRateParams) SetCloud(cloud string) { + o.Cloud = cloud +} + +// WithRegion adds the region to the v1 cloud compute rate params +func (o *V1CloudComputeRateParams) WithRegion(region string) *V1CloudComputeRateParams { + o.SetRegion(region) + return o +} + +// SetRegion adds the region to the v1 cloud compute rate params +func (o *V1CloudComputeRateParams) SetRegion(region string) { + o.Region = region +} + +// WithType adds the typeVar to the v1 cloud compute rate params +func (o *V1CloudComputeRateParams) WithType(typeVar string) *V1CloudComputeRateParams { + o.SetType(typeVar) + return o +} + +// SetType adds the type to the v1 cloud compute rate params +func (o *V1CloudComputeRateParams) SetType(typeVar string) { + o.Type = typeVar +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudComputeRateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param cloud + if err := r.SetPathParam("cloud", o.Cloud); err != nil { + return err + } + + // query param region + qrRegion := o.Region + qRegion := qrRegion + if qRegion != "" { + if err := r.SetQueryParam("region", qRegion); err != nil { + return err + } + } + + // path param type + if err := r.SetPathParam("type", o.Type); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_compute_rate_responses.go b/api/client/v1/v1_cloud_compute_rate_responses.go new file mode 100644 index 00000000..58102aa2 --- /dev/null +++ b/api/client/v1/v1_cloud_compute_rate_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1CloudComputeRateReader is a Reader for the V1CloudComputeRate structure. +type V1CloudComputeRateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudComputeRateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1CloudComputeRateOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudComputeRateOK creates a V1CloudComputeRateOK with default headers values +func NewV1CloudComputeRateOK() *V1CloudComputeRateOK { + return &V1CloudComputeRateOK{} +} + +/* +V1CloudComputeRateOK handles this case with default header values. + +(empty) +*/ +type V1CloudComputeRateOK struct { + Payload *models.V1CloudCost +} + +func (o *V1CloudComputeRateOK) Error() string { + return fmt.Sprintf("[GET /v1/clouds/{cloud}/compute/{type}/rate][%d] v1CloudComputeRateOK %+v", 200, o.Payload) +} + +func (o *V1CloudComputeRateOK) GetPayload() *models.V1CloudCost { + return o.Payload +} + +func (o *V1CloudComputeRateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1CloudCost) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_cloud_configs_aks_get_parameters.go b/api/client/v1/v1_cloud_configs_aks_get_parameters.go new file mode 100644 index 00000000..a717867f --- /dev/null +++ b/api/client/v1/v1_cloud_configs_aks_get_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1CloudConfigsAksGetParams creates a new V1CloudConfigsAksGetParams object +// with the default values initialized. +func NewV1CloudConfigsAksGetParams() *V1CloudConfigsAksGetParams { + var () + return &V1CloudConfigsAksGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudConfigsAksGetParamsWithTimeout creates a new V1CloudConfigsAksGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudConfigsAksGetParamsWithTimeout(timeout time.Duration) *V1CloudConfigsAksGetParams { + var () + return &V1CloudConfigsAksGetParams{ + + timeout: timeout, + } +} + +// NewV1CloudConfigsAksGetParamsWithContext creates a new V1CloudConfigsAksGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudConfigsAksGetParamsWithContext(ctx context.Context) *V1CloudConfigsAksGetParams { + var () + return &V1CloudConfigsAksGetParams{ + + Context: ctx, + } +} + +// NewV1CloudConfigsAksGetParamsWithHTTPClient creates a new V1CloudConfigsAksGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudConfigsAksGetParamsWithHTTPClient(client *http.Client) *V1CloudConfigsAksGetParams { + var () + return &V1CloudConfigsAksGetParams{ + HTTPClient: client, + } +} + +/* +V1CloudConfigsAksGetParams contains all the parameters to send to the API endpoint +for the v1 cloud configs aks get operation typically these are written to a http.Request +*/ +type V1CloudConfigsAksGetParams struct { + + /*ConfigUID + Cluster's cloud config uid + + */ + ConfigUID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud configs aks get params +func (o *V1CloudConfigsAksGetParams) WithTimeout(timeout time.Duration) *V1CloudConfigsAksGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud configs aks get params +func (o *V1CloudConfigsAksGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud configs aks get params +func (o *V1CloudConfigsAksGetParams) WithContext(ctx context.Context) *V1CloudConfigsAksGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud configs aks get params +func (o *V1CloudConfigsAksGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud configs aks get params +func (o *V1CloudConfigsAksGetParams) WithHTTPClient(client *http.Client) *V1CloudConfigsAksGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud configs aks get params +func (o *V1CloudConfigsAksGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithConfigUID adds the configUID to the v1 cloud configs aks get params +func (o *V1CloudConfigsAksGetParams) WithConfigUID(configUID string) *V1CloudConfigsAksGetParams { + o.SetConfigUID(configUID) + return o +} + +// SetConfigUID adds the configUid to the v1 cloud configs aks get params +func (o *V1CloudConfigsAksGetParams) SetConfigUID(configUID string) { + o.ConfigUID = configUID +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudConfigsAksGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param configUid + if err := r.SetPathParam("configUid", o.ConfigUID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_configs_aks_get_responses.go b/api/client/v1/v1_cloud_configs_aks_get_responses.go new file mode 100644 index 00000000..79b32400 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_aks_get_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1CloudConfigsAksGetReader is a Reader for the V1CloudConfigsAksGet structure. +type V1CloudConfigsAksGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudConfigsAksGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1CloudConfigsAksGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudConfigsAksGetOK creates a V1CloudConfigsAksGetOK with default headers values +func NewV1CloudConfigsAksGetOK() *V1CloudConfigsAksGetOK { + return &V1CloudConfigsAksGetOK{} +} + +/* +V1CloudConfigsAksGetOK handles this case with default header values. + +OK +*/ +type V1CloudConfigsAksGetOK struct { + Payload *models.V1AzureCloudConfig +} + +func (o *V1CloudConfigsAksGetOK) Error() string { + return fmt.Sprintf("[GET /v1/cloudconfigs/aks/{configUid}][%d] v1CloudConfigsAksGetOK %+v", 200, o.Payload) +} + +func (o *V1CloudConfigsAksGetOK) GetPayload() *models.V1AzureCloudConfig { + return o.Payload +} + +func (o *V1CloudConfigsAksGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1AzureCloudConfig) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_cloud_configs_aks_machine_pool_create_parameters.go b/api/client/v1/v1_cloud_configs_aks_machine_pool_create_parameters.go new file mode 100644 index 00000000..002dec45 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_aks_machine_pool_create_parameters.go @@ -0,0 +1,157 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1CloudConfigsAksMachinePoolCreateParams creates a new V1CloudConfigsAksMachinePoolCreateParams object +// with the default values initialized. +func NewV1CloudConfigsAksMachinePoolCreateParams() *V1CloudConfigsAksMachinePoolCreateParams { + var () + return &V1CloudConfigsAksMachinePoolCreateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudConfigsAksMachinePoolCreateParamsWithTimeout creates a new V1CloudConfigsAksMachinePoolCreateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudConfigsAksMachinePoolCreateParamsWithTimeout(timeout time.Duration) *V1CloudConfigsAksMachinePoolCreateParams { + var () + return &V1CloudConfigsAksMachinePoolCreateParams{ + + timeout: timeout, + } +} + +// NewV1CloudConfigsAksMachinePoolCreateParamsWithContext creates a new V1CloudConfigsAksMachinePoolCreateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudConfigsAksMachinePoolCreateParamsWithContext(ctx context.Context) *V1CloudConfigsAksMachinePoolCreateParams { + var () + return &V1CloudConfigsAksMachinePoolCreateParams{ + + Context: ctx, + } +} + +// NewV1CloudConfigsAksMachinePoolCreateParamsWithHTTPClient creates a new V1CloudConfigsAksMachinePoolCreateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudConfigsAksMachinePoolCreateParamsWithHTTPClient(client *http.Client) *V1CloudConfigsAksMachinePoolCreateParams { + var () + return &V1CloudConfigsAksMachinePoolCreateParams{ + HTTPClient: client, + } +} + +/* +V1CloudConfigsAksMachinePoolCreateParams contains all the parameters to send to the API endpoint +for the v1 cloud configs aks machine pool create operation typically these are written to a http.Request +*/ +type V1CloudConfigsAksMachinePoolCreateParams struct { + + /*Body*/ + Body *models.V1AzureMachinePoolConfigEntity + /*ConfigUID + Cluster's cloud config uid + + */ + ConfigUID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud configs aks machine pool create params +func (o *V1CloudConfigsAksMachinePoolCreateParams) WithTimeout(timeout time.Duration) *V1CloudConfigsAksMachinePoolCreateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud configs aks machine pool create params +func (o *V1CloudConfigsAksMachinePoolCreateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud configs aks machine pool create params +func (o *V1CloudConfigsAksMachinePoolCreateParams) WithContext(ctx context.Context) *V1CloudConfigsAksMachinePoolCreateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud configs aks machine pool create params +func (o *V1CloudConfigsAksMachinePoolCreateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud configs aks machine pool create params +func (o *V1CloudConfigsAksMachinePoolCreateParams) WithHTTPClient(client *http.Client) *V1CloudConfigsAksMachinePoolCreateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud configs aks machine pool create params +func (o *V1CloudConfigsAksMachinePoolCreateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 cloud configs aks machine pool create params +func (o *V1CloudConfigsAksMachinePoolCreateParams) WithBody(body *models.V1AzureMachinePoolConfigEntity) *V1CloudConfigsAksMachinePoolCreateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 cloud configs aks machine pool create params +func (o *V1CloudConfigsAksMachinePoolCreateParams) SetBody(body *models.V1AzureMachinePoolConfigEntity) { + o.Body = body +} + +// WithConfigUID adds the configUID to the v1 cloud configs aks machine pool create params +func (o *V1CloudConfigsAksMachinePoolCreateParams) WithConfigUID(configUID string) *V1CloudConfigsAksMachinePoolCreateParams { + o.SetConfigUID(configUID) + return o +} + +// SetConfigUID adds the configUid to the v1 cloud configs aks machine pool create params +func (o *V1CloudConfigsAksMachinePoolCreateParams) SetConfigUID(configUID string) { + o.ConfigUID = configUID +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudConfigsAksMachinePoolCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param configUid + if err := r.SetPathParam("configUid", o.ConfigUID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_configs_aks_machine_pool_create_responses.go b/api/client/v1/v1_cloud_configs_aks_machine_pool_create_responses.go new file mode 100644 index 00000000..db90067d --- /dev/null +++ b/api/client/v1/v1_cloud_configs_aks_machine_pool_create_responses.go @@ -0,0 +1,77 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1CloudConfigsAksMachinePoolCreateReader is a Reader for the V1CloudConfigsAksMachinePoolCreate structure. +type V1CloudConfigsAksMachinePoolCreateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudConfigsAksMachinePoolCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 201: + result := NewV1CloudConfigsAksMachinePoolCreateCreated() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudConfigsAksMachinePoolCreateCreated creates a V1CloudConfigsAksMachinePoolCreateCreated with default headers values +func NewV1CloudConfigsAksMachinePoolCreateCreated() *V1CloudConfigsAksMachinePoolCreateCreated { + return &V1CloudConfigsAksMachinePoolCreateCreated{} +} + +/* +V1CloudConfigsAksMachinePoolCreateCreated handles this case with default header values. + +Created successfully +*/ +type V1CloudConfigsAksMachinePoolCreateCreated struct { + /*Audit uid for the request + */ + AuditUID string + + Payload *models.V1UID +} + +func (o *V1CloudConfigsAksMachinePoolCreateCreated) Error() string { + return fmt.Sprintf("[POST /v1/cloudconfigs/aks/{configUid}/machinePools][%d] v1CloudConfigsAksMachinePoolCreateCreated %+v", 201, o.Payload) +} + +func (o *V1CloudConfigsAksMachinePoolCreateCreated) GetPayload() *models.V1UID { + return o.Payload +} + +func (o *V1CloudConfigsAksMachinePoolCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header AuditUid + o.AuditUID = response.GetHeader("AuditUid") + + o.Payload = new(models.V1UID) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_cloud_configs_aks_machine_pool_delete_parameters.go b/api/client/v1/v1_cloud_configs_aks_machine_pool_delete_parameters.go new file mode 100644 index 00000000..67ec53de --- /dev/null +++ b/api/client/v1/v1_cloud_configs_aks_machine_pool_delete_parameters.go @@ -0,0 +1,157 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1CloudConfigsAksMachinePoolDeleteParams creates a new V1CloudConfigsAksMachinePoolDeleteParams object +// with the default values initialized. +func NewV1CloudConfigsAksMachinePoolDeleteParams() *V1CloudConfigsAksMachinePoolDeleteParams { + var () + return &V1CloudConfigsAksMachinePoolDeleteParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudConfigsAksMachinePoolDeleteParamsWithTimeout creates a new V1CloudConfigsAksMachinePoolDeleteParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudConfigsAksMachinePoolDeleteParamsWithTimeout(timeout time.Duration) *V1CloudConfigsAksMachinePoolDeleteParams { + var () + return &V1CloudConfigsAksMachinePoolDeleteParams{ + + timeout: timeout, + } +} + +// NewV1CloudConfigsAksMachinePoolDeleteParamsWithContext creates a new V1CloudConfigsAksMachinePoolDeleteParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudConfigsAksMachinePoolDeleteParamsWithContext(ctx context.Context) *V1CloudConfigsAksMachinePoolDeleteParams { + var () + return &V1CloudConfigsAksMachinePoolDeleteParams{ + + Context: ctx, + } +} + +// NewV1CloudConfigsAksMachinePoolDeleteParamsWithHTTPClient creates a new V1CloudConfigsAksMachinePoolDeleteParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudConfigsAksMachinePoolDeleteParamsWithHTTPClient(client *http.Client) *V1CloudConfigsAksMachinePoolDeleteParams { + var () + return &V1CloudConfigsAksMachinePoolDeleteParams{ + HTTPClient: client, + } +} + +/* +V1CloudConfigsAksMachinePoolDeleteParams contains all the parameters to send to the API endpoint +for the v1 cloud configs aks machine pool delete operation typically these are written to a http.Request +*/ +type V1CloudConfigsAksMachinePoolDeleteParams struct { + + /*ConfigUID + Cluster's cloud config uid + + */ + ConfigUID string + /*MachinePoolName + Machine pool name + + */ + MachinePoolName string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud configs aks machine pool delete params +func (o *V1CloudConfigsAksMachinePoolDeleteParams) WithTimeout(timeout time.Duration) *V1CloudConfigsAksMachinePoolDeleteParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud configs aks machine pool delete params +func (o *V1CloudConfigsAksMachinePoolDeleteParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud configs aks machine pool delete params +func (o *V1CloudConfigsAksMachinePoolDeleteParams) WithContext(ctx context.Context) *V1CloudConfigsAksMachinePoolDeleteParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud configs aks machine pool delete params +func (o *V1CloudConfigsAksMachinePoolDeleteParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud configs aks machine pool delete params +func (o *V1CloudConfigsAksMachinePoolDeleteParams) WithHTTPClient(client *http.Client) *V1CloudConfigsAksMachinePoolDeleteParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud configs aks machine pool delete params +func (o *V1CloudConfigsAksMachinePoolDeleteParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithConfigUID adds the configUID to the v1 cloud configs aks machine pool delete params +func (o *V1CloudConfigsAksMachinePoolDeleteParams) WithConfigUID(configUID string) *V1CloudConfigsAksMachinePoolDeleteParams { + o.SetConfigUID(configUID) + return o +} + +// SetConfigUID adds the configUid to the v1 cloud configs aks machine pool delete params +func (o *V1CloudConfigsAksMachinePoolDeleteParams) SetConfigUID(configUID string) { + o.ConfigUID = configUID +} + +// WithMachinePoolName adds the machinePoolName to the v1 cloud configs aks machine pool delete params +func (o *V1CloudConfigsAksMachinePoolDeleteParams) WithMachinePoolName(machinePoolName string) *V1CloudConfigsAksMachinePoolDeleteParams { + o.SetMachinePoolName(machinePoolName) + return o +} + +// SetMachinePoolName adds the machinePoolName to the v1 cloud configs aks machine pool delete params +func (o *V1CloudConfigsAksMachinePoolDeleteParams) SetMachinePoolName(machinePoolName string) { + o.MachinePoolName = machinePoolName +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudConfigsAksMachinePoolDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param configUid + if err := r.SetPathParam("configUid", o.ConfigUID); err != nil { + return err + } + + // path param machinePoolName + if err := r.SetPathParam("machinePoolName", o.MachinePoolName); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_configs_aks_machine_pool_delete_responses.go b/api/client/v1/v1_cloud_configs_aks_machine_pool_delete_responses.go new file mode 100644 index 00000000..4b9ecc4f --- /dev/null +++ b/api/client/v1/v1_cloud_configs_aks_machine_pool_delete_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1CloudConfigsAksMachinePoolDeleteReader is a Reader for the V1CloudConfigsAksMachinePoolDelete structure. +type V1CloudConfigsAksMachinePoolDeleteReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudConfigsAksMachinePoolDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1CloudConfigsAksMachinePoolDeleteNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudConfigsAksMachinePoolDeleteNoContent creates a V1CloudConfigsAksMachinePoolDeleteNoContent with default headers values +func NewV1CloudConfigsAksMachinePoolDeleteNoContent() *V1CloudConfigsAksMachinePoolDeleteNoContent { + return &V1CloudConfigsAksMachinePoolDeleteNoContent{} +} + +/* +V1CloudConfigsAksMachinePoolDeleteNoContent handles this case with default header values. + +The resource was deleted successfully +*/ +type V1CloudConfigsAksMachinePoolDeleteNoContent struct { +} + +func (o *V1CloudConfigsAksMachinePoolDeleteNoContent) Error() string { + return fmt.Sprintf("[DELETE /v1/cloudconfigs/aks/{configUid}/machinePools/{machinePoolName}][%d] v1CloudConfigsAksMachinePoolDeleteNoContent ", 204) +} + +func (o *V1CloudConfigsAksMachinePoolDeleteNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_cloud_configs_aks_machine_pool_update_parameters.go b/api/client/v1/v1_cloud_configs_aks_machine_pool_update_parameters.go new file mode 100644 index 00000000..546dbab1 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_aks_machine_pool_update_parameters.go @@ -0,0 +1,178 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1CloudConfigsAksMachinePoolUpdateParams creates a new V1CloudConfigsAksMachinePoolUpdateParams object +// with the default values initialized. +func NewV1CloudConfigsAksMachinePoolUpdateParams() *V1CloudConfigsAksMachinePoolUpdateParams { + var () + return &V1CloudConfigsAksMachinePoolUpdateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudConfigsAksMachinePoolUpdateParamsWithTimeout creates a new V1CloudConfigsAksMachinePoolUpdateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudConfigsAksMachinePoolUpdateParamsWithTimeout(timeout time.Duration) *V1CloudConfigsAksMachinePoolUpdateParams { + var () + return &V1CloudConfigsAksMachinePoolUpdateParams{ + + timeout: timeout, + } +} + +// NewV1CloudConfigsAksMachinePoolUpdateParamsWithContext creates a new V1CloudConfigsAksMachinePoolUpdateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudConfigsAksMachinePoolUpdateParamsWithContext(ctx context.Context) *V1CloudConfigsAksMachinePoolUpdateParams { + var () + return &V1CloudConfigsAksMachinePoolUpdateParams{ + + Context: ctx, + } +} + +// NewV1CloudConfigsAksMachinePoolUpdateParamsWithHTTPClient creates a new V1CloudConfigsAksMachinePoolUpdateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudConfigsAksMachinePoolUpdateParamsWithHTTPClient(client *http.Client) *V1CloudConfigsAksMachinePoolUpdateParams { + var () + return &V1CloudConfigsAksMachinePoolUpdateParams{ + HTTPClient: client, + } +} + +/* +V1CloudConfigsAksMachinePoolUpdateParams contains all the parameters to send to the API endpoint +for the v1 cloud configs aks machine pool update operation typically these are written to a http.Request +*/ +type V1CloudConfigsAksMachinePoolUpdateParams struct { + + /*Body*/ + Body *models.V1AzureMachinePoolConfigEntity + /*ConfigUID + Cluster's cloud config uid + + */ + ConfigUID string + /*MachinePoolName + Machine pool name + + */ + MachinePoolName string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud configs aks machine pool update params +func (o *V1CloudConfigsAksMachinePoolUpdateParams) WithTimeout(timeout time.Duration) *V1CloudConfigsAksMachinePoolUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud configs aks machine pool update params +func (o *V1CloudConfigsAksMachinePoolUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud configs aks machine pool update params +func (o *V1CloudConfigsAksMachinePoolUpdateParams) WithContext(ctx context.Context) *V1CloudConfigsAksMachinePoolUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud configs aks machine pool update params +func (o *V1CloudConfigsAksMachinePoolUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud configs aks machine pool update params +func (o *V1CloudConfigsAksMachinePoolUpdateParams) WithHTTPClient(client *http.Client) *V1CloudConfigsAksMachinePoolUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud configs aks machine pool update params +func (o *V1CloudConfigsAksMachinePoolUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 cloud configs aks machine pool update params +func (o *V1CloudConfigsAksMachinePoolUpdateParams) WithBody(body *models.V1AzureMachinePoolConfigEntity) *V1CloudConfigsAksMachinePoolUpdateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 cloud configs aks machine pool update params +func (o *V1CloudConfigsAksMachinePoolUpdateParams) SetBody(body *models.V1AzureMachinePoolConfigEntity) { + o.Body = body +} + +// WithConfigUID adds the configUID to the v1 cloud configs aks machine pool update params +func (o *V1CloudConfigsAksMachinePoolUpdateParams) WithConfigUID(configUID string) *V1CloudConfigsAksMachinePoolUpdateParams { + o.SetConfigUID(configUID) + return o +} + +// SetConfigUID adds the configUid to the v1 cloud configs aks machine pool update params +func (o *V1CloudConfigsAksMachinePoolUpdateParams) SetConfigUID(configUID string) { + o.ConfigUID = configUID +} + +// WithMachinePoolName adds the machinePoolName to the v1 cloud configs aks machine pool update params +func (o *V1CloudConfigsAksMachinePoolUpdateParams) WithMachinePoolName(machinePoolName string) *V1CloudConfigsAksMachinePoolUpdateParams { + o.SetMachinePoolName(machinePoolName) + return o +} + +// SetMachinePoolName adds the machinePoolName to the v1 cloud configs aks machine pool update params +func (o *V1CloudConfigsAksMachinePoolUpdateParams) SetMachinePoolName(machinePoolName string) { + o.MachinePoolName = machinePoolName +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudConfigsAksMachinePoolUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param configUid + if err := r.SetPathParam("configUid", o.ConfigUID); err != nil { + return err + } + + // path param machinePoolName + if err := r.SetPathParam("machinePoolName", o.MachinePoolName); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_configs_aks_machine_pool_update_responses.go b/api/client/v1/v1_cloud_configs_aks_machine_pool_update_responses.go new file mode 100644 index 00000000..a43dd315 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_aks_machine_pool_update_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1CloudConfigsAksMachinePoolUpdateReader is a Reader for the V1CloudConfigsAksMachinePoolUpdate structure. +type V1CloudConfigsAksMachinePoolUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudConfigsAksMachinePoolUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1CloudConfigsAksMachinePoolUpdateNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudConfigsAksMachinePoolUpdateNoContent creates a V1CloudConfigsAksMachinePoolUpdateNoContent with default headers values +func NewV1CloudConfigsAksMachinePoolUpdateNoContent() *V1CloudConfigsAksMachinePoolUpdateNoContent { + return &V1CloudConfigsAksMachinePoolUpdateNoContent{} +} + +/* +V1CloudConfigsAksMachinePoolUpdateNoContent handles this case with default header values. + +The resource was updated successfully +*/ +type V1CloudConfigsAksMachinePoolUpdateNoContent struct { +} + +func (o *V1CloudConfigsAksMachinePoolUpdateNoContent) Error() string { + return fmt.Sprintf("[PUT /v1/cloudconfigs/aks/{configUid}/machinePools/{machinePoolName}][%d] v1CloudConfigsAksMachinePoolUpdateNoContent ", 204) +} + +func (o *V1CloudConfigsAksMachinePoolUpdateNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_cloud_configs_aks_pool_machines_add_parameters.go b/api/client/v1/v1_cloud_configs_aks_pool_machines_add_parameters.go new file mode 100644 index 00000000..64b66dd7 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_aks_pool_machines_add_parameters.go @@ -0,0 +1,178 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1CloudConfigsAksPoolMachinesAddParams creates a new V1CloudConfigsAksPoolMachinesAddParams object +// with the default values initialized. +func NewV1CloudConfigsAksPoolMachinesAddParams() *V1CloudConfigsAksPoolMachinesAddParams { + var () + return &V1CloudConfigsAksPoolMachinesAddParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudConfigsAksPoolMachinesAddParamsWithTimeout creates a new V1CloudConfigsAksPoolMachinesAddParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudConfigsAksPoolMachinesAddParamsWithTimeout(timeout time.Duration) *V1CloudConfigsAksPoolMachinesAddParams { + var () + return &V1CloudConfigsAksPoolMachinesAddParams{ + + timeout: timeout, + } +} + +// NewV1CloudConfigsAksPoolMachinesAddParamsWithContext creates a new V1CloudConfigsAksPoolMachinesAddParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudConfigsAksPoolMachinesAddParamsWithContext(ctx context.Context) *V1CloudConfigsAksPoolMachinesAddParams { + var () + return &V1CloudConfigsAksPoolMachinesAddParams{ + + Context: ctx, + } +} + +// NewV1CloudConfigsAksPoolMachinesAddParamsWithHTTPClient creates a new V1CloudConfigsAksPoolMachinesAddParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudConfigsAksPoolMachinesAddParamsWithHTTPClient(client *http.Client) *V1CloudConfigsAksPoolMachinesAddParams { + var () + return &V1CloudConfigsAksPoolMachinesAddParams{ + HTTPClient: client, + } +} + +/* +V1CloudConfigsAksPoolMachinesAddParams contains all the parameters to send to the API endpoint +for the v1 cloud configs aks pool machines add operation typically these are written to a http.Request +*/ +type V1CloudConfigsAksPoolMachinesAddParams struct { + + /*Body*/ + Body *models.V1AzureMachine + /*ConfigUID + Cluster's cloud config uid + + */ + ConfigUID string + /*MachinePoolName + Machine pool name + + */ + MachinePoolName string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud configs aks pool machines add params +func (o *V1CloudConfigsAksPoolMachinesAddParams) WithTimeout(timeout time.Duration) *V1CloudConfigsAksPoolMachinesAddParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud configs aks pool machines add params +func (o *V1CloudConfigsAksPoolMachinesAddParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud configs aks pool machines add params +func (o *V1CloudConfigsAksPoolMachinesAddParams) WithContext(ctx context.Context) *V1CloudConfigsAksPoolMachinesAddParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud configs aks pool machines add params +func (o *V1CloudConfigsAksPoolMachinesAddParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud configs aks pool machines add params +func (o *V1CloudConfigsAksPoolMachinesAddParams) WithHTTPClient(client *http.Client) *V1CloudConfigsAksPoolMachinesAddParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud configs aks pool machines add params +func (o *V1CloudConfigsAksPoolMachinesAddParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 cloud configs aks pool machines add params +func (o *V1CloudConfigsAksPoolMachinesAddParams) WithBody(body *models.V1AzureMachine) *V1CloudConfigsAksPoolMachinesAddParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 cloud configs aks pool machines add params +func (o *V1CloudConfigsAksPoolMachinesAddParams) SetBody(body *models.V1AzureMachine) { + o.Body = body +} + +// WithConfigUID adds the configUID to the v1 cloud configs aks pool machines add params +func (o *V1CloudConfigsAksPoolMachinesAddParams) WithConfigUID(configUID string) *V1CloudConfigsAksPoolMachinesAddParams { + o.SetConfigUID(configUID) + return o +} + +// SetConfigUID adds the configUid to the v1 cloud configs aks pool machines add params +func (o *V1CloudConfigsAksPoolMachinesAddParams) SetConfigUID(configUID string) { + o.ConfigUID = configUID +} + +// WithMachinePoolName adds the machinePoolName to the v1 cloud configs aks pool machines add params +func (o *V1CloudConfigsAksPoolMachinesAddParams) WithMachinePoolName(machinePoolName string) *V1CloudConfigsAksPoolMachinesAddParams { + o.SetMachinePoolName(machinePoolName) + return o +} + +// SetMachinePoolName adds the machinePoolName to the v1 cloud configs aks pool machines add params +func (o *V1CloudConfigsAksPoolMachinesAddParams) SetMachinePoolName(machinePoolName string) { + o.MachinePoolName = machinePoolName +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudConfigsAksPoolMachinesAddParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param configUid + if err := r.SetPathParam("configUid", o.ConfigUID); err != nil { + return err + } + + // path param machinePoolName + if err := r.SetPathParam("machinePoolName", o.MachinePoolName); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_configs_aks_pool_machines_add_responses.go b/api/client/v1/v1_cloud_configs_aks_pool_machines_add_responses.go new file mode 100644 index 00000000..7c708be8 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_aks_pool_machines_add_responses.go @@ -0,0 +1,77 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1CloudConfigsAksPoolMachinesAddReader is a Reader for the V1CloudConfigsAksPoolMachinesAdd structure. +type V1CloudConfigsAksPoolMachinesAddReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudConfigsAksPoolMachinesAddReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 201: + result := NewV1CloudConfigsAksPoolMachinesAddCreated() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudConfigsAksPoolMachinesAddCreated creates a V1CloudConfigsAksPoolMachinesAddCreated with default headers values +func NewV1CloudConfigsAksPoolMachinesAddCreated() *V1CloudConfigsAksPoolMachinesAddCreated { + return &V1CloudConfigsAksPoolMachinesAddCreated{} +} + +/* +V1CloudConfigsAksPoolMachinesAddCreated handles this case with default header values. + +Created successfully +*/ +type V1CloudConfigsAksPoolMachinesAddCreated struct { + /*Audit uid for the request + */ + AuditUID string + + Payload *models.V1UID +} + +func (o *V1CloudConfigsAksPoolMachinesAddCreated) Error() string { + return fmt.Sprintf("[POST /v1/cloudconfigs/aks/{configUid}/machinePools/{machinePoolName}/machines][%d] v1CloudConfigsAksPoolMachinesAddCreated %+v", 201, o.Payload) +} + +func (o *V1CloudConfigsAksPoolMachinesAddCreated) GetPayload() *models.V1UID { + return o.Payload +} + +func (o *V1CloudConfigsAksPoolMachinesAddCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header AuditUid + o.AuditUID = response.GetHeader("AuditUid") + + o.Payload = new(models.V1UID) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_cloud_configs_aks_pool_machines_list_parameters.go b/api/client/v1/v1_cloud_configs_aks_pool_machines_list_parameters.go new file mode 100644 index 00000000..c5d8f62d --- /dev/null +++ b/api/client/v1/v1_cloud_configs_aks_pool_machines_list_parameters.go @@ -0,0 +1,365 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// NewV1CloudConfigsAksPoolMachinesListParams creates a new V1CloudConfigsAksPoolMachinesListParams object +// with the default values initialized. +func NewV1CloudConfigsAksPoolMachinesListParams() *V1CloudConfigsAksPoolMachinesListParams { + var ( + limitDefault = int64(50) + ) + return &V1CloudConfigsAksPoolMachinesListParams{ + Limit: &limitDefault, + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudConfigsAksPoolMachinesListParamsWithTimeout creates a new V1CloudConfigsAksPoolMachinesListParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudConfigsAksPoolMachinesListParamsWithTimeout(timeout time.Duration) *V1CloudConfigsAksPoolMachinesListParams { + var ( + limitDefault = int64(50) + ) + return &V1CloudConfigsAksPoolMachinesListParams{ + Limit: &limitDefault, + + timeout: timeout, + } +} + +// NewV1CloudConfigsAksPoolMachinesListParamsWithContext creates a new V1CloudConfigsAksPoolMachinesListParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudConfigsAksPoolMachinesListParamsWithContext(ctx context.Context) *V1CloudConfigsAksPoolMachinesListParams { + var ( + limitDefault = int64(50) + ) + return &V1CloudConfigsAksPoolMachinesListParams{ + Limit: &limitDefault, + + Context: ctx, + } +} + +// NewV1CloudConfigsAksPoolMachinesListParamsWithHTTPClient creates a new V1CloudConfigsAksPoolMachinesListParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudConfigsAksPoolMachinesListParamsWithHTTPClient(client *http.Client) *V1CloudConfigsAksPoolMachinesListParams { + var ( + limitDefault = int64(50) + ) + return &V1CloudConfigsAksPoolMachinesListParams{ + Limit: &limitDefault, + HTTPClient: client, + } +} + +/* +V1CloudConfigsAksPoolMachinesListParams contains all the parameters to send to the API endpoint +for the v1 cloud configs aks pool machines list operation typically these are written to a http.Request +*/ +type V1CloudConfigsAksPoolMachinesListParams struct { + + /*ConfigUID + Cluster's cloud config uid + + */ + ConfigUID string + /*Continue + continue token to paginate the subsequent data items + + */ + Continue *string + /*Fields + Set of fields to be presented in the response with values. The fields are comma separated. Eg: metadata.uid,metadata.name + + */ + Fields *string + /*Filters + Filters can be combined with AND, OR operators with field path name. Eg: metadata.name=TestServiceANDspec.cloudType=aws + + Server will be restricted to certain fields based on the indexed data for each resource. + + */ + Filters *string + /*Limit + limit is a maximum number of responses to return for a list call. Default and maximum value of the limit is 50. + If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. + + */ + Limit *int64 + /*MachinePoolName + Machine pool name + + */ + MachinePoolName string + /*Offset + offset is the next index number from which the response will start. The response offset value can be used along with continue token for the pagination. + + */ + Offset *int64 + /*OrderBy + Specify the fields with sort order. 1 indicates ascending and -1 for descending. Eg: orderBy=metadata.name=1,metadata.uid=-1 + + */ + OrderBy *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud configs aks pool machines list params +func (o *V1CloudConfigsAksPoolMachinesListParams) WithTimeout(timeout time.Duration) *V1CloudConfigsAksPoolMachinesListParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud configs aks pool machines list params +func (o *V1CloudConfigsAksPoolMachinesListParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud configs aks pool machines list params +func (o *V1CloudConfigsAksPoolMachinesListParams) WithContext(ctx context.Context) *V1CloudConfigsAksPoolMachinesListParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud configs aks pool machines list params +func (o *V1CloudConfigsAksPoolMachinesListParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud configs aks pool machines list params +func (o *V1CloudConfigsAksPoolMachinesListParams) WithHTTPClient(client *http.Client) *V1CloudConfigsAksPoolMachinesListParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud configs aks pool machines list params +func (o *V1CloudConfigsAksPoolMachinesListParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithConfigUID adds the configUID to the v1 cloud configs aks pool machines list params +func (o *V1CloudConfigsAksPoolMachinesListParams) WithConfigUID(configUID string) *V1CloudConfigsAksPoolMachinesListParams { + o.SetConfigUID(configUID) + return o +} + +// SetConfigUID adds the configUid to the v1 cloud configs aks pool machines list params +func (o *V1CloudConfigsAksPoolMachinesListParams) SetConfigUID(configUID string) { + o.ConfigUID = configUID +} + +// WithContinue adds the continueVar to the v1 cloud configs aks pool machines list params +func (o *V1CloudConfigsAksPoolMachinesListParams) WithContinue(continueVar *string) *V1CloudConfigsAksPoolMachinesListParams { + o.SetContinue(continueVar) + return o +} + +// SetContinue adds the continue to the v1 cloud configs aks pool machines list params +func (o *V1CloudConfigsAksPoolMachinesListParams) SetContinue(continueVar *string) { + o.Continue = continueVar +} + +// WithFields adds the fields to the v1 cloud configs aks pool machines list params +func (o *V1CloudConfigsAksPoolMachinesListParams) WithFields(fields *string) *V1CloudConfigsAksPoolMachinesListParams { + o.SetFields(fields) + return o +} + +// SetFields adds the fields to the v1 cloud configs aks pool machines list params +func (o *V1CloudConfigsAksPoolMachinesListParams) SetFields(fields *string) { + o.Fields = fields +} + +// WithFilters adds the filters to the v1 cloud configs aks pool machines list params +func (o *V1CloudConfigsAksPoolMachinesListParams) WithFilters(filters *string) *V1CloudConfigsAksPoolMachinesListParams { + o.SetFilters(filters) + return o +} + +// SetFilters adds the filters to the v1 cloud configs aks pool machines list params +func (o *V1CloudConfigsAksPoolMachinesListParams) SetFilters(filters *string) { + o.Filters = filters +} + +// WithLimit adds the limit to the v1 cloud configs aks pool machines list params +func (o *V1CloudConfigsAksPoolMachinesListParams) WithLimit(limit *int64) *V1CloudConfigsAksPoolMachinesListParams { + o.SetLimit(limit) + return o +} + +// SetLimit adds the limit to the v1 cloud configs aks pool machines list params +func (o *V1CloudConfigsAksPoolMachinesListParams) SetLimit(limit *int64) { + o.Limit = limit +} + +// WithMachinePoolName adds the machinePoolName to the v1 cloud configs aks pool machines list params +func (o *V1CloudConfigsAksPoolMachinesListParams) WithMachinePoolName(machinePoolName string) *V1CloudConfigsAksPoolMachinesListParams { + o.SetMachinePoolName(machinePoolName) + return o +} + +// SetMachinePoolName adds the machinePoolName to the v1 cloud configs aks pool machines list params +func (o *V1CloudConfigsAksPoolMachinesListParams) SetMachinePoolName(machinePoolName string) { + o.MachinePoolName = machinePoolName +} + +// WithOffset adds the offset to the v1 cloud configs aks pool machines list params +func (o *V1CloudConfigsAksPoolMachinesListParams) WithOffset(offset *int64) *V1CloudConfigsAksPoolMachinesListParams { + o.SetOffset(offset) + return o +} + +// SetOffset adds the offset to the v1 cloud configs aks pool machines list params +func (o *V1CloudConfigsAksPoolMachinesListParams) SetOffset(offset *int64) { + o.Offset = offset +} + +// WithOrderBy adds the orderBy to the v1 cloud configs aks pool machines list params +func (o *V1CloudConfigsAksPoolMachinesListParams) WithOrderBy(orderBy *string) *V1CloudConfigsAksPoolMachinesListParams { + o.SetOrderBy(orderBy) + return o +} + +// SetOrderBy adds the orderBy to the v1 cloud configs aks pool machines list params +func (o *V1CloudConfigsAksPoolMachinesListParams) SetOrderBy(orderBy *string) { + o.OrderBy = orderBy +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudConfigsAksPoolMachinesListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param configUid + if err := r.SetPathParam("configUid", o.ConfigUID); err != nil { + return err + } + + if o.Continue != nil { + + // query param continue + var qrContinue string + if o.Continue != nil { + qrContinue = *o.Continue + } + qContinue := qrContinue + if qContinue != "" { + if err := r.SetQueryParam("continue", qContinue); err != nil { + return err + } + } + + } + + if o.Fields != nil { + + // query param fields + var qrFields string + if o.Fields != nil { + qrFields = *o.Fields + } + qFields := qrFields + if qFields != "" { + if err := r.SetQueryParam("fields", qFields); err != nil { + return err + } + } + + } + + if o.Filters != nil { + + // query param filters + var qrFilters string + if o.Filters != nil { + qrFilters = *o.Filters + } + qFilters := qrFilters + if qFilters != "" { + if err := r.SetQueryParam("filters", qFilters); err != nil { + return err + } + } + + } + + if o.Limit != nil { + + // query param limit + var qrLimit int64 + if o.Limit != nil { + qrLimit = *o.Limit + } + qLimit := swag.FormatInt64(qrLimit) + if qLimit != "" { + if err := r.SetQueryParam("limit", qLimit); err != nil { + return err + } + } + + } + + // path param machinePoolName + if err := r.SetPathParam("machinePoolName", o.MachinePoolName); err != nil { + return err + } + + if o.Offset != nil { + + // query param offset + var qrOffset int64 + if o.Offset != nil { + qrOffset = *o.Offset + } + qOffset := swag.FormatInt64(qrOffset) + if qOffset != "" { + if err := r.SetQueryParam("offset", qOffset); err != nil { + return err + } + } + + } + + if o.OrderBy != nil { + + // query param orderBy + var qrOrderBy string + if o.OrderBy != nil { + qrOrderBy = *o.OrderBy + } + qOrderBy := qrOrderBy + if qOrderBy != "" { + if err := r.SetQueryParam("orderBy", qOrderBy); err != nil { + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_configs_aks_pool_machines_list_responses.go b/api/client/v1/v1_cloud_configs_aks_pool_machines_list_responses.go new file mode 100644 index 00000000..58a9ba1e --- /dev/null +++ b/api/client/v1/v1_cloud_configs_aks_pool_machines_list_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1CloudConfigsAksPoolMachinesListReader is a Reader for the V1CloudConfigsAksPoolMachinesList structure. +type V1CloudConfigsAksPoolMachinesListReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudConfigsAksPoolMachinesListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1CloudConfigsAksPoolMachinesListOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudConfigsAksPoolMachinesListOK creates a V1CloudConfigsAksPoolMachinesListOK with default headers values +func NewV1CloudConfigsAksPoolMachinesListOK() *V1CloudConfigsAksPoolMachinesListOK { + return &V1CloudConfigsAksPoolMachinesListOK{} +} + +/* +V1CloudConfigsAksPoolMachinesListOK handles this case with default header values. + +An array of AKS machine items +*/ +type V1CloudConfigsAksPoolMachinesListOK struct { + Payload *models.V1AzureMachines +} + +func (o *V1CloudConfigsAksPoolMachinesListOK) Error() string { + return fmt.Sprintf("[GET /v1/cloudconfigs/aks/{configUid}/machinePools/{machinePoolName}/machines][%d] v1CloudConfigsAksPoolMachinesListOK %+v", 200, o.Payload) +} + +func (o *V1CloudConfigsAksPoolMachinesListOK) GetPayload() *models.V1AzureMachines { + return o.Payload +} + +func (o *V1CloudConfigsAksPoolMachinesListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1AzureMachines) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_cloud_configs_aks_pool_machines_uid_delete_parameters.go b/api/client/v1/v1_cloud_configs_aks_pool_machines_uid_delete_parameters.go new file mode 100644 index 00000000..6515679e --- /dev/null +++ b/api/client/v1/v1_cloud_configs_aks_pool_machines_uid_delete_parameters.go @@ -0,0 +1,178 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1CloudConfigsAksPoolMachinesUIDDeleteParams creates a new V1CloudConfigsAksPoolMachinesUIDDeleteParams object +// with the default values initialized. +func NewV1CloudConfigsAksPoolMachinesUIDDeleteParams() *V1CloudConfigsAksPoolMachinesUIDDeleteParams { + var () + return &V1CloudConfigsAksPoolMachinesUIDDeleteParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudConfigsAksPoolMachinesUIDDeleteParamsWithTimeout creates a new V1CloudConfigsAksPoolMachinesUIDDeleteParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudConfigsAksPoolMachinesUIDDeleteParamsWithTimeout(timeout time.Duration) *V1CloudConfigsAksPoolMachinesUIDDeleteParams { + var () + return &V1CloudConfigsAksPoolMachinesUIDDeleteParams{ + + timeout: timeout, + } +} + +// NewV1CloudConfigsAksPoolMachinesUIDDeleteParamsWithContext creates a new V1CloudConfigsAksPoolMachinesUIDDeleteParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudConfigsAksPoolMachinesUIDDeleteParamsWithContext(ctx context.Context) *V1CloudConfigsAksPoolMachinesUIDDeleteParams { + var () + return &V1CloudConfigsAksPoolMachinesUIDDeleteParams{ + + Context: ctx, + } +} + +// NewV1CloudConfigsAksPoolMachinesUIDDeleteParamsWithHTTPClient creates a new V1CloudConfigsAksPoolMachinesUIDDeleteParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudConfigsAksPoolMachinesUIDDeleteParamsWithHTTPClient(client *http.Client) *V1CloudConfigsAksPoolMachinesUIDDeleteParams { + var () + return &V1CloudConfigsAksPoolMachinesUIDDeleteParams{ + HTTPClient: client, + } +} + +/* +V1CloudConfigsAksPoolMachinesUIDDeleteParams contains all the parameters to send to the API endpoint +for the v1 cloud configs aks pool machines Uid delete operation typically these are written to a http.Request +*/ +type V1CloudConfigsAksPoolMachinesUIDDeleteParams struct { + + /*ConfigUID + Cluster's cloud config uid + + */ + ConfigUID string + /*MachinePoolName + Machine pool name + + */ + MachinePoolName string + /*MachineUID + Machine uid + + */ + MachineUID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud configs aks pool machines Uid delete params +func (o *V1CloudConfigsAksPoolMachinesUIDDeleteParams) WithTimeout(timeout time.Duration) *V1CloudConfigsAksPoolMachinesUIDDeleteParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud configs aks pool machines Uid delete params +func (o *V1CloudConfigsAksPoolMachinesUIDDeleteParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud configs aks pool machines Uid delete params +func (o *V1CloudConfigsAksPoolMachinesUIDDeleteParams) WithContext(ctx context.Context) *V1CloudConfigsAksPoolMachinesUIDDeleteParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud configs aks pool machines Uid delete params +func (o *V1CloudConfigsAksPoolMachinesUIDDeleteParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud configs aks pool machines Uid delete params +func (o *V1CloudConfigsAksPoolMachinesUIDDeleteParams) WithHTTPClient(client *http.Client) *V1CloudConfigsAksPoolMachinesUIDDeleteParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud configs aks pool machines Uid delete params +func (o *V1CloudConfigsAksPoolMachinesUIDDeleteParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithConfigUID adds the configUID to the v1 cloud configs aks pool machines Uid delete params +func (o *V1CloudConfigsAksPoolMachinesUIDDeleteParams) WithConfigUID(configUID string) *V1CloudConfigsAksPoolMachinesUIDDeleteParams { + o.SetConfigUID(configUID) + return o +} + +// SetConfigUID adds the configUid to the v1 cloud configs aks pool machines Uid delete params +func (o *V1CloudConfigsAksPoolMachinesUIDDeleteParams) SetConfigUID(configUID string) { + o.ConfigUID = configUID +} + +// WithMachinePoolName adds the machinePoolName to the v1 cloud configs aks pool machines Uid delete params +func (o *V1CloudConfigsAksPoolMachinesUIDDeleteParams) WithMachinePoolName(machinePoolName string) *V1CloudConfigsAksPoolMachinesUIDDeleteParams { + o.SetMachinePoolName(machinePoolName) + return o +} + +// SetMachinePoolName adds the machinePoolName to the v1 cloud configs aks pool machines Uid delete params +func (o *V1CloudConfigsAksPoolMachinesUIDDeleteParams) SetMachinePoolName(machinePoolName string) { + o.MachinePoolName = machinePoolName +} + +// WithMachineUID adds the machineUID to the v1 cloud configs aks pool machines Uid delete params +func (o *V1CloudConfigsAksPoolMachinesUIDDeleteParams) WithMachineUID(machineUID string) *V1CloudConfigsAksPoolMachinesUIDDeleteParams { + o.SetMachineUID(machineUID) + return o +} + +// SetMachineUID adds the machineUid to the v1 cloud configs aks pool machines Uid delete params +func (o *V1CloudConfigsAksPoolMachinesUIDDeleteParams) SetMachineUID(machineUID string) { + o.MachineUID = machineUID +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudConfigsAksPoolMachinesUIDDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param configUid + if err := r.SetPathParam("configUid", o.ConfigUID); err != nil { + return err + } + + // path param machinePoolName + if err := r.SetPathParam("machinePoolName", o.MachinePoolName); err != nil { + return err + } + + // path param machineUid + if err := r.SetPathParam("machineUid", o.MachineUID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_configs_aks_pool_machines_uid_delete_responses.go b/api/client/v1/v1_cloud_configs_aks_pool_machines_uid_delete_responses.go new file mode 100644 index 00000000..4d6e1c6f --- /dev/null +++ b/api/client/v1/v1_cloud_configs_aks_pool_machines_uid_delete_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1CloudConfigsAksPoolMachinesUIDDeleteReader is a Reader for the V1CloudConfigsAksPoolMachinesUIDDelete structure. +type V1CloudConfigsAksPoolMachinesUIDDeleteReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudConfigsAksPoolMachinesUIDDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1CloudConfigsAksPoolMachinesUIDDeleteNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudConfigsAksPoolMachinesUIDDeleteNoContent creates a V1CloudConfigsAksPoolMachinesUIDDeleteNoContent with default headers values +func NewV1CloudConfigsAksPoolMachinesUIDDeleteNoContent() *V1CloudConfigsAksPoolMachinesUIDDeleteNoContent { + return &V1CloudConfigsAksPoolMachinesUIDDeleteNoContent{} +} + +/* +V1CloudConfigsAksPoolMachinesUIDDeleteNoContent handles this case with default header values. + +The resource was deleted successfully +*/ +type V1CloudConfigsAksPoolMachinesUIDDeleteNoContent struct { +} + +func (o *V1CloudConfigsAksPoolMachinesUIDDeleteNoContent) Error() string { + return fmt.Sprintf("[DELETE /v1/cloudconfigs/aks/{configUid}/machinePools/{machinePoolName}/machines/{machineUid}][%d] v1CloudConfigsAksPoolMachinesUidDeleteNoContent ", 204) +} + +func (o *V1CloudConfigsAksPoolMachinesUIDDeleteNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_cloud_configs_aks_pool_machines_uid_get_parameters.go b/api/client/v1/v1_cloud_configs_aks_pool_machines_uid_get_parameters.go new file mode 100644 index 00000000..d8d39a4c --- /dev/null +++ b/api/client/v1/v1_cloud_configs_aks_pool_machines_uid_get_parameters.go @@ -0,0 +1,178 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1CloudConfigsAksPoolMachinesUIDGetParams creates a new V1CloudConfigsAksPoolMachinesUIDGetParams object +// with the default values initialized. +func NewV1CloudConfigsAksPoolMachinesUIDGetParams() *V1CloudConfigsAksPoolMachinesUIDGetParams { + var () + return &V1CloudConfigsAksPoolMachinesUIDGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudConfigsAksPoolMachinesUIDGetParamsWithTimeout creates a new V1CloudConfigsAksPoolMachinesUIDGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudConfigsAksPoolMachinesUIDGetParamsWithTimeout(timeout time.Duration) *V1CloudConfigsAksPoolMachinesUIDGetParams { + var () + return &V1CloudConfigsAksPoolMachinesUIDGetParams{ + + timeout: timeout, + } +} + +// NewV1CloudConfigsAksPoolMachinesUIDGetParamsWithContext creates a new V1CloudConfigsAksPoolMachinesUIDGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudConfigsAksPoolMachinesUIDGetParamsWithContext(ctx context.Context) *V1CloudConfigsAksPoolMachinesUIDGetParams { + var () + return &V1CloudConfigsAksPoolMachinesUIDGetParams{ + + Context: ctx, + } +} + +// NewV1CloudConfigsAksPoolMachinesUIDGetParamsWithHTTPClient creates a new V1CloudConfigsAksPoolMachinesUIDGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudConfigsAksPoolMachinesUIDGetParamsWithHTTPClient(client *http.Client) *V1CloudConfigsAksPoolMachinesUIDGetParams { + var () + return &V1CloudConfigsAksPoolMachinesUIDGetParams{ + HTTPClient: client, + } +} + +/* +V1CloudConfigsAksPoolMachinesUIDGetParams contains all the parameters to send to the API endpoint +for the v1 cloud configs aks pool machines Uid get operation typically these are written to a http.Request +*/ +type V1CloudConfigsAksPoolMachinesUIDGetParams struct { + + /*ConfigUID + Cluster's cloud config uid + + */ + ConfigUID string + /*MachinePoolName + Machine pool name + + */ + MachinePoolName string + /*MachineUID + Machine uid + + */ + MachineUID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud configs aks pool machines Uid get params +func (o *V1CloudConfigsAksPoolMachinesUIDGetParams) WithTimeout(timeout time.Duration) *V1CloudConfigsAksPoolMachinesUIDGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud configs aks pool machines Uid get params +func (o *V1CloudConfigsAksPoolMachinesUIDGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud configs aks pool machines Uid get params +func (o *V1CloudConfigsAksPoolMachinesUIDGetParams) WithContext(ctx context.Context) *V1CloudConfigsAksPoolMachinesUIDGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud configs aks pool machines Uid get params +func (o *V1CloudConfigsAksPoolMachinesUIDGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud configs aks pool machines Uid get params +func (o *V1CloudConfigsAksPoolMachinesUIDGetParams) WithHTTPClient(client *http.Client) *V1CloudConfigsAksPoolMachinesUIDGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud configs aks pool machines Uid get params +func (o *V1CloudConfigsAksPoolMachinesUIDGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithConfigUID adds the configUID to the v1 cloud configs aks pool machines Uid get params +func (o *V1CloudConfigsAksPoolMachinesUIDGetParams) WithConfigUID(configUID string) *V1CloudConfigsAksPoolMachinesUIDGetParams { + o.SetConfigUID(configUID) + return o +} + +// SetConfigUID adds the configUid to the v1 cloud configs aks pool machines Uid get params +func (o *V1CloudConfigsAksPoolMachinesUIDGetParams) SetConfigUID(configUID string) { + o.ConfigUID = configUID +} + +// WithMachinePoolName adds the machinePoolName to the v1 cloud configs aks pool machines Uid get params +func (o *V1CloudConfigsAksPoolMachinesUIDGetParams) WithMachinePoolName(machinePoolName string) *V1CloudConfigsAksPoolMachinesUIDGetParams { + o.SetMachinePoolName(machinePoolName) + return o +} + +// SetMachinePoolName adds the machinePoolName to the v1 cloud configs aks pool machines Uid get params +func (o *V1CloudConfigsAksPoolMachinesUIDGetParams) SetMachinePoolName(machinePoolName string) { + o.MachinePoolName = machinePoolName +} + +// WithMachineUID adds the machineUID to the v1 cloud configs aks pool machines Uid get params +func (o *V1CloudConfigsAksPoolMachinesUIDGetParams) WithMachineUID(machineUID string) *V1CloudConfigsAksPoolMachinesUIDGetParams { + o.SetMachineUID(machineUID) + return o +} + +// SetMachineUID adds the machineUid to the v1 cloud configs aks pool machines Uid get params +func (o *V1CloudConfigsAksPoolMachinesUIDGetParams) SetMachineUID(machineUID string) { + o.MachineUID = machineUID +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudConfigsAksPoolMachinesUIDGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param configUid + if err := r.SetPathParam("configUid", o.ConfigUID); err != nil { + return err + } + + // path param machinePoolName + if err := r.SetPathParam("machinePoolName", o.MachinePoolName); err != nil { + return err + } + + // path param machineUid + if err := r.SetPathParam("machineUid", o.MachineUID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_configs_aks_pool_machines_uid_get_responses.go b/api/client/v1/v1_cloud_configs_aks_pool_machines_uid_get_responses.go new file mode 100644 index 00000000..29431650 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_aks_pool_machines_uid_get_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1CloudConfigsAksPoolMachinesUIDGetReader is a Reader for the V1CloudConfigsAksPoolMachinesUIDGet structure. +type V1CloudConfigsAksPoolMachinesUIDGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudConfigsAksPoolMachinesUIDGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1CloudConfigsAksPoolMachinesUIDGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudConfigsAksPoolMachinesUIDGetOK creates a V1CloudConfigsAksPoolMachinesUIDGetOK with default headers values +func NewV1CloudConfigsAksPoolMachinesUIDGetOK() *V1CloudConfigsAksPoolMachinesUIDGetOK { + return &V1CloudConfigsAksPoolMachinesUIDGetOK{} +} + +/* +V1CloudConfigsAksPoolMachinesUIDGetOK handles this case with default header values. + +OK +*/ +type V1CloudConfigsAksPoolMachinesUIDGetOK struct { + Payload *models.V1AzureMachine +} + +func (o *V1CloudConfigsAksPoolMachinesUIDGetOK) Error() string { + return fmt.Sprintf("[GET /v1/cloudconfigs/aks/{configUid}/machinePools/{machinePoolName}/machines/{machineUid}][%d] v1CloudConfigsAksPoolMachinesUidGetOK %+v", 200, o.Payload) +} + +func (o *V1CloudConfigsAksPoolMachinesUIDGetOK) GetPayload() *models.V1AzureMachine { + return o.Payload +} + +func (o *V1CloudConfigsAksPoolMachinesUIDGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1AzureMachine) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_cloud_configs_aks_pool_machines_uid_update_parameters.go b/api/client/v1/v1_cloud_configs_aks_pool_machines_uid_update_parameters.go new file mode 100644 index 00000000..b6b6b0a9 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_aks_pool_machines_uid_update_parameters.go @@ -0,0 +1,199 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1CloudConfigsAksPoolMachinesUIDUpdateParams creates a new V1CloudConfigsAksPoolMachinesUIDUpdateParams object +// with the default values initialized. +func NewV1CloudConfigsAksPoolMachinesUIDUpdateParams() *V1CloudConfigsAksPoolMachinesUIDUpdateParams { + var () + return &V1CloudConfigsAksPoolMachinesUIDUpdateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudConfigsAksPoolMachinesUIDUpdateParamsWithTimeout creates a new V1CloudConfigsAksPoolMachinesUIDUpdateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudConfigsAksPoolMachinesUIDUpdateParamsWithTimeout(timeout time.Duration) *V1CloudConfigsAksPoolMachinesUIDUpdateParams { + var () + return &V1CloudConfigsAksPoolMachinesUIDUpdateParams{ + + timeout: timeout, + } +} + +// NewV1CloudConfigsAksPoolMachinesUIDUpdateParamsWithContext creates a new V1CloudConfigsAksPoolMachinesUIDUpdateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudConfigsAksPoolMachinesUIDUpdateParamsWithContext(ctx context.Context) *V1CloudConfigsAksPoolMachinesUIDUpdateParams { + var () + return &V1CloudConfigsAksPoolMachinesUIDUpdateParams{ + + Context: ctx, + } +} + +// NewV1CloudConfigsAksPoolMachinesUIDUpdateParamsWithHTTPClient creates a new V1CloudConfigsAksPoolMachinesUIDUpdateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudConfigsAksPoolMachinesUIDUpdateParamsWithHTTPClient(client *http.Client) *V1CloudConfigsAksPoolMachinesUIDUpdateParams { + var () + return &V1CloudConfigsAksPoolMachinesUIDUpdateParams{ + HTTPClient: client, + } +} + +/* +V1CloudConfigsAksPoolMachinesUIDUpdateParams contains all the parameters to send to the API endpoint +for the v1 cloud configs aks pool machines Uid update operation typically these are written to a http.Request +*/ +type V1CloudConfigsAksPoolMachinesUIDUpdateParams struct { + + /*Body*/ + Body *models.V1AzureMachine + /*ConfigUID + Cluster's cloud config uid + + */ + ConfigUID string + /*MachinePoolName + Machine pool name + + */ + MachinePoolName string + /*MachineUID + Machine uid + + */ + MachineUID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud configs aks pool machines Uid update params +func (o *V1CloudConfigsAksPoolMachinesUIDUpdateParams) WithTimeout(timeout time.Duration) *V1CloudConfigsAksPoolMachinesUIDUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud configs aks pool machines Uid update params +func (o *V1CloudConfigsAksPoolMachinesUIDUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud configs aks pool machines Uid update params +func (o *V1CloudConfigsAksPoolMachinesUIDUpdateParams) WithContext(ctx context.Context) *V1CloudConfigsAksPoolMachinesUIDUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud configs aks pool machines Uid update params +func (o *V1CloudConfigsAksPoolMachinesUIDUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud configs aks pool machines Uid update params +func (o *V1CloudConfigsAksPoolMachinesUIDUpdateParams) WithHTTPClient(client *http.Client) *V1CloudConfigsAksPoolMachinesUIDUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud configs aks pool machines Uid update params +func (o *V1CloudConfigsAksPoolMachinesUIDUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 cloud configs aks pool machines Uid update params +func (o *V1CloudConfigsAksPoolMachinesUIDUpdateParams) WithBody(body *models.V1AzureMachine) *V1CloudConfigsAksPoolMachinesUIDUpdateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 cloud configs aks pool machines Uid update params +func (o *V1CloudConfigsAksPoolMachinesUIDUpdateParams) SetBody(body *models.V1AzureMachine) { + o.Body = body +} + +// WithConfigUID adds the configUID to the v1 cloud configs aks pool machines Uid update params +func (o *V1CloudConfigsAksPoolMachinesUIDUpdateParams) WithConfigUID(configUID string) *V1CloudConfigsAksPoolMachinesUIDUpdateParams { + o.SetConfigUID(configUID) + return o +} + +// SetConfigUID adds the configUid to the v1 cloud configs aks pool machines Uid update params +func (o *V1CloudConfigsAksPoolMachinesUIDUpdateParams) SetConfigUID(configUID string) { + o.ConfigUID = configUID +} + +// WithMachinePoolName adds the machinePoolName to the v1 cloud configs aks pool machines Uid update params +func (o *V1CloudConfigsAksPoolMachinesUIDUpdateParams) WithMachinePoolName(machinePoolName string) *V1CloudConfigsAksPoolMachinesUIDUpdateParams { + o.SetMachinePoolName(machinePoolName) + return o +} + +// SetMachinePoolName adds the machinePoolName to the v1 cloud configs aks pool machines Uid update params +func (o *V1CloudConfigsAksPoolMachinesUIDUpdateParams) SetMachinePoolName(machinePoolName string) { + o.MachinePoolName = machinePoolName +} + +// WithMachineUID adds the machineUID to the v1 cloud configs aks pool machines Uid update params +func (o *V1CloudConfigsAksPoolMachinesUIDUpdateParams) WithMachineUID(machineUID string) *V1CloudConfigsAksPoolMachinesUIDUpdateParams { + o.SetMachineUID(machineUID) + return o +} + +// SetMachineUID adds the machineUid to the v1 cloud configs aks pool machines Uid update params +func (o *V1CloudConfigsAksPoolMachinesUIDUpdateParams) SetMachineUID(machineUID string) { + o.MachineUID = machineUID +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudConfigsAksPoolMachinesUIDUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param configUid + if err := r.SetPathParam("configUid", o.ConfigUID); err != nil { + return err + } + + // path param machinePoolName + if err := r.SetPathParam("machinePoolName", o.MachinePoolName); err != nil { + return err + } + + // path param machineUid + if err := r.SetPathParam("machineUid", o.MachineUID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_configs_aks_pool_machines_uid_update_responses.go b/api/client/v1/v1_cloud_configs_aks_pool_machines_uid_update_responses.go new file mode 100644 index 00000000..93fe84bb --- /dev/null +++ b/api/client/v1/v1_cloud_configs_aks_pool_machines_uid_update_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1CloudConfigsAksPoolMachinesUIDUpdateReader is a Reader for the V1CloudConfigsAksPoolMachinesUIDUpdate structure. +type V1CloudConfigsAksPoolMachinesUIDUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudConfigsAksPoolMachinesUIDUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1CloudConfigsAksPoolMachinesUIDUpdateNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudConfigsAksPoolMachinesUIDUpdateNoContent creates a V1CloudConfigsAksPoolMachinesUIDUpdateNoContent with default headers values +func NewV1CloudConfigsAksPoolMachinesUIDUpdateNoContent() *V1CloudConfigsAksPoolMachinesUIDUpdateNoContent { + return &V1CloudConfigsAksPoolMachinesUIDUpdateNoContent{} +} + +/* +V1CloudConfigsAksPoolMachinesUIDUpdateNoContent handles this case with default header values. + +The resource was updated successfully +*/ +type V1CloudConfigsAksPoolMachinesUIDUpdateNoContent struct { +} + +func (o *V1CloudConfigsAksPoolMachinesUIDUpdateNoContent) Error() string { + return fmt.Sprintf("[PUT /v1/cloudconfigs/aks/{configUid}/machinePools/{machinePoolName}/machines/{machineUid}][%d] v1CloudConfigsAksPoolMachinesUidUpdateNoContent ", 204) +} + +func (o *V1CloudConfigsAksPoolMachinesUIDUpdateNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_cloud_configs_aks_uid_cluster_config_parameters.go b/api/client/v1/v1_cloud_configs_aks_uid_cluster_config_parameters.go new file mode 100644 index 00000000..3140a0d4 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_aks_uid_cluster_config_parameters.go @@ -0,0 +1,157 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1CloudConfigsAksUIDClusterConfigParams creates a new V1CloudConfigsAksUIDClusterConfigParams object +// with the default values initialized. +func NewV1CloudConfigsAksUIDClusterConfigParams() *V1CloudConfigsAksUIDClusterConfigParams { + var () + return &V1CloudConfigsAksUIDClusterConfigParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudConfigsAksUIDClusterConfigParamsWithTimeout creates a new V1CloudConfigsAksUIDClusterConfigParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudConfigsAksUIDClusterConfigParamsWithTimeout(timeout time.Duration) *V1CloudConfigsAksUIDClusterConfigParams { + var () + return &V1CloudConfigsAksUIDClusterConfigParams{ + + timeout: timeout, + } +} + +// NewV1CloudConfigsAksUIDClusterConfigParamsWithContext creates a new V1CloudConfigsAksUIDClusterConfigParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudConfigsAksUIDClusterConfigParamsWithContext(ctx context.Context) *V1CloudConfigsAksUIDClusterConfigParams { + var () + return &V1CloudConfigsAksUIDClusterConfigParams{ + + Context: ctx, + } +} + +// NewV1CloudConfigsAksUIDClusterConfigParamsWithHTTPClient creates a new V1CloudConfigsAksUIDClusterConfigParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudConfigsAksUIDClusterConfigParamsWithHTTPClient(client *http.Client) *V1CloudConfigsAksUIDClusterConfigParams { + var () + return &V1CloudConfigsAksUIDClusterConfigParams{ + HTTPClient: client, + } +} + +/* +V1CloudConfigsAksUIDClusterConfigParams contains all the parameters to send to the API endpoint +for the v1 cloud configs aks Uid cluster config operation typically these are written to a http.Request +*/ +type V1CloudConfigsAksUIDClusterConfigParams struct { + + /*Body*/ + Body *models.V1AzureCloudClusterConfigEntity + /*ConfigUID + Cluster's cloud config uid + + */ + ConfigUID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud configs aks Uid cluster config params +func (o *V1CloudConfigsAksUIDClusterConfigParams) WithTimeout(timeout time.Duration) *V1CloudConfigsAksUIDClusterConfigParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud configs aks Uid cluster config params +func (o *V1CloudConfigsAksUIDClusterConfigParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud configs aks Uid cluster config params +func (o *V1CloudConfigsAksUIDClusterConfigParams) WithContext(ctx context.Context) *V1CloudConfigsAksUIDClusterConfigParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud configs aks Uid cluster config params +func (o *V1CloudConfigsAksUIDClusterConfigParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud configs aks Uid cluster config params +func (o *V1CloudConfigsAksUIDClusterConfigParams) WithHTTPClient(client *http.Client) *V1CloudConfigsAksUIDClusterConfigParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud configs aks Uid cluster config params +func (o *V1CloudConfigsAksUIDClusterConfigParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 cloud configs aks Uid cluster config params +func (o *V1CloudConfigsAksUIDClusterConfigParams) WithBody(body *models.V1AzureCloudClusterConfigEntity) *V1CloudConfigsAksUIDClusterConfigParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 cloud configs aks Uid cluster config params +func (o *V1CloudConfigsAksUIDClusterConfigParams) SetBody(body *models.V1AzureCloudClusterConfigEntity) { + o.Body = body +} + +// WithConfigUID adds the configUID to the v1 cloud configs aks Uid cluster config params +func (o *V1CloudConfigsAksUIDClusterConfigParams) WithConfigUID(configUID string) *V1CloudConfigsAksUIDClusterConfigParams { + o.SetConfigUID(configUID) + return o +} + +// SetConfigUID adds the configUid to the v1 cloud configs aks Uid cluster config params +func (o *V1CloudConfigsAksUIDClusterConfigParams) SetConfigUID(configUID string) { + o.ConfigUID = configUID +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudConfigsAksUIDClusterConfigParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param configUid + if err := r.SetPathParam("configUid", o.ConfigUID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_configs_aks_uid_cluster_config_responses.go b/api/client/v1/v1_cloud_configs_aks_uid_cluster_config_responses.go new file mode 100644 index 00000000..1dbf7e53 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_aks_uid_cluster_config_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1CloudConfigsAksUIDClusterConfigReader is a Reader for the V1CloudConfigsAksUIDClusterConfig structure. +type V1CloudConfigsAksUIDClusterConfigReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudConfigsAksUIDClusterConfigReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1CloudConfigsAksUIDClusterConfigNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudConfigsAksUIDClusterConfigNoContent creates a V1CloudConfigsAksUIDClusterConfigNoContent with default headers values +func NewV1CloudConfigsAksUIDClusterConfigNoContent() *V1CloudConfigsAksUIDClusterConfigNoContent { + return &V1CloudConfigsAksUIDClusterConfigNoContent{} +} + +/* +V1CloudConfigsAksUIDClusterConfigNoContent handles this case with default header values. + +The resource was updated successfully +*/ +type V1CloudConfigsAksUIDClusterConfigNoContent struct { +} + +func (o *V1CloudConfigsAksUIDClusterConfigNoContent) Error() string { + return fmt.Sprintf("[PUT /v1/cloudconfigs/aks/{configUid}/clusterConfig][%d] v1CloudConfigsAksUidClusterConfigNoContent ", 204) +} + +func (o *V1CloudConfigsAksUIDClusterConfigNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_cloud_configs_aws_get_parameters.go b/api/client/v1/v1_cloud_configs_aws_get_parameters.go new file mode 100644 index 00000000..575d9864 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_aws_get_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1CloudConfigsAwsGetParams creates a new V1CloudConfigsAwsGetParams object +// with the default values initialized. +func NewV1CloudConfigsAwsGetParams() *V1CloudConfigsAwsGetParams { + var () + return &V1CloudConfigsAwsGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudConfigsAwsGetParamsWithTimeout creates a new V1CloudConfigsAwsGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudConfigsAwsGetParamsWithTimeout(timeout time.Duration) *V1CloudConfigsAwsGetParams { + var () + return &V1CloudConfigsAwsGetParams{ + + timeout: timeout, + } +} + +// NewV1CloudConfigsAwsGetParamsWithContext creates a new V1CloudConfigsAwsGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudConfigsAwsGetParamsWithContext(ctx context.Context) *V1CloudConfigsAwsGetParams { + var () + return &V1CloudConfigsAwsGetParams{ + + Context: ctx, + } +} + +// NewV1CloudConfigsAwsGetParamsWithHTTPClient creates a new V1CloudConfigsAwsGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudConfigsAwsGetParamsWithHTTPClient(client *http.Client) *V1CloudConfigsAwsGetParams { + var () + return &V1CloudConfigsAwsGetParams{ + HTTPClient: client, + } +} + +/* +V1CloudConfigsAwsGetParams contains all the parameters to send to the API endpoint +for the v1 cloud configs aws get operation typically these are written to a http.Request +*/ +type V1CloudConfigsAwsGetParams struct { + + /*ConfigUID + Cluster's cloud config uid + + */ + ConfigUID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud configs aws get params +func (o *V1CloudConfigsAwsGetParams) WithTimeout(timeout time.Duration) *V1CloudConfigsAwsGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud configs aws get params +func (o *V1CloudConfigsAwsGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud configs aws get params +func (o *V1CloudConfigsAwsGetParams) WithContext(ctx context.Context) *V1CloudConfigsAwsGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud configs aws get params +func (o *V1CloudConfigsAwsGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud configs aws get params +func (o *V1CloudConfigsAwsGetParams) WithHTTPClient(client *http.Client) *V1CloudConfigsAwsGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud configs aws get params +func (o *V1CloudConfigsAwsGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithConfigUID adds the configUID to the v1 cloud configs aws get params +func (o *V1CloudConfigsAwsGetParams) WithConfigUID(configUID string) *V1CloudConfigsAwsGetParams { + o.SetConfigUID(configUID) + return o +} + +// SetConfigUID adds the configUid to the v1 cloud configs aws get params +func (o *V1CloudConfigsAwsGetParams) SetConfigUID(configUID string) { + o.ConfigUID = configUID +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudConfigsAwsGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param configUid + if err := r.SetPathParam("configUid", o.ConfigUID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_configs_aws_get_responses.go b/api/client/v1/v1_cloud_configs_aws_get_responses.go new file mode 100644 index 00000000..69a079c5 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_aws_get_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1CloudConfigsAwsGetReader is a Reader for the V1CloudConfigsAwsGet structure. +type V1CloudConfigsAwsGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudConfigsAwsGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1CloudConfigsAwsGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudConfigsAwsGetOK creates a V1CloudConfigsAwsGetOK with default headers values +func NewV1CloudConfigsAwsGetOK() *V1CloudConfigsAwsGetOK { + return &V1CloudConfigsAwsGetOK{} +} + +/* +V1CloudConfigsAwsGetOK handles this case with default header values. + +OK +*/ +type V1CloudConfigsAwsGetOK struct { + Payload *models.V1AwsCloudConfig +} + +func (o *V1CloudConfigsAwsGetOK) Error() string { + return fmt.Sprintf("[GET /v1/cloudconfigs/aws/{configUid}][%d] v1CloudConfigsAwsGetOK %+v", 200, o.Payload) +} + +func (o *V1CloudConfigsAwsGetOK) GetPayload() *models.V1AwsCloudConfig { + return o.Payload +} + +func (o *V1CloudConfigsAwsGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1AwsCloudConfig) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_cloud_configs_aws_machine_pool_create_parameters.go b/api/client/v1/v1_cloud_configs_aws_machine_pool_create_parameters.go new file mode 100644 index 00000000..f31f1b55 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_aws_machine_pool_create_parameters.go @@ -0,0 +1,157 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1CloudConfigsAwsMachinePoolCreateParams creates a new V1CloudConfigsAwsMachinePoolCreateParams object +// with the default values initialized. +func NewV1CloudConfigsAwsMachinePoolCreateParams() *V1CloudConfigsAwsMachinePoolCreateParams { + var () + return &V1CloudConfigsAwsMachinePoolCreateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudConfigsAwsMachinePoolCreateParamsWithTimeout creates a new V1CloudConfigsAwsMachinePoolCreateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudConfigsAwsMachinePoolCreateParamsWithTimeout(timeout time.Duration) *V1CloudConfigsAwsMachinePoolCreateParams { + var () + return &V1CloudConfigsAwsMachinePoolCreateParams{ + + timeout: timeout, + } +} + +// NewV1CloudConfigsAwsMachinePoolCreateParamsWithContext creates a new V1CloudConfigsAwsMachinePoolCreateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudConfigsAwsMachinePoolCreateParamsWithContext(ctx context.Context) *V1CloudConfigsAwsMachinePoolCreateParams { + var () + return &V1CloudConfigsAwsMachinePoolCreateParams{ + + Context: ctx, + } +} + +// NewV1CloudConfigsAwsMachinePoolCreateParamsWithHTTPClient creates a new V1CloudConfigsAwsMachinePoolCreateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudConfigsAwsMachinePoolCreateParamsWithHTTPClient(client *http.Client) *V1CloudConfigsAwsMachinePoolCreateParams { + var () + return &V1CloudConfigsAwsMachinePoolCreateParams{ + HTTPClient: client, + } +} + +/* +V1CloudConfigsAwsMachinePoolCreateParams contains all the parameters to send to the API endpoint +for the v1 cloud configs aws machine pool create operation typically these are written to a http.Request +*/ +type V1CloudConfigsAwsMachinePoolCreateParams struct { + + /*Body*/ + Body *models.V1AwsMachinePoolConfigEntity + /*ConfigUID + Cluster's cloud config uid + + */ + ConfigUID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud configs aws machine pool create params +func (o *V1CloudConfigsAwsMachinePoolCreateParams) WithTimeout(timeout time.Duration) *V1CloudConfigsAwsMachinePoolCreateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud configs aws machine pool create params +func (o *V1CloudConfigsAwsMachinePoolCreateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud configs aws machine pool create params +func (o *V1CloudConfigsAwsMachinePoolCreateParams) WithContext(ctx context.Context) *V1CloudConfigsAwsMachinePoolCreateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud configs aws machine pool create params +func (o *V1CloudConfigsAwsMachinePoolCreateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud configs aws machine pool create params +func (o *V1CloudConfigsAwsMachinePoolCreateParams) WithHTTPClient(client *http.Client) *V1CloudConfigsAwsMachinePoolCreateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud configs aws machine pool create params +func (o *V1CloudConfigsAwsMachinePoolCreateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 cloud configs aws machine pool create params +func (o *V1CloudConfigsAwsMachinePoolCreateParams) WithBody(body *models.V1AwsMachinePoolConfigEntity) *V1CloudConfigsAwsMachinePoolCreateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 cloud configs aws machine pool create params +func (o *V1CloudConfigsAwsMachinePoolCreateParams) SetBody(body *models.V1AwsMachinePoolConfigEntity) { + o.Body = body +} + +// WithConfigUID adds the configUID to the v1 cloud configs aws machine pool create params +func (o *V1CloudConfigsAwsMachinePoolCreateParams) WithConfigUID(configUID string) *V1CloudConfigsAwsMachinePoolCreateParams { + o.SetConfigUID(configUID) + return o +} + +// SetConfigUID adds the configUid to the v1 cloud configs aws machine pool create params +func (o *V1CloudConfigsAwsMachinePoolCreateParams) SetConfigUID(configUID string) { + o.ConfigUID = configUID +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudConfigsAwsMachinePoolCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param configUid + if err := r.SetPathParam("configUid", o.ConfigUID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_configs_aws_machine_pool_create_responses.go b/api/client/v1/v1_cloud_configs_aws_machine_pool_create_responses.go new file mode 100644 index 00000000..ac7014b1 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_aws_machine_pool_create_responses.go @@ -0,0 +1,77 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1CloudConfigsAwsMachinePoolCreateReader is a Reader for the V1CloudConfigsAwsMachinePoolCreate structure. +type V1CloudConfigsAwsMachinePoolCreateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudConfigsAwsMachinePoolCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 201: + result := NewV1CloudConfigsAwsMachinePoolCreateCreated() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudConfigsAwsMachinePoolCreateCreated creates a V1CloudConfigsAwsMachinePoolCreateCreated with default headers values +func NewV1CloudConfigsAwsMachinePoolCreateCreated() *V1CloudConfigsAwsMachinePoolCreateCreated { + return &V1CloudConfigsAwsMachinePoolCreateCreated{} +} + +/* +V1CloudConfigsAwsMachinePoolCreateCreated handles this case with default header values. + +Created successfully +*/ +type V1CloudConfigsAwsMachinePoolCreateCreated struct { + /*Audit uid for the request + */ + AuditUID string + + Payload *models.V1UID +} + +func (o *V1CloudConfigsAwsMachinePoolCreateCreated) Error() string { + return fmt.Sprintf("[POST /v1/cloudconfigs/aws/{configUid}/machinePools][%d] v1CloudConfigsAwsMachinePoolCreateCreated %+v", 201, o.Payload) +} + +func (o *V1CloudConfigsAwsMachinePoolCreateCreated) GetPayload() *models.V1UID { + return o.Payload +} + +func (o *V1CloudConfigsAwsMachinePoolCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header AuditUid + o.AuditUID = response.GetHeader("AuditUid") + + o.Payload = new(models.V1UID) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_cloud_configs_aws_machine_pool_delete_parameters.go b/api/client/v1/v1_cloud_configs_aws_machine_pool_delete_parameters.go new file mode 100644 index 00000000..65803e72 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_aws_machine_pool_delete_parameters.go @@ -0,0 +1,157 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1CloudConfigsAwsMachinePoolDeleteParams creates a new V1CloudConfigsAwsMachinePoolDeleteParams object +// with the default values initialized. +func NewV1CloudConfigsAwsMachinePoolDeleteParams() *V1CloudConfigsAwsMachinePoolDeleteParams { + var () + return &V1CloudConfigsAwsMachinePoolDeleteParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudConfigsAwsMachinePoolDeleteParamsWithTimeout creates a new V1CloudConfigsAwsMachinePoolDeleteParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudConfigsAwsMachinePoolDeleteParamsWithTimeout(timeout time.Duration) *V1CloudConfigsAwsMachinePoolDeleteParams { + var () + return &V1CloudConfigsAwsMachinePoolDeleteParams{ + + timeout: timeout, + } +} + +// NewV1CloudConfigsAwsMachinePoolDeleteParamsWithContext creates a new V1CloudConfigsAwsMachinePoolDeleteParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudConfigsAwsMachinePoolDeleteParamsWithContext(ctx context.Context) *V1CloudConfigsAwsMachinePoolDeleteParams { + var () + return &V1CloudConfigsAwsMachinePoolDeleteParams{ + + Context: ctx, + } +} + +// NewV1CloudConfigsAwsMachinePoolDeleteParamsWithHTTPClient creates a new V1CloudConfigsAwsMachinePoolDeleteParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudConfigsAwsMachinePoolDeleteParamsWithHTTPClient(client *http.Client) *V1CloudConfigsAwsMachinePoolDeleteParams { + var () + return &V1CloudConfigsAwsMachinePoolDeleteParams{ + HTTPClient: client, + } +} + +/* +V1CloudConfigsAwsMachinePoolDeleteParams contains all the parameters to send to the API endpoint +for the v1 cloud configs aws machine pool delete operation typically these are written to a http.Request +*/ +type V1CloudConfigsAwsMachinePoolDeleteParams struct { + + /*ConfigUID + Cluster's cloud config uid + + */ + ConfigUID string + /*MachinePoolName + Machine pool name + + */ + MachinePoolName string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud configs aws machine pool delete params +func (o *V1CloudConfigsAwsMachinePoolDeleteParams) WithTimeout(timeout time.Duration) *V1CloudConfigsAwsMachinePoolDeleteParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud configs aws machine pool delete params +func (o *V1CloudConfigsAwsMachinePoolDeleteParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud configs aws machine pool delete params +func (o *V1CloudConfigsAwsMachinePoolDeleteParams) WithContext(ctx context.Context) *V1CloudConfigsAwsMachinePoolDeleteParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud configs aws machine pool delete params +func (o *V1CloudConfigsAwsMachinePoolDeleteParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud configs aws machine pool delete params +func (o *V1CloudConfigsAwsMachinePoolDeleteParams) WithHTTPClient(client *http.Client) *V1CloudConfigsAwsMachinePoolDeleteParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud configs aws machine pool delete params +func (o *V1CloudConfigsAwsMachinePoolDeleteParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithConfigUID adds the configUID to the v1 cloud configs aws machine pool delete params +func (o *V1CloudConfigsAwsMachinePoolDeleteParams) WithConfigUID(configUID string) *V1CloudConfigsAwsMachinePoolDeleteParams { + o.SetConfigUID(configUID) + return o +} + +// SetConfigUID adds the configUid to the v1 cloud configs aws machine pool delete params +func (o *V1CloudConfigsAwsMachinePoolDeleteParams) SetConfigUID(configUID string) { + o.ConfigUID = configUID +} + +// WithMachinePoolName adds the machinePoolName to the v1 cloud configs aws machine pool delete params +func (o *V1CloudConfigsAwsMachinePoolDeleteParams) WithMachinePoolName(machinePoolName string) *V1CloudConfigsAwsMachinePoolDeleteParams { + o.SetMachinePoolName(machinePoolName) + return o +} + +// SetMachinePoolName adds the machinePoolName to the v1 cloud configs aws machine pool delete params +func (o *V1CloudConfigsAwsMachinePoolDeleteParams) SetMachinePoolName(machinePoolName string) { + o.MachinePoolName = machinePoolName +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudConfigsAwsMachinePoolDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param configUid + if err := r.SetPathParam("configUid", o.ConfigUID); err != nil { + return err + } + + // path param machinePoolName + if err := r.SetPathParam("machinePoolName", o.MachinePoolName); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_configs_aws_machine_pool_delete_responses.go b/api/client/v1/v1_cloud_configs_aws_machine_pool_delete_responses.go new file mode 100644 index 00000000..a901ae2a --- /dev/null +++ b/api/client/v1/v1_cloud_configs_aws_machine_pool_delete_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1CloudConfigsAwsMachinePoolDeleteReader is a Reader for the V1CloudConfigsAwsMachinePoolDelete structure. +type V1CloudConfigsAwsMachinePoolDeleteReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudConfigsAwsMachinePoolDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1CloudConfigsAwsMachinePoolDeleteNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudConfigsAwsMachinePoolDeleteNoContent creates a V1CloudConfigsAwsMachinePoolDeleteNoContent with default headers values +func NewV1CloudConfigsAwsMachinePoolDeleteNoContent() *V1CloudConfigsAwsMachinePoolDeleteNoContent { + return &V1CloudConfigsAwsMachinePoolDeleteNoContent{} +} + +/* +V1CloudConfigsAwsMachinePoolDeleteNoContent handles this case with default header values. + +The resource was deleted successfully +*/ +type V1CloudConfigsAwsMachinePoolDeleteNoContent struct { +} + +func (o *V1CloudConfigsAwsMachinePoolDeleteNoContent) Error() string { + return fmt.Sprintf("[DELETE /v1/cloudconfigs/aws/{configUid}/machinePools/{machinePoolName}][%d] v1CloudConfigsAwsMachinePoolDeleteNoContent ", 204) +} + +func (o *V1CloudConfigsAwsMachinePoolDeleteNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_cloud_configs_aws_machine_pool_update_parameters.go b/api/client/v1/v1_cloud_configs_aws_machine_pool_update_parameters.go new file mode 100644 index 00000000..a23921bb --- /dev/null +++ b/api/client/v1/v1_cloud_configs_aws_machine_pool_update_parameters.go @@ -0,0 +1,178 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1CloudConfigsAwsMachinePoolUpdateParams creates a new V1CloudConfigsAwsMachinePoolUpdateParams object +// with the default values initialized. +func NewV1CloudConfigsAwsMachinePoolUpdateParams() *V1CloudConfigsAwsMachinePoolUpdateParams { + var () + return &V1CloudConfigsAwsMachinePoolUpdateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudConfigsAwsMachinePoolUpdateParamsWithTimeout creates a new V1CloudConfigsAwsMachinePoolUpdateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudConfigsAwsMachinePoolUpdateParamsWithTimeout(timeout time.Duration) *V1CloudConfigsAwsMachinePoolUpdateParams { + var () + return &V1CloudConfigsAwsMachinePoolUpdateParams{ + + timeout: timeout, + } +} + +// NewV1CloudConfigsAwsMachinePoolUpdateParamsWithContext creates a new V1CloudConfigsAwsMachinePoolUpdateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudConfigsAwsMachinePoolUpdateParamsWithContext(ctx context.Context) *V1CloudConfigsAwsMachinePoolUpdateParams { + var () + return &V1CloudConfigsAwsMachinePoolUpdateParams{ + + Context: ctx, + } +} + +// NewV1CloudConfigsAwsMachinePoolUpdateParamsWithHTTPClient creates a new V1CloudConfigsAwsMachinePoolUpdateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudConfigsAwsMachinePoolUpdateParamsWithHTTPClient(client *http.Client) *V1CloudConfigsAwsMachinePoolUpdateParams { + var () + return &V1CloudConfigsAwsMachinePoolUpdateParams{ + HTTPClient: client, + } +} + +/* +V1CloudConfigsAwsMachinePoolUpdateParams contains all the parameters to send to the API endpoint +for the v1 cloud configs aws machine pool update operation typically these are written to a http.Request +*/ +type V1CloudConfigsAwsMachinePoolUpdateParams struct { + + /*Body*/ + Body *models.V1AwsMachinePoolConfigEntity + /*ConfigUID + Cluster's cloud config uid + + */ + ConfigUID string + /*MachinePoolName + Machine pool name + + */ + MachinePoolName string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud configs aws machine pool update params +func (o *V1CloudConfigsAwsMachinePoolUpdateParams) WithTimeout(timeout time.Duration) *V1CloudConfigsAwsMachinePoolUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud configs aws machine pool update params +func (o *V1CloudConfigsAwsMachinePoolUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud configs aws machine pool update params +func (o *V1CloudConfigsAwsMachinePoolUpdateParams) WithContext(ctx context.Context) *V1CloudConfigsAwsMachinePoolUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud configs aws machine pool update params +func (o *V1CloudConfigsAwsMachinePoolUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud configs aws machine pool update params +func (o *V1CloudConfigsAwsMachinePoolUpdateParams) WithHTTPClient(client *http.Client) *V1CloudConfigsAwsMachinePoolUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud configs aws machine pool update params +func (o *V1CloudConfigsAwsMachinePoolUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 cloud configs aws machine pool update params +func (o *V1CloudConfigsAwsMachinePoolUpdateParams) WithBody(body *models.V1AwsMachinePoolConfigEntity) *V1CloudConfigsAwsMachinePoolUpdateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 cloud configs aws machine pool update params +func (o *V1CloudConfigsAwsMachinePoolUpdateParams) SetBody(body *models.V1AwsMachinePoolConfigEntity) { + o.Body = body +} + +// WithConfigUID adds the configUID to the v1 cloud configs aws machine pool update params +func (o *V1CloudConfigsAwsMachinePoolUpdateParams) WithConfigUID(configUID string) *V1CloudConfigsAwsMachinePoolUpdateParams { + o.SetConfigUID(configUID) + return o +} + +// SetConfigUID adds the configUid to the v1 cloud configs aws machine pool update params +func (o *V1CloudConfigsAwsMachinePoolUpdateParams) SetConfigUID(configUID string) { + o.ConfigUID = configUID +} + +// WithMachinePoolName adds the machinePoolName to the v1 cloud configs aws machine pool update params +func (o *V1CloudConfigsAwsMachinePoolUpdateParams) WithMachinePoolName(machinePoolName string) *V1CloudConfigsAwsMachinePoolUpdateParams { + o.SetMachinePoolName(machinePoolName) + return o +} + +// SetMachinePoolName adds the machinePoolName to the v1 cloud configs aws machine pool update params +func (o *V1CloudConfigsAwsMachinePoolUpdateParams) SetMachinePoolName(machinePoolName string) { + o.MachinePoolName = machinePoolName +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudConfigsAwsMachinePoolUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param configUid + if err := r.SetPathParam("configUid", o.ConfigUID); err != nil { + return err + } + + // path param machinePoolName + if err := r.SetPathParam("machinePoolName", o.MachinePoolName); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_configs_aws_machine_pool_update_responses.go b/api/client/v1/v1_cloud_configs_aws_machine_pool_update_responses.go new file mode 100644 index 00000000..9338190d --- /dev/null +++ b/api/client/v1/v1_cloud_configs_aws_machine_pool_update_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1CloudConfigsAwsMachinePoolUpdateReader is a Reader for the V1CloudConfigsAwsMachinePoolUpdate structure. +type V1CloudConfigsAwsMachinePoolUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudConfigsAwsMachinePoolUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1CloudConfigsAwsMachinePoolUpdateNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudConfigsAwsMachinePoolUpdateNoContent creates a V1CloudConfigsAwsMachinePoolUpdateNoContent with default headers values +func NewV1CloudConfigsAwsMachinePoolUpdateNoContent() *V1CloudConfigsAwsMachinePoolUpdateNoContent { + return &V1CloudConfigsAwsMachinePoolUpdateNoContent{} +} + +/* +V1CloudConfigsAwsMachinePoolUpdateNoContent handles this case with default header values. + +The resource was updated successfully +*/ +type V1CloudConfigsAwsMachinePoolUpdateNoContent struct { +} + +func (o *V1CloudConfigsAwsMachinePoolUpdateNoContent) Error() string { + return fmt.Sprintf("[PUT /v1/cloudconfigs/aws/{configUid}/machinePools/{machinePoolName}][%d] v1CloudConfigsAwsMachinePoolUpdateNoContent ", 204) +} + +func (o *V1CloudConfigsAwsMachinePoolUpdateNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_cloud_configs_aws_pool_machines_add_parameters.go b/api/client/v1/v1_cloud_configs_aws_pool_machines_add_parameters.go new file mode 100644 index 00000000..f06ec4ce --- /dev/null +++ b/api/client/v1/v1_cloud_configs_aws_pool_machines_add_parameters.go @@ -0,0 +1,178 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1CloudConfigsAwsPoolMachinesAddParams creates a new V1CloudConfigsAwsPoolMachinesAddParams object +// with the default values initialized. +func NewV1CloudConfigsAwsPoolMachinesAddParams() *V1CloudConfigsAwsPoolMachinesAddParams { + var () + return &V1CloudConfigsAwsPoolMachinesAddParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudConfigsAwsPoolMachinesAddParamsWithTimeout creates a new V1CloudConfigsAwsPoolMachinesAddParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudConfigsAwsPoolMachinesAddParamsWithTimeout(timeout time.Duration) *V1CloudConfigsAwsPoolMachinesAddParams { + var () + return &V1CloudConfigsAwsPoolMachinesAddParams{ + + timeout: timeout, + } +} + +// NewV1CloudConfigsAwsPoolMachinesAddParamsWithContext creates a new V1CloudConfigsAwsPoolMachinesAddParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudConfigsAwsPoolMachinesAddParamsWithContext(ctx context.Context) *V1CloudConfigsAwsPoolMachinesAddParams { + var () + return &V1CloudConfigsAwsPoolMachinesAddParams{ + + Context: ctx, + } +} + +// NewV1CloudConfigsAwsPoolMachinesAddParamsWithHTTPClient creates a new V1CloudConfigsAwsPoolMachinesAddParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudConfigsAwsPoolMachinesAddParamsWithHTTPClient(client *http.Client) *V1CloudConfigsAwsPoolMachinesAddParams { + var () + return &V1CloudConfigsAwsPoolMachinesAddParams{ + HTTPClient: client, + } +} + +/* +V1CloudConfigsAwsPoolMachinesAddParams contains all the parameters to send to the API endpoint +for the v1 cloud configs aws pool machines add operation typically these are written to a http.Request +*/ +type V1CloudConfigsAwsPoolMachinesAddParams struct { + + /*Body*/ + Body *models.V1AwsMachine + /*ConfigUID + Cluster's cloud config uid + + */ + ConfigUID string + /*MachinePoolName + Machine pool name + + */ + MachinePoolName string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud configs aws pool machines add params +func (o *V1CloudConfigsAwsPoolMachinesAddParams) WithTimeout(timeout time.Duration) *V1CloudConfigsAwsPoolMachinesAddParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud configs aws pool machines add params +func (o *V1CloudConfigsAwsPoolMachinesAddParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud configs aws pool machines add params +func (o *V1CloudConfigsAwsPoolMachinesAddParams) WithContext(ctx context.Context) *V1CloudConfigsAwsPoolMachinesAddParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud configs aws pool machines add params +func (o *V1CloudConfigsAwsPoolMachinesAddParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud configs aws pool machines add params +func (o *V1CloudConfigsAwsPoolMachinesAddParams) WithHTTPClient(client *http.Client) *V1CloudConfigsAwsPoolMachinesAddParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud configs aws pool machines add params +func (o *V1CloudConfigsAwsPoolMachinesAddParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 cloud configs aws pool machines add params +func (o *V1CloudConfigsAwsPoolMachinesAddParams) WithBody(body *models.V1AwsMachine) *V1CloudConfigsAwsPoolMachinesAddParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 cloud configs aws pool machines add params +func (o *V1CloudConfigsAwsPoolMachinesAddParams) SetBody(body *models.V1AwsMachine) { + o.Body = body +} + +// WithConfigUID adds the configUID to the v1 cloud configs aws pool machines add params +func (o *V1CloudConfigsAwsPoolMachinesAddParams) WithConfigUID(configUID string) *V1CloudConfigsAwsPoolMachinesAddParams { + o.SetConfigUID(configUID) + return o +} + +// SetConfigUID adds the configUid to the v1 cloud configs aws pool machines add params +func (o *V1CloudConfigsAwsPoolMachinesAddParams) SetConfigUID(configUID string) { + o.ConfigUID = configUID +} + +// WithMachinePoolName adds the machinePoolName to the v1 cloud configs aws pool machines add params +func (o *V1CloudConfigsAwsPoolMachinesAddParams) WithMachinePoolName(machinePoolName string) *V1CloudConfigsAwsPoolMachinesAddParams { + o.SetMachinePoolName(machinePoolName) + return o +} + +// SetMachinePoolName adds the machinePoolName to the v1 cloud configs aws pool machines add params +func (o *V1CloudConfigsAwsPoolMachinesAddParams) SetMachinePoolName(machinePoolName string) { + o.MachinePoolName = machinePoolName +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudConfigsAwsPoolMachinesAddParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param configUid + if err := r.SetPathParam("configUid", o.ConfigUID); err != nil { + return err + } + + // path param machinePoolName + if err := r.SetPathParam("machinePoolName", o.MachinePoolName); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_configs_aws_pool_machines_add_responses.go b/api/client/v1/v1_cloud_configs_aws_pool_machines_add_responses.go new file mode 100644 index 00000000..ee45b612 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_aws_pool_machines_add_responses.go @@ -0,0 +1,77 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1CloudConfigsAwsPoolMachinesAddReader is a Reader for the V1CloudConfigsAwsPoolMachinesAdd structure. +type V1CloudConfigsAwsPoolMachinesAddReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudConfigsAwsPoolMachinesAddReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 201: + result := NewV1CloudConfigsAwsPoolMachinesAddCreated() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudConfigsAwsPoolMachinesAddCreated creates a V1CloudConfigsAwsPoolMachinesAddCreated with default headers values +func NewV1CloudConfigsAwsPoolMachinesAddCreated() *V1CloudConfigsAwsPoolMachinesAddCreated { + return &V1CloudConfigsAwsPoolMachinesAddCreated{} +} + +/* +V1CloudConfigsAwsPoolMachinesAddCreated handles this case with default header values. + +Created successfully +*/ +type V1CloudConfigsAwsPoolMachinesAddCreated struct { + /*Audit uid for the request + */ + AuditUID string + + Payload *models.V1UID +} + +func (o *V1CloudConfigsAwsPoolMachinesAddCreated) Error() string { + return fmt.Sprintf("[POST /v1/cloudconfigs/aws/{configUid}/machinePools/{machinePoolName}/machines][%d] v1CloudConfigsAwsPoolMachinesAddCreated %+v", 201, o.Payload) +} + +func (o *V1CloudConfigsAwsPoolMachinesAddCreated) GetPayload() *models.V1UID { + return o.Payload +} + +func (o *V1CloudConfigsAwsPoolMachinesAddCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header AuditUid + o.AuditUID = response.GetHeader("AuditUid") + + o.Payload = new(models.V1UID) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_cloud_configs_aws_pool_machines_list_parameters.go b/api/client/v1/v1_cloud_configs_aws_pool_machines_list_parameters.go new file mode 100644 index 00000000..05287e89 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_aws_pool_machines_list_parameters.go @@ -0,0 +1,365 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// NewV1CloudConfigsAwsPoolMachinesListParams creates a new V1CloudConfigsAwsPoolMachinesListParams object +// with the default values initialized. +func NewV1CloudConfigsAwsPoolMachinesListParams() *V1CloudConfigsAwsPoolMachinesListParams { + var ( + limitDefault = int64(50) + ) + return &V1CloudConfigsAwsPoolMachinesListParams{ + Limit: &limitDefault, + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudConfigsAwsPoolMachinesListParamsWithTimeout creates a new V1CloudConfigsAwsPoolMachinesListParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudConfigsAwsPoolMachinesListParamsWithTimeout(timeout time.Duration) *V1CloudConfigsAwsPoolMachinesListParams { + var ( + limitDefault = int64(50) + ) + return &V1CloudConfigsAwsPoolMachinesListParams{ + Limit: &limitDefault, + + timeout: timeout, + } +} + +// NewV1CloudConfigsAwsPoolMachinesListParamsWithContext creates a new V1CloudConfigsAwsPoolMachinesListParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudConfigsAwsPoolMachinesListParamsWithContext(ctx context.Context) *V1CloudConfigsAwsPoolMachinesListParams { + var ( + limitDefault = int64(50) + ) + return &V1CloudConfigsAwsPoolMachinesListParams{ + Limit: &limitDefault, + + Context: ctx, + } +} + +// NewV1CloudConfigsAwsPoolMachinesListParamsWithHTTPClient creates a new V1CloudConfigsAwsPoolMachinesListParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudConfigsAwsPoolMachinesListParamsWithHTTPClient(client *http.Client) *V1CloudConfigsAwsPoolMachinesListParams { + var ( + limitDefault = int64(50) + ) + return &V1CloudConfigsAwsPoolMachinesListParams{ + Limit: &limitDefault, + HTTPClient: client, + } +} + +/* +V1CloudConfigsAwsPoolMachinesListParams contains all the parameters to send to the API endpoint +for the v1 cloud configs aws pool machines list operation typically these are written to a http.Request +*/ +type V1CloudConfigsAwsPoolMachinesListParams struct { + + /*ConfigUID + Cluster's cloud config uid + + */ + ConfigUID string + /*Continue + continue token to paginate the subsequent data items + + */ + Continue *string + /*Fields + Set of fields to be presented in the response with values. The fields are comma separated. Eg: metadata.uid,metadata.name + + */ + Fields *string + /*Filters + Filters can be combined with AND, OR operators with field path name. Eg: metadata.name=TestServiceANDspec.cloudType=aws + + Server will be restricted to certain fields based on the indexed data for each resource. + + */ + Filters *string + /*Limit + limit is a maximum number of responses to return for a list call. Default and maximum value of the limit is 50. + If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. + + */ + Limit *int64 + /*MachinePoolName + Machine pool name + + */ + MachinePoolName string + /*Offset + offset is the next index number from which the response will start. The response offset value can be used along with continue token for the pagination. + + */ + Offset *int64 + /*OrderBy + Specify the fields with sort order. 1 indicates ascending and -1 for descending. Eg: orderBy=metadata.name=1,metadata.uid=-1 + + */ + OrderBy *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud configs aws pool machines list params +func (o *V1CloudConfigsAwsPoolMachinesListParams) WithTimeout(timeout time.Duration) *V1CloudConfigsAwsPoolMachinesListParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud configs aws pool machines list params +func (o *V1CloudConfigsAwsPoolMachinesListParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud configs aws pool machines list params +func (o *V1CloudConfigsAwsPoolMachinesListParams) WithContext(ctx context.Context) *V1CloudConfigsAwsPoolMachinesListParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud configs aws pool machines list params +func (o *V1CloudConfigsAwsPoolMachinesListParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud configs aws pool machines list params +func (o *V1CloudConfigsAwsPoolMachinesListParams) WithHTTPClient(client *http.Client) *V1CloudConfigsAwsPoolMachinesListParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud configs aws pool machines list params +func (o *V1CloudConfigsAwsPoolMachinesListParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithConfigUID adds the configUID to the v1 cloud configs aws pool machines list params +func (o *V1CloudConfigsAwsPoolMachinesListParams) WithConfigUID(configUID string) *V1CloudConfigsAwsPoolMachinesListParams { + o.SetConfigUID(configUID) + return o +} + +// SetConfigUID adds the configUid to the v1 cloud configs aws pool machines list params +func (o *V1CloudConfigsAwsPoolMachinesListParams) SetConfigUID(configUID string) { + o.ConfigUID = configUID +} + +// WithContinue adds the continueVar to the v1 cloud configs aws pool machines list params +func (o *V1CloudConfigsAwsPoolMachinesListParams) WithContinue(continueVar *string) *V1CloudConfigsAwsPoolMachinesListParams { + o.SetContinue(continueVar) + return o +} + +// SetContinue adds the continue to the v1 cloud configs aws pool machines list params +func (o *V1CloudConfigsAwsPoolMachinesListParams) SetContinue(continueVar *string) { + o.Continue = continueVar +} + +// WithFields adds the fields to the v1 cloud configs aws pool machines list params +func (o *V1CloudConfigsAwsPoolMachinesListParams) WithFields(fields *string) *V1CloudConfigsAwsPoolMachinesListParams { + o.SetFields(fields) + return o +} + +// SetFields adds the fields to the v1 cloud configs aws pool machines list params +func (o *V1CloudConfigsAwsPoolMachinesListParams) SetFields(fields *string) { + o.Fields = fields +} + +// WithFilters adds the filters to the v1 cloud configs aws pool machines list params +func (o *V1CloudConfigsAwsPoolMachinesListParams) WithFilters(filters *string) *V1CloudConfigsAwsPoolMachinesListParams { + o.SetFilters(filters) + return o +} + +// SetFilters adds the filters to the v1 cloud configs aws pool machines list params +func (o *V1CloudConfigsAwsPoolMachinesListParams) SetFilters(filters *string) { + o.Filters = filters +} + +// WithLimit adds the limit to the v1 cloud configs aws pool machines list params +func (o *V1CloudConfigsAwsPoolMachinesListParams) WithLimit(limit *int64) *V1CloudConfigsAwsPoolMachinesListParams { + o.SetLimit(limit) + return o +} + +// SetLimit adds the limit to the v1 cloud configs aws pool machines list params +func (o *V1CloudConfigsAwsPoolMachinesListParams) SetLimit(limit *int64) { + o.Limit = limit +} + +// WithMachinePoolName adds the machinePoolName to the v1 cloud configs aws pool machines list params +func (o *V1CloudConfigsAwsPoolMachinesListParams) WithMachinePoolName(machinePoolName string) *V1CloudConfigsAwsPoolMachinesListParams { + o.SetMachinePoolName(machinePoolName) + return o +} + +// SetMachinePoolName adds the machinePoolName to the v1 cloud configs aws pool machines list params +func (o *V1CloudConfigsAwsPoolMachinesListParams) SetMachinePoolName(machinePoolName string) { + o.MachinePoolName = machinePoolName +} + +// WithOffset adds the offset to the v1 cloud configs aws pool machines list params +func (o *V1CloudConfigsAwsPoolMachinesListParams) WithOffset(offset *int64) *V1CloudConfigsAwsPoolMachinesListParams { + o.SetOffset(offset) + return o +} + +// SetOffset adds the offset to the v1 cloud configs aws pool machines list params +func (o *V1CloudConfigsAwsPoolMachinesListParams) SetOffset(offset *int64) { + o.Offset = offset +} + +// WithOrderBy adds the orderBy to the v1 cloud configs aws pool machines list params +func (o *V1CloudConfigsAwsPoolMachinesListParams) WithOrderBy(orderBy *string) *V1CloudConfigsAwsPoolMachinesListParams { + o.SetOrderBy(orderBy) + return o +} + +// SetOrderBy adds the orderBy to the v1 cloud configs aws pool machines list params +func (o *V1CloudConfigsAwsPoolMachinesListParams) SetOrderBy(orderBy *string) { + o.OrderBy = orderBy +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudConfigsAwsPoolMachinesListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param configUid + if err := r.SetPathParam("configUid", o.ConfigUID); err != nil { + return err + } + + if o.Continue != nil { + + // query param continue + var qrContinue string + if o.Continue != nil { + qrContinue = *o.Continue + } + qContinue := qrContinue + if qContinue != "" { + if err := r.SetQueryParam("continue", qContinue); err != nil { + return err + } + } + + } + + if o.Fields != nil { + + // query param fields + var qrFields string + if o.Fields != nil { + qrFields = *o.Fields + } + qFields := qrFields + if qFields != "" { + if err := r.SetQueryParam("fields", qFields); err != nil { + return err + } + } + + } + + if o.Filters != nil { + + // query param filters + var qrFilters string + if o.Filters != nil { + qrFilters = *o.Filters + } + qFilters := qrFilters + if qFilters != "" { + if err := r.SetQueryParam("filters", qFilters); err != nil { + return err + } + } + + } + + if o.Limit != nil { + + // query param limit + var qrLimit int64 + if o.Limit != nil { + qrLimit = *o.Limit + } + qLimit := swag.FormatInt64(qrLimit) + if qLimit != "" { + if err := r.SetQueryParam("limit", qLimit); err != nil { + return err + } + } + + } + + // path param machinePoolName + if err := r.SetPathParam("machinePoolName", o.MachinePoolName); err != nil { + return err + } + + if o.Offset != nil { + + // query param offset + var qrOffset int64 + if o.Offset != nil { + qrOffset = *o.Offset + } + qOffset := swag.FormatInt64(qrOffset) + if qOffset != "" { + if err := r.SetQueryParam("offset", qOffset); err != nil { + return err + } + } + + } + + if o.OrderBy != nil { + + // query param orderBy + var qrOrderBy string + if o.OrderBy != nil { + qrOrderBy = *o.OrderBy + } + qOrderBy := qrOrderBy + if qOrderBy != "" { + if err := r.SetQueryParam("orderBy", qOrderBy); err != nil { + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_configs_aws_pool_machines_list_responses.go b/api/client/v1/v1_cloud_configs_aws_pool_machines_list_responses.go new file mode 100644 index 00000000..783c5fb3 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_aws_pool_machines_list_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1CloudConfigsAwsPoolMachinesListReader is a Reader for the V1CloudConfigsAwsPoolMachinesList structure. +type V1CloudConfigsAwsPoolMachinesListReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudConfigsAwsPoolMachinesListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1CloudConfigsAwsPoolMachinesListOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudConfigsAwsPoolMachinesListOK creates a V1CloudConfigsAwsPoolMachinesListOK with default headers values +func NewV1CloudConfigsAwsPoolMachinesListOK() *V1CloudConfigsAwsPoolMachinesListOK { + return &V1CloudConfigsAwsPoolMachinesListOK{} +} + +/* +V1CloudConfigsAwsPoolMachinesListOK handles this case with default header values. + +An array of AWS machine items +*/ +type V1CloudConfigsAwsPoolMachinesListOK struct { + Payload *models.V1AwsMachines +} + +func (o *V1CloudConfigsAwsPoolMachinesListOK) Error() string { + return fmt.Sprintf("[GET /v1/cloudconfigs/aws/{configUid}/machinePools/{machinePoolName}/machines][%d] v1CloudConfigsAwsPoolMachinesListOK %+v", 200, o.Payload) +} + +func (o *V1CloudConfigsAwsPoolMachinesListOK) GetPayload() *models.V1AwsMachines { + return o.Payload +} + +func (o *V1CloudConfigsAwsPoolMachinesListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1AwsMachines) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_cloud_configs_aws_pool_machines_uid_delete_parameters.go b/api/client/v1/v1_cloud_configs_aws_pool_machines_uid_delete_parameters.go new file mode 100644 index 00000000..cd7ea19b --- /dev/null +++ b/api/client/v1/v1_cloud_configs_aws_pool_machines_uid_delete_parameters.go @@ -0,0 +1,178 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1CloudConfigsAwsPoolMachinesUIDDeleteParams creates a new V1CloudConfigsAwsPoolMachinesUIDDeleteParams object +// with the default values initialized. +func NewV1CloudConfigsAwsPoolMachinesUIDDeleteParams() *V1CloudConfigsAwsPoolMachinesUIDDeleteParams { + var () + return &V1CloudConfigsAwsPoolMachinesUIDDeleteParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudConfigsAwsPoolMachinesUIDDeleteParamsWithTimeout creates a new V1CloudConfigsAwsPoolMachinesUIDDeleteParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudConfigsAwsPoolMachinesUIDDeleteParamsWithTimeout(timeout time.Duration) *V1CloudConfigsAwsPoolMachinesUIDDeleteParams { + var () + return &V1CloudConfigsAwsPoolMachinesUIDDeleteParams{ + + timeout: timeout, + } +} + +// NewV1CloudConfigsAwsPoolMachinesUIDDeleteParamsWithContext creates a new V1CloudConfigsAwsPoolMachinesUIDDeleteParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudConfigsAwsPoolMachinesUIDDeleteParamsWithContext(ctx context.Context) *V1CloudConfigsAwsPoolMachinesUIDDeleteParams { + var () + return &V1CloudConfigsAwsPoolMachinesUIDDeleteParams{ + + Context: ctx, + } +} + +// NewV1CloudConfigsAwsPoolMachinesUIDDeleteParamsWithHTTPClient creates a new V1CloudConfigsAwsPoolMachinesUIDDeleteParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudConfigsAwsPoolMachinesUIDDeleteParamsWithHTTPClient(client *http.Client) *V1CloudConfigsAwsPoolMachinesUIDDeleteParams { + var () + return &V1CloudConfigsAwsPoolMachinesUIDDeleteParams{ + HTTPClient: client, + } +} + +/* +V1CloudConfigsAwsPoolMachinesUIDDeleteParams contains all the parameters to send to the API endpoint +for the v1 cloud configs aws pool machines Uid delete operation typically these are written to a http.Request +*/ +type V1CloudConfigsAwsPoolMachinesUIDDeleteParams struct { + + /*ConfigUID + Cluster's cloud config uid + + */ + ConfigUID string + /*MachinePoolName + Machine pool name + + */ + MachinePoolName string + /*MachineUID + Machine uid + + */ + MachineUID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud configs aws pool machines Uid delete params +func (o *V1CloudConfigsAwsPoolMachinesUIDDeleteParams) WithTimeout(timeout time.Duration) *V1CloudConfigsAwsPoolMachinesUIDDeleteParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud configs aws pool machines Uid delete params +func (o *V1CloudConfigsAwsPoolMachinesUIDDeleteParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud configs aws pool machines Uid delete params +func (o *V1CloudConfigsAwsPoolMachinesUIDDeleteParams) WithContext(ctx context.Context) *V1CloudConfigsAwsPoolMachinesUIDDeleteParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud configs aws pool machines Uid delete params +func (o *V1CloudConfigsAwsPoolMachinesUIDDeleteParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud configs aws pool machines Uid delete params +func (o *V1CloudConfigsAwsPoolMachinesUIDDeleteParams) WithHTTPClient(client *http.Client) *V1CloudConfigsAwsPoolMachinesUIDDeleteParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud configs aws pool machines Uid delete params +func (o *V1CloudConfigsAwsPoolMachinesUIDDeleteParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithConfigUID adds the configUID to the v1 cloud configs aws pool machines Uid delete params +func (o *V1CloudConfigsAwsPoolMachinesUIDDeleteParams) WithConfigUID(configUID string) *V1CloudConfigsAwsPoolMachinesUIDDeleteParams { + o.SetConfigUID(configUID) + return o +} + +// SetConfigUID adds the configUid to the v1 cloud configs aws pool machines Uid delete params +func (o *V1CloudConfigsAwsPoolMachinesUIDDeleteParams) SetConfigUID(configUID string) { + o.ConfigUID = configUID +} + +// WithMachinePoolName adds the machinePoolName to the v1 cloud configs aws pool machines Uid delete params +func (o *V1CloudConfigsAwsPoolMachinesUIDDeleteParams) WithMachinePoolName(machinePoolName string) *V1CloudConfigsAwsPoolMachinesUIDDeleteParams { + o.SetMachinePoolName(machinePoolName) + return o +} + +// SetMachinePoolName adds the machinePoolName to the v1 cloud configs aws pool machines Uid delete params +func (o *V1CloudConfigsAwsPoolMachinesUIDDeleteParams) SetMachinePoolName(machinePoolName string) { + o.MachinePoolName = machinePoolName +} + +// WithMachineUID adds the machineUID to the v1 cloud configs aws pool machines Uid delete params +func (o *V1CloudConfigsAwsPoolMachinesUIDDeleteParams) WithMachineUID(machineUID string) *V1CloudConfigsAwsPoolMachinesUIDDeleteParams { + o.SetMachineUID(machineUID) + return o +} + +// SetMachineUID adds the machineUid to the v1 cloud configs aws pool machines Uid delete params +func (o *V1CloudConfigsAwsPoolMachinesUIDDeleteParams) SetMachineUID(machineUID string) { + o.MachineUID = machineUID +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudConfigsAwsPoolMachinesUIDDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param configUid + if err := r.SetPathParam("configUid", o.ConfigUID); err != nil { + return err + } + + // path param machinePoolName + if err := r.SetPathParam("machinePoolName", o.MachinePoolName); err != nil { + return err + } + + // path param machineUid + if err := r.SetPathParam("machineUid", o.MachineUID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_configs_aws_pool_machines_uid_delete_responses.go b/api/client/v1/v1_cloud_configs_aws_pool_machines_uid_delete_responses.go new file mode 100644 index 00000000..4e470276 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_aws_pool_machines_uid_delete_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1CloudConfigsAwsPoolMachinesUIDDeleteReader is a Reader for the V1CloudConfigsAwsPoolMachinesUIDDelete structure. +type V1CloudConfigsAwsPoolMachinesUIDDeleteReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudConfigsAwsPoolMachinesUIDDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1CloudConfigsAwsPoolMachinesUIDDeleteNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudConfigsAwsPoolMachinesUIDDeleteNoContent creates a V1CloudConfigsAwsPoolMachinesUIDDeleteNoContent with default headers values +func NewV1CloudConfigsAwsPoolMachinesUIDDeleteNoContent() *V1CloudConfigsAwsPoolMachinesUIDDeleteNoContent { + return &V1CloudConfigsAwsPoolMachinesUIDDeleteNoContent{} +} + +/* +V1CloudConfigsAwsPoolMachinesUIDDeleteNoContent handles this case with default header values. + +The resource was deleted successfully +*/ +type V1CloudConfigsAwsPoolMachinesUIDDeleteNoContent struct { +} + +func (o *V1CloudConfigsAwsPoolMachinesUIDDeleteNoContent) Error() string { + return fmt.Sprintf("[DELETE /v1/cloudconfigs/aws/{configUid}/machinePools/{machinePoolName}/machines/{machineUid}][%d] v1CloudConfigsAwsPoolMachinesUidDeleteNoContent ", 204) +} + +func (o *V1CloudConfigsAwsPoolMachinesUIDDeleteNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_cloud_configs_aws_pool_machines_uid_get_parameters.go b/api/client/v1/v1_cloud_configs_aws_pool_machines_uid_get_parameters.go new file mode 100644 index 00000000..a52f2908 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_aws_pool_machines_uid_get_parameters.go @@ -0,0 +1,178 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1CloudConfigsAwsPoolMachinesUIDGetParams creates a new V1CloudConfigsAwsPoolMachinesUIDGetParams object +// with the default values initialized. +func NewV1CloudConfigsAwsPoolMachinesUIDGetParams() *V1CloudConfigsAwsPoolMachinesUIDGetParams { + var () + return &V1CloudConfigsAwsPoolMachinesUIDGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudConfigsAwsPoolMachinesUIDGetParamsWithTimeout creates a new V1CloudConfigsAwsPoolMachinesUIDGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudConfigsAwsPoolMachinesUIDGetParamsWithTimeout(timeout time.Duration) *V1CloudConfigsAwsPoolMachinesUIDGetParams { + var () + return &V1CloudConfigsAwsPoolMachinesUIDGetParams{ + + timeout: timeout, + } +} + +// NewV1CloudConfigsAwsPoolMachinesUIDGetParamsWithContext creates a new V1CloudConfigsAwsPoolMachinesUIDGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudConfigsAwsPoolMachinesUIDGetParamsWithContext(ctx context.Context) *V1CloudConfigsAwsPoolMachinesUIDGetParams { + var () + return &V1CloudConfigsAwsPoolMachinesUIDGetParams{ + + Context: ctx, + } +} + +// NewV1CloudConfigsAwsPoolMachinesUIDGetParamsWithHTTPClient creates a new V1CloudConfigsAwsPoolMachinesUIDGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudConfigsAwsPoolMachinesUIDGetParamsWithHTTPClient(client *http.Client) *V1CloudConfigsAwsPoolMachinesUIDGetParams { + var () + return &V1CloudConfigsAwsPoolMachinesUIDGetParams{ + HTTPClient: client, + } +} + +/* +V1CloudConfigsAwsPoolMachinesUIDGetParams contains all the parameters to send to the API endpoint +for the v1 cloud configs aws pool machines Uid get operation typically these are written to a http.Request +*/ +type V1CloudConfigsAwsPoolMachinesUIDGetParams struct { + + /*ConfigUID + Cluster's cloud config uid + + */ + ConfigUID string + /*MachinePoolName + Machine pool name + + */ + MachinePoolName string + /*MachineUID + Machine uid + + */ + MachineUID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud configs aws pool machines Uid get params +func (o *V1CloudConfigsAwsPoolMachinesUIDGetParams) WithTimeout(timeout time.Duration) *V1CloudConfigsAwsPoolMachinesUIDGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud configs aws pool machines Uid get params +func (o *V1CloudConfigsAwsPoolMachinesUIDGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud configs aws pool machines Uid get params +func (o *V1CloudConfigsAwsPoolMachinesUIDGetParams) WithContext(ctx context.Context) *V1CloudConfigsAwsPoolMachinesUIDGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud configs aws pool machines Uid get params +func (o *V1CloudConfigsAwsPoolMachinesUIDGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud configs aws pool machines Uid get params +func (o *V1CloudConfigsAwsPoolMachinesUIDGetParams) WithHTTPClient(client *http.Client) *V1CloudConfigsAwsPoolMachinesUIDGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud configs aws pool machines Uid get params +func (o *V1CloudConfigsAwsPoolMachinesUIDGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithConfigUID adds the configUID to the v1 cloud configs aws pool machines Uid get params +func (o *V1CloudConfigsAwsPoolMachinesUIDGetParams) WithConfigUID(configUID string) *V1CloudConfigsAwsPoolMachinesUIDGetParams { + o.SetConfigUID(configUID) + return o +} + +// SetConfigUID adds the configUid to the v1 cloud configs aws pool machines Uid get params +func (o *V1CloudConfigsAwsPoolMachinesUIDGetParams) SetConfigUID(configUID string) { + o.ConfigUID = configUID +} + +// WithMachinePoolName adds the machinePoolName to the v1 cloud configs aws pool machines Uid get params +func (o *V1CloudConfigsAwsPoolMachinesUIDGetParams) WithMachinePoolName(machinePoolName string) *V1CloudConfigsAwsPoolMachinesUIDGetParams { + o.SetMachinePoolName(machinePoolName) + return o +} + +// SetMachinePoolName adds the machinePoolName to the v1 cloud configs aws pool machines Uid get params +func (o *V1CloudConfigsAwsPoolMachinesUIDGetParams) SetMachinePoolName(machinePoolName string) { + o.MachinePoolName = machinePoolName +} + +// WithMachineUID adds the machineUID to the v1 cloud configs aws pool machines Uid get params +func (o *V1CloudConfigsAwsPoolMachinesUIDGetParams) WithMachineUID(machineUID string) *V1CloudConfigsAwsPoolMachinesUIDGetParams { + o.SetMachineUID(machineUID) + return o +} + +// SetMachineUID adds the machineUid to the v1 cloud configs aws pool machines Uid get params +func (o *V1CloudConfigsAwsPoolMachinesUIDGetParams) SetMachineUID(machineUID string) { + o.MachineUID = machineUID +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudConfigsAwsPoolMachinesUIDGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param configUid + if err := r.SetPathParam("configUid", o.ConfigUID); err != nil { + return err + } + + // path param machinePoolName + if err := r.SetPathParam("machinePoolName", o.MachinePoolName); err != nil { + return err + } + + // path param machineUid + if err := r.SetPathParam("machineUid", o.MachineUID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_configs_aws_pool_machines_uid_get_responses.go b/api/client/v1/v1_cloud_configs_aws_pool_machines_uid_get_responses.go new file mode 100644 index 00000000..4674e29c --- /dev/null +++ b/api/client/v1/v1_cloud_configs_aws_pool_machines_uid_get_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1CloudConfigsAwsPoolMachinesUIDGetReader is a Reader for the V1CloudConfigsAwsPoolMachinesUIDGet structure. +type V1CloudConfigsAwsPoolMachinesUIDGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudConfigsAwsPoolMachinesUIDGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1CloudConfigsAwsPoolMachinesUIDGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudConfigsAwsPoolMachinesUIDGetOK creates a V1CloudConfigsAwsPoolMachinesUIDGetOK with default headers values +func NewV1CloudConfigsAwsPoolMachinesUIDGetOK() *V1CloudConfigsAwsPoolMachinesUIDGetOK { + return &V1CloudConfigsAwsPoolMachinesUIDGetOK{} +} + +/* +V1CloudConfigsAwsPoolMachinesUIDGetOK handles this case with default header values. + +OK +*/ +type V1CloudConfigsAwsPoolMachinesUIDGetOK struct { + Payload *models.V1AwsMachine +} + +func (o *V1CloudConfigsAwsPoolMachinesUIDGetOK) Error() string { + return fmt.Sprintf("[GET /v1/cloudconfigs/aws/{configUid}/machinePools/{machinePoolName}/machines/{machineUid}][%d] v1CloudConfigsAwsPoolMachinesUidGetOK %+v", 200, o.Payload) +} + +func (o *V1CloudConfigsAwsPoolMachinesUIDGetOK) GetPayload() *models.V1AwsMachine { + return o.Payload +} + +func (o *V1CloudConfigsAwsPoolMachinesUIDGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1AwsMachine) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_cloud_configs_aws_pool_machines_uid_update_parameters.go b/api/client/v1/v1_cloud_configs_aws_pool_machines_uid_update_parameters.go new file mode 100644 index 00000000..35900b9e --- /dev/null +++ b/api/client/v1/v1_cloud_configs_aws_pool_machines_uid_update_parameters.go @@ -0,0 +1,199 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1CloudConfigsAwsPoolMachinesUIDUpdateParams creates a new V1CloudConfigsAwsPoolMachinesUIDUpdateParams object +// with the default values initialized. +func NewV1CloudConfigsAwsPoolMachinesUIDUpdateParams() *V1CloudConfigsAwsPoolMachinesUIDUpdateParams { + var () + return &V1CloudConfigsAwsPoolMachinesUIDUpdateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudConfigsAwsPoolMachinesUIDUpdateParamsWithTimeout creates a new V1CloudConfigsAwsPoolMachinesUIDUpdateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudConfigsAwsPoolMachinesUIDUpdateParamsWithTimeout(timeout time.Duration) *V1CloudConfigsAwsPoolMachinesUIDUpdateParams { + var () + return &V1CloudConfigsAwsPoolMachinesUIDUpdateParams{ + + timeout: timeout, + } +} + +// NewV1CloudConfigsAwsPoolMachinesUIDUpdateParamsWithContext creates a new V1CloudConfigsAwsPoolMachinesUIDUpdateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudConfigsAwsPoolMachinesUIDUpdateParamsWithContext(ctx context.Context) *V1CloudConfigsAwsPoolMachinesUIDUpdateParams { + var () + return &V1CloudConfigsAwsPoolMachinesUIDUpdateParams{ + + Context: ctx, + } +} + +// NewV1CloudConfigsAwsPoolMachinesUIDUpdateParamsWithHTTPClient creates a new V1CloudConfigsAwsPoolMachinesUIDUpdateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudConfigsAwsPoolMachinesUIDUpdateParamsWithHTTPClient(client *http.Client) *V1CloudConfigsAwsPoolMachinesUIDUpdateParams { + var () + return &V1CloudConfigsAwsPoolMachinesUIDUpdateParams{ + HTTPClient: client, + } +} + +/* +V1CloudConfigsAwsPoolMachinesUIDUpdateParams contains all the parameters to send to the API endpoint +for the v1 cloud configs aws pool machines Uid update operation typically these are written to a http.Request +*/ +type V1CloudConfigsAwsPoolMachinesUIDUpdateParams struct { + + /*Body*/ + Body *models.V1AwsMachine + /*ConfigUID + Cluster's cloud config uid + + */ + ConfigUID string + /*MachinePoolName + Machine pool name + + */ + MachinePoolName string + /*MachineUID + Machine uid + + */ + MachineUID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud configs aws pool machines Uid update params +func (o *V1CloudConfigsAwsPoolMachinesUIDUpdateParams) WithTimeout(timeout time.Duration) *V1CloudConfigsAwsPoolMachinesUIDUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud configs aws pool machines Uid update params +func (o *V1CloudConfigsAwsPoolMachinesUIDUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud configs aws pool machines Uid update params +func (o *V1CloudConfigsAwsPoolMachinesUIDUpdateParams) WithContext(ctx context.Context) *V1CloudConfigsAwsPoolMachinesUIDUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud configs aws pool machines Uid update params +func (o *V1CloudConfigsAwsPoolMachinesUIDUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud configs aws pool machines Uid update params +func (o *V1CloudConfigsAwsPoolMachinesUIDUpdateParams) WithHTTPClient(client *http.Client) *V1CloudConfigsAwsPoolMachinesUIDUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud configs aws pool machines Uid update params +func (o *V1CloudConfigsAwsPoolMachinesUIDUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 cloud configs aws pool machines Uid update params +func (o *V1CloudConfigsAwsPoolMachinesUIDUpdateParams) WithBody(body *models.V1AwsMachine) *V1CloudConfigsAwsPoolMachinesUIDUpdateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 cloud configs aws pool machines Uid update params +func (o *V1CloudConfigsAwsPoolMachinesUIDUpdateParams) SetBody(body *models.V1AwsMachine) { + o.Body = body +} + +// WithConfigUID adds the configUID to the v1 cloud configs aws pool machines Uid update params +func (o *V1CloudConfigsAwsPoolMachinesUIDUpdateParams) WithConfigUID(configUID string) *V1CloudConfigsAwsPoolMachinesUIDUpdateParams { + o.SetConfigUID(configUID) + return o +} + +// SetConfigUID adds the configUid to the v1 cloud configs aws pool machines Uid update params +func (o *V1CloudConfigsAwsPoolMachinesUIDUpdateParams) SetConfigUID(configUID string) { + o.ConfigUID = configUID +} + +// WithMachinePoolName adds the machinePoolName to the v1 cloud configs aws pool machines Uid update params +func (o *V1CloudConfigsAwsPoolMachinesUIDUpdateParams) WithMachinePoolName(machinePoolName string) *V1CloudConfigsAwsPoolMachinesUIDUpdateParams { + o.SetMachinePoolName(machinePoolName) + return o +} + +// SetMachinePoolName adds the machinePoolName to the v1 cloud configs aws pool machines Uid update params +func (o *V1CloudConfigsAwsPoolMachinesUIDUpdateParams) SetMachinePoolName(machinePoolName string) { + o.MachinePoolName = machinePoolName +} + +// WithMachineUID adds the machineUID to the v1 cloud configs aws pool machines Uid update params +func (o *V1CloudConfigsAwsPoolMachinesUIDUpdateParams) WithMachineUID(machineUID string) *V1CloudConfigsAwsPoolMachinesUIDUpdateParams { + o.SetMachineUID(machineUID) + return o +} + +// SetMachineUID adds the machineUid to the v1 cloud configs aws pool machines Uid update params +func (o *V1CloudConfigsAwsPoolMachinesUIDUpdateParams) SetMachineUID(machineUID string) { + o.MachineUID = machineUID +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudConfigsAwsPoolMachinesUIDUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param configUid + if err := r.SetPathParam("configUid", o.ConfigUID); err != nil { + return err + } + + // path param machinePoolName + if err := r.SetPathParam("machinePoolName", o.MachinePoolName); err != nil { + return err + } + + // path param machineUid + if err := r.SetPathParam("machineUid", o.MachineUID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_configs_aws_pool_machines_uid_update_responses.go b/api/client/v1/v1_cloud_configs_aws_pool_machines_uid_update_responses.go new file mode 100644 index 00000000..37ccb656 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_aws_pool_machines_uid_update_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1CloudConfigsAwsPoolMachinesUIDUpdateReader is a Reader for the V1CloudConfigsAwsPoolMachinesUIDUpdate structure. +type V1CloudConfigsAwsPoolMachinesUIDUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudConfigsAwsPoolMachinesUIDUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1CloudConfigsAwsPoolMachinesUIDUpdateNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudConfigsAwsPoolMachinesUIDUpdateNoContent creates a V1CloudConfigsAwsPoolMachinesUIDUpdateNoContent with default headers values +func NewV1CloudConfigsAwsPoolMachinesUIDUpdateNoContent() *V1CloudConfigsAwsPoolMachinesUIDUpdateNoContent { + return &V1CloudConfigsAwsPoolMachinesUIDUpdateNoContent{} +} + +/* +V1CloudConfigsAwsPoolMachinesUIDUpdateNoContent handles this case with default header values. + +The resource was updated successfully +*/ +type V1CloudConfigsAwsPoolMachinesUIDUpdateNoContent struct { +} + +func (o *V1CloudConfigsAwsPoolMachinesUIDUpdateNoContent) Error() string { + return fmt.Sprintf("[PUT /v1/cloudconfigs/aws/{configUid}/machinePools/{machinePoolName}/machines/{machineUid}][%d] v1CloudConfigsAwsPoolMachinesUidUpdateNoContent ", 204) +} + +func (o *V1CloudConfigsAwsPoolMachinesUIDUpdateNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_cloud_configs_aws_uid_cluster_config_parameters.go b/api/client/v1/v1_cloud_configs_aws_uid_cluster_config_parameters.go new file mode 100644 index 00000000..85c9b8b3 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_aws_uid_cluster_config_parameters.go @@ -0,0 +1,157 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1CloudConfigsAwsUIDClusterConfigParams creates a new V1CloudConfigsAwsUIDClusterConfigParams object +// with the default values initialized. +func NewV1CloudConfigsAwsUIDClusterConfigParams() *V1CloudConfigsAwsUIDClusterConfigParams { + var () + return &V1CloudConfigsAwsUIDClusterConfigParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudConfigsAwsUIDClusterConfigParamsWithTimeout creates a new V1CloudConfigsAwsUIDClusterConfigParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudConfigsAwsUIDClusterConfigParamsWithTimeout(timeout time.Duration) *V1CloudConfigsAwsUIDClusterConfigParams { + var () + return &V1CloudConfigsAwsUIDClusterConfigParams{ + + timeout: timeout, + } +} + +// NewV1CloudConfigsAwsUIDClusterConfigParamsWithContext creates a new V1CloudConfigsAwsUIDClusterConfigParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudConfigsAwsUIDClusterConfigParamsWithContext(ctx context.Context) *V1CloudConfigsAwsUIDClusterConfigParams { + var () + return &V1CloudConfigsAwsUIDClusterConfigParams{ + + Context: ctx, + } +} + +// NewV1CloudConfigsAwsUIDClusterConfigParamsWithHTTPClient creates a new V1CloudConfigsAwsUIDClusterConfigParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudConfigsAwsUIDClusterConfigParamsWithHTTPClient(client *http.Client) *V1CloudConfigsAwsUIDClusterConfigParams { + var () + return &V1CloudConfigsAwsUIDClusterConfigParams{ + HTTPClient: client, + } +} + +/* +V1CloudConfigsAwsUIDClusterConfigParams contains all the parameters to send to the API endpoint +for the v1 cloud configs aws Uid cluster config operation typically these are written to a http.Request +*/ +type V1CloudConfigsAwsUIDClusterConfigParams struct { + + /*Body*/ + Body *models.V1AwsCloudClusterConfigEntity + /*ConfigUID + Cluster's cloud config uid + + */ + ConfigUID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud configs aws Uid cluster config params +func (o *V1CloudConfigsAwsUIDClusterConfigParams) WithTimeout(timeout time.Duration) *V1CloudConfigsAwsUIDClusterConfigParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud configs aws Uid cluster config params +func (o *V1CloudConfigsAwsUIDClusterConfigParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud configs aws Uid cluster config params +func (o *V1CloudConfigsAwsUIDClusterConfigParams) WithContext(ctx context.Context) *V1CloudConfigsAwsUIDClusterConfigParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud configs aws Uid cluster config params +func (o *V1CloudConfigsAwsUIDClusterConfigParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud configs aws Uid cluster config params +func (o *V1CloudConfigsAwsUIDClusterConfigParams) WithHTTPClient(client *http.Client) *V1CloudConfigsAwsUIDClusterConfigParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud configs aws Uid cluster config params +func (o *V1CloudConfigsAwsUIDClusterConfigParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 cloud configs aws Uid cluster config params +func (o *V1CloudConfigsAwsUIDClusterConfigParams) WithBody(body *models.V1AwsCloudClusterConfigEntity) *V1CloudConfigsAwsUIDClusterConfigParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 cloud configs aws Uid cluster config params +func (o *V1CloudConfigsAwsUIDClusterConfigParams) SetBody(body *models.V1AwsCloudClusterConfigEntity) { + o.Body = body +} + +// WithConfigUID adds the configUID to the v1 cloud configs aws Uid cluster config params +func (o *V1CloudConfigsAwsUIDClusterConfigParams) WithConfigUID(configUID string) *V1CloudConfigsAwsUIDClusterConfigParams { + o.SetConfigUID(configUID) + return o +} + +// SetConfigUID adds the configUid to the v1 cloud configs aws Uid cluster config params +func (o *V1CloudConfigsAwsUIDClusterConfigParams) SetConfigUID(configUID string) { + o.ConfigUID = configUID +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudConfigsAwsUIDClusterConfigParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param configUid + if err := r.SetPathParam("configUid", o.ConfigUID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_configs_aws_uid_cluster_config_responses.go b/api/client/v1/v1_cloud_configs_aws_uid_cluster_config_responses.go new file mode 100644 index 00000000..28a19d3e --- /dev/null +++ b/api/client/v1/v1_cloud_configs_aws_uid_cluster_config_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1CloudConfigsAwsUIDClusterConfigReader is a Reader for the V1CloudConfigsAwsUIDClusterConfig structure. +type V1CloudConfigsAwsUIDClusterConfigReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudConfigsAwsUIDClusterConfigReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1CloudConfigsAwsUIDClusterConfigNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudConfigsAwsUIDClusterConfigNoContent creates a V1CloudConfigsAwsUIDClusterConfigNoContent with default headers values +func NewV1CloudConfigsAwsUIDClusterConfigNoContent() *V1CloudConfigsAwsUIDClusterConfigNoContent { + return &V1CloudConfigsAwsUIDClusterConfigNoContent{} +} + +/* +V1CloudConfigsAwsUIDClusterConfigNoContent handles this case with default header values. + +The resource was updated successfully +*/ +type V1CloudConfigsAwsUIDClusterConfigNoContent struct { +} + +func (o *V1CloudConfigsAwsUIDClusterConfigNoContent) Error() string { + return fmt.Sprintf("[PUT /v1/cloudconfigs/aws/{configUid}/clusterConfig][%d] v1CloudConfigsAwsUidClusterConfigNoContent ", 204) +} + +func (o *V1CloudConfigsAwsUIDClusterConfigNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_cloud_configs_azure_get_parameters.go b/api/client/v1/v1_cloud_configs_azure_get_parameters.go new file mode 100644 index 00000000..852c02e4 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_azure_get_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1CloudConfigsAzureGetParams creates a new V1CloudConfigsAzureGetParams object +// with the default values initialized. +func NewV1CloudConfigsAzureGetParams() *V1CloudConfigsAzureGetParams { + var () + return &V1CloudConfigsAzureGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudConfigsAzureGetParamsWithTimeout creates a new V1CloudConfigsAzureGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudConfigsAzureGetParamsWithTimeout(timeout time.Duration) *V1CloudConfigsAzureGetParams { + var () + return &V1CloudConfigsAzureGetParams{ + + timeout: timeout, + } +} + +// NewV1CloudConfigsAzureGetParamsWithContext creates a new V1CloudConfigsAzureGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudConfigsAzureGetParamsWithContext(ctx context.Context) *V1CloudConfigsAzureGetParams { + var () + return &V1CloudConfigsAzureGetParams{ + + Context: ctx, + } +} + +// NewV1CloudConfigsAzureGetParamsWithHTTPClient creates a new V1CloudConfigsAzureGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudConfigsAzureGetParamsWithHTTPClient(client *http.Client) *V1CloudConfigsAzureGetParams { + var () + return &V1CloudConfigsAzureGetParams{ + HTTPClient: client, + } +} + +/* +V1CloudConfigsAzureGetParams contains all the parameters to send to the API endpoint +for the v1 cloud configs azure get operation typically these are written to a http.Request +*/ +type V1CloudConfigsAzureGetParams struct { + + /*ConfigUID + Cluster's cloud config uid + + */ + ConfigUID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud configs azure get params +func (o *V1CloudConfigsAzureGetParams) WithTimeout(timeout time.Duration) *V1CloudConfigsAzureGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud configs azure get params +func (o *V1CloudConfigsAzureGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud configs azure get params +func (o *V1CloudConfigsAzureGetParams) WithContext(ctx context.Context) *V1CloudConfigsAzureGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud configs azure get params +func (o *V1CloudConfigsAzureGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud configs azure get params +func (o *V1CloudConfigsAzureGetParams) WithHTTPClient(client *http.Client) *V1CloudConfigsAzureGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud configs azure get params +func (o *V1CloudConfigsAzureGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithConfigUID adds the configUID to the v1 cloud configs azure get params +func (o *V1CloudConfigsAzureGetParams) WithConfigUID(configUID string) *V1CloudConfigsAzureGetParams { + o.SetConfigUID(configUID) + return o +} + +// SetConfigUID adds the configUid to the v1 cloud configs azure get params +func (o *V1CloudConfigsAzureGetParams) SetConfigUID(configUID string) { + o.ConfigUID = configUID +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudConfigsAzureGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param configUid + if err := r.SetPathParam("configUid", o.ConfigUID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_configs_azure_get_responses.go b/api/client/v1/v1_cloud_configs_azure_get_responses.go new file mode 100644 index 00000000..226b07cf --- /dev/null +++ b/api/client/v1/v1_cloud_configs_azure_get_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1CloudConfigsAzureGetReader is a Reader for the V1CloudConfigsAzureGet structure. +type V1CloudConfigsAzureGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudConfigsAzureGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1CloudConfigsAzureGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudConfigsAzureGetOK creates a V1CloudConfigsAzureGetOK with default headers values +func NewV1CloudConfigsAzureGetOK() *V1CloudConfigsAzureGetOK { + return &V1CloudConfigsAzureGetOK{} +} + +/* +V1CloudConfigsAzureGetOK handles this case with default header values. + +OK +*/ +type V1CloudConfigsAzureGetOK struct { + Payload *models.V1AzureCloudConfig +} + +func (o *V1CloudConfigsAzureGetOK) Error() string { + return fmt.Sprintf("[GET /v1/cloudconfigs/azure/{configUid}][%d] v1CloudConfigsAzureGetOK %+v", 200, o.Payload) +} + +func (o *V1CloudConfigsAzureGetOK) GetPayload() *models.V1AzureCloudConfig { + return o.Payload +} + +func (o *V1CloudConfigsAzureGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1AzureCloudConfig) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_cloud_configs_azure_machine_pool_create_parameters.go b/api/client/v1/v1_cloud_configs_azure_machine_pool_create_parameters.go new file mode 100644 index 00000000..c1bb0fff --- /dev/null +++ b/api/client/v1/v1_cloud_configs_azure_machine_pool_create_parameters.go @@ -0,0 +1,157 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1CloudConfigsAzureMachinePoolCreateParams creates a new V1CloudConfigsAzureMachinePoolCreateParams object +// with the default values initialized. +func NewV1CloudConfigsAzureMachinePoolCreateParams() *V1CloudConfigsAzureMachinePoolCreateParams { + var () + return &V1CloudConfigsAzureMachinePoolCreateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudConfigsAzureMachinePoolCreateParamsWithTimeout creates a new V1CloudConfigsAzureMachinePoolCreateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudConfigsAzureMachinePoolCreateParamsWithTimeout(timeout time.Duration) *V1CloudConfigsAzureMachinePoolCreateParams { + var () + return &V1CloudConfigsAzureMachinePoolCreateParams{ + + timeout: timeout, + } +} + +// NewV1CloudConfigsAzureMachinePoolCreateParamsWithContext creates a new V1CloudConfigsAzureMachinePoolCreateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudConfigsAzureMachinePoolCreateParamsWithContext(ctx context.Context) *V1CloudConfigsAzureMachinePoolCreateParams { + var () + return &V1CloudConfigsAzureMachinePoolCreateParams{ + + Context: ctx, + } +} + +// NewV1CloudConfigsAzureMachinePoolCreateParamsWithHTTPClient creates a new V1CloudConfigsAzureMachinePoolCreateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudConfigsAzureMachinePoolCreateParamsWithHTTPClient(client *http.Client) *V1CloudConfigsAzureMachinePoolCreateParams { + var () + return &V1CloudConfigsAzureMachinePoolCreateParams{ + HTTPClient: client, + } +} + +/* +V1CloudConfigsAzureMachinePoolCreateParams contains all the parameters to send to the API endpoint +for the v1 cloud configs azure machine pool create operation typically these are written to a http.Request +*/ +type V1CloudConfigsAzureMachinePoolCreateParams struct { + + /*Body*/ + Body *models.V1AzureMachinePoolConfigEntity + /*ConfigUID + Cluster's cloud config uid + + */ + ConfigUID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud configs azure machine pool create params +func (o *V1CloudConfigsAzureMachinePoolCreateParams) WithTimeout(timeout time.Duration) *V1CloudConfigsAzureMachinePoolCreateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud configs azure machine pool create params +func (o *V1CloudConfigsAzureMachinePoolCreateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud configs azure machine pool create params +func (o *V1CloudConfigsAzureMachinePoolCreateParams) WithContext(ctx context.Context) *V1CloudConfigsAzureMachinePoolCreateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud configs azure machine pool create params +func (o *V1CloudConfigsAzureMachinePoolCreateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud configs azure machine pool create params +func (o *V1CloudConfigsAzureMachinePoolCreateParams) WithHTTPClient(client *http.Client) *V1CloudConfigsAzureMachinePoolCreateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud configs azure machine pool create params +func (o *V1CloudConfigsAzureMachinePoolCreateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 cloud configs azure machine pool create params +func (o *V1CloudConfigsAzureMachinePoolCreateParams) WithBody(body *models.V1AzureMachinePoolConfigEntity) *V1CloudConfigsAzureMachinePoolCreateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 cloud configs azure machine pool create params +func (o *V1CloudConfigsAzureMachinePoolCreateParams) SetBody(body *models.V1AzureMachinePoolConfigEntity) { + o.Body = body +} + +// WithConfigUID adds the configUID to the v1 cloud configs azure machine pool create params +func (o *V1CloudConfigsAzureMachinePoolCreateParams) WithConfigUID(configUID string) *V1CloudConfigsAzureMachinePoolCreateParams { + o.SetConfigUID(configUID) + return o +} + +// SetConfigUID adds the configUid to the v1 cloud configs azure machine pool create params +func (o *V1CloudConfigsAzureMachinePoolCreateParams) SetConfigUID(configUID string) { + o.ConfigUID = configUID +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudConfigsAzureMachinePoolCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param configUid + if err := r.SetPathParam("configUid", o.ConfigUID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_configs_azure_machine_pool_create_responses.go b/api/client/v1/v1_cloud_configs_azure_machine_pool_create_responses.go new file mode 100644 index 00000000..a1b14c43 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_azure_machine_pool_create_responses.go @@ -0,0 +1,77 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1CloudConfigsAzureMachinePoolCreateReader is a Reader for the V1CloudConfigsAzureMachinePoolCreate structure. +type V1CloudConfigsAzureMachinePoolCreateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudConfigsAzureMachinePoolCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 201: + result := NewV1CloudConfigsAzureMachinePoolCreateCreated() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudConfigsAzureMachinePoolCreateCreated creates a V1CloudConfigsAzureMachinePoolCreateCreated with default headers values +func NewV1CloudConfigsAzureMachinePoolCreateCreated() *V1CloudConfigsAzureMachinePoolCreateCreated { + return &V1CloudConfigsAzureMachinePoolCreateCreated{} +} + +/* +V1CloudConfigsAzureMachinePoolCreateCreated handles this case with default header values. + +Created successfully +*/ +type V1CloudConfigsAzureMachinePoolCreateCreated struct { + /*Audit uid for the request + */ + AuditUID string + + Payload *models.V1UID +} + +func (o *V1CloudConfigsAzureMachinePoolCreateCreated) Error() string { + return fmt.Sprintf("[POST /v1/cloudconfigs/azure/{configUid}/machinePools][%d] v1CloudConfigsAzureMachinePoolCreateCreated %+v", 201, o.Payload) +} + +func (o *V1CloudConfigsAzureMachinePoolCreateCreated) GetPayload() *models.V1UID { + return o.Payload +} + +func (o *V1CloudConfigsAzureMachinePoolCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header AuditUid + o.AuditUID = response.GetHeader("AuditUid") + + o.Payload = new(models.V1UID) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_cloud_configs_azure_machine_pool_delete_parameters.go b/api/client/v1/v1_cloud_configs_azure_machine_pool_delete_parameters.go new file mode 100644 index 00000000..1b6022ad --- /dev/null +++ b/api/client/v1/v1_cloud_configs_azure_machine_pool_delete_parameters.go @@ -0,0 +1,157 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1CloudConfigsAzureMachinePoolDeleteParams creates a new V1CloudConfigsAzureMachinePoolDeleteParams object +// with the default values initialized. +func NewV1CloudConfigsAzureMachinePoolDeleteParams() *V1CloudConfigsAzureMachinePoolDeleteParams { + var () + return &V1CloudConfigsAzureMachinePoolDeleteParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudConfigsAzureMachinePoolDeleteParamsWithTimeout creates a new V1CloudConfigsAzureMachinePoolDeleteParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudConfigsAzureMachinePoolDeleteParamsWithTimeout(timeout time.Duration) *V1CloudConfigsAzureMachinePoolDeleteParams { + var () + return &V1CloudConfigsAzureMachinePoolDeleteParams{ + + timeout: timeout, + } +} + +// NewV1CloudConfigsAzureMachinePoolDeleteParamsWithContext creates a new V1CloudConfigsAzureMachinePoolDeleteParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudConfigsAzureMachinePoolDeleteParamsWithContext(ctx context.Context) *V1CloudConfigsAzureMachinePoolDeleteParams { + var () + return &V1CloudConfigsAzureMachinePoolDeleteParams{ + + Context: ctx, + } +} + +// NewV1CloudConfigsAzureMachinePoolDeleteParamsWithHTTPClient creates a new V1CloudConfigsAzureMachinePoolDeleteParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudConfigsAzureMachinePoolDeleteParamsWithHTTPClient(client *http.Client) *V1CloudConfigsAzureMachinePoolDeleteParams { + var () + return &V1CloudConfigsAzureMachinePoolDeleteParams{ + HTTPClient: client, + } +} + +/* +V1CloudConfigsAzureMachinePoolDeleteParams contains all the parameters to send to the API endpoint +for the v1 cloud configs azure machine pool delete operation typically these are written to a http.Request +*/ +type V1CloudConfigsAzureMachinePoolDeleteParams struct { + + /*ConfigUID + Cluster's cloud config uid + + */ + ConfigUID string + /*MachinePoolName + Machine pool name + + */ + MachinePoolName string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud configs azure machine pool delete params +func (o *V1CloudConfigsAzureMachinePoolDeleteParams) WithTimeout(timeout time.Duration) *V1CloudConfigsAzureMachinePoolDeleteParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud configs azure machine pool delete params +func (o *V1CloudConfigsAzureMachinePoolDeleteParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud configs azure machine pool delete params +func (o *V1CloudConfigsAzureMachinePoolDeleteParams) WithContext(ctx context.Context) *V1CloudConfigsAzureMachinePoolDeleteParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud configs azure machine pool delete params +func (o *V1CloudConfigsAzureMachinePoolDeleteParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud configs azure machine pool delete params +func (o *V1CloudConfigsAzureMachinePoolDeleteParams) WithHTTPClient(client *http.Client) *V1CloudConfigsAzureMachinePoolDeleteParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud configs azure machine pool delete params +func (o *V1CloudConfigsAzureMachinePoolDeleteParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithConfigUID adds the configUID to the v1 cloud configs azure machine pool delete params +func (o *V1CloudConfigsAzureMachinePoolDeleteParams) WithConfigUID(configUID string) *V1CloudConfigsAzureMachinePoolDeleteParams { + o.SetConfigUID(configUID) + return o +} + +// SetConfigUID adds the configUid to the v1 cloud configs azure machine pool delete params +func (o *V1CloudConfigsAzureMachinePoolDeleteParams) SetConfigUID(configUID string) { + o.ConfigUID = configUID +} + +// WithMachinePoolName adds the machinePoolName to the v1 cloud configs azure machine pool delete params +func (o *V1CloudConfigsAzureMachinePoolDeleteParams) WithMachinePoolName(machinePoolName string) *V1CloudConfigsAzureMachinePoolDeleteParams { + o.SetMachinePoolName(machinePoolName) + return o +} + +// SetMachinePoolName adds the machinePoolName to the v1 cloud configs azure machine pool delete params +func (o *V1CloudConfigsAzureMachinePoolDeleteParams) SetMachinePoolName(machinePoolName string) { + o.MachinePoolName = machinePoolName +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudConfigsAzureMachinePoolDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param configUid + if err := r.SetPathParam("configUid", o.ConfigUID); err != nil { + return err + } + + // path param machinePoolName + if err := r.SetPathParam("machinePoolName", o.MachinePoolName); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_configs_azure_machine_pool_delete_responses.go b/api/client/v1/v1_cloud_configs_azure_machine_pool_delete_responses.go new file mode 100644 index 00000000..84adba29 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_azure_machine_pool_delete_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1CloudConfigsAzureMachinePoolDeleteReader is a Reader for the V1CloudConfigsAzureMachinePoolDelete structure. +type V1CloudConfigsAzureMachinePoolDeleteReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudConfigsAzureMachinePoolDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1CloudConfigsAzureMachinePoolDeleteNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudConfigsAzureMachinePoolDeleteNoContent creates a V1CloudConfigsAzureMachinePoolDeleteNoContent with default headers values +func NewV1CloudConfigsAzureMachinePoolDeleteNoContent() *V1CloudConfigsAzureMachinePoolDeleteNoContent { + return &V1CloudConfigsAzureMachinePoolDeleteNoContent{} +} + +/* +V1CloudConfigsAzureMachinePoolDeleteNoContent handles this case with default header values. + +The resource was deleted successfully +*/ +type V1CloudConfigsAzureMachinePoolDeleteNoContent struct { +} + +func (o *V1CloudConfigsAzureMachinePoolDeleteNoContent) Error() string { + return fmt.Sprintf("[DELETE /v1/cloudconfigs/azure/{configUid}/machinePools/{machinePoolName}][%d] v1CloudConfigsAzureMachinePoolDeleteNoContent ", 204) +} + +func (o *V1CloudConfigsAzureMachinePoolDeleteNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_cloud_configs_azure_machine_pool_update_parameters.go b/api/client/v1/v1_cloud_configs_azure_machine_pool_update_parameters.go new file mode 100644 index 00000000..24fd3cb9 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_azure_machine_pool_update_parameters.go @@ -0,0 +1,178 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1CloudConfigsAzureMachinePoolUpdateParams creates a new V1CloudConfigsAzureMachinePoolUpdateParams object +// with the default values initialized. +func NewV1CloudConfigsAzureMachinePoolUpdateParams() *V1CloudConfigsAzureMachinePoolUpdateParams { + var () + return &V1CloudConfigsAzureMachinePoolUpdateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudConfigsAzureMachinePoolUpdateParamsWithTimeout creates a new V1CloudConfigsAzureMachinePoolUpdateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudConfigsAzureMachinePoolUpdateParamsWithTimeout(timeout time.Duration) *V1CloudConfigsAzureMachinePoolUpdateParams { + var () + return &V1CloudConfigsAzureMachinePoolUpdateParams{ + + timeout: timeout, + } +} + +// NewV1CloudConfigsAzureMachinePoolUpdateParamsWithContext creates a new V1CloudConfigsAzureMachinePoolUpdateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudConfigsAzureMachinePoolUpdateParamsWithContext(ctx context.Context) *V1CloudConfigsAzureMachinePoolUpdateParams { + var () + return &V1CloudConfigsAzureMachinePoolUpdateParams{ + + Context: ctx, + } +} + +// NewV1CloudConfigsAzureMachinePoolUpdateParamsWithHTTPClient creates a new V1CloudConfigsAzureMachinePoolUpdateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudConfigsAzureMachinePoolUpdateParamsWithHTTPClient(client *http.Client) *V1CloudConfigsAzureMachinePoolUpdateParams { + var () + return &V1CloudConfigsAzureMachinePoolUpdateParams{ + HTTPClient: client, + } +} + +/* +V1CloudConfigsAzureMachinePoolUpdateParams contains all the parameters to send to the API endpoint +for the v1 cloud configs azure machine pool update operation typically these are written to a http.Request +*/ +type V1CloudConfigsAzureMachinePoolUpdateParams struct { + + /*Body*/ + Body *models.V1AzureMachinePoolConfigEntity + /*ConfigUID + Cluster's cloud config uid + + */ + ConfigUID string + /*MachinePoolName + Machine pool name + + */ + MachinePoolName string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud configs azure machine pool update params +func (o *V1CloudConfigsAzureMachinePoolUpdateParams) WithTimeout(timeout time.Duration) *V1CloudConfigsAzureMachinePoolUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud configs azure machine pool update params +func (o *V1CloudConfigsAzureMachinePoolUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud configs azure machine pool update params +func (o *V1CloudConfigsAzureMachinePoolUpdateParams) WithContext(ctx context.Context) *V1CloudConfigsAzureMachinePoolUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud configs azure machine pool update params +func (o *V1CloudConfigsAzureMachinePoolUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud configs azure machine pool update params +func (o *V1CloudConfigsAzureMachinePoolUpdateParams) WithHTTPClient(client *http.Client) *V1CloudConfigsAzureMachinePoolUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud configs azure machine pool update params +func (o *V1CloudConfigsAzureMachinePoolUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 cloud configs azure machine pool update params +func (o *V1CloudConfigsAzureMachinePoolUpdateParams) WithBody(body *models.V1AzureMachinePoolConfigEntity) *V1CloudConfigsAzureMachinePoolUpdateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 cloud configs azure machine pool update params +func (o *V1CloudConfigsAzureMachinePoolUpdateParams) SetBody(body *models.V1AzureMachinePoolConfigEntity) { + o.Body = body +} + +// WithConfigUID adds the configUID to the v1 cloud configs azure machine pool update params +func (o *V1CloudConfigsAzureMachinePoolUpdateParams) WithConfigUID(configUID string) *V1CloudConfigsAzureMachinePoolUpdateParams { + o.SetConfigUID(configUID) + return o +} + +// SetConfigUID adds the configUid to the v1 cloud configs azure machine pool update params +func (o *V1CloudConfigsAzureMachinePoolUpdateParams) SetConfigUID(configUID string) { + o.ConfigUID = configUID +} + +// WithMachinePoolName adds the machinePoolName to the v1 cloud configs azure machine pool update params +func (o *V1CloudConfigsAzureMachinePoolUpdateParams) WithMachinePoolName(machinePoolName string) *V1CloudConfigsAzureMachinePoolUpdateParams { + o.SetMachinePoolName(machinePoolName) + return o +} + +// SetMachinePoolName adds the machinePoolName to the v1 cloud configs azure machine pool update params +func (o *V1CloudConfigsAzureMachinePoolUpdateParams) SetMachinePoolName(machinePoolName string) { + o.MachinePoolName = machinePoolName +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudConfigsAzureMachinePoolUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param configUid + if err := r.SetPathParam("configUid", o.ConfigUID); err != nil { + return err + } + + // path param machinePoolName + if err := r.SetPathParam("machinePoolName", o.MachinePoolName); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_configs_azure_machine_pool_update_responses.go b/api/client/v1/v1_cloud_configs_azure_machine_pool_update_responses.go new file mode 100644 index 00000000..40a9654b --- /dev/null +++ b/api/client/v1/v1_cloud_configs_azure_machine_pool_update_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1CloudConfigsAzureMachinePoolUpdateReader is a Reader for the V1CloudConfigsAzureMachinePoolUpdate structure. +type V1CloudConfigsAzureMachinePoolUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudConfigsAzureMachinePoolUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1CloudConfigsAzureMachinePoolUpdateNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudConfigsAzureMachinePoolUpdateNoContent creates a V1CloudConfigsAzureMachinePoolUpdateNoContent with default headers values +func NewV1CloudConfigsAzureMachinePoolUpdateNoContent() *V1CloudConfigsAzureMachinePoolUpdateNoContent { + return &V1CloudConfigsAzureMachinePoolUpdateNoContent{} +} + +/* +V1CloudConfigsAzureMachinePoolUpdateNoContent handles this case with default header values. + +The resource was updated successfully +*/ +type V1CloudConfigsAzureMachinePoolUpdateNoContent struct { +} + +func (o *V1CloudConfigsAzureMachinePoolUpdateNoContent) Error() string { + return fmt.Sprintf("[PUT /v1/cloudconfigs/azure/{configUid}/machinePools/{machinePoolName}][%d] v1CloudConfigsAzureMachinePoolUpdateNoContent ", 204) +} + +func (o *V1CloudConfigsAzureMachinePoolUpdateNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_cloud_configs_azure_pool_machines_add_parameters.go b/api/client/v1/v1_cloud_configs_azure_pool_machines_add_parameters.go new file mode 100644 index 00000000..3ba1e595 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_azure_pool_machines_add_parameters.go @@ -0,0 +1,178 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1CloudConfigsAzurePoolMachinesAddParams creates a new V1CloudConfigsAzurePoolMachinesAddParams object +// with the default values initialized. +func NewV1CloudConfigsAzurePoolMachinesAddParams() *V1CloudConfigsAzurePoolMachinesAddParams { + var () + return &V1CloudConfigsAzurePoolMachinesAddParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudConfigsAzurePoolMachinesAddParamsWithTimeout creates a new V1CloudConfigsAzurePoolMachinesAddParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudConfigsAzurePoolMachinesAddParamsWithTimeout(timeout time.Duration) *V1CloudConfigsAzurePoolMachinesAddParams { + var () + return &V1CloudConfigsAzurePoolMachinesAddParams{ + + timeout: timeout, + } +} + +// NewV1CloudConfigsAzurePoolMachinesAddParamsWithContext creates a new V1CloudConfigsAzurePoolMachinesAddParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudConfigsAzurePoolMachinesAddParamsWithContext(ctx context.Context) *V1CloudConfigsAzurePoolMachinesAddParams { + var () + return &V1CloudConfigsAzurePoolMachinesAddParams{ + + Context: ctx, + } +} + +// NewV1CloudConfigsAzurePoolMachinesAddParamsWithHTTPClient creates a new V1CloudConfigsAzurePoolMachinesAddParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudConfigsAzurePoolMachinesAddParamsWithHTTPClient(client *http.Client) *V1CloudConfigsAzurePoolMachinesAddParams { + var () + return &V1CloudConfigsAzurePoolMachinesAddParams{ + HTTPClient: client, + } +} + +/* +V1CloudConfigsAzurePoolMachinesAddParams contains all the parameters to send to the API endpoint +for the v1 cloud configs azure pool machines add operation typically these are written to a http.Request +*/ +type V1CloudConfigsAzurePoolMachinesAddParams struct { + + /*Body*/ + Body *models.V1AzureMachine + /*ConfigUID + Cluster's cloud config uid + + */ + ConfigUID string + /*MachinePoolName + Machine pool name + + */ + MachinePoolName string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud configs azure pool machines add params +func (o *V1CloudConfigsAzurePoolMachinesAddParams) WithTimeout(timeout time.Duration) *V1CloudConfigsAzurePoolMachinesAddParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud configs azure pool machines add params +func (o *V1CloudConfigsAzurePoolMachinesAddParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud configs azure pool machines add params +func (o *V1CloudConfigsAzurePoolMachinesAddParams) WithContext(ctx context.Context) *V1CloudConfigsAzurePoolMachinesAddParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud configs azure pool machines add params +func (o *V1CloudConfigsAzurePoolMachinesAddParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud configs azure pool machines add params +func (o *V1CloudConfigsAzurePoolMachinesAddParams) WithHTTPClient(client *http.Client) *V1CloudConfigsAzurePoolMachinesAddParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud configs azure pool machines add params +func (o *V1CloudConfigsAzurePoolMachinesAddParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 cloud configs azure pool machines add params +func (o *V1CloudConfigsAzurePoolMachinesAddParams) WithBody(body *models.V1AzureMachine) *V1CloudConfigsAzurePoolMachinesAddParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 cloud configs azure pool machines add params +func (o *V1CloudConfigsAzurePoolMachinesAddParams) SetBody(body *models.V1AzureMachine) { + o.Body = body +} + +// WithConfigUID adds the configUID to the v1 cloud configs azure pool machines add params +func (o *V1CloudConfigsAzurePoolMachinesAddParams) WithConfigUID(configUID string) *V1CloudConfigsAzurePoolMachinesAddParams { + o.SetConfigUID(configUID) + return o +} + +// SetConfigUID adds the configUid to the v1 cloud configs azure pool machines add params +func (o *V1CloudConfigsAzurePoolMachinesAddParams) SetConfigUID(configUID string) { + o.ConfigUID = configUID +} + +// WithMachinePoolName adds the machinePoolName to the v1 cloud configs azure pool machines add params +func (o *V1CloudConfigsAzurePoolMachinesAddParams) WithMachinePoolName(machinePoolName string) *V1CloudConfigsAzurePoolMachinesAddParams { + o.SetMachinePoolName(machinePoolName) + return o +} + +// SetMachinePoolName adds the machinePoolName to the v1 cloud configs azure pool machines add params +func (o *V1CloudConfigsAzurePoolMachinesAddParams) SetMachinePoolName(machinePoolName string) { + o.MachinePoolName = machinePoolName +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudConfigsAzurePoolMachinesAddParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param configUid + if err := r.SetPathParam("configUid", o.ConfigUID); err != nil { + return err + } + + // path param machinePoolName + if err := r.SetPathParam("machinePoolName", o.MachinePoolName); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_configs_azure_pool_machines_add_responses.go b/api/client/v1/v1_cloud_configs_azure_pool_machines_add_responses.go new file mode 100644 index 00000000..e5a5cca5 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_azure_pool_machines_add_responses.go @@ -0,0 +1,77 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1CloudConfigsAzurePoolMachinesAddReader is a Reader for the V1CloudConfigsAzurePoolMachinesAdd structure. +type V1CloudConfigsAzurePoolMachinesAddReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudConfigsAzurePoolMachinesAddReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 201: + result := NewV1CloudConfigsAzurePoolMachinesAddCreated() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudConfigsAzurePoolMachinesAddCreated creates a V1CloudConfigsAzurePoolMachinesAddCreated with default headers values +func NewV1CloudConfigsAzurePoolMachinesAddCreated() *V1CloudConfigsAzurePoolMachinesAddCreated { + return &V1CloudConfigsAzurePoolMachinesAddCreated{} +} + +/* +V1CloudConfigsAzurePoolMachinesAddCreated handles this case with default header values. + +Created successfully +*/ +type V1CloudConfigsAzurePoolMachinesAddCreated struct { + /*Audit uid for the request + */ + AuditUID string + + Payload *models.V1UID +} + +func (o *V1CloudConfigsAzurePoolMachinesAddCreated) Error() string { + return fmt.Sprintf("[POST /v1/cloudconfigs/azure/{configUid}/machinePools/{machinePoolName}/machines][%d] v1CloudConfigsAzurePoolMachinesAddCreated %+v", 201, o.Payload) +} + +func (o *V1CloudConfigsAzurePoolMachinesAddCreated) GetPayload() *models.V1UID { + return o.Payload +} + +func (o *V1CloudConfigsAzurePoolMachinesAddCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header AuditUid + o.AuditUID = response.GetHeader("AuditUid") + + o.Payload = new(models.V1UID) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_cloud_configs_azure_pool_machines_list_parameters.go b/api/client/v1/v1_cloud_configs_azure_pool_machines_list_parameters.go new file mode 100644 index 00000000..a0c7d780 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_azure_pool_machines_list_parameters.go @@ -0,0 +1,365 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// NewV1CloudConfigsAzurePoolMachinesListParams creates a new V1CloudConfigsAzurePoolMachinesListParams object +// with the default values initialized. +func NewV1CloudConfigsAzurePoolMachinesListParams() *V1CloudConfigsAzurePoolMachinesListParams { + var ( + limitDefault = int64(50) + ) + return &V1CloudConfigsAzurePoolMachinesListParams{ + Limit: &limitDefault, + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudConfigsAzurePoolMachinesListParamsWithTimeout creates a new V1CloudConfigsAzurePoolMachinesListParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudConfigsAzurePoolMachinesListParamsWithTimeout(timeout time.Duration) *V1CloudConfigsAzurePoolMachinesListParams { + var ( + limitDefault = int64(50) + ) + return &V1CloudConfigsAzurePoolMachinesListParams{ + Limit: &limitDefault, + + timeout: timeout, + } +} + +// NewV1CloudConfigsAzurePoolMachinesListParamsWithContext creates a new V1CloudConfigsAzurePoolMachinesListParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudConfigsAzurePoolMachinesListParamsWithContext(ctx context.Context) *V1CloudConfigsAzurePoolMachinesListParams { + var ( + limitDefault = int64(50) + ) + return &V1CloudConfigsAzurePoolMachinesListParams{ + Limit: &limitDefault, + + Context: ctx, + } +} + +// NewV1CloudConfigsAzurePoolMachinesListParamsWithHTTPClient creates a new V1CloudConfigsAzurePoolMachinesListParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudConfigsAzurePoolMachinesListParamsWithHTTPClient(client *http.Client) *V1CloudConfigsAzurePoolMachinesListParams { + var ( + limitDefault = int64(50) + ) + return &V1CloudConfigsAzurePoolMachinesListParams{ + Limit: &limitDefault, + HTTPClient: client, + } +} + +/* +V1CloudConfigsAzurePoolMachinesListParams contains all the parameters to send to the API endpoint +for the v1 cloud configs azure pool machines list operation typically these are written to a http.Request +*/ +type V1CloudConfigsAzurePoolMachinesListParams struct { + + /*ConfigUID + Cluster's cloud config uid + + */ + ConfigUID string + /*Continue + continue token to paginate the subsequent data items + + */ + Continue *string + /*Fields + Set of fields to be presented in the response with values. The fields are comma separated. Eg: metadata.uid,metadata.name + + */ + Fields *string + /*Filters + Filters can be combined with AND, OR operators with field path name. Eg: metadata.name=TestServiceANDspec.cloudType=aws + + Server will be restricted to certain fields based on the indexed data for each resource. + + */ + Filters *string + /*Limit + limit is a maximum number of responses to return for a list call. Default and maximum value of the limit is 50. + If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. + + */ + Limit *int64 + /*MachinePoolName + Machine pool name + + */ + MachinePoolName string + /*Offset + offset is the next index number from which the response will start. The response offset value can be used along with continue token for the pagination. + + */ + Offset *int64 + /*OrderBy + Specify the fields with sort order. 1 indicates ascending and -1 for descending. Eg: orderBy=metadata.name=1,metadata.uid=-1 + + */ + OrderBy *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud configs azure pool machines list params +func (o *V1CloudConfigsAzurePoolMachinesListParams) WithTimeout(timeout time.Duration) *V1CloudConfigsAzurePoolMachinesListParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud configs azure pool machines list params +func (o *V1CloudConfigsAzurePoolMachinesListParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud configs azure pool machines list params +func (o *V1CloudConfigsAzurePoolMachinesListParams) WithContext(ctx context.Context) *V1CloudConfigsAzurePoolMachinesListParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud configs azure pool machines list params +func (o *V1CloudConfigsAzurePoolMachinesListParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud configs azure pool machines list params +func (o *V1CloudConfigsAzurePoolMachinesListParams) WithHTTPClient(client *http.Client) *V1CloudConfigsAzurePoolMachinesListParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud configs azure pool machines list params +func (o *V1CloudConfigsAzurePoolMachinesListParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithConfigUID adds the configUID to the v1 cloud configs azure pool machines list params +func (o *V1CloudConfigsAzurePoolMachinesListParams) WithConfigUID(configUID string) *V1CloudConfigsAzurePoolMachinesListParams { + o.SetConfigUID(configUID) + return o +} + +// SetConfigUID adds the configUid to the v1 cloud configs azure pool machines list params +func (o *V1CloudConfigsAzurePoolMachinesListParams) SetConfigUID(configUID string) { + o.ConfigUID = configUID +} + +// WithContinue adds the continueVar to the v1 cloud configs azure pool machines list params +func (o *V1CloudConfigsAzurePoolMachinesListParams) WithContinue(continueVar *string) *V1CloudConfigsAzurePoolMachinesListParams { + o.SetContinue(continueVar) + return o +} + +// SetContinue adds the continue to the v1 cloud configs azure pool machines list params +func (o *V1CloudConfigsAzurePoolMachinesListParams) SetContinue(continueVar *string) { + o.Continue = continueVar +} + +// WithFields adds the fields to the v1 cloud configs azure pool machines list params +func (o *V1CloudConfigsAzurePoolMachinesListParams) WithFields(fields *string) *V1CloudConfigsAzurePoolMachinesListParams { + o.SetFields(fields) + return o +} + +// SetFields adds the fields to the v1 cloud configs azure pool machines list params +func (o *V1CloudConfigsAzurePoolMachinesListParams) SetFields(fields *string) { + o.Fields = fields +} + +// WithFilters adds the filters to the v1 cloud configs azure pool machines list params +func (o *V1CloudConfigsAzurePoolMachinesListParams) WithFilters(filters *string) *V1CloudConfigsAzurePoolMachinesListParams { + o.SetFilters(filters) + return o +} + +// SetFilters adds the filters to the v1 cloud configs azure pool machines list params +func (o *V1CloudConfigsAzurePoolMachinesListParams) SetFilters(filters *string) { + o.Filters = filters +} + +// WithLimit adds the limit to the v1 cloud configs azure pool machines list params +func (o *V1CloudConfigsAzurePoolMachinesListParams) WithLimit(limit *int64) *V1CloudConfigsAzurePoolMachinesListParams { + o.SetLimit(limit) + return o +} + +// SetLimit adds the limit to the v1 cloud configs azure pool machines list params +func (o *V1CloudConfigsAzurePoolMachinesListParams) SetLimit(limit *int64) { + o.Limit = limit +} + +// WithMachinePoolName adds the machinePoolName to the v1 cloud configs azure pool machines list params +func (o *V1CloudConfigsAzurePoolMachinesListParams) WithMachinePoolName(machinePoolName string) *V1CloudConfigsAzurePoolMachinesListParams { + o.SetMachinePoolName(machinePoolName) + return o +} + +// SetMachinePoolName adds the machinePoolName to the v1 cloud configs azure pool machines list params +func (o *V1CloudConfigsAzurePoolMachinesListParams) SetMachinePoolName(machinePoolName string) { + o.MachinePoolName = machinePoolName +} + +// WithOffset adds the offset to the v1 cloud configs azure pool machines list params +func (o *V1CloudConfigsAzurePoolMachinesListParams) WithOffset(offset *int64) *V1CloudConfigsAzurePoolMachinesListParams { + o.SetOffset(offset) + return o +} + +// SetOffset adds the offset to the v1 cloud configs azure pool machines list params +func (o *V1CloudConfigsAzurePoolMachinesListParams) SetOffset(offset *int64) { + o.Offset = offset +} + +// WithOrderBy adds the orderBy to the v1 cloud configs azure pool machines list params +func (o *V1CloudConfigsAzurePoolMachinesListParams) WithOrderBy(orderBy *string) *V1CloudConfigsAzurePoolMachinesListParams { + o.SetOrderBy(orderBy) + return o +} + +// SetOrderBy adds the orderBy to the v1 cloud configs azure pool machines list params +func (o *V1CloudConfigsAzurePoolMachinesListParams) SetOrderBy(orderBy *string) { + o.OrderBy = orderBy +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudConfigsAzurePoolMachinesListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param configUid + if err := r.SetPathParam("configUid", o.ConfigUID); err != nil { + return err + } + + if o.Continue != nil { + + // query param continue + var qrContinue string + if o.Continue != nil { + qrContinue = *o.Continue + } + qContinue := qrContinue + if qContinue != "" { + if err := r.SetQueryParam("continue", qContinue); err != nil { + return err + } + } + + } + + if o.Fields != nil { + + // query param fields + var qrFields string + if o.Fields != nil { + qrFields = *o.Fields + } + qFields := qrFields + if qFields != "" { + if err := r.SetQueryParam("fields", qFields); err != nil { + return err + } + } + + } + + if o.Filters != nil { + + // query param filters + var qrFilters string + if o.Filters != nil { + qrFilters = *o.Filters + } + qFilters := qrFilters + if qFilters != "" { + if err := r.SetQueryParam("filters", qFilters); err != nil { + return err + } + } + + } + + if o.Limit != nil { + + // query param limit + var qrLimit int64 + if o.Limit != nil { + qrLimit = *o.Limit + } + qLimit := swag.FormatInt64(qrLimit) + if qLimit != "" { + if err := r.SetQueryParam("limit", qLimit); err != nil { + return err + } + } + + } + + // path param machinePoolName + if err := r.SetPathParam("machinePoolName", o.MachinePoolName); err != nil { + return err + } + + if o.Offset != nil { + + // query param offset + var qrOffset int64 + if o.Offset != nil { + qrOffset = *o.Offset + } + qOffset := swag.FormatInt64(qrOffset) + if qOffset != "" { + if err := r.SetQueryParam("offset", qOffset); err != nil { + return err + } + } + + } + + if o.OrderBy != nil { + + // query param orderBy + var qrOrderBy string + if o.OrderBy != nil { + qrOrderBy = *o.OrderBy + } + qOrderBy := qrOrderBy + if qOrderBy != "" { + if err := r.SetQueryParam("orderBy", qOrderBy); err != nil { + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_configs_azure_pool_machines_list_responses.go b/api/client/v1/v1_cloud_configs_azure_pool_machines_list_responses.go new file mode 100644 index 00000000..f074a9da --- /dev/null +++ b/api/client/v1/v1_cloud_configs_azure_pool_machines_list_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1CloudConfigsAzurePoolMachinesListReader is a Reader for the V1CloudConfigsAzurePoolMachinesList structure. +type V1CloudConfigsAzurePoolMachinesListReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudConfigsAzurePoolMachinesListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1CloudConfigsAzurePoolMachinesListOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudConfigsAzurePoolMachinesListOK creates a V1CloudConfigsAzurePoolMachinesListOK with default headers values +func NewV1CloudConfigsAzurePoolMachinesListOK() *V1CloudConfigsAzurePoolMachinesListOK { + return &V1CloudConfigsAzurePoolMachinesListOK{} +} + +/* +V1CloudConfigsAzurePoolMachinesListOK handles this case with default header values. + +An array of AWS machine items +*/ +type V1CloudConfigsAzurePoolMachinesListOK struct { + Payload *models.V1AzureMachines +} + +func (o *V1CloudConfigsAzurePoolMachinesListOK) Error() string { + return fmt.Sprintf("[GET /v1/cloudconfigs/azure/{configUid}/machinePools/{machinePoolName}/machines][%d] v1CloudConfigsAzurePoolMachinesListOK %+v", 200, o.Payload) +} + +func (o *V1CloudConfigsAzurePoolMachinesListOK) GetPayload() *models.V1AzureMachines { + return o.Payload +} + +func (o *V1CloudConfigsAzurePoolMachinesListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1AzureMachines) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_cloud_configs_azure_pool_machines_uid_delete_parameters.go b/api/client/v1/v1_cloud_configs_azure_pool_machines_uid_delete_parameters.go new file mode 100644 index 00000000..ec9f3137 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_azure_pool_machines_uid_delete_parameters.go @@ -0,0 +1,178 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1CloudConfigsAzurePoolMachinesUIDDeleteParams creates a new V1CloudConfigsAzurePoolMachinesUIDDeleteParams object +// with the default values initialized. +func NewV1CloudConfigsAzurePoolMachinesUIDDeleteParams() *V1CloudConfigsAzurePoolMachinesUIDDeleteParams { + var () + return &V1CloudConfigsAzurePoolMachinesUIDDeleteParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudConfigsAzurePoolMachinesUIDDeleteParamsWithTimeout creates a new V1CloudConfigsAzurePoolMachinesUIDDeleteParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudConfigsAzurePoolMachinesUIDDeleteParamsWithTimeout(timeout time.Duration) *V1CloudConfigsAzurePoolMachinesUIDDeleteParams { + var () + return &V1CloudConfigsAzurePoolMachinesUIDDeleteParams{ + + timeout: timeout, + } +} + +// NewV1CloudConfigsAzurePoolMachinesUIDDeleteParamsWithContext creates a new V1CloudConfigsAzurePoolMachinesUIDDeleteParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudConfigsAzurePoolMachinesUIDDeleteParamsWithContext(ctx context.Context) *V1CloudConfigsAzurePoolMachinesUIDDeleteParams { + var () + return &V1CloudConfigsAzurePoolMachinesUIDDeleteParams{ + + Context: ctx, + } +} + +// NewV1CloudConfigsAzurePoolMachinesUIDDeleteParamsWithHTTPClient creates a new V1CloudConfigsAzurePoolMachinesUIDDeleteParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudConfigsAzurePoolMachinesUIDDeleteParamsWithHTTPClient(client *http.Client) *V1CloudConfigsAzurePoolMachinesUIDDeleteParams { + var () + return &V1CloudConfigsAzurePoolMachinesUIDDeleteParams{ + HTTPClient: client, + } +} + +/* +V1CloudConfigsAzurePoolMachinesUIDDeleteParams contains all the parameters to send to the API endpoint +for the v1 cloud configs azure pool machines Uid delete operation typically these are written to a http.Request +*/ +type V1CloudConfigsAzurePoolMachinesUIDDeleteParams struct { + + /*ConfigUID + Cluster's cloud config uid + + */ + ConfigUID string + /*MachinePoolName + Machine pool name + + */ + MachinePoolName string + /*MachineUID + Machine uid + + */ + MachineUID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud configs azure pool machines Uid delete params +func (o *V1CloudConfigsAzurePoolMachinesUIDDeleteParams) WithTimeout(timeout time.Duration) *V1CloudConfigsAzurePoolMachinesUIDDeleteParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud configs azure pool machines Uid delete params +func (o *V1CloudConfigsAzurePoolMachinesUIDDeleteParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud configs azure pool machines Uid delete params +func (o *V1CloudConfigsAzurePoolMachinesUIDDeleteParams) WithContext(ctx context.Context) *V1CloudConfigsAzurePoolMachinesUIDDeleteParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud configs azure pool machines Uid delete params +func (o *V1CloudConfigsAzurePoolMachinesUIDDeleteParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud configs azure pool machines Uid delete params +func (o *V1CloudConfigsAzurePoolMachinesUIDDeleteParams) WithHTTPClient(client *http.Client) *V1CloudConfigsAzurePoolMachinesUIDDeleteParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud configs azure pool machines Uid delete params +func (o *V1CloudConfigsAzurePoolMachinesUIDDeleteParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithConfigUID adds the configUID to the v1 cloud configs azure pool machines Uid delete params +func (o *V1CloudConfigsAzurePoolMachinesUIDDeleteParams) WithConfigUID(configUID string) *V1CloudConfigsAzurePoolMachinesUIDDeleteParams { + o.SetConfigUID(configUID) + return o +} + +// SetConfigUID adds the configUid to the v1 cloud configs azure pool machines Uid delete params +func (o *V1CloudConfigsAzurePoolMachinesUIDDeleteParams) SetConfigUID(configUID string) { + o.ConfigUID = configUID +} + +// WithMachinePoolName adds the machinePoolName to the v1 cloud configs azure pool machines Uid delete params +func (o *V1CloudConfigsAzurePoolMachinesUIDDeleteParams) WithMachinePoolName(machinePoolName string) *V1CloudConfigsAzurePoolMachinesUIDDeleteParams { + o.SetMachinePoolName(machinePoolName) + return o +} + +// SetMachinePoolName adds the machinePoolName to the v1 cloud configs azure pool machines Uid delete params +func (o *V1CloudConfigsAzurePoolMachinesUIDDeleteParams) SetMachinePoolName(machinePoolName string) { + o.MachinePoolName = machinePoolName +} + +// WithMachineUID adds the machineUID to the v1 cloud configs azure pool machines Uid delete params +func (o *V1CloudConfigsAzurePoolMachinesUIDDeleteParams) WithMachineUID(machineUID string) *V1CloudConfigsAzurePoolMachinesUIDDeleteParams { + o.SetMachineUID(machineUID) + return o +} + +// SetMachineUID adds the machineUid to the v1 cloud configs azure pool machines Uid delete params +func (o *V1CloudConfigsAzurePoolMachinesUIDDeleteParams) SetMachineUID(machineUID string) { + o.MachineUID = machineUID +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudConfigsAzurePoolMachinesUIDDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param configUid + if err := r.SetPathParam("configUid", o.ConfigUID); err != nil { + return err + } + + // path param machinePoolName + if err := r.SetPathParam("machinePoolName", o.MachinePoolName); err != nil { + return err + } + + // path param machineUid + if err := r.SetPathParam("machineUid", o.MachineUID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_configs_azure_pool_machines_uid_delete_responses.go b/api/client/v1/v1_cloud_configs_azure_pool_machines_uid_delete_responses.go new file mode 100644 index 00000000..51a0a699 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_azure_pool_machines_uid_delete_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1CloudConfigsAzurePoolMachinesUIDDeleteReader is a Reader for the V1CloudConfigsAzurePoolMachinesUIDDelete structure. +type V1CloudConfigsAzurePoolMachinesUIDDeleteReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudConfigsAzurePoolMachinesUIDDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1CloudConfigsAzurePoolMachinesUIDDeleteNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudConfigsAzurePoolMachinesUIDDeleteNoContent creates a V1CloudConfigsAzurePoolMachinesUIDDeleteNoContent with default headers values +func NewV1CloudConfigsAzurePoolMachinesUIDDeleteNoContent() *V1CloudConfigsAzurePoolMachinesUIDDeleteNoContent { + return &V1CloudConfigsAzurePoolMachinesUIDDeleteNoContent{} +} + +/* +V1CloudConfigsAzurePoolMachinesUIDDeleteNoContent handles this case with default header values. + +The resource was deleted successfully +*/ +type V1CloudConfigsAzurePoolMachinesUIDDeleteNoContent struct { +} + +func (o *V1CloudConfigsAzurePoolMachinesUIDDeleteNoContent) Error() string { + return fmt.Sprintf("[DELETE /v1/cloudconfigs/azure/{configUid}/machinePools/{machinePoolName}/machines/{machineUid}][%d] v1CloudConfigsAzurePoolMachinesUidDeleteNoContent ", 204) +} + +func (o *V1CloudConfigsAzurePoolMachinesUIDDeleteNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_cloud_configs_azure_pool_machines_uid_get_parameters.go b/api/client/v1/v1_cloud_configs_azure_pool_machines_uid_get_parameters.go new file mode 100644 index 00000000..2888c20b --- /dev/null +++ b/api/client/v1/v1_cloud_configs_azure_pool_machines_uid_get_parameters.go @@ -0,0 +1,178 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1CloudConfigsAzurePoolMachinesUIDGetParams creates a new V1CloudConfigsAzurePoolMachinesUIDGetParams object +// with the default values initialized. +func NewV1CloudConfigsAzurePoolMachinesUIDGetParams() *V1CloudConfigsAzurePoolMachinesUIDGetParams { + var () + return &V1CloudConfigsAzurePoolMachinesUIDGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudConfigsAzurePoolMachinesUIDGetParamsWithTimeout creates a new V1CloudConfigsAzurePoolMachinesUIDGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudConfigsAzurePoolMachinesUIDGetParamsWithTimeout(timeout time.Duration) *V1CloudConfigsAzurePoolMachinesUIDGetParams { + var () + return &V1CloudConfigsAzurePoolMachinesUIDGetParams{ + + timeout: timeout, + } +} + +// NewV1CloudConfigsAzurePoolMachinesUIDGetParamsWithContext creates a new V1CloudConfigsAzurePoolMachinesUIDGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudConfigsAzurePoolMachinesUIDGetParamsWithContext(ctx context.Context) *V1CloudConfigsAzurePoolMachinesUIDGetParams { + var () + return &V1CloudConfigsAzurePoolMachinesUIDGetParams{ + + Context: ctx, + } +} + +// NewV1CloudConfigsAzurePoolMachinesUIDGetParamsWithHTTPClient creates a new V1CloudConfigsAzurePoolMachinesUIDGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudConfigsAzurePoolMachinesUIDGetParamsWithHTTPClient(client *http.Client) *V1CloudConfigsAzurePoolMachinesUIDGetParams { + var () + return &V1CloudConfigsAzurePoolMachinesUIDGetParams{ + HTTPClient: client, + } +} + +/* +V1CloudConfigsAzurePoolMachinesUIDGetParams contains all the parameters to send to the API endpoint +for the v1 cloud configs azure pool machines Uid get operation typically these are written to a http.Request +*/ +type V1CloudConfigsAzurePoolMachinesUIDGetParams struct { + + /*ConfigUID + Cluster's cloud config uid + + */ + ConfigUID string + /*MachinePoolName + Machine pool name + + */ + MachinePoolName string + /*MachineUID + Machine uid + + */ + MachineUID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud configs azure pool machines Uid get params +func (o *V1CloudConfigsAzurePoolMachinesUIDGetParams) WithTimeout(timeout time.Duration) *V1CloudConfigsAzurePoolMachinesUIDGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud configs azure pool machines Uid get params +func (o *V1CloudConfigsAzurePoolMachinesUIDGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud configs azure pool machines Uid get params +func (o *V1CloudConfigsAzurePoolMachinesUIDGetParams) WithContext(ctx context.Context) *V1CloudConfigsAzurePoolMachinesUIDGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud configs azure pool machines Uid get params +func (o *V1CloudConfigsAzurePoolMachinesUIDGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud configs azure pool machines Uid get params +func (o *V1CloudConfigsAzurePoolMachinesUIDGetParams) WithHTTPClient(client *http.Client) *V1CloudConfigsAzurePoolMachinesUIDGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud configs azure pool machines Uid get params +func (o *V1CloudConfigsAzurePoolMachinesUIDGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithConfigUID adds the configUID to the v1 cloud configs azure pool machines Uid get params +func (o *V1CloudConfigsAzurePoolMachinesUIDGetParams) WithConfigUID(configUID string) *V1CloudConfigsAzurePoolMachinesUIDGetParams { + o.SetConfigUID(configUID) + return o +} + +// SetConfigUID adds the configUid to the v1 cloud configs azure pool machines Uid get params +func (o *V1CloudConfigsAzurePoolMachinesUIDGetParams) SetConfigUID(configUID string) { + o.ConfigUID = configUID +} + +// WithMachinePoolName adds the machinePoolName to the v1 cloud configs azure pool machines Uid get params +func (o *V1CloudConfigsAzurePoolMachinesUIDGetParams) WithMachinePoolName(machinePoolName string) *V1CloudConfigsAzurePoolMachinesUIDGetParams { + o.SetMachinePoolName(machinePoolName) + return o +} + +// SetMachinePoolName adds the machinePoolName to the v1 cloud configs azure pool machines Uid get params +func (o *V1CloudConfigsAzurePoolMachinesUIDGetParams) SetMachinePoolName(machinePoolName string) { + o.MachinePoolName = machinePoolName +} + +// WithMachineUID adds the machineUID to the v1 cloud configs azure pool machines Uid get params +func (o *V1CloudConfigsAzurePoolMachinesUIDGetParams) WithMachineUID(machineUID string) *V1CloudConfigsAzurePoolMachinesUIDGetParams { + o.SetMachineUID(machineUID) + return o +} + +// SetMachineUID adds the machineUid to the v1 cloud configs azure pool machines Uid get params +func (o *V1CloudConfigsAzurePoolMachinesUIDGetParams) SetMachineUID(machineUID string) { + o.MachineUID = machineUID +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudConfigsAzurePoolMachinesUIDGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param configUid + if err := r.SetPathParam("configUid", o.ConfigUID); err != nil { + return err + } + + // path param machinePoolName + if err := r.SetPathParam("machinePoolName", o.MachinePoolName); err != nil { + return err + } + + // path param machineUid + if err := r.SetPathParam("machineUid", o.MachineUID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_configs_azure_pool_machines_uid_get_responses.go b/api/client/v1/v1_cloud_configs_azure_pool_machines_uid_get_responses.go new file mode 100644 index 00000000..6479746c --- /dev/null +++ b/api/client/v1/v1_cloud_configs_azure_pool_machines_uid_get_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1CloudConfigsAzurePoolMachinesUIDGetReader is a Reader for the V1CloudConfigsAzurePoolMachinesUIDGet structure. +type V1CloudConfigsAzurePoolMachinesUIDGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudConfigsAzurePoolMachinesUIDGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1CloudConfigsAzurePoolMachinesUIDGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudConfigsAzurePoolMachinesUIDGetOK creates a V1CloudConfigsAzurePoolMachinesUIDGetOK with default headers values +func NewV1CloudConfigsAzurePoolMachinesUIDGetOK() *V1CloudConfigsAzurePoolMachinesUIDGetOK { + return &V1CloudConfigsAzurePoolMachinesUIDGetOK{} +} + +/* +V1CloudConfigsAzurePoolMachinesUIDGetOK handles this case with default header values. + +OK +*/ +type V1CloudConfigsAzurePoolMachinesUIDGetOK struct { + Payload *models.V1AzureMachine +} + +func (o *V1CloudConfigsAzurePoolMachinesUIDGetOK) Error() string { + return fmt.Sprintf("[GET /v1/cloudconfigs/azure/{configUid}/machinePools/{machinePoolName}/machines/{machineUid}][%d] v1CloudConfigsAzurePoolMachinesUidGetOK %+v", 200, o.Payload) +} + +func (o *V1CloudConfigsAzurePoolMachinesUIDGetOK) GetPayload() *models.V1AzureMachine { + return o.Payload +} + +func (o *V1CloudConfigsAzurePoolMachinesUIDGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1AzureMachine) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_cloud_configs_azure_pool_machines_uid_update_parameters.go b/api/client/v1/v1_cloud_configs_azure_pool_machines_uid_update_parameters.go new file mode 100644 index 00000000..e2542f46 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_azure_pool_machines_uid_update_parameters.go @@ -0,0 +1,199 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1CloudConfigsAzurePoolMachinesUIDUpdateParams creates a new V1CloudConfigsAzurePoolMachinesUIDUpdateParams object +// with the default values initialized. +func NewV1CloudConfigsAzurePoolMachinesUIDUpdateParams() *V1CloudConfigsAzurePoolMachinesUIDUpdateParams { + var () + return &V1CloudConfigsAzurePoolMachinesUIDUpdateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudConfigsAzurePoolMachinesUIDUpdateParamsWithTimeout creates a new V1CloudConfigsAzurePoolMachinesUIDUpdateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudConfigsAzurePoolMachinesUIDUpdateParamsWithTimeout(timeout time.Duration) *V1CloudConfigsAzurePoolMachinesUIDUpdateParams { + var () + return &V1CloudConfigsAzurePoolMachinesUIDUpdateParams{ + + timeout: timeout, + } +} + +// NewV1CloudConfigsAzurePoolMachinesUIDUpdateParamsWithContext creates a new V1CloudConfigsAzurePoolMachinesUIDUpdateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudConfigsAzurePoolMachinesUIDUpdateParamsWithContext(ctx context.Context) *V1CloudConfigsAzurePoolMachinesUIDUpdateParams { + var () + return &V1CloudConfigsAzurePoolMachinesUIDUpdateParams{ + + Context: ctx, + } +} + +// NewV1CloudConfigsAzurePoolMachinesUIDUpdateParamsWithHTTPClient creates a new V1CloudConfigsAzurePoolMachinesUIDUpdateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudConfigsAzurePoolMachinesUIDUpdateParamsWithHTTPClient(client *http.Client) *V1CloudConfigsAzurePoolMachinesUIDUpdateParams { + var () + return &V1CloudConfigsAzurePoolMachinesUIDUpdateParams{ + HTTPClient: client, + } +} + +/* +V1CloudConfigsAzurePoolMachinesUIDUpdateParams contains all the parameters to send to the API endpoint +for the v1 cloud configs azure pool machines Uid update operation typically these are written to a http.Request +*/ +type V1CloudConfigsAzurePoolMachinesUIDUpdateParams struct { + + /*Body*/ + Body *models.V1AzureMachine + /*ConfigUID + Cluster's cloud config uid + + */ + ConfigUID string + /*MachinePoolName + Machine pool name + + */ + MachinePoolName string + /*MachineUID + Machine uid + + */ + MachineUID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud configs azure pool machines Uid update params +func (o *V1CloudConfigsAzurePoolMachinesUIDUpdateParams) WithTimeout(timeout time.Duration) *V1CloudConfigsAzurePoolMachinesUIDUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud configs azure pool machines Uid update params +func (o *V1CloudConfigsAzurePoolMachinesUIDUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud configs azure pool machines Uid update params +func (o *V1CloudConfigsAzurePoolMachinesUIDUpdateParams) WithContext(ctx context.Context) *V1CloudConfigsAzurePoolMachinesUIDUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud configs azure pool machines Uid update params +func (o *V1CloudConfigsAzurePoolMachinesUIDUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud configs azure pool machines Uid update params +func (o *V1CloudConfigsAzurePoolMachinesUIDUpdateParams) WithHTTPClient(client *http.Client) *V1CloudConfigsAzurePoolMachinesUIDUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud configs azure pool machines Uid update params +func (o *V1CloudConfigsAzurePoolMachinesUIDUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 cloud configs azure pool machines Uid update params +func (o *V1CloudConfigsAzurePoolMachinesUIDUpdateParams) WithBody(body *models.V1AzureMachine) *V1CloudConfigsAzurePoolMachinesUIDUpdateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 cloud configs azure pool machines Uid update params +func (o *V1CloudConfigsAzurePoolMachinesUIDUpdateParams) SetBody(body *models.V1AzureMachine) { + o.Body = body +} + +// WithConfigUID adds the configUID to the v1 cloud configs azure pool machines Uid update params +func (o *V1CloudConfigsAzurePoolMachinesUIDUpdateParams) WithConfigUID(configUID string) *V1CloudConfigsAzurePoolMachinesUIDUpdateParams { + o.SetConfigUID(configUID) + return o +} + +// SetConfigUID adds the configUid to the v1 cloud configs azure pool machines Uid update params +func (o *V1CloudConfigsAzurePoolMachinesUIDUpdateParams) SetConfigUID(configUID string) { + o.ConfigUID = configUID +} + +// WithMachinePoolName adds the machinePoolName to the v1 cloud configs azure pool machines Uid update params +func (o *V1CloudConfigsAzurePoolMachinesUIDUpdateParams) WithMachinePoolName(machinePoolName string) *V1CloudConfigsAzurePoolMachinesUIDUpdateParams { + o.SetMachinePoolName(machinePoolName) + return o +} + +// SetMachinePoolName adds the machinePoolName to the v1 cloud configs azure pool machines Uid update params +func (o *V1CloudConfigsAzurePoolMachinesUIDUpdateParams) SetMachinePoolName(machinePoolName string) { + o.MachinePoolName = machinePoolName +} + +// WithMachineUID adds the machineUID to the v1 cloud configs azure pool machines Uid update params +func (o *V1CloudConfigsAzurePoolMachinesUIDUpdateParams) WithMachineUID(machineUID string) *V1CloudConfigsAzurePoolMachinesUIDUpdateParams { + o.SetMachineUID(machineUID) + return o +} + +// SetMachineUID adds the machineUid to the v1 cloud configs azure pool machines Uid update params +func (o *V1CloudConfigsAzurePoolMachinesUIDUpdateParams) SetMachineUID(machineUID string) { + o.MachineUID = machineUID +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudConfigsAzurePoolMachinesUIDUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param configUid + if err := r.SetPathParam("configUid", o.ConfigUID); err != nil { + return err + } + + // path param machinePoolName + if err := r.SetPathParam("machinePoolName", o.MachinePoolName); err != nil { + return err + } + + // path param machineUid + if err := r.SetPathParam("machineUid", o.MachineUID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_configs_azure_pool_machines_uid_update_responses.go b/api/client/v1/v1_cloud_configs_azure_pool_machines_uid_update_responses.go new file mode 100644 index 00000000..3eea4eb9 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_azure_pool_machines_uid_update_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1CloudConfigsAzurePoolMachinesUIDUpdateReader is a Reader for the V1CloudConfigsAzurePoolMachinesUIDUpdate structure. +type V1CloudConfigsAzurePoolMachinesUIDUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudConfigsAzurePoolMachinesUIDUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1CloudConfigsAzurePoolMachinesUIDUpdateNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudConfigsAzurePoolMachinesUIDUpdateNoContent creates a V1CloudConfigsAzurePoolMachinesUIDUpdateNoContent with default headers values +func NewV1CloudConfigsAzurePoolMachinesUIDUpdateNoContent() *V1CloudConfigsAzurePoolMachinesUIDUpdateNoContent { + return &V1CloudConfigsAzurePoolMachinesUIDUpdateNoContent{} +} + +/* +V1CloudConfigsAzurePoolMachinesUIDUpdateNoContent handles this case with default header values. + +The resource was updated successfully +*/ +type V1CloudConfigsAzurePoolMachinesUIDUpdateNoContent struct { +} + +func (o *V1CloudConfigsAzurePoolMachinesUIDUpdateNoContent) Error() string { + return fmt.Sprintf("[PUT /v1/cloudconfigs/azure/{configUid}/machinePools/{machinePoolName}/machines/{machineUid}][%d] v1CloudConfigsAzurePoolMachinesUidUpdateNoContent ", 204) +} + +func (o *V1CloudConfigsAzurePoolMachinesUIDUpdateNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_cloud_configs_azure_uid_cluster_config_parameters.go b/api/client/v1/v1_cloud_configs_azure_uid_cluster_config_parameters.go new file mode 100644 index 00000000..0c8ebc40 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_azure_uid_cluster_config_parameters.go @@ -0,0 +1,157 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1CloudConfigsAzureUIDClusterConfigParams creates a new V1CloudConfigsAzureUIDClusterConfigParams object +// with the default values initialized. +func NewV1CloudConfigsAzureUIDClusterConfigParams() *V1CloudConfigsAzureUIDClusterConfigParams { + var () + return &V1CloudConfigsAzureUIDClusterConfigParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudConfigsAzureUIDClusterConfigParamsWithTimeout creates a new V1CloudConfigsAzureUIDClusterConfigParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudConfigsAzureUIDClusterConfigParamsWithTimeout(timeout time.Duration) *V1CloudConfigsAzureUIDClusterConfigParams { + var () + return &V1CloudConfigsAzureUIDClusterConfigParams{ + + timeout: timeout, + } +} + +// NewV1CloudConfigsAzureUIDClusterConfigParamsWithContext creates a new V1CloudConfigsAzureUIDClusterConfigParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudConfigsAzureUIDClusterConfigParamsWithContext(ctx context.Context) *V1CloudConfigsAzureUIDClusterConfigParams { + var () + return &V1CloudConfigsAzureUIDClusterConfigParams{ + + Context: ctx, + } +} + +// NewV1CloudConfigsAzureUIDClusterConfigParamsWithHTTPClient creates a new V1CloudConfigsAzureUIDClusterConfigParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudConfigsAzureUIDClusterConfigParamsWithHTTPClient(client *http.Client) *V1CloudConfigsAzureUIDClusterConfigParams { + var () + return &V1CloudConfigsAzureUIDClusterConfigParams{ + HTTPClient: client, + } +} + +/* +V1CloudConfigsAzureUIDClusterConfigParams contains all the parameters to send to the API endpoint +for the v1 cloud configs azure Uid cluster config operation typically these are written to a http.Request +*/ +type V1CloudConfigsAzureUIDClusterConfigParams struct { + + /*Body*/ + Body *models.V1AzureCloudClusterConfigEntity + /*ConfigUID + Cluster's cloud config uid + + */ + ConfigUID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud configs azure Uid cluster config params +func (o *V1CloudConfigsAzureUIDClusterConfigParams) WithTimeout(timeout time.Duration) *V1CloudConfigsAzureUIDClusterConfigParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud configs azure Uid cluster config params +func (o *V1CloudConfigsAzureUIDClusterConfigParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud configs azure Uid cluster config params +func (o *V1CloudConfigsAzureUIDClusterConfigParams) WithContext(ctx context.Context) *V1CloudConfigsAzureUIDClusterConfigParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud configs azure Uid cluster config params +func (o *V1CloudConfigsAzureUIDClusterConfigParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud configs azure Uid cluster config params +func (o *V1CloudConfigsAzureUIDClusterConfigParams) WithHTTPClient(client *http.Client) *V1CloudConfigsAzureUIDClusterConfigParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud configs azure Uid cluster config params +func (o *V1CloudConfigsAzureUIDClusterConfigParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 cloud configs azure Uid cluster config params +func (o *V1CloudConfigsAzureUIDClusterConfigParams) WithBody(body *models.V1AzureCloudClusterConfigEntity) *V1CloudConfigsAzureUIDClusterConfigParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 cloud configs azure Uid cluster config params +func (o *V1CloudConfigsAzureUIDClusterConfigParams) SetBody(body *models.V1AzureCloudClusterConfigEntity) { + o.Body = body +} + +// WithConfigUID adds the configUID to the v1 cloud configs azure Uid cluster config params +func (o *V1CloudConfigsAzureUIDClusterConfigParams) WithConfigUID(configUID string) *V1CloudConfigsAzureUIDClusterConfigParams { + o.SetConfigUID(configUID) + return o +} + +// SetConfigUID adds the configUid to the v1 cloud configs azure Uid cluster config params +func (o *V1CloudConfigsAzureUIDClusterConfigParams) SetConfigUID(configUID string) { + o.ConfigUID = configUID +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudConfigsAzureUIDClusterConfigParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param configUid + if err := r.SetPathParam("configUid", o.ConfigUID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_configs_azure_uid_cluster_config_responses.go b/api/client/v1/v1_cloud_configs_azure_uid_cluster_config_responses.go new file mode 100644 index 00000000..b71c8e86 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_azure_uid_cluster_config_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1CloudConfigsAzureUIDClusterConfigReader is a Reader for the V1CloudConfigsAzureUIDClusterConfig structure. +type V1CloudConfigsAzureUIDClusterConfigReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudConfigsAzureUIDClusterConfigReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1CloudConfigsAzureUIDClusterConfigNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudConfigsAzureUIDClusterConfigNoContent creates a V1CloudConfigsAzureUIDClusterConfigNoContent with default headers values +func NewV1CloudConfigsAzureUIDClusterConfigNoContent() *V1CloudConfigsAzureUIDClusterConfigNoContent { + return &V1CloudConfigsAzureUIDClusterConfigNoContent{} +} + +/* +V1CloudConfigsAzureUIDClusterConfigNoContent handles this case with default header values. + +The resource was updated successfully +*/ +type V1CloudConfigsAzureUIDClusterConfigNoContent struct { +} + +func (o *V1CloudConfigsAzureUIDClusterConfigNoContent) Error() string { + return fmt.Sprintf("[PUT /v1/cloudconfigs/azure/{configUid}/clusterConfig][%d] v1CloudConfigsAzureUidClusterConfigNoContent ", 204) +} + +func (o *V1CloudConfigsAzureUIDClusterConfigNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_cloud_configs_cox_edge_get_parameters.go b/api/client/v1/v1_cloud_configs_cox_edge_get_parameters.go new file mode 100644 index 00000000..67397550 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_cox_edge_get_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1CloudConfigsCoxEdgeGetParams creates a new V1CloudConfigsCoxEdgeGetParams object +// with the default values initialized. +func NewV1CloudConfigsCoxEdgeGetParams() *V1CloudConfigsCoxEdgeGetParams { + var () + return &V1CloudConfigsCoxEdgeGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudConfigsCoxEdgeGetParamsWithTimeout creates a new V1CloudConfigsCoxEdgeGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudConfigsCoxEdgeGetParamsWithTimeout(timeout time.Duration) *V1CloudConfigsCoxEdgeGetParams { + var () + return &V1CloudConfigsCoxEdgeGetParams{ + + timeout: timeout, + } +} + +// NewV1CloudConfigsCoxEdgeGetParamsWithContext creates a new V1CloudConfigsCoxEdgeGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudConfigsCoxEdgeGetParamsWithContext(ctx context.Context) *V1CloudConfigsCoxEdgeGetParams { + var () + return &V1CloudConfigsCoxEdgeGetParams{ + + Context: ctx, + } +} + +// NewV1CloudConfigsCoxEdgeGetParamsWithHTTPClient creates a new V1CloudConfigsCoxEdgeGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudConfigsCoxEdgeGetParamsWithHTTPClient(client *http.Client) *V1CloudConfigsCoxEdgeGetParams { + var () + return &V1CloudConfigsCoxEdgeGetParams{ + HTTPClient: client, + } +} + +/* +V1CloudConfigsCoxEdgeGetParams contains all the parameters to send to the API endpoint +for the v1 cloud configs cox edge get operation typically these are written to a http.Request +*/ +type V1CloudConfigsCoxEdgeGetParams struct { + + /*ConfigUID + Cluster's cloud config uid + + */ + ConfigUID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud configs cox edge get params +func (o *V1CloudConfigsCoxEdgeGetParams) WithTimeout(timeout time.Duration) *V1CloudConfigsCoxEdgeGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud configs cox edge get params +func (o *V1CloudConfigsCoxEdgeGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud configs cox edge get params +func (o *V1CloudConfigsCoxEdgeGetParams) WithContext(ctx context.Context) *V1CloudConfigsCoxEdgeGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud configs cox edge get params +func (o *V1CloudConfigsCoxEdgeGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud configs cox edge get params +func (o *V1CloudConfigsCoxEdgeGetParams) WithHTTPClient(client *http.Client) *V1CloudConfigsCoxEdgeGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud configs cox edge get params +func (o *V1CloudConfigsCoxEdgeGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithConfigUID adds the configUID to the v1 cloud configs cox edge get params +func (o *V1CloudConfigsCoxEdgeGetParams) WithConfigUID(configUID string) *V1CloudConfigsCoxEdgeGetParams { + o.SetConfigUID(configUID) + return o +} + +// SetConfigUID adds the configUid to the v1 cloud configs cox edge get params +func (o *V1CloudConfigsCoxEdgeGetParams) SetConfigUID(configUID string) { + o.ConfigUID = configUID +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudConfigsCoxEdgeGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param configUid + if err := r.SetPathParam("configUid", o.ConfigUID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_configs_cox_edge_get_responses.go b/api/client/v1/v1_cloud_configs_cox_edge_get_responses.go new file mode 100644 index 00000000..ec8e8a13 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_cox_edge_get_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1CloudConfigsCoxEdgeGetReader is a Reader for the V1CloudConfigsCoxEdgeGet structure. +type V1CloudConfigsCoxEdgeGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudConfigsCoxEdgeGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1CloudConfigsCoxEdgeGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudConfigsCoxEdgeGetOK creates a V1CloudConfigsCoxEdgeGetOK with default headers values +func NewV1CloudConfigsCoxEdgeGetOK() *V1CloudConfigsCoxEdgeGetOK { + return &V1CloudConfigsCoxEdgeGetOK{} +} + +/* +V1CloudConfigsCoxEdgeGetOK handles this case with default header values. + +OK +*/ +type V1CloudConfigsCoxEdgeGetOK struct { + Payload *models.V1CoxEdgeCloudConfig +} + +func (o *V1CloudConfigsCoxEdgeGetOK) Error() string { + return fmt.Sprintf("[GET /v1/cloudconfigs/coxedge/{configUid}][%d] v1CloudConfigsCoxEdgeGetOK %+v", 200, o.Payload) +} + +func (o *V1CloudConfigsCoxEdgeGetOK) GetPayload() *models.V1CoxEdgeCloudConfig { + return o.Payload +} + +func (o *V1CloudConfigsCoxEdgeGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1CoxEdgeCloudConfig) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_cloud_configs_cox_edge_machine_pool_create_parameters.go b/api/client/v1/v1_cloud_configs_cox_edge_machine_pool_create_parameters.go new file mode 100644 index 00000000..0d7484b0 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_cox_edge_machine_pool_create_parameters.go @@ -0,0 +1,157 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1CloudConfigsCoxEdgeMachinePoolCreateParams creates a new V1CloudConfigsCoxEdgeMachinePoolCreateParams object +// with the default values initialized. +func NewV1CloudConfigsCoxEdgeMachinePoolCreateParams() *V1CloudConfigsCoxEdgeMachinePoolCreateParams { + var () + return &V1CloudConfigsCoxEdgeMachinePoolCreateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudConfigsCoxEdgeMachinePoolCreateParamsWithTimeout creates a new V1CloudConfigsCoxEdgeMachinePoolCreateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudConfigsCoxEdgeMachinePoolCreateParamsWithTimeout(timeout time.Duration) *V1CloudConfigsCoxEdgeMachinePoolCreateParams { + var () + return &V1CloudConfigsCoxEdgeMachinePoolCreateParams{ + + timeout: timeout, + } +} + +// NewV1CloudConfigsCoxEdgeMachinePoolCreateParamsWithContext creates a new V1CloudConfigsCoxEdgeMachinePoolCreateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudConfigsCoxEdgeMachinePoolCreateParamsWithContext(ctx context.Context) *V1CloudConfigsCoxEdgeMachinePoolCreateParams { + var () + return &V1CloudConfigsCoxEdgeMachinePoolCreateParams{ + + Context: ctx, + } +} + +// NewV1CloudConfigsCoxEdgeMachinePoolCreateParamsWithHTTPClient creates a new V1CloudConfigsCoxEdgeMachinePoolCreateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudConfigsCoxEdgeMachinePoolCreateParamsWithHTTPClient(client *http.Client) *V1CloudConfigsCoxEdgeMachinePoolCreateParams { + var () + return &V1CloudConfigsCoxEdgeMachinePoolCreateParams{ + HTTPClient: client, + } +} + +/* +V1CloudConfigsCoxEdgeMachinePoolCreateParams contains all the parameters to send to the API endpoint +for the v1 cloud configs cox edge machine pool create operation typically these are written to a http.Request +*/ +type V1CloudConfigsCoxEdgeMachinePoolCreateParams struct { + + /*Body*/ + Body *models.V1CoxEdgeMachinePoolConfigEntity + /*ConfigUID + Cluster's cloud config uid + + */ + ConfigUID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud configs cox edge machine pool create params +func (o *V1CloudConfigsCoxEdgeMachinePoolCreateParams) WithTimeout(timeout time.Duration) *V1CloudConfigsCoxEdgeMachinePoolCreateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud configs cox edge machine pool create params +func (o *V1CloudConfigsCoxEdgeMachinePoolCreateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud configs cox edge machine pool create params +func (o *V1CloudConfigsCoxEdgeMachinePoolCreateParams) WithContext(ctx context.Context) *V1CloudConfigsCoxEdgeMachinePoolCreateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud configs cox edge machine pool create params +func (o *V1CloudConfigsCoxEdgeMachinePoolCreateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud configs cox edge machine pool create params +func (o *V1CloudConfigsCoxEdgeMachinePoolCreateParams) WithHTTPClient(client *http.Client) *V1CloudConfigsCoxEdgeMachinePoolCreateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud configs cox edge machine pool create params +func (o *V1CloudConfigsCoxEdgeMachinePoolCreateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 cloud configs cox edge machine pool create params +func (o *V1CloudConfigsCoxEdgeMachinePoolCreateParams) WithBody(body *models.V1CoxEdgeMachinePoolConfigEntity) *V1CloudConfigsCoxEdgeMachinePoolCreateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 cloud configs cox edge machine pool create params +func (o *V1CloudConfigsCoxEdgeMachinePoolCreateParams) SetBody(body *models.V1CoxEdgeMachinePoolConfigEntity) { + o.Body = body +} + +// WithConfigUID adds the configUID to the v1 cloud configs cox edge machine pool create params +func (o *V1CloudConfigsCoxEdgeMachinePoolCreateParams) WithConfigUID(configUID string) *V1CloudConfigsCoxEdgeMachinePoolCreateParams { + o.SetConfigUID(configUID) + return o +} + +// SetConfigUID adds the configUid to the v1 cloud configs cox edge machine pool create params +func (o *V1CloudConfigsCoxEdgeMachinePoolCreateParams) SetConfigUID(configUID string) { + o.ConfigUID = configUID +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudConfigsCoxEdgeMachinePoolCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param configUid + if err := r.SetPathParam("configUid", o.ConfigUID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_configs_cox_edge_machine_pool_create_responses.go b/api/client/v1/v1_cloud_configs_cox_edge_machine_pool_create_responses.go new file mode 100644 index 00000000..576f697a --- /dev/null +++ b/api/client/v1/v1_cloud_configs_cox_edge_machine_pool_create_responses.go @@ -0,0 +1,77 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1CloudConfigsCoxEdgeMachinePoolCreateReader is a Reader for the V1CloudConfigsCoxEdgeMachinePoolCreate structure. +type V1CloudConfigsCoxEdgeMachinePoolCreateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudConfigsCoxEdgeMachinePoolCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 201: + result := NewV1CloudConfigsCoxEdgeMachinePoolCreateCreated() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudConfigsCoxEdgeMachinePoolCreateCreated creates a V1CloudConfigsCoxEdgeMachinePoolCreateCreated with default headers values +func NewV1CloudConfigsCoxEdgeMachinePoolCreateCreated() *V1CloudConfigsCoxEdgeMachinePoolCreateCreated { + return &V1CloudConfigsCoxEdgeMachinePoolCreateCreated{} +} + +/* +V1CloudConfigsCoxEdgeMachinePoolCreateCreated handles this case with default header values. + +Created successfully +*/ +type V1CloudConfigsCoxEdgeMachinePoolCreateCreated struct { + /*Audit uid for the request + */ + AuditUID string + + Payload *models.V1UID +} + +func (o *V1CloudConfigsCoxEdgeMachinePoolCreateCreated) Error() string { + return fmt.Sprintf("[POST /v1/cloudconfigs/coxedge/{configUid}/machinePools][%d] v1CloudConfigsCoxEdgeMachinePoolCreateCreated %+v", 201, o.Payload) +} + +func (o *V1CloudConfigsCoxEdgeMachinePoolCreateCreated) GetPayload() *models.V1UID { + return o.Payload +} + +func (o *V1CloudConfigsCoxEdgeMachinePoolCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header AuditUid + o.AuditUID = response.GetHeader("AuditUid") + + o.Payload = new(models.V1UID) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_cloud_configs_cox_edge_machine_pool_delete_parameters.go b/api/client/v1/v1_cloud_configs_cox_edge_machine_pool_delete_parameters.go new file mode 100644 index 00000000..5500a54d --- /dev/null +++ b/api/client/v1/v1_cloud_configs_cox_edge_machine_pool_delete_parameters.go @@ -0,0 +1,157 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1CloudConfigsCoxEdgeMachinePoolDeleteParams creates a new V1CloudConfigsCoxEdgeMachinePoolDeleteParams object +// with the default values initialized. +func NewV1CloudConfigsCoxEdgeMachinePoolDeleteParams() *V1CloudConfigsCoxEdgeMachinePoolDeleteParams { + var () + return &V1CloudConfigsCoxEdgeMachinePoolDeleteParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudConfigsCoxEdgeMachinePoolDeleteParamsWithTimeout creates a new V1CloudConfigsCoxEdgeMachinePoolDeleteParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudConfigsCoxEdgeMachinePoolDeleteParamsWithTimeout(timeout time.Duration) *V1CloudConfigsCoxEdgeMachinePoolDeleteParams { + var () + return &V1CloudConfigsCoxEdgeMachinePoolDeleteParams{ + + timeout: timeout, + } +} + +// NewV1CloudConfigsCoxEdgeMachinePoolDeleteParamsWithContext creates a new V1CloudConfigsCoxEdgeMachinePoolDeleteParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudConfigsCoxEdgeMachinePoolDeleteParamsWithContext(ctx context.Context) *V1CloudConfigsCoxEdgeMachinePoolDeleteParams { + var () + return &V1CloudConfigsCoxEdgeMachinePoolDeleteParams{ + + Context: ctx, + } +} + +// NewV1CloudConfigsCoxEdgeMachinePoolDeleteParamsWithHTTPClient creates a new V1CloudConfigsCoxEdgeMachinePoolDeleteParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudConfigsCoxEdgeMachinePoolDeleteParamsWithHTTPClient(client *http.Client) *V1CloudConfigsCoxEdgeMachinePoolDeleteParams { + var () + return &V1CloudConfigsCoxEdgeMachinePoolDeleteParams{ + HTTPClient: client, + } +} + +/* +V1CloudConfigsCoxEdgeMachinePoolDeleteParams contains all the parameters to send to the API endpoint +for the v1 cloud configs cox edge machine pool delete operation typically these are written to a http.Request +*/ +type V1CloudConfigsCoxEdgeMachinePoolDeleteParams struct { + + /*ConfigUID + Cluster's cloud config uid + + */ + ConfigUID string + /*MachinePoolName + Machine pool name + + */ + MachinePoolName string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud configs cox edge machine pool delete params +func (o *V1CloudConfigsCoxEdgeMachinePoolDeleteParams) WithTimeout(timeout time.Duration) *V1CloudConfigsCoxEdgeMachinePoolDeleteParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud configs cox edge machine pool delete params +func (o *V1CloudConfigsCoxEdgeMachinePoolDeleteParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud configs cox edge machine pool delete params +func (o *V1CloudConfigsCoxEdgeMachinePoolDeleteParams) WithContext(ctx context.Context) *V1CloudConfigsCoxEdgeMachinePoolDeleteParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud configs cox edge machine pool delete params +func (o *V1CloudConfigsCoxEdgeMachinePoolDeleteParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud configs cox edge machine pool delete params +func (o *V1CloudConfigsCoxEdgeMachinePoolDeleteParams) WithHTTPClient(client *http.Client) *V1CloudConfigsCoxEdgeMachinePoolDeleteParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud configs cox edge machine pool delete params +func (o *V1CloudConfigsCoxEdgeMachinePoolDeleteParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithConfigUID adds the configUID to the v1 cloud configs cox edge machine pool delete params +func (o *V1CloudConfigsCoxEdgeMachinePoolDeleteParams) WithConfigUID(configUID string) *V1CloudConfigsCoxEdgeMachinePoolDeleteParams { + o.SetConfigUID(configUID) + return o +} + +// SetConfigUID adds the configUid to the v1 cloud configs cox edge machine pool delete params +func (o *V1CloudConfigsCoxEdgeMachinePoolDeleteParams) SetConfigUID(configUID string) { + o.ConfigUID = configUID +} + +// WithMachinePoolName adds the machinePoolName to the v1 cloud configs cox edge machine pool delete params +func (o *V1CloudConfigsCoxEdgeMachinePoolDeleteParams) WithMachinePoolName(machinePoolName string) *V1CloudConfigsCoxEdgeMachinePoolDeleteParams { + o.SetMachinePoolName(machinePoolName) + return o +} + +// SetMachinePoolName adds the machinePoolName to the v1 cloud configs cox edge machine pool delete params +func (o *V1CloudConfigsCoxEdgeMachinePoolDeleteParams) SetMachinePoolName(machinePoolName string) { + o.MachinePoolName = machinePoolName +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudConfigsCoxEdgeMachinePoolDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param configUid + if err := r.SetPathParam("configUid", o.ConfigUID); err != nil { + return err + } + + // path param machinePoolName + if err := r.SetPathParam("machinePoolName", o.MachinePoolName); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_configs_cox_edge_machine_pool_delete_responses.go b/api/client/v1/v1_cloud_configs_cox_edge_machine_pool_delete_responses.go new file mode 100644 index 00000000..49e24d41 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_cox_edge_machine_pool_delete_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1CloudConfigsCoxEdgeMachinePoolDeleteReader is a Reader for the V1CloudConfigsCoxEdgeMachinePoolDelete structure. +type V1CloudConfigsCoxEdgeMachinePoolDeleteReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudConfigsCoxEdgeMachinePoolDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1CloudConfigsCoxEdgeMachinePoolDeleteNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudConfigsCoxEdgeMachinePoolDeleteNoContent creates a V1CloudConfigsCoxEdgeMachinePoolDeleteNoContent with default headers values +func NewV1CloudConfigsCoxEdgeMachinePoolDeleteNoContent() *V1CloudConfigsCoxEdgeMachinePoolDeleteNoContent { + return &V1CloudConfigsCoxEdgeMachinePoolDeleteNoContent{} +} + +/* +V1CloudConfigsCoxEdgeMachinePoolDeleteNoContent handles this case with default header values. + +The resource was deleted successfully +*/ +type V1CloudConfigsCoxEdgeMachinePoolDeleteNoContent struct { +} + +func (o *V1CloudConfigsCoxEdgeMachinePoolDeleteNoContent) Error() string { + return fmt.Sprintf("[DELETE /v1/cloudconfigs/coxedge/{configUid}/machinePools/{machinePoolName}][%d] v1CloudConfigsCoxEdgeMachinePoolDeleteNoContent ", 204) +} + +func (o *V1CloudConfigsCoxEdgeMachinePoolDeleteNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_cloud_configs_cox_edge_machine_pool_update_parameters.go b/api/client/v1/v1_cloud_configs_cox_edge_machine_pool_update_parameters.go new file mode 100644 index 00000000..67f89012 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_cox_edge_machine_pool_update_parameters.go @@ -0,0 +1,178 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1CloudConfigsCoxEdgeMachinePoolUpdateParams creates a new V1CloudConfigsCoxEdgeMachinePoolUpdateParams object +// with the default values initialized. +func NewV1CloudConfigsCoxEdgeMachinePoolUpdateParams() *V1CloudConfigsCoxEdgeMachinePoolUpdateParams { + var () + return &V1CloudConfigsCoxEdgeMachinePoolUpdateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudConfigsCoxEdgeMachinePoolUpdateParamsWithTimeout creates a new V1CloudConfigsCoxEdgeMachinePoolUpdateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudConfigsCoxEdgeMachinePoolUpdateParamsWithTimeout(timeout time.Duration) *V1CloudConfigsCoxEdgeMachinePoolUpdateParams { + var () + return &V1CloudConfigsCoxEdgeMachinePoolUpdateParams{ + + timeout: timeout, + } +} + +// NewV1CloudConfigsCoxEdgeMachinePoolUpdateParamsWithContext creates a new V1CloudConfigsCoxEdgeMachinePoolUpdateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudConfigsCoxEdgeMachinePoolUpdateParamsWithContext(ctx context.Context) *V1CloudConfigsCoxEdgeMachinePoolUpdateParams { + var () + return &V1CloudConfigsCoxEdgeMachinePoolUpdateParams{ + + Context: ctx, + } +} + +// NewV1CloudConfigsCoxEdgeMachinePoolUpdateParamsWithHTTPClient creates a new V1CloudConfigsCoxEdgeMachinePoolUpdateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudConfigsCoxEdgeMachinePoolUpdateParamsWithHTTPClient(client *http.Client) *V1CloudConfigsCoxEdgeMachinePoolUpdateParams { + var () + return &V1CloudConfigsCoxEdgeMachinePoolUpdateParams{ + HTTPClient: client, + } +} + +/* +V1CloudConfigsCoxEdgeMachinePoolUpdateParams contains all the parameters to send to the API endpoint +for the v1 cloud configs cox edge machine pool update operation typically these are written to a http.Request +*/ +type V1CloudConfigsCoxEdgeMachinePoolUpdateParams struct { + + /*Body*/ + Body *models.V1CoxEdgeMachinePoolConfigEntity + /*ConfigUID + Cluster's cloud config uid + + */ + ConfigUID string + /*MachinePoolName + Machine pool name + + */ + MachinePoolName string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud configs cox edge machine pool update params +func (o *V1CloudConfigsCoxEdgeMachinePoolUpdateParams) WithTimeout(timeout time.Duration) *V1CloudConfigsCoxEdgeMachinePoolUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud configs cox edge machine pool update params +func (o *V1CloudConfigsCoxEdgeMachinePoolUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud configs cox edge machine pool update params +func (o *V1CloudConfigsCoxEdgeMachinePoolUpdateParams) WithContext(ctx context.Context) *V1CloudConfigsCoxEdgeMachinePoolUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud configs cox edge machine pool update params +func (o *V1CloudConfigsCoxEdgeMachinePoolUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud configs cox edge machine pool update params +func (o *V1CloudConfigsCoxEdgeMachinePoolUpdateParams) WithHTTPClient(client *http.Client) *V1CloudConfigsCoxEdgeMachinePoolUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud configs cox edge machine pool update params +func (o *V1CloudConfigsCoxEdgeMachinePoolUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 cloud configs cox edge machine pool update params +func (o *V1CloudConfigsCoxEdgeMachinePoolUpdateParams) WithBody(body *models.V1CoxEdgeMachinePoolConfigEntity) *V1CloudConfigsCoxEdgeMachinePoolUpdateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 cloud configs cox edge machine pool update params +func (o *V1CloudConfigsCoxEdgeMachinePoolUpdateParams) SetBody(body *models.V1CoxEdgeMachinePoolConfigEntity) { + o.Body = body +} + +// WithConfigUID adds the configUID to the v1 cloud configs cox edge machine pool update params +func (o *V1CloudConfigsCoxEdgeMachinePoolUpdateParams) WithConfigUID(configUID string) *V1CloudConfigsCoxEdgeMachinePoolUpdateParams { + o.SetConfigUID(configUID) + return o +} + +// SetConfigUID adds the configUid to the v1 cloud configs cox edge machine pool update params +func (o *V1CloudConfigsCoxEdgeMachinePoolUpdateParams) SetConfigUID(configUID string) { + o.ConfigUID = configUID +} + +// WithMachinePoolName adds the machinePoolName to the v1 cloud configs cox edge machine pool update params +func (o *V1CloudConfigsCoxEdgeMachinePoolUpdateParams) WithMachinePoolName(machinePoolName string) *V1CloudConfigsCoxEdgeMachinePoolUpdateParams { + o.SetMachinePoolName(machinePoolName) + return o +} + +// SetMachinePoolName adds the machinePoolName to the v1 cloud configs cox edge machine pool update params +func (o *V1CloudConfigsCoxEdgeMachinePoolUpdateParams) SetMachinePoolName(machinePoolName string) { + o.MachinePoolName = machinePoolName +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudConfigsCoxEdgeMachinePoolUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param configUid + if err := r.SetPathParam("configUid", o.ConfigUID); err != nil { + return err + } + + // path param machinePoolName + if err := r.SetPathParam("machinePoolName", o.MachinePoolName); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_configs_cox_edge_machine_pool_update_responses.go b/api/client/v1/v1_cloud_configs_cox_edge_machine_pool_update_responses.go new file mode 100644 index 00000000..afa2603b --- /dev/null +++ b/api/client/v1/v1_cloud_configs_cox_edge_machine_pool_update_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1CloudConfigsCoxEdgeMachinePoolUpdateReader is a Reader for the V1CloudConfigsCoxEdgeMachinePoolUpdate structure. +type V1CloudConfigsCoxEdgeMachinePoolUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudConfigsCoxEdgeMachinePoolUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1CloudConfigsCoxEdgeMachinePoolUpdateNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudConfigsCoxEdgeMachinePoolUpdateNoContent creates a V1CloudConfigsCoxEdgeMachinePoolUpdateNoContent with default headers values +func NewV1CloudConfigsCoxEdgeMachinePoolUpdateNoContent() *V1CloudConfigsCoxEdgeMachinePoolUpdateNoContent { + return &V1CloudConfigsCoxEdgeMachinePoolUpdateNoContent{} +} + +/* +V1CloudConfigsCoxEdgeMachinePoolUpdateNoContent handles this case with default header values. + +The resource was updated successfully +*/ +type V1CloudConfigsCoxEdgeMachinePoolUpdateNoContent struct { +} + +func (o *V1CloudConfigsCoxEdgeMachinePoolUpdateNoContent) Error() string { + return fmt.Sprintf("[PUT /v1/cloudconfigs/coxedge/{configUid}/machinePools/{machinePoolName}][%d] v1CloudConfigsCoxEdgeMachinePoolUpdateNoContent ", 204) +} + +func (o *V1CloudConfigsCoxEdgeMachinePoolUpdateNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_cloud_configs_cox_edge_pool_machines_add_parameters.go b/api/client/v1/v1_cloud_configs_cox_edge_pool_machines_add_parameters.go new file mode 100644 index 00000000..3ce7ce89 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_cox_edge_pool_machines_add_parameters.go @@ -0,0 +1,178 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1CloudConfigsCoxEdgePoolMachinesAddParams creates a new V1CloudConfigsCoxEdgePoolMachinesAddParams object +// with the default values initialized. +func NewV1CloudConfigsCoxEdgePoolMachinesAddParams() *V1CloudConfigsCoxEdgePoolMachinesAddParams { + var () + return &V1CloudConfigsCoxEdgePoolMachinesAddParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudConfigsCoxEdgePoolMachinesAddParamsWithTimeout creates a new V1CloudConfigsCoxEdgePoolMachinesAddParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudConfigsCoxEdgePoolMachinesAddParamsWithTimeout(timeout time.Duration) *V1CloudConfigsCoxEdgePoolMachinesAddParams { + var () + return &V1CloudConfigsCoxEdgePoolMachinesAddParams{ + + timeout: timeout, + } +} + +// NewV1CloudConfigsCoxEdgePoolMachinesAddParamsWithContext creates a new V1CloudConfigsCoxEdgePoolMachinesAddParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudConfigsCoxEdgePoolMachinesAddParamsWithContext(ctx context.Context) *V1CloudConfigsCoxEdgePoolMachinesAddParams { + var () + return &V1CloudConfigsCoxEdgePoolMachinesAddParams{ + + Context: ctx, + } +} + +// NewV1CloudConfigsCoxEdgePoolMachinesAddParamsWithHTTPClient creates a new V1CloudConfigsCoxEdgePoolMachinesAddParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudConfigsCoxEdgePoolMachinesAddParamsWithHTTPClient(client *http.Client) *V1CloudConfigsCoxEdgePoolMachinesAddParams { + var () + return &V1CloudConfigsCoxEdgePoolMachinesAddParams{ + HTTPClient: client, + } +} + +/* +V1CloudConfigsCoxEdgePoolMachinesAddParams contains all the parameters to send to the API endpoint +for the v1 cloud configs cox edge pool machines add operation typically these are written to a http.Request +*/ +type V1CloudConfigsCoxEdgePoolMachinesAddParams struct { + + /*Body*/ + Body *models.V1CoxEdgeMachine + /*ConfigUID + Cluster's cloud config uid + + */ + ConfigUID string + /*MachinePoolName + Machine pool name + + */ + MachinePoolName string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud configs cox edge pool machines add params +func (o *V1CloudConfigsCoxEdgePoolMachinesAddParams) WithTimeout(timeout time.Duration) *V1CloudConfigsCoxEdgePoolMachinesAddParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud configs cox edge pool machines add params +func (o *V1CloudConfigsCoxEdgePoolMachinesAddParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud configs cox edge pool machines add params +func (o *V1CloudConfigsCoxEdgePoolMachinesAddParams) WithContext(ctx context.Context) *V1CloudConfigsCoxEdgePoolMachinesAddParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud configs cox edge pool machines add params +func (o *V1CloudConfigsCoxEdgePoolMachinesAddParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud configs cox edge pool machines add params +func (o *V1CloudConfigsCoxEdgePoolMachinesAddParams) WithHTTPClient(client *http.Client) *V1CloudConfigsCoxEdgePoolMachinesAddParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud configs cox edge pool machines add params +func (o *V1CloudConfigsCoxEdgePoolMachinesAddParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 cloud configs cox edge pool machines add params +func (o *V1CloudConfigsCoxEdgePoolMachinesAddParams) WithBody(body *models.V1CoxEdgeMachine) *V1CloudConfigsCoxEdgePoolMachinesAddParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 cloud configs cox edge pool machines add params +func (o *V1CloudConfigsCoxEdgePoolMachinesAddParams) SetBody(body *models.V1CoxEdgeMachine) { + o.Body = body +} + +// WithConfigUID adds the configUID to the v1 cloud configs cox edge pool machines add params +func (o *V1CloudConfigsCoxEdgePoolMachinesAddParams) WithConfigUID(configUID string) *V1CloudConfigsCoxEdgePoolMachinesAddParams { + o.SetConfigUID(configUID) + return o +} + +// SetConfigUID adds the configUid to the v1 cloud configs cox edge pool machines add params +func (o *V1CloudConfigsCoxEdgePoolMachinesAddParams) SetConfigUID(configUID string) { + o.ConfigUID = configUID +} + +// WithMachinePoolName adds the machinePoolName to the v1 cloud configs cox edge pool machines add params +func (o *V1CloudConfigsCoxEdgePoolMachinesAddParams) WithMachinePoolName(machinePoolName string) *V1CloudConfigsCoxEdgePoolMachinesAddParams { + o.SetMachinePoolName(machinePoolName) + return o +} + +// SetMachinePoolName adds the machinePoolName to the v1 cloud configs cox edge pool machines add params +func (o *V1CloudConfigsCoxEdgePoolMachinesAddParams) SetMachinePoolName(machinePoolName string) { + o.MachinePoolName = machinePoolName +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudConfigsCoxEdgePoolMachinesAddParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param configUid + if err := r.SetPathParam("configUid", o.ConfigUID); err != nil { + return err + } + + // path param machinePoolName + if err := r.SetPathParam("machinePoolName", o.MachinePoolName); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_configs_cox_edge_pool_machines_add_responses.go b/api/client/v1/v1_cloud_configs_cox_edge_pool_machines_add_responses.go new file mode 100644 index 00000000..6557b802 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_cox_edge_pool_machines_add_responses.go @@ -0,0 +1,77 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1CloudConfigsCoxEdgePoolMachinesAddReader is a Reader for the V1CloudConfigsCoxEdgePoolMachinesAdd structure. +type V1CloudConfigsCoxEdgePoolMachinesAddReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudConfigsCoxEdgePoolMachinesAddReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 201: + result := NewV1CloudConfigsCoxEdgePoolMachinesAddCreated() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudConfigsCoxEdgePoolMachinesAddCreated creates a V1CloudConfigsCoxEdgePoolMachinesAddCreated with default headers values +func NewV1CloudConfigsCoxEdgePoolMachinesAddCreated() *V1CloudConfigsCoxEdgePoolMachinesAddCreated { + return &V1CloudConfigsCoxEdgePoolMachinesAddCreated{} +} + +/* +V1CloudConfigsCoxEdgePoolMachinesAddCreated handles this case with default header values. + +Created successfully +*/ +type V1CloudConfigsCoxEdgePoolMachinesAddCreated struct { + /*Audit uid for the request + */ + AuditUID string + + Payload *models.V1UID +} + +func (o *V1CloudConfigsCoxEdgePoolMachinesAddCreated) Error() string { + return fmt.Sprintf("[POST /v1/cloudconfigs/coxedge/{configUid}/machinePools/{machinePoolName}/machines][%d] v1CloudConfigsCoxEdgePoolMachinesAddCreated %+v", 201, o.Payload) +} + +func (o *V1CloudConfigsCoxEdgePoolMachinesAddCreated) GetPayload() *models.V1UID { + return o.Payload +} + +func (o *V1CloudConfigsCoxEdgePoolMachinesAddCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header AuditUid + o.AuditUID = response.GetHeader("AuditUid") + + o.Payload = new(models.V1UID) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_cloud_configs_cox_edge_pool_machines_list_parameters.go b/api/client/v1/v1_cloud_configs_cox_edge_pool_machines_list_parameters.go new file mode 100644 index 00000000..1aad7ac2 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_cox_edge_pool_machines_list_parameters.go @@ -0,0 +1,365 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// NewV1CloudConfigsCoxEdgePoolMachinesListParams creates a new V1CloudConfigsCoxEdgePoolMachinesListParams object +// with the default values initialized. +func NewV1CloudConfigsCoxEdgePoolMachinesListParams() *V1CloudConfigsCoxEdgePoolMachinesListParams { + var ( + limitDefault = int64(50) + ) + return &V1CloudConfigsCoxEdgePoolMachinesListParams{ + Limit: &limitDefault, + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudConfigsCoxEdgePoolMachinesListParamsWithTimeout creates a new V1CloudConfigsCoxEdgePoolMachinesListParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudConfigsCoxEdgePoolMachinesListParamsWithTimeout(timeout time.Duration) *V1CloudConfigsCoxEdgePoolMachinesListParams { + var ( + limitDefault = int64(50) + ) + return &V1CloudConfigsCoxEdgePoolMachinesListParams{ + Limit: &limitDefault, + + timeout: timeout, + } +} + +// NewV1CloudConfigsCoxEdgePoolMachinesListParamsWithContext creates a new V1CloudConfigsCoxEdgePoolMachinesListParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudConfigsCoxEdgePoolMachinesListParamsWithContext(ctx context.Context) *V1CloudConfigsCoxEdgePoolMachinesListParams { + var ( + limitDefault = int64(50) + ) + return &V1CloudConfigsCoxEdgePoolMachinesListParams{ + Limit: &limitDefault, + + Context: ctx, + } +} + +// NewV1CloudConfigsCoxEdgePoolMachinesListParamsWithHTTPClient creates a new V1CloudConfigsCoxEdgePoolMachinesListParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudConfigsCoxEdgePoolMachinesListParamsWithHTTPClient(client *http.Client) *V1CloudConfigsCoxEdgePoolMachinesListParams { + var ( + limitDefault = int64(50) + ) + return &V1CloudConfigsCoxEdgePoolMachinesListParams{ + Limit: &limitDefault, + HTTPClient: client, + } +} + +/* +V1CloudConfigsCoxEdgePoolMachinesListParams contains all the parameters to send to the API endpoint +for the v1 cloud configs cox edge pool machines list operation typically these are written to a http.Request +*/ +type V1CloudConfigsCoxEdgePoolMachinesListParams struct { + + /*ConfigUID + Cluster's cloud config uid + + */ + ConfigUID string + /*Continue + continue token to paginate the subsequent data items + + */ + Continue *string + /*Fields + Set of fields to be presented in the response with values. The fields are comma separated. Eg: metadata.uid,metadata.name + + */ + Fields *string + /*Filters + Filters can be combined with AND, OR operators with field path name. Eg: metadata.name=TestServiceANDspec.cloudType=aws + + Server will be restricted to certain fields based on the indexed data for each resource. + + */ + Filters *string + /*Limit + limit is a maximum number of responses to return for a list call. Default and maximum value of the limit is 50. + If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. + + */ + Limit *int64 + /*MachinePoolName + Machine pool name + + */ + MachinePoolName string + /*Offset + offset is the next index number from which the response will start. The response offset value can be used along with continue token for the pagination. + + */ + Offset *int64 + /*OrderBy + Specify the fields with sort order. 1 indicates ascending and -1 for descending. Eg: orderBy=metadata.name=1,metadata.uid=-1 + + */ + OrderBy *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud configs cox edge pool machines list params +func (o *V1CloudConfigsCoxEdgePoolMachinesListParams) WithTimeout(timeout time.Duration) *V1CloudConfigsCoxEdgePoolMachinesListParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud configs cox edge pool machines list params +func (o *V1CloudConfigsCoxEdgePoolMachinesListParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud configs cox edge pool machines list params +func (o *V1CloudConfigsCoxEdgePoolMachinesListParams) WithContext(ctx context.Context) *V1CloudConfigsCoxEdgePoolMachinesListParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud configs cox edge pool machines list params +func (o *V1CloudConfigsCoxEdgePoolMachinesListParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud configs cox edge pool machines list params +func (o *V1CloudConfigsCoxEdgePoolMachinesListParams) WithHTTPClient(client *http.Client) *V1CloudConfigsCoxEdgePoolMachinesListParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud configs cox edge pool machines list params +func (o *V1CloudConfigsCoxEdgePoolMachinesListParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithConfigUID adds the configUID to the v1 cloud configs cox edge pool machines list params +func (o *V1CloudConfigsCoxEdgePoolMachinesListParams) WithConfigUID(configUID string) *V1CloudConfigsCoxEdgePoolMachinesListParams { + o.SetConfigUID(configUID) + return o +} + +// SetConfigUID adds the configUid to the v1 cloud configs cox edge pool machines list params +func (o *V1CloudConfigsCoxEdgePoolMachinesListParams) SetConfigUID(configUID string) { + o.ConfigUID = configUID +} + +// WithContinue adds the continueVar to the v1 cloud configs cox edge pool machines list params +func (o *V1CloudConfigsCoxEdgePoolMachinesListParams) WithContinue(continueVar *string) *V1CloudConfigsCoxEdgePoolMachinesListParams { + o.SetContinue(continueVar) + return o +} + +// SetContinue adds the continue to the v1 cloud configs cox edge pool machines list params +func (o *V1CloudConfigsCoxEdgePoolMachinesListParams) SetContinue(continueVar *string) { + o.Continue = continueVar +} + +// WithFields adds the fields to the v1 cloud configs cox edge pool machines list params +func (o *V1CloudConfigsCoxEdgePoolMachinesListParams) WithFields(fields *string) *V1CloudConfigsCoxEdgePoolMachinesListParams { + o.SetFields(fields) + return o +} + +// SetFields adds the fields to the v1 cloud configs cox edge pool machines list params +func (o *V1CloudConfigsCoxEdgePoolMachinesListParams) SetFields(fields *string) { + o.Fields = fields +} + +// WithFilters adds the filters to the v1 cloud configs cox edge pool machines list params +func (o *V1CloudConfigsCoxEdgePoolMachinesListParams) WithFilters(filters *string) *V1CloudConfigsCoxEdgePoolMachinesListParams { + o.SetFilters(filters) + return o +} + +// SetFilters adds the filters to the v1 cloud configs cox edge pool machines list params +func (o *V1CloudConfigsCoxEdgePoolMachinesListParams) SetFilters(filters *string) { + o.Filters = filters +} + +// WithLimit adds the limit to the v1 cloud configs cox edge pool machines list params +func (o *V1CloudConfigsCoxEdgePoolMachinesListParams) WithLimit(limit *int64) *V1CloudConfigsCoxEdgePoolMachinesListParams { + o.SetLimit(limit) + return o +} + +// SetLimit adds the limit to the v1 cloud configs cox edge pool machines list params +func (o *V1CloudConfigsCoxEdgePoolMachinesListParams) SetLimit(limit *int64) { + o.Limit = limit +} + +// WithMachinePoolName adds the machinePoolName to the v1 cloud configs cox edge pool machines list params +func (o *V1CloudConfigsCoxEdgePoolMachinesListParams) WithMachinePoolName(machinePoolName string) *V1CloudConfigsCoxEdgePoolMachinesListParams { + o.SetMachinePoolName(machinePoolName) + return o +} + +// SetMachinePoolName adds the machinePoolName to the v1 cloud configs cox edge pool machines list params +func (o *V1CloudConfigsCoxEdgePoolMachinesListParams) SetMachinePoolName(machinePoolName string) { + o.MachinePoolName = machinePoolName +} + +// WithOffset adds the offset to the v1 cloud configs cox edge pool machines list params +func (o *V1CloudConfigsCoxEdgePoolMachinesListParams) WithOffset(offset *int64) *V1CloudConfigsCoxEdgePoolMachinesListParams { + o.SetOffset(offset) + return o +} + +// SetOffset adds the offset to the v1 cloud configs cox edge pool machines list params +func (o *V1CloudConfigsCoxEdgePoolMachinesListParams) SetOffset(offset *int64) { + o.Offset = offset +} + +// WithOrderBy adds the orderBy to the v1 cloud configs cox edge pool machines list params +func (o *V1CloudConfigsCoxEdgePoolMachinesListParams) WithOrderBy(orderBy *string) *V1CloudConfigsCoxEdgePoolMachinesListParams { + o.SetOrderBy(orderBy) + return o +} + +// SetOrderBy adds the orderBy to the v1 cloud configs cox edge pool machines list params +func (o *V1CloudConfigsCoxEdgePoolMachinesListParams) SetOrderBy(orderBy *string) { + o.OrderBy = orderBy +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudConfigsCoxEdgePoolMachinesListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param configUid + if err := r.SetPathParam("configUid", o.ConfigUID); err != nil { + return err + } + + if o.Continue != nil { + + // query param continue + var qrContinue string + if o.Continue != nil { + qrContinue = *o.Continue + } + qContinue := qrContinue + if qContinue != "" { + if err := r.SetQueryParam("continue", qContinue); err != nil { + return err + } + } + + } + + if o.Fields != nil { + + // query param fields + var qrFields string + if o.Fields != nil { + qrFields = *o.Fields + } + qFields := qrFields + if qFields != "" { + if err := r.SetQueryParam("fields", qFields); err != nil { + return err + } + } + + } + + if o.Filters != nil { + + // query param filters + var qrFilters string + if o.Filters != nil { + qrFilters = *o.Filters + } + qFilters := qrFilters + if qFilters != "" { + if err := r.SetQueryParam("filters", qFilters); err != nil { + return err + } + } + + } + + if o.Limit != nil { + + // query param limit + var qrLimit int64 + if o.Limit != nil { + qrLimit = *o.Limit + } + qLimit := swag.FormatInt64(qrLimit) + if qLimit != "" { + if err := r.SetQueryParam("limit", qLimit); err != nil { + return err + } + } + + } + + // path param machinePoolName + if err := r.SetPathParam("machinePoolName", o.MachinePoolName); err != nil { + return err + } + + if o.Offset != nil { + + // query param offset + var qrOffset int64 + if o.Offset != nil { + qrOffset = *o.Offset + } + qOffset := swag.FormatInt64(qrOffset) + if qOffset != "" { + if err := r.SetQueryParam("offset", qOffset); err != nil { + return err + } + } + + } + + if o.OrderBy != nil { + + // query param orderBy + var qrOrderBy string + if o.OrderBy != nil { + qrOrderBy = *o.OrderBy + } + qOrderBy := qrOrderBy + if qOrderBy != "" { + if err := r.SetQueryParam("orderBy", qOrderBy); err != nil { + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_configs_cox_edge_pool_machines_list_responses.go b/api/client/v1/v1_cloud_configs_cox_edge_pool_machines_list_responses.go new file mode 100644 index 00000000..11152a02 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_cox_edge_pool_machines_list_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1CloudConfigsCoxEdgePoolMachinesListReader is a Reader for the V1CloudConfigsCoxEdgePoolMachinesList structure. +type V1CloudConfigsCoxEdgePoolMachinesListReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudConfigsCoxEdgePoolMachinesListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1CloudConfigsCoxEdgePoolMachinesListOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudConfigsCoxEdgePoolMachinesListOK creates a V1CloudConfigsCoxEdgePoolMachinesListOK with default headers values +func NewV1CloudConfigsCoxEdgePoolMachinesListOK() *V1CloudConfigsCoxEdgePoolMachinesListOK { + return &V1CloudConfigsCoxEdgePoolMachinesListOK{} +} + +/* +V1CloudConfigsCoxEdgePoolMachinesListOK handles this case with default header values. + +An array of CoxEdge machine items +*/ +type V1CloudConfigsCoxEdgePoolMachinesListOK struct { + Payload *models.V1CoxEdgeMachines +} + +func (o *V1CloudConfigsCoxEdgePoolMachinesListOK) Error() string { + return fmt.Sprintf("[GET /v1/cloudconfigs/coxedge/{configUid}/machinePools/{machinePoolName}/machines][%d] v1CloudConfigsCoxEdgePoolMachinesListOK %+v", 200, o.Payload) +} + +func (o *V1CloudConfigsCoxEdgePoolMachinesListOK) GetPayload() *models.V1CoxEdgeMachines { + return o.Payload +} + +func (o *V1CloudConfigsCoxEdgePoolMachinesListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1CoxEdgeMachines) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_cloud_configs_cox_edge_pool_machines_uid_delete_parameters.go b/api/client/v1/v1_cloud_configs_cox_edge_pool_machines_uid_delete_parameters.go new file mode 100644 index 00000000..1eebdf87 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_cox_edge_pool_machines_uid_delete_parameters.go @@ -0,0 +1,178 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1CloudConfigsCoxEdgePoolMachinesUIDDeleteParams creates a new V1CloudConfigsCoxEdgePoolMachinesUIDDeleteParams object +// with the default values initialized. +func NewV1CloudConfigsCoxEdgePoolMachinesUIDDeleteParams() *V1CloudConfigsCoxEdgePoolMachinesUIDDeleteParams { + var () + return &V1CloudConfigsCoxEdgePoolMachinesUIDDeleteParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudConfigsCoxEdgePoolMachinesUIDDeleteParamsWithTimeout creates a new V1CloudConfigsCoxEdgePoolMachinesUIDDeleteParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudConfigsCoxEdgePoolMachinesUIDDeleteParamsWithTimeout(timeout time.Duration) *V1CloudConfigsCoxEdgePoolMachinesUIDDeleteParams { + var () + return &V1CloudConfigsCoxEdgePoolMachinesUIDDeleteParams{ + + timeout: timeout, + } +} + +// NewV1CloudConfigsCoxEdgePoolMachinesUIDDeleteParamsWithContext creates a new V1CloudConfigsCoxEdgePoolMachinesUIDDeleteParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudConfigsCoxEdgePoolMachinesUIDDeleteParamsWithContext(ctx context.Context) *V1CloudConfigsCoxEdgePoolMachinesUIDDeleteParams { + var () + return &V1CloudConfigsCoxEdgePoolMachinesUIDDeleteParams{ + + Context: ctx, + } +} + +// NewV1CloudConfigsCoxEdgePoolMachinesUIDDeleteParamsWithHTTPClient creates a new V1CloudConfigsCoxEdgePoolMachinesUIDDeleteParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudConfigsCoxEdgePoolMachinesUIDDeleteParamsWithHTTPClient(client *http.Client) *V1CloudConfigsCoxEdgePoolMachinesUIDDeleteParams { + var () + return &V1CloudConfigsCoxEdgePoolMachinesUIDDeleteParams{ + HTTPClient: client, + } +} + +/* +V1CloudConfigsCoxEdgePoolMachinesUIDDeleteParams contains all the parameters to send to the API endpoint +for the v1 cloud configs cox edge pool machines Uid delete operation typically these are written to a http.Request +*/ +type V1CloudConfigsCoxEdgePoolMachinesUIDDeleteParams struct { + + /*ConfigUID + Cluster's cloud config uid + + */ + ConfigUID string + /*MachinePoolName + Machine pool name + + */ + MachinePoolName string + /*MachineUID + Machine uid + + */ + MachineUID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud configs cox edge pool machines Uid delete params +func (o *V1CloudConfigsCoxEdgePoolMachinesUIDDeleteParams) WithTimeout(timeout time.Duration) *V1CloudConfigsCoxEdgePoolMachinesUIDDeleteParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud configs cox edge pool machines Uid delete params +func (o *V1CloudConfigsCoxEdgePoolMachinesUIDDeleteParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud configs cox edge pool machines Uid delete params +func (o *V1CloudConfigsCoxEdgePoolMachinesUIDDeleteParams) WithContext(ctx context.Context) *V1CloudConfigsCoxEdgePoolMachinesUIDDeleteParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud configs cox edge pool machines Uid delete params +func (o *V1CloudConfigsCoxEdgePoolMachinesUIDDeleteParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud configs cox edge pool machines Uid delete params +func (o *V1CloudConfigsCoxEdgePoolMachinesUIDDeleteParams) WithHTTPClient(client *http.Client) *V1CloudConfigsCoxEdgePoolMachinesUIDDeleteParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud configs cox edge pool machines Uid delete params +func (o *V1CloudConfigsCoxEdgePoolMachinesUIDDeleteParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithConfigUID adds the configUID to the v1 cloud configs cox edge pool machines Uid delete params +func (o *V1CloudConfigsCoxEdgePoolMachinesUIDDeleteParams) WithConfigUID(configUID string) *V1CloudConfigsCoxEdgePoolMachinesUIDDeleteParams { + o.SetConfigUID(configUID) + return o +} + +// SetConfigUID adds the configUid to the v1 cloud configs cox edge pool machines Uid delete params +func (o *V1CloudConfigsCoxEdgePoolMachinesUIDDeleteParams) SetConfigUID(configUID string) { + o.ConfigUID = configUID +} + +// WithMachinePoolName adds the machinePoolName to the v1 cloud configs cox edge pool machines Uid delete params +func (o *V1CloudConfigsCoxEdgePoolMachinesUIDDeleteParams) WithMachinePoolName(machinePoolName string) *V1CloudConfigsCoxEdgePoolMachinesUIDDeleteParams { + o.SetMachinePoolName(machinePoolName) + return o +} + +// SetMachinePoolName adds the machinePoolName to the v1 cloud configs cox edge pool machines Uid delete params +func (o *V1CloudConfigsCoxEdgePoolMachinesUIDDeleteParams) SetMachinePoolName(machinePoolName string) { + o.MachinePoolName = machinePoolName +} + +// WithMachineUID adds the machineUID to the v1 cloud configs cox edge pool machines Uid delete params +func (o *V1CloudConfigsCoxEdgePoolMachinesUIDDeleteParams) WithMachineUID(machineUID string) *V1CloudConfigsCoxEdgePoolMachinesUIDDeleteParams { + o.SetMachineUID(machineUID) + return o +} + +// SetMachineUID adds the machineUid to the v1 cloud configs cox edge pool machines Uid delete params +func (o *V1CloudConfigsCoxEdgePoolMachinesUIDDeleteParams) SetMachineUID(machineUID string) { + o.MachineUID = machineUID +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudConfigsCoxEdgePoolMachinesUIDDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param configUid + if err := r.SetPathParam("configUid", o.ConfigUID); err != nil { + return err + } + + // path param machinePoolName + if err := r.SetPathParam("machinePoolName", o.MachinePoolName); err != nil { + return err + } + + // path param machineUid + if err := r.SetPathParam("machineUid", o.MachineUID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_configs_cox_edge_pool_machines_uid_delete_responses.go b/api/client/v1/v1_cloud_configs_cox_edge_pool_machines_uid_delete_responses.go new file mode 100644 index 00000000..6e56810e --- /dev/null +++ b/api/client/v1/v1_cloud_configs_cox_edge_pool_machines_uid_delete_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1CloudConfigsCoxEdgePoolMachinesUIDDeleteReader is a Reader for the V1CloudConfigsCoxEdgePoolMachinesUIDDelete structure. +type V1CloudConfigsCoxEdgePoolMachinesUIDDeleteReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudConfigsCoxEdgePoolMachinesUIDDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1CloudConfigsCoxEdgePoolMachinesUIDDeleteNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudConfigsCoxEdgePoolMachinesUIDDeleteNoContent creates a V1CloudConfigsCoxEdgePoolMachinesUIDDeleteNoContent with default headers values +func NewV1CloudConfigsCoxEdgePoolMachinesUIDDeleteNoContent() *V1CloudConfigsCoxEdgePoolMachinesUIDDeleteNoContent { + return &V1CloudConfigsCoxEdgePoolMachinesUIDDeleteNoContent{} +} + +/* +V1CloudConfigsCoxEdgePoolMachinesUIDDeleteNoContent handles this case with default header values. + +The resource was deleted successfully +*/ +type V1CloudConfigsCoxEdgePoolMachinesUIDDeleteNoContent struct { +} + +func (o *V1CloudConfigsCoxEdgePoolMachinesUIDDeleteNoContent) Error() string { + return fmt.Sprintf("[DELETE /v1/cloudconfigs/coxedge/{configUid}/machinePools/{machinePoolName}/machines/{machineUid}][%d] v1CloudConfigsCoxEdgePoolMachinesUidDeleteNoContent ", 204) +} + +func (o *V1CloudConfigsCoxEdgePoolMachinesUIDDeleteNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_cloud_configs_cox_edge_pool_machines_uid_get_parameters.go b/api/client/v1/v1_cloud_configs_cox_edge_pool_machines_uid_get_parameters.go new file mode 100644 index 00000000..5cbc2e40 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_cox_edge_pool_machines_uid_get_parameters.go @@ -0,0 +1,178 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1CloudConfigsCoxEdgePoolMachinesUIDGetParams creates a new V1CloudConfigsCoxEdgePoolMachinesUIDGetParams object +// with the default values initialized. +func NewV1CloudConfigsCoxEdgePoolMachinesUIDGetParams() *V1CloudConfigsCoxEdgePoolMachinesUIDGetParams { + var () + return &V1CloudConfigsCoxEdgePoolMachinesUIDGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudConfigsCoxEdgePoolMachinesUIDGetParamsWithTimeout creates a new V1CloudConfigsCoxEdgePoolMachinesUIDGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudConfigsCoxEdgePoolMachinesUIDGetParamsWithTimeout(timeout time.Duration) *V1CloudConfigsCoxEdgePoolMachinesUIDGetParams { + var () + return &V1CloudConfigsCoxEdgePoolMachinesUIDGetParams{ + + timeout: timeout, + } +} + +// NewV1CloudConfigsCoxEdgePoolMachinesUIDGetParamsWithContext creates a new V1CloudConfigsCoxEdgePoolMachinesUIDGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudConfigsCoxEdgePoolMachinesUIDGetParamsWithContext(ctx context.Context) *V1CloudConfigsCoxEdgePoolMachinesUIDGetParams { + var () + return &V1CloudConfigsCoxEdgePoolMachinesUIDGetParams{ + + Context: ctx, + } +} + +// NewV1CloudConfigsCoxEdgePoolMachinesUIDGetParamsWithHTTPClient creates a new V1CloudConfigsCoxEdgePoolMachinesUIDGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudConfigsCoxEdgePoolMachinesUIDGetParamsWithHTTPClient(client *http.Client) *V1CloudConfigsCoxEdgePoolMachinesUIDGetParams { + var () + return &V1CloudConfigsCoxEdgePoolMachinesUIDGetParams{ + HTTPClient: client, + } +} + +/* +V1CloudConfigsCoxEdgePoolMachinesUIDGetParams contains all the parameters to send to the API endpoint +for the v1 cloud configs cox edge pool machines Uid get operation typically these are written to a http.Request +*/ +type V1CloudConfigsCoxEdgePoolMachinesUIDGetParams struct { + + /*ConfigUID + Cluster's cloud config uid + + */ + ConfigUID string + /*MachinePoolName + Machine pool name + + */ + MachinePoolName string + /*MachineUID + Machine uid + + */ + MachineUID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud configs cox edge pool machines Uid get params +func (o *V1CloudConfigsCoxEdgePoolMachinesUIDGetParams) WithTimeout(timeout time.Duration) *V1CloudConfigsCoxEdgePoolMachinesUIDGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud configs cox edge pool machines Uid get params +func (o *V1CloudConfigsCoxEdgePoolMachinesUIDGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud configs cox edge pool machines Uid get params +func (o *V1CloudConfigsCoxEdgePoolMachinesUIDGetParams) WithContext(ctx context.Context) *V1CloudConfigsCoxEdgePoolMachinesUIDGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud configs cox edge pool machines Uid get params +func (o *V1CloudConfigsCoxEdgePoolMachinesUIDGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud configs cox edge pool machines Uid get params +func (o *V1CloudConfigsCoxEdgePoolMachinesUIDGetParams) WithHTTPClient(client *http.Client) *V1CloudConfigsCoxEdgePoolMachinesUIDGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud configs cox edge pool machines Uid get params +func (o *V1CloudConfigsCoxEdgePoolMachinesUIDGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithConfigUID adds the configUID to the v1 cloud configs cox edge pool machines Uid get params +func (o *V1CloudConfigsCoxEdgePoolMachinesUIDGetParams) WithConfigUID(configUID string) *V1CloudConfigsCoxEdgePoolMachinesUIDGetParams { + o.SetConfigUID(configUID) + return o +} + +// SetConfigUID adds the configUid to the v1 cloud configs cox edge pool machines Uid get params +func (o *V1CloudConfigsCoxEdgePoolMachinesUIDGetParams) SetConfigUID(configUID string) { + o.ConfigUID = configUID +} + +// WithMachinePoolName adds the machinePoolName to the v1 cloud configs cox edge pool machines Uid get params +func (o *V1CloudConfigsCoxEdgePoolMachinesUIDGetParams) WithMachinePoolName(machinePoolName string) *V1CloudConfigsCoxEdgePoolMachinesUIDGetParams { + o.SetMachinePoolName(machinePoolName) + return o +} + +// SetMachinePoolName adds the machinePoolName to the v1 cloud configs cox edge pool machines Uid get params +func (o *V1CloudConfigsCoxEdgePoolMachinesUIDGetParams) SetMachinePoolName(machinePoolName string) { + o.MachinePoolName = machinePoolName +} + +// WithMachineUID adds the machineUID to the v1 cloud configs cox edge pool machines Uid get params +func (o *V1CloudConfigsCoxEdgePoolMachinesUIDGetParams) WithMachineUID(machineUID string) *V1CloudConfigsCoxEdgePoolMachinesUIDGetParams { + o.SetMachineUID(machineUID) + return o +} + +// SetMachineUID adds the machineUid to the v1 cloud configs cox edge pool machines Uid get params +func (o *V1CloudConfigsCoxEdgePoolMachinesUIDGetParams) SetMachineUID(machineUID string) { + o.MachineUID = machineUID +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudConfigsCoxEdgePoolMachinesUIDGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param configUid + if err := r.SetPathParam("configUid", o.ConfigUID); err != nil { + return err + } + + // path param machinePoolName + if err := r.SetPathParam("machinePoolName", o.MachinePoolName); err != nil { + return err + } + + // path param machineUid + if err := r.SetPathParam("machineUid", o.MachineUID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_configs_cox_edge_pool_machines_uid_get_responses.go b/api/client/v1/v1_cloud_configs_cox_edge_pool_machines_uid_get_responses.go new file mode 100644 index 00000000..c3267fc1 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_cox_edge_pool_machines_uid_get_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1CloudConfigsCoxEdgePoolMachinesUIDGetReader is a Reader for the V1CloudConfigsCoxEdgePoolMachinesUIDGet structure. +type V1CloudConfigsCoxEdgePoolMachinesUIDGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudConfigsCoxEdgePoolMachinesUIDGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1CloudConfigsCoxEdgePoolMachinesUIDGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudConfigsCoxEdgePoolMachinesUIDGetOK creates a V1CloudConfigsCoxEdgePoolMachinesUIDGetOK with default headers values +func NewV1CloudConfigsCoxEdgePoolMachinesUIDGetOK() *V1CloudConfigsCoxEdgePoolMachinesUIDGetOK { + return &V1CloudConfigsCoxEdgePoolMachinesUIDGetOK{} +} + +/* +V1CloudConfigsCoxEdgePoolMachinesUIDGetOK handles this case with default header values. + +OK +*/ +type V1CloudConfigsCoxEdgePoolMachinesUIDGetOK struct { + Payload *models.V1CoxEdgeMachine +} + +func (o *V1CloudConfigsCoxEdgePoolMachinesUIDGetOK) Error() string { + return fmt.Sprintf("[GET /v1/cloudconfigs/coxedge/{configUid}/machinePools/{machinePoolName}/machines/{machineUid}][%d] v1CloudConfigsCoxEdgePoolMachinesUidGetOK %+v", 200, o.Payload) +} + +func (o *V1CloudConfigsCoxEdgePoolMachinesUIDGetOK) GetPayload() *models.V1CoxEdgeMachine { + return o.Payload +} + +func (o *V1CloudConfigsCoxEdgePoolMachinesUIDGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1CoxEdgeMachine) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_cloud_configs_cox_edge_pool_machines_uid_update_parameters.go b/api/client/v1/v1_cloud_configs_cox_edge_pool_machines_uid_update_parameters.go new file mode 100644 index 00000000..c58e2b3a --- /dev/null +++ b/api/client/v1/v1_cloud_configs_cox_edge_pool_machines_uid_update_parameters.go @@ -0,0 +1,199 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1CloudConfigsCoxEdgePoolMachinesUIDUpdateParams creates a new V1CloudConfigsCoxEdgePoolMachinesUIDUpdateParams object +// with the default values initialized. +func NewV1CloudConfigsCoxEdgePoolMachinesUIDUpdateParams() *V1CloudConfigsCoxEdgePoolMachinesUIDUpdateParams { + var () + return &V1CloudConfigsCoxEdgePoolMachinesUIDUpdateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudConfigsCoxEdgePoolMachinesUIDUpdateParamsWithTimeout creates a new V1CloudConfigsCoxEdgePoolMachinesUIDUpdateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudConfigsCoxEdgePoolMachinesUIDUpdateParamsWithTimeout(timeout time.Duration) *V1CloudConfigsCoxEdgePoolMachinesUIDUpdateParams { + var () + return &V1CloudConfigsCoxEdgePoolMachinesUIDUpdateParams{ + + timeout: timeout, + } +} + +// NewV1CloudConfigsCoxEdgePoolMachinesUIDUpdateParamsWithContext creates a new V1CloudConfigsCoxEdgePoolMachinesUIDUpdateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudConfigsCoxEdgePoolMachinesUIDUpdateParamsWithContext(ctx context.Context) *V1CloudConfigsCoxEdgePoolMachinesUIDUpdateParams { + var () + return &V1CloudConfigsCoxEdgePoolMachinesUIDUpdateParams{ + + Context: ctx, + } +} + +// NewV1CloudConfigsCoxEdgePoolMachinesUIDUpdateParamsWithHTTPClient creates a new V1CloudConfigsCoxEdgePoolMachinesUIDUpdateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudConfigsCoxEdgePoolMachinesUIDUpdateParamsWithHTTPClient(client *http.Client) *V1CloudConfigsCoxEdgePoolMachinesUIDUpdateParams { + var () + return &V1CloudConfigsCoxEdgePoolMachinesUIDUpdateParams{ + HTTPClient: client, + } +} + +/* +V1CloudConfigsCoxEdgePoolMachinesUIDUpdateParams contains all the parameters to send to the API endpoint +for the v1 cloud configs cox edge pool machines Uid update operation typically these are written to a http.Request +*/ +type V1CloudConfigsCoxEdgePoolMachinesUIDUpdateParams struct { + + /*Body*/ + Body *models.V1CoxEdgeMachine + /*ConfigUID + Cluster's cloud config uid + + */ + ConfigUID string + /*MachinePoolName + Machine pool name + + */ + MachinePoolName string + /*MachineUID + Machine uid + + */ + MachineUID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud configs cox edge pool machines Uid update params +func (o *V1CloudConfigsCoxEdgePoolMachinesUIDUpdateParams) WithTimeout(timeout time.Duration) *V1CloudConfigsCoxEdgePoolMachinesUIDUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud configs cox edge pool machines Uid update params +func (o *V1CloudConfigsCoxEdgePoolMachinesUIDUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud configs cox edge pool machines Uid update params +func (o *V1CloudConfigsCoxEdgePoolMachinesUIDUpdateParams) WithContext(ctx context.Context) *V1CloudConfigsCoxEdgePoolMachinesUIDUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud configs cox edge pool machines Uid update params +func (o *V1CloudConfigsCoxEdgePoolMachinesUIDUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud configs cox edge pool machines Uid update params +func (o *V1CloudConfigsCoxEdgePoolMachinesUIDUpdateParams) WithHTTPClient(client *http.Client) *V1CloudConfigsCoxEdgePoolMachinesUIDUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud configs cox edge pool machines Uid update params +func (o *V1CloudConfigsCoxEdgePoolMachinesUIDUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 cloud configs cox edge pool machines Uid update params +func (o *V1CloudConfigsCoxEdgePoolMachinesUIDUpdateParams) WithBody(body *models.V1CoxEdgeMachine) *V1CloudConfigsCoxEdgePoolMachinesUIDUpdateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 cloud configs cox edge pool machines Uid update params +func (o *V1CloudConfigsCoxEdgePoolMachinesUIDUpdateParams) SetBody(body *models.V1CoxEdgeMachine) { + o.Body = body +} + +// WithConfigUID adds the configUID to the v1 cloud configs cox edge pool machines Uid update params +func (o *V1CloudConfigsCoxEdgePoolMachinesUIDUpdateParams) WithConfigUID(configUID string) *V1CloudConfigsCoxEdgePoolMachinesUIDUpdateParams { + o.SetConfigUID(configUID) + return o +} + +// SetConfigUID adds the configUid to the v1 cloud configs cox edge pool machines Uid update params +func (o *V1CloudConfigsCoxEdgePoolMachinesUIDUpdateParams) SetConfigUID(configUID string) { + o.ConfigUID = configUID +} + +// WithMachinePoolName adds the machinePoolName to the v1 cloud configs cox edge pool machines Uid update params +func (o *V1CloudConfigsCoxEdgePoolMachinesUIDUpdateParams) WithMachinePoolName(machinePoolName string) *V1CloudConfigsCoxEdgePoolMachinesUIDUpdateParams { + o.SetMachinePoolName(machinePoolName) + return o +} + +// SetMachinePoolName adds the machinePoolName to the v1 cloud configs cox edge pool machines Uid update params +func (o *V1CloudConfigsCoxEdgePoolMachinesUIDUpdateParams) SetMachinePoolName(machinePoolName string) { + o.MachinePoolName = machinePoolName +} + +// WithMachineUID adds the machineUID to the v1 cloud configs cox edge pool machines Uid update params +func (o *V1CloudConfigsCoxEdgePoolMachinesUIDUpdateParams) WithMachineUID(machineUID string) *V1CloudConfigsCoxEdgePoolMachinesUIDUpdateParams { + o.SetMachineUID(machineUID) + return o +} + +// SetMachineUID adds the machineUid to the v1 cloud configs cox edge pool machines Uid update params +func (o *V1CloudConfigsCoxEdgePoolMachinesUIDUpdateParams) SetMachineUID(machineUID string) { + o.MachineUID = machineUID +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudConfigsCoxEdgePoolMachinesUIDUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param configUid + if err := r.SetPathParam("configUid", o.ConfigUID); err != nil { + return err + } + + // path param machinePoolName + if err := r.SetPathParam("machinePoolName", o.MachinePoolName); err != nil { + return err + } + + // path param machineUid + if err := r.SetPathParam("machineUid", o.MachineUID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_configs_cox_edge_pool_machines_uid_update_responses.go b/api/client/v1/v1_cloud_configs_cox_edge_pool_machines_uid_update_responses.go new file mode 100644 index 00000000..511f5c14 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_cox_edge_pool_machines_uid_update_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1CloudConfigsCoxEdgePoolMachinesUIDUpdateReader is a Reader for the V1CloudConfigsCoxEdgePoolMachinesUIDUpdate structure. +type V1CloudConfigsCoxEdgePoolMachinesUIDUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudConfigsCoxEdgePoolMachinesUIDUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1CloudConfigsCoxEdgePoolMachinesUIDUpdateNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudConfigsCoxEdgePoolMachinesUIDUpdateNoContent creates a V1CloudConfigsCoxEdgePoolMachinesUIDUpdateNoContent with default headers values +func NewV1CloudConfigsCoxEdgePoolMachinesUIDUpdateNoContent() *V1CloudConfigsCoxEdgePoolMachinesUIDUpdateNoContent { + return &V1CloudConfigsCoxEdgePoolMachinesUIDUpdateNoContent{} +} + +/* +V1CloudConfigsCoxEdgePoolMachinesUIDUpdateNoContent handles this case with default header values. + +The resource was updated successfully +*/ +type V1CloudConfigsCoxEdgePoolMachinesUIDUpdateNoContent struct { +} + +func (o *V1CloudConfigsCoxEdgePoolMachinesUIDUpdateNoContent) Error() string { + return fmt.Sprintf("[PUT /v1/cloudconfigs/coxedge/{configUid}/machinePools/{machinePoolName}/machines/{machineUid}][%d] v1CloudConfigsCoxEdgePoolMachinesUidUpdateNoContent ", 204) +} + +func (o *V1CloudConfigsCoxEdgePoolMachinesUIDUpdateNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_cloud_configs_cox_edge_uid_cluster_config_update_parameters.go b/api/client/v1/v1_cloud_configs_cox_edge_uid_cluster_config_update_parameters.go new file mode 100644 index 00000000..af5b48e4 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_cox_edge_uid_cluster_config_update_parameters.go @@ -0,0 +1,157 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1CloudConfigsCoxEdgeUIDClusterConfigUpdateParams creates a new V1CloudConfigsCoxEdgeUIDClusterConfigUpdateParams object +// with the default values initialized. +func NewV1CloudConfigsCoxEdgeUIDClusterConfigUpdateParams() *V1CloudConfigsCoxEdgeUIDClusterConfigUpdateParams { + var () + return &V1CloudConfigsCoxEdgeUIDClusterConfigUpdateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudConfigsCoxEdgeUIDClusterConfigUpdateParamsWithTimeout creates a new V1CloudConfigsCoxEdgeUIDClusterConfigUpdateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudConfigsCoxEdgeUIDClusterConfigUpdateParamsWithTimeout(timeout time.Duration) *V1CloudConfigsCoxEdgeUIDClusterConfigUpdateParams { + var () + return &V1CloudConfigsCoxEdgeUIDClusterConfigUpdateParams{ + + timeout: timeout, + } +} + +// NewV1CloudConfigsCoxEdgeUIDClusterConfigUpdateParamsWithContext creates a new V1CloudConfigsCoxEdgeUIDClusterConfigUpdateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudConfigsCoxEdgeUIDClusterConfigUpdateParamsWithContext(ctx context.Context) *V1CloudConfigsCoxEdgeUIDClusterConfigUpdateParams { + var () + return &V1CloudConfigsCoxEdgeUIDClusterConfigUpdateParams{ + + Context: ctx, + } +} + +// NewV1CloudConfigsCoxEdgeUIDClusterConfigUpdateParamsWithHTTPClient creates a new V1CloudConfigsCoxEdgeUIDClusterConfigUpdateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudConfigsCoxEdgeUIDClusterConfigUpdateParamsWithHTTPClient(client *http.Client) *V1CloudConfigsCoxEdgeUIDClusterConfigUpdateParams { + var () + return &V1CloudConfigsCoxEdgeUIDClusterConfigUpdateParams{ + HTTPClient: client, + } +} + +/* +V1CloudConfigsCoxEdgeUIDClusterConfigUpdateParams contains all the parameters to send to the API endpoint +for the v1 cloud configs cox edge Uid cluster config update operation typically these are written to a http.Request +*/ +type V1CloudConfigsCoxEdgeUIDClusterConfigUpdateParams struct { + + /*Body*/ + Body *models.V1CoxEdgeCloudClusterConfigEntity + /*ConfigUID + Cluster's cloud config uid + + */ + ConfigUID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud configs cox edge Uid cluster config update params +func (o *V1CloudConfigsCoxEdgeUIDClusterConfigUpdateParams) WithTimeout(timeout time.Duration) *V1CloudConfigsCoxEdgeUIDClusterConfigUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud configs cox edge Uid cluster config update params +func (o *V1CloudConfigsCoxEdgeUIDClusterConfigUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud configs cox edge Uid cluster config update params +func (o *V1CloudConfigsCoxEdgeUIDClusterConfigUpdateParams) WithContext(ctx context.Context) *V1CloudConfigsCoxEdgeUIDClusterConfigUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud configs cox edge Uid cluster config update params +func (o *V1CloudConfigsCoxEdgeUIDClusterConfigUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud configs cox edge Uid cluster config update params +func (o *V1CloudConfigsCoxEdgeUIDClusterConfigUpdateParams) WithHTTPClient(client *http.Client) *V1CloudConfigsCoxEdgeUIDClusterConfigUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud configs cox edge Uid cluster config update params +func (o *V1CloudConfigsCoxEdgeUIDClusterConfigUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 cloud configs cox edge Uid cluster config update params +func (o *V1CloudConfigsCoxEdgeUIDClusterConfigUpdateParams) WithBody(body *models.V1CoxEdgeCloudClusterConfigEntity) *V1CloudConfigsCoxEdgeUIDClusterConfigUpdateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 cloud configs cox edge Uid cluster config update params +func (o *V1CloudConfigsCoxEdgeUIDClusterConfigUpdateParams) SetBody(body *models.V1CoxEdgeCloudClusterConfigEntity) { + o.Body = body +} + +// WithConfigUID adds the configUID to the v1 cloud configs cox edge Uid cluster config update params +func (o *V1CloudConfigsCoxEdgeUIDClusterConfigUpdateParams) WithConfigUID(configUID string) *V1CloudConfigsCoxEdgeUIDClusterConfigUpdateParams { + o.SetConfigUID(configUID) + return o +} + +// SetConfigUID adds the configUid to the v1 cloud configs cox edge Uid cluster config update params +func (o *V1CloudConfigsCoxEdgeUIDClusterConfigUpdateParams) SetConfigUID(configUID string) { + o.ConfigUID = configUID +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudConfigsCoxEdgeUIDClusterConfigUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param configUid + if err := r.SetPathParam("configUid", o.ConfigUID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_configs_cox_edge_uid_cluster_config_update_responses.go b/api/client/v1/v1_cloud_configs_cox_edge_uid_cluster_config_update_responses.go new file mode 100644 index 00000000..4883c9a4 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_cox_edge_uid_cluster_config_update_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1CloudConfigsCoxEdgeUIDClusterConfigUpdateReader is a Reader for the V1CloudConfigsCoxEdgeUIDClusterConfigUpdate structure. +type V1CloudConfigsCoxEdgeUIDClusterConfigUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudConfigsCoxEdgeUIDClusterConfigUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1CloudConfigsCoxEdgeUIDClusterConfigUpdateNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudConfigsCoxEdgeUIDClusterConfigUpdateNoContent creates a V1CloudConfigsCoxEdgeUIDClusterConfigUpdateNoContent with default headers values +func NewV1CloudConfigsCoxEdgeUIDClusterConfigUpdateNoContent() *V1CloudConfigsCoxEdgeUIDClusterConfigUpdateNoContent { + return &V1CloudConfigsCoxEdgeUIDClusterConfigUpdateNoContent{} +} + +/* +V1CloudConfigsCoxEdgeUIDClusterConfigUpdateNoContent handles this case with default header values. + +The resource was updated successfully +*/ +type V1CloudConfigsCoxEdgeUIDClusterConfigUpdateNoContent struct { +} + +func (o *V1CloudConfigsCoxEdgeUIDClusterConfigUpdateNoContent) Error() string { + return fmt.Sprintf("[PUT /v1/cloudconfigs/coxedge/{configUid}/clusterConfig][%d] v1CloudConfigsCoxEdgeUidClusterConfigUpdateNoContent ", 204) +} + +func (o *V1CloudConfigsCoxEdgeUIDClusterConfigUpdateNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_cloud_configs_custom_get_parameters.go b/api/client/v1/v1_cloud_configs_custom_get_parameters.go new file mode 100644 index 00000000..ec997cf5 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_custom_get_parameters.go @@ -0,0 +1,157 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1CloudConfigsCustomGetParams creates a new V1CloudConfigsCustomGetParams object +// with the default values initialized. +func NewV1CloudConfigsCustomGetParams() *V1CloudConfigsCustomGetParams { + var () + return &V1CloudConfigsCustomGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudConfigsCustomGetParamsWithTimeout creates a new V1CloudConfigsCustomGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudConfigsCustomGetParamsWithTimeout(timeout time.Duration) *V1CloudConfigsCustomGetParams { + var () + return &V1CloudConfigsCustomGetParams{ + + timeout: timeout, + } +} + +// NewV1CloudConfigsCustomGetParamsWithContext creates a new V1CloudConfigsCustomGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudConfigsCustomGetParamsWithContext(ctx context.Context) *V1CloudConfigsCustomGetParams { + var () + return &V1CloudConfigsCustomGetParams{ + + Context: ctx, + } +} + +// NewV1CloudConfigsCustomGetParamsWithHTTPClient creates a new V1CloudConfigsCustomGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudConfigsCustomGetParamsWithHTTPClient(client *http.Client) *V1CloudConfigsCustomGetParams { + var () + return &V1CloudConfigsCustomGetParams{ + HTTPClient: client, + } +} + +/* +V1CloudConfigsCustomGetParams contains all the parameters to send to the API endpoint +for the v1 cloud configs custom get operation typically these are written to a http.Request +*/ +type V1CloudConfigsCustomGetParams struct { + + /*CloudType + Cluster's cloud type + + */ + CloudType string + /*ConfigUID + Cluster's cloud config uid + + */ + ConfigUID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud configs custom get params +func (o *V1CloudConfigsCustomGetParams) WithTimeout(timeout time.Duration) *V1CloudConfigsCustomGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud configs custom get params +func (o *V1CloudConfigsCustomGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud configs custom get params +func (o *V1CloudConfigsCustomGetParams) WithContext(ctx context.Context) *V1CloudConfigsCustomGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud configs custom get params +func (o *V1CloudConfigsCustomGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud configs custom get params +func (o *V1CloudConfigsCustomGetParams) WithHTTPClient(client *http.Client) *V1CloudConfigsCustomGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud configs custom get params +func (o *V1CloudConfigsCustomGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithCloudType adds the cloudType to the v1 cloud configs custom get params +func (o *V1CloudConfigsCustomGetParams) WithCloudType(cloudType string) *V1CloudConfigsCustomGetParams { + o.SetCloudType(cloudType) + return o +} + +// SetCloudType adds the cloudType to the v1 cloud configs custom get params +func (o *V1CloudConfigsCustomGetParams) SetCloudType(cloudType string) { + o.CloudType = cloudType +} + +// WithConfigUID adds the configUID to the v1 cloud configs custom get params +func (o *V1CloudConfigsCustomGetParams) WithConfigUID(configUID string) *V1CloudConfigsCustomGetParams { + o.SetConfigUID(configUID) + return o +} + +// SetConfigUID adds the configUid to the v1 cloud configs custom get params +func (o *V1CloudConfigsCustomGetParams) SetConfigUID(configUID string) { + o.ConfigUID = configUID +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudConfigsCustomGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param cloudType + if err := r.SetPathParam("cloudType", o.CloudType); err != nil { + return err + } + + // path param configUid + if err := r.SetPathParam("configUid", o.ConfigUID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_configs_custom_get_responses.go b/api/client/v1/v1_cloud_configs_custom_get_responses.go new file mode 100644 index 00000000..fcdb742b --- /dev/null +++ b/api/client/v1/v1_cloud_configs_custom_get_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1CloudConfigsCustomGetReader is a Reader for the V1CloudConfigsCustomGet structure. +type V1CloudConfigsCustomGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudConfigsCustomGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1CloudConfigsCustomGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudConfigsCustomGetOK creates a V1CloudConfigsCustomGetOK with default headers values +func NewV1CloudConfigsCustomGetOK() *V1CloudConfigsCustomGetOK { + return &V1CloudConfigsCustomGetOK{} +} + +/* +V1CloudConfigsCustomGetOK handles this case with default header values. + +OK +*/ +type V1CloudConfigsCustomGetOK struct { + Payload *models.V1CustomCloudConfig +} + +func (o *V1CloudConfigsCustomGetOK) Error() string { + return fmt.Sprintf("[GET /v1/cloudconfigs/cloudTypes/{cloudType}/{configUid}][%d] v1CloudConfigsCustomGetOK %+v", 200, o.Payload) +} + +func (o *V1CloudConfigsCustomGetOK) GetPayload() *models.V1CustomCloudConfig { + return o.Payload +} + +func (o *V1CloudConfigsCustomGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1CustomCloudConfig) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_cloud_configs_custom_machine_pool_create_parameters.go b/api/client/v1/v1_cloud_configs_custom_machine_pool_create_parameters.go new file mode 100644 index 00000000..9fd1bf4e --- /dev/null +++ b/api/client/v1/v1_cloud_configs_custom_machine_pool_create_parameters.go @@ -0,0 +1,178 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1CloudConfigsCustomMachinePoolCreateParams creates a new V1CloudConfigsCustomMachinePoolCreateParams object +// with the default values initialized. +func NewV1CloudConfigsCustomMachinePoolCreateParams() *V1CloudConfigsCustomMachinePoolCreateParams { + var () + return &V1CloudConfigsCustomMachinePoolCreateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudConfigsCustomMachinePoolCreateParamsWithTimeout creates a new V1CloudConfigsCustomMachinePoolCreateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudConfigsCustomMachinePoolCreateParamsWithTimeout(timeout time.Duration) *V1CloudConfigsCustomMachinePoolCreateParams { + var () + return &V1CloudConfigsCustomMachinePoolCreateParams{ + + timeout: timeout, + } +} + +// NewV1CloudConfigsCustomMachinePoolCreateParamsWithContext creates a new V1CloudConfigsCustomMachinePoolCreateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudConfigsCustomMachinePoolCreateParamsWithContext(ctx context.Context) *V1CloudConfigsCustomMachinePoolCreateParams { + var () + return &V1CloudConfigsCustomMachinePoolCreateParams{ + + Context: ctx, + } +} + +// NewV1CloudConfigsCustomMachinePoolCreateParamsWithHTTPClient creates a new V1CloudConfigsCustomMachinePoolCreateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudConfigsCustomMachinePoolCreateParamsWithHTTPClient(client *http.Client) *V1CloudConfigsCustomMachinePoolCreateParams { + var () + return &V1CloudConfigsCustomMachinePoolCreateParams{ + HTTPClient: client, + } +} + +/* +V1CloudConfigsCustomMachinePoolCreateParams contains all the parameters to send to the API endpoint +for the v1 cloud configs custom machine pool create operation typically these are written to a http.Request +*/ +type V1CloudConfigsCustomMachinePoolCreateParams struct { + + /*Body*/ + Body *models.V1CustomMachinePoolConfigEntity + /*CloudType + Cluster's cloud type + + */ + CloudType string + /*ConfigUID + Cluster's cloud config uid + + */ + ConfigUID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud configs custom machine pool create params +func (o *V1CloudConfigsCustomMachinePoolCreateParams) WithTimeout(timeout time.Duration) *V1CloudConfigsCustomMachinePoolCreateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud configs custom machine pool create params +func (o *V1CloudConfigsCustomMachinePoolCreateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud configs custom machine pool create params +func (o *V1CloudConfigsCustomMachinePoolCreateParams) WithContext(ctx context.Context) *V1CloudConfigsCustomMachinePoolCreateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud configs custom machine pool create params +func (o *V1CloudConfigsCustomMachinePoolCreateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud configs custom machine pool create params +func (o *V1CloudConfigsCustomMachinePoolCreateParams) WithHTTPClient(client *http.Client) *V1CloudConfigsCustomMachinePoolCreateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud configs custom machine pool create params +func (o *V1CloudConfigsCustomMachinePoolCreateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 cloud configs custom machine pool create params +func (o *V1CloudConfigsCustomMachinePoolCreateParams) WithBody(body *models.V1CustomMachinePoolConfigEntity) *V1CloudConfigsCustomMachinePoolCreateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 cloud configs custom machine pool create params +func (o *V1CloudConfigsCustomMachinePoolCreateParams) SetBody(body *models.V1CustomMachinePoolConfigEntity) { + o.Body = body +} + +// WithCloudType adds the cloudType to the v1 cloud configs custom machine pool create params +func (o *V1CloudConfigsCustomMachinePoolCreateParams) WithCloudType(cloudType string) *V1CloudConfigsCustomMachinePoolCreateParams { + o.SetCloudType(cloudType) + return o +} + +// SetCloudType adds the cloudType to the v1 cloud configs custom machine pool create params +func (o *V1CloudConfigsCustomMachinePoolCreateParams) SetCloudType(cloudType string) { + o.CloudType = cloudType +} + +// WithConfigUID adds the configUID to the v1 cloud configs custom machine pool create params +func (o *V1CloudConfigsCustomMachinePoolCreateParams) WithConfigUID(configUID string) *V1CloudConfigsCustomMachinePoolCreateParams { + o.SetConfigUID(configUID) + return o +} + +// SetConfigUID adds the configUid to the v1 cloud configs custom machine pool create params +func (o *V1CloudConfigsCustomMachinePoolCreateParams) SetConfigUID(configUID string) { + o.ConfigUID = configUID +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudConfigsCustomMachinePoolCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param cloudType + if err := r.SetPathParam("cloudType", o.CloudType); err != nil { + return err + } + + // path param configUid + if err := r.SetPathParam("configUid", o.ConfigUID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_configs_custom_machine_pool_create_responses.go b/api/client/v1/v1_cloud_configs_custom_machine_pool_create_responses.go new file mode 100644 index 00000000..f4342aca --- /dev/null +++ b/api/client/v1/v1_cloud_configs_custom_machine_pool_create_responses.go @@ -0,0 +1,77 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1CloudConfigsCustomMachinePoolCreateReader is a Reader for the V1CloudConfigsCustomMachinePoolCreate structure. +type V1CloudConfigsCustomMachinePoolCreateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudConfigsCustomMachinePoolCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 201: + result := NewV1CloudConfigsCustomMachinePoolCreateCreated() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudConfigsCustomMachinePoolCreateCreated creates a V1CloudConfigsCustomMachinePoolCreateCreated with default headers values +func NewV1CloudConfigsCustomMachinePoolCreateCreated() *V1CloudConfigsCustomMachinePoolCreateCreated { + return &V1CloudConfigsCustomMachinePoolCreateCreated{} +} + +/* +V1CloudConfigsCustomMachinePoolCreateCreated handles this case with default header values. + +Created successfully +*/ +type V1CloudConfigsCustomMachinePoolCreateCreated struct { + /*Audit uid for the request + */ + AuditUID string + + Payload *models.V1UID +} + +func (o *V1CloudConfigsCustomMachinePoolCreateCreated) Error() string { + return fmt.Sprintf("[POST /v1/cloudconfigs/cloudTypes/{cloudType}/{configUid}/machinePools][%d] v1CloudConfigsCustomMachinePoolCreateCreated %+v", 201, o.Payload) +} + +func (o *V1CloudConfigsCustomMachinePoolCreateCreated) GetPayload() *models.V1UID { + return o.Payload +} + +func (o *V1CloudConfigsCustomMachinePoolCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header AuditUid + o.AuditUID = response.GetHeader("AuditUid") + + o.Payload = new(models.V1UID) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_cloud_configs_custom_machine_pool_delete_parameters.go b/api/client/v1/v1_cloud_configs_custom_machine_pool_delete_parameters.go new file mode 100644 index 00000000..104fe599 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_custom_machine_pool_delete_parameters.go @@ -0,0 +1,178 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1CloudConfigsCustomMachinePoolDeleteParams creates a new V1CloudConfigsCustomMachinePoolDeleteParams object +// with the default values initialized. +func NewV1CloudConfigsCustomMachinePoolDeleteParams() *V1CloudConfigsCustomMachinePoolDeleteParams { + var () + return &V1CloudConfigsCustomMachinePoolDeleteParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudConfigsCustomMachinePoolDeleteParamsWithTimeout creates a new V1CloudConfigsCustomMachinePoolDeleteParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudConfigsCustomMachinePoolDeleteParamsWithTimeout(timeout time.Duration) *V1CloudConfigsCustomMachinePoolDeleteParams { + var () + return &V1CloudConfigsCustomMachinePoolDeleteParams{ + + timeout: timeout, + } +} + +// NewV1CloudConfigsCustomMachinePoolDeleteParamsWithContext creates a new V1CloudConfigsCustomMachinePoolDeleteParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudConfigsCustomMachinePoolDeleteParamsWithContext(ctx context.Context) *V1CloudConfigsCustomMachinePoolDeleteParams { + var () + return &V1CloudConfigsCustomMachinePoolDeleteParams{ + + Context: ctx, + } +} + +// NewV1CloudConfigsCustomMachinePoolDeleteParamsWithHTTPClient creates a new V1CloudConfigsCustomMachinePoolDeleteParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudConfigsCustomMachinePoolDeleteParamsWithHTTPClient(client *http.Client) *V1CloudConfigsCustomMachinePoolDeleteParams { + var () + return &V1CloudConfigsCustomMachinePoolDeleteParams{ + HTTPClient: client, + } +} + +/* +V1CloudConfigsCustomMachinePoolDeleteParams contains all the parameters to send to the API endpoint +for the v1 cloud configs custom machine pool delete operation typically these are written to a http.Request +*/ +type V1CloudConfigsCustomMachinePoolDeleteParams struct { + + /*CloudType + Cluster's cloud type + + */ + CloudType string + /*ConfigUID + Cluster's cloud config uid + + */ + ConfigUID string + /*MachinePoolName + Machine pool name + + */ + MachinePoolName string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud configs custom machine pool delete params +func (o *V1CloudConfigsCustomMachinePoolDeleteParams) WithTimeout(timeout time.Duration) *V1CloudConfigsCustomMachinePoolDeleteParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud configs custom machine pool delete params +func (o *V1CloudConfigsCustomMachinePoolDeleteParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud configs custom machine pool delete params +func (o *V1CloudConfigsCustomMachinePoolDeleteParams) WithContext(ctx context.Context) *V1CloudConfigsCustomMachinePoolDeleteParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud configs custom machine pool delete params +func (o *V1CloudConfigsCustomMachinePoolDeleteParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud configs custom machine pool delete params +func (o *V1CloudConfigsCustomMachinePoolDeleteParams) WithHTTPClient(client *http.Client) *V1CloudConfigsCustomMachinePoolDeleteParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud configs custom machine pool delete params +func (o *V1CloudConfigsCustomMachinePoolDeleteParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithCloudType adds the cloudType to the v1 cloud configs custom machine pool delete params +func (o *V1CloudConfigsCustomMachinePoolDeleteParams) WithCloudType(cloudType string) *V1CloudConfigsCustomMachinePoolDeleteParams { + o.SetCloudType(cloudType) + return o +} + +// SetCloudType adds the cloudType to the v1 cloud configs custom machine pool delete params +func (o *V1CloudConfigsCustomMachinePoolDeleteParams) SetCloudType(cloudType string) { + o.CloudType = cloudType +} + +// WithConfigUID adds the configUID to the v1 cloud configs custom machine pool delete params +func (o *V1CloudConfigsCustomMachinePoolDeleteParams) WithConfigUID(configUID string) *V1CloudConfigsCustomMachinePoolDeleteParams { + o.SetConfigUID(configUID) + return o +} + +// SetConfigUID adds the configUid to the v1 cloud configs custom machine pool delete params +func (o *V1CloudConfigsCustomMachinePoolDeleteParams) SetConfigUID(configUID string) { + o.ConfigUID = configUID +} + +// WithMachinePoolName adds the machinePoolName to the v1 cloud configs custom machine pool delete params +func (o *V1CloudConfigsCustomMachinePoolDeleteParams) WithMachinePoolName(machinePoolName string) *V1CloudConfigsCustomMachinePoolDeleteParams { + o.SetMachinePoolName(machinePoolName) + return o +} + +// SetMachinePoolName adds the machinePoolName to the v1 cloud configs custom machine pool delete params +func (o *V1CloudConfigsCustomMachinePoolDeleteParams) SetMachinePoolName(machinePoolName string) { + o.MachinePoolName = machinePoolName +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudConfigsCustomMachinePoolDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param cloudType + if err := r.SetPathParam("cloudType", o.CloudType); err != nil { + return err + } + + // path param configUid + if err := r.SetPathParam("configUid", o.ConfigUID); err != nil { + return err + } + + // path param machinePoolName + if err := r.SetPathParam("machinePoolName", o.MachinePoolName); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_configs_custom_machine_pool_delete_responses.go b/api/client/v1/v1_cloud_configs_custom_machine_pool_delete_responses.go new file mode 100644 index 00000000..32384451 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_custom_machine_pool_delete_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1CloudConfigsCustomMachinePoolDeleteReader is a Reader for the V1CloudConfigsCustomMachinePoolDelete structure. +type V1CloudConfigsCustomMachinePoolDeleteReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudConfigsCustomMachinePoolDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1CloudConfigsCustomMachinePoolDeleteNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudConfigsCustomMachinePoolDeleteNoContent creates a V1CloudConfigsCustomMachinePoolDeleteNoContent with default headers values +func NewV1CloudConfigsCustomMachinePoolDeleteNoContent() *V1CloudConfigsCustomMachinePoolDeleteNoContent { + return &V1CloudConfigsCustomMachinePoolDeleteNoContent{} +} + +/* +V1CloudConfigsCustomMachinePoolDeleteNoContent handles this case with default header values. + +The resource was deleted successfully +*/ +type V1CloudConfigsCustomMachinePoolDeleteNoContent struct { +} + +func (o *V1CloudConfigsCustomMachinePoolDeleteNoContent) Error() string { + return fmt.Sprintf("[DELETE /v1/cloudconfigs/cloudTypes/{cloudType}/{configUid}/machinePools/{machinePoolName}][%d] v1CloudConfigsCustomMachinePoolDeleteNoContent ", 204) +} + +func (o *V1CloudConfigsCustomMachinePoolDeleteNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_cloud_configs_custom_machine_pool_update_parameters.go b/api/client/v1/v1_cloud_configs_custom_machine_pool_update_parameters.go new file mode 100644 index 00000000..eae56db0 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_custom_machine_pool_update_parameters.go @@ -0,0 +1,199 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1CloudConfigsCustomMachinePoolUpdateParams creates a new V1CloudConfigsCustomMachinePoolUpdateParams object +// with the default values initialized. +func NewV1CloudConfigsCustomMachinePoolUpdateParams() *V1CloudConfigsCustomMachinePoolUpdateParams { + var () + return &V1CloudConfigsCustomMachinePoolUpdateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudConfigsCustomMachinePoolUpdateParamsWithTimeout creates a new V1CloudConfigsCustomMachinePoolUpdateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudConfigsCustomMachinePoolUpdateParamsWithTimeout(timeout time.Duration) *V1CloudConfigsCustomMachinePoolUpdateParams { + var () + return &V1CloudConfigsCustomMachinePoolUpdateParams{ + + timeout: timeout, + } +} + +// NewV1CloudConfigsCustomMachinePoolUpdateParamsWithContext creates a new V1CloudConfigsCustomMachinePoolUpdateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudConfigsCustomMachinePoolUpdateParamsWithContext(ctx context.Context) *V1CloudConfigsCustomMachinePoolUpdateParams { + var () + return &V1CloudConfigsCustomMachinePoolUpdateParams{ + + Context: ctx, + } +} + +// NewV1CloudConfigsCustomMachinePoolUpdateParamsWithHTTPClient creates a new V1CloudConfigsCustomMachinePoolUpdateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudConfigsCustomMachinePoolUpdateParamsWithHTTPClient(client *http.Client) *V1CloudConfigsCustomMachinePoolUpdateParams { + var () + return &V1CloudConfigsCustomMachinePoolUpdateParams{ + HTTPClient: client, + } +} + +/* +V1CloudConfigsCustomMachinePoolUpdateParams contains all the parameters to send to the API endpoint +for the v1 cloud configs custom machine pool update operation typically these are written to a http.Request +*/ +type V1CloudConfigsCustomMachinePoolUpdateParams struct { + + /*Body*/ + Body *models.V1CustomMachinePoolConfigEntity + /*CloudType + Cluster's cloud type + + */ + CloudType string + /*ConfigUID + Cluster's cloud config uid + + */ + ConfigUID string + /*MachinePoolName + Machine pool name + + */ + MachinePoolName string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud configs custom machine pool update params +func (o *V1CloudConfigsCustomMachinePoolUpdateParams) WithTimeout(timeout time.Duration) *V1CloudConfigsCustomMachinePoolUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud configs custom machine pool update params +func (o *V1CloudConfigsCustomMachinePoolUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud configs custom machine pool update params +func (o *V1CloudConfigsCustomMachinePoolUpdateParams) WithContext(ctx context.Context) *V1CloudConfigsCustomMachinePoolUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud configs custom machine pool update params +func (o *V1CloudConfigsCustomMachinePoolUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud configs custom machine pool update params +func (o *V1CloudConfigsCustomMachinePoolUpdateParams) WithHTTPClient(client *http.Client) *V1CloudConfigsCustomMachinePoolUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud configs custom machine pool update params +func (o *V1CloudConfigsCustomMachinePoolUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 cloud configs custom machine pool update params +func (o *V1CloudConfigsCustomMachinePoolUpdateParams) WithBody(body *models.V1CustomMachinePoolConfigEntity) *V1CloudConfigsCustomMachinePoolUpdateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 cloud configs custom machine pool update params +func (o *V1CloudConfigsCustomMachinePoolUpdateParams) SetBody(body *models.V1CustomMachinePoolConfigEntity) { + o.Body = body +} + +// WithCloudType adds the cloudType to the v1 cloud configs custom machine pool update params +func (o *V1CloudConfigsCustomMachinePoolUpdateParams) WithCloudType(cloudType string) *V1CloudConfigsCustomMachinePoolUpdateParams { + o.SetCloudType(cloudType) + return o +} + +// SetCloudType adds the cloudType to the v1 cloud configs custom machine pool update params +func (o *V1CloudConfigsCustomMachinePoolUpdateParams) SetCloudType(cloudType string) { + o.CloudType = cloudType +} + +// WithConfigUID adds the configUID to the v1 cloud configs custom machine pool update params +func (o *V1CloudConfigsCustomMachinePoolUpdateParams) WithConfigUID(configUID string) *V1CloudConfigsCustomMachinePoolUpdateParams { + o.SetConfigUID(configUID) + return o +} + +// SetConfigUID adds the configUid to the v1 cloud configs custom machine pool update params +func (o *V1CloudConfigsCustomMachinePoolUpdateParams) SetConfigUID(configUID string) { + o.ConfigUID = configUID +} + +// WithMachinePoolName adds the machinePoolName to the v1 cloud configs custom machine pool update params +func (o *V1CloudConfigsCustomMachinePoolUpdateParams) WithMachinePoolName(machinePoolName string) *V1CloudConfigsCustomMachinePoolUpdateParams { + o.SetMachinePoolName(machinePoolName) + return o +} + +// SetMachinePoolName adds the machinePoolName to the v1 cloud configs custom machine pool update params +func (o *V1CloudConfigsCustomMachinePoolUpdateParams) SetMachinePoolName(machinePoolName string) { + o.MachinePoolName = machinePoolName +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudConfigsCustomMachinePoolUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param cloudType + if err := r.SetPathParam("cloudType", o.CloudType); err != nil { + return err + } + + // path param configUid + if err := r.SetPathParam("configUid", o.ConfigUID); err != nil { + return err + } + + // path param machinePoolName + if err := r.SetPathParam("machinePoolName", o.MachinePoolName); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_configs_custom_machine_pool_update_responses.go b/api/client/v1/v1_cloud_configs_custom_machine_pool_update_responses.go new file mode 100644 index 00000000..f7b9c635 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_custom_machine_pool_update_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1CloudConfigsCustomMachinePoolUpdateReader is a Reader for the V1CloudConfigsCustomMachinePoolUpdate structure. +type V1CloudConfigsCustomMachinePoolUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudConfigsCustomMachinePoolUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1CloudConfigsCustomMachinePoolUpdateNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudConfigsCustomMachinePoolUpdateNoContent creates a V1CloudConfigsCustomMachinePoolUpdateNoContent with default headers values +func NewV1CloudConfigsCustomMachinePoolUpdateNoContent() *V1CloudConfigsCustomMachinePoolUpdateNoContent { + return &V1CloudConfigsCustomMachinePoolUpdateNoContent{} +} + +/* +V1CloudConfigsCustomMachinePoolUpdateNoContent handles this case with default header values. + +The resource was updated successfully +*/ +type V1CloudConfigsCustomMachinePoolUpdateNoContent struct { +} + +func (o *V1CloudConfigsCustomMachinePoolUpdateNoContent) Error() string { + return fmt.Sprintf("[PUT /v1/cloudconfigs/cloudTypes/{cloudType}/{configUid}/machinePools/{machinePoolName}][%d] v1CloudConfigsCustomMachinePoolUpdateNoContent ", 204) +} + +func (o *V1CloudConfigsCustomMachinePoolUpdateNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_cloud_configs_custom_pool_machines_add_parameters.go b/api/client/v1/v1_cloud_configs_custom_pool_machines_add_parameters.go new file mode 100644 index 00000000..463f1bd6 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_custom_pool_machines_add_parameters.go @@ -0,0 +1,199 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1CloudConfigsCustomPoolMachinesAddParams creates a new V1CloudConfigsCustomPoolMachinesAddParams object +// with the default values initialized. +func NewV1CloudConfigsCustomPoolMachinesAddParams() *V1CloudConfigsCustomPoolMachinesAddParams { + var () + return &V1CloudConfigsCustomPoolMachinesAddParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudConfigsCustomPoolMachinesAddParamsWithTimeout creates a new V1CloudConfigsCustomPoolMachinesAddParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudConfigsCustomPoolMachinesAddParamsWithTimeout(timeout time.Duration) *V1CloudConfigsCustomPoolMachinesAddParams { + var () + return &V1CloudConfigsCustomPoolMachinesAddParams{ + + timeout: timeout, + } +} + +// NewV1CloudConfigsCustomPoolMachinesAddParamsWithContext creates a new V1CloudConfigsCustomPoolMachinesAddParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudConfigsCustomPoolMachinesAddParamsWithContext(ctx context.Context) *V1CloudConfigsCustomPoolMachinesAddParams { + var () + return &V1CloudConfigsCustomPoolMachinesAddParams{ + + Context: ctx, + } +} + +// NewV1CloudConfigsCustomPoolMachinesAddParamsWithHTTPClient creates a new V1CloudConfigsCustomPoolMachinesAddParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudConfigsCustomPoolMachinesAddParamsWithHTTPClient(client *http.Client) *V1CloudConfigsCustomPoolMachinesAddParams { + var () + return &V1CloudConfigsCustomPoolMachinesAddParams{ + HTTPClient: client, + } +} + +/* +V1CloudConfigsCustomPoolMachinesAddParams contains all the parameters to send to the API endpoint +for the v1 cloud configs custom pool machines add operation typically these are written to a http.Request +*/ +type V1CloudConfigsCustomPoolMachinesAddParams struct { + + /*Body*/ + Body *models.V1CustomMachine + /*CloudType + Cluster's cloud type + + */ + CloudType string + /*ConfigUID + Cluster's cloud config uid + + */ + ConfigUID string + /*MachinePoolName + Machine pool name + + */ + MachinePoolName string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud configs custom pool machines add params +func (o *V1CloudConfigsCustomPoolMachinesAddParams) WithTimeout(timeout time.Duration) *V1CloudConfigsCustomPoolMachinesAddParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud configs custom pool machines add params +func (o *V1CloudConfigsCustomPoolMachinesAddParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud configs custom pool machines add params +func (o *V1CloudConfigsCustomPoolMachinesAddParams) WithContext(ctx context.Context) *V1CloudConfigsCustomPoolMachinesAddParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud configs custom pool machines add params +func (o *V1CloudConfigsCustomPoolMachinesAddParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud configs custom pool machines add params +func (o *V1CloudConfigsCustomPoolMachinesAddParams) WithHTTPClient(client *http.Client) *V1CloudConfigsCustomPoolMachinesAddParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud configs custom pool machines add params +func (o *V1CloudConfigsCustomPoolMachinesAddParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 cloud configs custom pool machines add params +func (o *V1CloudConfigsCustomPoolMachinesAddParams) WithBody(body *models.V1CustomMachine) *V1CloudConfigsCustomPoolMachinesAddParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 cloud configs custom pool machines add params +func (o *V1CloudConfigsCustomPoolMachinesAddParams) SetBody(body *models.V1CustomMachine) { + o.Body = body +} + +// WithCloudType adds the cloudType to the v1 cloud configs custom pool machines add params +func (o *V1CloudConfigsCustomPoolMachinesAddParams) WithCloudType(cloudType string) *V1CloudConfigsCustomPoolMachinesAddParams { + o.SetCloudType(cloudType) + return o +} + +// SetCloudType adds the cloudType to the v1 cloud configs custom pool machines add params +func (o *V1CloudConfigsCustomPoolMachinesAddParams) SetCloudType(cloudType string) { + o.CloudType = cloudType +} + +// WithConfigUID adds the configUID to the v1 cloud configs custom pool machines add params +func (o *V1CloudConfigsCustomPoolMachinesAddParams) WithConfigUID(configUID string) *V1CloudConfigsCustomPoolMachinesAddParams { + o.SetConfigUID(configUID) + return o +} + +// SetConfigUID adds the configUid to the v1 cloud configs custom pool machines add params +func (o *V1CloudConfigsCustomPoolMachinesAddParams) SetConfigUID(configUID string) { + o.ConfigUID = configUID +} + +// WithMachinePoolName adds the machinePoolName to the v1 cloud configs custom pool machines add params +func (o *V1CloudConfigsCustomPoolMachinesAddParams) WithMachinePoolName(machinePoolName string) *V1CloudConfigsCustomPoolMachinesAddParams { + o.SetMachinePoolName(machinePoolName) + return o +} + +// SetMachinePoolName adds the machinePoolName to the v1 cloud configs custom pool machines add params +func (o *V1CloudConfigsCustomPoolMachinesAddParams) SetMachinePoolName(machinePoolName string) { + o.MachinePoolName = machinePoolName +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudConfigsCustomPoolMachinesAddParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param cloudType + if err := r.SetPathParam("cloudType", o.CloudType); err != nil { + return err + } + + // path param configUid + if err := r.SetPathParam("configUid", o.ConfigUID); err != nil { + return err + } + + // path param machinePoolName + if err := r.SetPathParam("machinePoolName", o.MachinePoolName); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_configs_custom_pool_machines_add_responses.go b/api/client/v1/v1_cloud_configs_custom_pool_machines_add_responses.go new file mode 100644 index 00000000..ad5a4e7c --- /dev/null +++ b/api/client/v1/v1_cloud_configs_custom_pool_machines_add_responses.go @@ -0,0 +1,77 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1CloudConfigsCustomPoolMachinesAddReader is a Reader for the V1CloudConfigsCustomPoolMachinesAdd structure. +type V1CloudConfigsCustomPoolMachinesAddReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudConfigsCustomPoolMachinesAddReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 201: + result := NewV1CloudConfigsCustomPoolMachinesAddCreated() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudConfigsCustomPoolMachinesAddCreated creates a V1CloudConfigsCustomPoolMachinesAddCreated with default headers values +func NewV1CloudConfigsCustomPoolMachinesAddCreated() *V1CloudConfigsCustomPoolMachinesAddCreated { + return &V1CloudConfigsCustomPoolMachinesAddCreated{} +} + +/* +V1CloudConfigsCustomPoolMachinesAddCreated handles this case with default header values. + +Created successfully +*/ +type V1CloudConfigsCustomPoolMachinesAddCreated struct { + /*Audit uid for the request + */ + AuditUID string + + Payload *models.V1UID +} + +func (o *V1CloudConfigsCustomPoolMachinesAddCreated) Error() string { + return fmt.Sprintf("[POST /v1/cloudconfigs/cloudTypes/{cloudType}/{configUid}/machinePools/{machinePoolName}/machines][%d] v1CloudConfigsCustomPoolMachinesAddCreated %+v", 201, o.Payload) +} + +func (o *V1CloudConfigsCustomPoolMachinesAddCreated) GetPayload() *models.V1UID { + return o.Payload +} + +func (o *V1CloudConfigsCustomPoolMachinesAddCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header AuditUid + o.AuditUID = response.GetHeader("AuditUid") + + o.Payload = new(models.V1UID) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_cloud_configs_custom_pool_machines_list_parameters.go b/api/client/v1/v1_cloud_configs_custom_pool_machines_list_parameters.go new file mode 100644 index 00000000..d23354bf --- /dev/null +++ b/api/client/v1/v1_cloud_configs_custom_pool_machines_list_parameters.go @@ -0,0 +1,386 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// NewV1CloudConfigsCustomPoolMachinesListParams creates a new V1CloudConfigsCustomPoolMachinesListParams object +// with the default values initialized. +func NewV1CloudConfigsCustomPoolMachinesListParams() *V1CloudConfigsCustomPoolMachinesListParams { + var ( + limitDefault = int64(50) + ) + return &V1CloudConfigsCustomPoolMachinesListParams{ + Limit: &limitDefault, + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudConfigsCustomPoolMachinesListParamsWithTimeout creates a new V1CloudConfigsCustomPoolMachinesListParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudConfigsCustomPoolMachinesListParamsWithTimeout(timeout time.Duration) *V1CloudConfigsCustomPoolMachinesListParams { + var ( + limitDefault = int64(50) + ) + return &V1CloudConfigsCustomPoolMachinesListParams{ + Limit: &limitDefault, + + timeout: timeout, + } +} + +// NewV1CloudConfigsCustomPoolMachinesListParamsWithContext creates a new V1CloudConfigsCustomPoolMachinesListParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudConfigsCustomPoolMachinesListParamsWithContext(ctx context.Context) *V1CloudConfigsCustomPoolMachinesListParams { + var ( + limitDefault = int64(50) + ) + return &V1CloudConfigsCustomPoolMachinesListParams{ + Limit: &limitDefault, + + Context: ctx, + } +} + +// NewV1CloudConfigsCustomPoolMachinesListParamsWithHTTPClient creates a new V1CloudConfigsCustomPoolMachinesListParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudConfigsCustomPoolMachinesListParamsWithHTTPClient(client *http.Client) *V1CloudConfigsCustomPoolMachinesListParams { + var ( + limitDefault = int64(50) + ) + return &V1CloudConfigsCustomPoolMachinesListParams{ + Limit: &limitDefault, + HTTPClient: client, + } +} + +/* +V1CloudConfigsCustomPoolMachinesListParams contains all the parameters to send to the API endpoint +for the v1 cloud configs custom pool machines list operation typically these are written to a http.Request +*/ +type V1CloudConfigsCustomPoolMachinesListParams struct { + + /*CloudType + Cluster's cloud type + + */ + CloudType string + /*ConfigUID + Cluster's cloud config uid + + */ + ConfigUID string + /*Continue + continue token to paginate the subsequent data items + + */ + Continue *string + /*Fields + Set of fields to be presented in the response with values. The fields are comma separated. Eg: metadata.uid,metadata.name + + */ + Fields *string + /*Filters + Filters can be combined with AND, OR operators with field path name. Eg: metadata.name=TestServiceANDspec.cloudType=aws + + Server will be restricted to certain fields based on the indexed data for each resource. + + */ + Filters *string + /*Limit + limit is a maximum number of responses to return for a list call. Default and maximum value of the limit is 50. + If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. + + */ + Limit *int64 + /*MachinePoolName + Machine pool name + + */ + MachinePoolName string + /*Offset + offset is the next index number from which the response will start. The response offset value can be used along with continue token for the pagination. + + */ + Offset *int64 + /*OrderBy + Specify the fields with sort order. 1 indicates ascending and -1 for descending. Eg: orderBy=metadata.name=1,metadata.uid=-1 + + */ + OrderBy *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud configs custom pool machines list params +func (o *V1CloudConfigsCustomPoolMachinesListParams) WithTimeout(timeout time.Duration) *V1CloudConfigsCustomPoolMachinesListParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud configs custom pool machines list params +func (o *V1CloudConfigsCustomPoolMachinesListParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud configs custom pool machines list params +func (o *V1CloudConfigsCustomPoolMachinesListParams) WithContext(ctx context.Context) *V1CloudConfigsCustomPoolMachinesListParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud configs custom pool machines list params +func (o *V1CloudConfigsCustomPoolMachinesListParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud configs custom pool machines list params +func (o *V1CloudConfigsCustomPoolMachinesListParams) WithHTTPClient(client *http.Client) *V1CloudConfigsCustomPoolMachinesListParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud configs custom pool machines list params +func (o *V1CloudConfigsCustomPoolMachinesListParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithCloudType adds the cloudType to the v1 cloud configs custom pool machines list params +func (o *V1CloudConfigsCustomPoolMachinesListParams) WithCloudType(cloudType string) *V1CloudConfigsCustomPoolMachinesListParams { + o.SetCloudType(cloudType) + return o +} + +// SetCloudType adds the cloudType to the v1 cloud configs custom pool machines list params +func (o *V1CloudConfigsCustomPoolMachinesListParams) SetCloudType(cloudType string) { + o.CloudType = cloudType +} + +// WithConfigUID adds the configUID to the v1 cloud configs custom pool machines list params +func (o *V1CloudConfigsCustomPoolMachinesListParams) WithConfigUID(configUID string) *V1CloudConfigsCustomPoolMachinesListParams { + o.SetConfigUID(configUID) + return o +} + +// SetConfigUID adds the configUid to the v1 cloud configs custom pool machines list params +func (o *V1CloudConfigsCustomPoolMachinesListParams) SetConfigUID(configUID string) { + o.ConfigUID = configUID +} + +// WithContinue adds the continueVar to the v1 cloud configs custom pool machines list params +func (o *V1CloudConfigsCustomPoolMachinesListParams) WithContinue(continueVar *string) *V1CloudConfigsCustomPoolMachinesListParams { + o.SetContinue(continueVar) + return o +} + +// SetContinue adds the continue to the v1 cloud configs custom pool machines list params +func (o *V1CloudConfigsCustomPoolMachinesListParams) SetContinue(continueVar *string) { + o.Continue = continueVar +} + +// WithFields adds the fields to the v1 cloud configs custom pool machines list params +func (o *V1CloudConfigsCustomPoolMachinesListParams) WithFields(fields *string) *V1CloudConfigsCustomPoolMachinesListParams { + o.SetFields(fields) + return o +} + +// SetFields adds the fields to the v1 cloud configs custom pool machines list params +func (o *V1CloudConfigsCustomPoolMachinesListParams) SetFields(fields *string) { + o.Fields = fields +} + +// WithFilters adds the filters to the v1 cloud configs custom pool machines list params +func (o *V1CloudConfigsCustomPoolMachinesListParams) WithFilters(filters *string) *V1CloudConfigsCustomPoolMachinesListParams { + o.SetFilters(filters) + return o +} + +// SetFilters adds the filters to the v1 cloud configs custom pool machines list params +func (o *V1CloudConfigsCustomPoolMachinesListParams) SetFilters(filters *string) { + o.Filters = filters +} + +// WithLimit adds the limit to the v1 cloud configs custom pool machines list params +func (o *V1CloudConfigsCustomPoolMachinesListParams) WithLimit(limit *int64) *V1CloudConfigsCustomPoolMachinesListParams { + o.SetLimit(limit) + return o +} + +// SetLimit adds the limit to the v1 cloud configs custom pool machines list params +func (o *V1CloudConfigsCustomPoolMachinesListParams) SetLimit(limit *int64) { + o.Limit = limit +} + +// WithMachinePoolName adds the machinePoolName to the v1 cloud configs custom pool machines list params +func (o *V1CloudConfigsCustomPoolMachinesListParams) WithMachinePoolName(machinePoolName string) *V1CloudConfigsCustomPoolMachinesListParams { + o.SetMachinePoolName(machinePoolName) + return o +} + +// SetMachinePoolName adds the machinePoolName to the v1 cloud configs custom pool machines list params +func (o *V1CloudConfigsCustomPoolMachinesListParams) SetMachinePoolName(machinePoolName string) { + o.MachinePoolName = machinePoolName +} + +// WithOffset adds the offset to the v1 cloud configs custom pool machines list params +func (o *V1CloudConfigsCustomPoolMachinesListParams) WithOffset(offset *int64) *V1CloudConfigsCustomPoolMachinesListParams { + o.SetOffset(offset) + return o +} + +// SetOffset adds the offset to the v1 cloud configs custom pool machines list params +func (o *V1CloudConfigsCustomPoolMachinesListParams) SetOffset(offset *int64) { + o.Offset = offset +} + +// WithOrderBy adds the orderBy to the v1 cloud configs custom pool machines list params +func (o *V1CloudConfigsCustomPoolMachinesListParams) WithOrderBy(orderBy *string) *V1CloudConfigsCustomPoolMachinesListParams { + o.SetOrderBy(orderBy) + return o +} + +// SetOrderBy adds the orderBy to the v1 cloud configs custom pool machines list params +func (o *V1CloudConfigsCustomPoolMachinesListParams) SetOrderBy(orderBy *string) { + o.OrderBy = orderBy +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudConfigsCustomPoolMachinesListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param cloudType + if err := r.SetPathParam("cloudType", o.CloudType); err != nil { + return err + } + + // path param configUid + if err := r.SetPathParam("configUid", o.ConfigUID); err != nil { + return err + } + + if o.Continue != nil { + + // query param continue + var qrContinue string + if o.Continue != nil { + qrContinue = *o.Continue + } + qContinue := qrContinue + if qContinue != "" { + if err := r.SetQueryParam("continue", qContinue); err != nil { + return err + } + } + + } + + if o.Fields != nil { + + // query param fields + var qrFields string + if o.Fields != nil { + qrFields = *o.Fields + } + qFields := qrFields + if qFields != "" { + if err := r.SetQueryParam("fields", qFields); err != nil { + return err + } + } + + } + + if o.Filters != nil { + + // query param filters + var qrFilters string + if o.Filters != nil { + qrFilters = *o.Filters + } + qFilters := qrFilters + if qFilters != "" { + if err := r.SetQueryParam("filters", qFilters); err != nil { + return err + } + } + + } + + if o.Limit != nil { + + // query param limit + var qrLimit int64 + if o.Limit != nil { + qrLimit = *o.Limit + } + qLimit := swag.FormatInt64(qrLimit) + if qLimit != "" { + if err := r.SetQueryParam("limit", qLimit); err != nil { + return err + } + } + + } + + // path param machinePoolName + if err := r.SetPathParam("machinePoolName", o.MachinePoolName); err != nil { + return err + } + + if o.Offset != nil { + + // query param offset + var qrOffset int64 + if o.Offset != nil { + qrOffset = *o.Offset + } + qOffset := swag.FormatInt64(qrOffset) + if qOffset != "" { + if err := r.SetQueryParam("offset", qOffset); err != nil { + return err + } + } + + } + + if o.OrderBy != nil { + + // query param orderBy + var qrOrderBy string + if o.OrderBy != nil { + qrOrderBy = *o.OrderBy + } + qOrderBy := qrOrderBy + if qOrderBy != "" { + if err := r.SetQueryParam("orderBy", qOrderBy); err != nil { + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_configs_custom_pool_machines_list_responses.go b/api/client/v1/v1_cloud_configs_custom_pool_machines_list_responses.go new file mode 100644 index 00000000..9bd12384 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_custom_pool_machines_list_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1CloudConfigsCustomPoolMachinesListReader is a Reader for the V1CloudConfigsCustomPoolMachinesList structure. +type V1CloudConfigsCustomPoolMachinesListReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudConfigsCustomPoolMachinesListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1CloudConfigsCustomPoolMachinesListOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudConfigsCustomPoolMachinesListOK creates a V1CloudConfigsCustomPoolMachinesListOK with default headers values +func NewV1CloudConfigsCustomPoolMachinesListOK() *V1CloudConfigsCustomPoolMachinesListOK { + return &V1CloudConfigsCustomPoolMachinesListOK{} +} + +/* +V1CloudConfigsCustomPoolMachinesListOK handles this case with default header values. + +An array of Custom machine items +*/ +type V1CloudConfigsCustomPoolMachinesListOK struct { + Payload *models.V1CustomMachines +} + +func (o *V1CloudConfigsCustomPoolMachinesListOK) Error() string { + return fmt.Sprintf("[GET /v1/cloudconfigs/cloudTypes/{cloudType}/{configUid}/machinePools/{machinePoolName}/machines][%d] v1CloudConfigsCustomPoolMachinesListOK %+v", 200, o.Payload) +} + +func (o *V1CloudConfigsCustomPoolMachinesListOK) GetPayload() *models.V1CustomMachines { + return o.Payload +} + +func (o *V1CloudConfigsCustomPoolMachinesListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1CustomMachines) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_cloud_configs_custom_pool_machines_uid_delete_parameters.go b/api/client/v1/v1_cloud_configs_custom_pool_machines_uid_delete_parameters.go new file mode 100644 index 00000000..07762ff0 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_custom_pool_machines_uid_delete_parameters.go @@ -0,0 +1,199 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1CloudConfigsCustomPoolMachinesUIDDeleteParams creates a new V1CloudConfigsCustomPoolMachinesUIDDeleteParams object +// with the default values initialized. +func NewV1CloudConfigsCustomPoolMachinesUIDDeleteParams() *V1CloudConfigsCustomPoolMachinesUIDDeleteParams { + var () + return &V1CloudConfigsCustomPoolMachinesUIDDeleteParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudConfigsCustomPoolMachinesUIDDeleteParamsWithTimeout creates a new V1CloudConfigsCustomPoolMachinesUIDDeleteParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudConfigsCustomPoolMachinesUIDDeleteParamsWithTimeout(timeout time.Duration) *V1CloudConfigsCustomPoolMachinesUIDDeleteParams { + var () + return &V1CloudConfigsCustomPoolMachinesUIDDeleteParams{ + + timeout: timeout, + } +} + +// NewV1CloudConfigsCustomPoolMachinesUIDDeleteParamsWithContext creates a new V1CloudConfigsCustomPoolMachinesUIDDeleteParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudConfigsCustomPoolMachinesUIDDeleteParamsWithContext(ctx context.Context) *V1CloudConfigsCustomPoolMachinesUIDDeleteParams { + var () + return &V1CloudConfigsCustomPoolMachinesUIDDeleteParams{ + + Context: ctx, + } +} + +// NewV1CloudConfigsCustomPoolMachinesUIDDeleteParamsWithHTTPClient creates a new V1CloudConfigsCustomPoolMachinesUIDDeleteParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudConfigsCustomPoolMachinesUIDDeleteParamsWithHTTPClient(client *http.Client) *V1CloudConfigsCustomPoolMachinesUIDDeleteParams { + var () + return &V1CloudConfigsCustomPoolMachinesUIDDeleteParams{ + HTTPClient: client, + } +} + +/* +V1CloudConfigsCustomPoolMachinesUIDDeleteParams contains all the parameters to send to the API endpoint +for the v1 cloud configs custom pool machines Uid delete operation typically these are written to a http.Request +*/ +type V1CloudConfigsCustomPoolMachinesUIDDeleteParams struct { + + /*CloudType + Cluster's cloud type + + */ + CloudType string + /*ConfigUID + Cluster's cloud config uid + + */ + ConfigUID string + /*MachinePoolName + Machine pool name + + */ + MachinePoolName string + /*MachineUID + Machine uid + + */ + MachineUID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud configs custom pool machines Uid delete params +func (o *V1CloudConfigsCustomPoolMachinesUIDDeleteParams) WithTimeout(timeout time.Duration) *V1CloudConfigsCustomPoolMachinesUIDDeleteParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud configs custom pool machines Uid delete params +func (o *V1CloudConfigsCustomPoolMachinesUIDDeleteParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud configs custom pool machines Uid delete params +func (o *V1CloudConfigsCustomPoolMachinesUIDDeleteParams) WithContext(ctx context.Context) *V1CloudConfigsCustomPoolMachinesUIDDeleteParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud configs custom pool machines Uid delete params +func (o *V1CloudConfigsCustomPoolMachinesUIDDeleteParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud configs custom pool machines Uid delete params +func (o *V1CloudConfigsCustomPoolMachinesUIDDeleteParams) WithHTTPClient(client *http.Client) *V1CloudConfigsCustomPoolMachinesUIDDeleteParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud configs custom pool machines Uid delete params +func (o *V1CloudConfigsCustomPoolMachinesUIDDeleteParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithCloudType adds the cloudType to the v1 cloud configs custom pool machines Uid delete params +func (o *V1CloudConfigsCustomPoolMachinesUIDDeleteParams) WithCloudType(cloudType string) *V1CloudConfigsCustomPoolMachinesUIDDeleteParams { + o.SetCloudType(cloudType) + return o +} + +// SetCloudType adds the cloudType to the v1 cloud configs custom pool machines Uid delete params +func (o *V1CloudConfigsCustomPoolMachinesUIDDeleteParams) SetCloudType(cloudType string) { + o.CloudType = cloudType +} + +// WithConfigUID adds the configUID to the v1 cloud configs custom pool machines Uid delete params +func (o *V1CloudConfigsCustomPoolMachinesUIDDeleteParams) WithConfigUID(configUID string) *V1CloudConfigsCustomPoolMachinesUIDDeleteParams { + o.SetConfigUID(configUID) + return o +} + +// SetConfigUID adds the configUid to the v1 cloud configs custom pool machines Uid delete params +func (o *V1CloudConfigsCustomPoolMachinesUIDDeleteParams) SetConfigUID(configUID string) { + o.ConfigUID = configUID +} + +// WithMachinePoolName adds the machinePoolName to the v1 cloud configs custom pool machines Uid delete params +func (o *V1CloudConfigsCustomPoolMachinesUIDDeleteParams) WithMachinePoolName(machinePoolName string) *V1CloudConfigsCustomPoolMachinesUIDDeleteParams { + o.SetMachinePoolName(machinePoolName) + return o +} + +// SetMachinePoolName adds the machinePoolName to the v1 cloud configs custom pool machines Uid delete params +func (o *V1CloudConfigsCustomPoolMachinesUIDDeleteParams) SetMachinePoolName(machinePoolName string) { + o.MachinePoolName = machinePoolName +} + +// WithMachineUID adds the machineUID to the v1 cloud configs custom pool machines Uid delete params +func (o *V1CloudConfigsCustomPoolMachinesUIDDeleteParams) WithMachineUID(machineUID string) *V1CloudConfigsCustomPoolMachinesUIDDeleteParams { + o.SetMachineUID(machineUID) + return o +} + +// SetMachineUID adds the machineUid to the v1 cloud configs custom pool machines Uid delete params +func (o *V1CloudConfigsCustomPoolMachinesUIDDeleteParams) SetMachineUID(machineUID string) { + o.MachineUID = machineUID +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudConfigsCustomPoolMachinesUIDDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param cloudType + if err := r.SetPathParam("cloudType", o.CloudType); err != nil { + return err + } + + // path param configUid + if err := r.SetPathParam("configUid", o.ConfigUID); err != nil { + return err + } + + // path param machinePoolName + if err := r.SetPathParam("machinePoolName", o.MachinePoolName); err != nil { + return err + } + + // path param machineUid + if err := r.SetPathParam("machineUid", o.MachineUID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_configs_custom_pool_machines_uid_delete_responses.go b/api/client/v1/v1_cloud_configs_custom_pool_machines_uid_delete_responses.go new file mode 100644 index 00000000..02aeb56f --- /dev/null +++ b/api/client/v1/v1_cloud_configs_custom_pool_machines_uid_delete_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1CloudConfigsCustomPoolMachinesUIDDeleteReader is a Reader for the V1CloudConfigsCustomPoolMachinesUIDDelete structure. +type V1CloudConfigsCustomPoolMachinesUIDDeleteReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudConfigsCustomPoolMachinesUIDDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1CloudConfigsCustomPoolMachinesUIDDeleteNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudConfigsCustomPoolMachinesUIDDeleteNoContent creates a V1CloudConfigsCustomPoolMachinesUIDDeleteNoContent with default headers values +func NewV1CloudConfigsCustomPoolMachinesUIDDeleteNoContent() *V1CloudConfigsCustomPoolMachinesUIDDeleteNoContent { + return &V1CloudConfigsCustomPoolMachinesUIDDeleteNoContent{} +} + +/* +V1CloudConfigsCustomPoolMachinesUIDDeleteNoContent handles this case with default header values. + +The resource was deleted successfully +*/ +type V1CloudConfigsCustomPoolMachinesUIDDeleteNoContent struct { +} + +func (o *V1CloudConfigsCustomPoolMachinesUIDDeleteNoContent) Error() string { + return fmt.Sprintf("[DELETE /v1/cloudconfigs/cloudTypes/{cloudType}/{configUid}/machinePools/{machinePoolName}/machines/{machineUid}][%d] v1CloudConfigsCustomPoolMachinesUidDeleteNoContent ", 204) +} + +func (o *V1CloudConfigsCustomPoolMachinesUIDDeleteNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_cloud_configs_custom_pool_machines_uid_get_parameters.go b/api/client/v1/v1_cloud_configs_custom_pool_machines_uid_get_parameters.go new file mode 100644 index 00000000..eab9b15c --- /dev/null +++ b/api/client/v1/v1_cloud_configs_custom_pool_machines_uid_get_parameters.go @@ -0,0 +1,199 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1CloudConfigsCustomPoolMachinesUIDGetParams creates a new V1CloudConfigsCustomPoolMachinesUIDGetParams object +// with the default values initialized. +func NewV1CloudConfigsCustomPoolMachinesUIDGetParams() *V1CloudConfigsCustomPoolMachinesUIDGetParams { + var () + return &V1CloudConfigsCustomPoolMachinesUIDGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudConfigsCustomPoolMachinesUIDGetParamsWithTimeout creates a new V1CloudConfigsCustomPoolMachinesUIDGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudConfigsCustomPoolMachinesUIDGetParamsWithTimeout(timeout time.Duration) *V1CloudConfigsCustomPoolMachinesUIDGetParams { + var () + return &V1CloudConfigsCustomPoolMachinesUIDGetParams{ + + timeout: timeout, + } +} + +// NewV1CloudConfigsCustomPoolMachinesUIDGetParamsWithContext creates a new V1CloudConfigsCustomPoolMachinesUIDGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudConfigsCustomPoolMachinesUIDGetParamsWithContext(ctx context.Context) *V1CloudConfigsCustomPoolMachinesUIDGetParams { + var () + return &V1CloudConfigsCustomPoolMachinesUIDGetParams{ + + Context: ctx, + } +} + +// NewV1CloudConfigsCustomPoolMachinesUIDGetParamsWithHTTPClient creates a new V1CloudConfigsCustomPoolMachinesUIDGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudConfigsCustomPoolMachinesUIDGetParamsWithHTTPClient(client *http.Client) *V1CloudConfigsCustomPoolMachinesUIDGetParams { + var () + return &V1CloudConfigsCustomPoolMachinesUIDGetParams{ + HTTPClient: client, + } +} + +/* +V1CloudConfigsCustomPoolMachinesUIDGetParams contains all the parameters to send to the API endpoint +for the v1 cloud configs custom pool machines Uid get operation typically these are written to a http.Request +*/ +type V1CloudConfigsCustomPoolMachinesUIDGetParams struct { + + /*CloudType + Cluster's cloud type + + */ + CloudType string + /*ConfigUID + Cluster's cloud config uid + + */ + ConfigUID string + /*MachinePoolName + Machine pool name + + */ + MachinePoolName string + /*MachineUID + Machine uid + + */ + MachineUID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud configs custom pool machines Uid get params +func (o *V1CloudConfigsCustomPoolMachinesUIDGetParams) WithTimeout(timeout time.Duration) *V1CloudConfigsCustomPoolMachinesUIDGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud configs custom pool machines Uid get params +func (o *V1CloudConfigsCustomPoolMachinesUIDGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud configs custom pool machines Uid get params +func (o *V1CloudConfigsCustomPoolMachinesUIDGetParams) WithContext(ctx context.Context) *V1CloudConfigsCustomPoolMachinesUIDGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud configs custom pool machines Uid get params +func (o *V1CloudConfigsCustomPoolMachinesUIDGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud configs custom pool machines Uid get params +func (o *V1CloudConfigsCustomPoolMachinesUIDGetParams) WithHTTPClient(client *http.Client) *V1CloudConfigsCustomPoolMachinesUIDGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud configs custom pool machines Uid get params +func (o *V1CloudConfigsCustomPoolMachinesUIDGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithCloudType adds the cloudType to the v1 cloud configs custom pool machines Uid get params +func (o *V1CloudConfigsCustomPoolMachinesUIDGetParams) WithCloudType(cloudType string) *V1CloudConfigsCustomPoolMachinesUIDGetParams { + o.SetCloudType(cloudType) + return o +} + +// SetCloudType adds the cloudType to the v1 cloud configs custom pool machines Uid get params +func (o *V1CloudConfigsCustomPoolMachinesUIDGetParams) SetCloudType(cloudType string) { + o.CloudType = cloudType +} + +// WithConfigUID adds the configUID to the v1 cloud configs custom pool machines Uid get params +func (o *V1CloudConfigsCustomPoolMachinesUIDGetParams) WithConfigUID(configUID string) *V1CloudConfigsCustomPoolMachinesUIDGetParams { + o.SetConfigUID(configUID) + return o +} + +// SetConfigUID adds the configUid to the v1 cloud configs custom pool machines Uid get params +func (o *V1CloudConfigsCustomPoolMachinesUIDGetParams) SetConfigUID(configUID string) { + o.ConfigUID = configUID +} + +// WithMachinePoolName adds the machinePoolName to the v1 cloud configs custom pool machines Uid get params +func (o *V1CloudConfigsCustomPoolMachinesUIDGetParams) WithMachinePoolName(machinePoolName string) *V1CloudConfigsCustomPoolMachinesUIDGetParams { + o.SetMachinePoolName(machinePoolName) + return o +} + +// SetMachinePoolName adds the machinePoolName to the v1 cloud configs custom pool machines Uid get params +func (o *V1CloudConfigsCustomPoolMachinesUIDGetParams) SetMachinePoolName(machinePoolName string) { + o.MachinePoolName = machinePoolName +} + +// WithMachineUID adds the machineUID to the v1 cloud configs custom pool machines Uid get params +func (o *V1CloudConfigsCustomPoolMachinesUIDGetParams) WithMachineUID(machineUID string) *V1CloudConfigsCustomPoolMachinesUIDGetParams { + o.SetMachineUID(machineUID) + return o +} + +// SetMachineUID adds the machineUid to the v1 cloud configs custom pool machines Uid get params +func (o *V1CloudConfigsCustomPoolMachinesUIDGetParams) SetMachineUID(machineUID string) { + o.MachineUID = machineUID +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudConfigsCustomPoolMachinesUIDGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param cloudType + if err := r.SetPathParam("cloudType", o.CloudType); err != nil { + return err + } + + // path param configUid + if err := r.SetPathParam("configUid", o.ConfigUID); err != nil { + return err + } + + // path param machinePoolName + if err := r.SetPathParam("machinePoolName", o.MachinePoolName); err != nil { + return err + } + + // path param machineUid + if err := r.SetPathParam("machineUid", o.MachineUID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_configs_custom_pool_machines_uid_get_responses.go b/api/client/v1/v1_cloud_configs_custom_pool_machines_uid_get_responses.go new file mode 100644 index 00000000..60b88cf9 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_custom_pool_machines_uid_get_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1CloudConfigsCustomPoolMachinesUIDGetReader is a Reader for the V1CloudConfigsCustomPoolMachinesUIDGet structure. +type V1CloudConfigsCustomPoolMachinesUIDGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudConfigsCustomPoolMachinesUIDGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1CloudConfigsCustomPoolMachinesUIDGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudConfigsCustomPoolMachinesUIDGetOK creates a V1CloudConfigsCustomPoolMachinesUIDGetOK with default headers values +func NewV1CloudConfigsCustomPoolMachinesUIDGetOK() *V1CloudConfigsCustomPoolMachinesUIDGetOK { + return &V1CloudConfigsCustomPoolMachinesUIDGetOK{} +} + +/* +V1CloudConfigsCustomPoolMachinesUIDGetOK handles this case with default header values. + +OK +*/ +type V1CloudConfigsCustomPoolMachinesUIDGetOK struct { + Payload *models.V1CustomMachine +} + +func (o *V1CloudConfigsCustomPoolMachinesUIDGetOK) Error() string { + return fmt.Sprintf("[GET /v1/cloudconfigs/cloudTypes/{cloudType}/{configUid}/machinePools/{machinePoolName}/machines/{machineUid}][%d] v1CloudConfigsCustomPoolMachinesUidGetOK %+v", 200, o.Payload) +} + +func (o *V1CloudConfigsCustomPoolMachinesUIDGetOK) GetPayload() *models.V1CustomMachine { + return o.Payload +} + +func (o *V1CloudConfigsCustomPoolMachinesUIDGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1CustomMachine) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_cloud_configs_custom_pool_machines_uid_update_parameters.go b/api/client/v1/v1_cloud_configs_custom_pool_machines_uid_update_parameters.go new file mode 100644 index 00000000..3da83af5 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_custom_pool_machines_uid_update_parameters.go @@ -0,0 +1,220 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1CloudConfigsCustomPoolMachinesUIDUpdateParams creates a new V1CloudConfigsCustomPoolMachinesUIDUpdateParams object +// with the default values initialized. +func NewV1CloudConfigsCustomPoolMachinesUIDUpdateParams() *V1CloudConfigsCustomPoolMachinesUIDUpdateParams { + var () + return &V1CloudConfigsCustomPoolMachinesUIDUpdateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudConfigsCustomPoolMachinesUIDUpdateParamsWithTimeout creates a new V1CloudConfigsCustomPoolMachinesUIDUpdateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudConfigsCustomPoolMachinesUIDUpdateParamsWithTimeout(timeout time.Duration) *V1CloudConfigsCustomPoolMachinesUIDUpdateParams { + var () + return &V1CloudConfigsCustomPoolMachinesUIDUpdateParams{ + + timeout: timeout, + } +} + +// NewV1CloudConfigsCustomPoolMachinesUIDUpdateParamsWithContext creates a new V1CloudConfigsCustomPoolMachinesUIDUpdateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudConfigsCustomPoolMachinesUIDUpdateParamsWithContext(ctx context.Context) *V1CloudConfigsCustomPoolMachinesUIDUpdateParams { + var () + return &V1CloudConfigsCustomPoolMachinesUIDUpdateParams{ + + Context: ctx, + } +} + +// NewV1CloudConfigsCustomPoolMachinesUIDUpdateParamsWithHTTPClient creates a new V1CloudConfigsCustomPoolMachinesUIDUpdateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudConfigsCustomPoolMachinesUIDUpdateParamsWithHTTPClient(client *http.Client) *V1CloudConfigsCustomPoolMachinesUIDUpdateParams { + var () + return &V1CloudConfigsCustomPoolMachinesUIDUpdateParams{ + HTTPClient: client, + } +} + +/* +V1CloudConfigsCustomPoolMachinesUIDUpdateParams contains all the parameters to send to the API endpoint +for the v1 cloud configs custom pool machines Uid update operation typically these are written to a http.Request +*/ +type V1CloudConfigsCustomPoolMachinesUIDUpdateParams struct { + + /*Body*/ + Body *models.V1CustomMachine + /*CloudType + Cluster's cloud type + + */ + CloudType string + /*ConfigUID + Cluster's cloud config uid + + */ + ConfigUID string + /*MachinePoolName + Machine pool name + + */ + MachinePoolName string + /*MachineUID + Machine uid + + */ + MachineUID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud configs custom pool machines Uid update params +func (o *V1CloudConfigsCustomPoolMachinesUIDUpdateParams) WithTimeout(timeout time.Duration) *V1CloudConfigsCustomPoolMachinesUIDUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud configs custom pool machines Uid update params +func (o *V1CloudConfigsCustomPoolMachinesUIDUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud configs custom pool machines Uid update params +func (o *V1CloudConfigsCustomPoolMachinesUIDUpdateParams) WithContext(ctx context.Context) *V1CloudConfigsCustomPoolMachinesUIDUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud configs custom pool machines Uid update params +func (o *V1CloudConfigsCustomPoolMachinesUIDUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud configs custom pool machines Uid update params +func (o *V1CloudConfigsCustomPoolMachinesUIDUpdateParams) WithHTTPClient(client *http.Client) *V1CloudConfigsCustomPoolMachinesUIDUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud configs custom pool machines Uid update params +func (o *V1CloudConfigsCustomPoolMachinesUIDUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 cloud configs custom pool machines Uid update params +func (o *V1CloudConfigsCustomPoolMachinesUIDUpdateParams) WithBody(body *models.V1CustomMachine) *V1CloudConfigsCustomPoolMachinesUIDUpdateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 cloud configs custom pool machines Uid update params +func (o *V1CloudConfigsCustomPoolMachinesUIDUpdateParams) SetBody(body *models.V1CustomMachine) { + o.Body = body +} + +// WithCloudType adds the cloudType to the v1 cloud configs custom pool machines Uid update params +func (o *V1CloudConfigsCustomPoolMachinesUIDUpdateParams) WithCloudType(cloudType string) *V1CloudConfigsCustomPoolMachinesUIDUpdateParams { + o.SetCloudType(cloudType) + return o +} + +// SetCloudType adds the cloudType to the v1 cloud configs custom pool machines Uid update params +func (o *V1CloudConfigsCustomPoolMachinesUIDUpdateParams) SetCloudType(cloudType string) { + o.CloudType = cloudType +} + +// WithConfigUID adds the configUID to the v1 cloud configs custom pool machines Uid update params +func (o *V1CloudConfigsCustomPoolMachinesUIDUpdateParams) WithConfigUID(configUID string) *V1CloudConfigsCustomPoolMachinesUIDUpdateParams { + o.SetConfigUID(configUID) + return o +} + +// SetConfigUID adds the configUid to the v1 cloud configs custom pool machines Uid update params +func (o *V1CloudConfigsCustomPoolMachinesUIDUpdateParams) SetConfigUID(configUID string) { + o.ConfigUID = configUID +} + +// WithMachinePoolName adds the machinePoolName to the v1 cloud configs custom pool machines Uid update params +func (o *V1CloudConfigsCustomPoolMachinesUIDUpdateParams) WithMachinePoolName(machinePoolName string) *V1CloudConfigsCustomPoolMachinesUIDUpdateParams { + o.SetMachinePoolName(machinePoolName) + return o +} + +// SetMachinePoolName adds the machinePoolName to the v1 cloud configs custom pool machines Uid update params +func (o *V1CloudConfigsCustomPoolMachinesUIDUpdateParams) SetMachinePoolName(machinePoolName string) { + o.MachinePoolName = machinePoolName +} + +// WithMachineUID adds the machineUID to the v1 cloud configs custom pool machines Uid update params +func (o *V1CloudConfigsCustomPoolMachinesUIDUpdateParams) WithMachineUID(machineUID string) *V1CloudConfigsCustomPoolMachinesUIDUpdateParams { + o.SetMachineUID(machineUID) + return o +} + +// SetMachineUID adds the machineUid to the v1 cloud configs custom pool machines Uid update params +func (o *V1CloudConfigsCustomPoolMachinesUIDUpdateParams) SetMachineUID(machineUID string) { + o.MachineUID = machineUID +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudConfigsCustomPoolMachinesUIDUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param cloudType + if err := r.SetPathParam("cloudType", o.CloudType); err != nil { + return err + } + + // path param configUid + if err := r.SetPathParam("configUid", o.ConfigUID); err != nil { + return err + } + + // path param machinePoolName + if err := r.SetPathParam("machinePoolName", o.MachinePoolName); err != nil { + return err + } + + // path param machineUid + if err := r.SetPathParam("machineUid", o.MachineUID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_configs_custom_pool_machines_uid_update_responses.go b/api/client/v1/v1_cloud_configs_custom_pool_machines_uid_update_responses.go new file mode 100644 index 00000000..b7e1adcb --- /dev/null +++ b/api/client/v1/v1_cloud_configs_custom_pool_machines_uid_update_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1CloudConfigsCustomPoolMachinesUIDUpdateReader is a Reader for the V1CloudConfigsCustomPoolMachinesUIDUpdate structure. +type V1CloudConfigsCustomPoolMachinesUIDUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudConfigsCustomPoolMachinesUIDUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1CloudConfigsCustomPoolMachinesUIDUpdateNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudConfigsCustomPoolMachinesUIDUpdateNoContent creates a V1CloudConfigsCustomPoolMachinesUIDUpdateNoContent with default headers values +func NewV1CloudConfigsCustomPoolMachinesUIDUpdateNoContent() *V1CloudConfigsCustomPoolMachinesUIDUpdateNoContent { + return &V1CloudConfigsCustomPoolMachinesUIDUpdateNoContent{} +} + +/* +V1CloudConfigsCustomPoolMachinesUIDUpdateNoContent handles this case with default header values. + +The resource was updated successfully +*/ +type V1CloudConfigsCustomPoolMachinesUIDUpdateNoContent struct { +} + +func (o *V1CloudConfigsCustomPoolMachinesUIDUpdateNoContent) Error() string { + return fmt.Sprintf("[PUT /v1/cloudconfigs/cloudTypes/{cloudType}/{configUid}/machinePools/{machinePoolName}/machines/{machineUid}][%d] v1CloudConfigsCustomPoolMachinesUidUpdateNoContent ", 204) +} + +func (o *V1CloudConfigsCustomPoolMachinesUIDUpdateNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_cloud_configs_custom_uid_cluster_config_parameters.go b/api/client/v1/v1_cloud_configs_custom_uid_cluster_config_parameters.go new file mode 100644 index 00000000..68a65ca2 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_custom_uid_cluster_config_parameters.go @@ -0,0 +1,178 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1CloudConfigsCustomUIDClusterConfigParams creates a new V1CloudConfigsCustomUIDClusterConfigParams object +// with the default values initialized. +func NewV1CloudConfigsCustomUIDClusterConfigParams() *V1CloudConfigsCustomUIDClusterConfigParams { + var () + return &V1CloudConfigsCustomUIDClusterConfigParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudConfigsCustomUIDClusterConfigParamsWithTimeout creates a new V1CloudConfigsCustomUIDClusterConfigParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudConfigsCustomUIDClusterConfigParamsWithTimeout(timeout time.Duration) *V1CloudConfigsCustomUIDClusterConfigParams { + var () + return &V1CloudConfigsCustomUIDClusterConfigParams{ + + timeout: timeout, + } +} + +// NewV1CloudConfigsCustomUIDClusterConfigParamsWithContext creates a new V1CloudConfigsCustomUIDClusterConfigParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudConfigsCustomUIDClusterConfigParamsWithContext(ctx context.Context) *V1CloudConfigsCustomUIDClusterConfigParams { + var () + return &V1CloudConfigsCustomUIDClusterConfigParams{ + + Context: ctx, + } +} + +// NewV1CloudConfigsCustomUIDClusterConfigParamsWithHTTPClient creates a new V1CloudConfigsCustomUIDClusterConfigParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudConfigsCustomUIDClusterConfigParamsWithHTTPClient(client *http.Client) *V1CloudConfigsCustomUIDClusterConfigParams { + var () + return &V1CloudConfigsCustomUIDClusterConfigParams{ + HTTPClient: client, + } +} + +/* +V1CloudConfigsCustomUIDClusterConfigParams contains all the parameters to send to the API endpoint +for the v1 cloud configs custom Uid cluster config operation typically these are written to a http.Request +*/ +type V1CloudConfigsCustomUIDClusterConfigParams struct { + + /*Body*/ + Body *models.V1CustomCloudClusterConfigEntity + /*CloudType + Cluster's cloud type + + */ + CloudType string + /*ConfigUID + Cluster's cloud config uid + + */ + ConfigUID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud configs custom Uid cluster config params +func (o *V1CloudConfigsCustomUIDClusterConfigParams) WithTimeout(timeout time.Duration) *V1CloudConfigsCustomUIDClusterConfigParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud configs custom Uid cluster config params +func (o *V1CloudConfigsCustomUIDClusterConfigParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud configs custom Uid cluster config params +func (o *V1CloudConfigsCustomUIDClusterConfigParams) WithContext(ctx context.Context) *V1CloudConfigsCustomUIDClusterConfigParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud configs custom Uid cluster config params +func (o *V1CloudConfigsCustomUIDClusterConfigParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud configs custom Uid cluster config params +func (o *V1CloudConfigsCustomUIDClusterConfigParams) WithHTTPClient(client *http.Client) *V1CloudConfigsCustomUIDClusterConfigParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud configs custom Uid cluster config params +func (o *V1CloudConfigsCustomUIDClusterConfigParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 cloud configs custom Uid cluster config params +func (o *V1CloudConfigsCustomUIDClusterConfigParams) WithBody(body *models.V1CustomCloudClusterConfigEntity) *V1CloudConfigsCustomUIDClusterConfigParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 cloud configs custom Uid cluster config params +func (o *V1CloudConfigsCustomUIDClusterConfigParams) SetBody(body *models.V1CustomCloudClusterConfigEntity) { + o.Body = body +} + +// WithCloudType adds the cloudType to the v1 cloud configs custom Uid cluster config params +func (o *V1CloudConfigsCustomUIDClusterConfigParams) WithCloudType(cloudType string) *V1CloudConfigsCustomUIDClusterConfigParams { + o.SetCloudType(cloudType) + return o +} + +// SetCloudType adds the cloudType to the v1 cloud configs custom Uid cluster config params +func (o *V1CloudConfigsCustomUIDClusterConfigParams) SetCloudType(cloudType string) { + o.CloudType = cloudType +} + +// WithConfigUID adds the configUID to the v1 cloud configs custom Uid cluster config params +func (o *V1CloudConfigsCustomUIDClusterConfigParams) WithConfigUID(configUID string) *V1CloudConfigsCustomUIDClusterConfigParams { + o.SetConfigUID(configUID) + return o +} + +// SetConfigUID adds the configUid to the v1 cloud configs custom Uid cluster config params +func (o *V1CloudConfigsCustomUIDClusterConfigParams) SetConfigUID(configUID string) { + o.ConfigUID = configUID +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudConfigsCustomUIDClusterConfigParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param cloudType + if err := r.SetPathParam("cloudType", o.CloudType); err != nil { + return err + } + + // path param configUid + if err := r.SetPathParam("configUid", o.ConfigUID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_configs_custom_uid_cluster_config_responses.go b/api/client/v1/v1_cloud_configs_custom_uid_cluster_config_responses.go new file mode 100644 index 00000000..d8c1ab27 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_custom_uid_cluster_config_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1CloudConfigsCustomUIDClusterConfigReader is a Reader for the V1CloudConfigsCustomUIDClusterConfig structure. +type V1CloudConfigsCustomUIDClusterConfigReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudConfigsCustomUIDClusterConfigReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1CloudConfigsCustomUIDClusterConfigNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudConfigsCustomUIDClusterConfigNoContent creates a V1CloudConfigsCustomUIDClusterConfigNoContent with default headers values +func NewV1CloudConfigsCustomUIDClusterConfigNoContent() *V1CloudConfigsCustomUIDClusterConfigNoContent { + return &V1CloudConfigsCustomUIDClusterConfigNoContent{} +} + +/* +V1CloudConfigsCustomUIDClusterConfigNoContent handles this case with default header values. + +The resource was updated successfully +*/ +type V1CloudConfigsCustomUIDClusterConfigNoContent struct { +} + +func (o *V1CloudConfigsCustomUIDClusterConfigNoContent) Error() string { + return fmt.Sprintf("[PUT /v1/cloudconfigs/cloudTypes/{cloudType}/{configUid}/clusterConfig][%d] v1CloudConfigsCustomUidClusterConfigNoContent ", 204) +} + +func (o *V1CloudConfigsCustomUIDClusterConfigNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_cloud_configs_edge_get_parameters.go b/api/client/v1/v1_cloud_configs_edge_get_parameters.go new file mode 100644 index 00000000..15c3bc5c --- /dev/null +++ b/api/client/v1/v1_cloud_configs_edge_get_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1CloudConfigsEdgeGetParams creates a new V1CloudConfigsEdgeGetParams object +// with the default values initialized. +func NewV1CloudConfigsEdgeGetParams() *V1CloudConfigsEdgeGetParams { + var () + return &V1CloudConfigsEdgeGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudConfigsEdgeGetParamsWithTimeout creates a new V1CloudConfigsEdgeGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudConfigsEdgeGetParamsWithTimeout(timeout time.Duration) *V1CloudConfigsEdgeGetParams { + var () + return &V1CloudConfigsEdgeGetParams{ + + timeout: timeout, + } +} + +// NewV1CloudConfigsEdgeGetParamsWithContext creates a new V1CloudConfigsEdgeGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudConfigsEdgeGetParamsWithContext(ctx context.Context) *V1CloudConfigsEdgeGetParams { + var () + return &V1CloudConfigsEdgeGetParams{ + + Context: ctx, + } +} + +// NewV1CloudConfigsEdgeGetParamsWithHTTPClient creates a new V1CloudConfigsEdgeGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudConfigsEdgeGetParamsWithHTTPClient(client *http.Client) *V1CloudConfigsEdgeGetParams { + var () + return &V1CloudConfigsEdgeGetParams{ + HTTPClient: client, + } +} + +/* +V1CloudConfigsEdgeGetParams contains all the parameters to send to the API endpoint +for the v1 cloud configs edge get operation typically these are written to a http.Request +*/ +type V1CloudConfigsEdgeGetParams struct { + + /*ConfigUID + Cluster's cloud config uid + + */ + ConfigUID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud configs edge get params +func (o *V1CloudConfigsEdgeGetParams) WithTimeout(timeout time.Duration) *V1CloudConfigsEdgeGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud configs edge get params +func (o *V1CloudConfigsEdgeGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud configs edge get params +func (o *V1CloudConfigsEdgeGetParams) WithContext(ctx context.Context) *V1CloudConfigsEdgeGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud configs edge get params +func (o *V1CloudConfigsEdgeGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud configs edge get params +func (o *V1CloudConfigsEdgeGetParams) WithHTTPClient(client *http.Client) *V1CloudConfigsEdgeGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud configs edge get params +func (o *V1CloudConfigsEdgeGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithConfigUID adds the configUID to the v1 cloud configs edge get params +func (o *V1CloudConfigsEdgeGetParams) WithConfigUID(configUID string) *V1CloudConfigsEdgeGetParams { + o.SetConfigUID(configUID) + return o +} + +// SetConfigUID adds the configUid to the v1 cloud configs edge get params +func (o *V1CloudConfigsEdgeGetParams) SetConfigUID(configUID string) { + o.ConfigUID = configUID +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudConfigsEdgeGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param configUid + if err := r.SetPathParam("configUid", o.ConfigUID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_configs_edge_get_responses.go b/api/client/v1/v1_cloud_configs_edge_get_responses.go new file mode 100644 index 00000000..b461a002 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_edge_get_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1CloudConfigsEdgeGetReader is a Reader for the V1CloudConfigsEdgeGet structure. +type V1CloudConfigsEdgeGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudConfigsEdgeGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1CloudConfigsEdgeGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudConfigsEdgeGetOK creates a V1CloudConfigsEdgeGetOK with default headers values +func NewV1CloudConfigsEdgeGetOK() *V1CloudConfigsEdgeGetOK { + return &V1CloudConfigsEdgeGetOK{} +} + +/* +V1CloudConfigsEdgeGetOK handles this case with default header values. + +OK +*/ +type V1CloudConfigsEdgeGetOK struct { + Payload *models.V1EdgeCloudConfig +} + +func (o *V1CloudConfigsEdgeGetOK) Error() string { + return fmt.Sprintf("[GET /v1/cloudconfigs/edge/{configUid}][%d] v1CloudConfigsEdgeGetOK %+v", 200, o.Payload) +} + +func (o *V1CloudConfigsEdgeGetOK) GetPayload() *models.V1EdgeCloudConfig { + return o.Payload +} + +func (o *V1CloudConfigsEdgeGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1EdgeCloudConfig) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_cloud_configs_edge_machine_pool_create_parameters.go b/api/client/v1/v1_cloud_configs_edge_machine_pool_create_parameters.go new file mode 100644 index 00000000..ecad689f --- /dev/null +++ b/api/client/v1/v1_cloud_configs_edge_machine_pool_create_parameters.go @@ -0,0 +1,157 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1CloudConfigsEdgeMachinePoolCreateParams creates a new V1CloudConfigsEdgeMachinePoolCreateParams object +// with the default values initialized. +func NewV1CloudConfigsEdgeMachinePoolCreateParams() *V1CloudConfigsEdgeMachinePoolCreateParams { + var () + return &V1CloudConfigsEdgeMachinePoolCreateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudConfigsEdgeMachinePoolCreateParamsWithTimeout creates a new V1CloudConfigsEdgeMachinePoolCreateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudConfigsEdgeMachinePoolCreateParamsWithTimeout(timeout time.Duration) *V1CloudConfigsEdgeMachinePoolCreateParams { + var () + return &V1CloudConfigsEdgeMachinePoolCreateParams{ + + timeout: timeout, + } +} + +// NewV1CloudConfigsEdgeMachinePoolCreateParamsWithContext creates a new V1CloudConfigsEdgeMachinePoolCreateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudConfigsEdgeMachinePoolCreateParamsWithContext(ctx context.Context) *V1CloudConfigsEdgeMachinePoolCreateParams { + var () + return &V1CloudConfigsEdgeMachinePoolCreateParams{ + + Context: ctx, + } +} + +// NewV1CloudConfigsEdgeMachinePoolCreateParamsWithHTTPClient creates a new V1CloudConfigsEdgeMachinePoolCreateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudConfigsEdgeMachinePoolCreateParamsWithHTTPClient(client *http.Client) *V1CloudConfigsEdgeMachinePoolCreateParams { + var () + return &V1CloudConfigsEdgeMachinePoolCreateParams{ + HTTPClient: client, + } +} + +/* +V1CloudConfigsEdgeMachinePoolCreateParams contains all the parameters to send to the API endpoint +for the v1 cloud configs edge machine pool create operation typically these are written to a http.Request +*/ +type V1CloudConfigsEdgeMachinePoolCreateParams struct { + + /*Body*/ + Body *models.V1EdgeMachinePoolConfigEntity + /*ConfigUID + Cluster's cloud config uid + + */ + ConfigUID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud configs edge machine pool create params +func (o *V1CloudConfigsEdgeMachinePoolCreateParams) WithTimeout(timeout time.Duration) *V1CloudConfigsEdgeMachinePoolCreateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud configs edge machine pool create params +func (o *V1CloudConfigsEdgeMachinePoolCreateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud configs edge machine pool create params +func (o *V1CloudConfigsEdgeMachinePoolCreateParams) WithContext(ctx context.Context) *V1CloudConfigsEdgeMachinePoolCreateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud configs edge machine pool create params +func (o *V1CloudConfigsEdgeMachinePoolCreateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud configs edge machine pool create params +func (o *V1CloudConfigsEdgeMachinePoolCreateParams) WithHTTPClient(client *http.Client) *V1CloudConfigsEdgeMachinePoolCreateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud configs edge machine pool create params +func (o *V1CloudConfigsEdgeMachinePoolCreateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 cloud configs edge machine pool create params +func (o *V1CloudConfigsEdgeMachinePoolCreateParams) WithBody(body *models.V1EdgeMachinePoolConfigEntity) *V1CloudConfigsEdgeMachinePoolCreateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 cloud configs edge machine pool create params +func (o *V1CloudConfigsEdgeMachinePoolCreateParams) SetBody(body *models.V1EdgeMachinePoolConfigEntity) { + o.Body = body +} + +// WithConfigUID adds the configUID to the v1 cloud configs edge machine pool create params +func (o *V1CloudConfigsEdgeMachinePoolCreateParams) WithConfigUID(configUID string) *V1CloudConfigsEdgeMachinePoolCreateParams { + o.SetConfigUID(configUID) + return o +} + +// SetConfigUID adds the configUid to the v1 cloud configs edge machine pool create params +func (o *V1CloudConfigsEdgeMachinePoolCreateParams) SetConfigUID(configUID string) { + o.ConfigUID = configUID +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudConfigsEdgeMachinePoolCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param configUid + if err := r.SetPathParam("configUid", o.ConfigUID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_configs_edge_machine_pool_create_responses.go b/api/client/v1/v1_cloud_configs_edge_machine_pool_create_responses.go new file mode 100644 index 00000000..2540d3b4 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_edge_machine_pool_create_responses.go @@ -0,0 +1,77 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1CloudConfigsEdgeMachinePoolCreateReader is a Reader for the V1CloudConfigsEdgeMachinePoolCreate structure. +type V1CloudConfigsEdgeMachinePoolCreateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudConfigsEdgeMachinePoolCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 201: + result := NewV1CloudConfigsEdgeMachinePoolCreateCreated() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudConfigsEdgeMachinePoolCreateCreated creates a V1CloudConfigsEdgeMachinePoolCreateCreated with default headers values +func NewV1CloudConfigsEdgeMachinePoolCreateCreated() *V1CloudConfigsEdgeMachinePoolCreateCreated { + return &V1CloudConfigsEdgeMachinePoolCreateCreated{} +} + +/* +V1CloudConfigsEdgeMachinePoolCreateCreated handles this case with default header values. + +Created successfully +*/ +type V1CloudConfigsEdgeMachinePoolCreateCreated struct { + /*Audit uid for the request + */ + AuditUID string + + Payload *models.V1UID +} + +func (o *V1CloudConfigsEdgeMachinePoolCreateCreated) Error() string { + return fmt.Sprintf("[POST /v1/cloudconfigs/edge/{configUid}/machinePools][%d] v1CloudConfigsEdgeMachinePoolCreateCreated %+v", 201, o.Payload) +} + +func (o *V1CloudConfigsEdgeMachinePoolCreateCreated) GetPayload() *models.V1UID { + return o.Payload +} + +func (o *V1CloudConfigsEdgeMachinePoolCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header AuditUid + o.AuditUID = response.GetHeader("AuditUid") + + o.Payload = new(models.V1UID) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_cloud_configs_edge_machine_pool_delete_parameters.go b/api/client/v1/v1_cloud_configs_edge_machine_pool_delete_parameters.go new file mode 100644 index 00000000..e5546df6 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_edge_machine_pool_delete_parameters.go @@ -0,0 +1,157 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1CloudConfigsEdgeMachinePoolDeleteParams creates a new V1CloudConfigsEdgeMachinePoolDeleteParams object +// with the default values initialized. +func NewV1CloudConfigsEdgeMachinePoolDeleteParams() *V1CloudConfigsEdgeMachinePoolDeleteParams { + var () + return &V1CloudConfigsEdgeMachinePoolDeleteParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudConfigsEdgeMachinePoolDeleteParamsWithTimeout creates a new V1CloudConfigsEdgeMachinePoolDeleteParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudConfigsEdgeMachinePoolDeleteParamsWithTimeout(timeout time.Duration) *V1CloudConfigsEdgeMachinePoolDeleteParams { + var () + return &V1CloudConfigsEdgeMachinePoolDeleteParams{ + + timeout: timeout, + } +} + +// NewV1CloudConfigsEdgeMachinePoolDeleteParamsWithContext creates a new V1CloudConfigsEdgeMachinePoolDeleteParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudConfigsEdgeMachinePoolDeleteParamsWithContext(ctx context.Context) *V1CloudConfigsEdgeMachinePoolDeleteParams { + var () + return &V1CloudConfigsEdgeMachinePoolDeleteParams{ + + Context: ctx, + } +} + +// NewV1CloudConfigsEdgeMachinePoolDeleteParamsWithHTTPClient creates a new V1CloudConfigsEdgeMachinePoolDeleteParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudConfigsEdgeMachinePoolDeleteParamsWithHTTPClient(client *http.Client) *V1CloudConfigsEdgeMachinePoolDeleteParams { + var () + return &V1CloudConfigsEdgeMachinePoolDeleteParams{ + HTTPClient: client, + } +} + +/* +V1CloudConfigsEdgeMachinePoolDeleteParams contains all the parameters to send to the API endpoint +for the v1 cloud configs edge machine pool delete operation typically these are written to a http.Request +*/ +type V1CloudConfigsEdgeMachinePoolDeleteParams struct { + + /*ConfigUID + Cluster's cloud config uid + + */ + ConfigUID string + /*MachinePoolName + Machine pool name + + */ + MachinePoolName string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud configs edge machine pool delete params +func (o *V1CloudConfigsEdgeMachinePoolDeleteParams) WithTimeout(timeout time.Duration) *V1CloudConfigsEdgeMachinePoolDeleteParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud configs edge machine pool delete params +func (o *V1CloudConfigsEdgeMachinePoolDeleteParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud configs edge machine pool delete params +func (o *V1CloudConfigsEdgeMachinePoolDeleteParams) WithContext(ctx context.Context) *V1CloudConfigsEdgeMachinePoolDeleteParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud configs edge machine pool delete params +func (o *V1CloudConfigsEdgeMachinePoolDeleteParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud configs edge machine pool delete params +func (o *V1CloudConfigsEdgeMachinePoolDeleteParams) WithHTTPClient(client *http.Client) *V1CloudConfigsEdgeMachinePoolDeleteParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud configs edge machine pool delete params +func (o *V1CloudConfigsEdgeMachinePoolDeleteParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithConfigUID adds the configUID to the v1 cloud configs edge machine pool delete params +func (o *V1CloudConfigsEdgeMachinePoolDeleteParams) WithConfigUID(configUID string) *V1CloudConfigsEdgeMachinePoolDeleteParams { + o.SetConfigUID(configUID) + return o +} + +// SetConfigUID adds the configUid to the v1 cloud configs edge machine pool delete params +func (o *V1CloudConfigsEdgeMachinePoolDeleteParams) SetConfigUID(configUID string) { + o.ConfigUID = configUID +} + +// WithMachinePoolName adds the machinePoolName to the v1 cloud configs edge machine pool delete params +func (o *V1CloudConfigsEdgeMachinePoolDeleteParams) WithMachinePoolName(machinePoolName string) *V1CloudConfigsEdgeMachinePoolDeleteParams { + o.SetMachinePoolName(machinePoolName) + return o +} + +// SetMachinePoolName adds the machinePoolName to the v1 cloud configs edge machine pool delete params +func (o *V1CloudConfigsEdgeMachinePoolDeleteParams) SetMachinePoolName(machinePoolName string) { + o.MachinePoolName = machinePoolName +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudConfigsEdgeMachinePoolDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param configUid + if err := r.SetPathParam("configUid", o.ConfigUID); err != nil { + return err + } + + // path param machinePoolName + if err := r.SetPathParam("machinePoolName", o.MachinePoolName); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_configs_edge_machine_pool_delete_responses.go b/api/client/v1/v1_cloud_configs_edge_machine_pool_delete_responses.go new file mode 100644 index 00000000..fd498ce8 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_edge_machine_pool_delete_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1CloudConfigsEdgeMachinePoolDeleteReader is a Reader for the V1CloudConfigsEdgeMachinePoolDelete structure. +type V1CloudConfigsEdgeMachinePoolDeleteReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudConfigsEdgeMachinePoolDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1CloudConfigsEdgeMachinePoolDeleteNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudConfigsEdgeMachinePoolDeleteNoContent creates a V1CloudConfigsEdgeMachinePoolDeleteNoContent with default headers values +func NewV1CloudConfigsEdgeMachinePoolDeleteNoContent() *V1CloudConfigsEdgeMachinePoolDeleteNoContent { + return &V1CloudConfigsEdgeMachinePoolDeleteNoContent{} +} + +/* +V1CloudConfigsEdgeMachinePoolDeleteNoContent handles this case with default header values. + +The resource was deleted successfully +*/ +type V1CloudConfigsEdgeMachinePoolDeleteNoContent struct { +} + +func (o *V1CloudConfigsEdgeMachinePoolDeleteNoContent) Error() string { + return fmt.Sprintf("[DELETE /v1/cloudconfigs/edge/{configUid}/machinePools/{machinePoolName}][%d] v1CloudConfigsEdgeMachinePoolDeleteNoContent ", 204) +} + +func (o *V1CloudConfigsEdgeMachinePoolDeleteNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_cloud_configs_edge_machine_pool_update_parameters.go b/api/client/v1/v1_cloud_configs_edge_machine_pool_update_parameters.go new file mode 100644 index 00000000..94034625 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_edge_machine_pool_update_parameters.go @@ -0,0 +1,178 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1CloudConfigsEdgeMachinePoolUpdateParams creates a new V1CloudConfigsEdgeMachinePoolUpdateParams object +// with the default values initialized. +func NewV1CloudConfigsEdgeMachinePoolUpdateParams() *V1CloudConfigsEdgeMachinePoolUpdateParams { + var () + return &V1CloudConfigsEdgeMachinePoolUpdateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudConfigsEdgeMachinePoolUpdateParamsWithTimeout creates a new V1CloudConfigsEdgeMachinePoolUpdateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudConfigsEdgeMachinePoolUpdateParamsWithTimeout(timeout time.Duration) *V1CloudConfigsEdgeMachinePoolUpdateParams { + var () + return &V1CloudConfigsEdgeMachinePoolUpdateParams{ + + timeout: timeout, + } +} + +// NewV1CloudConfigsEdgeMachinePoolUpdateParamsWithContext creates a new V1CloudConfigsEdgeMachinePoolUpdateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudConfigsEdgeMachinePoolUpdateParamsWithContext(ctx context.Context) *V1CloudConfigsEdgeMachinePoolUpdateParams { + var () + return &V1CloudConfigsEdgeMachinePoolUpdateParams{ + + Context: ctx, + } +} + +// NewV1CloudConfigsEdgeMachinePoolUpdateParamsWithHTTPClient creates a new V1CloudConfigsEdgeMachinePoolUpdateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudConfigsEdgeMachinePoolUpdateParamsWithHTTPClient(client *http.Client) *V1CloudConfigsEdgeMachinePoolUpdateParams { + var () + return &V1CloudConfigsEdgeMachinePoolUpdateParams{ + HTTPClient: client, + } +} + +/* +V1CloudConfigsEdgeMachinePoolUpdateParams contains all the parameters to send to the API endpoint +for the v1 cloud configs edge machine pool update operation typically these are written to a http.Request +*/ +type V1CloudConfigsEdgeMachinePoolUpdateParams struct { + + /*Body*/ + Body *models.V1EdgeMachinePoolConfigEntity + /*ConfigUID + Cluster's cloud config uid + + */ + ConfigUID string + /*MachinePoolName + Machine pool name + + */ + MachinePoolName string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud configs edge machine pool update params +func (o *V1CloudConfigsEdgeMachinePoolUpdateParams) WithTimeout(timeout time.Duration) *V1CloudConfigsEdgeMachinePoolUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud configs edge machine pool update params +func (o *V1CloudConfigsEdgeMachinePoolUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud configs edge machine pool update params +func (o *V1CloudConfigsEdgeMachinePoolUpdateParams) WithContext(ctx context.Context) *V1CloudConfigsEdgeMachinePoolUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud configs edge machine pool update params +func (o *V1CloudConfigsEdgeMachinePoolUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud configs edge machine pool update params +func (o *V1CloudConfigsEdgeMachinePoolUpdateParams) WithHTTPClient(client *http.Client) *V1CloudConfigsEdgeMachinePoolUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud configs edge machine pool update params +func (o *V1CloudConfigsEdgeMachinePoolUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 cloud configs edge machine pool update params +func (o *V1CloudConfigsEdgeMachinePoolUpdateParams) WithBody(body *models.V1EdgeMachinePoolConfigEntity) *V1CloudConfigsEdgeMachinePoolUpdateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 cloud configs edge machine pool update params +func (o *V1CloudConfigsEdgeMachinePoolUpdateParams) SetBody(body *models.V1EdgeMachinePoolConfigEntity) { + o.Body = body +} + +// WithConfigUID adds the configUID to the v1 cloud configs edge machine pool update params +func (o *V1CloudConfigsEdgeMachinePoolUpdateParams) WithConfigUID(configUID string) *V1CloudConfigsEdgeMachinePoolUpdateParams { + o.SetConfigUID(configUID) + return o +} + +// SetConfigUID adds the configUid to the v1 cloud configs edge machine pool update params +func (o *V1CloudConfigsEdgeMachinePoolUpdateParams) SetConfigUID(configUID string) { + o.ConfigUID = configUID +} + +// WithMachinePoolName adds the machinePoolName to the v1 cloud configs edge machine pool update params +func (o *V1CloudConfigsEdgeMachinePoolUpdateParams) WithMachinePoolName(machinePoolName string) *V1CloudConfigsEdgeMachinePoolUpdateParams { + o.SetMachinePoolName(machinePoolName) + return o +} + +// SetMachinePoolName adds the machinePoolName to the v1 cloud configs edge machine pool update params +func (o *V1CloudConfigsEdgeMachinePoolUpdateParams) SetMachinePoolName(machinePoolName string) { + o.MachinePoolName = machinePoolName +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudConfigsEdgeMachinePoolUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param configUid + if err := r.SetPathParam("configUid", o.ConfigUID); err != nil { + return err + } + + // path param machinePoolName + if err := r.SetPathParam("machinePoolName", o.MachinePoolName); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_configs_edge_machine_pool_update_responses.go b/api/client/v1/v1_cloud_configs_edge_machine_pool_update_responses.go new file mode 100644 index 00000000..349470a8 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_edge_machine_pool_update_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1CloudConfigsEdgeMachinePoolUpdateReader is a Reader for the V1CloudConfigsEdgeMachinePoolUpdate structure. +type V1CloudConfigsEdgeMachinePoolUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudConfigsEdgeMachinePoolUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1CloudConfigsEdgeMachinePoolUpdateNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudConfigsEdgeMachinePoolUpdateNoContent creates a V1CloudConfigsEdgeMachinePoolUpdateNoContent with default headers values +func NewV1CloudConfigsEdgeMachinePoolUpdateNoContent() *V1CloudConfigsEdgeMachinePoolUpdateNoContent { + return &V1CloudConfigsEdgeMachinePoolUpdateNoContent{} +} + +/* +V1CloudConfigsEdgeMachinePoolUpdateNoContent handles this case with default header values. + +The resource was updated successfully +*/ +type V1CloudConfigsEdgeMachinePoolUpdateNoContent struct { +} + +func (o *V1CloudConfigsEdgeMachinePoolUpdateNoContent) Error() string { + return fmt.Sprintf("[PUT /v1/cloudconfigs/edge/{configUid}/machinePools/{machinePoolName}][%d] v1CloudConfigsEdgeMachinePoolUpdateNoContent ", 204) +} + +func (o *V1CloudConfigsEdgeMachinePoolUpdateNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_cloud_configs_edge_native_get_parameters.go b/api/client/v1/v1_cloud_configs_edge_native_get_parameters.go new file mode 100644 index 00000000..7b3a4ce9 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_edge_native_get_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1CloudConfigsEdgeNativeGetParams creates a new V1CloudConfigsEdgeNativeGetParams object +// with the default values initialized. +func NewV1CloudConfigsEdgeNativeGetParams() *V1CloudConfigsEdgeNativeGetParams { + var () + return &V1CloudConfigsEdgeNativeGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudConfigsEdgeNativeGetParamsWithTimeout creates a new V1CloudConfigsEdgeNativeGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudConfigsEdgeNativeGetParamsWithTimeout(timeout time.Duration) *V1CloudConfigsEdgeNativeGetParams { + var () + return &V1CloudConfigsEdgeNativeGetParams{ + + timeout: timeout, + } +} + +// NewV1CloudConfigsEdgeNativeGetParamsWithContext creates a new V1CloudConfigsEdgeNativeGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudConfigsEdgeNativeGetParamsWithContext(ctx context.Context) *V1CloudConfigsEdgeNativeGetParams { + var () + return &V1CloudConfigsEdgeNativeGetParams{ + + Context: ctx, + } +} + +// NewV1CloudConfigsEdgeNativeGetParamsWithHTTPClient creates a new V1CloudConfigsEdgeNativeGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudConfigsEdgeNativeGetParamsWithHTTPClient(client *http.Client) *V1CloudConfigsEdgeNativeGetParams { + var () + return &V1CloudConfigsEdgeNativeGetParams{ + HTTPClient: client, + } +} + +/* +V1CloudConfigsEdgeNativeGetParams contains all the parameters to send to the API endpoint +for the v1 cloud configs edge native get operation typically these are written to a http.Request +*/ +type V1CloudConfigsEdgeNativeGetParams struct { + + /*ConfigUID + Cluster's cloud config uid + + */ + ConfigUID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud configs edge native get params +func (o *V1CloudConfigsEdgeNativeGetParams) WithTimeout(timeout time.Duration) *V1CloudConfigsEdgeNativeGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud configs edge native get params +func (o *V1CloudConfigsEdgeNativeGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud configs edge native get params +func (o *V1CloudConfigsEdgeNativeGetParams) WithContext(ctx context.Context) *V1CloudConfigsEdgeNativeGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud configs edge native get params +func (o *V1CloudConfigsEdgeNativeGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud configs edge native get params +func (o *V1CloudConfigsEdgeNativeGetParams) WithHTTPClient(client *http.Client) *V1CloudConfigsEdgeNativeGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud configs edge native get params +func (o *V1CloudConfigsEdgeNativeGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithConfigUID adds the configUID to the v1 cloud configs edge native get params +func (o *V1CloudConfigsEdgeNativeGetParams) WithConfigUID(configUID string) *V1CloudConfigsEdgeNativeGetParams { + o.SetConfigUID(configUID) + return o +} + +// SetConfigUID adds the configUid to the v1 cloud configs edge native get params +func (o *V1CloudConfigsEdgeNativeGetParams) SetConfigUID(configUID string) { + o.ConfigUID = configUID +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudConfigsEdgeNativeGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param configUid + if err := r.SetPathParam("configUid", o.ConfigUID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_configs_edge_native_get_responses.go b/api/client/v1/v1_cloud_configs_edge_native_get_responses.go new file mode 100644 index 00000000..eea509ab --- /dev/null +++ b/api/client/v1/v1_cloud_configs_edge_native_get_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1CloudConfigsEdgeNativeGetReader is a Reader for the V1CloudConfigsEdgeNativeGet structure. +type V1CloudConfigsEdgeNativeGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudConfigsEdgeNativeGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1CloudConfigsEdgeNativeGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudConfigsEdgeNativeGetOK creates a V1CloudConfigsEdgeNativeGetOK with default headers values +func NewV1CloudConfigsEdgeNativeGetOK() *V1CloudConfigsEdgeNativeGetOK { + return &V1CloudConfigsEdgeNativeGetOK{} +} + +/* +V1CloudConfigsEdgeNativeGetOK handles this case with default header values. + +OK +*/ +type V1CloudConfigsEdgeNativeGetOK struct { + Payload *models.V1EdgeNativeCloudConfig +} + +func (o *V1CloudConfigsEdgeNativeGetOK) Error() string { + return fmt.Sprintf("[GET /v1/cloudconfigs/edge-native/{configUid}][%d] v1CloudConfigsEdgeNativeGetOK %+v", 200, o.Payload) +} + +func (o *V1CloudConfigsEdgeNativeGetOK) GetPayload() *models.V1EdgeNativeCloudConfig { + return o.Payload +} + +func (o *V1CloudConfigsEdgeNativeGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1EdgeNativeCloudConfig) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_cloud_configs_edge_native_machine_pool_create_parameters.go b/api/client/v1/v1_cloud_configs_edge_native_machine_pool_create_parameters.go new file mode 100644 index 00000000..63141c11 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_edge_native_machine_pool_create_parameters.go @@ -0,0 +1,157 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1CloudConfigsEdgeNativeMachinePoolCreateParams creates a new V1CloudConfigsEdgeNativeMachinePoolCreateParams object +// with the default values initialized. +func NewV1CloudConfigsEdgeNativeMachinePoolCreateParams() *V1CloudConfigsEdgeNativeMachinePoolCreateParams { + var () + return &V1CloudConfigsEdgeNativeMachinePoolCreateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudConfigsEdgeNativeMachinePoolCreateParamsWithTimeout creates a new V1CloudConfigsEdgeNativeMachinePoolCreateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudConfigsEdgeNativeMachinePoolCreateParamsWithTimeout(timeout time.Duration) *V1CloudConfigsEdgeNativeMachinePoolCreateParams { + var () + return &V1CloudConfigsEdgeNativeMachinePoolCreateParams{ + + timeout: timeout, + } +} + +// NewV1CloudConfigsEdgeNativeMachinePoolCreateParamsWithContext creates a new V1CloudConfigsEdgeNativeMachinePoolCreateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudConfigsEdgeNativeMachinePoolCreateParamsWithContext(ctx context.Context) *V1CloudConfigsEdgeNativeMachinePoolCreateParams { + var () + return &V1CloudConfigsEdgeNativeMachinePoolCreateParams{ + + Context: ctx, + } +} + +// NewV1CloudConfigsEdgeNativeMachinePoolCreateParamsWithHTTPClient creates a new V1CloudConfigsEdgeNativeMachinePoolCreateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudConfigsEdgeNativeMachinePoolCreateParamsWithHTTPClient(client *http.Client) *V1CloudConfigsEdgeNativeMachinePoolCreateParams { + var () + return &V1CloudConfigsEdgeNativeMachinePoolCreateParams{ + HTTPClient: client, + } +} + +/* +V1CloudConfigsEdgeNativeMachinePoolCreateParams contains all the parameters to send to the API endpoint +for the v1 cloud configs edge native machine pool create operation typically these are written to a http.Request +*/ +type V1CloudConfigsEdgeNativeMachinePoolCreateParams struct { + + /*Body*/ + Body *models.V1EdgeNativeMachinePoolConfigEntity + /*ConfigUID + Cluster's cloud config uid + + */ + ConfigUID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud configs edge native machine pool create params +func (o *V1CloudConfigsEdgeNativeMachinePoolCreateParams) WithTimeout(timeout time.Duration) *V1CloudConfigsEdgeNativeMachinePoolCreateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud configs edge native machine pool create params +func (o *V1CloudConfigsEdgeNativeMachinePoolCreateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud configs edge native machine pool create params +func (o *V1CloudConfigsEdgeNativeMachinePoolCreateParams) WithContext(ctx context.Context) *V1CloudConfigsEdgeNativeMachinePoolCreateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud configs edge native machine pool create params +func (o *V1CloudConfigsEdgeNativeMachinePoolCreateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud configs edge native machine pool create params +func (o *V1CloudConfigsEdgeNativeMachinePoolCreateParams) WithHTTPClient(client *http.Client) *V1CloudConfigsEdgeNativeMachinePoolCreateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud configs edge native machine pool create params +func (o *V1CloudConfigsEdgeNativeMachinePoolCreateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 cloud configs edge native machine pool create params +func (o *V1CloudConfigsEdgeNativeMachinePoolCreateParams) WithBody(body *models.V1EdgeNativeMachinePoolConfigEntity) *V1CloudConfigsEdgeNativeMachinePoolCreateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 cloud configs edge native machine pool create params +func (o *V1CloudConfigsEdgeNativeMachinePoolCreateParams) SetBody(body *models.V1EdgeNativeMachinePoolConfigEntity) { + o.Body = body +} + +// WithConfigUID adds the configUID to the v1 cloud configs edge native machine pool create params +func (o *V1CloudConfigsEdgeNativeMachinePoolCreateParams) WithConfigUID(configUID string) *V1CloudConfigsEdgeNativeMachinePoolCreateParams { + o.SetConfigUID(configUID) + return o +} + +// SetConfigUID adds the configUid to the v1 cloud configs edge native machine pool create params +func (o *V1CloudConfigsEdgeNativeMachinePoolCreateParams) SetConfigUID(configUID string) { + o.ConfigUID = configUID +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudConfigsEdgeNativeMachinePoolCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param configUid + if err := r.SetPathParam("configUid", o.ConfigUID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_configs_edge_native_machine_pool_create_responses.go b/api/client/v1/v1_cloud_configs_edge_native_machine_pool_create_responses.go new file mode 100644 index 00000000..ec6f17fa --- /dev/null +++ b/api/client/v1/v1_cloud_configs_edge_native_machine_pool_create_responses.go @@ -0,0 +1,77 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1CloudConfigsEdgeNativeMachinePoolCreateReader is a Reader for the V1CloudConfigsEdgeNativeMachinePoolCreate structure. +type V1CloudConfigsEdgeNativeMachinePoolCreateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudConfigsEdgeNativeMachinePoolCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 201: + result := NewV1CloudConfigsEdgeNativeMachinePoolCreateCreated() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudConfigsEdgeNativeMachinePoolCreateCreated creates a V1CloudConfigsEdgeNativeMachinePoolCreateCreated with default headers values +func NewV1CloudConfigsEdgeNativeMachinePoolCreateCreated() *V1CloudConfigsEdgeNativeMachinePoolCreateCreated { + return &V1CloudConfigsEdgeNativeMachinePoolCreateCreated{} +} + +/* +V1CloudConfigsEdgeNativeMachinePoolCreateCreated handles this case with default header values. + +Created successfully +*/ +type V1CloudConfigsEdgeNativeMachinePoolCreateCreated struct { + /*Audit uid for the request + */ + AuditUID string + + Payload *models.V1UID +} + +func (o *V1CloudConfigsEdgeNativeMachinePoolCreateCreated) Error() string { + return fmt.Sprintf("[POST /v1/cloudconfigs/edge-native/{configUid}/machinePools][%d] v1CloudConfigsEdgeNativeMachinePoolCreateCreated %+v", 201, o.Payload) +} + +func (o *V1CloudConfigsEdgeNativeMachinePoolCreateCreated) GetPayload() *models.V1UID { + return o.Payload +} + +func (o *V1CloudConfigsEdgeNativeMachinePoolCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header AuditUid + o.AuditUID = response.GetHeader("AuditUid") + + o.Payload = new(models.V1UID) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_cloud_configs_edge_native_machine_pool_delete_parameters.go b/api/client/v1/v1_cloud_configs_edge_native_machine_pool_delete_parameters.go new file mode 100644 index 00000000..1cef8911 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_edge_native_machine_pool_delete_parameters.go @@ -0,0 +1,157 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1CloudConfigsEdgeNativeMachinePoolDeleteParams creates a new V1CloudConfigsEdgeNativeMachinePoolDeleteParams object +// with the default values initialized. +func NewV1CloudConfigsEdgeNativeMachinePoolDeleteParams() *V1CloudConfigsEdgeNativeMachinePoolDeleteParams { + var () + return &V1CloudConfigsEdgeNativeMachinePoolDeleteParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudConfigsEdgeNativeMachinePoolDeleteParamsWithTimeout creates a new V1CloudConfigsEdgeNativeMachinePoolDeleteParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudConfigsEdgeNativeMachinePoolDeleteParamsWithTimeout(timeout time.Duration) *V1CloudConfigsEdgeNativeMachinePoolDeleteParams { + var () + return &V1CloudConfigsEdgeNativeMachinePoolDeleteParams{ + + timeout: timeout, + } +} + +// NewV1CloudConfigsEdgeNativeMachinePoolDeleteParamsWithContext creates a new V1CloudConfigsEdgeNativeMachinePoolDeleteParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudConfigsEdgeNativeMachinePoolDeleteParamsWithContext(ctx context.Context) *V1CloudConfigsEdgeNativeMachinePoolDeleteParams { + var () + return &V1CloudConfigsEdgeNativeMachinePoolDeleteParams{ + + Context: ctx, + } +} + +// NewV1CloudConfigsEdgeNativeMachinePoolDeleteParamsWithHTTPClient creates a new V1CloudConfigsEdgeNativeMachinePoolDeleteParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudConfigsEdgeNativeMachinePoolDeleteParamsWithHTTPClient(client *http.Client) *V1CloudConfigsEdgeNativeMachinePoolDeleteParams { + var () + return &V1CloudConfigsEdgeNativeMachinePoolDeleteParams{ + HTTPClient: client, + } +} + +/* +V1CloudConfigsEdgeNativeMachinePoolDeleteParams contains all the parameters to send to the API endpoint +for the v1 cloud configs edge native machine pool delete operation typically these are written to a http.Request +*/ +type V1CloudConfigsEdgeNativeMachinePoolDeleteParams struct { + + /*ConfigUID + Cluster's cloud config uid + + */ + ConfigUID string + /*MachinePoolName + Machine pool name + + */ + MachinePoolName string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud configs edge native machine pool delete params +func (o *V1CloudConfigsEdgeNativeMachinePoolDeleteParams) WithTimeout(timeout time.Duration) *V1CloudConfigsEdgeNativeMachinePoolDeleteParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud configs edge native machine pool delete params +func (o *V1CloudConfigsEdgeNativeMachinePoolDeleteParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud configs edge native machine pool delete params +func (o *V1CloudConfigsEdgeNativeMachinePoolDeleteParams) WithContext(ctx context.Context) *V1CloudConfigsEdgeNativeMachinePoolDeleteParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud configs edge native machine pool delete params +func (o *V1CloudConfigsEdgeNativeMachinePoolDeleteParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud configs edge native machine pool delete params +func (o *V1CloudConfigsEdgeNativeMachinePoolDeleteParams) WithHTTPClient(client *http.Client) *V1CloudConfigsEdgeNativeMachinePoolDeleteParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud configs edge native machine pool delete params +func (o *V1CloudConfigsEdgeNativeMachinePoolDeleteParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithConfigUID adds the configUID to the v1 cloud configs edge native machine pool delete params +func (o *V1CloudConfigsEdgeNativeMachinePoolDeleteParams) WithConfigUID(configUID string) *V1CloudConfigsEdgeNativeMachinePoolDeleteParams { + o.SetConfigUID(configUID) + return o +} + +// SetConfigUID adds the configUid to the v1 cloud configs edge native machine pool delete params +func (o *V1CloudConfigsEdgeNativeMachinePoolDeleteParams) SetConfigUID(configUID string) { + o.ConfigUID = configUID +} + +// WithMachinePoolName adds the machinePoolName to the v1 cloud configs edge native machine pool delete params +func (o *V1CloudConfigsEdgeNativeMachinePoolDeleteParams) WithMachinePoolName(machinePoolName string) *V1CloudConfigsEdgeNativeMachinePoolDeleteParams { + o.SetMachinePoolName(machinePoolName) + return o +} + +// SetMachinePoolName adds the machinePoolName to the v1 cloud configs edge native machine pool delete params +func (o *V1CloudConfigsEdgeNativeMachinePoolDeleteParams) SetMachinePoolName(machinePoolName string) { + o.MachinePoolName = machinePoolName +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudConfigsEdgeNativeMachinePoolDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param configUid + if err := r.SetPathParam("configUid", o.ConfigUID); err != nil { + return err + } + + // path param machinePoolName + if err := r.SetPathParam("machinePoolName", o.MachinePoolName); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_configs_edge_native_machine_pool_delete_responses.go b/api/client/v1/v1_cloud_configs_edge_native_machine_pool_delete_responses.go new file mode 100644 index 00000000..e5c6ccf1 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_edge_native_machine_pool_delete_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1CloudConfigsEdgeNativeMachinePoolDeleteReader is a Reader for the V1CloudConfigsEdgeNativeMachinePoolDelete structure. +type V1CloudConfigsEdgeNativeMachinePoolDeleteReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudConfigsEdgeNativeMachinePoolDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1CloudConfigsEdgeNativeMachinePoolDeleteNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudConfigsEdgeNativeMachinePoolDeleteNoContent creates a V1CloudConfigsEdgeNativeMachinePoolDeleteNoContent with default headers values +func NewV1CloudConfigsEdgeNativeMachinePoolDeleteNoContent() *V1CloudConfigsEdgeNativeMachinePoolDeleteNoContent { + return &V1CloudConfigsEdgeNativeMachinePoolDeleteNoContent{} +} + +/* +V1CloudConfigsEdgeNativeMachinePoolDeleteNoContent handles this case with default header values. + +The resource was deleted successfully +*/ +type V1CloudConfigsEdgeNativeMachinePoolDeleteNoContent struct { +} + +func (o *V1CloudConfigsEdgeNativeMachinePoolDeleteNoContent) Error() string { + return fmt.Sprintf("[DELETE /v1/cloudconfigs/edge-native/{configUid}/machinePools/{machinePoolName}][%d] v1CloudConfigsEdgeNativeMachinePoolDeleteNoContent ", 204) +} + +func (o *V1CloudConfigsEdgeNativeMachinePoolDeleteNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_cloud_configs_edge_native_machine_pool_update_parameters.go b/api/client/v1/v1_cloud_configs_edge_native_machine_pool_update_parameters.go new file mode 100644 index 00000000..2242ec02 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_edge_native_machine_pool_update_parameters.go @@ -0,0 +1,178 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1CloudConfigsEdgeNativeMachinePoolUpdateParams creates a new V1CloudConfigsEdgeNativeMachinePoolUpdateParams object +// with the default values initialized. +func NewV1CloudConfigsEdgeNativeMachinePoolUpdateParams() *V1CloudConfigsEdgeNativeMachinePoolUpdateParams { + var () + return &V1CloudConfigsEdgeNativeMachinePoolUpdateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudConfigsEdgeNativeMachinePoolUpdateParamsWithTimeout creates a new V1CloudConfigsEdgeNativeMachinePoolUpdateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudConfigsEdgeNativeMachinePoolUpdateParamsWithTimeout(timeout time.Duration) *V1CloudConfigsEdgeNativeMachinePoolUpdateParams { + var () + return &V1CloudConfigsEdgeNativeMachinePoolUpdateParams{ + + timeout: timeout, + } +} + +// NewV1CloudConfigsEdgeNativeMachinePoolUpdateParamsWithContext creates a new V1CloudConfigsEdgeNativeMachinePoolUpdateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudConfigsEdgeNativeMachinePoolUpdateParamsWithContext(ctx context.Context) *V1CloudConfigsEdgeNativeMachinePoolUpdateParams { + var () + return &V1CloudConfigsEdgeNativeMachinePoolUpdateParams{ + + Context: ctx, + } +} + +// NewV1CloudConfigsEdgeNativeMachinePoolUpdateParamsWithHTTPClient creates a new V1CloudConfigsEdgeNativeMachinePoolUpdateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudConfigsEdgeNativeMachinePoolUpdateParamsWithHTTPClient(client *http.Client) *V1CloudConfigsEdgeNativeMachinePoolUpdateParams { + var () + return &V1CloudConfigsEdgeNativeMachinePoolUpdateParams{ + HTTPClient: client, + } +} + +/* +V1CloudConfigsEdgeNativeMachinePoolUpdateParams contains all the parameters to send to the API endpoint +for the v1 cloud configs edge native machine pool update operation typically these are written to a http.Request +*/ +type V1CloudConfigsEdgeNativeMachinePoolUpdateParams struct { + + /*Body*/ + Body *models.V1EdgeNativeMachinePoolConfigEntity + /*ConfigUID + Cluster's cloud config uid + + */ + ConfigUID string + /*MachinePoolName + Machine pool name + + */ + MachinePoolName string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud configs edge native machine pool update params +func (o *V1CloudConfigsEdgeNativeMachinePoolUpdateParams) WithTimeout(timeout time.Duration) *V1CloudConfigsEdgeNativeMachinePoolUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud configs edge native machine pool update params +func (o *V1CloudConfigsEdgeNativeMachinePoolUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud configs edge native machine pool update params +func (o *V1CloudConfigsEdgeNativeMachinePoolUpdateParams) WithContext(ctx context.Context) *V1CloudConfigsEdgeNativeMachinePoolUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud configs edge native machine pool update params +func (o *V1CloudConfigsEdgeNativeMachinePoolUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud configs edge native machine pool update params +func (o *V1CloudConfigsEdgeNativeMachinePoolUpdateParams) WithHTTPClient(client *http.Client) *V1CloudConfigsEdgeNativeMachinePoolUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud configs edge native machine pool update params +func (o *V1CloudConfigsEdgeNativeMachinePoolUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 cloud configs edge native machine pool update params +func (o *V1CloudConfigsEdgeNativeMachinePoolUpdateParams) WithBody(body *models.V1EdgeNativeMachinePoolConfigEntity) *V1CloudConfigsEdgeNativeMachinePoolUpdateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 cloud configs edge native machine pool update params +func (o *V1CloudConfigsEdgeNativeMachinePoolUpdateParams) SetBody(body *models.V1EdgeNativeMachinePoolConfigEntity) { + o.Body = body +} + +// WithConfigUID adds the configUID to the v1 cloud configs edge native machine pool update params +func (o *V1CloudConfigsEdgeNativeMachinePoolUpdateParams) WithConfigUID(configUID string) *V1CloudConfigsEdgeNativeMachinePoolUpdateParams { + o.SetConfigUID(configUID) + return o +} + +// SetConfigUID adds the configUid to the v1 cloud configs edge native machine pool update params +func (o *V1CloudConfigsEdgeNativeMachinePoolUpdateParams) SetConfigUID(configUID string) { + o.ConfigUID = configUID +} + +// WithMachinePoolName adds the machinePoolName to the v1 cloud configs edge native machine pool update params +func (o *V1CloudConfigsEdgeNativeMachinePoolUpdateParams) WithMachinePoolName(machinePoolName string) *V1CloudConfigsEdgeNativeMachinePoolUpdateParams { + o.SetMachinePoolName(machinePoolName) + return o +} + +// SetMachinePoolName adds the machinePoolName to the v1 cloud configs edge native machine pool update params +func (o *V1CloudConfigsEdgeNativeMachinePoolUpdateParams) SetMachinePoolName(machinePoolName string) { + o.MachinePoolName = machinePoolName +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudConfigsEdgeNativeMachinePoolUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param configUid + if err := r.SetPathParam("configUid", o.ConfigUID); err != nil { + return err + } + + // path param machinePoolName + if err := r.SetPathParam("machinePoolName", o.MachinePoolName); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_configs_edge_native_machine_pool_update_responses.go b/api/client/v1/v1_cloud_configs_edge_native_machine_pool_update_responses.go new file mode 100644 index 00000000..60472282 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_edge_native_machine_pool_update_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1CloudConfigsEdgeNativeMachinePoolUpdateReader is a Reader for the V1CloudConfigsEdgeNativeMachinePoolUpdate structure. +type V1CloudConfigsEdgeNativeMachinePoolUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudConfigsEdgeNativeMachinePoolUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1CloudConfigsEdgeNativeMachinePoolUpdateNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudConfigsEdgeNativeMachinePoolUpdateNoContent creates a V1CloudConfigsEdgeNativeMachinePoolUpdateNoContent with default headers values +func NewV1CloudConfigsEdgeNativeMachinePoolUpdateNoContent() *V1CloudConfigsEdgeNativeMachinePoolUpdateNoContent { + return &V1CloudConfigsEdgeNativeMachinePoolUpdateNoContent{} +} + +/* +V1CloudConfigsEdgeNativeMachinePoolUpdateNoContent handles this case with default header values. + +The resource was updated successfully +*/ +type V1CloudConfigsEdgeNativeMachinePoolUpdateNoContent struct { +} + +func (o *V1CloudConfigsEdgeNativeMachinePoolUpdateNoContent) Error() string { + return fmt.Sprintf("[PUT /v1/cloudconfigs/edge-native/{configUid}/machinePools/{machinePoolName}][%d] v1CloudConfigsEdgeNativeMachinePoolUpdateNoContent ", 204) +} + +func (o *V1CloudConfigsEdgeNativeMachinePoolUpdateNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_cloud_configs_edge_native_pool_machines_add_parameters.go b/api/client/v1/v1_cloud_configs_edge_native_pool_machines_add_parameters.go new file mode 100644 index 00000000..e0383e6e --- /dev/null +++ b/api/client/v1/v1_cloud_configs_edge_native_pool_machines_add_parameters.go @@ -0,0 +1,178 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1CloudConfigsEdgeNativePoolMachinesAddParams creates a new V1CloudConfigsEdgeNativePoolMachinesAddParams object +// with the default values initialized. +func NewV1CloudConfigsEdgeNativePoolMachinesAddParams() *V1CloudConfigsEdgeNativePoolMachinesAddParams { + var () + return &V1CloudConfigsEdgeNativePoolMachinesAddParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudConfigsEdgeNativePoolMachinesAddParamsWithTimeout creates a new V1CloudConfigsEdgeNativePoolMachinesAddParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudConfigsEdgeNativePoolMachinesAddParamsWithTimeout(timeout time.Duration) *V1CloudConfigsEdgeNativePoolMachinesAddParams { + var () + return &V1CloudConfigsEdgeNativePoolMachinesAddParams{ + + timeout: timeout, + } +} + +// NewV1CloudConfigsEdgeNativePoolMachinesAddParamsWithContext creates a new V1CloudConfigsEdgeNativePoolMachinesAddParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudConfigsEdgeNativePoolMachinesAddParamsWithContext(ctx context.Context) *V1CloudConfigsEdgeNativePoolMachinesAddParams { + var () + return &V1CloudConfigsEdgeNativePoolMachinesAddParams{ + + Context: ctx, + } +} + +// NewV1CloudConfigsEdgeNativePoolMachinesAddParamsWithHTTPClient creates a new V1CloudConfigsEdgeNativePoolMachinesAddParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudConfigsEdgeNativePoolMachinesAddParamsWithHTTPClient(client *http.Client) *V1CloudConfigsEdgeNativePoolMachinesAddParams { + var () + return &V1CloudConfigsEdgeNativePoolMachinesAddParams{ + HTTPClient: client, + } +} + +/* +V1CloudConfigsEdgeNativePoolMachinesAddParams contains all the parameters to send to the API endpoint +for the v1 cloud configs edge native pool machines add operation typically these are written to a http.Request +*/ +type V1CloudConfigsEdgeNativePoolMachinesAddParams struct { + + /*Body*/ + Body *models.V1EdgeNativeMachine + /*ConfigUID + Cluster's cloud config uid + + */ + ConfigUID string + /*MachinePoolName + Machine pool name + + */ + MachinePoolName string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud configs edge native pool machines add params +func (o *V1CloudConfigsEdgeNativePoolMachinesAddParams) WithTimeout(timeout time.Duration) *V1CloudConfigsEdgeNativePoolMachinesAddParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud configs edge native pool machines add params +func (o *V1CloudConfigsEdgeNativePoolMachinesAddParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud configs edge native pool machines add params +func (o *V1CloudConfigsEdgeNativePoolMachinesAddParams) WithContext(ctx context.Context) *V1CloudConfigsEdgeNativePoolMachinesAddParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud configs edge native pool machines add params +func (o *V1CloudConfigsEdgeNativePoolMachinesAddParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud configs edge native pool machines add params +func (o *V1CloudConfigsEdgeNativePoolMachinesAddParams) WithHTTPClient(client *http.Client) *V1CloudConfigsEdgeNativePoolMachinesAddParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud configs edge native pool machines add params +func (o *V1CloudConfigsEdgeNativePoolMachinesAddParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 cloud configs edge native pool machines add params +func (o *V1CloudConfigsEdgeNativePoolMachinesAddParams) WithBody(body *models.V1EdgeNativeMachine) *V1CloudConfigsEdgeNativePoolMachinesAddParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 cloud configs edge native pool machines add params +func (o *V1CloudConfigsEdgeNativePoolMachinesAddParams) SetBody(body *models.V1EdgeNativeMachine) { + o.Body = body +} + +// WithConfigUID adds the configUID to the v1 cloud configs edge native pool machines add params +func (o *V1CloudConfigsEdgeNativePoolMachinesAddParams) WithConfigUID(configUID string) *V1CloudConfigsEdgeNativePoolMachinesAddParams { + o.SetConfigUID(configUID) + return o +} + +// SetConfigUID adds the configUid to the v1 cloud configs edge native pool machines add params +func (o *V1CloudConfigsEdgeNativePoolMachinesAddParams) SetConfigUID(configUID string) { + o.ConfigUID = configUID +} + +// WithMachinePoolName adds the machinePoolName to the v1 cloud configs edge native pool machines add params +func (o *V1CloudConfigsEdgeNativePoolMachinesAddParams) WithMachinePoolName(machinePoolName string) *V1CloudConfigsEdgeNativePoolMachinesAddParams { + o.SetMachinePoolName(machinePoolName) + return o +} + +// SetMachinePoolName adds the machinePoolName to the v1 cloud configs edge native pool machines add params +func (o *V1CloudConfigsEdgeNativePoolMachinesAddParams) SetMachinePoolName(machinePoolName string) { + o.MachinePoolName = machinePoolName +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudConfigsEdgeNativePoolMachinesAddParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param configUid + if err := r.SetPathParam("configUid", o.ConfigUID); err != nil { + return err + } + + // path param machinePoolName + if err := r.SetPathParam("machinePoolName", o.MachinePoolName); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_configs_edge_native_pool_machines_add_responses.go b/api/client/v1/v1_cloud_configs_edge_native_pool_machines_add_responses.go new file mode 100644 index 00000000..378b5778 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_edge_native_pool_machines_add_responses.go @@ -0,0 +1,77 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1CloudConfigsEdgeNativePoolMachinesAddReader is a Reader for the V1CloudConfigsEdgeNativePoolMachinesAdd structure. +type V1CloudConfigsEdgeNativePoolMachinesAddReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudConfigsEdgeNativePoolMachinesAddReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 201: + result := NewV1CloudConfigsEdgeNativePoolMachinesAddCreated() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudConfigsEdgeNativePoolMachinesAddCreated creates a V1CloudConfigsEdgeNativePoolMachinesAddCreated with default headers values +func NewV1CloudConfigsEdgeNativePoolMachinesAddCreated() *V1CloudConfigsEdgeNativePoolMachinesAddCreated { + return &V1CloudConfigsEdgeNativePoolMachinesAddCreated{} +} + +/* +V1CloudConfigsEdgeNativePoolMachinesAddCreated handles this case with default header values. + +Created successfully +*/ +type V1CloudConfigsEdgeNativePoolMachinesAddCreated struct { + /*Audit uid for the request + */ + AuditUID string + + Payload *models.V1UID +} + +func (o *V1CloudConfigsEdgeNativePoolMachinesAddCreated) Error() string { + return fmt.Sprintf("[POST /v1/cloudconfigs/edge-native/{configUid}/machinePools/{machinePoolName}/machines][%d] v1CloudConfigsEdgeNativePoolMachinesAddCreated %+v", 201, o.Payload) +} + +func (o *V1CloudConfigsEdgeNativePoolMachinesAddCreated) GetPayload() *models.V1UID { + return o.Payload +} + +func (o *V1CloudConfigsEdgeNativePoolMachinesAddCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header AuditUid + o.AuditUID = response.GetHeader("AuditUid") + + o.Payload = new(models.V1UID) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_cloud_configs_edge_native_pool_machines_list_parameters.go b/api/client/v1/v1_cloud_configs_edge_native_pool_machines_list_parameters.go new file mode 100644 index 00000000..26d3def8 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_edge_native_pool_machines_list_parameters.go @@ -0,0 +1,157 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1CloudConfigsEdgeNativePoolMachinesListParams creates a new V1CloudConfigsEdgeNativePoolMachinesListParams object +// with the default values initialized. +func NewV1CloudConfigsEdgeNativePoolMachinesListParams() *V1CloudConfigsEdgeNativePoolMachinesListParams { + var () + return &V1CloudConfigsEdgeNativePoolMachinesListParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudConfigsEdgeNativePoolMachinesListParamsWithTimeout creates a new V1CloudConfigsEdgeNativePoolMachinesListParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudConfigsEdgeNativePoolMachinesListParamsWithTimeout(timeout time.Duration) *V1CloudConfigsEdgeNativePoolMachinesListParams { + var () + return &V1CloudConfigsEdgeNativePoolMachinesListParams{ + + timeout: timeout, + } +} + +// NewV1CloudConfigsEdgeNativePoolMachinesListParamsWithContext creates a new V1CloudConfigsEdgeNativePoolMachinesListParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudConfigsEdgeNativePoolMachinesListParamsWithContext(ctx context.Context) *V1CloudConfigsEdgeNativePoolMachinesListParams { + var () + return &V1CloudConfigsEdgeNativePoolMachinesListParams{ + + Context: ctx, + } +} + +// NewV1CloudConfigsEdgeNativePoolMachinesListParamsWithHTTPClient creates a new V1CloudConfigsEdgeNativePoolMachinesListParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudConfigsEdgeNativePoolMachinesListParamsWithHTTPClient(client *http.Client) *V1CloudConfigsEdgeNativePoolMachinesListParams { + var () + return &V1CloudConfigsEdgeNativePoolMachinesListParams{ + HTTPClient: client, + } +} + +/* +V1CloudConfigsEdgeNativePoolMachinesListParams contains all the parameters to send to the API endpoint +for the v1 cloud configs edge native pool machines list operation typically these are written to a http.Request +*/ +type V1CloudConfigsEdgeNativePoolMachinesListParams struct { + + /*ConfigUID + Cluster's cloud config uid + + */ + ConfigUID string + /*MachinePoolName + Machine pool name + + */ + MachinePoolName string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud configs edge native pool machines list params +func (o *V1CloudConfigsEdgeNativePoolMachinesListParams) WithTimeout(timeout time.Duration) *V1CloudConfigsEdgeNativePoolMachinesListParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud configs edge native pool machines list params +func (o *V1CloudConfigsEdgeNativePoolMachinesListParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud configs edge native pool machines list params +func (o *V1CloudConfigsEdgeNativePoolMachinesListParams) WithContext(ctx context.Context) *V1CloudConfigsEdgeNativePoolMachinesListParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud configs edge native pool machines list params +func (o *V1CloudConfigsEdgeNativePoolMachinesListParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud configs edge native pool machines list params +func (o *V1CloudConfigsEdgeNativePoolMachinesListParams) WithHTTPClient(client *http.Client) *V1CloudConfigsEdgeNativePoolMachinesListParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud configs edge native pool machines list params +func (o *V1CloudConfigsEdgeNativePoolMachinesListParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithConfigUID adds the configUID to the v1 cloud configs edge native pool machines list params +func (o *V1CloudConfigsEdgeNativePoolMachinesListParams) WithConfigUID(configUID string) *V1CloudConfigsEdgeNativePoolMachinesListParams { + o.SetConfigUID(configUID) + return o +} + +// SetConfigUID adds the configUid to the v1 cloud configs edge native pool machines list params +func (o *V1CloudConfigsEdgeNativePoolMachinesListParams) SetConfigUID(configUID string) { + o.ConfigUID = configUID +} + +// WithMachinePoolName adds the machinePoolName to the v1 cloud configs edge native pool machines list params +func (o *V1CloudConfigsEdgeNativePoolMachinesListParams) WithMachinePoolName(machinePoolName string) *V1CloudConfigsEdgeNativePoolMachinesListParams { + o.SetMachinePoolName(machinePoolName) + return o +} + +// SetMachinePoolName adds the machinePoolName to the v1 cloud configs edge native pool machines list params +func (o *V1CloudConfigsEdgeNativePoolMachinesListParams) SetMachinePoolName(machinePoolName string) { + o.MachinePoolName = machinePoolName +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudConfigsEdgeNativePoolMachinesListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param configUid + if err := r.SetPathParam("configUid", o.ConfigUID); err != nil { + return err + } + + // path param machinePoolName + if err := r.SetPathParam("machinePoolName", o.MachinePoolName); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_configs_edge_native_pool_machines_list_responses.go b/api/client/v1/v1_cloud_configs_edge_native_pool_machines_list_responses.go new file mode 100644 index 00000000..1036d416 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_edge_native_pool_machines_list_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1CloudConfigsEdgeNativePoolMachinesListReader is a Reader for the V1CloudConfigsEdgeNativePoolMachinesList structure. +type V1CloudConfigsEdgeNativePoolMachinesListReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudConfigsEdgeNativePoolMachinesListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1CloudConfigsEdgeNativePoolMachinesListOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudConfigsEdgeNativePoolMachinesListOK creates a V1CloudConfigsEdgeNativePoolMachinesListOK with default headers values +func NewV1CloudConfigsEdgeNativePoolMachinesListOK() *V1CloudConfigsEdgeNativePoolMachinesListOK { + return &V1CloudConfigsEdgeNativePoolMachinesListOK{} +} + +/* +V1CloudConfigsEdgeNativePoolMachinesListOK handles this case with default header values. + +An array of edge-native machine items +*/ +type V1CloudConfigsEdgeNativePoolMachinesListOK struct { + Payload *models.V1EdgeNativeMachines +} + +func (o *V1CloudConfigsEdgeNativePoolMachinesListOK) Error() string { + return fmt.Sprintf("[GET /v1/cloudconfigs/edge-native/{configUid}/machinePools/{machinePoolName}/machines][%d] v1CloudConfigsEdgeNativePoolMachinesListOK %+v", 200, o.Payload) +} + +func (o *V1CloudConfigsEdgeNativePoolMachinesListOK) GetPayload() *models.V1EdgeNativeMachines { + return o.Payload +} + +func (o *V1CloudConfigsEdgeNativePoolMachinesListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1EdgeNativeMachines) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_cloud_configs_edge_native_pool_machines_uid_delete_parameters.go b/api/client/v1/v1_cloud_configs_edge_native_pool_machines_uid_delete_parameters.go new file mode 100644 index 00000000..c5109982 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_edge_native_pool_machines_uid_delete_parameters.go @@ -0,0 +1,178 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1CloudConfigsEdgeNativePoolMachinesUIDDeleteParams creates a new V1CloudConfigsEdgeNativePoolMachinesUIDDeleteParams object +// with the default values initialized. +func NewV1CloudConfigsEdgeNativePoolMachinesUIDDeleteParams() *V1CloudConfigsEdgeNativePoolMachinesUIDDeleteParams { + var () + return &V1CloudConfigsEdgeNativePoolMachinesUIDDeleteParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudConfigsEdgeNativePoolMachinesUIDDeleteParamsWithTimeout creates a new V1CloudConfigsEdgeNativePoolMachinesUIDDeleteParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudConfigsEdgeNativePoolMachinesUIDDeleteParamsWithTimeout(timeout time.Duration) *V1CloudConfigsEdgeNativePoolMachinesUIDDeleteParams { + var () + return &V1CloudConfigsEdgeNativePoolMachinesUIDDeleteParams{ + + timeout: timeout, + } +} + +// NewV1CloudConfigsEdgeNativePoolMachinesUIDDeleteParamsWithContext creates a new V1CloudConfigsEdgeNativePoolMachinesUIDDeleteParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudConfigsEdgeNativePoolMachinesUIDDeleteParamsWithContext(ctx context.Context) *V1CloudConfigsEdgeNativePoolMachinesUIDDeleteParams { + var () + return &V1CloudConfigsEdgeNativePoolMachinesUIDDeleteParams{ + + Context: ctx, + } +} + +// NewV1CloudConfigsEdgeNativePoolMachinesUIDDeleteParamsWithHTTPClient creates a new V1CloudConfigsEdgeNativePoolMachinesUIDDeleteParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudConfigsEdgeNativePoolMachinesUIDDeleteParamsWithHTTPClient(client *http.Client) *V1CloudConfigsEdgeNativePoolMachinesUIDDeleteParams { + var () + return &V1CloudConfigsEdgeNativePoolMachinesUIDDeleteParams{ + HTTPClient: client, + } +} + +/* +V1CloudConfigsEdgeNativePoolMachinesUIDDeleteParams contains all the parameters to send to the API endpoint +for the v1 cloud configs edge native pool machines Uid delete operation typically these are written to a http.Request +*/ +type V1CloudConfigsEdgeNativePoolMachinesUIDDeleteParams struct { + + /*ConfigUID + Cluster's cloud config uid + + */ + ConfigUID string + /*MachinePoolName + Machine pool name + + */ + MachinePoolName string + /*MachineUID + Machine uid + + */ + MachineUID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud configs edge native pool machines Uid delete params +func (o *V1CloudConfigsEdgeNativePoolMachinesUIDDeleteParams) WithTimeout(timeout time.Duration) *V1CloudConfigsEdgeNativePoolMachinesUIDDeleteParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud configs edge native pool machines Uid delete params +func (o *V1CloudConfigsEdgeNativePoolMachinesUIDDeleteParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud configs edge native pool machines Uid delete params +func (o *V1CloudConfigsEdgeNativePoolMachinesUIDDeleteParams) WithContext(ctx context.Context) *V1CloudConfigsEdgeNativePoolMachinesUIDDeleteParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud configs edge native pool machines Uid delete params +func (o *V1CloudConfigsEdgeNativePoolMachinesUIDDeleteParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud configs edge native pool machines Uid delete params +func (o *V1CloudConfigsEdgeNativePoolMachinesUIDDeleteParams) WithHTTPClient(client *http.Client) *V1CloudConfigsEdgeNativePoolMachinesUIDDeleteParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud configs edge native pool machines Uid delete params +func (o *V1CloudConfigsEdgeNativePoolMachinesUIDDeleteParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithConfigUID adds the configUID to the v1 cloud configs edge native pool machines Uid delete params +func (o *V1CloudConfigsEdgeNativePoolMachinesUIDDeleteParams) WithConfigUID(configUID string) *V1CloudConfigsEdgeNativePoolMachinesUIDDeleteParams { + o.SetConfigUID(configUID) + return o +} + +// SetConfigUID adds the configUid to the v1 cloud configs edge native pool machines Uid delete params +func (o *V1CloudConfigsEdgeNativePoolMachinesUIDDeleteParams) SetConfigUID(configUID string) { + o.ConfigUID = configUID +} + +// WithMachinePoolName adds the machinePoolName to the v1 cloud configs edge native pool machines Uid delete params +func (o *V1CloudConfigsEdgeNativePoolMachinesUIDDeleteParams) WithMachinePoolName(machinePoolName string) *V1CloudConfigsEdgeNativePoolMachinesUIDDeleteParams { + o.SetMachinePoolName(machinePoolName) + return o +} + +// SetMachinePoolName adds the machinePoolName to the v1 cloud configs edge native pool machines Uid delete params +func (o *V1CloudConfigsEdgeNativePoolMachinesUIDDeleteParams) SetMachinePoolName(machinePoolName string) { + o.MachinePoolName = machinePoolName +} + +// WithMachineUID adds the machineUID to the v1 cloud configs edge native pool machines Uid delete params +func (o *V1CloudConfigsEdgeNativePoolMachinesUIDDeleteParams) WithMachineUID(machineUID string) *V1CloudConfigsEdgeNativePoolMachinesUIDDeleteParams { + o.SetMachineUID(machineUID) + return o +} + +// SetMachineUID adds the machineUid to the v1 cloud configs edge native pool machines Uid delete params +func (o *V1CloudConfigsEdgeNativePoolMachinesUIDDeleteParams) SetMachineUID(machineUID string) { + o.MachineUID = machineUID +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudConfigsEdgeNativePoolMachinesUIDDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param configUid + if err := r.SetPathParam("configUid", o.ConfigUID); err != nil { + return err + } + + // path param machinePoolName + if err := r.SetPathParam("machinePoolName", o.MachinePoolName); err != nil { + return err + } + + // path param machineUid + if err := r.SetPathParam("machineUid", o.MachineUID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_configs_edge_native_pool_machines_uid_delete_responses.go b/api/client/v1/v1_cloud_configs_edge_native_pool_machines_uid_delete_responses.go new file mode 100644 index 00000000..c96726e3 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_edge_native_pool_machines_uid_delete_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1CloudConfigsEdgeNativePoolMachinesUIDDeleteReader is a Reader for the V1CloudConfigsEdgeNativePoolMachinesUIDDelete structure. +type V1CloudConfigsEdgeNativePoolMachinesUIDDeleteReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudConfigsEdgeNativePoolMachinesUIDDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1CloudConfigsEdgeNativePoolMachinesUIDDeleteNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudConfigsEdgeNativePoolMachinesUIDDeleteNoContent creates a V1CloudConfigsEdgeNativePoolMachinesUIDDeleteNoContent with default headers values +func NewV1CloudConfigsEdgeNativePoolMachinesUIDDeleteNoContent() *V1CloudConfigsEdgeNativePoolMachinesUIDDeleteNoContent { + return &V1CloudConfigsEdgeNativePoolMachinesUIDDeleteNoContent{} +} + +/* +V1CloudConfigsEdgeNativePoolMachinesUIDDeleteNoContent handles this case with default header values. + +The resource was deleted successfully +*/ +type V1CloudConfigsEdgeNativePoolMachinesUIDDeleteNoContent struct { +} + +func (o *V1CloudConfigsEdgeNativePoolMachinesUIDDeleteNoContent) Error() string { + return fmt.Sprintf("[DELETE /v1/cloudconfigs/edge-native/{configUid}/machinePools/{machinePoolName}/machines/{machineUid}][%d] v1CloudConfigsEdgeNativePoolMachinesUidDeleteNoContent ", 204) +} + +func (o *V1CloudConfigsEdgeNativePoolMachinesUIDDeleteNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_cloud_configs_edge_native_pool_machines_uid_get_parameters.go b/api/client/v1/v1_cloud_configs_edge_native_pool_machines_uid_get_parameters.go new file mode 100644 index 00000000..14ef7dbb --- /dev/null +++ b/api/client/v1/v1_cloud_configs_edge_native_pool_machines_uid_get_parameters.go @@ -0,0 +1,178 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1CloudConfigsEdgeNativePoolMachinesUIDGetParams creates a new V1CloudConfigsEdgeNativePoolMachinesUIDGetParams object +// with the default values initialized. +func NewV1CloudConfigsEdgeNativePoolMachinesUIDGetParams() *V1CloudConfigsEdgeNativePoolMachinesUIDGetParams { + var () + return &V1CloudConfigsEdgeNativePoolMachinesUIDGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudConfigsEdgeNativePoolMachinesUIDGetParamsWithTimeout creates a new V1CloudConfigsEdgeNativePoolMachinesUIDGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudConfigsEdgeNativePoolMachinesUIDGetParamsWithTimeout(timeout time.Duration) *V1CloudConfigsEdgeNativePoolMachinesUIDGetParams { + var () + return &V1CloudConfigsEdgeNativePoolMachinesUIDGetParams{ + + timeout: timeout, + } +} + +// NewV1CloudConfigsEdgeNativePoolMachinesUIDGetParamsWithContext creates a new V1CloudConfigsEdgeNativePoolMachinesUIDGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudConfigsEdgeNativePoolMachinesUIDGetParamsWithContext(ctx context.Context) *V1CloudConfigsEdgeNativePoolMachinesUIDGetParams { + var () + return &V1CloudConfigsEdgeNativePoolMachinesUIDGetParams{ + + Context: ctx, + } +} + +// NewV1CloudConfigsEdgeNativePoolMachinesUIDGetParamsWithHTTPClient creates a new V1CloudConfigsEdgeNativePoolMachinesUIDGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudConfigsEdgeNativePoolMachinesUIDGetParamsWithHTTPClient(client *http.Client) *V1CloudConfigsEdgeNativePoolMachinesUIDGetParams { + var () + return &V1CloudConfigsEdgeNativePoolMachinesUIDGetParams{ + HTTPClient: client, + } +} + +/* +V1CloudConfigsEdgeNativePoolMachinesUIDGetParams contains all the parameters to send to the API endpoint +for the v1 cloud configs edge native pool machines Uid get operation typically these are written to a http.Request +*/ +type V1CloudConfigsEdgeNativePoolMachinesUIDGetParams struct { + + /*ConfigUID + Cluster's cloud config uid + + */ + ConfigUID string + /*MachinePoolName + Machine pool name + + */ + MachinePoolName string + /*MachineUID + Machine uid + + */ + MachineUID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud configs edge native pool machines Uid get params +func (o *V1CloudConfigsEdgeNativePoolMachinesUIDGetParams) WithTimeout(timeout time.Duration) *V1CloudConfigsEdgeNativePoolMachinesUIDGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud configs edge native pool machines Uid get params +func (o *V1CloudConfigsEdgeNativePoolMachinesUIDGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud configs edge native pool machines Uid get params +func (o *V1CloudConfigsEdgeNativePoolMachinesUIDGetParams) WithContext(ctx context.Context) *V1CloudConfigsEdgeNativePoolMachinesUIDGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud configs edge native pool machines Uid get params +func (o *V1CloudConfigsEdgeNativePoolMachinesUIDGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud configs edge native pool machines Uid get params +func (o *V1CloudConfigsEdgeNativePoolMachinesUIDGetParams) WithHTTPClient(client *http.Client) *V1CloudConfigsEdgeNativePoolMachinesUIDGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud configs edge native pool machines Uid get params +func (o *V1CloudConfigsEdgeNativePoolMachinesUIDGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithConfigUID adds the configUID to the v1 cloud configs edge native pool machines Uid get params +func (o *V1CloudConfigsEdgeNativePoolMachinesUIDGetParams) WithConfigUID(configUID string) *V1CloudConfigsEdgeNativePoolMachinesUIDGetParams { + o.SetConfigUID(configUID) + return o +} + +// SetConfigUID adds the configUid to the v1 cloud configs edge native pool machines Uid get params +func (o *V1CloudConfigsEdgeNativePoolMachinesUIDGetParams) SetConfigUID(configUID string) { + o.ConfigUID = configUID +} + +// WithMachinePoolName adds the machinePoolName to the v1 cloud configs edge native pool machines Uid get params +func (o *V1CloudConfigsEdgeNativePoolMachinesUIDGetParams) WithMachinePoolName(machinePoolName string) *V1CloudConfigsEdgeNativePoolMachinesUIDGetParams { + o.SetMachinePoolName(machinePoolName) + return o +} + +// SetMachinePoolName adds the machinePoolName to the v1 cloud configs edge native pool machines Uid get params +func (o *V1CloudConfigsEdgeNativePoolMachinesUIDGetParams) SetMachinePoolName(machinePoolName string) { + o.MachinePoolName = machinePoolName +} + +// WithMachineUID adds the machineUID to the v1 cloud configs edge native pool machines Uid get params +func (o *V1CloudConfigsEdgeNativePoolMachinesUIDGetParams) WithMachineUID(machineUID string) *V1CloudConfigsEdgeNativePoolMachinesUIDGetParams { + o.SetMachineUID(machineUID) + return o +} + +// SetMachineUID adds the machineUid to the v1 cloud configs edge native pool machines Uid get params +func (o *V1CloudConfigsEdgeNativePoolMachinesUIDGetParams) SetMachineUID(machineUID string) { + o.MachineUID = machineUID +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudConfigsEdgeNativePoolMachinesUIDGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param configUid + if err := r.SetPathParam("configUid", o.ConfigUID); err != nil { + return err + } + + // path param machinePoolName + if err := r.SetPathParam("machinePoolName", o.MachinePoolName); err != nil { + return err + } + + // path param machineUid + if err := r.SetPathParam("machineUid", o.MachineUID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_configs_edge_native_pool_machines_uid_get_responses.go b/api/client/v1/v1_cloud_configs_edge_native_pool_machines_uid_get_responses.go new file mode 100644 index 00000000..234dcacb --- /dev/null +++ b/api/client/v1/v1_cloud_configs_edge_native_pool_machines_uid_get_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1CloudConfigsEdgeNativePoolMachinesUIDGetReader is a Reader for the V1CloudConfigsEdgeNativePoolMachinesUIDGet structure. +type V1CloudConfigsEdgeNativePoolMachinesUIDGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudConfigsEdgeNativePoolMachinesUIDGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1CloudConfigsEdgeNativePoolMachinesUIDGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudConfigsEdgeNativePoolMachinesUIDGetOK creates a V1CloudConfigsEdgeNativePoolMachinesUIDGetOK with default headers values +func NewV1CloudConfigsEdgeNativePoolMachinesUIDGetOK() *V1CloudConfigsEdgeNativePoolMachinesUIDGetOK { + return &V1CloudConfigsEdgeNativePoolMachinesUIDGetOK{} +} + +/* +V1CloudConfigsEdgeNativePoolMachinesUIDGetOK handles this case with default header values. + +OK +*/ +type V1CloudConfigsEdgeNativePoolMachinesUIDGetOK struct { + Payload *models.V1EdgeNativeMachine +} + +func (o *V1CloudConfigsEdgeNativePoolMachinesUIDGetOK) Error() string { + return fmt.Sprintf("[GET /v1/cloudconfigs/edge-native/{configUid}/machinePools/{machinePoolName}/machines/{machineUid}][%d] v1CloudConfigsEdgeNativePoolMachinesUidGetOK %+v", 200, o.Payload) +} + +func (o *V1CloudConfigsEdgeNativePoolMachinesUIDGetOK) GetPayload() *models.V1EdgeNativeMachine { + return o.Payload +} + +func (o *V1CloudConfigsEdgeNativePoolMachinesUIDGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1EdgeNativeMachine) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_cloud_configs_edge_native_pool_machines_uid_update_parameters.go b/api/client/v1/v1_cloud_configs_edge_native_pool_machines_uid_update_parameters.go new file mode 100644 index 00000000..1b0566b5 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_edge_native_pool_machines_uid_update_parameters.go @@ -0,0 +1,199 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1CloudConfigsEdgeNativePoolMachinesUIDUpdateParams creates a new V1CloudConfigsEdgeNativePoolMachinesUIDUpdateParams object +// with the default values initialized. +func NewV1CloudConfigsEdgeNativePoolMachinesUIDUpdateParams() *V1CloudConfigsEdgeNativePoolMachinesUIDUpdateParams { + var () + return &V1CloudConfigsEdgeNativePoolMachinesUIDUpdateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudConfigsEdgeNativePoolMachinesUIDUpdateParamsWithTimeout creates a new V1CloudConfigsEdgeNativePoolMachinesUIDUpdateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudConfigsEdgeNativePoolMachinesUIDUpdateParamsWithTimeout(timeout time.Duration) *V1CloudConfigsEdgeNativePoolMachinesUIDUpdateParams { + var () + return &V1CloudConfigsEdgeNativePoolMachinesUIDUpdateParams{ + + timeout: timeout, + } +} + +// NewV1CloudConfigsEdgeNativePoolMachinesUIDUpdateParamsWithContext creates a new V1CloudConfigsEdgeNativePoolMachinesUIDUpdateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudConfigsEdgeNativePoolMachinesUIDUpdateParamsWithContext(ctx context.Context) *V1CloudConfigsEdgeNativePoolMachinesUIDUpdateParams { + var () + return &V1CloudConfigsEdgeNativePoolMachinesUIDUpdateParams{ + + Context: ctx, + } +} + +// NewV1CloudConfigsEdgeNativePoolMachinesUIDUpdateParamsWithHTTPClient creates a new V1CloudConfigsEdgeNativePoolMachinesUIDUpdateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudConfigsEdgeNativePoolMachinesUIDUpdateParamsWithHTTPClient(client *http.Client) *V1CloudConfigsEdgeNativePoolMachinesUIDUpdateParams { + var () + return &V1CloudConfigsEdgeNativePoolMachinesUIDUpdateParams{ + HTTPClient: client, + } +} + +/* +V1CloudConfigsEdgeNativePoolMachinesUIDUpdateParams contains all the parameters to send to the API endpoint +for the v1 cloud configs edge native pool machines Uid update operation typically these are written to a http.Request +*/ +type V1CloudConfigsEdgeNativePoolMachinesUIDUpdateParams struct { + + /*Body*/ + Body *models.V1EdgeNativeMachine + /*ConfigUID + Cluster's cloud config uid + + */ + ConfigUID string + /*MachinePoolName + Machine pool name + + */ + MachinePoolName string + /*MachineUID + Machine uid + + */ + MachineUID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud configs edge native pool machines Uid update params +func (o *V1CloudConfigsEdgeNativePoolMachinesUIDUpdateParams) WithTimeout(timeout time.Duration) *V1CloudConfigsEdgeNativePoolMachinesUIDUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud configs edge native pool machines Uid update params +func (o *V1CloudConfigsEdgeNativePoolMachinesUIDUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud configs edge native pool machines Uid update params +func (o *V1CloudConfigsEdgeNativePoolMachinesUIDUpdateParams) WithContext(ctx context.Context) *V1CloudConfigsEdgeNativePoolMachinesUIDUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud configs edge native pool machines Uid update params +func (o *V1CloudConfigsEdgeNativePoolMachinesUIDUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud configs edge native pool machines Uid update params +func (o *V1CloudConfigsEdgeNativePoolMachinesUIDUpdateParams) WithHTTPClient(client *http.Client) *V1CloudConfigsEdgeNativePoolMachinesUIDUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud configs edge native pool machines Uid update params +func (o *V1CloudConfigsEdgeNativePoolMachinesUIDUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 cloud configs edge native pool machines Uid update params +func (o *V1CloudConfigsEdgeNativePoolMachinesUIDUpdateParams) WithBody(body *models.V1EdgeNativeMachine) *V1CloudConfigsEdgeNativePoolMachinesUIDUpdateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 cloud configs edge native pool machines Uid update params +func (o *V1CloudConfigsEdgeNativePoolMachinesUIDUpdateParams) SetBody(body *models.V1EdgeNativeMachine) { + o.Body = body +} + +// WithConfigUID adds the configUID to the v1 cloud configs edge native pool machines Uid update params +func (o *V1CloudConfigsEdgeNativePoolMachinesUIDUpdateParams) WithConfigUID(configUID string) *V1CloudConfigsEdgeNativePoolMachinesUIDUpdateParams { + o.SetConfigUID(configUID) + return o +} + +// SetConfigUID adds the configUid to the v1 cloud configs edge native pool machines Uid update params +func (o *V1CloudConfigsEdgeNativePoolMachinesUIDUpdateParams) SetConfigUID(configUID string) { + o.ConfigUID = configUID +} + +// WithMachinePoolName adds the machinePoolName to the v1 cloud configs edge native pool machines Uid update params +func (o *V1CloudConfigsEdgeNativePoolMachinesUIDUpdateParams) WithMachinePoolName(machinePoolName string) *V1CloudConfigsEdgeNativePoolMachinesUIDUpdateParams { + o.SetMachinePoolName(machinePoolName) + return o +} + +// SetMachinePoolName adds the machinePoolName to the v1 cloud configs edge native pool machines Uid update params +func (o *V1CloudConfigsEdgeNativePoolMachinesUIDUpdateParams) SetMachinePoolName(machinePoolName string) { + o.MachinePoolName = machinePoolName +} + +// WithMachineUID adds the machineUID to the v1 cloud configs edge native pool machines Uid update params +func (o *V1CloudConfigsEdgeNativePoolMachinesUIDUpdateParams) WithMachineUID(machineUID string) *V1CloudConfigsEdgeNativePoolMachinesUIDUpdateParams { + o.SetMachineUID(machineUID) + return o +} + +// SetMachineUID adds the machineUid to the v1 cloud configs edge native pool machines Uid update params +func (o *V1CloudConfigsEdgeNativePoolMachinesUIDUpdateParams) SetMachineUID(machineUID string) { + o.MachineUID = machineUID +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudConfigsEdgeNativePoolMachinesUIDUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param configUid + if err := r.SetPathParam("configUid", o.ConfigUID); err != nil { + return err + } + + // path param machinePoolName + if err := r.SetPathParam("machinePoolName", o.MachinePoolName); err != nil { + return err + } + + // path param machineUid + if err := r.SetPathParam("machineUid", o.MachineUID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_configs_edge_native_pool_machines_uid_update_responses.go b/api/client/v1/v1_cloud_configs_edge_native_pool_machines_uid_update_responses.go new file mode 100644 index 00000000..0e5a2bba --- /dev/null +++ b/api/client/v1/v1_cloud_configs_edge_native_pool_machines_uid_update_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1CloudConfigsEdgeNativePoolMachinesUIDUpdateReader is a Reader for the V1CloudConfigsEdgeNativePoolMachinesUIDUpdate structure. +type V1CloudConfigsEdgeNativePoolMachinesUIDUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudConfigsEdgeNativePoolMachinesUIDUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1CloudConfigsEdgeNativePoolMachinesUIDUpdateNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudConfigsEdgeNativePoolMachinesUIDUpdateNoContent creates a V1CloudConfigsEdgeNativePoolMachinesUIDUpdateNoContent with default headers values +func NewV1CloudConfigsEdgeNativePoolMachinesUIDUpdateNoContent() *V1CloudConfigsEdgeNativePoolMachinesUIDUpdateNoContent { + return &V1CloudConfigsEdgeNativePoolMachinesUIDUpdateNoContent{} +} + +/* +V1CloudConfigsEdgeNativePoolMachinesUIDUpdateNoContent handles this case with default header values. + +The resource was updated successfully +*/ +type V1CloudConfigsEdgeNativePoolMachinesUIDUpdateNoContent struct { +} + +func (o *V1CloudConfigsEdgeNativePoolMachinesUIDUpdateNoContent) Error() string { + return fmt.Sprintf("[PUT /v1/cloudconfigs/edge-native/{configUid}/machinePools/{machinePoolName}/machines/{machineUid}][%d] v1CloudConfigsEdgeNativePoolMachinesUidUpdateNoContent ", 204) +} + +func (o *V1CloudConfigsEdgeNativePoolMachinesUIDUpdateNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_cloud_configs_edge_native_uid_cluster_config_parameters.go b/api/client/v1/v1_cloud_configs_edge_native_uid_cluster_config_parameters.go new file mode 100644 index 00000000..c61e976c --- /dev/null +++ b/api/client/v1/v1_cloud_configs_edge_native_uid_cluster_config_parameters.go @@ -0,0 +1,157 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1CloudConfigsEdgeNativeUIDClusterConfigParams creates a new V1CloudConfigsEdgeNativeUIDClusterConfigParams object +// with the default values initialized. +func NewV1CloudConfigsEdgeNativeUIDClusterConfigParams() *V1CloudConfigsEdgeNativeUIDClusterConfigParams { + var () + return &V1CloudConfigsEdgeNativeUIDClusterConfigParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudConfigsEdgeNativeUIDClusterConfigParamsWithTimeout creates a new V1CloudConfigsEdgeNativeUIDClusterConfigParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudConfigsEdgeNativeUIDClusterConfigParamsWithTimeout(timeout time.Duration) *V1CloudConfigsEdgeNativeUIDClusterConfigParams { + var () + return &V1CloudConfigsEdgeNativeUIDClusterConfigParams{ + + timeout: timeout, + } +} + +// NewV1CloudConfigsEdgeNativeUIDClusterConfigParamsWithContext creates a new V1CloudConfigsEdgeNativeUIDClusterConfigParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudConfigsEdgeNativeUIDClusterConfigParamsWithContext(ctx context.Context) *V1CloudConfigsEdgeNativeUIDClusterConfigParams { + var () + return &V1CloudConfigsEdgeNativeUIDClusterConfigParams{ + + Context: ctx, + } +} + +// NewV1CloudConfigsEdgeNativeUIDClusterConfigParamsWithHTTPClient creates a new V1CloudConfigsEdgeNativeUIDClusterConfigParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudConfigsEdgeNativeUIDClusterConfigParamsWithHTTPClient(client *http.Client) *V1CloudConfigsEdgeNativeUIDClusterConfigParams { + var () + return &V1CloudConfigsEdgeNativeUIDClusterConfigParams{ + HTTPClient: client, + } +} + +/* +V1CloudConfigsEdgeNativeUIDClusterConfigParams contains all the parameters to send to the API endpoint +for the v1 cloud configs edge native Uid cluster config operation typically these are written to a http.Request +*/ +type V1CloudConfigsEdgeNativeUIDClusterConfigParams struct { + + /*Body*/ + Body *models.V1EdgeNativeCloudClusterConfigEntity + /*ConfigUID + Cluster's cloud config uid + + */ + ConfigUID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud configs edge native Uid cluster config params +func (o *V1CloudConfigsEdgeNativeUIDClusterConfigParams) WithTimeout(timeout time.Duration) *V1CloudConfigsEdgeNativeUIDClusterConfigParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud configs edge native Uid cluster config params +func (o *V1CloudConfigsEdgeNativeUIDClusterConfigParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud configs edge native Uid cluster config params +func (o *V1CloudConfigsEdgeNativeUIDClusterConfigParams) WithContext(ctx context.Context) *V1CloudConfigsEdgeNativeUIDClusterConfigParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud configs edge native Uid cluster config params +func (o *V1CloudConfigsEdgeNativeUIDClusterConfigParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud configs edge native Uid cluster config params +func (o *V1CloudConfigsEdgeNativeUIDClusterConfigParams) WithHTTPClient(client *http.Client) *V1CloudConfigsEdgeNativeUIDClusterConfigParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud configs edge native Uid cluster config params +func (o *V1CloudConfigsEdgeNativeUIDClusterConfigParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 cloud configs edge native Uid cluster config params +func (o *V1CloudConfigsEdgeNativeUIDClusterConfigParams) WithBody(body *models.V1EdgeNativeCloudClusterConfigEntity) *V1CloudConfigsEdgeNativeUIDClusterConfigParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 cloud configs edge native Uid cluster config params +func (o *V1CloudConfigsEdgeNativeUIDClusterConfigParams) SetBody(body *models.V1EdgeNativeCloudClusterConfigEntity) { + o.Body = body +} + +// WithConfigUID adds the configUID to the v1 cloud configs edge native Uid cluster config params +func (o *V1CloudConfigsEdgeNativeUIDClusterConfigParams) WithConfigUID(configUID string) *V1CloudConfigsEdgeNativeUIDClusterConfigParams { + o.SetConfigUID(configUID) + return o +} + +// SetConfigUID adds the configUid to the v1 cloud configs edge native Uid cluster config params +func (o *V1CloudConfigsEdgeNativeUIDClusterConfigParams) SetConfigUID(configUID string) { + o.ConfigUID = configUID +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudConfigsEdgeNativeUIDClusterConfigParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param configUid + if err := r.SetPathParam("configUid", o.ConfigUID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_configs_edge_native_uid_cluster_config_responses.go b/api/client/v1/v1_cloud_configs_edge_native_uid_cluster_config_responses.go new file mode 100644 index 00000000..26758d0b --- /dev/null +++ b/api/client/v1/v1_cloud_configs_edge_native_uid_cluster_config_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1CloudConfigsEdgeNativeUIDClusterConfigReader is a Reader for the V1CloudConfigsEdgeNativeUIDClusterConfig structure. +type V1CloudConfigsEdgeNativeUIDClusterConfigReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudConfigsEdgeNativeUIDClusterConfigReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1CloudConfigsEdgeNativeUIDClusterConfigNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudConfigsEdgeNativeUIDClusterConfigNoContent creates a V1CloudConfigsEdgeNativeUIDClusterConfigNoContent with default headers values +func NewV1CloudConfigsEdgeNativeUIDClusterConfigNoContent() *V1CloudConfigsEdgeNativeUIDClusterConfigNoContent { + return &V1CloudConfigsEdgeNativeUIDClusterConfigNoContent{} +} + +/* +V1CloudConfigsEdgeNativeUIDClusterConfigNoContent handles this case with default header values. + +The resource was updated successfully +*/ +type V1CloudConfigsEdgeNativeUIDClusterConfigNoContent struct { +} + +func (o *V1CloudConfigsEdgeNativeUIDClusterConfigNoContent) Error() string { + return fmt.Sprintf("[PUT /v1/cloudconfigs/edge-native/{configUid}/clusterConfig][%d] v1CloudConfigsEdgeNativeUidClusterConfigNoContent ", 204) +} + +func (o *V1CloudConfigsEdgeNativeUIDClusterConfigNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_cloud_configs_edge_pool_machines_add_parameters.go b/api/client/v1/v1_cloud_configs_edge_pool_machines_add_parameters.go new file mode 100644 index 00000000..bb715b26 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_edge_pool_machines_add_parameters.go @@ -0,0 +1,178 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1CloudConfigsEdgePoolMachinesAddParams creates a new V1CloudConfigsEdgePoolMachinesAddParams object +// with the default values initialized. +func NewV1CloudConfigsEdgePoolMachinesAddParams() *V1CloudConfigsEdgePoolMachinesAddParams { + var () + return &V1CloudConfigsEdgePoolMachinesAddParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudConfigsEdgePoolMachinesAddParamsWithTimeout creates a new V1CloudConfigsEdgePoolMachinesAddParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudConfigsEdgePoolMachinesAddParamsWithTimeout(timeout time.Duration) *V1CloudConfigsEdgePoolMachinesAddParams { + var () + return &V1CloudConfigsEdgePoolMachinesAddParams{ + + timeout: timeout, + } +} + +// NewV1CloudConfigsEdgePoolMachinesAddParamsWithContext creates a new V1CloudConfigsEdgePoolMachinesAddParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudConfigsEdgePoolMachinesAddParamsWithContext(ctx context.Context) *V1CloudConfigsEdgePoolMachinesAddParams { + var () + return &V1CloudConfigsEdgePoolMachinesAddParams{ + + Context: ctx, + } +} + +// NewV1CloudConfigsEdgePoolMachinesAddParamsWithHTTPClient creates a new V1CloudConfigsEdgePoolMachinesAddParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudConfigsEdgePoolMachinesAddParamsWithHTTPClient(client *http.Client) *V1CloudConfigsEdgePoolMachinesAddParams { + var () + return &V1CloudConfigsEdgePoolMachinesAddParams{ + HTTPClient: client, + } +} + +/* +V1CloudConfigsEdgePoolMachinesAddParams contains all the parameters to send to the API endpoint +for the v1 cloud configs edge pool machines add operation typically these are written to a http.Request +*/ +type V1CloudConfigsEdgePoolMachinesAddParams struct { + + /*Body*/ + Body *models.V1EdgeMachine + /*ConfigUID + Cluster's cloud config uid + + */ + ConfigUID string + /*MachinePoolName + Machine pool name + + */ + MachinePoolName string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud configs edge pool machines add params +func (o *V1CloudConfigsEdgePoolMachinesAddParams) WithTimeout(timeout time.Duration) *V1CloudConfigsEdgePoolMachinesAddParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud configs edge pool machines add params +func (o *V1CloudConfigsEdgePoolMachinesAddParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud configs edge pool machines add params +func (o *V1CloudConfigsEdgePoolMachinesAddParams) WithContext(ctx context.Context) *V1CloudConfigsEdgePoolMachinesAddParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud configs edge pool machines add params +func (o *V1CloudConfigsEdgePoolMachinesAddParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud configs edge pool machines add params +func (o *V1CloudConfigsEdgePoolMachinesAddParams) WithHTTPClient(client *http.Client) *V1CloudConfigsEdgePoolMachinesAddParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud configs edge pool machines add params +func (o *V1CloudConfigsEdgePoolMachinesAddParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 cloud configs edge pool machines add params +func (o *V1CloudConfigsEdgePoolMachinesAddParams) WithBody(body *models.V1EdgeMachine) *V1CloudConfigsEdgePoolMachinesAddParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 cloud configs edge pool machines add params +func (o *V1CloudConfigsEdgePoolMachinesAddParams) SetBody(body *models.V1EdgeMachine) { + o.Body = body +} + +// WithConfigUID adds the configUID to the v1 cloud configs edge pool machines add params +func (o *V1CloudConfigsEdgePoolMachinesAddParams) WithConfigUID(configUID string) *V1CloudConfigsEdgePoolMachinesAddParams { + o.SetConfigUID(configUID) + return o +} + +// SetConfigUID adds the configUid to the v1 cloud configs edge pool machines add params +func (o *V1CloudConfigsEdgePoolMachinesAddParams) SetConfigUID(configUID string) { + o.ConfigUID = configUID +} + +// WithMachinePoolName adds the machinePoolName to the v1 cloud configs edge pool machines add params +func (o *V1CloudConfigsEdgePoolMachinesAddParams) WithMachinePoolName(machinePoolName string) *V1CloudConfigsEdgePoolMachinesAddParams { + o.SetMachinePoolName(machinePoolName) + return o +} + +// SetMachinePoolName adds the machinePoolName to the v1 cloud configs edge pool machines add params +func (o *V1CloudConfigsEdgePoolMachinesAddParams) SetMachinePoolName(machinePoolName string) { + o.MachinePoolName = machinePoolName +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudConfigsEdgePoolMachinesAddParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param configUid + if err := r.SetPathParam("configUid", o.ConfigUID); err != nil { + return err + } + + // path param machinePoolName + if err := r.SetPathParam("machinePoolName", o.MachinePoolName); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_configs_edge_pool_machines_add_responses.go b/api/client/v1/v1_cloud_configs_edge_pool_machines_add_responses.go new file mode 100644 index 00000000..e8d01868 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_edge_pool_machines_add_responses.go @@ -0,0 +1,77 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1CloudConfigsEdgePoolMachinesAddReader is a Reader for the V1CloudConfigsEdgePoolMachinesAdd structure. +type V1CloudConfigsEdgePoolMachinesAddReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudConfigsEdgePoolMachinesAddReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 201: + result := NewV1CloudConfigsEdgePoolMachinesAddCreated() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudConfigsEdgePoolMachinesAddCreated creates a V1CloudConfigsEdgePoolMachinesAddCreated with default headers values +func NewV1CloudConfigsEdgePoolMachinesAddCreated() *V1CloudConfigsEdgePoolMachinesAddCreated { + return &V1CloudConfigsEdgePoolMachinesAddCreated{} +} + +/* +V1CloudConfigsEdgePoolMachinesAddCreated handles this case with default header values. + +Created successfully +*/ +type V1CloudConfigsEdgePoolMachinesAddCreated struct { + /*Audit uid for the request + */ + AuditUID string + + Payload *models.V1UID +} + +func (o *V1CloudConfigsEdgePoolMachinesAddCreated) Error() string { + return fmt.Sprintf("[POST /v1/cloudconfigs/edge/{configUid}/machinePools/{machinePoolName}/machines][%d] v1CloudConfigsEdgePoolMachinesAddCreated %+v", 201, o.Payload) +} + +func (o *V1CloudConfigsEdgePoolMachinesAddCreated) GetPayload() *models.V1UID { + return o.Payload +} + +func (o *V1CloudConfigsEdgePoolMachinesAddCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header AuditUid + o.AuditUID = response.GetHeader("AuditUid") + + o.Payload = new(models.V1UID) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_cloud_configs_edge_pool_machines_list_parameters.go b/api/client/v1/v1_cloud_configs_edge_pool_machines_list_parameters.go new file mode 100644 index 00000000..6df1ca1c --- /dev/null +++ b/api/client/v1/v1_cloud_configs_edge_pool_machines_list_parameters.go @@ -0,0 +1,157 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1CloudConfigsEdgePoolMachinesListParams creates a new V1CloudConfigsEdgePoolMachinesListParams object +// with the default values initialized. +func NewV1CloudConfigsEdgePoolMachinesListParams() *V1CloudConfigsEdgePoolMachinesListParams { + var () + return &V1CloudConfigsEdgePoolMachinesListParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudConfigsEdgePoolMachinesListParamsWithTimeout creates a new V1CloudConfigsEdgePoolMachinesListParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudConfigsEdgePoolMachinesListParamsWithTimeout(timeout time.Duration) *V1CloudConfigsEdgePoolMachinesListParams { + var () + return &V1CloudConfigsEdgePoolMachinesListParams{ + + timeout: timeout, + } +} + +// NewV1CloudConfigsEdgePoolMachinesListParamsWithContext creates a new V1CloudConfigsEdgePoolMachinesListParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudConfigsEdgePoolMachinesListParamsWithContext(ctx context.Context) *V1CloudConfigsEdgePoolMachinesListParams { + var () + return &V1CloudConfigsEdgePoolMachinesListParams{ + + Context: ctx, + } +} + +// NewV1CloudConfigsEdgePoolMachinesListParamsWithHTTPClient creates a new V1CloudConfigsEdgePoolMachinesListParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudConfigsEdgePoolMachinesListParamsWithHTTPClient(client *http.Client) *V1CloudConfigsEdgePoolMachinesListParams { + var () + return &V1CloudConfigsEdgePoolMachinesListParams{ + HTTPClient: client, + } +} + +/* +V1CloudConfigsEdgePoolMachinesListParams contains all the parameters to send to the API endpoint +for the v1 cloud configs edge pool machines list operation typically these are written to a http.Request +*/ +type V1CloudConfigsEdgePoolMachinesListParams struct { + + /*ConfigUID + Cluster's cloud config uid + + */ + ConfigUID string + /*MachinePoolName + Machine pool name + + */ + MachinePoolName string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud configs edge pool machines list params +func (o *V1CloudConfigsEdgePoolMachinesListParams) WithTimeout(timeout time.Duration) *V1CloudConfigsEdgePoolMachinesListParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud configs edge pool machines list params +func (o *V1CloudConfigsEdgePoolMachinesListParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud configs edge pool machines list params +func (o *V1CloudConfigsEdgePoolMachinesListParams) WithContext(ctx context.Context) *V1CloudConfigsEdgePoolMachinesListParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud configs edge pool machines list params +func (o *V1CloudConfigsEdgePoolMachinesListParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud configs edge pool machines list params +func (o *V1CloudConfigsEdgePoolMachinesListParams) WithHTTPClient(client *http.Client) *V1CloudConfigsEdgePoolMachinesListParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud configs edge pool machines list params +func (o *V1CloudConfigsEdgePoolMachinesListParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithConfigUID adds the configUID to the v1 cloud configs edge pool machines list params +func (o *V1CloudConfigsEdgePoolMachinesListParams) WithConfigUID(configUID string) *V1CloudConfigsEdgePoolMachinesListParams { + o.SetConfigUID(configUID) + return o +} + +// SetConfigUID adds the configUid to the v1 cloud configs edge pool machines list params +func (o *V1CloudConfigsEdgePoolMachinesListParams) SetConfigUID(configUID string) { + o.ConfigUID = configUID +} + +// WithMachinePoolName adds the machinePoolName to the v1 cloud configs edge pool machines list params +func (o *V1CloudConfigsEdgePoolMachinesListParams) WithMachinePoolName(machinePoolName string) *V1CloudConfigsEdgePoolMachinesListParams { + o.SetMachinePoolName(machinePoolName) + return o +} + +// SetMachinePoolName adds the machinePoolName to the v1 cloud configs edge pool machines list params +func (o *V1CloudConfigsEdgePoolMachinesListParams) SetMachinePoolName(machinePoolName string) { + o.MachinePoolName = machinePoolName +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudConfigsEdgePoolMachinesListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param configUid + if err := r.SetPathParam("configUid", o.ConfigUID); err != nil { + return err + } + + // path param machinePoolName + if err := r.SetPathParam("machinePoolName", o.MachinePoolName); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_configs_edge_pool_machines_list_responses.go b/api/client/v1/v1_cloud_configs_edge_pool_machines_list_responses.go new file mode 100644 index 00000000..114f4e49 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_edge_pool_machines_list_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1CloudConfigsEdgePoolMachinesListReader is a Reader for the V1CloudConfigsEdgePoolMachinesList structure. +type V1CloudConfigsEdgePoolMachinesListReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudConfigsEdgePoolMachinesListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1CloudConfigsEdgePoolMachinesListOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudConfigsEdgePoolMachinesListOK creates a V1CloudConfigsEdgePoolMachinesListOK with default headers values +func NewV1CloudConfigsEdgePoolMachinesListOK() *V1CloudConfigsEdgePoolMachinesListOK { + return &V1CloudConfigsEdgePoolMachinesListOK{} +} + +/* +V1CloudConfigsEdgePoolMachinesListOK handles this case with default header values. + +An array of Edge machine items +*/ +type V1CloudConfigsEdgePoolMachinesListOK struct { + Payload *models.V1EdgeMachines +} + +func (o *V1CloudConfigsEdgePoolMachinesListOK) Error() string { + return fmt.Sprintf("[GET /v1/cloudconfigs/edge/{configUid}/machinePools/{machinePoolName}/machines][%d] v1CloudConfigsEdgePoolMachinesListOK %+v", 200, o.Payload) +} + +func (o *V1CloudConfigsEdgePoolMachinesListOK) GetPayload() *models.V1EdgeMachines { + return o.Payload +} + +func (o *V1CloudConfigsEdgePoolMachinesListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1EdgeMachines) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_cloud_configs_edge_pool_machines_uid_delete_parameters.go b/api/client/v1/v1_cloud_configs_edge_pool_machines_uid_delete_parameters.go new file mode 100644 index 00000000..ca02c840 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_edge_pool_machines_uid_delete_parameters.go @@ -0,0 +1,178 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1CloudConfigsEdgePoolMachinesUIDDeleteParams creates a new V1CloudConfigsEdgePoolMachinesUIDDeleteParams object +// with the default values initialized. +func NewV1CloudConfigsEdgePoolMachinesUIDDeleteParams() *V1CloudConfigsEdgePoolMachinesUIDDeleteParams { + var () + return &V1CloudConfigsEdgePoolMachinesUIDDeleteParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudConfigsEdgePoolMachinesUIDDeleteParamsWithTimeout creates a new V1CloudConfigsEdgePoolMachinesUIDDeleteParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudConfigsEdgePoolMachinesUIDDeleteParamsWithTimeout(timeout time.Duration) *V1CloudConfigsEdgePoolMachinesUIDDeleteParams { + var () + return &V1CloudConfigsEdgePoolMachinesUIDDeleteParams{ + + timeout: timeout, + } +} + +// NewV1CloudConfigsEdgePoolMachinesUIDDeleteParamsWithContext creates a new V1CloudConfigsEdgePoolMachinesUIDDeleteParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudConfigsEdgePoolMachinesUIDDeleteParamsWithContext(ctx context.Context) *V1CloudConfigsEdgePoolMachinesUIDDeleteParams { + var () + return &V1CloudConfigsEdgePoolMachinesUIDDeleteParams{ + + Context: ctx, + } +} + +// NewV1CloudConfigsEdgePoolMachinesUIDDeleteParamsWithHTTPClient creates a new V1CloudConfigsEdgePoolMachinesUIDDeleteParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudConfigsEdgePoolMachinesUIDDeleteParamsWithHTTPClient(client *http.Client) *V1CloudConfigsEdgePoolMachinesUIDDeleteParams { + var () + return &V1CloudConfigsEdgePoolMachinesUIDDeleteParams{ + HTTPClient: client, + } +} + +/* +V1CloudConfigsEdgePoolMachinesUIDDeleteParams contains all the parameters to send to the API endpoint +for the v1 cloud configs edge pool machines Uid delete operation typically these are written to a http.Request +*/ +type V1CloudConfigsEdgePoolMachinesUIDDeleteParams struct { + + /*ConfigUID + Cluster's cloud config uid + + */ + ConfigUID string + /*MachinePoolName + Machine pool name + + */ + MachinePoolName string + /*MachineUID + Machine uid + + */ + MachineUID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud configs edge pool machines Uid delete params +func (o *V1CloudConfigsEdgePoolMachinesUIDDeleteParams) WithTimeout(timeout time.Duration) *V1CloudConfigsEdgePoolMachinesUIDDeleteParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud configs edge pool machines Uid delete params +func (o *V1CloudConfigsEdgePoolMachinesUIDDeleteParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud configs edge pool machines Uid delete params +func (o *V1CloudConfigsEdgePoolMachinesUIDDeleteParams) WithContext(ctx context.Context) *V1CloudConfigsEdgePoolMachinesUIDDeleteParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud configs edge pool machines Uid delete params +func (o *V1CloudConfigsEdgePoolMachinesUIDDeleteParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud configs edge pool machines Uid delete params +func (o *V1CloudConfigsEdgePoolMachinesUIDDeleteParams) WithHTTPClient(client *http.Client) *V1CloudConfigsEdgePoolMachinesUIDDeleteParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud configs edge pool machines Uid delete params +func (o *V1CloudConfigsEdgePoolMachinesUIDDeleteParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithConfigUID adds the configUID to the v1 cloud configs edge pool machines Uid delete params +func (o *V1CloudConfigsEdgePoolMachinesUIDDeleteParams) WithConfigUID(configUID string) *V1CloudConfigsEdgePoolMachinesUIDDeleteParams { + o.SetConfigUID(configUID) + return o +} + +// SetConfigUID adds the configUid to the v1 cloud configs edge pool machines Uid delete params +func (o *V1CloudConfigsEdgePoolMachinesUIDDeleteParams) SetConfigUID(configUID string) { + o.ConfigUID = configUID +} + +// WithMachinePoolName adds the machinePoolName to the v1 cloud configs edge pool machines Uid delete params +func (o *V1CloudConfigsEdgePoolMachinesUIDDeleteParams) WithMachinePoolName(machinePoolName string) *V1CloudConfigsEdgePoolMachinesUIDDeleteParams { + o.SetMachinePoolName(machinePoolName) + return o +} + +// SetMachinePoolName adds the machinePoolName to the v1 cloud configs edge pool machines Uid delete params +func (o *V1CloudConfigsEdgePoolMachinesUIDDeleteParams) SetMachinePoolName(machinePoolName string) { + o.MachinePoolName = machinePoolName +} + +// WithMachineUID adds the machineUID to the v1 cloud configs edge pool machines Uid delete params +func (o *V1CloudConfigsEdgePoolMachinesUIDDeleteParams) WithMachineUID(machineUID string) *V1CloudConfigsEdgePoolMachinesUIDDeleteParams { + o.SetMachineUID(machineUID) + return o +} + +// SetMachineUID adds the machineUid to the v1 cloud configs edge pool machines Uid delete params +func (o *V1CloudConfigsEdgePoolMachinesUIDDeleteParams) SetMachineUID(machineUID string) { + o.MachineUID = machineUID +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudConfigsEdgePoolMachinesUIDDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param configUid + if err := r.SetPathParam("configUid", o.ConfigUID); err != nil { + return err + } + + // path param machinePoolName + if err := r.SetPathParam("machinePoolName", o.MachinePoolName); err != nil { + return err + } + + // path param machineUid + if err := r.SetPathParam("machineUid", o.MachineUID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_configs_edge_pool_machines_uid_delete_responses.go b/api/client/v1/v1_cloud_configs_edge_pool_machines_uid_delete_responses.go new file mode 100644 index 00000000..2e2e9f72 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_edge_pool_machines_uid_delete_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1CloudConfigsEdgePoolMachinesUIDDeleteReader is a Reader for the V1CloudConfigsEdgePoolMachinesUIDDelete structure. +type V1CloudConfigsEdgePoolMachinesUIDDeleteReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudConfigsEdgePoolMachinesUIDDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1CloudConfigsEdgePoolMachinesUIDDeleteNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudConfigsEdgePoolMachinesUIDDeleteNoContent creates a V1CloudConfigsEdgePoolMachinesUIDDeleteNoContent with default headers values +func NewV1CloudConfigsEdgePoolMachinesUIDDeleteNoContent() *V1CloudConfigsEdgePoolMachinesUIDDeleteNoContent { + return &V1CloudConfigsEdgePoolMachinesUIDDeleteNoContent{} +} + +/* +V1CloudConfigsEdgePoolMachinesUIDDeleteNoContent handles this case with default header values. + +The resource was deleted successfully +*/ +type V1CloudConfigsEdgePoolMachinesUIDDeleteNoContent struct { +} + +func (o *V1CloudConfigsEdgePoolMachinesUIDDeleteNoContent) Error() string { + return fmt.Sprintf("[DELETE /v1/cloudconfigs/edge/{configUid}/machinePools/{machinePoolName}/machines/{machineUid}][%d] v1CloudConfigsEdgePoolMachinesUidDeleteNoContent ", 204) +} + +func (o *V1CloudConfigsEdgePoolMachinesUIDDeleteNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_cloud_configs_edge_pool_machines_uid_get_parameters.go b/api/client/v1/v1_cloud_configs_edge_pool_machines_uid_get_parameters.go new file mode 100644 index 00000000..02284f90 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_edge_pool_machines_uid_get_parameters.go @@ -0,0 +1,178 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1CloudConfigsEdgePoolMachinesUIDGetParams creates a new V1CloudConfigsEdgePoolMachinesUIDGetParams object +// with the default values initialized. +func NewV1CloudConfigsEdgePoolMachinesUIDGetParams() *V1CloudConfigsEdgePoolMachinesUIDGetParams { + var () + return &V1CloudConfigsEdgePoolMachinesUIDGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudConfigsEdgePoolMachinesUIDGetParamsWithTimeout creates a new V1CloudConfigsEdgePoolMachinesUIDGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudConfigsEdgePoolMachinesUIDGetParamsWithTimeout(timeout time.Duration) *V1CloudConfigsEdgePoolMachinesUIDGetParams { + var () + return &V1CloudConfigsEdgePoolMachinesUIDGetParams{ + + timeout: timeout, + } +} + +// NewV1CloudConfigsEdgePoolMachinesUIDGetParamsWithContext creates a new V1CloudConfigsEdgePoolMachinesUIDGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudConfigsEdgePoolMachinesUIDGetParamsWithContext(ctx context.Context) *V1CloudConfigsEdgePoolMachinesUIDGetParams { + var () + return &V1CloudConfigsEdgePoolMachinesUIDGetParams{ + + Context: ctx, + } +} + +// NewV1CloudConfigsEdgePoolMachinesUIDGetParamsWithHTTPClient creates a new V1CloudConfigsEdgePoolMachinesUIDGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudConfigsEdgePoolMachinesUIDGetParamsWithHTTPClient(client *http.Client) *V1CloudConfigsEdgePoolMachinesUIDGetParams { + var () + return &V1CloudConfigsEdgePoolMachinesUIDGetParams{ + HTTPClient: client, + } +} + +/* +V1CloudConfigsEdgePoolMachinesUIDGetParams contains all the parameters to send to the API endpoint +for the v1 cloud configs edge pool machines Uid get operation typically these are written to a http.Request +*/ +type V1CloudConfigsEdgePoolMachinesUIDGetParams struct { + + /*ConfigUID + Cluster's cloud config uid + + */ + ConfigUID string + /*MachinePoolName + Machine pool name + + */ + MachinePoolName string + /*MachineUID + Machine uid + + */ + MachineUID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud configs edge pool machines Uid get params +func (o *V1CloudConfigsEdgePoolMachinesUIDGetParams) WithTimeout(timeout time.Duration) *V1CloudConfigsEdgePoolMachinesUIDGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud configs edge pool machines Uid get params +func (o *V1CloudConfigsEdgePoolMachinesUIDGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud configs edge pool machines Uid get params +func (o *V1CloudConfigsEdgePoolMachinesUIDGetParams) WithContext(ctx context.Context) *V1CloudConfigsEdgePoolMachinesUIDGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud configs edge pool machines Uid get params +func (o *V1CloudConfigsEdgePoolMachinesUIDGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud configs edge pool machines Uid get params +func (o *V1CloudConfigsEdgePoolMachinesUIDGetParams) WithHTTPClient(client *http.Client) *V1CloudConfigsEdgePoolMachinesUIDGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud configs edge pool machines Uid get params +func (o *V1CloudConfigsEdgePoolMachinesUIDGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithConfigUID adds the configUID to the v1 cloud configs edge pool machines Uid get params +func (o *V1CloudConfigsEdgePoolMachinesUIDGetParams) WithConfigUID(configUID string) *V1CloudConfigsEdgePoolMachinesUIDGetParams { + o.SetConfigUID(configUID) + return o +} + +// SetConfigUID adds the configUid to the v1 cloud configs edge pool machines Uid get params +func (o *V1CloudConfigsEdgePoolMachinesUIDGetParams) SetConfigUID(configUID string) { + o.ConfigUID = configUID +} + +// WithMachinePoolName adds the machinePoolName to the v1 cloud configs edge pool machines Uid get params +func (o *V1CloudConfigsEdgePoolMachinesUIDGetParams) WithMachinePoolName(machinePoolName string) *V1CloudConfigsEdgePoolMachinesUIDGetParams { + o.SetMachinePoolName(machinePoolName) + return o +} + +// SetMachinePoolName adds the machinePoolName to the v1 cloud configs edge pool machines Uid get params +func (o *V1CloudConfigsEdgePoolMachinesUIDGetParams) SetMachinePoolName(machinePoolName string) { + o.MachinePoolName = machinePoolName +} + +// WithMachineUID adds the machineUID to the v1 cloud configs edge pool machines Uid get params +func (o *V1CloudConfigsEdgePoolMachinesUIDGetParams) WithMachineUID(machineUID string) *V1CloudConfigsEdgePoolMachinesUIDGetParams { + o.SetMachineUID(machineUID) + return o +} + +// SetMachineUID adds the machineUid to the v1 cloud configs edge pool machines Uid get params +func (o *V1CloudConfigsEdgePoolMachinesUIDGetParams) SetMachineUID(machineUID string) { + o.MachineUID = machineUID +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudConfigsEdgePoolMachinesUIDGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param configUid + if err := r.SetPathParam("configUid", o.ConfigUID); err != nil { + return err + } + + // path param machinePoolName + if err := r.SetPathParam("machinePoolName", o.MachinePoolName); err != nil { + return err + } + + // path param machineUid + if err := r.SetPathParam("machineUid", o.MachineUID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_configs_edge_pool_machines_uid_get_responses.go b/api/client/v1/v1_cloud_configs_edge_pool_machines_uid_get_responses.go new file mode 100644 index 00000000..987b3cca --- /dev/null +++ b/api/client/v1/v1_cloud_configs_edge_pool_machines_uid_get_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1CloudConfigsEdgePoolMachinesUIDGetReader is a Reader for the V1CloudConfigsEdgePoolMachinesUIDGet structure. +type V1CloudConfigsEdgePoolMachinesUIDGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudConfigsEdgePoolMachinesUIDGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1CloudConfigsEdgePoolMachinesUIDGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudConfigsEdgePoolMachinesUIDGetOK creates a V1CloudConfigsEdgePoolMachinesUIDGetOK with default headers values +func NewV1CloudConfigsEdgePoolMachinesUIDGetOK() *V1CloudConfigsEdgePoolMachinesUIDGetOK { + return &V1CloudConfigsEdgePoolMachinesUIDGetOK{} +} + +/* +V1CloudConfigsEdgePoolMachinesUIDGetOK handles this case with default header values. + +OK +*/ +type V1CloudConfigsEdgePoolMachinesUIDGetOK struct { + Payload *models.V1EdgeMachine +} + +func (o *V1CloudConfigsEdgePoolMachinesUIDGetOK) Error() string { + return fmt.Sprintf("[GET /v1/cloudconfigs/edge/{configUid}/machinePools/{machinePoolName}/machines/{machineUid}][%d] v1CloudConfigsEdgePoolMachinesUidGetOK %+v", 200, o.Payload) +} + +func (o *V1CloudConfigsEdgePoolMachinesUIDGetOK) GetPayload() *models.V1EdgeMachine { + return o.Payload +} + +func (o *V1CloudConfigsEdgePoolMachinesUIDGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1EdgeMachine) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_cloud_configs_edge_pool_machines_uid_update_parameters.go b/api/client/v1/v1_cloud_configs_edge_pool_machines_uid_update_parameters.go new file mode 100644 index 00000000..f244ae33 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_edge_pool_machines_uid_update_parameters.go @@ -0,0 +1,199 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1CloudConfigsEdgePoolMachinesUIDUpdateParams creates a new V1CloudConfigsEdgePoolMachinesUIDUpdateParams object +// with the default values initialized. +func NewV1CloudConfigsEdgePoolMachinesUIDUpdateParams() *V1CloudConfigsEdgePoolMachinesUIDUpdateParams { + var () + return &V1CloudConfigsEdgePoolMachinesUIDUpdateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudConfigsEdgePoolMachinesUIDUpdateParamsWithTimeout creates a new V1CloudConfigsEdgePoolMachinesUIDUpdateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudConfigsEdgePoolMachinesUIDUpdateParamsWithTimeout(timeout time.Duration) *V1CloudConfigsEdgePoolMachinesUIDUpdateParams { + var () + return &V1CloudConfigsEdgePoolMachinesUIDUpdateParams{ + + timeout: timeout, + } +} + +// NewV1CloudConfigsEdgePoolMachinesUIDUpdateParamsWithContext creates a new V1CloudConfigsEdgePoolMachinesUIDUpdateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudConfigsEdgePoolMachinesUIDUpdateParamsWithContext(ctx context.Context) *V1CloudConfigsEdgePoolMachinesUIDUpdateParams { + var () + return &V1CloudConfigsEdgePoolMachinesUIDUpdateParams{ + + Context: ctx, + } +} + +// NewV1CloudConfigsEdgePoolMachinesUIDUpdateParamsWithHTTPClient creates a new V1CloudConfigsEdgePoolMachinesUIDUpdateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudConfigsEdgePoolMachinesUIDUpdateParamsWithHTTPClient(client *http.Client) *V1CloudConfigsEdgePoolMachinesUIDUpdateParams { + var () + return &V1CloudConfigsEdgePoolMachinesUIDUpdateParams{ + HTTPClient: client, + } +} + +/* +V1CloudConfigsEdgePoolMachinesUIDUpdateParams contains all the parameters to send to the API endpoint +for the v1 cloud configs edge pool machines Uid update operation typically these are written to a http.Request +*/ +type V1CloudConfigsEdgePoolMachinesUIDUpdateParams struct { + + /*Body*/ + Body *models.V1EdgeMachine + /*ConfigUID + Cluster's cloud config uid + + */ + ConfigUID string + /*MachinePoolName + Machine pool name + + */ + MachinePoolName string + /*MachineUID + Machine uid + + */ + MachineUID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud configs edge pool machines Uid update params +func (o *V1CloudConfigsEdgePoolMachinesUIDUpdateParams) WithTimeout(timeout time.Duration) *V1CloudConfigsEdgePoolMachinesUIDUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud configs edge pool machines Uid update params +func (o *V1CloudConfigsEdgePoolMachinesUIDUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud configs edge pool machines Uid update params +func (o *V1CloudConfigsEdgePoolMachinesUIDUpdateParams) WithContext(ctx context.Context) *V1CloudConfigsEdgePoolMachinesUIDUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud configs edge pool machines Uid update params +func (o *V1CloudConfigsEdgePoolMachinesUIDUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud configs edge pool machines Uid update params +func (o *V1CloudConfigsEdgePoolMachinesUIDUpdateParams) WithHTTPClient(client *http.Client) *V1CloudConfigsEdgePoolMachinesUIDUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud configs edge pool machines Uid update params +func (o *V1CloudConfigsEdgePoolMachinesUIDUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 cloud configs edge pool machines Uid update params +func (o *V1CloudConfigsEdgePoolMachinesUIDUpdateParams) WithBody(body *models.V1EdgeMachine) *V1CloudConfigsEdgePoolMachinesUIDUpdateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 cloud configs edge pool machines Uid update params +func (o *V1CloudConfigsEdgePoolMachinesUIDUpdateParams) SetBody(body *models.V1EdgeMachine) { + o.Body = body +} + +// WithConfigUID adds the configUID to the v1 cloud configs edge pool machines Uid update params +func (o *V1CloudConfigsEdgePoolMachinesUIDUpdateParams) WithConfigUID(configUID string) *V1CloudConfigsEdgePoolMachinesUIDUpdateParams { + o.SetConfigUID(configUID) + return o +} + +// SetConfigUID adds the configUid to the v1 cloud configs edge pool machines Uid update params +func (o *V1CloudConfigsEdgePoolMachinesUIDUpdateParams) SetConfigUID(configUID string) { + o.ConfigUID = configUID +} + +// WithMachinePoolName adds the machinePoolName to the v1 cloud configs edge pool machines Uid update params +func (o *V1CloudConfigsEdgePoolMachinesUIDUpdateParams) WithMachinePoolName(machinePoolName string) *V1CloudConfigsEdgePoolMachinesUIDUpdateParams { + o.SetMachinePoolName(machinePoolName) + return o +} + +// SetMachinePoolName adds the machinePoolName to the v1 cloud configs edge pool machines Uid update params +func (o *V1CloudConfigsEdgePoolMachinesUIDUpdateParams) SetMachinePoolName(machinePoolName string) { + o.MachinePoolName = machinePoolName +} + +// WithMachineUID adds the machineUID to the v1 cloud configs edge pool machines Uid update params +func (o *V1CloudConfigsEdgePoolMachinesUIDUpdateParams) WithMachineUID(machineUID string) *V1CloudConfigsEdgePoolMachinesUIDUpdateParams { + o.SetMachineUID(machineUID) + return o +} + +// SetMachineUID adds the machineUid to the v1 cloud configs edge pool machines Uid update params +func (o *V1CloudConfigsEdgePoolMachinesUIDUpdateParams) SetMachineUID(machineUID string) { + o.MachineUID = machineUID +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudConfigsEdgePoolMachinesUIDUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param configUid + if err := r.SetPathParam("configUid", o.ConfigUID); err != nil { + return err + } + + // path param machinePoolName + if err := r.SetPathParam("machinePoolName", o.MachinePoolName); err != nil { + return err + } + + // path param machineUid + if err := r.SetPathParam("machineUid", o.MachineUID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_configs_edge_pool_machines_uid_update_responses.go b/api/client/v1/v1_cloud_configs_edge_pool_machines_uid_update_responses.go new file mode 100644 index 00000000..ed5dd9a7 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_edge_pool_machines_uid_update_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1CloudConfigsEdgePoolMachinesUIDUpdateReader is a Reader for the V1CloudConfigsEdgePoolMachinesUIDUpdate structure. +type V1CloudConfigsEdgePoolMachinesUIDUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudConfigsEdgePoolMachinesUIDUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1CloudConfigsEdgePoolMachinesUIDUpdateNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudConfigsEdgePoolMachinesUIDUpdateNoContent creates a V1CloudConfigsEdgePoolMachinesUIDUpdateNoContent with default headers values +func NewV1CloudConfigsEdgePoolMachinesUIDUpdateNoContent() *V1CloudConfigsEdgePoolMachinesUIDUpdateNoContent { + return &V1CloudConfigsEdgePoolMachinesUIDUpdateNoContent{} +} + +/* +V1CloudConfigsEdgePoolMachinesUIDUpdateNoContent handles this case with default header values. + +The resource was updated successfully +*/ +type V1CloudConfigsEdgePoolMachinesUIDUpdateNoContent struct { +} + +func (o *V1CloudConfigsEdgePoolMachinesUIDUpdateNoContent) Error() string { + return fmt.Sprintf("[PUT /v1/cloudconfigs/edge/{configUid}/machinePools/{machinePoolName}/machines/{machineUid}][%d] v1CloudConfigsEdgePoolMachinesUidUpdateNoContent ", 204) +} + +func (o *V1CloudConfigsEdgePoolMachinesUIDUpdateNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_cloud_configs_edge_uid_cluster_config_parameters.go b/api/client/v1/v1_cloud_configs_edge_uid_cluster_config_parameters.go new file mode 100644 index 00000000..979243b5 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_edge_uid_cluster_config_parameters.go @@ -0,0 +1,157 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1CloudConfigsEdgeUIDClusterConfigParams creates a new V1CloudConfigsEdgeUIDClusterConfigParams object +// with the default values initialized. +func NewV1CloudConfigsEdgeUIDClusterConfigParams() *V1CloudConfigsEdgeUIDClusterConfigParams { + var () + return &V1CloudConfigsEdgeUIDClusterConfigParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudConfigsEdgeUIDClusterConfigParamsWithTimeout creates a new V1CloudConfigsEdgeUIDClusterConfigParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudConfigsEdgeUIDClusterConfigParamsWithTimeout(timeout time.Duration) *V1CloudConfigsEdgeUIDClusterConfigParams { + var () + return &V1CloudConfigsEdgeUIDClusterConfigParams{ + + timeout: timeout, + } +} + +// NewV1CloudConfigsEdgeUIDClusterConfigParamsWithContext creates a new V1CloudConfigsEdgeUIDClusterConfigParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudConfigsEdgeUIDClusterConfigParamsWithContext(ctx context.Context) *V1CloudConfigsEdgeUIDClusterConfigParams { + var () + return &V1CloudConfigsEdgeUIDClusterConfigParams{ + + Context: ctx, + } +} + +// NewV1CloudConfigsEdgeUIDClusterConfigParamsWithHTTPClient creates a new V1CloudConfigsEdgeUIDClusterConfigParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudConfigsEdgeUIDClusterConfigParamsWithHTTPClient(client *http.Client) *V1CloudConfigsEdgeUIDClusterConfigParams { + var () + return &V1CloudConfigsEdgeUIDClusterConfigParams{ + HTTPClient: client, + } +} + +/* +V1CloudConfigsEdgeUIDClusterConfigParams contains all the parameters to send to the API endpoint +for the v1 cloud configs edge Uid cluster config operation typically these are written to a http.Request +*/ +type V1CloudConfigsEdgeUIDClusterConfigParams struct { + + /*Body*/ + Body *models.V1EdgeCloudClusterConfigEntity + /*ConfigUID + Cluster's cloud config uid + + */ + ConfigUID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud configs edge Uid cluster config params +func (o *V1CloudConfigsEdgeUIDClusterConfigParams) WithTimeout(timeout time.Duration) *V1CloudConfigsEdgeUIDClusterConfigParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud configs edge Uid cluster config params +func (o *V1CloudConfigsEdgeUIDClusterConfigParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud configs edge Uid cluster config params +func (o *V1CloudConfigsEdgeUIDClusterConfigParams) WithContext(ctx context.Context) *V1CloudConfigsEdgeUIDClusterConfigParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud configs edge Uid cluster config params +func (o *V1CloudConfigsEdgeUIDClusterConfigParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud configs edge Uid cluster config params +func (o *V1CloudConfigsEdgeUIDClusterConfigParams) WithHTTPClient(client *http.Client) *V1CloudConfigsEdgeUIDClusterConfigParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud configs edge Uid cluster config params +func (o *V1CloudConfigsEdgeUIDClusterConfigParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 cloud configs edge Uid cluster config params +func (o *V1CloudConfigsEdgeUIDClusterConfigParams) WithBody(body *models.V1EdgeCloudClusterConfigEntity) *V1CloudConfigsEdgeUIDClusterConfigParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 cloud configs edge Uid cluster config params +func (o *V1CloudConfigsEdgeUIDClusterConfigParams) SetBody(body *models.V1EdgeCloudClusterConfigEntity) { + o.Body = body +} + +// WithConfigUID adds the configUID to the v1 cloud configs edge Uid cluster config params +func (o *V1CloudConfigsEdgeUIDClusterConfigParams) WithConfigUID(configUID string) *V1CloudConfigsEdgeUIDClusterConfigParams { + o.SetConfigUID(configUID) + return o +} + +// SetConfigUID adds the configUid to the v1 cloud configs edge Uid cluster config params +func (o *V1CloudConfigsEdgeUIDClusterConfigParams) SetConfigUID(configUID string) { + o.ConfigUID = configUID +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudConfigsEdgeUIDClusterConfigParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param configUid + if err := r.SetPathParam("configUid", o.ConfigUID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_configs_edge_uid_cluster_config_responses.go b/api/client/v1/v1_cloud_configs_edge_uid_cluster_config_responses.go new file mode 100644 index 00000000..6080a3e5 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_edge_uid_cluster_config_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1CloudConfigsEdgeUIDClusterConfigReader is a Reader for the V1CloudConfigsEdgeUIDClusterConfig structure. +type V1CloudConfigsEdgeUIDClusterConfigReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudConfigsEdgeUIDClusterConfigReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1CloudConfigsEdgeUIDClusterConfigNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudConfigsEdgeUIDClusterConfigNoContent creates a V1CloudConfigsEdgeUIDClusterConfigNoContent with default headers values +func NewV1CloudConfigsEdgeUIDClusterConfigNoContent() *V1CloudConfigsEdgeUIDClusterConfigNoContent { + return &V1CloudConfigsEdgeUIDClusterConfigNoContent{} +} + +/* +V1CloudConfigsEdgeUIDClusterConfigNoContent handles this case with default header values. + +The resource was updated successfully +*/ +type V1CloudConfigsEdgeUIDClusterConfigNoContent struct { +} + +func (o *V1CloudConfigsEdgeUIDClusterConfigNoContent) Error() string { + return fmt.Sprintf("[PUT /v1/cloudconfigs/edge/{configUid}/clusterConfig][%d] v1CloudConfigsEdgeUidClusterConfigNoContent ", 204) +} + +func (o *V1CloudConfigsEdgeUIDClusterConfigNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_cloud_configs_eks_get_parameters.go b/api/client/v1/v1_cloud_configs_eks_get_parameters.go new file mode 100644 index 00000000..e280031e --- /dev/null +++ b/api/client/v1/v1_cloud_configs_eks_get_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1CloudConfigsEksGetParams creates a new V1CloudConfigsEksGetParams object +// with the default values initialized. +func NewV1CloudConfigsEksGetParams() *V1CloudConfigsEksGetParams { + var () + return &V1CloudConfigsEksGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudConfigsEksGetParamsWithTimeout creates a new V1CloudConfigsEksGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudConfigsEksGetParamsWithTimeout(timeout time.Duration) *V1CloudConfigsEksGetParams { + var () + return &V1CloudConfigsEksGetParams{ + + timeout: timeout, + } +} + +// NewV1CloudConfigsEksGetParamsWithContext creates a new V1CloudConfigsEksGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudConfigsEksGetParamsWithContext(ctx context.Context) *V1CloudConfigsEksGetParams { + var () + return &V1CloudConfigsEksGetParams{ + + Context: ctx, + } +} + +// NewV1CloudConfigsEksGetParamsWithHTTPClient creates a new V1CloudConfigsEksGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudConfigsEksGetParamsWithHTTPClient(client *http.Client) *V1CloudConfigsEksGetParams { + var () + return &V1CloudConfigsEksGetParams{ + HTTPClient: client, + } +} + +/* +V1CloudConfigsEksGetParams contains all the parameters to send to the API endpoint +for the v1 cloud configs eks get operation typically these are written to a http.Request +*/ +type V1CloudConfigsEksGetParams struct { + + /*ConfigUID + Cluster's cloud config uid + + */ + ConfigUID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud configs eks get params +func (o *V1CloudConfigsEksGetParams) WithTimeout(timeout time.Duration) *V1CloudConfigsEksGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud configs eks get params +func (o *V1CloudConfigsEksGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud configs eks get params +func (o *V1CloudConfigsEksGetParams) WithContext(ctx context.Context) *V1CloudConfigsEksGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud configs eks get params +func (o *V1CloudConfigsEksGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud configs eks get params +func (o *V1CloudConfigsEksGetParams) WithHTTPClient(client *http.Client) *V1CloudConfigsEksGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud configs eks get params +func (o *V1CloudConfigsEksGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithConfigUID adds the configUID to the v1 cloud configs eks get params +func (o *V1CloudConfigsEksGetParams) WithConfigUID(configUID string) *V1CloudConfigsEksGetParams { + o.SetConfigUID(configUID) + return o +} + +// SetConfigUID adds the configUid to the v1 cloud configs eks get params +func (o *V1CloudConfigsEksGetParams) SetConfigUID(configUID string) { + o.ConfigUID = configUID +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudConfigsEksGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param configUid + if err := r.SetPathParam("configUid", o.ConfigUID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_configs_eks_get_responses.go b/api/client/v1/v1_cloud_configs_eks_get_responses.go new file mode 100644 index 00000000..0a690675 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_eks_get_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1CloudConfigsEksGetReader is a Reader for the V1CloudConfigsEksGet structure. +type V1CloudConfigsEksGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudConfigsEksGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1CloudConfigsEksGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudConfigsEksGetOK creates a V1CloudConfigsEksGetOK with default headers values +func NewV1CloudConfigsEksGetOK() *V1CloudConfigsEksGetOK { + return &V1CloudConfigsEksGetOK{} +} + +/* +V1CloudConfigsEksGetOK handles this case with default header values. + +OK +*/ +type V1CloudConfigsEksGetOK struct { + Payload *models.V1EksCloudConfig +} + +func (o *V1CloudConfigsEksGetOK) Error() string { + return fmt.Sprintf("[GET /v1/cloudconfigs/eks/{configUid}][%d] v1CloudConfigsEksGetOK %+v", 200, o.Payload) +} + +func (o *V1CloudConfigsEksGetOK) GetPayload() *models.V1EksCloudConfig { + return o.Payload +} + +func (o *V1CloudConfigsEksGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1EksCloudConfig) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_cloud_configs_eks_machine_pool_create_parameters.go b/api/client/v1/v1_cloud_configs_eks_machine_pool_create_parameters.go new file mode 100644 index 00000000..0ddcbca2 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_eks_machine_pool_create_parameters.go @@ -0,0 +1,157 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1CloudConfigsEksMachinePoolCreateParams creates a new V1CloudConfigsEksMachinePoolCreateParams object +// with the default values initialized. +func NewV1CloudConfigsEksMachinePoolCreateParams() *V1CloudConfigsEksMachinePoolCreateParams { + var () + return &V1CloudConfigsEksMachinePoolCreateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudConfigsEksMachinePoolCreateParamsWithTimeout creates a new V1CloudConfigsEksMachinePoolCreateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudConfigsEksMachinePoolCreateParamsWithTimeout(timeout time.Duration) *V1CloudConfigsEksMachinePoolCreateParams { + var () + return &V1CloudConfigsEksMachinePoolCreateParams{ + + timeout: timeout, + } +} + +// NewV1CloudConfigsEksMachinePoolCreateParamsWithContext creates a new V1CloudConfigsEksMachinePoolCreateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudConfigsEksMachinePoolCreateParamsWithContext(ctx context.Context) *V1CloudConfigsEksMachinePoolCreateParams { + var () + return &V1CloudConfigsEksMachinePoolCreateParams{ + + Context: ctx, + } +} + +// NewV1CloudConfigsEksMachinePoolCreateParamsWithHTTPClient creates a new V1CloudConfigsEksMachinePoolCreateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudConfigsEksMachinePoolCreateParamsWithHTTPClient(client *http.Client) *V1CloudConfigsEksMachinePoolCreateParams { + var () + return &V1CloudConfigsEksMachinePoolCreateParams{ + HTTPClient: client, + } +} + +/* +V1CloudConfigsEksMachinePoolCreateParams contains all the parameters to send to the API endpoint +for the v1 cloud configs eks machine pool create operation typically these are written to a http.Request +*/ +type V1CloudConfigsEksMachinePoolCreateParams struct { + + /*Body*/ + Body *models.V1EksMachinePoolConfigEntity + /*ConfigUID + Cluster's cloud config uid + + */ + ConfigUID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud configs eks machine pool create params +func (o *V1CloudConfigsEksMachinePoolCreateParams) WithTimeout(timeout time.Duration) *V1CloudConfigsEksMachinePoolCreateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud configs eks machine pool create params +func (o *V1CloudConfigsEksMachinePoolCreateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud configs eks machine pool create params +func (o *V1CloudConfigsEksMachinePoolCreateParams) WithContext(ctx context.Context) *V1CloudConfigsEksMachinePoolCreateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud configs eks machine pool create params +func (o *V1CloudConfigsEksMachinePoolCreateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud configs eks machine pool create params +func (o *V1CloudConfigsEksMachinePoolCreateParams) WithHTTPClient(client *http.Client) *V1CloudConfigsEksMachinePoolCreateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud configs eks machine pool create params +func (o *V1CloudConfigsEksMachinePoolCreateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 cloud configs eks machine pool create params +func (o *V1CloudConfigsEksMachinePoolCreateParams) WithBody(body *models.V1EksMachinePoolConfigEntity) *V1CloudConfigsEksMachinePoolCreateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 cloud configs eks machine pool create params +func (o *V1CloudConfigsEksMachinePoolCreateParams) SetBody(body *models.V1EksMachinePoolConfigEntity) { + o.Body = body +} + +// WithConfigUID adds the configUID to the v1 cloud configs eks machine pool create params +func (o *V1CloudConfigsEksMachinePoolCreateParams) WithConfigUID(configUID string) *V1CloudConfigsEksMachinePoolCreateParams { + o.SetConfigUID(configUID) + return o +} + +// SetConfigUID adds the configUid to the v1 cloud configs eks machine pool create params +func (o *V1CloudConfigsEksMachinePoolCreateParams) SetConfigUID(configUID string) { + o.ConfigUID = configUID +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudConfigsEksMachinePoolCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param configUid + if err := r.SetPathParam("configUid", o.ConfigUID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_configs_eks_machine_pool_create_responses.go b/api/client/v1/v1_cloud_configs_eks_machine_pool_create_responses.go new file mode 100644 index 00000000..214bfcec --- /dev/null +++ b/api/client/v1/v1_cloud_configs_eks_machine_pool_create_responses.go @@ -0,0 +1,77 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1CloudConfigsEksMachinePoolCreateReader is a Reader for the V1CloudConfigsEksMachinePoolCreate structure. +type V1CloudConfigsEksMachinePoolCreateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudConfigsEksMachinePoolCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 201: + result := NewV1CloudConfigsEksMachinePoolCreateCreated() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudConfigsEksMachinePoolCreateCreated creates a V1CloudConfigsEksMachinePoolCreateCreated with default headers values +func NewV1CloudConfigsEksMachinePoolCreateCreated() *V1CloudConfigsEksMachinePoolCreateCreated { + return &V1CloudConfigsEksMachinePoolCreateCreated{} +} + +/* +V1CloudConfigsEksMachinePoolCreateCreated handles this case with default header values. + +Created successfully +*/ +type V1CloudConfigsEksMachinePoolCreateCreated struct { + /*Audit uid for the request + */ + AuditUID string + + Payload *models.V1UID +} + +func (o *V1CloudConfigsEksMachinePoolCreateCreated) Error() string { + return fmt.Sprintf("[POST /v1/cloudconfigs/eks/{configUid}/machinePools][%d] v1CloudConfigsEksMachinePoolCreateCreated %+v", 201, o.Payload) +} + +func (o *V1CloudConfigsEksMachinePoolCreateCreated) GetPayload() *models.V1UID { + return o.Payload +} + +func (o *V1CloudConfigsEksMachinePoolCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header AuditUid + o.AuditUID = response.GetHeader("AuditUid") + + o.Payload = new(models.V1UID) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_cloud_configs_eks_machine_pool_delete_parameters.go b/api/client/v1/v1_cloud_configs_eks_machine_pool_delete_parameters.go new file mode 100644 index 00000000..e32a0a7e --- /dev/null +++ b/api/client/v1/v1_cloud_configs_eks_machine_pool_delete_parameters.go @@ -0,0 +1,157 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1CloudConfigsEksMachinePoolDeleteParams creates a new V1CloudConfigsEksMachinePoolDeleteParams object +// with the default values initialized. +func NewV1CloudConfigsEksMachinePoolDeleteParams() *V1CloudConfigsEksMachinePoolDeleteParams { + var () + return &V1CloudConfigsEksMachinePoolDeleteParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudConfigsEksMachinePoolDeleteParamsWithTimeout creates a new V1CloudConfigsEksMachinePoolDeleteParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudConfigsEksMachinePoolDeleteParamsWithTimeout(timeout time.Duration) *V1CloudConfigsEksMachinePoolDeleteParams { + var () + return &V1CloudConfigsEksMachinePoolDeleteParams{ + + timeout: timeout, + } +} + +// NewV1CloudConfigsEksMachinePoolDeleteParamsWithContext creates a new V1CloudConfigsEksMachinePoolDeleteParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudConfigsEksMachinePoolDeleteParamsWithContext(ctx context.Context) *V1CloudConfigsEksMachinePoolDeleteParams { + var () + return &V1CloudConfigsEksMachinePoolDeleteParams{ + + Context: ctx, + } +} + +// NewV1CloudConfigsEksMachinePoolDeleteParamsWithHTTPClient creates a new V1CloudConfigsEksMachinePoolDeleteParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudConfigsEksMachinePoolDeleteParamsWithHTTPClient(client *http.Client) *V1CloudConfigsEksMachinePoolDeleteParams { + var () + return &V1CloudConfigsEksMachinePoolDeleteParams{ + HTTPClient: client, + } +} + +/* +V1CloudConfigsEksMachinePoolDeleteParams contains all the parameters to send to the API endpoint +for the v1 cloud configs eks machine pool delete operation typically these are written to a http.Request +*/ +type V1CloudConfigsEksMachinePoolDeleteParams struct { + + /*ConfigUID + Cluster's cloud config uid + + */ + ConfigUID string + /*MachinePoolName + Machine pool name + + */ + MachinePoolName string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud configs eks machine pool delete params +func (o *V1CloudConfigsEksMachinePoolDeleteParams) WithTimeout(timeout time.Duration) *V1CloudConfigsEksMachinePoolDeleteParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud configs eks machine pool delete params +func (o *V1CloudConfigsEksMachinePoolDeleteParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud configs eks machine pool delete params +func (o *V1CloudConfigsEksMachinePoolDeleteParams) WithContext(ctx context.Context) *V1CloudConfigsEksMachinePoolDeleteParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud configs eks machine pool delete params +func (o *V1CloudConfigsEksMachinePoolDeleteParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud configs eks machine pool delete params +func (o *V1CloudConfigsEksMachinePoolDeleteParams) WithHTTPClient(client *http.Client) *V1CloudConfigsEksMachinePoolDeleteParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud configs eks machine pool delete params +func (o *V1CloudConfigsEksMachinePoolDeleteParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithConfigUID adds the configUID to the v1 cloud configs eks machine pool delete params +func (o *V1CloudConfigsEksMachinePoolDeleteParams) WithConfigUID(configUID string) *V1CloudConfigsEksMachinePoolDeleteParams { + o.SetConfigUID(configUID) + return o +} + +// SetConfigUID adds the configUid to the v1 cloud configs eks machine pool delete params +func (o *V1CloudConfigsEksMachinePoolDeleteParams) SetConfigUID(configUID string) { + o.ConfigUID = configUID +} + +// WithMachinePoolName adds the machinePoolName to the v1 cloud configs eks machine pool delete params +func (o *V1CloudConfigsEksMachinePoolDeleteParams) WithMachinePoolName(machinePoolName string) *V1CloudConfigsEksMachinePoolDeleteParams { + o.SetMachinePoolName(machinePoolName) + return o +} + +// SetMachinePoolName adds the machinePoolName to the v1 cloud configs eks machine pool delete params +func (o *V1CloudConfigsEksMachinePoolDeleteParams) SetMachinePoolName(machinePoolName string) { + o.MachinePoolName = machinePoolName +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudConfigsEksMachinePoolDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param configUid + if err := r.SetPathParam("configUid", o.ConfigUID); err != nil { + return err + } + + // path param machinePoolName + if err := r.SetPathParam("machinePoolName", o.MachinePoolName); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_configs_eks_machine_pool_delete_responses.go b/api/client/v1/v1_cloud_configs_eks_machine_pool_delete_responses.go new file mode 100644 index 00000000..f784c520 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_eks_machine_pool_delete_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1CloudConfigsEksMachinePoolDeleteReader is a Reader for the V1CloudConfigsEksMachinePoolDelete structure. +type V1CloudConfigsEksMachinePoolDeleteReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudConfigsEksMachinePoolDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1CloudConfigsEksMachinePoolDeleteNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudConfigsEksMachinePoolDeleteNoContent creates a V1CloudConfigsEksMachinePoolDeleteNoContent with default headers values +func NewV1CloudConfigsEksMachinePoolDeleteNoContent() *V1CloudConfigsEksMachinePoolDeleteNoContent { + return &V1CloudConfigsEksMachinePoolDeleteNoContent{} +} + +/* +V1CloudConfigsEksMachinePoolDeleteNoContent handles this case with default header values. + +The resource was deleted successfully +*/ +type V1CloudConfigsEksMachinePoolDeleteNoContent struct { +} + +func (o *V1CloudConfigsEksMachinePoolDeleteNoContent) Error() string { + return fmt.Sprintf("[DELETE /v1/cloudconfigs/eks/{configUid}/machinePools/{machinePoolName}][%d] v1CloudConfigsEksMachinePoolDeleteNoContent ", 204) +} + +func (o *V1CloudConfigsEksMachinePoolDeleteNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_cloud_configs_eks_machine_pool_update_parameters.go b/api/client/v1/v1_cloud_configs_eks_machine_pool_update_parameters.go new file mode 100644 index 00000000..071a45b3 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_eks_machine_pool_update_parameters.go @@ -0,0 +1,178 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1CloudConfigsEksMachinePoolUpdateParams creates a new V1CloudConfigsEksMachinePoolUpdateParams object +// with the default values initialized. +func NewV1CloudConfigsEksMachinePoolUpdateParams() *V1CloudConfigsEksMachinePoolUpdateParams { + var () + return &V1CloudConfigsEksMachinePoolUpdateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudConfigsEksMachinePoolUpdateParamsWithTimeout creates a new V1CloudConfigsEksMachinePoolUpdateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudConfigsEksMachinePoolUpdateParamsWithTimeout(timeout time.Duration) *V1CloudConfigsEksMachinePoolUpdateParams { + var () + return &V1CloudConfigsEksMachinePoolUpdateParams{ + + timeout: timeout, + } +} + +// NewV1CloudConfigsEksMachinePoolUpdateParamsWithContext creates a new V1CloudConfigsEksMachinePoolUpdateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudConfigsEksMachinePoolUpdateParamsWithContext(ctx context.Context) *V1CloudConfigsEksMachinePoolUpdateParams { + var () + return &V1CloudConfigsEksMachinePoolUpdateParams{ + + Context: ctx, + } +} + +// NewV1CloudConfigsEksMachinePoolUpdateParamsWithHTTPClient creates a new V1CloudConfigsEksMachinePoolUpdateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudConfigsEksMachinePoolUpdateParamsWithHTTPClient(client *http.Client) *V1CloudConfigsEksMachinePoolUpdateParams { + var () + return &V1CloudConfigsEksMachinePoolUpdateParams{ + HTTPClient: client, + } +} + +/* +V1CloudConfigsEksMachinePoolUpdateParams contains all the parameters to send to the API endpoint +for the v1 cloud configs eks machine pool update operation typically these are written to a http.Request +*/ +type V1CloudConfigsEksMachinePoolUpdateParams struct { + + /*Body*/ + Body *models.V1EksMachinePoolConfigEntity + /*ConfigUID + Cluster's cloud config uid + + */ + ConfigUID string + /*MachinePoolName + Machine pool name + + */ + MachinePoolName string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud configs eks machine pool update params +func (o *V1CloudConfigsEksMachinePoolUpdateParams) WithTimeout(timeout time.Duration) *V1CloudConfigsEksMachinePoolUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud configs eks machine pool update params +func (o *V1CloudConfigsEksMachinePoolUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud configs eks machine pool update params +func (o *V1CloudConfigsEksMachinePoolUpdateParams) WithContext(ctx context.Context) *V1CloudConfigsEksMachinePoolUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud configs eks machine pool update params +func (o *V1CloudConfigsEksMachinePoolUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud configs eks machine pool update params +func (o *V1CloudConfigsEksMachinePoolUpdateParams) WithHTTPClient(client *http.Client) *V1CloudConfigsEksMachinePoolUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud configs eks machine pool update params +func (o *V1CloudConfigsEksMachinePoolUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 cloud configs eks machine pool update params +func (o *V1CloudConfigsEksMachinePoolUpdateParams) WithBody(body *models.V1EksMachinePoolConfigEntity) *V1CloudConfigsEksMachinePoolUpdateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 cloud configs eks machine pool update params +func (o *V1CloudConfigsEksMachinePoolUpdateParams) SetBody(body *models.V1EksMachinePoolConfigEntity) { + o.Body = body +} + +// WithConfigUID adds the configUID to the v1 cloud configs eks machine pool update params +func (o *V1CloudConfigsEksMachinePoolUpdateParams) WithConfigUID(configUID string) *V1CloudConfigsEksMachinePoolUpdateParams { + o.SetConfigUID(configUID) + return o +} + +// SetConfigUID adds the configUid to the v1 cloud configs eks machine pool update params +func (o *V1CloudConfigsEksMachinePoolUpdateParams) SetConfigUID(configUID string) { + o.ConfigUID = configUID +} + +// WithMachinePoolName adds the machinePoolName to the v1 cloud configs eks machine pool update params +func (o *V1CloudConfigsEksMachinePoolUpdateParams) WithMachinePoolName(machinePoolName string) *V1CloudConfigsEksMachinePoolUpdateParams { + o.SetMachinePoolName(machinePoolName) + return o +} + +// SetMachinePoolName adds the machinePoolName to the v1 cloud configs eks machine pool update params +func (o *V1CloudConfigsEksMachinePoolUpdateParams) SetMachinePoolName(machinePoolName string) { + o.MachinePoolName = machinePoolName +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudConfigsEksMachinePoolUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param configUid + if err := r.SetPathParam("configUid", o.ConfigUID); err != nil { + return err + } + + // path param machinePoolName + if err := r.SetPathParam("machinePoolName", o.MachinePoolName); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_configs_eks_machine_pool_update_responses.go b/api/client/v1/v1_cloud_configs_eks_machine_pool_update_responses.go new file mode 100644 index 00000000..dcedbc23 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_eks_machine_pool_update_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1CloudConfigsEksMachinePoolUpdateReader is a Reader for the V1CloudConfigsEksMachinePoolUpdate structure. +type V1CloudConfigsEksMachinePoolUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudConfigsEksMachinePoolUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1CloudConfigsEksMachinePoolUpdateNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudConfigsEksMachinePoolUpdateNoContent creates a V1CloudConfigsEksMachinePoolUpdateNoContent with default headers values +func NewV1CloudConfigsEksMachinePoolUpdateNoContent() *V1CloudConfigsEksMachinePoolUpdateNoContent { + return &V1CloudConfigsEksMachinePoolUpdateNoContent{} +} + +/* +V1CloudConfigsEksMachinePoolUpdateNoContent handles this case with default header values. + +The resource was updated successfully +*/ +type V1CloudConfigsEksMachinePoolUpdateNoContent struct { +} + +func (o *V1CloudConfigsEksMachinePoolUpdateNoContent) Error() string { + return fmt.Sprintf("[PUT /v1/cloudconfigs/eks/{configUid}/machinePools/{machinePoolName}][%d] v1CloudConfigsEksMachinePoolUpdateNoContent ", 204) +} + +func (o *V1CloudConfigsEksMachinePoolUpdateNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_cloud_configs_eks_pool_machines_add_parameters.go b/api/client/v1/v1_cloud_configs_eks_pool_machines_add_parameters.go new file mode 100644 index 00000000..075cbf77 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_eks_pool_machines_add_parameters.go @@ -0,0 +1,178 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1CloudConfigsEksPoolMachinesAddParams creates a new V1CloudConfigsEksPoolMachinesAddParams object +// with the default values initialized. +func NewV1CloudConfigsEksPoolMachinesAddParams() *V1CloudConfigsEksPoolMachinesAddParams { + var () + return &V1CloudConfigsEksPoolMachinesAddParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudConfigsEksPoolMachinesAddParamsWithTimeout creates a new V1CloudConfigsEksPoolMachinesAddParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudConfigsEksPoolMachinesAddParamsWithTimeout(timeout time.Duration) *V1CloudConfigsEksPoolMachinesAddParams { + var () + return &V1CloudConfigsEksPoolMachinesAddParams{ + + timeout: timeout, + } +} + +// NewV1CloudConfigsEksPoolMachinesAddParamsWithContext creates a new V1CloudConfigsEksPoolMachinesAddParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudConfigsEksPoolMachinesAddParamsWithContext(ctx context.Context) *V1CloudConfigsEksPoolMachinesAddParams { + var () + return &V1CloudConfigsEksPoolMachinesAddParams{ + + Context: ctx, + } +} + +// NewV1CloudConfigsEksPoolMachinesAddParamsWithHTTPClient creates a new V1CloudConfigsEksPoolMachinesAddParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudConfigsEksPoolMachinesAddParamsWithHTTPClient(client *http.Client) *V1CloudConfigsEksPoolMachinesAddParams { + var () + return &V1CloudConfigsEksPoolMachinesAddParams{ + HTTPClient: client, + } +} + +/* +V1CloudConfigsEksPoolMachinesAddParams contains all the parameters to send to the API endpoint +for the v1 cloud configs eks pool machines add operation typically these are written to a http.Request +*/ +type V1CloudConfigsEksPoolMachinesAddParams struct { + + /*Body*/ + Body *models.V1AwsMachine + /*ConfigUID + Cluster's cloud config uid + + */ + ConfigUID string + /*MachinePoolName + Machine pool name + + */ + MachinePoolName string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud configs eks pool machines add params +func (o *V1CloudConfigsEksPoolMachinesAddParams) WithTimeout(timeout time.Duration) *V1CloudConfigsEksPoolMachinesAddParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud configs eks pool machines add params +func (o *V1CloudConfigsEksPoolMachinesAddParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud configs eks pool machines add params +func (o *V1CloudConfigsEksPoolMachinesAddParams) WithContext(ctx context.Context) *V1CloudConfigsEksPoolMachinesAddParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud configs eks pool machines add params +func (o *V1CloudConfigsEksPoolMachinesAddParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud configs eks pool machines add params +func (o *V1CloudConfigsEksPoolMachinesAddParams) WithHTTPClient(client *http.Client) *V1CloudConfigsEksPoolMachinesAddParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud configs eks pool machines add params +func (o *V1CloudConfigsEksPoolMachinesAddParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 cloud configs eks pool machines add params +func (o *V1CloudConfigsEksPoolMachinesAddParams) WithBody(body *models.V1AwsMachine) *V1CloudConfigsEksPoolMachinesAddParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 cloud configs eks pool machines add params +func (o *V1CloudConfigsEksPoolMachinesAddParams) SetBody(body *models.V1AwsMachine) { + o.Body = body +} + +// WithConfigUID adds the configUID to the v1 cloud configs eks pool machines add params +func (o *V1CloudConfigsEksPoolMachinesAddParams) WithConfigUID(configUID string) *V1CloudConfigsEksPoolMachinesAddParams { + o.SetConfigUID(configUID) + return o +} + +// SetConfigUID adds the configUid to the v1 cloud configs eks pool machines add params +func (o *V1CloudConfigsEksPoolMachinesAddParams) SetConfigUID(configUID string) { + o.ConfigUID = configUID +} + +// WithMachinePoolName adds the machinePoolName to the v1 cloud configs eks pool machines add params +func (o *V1CloudConfigsEksPoolMachinesAddParams) WithMachinePoolName(machinePoolName string) *V1CloudConfigsEksPoolMachinesAddParams { + o.SetMachinePoolName(machinePoolName) + return o +} + +// SetMachinePoolName adds the machinePoolName to the v1 cloud configs eks pool machines add params +func (o *V1CloudConfigsEksPoolMachinesAddParams) SetMachinePoolName(machinePoolName string) { + o.MachinePoolName = machinePoolName +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudConfigsEksPoolMachinesAddParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param configUid + if err := r.SetPathParam("configUid", o.ConfigUID); err != nil { + return err + } + + // path param machinePoolName + if err := r.SetPathParam("machinePoolName", o.MachinePoolName); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_configs_eks_pool_machines_add_responses.go b/api/client/v1/v1_cloud_configs_eks_pool_machines_add_responses.go new file mode 100644 index 00000000..f3aa45ad --- /dev/null +++ b/api/client/v1/v1_cloud_configs_eks_pool_machines_add_responses.go @@ -0,0 +1,77 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1CloudConfigsEksPoolMachinesAddReader is a Reader for the V1CloudConfigsEksPoolMachinesAdd structure. +type V1CloudConfigsEksPoolMachinesAddReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudConfigsEksPoolMachinesAddReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 201: + result := NewV1CloudConfigsEksPoolMachinesAddCreated() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudConfigsEksPoolMachinesAddCreated creates a V1CloudConfigsEksPoolMachinesAddCreated with default headers values +func NewV1CloudConfigsEksPoolMachinesAddCreated() *V1CloudConfigsEksPoolMachinesAddCreated { + return &V1CloudConfigsEksPoolMachinesAddCreated{} +} + +/* +V1CloudConfigsEksPoolMachinesAddCreated handles this case with default header values. + +Created successfully +*/ +type V1CloudConfigsEksPoolMachinesAddCreated struct { + /*Audit uid for the request + */ + AuditUID string + + Payload *models.V1UID +} + +func (o *V1CloudConfigsEksPoolMachinesAddCreated) Error() string { + return fmt.Sprintf("[POST /v1/cloudconfigs/eks/{configUid}/machinePools/{machinePoolName}/machines][%d] v1CloudConfigsEksPoolMachinesAddCreated %+v", 201, o.Payload) +} + +func (o *V1CloudConfigsEksPoolMachinesAddCreated) GetPayload() *models.V1UID { + return o.Payload +} + +func (o *V1CloudConfigsEksPoolMachinesAddCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header AuditUid + o.AuditUID = response.GetHeader("AuditUid") + + o.Payload = new(models.V1UID) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_cloud_configs_eks_pool_machines_list_parameters.go b/api/client/v1/v1_cloud_configs_eks_pool_machines_list_parameters.go new file mode 100644 index 00000000..31ffa97e --- /dev/null +++ b/api/client/v1/v1_cloud_configs_eks_pool_machines_list_parameters.go @@ -0,0 +1,365 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// NewV1CloudConfigsEksPoolMachinesListParams creates a new V1CloudConfigsEksPoolMachinesListParams object +// with the default values initialized. +func NewV1CloudConfigsEksPoolMachinesListParams() *V1CloudConfigsEksPoolMachinesListParams { + var ( + limitDefault = int64(50) + ) + return &V1CloudConfigsEksPoolMachinesListParams{ + Limit: &limitDefault, + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudConfigsEksPoolMachinesListParamsWithTimeout creates a new V1CloudConfigsEksPoolMachinesListParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudConfigsEksPoolMachinesListParamsWithTimeout(timeout time.Duration) *V1CloudConfigsEksPoolMachinesListParams { + var ( + limitDefault = int64(50) + ) + return &V1CloudConfigsEksPoolMachinesListParams{ + Limit: &limitDefault, + + timeout: timeout, + } +} + +// NewV1CloudConfigsEksPoolMachinesListParamsWithContext creates a new V1CloudConfigsEksPoolMachinesListParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudConfigsEksPoolMachinesListParamsWithContext(ctx context.Context) *V1CloudConfigsEksPoolMachinesListParams { + var ( + limitDefault = int64(50) + ) + return &V1CloudConfigsEksPoolMachinesListParams{ + Limit: &limitDefault, + + Context: ctx, + } +} + +// NewV1CloudConfigsEksPoolMachinesListParamsWithHTTPClient creates a new V1CloudConfigsEksPoolMachinesListParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudConfigsEksPoolMachinesListParamsWithHTTPClient(client *http.Client) *V1CloudConfigsEksPoolMachinesListParams { + var ( + limitDefault = int64(50) + ) + return &V1CloudConfigsEksPoolMachinesListParams{ + Limit: &limitDefault, + HTTPClient: client, + } +} + +/* +V1CloudConfigsEksPoolMachinesListParams contains all the parameters to send to the API endpoint +for the v1 cloud configs eks pool machines list operation typically these are written to a http.Request +*/ +type V1CloudConfigsEksPoolMachinesListParams struct { + + /*ConfigUID + Cluster's cloud config uid + + */ + ConfigUID string + /*Continue + continue token to paginate the subsequent data items + + */ + Continue *string + /*Fields + Set of fields to be presented in the response with values. The fields are comma separated. Eg: metadata.uid,metadata.name + + */ + Fields *string + /*Filters + Filters can be combined with AND, OR operators with field path name. Eg: metadata.name=TestServiceANDspec.cloudType=aws + + Server will be restricted to certain fields based on the indexed data for each resource. + + */ + Filters *string + /*Limit + limit is a maximum number of responses to return for a list call. Default and maximum value of the limit is 50. + If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. + + */ + Limit *int64 + /*MachinePoolName + Machine pool name + + */ + MachinePoolName string + /*Offset + offset is the next index number from which the response will start. The response offset value can be used along with continue token for the pagination. + + */ + Offset *int64 + /*OrderBy + Specify the fields with sort order. 1 indicates ascending and -1 for descending. Eg: orderBy=metadata.name=1,metadata.uid=-1 + + */ + OrderBy *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud configs eks pool machines list params +func (o *V1CloudConfigsEksPoolMachinesListParams) WithTimeout(timeout time.Duration) *V1CloudConfigsEksPoolMachinesListParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud configs eks pool machines list params +func (o *V1CloudConfigsEksPoolMachinesListParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud configs eks pool machines list params +func (o *V1CloudConfigsEksPoolMachinesListParams) WithContext(ctx context.Context) *V1CloudConfigsEksPoolMachinesListParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud configs eks pool machines list params +func (o *V1CloudConfigsEksPoolMachinesListParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud configs eks pool machines list params +func (o *V1CloudConfigsEksPoolMachinesListParams) WithHTTPClient(client *http.Client) *V1CloudConfigsEksPoolMachinesListParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud configs eks pool machines list params +func (o *V1CloudConfigsEksPoolMachinesListParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithConfigUID adds the configUID to the v1 cloud configs eks pool machines list params +func (o *V1CloudConfigsEksPoolMachinesListParams) WithConfigUID(configUID string) *V1CloudConfigsEksPoolMachinesListParams { + o.SetConfigUID(configUID) + return o +} + +// SetConfigUID adds the configUid to the v1 cloud configs eks pool machines list params +func (o *V1CloudConfigsEksPoolMachinesListParams) SetConfigUID(configUID string) { + o.ConfigUID = configUID +} + +// WithContinue adds the continueVar to the v1 cloud configs eks pool machines list params +func (o *V1CloudConfigsEksPoolMachinesListParams) WithContinue(continueVar *string) *V1CloudConfigsEksPoolMachinesListParams { + o.SetContinue(continueVar) + return o +} + +// SetContinue adds the continue to the v1 cloud configs eks pool machines list params +func (o *V1CloudConfigsEksPoolMachinesListParams) SetContinue(continueVar *string) { + o.Continue = continueVar +} + +// WithFields adds the fields to the v1 cloud configs eks pool machines list params +func (o *V1CloudConfigsEksPoolMachinesListParams) WithFields(fields *string) *V1CloudConfigsEksPoolMachinesListParams { + o.SetFields(fields) + return o +} + +// SetFields adds the fields to the v1 cloud configs eks pool machines list params +func (o *V1CloudConfigsEksPoolMachinesListParams) SetFields(fields *string) { + o.Fields = fields +} + +// WithFilters adds the filters to the v1 cloud configs eks pool machines list params +func (o *V1CloudConfigsEksPoolMachinesListParams) WithFilters(filters *string) *V1CloudConfigsEksPoolMachinesListParams { + o.SetFilters(filters) + return o +} + +// SetFilters adds the filters to the v1 cloud configs eks pool machines list params +func (o *V1CloudConfigsEksPoolMachinesListParams) SetFilters(filters *string) { + o.Filters = filters +} + +// WithLimit adds the limit to the v1 cloud configs eks pool machines list params +func (o *V1CloudConfigsEksPoolMachinesListParams) WithLimit(limit *int64) *V1CloudConfigsEksPoolMachinesListParams { + o.SetLimit(limit) + return o +} + +// SetLimit adds the limit to the v1 cloud configs eks pool machines list params +func (o *V1CloudConfigsEksPoolMachinesListParams) SetLimit(limit *int64) { + o.Limit = limit +} + +// WithMachinePoolName adds the machinePoolName to the v1 cloud configs eks pool machines list params +func (o *V1CloudConfigsEksPoolMachinesListParams) WithMachinePoolName(machinePoolName string) *V1CloudConfigsEksPoolMachinesListParams { + o.SetMachinePoolName(machinePoolName) + return o +} + +// SetMachinePoolName adds the machinePoolName to the v1 cloud configs eks pool machines list params +func (o *V1CloudConfigsEksPoolMachinesListParams) SetMachinePoolName(machinePoolName string) { + o.MachinePoolName = machinePoolName +} + +// WithOffset adds the offset to the v1 cloud configs eks pool machines list params +func (o *V1CloudConfigsEksPoolMachinesListParams) WithOffset(offset *int64) *V1CloudConfigsEksPoolMachinesListParams { + o.SetOffset(offset) + return o +} + +// SetOffset adds the offset to the v1 cloud configs eks pool machines list params +func (o *V1CloudConfigsEksPoolMachinesListParams) SetOffset(offset *int64) { + o.Offset = offset +} + +// WithOrderBy adds the orderBy to the v1 cloud configs eks pool machines list params +func (o *V1CloudConfigsEksPoolMachinesListParams) WithOrderBy(orderBy *string) *V1CloudConfigsEksPoolMachinesListParams { + o.SetOrderBy(orderBy) + return o +} + +// SetOrderBy adds the orderBy to the v1 cloud configs eks pool machines list params +func (o *V1CloudConfigsEksPoolMachinesListParams) SetOrderBy(orderBy *string) { + o.OrderBy = orderBy +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudConfigsEksPoolMachinesListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param configUid + if err := r.SetPathParam("configUid", o.ConfigUID); err != nil { + return err + } + + if o.Continue != nil { + + // query param continue + var qrContinue string + if o.Continue != nil { + qrContinue = *o.Continue + } + qContinue := qrContinue + if qContinue != "" { + if err := r.SetQueryParam("continue", qContinue); err != nil { + return err + } + } + + } + + if o.Fields != nil { + + // query param fields + var qrFields string + if o.Fields != nil { + qrFields = *o.Fields + } + qFields := qrFields + if qFields != "" { + if err := r.SetQueryParam("fields", qFields); err != nil { + return err + } + } + + } + + if o.Filters != nil { + + // query param filters + var qrFilters string + if o.Filters != nil { + qrFilters = *o.Filters + } + qFilters := qrFilters + if qFilters != "" { + if err := r.SetQueryParam("filters", qFilters); err != nil { + return err + } + } + + } + + if o.Limit != nil { + + // query param limit + var qrLimit int64 + if o.Limit != nil { + qrLimit = *o.Limit + } + qLimit := swag.FormatInt64(qrLimit) + if qLimit != "" { + if err := r.SetQueryParam("limit", qLimit); err != nil { + return err + } + } + + } + + // path param machinePoolName + if err := r.SetPathParam("machinePoolName", o.MachinePoolName); err != nil { + return err + } + + if o.Offset != nil { + + // query param offset + var qrOffset int64 + if o.Offset != nil { + qrOffset = *o.Offset + } + qOffset := swag.FormatInt64(qrOffset) + if qOffset != "" { + if err := r.SetQueryParam("offset", qOffset); err != nil { + return err + } + } + + } + + if o.OrderBy != nil { + + // query param orderBy + var qrOrderBy string + if o.OrderBy != nil { + qrOrderBy = *o.OrderBy + } + qOrderBy := qrOrderBy + if qOrderBy != "" { + if err := r.SetQueryParam("orderBy", qOrderBy); err != nil { + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_configs_eks_pool_machines_list_responses.go b/api/client/v1/v1_cloud_configs_eks_pool_machines_list_responses.go new file mode 100644 index 00000000..cd3595bf --- /dev/null +++ b/api/client/v1/v1_cloud_configs_eks_pool_machines_list_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1CloudConfigsEksPoolMachinesListReader is a Reader for the V1CloudConfigsEksPoolMachinesList structure. +type V1CloudConfigsEksPoolMachinesListReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudConfigsEksPoolMachinesListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1CloudConfigsEksPoolMachinesListOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudConfigsEksPoolMachinesListOK creates a V1CloudConfigsEksPoolMachinesListOK with default headers values +func NewV1CloudConfigsEksPoolMachinesListOK() *V1CloudConfigsEksPoolMachinesListOK { + return &V1CloudConfigsEksPoolMachinesListOK{} +} + +/* +V1CloudConfigsEksPoolMachinesListOK handles this case with default header values. + +An array of EKS machine items +*/ +type V1CloudConfigsEksPoolMachinesListOK struct { + Payload *models.V1AwsMachines +} + +func (o *V1CloudConfigsEksPoolMachinesListOK) Error() string { + return fmt.Sprintf("[GET /v1/cloudconfigs/eks/{configUid}/machinePools/{machinePoolName}/machines][%d] v1CloudConfigsEksPoolMachinesListOK %+v", 200, o.Payload) +} + +func (o *V1CloudConfigsEksPoolMachinesListOK) GetPayload() *models.V1AwsMachines { + return o.Payload +} + +func (o *V1CloudConfigsEksPoolMachinesListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1AwsMachines) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_cloud_configs_eks_pool_machines_uid_delete_parameters.go b/api/client/v1/v1_cloud_configs_eks_pool_machines_uid_delete_parameters.go new file mode 100644 index 00000000..12bd420a --- /dev/null +++ b/api/client/v1/v1_cloud_configs_eks_pool_machines_uid_delete_parameters.go @@ -0,0 +1,178 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1CloudConfigsEksPoolMachinesUIDDeleteParams creates a new V1CloudConfigsEksPoolMachinesUIDDeleteParams object +// with the default values initialized. +func NewV1CloudConfigsEksPoolMachinesUIDDeleteParams() *V1CloudConfigsEksPoolMachinesUIDDeleteParams { + var () + return &V1CloudConfigsEksPoolMachinesUIDDeleteParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudConfigsEksPoolMachinesUIDDeleteParamsWithTimeout creates a new V1CloudConfigsEksPoolMachinesUIDDeleteParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudConfigsEksPoolMachinesUIDDeleteParamsWithTimeout(timeout time.Duration) *V1CloudConfigsEksPoolMachinesUIDDeleteParams { + var () + return &V1CloudConfigsEksPoolMachinesUIDDeleteParams{ + + timeout: timeout, + } +} + +// NewV1CloudConfigsEksPoolMachinesUIDDeleteParamsWithContext creates a new V1CloudConfigsEksPoolMachinesUIDDeleteParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudConfigsEksPoolMachinesUIDDeleteParamsWithContext(ctx context.Context) *V1CloudConfigsEksPoolMachinesUIDDeleteParams { + var () + return &V1CloudConfigsEksPoolMachinesUIDDeleteParams{ + + Context: ctx, + } +} + +// NewV1CloudConfigsEksPoolMachinesUIDDeleteParamsWithHTTPClient creates a new V1CloudConfigsEksPoolMachinesUIDDeleteParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudConfigsEksPoolMachinesUIDDeleteParamsWithHTTPClient(client *http.Client) *V1CloudConfigsEksPoolMachinesUIDDeleteParams { + var () + return &V1CloudConfigsEksPoolMachinesUIDDeleteParams{ + HTTPClient: client, + } +} + +/* +V1CloudConfigsEksPoolMachinesUIDDeleteParams contains all the parameters to send to the API endpoint +for the v1 cloud configs eks pool machines Uid delete operation typically these are written to a http.Request +*/ +type V1CloudConfigsEksPoolMachinesUIDDeleteParams struct { + + /*ConfigUID + Cluster's cloud config uid + + */ + ConfigUID string + /*MachinePoolName + Machine pool name + + */ + MachinePoolName string + /*MachineUID + Machine uid + + */ + MachineUID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud configs eks pool machines Uid delete params +func (o *V1CloudConfigsEksPoolMachinesUIDDeleteParams) WithTimeout(timeout time.Duration) *V1CloudConfigsEksPoolMachinesUIDDeleteParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud configs eks pool machines Uid delete params +func (o *V1CloudConfigsEksPoolMachinesUIDDeleteParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud configs eks pool machines Uid delete params +func (o *V1CloudConfigsEksPoolMachinesUIDDeleteParams) WithContext(ctx context.Context) *V1CloudConfigsEksPoolMachinesUIDDeleteParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud configs eks pool machines Uid delete params +func (o *V1CloudConfigsEksPoolMachinesUIDDeleteParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud configs eks pool machines Uid delete params +func (o *V1CloudConfigsEksPoolMachinesUIDDeleteParams) WithHTTPClient(client *http.Client) *V1CloudConfigsEksPoolMachinesUIDDeleteParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud configs eks pool machines Uid delete params +func (o *V1CloudConfigsEksPoolMachinesUIDDeleteParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithConfigUID adds the configUID to the v1 cloud configs eks pool machines Uid delete params +func (o *V1CloudConfigsEksPoolMachinesUIDDeleteParams) WithConfigUID(configUID string) *V1CloudConfigsEksPoolMachinesUIDDeleteParams { + o.SetConfigUID(configUID) + return o +} + +// SetConfigUID adds the configUid to the v1 cloud configs eks pool machines Uid delete params +func (o *V1CloudConfigsEksPoolMachinesUIDDeleteParams) SetConfigUID(configUID string) { + o.ConfigUID = configUID +} + +// WithMachinePoolName adds the machinePoolName to the v1 cloud configs eks pool machines Uid delete params +func (o *V1CloudConfigsEksPoolMachinesUIDDeleteParams) WithMachinePoolName(machinePoolName string) *V1CloudConfigsEksPoolMachinesUIDDeleteParams { + o.SetMachinePoolName(machinePoolName) + return o +} + +// SetMachinePoolName adds the machinePoolName to the v1 cloud configs eks pool machines Uid delete params +func (o *V1CloudConfigsEksPoolMachinesUIDDeleteParams) SetMachinePoolName(machinePoolName string) { + o.MachinePoolName = machinePoolName +} + +// WithMachineUID adds the machineUID to the v1 cloud configs eks pool machines Uid delete params +func (o *V1CloudConfigsEksPoolMachinesUIDDeleteParams) WithMachineUID(machineUID string) *V1CloudConfigsEksPoolMachinesUIDDeleteParams { + o.SetMachineUID(machineUID) + return o +} + +// SetMachineUID adds the machineUid to the v1 cloud configs eks pool machines Uid delete params +func (o *V1CloudConfigsEksPoolMachinesUIDDeleteParams) SetMachineUID(machineUID string) { + o.MachineUID = machineUID +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudConfigsEksPoolMachinesUIDDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param configUid + if err := r.SetPathParam("configUid", o.ConfigUID); err != nil { + return err + } + + // path param machinePoolName + if err := r.SetPathParam("machinePoolName", o.MachinePoolName); err != nil { + return err + } + + // path param machineUid + if err := r.SetPathParam("machineUid", o.MachineUID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_configs_eks_pool_machines_uid_delete_responses.go b/api/client/v1/v1_cloud_configs_eks_pool_machines_uid_delete_responses.go new file mode 100644 index 00000000..1cfacf55 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_eks_pool_machines_uid_delete_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1CloudConfigsEksPoolMachinesUIDDeleteReader is a Reader for the V1CloudConfigsEksPoolMachinesUIDDelete structure. +type V1CloudConfigsEksPoolMachinesUIDDeleteReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudConfigsEksPoolMachinesUIDDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1CloudConfigsEksPoolMachinesUIDDeleteNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudConfigsEksPoolMachinesUIDDeleteNoContent creates a V1CloudConfigsEksPoolMachinesUIDDeleteNoContent with default headers values +func NewV1CloudConfigsEksPoolMachinesUIDDeleteNoContent() *V1CloudConfigsEksPoolMachinesUIDDeleteNoContent { + return &V1CloudConfigsEksPoolMachinesUIDDeleteNoContent{} +} + +/* +V1CloudConfigsEksPoolMachinesUIDDeleteNoContent handles this case with default header values. + +The resource was deleted successfully +*/ +type V1CloudConfigsEksPoolMachinesUIDDeleteNoContent struct { +} + +func (o *V1CloudConfigsEksPoolMachinesUIDDeleteNoContent) Error() string { + return fmt.Sprintf("[DELETE /v1/cloudconfigs/eks/{configUid}/machinePools/{machinePoolName}/machines/{machineUid}][%d] v1CloudConfigsEksPoolMachinesUidDeleteNoContent ", 204) +} + +func (o *V1CloudConfigsEksPoolMachinesUIDDeleteNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_cloud_configs_eks_pool_machines_uid_get_parameters.go b/api/client/v1/v1_cloud_configs_eks_pool_machines_uid_get_parameters.go new file mode 100644 index 00000000..ad1f3bbb --- /dev/null +++ b/api/client/v1/v1_cloud_configs_eks_pool_machines_uid_get_parameters.go @@ -0,0 +1,178 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1CloudConfigsEksPoolMachinesUIDGetParams creates a new V1CloudConfigsEksPoolMachinesUIDGetParams object +// with the default values initialized. +func NewV1CloudConfigsEksPoolMachinesUIDGetParams() *V1CloudConfigsEksPoolMachinesUIDGetParams { + var () + return &V1CloudConfigsEksPoolMachinesUIDGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudConfigsEksPoolMachinesUIDGetParamsWithTimeout creates a new V1CloudConfigsEksPoolMachinesUIDGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudConfigsEksPoolMachinesUIDGetParamsWithTimeout(timeout time.Duration) *V1CloudConfigsEksPoolMachinesUIDGetParams { + var () + return &V1CloudConfigsEksPoolMachinesUIDGetParams{ + + timeout: timeout, + } +} + +// NewV1CloudConfigsEksPoolMachinesUIDGetParamsWithContext creates a new V1CloudConfigsEksPoolMachinesUIDGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudConfigsEksPoolMachinesUIDGetParamsWithContext(ctx context.Context) *V1CloudConfigsEksPoolMachinesUIDGetParams { + var () + return &V1CloudConfigsEksPoolMachinesUIDGetParams{ + + Context: ctx, + } +} + +// NewV1CloudConfigsEksPoolMachinesUIDGetParamsWithHTTPClient creates a new V1CloudConfigsEksPoolMachinesUIDGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudConfigsEksPoolMachinesUIDGetParamsWithHTTPClient(client *http.Client) *V1CloudConfigsEksPoolMachinesUIDGetParams { + var () + return &V1CloudConfigsEksPoolMachinesUIDGetParams{ + HTTPClient: client, + } +} + +/* +V1CloudConfigsEksPoolMachinesUIDGetParams contains all the parameters to send to the API endpoint +for the v1 cloud configs eks pool machines Uid get operation typically these are written to a http.Request +*/ +type V1CloudConfigsEksPoolMachinesUIDGetParams struct { + + /*ConfigUID + Cluster's cloud config uid + + */ + ConfigUID string + /*MachinePoolName + Machine pool name + + */ + MachinePoolName string + /*MachineUID + Machine uid + + */ + MachineUID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud configs eks pool machines Uid get params +func (o *V1CloudConfigsEksPoolMachinesUIDGetParams) WithTimeout(timeout time.Duration) *V1CloudConfigsEksPoolMachinesUIDGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud configs eks pool machines Uid get params +func (o *V1CloudConfigsEksPoolMachinesUIDGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud configs eks pool machines Uid get params +func (o *V1CloudConfigsEksPoolMachinesUIDGetParams) WithContext(ctx context.Context) *V1CloudConfigsEksPoolMachinesUIDGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud configs eks pool machines Uid get params +func (o *V1CloudConfigsEksPoolMachinesUIDGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud configs eks pool machines Uid get params +func (o *V1CloudConfigsEksPoolMachinesUIDGetParams) WithHTTPClient(client *http.Client) *V1CloudConfigsEksPoolMachinesUIDGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud configs eks pool machines Uid get params +func (o *V1CloudConfigsEksPoolMachinesUIDGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithConfigUID adds the configUID to the v1 cloud configs eks pool machines Uid get params +func (o *V1CloudConfigsEksPoolMachinesUIDGetParams) WithConfigUID(configUID string) *V1CloudConfigsEksPoolMachinesUIDGetParams { + o.SetConfigUID(configUID) + return o +} + +// SetConfigUID adds the configUid to the v1 cloud configs eks pool machines Uid get params +func (o *V1CloudConfigsEksPoolMachinesUIDGetParams) SetConfigUID(configUID string) { + o.ConfigUID = configUID +} + +// WithMachinePoolName adds the machinePoolName to the v1 cloud configs eks pool machines Uid get params +func (o *V1CloudConfigsEksPoolMachinesUIDGetParams) WithMachinePoolName(machinePoolName string) *V1CloudConfigsEksPoolMachinesUIDGetParams { + o.SetMachinePoolName(machinePoolName) + return o +} + +// SetMachinePoolName adds the machinePoolName to the v1 cloud configs eks pool machines Uid get params +func (o *V1CloudConfigsEksPoolMachinesUIDGetParams) SetMachinePoolName(machinePoolName string) { + o.MachinePoolName = machinePoolName +} + +// WithMachineUID adds the machineUID to the v1 cloud configs eks pool machines Uid get params +func (o *V1CloudConfigsEksPoolMachinesUIDGetParams) WithMachineUID(machineUID string) *V1CloudConfigsEksPoolMachinesUIDGetParams { + o.SetMachineUID(machineUID) + return o +} + +// SetMachineUID adds the machineUid to the v1 cloud configs eks pool machines Uid get params +func (o *V1CloudConfigsEksPoolMachinesUIDGetParams) SetMachineUID(machineUID string) { + o.MachineUID = machineUID +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudConfigsEksPoolMachinesUIDGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param configUid + if err := r.SetPathParam("configUid", o.ConfigUID); err != nil { + return err + } + + // path param machinePoolName + if err := r.SetPathParam("machinePoolName", o.MachinePoolName); err != nil { + return err + } + + // path param machineUid + if err := r.SetPathParam("machineUid", o.MachineUID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_configs_eks_pool_machines_uid_get_responses.go b/api/client/v1/v1_cloud_configs_eks_pool_machines_uid_get_responses.go new file mode 100644 index 00000000..630138d8 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_eks_pool_machines_uid_get_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1CloudConfigsEksPoolMachinesUIDGetReader is a Reader for the V1CloudConfigsEksPoolMachinesUIDGet structure. +type V1CloudConfigsEksPoolMachinesUIDGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudConfigsEksPoolMachinesUIDGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1CloudConfigsEksPoolMachinesUIDGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudConfigsEksPoolMachinesUIDGetOK creates a V1CloudConfigsEksPoolMachinesUIDGetOK with default headers values +func NewV1CloudConfigsEksPoolMachinesUIDGetOK() *V1CloudConfigsEksPoolMachinesUIDGetOK { + return &V1CloudConfigsEksPoolMachinesUIDGetOK{} +} + +/* +V1CloudConfigsEksPoolMachinesUIDGetOK handles this case with default header values. + +OK +*/ +type V1CloudConfigsEksPoolMachinesUIDGetOK struct { + Payload *models.V1AwsMachine +} + +func (o *V1CloudConfigsEksPoolMachinesUIDGetOK) Error() string { + return fmt.Sprintf("[GET /v1/cloudconfigs/eks/{configUid}/machinePools/{machinePoolName}/machines/{machineUid}][%d] v1CloudConfigsEksPoolMachinesUidGetOK %+v", 200, o.Payload) +} + +func (o *V1CloudConfigsEksPoolMachinesUIDGetOK) GetPayload() *models.V1AwsMachine { + return o.Payload +} + +func (o *V1CloudConfigsEksPoolMachinesUIDGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1AwsMachine) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_cloud_configs_eks_pool_machines_uid_update_parameters.go b/api/client/v1/v1_cloud_configs_eks_pool_machines_uid_update_parameters.go new file mode 100644 index 00000000..adf6bfef --- /dev/null +++ b/api/client/v1/v1_cloud_configs_eks_pool_machines_uid_update_parameters.go @@ -0,0 +1,199 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1CloudConfigsEksPoolMachinesUIDUpdateParams creates a new V1CloudConfigsEksPoolMachinesUIDUpdateParams object +// with the default values initialized. +func NewV1CloudConfigsEksPoolMachinesUIDUpdateParams() *V1CloudConfigsEksPoolMachinesUIDUpdateParams { + var () + return &V1CloudConfigsEksPoolMachinesUIDUpdateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudConfigsEksPoolMachinesUIDUpdateParamsWithTimeout creates a new V1CloudConfigsEksPoolMachinesUIDUpdateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudConfigsEksPoolMachinesUIDUpdateParamsWithTimeout(timeout time.Duration) *V1CloudConfigsEksPoolMachinesUIDUpdateParams { + var () + return &V1CloudConfigsEksPoolMachinesUIDUpdateParams{ + + timeout: timeout, + } +} + +// NewV1CloudConfigsEksPoolMachinesUIDUpdateParamsWithContext creates a new V1CloudConfigsEksPoolMachinesUIDUpdateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudConfigsEksPoolMachinesUIDUpdateParamsWithContext(ctx context.Context) *V1CloudConfigsEksPoolMachinesUIDUpdateParams { + var () + return &V1CloudConfigsEksPoolMachinesUIDUpdateParams{ + + Context: ctx, + } +} + +// NewV1CloudConfigsEksPoolMachinesUIDUpdateParamsWithHTTPClient creates a new V1CloudConfigsEksPoolMachinesUIDUpdateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudConfigsEksPoolMachinesUIDUpdateParamsWithHTTPClient(client *http.Client) *V1CloudConfigsEksPoolMachinesUIDUpdateParams { + var () + return &V1CloudConfigsEksPoolMachinesUIDUpdateParams{ + HTTPClient: client, + } +} + +/* +V1CloudConfigsEksPoolMachinesUIDUpdateParams contains all the parameters to send to the API endpoint +for the v1 cloud configs eks pool machines Uid update operation typically these are written to a http.Request +*/ +type V1CloudConfigsEksPoolMachinesUIDUpdateParams struct { + + /*Body*/ + Body *models.V1AwsMachine + /*ConfigUID + Cluster's cloud config uid + + */ + ConfigUID string + /*MachinePoolName + Machine pool name + + */ + MachinePoolName string + /*MachineUID + Machine uid + + */ + MachineUID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud configs eks pool machines Uid update params +func (o *V1CloudConfigsEksPoolMachinesUIDUpdateParams) WithTimeout(timeout time.Duration) *V1CloudConfigsEksPoolMachinesUIDUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud configs eks pool machines Uid update params +func (o *V1CloudConfigsEksPoolMachinesUIDUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud configs eks pool machines Uid update params +func (o *V1CloudConfigsEksPoolMachinesUIDUpdateParams) WithContext(ctx context.Context) *V1CloudConfigsEksPoolMachinesUIDUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud configs eks pool machines Uid update params +func (o *V1CloudConfigsEksPoolMachinesUIDUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud configs eks pool machines Uid update params +func (o *V1CloudConfigsEksPoolMachinesUIDUpdateParams) WithHTTPClient(client *http.Client) *V1CloudConfigsEksPoolMachinesUIDUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud configs eks pool machines Uid update params +func (o *V1CloudConfigsEksPoolMachinesUIDUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 cloud configs eks pool machines Uid update params +func (o *V1CloudConfigsEksPoolMachinesUIDUpdateParams) WithBody(body *models.V1AwsMachine) *V1CloudConfigsEksPoolMachinesUIDUpdateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 cloud configs eks pool machines Uid update params +func (o *V1CloudConfigsEksPoolMachinesUIDUpdateParams) SetBody(body *models.V1AwsMachine) { + o.Body = body +} + +// WithConfigUID adds the configUID to the v1 cloud configs eks pool machines Uid update params +func (o *V1CloudConfigsEksPoolMachinesUIDUpdateParams) WithConfigUID(configUID string) *V1CloudConfigsEksPoolMachinesUIDUpdateParams { + o.SetConfigUID(configUID) + return o +} + +// SetConfigUID adds the configUid to the v1 cloud configs eks pool machines Uid update params +func (o *V1CloudConfigsEksPoolMachinesUIDUpdateParams) SetConfigUID(configUID string) { + o.ConfigUID = configUID +} + +// WithMachinePoolName adds the machinePoolName to the v1 cloud configs eks pool machines Uid update params +func (o *V1CloudConfigsEksPoolMachinesUIDUpdateParams) WithMachinePoolName(machinePoolName string) *V1CloudConfigsEksPoolMachinesUIDUpdateParams { + o.SetMachinePoolName(machinePoolName) + return o +} + +// SetMachinePoolName adds the machinePoolName to the v1 cloud configs eks pool machines Uid update params +func (o *V1CloudConfigsEksPoolMachinesUIDUpdateParams) SetMachinePoolName(machinePoolName string) { + o.MachinePoolName = machinePoolName +} + +// WithMachineUID adds the machineUID to the v1 cloud configs eks pool machines Uid update params +func (o *V1CloudConfigsEksPoolMachinesUIDUpdateParams) WithMachineUID(machineUID string) *V1CloudConfigsEksPoolMachinesUIDUpdateParams { + o.SetMachineUID(machineUID) + return o +} + +// SetMachineUID adds the machineUid to the v1 cloud configs eks pool machines Uid update params +func (o *V1CloudConfigsEksPoolMachinesUIDUpdateParams) SetMachineUID(machineUID string) { + o.MachineUID = machineUID +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudConfigsEksPoolMachinesUIDUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param configUid + if err := r.SetPathParam("configUid", o.ConfigUID); err != nil { + return err + } + + // path param machinePoolName + if err := r.SetPathParam("machinePoolName", o.MachinePoolName); err != nil { + return err + } + + // path param machineUid + if err := r.SetPathParam("machineUid", o.MachineUID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_configs_eks_pool_machines_uid_update_responses.go b/api/client/v1/v1_cloud_configs_eks_pool_machines_uid_update_responses.go new file mode 100644 index 00000000..8e9af883 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_eks_pool_machines_uid_update_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1CloudConfigsEksPoolMachinesUIDUpdateReader is a Reader for the V1CloudConfigsEksPoolMachinesUIDUpdate structure. +type V1CloudConfigsEksPoolMachinesUIDUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudConfigsEksPoolMachinesUIDUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1CloudConfigsEksPoolMachinesUIDUpdateNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudConfigsEksPoolMachinesUIDUpdateNoContent creates a V1CloudConfigsEksPoolMachinesUIDUpdateNoContent with default headers values +func NewV1CloudConfigsEksPoolMachinesUIDUpdateNoContent() *V1CloudConfigsEksPoolMachinesUIDUpdateNoContent { + return &V1CloudConfigsEksPoolMachinesUIDUpdateNoContent{} +} + +/* +V1CloudConfigsEksPoolMachinesUIDUpdateNoContent handles this case with default header values. + +The resource was updated successfully +*/ +type V1CloudConfigsEksPoolMachinesUIDUpdateNoContent struct { +} + +func (o *V1CloudConfigsEksPoolMachinesUIDUpdateNoContent) Error() string { + return fmt.Sprintf("[PUT /v1/cloudconfigs/eks/{configUid}/machinePools/{machinePoolName}/machines/{machineUid}][%d] v1CloudConfigsEksPoolMachinesUidUpdateNoContent ", 204) +} + +func (o *V1CloudConfigsEksPoolMachinesUIDUpdateNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_cloud_configs_eks_uid_cluster_config_parameters.go b/api/client/v1/v1_cloud_configs_eks_uid_cluster_config_parameters.go new file mode 100644 index 00000000..5cf2b5eb --- /dev/null +++ b/api/client/v1/v1_cloud_configs_eks_uid_cluster_config_parameters.go @@ -0,0 +1,157 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1CloudConfigsEksUIDClusterConfigParams creates a new V1CloudConfigsEksUIDClusterConfigParams object +// with the default values initialized. +func NewV1CloudConfigsEksUIDClusterConfigParams() *V1CloudConfigsEksUIDClusterConfigParams { + var () + return &V1CloudConfigsEksUIDClusterConfigParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudConfigsEksUIDClusterConfigParamsWithTimeout creates a new V1CloudConfigsEksUIDClusterConfigParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudConfigsEksUIDClusterConfigParamsWithTimeout(timeout time.Duration) *V1CloudConfigsEksUIDClusterConfigParams { + var () + return &V1CloudConfigsEksUIDClusterConfigParams{ + + timeout: timeout, + } +} + +// NewV1CloudConfigsEksUIDClusterConfigParamsWithContext creates a new V1CloudConfigsEksUIDClusterConfigParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudConfigsEksUIDClusterConfigParamsWithContext(ctx context.Context) *V1CloudConfigsEksUIDClusterConfigParams { + var () + return &V1CloudConfigsEksUIDClusterConfigParams{ + + Context: ctx, + } +} + +// NewV1CloudConfigsEksUIDClusterConfigParamsWithHTTPClient creates a new V1CloudConfigsEksUIDClusterConfigParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudConfigsEksUIDClusterConfigParamsWithHTTPClient(client *http.Client) *V1CloudConfigsEksUIDClusterConfigParams { + var () + return &V1CloudConfigsEksUIDClusterConfigParams{ + HTTPClient: client, + } +} + +/* +V1CloudConfigsEksUIDClusterConfigParams contains all the parameters to send to the API endpoint +for the v1 cloud configs eks Uid cluster config operation typically these are written to a http.Request +*/ +type V1CloudConfigsEksUIDClusterConfigParams struct { + + /*Body*/ + Body *models.V1EksCloudClusterConfigEntity + /*ConfigUID + Cluster's cloud config uid + + */ + ConfigUID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud configs eks Uid cluster config params +func (o *V1CloudConfigsEksUIDClusterConfigParams) WithTimeout(timeout time.Duration) *V1CloudConfigsEksUIDClusterConfigParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud configs eks Uid cluster config params +func (o *V1CloudConfigsEksUIDClusterConfigParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud configs eks Uid cluster config params +func (o *V1CloudConfigsEksUIDClusterConfigParams) WithContext(ctx context.Context) *V1CloudConfigsEksUIDClusterConfigParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud configs eks Uid cluster config params +func (o *V1CloudConfigsEksUIDClusterConfigParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud configs eks Uid cluster config params +func (o *V1CloudConfigsEksUIDClusterConfigParams) WithHTTPClient(client *http.Client) *V1CloudConfigsEksUIDClusterConfigParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud configs eks Uid cluster config params +func (o *V1CloudConfigsEksUIDClusterConfigParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 cloud configs eks Uid cluster config params +func (o *V1CloudConfigsEksUIDClusterConfigParams) WithBody(body *models.V1EksCloudClusterConfigEntity) *V1CloudConfigsEksUIDClusterConfigParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 cloud configs eks Uid cluster config params +func (o *V1CloudConfigsEksUIDClusterConfigParams) SetBody(body *models.V1EksCloudClusterConfigEntity) { + o.Body = body +} + +// WithConfigUID adds the configUID to the v1 cloud configs eks Uid cluster config params +func (o *V1CloudConfigsEksUIDClusterConfigParams) WithConfigUID(configUID string) *V1CloudConfigsEksUIDClusterConfigParams { + o.SetConfigUID(configUID) + return o +} + +// SetConfigUID adds the configUid to the v1 cloud configs eks Uid cluster config params +func (o *V1CloudConfigsEksUIDClusterConfigParams) SetConfigUID(configUID string) { + o.ConfigUID = configUID +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudConfigsEksUIDClusterConfigParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param configUid + if err := r.SetPathParam("configUid", o.ConfigUID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_configs_eks_uid_cluster_config_responses.go b/api/client/v1/v1_cloud_configs_eks_uid_cluster_config_responses.go new file mode 100644 index 00000000..f46732b0 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_eks_uid_cluster_config_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1CloudConfigsEksUIDClusterConfigReader is a Reader for the V1CloudConfigsEksUIDClusterConfig structure. +type V1CloudConfigsEksUIDClusterConfigReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudConfigsEksUIDClusterConfigReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1CloudConfigsEksUIDClusterConfigNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudConfigsEksUIDClusterConfigNoContent creates a V1CloudConfigsEksUIDClusterConfigNoContent with default headers values +func NewV1CloudConfigsEksUIDClusterConfigNoContent() *V1CloudConfigsEksUIDClusterConfigNoContent { + return &V1CloudConfigsEksUIDClusterConfigNoContent{} +} + +/* +V1CloudConfigsEksUIDClusterConfigNoContent handles this case with default header values. + +The resource was updated successfully +*/ +type V1CloudConfigsEksUIDClusterConfigNoContent struct { +} + +func (o *V1CloudConfigsEksUIDClusterConfigNoContent) Error() string { + return fmt.Sprintf("[PUT /v1/cloudconfigs/eks/{configUid}/clusterConfig][%d] v1CloudConfigsEksUidClusterConfigNoContent ", 204) +} + +func (o *V1CloudConfigsEksUIDClusterConfigNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_cloud_configs_eks_uid_fargate_profiles_update_parameters.go b/api/client/v1/v1_cloud_configs_eks_uid_fargate_profiles_update_parameters.go new file mode 100644 index 00000000..8288f343 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_eks_uid_fargate_profiles_update_parameters.go @@ -0,0 +1,157 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1CloudConfigsEksUIDFargateProfilesUpdateParams creates a new V1CloudConfigsEksUIDFargateProfilesUpdateParams object +// with the default values initialized. +func NewV1CloudConfigsEksUIDFargateProfilesUpdateParams() *V1CloudConfigsEksUIDFargateProfilesUpdateParams { + var () + return &V1CloudConfigsEksUIDFargateProfilesUpdateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudConfigsEksUIDFargateProfilesUpdateParamsWithTimeout creates a new V1CloudConfigsEksUIDFargateProfilesUpdateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudConfigsEksUIDFargateProfilesUpdateParamsWithTimeout(timeout time.Duration) *V1CloudConfigsEksUIDFargateProfilesUpdateParams { + var () + return &V1CloudConfigsEksUIDFargateProfilesUpdateParams{ + + timeout: timeout, + } +} + +// NewV1CloudConfigsEksUIDFargateProfilesUpdateParamsWithContext creates a new V1CloudConfigsEksUIDFargateProfilesUpdateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudConfigsEksUIDFargateProfilesUpdateParamsWithContext(ctx context.Context) *V1CloudConfigsEksUIDFargateProfilesUpdateParams { + var () + return &V1CloudConfigsEksUIDFargateProfilesUpdateParams{ + + Context: ctx, + } +} + +// NewV1CloudConfigsEksUIDFargateProfilesUpdateParamsWithHTTPClient creates a new V1CloudConfigsEksUIDFargateProfilesUpdateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudConfigsEksUIDFargateProfilesUpdateParamsWithHTTPClient(client *http.Client) *V1CloudConfigsEksUIDFargateProfilesUpdateParams { + var () + return &V1CloudConfigsEksUIDFargateProfilesUpdateParams{ + HTTPClient: client, + } +} + +/* +V1CloudConfigsEksUIDFargateProfilesUpdateParams contains all the parameters to send to the API endpoint +for the v1 cloud configs eks Uid fargate profiles update operation typically these are written to a http.Request +*/ +type V1CloudConfigsEksUIDFargateProfilesUpdateParams struct { + + /*Body*/ + Body *models.V1EksFargateProfiles + /*ConfigUID + Cluster's cloud config uid + + */ + ConfigUID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud configs eks Uid fargate profiles update params +func (o *V1CloudConfigsEksUIDFargateProfilesUpdateParams) WithTimeout(timeout time.Duration) *V1CloudConfigsEksUIDFargateProfilesUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud configs eks Uid fargate profiles update params +func (o *V1CloudConfigsEksUIDFargateProfilesUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud configs eks Uid fargate profiles update params +func (o *V1CloudConfigsEksUIDFargateProfilesUpdateParams) WithContext(ctx context.Context) *V1CloudConfigsEksUIDFargateProfilesUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud configs eks Uid fargate profiles update params +func (o *V1CloudConfigsEksUIDFargateProfilesUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud configs eks Uid fargate profiles update params +func (o *V1CloudConfigsEksUIDFargateProfilesUpdateParams) WithHTTPClient(client *http.Client) *V1CloudConfigsEksUIDFargateProfilesUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud configs eks Uid fargate profiles update params +func (o *V1CloudConfigsEksUIDFargateProfilesUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 cloud configs eks Uid fargate profiles update params +func (o *V1CloudConfigsEksUIDFargateProfilesUpdateParams) WithBody(body *models.V1EksFargateProfiles) *V1CloudConfigsEksUIDFargateProfilesUpdateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 cloud configs eks Uid fargate profiles update params +func (o *V1CloudConfigsEksUIDFargateProfilesUpdateParams) SetBody(body *models.V1EksFargateProfiles) { + o.Body = body +} + +// WithConfigUID adds the configUID to the v1 cloud configs eks Uid fargate profiles update params +func (o *V1CloudConfigsEksUIDFargateProfilesUpdateParams) WithConfigUID(configUID string) *V1CloudConfigsEksUIDFargateProfilesUpdateParams { + o.SetConfigUID(configUID) + return o +} + +// SetConfigUID adds the configUid to the v1 cloud configs eks Uid fargate profiles update params +func (o *V1CloudConfigsEksUIDFargateProfilesUpdateParams) SetConfigUID(configUID string) { + o.ConfigUID = configUID +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudConfigsEksUIDFargateProfilesUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param configUid + if err := r.SetPathParam("configUid", o.ConfigUID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_configs_eks_uid_fargate_profiles_update_responses.go b/api/client/v1/v1_cloud_configs_eks_uid_fargate_profiles_update_responses.go new file mode 100644 index 00000000..2738d16f --- /dev/null +++ b/api/client/v1/v1_cloud_configs_eks_uid_fargate_profiles_update_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1CloudConfigsEksUIDFargateProfilesUpdateReader is a Reader for the V1CloudConfigsEksUIDFargateProfilesUpdate structure. +type V1CloudConfigsEksUIDFargateProfilesUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudConfigsEksUIDFargateProfilesUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1CloudConfigsEksUIDFargateProfilesUpdateNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudConfigsEksUIDFargateProfilesUpdateNoContent creates a V1CloudConfigsEksUIDFargateProfilesUpdateNoContent with default headers values +func NewV1CloudConfigsEksUIDFargateProfilesUpdateNoContent() *V1CloudConfigsEksUIDFargateProfilesUpdateNoContent { + return &V1CloudConfigsEksUIDFargateProfilesUpdateNoContent{} +} + +/* +V1CloudConfigsEksUIDFargateProfilesUpdateNoContent handles this case with default header values. + +The resource was updated successfully +*/ +type V1CloudConfigsEksUIDFargateProfilesUpdateNoContent struct { +} + +func (o *V1CloudConfigsEksUIDFargateProfilesUpdateNoContent) Error() string { + return fmt.Sprintf("[PUT /v1/cloudconfigs/eks/{configUid}/fargateProfiles][%d] v1CloudConfigsEksUidFargateProfilesUpdateNoContent ", 204) +} + +func (o *V1CloudConfigsEksUIDFargateProfilesUpdateNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_cloud_configs_gcp_get_parameters.go b/api/client/v1/v1_cloud_configs_gcp_get_parameters.go new file mode 100644 index 00000000..19718976 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_gcp_get_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1CloudConfigsGcpGetParams creates a new V1CloudConfigsGcpGetParams object +// with the default values initialized. +func NewV1CloudConfigsGcpGetParams() *V1CloudConfigsGcpGetParams { + var () + return &V1CloudConfigsGcpGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudConfigsGcpGetParamsWithTimeout creates a new V1CloudConfigsGcpGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudConfigsGcpGetParamsWithTimeout(timeout time.Duration) *V1CloudConfigsGcpGetParams { + var () + return &V1CloudConfigsGcpGetParams{ + + timeout: timeout, + } +} + +// NewV1CloudConfigsGcpGetParamsWithContext creates a new V1CloudConfigsGcpGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudConfigsGcpGetParamsWithContext(ctx context.Context) *V1CloudConfigsGcpGetParams { + var () + return &V1CloudConfigsGcpGetParams{ + + Context: ctx, + } +} + +// NewV1CloudConfigsGcpGetParamsWithHTTPClient creates a new V1CloudConfigsGcpGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudConfigsGcpGetParamsWithHTTPClient(client *http.Client) *V1CloudConfigsGcpGetParams { + var () + return &V1CloudConfigsGcpGetParams{ + HTTPClient: client, + } +} + +/* +V1CloudConfigsGcpGetParams contains all the parameters to send to the API endpoint +for the v1 cloud configs gcp get operation typically these are written to a http.Request +*/ +type V1CloudConfigsGcpGetParams struct { + + /*ConfigUID + Cluster's cloud config uid + + */ + ConfigUID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud configs gcp get params +func (o *V1CloudConfigsGcpGetParams) WithTimeout(timeout time.Duration) *V1CloudConfigsGcpGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud configs gcp get params +func (o *V1CloudConfigsGcpGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud configs gcp get params +func (o *V1CloudConfigsGcpGetParams) WithContext(ctx context.Context) *V1CloudConfigsGcpGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud configs gcp get params +func (o *V1CloudConfigsGcpGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud configs gcp get params +func (o *V1CloudConfigsGcpGetParams) WithHTTPClient(client *http.Client) *V1CloudConfigsGcpGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud configs gcp get params +func (o *V1CloudConfigsGcpGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithConfigUID adds the configUID to the v1 cloud configs gcp get params +func (o *V1CloudConfigsGcpGetParams) WithConfigUID(configUID string) *V1CloudConfigsGcpGetParams { + o.SetConfigUID(configUID) + return o +} + +// SetConfigUID adds the configUid to the v1 cloud configs gcp get params +func (o *V1CloudConfigsGcpGetParams) SetConfigUID(configUID string) { + o.ConfigUID = configUID +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudConfigsGcpGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param configUid + if err := r.SetPathParam("configUid", o.ConfigUID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_configs_gcp_get_responses.go b/api/client/v1/v1_cloud_configs_gcp_get_responses.go new file mode 100644 index 00000000..9bbf3ecc --- /dev/null +++ b/api/client/v1/v1_cloud_configs_gcp_get_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1CloudConfigsGcpGetReader is a Reader for the V1CloudConfigsGcpGet structure. +type V1CloudConfigsGcpGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudConfigsGcpGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1CloudConfigsGcpGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudConfigsGcpGetOK creates a V1CloudConfigsGcpGetOK with default headers values +func NewV1CloudConfigsGcpGetOK() *V1CloudConfigsGcpGetOK { + return &V1CloudConfigsGcpGetOK{} +} + +/* +V1CloudConfigsGcpGetOK handles this case with default header values. + +OK +*/ +type V1CloudConfigsGcpGetOK struct { + Payload *models.V1GcpCloudConfig +} + +func (o *V1CloudConfigsGcpGetOK) Error() string { + return fmt.Sprintf("[GET /v1/cloudconfigs/gcp/{configUid}][%d] v1CloudConfigsGcpGetOK %+v", 200, o.Payload) +} + +func (o *V1CloudConfigsGcpGetOK) GetPayload() *models.V1GcpCloudConfig { + return o.Payload +} + +func (o *V1CloudConfigsGcpGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1GcpCloudConfig) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_cloud_configs_gcp_machine_pool_create_parameters.go b/api/client/v1/v1_cloud_configs_gcp_machine_pool_create_parameters.go new file mode 100644 index 00000000..14e9c924 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_gcp_machine_pool_create_parameters.go @@ -0,0 +1,157 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1CloudConfigsGcpMachinePoolCreateParams creates a new V1CloudConfigsGcpMachinePoolCreateParams object +// with the default values initialized. +func NewV1CloudConfigsGcpMachinePoolCreateParams() *V1CloudConfigsGcpMachinePoolCreateParams { + var () + return &V1CloudConfigsGcpMachinePoolCreateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudConfigsGcpMachinePoolCreateParamsWithTimeout creates a new V1CloudConfigsGcpMachinePoolCreateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudConfigsGcpMachinePoolCreateParamsWithTimeout(timeout time.Duration) *V1CloudConfigsGcpMachinePoolCreateParams { + var () + return &V1CloudConfigsGcpMachinePoolCreateParams{ + + timeout: timeout, + } +} + +// NewV1CloudConfigsGcpMachinePoolCreateParamsWithContext creates a new V1CloudConfigsGcpMachinePoolCreateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudConfigsGcpMachinePoolCreateParamsWithContext(ctx context.Context) *V1CloudConfigsGcpMachinePoolCreateParams { + var () + return &V1CloudConfigsGcpMachinePoolCreateParams{ + + Context: ctx, + } +} + +// NewV1CloudConfigsGcpMachinePoolCreateParamsWithHTTPClient creates a new V1CloudConfigsGcpMachinePoolCreateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudConfigsGcpMachinePoolCreateParamsWithHTTPClient(client *http.Client) *V1CloudConfigsGcpMachinePoolCreateParams { + var () + return &V1CloudConfigsGcpMachinePoolCreateParams{ + HTTPClient: client, + } +} + +/* +V1CloudConfigsGcpMachinePoolCreateParams contains all the parameters to send to the API endpoint +for the v1 cloud configs gcp machine pool create operation typically these are written to a http.Request +*/ +type V1CloudConfigsGcpMachinePoolCreateParams struct { + + /*Body*/ + Body *models.V1GcpMachinePoolConfigEntity + /*ConfigUID + Cluster's cloud config uid + + */ + ConfigUID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud configs gcp machine pool create params +func (o *V1CloudConfigsGcpMachinePoolCreateParams) WithTimeout(timeout time.Duration) *V1CloudConfigsGcpMachinePoolCreateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud configs gcp machine pool create params +func (o *V1CloudConfigsGcpMachinePoolCreateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud configs gcp machine pool create params +func (o *V1CloudConfigsGcpMachinePoolCreateParams) WithContext(ctx context.Context) *V1CloudConfigsGcpMachinePoolCreateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud configs gcp machine pool create params +func (o *V1CloudConfigsGcpMachinePoolCreateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud configs gcp machine pool create params +func (o *V1CloudConfigsGcpMachinePoolCreateParams) WithHTTPClient(client *http.Client) *V1CloudConfigsGcpMachinePoolCreateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud configs gcp machine pool create params +func (o *V1CloudConfigsGcpMachinePoolCreateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 cloud configs gcp machine pool create params +func (o *V1CloudConfigsGcpMachinePoolCreateParams) WithBody(body *models.V1GcpMachinePoolConfigEntity) *V1CloudConfigsGcpMachinePoolCreateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 cloud configs gcp machine pool create params +func (o *V1CloudConfigsGcpMachinePoolCreateParams) SetBody(body *models.V1GcpMachinePoolConfigEntity) { + o.Body = body +} + +// WithConfigUID adds the configUID to the v1 cloud configs gcp machine pool create params +func (o *V1CloudConfigsGcpMachinePoolCreateParams) WithConfigUID(configUID string) *V1CloudConfigsGcpMachinePoolCreateParams { + o.SetConfigUID(configUID) + return o +} + +// SetConfigUID adds the configUid to the v1 cloud configs gcp machine pool create params +func (o *V1CloudConfigsGcpMachinePoolCreateParams) SetConfigUID(configUID string) { + o.ConfigUID = configUID +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudConfigsGcpMachinePoolCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param configUid + if err := r.SetPathParam("configUid", o.ConfigUID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_configs_gcp_machine_pool_create_responses.go b/api/client/v1/v1_cloud_configs_gcp_machine_pool_create_responses.go new file mode 100644 index 00000000..45967936 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_gcp_machine_pool_create_responses.go @@ -0,0 +1,77 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1CloudConfigsGcpMachinePoolCreateReader is a Reader for the V1CloudConfigsGcpMachinePoolCreate structure. +type V1CloudConfigsGcpMachinePoolCreateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudConfigsGcpMachinePoolCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 201: + result := NewV1CloudConfigsGcpMachinePoolCreateCreated() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudConfigsGcpMachinePoolCreateCreated creates a V1CloudConfigsGcpMachinePoolCreateCreated with default headers values +func NewV1CloudConfigsGcpMachinePoolCreateCreated() *V1CloudConfigsGcpMachinePoolCreateCreated { + return &V1CloudConfigsGcpMachinePoolCreateCreated{} +} + +/* +V1CloudConfigsGcpMachinePoolCreateCreated handles this case with default header values. + +Created successfully +*/ +type V1CloudConfigsGcpMachinePoolCreateCreated struct { + /*Audit uid for the request + */ + AuditUID string + + Payload *models.V1UID +} + +func (o *V1CloudConfigsGcpMachinePoolCreateCreated) Error() string { + return fmt.Sprintf("[POST /v1/cloudconfigs/gcp/{configUid}/machinePools][%d] v1CloudConfigsGcpMachinePoolCreateCreated %+v", 201, o.Payload) +} + +func (o *V1CloudConfigsGcpMachinePoolCreateCreated) GetPayload() *models.V1UID { + return o.Payload +} + +func (o *V1CloudConfigsGcpMachinePoolCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header AuditUid + o.AuditUID = response.GetHeader("AuditUid") + + o.Payload = new(models.V1UID) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_cloud_configs_gcp_machine_pool_delete_parameters.go b/api/client/v1/v1_cloud_configs_gcp_machine_pool_delete_parameters.go new file mode 100644 index 00000000..e28bae73 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_gcp_machine_pool_delete_parameters.go @@ -0,0 +1,157 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1CloudConfigsGcpMachinePoolDeleteParams creates a new V1CloudConfigsGcpMachinePoolDeleteParams object +// with the default values initialized. +func NewV1CloudConfigsGcpMachinePoolDeleteParams() *V1CloudConfigsGcpMachinePoolDeleteParams { + var () + return &V1CloudConfigsGcpMachinePoolDeleteParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudConfigsGcpMachinePoolDeleteParamsWithTimeout creates a new V1CloudConfigsGcpMachinePoolDeleteParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudConfigsGcpMachinePoolDeleteParamsWithTimeout(timeout time.Duration) *V1CloudConfigsGcpMachinePoolDeleteParams { + var () + return &V1CloudConfigsGcpMachinePoolDeleteParams{ + + timeout: timeout, + } +} + +// NewV1CloudConfigsGcpMachinePoolDeleteParamsWithContext creates a new V1CloudConfigsGcpMachinePoolDeleteParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudConfigsGcpMachinePoolDeleteParamsWithContext(ctx context.Context) *V1CloudConfigsGcpMachinePoolDeleteParams { + var () + return &V1CloudConfigsGcpMachinePoolDeleteParams{ + + Context: ctx, + } +} + +// NewV1CloudConfigsGcpMachinePoolDeleteParamsWithHTTPClient creates a new V1CloudConfigsGcpMachinePoolDeleteParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudConfigsGcpMachinePoolDeleteParamsWithHTTPClient(client *http.Client) *V1CloudConfigsGcpMachinePoolDeleteParams { + var () + return &V1CloudConfigsGcpMachinePoolDeleteParams{ + HTTPClient: client, + } +} + +/* +V1CloudConfigsGcpMachinePoolDeleteParams contains all the parameters to send to the API endpoint +for the v1 cloud configs gcp machine pool delete operation typically these are written to a http.Request +*/ +type V1CloudConfigsGcpMachinePoolDeleteParams struct { + + /*ConfigUID + Cluster's cloud config uid + + */ + ConfigUID string + /*MachinePoolName + Machine pool name + + */ + MachinePoolName string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud configs gcp machine pool delete params +func (o *V1CloudConfigsGcpMachinePoolDeleteParams) WithTimeout(timeout time.Duration) *V1CloudConfigsGcpMachinePoolDeleteParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud configs gcp machine pool delete params +func (o *V1CloudConfigsGcpMachinePoolDeleteParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud configs gcp machine pool delete params +func (o *V1CloudConfigsGcpMachinePoolDeleteParams) WithContext(ctx context.Context) *V1CloudConfigsGcpMachinePoolDeleteParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud configs gcp machine pool delete params +func (o *V1CloudConfigsGcpMachinePoolDeleteParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud configs gcp machine pool delete params +func (o *V1CloudConfigsGcpMachinePoolDeleteParams) WithHTTPClient(client *http.Client) *V1CloudConfigsGcpMachinePoolDeleteParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud configs gcp machine pool delete params +func (o *V1CloudConfigsGcpMachinePoolDeleteParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithConfigUID adds the configUID to the v1 cloud configs gcp machine pool delete params +func (o *V1CloudConfigsGcpMachinePoolDeleteParams) WithConfigUID(configUID string) *V1CloudConfigsGcpMachinePoolDeleteParams { + o.SetConfigUID(configUID) + return o +} + +// SetConfigUID adds the configUid to the v1 cloud configs gcp machine pool delete params +func (o *V1CloudConfigsGcpMachinePoolDeleteParams) SetConfigUID(configUID string) { + o.ConfigUID = configUID +} + +// WithMachinePoolName adds the machinePoolName to the v1 cloud configs gcp machine pool delete params +func (o *V1CloudConfigsGcpMachinePoolDeleteParams) WithMachinePoolName(machinePoolName string) *V1CloudConfigsGcpMachinePoolDeleteParams { + o.SetMachinePoolName(machinePoolName) + return o +} + +// SetMachinePoolName adds the machinePoolName to the v1 cloud configs gcp machine pool delete params +func (o *V1CloudConfigsGcpMachinePoolDeleteParams) SetMachinePoolName(machinePoolName string) { + o.MachinePoolName = machinePoolName +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudConfigsGcpMachinePoolDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param configUid + if err := r.SetPathParam("configUid", o.ConfigUID); err != nil { + return err + } + + // path param machinePoolName + if err := r.SetPathParam("machinePoolName", o.MachinePoolName); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_configs_gcp_machine_pool_delete_responses.go b/api/client/v1/v1_cloud_configs_gcp_machine_pool_delete_responses.go new file mode 100644 index 00000000..122ad598 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_gcp_machine_pool_delete_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1CloudConfigsGcpMachinePoolDeleteReader is a Reader for the V1CloudConfigsGcpMachinePoolDelete structure. +type V1CloudConfigsGcpMachinePoolDeleteReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudConfigsGcpMachinePoolDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1CloudConfigsGcpMachinePoolDeleteNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudConfigsGcpMachinePoolDeleteNoContent creates a V1CloudConfigsGcpMachinePoolDeleteNoContent with default headers values +func NewV1CloudConfigsGcpMachinePoolDeleteNoContent() *V1CloudConfigsGcpMachinePoolDeleteNoContent { + return &V1CloudConfigsGcpMachinePoolDeleteNoContent{} +} + +/* +V1CloudConfigsGcpMachinePoolDeleteNoContent handles this case with default header values. + +The resource was deleted successfully +*/ +type V1CloudConfigsGcpMachinePoolDeleteNoContent struct { +} + +func (o *V1CloudConfigsGcpMachinePoolDeleteNoContent) Error() string { + return fmt.Sprintf("[DELETE /v1/cloudconfigs/gcp/{configUid}/machinePools/{machinePoolName}][%d] v1CloudConfigsGcpMachinePoolDeleteNoContent ", 204) +} + +func (o *V1CloudConfigsGcpMachinePoolDeleteNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_cloud_configs_gcp_machine_pool_update_parameters.go b/api/client/v1/v1_cloud_configs_gcp_machine_pool_update_parameters.go new file mode 100644 index 00000000..c8634d24 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_gcp_machine_pool_update_parameters.go @@ -0,0 +1,178 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1CloudConfigsGcpMachinePoolUpdateParams creates a new V1CloudConfigsGcpMachinePoolUpdateParams object +// with the default values initialized. +func NewV1CloudConfigsGcpMachinePoolUpdateParams() *V1CloudConfigsGcpMachinePoolUpdateParams { + var () + return &V1CloudConfigsGcpMachinePoolUpdateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudConfigsGcpMachinePoolUpdateParamsWithTimeout creates a new V1CloudConfigsGcpMachinePoolUpdateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudConfigsGcpMachinePoolUpdateParamsWithTimeout(timeout time.Duration) *V1CloudConfigsGcpMachinePoolUpdateParams { + var () + return &V1CloudConfigsGcpMachinePoolUpdateParams{ + + timeout: timeout, + } +} + +// NewV1CloudConfigsGcpMachinePoolUpdateParamsWithContext creates a new V1CloudConfigsGcpMachinePoolUpdateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudConfigsGcpMachinePoolUpdateParamsWithContext(ctx context.Context) *V1CloudConfigsGcpMachinePoolUpdateParams { + var () + return &V1CloudConfigsGcpMachinePoolUpdateParams{ + + Context: ctx, + } +} + +// NewV1CloudConfigsGcpMachinePoolUpdateParamsWithHTTPClient creates a new V1CloudConfigsGcpMachinePoolUpdateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudConfigsGcpMachinePoolUpdateParamsWithHTTPClient(client *http.Client) *V1CloudConfigsGcpMachinePoolUpdateParams { + var () + return &V1CloudConfigsGcpMachinePoolUpdateParams{ + HTTPClient: client, + } +} + +/* +V1CloudConfigsGcpMachinePoolUpdateParams contains all the parameters to send to the API endpoint +for the v1 cloud configs gcp machine pool update operation typically these are written to a http.Request +*/ +type V1CloudConfigsGcpMachinePoolUpdateParams struct { + + /*Body*/ + Body *models.V1GcpMachinePoolConfigEntity + /*ConfigUID + Cluster's cloud config uid + + */ + ConfigUID string + /*MachinePoolName + Machine pool name + + */ + MachinePoolName string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud configs gcp machine pool update params +func (o *V1CloudConfigsGcpMachinePoolUpdateParams) WithTimeout(timeout time.Duration) *V1CloudConfigsGcpMachinePoolUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud configs gcp machine pool update params +func (o *V1CloudConfigsGcpMachinePoolUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud configs gcp machine pool update params +func (o *V1CloudConfigsGcpMachinePoolUpdateParams) WithContext(ctx context.Context) *V1CloudConfigsGcpMachinePoolUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud configs gcp machine pool update params +func (o *V1CloudConfigsGcpMachinePoolUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud configs gcp machine pool update params +func (o *V1CloudConfigsGcpMachinePoolUpdateParams) WithHTTPClient(client *http.Client) *V1CloudConfigsGcpMachinePoolUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud configs gcp machine pool update params +func (o *V1CloudConfigsGcpMachinePoolUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 cloud configs gcp machine pool update params +func (o *V1CloudConfigsGcpMachinePoolUpdateParams) WithBody(body *models.V1GcpMachinePoolConfigEntity) *V1CloudConfigsGcpMachinePoolUpdateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 cloud configs gcp machine pool update params +func (o *V1CloudConfigsGcpMachinePoolUpdateParams) SetBody(body *models.V1GcpMachinePoolConfigEntity) { + o.Body = body +} + +// WithConfigUID adds the configUID to the v1 cloud configs gcp machine pool update params +func (o *V1CloudConfigsGcpMachinePoolUpdateParams) WithConfigUID(configUID string) *V1CloudConfigsGcpMachinePoolUpdateParams { + o.SetConfigUID(configUID) + return o +} + +// SetConfigUID adds the configUid to the v1 cloud configs gcp machine pool update params +func (o *V1CloudConfigsGcpMachinePoolUpdateParams) SetConfigUID(configUID string) { + o.ConfigUID = configUID +} + +// WithMachinePoolName adds the machinePoolName to the v1 cloud configs gcp machine pool update params +func (o *V1CloudConfigsGcpMachinePoolUpdateParams) WithMachinePoolName(machinePoolName string) *V1CloudConfigsGcpMachinePoolUpdateParams { + o.SetMachinePoolName(machinePoolName) + return o +} + +// SetMachinePoolName adds the machinePoolName to the v1 cloud configs gcp machine pool update params +func (o *V1CloudConfigsGcpMachinePoolUpdateParams) SetMachinePoolName(machinePoolName string) { + o.MachinePoolName = machinePoolName +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudConfigsGcpMachinePoolUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param configUid + if err := r.SetPathParam("configUid", o.ConfigUID); err != nil { + return err + } + + // path param machinePoolName + if err := r.SetPathParam("machinePoolName", o.MachinePoolName); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_configs_gcp_machine_pool_update_responses.go b/api/client/v1/v1_cloud_configs_gcp_machine_pool_update_responses.go new file mode 100644 index 00000000..b17124b2 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_gcp_machine_pool_update_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1CloudConfigsGcpMachinePoolUpdateReader is a Reader for the V1CloudConfigsGcpMachinePoolUpdate structure. +type V1CloudConfigsGcpMachinePoolUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudConfigsGcpMachinePoolUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1CloudConfigsGcpMachinePoolUpdateNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudConfigsGcpMachinePoolUpdateNoContent creates a V1CloudConfigsGcpMachinePoolUpdateNoContent with default headers values +func NewV1CloudConfigsGcpMachinePoolUpdateNoContent() *V1CloudConfigsGcpMachinePoolUpdateNoContent { + return &V1CloudConfigsGcpMachinePoolUpdateNoContent{} +} + +/* +V1CloudConfigsGcpMachinePoolUpdateNoContent handles this case with default header values. + +The resource was updated successfully +*/ +type V1CloudConfigsGcpMachinePoolUpdateNoContent struct { +} + +func (o *V1CloudConfigsGcpMachinePoolUpdateNoContent) Error() string { + return fmt.Sprintf("[PUT /v1/cloudconfigs/gcp/{configUid}/machinePools/{machinePoolName}][%d] v1CloudConfigsGcpMachinePoolUpdateNoContent ", 204) +} + +func (o *V1CloudConfigsGcpMachinePoolUpdateNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_cloud_configs_gcp_pool_machines_add_parameters.go b/api/client/v1/v1_cloud_configs_gcp_pool_machines_add_parameters.go new file mode 100644 index 00000000..1c7eee86 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_gcp_pool_machines_add_parameters.go @@ -0,0 +1,178 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1CloudConfigsGcpPoolMachinesAddParams creates a new V1CloudConfigsGcpPoolMachinesAddParams object +// with the default values initialized. +func NewV1CloudConfigsGcpPoolMachinesAddParams() *V1CloudConfigsGcpPoolMachinesAddParams { + var () + return &V1CloudConfigsGcpPoolMachinesAddParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudConfigsGcpPoolMachinesAddParamsWithTimeout creates a new V1CloudConfigsGcpPoolMachinesAddParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudConfigsGcpPoolMachinesAddParamsWithTimeout(timeout time.Duration) *V1CloudConfigsGcpPoolMachinesAddParams { + var () + return &V1CloudConfigsGcpPoolMachinesAddParams{ + + timeout: timeout, + } +} + +// NewV1CloudConfigsGcpPoolMachinesAddParamsWithContext creates a new V1CloudConfigsGcpPoolMachinesAddParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudConfigsGcpPoolMachinesAddParamsWithContext(ctx context.Context) *V1CloudConfigsGcpPoolMachinesAddParams { + var () + return &V1CloudConfigsGcpPoolMachinesAddParams{ + + Context: ctx, + } +} + +// NewV1CloudConfigsGcpPoolMachinesAddParamsWithHTTPClient creates a new V1CloudConfigsGcpPoolMachinesAddParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudConfigsGcpPoolMachinesAddParamsWithHTTPClient(client *http.Client) *V1CloudConfigsGcpPoolMachinesAddParams { + var () + return &V1CloudConfigsGcpPoolMachinesAddParams{ + HTTPClient: client, + } +} + +/* +V1CloudConfigsGcpPoolMachinesAddParams contains all the parameters to send to the API endpoint +for the v1 cloud configs gcp pool machines add operation typically these are written to a http.Request +*/ +type V1CloudConfigsGcpPoolMachinesAddParams struct { + + /*Body*/ + Body *models.V1GcpMachine + /*ConfigUID + Cluster's cloud config uid + + */ + ConfigUID string + /*MachinePoolName + Machine pool name + + */ + MachinePoolName string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud configs gcp pool machines add params +func (o *V1CloudConfigsGcpPoolMachinesAddParams) WithTimeout(timeout time.Duration) *V1CloudConfigsGcpPoolMachinesAddParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud configs gcp pool machines add params +func (o *V1CloudConfigsGcpPoolMachinesAddParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud configs gcp pool machines add params +func (o *V1CloudConfigsGcpPoolMachinesAddParams) WithContext(ctx context.Context) *V1CloudConfigsGcpPoolMachinesAddParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud configs gcp pool machines add params +func (o *V1CloudConfigsGcpPoolMachinesAddParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud configs gcp pool machines add params +func (o *V1CloudConfigsGcpPoolMachinesAddParams) WithHTTPClient(client *http.Client) *V1CloudConfigsGcpPoolMachinesAddParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud configs gcp pool machines add params +func (o *V1CloudConfigsGcpPoolMachinesAddParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 cloud configs gcp pool machines add params +func (o *V1CloudConfigsGcpPoolMachinesAddParams) WithBody(body *models.V1GcpMachine) *V1CloudConfigsGcpPoolMachinesAddParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 cloud configs gcp pool machines add params +func (o *V1CloudConfigsGcpPoolMachinesAddParams) SetBody(body *models.V1GcpMachine) { + o.Body = body +} + +// WithConfigUID adds the configUID to the v1 cloud configs gcp pool machines add params +func (o *V1CloudConfigsGcpPoolMachinesAddParams) WithConfigUID(configUID string) *V1CloudConfigsGcpPoolMachinesAddParams { + o.SetConfigUID(configUID) + return o +} + +// SetConfigUID adds the configUid to the v1 cloud configs gcp pool machines add params +func (o *V1CloudConfigsGcpPoolMachinesAddParams) SetConfigUID(configUID string) { + o.ConfigUID = configUID +} + +// WithMachinePoolName adds the machinePoolName to the v1 cloud configs gcp pool machines add params +func (o *V1CloudConfigsGcpPoolMachinesAddParams) WithMachinePoolName(machinePoolName string) *V1CloudConfigsGcpPoolMachinesAddParams { + o.SetMachinePoolName(machinePoolName) + return o +} + +// SetMachinePoolName adds the machinePoolName to the v1 cloud configs gcp pool machines add params +func (o *V1CloudConfigsGcpPoolMachinesAddParams) SetMachinePoolName(machinePoolName string) { + o.MachinePoolName = machinePoolName +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudConfigsGcpPoolMachinesAddParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param configUid + if err := r.SetPathParam("configUid", o.ConfigUID); err != nil { + return err + } + + // path param machinePoolName + if err := r.SetPathParam("machinePoolName", o.MachinePoolName); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_configs_gcp_pool_machines_add_responses.go b/api/client/v1/v1_cloud_configs_gcp_pool_machines_add_responses.go new file mode 100644 index 00000000..eb9cf1cb --- /dev/null +++ b/api/client/v1/v1_cloud_configs_gcp_pool_machines_add_responses.go @@ -0,0 +1,77 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1CloudConfigsGcpPoolMachinesAddReader is a Reader for the V1CloudConfigsGcpPoolMachinesAdd structure. +type V1CloudConfigsGcpPoolMachinesAddReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudConfigsGcpPoolMachinesAddReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 201: + result := NewV1CloudConfigsGcpPoolMachinesAddCreated() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudConfigsGcpPoolMachinesAddCreated creates a V1CloudConfigsGcpPoolMachinesAddCreated with default headers values +func NewV1CloudConfigsGcpPoolMachinesAddCreated() *V1CloudConfigsGcpPoolMachinesAddCreated { + return &V1CloudConfigsGcpPoolMachinesAddCreated{} +} + +/* +V1CloudConfigsGcpPoolMachinesAddCreated handles this case with default header values. + +Created successfully +*/ +type V1CloudConfigsGcpPoolMachinesAddCreated struct { + /*Audit uid for the request + */ + AuditUID string + + Payload *models.V1UID +} + +func (o *V1CloudConfigsGcpPoolMachinesAddCreated) Error() string { + return fmt.Sprintf("[POST /v1/cloudconfigs/gcp/{configUid}/machinePools/{machinePoolName}/machines][%d] v1CloudConfigsGcpPoolMachinesAddCreated %+v", 201, o.Payload) +} + +func (o *V1CloudConfigsGcpPoolMachinesAddCreated) GetPayload() *models.V1UID { + return o.Payload +} + +func (o *V1CloudConfigsGcpPoolMachinesAddCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header AuditUid + o.AuditUID = response.GetHeader("AuditUid") + + o.Payload = new(models.V1UID) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_cloud_configs_gcp_pool_machines_list_parameters.go b/api/client/v1/v1_cloud_configs_gcp_pool_machines_list_parameters.go new file mode 100644 index 00000000..b377671b --- /dev/null +++ b/api/client/v1/v1_cloud_configs_gcp_pool_machines_list_parameters.go @@ -0,0 +1,365 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// NewV1CloudConfigsGcpPoolMachinesListParams creates a new V1CloudConfigsGcpPoolMachinesListParams object +// with the default values initialized. +func NewV1CloudConfigsGcpPoolMachinesListParams() *V1CloudConfigsGcpPoolMachinesListParams { + var ( + limitDefault = int64(50) + ) + return &V1CloudConfigsGcpPoolMachinesListParams{ + Limit: &limitDefault, + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudConfigsGcpPoolMachinesListParamsWithTimeout creates a new V1CloudConfigsGcpPoolMachinesListParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudConfigsGcpPoolMachinesListParamsWithTimeout(timeout time.Duration) *V1CloudConfigsGcpPoolMachinesListParams { + var ( + limitDefault = int64(50) + ) + return &V1CloudConfigsGcpPoolMachinesListParams{ + Limit: &limitDefault, + + timeout: timeout, + } +} + +// NewV1CloudConfigsGcpPoolMachinesListParamsWithContext creates a new V1CloudConfigsGcpPoolMachinesListParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudConfigsGcpPoolMachinesListParamsWithContext(ctx context.Context) *V1CloudConfigsGcpPoolMachinesListParams { + var ( + limitDefault = int64(50) + ) + return &V1CloudConfigsGcpPoolMachinesListParams{ + Limit: &limitDefault, + + Context: ctx, + } +} + +// NewV1CloudConfigsGcpPoolMachinesListParamsWithHTTPClient creates a new V1CloudConfigsGcpPoolMachinesListParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudConfigsGcpPoolMachinesListParamsWithHTTPClient(client *http.Client) *V1CloudConfigsGcpPoolMachinesListParams { + var ( + limitDefault = int64(50) + ) + return &V1CloudConfigsGcpPoolMachinesListParams{ + Limit: &limitDefault, + HTTPClient: client, + } +} + +/* +V1CloudConfigsGcpPoolMachinesListParams contains all the parameters to send to the API endpoint +for the v1 cloud configs gcp pool machines list operation typically these are written to a http.Request +*/ +type V1CloudConfigsGcpPoolMachinesListParams struct { + + /*ConfigUID + Cluster's cloud config uid + + */ + ConfigUID string + /*Continue + continue token to paginate the subsequent data items + + */ + Continue *string + /*Fields + Set of fields to be presented in the response with values. The fields are comma separated. Eg: metadata.uid,metadata.name + + */ + Fields *string + /*Filters + Filters can be combined with AND, OR operators with field path name. Eg: metadata.name=TestServiceANDspec.cloudType=aws + + Server will be restricted to certain fields based on the indexed data for each resource. + + */ + Filters *string + /*Limit + limit is a maximum number of responses to return for a list call. Default and maximum value of the limit is 50. + If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. + + */ + Limit *int64 + /*MachinePoolName + Machine pool name + + */ + MachinePoolName string + /*Offset + offset is the next index number from which the response will start. The response offset value can be used along with continue token for the pagination. + + */ + Offset *int64 + /*OrderBy + Specify the fields with sort order. 1 indicates ascending and -1 for descending. Eg: orderBy=metadata.name=1,metadata.uid=-1 + + */ + OrderBy *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud configs gcp pool machines list params +func (o *V1CloudConfigsGcpPoolMachinesListParams) WithTimeout(timeout time.Duration) *V1CloudConfigsGcpPoolMachinesListParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud configs gcp pool machines list params +func (o *V1CloudConfigsGcpPoolMachinesListParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud configs gcp pool machines list params +func (o *V1CloudConfigsGcpPoolMachinesListParams) WithContext(ctx context.Context) *V1CloudConfigsGcpPoolMachinesListParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud configs gcp pool machines list params +func (o *V1CloudConfigsGcpPoolMachinesListParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud configs gcp pool machines list params +func (o *V1CloudConfigsGcpPoolMachinesListParams) WithHTTPClient(client *http.Client) *V1CloudConfigsGcpPoolMachinesListParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud configs gcp pool machines list params +func (o *V1CloudConfigsGcpPoolMachinesListParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithConfigUID adds the configUID to the v1 cloud configs gcp pool machines list params +func (o *V1CloudConfigsGcpPoolMachinesListParams) WithConfigUID(configUID string) *V1CloudConfigsGcpPoolMachinesListParams { + o.SetConfigUID(configUID) + return o +} + +// SetConfigUID adds the configUid to the v1 cloud configs gcp pool machines list params +func (o *V1CloudConfigsGcpPoolMachinesListParams) SetConfigUID(configUID string) { + o.ConfigUID = configUID +} + +// WithContinue adds the continueVar to the v1 cloud configs gcp pool machines list params +func (o *V1CloudConfigsGcpPoolMachinesListParams) WithContinue(continueVar *string) *V1CloudConfigsGcpPoolMachinesListParams { + o.SetContinue(continueVar) + return o +} + +// SetContinue adds the continue to the v1 cloud configs gcp pool machines list params +func (o *V1CloudConfigsGcpPoolMachinesListParams) SetContinue(continueVar *string) { + o.Continue = continueVar +} + +// WithFields adds the fields to the v1 cloud configs gcp pool machines list params +func (o *V1CloudConfigsGcpPoolMachinesListParams) WithFields(fields *string) *V1CloudConfigsGcpPoolMachinesListParams { + o.SetFields(fields) + return o +} + +// SetFields adds the fields to the v1 cloud configs gcp pool machines list params +func (o *V1CloudConfigsGcpPoolMachinesListParams) SetFields(fields *string) { + o.Fields = fields +} + +// WithFilters adds the filters to the v1 cloud configs gcp pool machines list params +func (o *V1CloudConfigsGcpPoolMachinesListParams) WithFilters(filters *string) *V1CloudConfigsGcpPoolMachinesListParams { + o.SetFilters(filters) + return o +} + +// SetFilters adds the filters to the v1 cloud configs gcp pool machines list params +func (o *V1CloudConfigsGcpPoolMachinesListParams) SetFilters(filters *string) { + o.Filters = filters +} + +// WithLimit adds the limit to the v1 cloud configs gcp pool machines list params +func (o *V1CloudConfigsGcpPoolMachinesListParams) WithLimit(limit *int64) *V1CloudConfigsGcpPoolMachinesListParams { + o.SetLimit(limit) + return o +} + +// SetLimit adds the limit to the v1 cloud configs gcp pool machines list params +func (o *V1CloudConfigsGcpPoolMachinesListParams) SetLimit(limit *int64) { + o.Limit = limit +} + +// WithMachinePoolName adds the machinePoolName to the v1 cloud configs gcp pool machines list params +func (o *V1CloudConfigsGcpPoolMachinesListParams) WithMachinePoolName(machinePoolName string) *V1CloudConfigsGcpPoolMachinesListParams { + o.SetMachinePoolName(machinePoolName) + return o +} + +// SetMachinePoolName adds the machinePoolName to the v1 cloud configs gcp pool machines list params +func (o *V1CloudConfigsGcpPoolMachinesListParams) SetMachinePoolName(machinePoolName string) { + o.MachinePoolName = machinePoolName +} + +// WithOffset adds the offset to the v1 cloud configs gcp pool machines list params +func (o *V1CloudConfigsGcpPoolMachinesListParams) WithOffset(offset *int64) *V1CloudConfigsGcpPoolMachinesListParams { + o.SetOffset(offset) + return o +} + +// SetOffset adds the offset to the v1 cloud configs gcp pool machines list params +func (o *V1CloudConfigsGcpPoolMachinesListParams) SetOffset(offset *int64) { + o.Offset = offset +} + +// WithOrderBy adds the orderBy to the v1 cloud configs gcp pool machines list params +func (o *V1CloudConfigsGcpPoolMachinesListParams) WithOrderBy(orderBy *string) *V1CloudConfigsGcpPoolMachinesListParams { + o.SetOrderBy(orderBy) + return o +} + +// SetOrderBy adds the orderBy to the v1 cloud configs gcp pool machines list params +func (o *V1CloudConfigsGcpPoolMachinesListParams) SetOrderBy(orderBy *string) { + o.OrderBy = orderBy +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudConfigsGcpPoolMachinesListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param configUid + if err := r.SetPathParam("configUid", o.ConfigUID); err != nil { + return err + } + + if o.Continue != nil { + + // query param continue + var qrContinue string + if o.Continue != nil { + qrContinue = *o.Continue + } + qContinue := qrContinue + if qContinue != "" { + if err := r.SetQueryParam("continue", qContinue); err != nil { + return err + } + } + + } + + if o.Fields != nil { + + // query param fields + var qrFields string + if o.Fields != nil { + qrFields = *o.Fields + } + qFields := qrFields + if qFields != "" { + if err := r.SetQueryParam("fields", qFields); err != nil { + return err + } + } + + } + + if o.Filters != nil { + + // query param filters + var qrFilters string + if o.Filters != nil { + qrFilters = *o.Filters + } + qFilters := qrFilters + if qFilters != "" { + if err := r.SetQueryParam("filters", qFilters); err != nil { + return err + } + } + + } + + if o.Limit != nil { + + // query param limit + var qrLimit int64 + if o.Limit != nil { + qrLimit = *o.Limit + } + qLimit := swag.FormatInt64(qrLimit) + if qLimit != "" { + if err := r.SetQueryParam("limit", qLimit); err != nil { + return err + } + } + + } + + // path param machinePoolName + if err := r.SetPathParam("machinePoolName", o.MachinePoolName); err != nil { + return err + } + + if o.Offset != nil { + + // query param offset + var qrOffset int64 + if o.Offset != nil { + qrOffset = *o.Offset + } + qOffset := swag.FormatInt64(qrOffset) + if qOffset != "" { + if err := r.SetQueryParam("offset", qOffset); err != nil { + return err + } + } + + } + + if o.OrderBy != nil { + + // query param orderBy + var qrOrderBy string + if o.OrderBy != nil { + qrOrderBy = *o.OrderBy + } + qOrderBy := qrOrderBy + if qOrderBy != "" { + if err := r.SetQueryParam("orderBy", qOrderBy); err != nil { + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_configs_gcp_pool_machines_list_responses.go b/api/client/v1/v1_cloud_configs_gcp_pool_machines_list_responses.go new file mode 100644 index 00000000..15e25798 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_gcp_pool_machines_list_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1CloudConfigsGcpPoolMachinesListReader is a Reader for the V1CloudConfigsGcpPoolMachinesList structure. +type V1CloudConfigsGcpPoolMachinesListReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudConfigsGcpPoolMachinesListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1CloudConfigsGcpPoolMachinesListOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudConfigsGcpPoolMachinesListOK creates a V1CloudConfigsGcpPoolMachinesListOK with default headers values +func NewV1CloudConfigsGcpPoolMachinesListOK() *V1CloudConfigsGcpPoolMachinesListOK { + return &V1CloudConfigsGcpPoolMachinesListOK{} +} + +/* +V1CloudConfigsGcpPoolMachinesListOK handles this case with default header values. + +An array of GCP machine items +*/ +type V1CloudConfigsGcpPoolMachinesListOK struct { + Payload *models.V1GcpMachines +} + +func (o *V1CloudConfigsGcpPoolMachinesListOK) Error() string { + return fmt.Sprintf("[GET /v1/cloudconfigs/gcp/{configUid}/machinePools/{machinePoolName}/machines][%d] v1CloudConfigsGcpPoolMachinesListOK %+v", 200, o.Payload) +} + +func (o *V1CloudConfigsGcpPoolMachinesListOK) GetPayload() *models.V1GcpMachines { + return o.Payload +} + +func (o *V1CloudConfigsGcpPoolMachinesListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1GcpMachines) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_cloud_configs_gcp_pool_machines_uid_delete_parameters.go b/api/client/v1/v1_cloud_configs_gcp_pool_machines_uid_delete_parameters.go new file mode 100644 index 00000000..8c864210 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_gcp_pool_machines_uid_delete_parameters.go @@ -0,0 +1,178 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1CloudConfigsGcpPoolMachinesUIDDeleteParams creates a new V1CloudConfigsGcpPoolMachinesUIDDeleteParams object +// with the default values initialized. +func NewV1CloudConfigsGcpPoolMachinesUIDDeleteParams() *V1CloudConfigsGcpPoolMachinesUIDDeleteParams { + var () + return &V1CloudConfigsGcpPoolMachinesUIDDeleteParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudConfigsGcpPoolMachinesUIDDeleteParamsWithTimeout creates a new V1CloudConfigsGcpPoolMachinesUIDDeleteParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudConfigsGcpPoolMachinesUIDDeleteParamsWithTimeout(timeout time.Duration) *V1CloudConfigsGcpPoolMachinesUIDDeleteParams { + var () + return &V1CloudConfigsGcpPoolMachinesUIDDeleteParams{ + + timeout: timeout, + } +} + +// NewV1CloudConfigsGcpPoolMachinesUIDDeleteParamsWithContext creates a new V1CloudConfigsGcpPoolMachinesUIDDeleteParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudConfigsGcpPoolMachinesUIDDeleteParamsWithContext(ctx context.Context) *V1CloudConfigsGcpPoolMachinesUIDDeleteParams { + var () + return &V1CloudConfigsGcpPoolMachinesUIDDeleteParams{ + + Context: ctx, + } +} + +// NewV1CloudConfigsGcpPoolMachinesUIDDeleteParamsWithHTTPClient creates a new V1CloudConfigsGcpPoolMachinesUIDDeleteParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudConfigsGcpPoolMachinesUIDDeleteParamsWithHTTPClient(client *http.Client) *V1CloudConfigsGcpPoolMachinesUIDDeleteParams { + var () + return &V1CloudConfigsGcpPoolMachinesUIDDeleteParams{ + HTTPClient: client, + } +} + +/* +V1CloudConfigsGcpPoolMachinesUIDDeleteParams contains all the parameters to send to the API endpoint +for the v1 cloud configs gcp pool machines Uid delete operation typically these are written to a http.Request +*/ +type V1CloudConfigsGcpPoolMachinesUIDDeleteParams struct { + + /*ConfigUID + Cluster's cloud config uid + + */ + ConfigUID string + /*MachinePoolName + Machine pool name + + */ + MachinePoolName string + /*MachineUID + Machine uid + + */ + MachineUID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud configs gcp pool machines Uid delete params +func (o *V1CloudConfigsGcpPoolMachinesUIDDeleteParams) WithTimeout(timeout time.Duration) *V1CloudConfigsGcpPoolMachinesUIDDeleteParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud configs gcp pool machines Uid delete params +func (o *V1CloudConfigsGcpPoolMachinesUIDDeleteParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud configs gcp pool machines Uid delete params +func (o *V1CloudConfigsGcpPoolMachinesUIDDeleteParams) WithContext(ctx context.Context) *V1CloudConfigsGcpPoolMachinesUIDDeleteParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud configs gcp pool machines Uid delete params +func (o *V1CloudConfigsGcpPoolMachinesUIDDeleteParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud configs gcp pool machines Uid delete params +func (o *V1CloudConfigsGcpPoolMachinesUIDDeleteParams) WithHTTPClient(client *http.Client) *V1CloudConfigsGcpPoolMachinesUIDDeleteParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud configs gcp pool machines Uid delete params +func (o *V1CloudConfigsGcpPoolMachinesUIDDeleteParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithConfigUID adds the configUID to the v1 cloud configs gcp pool machines Uid delete params +func (o *V1CloudConfigsGcpPoolMachinesUIDDeleteParams) WithConfigUID(configUID string) *V1CloudConfigsGcpPoolMachinesUIDDeleteParams { + o.SetConfigUID(configUID) + return o +} + +// SetConfigUID adds the configUid to the v1 cloud configs gcp pool machines Uid delete params +func (o *V1CloudConfigsGcpPoolMachinesUIDDeleteParams) SetConfigUID(configUID string) { + o.ConfigUID = configUID +} + +// WithMachinePoolName adds the machinePoolName to the v1 cloud configs gcp pool machines Uid delete params +func (o *V1CloudConfigsGcpPoolMachinesUIDDeleteParams) WithMachinePoolName(machinePoolName string) *V1CloudConfigsGcpPoolMachinesUIDDeleteParams { + o.SetMachinePoolName(machinePoolName) + return o +} + +// SetMachinePoolName adds the machinePoolName to the v1 cloud configs gcp pool machines Uid delete params +func (o *V1CloudConfigsGcpPoolMachinesUIDDeleteParams) SetMachinePoolName(machinePoolName string) { + o.MachinePoolName = machinePoolName +} + +// WithMachineUID adds the machineUID to the v1 cloud configs gcp pool machines Uid delete params +func (o *V1CloudConfigsGcpPoolMachinesUIDDeleteParams) WithMachineUID(machineUID string) *V1CloudConfigsGcpPoolMachinesUIDDeleteParams { + o.SetMachineUID(machineUID) + return o +} + +// SetMachineUID adds the machineUid to the v1 cloud configs gcp pool machines Uid delete params +func (o *V1CloudConfigsGcpPoolMachinesUIDDeleteParams) SetMachineUID(machineUID string) { + o.MachineUID = machineUID +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudConfigsGcpPoolMachinesUIDDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param configUid + if err := r.SetPathParam("configUid", o.ConfigUID); err != nil { + return err + } + + // path param machinePoolName + if err := r.SetPathParam("machinePoolName", o.MachinePoolName); err != nil { + return err + } + + // path param machineUid + if err := r.SetPathParam("machineUid", o.MachineUID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_configs_gcp_pool_machines_uid_delete_responses.go b/api/client/v1/v1_cloud_configs_gcp_pool_machines_uid_delete_responses.go new file mode 100644 index 00000000..058b34d1 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_gcp_pool_machines_uid_delete_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1CloudConfigsGcpPoolMachinesUIDDeleteReader is a Reader for the V1CloudConfigsGcpPoolMachinesUIDDelete structure. +type V1CloudConfigsGcpPoolMachinesUIDDeleteReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudConfigsGcpPoolMachinesUIDDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1CloudConfigsGcpPoolMachinesUIDDeleteNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudConfigsGcpPoolMachinesUIDDeleteNoContent creates a V1CloudConfigsGcpPoolMachinesUIDDeleteNoContent with default headers values +func NewV1CloudConfigsGcpPoolMachinesUIDDeleteNoContent() *V1CloudConfigsGcpPoolMachinesUIDDeleteNoContent { + return &V1CloudConfigsGcpPoolMachinesUIDDeleteNoContent{} +} + +/* +V1CloudConfigsGcpPoolMachinesUIDDeleteNoContent handles this case with default header values. + +The resource was deleted successfully +*/ +type V1CloudConfigsGcpPoolMachinesUIDDeleteNoContent struct { +} + +func (o *V1CloudConfigsGcpPoolMachinesUIDDeleteNoContent) Error() string { + return fmt.Sprintf("[DELETE /v1/cloudconfigs/gcp/{configUid}/machinePools/{machinePoolName}/machines/{machineUid}][%d] v1CloudConfigsGcpPoolMachinesUidDeleteNoContent ", 204) +} + +func (o *V1CloudConfigsGcpPoolMachinesUIDDeleteNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_cloud_configs_gcp_pool_machines_uid_get_parameters.go b/api/client/v1/v1_cloud_configs_gcp_pool_machines_uid_get_parameters.go new file mode 100644 index 00000000..b2d37793 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_gcp_pool_machines_uid_get_parameters.go @@ -0,0 +1,178 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1CloudConfigsGcpPoolMachinesUIDGetParams creates a new V1CloudConfigsGcpPoolMachinesUIDGetParams object +// with the default values initialized. +func NewV1CloudConfigsGcpPoolMachinesUIDGetParams() *V1CloudConfigsGcpPoolMachinesUIDGetParams { + var () + return &V1CloudConfigsGcpPoolMachinesUIDGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudConfigsGcpPoolMachinesUIDGetParamsWithTimeout creates a new V1CloudConfigsGcpPoolMachinesUIDGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudConfigsGcpPoolMachinesUIDGetParamsWithTimeout(timeout time.Duration) *V1CloudConfigsGcpPoolMachinesUIDGetParams { + var () + return &V1CloudConfigsGcpPoolMachinesUIDGetParams{ + + timeout: timeout, + } +} + +// NewV1CloudConfigsGcpPoolMachinesUIDGetParamsWithContext creates a new V1CloudConfigsGcpPoolMachinesUIDGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudConfigsGcpPoolMachinesUIDGetParamsWithContext(ctx context.Context) *V1CloudConfigsGcpPoolMachinesUIDGetParams { + var () + return &V1CloudConfigsGcpPoolMachinesUIDGetParams{ + + Context: ctx, + } +} + +// NewV1CloudConfigsGcpPoolMachinesUIDGetParamsWithHTTPClient creates a new V1CloudConfigsGcpPoolMachinesUIDGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudConfigsGcpPoolMachinesUIDGetParamsWithHTTPClient(client *http.Client) *V1CloudConfigsGcpPoolMachinesUIDGetParams { + var () + return &V1CloudConfigsGcpPoolMachinesUIDGetParams{ + HTTPClient: client, + } +} + +/* +V1CloudConfigsGcpPoolMachinesUIDGetParams contains all the parameters to send to the API endpoint +for the v1 cloud configs gcp pool machines Uid get operation typically these are written to a http.Request +*/ +type V1CloudConfigsGcpPoolMachinesUIDGetParams struct { + + /*ConfigUID + Cluster's cloud config uid + + */ + ConfigUID string + /*MachinePoolName + Machine pool name + + */ + MachinePoolName string + /*MachineUID + Machine uid + + */ + MachineUID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud configs gcp pool machines Uid get params +func (o *V1CloudConfigsGcpPoolMachinesUIDGetParams) WithTimeout(timeout time.Duration) *V1CloudConfigsGcpPoolMachinesUIDGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud configs gcp pool machines Uid get params +func (o *V1CloudConfigsGcpPoolMachinesUIDGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud configs gcp pool machines Uid get params +func (o *V1CloudConfigsGcpPoolMachinesUIDGetParams) WithContext(ctx context.Context) *V1CloudConfigsGcpPoolMachinesUIDGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud configs gcp pool machines Uid get params +func (o *V1CloudConfigsGcpPoolMachinesUIDGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud configs gcp pool machines Uid get params +func (o *V1CloudConfigsGcpPoolMachinesUIDGetParams) WithHTTPClient(client *http.Client) *V1CloudConfigsGcpPoolMachinesUIDGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud configs gcp pool machines Uid get params +func (o *V1CloudConfigsGcpPoolMachinesUIDGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithConfigUID adds the configUID to the v1 cloud configs gcp pool machines Uid get params +func (o *V1CloudConfigsGcpPoolMachinesUIDGetParams) WithConfigUID(configUID string) *V1CloudConfigsGcpPoolMachinesUIDGetParams { + o.SetConfigUID(configUID) + return o +} + +// SetConfigUID adds the configUid to the v1 cloud configs gcp pool machines Uid get params +func (o *V1CloudConfigsGcpPoolMachinesUIDGetParams) SetConfigUID(configUID string) { + o.ConfigUID = configUID +} + +// WithMachinePoolName adds the machinePoolName to the v1 cloud configs gcp pool machines Uid get params +func (o *V1CloudConfigsGcpPoolMachinesUIDGetParams) WithMachinePoolName(machinePoolName string) *V1CloudConfigsGcpPoolMachinesUIDGetParams { + o.SetMachinePoolName(machinePoolName) + return o +} + +// SetMachinePoolName adds the machinePoolName to the v1 cloud configs gcp pool machines Uid get params +func (o *V1CloudConfigsGcpPoolMachinesUIDGetParams) SetMachinePoolName(machinePoolName string) { + o.MachinePoolName = machinePoolName +} + +// WithMachineUID adds the machineUID to the v1 cloud configs gcp pool machines Uid get params +func (o *V1CloudConfigsGcpPoolMachinesUIDGetParams) WithMachineUID(machineUID string) *V1CloudConfigsGcpPoolMachinesUIDGetParams { + o.SetMachineUID(machineUID) + return o +} + +// SetMachineUID adds the machineUid to the v1 cloud configs gcp pool machines Uid get params +func (o *V1CloudConfigsGcpPoolMachinesUIDGetParams) SetMachineUID(machineUID string) { + o.MachineUID = machineUID +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudConfigsGcpPoolMachinesUIDGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param configUid + if err := r.SetPathParam("configUid", o.ConfigUID); err != nil { + return err + } + + // path param machinePoolName + if err := r.SetPathParam("machinePoolName", o.MachinePoolName); err != nil { + return err + } + + // path param machineUid + if err := r.SetPathParam("machineUid", o.MachineUID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_configs_gcp_pool_machines_uid_get_responses.go b/api/client/v1/v1_cloud_configs_gcp_pool_machines_uid_get_responses.go new file mode 100644 index 00000000..ef934a46 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_gcp_pool_machines_uid_get_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1CloudConfigsGcpPoolMachinesUIDGetReader is a Reader for the V1CloudConfigsGcpPoolMachinesUIDGet structure. +type V1CloudConfigsGcpPoolMachinesUIDGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudConfigsGcpPoolMachinesUIDGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1CloudConfigsGcpPoolMachinesUIDGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudConfigsGcpPoolMachinesUIDGetOK creates a V1CloudConfigsGcpPoolMachinesUIDGetOK with default headers values +func NewV1CloudConfigsGcpPoolMachinesUIDGetOK() *V1CloudConfigsGcpPoolMachinesUIDGetOK { + return &V1CloudConfigsGcpPoolMachinesUIDGetOK{} +} + +/* +V1CloudConfigsGcpPoolMachinesUIDGetOK handles this case with default header values. + +OK +*/ +type V1CloudConfigsGcpPoolMachinesUIDGetOK struct { + Payload *models.V1GcpMachine +} + +func (o *V1CloudConfigsGcpPoolMachinesUIDGetOK) Error() string { + return fmt.Sprintf("[GET /v1/cloudconfigs/gcp/{configUid}/machinePools/{machinePoolName}/machines/{machineUid}][%d] v1CloudConfigsGcpPoolMachinesUidGetOK %+v", 200, o.Payload) +} + +func (o *V1CloudConfigsGcpPoolMachinesUIDGetOK) GetPayload() *models.V1GcpMachine { + return o.Payload +} + +func (o *V1CloudConfigsGcpPoolMachinesUIDGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1GcpMachine) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_cloud_configs_gcp_pool_machines_uid_update_parameters.go b/api/client/v1/v1_cloud_configs_gcp_pool_machines_uid_update_parameters.go new file mode 100644 index 00000000..7dd5e265 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_gcp_pool_machines_uid_update_parameters.go @@ -0,0 +1,199 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1CloudConfigsGcpPoolMachinesUIDUpdateParams creates a new V1CloudConfigsGcpPoolMachinesUIDUpdateParams object +// with the default values initialized. +func NewV1CloudConfigsGcpPoolMachinesUIDUpdateParams() *V1CloudConfigsGcpPoolMachinesUIDUpdateParams { + var () + return &V1CloudConfigsGcpPoolMachinesUIDUpdateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudConfigsGcpPoolMachinesUIDUpdateParamsWithTimeout creates a new V1CloudConfigsGcpPoolMachinesUIDUpdateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudConfigsGcpPoolMachinesUIDUpdateParamsWithTimeout(timeout time.Duration) *V1CloudConfigsGcpPoolMachinesUIDUpdateParams { + var () + return &V1CloudConfigsGcpPoolMachinesUIDUpdateParams{ + + timeout: timeout, + } +} + +// NewV1CloudConfigsGcpPoolMachinesUIDUpdateParamsWithContext creates a new V1CloudConfigsGcpPoolMachinesUIDUpdateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudConfigsGcpPoolMachinesUIDUpdateParamsWithContext(ctx context.Context) *V1CloudConfigsGcpPoolMachinesUIDUpdateParams { + var () + return &V1CloudConfigsGcpPoolMachinesUIDUpdateParams{ + + Context: ctx, + } +} + +// NewV1CloudConfigsGcpPoolMachinesUIDUpdateParamsWithHTTPClient creates a new V1CloudConfigsGcpPoolMachinesUIDUpdateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudConfigsGcpPoolMachinesUIDUpdateParamsWithHTTPClient(client *http.Client) *V1CloudConfigsGcpPoolMachinesUIDUpdateParams { + var () + return &V1CloudConfigsGcpPoolMachinesUIDUpdateParams{ + HTTPClient: client, + } +} + +/* +V1CloudConfigsGcpPoolMachinesUIDUpdateParams contains all the parameters to send to the API endpoint +for the v1 cloud configs gcp pool machines Uid update operation typically these are written to a http.Request +*/ +type V1CloudConfigsGcpPoolMachinesUIDUpdateParams struct { + + /*Body*/ + Body *models.V1GcpMachine + /*ConfigUID + Cluster's cloud config uid + + */ + ConfigUID string + /*MachinePoolName + Machine pool name + + */ + MachinePoolName string + /*MachineUID + Machine uid + + */ + MachineUID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud configs gcp pool machines Uid update params +func (o *V1CloudConfigsGcpPoolMachinesUIDUpdateParams) WithTimeout(timeout time.Duration) *V1CloudConfigsGcpPoolMachinesUIDUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud configs gcp pool machines Uid update params +func (o *V1CloudConfigsGcpPoolMachinesUIDUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud configs gcp pool machines Uid update params +func (o *V1CloudConfigsGcpPoolMachinesUIDUpdateParams) WithContext(ctx context.Context) *V1CloudConfigsGcpPoolMachinesUIDUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud configs gcp pool machines Uid update params +func (o *V1CloudConfigsGcpPoolMachinesUIDUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud configs gcp pool machines Uid update params +func (o *V1CloudConfigsGcpPoolMachinesUIDUpdateParams) WithHTTPClient(client *http.Client) *V1CloudConfigsGcpPoolMachinesUIDUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud configs gcp pool machines Uid update params +func (o *V1CloudConfigsGcpPoolMachinesUIDUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 cloud configs gcp pool machines Uid update params +func (o *V1CloudConfigsGcpPoolMachinesUIDUpdateParams) WithBody(body *models.V1GcpMachine) *V1CloudConfigsGcpPoolMachinesUIDUpdateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 cloud configs gcp pool machines Uid update params +func (o *V1CloudConfigsGcpPoolMachinesUIDUpdateParams) SetBody(body *models.V1GcpMachine) { + o.Body = body +} + +// WithConfigUID adds the configUID to the v1 cloud configs gcp pool machines Uid update params +func (o *V1CloudConfigsGcpPoolMachinesUIDUpdateParams) WithConfigUID(configUID string) *V1CloudConfigsGcpPoolMachinesUIDUpdateParams { + o.SetConfigUID(configUID) + return o +} + +// SetConfigUID adds the configUid to the v1 cloud configs gcp pool machines Uid update params +func (o *V1CloudConfigsGcpPoolMachinesUIDUpdateParams) SetConfigUID(configUID string) { + o.ConfigUID = configUID +} + +// WithMachinePoolName adds the machinePoolName to the v1 cloud configs gcp pool machines Uid update params +func (o *V1CloudConfigsGcpPoolMachinesUIDUpdateParams) WithMachinePoolName(machinePoolName string) *V1CloudConfigsGcpPoolMachinesUIDUpdateParams { + o.SetMachinePoolName(machinePoolName) + return o +} + +// SetMachinePoolName adds the machinePoolName to the v1 cloud configs gcp pool machines Uid update params +func (o *V1CloudConfigsGcpPoolMachinesUIDUpdateParams) SetMachinePoolName(machinePoolName string) { + o.MachinePoolName = machinePoolName +} + +// WithMachineUID adds the machineUID to the v1 cloud configs gcp pool machines Uid update params +func (o *V1CloudConfigsGcpPoolMachinesUIDUpdateParams) WithMachineUID(machineUID string) *V1CloudConfigsGcpPoolMachinesUIDUpdateParams { + o.SetMachineUID(machineUID) + return o +} + +// SetMachineUID adds the machineUid to the v1 cloud configs gcp pool machines Uid update params +func (o *V1CloudConfigsGcpPoolMachinesUIDUpdateParams) SetMachineUID(machineUID string) { + o.MachineUID = machineUID +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudConfigsGcpPoolMachinesUIDUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param configUid + if err := r.SetPathParam("configUid", o.ConfigUID); err != nil { + return err + } + + // path param machinePoolName + if err := r.SetPathParam("machinePoolName", o.MachinePoolName); err != nil { + return err + } + + // path param machineUid + if err := r.SetPathParam("machineUid", o.MachineUID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_configs_gcp_pool_machines_uid_update_responses.go b/api/client/v1/v1_cloud_configs_gcp_pool_machines_uid_update_responses.go new file mode 100644 index 00000000..953e518d --- /dev/null +++ b/api/client/v1/v1_cloud_configs_gcp_pool_machines_uid_update_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1CloudConfigsGcpPoolMachinesUIDUpdateReader is a Reader for the V1CloudConfigsGcpPoolMachinesUIDUpdate structure. +type V1CloudConfigsGcpPoolMachinesUIDUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudConfigsGcpPoolMachinesUIDUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1CloudConfigsGcpPoolMachinesUIDUpdateNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudConfigsGcpPoolMachinesUIDUpdateNoContent creates a V1CloudConfigsGcpPoolMachinesUIDUpdateNoContent with default headers values +func NewV1CloudConfigsGcpPoolMachinesUIDUpdateNoContent() *V1CloudConfigsGcpPoolMachinesUIDUpdateNoContent { + return &V1CloudConfigsGcpPoolMachinesUIDUpdateNoContent{} +} + +/* +V1CloudConfigsGcpPoolMachinesUIDUpdateNoContent handles this case with default header values. + +The resource was updated successfully +*/ +type V1CloudConfigsGcpPoolMachinesUIDUpdateNoContent struct { +} + +func (o *V1CloudConfigsGcpPoolMachinesUIDUpdateNoContent) Error() string { + return fmt.Sprintf("[PUT /v1/cloudconfigs/gcp/{configUid}/machinePools/{machinePoolName}/machines/{machineUid}][%d] v1CloudConfigsGcpPoolMachinesUidUpdateNoContent ", 204) +} + +func (o *V1CloudConfigsGcpPoolMachinesUIDUpdateNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_cloud_configs_gcp_uid_cluster_config_parameters.go b/api/client/v1/v1_cloud_configs_gcp_uid_cluster_config_parameters.go new file mode 100644 index 00000000..09b4a0c1 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_gcp_uid_cluster_config_parameters.go @@ -0,0 +1,157 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1CloudConfigsGcpUIDClusterConfigParams creates a new V1CloudConfigsGcpUIDClusterConfigParams object +// with the default values initialized. +func NewV1CloudConfigsGcpUIDClusterConfigParams() *V1CloudConfigsGcpUIDClusterConfigParams { + var () + return &V1CloudConfigsGcpUIDClusterConfigParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudConfigsGcpUIDClusterConfigParamsWithTimeout creates a new V1CloudConfigsGcpUIDClusterConfigParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudConfigsGcpUIDClusterConfigParamsWithTimeout(timeout time.Duration) *V1CloudConfigsGcpUIDClusterConfigParams { + var () + return &V1CloudConfigsGcpUIDClusterConfigParams{ + + timeout: timeout, + } +} + +// NewV1CloudConfigsGcpUIDClusterConfigParamsWithContext creates a new V1CloudConfigsGcpUIDClusterConfigParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudConfigsGcpUIDClusterConfigParamsWithContext(ctx context.Context) *V1CloudConfigsGcpUIDClusterConfigParams { + var () + return &V1CloudConfigsGcpUIDClusterConfigParams{ + + Context: ctx, + } +} + +// NewV1CloudConfigsGcpUIDClusterConfigParamsWithHTTPClient creates a new V1CloudConfigsGcpUIDClusterConfigParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudConfigsGcpUIDClusterConfigParamsWithHTTPClient(client *http.Client) *V1CloudConfigsGcpUIDClusterConfigParams { + var () + return &V1CloudConfigsGcpUIDClusterConfigParams{ + HTTPClient: client, + } +} + +/* +V1CloudConfigsGcpUIDClusterConfigParams contains all the parameters to send to the API endpoint +for the v1 cloud configs gcp Uid cluster config operation typically these are written to a http.Request +*/ +type V1CloudConfigsGcpUIDClusterConfigParams struct { + + /*Body*/ + Body *models.V1GcpCloudClusterConfigEntity + /*ConfigUID + Cluster's cloud config uid + + */ + ConfigUID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud configs gcp Uid cluster config params +func (o *V1CloudConfigsGcpUIDClusterConfigParams) WithTimeout(timeout time.Duration) *V1CloudConfigsGcpUIDClusterConfigParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud configs gcp Uid cluster config params +func (o *V1CloudConfigsGcpUIDClusterConfigParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud configs gcp Uid cluster config params +func (o *V1CloudConfigsGcpUIDClusterConfigParams) WithContext(ctx context.Context) *V1CloudConfigsGcpUIDClusterConfigParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud configs gcp Uid cluster config params +func (o *V1CloudConfigsGcpUIDClusterConfigParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud configs gcp Uid cluster config params +func (o *V1CloudConfigsGcpUIDClusterConfigParams) WithHTTPClient(client *http.Client) *V1CloudConfigsGcpUIDClusterConfigParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud configs gcp Uid cluster config params +func (o *V1CloudConfigsGcpUIDClusterConfigParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 cloud configs gcp Uid cluster config params +func (o *V1CloudConfigsGcpUIDClusterConfigParams) WithBody(body *models.V1GcpCloudClusterConfigEntity) *V1CloudConfigsGcpUIDClusterConfigParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 cloud configs gcp Uid cluster config params +func (o *V1CloudConfigsGcpUIDClusterConfigParams) SetBody(body *models.V1GcpCloudClusterConfigEntity) { + o.Body = body +} + +// WithConfigUID adds the configUID to the v1 cloud configs gcp Uid cluster config params +func (o *V1CloudConfigsGcpUIDClusterConfigParams) WithConfigUID(configUID string) *V1CloudConfigsGcpUIDClusterConfigParams { + o.SetConfigUID(configUID) + return o +} + +// SetConfigUID adds the configUid to the v1 cloud configs gcp Uid cluster config params +func (o *V1CloudConfigsGcpUIDClusterConfigParams) SetConfigUID(configUID string) { + o.ConfigUID = configUID +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudConfigsGcpUIDClusterConfigParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param configUid + if err := r.SetPathParam("configUid", o.ConfigUID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_configs_gcp_uid_cluster_config_responses.go b/api/client/v1/v1_cloud_configs_gcp_uid_cluster_config_responses.go new file mode 100644 index 00000000..47226f47 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_gcp_uid_cluster_config_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1CloudConfigsGcpUIDClusterConfigReader is a Reader for the V1CloudConfigsGcpUIDClusterConfig structure. +type V1CloudConfigsGcpUIDClusterConfigReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudConfigsGcpUIDClusterConfigReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1CloudConfigsGcpUIDClusterConfigNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudConfigsGcpUIDClusterConfigNoContent creates a V1CloudConfigsGcpUIDClusterConfigNoContent with default headers values +func NewV1CloudConfigsGcpUIDClusterConfigNoContent() *V1CloudConfigsGcpUIDClusterConfigNoContent { + return &V1CloudConfigsGcpUIDClusterConfigNoContent{} +} + +/* +V1CloudConfigsGcpUIDClusterConfigNoContent handles this case with default header values. + +The resource was updated successfully +*/ +type V1CloudConfigsGcpUIDClusterConfigNoContent struct { +} + +func (o *V1CloudConfigsGcpUIDClusterConfigNoContent) Error() string { + return fmt.Sprintf("[PUT /v1/cloudconfigs/gcp/{configUid}/clusterConfig][%d] v1CloudConfigsGcpUidClusterConfigNoContent ", 204) +} + +func (o *V1CloudConfigsGcpUIDClusterConfigNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_cloud_configs_generic_get_parameters.go b/api/client/v1/v1_cloud_configs_generic_get_parameters.go new file mode 100644 index 00000000..7d0bd0e8 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_generic_get_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1CloudConfigsGenericGetParams creates a new V1CloudConfigsGenericGetParams object +// with the default values initialized. +func NewV1CloudConfigsGenericGetParams() *V1CloudConfigsGenericGetParams { + var () + return &V1CloudConfigsGenericGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudConfigsGenericGetParamsWithTimeout creates a new V1CloudConfigsGenericGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudConfigsGenericGetParamsWithTimeout(timeout time.Duration) *V1CloudConfigsGenericGetParams { + var () + return &V1CloudConfigsGenericGetParams{ + + timeout: timeout, + } +} + +// NewV1CloudConfigsGenericGetParamsWithContext creates a new V1CloudConfigsGenericGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudConfigsGenericGetParamsWithContext(ctx context.Context) *V1CloudConfigsGenericGetParams { + var () + return &V1CloudConfigsGenericGetParams{ + + Context: ctx, + } +} + +// NewV1CloudConfigsGenericGetParamsWithHTTPClient creates a new V1CloudConfigsGenericGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudConfigsGenericGetParamsWithHTTPClient(client *http.Client) *V1CloudConfigsGenericGetParams { + var () + return &V1CloudConfigsGenericGetParams{ + HTTPClient: client, + } +} + +/* +V1CloudConfigsGenericGetParams contains all the parameters to send to the API endpoint +for the v1 cloud configs generic get operation typically these are written to a http.Request +*/ +type V1CloudConfigsGenericGetParams struct { + + /*ConfigUID + Cluster's cloud config uid + + */ + ConfigUID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud configs generic get params +func (o *V1CloudConfigsGenericGetParams) WithTimeout(timeout time.Duration) *V1CloudConfigsGenericGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud configs generic get params +func (o *V1CloudConfigsGenericGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud configs generic get params +func (o *V1CloudConfigsGenericGetParams) WithContext(ctx context.Context) *V1CloudConfigsGenericGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud configs generic get params +func (o *V1CloudConfigsGenericGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud configs generic get params +func (o *V1CloudConfigsGenericGetParams) WithHTTPClient(client *http.Client) *V1CloudConfigsGenericGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud configs generic get params +func (o *V1CloudConfigsGenericGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithConfigUID adds the configUID to the v1 cloud configs generic get params +func (o *V1CloudConfigsGenericGetParams) WithConfigUID(configUID string) *V1CloudConfigsGenericGetParams { + o.SetConfigUID(configUID) + return o +} + +// SetConfigUID adds the configUid to the v1 cloud configs generic get params +func (o *V1CloudConfigsGenericGetParams) SetConfigUID(configUID string) { + o.ConfigUID = configUID +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudConfigsGenericGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param configUid + if err := r.SetPathParam("configUid", o.ConfigUID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_configs_generic_get_responses.go b/api/client/v1/v1_cloud_configs_generic_get_responses.go new file mode 100644 index 00000000..1457de50 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_generic_get_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1CloudConfigsGenericGetReader is a Reader for the V1CloudConfigsGenericGet structure. +type V1CloudConfigsGenericGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudConfigsGenericGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1CloudConfigsGenericGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudConfigsGenericGetOK creates a V1CloudConfigsGenericGetOK with default headers values +func NewV1CloudConfigsGenericGetOK() *V1CloudConfigsGenericGetOK { + return &V1CloudConfigsGenericGetOK{} +} + +/* +V1CloudConfigsGenericGetOK handles this case with default header values. + +OK +*/ +type V1CloudConfigsGenericGetOK struct { + Payload *models.V1GenericCloudConfig +} + +func (o *V1CloudConfigsGenericGetOK) Error() string { + return fmt.Sprintf("[GET /v1/cloudconfigs/generic/{configUid}][%d] v1CloudConfigsGenericGetOK %+v", 200, o.Payload) +} + +func (o *V1CloudConfigsGenericGetOK) GetPayload() *models.V1GenericCloudConfig { + return o.Payload +} + +func (o *V1CloudConfigsGenericGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1GenericCloudConfig) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_cloud_configs_generic_machine_pool_create_parameters.go b/api/client/v1/v1_cloud_configs_generic_machine_pool_create_parameters.go new file mode 100644 index 00000000..a7755a14 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_generic_machine_pool_create_parameters.go @@ -0,0 +1,157 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1CloudConfigsGenericMachinePoolCreateParams creates a new V1CloudConfigsGenericMachinePoolCreateParams object +// with the default values initialized. +func NewV1CloudConfigsGenericMachinePoolCreateParams() *V1CloudConfigsGenericMachinePoolCreateParams { + var () + return &V1CloudConfigsGenericMachinePoolCreateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudConfigsGenericMachinePoolCreateParamsWithTimeout creates a new V1CloudConfigsGenericMachinePoolCreateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudConfigsGenericMachinePoolCreateParamsWithTimeout(timeout time.Duration) *V1CloudConfigsGenericMachinePoolCreateParams { + var () + return &V1CloudConfigsGenericMachinePoolCreateParams{ + + timeout: timeout, + } +} + +// NewV1CloudConfigsGenericMachinePoolCreateParamsWithContext creates a new V1CloudConfigsGenericMachinePoolCreateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudConfigsGenericMachinePoolCreateParamsWithContext(ctx context.Context) *V1CloudConfigsGenericMachinePoolCreateParams { + var () + return &V1CloudConfigsGenericMachinePoolCreateParams{ + + Context: ctx, + } +} + +// NewV1CloudConfigsGenericMachinePoolCreateParamsWithHTTPClient creates a new V1CloudConfigsGenericMachinePoolCreateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudConfigsGenericMachinePoolCreateParamsWithHTTPClient(client *http.Client) *V1CloudConfigsGenericMachinePoolCreateParams { + var () + return &V1CloudConfigsGenericMachinePoolCreateParams{ + HTTPClient: client, + } +} + +/* +V1CloudConfigsGenericMachinePoolCreateParams contains all the parameters to send to the API endpoint +for the v1 cloud configs generic machine pool create operation typically these are written to a http.Request +*/ +type V1CloudConfigsGenericMachinePoolCreateParams struct { + + /*Body*/ + Body *models.V1GenericMachinePoolConfigEntity + /*ConfigUID + Cluster's cloud config uid + + */ + ConfigUID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud configs generic machine pool create params +func (o *V1CloudConfigsGenericMachinePoolCreateParams) WithTimeout(timeout time.Duration) *V1CloudConfigsGenericMachinePoolCreateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud configs generic machine pool create params +func (o *V1CloudConfigsGenericMachinePoolCreateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud configs generic machine pool create params +func (o *V1CloudConfigsGenericMachinePoolCreateParams) WithContext(ctx context.Context) *V1CloudConfigsGenericMachinePoolCreateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud configs generic machine pool create params +func (o *V1CloudConfigsGenericMachinePoolCreateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud configs generic machine pool create params +func (o *V1CloudConfigsGenericMachinePoolCreateParams) WithHTTPClient(client *http.Client) *V1CloudConfigsGenericMachinePoolCreateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud configs generic machine pool create params +func (o *V1CloudConfigsGenericMachinePoolCreateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 cloud configs generic machine pool create params +func (o *V1CloudConfigsGenericMachinePoolCreateParams) WithBody(body *models.V1GenericMachinePoolConfigEntity) *V1CloudConfigsGenericMachinePoolCreateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 cloud configs generic machine pool create params +func (o *V1CloudConfigsGenericMachinePoolCreateParams) SetBody(body *models.V1GenericMachinePoolConfigEntity) { + o.Body = body +} + +// WithConfigUID adds the configUID to the v1 cloud configs generic machine pool create params +func (o *V1CloudConfigsGenericMachinePoolCreateParams) WithConfigUID(configUID string) *V1CloudConfigsGenericMachinePoolCreateParams { + o.SetConfigUID(configUID) + return o +} + +// SetConfigUID adds the configUid to the v1 cloud configs generic machine pool create params +func (o *V1CloudConfigsGenericMachinePoolCreateParams) SetConfigUID(configUID string) { + o.ConfigUID = configUID +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudConfigsGenericMachinePoolCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param configUid + if err := r.SetPathParam("configUid", o.ConfigUID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_configs_generic_machine_pool_create_responses.go b/api/client/v1/v1_cloud_configs_generic_machine_pool_create_responses.go new file mode 100644 index 00000000..49c0ff21 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_generic_machine_pool_create_responses.go @@ -0,0 +1,77 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1CloudConfigsGenericMachinePoolCreateReader is a Reader for the V1CloudConfigsGenericMachinePoolCreate structure. +type V1CloudConfigsGenericMachinePoolCreateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudConfigsGenericMachinePoolCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 201: + result := NewV1CloudConfigsGenericMachinePoolCreateCreated() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudConfigsGenericMachinePoolCreateCreated creates a V1CloudConfigsGenericMachinePoolCreateCreated with default headers values +func NewV1CloudConfigsGenericMachinePoolCreateCreated() *V1CloudConfigsGenericMachinePoolCreateCreated { + return &V1CloudConfigsGenericMachinePoolCreateCreated{} +} + +/* +V1CloudConfigsGenericMachinePoolCreateCreated handles this case with default header values. + +Created successfully +*/ +type V1CloudConfigsGenericMachinePoolCreateCreated struct { + /*Audit uid for the request + */ + AuditUID string + + Payload *models.V1UID +} + +func (o *V1CloudConfigsGenericMachinePoolCreateCreated) Error() string { + return fmt.Sprintf("[POST /v1/cloudconfigs/generic/{configUid}/machinePools][%d] v1CloudConfigsGenericMachinePoolCreateCreated %+v", 201, o.Payload) +} + +func (o *V1CloudConfigsGenericMachinePoolCreateCreated) GetPayload() *models.V1UID { + return o.Payload +} + +func (o *V1CloudConfigsGenericMachinePoolCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header AuditUid + o.AuditUID = response.GetHeader("AuditUid") + + o.Payload = new(models.V1UID) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_cloud_configs_generic_machine_pool_delete_parameters.go b/api/client/v1/v1_cloud_configs_generic_machine_pool_delete_parameters.go new file mode 100644 index 00000000..0fb7de17 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_generic_machine_pool_delete_parameters.go @@ -0,0 +1,157 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1CloudConfigsGenericMachinePoolDeleteParams creates a new V1CloudConfigsGenericMachinePoolDeleteParams object +// with the default values initialized. +func NewV1CloudConfigsGenericMachinePoolDeleteParams() *V1CloudConfigsGenericMachinePoolDeleteParams { + var () + return &V1CloudConfigsGenericMachinePoolDeleteParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudConfigsGenericMachinePoolDeleteParamsWithTimeout creates a new V1CloudConfigsGenericMachinePoolDeleteParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudConfigsGenericMachinePoolDeleteParamsWithTimeout(timeout time.Duration) *V1CloudConfigsGenericMachinePoolDeleteParams { + var () + return &V1CloudConfigsGenericMachinePoolDeleteParams{ + + timeout: timeout, + } +} + +// NewV1CloudConfigsGenericMachinePoolDeleteParamsWithContext creates a new V1CloudConfigsGenericMachinePoolDeleteParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudConfigsGenericMachinePoolDeleteParamsWithContext(ctx context.Context) *V1CloudConfigsGenericMachinePoolDeleteParams { + var () + return &V1CloudConfigsGenericMachinePoolDeleteParams{ + + Context: ctx, + } +} + +// NewV1CloudConfigsGenericMachinePoolDeleteParamsWithHTTPClient creates a new V1CloudConfigsGenericMachinePoolDeleteParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudConfigsGenericMachinePoolDeleteParamsWithHTTPClient(client *http.Client) *V1CloudConfigsGenericMachinePoolDeleteParams { + var () + return &V1CloudConfigsGenericMachinePoolDeleteParams{ + HTTPClient: client, + } +} + +/* +V1CloudConfigsGenericMachinePoolDeleteParams contains all the parameters to send to the API endpoint +for the v1 cloud configs generic machine pool delete operation typically these are written to a http.Request +*/ +type V1CloudConfigsGenericMachinePoolDeleteParams struct { + + /*ConfigUID + Cluster's cloud config uid + + */ + ConfigUID string + /*MachinePoolName + Machine pool name + + */ + MachinePoolName string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud configs generic machine pool delete params +func (o *V1CloudConfigsGenericMachinePoolDeleteParams) WithTimeout(timeout time.Duration) *V1CloudConfigsGenericMachinePoolDeleteParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud configs generic machine pool delete params +func (o *V1CloudConfigsGenericMachinePoolDeleteParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud configs generic machine pool delete params +func (o *V1CloudConfigsGenericMachinePoolDeleteParams) WithContext(ctx context.Context) *V1CloudConfigsGenericMachinePoolDeleteParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud configs generic machine pool delete params +func (o *V1CloudConfigsGenericMachinePoolDeleteParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud configs generic machine pool delete params +func (o *V1CloudConfigsGenericMachinePoolDeleteParams) WithHTTPClient(client *http.Client) *V1CloudConfigsGenericMachinePoolDeleteParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud configs generic machine pool delete params +func (o *V1CloudConfigsGenericMachinePoolDeleteParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithConfigUID adds the configUID to the v1 cloud configs generic machine pool delete params +func (o *V1CloudConfigsGenericMachinePoolDeleteParams) WithConfigUID(configUID string) *V1CloudConfigsGenericMachinePoolDeleteParams { + o.SetConfigUID(configUID) + return o +} + +// SetConfigUID adds the configUid to the v1 cloud configs generic machine pool delete params +func (o *V1CloudConfigsGenericMachinePoolDeleteParams) SetConfigUID(configUID string) { + o.ConfigUID = configUID +} + +// WithMachinePoolName adds the machinePoolName to the v1 cloud configs generic machine pool delete params +func (o *V1CloudConfigsGenericMachinePoolDeleteParams) WithMachinePoolName(machinePoolName string) *V1CloudConfigsGenericMachinePoolDeleteParams { + o.SetMachinePoolName(machinePoolName) + return o +} + +// SetMachinePoolName adds the machinePoolName to the v1 cloud configs generic machine pool delete params +func (o *V1CloudConfigsGenericMachinePoolDeleteParams) SetMachinePoolName(machinePoolName string) { + o.MachinePoolName = machinePoolName +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudConfigsGenericMachinePoolDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param configUid + if err := r.SetPathParam("configUid", o.ConfigUID); err != nil { + return err + } + + // path param machinePoolName + if err := r.SetPathParam("machinePoolName", o.MachinePoolName); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_configs_generic_machine_pool_delete_responses.go b/api/client/v1/v1_cloud_configs_generic_machine_pool_delete_responses.go new file mode 100644 index 00000000..7e8802d2 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_generic_machine_pool_delete_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1CloudConfigsGenericMachinePoolDeleteReader is a Reader for the V1CloudConfigsGenericMachinePoolDelete structure. +type V1CloudConfigsGenericMachinePoolDeleteReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudConfigsGenericMachinePoolDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1CloudConfigsGenericMachinePoolDeleteNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudConfigsGenericMachinePoolDeleteNoContent creates a V1CloudConfigsGenericMachinePoolDeleteNoContent with default headers values +func NewV1CloudConfigsGenericMachinePoolDeleteNoContent() *V1CloudConfigsGenericMachinePoolDeleteNoContent { + return &V1CloudConfigsGenericMachinePoolDeleteNoContent{} +} + +/* +V1CloudConfigsGenericMachinePoolDeleteNoContent handles this case with default header values. + +The resource was deleted successfully +*/ +type V1CloudConfigsGenericMachinePoolDeleteNoContent struct { +} + +func (o *V1CloudConfigsGenericMachinePoolDeleteNoContent) Error() string { + return fmt.Sprintf("[DELETE /v1/cloudconfigs/generic/{configUid}/machinePools/{machinePoolName}][%d] v1CloudConfigsGenericMachinePoolDeleteNoContent ", 204) +} + +func (o *V1CloudConfigsGenericMachinePoolDeleteNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_cloud_configs_generic_machine_pool_update_parameters.go b/api/client/v1/v1_cloud_configs_generic_machine_pool_update_parameters.go new file mode 100644 index 00000000..19982799 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_generic_machine_pool_update_parameters.go @@ -0,0 +1,178 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1CloudConfigsGenericMachinePoolUpdateParams creates a new V1CloudConfigsGenericMachinePoolUpdateParams object +// with the default values initialized. +func NewV1CloudConfigsGenericMachinePoolUpdateParams() *V1CloudConfigsGenericMachinePoolUpdateParams { + var () + return &V1CloudConfigsGenericMachinePoolUpdateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudConfigsGenericMachinePoolUpdateParamsWithTimeout creates a new V1CloudConfigsGenericMachinePoolUpdateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudConfigsGenericMachinePoolUpdateParamsWithTimeout(timeout time.Duration) *V1CloudConfigsGenericMachinePoolUpdateParams { + var () + return &V1CloudConfigsGenericMachinePoolUpdateParams{ + + timeout: timeout, + } +} + +// NewV1CloudConfigsGenericMachinePoolUpdateParamsWithContext creates a new V1CloudConfigsGenericMachinePoolUpdateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudConfigsGenericMachinePoolUpdateParamsWithContext(ctx context.Context) *V1CloudConfigsGenericMachinePoolUpdateParams { + var () + return &V1CloudConfigsGenericMachinePoolUpdateParams{ + + Context: ctx, + } +} + +// NewV1CloudConfigsGenericMachinePoolUpdateParamsWithHTTPClient creates a new V1CloudConfigsGenericMachinePoolUpdateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudConfigsGenericMachinePoolUpdateParamsWithHTTPClient(client *http.Client) *V1CloudConfigsGenericMachinePoolUpdateParams { + var () + return &V1CloudConfigsGenericMachinePoolUpdateParams{ + HTTPClient: client, + } +} + +/* +V1CloudConfigsGenericMachinePoolUpdateParams contains all the parameters to send to the API endpoint +for the v1 cloud configs generic machine pool update operation typically these are written to a http.Request +*/ +type V1CloudConfigsGenericMachinePoolUpdateParams struct { + + /*Body*/ + Body *models.V1GenericMachinePoolConfigEntity + /*ConfigUID + Cluster's cloud config uid + + */ + ConfigUID string + /*MachinePoolName + Machine pool name + + */ + MachinePoolName string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud configs generic machine pool update params +func (o *V1CloudConfigsGenericMachinePoolUpdateParams) WithTimeout(timeout time.Duration) *V1CloudConfigsGenericMachinePoolUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud configs generic machine pool update params +func (o *V1CloudConfigsGenericMachinePoolUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud configs generic machine pool update params +func (o *V1CloudConfigsGenericMachinePoolUpdateParams) WithContext(ctx context.Context) *V1CloudConfigsGenericMachinePoolUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud configs generic machine pool update params +func (o *V1CloudConfigsGenericMachinePoolUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud configs generic machine pool update params +func (o *V1CloudConfigsGenericMachinePoolUpdateParams) WithHTTPClient(client *http.Client) *V1CloudConfigsGenericMachinePoolUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud configs generic machine pool update params +func (o *V1CloudConfigsGenericMachinePoolUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 cloud configs generic machine pool update params +func (o *V1CloudConfigsGenericMachinePoolUpdateParams) WithBody(body *models.V1GenericMachinePoolConfigEntity) *V1CloudConfigsGenericMachinePoolUpdateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 cloud configs generic machine pool update params +func (o *V1CloudConfigsGenericMachinePoolUpdateParams) SetBody(body *models.V1GenericMachinePoolConfigEntity) { + o.Body = body +} + +// WithConfigUID adds the configUID to the v1 cloud configs generic machine pool update params +func (o *V1CloudConfigsGenericMachinePoolUpdateParams) WithConfigUID(configUID string) *V1CloudConfigsGenericMachinePoolUpdateParams { + o.SetConfigUID(configUID) + return o +} + +// SetConfigUID adds the configUid to the v1 cloud configs generic machine pool update params +func (o *V1CloudConfigsGenericMachinePoolUpdateParams) SetConfigUID(configUID string) { + o.ConfigUID = configUID +} + +// WithMachinePoolName adds the machinePoolName to the v1 cloud configs generic machine pool update params +func (o *V1CloudConfigsGenericMachinePoolUpdateParams) WithMachinePoolName(machinePoolName string) *V1CloudConfigsGenericMachinePoolUpdateParams { + o.SetMachinePoolName(machinePoolName) + return o +} + +// SetMachinePoolName adds the machinePoolName to the v1 cloud configs generic machine pool update params +func (o *V1CloudConfigsGenericMachinePoolUpdateParams) SetMachinePoolName(machinePoolName string) { + o.MachinePoolName = machinePoolName +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudConfigsGenericMachinePoolUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param configUid + if err := r.SetPathParam("configUid", o.ConfigUID); err != nil { + return err + } + + // path param machinePoolName + if err := r.SetPathParam("machinePoolName", o.MachinePoolName); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_configs_generic_machine_pool_update_responses.go b/api/client/v1/v1_cloud_configs_generic_machine_pool_update_responses.go new file mode 100644 index 00000000..8a4416ac --- /dev/null +++ b/api/client/v1/v1_cloud_configs_generic_machine_pool_update_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1CloudConfigsGenericMachinePoolUpdateReader is a Reader for the V1CloudConfigsGenericMachinePoolUpdate structure. +type V1CloudConfigsGenericMachinePoolUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudConfigsGenericMachinePoolUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1CloudConfigsGenericMachinePoolUpdateNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudConfigsGenericMachinePoolUpdateNoContent creates a V1CloudConfigsGenericMachinePoolUpdateNoContent with default headers values +func NewV1CloudConfigsGenericMachinePoolUpdateNoContent() *V1CloudConfigsGenericMachinePoolUpdateNoContent { + return &V1CloudConfigsGenericMachinePoolUpdateNoContent{} +} + +/* +V1CloudConfigsGenericMachinePoolUpdateNoContent handles this case with default header values. + +The resource was updated successfully +*/ +type V1CloudConfigsGenericMachinePoolUpdateNoContent struct { +} + +func (o *V1CloudConfigsGenericMachinePoolUpdateNoContent) Error() string { + return fmt.Sprintf("[PUT /v1/cloudconfigs/generic/{configUid}/machinePools/{machinePoolName}][%d] v1CloudConfigsGenericMachinePoolUpdateNoContent ", 204) +} + +func (o *V1CloudConfigsGenericMachinePoolUpdateNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_cloud_configs_generic_pool_machines_add_parameters.go b/api/client/v1/v1_cloud_configs_generic_pool_machines_add_parameters.go new file mode 100644 index 00000000..23722eae --- /dev/null +++ b/api/client/v1/v1_cloud_configs_generic_pool_machines_add_parameters.go @@ -0,0 +1,178 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1CloudConfigsGenericPoolMachinesAddParams creates a new V1CloudConfigsGenericPoolMachinesAddParams object +// with the default values initialized. +func NewV1CloudConfigsGenericPoolMachinesAddParams() *V1CloudConfigsGenericPoolMachinesAddParams { + var () + return &V1CloudConfigsGenericPoolMachinesAddParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudConfigsGenericPoolMachinesAddParamsWithTimeout creates a new V1CloudConfigsGenericPoolMachinesAddParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudConfigsGenericPoolMachinesAddParamsWithTimeout(timeout time.Duration) *V1CloudConfigsGenericPoolMachinesAddParams { + var () + return &V1CloudConfigsGenericPoolMachinesAddParams{ + + timeout: timeout, + } +} + +// NewV1CloudConfigsGenericPoolMachinesAddParamsWithContext creates a new V1CloudConfigsGenericPoolMachinesAddParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudConfigsGenericPoolMachinesAddParamsWithContext(ctx context.Context) *V1CloudConfigsGenericPoolMachinesAddParams { + var () + return &V1CloudConfigsGenericPoolMachinesAddParams{ + + Context: ctx, + } +} + +// NewV1CloudConfigsGenericPoolMachinesAddParamsWithHTTPClient creates a new V1CloudConfigsGenericPoolMachinesAddParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudConfigsGenericPoolMachinesAddParamsWithHTTPClient(client *http.Client) *V1CloudConfigsGenericPoolMachinesAddParams { + var () + return &V1CloudConfigsGenericPoolMachinesAddParams{ + HTTPClient: client, + } +} + +/* +V1CloudConfigsGenericPoolMachinesAddParams contains all the parameters to send to the API endpoint +for the v1 cloud configs generic pool machines add operation typically these are written to a http.Request +*/ +type V1CloudConfigsGenericPoolMachinesAddParams struct { + + /*Body*/ + Body *models.V1GenericMachine + /*ConfigUID + Cluster's cloud config uid + + */ + ConfigUID string + /*MachinePoolName + Machine pool name + + */ + MachinePoolName string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud configs generic pool machines add params +func (o *V1CloudConfigsGenericPoolMachinesAddParams) WithTimeout(timeout time.Duration) *V1CloudConfigsGenericPoolMachinesAddParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud configs generic pool machines add params +func (o *V1CloudConfigsGenericPoolMachinesAddParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud configs generic pool machines add params +func (o *V1CloudConfigsGenericPoolMachinesAddParams) WithContext(ctx context.Context) *V1CloudConfigsGenericPoolMachinesAddParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud configs generic pool machines add params +func (o *V1CloudConfigsGenericPoolMachinesAddParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud configs generic pool machines add params +func (o *V1CloudConfigsGenericPoolMachinesAddParams) WithHTTPClient(client *http.Client) *V1CloudConfigsGenericPoolMachinesAddParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud configs generic pool machines add params +func (o *V1CloudConfigsGenericPoolMachinesAddParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 cloud configs generic pool machines add params +func (o *V1CloudConfigsGenericPoolMachinesAddParams) WithBody(body *models.V1GenericMachine) *V1CloudConfigsGenericPoolMachinesAddParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 cloud configs generic pool machines add params +func (o *V1CloudConfigsGenericPoolMachinesAddParams) SetBody(body *models.V1GenericMachine) { + o.Body = body +} + +// WithConfigUID adds the configUID to the v1 cloud configs generic pool machines add params +func (o *V1CloudConfigsGenericPoolMachinesAddParams) WithConfigUID(configUID string) *V1CloudConfigsGenericPoolMachinesAddParams { + o.SetConfigUID(configUID) + return o +} + +// SetConfigUID adds the configUid to the v1 cloud configs generic pool machines add params +func (o *V1CloudConfigsGenericPoolMachinesAddParams) SetConfigUID(configUID string) { + o.ConfigUID = configUID +} + +// WithMachinePoolName adds the machinePoolName to the v1 cloud configs generic pool machines add params +func (o *V1CloudConfigsGenericPoolMachinesAddParams) WithMachinePoolName(machinePoolName string) *V1CloudConfigsGenericPoolMachinesAddParams { + o.SetMachinePoolName(machinePoolName) + return o +} + +// SetMachinePoolName adds the machinePoolName to the v1 cloud configs generic pool machines add params +func (o *V1CloudConfigsGenericPoolMachinesAddParams) SetMachinePoolName(machinePoolName string) { + o.MachinePoolName = machinePoolName +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudConfigsGenericPoolMachinesAddParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param configUid + if err := r.SetPathParam("configUid", o.ConfigUID); err != nil { + return err + } + + // path param machinePoolName + if err := r.SetPathParam("machinePoolName", o.MachinePoolName); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_configs_generic_pool_machines_add_responses.go b/api/client/v1/v1_cloud_configs_generic_pool_machines_add_responses.go new file mode 100644 index 00000000..cdc594c2 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_generic_pool_machines_add_responses.go @@ -0,0 +1,77 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1CloudConfigsGenericPoolMachinesAddReader is a Reader for the V1CloudConfigsGenericPoolMachinesAdd structure. +type V1CloudConfigsGenericPoolMachinesAddReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudConfigsGenericPoolMachinesAddReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 201: + result := NewV1CloudConfigsGenericPoolMachinesAddCreated() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudConfigsGenericPoolMachinesAddCreated creates a V1CloudConfigsGenericPoolMachinesAddCreated with default headers values +func NewV1CloudConfigsGenericPoolMachinesAddCreated() *V1CloudConfigsGenericPoolMachinesAddCreated { + return &V1CloudConfigsGenericPoolMachinesAddCreated{} +} + +/* +V1CloudConfigsGenericPoolMachinesAddCreated handles this case with default header values. + +Created successfully +*/ +type V1CloudConfigsGenericPoolMachinesAddCreated struct { + /*Audit uid for the request + */ + AuditUID string + + Payload *models.V1UID +} + +func (o *V1CloudConfigsGenericPoolMachinesAddCreated) Error() string { + return fmt.Sprintf("[POST /v1/cloudconfigs/generic/{configUid}/machinePools/{machinePoolName}/machines][%d] v1CloudConfigsGenericPoolMachinesAddCreated %+v", 201, o.Payload) +} + +func (o *V1CloudConfigsGenericPoolMachinesAddCreated) GetPayload() *models.V1UID { + return o.Payload +} + +func (o *V1CloudConfigsGenericPoolMachinesAddCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header AuditUid + o.AuditUID = response.GetHeader("AuditUid") + + o.Payload = new(models.V1UID) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_cloud_configs_generic_pool_machines_list_parameters.go b/api/client/v1/v1_cloud_configs_generic_pool_machines_list_parameters.go new file mode 100644 index 00000000..9c3fc33d --- /dev/null +++ b/api/client/v1/v1_cloud_configs_generic_pool_machines_list_parameters.go @@ -0,0 +1,365 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// NewV1CloudConfigsGenericPoolMachinesListParams creates a new V1CloudConfigsGenericPoolMachinesListParams object +// with the default values initialized. +func NewV1CloudConfigsGenericPoolMachinesListParams() *V1CloudConfigsGenericPoolMachinesListParams { + var ( + limitDefault = int64(50) + ) + return &V1CloudConfigsGenericPoolMachinesListParams{ + Limit: &limitDefault, + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudConfigsGenericPoolMachinesListParamsWithTimeout creates a new V1CloudConfigsGenericPoolMachinesListParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudConfigsGenericPoolMachinesListParamsWithTimeout(timeout time.Duration) *V1CloudConfigsGenericPoolMachinesListParams { + var ( + limitDefault = int64(50) + ) + return &V1CloudConfigsGenericPoolMachinesListParams{ + Limit: &limitDefault, + + timeout: timeout, + } +} + +// NewV1CloudConfigsGenericPoolMachinesListParamsWithContext creates a new V1CloudConfigsGenericPoolMachinesListParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudConfigsGenericPoolMachinesListParamsWithContext(ctx context.Context) *V1CloudConfigsGenericPoolMachinesListParams { + var ( + limitDefault = int64(50) + ) + return &V1CloudConfigsGenericPoolMachinesListParams{ + Limit: &limitDefault, + + Context: ctx, + } +} + +// NewV1CloudConfigsGenericPoolMachinesListParamsWithHTTPClient creates a new V1CloudConfigsGenericPoolMachinesListParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudConfigsGenericPoolMachinesListParamsWithHTTPClient(client *http.Client) *V1CloudConfigsGenericPoolMachinesListParams { + var ( + limitDefault = int64(50) + ) + return &V1CloudConfigsGenericPoolMachinesListParams{ + Limit: &limitDefault, + HTTPClient: client, + } +} + +/* +V1CloudConfigsGenericPoolMachinesListParams contains all the parameters to send to the API endpoint +for the v1 cloud configs generic pool machines list operation typically these are written to a http.Request +*/ +type V1CloudConfigsGenericPoolMachinesListParams struct { + + /*ConfigUID + Cluster's cloud config uid + + */ + ConfigUID string + /*Continue + continue token to paginate the subsequent data items + + */ + Continue *string + /*Fields + Set of fields to be presented in the response with values. The fields are comma separated. Eg: metadata.uid,metadata.name + + */ + Fields *string + /*Filters + Filters can be combined with AND, OR operators with field path name. Eg: metadata.name=TestServiceANDspec.cloudType=aws + + Server will be restricted to certain fields based on the indexed data for each resource. + + */ + Filters *string + /*Limit + limit is a maximum number of responses to return for a list call. Default and maximum value of the limit is 50. + If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. + + */ + Limit *int64 + /*MachinePoolName + Machine pool name + + */ + MachinePoolName string + /*Offset + offset is the next index number from which the response will start. The response offset value can be used along with continue token for the pagination. + + */ + Offset *int64 + /*OrderBy + Specify the fields with sort order. 1 indicates ascending and -1 for descending. Eg: orderBy=metadata.name=1,metadata.uid=-1 + + */ + OrderBy *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud configs generic pool machines list params +func (o *V1CloudConfigsGenericPoolMachinesListParams) WithTimeout(timeout time.Duration) *V1CloudConfigsGenericPoolMachinesListParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud configs generic pool machines list params +func (o *V1CloudConfigsGenericPoolMachinesListParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud configs generic pool machines list params +func (o *V1CloudConfigsGenericPoolMachinesListParams) WithContext(ctx context.Context) *V1CloudConfigsGenericPoolMachinesListParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud configs generic pool machines list params +func (o *V1CloudConfigsGenericPoolMachinesListParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud configs generic pool machines list params +func (o *V1CloudConfigsGenericPoolMachinesListParams) WithHTTPClient(client *http.Client) *V1CloudConfigsGenericPoolMachinesListParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud configs generic pool machines list params +func (o *V1CloudConfigsGenericPoolMachinesListParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithConfigUID adds the configUID to the v1 cloud configs generic pool machines list params +func (o *V1CloudConfigsGenericPoolMachinesListParams) WithConfigUID(configUID string) *V1CloudConfigsGenericPoolMachinesListParams { + o.SetConfigUID(configUID) + return o +} + +// SetConfigUID adds the configUid to the v1 cloud configs generic pool machines list params +func (o *V1CloudConfigsGenericPoolMachinesListParams) SetConfigUID(configUID string) { + o.ConfigUID = configUID +} + +// WithContinue adds the continueVar to the v1 cloud configs generic pool machines list params +func (o *V1CloudConfigsGenericPoolMachinesListParams) WithContinue(continueVar *string) *V1CloudConfigsGenericPoolMachinesListParams { + o.SetContinue(continueVar) + return o +} + +// SetContinue adds the continue to the v1 cloud configs generic pool machines list params +func (o *V1CloudConfigsGenericPoolMachinesListParams) SetContinue(continueVar *string) { + o.Continue = continueVar +} + +// WithFields adds the fields to the v1 cloud configs generic pool machines list params +func (o *V1CloudConfigsGenericPoolMachinesListParams) WithFields(fields *string) *V1CloudConfigsGenericPoolMachinesListParams { + o.SetFields(fields) + return o +} + +// SetFields adds the fields to the v1 cloud configs generic pool machines list params +func (o *V1CloudConfigsGenericPoolMachinesListParams) SetFields(fields *string) { + o.Fields = fields +} + +// WithFilters adds the filters to the v1 cloud configs generic pool machines list params +func (o *V1CloudConfigsGenericPoolMachinesListParams) WithFilters(filters *string) *V1CloudConfigsGenericPoolMachinesListParams { + o.SetFilters(filters) + return o +} + +// SetFilters adds the filters to the v1 cloud configs generic pool machines list params +func (o *V1CloudConfigsGenericPoolMachinesListParams) SetFilters(filters *string) { + o.Filters = filters +} + +// WithLimit adds the limit to the v1 cloud configs generic pool machines list params +func (o *V1CloudConfigsGenericPoolMachinesListParams) WithLimit(limit *int64) *V1CloudConfigsGenericPoolMachinesListParams { + o.SetLimit(limit) + return o +} + +// SetLimit adds the limit to the v1 cloud configs generic pool machines list params +func (o *V1CloudConfigsGenericPoolMachinesListParams) SetLimit(limit *int64) { + o.Limit = limit +} + +// WithMachinePoolName adds the machinePoolName to the v1 cloud configs generic pool machines list params +func (o *V1CloudConfigsGenericPoolMachinesListParams) WithMachinePoolName(machinePoolName string) *V1CloudConfigsGenericPoolMachinesListParams { + o.SetMachinePoolName(machinePoolName) + return o +} + +// SetMachinePoolName adds the machinePoolName to the v1 cloud configs generic pool machines list params +func (o *V1CloudConfigsGenericPoolMachinesListParams) SetMachinePoolName(machinePoolName string) { + o.MachinePoolName = machinePoolName +} + +// WithOffset adds the offset to the v1 cloud configs generic pool machines list params +func (o *V1CloudConfigsGenericPoolMachinesListParams) WithOffset(offset *int64) *V1CloudConfigsGenericPoolMachinesListParams { + o.SetOffset(offset) + return o +} + +// SetOffset adds the offset to the v1 cloud configs generic pool machines list params +func (o *V1CloudConfigsGenericPoolMachinesListParams) SetOffset(offset *int64) { + o.Offset = offset +} + +// WithOrderBy adds the orderBy to the v1 cloud configs generic pool machines list params +func (o *V1CloudConfigsGenericPoolMachinesListParams) WithOrderBy(orderBy *string) *V1CloudConfigsGenericPoolMachinesListParams { + o.SetOrderBy(orderBy) + return o +} + +// SetOrderBy adds the orderBy to the v1 cloud configs generic pool machines list params +func (o *V1CloudConfigsGenericPoolMachinesListParams) SetOrderBy(orderBy *string) { + o.OrderBy = orderBy +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudConfigsGenericPoolMachinesListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param configUid + if err := r.SetPathParam("configUid", o.ConfigUID); err != nil { + return err + } + + if o.Continue != nil { + + // query param continue + var qrContinue string + if o.Continue != nil { + qrContinue = *o.Continue + } + qContinue := qrContinue + if qContinue != "" { + if err := r.SetQueryParam("continue", qContinue); err != nil { + return err + } + } + + } + + if o.Fields != nil { + + // query param fields + var qrFields string + if o.Fields != nil { + qrFields = *o.Fields + } + qFields := qrFields + if qFields != "" { + if err := r.SetQueryParam("fields", qFields); err != nil { + return err + } + } + + } + + if o.Filters != nil { + + // query param filters + var qrFilters string + if o.Filters != nil { + qrFilters = *o.Filters + } + qFilters := qrFilters + if qFilters != "" { + if err := r.SetQueryParam("filters", qFilters); err != nil { + return err + } + } + + } + + if o.Limit != nil { + + // query param limit + var qrLimit int64 + if o.Limit != nil { + qrLimit = *o.Limit + } + qLimit := swag.FormatInt64(qrLimit) + if qLimit != "" { + if err := r.SetQueryParam("limit", qLimit); err != nil { + return err + } + } + + } + + // path param machinePoolName + if err := r.SetPathParam("machinePoolName", o.MachinePoolName); err != nil { + return err + } + + if o.Offset != nil { + + // query param offset + var qrOffset int64 + if o.Offset != nil { + qrOffset = *o.Offset + } + qOffset := swag.FormatInt64(qrOffset) + if qOffset != "" { + if err := r.SetQueryParam("offset", qOffset); err != nil { + return err + } + } + + } + + if o.OrderBy != nil { + + // query param orderBy + var qrOrderBy string + if o.OrderBy != nil { + qrOrderBy = *o.OrderBy + } + qOrderBy := qrOrderBy + if qOrderBy != "" { + if err := r.SetQueryParam("orderBy", qOrderBy); err != nil { + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_configs_generic_pool_machines_list_responses.go b/api/client/v1/v1_cloud_configs_generic_pool_machines_list_responses.go new file mode 100644 index 00000000..08fb213b --- /dev/null +++ b/api/client/v1/v1_cloud_configs_generic_pool_machines_list_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1CloudConfigsGenericPoolMachinesListReader is a Reader for the V1CloudConfigsGenericPoolMachinesList structure. +type V1CloudConfigsGenericPoolMachinesListReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudConfigsGenericPoolMachinesListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1CloudConfigsGenericPoolMachinesListOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudConfigsGenericPoolMachinesListOK creates a V1CloudConfigsGenericPoolMachinesListOK with default headers values +func NewV1CloudConfigsGenericPoolMachinesListOK() *V1CloudConfigsGenericPoolMachinesListOK { + return &V1CloudConfigsGenericPoolMachinesListOK{} +} + +/* +V1CloudConfigsGenericPoolMachinesListOK handles this case with default header values. + +An array of Generic machine items +*/ +type V1CloudConfigsGenericPoolMachinesListOK struct { + Payload *models.V1GenericMachines +} + +func (o *V1CloudConfigsGenericPoolMachinesListOK) Error() string { + return fmt.Sprintf("[GET /v1/cloudconfigs/generic/{configUid}/machinePools/{machinePoolName}/machines][%d] v1CloudConfigsGenericPoolMachinesListOK %+v", 200, o.Payload) +} + +func (o *V1CloudConfigsGenericPoolMachinesListOK) GetPayload() *models.V1GenericMachines { + return o.Payload +} + +func (o *V1CloudConfigsGenericPoolMachinesListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1GenericMachines) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_cloud_configs_generic_pool_machines_uid_delete_parameters.go b/api/client/v1/v1_cloud_configs_generic_pool_machines_uid_delete_parameters.go new file mode 100644 index 00000000..287734c6 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_generic_pool_machines_uid_delete_parameters.go @@ -0,0 +1,178 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1CloudConfigsGenericPoolMachinesUIDDeleteParams creates a new V1CloudConfigsGenericPoolMachinesUIDDeleteParams object +// with the default values initialized. +func NewV1CloudConfigsGenericPoolMachinesUIDDeleteParams() *V1CloudConfigsGenericPoolMachinesUIDDeleteParams { + var () + return &V1CloudConfigsGenericPoolMachinesUIDDeleteParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudConfigsGenericPoolMachinesUIDDeleteParamsWithTimeout creates a new V1CloudConfigsGenericPoolMachinesUIDDeleteParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudConfigsGenericPoolMachinesUIDDeleteParamsWithTimeout(timeout time.Duration) *V1CloudConfigsGenericPoolMachinesUIDDeleteParams { + var () + return &V1CloudConfigsGenericPoolMachinesUIDDeleteParams{ + + timeout: timeout, + } +} + +// NewV1CloudConfigsGenericPoolMachinesUIDDeleteParamsWithContext creates a new V1CloudConfigsGenericPoolMachinesUIDDeleteParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudConfigsGenericPoolMachinesUIDDeleteParamsWithContext(ctx context.Context) *V1CloudConfigsGenericPoolMachinesUIDDeleteParams { + var () + return &V1CloudConfigsGenericPoolMachinesUIDDeleteParams{ + + Context: ctx, + } +} + +// NewV1CloudConfigsGenericPoolMachinesUIDDeleteParamsWithHTTPClient creates a new V1CloudConfigsGenericPoolMachinesUIDDeleteParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudConfigsGenericPoolMachinesUIDDeleteParamsWithHTTPClient(client *http.Client) *V1CloudConfigsGenericPoolMachinesUIDDeleteParams { + var () + return &V1CloudConfigsGenericPoolMachinesUIDDeleteParams{ + HTTPClient: client, + } +} + +/* +V1CloudConfigsGenericPoolMachinesUIDDeleteParams contains all the parameters to send to the API endpoint +for the v1 cloud configs generic pool machines Uid delete operation typically these are written to a http.Request +*/ +type V1CloudConfigsGenericPoolMachinesUIDDeleteParams struct { + + /*ConfigUID + Cluster's cloud config uid + + */ + ConfigUID string + /*MachinePoolName + Machine pool name + + */ + MachinePoolName string + /*MachineUID + Machine uid + + */ + MachineUID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud configs generic pool machines Uid delete params +func (o *V1CloudConfigsGenericPoolMachinesUIDDeleteParams) WithTimeout(timeout time.Duration) *V1CloudConfigsGenericPoolMachinesUIDDeleteParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud configs generic pool machines Uid delete params +func (o *V1CloudConfigsGenericPoolMachinesUIDDeleteParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud configs generic pool machines Uid delete params +func (o *V1CloudConfigsGenericPoolMachinesUIDDeleteParams) WithContext(ctx context.Context) *V1CloudConfigsGenericPoolMachinesUIDDeleteParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud configs generic pool machines Uid delete params +func (o *V1CloudConfigsGenericPoolMachinesUIDDeleteParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud configs generic pool machines Uid delete params +func (o *V1CloudConfigsGenericPoolMachinesUIDDeleteParams) WithHTTPClient(client *http.Client) *V1CloudConfigsGenericPoolMachinesUIDDeleteParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud configs generic pool machines Uid delete params +func (o *V1CloudConfigsGenericPoolMachinesUIDDeleteParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithConfigUID adds the configUID to the v1 cloud configs generic pool machines Uid delete params +func (o *V1CloudConfigsGenericPoolMachinesUIDDeleteParams) WithConfigUID(configUID string) *V1CloudConfigsGenericPoolMachinesUIDDeleteParams { + o.SetConfigUID(configUID) + return o +} + +// SetConfigUID adds the configUid to the v1 cloud configs generic pool machines Uid delete params +func (o *V1CloudConfigsGenericPoolMachinesUIDDeleteParams) SetConfigUID(configUID string) { + o.ConfigUID = configUID +} + +// WithMachinePoolName adds the machinePoolName to the v1 cloud configs generic pool machines Uid delete params +func (o *V1CloudConfigsGenericPoolMachinesUIDDeleteParams) WithMachinePoolName(machinePoolName string) *V1CloudConfigsGenericPoolMachinesUIDDeleteParams { + o.SetMachinePoolName(machinePoolName) + return o +} + +// SetMachinePoolName adds the machinePoolName to the v1 cloud configs generic pool machines Uid delete params +func (o *V1CloudConfigsGenericPoolMachinesUIDDeleteParams) SetMachinePoolName(machinePoolName string) { + o.MachinePoolName = machinePoolName +} + +// WithMachineUID adds the machineUID to the v1 cloud configs generic pool machines Uid delete params +func (o *V1CloudConfigsGenericPoolMachinesUIDDeleteParams) WithMachineUID(machineUID string) *V1CloudConfigsGenericPoolMachinesUIDDeleteParams { + o.SetMachineUID(machineUID) + return o +} + +// SetMachineUID adds the machineUid to the v1 cloud configs generic pool machines Uid delete params +func (o *V1CloudConfigsGenericPoolMachinesUIDDeleteParams) SetMachineUID(machineUID string) { + o.MachineUID = machineUID +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudConfigsGenericPoolMachinesUIDDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param configUid + if err := r.SetPathParam("configUid", o.ConfigUID); err != nil { + return err + } + + // path param machinePoolName + if err := r.SetPathParam("machinePoolName", o.MachinePoolName); err != nil { + return err + } + + // path param machineUid + if err := r.SetPathParam("machineUid", o.MachineUID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_configs_generic_pool_machines_uid_delete_responses.go b/api/client/v1/v1_cloud_configs_generic_pool_machines_uid_delete_responses.go new file mode 100644 index 00000000..59187279 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_generic_pool_machines_uid_delete_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1CloudConfigsGenericPoolMachinesUIDDeleteReader is a Reader for the V1CloudConfigsGenericPoolMachinesUIDDelete structure. +type V1CloudConfigsGenericPoolMachinesUIDDeleteReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudConfigsGenericPoolMachinesUIDDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1CloudConfigsGenericPoolMachinesUIDDeleteNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudConfigsGenericPoolMachinesUIDDeleteNoContent creates a V1CloudConfigsGenericPoolMachinesUIDDeleteNoContent with default headers values +func NewV1CloudConfigsGenericPoolMachinesUIDDeleteNoContent() *V1CloudConfigsGenericPoolMachinesUIDDeleteNoContent { + return &V1CloudConfigsGenericPoolMachinesUIDDeleteNoContent{} +} + +/* +V1CloudConfigsGenericPoolMachinesUIDDeleteNoContent handles this case with default header values. + +The resource was deleted successfully +*/ +type V1CloudConfigsGenericPoolMachinesUIDDeleteNoContent struct { +} + +func (o *V1CloudConfigsGenericPoolMachinesUIDDeleteNoContent) Error() string { + return fmt.Sprintf("[DELETE /v1/cloudconfigs/generic/{configUid}/machinePools/{machinePoolName}/machines/{machineUid}][%d] v1CloudConfigsGenericPoolMachinesUidDeleteNoContent ", 204) +} + +func (o *V1CloudConfigsGenericPoolMachinesUIDDeleteNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_cloud_configs_generic_pool_machines_uid_get_parameters.go b/api/client/v1/v1_cloud_configs_generic_pool_machines_uid_get_parameters.go new file mode 100644 index 00000000..25a285b6 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_generic_pool_machines_uid_get_parameters.go @@ -0,0 +1,178 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1CloudConfigsGenericPoolMachinesUIDGetParams creates a new V1CloudConfigsGenericPoolMachinesUIDGetParams object +// with the default values initialized. +func NewV1CloudConfigsGenericPoolMachinesUIDGetParams() *V1CloudConfigsGenericPoolMachinesUIDGetParams { + var () + return &V1CloudConfigsGenericPoolMachinesUIDGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudConfigsGenericPoolMachinesUIDGetParamsWithTimeout creates a new V1CloudConfigsGenericPoolMachinesUIDGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudConfigsGenericPoolMachinesUIDGetParamsWithTimeout(timeout time.Duration) *V1CloudConfigsGenericPoolMachinesUIDGetParams { + var () + return &V1CloudConfigsGenericPoolMachinesUIDGetParams{ + + timeout: timeout, + } +} + +// NewV1CloudConfigsGenericPoolMachinesUIDGetParamsWithContext creates a new V1CloudConfigsGenericPoolMachinesUIDGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudConfigsGenericPoolMachinesUIDGetParamsWithContext(ctx context.Context) *V1CloudConfigsGenericPoolMachinesUIDGetParams { + var () + return &V1CloudConfigsGenericPoolMachinesUIDGetParams{ + + Context: ctx, + } +} + +// NewV1CloudConfigsGenericPoolMachinesUIDGetParamsWithHTTPClient creates a new V1CloudConfigsGenericPoolMachinesUIDGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudConfigsGenericPoolMachinesUIDGetParamsWithHTTPClient(client *http.Client) *V1CloudConfigsGenericPoolMachinesUIDGetParams { + var () + return &V1CloudConfigsGenericPoolMachinesUIDGetParams{ + HTTPClient: client, + } +} + +/* +V1CloudConfigsGenericPoolMachinesUIDGetParams contains all the parameters to send to the API endpoint +for the v1 cloud configs generic pool machines Uid get operation typically these are written to a http.Request +*/ +type V1CloudConfigsGenericPoolMachinesUIDGetParams struct { + + /*ConfigUID + Cluster's cloud config uid + + */ + ConfigUID string + /*MachinePoolName + Machine pool name + + */ + MachinePoolName string + /*MachineUID + Machine uid + + */ + MachineUID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud configs generic pool machines Uid get params +func (o *V1CloudConfigsGenericPoolMachinesUIDGetParams) WithTimeout(timeout time.Duration) *V1CloudConfigsGenericPoolMachinesUIDGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud configs generic pool machines Uid get params +func (o *V1CloudConfigsGenericPoolMachinesUIDGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud configs generic pool machines Uid get params +func (o *V1CloudConfigsGenericPoolMachinesUIDGetParams) WithContext(ctx context.Context) *V1CloudConfigsGenericPoolMachinesUIDGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud configs generic pool machines Uid get params +func (o *V1CloudConfigsGenericPoolMachinesUIDGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud configs generic pool machines Uid get params +func (o *V1CloudConfigsGenericPoolMachinesUIDGetParams) WithHTTPClient(client *http.Client) *V1CloudConfigsGenericPoolMachinesUIDGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud configs generic pool machines Uid get params +func (o *V1CloudConfigsGenericPoolMachinesUIDGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithConfigUID adds the configUID to the v1 cloud configs generic pool machines Uid get params +func (o *V1CloudConfigsGenericPoolMachinesUIDGetParams) WithConfigUID(configUID string) *V1CloudConfigsGenericPoolMachinesUIDGetParams { + o.SetConfigUID(configUID) + return o +} + +// SetConfigUID adds the configUid to the v1 cloud configs generic pool machines Uid get params +func (o *V1CloudConfigsGenericPoolMachinesUIDGetParams) SetConfigUID(configUID string) { + o.ConfigUID = configUID +} + +// WithMachinePoolName adds the machinePoolName to the v1 cloud configs generic pool machines Uid get params +func (o *V1CloudConfigsGenericPoolMachinesUIDGetParams) WithMachinePoolName(machinePoolName string) *V1CloudConfigsGenericPoolMachinesUIDGetParams { + o.SetMachinePoolName(machinePoolName) + return o +} + +// SetMachinePoolName adds the machinePoolName to the v1 cloud configs generic pool machines Uid get params +func (o *V1CloudConfigsGenericPoolMachinesUIDGetParams) SetMachinePoolName(machinePoolName string) { + o.MachinePoolName = machinePoolName +} + +// WithMachineUID adds the machineUID to the v1 cloud configs generic pool machines Uid get params +func (o *V1CloudConfigsGenericPoolMachinesUIDGetParams) WithMachineUID(machineUID string) *V1CloudConfigsGenericPoolMachinesUIDGetParams { + o.SetMachineUID(machineUID) + return o +} + +// SetMachineUID adds the machineUid to the v1 cloud configs generic pool machines Uid get params +func (o *V1CloudConfigsGenericPoolMachinesUIDGetParams) SetMachineUID(machineUID string) { + o.MachineUID = machineUID +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudConfigsGenericPoolMachinesUIDGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param configUid + if err := r.SetPathParam("configUid", o.ConfigUID); err != nil { + return err + } + + // path param machinePoolName + if err := r.SetPathParam("machinePoolName", o.MachinePoolName); err != nil { + return err + } + + // path param machineUid + if err := r.SetPathParam("machineUid", o.MachineUID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_configs_generic_pool_machines_uid_get_responses.go b/api/client/v1/v1_cloud_configs_generic_pool_machines_uid_get_responses.go new file mode 100644 index 00000000..0af4142e --- /dev/null +++ b/api/client/v1/v1_cloud_configs_generic_pool_machines_uid_get_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1CloudConfigsGenericPoolMachinesUIDGetReader is a Reader for the V1CloudConfigsGenericPoolMachinesUIDGet structure. +type V1CloudConfigsGenericPoolMachinesUIDGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudConfigsGenericPoolMachinesUIDGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1CloudConfigsGenericPoolMachinesUIDGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudConfigsGenericPoolMachinesUIDGetOK creates a V1CloudConfigsGenericPoolMachinesUIDGetOK with default headers values +func NewV1CloudConfigsGenericPoolMachinesUIDGetOK() *V1CloudConfigsGenericPoolMachinesUIDGetOK { + return &V1CloudConfigsGenericPoolMachinesUIDGetOK{} +} + +/* +V1CloudConfigsGenericPoolMachinesUIDGetOK handles this case with default header values. + +OK +*/ +type V1CloudConfigsGenericPoolMachinesUIDGetOK struct { + Payload *models.V1GenericMachine +} + +func (o *V1CloudConfigsGenericPoolMachinesUIDGetOK) Error() string { + return fmt.Sprintf("[GET /v1/cloudconfigs/generic/{configUid}/machinePools/{machinePoolName}/machines/{machineUid}][%d] v1CloudConfigsGenericPoolMachinesUidGetOK %+v", 200, o.Payload) +} + +func (o *V1CloudConfigsGenericPoolMachinesUIDGetOK) GetPayload() *models.V1GenericMachine { + return o.Payload +} + +func (o *V1CloudConfigsGenericPoolMachinesUIDGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1GenericMachine) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_cloud_configs_generic_pool_machines_uid_update_parameters.go b/api/client/v1/v1_cloud_configs_generic_pool_machines_uid_update_parameters.go new file mode 100644 index 00000000..46fde4e3 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_generic_pool_machines_uid_update_parameters.go @@ -0,0 +1,199 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1CloudConfigsGenericPoolMachinesUIDUpdateParams creates a new V1CloudConfigsGenericPoolMachinesUIDUpdateParams object +// with the default values initialized. +func NewV1CloudConfigsGenericPoolMachinesUIDUpdateParams() *V1CloudConfigsGenericPoolMachinesUIDUpdateParams { + var () + return &V1CloudConfigsGenericPoolMachinesUIDUpdateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudConfigsGenericPoolMachinesUIDUpdateParamsWithTimeout creates a new V1CloudConfigsGenericPoolMachinesUIDUpdateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudConfigsGenericPoolMachinesUIDUpdateParamsWithTimeout(timeout time.Duration) *V1CloudConfigsGenericPoolMachinesUIDUpdateParams { + var () + return &V1CloudConfigsGenericPoolMachinesUIDUpdateParams{ + + timeout: timeout, + } +} + +// NewV1CloudConfigsGenericPoolMachinesUIDUpdateParamsWithContext creates a new V1CloudConfigsGenericPoolMachinesUIDUpdateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudConfigsGenericPoolMachinesUIDUpdateParamsWithContext(ctx context.Context) *V1CloudConfigsGenericPoolMachinesUIDUpdateParams { + var () + return &V1CloudConfigsGenericPoolMachinesUIDUpdateParams{ + + Context: ctx, + } +} + +// NewV1CloudConfigsGenericPoolMachinesUIDUpdateParamsWithHTTPClient creates a new V1CloudConfigsGenericPoolMachinesUIDUpdateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudConfigsGenericPoolMachinesUIDUpdateParamsWithHTTPClient(client *http.Client) *V1CloudConfigsGenericPoolMachinesUIDUpdateParams { + var () + return &V1CloudConfigsGenericPoolMachinesUIDUpdateParams{ + HTTPClient: client, + } +} + +/* +V1CloudConfigsGenericPoolMachinesUIDUpdateParams contains all the parameters to send to the API endpoint +for the v1 cloud configs generic pool machines Uid update operation typically these are written to a http.Request +*/ +type V1CloudConfigsGenericPoolMachinesUIDUpdateParams struct { + + /*Body*/ + Body *models.V1GenericMachine + /*ConfigUID + Cluster's cloud config uid + + */ + ConfigUID string + /*MachinePoolName + Machine pool name + + */ + MachinePoolName string + /*MachineUID + Machine uid + + */ + MachineUID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud configs generic pool machines Uid update params +func (o *V1CloudConfigsGenericPoolMachinesUIDUpdateParams) WithTimeout(timeout time.Duration) *V1CloudConfigsGenericPoolMachinesUIDUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud configs generic pool machines Uid update params +func (o *V1CloudConfigsGenericPoolMachinesUIDUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud configs generic pool machines Uid update params +func (o *V1CloudConfigsGenericPoolMachinesUIDUpdateParams) WithContext(ctx context.Context) *V1CloudConfigsGenericPoolMachinesUIDUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud configs generic pool machines Uid update params +func (o *V1CloudConfigsGenericPoolMachinesUIDUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud configs generic pool machines Uid update params +func (o *V1CloudConfigsGenericPoolMachinesUIDUpdateParams) WithHTTPClient(client *http.Client) *V1CloudConfigsGenericPoolMachinesUIDUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud configs generic pool machines Uid update params +func (o *V1CloudConfigsGenericPoolMachinesUIDUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 cloud configs generic pool machines Uid update params +func (o *V1CloudConfigsGenericPoolMachinesUIDUpdateParams) WithBody(body *models.V1GenericMachine) *V1CloudConfigsGenericPoolMachinesUIDUpdateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 cloud configs generic pool machines Uid update params +func (o *V1CloudConfigsGenericPoolMachinesUIDUpdateParams) SetBody(body *models.V1GenericMachine) { + o.Body = body +} + +// WithConfigUID adds the configUID to the v1 cloud configs generic pool machines Uid update params +func (o *V1CloudConfigsGenericPoolMachinesUIDUpdateParams) WithConfigUID(configUID string) *V1CloudConfigsGenericPoolMachinesUIDUpdateParams { + o.SetConfigUID(configUID) + return o +} + +// SetConfigUID adds the configUid to the v1 cloud configs generic pool machines Uid update params +func (o *V1CloudConfigsGenericPoolMachinesUIDUpdateParams) SetConfigUID(configUID string) { + o.ConfigUID = configUID +} + +// WithMachinePoolName adds the machinePoolName to the v1 cloud configs generic pool machines Uid update params +func (o *V1CloudConfigsGenericPoolMachinesUIDUpdateParams) WithMachinePoolName(machinePoolName string) *V1CloudConfigsGenericPoolMachinesUIDUpdateParams { + o.SetMachinePoolName(machinePoolName) + return o +} + +// SetMachinePoolName adds the machinePoolName to the v1 cloud configs generic pool machines Uid update params +func (o *V1CloudConfigsGenericPoolMachinesUIDUpdateParams) SetMachinePoolName(machinePoolName string) { + o.MachinePoolName = machinePoolName +} + +// WithMachineUID adds the machineUID to the v1 cloud configs generic pool machines Uid update params +func (o *V1CloudConfigsGenericPoolMachinesUIDUpdateParams) WithMachineUID(machineUID string) *V1CloudConfigsGenericPoolMachinesUIDUpdateParams { + o.SetMachineUID(machineUID) + return o +} + +// SetMachineUID adds the machineUid to the v1 cloud configs generic pool machines Uid update params +func (o *V1CloudConfigsGenericPoolMachinesUIDUpdateParams) SetMachineUID(machineUID string) { + o.MachineUID = machineUID +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudConfigsGenericPoolMachinesUIDUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param configUid + if err := r.SetPathParam("configUid", o.ConfigUID); err != nil { + return err + } + + // path param machinePoolName + if err := r.SetPathParam("machinePoolName", o.MachinePoolName); err != nil { + return err + } + + // path param machineUid + if err := r.SetPathParam("machineUid", o.MachineUID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_configs_generic_pool_machines_uid_update_responses.go b/api/client/v1/v1_cloud_configs_generic_pool_machines_uid_update_responses.go new file mode 100644 index 00000000..aa936078 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_generic_pool_machines_uid_update_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1CloudConfigsGenericPoolMachinesUIDUpdateReader is a Reader for the V1CloudConfigsGenericPoolMachinesUIDUpdate structure. +type V1CloudConfigsGenericPoolMachinesUIDUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudConfigsGenericPoolMachinesUIDUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1CloudConfigsGenericPoolMachinesUIDUpdateNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudConfigsGenericPoolMachinesUIDUpdateNoContent creates a V1CloudConfigsGenericPoolMachinesUIDUpdateNoContent with default headers values +func NewV1CloudConfigsGenericPoolMachinesUIDUpdateNoContent() *V1CloudConfigsGenericPoolMachinesUIDUpdateNoContent { + return &V1CloudConfigsGenericPoolMachinesUIDUpdateNoContent{} +} + +/* +V1CloudConfigsGenericPoolMachinesUIDUpdateNoContent handles this case with default header values. + +The resource was updated successfully +*/ +type V1CloudConfigsGenericPoolMachinesUIDUpdateNoContent struct { +} + +func (o *V1CloudConfigsGenericPoolMachinesUIDUpdateNoContent) Error() string { + return fmt.Sprintf("[PUT /v1/cloudconfigs/generic/{configUid}/machinePools/{machinePoolName}/machines/{machineUid}][%d] v1CloudConfigsGenericPoolMachinesUidUpdateNoContent ", 204) +} + +func (o *V1CloudConfigsGenericPoolMachinesUIDUpdateNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_cloud_configs_generic_uid_cluster_config_parameters.go b/api/client/v1/v1_cloud_configs_generic_uid_cluster_config_parameters.go new file mode 100644 index 00000000..66473071 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_generic_uid_cluster_config_parameters.go @@ -0,0 +1,157 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1CloudConfigsGenericUIDClusterConfigParams creates a new V1CloudConfigsGenericUIDClusterConfigParams object +// with the default values initialized. +func NewV1CloudConfigsGenericUIDClusterConfigParams() *V1CloudConfigsGenericUIDClusterConfigParams { + var () + return &V1CloudConfigsGenericUIDClusterConfigParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudConfigsGenericUIDClusterConfigParamsWithTimeout creates a new V1CloudConfigsGenericUIDClusterConfigParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudConfigsGenericUIDClusterConfigParamsWithTimeout(timeout time.Duration) *V1CloudConfigsGenericUIDClusterConfigParams { + var () + return &V1CloudConfigsGenericUIDClusterConfigParams{ + + timeout: timeout, + } +} + +// NewV1CloudConfigsGenericUIDClusterConfigParamsWithContext creates a new V1CloudConfigsGenericUIDClusterConfigParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudConfigsGenericUIDClusterConfigParamsWithContext(ctx context.Context) *V1CloudConfigsGenericUIDClusterConfigParams { + var () + return &V1CloudConfigsGenericUIDClusterConfigParams{ + + Context: ctx, + } +} + +// NewV1CloudConfigsGenericUIDClusterConfigParamsWithHTTPClient creates a new V1CloudConfigsGenericUIDClusterConfigParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudConfigsGenericUIDClusterConfigParamsWithHTTPClient(client *http.Client) *V1CloudConfigsGenericUIDClusterConfigParams { + var () + return &V1CloudConfigsGenericUIDClusterConfigParams{ + HTTPClient: client, + } +} + +/* +V1CloudConfigsGenericUIDClusterConfigParams contains all the parameters to send to the API endpoint +for the v1 cloud configs generic Uid cluster config operation typically these are written to a http.Request +*/ +type V1CloudConfigsGenericUIDClusterConfigParams struct { + + /*Body*/ + Body *models.V1GenericCloudClusterConfigEntity + /*ConfigUID + Cluster's cloud config uid + + */ + ConfigUID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud configs generic Uid cluster config params +func (o *V1CloudConfigsGenericUIDClusterConfigParams) WithTimeout(timeout time.Duration) *V1CloudConfigsGenericUIDClusterConfigParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud configs generic Uid cluster config params +func (o *V1CloudConfigsGenericUIDClusterConfigParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud configs generic Uid cluster config params +func (o *V1CloudConfigsGenericUIDClusterConfigParams) WithContext(ctx context.Context) *V1CloudConfigsGenericUIDClusterConfigParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud configs generic Uid cluster config params +func (o *V1CloudConfigsGenericUIDClusterConfigParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud configs generic Uid cluster config params +func (o *V1CloudConfigsGenericUIDClusterConfigParams) WithHTTPClient(client *http.Client) *V1CloudConfigsGenericUIDClusterConfigParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud configs generic Uid cluster config params +func (o *V1CloudConfigsGenericUIDClusterConfigParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 cloud configs generic Uid cluster config params +func (o *V1CloudConfigsGenericUIDClusterConfigParams) WithBody(body *models.V1GenericCloudClusterConfigEntity) *V1CloudConfigsGenericUIDClusterConfigParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 cloud configs generic Uid cluster config params +func (o *V1CloudConfigsGenericUIDClusterConfigParams) SetBody(body *models.V1GenericCloudClusterConfigEntity) { + o.Body = body +} + +// WithConfigUID adds the configUID to the v1 cloud configs generic Uid cluster config params +func (o *V1CloudConfigsGenericUIDClusterConfigParams) WithConfigUID(configUID string) *V1CloudConfigsGenericUIDClusterConfigParams { + o.SetConfigUID(configUID) + return o +} + +// SetConfigUID adds the configUid to the v1 cloud configs generic Uid cluster config params +func (o *V1CloudConfigsGenericUIDClusterConfigParams) SetConfigUID(configUID string) { + o.ConfigUID = configUID +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudConfigsGenericUIDClusterConfigParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param configUid + if err := r.SetPathParam("configUid", o.ConfigUID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_configs_generic_uid_cluster_config_responses.go b/api/client/v1/v1_cloud_configs_generic_uid_cluster_config_responses.go new file mode 100644 index 00000000..0bc15ab5 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_generic_uid_cluster_config_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1CloudConfigsGenericUIDClusterConfigReader is a Reader for the V1CloudConfigsGenericUIDClusterConfig structure. +type V1CloudConfigsGenericUIDClusterConfigReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudConfigsGenericUIDClusterConfigReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1CloudConfigsGenericUIDClusterConfigNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudConfigsGenericUIDClusterConfigNoContent creates a V1CloudConfigsGenericUIDClusterConfigNoContent with default headers values +func NewV1CloudConfigsGenericUIDClusterConfigNoContent() *V1CloudConfigsGenericUIDClusterConfigNoContent { + return &V1CloudConfigsGenericUIDClusterConfigNoContent{} +} + +/* +V1CloudConfigsGenericUIDClusterConfigNoContent handles this case with default header values. + +The resource was updated successfully +*/ +type V1CloudConfigsGenericUIDClusterConfigNoContent struct { +} + +func (o *V1CloudConfigsGenericUIDClusterConfigNoContent) Error() string { + return fmt.Sprintf("[PUT /v1/cloudconfigs/generic/{configUid}/clusterConfig][%d] v1CloudConfigsGenericUidClusterConfigNoContent ", 204) +} + +func (o *V1CloudConfigsGenericUIDClusterConfigNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_cloud_configs_gke_get_parameters.go b/api/client/v1/v1_cloud_configs_gke_get_parameters.go new file mode 100644 index 00000000..027829f4 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_gke_get_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1CloudConfigsGkeGetParams creates a new V1CloudConfigsGkeGetParams object +// with the default values initialized. +func NewV1CloudConfigsGkeGetParams() *V1CloudConfigsGkeGetParams { + var () + return &V1CloudConfigsGkeGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudConfigsGkeGetParamsWithTimeout creates a new V1CloudConfigsGkeGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudConfigsGkeGetParamsWithTimeout(timeout time.Duration) *V1CloudConfigsGkeGetParams { + var () + return &V1CloudConfigsGkeGetParams{ + + timeout: timeout, + } +} + +// NewV1CloudConfigsGkeGetParamsWithContext creates a new V1CloudConfigsGkeGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudConfigsGkeGetParamsWithContext(ctx context.Context) *V1CloudConfigsGkeGetParams { + var () + return &V1CloudConfigsGkeGetParams{ + + Context: ctx, + } +} + +// NewV1CloudConfigsGkeGetParamsWithHTTPClient creates a new V1CloudConfigsGkeGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudConfigsGkeGetParamsWithHTTPClient(client *http.Client) *V1CloudConfigsGkeGetParams { + var () + return &V1CloudConfigsGkeGetParams{ + HTTPClient: client, + } +} + +/* +V1CloudConfigsGkeGetParams contains all the parameters to send to the API endpoint +for the v1 cloud configs gke get operation typically these are written to a http.Request +*/ +type V1CloudConfigsGkeGetParams struct { + + /*ConfigUID + Cluster's cloud config uid + + */ + ConfigUID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud configs gke get params +func (o *V1CloudConfigsGkeGetParams) WithTimeout(timeout time.Duration) *V1CloudConfigsGkeGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud configs gke get params +func (o *V1CloudConfigsGkeGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud configs gke get params +func (o *V1CloudConfigsGkeGetParams) WithContext(ctx context.Context) *V1CloudConfigsGkeGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud configs gke get params +func (o *V1CloudConfigsGkeGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud configs gke get params +func (o *V1CloudConfigsGkeGetParams) WithHTTPClient(client *http.Client) *V1CloudConfigsGkeGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud configs gke get params +func (o *V1CloudConfigsGkeGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithConfigUID adds the configUID to the v1 cloud configs gke get params +func (o *V1CloudConfigsGkeGetParams) WithConfigUID(configUID string) *V1CloudConfigsGkeGetParams { + o.SetConfigUID(configUID) + return o +} + +// SetConfigUID adds the configUid to the v1 cloud configs gke get params +func (o *V1CloudConfigsGkeGetParams) SetConfigUID(configUID string) { + o.ConfigUID = configUID +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudConfigsGkeGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param configUid + if err := r.SetPathParam("configUid", o.ConfigUID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_configs_gke_get_responses.go b/api/client/v1/v1_cloud_configs_gke_get_responses.go new file mode 100644 index 00000000..af8b94d8 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_gke_get_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1CloudConfigsGkeGetReader is a Reader for the V1CloudConfigsGkeGet structure. +type V1CloudConfigsGkeGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudConfigsGkeGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1CloudConfigsGkeGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudConfigsGkeGetOK creates a V1CloudConfigsGkeGetOK with default headers values +func NewV1CloudConfigsGkeGetOK() *V1CloudConfigsGkeGetOK { + return &V1CloudConfigsGkeGetOK{} +} + +/* +V1CloudConfigsGkeGetOK handles this case with default header values. + +OK +*/ +type V1CloudConfigsGkeGetOK struct { + Payload *models.V1GcpCloudConfig +} + +func (o *V1CloudConfigsGkeGetOK) Error() string { + return fmt.Sprintf("[GET /v1/cloudconfigs/gke/{configUid}][%d] v1CloudConfigsGkeGetOK %+v", 200, o.Payload) +} + +func (o *V1CloudConfigsGkeGetOK) GetPayload() *models.V1GcpCloudConfig { + return o.Payload +} + +func (o *V1CloudConfigsGkeGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1GcpCloudConfig) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_cloud_configs_gke_machine_pool_create_parameters.go b/api/client/v1/v1_cloud_configs_gke_machine_pool_create_parameters.go new file mode 100644 index 00000000..0b3c4482 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_gke_machine_pool_create_parameters.go @@ -0,0 +1,157 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1CloudConfigsGkeMachinePoolCreateParams creates a new V1CloudConfigsGkeMachinePoolCreateParams object +// with the default values initialized. +func NewV1CloudConfigsGkeMachinePoolCreateParams() *V1CloudConfigsGkeMachinePoolCreateParams { + var () + return &V1CloudConfigsGkeMachinePoolCreateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudConfigsGkeMachinePoolCreateParamsWithTimeout creates a new V1CloudConfigsGkeMachinePoolCreateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudConfigsGkeMachinePoolCreateParamsWithTimeout(timeout time.Duration) *V1CloudConfigsGkeMachinePoolCreateParams { + var () + return &V1CloudConfigsGkeMachinePoolCreateParams{ + + timeout: timeout, + } +} + +// NewV1CloudConfigsGkeMachinePoolCreateParamsWithContext creates a new V1CloudConfigsGkeMachinePoolCreateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudConfigsGkeMachinePoolCreateParamsWithContext(ctx context.Context) *V1CloudConfigsGkeMachinePoolCreateParams { + var () + return &V1CloudConfigsGkeMachinePoolCreateParams{ + + Context: ctx, + } +} + +// NewV1CloudConfigsGkeMachinePoolCreateParamsWithHTTPClient creates a new V1CloudConfigsGkeMachinePoolCreateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudConfigsGkeMachinePoolCreateParamsWithHTTPClient(client *http.Client) *V1CloudConfigsGkeMachinePoolCreateParams { + var () + return &V1CloudConfigsGkeMachinePoolCreateParams{ + HTTPClient: client, + } +} + +/* +V1CloudConfigsGkeMachinePoolCreateParams contains all the parameters to send to the API endpoint +for the v1 cloud configs gke machine pool create operation typically these are written to a http.Request +*/ +type V1CloudConfigsGkeMachinePoolCreateParams struct { + + /*Body*/ + Body *models.V1GcpMachinePoolConfigEntity + /*ConfigUID + Cluster's cloud config uid + + */ + ConfigUID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud configs gke machine pool create params +func (o *V1CloudConfigsGkeMachinePoolCreateParams) WithTimeout(timeout time.Duration) *V1CloudConfigsGkeMachinePoolCreateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud configs gke machine pool create params +func (o *V1CloudConfigsGkeMachinePoolCreateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud configs gke machine pool create params +func (o *V1CloudConfigsGkeMachinePoolCreateParams) WithContext(ctx context.Context) *V1CloudConfigsGkeMachinePoolCreateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud configs gke machine pool create params +func (o *V1CloudConfigsGkeMachinePoolCreateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud configs gke machine pool create params +func (o *V1CloudConfigsGkeMachinePoolCreateParams) WithHTTPClient(client *http.Client) *V1CloudConfigsGkeMachinePoolCreateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud configs gke machine pool create params +func (o *V1CloudConfigsGkeMachinePoolCreateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 cloud configs gke machine pool create params +func (o *V1CloudConfigsGkeMachinePoolCreateParams) WithBody(body *models.V1GcpMachinePoolConfigEntity) *V1CloudConfigsGkeMachinePoolCreateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 cloud configs gke machine pool create params +func (o *V1CloudConfigsGkeMachinePoolCreateParams) SetBody(body *models.V1GcpMachinePoolConfigEntity) { + o.Body = body +} + +// WithConfigUID adds the configUID to the v1 cloud configs gke machine pool create params +func (o *V1CloudConfigsGkeMachinePoolCreateParams) WithConfigUID(configUID string) *V1CloudConfigsGkeMachinePoolCreateParams { + o.SetConfigUID(configUID) + return o +} + +// SetConfigUID adds the configUid to the v1 cloud configs gke machine pool create params +func (o *V1CloudConfigsGkeMachinePoolCreateParams) SetConfigUID(configUID string) { + o.ConfigUID = configUID +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudConfigsGkeMachinePoolCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param configUid + if err := r.SetPathParam("configUid", o.ConfigUID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_configs_gke_machine_pool_create_responses.go b/api/client/v1/v1_cloud_configs_gke_machine_pool_create_responses.go new file mode 100644 index 00000000..82820f2c --- /dev/null +++ b/api/client/v1/v1_cloud_configs_gke_machine_pool_create_responses.go @@ -0,0 +1,77 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1CloudConfigsGkeMachinePoolCreateReader is a Reader for the V1CloudConfigsGkeMachinePoolCreate structure. +type V1CloudConfigsGkeMachinePoolCreateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudConfigsGkeMachinePoolCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 201: + result := NewV1CloudConfigsGkeMachinePoolCreateCreated() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudConfigsGkeMachinePoolCreateCreated creates a V1CloudConfigsGkeMachinePoolCreateCreated with default headers values +func NewV1CloudConfigsGkeMachinePoolCreateCreated() *V1CloudConfigsGkeMachinePoolCreateCreated { + return &V1CloudConfigsGkeMachinePoolCreateCreated{} +} + +/* +V1CloudConfigsGkeMachinePoolCreateCreated handles this case with default header values. + +Created successfully +*/ +type V1CloudConfigsGkeMachinePoolCreateCreated struct { + /*Audit uid for the request + */ + AuditUID string + + Payload *models.V1UID +} + +func (o *V1CloudConfigsGkeMachinePoolCreateCreated) Error() string { + return fmt.Sprintf("[POST /v1/cloudconfigs/gke/{configUid}/machinePools][%d] v1CloudConfigsGkeMachinePoolCreateCreated %+v", 201, o.Payload) +} + +func (o *V1CloudConfigsGkeMachinePoolCreateCreated) GetPayload() *models.V1UID { + return o.Payload +} + +func (o *V1CloudConfigsGkeMachinePoolCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header AuditUid + o.AuditUID = response.GetHeader("AuditUid") + + o.Payload = new(models.V1UID) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_cloud_configs_gke_machine_pool_delete_parameters.go b/api/client/v1/v1_cloud_configs_gke_machine_pool_delete_parameters.go new file mode 100644 index 00000000..0b6a7f88 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_gke_machine_pool_delete_parameters.go @@ -0,0 +1,157 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1CloudConfigsGkeMachinePoolDeleteParams creates a new V1CloudConfigsGkeMachinePoolDeleteParams object +// with the default values initialized. +func NewV1CloudConfigsGkeMachinePoolDeleteParams() *V1CloudConfigsGkeMachinePoolDeleteParams { + var () + return &V1CloudConfigsGkeMachinePoolDeleteParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudConfigsGkeMachinePoolDeleteParamsWithTimeout creates a new V1CloudConfigsGkeMachinePoolDeleteParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudConfigsGkeMachinePoolDeleteParamsWithTimeout(timeout time.Duration) *V1CloudConfigsGkeMachinePoolDeleteParams { + var () + return &V1CloudConfigsGkeMachinePoolDeleteParams{ + + timeout: timeout, + } +} + +// NewV1CloudConfigsGkeMachinePoolDeleteParamsWithContext creates a new V1CloudConfigsGkeMachinePoolDeleteParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudConfigsGkeMachinePoolDeleteParamsWithContext(ctx context.Context) *V1CloudConfigsGkeMachinePoolDeleteParams { + var () + return &V1CloudConfigsGkeMachinePoolDeleteParams{ + + Context: ctx, + } +} + +// NewV1CloudConfigsGkeMachinePoolDeleteParamsWithHTTPClient creates a new V1CloudConfigsGkeMachinePoolDeleteParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudConfigsGkeMachinePoolDeleteParamsWithHTTPClient(client *http.Client) *V1CloudConfigsGkeMachinePoolDeleteParams { + var () + return &V1CloudConfigsGkeMachinePoolDeleteParams{ + HTTPClient: client, + } +} + +/* +V1CloudConfigsGkeMachinePoolDeleteParams contains all the parameters to send to the API endpoint +for the v1 cloud configs gke machine pool delete operation typically these are written to a http.Request +*/ +type V1CloudConfigsGkeMachinePoolDeleteParams struct { + + /*ConfigUID + Cluster's cloud config uid + + */ + ConfigUID string + /*MachinePoolName + Machine pool name + + */ + MachinePoolName string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud configs gke machine pool delete params +func (o *V1CloudConfigsGkeMachinePoolDeleteParams) WithTimeout(timeout time.Duration) *V1CloudConfigsGkeMachinePoolDeleteParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud configs gke machine pool delete params +func (o *V1CloudConfigsGkeMachinePoolDeleteParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud configs gke machine pool delete params +func (o *V1CloudConfigsGkeMachinePoolDeleteParams) WithContext(ctx context.Context) *V1CloudConfigsGkeMachinePoolDeleteParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud configs gke machine pool delete params +func (o *V1CloudConfigsGkeMachinePoolDeleteParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud configs gke machine pool delete params +func (o *V1CloudConfigsGkeMachinePoolDeleteParams) WithHTTPClient(client *http.Client) *V1CloudConfigsGkeMachinePoolDeleteParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud configs gke machine pool delete params +func (o *V1CloudConfigsGkeMachinePoolDeleteParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithConfigUID adds the configUID to the v1 cloud configs gke machine pool delete params +func (o *V1CloudConfigsGkeMachinePoolDeleteParams) WithConfigUID(configUID string) *V1CloudConfigsGkeMachinePoolDeleteParams { + o.SetConfigUID(configUID) + return o +} + +// SetConfigUID adds the configUid to the v1 cloud configs gke machine pool delete params +func (o *V1CloudConfigsGkeMachinePoolDeleteParams) SetConfigUID(configUID string) { + o.ConfigUID = configUID +} + +// WithMachinePoolName adds the machinePoolName to the v1 cloud configs gke machine pool delete params +func (o *V1CloudConfigsGkeMachinePoolDeleteParams) WithMachinePoolName(machinePoolName string) *V1CloudConfigsGkeMachinePoolDeleteParams { + o.SetMachinePoolName(machinePoolName) + return o +} + +// SetMachinePoolName adds the machinePoolName to the v1 cloud configs gke machine pool delete params +func (o *V1CloudConfigsGkeMachinePoolDeleteParams) SetMachinePoolName(machinePoolName string) { + o.MachinePoolName = machinePoolName +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudConfigsGkeMachinePoolDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param configUid + if err := r.SetPathParam("configUid", o.ConfigUID); err != nil { + return err + } + + // path param machinePoolName + if err := r.SetPathParam("machinePoolName", o.MachinePoolName); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_configs_gke_machine_pool_delete_responses.go b/api/client/v1/v1_cloud_configs_gke_machine_pool_delete_responses.go new file mode 100644 index 00000000..4512ef60 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_gke_machine_pool_delete_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1CloudConfigsGkeMachinePoolDeleteReader is a Reader for the V1CloudConfigsGkeMachinePoolDelete structure. +type V1CloudConfigsGkeMachinePoolDeleteReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudConfigsGkeMachinePoolDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1CloudConfigsGkeMachinePoolDeleteNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudConfigsGkeMachinePoolDeleteNoContent creates a V1CloudConfigsGkeMachinePoolDeleteNoContent with default headers values +func NewV1CloudConfigsGkeMachinePoolDeleteNoContent() *V1CloudConfigsGkeMachinePoolDeleteNoContent { + return &V1CloudConfigsGkeMachinePoolDeleteNoContent{} +} + +/* +V1CloudConfigsGkeMachinePoolDeleteNoContent handles this case with default header values. + +The resource was deleted successfully +*/ +type V1CloudConfigsGkeMachinePoolDeleteNoContent struct { +} + +func (o *V1CloudConfigsGkeMachinePoolDeleteNoContent) Error() string { + return fmt.Sprintf("[DELETE /v1/cloudconfigs/gke/{configUid}/machinePools/{machinePoolName}][%d] v1CloudConfigsGkeMachinePoolDeleteNoContent ", 204) +} + +func (o *V1CloudConfigsGkeMachinePoolDeleteNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_cloud_configs_gke_machine_pool_update_parameters.go b/api/client/v1/v1_cloud_configs_gke_machine_pool_update_parameters.go new file mode 100644 index 00000000..d651bd1e --- /dev/null +++ b/api/client/v1/v1_cloud_configs_gke_machine_pool_update_parameters.go @@ -0,0 +1,178 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1CloudConfigsGkeMachinePoolUpdateParams creates a new V1CloudConfigsGkeMachinePoolUpdateParams object +// with the default values initialized. +func NewV1CloudConfigsGkeMachinePoolUpdateParams() *V1CloudConfigsGkeMachinePoolUpdateParams { + var () + return &V1CloudConfigsGkeMachinePoolUpdateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudConfigsGkeMachinePoolUpdateParamsWithTimeout creates a new V1CloudConfigsGkeMachinePoolUpdateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudConfigsGkeMachinePoolUpdateParamsWithTimeout(timeout time.Duration) *V1CloudConfigsGkeMachinePoolUpdateParams { + var () + return &V1CloudConfigsGkeMachinePoolUpdateParams{ + + timeout: timeout, + } +} + +// NewV1CloudConfigsGkeMachinePoolUpdateParamsWithContext creates a new V1CloudConfigsGkeMachinePoolUpdateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudConfigsGkeMachinePoolUpdateParamsWithContext(ctx context.Context) *V1CloudConfigsGkeMachinePoolUpdateParams { + var () + return &V1CloudConfigsGkeMachinePoolUpdateParams{ + + Context: ctx, + } +} + +// NewV1CloudConfigsGkeMachinePoolUpdateParamsWithHTTPClient creates a new V1CloudConfigsGkeMachinePoolUpdateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudConfigsGkeMachinePoolUpdateParamsWithHTTPClient(client *http.Client) *V1CloudConfigsGkeMachinePoolUpdateParams { + var () + return &V1CloudConfigsGkeMachinePoolUpdateParams{ + HTTPClient: client, + } +} + +/* +V1CloudConfigsGkeMachinePoolUpdateParams contains all the parameters to send to the API endpoint +for the v1 cloud configs gke machine pool update operation typically these are written to a http.Request +*/ +type V1CloudConfigsGkeMachinePoolUpdateParams struct { + + /*Body*/ + Body *models.V1GcpMachinePoolConfigEntity + /*ConfigUID + Cluster's cloud config uid + + */ + ConfigUID string + /*MachinePoolName + Machine pool name + + */ + MachinePoolName string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud configs gke machine pool update params +func (o *V1CloudConfigsGkeMachinePoolUpdateParams) WithTimeout(timeout time.Duration) *V1CloudConfigsGkeMachinePoolUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud configs gke machine pool update params +func (o *V1CloudConfigsGkeMachinePoolUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud configs gke machine pool update params +func (o *V1CloudConfigsGkeMachinePoolUpdateParams) WithContext(ctx context.Context) *V1CloudConfigsGkeMachinePoolUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud configs gke machine pool update params +func (o *V1CloudConfigsGkeMachinePoolUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud configs gke machine pool update params +func (o *V1CloudConfigsGkeMachinePoolUpdateParams) WithHTTPClient(client *http.Client) *V1CloudConfigsGkeMachinePoolUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud configs gke machine pool update params +func (o *V1CloudConfigsGkeMachinePoolUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 cloud configs gke machine pool update params +func (o *V1CloudConfigsGkeMachinePoolUpdateParams) WithBody(body *models.V1GcpMachinePoolConfigEntity) *V1CloudConfigsGkeMachinePoolUpdateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 cloud configs gke machine pool update params +func (o *V1CloudConfigsGkeMachinePoolUpdateParams) SetBody(body *models.V1GcpMachinePoolConfigEntity) { + o.Body = body +} + +// WithConfigUID adds the configUID to the v1 cloud configs gke machine pool update params +func (o *V1CloudConfigsGkeMachinePoolUpdateParams) WithConfigUID(configUID string) *V1CloudConfigsGkeMachinePoolUpdateParams { + o.SetConfigUID(configUID) + return o +} + +// SetConfigUID adds the configUid to the v1 cloud configs gke machine pool update params +func (o *V1CloudConfigsGkeMachinePoolUpdateParams) SetConfigUID(configUID string) { + o.ConfigUID = configUID +} + +// WithMachinePoolName adds the machinePoolName to the v1 cloud configs gke machine pool update params +func (o *V1CloudConfigsGkeMachinePoolUpdateParams) WithMachinePoolName(machinePoolName string) *V1CloudConfigsGkeMachinePoolUpdateParams { + o.SetMachinePoolName(machinePoolName) + return o +} + +// SetMachinePoolName adds the machinePoolName to the v1 cloud configs gke machine pool update params +func (o *V1CloudConfigsGkeMachinePoolUpdateParams) SetMachinePoolName(machinePoolName string) { + o.MachinePoolName = machinePoolName +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudConfigsGkeMachinePoolUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param configUid + if err := r.SetPathParam("configUid", o.ConfigUID); err != nil { + return err + } + + // path param machinePoolName + if err := r.SetPathParam("machinePoolName", o.MachinePoolName); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_configs_gke_machine_pool_update_responses.go b/api/client/v1/v1_cloud_configs_gke_machine_pool_update_responses.go new file mode 100644 index 00000000..a7ece503 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_gke_machine_pool_update_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1CloudConfigsGkeMachinePoolUpdateReader is a Reader for the V1CloudConfigsGkeMachinePoolUpdate structure. +type V1CloudConfigsGkeMachinePoolUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudConfigsGkeMachinePoolUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1CloudConfigsGkeMachinePoolUpdateNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudConfigsGkeMachinePoolUpdateNoContent creates a V1CloudConfigsGkeMachinePoolUpdateNoContent with default headers values +func NewV1CloudConfigsGkeMachinePoolUpdateNoContent() *V1CloudConfigsGkeMachinePoolUpdateNoContent { + return &V1CloudConfigsGkeMachinePoolUpdateNoContent{} +} + +/* +V1CloudConfigsGkeMachinePoolUpdateNoContent handles this case with default header values. + +The resource was updated successfully +*/ +type V1CloudConfigsGkeMachinePoolUpdateNoContent struct { +} + +func (o *V1CloudConfigsGkeMachinePoolUpdateNoContent) Error() string { + return fmt.Sprintf("[PUT /v1/cloudconfigs/gke/{configUid}/machinePools/{machinePoolName}][%d] v1CloudConfigsGkeMachinePoolUpdateNoContent ", 204) +} + +func (o *V1CloudConfigsGkeMachinePoolUpdateNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_cloud_configs_gke_pool_machines_add_parameters.go b/api/client/v1/v1_cloud_configs_gke_pool_machines_add_parameters.go new file mode 100644 index 00000000..1c58895c --- /dev/null +++ b/api/client/v1/v1_cloud_configs_gke_pool_machines_add_parameters.go @@ -0,0 +1,178 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1CloudConfigsGkePoolMachinesAddParams creates a new V1CloudConfigsGkePoolMachinesAddParams object +// with the default values initialized. +func NewV1CloudConfigsGkePoolMachinesAddParams() *V1CloudConfigsGkePoolMachinesAddParams { + var () + return &V1CloudConfigsGkePoolMachinesAddParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudConfigsGkePoolMachinesAddParamsWithTimeout creates a new V1CloudConfigsGkePoolMachinesAddParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudConfigsGkePoolMachinesAddParamsWithTimeout(timeout time.Duration) *V1CloudConfigsGkePoolMachinesAddParams { + var () + return &V1CloudConfigsGkePoolMachinesAddParams{ + + timeout: timeout, + } +} + +// NewV1CloudConfigsGkePoolMachinesAddParamsWithContext creates a new V1CloudConfigsGkePoolMachinesAddParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudConfigsGkePoolMachinesAddParamsWithContext(ctx context.Context) *V1CloudConfigsGkePoolMachinesAddParams { + var () + return &V1CloudConfigsGkePoolMachinesAddParams{ + + Context: ctx, + } +} + +// NewV1CloudConfigsGkePoolMachinesAddParamsWithHTTPClient creates a new V1CloudConfigsGkePoolMachinesAddParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudConfigsGkePoolMachinesAddParamsWithHTTPClient(client *http.Client) *V1CloudConfigsGkePoolMachinesAddParams { + var () + return &V1CloudConfigsGkePoolMachinesAddParams{ + HTTPClient: client, + } +} + +/* +V1CloudConfigsGkePoolMachinesAddParams contains all the parameters to send to the API endpoint +for the v1 cloud configs gke pool machines add operation typically these are written to a http.Request +*/ +type V1CloudConfigsGkePoolMachinesAddParams struct { + + /*Body*/ + Body *models.V1GcpMachine + /*ConfigUID + Cluster's cloud config uid + + */ + ConfigUID string + /*MachinePoolName + Machine pool name + + */ + MachinePoolName string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud configs gke pool machines add params +func (o *V1CloudConfigsGkePoolMachinesAddParams) WithTimeout(timeout time.Duration) *V1CloudConfigsGkePoolMachinesAddParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud configs gke pool machines add params +func (o *V1CloudConfigsGkePoolMachinesAddParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud configs gke pool machines add params +func (o *V1CloudConfigsGkePoolMachinesAddParams) WithContext(ctx context.Context) *V1CloudConfigsGkePoolMachinesAddParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud configs gke pool machines add params +func (o *V1CloudConfigsGkePoolMachinesAddParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud configs gke pool machines add params +func (o *V1CloudConfigsGkePoolMachinesAddParams) WithHTTPClient(client *http.Client) *V1CloudConfigsGkePoolMachinesAddParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud configs gke pool machines add params +func (o *V1CloudConfigsGkePoolMachinesAddParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 cloud configs gke pool machines add params +func (o *V1CloudConfigsGkePoolMachinesAddParams) WithBody(body *models.V1GcpMachine) *V1CloudConfigsGkePoolMachinesAddParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 cloud configs gke pool machines add params +func (o *V1CloudConfigsGkePoolMachinesAddParams) SetBody(body *models.V1GcpMachine) { + o.Body = body +} + +// WithConfigUID adds the configUID to the v1 cloud configs gke pool machines add params +func (o *V1CloudConfigsGkePoolMachinesAddParams) WithConfigUID(configUID string) *V1CloudConfigsGkePoolMachinesAddParams { + o.SetConfigUID(configUID) + return o +} + +// SetConfigUID adds the configUid to the v1 cloud configs gke pool machines add params +func (o *V1CloudConfigsGkePoolMachinesAddParams) SetConfigUID(configUID string) { + o.ConfigUID = configUID +} + +// WithMachinePoolName adds the machinePoolName to the v1 cloud configs gke pool machines add params +func (o *V1CloudConfigsGkePoolMachinesAddParams) WithMachinePoolName(machinePoolName string) *V1CloudConfigsGkePoolMachinesAddParams { + o.SetMachinePoolName(machinePoolName) + return o +} + +// SetMachinePoolName adds the machinePoolName to the v1 cloud configs gke pool machines add params +func (o *V1CloudConfigsGkePoolMachinesAddParams) SetMachinePoolName(machinePoolName string) { + o.MachinePoolName = machinePoolName +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudConfigsGkePoolMachinesAddParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param configUid + if err := r.SetPathParam("configUid", o.ConfigUID); err != nil { + return err + } + + // path param machinePoolName + if err := r.SetPathParam("machinePoolName", o.MachinePoolName); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_configs_gke_pool_machines_add_responses.go b/api/client/v1/v1_cloud_configs_gke_pool_machines_add_responses.go new file mode 100644 index 00000000..3a2e09e1 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_gke_pool_machines_add_responses.go @@ -0,0 +1,77 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1CloudConfigsGkePoolMachinesAddReader is a Reader for the V1CloudConfigsGkePoolMachinesAdd structure. +type V1CloudConfigsGkePoolMachinesAddReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudConfigsGkePoolMachinesAddReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 201: + result := NewV1CloudConfigsGkePoolMachinesAddCreated() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudConfigsGkePoolMachinesAddCreated creates a V1CloudConfigsGkePoolMachinesAddCreated with default headers values +func NewV1CloudConfigsGkePoolMachinesAddCreated() *V1CloudConfigsGkePoolMachinesAddCreated { + return &V1CloudConfigsGkePoolMachinesAddCreated{} +} + +/* +V1CloudConfigsGkePoolMachinesAddCreated handles this case with default header values. + +Created successfully +*/ +type V1CloudConfigsGkePoolMachinesAddCreated struct { + /*Audit uid for the request + */ + AuditUID string + + Payload *models.V1UID +} + +func (o *V1CloudConfigsGkePoolMachinesAddCreated) Error() string { + return fmt.Sprintf("[POST /v1/cloudconfigs/gke/{configUid}/machinePools/{machinePoolName}/machines][%d] v1CloudConfigsGkePoolMachinesAddCreated %+v", 201, o.Payload) +} + +func (o *V1CloudConfigsGkePoolMachinesAddCreated) GetPayload() *models.V1UID { + return o.Payload +} + +func (o *V1CloudConfigsGkePoolMachinesAddCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header AuditUid + o.AuditUID = response.GetHeader("AuditUid") + + o.Payload = new(models.V1UID) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_cloud_configs_gke_pool_machines_list_parameters.go b/api/client/v1/v1_cloud_configs_gke_pool_machines_list_parameters.go new file mode 100644 index 00000000..21af84fc --- /dev/null +++ b/api/client/v1/v1_cloud_configs_gke_pool_machines_list_parameters.go @@ -0,0 +1,365 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// NewV1CloudConfigsGkePoolMachinesListParams creates a new V1CloudConfigsGkePoolMachinesListParams object +// with the default values initialized. +func NewV1CloudConfigsGkePoolMachinesListParams() *V1CloudConfigsGkePoolMachinesListParams { + var ( + limitDefault = int64(50) + ) + return &V1CloudConfigsGkePoolMachinesListParams{ + Limit: &limitDefault, + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudConfigsGkePoolMachinesListParamsWithTimeout creates a new V1CloudConfigsGkePoolMachinesListParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudConfigsGkePoolMachinesListParamsWithTimeout(timeout time.Duration) *V1CloudConfigsGkePoolMachinesListParams { + var ( + limitDefault = int64(50) + ) + return &V1CloudConfigsGkePoolMachinesListParams{ + Limit: &limitDefault, + + timeout: timeout, + } +} + +// NewV1CloudConfigsGkePoolMachinesListParamsWithContext creates a new V1CloudConfigsGkePoolMachinesListParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudConfigsGkePoolMachinesListParamsWithContext(ctx context.Context) *V1CloudConfigsGkePoolMachinesListParams { + var ( + limitDefault = int64(50) + ) + return &V1CloudConfigsGkePoolMachinesListParams{ + Limit: &limitDefault, + + Context: ctx, + } +} + +// NewV1CloudConfigsGkePoolMachinesListParamsWithHTTPClient creates a new V1CloudConfigsGkePoolMachinesListParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudConfigsGkePoolMachinesListParamsWithHTTPClient(client *http.Client) *V1CloudConfigsGkePoolMachinesListParams { + var ( + limitDefault = int64(50) + ) + return &V1CloudConfigsGkePoolMachinesListParams{ + Limit: &limitDefault, + HTTPClient: client, + } +} + +/* +V1CloudConfigsGkePoolMachinesListParams contains all the parameters to send to the API endpoint +for the v1 cloud configs gke pool machines list operation typically these are written to a http.Request +*/ +type V1CloudConfigsGkePoolMachinesListParams struct { + + /*ConfigUID + Cluster's cloud config uid + + */ + ConfigUID string + /*Continue + continue token to paginate the subsequent data items + + */ + Continue *string + /*Fields + Set of fields to be presented in the response with values. The fields are comma separated. Eg: metadata.uid,metadata.name + + */ + Fields *string + /*Filters + Filters can be combined with AND, OR operators with field path name. Eg: metadata.name=TestServiceANDspec.cloudType=aws + + Server will be restricted to certain fields based on the indexed data for each resource. + + */ + Filters *string + /*Limit + limit is a maximum number of responses to return for a list call. Default and maximum value of the limit is 50. + If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. + + */ + Limit *int64 + /*MachinePoolName + Machine pool name + + */ + MachinePoolName string + /*Offset + offset is the next index number from which the response will start. The response offset value can be used along with continue token for the pagination. + + */ + Offset *int64 + /*OrderBy + Specify the fields with sort order. 1 indicates ascending and -1 for descending. Eg: orderBy=metadata.name=1,metadata.uid=-1 + + */ + OrderBy *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud configs gke pool machines list params +func (o *V1CloudConfigsGkePoolMachinesListParams) WithTimeout(timeout time.Duration) *V1CloudConfigsGkePoolMachinesListParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud configs gke pool machines list params +func (o *V1CloudConfigsGkePoolMachinesListParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud configs gke pool machines list params +func (o *V1CloudConfigsGkePoolMachinesListParams) WithContext(ctx context.Context) *V1CloudConfigsGkePoolMachinesListParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud configs gke pool machines list params +func (o *V1CloudConfigsGkePoolMachinesListParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud configs gke pool machines list params +func (o *V1CloudConfigsGkePoolMachinesListParams) WithHTTPClient(client *http.Client) *V1CloudConfigsGkePoolMachinesListParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud configs gke pool machines list params +func (o *V1CloudConfigsGkePoolMachinesListParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithConfigUID adds the configUID to the v1 cloud configs gke pool machines list params +func (o *V1CloudConfigsGkePoolMachinesListParams) WithConfigUID(configUID string) *V1CloudConfigsGkePoolMachinesListParams { + o.SetConfigUID(configUID) + return o +} + +// SetConfigUID adds the configUid to the v1 cloud configs gke pool machines list params +func (o *V1CloudConfigsGkePoolMachinesListParams) SetConfigUID(configUID string) { + o.ConfigUID = configUID +} + +// WithContinue adds the continueVar to the v1 cloud configs gke pool machines list params +func (o *V1CloudConfigsGkePoolMachinesListParams) WithContinue(continueVar *string) *V1CloudConfigsGkePoolMachinesListParams { + o.SetContinue(continueVar) + return o +} + +// SetContinue adds the continue to the v1 cloud configs gke pool machines list params +func (o *V1CloudConfigsGkePoolMachinesListParams) SetContinue(continueVar *string) { + o.Continue = continueVar +} + +// WithFields adds the fields to the v1 cloud configs gke pool machines list params +func (o *V1CloudConfigsGkePoolMachinesListParams) WithFields(fields *string) *V1CloudConfigsGkePoolMachinesListParams { + o.SetFields(fields) + return o +} + +// SetFields adds the fields to the v1 cloud configs gke pool machines list params +func (o *V1CloudConfigsGkePoolMachinesListParams) SetFields(fields *string) { + o.Fields = fields +} + +// WithFilters adds the filters to the v1 cloud configs gke pool machines list params +func (o *V1CloudConfigsGkePoolMachinesListParams) WithFilters(filters *string) *V1CloudConfigsGkePoolMachinesListParams { + o.SetFilters(filters) + return o +} + +// SetFilters adds the filters to the v1 cloud configs gke pool machines list params +func (o *V1CloudConfigsGkePoolMachinesListParams) SetFilters(filters *string) { + o.Filters = filters +} + +// WithLimit adds the limit to the v1 cloud configs gke pool machines list params +func (o *V1CloudConfigsGkePoolMachinesListParams) WithLimit(limit *int64) *V1CloudConfigsGkePoolMachinesListParams { + o.SetLimit(limit) + return o +} + +// SetLimit adds the limit to the v1 cloud configs gke pool machines list params +func (o *V1CloudConfigsGkePoolMachinesListParams) SetLimit(limit *int64) { + o.Limit = limit +} + +// WithMachinePoolName adds the machinePoolName to the v1 cloud configs gke pool machines list params +func (o *V1CloudConfigsGkePoolMachinesListParams) WithMachinePoolName(machinePoolName string) *V1CloudConfigsGkePoolMachinesListParams { + o.SetMachinePoolName(machinePoolName) + return o +} + +// SetMachinePoolName adds the machinePoolName to the v1 cloud configs gke pool machines list params +func (o *V1CloudConfigsGkePoolMachinesListParams) SetMachinePoolName(machinePoolName string) { + o.MachinePoolName = machinePoolName +} + +// WithOffset adds the offset to the v1 cloud configs gke pool machines list params +func (o *V1CloudConfigsGkePoolMachinesListParams) WithOffset(offset *int64) *V1CloudConfigsGkePoolMachinesListParams { + o.SetOffset(offset) + return o +} + +// SetOffset adds the offset to the v1 cloud configs gke pool machines list params +func (o *V1CloudConfigsGkePoolMachinesListParams) SetOffset(offset *int64) { + o.Offset = offset +} + +// WithOrderBy adds the orderBy to the v1 cloud configs gke pool machines list params +func (o *V1CloudConfigsGkePoolMachinesListParams) WithOrderBy(orderBy *string) *V1CloudConfigsGkePoolMachinesListParams { + o.SetOrderBy(orderBy) + return o +} + +// SetOrderBy adds the orderBy to the v1 cloud configs gke pool machines list params +func (o *V1CloudConfigsGkePoolMachinesListParams) SetOrderBy(orderBy *string) { + o.OrderBy = orderBy +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudConfigsGkePoolMachinesListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param configUid + if err := r.SetPathParam("configUid", o.ConfigUID); err != nil { + return err + } + + if o.Continue != nil { + + // query param continue + var qrContinue string + if o.Continue != nil { + qrContinue = *o.Continue + } + qContinue := qrContinue + if qContinue != "" { + if err := r.SetQueryParam("continue", qContinue); err != nil { + return err + } + } + + } + + if o.Fields != nil { + + // query param fields + var qrFields string + if o.Fields != nil { + qrFields = *o.Fields + } + qFields := qrFields + if qFields != "" { + if err := r.SetQueryParam("fields", qFields); err != nil { + return err + } + } + + } + + if o.Filters != nil { + + // query param filters + var qrFilters string + if o.Filters != nil { + qrFilters = *o.Filters + } + qFilters := qrFilters + if qFilters != "" { + if err := r.SetQueryParam("filters", qFilters); err != nil { + return err + } + } + + } + + if o.Limit != nil { + + // query param limit + var qrLimit int64 + if o.Limit != nil { + qrLimit = *o.Limit + } + qLimit := swag.FormatInt64(qrLimit) + if qLimit != "" { + if err := r.SetQueryParam("limit", qLimit); err != nil { + return err + } + } + + } + + // path param machinePoolName + if err := r.SetPathParam("machinePoolName", o.MachinePoolName); err != nil { + return err + } + + if o.Offset != nil { + + // query param offset + var qrOffset int64 + if o.Offset != nil { + qrOffset = *o.Offset + } + qOffset := swag.FormatInt64(qrOffset) + if qOffset != "" { + if err := r.SetQueryParam("offset", qOffset); err != nil { + return err + } + } + + } + + if o.OrderBy != nil { + + // query param orderBy + var qrOrderBy string + if o.OrderBy != nil { + qrOrderBy = *o.OrderBy + } + qOrderBy := qrOrderBy + if qOrderBy != "" { + if err := r.SetQueryParam("orderBy", qOrderBy); err != nil { + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_configs_gke_pool_machines_list_responses.go b/api/client/v1/v1_cloud_configs_gke_pool_machines_list_responses.go new file mode 100644 index 00000000..81988590 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_gke_pool_machines_list_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1CloudConfigsGkePoolMachinesListReader is a Reader for the V1CloudConfigsGkePoolMachinesList structure. +type V1CloudConfigsGkePoolMachinesListReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudConfigsGkePoolMachinesListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1CloudConfigsGkePoolMachinesListOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudConfigsGkePoolMachinesListOK creates a V1CloudConfigsGkePoolMachinesListOK with default headers values +func NewV1CloudConfigsGkePoolMachinesListOK() *V1CloudConfigsGkePoolMachinesListOK { + return &V1CloudConfigsGkePoolMachinesListOK{} +} + +/* +V1CloudConfigsGkePoolMachinesListOK handles this case with default header values. + +An array of GKE machine items +*/ +type V1CloudConfigsGkePoolMachinesListOK struct { + Payload *models.V1GcpMachines +} + +func (o *V1CloudConfigsGkePoolMachinesListOK) Error() string { + return fmt.Sprintf("[GET /v1/cloudconfigs/gke/{configUid}/machinePools/{machinePoolName}/machines][%d] v1CloudConfigsGkePoolMachinesListOK %+v", 200, o.Payload) +} + +func (o *V1CloudConfigsGkePoolMachinesListOK) GetPayload() *models.V1GcpMachines { + return o.Payload +} + +func (o *V1CloudConfigsGkePoolMachinesListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1GcpMachines) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_cloud_configs_gke_pool_machines_uid_delete_parameters.go b/api/client/v1/v1_cloud_configs_gke_pool_machines_uid_delete_parameters.go new file mode 100644 index 00000000..f90aa691 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_gke_pool_machines_uid_delete_parameters.go @@ -0,0 +1,178 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1CloudConfigsGkePoolMachinesUIDDeleteParams creates a new V1CloudConfigsGkePoolMachinesUIDDeleteParams object +// with the default values initialized. +func NewV1CloudConfigsGkePoolMachinesUIDDeleteParams() *V1CloudConfigsGkePoolMachinesUIDDeleteParams { + var () + return &V1CloudConfigsGkePoolMachinesUIDDeleteParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudConfigsGkePoolMachinesUIDDeleteParamsWithTimeout creates a new V1CloudConfigsGkePoolMachinesUIDDeleteParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudConfigsGkePoolMachinesUIDDeleteParamsWithTimeout(timeout time.Duration) *V1CloudConfigsGkePoolMachinesUIDDeleteParams { + var () + return &V1CloudConfigsGkePoolMachinesUIDDeleteParams{ + + timeout: timeout, + } +} + +// NewV1CloudConfigsGkePoolMachinesUIDDeleteParamsWithContext creates a new V1CloudConfigsGkePoolMachinesUIDDeleteParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudConfigsGkePoolMachinesUIDDeleteParamsWithContext(ctx context.Context) *V1CloudConfigsGkePoolMachinesUIDDeleteParams { + var () + return &V1CloudConfigsGkePoolMachinesUIDDeleteParams{ + + Context: ctx, + } +} + +// NewV1CloudConfigsGkePoolMachinesUIDDeleteParamsWithHTTPClient creates a new V1CloudConfigsGkePoolMachinesUIDDeleteParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudConfigsGkePoolMachinesUIDDeleteParamsWithHTTPClient(client *http.Client) *V1CloudConfigsGkePoolMachinesUIDDeleteParams { + var () + return &V1CloudConfigsGkePoolMachinesUIDDeleteParams{ + HTTPClient: client, + } +} + +/* +V1CloudConfigsGkePoolMachinesUIDDeleteParams contains all the parameters to send to the API endpoint +for the v1 cloud configs gke pool machines Uid delete operation typically these are written to a http.Request +*/ +type V1CloudConfigsGkePoolMachinesUIDDeleteParams struct { + + /*ConfigUID + Cluster's cloud config uid + + */ + ConfigUID string + /*MachinePoolName + Machine pool name + + */ + MachinePoolName string + /*MachineUID + Machine uid + + */ + MachineUID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud configs gke pool machines Uid delete params +func (o *V1CloudConfigsGkePoolMachinesUIDDeleteParams) WithTimeout(timeout time.Duration) *V1CloudConfigsGkePoolMachinesUIDDeleteParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud configs gke pool machines Uid delete params +func (o *V1CloudConfigsGkePoolMachinesUIDDeleteParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud configs gke pool machines Uid delete params +func (o *V1CloudConfigsGkePoolMachinesUIDDeleteParams) WithContext(ctx context.Context) *V1CloudConfigsGkePoolMachinesUIDDeleteParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud configs gke pool machines Uid delete params +func (o *V1CloudConfigsGkePoolMachinesUIDDeleteParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud configs gke pool machines Uid delete params +func (o *V1CloudConfigsGkePoolMachinesUIDDeleteParams) WithHTTPClient(client *http.Client) *V1CloudConfigsGkePoolMachinesUIDDeleteParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud configs gke pool machines Uid delete params +func (o *V1CloudConfigsGkePoolMachinesUIDDeleteParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithConfigUID adds the configUID to the v1 cloud configs gke pool machines Uid delete params +func (o *V1CloudConfigsGkePoolMachinesUIDDeleteParams) WithConfigUID(configUID string) *V1CloudConfigsGkePoolMachinesUIDDeleteParams { + o.SetConfigUID(configUID) + return o +} + +// SetConfigUID adds the configUid to the v1 cloud configs gke pool machines Uid delete params +func (o *V1CloudConfigsGkePoolMachinesUIDDeleteParams) SetConfigUID(configUID string) { + o.ConfigUID = configUID +} + +// WithMachinePoolName adds the machinePoolName to the v1 cloud configs gke pool machines Uid delete params +func (o *V1CloudConfigsGkePoolMachinesUIDDeleteParams) WithMachinePoolName(machinePoolName string) *V1CloudConfigsGkePoolMachinesUIDDeleteParams { + o.SetMachinePoolName(machinePoolName) + return o +} + +// SetMachinePoolName adds the machinePoolName to the v1 cloud configs gke pool machines Uid delete params +func (o *V1CloudConfigsGkePoolMachinesUIDDeleteParams) SetMachinePoolName(machinePoolName string) { + o.MachinePoolName = machinePoolName +} + +// WithMachineUID adds the machineUID to the v1 cloud configs gke pool machines Uid delete params +func (o *V1CloudConfigsGkePoolMachinesUIDDeleteParams) WithMachineUID(machineUID string) *V1CloudConfigsGkePoolMachinesUIDDeleteParams { + o.SetMachineUID(machineUID) + return o +} + +// SetMachineUID adds the machineUid to the v1 cloud configs gke pool machines Uid delete params +func (o *V1CloudConfigsGkePoolMachinesUIDDeleteParams) SetMachineUID(machineUID string) { + o.MachineUID = machineUID +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudConfigsGkePoolMachinesUIDDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param configUid + if err := r.SetPathParam("configUid", o.ConfigUID); err != nil { + return err + } + + // path param machinePoolName + if err := r.SetPathParam("machinePoolName", o.MachinePoolName); err != nil { + return err + } + + // path param machineUid + if err := r.SetPathParam("machineUid", o.MachineUID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_configs_gke_pool_machines_uid_delete_responses.go b/api/client/v1/v1_cloud_configs_gke_pool_machines_uid_delete_responses.go new file mode 100644 index 00000000..c4c2fabd --- /dev/null +++ b/api/client/v1/v1_cloud_configs_gke_pool_machines_uid_delete_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1CloudConfigsGkePoolMachinesUIDDeleteReader is a Reader for the V1CloudConfigsGkePoolMachinesUIDDelete structure. +type V1CloudConfigsGkePoolMachinesUIDDeleteReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudConfigsGkePoolMachinesUIDDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1CloudConfigsGkePoolMachinesUIDDeleteNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudConfigsGkePoolMachinesUIDDeleteNoContent creates a V1CloudConfigsGkePoolMachinesUIDDeleteNoContent with default headers values +func NewV1CloudConfigsGkePoolMachinesUIDDeleteNoContent() *V1CloudConfigsGkePoolMachinesUIDDeleteNoContent { + return &V1CloudConfigsGkePoolMachinesUIDDeleteNoContent{} +} + +/* +V1CloudConfigsGkePoolMachinesUIDDeleteNoContent handles this case with default header values. + +The resource was deleted successfully +*/ +type V1CloudConfigsGkePoolMachinesUIDDeleteNoContent struct { +} + +func (o *V1CloudConfigsGkePoolMachinesUIDDeleteNoContent) Error() string { + return fmt.Sprintf("[DELETE /v1/cloudconfigs/gke/{configUid}/machinePools/{machinePoolName}/machines/{machineUid}][%d] v1CloudConfigsGkePoolMachinesUidDeleteNoContent ", 204) +} + +func (o *V1CloudConfigsGkePoolMachinesUIDDeleteNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_cloud_configs_gke_pool_machines_uid_get_parameters.go b/api/client/v1/v1_cloud_configs_gke_pool_machines_uid_get_parameters.go new file mode 100644 index 00000000..b010fc81 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_gke_pool_machines_uid_get_parameters.go @@ -0,0 +1,178 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1CloudConfigsGkePoolMachinesUIDGetParams creates a new V1CloudConfigsGkePoolMachinesUIDGetParams object +// with the default values initialized. +func NewV1CloudConfigsGkePoolMachinesUIDGetParams() *V1CloudConfigsGkePoolMachinesUIDGetParams { + var () + return &V1CloudConfigsGkePoolMachinesUIDGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudConfigsGkePoolMachinesUIDGetParamsWithTimeout creates a new V1CloudConfigsGkePoolMachinesUIDGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudConfigsGkePoolMachinesUIDGetParamsWithTimeout(timeout time.Duration) *V1CloudConfigsGkePoolMachinesUIDGetParams { + var () + return &V1CloudConfigsGkePoolMachinesUIDGetParams{ + + timeout: timeout, + } +} + +// NewV1CloudConfigsGkePoolMachinesUIDGetParamsWithContext creates a new V1CloudConfigsGkePoolMachinesUIDGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudConfigsGkePoolMachinesUIDGetParamsWithContext(ctx context.Context) *V1CloudConfigsGkePoolMachinesUIDGetParams { + var () + return &V1CloudConfigsGkePoolMachinesUIDGetParams{ + + Context: ctx, + } +} + +// NewV1CloudConfigsGkePoolMachinesUIDGetParamsWithHTTPClient creates a new V1CloudConfigsGkePoolMachinesUIDGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudConfigsGkePoolMachinesUIDGetParamsWithHTTPClient(client *http.Client) *V1CloudConfigsGkePoolMachinesUIDGetParams { + var () + return &V1CloudConfigsGkePoolMachinesUIDGetParams{ + HTTPClient: client, + } +} + +/* +V1CloudConfigsGkePoolMachinesUIDGetParams contains all the parameters to send to the API endpoint +for the v1 cloud configs gke pool machines Uid get operation typically these are written to a http.Request +*/ +type V1CloudConfigsGkePoolMachinesUIDGetParams struct { + + /*ConfigUID + Cluster's cloud config uid + + */ + ConfigUID string + /*MachinePoolName + Machine pool name + + */ + MachinePoolName string + /*MachineUID + Machine uid + + */ + MachineUID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud configs gke pool machines Uid get params +func (o *V1CloudConfigsGkePoolMachinesUIDGetParams) WithTimeout(timeout time.Duration) *V1CloudConfigsGkePoolMachinesUIDGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud configs gke pool machines Uid get params +func (o *V1CloudConfigsGkePoolMachinesUIDGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud configs gke pool machines Uid get params +func (o *V1CloudConfigsGkePoolMachinesUIDGetParams) WithContext(ctx context.Context) *V1CloudConfigsGkePoolMachinesUIDGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud configs gke pool machines Uid get params +func (o *V1CloudConfigsGkePoolMachinesUIDGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud configs gke pool machines Uid get params +func (o *V1CloudConfigsGkePoolMachinesUIDGetParams) WithHTTPClient(client *http.Client) *V1CloudConfigsGkePoolMachinesUIDGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud configs gke pool machines Uid get params +func (o *V1CloudConfigsGkePoolMachinesUIDGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithConfigUID adds the configUID to the v1 cloud configs gke pool machines Uid get params +func (o *V1CloudConfigsGkePoolMachinesUIDGetParams) WithConfigUID(configUID string) *V1CloudConfigsGkePoolMachinesUIDGetParams { + o.SetConfigUID(configUID) + return o +} + +// SetConfigUID adds the configUid to the v1 cloud configs gke pool machines Uid get params +func (o *V1CloudConfigsGkePoolMachinesUIDGetParams) SetConfigUID(configUID string) { + o.ConfigUID = configUID +} + +// WithMachinePoolName adds the machinePoolName to the v1 cloud configs gke pool machines Uid get params +func (o *V1CloudConfigsGkePoolMachinesUIDGetParams) WithMachinePoolName(machinePoolName string) *V1CloudConfigsGkePoolMachinesUIDGetParams { + o.SetMachinePoolName(machinePoolName) + return o +} + +// SetMachinePoolName adds the machinePoolName to the v1 cloud configs gke pool machines Uid get params +func (o *V1CloudConfigsGkePoolMachinesUIDGetParams) SetMachinePoolName(machinePoolName string) { + o.MachinePoolName = machinePoolName +} + +// WithMachineUID adds the machineUID to the v1 cloud configs gke pool machines Uid get params +func (o *V1CloudConfigsGkePoolMachinesUIDGetParams) WithMachineUID(machineUID string) *V1CloudConfigsGkePoolMachinesUIDGetParams { + o.SetMachineUID(machineUID) + return o +} + +// SetMachineUID adds the machineUid to the v1 cloud configs gke pool machines Uid get params +func (o *V1CloudConfigsGkePoolMachinesUIDGetParams) SetMachineUID(machineUID string) { + o.MachineUID = machineUID +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudConfigsGkePoolMachinesUIDGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param configUid + if err := r.SetPathParam("configUid", o.ConfigUID); err != nil { + return err + } + + // path param machinePoolName + if err := r.SetPathParam("machinePoolName", o.MachinePoolName); err != nil { + return err + } + + // path param machineUid + if err := r.SetPathParam("machineUid", o.MachineUID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_configs_gke_pool_machines_uid_get_responses.go b/api/client/v1/v1_cloud_configs_gke_pool_machines_uid_get_responses.go new file mode 100644 index 00000000..825121c2 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_gke_pool_machines_uid_get_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1CloudConfigsGkePoolMachinesUIDGetReader is a Reader for the V1CloudConfigsGkePoolMachinesUIDGet structure. +type V1CloudConfigsGkePoolMachinesUIDGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudConfigsGkePoolMachinesUIDGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1CloudConfigsGkePoolMachinesUIDGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudConfigsGkePoolMachinesUIDGetOK creates a V1CloudConfigsGkePoolMachinesUIDGetOK with default headers values +func NewV1CloudConfigsGkePoolMachinesUIDGetOK() *V1CloudConfigsGkePoolMachinesUIDGetOK { + return &V1CloudConfigsGkePoolMachinesUIDGetOK{} +} + +/* +V1CloudConfigsGkePoolMachinesUIDGetOK handles this case with default header values. + +OK +*/ +type V1CloudConfigsGkePoolMachinesUIDGetOK struct { + Payload *models.V1GcpMachine +} + +func (o *V1CloudConfigsGkePoolMachinesUIDGetOK) Error() string { + return fmt.Sprintf("[GET /v1/cloudconfigs/gke/{configUid}/machinePools/{machinePoolName}/machines/{machineUid}][%d] v1CloudConfigsGkePoolMachinesUidGetOK %+v", 200, o.Payload) +} + +func (o *V1CloudConfigsGkePoolMachinesUIDGetOK) GetPayload() *models.V1GcpMachine { + return o.Payload +} + +func (o *V1CloudConfigsGkePoolMachinesUIDGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1GcpMachine) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_cloud_configs_gke_pool_machines_uid_update_parameters.go b/api/client/v1/v1_cloud_configs_gke_pool_machines_uid_update_parameters.go new file mode 100644 index 00000000..49527910 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_gke_pool_machines_uid_update_parameters.go @@ -0,0 +1,199 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1CloudConfigsGkePoolMachinesUIDUpdateParams creates a new V1CloudConfigsGkePoolMachinesUIDUpdateParams object +// with the default values initialized. +func NewV1CloudConfigsGkePoolMachinesUIDUpdateParams() *V1CloudConfigsGkePoolMachinesUIDUpdateParams { + var () + return &V1CloudConfigsGkePoolMachinesUIDUpdateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudConfigsGkePoolMachinesUIDUpdateParamsWithTimeout creates a new V1CloudConfigsGkePoolMachinesUIDUpdateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudConfigsGkePoolMachinesUIDUpdateParamsWithTimeout(timeout time.Duration) *V1CloudConfigsGkePoolMachinesUIDUpdateParams { + var () + return &V1CloudConfigsGkePoolMachinesUIDUpdateParams{ + + timeout: timeout, + } +} + +// NewV1CloudConfigsGkePoolMachinesUIDUpdateParamsWithContext creates a new V1CloudConfigsGkePoolMachinesUIDUpdateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudConfigsGkePoolMachinesUIDUpdateParamsWithContext(ctx context.Context) *V1CloudConfigsGkePoolMachinesUIDUpdateParams { + var () + return &V1CloudConfigsGkePoolMachinesUIDUpdateParams{ + + Context: ctx, + } +} + +// NewV1CloudConfigsGkePoolMachinesUIDUpdateParamsWithHTTPClient creates a new V1CloudConfigsGkePoolMachinesUIDUpdateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudConfigsGkePoolMachinesUIDUpdateParamsWithHTTPClient(client *http.Client) *V1CloudConfigsGkePoolMachinesUIDUpdateParams { + var () + return &V1CloudConfigsGkePoolMachinesUIDUpdateParams{ + HTTPClient: client, + } +} + +/* +V1CloudConfigsGkePoolMachinesUIDUpdateParams contains all the parameters to send to the API endpoint +for the v1 cloud configs gke pool machines Uid update operation typically these are written to a http.Request +*/ +type V1CloudConfigsGkePoolMachinesUIDUpdateParams struct { + + /*Body*/ + Body *models.V1GcpMachine + /*ConfigUID + Cluster's cloud config uid + + */ + ConfigUID string + /*MachinePoolName + Machine pool name + + */ + MachinePoolName string + /*MachineUID + Machine uid + + */ + MachineUID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud configs gke pool machines Uid update params +func (o *V1CloudConfigsGkePoolMachinesUIDUpdateParams) WithTimeout(timeout time.Duration) *V1CloudConfigsGkePoolMachinesUIDUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud configs gke pool machines Uid update params +func (o *V1CloudConfigsGkePoolMachinesUIDUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud configs gke pool machines Uid update params +func (o *V1CloudConfigsGkePoolMachinesUIDUpdateParams) WithContext(ctx context.Context) *V1CloudConfigsGkePoolMachinesUIDUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud configs gke pool machines Uid update params +func (o *V1CloudConfigsGkePoolMachinesUIDUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud configs gke pool machines Uid update params +func (o *V1CloudConfigsGkePoolMachinesUIDUpdateParams) WithHTTPClient(client *http.Client) *V1CloudConfigsGkePoolMachinesUIDUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud configs gke pool machines Uid update params +func (o *V1CloudConfigsGkePoolMachinesUIDUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 cloud configs gke pool machines Uid update params +func (o *V1CloudConfigsGkePoolMachinesUIDUpdateParams) WithBody(body *models.V1GcpMachine) *V1CloudConfigsGkePoolMachinesUIDUpdateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 cloud configs gke pool machines Uid update params +func (o *V1CloudConfigsGkePoolMachinesUIDUpdateParams) SetBody(body *models.V1GcpMachine) { + o.Body = body +} + +// WithConfigUID adds the configUID to the v1 cloud configs gke pool machines Uid update params +func (o *V1CloudConfigsGkePoolMachinesUIDUpdateParams) WithConfigUID(configUID string) *V1CloudConfigsGkePoolMachinesUIDUpdateParams { + o.SetConfigUID(configUID) + return o +} + +// SetConfigUID adds the configUid to the v1 cloud configs gke pool machines Uid update params +func (o *V1CloudConfigsGkePoolMachinesUIDUpdateParams) SetConfigUID(configUID string) { + o.ConfigUID = configUID +} + +// WithMachinePoolName adds the machinePoolName to the v1 cloud configs gke pool machines Uid update params +func (o *V1CloudConfigsGkePoolMachinesUIDUpdateParams) WithMachinePoolName(machinePoolName string) *V1CloudConfigsGkePoolMachinesUIDUpdateParams { + o.SetMachinePoolName(machinePoolName) + return o +} + +// SetMachinePoolName adds the machinePoolName to the v1 cloud configs gke pool machines Uid update params +func (o *V1CloudConfigsGkePoolMachinesUIDUpdateParams) SetMachinePoolName(machinePoolName string) { + o.MachinePoolName = machinePoolName +} + +// WithMachineUID adds the machineUID to the v1 cloud configs gke pool machines Uid update params +func (o *V1CloudConfigsGkePoolMachinesUIDUpdateParams) WithMachineUID(machineUID string) *V1CloudConfigsGkePoolMachinesUIDUpdateParams { + o.SetMachineUID(machineUID) + return o +} + +// SetMachineUID adds the machineUid to the v1 cloud configs gke pool machines Uid update params +func (o *V1CloudConfigsGkePoolMachinesUIDUpdateParams) SetMachineUID(machineUID string) { + o.MachineUID = machineUID +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudConfigsGkePoolMachinesUIDUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param configUid + if err := r.SetPathParam("configUid", o.ConfigUID); err != nil { + return err + } + + // path param machinePoolName + if err := r.SetPathParam("machinePoolName", o.MachinePoolName); err != nil { + return err + } + + // path param machineUid + if err := r.SetPathParam("machineUid", o.MachineUID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_configs_gke_pool_machines_uid_update_responses.go b/api/client/v1/v1_cloud_configs_gke_pool_machines_uid_update_responses.go new file mode 100644 index 00000000..ca94c400 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_gke_pool_machines_uid_update_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1CloudConfigsGkePoolMachinesUIDUpdateReader is a Reader for the V1CloudConfigsGkePoolMachinesUIDUpdate structure. +type V1CloudConfigsGkePoolMachinesUIDUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudConfigsGkePoolMachinesUIDUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1CloudConfigsGkePoolMachinesUIDUpdateNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudConfigsGkePoolMachinesUIDUpdateNoContent creates a V1CloudConfigsGkePoolMachinesUIDUpdateNoContent with default headers values +func NewV1CloudConfigsGkePoolMachinesUIDUpdateNoContent() *V1CloudConfigsGkePoolMachinesUIDUpdateNoContent { + return &V1CloudConfigsGkePoolMachinesUIDUpdateNoContent{} +} + +/* +V1CloudConfigsGkePoolMachinesUIDUpdateNoContent handles this case with default header values. + +The resource was updated successfully +*/ +type V1CloudConfigsGkePoolMachinesUIDUpdateNoContent struct { +} + +func (o *V1CloudConfigsGkePoolMachinesUIDUpdateNoContent) Error() string { + return fmt.Sprintf("[PUT /v1/cloudconfigs/gke/{configUid}/machinePools/{machinePoolName}/machines/{machineUid}][%d] v1CloudConfigsGkePoolMachinesUidUpdateNoContent ", 204) +} + +func (o *V1CloudConfigsGkePoolMachinesUIDUpdateNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_cloud_configs_gke_uid_cluster_config_parameters.go b/api/client/v1/v1_cloud_configs_gke_uid_cluster_config_parameters.go new file mode 100644 index 00000000..48647970 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_gke_uid_cluster_config_parameters.go @@ -0,0 +1,157 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1CloudConfigsGkeUIDClusterConfigParams creates a new V1CloudConfigsGkeUIDClusterConfigParams object +// with the default values initialized. +func NewV1CloudConfigsGkeUIDClusterConfigParams() *V1CloudConfigsGkeUIDClusterConfigParams { + var () + return &V1CloudConfigsGkeUIDClusterConfigParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudConfigsGkeUIDClusterConfigParamsWithTimeout creates a new V1CloudConfigsGkeUIDClusterConfigParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudConfigsGkeUIDClusterConfigParamsWithTimeout(timeout time.Duration) *V1CloudConfigsGkeUIDClusterConfigParams { + var () + return &V1CloudConfigsGkeUIDClusterConfigParams{ + + timeout: timeout, + } +} + +// NewV1CloudConfigsGkeUIDClusterConfigParamsWithContext creates a new V1CloudConfigsGkeUIDClusterConfigParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudConfigsGkeUIDClusterConfigParamsWithContext(ctx context.Context) *V1CloudConfigsGkeUIDClusterConfigParams { + var () + return &V1CloudConfigsGkeUIDClusterConfigParams{ + + Context: ctx, + } +} + +// NewV1CloudConfigsGkeUIDClusterConfigParamsWithHTTPClient creates a new V1CloudConfigsGkeUIDClusterConfigParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudConfigsGkeUIDClusterConfigParamsWithHTTPClient(client *http.Client) *V1CloudConfigsGkeUIDClusterConfigParams { + var () + return &V1CloudConfigsGkeUIDClusterConfigParams{ + HTTPClient: client, + } +} + +/* +V1CloudConfigsGkeUIDClusterConfigParams contains all the parameters to send to the API endpoint +for the v1 cloud configs gke Uid cluster config operation typically these are written to a http.Request +*/ +type V1CloudConfigsGkeUIDClusterConfigParams struct { + + /*Body*/ + Body *models.V1GcpCloudClusterConfigEntity + /*ConfigUID + Cluster's cloud config uid + + */ + ConfigUID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud configs gke Uid cluster config params +func (o *V1CloudConfigsGkeUIDClusterConfigParams) WithTimeout(timeout time.Duration) *V1CloudConfigsGkeUIDClusterConfigParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud configs gke Uid cluster config params +func (o *V1CloudConfigsGkeUIDClusterConfigParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud configs gke Uid cluster config params +func (o *V1CloudConfigsGkeUIDClusterConfigParams) WithContext(ctx context.Context) *V1CloudConfigsGkeUIDClusterConfigParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud configs gke Uid cluster config params +func (o *V1CloudConfigsGkeUIDClusterConfigParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud configs gke Uid cluster config params +func (o *V1CloudConfigsGkeUIDClusterConfigParams) WithHTTPClient(client *http.Client) *V1CloudConfigsGkeUIDClusterConfigParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud configs gke Uid cluster config params +func (o *V1CloudConfigsGkeUIDClusterConfigParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 cloud configs gke Uid cluster config params +func (o *V1CloudConfigsGkeUIDClusterConfigParams) WithBody(body *models.V1GcpCloudClusterConfigEntity) *V1CloudConfigsGkeUIDClusterConfigParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 cloud configs gke Uid cluster config params +func (o *V1CloudConfigsGkeUIDClusterConfigParams) SetBody(body *models.V1GcpCloudClusterConfigEntity) { + o.Body = body +} + +// WithConfigUID adds the configUID to the v1 cloud configs gke Uid cluster config params +func (o *V1CloudConfigsGkeUIDClusterConfigParams) WithConfigUID(configUID string) *V1CloudConfigsGkeUIDClusterConfigParams { + o.SetConfigUID(configUID) + return o +} + +// SetConfigUID adds the configUid to the v1 cloud configs gke Uid cluster config params +func (o *V1CloudConfigsGkeUIDClusterConfigParams) SetConfigUID(configUID string) { + o.ConfigUID = configUID +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudConfigsGkeUIDClusterConfigParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param configUid + if err := r.SetPathParam("configUid", o.ConfigUID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_configs_gke_uid_cluster_config_responses.go b/api/client/v1/v1_cloud_configs_gke_uid_cluster_config_responses.go new file mode 100644 index 00000000..146c165a --- /dev/null +++ b/api/client/v1/v1_cloud_configs_gke_uid_cluster_config_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1CloudConfigsGkeUIDClusterConfigReader is a Reader for the V1CloudConfigsGkeUIDClusterConfig structure. +type V1CloudConfigsGkeUIDClusterConfigReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudConfigsGkeUIDClusterConfigReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1CloudConfigsGkeUIDClusterConfigNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudConfigsGkeUIDClusterConfigNoContent creates a V1CloudConfigsGkeUIDClusterConfigNoContent with default headers values +func NewV1CloudConfigsGkeUIDClusterConfigNoContent() *V1CloudConfigsGkeUIDClusterConfigNoContent { + return &V1CloudConfigsGkeUIDClusterConfigNoContent{} +} + +/* +V1CloudConfigsGkeUIDClusterConfigNoContent handles this case with default header values. + +The resource was updated successfully +*/ +type V1CloudConfigsGkeUIDClusterConfigNoContent struct { +} + +func (o *V1CloudConfigsGkeUIDClusterConfigNoContent) Error() string { + return fmt.Sprintf("[PUT /v1/cloudconfigs/gke/{configUid}/clusterConfig][%d] v1CloudConfigsGkeUidClusterConfigNoContent ", 204) +} + +func (o *V1CloudConfigsGkeUIDClusterConfigNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_cloud_configs_libvirt_get_parameters.go b/api/client/v1/v1_cloud_configs_libvirt_get_parameters.go new file mode 100644 index 00000000..2fb30745 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_libvirt_get_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1CloudConfigsLibvirtGetParams creates a new V1CloudConfigsLibvirtGetParams object +// with the default values initialized. +func NewV1CloudConfigsLibvirtGetParams() *V1CloudConfigsLibvirtGetParams { + var () + return &V1CloudConfigsLibvirtGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudConfigsLibvirtGetParamsWithTimeout creates a new V1CloudConfigsLibvirtGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudConfigsLibvirtGetParamsWithTimeout(timeout time.Duration) *V1CloudConfigsLibvirtGetParams { + var () + return &V1CloudConfigsLibvirtGetParams{ + + timeout: timeout, + } +} + +// NewV1CloudConfigsLibvirtGetParamsWithContext creates a new V1CloudConfigsLibvirtGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudConfigsLibvirtGetParamsWithContext(ctx context.Context) *V1CloudConfigsLibvirtGetParams { + var () + return &V1CloudConfigsLibvirtGetParams{ + + Context: ctx, + } +} + +// NewV1CloudConfigsLibvirtGetParamsWithHTTPClient creates a new V1CloudConfigsLibvirtGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudConfigsLibvirtGetParamsWithHTTPClient(client *http.Client) *V1CloudConfigsLibvirtGetParams { + var () + return &V1CloudConfigsLibvirtGetParams{ + HTTPClient: client, + } +} + +/* +V1CloudConfigsLibvirtGetParams contains all the parameters to send to the API endpoint +for the v1 cloud configs libvirt get operation typically these are written to a http.Request +*/ +type V1CloudConfigsLibvirtGetParams struct { + + /*ConfigUID + Cluster's cloud config uid + + */ + ConfigUID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud configs libvirt get params +func (o *V1CloudConfigsLibvirtGetParams) WithTimeout(timeout time.Duration) *V1CloudConfigsLibvirtGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud configs libvirt get params +func (o *V1CloudConfigsLibvirtGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud configs libvirt get params +func (o *V1CloudConfigsLibvirtGetParams) WithContext(ctx context.Context) *V1CloudConfigsLibvirtGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud configs libvirt get params +func (o *V1CloudConfigsLibvirtGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud configs libvirt get params +func (o *V1CloudConfigsLibvirtGetParams) WithHTTPClient(client *http.Client) *V1CloudConfigsLibvirtGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud configs libvirt get params +func (o *V1CloudConfigsLibvirtGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithConfigUID adds the configUID to the v1 cloud configs libvirt get params +func (o *V1CloudConfigsLibvirtGetParams) WithConfigUID(configUID string) *V1CloudConfigsLibvirtGetParams { + o.SetConfigUID(configUID) + return o +} + +// SetConfigUID adds the configUid to the v1 cloud configs libvirt get params +func (o *V1CloudConfigsLibvirtGetParams) SetConfigUID(configUID string) { + o.ConfigUID = configUID +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudConfigsLibvirtGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param configUid + if err := r.SetPathParam("configUid", o.ConfigUID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_configs_libvirt_get_responses.go b/api/client/v1/v1_cloud_configs_libvirt_get_responses.go new file mode 100644 index 00000000..0f9f73c4 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_libvirt_get_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1CloudConfigsLibvirtGetReader is a Reader for the V1CloudConfigsLibvirtGet structure. +type V1CloudConfigsLibvirtGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudConfigsLibvirtGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1CloudConfigsLibvirtGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudConfigsLibvirtGetOK creates a V1CloudConfigsLibvirtGetOK with default headers values +func NewV1CloudConfigsLibvirtGetOK() *V1CloudConfigsLibvirtGetOK { + return &V1CloudConfigsLibvirtGetOK{} +} + +/* +V1CloudConfigsLibvirtGetOK handles this case with default header values. + +OK +*/ +type V1CloudConfigsLibvirtGetOK struct { + Payload *models.V1LibvirtCloudConfig +} + +func (o *V1CloudConfigsLibvirtGetOK) Error() string { + return fmt.Sprintf("[GET /v1/cloudconfigs/libvirt/{configUid}][%d] v1CloudConfigsLibvirtGetOK %+v", 200, o.Payload) +} + +func (o *V1CloudConfigsLibvirtGetOK) GetPayload() *models.V1LibvirtCloudConfig { + return o.Payload +} + +func (o *V1CloudConfigsLibvirtGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1LibvirtCloudConfig) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_cloud_configs_libvirt_machine_pool_create_parameters.go b/api/client/v1/v1_cloud_configs_libvirt_machine_pool_create_parameters.go new file mode 100644 index 00000000..1413cdf1 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_libvirt_machine_pool_create_parameters.go @@ -0,0 +1,157 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1CloudConfigsLibvirtMachinePoolCreateParams creates a new V1CloudConfigsLibvirtMachinePoolCreateParams object +// with the default values initialized. +func NewV1CloudConfigsLibvirtMachinePoolCreateParams() *V1CloudConfigsLibvirtMachinePoolCreateParams { + var () + return &V1CloudConfigsLibvirtMachinePoolCreateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudConfigsLibvirtMachinePoolCreateParamsWithTimeout creates a new V1CloudConfigsLibvirtMachinePoolCreateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudConfigsLibvirtMachinePoolCreateParamsWithTimeout(timeout time.Duration) *V1CloudConfigsLibvirtMachinePoolCreateParams { + var () + return &V1CloudConfigsLibvirtMachinePoolCreateParams{ + + timeout: timeout, + } +} + +// NewV1CloudConfigsLibvirtMachinePoolCreateParamsWithContext creates a new V1CloudConfigsLibvirtMachinePoolCreateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudConfigsLibvirtMachinePoolCreateParamsWithContext(ctx context.Context) *V1CloudConfigsLibvirtMachinePoolCreateParams { + var () + return &V1CloudConfigsLibvirtMachinePoolCreateParams{ + + Context: ctx, + } +} + +// NewV1CloudConfigsLibvirtMachinePoolCreateParamsWithHTTPClient creates a new V1CloudConfigsLibvirtMachinePoolCreateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudConfigsLibvirtMachinePoolCreateParamsWithHTTPClient(client *http.Client) *V1CloudConfigsLibvirtMachinePoolCreateParams { + var () + return &V1CloudConfigsLibvirtMachinePoolCreateParams{ + HTTPClient: client, + } +} + +/* +V1CloudConfigsLibvirtMachinePoolCreateParams contains all the parameters to send to the API endpoint +for the v1 cloud configs libvirt machine pool create operation typically these are written to a http.Request +*/ +type V1CloudConfigsLibvirtMachinePoolCreateParams struct { + + /*Body*/ + Body *models.V1LibvirtMachinePoolConfigEntity + /*ConfigUID + Cluster's cloud config uid + + */ + ConfigUID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud configs libvirt machine pool create params +func (o *V1CloudConfigsLibvirtMachinePoolCreateParams) WithTimeout(timeout time.Duration) *V1CloudConfigsLibvirtMachinePoolCreateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud configs libvirt machine pool create params +func (o *V1CloudConfigsLibvirtMachinePoolCreateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud configs libvirt machine pool create params +func (o *V1CloudConfigsLibvirtMachinePoolCreateParams) WithContext(ctx context.Context) *V1CloudConfigsLibvirtMachinePoolCreateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud configs libvirt machine pool create params +func (o *V1CloudConfigsLibvirtMachinePoolCreateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud configs libvirt machine pool create params +func (o *V1CloudConfigsLibvirtMachinePoolCreateParams) WithHTTPClient(client *http.Client) *V1CloudConfigsLibvirtMachinePoolCreateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud configs libvirt machine pool create params +func (o *V1CloudConfigsLibvirtMachinePoolCreateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 cloud configs libvirt machine pool create params +func (o *V1CloudConfigsLibvirtMachinePoolCreateParams) WithBody(body *models.V1LibvirtMachinePoolConfigEntity) *V1CloudConfigsLibvirtMachinePoolCreateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 cloud configs libvirt machine pool create params +func (o *V1CloudConfigsLibvirtMachinePoolCreateParams) SetBody(body *models.V1LibvirtMachinePoolConfigEntity) { + o.Body = body +} + +// WithConfigUID adds the configUID to the v1 cloud configs libvirt machine pool create params +func (o *V1CloudConfigsLibvirtMachinePoolCreateParams) WithConfigUID(configUID string) *V1CloudConfigsLibvirtMachinePoolCreateParams { + o.SetConfigUID(configUID) + return o +} + +// SetConfigUID adds the configUid to the v1 cloud configs libvirt machine pool create params +func (o *V1CloudConfigsLibvirtMachinePoolCreateParams) SetConfigUID(configUID string) { + o.ConfigUID = configUID +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudConfigsLibvirtMachinePoolCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param configUid + if err := r.SetPathParam("configUid", o.ConfigUID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_configs_libvirt_machine_pool_create_responses.go b/api/client/v1/v1_cloud_configs_libvirt_machine_pool_create_responses.go new file mode 100644 index 00000000..60e7e0da --- /dev/null +++ b/api/client/v1/v1_cloud_configs_libvirt_machine_pool_create_responses.go @@ -0,0 +1,77 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1CloudConfigsLibvirtMachinePoolCreateReader is a Reader for the V1CloudConfigsLibvirtMachinePoolCreate structure. +type V1CloudConfigsLibvirtMachinePoolCreateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudConfigsLibvirtMachinePoolCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 201: + result := NewV1CloudConfigsLibvirtMachinePoolCreateCreated() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudConfigsLibvirtMachinePoolCreateCreated creates a V1CloudConfigsLibvirtMachinePoolCreateCreated with default headers values +func NewV1CloudConfigsLibvirtMachinePoolCreateCreated() *V1CloudConfigsLibvirtMachinePoolCreateCreated { + return &V1CloudConfigsLibvirtMachinePoolCreateCreated{} +} + +/* +V1CloudConfigsLibvirtMachinePoolCreateCreated handles this case with default header values. + +Created successfully +*/ +type V1CloudConfigsLibvirtMachinePoolCreateCreated struct { + /*Audit uid for the request + */ + AuditUID string + + Payload *models.V1UID +} + +func (o *V1CloudConfigsLibvirtMachinePoolCreateCreated) Error() string { + return fmt.Sprintf("[POST /v1/cloudconfigs/libvirt/{configUid}/machinePools][%d] v1CloudConfigsLibvirtMachinePoolCreateCreated %+v", 201, o.Payload) +} + +func (o *V1CloudConfigsLibvirtMachinePoolCreateCreated) GetPayload() *models.V1UID { + return o.Payload +} + +func (o *V1CloudConfigsLibvirtMachinePoolCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header AuditUid + o.AuditUID = response.GetHeader("AuditUid") + + o.Payload = new(models.V1UID) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_cloud_configs_libvirt_machine_pool_delete_parameters.go b/api/client/v1/v1_cloud_configs_libvirt_machine_pool_delete_parameters.go new file mode 100644 index 00000000..9924787c --- /dev/null +++ b/api/client/v1/v1_cloud_configs_libvirt_machine_pool_delete_parameters.go @@ -0,0 +1,157 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1CloudConfigsLibvirtMachinePoolDeleteParams creates a new V1CloudConfigsLibvirtMachinePoolDeleteParams object +// with the default values initialized. +func NewV1CloudConfigsLibvirtMachinePoolDeleteParams() *V1CloudConfigsLibvirtMachinePoolDeleteParams { + var () + return &V1CloudConfigsLibvirtMachinePoolDeleteParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudConfigsLibvirtMachinePoolDeleteParamsWithTimeout creates a new V1CloudConfigsLibvirtMachinePoolDeleteParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudConfigsLibvirtMachinePoolDeleteParamsWithTimeout(timeout time.Duration) *V1CloudConfigsLibvirtMachinePoolDeleteParams { + var () + return &V1CloudConfigsLibvirtMachinePoolDeleteParams{ + + timeout: timeout, + } +} + +// NewV1CloudConfigsLibvirtMachinePoolDeleteParamsWithContext creates a new V1CloudConfigsLibvirtMachinePoolDeleteParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudConfigsLibvirtMachinePoolDeleteParamsWithContext(ctx context.Context) *V1CloudConfigsLibvirtMachinePoolDeleteParams { + var () + return &V1CloudConfigsLibvirtMachinePoolDeleteParams{ + + Context: ctx, + } +} + +// NewV1CloudConfigsLibvirtMachinePoolDeleteParamsWithHTTPClient creates a new V1CloudConfigsLibvirtMachinePoolDeleteParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudConfigsLibvirtMachinePoolDeleteParamsWithHTTPClient(client *http.Client) *V1CloudConfigsLibvirtMachinePoolDeleteParams { + var () + return &V1CloudConfigsLibvirtMachinePoolDeleteParams{ + HTTPClient: client, + } +} + +/* +V1CloudConfigsLibvirtMachinePoolDeleteParams contains all the parameters to send to the API endpoint +for the v1 cloud configs libvirt machine pool delete operation typically these are written to a http.Request +*/ +type V1CloudConfigsLibvirtMachinePoolDeleteParams struct { + + /*ConfigUID + Cluster's cloud config uid + + */ + ConfigUID string + /*MachinePoolName + Machine pool name + + */ + MachinePoolName string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud configs libvirt machine pool delete params +func (o *V1CloudConfigsLibvirtMachinePoolDeleteParams) WithTimeout(timeout time.Duration) *V1CloudConfigsLibvirtMachinePoolDeleteParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud configs libvirt machine pool delete params +func (o *V1CloudConfigsLibvirtMachinePoolDeleteParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud configs libvirt machine pool delete params +func (o *V1CloudConfigsLibvirtMachinePoolDeleteParams) WithContext(ctx context.Context) *V1CloudConfigsLibvirtMachinePoolDeleteParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud configs libvirt machine pool delete params +func (o *V1CloudConfigsLibvirtMachinePoolDeleteParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud configs libvirt machine pool delete params +func (o *V1CloudConfigsLibvirtMachinePoolDeleteParams) WithHTTPClient(client *http.Client) *V1CloudConfigsLibvirtMachinePoolDeleteParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud configs libvirt machine pool delete params +func (o *V1CloudConfigsLibvirtMachinePoolDeleteParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithConfigUID adds the configUID to the v1 cloud configs libvirt machine pool delete params +func (o *V1CloudConfigsLibvirtMachinePoolDeleteParams) WithConfigUID(configUID string) *V1CloudConfigsLibvirtMachinePoolDeleteParams { + o.SetConfigUID(configUID) + return o +} + +// SetConfigUID adds the configUid to the v1 cloud configs libvirt machine pool delete params +func (o *V1CloudConfigsLibvirtMachinePoolDeleteParams) SetConfigUID(configUID string) { + o.ConfigUID = configUID +} + +// WithMachinePoolName adds the machinePoolName to the v1 cloud configs libvirt machine pool delete params +func (o *V1CloudConfigsLibvirtMachinePoolDeleteParams) WithMachinePoolName(machinePoolName string) *V1CloudConfigsLibvirtMachinePoolDeleteParams { + o.SetMachinePoolName(machinePoolName) + return o +} + +// SetMachinePoolName adds the machinePoolName to the v1 cloud configs libvirt machine pool delete params +func (o *V1CloudConfigsLibvirtMachinePoolDeleteParams) SetMachinePoolName(machinePoolName string) { + o.MachinePoolName = machinePoolName +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudConfigsLibvirtMachinePoolDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param configUid + if err := r.SetPathParam("configUid", o.ConfigUID); err != nil { + return err + } + + // path param machinePoolName + if err := r.SetPathParam("machinePoolName", o.MachinePoolName); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_configs_libvirt_machine_pool_delete_responses.go b/api/client/v1/v1_cloud_configs_libvirt_machine_pool_delete_responses.go new file mode 100644 index 00000000..728fdef5 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_libvirt_machine_pool_delete_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1CloudConfigsLibvirtMachinePoolDeleteReader is a Reader for the V1CloudConfigsLibvirtMachinePoolDelete structure. +type V1CloudConfigsLibvirtMachinePoolDeleteReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudConfigsLibvirtMachinePoolDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1CloudConfigsLibvirtMachinePoolDeleteNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudConfigsLibvirtMachinePoolDeleteNoContent creates a V1CloudConfigsLibvirtMachinePoolDeleteNoContent with default headers values +func NewV1CloudConfigsLibvirtMachinePoolDeleteNoContent() *V1CloudConfigsLibvirtMachinePoolDeleteNoContent { + return &V1CloudConfigsLibvirtMachinePoolDeleteNoContent{} +} + +/* +V1CloudConfigsLibvirtMachinePoolDeleteNoContent handles this case with default header values. + +The resource was deleted successfully +*/ +type V1CloudConfigsLibvirtMachinePoolDeleteNoContent struct { +} + +func (o *V1CloudConfigsLibvirtMachinePoolDeleteNoContent) Error() string { + return fmt.Sprintf("[DELETE /v1/cloudconfigs/libvirt/{configUid}/machinePools/{machinePoolName}][%d] v1CloudConfigsLibvirtMachinePoolDeleteNoContent ", 204) +} + +func (o *V1CloudConfigsLibvirtMachinePoolDeleteNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_cloud_configs_libvirt_machine_pool_update_parameters.go b/api/client/v1/v1_cloud_configs_libvirt_machine_pool_update_parameters.go new file mode 100644 index 00000000..f054a5ff --- /dev/null +++ b/api/client/v1/v1_cloud_configs_libvirt_machine_pool_update_parameters.go @@ -0,0 +1,178 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1CloudConfigsLibvirtMachinePoolUpdateParams creates a new V1CloudConfigsLibvirtMachinePoolUpdateParams object +// with the default values initialized. +func NewV1CloudConfigsLibvirtMachinePoolUpdateParams() *V1CloudConfigsLibvirtMachinePoolUpdateParams { + var () + return &V1CloudConfigsLibvirtMachinePoolUpdateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudConfigsLibvirtMachinePoolUpdateParamsWithTimeout creates a new V1CloudConfigsLibvirtMachinePoolUpdateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudConfigsLibvirtMachinePoolUpdateParamsWithTimeout(timeout time.Duration) *V1CloudConfigsLibvirtMachinePoolUpdateParams { + var () + return &V1CloudConfigsLibvirtMachinePoolUpdateParams{ + + timeout: timeout, + } +} + +// NewV1CloudConfigsLibvirtMachinePoolUpdateParamsWithContext creates a new V1CloudConfigsLibvirtMachinePoolUpdateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudConfigsLibvirtMachinePoolUpdateParamsWithContext(ctx context.Context) *V1CloudConfigsLibvirtMachinePoolUpdateParams { + var () + return &V1CloudConfigsLibvirtMachinePoolUpdateParams{ + + Context: ctx, + } +} + +// NewV1CloudConfigsLibvirtMachinePoolUpdateParamsWithHTTPClient creates a new V1CloudConfigsLibvirtMachinePoolUpdateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudConfigsLibvirtMachinePoolUpdateParamsWithHTTPClient(client *http.Client) *V1CloudConfigsLibvirtMachinePoolUpdateParams { + var () + return &V1CloudConfigsLibvirtMachinePoolUpdateParams{ + HTTPClient: client, + } +} + +/* +V1CloudConfigsLibvirtMachinePoolUpdateParams contains all the parameters to send to the API endpoint +for the v1 cloud configs libvirt machine pool update operation typically these are written to a http.Request +*/ +type V1CloudConfigsLibvirtMachinePoolUpdateParams struct { + + /*Body*/ + Body *models.V1LibvirtMachinePoolConfigEntity + /*ConfigUID + Cluster's cloud config uid + + */ + ConfigUID string + /*MachinePoolName + Machine pool name + + */ + MachinePoolName string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud configs libvirt machine pool update params +func (o *V1CloudConfigsLibvirtMachinePoolUpdateParams) WithTimeout(timeout time.Duration) *V1CloudConfigsLibvirtMachinePoolUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud configs libvirt machine pool update params +func (o *V1CloudConfigsLibvirtMachinePoolUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud configs libvirt machine pool update params +func (o *V1CloudConfigsLibvirtMachinePoolUpdateParams) WithContext(ctx context.Context) *V1CloudConfigsLibvirtMachinePoolUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud configs libvirt machine pool update params +func (o *V1CloudConfigsLibvirtMachinePoolUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud configs libvirt machine pool update params +func (o *V1CloudConfigsLibvirtMachinePoolUpdateParams) WithHTTPClient(client *http.Client) *V1CloudConfigsLibvirtMachinePoolUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud configs libvirt machine pool update params +func (o *V1CloudConfigsLibvirtMachinePoolUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 cloud configs libvirt machine pool update params +func (o *V1CloudConfigsLibvirtMachinePoolUpdateParams) WithBody(body *models.V1LibvirtMachinePoolConfigEntity) *V1CloudConfigsLibvirtMachinePoolUpdateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 cloud configs libvirt machine pool update params +func (o *V1CloudConfigsLibvirtMachinePoolUpdateParams) SetBody(body *models.V1LibvirtMachinePoolConfigEntity) { + o.Body = body +} + +// WithConfigUID adds the configUID to the v1 cloud configs libvirt machine pool update params +func (o *V1CloudConfigsLibvirtMachinePoolUpdateParams) WithConfigUID(configUID string) *V1CloudConfigsLibvirtMachinePoolUpdateParams { + o.SetConfigUID(configUID) + return o +} + +// SetConfigUID adds the configUid to the v1 cloud configs libvirt machine pool update params +func (o *V1CloudConfigsLibvirtMachinePoolUpdateParams) SetConfigUID(configUID string) { + o.ConfigUID = configUID +} + +// WithMachinePoolName adds the machinePoolName to the v1 cloud configs libvirt machine pool update params +func (o *V1CloudConfigsLibvirtMachinePoolUpdateParams) WithMachinePoolName(machinePoolName string) *V1CloudConfigsLibvirtMachinePoolUpdateParams { + o.SetMachinePoolName(machinePoolName) + return o +} + +// SetMachinePoolName adds the machinePoolName to the v1 cloud configs libvirt machine pool update params +func (o *V1CloudConfigsLibvirtMachinePoolUpdateParams) SetMachinePoolName(machinePoolName string) { + o.MachinePoolName = machinePoolName +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudConfigsLibvirtMachinePoolUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param configUid + if err := r.SetPathParam("configUid", o.ConfigUID); err != nil { + return err + } + + // path param machinePoolName + if err := r.SetPathParam("machinePoolName", o.MachinePoolName); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_configs_libvirt_machine_pool_update_responses.go b/api/client/v1/v1_cloud_configs_libvirt_machine_pool_update_responses.go new file mode 100644 index 00000000..4719eafe --- /dev/null +++ b/api/client/v1/v1_cloud_configs_libvirt_machine_pool_update_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1CloudConfigsLibvirtMachinePoolUpdateReader is a Reader for the V1CloudConfigsLibvirtMachinePoolUpdate structure. +type V1CloudConfigsLibvirtMachinePoolUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudConfigsLibvirtMachinePoolUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1CloudConfigsLibvirtMachinePoolUpdateNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudConfigsLibvirtMachinePoolUpdateNoContent creates a V1CloudConfigsLibvirtMachinePoolUpdateNoContent with default headers values +func NewV1CloudConfigsLibvirtMachinePoolUpdateNoContent() *V1CloudConfigsLibvirtMachinePoolUpdateNoContent { + return &V1CloudConfigsLibvirtMachinePoolUpdateNoContent{} +} + +/* +V1CloudConfigsLibvirtMachinePoolUpdateNoContent handles this case with default header values. + +The resource was updated successfully +*/ +type V1CloudConfigsLibvirtMachinePoolUpdateNoContent struct { +} + +func (o *V1CloudConfigsLibvirtMachinePoolUpdateNoContent) Error() string { + return fmt.Sprintf("[PUT /v1/cloudconfigs/libvirt/{configUid}/machinePools/{machinePoolName}][%d] v1CloudConfigsLibvirtMachinePoolUpdateNoContent ", 204) +} + +func (o *V1CloudConfigsLibvirtMachinePoolUpdateNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_cloud_configs_libvirt_pool_machines_add_parameters.go b/api/client/v1/v1_cloud_configs_libvirt_pool_machines_add_parameters.go new file mode 100644 index 00000000..43bb5dea --- /dev/null +++ b/api/client/v1/v1_cloud_configs_libvirt_pool_machines_add_parameters.go @@ -0,0 +1,178 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1CloudConfigsLibvirtPoolMachinesAddParams creates a new V1CloudConfigsLibvirtPoolMachinesAddParams object +// with the default values initialized. +func NewV1CloudConfigsLibvirtPoolMachinesAddParams() *V1CloudConfigsLibvirtPoolMachinesAddParams { + var () + return &V1CloudConfigsLibvirtPoolMachinesAddParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudConfigsLibvirtPoolMachinesAddParamsWithTimeout creates a new V1CloudConfigsLibvirtPoolMachinesAddParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudConfigsLibvirtPoolMachinesAddParamsWithTimeout(timeout time.Duration) *V1CloudConfigsLibvirtPoolMachinesAddParams { + var () + return &V1CloudConfigsLibvirtPoolMachinesAddParams{ + + timeout: timeout, + } +} + +// NewV1CloudConfigsLibvirtPoolMachinesAddParamsWithContext creates a new V1CloudConfigsLibvirtPoolMachinesAddParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudConfigsLibvirtPoolMachinesAddParamsWithContext(ctx context.Context) *V1CloudConfigsLibvirtPoolMachinesAddParams { + var () + return &V1CloudConfigsLibvirtPoolMachinesAddParams{ + + Context: ctx, + } +} + +// NewV1CloudConfigsLibvirtPoolMachinesAddParamsWithHTTPClient creates a new V1CloudConfigsLibvirtPoolMachinesAddParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudConfigsLibvirtPoolMachinesAddParamsWithHTTPClient(client *http.Client) *V1CloudConfigsLibvirtPoolMachinesAddParams { + var () + return &V1CloudConfigsLibvirtPoolMachinesAddParams{ + HTTPClient: client, + } +} + +/* +V1CloudConfigsLibvirtPoolMachinesAddParams contains all the parameters to send to the API endpoint +for the v1 cloud configs libvirt pool machines add operation typically these are written to a http.Request +*/ +type V1CloudConfigsLibvirtPoolMachinesAddParams struct { + + /*Body*/ + Body *models.V1LibvirtMachine + /*ConfigUID + Cluster's cloud config uid + + */ + ConfigUID string + /*MachinePoolName + Machine pool name + + */ + MachinePoolName string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud configs libvirt pool machines add params +func (o *V1CloudConfigsLibvirtPoolMachinesAddParams) WithTimeout(timeout time.Duration) *V1CloudConfigsLibvirtPoolMachinesAddParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud configs libvirt pool machines add params +func (o *V1CloudConfigsLibvirtPoolMachinesAddParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud configs libvirt pool machines add params +func (o *V1CloudConfigsLibvirtPoolMachinesAddParams) WithContext(ctx context.Context) *V1CloudConfigsLibvirtPoolMachinesAddParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud configs libvirt pool machines add params +func (o *V1CloudConfigsLibvirtPoolMachinesAddParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud configs libvirt pool machines add params +func (o *V1CloudConfigsLibvirtPoolMachinesAddParams) WithHTTPClient(client *http.Client) *V1CloudConfigsLibvirtPoolMachinesAddParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud configs libvirt pool machines add params +func (o *V1CloudConfigsLibvirtPoolMachinesAddParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 cloud configs libvirt pool machines add params +func (o *V1CloudConfigsLibvirtPoolMachinesAddParams) WithBody(body *models.V1LibvirtMachine) *V1CloudConfigsLibvirtPoolMachinesAddParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 cloud configs libvirt pool machines add params +func (o *V1CloudConfigsLibvirtPoolMachinesAddParams) SetBody(body *models.V1LibvirtMachine) { + o.Body = body +} + +// WithConfigUID adds the configUID to the v1 cloud configs libvirt pool machines add params +func (o *V1CloudConfigsLibvirtPoolMachinesAddParams) WithConfigUID(configUID string) *V1CloudConfigsLibvirtPoolMachinesAddParams { + o.SetConfigUID(configUID) + return o +} + +// SetConfigUID adds the configUid to the v1 cloud configs libvirt pool machines add params +func (o *V1CloudConfigsLibvirtPoolMachinesAddParams) SetConfigUID(configUID string) { + o.ConfigUID = configUID +} + +// WithMachinePoolName adds the machinePoolName to the v1 cloud configs libvirt pool machines add params +func (o *V1CloudConfigsLibvirtPoolMachinesAddParams) WithMachinePoolName(machinePoolName string) *V1CloudConfigsLibvirtPoolMachinesAddParams { + o.SetMachinePoolName(machinePoolName) + return o +} + +// SetMachinePoolName adds the machinePoolName to the v1 cloud configs libvirt pool machines add params +func (o *V1CloudConfigsLibvirtPoolMachinesAddParams) SetMachinePoolName(machinePoolName string) { + o.MachinePoolName = machinePoolName +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudConfigsLibvirtPoolMachinesAddParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param configUid + if err := r.SetPathParam("configUid", o.ConfigUID); err != nil { + return err + } + + // path param machinePoolName + if err := r.SetPathParam("machinePoolName", o.MachinePoolName); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_configs_libvirt_pool_machines_add_responses.go b/api/client/v1/v1_cloud_configs_libvirt_pool_machines_add_responses.go new file mode 100644 index 00000000..16e094d7 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_libvirt_pool_machines_add_responses.go @@ -0,0 +1,77 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1CloudConfigsLibvirtPoolMachinesAddReader is a Reader for the V1CloudConfigsLibvirtPoolMachinesAdd structure. +type V1CloudConfigsLibvirtPoolMachinesAddReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudConfigsLibvirtPoolMachinesAddReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 201: + result := NewV1CloudConfigsLibvirtPoolMachinesAddCreated() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudConfigsLibvirtPoolMachinesAddCreated creates a V1CloudConfigsLibvirtPoolMachinesAddCreated with default headers values +func NewV1CloudConfigsLibvirtPoolMachinesAddCreated() *V1CloudConfigsLibvirtPoolMachinesAddCreated { + return &V1CloudConfigsLibvirtPoolMachinesAddCreated{} +} + +/* +V1CloudConfigsLibvirtPoolMachinesAddCreated handles this case with default header values. + +Created successfully +*/ +type V1CloudConfigsLibvirtPoolMachinesAddCreated struct { + /*Audit uid for the request + */ + AuditUID string + + Payload *models.V1UID +} + +func (o *V1CloudConfigsLibvirtPoolMachinesAddCreated) Error() string { + return fmt.Sprintf("[POST /v1/cloudconfigs/libvirt/{configUid}/machinePools/{machinePoolName}/machines][%d] v1CloudConfigsLibvirtPoolMachinesAddCreated %+v", 201, o.Payload) +} + +func (o *V1CloudConfigsLibvirtPoolMachinesAddCreated) GetPayload() *models.V1UID { + return o.Payload +} + +func (o *V1CloudConfigsLibvirtPoolMachinesAddCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header AuditUid + o.AuditUID = response.GetHeader("AuditUid") + + o.Payload = new(models.V1UID) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_cloud_configs_libvirt_pool_machines_list_parameters.go b/api/client/v1/v1_cloud_configs_libvirt_pool_machines_list_parameters.go new file mode 100644 index 00000000..938baed2 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_libvirt_pool_machines_list_parameters.go @@ -0,0 +1,157 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1CloudConfigsLibvirtPoolMachinesListParams creates a new V1CloudConfigsLibvirtPoolMachinesListParams object +// with the default values initialized. +func NewV1CloudConfigsLibvirtPoolMachinesListParams() *V1CloudConfigsLibvirtPoolMachinesListParams { + var () + return &V1CloudConfigsLibvirtPoolMachinesListParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudConfigsLibvirtPoolMachinesListParamsWithTimeout creates a new V1CloudConfigsLibvirtPoolMachinesListParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudConfigsLibvirtPoolMachinesListParamsWithTimeout(timeout time.Duration) *V1CloudConfigsLibvirtPoolMachinesListParams { + var () + return &V1CloudConfigsLibvirtPoolMachinesListParams{ + + timeout: timeout, + } +} + +// NewV1CloudConfigsLibvirtPoolMachinesListParamsWithContext creates a new V1CloudConfigsLibvirtPoolMachinesListParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudConfigsLibvirtPoolMachinesListParamsWithContext(ctx context.Context) *V1CloudConfigsLibvirtPoolMachinesListParams { + var () + return &V1CloudConfigsLibvirtPoolMachinesListParams{ + + Context: ctx, + } +} + +// NewV1CloudConfigsLibvirtPoolMachinesListParamsWithHTTPClient creates a new V1CloudConfigsLibvirtPoolMachinesListParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudConfigsLibvirtPoolMachinesListParamsWithHTTPClient(client *http.Client) *V1CloudConfigsLibvirtPoolMachinesListParams { + var () + return &V1CloudConfigsLibvirtPoolMachinesListParams{ + HTTPClient: client, + } +} + +/* +V1CloudConfigsLibvirtPoolMachinesListParams contains all the parameters to send to the API endpoint +for the v1 cloud configs libvirt pool machines list operation typically these are written to a http.Request +*/ +type V1CloudConfigsLibvirtPoolMachinesListParams struct { + + /*ConfigUID + Cluster's cloud config uid + + */ + ConfigUID string + /*MachinePoolName + Machine pool name + + */ + MachinePoolName string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud configs libvirt pool machines list params +func (o *V1CloudConfigsLibvirtPoolMachinesListParams) WithTimeout(timeout time.Duration) *V1CloudConfigsLibvirtPoolMachinesListParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud configs libvirt pool machines list params +func (o *V1CloudConfigsLibvirtPoolMachinesListParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud configs libvirt pool machines list params +func (o *V1CloudConfigsLibvirtPoolMachinesListParams) WithContext(ctx context.Context) *V1CloudConfigsLibvirtPoolMachinesListParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud configs libvirt pool machines list params +func (o *V1CloudConfigsLibvirtPoolMachinesListParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud configs libvirt pool machines list params +func (o *V1CloudConfigsLibvirtPoolMachinesListParams) WithHTTPClient(client *http.Client) *V1CloudConfigsLibvirtPoolMachinesListParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud configs libvirt pool machines list params +func (o *V1CloudConfigsLibvirtPoolMachinesListParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithConfigUID adds the configUID to the v1 cloud configs libvirt pool machines list params +func (o *V1CloudConfigsLibvirtPoolMachinesListParams) WithConfigUID(configUID string) *V1CloudConfigsLibvirtPoolMachinesListParams { + o.SetConfigUID(configUID) + return o +} + +// SetConfigUID adds the configUid to the v1 cloud configs libvirt pool machines list params +func (o *V1CloudConfigsLibvirtPoolMachinesListParams) SetConfigUID(configUID string) { + o.ConfigUID = configUID +} + +// WithMachinePoolName adds the machinePoolName to the v1 cloud configs libvirt pool machines list params +func (o *V1CloudConfigsLibvirtPoolMachinesListParams) WithMachinePoolName(machinePoolName string) *V1CloudConfigsLibvirtPoolMachinesListParams { + o.SetMachinePoolName(machinePoolName) + return o +} + +// SetMachinePoolName adds the machinePoolName to the v1 cloud configs libvirt pool machines list params +func (o *V1CloudConfigsLibvirtPoolMachinesListParams) SetMachinePoolName(machinePoolName string) { + o.MachinePoolName = machinePoolName +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudConfigsLibvirtPoolMachinesListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param configUid + if err := r.SetPathParam("configUid", o.ConfigUID); err != nil { + return err + } + + // path param machinePoolName + if err := r.SetPathParam("machinePoolName", o.MachinePoolName); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_configs_libvirt_pool_machines_list_responses.go b/api/client/v1/v1_cloud_configs_libvirt_pool_machines_list_responses.go new file mode 100644 index 00000000..8b7580db --- /dev/null +++ b/api/client/v1/v1_cloud_configs_libvirt_pool_machines_list_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1CloudConfigsLibvirtPoolMachinesListReader is a Reader for the V1CloudConfigsLibvirtPoolMachinesList structure. +type V1CloudConfigsLibvirtPoolMachinesListReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudConfigsLibvirtPoolMachinesListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1CloudConfigsLibvirtPoolMachinesListOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudConfigsLibvirtPoolMachinesListOK creates a V1CloudConfigsLibvirtPoolMachinesListOK with default headers values +func NewV1CloudConfigsLibvirtPoolMachinesListOK() *V1CloudConfigsLibvirtPoolMachinesListOK { + return &V1CloudConfigsLibvirtPoolMachinesListOK{} +} + +/* +V1CloudConfigsLibvirtPoolMachinesListOK handles this case with default header values. + +An array of Libvirt machine items +*/ +type V1CloudConfigsLibvirtPoolMachinesListOK struct { + Payload *models.V1LibvirtMachines +} + +func (o *V1CloudConfigsLibvirtPoolMachinesListOK) Error() string { + return fmt.Sprintf("[GET /v1/cloudconfigs/libvirt/{configUid}/machinePools/{machinePoolName}/machines][%d] v1CloudConfigsLibvirtPoolMachinesListOK %+v", 200, o.Payload) +} + +func (o *V1CloudConfigsLibvirtPoolMachinesListOK) GetPayload() *models.V1LibvirtMachines { + return o.Payload +} + +func (o *V1CloudConfigsLibvirtPoolMachinesListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1LibvirtMachines) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_cloud_configs_libvirt_pool_machines_uid_delete_parameters.go b/api/client/v1/v1_cloud_configs_libvirt_pool_machines_uid_delete_parameters.go new file mode 100644 index 00000000..e289b2c3 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_libvirt_pool_machines_uid_delete_parameters.go @@ -0,0 +1,178 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1CloudConfigsLibvirtPoolMachinesUIDDeleteParams creates a new V1CloudConfigsLibvirtPoolMachinesUIDDeleteParams object +// with the default values initialized. +func NewV1CloudConfigsLibvirtPoolMachinesUIDDeleteParams() *V1CloudConfigsLibvirtPoolMachinesUIDDeleteParams { + var () + return &V1CloudConfigsLibvirtPoolMachinesUIDDeleteParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudConfigsLibvirtPoolMachinesUIDDeleteParamsWithTimeout creates a new V1CloudConfigsLibvirtPoolMachinesUIDDeleteParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudConfigsLibvirtPoolMachinesUIDDeleteParamsWithTimeout(timeout time.Duration) *V1CloudConfigsLibvirtPoolMachinesUIDDeleteParams { + var () + return &V1CloudConfigsLibvirtPoolMachinesUIDDeleteParams{ + + timeout: timeout, + } +} + +// NewV1CloudConfigsLibvirtPoolMachinesUIDDeleteParamsWithContext creates a new V1CloudConfigsLibvirtPoolMachinesUIDDeleteParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudConfigsLibvirtPoolMachinesUIDDeleteParamsWithContext(ctx context.Context) *V1CloudConfigsLibvirtPoolMachinesUIDDeleteParams { + var () + return &V1CloudConfigsLibvirtPoolMachinesUIDDeleteParams{ + + Context: ctx, + } +} + +// NewV1CloudConfigsLibvirtPoolMachinesUIDDeleteParamsWithHTTPClient creates a new V1CloudConfigsLibvirtPoolMachinesUIDDeleteParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudConfigsLibvirtPoolMachinesUIDDeleteParamsWithHTTPClient(client *http.Client) *V1CloudConfigsLibvirtPoolMachinesUIDDeleteParams { + var () + return &V1CloudConfigsLibvirtPoolMachinesUIDDeleteParams{ + HTTPClient: client, + } +} + +/* +V1CloudConfigsLibvirtPoolMachinesUIDDeleteParams contains all the parameters to send to the API endpoint +for the v1 cloud configs libvirt pool machines Uid delete operation typically these are written to a http.Request +*/ +type V1CloudConfigsLibvirtPoolMachinesUIDDeleteParams struct { + + /*ConfigUID + Cluster's cloud config uid + + */ + ConfigUID string + /*MachinePoolName + Machine pool name + + */ + MachinePoolName string + /*MachineUID + Machine uid + + */ + MachineUID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud configs libvirt pool machines Uid delete params +func (o *V1CloudConfigsLibvirtPoolMachinesUIDDeleteParams) WithTimeout(timeout time.Duration) *V1CloudConfigsLibvirtPoolMachinesUIDDeleteParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud configs libvirt pool machines Uid delete params +func (o *V1CloudConfigsLibvirtPoolMachinesUIDDeleteParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud configs libvirt pool machines Uid delete params +func (o *V1CloudConfigsLibvirtPoolMachinesUIDDeleteParams) WithContext(ctx context.Context) *V1CloudConfigsLibvirtPoolMachinesUIDDeleteParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud configs libvirt pool machines Uid delete params +func (o *V1CloudConfigsLibvirtPoolMachinesUIDDeleteParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud configs libvirt pool machines Uid delete params +func (o *V1CloudConfigsLibvirtPoolMachinesUIDDeleteParams) WithHTTPClient(client *http.Client) *V1CloudConfigsLibvirtPoolMachinesUIDDeleteParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud configs libvirt pool machines Uid delete params +func (o *V1CloudConfigsLibvirtPoolMachinesUIDDeleteParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithConfigUID adds the configUID to the v1 cloud configs libvirt pool machines Uid delete params +func (o *V1CloudConfigsLibvirtPoolMachinesUIDDeleteParams) WithConfigUID(configUID string) *V1CloudConfigsLibvirtPoolMachinesUIDDeleteParams { + o.SetConfigUID(configUID) + return o +} + +// SetConfigUID adds the configUid to the v1 cloud configs libvirt pool machines Uid delete params +func (o *V1CloudConfigsLibvirtPoolMachinesUIDDeleteParams) SetConfigUID(configUID string) { + o.ConfigUID = configUID +} + +// WithMachinePoolName adds the machinePoolName to the v1 cloud configs libvirt pool machines Uid delete params +func (o *V1CloudConfigsLibvirtPoolMachinesUIDDeleteParams) WithMachinePoolName(machinePoolName string) *V1CloudConfigsLibvirtPoolMachinesUIDDeleteParams { + o.SetMachinePoolName(machinePoolName) + return o +} + +// SetMachinePoolName adds the machinePoolName to the v1 cloud configs libvirt pool machines Uid delete params +func (o *V1CloudConfigsLibvirtPoolMachinesUIDDeleteParams) SetMachinePoolName(machinePoolName string) { + o.MachinePoolName = machinePoolName +} + +// WithMachineUID adds the machineUID to the v1 cloud configs libvirt pool machines Uid delete params +func (o *V1CloudConfigsLibvirtPoolMachinesUIDDeleteParams) WithMachineUID(machineUID string) *V1CloudConfigsLibvirtPoolMachinesUIDDeleteParams { + o.SetMachineUID(machineUID) + return o +} + +// SetMachineUID adds the machineUid to the v1 cloud configs libvirt pool machines Uid delete params +func (o *V1CloudConfigsLibvirtPoolMachinesUIDDeleteParams) SetMachineUID(machineUID string) { + o.MachineUID = machineUID +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudConfigsLibvirtPoolMachinesUIDDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param configUid + if err := r.SetPathParam("configUid", o.ConfigUID); err != nil { + return err + } + + // path param machinePoolName + if err := r.SetPathParam("machinePoolName", o.MachinePoolName); err != nil { + return err + } + + // path param machineUid + if err := r.SetPathParam("machineUid", o.MachineUID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_configs_libvirt_pool_machines_uid_delete_responses.go b/api/client/v1/v1_cloud_configs_libvirt_pool_machines_uid_delete_responses.go new file mode 100644 index 00000000..fc33b0ee --- /dev/null +++ b/api/client/v1/v1_cloud_configs_libvirt_pool_machines_uid_delete_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1CloudConfigsLibvirtPoolMachinesUIDDeleteReader is a Reader for the V1CloudConfigsLibvirtPoolMachinesUIDDelete structure. +type V1CloudConfigsLibvirtPoolMachinesUIDDeleteReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudConfigsLibvirtPoolMachinesUIDDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1CloudConfigsLibvirtPoolMachinesUIDDeleteNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudConfigsLibvirtPoolMachinesUIDDeleteNoContent creates a V1CloudConfigsLibvirtPoolMachinesUIDDeleteNoContent with default headers values +func NewV1CloudConfigsLibvirtPoolMachinesUIDDeleteNoContent() *V1CloudConfigsLibvirtPoolMachinesUIDDeleteNoContent { + return &V1CloudConfigsLibvirtPoolMachinesUIDDeleteNoContent{} +} + +/* +V1CloudConfigsLibvirtPoolMachinesUIDDeleteNoContent handles this case with default header values. + +The resource was deleted successfully +*/ +type V1CloudConfigsLibvirtPoolMachinesUIDDeleteNoContent struct { +} + +func (o *V1CloudConfigsLibvirtPoolMachinesUIDDeleteNoContent) Error() string { + return fmt.Sprintf("[DELETE /v1/cloudconfigs/libvirt/{configUid}/machinePools/{machinePoolName}/machines/{machineUid}][%d] v1CloudConfigsLibvirtPoolMachinesUidDeleteNoContent ", 204) +} + +func (o *V1CloudConfigsLibvirtPoolMachinesUIDDeleteNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_cloud_configs_libvirt_pool_machines_uid_get_parameters.go b/api/client/v1/v1_cloud_configs_libvirt_pool_machines_uid_get_parameters.go new file mode 100644 index 00000000..f10152f6 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_libvirt_pool_machines_uid_get_parameters.go @@ -0,0 +1,178 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1CloudConfigsLibvirtPoolMachinesUIDGetParams creates a new V1CloudConfigsLibvirtPoolMachinesUIDGetParams object +// with the default values initialized. +func NewV1CloudConfigsLibvirtPoolMachinesUIDGetParams() *V1CloudConfigsLibvirtPoolMachinesUIDGetParams { + var () + return &V1CloudConfigsLibvirtPoolMachinesUIDGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudConfigsLibvirtPoolMachinesUIDGetParamsWithTimeout creates a new V1CloudConfigsLibvirtPoolMachinesUIDGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudConfigsLibvirtPoolMachinesUIDGetParamsWithTimeout(timeout time.Duration) *V1CloudConfigsLibvirtPoolMachinesUIDGetParams { + var () + return &V1CloudConfigsLibvirtPoolMachinesUIDGetParams{ + + timeout: timeout, + } +} + +// NewV1CloudConfigsLibvirtPoolMachinesUIDGetParamsWithContext creates a new V1CloudConfigsLibvirtPoolMachinesUIDGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudConfigsLibvirtPoolMachinesUIDGetParamsWithContext(ctx context.Context) *V1CloudConfigsLibvirtPoolMachinesUIDGetParams { + var () + return &V1CloudConfigsLibvirtPoolMachinesUIDGetParams{ + + Context: ctx, + } +} + +// NewV1CloudConfigsLibvirtPoolMachinesUIDGetParamsWithHTTPClient creates a new V1CloudConfigsLibvirtPoolMachinesUIDGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudConfigsLibvirtPoolMachinesUIDGetParamsWithHTTPClient(client *http.Client) *V1CloudConfigsLibvirtPoolMachinesUIDGetParams { + var () + return &V1CloudConfigsLibvirtPoolMachinesUIDGetParams{ + HTTPClient: client, + } +} + +/* +V1CloudConfigsLibvirtPoolMachinesUIDGetParams contains all the parameters to send to the API endpoint +for the v1 cloud configs libvirt pool machines Uid get operation typically these are written to a http.Request +*/ +type V1CloudConfigsLibvirtPoolMachinesUIDGetParams struct { + + /*ConfigUID + Cluster's cloud config uid + + */ + ConfigUID string + /*MachinePoolName + Machine pool name + + */ + MachinePoolName string + /*MachineUID + Machine uid + + */ + MachineUID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud configs libvirt pool machines Uid get params +func (o *V1CloudConfigsLibvirtPoolMachinesUIDGetParams) WithTimeout(timeout time.Duration) *V1CloudConfigsLibvirtPoolMachinesUIDGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud configs libvirt pool machines Uid get params +func (o *V1CloudConfigsLibvirtPoolMachinesUIDGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud configs libvirt pool machines Uid get params +func (o *V1CloudConfigsLibvirtPoolMachinesUIDGetParams) WithContext(ctx context.Context) *V1CloudConfigsLibvirtPoolMachinesUIDGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud configs libvirt pool machines Uid get params +func (o *V1CloudConfigsLibvirtPoolMachinesUIDGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud configs libvirt pool machines Uid get params +func (o *V1CloudConfigsLibvirtPoolMachinesUIDGetParams) WithHTTPClient(client *http.Client) *V1CloudConfigsLibvirtPoolMachinesUIDGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud configs libvirt pool machines Uid get params +func (o *V1CloudConfigsLibvirtPoolMachinesUIDGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithConfigUID adds the configUID to the v1 cloud configs libvirt pool machines Uid get params +func (o *V1CloudConfigsLibvirtPoolMachinesUIDGetParams) WithConfigUID(configUID string) *V1CloudConfigsLibvirtPoolMachinesUIDGetParams { + o.SetConfigUID(configUID) + return o +} + +// SetConfigUID adds the configUid to the v1 cloud configs libvirt pool machines Uid get params +func (o *V1CloudConfigsLibvirtPoolMachinesUIDGetParams) SetConfigUID(configUID string) { + o.ConfigUID = configUID +} + +// WithMachinePoolName adds the machinePoolName to the v1 cloud configs libvirt pool machines Uid get params +func (o *V1CloudConfigsLibvirtPoolMachinesUIDGetParams) WithMachinePoolName(machinePoolName string) *V1CloudConfigsLibvirtPoolMachinesUIDGetParams { + o.SetMachinePoolName(machinePoolName) + return o +} + +// SetMachinePoolName adds the machinePoolName to the v1 cloud configs libvirt pool machines Uid get params +func (o *V1CloudConfigsLibvirtPoolMachinesUIDGetParams) SetMachinePoolName(machinePoolName string) { + o.MachinePoolName = machinePoolName +} + +// WithMachineUID adds the machineUID to the v1 cloud configs libvirt pool machines Uid get params +func (o *V1CloudConfigsLibvirtPoolMachinesUIDGetParams) WithMachineUID(machineUID string) *V1CloudConfigsLibvirtPoolMachinesUIDGetParams { + o.SetMachineUID(machineUID) + return o +} + +// SetMachineUID adds the machineUid to the v1 cloud configs libvirt pool machines Uid get params +func (o *V1CloudConfigsLibvirtPoolMachinesUIDGetParams) SetMachineUID(machineUID string) { + o.MachineUID = machineUID +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudConfigsLibvirtPoolMachinesUIDGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param configUid + if err := r.SetPathParam("configUid", o.ConfigUID); err != nil { + return err + } + + // path param machinePoolName + if err := r.SetPathParam("machinePoolName", o.MachinePoolName); err != nil { + return err + } + + // path param machineUid + if err := r.SetPathParam("machineUid", o.MachineUID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_configs_libvirt_pool_machines_uid_get_responses.go b/api/client/v1/v1_cloud_configs_libvirt_pool_machines_uid_get_responses.go new file mode 100644 index 00000000..f8299279 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_libvirt_pool_machines_uid_get_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1CloudConfigsLibvirtPoolMachinesUIDGetReader is a Reader for the V1CloudConfigsLibvirtPoolMachinesUIDGet structure. +type V1CloudConfigsLibvirtPoolMachinesUIDGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudConfigsLibvirtPoolMachinesUIDGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1CloudConfigsLibvirtPoolMachinesUIDGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudConfigsLibvirtPoolMachinesUIDGetOK creates a V1CloudConfigsLibvirtPoolMachinesUIDGetOK with default headers values +func NewV1CloudConfigsLibvirtPoolMachinesUIDGetOK() *V1CloudConfigsLibvirtPoolMachinesUIDGetOK { + return &V1CloudConfigsLibvirtPoolMachinesUIDGetOK{} +} + +/* +V1CloudConfigsLibvirtPoolMachinesUIDGetOK handles this case with default header values. + +OK +*/ +type V1CloudConfigsLibvirtPoolMachinesUIDGetOK struct { + Payload *models.V1LibvirtMachine +} + +func (o *V1CloudConfigsLibvirtPoolMachinesUIDGetOK) Error() string { + return fmt.Sprintf("[GET /v1/cloudconfigs/libvirt/{configUid}/machinePools/{machinePoolName}/machines/{machineUid}][%d] v1CloudConfigsLibvirtPoolMachinesUidGetOK %+v", 200, o.Payload) +} + +func (o *V1CloudConfigsLibvirtPoolMachinesUIDGetOK) GetPayload() *models.V1LibvirtMachine { + return o.Payload +} + +func (o *V1CloudConfigsLibvirtPoolMachinesUIDGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1LibvirtMachine) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_cloud_configs_libvirt_pool_machines_uid_update_parameters.go b/api/client/v1/v1_cloud_configs_libvirt_pool_machines_uid_update_parameters.go new file mode 100644 index 00000000..c2fdb6c0 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_libvirt_pool_machines_uid_update_parameters.go @@ -0,0 +1,199 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1CloudConfigsLibvirtPoolMachinesUIDUpdateParams creates a new V1CloudConfigsLibvirtPoolMachinesUIDUpdateParams object +// with the default values initialized. +func NewV1CloudConfigsLibvirtPoolMachinesUIDUpdateParams() *V1CloudConfigsLibvirtPoolMachinesUIDUpdateParams { + var () + return &V1CloudConfigsLibvirtPoolMachinesUIDUpdateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudConfigsLibvirtPoolMachinesUIDUpdateParamsWithTimeout creates a new V1CloudConfigsLibvirtPoolMachinesUIDUpdateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudConfigsLibvirtPoolMachinesUIDUpdateParamsWithTimeout(timeout time.Duration) *V1CloudConfigsLibvirtPoolMachinesUIDUpdateParams { + var () + return &V1CloudConfigsLibvirtPoolMachinesUIDUpdateParams{ + + timeout: timeout, + } +} + +// NewV1CloudConfigsLibvirtPoolMachinesUIDUpdateParamsWithContext creates a new V1CloudConfigsLibvirtPoolMachinesUIDUpdateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudConfigsLibvirtPoolMachinesUIDUpdateParamsWithContext(ctx context.Context) *V1CloudConfigsLibvirtPoolMachinesUIDUpdateParams { + var () + return &V1CloudConfigsLibvirtPoolMachinesUIDUpdateParams{ + + Context: ctx, + } +} + +// NewV1CloudConfigsLibvirtPoolMachinesUIDUpdateParamsWithHTTPClient creates a new V1CloudConfigsLibvirtPoolMachinesUIDUpdateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudConfigsLibvirtPoolMachinesUIDUpdateParamsWithHTTPClient(client *http.Client) *V1CloudConfigsLibvirtPoolMachinesUIDUpdateParams { + var () + return &V1CloudConfigsLibvirtPoolMachinesUIDUpdateParams{ + HTTPClient: client, + } +} + +/* +V1CloudConfigsLibvirtPoolMachinesUIDUpdateParams contains all the parameters to send to the API endpoint +for the v1 cloud configs libvirt pool machines Uid update operation typically these are written to a http.Request +*/ +type V1CloudConfigsLibvirtPoolMachinesUIDUpdateParams struct { + + /*Body*/ + Body *models.V1LibvirtMachine + /*ConfigUID + Cluster's cloud config uid + + */ + ConfigUID string + /*MachinePoolName + Machine pool name + + */ + MachinePoolName string + /*MachineUID + Machine uid + + */ + MachineUID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud configs libvirt pool machines Uid update params +func (o *V1CloudConfigsLibvirtPoolMachinesUIDUpdateParams) WithTimeout(timeout time.Duration) *V1CloudConfigsLibvirtPoolMachinesUIDUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud configs libvirt pool machines Uid update params +func (o *V1CloudConfigsLibvirtPoolMachinesUIDUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud configs libvirt pool machines Uid update params +func (o *V1CloudConfigsLibvirtPoolMachinesUIDUpdateParams) WithContext(ctx context.Context) *V1CloudConfigsLibvirtPoolMachinesUIDUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud configs libvirt pool machines Uid update params +func (o *V1CloudConfigsLibvirtPoolMachinesUIDUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud configs libvirt pool machines Uid update params +func (o *V1CloudConfigsLibvirtPoolMachinesUIDUpdateParams) WithHTTPClient(client *http.Client) *V1CloudConfigsLibvirtPoolMachinesUIDUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud configs libvirt pool machines Uid update params +func (o *V1CloudConfigsLibvirtPoolMachinesUIDUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 cloud configs libvirt pool machines Uid update params +func (o *V1CloudConfigsLibvirtPoolMachinesUIDUpdateParams) WithBody(body *models.V1LibvirtMachine) *V1CloudConfigsLibvirtPoolMachinesUIDUpdateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 cloud configs libvirt pool machines Uid update params +func (o *V1CloudConfigsLibvirtPoolMachinesUIDUpdateParams) SetBody(body *models.V1LibvirtMachine) { + o.Body = body +} + +// WithConfigUID adds the configUID to the v1 cloud configs libvirt pool machines Uid update params +func (o *V1CloudConfigsLibvirtPoolMachinesUIDUpdateParams) WithConfigUID(configUID string) *V1CloudConfigsLibvirtPoolMachinesUIDUpdateParams { + o.SetConfigUID(configUID) + return o +} + +// SetConfigUID adds the configUid to the v1 cloud configs libvirt pool machines Uid update params +func (o *V1CloudConfigsLibvirtPoolMachinesUIDUpdateParams) SetConfigUID(configUID string) { + o.ConfigUID = configUID +} + +// WithMachinePoolName adds the machinePoolName to the v1 cloud configs libvirt pool machines Uid update params +func (o *V1CloudConfigsLibvirtPoolMachinesUIDUpdateParams) WithMachinePoolName(machinePoolName string) *V1CloudConfigsLibvirtPoolMachinesUIDUpdateParams { + o.SetMachinePoolName(machinePoolName) + return o +} + +// SetMachinePoolName adds the machinePoolName to the v1 cloud configs libvirt pool machines Uid update params +func (o *V1CloudConfigsLibvirtPoolMachinesUIDUpdateParams) SetMachinePoolName(machinePoolName string) { + o.MachinePoolName = machinePoolName +} + +// WithMachineUID adds the machineUID to the v1 cloud configs libvirt pool machines Uid update params +func (o *V1CloudConfigsLibvirtPoolMachinesUIDUpdateParams) WithMachineUID(machineUID string) *V1CloudConfigsLibvirtPoolMachinesUIDUpdateParams { + o.SetMachineUID(machineUID) + return o +} + +// SetMachineUID adds the machineUid to the v1 cloud configs libvirt pool machines Uid update params +func (o *V1CloudConfigsLibvirtPoolMachinesUIDUpdateParams) SetMachineUID(machineUID string) { + o.MachineUID = machineUID +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudConfigsLibvirtPoolMachinesUIDUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param configUid + if err := r.SetPathParam("configUid", o.ConfigUID); err != nil { + return err + } + + // path param machinePoolName + if err := r.SetPathParam("machinePoolName", o.MachinePoolName); err != nil { + return err + } + + // path param machineUid + if err := r.SetPathParam("machineUid", o.MachineUID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_configs_libvirt_pool_machines_uid_update_responses.go b/api/client/v1/v1_cloud_configs_libvirt_pool_machines_uid_update_responses.go new file mode 100644 index 00000000..ad2d5b70 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_libvirt_pool_machines_uid_update_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1CloudConfigsLibvirtPoolMachinesUIDUpdateReader is a Reader for the V1CloudConfigsLibvirtPoolMachinesUIDUpdate structure. +type V1CloudConfigsLibvirtPoolMachinesUIDUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudConfigsLibvirtPoolMachinesUIDUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1CloudConfigsLibvirtPoolMachinesUIDUpdateNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudConfigsLibvirtPoolMachinesUIDUpdateNoContent creates a V1CloudConfigsLibvirtPoolMachinesUIDUpdateNoContent with default headers values +func NewV1CloudConfigsLibvirtPoolMachinesUIDUpdateNoContent() *V1CloudConfigsLibvirtPoolMachinesUIDUpdateNoContent { + return &V1CloudConfigsLibvirtPoolMachinesUIDUpdateNoContent{} +} + +/* +V1CloudConfigsLibvirtPoolMachinesUIDUpdateNoContent handles this case with default header values. + +The resource was updated successfully +*/ +type V1CloudConfigsLibvirtPoolMachinesUIDUpdateNoContent struct { +} + +func (o *V1CloudConfigsLibvirtPoolMachinesUIDUpdateNoContent) Error() string { + return fmt.Sprintf("[PUT /v1/cloudconfigs/libvirt/{configUid}/machinePools/{machinePoolName}/machines/{machineUid}][%d] v1CloudConfigsLibvirtPoolMachinesUidUpdateNoContent ", 204) +} + +func (o *V1CloudConfigsLibvirtPoolMachinesUIDUpdateNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_cloud_configs_libvirt_uid_cluster_config_parameters.go b/api/client/v1/v1_cloud_configs_libvirt_uid_cluster_config_parameters.go new file mode 100644 index 00000000..40b006f3 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_libvirt_uid_cluster_config_parameters.go @@ -0,0 +1,157 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1CloudConfigsLibvirtUIDClusterConfigParams creates a new V1CloudConfigsLibvirtUIDClusterConfigParams object +// with the default values initialized. +func NewV1CloudConfigsLibvirtUIDClusterConfigParams() *V1CloudConfigsLibvirtUIDClusterConfigParams { + var () + return &V1CloudConfigsLibvirtUIDClusterConfigParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudConfigsLibvirtUIDClusterConfigParamsWithTimeout creates a new V1CloudConfigsLibvirtUIDClusterConfigParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudConfigsLibvirtUIDClusterConfigParamsWithTimeout(timeout time.Duration) *V1CloudConfigsLibvirtUIDClusterConfigParams { + var () + return &V1CloudConfigsLibvirtUIDClusterConfigParams{ + + timeout: timeout, + } +} + +// NewV1CloudConfigsLibvirtUIDClusterConfigParamsWithContext creates a new V1CloudConfigsLibvirtUIDClusterConfigParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudConfigsLibvirtUIDClusterConfigParamsWithContext(ctx context.Context) *V1CloudConfigsLibvirtUIDClusterConfigParams { + var () + return &V1CloudConfigsLibvirtUIDClusterConfigParams{ + + Context: ctx, + } +} + +// NewV1CloudConfigsLibvirtUIDClusterConfigParamsWithHTTPClient creates a new V1CloudConfigsLibvirtUIDClusterConfigParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudConfigsLibvirtUIDClusterConfigParamsWithHTTPClient(client *http.Client) *V1CloudConfigsLibvirtUIDClusterConfigParams { + var () + return &V1CloudConfigsLibvirtUIDClusterConfigParams{ + HTTPClient: client, + } +} + +/* +V1CloudConfigsLibvirtUIDClusterConfigParams contains all the parameters to send to the API endpoint +for the v1 cloud configs libvirt Uid cluster config operation typically these are written to a http.Request +*/ +type V1CloudConfigsLibvirtUIDClusterConfigParams struct { + + /*Body*/ + Body *models.V1LibvirtCloudClusterConfigEntity + /*ConfigUID + Cluster's cloud config uid + + */ + ConfigUID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud configs libvirt Uid cluster config params +func (o *V1CloudConfigsLibvirtUIDClusterConfigParams) WithTimeout(timeout time.Duration) *V1CloudConfigsLibvirtUIDClusterConfigParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud configs libvirt Uid cluster config params +func (o *V1CloudConfigsLibvirtUIDClusterConfigParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud configs libvirt Uid cluster config params +func (o *V1CloudConfigsLibvirtUIDClusterConfigParams) WithContext(ctx context.Context) *V1CloudConfigsLibvirtUIDClusterConfigParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud configs libvirt Uid cluster config params +func (o *V1CloudConfigsLibvirtUIDClusterConfigParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud configs libvirt Uid cluster config params +func (o *V1CloudConfigsLibvirtUIDClusterConfigParams) WithHTTPClient(client *http.Client) *V1CloudConfigsLibvirtUIDClusterConfigParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud configs libvirt Uid cluster config params +func (o *V1CloudConfigsLibvirtUIDClusterConfigParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 cloud configs libvirt Uid cluster config params +func (o *V1CloudConfigsLibvirtUIDClusterConfigParams) WithBody(body *models.V1LibvirtCloudClusterConfigEntity) *V1CloudConfigsLibvirtUIDClusterConfigParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 cloud configs libvirt Uid cluster config params +func (o *V1CloudConfigsLibvirtUIDClusterConfigParams) SetBody(body *models.V1LibvirtCloudClusterConfigEntity) { + o.Body = body +} + +// WithConfigUID adds the configUID to the v1 cloud configs libvirt Uid cluster config params +func (o *V1CloudConfigsLibvirtUIDClusterConfigParams) WithConfigUID(configUID string) *V1CloudConfigsLibvirtUIDClusterConfigParams { + o.SetConfigUID(configUID) + return o +} + +// SetConfigUID adds the configUid to the v1 cloud configs libvirt Uid cluster config params +func (o *V1CloudConfigsLibvirtUIDClusterConfigParams) SetConfigUID(configUID string) { + o.ConfigUID = configUID +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudConfigsLibvirtUIDClusterConfigParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param configUid + if err := r.SetPathParam("configUid", o.ConfigUID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_configs_libvirt_uid_cluster_config_responses.go b/api/client/v1/v1_cloud_configs_libvirt_uid_cluster_config_responses.go new file mode 100644 index 00000000..2ef0e04a --- /dev/null +++ b/api/client/v1/v1_cloud_configs_libvirt_uid_cluster_config_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1CloudConfigsLibvirtUIDClusterConfigReader is a Reader for the V1CloudConfigsLibvirtUIDClusterConfig structure. +type V1CloudConfigsLibvirtUIDClusterConfigReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudConfigsLibvirtUIDClusterConfigReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1CloudConfigsLibvirtUIDClusterConfigNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudConfigsLibvirtUIDClusterConfigNoContent creates a V1CloudConfigsLibvirtUIDClusterConfigNoContent with default headers values +func NewV1CloudConfigsLibvirtUIDClusterConfigNoContent() *V1CloudConfigsLibvirtUIDClusterConfigNoContent { + return &V1CloudConfigsLibvirtUIDClusterConfigNoContent{} +} + +/* +V1CloudConfigsLibvirtUIDClusterConfigNoContent handles this case with default header values. + +The resource was updated successfully +*/ +type V1CloudConfigsLibvirtUIDClusterConfigNoContent struct { +} + +func (o *V1CloudConfigsLibvirtUIDClusterConfigNoContent) Error() string { + return fmt.Sprintf("[PUT /v1/cloudconfigs/libvirt/{configUid}/clusterConfig][%d] v1CloudConfigsLibvirtUidClusterConfigNoContent ", 204) +} + +func (o *V1CloudConfigsLibvirtUIDClusterConfigNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_cloud_configs_maas_get_parameters.go b/api/client/v1/v1_cloud_configs_maas_get_parameters.go new file mode 100644 index 00000000..32f267e9 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_maas_get_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1CloudConfigsMaasGetParams creates a new V1CloudConfigsMaasGetParams object +// with the default values initialized. +func NewV1CloudConfigsMaasGetParams() *V1CloudConfigsMaasGetParams { + var () + return &V1CloudConfigsMaasGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudConfigsMaasGetParamsWithTimeout creates a new V1CloudConfigsMaasGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudConfigsMaasGetParamsWithTimeout(timeout time.Duration) *V1CloudConfigsMaasGetParams { + var () + return &V1CloudConfigsMaasGetParams{ + + timeout: timeout, + } +} + +// NewV1CloudConfigsMaasGetParamsWithContext creates a new V1CloudConfigsMaasGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudConfigsMaasGetParamsWithContext(ctx context.Context) *V1CloudConfigsMaasGetParams { + var () + return &V1CloudConfigsMaasGetParams{ + + Context: ctx, + } +} + +// NewV1CloudConfigsMaasGetParamsWithHTTPClient creates a new V1CloudConfigsMaasGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudConfigsMaasGetParamsWithHTTPClient(client *http.Client) *V1CloudConfigsMaasGetParams { + var () + return &V1CloudConfigsMaasGetParams{ + HTTPClient: client, + } +} + +/* +V1CloudConfigsMaasGetParams contains all the parameters to send to the API endpoint +for the v1 cloud configs maas get operation typically these are written to a http.Request +*/ +type V1CloudConfigsMaasGetParams struct { + + /*ConfigUID + Cluster's cloud config uid + + */ + ConfigUID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud configs maas get params +func (o *V1CloudConfigsMaasGetParams) WithTimeout(timeout time.Duration) *V1CloudConfigsMaasGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud configs maas get params +func (o *V1CloudConfigsMaasGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud configs maas get params +func (o *V1CloudConfigsMaasGetParams) WithContext(ctx context.Context) *V1CloudConfigsMaasGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud configs maas get params +func (o *V1CloudConfigsMaasGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud configs maas get params +func (o *V1CloudConfigsMaasGetParams) WithHTTPClient(client *http.Client) *V1CloudConfigsMaasGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud configs maas get params +func (o *V1CloudConfigsMaasGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithConfigUID adds the configUID to the v1 cloud configs maas get params +func (o *V1CloudConfigsMaasGetParams) WithConfigUID(configUID string) *V1CloudConfigsMaasGetParams { + o.SetConfigUID(configUID) + return o +} + +// SetConfigUID adds the configUid to the v1 cloud configs maas get params +func (o *V1CloudConfigsMaasGetParams) SetConfigUID(configUID string) { + o.ConfigUID = configUID +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudConfigsMaasGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param configUid + if err := r.SetPathParam("configUid", o.ConfigUID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_configs_maas_get_responses.go b/api/client/v1/v1_cloud_configs_maas_get_responses.go new file mode 100644 index 00000000..3fa50ad8 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_maas_get_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1CloudConfigsMaasGetReader is a Reader for the V1CloudConfigsMaasGet structure. +type V1CloudConfigsMaasGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudConfigsMaasGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1CloudConfigsMaasGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudConfigsMaasGetOK creates a V1CloudConfigsMaasGetOK with default headers values +func NewV1CloudConfigsMaasGetOK() *V1CloudConfigsMaasGetOK { + return &V1CloudConfigsMaasGetOK{} +} + +/* +V1CloudConfigsMaasGetOK handles this case with default header values. + +OK +*/ +type V1CloudConfigsMaasGetOK struct { + Payload *models.V1MaasCloudConfig +} + +func (o *V1CloudConfigsMaasGetOK) Error() string { + return fmt.Sprintf("[GET /v1/cloudconfigs/maas/{configUid}][%d] v1CloudConfigsMaasGetOK %+v", 200, o.Payload) +} + +func (o *V1CloudConfigsMaasGetOK) GetPayload() *models.V1MaasCloudConfig { + return o.Payload +} + +func (o *V1CloudConfigsMaasGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1MaasCloudConfig) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_cloud_configs_maas_machine_pool_create_parameters.go b/api/client/v1/v1_cloud_configs_maas_machine_pool_create_parameters.go new file mode 100644 index 00000000..3aa90700 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_maas_machine_pool_create_parameters.go @@ -0,0 +1,157 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1CloudConfigsMaasMachinePoolCreateParams creates a new V1CloudConfigsMaasMachinePoolCreateParams object +// with the default values initialized. +func NewV1CloudConfigsMaasMachinePoolCreateParams() *V1CloudConfigsMaasMachinePoolCreateParams { + var () + return &V1CloudConfigsMaasMachinePoolCreateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudConfigsMaasMachinePoolCreateParamsWithTimeout creates a new V1CloudConfigsMaasMachinePoolCreateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudConfigsMaasMachinePoolCreateParamsWithTimeout(timeout time.Duration) *V1CloudConfigsMaasMachinePoolCreateParams { + var () + return &V1CloudConfigsMaasMachinePoolCreateParams{ + + timeout: timeout, + } +} + +// NewV1CloudConfigsMaasMachinePoolCreateParamsWithContext creates a new V1CloudConfigsMaasMachinePoolCreateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudConfigsMaasMachinePoolCreateParamsWithContext(ctx context.Context) *V1CloudConfigsMaasMachinePoolCreateParams { + var () + return &V1CloudConfigsMaasMachinePoolCreateParams{ + + Context: ctx, + } +} + +// NewV1CloudConfigsMaasMachinePoolCreateParamsWithHTTPClient creates a new V1CloudConfigsMaasMachinePoolCreateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudConfigsMaasMachinePoolCreateParamsWithHTTPClient(client *http.Client) *V1CloudConfigsMaasMachinePoolCreateParams { + var () + return &V1CloudConfigsMaasMachinePoolCreateParams{ + HTTPClient: client, + } +} + +/* +V1CloudConfigsMaasMachinePoolCreateParams contains all the parameters to send to the API endpoint +for the v1 cloud configs maas machine pool create operation typically these are written to a http.Request +*/ +type V1CloudConfigsMaasMachinePoolCreateParams struct { + + /*Body*/ + Body *models.V1MaasMachinePoolConfigEntity + /*ConfigUID + Cluster's cloud config uid + + */ + ConfigUID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud configs maas machine pool create params +func (o *V1CloudConfigsMaasMachinePoolCreateParams) WithTimeout(timeout time.Duration) *V1CloudConfigsMaasMachinePoolCreateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud configs maas machine pool create params +func (o *V1CloudConfigsMaasMachinePoolCreateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud configs maas machine pool create params +func (o *V1CloudConfigsMaasMachinePoolCreateParams) WithContext(ctx context.Context) *V1CloudConfigsMaasMachinePoolCreateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud configs maas machine pool create params +func (o *V1CloudConfigsMaasMachinePoolCreateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud configs maas machine pool create params +func (o *V1CloudConfigsMaasMachinePoolCreateParams) WithHTTPClient(client *http.Client) *V1CloudConfigsMaasMachinePoolCreateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud configs maas machine pool create params +func (o *V1CloudConfigsMaasMachinePoolCreateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 cloud configs maas machine pool create params +func (o *V1CloudConfigsMaasMachinePoolCreateParams) WithBody(body *models.V1MaasMachinePoolConfigEntity) *V1CloudConfigsMaasMachinePoolCreateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 cloud configs maas machine pool create params +func (o *V1CloudConfigsMaasMachinePoolCreateParams) SetBody(body *models.V1MaasMachinePoolConfigEntity) { + o.Body = body +} + +// WithConfigUID adds the configUID to the v1 cloud configs maas machine pool create params +func (o *V1CloudConfigsMaasMachinePoolCreateParams) WithConfigUID(configUID string) *V1CloudConfigsMaasMachinePoolCreateParams { + o.SetConfigUID(configUID) + return o +} + +// SetConfigUID adds the configUid to the v1 cloud configs maas machine pool create params +func (o *V1CloudConfigsMaasMachinePoolCreateParams) SetConfigUID(configUID string) { + o.ConfigUID = configUID +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudConfigsMaasMachinePoolCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param configUid + if err := r.SetPathParam("configUid", o.ConfigUID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_configs_maas_machine_pool_create_responses.go b/api/client/v1/v1_cloud_configs_maas_machine_pool_create_responses.go new file mode 100644 index 00000000..a44c93fe --- /dev/null +++ b/api/client/v1/v1_cloud_configs_maas_machine_pool_create_responses.go @@ -0,0 +1,77 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1CloudConfigsMaasMachinePoolCreateReader is a Reader for the V1CloudConfigsMaasMachinePoolCreate structure. +type V1CloudConfigsMaasMachinePoolCreateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudConfigsMaasMachinePoolCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 201: + result := NewV1CloudConfigsMaasMachinePoolCreateCreated() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudConfigsMaasMachinePoolCreateCreated creates a V1CloudConfigsMaasMachinePoolCreateCreated with default headers values +func NewV1CloudConfigsMaasMachinePoolCreateCreated() *V1CloudConfigsMaasMachinePoolCreateCreated { + return &V1CloudConfigsMaasMachinePoolCreateCreated{} +} + +/* +V1CloudConfigsMaasMachinePoolCreateCreated handles this case with default header values. + +Created successfully +*/ +type V1CloudConfigsMaasMachinePoolCreateCreated struct { + /*Audit uid for the request + */ + AuditUID string + + Payload *models.V1UID +} + +func (o *V1CloudConfigsMaasMachinePoolCreateCreated) Error() string { + return fmt.Sprintf("[POST /v1/cloudconfigs/maas/{configUid}/machinePools][%d] v1CloudConfigsMaasMachinePoolCreateCreated %+v", 201, o.Payload) +} + +func (o *V1CloudConfigsMaasMachinePoolCreateCreated) GetPayload() *models.V1UID { + return o.Payload +} + +func (o *V1CloudConfigsMaasMachinePoolCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header AuditUid + o.AuditUID = response.GetHeader("AuditUid") + + o.Payload = new(models.V1UID) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_cloud_configs_maas_machine_pool_delete_parameters.go b/api/client/v1/v1_cloud_configs_maas_machine_pool_delete_parameters.go new file mode 100644 index 00000000..394da9a8 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_maas_machine_pool_delete_parameters.go @@ -0,0 +1,157 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1CloudConfigsMaasMachinePoolDeleteParams creates a new V1CloudConfigsMaasMachinePoolDeleteParams object +// with the default values initialized. +func NewV1CloudConfigsMaasMachinePoolDeleteParams() *V1CloudConfigsMaasMachinePoolDeleteParams { + var () + return &V1CloudConfigsMaasMachinePoolDeleteParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudConfigsMaasMachinePoolDeleteParamsWithTimeout creates a new V1CloudConfigsMaasMachinePoolDeleteParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudConfigsMaasMachinePoolDeleteParamsWithTimeout(timeout time.Duration) *V1CloudConfigsMaasMachinePoolDeleteParams { + var () + return &V1CloudConfigsMaasMachinePoolDeleteParams{ + + timeout: timeout, + } +} + +// NewV1CloudConfigsMaasMachinePoolDeleteParamsWithContext creates a new V1CloudConfigsMaasMachinePoolDeleteParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudConfigsMaasMachinePoolDeleteParamsWithContext(ctx context.Context) *V1CloudConfigsMaasMachinePoolDeleteParams { + var () + return &V1CloudConfigsMaasMachinePoolDeleteParams{ + + Context: ctx, + } +} + +// NewV1CloudConfigsMaasMachinePoolDeleteParamsWithHTTPClient creates a new V1CloudConfigsMaasMachinePoolDeleteParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudConfigsMaasMachinePoolDeleteParamsWithHTTPClient(client *http.Client) *V1CloudConfigsMaasMachinePoolDeleteParams { + var () + return &V1CloudConfigsMaasMachinePoolDeleteParams{ + HTTPClient: client, + } +} + +/* +V1CloudConfigsMaasMachinePoolDeleteParams contains all the parameters to send to the API endpoint +for the v1 cloud configs maas machine pool delete operation typically these are written to a http.Request +*/ +type V1CloudConfigsMaasMachinePoolDeleteParams struct { + + /*ConfigUID + Cluster's cloud config uid + + */ + ConfigUID string + /*MachinePoolName + Machine pool name + + */ + MachinePoolName string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud configs maas machine pool delete params +func (o *V1CloudConfigsMaasMachinePoolDeleteParams) WithTimeout(timeout time.Duration) *V1CloudConfigsMaasMachinePoolDeleteParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud configs maas machine pool delete params +func (o *V1CloudConfigsMaasMachinePoolDeleteParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud configs maas machine pool delete params +func (o *V1CloudConfigsMaasMachinePoolDeleteParams) WithContext(ctx context.Context) *V1CloudConfigsMaasMachinePoolDeleteParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud configs maas machine pool delete params +func (o *V1CloudConfigsMaasMachinePoolDeleteParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud configs maas machine pool delete params +func (o *V1CloudConfigsMaasMachinePoolDeleteParams) WithHTTPClient(client *http.Client) *V1CloudConfigsMaasMachinePoolDeleteParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud configs maas machine pool delete params +func (o *V1CloudConfigsMaasMachinePoolDeleteParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithConfigUID adds the configUID to the v1 cloud configs maas machine pool delete params +func (o *V1CloudConfigsMaasMachinePoolDeleteParams) WithConfigUID(configUID string) *V1CloudConfigsMaasMachinePoolDeleteParams { + o.SetConfigUID(configUID) + return o +} + +// SetConfigUID adds the configUid to the v1 cloud configs maas machine pool delete params +func (o *V1CloudConfigsMaasMachinePoolDeleteParams) SetConfigUID(configUID string) { + o.ConfigUID = configUID +} + +// WithMachinePoolName adds the machinePoolName to the v1 cloud configs maas machine pool delete params +func (o *V1CloudConfigsMaasMachinePoolDeleteParams) WithMachinePoolName(machinePoolName string) *V1CloudConfigsMaasMachinePoolDeleteParams { + o.SetMachinePoolName(machinePoolName) + return o +} + +// SetMachinePoolName adds the machinePoolName to the v1 cloud configs maas machine pool delete params +func (o *V1CloudConfigsMaasMachinePoolDeleteParams) SetMachinePoolName(machinePoolName string) { + o.MachinePoolName = machinePoolName +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudConfigsMaasMachinePoolDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param configUid + if err := r.SetPathParam("configUid", o.ConfigUID); err != nil { + return err + } + + // path param machinePoolName + if err := r.SetPathParam("machinePoolName", o.MachinePoolName); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_configs_maas_machine_pool_delete_responses.go b/api/client/v1/v1_cloud_configs_maas_machine_pool_delete_responses.go new file mode 100644 index 00000000..2ce43bab --- /dev/null +++ b/api/client/v1/v1_cloud_configs_maas_machine_pool_delete_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1CloudConfigsMaasMachinePoolDeleteReader is a Reader for the V1CloudConfigsMaasMachinePoolDelete structure. +type V1CloudConfigsMaasMachinePoolDeleteReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudConfigsMaasMachinePoolDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1CloudConfigsMaasMachinePoolDeleteNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudConfigsMaasMachinePoolDeleteNoContent creates a V1CloudConfigsMaasMachinePoolDeleteNoContent with default headers values +func NewV1CloudConfigsMaasMachinePoolDeleteNoContent() *V1CloudConfigsMaasMachinePoolDeleteNoContent { + return &V1CloudConfigsMaasMachinePoolDeleteNoContent{} +} + +/* +V1CloudConfigsMaasMachinePoolDeleteNoContent handles this case with default header values. + +The resource was deleted successfully +*/ +type V1CloudConfigsMaasMachinePoolDeleteNoContent struct { +} + +func (o *V1CloudConfigsMaasMachinePoolDeleteNoContent) Error() string { + return fmt.Sprintf("[DELETE /v1/cloudconfigs/maas/{configUid}/machinePools/{machinePoolName}][%d] v1CloudConfigsMaasMachinePoolDeleteNoContent ", 204) +} + +func (o *V1CloudConfigsMaasMachinePoolDeleteNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_cloud_configs_maas_machine_pool_update_parameters.go b/api/client/v1/v1_cloud_configs_maas_machine_pool_update_parameters.go new file mode 100644 index 00000000..3b03db35 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_maas_machine_pool_update_parameters.go @@ -0,0 +1,178 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1CloudConfigsMaasMachinePoolUpdateParams creates a new V1CloudConfigsMaasMachinePoolUpdateParams object +// with the default values initialized. +func NewV1CloudConfigsMaasMachinePoolUpdateParams() *V1CloudConfigsMaasMachinePoolUpdateParams { + var () + return &V1CloudConfigsMaasMachinePoolUpdateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudConfigsMaasMachinePoolUpdateParamsWithTimeout creates a new V1CloudConfigsMaasMachinePoolUpdateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudConfigsMaasMachinePoolUpdateParamsWithTimeout(timeout time.Duration) *V1CloudConfigsMaasMachinePoolUpdateParams { + var () + return &V1CloudConfigsMaasMachinePoolUpdateParams{ + + timeout: timeout, + } +} + +// NewV1CloudConfigsMaasMachinePoolUpdateParamsWithContext creates a new V1CloudConfigsMaasMachinePoolUpdateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudConfigsMaasMachinePoolUpdateParamsWithContext(ctx context.Context) *V1CloudConfigsMaasMachinePoolUpdateParams { + var () + return &V1CloudConfigsMaasMachinePoolUpdateParams{ + + Context: ctx, + } +} + +// NewV1CloudConfigsMaasMachinePoolUpdateParamsWithHTTPClient creates a new V1CloudConfigsMaasMachinePoolUpdateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudConfigsMaasMachinePoolUpdateParamsWithHTTPClient(client *http.Client) *V1CloudConfigsMaasMachinePoolUpdateParams { + var () + return &V1CloudConfigsMaasMachinePoolUpdateParams{ + HTTPClient: client, + } +} + +/* +V1CloudConfigsMaasMachinePoolUpdateParams contains all the parameters to send to the API endpoint +for the v1 cloud configs maas machine pool update operation typically these are written to a http.Request +*/ +type V1CloudConfigsMaasMachinePoolUpdateParams struct { + + /*Body*/ + Body *models.V1MaasMachinePoolConfigEntity + /*ConfigUID + Cluster's cloud config uid + + */ + ConfigUID string + /*MachinePoolName + Machine pool name + + */ + MachinePoolName string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud configs maas machine pool update params +func (o *V1CloudConfigsMaasMachinePoolUpdateParams) WithTimeout(timeout time.Duration) *V1CloudConfigsMaasMachinePoolUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud configs maas machine pool update params +func (o *V1CloudConfigsMaasMachinePoolUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud configs maas machine pool update params +func (o *V1CloudConfigsMaasMachinePoolUpdateParams) WithContext(ctx context.Context) *V1CloudConfigsMaasMachinePoolUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud configs maas machine pool update params +func (o *V1CloudConfigsMaasMachinePoolUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud configs maas machine pool update params +func (o *V1CloudConfigsMaasMachinePoolUpdateParams) WithHTTPClient(client *http.Client) *V1CloudConfigsMaasMachinePoolUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud configs maas machine pool update params +func (o *V1CloudConfigsMaasMachinePoolUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 cloud configs maas machine pool update params +func (o *V1CloudConfigsMaasMachinePoolUpdateParams) WithBody(body *models.V1MaasMachinePoolConfigEntity) *V1CloudConfigsMaasMachinePoolUpdateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 cloud configs maas machine pool update params +func (o *V1CloudConfigsMaasMachinePoolUpdateParams) SetBody(body *models.V1MaasMachinePoolConfigEntity) { + o.Body = body +} + +// WithConfigUID adds the configUID to the v1 cloud configs maas machine pool update params +func (o *V1CloudConfigsMaasMachinePoolUpdateParams) WithConfigUID(configUID string) *V1CloudConfigsMaasMachinePoolUpdateParams { + o.SetConfigUID(configUID) + return o +} + +// SetConfigUID adds the configUid to the v1 cloud configs maas machine pool update params +func (o *V1CloudConfigsMaasMachinePoolUpdateParams) SetConfigUID(configUID string) { + o.ConfigUID = configUID +} + +// WithMachinePoolName adds the machinePoolName to the v1 cloud configs maas machine pool update params +func (o *V1CloudConfigsMaasMachinePoolUpdateParams) WithMachinePoolName(machinePoolName string) *V1CloudConfigsMaasMachinePoolUpdateParams { + o.SetMachinePoolName(machinePoolName) + return o +} + +// SetMachinePoolName adds the machinePoolName to the v1 cloud configs maas machine pool update params +func (o *V1CloudConfigsMaasMachinePoolUpdateParams) SetMachinePoolName(machinePoolName string) { + o.MachinePoolName = machinePoolName +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudConfigsMaasMachinePoolUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param configUid + if err := r.SetPathParam("configUid", o.ConfigUID); err != nil { + return err + } + + // path param machinePoolName + if err := r.SetPathParam("machinePoolName", o.MachinePoolName); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_configs_maas_machine_pool_update_responses.go b/api/client/v1/v1_cloud_configs_maas_machine_pool_update_responses.go new file mode 100644 index 00000000..c29e700b --- /dev/null +++ b/api/client/v1/v1_cloud_configs_maas_machine_pool_update_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1CloudConfigsMaasMachinePoolUpdateReader is a Reader for the V1CloudConfigsMaasMachinePoolUpdate structure. +type V1CloudConfigsMaasMachinePoolUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudConfigsMaasMachinePoolUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1CloudConfigsMaasMachinePoolUpdateNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudConfigsMaasMachinePoolUpdateNoContent creates a V1CloudConfigsMaasMachinePoolUpdateNoContent with default headers values +func NewV1CloudConfigsMaasMachinePoolUpdateNoContent() *V1CloudConfigsMaasMachinePoolUpdateNoContent { + return &V1CloudConfigsMaasMachinePoolUpdateNoContent{} +} + +/* +V1CloudConfigsMaasMachinePoolUpdateNoContent handles this case with default header values. + +The resource was updated successfully +*/ +type V1CloudConfigsMaasMachinePoolUpdateNoContent struct { +} + +func (o *V1CloudConfigsMaasMachinePoolUpdateNoContent) Error() string { + return fmt.Sprintf("[PUT /v1/cloudconfigs/maas/{configUid}/machinePools/{machinePoolName}][%d] v1CloudConfigsMaasMachinePoolUpdateNoContent ", 204) +} + +func (o *V1CloudConfigsMaasMachinePoolUpdateNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_cloud_configs_maas_pool_machines_add_parameters.go b/api/client/v1/v1_cloud_configs_maas_pool_machines_add_parameters.go new file mode 100644 index 00000000..8a6f7863 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_maas_pool_machines_add_parameters.go @@ -0,0 +1,178 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1CloudConfigsMaasPoolMachinesAddParams creates a new V1CloudConfigsMaasPoolMachinesAddParams object +// with the default values initialized. +func NewV1CloudConfigsMaasPoolMachinesAddParams() *V1CloudConfigsMaasPoolMachinesAddParams { + var () + return &V1CloudConfigsMaasPoolMachinesAddParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudConfigsMaasPoolMachinesAddParamsWithTimeout creates a new V1CloudConfigsMaasPoolMachinesAddParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudConfigsMaasPoolMachinesAddParamsWithTimeout(timeout time.Duration) *V1CloudConfigsMaasPoolMachinesAddParams { + var () + return &V1CloudConfigsMaasPoolMachinesAddParams{ + + timeout: timeout, + } +} + +// NewV1CloudConfigsMaasPoolMachinesAddParamsWithContext creates a new V1CloudConfigsMaasPoolMachinesAddParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudConfigsMaasPoolMachinesAddParamsWithContext(ctx context.Context) *V1CloudConfigsMaasPoolMachinesAddParams { + var () + return &V1CloudConfigsMaasPoolMachinesAddParams{ + + Context: ctx, + } +} + +// NewV1CloudConfigsMaasPoolMachinesAddParamsWithHTTPClient creates a new V1CloudConfigsMaasPoolMachinesAddParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudConfigsMaasPoolMachinesAddParamsWithHTTPClient(client *http.Client) *V1CloudConfigsMaasPoolMachinesAddParams { + var () + return &V1CloudConfigsMaasPoolMachinesAddParams{ + HTTPClient: client, + } +} + +/* +V1CloudConfigsMaasPoolMachinesAddParams contains all the parameters to send to the API endpoint +for the v1 cloud configs maas pool machines add operation typically these are written to a http.Request +*/ +type V1CloudConfigsMaasPoolMachinesAddParams struct { + + /*Body*/ + Body *models.V1MaasMachine + /*ConfigUID + Cluster's cloud config uid + + */ + ConfigUID string + /*MachinePoolName + Machine pool name + + */ + MachinePoolName string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud configs maas pool machines add params +func (o *V1CloudConfigsMaasPoolMachinesAddParams) WithTimeout(timeout time.Duration) *V1CloudConfigsMaasPoolMachinesAddParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud configs maas pool machines add params +func (o *V1CloudConfigsMaasPoolMachinesAddParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud configs maas pool machines add params +func (o *V1CloudConfigsMaasPoolMachinesAddParams) WithContext(ctx context.Context) *V1CloudConfigsMaasPoolMachinesAddParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud configs maas pool machines add params +func (o *V1CloudConfigsMaasPoolMachinesAddParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud configs maas pool machines add params +func (o *V1CloudConfigsMaasPoolMachinesAddParams) WithHTTPClient(client *http.Client) *V1CloudConfigsMaasPoolMachinesAddParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud configs maas pool machines add params +func (o *V1CloudConfigsMaasPoolMachinesAddParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 cloud configs maas pool machines add params +func (o *V1CloudConfigsMaasPoolMachinesAddParams) WithBody(body *models.V1MaasMachine) *V1CloudConfigsMaasPoolMachinesAddParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 cloud configs maas pool machines add params +func (o *V1CloudConfigsMaasPoolMachinesAddParams) SetBody(body *models.V1MaasMachine) { + o.Body = body +} + +// WithConfigUID adds the configUID to the v1 cloud configs maas pool machines add params +func (o *V1CloudConfigsMaasPoolMachinesAddParams) WithConfigUID(configUID string) *V1CloudConfigsMaasPoolMachinesAddParams { + o.SetConfigUID(configUID) + return o +} + +// SetConfigUID adds the configUid to the v1 cloud configs maas pool machines add params +func (o *V1CloudConfigsMaasPoolMachinesAddParams) SetConfigUID(configUID string) { + o.ConfigUID = configUID +} + +// WithMachinePoolName adds the machinePoolName to the v1 cloud configs maas pool machines add params +func (o *V1CloudConfigsMaasPoolMachinesAddParams) WithMachinePoolName(machinePoolName string) *V1CloudConfigsMaasPoolMachinesAddParams { + o.SetMachinePoolName(machinePoolName) + return o +} + +// SetMachinePoolName adds the machinePoolName to the v1 cloud configs maas pool machines add params +func (o *V1CloudConfigsMaasPoolMachinesAddParams) SetMachinePoolName(machinePoolName string) { + o.MachinePoolName = machinePoolName +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudConfigsMaasPoolMachinesAddParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param configUid + if err := r.SetPathParam("configUid", o.ConfigUID); err != nil { + return err + } + + // path param machinePoolName + if err := r.SetPathParam("machinePoolName", o.MachinePoolName); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_configs_maas_pool_machines_add_responses.go b/api/client/v1/v1_cloud_configs_maas_pool_machines_add_responses.go new file mode 100644 index 00000000..8c1a6702 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_maas_pool_machines_add_responses.go @@ -0,0 +1,77 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1CloudConfigsMaasPoolMachinesAddReader is a Reader for the V1CloudConfigsMaasPoolMachinesAdd structure. +type V1CloudConfigsMaasPoolMachinesAddReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudConfigsMaasPoolMachinesAddReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 201: + result := NewV1CloudConfigsMaasPoolMachinesAddCreated() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudConfigsMaasPoolMachinesAddCreated creates a V1CloudConfigsMaasPoolMachinesAddCreated with default headers values +func NewV1CloudConfigsMaasPoolMachinesAddCreated() *V1CloudConfigsMaasPoolMachinesAddCreated { + return &V1CloudConfigsMaasPoolMachinesAddCreated{} +} + +/* +V1CloudConfigsMaasPoolMachinesAddCreated handles this case with default header values. + +Created successfully +*/ +type V1CloudConfigsMaasPoolMachinesAddCreated struct { + /*Audit uid for the request + */ + AuditUID string + + Payload *models.V1UID +} + +func (o *V1CloudConfigsMaasPoolMachinesAddCreated) Error() string { + return fmt.Sprintf("[POST /v1/cloudconfigs/maas/{configUid}/machinePools/{machinePoolName}/machines][%d] v1CloudConfigsMaasPoolMachinesAddCreated %+v", 201, o.Payload) +} + +func (o *V1CloudConfigsMaasPoolMachinesAddCreated) GetPayload() *models.V1UID { + return o.Payload +} + +func (o *V1CloudConfigsMaasPoolMachinesAddCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header AuditUid + o.AuditUID = response.GetHeader("AuditUid") + + o.Payload = new(models.V1UID) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_cloud_configs_maas_pool_machines_list_parameters.go b/api/client/v1/v1_cloud_configs_maas_pool_machines_list_parameters.go new file mode 100644 index 00000000..1a5e57c2 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_maas_pool_machines_list_parameters.go @@ -0,0 +1,365 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// NewV1CloudConfigsMaasPoolMachinesListParams creates a new V1CloudConfigsMaasPoolMachinesListParams object +// with the default values initialized. +func NewV1CloudConfigsMaasPoolMachinesListParams() *V1CloudConfigsMaasPoolMachinesListParams { + var ( + limitDefault = int64(50) + ) + return &V1CloudConfigsMaasPoolMachinesListParams{ + Limit: &limitDefault, + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudConfigsMaasPoolMachinesListParamsWithTimeout creates a new V1CloudConfigsMaasPoolMachinesListParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudConfigsMaasPoolMachinesListParamsWithTimeout(timeout time.Duration) *V1CloudConfigsMaasPoolMachinesListParams { + var ( + limitDefault = int64(50) + ) + return &V1CloudConfigsMaasPoolMachinesListParams{ + Limit: &limitDefault, + + timeout: timeout, + } +} + +// NewV1CloudConfigsMaasPoolMachinesListParamsWithContext creates a new V1CloudConfigsMaasPoolMachinesListParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudConfigsMaasPoolMachinesListParamsWithContext(ctx context.Context) *V1CloudConfigsMaasPoolMachinesListParams { + var ( + limitDefault = int64(50) + ) + return &V1CloudConfigsMaasPoolMachinesListParams{ + Limit: &limitDefault, + + Context: ctx, + } +} + +// NewV1CloudConfigsMaasPoolMachinesListParamsWithHTTPClient creates a new V1CloudConfigsMaasPoolMachinesListParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudConfigsMaasPoolMachinesListParamsWithHTTPClient(client *http.Client) *V1CloudConfigsMaasPoolMachinesListParams { + var ( + limitDefault = int64(50) + ) + return &V1CloudConfigsMaasPoolMachinesListParams{ + Limit: &limitDefault, + HTTPClient: client, + } +} + +/* +V1CloudConfigsMaasPoolMachinesListParams contains all the parameters to send to the API endpoint +for the v1 cloud configs maas pool machines list operation typically these are written to a http.Request +*/ +type V1CloudConfigsMaasPoolMachinesListParams struct { + + /*ConfigUID + Cluster's cloud config uid + + */ + ConfigUID string + /*Continue + continue token to paginate the subsequent data items + + */ + Continue *string + /*Fields + Set of fields to be presented in the response with values. The fields are comma separated. Eg: metadata.uid,metadata.name + + */ + Fields *string + /*Filters + Filters can be combined with AND, OR operators with field path name. Eg: metadata.name=TestServiceANDspec.cloudType=aws + + Server will be restricted to certain fields based on the indexed data for each resource. + + */ + Filters *string + /*Limit + limit is a maximum number of responses to return for a list call. Default and maximum value of the limit is 50. + If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. + + */ + Limit *int64 + /*MachinePoolName + Machine pool name + + */ + MachinePoolName string + /*Offset + offset is the next index number from which the response will start. The response offset value can be used along with continue token for the pagination. + + */ + Offset *int64 + /*OrderBy + Specify the fields with sort order. 1 indicates ascending and -1 for descending. Eg: orderBy=metadata.name=1,metadata.uid=-1 + + */ + OrderBy *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud configs maas pool machines list params +func (o *V1CloudConfigsMaasPoolMachinesListParams) WithTimeout(timeout time.Duration) *V1CloudConfigsMaasPoolMachinesListParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud configs maas pool machines list params +func (o *V1CloudConfigsMaasPoolMachinesListParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud configs maas pool machines list params +func (o *V1CloudConfigsMaasPoolMachinesListParams) WithContext(ctx context.Context) *V1CloudConfigsMaasPoolMachinesListParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud configs maas pool machines list params +func (o *V1CloudConfigsMaasPoolMachinesListParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud configs maas pool machines list params +func (o *V1CloudConfigsMaasPoolMachinesListParams) WithHTTPClient(client *http.Client) *V1CloudConfigsMaasPoolMachinesListParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud configs maas pool machines list params +func (o *V1CloudConfigsMaasPoolMachinesListParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithConfigUID adds the configUID to the v1 cloud configs maas pool machines list params +func (o *V1CloudConfigsMaasPoolMachinesListParams) WithConfigUID(configUID string) *V1CloudConfigsMaasPoolMachinesListParams { + o.SetConfigUID(configUID) + return o +} + +// SetConfigUID adds the configUid to the v1 cloud configs maas pool machines list params +func (o *V1CloudConfigsMaasPoolMachinesListParams) SetConfigUID(configUID string) { + o.ConfigUID = configUID +} + +// WithContinue adds the continueVar to the v1 cloud configs maas pool machines list params +func (o *V1CloudConfigsMaasPoolMachinesListParams) WithContinue(continueVar *string) *V1CloudConfigsMaasPoolMachinesListParams { + o.SetContinue(continueVar) + return o +} + +// SetContinue adds the continue to the v1 cloud configs maas pool machines list params +func (o *V1CloudConfigsMaasPoolMachinesListParams) SetContinue(continueVar *string) { + o.Continue = continueVar +} + +// WithFields adds the fields to the v1 cloud configs maas pool machines list params +func (o *V1CloudConfigsMaasPoolMachinesListParams) WithFields(fields *string) *V1CloudConfigsMaasPoolMachinesListParams { + o.SetFields(fields) + return o +} + +// SetFields adds the fields to the v1 cloud configs maas pool machines list params +func (o *V1CloudConfigsMaasPoolMachinesListParams) SetFields(fields *string) { + o.Fields = fields +} + +// WithFilters adds the filters to the v1 cloud configs maas pool machines list params +func (o *V1CloudConfigsMaasPoolMachinesListParams) WithFilters(filters *string) *V1CloudConfigsMaasPoolMachinesListParams { + o.SetFilters(filters) + return o +} + +// SetFilters adds the filters to the v1 cloud configs maas pool machines list params +func (o *V1CloudConfigsMaasPoolMachinesListParams) SetFilters(filters *string) { + o.Filters = filters +} + +// WithLimit adds the limit to the v1 cloud configs maas pool machines list params +func (o *V1CloudConfigsMaasPoolMachinesListParams) WithLimit(limit *int64) *V1CloudConfigsMaasPoolMachinesListParams { + o.SetLimit(limit) + return o +} + +// SetLimit adds the limit to the v1 cloud configs maas pool machines list params +func (o *V1CloudConfigsMaasPoolMachinesListParams) SetLimit(limit *int64) { + o.Limit = limit +} + +// WithMachinePoolName adds the machinePoolName to the v1 cloud configs maas pool machines list params +func (o *V1CloudConfigsMaasPoolMachinesListParams) WithMachinePoolName(machinePoolName string) *V1CloudConfigsMaasPoolMachinesListParams { + o.SetMachinePoolName(machinePoolName) + return o +} + +// SetMachinePoolName adds the machinePoolName to the v1 cloud configs maas pool machines list params +func (o *V1CloudConfigsMaasPoolMachinesListParams) SetMachinePoolName(machinePoolName string) { + o.MachinePoolName = machinePoolName +} + +// WithOffset adds the offset to the v1 cloud configs maas pool machines list params +func (o *V1CloudConfigsMaasPoolMachinesListParams) WithOffset(offset *int64) *V1CloudConfigsMaasPoolMachinesListParams { + o.SetOffset(offset) + return o +} + +// SetOffset adds the offset to the v1 cloud configs maas pool machines list params +func (o *V1CloudConfigsMaasPoolMachinesListParams) SetOffset(offset *int64) { + o.Offset = offset +} + +// WithOrderBy adds the orderBy to the v1 cloud configs maas pool machines list params +func (o *V1CloudConfigsMaasPoolMachinesListParams) WithOrderBy(orderBy *string) *V1CloudConfigsMaasPoolMachinesListParams { + o.SetOrderBy(orderBy) + return o +} + +// SetOrderBy adds the orderBy to the v1 cloud configs maas pool machines list params +func (o *V1CloudConfigsMaasPoolMachinesListParams) SetOrderBy(orderBy *string) { + o.OrderBy = orderBy +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudConfigsMaasPoolMachinesListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param configUid + if err := r.SetPathParam("configUid", o.ConfigUID); err != nil { + return err + } + + if o.Continue != nil { + + // query param continue + var qrContinue string + if o.Continue != nil { + qrContinue = *o.Continue + } + qContinue := qrContinue + if qContinue != "" { + if err := r.SetQueryParam("continue", qContinue); err != nil { + return err + } + } + + } + + if o.Fields != nil { + + // query param fields + var qrFields string + if o.Fields != nil { + qrFields = *o.Fields + } + qFields := qrFields + if qFields != "" { + if err := r.SetQueryParam("fields", qFields); err != nil { + return err + } + } + + } + + if o.Filters != nil { + + // query param filters + var qrFilters string + if o.Filters != nil { + qrFilters = *o.Filters + } + qFilters := qrFilters + if qFilters != "" { + if err := r.SetQueryParam("filters", qFilters); err != nil { + return err + } + } + + } + + if o.Limit != nil { + + // query param limit + var qrLimit int64 + if o.Limit != nil { + qrLimit = *o.Limit + } + qLimit := swag.FormatInt64(qrLimit) + if qLimit != "" { + if err := r.SetQueryParam("limit", qLimit); err != nil { + return err + } + } + + } + + // path param machinePoolName + if err := r.SetPathParam("machinePoolName", o.MachinePoolName); err != nil { + return err + } + + if o.Offset != nil { + + // query param offset + var qrOffset int64 + if o.Offset != nil { + qrOffset = *o.Offset + } + qOffset := swag.FormatInt64(qrOffset) + if qOffset != "" { + if err := r.SetQueryParam("offset", qOffset); err != nil { + return err + } + } + + } + + if o.OrderBy != nil { + + // query param orderBy + var qrOrderBy string + if o.OrderBy != nil { + qrOrderBy = *o.OrderBy + } + qOrderBy := qrOrderBy + if qOrderBy != "" { + if err := r.SetQueryParam("orderBy", qOrderBy); err != nil { + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_configs_maas_pool_machines_list_responses.go b/api/client/v1/v1_cloud_configs_maas_pool_machines_list_responses.go new file mode 100644 index 00000000..e4129931 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_maas_pool_machines_list_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1CloudConfigsMaasPoolMachinesListReader is a Reader for the V1CloudConfigsMaasPoolMachinesList structure. +type V1CloudConfigsMaasPoolMachinesListReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudConfigsMaasPoolMachinesListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1CloudConfigsMaasPoolMachinesListOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudConfigsMaasPoolMachinesListOK creates a V1CloudConfigsMaasPoolMachinesListOK with default headers values +func NewV1CloudConfigsMaasPoolMachinesListOK() *V1CloudConfigsMaasPoolMachinesListOK { + return &V1CloudConfigsMaasPoolMachinesListOK{} +} + +/* +V1CloudConfigsMaasPoolMachinesListOK handles this case with default header values. + +An array of Maas machine items +*/ +type V1CloudConfigsMaasPoolMachinesListOK struct { + Payload *models.V1MaasMachines +} + +func (o *V1CloudConfigsMaasPoolMachinesListOK) Error() string { + return fmt.Sprintf("[GET /v1/cloudconfigs/maas/{configUid}/machinePools/{machinePoolName}/machines][%d] v1CloudConfigsMaasPoolMachinesListOK %+v", 200, o.Payload) +} + +func (o *V1CloudConfigsMaasPoolMachinesListOK) GetPayload() *models.V1MaasMachines { + return o.Payload +} + +func (o *V1CloudConfigsMaasPoolMachinesListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1MaasMachines) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_cloud_configs_maas_pool_machines_uid_delete_parameters.go b/api/client/v1/v1_cloud_configs_maas_pool_machines_uid_delete_parameters.go new file mode 100644 index 00000000..5e730ee0 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_maas_pool_machines_uid_delete_parameters.go @@ -0,0 +1,178 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1CloudConfigsMaasPoolMachinesUIDDeleteParams creates a new V1CloudConfigsMaasPoolMachinesUIDDeleteParams object +// with the default values initialized. +func NewV1CloudConfigsMaasPoolMachinesUIDDeleteParams() *V1CloudConfigsMaasPoolMachinesUIDDeleteParams { + var () + return &V1CloudConfigsMaasPoolMachinesUIDDeleteParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudConfigsMaasPoolMachinesUIDDeleteParamsWithTimeout creates a new V1CloudConfigsMaasPoolMachinesUIDDeleteParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudConfigsMaasPoolMachinesUIDDeleteParamsWithTimeout(timeout time.Duration) *V1CloudConfigsMaasPoolMachinesUIDDeleteParams { + var () + return &V1CloudConfigsMaasPoolMachinesUIDDeleteParams{ + + timeout: timeout, + } +} + +// NewV1CloudConfigsMaasPoolMachinesUIDDeleteParamsWithContext creates a new V1CloudConfigsMaasPoolMachinesUIDDeleteParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudConfigsMaasPoolMachinesUIDDeleteParamsWithContext(ctx context.Context) *V1CloudConfigsMaasPoolMachinesUIDDeleteParams { + var () + return &V1CloudConfigsMaasPoolMachinesUIDDeleteParams{ + + Context: ctx, + } +} + +// NewV1CloudConfigsMaasPoolMachinesUIDDeleteParamsWithHTTPClient creates a new V1CloudConfigsMaasPoolMachinesUIDDeleteParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudConfigsMaasPoolMachinesUIDDeleteParamsWithHTTPClient(client *http.Client) *V1CloudConfigsMaasPoolMachinesUIDDeleteParams { + var () + return &V1CloudConfigsMaasPoolMachinesUIDDeleteParams{ + HTTPClient: client, + } +} + +/* +V1CloudConfigsMaasPoolMachinesUIDDeleteParams contains all the parameters to send to the API endpoint +for the v1 cloud configs maas pool machines Uid delete operation typically these are written to a http.Request +*/ +type V1CloudConfigsMaasPoolMachinesUIDDeleteParams struct { + + /*ConfigUID + Cluster's cloud config uid + + */ + ConfigUID string + /*MachinePoolName + Machine pool name + + */ + MachinePoolName string + /*MachineUID + Machine uid + + */ + MachineUID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud configs maas pool machines Uid delete params +func (o *V1CloudConfigsMaasPoolMachinesUIDDeleteParams) WithTimeout(timeout time.Duration) *V1CloudConfigsMaasPoolMachinesUIDDeleteParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud configs maas pool machines Uid delete params +func (o *V1CloudConfigsMaasPoolMachinesUIDDeleteParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud configs maas pool machines Uid delete params +func (o *V1CloudConfigsMaasPoolMachinesUIDDeleteParams) WithContext(ctx context.Context) *V1CloudConfigsMaasPoolMachinesUIDDeleteParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud configs maas pool machines Uid delete params +func (o *V1CloudConfigsMaasPoolMachinesUIDDeleteParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud configs maas pool machines Uid delete params +func (o *V1CloudConfigsMaasPoolMachinesUIDDeleteParams) WithHTTPClient(client *http.Client) *V1CloudConfigsMaasPoolMachinesUIDDeleteParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud configs maas pool machines Uid delete params +func (o *V1CloudConfigsMaasPoolMachinesUIDDeleteParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithConfigUID adds the configUID to the v1 cloud configs maas pool machines Uid delete params +func (o *V1CloudConfigsMaasPoolMachinesUIDDeleteParams) WithConfigUID(configUID string) *V1CloudConfigsMaasPoolMachinesUIDDeleteParams { + o.SetConfigUID(configUID) + return o +} + +// SetConfigUID adds the configUid to the v1 cloud configs maas pool machines Uid delete params +func (o *V1CloudConfigsMaasPoolMachinesUIDDeleteParams) SetConfigUID(configUID string) { + o.ConfigUID = configUID +} + +// WithMachinePoolName adds the machinePoolName to the v1 cloud configs maas pool machines Uid delete params +func (o *V1CloudConfigsMaasPoolMachinesUIDDeleteParams) WithMachinePoolName(machinePoolName string) *V1CloudConfigsMaasPoolMachinesUIDDeleteParams { + o.SetMachinePoolName(machinePoolName) + return o +} + +// SetMachinePoolName adds the machinePoolName to the v1 cloud configs maas pool machines Uid delete params +func (o *V1CloudConfigsMaasPoolMachinesUIDDeleteParams) SetMachinePoolName(machinePoolName string) { + o.MachinePoolName = machinePoolName +} + +// WithMachineUID adds the machineUID to the v1 cloud configs maas pool machines Uid delete params +func (o *V1CloudConfigsMaasPoolMachinesUIDDeleteParams) WithMachineUID(machineUID string) *V1CloudConfigsMaasPoolMachinesUIDDeleteParams { + o.SetMachineUID(machineUID) + return o +} + +// SetMachineUID adds the machineUid to the v1 cloud configs maas pool machines Uid delete params +func (o *V1CloudConfigsMaasPoolMachinesUIDDeleteParams) SetMachineUID(machineUID string) { + o.MachineUID = machineUID +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudConfigsMaasPoolMachinesUIDDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param configUid + if err := r.SetPathParam("configUid", o.ConfigUID); err != nil { + return err + } + + // path param machinePoolName + if err := r.SetPathParam("machinePoolName", o.MachinePoolName); err != nil { + return err + } + + // path param machineUid + if err := r.SetPathParam("machineUid", o.MachineUID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_configs_maas_pool_machines_uid_delete_responses.go b/api/client/v1/v1_cloud_configs_maas_pool_machines_uid_delete_responses.go new file mode 100644 index 00000000..07cacb9a --- /dev/null +++ b/api/client/v1/v1_cloud_configs_maas_pool_machines_uid_delete_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1CloudConfigsMaasPoolMachinesUIDDeleteReader is a Reader for the V1CloudConfigsMaasPoolMachinesUIDDelete structure. +type V1CloudConfigsMaasPoolMachinesUIDDeleteReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudConfigsMaasPoolMachinesUIDDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1CloudConfigsMaasPoolMachinesUIDDeleteNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudConfigsMaasPoolMachinesUIDDeleteNoContent creates a V1CloudConfigsMaasPoolMachinesUIDDeleteNoContent with default headers values +func NewV1CloudConfigsMaasPoolMachinesUIDDeleteNoContent() *V1CloudConfigsMaasPoolMachinesUIDDeleteNoContent { + return &V1CloudConfigsMaasPoolMachinesUIDDeleteNoContent{} +} + +/* +V1CloudConfigsMaasPoolMachinesUIDDeleteNoContent handles this case with default header values. + +The resource was deleted successfully +*/ +type V1CloudConfigsMaasPoolMachinesUIDDeleteNoContent struct { +} + +func (o *V1CloudConfigsMaasPoolMachinesUIDDeleteNoContent) Error() string { + return fmt.Sprintf("[DELETE /v1/cloudconfigs/maas/{configUid}/machinePools/{machinePoolName}/machines/{machineUid}][%d] v1CloudConfigsMaasPoolMachinesUidDeleteNoContent ", 204) +} + +func (o *V1CloudConfigsMaasPoolMachinesUIDDeleteNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_cloud_configs_maas_pool_machines_uid_get_parameters.go b/api/client/v1/v1_cloud_configs_maas_pool_machines_uid_get_parameters.go new file mode 100644 index 00000000..3d9ce9fd --- /dev/null +++ b/api/client/v1/v1_cloud_configs_maas_pool_machines_uid_get_parameters.go @@ -0,0 +1,178 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1CloudConfigsMaasPoolMachinesUIDGetParams creates a new V1CloudConfigsMaasPoolMachinesUIDGetParams object +// with the default values initialized. +func NewV1CloudConfigsMaasPoolMachinesUIDGetParams() *V1CloudConfigsMaasPoolMachinesUIDGetParams { + var () + return &V1CloudConfigsMaasPoolMachinesUIDGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudConfigsMaasPoolMachinesUIDGetParamsWithTimeout creates a new V1CloudConfigsMaasPoolMachinesUIDGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudConfigsMaasPoolMachinesUIDGetParamsWithTimeout(timeout time.Duration) *V1CloudConfigsMaasPoolMachinesUIDGetParams { + var () + return &V1CloudConfigsMaasPoolMachinesUIDGetParams{ + + timeout: timeout, + } +} + +// NewV1CloudConfigsMaasPoolMachinesUIDGetParamsWithContext creates a new V1CloudConfigsMaasPoolMachinesUIDGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudConfigsMaasPoolMachinesUIDGetParamsWithContext(ctx context.Context) *V1CloudConfigsMaasPoolMachinesUIDGetParams { + var () + return &V1CloudConfigsMaasPoolMachinesUIDGetParams{ + + Context: ctx, + } +} + +// NewV1CloudConfigsMaasPoolMachinesUIDGetParamsWithHTTPClient creates a new V1CloudConfigsMaasPoolMachinesUIDGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudConfigsMaasPoolMachinesUIDGetParamsWithHTTPClient(client *http.Client) *V1CloudConfigsMaasPoolMachinesUIDGetParams { + var () + return &V1CloudConfigsMaasPoolMachinesUIDGetParams{ + HTTPClient: client, + } +} + +/* +V1CloudConfigsMaasPoolMachinesUIDGetParams contains all the parameters to send to the API endpoint +for the v1 cloud configs maas pool machines Uid get operation typically these are written to a http.Request +*/ +type V1CloudConfigsMaasPoolMachinesUIDGetParams struct { + + /*ConfigUID + Cluster's cloud config uid + + */ + ConfigUID string + /*MachinePoolName + Machine pool name + + */ + MachinePoolName string + /*MachineUID + Machine uid + + */ + MachineUID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud configs maas pool machines Uid get params +func (o *V1CloudConfigsMaasPoolMachinesUIDGetParams) WithTimeout(timeout time.Duration) *V1CloudConfigsMaasPoolMachinesUIDGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud configs maas pool machines Uid get params +func (o *V1CloudConfigsMaasPoolMachinesUIDGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud configs maas pool machines Uid get params +func (o *V1CloudConfigsMaasPoolMachinesUIDGetParams) WithContext(ctx context.Context) *V1CloudConfigsMaasPoolMachinesUIDGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud configs maas pool machines Uid get params +func (o *V1CloudConfigsMaasPoolMachinesUIDGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud configs maas pool machines Uid get params +func (o *V1CloudConfigsMaasPoolMachinesUIDGetParams) WithHTTPClient(client *http.Client) *V1CloudConfigsMaasPoolMachinesUIDGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud configs maas pool machines Uid get params +func (o *V1CloudConfigsMaasPoolMachinesUIDGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithConfigUID adds the configUID to the v1 cloud configs maas pool machines Uid get params +func (o *V1CloudConfigsMaasPoolMachinesUIDGetParams) WithConfigUID(configUID string) *V1CloudConfigsMaasPoolMachinesUIDGetParams { + o.SetConfigUID(configUID) + return o +} + +// SetConfigUID adds the configUid to the v1 cloud configs maas pool machines Uid get params +func (o *V1CloudConfigsMaasPoolMachinesUIDGetParams) SetConfigUID(configUID string) { + o.ConfigUID = configUID +} + +// WithMachinePoolName adds the machinePoolName to the v1 cloud configs maas pool machines Uid get params +func (o *V1CloudConfigsMaasPoolMachinesUIDGetParams) WithMachinePoolName(machinePoolName string) *V1CloudConfigsMaasPoolMachinesUIDGetParams { + o.SetMachinePoolName(machinePoolName) + return o +} + +// SetMachinePoolName adds the machinePoolName to the v1 cloud configs maas pool machines Uid get params +func (o *V1CloudConfigsMaasPoolMachinesUIDGetParams) SetMachinePoolName(machinePoolName string) { + o.MachinePoolName = machinePoolName +} + +// WithMachineUID adds the machineUID to the v1 cloud configs maas pool machines Uid get params +func (o *V1CloudConfigsMaasPoolMachinesUIDGetParams) WithMachineUID(machineUID string) *V1CloudConfigsMaasPoolMachinesUIDGetParams { + o.SetMachineUID(machineUID) + return o +} + +// SetMachineUID adds the machineUid to the v1 cloud configs maas pool machines Uid get params +func (o *V1CloudConfigsMaasPoolMachinesUIDGetParams) SetMachineUID(machineUID string) { + o.MachineUID = machineUID +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudConfigsMaasPoolMachinesUIDGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param configUid + if err := r.SetPathParam("configUid", o.ConfigUID); err != nil { + return err + } + + // path param machinePoolName + if err := r.SetPathParam("machinePoolName", o.MachinePoolName); err != nil { + return err + } + + // path param machineUid + if err := r.SetPathParam("machineUid", o.MachineUID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_configs_maas_pool_machines_uid_get_responses.go b/api/client/v1/v1_cloud_configs_maas_pool_machines_uid_get_responses.go new file mode 100644 index 00000000..09a4d48c --- /dev/null +++ b/api/client/v1/v1_cloud_configs_maas_pool_machines_uid_get_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1CloudConfigsMaasPoolMachinesUIDGetReader is a Reader for the V1CloudConfigsMaasPoolMachinesUIDGet structure. +type V1CloudConfigsMaasPoolMachinesUIDGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudConfigsMaasPoolMachinesUIDGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1CloudConfigsMaasPoolMachinesUIDGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudConfigsMaasPoolMachinesUIDGetOK creates a V1CloudConfigsMaasPoolMachinesUIDGetOK with default headers values +func NewV1CloudConfigsMaasPoolMachinesUIDGetOK() *V1CloudConfigsMaasPoolMachinesUIDGetOK { + return &V1CloudConfigsMaasPoolMachinesUIDGetOK{} +} + +/* +V1CloudConfigsMaasPoolMachinesUIDGetOK handles this case with default header values. + +OK +*/ +type V1CloudConfigsMaasPoolMachinesUIDGetOK struct { + Payload *models.V1MaasMachine +} + +func (o *V1CloudConfigsMaasPoolMachinesUIDGetOK) Error() string { + return fmt.Sprintf("[GET /v1/cloudconfigs/maas/{configUid}/machinePools/{machinePoolName}/machines/{machineUid}][%d] v1CloudConfigsMaasPoolMachinesUidGetOK %+v", 200, o.Payload) +} + +func (o *V1CloudConfigsMaasPoolMachinesUIDGetOK) GetPayload() *models.V1MaasMachine { + return o.Payload +} + +func (o *V1CloudConfigsMaasPoolMachinesUIDGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1MaasMachine) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_cloud_configs_maas_pool_machines_uid_update_parameters.go b/api/client/v1/v1_cloud_configs_maas_pool_machines_uid_update_parameters.go new file mode 100644 index 00000000..dd35c0ea --- /dev/null +++ b/api/client/v1/v1_cloud_configs_maas_pool_machines_uid_update_parameters.go @@ -0,0 +1,199 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1CloudConfigsMaasPoolMachinesUIDUpdateParams creates a new V1CloudConfigsMaasPoolMachinesUIDUpdateParams object +// with the default values initialized. +func NewV1CloudConfigsMaasPoolMachinesUIDUpdateParams() *V1CloudConfigsMaasPoolMachinesUIDUpdateParams { + var () + return &V1CloudConfigsMaasPoolMachinesUIDUpdateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudConfigsMaasPoolMachinesUIDUpdateParamsWithTimeout creates a new V1CloudConfigsMaasPoolMachinesUIDUpdateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudConfigsMaasPoolMachinesUIDUpdateParamsWithTimeout(timeout time.Duration) *V1CloudConfigsMaasPoolMachinesUIDUpdateParams { + var () + return &V1CloudConfigsMaasPoolMachinesUIDUpdateParams{ + + timeout: timeout, + } +} + +// NewV1CloudConfigsMaasPoolMachinesUIDUpdateParamsWithContext creates a new V1CloudConfigsMaasPoolMachinesUIDUpdateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudConfigsMaasPoolMachinesUIDUpdateParamsWithContext(ctx context.Context) *V1CloudConfigsMaasPoolMachinesUIDUpdateParams { + var () + return &V1CloudConfigsMaasPoolMachinesUIDUpdateParams{ + + Context: ctx, + } +} + +// NewV1CloudConfigsMaasPoolMachinesUIDUpdateParamsWithHTTPClient creates a new V1CloudConfigsMaasPoolMachinesUIDUpdateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudConfigsMaasPoolMachinesUIDUpdateParamsWithHTTPClient(client *http.Client) *V1CloudConfigsMaasPoolMachinesUIDUpdateParams { + var () + return &V1CloudConfigsMaasPoolMachinesUIDUpdateParams{ + HTTPClient: client, + } +} + +/* +V1CloudConfigsMaasPoolMachinesUIDUpdateParams contains all the parameters to send to the API endpoint +for the v1 cloud configs maas pool machines Uid update operation typically these are written to a http.Request +*/ +type V1CloudConfigsMaasPoolMachinesUIDUpdateParams struct { + + /*Body*/ + Body *models.V1MaasMachine + /*ConfigUID + Cluster's cloud config uid + + */ + ConfigUID string + /*MachinePoolName + Machine pool name + + */ + MachinePoolName string + /*MachineUID + Machine uid + + */ + MachineUID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud configs maas pool machines Uid update params +func (o *V1CloudConfigsMaasPoolMachinesUIDUpdateParams) WithTimeout(timeout time.Duration) *V1CloudConfigsMaasPoolMachinesUIDUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud configs maas pool machines Uid update params +func (o *V1CloudConfigsMaasPoolMachinesUIDUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud configs maas pool machines Uid update params +func (o *V1CloudConfigsMaasPoolMachinesUIDUpdateParams) WithContext(ctx context.Context) *V1CloudConfigsMaasPoolMachinesUIDUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud configs maas pool machines Uid update params +func (o *V1CloudConfigsMaasPoolMachinesUIDUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud configs maas pool machines Uid update params +func (o *V1CloudConfigsMaasPoolMachinesUIDUpdateParams) WithHTTPClient(client *http.Client) *V1CloudConfigsMaasPoolMachinesUIDUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud configs maas pool machines Uid update params +func (o *V1CloudConfigsMaasPoolMachinesUIDUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 cloud configs maas pool machines Uid update params +func (o *V1CloudConfigsMaasPoolMachinesUIDUpdateParams) WithBody(body *models.V1MaasMachine) *V1CloudConfigsMaasPoolMachinesUIDUpdateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 cloud configs maas pool machines Uid update params +func (o *V1CloudConfigsMaasPoolMachinesUIDUpdateParams) SetBody(body *models.V1MaasMachine) { + o.Body = body +} + +// WithConfigUID adds the configUID to the v1 cloud configs maas pool machines Uid update params +func (o *V1CloudConfigsMaasPoolMachinesUIDUpdateParams) WithConfigUID(configUID string) *V1CloudConfigsMaasPoolMachinesUIDUpdateParams { + o.SetConfigUID(configUID) + return o +} + +// SetConfigUID adds the configUid to the v1 cloud configs maas pool machines Uid update params +func (o *V1CloudConfigsMaasPoolMachinesUIDUpdateParams) SetConfigUID(configUID string) { + o.ConfigUID = configUID +} + +// WithMachinePoolName adds the machinePoolName to the v1 cloud configs maas pool machines Uid update params +func (o *V1CloudConfigsMaasPoolMachinesUIDUpdateParams) WithMachinePoolName(machinePoolName string) *V1CloudConfigsMaasPoolMachinesUIDUpdateParams { + o.SetMachinePoolName(machinePoolName) + return o +} + +// SetMachinePoolName adds the machinePoolName to the v1 cloud configs maas pool machines Uid update params +func (o *V1CloudConfigsMaasPoolMachinesUIDUpdateParams) SetMachinePoolName(machinePoolName string) { + o.MachinePoolName = machinePoolName +} + +// WithMachineUID adds the machineUID to the v1 cloud configs maas pool machines Uid update params +func (o *V1CloudConfigsMaasPoolMachinesUIDUpdateParams) WithMachineUID(machineUID string) *V1CloudConfigsMaasPoolMachinesUIDUpdateParams { + o.SetMachineUID(machineUID) + return o +} + +// SetMachineUID adds the machineUid to the v1 cloud configs maas pool machines Uid update params +func (o *V1CloudConfigsMaasPoolMachinesUIDUpdateParams) SetMachineUID(machineUID string) { + o.MachineUID = machineUID +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudConfigsMaasPoolMachinesUIDUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param configUid + if err := r.SetPathParam("configUid", o.ConfigUID); err != nil { + return err + } + + // path param machinePoolName + if err := r.SetPathParam("machinePoolName", o.MachinePoolName); err != nil { + return err + } + + // path param machineUid + if err := r.SetPathParam("machineUid", o.MachineUID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_configs_maas_pool_machines_uid_update_responses.go b/api/client/v1/v1_cloud_configs_maas_pool_machines_uid_update_responses.go new file mode 100644 index 00000000..11012fee --- /dev/null +++ b/api/client/v1/v1_cloud_configs_maas_pool_machines_uid_update_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1CloudConfigsMaasPoolMachinesUIDUpdateReader is a Reader for the V1CloudConfigsMaasPoolMachinesUIDUpdate structure. +type V1CloudConfigsMaasPoolMachinesUIDUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudConfigsMaasPoolMachinesUIDUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1CloudConfigsMaasPoolMachinesUIDUpdateNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudConfigsMaasPoolMachinesUIDUpdateNoContent creates a V1CloudConfigsMaasPoolMachinesUIDUpdateNoContent with default headers values +func NewV1CloudConfigsMaasPoolMachinesUIDUpdateNoContent() *V1CloudConfigsMaasPoolMachinesUIDUpdateNoContent { + return &V1CloudConfigsMaasPoolMachinesUIDUpdateNoContent{} +} + +/* +V1CloudConfigsMaasPoolMachinesUIDUpdateNoContent handles this case with default header values. + +The resource was updated successfully +*/ +type V1CloudConfigsMaasPoolMachinesUIDUpdateNoContent struct { +} + +func (o *V1CloudConfigsMaasPoolMachinesUIDUpdateNoContent) Error() string { + return fmt.Sprintf("[PUT /v1/cloudconfigs/maas/{configUid}/machinePools/{machinePoolName}/machines/{machineUid}][%d] v1CloudConfigsMaasPoolMachinesUidUpdateNoContent ", 204) +} + +func (o *V1CloudConfigsMaasPoolMachinesUIDUpdateNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_cloud_configs_maas_uid_cluster_config_parameters.go b/api/client/v1/v1_cloud_configs_maas_uid_cluster_config_parameters.go new file mode 100644 index 00000000..5a11ca53 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_maas_uid_cluster_config_parameters.go @@ -0,0 +1,157 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1CloudConfigsMaasUIDClusterConfigParams creates a new V1CloudConfigsMaasUIDClusterConfigParams object +// with the default values initialized. +func NewV1CloudConfigsMaasUIDClusterConfigParams() *V1CloudConfigsMaasUIDClusterConfigParams { + var () + return &V1CloudConfigsMaasUIDClusterConfigParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudConfigsMaasUIDClusterConfigParamsWithTimeout creates a new V1CloudConfigsMaasUIDClusterConfigParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudConfigsMaasUIDClusterConfigParamsWithTimeout(timeout time.Duration) *V1CloudConfigsMaasUIDClusterConfigParams { + var () + return &V1CloudConfigsMaasUIDClusterConfigParams{ + + timeout: timeout, + } +} + +// NewV1CloudConfigsMaasUIDClusterConfigParamsWithContext creates a new V1CloudConfigsMaasUIDClusterConfigParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudConfigsMaasUIDClusterConfigParamsWithContext(ctx context.Context) *V1CloudConfigsMaasUIDClusterConfigParams { + var () + return &V1CloudConfigsMaasUIDClusterConfigParams{ + + Context: ctx, + } +} + +// NewV1CloudConfigsMaasUIDClusterConfigParamsWithHTTPClient creates a new V1CloudConfigsMaasUIDClusterConfigParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudConfigsMaasUIDClusterConfigParamsWithHTTPClient(client *http.Client) *V1CloudConfigsMaasUIDClusterConfigParams { + var () + return &V1CloudConfigsMaasUIDClusterConfigParams{ + HTTPClient: client, + } +} + +/* +V1CloudConfigsMaasUIDClusterConfigParams contains all the parameters to send to the API endpoint +for the v1 cloud configs maas Uid cluster config operation typically these are written to a http.Request +*/ +type V1CloudConfigsMaasUIDClusterConfigParams struct { + + /*Body*/ + Body *models.V1MaasCloudClusterConfigEntity + /*ConfigUID + Cluster's cloud config uid + + */ + ConfigUID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud configs maas Uid cluster config params +func (o *V1CloudConfigsMaasUIDClusterConfigParams) WithTimeout(timeout time.Duration) *V1CloudConfigsMaasUIDClusterConfigParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud configs maas Uid cluster config params +func (o *V1CloudConfigsMaasUIDClusterConfigParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud configs maas Uid cluster config params +func (o *V1CloudConfigsMaasUIDClusterConfigParams) WithContext(ctx context.Context) *V1CloudConfigsMaasUIDClusterConfigParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud configs maas Uid cluster config params +func (o *V1CloudConfigsMaasUIDClusterConfigParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud configs maas Uid cluster config params +func (o *V1CloudConfigsMaasUIDClusterConfigParams) WithHTTPClient(client *http.Client) *V1CloudConfigsMaasUIDClusterConfigParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud configs maas Uid cluster config params +func (o *V1CloudConfigsMaasUIDClusterConfigParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 cloud configs maas Uid cluster config params +func (o *V1CloudConfigsMaasUIDClusterConfigParams) WithBody(body *models.V1MaasCloudClusterConfigEntity) *V1CloudConfigsMaasUIDClusterConfigParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 cloud configs maas Uid cluster config params +func (o *V1CloudConfigsMaasUIDClusterConfigParams) SetBody(body *models.V1MaasCloudClusterConfigEntity) { + o.Body = body +} + +// WithConfigUID adds the configUID to the v1 cloud configs maas Uid cluster config params +func (o *V1CloudConfigsMaasUIDClusterConfigParams) WithConfigUID(configUID string) *V1CloudConfigsMaasUIDClusterConfigParams { + o.SetConfigUID(configUID) + return o +} + +// SetConfigUID adds the configUid to the v1 cloud configs maas Uid cluster config params +func (o *V1CloudConfigsMaasUIDClusterConfigParams) SetConfigUID(configUID string) { + o.ConfigUID = configUID +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudConfigsMaasUIDClusterConfigParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param configUid + if err := r.SetPathParam("configUid", o.ConfigUID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_configs_maas_uid_cluster_config_responses.go b/api/client/v1/v1_cloud_configs_maas_uid_cluster_config_responses.go new file mode 100644 index 00000000..e370aaa8 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_maas_uid_cluster_config_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1CloudConfigsMaasUIDClusterConfigReader is a Reader for the V1CloudConfigsMaasUIDClusterConfig structure. +type V1CloudConfigsMaasUIDClusterConfigReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudConfigsMaasUIDClusterConfigReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1CloudConfigsMaasUIDClusterConfigNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudConfigsMaasUIDClusterConfigNoContent creates a V1CloudConfigsMaasUIDClusterConfigNoContent with default headers values +func NewV1CloudConfigsMaasUIDClusterConfigNoContent() *V1CloudConfigsMaasUIDClusterConfigNoContent { + return &V1CloudConfigsMaasUIDClusterConfigNoContent{} +} + +/* +V1CloudConfigsMaasUIDClusterConfigNoContent handles this case with default header values. + +The resource was updated successfully +*/ +type V1CloudConfigsMaasUIDClusterConfigNoContent struct { +} + +func (o *V1CloudConfigsMaasUIDClusterConfigNoContent) Error() string { + return fmt.Sprintf("[PUT /v1/cloudconfigs/maas/{configUid}/clusterConfig][%d] v1CloudConfigsMaasUidClusterConfigNoContent ", 204) +} + +func (o *V1CloudConfigsMaasUIDClusterConfigNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_cloud_configs_machine_pools_machine_uid_maintenance_status_update_parameters.go b/api/client/v1/v1_cloud_configs_machine_pools_machine_uid_maintenance_status_update_parameters.go new file mode 100644 index 00000000..1fecbf55 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_machine_pools_machine_uid_maintenance_status_update_parameters.go @@ -0,0 +1,220 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1CloudConfigsMachinePoolsMachineUIDMaintenanceStatusUpdateParams creates a new V1CloudConfigsMachinePoolsMachineUIDMaintenanceStatusUpdateParams object +// with the default values initialized. +func NewV1CloudConfigsMachinePoolsMachineUIDMaintenanceStatusUpdateParams() *V1CloudConfigsMachinePoolsMachineUIDMaintenanceStatusUpdateParams { + var () + return &V1CloudConfigsMachinePoolsMachineUIDMaintenanceStatusUpdateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudConfigsMachinePoolsMachineUIDMaintenanceStatusUpdateParamsWithTimeout creates a new V1CloudConfigsMachinePoolsMachineUIDMaintenanceStatusUpdateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudConfigsMachinePoolsMachineUIDMaintenanceStatusUpdateParamsWithTimeout(timeout time.Duration) *V1CloudConfigsMachinePoolsMachineUIDMaintenanceStatusUpdateParams { + var () + return &V1CloudConfigsMachinePoolsMachineUIDMaintenanceStatusUpdateParams{ + + timeout: timeout, + } +} + +// NewV1CloudConfigsMachinePoolsMachineUIDMaintenanceStatusUpdateParamsWithContext creates a new V1CloudConfigsMachinePoolsMachineUIDMaintenanceStatusUpdateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudConfigsMachinePoolsMachineUIDMaintenanceStatusUpdateParamsWithContext(ctx context.Context) *V1CloudConfigsMachinePoolsMachineUIDMaintenanceStatusUpdateParams { + var () + return &V1CloudConfigsMachinePoolsMachineUIDMaintenanceStatusUpdateParams{ + + Context: ctx, + } +} + +// NewV1CloudConfigsMachinePoolsMachineUIDMaintenanceStatusUpdateParamsWithHTTPClient creates a new V1CloudConfigsMachinePoolsMachineUIDMaintenanceStatusUpdateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudConfigsMachinePoolsMachineUIDMaintenanceStatusUpdateParamsWithHTTPClient(client *http.Client) *V1CloudConfigsMachinePoolsMachineUIDMaintenanceStatusUpdateParams { + var () + return &V1CloudConfigsMachinePoolsMachineUIDMaintenanceStatusUpdateParams{ + HTTPClient: client, + } +} + +/* +V1CloudConfigsMachinePoolsMachineUIDMaintenanceStatusUpdateParams contains all the parameters to send to the API endpoint +for the v1 cloud configs machine pools machine Uid maintenance status update operation typically these are written to a http.Request +*/ +type V1CloudConfigsMachinePoolsMachineUIDMaintenanceStatusUpdateParams struct { + + /*Body*/ + Body *models.V1MachineMaintenanceStatus + /*CloudType + Cloud type + + */ + CloudType string + /*ConfigUID + Cluster's cloud config uid + + */ + ConfigUID string + /*MachinePoolName + Machine pool name + + */ + MachinePoolName string + /*MachineUID + Machine uid + + */ + MachineUID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud configs machine pools machine Uid maintenance status update params +func (o *V1CloudConfigsMachinePoolsMachineUIDMaintenanceStatusUpdateParams) WithTimeout(timeout time.Duration) *V1CloudConfigsMachinePoolsMachineUIDMaintenanceStatusUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud configs machine pools machine Uid maintenance status update params +func (o *V1CloudConfigsMachinePoolsMachineUIDMaintenanceStatusUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud configs machine pools machine Uid maintenance status update params +func (o *V1CloudConfigsMachinePoolsMachineUIDMaintenanceStatusUpdateParams) WithContext(ctx context.Context) *V1CloudConfigsMachinePoolsMachineUIDMaintenanceStatusUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud configs machine pools machine Uid maintenance status update params +func (o *V1CloudConfigsMachinePoolsMachineUIDMaintenanceStatusUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud configs machine pools machine Uid maintenance status update params +func (o *V1CloudConfigsMachinePoolsMachineUIDMaintenanceStatusUpdateParams) WithHTTPClient(client *http.Client) *V1CloudConfigsMachinePoolsMachineUIDMaintenanceStatusUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud configs machine pools machine Uid maintenance status update params +func (o *V1CloudConfigsMachinePoolsMachineUIDMaintenanceStatusUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 cloud configs machine pools machine Uid maintenance status update params +func (o *V1CloudConfigsMachinePoolsMachineUIDMaintenanceStatusUpdateParams) WithBody(body *models.V1MachineMaintenanceStatus) *V1CloudConfigsMachinePoolsMachineUIDMaintenanceStatusUpdateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 cloud configs machine pools machine Uid maintenance status update params +func (o *V1CloudConfigsMachinePoolsMachineUIDMaintenanceStatusUpdateParams) SetBody(body *models.V1MachineMaintenanceStatus) { + o.Body = body +} + +// WithCloudType adds the cloudType to the v1 cloud configs machine pools machine Uid maintenance status update params +func (o *V1CloudConfigsMachinePoolsMachineUIDMaintenanceStatusUpdateParams) WithCloudType(cloudType string) *V1CloudConfigsMachinePoolsMachineUIDMaintenanceStatusUpdateParams { + o.SetCloudType(cloudType) + return o +} + +// SetCloudType adds the cloudType to the v1 cloud configs machine pools machine Uid maintenance status update params +func (o *V1CloudConfigsMachinePoolsMachineUIDMaintenanceStatusUpdateParams) SetCloudType(cloudType string) { + o.CloudType = cloudType +} + +// WithConfigUID adds the configUID to the v1 cloud configs machine pools machine Uid maintenance status update params +func (o *V1CloudConfigsMachinePoolsMachineUIDMaintenanceStatusUpdateParams) WithConfigUID(configUID string) *V1CloudConfigsMachinePoolsMachineUIDMaintenanceStatusUpdateParams { + o.SetConfigUID(configUID) + return o +} + +// SetConfigUID adds the configUid to the v1 cloud configs machine pools machine Uid maintenance status update params +func (o *V1CloudConfigsMachinePoolsMachineUIDMaintenanceStatusUpdateParams) SetConfigUID(configUID string) { + o.ConfigUID = configUID +} + +// WithMachinePoolName adds the machinePoolName to the v1 cloud configs machine pools machine Uid maintenance status update params +func (o *V1CloudConfigsMachinePoolsMachineUIDMaintenanceStatusUpdateParams) WithMachinePoolName(machinePoolName string) *V1CloudConfigsMachinePoolsMachineUIDMaintenanceStatusUpdateParams { + o.SetMachinePoolName(machinePoolName) + return o +} + +// SetMachinePoolName adds the machinePoolName to the v1 cloud configs machine pools machine Uid maintenance status update params +func (o *V1CloudConfigsMachinePoolsMachineUIDMaintenanceStatusUpdateParams) SetMachinePoolName(machinePoolName string) { + o.MachinePoolName = machinePoolName +} + +// WithMachineUID adds the machineUID to the v1 cloud configs machine pools machine Uid maintenance status update params +func (o *V1CloudConfigsMachinePoolsMachineUIDMaintenanceStatusUpdateParams) WithMachineUID(machineUID string) *V1CloudConfigsMachinePoolsMachineUIDMaintenanceStatusUpdateParams { + o.SetMachineUID(machineUID) + return o +} + +// SetMachineUID adds the machineUid to the v1 cloud configs machine pools machine Uid maintenance status update params +func (o *V1CloudConfigsMachinePoolsMachineUIDMaintenanceStatusUpdateParams) SetMachineUID(machineUID string) { + o.MachineUID = machineUID +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudConfigsMachinePoolsMachineUIDMaintenanceStatusUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param cloudType + if err := r.SetPathParam("cloudType", o.CloudType); err != nil { + return err + } + + // path param configUid + if err := r.SetPathParam("configUid", o.ConfigUID); err != nil { + return err + } + + // path param machinePoolName + if err := r.SetPathParam("machinePoolName", o.MachinePoolName); err != nil { + return err + } + + // path param machineUid + if err := r.SetPathParam("machineUid", o.MachineUID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_configs_machine_pools_machine_uid_maintenance_status_update_responses.go b/api/client/v1/v1_cloud_configs_machine_pools_machine_uid_maintenance_status_update_responses.go new file mode 100644 index 00000000..6bc220fc --- /dev/null +++ b/api/client/v1/v1_cloud_configs_machine_pools_machine_uid_maintenance_status_update_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1CloudConfigsMachinePoolsMachineUIDMaintenanceStatusUpdateReader is a Reader for the V1CloudConfigsMachinePoolsMachineUIDMaintenanceStatusUpdate structure. +type V1CloudConfigsMachinePoolsMachineUIDMaintenanceStatusUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudConfigsMachinePoolsMachineUIDMaintenanceStatusUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1CloudConfigsMachinePoolsMachineUIDMaintenanceStatusUpdateNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudConfigsMachinePoolsMachineUIDMaintenanceStatusUpdateNoContent creates a V1CloudConfigsMachinePoolsMachineUIDMaintenanceStatusUpdateNoContent with default headers values +func NewV1CloudConfigsMachinePoolsMachineUIDMaintenanceStatusUpdateNoContent() *V1CloudConfigsMachinePoolsMachineUIDMaintenanceStatusUpdateNoContent { + return &V1CloudConfigsMachinePoolsMachineUIDMaintenanceStatusUpdateNoContent{} +} + +/* +V1CloudConfigsMachinePoolsMachineUIDMaintenanceStatusUpdateNoContent handles this case with default header values. + +The resource was updated successfully +*/ +type V1CloudConfigsMachinePoolsMachineUIDMaintenanceStatusUpdateNoContent struct { +} + +func (o *V1CloudConfigsMachinePoolsMachineUIDMaintenanceStatusUpdateNoContent) Error() string { + return fmt.Sprintf("[PUT /v1/cloudconfigs/{cloudType}/{configUid}/machinePools/{machinePoolName}/machines/{machineUid}/maintenance/status][%d] v1CloudConfigsMachinePoolsMachineUidMaintenanceStatusUpdateNoContent ", 204) +} + +func (o *V1CloudConfigsMachinePoolsMachineUIDMaintenanceStatusUpdateNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_cloud_configs_machine_pools_machine_uid_maintenance_update_parameters.go b/api/client/v1/v1_cloud_configs_machine_pools_machine_uid_maintenance_update_parameters.go new file mode 100644 index 00000000..4034db1f --- /dev/null +++ b/api/client/v1/v1_cloud_configs_machine_pools_machine_uid_maintenance_update_parameters.go @@ -0,0 +1,220 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1CloudConfigsMachinePoolsMachineUIDMaintenanceUpdateParams creates a new V1CloudConfigsMachinePoolsMachineUIDMaintenanceUpdateParams object +// with the default values initialized. +func NewV1CloudConfigsMachinePoolsMachineUIDMaintenanceUpdateParams() *V1CloudConfigsMachinePoolsMachineUIDMaintenanceUpdateParams { + var () + return &V1CloudConfigsMachinePoolsMachineUIDMaintenanceUpdateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudConfigsMachinePoolsMachineUIDMaintenanceUpdateParamsWithTimeout creates a new V1CloudConfigsMachinePoolsMachineUIDMaintenanceUpdateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudConfigsMachinePoolsMachineUIDMaintenanceUpdateParamsWithTimeout(timeout time.Duration) *V1CloudConfigsMachinePoolsMachineUIDMaintenanceUpdateParams { + var () + return &V1CloudConfigsMachinePoolsMachineUIDMaintenanceUpdateParams{ + + timeout: timeout, + } +} + +// NewV1CloudConfigsMachinePoolsMachineUIDMaintenanceUpdateParamsWithContext creates a new V1CloudConfigsMachinePoolsMachineUIDMaintenanceUpdateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudConfigsMachinePoolsMachineUIDMaintenanceUpdateParamsWithContext(ctx context.Context) *V1CloudConfigsMachinePoolsMachineUIDMaintenanceUpdateParams { + var () + return &V1CloudConfigsMachinePoolsMachineUIDMaintenanceUpdateParams{ + + Context: ctx, + } +} + +// NewV1CloudConfigsMachinePoolsMachineUIDMaintenanceUpdateParamsWithHTTPClient creates a new V1CloudConfigsMachinePoolsMachineUIDMaintenanceUpdateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudConfigsMachinePoolsMachineUIDMaintenanceUpdateParamsWithHTTPClient(client *http.Client) *V1CloudConfigsMachinePoolsMachineUIDMaintenanceUpdateParams { + var () + return &V1CloudConfigsMachinePoolsMachineUIDMaintenanceUpdateParams{ + HTTPClient: client, + } +} + +/* +V1CloudConfigsMachinePoolsMachineUIDMaintenanceUpdateParams contains all the parameters to send to the API endpoint +for the v1 cloud configs machine pools machine Uid maintenance update operation typically these are written to a http.Request +*/ +type V1CloudConfigsMachinePoolsMachineUIDMaintenanceUpdateParams struct { + + /*Body*/ + Body *models.V1MachineMaintenance + /*CloudType + Cloud type + + */ + CloudType string + /*ConfigUID + Cluster's cloud config uid + + */ + ConfigUID string + /*MachinePoolName + Machine pool name + + */ + MachinePoolName string + /*MachineUID + Machine uid + + */ + MachineUID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud configs machine pools machine Uid maintenance update params +func (o *V1CloudConfigsMachinePoolsMachineUIDMaintenanceUpdateParams) WithTimeout(timeout time.Duration) *V1CloudConfigsMachinePoolsMachineUIDMaintenanceUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud configs machine pools machine Uid maintenance update params +func (o *V1CloudConfigsMachinePoolsMachineUIDMaintenanceUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud configs machine pools machine Uid maintenance update params +func (o *V1CloudConfigsMachinePoolsMachineUIDMaintenanceUpdateParams) WithContext(ctx context.Context) *V1CloudConfigsMachinePoolsMachineUIDMaintenanceUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud configs machine pools machine Uid maintenance update params +func (o *V1CloudConfigsMachinePoolsMachineUIDMaintenanceUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud configs machine pools machine Uid maintenance update params +func (o *V1CloudConfigsMachinePoolsMachineUIDMaintenanceUpdateParams) WithHTTPClient(client *http.Client) *V1CloudConfigsMachinePoolsMachineUIDMaintenanceUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud configs machine pools machine Uid maintenance update params +func (o *V1CloudConfigsMachinePoolsMachineUIDMaintenanceUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 cloud configs machine pools machine Uid maintenance update params +func (o *V1CloudConfigsMachinePoolsMachineUIDMaintenanceUpdateParams) WithBody(body *models.V1MachineMaintenance) *V1CloudConfigsMachinePoolsMachineUIDMaintenanceUpdateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 cloud configs machine pools machine Uid maintenance update params +func (o *V1CloudConfigsMachinePoolsMachineUIDMaintenanceUpdateParams) SetBody(body *models.V1MachineMaintenance) { + o.Body = body +} + +// WithCloudType adds the cloudType to the v1 cloud configs machine pools machine Uid maintenance update params +func (o *V1CloudConfigsMachinePoolsMachineUIDMaintenanceUpdateParams) WithCloudType(cloudType string) *V1CloudConfigsMachinePoolsMachineUIDMaintenanceUpdateParams { + o.SetCloudType(cloudType) + return o +} + +// SetCloudType adds the cloudType to the v1 cloud configs machine pools machine Uid maintenance update params +func (o *V1CloudConfigsMachinePoolsMachineUIDMaintenanceUpdateParams) SetCloudType(cloudType string) { + o.CloudType = cloudType +} + +// WithConfigUID adds the configUID to the v1 cloud configs machine pools machine Uid maintenance update params +func (o *V1CloudConfigsMachinePoolsMachineUIDMaintenanceUpdateParams) WithConfigUID(configUID string) *V1CloudConfigsMachinePoolsMachineUIDMaintenanceUpdateParams { + o.SetConfigUID(configUID) + return o +} + +// SetConfigUID adds the configUid to the v1 cloud configs machine pools machine Uid maintenance update params +func (o *V1CloudConfigsMachinePoolsMachineUIDMaintenanceUpdateParams) SetConfigUID(configUID string) { + o.ConfigUID = configUID +} + +// WithMachinePoolName adds the machinePoolName to the v1 cloud configs machine pools machine Uid maintenance update params +func (o *V1CloudConfigsMachinePoolsMachineUIDMaintenanceUpdateParams) WithMachinePoolName(machinePoolName string) *V1CloudConfigsMachinePoolsMachineUIDMaintenanceUpdateParams { + o.SetMachinePoolName(machinePoolName) + return o +} + +// SetMachinePoolName adds the machinePoolName to the v1 cloud configs machine pools machine Uid maintenance update params +func (o *V1CloudConfigsMachinePoolsMachineUIDMaintenanceUpdateParams) SetMachinePoolName(machinePoolName string) { + o.MachinePoolName = machinePoolName +} + +// WithMachineUID adds the machineUID to the v1 cloud configs machine pools machine Uid maintenance update params +func (o *V1CloudConfigsMachinePoolsMachineUIDMaintenanceUpdateParams) WithMachineUID(machineUID string) *V1CloudConfigsMachinePoolsMachineUIDMaintenanceUpdateParams { + o.SetMachineUID(machineUID) + return o +} + +// SetMachineUID adds the machineUid to the v1 cloud configs machine pools machine Uid maintenance update params +func (o *V1CloudConfigsMachinePoolsMachineUIDMaintenanceUpdateParams) SetMachineUID(machineUID string) { + o.MachineUID = machineUID +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudConfigsMachinePoolsMachineUIDMaintenanceUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param cloudType + if err := r.SetPathParam("cloudType", o.CloudType); err != nil { + return err + } + + // path param configUid + if err := r.SetPathParam("configUid", o.ConfigUID); err != nil { + return err + } + + // path param machinePoolName + if err := r.SetPathParam("machinePoolName", o.MachinePoolName); err != nil { + return err + } + + // path param machineUid + if err := r.SetPathParam("machineUid", o.MachineUID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_configs_machine_pools_machine_uid_maintenance_update_responses.go b/api/client/v1/v1_cloud_configs_machine_pools_machine_uid_maintenance_update_responses.go new file mode 100644 index 00000000..a7776a29 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_machine_pools_machine_uid_maintenance_update_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1CloudConfigsMachinePoolsMachineUIDMaintenanceUpdateReader is a Reader for the V1CloudConfigsMachinePoolsMachineUIDMaintenanceUpdate structure. +type V1CloudConfigsMachinePoolsMachineUIDMaintenanceUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudConfigsMachinePoolsMachineUIDMaintenanceUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1CloudConfigsMachinePoolsMachineUIDMaintenanceUpdateNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudConfigsMachinePoolsMachineUIDMaintenanceUpdateNoContent creates a V1CloudConfigsMachinePoolsMachineUIDMaintenanceUpdateNoContent with default headers values +func NewV1CloudConfigsMachinePoolsMachineUIDMaintenanceUpdateNoContent() *V1CloudConfigsMachinePoolsMachineUIDMaintenanceUpdateNoContent { + return &V1CloudConfigsMachinePoolsMachineUIDMaintenanceUpdateNoContent{} +} + +/* +V1CloudConfigsMachinePoolsMachineUIDMaintenanceUpdateNoContent handles this case with default header values. + +The resource was updated successfully +*/ +type V1CloudConfigsMachinePoolsMachineUIDMaintenanceUpdateNoContent struct { +} + +func (o *V1CloudConfigsMachinePoolsMachineUIDMaintenanceUpdateNoContent) Error() string { + return fmt.Sprintf("[PUT /v1/cloudconfigs/{cloudType}/{configUid}/machinePools/{machinePoolName}/machines/{machineUid}/maintenance][%d] v1CloudConfigsMachinePoolsMachineUidMaintenanceUpdateNoContent ", 204) +} + +func (o *V1CloudConfigsMachinePoolsMachineUIDMaintenanceUpdateNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_cloud_configs_machine_pools_machine_uids_get_parameters.go b/api/client/v1/v1_cloud_configs_machine_pools_machine_uids_get_parameters.go new file mode 100644 index 00000000..1684f872 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_machine_pools_machine_uids_get_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1CloudConfigsMachinePoolsMachineUidsGetParams creates a new V1CloudConfigsMachinePoolsMachineUidsGetParams object +// with the default values initialized. +func NewV1CloudConfigsMachinePoolsMachineUidsGetParams() *V1CloudConfigsMachinePoolsMachineUidsGetParams { + var () + return &V1CloudConfigsMachinePoolsMachineUidsGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudConfigsMachinePoolsMachineUidsGetParamsWithTimeout creates a new V1CloudConfigsMachinePoolsMachineUidsGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudConfigsMachinePoolsMachineUidsGetParamsWithTimeout(timeout time.Duration) *V1CloudConfigsMachinePoolsMachineUidsGetParams { + var () + return &V1CloudConfigsMachinePoolsMachineUidsGetParams{ + + timeout: timeout, + } +} + +// NewV1CloudConfigsMachinePoolsMachineUidsGetParamsWithContext creates a new V1CloudConfigsMachinePoolsMachineUidsGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudConfigsMachinePoolsMachineUidsGetParamsWithContext(ctx context.Context) *V1CloudConfigsMachinePoolsMachineUidsGetParams { + var () + return &V1CloudConfigsMachinePoolsMachineUidsGetParams{ + + Context: ctx, + } +} + +// NewV1CloudConfigsMachinePoolsMachineUidsGetParamsWithHTTPClient creates a new V1CloudConfigsMachinePoolsMachineUidsGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudConfigsMachinePoolsMachineUidsGetParamsWithHTTPClient(client *http.Client) *V1CloudConfigsMachinePoolsMachineUidsGetParams { + var () + return &V1CloudConfigsMachinePoolsMachineUidsGetParams{ + HTTPClient: client, + } +} + +/* +V1CloudConfigsMachinePoolsMachineUidsGetParams contains all the parameters to send to the API endpoint +for the v1 cloud configs machine pools machine uids get operation typically these are written to a http.Request +*/ +type V1CloudConfigsMachinePoolsMachineUidsGetParams struct { + + /*ConfigUID + Cluster's cloud config uid + + */ + ConfigUID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud configs machine pools machine uids get params +func (o *V1CloudConfigsMachinePoolsMachineUidsGetParams) WithTimeout(timeout time.Duration) *V1CloudConfigsMachinePoolsMachineUidsGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud configs machine pools machine uids get params +func (o *V1CloudConfigsMachinePoolsMachineUidsGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud configs machine pools machine uids get params +func (o *V1CloudConfigsMachinePoolsMachineUidsGetParams) WithContext(ctx context.Context) *V1CloudConfigsMachinePoolsMachineUidsGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud configs machine pools machine uids get params +func (o *V1CloudConfigsMachinePoolsMachineUidsGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud configs machine pools machine uids get params +func (o *V1CloudConfigsMachinePoolsMachineUidsGetParams) WithHTTPClient(client *http.Client) *V1CloudConfigsMachinePoolsMachineUidsGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud configs machine pools machine uids get params +func (o *V1CloudConfigsMachinePoolsMachineUidsGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithConfigUID adds the configUID to the v1 cloud configs machine pools machine uids get params +func (o *V1CloudConfigsMachinePoolsMachineUidsGetParams) WithConfigUID(configUID string) *V1CloudConfigsMachinePoolsMachineUidsGetParams { + o.SetConfigUID(configUID) + return o +} + +// SetConfigUID adds the configUid to the v1 cloud configs machine pools machine uids get params +func (o *V1CloudConfigsMachinePoolsMachineUidsGetParams) SetConfigUID(configUID string) { + o.ConfigUID = configUID +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudConfigsMachinePoolsMachineUidsGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param configUid + if err := r.SetPathParam("configUid", o.ConfigUID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_configs_machine_pools_machine_uids_get_responses.go b/api/client/v1/v1_cloud_configs_machine_pools_machine_uids_get_responses.go new file mode 100644 index 00000000..5999b18d --- /dev/null +++ b/api/client/v1/v1_cloud_configs_machine_pools_machine_uids_get_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1CloudConfigsMachinePoolsMachineUidsGetReader is a Reader for the V1CloudConfigsMachinePoolsMachineUidsGet structure. +type V1CloudConfigsMachinePoolsMachineUidsGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudConfigsMachinePoolsMachineUidsGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1CloudConfigsMachinePoolsMachineUidsGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudConfigsMachinePoolsMachineUidsGetOK creates a V1CloudConfigsMachinePoolsMachineUidsGetOK with default headers values +func NewV1CloudConfigsMachinePoolsMachineUidsGetOK() *V1CloudConfigsMachinePoolsMachineUidsGetOK { + return &V1CloudConfigsMachinePoolsMachineUidsGetOK{} +} + +/* +V1CloudConfigsMachinePoolsMachineUidsGetOK handles this case with default header values. + +OK +*/ +type V1CloudConfigsMachinePoolsMachineUidsGetOK struct { + Payload *models.V1MachinePoolsMachineUids +} + +func (o *V1CloudConfigsMachinePoolsMachineUidsGetOK) Error() string { + return fmt.Sprintf("[GET /v1/cloudconfigs/{configUid}/machinePools/machineUids][%d] v1CloudConfigsMachinePoolsMachineUidsGetOK %+v", 200, o.Payload) +} + +func (o *V1CloudConfigsMachinePoolsMachineUidsGetOK) GetPayload() *models.V1MachinePoolsMachineUids { + return o.Payload +} + +func (o *V1CloudConfigsMachinePoolsMachineUidsGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1MachinePoolsMachineUids) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_cloud_configs_open_stack_get_parameters.go b/api/client/v1/v1_cloud_configs_open_stack_get_parameters.go new file mode 100644 index 00000000..bf59f297 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_open_stack_get_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1CloudConfigsOpenStackGetParams creates a new V1CloudConfigsOpenStackGetParams object +// with the default values initialized. +func NewV1CloudConfigsOpenStackGetParams() *V1CloudConfigsOpenStackGetParams { + var () + return &V1CloudConfigsOpenStackGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudConfigsOpenStackGetParamsWithTimeout creates a new V1CloudConfigsOpenStackGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudConfigsOpenStackGetParamsWithTimeout(timeout time.Duration) *V1CloudConfigsOpenStackGetParams { + var () + return &V1CloudConfigsOpenStackGetParams{ + + timeout: timeout, + } +} + +// NewV1CloudConfigsOpenStackGetParamsWithContext creates a new V1CloudConfigsOpenStackGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudConfigsOpenStackGetParamsWithContext(ctx context.Context) *V1CloudConfigsOpenStackGetParams { + var () + return &V1CloudConfigsOpenStackGetParams{ + + Context: ctx, + } +} + +// NewV1CloudConfigsOpenStackGetParamsWithHTTPClient creates a new V1CloudConfigsOpenStackGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudConfigsOpenStackGetParamsWithHTTPClient(client *http.Client) *V1CloudConfigsOpenStackGetParams { + var () + return &V1CloudConfigsOpenStackGetParams{ + HTTPClient: client, + } +} + +/* +V1CloudConfigsOpenStackGetParams contains all the parameters to send to the API endpoint +for the v1 cloud configs open stack get operation typically these are written to a http.Request +*/ +type V1CloudConfigsOpenStackGetParams struct { + + /*ConfigUID + Cluster's cloud config uid + + */ + ConfigUID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud configs open stack get params +func (o *V1CloudConfigsOpenStackGetParams) WithTimeout(timeout time.Duration) *V1CloudConfigsOpenStackGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud configs open stack get params +func (o *V1CloudConfigsOpenStackGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud configs open stack get params +func (o *V1CloudConfigsOpenStackGetParams) WithContext(ctx context.Context) *V1CloudConfigsOpenStackGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud configs open stack get params +func (o *V1CloudConfigsOpenStackGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud configs open stack get params +func (o *V1CloudConfigsOpenStackGetParams) WithHTTPClient(client *http.Client) *V1CloudConfigsOpenStackGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud configs open stack get params +func (o *V1CloudConfigsOpenStackGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithConfigUID adds the configUID to the v1 cloud configs open stack get params +func (o *V1CloudConfigsOpenStackGetParams) WithConfigUID(configUID string) *V1CloudConfigsOpenStackGetParams { + o.SetConfigUID(configUID) + return o +} + +// SetConfigUID adds the configUid to the v1 cloud configs open stack get params +func (o *V1CloudConfigsOpenStackGetParams) SetConfigUID(configUID string) { + o.ConfigUID = configUID +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudConfigsOpenStackGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param configUid + if err := r.SetPathParam("configUid", o.ConfigUID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_configs_open_stack_get_responses.go b/api/client/v1/v1_cloud_configs_open_stack_get_responses.go new file mode 100644 index 00000000..5aab0b4c --- /dev/null +++ b/api/client/v1/v1_cloud_configs_open_stack_get_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1CloudConfigsOpenStackGetReader is a Reader for the V1CloudConfigsOpenStackGet structure. +type V1CloudConfigsOpenStackGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudConfigsOpenStackGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1CloudConfigsOpenStackGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudConfigsOpenStackGetOK creates a V1CloudConfigsOpenStackGetOK with default headers values +func NewV1CloudConfigsOpenStackGetOK() *V1CloudConfigsOpenStackGetOK { + return &V1CloudConfigsOpenStackGetOK{} +} + +/* +V1CloudConfigsOpenStackGetOK handles this case with default header values. + +OK +*/ +type V1CloudConfigsOpenStackGetOK struct { + Payload *models.V1OpenStackCloudConfig +} + +func (o *V1CloudConfigsOpenStackGetOK) Error() string { + return fmt.Sprintf("[GET /v1/cloudconfigs/openstack/{configUid}][%d] v1CloudConfigsOpenStackGetOK %+v", 200, o.Payload) +} + +func (o *V1CloudConfigsOpenStackGetOK) GetPayload() *models.V1OpenStackCloudConfig { + return o.Payload +} + +func (o *V1CloudConfigsOpenStackGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1OpenStackCloudConfig) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_cloud_configs_open_stack_machine_pool_create_parameters.go b/api/client/v1/v1_cloud_configs_open_stack_machine_pool_create_parameters.go new file mode 100644 index 00000000..636a02c1 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_open_stack_machine_pool_create_parameters.go @@ -0,0 +1,157 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1CloudConfigsOpenStackMachinePoolCreateParams creates a new V1CloudConfigsOpenStackMachinePoolCreateParams object +// with the default values initialized. +func NewV1CloudConfigsOpenStackMachinePoolCreateParams() *V1CloudConfigsOpenStackMachinePoolCreateParams { + var () + return &V1CloudConfigsOpenStackMachinePoolCreateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudConfigsOpenStackMachinePoolCreateParamsWithTimeout creates a new V1CloudConfigsOpenStackMachinePoolCreateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudConfigsOpenStackMachinePoolCreateParamsWithTimeout(timeout time.Duration) *V1CloudConfigsOpenStackMachinePoolCreateParams { + var () + return &V1CloudConfigsOpenStackMachinePoolCreateParams{ + + timeout: timeout, + } +} + +// NewV1CloudConfigsOpenStackMachinePoolCreateParamsWithContext creates a new V1CloudConfigsOpenStackMachinePoolCreateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudConfigsOpenStackMachinePoolCreateParamsWithContext(ctx context.Context) *V1CloudConfigsOpenStackMachinePoolCreateParams { + var () + return &V1CloudConfigsOpenStackMachinePoolCreateParams{ + + Context: ctx, + } +} + +// NewV1CloudConfigsOpenStackMachinePoolCreateParamsWithHTTPClient creates a new V1CloudConfigsOpenStackMachinePoolCreateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudConfigsOpenStackMachinePoolCreateParamsWithHTTPClient(client *http.Client) *V1CloudConfigsOpenStackMachinePoolCreateParams { + var () + return &V1CloudConfigsOpenStackMachinePoolCreateParams{ + HTTPClient: client, + } +} + +/* +V1CloudConfigsOpenStackMachinePoolCreateParams contains all the parameters to send to the API endpoint +for the v1 cloud configs open stack machine pool create operation typically these are written to a http.Request +*/ +type V1CloudConfigsOpenStackMachinePoolCreateParams struct { + + /*Body*/ + Body *models.V1OpenStackMachinePoolConfigEntity + /*ConfigUID + Cluster's cloud config uid + + */ + ConfigUID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud configs open stack machine pool create params +func (o *V1CloudConfigsOpenStackMachinePoolCreateParams) WithTimeout(timeout time.Duration) *V1CloudConfigsOpenStackMachinePoolCreateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud configs open stack machine pool create params +func (o *V1CloudConfigsOpenStackMachinePoolCreateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud configs open stack machine pool create params +func (o *V1CloudConfigsOpenStackMachinePoolCreateParams) WithContext(ctx context.Context) *V1CloudConfigsOpenStackMachinePoolCreateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud configs open stack machine pool create params +func (o *V1CloudConfigsOpenStackMachinePoolCreateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud configs open stack machine pool create params +func (o *V1CloudConfigsOpenStackMachinePoolCreateParams) WithHTTPClient(client *http.Client) *V1CloudConfigsOpenStackMachinePoolCreateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud configs open stack machine pool create params +func (o *V1CloudConfigsOpenStackMachinePoolCreateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 cloud configs open stack machine pool create params +func (o *V1CloudConfigsOpenStackMachinePoolCreateParams) WithBody(body *models.V1OpenStackMachinePoolConfigEntity) *V1CloudConfigsOpenStackMachinePoolCreateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 cloud configs open stack machine pool create params +func (o *V1CloudConfigsOpenStackMachinePoolCreateParams) SetBody(body *models.V1OpenStackMachinePoolConfigEntity) { + o.Body = body +} + +// WithConfigUID adds the configUID to the v1 cloud configs open stack machine pool create params +func (o *V1CloudConfigsOpenStackMachinePoolCreateParams) WithConfigUID(configUID string) *V1CloudConfigsOpenStackMachinePoolCreateParams { + o.SetConfigUID(configUID) + return o +} + +// SetConfigUID adds the configUid to the v1 cloud configs open stack machine pool create params +func (o *V1CloudConfigsOpenStackMachinePoolCreateParams) SetConfigUID(configUID string) { + o.ConfigUID = configUID +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudConfigsOpenStackMachinePoolCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param configUid + if err := r.SetPathParam("configUid", o.ConfigUID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_configs_open_stack_machine_pool_create_responses.go b/api/client/v1/v1_cloud_configs_open_stack_machine_pool_create_responses.go new file mode 100644 index 00000000..95791e83 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_open_stack_machine_pool_create_responses.go @@ -0,0 +1,77 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1CloudConfigsOpenStackMachinePoolCreateReader is a Reader for the V1CloudConfigsOpenStackMachinePoolCreate structure. +type V1CloudConfigsOpenStackMachinePoolCreateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudConfigsOpenStackMachinePoolCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 201: + result := NewV1CloudConfigsOpenStackMachinePoolCreateCreated() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudConfigsOpenStackMachinePoolCreateCreated creates a V1CloudConfigsOpenStackMachinePoolCreateCreated with default headers values +func NewV1CloudConfigsOpenStackMachinePoolCreateCreated() *V1CloudConfigsOpenStackMachinePoolCreateCreated { + return &V1CloudConfigsOpenStackMachinePoolCreateCreated{} +} + +/* +V1CloudConfigsOpenStackMachinePoolCreateCreated handles this case with default header values. + +Created successfully +*/ +type V1CloudConfigsOpenStackMachinePoolCreateCreated struct { + /*Audit uid for the request + */ + AuditUID string + + Payload *models.V1UID +} + +func (o *V1CloudConfigsOpenStackMachinePoolCreateCreated) Error() string { + return fmt.Sprintf("[POST /v1/cloudconfigs/openstack/{configUid}/machinePools][%d] v1CloudConfigsOpenStackMachinePoolCreateCreated %+v", 201, o.Payload) +} + +func (o *V1CloudConfigsOpenStackMachinePoolCreateCreated) GetPayload() *models.V1UID { + return o.Payload +} + +func (o *V1CloudConfigsOpenStackMachinePoolCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header AuditUid + o.AuditUID = response.GetHeader("AuditUid") + + o.Payload = new(models.V1UID) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_cloud_configs_open_stack_machine_pool_delete_parameters.go b/api/client/v1/v1_cloud_configs_open_stack_machine_pool_delete_parameters.go new file mode 100644 index 00000000..61991b5b --- /dev/null +++ b/api/client/v1/v1_cloud_configs_open_stack_machine_pool_delete_parameters.go @@ -0,0 +1,157 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1CloudConfigsOpenStackMachinePoolDeleteParams creates a new V1CloudConfigsOpenStackMachinePoolDeleteParams object +// with the default values initialized. +func NewV1CloudConfigsOpenStackMachinePoolDeleteParams() *V1CloudConfigsOpenStackMachinePoolDeleteParams { + var () + return &V1CloudConfigsOpenStackMachinePoolDeleteParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudConfigsOpenStackMachinePoolDeleteParamsWithTimeout creates a new V1CloudConfigsOpenStackMachinePoolDeleteParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudConfigsOpenStackMachinePoolDeleteParamsWithTimeout(timeout time.Duration) *V1CloudConfigsOpenStackMachinePoolDeleteParams { + var () + return &V1CloudConfigsOpenStackMachinePoolDeleteParams{ + + timeout: timeout, + } +} + +// NewV1CloudConfigsOpenStackMachinePoolDeleteParamsWithContext creates a new V1CloudConfigsOpenStackMachinePoolDeleteParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudConfigsOpenStackMachinePoolDeleteParamsWithContext(ctx context.Context) *V1CloudConfigsOpenStackMachinePoolDeleteParams { + var () + return &V1CloudConfigsOpenStackMachinePoolDeleteParams{ + + Context: ctx, + } +} + +// NewV1CloudConfigsOpenStackMachinePoolDeleteParamsWithHTTPClient creates a new V1CloudConfigsOpenStackMachinePoolDeleteParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudConfigsOpenStackMachinePoolDeleteParamsWithHTTPClient(client *http.Client) *V1CloudConfigsOpenStackMachinePoolDeleteParams { + var () + return &V1CloudConfigsOpenStackMachinePoolDeleteParams{ + HTTPClient: client, + } +} + +/* +V1CloudConfigsOpenStackMachinePoolDeleteParams contains all the parameters to send to the API endpoint +for the v1 cloud configs open stack machine pool delete operation typically these are written to a http.Request +*/ +type V1CloudConfigsOpenStackMachinePoolDeleteParams struct { + + /*ConfigUID + Cluster's cloud config uid + + */ + ConfigUID string + /*MachinePoolName + Machine pool name + + */ + MachinePoolName string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud configs open stack machine pool delete params +func (o *V1CloudConfigsOpenStackMachinePoolDeleteParams) WithTimeout(timeout time.Duration) *V1CloudConfigsOpenStackMachinePoolDeleteParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud configs open stack machine pool delete params +func (o *V1CloudConfigsOpenStackMachinePoolDeleteParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud configs open stack machine pool delete params +func (o *V1CloudConfigsOpenStackMachinePoolDeleteParams) WithContext(ctx context.Context) *V1CloudConfigsOpenStackMachinePoolDeleteParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud configs open stack machine pool delete params +func (o *V1CloudConfigsOpenStackMachinePoolDeleteParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud configs open stack machine pool delete params +func (o *V1CloudConfigsOpenStackMachinePoolDeleteParams) WithHTTPClient(client *http.Client) *V1CloudConfigsOpenStackMachinePoolDeleteParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud configs open stack machine pool delete params +func (o *V1CloudConfigsOpenStackMachinePoolDeleteParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithConfigUID adds the configUID to the v1 cloud configs open stack machine pool delete params +func (o *V1CloudConfigsOpenStackMachinePoolDeleteParams) WithConfigUID(configUID string) *V1CloudConfigsOpenStackMachinePoolDeleteParams { + o.SetConfigUID(configUID) + return o +} + +// SetConfigUID adds the configUid to the v1 cloud configs open stack machine pool delete params +func (o *V1CloudConfigsOpenStackMachinePoolDeleteParams) SetConfigUID(configUID string) { + o.ConfigUID = configUID +} + +// WithMachinePoolName adds the machinePoolName to the v1 cloud configs open stack machine pool delete params +func (o *V1CloudConfigsOpenStackMachinePoolDeleteParams) WithMachinePoolName(machinePoolName string) *V1CloudConfigsOpenStackMachinePoolDeleteParams { + o.SetMachinePoolName(machinePoolName) + return o +} + +// SetMachinePoolName adds the machinePoolName to the v1 cloud configs open stack machine pool delete params +func (o *V1CloudConfigsOpenStackMachinePoolDeleteParams) SetMachinePoolName(machinePoolName string) { + o.MachinePoolName = machinePoolName +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudConfigsOpenStackMachinePoolDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param configUid + if err := r.SetPathParam("configUid", o.ConfigUID); err != nil { + return err + } + + // path param machinePoolName + if err := r.SetPathParam("machinePoolName", o.MachinePoolName); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_configs_open_stack_machine_pool_delete_responses.go b/api/client/v1/v1_cloud_configs_open_stack_machine_pool_delete_responses.go new file mode 100644 index 00000000..978a6239 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_open_stack_machine_pool_delete_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1CloudConfigsOpenStackMachinePoolDeleteReader is a Reader for the V1CloudConfigsOpenStackMachinePoolDelete structure. +type V1CloudConfigsOpenStackMachinePoolDeleteReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudConfigsOpenStackMachinePoolDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1CloudConfigsOpenStackMachinePoolDeleteNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudConfigsOpenStackMachinePoolDeleteNoContent creates a V1CloudConfigsOpenStackMachinePoolDeleteNoContent with default headers values +func NewV1CloudConfigsOpenStackMachinePoolDeleteNoContent() *V1CloudConfigsOpenStackMachinePoolDeleteNoContent { + return &V1CloudConfigsOpenStackMachinePoolDeleteNoContent{} +} + +/* +V1CloudConfigsOpenStackMachinePoolDeleteNoContent handles this case with default header values. + +The resource was deleted successfully +*/ +type V1CloudConfigsOpenStackMachinePoolDeleteNoContent struct { +} + +func (o *V1CloudConfigsOpenStackMachinePoolDeleteNoContent) Error() string { + return fmt.Sprintf("[DELETE /v1/cloudconfigs/openstack/{configUid}/machinePools/{machinePoolName}][%d] v1CloudConfigsOpenStackMachinePoolDeleteNoContent ", 204) +} + +func (o *V1CloudConfigsOpenStackMachinePoolDeleteNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_cloud_configs_open_stack_machine_pool_update_parameters.go b/api/client/v1/v1_cloud_configs_open_stack_machine_pool_update_parameters.go new file mode 100644 index 00000000..35936868 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_open_stack_machine_pool_update_parameters.go @@ -0,0 +1,178 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1CloudConfigsOpenStackMachinePoolUpdateParams creates a new V1CloudConfigsOpenStackMachinePoolUpdateParams object +// with the default values initialized. +func NewV1CloudConfigsOpenStackMachinePoolUpdateParams() *V1CloudConfigsOpenStackMachinePoolUpdateParams { + var () + return &V1CloudConfigsOpenStackMachinePoolUpdateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudConfigsOpenStackMachinePoolUpdateParamsWithTimeout creates a new V1CloudConfigsOpenStackMachinePoolUpdateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudConfigsOpenStackMachinePoolUpdateParamsWithTimeout(timeout time.Duration) *V1CloudConfigsOpenStackMachinePoolUpdateParams { + var () + return &V1CloudConfigsOpenStackMachinePoolUpdateParams{ + + timeout: timeout, + } +} + +// NewV1CloudConfigsOpenStackMachinePoolUpdateParamsWithContext creates a new V1CloudConfigsOpenStackMachinePoolUpdateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudConfigsOpenStackMachinePoolUpdateParamsWithContext(ctx context.Context) *V1CloudConfigsOpenStackMachinePoolUpdateParams { + var () + return &V1CloudConfigsOpenStackMachinePoolUpdateParams{ + + Context: ctx, + } +} + +// NewV1CloudConfigsOpenStackMachinePoolUpdateParamsWithHTTPClient creates a new V1CloudConfigsOpenStackMachinePoolUpdateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudConfigsOpenStackMachinePoolUpdateParamsWithHTTPClient(client *http.Client) *V1CloudConfigsOpenStackMachinePoolUpdateParams { + var () + return &V1CloudConfigsOpenStackMachinePoolUpdateParams{ + HTTPClient: client, + } +} + +/* +V1CloudConfigsOpenStackMachinePoolUpdateParams contains all the parameters to send to the API endpoint +for the v1 cloud configs open stack machine pool update operation typically these are written to a http.Request +*/ +type V1CloudConfigsOpenStackMachinePoolUpdateParams struct { + + /*Body*/ + Body *models.V1OpenStackMachinePoolConfigEntity + /*ConfigUID + Cluster's cloud config uid + + */ + ConfigUID string + /*MachinePoolName + Machine pool name + + */ + MachinePoolName string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud configs open stack machine pool update params +func (o *V1CloudConfigsOpenStackMachinePoolUpdateParams) WithTimeout(timeout time.Duration) *V1CloudConfigsOpenStackMachinePoolUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud configs open stack machine pool update params +func (o *V1CloudConfigsOpenStackMachinePoolUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud configs open stack machine pool update params +func (o *V1CloudConfigsOpenStackMachinePoolUpdateParams) WithContext(ctx context.Context) *V1CloudConfigsOpenStackMachinePoolUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud configs open stack machine pool update params +func (o *V1CloudConfigsOpenStackMachinePoolUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud configs open stack machine pool update params +func (o *V1CloudConfigsOpenStackMachinePoolUpdateParams) WithHTTPClient(client *http.Client) *V1CloudConfigsOpenStackMachinePoolUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud configs open stack machine pool update params +func (o *V1CloudConfigsOpenStackMachinePoolUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 cloud configs open stack machine pool update params +func (o *V1CloudConfigsOpenStackMachinePoolUpdateParams) WithBody(body *models.V1OpenStackMachinePoolConfigEntity) *V1CloudConfigsOpenStackMachinePoolUpdateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 cloud configs open stack machine pool update params +func (o *V1CloudConfigsOpenStackMachinePoolUpdateParams) SetBody(body *models.V1OpenStackMachinePoolConfigEntity) { + o.Body = body +} + +// WithConfigUID adds the configUID to the v1 cloud configs open stack machine pool update params +func (o *V1CloudConfigsOpenStackMachinePoolUpdateParams) WithConfigUID(configUID string) *V1CloudConfigsOpenStackMachinePoolUpdateParams { + o.SetConfigUID(configUID) + return o +} + +// SetConfigUID adds the configUid to the v1 cloud configs open stack machine pool update params +func (o *V1CloudConfigsOpenStackMachinePoolUpdateParams) SetConfigUID(configUID string) { + o.ConfigUID = configUID +} + +// WithMachinePoolName adds the machinePoolName to the v1 cloud configs open stack machine pool update params +func (o *V1CloudConfigsOpenStackMachinePoolUpdateParams) WithMachinePoolName(machinePoolName string) *V1CloudConfigsOpenStackMachinePoolUpdateParams { + o.SetMachinePoolName(machinePoolName) + return o +} + +// SetMachinePoolName adds the machinePoolName to the v1 cloud configs open stack machine pool update params +func (o *V1CloudConfigsOpenStackMachinePoolUpdateParams) SetMachinePoolName(machinePoolName string) { + o.MachinePoolName = machinePoolName +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudConfigsOpenStackMachinePoolUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param configUid + if err := r.SetPathParam("configUid", o.ConfigUID); err != nil { + return err + } + + // path param machinePoolName + if err := r.SetPathParam("machinePoolName", o.MachinePoolName); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_configs_open_stack_machine_pool_update_responses.go b/api/client/v1/v1_cloud_configs_open_stack_machine_pool_update_responses.go new file mode 100644 index 00000000..19a8f6e7 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_open_stack_machine_pool_update_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1CloudConfigsOpenStackMachinePoolUpdateReader is a Reader for the V1CloudConfigsOpenStackMachinePoolUpdate structure. +type V1CloudConfigsOpenStackMachinePoolUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudConfigsOpenStackMachinePoolUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1CloudConfigsOpenStackMachinePoolUpdateNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudConfigsOpenStackMachinePoolUpdateNoContent creates a V1CloudConfigsOpenStackMachinePoolUpdateNoContent with default headers values +func NewV1CloudConfigsOpenStackMachinePoolUpdateNoContent() *V1CloudConfigsOpenStackMachinePoolUpdateNoContent { + return &V1CloudConfigsOpenStackMachinePoolUpdateNoContent{} +} + +/* +V1CloudConfigsOpenStackMachinePoolUpdateNoContent handles this case with default header values. + +The resource was updated successfully +*/ +type V1CloudConfigsOpenStackMachinePoolUpdateNoContent struct { +} + +func (o *V1CloudConfigsOpenStackMachinePoolUpdateNoContent) Error() string { + return fmt.Sprintf("[PUT /v1/cloudconfigs/openstack/{configUid}/machinePools/{machinePoolName}][%d] v1CloudConfigsOpenStackMachinePoolUpdateNoContent ", 204) +} + +func (o *V1CloudConfigsOpenStackMachinePoolUpdateNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_cloud_configs_open_stack_pool_machines_add_parameters.go b/api/client/v1/v1_cloud_configs_open_stack_pool_machines_add_parameters.go new file mode 100644 index 00000000..7a392b06 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_open_stack_pool_machines_add_parameters.go @@ -0,0 +1,178 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1CloudConfigsOpenStackPoolMachinesAddParams creates a new V1CloudConfigsOpenStackPoolMachinesAddParams object +// with the default values initialized. +func NewV1CloudConfigsOpenStackPoolMachinesAddParams() *V1CloudConfigsOpenStackPoolMachinesAddParams { + var () + return &V1CloudConfigsOpenStackPoolMachinesAddParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudConfigsOpenStackPoolMachinesAddParamsWithTimeout creates a new V1CloudConfigsOpenStackPoolMachinesAddParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudConfigsOpenStackPoolMachinesAddParamsWithTimeout(timeout time.Duration) *V1CloudConfigsOpenStackPoolMachinesAddParams { + var () + return &V1CloudConfigsOpenStackPoolMachinesAddParams{ + + timeout: timeout, + } +} + +// NewV1CloudConfigsOpenStackPoolMachinesAddParamsWithContext creates a new V1CloudConfigsOpenStackPoolMachinesAddParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudConfigsOpenStackPoolMachinesAddParamsWithContext(ctx context.Context) *V1CloudConfigsOpenStackPoolMachinesAddParams { + var () + return &V1CloudConfigsOpenStackPoolMachinesAddParams{ + + Context: ctx, + } +} + +// NewV1CloudConfigsOpenStackPoolMachinesAddParamsWithHTTPClient creates a new V1CloudConfigsOpenStackPoolMachinesAddParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudConfigsOpenStackPoolMachinesAddParamsWithHTTPClient(client *http.Client) *V1CloudConfigsOpenStackPoolMachinesAddParams { + var () + return &V1CloudConfigsOpenStackPoolMachinesAddParams{ + HTTPClient: client, + } +} + +/* +V1CloudConfigsOpenStackPoolMachinesAddParams contains all the parameters to send to the API endpoint +for the v1 cloud configs open stack pool machines add operation typically these are written to a http.Request +*/ +type V1CloudConfigsOpenStackPoolMachinesAddParams struct { + + /*Body*/ + Body *models.V1OpenStackMachine + /*ConfigUID + Cluster's cloud config uid + + */ + ConfigUID string + /*MachinePoolName + Machine pool name + + */ + MachinePoolName string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud configs open stack pool machines add params +func (o *V1CloudConfigsOpenStackPoolMachinesAddParams) WithTimeout(timeout time.Duration) *V1CloudConfigsOpenStackPoolMachinesAddParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud configs open stack pool machines add params +func (o *V1CloudConfigsOpenStackPoolMachinesAddParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud configs open stack pool machines add params +func (o *V1CloudConfigsOpenStackPoolMachinesAddParams) WithContext(ctx context.Context) *V1CloudConfigsOpenStackPoolMachinesAddParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud configs open stack pool machines add params +func (o *V1CloudConfigsOpenStackPoolMachinesAddParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud configs open stack pool machines add params +func (o *V1CloudConfigsOpenStackPoolMachinesAddParams) WithHTTPClient(client *http.Client) *V1CloudConfigsOpenStackPoolMachinesAddParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud configs open stack pool machines add params +func (o *V1CloudConfigsOpenStackPoolMachinesAddParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 cloud configs open stack pool machines add params +func (o *V1CloudConfigsOpenStackPoolMachinesAddParams) WithBody(body *models.V1OpenStackMachine) *V1CloudConfigsOpenStackPoolMachinesAddParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 cloud configs open stack pool machines add params +func (o *V1CloudConfigsOpenStackPoolMachinesAddParams) SetBody(body *models.V1OpenStackMachine) { + o.Body = body +} + +// WithConfigUID adds the configUID to the v1 cloud configs open stack pool machines add params +func (o *V1CloudConfigsOpenStackPoolMachinesAddParams) WithConfigUID(configUID string) *V1CloudConfigsOpenStackPoolMachinesAddParams { + o.SetConfigUID(configUID) + return o +} + +// SetConfigUID adds the configUid to the v1 cloud configs open stack pool machines add params +func (o *V1CloudConfigsOpenStackPoolMachinesAddParams) SetConfigUID(configUID string) { + o.ConfigUID = configUID +} + +// WithMachinePoolName adds the machinePoolName to the v1 cloud configs open stack pool machines add params +func (o *V1CloudConfigsOpenStackPoolMachinesAddParams) WithMachinePoolName(machinePoolName string) *V1CloudConfigsOpenStackPoolMachinesAddParams { + o.SetMachinePoolName(machinePoolName) + return o +} + +// SetMachinePoolName adds the machinePoolName to the v1 cloud configs open stack pool machines add params +func (o *V1CloudConfigsOpenStackPoolMachinesAddParams) SetMachinePoolName(machinePoolName string) { + o.MachinePoolName = machinePoolName +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudConfigsOpenStackPoolMachinesAddParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param configUid + if err := r.SetPathParam("configUid", o.ConfigUID); err != nil { + return err + } + + // path param machinePoolName + if err := r.SetPathParam("machinePoolName", o.MachinePoolName); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_configs_open_stack_pool_machines_add_responses.go b/api/client/v1/v1_cloud_configs_open_stack_pool_machines_add_responses.go new file mode 100644 index 00000000..0d088346 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_open_stack_pool_machines_add_responses.go @@ -0,0 +1,77 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1CloudConfigsOpenStackPoolMachinesAddReader is a Reader for the V1CloudConfigsOpenStackPoolMachinesAdd structure. +type V1CloudConfigsOpenStackPoolMachinesAddReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudConfigsOpenStackPoolMachinesAddReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 201: + result := NewV1CloudConfigsOpenStackPoolMachinesAddCreated() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudConfigsOpenStackPoolMachinesAddCreated creates a V1CloudConfigsOpenStackPoolMachinesAddCreated with default headers values +func NewV1CloudConfigsOpenStackPoolMachinesAddCreated() *V1CloudConfigsOpenStackPoolMachinesAddCreated { + return &V1CloudConfigsOpenStackPoolMachinesAddCreated{} +} + +/* +V1CloudConfigsOpenStackPoolMachinesAddCreated handles this case with default header values. + +Created successfully +*/ +type V1CloudConfigsOpenStackPoolMachinesAddCreated struct { + /*Audit uid for the request + */ + AuditUID string + + Payload *models.V1UID +} + +func (o *V1CloudConfigsOpenStackPoolMachinesAddCreated) Error() string { + return fmt.Sprintf("[POST /v1/cloudconfigs/openstack/{configUid}/machinePools/{machinePoolName}/machines][%d] v1CloudConfigsOpenStackPoolMachinesAddCreated %+v", 201, o.Payload) +} + +func (o *V1CloudConfigsOpenStackPoolMachinesAddCreated) GetPayload() *models.V1UID { + return o.Payload +} + +func (o *V1CloudConfigsOpenStackPoolMachinesAddCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header AuditUid + o.AuditUID = response.GetHeader("AuditUid") + + o.Payload = new(models.V1UID) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_cloud_configs_open_stack_pool_machines_list_parameters.go b/api/client/v1/v1_cloud_configs_open_stack_pool_machines_list_parameters.go new file mode 100644 index 00000000..8dee88e1 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_open_stack_pool_machines_list_parameters.go @@ -0,0 +1,157 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1CloudConfigsOpenStackPoolMachinesListParams creates a new V1CloudConfigsOpenStackPoolMachinesListParams object +// with the default values initialized. +func NewV1CloudConfigsOpenStackPoolMachinesListParams() *V1CloudConfigsOpenStackPoolMachinesListParams { + var () + return &V1CloudConfigsOpenStackPoolMachinesListParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudConfigsOpenStackPoolMachinesListParamsWithTimeout creates a new V1CloudConfigsOpenStackPoolMachinesListParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudConfigsOpenStackPoolMachinesListParamsWithTimeout(timeout time.Duration) *V1CloudConfigsOpenStackPoolMachinesListParams { + var () + return &V1CloudConfigsOpenStackPoolMachinesListParams{ + + timeout: timeout, + } +} + +// NewV1CloudConfigsOpenStackPoolMachinesListParamsWithContext creates a new V1CloudConfigsOpenStackPoolMachinesListParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudConfigsOpenStackPoolMachinesListParamsWithContext(ctx context.Context) *V1CloudConfigsOpenStackPoolMachinesListParams { + var () + return &V1CloudConfigsOpenStackPoolMachinesListParams{ + + Context: ctx, + } +} + +// NewV1CloudConfigsOpenStackPoolMachinesListParamsWithHTTPClient creates a new V1CloudConfigsOpenStackPoolMachinesListParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudConfigsOpenStackPoolMachinesListParamsWithHTTPClient(client *http.Client) *V1CloudConfigsOpenStackPoolMachinesListParams { + var () + return &V1CloudConfigsOpenStackPoolMachinesListParams{ + HTTPClient: client, + } +} + +/* +V1CloudConfigsOpenStackPoolMachinesListParams contains all the parameters to send to the API endpoint +for the v1 cloud configs open stack pool machines list operation typically these are written to a http.Request +*/ +type V1CloudConfigsOpenStackPoolMachinesListParams struct { + + /*ConfigUID + Cluster's cloud config uid + + */ + ConfigUID string + /*MachinePoolName + Machine pool name + + */ + MachinePoolName string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud configs open stack pool machines list params +func (o *V1CloudConfigsOpenStackPoolMachinesListParams) WithTimeout(timeout time.Duration) *V1CloudConfigsOpenStackPoolMachinesListParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud configs open stack pool machines list params +func (o *V1CloudConfigsOpenStackPoolMachinesListParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud configs open stack pool machines list params +func (o *V1CloudConfigsOpenStackPoolMachinesListParams) WithContext(ctx context.Context) *V1CloudConfigsOpenStackPoolMachinesListParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud configs open stack pool machines list params +func (o *V1CloudConfigsOpenStackPoolMachinesListParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud configs open stack pool machines list params +func (o *V1CloudConfigsOpenStackPoolMachinesListParams) WithHTTPClient(client *http.Client) *V1CloudConfigsOpenStackPoolMachinesListParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud configs open stack pool machines list params +func (o *V1CloudConfigsOpenStackPoolMachinesListParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithConfigUID adds the configUID to the v1 cloud configs open stack pool machines list params +func (o *V1CloudConfigsOpenStackPoolMachinesListParams) WithConfigUID(configUID string) *V1CloudConfigsOpenStackPoolMachinesListParams { + o.SetConfigUID(configUID) + return o +} + +// SetConfigUID adds the configUid to the v1 cloud configs open stack pool machines list params +func (o *V1CloudConfigsOpenStackPoolMachinesListParams) SetConfigUID(configUID string) { + o.ConfigUID = configUID +} + +// WithMachinePoolName adds the machinePoolName to the v1 cloud configs open stack pool machines list params +func (o *V1CloudConfigsOpenStackPoolMachinesListParams) WithMachinePoolName(machinePoolName string) *V1CloudConfigsOpenStackPoolMachinesListParams { + o.SetMachinePoolName(machinePoolName) + return o +} + +// SetMachinePoolName adds the machinePoolName to the v1 cloud configs open stack pool machines list params +func (o *V1CloudConfigsOpenStackPoolMachinesListParams) SetMachinePoolName(machinePoolName string) { + o.MachinePoolName = machinePoolName +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudConfigsOpenStackPoolMachinesListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param configUid + if err := r.SetPathParam("configUid", o.ConfigUID); err != nil { + return err + } + + // path param machinePoolName + if err := r.SetPathParam("machinePoolName", o.MachinePoolName); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_configs_open_stack_pool_machines_list_responses.go b/api/client/v1/v1_cloud_configs_open_stack_pool_machines_list_responses.go new file mode 100644 index 00000000..bb38cc61 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_open_stack_pool_machines_list_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1CloudConfigsOpenStackPoolMachinesListReader is a Reader for the V1CloudConfigsOpenStackPoolMachinesList structure. +type V1CloudConfigsOpenStackPoolMachinesListReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudConfigsOpenStackPoolMachinesListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1CloudConfigsOpenStackPoolMachinesListOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudConfigsOpenStackPoolMachinesListOK creates a V1CloudConfigsOpenStackPoolMachinesListOK with default headers values +func NewV1CloudConfigsOpenStackPoolMachinesListOK() *V1CloudConfigsOpenStackPoolMachinesListOK { + return &V1CloudConfigsOpenStackPoolMachinesListOK{} +} + +/* +V1CloudConfigsOpenStackPoolMachinesListOK handles this case with default header values. + +An array of OpenStack machine items +*/ +type V1CloudConfigsOpenStackPoolMachinesListOK struct { + Payload *models.V1OpenStackMachines +} + +func (o *V1CloudConfigsOpenStackPoolMachinesListOK) Error() string { + return fmt.Sprintf("[GET /v1/cloudconfigs/openstack/{configUid}/machinePools/{machinePoolName}/machines][%d] v1CloudConfigsOpenStackPoolMachinesListOK %+v", 200, o.Payload) +} + +func (o *V1CloudConfigsOpenStackPoolMachinesListOK) GetPayload() *models.V1OpenStackMachines { + return o.Payload +} + +func (o *V1CloudConfigsOpenStackPoolMachinesListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1OpenStackMachines) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_cloud_configs_open_stack_pool_machines_uid_delete_parameters.go b/api/client/v1/v1_cloud_configs_open_stack_pool_machines_uid_delete_parameters.go new file mode 100644 index 00000000..7f84cfff --- /dev/null +++ b/api/client/v1/v1_cloud_configs_open_stack_pool_machines_uid_delete_parameters.go @@ -0,0 +1,178 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1CloudConfigsOpenStackPoolMachinesUIDDeleteParams creates a new V1CloudConfigsOpenStackPoolMachinesUIDDeleteParams object +// with the default values initialized. +func NewV1CloudConfigsOpenStackPoolMachinesUIDDeleteParams() *V1CloudConfigsOpenStackPoolMachinesUIDDeleteParams { + var () + return &V1CloudConfigsOpenStackPoolMachinesUIDDeleteParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudConfigsOpenStackPoolMachinesUIDDeleteParamsWithTimeout creates a new V1CloudConfigsOpenStackPoolMachinesUIDDeleteParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudConfigsOpenStackPoolMachinesUIDDeleteParamsWithTimeout(timeout time.Duration) *V1CloudConfigsOpenStackPoolMachinesUIDDeleteParams { + var () + return &V1CloudConfigsOpenStackPoolMachinesUIDDeleteParams{ + + timeout: timeout, + } +} + +// NewV1CloudConfigsOpenStackPoolMachinesUIDDeleteParamsWithContext creates a new V1CloudConfigsOpenStackPoolMachinesUIDDeleteParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudConfigsOpenStackPoolMachinesUIDDeleteParamsWithContext(ctx context.Context) *V1CloudConfigsOpenStackPoolMachinesUIDDeleteParams { + var () + return &V1CloudConfigsOpenStackPoolMachinesUIDDeleteParams{ + + Context: ctx, + } +} + +// NewV1CloudConfigsOpenStackPoolMachinesUIDDeleteParamsWithHTTPClient creates a new V1CloudConfigsOpenStackPoolMachinesUIDDeleteParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudConfigsOpenStackPoolMachinesUIDDeleteParamsWithHTTPClient(client *http.Client) *V1CloudConfigsOpenStackPoolMachinesUIDDeleteParams { + var () + return &V1CloudConfigsOpenStackPoolMachinesUIDDeleteParams{ + HTTPClient: client, + } +} + +/* +V1CloudConfigsOpenStackPoolMachinesUIDDeleteParams contains all the parameters to send to the API endpoint +for the v1 cloud configs open stack pool machines Uid delete operation typically these are written to a http.Request +*/ +type V1CloudConfigsOpenStackPoolMachinesUIDDeleteParams struct { + + /*ConfigUID + Cluster's cloud config uid + + */ + ConfigUID string + /*MachinePoolName + Machine pool name + + */ + MachinePoolName string + /*MachineUID + Machine uid + + */ + MachineUID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud configs open stack pool machines Uid delete params +func (o *V1CloudConfigsOpenStackPoolMachinesUIDDeleteParams) WithTimeout(timeout time.Duration) *V1CloudConfigsOpenStackPoolMachinesUIDDeleteParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud configs open stack pool machines Uid delete params +func (o *V1CloudConfigsOpenStackPoolMachinesUIDDeleteParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud configs open stack pool machines Uid delete params +func (o *V1CloudConfigsOpenStackPoolMachinesUIDDeleteParams) WithContext(ctx context.Context) *V1CloudConfigsOpenStackPoolMachinesUIDDeleteParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud configs open stack pool machines Uid delete params +func (o *V1CloudConfigsOpenStackPoolMachinesUIDDeleteParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud configs open stack pool machines Uid delete params +func (o *V1CloudConfigsOpenStackPoolMachinesUIDDeleteParams) WithHTTPClient(client *http.Client) *V1CloudConfigsOpenStackPoolMachinesUIDDeleteParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud configs open stack pool machines Uid delete params +func (o *V1CloudConfigsOpenStackPoolMachinesUIDDeleteParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithConfigUID adds the configUID to the v1 cloud configs open stack pool machines Uid delete params +func (o *V1CloudConfigsOpenStackPoolMachinesUIDDeleteParams) WithConfigUID(configUID string) *V1CloudConfigsOpenStackPoolMachinesUIDDeleteParams { + o.SetConfigUID(configUID) + return o +} + +// SetConfigUID adds the configUid to the v1 cloud configs open stack pool machines Uid delete params +func (o *V1CloudConfigsOpenStackPoolMachinesUIDDeleteParams) SetConfigUID(configUID string) { + o.ConfigUID = configUID +} + +// WithMachinePoolName adds the machinePoolName to the v1 cloud configs open stack pool machines Uid delete params +func (o *V1CloudConfigsOpenStackPoolMachinesUIDDeleteParams) WithMachinePoolName(machinePoolName string) *V1CloudConfigsOpenStackPoolMachinesUIDDeleteParams { + o.SetMachinePoolName(machinePoolName) + return o +} + +// SetMachinePoolName adds the machinePoolName to the v1 cloud configs open stack pool machines Uid delete params +func (o *V1CloudConfigsOpenStackPoolMachinesUIDDeleteParams) SetMachinePoolName(machinePoolName string) { + o.MachinePoolName = machinePoolName +} + +// WithMachineUID adds the machineUID to the v1 cloud configs open stack pool machines Uid delete params +func (o *V1CloudConfigsOpenStackPoolMachinesUIDDeleteParams) WithMachineUID(machineUID string) *V1CloudConfigsOpenStackPoolMachinesUIDDeleteParams { + o.SetMachineUID(machineUID) + return o +} + +// SetMachineUID adds the machineUid to the v1 cloud configs open stack pool machines Uid delete params +func (o *V1CloudConfigsOpenStackPoolMachinesUIDDeleteParams) SetMachineUID(machineUID string) { + o.MachineUID = machineUID +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudConfigsOpenStackPoolMachinesUIDDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param configUid + if err := r.SetPathParam("configUid", o.ConfigUID); err != nil { + return err + } + + // path param machinePoolName + if err := r.SetPathParam("machinePoolName", o.MachinePoolName); err != nil { + return err + } + + // path param machineUid + if err := r.SetPathParam("machineUid", o.MachineUID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_configs_open_stack_pool_machines_uid_delete_responses.go b/api/client/v1/v1_cloud_configs_open_stack_pool_machines_uid_delete_responses.go new file mode 100644 index 00000000..12e5cbb1 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_open_stack_pool_machines_uid_delete_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1CloudConfigsOpenStackPoolMachinesUIDDeleteReader is a Reader for the V1CloudConfigsOpenStackPoolMachinesUIDDelete structure. +type V1CloudConfigsOpenStackPoolMachinesUIDDeleteReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudConfigsOpenStackPoolMachinesUIDDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1CloudConfigsOpenStackPoolMachinesUIDDeleteNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudConfigsOpenStackPoolMachinesUIDDeleteNoContent creates a V1CloudConfigsOpenStackPoolMachinesUIDDeleteNoContent with default headers values +func NewV1CloudConfigsOpenStackPoolMachinesUIDDeleteNoContent() *V1CloudConfigsOpenStackPoolMachinesUIDDeleteNoContent { + return &V1CloudConfigsOpenStackPoolMachinesUIDDeleteNoContent{} +} + +/* +V1CloudConfigsOpenStackPoolMachinesUIDDeleteNoContent handles this case with default header values. + +The resource was deleted successfully +*/ +type V1CloudConfigsOpenStackPoolMachinesUIDDeleteNoContent struct { +} + +func (o *V1CloudConfigsOpenStackPoolMachinesUIDDeleteNoContent) Error() string { + return fmt.Sprintf("[DELETE /v1/cloudconfigs/openstack/{configUid}/machinePools/{machinePoolName}/machines/{machineUid}][%d] v1CloudConfigsOpenStackPoolMachinesUidDeleteNoContent ", 204) +} + +func (o *V1CloudConfigsOpenStackPoolMachinesUIDDeleteNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_cloud_configs_open_stack_pool_machines_uid_get_parameters.go b/api/client/v1/v1_cloud_configs_open_stack_pool_machines_uid_get_parameters.go new file mode 100644 index 00000000..b420f08a --- /dev/null +++ b/api/client/v1/v1_cloud_configs_open_stack_pool_machines_uid_get_parameters.go @@ -0,0 +1,178 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1CloudConfigsOpenStackPoolMachinesUIDGetParams creates a new V1CloudConfigsOpenStackPoolMachinesUIDGetParams object +// with the default values initialized. +func NewV1CloudConfigsOpenStackPoolMachinesUIDGetParams() *V1CloudConfigsOpenStackPoolMachinesUIDGetParams { + var () + return &V1CloudConfigsOpenStackPoolMachinesUIDGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudConfigsOpenStackPoolMachinesUIDGetParamsWithTimeout creates a new V1CloudConfigsOpenStackPoolMachinesUIDGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudConfigsOpenStackPoolMachinesUIDGetParamsWithTimeout(timeout time.Duration) *V1CloudConfigsOpenStackPoolMachinesUIDGetParams { + var () + return &V1CloudConfigsOpenStackPoolMachinesUIDGetParams{ + + timeout: timeout, + } +} + +// NewV1CloudConfigsOpenStackPoolMachinesUIDGetParamsWithContext creates a new V1CloudConfigsOpenStackPoolMachinesUIDGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudConfigsOpenStackPoolMachinesUIDGetParamsWithContext(ctx context.Context) *V1CloudConfigsOpenStackPoolMachinesUIDGetParams { + var () + return &V1CloudConfigsOpenStackPoolMachinesUIDGetParams{ + + Context: ctx, + } +} + +// NewV1CloudConfigsOpenStackPoolMachinesUIDGetParamsWithHTTPClient creates a new V1CloudConfigsOpenStackPoolMachinesUIDGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudConfigsOpenStackPoolMachinesUIDGetParamsWithHTTPClient(client *http.Client) *V1CloudConfigsOpenStackPoolMachinesUIDGetParams { + var () + return &V1CloudConfigsOpenStackPoolMachinesUIDGetParams{ + HTTPClient: client, + } +} + +/* +V1CloudConfigsOpenStackPoolMachinesUIDGetParams contains all the parameters to send to the API endpoint +for the v1 cloud configs open stack pool machines Uid get operation typically these are written to a http.Request +*/ +type V1CloudConfigsOpenStackPoolMachinesUIDGetParams struct { + + /*ConfigUID + Cluster's cloud config uid + + */ + ConfigUID string + /*MachinePoolName + Machine pool name + + */ + MachinePoolName string + /*MachineUID + Machine uid + + */ + MachineUID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud configs open stack pool machines Uid get params +func (o *V1CloudConfigsOpenStackPoolMachinesUIDGetParams) WithTimeout(timeout time.Duration) *V1CloudConfigsOpenStackPoolMachinesUIDGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud configs open stack pool machines Uid get params +func (o *V1CloudConfigsOpenStackPoolMachinesUIDGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud configs open stack pool machines Uid get params +func (o *V1CloudConfigsOpenStackPoolMachinesUIDGetParams) WithContext(ctx context.Context) *V1CloudConfigsOpenStackPoolMachinesUIDGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud configs open stack pool machines Uid get params +func (o *V1CloudConfigsOpenStackPoolMachinesUIDGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud configs open stack pool machines Uid get params +func (o *V1CloudConfigsOpenStackPoolMachinesUIDGetParams) WithHTTPClient(client *http.Client) *V1CloudConfigsOpenStackPoolMachinesUIDGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud configs open stack pool machines Uid get params +func (o *V1CloudConfigsOpenStackPoolMachinesUIDGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithConfigUID adds the configUID to the v1 cloud configs open stack pool machines Uid get params +func (o *V1CloudConfigsOpenStackPoolMachinesUIDGetParams) WithConfigUID(configUID string) *V1CloudConfigsOpenStackPoolMachinesUIDGetParams { + o.SetConfigUID(configUID) + return o +} + +// SetConfigUID adds the configUid to the v1 cloud configs open stack pool machines Uid get params +func (o *V1CloudConfigsOpenStackPoolMachinesUIDGetParams) SetConfigUID(configUID string) { + o.ConfigUID = configUID +} + +// WithMachinePoolName adds the machinePoolName to the v1 cloud configs open stack pool machines Uid get params +func (o *V1CloudConfigsOpenStackPoolMachinesUIDGetParams) WithMachinePoolName(machinePoolName string) *V1CloudConfigsOpenStackPoolMachinesUIDGetParams { + o.SetMachinePoolName(machinePoolName) + return o +} + +// SetMachinePoolName adds the machinePoolName to the v1 cloud configs open stack pool machines Uid get params +func (o *V1CloudConfigsOpenStackPoolMachinesUIDGetParams) SetMachinePoolName(machinePoolName string) { + o.MachinePoolName = machinePoolName +} + +// WithMachineUID adds the machineUID to the v1 cloud configs open stack pool machines Uid get params +func (o *V1CloudConfigsOpenStackPoolMachinesUIDGetParams) WithMachineUID(machineUID string) *V1CloudConfigsOpenStackPoolMachinesUIDGetParams { + o.SetMachineUID(machineUID) + return o +} + +// SetMachineUID adds the machineUid to the v1 cloud configs open stack pool machines Uid get params +func (o *V1CloudConfigsOpenStackPoolMachinesUIDGetParams) SetMachineUID(machineUID string) { + o.MachineUID = machineUID +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudConfigsOpenStackPoolMachinesUIDGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param configUid + if err := r.SetPathParam("configUid", o.ConfigUID); err != nil { + return err + } + + // path param machinePoolName + if err := r.SetPathParam("machinePoolName", o.MachinePoolName); err != nil { + return err + } + + // path param machineUid + if err := r.SetPathParam("machineUid", o.MachineUID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_configs_open_stack_pool_machines_uid_get_responses.go b/api/client/v1/v1_cloud_configs_open_stack_pool_machines_uid_get_responses.go new file mode 100644 index 00000000..d1ce65e0 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_open_stack_pool_machines_uid_get_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1CloudConfigsOpenStackPoolMachinesUIDGetReader is a Reader for the V1CloudConfigsOpenStackPoolMachinesUIDGet structure. +type V1CloudConfigsOpenStackPoolMachinesUIDGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudConfigsOpenStackPoolMachinesUIDGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1CloudConfigsOpenStackPoolMachinesUIDGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudConfigsOpenStackPoolMachinesUIDGetOK creates a V1CloudConfigsOpenStackPoolMachinesUIDGetOK with default headers values +func NewV1CloudConfigsOpenStackPoolMachinesUIDGetOK() *V1CloudConfigsOpenStackPoolMachinesUIDGetOK { + return &V1CloudConfigsOpenStackPoolMachinesUIDGetOK{} +} + +/* +V1CloudConfigsOpenStackPoolMachinesUIDGetOK handles this case with default header values. + +OK +*/ +type V1CloudConfigsOpenStackPoolMachinesUIDGetOK struct { + Payload *models.V1OpenStackMachine +} + +func (o *V1CloudConfigsOpenStackPoolMachinesUIDGetOK) Error() string { + return fmt.Sprintf("[GET /v1/cloudconfigs/openstack/{configUid}/machinePools/{machinePoolName}/machines/{machineUid}][%d] v1CloudConfigsOpenStackPoolMachinesUidGetOK %+v", 200, o.Payload) +} + +func (o *V1CloudConfigsOpenStackPoolMachinesUIDGetOK) GetPayload() *models.V1OpenStackMachine { + return o.Payload +} + +func (o *V1CloudConfigsOpenStackPoolMachinesUIDGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1OpenStackMachine) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_cloud_configs_open_stack_pool_machines_uid_update_parameters.go b/api/client/v1/v1_cloud_configs_open_stack_pool_machines_uid_update_parameters.go new file mode 100644 index 00000000..f36404f8 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_open_stack_pool_machines_uid_update_parameters.go @@ -0,0 +1,199 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1CloudConfigsOpenStackPoolMachinesUIDUpdateParams creates a new V1CloudConfigsOpenStackPoolMachinesUIDUpdateParams object +// with the default values initialized. +func NewV1CloudConfigsOpenStackPoolMachinesUIDUpdateParams() *V1CloudConfigsOpenStackPoolMachinesUIDUpdateParams { + var () + return &V1CloudConfigsOpenStackPoolMachinesUIDUpdateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudConfigsOpenStackPoolMachinesUIDUpdateParamsWithTimeout creates a new V1CloudConfigsOpenStackPoolMachinesUIDUpdateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudConfigsOpenStackPoolMachinesUIDUpdateParamsWithTimeout(timeout time.Duration) *V1CloudConfigsOpenStackPoolMachinesUIDUpdateParams { + var () + return &V1CloudConfigsOpenStackPoolMachinesUIDUpdateParams{ + + timeout: timeout, + } +} + +// NewV1CloudConfigsOpenStackPoolMachinesUIDUpdateParamsWithContext creates a new V1CloudConfigsOpenStackPoolMachinesUIDUpdateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudConfigsOpenStackPoolMachinesUIDUpdateParamsWithContext(ctx context.Context) *V1CloudConfigsOpenStackPoolMachinesUIDUpdateParams { + var () + return &V1CloudConfigsOpenStackPoolMachinesUIDUpdateParams{ + + Context: ctx, + } +} + +// NewV1CloudConfigsOpenStackPoolMachinesUIDUpdateParamsWithHTTPClient creates a new V1CloudConfigsOpenStackPoolMachinesUIDUpdateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudConfigsOpenStackPoolMachinesUIDUpdateParamsWithHTTPClient(client *http.Client) *V1CloudConfigsOpenStackPoolMachinesUIDUpdateParams { + var () + return &V1CloudConfigsOpenStackPoolMachinesUIDUpdateParams{ + HTTPClient: client, + } +} + +/* +V1CloudConfigsOpenStackPoolMachinesUIDUpdateParams contains all the parameters to send to the API endpoint +for the v1 cloud configs open stack pool machines Uid update operation typically these are written to a http.Request +*/ +type V1CloudConfigsOpenStackPoolMachinesUIDUpdateParams struct { + + /*Body*/ + Body *models.V1OpenStackMachine + /*ConfigUID + Cluster's cloud config uid + + */ + ConfigUID string + /*MachinePoolName + Machine pool name + + */ + MachinePoolName string + /*MachineUID + Machine uid + + */ + MachineUID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud configs open stack pool machines Uid update params +func (o *V1CloudConfigsOpenStackPoolMachinesUIDUpdateParams) WithTimeout(timeout time.Duration) *V1CloudConfigsOpenStackPoolMachinesUIDUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud configs open stack pool machines Uid update params +func (o *V1CloudConfigsOpenStackPoolMachinesUIDUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud configs open stack pool machines Uid update params +func (o *V1CloudConfigsOpenStackPoolMachinesUIDUpdateParams) WithContext(ctx context.Context) *V1CloudConfigsOpenStackPoolMachinesUIDUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud configs open stack pool machines Uid update params +func (o *V1CloudConfigsOpenStackPoolMachinesUIDUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud configs open stack pool machines Uid update params +func (o *V1CloudConfigsOpenStackPoolMachinesUIDUpdateParams) WithHTTPClient(client *http.Client) *V1CloudConfigsOpenStackPoolMachinesUIDUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud configs open stack pool machines Uid update params +func (o *V1CloudConfigsOpenStackPoolMachinesUIDUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 cloud configs open stack pool machines Uid update params +func (o *V1CloudConfigsOpenStackPoolMachinesUIDUpdateParams) WithBody(body *models.V1OpenStackMachine) *V1CloudConfigsOpenStackPoolMachinesUIDUpdateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 cloud configs open stack pool machines Uid update params +func (o *V1CloudConfigsOpenStackPoolMachinesUIDUpdateParams) SetBody(body *models.V1OpenStackMachine) { + o.Body = body +} + +// WithConfigUID adds the configUID to the v1 cloud configs open stack pool machines Uid update params +func (o *V1CloudConfigsOpenStackPoolMachinesUIDUpdateParams) WithConfigUID(configUID string) *V1CloudConfigsOpenStackPoolMachinesUIDUpdateParams { + o.SetConfigUID(configUID) + return o +} + +// SetConfigUID adds the configUid to the v1 cloud configs open stack pool machines Uid update params +func (o *V1CloudConfigsOpenStackPoolMachinesUIDUpdateParams) SetConfigUID(configUID string) { + o.ConfigUID = configUID +} + +// WithMachinePoolName adds the machinePoolName to the v1 cloud configs open stack pool machines Uid update params +func (o *V1CloudConfigsOpenStackPoolMachinesUIDUpdateParams) WithMachinePoolName(machinePoolName string) *V1CloudConfigsOpenStackPoolMachinesUIDUpdateParams { + o.SetMachinePoolName(machinePoolName) + return o +} + +// SetMachinePoolName adds the machinePoolName to the v1 cloud configs open stack pool machines Uid update params +func (o *V1CloudConfigsOpenStackPoolMachinesUIDUpdateParams) SetMachinePoolName(machinePoolName string) { + o.MachinePoolName = machinePoolName +} + +// WithMachineUID adds the machineUID to the v1 cloud configs open stack pool machines Uid update params +func (o *V1CloudConfigsOpenStackPoolMachinesUIDUpdateParams) WithMachineUID(machineUID string) *V1CloudConfigsOpenStackPoolMachinesUIDUpdateParams { + o.SetMachineUID(machineUID) + return o +} + +// SetMachineUID adds the machineUid to the v1 cloud configs open stack pool machines Uid update params +func (o *V1CloudConfigsOpenStackPoolMachinesUIDUpdateParams) SetMachineUID(machineUID string) { + o.MachineUID = machineUID +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudConfigsOpenStackPoolMachinesUIDUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param configUid + if err := r.SetPathParam("configUid", o.ConfigUID); err != nil { + return err + } + + // path param machinePoolName + if err := r.SetPathParam("machinePoolName", o.MachinePoolName); err != nil { + return err + } + + // path param machineUid + if err := r.SetPathParam("machineUid", o.MachineUID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_configs_open_stack_pool_machines_uid_update_responses.go b/api/client/v1/v1_cloud_configs_open_stack_pool_machines_uid_update_responses.go new file mode 100644 index 00000000..60741fe7 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_open_stack_pool_machines_uid_update_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1CloudConfigsOpenStackPoolMachinesUIDUpdateReader is a Reader for the V1CloudConfigsOpenStackPoolMachinesUIDUpdate structure. +type V1CloudConfigsOpenStackPoolMachinesUIDUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudConfigsOpenStackPoolMachinesUIDUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1CloudConfigsOpenStackPoolMachinesUIDUpdateNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudConfigsOpenStackPoolMachinesUIDUpdateNoContent creates a V1CloudConfigsOpenStackPoolMachinesUIDUpdateNoContent with default headers values +func NewV1CloudConfigsOpenStackPoolMachinesUIDUpdateNoContent() *V1CloudConfigsOpenStackPoolMachinesUIDUpdateNoContent { + return &V1CloudConfigsOpenStackPoolMachinesUIDUpdateNoContent{} +} + +/* +V1CloudConfigsOpenStackPoolMachinesUIDUpdateNoContent handles this case with default header values. + +The resource was updated successfully +*/ +type V1CloudConfigsOpenStackPoolMachinesUIDUpdateNoContent struct { +} + +func (o *V1CloudConfigsOpenStackPoolMachinesUIDUpdateNoContent) Error() string { + return fmt.Sprintf("[PUT /v1/cloudconfigs/openstack/{configUid}/machinePools/{machinePoolName}/machines/{machineUid}][%d] v1CloudConfigsOpenStackPoolMachinesUidUpdateNoContent ", 204) +} + +func (o *V1CloudConfigsOpenStackPoolMachinesUIDUpdateNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_cloud_configs_open_stack_uid_cluster_config_parameters.go b/api/client/v1/v1_cloud_configs_open_stack_uid_cluster_config_parameters.go new file mode 100644 index 00000000..3abb8fe0 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_open_stack_uid_cluster_config_parameters.go @@ -0,0 +1,157 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1CloudConfigsOpenStackUIDClusterConfigParams creates a new V1CloudConfigsOpenStackUIDClusterConfigParams object +// with the default values initialized. +func NewV1CloudConfigsOpenStackUIDClusterConfigParams() *V1CloudConfigsOpenStackUIDClusterConfigParams { + var () + return &V1CloudConfigsOpenStackUIDClusterConfigParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudConfigsOpenStackUIDClusterConfigParamsWithTimeout creates a new V1CloudConfigsOpenStackUIDClusterConfigParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudConfigsOpenStackUIDClusterConfigParamsWithTimeout(timeout time.Duration) *V1CloudConfigsOpenStackUIDClusterConfigParams { + var () + return &V1CloudConfigsOpenStackUIDClusterConfigParams{ + + timeout: timeout, + } +} + +// NewV1CloudConfigsOpenStackUIDClusterConfigParamsWithContext creates a new V1CloudConfigsOpenStackUIDClusterConfigParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudConfigsOpenStackUIDClusterConfigParamsWithContext(ctx context.Context) *V1CloudConfigsOpenStackUIDClusterConfigParams { + var () + return &V1CloudConfigsOpenStackUIDClusterConfigParams{ + + Context: ctx, + } +} + +// NewV1CloudConfigsOpenStackUIDClusterConfigParamsWithHTTPClient creates a new V1CloudConfigsOpenStackUIDClusterConfigParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudConfigsOpenStackUIDClusterConfigParamsWithHTTPClient(client *http.Client) *V1CloudConfigsOpenStackUIDClusterConfigParams { + var () + return &V1CloudConfigsOpenStackUIDClusterConfigParams{ + HTTPClient: client, + } +} + +/* +V1CloudConfigsOpenStackUIDClusterConfigParams contains all the parameters to send to the API endpoint +for the v1 cloud configs open stack Uid cluster config operation typically these are written to a http.Request +*/ +type V1CloudConfigsOpenStackUIDClusterConfigParams struct { + + /*Body*/ + Body *models.V1OpenStackCloudClusterConfigEntity + /*ConfigUID + Cluster's cloud config uid + + */ + ConfigUID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud configs open stack Uid cluster config params +func (o *V1CloudConfigsOpenStackUIDClusterConfigParams) WithTimeout(timeout time.Duration) *V1CloudConfigsOpenStackUIDClusterConfigParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud configs open stack Uid cluster config params +func (o *V1CloudConfigsOpenStackUIDClusterConfigParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud configs open stack Uid cluster config params +func (o *V1CloudConfigsOpenStackUIDClusterConfigParams) WithContext(ctx context.Context) *V1CloudConfigsOpenStackUIDClusterConfigParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud configs open stack Uid cluster config params +func (o *V1CloudConfigsOpenStackUIDClusterConfigParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud configs open stack Uid cluster config params +func (o *V1CloudConfigsOpenStackUIDClusterConfigParams) WithHTTPClient(client *http.Client) *V1CloudConfigsOpenStackUIDClusterConfigParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud configs open stack Uid cluster config params +func (o *V1CloudConfigsOpenStackUIDClusterConfigParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 cloud configs open stack Uid cluster config params +func (o *V1CloudConfigsOpenStackUIDClusterConfigParams) WithBody(body *models.V1OpenStackCloudClusterConfigEntity) *V1CloudConfigsOpenStackUIDClusterConfigParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 cloud configs open stack Uid cluster config params +func (o *V1CloudConfigsOpenStackUIDClusterConfigParams) SetBody(body *models.V1OpenStackCloudClusterConfigEntity) { + o.Body = body +} + +// WithConfigUID adds the configUID to the v1 cloud configs open stack Uid cluster config params +func (o *V1CloudConfigsOpenStackUIDClusterConfigParams) WithConfigUID(configUID string) *V1CloudConfigsOpenStackUIDClusterConfigParams { + o.SetConfigUID(configUID) + return o +} + +// SetConfigUID adds the configUid to the v1 cloud configs open stack Uid cluster config params +func (o *V1CloudConfigsOpenStackUIDClusterConfigParams) SetConfigUID(configUID string) { + o.ConfigUID = configUID +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudConfigsOpenStackUIDClusterConfigParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param configUid + if err := r.SetPathParam("configUid", o.ConfigUID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_configs_open_stack_uid_cluster_config_responses.go b/api/client/v1/v1_cloud_configs_open_stack_uid_cluster_config_responses.go new file mode 100644 index 00000000..38b16520 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_open_stack_uid_cluster_config_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1CloudConfigsOpenStackUIDClusterConfigReader is a Reader for the V1CloudConfigsOpenStackUIDClusterConfig structure. +type V1CloudConfigsOpenStackUIDClusterConfigReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudConfigsOpenStackUIDClusterConfigReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1CloudConfigsOpenStackUIDClusterConfigNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudConfigsOpenStackUIDClusterConfigNoContent creates a V1CloudConfigsOpenStackUIDClusterConfigNoContent with default headers values +func NewV1CloudConfigsOpenStackUIDClusterConfigNoContent() *V1CloudConfigsOpenStackUIDClusterConfigNoContent { + return &V1CloudConfigsOpenStackUIDClusterConfigNoContent{} +} + +/* +V1CloudConfigsOpenStackUIDClusterConfigNoContent handles this case with default header values. + +The resource was updated successfully +*/ +type V1CloudConfigsOpenStackUIDClusterConfigNoContent struct { +} + +func (o *V1CloudConfigsOpenStackUIDClusterConfigNoContent) Error() string { + return fmt.Sprintf("[PUT /v1/cloudconfigs/openstack/{configUid}/clusterConfig][%d] v1CloudConfigsOpenStackUidClusterConfigNoContent ", 204) +} + +func (o *V1CloudConfigsOpenStackUIDClusterConfigNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_cloud_configs_tke_get_parameters.go b/api/client/v1/v1_cloud_configs_tke_get_parameters.go new file mode 100644 index 00000000..cd2e3046 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_tke_get_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1CloudConfigsTkeGetParams creates a new V1CloudConfigsTkeGetParams object +// with the default values initialized. +func NewV1CloudConfigsTkeGetParams() *V1CloudConfigsTkeGetParams { + var () + return &V1CloudConfigsTkeGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudConfigsTkeGetParamsWithTimeout creates a new V1CloudConfigsTkeGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudConfigsTkeGetParamsWithTimeout(timeout time.Duration) *V1CloudConfigsTkeGetParams { + var () + return &V1CloudConfigsTkeGetParams{ + + timeout: timeout, + } +} + +// NewV1CloudConfigsTkeGetParamsWithContext creates a new V1CloudConfigsTkeGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudConfigsTkeGetParamsWithContext(ctx context.Context) *V1CloudConfigsTkeGetParams { + var () + return &V1CloudConfigsTkeGetParams{ + + Context: ctx, + } +} + +// NewV1CloudConfigsTkeGetParamsWithHTTPClient creates a new V1CloudConfigsTkeGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudConfigsTkeGetParamsWithHTTPClient(client *http.Client) *V1CloudConfigsTkeGetParams { + var () + return &V1CloudConfigsTkeGetParams{ + HTTPClient: client, + } +} + +/* +V1CloudConfigsTkeGetParams contains all the parameters to send to the API endpoint +for the v1 cloud configs tke get operation typically these are written to a http.Request +*/ +type V1CloudConfigsTkeGetParams struct { + + /*ConfigUID + Cluster's cloud config uid + + */ + ConfigUID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud configs tke get params +func (o *V1CloudConfigsTkeGetParams) WithTimeout(timeout time.Duration) *V1CloudConfigsTkeGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud configs tke get params +func (o *V1CloudConfigsTkeGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud configs tke get params +func (o *V1CloudConfigsTkeGetParams) WithContext(ctx context.Context) *V1CloudConfigsTkeGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud configs tke get params +func (o *V1CloudConfigsTkeGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud configs tke get params +func (o *V1CloudConfigsTkeGetParams) WithHTTPClient(client *http.Client) *V1CloudConfigsTkeGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud configs tke get params +func (o *V1CloudConfigsTkeGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithConfigUID adds the configUID to the v1 cloud configs tke get params +func (o *V1CloudConfigsTkeGetParams) WithConfigUID(configUID string) *V1CloudConfigsTkeGetParams { + o.SetConfigUID(configUID) + return o +} + +// SetConfigUID adds the configUid to the v1 cloud configs tke get params +func (o *V1CloudConfigsTkeGetParams) SetConfigUID(configUID string) { + o.ConfigUID = configUID +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudConfigsTkeGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param configUid + if err := r.SetPathParam("configUid", o.ConfigUID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_configs_tke_get_responses.go b/api/client/v1/v1_cloud_configs_tke_get_responses.go new file mode 100644 index 00000000..21ab02cc --- /dev/null +++ b/api/client/v1/v1_cloud_configs_tke_get_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1CloudConfigsTkeGetReader is a Reader for the V1CloudConfigsTkeGet structure. +type V1CloudConfigsTkeGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudConfigsTkeGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1CloudConfigsTkeGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudConfigsTkeGetOK creates a V1CloudConfigsTkeGetOK with default headers values +func NewV1CloudConfigsTkeGetOK() *V1CloudConfigsTkeGetOK { + return &V1CloudConfigsTkeGetOK{} +} + +/* +V1CloudConfigsTkeGetOK handles this case with default header values. + +OK +*/ +type V1CloudConfigsTkeGetOK struct { + Payload *models.V1TencentCloudConfig +} + +func (o *V1CloudConfigsTkeGetOK) Error() string { + return fmt.Sprintf("[GET /v1/cloudconfigs/tke/{configUid}][%d] v1CloudConfigsTkeGetOK %+v", 200, o.Payload) +} + +func (o *V1CloudConfigsTkeGetOK) GetPayload() *models.V1TencentCloudConfig { + return o.Payload +} + +func (o *V1CloudConfigsTkeGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1TencentCloudConfig) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_cloud_configs_tke_machine_pool_create_parameters.go b/api/client/v1/v1_cloud_configs_tke_machine_pool_create_parameters.go new file mode 100644 index 00000000..1dbdd807 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_tke_machine_pool_create_parameters.go @@ -0,0 +1,157 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1CloudConfigsTkeMachinePoolCreateParams creates a new V1CloudConfigsTkeMachinePoolCreateParams object +// with the default values initialized. +func NewV1CloudConfigsTkeMachinePoolCreateParams() *V1CloudConfigsTkeMachinePoolCreateParams { + var () + return &V1CloudConfigsTkeMachinePoolCreateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudConfigsTkeMachinePoolCreateParamsWithTimeout creates a new V1CloudConfigsTkeMachinePoolCreateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudConfigsTkeMachinePoolCreateParamsWithTimeout(timeout time.Duration) *V1CloudConfigsTkeMachinePoolCreateParams { + var () + return &V1CloudConfigsTkeMachinePoolCreateParams{ + + timeout: timeout, + } +} + +// NewV1CloudConfigsTkeMachinePoolCreateParamsWithContext creates a new V1CloudConfigsTkeMachinePoolCreateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudConfigsTkeMachinePoolCreateParamsWithContext(ctx context.Context) *V1CloudConfigsTkeMachinePoolCreateParams { + var () + return &V1CloudConfigsTkeMachinePoolCreateParams{ + + Context: ctx, + } +} + +// NewV1CloudConfigsTkeMachinePoolCreateParamsWithHTTPClient creates a new V1CloudConfigsTkeMachinePoolCreateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudConfigsTkeMachinePoolCreateParamsWithHTTPClient(client *http.Client) *V1CloudConfigsTkeMachinePoolCreateParams { + var () + return &V1CloudConfigsTkeMachinePoolCreateParams{ + HTTPClient: client, + } +} + +/* +V1CloudConfigsTkeMachinePoolCreateParams contains all the parameters to send to the API endpoint +for the v1 cloud configs tke machine pool create operation typically these are written to a http.Request +*/ +type V1CloudConfigsTkeMachinePoolCreateParams struct { + + /*Body*/ + Body *models.V1TencentMachinePoolConfigEntity + /*ConfigUID + Cluster's cloud config uid + + */ + ConfigUID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud configs tke machine pool create params +func (o *V1CloudConfigsTkeMachinePoolCreateParams) WithTimeout(timeout time.Duration) *V1CloudConfigsTkeMachinePoolCreateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud configs tke machine pool create params +func (o *V1CloudConfigsTkeMachinePoolCreateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud configs tke machine pool create params +func (o *V1CloudConfigsTkeMachinePoolCreateParams) WithContext(ctx context.Context) *V1CloudConfigsTkeMachinePoolCreateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud configs tke machine pool create params +func (o *V1CloudConfigsTkeMachinePoolCreateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud configs tke machine pool create params +func (o *V1CloudConfigsTkeMachinePoolCreateParams) WithHTTPClient(client *http.Client) *V1CloudConfigsTkeMachinePoolCreateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud configs tke machine pool create params +func (o *V1CloudConfigsTkeMachinePoolCreateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 cloud configs tke machine pool create params +func (o *V1CloudConfigsTkeMachinePoolCreateParams) WithBody(body *models.V1TencentMachinePoolConfigEntity) *V1CloudConfigsTkeMachinePoolCreateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 cloud configs tke machine pool create params +func (o *V1CloudConfigsTkeMachinePoolCreateParams) SetBody(body *models.V1TencentMachinePoolConfigEntity) { + o.Body = body +} + +// WithConfigUID adds the configUID to the v1 cloud configs tke machine pool create params +func (o *V1CloudConfigsTkeMachinePoolCreateParams) WithConfigUID(configUID string) *V1CloudConfigsTkeMachinePoolCreateParams { + o.SetConfigUID(configUID) + return o +} + +// SetConfigUID adds the configUid to the v1 cloud configs tke machine pool create params +func (o *V1CloudConfigsTkeMachinePoolCreateParams) SetConfigUID(configUID string) { + o.ConfigUID = configUID +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudConfigsTkeMachinePoolCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param configUid + if err := r.SetPathParam("configUid", o.ConfigUID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_configs_tke_machine_pool_create_responses.go b/api/client/v1/v1_cloud_configs_tke_machine_pool_create_responses.go new file mode 100644 index 00000000..c96f8663 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_tke_machine_pool_create_responses.go @@ -0,0 +1,77 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1CloudConfigsTkeMachinePoolCreateReader is a Reader for the V1CloudConfigsTkeMachinePoolCreate structure. +type V1CloudConfigsTkeMachinePoolCreateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudConfigsTkeMachinePoolCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 201: + result := NewV1CloudConfigsTkeMachinePoolCreateCreated() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudConfigsTkeMachinePoolCreateCreated creates a V1CloudConfigsTkeMachinePoolCreateCreated with default headers values +func NewV1CloudConfigsTkeMachinePoolCreateCreated() *V1CloudConfigsTkeMachinePoolCreateCreated { + return &V1CloudConfigsTkeMachinePoolCreateCreated{} +} + +/* +V1CloudConfigsTkeMachinePoolCreateCreated handles this case with default header values. + +Created successfully +*/ +type V1CloudConfigsTkeMachinePoolCreateCreated struct { + /*Audit uid for the request + */ + AuditUID string + + Payload *models.V1UID +} + +func (o *V1CloudConfigsTkeMachinePoolCreateCreated) Error() string { + return fmt.Sprintf("[POST /v1/cloudconfigs/tke/{configUid}/machinePools][%d] v1CloudConfigsTkeMachinePoolCreateCreated %+v", 201, o.Payload) +} + +func (o *V1CloudConfigsTkeMachinePoolCreateCreated) GetPayload() *models.V1UID { + return o.Payload +} + +func (o *V1CloudConfigsTkeMachinePoolCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header AuditUid + o.AuditUID = response.GetHeader("AuditUid") + + o.Payload = new(models.V1UID) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_cloud_configs_tke_machine_pool_delete_parameters.go b/api/client/v1/v1_cloud_configs_tke_machine_pool_delete_parameters.go new file mode 100644 index 00000000..d725bcf5 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_tke_machine_pool_delete_parameters.go @@ -0,0 +1,157 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1CloudConfigsTkeMachinePoolDeleteParams creates a new V1CloudConfigsTkeMachinePoolDeleteParams object +// with the default values initialized. +func NewV1CloudConfigsTkeMachinePoolDeleteParams() *V1CloudConfigsTkeMachinePoolDeleteParams { + var () + return &V1CloudConfigsTkeMachinePoolDeleteParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudConfigsTkeMachinePoolDeleteParamsWithTimeout creates a new V1CloudConfigsTkeMachinePoolDeleteParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudConfigsTkeMachinePoolDeleteParamsWithTimeout(timeout time.Duration) *V1CloudConfigsTkeMachinePoolDeleteParams { + var () + return &V1CloudConfigsTkeMachinePoolDeleteParams{ + + timeout: timeout, + } +} + +// NewV1CloudConfigsTkeMachinePoolDeleteParamsWithContext creates a new V1CloudConfigsTkeMachinePoolDeleteParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudConfigsTkeMachinePoolDeleteParamsWithContext(ctx context.Context) *V1CloudConfigsTkeMachinePoolDeleteParams { + var () + return &V1CloudConfigsTkeMachinePoolDeleteParams{ + + Context: ctx, + } +} + +// NewV1CloudConfigsTkeMachinePoolDeleteParamsWithHTTPClient creates a new V1CloudConfigsTkeMachinePoolDeleteParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudConfigsTkeMachinePoolDeleteParamsWithHTTPClient(client *http.Client) *V1CloudConfigsTkeMachinePoolDeleteParams { + var () + return &V1CloudConfigsTkeMachinePoolDeleteParams{ + HTTPClient: client, + } +} + +/* +V1CloudConfigsTkeMachinePoolDeleteParams contains all the parameters to send to the API endpoint +for the v1 cloud configs tke machine pool delete operation typically these are written to a http.Request +*/ +type V1CloudConfigsTkeMachinePoolDeleteParams struct { + + /*ConfigUID + Cluster's cloud config uid + + */ + ConfigUID string + /*MachinePoolName + Machine pool name + + */ + MachinePoolName string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud configs tke machine pool delete params +func (o *V1CloudConfigsTkeMachinePoolDeleteParams) WithTimeout(timeout time.Duration) *V1CloudConfigsTkeMachinePoolDeleteParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud configs tke machine pool delete params +func (o *V1CloudConfigsTkeMachinePoolDeleteParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud configs tke machine pool delete params +func (o *V1CloudConfigsTkeMachinePoolDeleteParams) WithContext(ctx context.Context) *V1CloudConfigsTkeMachinePoolDeleteParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud configs tke machine pool delete params +func (o *V1CloudConfigsTkeMachinePoolDeleteParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud configs tke machine pool delete params +func (o *V1CloudConfigsTkeMachinePoolDeleteParams) WithHTTPClient(client *http.Client) *V1CloudConfigsTkeMachinePoolDeleteParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud configs tke machine pool delete params +func (o *V1CloudConfigsTkeMachinePoolDeleteParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithConfigUID adds the configUID to the v1 cloud configs tke machine pool delete params +func (o *V1CloudConfigsTkeMachinePoolDeleteParams) WithConfigUID(configUID string) *V1CloudConfigsTkeMachinePoolDeleteParams { + o.SetConfigUID(configUID) + return o +} + +// SetConfigUID adds the configUid to the v1 cloud configs tke machine pool delete params +func (o *V1CloudConfigsTkeMachinePoolDeleteParams) SetConfigUID(configUID string) { + o.ConfigUID = configUID +} + +// WithMachinePoolName adds the machinePoolName to the v1 cloud configs tke machine pool delete params +func (o *V1CloudConfigsTkeMachinePoolDeleteParams) WithMachinePoolName(machinePoolName string) *V1CloudConfigsTkeMachinePoolDeleteParams { + o.SetMachinePoolName(machinePoolName) + return o +} + +// SetMachinePoolName adds the machinePoolName to the v1 cloud configs tke machine pool delete params +func (o *V1CloudConfigsTkeMachinePoolDeleteParams) SetMachinePoolName(machinePoolName string) { + o.MachinePoolName = machinePoolName +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudConfigsTkeMachinePoolDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param configUid + if err := r.SetPathParam("configUid", o.ConfigUID); err != nil { + return err + } + + // path param machinePoolName + if err := r.SetPathParam("machinePoolName", o.MachinePoolName); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_configs_tke_machine_pool_delete_responses.go b/api/client/v1/v1_cloud_configs_tke_machine_pool_delete_responses.go new file mode 100644 index 00000000..97bc4d6f --- /dev/null +++ b/api/client/v1/v1_cloud_configs_tke_machine_pool_delete_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1CloudConfigsTkeMachinePoolDeleteReader is a Reader for the V1CloudConfigsTkeMachinePoolDelete structure. +type V1CloudConfigsTkeMachinePoolDeleteReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudConfigsTkeMachinePoolDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1CloudConfigsTkeMachinePoolDeleteNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudConfigsTkeMachinePoolDeleteNoContent creates a V1CloudConfigsTkeMachinePoolDeleteNoContent with default headers values +func NewV1CloudConfigsTkeMachinePoolDeleteNoContent() *V1CloudConfigsTkeMachinePoolDeleteNoContent { + return &V1CloudConfigsTkeMachinePoolDeleteNoContent{} +} + +/* +V1CloudConfigsTkeMachinePoolDeleteNoContent handles this case with default header values. + +The resource was deleted successfully +*/ +type V1CloudConfigsTkeMachinePoolDeleteNoContent struct { +} + +func (o *V1CloudConfigsTkeMachinePoolDeleteNoContent) Error() string { + return fmt.Sprintf("[DELETE /v1/cloudconfigs/tke/{configUid}/machinePools/{machinePoolName}][%d] v1CloudConfigsTkeMachinePoolDeleteNoContent ", 204) +} + +func (o *V1CloudConfigsTkeMachinePoolDeleteNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_cloud_configs_tke_machine_pool_update_parameters.go b/api/client/v1/v1_cloud_configs_tke_machine_pool_update_parameters.go new file mode 100644 index 00000000..246a7019 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_tke_machine_pool_update_parameters.go @@ -0,0 +1,178 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1CloudConfigsTkeMachinePoolUpdateParams creates a new V1CloudConfigsTkeMachinePoolUpdateParams object +// with the default values initialized. +func NewV1CloudConfigsTkeMachinePoolUpdateParams() *V1CloudConfigsTkeMachinePoolUpdateParams { + var () + return &V1CloudConfigsTkeMachinePoolUpdateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudConfigsTkeMachinePoolUpdateParamsWithTimeout creates a new V1CloudConfigsTkeMachinePoolUpdateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudConfigsTkeMachinePoolUpdateParamsWithTimeout(timeout time.Duration) *V1CloudConfigsTkeMachinePoolUpdateParams { + var () + return &V1CloudConfigsTkeMachinePoolUpdateParams{ + + timeout: timeout, + } +} + +// NewV1CloudConfigsTkeMachinePoolUpdateParamsWithContext creates a new V1CloudConfigsTkeMachinePoolUpdateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudConfigsTkeMachinePoolUpdateParamsWithContext(ctx context.Context) *V1CloudConfigsTkeMachinePoolUpdateParams { + var () + return &V1CloudConfigsTkeMachinePoolUpdateParams{ + + Context: ctx, + } +} + +// NewV1CloudConfigsTkeMachinePoolUpdateParamsWithHTTPClient creates a new V1CloudConfigsTkeMachinePoolUpdateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudConfigsTkeMachinePoolUpdateParamsWithHTTPClient(client *http.Client) *V1CloudConfigsTkeMachinePoolUpdateParams { + var () + return &V1CloudConfigsTkeMachinePoolUpdateParams{ + HTTPClient: client, + } +} + +/* +V1CloudConfigsTkeMachinePoolUpdateParams contains all the parameters to send to the API endpoint +for the v1 cloud configs tke machine pool update operation typically these are written to a http.Request +*/ +type V1CloudConfigsTkeMachinePoolUpdateParams struct { + + /*Body*/ + Body *models.V1TencentMachinePoolConfigEntity + /*ConfigUID + Cluster's cloud config uid + + */ + ConfigUID string + /*MachinePoolName + Machine pool name + + */ + MachinePoolName string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud configs tke machine pool update params +func (o *V1CloudConfigsTkeMachinePoolUpdateParams) WithTimeout(timeout time.Duration) *V1CloudConfigsTkeMachinePoolUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud configs tke machine pool update params +func (o *V1CloudConfigsTkeMachinePoolUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud configs tke machine pool update params +func (o *V1CloudConfigsTkeMachinePoolUpdateParams) WithContext(ctx context.Context) *V1CloudConfigsTkeMachinePoolUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud configs tke machine pool update params +func (o *V1CloudConfigsTkeMachinePoolUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud configs tke machine pool update params +func (o *V1CloudConfigsTkeMachinePoolUpdateParams) WithHTTPClient(client *http.Client) *V1CloudConfigsTkeMachinePoolUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud configs tke machine pool update params +func (o *V1CloudConfigsTkeMachinePoolUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 cloud configs tke machine pool update params +func (o *V1CloudConfigsTkeMachinePoolUpdateParams) WithBody(body *models.V1TencentMachinePoolConfigEntity) *V1CloudConfigsTkeMachinePoolUpdateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 cloud configs tke machine pool update params +func (o *V1CloudConfigsTkeMachinePoolUpdateParams) SetBody(body *models.V1TencentMachinePoolConfigEntity) { + o.Body = body +} + +// WithConfigUID adds the configUID to the v1 cloud configs tke machine pool update params +func (o *V1CloudConfigsTkeMachinePoolUpdateParams) WithConfigUID(configUID string) *V1CloudConfigsTkeMachinePoolUpdateParams { + o.SetConfigUID(configUID) + return o +} + +// SetConfigUID adds the configUid to the v1 cloud configs tke machine pool update params +func (o *V1CloudConfigsTkeMachinePoolUpdateParams) SetConfigUID(configUID string) { + o.ConfigUID = configUID +} + +// WithMachinePoolName adds the machinePoolName to the v1 cloud configs tke machine pool update params +func (o *V1CloudConfigsTkeMachinePoolUpdateParams) WithMachinePoolName(machinePoolName string) *V1CloudConfigsTkeMachinePoolUpdateParams { + o.SetMachinePoolName(machinePoolName) + return o +} + +// SetMachinePoolName adds the machinePoolName to the v1 cloud configs tke machine pool update params +func (o *V1CloudConfigsTkeMachinePoolUpdateParams) SetMachinePoolName(machinePoolName string) { + o.MachinePoolName = machinePoolName +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudConfigsTkeMachinePoolUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param configUid + if err := r.SetPathParam("configUid", o.ConfigUID); err != nil { + return err + } + + // path param machinePoolName + if err := r.SetPathParam("machinePoolName", o.MachinePoolName); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_configs_tke_machine_pool_update_responses.go b/api/client/v1/v1_cloud_configs_tke_machine_pool_update_responses.go new file mode 100644 index 00000000..15d3c73a --- /dev/null +++ b/api/client/v1/v1_cloud_configs_tke_machine_pool_update_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1CloudConfigsTkeMachinePoolUpdateReader is a Reader for the V1CloudConfigsTkeMachinePoolUpdate structure. +type V1CloudConfigsTkeMachinePoolUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudConfigsTkeMachinePoolUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1CloudConfigsTkeMachinePoolUpdateNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudConfigsTkeMachinePoolUpdateNoContent creates a V1CloudConfigsTkeMachinePoolUpdateNoContent with default headers values +func NewV1CloudConfigsTkeMachinePoolUpdateNoContent() *V1CloudConfigsTkeMachinePoolUpdateNoContent { + return &V1CloudConfigsTkeMachinePoolUpdateNoContent{} +} + +/* +V1CloudConfigsTkeMachinePoolUpdateNoContent handles this case with default header values. + +The resource was updated successfully +*/ +type V1CloudConfigsTkeMachinePoolUpdateNoContent struct { +} + +func (o *V1CloudConfigsTkeMachinePoolUpdateNoContent) Error() string { + return fmt.Sprintf("[PUT /v1/cloudconfigs/tke/{configUid}/machinePools/{machinePoolName}][%d] v1CloudConfigsTkeMachinePoolUpdateNoContent ", 204) +} + +func (o *V1CloudConfigsTkeMachinePoolUpdateNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_cloud_configs_tke_pool_machines_add_parameters.go b/api/client/v1/v1_cloud_configs_tke_pool_machines_add_parameters.go new file mode 100644 index 00000000..c179d0f4 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_tke_pool_machines_add_parameters.go @@ -0,0 +1,178 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1CloudConfigsTkePoolMachinesAddParams creates a new V1CloudConfigsTkePoolMachinesAddParams object +// with the default values initialized. +func NewV1CloudConfigsTkePoolMachinesAddParams() *V1CloudConfigsTkePoolMachinesAddParams { + var () + return &V1CloudConfigsTkePoolMachinesAddParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudConfigsTkePoolMachinesAddParamsWithTimeout creates a new V1CloudConfigsTkePoolMachinesAddParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudConfigsTkePoolMachinesAddParamsWithTimeout(timeout time.Duration) *V1CloudConfigsTkePoolMachinesAddParams { + var () + return &V1CloudConfigsTkePoolMachinesAddParams{ + + timeout: timeout, + } +} + +// NewV1CloudConfigsTkePoolMachinesAddParamsWithContext creates a new V1CloudConfigsTkePoolMachinesAddParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudConfigsTkePoolMachinesAddParamsWithContext(ctx context.Context) *V1CloudConfigsTkePoolMachinesAddParams { + var () + return &V1CloudConfigsTkePoolMachinesAddParams{ + + Context: ctx, + } +} + +// NewV1CloudConfigsTkePoolMachinesAddParamsWithHTTPClient creates a new V1CloudConfigsTkePoolMachinesAddParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudConfigsTkePoolMachinesAddParamsWithHTTPClient(client *http.Client) *V1CloudConfigsTkePoolMachinesAddParams { + var () + return &V1CloudConfigsTkePoolMachinesAddParams{ + HTTPClient: client, + } +} + +/* +V1CloudConfigsTkePoolMachinesAddParams contains all the parameters to send to the API endpoint +for the v1 cloud configs tke pool machines add operation typically these are written to a http.Request +*/ +type V1CloudConfigsTkePoolMachinesAddParams struct { + + /*Body*/ + Body *models.V1TencentMachine + /*ConfigUID + Cluster's cloud config uid + + */ + ConfigUID string + /*MachinePoolName + Machine pool name + + */ + MachinePoolName string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud configs tke pool machines add params +func (o *V1CloudConfigsTkePoolMachinesAddParams) WithTimeout(timeout time.Duration) *V1CloudConfigsTkePoolMachinesAddParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud configs tke pool machines add params +func (o *V1CloudConfigsTkePoolMachinesAddParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud configs tke pool machines add params +func (o *V1CloudConfigsTkePoolMachinesAddParams) WithContext(ctx context.Context) *V1CloudConfigsTkePoolMachinesAddParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud configs tke pool machines add params +func (o *V1CloudConfigsTkePoolMachinesAddParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud configs tke pool machines add params +func (o *V1CloudConfigsTkePoolMachinesAddParams) WithHTTPClient(client *http.Client) *V1CloudConfigsTkePoolMachinesAddParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud configs tke pool machines add params +func (o *V1CloudConfigsTkePoolMachinesAddParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 cloud configs tke pool machines add params +func (o *V1CloudConfigsTkePoolMachinesAddParams) WithBody(body *models.V1TencentMachine) *V1CloudConfigsTkePoolMachinesAddParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 cloud configs tke pool machines add params +func (o *V1CloudConfigsTkePoolMachinesAddParams) SetBody(body *models.V1TencentMachine) { + o.Body = body +} + +// WithConfigUID adds the configUID to the v1 cloud configs tke pool machines add params +func (o *V1CloudConfigsTkePoolMachinesAddParams) WithConfigUID(configUID string) *V1CloudConfigsTkePoolMachinesAddParams { + o.SetConfigUID(configUID) + return o +} + +// SetConfigUID adds the configUid to the v1 cloud configs tke pool machines add params +func (o *V1CloudConfigsTkePoolMachinesAddParams) SetConfigUID(configUID string) { + o.ConfigUID = configUID +} + +// WithMachinePoolName adds the machinePoolName to the v1 cloud configs tke pool machines add params +func (o *V1CloudConfigsTkePoolMachinesAddParams) WithMachinePoolName(machinePoolName string) *V1CloudConfigsTkePoolMachinesAddParams { + o.SetMachinePoolName(machinePoolName) + return o +} + +// SetMachinePoolName adds the machinePoolName to the v1 cloud configs tke pool machines add params +func (o *V1CloudConfigsTkePoolMachinesAddParams) SetMachinePoolName(machinePoolName string) { + o.MachinePoolName = machinePoolName +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudConfigsTkePoolMachinesAddParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param configUid + if err := r.SetPathParam("configUid", o.ConfigUID); err != nil { + return err + } + + // path param machinePoolName + if err := r.SetPathParam("machinePoolName", o.MachinePoolName); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_configs_tke_pool_machines_add_responses.go b/api/client/v1/v1_cloud_configs_tke_pool_machines_add_responses.go new file mode 100644 index 00000000..bf559b9a --- /dev/null +++ b/api/client/v1/v1_cloud_configs_tke_pool_machines_add_responses.go @@ -0,0 +1,77 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1CloudConfigsTkePoolMachinesAddReader is a Reader for the V1CloudConfigsTkePoolMachinesAdd structure. +type V1CloudConfigsTkePoolMachinesAddReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudConfigsTkePoolMachinesAddReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 201: + result := NewV1CloudConfigsTkePoolMachinesAddCreated() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudConfigsTkePoolMachinesAddCreated creates a V1CloudConfigsTkePoolMachinesAddCreated with default headers values +func NewV1CloudConfigsTkePoolMachinesAddCreated() *V1CloudConfigsTkePoolMachinesAddCreated { + return &V1CloudConfigsTkePoolMachinesAddCreated{} +} + +/* +V1CloudConfigsTkePoolMachinesAddCreated handles this case with default header values. + +Created successfully +*/ +type V1CloudConfigsTkePoolMachinesAddCreated struct { + /*Audit uid for the request + */ + AuditUID string + + Payload *models.V1UID +} + +func (o *V1CloudConfigsTkePoolMachinesAddCreated) Error() string { + return fmt.Sprintf("[POST /v1/cloudconfigs/tke/{configUid}/machinePools/{machinePoolName}/machines][%d] v1CloudConfigsTkePoolMachinesAddCreated %+v", 201, o.Payload) +} + +func (o *V1CloudConfigsTkePoolMachinesAddCreated) GetPayload() *models.V1UID { + return o.Payload +} + +func (o *V1CloudConfigsTkePoolMachinesAddCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header AuditUid + o.AuditUID = response.GetHeader("AuditUid") + + o.Payload = new(models.V1UID) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_cloud_configs_tke_pool_machines_list_parameters.go b/api/client/v1/v1_cloud_configs_tke_pool_machines_list_parameters.go new file mode 100644 index 00000000..b1adb6af --- /dev/null +++ b/api/client/v1/v1_cloud_configs_tke_pool_machines_list_parameters.go @@ -0,0 +1,365 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// NewV1CloudConfigsTkePoolMachinesListParams creates a new V1CloudConfigsTkePoolMachinesListParams object +// with the default values initialized. +func NewV1CloudConfigsTkePoolMachinesListParams() *V1CloudConfigsTkePoolMachinesListParams { + var ( + limitDefault = int64(50) + ) + return &V1CloudConfigsTkePoolMachinesListParams{ + Limit: &limitDefault, + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudConfigsTkePoolMachinesListParamsWithTimeout creates a new V1CloudConfigsTkePoolMachinesListParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudConfigsTkePoolMachinesListParamsWithTimeout(timeout time.Duration) *V1CloudConfigsTkePoolMachinesListParams { + var ( + limitDefault = int64(50) + ) + return &V1CloudConfigsTkePoolMachinesListParams{ + Limit: &limitDefault, + + timeout: timeout, + } +} + +// NewV1CloudConfigsTkePoolMachinesListParamsWithContext creates a new V1CloudConfigsTkePoolMachinesListParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudConfigsTkePoolMachinesListParamsWithContext(ctx context.Context) *V1CloudConfigsTkePoolMachinesListParams { + var ( + limitDefault = int64(50) + ) + return &V1CloudConfigsTkePoolMachinesListParams{ + Limit: &limitDefault, + + Context: ctx, + } +} + +// NewV1CloudConfigsTkePoolMachinesListParamsWithHTTPClient creates a new V1CloudConfigsTkePoolMachinesListParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudConfigsTkePoolMachinesListParamsWithHTTPClient(client *http.Client) *V1CloudConfigsTkePoolMachinesListParams { + var ( + limitDefault = int64(50) + ) + return &V1CloudConfigsTkePoolMachinesListParams{ + Limit: &limitDefault, + HTTPClient: client, + } +} + +/* +V1CloudConfigsTkePoolMachinesListParams contains all the parameters to send to the API endpoint +for the v1 cloud configs tke pool machines list operation typically these are written to a http.Request +*/ +type V1CloudConfigsTkePoolMachinesListParams struct { + + /*ConfigUID + Cluster's cloud config uid + + */ + ConfigUID string + /*Continue + continue token to paginate the subsequent data items + + */ + Continue *string + /*Fields + Set of fields to be presented in the response with values. The fields are comma separated. Eg: metadata.uid,metadata.name + + */ + Fields *string + /*Filters + Filters can be combined with AND, OR operators with field path name. Eg: metadata.name=TestServiceANDspec.cloudType=aws + + Server will be restricted to certain fields based on the indexed data for each resource. + + */ + Filters *string + /*Limit + limit is a maximum number of responses to return for a list call. Default and maximum value of the limit is 50. + If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. + + */ + Limit *int64 + /*MachinePoolName + Machine pool name + + */ + MachinePoolName string + /*Offset + offset is the next index number from which the response will start. The response offset value can be used along with continue token for the pagination. + + */ + Offset *int64 + /*OrderBy + Specify the fields with sort order. 1 indicates ascending and -1 for descending. Eg: orderBy=metadata.name=1,metadata.uid=-1 + + */ + OrderBy *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud configs tke pool machines list params +func (o *V1CloudConfigsTkePoolMachinesListParams) WithTimeout(timeout time.Duration) *V1CloudConfigsTkePoolMachinesListParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud configs tke pool machines list params +func (o *V1CloudConfigsTkePoolMachinesListParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud configs tke pool machines list params +func (o *V1CloudConfigsTkePoolMachinesListParams) WithContext(ctx context.Context) *V1CloudConfigsTkePoolMachinesListParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud configs tke pool machines list params +func (o *V1CloudConfigsTkePoolMachinesListParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud configs tke pool machines list params +func (o *V1CloudConfigsTkePoolMachinesListParams) WithHTTPClient(client *http.Client) *V1CloudConfigsTkePoolMachinesListParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud configs tke pool machines list params +func (o *V1CloudConfigsTkePoolMachinesListParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithConfigUID adds the configUID to the v1 cloud configs tke pool machines list params +func (o *V1CloudConfigsTkePoolMachinesListParams) WithConfigUID(configUID string) *V1CloudConfigsTkePoolMachinesListParams { + o.SetConfigUID(configUID) + return o +} + +// SetConfigUID adds the configUid to the v1 cloud configs tke pool machines list params +func (o *V1CloudConfigsTkePoolMachinesListParams) SetConfigUID(configUID string) { + o.ConfigUID = configUID +} + +// WithContinue adds the continueVar to the v1 cloud configs tke pool machines list params +func (o *V1CloudConfigsTkePoolMachinesListParams) WithContinue(continueVar *string) *V1CloudConfigsTkePoolMachinesListParams { + o.SetContinue(continueVar) + return o +} + +// SetContinue adds the continue to the v1 cloud configs tke pool machines list params +func (o *V1CloudConfigsTkePoolMachinesListParams) SetContinue(continueVar *string) { + o.Continue = continueVar +} + +// WithFields adds the fields to the v1 cloud configs tke pool machines list params +func (o *V1CloudConfigsTkePoolMachinesListParams) WithFields(fields *string) *V1CloudConfigsTkePoolMachinesListParams { + o.SetFields(fields) + return o +} + +// SetFields adds the fields to the v1 cloud configs tke pool machines list params +func (o *V1CloudConfigsTkePoolMachinesListParams) SetFields(fields *string) { + o.Fields = fields +} + +// WithFilters adds the filters to the v1 cloud configs tke pool machines list params +func (o *V1CloudConfigsTkePoolMachinesListParams) WithFilters(filters *string) *V1CloudConfigsTkePoolMachinesListParams { + o.SetFilters(filters) + return o +} + +// SetFilters adds the filters to the v1 cloud configs tke pool machines list params +func (o *V1CloudConfigsTkePoolMachinesListParams) SetFilters(filters *string) { + o.Filters = filters +} + +// WithLimit adds the limit to the v1 cloud configs tke pool machines list params +func (o *V1CloudConfigsTkePoolMachinesListParams) WithLimit(limit *int64) *V1CloudConfigsTkePoolMachinesListParams { + o.SetLimit(limit) + return o +} + +// SetLimit adds the limit to the v1 cloud configs tke pool machines list params +func (o *V1CloudConfigsTkePoolMachinesListParams) SetLimit(limit *int64) { + o.Limit = limit +} + +// WithMachinePoolName adds the machinePoolName to the v1 cloud configs tke pool machines list params +func (o *V1CloudConfigsTkePoolMachinesListParams) WithMachinePoolName(machinePoolName string) *V1CloudConfigsTkePoolMachinesListParams { + o.SetMachinePoolName(machinePoolName) + return o +} + +// SetMachinePoolName adds the machinePoolName to the v1 cloud configs tke pool machines list params +func (o *V1CloudConfigsTkePoolMachinesListParams) SetMachinePoolName(machinePoolName string) { + o.MachinePoolName = machinePoolName +} + +// WithOffset adds the offset to the v1 cloud configs tke pool machines list params +func (o *V1CloudConfigsTkePoolMachinesListParams) WithOffset(offset *int64) *V1CloudConfigsTkePoolMachinesListParams { + o.SetOffset(offset) + return o +} + +// SetOffset adds the offset to the v1 cloud configs tke pool machines list params +func (o *V1CloudConfigsTkePoolMachinesListParams) SetOffset(offset *int64) { + o.Offset = offset +} + +// WithOrderBy adds the orderBy to the v1 cloud configs tke pool machines list params +func (o *V1CloudConfigsTkePoolMachinesListParams) WithOrderBy(orderBy *string) *V1CloudConfigsTkePoolMachinesListParams { + o.SetOrderBy(orderBy) + return o +} + +// SetOrderBy adds the orderBy to the v1 cloud configs tke pool machines list params +func (o *V1CloudConfigsTkePoolMachinesListParams) SetOrderBy(orderBy *string) { + o.OrderBy = orderBy +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudConfigsTkePoolMachinesListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param configUid + if err := r.SetPathParam("configUid", o.ConfigUID); err != nil { + return err + } + + if o.Continue != nil { + + // query param continue + var qrContinue string + if o.Continue != nil { + qrContinue = *o.Continue + } + qContinue := qrContinue + if qContinue != "" { + if err := r.SetQueryParam("continue", qContinue); err != nil { + return err + } + } + + } + + if o.Fields != nil { + + // query param fields + var qrFields string + if o.Fields != nil { + qrFields = *o.Fields + } + qFields := qrFields + if qFields != "" { + if err := r.SetQueryParam("fields", qFields); err != nil { + return err + } + } + + } + + if o.Filters != nil { + + // query param filters + var qrFilters string + if o.Filters != nil { + qrFilters = *o.Filters + } + qFilters := qrFilters + if qFilters != "" { + if err := r.SetQueryParam("filters", qFilters); err != nil { + return err + } + } + + } + + if o.Limit != nil { + + // query param limit + var qrLimit int64 + if o.Limit != nil { + qrLimit = *o.Limit + } + qLimit := swag.FormatInt64(qrLimit) + if qLimit != "" { + if err := r.SetQueryParam("limit", qLimit); err != nil { + return err + } + } + + } + + // path param machinePoolName + if err := r.SetPathParam("machinePoolName", o.MachinePoolName); err != nil { + return err + } + + if o.Offset != nil { + + // query param offset + var qrOffset int64 + if o.Offset != nil { + qrOffset = *o.Offset + } + qOffset := swag.FormatInt64(qrOffset) + if qOffset != "" { + if err := r.SetQueryParam("offset", qOffset); err != nil { + return err + } + } + + } + + if o.OrderBy != nil { + + // query param orderBy + var qrOrderBy string + if o.OrderBy != nil { + qrOrderBy = *o.OrderBy + } + qOrderBy := qrOrderBy + if qOrderBy != "" { + if err := r.SetQueryParam("orderBy", qOrderBy); err != nil { + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_configs_tke_pool_machines_list_responses.go b/api/client/v1/v1_cloud_configs_tke_pool_machines_list_responses.go new file mode 100644 index 00000000..c531d574 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_tke_pool_machines_list_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1CloudConfigsTkePoolMachinesListReader is a Reader for the V1CloudConfigsTkePoolMachinesList structure. +type V1CloudConfigsTkePoolMachinesListReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudConfigsTkePoolMachinesListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1CloudConfigsTkePoolMachinesListOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudConfigsTkePoolMachinesListOK creates a V1CloudConfigsTkePoolMachinesListOK with default headers values +func NewV1CloudConfigsTkePoolMachinesListOK() *V1CloudConfigsTkePoolMachinesListOK { + return &V1CloudConfigsTkePoolMachinesListOK{} +} + +/* +V1CloudConfigsTkePoolMachinesListOK handles this case with default header values. + +An array of TKE machine items +*/ +type V1CloudConfigsTkePoolMachinesListOK struct { + Payload *models.V1TencentMachines +} + +func (o *V1CloudConfigsTkePoolMachinesListOK) Error() string { + return fmt.Sprintf("[GET /v1/cloudconfigs/tke/{configUid}/machinePools/{machinePoolName}/machines][%d] v1CloudConfigsTkePoolMachinesListOK %+v", 200, o.Payload) +} + +func (o *V1CloudConfigsTkePoolMachinesListOK) GetPayload() *models.V1TencentMachines { + return o.Payload +} + +func (o *V1CloudConfigsTkePoolMachinesListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1TencentMachines) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_cloud_configs_tke_pool_machines_uid_delete_parameters.go b/api/client/v1/v1_cloud_configs_tke_pool_machines_uid_delete_parameters.go new file mode 100644 index 00000000..beb5abdc --- /dev/null +++ b/api/client/v1/v1_cloud_configs_tke_pool_machines_uid_delete_parameters.go @@ -0,0 +1,178 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1CloudConfigsTkePoolMachinesUIDDeleteParams creates a new V1CloudConfigsTkePoolMachinesUIDDeleteParams object +// with the default values initialized. +func NewV1CloudConfigsTkePoolMachinesUIDDeleteParams() *V1CloudConfigsTkePoolMachinesUIDDeleteParams { + var () + return &V1CloudConfigsTkePoolMachinesUIDDeleteParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudConfigsTkePoolMachinesUIDDeleteParamsWithTimeout creates a new V1CloudConfigsTkePoolMachinesUIDDeleteParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudConfigsTkePoolMachinesUIDDeleteParamsWithTimeout(timeout time.Duration) *V1CloudConfigsTkePoolMachinesUIDDeleteParams { + var () + return &V1CloudConfigsTkePoolMachinesUIDDeleteParams{ + + timeout: timeout, + } +} + +// NewV1CloudConfigsTkePoolMachinesUIDDeleteParamsWithContext creates a new V1CloudConfigsTkePoolMachinesUIDDeleteParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudConfigsTkePoolMachinesUIDDeleteParamsWithContext(ctx context.Context) *V1CloudConfigsTkePoolMachinesUIDDeleteParams { + var () + return &V1CloudConfigsTkePoolMachinesUIDDeleteParams{ + + Context: ctx, + } +} + +// NewV1CloudConfigsTkePoolMachinesUIDDeleteParamsWithHTTPClient creates a new V1CloudConfigsTkePoolMachinesUIDDeleteParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudConfigsTkePoolMachinesUIDDeleteParamsWithHTTPClient(client *http.Client) *V1CloudConfigsTkePoolMachinesUIDDeleteParams { + var () + return &V1CloudConfigsTkePoolMachinesUIDDeleteParams{ + HTTPClient: client, + } +} + +/* +V1CloudConfigsTkePoolMachinesUIDDeleteParams contains all the parameters to send to the API endpoint +for the v1 cloud configs tke pool machines Uid delete operation typically these are written to a http.Request +*/ +type V1CloudConfigsTkePoolMachinesUIDDeleteParams struct { + + /*ConfigUID + Cluster's cloud config uid + + */ + ConfigUID string + /*MachinePoolName + Machine pool name + + */ + MachinePoolName string + /*MachineUID + Machine uid + + */ + MachineUID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud configs tke pool machines Uid delete params +func (o *V1CloudConfigsTkePoolMachinesUIDDeleteParams) WithTimeout(timeout time.Duration) *V1CloudConfigsTkePoolMachinesUIDDeleteParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud configs tke pool machines Uid delete params +func (o *V1CloudConfigsTkePoolMachinesUIDDeleteParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud configs tke pool machines Uid delete params +func (o *V1CloudConfigsTkePoolMachinesUIDDeleteParams) WithContext(ctx context.Context) *V1CloudConfigsTkePoolMachinesUIDDeleteParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud configs tke pool machines Uid delete params +func (o *V1CloudConfigsTkePoolMachinesUIDDeleteParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud configs tke pool machines Uid delete params +func (o *V1CloudConfigsTkePoolMachinesUIDDeleteParams) WithHTTPClient(client *http.Client) *V1CloudConfigsTkePoolMachinesUIDDeleteParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud configs tke pool machines Uid delete params +func (o *V1CloudConfigsTkePoolMachinesUIDDeleteParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithConfigUID adds the configUID to the v1 cloud configs tke pool machines Uid delete params +func (o *V1CloudConfigsTkePoolMachinesUIDDeleteParams) WithConfigUID(configUID string) *V1CloudConfigsTkePoolMachinesUIDDeleteParams { + o.SetConfigUID(configUID) + return o +} + +// SetConfigUID adds the configUid to the v1 cloud configs tke pool machines Uid delete params +func (o *V1CloudConfigsTkePoolMachinesUIDDeleteParams) SetConfigUID(configUID string) { + o.ConfigUID = configUID +} + +// WithMachinePoolName adds the machinePoolName to the v1 cloud configs tke pool machines Uid delete params +func (o *V1CloudConfigsTkePoolMachinesUIDDeleteParams) WithMachinePoolName(machinePoolName string) *V1CloudConfigsTkePoolMachinesUIDDeleteParams { + o.SetMachinePoolName(machinePoolName) + return o +} + +// SetMachinePoolName adds the machinePoolName to the v1 cloud configs tke pool machines Uid delete params +func (o *V1CloudConfigsTkePoolMachinesUIDDeleteParams) SetMachinePoolName(machinePoolName string) { + o.MachinePoolName = machinePoolName +} + +// WithMachineUID adds the machineUID to the v1 cloud configs tke pool machines Uid delete params +func (o *V1CloudConfigsTkePoolMachinesUIDDeleteParams) WithMachineUID(machineUID string) *V1CloudConfigsTkePoolMachinesUIDDeleteParams { + o.SetMachineUID(machineUID) + return o +} + +// SetMachineUID adds the machineUid to the v1 cloud configs tke pool machines Uid delete params +func (o *V1CloudConfigsTkePoolMachinesUIDDeleteParams) SetMachineUID(machineUID string) { + o.MachineUID = machineUID +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudConfigsTkePoolMachinesUIDDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param configUid + if err := r.SetPathParam("configUid", o.ConfigUID); err != nil { + return err + } + + // path param machinePoolName + if err := r.SetPathParam("machinePoolName", o.MachinePoolName); err != nil { + return err + } + + // path param machineUid + if err := r.SetPathParam("machineUid", o.MachineUID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_configs_tke_pool_machines_uid_delete_responses.go b/api/client/v1/v1_cloud_configs_tke_pool_machines_uid_delete_responses.go new file mode 100644 index 00000000..e36c7e1b --- /dev/null +++ b/api/client/v1/v1_cloud_configs_tke_pool_machines_uid_delete_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1CloudConfigsTkePoolMachinesUIDDeleteReader is a Reader for the V1CloudConfigsTkePoolMachinesUIDDelete structure. +type V1CloudConfigsTkePoolMachinesUIDDeleteReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudConfigsTkePoolMachinesUIDDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1CloudConfigsTkePoolMachinesUIDDeleteNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudConfigsTkePoolMachinesUIDDeleteNoContent creates a V1CloudConfigsTkePoolMachinesUIDDeleteNoContent with default headers values +func NewV1CloudConfigsTkePoolMachinesUIDDeleteNoContent() *V1CloudConfigsTkePoolMachinesUIDDeleteNoContent { + return &V1CloudConfigsTkePoolMachinesUIDDeleteNoContent{} +} + +/* +V1CloudConfigsTkePoolMachinesUIDDeleteNoContent handles this case with default header values. + +The resource was deleted successfully +*/ +type V1CloudConfigsTkePoolMachinesUIDDeleteNoContent struct { +} + +func (o *V1CloudConfigsTkePoolMachinesUIDDeleteNoContent) Error() string { + return fmt.Sprintf("[DELETE /v1/cloudconfigs/tke/{configUid}/machinePools/{machinePoolName}/machines/{machineUid}][%d] v1CloudConfigsTkePoolMachinesUidDeleteNoContent ", 204) +} + +func (o *V1CloudConfigsTkePoolMachinesUIDDeleteNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_cloud_configs_tke_pool_machines_uid_get_parameters.go b/api/client/v1/v1_cloud_configs_tke_pool_machines_uid_get_parameters.go new file mode 100644 index 00000000..c2bb26b4 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_tke_pool_machines_uid_get_parameters.go @@ -0,0 +1,178 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1CloudConfigsTkePoolMachinesUIDGetParams creates a new V1CloudConfigsTkePoolMachinesUIDGetParams object +// with the default values initialized. +func NewV1CloudConfigsTkePoolMachinesUIDGetParams() *V1CloudConfigsTkePoolMachinesUIDGetParams { + var () + return &V1CloudConfigsTkePoolMachinesUIDGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudConfigsTkePoolMachinesUIDGetParamsWithTimeout creates a new V1CloudConfigsTkePoolMachinesUIDGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudConfigsTkePoolMachinesUIDGetParamsWithTimeout(timeout time.Duration) *V1CloudConfigsTkePoolMachinesUIDGetParams { + var () + return &V1CloudConfigsTkePoolMachinesUIDGetParams{ + + timeout: timeout, + } +} + +// NewV1CloudConfigsTkePoolMachinesUIDGetParamsWithContext creates a new V1CloudConfigsTkePoolMachinesUIDGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudConfigsTkePoolMachinesUIDGetParamsWithContext(ctx context.Context) *V1CloudConfigsTkePoolMachinesUIDGetParams { + var () + return &V1CloudConfigsTkePoolMachinesUIDGetParams{ + + Context: ctx, + } +} + +// NewV1CloudConfigsTkePoolMachinesUIDGetParamsWithHTTPClient creates a new V1CloudConfigsTkePoolMachinesUIDGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudConfigsTkePoolMachinesUIDGetParamsWithHTTPClient(client *http.Client) *V1CloudConfigsTkePoolMachinesUIDGetParams { + var () + return &V1CloudConfigsTkePoolMachinesUIDGetParams{ + HTTPClient: client, + } +} + +/* +V1CloudConfigsTkePoolMachinesUIDGetParams contains all the parameters to send to the API endpoint +for the v1 cloud configs tke pool machines Uid get operation typically these are written to a http.Request +*/ +type V1CloudConfigsTkePoolMachinesUIDGetParams struct { + + /*ConfigUID + Cluster's cloud config uid + + */ + ConfigUID string + /*MachinePoolName + Machine pool name + + */ + MachinePoolName string + /*MachineUID + Machine uid + + */ + MachineUID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud configs tke pool machines Uid get params +func (o *V1CloudConfigsTkePoolMachinesUIDGetParams) WithTimeout(timeout time.Duration) *V1CloudConfigsTkePoolMachinesUIDGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud configs tke pool machines Uid get params +func (o *V1CloudConfigsTkePoolMachinesUIDGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud configs tke pool machines Uid get params +func (o *V1CloudConfigsTkePoolMachinesUIDGetParams) WithContext(ctx context.Context) *V1CloudConfigsTkePoolMachinesUIDGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud configs tke pool machines Uid get params +func (o *V1CloudConfigsTkePoolMachinesUIDGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud configs tke pool machines Uid get params +func (o *V1CloudConfigsTkePoolMachinesUIDGetParams) WithHTTPClient(client *http.Client) *V1CloudConfigsTkePoolMachinesUIDGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud configs tke pool machines Uid get params +func (o *V1CloudConfigsTkePoolMachinesUIDGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithConfigUID adds the configUID to the v1 cloud configs tke pool machines Uid get params +func (o *V1CloudConfigsTkePoolMachinesUIDGetParams) WithConfigUID(configUID string) *V1CloudConfigsTkePoolMachinesUIDGetParams { + o.SetConfigUID(configUID) + return o +} + +// SetConfigUID adds the configUid to the v1 cloud configs tke pool machines Uid get params +func (o *V1CloudConfigsTkePoolMachinesUIDGetParams) SetConfigUID(configUID string) { + o.ConfigUID = configUID +} + +// WithMachinePoolName adds the machinePoolName to the v1 cloud configs tke pool machines Uid get params +func (o *V1CloudConfigsTkePoolMachinesUIDGetParams) WithMachinePoolName(machinePoolName string) *V1CloudConfigsTkePoolMachinesUIDGetParams { + o.SetMachinePoolName(machinePoolName) + return o +} + +// SetMachinePoolName adds the machinePoolName to the v1 cloud configs tke pool machines Uid get params +func (o *V1CloudConfigsTkePoolMachinesUIDGetParams) SetMachinePoolName(machinePoolName string) { + o.MachinePoolName = machinePoolName +} + +// WithMachineUID adds the machineUID to the v1 cloud configs tke pool machines Uid get params +func (o *V1CloudConfigsTkePoolMachinesUIDGetParams) WithMachineUID(machineUID string) *V1CloudConfigsTkePoolMachinesUIDGetParams { + o.SetMachineUID(machineUID) + return o +} + +// SetMachineUID adds the machineUid to the v1 cloud configs tke pool machines Uid get params +func (o *V1CloudConfigsTkePoolMachinesUIDGetParams) SetMachineUID(machineUID string) { + o.MachineUID = machineUID +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudConfigsTkePoolMachinesUIDGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param configUid + if err := r.SetPathParam("configUid", o.ConfigUID); err != nil { + return err + } + + // path param machinePoolName + if err := r.SetPathParam("machinePoolName", o.MachinePoolName); err != nil { + return err + } + + // path param machineUid + if err := r.SetPathParam("machineUid", o.MachineUID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_configs_tke_pool_machines_uid_get_responses.go b/api/client/v1/v1_cloud_configs_tke_pool_machines_uid_get_responses.go new file mode 100644 index 00000000..1879fc63 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_tke_pool_machines_uid_get_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1CloudConfigsTkePoolMachinesUIDGetReader is a Reader for the V1CloudConfigsTkePoolMachinesUIDGet structure. +type V1CloudConfigsTkePoolMachinesUIDGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudConfigsTkePoolMachinesUIDGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1CloudConfigsTkePoolMachinesUIDGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudConfigsTkePoolMachinesUIDGetOK creates a V1CloudConfigsTkePoolMachinesUIDGetOK with default headers values +func NewV1CloudConfigsTkePoolMachinesUIDGetOK() *V1CloudConfigsTkePoolMachinesUIDGetOK { + return &V1CloudConfigsTkePoolMachinesUIDGetOK{} +} + +/* +V1CloudConfigsTkePoolMachinesUIDGetOK handles this case with default header values. + +OK +*/ +type V1CloudConfigsTkePoolMachinesUIDGetOK struct { + Payload *models.V1TencentMachine +} + +func (o *V1CloudConfigsTkePoolMachinesUIDGetOK) Error() string { + return fmt.Sprintf("[GET /v1/cloudconfigs/tke/{configUid}/machinePools/{machinePoolName}/machines/{machineUid}][%d] v1CloudConfigsTkePoolMachinesUidGetOK %+v", 200, o.Payload) +} + +func (o *V1CloudConfigsTkePoolMachinesUIDGetOK) GetPayload() *models.V1TencentMachine { + return o.Payload +} + +func (o *V1CloudConfigsTkePoolMachinesUIDGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1TencentMachine) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_cloud_configs_tke_pool_machines_uid_update_parameters.go b/api/client/v1/v1_cloud_configs_tke_pool_machines_uid_update_parameters.go new file mode 100644 index 00000000..6d5edc0f --- /dev/null +++ b/api/client/v1/v1_cloud_configs_tke_pool_machines_uid_update_parameters.go @@ -0,0 +1,199 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1CloudConfigsTkePoolMachinesUIDUpdateParams creates a new V1CloudConfigsTkePoolMachinesUIDUpdateParams object +// with the default values initialized. +func NewV1CloudConfigsTkePoolMachinesUIDUpdateParams() *V1CloudConfigsTkePoolMachinesUIDUpdateParams { + var () + return &V1CloudConfigsTkePoolMachinesUIDUpdateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudConfigsTkePoolMachinesUIDUpdateParamsWithTimeout creates a new V1CloudConfigsTkePoolMachinesUIDUpdateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudConfigsTkePoolMachinesUIDUpdateParamsWithTimeout(timeout time.Duration) *V1CloudConfigsTkePoolMachinesUIDUpdateParams { + var () + return &V1CloudConfigsTkePoolMachinesUIDUpdateParams{ + + timeout: timeout, + } +} + +// NewV1CloudConfigsTkePoolMachinesUIDUpdateParamsWithContext creates a new V1CloudConfigsTkePoolMachinesUIDUpdateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudConfigsTkePoolMachinesUIDUpdateParamsWithContext(ctx context.Context) *V1CloudConfigsTkePoolMachinesUIDUpdateParams { + var () + return &V1CloudConfigsTkePoolMachinesUIDUpdateParams{ + + Context: ctx, + } +} + +// NewV1CloudConfigsTkePoolMachinesUIDUpdateParamsWithHTTPClient creates a new V1CloudConfigsTkePoolMachinesUIDUpdateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudConfigsTkePoolMachinesUIDUpdateParamsWithHTTPClient(client *http.Client) *V1CloudConfigsTkePoolMachinesUIDUpdateParams { + var () + return &V1CloudConfigsTkePoolMachinesUIDUpdateParams{ + HTTPClient: client, + } +} + +/* +V1CloudConfigsTkePoolMachinesUIDUpdateParams contains all the parameters to send to the API endpoint +for the v1 cloud configs tke pool machines Uid update operation typically these are written to a http.Request +*/ +type V1CloudConfigsTkePoolMachinesUIDUpdateParams struct { + + /*Body*/ + Body *models.V1TencentMachine + /*ConfigUID + Cluster's cloud config uid + + */ + ConfigUID string + /*MachinePoolName + Machine pool name + + */ + MachinePoolName string + /*MachineUID + Machine uid + + */ + MachineUID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud configs tke pool machines Uid update params +func (o *V1CloudConfigsTkePoolMachinesUIDUpdateParams) WithTimeout(timeout time.Duration) *V1CloudConfigsTkePoolMachinesUIDUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud configs tke pool machines Uid update params +func (o *V1CloudConfigsTkePoolMachinesUIDUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud configs tke pool machines Uid update params +func (o *V1CloudConfigsTkePoolMachinesUIDUpdateParams) WithContext(ctx context.Context) *V1CloudConfigsTkePoolMachinesUIDUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud configs tke pool machines Uid update params +func (o *V1CloudConfigsTkePoolMachinesUIDUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud configs tke pool machines Uid update params +func (o *V1CloudConfigsTkePoolMachinesUIDUpdateParams) WithHTTPClient(client *http.Client) *V1CloudConfigsTkePoolMachinesUIDUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud configs tke pool machines Uid update params +func (o *V1CloudConfigsTkePoolMachinesUIDUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 cloud configs tke pool machines Uid update params +func (o *V1CloudConfigsTkePoolMachinesUIDUpdateParams) WithBody(body *models.V1TencentMachine) *V1CloudConfigsTkePoolMachinesUIDUpdateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 cloud configs tke pool machines Uid update params +func (o *V1CloudConfigsTkePoolMachinesUIDUpdateParams) SetBody(body *models.V1TencentMachine) { + o.Body = body +} + +// WithConfigUID adds the configUID to the v1 cloud configs tke pool machines Uid update params +func (o *V1CloudConfigsTkePoolMachinesUIDUpdateParams) WithConfigUID(configUID string) *V1CloudConfigsTkePoolMachinesUIDUpdateParams { + o.SetConfigUID(configUID) + return o +} + +// SetConfigUID adds the configUid to the v1 cloud configs tke pool machines Uid update params +func (o *V1CloudConfigsTkePoolMachinesUIDUpdateParams) SetConfigUID(configUID string) { + o.ConfigUID = configUID +} + +// WithMachinePoolName adds the machinePoolName to the v1 cloud configs tke pool machines Uid update params +func (o *V1CloudConfigsTkePoolMachinesUIDUpdateParams) WithMachinePoolName(machinePoolName string) *V1CloudConfigsTkePoolMachinesUIDUpdateParams { + o.SetMachinePoolName(machinePoolName) + return o +} + +// SetMachinePoolName adds the machinePoolName to the v1 cloud configs tke pool machines Uid update params +func (o *V1CloudConfigsTkePoolMachinesUIDUpdateParams) SetMachinePoolName(machinePoolName string) { + o.MachinePoolName = machinePoolName +} + +// WithMachineUID adds the machineUID to the v1 cloud configs tke pool machines Uid update params +func (o *V1CloudConfigsTkePoolMachinesUIDUpdateParams) WithMachineUID(machineUID string) *V1CloudConfigsTkePoolMachinesUIDUpdateParams { + o.SetMachineUID(machineUID) + return o +} + +// SetMachineUID adds the machineUid to the v1 cloud configs tke pool machines Uid update params +func (o *V1CloudConfigsTkePoolMachinesUIDUpdateParams) SetMachineUID(machineUID string) { + o.MachineUID = machineUID +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudConfigsTkePoolMachinesUIDUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param configUid + if err := r.SetPathParam("configUid", o.ConfigUID); err != nil { + return err + } + + // path param machinePoolName + if err := r.SetPathParam("machinePoolName", o.MachinePoolName); err != nil { + return err + } + + // path param machineUid + if err := r.SetPathParam("machineUid", o.MachineUID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_configs_tke_pool_machines_uid_update_responses.go b/api/client/v1/v1_cloud_configs_tke_pool_machines_uid_update_responses.go new file mode 100644 index 00000000..1f8af9c6 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_tke_pool_machines_uid_update_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1CloudConfigsTkePoolMachinesUIDUpdateReader is a Reader for the V1CloudConfigsTkePoolMachinesUIDUpdate structure. +type V1CloudConfigsTkePoolMachinesUIDUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudConfigsTkePoolMachinesUIDUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1CloudConfigsTkePoolMachinesUIDUpdateNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudConfigsTkePoolMachinesUIDUpdateNoContent creates a V1CloudConfigsTkePoolMachinesUIDUpdateNoContent with default headers values +func NewV1CloudConfigsTkePoolMachinesUIDUpdateNoContent() *V1CloudConfigsTkePoolMachinesUIDUpdateNoContent { + return &V1CloudConfigsTkePoolMachinesUIDUpdateNoContent{} +} + +/* +V1CloudConfigsTkePoolMachinesUIDUpdateNoContent handles this case with default header values. + +The resource was updated successfully +*/ +type V1CloudConfigsTkePoolMachinesUIDUpdateNoContent struct { +} + +func (o *V1CloudConfigsTkePoolMachinesUIDUpdateNoContent) Error() string { + return fmt.Sprintf("[PUT /v1/cloudconfigs/tke/{configUid}/machinePools/{machinePoolName}/machines/{machineUid}][%d] v1CloudConfigsTkePoolMachinesUidUpdateNoContent ", 204) +} + +func (o *V1CloudConfigsTkePoolMachinesUIDUpdateNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_cloud_configs_tke_uid_cluster_config_parameters.go b/api/client/v1/v1_cloud_configs_tke_uid_cluster_config_parameters.go new file mode 100644 index 00000000..3cfd9288 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_tke_uid_cluster_config_parameters.go @@ -0,0 +1,157 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1CloudConfigsTkeUIDClusterConfigParams creates a new V1CloudConfigsTkeUIDClusterConfigParams object +// with the default values initialized. +func NewV1CloudConfigsTkeUIDClusterConfigParams() *V1CloudConfigsTkeUIDClusterConfigParams { + var () + return &V1CloudConfigsTkeUIDClusterConfigParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudConfigsTkeUIDClusterConfigParamsWithTimeout creates a new V1CloudConfigsTkeUIDClusterConfigParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudConfigsTkeUIDClusterConfigParamsWithTimeout(timeout time.Duration) *V1CloudConfigsTkeUIDClusterConfigParams { + var () + return &V1CloudConfigsTkeUIDClusterConfigParams{ + + timeout: timeout, + } +} + +// NewV1CloudConfigsTkeUIDClusterConfigParamsWithContext creates a new V1CloudConfigsTkeUIDClusterConfigParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudConfigsTkeUIDClusterConfigParamsWithContext(ctx context.Context) *V1CloudConfigsTkeUIDClusterConfigParams { + var () + return &V1CloudConfigsTkeUIDClusterConfigParams{ + + Context: ctx, + } +} + +// NewV1CloudConfigsTkeUIDClusterConfigParamsWithHTTPClient creates a new V1CloudConfigsTkeUIDClusterConfigParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudConfigsTkeUIDClusterConfigParamsWithHTTPClient(client *http.Client) *V1CloudConfigsTkeUIDClusterConfigParams { + var () + return &V1CloudConfigsTkeUIDClusterConfigParams{ + HTTPClient: client, + } +} + +/* +V1CloudConfigsTkeUIDClusterConfigParams contains all the parameters to send to the API endpoint +for the v1 cloud configs tke Uid cluster config operation typically these are written to a http.Request +*/ +type V1CloudConfigsTkeUIDClusterConfigParams struct { + + /*Body*/ + Body *models.V1TencentCloudClusterConfigEntity + /*ConfigUID + Cluster's cloud config uid + + */ + ConfigUID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud configs tke Uid cluster config params +func (o *V1CloudConfigsTkeUIDClusterConfigParams) WithTimeout(timeout time.Duration) *V1CloudConfigsTkeUIDClusterConfigParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud configs tke Uid cluster config params +func (o *V1CloudConfigsTkeUIDClusterConfigParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud configs tke Uid cluster config params +func (o *V1CloudConfigsTkeUIDClusterConfigParams) WithContext(ctx context.Context) *V1CloudConfigsTkeUIDClusterConfigParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud configs tke Uid cluster config params +func (o *V1CloudConfigsTkeUIDClusterConfigParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud configs tke Uid cluster config params +func (o *V1CloudConfigsTkeUIDClusterConfigParams) WithHTTPClient(client *http.Client) *V1CloudConfigsTkeUIDClusterConfigParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud configs tke Uid cluster config params +func (o *V1CloudConfigsTkeUIDClusterConfigParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 cloud configs tke Uid cluster config params +func (o *V1CloudConfigsTkeUIDClusterConfigParams) WithBody(body *models.V1TencentCloudClusterConfigEntity) *V1CloudConfigsTkeUIDClusterConfigParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 cloud configs tke Uid cluster config params +func (o *V1CloudConfigsTkeUIDClusterConfigParams) SetBody(body *models.V1TencentCloudClusterConfigEntity) { + o.Body = body +} + +// WithConfigUID adds the configUID to the v1 cloud configs tke Uid cluster config params +func (o *V1CloudConfigsTkeUIDClusterConfigParams) WithConfigUID(configUID string) *V1CloudConfigsTkeUIDClusterConfigParams { + o.SetConfigUID(configUID) + return o +} + +// SetConfigUID adds the configUid to the v1 cloud configs tke Uid cluster config params +func (o *V1CloudConfigsTkeUIDClusterConfigParams) SetConfigUID(configUID string) { + o.ConfigUID = configUID +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudConfigsTkeUIDClusterConfigParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param configUid + if err := r.SetPathParam("configUid", o.ConfigUID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_configs_tke_uid_cluster_config_responses.go b/api/client/v1/v1_cloud_configs_tke_uid_cluster_config_responses.go new file mode 100644 index 00000000..46b42040 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_tke_uid_cluster_config_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1CloudConfigsTkeUIDClusterConfigReader is a Reader for the V1CloudConfigsTkeUIDClusterConfig structure. +type V1CloudConfigsTkeUIDClusterConfigReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudConfigsTkeUIDClusterConfigReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1CloudConfigsTkeUIDClusterConfigNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudConfigsTkeUIDClusterConfigNoContent creates a V1CloudConfigsTkeUIDClusterConfigNoContent with default headers values +func NewV1CloudConfigsTkeUIDClusterConfigNoContent() *V1CloudConfigsTkeUIDClusterConfigNoContent { + return &V1CloudConfigsTkeUIDClusterConfigNoContent{} +} + +/* +V1CloudConfigsTkeUIDClusterConfigNoContent handles this case with default header values. + +The resource was updated successfully +*/ +type V1CloudConfigsTkeUIDClusterConfigNoContent struct { +} + +func (o *V1CloudConfigsTkeUIDClusterConfigNoContent) Error() string { + return fmt.Sprintf("[PUT /v1/cloudconfigs/tke/{configUid}/clusterConfig][%d] v1CloudConfigsTkeUidClusterConfigNoContent ", 204) +} + +func (o *V1CloudConfigsTkeUIDClusterConfigNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_cloud_configs_virtual_get_parameters.go b/api/client/v1/v1_cloud_configs_virtual_get_parameters.go new file mode 100644 index 00000000..d791cf36 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_virtual_get_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1CloudConfigsVirtualGetParams creates a new V1CloudConfigsVirtualGetParams object +// with the default values initialized. +func NewV1CloudConfigsVirtualGetParams() *V1CloudConfigsVirtualGetParams { + var () + return &V1CloudConfigsVirtualGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudConfigsVirtualGetParamsWithTimeout creates a new V1CloudConfigsVirtualGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudConfigsVirtualGetParamsWithTimeout(timeout time.Duration) *V1CloudConfigsVirtualGetParams { + var () + return &V1CloudConfigsVirtualGetParams{ + + timeout: timeout, + } +} + +// NewV1CloudConfigsVirtualGetParamsWithContext creates a new V1CloudConfigsVirtualGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudConfigsVirtualGetParamsWithContext(ctx context.Context) *V1CloudConfigsVirtualGetParams { + var () + return &V1CloudConfigsVirtualGetParams{ + + Context: ctx, + } +} + +// NewV1CloudConfigsVirtualGetParamsWithHTTPClient creates a new V1CloudConfigsVirtualGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudConfigsVirtualGetParamsWithHTTPClient(client *http.Client) *V1CloudConfigsVirtualGetParams { + var () + return &V1CloudConfigsVirtualGetParams{ + HTTPClient: client, + } +} + +/* +V1CloudConfigsVirtualGetParams contains all the parameters to send to the API endpoint +for the v1 cloud configs virtual get operation typically these are written to a http.Request +*/ +type V1CloudConfigsVirtualGetParams struct { + + /*ConfigUID + Cluster's cloud config uid + + */ + ConfigUID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud configs virtual get params +func (o *V1CloudConfigsVirtualGetParams) WithTimeout(timeout time.Duration) *V1CloudConfigsVirtualGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud configs virtual get params +func (o *V1CloudConfigsVirtualGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud configs virtual get params +func (o *V1CloudConfigsVirtualGetParams) WithContext(ctx context.Context) *V1CloudConfigsVirtualGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud configs virtual get params +func (o *V1CloudConfigsVirtualGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud configs virtual get params +func (o *V1CloudConfigsVirtualGetParams) WithHTTPClient(client *http.Client) *V1CloudConfigsVirtualGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud configs virtual get params +func (o *V1CloudConfigsVirtualGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithConfigUID adds the configUID to the v1 cloud configs virtual get params +func (o *V1CloudConfigsVirtualGetParams) WithConfigUID(configUID string) *V1CloudConfigsVirtualGetParams { + o.SetConfigUID(configUID) + return o +} + +// SetConfigUID adds the configUid to the v1 cloud configs virtual get params +func (o *V1CloudConfigsVirtualGetParams) SetConfigUID(configUID string) { + o.ConfigUID = configUID +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudConfigsVirtualGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param configUid + if err := r.SetPathParam("configUid", o.ConfigUID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_configs_virtual_get_responses.go b/api/client/v1/v1_cloud_configs_virtual_get_responses.go new file mode 100644 index 00000000..47a0599f --- /dev/null +++ b/api/client/v1/v1_cloud_configs_virtual_get_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1CloudConfigsVirtualGetReader is a Reader for the V1CloudConfigsVirtualGet structure. +type V1CloudConfigsVirtualGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudConfigsVirtualGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1CloudConfigsVirtualGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudConfigsVirtualGetOK creates a V1CloudConfigsVirtualGetOK with default headers values +func NewV1CloudConfigsVirtualGetOK() *V1CloudConfigsVirtualGetOK { + return &V1CloudConfigsVirtualGetOK{} +} + +/* +V1CloudConfigsVirtualGetOK handles this case with default header values. + +OK +*/ +type V1CloudConfigsVirtualGetOK struct { + Payload *models.V1VirtualCloudConfig +} + +func (o *V1CloudConfigsVirtualGetOK) Error() string { + return fmt.Sprintf("[GET /v1/cloudconfigs/virtual/{configUid}][%d] v1CloudConfigsVirtualGetOK %+v", 200, o.Payload) +} + +func (o *V1CloudConfigsVirtualGetOK) GetPayload() *models.V1VirtualCloudConfig { + return o.Payload +} + +func (o *V1CloudConfigsVirtualGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1VirtualCloudConfig) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_cloud_configs_virtual_machine_pool_create_parameters.go b/api/client/v1/v1_cloud_configs_virtual_machine_pool_create_parameters.go new file mode 100644 index 00000000..a2605f47 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_virtual_machine_pool_create_parameters.go @@ -0,0 +1,157 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1CloudConfigsVirtualMachinePoolCreateParams creates a new V1CloudConfigsVirtualMachinePoolCreateParams object +// with the default values initialized. +func NewV1CloudConfigsVirtualMachinePoolCreateParams() *V1CloudConfigsVirtualMachinePoolCreateParams { + var () + return &V1CloudConfigsVirtualMachinePoolCreateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudConfigsVirtualMachinePoolCreateParamsWithTimeout creates a new V1CloudConfigsVirtualMachinePoolCreateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudConfigsVirtualMachinePoolCreateParamsWithTimeout(timeout time.Duration) *V1CloudConfigsVirtualMachinePoolCreateParams { + var () + return &V1CloudConfigsVirtualMachinePoolCreateParams{ + + timeout: timeout, + } +} + +// NewV1CloudConfigsVirtualMachinePoolCreateParamsWithContext creates a new V1CloudConfigsVirtualMachinePoolCreateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudConfigsVirtualMachinePoolCreateParamsWithContext(ctx context.Context) *V1CloudConfigsVirtualMachinePoolCreateParams { + var () + return &V1CloudConfigsVirtualMachinePoolCreateParams{ + + Context: ctx, + } +} + +// NewV1CloudConfigsVirtualMachinePoolCreateParamsWithHTTPClient creates a new V1CloudConfigsVirtualMachinePoolCreateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudConfigsVirtualMachinePoolCreateParamsWithHTTPClient(client *http.Client) *V1CloudConfigsVirtualMachinePoolCreateParams { + var () + return &V1CloudConfigsVirtualMachinePoolCreateParams{ + HTTPClient: client, + } +} + +/* +V1CloudConfigsVirtualMachinePoolCreateParams contains all the parameters to send to the API endpoint +for the v1 cloud configs virtual machine pool create operation typically these are written to a http.Request +*/ +type V1CloudConfigsVirtualMachinePoolCreateParams struct { + + /*Body*/ + Body *models.V1VirtualMachinePoolConfigEntity + /*ConfigUID + Cluster's cloud config uid + + */ + ConfigUID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud configs virtual machine pool create params +func (o *V1CloudConfigsVirtualMachinePoolCreateParams) WithTimeout(timeout time.Duration) *V1CloudConfigsVirtualMachinePoolCreateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud configs virtual machine pool create params +func (o *V1CloudConfigsVirtualMachinePoolCreateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud configs virtual machine pool create params +func (o *V1CloudConfigsVirtualMachinePoolCreateParams) WithContext(ctx context.Context) *V1CloudConfigsVirtualMachinePoolCreateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud configs virtual machine pool create params +func (o *V1CloudConfigsVirtualMachinePoolCreateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud configs virtual machine pool create params +func (o *V1CloudConfigsVirtualMachinePoolCreateParams) WithHTTPClient(client *http.Client) *V1CloudConfigsVirtualMachinePoolCreateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud configs virtual machine pool create params +func (o *V1CloudConfigsVirtualMachinePoolCreateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 cloud configs virtual machine pool create params +func (o *V1CloudConfigsVirtualMachinePoolCreateParams) WithBody(body *models.V1VirtualMachinePoolConfigEntity) *V1CloudConfigsVirtualMachinePoolCreateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 cloud configs virtual machine pool create params +func (o *V1CloudConfigsVirtualMachinePoolCreateParams) SetBody(body *models.V1VirtualMachinePoolConfigEntity) { + o.Body = body +} + +// WithConfigUID adds the configUID to the v1 cloud configs virtual machine pool create params +func (o *V1CloudConfigsVirtualMachinePoolCreateParams) WithConfigUID(configUID string) *V1CloudConfigsVirtualMachinePoolCreateParams { + o.SetConfigUID(configUID) + return o +} + +// SetConfigUID adds the configUid to the v1 cloud configs virtual machine pool create params +func (o *V1CloudConfigsVirtualMachinePoolCreateParams) SetConfigUID(configUID string) { + o.ConfigUID = configUID +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudConfigsVirtualMachinePoolCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param configUid + if err := r.SetPathParam("configUid", o.ConfigUID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_configs_virtual_machine_pool_create_responses.go b/api/client/v1/v1_cloud_configs_virtual_machine_pool_create_responses.go new file mode 100644 index 00000000..9db6ecbc --- /dev/null +++ b/api/client/v1/v1_cloud_configs_virtual_machine_pool_create_responses.go @@ -0,0 +1,77 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1CloudConfigsVirtualMachinePoolCreateReader is a Reader for the V1CloudConfigsVirtualMachinePoolCreate structure. +type V1CloudConfigsVirtualMachinePoolCreateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudConfigsVirtualMachinePoolCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 201: + result := NewV1CloudConfigsVirtualMachinePoolCreateCreated() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudConfigsVirtualMachinePoolCreateCreated creates a V1CloudConfigsVirtualMachinePoolCreateCreated with default headers values +func NewV1CloudConfigsVirtualMachinePoolCreateCreated() *V1CloudConfigsVirtualMachinePoolCreateCreated { + return &V1CloudConfigsVirtualMachinePoolCreateCreated{} +} + +/* +V1CloudConfigsVirtualMachinePoolCreateCreated handles this case with default header values. + +Created successfully +*/ +type V1CloudConfigsVirtualMachinePoolCreateCreated struct { + /*Audit uid for the request + */ + AuditUID string + + Payload *models.V1UID +} + +func (o *V1CloudConfigsVirtualMachinePoolCreateCreated) Error() string { + return fmt.Sprintf("[POST /v1/cloudconfigs/virtual/{configUid}/machinePools][%d] v1CloudConfigsVirtualMachinePoolCreateCreated %+v", 201, o.Payload) +} + +func (o *V1CloudConfigsVirtualMachinePoolCreateCreated) GetPayload() *models.V1UID { + return o.Payload +} + +func (o *V1CloudConfigsVirtualMachinePoolCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header AuditUid + o.AuditUID = response.GetHeader("AuditUid") + + o.Payload = new(models.V1UID) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_cloud_configs_virtual_machine_pool_delete_parameters.go b/api/client/v1/v1_cloud_configs_virtual_machine_pool_delete_parameters.go new file mode 100644 index 00000000..4301cfbb --- /dev/null +++ b/api/client/v1/v1_cloud_configs_virtual_machine_pool_delete_parameters.go @@ -0,0 +1,157 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1CloudConfigsVirtualMachinePoolDeleteParams creates a new V1CloudConfigsVirtualMachinePoolDeleteParams object +// with the default values initialized. +func NewV1CloudConfigsVirtualMachinePoolDeleteParams() *V1CloudConfigsVirtualMachinePoolDeleteParams { + var () + return &V1CloudConfigsVirtualMachinePoolDeleteParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudConfigsVirtualMachinePoolDeleteParamsWithTimeout creates a new V1CloudConfigsVirtualMachinePoolDeleteParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudConfigsVirtualMachinePoolDeleteParamsWithTimeout(timeout time.Duration) *V1CloudConfigsVirtualMachinePoolDeleteParams { + var () + return &V1CloudConfigsVirtualMachinePoolDeleteParams{ + + timeout: timeout, + } +} + +// NewV1CloudConfigsVirtualMachinePoolDeleteParamsWithContext creates a new V1CloudConfigsVirtualMachinePoolDeleteParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudConfigsVirtualMachinePoolDeleteParamsWithContext(ctx context.Context) *V1CloudConfigsVirtualMachinePoolDeleteParams { + var () + return &V1CloudConfigsVirtualMachinePoolDeleteParams{ + + Context: ctx, + } +} + +// NewV1CloudConfigsVirtualMachinePoolDeleteParamsWithHTTPClient creates a new V1CloudConfigsVirtualMachinePoolDeleteParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudConfigsVirtualMachinePoolDeleteParamsWithHTTPClient(client *http.Client) *V1CloudConfigsVirtualMachinePoolDeleteParams { + var () + return &V1CloudConfigsVirtualMachinePoolDeleteParams{ + HTTPClient: client, + } +} + +/* +V1CloudConfigsVirtualMachinePoolDeleteParams contains all the parameters to send to the API endpoint +for the v1 cloud configs virtual machine pool delete operation typically these are written to a http.Request +*/ +type V1CloudConfigsVirtualMachinePoolDeleteParams struct { + + /*ConfigUID + Cluster's cloud config uid + + */ + ConfigUID string + /*MachinePoolName + Machine pool name + + */ + MachinePoolName string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud configs virtual machine pool delete params +func (o *V1CloudConfigsVirtualMachinePoolDeleteParams) WithTimeout(timeout time.Duration) *V1CloudConfigsVirtualMachinePoolDeleteParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud configs virtual machine pool delete params +func (o *V1CloudConfigsVirtualMachinePoolDeleteParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud configs virtual machine pool delete params +func (o *V1CloudConfigsVirtualMachinePoolDeleteParams) WithContext(ctx context.Context) *V1CloudConfigsVirtualMachinePoolDeleteParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud configs virtual machine pool delete params +func (o *V1CloudConfigsVirtualMachinePoolDeleteParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud configs virtual machine pool delete params +func (o *V1CloudConfigsVirtualMachinePoolDeleteParams) WithHTTPClient(client *http.Client) *V1CloudConfigsVirtualMachinePoolDeleteParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud configs virtual machine pool delete params +func (o *V1CloudConfigsVirtualMachinePoolDeleteParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithConfigUID adds the configUID to the v1 cloud configs virtual machine pool delete params +func (o *V1CloudConfigsVirtualMachinePoolDeleteParams) WithConfigUID(configUID string) *V1CloudConfigsVirtualMachinePoolDeleteParams { + o.SetConfigUID(configUID) + return o +} + +// SetConfigUID adds the configUid to the v1 cloud configs virtual machine pool delete params +func (o *V1CloudConfigsVirtualMachinePoolDeleteParams) SetConfigUID(configUID string) { + o.ConfigUID = configUID +} + +// WithMachinePoolName adds the machinePoolName to the v1 cloud configs virtual machine pool delete params +func (o *V1CloudConfigsVirtualMachinePoolDeleteParams) WithMachinePoolName(machinePoolName string) *V1CloudConfigsVirtualMachinePoolDeleteParams { + o.SetMachinePoolName(machinePoolName) + return o +} + +// SetMachinePoolName adds the machinePoolName to the v1 cloud configs virtual machine pool delete params +func (o *V1CloudConfigsVirtualMachinePoolDeleteParams) SetMachinePoolName(machinePoolName string) { + o.MachinePoolName = machinePoolName +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudConfigsVirtualMachinePoolDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param configUid + if err := r.SetPathParam("configUid", o.ConfigUID); err != nil { + return err + } + + // path param machinePoolName + if err := r.SetPathParam("machinePoolName", o.MachinePoolName); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_configs_virtual_machine_pool_delete_responses.go b/api/client/v1/v1_cloud_configs_virtual_machine_pool_delete_responses.go new file mode 100644 index 00000000..ff8a7bb9 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_virtual_machine_pool_delete_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1CloudConfigsVirtualMachinePoolDeleteReader is a Reader for the V1CloudConfigsVirtualMachinePoolDelete structure. +type V1CloudConfigsVirtualMachinePoolDeleteReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudConfigsVirtualMachinePoolDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1CloudConfigsVirtualMachinePoolDeleteNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudConfigsVirtualMachinePoolDeleteNoContent creates a V1CloudConfigsVirtualMachinePoolDeleteNoContent with default headers values +func NewV1CloudConfigsVirtualMachinePoolDeleteNoContent() *V1CloudConfigsVirtualMachinePoolDeleteNoContent { + return &V1CloudConfigsVirtualMachinePoolDeleteNoContent{} +} + +/* +V1CloudConfigsVirtualMachinePoolDeleteNoContent handles this case with default header values. + +The resource was deleted successfully +*/ +type V1CloudConfigsVirtualMachinePoolDeleteNoContent struct { +} + +func (o *V1CloudConfigsVirtualMachinePoolDeleteNoContent) Error() string { + return fmt.Sprintf("[DELETE /v1/cloudconfigs/virtual/{configUid}/machinePools/{machinePoolName}][%d] v1CloudConfigsVirtualMachinePoolDeleteNoContent ", 204) +} + +func (o *V1CloudConfigsVirtualMachinePoolDeleteNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_cloud_configs_virtual_machine_pool_update_parameters.go b/api/client/v1/v1_cloud_configs_virtual_machine_pool_update_parameters.go new file mode 100644 index 00000000..b9d93d78 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_virtual_machine_pool_update_parameters.go @@ -0,0 +1,178 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1CloudConfigsVirtualMachinePoolUpdateParams creates a new V1CloudConfigsVirtualMachinePoolUpdateParams object +// with the default values initialized. +func NewV1CloudConfigsVirtualMachinePoolUpdateParams() *V1CloudConfigsVirtualMachinePoolUpdateParams { + var () + return &V1CloudConfigsVirtualMachinePoolUpdateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudConfigsVirtualMachinePoolUpdateParamsWithTimeout creates a new V1CloudConfigsVirtualMachinePoolUpdateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudConfigsVirtualMachinePoolUpdateParamsWithTimeout(timeout time.Duration) *V1CloudConfigsVirtualMachinePoolUpdateParams { + var () + return &V1CloudConfigsVirtualMachinePoolUpdateParams{ + + timeout: timeout, + } +} + +// NewV1CloudConfigsVirtualMachinePoolUpdateParamsWithContext creates a new V1CloudConfigsVirtualMachinePoolUpdateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudConfigsVirtualMachinePoolUpdateParamsWithContext(ctx context.Context) *V1CloudConfigsVirtualMachinePoolUpdateParams { + var () + return &V1CloudConfigsVirtualMachinePoolUpdateParams{ + + Context: ctx, + } +} + +// NewV1CloudConfigsVirtualMachinePoolUpdateParamsWithHTTPClient creates a new V1CloudConfigsVirtualMachinePoolUpdateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudConfigsVirtualMachinePoolUpdateParamsWithHTTPClient(client *http.Client) *V1CloudConfigsVirtualMachinePoolUpdateParams { + var () + return &V1CloudConfigsVirtualMachinePoolUpdateParams{ + HTTPClient: client, + } +} + +/* +V1CloudConfigsVirtualMachinePoolUpdateParams contains all the parameters to send to the API endpoint +for the v1 cloud configs virtual machine pool update operation typically these are written to a http.Request +*/ +type V1CloudConfigsVirtualMachinePoolUpdateParams struct { + + /*Body*/ + Body *models.V1VirtualMachinePoolConfigEntity + /*ConfigUID + Cluster's cloud config uid + + */ + ConfigUID string + /*MachinePoolName + Machine pool name + + */ + MachinePoolName string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud configs virtual machine pool update params +func (o *V1CloudConfigsVirtualMachinePoolUpdateParams) WithTimeout(timeout time.Duration) *V1CloudConfigsVirtualMachinePoolUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud configs virtual machine pool update params +func (o *V1CloudConfigsVirtualMachinePoolUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud configs virtual machine pool update params +func (o *V1CloudConfigsVirtualMachinePoolUpdateParams) WithContext(ctx context.Context) *V1CloudConfigsVirtualMachinePoolUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud configs virtual machine pool update params +func (o *V1CloudConfigsVirtualMachinePoolUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud configs virtual machine pool update params +func (o *V1CloudConfigsVirtualMachinePoolUpdateParams) WithHTTPClient(client *http.Client) *V1CloudConfigsVirtualMachinePoolUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud configs virtual machine pool update params +func (o *V1CloudConfigsVirtualMachinePoolUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 cloud configs virtual machine pool update params +func (o *V1CloudConfigsVirtualMachinePoolUpdateParams) WithBody(body *models.V1VirtualMachinePoolConfigEntity) *V1CloudConfigsVirtualMachinePoolUpdateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 cloud configs virtual machine pool update params +func (o *V1CloudConfigsVirtualMachinePoolUpdateParams) SetBody(body *models.V1VirtualMachinePoolConfigEntity) { + o.Body = body +} + +// WithConfigUID adds the configUID to the v1 cloud configs virtual machine pool update params +func (o *V1CloudConfigsVirtualMachinePoolUpdateParams) WithConfigUID(configUID string) *V1CloudConfigsVirtualMachinePoolUpdateParams { + o.SetConfigUID(configUID) + return o +} + +// SetConfigUID adds the configUid to the v1 cloud configs virtual machine pool update params +func (o *V1CloudConfigsVirtualMachinePoolUpdateParams) SetConfigUID(configUID string) { + o.ConfigUID = configUID +} + +// WithMachinePoolName adds the machinePoolName to the v1 cloud configs virtual machine pool update params +func (o *V1CloudConfigsVirtualMachinePoolUpdateParams) WithMachinePoolName(machinePoolName string) *V1CloudConfigsVirtualMachinePoolUpdateParams { + o.SetMachinePoolName(machinePoolName) + return o +} + +// SetMachinePoolName adds the machinePoolName to the v1 cloud configs virtual machine pool update params +func (o *V1CloudConfigsVirtualMachinePoolUpdateParams) SetMachinePoolName(machinePoolName string) { + o.MachinePoolName = machinePoolName +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudConfigsVirtualMachinePoolUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param configUid + if err := r.SetPathParam("configUid", o.ConfigUID); err != nil { + return err + } + + // path param machinePoolName + if err := r.SetPathParam("machinePoolName", o.MachinePoolName); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_configs_virtual_machine_pool_update_responses.go b/api/client/v1/v1_cloud_configs_virtual_machine_pool_update_responses.go new file mode 100644 index 00000000..9c5da989 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_virtual_machine_pool_update_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1CloudConfigsVirtualMachinePoolUpdateReader is a Reader for the V1CloudConfigsVirtualMachinePoolUpdate structure. +type V1CloudConfigsVirtualMachinePoolUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudConfigsVirtualMachinePoolUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1CloudConfigsVirtualMachinePoolUpdateNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudConfigsVirtualMachinePoolUpdateNoContent creates a V1CloudConfigsVirtualMachinePoolUpdateNoContent with default headers values +func NewV1CloudConfigsVirtualMachinePoolUpdateNoContent() *V1CloudConfigsVirtualMachinePoolUpdateNoContent { + return &V1CloudConfigsVirtualMachinePoolUpdateNoContent{} +} + +/* +V1CloudConfigsVirtualMachinePoolUpdateNoContent handles this case with default header values. + +The resource was updated successfully +*/ +type V1CloudConfigsVirtualMachinePoolUpdateNoContent struct { +} + +func (o *V1CloudConfigsVirtualMachinePoolUpdateNoContent) Error() string { + return fmt.Sprintf("[PUT /v1/cloudconfigs/virtual/{configUid}/machinePools/{machinePoolName}][%d] v1CloudConfigsVirtualMachinePoolUpdateNoContent ", 204) +} + +func (o *V1CloudConfigsVirtualMachinePoolUpdateNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_cloud_configs_virtual_pool_machines_add_parameters.go b/api/client/v1/v1_cloud_configs_virtual_pool_machines_add_parameters.go new file mode 100644 index 00000000..7a47ccc7 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_virtual_pool_machines_add_parameters.go @@ -0,0 +1,178 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1CloudConfigsVirtualPoolMachinesAddParams creates a new V1CloudConfigsVirtualPoolMachinesAddParams object +// with the default values initialized. +func NewV1CloudConfigsVirtualPoolMachinesAddParams() *V1CloudConfigsVirtualPoolMachinesAddParams { + var () + return &V1CloudConfigsVirtualPoolMachinesAddParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudConfigsVirtualPoolMachinesAddParamsWithTimeout creates a new V1CloudConfigsVirtualPoolMachinesAddParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudConfigsVirtualPoolMachinesAddParamsWithTimeout(timeout time.Duration) *V1CloudConfigsVirtualPoolMachinesAddParams { + var () + return &V1CloudConfigsVirtualPoolMachinesAddParams{ + + timeout: timeout, + } +} + +// NewV1CloudConfigsVirtualPoolMachinesAddParamsWithContext creates a new V1CloudConfigsVirtualPoolMachinesAddParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudConfigsVirtualPoolMachinesAddParamsWithContext(ctx context.Context) *V1CloudConfigsVirtualPoolMachinesAddParams { + var () + return &V1CloudConfigsVirtualPoolMachinesAddParams{ + + Context: ctx, + } +} + +// NewV1CloudConfigsVirtualPoolMachinesAddParamsWithHTTPClient creates a new V1CloudConfigsVirtualPoolMachinesAddParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudConfigsVirtualPoolMachinesAddParamsWithHTTPClient(client *http.Client) *V1CloudConfigsVirtualPoolMachinesAddParams { + var () + return &V1CloudConfigsVirtualPoolMachinesAddParams{ + HTTPClient: client, + } +} + +/* +V1CloudConfigsVirtualPoolMachinesAddParams contains all the parameters to send to the API endpoint +for the v1 cloud configs virtual pool machines add operation typically these are written to a http.Request +*/ +type V1CloudConfigsVirtualPoolMachinesAddParams struct { + + /*Body*/ + Body *models.V1VirtualMachine + /*ConfigUID + Cluster's cloud config uid + + */ + ConfigUID string + /*MachinePoolName + Machine pool name + + */ + MachinePoolName string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud configs virtual pool machines add params +func (o *V1CloudConfigsVirtualPoolMachinesAddParams) WithTimeout(timeout time.Duration) *V1CloudConfigsVirtualPoolMachinesAddParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud configs virtual pool machines add params +func (o *V1CloudConfigsVirtualPoolMachinesAddParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud configs virtual pool machines add params +func (o *V1CloudConfigsVirtualPoolMachinesAddParams) WithContext(ctx context.Context) *V1CloudConfigsVirtualPoolMachinesAddParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud configs virtual pool machines add params +func (o *V1CloudConfigsVirtualPoolMachinesAddParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud configs virtual pool machines add params +func (o *V1CloudConfigsVirtualPoolMachinesAddParams) WithHTTPClient(client *http.Client) *V1CloudConfigsVirtualPoolMachinesAddParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud configs virtual pool machines add params +func (o *V1CloudConfigsVirtualPoolMachinesAddParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 cloud configs virtual pool machines add params +func (o *V1CloudConfigsVirtualPoolMachinesAddParams) WithBody(body *models.V1VirtualMachine) *V1CloudConfigsVirtualPoolMachinesAddParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 cloud configs virtual pool machines add params +func (o *V1CloudConfigsVirtualPoolMachinesAddParams) SetBody(body *models.V1VirtualMachine) { + o.Body = body +} + +// WithConfigUID adds the configUID to the v1 cloud configs virtual pool machines add params +func (o *V1CloudConfigsVirtualPoolMachinesAddParams) WithConfigUID(configUID string) *V1CloudConfigsVirtualPoolMachinesAddParams { + o.SetConfigUID(configUID) + return o +} + +// SetConfigUID adds the configUid to the v1 cloud configs virtual pool machines add params +func (o *V1CloudConfigsVirtualPoolMachinesAddParams) SetConfigUID(configUID string) { + o.ConfigUID = configUID +} + +// WithMachinePoolName adds the machinePoolName to the v1 cloud configs virtual pool machines add params +func (o *V1CloudConfigsVirtualPoolMachinesAddParams) WithMachinePoolName(machinePoolName string) *V1CloudConfigsVirtualPoolMachinesAddParams { + o.SetMachinePoolName(machinePoolName) + return o +} + +// SetMachinePoolName adds the machinePoolName to the v1 cloud configs virtual pool machines add params +func (o *V1CloudConfigsVirtualPoolMachinesAddParams) SetMachinePoolName(machinePoolName string) { + o.MachinePoolName = machinePoolName +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudConfigsVirtualPoolMachinesAddParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param configUid + if err := r.SetPathParam("configUid", o.ConfigUID); err != nil { + return err + } + + // path param machinePoolName + if err := r.SetPathParam("machinePoolName", o.MachinePoolName); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_configs_virtual_pool_machines_add_responses.go b/api/client/v1/v1_cloud_configs_virtual_pool_machines_add_responses.go new file mode 100644 index 00000000..6bdc0a96 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_virtual_pool_machines_add_responses.go @@ -0,0 +1,77 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1CloudConfigsVirtualPoolMachinesAddReader is a Reader for the V1CloudConfigsVirtualPoolMachinesAdd structure. +type V1CloudConfigsVirtualPoolMachinesAddReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudConfigsVirtualPoolMachinesAddReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 201: + result := NewV1CloudConfigsVirtualPoolMachinesAddCreated() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudConfigsVirtualPoolMachinesAddCreated creates a V1CloudConfigsVirtualPoolMachinesAddCreated with default headers values +func NewV1CloudConfigsVirtualPoolMachinesAddCreated() *V1CloudConfigsVirtualPoolMachinesAddCreated { + return &V1CloudConfigsVirtualPoolMachinesAddCreated{} +} + +/* +V1CloudConfigsVirtualPoolMachinesAddCreated handles this case with default header values. + +Created successfully +*/ +type V1CloudConfigsVirtualPoolMachinesAddCreated struct { + /*Audit uid for the request + */ + AuditUID string + + Payload *models.V1UID +} + +func (o *V1CloudConfigsVirtualPoolMachinesAddCreated) Error() string { + return fmt.Sprintf("[POST /v1/cloudconfigs/virtual/{configUid}/machinePools/{machinePoolName}/machines][%d] v1CloudConfigsVirtualPoolMachinesAddCreated %+v", 201, o.Payload) +} + +func (o *V1CloudConfigsVirtualPoolMachinesAddCreated) GetPayload() *models.V1UID { + return o.Payload +} + +func (o *V1CloudConfigsVirtualPoolMachinesAddCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header AuditUid + o.AuditUID = response.GetHeader("AuditUid") + + o.Payload = new(models.V1UID) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_cloud_configs_virtual_pool_machines_list_parameters.go b/api/client/v1/v1_cloud_configs_virtual_pool_machines_list_parameters.go new file mode 100644 index 00000000..e45fdb05 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_virtual_pool_machines_list_parameters.go @@ -0,0 +1,365 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// NewV1CloudConfigsVirtualPoolMachinesListParams creates a new V1CloudConfigsVirtualPoolMachinesListParams object +// with the default values initialized. +func NewV1CloudConfigsVirtualPoolMachinesListParams() *V1CloudConfigsVirtualPoolMachinesListParams { + var ( + limitDefault = int64(50) + ) + return &V1CloudConfigsVirtualPoolMachinesListParams{ + Limit: &limitDefault, + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudConfigsVirtualPoolMachinesListParamsWithTimeout creates a new V1CloudConfigsVirtualPoolMachinesListParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudConfigsVirtualPoolMachinesListParamsWithTimeout(timeout time.Duration) *V1CloudConfigsVirtualPoolMachinesListParams { + var ( + limitDefault = int64(50) + ) + return &V1CloudConfigsVirtualPoolMachinesListParams{ + Limit: &limitDefault, + + timeout: timeout, + } +} + +// NewV1CloudConfigsVirtualPoolMachinesListParamsWithContext creates a new V1CloudConfigsVirtualPoolMachinesListParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudConfigsVirtualPoolMachinesListParamsWithContext(ctx context.Context) *V1CloudConfigsVirtualPoolMachinesListParams { + var ( + limitDefault = int64(50) + ) + return &V1CloudConfigsVirtualPoolMachinesListParams{ + Limit: &limitDefault, + + Context: ctx, + } +} + +// NewV1CloudConfigsVirtualPoolMachinesListParamsWithHTTPClient creates a new V1CloudConfigsVirtualPoolMachinesListParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudConfigsVirtualPoolMachinesListParamsWithHTTPClient(client *http.Client) *V1CloudConfigsVirtualPoolMachinesListParams { + var ( + limitDefault = int64(50) + ) + return &V1CloudConfigsVirtualPoolMachinesListParams{ + Limit: &limitDefault, + HTTPClient: client, + } +} + +/* +V1CloudConfigsVirtualPoolMachinesListParams contains all the parameters to send to the API endpoint +for the v1 cloud configs virtual pool machines list operation typically these are written to a http.Request +*/ +type V1CloudConfigsVirtualPoolMachinesListParams struct { + + /*ConfigUID + Cluster's cloud config uid + + */ + ConfigUID string + /*Continue + continue token to paginate the subsequent data items + + */ + Continue *string + /*Fields + Set of fields to be presented in the response with values. The fields are comma separated. Eg: metadata.uid,metadata.name + + */ + Fields *string + /*Filters + Filters can be combined with AND, OR operators with field path name. Eg: metadata.name=TestServiceANDspec.cloudType=aws + + Server will be restricted to certain fields based on the indexed data for each resource. + + */ + Filters *string + /*Limit + limit is a maximum number of responses to return for a list call. Default and maximum value of the limit is 50. + If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. + + */ + Limit *int64 + /*MachinePoolName + Machine pool name + + */ + MachinePoolName string + /*Offset + offset is the next index number from which the response will start. The response offset value can be used along with continue token for the pagination. + + */ + Offset *int64 + /*OrderBy + Specify the fields with sort order. 1 indicates ascending and -1 for descending. Eg: orderBy=metadata.name=1,metadata.uid=-1 + + */ + OrderBy *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud configs virtual pool machines list params +func (o *V1CloudConfigsVirtualPoolMachinesListParams) WithTimeout(timeout time.Duration) *V1CloudConfigsVirtualPoolMachinesListParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud configs virtual pool machines list params +func (o *V1CloudConfigsVirtualPoolMachinesListParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud configs virtual pool machines list params +func (o *V1CloudConfigsVirtualPoolMachinesListParams) WithContext(ctx context.Context) *V1CloudConfigsVirtualPoolMachinesListParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud configs virtual pool machines list params +func (o *V1CloudConfigsVirtualPoolMachinesListParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud configs virtual pool machines list params +func (o *V1CloudConfigsVirtualPoolMachinesListParams) WithHTTPClient(client *http.Client) *V1CloudConfigsVirtualPoolMachinesListParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud configs virtual pool machines list params +func (o *V1CloudConfigsVirtualPoolMachinesListParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithConfigUID adds the configUID to the v1 cloud configs virtual pool machines list params +func (o *V1CloudConfigsVirtualPoolMachinesListParams) WithConfigUID(configUID string) *V1CloudConfigsVirtualPoolMachinesListParams { + o.SetConfigUID(configUID) + return o +} + +// SetConfigUID adds the configUid to the v1 cloud configs virtual pool machines list params +func (o *V1CloudConfigsVirtualPoolMachinesListParams) SetConfigUID(configUID string) { + o.ConfigUID = configUID +} + +// WithContinue adds the continueVar to the v1 cloud configs virtual pool machines list params +func (o *V1CloudConfigsVirtualPoolMachinesListParams) WithContinue(continueVar *string) *V1CloudConfigsVirtualPoolMachinesListParams { + o.SetContinue(continueVar) + return o +} + +// SetContinue adds the continue to the v1 cloud configs virtual pool machines list params +func (o *V1CloudConfigsVirtualPoolMachinesListParams) SetContinue(continueVar *string) { + o.Continue = continueVar +} + +// WithFields adds the fields to the v1 cloud configs virtual pool machines list params +func (o *V1CloudConfigsVirtualPoolMachinesListParams) WithFields(fields *string) *V1CloudConfigsVirtualPoolMachinesListParams { + o.SetFields(fields) + return o +} + +// SetFields adds the fields to the v1 cloud configs virtual pool machines list params +func (o *V1CloudConfigsVirtualPoolMachinesListParams) SetFields(fields *string) { + o.Fields = fields +} + +// WithFilters adds the filters to the v1 cloud configs virtual pool machines list params +func (o *V1CloudConfigsVirtualPoolMachinesListParams) WithFilters(filters *string) *V1CloudConfigsVirtualPoolMachinesListParams { + o.SetFilters(filters) + return o +} + +// SetFilters adds the filters to the v1 cloud configs virtual pool machines list params +func (o *V1CloudConfigsVirtualPoolMachinesListParams) SetFilters(filters *string) { + o.Filters = filters +} + +// WithLimit adds the limit to the v1 cloud configs virtual pool machines list params +func (o *V1CloudConfigsVirtualPoolMachinesListParams) WithLimit(limit *int64) *V1CloudConfigsVirtualPoolMachinesListParams { + o.SetLimit(limit) + return o +} + +// SetLimit adds the limit to the v1 cloud configs virtual pool machines list params +func (o *V1CloudConfigsVirtualPoolMachinesListParams) SetLimit(limit *int64) { + o.Limit = limit +} + +// WithMachinePoolName adds the machinePoolName to the v1 cloud configs virtual pool machines list params +func (o *V1CloudConfigsVirtualPoolMachinesListParams) WithMachinePoolName(machinePoolName string) *V1CloudConfigsVirtualPoolMachinesListParams { + o.SetMachinePoolName(machinePoolName) + return o +} + +// SetMachinePoolName adds the machinePoolName to the v1 cloud configs virtual pool machines list params +func (o *V1CloudConfigsVirtualPoolMachinesListParams) SetMachinePoolName(machinePoolName string) { + o.MachinePoolName = machinePoolName +} + +// WithOffset adds the offset to the v1 cloud configs virtual pool machines list params +func (o *V1CloudConfigsVirtualPoolMachinesListParams) WithOffset(offset *int64) *V1CloudConfigsVirtualPoolMachinesListParams { + o.SetOffset(offset) + return o +} + +// SetOffset adds the offset to the v1 cloud configs virtual pool machines list params +func (o *V1CloudConfigsVirtualPoolMachinesListParams) SetOffset(offset *int64) { + o.Offset = offset +} + +// WithOrderBy adds the orderBy to the v1 cloud configs virtual pool machines list params +func (o *V1CloudConfigsVirtualPoolMachinesListParams) WithOrderBy(orderBy *string) *V1CloudConfigsVirtualPoolMachinesListParams { + o.SetOrderBy(orderBy) + return o +} + +// SetOrderBy adds the orderBy to the v1 cloud configs virtual pool machines list params +func (o *V1CloudConfigsVirtualPoolMachinesListParams) SetOrderBy(orderBy *string) { + o.OrderBy = orderBy +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudConfigsVirtualPoolMachinesListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param configUid + if err := r.SetPathParam("configUid", o.ConfigUID); err != nil { + return err + } + + if o.Continue != nil { + + // query param continue + var qrContinue string + if o.Continue != nil { + qrContinue = *o.Continue + } + qContinue := qrContinue + if qContinue != "" { + if err := r.SetQueryParam("continue", qContinue); err != nil { + return err + } + } + + } + + if o.Fields != nil { + + // query param fields + var qrFields string + if o.Fields != nil { + qrFields = *o.Fields + } + qFields := qrFields + if qFields != "" { + if err := r.SetQueryParam("fields", qFields); err != nil { + return err + } + } + + } + + if o.Filters != nil { + + // query param filters + var qrFilters string + if o.Filters != nil { + qrFilters = *o.Filters + } + qFilters := qrFilters + if qFilters != "" { + if err := r.SetQueryParam("filters", qFilters); err != nil { + return err + } + } + + } + + if o.Limit != nil { + + // query param limit + var qrLimit int64 + if o.Limit != nil { + qrLimit = *o.Limit + } + qLimit := swag.FormatInt64(qrLimit) + if qLimit != "" { + if err := r.SetQueryParam("limit", qLimit); err != nil { + return err + } + } + + } + + // path param machinePoolName + if err := r.SetPathParam("machinePoolName", o.MachinePoolName); err != nil { + return err + } + + if o.Offset != nil { + + // query param offset + var qrOffset int64 + if o.Offset != nil { + qrOffset = *o.Offset + } + qOffset := swag.FormatInt64(qrOffset) + if qOffset != "" { + if err := r.SetQueryParam("offset", qOffset); err != nil { + return err + } + } + + } + + if o.OrderBy != nil { + + // query param orderBy + var qrOrderBy string + if o.OrderBy != nil { + qrOrderBy = *o.OrderBy + } + qOrderBy := qrOrderBy + if qOrderBy != "" { + if err := r.SetQueryParam("orderBy", qOrderBy); err != nil { + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_configs_virtual_pool_machines_list_responses.go b/api/client/v1/v1_cloud_configs_virtual_pool_machines_list_responses.go new file mode 100644 index 00000000..c041a19c --- /dev/null +++ b/api/client/v1/v1_cloud_configs_virtual_pool_machines_list_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1CloudConfigsVirtualPoolMachinesListReader is a Reader for the V1CloudConfigsVirtualPoolMachinesList structure. +type V1CloudConfigsVirtualPoolMachinesListReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudConfigsVirtualPoolMachinesListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1CloudConfigsVirtualPoolMachinesListOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudConfigsVirtualPoolMachinesListOK creates a V1CloudConfigsVirtualPoolMachinesListOK with default headers values +func NewV1CloudConfigsVirtualPoolMachinesListOK() *V1CloudConfigsVirtualPoolMachinesListOK { + return &V1CloudConfigsVirtualPoolMachinesListOK{} +} + +/* +V1CloudConfigsVirtualPoolMachinesListOK handles this case with default header values. + +An array of virtual machine items +*/ +type V1CloudConfigsVirtualPoolMachinesListOK struct { + Payload *models.V1VirtualMachines +} + +func (o *V1CloudConfigsVirtualPoolMachinesListOK) Error() string { + return fmt.Sprintf("[GET /v1/cloudconfigs/virtual/{configUid}/machinePools/{machinePoolName}/machines][%d] v1CloudConfigsVirtualPoolMachinesListOK %+v", 200, o.Payload) +} + +func (o *V1CloudConfigsVirtualPoolMachinesListOK) GetPayload() *models.V1VirtualMachines { + return o.Payload +} + +func (o *V1CloudConfigsVirtualPoolMachinesListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1VirtualMachines) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_cloud_configs_virtual_pool_machines_uid_delete_parameters.go b/api/client/v1/v1_cloud_configs_virtual_pool_machines_uid_delete_parameters.go new file mode 100644 index 00000000..41dd8caf --- /dev/null +++ b/api/client/v1/v1_cloud_configs_virtual_pool_machines_uid_delete_parameters.go @@ -0,0 +1,178 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1CloudConfigsVirtualPoolMachinesUIDDeleteParams creates a new V1CloudConfigsVirtualPoolMachinesUIDDeleteParams object +// with the default values initialized. +func NewV1CloudConfigsVirtualPoolMachinesUIDDeleteParams() *V1CloudConfigsVirtualPoolMachinesUIDDeleteParams { + var () + return &V1CloudConfigsVirtualPoolMachinesUIDDeleteParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudConfigsVirtualPoolMachinesUIDDeleteParamsWithTimeout creates a new V1CloudConfigsVirtualPoolMachinesUIDDeleteParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudConfigsVirtualPoolMachinesUIDDeleteParamsWithTimeout(timeout time.Duration) *V1CloudConfigsVirtualPoolMachinesUIDDeleteParams { + var () + return &V1CloudConfigsVirtualPoolMachinesUIDDeleteParams{ + + timeout: timeout, + } +} + +// NewV1CloudConfigsVirtualPoolMachinesUIDDeleteParamsWithContext creates a new V1CloudConfigsVirtualPoolMachinesUIDDeleteParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudConfigsVirtualPoolMachinesUIDDeleteParamsWithContext(ctx context.Context) *V1CloudConfigsVirtualPoolMachinesUIDDeleteParams { + var () + return &V1CloudConfigsVirtualPoolMachinesUIDDeleteParams{ + + Context: ctx, + } +} + +// NewV1CloudConfigsVirtualPoolMachinesUIDDeleteParamsWithHTTPClient creates a new V1CloudConfigsVirtualPoolMachinesUIDDeleteParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudConfigsVirtualPoolMachinesUIDDeleteParamsWithHTTPClient(client *http.Client) *V1CloudConfigsVirtualPoolMachinesUIDDeleteParams { + var () + return &V1CloudConfigsVirtualPoolMachinesUIDDeleteParams{ + HTTPClient: client, + } +} + +/* +V1CloudConfigsVirtualPoolMachinesUIDDeleteParams contains all the parameters to send to the API endpoint +for the v1 cloud configs virtual pool machines Uid delete operation typically these are written to a http.Request +*/ +type V1CloudConfigsVirtualPoolMachinesUIDDeleteParams struct { + + /*ConfigUID + Cluster's cloud config uid + + */ + ConfigUID string + /*MachinePoolName + Machine pool name + + */ + MachinePoolName string + /*MachineUID + Machine uid + + */ + MachineUID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud configs virtual pool machines Uid delete params +func (o *V1CloudConfigsVirtualPoolMachinesUIDDeleteParams) WithTimeout(timeout time.Duration) *V1CloudConfigsVirtualPoolMachinesUIDDeleteParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud configs virtual pool machines Uid delete params +func (o *V1CloudConfigsVirtualPoolMachinesUIDDeleteParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud configs virtual pool machines Uid delete params +func (o *V1CloudConfigsVirtualPoolMachinesUIDDeleteParams) WithContext(ctx context.Context) *V1CloudConfigsVirtualPoolMachinesUIDDeleteParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud configs virtual pool machines Uid delete params +func (o *V1CloudConfigsVirtualPoolMachinesUIDDeleteParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud configs virtual pool machines Uid delete params +func (o *V1CloudConfigsVirtualPoolMachinesUIDDeleteParams) WithHTTPClient(client *http.Client) *V1CloudConfigsVirtualPoolMachinesUIDDeleteParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud configs virtual pool machines Uid delete params +func (o *V1CloudConfigsVirtualPoolMachinesUIDDeleteParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithConfigUID adds the configUID to the v1 cloud configs virtual pool machines Uid delete params +func (o *V1CloudConfigsVirtualPoolMachinesUIDDeleteParams) WithConfigUID(configUID string) *V1CloudConfigsVirtualPoolMachinesUIDDeleteParams { + o.SetConfigUID(configUID) + return o +} + +// SetConfigUID adds the configUid to the v1 cloud configs virtual pool machines Uid delete params +func (o *V1CloudConfigsVirtualPoolMachinesUIDDeleteParams) SetConfigUID(configUID string) { + o.ConfigUID = configUID +} + +// WithMachinePoolName adds the machinePoolName to the v1 cloud configs virtual pool machines Uid delete params +func (o *V1CloudConfigsVirtualPoolMachinesUIDDeleteParams) WithMachinePoolName(machinePoolName string) *V1CloudConfigsVirtualPoolMachinesUIDDeleteParams { + o.SetMachinePoolName(machinePoolName) + return o +} + +// SetMachinePoolName adds the machinePoolName to the v1 cloud configs virtual pool machines Uid delete params +func (o *V1CloudConfigsVirtualPoolMachinesUIDDeleteParams) SetMachinePoolName(machinePoolName string) { + o.MachinePoolName = machinePoolName +} + +// WithMachineUID adds the machineUID to the v1 cloud configs virtual pool machines Uid delete params +func (o *V1CloudConfigsVirtualPoolMachinesUIDDeleteParams) WithMachineUID(machineUID string) *V1CloudConfigsVirtualPoolMachinesUIDDeleteParams { + o.SetMachineUID(machineUID) + return o +} + +// SetMachineUID adds the machineUid to the v1 cloud configs virtual pool machines Uid delete params +func (o *V1CloudConfigsVirtualPoolMachinesUIDDeleteParams) SetMachineUID(machineUID string) { + o.MachineUID = machineUID +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudConfigsVirtualPoolMachinesUIDDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param configUid + if err := r.SetPathParam("configUid", o.ConfigUID); err != nil { + return err + } + + // path param machinePoolName + if err := r.SetPathParam("machinePoolName", o.MachinePoolName); err != nil { + return err + } + + // path param machineUid + if err := r.SetPathParam("machineUid", o.MachineUID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_configs_virtual_pool_machines_uid_delete_responses.go b/api/client/v1/v1_cloud_configs_virtual_pool_machines_uid_delete_responses.go new file mode 100644 index 00000000..6a17f02c --- /dev/null +++ b/api/client/v1/v1_cloud_configs_virtual_pool_machines_uid_delete_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1CloudConfigsVirtualPoolMachinesUIDDeleteReader is a Reader for the V1CloudConfigsVirtualPoolMachinesUIDDelete structure. +type V1CloudConfigsVirtualPoolMachinesUIDDeleteReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudConfigsVirtualPoolMachinesUIDDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1CloudConfigsVirtualPoolMachinesUIDDeleteNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudConfigsVirtualPoolMachinesUIDDeleteNoContent creates a V1CloudConfigsVirtualPoolMachinesUIDDeleteNoContent with default headers values +func NewV1CloudConfigsVirtualPoolMachinesUIDDeleteNoContent() *V1CloudConfigsVirtualPoolMachinesUIDDeleteNoContent { + return &V1CloudConfigsVirtualPoolMachinesUIDDeleteNoContent{} +} + +/* +V1CloudConfigsVirtualPoolMachinesUIDDeleteNoContent handles this case with default header values. + +The resource was deleted successfully +*/ +type V1CloudConfigsVirtualPoolMachinesUIDDeleteNoContent struct { +} + +func (o *V1CloudConfigsVirtualPoolMachinesUIDDeleteNoContent) Error() string { + return fmt.Sprintf("[DELETE /v1/cloudconfigs/virtual/{configUid}/machinePools/{machinePoolName}/machines/{machineUid}][%d] v1CloudConfigsVirtualPoolMachinesUidDeleteNoContent ", 204) +} + +func (o *V1CloudConfigsVirtualPoolMachinesUIDDeleteNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_cloud_configs_virtual_pool_machines_uid_get_parameters.go b/api/client/v1/v1_cloud_configs_virtual_pool_machines_uid_get_parameters.go new file mode 100644 index 00000000..6942ea95 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_virtual_pool_machines_uid_get_parameters.go @@ -0,0 +1,178 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1CloudConfigsVirtualPoolMachinesUIDGetParams creates a new V1CloudConfigsVirtualPoolMachinesUIDGetParams object +// with the default values initialized. +func NewV1CloudConfigsVirtualPoolMachinesUIDGetParams() *V1CloudConfigsVirtualPoolMachinesUIDGetParams { + var () + return &V1CloudConfigsVirtualPoolMachinesUIDGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudConfigsVirtualPoolMachinesUIDGetParamsWithTimeout creates a new V1CloudConfigsVirtualPoolMachinesUIDGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudConfigsVirtualPoolMachinesUIDGetParamsWithTimeout(timeout time.Duration) *V1CloudConfigsVirtualPoolMachinesUIDGetParams { + var () + return &V1CloudConfigsVirtualPoolMachinesUIDGetParams{ + + timeout: timeout, + } +} + +// NewV1CloudConfigsVirtualPoolMachinesUIDGetParamsWithContext creates a new V1CloudConfigsVirtualPoolMachinesUIDGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudConfigsVirtualPoolMachinesUIDGetParamsWithContext(ctx context.Context) *V1CloudConfigsVirtualPoolMachinesUIDGetParams { + var () + return &V1CloudConfigsVirtualPoolMachinesUIDGetParams{ + + Context: ctx, + } +} + +// NewV1CloudConfigsVirtualPoolMachinesUIDGetParamsWithHTTPClient creates a new V1CloudConfigsVirtualPoolMachinesUIDGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudConfigsVirtualPoolMachinesUIDGetParamsWithHTTPClient(client *http.Client) *V1CloudConfigsVirtualPoolMachinesUIDGetParams { + var () + return &V1CloudConfigsVirtualPoolMachinesUIDGetParams{ + HTTPClient: client, + } +} + +/* +V1CloudConfigsVirtualPoolMachinesUIDGetParams contains all the parameters to send to the API endpoint +for the v1 cloud configs virtual pool machines Uid get operation typically these are written to a http.Request +*/ +type V1CloudConfigsVirtualPoolMachinesUIDGetParams struct { + + /*ConfigUID + Cluster's cloud config uid + + */ + ConfigUID string + /*MachinePoolName + Machine pool name + + */ + MachinePoolName string + /*MachineUID + Machine uid + + */ + MachineUID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud configs virtual pool machines Uid get params +func (o *V1CloudConfigsVirtualPoolMachinesUIDGetParams) WithTimeout(timeout time.Duration) *V1CloudConfigsVirtualPoolMachinesUIDGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud configs virtual pool machines Uid get params +func (o *V1CloudConfigsVirtualPoolMachinesUIDGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud configs virtual pool machines Uid get params +func (o *V1CloudConfigsVirtualPoolMachinesUIDGetParams) WithContext(ctx context.Context) *V1CloudConfigsVirtualPoolMachinesUIDGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud configs virtual pool machines Uid get params +func (o *V1CloudConfigsVirtualPoolMachinesUIDGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud configs virtual pool machines Uid get params +func (o *V1CloudConfigsVirtualPoolMachinesUIDGetParams) WithHTTPClient(client *http.Client) *V1CloudConfigsVirtualPoolMachinesUIDGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud configs virtual pool machines Uid get params +func (o *V1CloudConfigsVirtualPoolMachinesUIDGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithConfigUID adds the configUID to the v1 cloud configs virtual pool machines Uid get params +func (o *V1CloudConfigsVirtualPoolMachinesUIDGetParams) WithConfigUID(configUID string) *V1CloudConfigsVirtualPoolMachinesUIDGetParams { + o.SetConfigUID(configUID) + return o +} + +// SetConfigUID adds the configUid to the v1 cloud configs virtual pool machines Uid get params +func (o *V1CloudConfigsVirtualPoolMachinesUIDGetParams) SetConfigUID(configUID string) { + o.ConfigUID = configUID +} + +// WithMachinePoolName adds the machinePoolName to the v1 cloud configs virtual pool machines Uid get params +func (o *V1CloudConfigsVirtualPoolMachinesUIDGetParams) WithMachinePoolName(machinePoolName string) *V1CloudConfigsVirtualPoolMachinesUIDGetParams { + o.SetMachinePoolName(machinePoolName) + return o +} + +// SetMachinePoolName adds the machinePoolName to the v1 cloud configs virtual pool machines Uid get params +func (o *V1CloudConfigsVirtualPoolMachinesUIDGetParams) SetMachinePoolName(machinePoolName string) { + o.MachinePoolName = machinePoolName +} + +// WithMachineUID adds the machineUID to the v1 cloud configs virtual pool machines Uid get params +func (o *V1CloudConfigsVirtualPoolMachinesUIDGetParams) WithMachineUID(machineUID string) *V1CloudConfigsVirtualPoolMachinesUIDGetParams { + o.SetMachineUID(machineUID) + return o +} + +// SetMachineUID adds the machineUid to the v1 cloud configs virtual pool machines Uid get params +func (o *V1CloudConfigsVirtualPoolMachinesUIDGetParams) SetMachineUID(machineUID string) { + o.MachineUID = machineUID +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudConfigsVirtualPoolMachinesUIDGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param configUid + if err := r.SetPathParam("configUid", o.ConfigUID); err != nil { + return err + } + + // path param machinePoolName + if err := r.SetPathParam("machinePoolName", o.MachinePoolName); err != nil { + return err + } + + // path param machineUid + if err := r.SetPathParam("machineUid", o.MachineUID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_configs_virtual_pool_machines_uid_get_responses.go b/api/client/v1/v1_cloud_configs_virtual_pool_machines_uid_get_responses.go new file mode 100644 index 00000000..c38aaaa4 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_virtual_pool_machines_uid_get_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1CloudConfigsVirtualPoolMachinesUIDGetReader is a Reader for the V1CloudConfigsVirtualPoolMachinesUIDGet structure. +type V1CloudConfigsVirtualPoolMachinesUIDGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudConfigsVirtualPoolMachinesUIDGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1CloudConfigsVirtualPoolMachinesUIDGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudConfigsVirtualPoolMachinesUIDGetOK creates a V1CloudConfigsVirtualPoolMachinesUIDGetOK with default headers values +func NewV1CloudConfigsVirtualPoolMachinesUIDGetOK() *V1CloudConfigsVirtualPoolMachinesUIDGetOK { + return &V1CloudConfigsVirtualPoolMachinesUIDGetOK{} +} + +/* +V1CloudConfigsVirtualPoolMachinesUIDGetOK handles this case with default header values. + +OK +*/ +type V1CloudConfigsVirtualPoolMachinesUIDGetOK struct { + Payload *models.V1VirtualMachine +} + +func (o *V1CloudConfigsVirtualPoolMachinesUIDGetOK) Error() string { + return fmt.Sprintf("[GET /v1/cloudconfigs/virtual/{configUid}/machinePools/{machinePoolName}/machines/{machineUid}][%d] v1CloudConfigsVirtualPoolMachinesUidGetOK %+v", 200, o.Payload) +} + +func (o *V1CloudConfigsVirtualPoolMachinesUIDGetOK) GetPayload() *models.V1VirtualMachine { + return o.Payload +} + +func (o *V1CloudConfigsVirtualPoolMachinesUIDGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1VirtualMachine) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_cloud_configs_virtual_pool_machines_uid_update_parameters.go b/api/client/v1/v1_cloud_configs_virtual_pool_machines_uid_update_parameters.go new file mode 100644 index 00000000..649005cb --- /dev/null +++ b/api/client/v1/v1_cloud_configs_virtual_pool_machines_uid_update_parameters.go @@ -0,0 +1,199 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1CloudConfigsVirtualPoolMachinesUIDUpdateParams creates a new V1CloudConfigsVirtualPoolMachinesUIDUpdateParams object +// with the default values initialized. +func NewV1CloudConfigsVirtualPoolMachinesUIDUpdateParams() *V1CloudConfigsVirtualPoolMachinesUIDUpdateParams { + var () + return &V1CloudConfigsVirtualPoolMachinesUIDUpdateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudConfigsVirtualPoolMachinesUIDUpdateParamsWithTimeout creates a new V1CloudConfigsVirtualPoolMachinesUIDUpdateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudConfigsVirtualPoolMachinesUIDUpdateParamsWithTimeout(timeout time.Duration) *V1CloudConfigsVirtualPoolMachinesUIDUpdateParams { + var () + return &V1CloudConfigsVirtualPoolMachinesUIDUpdateParams{ + + timeout: timeout, + } +} + +// NewV1CloudConfigsVirtualPoolMachinesUIDUpdateParamsWithContext creates a new V1CloudConfigsVirtualPoolMachinesUIDUpdateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudConfigsVirtualPoolMachinesUIDUpdateParamsWithContext(ctx context.Context) *V1CloudConfigsVirtualPoolMachinesUIDUpdateParams { + var () + return &V1CloudConfigsVirtualPoolMachinesUIDUpdateParams{ + + Context: ctx, + } +} + +// NewV1CloudConfigsVirtualPoolMachinesUIDUpdateParamsWithHTTPClient creates a new V1CloudConfigsVirtualPoolMachinesUIDUpdateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudConfigsVirtualPoolMachinesUIDUpdateParamsWithHTTPClient(client *http.Client) *V1CloudConfigsVirtualPoolMachinesUIDUpdateParams { + var () + return &V1CloudConfigsVirtualPoolMachinesUIDUpdateParams{ + HTTPClient: client, + } +} + +/* +V1CloudConfigsVirtualPoolMachinesUIDUpdateParams contains all the parameters to send to the API endpoint +for the v1 cloud configs virtual pool machines Uid update operation typically these are written to a http.Request +*/ +type V1CloudConfigsVirtualPoolMachinesUIDUpdateParams struct { + + /*Body*/ + Body *models.V1VirtualMachine + /*ConfigUID + Cluster's cloud config uid + + */ + ConfigUID string + /*MachinePoolName + Machine pool name + + */ + MachinePoolName string + /*MachineUID + Machine uid + + */ + MachineUID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud configs virtual pool machines Uid update params +func (o *V1CloudConfigsVirtualPoolMachinesUIDUpdateParams) WithTimeout(timeout time.Duration) *V1CloudConfigsVirtualPoolMachinesUIDUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud configs virtual pool machines Uid update params +func (o *V1CloudConfigsVirtualPoolMachinesUIDUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud configs virtual pool machines Uid update params +func (o *V1CloudConfigsVirtualPoolMachinesUIDUpdateParams) WithContext(ctx context.Context) *V1CloudConfigsVirtualPoolMachinesUIDUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud configs virtual pool machines Uid update params +func (o *V1CloudConfigsVirtualPoolMachinesUIDUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud configs virtual pool machines Uid update params +func (o *V1CloudConfigsVirtualPoolMachinesUIDUpdateParams) WithHTTPClient(client *http.Client) *V1CloudConfigsVirtualPoolMachinesUIDUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud configs virtual pool machines Uid update params +func (o *V1CloudConfigsVirtualPoolMachinesUIDUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 cloud configs virtual pool machines Uid update params +func (o *V1CloudConfigsVirtualPoolMachinesUIDUpdateParams) WithBody(body *models.V1VirtualMachine) *V1CloudConfigsVirtualPoolMachinesUIDUpdateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 cloud configs virtual pool machines Uid update params +func (o *V1CloudConfigsVirtualPoolMachinesUIDUpdateParams) SetBody(body *models.V1VirtualMachine) { + o.Body = body +} + +// WithConfigUID adds the configUID to the v1 cloud configs virtual pool machines Uid update params +func (o *V1CloudConfigsVirtualPoolMachinesUIDUpdateParams) WithConfigUID(configUID string) *V1CloudConfigsVirtualPoolMachinesUIDUpdateParams { + o.SetConfigUID(configUID) + return o +} + +// SetConfigUID adds the configUid to the v1 cloud configs virtual pool machines Uid update params +func (o *V1CloudConfigsVirtualPoolMachinesUIDUpdateParams) SetConfigUID(configUID string) { + o.ConfigUID = configUID +} + +// WithMachinePoolName adds the machinePoolName to the v1 cloud configs virtual pool machines Uid update params +func (o *V1CloudConfigsVirtualPoolMachinesUIDUpdateParams) WithMachinePoolName(machinePoolName string) *V1CloudConfigsVirtualPoolMachinesUIDUpdateParams { + o.SetMachinePoolName(machinePoolName) + return o +} + +// SetMachinePoolName adds the machinePoolName to the v1 cloud configs virtual pool machines Uid update params +func (o *V1CloudConfigsVirtualPoolMachinesUIDUpdateParams) SetMachinePoolName(machinePoolName string) { + o.MachinePoolName = machinePoolName +} + +// WithMachineUID adds the machineUID to the v1 cloud configs virtual pool machines Uid update params +func (o *V1CloudConfigsVirtualPoolMachinesUIDUpdateParams) WithMachineUID(machineUID string) *V1CloudConfigsVirtualPoolMachinesUIDUpdateParams { + o.SetMachineUID(machineUID) + return o +} + +// SetMachineUID adds the machineUid to the v1 cloud configs virtual pool machines Uid update params +func (o *V1CloudConfigsVirtualPoolMachinesUIDUpdateParams) SetMachineUID(machineUID string) { + o.MachineUID = machineUID +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudConfigsVirtualPoolMachinesUIDUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param configUid + if err := r.SetPathParam("configUid", o.ConfigUID); err != nil { + return err + } + + // path param machinePoolName + if err := r.SetPathParam("machinePoolName", o.MachinePoolName); err != nil { + return err + } + + // path param machineUid + if err := r.SetPathParam("machineUid", o.MachineUID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_configs_virtual_pool_machines_uid_update_responses.go b/api/client/v1/v1_cloud_configs_virtual_pool_machines_uid_update_responses.go new file mode 100644 index 00000000..f41b9e91 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_virtual_pool_machines_uid_update_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1CloudConfigsVirtualPoolMachinesUIDUpdateReader is a Reader for the V1CloudConfigsVirtualPoolMachinesUIDUpdate structure. +type V1CloudConfigsVirtualPoolMachinesUIDUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudConfigsVirtualPoolMachinesUIDUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1CloudConfigsVirtualPoolMachinesUIDUpdateNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudConfigsVirtualPoolMachinesUIDUpdateNoContent creates a V1CloudConfigsVirtualPoolMachinesUIDUpdateNoContent with default headers values +func NewV1CloudConfigsVirtualPoolMachinesUIDUpdateNoContent() *V1CloudConfigsVirtualPoolMachinesUIDUpdateNoContent { + return &V1CloudConfigsVirtualPoolMachinesUIDUpdateNoContent{} +} + +/* +V1CloudConfigsVirtualPoolMachinesUIDUpdateNoContent handles this case with default header values. + +The resource was updated successfully +*/ +type V1CloudConfigsVirtualPoolMachinesUIDUpdateNoContent struct { +} + +func (o *V1CloudConfigsVirtualPoolMachinesUIDUpdateNoContent) Error() string { + return fmt.Sprintf("[PUT /v1/cloudconfigs/virtual/{configUid}/machinePools/{machinePoolName}/machines/{machineUid}][%d] v1CloudConfigsVirtualPoolMachinesUidUpdateNoContent ", 204) +} + +func (o *V1CloudConfigsVirtualPoolMachinesUIDUpdateNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_cloud_configs_virtual_uid_cluster_config_parameters.go b/api/client/v1/v1_cloud_configs_virtual_uid_cluster_config_parameters.go new file mode 100644 index 00000000..c0c38b2e --- /dev/null +++ b/api/client/v1/v1_cloud_configs_virtual_uid_cluster_config_parameters.go @@ -0,0 +1,157 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1CloudConfigsVirtualUIDClusterConfigParams creates a new V1CloudConfigsVirtualUIDClusterConfigParams object +// with the default values initialized. +func NewV1CloudConfigsVirtualUIDClusterConfigParams() *V1CloudConfigsVirtualUIDClusterConfigParams { + var () + return &V1CloudConfigsVirtualUIDClusterConfigParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudConfigsVirtualUIDClusterConfigParamsWithTimeout creates a new V1CloudConfigsVirtualUIDClusterConfigParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudConfigsVirtualUIDClusterConfigParamsWithTimeout(timeout time.Duration) *V1CloudConfigsVirtualUIDClusterConfigParams { + var () + return &V1CloudConfigsVirtualUIDClusterConfigParams{ + + timeout: timeout, + } +} + +// NewV1CloudConfigsVirtualUIDClusterConfigParamsWithContext creates a new V1CloudConfigsVirtualUIDClusterConfigParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudConfigsVirtualUIDClusterConfigParamsWithContext(ctx context.Context) *V1CloudConfigsVirtualUIDClusterConfigParams { + var () + return &V1CloudConfigsVirtualUIDClusterConfigParams{ + + Context: ctx, + } +} + +// NewV1CloudConfigsVirtualUIDClusterConfigParamsWithHTTPClient creates a new V1CloudConfigsVirtualUIDClusterConfigParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudConfigsVirtualUIDClusterConfigParamsWithHTTPClient(client *http.Client) *V1CloudConfigsVirtualUIDClusterConfigParams { + var () + return &V1CloudConfigsVirtualUIDClusterConfigParams{ + HTTPClient: client, + } +} + +/* +V1CloudConfigsVirtualUIDClusterConfigParams contains all the parameters to send to the API endpoint +for the v1 cloud configs virtual Uid cluster config operation typically these are written to a http.Request +*/ +type V1CloudConfigsVirtualUIDClusterConfigParams struct { + + /*Body*/ + Body *models.V1VirtualCloudClusterConfigEntity + /*ConfigUID + Cluster's cloud config uid + + */ + ConfigUID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud configs virtual Uid cluster config params +func (o *V1CloudConfigsVirtualUIDClusterConfigParams) WithTimeout(timeout time.Duration) *V1CloudConfigsVirtualUIDClusterConfigParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud configs virtual Uid cluster config params +func (o *V1CloudConfigsVirtualUIDClusterConfigParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud configs virtual Uid cluster config params +func (o *V1CloudConfigsVirtualUIDClusterConfigParams) WithContext(ctx context.Context) *V1CloudConfigsVirtualUIDClusterConfigParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud configs virtual Uid cluster config params +func (o *V1CloudConfigsVirtualUIDClusterConfigParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud configs virtual Uid cluster config params +func (o *V1CloudConfigsVirtualUIDClusterConfigParams) WithHTTPClient(client *http.Client) *V1CloudConfigsVirtualUIDClusterConfigParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud configs virtual Uid cluster config params +func (o *V1CloudConfigsVirtualUIDClusterConfigParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 cloud configs virtual Uid cluster config params +func (o *V1CloudConfigsVirtualUIDClusterConfigParams) WithBody(body *models.V1VirtualCloudClusterConfigEntity) *V1CloudConfigsVirtualUIDClusterConfigParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 cloud configs virtual Uid cluster config params +func (o *V1CloudConfigsVirtualUIDClusterConfigParams) SetBody(body *models.V1VirtualCloudClusterConfigEntity) { + o.Body = body +} + +// WithConfigUID adds the configUID to the v1 cloud configs virtual Uid cluster config params +func (o *V1CloudConfigsVirtualUIDClusterConfigParams) WithConfigUID(configUID string) *V1CloudConfigsVirtualUIDClusterConfigParams { + o.SetConfigUID(configUID) + return o +} + +// SetConfigUID adds the configUid to the v1 cloud configs virtual Uid cluster config params +func (o *V1CloudConfigsVirtualUIDClusterConfigParams) SetConfigUID(configUID string) { + o.ConfigUID = configUID +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudConfigsVirtualUIDClusterConfigParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param configUid + if err := r.SetPathParam("configUid", o.ConfigUID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_configs_virtual_uid_cluster_config_responses.go b/api/client/v1/v1_cloud_configs_virtual_uid_cluster_config_responses.go new file mode 100644 index 00000000..f7be18ce --- /dev/null +++ b/api/client/v1/v1_cloud_configs_virtual_uid_cluster_config_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1CloudConfigsVirtualUIDClusterConfigReader is a Reader for the V1CloudConfigsVirtualUIDClusterConfig structure. +type V1CloudConfigsVirtualUIDClusterConfigReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudConfigsVirtualUIDClusterConfigReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1CloudConfigsVirtualUIDClusterConfigNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudConfigsVirtualUIDClusterConfigNoContent creates a V1CloudConfigsVirtualUIDClusterConfigNoContent with default headers values +func NewV1CloudConfigsVirtualUIDClusterConfigNoContent() *V1CloudConfigsVirtualUIDClusterConfigNoContent { + return &V1CloudConfigsVirtualUIDClusterConfigNoContent{} +} + +/* +V1CloudConfigsVirtualUIDClusterConfigNoContent handles this case with default header values. + +The resource was updated successfully +*/ +type V1CloudConfigsVirtualUIDClusterConfigNoContent struct { +} + +func (o *V1CloudConfigsVirtualUIDClusterConfigNoContent) Error() string { + return fmt.Sprintf("[PUT /v1/cloudconfigs/virtual/{configUid}/clusterConfig][%d] v1CloudConfigsVirtualUidClusterConfigNoContent ", 204) +} + +func (o *V1CloudConfigsVirtualUIDClusterConfigNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_cloud_configs_virtual_uid_update_parameters.go b/api/client/v1/v1_cloud_configs_virtual_uid_update_parameters.go new file mode 100644 index 00000000..5fed1965 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_virtual_uid_update_parameters.go @@ -0,0 +1,157 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1CloudConfigsVirtualUIDUpdateParams creates a new V1CloudConfigsVirtualUIDUpdateParams object +// with the default values initialized. +func NewV1CloudConfigsVirtualUIDUpdateParams() *V1CloudConfigsVirtualUIDUpdateParams { + var () + return &V1CloudConfigsVirtualUIDUpdateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudConfigsVirtualUIDUpdateParamsWithTimeout creates a new V1CloudConfigsVirtualUIDUpdateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudConfigsVirtualUIDUpdateParamsWithTimeout(timeout time.Duration) *V1CloudConfigsVirtualUIDUpdateParams { + var () + return &V1CloudConfigsVirtualUIDUpdateParams{ + + timeout: timeout, + } +} + +// NewV1CloudConfigsVirtualUIDUpdateParamsWithContext creates a new V1CloudConfigsVirtualUIDUpdateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudConfigsVirtualUIDUpdateParamsWithContext(ctx context.Context) *V1CloudConfigsVirtualUIDUpdateParams { + var () + return &V1CloudConfigsVirtualUIDUpdateParams{ + + Context: ctx, + } +} + +// NewV1CloudConfigsVirtualUIDUpdateParamsWithHTTPClient creates a new V1CloudConfigsVirtualUIDUpdateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudConfigsVirtualUIDUpdateParamsWithHTTPClient(client *http.Client) *V1CloudConfigsVirtualUIDUpdateParams { + var () + return &V1CloudConfigsVirtualUIDUpdateParams{ + HTTPClient: client, + } +} + +/* +V1CloudConfigsVirtualUIDUpdateParams contains all the parameters to send to the API endpoint +for the v1 cloud configs virtual Uid update operation typically these are written to a http.Request +*/ +type V1CloudConfigsVirtualUIDUpdateParams struct { + + /*Body*/ + Body *models.V1VirtualClusterResize + /*ConfigUID + Specify virtual cloud config uid + + */ + ConfigUID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud configs virtual Uid update params +func (o *V1CloudConfigsVirtualUIDUpdateParams) WithTimeout(timeout time.Duration) *V1CloudConfigsVirtualUIDUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud configs virtual Uid update params +func (o *V1CloudConfigsVirtualUIDUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud configs virtual Uid update params +func (o *V1CloudConfigsVirtualUIDUpdateParams) WithContext(ctx context.Context) *V1CloudConfigsVirtualUIDUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud configs virtual Uid update params +func (o *V1CloudConfigsVirtualUIDUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud configs virtual Uid update params +func (o *V1CloudConfigsVirtualUIDUpdateParams) WithHTTPClient(client *http.Client) *V1CloudConfigsVirtualUIDUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud configs virtual Uid update params +func (o *V1CloudConfigsVirtualUIDUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 cloud configs virtual Uid update params +func (o *V1CloudConfigsVirtualUIDUpdateParams) WithBody(body *models.V1VirtualClusterResize) *V1CloudConfigsVirtualUIDUpdateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 cloud configs virtual Uid update params +func (o *V1CloudConfigsVirtualUIDUpdateParams) SetBody(body *models.V1VirtualClusterResize) { + o.Body = body +} + +// WithConfigUID adds the configUID to the v1 cloud configs virtual Uid update params +func (o *V1CloudConfigsVirtualUIDUpdateParams) WithConfigUID(configUID string) *V1CloudConfigsVirtualUIDUpdateParams { + o.SetConfigUID(configUID) + return o +} + +// SetConfigUID adds the configUid to the v1 cloud configs virtual Uid update params +func (o *V1CloudConfigsVirtualUIDUpdateParams) SetConfigUID(configUID string) { + o.ConfigUID = configUID +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudConfigsVirtualUIDUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param configUid + if err := r.SetPathParam("configUid", o.ConfigUID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_configs_virtual_uid_update_responses.go b/api/client/v1/v1_cloud_configs_virtual_uid_update_responses.go new file mode 100644 index 00000000..3296b885 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_virtual_uid_update_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1CloudConfigsVirtualUIDUpdateReader is a Reader for the V1CloudConfigsVirtualUIDUpdate structure. +type V1CloudConfigsVirtualUIDUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudConfigsVirtualUIDUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1CloudConfigsVirtualUIDUpdateNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudConfigsVirtualUIDUpdateNoContent creates a V1CloudConfigsVirtualUIDUpdateNoContent with default headers values +func NewV1CloudConfigsVirtualUIDUpdateNoContent() *V1CloudConfigsVirtualUIDUpdateNoContent { + return &V1CloudConfigsVirtualUIDUpdateNoContent{} +} + +/* +V1CloudConfigsVirtualUIDUpdateNoContent handles this case with default header values. + +The resource was updated successfully +*/ +type V1CloudConfigsVirtualUIDUpdateNoContent struct { +} + +func (o *V1CloudConfigsVirtualUIDUpdateNoContent) Error() string { + return fmt.Sprintf("[PUT /v1/cloudconfigs/virtual/{configUid}/resize][%d] v1CloudConfigsVirtualUidUpdateNoContent ", 204) +} + +func (o *V1CloudConfigsVirtualUIDUpdateNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_cloud_configs_vsphere_get_parameters.go b/api/client/v1/v1_cloud_configs_vsphere_get_parameters.go new file mode 100644 index 00000000..7cdb1d38 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_vsphere_get_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1CloudConfigsVsphereGetParams creates a new V1CloudConfigsVsphereGetParams object +// with the default values initialized. +func NewV1CloudConfigsVsphereGetParams() *V1CloudConfigsVsphereGetParams { + var () + return &V1CloudConfigsVsphereGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudConfigsVsphereGetParamsWithTimeout creates a new V1CloudConfigsVsphereGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudConfigsVsphereGetParamsWithTimeout(timeout time.Duration) *V1CloudConfigsVsphereGetParams { + var () + return &V1CloudConfigsVsphereGetParams{ + + timeout: timeout, + } +} + +// NewV1CloudConfigsVsphereGetParamsWithContext creates a new V1CloudConfigsVsphereGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudConfigsVsphereGetParamsWithContext(ctx context.Context) *V1CloudConfigsVsphereGetParams { + var () + return &V1CloudConfigsVsphereGetParams{ + + Context: ctx, + } +} + +// NewV1CloudConfigsVsphereGetParamsWithHTTPClient creates a new V1CloudConfigsVsphereGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudConfigsVsphereGetParamsWithHTTPClient(client *http.Client) *V1CloudConfigsVsphereGetParams { + var () + return &V1CloudConfigsVsphereGetParams{ + HTTPClient: client, + } +} + +/* +V1CloudConfigsVsphereGetParams contains all the parameters to send to the API endpoint +for the v1 cloud configs vsphere get operation typically these are written to a http.Request +*/ +type V1CloudConfigsVsphereGetParams struct { + + /*ConfigUID + Cluster's cloud config uid + + */ + ConfigUID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud configs vsphere get params +func (o *V1CloudConfigsVsphereGetParams) WithTimeout(timeout time.Duration) *V1CloudConfigsVsphereGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud configs vsphere get params +func (o *V1CloudConfigsVsphereGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud configs vsphere get params +func (o *V1CloudConfigsVsphereGetParams) WithContext(ctx context.Context) *V1CloudConfigsVsphereGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud configs vsphere get params +func (o *V1CloudConfigsVsphereGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud configs vsphere get params +func (o *V1CloudConfigsVsphereGetParams) WithHTTPClient(client *http.Client) *V1CloudConfigsVsphereGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud configs vsphere get params +func (o *V1CloudConfigsVsphereGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithConfigUID adds the configUID to the v1 cloud configs vsphere get params +func (o *V1CloudConfigsVsphereGetParams) WithConfigUID(configUID string) *V1CloudConfigsVsphereGetParams { + o.SetConfigUID(configUID) + return o +} + +// SetConfigUID adds the configUid to the v1 cloud configs vsphere get params +func (o *V1CloudConfigsVsphereGetParams) SetConfigUID(configUID string) { + o.ConfigUID = configUID +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudConfigsVsphereGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param configUid + if err := r.SetPathParam("configUid", o.ConfigUID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_configs_vsphere_get_responses.go b/api/client/v1/v1_cloud_configs_vsphere_get_responses.go new file mode 100644 index 00000000..b0ce2867 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_vsphere_get_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1CloudConfigsVsphereGetReader is a Reader for the V1CloudConfigsVsphereGet structure. +type V1CloudConfigsVsphereGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudConfigsVsphereGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1CloudConfigsVsphereGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudConfigsVsphereGetOK creates a V1CloudConfigsVsphereGetOK with default headers values +func NewV1CloudConfigsVsphereGetOK() *V1CloudConfigsVsphereGetOK { + return &V1CloudConfigsVsphereGetOK{} +} + +/* +V1CloudConfigsVsphereGetOK handles this case with default header values. + +OK +*/ +type V1CloudConfigsVsphereGetOK struct { + Payload *models.V1VsphereCloudConfig +} + +func (o *V1CloudConfigsVsphereGetOK) Error() string { + return fmt.Sprintf("[GET /v1/cloudconfigs/vsphere/{configUid}][%d] v1CloudConfigsVsphereGetOK %+v", 200, o.Payload) +} + +func (o *V1CloudConfigsVsphereGetOK) GetPayload() *models.V1VsphereCloudConfig { + return o.Payload +} + +func (o *V1CloudConfigsVsphereGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1VsphereCloudConfig) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_cloud_configs_vsphere_machine_pool_create_parameters.go b/api/client/v1/v1_cloud_configs_vsphere_machine_pool_create_parameters.go new file mode 100644 index 00000000..d417cf85 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_vsphere_machine_pool_create_parameters.go @@ -0,0 +1,157 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1CloudConfigsVsphereMachinePoolCreateParams creates a new V1CloudConfigsVsphereMachinePoolCreateParams object +// with the default values initialized. +func NewV1CloudConfigsVsphereMachinePoolCreateParams() *V1CloudConfigsVsphereMachinePoolCreateParams { + var () + return &V1CloudConfigsVsphereMachinePoolCreateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudConfigsVsphereMachinePoolCreateParamsWithTimeout creates a new V1CloudConfigsVsphereMachinePoolCreateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudConfigsVsphereMachinePoolCreateParamsWithTimeout(timeout time.Duration) *V1CloudConfigsVsphereMachinePoolCreateParams { + var () + return &V1CloudConfigsVsphereMachinePoolCreateParams{ + + timeout: timeout, + } +} + +// NewV1CloudConfigsVsphereMachinePoolCreateParamsWithContext creates a new V1CloudConfigsVsphereMachinePoolCreateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudConfigsVsphereMachinePoolCreateParamsWithContext(ctx context.Context) *V1CloudConfigsVsphereMachinePoolCreateParams { + var () + return &V1CloudConfigsVsphereMachinePoolCreateParams{ + + Context: ctx, + } +} + +// NewV1CloudConfigsVsphereMachinePoolCreateParamsWithHTTPClient creates a new V1CloudConfigsVsphereMachinePoolCreateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudConfigsVsphereMachinePoolCreateParamsWithHTTPClient(client *http.Client) *V1CloudConfigsVsphereMachinePoolCreateParams { + var () + return &V1CloudConfigsVsphereMachinePoolCreateParams{ + HTTPClient: client, + } +} + +/* +V1CloudConfigsVsphereMachinePoolCreateParams contains all the parameters to send to the API endpoint +for the v1 cloud configs vsphere machine pool create operation typically these are written to a http.Request +*/ +type V1CloudConfigsVsphereMachinePoolCreateParams struct { + + /*Body*/ + Body *models.V1VsphereMachinePoolConfigEntity + /*ConfigUID + Cluster's cloud config uid + + */ + ConfigUID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud configs vsphere machine pool create params +func (o *V1CloudConfigsVsphereMachinePoolCreateParams) WithTimeout(timeout time.Duration) *V1CloudConfigsVsphereMachinePoolCreateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud configs vsphere machine pool create params +func (o *V1CloudConfigsVsphereMachinePoolCreateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud configs vsphere machine pool create params +func (o *V1CloudConfigsVsphereMachinePoolCreateParams) WithContext(ctx context.Context) *V1CloudConfigsVsphereMachinePoolCreateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud configs vsphere machine pool create params +func (o *V1CloudConfigsVsphereMachinePoolCreateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud configs vsphere machine pool create params +func (o *V1CloudConfigsVsphereMachinePoolCreateParams) WithHTTPClient(client *http.Client) *V1CloudConfigsVsphereMachinePoolCreateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud configs vsphere machine pool create params +func (o *V1CloudConfigsVsphereMachinePoolCreateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 cloud configs vsphere machine pool create params +func (o *V1CloudConfigsVsphereMachinePoolCreateParams) WithBody(body *models.V1VsphereMachinePoolConfigEntity) *V1CloudConfigsVsphereMachinePoolCreateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 cloud configs vsphere machine pool create params +func (o *V1CloudConfigsVsphereMachinePoolCreateParams) SetBody(body *models.V1VsphereMachinePoolConfigEntity) { + o.Body = body +} + +// WithConfigUID adds the configUID to the v1 cloud configs vsphere machine pool create params +func (o *V1CloudConfigsVsphereMachinePoolCreateParams) WithConfigUID(configUID string) *V1CloudConfigsVsphereMachinePoolCreateParams { + o.SetConfigUID(configUID) + return o +} + +// SetConfigUID adds the configUid to the v1 cloud configs vsphere machine pool create params +func (o *V1CloudConfigsVsphereMachinePoolCreateParams) SetConfigUID(configUID string) { + o.ConfigUID = configUID +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudConfigsVsphereMachinePoolCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param configUid + if err := r.SetPathParam("configUid", o.ConfigUID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_configs_vsphere_machine_pool_create_responses.go b/api/client/v1/v1_cloud_configs_vsphere_machine_pool_create_responses.go new file mode 100644 index 00000000..a32b2523 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_vsphere_machine_pool_create_responses.go @@ -0,0 +1,77 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1CloudConfigsVsphereMachinePoolCreateReader is a Reader for the V1CloudConfigsVsphereMachinePoolCreate structure. +type V1CloudConfigsVsphereMachinePoolCreateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudConfigsVsphereMachinePoolCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 201: + result := NewV1CloudConfigsVsphereMachinePoolCreateCreated() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudConfigsVsphereMachinePoolCreateCreated creates a V1CloudConfigsVsphereMachinePoolCreateCreated with default headers values +func NewV1CloudConfigsVsphereMachinePoolCreateCreated() *V1CloudConfigsVsphereMachinePoolCreateCreated { + return &V1CloudConfigsVsphereMachinePoolCreateCreated{} +} + +/* +V1CloudConfigsVsphereMachinePoolCreateCreated handles this case with default header values. + +Created successfully +*/ +type V1CloudConfigsVsphereMachinePoolCreateCreated struct { + /*Audit uid for the request + */ + AuditUID string + + Payload *models.V1UID +} + +func (o *V1CloudConfigsVsphereMachinePoolCreateCreated) Error() string { + return fmt.Sprintf("[POST /v1/cloudconfigs/vsphere/{configUid}/machinePools][%d] v1CloudConfigsVsphereMachinePoolCreateCreated %+v", 201, o.Payload) +} + +func (o *V1CloudConfigsVsphereMachinePoolCreateCreated) GetPayload() *models.V1UID { + return o.Payload +} + +func (o *V1CloudConfigsVsphereMachinePoolCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header AuditUid + o.AuditUID = response.GetHeader("AuditUid") + + o.Payload = new(models.V1UID) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_cloud_configs_vsphere_machine_pool_delete_parameters.go b/api/client/v1/v1_cloud_configs_vsphere_machine_pool_delete_parameters.go new file mode 100644 index 00000000..bb25f101 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_vsphere_machine_pool_delete_parameters.go @@ -0,0 +1,157 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1CloudConfigsVsphereMachinePoolDeleteParams creates a new V1CloudConfigsVsphereMachinePoolDeleteParams object +// with the default values initialized. +func NewV1CloudConfigsVsphereMachinePoolDeleteParams() *V1CloudConfigsVsphereMachinePoolDeleteParams { + var () + return &V1CloudConfigsVsphereMachinePoolDeleteParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudConfigsVsphereMachinePoolDeleteParamsWithTimeout creates a new V1CloudConfigsVsphereMachinePoolDeleteParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudConfigsVsphereMachinePoolDeleteParamsWithTimeout(timeout time.Duration) *V1CloudConfigsVsphereMachinePoolDeleteParams { + var () + return &V1CloudConfigsVsphereMachinePoolDeleteParams{ + + timeout: timeout, + } +} + +// NewV1CloudConfigsVsphereMachinePoolDeleteParamsWithContext creates a new V1CloudConfigsVsphereMachinePoolDeleteParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudConfigsVsphereMachinePoolDeleteParamsWithContext(ctx context.Context) *V1CloudConfigsVsphereMachinePoolDeleteParams { + var () + return &V1CloudConfigsVsphereMachinePoolDeleteParams{ + + Context: ctx, + } +} + +// NewV1CloudConfigsVsphereMachinePoolDeleteParamsWithHTTPClient creates a new V1CloudConfigsVsphereMachinePoolDeleteParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudConfigsVsphereMachinePoolDeleteParamsWithHTTPClient(client *http.Client) *V1CloudConfigsVsphereMachinePoolDeleteParams { + var () + return &V1CloudConfigsVsphereMachinePoolDeleteParams{ + HTTPClient: client, + } +} + +/* +V1CloudConfigsVsphereMachinePoolDeleteParams contains all the parameters to send to the API endpoint +for the v1 cloud configs vsphere machine pool delete operation typically these are written to a http.Request +*/ +type V1CloudConfigsVsphereMachinePoolDeleteParams struct { + + /*ConfigUID + Cluster's cloud config uid + + */ + ConfigUID string + /*MachinePoolName + Machine pool name + + */ + MachinePoolName string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud configs vsphere machine pool delete params +func (o *V1CloudConfigsVsphereMachinePoolDeleteParams) WithTimeout(timeout time.Duration) *V1CloudConfigsVsphereMachinePoolDeleteParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud configs vsphere machine pool delete params +func (o *V1CloudConfigsVsphereMachinePoolDeleteParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud configs vsphere machine pool delete params +func (o *V1CloudConfigsVsphereMachinePoolDeleteParams) WithContext(ctx context.Context) *V1CloudConfigsVsphereMachinePoolDeleteParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud configs vsphere machine pool delete params +func (o *V1CloudConfigsVsphereMachinePoolDeleteParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud configs vsphere machine pool delete params +func (o *V1CloudConfigsVsphereMachinePoolDeleteParams) WithHTTPClient(client *http.Client) *V1CloudConfigsVsphereMachinePoolDeleteParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud configs vsphere machine pool delete params +func (o *V1CloudConfigsVsphereMachinePoolDeleteParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithConfigUID adds the configUID to the v1 cloud configs vsphere machine pool delete params +func (o *V1CloudConfigsVsphereMachinePoolDeleteParams) WithConfigUID(configUID string) *V1CloudConfigsVsphereMachinePoolDeleteParams { + o.SetConfigUID(configUID) + return o +} + +// SetConfigUID adds the configUid to the v1 cloud configs vsphere machine pool delete params +func (o *V1CloudConfigsVsphereMachinePoolDeleteParams) SetConfigUID(configUID string) { + o.ConfigUID = configUID +} + +// WithMachinePoolName adds the machinePoolName to the v1 cloud configs vsphere machine pool delete params +func (o *V1CloudConfigsVsphereMachinePoolDeleteParams) WithMachinePoolName(machinePoolName string) *V1CloudConfigsVsphereMachinePoolDeleteParams { + o.SetMachinePoolName(machinePoolName) + return o +} + +// SetMachinePoolName adds the machinePoolName to the v1 cloud configs vsphere machine pool delete params +func (o *V1CloudConfigsVsphereMachinePoolDeleteParams) SetMachinePoolName(machinePoolName string) { + o.MachinePoolName = machinePoolName +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudConfigsVsphereMachinePoolDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param configUid + if err := r.SetPathParam("configUid", o.ConfigUID); err != nil { + return err + } + + // path param machinePoolName + if err := r.SetPathParam("machinePoolName", o.MachinePoolName); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_configs_vsphere_machine_pool_delete_responses.go b/api/client/v1/v1_cloud_configs_vsphere_machine_pool_delete_responses.go new file mode 100644 index 00000000..62a204d7 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_vsphere_machine_pool_delete_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1CloudConfigsVsphereMachinePoolDeleteReader is a Reader for the V1CloudConfigsVsphereMachinePoolDelete structure. +type V1CloudConfigsVsphereMachinePoolDeleteReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudConfigsVsphereMachinePoolDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1CloudConfigsVsphereMachinePoolDeleteNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudConfigsVsphereMachinePoolDeleteNoContent creates a V1CloudConfigsVsphereMachinePoolDeleteNoContent with default headers values +func NewV1CloudConfigsVsphereMachinePoolDeleteNoContent() *V1CloudConfigsVsphereMachinePoolDeleteNoContent { + return &V1CloudConfigsVsphereMachinePoolDeleteNoContent{} +} + +/* +V1CloudConfigsVsphereMachinePoolDeleteNoContent handles this case with default header values. + +The resource was deleted successfully +*/ +type V1CloudConfigsVsphereMachinePoolDeleteNoContent struct { +} + +func (o *V1CloudConfigsVsphereMachinePoolDeleteNoContent) Error() string { + return fmt.Sprintf("[DELETE /v1/cloudconfigs/vsphere/{configUid}/machinePools/{machinePoolName}][%d] v1CloudConfigsVsphereMachinePoolDeleteNoContent ", 204) +} + +func (o *V1CloudConfigsVsphereMachinePoolDeleteNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_cloud_configs_vsphere_machine_pool_update_parameters.go b/api/client/v1/v1_cloud_configs_vsphere_machine_pool_update_parameters.go new file mode 100644 index 00000000..ddde3a04 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_vsphere_machine_pool_update_parameters.go @@ -0,0 +1,178 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1CloudConfigsVsphereMachinePoolUpdateParams creates a new V1CloudConfigsVsphereMachinePoolUpdateParams object +// with the default values initialized. +func NewV1CloudConfigsVsphereMachinePoolUpdateParams() *V1CloudConfigsVsphereMachinePoolUpdateParams { + var () + return &V1CloudConfigsVsphereMachinePoolUpdateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudConfigsVsphereMachinePoolUpdateParamsWithTimeout creates a new V1CloudConfigsVsphereMachinePoolUpdateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudConfigsVsphereMachinePoolUpdateParamsWithTimeout(timeout time.Duration) *V1CloudConfigsVsphereMachinePoolUpdateParams { + var () + return &V1CloudConfigsVsphereMachinePoolUpdateParams{ + + timeout: timeout, + } +} + +// NewV1CloudConfigsVsphereMachinePoolUpdateParamsWithContext creates a new V1CloudConfigsVsphereMachinePoolUpdateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudConfigsVsphereMachinePoolUpdateParamsWithContext(ctx context.Context) *V1CloudConfigsVsphereMachinePoolUpdateParams { + var () + return &V1CloudConfigsVsphereMachinePoolUpdateParams{ + + Context: ctx, + } +} + +// NewV1CloudConfigsVsphereMachinePoolUpdateParamsWithHTTPClient creates a new V1CloudConfigsVsphereMachinePoolUpdateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudConfigsVsphereMachinePoolUpdateParamsWithHTTPClient(client *http.Client) *V1CloudConfigsVsphereMachinePoolUpdateParams { + var () + return &V1CloudConfigsVsphereMachinePoolUpdateParams{ + HTTPClient: client, + } +} + +/* +V1CloudConfigsVsphereMachinePoolUpdateParams contains all the parameters to send to the API endpoint +for the v1 cloud configs vsphere machine pool update operation typically these are written to a http.Request +*/ +type V1CloudConfigsVsphereMachinePoolUpdateParams struct { + + /*Body*/ + Body *models.V1VsphereMachinePoolConfigEntity + /*ConfigUID + Cluster's cloud config uid + + */ + ConfigUID string + /*MachinePoolName + Machine pool name + + */ + MachinePoolName string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud configs vsphere machine pool update params +func (o *V1CloudConfigsVsphereMachinePoolUpdateParams) WithTimeout(timeout time.Duration) *V1CloudConfigsVsphereMachinePoolUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud configs vsphere machine pool update params +func (o *V1CloudConfigsVsphereMachinePoolUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud configs vsphere machine pool update params +func (o *V1CloudConfigsVsphereMachinePoolUpdateParams) WithContext(ctx context.Context) *V1CloudConfigsVsphereMachinePoolUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud configs vsphere machine pool update params +func (o *V1CloudConfigsVsphereMachinePoolUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud configs vsphere machine pool update params +func (o *V1CloudConfigsVsphereMachinePoolUpdateParams) WithHTTPClient(client *http.Client) *V1CloudConfigsVsphereMachinePoolUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud configs vsphere machine pool update params +func (o *V1CloudConfigsVsphereMachinePoolUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 cloud configs vsphere machine pool update params +func (o *V1CloudConfigsVsphereMachinePoolUpdateParams) WithBody(body *models.V1VsphereMachinePoolConfigEntity) *V1CloudConfigsVsphereMachinePoolUpdateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 cloud configs vsphere machine pool update params +func (o *V1CloudConfigsVsphereMachinePoolUpdateParams) SetBody(body *models.V1VsphereMachinePoolConfigEntity) { + o.Body = body +} + +// WithConfigUID adds the configUID to the v1 cloud configs vsphere machine pool update params +func (o *V1CloudConfigsVsphereMachinePoolUpdateParams) WithConfigUID(configUID string) *V1CloudConfigsVsphereMachinePoolUpdateParams { + o.SetConfigUID(configUID) + return o +} + +// SetConfigUID adds the configUid to the v1 cloud configs vsphere machine pool update params +func (o *V1CloudConfigsVsphereMachinePoolUpdateParams) SetConfigUID(configUID string) { + o.ConfigUID = configUID +} + +// WithMachinePoolName adds the machinePoolName to the v1 cloud configs vsphere machine pool update params +func (o *V1CloudConfigsVsphereMachinePoolUpdateParams) WithMachinePoolName(machinePoolName string) *V1CloudConfigsVsphereMachinePoolUpdateParams { + o.SetMachinePoolName(machinePoolName) + return o +} + +// SetMachinePoolName adds the machinePoolName to the v1 cloud configs vsphere machine pool update params +func (o *V1CloudConfigsVsphereMachinePoolUpdateParams) SetMachinePoolName(machinePoolName string) { + o.MachinePoolName = machinePoolName +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudConfigsVsphereMachinePoolUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param configUid + if err := r.SetPathParam("configUid", o.ConfigUID); err != nil { + return err + } + + // path param machinePoolName + if err := r.SetPathParam("machinePoolName", o.MachinePoolName); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_configs_vsphere_machine_pool_update_responses.go b/api/client/v1/v1_cloud_configs_vsphere_machine_pool_update_responses.go new file mode 100644 index 00000000..a7442671 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_vsphere_machine_pool_update_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1CloudConfigsVsphereMachinePoolUpdateReader is a Reader for the V1CloudConfigsVsphereMachinePoolUpdate structure. +type V1CloudConfigsVsphereMachinePoolUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudConfigsVsphereMachinePoolUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1CloudConfigsVsphereMachinePoolUpdateNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudConfigsVsphereMachinePoolUpdateNoContent creates a V1CloudConfigsVsphereMachinePoolUpdateNoContent with default headers values +func NewV1CloudConfigsVsphereMachinePoolUpdateNoContent() *V1CloudConfigsVsphereMachinePoolUpdateNoContent { + return &V1CloudConfigsVsphereMachinePoolUpdateNoContent{} +} + +/* +V1CloudConfigsVsphereMachinePoolUpdateNoContent handles this case with default header values. + +The resource was updated successfully +*/ +type V1CloudConfigsVsphereMachinePoolUpdateNoContent struct { +} + +func (o *V1CloudConfigsVsphereMachinePoolUpdateNoContent) Error() string { + return fmt.Sprintf("[PUT /v1/cloudconfigs/vsphere/{configUid}/machinePools/{machinePoolName}][%d] v1CloudConfigsVsphereMachinePoolUpdateNoContent ", 204) +} + +func (o *V1CloudConfigsVsphereMachinePoolUpdateNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_cloud_configs_vsphere_pool_machines_add_parameters.go b/api/client/v1/v1_cloud_configs_vsphere_pool_machines_add_parameters.go new file mode 100644 index 00000000..18046754 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_vsphere_pool_machines_add_parameters.go @@ -0,0 +1,178 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1CloudConfigsVspherePoolMachinesAddParams creates a new V1CloudConfigsVspherePoolMachinesAddParams object +// with the default values initialized. +func NewV1CloudConfigsVspherePoolMachinesAddParams() *V1CloudConfigsVspherePoolMachinesAddParams { + var () + return &V1CloudConfigsVspherePoolMachinesAddParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudConfigsVspherePoolMachinesAddParamsWithTimeout creates a new V1CloudConfigsVspherePoolMachinesAddParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudConfigsVspherePoolMachinesAddParamsWithTimeout(timeout time.Duration) *V1CloudConfigsVspherePoolMachinesAddParams { + var () + return &V1CloudConfigsVspherePoolMachinesAddParams{ + + timeout: timeout, + } +} + +// NewV1CloudConfigsVspherePoolMachinesAddParamsWithContext creates a new V1CloudConfigsVspherePoolMachinesAddParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudConfigsVspherePoolMachinesAddParamsWithContext(ctx context.Context) *V1CloudConfigsVspherePoolMachinesAddParams { + var () + return &V1CloudConfigsVspherePoolMachinesAddParams{ + + Context: ctx, + } +} + +// NewV1CloudConfigsVspherePoolMachinesAddParamsWithHTTPClient creates a new V1CloudConfigsVspherePoolMachinesAddParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudConfigsVspherePoolMachinesAddParamsWithHTTPClient(client *http.Client) *V1CloudConfigsVspherePoolMachinesAddParams { + var () + return &V1CloudConfigsVspherePoolMachinesAddParams{ + HTTPClient: client, + } +} + +/* +V1CloudConfigsVspherePoolMachinesAddParams contains all the parameters to send to the API endpoint +for the v1 cloud configs vsphere pool machines add operation typically these are written to a http.Request +*/ +type V1CloudConfigsVspherePoolMachinesAddParams struct { + + /*Body*/ + Body *models.V1VsphereMachine + /*ConfigUID + Cluster's cloud config uid + + */ + ConfigUID string + /*MachinePoolName + Machine pool name + + */ + MachinePoolName string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud configs vsphere pool machines add params +func (o *V1CloudConfigsVspherePoolMachinesAddParams) WithTimeout(timeout time.Duration) *V1CloudConfigsVspherePoolMachinesAddParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud configs vsphere pool machines add params +func (o *V1CloudConfigsVspherePoolMachinesAddParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud configs vsphere pool machines add params +func (o *V1CloudConfigsVspherePoolMachinesAddParams) WithContext(ctx context.Context) *V1CloudConfigsVspherePoolMachinesAddParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud configs vsphere pool machines add params +func (o *V1CloudConfigsVspherePoolMachinesAddParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud configs vsphere pool machines add params +func (o *V1CloudConfigsVspherePoolMachinesAddParams) WithHTTPClient(client *http.Client) *V1CloudConfigsVspherePoolMachinesAddParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud configs vsphere pool machines add params +func (o *V1CloudConfigsVspherePoolMachinesAddParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 cloud configs vsphere pool machines add params +func (o *V1CloudConfigsVspherePoolMachinesAddParams) WithBody(body *models.V1VsphereMachine) *V1CloudConfigsVspherePoolMachinesAddParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 cloud configs vsphere pool machines add params +func (o *V1CloudConfigsVspherePoolMachinesAddParams) SetBody(body *models.V1VsphereMachine) { + o.Body = body +} + +// WithConfigUID adds the configUID to the v1 cloud configs vsphere pool machines add params +func (o *V1CloudConfigsVspherePoolMachinesAddParams) WithConfigUID(configUID string) *V1CloudConfigsVspherePoolMachinesAddParams { + o.SetConfigUID(configUID) + return o +} + +// SetConfigUID adds the configUid to the v1 cloud configs vsphere pool machines add params +func (o *V1CloudConfigsVspherePoolMachinesAddParams) SetConfigUID(configUID string) { + o.ConfigUID = configUID +} + +// WithMachinePoolName adds the machinePoolName to the v1 cloud configs vsphere pool machines add params +func (o *V1CloudConfigsVspherePoolMachinesAddParams) WithMachinePoolName(machinePoolName string) *V1CloudConfigsVspherePoolMachinesAddParams { + o.SetMachinePoolName(machinePoolName) + return o +} + +// SetMachinePoolName adds the machinePoolName to the v1 cloud configs vsphere pool machines add params +func (o *V1CloudConfigsVspherePoolMachinesAddParams) SetMachinePoolName(machinePoolName string) { + o.MachinePoolName = machinePoolName +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudConfigsVspherePoolMachinesAddParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param configUid + if err := r.SetPathParam("configUid", o.ConfigUID); err != nil { + return err + } + + // path param machinePoolName + if err := r.SetPathParam("machinePoolName", o.MachinePoolName); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_configs_vsphere_pool_machines_add_responses.go b/api/client/v1/v1_cloud_configs_vsphere_pool_machines_add_responses.go new file mode 100644 index 00000000..eabd7b79 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_vsphere_pool_machines_add_responses.go @@ -0,0 +1,77 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1CloudConfigsVspherePoolMachinesAddReader is a Reader for the V1CloudConfigsVspherePoolMachinesAdd structure. +type V1CloudConfigsVspherePoolMachinesAddReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudConfigsVspherePoolMachinesAddReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 201: + result := NewV1CloudConfigsVspherePoolMachinesAddCreated() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudConfigsVspherePoolMachinesAddCreated creates a V1CloudConfigsVspherePoolMachinesAddCreated with default headers values +func NewV1CloudConfigsVspherePoolMachinesAddCreated() *V1CloudConfigsVspherePoolMachinesAddCreated { + return &V1CloudConfigsVspherePoolMachinesAddCreated{} +} + +/* +V1CloudConfigsVspherePoolMachinesAddCreated handles this case with default header values. + +Created successfully +*/ +type V1CloudConfigsVspherePoolMachinesAddCreated struct { + /*Audit uid for the request + */ + AuditUID string + + Payload *models.V1UID +} + +func (o *V1CloudConfigsVspherePoolMachinesAddCreated) Error() string { + return fmt.Sprintf("[POST /v1/cloudconfigs/vsphere/{configUid}/machinePools/{machinePoolName}/machines][%d] v1CloudConfigsVspherePoolMachinesAddCreated %+v", 201, o.Payload) +} + +func (o *V1CloudConfigsVspherePoolMachinesAddCreated) GetPayload() *models.V1UID { + return o.Payload +} + +func (o *V1CloudConfigsVspherePoolMachinesAddCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header AuditUid + o.AuditUID = response.GetHeader("AuditUid") + + o.Payload = new(models.V1UID) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_cloud_configs_vsphere_pool_machines_list_parameters.go b/api/client/v1/v1_cloud_configs_vsphere_pool_machines_list_parameters.go new file mode 100644 index 00000000..69f94172 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_vsphere_pool_machines_list_parameters.go @@ -0,0 +1,365 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// NewV1CloudConfigsVspherePoolMachinesListParams creates a new V1CloudConfigsVspherePoolMachinesListParams object +// with the default values initialized. +func NewV1CloudConfigsVspherePoolMachinesListParams() *V1CloudConfigsVspherePoolMachinesListParams { + var ( + limitDefault = int64(50) + ) + return &V1CloudConfigsVspherePoolMachinesListParams{ + Limit: &limitDefault, + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudConfigsVspherePoolMachinesListParamsWithTimeout creates a new V1CloudConfigsVspherePoolMachinesListParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudConfigsVspherePoolMachinesListParamsWithTimeout(timeout time.Duration) *V1CloudConfigsVspherePoolMachinesListParams { + var ( + limitDefault = int64(50) + ) + return &V1CloudConfigsVspherePoolMachinesListParams{ + Limit: &limitDefault, + + timeout: timeout, + } +} + +// NewV1CloudConfigsVspherePoolMachinesListParamsWithContext creates a new V1CloudConfigsVspherePoolMachinesListParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudConfigsVspherePoolMachinesListParamsWithContext(ctx context.Context) *V1CloudConfigsVspherePoolMachinesListParams { + var ( + limitDefault = int64(50) + ) + return &V1CloudConfigsVspherePoolMachinesListParams{ + Limit: &limitDefault, + + Context: ctx, + } +} + +// NewV1CloudConfigsVspherePoolMachinesListParamsWithHTTPClient creates a new V1CloudConfigsVspherePoolMachinesListParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudConfigsVspherePoolMachinesListParamsWithHTTPClient(client *http.Client) *V1CloudConfigsVspherePoolMachinesListParams { + var ( + limitDefault = int64(50) + ) + return &V1CloudConfigsVspherePoolMachinesListParams{ + Limit: &limitDefault, + HTTPClient: client, + } +} + +/* +V1CloudConfigsVspherePoolMachinesListParams contains all the parameters to send to the API endpoint +for the v1 cloud configs vsphere pool machines list operation typically these are written to a http.Request +*/ +type V1CloudConfigsVspherePoolMachinesListParams struct { + + /*ConfigUID + Cluster's cloud config uid + + */ + ConfigUID string + /*Continue + continue token to paginate the subsequent data items + + */ + Continue *string + /*Fields + Set of fields to be presented in the response with values. The fields are comma separated. Eg: metadata.uid,metadata.name + + */ + Fields *string + /*Filters + Filters can be combined with AND, OR operators with field path name. Eg: metadata.name=TestServiceANDspec.cloudType=aws + + Server will be restricted to certain fields based on the indexed data for each resource. + + */ + Filters *string + /*Limit + limit is a maximum number of responses to return for a list call. Default and maximum value of the limit is 50. + If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. + + */ + Limit *int64 + /*MachinePoolName + Machine pool name + + */ + MachinePoolName string + /*Offset + offset is the next index number from which the response will start. The response offset value can be used along with continue token for the pagination. + + */ + Offset *int64 + /*OrderBy + Specify the fields with sort order. 1 indicates ascending and -1 for descending. Eg: orderBy=metadata.name=1,metadata.uid=-1 + + */ + OrderBy *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud configs vsphere pool machines list params +func (o *V1CloudConfigsVspherePoolMachinesListParams) WithTimeout(timeout time.Duration) *V1CloudConfigsVspherePoolMachinesListParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud configs vsphere pool machines list params +func (o *V1CloudConfigsVspherePoolMachinesListParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud configs vsphere pool machines list params +func (o *V1CloudConfigsVspherePoolMachinesListParams) WithContext(ctx context.Context) *V1CloudConfigsVspherePoolMachinesListParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud configs vsphere pool machines list params +func (o *V1CloudConfigsVspherePoolMachinesListParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud configs vsphere pool machines list params +func (o *V1CloudConfigsVspherePoolMachinesListParams) WithHTTPClient(client *http.Client) *V1CloudConfigsVspherePoolMachinesListParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud configs vsphere pool machines list params +func (o *V1CloudConfigsVspherePoolMachinesListParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithConfigUID adds the configUID to the v1 cloud configs vsphere pool machines list params +func (o *V1CloudConfigsVspherePoolMachinesListParams) WithConfigUID(configUID string) *V1CloudConfigsVspherePoolMachinesListParams { + o.SetConfigUID(configUID) + return o +} + +// SetConfigUID adds the configUid to the v1 cloud configs vsphere pool machines list params +func (o *V1CloudConfigsVspherePoolMachinesListParams) SetConfigUID(configUID string) { + o.ConfigUID = configUID +} + +// WithContinue adds the continueVar to the v1 cloud configs vsphere pool machines list params +func (o *V1CloudConfigsVspherePoolMachinesListParams) WithContinue(continueVar *string) *V1CloudConfigsVspherePoolMachinesListParams { + o.SetContinue(continueVar) + return o +} + +// SetContinue adds the continue to the v1 cloud configs vsphere pool machines list params +func (o *V1CloudConfigsVspherePoolMachinesListParams) SetContinue(continueVar *string) { + o.Continue = continueVar +} + +// WithFields adds the fields to the v1 cloud configs vsphere pool machines list params +func (o *V1CloudConfigsVspherePoolMachinesListParams) WithFields(fields *string) *V1CloudConfigsVspherePoolMachinesListParams { + o.SetFields(fields) + return o +} + +// SetFields adds the fields to the v1 cloud configs vsphere pool machines list params +func (o *V1CloudConfigsVspherePoolMachinesListParams) SetFields(fields *string) { + o.Fields = fields +} + +// WithFilters adds the filters to the v1 cloud configs vsphere pool machines list params +func (o *V1CloudConfigsVspherePoolMachinesListParams) WithFilters(filters *string) *V1CloudConfigsVspherePoolMachinesListParams { + o.SetFilters(filters) + return o +} + +// SetFilters adds the filters to the v1 cloud configs vsphere pool machines list params +func (o *V1CloudConfigsVspherePoolMachinesListParams) SetFilters(filters *string) { + o.Filters = filters +} + +// WithLimit adds the limit to the v1 cloud configs vsphere pool machines list params +func (o *V1CloudConfigsVspherePoolMachinesListParams) WithLimit(limit *int64) *V1CloudConfigsVspherePoolMachinesListParams { + o.SetLimit(limit) + return o +} + +// SetLimit adds the limit to the v1 cloud configs vsphere pool machines list params +func (o *V1CloudConfigsVspherePoolMachinesListParams) SetLimit(limit *int64) { + o.Limit = limit +} + +// WithMachinePoolName adds the machinePoolName to the v1 cloud configs vsphere pool machines list params +func (o *V1CloudConfigsVspherePoolMachinesListParams) WithMachinePoolName(machinePoolName string) *V1CloudConfigsVspherePoolMachinesListParams { + o.SetMachinePoolName(machinePoolName) + return o +} + +// SetMachinePoolName adds the machinePoolName to the v1 cloud configs vsphere pool machines list params +func (o *V1CloudConfigsVspherePoolMachinesListParams) SetMachinePoolName(machinePoolName string) { + o.MachinePoolName = machinePoolName +} + +// WithOffset adds the offset to the v1 cloud configs vsphere pool machines list params +func (o *V1CloudConfigsVspherePoolMachinesListParams) WithOffset(offset *int64) *V1CloudConfigsVspherePoolMachinesListParams { + o.SetOffset(offset) + return o +} + +// SetOffset adds the offset to the v1 cloud configs vsphere pool machines list params +func (o *V1CloudConfigsVspherePoolMachinesListParams) SetOffset(offset *int64) { + o.Offset = offset +} + +// WithOrderBy adds the orderBy to the v1 cloud configs vsphere pool machines list params +func (o *V1CloudConfigsVspherePoolMachinesListParams) WithOrderBy(orderBy *string) *V1CloudConfigsVspherePoolMachinesListParams { + o.SetOrderBy(orderBy) + return o +} + +// SetOrderBy adds the orderBy to the v1 cloud configs vsphere pool machines list params +func (o *V1CloudConfigsVspherePoolMachinesListParams) SetOrderBy(orderBy *string) { + o.OrderBy = orderBy +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudConfigsVspherePoolMachinesListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param configUid + if err := r.SetPathParam("configUid", o.ConfigUID); err != nil { + return err + } + + if o.Continue != nil { + + // query param continue + var qrContinue string + if o.Continue != nil { + qrContinue = *o.Continue + } + qContinue := qrContinue + if qContinue != "" { + if err := r.SetQueryParam("continue", qContinue); err != nil { + return err + } + } + + } + + if o.Fields != nil { + + // query param fields + var qrFields string + if o.Fields != nil { + qrFields = *o.Fields + } + qFields := qrFields + if qFields != "" { + if err := r.SetQueryParam("fields", qFields); err != nil { + return err + } + } + + } + + if o.Filters != nil { + + // query param filters + var qrFilters string + if o.Filters != nil { + qrFilters = *o.Filters + } + qFilters := qrFilters + if qFilters != "" { + if err := r.SetQueryParam("filters", qFilters); err != nil { + return err + } + } + + } + + if o.Limit != nil { + + // query param limit + var qrLimit int64 + if o.Limit != nil { + qrLimit = *o.Limit + } + qLimit := swag.FormatInt64(qrLimit) + if qLimit != "" { + if err := r.SetQueryParam("limit", qLimit); err != nil { + return err + } + } + + } + + // path param machinePoolName + if err := r.SetPathParam("machinePoolName", o.MachinePoolName); err != nil { + return err + } + + if o.Offset != nil { + + // query param offset + var qrOffset int64 + if o.Offset != nil { + qrOffset = *o.Offset + } + qOffset := swag.FormatInt64(qrOffset) + if qOffset != "" { + if err := r.SetQueryParam("offset", qOffset); err != nil { + return err + } + } + + } + + if o.OrderBy != nil { + + // query param orderBy + var qrOrderBy string + if o.OrderBy != nil { + qrOrderBy = *o.OrderBy + } + qOrderBy := qrOrderBy + if qOrderBy != "" { + if err := r.SetQueryParam("orderBy", qOrderBy); err != nil { + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_configs_vsphere_pool_machines_list_responses.go b/api/client/v1/v1_cloud_configs_vsphere_pool_machines_list_responses.go new file mode 100644 index 00000000..78ec6be7 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_vsphere_pool_machines_list_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1CloudConfigsVspherePoolMachinesListReader is a Reader for the V1CloudConfigsVspherePoolMachinesList structure. +type V1CloudConfigsVspherePoolMachinesListReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudConfigsVspherePoolMachinesListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1CloudConfigsVspherePoolMachinesListOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudConfigsVspherePoolMachinesListOK creates a V1CloudConfigsVspherePoolMachinesListOK with default headers values +func NewV1CloudConfigsVspherePoolMachinesListOK() *V1CloudConfigsVspherePoolMachinesListOK { + return &V1CloudConfigsVspherePoolMachinesListOK{} +} + +/* +V1CloudConfigsVspherePoolMachinesListOK handles this case with default header values. + +An array of vSphere machine items +*/ +type V1CloudConfigsVspherePoolMachinesListOK struct { + Payload *models.V1VsphereMachines +} + +func (o *V1CloudConfigsVspherePoolMachinesListOK) Error() string { + return fmt.Sprintf("[GET /v1/cloudconfigs/vsphere/{configUid}/machinePools/{machinePoolName}/machines][%d] v1CloudConfigsVspherePoolMachinesListOK %+v", 200, o.Payload) +} + +func (o *V1CloudConfigsVspherePoolMachinesListOK) GetPayload() *models.V1VsphereMachines { + return o.Payload +} + +func (o *V1CloudConfigsVspherePoolMachinesListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1VsphereMachines) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_cloud_configs_vsphere_pool_machines_uid_delete_parameters.go b/api/client/v1/v1_cloud_configs_vsphere_pool_machines_uid_delete_parameters.go new file mode 100644 index 00000000..60c378c7 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_vsphere_pool_machines_uid_delete_parameters.go @@ -0,0 +1,178 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1CloudConfigsVspherePoolMachinesUIDDeleteParams creates a new V1CloudConfigsVspherePoolMachinesUIDDeleteParams object +// with the default values initialized. +func NewV1CloudConfigsVspherePoolMachinesUIDDeleteParams() *V1CloudConfigsVspherePoolMachinesUIDDeleteParams { + var () + return &V1CloudConfigsVspherePoolMachinesUIDDeleteParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudConfigsVspherePoolMachinesUIDDeleteParamsWithTimeout creates a new V1CloudConfigsVspherePoolMachinesUIDDeleteParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudConfigsVspherePoolMachinesUIDDeleteParamsWithTimeout(timeout time.Duration) *V1CloudConfigsVspherePoolMachinesUIDDeleteParams { + var () + return &V1CloudConfigsVspherePoolMachinesUIDDeleteParams{ + + timeout: timeout, + } +} + +// NewV1CloudConfigsVspherePoolMachinesUIDDeleteParamsWithContext creates a new V1CloudConfigsVspherePoolMachinesUIDDeleteParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudConfigsVspherePoolMachinesUIDDeleteParamsWithContext(ctx context.Context) *V1CloudConfigsVspherePoolMachinesUIDDeleteParams { + var () + return &V1CloudConfigsVspherePoolMachinesUIDDeleteParams{ + + Context: ctx, + } +} + +// NewV1CloudConfigsVspherePoolMachinesUIDDeleteParamsWithHTTPClient creates a new V1CloudConfigsVspherePoolMachinesUIDDeleteParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudConfigsVspherePoolMachinesUIDDeleteParamsWithHTTPClient(client *http.Client) *V1CloudConfigsVspherePoolMachinesUIDDeleteParams { + var () + return &V1CloudConfigsVspherePoolMachinesUIDDeleteParams{ + HTTPClient: client, + } +} + +/* +V1CloudConfigsVspherePoolMachinesUIDDeleteParams contains all the parameters to send to the API endpoint +for the v1 cloud configs vsphere pool machines Uid delete operation typically these are written to a http.Request +*/ +type V1CloudConfigsVspherePoolMachinesUIDDeleteParams struct { + + /*ConfigUID + Cluster's cloud config uid + + */ + ConfigUID string + /*MachinePoolName + Machine pool name + + */ + MachinePoolName string + /*MachineUID + Machine uid + + */ + MachineUID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud configs vsphere pool machines Uid delete params +func (o *V1CloudConfigsVspherePoolMachinesUIDDeleteParams) WithTimeout(timeout time.Duration) *V1CloudConfigsVspherePoolMachinesUIDDeleteParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud configs vsphere pool machines Uid delete params +func (o *V1CloudConfigsVspherePoolMachinesUIDDeleteParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud configs vsphere pool machines Uid delete params +func (o *V1CloudConfigsVspherePoolMachinesUIDDeleteParams) WithContext(ctx context.Context) *V1CloudConfigsVspherePoolMachinesUIDDeleteParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud configs vsphere pool machines Uid delete params +func (o *V1CloudConfigsVspherePoolMachinesUIDDeleteParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud configs vsphere pool machines Uid delete params +func (o *V1CloudConfigsVspherePoolMachinesUIDDeleteParams) WithHTTPClient(client *http.Client) *V1CloudConfigsVspherePoolMachinesUIDDeleteParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud configs vsphere pool machines Uid delete params +func (o *V1CloudConfigsVspherePoolMachinesUIDDeleteParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithConfigUID adds the configUID to the v1 cloud configs vsphere pool machines Uid delete params +func (o *V1CloudConfigsVspherePoolMachinesUIDDeleteParams) WithConfigUID(configUID string) *V1CloudConfigsVspherePoolMachinesUIDDeleteParams { + o.SetConfigUID(configUID) + return o +} + +// SetConfigUID adds the configUid to the v1 cloud configs vsphere pool machines Uid delete params +func (o *V1CloudConfigsVspherePoolMachinesUIDDeleteParams) SetConfigUID(configUID string) { + o.ConfigUID = configUID +} + +// WithMachinePoolName adds the machinePoolName to the v1 cloud configs vsphere pool machines Uid delete params +func (o *V1CloudConfigsVspherePoolMachinesUIDDeleteParams) WithMachinePoolName(machinePoolName string) *V1CloudConfigsVspherePoolMachinesUIDDeleteParams { + o.SetMachinePoolName(machinePoolName) + return o +} + +// SetMachinePoolName adds the machinePoolName to the v1 cloud configs vsphere pool machines Uid delete params +func (o *V1CloudConfigsVspherePoolMachinesUIDDeleteParams) SetMachinePoolName(machinePoolName string) { + o.MachinePoolName = machinePoolName +} + +// WithMachineUID adds the machineUID to the v1 cloud configs vsphere pool machines Uid delete params +func (o *V1CloudConfigsVspherePoolMachinesUIDDeleteParams) WithMachineUID(machineUID string) *V1CloudConfigsVspherePoolMachinesUIDDeleteParams { + o.SetMachineUID(machineUID) + return o +} + +// SetMachineUID adds the machineUid to the v1 cloud configs vsphere pool machines Uid delete params +func (o *V1CloudConfigsVspherePoolMachinesUIDDeleteParams) SetMachineUID(machineUID string) { + o.MachineUID = machineUID +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudConfigsVspherePoolMachinesUIDDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param configUid + if err := r.SetPathParam("configUid", o.ConfigUID); err != nil { + return err + } + + // path param machinePoolName + if err := r.SetPathParam("machinePoolName", o.MachinePoolName); err != nil { + return err + } + + // path param machineUid + if err := r.SetPathParam("machineUid", o.MachineUID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_configs_vsphere_pool_machines_uid_delete_responses.go b/api/client/v1/v1_cloud_configs_vsphere_pool_machines_uid_delete_responses.go new file mode 100644 index 00000000..0701e77d --- /dev/null +++ b/api/client/v1/v1_cloud_configs_vsphere_pool_machines_uid_delete_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1CloudConfigsVspherePoolMachinesUIDDeleteReader is a Reader for the V1CloudConfigsVspherePoolMachinesUIDDelete structure. +type V1CloudConfigsVspherePoolMachinesUIDDeleteReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudConfigsVspherePoolMachinesUIDDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1CloudConfigsVspherePoolMachinesUIDDeleteNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudConfigsVspherePoolMachinesUIDDeleteNoContent creates a V1CloudConfigsVspherePoolMachinesUIDDeleteNoContent with default headers values +func NewV1CloudConfigsVspherePoolMachinesUIDDeleteNoContent() *V1CloudConfigsVspherePoolMachinesUIDDeleteNoContent { + return &V1CloudConfigsVspherePoolMachinesUIDDeleteNoContent{} +} + +/* +V1CloudConfigsVspherePoolMachinesUIDDeleteNoContent handles this case with default header values. + +The resource was deleted successfully +*/ +type V1CloudConfigsVspherePoolMachinesUIDDeleteNoContent struct { +} + +func (o *V1CloudConfigsVspherePoolMachinesUIDDeleteNoContent) Error() string { + return fmt.Sprintf("[DELETE /v1/cloudconfigs/vsphere/{configUid}/machinePools/{machinePoolName}/machines/{machineUid}][%d] v1CloudConfigsVspherePoolMachinesUidDeleteNoContent ", 204) +} + +func (o *V1CloudConfigsVspherePoolMachinesUIDDeleteNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_cloud_configs_vsphere_pool_machines_uid_get_parameters.go b/api/client/v1/v1_cloud_configs_vsphere_pool_machines_uid_get_parameters.go new file mode 100644 index 00000000..9896ba78 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_vsphere_pool_machines_uid_get_parameters.go @@ -0,0 +1,178 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1CloudConfigsVspherePoolMachinesUIDGetParams creates a new V1CloudConfigsVspherePoolMachinesUIDGetParams object +// with the default values initialized. +func NewV1CloudConfigsVspherePoolMachinesUIDGetParams() *V1CloudConfigsVspherePoolMachinesUIDGetParams { + var () + return &V1CloudConfigsVspherePoolMachinesUIDGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudConfigsVspherePoolMachinesUIDGetParamsWithTimeout creates a new V1CloudConfigsVspherePoolMachinesUIDGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudConfigsVspherePoolMachinesUIDGetParamsWithTimeout(timeout time.Duration) *V1CloudConfigsVspherePoolMachinesUIDGetParams { + var () + return &V1CloudConfigsVspherePoolMachinesUIDGetParams{ + + timeout: timeout, + } +} + +// NewV1CloudConfigsVspherePoolMachinesUIDGetParamsWithContext creates a new V1CloudConfigsVspherePoolMachinesUIDGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudConfigsVspherePoolMachinesUIDGetParamsWithContext(ctx context.Context) *V1CloudConfigsVspherePoolMachinesUIDGetParams { + var () + return &V1CloudConfigsVspherePoolMachinesUIDGetParams{ + + Context: ctx, + } +} + +// NewV1CloudConfigsVspherePoolMachinesUIDGetParamsWithHTTPClient creates a new V1CloudConfigsVspherePoolMachinesUIDGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudConfigsVspherePoolMachinesUIDGetParamsWithHTTPClient(client *http.Client) *V1CloudConfigsVspherePoolMachinesUIDGetParams { + var () + return &V1CloudConfigsVspherePoolMachinesUIDGetParams{ + HTTPClient: client, + } +} + +/* +V1CloudConfigsVspherePoolMachinesUIDGetParams contains all the parameters to send to the API endpoint +for the v1 cloud configs vsphere pool machines Uid get operation typically these are written to a http.Request +*/ +type V1CloudConfigsVspherePoolMachinesUIDGetParams struct { + + /*ConfigUID + Cluster's cloud config uid + + */ + ConfigUID string + /*MachinePoolName + Machine pool name + + */ + MachinePoolName string + /*MachineUID + Machine uid + + */ + MachineUID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud configs vsphere pool machines Uid get params +func (o *V1CloudConfigsVspherePoolMachinesUIDGetParams) WithTimeout(timeout time.Duration) *V1CloudConfigsVspherePoolMachinesUIDGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud configs vsphere pool machines Uid get params +func (o *V1CloudConfigsVspherePoolMachinesUIDGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud configs vsphere pool machines Uid get params +func (o *V1CloudConfigsVspherePoolMachinesUIDGetParams) WithContext(ctx context.Context) *V1CloudConfigsVspherePoolMachinesUIDGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud configs vsphere pool machines Uid get params +func (o *V1CloudConfigsVspherePoolMachinesUIDGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud configs vsphere pool machines Uid get params +func (o *V1CloudConfigsVspherePoolMachinesUIDGetParams) WithHTTPClient(client *http.Client) *V1CloudConfigsVspherePoolMachinesUIDGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud configs vsphere pool machines Uid get params +func (o *V1CloudConfigsVspherePoolMachinesUIDGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithConfigUID adds the configUID to the v1 cloud configs vsphere pool machines Uid get params +func (o *V1CloudConfigsVspherePoolMachinesUIDGetParams) WithConfigUID(configUID string) *V1CloudConfigsVspherePoolMachinesUIDGetParams { + o.SetConfigUID(configUID) + return o +} + +// SetConfigUID adds the configUid to the v1 cloud configs vsphere pool machines Uid get params +func (o *V1CloudConfigsVspherePoolMachinesUIDGetParams) SetConfigUID(configUID string) { + o.ConfigUID = configUID +} + +// WithMachinePoolName adds the machinePoolName to the v1 cloud configs vsphere pool machines Uid get params +func (o *V1CloudConfigsVspherePoolMachinesUIDGetParams) WithMachinePoolName(machinePoolName string) *V1CloudConfigsVspherePoolMachinesUIDGetParams { + o.SetMachinePoolName(machinePoolName) + return o +} + +// SetMachinePoolName adds the machinePoolName to the v1 cloud configs vsphere pool machines Uid get params +func (o *V1CloudConfigsVspherePoolMachinesUIDGetParams) SetMachinePoolName(machinePoolName string) { + o.MachinePoolName = machinePoolName +} + +// WithMachineUID adds the machineUID to the v1 cloud configs vsphere pool machines Uid get params +func (o *V1CloudConfigsVspherePoolMachinesUIDGetParams) WithMachineUID(machineUID string) *V1CloudConfigsVspherePoolMachinesUIDGetParams { + o.SetMachineUID(machineUID) + return o +} + +// SetMachineUID adds the machineUid to the v1 cloud configs vsphere pool machines Uid get params +func (o *V1CloudConfigsVspherePoolMachinesUIDGetParams) SetMachineUID(machineUID string) { + o.MachineUID = machineUID +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudConfigsVspherePoolMachinesUIDGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param configUid + if err := r.SetPathParam("configUid", o.ConfigUID); err != nil { + return err + } + + // path param machinePoolName + if err := r.SetPathParam("machinePoolName", o.MachinePoolName); err != nil { + return err + } + + // path param machineUid + if err := r.SetPathParam("machineUid", o.MachineUID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_configs_vsphere_pool_machines_uid_get_responses.go b/api/client/v1/v1_cloud_configs_vsphere_pool_machines_uid_get_responses.go new file mode 100644 index 00000000..cf8fc191 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_vsphere_pool_machines_uid_get_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1CloudConfigsVspherePoolMachinesUIDGetReader is a Reader for the V1CloudConfigsVspherePoolMachinesUIDGet structure. +type V1CloudConfigsVspherePoolMachinesUIDGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudConfigsVspherePoolMachinesUIDGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1CloudConfigsVspherePoolMachinesUIDGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudConfigsVspherePoolMachinesUIDGetOK creates a V1CloudConfigsVspherePoolMachinesUIDGetOK with default headers values +func NewV1CloudConfigsVspherePoolMachinesUIDGetOK() *V1CloudConfigsVspherePoolMachinesUIDGetOK { + return &V1CloudConfigsVspherePoolMachinesUIDGetOK{} +} + +/* +V1CloudConfigsVspherePoolMachinesUIDGetOK handles this case with default header values. + +OK +*/ +type V1CloudConfigsVspherePoolMachinesUIDGetOK struct { + Payload *models.V1VsphereMachine +} + +func (o *V1CloudConfigsVspherePoolMachinesUIDGetOK) Error() string { + return fmt.Sprintf("[GET /v1/cloudconfigs/vsphere/{configUid}/machinePools/{machinePoolName}/machines/{machineUid}][%d] v1CloudConfigsVspherePoolMachinesUidGetOK %+v", 200, o.Payload) +} + +func (o *V1CloudConfigsVspherePoolMachinesUIDGetOK) GetPayload() *models.V1VsphereMachine { + return o.Payload +} + +func (o *V1CloudConfigsVspherePoolMachinesUIDGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1VsphereMachine) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_cloud_configs_vsphere_pool_machines_uid_update_parameters.go b/api/client/v1/v1_cloud_configs_vsphere_pool_machines_uid_update_parameters.go new file mode 100644 index 00000000..840cd813 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_vsphere_pool_machines_uid_update_parameters.go @@ -0,0 +1,199 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1CloudConfigsVspherePoolMachinesUIDUpdateParams creates a new V1CloudConfigsVspherePoolMachinesUIDUpdateParams object +// with the default values initialized. +func NewV1CloudConfigsVspherePoolMachinesUIDUpdateParams() *V1CloudConfigsVspherePoolMachinesUIDUpdateParams { + var () + return &V1CloudConfigsVspherePoolMachinesUIDUpdateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudConfigsVspherePoolMachinesUIDUpdateParamsWithTimeout creates a new V1CloudConfigsVspherePoolMachinesUIDUpdateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudConfigsVspherePoolMachinesUIDUpdateParamsWithTimeout(timeout time.Duration) *V1CloudConfigsVspherePoolMachinesUIDUpdateParams { + var () + return &V1CloudConfigsVspherePoolMachinesUIDUpdateParams{ + + timeout: timeout, + } +} + +// NewV1CloudConfigsVspherePoolMachinesUIDUpdateParamsWithContext creates a new V1CloudConfigsVspherePoolMachinesUIDUpdateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudConfigsVspherePoolMachinesUIDUpdateParamsWithContext(ctx context.Context) *V1CloudConfigsVspherePoolMachinesUIDUpdateParams { + var () + return &V1CloudConfigsVspherePoolMachinesUIDUpdateParams{ + + Context: ctx, + } +} + +// NewV1CloudConfigsVspherePoolMachinesUIDUpdateParamsWithHTTPClient creates a new V1CloudConfigsVspherePoolMachinesUIDUpdateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudConfigsVspherePoolMachinesUIDUpdateParamsWithHTTPClient(client *http.Client) *V1CloudConfigsVspherePoolMachinesUIDUpdateParams { + var () + return &V1CloudConfigsVspherePoolMachinesUIDUpdateParams{ + HTTPClient: client, + } +} + +/* +V1CloudConfigsVspherePoolMachinesUIDUpdateParams contains all the parameters to send to the API endpoint +for the v1 cloud configs vsphere pool machines Uid update operation typically these are written to a http.Request +*/ +type V1CloudConfigsVspherePoolMachinesUIDUpdateParams struct { + + /*Body*/ + Body *models.V1VsphereMachine + /*ConfigUID + Cluster's cloud config uid + + */ + ConfigUID string + /*MachinePoolName + Machine pool name + + */ + MachinePoolName string + /*MachineUID + Machine uid + + */ + MachineUID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud configs vsphere pool machines Uid update params +func (o *V1CloudConfigsVspherePoolMachinesUIDUpdateParams) WithTimeout(timeout time.Duration) *V1CloudConfigsVspherePoolMachinesUIDUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud configs vsphere pool machines Uid update params +func (o *V1CloudConfigsVspherePoolMachinesUIDUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud configs vsphere pool machines Uid update params +func (o *V1CloudConfigsVspherePoolMachinesUIDUpdateParams) WithContext(ctx context.Context) *V1CloudConfigsVspherePoolMachinesUIDUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud configs vsphere pool machines Uid update params +func (o *V1CloudConfigsVspherePoolMachinesUIDUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud configs vsphere pool machines Uid update params +func (o *V1CloudConfigsVspherePoolMachinesUIDUpdateParams) WithHTTPClient(client *http.Client) *V1CloudConfigsVspherePoolMachinesUIDUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud configs vsphere pool machines Uid update params +func (o *V1CloudConfigsVspherePoolMachinesUIDUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 cloud configs vsphere pool machines Uid update params +func (o *V1CloudConfigsVspherePoolMachinesUIDUpdateParams) WithBody(body *models.V1VsphereMachine) *V1CloudConfigsVspherePoolMachinesUIDUpdateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 cloud configs vsphere pool machines Uid update params +func (o *V1CloudConfigsVspherePoolMachinesUIDUpdateParams) SetBody(body *models.V1VsphereMachine) { + o.Body = body +} + +// WithConfigUID adds the configUID to the v1 cloud configs vsphere pool machines Uid update params +func (o *V1CloudConfigsVspherePoolMachinesUIDUpdateParams) WithConfigUID(configUID string) *V1CloudConfigsVspherePoolMachinesUIDUpdateParams { + o.SetConfigUID(configUID) + return o +} + +// SetConfigUID adds the configUid to the v1 cloud configs vsphere pool machines Uid update params +func (o *V1CloudConfigsVspherePoolMachinesUIDUpdateParams) SetConfigUID(configUID string) { + o.ConfigUID = configUID +} + +// WithMachinePoolName adds the machinePoolName to the v1 cloud configs vsphere pool machines Uid update params +func (o *V1CloudConfigsVspherePoolMachinesUIDUpdateParams) WithMachinePoolName(machinePoolName string) *V1CloudConfigsVspherePoolMachinesUIDUpdateParams { + o.SetMachinePoolName(machinePoolName) + return o +} + +// SetMachinePoolName adds the machinePoolName to the v1 cloud configs vsphere pool machines Uid update params +func (o *V1CloudConfigsVspherePoolMachinesUIDUpdateParams) SetMachinePoolName(machinePoolName string) { + o.MachinePoolName = machinePoolName +} + +// WithMachineUID adds the machineUID to the v1 cloud configs vsphere pool machines Uid update params +func (o *V1CloudConfigsVspherePoolMachinesUIDUpdateParams) WithMachineUID(machineUID string) *V1CloudConfigsVspherePoolMachinesUIDUpdateParams { + o.SetMachineUID(machineUID) + return o +} + +// SetMachineUID adds the machineUid to the v1 cloud configs vsphere pool machines Uid update params +func (o *V1CloudConfigsVspherePoolMachinesUIDUpdateParams) SetMachineUID(machineUID string) { + o.MachineUID = machineUID +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudConfigsVspherePoolMachinesUIDUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param configUid + if err := r.SetPathParam("configUid", o.ConfigUID); err != nil { + return err + } + + // path param machinePoolName + if err := r.SetPathParam("machinePoolName", o.MachinePoolName); err != nil { + return err + } + + // path param machineUid + if err := r.SetPathParam("machineUid", o.MachineUID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_configs_vsphere_pool_machines_uid_update_responses.go b/api/client/v1/v1_cloud_configs_vsphere_pool_machines_uid_update_responses.go new file mode 100644 index 00000000..de5f37cb --- /dev/null +++ b/api/client/v1/v1_cloud_configs_vsphere_pool_machines_uid_update_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1CloudConfigsVspherePoolMachinesUIDUpdateReader is a Reader for the V1CloudConfigsVspherePoolMachinesUIDUpdate structure. +type V1CloudConfigsVspherePoolMachinesUIDUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudConfigsVspherePoolMachinesUIDUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1CloudConfigsVspherePoolMachinesUIDUpdateNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudConfigsVspherePoolMachinesUIDUpdateNoContent creates a V1CloudConfigsVspherePoolMachinesUIDUpdateNoContent with default headers values +func NewV1CloudConfigsVspherePoolMachinesUIDUpdateNoContent() *V1CloudConfigsVspherePoolMachinesUIDUpdateNoContent { + return &V1CloudConfigsVspherePoolMachinesUIDUpdateNoContent{} +} + +/* +V1CloudConfigsVspherePoolMachinesUIDUpdateNoContent handles this case with default header values. + +The resource was updated successfully +*/ +type V1CloudConfigsVspherePoolMachinesUIDUpdateNoContent struct { +} + +func (o *V1CloudConfigsVspherePoolMachinesUIDUpdateNoContent) Error() string { + return fmt.Sprintf("[PUT /v1/cloudconfigs/vsphere/{configUid}/machinePools/{machinePoolName}/machines/{machineUid}][%d] v1CloudConfigsVspherePoolMachinesUidUpdateNoContent ", 204) +} + +func (o *V1CloudConfigsVspherePoolMachinesUIDUpdateNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_cloud_configs_vsphere_uid_cluster_config_parameters.go b/api/client/v1/v1_cloud_configs_vsphere_uid_cluster_config_parameters.go new file mode 100644 index 00000000..63dacc2a --- /dev/null +++ b/api/client/v1/v1_cloud_configs_vsphere_uid_cluster_config_parameters.go @@ -0,0 +1,157 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1CloudConfigsVsphereUIDClusterConfigParams creates a new V1CloudConfigsVsphereUIDClusterConfigParams object +// with the default values initialized. +func NewV1CloudConfigsVsphereUIDClusterConfigParams() *V1CloudConfigsVsphereUIDClusterConfigParams { + var () + return &V1CloudConfigsVsphereUIDClusterConfigParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudConfigsVsphereUIDClusterConfigParamsWithTimeout creates a new V1CloudConfigsVsphereUIDClusterConfigParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudConfigsVsphereUIDClusterConfigParamsWithTimeout(timeout time.Duration) *V1CloudConfigsVsphereUIDClusterConfigParams { + var () + return &V1CloudConfigsVsphereUIDClusterConfigParams{ + + timeout: timeout, + } +} + +// NewV1CloudConfigsVsphereUIDClusterConfigParamsWithContext creates a new V1CloudConfigsVsphereUIDClusterConfigParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudConfigsVsphereUIDClusterConfigParamsWithContext(ctx context.Context) *V1CloudConfigsVsphereUIDClusterConfigParams { + var () + return &V1CloudConfigsVsphereUIDClusterConfigParams{ + + Context: ctx, + } +} + +// NewV1CloudConfigsVsphereUIDClusterConfigParamsWithHTTPClient creates a new V1CloudConfigsVsphereUIDClusterConfigParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudConfigsVsphereUIDClusterConfigParamsWithHTTPClient(client *http.Client) *V1CloudConfigsVsphereUIDClusterConfigParams { + var () + return &V1CloudConfigsVsphereUIDClusterConfigParams{ + HTTPClient: client, + } +} + +/* +V1CloudConfigsVsphereUIDClusterConfigParams contains all the parameters to send to the API endpoint +for the v1 cloud configs vsphere Uid cluster config operation typically these are written to a http.Request +*/ +type V1CloudConfigsVsphereUIDClusterConfigParams struct { + + /*Body*/ + Body *models.V1VsphereCloudClusterConfigEntity + /*ConfigUID + Cluster's cloud config uid + + */ + ConfigUID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud configs vsphere Uid cluster config params +func (o *V1CloudConfigsVsphereUIDClusterConfigParams) WithTimeout(timeout time.Duration) *V1CloudConfigsVsphereUIDClusterConfigParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud configs vsphere Uid cluster config params +func (o *V1CloudConfigsVsphereUIDClusterConfigParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud configs vsphere Uid cluster config params +func (o *V1CloudConfigsVsphereUIDClusterConfigParams) WithContext(ctx context.Context) *V1CloudConfigsVsphereUIDClusterConfigParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud configs vsphere Uid cluster config params +func (o *V1CloudConfigsVsphereUIDClusterConfigParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud configs vsphere Uid cluster config params +func (o *V1CloudConfigsVsphereUIDClusterConfigParams) WithHTTPClient(client *http.Client) *V1CloudConfigsVsphereUIDClusterConfigParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud configs vsphere Uid cluster config params +func (o *V1CloudConfigsVsphereUIDClusterConfigParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 cloud configs vsphere Uid cluster config params +func (o *V1CloudConfigsVsphereUIDClusterConfigParams) WithBody(body *models.V1VsphereCloudClusterConfigEntity) *V1CloudConfigsVsphereUIDClusterConfigParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 cloud configs vsphere Uid cluster config params +func (o *V1CloudConfigsVsphereUIDClusterConfigParams) SetBody(body *models.V1VsphereCloudClusterConfigEntity) { + o.Body = body +} + +// WithConfigUID adds the configUID to the v1 cloud configs vsphere Uid cluster config params +func (o *V1CloudConfigsVsphereUIDClusterConfigParams) WithConfigUID(configUID string) *V1CloudConfigsVsphereUIDClusterConfigParams { + o.SetConfigUID(configUID) + return o +} + +// SetConfigUID adds the configUid to the v1 cloud configs vsphere Uid cluster config params +func (o *V1CloudConfigsVsphereUIDClusterConfigParams) SetConfigUID(configUID string) { + o.ConfigUID = configUID +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudConfigsVsphereUIDClusterConfigParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param configUid + if err := r.SetPathParam("configUid", o.ConfigUID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_configs_vsphere_uid_cluster_config_responses.go b/api/client/v1/v1_cloud_configs_vsphere_uid_cluster_config_responses.go new file mode 100644 index 00000000..63be8cc8 --- /dev/null +++ b/api/client/v1/v1_cloud_configs_vsphere_uid_cluster_config_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1CloudConfigsVsphereUIDClusterConfigReader is a Reader for the V1CloudConfigsVsphereUIDClusterConfig structure. +type V1CloudConfigsVsphereUIDClusterConfigReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudConfigsVsphereUIDClusterConfigReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1CloudConfigsVsphereUIDClusterConfigNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudConfigsVsphereUIDClusterConfigNoContent creates a V1CloudConfigsVsphereUIDClusterConfigNoContent with default headers values +func NewV1CloudConfigsVsphereUIDClusterConfigNoContent() *V1CloudConfigsVsphereUIDClusterConfigNoContent { + return &V1CloudConfigsVsphereUIDClusterConfigNoContent{} +} + +/* +V1CloudConfigsVsphereUIDClusterConfigNoContent handles this case with default header values. + +The resource was updated successfully +*/ +type V1CloudConfigsVsphereUIDClusterConfigNoContent struct { +} + +func (o *V1CloudConfigsVsphereUIDClusterConfigNoContent) Error() string { + return fmt.Sprintf("[PUT /v1/cloudconfigs/vsphere/{configUid}/clusterConfig][%d] v1CloudConfigsVsphereUidClusterConfigNoContent ", 204) +} + +func (o *V1CloudConfigsVsphereUIDClusterConfigNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_cloud_instance_spot_price_get_parameters.go b/api/client/v1/v1_cloud_instance_spot_price_get_parameters.go new file mode 100644 index 00000000..c93c7e33 --- /dev/null +++ b/api/client/v1/v1_cloud_instance_spot_price_get_parameters.go @@ -0,0 +1,218 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1CloudInstanceSpotPriceGetParams creates a new V1CloudInstanceSpotPriceGetParams object +// with the default values initialized. +func NewV1CloudInstanceSpotPriceGetParams() *V1CloudInstanceSpotPriceGetParams { + var () + return &V1CloudInstanceSpotPriceGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudInstanceSpotPriceGetParamsWithTimeout creates a new V1CloudInstanceSpotPriceGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudInstanceSpotPriceGetParamsWithTimeout(timeout time.Duration) *V1CloudInstanceSpotPriceGetParams { + var () + return &V1CloudInstanceSpotPriceGetParams{ + + timeout: timeout, + } +} + +// NewV1CloudInstanceSpotPriceGetParamsWithContext creates a new V1CloudInstanceSpotPriceGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudInstanceSpotPriceGetParamsWithContext(ctx context.Context) *V1CloudInstanceSpotPriceGetParams { + var () + return &V1CloudInstanceSpotPriceGetParams{ + + Context: ctx, + } +} + +// NewV1CloudInstanceSpotPriceGetParamsWithHTTPClient creates a new V1CloudInstanceSpotPriceGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudInstanceSpotPriceGetParamsWithHTTPClient(client *http.Client) *V1CloudInstanceSpotPriceGetParams { + var () + return &V1CloudInstanceSpotPriceGetParams{ + HTTPClient: client, + } +} + +/* +V1CloudInstanceSpotPriceGetParams contains all the parameters to send to the API endpoint +for the v1 cloud instance spot price get operation typically these are written to a http.Request +*/ +type V1CloudInstanceSpotPriceGetParams struct { + + /*CloudType + Cloud type [aws/azure/gcp/tencent] + + */ + CloudType string + /*InstanceType + Instance type for a specific cloud type + + */ + InstanceType string + /*Timestamp + Time is a wrapper around time.Time which supports correct marshaling to YAML and JSON. Wrappers are provided for many of the factory methods that the time package offers. + + */ + Timestamp *strfmt.DateTime + /*Zone + Availability zone for a specific cloud type + + */ + Zone string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud instance spot price get params +func (o *V1CloudInstanceSpotPriceGetParams) WithTimeout(timeout time.Duration) *V1CloudInstanceSpotPriceGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud instance spot price get params +func (o *V1CloudInstanceSpotPriceGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud instance spot price get params +func (o *V1CloudInstanceSpotPriceGetParams) WithContext(ctx context.Context) *V1CloudInstanceSpotPriceGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud instance spot price get params +func (o *V1CloudInstanceSpotPriceGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud instance spot price get params +func (o *V1CloudInstanceSpotPriceGetParams) WithHTTPClient(client *http.Client) *V1CloudInstanceSpotPriceGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud instance spot price get params +func (o *V1CloudInstanceSpotPriceGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithCloudType adds the cloudType to the v1 cloud instance spot price get params +func (o *V1CloudInstanceSpotPriceGetParams) WithCloudType(cloudType string) *V1CloudInstanceSpotPriceGetParams { + o.SetCloudType(cloudType) + return o +} + +// SetCloudType adds the cloudType to the v1 cloud instance spot price get params +func (o *V1CloudInstanceSpotPriceGetParams) SetCloudType(cloudType string) { + o.CloudType = cloudType +} + +// WithInstanceType adds the instanceType to the v1 cloud instance spot price get params +func (o *V1CloudInstanceSpotPriceGetParams) WithInstanceType(instanceType string) *V1CloudInstanceSpotPriceGetParams { + o.SetInstanceType(instanceType) + return o +} + +// SetInstanceType adds the instanceType to the v1 cloud instance spot price get params +func (o *V1CloudInstanceSpotPriceGetParams) SetInstanceType(instanceType string) { + o.InstanceType = instanceType +} + +// WithTimestamp adds the timestamp to the v1 cloud instance spot price get params +func (o *V1CloudInstanceSpotPriceGetParams) WithTimestamp(timestamp *strfmt.DateTime) *V1CloudInstanceSpotPriceGetParams { + o.SetTimestamp(timestamp) + return o +} + +// SetTimestamp adds the timestamp to the v1 cloud instance spot price get params +func (o *V1CloudInstanceSpotPriceGetParams) SetTimestamp(timestamp *strfmt.DateTime) { + o.Timestamp = timestamp +} + +// WithZone adds the zone to the v1 cloud instance spot price get params +func (o *V1CloudInstanceSpotPriceGetParams) WithZone(zone string) *V1CloudInstanceSpotPriceGetParams { + o.SetZone(zone) + return o +} + +// SetZone adds the zone to the v1 cloud instance spot price get params +func (o *V1CloudInstanceSpotPriceGetParams) SetZone(zone string) { + o.Zone = zone +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudInstanceSpotPriceGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param cloudType + if err := r.SetPathParam("cloudType", o.CloudType); err != nil { + return err + } + + // query param instanceType + qrInstanceType := o.InstanceType + qInstanceType := qrInstanceType + if qInstanceType != "" { + if err := r.SetQueryParam("instanceType", qInstanceType); err != nil { + return err + } + } + + if o.Timestamp != nil { + + // query param timestamp + var qrTimestamp strfmt.DateTime + if o.Timestamp != nil { + qrTimestamp = *o.Timestamp + } + qTimestamp := qrTimestamp.String() + if qTimestamp != "" { + if err := r.SetQueryParam("timestamp", qTimestamp); err != nil { + return err + } + } + + } + + // query param zone + qrZone := o.Zone + qZone := qrZone + if qZone != "" { + if err := r.SetQueryParam("zone", qZone); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_instance_spot_price_get_responses.go b/api/client/v1/v1_cloud_instance_spot_price_get_responses.go new file mode 100644 index 00000000..9d2cf759 --- /dev/null +++ b/api/client/v1/v1_cloud_instance_spot_price_get_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1CloudInstanceSpotPriceGetReader is a Reader for the V1CloudInstanceSpotPriceGet structure. +type V1CloudInstanceSpotPriceGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudInstanceSpotPriceGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1CloudInstanceSpotPriceGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudInstanceSpotPriceGetOK creates a V1CloudInstanceSpotPriceGetOK with default headers values +func NewV1CloudInstanceSpotPriceGetOK() *V1CloudInstanceSpotPriceGetOK { + return &V1CloudInstanceSpotPriceGetOK{} +} + +/* +V1CloudInstanceSpotPriceGetOK handles this case with default header values. + +(empty) +*/ +type V1CloudInstanceSpotPriceGetOK struct { + Payload *models.V1CloudSpotPrice +} + +func (o *V1CloudInstanceSpotPriceGetOK) Error() string { + return fmt.Sprintf("[GET /v1/clouds/{cloudType}/instance/spotprice][%d] v1CloudInstanceSpotPriceGetOK %+v", 200, o.Payload) +} + +func (o *V1CloudInstanceSpotPriceGetOK) GetPayload() *models.V1CloudSpotPrice { + return o.Payload +} + +func (o *V1CloudInstanceSpotPriceGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1CloudSpotPrice) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_cloud_storage_rate_parameters.go b/api/client/v1/v1_cloud_storage_rate_parameters.go new file mode 100644 index 00000000..c69ab775 --- /dev/null +++ b/api/client/v1/v1_cloud_storage_rate_parameters.go @@ -0,0 +1,215 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// NewV1CloudStorageRateParams creates a new V1CloudStorageRateParams object +// with the default values initialized. +func NewV1CloudStorageRateParams() *V1CloudStorageRateParams { + var () + return &V1CloudStorageRateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudStorageRateParamsWithTimeout creates a new V1CloudStorageRateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudStorageRateParamsWithTimeout(timeout time.Duration) *V1CloudStorageRateParams { + var () + return &V1CloudStorageRateParams{ + + timeout: timeout, + } +} + +// NewV1CloudStorageRateParamsWithContext creates a new V1CloudStorageRateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudStorageRateParamsWithContext(ctx context.Context) *V1CloudStorageRateParams { + var () + return &V1CloudStorageRateParams{ + + Context: ctx, + } +} + +// NewV1CloudStorageRateParamsWithHTTPClient creates a new V1CloudStorageRateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudStorageRateParamsWithHTTPClient(client *http.Client) *V1CloudStorageRateParams { + var () + return &V1CloudStorageRateParams{ + HTTPClient: client, + } +} + +/* +V1CloudStorageRateParams contains all the parameters to send to the API endpoint +for the v1 cloud storage rate operation typically these are written to a http.Request +*/ +type V1CloudStorageRateParams struct { + + /*Cloud + cloud for which compute rate is requested + + */ + Cloud string + /*MaxDiskType + maxDiskType for which compute rate is requested + + */ + MaxDiskType *int64 + /*Region + region for which compute rate is requested + + */ + Region string + /*Type + storage type for which compute rate is requested + + */ + Type string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cloud storage rate params +func (o *V1CloudStorageRateParams) WithTimeout(timeout time.Duration) *V1CloudStorageRateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cloud storage rate params +func (o *V1CloudStorageRateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cloud storage rate params +func (o *V1CloudStorageRateParams) WithContext(ctx context.Context) *V1CloudStorageRateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cloud storage rate params +func (o *V1CloudStorageRateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cloud storage rate params +func (o *V1CloudStorageRateParams) WithHTTPClient(client *http.Client) *V1CloudStorageRateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cloud storage rate params +func (o *V1CloudStorageRateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithCloud adds the cloud to the v1 cloud storage rate params +func (o *V1CloudStorageRateParams) WithCloud(cloud string) *V1CloudStorageRateParams { + o.SetCloud(cloud) + return o +} + +// SetCloud adds the cloud to the v1 cloud storage rate params +func (o *V1CloudStorageRateParams) SetCloud(cloud string) { + o.Cloud = cloud +} + +// WithMaxDiskType adds the maxDiskType to the v1 cloud storage rate params +func (o *V1CloudStorageRateParams) WithMaxDiskType(maxDiskType *int64) *V1CloudStorageRateParams { + o.SetMaxDiskType(maxDiskType) + return o +} + +// SetMaxDiskType adds the maxDiskType to the v1 cloud storage rate params +func (o *V1CloudStorageRateParams) SetMaxDiskType(maxDiskType *int64) { + o.MaxDiskType = maxDiskType +} + +// WithRegion adds the region to the v1 cloud storage rate params +func (o *V1CloudStorageRateParams) WithRegion(region string) *V1CloudStorageRateParams { + o.SetRegion(region) + return o +} + +// SetRegion adds the region to the v1 cloud storage rate params +func (o *V1CloudStorageRateParams) SetRegion(region string) { + o.Region = region +} + +// WithType adds the typeVar to the v1 cloud storage rate params +func (o *V1CloudStorageRateParams) WithType(typeVar string) *V1CloudStorageRateParams { + o.SetType(typeVar) + return o +} + +// SetType adds the type to the v1 cloud storage rate params +func (o *V1CloudStorageRateParams) SetType(typeVar string) { + o.Type = typeVar +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudStorageRateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param cloud + if err := r.SetPathParam("cloud", o.Cloud); err != nil { + return err + } + + if o.MaxDiskType != nil { + + // query param maxDiskType + var qrMaxDiskType int64 + if o.MaxDiskType != nil { + qrMaxDiskType = *o.MaxDiskType + } + qMaxDiskType := swag.FormatInt64(qrMaxDiskType) + if qMaxDiskType != "" { + if err := r.SetQueryParam("maxDiskType", qMaxDiskType); err != nil { + return err + } + } + + } + + // query param region + qrRegion := o.Region + qRegion := qrRegion + if qRegion != "" { + if err := r.SetQueryParam("region", qRegion); err != nil { + return err + } + } + + // path param type + if err := r.SetPathParam("type", o.Type); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cloud_storage_rate_responses.go b/api/client/v1/v1_cloud_storage_rate_responses.go new file mode 100644 index 00000000..54b9687e --- /dev/null +++ b/api/client/v1/v1_cloud_storage_rate_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1CloudStorageRateReader is a Reader for the V1CloudStorageRate structure. +type V1CloudStorageRateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudStorageRateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1CloudStorageRateOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudStorageRateOK creates a V1CloudStorageRateOK with default headers values +func NewV1CloudStorageRateOK() *V1CloudStorageRateOK { + return &V1CloudStorageRateOK{} +} + +/* +V1CloudStorageRateOK handles this case with default header values. + +(empty) +*/ +type V1CloudStorageRateOK struct { + Payload *models.V1CloudCost +} + +func (o *V1CloudStorageRateOK) Error() string { + return fmt.Sprintf("[GET /v1/clouds/{cloud}/storage/{type}/rate][%d] v1CloudStorageRateOK %+v", 200, o.Payload) +} + +func (o *V1CloudStorageRateOK) GetPayload() *models.V1CloudCost { + return o.Payload +} + +func (o *V1CloudStorageRateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1CloudCost) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_clouds_aws_cloud_watch_validate_parameters.go b/api/client/v1/v1_clouds_aws_cloud_watch_validate_parameters.go new file mode 100644 index 00000000..c24ceaed --- /dev/null +++ b/api/client/v1/v1_clouds_aws_cloud_watch_validate_parameters.go @@ -0,0 +1,139 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1CloudsAwsCloudWatchValidateParams creates a new V1CloudsAwsCloudWatchValidateParams object +// with the default values initialized. +func NewV1CloudsAwsCloudWatchValidateParams() *V1CloudsAwsCloudWatchValidateParams { + var () + return &V1CloudsAwsCloudWatchValidateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CloudsAwsCloudWatchValidateParamsWithTimeout creates a new V1CloudsAwsCloudWatchValidateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CloudsAwsCloudWatchValidateParamsWithTimeout(timeout time.Duration) *V1CloudsAwsCloudWatchValidateParams { + var () + return &V1CloudsAwsCloudWatchValidateParams{ + + timeout: timeout, + } +} + +// NewV1CloudsAwsCloudWatchValidateParamsWithContext creates a new V1CloudsAwsCloudWatchValidateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CloudsAwsCloudWatchValidateParamsWithContext(ctx context.Context) *V1CloudsAwsCloudWatchValidateParams { + var () + return &V1CloudsAwsCloudWatchValidateParams{ + + Context: ctx, + } +} + +// NewV1CloudsAwsCloudWatchValidateParamsWithHTTPClient creates a new V1CloudsAwsCloudWatchValidateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CloudsAwsCloudWatchValidateParamsWithHTTPClient(client *http.Client) *V1CloudsAwsCloudWatchValidateParams { + var () + return &V1CloudsAwsCloudWatchValidateParams{ + HTTPClient: client, + } +} + +/* +V1CloudsAwsCloudWatchValidateParams contains all the parameters to send to the API endpoint +for the v1 clouds aws cloud watch validate operation typically these are written to a http.Request +*/ +type V1CloudsAwsCloudWatchValidateParams struct { + + /*CloudWatchConfig + Request payload for cloud watch config + + */ + CloudWatchConfig *models.V1CloudWatchConfig + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 clouds aws cloud watch validate params +func (o *V1CloudsAwsCloudWatchValidateParams) WithTimeout(timeout time.Duration) *V1CloudsAwsCloudWatchValidateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 clouds aws cloud watch validate params +func (o *V1CloudsAwsCloudWatchValidateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 clouds aws cloud watch validate params +func (o *V1CloudsAwsCloudWatchValidateParams) WithContext(ctx context.Context) *V1CloudsAwsCloudWatchValidateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 clouds aws cloud watch validate params +func (o *V1CloudsAwsCloudWatchValidateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 clouds aws cloud watch validate params +func (o *V1CloudsAwsCloudWatchValidateParams) WithHTTPClient(client *http.Client) *V1CloudsAwsCloudWatchValidateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 clouds aws cloud watch validate params +func (o *V1CloudsAwsCloudWatchValidateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithCloudWatchConfig adds the cloudWatchConfig to the v1 clouds aws cloud watch validate params +func (o *V1CloudsAwsCloudWatchValidateParams) WithCloudWatchConfig(cloudWatchConfig *models.V1CloudWatchConfig) *V1CloudsAwsCloudWatchValidateParams { + o.SetCloudWatchConfig(cloudWatchConfig) + return o +} + +// SetCloudWatchConfig adds the cloudWatchConfig to the v1 clouds aws cloud watch validate params +func (o *V1CloudsAwsCloudWatchValidateParams) SetCloudWatchConfig(cloudWatchConfig *models.V1CloudWatchConfig) { + o.CloudWatchConfig = cloudWatchConfig +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CloudsAwsCloudWatchValidateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.CloudWatchConfig != nil { + if err := r.SetBodyParam(o.CloudWatchConfig); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_clouds_aws_cloud_watch_validate_responses.go b/api/client/v1/v1_clouds_aws_cloud_watch_validate_responses.go new file mode 100644 index 00000000..b7dcddb0 --- /dev/null +++ b/api/client/v1/v1_clouds_aws_cloud_watch_validate_responses.go @@ -0,0 +1,61 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1CloudsAwsCloudWatchValidateReader is a Reader for the V1CloudsAwsCloudWatchValidate structure. +type V1CloudsAwsCloudWatchValidateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CloudsAwsCloudWatchValidateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1CloudsAwsCloudWatchValidateNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CloudsAwsCloudWatchValidateNoContent creates a V1CloudsAwsCloudWatchValidateNoContent with default headers values +func NewV1CloudsAwsCloudWatchValidateNoContent() *V1CloudsAwsCloudWatchValidateNoContent { + return &V1CloudsAwsCloudWatchValidateNoContent{} +} + +/* +V1CloudsAwsCloudWatchValidateNoContent handles this case with default header values. + +Ok response without content +*/ +type V1CloudsAwsCloudWatchValidateNoContent struct { + /*Audit uid for the request + */ + AuditUID string +} + +func (o *V1CloudsAwsCloudWatchValidateNoContent) Error() string { + return fmt.Sprintf("[POST /v1/clouds/aws/cloudwatch/validate][%d] v1CloudsAwsCloudWatchValidateNoContent ", 204) +} + +func (o *V1CloudsAwsCloudWatchValidateNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header AuditUid + o.AuditUID = response.GetHeader("AuditUid") + + return nil +} diff --git a/api/client/v1/v1_cluster_feature_backup_create_parameters.go b/api/client/v1/v1_cluster_feature_backup_create_parameters.go new file mode 100644 index 00000000..8c541d0c --- /dev/null +++ b/api/client/v1/v1_cluster_feature_backup_create_parameters.go @@ -0,0 +1,154 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1ClusterFeatureBackupCreateParams creates a new V1ClusterFeatureBackupCreateParams object +// with the default values initialized. +func NewV1ClusterFeatureBackupCreateParams() *V1ClusterFeatureBackupCreateParams { + var () + return &V1ClusterFeatureBackupCreateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1ClusterFeatureBackupCreateParamsWithTimeout creates a new V1ClusterFeatureBackupCreateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1ClusterFeatureBackupCreateParamsWithTimeout(timeout time.Duration) *V1ClusterFeatureBackupCreateParams { + var () + return &V1ClusterFeatureBackupCreateParams{ + + timeout: timeout, + } +} + +// NewV1ClusterFeatureBackupCreateParamsWithContext creates a new V1ClusterFeatureBackupCreateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1ClusterFeatureBackupCreateParamsWithContext(ctx context.Context) *V1ClusterFeatureBackupCreateParams { + var () + return &V1ClusterFeatureBackupCreateParams{ + + Context: ctx, + } +} + +// NewV1ClusterFeatureBackupCreateParamsWithHTTPClient creates a new V1ClusterFeatureBackupCreateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1ClusterFeatureBackupCreateParamsWithHTTPClient(client *http.Client) *V1ClusterFeatureBackupCreateParams { + var () + return &V1ClusterFeatureBackupCreateParams{ + HTTPClient: client, + } +} + +/* +V1ClusterFeatureBackupCreateParams contains all the parameters to send to the API endpoint +for the v1 cluster feature backup create operation typically these are written to a http.Request +*/ +type V1ClusterFeatureBackupCreateParams struct { + + /*Body*/ + Body *models.V1ClusterBackupConfig + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cluster feature backup create params +func (o *V1ClusterFeatureBackupCreateParams) WithTimeout(timeout time.Duration) *V1ClusterFeatureBackupCreateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cluster feature backup create params +func (o *V1ClusterFeatureBackupCreateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cluster feature backup create params +func (o *V1ClusterFeatureBackupCreateParams) WithContext(ctx context.Context) *V1ClusterFeatureBackupCreateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cluster feature backup create params +func (o *V1ClusterFeatureBackupCreateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cluster feature backup create params +func (o *V1ClusterFeatureBackupCreateParams) WithHTTPClient(client *http.Client) *V1ClusterFeatureBackupCreateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cluster feature backup create params +func (o *V1ClusterFeatureBackupCreateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 cluster feature backup create params +func (o *V1ClusterFeatureBackupCreateParams) WithBody(body *models.V1ClusterBackupConfig) *V1ClusterFeatureBackupCreateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 cluster feature backup create params +func (o *V1ClusterFeatureBackupCreateParams) SetBody(body *models.V1ClusterBackupConfig) { + o.Body = body +} + +// WithUID adds the uid to the v1 cluster feature backup create params +func (o *V1ClusterFeatureBackupCreateParams) WithUID(uid string) *V1ClusterFeatureBackupCreateParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 cluster feature backup create params +func (o *V1ClusterFeatureBackupCreateParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1ClusterFeatureBackupCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cluster_feature_backup_create_responses.go b/api/client/v1/v1_cluster_feature_backup_create_responses.go new file mode 100644 index 00000000..7147b3d0 --- /dev/null +++ b/api/client/v1/v1_cluster_feature_backup_create_responses.go @@ -0,0 +1,77 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1ClusterFeatureBackupCreateReader is a Reader for the V1ClusterFeatureBackupCreate structure. +type V1ClusterFeatureBackupCreateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1ClusterFeatureBackupCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 201: + result := NewV1ClusterFeatureBackupCreateCreated() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1ClusterFeatureBackupCreateCreated creates a V1ClusterFeatureBackupCreateCreated with default headers values +func NewV1ClusterFeatureBackupCreateCreated() *V1ClusterFeatureBackupCreateCreated { + return &V1ClusterFeatureBackupCreateCreated{} +} + +/* +V1ClusterFeatureBackupCreateCreated handles this case with default header values. + +Created successfully +*/ +type V1ClusterFeatureBackupCreateCreated struct { + /*Audit uid for the request + */ + AuditUID string + + Payload *models.V1UID +} + +func (o *V1ClusterFeatureBackupCreateCreated) Error() string { + return fmt.Sprintf("[POST /v1/spectroclusters/{uid}/features/backup][%d] v1ClusterFeatureBackupCreateCreated %+v", 201, o.Payload) +} + +func (o *V1ClusterFeatureBackupCreateCreated) GetPayload() *models.V1UID { + return o.Payload +} + +func (o *V1ClusterFeatureBackupCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header AuditUid + o.AuditUID = response.GetHeader("AuditUid") + + o.Payload = new(models.V1UID) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_cluster_feature_backup_delete_parameters.go b/api/client/v1/v1_cluster_feature_backup_delete_parameters.go new file mode 100644 index 00000000..85624863 --- /dev/null +++ b/api/client/v1/v1_cluster_feature_backup_delete_parameters.go @@ -0,0 +1,169 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1ClusterFeatureBackupDeleteParams creates a new V1ClusterFeatureBackupDeleteParams object +// with the default values initialized. +func NewV1ClusterFeatureBackupDeleteParams() *V1ClusterFeatureBackupDeleteParams { + var () + return &V1ClusterFeatureBackupDeleteParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1ClusterFeatureBackupDeleteParamsWithTimeout creates a new V1ClusterFeatureBackupDeleteParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1ClusterFeatureBackupDeleteParamsWithTimeout(timeout time.Duration) *V1ClusterFeatureBackupDeleteParams { + var () + return &V1ClusterFeatureBackupDeleteParams{ + + timeout: timeout, + } +} + +// NewV1ClusterFeatureBackupDeleteParamsWithContext creates a new V1ClusterFeatureBackupDeleteParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1ClusterFeatureBackupDeleteParamsWithContext(ctx context.Context) *V1ClusterFeatureBackupDeleteParams { + var () + return &V1ClusterFeatureBackupDeleteParams{ + + Context: ctx, + } +} + +// NewV1ClusterFeatureBackupDeleteParamsWithHTTPClient creates a new V1ClusterFeatureBackupDeleteParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1ClusterFeatureBackupDeleteParamsWithHTTPClient(client *http.Client) *V1ClusterFeatureBackupDeleteParams { + var () + return &V1ClusterFeatureBackupDeleteParams{ + HTTPClient: client, + } +} + +/* +V1ClusterFeatureBackupDeleteParams contains all the parameters to send to the API endpoint +for the v1 cluster feature backup delete operation typically these are written to a http.Request +*/ +type V1ClusterFeatureBackupDeleteParams struct { + + /*BackupName*/ + BackupName string + /*RequestUID*/ + RequestUID string + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cluster feature backup delete params +func (o *V1ClusterFeatureBackupDeleteParams) WithTimeout(timeout time.Duration) *V1ClusterFeatureBackupDeleteParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cluster feature backup delete params +func (o *V1ClusterFeatureBackupDeleteParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cluster feature backup delete params +func (o *V1ClusterFeatureBackupDeleteParams) WithContext(ctx context.Context) *V1ClusterFeatureBackupDeleteParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cluster feature backup delete params +func (o *V1ClusterFeatureBackupDeleteParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cluster feature backup delete params +func (o *V1ClusterFeatureBackupDeleteParams) WithHTTPClient(client *http.Client) *V1ClusterFeatureBackupDeleteParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cluster feature backup delete params +func (o *V1ClusterFeatureBackupDeleteParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBackupName adds the backupName to the v1 cluster feature backup delete params +func (o *V1ClusterFeatureBackupDeleteParams) WithBackupName(backupName string) *V1ClusterFeatureBackupDeleteParams { + o.SetBackupName(backupName) + return o +} + +// SetBackupName adds the backupName to the v1 cluster feature backup delete params +func (o *V1ClusterFeatureBackupDeleteParams) SetBackupName(backupName string) { + o.BackupName = backupName +} + +// WithRequestUID adds the requestUID to the v1 cluster feature backup delete params +func (o *V1ClusterFeatureBackupDeleteParams) WithRequestUID(requestUID string) *V1ClusterFeatureBackupDeleteParams { + o.SetRequestUID(requestUID) + return o +} + +// SetRequestUID adds the requestUid to the v1 cluster feature backup delete params +func (o *V1ClusterFeatureBackupDeleteParams) SetRequestUID(requestUID string) { + o.RequestUID = requestUID +} + +// WithUID adds the uid to the v1 cluster feature backup delete params +func (o *V1ClusterFeatureBackupDeleteParams) WithUID(uid string) *V1ClusterFeatureBackupDeleteParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 cluster feature backup delete params +func (o *V1ClusterFeatureBackupDeleteParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1ClusterFeatureBackupDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param backupName + if err := r.SetPathParam("backupName", o.BackupName); err != nil { + return err + } + + // path param requestUid + if err := r.SetPathParam("requestUid", o.RequestUID); err != nil { + return err + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cluster_feature_backup_delete_responses.go b/api/client/v1/v1_cluster_feature_backup_delete_responses.go new file mode 100644 index 00000000..3cd1d49e --- /dev/null +++ b/api/client/v1/v1_cluster_feature_backup_delete_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1ClusterFeatureBackupDeleteReader is a Reader for the V1ClusterFeatureBackupDelete structure. +type V1ClusterFeatureBackupDeleteReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1ClusterFeatureBackupDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1ClusterFeatureBackupDeleteNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1ClusterFeatureBackupDeleteNoContent creates a V1ClusterFeatureBackupDeleteNoContent with default headers values +func NewV1ClusterFeatureBackupDeleteNoContent() *V1ClusterFeatureBackupDeleteNoContent { + return &V1ClusterFeatureBackupDeleteNoContent{} +} + +/* +V1ClusterFeatureBackupDeleteNoContent handles this case with default header values. + +The resource was deleted successfully +*/ +type V1ClusterFeatureBackupDeleteNoContent struct { +} + +func (o *V1ClusterFeatureBackupDeleteNoContent) Error() string { + return fmt.Sprintf("[DELETE /v1/spectroclusters/{uid}/features/backup/{backupName}/request/{requestUid}][%d] v1ClusterFeatureBackupDeleteNoContent ", 204) +} + +func (o *V1ClusterFeatureBackupDeleteNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_cluster_feature_backup_get_parameters.go b/api/client/v1/v1_cluster_feature_backup_get_parameters.go new file mode 100644 index 00000000..e49c1407 --- /dev/null +++ b/api/client/v1/v1_cluster_feature_backup_get_parameters.go @@ -0,0 +1,162 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1ClusterFeatureBackupGetParams creates a new V1ClusterFeatureBackupGetParams object +// with the default values initialized. +func NewV1ClusterFeatureBackupGetParams() *V1ClusterFeatureBackupGetParams { + var () + return &V1ClusterFeatureBackupGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1ClusterFeatureBackupGetParamsWithTimeout creates a new V1ClusterFeatureBackupGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1ClusterFeatureBackupGetParamsWithTimeout(timeout time.Duration) *V1ClusterFeatureBackupGetParams { + var () + return &V1ClusterFeatureBackupGetParams{ + + timeout: timeout, + } +} + +// NewV1ClusterFeatureBackupGetParamsWithContext creates a new V1ClusterFeatureBackupGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1ClusterFeatureBackupGetParamsWithContext(ctx context.Context) *V1ClusterFeatureBackupGetParams { + var () + return &V1ClusterFeatureBackupGetParams{ + + Context: ctx, + } +} + +// NewV1ClusterFeatureBackupGetParamsWithHTTPClient creates a new V1ClusterFeatureBackupGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1ClusterFeatureBackupGetParamsWithHTTPClient(client *http.Client) *V1ClusterFeatureBackupGetParams { + var () + return &V1ClusterFeatureBackupGetParams{ + HTTPClient: client, + } +} + +/* +V1ClusterFeatureBackupGetParams contains all the parameters to send to the API endpoint +for the v1 cluster feature backup get operation typically these are written to a http.Request +*/ +type V1ClusterFeatureBackupGetParams struct { + + /*BackupRequestUID*/ + BackupRequestUID *string + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cluster feature backup get params +func (o *V1ClusterFeatureBackupGetParams) WithTimeout(timeout time.Duration) *V1ClusterFeatureBackupGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cluster feature backup get params +func (o *V1ClusterFeatureBackupGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cluster feature backup get params +func (o *V1ClusterFeatureBackupGetParams) WithContext(ctx context.Context) *V1ClusterFeatureBackupGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cluster feature backup get params +func (o *V1ClusterFeatureBackupGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cluster feature backup get params +func (o *V1ClusterFeatureBackupGetParams) WithHTTPClient(client *http.Client) *V1ClusterFeatureBackupGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cluster feature backup get params +func (o *V1ClusterFeatureBackupGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBackupRequestUID adds the backupRequestUID to the v1 cluster feature backup get params +func (o *V1ClusterFeatureBackupGetParams) WithBackupRequestUID(backupRequestUID *string) *V1ClusterFeatureBackupGetParams { + o.SetBackupRequestUID(backupRequestUID) + return o +} + +// SetBackupRequestUID adds the backupRequestUid to the v1 cluster feature backup get params +func (o *V1ClusterFeatureBackupGetParams) SetBackupRequestUID(backupRequestUID *string) { + o.BackupRequestUID = backupRequestUID +} + +// WithUID adds the uid to the v1 cluster feature backup get params +func (o *V1ClusterFeatureBackupGetParams) WithUID(uid string) *V1ClusterFeatureBackupGetParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 cluster feature backup get params +func (o *V1ClusterFeatureBackupGetParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1ClusterFeatureBackupGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.BackupRequestUID != nil { + + // query param backupRequestUid + var qrBackupRequestUID string + if o.BackupRequestUID != nil { + qrBackupRequestUID = *o.BackupRequestUID + } + qBackupRequestUID := qrBackupRequestUID + if qBackupRequestUID != "" { + if err := r.SetQueryParam("backupRequestUid", qBackupRequestUID); err != nil { + return err + } + } + + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cluster_feature_backup_get_responses.go b/api/client/v1/v1_cluster_feature_backup_get_responses.go new file mode 100644 index 00000000..bc900923 --- /dev/null +++ b/api/client/v1/v1_cluster_feature_backup_get_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1ClusterFeatureBackupGetReader is a Reader for the V1ClusterFeatureBackupGet structure. +type V1ClusterFeatureBackupGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1ClusterFeatureBackupGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1ClusterFeatureBackupGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1ClusterFeatureBackupGetOK creates a V1ClusterFeatureBackupGetOK with default headers values +func NewV1ClusterFeatureBackupGetOK() *V1ClusterFeatureBackupGetOK { + return &V1ClusterFeatureBackupGetOK{} +} + +/* +V1ClusterFeatureBackupGetOK handles this case with default header values. + +OK +*/ +type V1ClusterFeatureBackupGetOK struct { + Payload *models.V1ClusterBackup +} + +func (o *V1ClusterFeatureBackupGetOK) Error() string { + return fmt.Sprintf("[GET /v1/spectroclusters/{uid}/features/backup][%d] v1ClusterFeatureBackupGetOK %+v", 200, o.Payload) +} + +func (o *V1ClusterFeatureBackupGetOK) GetPayload() *models.V1ClusterBackup { + return o.Payload +} + +func (o *V1ClusterFeatureBackupGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1ClusterBackup) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_cluster_feature_backup_location_uid_change_parameters.go b/api/client/v1/v1_cluster_feature_backup_location_uid_change_parameters.go new file mode 100644 index 00000000..14b74371 --- /dev/null +++ b/api/client/v1/v1_cluster_feature_backup_location_uid_change_parameters.go @@ -0,0 +1,154 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1ClusterFeatureBackupLocationUIDChangeParams creates a new V1ClusterFeatureBackupLocationUIDChangeParams object +// with the default values initialized. +func NewV1ClusterFeatureBackupLocationUIDChangeParams() *V1ClusterFeatureBackupLocationUIDChangeParams { + var () + return &V1ClusterFeatureBackupLocationUIDChangeParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1ClusterFeatureBackupLocationUIDChangeParamsWithTimeout creates a new V1ClusterFeatureBackupLocationUIDChangeParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1ClusterFeatureBackupLocationUIDChangeParamsWithTimeout(timeout time.Duration) *V1ClusterFeatureBackupLocationUIDChangeParams { + var () + return &V1ClusterFeatureBackupLocationUIDChangeParams{ + + timeout: timeout, + } +} + +// NewV1ClusterFeatureBackupLocationUIDChangeParamsWithContext creates a new V1ClusterFeatureBackupLocationUIDChangeParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1ClusterFeatureBackupLocationUIDChangeParamsWithContext(ctx context.Context) *V1ClusterFeatureBackupLocationUIDChangeParams { + var () + return &V1ClusterFeatureBackupLocationUIDChangeParams{ + + Context: ctx, + } +} + +// NewV1ClusterFeatureBackupLocationUIDChangeParamsWithHTTPClient creates a new V1ClusterFeatureBackupLocationUIDChangeParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1ClusterFeatureBackupLocationUIDChangeParamsWithHTTPClient(client *http.Client) *V1ClusterFeatureBackupLocationUIDChangeParams { + var () + return &V1ClusterFeatureBackupLocationUIDChangeParams{ + HTTPClient: client, + } +} + +/* +V1ClusterFeatureBackupLocationUIDChangeParams contains all the parameters to send to the API endpoint +for the v1 cluster feature backup location Uid change operation typically these are written to a http.Request +*/ +type V1ClusterFeatureBackupLocationUIDChangeParams struct { + + /*Body*/ + Body *models.V1ClusterBackupLocationType + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cluster feature backup location Uid change params +func (o *V1ClusterFeatureBackupLocationUIDChangeParams) WithTimeout(timeout time.Duration) *V1ClusterFeatureBackupLocationUIDChangeParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cluster feature backup location Uid change params +func (o *V1ClusterFeatureBackupLocationUIDChangeParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cluster feature backup location Uid change params +func (o *V1ClusterFeatureBackupLocationUIDChangeParams) WithContext(ctx context.Context) *V1ClusterFeatureBackupLocationUIDChangeParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cluster feature backup location Uid change params +func (o *V1ClusterFeatureBackupLocationUIDChangeParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cluster feature backup location Uid change params +func (o *V1ClusterFeatureBackupLocationUIDChangeParams) WithHTTPClient(client *http.Client) *V1ClusterFeatureBackupLocationUIDChangeParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cluster feature backup location Uid change params +func (o *V1ClusterFeatureBackupLocationUIDChangeParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 cluster feature backup location Uid change params +func (o *V1ClusterFeatureBackupLocationUIDChangeParams) WithBody(body *models.V1ClusterBackupLocationType) *V1ClusterFeatureBackupLocationUIDChangeParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 cluster feature backup location Uid change params +func (o *V1ClusterFeatureBackupLocationUIDChangeParams) SetBody(body *models.V1ClusterBackupLocationType) { + o.Body = body +} + +// WithUID adds the uid to the v1 cluster feature backup location Uid change params +func (o *V1ClusterFeatureBackupLocationUIDChangeParams) WithUID(uid string) *V1ClusterFeatureBackupLocationUIDChangeParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 cluster feature backup location Uid change params +func (o *V1ClusterFeatureBackupLocationUIDChangeParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1ClusterFeatureBackupLocationUIDChangeParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cluster_feature_backup_location_uid_change_responses.go b/api/client/v1/v1_cluster_feature_backup_location_uid_change_responses.go new file mode 100644 index 00000000..9aaa175f --- /dev/null +++ b/api/client/v1/v1_cluster_feature_backup_location_uid_change_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1ClusterFeatureBackupLocationUIDChangeReader is a Reader for the V1ClusterFeatureBackupLocationUIDChange structure. +type V1ClusterFeatureBackupLocationUIDChangeReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1ClusterFeatureBackupLocationUIDChangeReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1ClusterFeatureBackupLocationUIDChangeNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1ClusterFeatureBackupLocationUIDChangeNoContent creates a V1ClusterFeatureBackupLocationUIDChangeNoContent with default headers values +func NewV1ClusterFeatureBackupLocationUIDChangeNoContent() *V1ClusterFeatureBackupLocationUIDChangeNoContent { + return &V1ClusterFeatureBackupLocationUIDChangeNoContent{} +} + +/* +V1ClusterFeatureBackupLocationUIDChangeNoContent handles this case with default header values. + +The resource was updated successfully +*/ +type V1ClusterFeatureBackupLocationUIDChangeNoContent struct { +} + +func (o *V1ClusterFeatureBackupLocationUIDChangeNoContent) Error() string { + return fmt.Sprintf("[PUT /v1/spectroclusters/features/backup/locations/{uid}][%d] v1ClusterFeatureBackupLocationUidChangeNoContent ", 204) +} + +func (o *V1ClusterFeatureBackupLocationUIDChangeNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_cluster_feature_backup_location_uid_get_parameters.go b/api/client/v1/v1_cluster_feature_backup_location_uid_get_parameters.go new file mode 100644 index 00000000..509ce21c --- /dev/null +++ b/api/client/v1/v1_cluster_feature_backup_location_uid_get_parameters.go @@ -0,0 +1,133 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1ClusterFeatureBackupLocationUIDGetParams creates a new V1ClusterFeatureBackupLocationUIDGetParams object +// with the default values initialized. +func NewV1ClusterFeatureBackupLocationUIDGetParams() *V1ClusterFeatureBackupLocationUIDGetParams { + var () + return &V1ClusterFeatureBackupLocationUIDGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1ClusterFeatureBackupLocationUIDGetParamsWithTimeout creates a new V1ClusterFeatureBackupLocationUIDGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1ClusterFeatureBackupLocationUIDGetParamsWithTimeout(timeout time.Duration) *V1ClusterFeatureBackupLocationUIDGetParams { + var () + return &V1ClusterFeatureBackupLocationUIDGetParams{ + + timeout: timeout, + } +} + +// NewV1ClusterFeatureBackupLocationUIDGetParamsWithContext creates a new V1ClusterFeatureBackupLocationUIDGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1ClusterFeatureBackupLocationUIDGetParamsWithContext(ctx context.Context) *V1ClusterFeatureBackupLocationUIDGetParams { + var () + return &V1ClusterFeatureBackupLocationUIDGetParams{ + + Context: ctx, + } +} + +// NewV1ClusterFeatureBackupLocationUIDGetParamsWithHTTPClient creates a new V1ClusterFeatureBackupLocationUIDGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1ClusterFeatureBackupLocationUIDGetParamsWithHTTPClient(client *http.Client) *V1ClusterFeatureBackupLocationUIDGetParams { + var () + return &V1ClusterFeatureBackupLocationUIDGetParams{ + HTTPClient: client, + } +} + +/* +V1ClusterFeatureBackupLocationUIDGetParams contains all the parameters to send to the API endpoint +for the v1 cluster feature backup location Uid get operation typically these are written to a http.Request +*/ +type V1ClusterFeatureBackupLocationUIDGetParams struct { + + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cluster feature backup location Uid get params +func (o *V1ClusterFeatureBackupLocationUIDGetParams) WithTimeout(timeout time.Duration) *V1ClusterFeatureBackupLocationUIDGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cluster feature backup location Uid get params +func (o *V1ClusterFeatureBackupLocationUIDGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cluster feature backup location Uid get params +func (o *V1ClusterFeatureBackupLocationUIDGetParams) WithContext(ctx context.Context) *V1ClusterFeatureBackupLocationUIDGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cluster feature backup location Uid get params +func (o *V1ClusterFeatureBackupLocationUIDGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cluster feature backup location Uid get params +func (o *V1ClusterFeatureBackupLocationUIDGetParams) WithHTTPClient(client *http.Client) *V1ClusterFeatureBackupLocationUIDGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cluster feature backup location Uid get params +func (o *V1ClusterFeatureBackupLocationUIDGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithUID adds the uid to the v1 cluster feature backup location Uid get params +func (o *V1ClusterFeatureBackupLocationUIDGetParams) WithUID(uid string) *V1ClusterFeatureBackupLocationUIDGetParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 cluster feature backup location Uid get params +func (o *V1ClusterFeatureBackupLocationUIDGetParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1ClusterFeatureBackupLocationUIDGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cluster_feature_backup_location_uid_get_responses.go b/api/client/v1/v1_cluster_feature_backup_location_uid_get_responses.go new file mode 100644 index 00000000..28d00cf3 --- /dev/null +++ b/api/client/v1/v1_cluster_feature_backup_location_uid_get_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1ClusterFeatureBackupLocationUIDGetReader is a Reader for the V1ClusterFeatureBackupLocationUIDGet structure. +type V1ClusterFeatureBackupLocationUIDGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1ClusterFeatureBackupLocationUIDGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1ClusterFeatureBackupLocationUIDGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1ClusterFeatureBackupLocationUIDGetOK creates a V1ClusterFeatureBackupLocationUIDGetOK with default headers values +func NewV1ClusterFeatureBackupLocationUIDGetOK() *V1ClusterFeatureBackupLocationUIDGetOK { + return &V1ClusterFeatureBackupLocationUIDGetOK{} +} + +/* +V1ClusterFeatureBackupLocationUIDGetOK handles this case with default header values. + +OK +*/ +type V1ClusterFeatureBackupLocationUIDGetOK struct { + Payload *models.V1ClusterRefs +} + +func (o *V1ClusterFeatureBackupLocationUIDGetOK) Error() string { + return fmt.Sprintf("[GET /v1/spectroclusters/features/backup/locations/{uid}][%d] v1ClusterFeatureBackupLocationUidGetOK %+v", 200, o.Payload) +} + +func (o *V1ClusterFeatureBackupLocationUIDGetOK) GetPayload() *models.V1ClusterRefs { + return o.Payload +} + +func (o *V1ClusterFeatureBackupLocationUIDGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1ClusterRefs) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_cluster_feature_backup_on_demand_create_parameters.go b/api/client/v1/v1_cluster_feature_backup_on_demand_create_parameters.go new file mode 100644 index 00000000..b55547c4 --- /dev/null +++ b/api/client/v1/v1_cluster_feature_backup_on_demand_create_parameters.go @@ -0,0 +1,154 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1ClusterFeatureBackupOnDemandCreateParams creates a new V1ClusterFeatureBackupOnDemandCreateParams object +// with the default values initialized. +func NewV1ClusterFeatureBackupOnDemandCreateParams() *V1ClusterFeatureBackupOnDemandCreateParams { + var () + return &V1ClusterFeatureBackupOnDemandCreateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1ClusterFeatureBackupOnDemandCreateParamsWithTimeout creates a new V1ClusterFeatureBackupOnDemandCreateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1ClusterFeatureBackupOnDemandCreateParamsWithTimeout(timeout time.Duration) *V1ClusterFeatureBackupOnDemandCreateParams { + var () + return &V1ClusterFeatureBackupOnDemandCreateParams{ + + timeout: timeout, + } +} + +// NewV1ClusterFeatureBackupOnDemandCreateParamsWithContext creates a new V1ClusterFeatureBackupOnDemandCreateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1ClusterFeatureBackupOnDemandCreateParamsWithContext(ctx context.Context) *V1ClusterFeatureBackupOnDemandCreateParams { + var () + return &V1ClusterFeatureBackupOnDemandCreateParams{ + + Context: ctx, + } +} + +// NewV1ClusterFeatureBackupOnDemandCreateParamsWithHTTPClient creates a new V1ClusterFeatureBackupOnDemandCreateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1ClusterFeatureBackupOnDemandCreateParamsWithHTTPClient(client *http.Client) *V1ClusterFeatureBackupOnDemandCreateParams { + var () + return &V1ClusterFeatureBackupOnDemandCreateParams{ + HTTPClient: client, + } +} + +/* +V1ClusterFeatureBackupOnDemandCreateParams contains all the parameters to send to the API endpoint +for the v1 cluster feature backup on demand create operation typically these are written to a http.Request +*/ +type V1ClusterFeatureBackupOnDemandCreateParams struct { + + /*Body*/ + Body *models.V1ClusterBackupConfig + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cluster feature backup on demand create params +func (o *V1ClusterFeatureBackupOnDemandCreateParams) WithTimeout(timeout time.Duration) *V1ClusterFeatureBackupOnDemandCreateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cluster feature backup on demand create params +func (o *V1ClusterFeatureBackupOnDemandCreateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cluster feature backup on demand create params +func (o *V1ClusterFeatureBackupOnDemandCreateParams) WithContext(ctx context.Context) *V1ClusterFeatureBackupOnDemandCreateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cluster feature backup on demand create params +func (o *V1ClusterFeatureBackupOnDemandCreateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cluster feature backup on demand create params +func (o *V1ClusterFeatureBackupOnDemandCreateParams) WithHTTPClient(client *http.Client) *V1ClusterFeatureBackupOnDemandCreateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cluster feature backup on demand create params +func (o *V1ClusterFeatureBackupOnDemandCreateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 cluster feature backup on demand create params +func (o *V1ClusterFeatureBackupOnDemandCreateParams) WithBody(body *models.V1ClusterBackupConfig) *V1ClusterFeatureBackupOnDemandCreateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 cluster feature backup on demand create params +func (o *V1ClusterFeatureBackupOnDemandCreateParams) SetBody(body *models.V1ClusterBackupConfig) { + o.Body = body +} + +// WithUID adds the uid to the v1 cluster feature backup on demand create params +func (o *V1ClusterFeatureBackupOnDemandCreateParams) WithUID(uid string) *V1ClusterFeatureBackupOnDemandCreateParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 cluster feature backup on demand create params +func (o *V1ClusterFeatureBackupOnDemandCreateParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1ClusterFeatureBackupOnDemandCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cluster_feature_backup_on_demand_create_responses.go b/api/client/v1/v1_cluster_feature_backup_on_demand_create_responses.go new file mode 100644 index 00000000..3d40b9e9 --- /dev/null +++ b/api/client/v1/v1_cluster_feature_backup_on_demand_create_responses.go @@ -0,0 +1,77 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1ClusterFeatureBackupOnDemandCreateReader is a Reader for the V1ClusterFeatureBackupOnDemandCreate structure. +type V1ClusterFeatureBackupOnDemandCreateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1ClusterFeatureBackupOnDemandCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 201: + result := NewV1ClusterFeatureBackupOnDemandCreateCreated() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1ClusterFeatureBackupOnDemandCreateCreated creates a V1ClusterFeatureBackupOnDemandCreateCreated with default headers values +func NewV1ClusterFeatureBackupOnDemandCreateCreated() *V1ClusterFeatureBackupOnDemandCreateCreated { + return &V1ClusterFeatureBackupOnDemandCreateCreated{} +} + +/* +V1ClusterFeatureBackupOnDemandCreateCreated handles this case with default header values. + +Created successfully +*/ +type V1ClusterFeatureBackupOnDemandCreateCreated struct { + /*Audit uid for the request + */ + AuditUID string + + Payload *models.V1UID +} + +func (o *V1ClusterFeatureBackupOnDemandCreateCreated) Error() string { + return fmt.Sprintf("[POST /v1/spectroclusters/{uid}/features/backup/onDemand][%d] v1ClusterFeatureBackupOnDemandCreateCreated %+v", 201, o.Payload) +} + +func (o *V1ClusterFeatureBackupOnDemandCreateCreated) GetPayload() *models.V1UID { + return o.Payload +} + +func (o *V1ClusterFeatureBackupOnDemandCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header AuditUid + o.AuditUID = response.GetHeader("AuditUid") + + o.Payload = new(models.V1UID) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_cluster_feature_backup_schedule_reset_parameters.go b/api/client/v1/v1_cluster_feature_backup_schedule_reset_parameters.go new file mode 100644 index 00000000..ee4917bf --- /dev/null +++ b/api/client/v1/v1_cluster_feature_backup_schedule_reset_parameters.go @@ -0,0 +1,133 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1ClusterFeatureBackupScheduleResetParams creates a new V1ClusterFeatureBackupScheduleResetParams object +// with the default values initialized. +func NewV1ClusterFeatureBackupScheduleResetParams() *V1ClusterFeatureBackupScheduleResetParams { + var () + return &V1ClusterFeatureBackupScheduleResetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1ClusterFeatureBackupScheduleResetParamsWithTimeout creates a new V1ClusterFeatureBackupScheduleResetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1ClusterFeatureBackupScheduleResetParamsWithTimeout(timeout time.Duration) *V1ClusterFeatureBackupScheduleResetParams { + var () + return &V1ClusterFeatureBackupScheduleResetParams{ + + timeout: timeout, + } +} + +// NewV1ClusterFeatureBackupScheduleResetParamsWithContext creates a new V1ClusterFeatureBackupScheduleResetParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1ClusterFeatureBackupScheduleResetParamsWithContext(ctx context.Context) *V1ClusterFeatureBackupScheduleResetParams { + var () + return &V1ClusterFeatureBackupScheduleResetParams{ + + Context: ctx, + } +} + +// NewV1ClusterFeatureBackupScheduleResetParamsWithHTTPClient creates a new V1ClusterFeatureBackupScheduleResetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1ClusterFeatureBackupScheduleResetParamsWithHTTPClient(client *http.Client) *V1ClusterFeatureBackupScheduleResetParams { + var () + return &V1ClusterFeatureBackupScheduleResetParams{ + HTTPClient: client, + } +} + +/* +V1ClusterFeatureBackupScheduleResetParams contains all the parameters to send to the API endpoint +for the v1 cluster feature backup schedule reset operation typically these are written to a http.Request +*/ +type V1ClusterFeatureBackupScheduleResetParams struct { + + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cluster feature backup schedule reset params +func (o *V1ClusterFeatureBackupScheduleResetParams) WithTimeout(timeout time.Duration) *V1ClusterFeatureBackupScheduleResetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cluster feature backup schedule reset params +func (o *V1ClusterFeatureBackupScheduleResetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cluster feature backup schedule reset params +func (o *V1ClusterFeatureBackupScheduleResetParams) WithContext(ctx context.Context) *V1ClusterFeatureBackupScheduleResetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cluster feature backup schedule reset params +func (o *V1ClusterFeatureBackupScheduleResetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cluster feature backup schedule reset params +func (o *V1ClusterFeatureBackupScheduleResetParams) WithHTTPClient(client *http.Client) *V1ClusterFeatureBackupScheduleResetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cluster feature backup schedule reset params +func (o *V1ClusterFeatureBackupScheduleResetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithUID adds the uid to the v1 cluster feature backup schedule reset params +func (o *V1ClusterFeatureBackupScheduleResetParams) WithUID(uid string) *V1ClusterFeatureBackupScheduleResetParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 cluster feature backup schedule reset params +func (o *V1ClusterFeatureBackupScheduleResetParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1ClusterFeatureBackupScheduleResetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cluster_feature_backup_schedule_reset_responses.go b/api/client/v1/v1_cluster_feature_backup_schedule_reset_responses.go new file mode 100644 index 00000000..7f0eb23c --- /dev/null +++ b/api/client/v1/v1_cluster_feature_backup_schedule_reset_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1ClusterFeatureBackupScheduleResetReader is a Reader for the V1ClusterFeatureBackupScheduleReset structure. +type V1ClusterFeatureBackupScheduleResetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1ClusterFeatureBackupScheduleResetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1ClusterFeatureBackupScheduleResetNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1ClusterFeatureBackupScheduleResetNoContent creates a V1ClusterFeatureBackupScheduleResetNoContent with default headers values +func NewV1ClusterFeatureBackupScheduleResetNoContent() *V1ClusterFeatureBackupScheduleResetNoContent { + return &V1ClusterFeatureBackupScheduleResetNoContent{} +} + +/* +V1ClusterFeatureBackupScheduleResetNoContent handles this case with default header values. + +The resource was deleted successfully +*/ +type V1ClusterFeatureBackupScheduleResetNoContent struct { +} + +func (o *V1ClusterFeatureBackupScheduleResetNoContent) Error() string { + return fmt.Sprintf("[DELETE /v1/spectroclusters/{uid}/features/backup][%d] v1ClusterFeatureBackupScheduleResetNoContent ", 204) +} + +func (o *V1ClusterFeatureBackupScheduleResetNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_cluster_feature_backup_update_parameters.go b/api/client/v1/v1_cluster_feature_backup_update_parameters.go new file mode 100644 index 00000000..e2ca5bfc --- /dev/null +++ b/api/client/v1/v1_cluster_feature_backup_update_parameters.go @@ -0,0 +1,154 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1ClusterFeatureBackupUpdateParams creates a new V1ClusterFeatureBackupUpdateParams object +// with the default values initialized. +func NewV1ClusterFeatureBackupUpdateParams() *V1ClusterFeatureBackupUpdateParams { + var () + return &V1ClusterFeatureBackupUpdateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1ClusterFeatureBackupUpdateParamsWithTimeout creates a new V1ClusterFeatureBackupUpdateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1ClusterFeatureBackupUpdateParamsWithTimeout(timeout time.Duration) *V1ClusterFeatureBackupUpdateParams { + var () + return &V1ClusterFeatureBackupUpdateParams{ + + timeout: timeout, + } +} + +// NewV1ClusterFeatureBackupUpdateParamsWithContext creates a new V1ClusterFeatureBackupUpdateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1ClusterFeatureBackupUpdateParamsWithContext(ctx context.Context) *V1ClusterFeatureBackupUpdateParams { + var () + return &V1ClusterFeatureBackupUpdateParams{ + + Context: ctx, + } +} + +// NewV1ClusterFeatureBackupUpdateParamsWithHTTPClient creates a new V1ClusterFeatureBackupUpdateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1ClusterFeatureBackupUpdateParamsWithHTTPClient(client *http.Client) *V1ClusterFeatureBackupUpdateParams { + var () + return &V1ClusterFeatureBackupUpdateParams{ + HTTPClient: client, + } +} + +/* +V1ClusterFeatureBackupUpdateParams contains all the parameters to send to the API endpoint +for the v1 cluster feature backup update operation typically these are written to a http.Request +*/ +type V1ClusterFeatureBackupUpdateParams struct { + + /*Body*/ + Body *models.V1ClusterBackupConfig + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cluster feature backup update params +func (o *V1ClusterFeatureBackupUpdateParams) WithTimeout(timeout time.Duration) *V1ClusterFeatureBackupUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cluster feature backup update params +func (o *V1ClusterFeatureBackupUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cluster feature backup update params +func (o *V1ClusterFeatureBackupUpdateParams) WithContext(ctx context.Context) *V1ClusterFeatureBackupUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cluster feature backup update params +func (o *V1ClusterFeatureBackupUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cluster feature backup update params +func (o *V1ClusterFeatureBackupUpdateParams) WithHTTPClient(client *http.Client) *V1ClusterFeatureBackupUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cluster feature backup update params +func (o *V1ClusterFeatureBackupUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 cluster feature backup update params +func (o *V1ClusterFeatureBackupUpdateParams) WithBody(body *models.V1ClusterBackupConfig) *V1ClusterFeatureBackupUpdateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 cluster feature backup update params +func (o *V1ClusterFeatureBackupUpdateParams) SetBody(body *models.V1ClusterBackupConfig) { + o.Body = body +} + +// WithUID adds the uid to the v1 cluster feature backup update params +func (o *V1ClusterFeatureBackupUpdateParams) WithUID(uid string) *V1ClusterFeatureBackupUpdateParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 cluster feature backup update params +func (o *V1ClusterFeatureBackupUpdateParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1ClusterFeatureBackupUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cluster_feature_backup_update_responses.go b/api/client/v1/v1_cluster_feature_backup_update_responses.go new file mode 100644 index 00000000..23adf45b --- /dev/null +++ b/api/client/v1/v1_cluster_feature_backup_update_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1ClusterFeatureBackupUpdateReader is a Reader for the V1ClusterFeatureBackupUpdate structure. +type V1ClusterFeatureBackupUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1ClusterFeatureBackupUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1ClusterFeatureBackupUpdateNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1ClusterFeatureBackupUpdateNoContent creates a V1ClusterFeatureBackupUpdateNoContent with default headers values +func NewV1ClusterFeatureBackupUpdateNoContent() *V1ClusterFeatureBackupUpdateNoContent { + return &V1ClusterFeatureBackupUpdateNoContent{} +} + +/* +V1ClusterFeatureBackupUpdateNoContent handles this case with default header values. + +The resource was updated successfully +*/ +type V1ClusterFeatureBackupUpdateNoContent struct { +} + +func (o *V1ClusterFeatureBackupUpdateNoContent) Error() string { + return fmt.Sprintf("[PUT /v1/spectroclusters/{uid}/features/backup][%d] v1ClusterFeatureBackupUpdateNoContent ", 204) +} + +func (o *V1ClusterFeatureBackupUpdateNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_cluster_feature_compliance_scan_create_parameters.go b/api/client/v1/v1_cluster_feature_compliance_scan_create_parameters.go new file mode 100644 index 00000000..cb558e75 --- /dev/null +++ b/api/client/v1/v1_cluster_feature_compliance_scan_create_parameters.go @@ -0,0 +1,154 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1ClusterFeatureComplianceScanCreateParams creates a new V1ClusterFeatureComplianceScanCreateParams object +// with the default values initialized. +func NewV1ClusterFeatureComplianceScanCreateParams() *V1ClusterFeatureComplianceScanCreateParams { + var () + return &V1ClusterFeatureComplianceScanCreateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1ClusterFeatureComplianceScanCreateParamsWithTimeout creates a new V1ClusterFeatureComplianceScanCreateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1ClusterFeatureComplianceScanCreateParamsWithTimeout(timeout time.Duration) *V1ClusterFeatureComplianceScanCreateParams { + var () + return &V1ClusterFeatureComplianceScanCreateParams{ + + timeout: timeout, + } +} + +// NewV1ClusterFeatureComplianceScanCreateParamsWithContext creates a new V1ClusterFeatureComplianceScanCreateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1ClusterFeatureComplianceScanCreateParamsWithContext(ctx context.Context) *V1ClusterFeatureComplianceScanCreateParams { + var () + return &V1ClusterFeatureComplianceScanCreateParams{ + + Context: ctx, + } +} + +// NewV1ClusterFeatureComplianceScanCreateParamsWithHTTPClient creates a new V1ClusterFeatureComplianceScanCreateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1ClusterFeatureComplianceScanCreateParamsWithHTTPClient(client *http.Client) *V1ClusterFeatureComplianceScanCreateParams { + var () + return &V1ClusterFeatureComplianceScanCreateParams{ + HTTPClient: client, + } +} + +/* +V1ClusterFeatureComplianceScanCreateParams contains all the parameters to send to the API endpoint +for the v1 cluster feature compliance scan create operation typically these are written to a http.Request +*/ +type V1ClusterFeatureComplianceScanCreateParams struct { + + /*Body*/ + Body *models.V1ClusterComplianceScheduleConfig + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cluster feature compliance scan create params +func (o *V1ClusterFeatureComplianceScanCreateParams) WithTimeout(timeout time.Duration) *V1ClusterFeatureComplianceScanCreateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cluster feature compliance scan create params +func (o *V1ClusterFeatureComplianceScanCreateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cluster feature compliance scan create params +func (o *V1ClusterFeatureComplianceScanCreateParams) WithContext(ctx context.Context) *V1ClusterFeatureComplianceScanCreateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cluster feature compliance scan create params +func (o *V1ClusterFeatureComplianceScanCreateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cluster feature compliance scan create params +func (o *V1ClusterFeatureComplianceScanCreateParams) WithHTTPClient(client *http.Client) *V1ClusterFeatureComplianceScanCreateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cluster feature compliance scan create params +func (o *V1ClusterFeatureComplianceScanCreateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 cluster feature compliance scan create params +func (o *V1ClusterFeatureComplianceScanCreateParams) WithBody(body *models.V1ClusterComplianceScheduleConfig) *V1ClusterFeatureComplianceScanCreateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 cluster feature compliance scan create params +func (o *V1ClusterFeatureComplianceScanCreateParams) SetBody(body *models.V1ClusterComplianceScheduleConfig) { + o.Body = body +} + +// WithUID adds the uid to the v1 cluster feature compliance scan create params +func (o *V1ClusterFeatureComplianceScanCreateParams) WithUID(uid string) *V1ClusterFeatureComplianceScanCreateParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 cluster feature compliance scan create params +func (o *V1ClusterFeatureComplianceScanCreateParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1ClusterFeatureComplianceScanCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cluster_feature_compliance_scan_create_responses.go b/api/client/v1/v1_cluster_feature_compliance_scan_create_responses.go new file mode 100644 index 00000000..41f617af --- /dev/null +++ b/api/client/v1/v1_cluster_feature_compliance_scan_create_responses.go @@ -0,0 +1,77 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1ClusterFeatureComplianceScanCreateReader is a Reader for the V1ClusterFeatureComplianceScanCreate structure. +type V1ClusterFeatureComplianceScanCreateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1ClusterFeatureComplianceScanCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 201: + result := NewV1ClusterFeatureComplianceScanCreateCreated() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1ClusterFeatureComplianceScanCreateCreated creates a V1ClusterFeatureComplianceScanCreateCreated with default headers values +func NewV1ClusterFeatureComplianceScanCreateCreated() *V1ClusterFeatureComplianceScanCreateCreated { + return &V1ClusterFeatureComplianceScanCreateCreated{} +} + +/* +V1ClusterFeatureComplianceScanCreateCreated handles this case with default header values. + +Created successfully +*/ +type V1ClusterFeatureComplianceScanCreateCreated struct { + /*Audit uid for the request + */ + AuditUID string + + Payload *models.V1UID +} + +func (o *V1ClusterFeatureComplianceScanCreateCreated) Error() string { + return fmt.Sprintf("[POST /v1/spectroclusters/{uid}/features/complianceScan][%d] v1ClusterFeatureComplianceScanCreateCreated %+v", 201, o.Payload) +} + +func (o *V1ClusterFeatureComplianceScanCreateCreated) GetPayload() *models.V1UID { + return o.Payload +} + +func (o *V1ClusterFeatureComplianceScanCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header AuditUid + o.AuditUID = response.GetHeader("AuditUid") + + o.Payload = new(models.V1UID) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_cluster_feature_compliance_scan_get_parameters.go b/api/client/v1/v1_cluster_feature_compliance_scan_get_parameters.go new file mode 100644 index 00000000..ad187576 --- /dev/null +++ b/api/client/v1/v1_cluster_feature_compliance_scan_get_parameters.go @@ -0,0 +1,133 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1ClusterFeatureComplianceScanGetParams creates a new V1ClusterFeatureComplianceScanGetParams object +// with the default values initialized. +func NewV1ClusterFeatureComplianceScanGetParams() *V1ClusterFeatureComplianceScanGetParams { + var () + return &V1ClusterFeatureComplianceScanGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1ClusterFeatureComplianceScanGetParamsWithTimeout creates a new V1ClusterFeatureComplianceScanGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1ClusterFeatureComplianceScanGetParamsWithTimeout(timeout time.Duration) *V1ClusterFeatureComplianceScanGetParams { + var () + return &V1ClusterFeatureComplianceScanGetParams{ + + timeout: timeout, + } +} + +// NewV1ClusterFeatureComplianceScanGetParamsWithContext creates a new V1ClusterFeatureComplianceScanGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1ClusterFeatureComplianceScanGetParamsWithContext(ctx context.Context) *V1ClusterFeatureComplianceScanGetParams { + var () + return &V1ClusterFeatureComplianceScanGetParams{ + + Context: ctx, + } +} + +// NewV1ClusterFeatureComplianceScanGetParamsWithHTTPClient creates a new V1ClusterFeatureComplianceScanGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1ClusterFeatureComplianceScanGetParamsWithHTTPClient(client *http.Client) *V1ClusterFeatureComplianceScanGetParams { + var () + return &V1ClusterFeatureComplianceScanGetParams{ + HTTPClient: client, + } +} + +/* +V1ClusterFeatureComplianceScanGetParams contains all the parameters to send to the API endpoint +for the v1 cluster feature compliance scan get operation typically these are written to a http.Request +*/ +type V1ClusterFeatureComplianceScanGetParams struct { + + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cluster feature compliance scan get params +func (o *V1ClusterFeatureComplianceScanGetParams) WithTimeout(timeout time.Duration) *V1ClusterFeatureComplianceScanGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cluster feature compliance scan get params +func (o *V1ClusterFeatureComplianceScanGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cluster feature compliance scan get params +func (o *V1ClusterFeatureComplianceScanGetParams) WithContext(ctx context.Context) *V1ClusterFeatureComplianceScanGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cluster feature compliance scan get params +func (o *V1ClusterFeatureComplianceScanGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cluster feature compliance scan get params +func (o *V1ClusterFeatureComplianceScanGetParams) WithHTTPClient(client *http.Client) *V1ClusterFeatureComplianceScanGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cluster feature compliance scan get params +func (o *V1ClusterFeatureComplianceScanGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithUID adds the uid to the v1 cluster feature compliance scan get params +func (o *V1ClusterFeatureComplianceScanGetParams) WithUID(uid string) *V1ClusterFeatureComplianceScanGetParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 cluster feature compliance scan get params +func (o *V1ClusterFeatureComplianceScanGetParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1ClusterFeatureComplianceScanGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cluster_feature_compliance_scan_get_responses.go b/api/client/v1/v1_cluster_feature_compliance_scan_get_responses.go new file mode 100644 index 00000000..80ebea28 --- /dev/null +++ b/api/client/v1/v1_cluster_feature_compliance_scan_get_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1ClusterFeatureComplianceScanGetReader is a Reader for the V1ClusterFeatureComplianceScanGet structure. +type V1ClusterFeatureComplianceScanGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1ClusterFeatureComplianceScanGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1ClusterFeatureComplianceScanGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1ClusterFeatureComplianceScanGetOK creates a V1ClusterFeatureComplianceScanGetOK with default headers values +func NewV1ClusterFeatureComplianceScanGetOK() *V1ClusterFeatureComplianceScanGetOK { + return &V1ClusterFeatureComplianceScanGetOK{} +} + +/* +V1ClusterFeatureComplianceScanGetOK handles this case with default header values. + +OK +*/ +type V1ClusterFeatureComplianceScanGetOK struct { + Payload *models.V1ClusterComplianceScan +} + +func (o *V1ClusterFeatureComplianceScanGetOK) Error() string { + return fmt.Sprintf("[GET /v1/spectroclusters/{uid}/features/complianceScan][%d] v1ClusterFeatureComplianceScanGetOK %+v", 200, o.Payload) +} + +func (o *V1ClusterFeatureComplianceScanGetOK) GetPayload() *models.V1ClusterComplianceScan { + return o.Payload +} + +func (o *V1ClusterFeatureComplianceScanGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1ClusterComplianceScan) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_cluster_feature_compliance_scan_log_delete_parameters.go b/api/client/v1/v1_cluster_feature_compliance_scan_log_delete_parameters.go new file mode 100644 index 00000000..1610fff3 --- /dev/null +++ b/api/client/v1/v1_cluster_feature_compliance_scan_log_delete_parameters.go @@ -0,0 +1,151 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1ClusterFeatureComplianceScanLogDeleteParams creates a new V1ClusterFeatureComplianceScanLogDeleteParams object +// with the default values initialized. +func NewV1ClusterFeatureComplianceScanLogDeleteParams() *V1ClusterFeatureComplianceScanLogDeleteParams { + var () + return &V1ClusterFeatureComplianceScanLogDeleteParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1ClusterFeatureComplianceScanLogDeleteParamsWithTimeout creates a new V1ClusterFeatureComplianceScanLogDeleteParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1ClusterFeatureComplianceScanLogDeleteParamsWithTimeout(timeout time.Duration) *V1ClusterFeatureComplianceScanLogDeleteParams { + var () + return &V1ClusterFeatureComplianceScanLogDeleteParams{ + + timeout: timeout, + } +} + +// NewV1ClusterFeatureComplianceScanLogDeleteParamsWithContext creates a new V1ClusterFeatureComplianceScanLogDeleteParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1ClusterFeatureComplianceScanLogDeleteParamsWithContext(ctx context.Context) *V1ClusterFeatureComplianceScanLogDeleteParams { + var () + return &V1ClusterFeatureComplianceScanLogDeleteParams{ + + Context: ctx, + } +} + +// NewV1ClusterFeatureComplianceScanLogDeleteParamsWithHTTPClient creates a new V1ClusterFeatureComplianceScanLogDeleteParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1ClusterFeatureComplianceScanLogDeleteParamsWithHTTPClient(client *http.Client) *V1ClusterFeatureComplianceScanLogDeleteParams { + var () + return &V1ClusterFeatureComplianceScanLogDeleteParams{ + HTTPClient: client, + } +} + +/* +V1ClusterFeatureComplianceScanLogDeleteParams contains all the parameters to send to the API endpoint +for the v1 cluster feature compliance scan log delete operation typically these are written to a http.Request +*/ +type V1ClusterFeatureComplianceScanLogDeleteParams struct { + + /*LogUID*/ + LogUID string + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cluster feature compliance scan log delete params +func (o *V1ClusterFeatureComplianceScanLogDeleteParams) WithTimeout(timeout time.Duration) *V1ClusterFeatureComplianceScanLogDeleteParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cluster feature compliance scan log delete params +func (o *V1ClusterFeatureComplianceScanLogDeleteParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cluster feature compliance scan log delete params +func (o *V1ClusterFeatureComplianceScanLogDeleteParams) WithContext(ctx context.Context) *V1ClusterFeatureComplianceScanLogDeleteParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cluster feature compliance scan log delete params +func (o *V1ClusterFeatureComplianceScanLogDeleteParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cluster feature compliance scan log delete params +func (o *V1ClusterFeatureComplianceScanLogDeleteParams) WithHTTPClient(client *http.Client) *V1ClusterFeatureComplianceScanLogDeleteParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cluster feature compliance scan log delete params +func (o *V1ClusterFeatureComplianceScanLogDeleteParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithLogUID adds the logUID to the v1 cluster feature compliance scan log delete params +func (o *V1ClusterFeatureComplianceScanLogDeleteParams) WithLogUID(logUID string) *V1ClusterFeatureComplianceScanLogDeleteParams { + o.SetLogUID(logUID) + return o +} + +// SetLogUID adds the logUid to the v1 cluster feature compliance scan log delete params +func (o *V1ClusterFeatureComplianceScanLogDeleteParams) SetLogUID(logUID string) { + o.LogUID = logUID +} + +// WithUID adds the uid to the v1 cluster feature compliance scan log delete params +func (o *V1ClusterFeatureComplianceScanLogDeleteParams) WithUID(uid string) *V1ClusterFeatureComplianceScanLogDeleteParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 cluster feature compliance scan log delete params +func (o *V1ClusterFeatureComplianceScanLogDeleteParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1ClusterFeatureComplianceScanLogDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param logUid + if err := r.SetPathParam("logUid", o.LogUID); err != nil { + return err + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cluster_feature_compliance_scan_log_delete_responses.go b/api/client/v1/v1_cluster_feature_compliance_scan_log_delete_responses.go new file mode 100644 index 00000000..971d9a56 --- /dev/null +++ b/api/client/v1/v1_cluster_feature_compliance_scan_log_delete_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1ClusterFeatureComplianceScanLogDeleteReader is a Reader for the V1ClusterFeatureComplianceScanLogDelete structure. +type V1ClusterFeatureComplianceScanLogDeleteReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1ClusterFeatureComplianceScanLogDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1ClusterFeatureComplianceScanLogDeleteNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1ClusterFeatureComplianceScanLogDeleteNoContent creates a V1ClusterFeatureComplianceScanLogDeleteNoContent with default headers values +func NewV1ClusterFeatureComplianceScanLogDeleteNoContent() *V1ClusterFeatureComplianceScanLogDeleteNoContent { + return &V1ClusterFeatureComplianceScanLogDeleteNoContent{} +} + +/* +V1ClusterFeatureComplianceScanLogDeleteNoContent handles this case with default header values. + +The resource was deleted successfully +*/ +type V1ClusterFeatureComplianceScanLogDeleteNoContent struct { +} + +func (o *V1ClusterFeatureComplianceScanLogDeleteNoContent) Error() string { + return fmt.Sprintf("[DELETE /v1/spectroclusters/{uid}/features/complianceScan/logs/{logUid}][%d] v1ClusterFeatureComplianceScanLogDeleteNoContent ", 204) +} + +func (o *V1ClusterFeatureComplianceScanLogDeleteNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_cluster_feature_compliance_scan_logs_get_parameters.go b/api/client/v1/v1_cluster_feature_compliance_scan_logs_get_parameters.go new file mode 100644 index 00000000..ada6bf74 --- /dev/null +++ b/api/client/v1/v1_cluster_feature_compliance_scan_logs_get_parameters.go @@ -0,0 +1,133 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1ClusterFeatureComplianceScanLogsGetParams creates a new V1ClusterFeatureComplianceScanLogsGetParams object +// with the default values initialized. +func NewV1ClusterFeatureComplianceScanLogsGetParams() *V1ClusterFeatureComplianceScanLogsGetParams { + var () + return &V1ClusterFeatureComplianceScanLogsGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1ClusterFeatureComplianceScanLogsGetParamsWithTimeout creates a new V1ClusterFeatureComplianceScanLogsGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1ClusterFeatureComplianceScanLogsGetParamsWithTimeout(timeout time.Duration) *V1ClusterFeatureComplianceScanLogsGetParams { + var () + return &V1ClusterFeatureComplianceScanLogsGetParams{ + + timeout: timeout, + } +} + +// NewV1ClusterFeatureComplianceScanLogsGetParamsWithContext creates a new V1ClusterFeatureComplianceScanLogsGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1ClusterFeatureComplianceScanLogsGetParamsWithContext(ctx context.Context) *V1ClusterFeatureComplianceScanLogsGetParams { + var () + return &V1ClusterFeatureComplianceScanLogsGetParams{ + + Context: ctx, + } +} + +// NewV1ClusterFeatureComplianceScanLogsGetParamsWithHTTPClient creates a new V1ClusterFeatureComplianceScanLogsGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1ClusterFeatureComplianceScanLogsGetParamsWithHTTPClient(client *http.Client) *V1ClusterFeatureComplianceScanLogsGetParams { + var () + return &V1ClusterFeatureComplianceScanLogsGetParams{ + HTTPClient: client, + } +} + +/* +V1ClusterFeatureComplianceScanLogsGetParams contains all the parameters to send to the API endpoint +for the v1 cluster feature compliance scan logs get operation typically these are written to a http.Request +*/ +type V1ClusterFeatureComplianceScanLogsGetParams struct { + + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cluster feature compliance scan logs get params +func (o *V1ClusterFeatureComplianceScanLogsGetParams) WithTimeout(timeout time.Duration) *V1ClusterFeatureComplianceScanLogsGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cluster feature compliance scan logs get params +func (o *V1ClusterFeatureComplianceScanLogsGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cluster feature compliance scan logs get params +func (o *V1ClusterFeatureComplianceScanLogsGetParams) WithContext(ctx context.Context) *V1ClusterFeatureComplianceScanLogsGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cluster feature compliance scan logs get params +func (o *V1ClusterFeatureComplianceScanLogsGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cluster feature compliance scan logs get params +func (o *V1ClusterFeatureComplianceScanLogsGetParams) WithHTTPClient(client *http.Client) *V1ClusterFeatureComplianceScanLogsGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cluster feature compliance scan logs get params +func (o *V1ClusterFeatureComplianceScanLogsGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithUID adds the uid to the v1 cluster feature compliance scan logs get params +func (o *V1ClusterFeatureComplianceScanLogsGetParams) WithUID(uid string) *V1ClusterFeatureComplianceScanLogsGetParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 cluster feature compliance scan logs get params +func (o *V1ClusterFeatureComplianceScanLogsGetParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1ClusterFeatureComplianceScanLogsGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cluster_feature_compliance_scan_logs_get_responses.go b/api/client/v1/v1_cluster_feature_compliance_scan_logs_get_responses.go new file mode 100644 index 00000000..2ff2d1d8 --- /dev/null +++ b/api/client/v1/v1_cluster_feature_compliance_scan_logs_get_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1ClusterFeatureComplianceScanLogsGetReader is a Reader for the V1ClusterFeatureComplianceScanLogsGet structure. +type V1ClusterFeatureComplianceScanLogsGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1ClusterFeatureComplianceScanLogsGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1ClusterFeatureComplianceScanLogsGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1ClusterFeatureComplianceScanLogsGetOK creates a V1ClusterFeatureComplianceScanLogsGetOK with default headers values +func NewV1ClusterFeatureComplianceScanLogsGetOK() *V1ClusterFeatureComplianceScanLogsGetOK { + return &V1ClusterFeatureComplianceScanLogsGetOK{} +} + +/* +V1ClusterFeatureComplianceScanLogsGetOK handles this case with default header values. + +OK +*/ +type V1ClusterFeatureComplianceScanLogsGetOK struct { + Payload *models.V1ClusterComplianceScanLogs +} + +func (o *V1ClusterFeatureComplianceScanLogsGetOK) Error() string { + return fmt.Sprintf("[GET /v1/spectroclusters/{uid}/features/complianceScan/logs/drivers][%d] v1ClusterFeatureComplianceScanLogsGetOK %+v", 200, o.Payload) +} + +func (o *V1ClusterFeatureComplianceScanLogsGetOK) GetPayload() *models.V1ClusterComplianceScanLogs { + return o.Payload +} + +func (o *V1ClusterFeatureComplianceScanLogsGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1ClusterComplianceScanLogs) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_cluster_feature_compliance_scan_on_demand_create_parameters.go b/api/client/v1/v1_cluster_feature_compliance_scan_on_demand_create_parameters.go new file mode 100644 index 00000000..5632f252 --- /dev/null +++ b/api/client/v1/v1_cluster_feature_compliance_scan_on_demand_create_parameters.go @@ -0,0 +1,154 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1ClusterFeatureComplianceScanOnDemandCreateParams creates a new V1ClusterFeatureComplianceScanOnDemandCreateParams object +// with the default values initialized. +func NewV1ClusterFeatureComplianceScanOnDemandCreateParams() *V1ClusterFeatureComplianceScanOnDemandCreateParams { + var () + return &V1ClusterFeatureComplianceScanOnDemandCreateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1ClusterFeatureComplianceScanOnDemandCreateParamsWithTimeout creates a new V1ClusterFeatureComplianceScanOnDemandCreateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1ClusterFeatureComplianceScanOnDemandCreateParamsWithTimeout(timeout time.Duration) *V1ClusterFeatureComplianceScanOnDemandCreateParams { + var () + return &V1ClusterFeatureComplianceScanOnDemandCreateParams{ + + timeout: timeout, + } +} + +// NewV1ClusterFeatureComplianceScanOnDemandCreateParamsWithContext creates a new V1ClusterFeatureComplianceScanOnDemandCreateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1ClusterFeatureComplianceScanOnDemandCreateParamsWithContext(ctx context.Context) *V1ClusterFeatureComplianceScanOnDemandCreateParams { + var () + return &V1ClusterFeatureComplianceScanOnDemandCreateParams{ + + Context: ctx, + } +} + +// NewV1ClusterFeatureComplianceScanOnDemandCreateParamsWithHTTPClient creates a new V1ClusterFeatureComplianceScanOnDemandCreateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1ClusterFeatureComplianceScanOnDemandCreateParamsWithHTTPClient(client *http.Client) *V1ClusterFeatureComplianceScanOnDemandCreateParams { + var () + return &V1ClusterFeatureComplianceScanOnDemandCreateParams{ + HTTPClient: client, + } +} + +/* +V1ClusterFeatureComplianceScanOnDemandCreateParams contains all the parameters to send to the API endpoint +for the v1 cluster feature compliance scan on demand create operation typically these are written to a http.Request +*/ +type V1ClusterFeatureComplianceScanOnDemandCreateParams struct { + + /*Body*/ + Body *models.V1ClusterComplianceOnDemandConfig + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cluster feature compliance scan on demand create params +func (o *V1ClusterFeatureComplianceScanOnDemandCreateParams) WithTimeout(timeout time.Duration) *V1ClusterFeatureComplianceScanOnDemandCreateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cluster feature compliance scan on demand create params +func (o *V1ClusterFeatureComplianceScanOnDemandCreateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cluster feature compliance scan on demand create params +func (o *V1ClusterFeatureComplianceScanOnDemandCreateParams) WithContext(ctx context.Context) *V1ClusterFeatureComplianceScanOnDemandCreateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cluster feature compliance scan on demand create params +func (o *V1ClusterFeatureComplianceScanOnDemandCreateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cluster feature compliance scan on demand create params +func (o *V1ClusterFeatureComplianceScanOnDemandCreateParams) WithHTTPClient(client *http.Client) *V1ClusterFeatureComplianceScanOnDemandCreateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cluster feature compliance scan on demand create params +func (o *V1ClusterFeatureComplianceScanOnDemandCreateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 cluster feature compliance scan on demand create params +func (o *V1ClusterFeatureComplianceScanOnDemandCreateParams) WithBody(body *models.V1ClusterComplianceOnDemandConfig) *V1ClusterFeatureComplianceScanOnDemandCreateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 cluster feature compliance scan on demand create params +func (o *V1ClusterFeatureComplianceScanOnDemandCreateParams) SetBody(body *models.V1ClusterComplianceOnDemandConfig) { + o.Body = body +} + +// WithUID adds the uid to the v1 cluster feature compliance scan on demand create params +func (o *V1ClusterFeatureComplianceScanOnDemandCreateParams) WithUID(uid string) *V1ClusterFeatureComplianceScanOnDemandCreateParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 cluster feature compliance scan on demand create params +func (o *V1ClusterFeatureComplianceScanOnDemandCreateParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1ClusterFeatureComplianceScanOnDemandCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cluster_feature_compliance_scan_on_demand_create_responses.go b/api/client/v1/v1_cluster_feature_compliance_scan_on_demand_create_responses.go new file mode 100644 index 00000000..1aceaae3 --- /dev/null +++ b/api/client/v1/v1_cluster_feature_compliance_scan_on_demand_create_responses.go @@ -0,0 +1,77 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1ClusterFeatureComplianceScanOnDemandCreateReader is a Reader for the V1ClusterFeatureComplianceScanOnDemandCreate structure. +type V1ClusterFeatureComplianceScanOnDemandCreateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1ClusterFeatureComplianceScanOnDemandCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 201: + result := NewV1ClusterFeatureComplianceScanOnDemandCreateCreated() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1ClusterFeatureComplianceScanOnDemandCreateCreated creates a V1ClusterFeatureComplianceScanOnDemandCreateCreated with default headers values +func NewV1ClusterFeatureComplianceScanOnDemandCreateCreated() *V1ClusterFeatureComplianceScanOnDemandCreateCreated { + return &V1ClusterFeatureComplianceScanOnDemandCreateCreated{} +} + +/* +V1ClusterFeatureComplianceScanOnDemandCreateCreated handles this case with default header values. + +Created successfully +*/ +type V1ClusterFeatureComplianceScanOnDemandCreateCreated struct { + /*Audit uid for the request + */ + AuditUID string + + Payload *models.V1UID +} + +func (o *V1ClusterFeatureComplianceScanOnDemandCreateCreated) Error() string { + return fmt.Sprintf("[POST /v1/spectroclusters/{uid}/features/complianceScan/onDemand][%d] v1ClusterFeatureComplianceScanOnDemandCreateCreated %+v", 201, o.Payload) +} + +func (o *V1ClusterFeatureComplianceScanOnDemandCreateCreated) GetPayload() *models.V1UID { + return o.Payload +} + +func (o *V1ClusterFeatureComplianceScanOnDemandCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header AuditUid + o.AuditUID = response.GetHeader("AuditUid") + + o.Payload = new(models.V1UID) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_cluster_feature_compliance_scan_update_parameters.go b/api/client/v1/v1_cluster_feature_compliance_scan_update_parameters.go new file mode 100644 index 00000000..08f0449b --- /dev/null +++ b/api/client/v1/v1_cluster_feature_compliance_scan_update_parameters.go @@ -0,0 +1,154 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1ClusterFeatureComplianceScanUpdateParams creates a new V1ClusterFeatureComplianceScanUpdateParams object +// with the default values initialized. +func NewV1ClusterFeatureComplianceScanUpdateParams() *V1ClusterFeatureComplianceScanUpdateParams { + var () + return &V1ClusterFeatureComplianceScanUpdateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1ClusterFeatureComplianceScanUpdateParamsWithTimeout creates a new V1ClusterFeatureComplianceScanUpdateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1ClusterFeatureComplianceScanUpdateParamsWithTimeout(timeout time.Duration) *V1ClusterFeatureComplianceScanUpdateParams { + var () + return &V1ClusterFeatureComplianceScanUpdateParams{ + + timeout: timeout, + } +} + +// NewV1ClusterFeatureComplianceScanUpdateParamsWithContext creates a new V1ClusterFeatureComplianceScanUpdateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1ClusterFeatureComplianceScanUpdateParamsWithContext(ctx context.Context) *V1ClusterFeatureComplianceScanUpdateParams { + var () + return &V1ClusterFeatureComplianceScanUpdateParams{ + + Context: ctx, + } +} + +// NewV1ClusterFeatureComplianceScanUpdateParamsWithHTTPClient creates a new V1ClusterFeatureComplianceScanUpdateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1ClusterFeatureComplianceScanUpdateParamsWithHTTPClient(client *http.Client) *V1ClusterFeatureComplianceScanUpdateParams { + var () + return &V1ClusterFeatureComplianceScanUpdateParams{ + HTTPClient: client, + } +} + +/* +V1ClusterFeatureComplianceScanUpdateParams contains all the parameters to send to the API endpoint +for the v1 cluster feature compliance scan update operation typically these are written to a http.Request +*/ +type V1ClusterFeatureComplianceScanUpdateParams struct { + + /*Body*/ + Body *models.V1ClusterComplianceScheduleConfig + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cluster feature compliance scan update params +func (o *V1ClusterFeatureComplianceScanUpdateParams) WithTimeout(timeout time.Duration) *V1ClusterFeatureComplianceScanUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cluster feature compliance scan update params +func (o *V1ClusterFeatureComplianceScanUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cluster feature compliance scan update params +func (o *V1ClusterFeatureComplianceScanUpdateParams) WithContext(ctx context.Context) *V1ClusterFeatureComplianceScanUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cluster feature compliance scan update params +func (o *V1ClusterFeatureComplianceScanUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cluster feature compliance scan update params +func (o *V1ClusterFeatureComplianceScanUpdateParams) WithHTTPClient(client *http.Client) *V1ClusterFeatureComplianceScanUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cluster feature compliance scan update params +func (o *V1ClusterFeatureComplianceScanUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 cluster feature compliance scan update params +func (o *V1ClusterFeatureComplianceScanUpdateParams) WithBody(body *models.V1ClusterComplianceScheduleConfig) *V1ClusterFeatureComplianceScanUpdateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 cluster feature compliance scan update params +func (o *V1ClusterFeatureComplianceScanUpdateParams) SetBody(body *models.V1ClusterComplianceScheduleConfig) { + o.Body = body +} + +// WithUID adds the uid to the v1 cluster feature compliance scan update params +func (o *V1ClusterFeatureComplianceScanUpdateParams) WithUID(uid string) *V1ClusterFeatureComplianceScanUpdateParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 cluster feature compliance scan update params +func (o *V1ClusterFeatureComplianceScanUpdateParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1ClusterFeatureComplianceScanUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cluster_feature_compliance_scan_update_responses.go b/api/client/v1/v1_cluster_feature_compliance_scan_update_responses.go new file mode 100644 index 00000000..76f55a10 --- /dev/null +++ b/api/client/v1/v1_cluster_feature_compliance_scan_update_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1ClusterFeatureComplianceScanUpdateReader is a Reader for the V1ClusterFeatureComplianceScanUpdate structure. +type V1ClusterFeatureComplianceScanUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1ClusterFeatureComplianceScanUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1ClusterFeatureComplianceScanUpdateNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1ClusterFeatureComplianceScanUpdateNoContent creates a V1ClusterFeatureComplianceScanUpdateNoContent with default headers values +func NewV1ClusterFeatureComplianceScanUpdateNoContent() *V1ClusterFeatureComplianceScanUpdateNoContent { + return &V1ClusterFeatureComplianceScanUpdateNoContent{} +} + +/* +V1ClusterFeatureComplianceScanUpdateNoContent handles this case with default header values. + +The resource was updated successfully +*/ +type V1ClusterFeatureComplianceScanUpdateNoContent struct { +} + +func (o *V1ClusterFeatureComplianceScanUpdateNoContent) Error() string { + return fmt.Sprintf("[PUT /v1/spectroclusters/{uid}/features/complianceScan][%d] v1ClusterFeatureComplianceScanUpdateNoContent ", 204) +} + +func (o *V1ClusterFeatureComplianceScanUpdateNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_cluster_feature_driver_log_download_parameters.go b/api/client/v1/v1_cluster_feature_driver_log_download_parameters.go new file mode 100644 index 00000000..cc95f585 --- /dev/null +++ b/api/client/v1/v1_cluster_feature_driver_log_download_parameters.go @@ -0,0 +1,210 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1ClusterFeatureDriverLogDownloadParams creates a new V1ClusterFeatureDriverLogDownloadParams object +// with the default values initialized. +func NewV1ClusterFeatureDriverLogDownloadParams() *V1ClusterFeatureDriverLogDownloadParams { + var ( + fileFormatDefault = string("pdf") + ) + return &V1ClusterFeatureDriverLogDownloadParams{ + FileFormat: &fileFormatDefault, + + timeout: cr.DefaultTimeout, + } +} + +// NewV1ClusterFeatureDriverLogDownloadParamsWithTimeout creates a new V1ClusterFeatureDriverLogDownloadParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1ClusterFeatureDriverLogDownloadParamsWithTimeout(timeout time.Duration) *V1ClusterFeatureDriverLogDownloadParams { + var ( + fileFormatDefault = string("pdf") + ) + return &V1ClusterFeatureDriverLogDownloadParams{ + FileFormat: &fileFormatDefault, + + timeout: timeout, + } +} + +// NewV1ClusterFeatureDriverLogDownloadParamsWithContext creates a new V1ClusterFeatureDriverLogDownloadParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1ClusterFeatureDriverLogDownloadParamsWithContext(ctx context.Context) *V1ClusterFeatureDriverLogDownloadParams { + var ( + fileFormatDefault = string("pdf") + ) + return &V1ClusterFeatureDriverLogDownloadParams{ + FileFormat: &fileFormatDefault, + + Context: ctx, + } +} + +// NewV1ClusterFeatureDriverLogDownloadParamsWithHTTPClient creates a new V1ClusterFeatureDriverLogDownloadParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1ClusterFeatureDriverLogDownloadParamsWithHTTPClient(client *http.Client) *V1ClusterFeatureDriverLogDownloadParams { + var ( + fileFormatDefault = string("pdf") + ) + return &V1ClusterFeatureDriverLogDownloadParams{ + FileFormat: &fileFormatDefault, + HTTPClient: client, + } +} + +/* +V1ClusterFeatureDriverLogDownloadParams contains all the parameters to send to the API endpoint +for the v1 cluster feature driver log download operation typically these are written to a http.Request +*/ +type V1ClusterFeatureDriverLogDownloadParams struct { + + /*Driver*/ + Driver string + /*FileFormat*/ + FileFormat *string + /*LogUID*/ + LogUID string + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cluster feature driver log download params +func (o *V1ClusterFeatureDriverLogDownloadParams) WithTimeout(timeout time.Duration) *V1ClusterFeatureDriverLogDownloadParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cluster feature driver log download params +func (o *V1ClusterFeatureDriverLogDownloadParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cluster feature driver log download params +func (o *V1ClusterFeatureDriverLogDownloadParams) WithContext(ctx context.Context) *V1ClusterFeatureDriverLogDownloadParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cluster feature driver log download params +func (o *V1ClusterFeatureDriverLogDownloadParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cluster feature driver log download params +func (o *V1ClusterFeatureDriverLogDownloadParams) WithHTTPClient(client *http.Client) *V1ClusterFeatureDriverLogDownloadParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cluster feature driver log download params +func (o *V1ClusterFeatureDriverLogDownloadParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithDriver adds the driver to the v1 cluster feature driver log download params +func (o *V1ClusterFeatureDriverLogDownloadParams) WithDriver(driver string) *V1ClusterFeatureDriverLogDownloadParams { + o.SetDriver(driver) + return o +} + +// SetDriver adds the driver to the v1 cluster feature driver log download params +func (o *V1ClusterFeatureDriverLogDownloadParams) SetDriver(driver string) { + o.Driver = driver +} + +// WithFileFormat adds the fileFormat to the v1 cluster feature driver log download params +func (o *V1ClusterFeatureDriverLogDownloadParams) WithFileFormat(fileFormat *string) *V1ClusterFeatureDriverLogDownloadParams { + o.SetFileFormat(fileFormat) + return o +} + +// SetFileFormat adds the fileFormat to the v1 cluster feature driver log download params +func (o *V1ClusterFeatureDriverLogDownloadParams) SetFileFormat(fileFormat *string) { + o.FileFormat = fileFormat +} + +// WithLogUID adds the logUID to the v1 cluster feature driver log download params +func (o *V1ClusterFeatureDriverLogDownloadParams) WithLogUID(logUID string) *V1ClusterFeatureDriverLogDownloadParams { + o.SetLogUID(logUID) + return o +} + +// SetLogUID adds the logUid to the v1 cluster feature driver log download params +func (o *V1ClusterFeatureDriverLogDownloadParams) SetLogUID(logUID string) { + o.LogUID = logUID +} + +// WithUID adds the uid to the v1 cluster feature driver log download params +func (o *V1ClusterFeatureDriverLogDownloadParams) WithUID(uid string) *V1ClusterFeatureDriverLogDownloadParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 cluster feature driver log download params +func (o *V1ClusterFeatureDriverLogDownloadParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1ClusterFeatureDriverLogDownloadParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param driver + if err := r.SetPathParam("driver", o.Driver); err != nil { + return err + } + + if o.FileFormat != nil { + + // query param fileFormat + var qrFileFormat string + if o.FileFormat != nil { + qrFileFormat = *o.FileFormat + } + qFileFormat := qrFileFormat + if qFileFormat != "" { + if err := r.SetQueryParam("fileFormat", qFileFormat); err != nil { + return err + } + } + + } + + // path param logUid + if err := r.SetPathParam("logUid", o.LogUID); err != nil { + return err + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cluster_feature_driver_log_download_responses.go b/api/client/v1/v1_cluster_feature_driver_log_download_responses.go new file mode 100644 index 00000000..680db356 --- /dev/null +++ b/api/client/v1/v1_cluster_feature_driver_log_download_responses.go @@ -0,0 +1,79 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1ClusterFeatureDriverLogDownloadReader is a Reader for the V1ClusterFeatureDriverLogDownload structure. +type V1ClusterFeatureDriverLogDownloadReader struct { + formats strfmt.Registry + writer io.Writer +} + +// ReadResponse reads a server response into the received o. +func (o *V1ClusterFeatureDriverLogDownloadReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1ClusterFeatureDriverLogDownloadOK(o.writer) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1ClusterFeatureDriverLogDownloadOK creates a V1ClusterFeatureDriverLogDownloadOK with default headers values +func NewV1ClusterFeatureDriverLogDownloadOK(writer io.Writer) *V1ClusterFeatureDriverLogDownloadOK { + return &V1ClusterFeatureDriverLogDownloadOK{ + Payload: writer, + } +} + +/* +V1ClusterFeatureDriverLogDownloadOK handles this case with default header values. + +OK +*/ +type V1ClusterFeatureDriverLogDownloadOK struct { + ContentDisposition string + + ContentType string + + Payload io.Writer +} + +func (o *V1ClusterFeatureDriverLogDownloadOK) Error() string { + return fmt.Sprintf("[GET /v1/spectroclusters/{uid}/features/complianceScan/logs/{logUid}/drivers/{driver}/download][%d] v1ClusterFeatureDriverLogDownloadOK %+v", 200, o.Payload) +} + +func (o *V1ClusterFeatureDriverLogDownloadOK) GetPayload() io.Writer { + return o.Payload +} + +func (o *V1ClusterFeatureDriverLogDownloadOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Content-Disposition + o.ContentDisposition = response.GetHeader("Content-Disposition") + + // response header Content-Type + o.ContentType = response.GetHeader("Content-Type") + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_cluster_feature_helm_charts_get_parameters.go b/api/client/v1/v1_cluster_feature_helm_charts_get_parameters.go new file mode 100644 index 00000000..4577cced --- /dev/null +++ b/api/client/v1/v1_cluster_feature_helm_charts_get_parameters.go @@ -0,0 +1,133 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1ClusterFeatureHelmChartsGetParams creates a new V1ClusterFeatureHelmChartsGetParams object +// with the default values initialized. +func NewV1ClusterFeatureHelmChartsGetParams() *V1ClusterFeatureHelmChartsGetParams { + var () + return &V1ClusterFeatureHelmChartsGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1ClusterFeatureHelmChartsGetParamsWithTimeout creates a new V1ClusterFeatureHelmChartsGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1ClusterFeatureHelmChartsGetParamsWithTimeout(timeout time.Duration) *V1ClusterFeatureHelmChartsGetParams { + var () + return &V1ClusterFeatureHelmChartsGetParams{ + + timeout: timeout, + } +} + +// NewV1ClusterFeatureHelmChartsGetParamsWithContext creates a new V1ClusterFeatureHelmChartsGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1ClusterFeatureHelmChartsGetParamsWithContext(ctx context.Context) *V1ClusterFeatureHelmChartsGetParams { + var () + return &V1ClusterFeatureHelmChartsGetParams{ + + Context: ctx, + } +} + +// NewV1ClusterFeatureHelmChartsGetParamsWithHTTPClient creates a new V1ClusterFeatureHelmChartsGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1ClusterFeatureHelmChartsGetParamsWithHTTPClient(client *http.Client) *V1ClusterFeatureHelmChartsGetParams { + var () + return &V1ClusterFeatureHelmChartsGetParams{ + HTTPClient: client, + } +} + +/* +V1ClusterFeatureHelmChartsGetParams contains all the parameters to send to the API endpoint +for the v1 cluster feature helm charts get operation typically these are written to a http.Request +*/ +type V1ClusterFeatureHelmChartsGetParams struct { + + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cluster feature helm charts get params +func (o *V1ClusterFeatureHelmChartsGetParams) WithTimeout(timeout time.Duration) *V1ClusterFeatureHelmChartsGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cluster feature helm charts get params +func (o *V1ClusterFeatureHelmChartsGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cluster feature helm charts get params +func (o *V1ClusterFeatureHelmChartsGetParams) WithContext(ctx context.Context) *V1ClusterFeatureHelmChartsGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cluster feature helm charts get params +func (o *V1ClusterFeatureHelmChartsGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cluster feature helm charts get params +func (o *V1ClusterFeatureHelmChartsGetParams) WithHTTPClient(client *http.Client) *V1ClusterFeatureHelmChartsGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cluster feature helm charts get params +func (o *V1ClusterFeatureHelmChartsGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithUID adds the uid to the v1 cluster feature helm charts get params +func (o *V1ClusterFeatureHelmChartsGetParams) WithUID(uid string) *V1ClusterFeatureHelmChartsGetParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 cluster feature helm charts get params +func (o *V1ClusterFeatureHelmChartsGetParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1ClusterFeatureHelmChartsGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cluster_feature_helm_charts_get_responses.go b/api/client/v1/v1_cluster_feature_helm_charts_get_responses.go new file mode 100644 index 00000000..a06e45c1 --- /dev/null +++ b/api/client/v1/v1_cluster_feature_helm_charts_get_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1ClusterFeatureHelmChartsGetReader is a Reader for the V1ClusterFeatureHelmChartsGet structure. +type V1ClusterFeatureHelmChartsGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1ClusterFeatureHelmChartsGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1ClusterFeatureHelmChartsGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1ClusterFeatureHelmChartsGetOK creates a V1ClusterFeatureHelmChartsGetOK with default headers values +func NewV1ClusterFeatureHelmChartsGetOK() *V1ClusterFeatureHelmChartsGetOK { + return &V1ClusterFeatureHelmChartsGetOK{} +} + +/* +V1ClusterFeatureHelmChartsGetOK handles this case with default header values. + +OK +*/ +type V1ClusterFeatureHelmChartsGetOK struct { + Payload *models.V1ClusterHelmCharts +} + +func (o *V1ClusterFeatureHelmChartsGetOK) Error() string { + return fmt.Sprintf("[GET /v1/spectroclusters/{uid}/features/helmCharts][%d] v1ClusterFeatureHelmChartsGetOK %+v", 200, o.Payload) +} + +func (o *V1ClusterFeatureHelmChartsGetOK) GetPayload() *models.V1ClusterHelmCharts { + return o.Payload +} + +func (o *V1ClusterFeatureHelmChartsGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1ClusterHelmCharts) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_cluster_feature_kube_bench_log_get_parameters.go b/api/client/v1/v1_cluster_feature_kube_bench_log_get_parameters.go new file mode 100644 index 00000000..8c6f5dce --- /dev/null +++ b/api/client/v1/v1_cluster_feature_kube_bench_log_get_parameters.go @@ -0,0 +1,180 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1ClusterFeatureKubeBenchLogGetParams creates a new V1ClusterFeatureKubeBenchLogGetParams object +// with the default values initialized. +func NewV1ClusterFeatureKubeBenchLogGetParams() *V1ClusterFeatureKubeBenchLogGetParams { + var () + return &V1ClusterFeatureKubeBenchLogGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1ClusterFeatureKubeBenchLogGetParamsWithTimeout creates a new V1ClusterFeatureKubeBenchLogGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1ClusterFeatureKubeBenchLogGetParamsWithTimeout(timeout time.Duration) *V1ClusterFeatureKubeBenchLogGetParams { + var () + return &V1ClusterFeatureKubeBenchLogGetParams{ + + timeout: timeout, + } +} + +// NewV1ClusterFeatureKubeBenchLogGetParamsWithContext creates a new V1ClusterFeatureKubeBenchLogGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1ClusterFeatureKubeBenchLogGetParamsWithContext(ctx context.Context) *V1ClusterFeatureKubeBenchLogGetParams { + var () + return &V1ClusterFeatureKubeBenchLogGetParams{ + + Context: ctx, + } +} + +// NewV1ClusterFeatureKubeBenchLogGetParamsWithHTTPClient creates a new V1ClusterFeatureKubeBenchLogGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1ClusterFeatureKubeBenchLogGetParamsWithHTTPClient(client *http.Client) *V1ClusterFeatureKubeBenchLogGetParams { + var () + return &V1ClusterFeatureKubeBenchLogGetParams{ + HTTPClient: client, + } +} + +/* +V1ClusterFeatureKubeBenchLogGetParams contains all the parameters to send to the API endpoint +for the v1 cluster feature kube bench log get operation typically these are written to a http.Request +*/ +type V1ClusterFeatureKubeBenchLogGetParams struct { + + /*LogUID*/ + LogUID string + /*ReportID*/ + ReportID *string + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cluster feature kube bench log get params +func (o *V1ClusterFeatureKubeBenchLogGetParams) WithTimeout(timeout time.Duration) *V1ClusterFeatureKubeBenchLogGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cluster feature kube bench log get params +func (o *V1ClusterFeatureKubeBenchLogGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cluster feature kube bench log get params +func (o *V1ClusterFeatureKubeBenchLogGetParams) WithContext(ctx context.Context) *V1ClusterFeatureKubeBenchLogGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cluster feature kube bench log get params +func (o *V1ClusterFeatureKubeBenchLogGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cluster feature kube bench log get params +func (o *V1ClusterFeatureKubeBenchLogGetParams) WithHTTPClient(client *http.Client) *V1ClusterFeatureKubeBenchLogGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cluster feature kube bench log get params +func (o *V1ClusterFeatureKubeBenchLogGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithLogUID adds the logUID to the v1 cluster feature kube bench log get params +func (o *V1ClusterFeatureKubeBenchLogGetParams) WithLogUID(logUID string) *V1ClusterFeatureKubeBenchLogGetParams { + o.SetLogUID(logUID) + return o +} + +// SetLogUID adds the logUid to the v1 cluster feature kube bench log get params +func (o *V1ClusterFeatureKubeBenchLogGetParams) SetLogUID(logUID string) { + o.LogUID = logUID +} + +// WithReportID adds the reportID to the v1 cluster feature kube bench log get params +func (o *V1ClusterFeatureKubeBenchLogGetParams) WithReportID(reportID *string) *V1ClusterFeatureKubeBenchLogGetParams { + o.SetReportID(reportID) + return o +} + +// SetReportID adds the reportId to the v1 cluster feature kube bench log get params +func (o *V1ClusterFeatureKubeBenchLogGetParams) SetReportID(reportID *string) { + o.ReportID = reportID +} + +// WithUID adds the uid to the v1 cluster feature kube bench log get params +func (o *V1ClusterFeatureKubeBenchLogGetParams) WithUID(uid string) *V1ClusterFeatureKubeBenchLogGetParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 cluster feature kube bench log get params +func (o *V1ClusterFeatureKubeBenchLogGetParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1ClusterFeatureKubeBenchLogGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param logUid + if err := r.SetPathParam("logUid", o.LogUID); err != nil { + return err + } + + if o.ReportID != nil { + + // query param reportId + var qrReportID string + if o.ReportID != nil { + qrReportID = *o.ReportID + } + qReportID := qrReportID + if qReportID != "" { + if err := r.SetQueryParam("reportId", qReportID); err != nil { + return err + } + } + + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cluster_feature_kube_bench_log_get_responses.go b/api/client/v1/v1_cluster_feature_kube_bench_log_get_responses.go new file mode 100644 index 00000000..7d9184cc --- /dev/null +++ b/api/client/v1/v1_cluster_feature_kube_bench_log_get_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1ClusterFeatureKubeBenchLogGetReader is a Reader for the V1ClusterFeatureKubeBenchLogGet structure. +type V1ClusterFeatureKubeBenchLogGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1ClusterFeatureKubeBenchLogGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1ClusterFeatureKubeBenchLogGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1ClusterFeatureKubeBenchLogGetOK creates a V1ClusterFeatureKubeBenchLogGetOK with default headers values +func NewV1ClusterFeatureKubeBenchLogGetOK() *V1ClusterFeatureKubeBenchLogGetOK { + return &V1ClusterFeatureKubeBenchLogGetOK{} +} + +/* +V1ClusterFeatureKubeBenchLogGetOK handles this case with default header values. + +OK +*/ +type V1ClusterFeatureKubeBenchLogGetOK struct { + Payload *models.V1ClusterScanLogKubeBench +} + +func (o *V1ClusterFeatureKubeBenchLogGetOK) Error() string { + return fmt.Sprintf("[GET /v1/spectroclusters/{uid}/features/complianceScan/logs/{logUid}/drivers/kubeBench][%d] v1ClusterFeatureKubeBenchLogGetOK %+v", 200, o.Payload) +} + +func (o *V1ClusterFeatureKubeBenchLogGetOK) GetPayload() *models.V1ClusterScanLogKubeBench { + return o.Payload +} + +func (o *V1ClusterFeatureKubeBenchLogGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1ClusterScanLogKubeBench) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_cluster_feature_kube_hunter_log_get_parameters.go b/api/client/v1/v1_cluster_feature_kube_hunter_log_get_parameters.go new file mode 100644 index 00000000..f3fefffc --- /dev/null +++ b/api/client/v1/v1_cluster_feature_kube_hunter_log_get_parameters.go @@ -0,0 +1,180 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1ClusterFeatureKubeHunterLogGetParams creates a new V1ClusterFeatureKubeHunterLogGetParams object +// with the default values initialized. +func NewV1ClusterFeatureKubeHunterLogGetParams() *V1ClusterFeatureKubeHunterLogGetParams { + var () + return &V1ClusterFeatureKubeHunterLogGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1ClusterFeatureKubeHunterLogGetParamsWithTimeout creates a new V1ClusterFeatureKubeHunterLogGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1ClusterFeatureKubeHunterLogGetParamsWithTimeout(timeout time.Duration) *V1ClusterFeatureKubeHunterLogGetParams { + var () + return &V1ClusterFeatureKubeHunterLogGetParams{ + + timeout: timeout, + } +} + +// NewV1ClusterFeatureKubeHunterLogGetParamsWithContext creates a new V1ClusterFeatureKubeHunterLogGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1ClusterFeatureKubeHunterLogGetParamsWithContext(ctx context.Context) *V1ClusterFeatureKubeHunterLogGetParams { + var () + return &V1ClusterFeatureKubeHunterLogGetParams{ + + Context: ctx, + } +} + +// NewV1ClusterFeatureKubeHunterLogGetParamsWithHTTPClient creates a new V1ClusterFeatureKubeHunterLogGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1ClusterFeatureKubeHunterLogGetParamsWithHTTPClient(client *http.Client) *V1ClusterFeatureKubeHunterLogGetParams { + var () + return &V1ClusterFeatureKubeHunterLogGetParams{ + HTTPClient: client, + } +} + +/* +V1ClusterFeatureKubeHunterLogGetParams contains all the parameters to send to the API endpoint +for the v1 cluster feature kube hunter log get operation typically these are written to a http.Request +*/ +type V1ClusterFeatureKubeHunterLogGetParams struct { + + /*LogUID*/ + LogUID string + /*ReportID*/ + ReportID *string + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cluster feature kube hunter log get params +func (o *V1ClusterFeatureKubeHunterLogGetParams) WithTimeout(timeout time.Duration) *V1ClusterFeatureKubeHunterLogGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cluster feature kube hunter log get params +func (o *V1ClusterFeatureKubeHunterLogGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cluster feature kube hunter log get params +func (o *V1ClusterFeatureKubeHunterLogGetParams) WithContext(ctx context.Context) *V1ClusterFeatureKubeHunterLogGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cluster feature kube hunter log get params +func (o *V1ClusterFeatureKubeHunterLogGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cluster feature kube hunter log get params +func (o *V1ClusterFeatureKubeHunterLogGetParams) WithHTTPClient(client *http.Client) *V1ClusterFeatureKubeHunterLogGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cluster feature kube hunter log get params +func (o *V1ClusterFeatureKubeHunterLogGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithLogUID adds the logUID to the v1 cluster feature kube hunter log get params +func (o *V1ClusterFeatureKubeHunterLogGetParams) WithLogUID(logUID string) *V1ClusterFeatureKubeHunterLogGetParams { + o.SetLogUID(logUID) + return o +} + +// SetLogUID adds the logUid to the v1 cluster feature kube hunter log get params +func (o *V1ClusterFeatureKubeHunterLogGetParams) SetLogUID(logUID string) { + o.LogUID = logUID +} + +// WithReportID adds the reportID to the v1 cluster feature kube hunter log get params +func (o *V1ClusterFeatureKubeHunterLogGetParams) WithReportID(reportID *string) *V1ClusterFeatureKubeHunterLogGetParams { + o.SetReportID(reportID) + return o +} + +// SetReportID adds the reportId to the v1 cluster feature kube hunter log get params +func (o *V1ClusterFeatureKubeHunterLogGetParams) SetReportID(reportID *string) { + o.ReportID = reportID +} + +// WithUID adds the uid to the v1 cluster feature kube hunter log get params +func (o *V1ClusterFeatureKubeHunterLogGetParams) WithUID(uid string) *V1ClusterFeatureKubeHunterLogGetParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 cluster feature kube hunter log get params +func (o *V1ClusterFeatureKubeHunterLogGetParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1ClusterFeatureKubeHunterLogGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param logUid + if err := r.SetPathParam("logUid", o.LogUID); err != nil { + return err + } + + if o.ReportID != nil { + + // query param reportId + var qrReportID string + if o.ReportID != nil { + qrReportID = *o.ReportID + } + qReportID := qrReportID + if qReportID != "" { + if err := r.SetQueryParam("reportId", qReportID); err != nil { + return err + } + } + + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cluster_feature_kube_hunter_log_get_responses.go b/api/client/v1/v1_cluster_feature_kube_hunter_log_get_responses.go new file mode 100644 index 00000000..2e6bf701 --- /dev/null +++ b/api/client/v1/v1_cluster_feature_kube_hunter_log_get_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1ClusterFeatureKubeHunterLogGetReader is a Reader for the V1ClusterFeatureKubeHunterLogGet structure. +type V1ClusterFeatureKubeHunterLogGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1ClusterFeatureKubeHunterLogGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1ClusterFeatureKubeHunterLogGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1ClusterFeatureKubeHunterLogGetOK creates a V1ClusterFeatureKubeHunterLogGetOK with default headers values +func NewV1ClusterFeatureKubeHunterLogGetOK() *V1ClusterFeatureKubeHunterLogGetOK { + return &V1ClusterFeatureKubeHunterLogGetOK{} +} + +/* +V1ClusterFeatureKubeHunterLogGetOK handles this case with default header values. + +OK +*/ +type V1ClusterFeatureKubeHunterLogGetOK struct { + Payload *models.V1ClusterScanLogKubeHunter +} + +func (o *V1ClusterFeatureKubeHunterLogGetOK) Error() string { + return fmt.Sprintf("[GET /v1/spectroclusters/{uid}/features/complianceScan/logs/{logUid}/drivers/kubeHunter][%d] v1ClusterFeatureKubeHunterLogGetOK %+v", 200, o.Payload) +} + +func (o *V1ClusterFeatureKubeHunterLogGetOK) GetPayload() *models.V1ClusterScanLogKubeHunter { + return o.Payload +} + +func (o *V1ClusterFeatureKubeHunterLogGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1ClusterScanLogKubeHunter) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_cluster_feature_log_fetcher_create_parameters.go b/api/client/v1/v1_cluster_feature_log_fetcher_create_parameters.go new file mode 100644 index 00000000..6dc94f6f --- /dev/null +++ b/api/client/v1/v1_cluster_feature_log_fetcher_create_parameters.go @@ -0,0 +1,157 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1ClusterFeatureLogFetcherCreateParams creates a new V1ClusterFeatureLogFetcherCreateParams object +// with the default values initialized. +func NewV1ClusterFeatureLogFetcherCreateParams() *V1ClusterFeatureLogFetcherCreateParams { + var () + return &V1ClusterFeatureLogFetcherCreateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1ClusterFeatureLogFetcherCreateParamsWithTimeout creates a new V1ClusterFeatureLogFetcherCreateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1ClusterFeatureLogFetcherCreateParamsWithTimeout(timeout time.Duration) *V1ClusterFeatureLogFetcherCreateParams { + var () + return &V1ClusterFeatureLogFetcherCreateParams{ + + timeout: timeout, + } +} + +// NewV1ClusterFeatureLogFetcherCreateParamsWithContext creates a new V1ClusterFeatureLogFetcherCreateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1ClusterFeatureLogFetcherCreateParamsWithContext(ctx context.Context) *V1ClusterFeatureLogFetcherCreateParams { + var () + return &V1ClusterFeatureLogFetcherCreateParams{ + + Context: ctx, + } +} + +// NewV1ClusterFeatureLogFetcherCreateParamsWithHTTPClient creates a new V1ClusterFeatureLogFetcherCreateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1ClusterFeatureLogFetcherCreateParamsWithHTTPClient(client *http.Client) *V1ClusterFeatureLogFetcherCreateParams { + var () + return &V1ClusterFeatureLogFetcherCreateParams{ + HTTPClient: client, + } +} + +/* +V1ClusterFeatureLogFetcherCreateParams contains all the parameters to send to the API endpoint +for the v1 cluster feature log fetcher create operation typically these are written to a http.Request +*/ +type V1ClusterFeatureLogFetcherCreateParams struct { + + /*Body*/ + Body *models.V1ClusterLogFetcherRequest + /*UID + Cluster uid for which log is requested + + */ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cluster feature log fetcher create params +func (o *V1ClusterFeatureLogFetcherCreateParams) WithTimeout(timeout time.Duration) *V1ClusterFeatureLogFetcherCreateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cluster feature log fetcher create params +func (o *V1ClusterFeatureLogFetcherCreateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cluster feature log fetcher create params +func (o *V1ClusterFeatureLogFetcherCreateParams) WithContext(ctx context.Context) *V1ClusterFeatureLogFetcherCreateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cluster feature log fetcher create params +func (o *V1ClusterFeatureLogFetcherCreateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cluster feature log fetcher create params +func (o *V1ClusterFeatureLogFetcherCreateParams) WithHTTPClient(client *http.Client) *V1ClusterFeatureLogFetcherCreateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cluster feature log fetcher create params +func (o *V1ClusterFeatureLogFetcherCreateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 cluster feature log fetcher create params +func (o *V1ClusterFeatureLogFetcherCreateParams) WithBody(body *models.V1ClusterLogFetcherRequest) *V1ClusterFeatureLogFetcherCreateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 cluster feature log fetcher create params +func (o *V1ClusterFeatureLogFetcherCreateParams) SetBody(body *models.V1ClusterLogFetcherRequest) { + o.Body = body +} + +// WithUID adds the uid to the v1 cluster feature log fetcher create params +func (o *V1ClusterFeatureLogFetcherCreateParams) WithUID(uid string) *V1ClusterFeatureLogFetcherCreateParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 cluster feature log fetcher create params +func (o *V1ClusterFeatureLogFetcherCreateParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1ClusterFeatureLogFetcherCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cluster_feature_log_fetcher_create_responses.go b/api/client/v1/v1_cluster_feature_log_fetcher_create_responses.go new file mode 100644 index 00000000..831799f4 --- /dev/null +++ b/api/client/v1/v1_cluster_feature_log_fetcher_create_responses.go @@ -0,0 +1,77 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1ClusterFeatureLogFetcherCreateReader is a Reader for the V1ClusterFeatureLogFetcherCreate structure. +type V1ClusterFeatureLogFetcherCreateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1ClusterFeatureLogFetcherCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 201: + result := NewV1ClusterFeatureLogFetcherCreateCreated() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1ClusterFeatureLogFetcherCreateCreated creates a V1ClusterFeatureLogFetcherCreateCreated with default headers values +func NewV1ClusterFeatureLogFetcherCreateCreated() *V1ClusterFeatureLogFetcherCreateCreated { + return &V1ClusterFeatureLogFetcherCreateCreated{} +} + +/* +V1ClusterFeatureLogFetcherCreateCreated handles this case with default header values. + +Created successfully +*/ +type V1ClusterFeatureLogFetcherCreateCreated struct { + /*Audit uid for the request + */ + AuditUID string + + Payload *models.V1UID +} + +func (o *V1ClusterFeatureLogFetcherCreateCreated) Error() string { + return fmt.Sprintf("[POST /v1/spectroclusters/{uid}/features/logFetcher][%d] v1ClusterFeatureLogFetcherCreateCreated %+v", 201, o.Payload) +} + +func (o *V1ClusterFeatureLogFetcherCreateCreated) GetPayload() *models.V1UID { + return o.Payload +} + +func (o *V1ClusterFeatureLogFetcherCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header AuditUid + o.AuditUID = response.GetHeader("AuditUid") + + o.Payload = new(models.V1UID) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_cluster_feature_log_fetcher_get_parameters.go b/api/client/v1/v1_cluster_feature_log_fetcher_get_parameters.go new file mode 100644 index 00000000..e07ad73d --- /dev/null +++ b/api/client/v1/v1_cluster_feature_log_fetcher_get_parameters.go @@ -0,0 +1,165 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1ClusterFeatureLogFetcherGetParams creates a new V1ClusterFeatureLogFetcherGetParams object +// with the default values initialized. +func NewV1ClusterFeatureLogFetcherGetParams() *V1ClusterFeatureLogFetcherGetParams { + var () + return &V1ClusterFeatureLogFetcherGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1ClusterFeatureLogFetcherGetParamsWithTimeout creates a new V1ClusterFeatureLogFetcherGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1ClusterFeatureLogFetcherGetParamsWithTimeout(timeout time.Duration) *V1ClusterFeatureLogFetcherGetParams { + var () + return &V1ClusterFeatureLogFetcherGetParams{ + + timeout: timeout, + } +} + +// NewV1ClusterFeatureLogFetcherGetParamsWithContext creates a new V1ClusterFeatureLogFetcherGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1ClusterFeatureLogFetcherGetParamsWithContext(ctx context.Context) *V1ClusterFeatureLogFetcherGetParams { + var () + return &V1ClusterFeatureLogFetcherGetParams{ + + Context: ctx, + } +} + +// NewV1ClusterFeatureLogFetcherGetParamsWithHTTPClient creates a new V1ClusterFeatureLogFetcherGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1ClusterFeatureLogFetcherGetParamsWithHTTPClient(client *http.Client) *V1ClusterFeatureLogFetcherGetParams { + var () + return &V1ClusterFeatureLogFetcherGetParams{ + HTTPClient: client, + } +} + +/* +V1ClusterFeatureLogFetcherGetParams contains all the parameters to send to the API endpoint +for the v1 cluster feature log fetcher get operation typically these are written to a http.Request +*/ +type V1ClusterFeatureLogFetcherGetParams struct { + + /*RequestID*/ + RequestID *string + /*UID + Cluster uid for which log is requested + + */ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cluster feature log fetcher get params +func (o *V1ClusterFeatureLogFetcherGetParams) WithTimeout(timeout time.Duration) *V1ClusterFeatureLogFetcherGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cluster feature log fetcher get params +func (o *V1ClusterFeatureLogFetcherGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cluster feature log fetcher get params +func (o *V1ClusterFeatureLogFetcherGetParams) WithContext(ctx context.Context) *V1ClusterFeatureLogFetcherGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cluster feature log fetcher get params +func (o *V1ClusterFeatureLogFetcherGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cluster feature log fetcher get params +func (o *V1ClusterFeatureLogFetcherGetParams) WithHTTPClient(client *http.Client) *V1ClusterFeatureLogFetcherGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cluster feature log fetcher get params +func (o *V1ClusterFeatureLogFetcherGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithRequestID adds the requestID to the v1 cluster feature log fetcher get params +func (o *V1ClusterFeatureLogFetcherGetParams) WithRequestID(requestID *string) *V1ClusterFeatureLogFetcherGetParams { + o.SetRequestID(requestID) + return o +} + +// SetRequestID adds the requestId to the v1 cluster feature log fetcher get params +func (o *V1ClusterFeatureLogFetcherGetParams) SetRequestID(requestID *string) { + o.RequestID = requestID +} + +// WithUID adds the uid to the v1 cluster feature log fetcher get params +func (o *V1ClusterFeatureLogFetcherGetParams) WithUID(uid string) *V1ClusterFeatureLogFetcherGetParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 cluster feature log fetcher get params +func (o *V1ClusterFeatureLogFetcherGetParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1ClusterFeatureLogFetcherGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.RequestID != nil { + + // query param requestId + var qrRequestID string + if o.RequestID != nil { + qrRequestID = *o.RequestID + } + qRequestID := qrRequestID + if qRequestID != "" { + if err := r.SetQueryParam("requestId", qRequestID); err != nil { + return err + } + } + + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cluster_feature_log_fetcher_get_responses.go b/api/client/v1/v1_cluster_feature_log_fetcher_get_responses.go new file mode 100644 index 00000000..5b735a3a --- /dev/null +++ b/api/client/v1/v1_cluster_feature_log_fetcher_get_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1ClusterFeatureLogFetcherGetReader is a Reader for the V1ClusterFeatureLogFetcherGet structure. +type V1ClusterFeatureLogFetcherGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1ClusterFeatureLogFetcherGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1ClusterFeatureLogFetcherGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1ClusterFeatureLogFetcherGetOK creates a V1ClusterFeatureLogFetcherGetOK with default headers values +func NewV1ClusterFeatureLogFetcherGetOK() *V1ClusterFeatureLogFetcherGetOK { + return &V1ClusterFeatureLogFetcherGetOK{} +} + +/* +V1ClusterFeatureLogFetcherGetOK handles this case with default header values. + +OK +*/ +type V1ClusterFeatureLogFetcherGetOK struct { + Payload *models.V1ClusterLogFetcher +} + +func (o *V1ClusterFeatureLogFetcherGetOK) Error() string { + return fmt.Sprintf("[GET /v1/spectroclusters/{uid}/features/logFetcher][%d] v1ClusterFeatureLogFetcherGetOK %+v", 200, o.Payload) +} + +func (o *V1ClusterFeatureLogFetcherGetOK) GetPayload() *models.V1ClusterLogFetcher { + return o.Payload +} + +func (o *V1ClusterFeatureLogFetcherGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1ClusterLogFetcher) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_cluster_feature_log_fetcher_log_download_parameters.go b/api/client/v1/v1_cluster_feature_log_fetcher_log_download_parameters.go new file mode 100644 index 00000000..b0ce6925 --- /dev/null +++ b/api/client/v1/v1_cluster_feature_log_fetcher_log_download_parameters.go @@ -0,0 +1,165 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1ClusterFeatureLogFetcherLogDownloadParams creates a new V1ClusterFeatureLogFetcherLogDownloadParams object +// with the default values initialized. +func NewV1ClusterFeatureLogFetcherLogDownloadParams() *V1ClusterFeatureLogFetcherLogDownloadParams { + var () + return &V1ClusterFeatureLogFetcherLogDownloadParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1ClusterFeatureLogFetcherLogDownloadParamsWithTimeout creates a new V1ClusterFeatureLogFetcherLogDownloadParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1ClusterFeatureLogFetcherLogDownloadParamsWithTimeout(timeout time.Duration) *V1ClusterFeatureLogFetcherLogDownloadParams { + var () + return &V1ClusterFeatureLogFetcherLogDownloadParams{ + + timeout: timeout, + } +} + +// NewV1ClusterFeatureLogFetcherLogDownloadParamsWithContext creates a new V1ClusterFeatureLogFetcherLogDownloadParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1ClusterFeatureLogFetcherLogDownloadParamsWithContext(ctx context.Context) *V1ClusterFeatureLogFetcherLogDownloadParams { + var () + return &V1ClusterFeatureLogFetcherLogDownloadParams{ + + Context: ctx, + } +} + +// NewV1ClusterFeatureLogFetcherLogDownloadParamsWithHTTPClient creates a new V1ClusterFeatureLogFetcherLogDownloadParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1ClusterFeatureLogFetcherLogDownloadParamsWithHTTPClient(client *http.Client) *V1ClusterFeatureLogFetcherLogDownloadParams { + var () + return &V1ClusterFeatureLogFetcherLogDownloadParams{ + HTTPClient: client, + } +} + +/* +V1ClusterFeatureLogFetcherLogDownloadParams contains all the parameters to send to the API endpoint +for the v1 cluster feature log fetcher log download operation typically these are written to a http.Request +*/ +type V1ClusterFeatureLogFetcherLogDownloadParams struct { + + /*FileName*/ + FileName *string + /*UID + Cluster uid for which log is requested + + */ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cluster feature log fetcher log download params +func (o *V1ClusterFeatureLogFetcherLogDownloadParams) WithTimeout(timeout time.Duration) *V1ClusterFeatureLogFetcherLogDownloadParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cluster feature log fetcher log download params +func (o *V1ClusterFeatureLogFetcherLogDownloadParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cluster feature log fetcher log download params +func (o *V1ClusterFeatureLogFetcherLogDownloadParams) WithContext(ctx context.Context) *V1ClusterFeatureLogFetcherLogDownloadParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cluster feature log fetcher log download params +func (o *V1ClusterFeatureLogFetcherLogDownloadParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cluster feature log fetcher log download params +func (o *V1ClusterFeatureLogFetcherLogDownloadParams) WithHTTPClient(client *http.Client) *V1ClusterFeatureLogFetcherLogDownloadParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cluster feature log fetcher log download params +func (o *V1ClusterFeatureLogFetcherLogDownloadParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithFileName adds the fileName to the v1 cluster feature log fetcher log download params +func (o *V1ClusterFeatureLogFetcherLogDownloadParams) WithFileName(fileName *string) *V1ClusterFeatureLogFetcherLogDownloadParams { + o.SetFileName(fileName) + return o +} + +// SetFileName adds the fileName to the v1 cluster feature log fetcher log download params +func (o *V1ClusterFeatureLogFetcherLogDownloadParams) SetFileName(fileName *string) { + o.FileName = fileName +} + +// WithUID adds the uid to the v1 cluster feature log fetcher log download params +func (o *V1ClusterFeatureLogFetcherLogDownloadParams) WithUID(uid string) *V1ClusterFeatureLogFetcherLogDownloadParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 cluster feature log fetcher log download params +func (o *V1ClusterFeatureLogFetcherLogDownloadParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1ClusterFeatureLogFetcherLogDownloadParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.FileName != nil { + + // query param fileName + var qrFileName string + if o.FileName != nil { + qrFileName = *o.FileName + } + qFileName := qrFileName + if qFileName != "" { + if err := r.SetQueryParam("fileName", qFileName); err != nil { + return err + } + } + + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cluster_feature_log_fetcher_log_download_responses.go b/api/client/v1/v1_cluster_feature_log_fetcher_log_download_responses.go new file mode 100644 index 00000000..0ccb8965 --- /dev/null +++ b/api/client/v1/v1_cluster_feature_log_fetcher_log_download_responses.go @@ -0,0 +1,79 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1ClusterFeatureLogFetcherLogDownloadReader is a Reader for the V1ClusterFeatureLogFetcherLogDownload structure. +type V1ClusterFeatureLogFetcherLogDownloadReader struct { + formats strfmt.Registry + writer io.Writer +} + +// ReadResponse reads a server response into the received o. +func (o *V1ClusterFeatureLogFetcherLogDownloadReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1ClusterFeatureLogFetcherLogDownloadOK(o.writer) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1ClusterFeatureLogFetcherLogDownloadOK creates a V1ClusterFeatureLogFetcherLogDownloadOK with default headers values +func NewV1ClusterFeatureLogFetcherLogDownloadOK(writer io.Writer) *V1ClusterFeatureLogFetcherLogDownloadOK { + return &V1ClusterFeatureLogFetcherLogDownloadOK{ + Payload: writer, + } +} + +/* +V1ClusterFeatureLogFetcherLogDownloadOK handles this case with default header values. + +OK +*/ +type V1ClusterFeatureLogFetcherLogDownloadOK struct { + ContentDisposition string + + ContentType string + + Payload io.Writer +} + +func (o *V1ClusterFeatureLogFetcherLogDownloadOK) Error() string { + return fmt.Sprintf("[GET /v1/spectroclusters/features/logFetcher/{uid}/download][%d] v1ClusterFeatureLogFetcherLogDownloadOK %+v", 200, o.Payload) +} + +func (o *V1ClusterFeatureLogFetcherLogDownloadOK) GetPayload() io.Writer { + return o.Payload +} + +func (o *V1ClusterFeatureLogFetcherLogDownloadOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Content-Disposition + o.ContentDisposition = response.GetHeader("Content-Disposition") + + // response header Content-Type + o.ContentType = response.GetHeader("Content-Type") + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_cluster_feature_log_fetcher_log_update_parameters.go b/api/client/v1/v1_cluster_feature_log_fetcher_log_update_parameters.go new file mode 100644 index 00000000..0a332cbc --- /dev/null +++ b/api/client/v1/v1_cluster_feature_log_fetcher_log_update_parameters.go @@ -0,0 +1,197 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1ClusterFeatureLogFetcherLogUpdateParams creates a new V1ClusterFeatureLogFetcherLogUpdateParams object +// with the default values initialized. +func NewV1ClusterFeatureLogFetcherLogUpdateParams() *V1ClusterFeatureLogFetcherLogUpdateParams { + var () + return &V1ClusterFeatureLogFetcherLogUpdateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1ClusterFeatureLogFetcherLogUpdateParamsWithTimeout creates a new V1ClusterFeatureLogFetcherLogUpdateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1ClusterFeatureLogFetcherLogUpdateParamsWithTimeout(timeout time.Duration) *V1ClusterFeatureLogFetcherLogUpdateParams { + var () + return &V1ClusterFeatureLogFetcherLogUpdateParams{ + + timeout: timeout, + } +} + +// NewV1ClusterFeatureLogFetcherLogUpdateParamsWithContext creates a new V1ClusterFeatureLogFetcherLogUpdateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1ClusterFeatureLogFetcherLogUpdateParamsWithContext(ctx context.Context) *V1ClusterFeatureLogFetcherLogUpdateParams { + var () + return &V1ClusterFeatureLogFetcherLogUpdateParams{ + + Context: ctx, + } +} + +// NewV1ClusterFeatureLogFetcherLogUpdateParamsWithHTTPClient creates a new V1ClusterFeatureLogFetcherLogUpdateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1ClusterFeatureLogFetcherLogUpdateParamsWithHTTPClient(client *http.Client) *V1ClusterFeatureLogFetcherLogUpdateParams { + var () + return &V1ClusterFeatureLogFetcherLogUpdateParams{ + HTTPClient: client, + } +} + +/* +V1ClusterFeatureLogFetcherLogUpdateParams contains all the parameters to send to the API endpoint +for the v1 cluster feature log fetcher log update operation typically these are written to a http.Request +*/ +type V1ClusterFeatureLogFetcherLogUpdateParams struct { + + /*FileName + Log file by agent + + */ + FileName runtime.NamedReadCloser + /*RequestID + Unique request Id + + */ + RequestID *string + /*UID + Cluster uid for which log is requested + + */ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cluster feature log fetcher log update params +func (o *V1ClusterFeatureLogFetcherLogUpdateParams) WithTimeout(timeout time.Duration) *V1ClusterFeatureLogFetcherLogUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cluster feature log fetcher log update params +func (o *V1ClusterFeatureLogFetcherLogUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cluster feature log fetcher log update params +func (o *V1ClusterFeatureLogFetcherLogUpdateParams) WithContext(ctx context.Context) *V1ClusterFeatureLogFetcherLogUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cluster feature log fetcher log update params +func (o *V1ClusterFeatureLogFetcherLogUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cluster feature log fetcher log update params +func (o *V1ClusterFeatureLogFetcherLogUpdateParams) WithHTTPClient(client *http.Client) *V1ClusterFeatureLogFetcherLogUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cluster feature log fetcher log update params +func (o *V1ClusterFeatureLogFetcherLogUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithFileName adds the fileName to the v1 cluster feature log fetcher log update params +func (o *V1ClusterFeatureLogFetcherLogUpdateParams) WithFileName(fileName runtime.NamedReadCloser) *V1ClusterFeatureLogFetcherLogUpdateParams { + o.SetFileName(fileName) + return o +} + +// SetFileName adds the fileName to the v1 cluster feature log fetcher log update params +func (o *V1ClusterFeatureLogFetcherLogUpdateParams) SetFileName(fileName runtime.NamedReadCloser) { + o.FileName = fileName +} + +// WithRequestID adds the requestID to the v1 cluster feature log fetcher log update params +func (o *V1ClusterFeatureLogFetcherLogUpdateParams) WithRequestID(requestID *string) *V1ClusterFeatureLogFetcherLogUpdateParams { + o.SetRequestID(requestID) + return o +} + +// SetRequestID adds the requestId to the v1 cluster feature log fetcher log update params +func (o *V1ClusterFeatureLogFetcherLogUpdateParams) SetRequestID(requestID *string) { + o.RequestID = requestID +} + +// WithUID adds the uid to the v1 cluster feature log fetcher log update params +func (o *V1ClusterFeatureLogFetcherLogUpdateParams) WithUID(uid string) *V1ClusterFeatureLogFetcherLogUpdateParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 cluster feature log fetcher log update params +func (o *V1ClusterFeatureLogFetcherLogUpdateParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1ClusterFeatureLogFetcherLogUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.FileName != nil { + + if o.FileName != nil { + + // form file param fileName + if err := r.SetFileParam("fileName", o.FileName); err != nil { + return err + } + + } + + } + + if o.RequestID != nil { + + // query param requestId + var qrRequestID string + if o.RequestID != nil { + qrRequestID = *o.RequestID + } + qRequestID := qrRequestID + if qRequestID != "" { + if err := r.SetQueryParam("requestId", qRequestID); err != nil { + return err + } + } + + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cluster_feature_log_fetcher_log_update_responses.go b/api/client/v1/v1_cluster_feature_log_fetcher_log_update_responses.go new file mode 100644 index 00000000..0d1477e9 --- /dev/null +++ b/api/client/v1/v1_cluster_feature_log_fetcher_log_update_responses.go @@ -0,0 +1,61 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1ClusterFeatureLogFetcherLogUpdateReader is a Reader for the V1ClusterFeatureLogFetcherLogUpdate structure. +type V1ClusterFeatureLogFetcherLogUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1ClusterFeatureLogFetcherLogUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1ClusterFeatureLogFetcherLogUpdateNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1ClusterFeatureLogFetcherLogUpdateNoContent creates a V1ClusterFeatureLogFetcherLogUpdateNoContent with default headers values +func NewV1ClusterFeatureLogFetcherLogUpdateNoContent() *V1ClusterFeatureLogFetcherLogUpdateNoContent { + return &V1ClusterFeatureLogFetcherLogUpdateNoContent{} +} + +/* +V1ClusterFeatureLogFetcherLogUpdateNoContent handles this case with default header values. + +Ok response without content +*/ +type V1ClusterFeatureLogFetcherLogUpdateNoContent struct { + /*Audit uid for the request + */ + AuditUID string +} + +func (o *V1ClusterFeatureLogFetcherLogUpdateNoContent) Error() string { + return fmt.Sprintf("[POST /v1/spectroclusters/features/logFetcher/{uid}/log][%d] v1ClusterFeatureLogFetcherLogUpdateNoContent ", 204) +} + +func (o *V1ClusterFeatureLogFetcherLogUpdateNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header AuditUid + o.AuditUID = response.GetHeader("AuditUid") + + return nil +} diff --git a/api/client/v1/v1_cluster_feature_manifests_get_parameters.go b/api/client/v1/v1_cluster_feature_manifests_get_parameters.go new file mode 100644 index 00000000..4d1e6e75 --- /dev/null +++ b/api/client/v1/v1_cluster_feature_manifests_get_parameters.go @@ -0,0 +1,133 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1ClusterFeatureManifestsGetParams creates a new V1ClusterFeatureManifestsGetParams object +// with the default values initialized. +func NewV1ClusterFeatureManifestsGetParams() *V1ClusterFeatureManifestsGetParams { + var () + return &V1ClusterFeatureManifestsGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1ClusterFeatureManifestsGetParamsWithTimeout creates a new V1ClusterFeatureManifestsGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1ClusterFeatureManifestsGetParamsWithTimeout(timeout time.Duration) *V1ClusterFeatureManifestsGetParams { + var () + return &V1ClusterFeatureManifestsGetParams{ + + timeout: timeout, + } +} + +// NewV1ClusterFeatureManifestsGetParamsWithContext creates a new V1ClusterFeatureManifestsGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1ClusterFeatureManifestsGetParamsWithContext(ctx context.Context) *V1ClusterFeatureManifestsGetParams { + var () + return &V1ClusterFeatureManifestsGetParams{ + + Context: ctx, + } +} + +// NewV1ClusterFeatureManifestsGetParamsWithHTTPClient creates a new V1ClusterFeatureManifestsGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1ClusterFeatureManifestsGetParamsWithHTTPClient(client *http.Client) *V1ClusterFeatureManifestsGetParams { + var () + return &V1ClusterFeatureManifestsGetParams{ + HTTPClient: client, + } +} + +/* +V1ClusterFeatureManifestsGetParams contains all the parameters to send to the API endpoint +for the v1 cluster feature manifests get operation typically these are written to a http.Request +*/ +type V1ClusterFeatureManifestsGetParams struct { + + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cluster feature manifests get params +func (o *V1ClusterFeatureManifestsGetParams) WithTimeout(timeout time.Duration) *V1ClusterFeatureManifestsGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cluster feature manifests get params +func (o *V1ClusterFeatureManifestsGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cluster feature manifests get params +func (o *V1ClusterFeatureManifestsGetParams) WithContext(ctx context.Context) *V1ClusterFeatureManifestsGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cluster feature manifests get params +func (o *V1ClusterFeatureManifestsGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cluster feature manifests get params +func (o *V1ClusterFeatureManifestsGetParams) WithHTTPClient(client *http.Client) *V1ClusterFeatureManifestsGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cluster feature manifests get params +func (o *V1ClusterFeatureManifestsGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithUID adds the uid to the v1 cluster feature manifests get params +func (o *V1ClusterFeatureManifestsGetParams) WithUID(uid string) *V1ClusterFeatureManifestsGetParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 cluster feature manifests get params +func (o *V1ClusterFeatureManifestsGetParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1ClusterFeatureManifestsGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cluster_feature_manifests_get_responses.go b/api/client/v1/v1_cluster_feature_manifests_get_responses.go new file mode 100644 index 00000000..bcb4b08b --- /dev/null +++ b/api/client/v1/v1_cluster_feature_manifests_get_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1ClusterFeatureManifestsGetReader is a Reader for the V1ClusterFeatureManifestsGet structure. +type V1ClusterFeatureManifestsGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1ClusterFeatureManifestsGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1ClusterFeatureManifestsGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1ClusterFeatureManifestsGetOK creates a V1ClusterFeatureManifestsGetOK with default headers values +func NewV1ClusterFeatureManifestsGetOK() *V1ClusterFeatureManifestsGetOK { + return &V1ClusterFeatureManifestsGetOK{} +} + +/* +V1ClusterFeatureManifestsGetOK handles this case with default header values. + +OK +*/ +type V1ClusterFeatureManifestsGetOK struct { + Payload *models.V1ClusterManifests +} + +func (o *V1ClusterFeatureManifestsGetOK) Error() string { + return fmt.Sprintf("[GET /v1/spectroclusters/{uid}/features/manifests][%d] v1ClusterFeatureManifestsGetOK %+v", 200, o.Payload) +} + +func (o *V1ClusterFeatureManifestsGetOK) GetPayload() *models.V1ClusterManifests { + return o.Payload +} + +func (o *V1ClusterFeatureManifestsGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1ClusterManifests) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_cluster_feature_restore_get_parameters.go b/api/client/v1/v1_cluster_feature_restore_get_parameters.go new file mode 100644 index 00000000..846e04dd --- /dev/null +++ b/api/client/v1/v1_cluster_feature_restore_get_parameters.go @@ -0,0 +1,162 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1ClusterFeatureRestoreGetParams creates a new V1ClusterFeatureRestoreGetParams object +// with the default values initialized. +func NewV1ClusterFeatureRestoreGetParams() *V1ClusterFeatureRestoreGetParams { + var () + return &V1ClusterFeatureRestoreGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1ClusterFeatureRestoreGetParamsWithTimeout creates a new V1ClusterFeatureRestoreGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1ClusterFeatureRestoreGetParamsWithTimeout(timeout time.Duration) *V1ClusterFeatureRestoreGetParams { + var () + return &V1ClusterFeatureRestoreGetParams{ + + timeout: timeout, + } +} + +// NewV1ClusterFeatureRestoreGetParamsWithContext creates a new V1ClusterFeatureRestoreGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1ClusterFeatureRestoreGetParamsWithContext(ctx context.Context) *V1ClusterFeatureRestoreGetParams { + var () + return &V1ClusterFeatureRestoreGetParams{ + + Context: ctx, + } +} + +// NewV1ClusterFeatureRestoreGetParamsWithHTTPClient creates a new V1ClusterFeatureRestoreGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1ClusterFeatureRestoreGetParamsWithHTTPClient(client *http.Client) *V1ClusterFeatureRestoreGetParams { + var () + return &V1ClusterFeatureRestoreGetParams{ + HTTPClient: client, + } +} + +/* +V1ClusterFeatureRestoreGetParams contains all the parameters to send to the API endpoint +for the v1 cluster feature restore get operation typically these are written to a http.Request +*/ +type V1ClusterFeatureRestoreGetParams struct { + + /*RestoreRequestUID*/ + RestoreRequestUID *string + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cluster feature restore get params +func (o *V1ClusterFeatureRestoreGetParams) WithTimeout(timeout time.Duration) *V1ClusterFeatureRestoreGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cluster feature restore get params +func (o *V1ClusterFeatureRestoreGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cluster feature restore get params +func (o *V1ClusterFeatureRestoreGetParams) WithContext(ctx context.Context) *V1ClusterFeatureRestoreGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cluster feature restore get params +func (o *V1ClusterFeatureRestoreGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cluster feature restore get params +func (o *V1ClusterFeatureRestoreGetParams) WithHTTPClient(client *http.Client) *V1ClusterFeatureRestoreGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cluster feature restore get params +func (o *V1ClusterFeatureRestoreGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithRestoreRequestUID adds the restoreRequestUID to the v1 cluster feature restore get params +func (o *V1ClusterFeatureRestoreGetParams) WithRestoreRequestUID(restoreRequestUID *string) *V1ClusterFeatureRestoreGetParams { + o.SetRestoreRequestUID(restoreRequestUID) + return o +} + +// SetRestoreRequestUID adds the restoreRequestUid to the v1 cluster feature restore get params +func (o *V1ClusterFeatureRestoreGetParams) SetRestoreRequestUID(restoreRequestUID *string) { + o.RestoreRequestUID = restoreRequestUID +} + +// WithUID adds the uid to the v1 cluster feature restore get params +func (o *V1ClusterFeatureRestoreGetParams) WithUID(uid string) *V1ClusterFeatureRestoreGetParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 cluster feature restore get params +func (o *V1ClusterFeatureRestoreGetParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1ClusterFeatureRestoreGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.RestoreRequestUID != nil { + + // query param restoreRequestUid + var qrRestoreRequestUID string + if o.RestoreRequestUID != nil { + qrRestoreRequestUID = *o.RestoreRequestUID + } + qRestoreRequestUID := qrRestoreRequestUID + if qRestoreRequestUID != "" { + if err := r.SetQueryParam("restoreRequestUid", qRestoreRequestUID); err != nil { + return err + } + } + + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cluster_feature_restore_get_responses.go b/api/client/v1/v1_cluster_feature_restore_get_responses.go new file mode 100644 index 00000000..d69c66b1 --- /dev/null +++ b/api/client/v1/v1_cluster_feature_restore_get_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1ClusterFeatureRestoreGetReader is a Reader for the V1ClusterFeatureRestoreGet structure. +type V1ClusterFeatureRestoreGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1ClusterFeatureRestoreGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1ClusterFeatureRestoreGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1ClusterFeatureRestoreGetOK creates a V1ClusterFeatureRestoreGetOK with default headers values +func NewV1ClusterFeatureRestoreGetOK() *V1ClusterFeatureRestoreGetOK { + return &V1ClusterFeatureRestoreGetOK{} +} + +/* +V1ClusterFeatureRestoreGetOK handles this case with default header values. + +OK +*/ +type V1ClusterFeatureRestoreGetOK struct { + Payload *models.V1ClusterRestore +} + +func (o *V1ClusterFeatureRestoreGetOK) Error() string { + return fmt.Sprintf("[GET /v1/spectroclusters/{uid}/features/restore][%d] v1ClusterFeatureRestoreGetOK %+v", 200, o.Payload) +} + +func (o *V1ClusterFeatureRestoreGetOK) GetPayload() *models.V1ClusterRestore { + return o.Payload +} + +func (o *V1ClusterFeatureRestoreGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1ClusterRestore) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_cluster_feature_restore_on_demand_create_parameters.go b/api/client/v1/v1_cluster_feature_restore_on_demand_create_parameters.go new file mode 100644 index 00000000..e2a0eb2d --- /dev/null +++ b/api/client/v1/v1_cluster_feature_restore_on_demand_create_parameters.go @@ -0,0 +1,154 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1ClusterFeatureRestoreOnDemandCreateParams creates a new V1ClusterFeatureRestoreOnDemandCreateParams object +// with the default values initialized. +func NewV1ClusterFeatureRestoreOnDemandCreateParams() *V1ClusterFeatureRestoreOnDemandCreateParams { + var () + return &V1ClusterFeatureRestoreOnDemandCreateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1ClusterFeatureRestoreOnDemandCreateParamsWithTimeout creates a new V1ClusterFeatureRestoreOnDemandCreateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1ClusterFeatureRestoreOnDemandCreateParamsWithTimeout(timeout time.Duration) *V1ClusterFeatureRestoreOnDemandCreateParams { + var () + return &V1ClusterFeatureRestoreOnDemandCreateParams{ + + timeout: timeout, + } +} + +// NewV1ClusterFeatureRestoreOnDemandCreateParamsWithContext creates a new V1ClusterFeatureRestoreOnDemandCreateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1ClusterFeatureRestoreOnDemandCreateParamsWithContext(ctx context.Context) *V1ClusterFeatureRestoreOnDemandCreateParams { + var () + return &V1ClusterFeatureRestoreOnDemandCreateParams{ + + Context: ctx, + } +} + +// NewV1ClusterFeatureRestoreOnDemandCreateParamsWithHTTPClient creates a new V1ClusterFeatureRestoreOnDemandCreateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1ClusterFeatureRestoreOnDemandCreateParamsWithHTTPClient(client *http.Client) *V1ClusterFeatureRestoreOnDemandCreateParams { + var () + return &V1ClusterFeatureRestoreOnDemandCreateParams{ + HTTPClient: client, + } +} + +/* +V1ClusterFeatureRestoreOnDemandCreateParams contains all the parameters to send to the API endpoint +for the v1 cluster feature restore on demand create operation typically these are written to a http.Request +*/ +type V1ClusterFeatureRestoreOnDemandCreateParams struct { + + /*Body*/ + Body *models.V1ClusterRestoreConfig + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cluster feature restore on demand create params +func (o *V1ClusterFeatureRestoreOnDemandCreateParams) WithTimeout(timeout time.Duration) *V1ClusterFeatureRestoreOnDemandCreateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cluster feature restore on demand create params +func (o *V1ClusterFeatureRestoreOnDemandCreateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cluster feature restore on demand create params +func (o *V1ClusterFeatureRestoreOnDemandCreateParams) WithContext(ctx context.Context) *V1ClusterFeatureRestoreOnDemandCreateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cluster feature restore on demand create params +func (o *V1ClusterFeatureRestoreOnDemandCreateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cluster feature restore on demand create params +func (o *V1ClusterFeatureRestoreOnDemandCreateParams) WithHTTPClient(client *http.Client) *V1ClusterFeatureRestoreOnDemandCreateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cluster feature restore on demand create params +func (o *V1ClusterFeatureRestoreOnDemandCreateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 cluster feature restore on demand create params +func (o *V1ClusterFeatureRestoreOnDemandCreateParams) WithBody(body *models.V1ClusterRestoreConfig) *V1ClusterFeatureRestoreOnDemandCreateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 cluster feature restore on demand create params +func (o *V1ClusterFeatureRestoreOnDemandCreateParams) SetBody(body *models.V1ClusterRestoreConfig) { + o.Body = body +} + +// WithUID adds the uid to the v1 cluster feature restore on demand create params +func (o *V1ClusterFeatureRestoreOnDemandCreateParams) WithUID(uid string) *V1ClusterFeatureRestoreOnDemandCreateParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 cluster feature restore on demand create params +func (o *V1ClusterFeatureRestoreOnDemandCreateParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1ClusterFeatureRestoreOnDemandCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cluster_feature_restore_on_demand_create_responses.go b/api/client/v1/v1_cluster_feature_restore_on_demand_create_responses.go new file mode 100644 index 00000000..4cafde87 --- /dev/null +++ b/api/client/v1/v1_cluster_feature_restore_on_demand_create_responses.go @@ -0,0 +1,77 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1ClusterFeatureRestoreOnDemandCreateReader is a Reader for the V1ClusterFeatureRestoreOnDemandCreate structure. +type V1ClusterFeatureRestoreOnDemandCreateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1ClusterFeatureRestoreOnDemandCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 201: + result := NewV1ClusterFeatureRestoreOnDemandCreateCreated() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1ClusterFeatureRestoreOnDemandCreateCreated creates a V1ClusterFeatureRestoreOnDemandCreateCreated with default headers values +func NewV1ClusterFeatureRestoreOnDemandCreateCreated() *V1ClusterFeatureRestoreOnDemandCreateCreated { + return &V1ClusterFeatureRestoreOnDemandCreateCreated{} +} + +/* +V1ClusterFeatureRestoreOnDemandCreateCreated handles this case with default header values. + +Created successfully +*/ +type V1ClusterFeatureRestoreOnDemandCreateCreated struct { + /*Audit uid for the request + */ + AuditUID string + + Payload *models.V1UID +} + +func (o *V1ClusterFeatureRestoreOnDemandCreateCreated) Error() string { + return fmt.Sprintf("[POST /v1/spectroclusters/{uid}/features/restore/onDemand][%d] v1ClusterFeatureRestoreOnDemandCreateCreated %+v", 201, o.Payload) +} + +func (o *V1ClusterFeatureRestoreOnDemandCreateCreated) GetPayload() *models.V1UID { + return o.Payload +} + +func (o *V1ClusterFeatureRestoreOnDemandCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header AuditUid + o.AuditUID = response.GetHeader("AuditUid") + + o.Payload = new(models.V1UID) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_cluster_feature_scan_kube_bench_log_update_parameters.go b/api/client/v1/v1_cluster_feature_scan_kube_bench_log_update_parameters.go new file mode 100644 index 00000000..b5836a57 --- /dev/null +++ b/api/client/v1/v1_cluster_feature_scan_kube_bench_log_update_parameters.go @@ -0,0 +1,154 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1ClusterFeatureScanKubeBenchLogUpdateParams creates a new V1ClusterFeatureScanKubeBenchLogUpdateParams object +// with the default values initialized. +func NewV1ClusterFeatureScanKubeBenchLogUpdateParams() *V1ClusterFeatureScanKubeBenchLogUpdateParams { + var () + return &V1ClusterFeatureScanKubeBenchLogUpdateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1ClusterFeatureScanKubeBenchLogUpdateParamsWithTimeout creates a new V1ClusterFeatureScanKubeBenchLogUpdateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1ClusterFeatureScanKubeBenchLogUpdateParamsWithTimeout(timeout time.Duration) *V1ClusterFeatureScanKubeBenchLogUpdateParams { + var () + return &V1ClusterFeatureScanKubeBenchLogUpdateParams{ + + timeout: timeout, + } +} + +// NewV1ClusterFeatureScanKubeBenchLogUpdateParamsWithContext creates a new V1ClusterFeatureScanKubeBenchLogUpdateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1ClusterFeatureScanKubeBenchLogUpdateParamsWithContext(ctx context.Context) *V1ClusterFeatureScanKubeBenchLogUpdateParams { + var () + return &V1ClusterFeatureScanKubeBenchLogUpdateParams{ + + Context: ctx, + } +} + +// NewV1ClusterFeatureScanKubeBenchLogUpdateParamsWithHTTPClient creates a new V1ClusterFeatureScanKubeBenchLogUpdateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1ClusterFeatureScanKubeBenchLogUpdateParamsWithHTTPClient(client *http.Client) *V1ClusterFeatureScanKubeBenchLogUpdateParams { + var () + return &V1ClusterFeatureScanKubeBenchLogUpdateParams{ + HTTPClient: client, + } +} + +/* +V1ClusterFeatureScanKubeBenchLogUpdateParams contains all the parameters to send to the API endpoint +for the v1 cluster feature scan kube bench log update operation typically these are written to a http.Request +*/ +type V1ClusterFeatureScanKubeBenchLogUpdateParams struct { + + /*Body*/ + Body *models.V1KubeBenchEntity + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cluster feature scan kube bench log update params +func (o *V1ClusterFeatureScanKubeBenchLogUpdateParams) WithTimeout(timeout time.Duration) *V1ClusterFeatureScanKubeBenchLogUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cluster feature scan kube bench log update params +func (o *V1ClusterFeatureScanKubeBenchLogUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cluster feature scan kube bench log update params +func (o *V1ClusterFeatureScanKubeBenchLogUpdateParams) WithContext(ctx context.Context) *V1ClusterFeatureScanKubeBenchLogUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cluster feature scan kube bench log update params +func (o *V1ClusterFeatureScanKubeBenchLogUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cluster feature scan kube bench log update params +func (o *V1ClusterFeatureScanKubeBenchLogUpdateParams) WithHTTPClient(client *http.Client) *V1ClusterFeatureScanKubeBenchLogUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cluster feature scan kube bench log update params +func (o *V1ClusterFeatureScanKubeBenchLogUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 cluster feature scan kube bench log update params +func (o *V1ClusterFeatureScanKubeBenchLogUpdateParams) WithBody(body *models.V1KubeBenchEntity) *V1ClusterFeatureScanKubeBenchLogUpdateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 cluster feature scan kube bench log update params +func (o *V1ClusterFeatureScanKubeBenchLogUpdateParams) SetBody(body *models.V1KubeBenchEntity) { + o.Body = body +} + +// WithUID adds the uid to the v1 cluster feature scan kube bench log update params +func (o *V1ClusterFeatureScanKubeBenchLogUpdateParams) WithUID(uid string) *V1ClusterFeatureScanKubeBenchLogUpdateParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 cluster feature scan kube bench log update params +func (o *V1ClusterFeatureScanKubeBenchLogUpdateParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1ClusterFeatureScanKubeBenchLogUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cluster_feature_scan_kube_bench_log_update_responses.go b/api/client/v1/v1_cluster_feature_scan_kube_bench_log_update_responses.go new file mode 100644 index 00000000..ef7b7fbc --- /dev/null +++ b/api/client/v1/v1_cluster_feature_scan_kube_bench_log_update_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1ClusterFeatureScanKubeBenchLogUpdateReader is a Reader for the V1ClusterFeatureScanKubeBenchLogUpdate structure. +type V1ClusterFeatureScanKubeBenchLogUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1ClusterFeatureScanKubeBenchLogUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1ClusterFeatureScanKubeBenchLogUpdateNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1ClusterFeatureScanKubeBenchLogUpdateNoContent creates a V1ClusterFeatureScanKubeBenchLogUpdateNoContent with default headers values +func NewV1ClusterFeatureScanKubeBenchLogUpdateNoContent() *V1ClusterFeatureScanKubeBenchLogUpdateNoContent { + return &V1ClusterFeatureScanKubeBenchLogUpdateNoContent{} +} + +/* +V1ClusterFeatureScanKubeBenchLogUpdateNoContent handles this case with default header values. + +The resource was updated successfully +*/ +type V1ClusterFeatureScanKubeBenchLogUpdateNoContent struct { +} + +func (o *V1ClusterFeatureScanKubeBenchLogUpdateNoContent) Error() string { + return fmt.Sprintf("[PUT /v1/spectroclusters/{uid}/features/complianceScan/logs/drivers/kubeBench][%d] v1ClusterFeatureScanKubeBenchLogUpdateNoContent ", 204) +} + +func (o *V1ClusterFeatureScanKubeBenchLogUpdateNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_cluster_feature_scan_kube_hunter_log_update_parameters.go b/api/client/v1/v1_cluster_feature_scan_kube_hunter_log_update_parameters.go new file mode 100644 index 00000000..c2c19ed2 --- /dev/null +++ b/api/client/v1/v1_cluster_feature_scan_kube_hunter_log_update_parameters.go @@ -0,0 +1,154 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1ClusterFeatureScanKubeHunterLogUpdateParams creates a new V1ClusterFeatureScanKubeHunterLogUpdateParams object +// with the default values initialized. +func NewV1ClusterFeatureScanKubeHunterLogUpdateParams() *V1ClusterFeatureScanKubeHunterLogUpdateParams { + var () + return &V1ClusterFeatureScanKubeHunterLogUpdateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1ClusterFeatureScanKubeHunterLogUpdateParamsWithTimeout creates a new V1ClusterFeatureScanKubeHunterLogUpdateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1ClusterFeatureScanKubeHunterLogUpdateParamsWithTimeout(timeout time.Duration) *V1ClusterFeatureScanKubeHunterLogUpdateParams { + var () + return &V1ClusterFeatureScanKubeHunterLogUpdateParams{ + + timeout: timeout, + } +} + +// NewV1ClusterFeatureScanKubeHunterLogUpdateParamsWithContext creates a new V1ClusterFeatureScanKubeHunterLogUpdateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1ClusterFeatureScanKubeHunterLogUpdateParamsWithContext(ctx context.Context) *V1ClusterFeatureScanKubeHunterLogUpdateParams { + var () + return &V1ClusterFeatureScanKubeHunterLogUpdateParams{ + + Context: ctx, + } +} + +// NewV1ClusterFeatureScanKubeHunterLogUpdateParamsWithHTTPClient creates a new V1ClusterFeatureScanKubeHunterLogUpdateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1ClusterFeatureScanKubeHunterLogUpdateParamsWithHTTPClient(client *http.Client) *V1ClusterFeatureScanKubeHunterLogUpdateParams { + var () + return &V1ClusterFeatureScanKubeHunterLogUpdateParams{ + HTTPClient: client, + } +} + +/* +V1ClusterFeatureScanKubeHunterLogUpdateParams contains all the parameters to send to the API endpoint +for the v1 cluster feature scan kube hunter log update operation typically these are written to a http.Request +*/ +type V1ClusterFeatureScanKubeHunterLogUpdateParams struct { + + /*Body*/ + Body *models.V1KubeHunterEntity + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cluster feature scan kube hunter log update params +func (o *V1ClusterFeatureScanKubeHunterLogUpdateParams) WithTimeout(timeout time.Duration) *V1ClusterFeatureScanKubeHunterLogUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cluster feature scan kube hunter log update params +func (o *V1ClusterFeatureScanKubeHunterLogUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cluster feature scan kube hunter log update params +func (o *V1ClusterFeatureScanKubeHunterLogUpdateParams) WithContext(ctx context.Context) *V1ClusterFeatureScanKubeHunterLogUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cluster feature scan kube hunter log update params +func (o *V1ClusterFeatureScanKubeHunterLogUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cluster feature scan kube hunter log update params +func (o *V1ClusterFeatureScanKubeHunterLogUpdateParams) WithHTTPClient(client *http.Client) *V1ClusterFeatureScanKubeHunterLogUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cluster feature scan kube hunter log update params +func (o *V1ClusterFeatureScanKubeHunterLogUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 cluster feature scan kube hunter log update params +func (o *V1ClusterFeatureScanKubeHunterLogUpdateParams) WithBody(body *models.V1KubeHunterEntity) *V1ClusterFeatureScanKubeHunterLogUpdateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 cluster feature scan kube hunter log update params +func (o *V1ClusterFeatureScanKubeHunterLogUpdateParams) SetBody(body *models.V1KubeHunterEntity) { + o.Body = body +} + +// WithUID adds the uid to the v1 cluster feature scan kube hunter log update params +func (o *V1ClusterFeatureScanKubeHunterLogUpdateParams) WithUID(uid string) *V1ClusterFeatureScanKubeHunterLogUpdateParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 cluster feature scan kube hunter log update params +func (o *V1ClusterFeatureScanKubeHunterLogUpdateParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1ClusterFeatureScanKubeHunterLogUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cluster_feature_scan_kube_hunter_log_update_responses.go b/api/client/v1/v1_cluster_feature_scan_kube_hunter_log_update_responses.go new file mode 100644 index 00000000..84a07762 --- /dev/null +++ b/api/client/v1/v1_cluster_feature_scan_kube_hunter_log_update_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1ClusterFeatureScanKubeHunterLogUpdateReader is a Reader for the V1ClusterFeatureScanKubeHunterLogUpdate structure. +type V1ClusterFeatureScanKubeHunterLogUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1ClusterFeatureScanKubeHunterLogUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1ClusterFeatureScanKubeHunterLogUpdateNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1ClusterFeatureScanKubeHunterLogUpdateNoContent creates a V1ClusterFeatureScanKubeHunterLogUpdateNoContent with default headers values +func NewV1ClusterFeatureScanKubeHunterLogUpdateNoContent() *V1ClusterFeatureScanKubeHunterLogUpdateNoContent { + return &V1ClusterFeatureScanKubeHunterLogUpdateNoContent{} +} + +/* +V1ClusterFeatureScanKubeHunterLogUpdateNoContent handles this case with default header values. + +The resource was updated successfully +*/ +type V1ClusterFeatureScanKubeHunterLogUpdateNoContent struct { +} + +func (o *V1ClusterFeatureScanKubeHunterLogUpdateNoContent) Error() string { + return fmt.Sprintf("[PUT /v1/spectroclusters/{uid}/features/complianceScan/logs/drivers/kubeHunter][%d] v1ClusterFeatureScanKubeHunterLogUpdateNoContent ", 204) +} + +func (o *V1ClusterFeatureScanKubeHunterLogUpdateNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_cluster_feature_scan_sonobuoy_log_update_parameters.go b/api/client/v1/v1_cluster_feature_scan_sonobuoy_log_update_parameters.go new file mode 100644 index 00000000..8183100d --- /dev/null +++ b/api/client/v1/v1_cluster_feature_scan_sonobuoy_log_update_parameters.go @@ -0,0 +1,154 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1ClusterFeatureScanSonobuoyLogUpdateParams creates a new V1ClusterFeatureScanSonobuoyLogUpdateParams object +// with the default values initialized. +func NewV1ClusterFeatureScanSonobuoyLogUpdateParams() *V1ClusterFeatureScanSonobuoyLogUpdateParams { + var () + return &V1ClusterFeatureScanSonobuoyLogUpdateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1ClusterFeatureScanSonobuoyLogUpdateParamsWithTimeout creates a new V1ClusterFeatureScanSonobuoyLogUpdateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1ClusterFeatureScanSonobuoyLogUpdateParamsWithTimeout(timeout time.Duration) *V1ClusterFeatureScanSonobuoyLogUpdateParams { + var () + return &V1ClusterFeatureScanSonobuoyLogUpdateParams{ + + timeout: timeout, + } +} + +// NewV1ClusterFeatureScanSonobuoyLogUpdateParamsWithContext creates a new V1ClusterFeatureScanSonobuoyLogUpdateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1ClusterFeatureScanSonobuoyLogUpdateParamsWithContext(ctx context.Context) *V1ClusterFeatureScanSonobuoyLogUpdateParams { + var () + return &V1ClusterFeatureScanSonobuoyLogUpdateParams{ + + Context: ctx, + } +} + +// NewV1ClusterFeatureScanSonobuoyLogUpdateParamsWithHTTPClient creates a new V1ClusterFeatureScanSonobuoyLogUpdateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1ClusterFeatureScanSonobuoyLogUpdateParamsWithHTTPClient(client *http.Client) *V1ClusterFeatureScanSonobuoyLogUpdateParams { + var () + return &V1ClusterFeatureScanSonobuoyLogUpdateParams{ + HTTPClient: client, + } +} + +/* +V1ClusterFeatureScanSonobuoyLogUpdateParams contains all the parameters to send to the API endpoint +for the v1 cluster feature scan sonobuoy log update operation typically these are written to a http.Request +*/ +type V1ClusterFeatureScanSonobuoyLogUpdateParams struct { + + /*Body*/ + Body *models.V1SonobuoyEntity + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cluster feature scan sonobuoy log update params +func (o *V1ClusterFeatureScanSonobuoyLogUpdateParams) WithTimeout(timeout time.Duration) *V1ClusterFeatureScanSonobuoyLogUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cluster feature scan sonobuoy log update params +func (o *V1ClusterFeatureScanSonobuoyLogUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cluster feature scan sonobuoy log update params +func (o *V1ClusterFeatureScanSonobuoyLogUpdateParams) WithContext(ctx context.Context) *V1ClusterFeatureScanSonobuoyLogUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cluster feature scan sonobuoy log update params +func (o *V1ClusterFeatureScanSonobuoyLogUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cluster feature scan sonobuoy log update params +func (o *V1ClusterFeatureScanSonobuoyLogUpdateParams) WithHTTPClient(client *http.Client) *V1ClusterFeatureScanSonobuoyLogUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cluster feature scan sonobuoy log update params +func (o *V1ClusterFeatureScanSonobuoyLogUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 cluster feature scan sonobuoy log update params +func (o *V1ClusterFeatureScanSonobuoyLogUpdateParams) WithBody(body *models.V1SonobuoyEntity) *V1ClusterFeatureScanSonobuoyLogUpdateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 cluster feature scan sonobuoy log update params +func (o *V1ClusterFeatureScanSonobuoyLogUpdateParams) SetBody(body *models.V1SonobuoyEntity) { + o.Body = body +} + +// WithUID adds the uid to the v1 cluster feature scan sonobuoy log update params +func (o *V1ClusterFeatureScanSonobuoyLogUpdateParams) WithUID(uid string) *V1ClusterFeatureScanSonobuoyLogUpdateParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 cluster feature scan sonobuoy log update params +func (o *V1ClusterFeatureScanSonobuoyLogUpdateParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1ClusterFeatureScanSonobuoyLogUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cluster_feature_scan_sonobuoy_log_update_responses.go b/api/client/v1/v1_cluster_feature_scan_sonobuoy_log_update_responses.go new file mode 100644 index 00000000..85096ac0 --- /dev/null +++ b/api/client/v1/v1_cluster_feature_scan_sonobuoy_log_update_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1ClusterFeatureScanSonobuoyLogUpdateReader is a Reader for the V1ClusterFeatureScanSonobuoyLogUpdate structure. +type V1ClusterFeatureScanSonobuoyLogUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1ClusterFeatureScanSonobuoyLogUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1ClusterFeatureScanSonobuoyLogUpdateNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1ClusterFeatureScanSonobuoyLogUpdateNoContent creates a V1ClusterFeatureScanSonobuoyLogUpdateNoContent with default headers values +func NewV1ClusterFeatureScanSonobuoyLogUpdateNoContent() *V1ClusterFeatureScanSonobuoyLogUpdateNoContent { + return &V1ClusterFeatureScanSonobuoyLogUpdateNoContent{} +} + +/* +V1ClusterFeatureScanSonobuoyLogUpdateNoContent handles this case with default header values. + +The resource was updated successfully +*/ +type V1ClusterFeatureScanSonobuoyLogUpdateNoContent struct { +} + +func (o *V1ClusterFeatureScanSonobuoyLogUpdateNoContent) Error() string { + return fmt.Sprintf("[PUT /v1/spectroclusters/{uid}/features/complianceScan/logs/drivers/sonobuoy][%d] v1ClusterFeatureScanSonobuoyLogUpdateNoContent ", 204) +} + +func (o *V1ClusterFeatureScanSonobuoyLogUpdateNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_cluster_feature_scan_syft_log_update_parameters.go b/api/client/v1/v1_cluster_feature_scan_syft_log_update_parameters.go new file mode 100644 index 00000000..0ce559b2 --- /dev/null +++ b/api/client/v1/v1_cluster_feature_scan_syft_log_update_parameters.go @@ -0,0 +1,154 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1ClusterFeatureScanSyftLogUpdateParams creates a new V1ClusterFeatureScanSyftLogUpdateParams object +// with the default values initialized. +func NewV1ClusterFeatureScanSyftLogUpdateParams() *V1ClusterFeatureScanSyftLogUpdateParams { + var () + return &V1ClusterFeatureScanSyftLogUpdateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1ClusterFeatureScanSyftLogUpdateParamsWithTimeout creates a new V1ClusterFeatureScanSyftLogUpdateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1ClusterFeatureScanSyftLogUpdateParamsWithTimeout(timeout time.Duration) *V1ClusterFeatureScanSyftLogUpdateParams { + var () + return &V1ClusterFeatureScanSyftLogUpdateParams{ + + timeout: timeout, + } +} + +// NewV1ClusterFeatureScanSyftLogUpdateParamsWithContext creates a new V1ClusterFeatureScanSyftLogUpdateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1ClusterFeatureScanSyftLogUpdateParamsWithContext(ctx context.Context) *V1ClusterFeatureScanSyftLogUpdateParams { + var () + return &V1ClusterFeatureScanSyftLogUpdateParams{ + + Context: ctx, + } +} + +// NewV1ClusterFeatureScanSyftLogUpdateParamsWithHTTPClient creates a new V1ClusterFeatureScanSyftLogUpdateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1ClusterFeatureScanSyftLogUpdateParamsWithHTTPClient(client *http.Client) *V1ClusterFeatureScanSyftLogUpdateParams { + var () + return &V1ClusterFeatureScanSyftLogUpdateParams{ + HTTPClient: client, + } +} + +/* +V1ClusterFeatureScanSyftLogUpdateParams contains all the parameters to send to the API endpoint +for the v1 cluster feature scan syft log update operation typically these are written to a http.Request +*/ +type V1ClusterFeatureScanSyftLogUpdateParams struct { + + /*Body*/ + Body *models.V1SyftEntity + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cluster feature scan syft log update params +func (o *V1ClusterFeatureScanSyftLogUpdateParams) WithTimeout(timeout time.Duration) *V1ClusterFeatureScanSyftLogUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cluster feature scan syft log update params +func (o *V1ClusterFeatureScanSyftLogUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cluster feature scan syft log update params +func (o *V1ClusterFeatureScanSyftLogUpdateParams) WithContext(ctx context.Context) *V1ClusterFeatureScanSyftLogUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cluster feature scan syft log update params +func (o *V1ClusterFeatureScanSyftLogUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cluster feature scan syft log update params +func (o *V1ClusterFeatureScanSyftLogUpdateParams) WithHTTPClient(client *http.Client) *V1ClusterFeatureScanSyftLogUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cluster feature scan syft log update params +func (o *V1ClusterFeatureScanSyftLogUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 cluster feature scan syft log update params +func (o *V1ClusterFeatureScanSyftLogUpdateParams) WithBody(body *models.V1SyftEntity) *V1ClusterFeatureScanSyftLogUpdateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 cluster feature scan syft log update params +func (o *V1ClusterFeatureScanSyftLogUpdateParams) SetBody(body *models.V1SyftEntity) { + o.Body = body +} + +// WithUID adds the uid to the v1 cluster feature scan syft log update params +func (o *V1ClusterFeatureScanSyftLogUpdateParams) WithUID(uid string) *V1ClusterFeatureScanSyftLogUpdateParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 cluster feature scan syft log update params +func (o *V1ClusterFeatureScanSyftLogUpdateParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1ClusterFeatureScanSyftLogUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cluster_feature_scan_syft_log_update_responses.go b/api/client/v1/v1_cluster_feature_scan_syft_log_update_responses.go new file mode 100644 index 00000000..b03d910c --- /dev/null +++ b/api/client/v1/v1_cluster_feature_scan_syft_log_update_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1ClusterFeatureScanSyftLogUpdateReader is a Reader for the V1ClusterFeatureScanSyftLogUpdate structure. +type V1ClusterFeatureScanSyftLogUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1ClusterFeatureScanSyftLogUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1ClusterFeatureScanSyftLogUpdateNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1ClusterFeatureScanSyftLogUpdateNoContent creates a V1ClusterFeatureScanSyftLogUpdateNoContent with default headers values +func NewV1ClusterFeatureScanSyftLogUpdateNoContent() *V1ClusterFeatureScanSyftLogUpdateNoContent { + return &V1ClusterFeatureScanSyftLogUpdateNoContent{} +} + +/* +V1ClusterFeatureScanSyftLogUpdateNoContent handles this case with default header values. + +The resource was updated successfully +*/ +type V1ClusterFeatureScanSyftLogUpdateNoContent struct { +} + +func (o *V1ClusterFeatureScanSyftLogUpdateNoContent) Error() string { + return fmt.Sprintf("[PATCH /v1/spectroclusters/{uid}/features/complianceScan/logs/drivers/syft][%d] v1ClusterFeatureScanSyftLogUpdateNoContent ", 204) +} + +func (o *V1ClusterFeatureScanSyftLogUpdateNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_cluster_feature_sonobuoy_log_get_parameters.go b/api/client/v1/v1_cluster_feature_sonobuoy_log_get_parameters.go new file mode 100644 index 00000000..a8afd371 --- /dev/null +++ b/api/client/v1/v1_cluster_feature_sonobuoy_log_get_parameters.go @@ -0,0 +1,180 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1ClusterFeatureSonobuoyLogGetParams creates a new V1ClusterFeatureSonobuoyLogGetParams object +// with the default values initialized. +func NewV1ClusterFeatureSonobuoyLogGetParams() *V1ClusterFeatureSonobuoyLogGetParams { + var () + return &V1ClusterFeatureSonobuoyLogGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1ClusterFeatureSonobuoyLogGetParamsWithTimeout creates a new V1ClusterFeatureSonobuoyLogGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1ClusterFeatureSonobuoyLogGetParamsWithTimeout(timeout time.Duration) *V1ClusterFeatureSonobuoyLogGetParams { + var () + return &V1ClusterFeatureSonobuoyLogGetParams{ + + timeout: timeout, + } +} + +// NewV1ClusterFeatureSonobuoyLogGetParamsWithContext creates a new V1ClusterFeatureSonobuoyLogGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1ClusterFeatureSonobuoyLogGetParamsWithContext(ctx context.Context) *V1ClusterFeatureSonobuoyLogGetParams { + var () + return &V1ClusterFeatureSonobuoyLogGetParams{ + + Context: ctx, + } +} + +// NewV1ClusterFeatureSonobuoyLogGetParamsWithHTTPClient creates a new V1ClusterFeatureSonobuoyLogGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1ClusterFeatureSonobuoyLogGetParamsWithHTTPClient(client *http.Client) *V1ClusterFeatureSonobuoyLogGetParams { + var () + return &V1ClusterFeatureSonobuoyLogGetParams{ + HTTPClient: client, + } +} + +/* +V1ClusterFeatureSonobuoyLogGetParams contains all the parameters to send to the API endpoint +for the v1 cluster feature sonobuoy log get operation typically these are written to a http.Request +*/ +type V1ClusterFeatureSonobuoyLogGetParams struct { + + /*LogUID*/ + LogUID string + /*ReportID*/ + ReportID *string + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cluster feature sonobuoy log get params +func (o *V1ClusterFeatureSonobuoyLogGetParams) WithTimeout(timeout time.Duration) *V1ClusterFeatureSonobuoyLogGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cluster feature sonobuoy log get params +func (o *V1ClusterFeatureSonobuoyLogGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cluster feature sonobuoy log get params +func (o *V1ClusterFeatureSonobuoyLogGetParams) WithContext(ctx context.Context) *V1ClusterFeatureSonobuoyLogGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cluster feature sonobuoy log get params +func (o *V1ClusterFeatureSonobuoyLogGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cluster feature sonobuoy log get params +func (o *V1ClusterFeatureSonobuoyLogGetParams) WithHTTPClient(client *http.Client) *V1ClusterFeatureSonobuoyLogGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cluster feature sonobuoy log get params +func (o *V1ClusterFeatureSonobuoyLogGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithLogUID adds the logUID to the v1 cluster feature sonobuoy log get params +func (o *V1ClusterFeatureSonobuoyLogGetParams) WithLogUID(logUID string) *V1ClusterFeatureSonobuoyLogGetParams { + o.SetLogUID(logUID) + return o +} + +// SetLogUID adds the logUid to the v1 cluster feature sonobuoy log get params +func (o *V1ClusterFeatureSonobuoyLogGetParams) SetLogUID(logUID string) { + o.LogUID = logUID +} + +// WithReportID adds the reportID to the v1 cluster feature sonobuoy log get params +func (o *V1ClusterFeatureSonobuoyLogGetParams) WithReportID(reportID *string) *V1ClusterFeatureSonobuoyLogGetParams { + o.SetReportID(reportID) + return o +} + +// SetReportID adds the reportId to the v1 cluster feature sonobuoy log get params +func (o *V1ClusterFeatureSonobuoyLogGetParams) SetReportID(reportID *string) { + o.ReportID = reportID +} + +// WithUID adds the uid to the v1 cluster feature sonobuoy log get params +func (o *V1ClusterFeatureSonobuoyLogGetParams) WithUID(uid string) *V1ClusterFeatureSonobuoyLogGetParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 cluster feature sonobuoy log get params +func (o *V1ClusterFeatureSonobuoyLogGetParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1ClusterFeatureSonobuoyLogGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param logUid + if err := r.SetPathParam("logUid", o.LogUID); err != nil { + return err + } + + if o.ReportID != nil { + + // query param reportId + var qrReportID string + if o.ReportID != nil { + qrReportID = *o.ReportID + } + qReportID := qrReportID + if qReportID != "" { + if err := r.SetQueryParam("reportId", qReportID); err != nil { + return err + } + } + + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cluster_feature_sonobuoy_log_get_responses.go b/api/client/v1/v1_cluster_feature_sonobuoy_log_get_responses.go new file mode 100644 index 00000000..be6e536a --- /dev/null +++ b/api/client/v1/v1_cluster_feature_sonobuoy_log_get_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1ClusterFeatureSonobuoyLogGetReader is a Reader for the V1ClusterFeatureSonobuoyLogGet structure. +type V1ClusterFeatureSonobuoyLogGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1ClusterFeatureSonobuoyLogGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1ClusterFeatureSonobuoyLogGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1ClusterFeatureSonobuoyLogGetOK creates a V1ClusterFeatureSonobuoyLogGetOK with default headers values +func NewV1ClusterFeatureSonobuoyLogGetOK() *V1ClusterFeatureSonobuoyLogGetOK { + return &V1ClusterFeatureSonobuoyLogGetOK{} +} + +/* +V1ClusterFeatureSonobuoyLogGetOK handles this case with default header values. + +OK +*/ +type V1ClusterFeatureSonobuoyLogGetOK struct { + Payload *models.V1ClusterScanLogSonobuoy +} + +func (o *V1ClusterFeatureSonobuoyLogGetOK) Error() string { + return fmt.Sprintf("[GET /v1/spectroclusters/{uid}/features/complianceScan/logs/{logUid}/drivers/sonobuoy][%d] v1ClusterFeatureSonobuoyLogGetOK %+v", 200, o.Payload) +} + +func (o *V1ClusterFeatureSonobuoyLogGetOK) GetPayload() *models.V1ClusterScanLogSonobuoy { + return o.Payload +} + +func (o *V1ClusterFeatureSonobuoyLogGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1ClusterScanLogSonobuoy) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_cluster_feature_syft_log_get_parameters.go b/api/client/v1/v1_cluster_feature_syft_log_get_parameters.go new file mode 100644 index 00000000..697a04ad --- /dev/null +++ b/api/client/v1/v1_cluster_feature_syft_log_get_parameters.go @@ -0,0 +1,151 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1ClusterFeatureSyftLogGetParams creates a new V1ClusterFeatureSyftLogGetParams object +// with the default values initialized. +func NewV1ClusterFeatureSyftLogGetParams() *V1ClusterFeatureSyftLogGetParams { + var () + return &V1ClusterFeatureSyftLogGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1ClusterFeatureSyftLogGetParamsWithTimeout creates a new V1ClusterFeatureSyftLogGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1ClusterFeatureSyftLogGetParamsWithTimeout(timeout time.Duration) *V1ClusterFeatureSyftLogGetParams { + var () + return &V1ClusterFeatureSyftLogGetParams{ + + timeout: timeout, + } +} + +// NewV1ClusterFeatureSyftLogGetParamsWithContext creates a new V1ClusterFeatureSyftLogGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1ClusterFeatureSyftLogGetParamsWithContext(ctx context.Context) *V1ClusterFeatureSyftLogGetParams { + var () + return &V1ClusterFeatureSyftLogGetParams{ + + Context: ctx, + } +} + +// NewV1ClusterFeatureSyftLogGetParamsWithHTTPClient creates a new V1ClusterFeatureSyftLogGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1ClusterFeatureSyftLogGetParamsWithHTTPClient(client *http.Client) *V1ClusterFeatureSyftLogGetParams { + var () + return &V1ClusterFeatureSyftLogGetParams{ + HTTPClient: client, + } +} + +/* +V1ClusterFeatureSyftLogGetParams contains all the parameters to send to the API endpoint +for the v1 cluster feature syft log get operation typically these are written to a http.Request +*/ +type V1ClusterFeatureSyftLogGetParams struct { + + /*LogUID*/ + LogUID string + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cluster feature syft log get params +func (o *V1ClusterFeatureSyftLogGetParams) WithTimeout(timeout time.Duration) *V1ClusterFeatureSyftLogGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cluster feature syft log get params +func (o *V1ClusterFeatureSyftLogGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cluster feature syft log get params +func (o *V1ClusterFeatureSyftLogGetParams) WithContext(ctx context.Context) *V1ClusterFeatureSyftLogGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cluster feature syft log get params +func (o *V1ClusterFeatureSyftLogGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cluster feature syft log get params +func (o *V1ClusterFeatureSyftLogGetParams) WithHTTPClient(client *http.Client) *V1ClusterFeatureSyftLogGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cluster feature syft log get params +func (o *V1ClusterFeatureSyftLogGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithLogUID adds the logUID to the v1 cluster feature syft log get params +func (o *V1ClusterFeatureSyftLogGetParams) WithLogUID(logUID string) *V1ClusterFeatureSyftLogGetParams { + o.SetLogUID(logUID) + return o +} + +// SetLogUID adds the logUid to the v1 cluster feature syft log get params +func (o *V1ClusterFeatureSyftLogGetParams) SetLogUID(logUID string) { + o.LogUID = logUID +} + +// WithUID adds the uid to the v1 cluster feature syft log get params +func (o *V1ClusterFeatureSyftLogGetParams) WithUID(uid string) *V1ClusterFeatureSyftLogGetParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 cluster feature syft log get params +func (o *V1ClusterFeatureSyftLogGetParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1ClusterFeatureSyftLogGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param logUid + if err := r.SetPathParam("logUid", o.LogUID); err != nil { + return err + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cluster_feature_syft_log_get_responses.go b/api/client/v1/v1_cluster_feature_syft_log_get_responses.go new file mode 100644 index 00000000..bac2450e --- /dev/null +++ b/api/client/v1/v1_cluster_feature_syft_log_get_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1ClusterFeatureSyftLogGetReader is a Reader for the V1ClusterFeatureSyftLogGet structure. +type V1ClusterFeatureSyftLogGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1ClusterFeatureSyftLogGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1ClusterFeatureSyftLogGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1ClusterFeatureSyftLogGetOK creates a V1ClusterFeatureSyftLogGetOK with default headers values +func NewV1ClusterFeatureSyftLogGetOK() *V1ClusterFeatureSyftLogGetOK { + return &V1ClusterFeatureSyftLogGetOK{} +} + +/* +V1ClusterFeatureSyftLogGetOK handles this case with default header values. + +OK +*/ +type V1ClusterFeatureSyftLogGetOK struct { + Payload *models.V1ClusterScanLogSyft +} + +func (o *V1ClusterFeatureSyftLogGetOK) Error() string { + return fmt.Sprintf("[GET /v1/spectroclusters/{uid}/features/complianceScan/logs/{logUid}/drivers/syft][%d] v1ClusterFeatureSyftLogGetOK %+v", 200, o.Payload) +} + +func (o *V1ClusterFeatureSyftLogGetOK) GetPayload() *models.V1ClusterScanLogSyft { + return o.Payload +} + +func (o *V1ClusterFeatureSyftLogGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1ClusterScanLogSyft) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_cluster_group_uid_host_clusters_summary_parameters.go b/api/client/v1/v1_cluster_group_uid_host_clusters_summary_parameters.go new file mode 100644 index 00000000..0f8f38a5 --- /dev/null +++ b/api/client/v1/v1_cluster_group_uid_host_clusters_summary_parameters.go @@ -0,0 +1,264 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1ClusterGroupUIDHostClustersSummaryParams creates a new V1ClusterGroupUIDHostClustersSummaryParams object +// with the default values initialized. +func NewV1ClusterGroupUIDHostClustersSummaryParams() *V1ClusterGroupUIDHostClustersSummaryParams { + var ( + limitDefault = int64(50) + ) + return &V1ClusterGroupUIDHostClustersSummaryParams{ + Limit: &limitDefault, + + timeout: cr.DefaultTimeout, + } +} + +// NewV1ClusterGroupUIDHostClustersSummaryParamsWithTimeout creates a new V1ClusterGroupUIDHostClustersSummaryParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1ClusterGroupUIDHostClustersSummaryParamsWithTimeout(timeout time.Duration) *V1ClusterGroupUIDHostClustersSummaryParams { + var ( + limitDefault = int64(50) + ) + return &V1ClusterGroupUIDHostClustersSummaryParams{ + Limit: &limitDefault, + + timeout: timeout, + } +} + +// NewV1ClusterGroupUIDHostClustersSummaryParamsWithContext creates a new V1ClusterGroupUIDHostClustersSummaryParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1ClusterGroupUIDHostClustersSummaryParamsWithContext(ctx context.Context) *V1ClusterGroupUIDHostClustersSummaryParams { + var ( + limitDefault = int64(50) + ) + return &V1ClusterGroupUIDHostClustersSummaryParams{ + Limit: &limitDefault, + + Context: ctx, + } +} + +// NewV1ClusterGroupUIDHostClustersSummaryParamsWithHTTPClient creates a new V1ClusterGroupUIDHostClustersSummaryParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1ClusterGroupUIDHostClustersSummaryParamsWithHTTPClient(client *http.Client) *V1ClusterGroupUIDHostClustersSummaryParams { + var ( + limitDefault = int64(50) + ) + return &V1ClusterGroupUIDHostClustersSummaryParams{ + Limit: &limitDefault, + HTTPClient: client, + } +} + +/* +V1ClusterGroupUIDHostClustersSummaryParams contains all the parameters to send to the API endpoint +for the v1 cluster group Uid host clusters summary operation typically these are written to a http.Request +*/ +type V1ClusterGroupUIDHostClustersSummaryParams struct { + + /*Body*/ + Body *models.V1SearchFilterSummarySpec + /*Continue + continue token to paginate the subsequent data items + + */ + Continue *string + /*Limit + limit is a maximum number of responses to return for a list call. Default and maximum value of the limit is 50. + If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. + + */ + Limit *int64 + /*Offset + offset is the next index number from which the response will start. The response offset value can be used along with continue token for the pagination. + + */ + Offset *int64 + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cluster group Uid host clusters summary params +func (o *V1ClusterGroupUIDHostClustersSummaryParams) WithTimeout(timeout time.Duration) *V1ClusterGroupUIDHostClustersSummaryParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cluster group Uid host clusters summary params +func (o *V1ClusterGroupUIDHostClustersSummaryParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cluster group Uid host clusters summary params +func (o *V1ClusterGroupUIDHostClustersSummaryParams) WithContext(ctx context.Context) *V1ClusterGroupUIDHostClustersSummaryParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cluster group Uid host clusters summary params +func (o *V1ClusterGroupUIDHostClustersSummaryParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cluster group Uid host clusters summary params +func (o *V1ClusterGroupUIDHostClustersSummaryParams) WithHTTPClient(client *http.Client) *V1ClusterGroupUIDHostClustersSummaryParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cluster group Uid host clusters summary params +func (o *V1ClusterGroupUIDHostClustersSummaryParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 cluster group Uid host clusters summary params +func (o *V1ClusterGroupUIDHostClustersSummaryParams) WithBody(body *models.V1SearchFilterSummarySpec) *V1ClusterGroupUIDHostClustersSummaryParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 cluster group Uid host clusters summary params +func (o *V1ClusterGroupUIDHostClustersSummaryParams) SetBody(body *models.V1SearchFilterSummarySpec) { + o.Body = body +} + +// WithContinue adds the continueVar to the v1 cluster group Uid host clusters summary params +func (o *V1ClusterGroupUIDHostClustersSummaryParams) WithContinue(continueVar *string) *V1ClusterGroupUIDHostClustersSummaryParams { + o.SetContinue(continueVar) + return o +} + +// SetContinue adds the continue to the v1 cluster group Uid host clusters summary params +func (o *V1ClusterGroupUIDHostClustersSummaryParams) SetContinue(continueVar *string) { + o.Continue = continueVar +} + +// WithLimit adds the limit to the v1 cluster group Uid host clusters summary params +func (o *V1ClusterGroupUIDHostClustersSummaryParams) WithLimit(limit *int64) *V1ClusterGroupUIDHostClustersSummaryParams { + o.SetLimit(limit) + return o +} + +// SetLimit adds the limit to the v1 cluster group Uid host clusters summary params +func (o *V1ClusterGroupUIDHostClustersSummaryParams) SetLimit(limit *int64) { + o.Limit = limit +} + +// WithOffset adds the offset to the v1 cluster group Uid host clusters summary params +func (o *V1ClusterGroupUIDHostClustersSummaryParams) WithOffset(offset *int64) *V1ClusterGroupUIDHostClustersSummaryParams { + o.SetOffset(offset) + return o +} + +// SetOffset adds the offset to the v1 cluster group Uid host clusters summary params +func (o *V1ClusterGroupUIDHostClustersSummaryParams) SetOffset(offset *int64) { + o.Offset = offset +} + +// WithUID adds the uid to the v1 cluster group Uid host clusters summary params +func (o *V1ClusterGroupUIDHostClustersSummaryParams) WithUID(uid string) *V1ClusterGroupUIDHostClustersSummaryParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 cluster group Uid host clusters summary params +func (o *V1ClusterGroupUIDHostClustersSummaryParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1ClusterGroupUIDHostClustersSummaryParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + if o.Continue != nil { + + // query param continue + var qrContinue string + if o.Continue != nil { + qrContinue = *o.Continue + } + qContinue := qrContinue + if qContinue != "" { + if err := r.SetQueryParam("continue", qContinue); err != nil { + return err + } + } + + } + + if o.Limit != nil { + + // query param limit + var qrLimit int64 + if o.Limit != nil { + qrLimit = *o.Limit + } + qLimit := swag.FormatInt64(qrLimit) + if qLimit != "" { + if err := r.SetQueryParam("limit", qLimit); err != nil { + return err + } + } + + } + + if o.Offset != nil { + + // query param offset + var qrOffset int64 + if o.Offset != nil { + qrOffset = *o.Offset + } + qOffset := swag.FormatInt64(qrOffset) + if qOffset != "" { + if err := r.SetQueryParam("offset", qOffset); err != nil { + return err + } + } + + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cluster_group_uid_host_clusters_summary_responses.go b/api/client/v1/v1_cluster_group_uid_host_clusters_summary_responses.go new file mode 100644 index 00000000..04e2459b --- /dev/null +++ b/api/client/v1/v1_cluster_group_uid_host_clusters_summary_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1ClusterGroupUIDHostClustersSummaryReader is a Reader for the V1ClusterGroupUIDHostClustersSummary structure. +type V1ClusterGroupUIDHostClustersSummaryReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1ClusterGroupUIDHostClustersSummaryReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1ClusterGroupUIDHostClustersSummaryOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1ClusterGroupUIDHostClustersSummaryOK creates a V1ClusterGroupUIDHostClustersSummaryOK with default headers values +func NewV1ClusterGroupUIDHostClustersSummaryOK() *V1ClusterGroupUIDHostClustersSummaryOK { + return &V1ClusterGroupUIDHostClustersSummaryOK{} +} + +/* +V1ClusterGroupUIDHostClustersSummaryOK handles this case with default header values. + +An array of cluster summary items +*/ +type V1ClusterGroupUIDHostClustersSummaryOK struct { + Payload *models.V1SpectroClustersSummary +} + +func (o *V1ClusterGroupUIDHostClustersSummaryOK) Error() string { + return fmt.Sprintf("[POST /v1/dashboard/clustergroups/{uid}/hostClusters][%d] v1ClusterGroupUidHostClustersSummaryOK %+v", 200, o.Payload) +} + +func (o *V1ClusterGroupUIDHostClustersSummaryOK) GetPayload() *models.V1SpectroClustersSummary { + return o.Payload +} + +func (o *V1ClusterGroupUIDHostClustersSummaryOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1SpectroClustersSummary) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_cluster_group_uid_virtual_clusters_summary_parameters.go b/api/client/v1/v1_cluster_group_uid_virtual_clusters_summary_parameters.go new file mode 100644 index 00000000..56d5317b --- /dev/null +++ b/api/client/v1/v1_cluster_group_uid_virtual_clusters_summary_parameters.go @@ -0,0 +1,264 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1ClusterGroupUIDVirtualClustersSummaryParams creates a new V1ClusterGroupUIDVirtualClustersSummaryParams object +// with the default values initialized. +func NewV1ClusterGroupUIDVirtualClustersSummaryParams() *V1ClusterGroupUIDVirtualClustersSummaryParams { + var ( + limitDefault = int64(50) + ) + return &V1ClusterGroupUIDVirtualClustersSummaryParams{ + Limit: &limitDefault, + + timeout: cr.DefaultTimeout, + } +} + +// NewV1ClusterGroupUIDVirtualClustersSummaryParamsWithTimeout creates a new V1ClusterGroupUIDVirtualClustersSummaryParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1ClusterGroupUIDVirtualClustersSummaryParamsWithTimeout(timeout time.Duration) *V1ClusterGroupUIDVirtualClustersSummaryParams { + var ( + limitDefault = int64(50) + ) + return &V1ClusterGroupUIDVirtualClustersSummaryParams{ + Limit: &limitDefault, + + timeout: timeout, + } +} + +// NewV1ClusterGroupUIDVirtualClustersSummaryParamsWithContext creates a new V1ClusterGroupUIDVirtualClustersSummaryParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1ClusterGroupUIDVirtualClustersSummaryParamsWithContext(ctx context.Context) *V1ClusterGroupUIDVirtualClustersSummaryParams { + var ( + limitDefault = int64(50) + ) + return &V1ClusterGroupUIDVirtualClustersSummaryParams{ + Limit: &limitDefault, + + Context: ctx, + } +} + +// NewV1ClusterGroupUIDVirtualClustersSummaryParamsWithHTTPClient creates a new V1ClusterGroupUIDVirtualClustersSummaryParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1ClusterGroupUIDVirtualClustersSummaryParamsWithHTTPClient(client *http.Client) *V1ClusterGroupUIDVirtualClustersSummaryParams { + var ( + limitDefault = int64(50) + ) + return &V1ClusterGroupUIDVirtualClustersSummaryParams{ + Limit: &limitDefault, + HTTPClient: client, + } +} + +/* +V1ClusterGroupUIDVirtualClustersSummaryParams contains all the parameters to send to the API endpoint +for the v1 cluster group Uid virtual clusters summary operation typically these are written to a http.Request +*/ +type V1ClusterGroupUIDVirtualClustersSummaryParams struct { + + /*Body*/ + Body *models.V1SearchFilterSummarySpec + /*Continue + continue token to paginate the subsequent data items + + */ + Continue *string + /*Limit + limit is a maximum number of responses to return for a list call. Default and maximum value of the limit is 50. + If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. + + */ + Limit *int64 + /*Offset + offset is the next index number from which the response will start. The response offset value can be used along with continue token for the pagination. + + */ + Offset *int64 + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cluster group Uid virtual clusters summary params +func (o *V1ClusterGroupUIDVirtualClustersSummaryParams) WithTimeout(timeout time.Duration) *V1ClusterGroupUIDVirtualClustersSummaryParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cluster group Uid virtual clusters summary params +func (o *V1ClusterGroupUIDVirtualClustersSummaryParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cluster group Uid virtual clusters summary params +func (o *V1ClusterGroupUIDVirtualClustersSummaryParams) WithContext(ctx context.Context) *V1ClusterGroupUIDVirtualClustersSummaryParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cluster group Uid virtual clusters summary params +func (o *V1ClusterGroupUIDVirtualClustersSummaryParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cluster group Uid virtual clusters summary params +func (o *V1ClusterGroupUIDVirtualClustersSummaryParams) WithHTTPClient(client *http.Client) *V1ClusterGroupUIDVirtualClustersSummaryParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cluster group Uid virtual clusters summary params +func (o *V1ClusterGroupUIDVirtualClustersSummaryParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 cluster group Uid virtual clusters summary params +func (o *V1ClusterGroupUIDVirtualClustersSummaryParams) WithBody(body *models.V1SearchFilterSummarySpec) *V1ClusterGroupUIDVirtualClustersSummaryParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 cluster group Uid virtual clusters summary params +func (o *V1ClusterGroupUIDVirtualClustersSummaryParams) SetBody(body *models.V1SearchFilterSummarySpec) { + o.Body = body +} + +// WithContinue adds the continueVar to the v1 cluster group Uid virtual clusters summary params +func (o *V1ClusterGroupUIDVirtualClustersSummaryParams) WithContinue(continueVar *string) *V1ClusterGroupUIDVirtualClustersSummaryParams { + o.SetContinue(continueVar) + return o +} + +// SetContinue adds the continue to the v1 cluster group Uid virtual clusters summary params +func (o *V1ClusterGroupUIDVirtualClustersSummaryParams) SetContinue(continueVar *string) { + o.Continue = continueVar +} + +// WithLimit adds the limit to the v1 cluster group Uid virtual clusters summary params +func (o *V1ClusterGroupUIDVirtualClustersSummaryParams) WithLimit(limit *int64) *V1ClusterGroupUIDVirtualClustersSummaryParams { + o.SetLimit(limit) + return o +} + +// SetLimit adds the limit to the v1 cluster group Uid virtual clusters summary params +func (o *V1ClusterGroupUIDVirtualClustersSummaryParams) SetLimit(limit *int64) { + o.Limit = limit +} + +// WithOffset adds the offset to the v1 cluster group Uid virtual clusters summary params +func (o *V1ClusterGroupUIDVirtualClustersSummaryParams) WithOffset(offset *int64) *V1ClusterGroupUIDVirtualClustersSummaryParams { + o.SetOffset(offset) + return o +} + +// SetOffset adds the offset to the v1 cluster group Uid virtual clusters summary params +func (o *V1ClusterGroupUIDVirtualClustersSummaryParams) SetOffset(offset *int64) { + o.Offset = offset +} + +// WithUID adds the uid to the v1 cluster group Uid virtual clusters summary params +func (o *V1ClusterGroupUIDVirtualClustersSummaryParams) WithUID(uid string) *V1ClusterGroupUIDVirtualClustersSummaryParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 cluster group Uid virtual clusters summary params +func (o *V1ClusterGroupUIDVirtualClustersSummaryParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1ClusterGroupUIDVirtualClustersSummaryParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + if o.Continue != nil { + + // query param continue + var qrContinue string + if o.Continue != nil { + qrContinue = *o.Continue + } + qContinue := qrContinue + if qContinue != "" { + if err := r.SetQueryParam("continue", qContinue); err != nil { + return err + } + } + + } + + if o.Limit != nil { + + // query param limit + var qrLimit int64 + if o.Limit != nil { + qrLimit = *o.Limit + } + qLimit := swag.FormatInt64(qrLimit) + if qLimit != "" { + if err := r.SetQueryParam("limit", qLimit); err != nil { + return err + } + } + + } + + if o.Offset != nil { + + // query param offset + var qrOffset int64 + if o.Offset != nil { + qrOffset = *o.Offset + } + qOffset := swag.FormatInt64(qrOffset) + if qOffset != "" { + if err := r.SetQueryParam("offset", qOffset); err != nil { + return err + } + } + + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cluster_group_uid_virtual_clusters_summary_responses.go b/api/client/v1/v1_cluster_group_uid_virtual_clusters_summary_responses.go new file mode 100644 index 00000000..27b042ab --- /dev/null +++ b/api/client/v1/v1_cluster_group_uid_virtual_clusters_summary_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1ClusterGroupUIDVirtualClustersSummaryReader is a Reader for the V1ClusterGroupUIDVirtualClustersSummary structure. +type V1ClusterGroupUIDVirtualClustersSummaryReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1ClusterGroupUIDVirtualClustersSummaryReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1ClusterGroupUIDVirtualClustersSummaryOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1ClusterGroupUIDVirtualClustersSummaryOK creates a V1ClusterGroupUIDVirtualClustersSummaryOK with default headers values +func NewV1ClusterGroupUIDVirtualClustersSummaryOK() *V1ClusterGroupUIDVirtualClustersSummaryOK { + return &V1ClusterGroupUIDVirtualClustersSummaryOK{} +} + +/* +V1ClusterGroupUIDVirtualClustersSummaryOK handles this case with default header values. + +An array of cluster summary items +*/ +type V1ClusterGroupUIDVirtualClustersSummaryOK struct { + Payload *models.V1SpectroClustersSummary +} + +func (o *V1ClusterGroupUIDVirtualClustersSummaryOK) Error() string { + return fmt.Sprintf("[POST /v1/dashboard/clustergroups/{uid}/virtualClusters][%d] v1ClusterGroupUidVirtualClustersSummaryOK %+v", 200, o.Payload) +} + +func (o *V1ClusterGroupUIDVirtualClustersSummaryOK) GetPayload() *models.V1SpectroClustersSummary { + return o.Payload +} + +func (o *V1ClusterGroupUIDVirtualClustersSummaryOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1SpectroClustersSummary) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_cluster_groups_create_parameters.go b/api/client/v1/v1_cluster_groups_create_parameters.go new file mode 100644 index 00000000..2fbdcf35 --- /dev/null +++ b/api/client/v1/v1_cluster_groups_create_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1ClusterGroupsCreateParams creates a new V1ClusterGroupsCreateParams object +// with the default values initialized. +func NewV1ClusterGroupsCreateParams() *V1ClusterGroupsCreateParams { + var () + return &V1ClusterGroupsCreateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1ClusterGroupsCreateParamsWithTimeout creates a new V1ClusterGroupsCreateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1ClusterGroupsCreateParamsWithTimeout(timeout time.Duration) *V1ClusterGroupsCreateParams { + var () + return &V1ClusterGroupsCreateParams{ + + timeout: timeout, + } +} + +// NewV1ClusterGroupsCreateParamsWithContext creates a new V1ClusterGroupsCreateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1ClusterGroupsCreateParamsWithContext(ctx context.Context) *V1ClusterGroupsCreateParams { + var () + return &V1ClusterGroupsCreateParams{ + + Context: ctx, + } +} + +// NewV1ClusterGroupsCreateParamsWithHTTPClient creates a new V1ClusterGroupsCreateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1ClusterGroupsCreateParamsWithHTTPClient(client *http.Client) *V1ClusterGroupsCreateParams { + var () + return &V1ClusterGroupsCreateParams{ + HTTPClient: client, + } +} + +/* +V1ClusterGroupsCreateParams contains all the parameters to send to the API endpoint +for the v1 cluster groups create operation typically these are written to a http.Request +*/ +type V1ClusterGroupsCreateParams struct { + + /*Body*/ + Body *models.V1ClusterGroupEntity + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cluster groups create params +func (o *V1ClusterGroupsCreateParams) WithTimeout(timeout time.Duration) *V1ClusterGroupsCreateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cluster groups create params +func (o *V1ClusterGroupsCreateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cluster groups create params +func (o *V1ClusterGroupsCreateParams) WithContext(ctx context.Context) *V1ClusterGroupsCreateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cluster groups create params +func (o *V1ClusterGroupsCreateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cluster groups create params +func (o *V1ClusterGroupsCreateParams) WithHTTPClient(client *http.Client) *V1ClusterGroupsCreateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cluster groups create params +func (o *V1ClusterGroupsCreateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 cluster groups create params +func (o *V1ClusterGroupsCreateParams) WithBody(body *models.V1ClusterGroupEntity) *V1ClusterGroupsCreateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 cluster groups create params +func (o *V1ClusterGroupsCreateParams) SetBody(body *models.V1ClusterGroupEntity) { + o.Body = body +} + +// WriteToRequest writes these params to a swagger request +func (o *V1ClusterGroupsCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cluster_groups_create_responses.go b/api/client/v1/v1_cluster_groups_create_responses.go new file mode 100644 index 00000000..2b987107 --- /dev/null +++ b/api/client/v1/v1_cluster_groups_create_responses.go @@ -0,0 +1,77 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1ClusterGroupsCreateReader is a Reader for the V1ClusterGroupsCreate structure. +type V1ClusterGroupsCreateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1ClusterGroupsCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 201: + result := NewV1ClusterGroupsCreateCreated() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1ClusterGroupsCreateCreated creates a V1ClusterGroupsCreateCreated with default headers values +func NewV1ClusterGroupsCreateCreated() *V1ClusterGroupsCreateCreated { + return &V1ClusterGroupsCreateCreated{} +} + +/* +V1ClusterGroupsCreateCreated handles this case with default header values. + +Created successfully +*/ +type V1ClusterGroupsCreateCreated struct { + /*Audit uid for the request + */ + AuditUID string + + Payload *models.V1UID +} + +func (o *V1ClusterGroupsCreateCreated) Error() string { + return fmt.Sprintf("[POST /v1/clustergroups][%d] v1ClusterGroupsCreateCreated %+v", 201, o.Payload) +} + +func (o *V1ClusterGroupsCreateCreated) GetPayload() *models.V1UID { + return o.Payload +} + +func (o *V1ClusterGroupsCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header AuditUid + o.AuditUID = response.GetHeader("AuditUid") + + o.Payload = new(models.V1UID) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_cluster_groups_developer_credit_usage_get_parameters.go b/api/client/v1/v1_cluster_groups_developer_credit_usage_get_parameters.go new file mode 100644 index 00000000..91730fc7 --- /dev/null +++ b/api/client/v1/v1_cluster_groups_developer_credit_usage_get_parameters.go @@ -0,0 +1,133 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1ClusterGroupsDeveloperCreditUsageGetParams creates a new V1ClusterGroupsDeveloperCreditUsageGetParams object +// with the default values initialized. +func NewV1ClusterGroupsDeveloperCreditUsageGetParams() *V1ClusterGroupsDeveloperCreditUsageGetParams { + var () + return &V1ClusterGroupsDeveloperCreditUsageGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1ClusterGroupsDeveloperCreditUsageGetParamsWithTimeout creates a new V1ClusterGroupsDeveloperCreditUsageGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1ClusterGroupsDeveloperCreditUsageGetParamsWithTimeout(timeout time.Duration) *V1ClusterGroupsDeveloperCreditUsageGetParams { + var () + return &V1ClusterGroupsDeveloperCreditUsageGetParams{ + + timeout: timeout, + } +} + +// NewV1ClusterGroupsDeveloperCreditUsageGetParamsWithContext creates a new V1ClusterGroupsDeveloperCreditUsageGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1ClusterGroupsDeveloperCreditUsageGetParamsWithContext(ctx context.Context) *V1ClusterGroupsDeveloperCreditUsageGetParams { + var () + return &V1ClusterGroupsDeveloperCreditUsageGetParams{ + + Context: ctx, + } +} + +// NewV1ClusterGroupsDeveloperCreditUsageGetParamsWithHTTPClient creates a new V1ClusterGroupsDeveloperCreditUsageGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1ClusterGroupsDeveloperCreditUsageGetParamsWithHTTPClient(client *http.Client) *V1ClusterGroupsDeveloperCreditUsageGetParams { + var () + return &V1ClusterGroupsDeveloperCreditUsageGetParams{ + HTTPClient: client, + } +} + +/* +V1ClusterGroupsDeveloperCreditUsageGetParams contains all the parameters to send to the API endpoint +for the v1 cluster groups developer credit usage get operation typically these are written to a http.Request +*/ +type V1ClusterGroupsDeveloperCreditUsageGetParams struct { + + /*Scope*/ + Scope string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cluster groups developer credit usage get params +func (o *V1ClusterGroupsDeveloperCreditUsageGetParams) WithTimeout(timeout time.Duration) *V1ClusterGroupsDeveloperCreditUsageGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cluster groups developer credit usage get params +func (o *V1ClusterGroupsDeveloperCreditUsageGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cluster groups developer credit usage get params +func (o *V1ClusterGroupsDeveloperCreditUsageGetParams) WithContext(ctx context.Context) *V1ClusterGroupsDeveloperCreditUsageGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cluster groups developer credit usage get params +func (o *V1ClusterGroupsDeveloperCreditUsageGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cluster groups developer credit usage get params +func (o *V1ClusterGroupsDeveloperCreditUsageGetParams) WithHTTPClient(client *http.Client) *V1ClusterGroupsDeveloperCreditUsageGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cluster groups developer credit usage get params +func (o *V1ClusterGroupsDeveloperCreditUsageGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithScope adds the scope to the v1 cluster groups developer credit usage get params +func (o *V1ClusterGroupsDeveloperCreditUsageGetParams) WithScope(scope string) *V1ClusterGroupsDeveloperCreditUsageGetParams { + o.SetScope(scope) + return o +} + +// SetScope adds the scope to the v1 cluster groups developer credit usage get params +func (o *V1ClusterGroupsDeveloperCreditUsageGetParams) SetScope(scope string) { + o.Scope = scope +} + +// WriteToRequest writes these params to a swagger request +func (o *V1ClusterGroupsDeveloperCreditUsageGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param scope + if err := r.SetPathParam("scope", o.Scope); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cluster_groups_developer_credit_usage_get_responses.go b/api/client/v1/v1_cluster_groups_developer_credit_usage_get_responses.go new file mode 100644 index 00000000..488b6ba2 --- /dev/null +++ b/api/client/v1/v1_cluster_groups_developer_credit_usage_get_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1ClusterGroupsDeveloperCreditUsageGetReader is a Reader for the V1ClusterGroupsDeveloperCreditUsageGet structure. +type V1ClusterGroupsDeveloperCreditUsageGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1ClusterGroupsDeveloperCreditUsageGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1ClusterGroupsDeveloperCreditUsageGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1ClusterGroupsDeveloperCreditUsageGetOK creates a V1ClusterGroupsDeveloperCreditUsageGetOK with default headers values +func NewV1ClusterGroupsDeveloperCreditUsageGetOK() *V1ClusterGroupsDeveloperCreditUsageGetOK { + return &V1ClusterGroupsDeveloperCreditUsageGetOK{} +} + +/* +V1ClusterGroupsDeveloperCreditUsageGetOK handles this case with default header values. + +Cluster group developer credit usage +*/ +type V1ClusterGroupsDeveloperCreditUsageGetOK struct { + Payload *models.V1ClusterGroupsDeveloperCreditUsage +} + +func (o *V1ClusterGroupsDeveloperCreditUsageGetOK) Error() string { + return fmt.Sprintf("[GET /v1/clustergroups/developerCredit/usage/{scope}][%d] v1ClusterGroupsDeveloperCreditUsageGetOK %+v", 200, o.Payload) +} + +func (o *V1ClusterGroupsDeveloperCreditUsageGetOK) GetPayload() *models.V1ClusterGroupsDeveloperCreditUsage { + return o.Payload +} + +func (o *V1ClusterGroupsDeveloperCreditUsageGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1ClusterGroupsDeveloperCreditUsage) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_cluster_groups_host_cluster_metadata_parameters.go b/api/client/v1/v1_cluster_groups_host_cluster_metadata_parameters.go new file mode 100644 index 00000000..8b4ced19 --- /dev/null +++ b/api/client/v1/v1_cluster_groups_host_cluster_metadata_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1ClusterGroupsHostClusterMetadataParams creates a new V1ClusterGroupsHostClusterMetadataParams object +// with the default values initialized. +func NewV1ClusterGroupsHostClusterMetadataParams() *V1ClusterGroupsHostClusterMetadataParams { + + return &V1ClusterGroupsHostClusterMetadataParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1ClusterGroupsHostClusterMetadataParamsWithTimeout creates a new V1ClusterGroupsHostClusterMetadataParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1ClusterGroupsHostClusterMetadataParamsWithTimeout(timeout time.Duration) *V1ClusterGroupsHostClusterMetadataParams { + + return &V1ClusterGroupsHostClusterMetadataParams{ + + timeout: timeout, + } +} + +// NewV1ClusterGroupsHostClusterMetadataParamsWithContext creates a new V1ClusterGroupsHostClusterMetadataParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1ClusterGroupsHostClusterMetadataParamsWithContext(ctx context.Context) *V1ClusterGroupsHostClusterMetadataParams { + + return &V1ClusterGroupsHostClusterMetadataParams{ + + Context: ctx, + } +} + +// NewV1ClusterGroupsHostClusterMetadataParamsWithHTTPClient creates a new V1ClusterGroupsHostClusterMetadataParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1ClusterGroupsHostClusterMetadataParamsWithHTTPClient(client *http.Client) *V1ClusterGroupsHostClusterMetadataParams { + + return &V1ClusterGroupsHostClusterMetadataParams{ + HTTPClient: client, + } +} + +/* +V1ClusterGroupsHostClusterMetadataParams contains all the parameters to send to the API endpoint +for the v1 cluster groups host cluster metadata operation typically these are written to a http.Request +*/ +type V1ClusterGroupsHostClusterMetadataParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cluster groups host cluster metadata params +func (o *V1ClusterGroupsHostClusterMetadataParams) WithTimeout(timeout time.Duration) *V1ClusterGroupsHostClusterMetadataParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cluster groups host cluster metadata params +func (o *V1ClusterGroupsHostClusterMetadataParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cluster groups host cluster metadata params +func (o *V1ClusterGroupsHostClusterMetadataParams) WithContext(ctx context.Context) *V1ClusterGroupsHostClusterMetadataParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cluster groups host cluster metadata params +func (o *V1ClusterGroupsHostClusterMetadataParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cluster groups host cluster metadata params +func (o *V1ClusterGroupsHostClusterMetadataParams) WithHTTPClient(client *http.Client) *V1ClusterGroupsHostClusterMetadataParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cluster groups host cluster metadata params +func (o *V1ClusterGroupsHostClusterMetadataParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *V1ClusterGroupsHostClusterMetadataParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cluster_groups_host_cluster_metadata_responses.go b/api/client/v1/v1_cluster_groups_host_cluster_metadata_responses.go new file mode 100644 index 00000000..da2e36a8 --- /dev/null +++ b/api/client/v1/v1_cluster_groups_host_cluster_metadata_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1ClusterGroupsHostClusterMetadataReader is a Reader for the V1ClusterGroupsHostClusterMetadata structure. +type V1ClusterGroupsHostClusterMetadataReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1ClusterGroupsHostClusterMetadataReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1ClusterGroupsHostClusterMetadataOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1ClusterGroupsHostClusterMetadataOK creates a V1ClusterGroupsHostClusterMetadataOK with default headers values +func NewV1ClusterGroupsHostClusterMetadataOK() *V1ClusterGroupsHostClusterMetadataOK { + return &V1ClusterGroupsHostClusterMetadataOK{} +} + +/* +V1ClusterGroupsHostClusterMetadataOK handles this case with default header values. + +An array of cluster groups host cluster metadata items +*/ +type V1ClusterGroupsHostClusterMetadataOK struct { + Payload *models.V1ClusterGroupsHostClusterMetadata +} + +func (o *V1ClusterGroupsHostClusterMetadataOK) Error() string { + return fmt.Sprintf("[GET /v1/clustergroups/hostCluster/metadata][%d] v1ClusterGroupsHostClusterMetadataOK %+v", 200, o.Payload) +} + +func (o *V1ClusterGroupsHostClusterMetadataOK) GetPayload() *models.V1ClusterGroupsHostClusterMetadata { + return o.Payload +} + +func (o *V1ClusterGroupsHostClusterMetadataOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1ClusterGroupsHostClusterMetadata) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_cluster_groups_host_cluster_summary_parameters.go b/api/client/v1/v1_cluster_groups_host_cluster_summary_parameters.go new file mode 100644 index 00000000..0386d8ea --- /dev/null +++ b/api/client/v1/v1_cluster_groups_host_cluster_summary_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1ClusterGroupsHostClusterSummaryParams creates a new V1ClusterGroupsHostClusterSummaryParams object +// with the default values initialized. +func NewV1ClusterGroupsHostClusterSummaryParams() *V1ClusterGroupsHostClusterSummaryParams { + + return &V1ClusterGroupsHostClusterSummaryParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1ClusterGroupsHostClusterSummaryParamsWithTimeout creates a new V1ClusterGroupsHostClusterSummaryParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1ClusterGroupsHostClusterSummaryParamsWithTimeout(timeout time.Duration) *V1ClusterGroupsHostClusterSummaryParams { + + return &V1ClusterGroupsHostClusterSummaryParams{ + + timeout: timeout, + } +} + +// NewV1ClusterGroupsHostClusterSummaryParamsWithContext creates a new V1ClusterGroupsHostClusterSummaryParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1ClusterGroupsHostClusterSummaryParamsWithContext(ctx context.Context) *V1ClusterGroupsHostClusterSummaryParams { + + return &V1ClusterGroupsHostClusterSummaryParams{ + + Context: ctx, + } +} + +// NewV1ClusterGroupsHostClusterSummaryParamsWithHTTPClient creates a new V1ClusterGroupsHostClusterSummaryParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1ClusterGroupsHostClusterSummaryParamsWithHTTPClient(client *http.Client) *V1ClusterGroupsHostClusterSummaryParams { + + return &V1ClusterGroupsHostClusterSummaryParams{ + HTTPClient: client, + } +} + +/* +V1ClusterGroupsHostClusterSummaryParams contains all the parameters to send to the API endpoint +for the v1 cluster groups host cluster summary operation typically these are written to a http.Request +*/ +type V1ClusterGroupsHostClusterSummaryParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cluster groups host cluster summary params +func (o *V1ClusterGroupsHostClusterSummaryParams) WithTimeout(timeout time.Duration) *V1ClusterGroupsHostClusterSummaryParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cluster groups host cluster summary params +func (o *V1ClusterGroupsHostClusterSummaryParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cluster groups host cluster summary params +func (o *V1ClusterGroupsHostClusterSummaryParams) WithContext(ctx context.Context) *V1ClusterGroupsHostClusterSummaryParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cluster groups host cluster summary params +func (o *V1ClusterGroupsHostClusterSummaryParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cluster groups host cluster summary params +func (o *V1ClusterGroupsHostClusterSummaryParams) WithHTTPClient(client *http.Client) *V1ClusterGroupsHostClusterSummaryParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cluster groups host cluster summary params +func (o *V1ClusterGroupsHostClusterSummaryParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *V1ClusterGroupsHostClusterSummaryParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cluster_groups_host_cluster_summary_responses.go b/api/client/v1/v1_cluster_groups_host_cluster_summary_responses.go new file mode 100644 index 00000000..7860d2f1 --- /dev/null +++ b/api/client/v1/v1_cluster_groups_host_cluster_summary_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1ClusterGroupsHostClusterSummaryReader is a Reader for the V1ClusterGroupsHostClusterSummary structure. +type V1ClusterGroupsHostClusterSummaryReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1ClusterGroupsHostClusterSummaryReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1ClusterGroupsHostClusterSummaryOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1ClusterGroupsHostClusterSummaryOK creates a V1ClusterGroupsHostClusterSummaryOK with default headers values +func NewV1ClusterGroupsHostClusterSummaryOK() *V1ClusterGroupsHostClusterSummaryOK { + return &V1ClusterGroupsHostClusterSummaryOK{} +} + +/* +V1ClusterGroupsHostClusterSummaryOK handles this case with default header values. + +An array of cluster groups of host cluster type summary +*/ +type V1ClusterGroupsHostClusterSummaryOK struct { + Payload *models.V1ClusterGroupsHostClusterSummary +} + +func (o *V1ClusterGroupsHostClusterSummaryOK) Error() string { + return fmt.Sprintf("[GET /v1/clustergroups/hostCluster][%d] v1ClusterGroupsHostClusterSummaryOK %+v", 200, o.Payload) +} + +func (o *V1ClusterGroupsHostClusterSummaryOK) GetPayload() *models.V1ClusterGroupsHostClusterSummary { + return o.Payload +} + +func (o *V1ClusterGroupsHostClusterSummaryOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1ClusterGroupsHostClusterSummary) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_cluster_groups_uid_delete_parameters.go b/api/client/v1/v1_cluster_groups_uid_delete_parameters.go new file mode 100644 index 00000000..2de41a65 --- /dev/null +++ b/api/client/v1/v1_cluster_groups_uid_delete_parameters.go @@ -0,0 +1,133 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1ClusterGroupsUIDDeleteParams creates a new V1ClusterGroupsUIDDeleteParams object +// with the default values initialized. +func NewV1ClusterGroupsUIDDeleteParams() *V1ClusterGroupsUIDDeleteParams { + var () + return &V1ClusterGroupsUIDDeleteParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1ClusterGroupsUIDDeleteParamsWithTimeout creates a new V1ClusterGroupsUIDDeleteParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1ClusterGroupsUIDDeleteParamsWithTimeout(timeout time.Duration) *V1ClusterGroupsUIDDeleteParams { + var () + return &V1ClusterGroupsUIDDeleteParams{ + + timeout: timeout, + } +} + +// NewV1ClusterGroupsUIDDeleteParamsWithContext creates a new V1ClusterGroupsUIDDeleteParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1ClusterGroupsUIDDeleteParamsWithContext(ctx context.Context) *V1ClusterGroupsUIDDeleteParams { + var () + return &V1ClusterGroupsUIDDeleteParams{ + + Context: ctx, + } +} + +// NewV1ClusterGroupsUIDDeleteParamsWithHTTPClient creates a new V1ClusterGroupsUIDDeleteParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1ClusterGroupsUIDDeleteParamsWithHTTPClient(client *http.Client) *V1ClusterGroupsUIDDeleteParams { + var () + return &V1ClusterGroupsUIDDeleteParams{ + HTTPClient: client, + } +} + +/* +V1ClusterGroupsUIDDeleteParams contains all the parameters to send to the API endpoint +for the v1 cluster groups Uid delete operation typically these are written to a http.Request +*/ +type V1ClusterGroupsUIDDeleteParams struct { + + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cluster groups Uid delete params +func (o *V1ClusterGroupsUIDDeleteParams) WithTimeout(timeout time.Duration) *V1ClusterGroupsUIDDeleteParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cluster groups Uid delete params +func (o *V1ClusterGroupsUIDDeleteParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cluster groups Uid delete params +func (o *V1ClusterGroupsUIDDeleteParams) WithContext(ctx context.Context) *V1ClusterGroupsUIDDeleteParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cluster groups Uid delete params +func (o *V1ClusterGroupsUIDDeleteParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cluster groups Uid delete params +func (o *V1ClusterGroupsUIDDeleteParams) WithHTTPClient(client *http.Client) *V1ClusterGroupsUIDDeleteParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cluster groups Uid delete params +func (o *V1ClusterGroupsUIDDeleteParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithUID adds the uid to the v1 cluster groups Uid delete params +func (o *V1ClusterGroupsUIDDeleteParams) WithUID(uid string) *V1ClusterGroupsUIDDeleteParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 cluster groups Uid delete params +func (o *V1ClusterGroupsUIDDeleteParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1ClusterGroupsUIDDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cluster_groups_uid_delete_responses.go b/api/client/v1/v1_cluster_groups_uid_delete_responses.go new file mode 100644 index 00000000..b62ea0b0 --- /dev/null +++ b/api/client/v1/v1_cluster_groups_uid_delete_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1ClusterGroupsUIDDeleteReader is a Reader for the V1ClusterGroupsUIDDelete structure. +type V1ClusterGroupsUIDDeleteReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1ClusterGroupsUIDDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1ClusterGroupsUIDDeleteNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1ClusterGroupsUIDDeleteNoContent creates a V1ClusterGroupsUIDDeleteNoContent with default headers values +func NewV1ClusterGroupsUIDDeleteNoContent() *V1ClusterGroupsUIDDeleteNoContent { + return &V1ClusterGroupsUIDDeleteNoContent{} +} + +/* +V1ClusterGroupsUIDDeleteNoContent handles this case with default header values. + +The resource was deleted successfully +*/ +type V1ClusterGroupsUIDDeleteNoContent struct { +} + +func (o *V1ClusterGroupsUIDDeleteNoContent) Error() string { + return fmt.Sprintf("[DELETE /v1/clustergroups/{uid}][%d] v1ClusterGroupsUidDeleteNoContent ", 204) +} + +func (o *V1ClusterGroupsUIDDeleteNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_cluster_groups_uid_get_parameters.go b/api/client/v1/v1_cluster_groups_uid_get_parameters.go new file mode 100644 index 00000000..787e27ba --- /dev/null +++ b/api/client/v1/v1_cluster_groups_uid_get_parameters.go @@ -0,0 +1,133 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1ClusterGroupsUIDGetParams creates a new V1ClusterGroupsUIDGetParams object +// with the default values initialized. +func NewV1ClusterGroupsUIDGetParams() *V1ClusterGroupsUIDGetParams { + var () + return &V1ClusterGroupsUIDGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1ClusterGroupsUIDGetParamsWithTimeout creates a new V1ClusterGroupsUIDGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1ClusterGroupsUIDGetParamsWithTimeout(timeout time.Duration) *V1ClusterGroupsUIDGetParams { + var () + return &V1ClusterGroupsUIDGetParams{ + + timeout: timeout, + } +} + +// NewV1ClusterGroupsUIDGetParamsWithContext creates a new V1ClusterGroupsUIDGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1ClusterGroupsUIDGetParamsWithContext(ctx context.Context) *V1ClusterGroupsUIDGetParams { + var () + return &V1ClusterGroupsUIDGetParams{ + + Context: ctx, + } +} + +// NewV1ClusterGroupsUIDGetParamsWithHTTPClient creates a new V1ClusterGroupsUIDGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1ClusterGroupsUIDGetParamsWithHTTPClient(client *http.Client) *V1ClusterGroupsUIDGetParams { + var () + return &V1ClusterGroupsUIDGetParams{ + HTTPClient: client, + } +} + +/* +V1ClusterGroupsUIDGetParams contains all the parameters to send to the API endpoint +for the v1 cluster groups Uid get operation typically these are written to a http.Request +*/ +type V1ClusterGroupsUIDGetParams struct { + + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cluster groups Uid get params +func (o *V1ClusterGroupsUIDGetParams) WithTimeout(timeout time.Duration) *V1ClusterGroupsUIDGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cluster groups Uid get params +func (o *V1ClusterGroupsUIDGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cluster groups Uid get params +func (o *V1ClusterGroupsUIDGetParams) WithContext(ctx context.Context) *V1ClusterGroupsUIDGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cluster groups Uid get params +func (o *V1ClusterGroupsUIDGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cluster groups Uid get params +func (o *V1ClusterGroupsUIDGetParams) WithHTTPClient(client *http.Client) *V1ClusterGroupsUIDGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cluster groups Uid get params +func (o *V1ClusterGroupsUIDGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithUID adds the uid to the v1 cluster groups Uid get params +func (o *V1ClusterGroupsUIDGetParams) WithUID(uid string) *V1ClusterGroupsUIDGetParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 cluster groups Uid get params +func (o *V1ClusterGroupsUIDGetParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1ClusterGroupsUIDGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cluster_groups_uid_get_responses.go b/api/client/v1/v1_cluster_groups_uid_get_responses.go new file mode 100644 index 00000000..8819448d --- /dev/null +++ b/api/client/v1/v1_cluster_groups_uid_get_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1ClusterGroupsUIDGetReader is a Reader for the V1ClusterGroupsUIDGet structure. +type V1ClusterGroupsUIDGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1ClusterGroupsUIDGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1ClusterGroupsUIDGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1ClusterGroupsUIDGetOK creates a V1ClusterGroupsUIDGetOK with default headers values +func NewV1ClusterGroupsUIDGetOK() *V1ClusterGroupsUIDGetOK { + return &V1ClusterGroupsUIDGetOK{} +} + +/* +V1ClusterGroupsUIDGetOK handles this case with default header values. + +OK +*/ +type V1ClusterGroupsUIDGetOK struct { + Payload *models.V1ClusterGroup +} + +func (o *V1ClusterGroupsUIDGetOK) Error() string { + return fmt.Sprintf("[GET /v1/clustergroups/{uid}][%d] v1ClusterGroupsUidGetOK %+v", 200, o.Payload) +} + +func (o *V1ClusterGroupsUIDGetOK) GetPayload() *models.V1ClusterGroup { + return o.Payload +} + +func (o *V1ClusterGroupsUIDGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1ClusterGroup) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_cluster_groups_uid_host_cluster_update_parameters.go b/api/client/v1/v1_cluster_groups_uid_host_cluster_update_parameters.go new file mode 100644 index 00000000..5c732be1 --- /dev/null +++ b/api/client/v1/v1_cluster_groups_uid_host_cluster_update_parameters.go @@ -0,0 +1,154 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1ClusterGroupsUIDHostClusterUpdateParams creates a new V1ClusterGroupsUIDHostClusterUpdateParams object +// with the default values initialized. +func NewV1ClusterGroupsUIDHostClusterUpdateParams() *V1ClusterGroupsUIDHostClusterUpdateParams { + var () + return &V1ClusterGroupsUIDHostClusterUpdateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1ClusterGroupsUIDHostClusterUpdateParamsWithTimeout creates a new V1ClusterGroupsUIDHostClusterUpdateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1ClusterGroupsUIDHostClusterUpdateParamsWithTimeout(timeout time.Duration) *V1ClusterGroupsUIDHostClusterUpdateParams { + var () + return &V1ClusterGroupsUIDHostClusterUpdateParams{ + + timeout: timeout, + } +} + +// NewV1ClusterGroupsUIDHostClusterUpdateParamsWithContext creates a new V1ClusterGroupsUIDHostClusterUpdateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1ClusterGroupsUIDHostClusterUpdateParamsWithContext(ctx context.Context) *V1ClusterGroupsUIDHostClusterUpdateParams { + var () + return &V1ClusterGroupsUIDHostClusterUpdateParams{ + + Context: ctx, + } +} + +// NewV1ClusterGroupsUIDHostClusterUpdateParamsWithHTTPClient creates a new V1ClusterGroupsUIDHostClusterUpdateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1ClusterGroupsUIDHostClusterUpdateParamsWithHTTPClient(client *http.Client) *V1ClusterGroupsUIDHostClusterUpdateParams { + var () + return &V1ClusterGroupsUIDHostClusterUpdateParams{ + HTTPClient: client, + } +} + +/* +V1ClusterGroupsUIDHostClusterUpdateParams contains all the parameters to send to the API endpoint +for the v1 cluster groups Uid host cluster update operation typically these are written to a http.Request +*/ +type V1ClusterGroupsUIDHostClusterUpdateParams struct { + + /*Body*/ + Body *models.V1ClusterGroupHostClusterEntity + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cluster groups Uid host cluster update params +func (o *V1ClusterGroupsUIDHostClusterUpdateParams) WithTimeout(timeout time.Duration) *V1ClusterGroupsUIDHostClusterUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cluster groups Uid host cluster update params +func (o *V1ClusterGroupsUIDHostClusterUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cluster groups Uid host cluster update params +func (o *V1ClusterGroupsUIDHostClusterUpdateParams) WithContext(ctx context.Context) *V1ClusterGroupsUIDHostClusterUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cluster groups Uid host cluster update params +func (o *V1ClusterGroupsUIDHostClusterUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cluster groups Uid host cluster update params +func (o *V1ClusterGroupsUIDHostClusterUpdateParams) WithHTTPClient(client *http.Client) *V1ClusterGroupsUIDHostClusterUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cluster groups Uid host cluster update params +func (o *V1ClusterGroupsUIDHostClusterUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 cluster groups Uid host cluster update params +func (o *V1ClusterGroupsUIDHostClusterUpdateParams) WithBody(body *models.V1ClusterGroupHostClusterEntity) *V1ClusterGroupsUIDHostClusterUpdateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 cluster groups Uid host cluster update params +func (o *V1ClusterGroupsUIDHostClusterUpdateParams) SetBody(body *models.V1ClusterGroupHostClusterEntity) { + o.Body = body +} + +// WithUID adds the uid to the v1 cluster groups Uid host cluster update params +func (o *V1ClusterGroupsUIDHostClusterUpdateParams) WithUID(uid string) *V1ClusterGroupsUIDHostClusterUpdateParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 cluster groups Uid host cluster update params +func (o *V1ClusterGroupsUIDHostClusterUpdateParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1ClusterGroupsUIDHostClusterUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cluster_groups_uid_host_cluster_update_responses.go b/api/client/v1/v1_cluster_groups_uid_host_cluster_update_responses.go new file mode 100644 index 00000000..246feac3 --- /dev/null +++ b/api/client/v1/v1_cluster_groups_uid_host_cluster_update_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1ClusterGroupsUIDHostClusterUpdateReader is a Reader for the V1ClusterGroupsUIDHostClusterUpdate structure. +type V1ClusterGroupsUIDHostClusterUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1ClusterGroupsUIDHostClusterUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1ClusterGroupsUIDHostClusterUpdateNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1ClusterGroupsUIDHostClusterUpdateNoContent creates a V1ClusterGroupsUIDHostClusterUpdateNoContent with default headers values +func NewV1ClusterGroupsUIDHostClusterUpdateNoContent() *V1ClusterGroupsUIDHostClusterUpdateNoContent { + return &V1ClusterGroupsUIDHostClusterUpdateNoContent{} +} + +/* +V1ClusterGroupsUIDHostClusterUpdateNoContent handles this case with default header values. + +The resource was updated successfully +*/ +type V1ClusterGroupsUIDHostClusterUpdateNoContent struct { +} + +func (o *V1ClusterGroupsUIDHostClusterUpdateNoContent) Error() string { + return fmt.Sprintf("[PUT /v1/clustergroups/{uid}/hostCluster][%d] v1ClusterGroupsUidHostClusterUpdateNoContent ", 204) +} + +func (o *V1ClusterGroupsUIDHostClusterUpdateNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_cluster_groups_uid_meta_update_parameters.go b/api/client/v1/v1_cluster_groups_uid_meta_update_parameters.go new file mode 100644 index 00000000..31dcd02e --- /dev/null +++ b/api/client/v1/v1_cluster_groups_uid_meta_update_parameters.go @@ -0,0 +1,154 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1ClusterGroupsUIDMetaUpdateParams creates a new V1ClusterGroupsUIDMetaUpdateParams object +// with the default values initialized. +func NewV1ClusterGroupsUIDMetaUpdateParams() *V1ClusterGroupsUIDMetaUpdateParams { + var () + return &V1ClusterGroupsUIDMetaUpdateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1ClusterGroupsUIDMetaUpdateParamsWithTimeout creates a new V1ClusterGroupsUIDMetaUpdateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1ClusterGroupsUIDMetaUpdateParamsWithTimeout(timeout time.Duration) *V1ClusterGroupsUIDMetaUpdateParams { + var () + return &V1ClusterGroupsUIDMetaUpdateParams{ + + timeout: timeout, + } +} + +// NewV1ClusterGroupsUIDMetaUpdateParamsWithContext creates a new V1ClusterGroupsUIDMetaUpdateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1ClusterGroupsUIDMetaUpdateParamsWithContext(ctx context.Context) *V1ClusterGroupsUIDMetaUpdateParams { + var () + return &V1ClusterGroupsUIDMetaUpdateParams{ + + Context: ctx, + } +} + +// NewV1ClusterGroupsUIDMetaUpdateParamsWithHTTPClient creates a new V1ClusterGroupsUIDMetaUpdateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1ClusterGroupsUIDMetaUpdateParamsWithHTTPClient(client *http.Client) *V1ClusterGroupsUIDMetaUpdateParams { + var () + return &V1ClusterGroupsUIDMetaUpdateParams{ + HTTPClient: client, + } +} + +/* +V1ClusterGroupsUIDMetaUpdateParams contains all the parameters to send to the API endpoint +for the v1 cluster groups Uid meta update operation typically these are written to a http.Request +*/ +type V1ClusterGroupsUIDMetaUpdateParams struct { + + /*Body*/ + Body *models.V1ObjectMeta + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cluster groups Uid meta update params +func (o *V1ClusterGroupsUIDMetaUpdateParams) WithTimeout(timeout time.Duration) *V1ClusterGroupsUIDMetaUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cluster groups Uid meta update params +func (o *V1ClusterGroupsUIDMetaUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cluster groups Uid meta update params +func (o *V1ClusterGroupsUIDMetaUpdateParams) WithContext(ctx context.Context) *V1ClusterGroupsUIDMetaUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cluster groups Uid meta update params +func (o *V1ClusterGroupsUIDMetaUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cluster groups Uid meta update params +func (o *V1ClusterGroupsUIDMetaUpdateParams) WithHTTPClient(client *http.Client) *V1ClusterGroupsUIDMetaUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cluster groups Uid meta update params +func (o *V1ClusterGroupsUIDMetaUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 cluster groups Uid meta update params +func (o *V1ClusterGroupsUIDMetaUpdateParams) WithBody(body *models.V1ObjectMeta) *V1ClusterGroupsUIDMetaUpdateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 cluster groups Uid meta update params +func (o *V1ClusterGroupsUIDMetaUpdateParams) SetBody(body *models.V1ObjectMeta) { + o.Body = body +} + +// WithUID adds the uid to the v1 cluster groups Uid meta update params +func (o *V1ClusterGroupsUIDMetaUpdateParams) WithUID(uid string) *V1ClusterGroupsUIDMetaUpdateParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 cluster groups Uid meta update params +func (o *V1ClusterGroupsUIDMetaUpdateParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1ClusterGroupsUIDMetaUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cluster_groups_uid_meta_update_responses.go b/api/client/v1/v1_cluster_groups_uid_meta_update_responses.go new file mode 100644 index 00000000..848d839a --- /dev/null +++ b/api/client/v1/v1_cluster_groups_uid_meta_update_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1ClusterGroupsUIDMetaUpdateReader is a Reader for the V1ClusterGroupsUIDMetaUpdate structure. +type V1ClusterGroupsUIDMetaUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1ClusterGroupsUIDMetaUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1ClusterGroupsUIDMetaUpdateNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1ClusterGroupsUIDMetaUpdateNoContent creates a V1ClusterGroupsUIDMetaUpdateNoContent with default headers values +func NewV1ClusterGroupsUIDMetaUpdateNoContent() *V1ClusterGroupsUIDMetaUpdateNoContent { + return &V1ClusterGroupsUIDMetaUpdateNoContent{} +} + +/* +V1ClusterGroupsUIDMetaUpdateNoContent handles this case with default header values. + +The resource was updated successfully +*/ +type V1ClusterGroupsUIDMetaUpdateNoContent struct { +} + +func (o *V1ClusterGroupsUIDMetaUpdateNoContent) Error() string { + return fmt.Sprintf("[PUT /v1/clustergroups/{uid}/meta][%d] v1ClusterGroupsUidMetaUpdateNoContent ", 204) +} + +func (o *V1ClusterGroupsUIDMetaUpdateNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_cluster_groups_uid_packs_resolved_values_get_parameters.go b/api/client/v1/v1_cluster_groups_uid_packs_resolved_values_get_parameters.go new file mode 100644 index 00000000..64416dab --- /dev/null +++ b/api/client/v1/v1_cluster_groups_uid_packs_resolved_values_get_parameters.go @@ -0,0 +1,157 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1ClusterGroupsUIDPacksResolvedValuesGetParams creates a new V1ClusterGroupsUIDPacksResolvedValuesGetParams object +// with the default values initialized. +func NewV1ClusterGroupsUIDPacksResolvedValuesGetParams() *V1ClusterGroupsUIDPacksResolvedValuesGetParams { + var () + return &V1ClusterGroupsUIDPacksResolvedValuesGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1ClusterGroupsUIDPacksResolvedValuesGetParamsWithTimeout creates a new V1ClusterGroupsUIDPacksResolvedValuesGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1ClusterGroupsUIDPacksResolvedValuesGetParamsWithTimeout(timeout time.Duration) *V1ClusterGroupsUIDPacksResolvedValuesGetParams { + var () + return &V1ClusterGroupsUIDPacksResolvedValuesGetParams{ + + timeout: timeout, + } +} + +// NewV1ClusterGroupsUIDPacksResolvedValuesGetParamsWithContext creates a new V1ClusterGroupsUIDPacksResolvedValuesGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1ClusterGroupsUIDPacksResolvedValuesGetParamsWithContext(ctx context.Context) *V1ClusterGroupsUIDPacksResolvedValuesGetParams { + var () + return &V1ClusterGroupsUIDPacksResolvedValuesGetParams{ + + Context: ctx, + } +} + +// NewV1ClusterGroupsUIDPacksResolvedValuesGetParamsWithHTTPClient creates a new V1ClusterGroupsUIDPacksResolvedValuesGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1ClusterGroupsUIDPacksResolvedValuesGetParamsWithHTTPClient(client *http.Client) *V1ClusterGroupsUIDPacksResolvedValuesGetParams { + var () + return &V1ClusterGroupsUIDPacksResolvedValuesGetParams{ + HTTPClient: client, + } +} + +/* +V1ClusterGroupsUIDPacksResolvedValuesGetParams contains all the parameters to send to the API endpoint +for the v1 cluster groups Uid packs resolved values get operation typically these are written to a http.Request +*/ +type V1ClusterGroupsUIDPacksResolvedValuesGetParams struct { + + /*Body*/ + Body *models.V1SpectroClusterProfilesParamReferenceEntity + /*UID + Cluster group uid + + */ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cluster groups Uid packs resolved values get params +func (o *V1ClusterGroupsUIDPacksResolvedValuesGetParams) WithTimeout(timeout time.Duration) *V1ClusterGroupsUIDPacksResolvedValuesGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cluster groups Uid packs resolved values get params +func (o *V1ClusterGroupsUIDPacksResolvedValuesGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cluster groups Uid packs resolved values get params +func (o *V1ClusterGroupsUIDPacksResolvedValuesGetParams) WithContext(ctx context.Context) *V1ClusterGroupsUIDPacksResolvedValuesGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cluster groups Uid packs resolved values get params +func (o *V1ClusterGroupsUIDPacksResolvedValuesGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cluster groups Uid packs resolved values get params +func (o *V1ClusterGroupsUIDPacksResolvedValuesGetParams) WithHTTPClient(client *http.Client) *V1ClusterGroupsUIDPacksResolvedValuesGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cluster groups Uid packs resolved values get params +func (o *V1ClusterGroupsUIDPacksResolvedValuesGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 cluster groups Uid packs resolved values get params +func (o *V1ClusterGroupsUIDPacksResolvedValuesGetParams) WithBody(body *models.V1SpectroClusterProfilesParamReferenceEntity) *V1ClusterGroupsUIDPacksResolvedValuesGetParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 cluster groups Uid packs resolved values get params +func (o *V1ClusterGroupsUIDPacksResolvedValuesGetParams) SetBody(body *models.V1SpectroClusterProfilesParamReferenceEntity) { + o.Body = body +} + +// WithUID adds the uid to the v1 cluster groups Uid packs resolved values get params +func (o *V1ClusterGroupsUIDPacksResolvedValuesGetParams) WithUID(uid string) *V1ClusterGroupsUIDPacksResolvedValuesGetParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 cluster groups Uid packs resolved values get params +func (o *V1ClusterGroupsUIDPacksResolvedValuesGetParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1ClusterGroupsUIDPacksResolvedValuesGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cluster_groups_uid_packs_resolved_values_get_responses.go b/api/client/v1/v1_cluster_groups_uid_packs_resolved_values_get_responses.go new file mode 100644 index 00000000..21f089d6 --- /dev/null +++ b/api/client/v1/v1_cluster_groups_uid_packs_resolved_values_get_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1ClusterGroupsUIDPacksResolvedValuesGetReader is a Reader for the V1ClusterGroupsUIDPacksResolvedValuesGet structure. +type V1ClusterGroupsUIDPacksResolvedValuesGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1ClusterGroupsUIDPacksResolvedValuesGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1ClusterGroupsUIDPacksResolvedValuesGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1ClusterGroupsUIDPacksResolvedValuesGetOK creates a V1ClusterGroupsUIDPacksResolvedValuesGetOK with default headers values +func NewV1ClusterGroupsUIDPacksResolvedValuesGetOK() *V1ClusterGroupsUIDPacksResolvedValuesGetOK { + return &V1ClusterGroupsUIDPacksResolvedValuesGetOK{} +} + +/* +V1ClusterGroupsUIDPacksResolvedValuesGetOK handles this case with default header values. + +OK +*/ +type V1ClusterGroupsUIDPacksResolvedValuesGetOK struct { + Payload *models.V1SpectroClusterProfilesResolvedValues +} + +func (o *V1ClusterGroupsUIDPacksResolvedValuesGetOK) Error() string { + return fmt.Sprintf("[GET /v1/clustergroups/{uid}/packs/resolvedValues][%d] v1ClusterGroupsUidPacksResolvedValuesGetOK %+v", 200, o.Payload) +} + +func (o *V1ClusterGroupsUIDPacksResolvedValuesGetOK) GetPayload() *models.V1SpectroClusterProfilesResolvedValues { + return o.Payload +} + +func (o *V1ClusterGroupsUIDPacksResolvedValuesGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1SpectroClusterProfilesResolvedValues) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_cluster_groups_uid_profiles_get_parameters.go b/api/client/v1/v1_cluster_groups_uid_profiles_get_parameters.go new file mode 100644 index 00000000..f6065e1d --- /dev/null +++ b/api/client/v1/v1_cluster_groups_uid_profiles_get_parameters.go @@ -0,0 +1,168 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1ClusterGroupsUIDProfilesGetParams creates a new V1ClusterGroupsUIDProfilesGetParams object +// with the default values initialized. +func NewV1ClusterGroupsUIDProfilesGetParams() *V1ClusterGroupsUIDProfilesGetParams { + var () + return &V1ClusterGroupsUIDProfilesGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1ClusterGroupsUIDProfilesGetParamsWithTimeout creates a new V1ClusterGroupsUIDProfilesGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1ClusterGroupsUIDProfilesGetParamsWithTimeout(timeout time.Duration) *V1ClusterGroupsUIDProfilesGetParams { + var () + return &V1ClusterGroupsUIDProfilesGetParams{ + + timeout: timeout, + } +} + +// NewV1ClusterGroupsUIDProfilesGetParamsWithContext creates a new V1ClusterGroupsUIDProfilesGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1ClusterGroupsUIDProfilesGetParamsWithContext(ctx context.Context) *V1ClusterGroupsUIDProfilesGetParams { + var () + return &V1ClusterGroupsUIDProfilesGetParams{ + + Context: ctx, + } +} + +// NewV1ClusterGroupsUIDProfilesGetParamsWithHTTPClient creates a new V1ClusterGroupsUIDProfilesGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1ClusterGroupsUIDProfilesGetParamsWithHTTPClient(client *http.Client) *V1ClusterGroupsUIDProfilesGetParams { + var () + return &V1ClusterGroupsUIDProfilesGetParams{ + HTTPClient: client, + } +} + +/* +V1ClusterGroupsUIDProfilesGetParams contains all the parameters to send to the API endpoint +for the v1 cluster groups Uid profiles get operation typically these are written to a http.Request +*/ +type V1ClusterGroupsUIDProfilesGetParams struct { + + /*IncludePackMeta + includes pack meta such as schema, presets + + */ + IncludePackMeta *string + /*UID + ClusterGroup uid + + */ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cluster groups Uid profiles get params +func (o *V1ClusterGroupsUIDProfilesGetParams) WithTimeout(timeout time.Duration) *V1ClusterGroupsUIDProfilesGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cluster groups Uid profiles get params +func (o *V1ClusterGroupsUIDProfilesGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cluster groups Uid profiles get params +func (o *V1ClusterGroupsUIDProfilesGetParams) WithContext(ctx context.Context) *V1ClusterGroupsUIDProfilesGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cluster groups Uid profiles get params +func (o *V1ClusterGroupsUIDProfilesGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cluster groups Uid profiles get params +func (o *V1ClusterGroupsUIDProfilesGetParams) WithHTTPClient(client *http.Client) *V1ClusterGroupsUIDProfilesGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cluster groups Uid profiles get params +func (o *V1ClusterGroupsUIDProfilesGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithIncludePackMeta adds the includePackMeta to the v1 cluster groups Uid profiles get params +func (o *V1ClusterGroupsUIDProfilesGetParams) WithIncludePackMeta(includePackMeta *string) *V1ClusterGroupsUIDProfilesGetParams { + o.SetIncludePackMeta(includePackMeta) + return o +} + +// SetIncludePackMeta adds the includePackMeta to the v1 cluster groups Uid profiles get params +func (o *V1ClusterGroupsUIDProfilesGetParams) SetIncludePackMeta(includePackMeta *string) { + o.IncludePackMeta = includePackMeta +} + +// WithUID adds the uid to the v1 cluster groups Uid profiles get params +func (o *V1ClusterGroupsUIDProfilesGetParams) WithUID(uid string) *V1ClusterGroupsUIDProfilesGetParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 cluster groups Uid profiles get params +func (o *V1ClusterGroupsUIDProfilesGetParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1ClusterGroupsUIDProfilesGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.IncludePackMeta != nil { + + // query param includePackMeta + var qrIncludePackMeta string + if o.IncludePackMeta != nil { + qrIncludePackMeta = *o.IncludePackMeta + } + qIncludePackMeta := qrIncludePackMeta + if qIncludePackMeta != "" { + if err := r.SetQueryParam("includePackMeta", qIncludePackMeta); err != nil { + return err + } + } + + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cluster_groups_uid_profiles_get_responses.go b/api/client/v1/v1_cluster_groups_uid_profiles_get_responses.go new file mode 100644 index 00000000..58319ad8 --- /dev/null +++ b/api/client/v1/v1_cluster_groups_uid_profiles_get_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1ClusterGroupsUIDProfilesGetReader is a Reader for the V1ClusterGroupsUIDProfilesGet structure. +type V1ClusterGroupsUIDProfilesGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1ClusterGroupsUIDProfilesGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1ClusterGroupsUIDProfilesGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1ClusterGroupsUIDProfilesGetOK creates a V1ClusterGroupsUIDProfilesGetOK with default headers values +func NewV1ClusterGroupsUIDProfilesGetOK() *V1ClusterGroupsUIDProfilesGetOK { + return &V1ClusterGroupsUIDProfilesGetOK{} +} + +/* +V1ClusterGroupsUIDProfilesGetOK handles this case with default header values. + +OK +*/ +type V1ClusterGroupsUIDProfilesGetOK struct { + Payload *models.V1SpectroClusterProfileList +} + +func (o *V1ClusterGroupsUIDProfilesGetOK) Error() string { + return fmt.Sprintf("[GET /v1/clustergroups/{uid}/profiles][%d] v1ClusterGroupsUidProfilesGetOK %+v", 200, o.Payload) +} + +func (o *V1ClusterGroupsUIDProfilesGetOK) GetPayload() *models.V1SpectroClusterProfileList { + return o.Payload +} + +func (o *V1ClusterGroupsUIDProfilesGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1SpectroClusterProfileList) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_cluster_groups_uid_profiles_update_parameters.go b/api/client/v1/v1_cluster_groups_uid_profiles_update_parameters.go new file mode 100644 index 00000000..adc9ef01 --- /dev/null +++ b/api/client/v1/v1_cluster_groups_uid_profiles_update_parameters.go @@ -0,0 +1,157 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1ClusterGroupsUIDProfilesUpdateParams creates a new V1ClusterGroupsUIDProfilesUpdateParams object +// with the default values initialized. +func NewV1ClusterGroupsUIDProfilesUpdateParams() *V1ClusterGroupsUIDProfilesUpdateParams { + var () + return &V1ClusterGroupsUIDProfilesUpdateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1ClusterGroupsUIDProfilesUpdateParamsWithTimeout creates a new V1ClusterGroupsUIDProfilesUpdateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1ClusterGroupsUIDProfilesUpdateParamsWithTimeout(timeout time.Duration) *V1ClusterGroupsUIDProfilesUpdateParams { + var () + return &V1ClusterGroupsUIDProfilesUpdateParams{ + + timeout: timeout, + } +} + +// NewV1ClusterGroupsUIDProfilesUpdateParamsWithContext creates a new V1ClusterGroupsUIDProfilesUpdateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1ClusterGroupsUIDProfilesUpdateParamsWithContext(ctx context.Context) *V1ClusterGroupsUIDProfilesUpdateParams { + var () + return &V1ClusterGroupsUIDProfilesUpdateParams{ + + Context: ctx, + } +} + +// NewV1ClusterGroupsUIDProfilesUpdateParamsWithHTTPClient creates a new V1ClusterGroupsUIDProfilesUpdateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1ClusterGroupsUIDProfilesUpdateParamsWithHTTPClient(client *http.Client) *V1ClusterGroupsUIDProfilesUpdateParams { + var () + return &V1ClusterGroupsUIDProfilesUpdateParams{ + HTTPClient: client, + } +} + +/* +V1ClusterGroupsUIDProfilesUpdateParams contains all the parameters to send to the API endpoint +for the v1 cluster groups Uid profiles update operation typically these are written to a http.Request +*/ +type V1ClusterGroupsUIDProfilesUpdateParams struct { + + /*Body*/ + Body *models.V1SpectroClusterProfiles + /*UID + ClusterGroup uid + + */ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cluster groups Uid profiles update params +func (o *V1ClusterGroupsUIDProfilesUpdateParams) WithTimeout(timeout time.Duration) *V1ClusterGroupsUIDProfilesUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cluster groups Uid profiles update params +func (o *V1ClusterGroupsUIDProfilesUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cluster groups Uid profiles update params +func (o *V1ClusterGroupsUIDProfilesUpdateParams) WithContext(ctx context.Context) *V1ClusterGroupsUIDProfilesUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cluster groups Uid profiles update params +func (o *V1ClusterGroupsUIDProfilesUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cluster groups Uid profiles update params +func (o *V1ClusterGroupsUIDProfilesUpdateParams) WithHTTPClient(client *http.Client) *V1ClusterGroupsUIDProfilesUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cluster groups Uid profiles update params +func (o *V1ClusterGroupsUIDProfilesUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 cluster groups Uid profiles update params +func (o *V1ClusterGroupsUIDProfilesUpdateParams) WithBody(body *models.V1SpectroClusterProfiles) *V1ClusterGroupsUIDProfilesUpdateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 cluster groups Uid profiles update params +func (o *V1ClusterGroupsUIDProfilesUpdateParams) SetBody(body *models.V1SpectroClusterProfiles) { + o.Body = body +} + +// WithUID adds the uid to the v1 cluster groups Uid profiles update params +func (o *V1ClusterGroupsUIDProfilesUpdateParams) WithUID(uid string) *V1ClusterGroupsUIDProfilesUpdateParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 cluster groups Uid profiles update params +func (o *V1ClusterGroupsUIDProfilesUpdateParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1ClusterGroupsUIDProfilesUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cluster_groups_uid_profiles_update_responses.go b/api/client/v1/v1_cluster_groups_uid_profiles_update_responses.go new file mode 100644 index 00000000..4f263c1f --- /dev/null +++ b/api/client/v1/v1_cluster_groups_uid_profiles_update_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1ClusterGroupsUIDProfilesUpdateReader is a Reader for the V1ClusterGroupsUIDProfilesUpdate structure. +type V1ClusterGroupsUIDProfilesUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1ClusterGroupsUIDProfilesUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1ClusterGroupsUIDProfilesUpdateNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1ClusterGroupsUIDProfilesUpdateNoContent creates a V1ClusterGroupsUIDProfilesUpdateNoContent with default headers values +func NewV1ClusterGroupsUIDProfilesUpdateNoContent() *V1ClusterGroupsUIDProfilesUpdateNoContent { + return &V1ClusterGroupsUIDProfilesUpdateNoContent{} +} + +/* +V1ClusterGroupsUIDProfilesUpdateNoContent handles this case with default header values. + +The resource was updated successfully +*/ +type V1ClusterGroupsUIDProfilesUpdateNoContent struct { +} + +func (o *V1ClusterGroupsUIDProfilesUpdateNoContent) Error() string { + return fmt.Sprintf("[PUT /v1/clustergroups/{uid}/profiles][%d] v1ClusterGroupsUidProfilesUpdateNoContent ", 204) +} + +func (o *V1ClusterGroupsUIDProfilesUpdateNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_cluster_groups_validate_name_parameters.go b/api/client/v1/v1_cluster_groups_validate_name_parameters.go new file mode 100644 index 00000000..4db9a165 --- /dev/null +++ b/api/client/v1/v1_cluster_groups_validate_name_parameters.go @@ -0,0 +1,137 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1ClusterGroupsValidateNameParams creates a new V1ClusterGroupsValidateNameParams object +// with the default values initialized. +func NewV1ClusterGroupsValidateNameParams() *V1ClusterGroupsValidateNameParams { + var () + return &V1ClusterGroupsValidateNameParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1ClusterGroupsValidateNameParamsWithTimeout creates a new V1ClusterGroupsValidateNameParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1ClusterGroupsValidateNameParamsWithTimeout(timeout time.Duration) *V1ClusterGroupsValidateNameParams { + var () + return &V1ClusterGroupsValidateNameParams{ + + timeout: timeout, + } +} + +// NewV1ClusterGroupsValidateNameParamsWithContext creates a new V1ClusterGroupsValidateNameParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1ClusterGroupsValidateNameParamsWithContext(ctx context.Context) *V1ClusterGroupsValidateNameParams { + var () + return &V1ClusterGroupsValidateNameParams{ + + Context: ctx, + } +} + +// NewV1ClusterGroupsValidateNameParamsWithHTTPClient creates a new V1ClusterGroupsValidateNameParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1ClusterGroupsValidateNameParamsWithHTTPClient(client *http.Client) *V1ClusterGroupsValidateNameParams { + var () + return &V1ClusterGroupsValidateNameParams{ + HTTPClient: client, + } +} + +/* +V1ClusterGroupsValidateNameParams contains all the parameters to send to the API endpoint +for the v1 cluster groups validate name operation typically these are written to a http.Request +*/ +type V1ClusterGroupsValidateNameParams struct { + + /*Name*/ + Name string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cluster groups validate name params +func (o *V1ClusterGroupsValidateNameParams) WithTimeout(timeout time.Duration) *V1ClusterGroupsValidateNameParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cluster groups validate name params +func (o *V1ClusterGroupsValidateNameParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cluster groups validate name params +func (o *V1ClusterGroupsValidateNameParams) WithContext(ctx context.Context) *V1ClusterGroupsValidateNameParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cluster groups validate name params +func (o *V1ClusterGroupsValidateNameParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cluster groups validate name params +func (o *V1ClusterGroupsValidateNameParams) WithHTTPClient(client *http.Client) *V1ClusterGroupsValidateNameParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cluster groups validate name params +func (o *V1ClusterGroupsValidateNameParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithName adds the name to the v1 cluster groups validate name params +func (o *V1ClusterGroupsValidateNameParams) WithName(name string) *V1ClusterGroupsValidateNameParams { + o.SetName(name) + return o +} + +// SetName adds the name to the v1 cluster groups validate name params +func (o *V1ClusterGroupsValidateNameParams) SetName(name string) { + o.Name = name +} + +// WriteToRequest writes these params to a swagger request +func (o *V1ClusterGroupsValidateNameParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // query param name + qrName := o.Name + qName := qrName + if qName != "" { + if err := r.SetQueryParam("name", qName); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cluster_groups_validate_name_responses.go b/api/client/v1/v1_cluster_groups_validate_name_responses.go new file mode 100644 index 00000000..85843ae3 --- /dev/null +++ b/api/client/v1/v1_cluster_groups_validate_name_responses.go @@ -0,0 +1,61 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1ClusterGroupsValidateNameReader is a Reader for the V1ClusterGroupsValidateName structure. +type V1ClusterGroupsValidateNameReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1ClusterGroupsValidateNameReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1ClusterGroupsValidateNameNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1ClusterGroupsValidateNameNoContent creates a V1ClusterGroupsValidateNameNoContent with default headers values +func NewV1ClusterGroupsValidateNameNoContent() *V1ClusterGroupsValidateNameNoContent { + return &V1ClusterGroupsValidateNameNoContent{} +} + +/* +V1ClusterGroupsValidateNameNoContent handles this case with default header values. + +Ok response without content +*/ +type V1ClusterGroupsValidateNameNoContent struct { + /*Audit uid for the request + */ + AuditUID string +} + +func (o *V1ClusterGroupsValidateNameNoContent) Error() string { + return fmt.Sprintf("[GET /v1/clustergroups/validate/name][%d] v1ClusterGroupsValidateNameNoContent ", 204) +} + +func (o *V1ClusterGroupsValidateNameNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header AuditUid + o.AuditUID = response.GetHeader("AuditUid") + + return nil +} diff --git a/api/client/v1/v1_cluster_namespaces_get_parameters.go b/api/client/v1/v1_cluster_namespaces_get_parameters.go new file mode 100644 index 00000000..e8b34390 --- /dev/null +++ b/api/client/v1/v1_cluster_namespaces_get_parameters.go @@ -0,0 +1,175 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// NewV1ClusterNamespacesGetParams creates a new V1ClusterNamespacesGetParams object +// with the default values initialized. +func NewV1ClusterNamespacesGetParams() *V1ClusterNamespacesGetParams { + var ( + skipEmptyNamespacesDefault = bool(false) + ) + return &V1ClusterNamespacesGetParams{ + SkipEmptyNamespaces: &skipEmptyNamespacesDefault, + + timeout: cr.DefaultTimeout, + } +} + +// NewV1ClusterNamespacesGetParamsWithTimeout creates a new V1ClusterNamespacesGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1ClusterNamespacesGetParamsWithTimeout(timeout time.Duration) *V1ClusterNamespacesGetParams { + var ( + skipEmptyNamespacesDefault = bool(false) + ) + return &V1ClusterNamespacesGetParams{ + SkipEmptyNamespaces: &skipEmptyNamespacesDefault, + + timeout: timeout, + } +} + +// NewV1ClusterNamespacesGetParamsWithContext creates a new V1ClusterNamespacesGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1ClusterNamespacesGetParamsWithContext(ctx context.Context) *V1ClusterNamespacesGetParams { + var ( + skipEmptyNamespacesDefault = bool(false) + ) + return &V1ClusterNamespacesGetParams{ + SkipEmptyNamespaces: &skipEmptyNamespacesDefault, + + Context: ctx, + } +} + +// NewV1ClusterNamespacesGetParamsWithHTTPClient creates a new V1ClusterNamespacesGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1ClusterNamespacesGetParamsWithHTTPClient(client *http.Client) *V1ClusterNamespacesGetParams { + var ( + skipEmptyNamespacesDefault = bool(false) + ) + return &V1ClusterNamespacesGetParams{ + SkipEmptyNamespaces: &skipEmptyNamespacesDefault, + HTTPClient: client, + } +} + +/* +V1ClusterNamespacesGetParams contains all the parameters to send to the API endpoint +for the v1 cluster namespaces get operation typically these are written to a http.Request +*/ +type V1ClusterNamespacesGetParams struct { + + /*SkipEmptyNamespaces*/ + SkipEmptyNamespaces *bool + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cluster namespaces get params +func (o *V1ClusterNamespacesGetParams) WithTimeout(timeout time.Duration) *V1ClusterNamespacesGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cluster namespaces get params +func (o *V1ClusterNamespacesGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cluster namespaces get params +func (o *V1ClusterNamespacesGetParams) WithContext(ctx context.Context) *V1ClusterNamespacesGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cluster namespaces get params +func (o *V1ClusterNamespacesGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cluster namespaces get params +func (o *V1ClusterNamespacesGetParams) WithHTTPClient(client *http.Client) *V1ClusterNamespacesGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cluster namespaces get params +func (o *V1ClusterNamespacesGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithSkipEmptyNamespaces adds the skipEmptyNamespaces to the v1 cluster namespaces get params +func (o *V1ClusterNamespacesGetParams) WithSkipEmptyNamespaces(skipEmptyNamespaces *bool) *V1ClusterNamespacesGetParams { + o.SetSkipEmptyNamespaces(skipEmptyNamespaces) + return o +} + +// SetSkipEmptyNamespaces adds the skipEmptyNamespaces to the v1 cluster namespaces get params +func (o *V1ClusterNamespacesGetParams) SetSkipEmptyNamespaces(skipEmptyNamespaces *bool) { + o.SkipEmptyNamespaces = skipEmptyNamespaces +} + +// WithUID adds the uid to the v1 cluster namespaces get params +func (o *V1ClusterNamespacesGetParams) WithUID(uid string) *V1ClusterNamespacesGetParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 cluster namespaces get params +func (o *V1ClusterNamespacesGetParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1ClusterNamespacesGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.SkipEmptyNamespaces != nil { + + // query param skipEmptyNamespaces + var qrSkipEmptyNamespaces bool + if o.SkipEmptyNamespaces != nil { + qrSkipEmptyNamespaces = *o.SkipEmptyNamespaces + } + qSkipEmptyNamespaces := swag.FormatBool(qrSkipEmptyNamespaces) + if qSkipEmptyNamespaces != "" { + if err := r.SetQueryParam("skipEmptyNamespaces", qSkipEmptyNamespaces); err != nil { + return err + } + } + + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cluster_namespaces_get_responses.go b/api/client/v1/v1_cluster_namespaces_get_responses.go new file mode 100644 index 00000000..1997ee20 --- /dev/null +++ b/api/client/v1/v1_cluster_namespaces_get_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1ClusterNamespacesGetReader is a Reader for the V1ClusterNamespacesGet structure. +type V1ClusterNamespacesGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1ClusterNamespacesGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1ClusterNamespacesGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1ClusterNamespacesGetOK creates a V1ClusterNamespacesGetOK with default headers values +func NewV1ClusterNamespacesGetOK() *V1ClusterNamespacesGetOK { + return &V1ClusterNamespacesGetOK{} +} + +/* +V1ClusterNamespacesGetOK handles this case with default header values. + +OK +*/ +type V1ClusterNamespacesGetOK struct { + Payload *models.V1ClusterNamespaces +} + +func (o *V1ClusterNamespacesGetOK) Error() string { + return fmt.Sprintf("[GET /v1/spectroclusters/{uid}/namespaces][%d] v1ClusterNamespacesGetOK %+v", 200, o.Payload) +} + +func (o *V1ClusterNamespacesGetOK) GetPayload() *models.V1ClusterNamespaces { + return o.Payload +} + +func (o *V1ClusterNamespacesGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1ClusterNamespaces) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_cluster_profiles_bulk_delete_parameters.go b/api/client/v1/v1_cluster_profiles_bulk_delete_parameters.go new file mode 100644 index 00000000..e11c480d --- /dev/null +++ b/api/client/v1/v1_cluster_profiles_bulk_delete_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1ClusterProfilesBulkDeleteParams creates a new V1ClusterProfilesBulkDeleteParams object +// with the default values initialized. +func NewV1ClusterProfilesBulkDeleteParams() *V1ClusterProfilesBulkDeleteParams { + var () + return &V1ClusterProfilesBulkDeleteParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1ClusterProfilesBulkDeleteParamsWithTimeout creates a new V1ClusterProfilesBulkDeleteParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1ClusterProfilesBulkDeleteParamsWithTimeout(timeout time.Duration) *V1ClusterProfilesBulkDeleteParams { + var () + return &V1ClusterProfilesBulkDeleteParams{ + + timeout: timeout, + } +} + +// NewV1ClusterProfilesBulkDeleteParamsWithContext creates a new V1ClusterProfilesBulkDeleteParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1ClusterProfilesBulkDeleteParamsWithContext(ctx context.Context) *V1ClusterProfilesBulkDeleteParams { + var () + return &V1ClusterProfilesBulkDeleteParams{ + + Context: ctx, + } +} + +// NewV1ClusterProfilesBulkDeleteParamsWithHTTPClient creates a new V1ClusterProfilesBulkDeleteParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1ClusterProfilesBulkDeleteParamsWithHTTPClient(client *http.Client) *V1ClusterProfilesBulkDeleteParams { + var () + return &V1ClusterProfilesBulkDeleteParams{ + HTTPClient: client, + } +} + +/* +V1ClusterProfilesBulkDeleteParams contains all the parameters to send to the API endpoint +for the v1 cluster profiles bulk delete operation typically these are written to a http.Request +*/ +type V1ClusterProfilesBulkDeleteParams struct { + + /*Body*/ + Body *models.V1BulkDeleteRequest + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cluster profiles bulk delete params +func (o *V1ClusterProfilesBulkDeleteParams) WithTimeout(timeout time.Duration) *V1ClusterProfilesBulkDeleteParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cluster profiles bulk delete params +func (o *V1ClusterProfilesBulkDeleteParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cluster profiles bulk delete params +func (o *V1ClusterProfilesBulkDeleteParams) WithContext(ctx context.Context) *V1ClusterProfilesBulkDeleteParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cluster profiles bulk delete params +func (o *V1ClusterProfilesBulkDeleteParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cluster profiles bulk delete params +func (o *V1ClusterProfilesBulkDeleteParams) WithHTTPClient(client *http.Client) *V1ClusterProfilesBulkDeleteParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cluster profiles bulk delete params +func (o *V1ClusterProfilesBulkDeleteParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 cluster profiles bulk delete params +func (o *V1ClusterProfilesBulkDeleteParams) WithBody(body *models.V1BulkDeleteRequest) *V1ClusterProfilesBulkDeleteParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 cluster profiles bulk delete params +func (o *V1ClusterProfilesBulkDeleteParams) SetBody(body *models.V1BulkDeleteRequest) { + o.Body = body +} + +// WriteToRequest writes these params to a swagger request +func (o *V1ClusterProfilesBulkDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cluster_profiles_bulk_delete_responses.go b/api/client/v1/v1_cluster_profiles_bulk_delete_responses.go new file mode 100644 index 00000000..a865ad8b --- /dev/null +++ b/api/client/v1/v1_cluster_profiles_bulk_delete_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1ClusterProfilesBulkDeleteReader is a Reader for the V1ClusterProfilesBulkDelete structure. +type V1ClusterProfilesBulkDeleteReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1ClusterProfilesBulkDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1ClusterProfilesBulkDeleteOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1ClusterProfilesBulkDeleteOK creates a V1ClusterProfilesBulkDeleteOK with default headers values +func NewV1ClusterProfilesBulkDeleteOK() *V1ClusterProfilesBulkDeleteOK { + return &V1ClusterProfilesBulkDeleteOK{} +} + +/* +V1ClusterProfilesBulkDeleteOK handles this case with default header values. + +OK +*/ +type V1ClusterProfilesBulkDeleteOK struct { + Payload *models.V1BulkDeleteResponse +} + +func (o *V1ClusterProfilesBulkDeleteOK) Error() string { + return fmt.Sprintf("[DELETE /v1/clusterprofiles/bulk][%d] v1ClusterProfilesBulkDeleteOK %+v", 200, o.Payload) +} + +func (o *V1ClusterProfilesBulkDeleteOK) GetPayload() *models.V1BulkDeleteResponse { + return o.Payload +} + +func (o *V1ClusterProfilesBulkDeleteOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1BulkDeleteResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_cluster_profiles_create_parameters.go b/api/client/v1/v1_cluster_profiles_create_parameters.go new file mode 100644 index 00000000..d4bafdfb --- /dev/null +++ b/api/client/v1/v1_cluster_profiles_create_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1ClusterProfilesCreateParams creates a new V1ClusterProfilesCreateParams object +// with the default values initialized. +func NewV1ClusterProfilesCreateParams() *V1ClusterProfilesCreateParams { + var () + return &V1ClusterProfilesCreateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1ClusterProfilesCreateParamsWithTimeout creates a new V1ClusterProfilesCreateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1ClusterProfilesCreateParamsWithTimeout(timeout time.Duration) *V1ClusterProfilesCreateParams { + var () + return &V1ClusterProfilesCreateParams{ + + timeout: timeout, + } +} + +// NewV1ClusterProfilesCreateParamsWithContext creates a new V1ClusterProfilesCreateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1ClusterProfilesCreateParamsWithContext(ctx context.Context) *V1ClusterProfilesCreateParams { + var () + return &V1ClusterProfilesCreateParams{ + + Context: ctx, + } +} + +// NewV1ClusterProfilesCreateParamsWithHTTPClient creates a new V1ClusterProfilesCreateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1ClusterProfilesCreateParamsWithHTTPClient(client *http.Client) *V1ClusterProfilesCreateParams { + var () + return &V1ClusterProfilesCreateParams{ + HTTPClient: client, + } +} + +/* +V1ClusterProfilesCreateParams contains all the parameters to send to the API endpoint +for the v1 cluster profiles create operation typically these are written to a http.Request +*/ +type V1ClusterProfilesCreateParams struct { + + /*Body*/ + Body *models.V1ClusterProfileEntity + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cluster profiles create params +func (o *V1ClusterProfilesCreateParams) WithTimeout(timeout time.Duration) *V1ClusterProfilesCreateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cluster profiles create params +func (o *V1ClusterProfilesCreateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cluster profiles create params +func (o *V1ClusterProfilesCreateParams) WithContext(ctx context.Context) *V1ClusterProfilesCreateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cluster profiles create params +func (o *V1ClusterProfilesCreateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cluster profiles create params +func (o *V1ClusterProfilesCreateParams) WithHTTPClient(client *http.Client) *V1ClusterProfilesCreateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cluster profiles create params +func (o *V1ClusterProfilesCreateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 cluster profiles create params +func (o *V1ClusterProfilesCreateParams) WithBody(body *models.V1ClusterProfileEntity) *V1ClusterProfilesCreateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 cluster profiles create params +func (o *V1ClusterProfilesCreateParams) SetBody(body *models.V1ClusterProfileEntity) { + o.Body = body +} + +// WriteToRequest writes these params to a swagger request +func (o *V1ClusterProfilesCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cluster_profiles_create_responses.go b/api/client/v1/v1_cluster_profiles_create_responses.go new file mode 100644 index 00000000..0e919a6a --- /dev/null +++ b/api/client/v1/v1_cluster_profiles_create_responses.go @@ -0,0 +1,77 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1ClusterProfilesCreateReader is a Reader for the V1ClusterProfilesCreate structure. +type V1ClusterProfilesCreateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1ClusterProfilesCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 201: + result := NewV1ClusterProfilesCreateCreated() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1ClusterProfilesCreateCreated creates a V1ClusterProfilesCreateCreated with default headers values +func NewV1ClusterProfilesCreateCreated() *V1ClusterProfilesCreateCreated { + return &V1ClusterProfilesCreateCreated{} +} + +/* +V1ClusterProfilesCreateCreated handles this case with default header values. + +Created successfully +*/ +type V1ClusterProfilesCreateCreated struct { + /*Audit uid for the request + */ + AuditUID string + + Payload *models.V1UID +} + +func (o *V1ClusterProfilesCreateCreated) Error() string { + return fmt.Sprintf("[POST /v1/clusterprofiles][%d] v1ClusterProfilesCreateCreated %+v", 201, o.Payload) +} + +func (o *V1ClusterProfilesCreateCreated) GetPayload() *models.V1UID { + return o.Payload +} + +func (o *V1ClusterProfilesCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header AuditUid + o.AuditUID = response.GetHeader("AuditUid") + + o.Payload = new(models.V1UID) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_cluster_profiles_delete_parameters.go b/api/client/v1/v1_cluster_profiles_delete_parameters.go new file mode 100644 index 00000000..91164c07 --- /dev/null +++ b/api/client/v1/v1_cluster_profiles_delete_parameters.go @@ -0,0 +1,168 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1ClusterProfilesDeleteParams creates a new V1ClusterProfilesDeleteParams object +// with the default values initialized. +func NewV1ClusterProfilesDeleteParams() *V1ClusterProfilesDeleteParams { + var () + return &V1ClusterProfilesDeleteParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1ClusterProfilesDeleteParamsWithTimeout creates a new V1ClusterProfilesDeleteParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1ClusterProfilesDeleteParamsWithTimeout(timeout time.Duration) *V1ClusterProfilesDeleteParams { + var () + return &V1ClusterProfilesDeleteParams{ + + timeout: timeout, + } +} + +// NewV1ClusterProfilesDeleteParamsWithContext creates a new V1ClusterProfilesDeleteParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1ClusterProfilesDeleteParamsWithContext(ctx context.Context) *V1ClusterProfilesDeleteParams { + var () + return &V1ClusterProfilesDeleteParams{ + + Context: ctx, + } +} + +// NewV1ClusterProfilesDeleteParamsWithHTTPClient creates a new V1ClusterProfilesDeleteParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1ClusterProfilesDeleteParamsWithHTTPClient(client *http.Client) *V1ClusterProfilesDeleteParams { + var () + return &V1ClusterProfilesDeleteParams{ + HTTPClient: client, + } +} + +/* +V1ClusterProfilesDeleteParams contains all the parameters to send to the API endpoint +for the v1 cluster profiles delete operation typically these are written to a http.Request +*/ +type V1ClusterProfilesDeleteParams struct { + + /*IncludePackMeta + Comma seperated pack meta such as schema, presets + + */ + IncludePackMeta *string + /*UID + Cluster profile uid + + */ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cluster profiles delete params +func (o *V1ClusterProfilesDeleteParams) WithTimeout(timeout time.Duration) *V1ClusterProfilesDeleteParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cluster profiles delete params +func (o *V1ClusterProfilesDeleteParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cluster profiles delete params +func (o *V1ClusterProfilesDeleteParams) WithContext(ctx context.Context) *V1ClusterProfilesDeleteParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cluster profiles delete params +func (o *V1ClusterProfilesDeleteParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cluster profiles delete params +func (o *V1ClusterProfilesDeleteParams) WithHTTPClient(client *http.Client) *V1ClusterProfilesDeleteParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cluster profiles delete params +func (o *V1ClusterProfilesDeleteParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithIncludePackMeta adds the includePackMeta to the v1 cluster profiles delete params +func (o *V1ClusterProfilesDeleteParams) WithIncludePackMeta(includePackMeta *string) *V1ClusterProfilesDeleteParams { + o.SetIncludePackMeta(includePackMeta) + return o +} + +// SetIncludePackMeta adds the includePackMeta to the v1 cluster profiles delete params +func (o *V1ClusterProfilesDeleteParams) SetIncludePackMeta(includePackMeta *string) { + o.IncludePackMeta = includePackMeta +} + +// WithUID adds the uid to the v1 cluster profiles delete params +func (o *V1ClusterProfilesDeleteParams) WithUID(uid string) *V1ClusterProfilesDeleteParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 cluster profiles delete params +func (o *V1ClusterProfilesDeleteParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1ClusterProfilesDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.IncludePackMeta != nil { + + // query param includePackMeta + var qrIncludePackMeta string + if o.IncludePackMeta != nil { + qrIncludePackMeta = *o.IncludePackMeta + } + qIncludePackMeta := qrIncludePackMeta + if qIncludePackMeta != "" { + if err := r.SetQueryParam("includePackMeta", qIncludePackMeta); err != nil { + return err + } + } + + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cluster_profiles_delete_responses.go b/api/client/v1/v1_cluster_profiles_delete_responses.go new file mode 100644 index 00000000..90c7313a --- /dev/null +++ b/api/client/v1/v1_cluster_profiles_delete_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1ClusterProfilesDeleteReader is a Reader for the V1ClusterProfilesDelete structure. +type V1ClusterProfilesDeleteReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1ClusterProfilesDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1ClusterProfilesDeleteNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1ClusterProfilesDeleteNoContent creates a V1ClusterProfilesDeleteNoContent with default headers values +func NewV1ClusterProfilesDeleteNoContent() *V1ClusterProfilesDeleteNoContent { + return &V1ClusterProfilesDeleteNoContent{} +} + +/* +V1ClusterProfilesDeleteNoContent handles this case with default header values. + +The resource was deleted successfully +*/ +type V1ClusterProfilesDeleteNoContent struct { +} + +func (o *V1ClusterProfilesDeleteNoContent) Error() string { + return fmt.Sprintf("[DELETE /v1/clusterprofiles/{uid}][%d] v1ClusterProfilesDeleteNoContent ", 204) +} + +func (o *V1ClusterProfilesDeleteNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_cluster_profiles_filter_summary_parameters.go b/api/client/v1/v1_cluster_profiles_filter_summary_parameters.go new file mode 100644 index 00000000..4646273a --- /dev/null +++ b/api/client/v1/v1_cluster_profiles_filter_summary_parameters.go @@ -0,0 +1,234 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1ClusterProfilesFilterSummaryParams creates a new V1ClusterProfilesFilterSummaryParams object +// with the default values initialized. +func NewV1ClusterProfilesFilterSummaryParams() *V1ClusterProfilesFilterSummaryParams { + var () + return &V1ClusterProfilesFilterSummaryParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1ClusterProfilesFilterSummaryParamsWithTimeout creates a new V1ClusterProfilesFilterSummaryParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1ClusterProfilesFilterSummaryParamsWithTimeout(timeout time.Duration) *V1ClusterProfilesFilterSummaryParams { + var () + return &V1ClusterProfilesFilterSummaryParams{ + + timeout: timeout, + } +} + +// NewV1ClusterProfilesFilterSummaryParamsWithContext creates a new V1ClusterProfilesFilterSummaryParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1ClusterProfilesFilterSummaryParamsWithContext(ctx context.Context) *V1ClusterProfilesFilterSummaryParams { + var () + return &V1ClusterProfilesFilterSummaryParams{ + + Context: ctx, + } +} + +// NewV1ClusterProfilesFilterSummaryParamsWithHTTPClient creates a new V1ClusterProfilesFilterSummaryParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1ClusterProfilesFilterSummaryParamsWithHTTPClient(client *http.Client) *V1ClusterProfilesFilterSummaryParams { + var () + return &V1ClusterProfilesFilterSummaryParams{ + HTTPClient: client, + } +} + +/* +V1ClusterProfilesFilterSummaryParams contains all the parameters to send to the API endpoint +for the v1 cluster profiles filter summary operation typically these are written to a http.Request +*/ +type V1ClusterProfilesFilterSummaryParams struct { + + /*Body*/ + Body *models.V1ClusterProfilesFilterSpec + /*Continue + continue token to paginate the subsequent data items + + */ + Continue *string + /*Limit + limit is a maximum number of responses to return for a list call. Maximum value of the limit is 50. + If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. + + */ + Limit *int64 + /*Offset + offset is the next index number from which the response will start. The response offset value can be used along with continue token for the pagination. + + */ + Offset *int64 + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cluster profiles filter summary params +func (o *V1ClusterProfilesFilterSummaryParams) WithTimeout(timeout time.Duration) *V1ClusterProfilesFilterSummaryParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cluster profiles filter summary params +func (o *V1ClusterProfilesFilterSummaryParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cluster profiles filter summary params +func (o *V1ClusterProfilesFilterSummaryParams) WithContext(ctx context.Context) *V1ClusterProfilesFilterSummaryParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cluster profiles filter summary params +func (o *V1ClusterProfilesFilterSummaryParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cluster profiles filter summary params +func (o *V1ClusterProfilesFilterSummaryParams) WithHTTPClient(client *http.Client) *V1ClusterProfilesFilterSummaryParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cluster profiles filter summary params +func (o *V1ClusterProfilesFilterSummaryParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 cluster profiles filter summary params +func (o *V1ClusterProfilesFilterSummaryParams) WithBody(body *models.V1ClusterProfilesFilterSpec) *V1ClusterProfilesFilterSummaryParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 cluster profiles filter summary params +func (o *V1ClusterProfilesFilterSummaryParams) SetBody(body *models.V1ClusterProfilesFilterSpec) { + o.Body = body +} + +// WithContinue adds the continueVar to the v1 cluster profiles filter summary params +func (o *V1ClusterProfilesFilterSummaryParams) WithContinue(continueVar *string) *V1ClusterProfilesFilterSummaryParams { + o.SetContinue(continueVar) + return o +} + +// SetContinue adds the continue to the v1 cluster profiles filter summary params +func (o *V1ClusterProfilesFilterSummaryParams) SetContinue(continueVar *string) { + o.Continue = continueVar +} + +// WithLimit adds the limit to the v1 cluster profiles filter summary params +func (o *V1ClusterProfilesFilterSummaryParams) WithLimit(limit *int64) *V1ClusterProfilesFilterSummaryParams { + o.SetLimit(limit) + return o +} + +// SetLimit adds the limit to the v1 cluster profiles filter summary params +func (o *V1ClusterProfilesFilterSummaryParams) SetLimit(limit *int64) { + o.Limit = limit +} + +// WithOffset adds the offset to the v1 cluster profiles filter summary params +func (o *V1ClusterProfilesFilterSummaryParams) WithOffset(offset *int64) *V1ClusterProfilesFilterSummaryParams { + o.SetOffset(offset) + return o +} + +// SetOffset adds the offset to the v1 cluster profiles filter summary params +func (o *V1ClusterProfilesFilterSummaryParams) SetOffset(offset *int64) { + o.Offset = offset +} + +// WriteToRequest writes these params to a swagger request +func (o *V1ClusterProfilesFilterSummaryParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + if o.Continue != nil { + + // query param continue + var qrContinue string + if o.Continue != nil { + qrContinue = *o.Continue + } + qContinue := qrContinue + if qContinue != "" { + if err := r.SetQueryParam("continue", qContinue); err != nil { + return err + } + } + + } + + if o.Limit != nil { + + // query param limit + var qrLimit int64 + if o.Limit != nil { + qrLimit = *o.Limit + } + qLimit := swag.FormatInt64(qrLimit) + if qLimit != "" { + if err := r.SetQueryParam("limit", qLimit); err != nil { + return err + } + } + + } + + if o.Offset != nil { + + // query param offset + var qrOffset int64 + if o.Offset != nil { + qrOffset = *o.Offset + } + qOffset := swag.FormatInt64(qrOffset) + if qOffset != "" { + if err := r.SetQueryParam("offset", qOffset); err != nil { + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cluster_profiles_filter_summary_responses.go b/api/client/v1/v1_cluster_profiles_filter_summary_responses.go new file mode 100644 index 00000000..e9e90dce --- /dev/null +++ b/api/client/v1/v1_cluster_profiles_filter_summary_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1ClusterProfilesFilterSummaryReader is a Reader for the V1ClusterProfilesFilterSummary structure. +type V1ClusterProfilesFilterSummaryReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1ClusterProfilesFilterSummaryReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1ClusterProfilesFilterSummaryOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1ClusterProfilesFilterSummaryOK creates a V1ClusterProfilesFilterSummaryOK with default headers values +func NewV1ClusterProfilesFilterSummaryOK() *V1ClusterProfilesFilterSummaryOK { + return &V1ClusterProfilesFilterSummaryOK{} +} + +/* +V1ClusterProfilesFilterSummaryOK handles this case with default header values. + +An array of cluster profiles summary items +*/ +type V1ClusterProfilesFilterSummaryOK struct { + Payload *models.V1ClusterProfilesSummary +} + +func (o *V1ClusterProfilesFilterSummaryOK) Error() string { + return fmt.Sprintf("[POST /v1/dashboard/clusterprofiles][%d] v1ClusterProfilesFilterSummaryOK %+v", 200, o.Payload) +} + +func (o *V1ClusterProfilesFilterSummaryOK) GetPayload() *models.V1ClusterProfilesSummary { + return o.Payload +} + +func (o *V1ClusterProfilesFilterSummaryOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1ClusterProfilesSummary) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_cluster_profiles_get_parameters.go b/api/client/v1/v1_cluster_profiles_get_parameters.go new file mode 100644 index 00000000..56488b4d --- /dev/null +++ b/api/client/v1/v1_cluster_profiles_get_parameters.go @@ -0,0 +1,168 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1ClusterProfilesGetParams creates a new V1ClusterProfilesGetParams object +// with the default values initialized. +func NewV1ClusterProfilesGetParams() *V1ClusterProfilesGetParams { + var () + return &V1ClusterProfilesGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1ClusterProfilesGetParamsWithTimeout creates a new V1ClusterProfilesGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1ClusterProfilesGetParamsWithTimeout(timeout time.Duration) *V1ClusterProfilesGetParams { + var () + return &V1ClusterProfilesGetParams{ + + timeout: timeout, + } +} + +// NewV1ClusterProfilesGetParamsWithContext creates a new V1ClusterProfilesGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1ClusterProfilesGetParamsWithContext(ctx context.Context) *V1ClusterProfilesGetParams { + var () + return &V1ClusterProfilesGetParams{ + + Context: ctx, + } +} + +// NewV1ClusterProfilesGetParamsWithHTTPClient creates a new V1ClusterProfilesGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1ClusterProfilesGetParamsWithHTTPClient(client *http.Client) *V1ClusterProfilesGetParams { + var () + return &V1ClusterProfilesGetParams{ + HTTPClient: client, + } +} + +/* +V1ClusterProfilesGetParams contains all the parameters to send to the API endpoint +for the v1 cluster profiles get operation typically these are written to a http.Request +*/ +type V1ClusterProfilesGetParams struct { + + /*IncludePackMeta + Comma seperated pack meta such as schema, presets + + */ + IncludePackMeta *string + /*UID + Cluster profile uid + + */ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cluster profiles get params +func (o *V1ClusterProfilesGetParams) WithTimeout(timeout time.Duration) *V1ClusterProfilesGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cluster profiles get params +func (o *V1ClusterProfilesGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cluster profiles get params +func (o *V1ClusterProfilesGetParams) WithContext(ctx context.Context) *V1ClusterProfilesGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cluster profiles get params +func (o *V1ClusterProfilesGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cluster profiles get params +func (o *V1ClusterProfilesGetParams) WithHTTPClient(client *http.Client) *V1ClusterProfilesGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cluster profiles get params +func (o *V1ClusterProfilesGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithIncludePackMeta adds the includePackMeta to the v1 cluster profiles get params +func (o *V1ClusterProfilesGetParams) WithIncludePackMeta(includePackMeta *string) *V1ClusterProfilesGetParams { + o.SetIncludePackMeta(includePackMeta) + return o +} + +// SetIncludePackMeta adds the includePackMeta to the v1 cluster profiles get params +func (o *V1ClusterProfilesGetParams) SetIncludePackMeta(includePackMeta *string) { + o.IncludePackMeta = includePackMeta +} + +// WithUID adds the uid to the v1 cluster profiles get params +func (o *V1ClusterProfilesGetParams) WithUID(uid string) *V1ClusterProfilesGetParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 cluster profiles get params +func (o *V1ClusterProfilesGetParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1ClusterProfilesGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.IncludePackMeta != nil { + + // query param includePackMeta + var qrIncludePackMeta string + if o.IncludePackMeta != nil { + qrIncludePackMeta = *o.IncludePackMeta + } + qIncludePackMeta := qrIncludePackMeta + if qIncludePackMeta != "" { + if err := r.SetQueryParam("includePackMeta", qIncludePackMeta); err != nil { + return err + } + } + + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cluster_profiles_get_responses.go b/api/client/v1/v1_cluster_profiles_get_responses.go new file mode 100644 index 00000000..ce6e74ee --- /dev/null +++ b/api/client/v1/v1_cluster_profiles_get_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1ClusterProfilesGetReader is a Reader for the V1ClusterProfilesGet structure. +type V1ClusterProfilesGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1ClusterProfilesGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1ClusterProfilesGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1ClusterProfilesGetOK creates a V1ClusterProfilesGetOK with default headers values +func NewV1ClusterProfilesGetOK() *V1ClusterProfilesGetOK { + return &V1ClusterProfilesGetOK{} +} + +/* +V1ClusterProfilesGetOK handles this case with default header values. + +OK +*/ +type V1ClusterProfilesGetOK struct { + Payload *models.V1ClusterProfile +} + +func (o *V1ClusterProfilesGetOK) Error() string { + return fmt.Sprintf("[GET /v1/clusterprofiles/{uid}][%d] v1ClusterProfilesGetOK %+v", 200, o.Payload) +} + +func (o *V1ClusterProfilesGetOK) GetPayload() *models.V1ClusterProfile { + return o.Payload +} + +func (o *V1ClusterProfilesGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1ClusterProfile) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_cluster_profiles_import_file_parameters.go b/api/client/v1/v1_cluster_profiles_import_file_parameters.go new file mode 100644 index 00000000..5ca2ae64 --- /dev/null +++ b/api/client/v1/v1_cluster_profiles_import_file_parameters.go @@ -0,0 +1,221 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// NewV1ClusterProfilesImportFileParams creates a new V1ClusterProfilesImportFileParams object +// with the default values initialized. +func NewV1ClusterProfilesImportFileParams() *V1ClusterProfilesImportFileParams { + var ( + formatDefault = string("json") + ) + return &V1ClusterProfilesImportFileParams{ + Format: &formatDefault, + + timeout: cr.DefaultTimeout, + } +} + +// NewV1ClusterProfilesImportFileParamsWithTimeout creates a new V1ClusterProfilesImportFileParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1ClusterProfilesImportFileParamsWithTimeout(timeout time.Duration) *V1ClusterProfilesImportFileParams { + var ( + formatDefault = string("json") + ) + return &V1ClusterProfilesImportFileParams{ + Format: &formatDefault, + + timeout: timeout, + } +} + +// NewV1ClusterProfilesImportFileParamsWithContext creates a new V1ClusterProfilesImportFileParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1ClusterProfilesImportFileParamsWithContext(ctx context.Context) *V1ClusterProfilesImportFileParams { + var ( + formatDefault = string("json") + ) + return &V1ClusterProfilesImportFileParams{ + Format: &formatDefault, + + Context: ctx, + } +} + +// NewV1ClusterProfilesImportFileParamsWithHTTPClient creates a new V1ClusterProfilesImportFileParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1ClusterProfilesImportFileParamsWithHTTPClient(client *http.Client) *V1ClusterProfilesImportFileParams { + var ( + formatDefault = string("json") + ) + return &V1ClusterProfilesImportFileParams{ + Format: &formatDefault, + HTTPClient: client, + } +} + +/* +V1ClusterProfilesImportFileParams contains all the parameters to send to the API endpoint +for the v1 cluster profiles import file operation typically these are written to a http.Request +*/ +type V1ClusterProfilesImportFileParams struct { + + /*Format + Cluster profile import file format ["yaml", "json"] + + */ + Format *string + /*ImportFile + Cluster profile import file + + */ + ImportFile runtime.NamedReadCloser + /*Publish + If true then cluster profile will be published post successful import + + */ + Publish *bool + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cluster profiles import file params +func (o *V1ClusterProfilesImportFileParams) WithTimeout(timeout time.Duration) *V1ClusterProfilesImportFileParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cluster profiles import file params +func (o *V1ClusterProfilesImportFileParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cluster profiles import file params +func (o *V1ClusterProfilesImportFileParams) WithContext(ctx context.Context) *V1ClusterProfilesImportFileParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cluster profiles import file params +func (o *V1ClusterProfilesImportFileParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cluster profiles import file params +func (o *V1ClusterProfilesImportFileParams) WithHTTPClient(client *http.Client) *V1ClusterProfilesImportFileParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cluster profiles import file params +func (o *V1ClusterProfilesImportFileParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithFormat adds the format to the v1 cluster profiles import file params +func (o *V1ClusterProfilesImportFileParams) WithFormat(format *string) *V1ClusterProfilesImportFileParams { + o.SetFormat(format) + return o +} + +// SetFormat adds the format to the v1 cluster profiles import file params +func (o *V1ClusterProfilesImportFileParams) SetFormat(format *string) { + o.Format = format +} + +// WithImportFile adds the importFile to the v1 cluster profiles import file params +func (o *V1ClusterProfilesImportFileParams) WithImportFile(importFile runtime.NamedReadCloser) *V1ClusterProfilesImportFileParams { + o.SetImportFile(importFile) + return o +} + +// SetImportFile adds the importFile to the v1 cluster profiles import file params +func (o *V1ClusterProfilesImportFileParams) SetImportFile(importFile runtime.NamedReadCloser) { + o.ImportFile = importFile +} + +// WithPublish adds the publish to the v1 cluster profiles import file params +func (o *V1ClusterProfilesImportFileParams) WithPublish(publish *bool) *V1ClusterProfilesImportFileParams { + o.SetPublish(publish) + return o +} + +// SetPublish adds the publish to the v1 cluster profiles import file params +func (o *V1ClusterProfilesImportFileParams) SetPublish(publish *bool) { + o.Publish = publish +} + +// WriteToRequest writes these params to a swagger request +func (o *V1ClusterProfilesImportFileParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Format != nil { + + // query param format + var qrFormat string + if o.Format != nil { + qrFormat = *o.Format + } + qFormat := qrFormat + if qFormat != "" { + if err := r.SetQueryParam("format", qFormat); err != nil { + return err + } + } + + } + + if o.ImportFile != nil { + + if o.ImportFile != nil { + + // form file param importFile + if err := r.SetFileParam("importFile", o.ImportFile); err != nil { + return err + } + + } + + } + + if o.Publish != nil { + + // query param publish + var qrPublish bool + if o.Publish != nil { + qrPublish = *o.Publish + } + qPublish := swag.FormatBool(qrPublish) + if qPublish != "" { + if err := r.SetQueryParam("publish", qPublish); err != nil { + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cluster_profiles_import_file_responses.go b/api/client/v1/v1_cluster_profiles_import_file_responses.go new file mode 100644 index 00000000..1fc572c6 --- /dev/null +++ b/api/client/v1/v1_cluster_profiles_import_file_responses.go @@ -0,0 +1,77 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1ClusterProfilesImportFileReader is a Reader for the V1ClusterProfilesImportFile structure. +type V1ClusterProfilesImportFileReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1ClusterProfilesImportFileReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 201: + result := NewV1ClusterProfilesImportFileCreated() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1ClusterProfilesImportFileCreated creates a V1ClusterProfilesImportFileCreated with default headers values +func NewV1ClusterProfilesImportFileCreated() *V1ClusterProfilesImportFileCreated { + return &V1ClusterProfilesImportFileCreated{} +} + +/* +V1ClusterProfilesImportFileCreated handles this case with default header values. + +Created successfully +*/ +type V1ClusterProfilesImportFileCreated struct { + /*Audit uid for the request + */ + AuditUID string + + Payload *models.V1UID +} + +func (o *V1ClusterProfilesImportFileCreated) Error() string { + return fmt.Sprintf("[POST /v1/clusterprofiles/import/file][%d] v1ClusterProfilesImportFileCreated %+v", 201, o.Payload) +} + +func (o *V1ClusterProfilesImportFileCreated) GetPayload() *models.V1UID { + return o.Payload +} + +func (o *V1ClusterProfilesImportFileCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header AuditUid + o.AuditUID = response.GetHeader("AuditUid") + + o.Payload = new(models.V1UID) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_cluster_profiles_import_parameters.go b/api/client/v1/v1_cluster_profiles_import_parameters.go new file mode 100644 index 00000000..e3c0a85a --- /dev/null +++ b/api/client/v1/v1_cluster_profiles_import_parameters.go @@ -0,0 +1,169 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1ClusterProfilesImportParams creates a new V1ClusterProfilesImportParams object +// with the default values initialized. +func NewV1ClusterProfilesImportParams() *V1ClusterProfilesImportParams { + var () + return &V1ClusterProfilesImportParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1ClusterProfilesImportParamsWithTimeout creates a new V1ClusterProfilesImportParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1ClusterProfilesImportParamsWithTimeout(timeout time.Duration) *V1ClusterProfilesImportParams { + var () + return &V1ClusterProfilesImportParams{ + + timeout: timeout, + } +} + +// NewV1ClusterProfilesImportParamsWithContext creates a new V1ClusterProfilesImportParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1ClusterProfilesImportParamsWithContext(ctx context.Context) *V1ClusterProfilesImportParams { + var () + return &V1ClusterProfilesImportParams{ + + Context: ctx, + } +} + +// NewV1ClusterProfilesImportParamsWithHTTPClient creates a new V1ClusterProfilesImportParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1ClusterProfilesImportParamsWithHTTPClient(client *http.Client) *V1ClusterProfilesImportParams { + var () + return &V1ClusterProfilesImportParams{ + HTTPClient: client, + } +} + +/* +V1ClusterProfilesImportParams contains all the parameters to send to the API endpoint +for the v1 cluster profiles import operation typically these are written to a http.Request +*/ +type V1ClusterProfilesImportParams struct { + + /*Body*/ + Body *models.V1ClusterProfileImportEntity + /*Publish + If true then cluster profile will be published post successful import + + */ + Publish *bool + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cluster profiles import params +func (o *V1ClusterProfilesImportParams) WithTimeout(timeout time.Duration) *V1ClusterProfilesImportParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cluster profiles import params +func (o *V1ClusterProfilesImportParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cluster profiles import params +func (o *V1ClusterProfilesImportParams) WithContext(ctx context.Context) *V1ClusterProfilesImportParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cluster profiles import params +func (o *V1ClusterProfilesImportParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cluster profiles import params +func (o *V1ClusterProfilesImportParams) WithHTTPClient(client *http.Client) *V1ClusterProfilesImportParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cluster profiles import params +func (o *V1ClusterProfilesImportParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 cluster profiles import params +func (o *V1ClusterProfilesImportParams) WithBody(body *models.V1ClusterProfileImportEntity) *V1ClusterProfilesImportParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 cluster profiles import params +func (o *V1ClusterProfilesImportParams) SetBody(body *models.V1ClusterProfileImportEntity) { + o.Body = body +} + +// WithPublish adds the publish to the v1 cluster profiles import params +func (o *V1ClusterProfilesImportParams) WithPublish(publish *bool) *V1ClusterProfilesImportParams { + o.SetPublish(publish) + return o +} + +// SetPublish adds the publish to the v1 cluster profiles import params +func (o *V1ClusterProfilesImportParams) SetPublish(publish *bool) { + o.Publish = publish +} + +// WriteToRequest writes these params to a swagger request +func (o *V1ClusterProfilesImportParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + if o.Publish != nil { + + // query param publish + var qrPublish bool + if o.Publish != nil { + qrPublish = *o.Publish + } + qPublish := swag.FormatBool(qrPublish) + if qPublish != "" { + if err := r.SetQueryParam("publish", qPublish); err != nil { + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cluster_profiles_import_responses.go b/api/client/v1/v1_cluster_profiles_import_responses.go new file mode 100644 index 00000000..69fb982b --- /dev/null +++ b/api/client/v1/v1_cluster_profiles_import_responses.go @@ -0,0 +1,77 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1ClusterProfilesImportReader is a Reader for the V1ClusterProfilesImport structure. +type V1ClusterProfilesImportReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1ClusterProfilesImportReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 201: + result := NewV1ClusterProfilesImportCreated() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1ClusterProfilesImportCreated creates a V1ClusterProfilesImportCreated with default headers values +func NewV1ClusterProfilesImportCreated() *V1ClusterProfilesImportCreated { + return &V1ClusterProfilesImportCreated{} +} + +/* +V1ClusterProfilesImportCreated handles this case with default header values. + +Created successfully +*/ +type V1ClusterProfilesImportCreated struct { + /*Audit uid for the request + */ + AuditUID string + + Payload *models.V1UID +} + +func (o *V1ClusterProfilesImportCreated) Error() string { + return fmt.Sprintf("[POST /v1/clusterprofiles/import][%d] v1ClusterProfilesImportCreated %+v", 201, o.Payload) +} + +func (o *V1ClusterProfilesImportCreated) GetPayload() *models.V1UID { + return o.Payload +} + +func (o *V1ClusterProfilesImportCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header AuditUid + o.AuditUID = response.GetHeader("AuditUid") + + o.Payload = new(models.V1UID) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_cluster_profiles_import_validate_parameters.go b/api/client/v1/v1_cluster_profiles_import_validate_parameters.go new file mode 100644 index 00000000..dd59da85 --- /dev/null +++ b/api/client/v1/v1_cluster_profiles_import_validate_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1ClusterProfilesImportValidateParams creates a new V1ClusterProfilesImportValidateParams object +// with the default values initialized. +func NewV1ClusterProfilesImportValidateParams() *V1ClusterProfilesImportValidateParams { + var () + return &V1ClusterProfilesImportValidateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1ClusterProfilesImportValidateParamsWithTimeout creates a new V1ClusterProfilesImportValidateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1ClusterProfilesImportValidateParamsWithTimeout(timeout time.Duration) *V1ClusterProfilesImportValidateParams { + var () + return &V1ClusterProfilesImportValidateParams{ + + timeout: timeout, + } +} + +// NewV1ClusterProfilesImportValidateParamsWithContext creates a new V1ClusterProfilesImportValidateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1ClusterProfilesImportValidateParamsWithContext(ctx context.Context) *V1ClusterProfilesImportValidateParams { + var () + return &V1ClusterProfilesImportValidateParams{ + + Context: ctx, + } +} + +// NewV1ClusterProfilesImportValidateParamsWithHTTPClient creates a new V1ClusterProfilesImportValidateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1ClusterProfilesImportValidateParamsWithHTTPClient(client *http.Client) *V1ClusterProfilesImportValidateParams { + var () + return &V1ClusterProfilesImportValidateParams{ + HTTPClient: client, + } +} + +/* +V1ClusterProfilesImportValidateParams contains all the parameters to send to the API endpoint +for the v1 cluster profiles import validate operation typically these are written to a http.Request +*/ +type V1ClusterProfilesImportValidateParams struct { + + /*Body*/ + Body *models.V1ClusterProfileImportEntity + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cluster profiles import validate params +func (o *V1ClusterProfilesImportValidateParams) WithTimeout(timeout time.Duration) *V1ClusterProfilesImportValidateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cluster profiles import validate params +func (o *V1ClusterProfilesImportValidateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cluster profiles import validate params +func (o *V1ClusterProfilesImportValidateParams) WithContext(ctx context.Context) *V1ClusterProfilesImportValidateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cluster profiles import validate params +func (o *V1ClusterProfilesImportValidateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cluster profiles import validate params +func (o *V1ClusterProfilesImportValidateParams) WithHTTPClient(client *http.Client) *V1ClusterProfilesImportValidateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cluster profiles import validate params +func (o *V1ClusterProfilesImportValidateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 cluster profiles import validate params +func (o *V1ClusterProfilesImportValidateParams) WithBody(body *models.V1ClusterProfileImportEntity) *V1ClusterProfilesImportValidateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 cluster profiles import validate params +func (o *V1ClusterProfilesImportValidateParams) SetBody(body *models.V1ClusterProfileImportEntity) { + o.Body = body +} + +// WriteToRequest writes these params to a swagger request +func (o *V1ClusterProfilesImportValidateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cluster_profiles_import_validate_responses.go b/api/client/v1/v1_cluster_profiles_import_validate_responses.go new file mode 100644 index 00000000..16b428cb --- /dev/null +++ b/api/client/v1/v1_cluster_profiles_import_validate_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1ClusterProfilesImportValidateReader is a Reader for the V1ClusterProfilesImportValidate structure. +type V1ClusterProfilesImportValidateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1ClusterProfilesImportValidateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1ClusterProfilesImportValidateOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1ClusterProfilesImportValidateOK creates a V1ClusterProfilesImportValidateOK with default headers values +func NewV1ClusterProfilesImportValidateOK() *V1ClusterProfilesImportValidateOK { + return &V1ClusterProfilesImportValidateOK{} +} + +/* +V1ClusterProfilesImportValidateOK handles this case with default header values. + +Cluster profile import validated response +*/ +type V1ClusterProfilesImportValidateOK struct { + Payload *models.V1ClusterProfileImportEntity +} + +func (o *V1ClusterProfilesImportValidateOK) Error() string { + return fmt.Sprintf("[POST /v1/clusterprofiles/import/validate][%d] v1ClusterProfilesImportValidateOK %+v", 200, o.Payload) +} + +func (o *V1ClusterProfilesImportValidateOK) GetPayload() *models.V1ClusterProfileImportEntity { + return o.Payload +} + +func (o *V1ClusterProfilesImportValidateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1ClusterProfileImportEntity) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_cluster_profiles_metadata_parameters.go b/api/client/v1/v1_cluster_profiles_metadata_parameters.go new file mode 100644 index 00000000..3417c381 --- /dev/null +++ b/api/client/v1/v1_cluster_profiles_metadata_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1ClusterProfilesMetadataParams creates a new V1ClusterProfilesMetadataParams object +// with the default values initialized. +func NewV1ClusterProfilesMetadataParams() *V1ClusterProfilesMetadataParams { + + return &V1ClusterProfilesMetadataParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1ClusterProfilesMetadataParamsWithTimeout creates a new V1ClusterProfilesMetadataParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1ClusterProfilesMetadataParamsWithTimeout(timeout time.Duration) *V1ClusterProfilesMetadataParams { + + return &V1ClusterProfilesMetadataParams{ + + timeout: timeout, + } +} + +// NewV1ClusterProfilesMetadataParamsWithContext creates a new V1ClusterProfilesMetadataParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1ClusterProfilesMetadataParamsWithContext(ctx context.Context) *V1ClusterProfilesMetadataParams { + + return &V1ClusterProfilesMetadataParams{ + + Context: ctx, + } +} + +// NewV1ClusterProfilesMetadataParamsWithHTTPClient creates a new V1ClusterProfilesMetadataParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1ClusterProfilesMetadataParamsWithHTTPClient(client *http.Client) *V1ClusterProfilesMetadataParams { + + return &V1ClusterProfilesMetadataParams{ + HTTPClient: client, + } +} + +/* +V1ClusterProfilesMetadataParams contains all the parameters to send to the API endpoint +for the v1 cluster profiles metadata operation typically these are written to a http.Request +*/ +type V1ClusterProfilesMetadataParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cluster profiles metadata params +func (o *V1ClusterProfilesMetadataParams) WithTimeout(timeout time.Duration) *V1ClusterProfilesMetadataParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cluster profiles metadata params +func (o *V1ClusterProfilesMetadataParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cluster profiles metadata params +func (o *V1ClusterProfilesMetadataParams) WithContext(ctx context.Context) *V1ClusterProfilesMetadataParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cluster profiles metadata params +func (o *V1ClusterProfilesMetadataParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cluster profiles metadata params +func (o *V1ClusterProfilesMetadataParams) WithHTTPClient(client *http.Client) *V1ClusterProfilesMetadataParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cluster profiles metadata params +func (o *V1ClusterProfilesMetadataParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *V1ClusterProfilesMetadataParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cluster_profiles_metadata_responses.go b/api/client/v1/v1_cluster_profiles_metadata_responses.go new file mode 100644 index 00000000..bdb77322 --- /dev/null +++ b/api/client/v1/v1_cluster_profiles_metadata_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1ClusterProfilesMetadataReader is a Reader for the V1ClusterProfilesMetadata structure. +type V1ClusterProfilesMetadataReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1ClusterProfilesMetadataReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1ClusterProfilesMetadataOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1ClusterProfilesMetadataOK creates a V1ClusterProfilesMetadataOK with default headers values +func NewV1ClusterProfilesMetadataOK() *V1ClusterProfilesMetadataOK { + return &V1ClusterProfilesMetadataOK{} +} + +/* +V1ClusterProfilesMetadataOK handles this case with default header values. + +An array of cluster summary items +*/ +type V1ClusterProfilesMetadataOK struct { + Payload *models.V1ClusterProfilesMetadata +} + +func (o *V1ClusterProfilesMetadataOK) Error() string { + return fmt.Sprintf("[GET /v1/dashboard/clusterprofiles/metadata][%d] v1ClusterProfilesMetadataOK %+v", 200, o.Payload) +} + +func (o *V1ClusterProfilesMetadataOK) GetPayload() *models.V1ClusterProfilesMetadata { + return o.Payload +} + +func (o *V1ClusterProfilesMetadataOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1ClusterProfilesMetadata) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_cluster_profiles_packs_ref_update_parameters.go b/api/client/v1/v1_cluster_profiles_packs_ref_update_parameters.go new file mode 100644 index 00000000..7c048c1f --- /dev/null +++ b/api/client/v1/v1_cluster_profiles_packs_ref_update_parameters.go @@ -0,0 +1,189 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1ClusterProfilesPacksRefUpdateParams creates a new V1ClusterProfilesPacksRefUpdateParams object +// with the default values initialized. +func NewV1ClusterProfilesPacksRefUpdateParams() *V1ClusterProfilesPacksRefUpdateParams { + var () + return &V1ClusterProfilesPacksRefUpdateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1ClusterProfilesPacksRefUpdateParamsWithTimeout creates a new V1ClusterProfilesPacksRefUpdateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1ClusterProfilesPacksRefUpdateParamsWithTimeout(timeout time.Duration) *V1ClusterProfilesPacksRefUpdateParams { + var () + return &V1ClusterProfilesPacksRefUpdateParams{ + + timeout: timeout, + } +} + +// NewV1ClusterProfilesPacksRefUpdateParamsWithContext creates a new V1ClusterProfilesPacksRefUpdateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1ClusterProfilesPacksRefUpdateParamsWithContext(ctx context.Context) *V1ClusterProfilesPacksRefUpdateParams { + var () + return &V1ClusterProfilesPacksRefUpdateParams{ + + Context: ctx, + } +} + +// NewV1ClusterProfilesPacksRefUpdateParamsWithHTTPClient creates a new V1ClusterProfilesPacksRefUpdateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1ClusterProfilesPacksRefUpdateParamsWithHTTPClient(client *http.Client) *V1ClusterProfilesPacksRefUpdateParams { + var () + return &V1ClusterProfilesPacksRefUpdateParams{ + HTTPClient: client, + } +} + +/* +V1ClusterProfilesPacksRefUpdateParams contains all the parameters to send to the API endpoint +for the v1 cluster profiles packs ref update operation typically these are written to a http.Request +*/ +type V1ClusterProfilesPacksRefUpdateParams struct { + + /*Body*/ + Body *models.V1ClusterProfileNotificationUpdateEntity + /*Notify + Cluster profile notification uid + + */ + Notify *string + /*UID + Cluster profile uid + + */ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cluster profiles packs ref update params +func (o *V1ClusterProfilesPacksRefUpdateParams) WithTimeout(timeout time.Duration) *V1ClusterProfilesPacksRefUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cluster profiles packs ref update params +func (o *V1ClusterProfilesPacksRefUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cluster profiles packs ref update params +func (o *V1ClusterProfilesPacksRefUpdateParams) WithContext(ctx context.Context) *V1ClusterProfilesPacksRefUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cluster profiles packs ref update params +func (o *V1ClusterProfilesPacksRefUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cluster profiles packs ref update params +func (o *V1ClusterProfilesPacksRefUpdateParams) WithHTTPClient(client *http.Client) *V1ClusterProfilesPacksRefUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cluster profiles packs ref update params +func (o *V1ClusterProfilesPacksRefUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 cluster profiles packs ref update params +func (o *V1ClusterProfilesPacksRefUpdateParams) WithBody(body *models.V1ClusterProfileNotificationUpdateEntity) *V1ClusterProfilesPacksRefUpdateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 cluster profiles packs ref update params +func (o *V1ClusterProfilesPacksRefUpdateParams) SetBody(body *models.V1ClusterProfileNotificationUpdateEntity) { + o.Body = body +} + +// WithNotify adds the notify to the v1 cluster profiles packs ref update params +func (o *V1ClusterProfilesPacksRefUpdateParams) WithNotify(notify *string) *V1ClusterProfilesPacksRefUpdateParams { + o.SetNotify(notify) + return o +} + +// SetNotify adds the notify to the v1 cluster profiles packs ref update params +func (o *V1ClusterProfilesPacksRefUpdateParams) SetNotify(notify *string) { + o.Notify = notify +} + +// WithUID adds the uid to the v1 cluster profiles packs ref update params +func (o *V1ClusterProfilesPacksRefUpdateParams) WithUID(uid string) *V1ClusterProfilesPacksRefUpdateParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 cluster profiles packs ref update params +func (o *V1ClusterProfilesPacksRefUpdateParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1ClusterProfilesPacksRefUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + if o.Notify != nil { + + // query param notify + var qrNotify string + if o.Notify != nil { + qrNotify = *o.Notify + } + qNotify := qrNotify + if qNotify != "" { + if err := r.SetQueryParam("notify", qNotify); err != nil { + return err + } + } + + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cluster_profiles_packs_ref_update_responses.go b/api/client/v1/v1_cluster_profiles_packs_ref_update_responses.go new file mode 100644 index 00000000..91a6cec3 --- /dev/null +++ b/api/client/v1/v1_cluster_profiles_packs_ref_update_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1ClusterProfilesPacksRefUpdateReader is a Reader for the V1ClusterProfilesPacksRefUpdate structure. +type V1ClusterProfilesPacksRefUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1ClusterProfilesPacksRefUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1ClusterProfilesPacksRefUpdateNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1ClusterProfilesPacksRefUpdateNoContent creates a V1ClusterProfilesPacksRefUpdateNoContent with default headers values +func NewV1ClusterProfilesPacksRefUpdateNoContent() *V1ClusterProfilesPacksRefUpdateNoContent { + return &V1ClusterProfilesPacksRefUpdateNoContent{} +} + +/* +V1ClusterProfilesPacksRefUpdateNoContent handles this case with default header values. + +The resource was updated successfully +*/ +type V1ClusterProfilesPacksRefUpdateNoContent struct { +} + +func (o *V1ClusterProfilesPacksRefUpdateNoContent) Error() string { + return fmt.Sprintf("[PATCH /v1/clusterprofiles/{uid}/packRefs][%d] v1ClusterProfilesPacksRefUpdateNoContent ", 204) +} + +func (o *V1ClusterProfilesPacksRefUpdateNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_cluster_profiles_publish_parameters.go b/api/client/v1/v1_cluster_profiles_publish_parameters.go new file mode 100644 index 00000000..c8209834 --- /dev/null +++ b/api/client/v1/v1_cluster_profiles_publish_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1ClusterProfilesPublishParams creates a new V1ClusterProfilesPublishParams object +// with the default values initialized. +func NewV1ClusterProfilesPublishParams() *V1ClusterProfilesPublishParams { + var () + return &V1ClusterProfilesPublishParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1ClusterProfilesPublishParamsWithTimeout creates a new V1ClusterProfilesPublishParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1ClusterProfilesPublishParamsWithTimeout(timeout time.Duration) *V1ClusterProfilesPublishParams { + var () + return &V1ClusterProfilesPublishParams{ + + timeout: timeout, + } +} + +// NewV1ClusterProfilesPublishParamsWithContext creates a new V1ClusterProfilesPublishParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1ClusterProfilesPublishParamsWithContext(ctx context.Context) *V1ClusterProfilesPublishParams { + var () + return &V1ClusterProfilesPublishParams{ + + Context: ctx, + } +} + +// NewV1ClusterProfilesPublishParamsWithHTTPClient creates a new V1ClusterProfilesPublishParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1ClusterProfilesPublishParamsWithHTTPClient(client *http.Client) *V1ClusterProfilesPublishParams { + var () + return &V1ClusterProfilesPublishParams{ + HTTPClient: client, + } +} + +/* +V1ClusterProfilesPublishParams contains all the parameters to send to the API endpoint +for the v1 cluster profiles publish operation typically these are written to a http.Request +*/ +type V1ClusterProfilesPublishParams struct { + + /*UID + Cluster profile uid + + */ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cluster profiles publish params +func (o *V1ClusterProfilesPublishParams) WithTimeout(timeout time.Duration) *V1ClusterProfilesPublishParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cluster profiles publish params +func (o *V1ClusterProfilesPublishParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cluster profiles publish params +func (o *V1ClusterProfilesPublishParams) WithContext(ctx context.Context) *V1ClusterProfilesPublishParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cluster profiles publish params +func (o *V1ClusterProfilesPublishParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cluster profiles publish params +func (o *V1ClusterProfilesPublishParams) WithHTTPClient(client *http.Client) *V1ClusterProfilesPublishParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cluster profiles publish params +func (o *V1ClusterProfilesPublishParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithUID adds the uid to the v1 cluster profiles publish params +func (o *V1ClusterProfilesPublishParams) WithUID(uid string) *V1ClusterProfilesPublishParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 cluster profiles publish params +func (o *V1ClusterProfilesPublishParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1ClusterProfilesPublishParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cluster_profiles_publish_responses.go b/api/client/v1/v1_cluster_profiles_publish_responses.go new file mode 100644 index 00000000..34ca096b --- /dev/null +++ b/api/client/v1/v1_cluster_profiles_publish_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1ClusterProfilesPublishReader is a Reader for the V1ClusterProfilesPublish structure. +type V1ClusterProfilesPublishReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1ClusterProfilesPublishReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1ClusterProfilesPublishNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1ClusterProfilesPublishNoContent creates a V1ClusterProfilesPublishNoContent with default headers values +func NewV1ClusterProfilesPublishNoContent() *V1ClusterProfilesPublishNoContent { + return &V1ClusterProfilesPublishNoContent{} +} + +/* +V1ClusterProfilesPublishNoContent handles this case with default header values. + +Cluster profile published successfully +*/ +type V1ClusterProfilesPublishNoContent struct { +} + +func (o *V1ClusterProfilesPublishNoContent) Error() string { + return fmt.Sprintf("[PATCH /v1/clusterprofiles/{uid}/publish][%d] v1ClusterProfilesPublishNoContent ", 204) +} + +func (o *V1ClusterProfilesPublishNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_cluster_profiles_uid_clone_parameters.go b/api/client/v1/v1_cluster_profiles_uid_clone_parameters.go new file mode 100644 index 00000000..7f03939a --- /dev/null +++ b/api/client/v1/v1_cluster_profiles_uid_clone_parameters.go @@ -0,0 +1,157 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1ClusterProfilesUIDCloneParams creates a new V1ClusterProfilesUIDCloneParams object +// with the default values initialized. +func NewV1ClusterProfilesUIDCloneParams() *V1ClusterProfilesUIDCloneParams { + var () + return &V1ClusterProfilesUIDCloneParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1ClusterProfilesUIDCloneParamsWithTimeout creates a new V1ClusterProfilesUIDCloneParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1ClusterProfilesUIDCloneParamsWithTimeout(timeout time.Duration) *V1ClusterProfilesUIDCloneParams { + var () + return &V1ClusterProfilesUIDCloneParams{ + + timeout: timeout, + } +} + +// NewV1ClusterProfilesUIDCloneParamsWithContext creates a new V1ClusterProfilesUIDCloneParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1ClusterProfilesUIDCloneParamsWithContext(ctx context.Context) *V1ClusterProfilesUIDCloneParams { + var () + return &V1ClusterProfilesUIDCloneParams{ + + Context: ctx, + } +} + +// NewV1ClusterProfilesUIDCloneParamsWithHTTPClient creates a new V1ClusterProfilesUIDCloneParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1ClusterProfilesUIDCloneParamsWithHTTPClient(client *http.Client) *V1ClusterProfilesUIDCloneParams { + var () + return &V1ClusterProfilesUIDCloneParams{ + HTTPClient: client, + } +} + +/* +V1ClusterProfilesUIDCloneParams contains all the parameters to send to the API endpoint +for the v1 cluster profiles Uid clone operation typically these are written to a http.Request +*/ +type V1ClusterProfilesUIDCloneParams struct { + + /*Body*/ + Body *models.V1ClusterProfileCloneEntity + /*UID + Cluster profile uid + + */ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cluster profiles Uid clone params +func (o *V1ClusterProfilesUIDCloneParams) WithTimeout(timeout time.Duration) *V1ClusterProfilesUIDCloneParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cluster profiles Uid clone params +func (o *V1ClusterProfilesUIDCloneParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cluster profiles Uid clone params +func (o *V1ClusterProfilesUIDCloneParams) WithContext(ctx context.Context) *V1ClusterProfilesUIDCloneParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cluster profiles Uid clone params +func (o *V1ClusterProfilesUIDCloneParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cluster profiles Uid clone params +func (o *V1ClusterProfilesUIDCloneParams) WithHTTPClient(client *http.Client) *V1ClusterProfilesUIDCloneParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cluster profiles Uid clone params +func (o *V1ClusterProfilesUIDCloneParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 cluster profiles Uid clone params +func (o *V1ClusterProfilesUIDCloneParams) WithBody(body *models.V1ClusterProfileCloneEntity) *V1ClusterProfilesUIDCloneParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 cluster profiles Uid clone params +func (o *V1ClusterProfilesUIDCloneParams) SetBody(body *models.V1ClusterProfileCloneEntity) { + o.Body = body +} + +// WithUID adds the uid to the v1 cluster profiles Uid clone params +func (o *V1ClusterProfilesUIDCloneParams) WithUID(uid string) *V1ClusterProfilesUIDCloneParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 cluster profiles Uid clone params +func (o *V1ClusterProfilesUIDCloneParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1ClusterProfilesUIDCloneParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cluster_profiles_uid_clone_responses.go b/api/client/v1/v1_cluster_profiles_uid_clone_responses.go new file mode 100644 index 00000000..87b7b51d --- /dev/null +++ b/api/client/v1/v1_cluster_profiles_uid_clone_responses.go @@ -0,0 +1,77 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1ClusterProfilesUIDCloneReader is a Reader for the V1ClusterProfilesUIDClone structure. +type V1ClusterProfilesUIDCloneReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1ClusterProfilesUIDCloneReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 201: + result := NewV1ClusterProfilesUIDCloneCreated() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1ClusterProfilesUIDCloneCreated creates a V1ClusterProfilesUIDCloneCreated with default headers values +func NewV1ClusterProfilesUIDCloneCreated() *V1ClusterProfilesUIDCloneCreated { + return &V1ClusterProfilesUIDCloneCreated{} +} + +/* +V1ClusterProfilesUIDCloneCreated handles this case with default header values. + +Created successfully +*/ +type V1ClusterProfilesUIDCloneCreated struct { + /*Audit uid for the request + */ + AuditUID string + + Payload *models.V1UID +} + +func (o *V1ClusterProfilesUIDCloneCreated) Error() string { + return fmt.Sprintf("[POST /v1/clusterprofiles/{uid}/clone][%d] v1ClusterProfilesUidCloneCreated %+v", 201, o.Payload) +} + +func (o *V1ClusterProfilesUIDCloneCreated) GetPayload() *models.V1UID { + return o.Payload +} + +func (o *V1ClusterProfilesUIDCloneCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header AuditUid + o.AuditUID = response.GetHeader("AuditUid") + + o.Payload = new(models.V1UID) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_cluster_profiles_uid_clone_validate_parameters.go b/api/client/v1/v1_cluster_profiles_uid_clone_validate_parameters.go new file mode 100644 index 00000000..a6a4f93e --- /dev/null +++ b/api/client/v1/v1_cluster_profiles_uid_clone_validate_parameters.go @@ -0,0 +1,157 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1ClusterProfilesUIDCloneValidateParams creates a new V1ClusterProfilesUIDCloneValidateParams object +// with the default values initialized. +func NewV1ClusterProfilesUIDCloneValidateParams() *V1ClusterProfilesUIDCloneValidateParams { + var () + return &V1ClusterProfilesUIDCloneValidateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1ClusterProfilesUIDCloneValidateParamsWithTimeout creates a new V1ClusterProfilesUIDCloneValidateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1ClusterProfilesUIDCloneValidateParamsWithTimeout(timeout time.Duration) *V1ClusterProfilesUIDCloneValidateParams { + var () + return &V1ClusterProfilesUIDCloneValidateParams{ + + timeout: timeout, + } +} + +// NewV1ClusterProfilesUIDCloneValidateParamsWithContext creates a new V1ClusterProfilesUIDCloneValidateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1ClusterProfilesUIDCloneValidateParamsWithContext(ctx context.Context) *V1ClusterProfilesUIDCloneValidateParams { + var () + return &V1ClusterProfilesUIDCloneValidateParams{ + + Context: ctx, + } +} + +// NewV1ClusterProfilesUIDCloneValidateParamsWithHTTPClient creates a new V1ClusterProfilesUIDCloneValidateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1ClusterProfilesUIDCloneValidateParamsWithHTTPClient(client *http.Client) *V1ClusterProfilesUIDCloneValidateParams { + var () + return &V1ClusterProfilesUIDCloneValidateParams{ + HTTPClient: client, + } +} + +/* +V1ClusterProfilesUIDCloneValidateParams contains all the parameters to send to the API endpoint +for the v1 cluster profiles Uid clone validate operation typically these are written to a http.Request +*/ +type V1ClusterProfilesUIDCloneValidateParams struct { + + /*Body*/ + Body *models.V1ClusterProfileCloneMetaInputEntity + /*UID + Cluster profile uid + + */ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cluster profiles Uid clone validate params +func (o *V1ClusterProfilesUIDCloneValidateParams) WithTimeout(timeout time.Duration) *V1ClusterProfilesUIDCloneValidateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cluster profiles Uid clone validate params +func (o *V1ClusterProfilesUIDCloneValidateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cluster profiles Uid clone validate params +func (o *V1ClusterProfilesUIDCloneValidateParams) WithContext(ctx context.Context) *V1ClusterProfilesUIDCloneValidateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cluster profiles Uid clone validate params +func (o *V1ClusterProfilesUIDCloneValidateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cluster profiles Uid clone validate params +func (o *V1ClusterProfilesUIDCloneValidateParams) WithHTTPClient(client *http.Client) *V1ClusterProfilesUIDCloneValidateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cluster profiles Uid clone validate params +func (o *V1ClusterProfilesUIDCloneValidateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 cluster profiles Uid clone validate params +func (o *V1ClusterProfilesUIDCloneValidateParams) WithBody(body *models.V1ClusterProfileCloneMetaInputEntity) *V1ClusterProfilesUIDCloneValidateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 cluster profiles Uid clone validate params +func (o *V1ClusterProfilesUIDCloneValidateParams) SetBody(body *models.V1ClusterProfileCloneMetaInputEntity) { + o.Body = body +} + +// WithUID adds the uid to the v1 cluster profiles Uid clone validate params +func (o *V1ClusterProfilesUIDCloneValidateParams) WithUID(uid string) *V1ClusterProfilesUIDCloneValidateParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 cluster profiles Uid clone validate params +func (o *V1ClusterProfilesUIDCloneValidateParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1ClusterProfilesUIDCloneValidateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cluster_profiles_uid_clone_validate_responses.go b/api/client/v1/v1_cluster_profiles_uid_clone_validate_responses.go new file mode 100644 index 00000000..a66e09db --- /dev/null +++ b/api/client/v1/v1_cluster_profiles_uid_clone_validate_responses.go @@ -0,0 +1,61 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1ClusterProfilesUIDCloneValidateReader is a Reader for the V1ClusterProfilesUIDCloneValidate structure. +type V1ClusterProfilesUIDCloneValidateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1ClusterProfilesUIDCloneValidateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1ClusterProfilesUIDCloneValidateNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1ClusterProfilesUIDCloneValidateNoContent creates a V1ClusterProfilesUIDCloneValidateNoContent with default headers values +func NewV1ClusterProfilesUIDCloneValidateNoContent() *V1ClusterProfilesUIDCloneValidateNoContent { + return &V1ClusterProfilesUIDCloneValidateNoContent{} +} + +/* +V1ClusterProfilesUIDCloneValidateNoContent handles this case with default header values. + +Ok response without content +*/ +type V1ClusterProfilesUIDCloneValidateNoContent struct { + /*Audit uid for the request + */ + AuditUID string +} + +func (o *V1ClusterProfilesUIDCloneValidateNoContent) Error() string { + return fmt.Sprintf("[POST /v1/clusterprofiles/{uid}/clone/validate][%d] v1ClusterProfilesUidCloneValidateNoContent ", 204) +} + +func (o *V1ClusterProfilesUIDCloneValidateNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header AuditUid + o.AuditUID = response.GetHeader("AuditUid") + + return nil +} diff --git a/api/client/v1/v1_cluster_profiles_uid_export_parameters.go b/api/client/v1/v1_cluster_profiles_uid_export_parameters.go new file mode 100644 index 00000000..e159a04e --- /dev/null +++ b/api/client/v1/v1_cluster_profiles_uid_export_parameters.go @@ -0,0 +1,180 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1ClusterProfilesUIDExportParams creates a new V1ClusterProfilesUIDExportParams object +// with the default values initialized. +func NewV1ClusterProfilesUIDExportParams() *V1ClusterProfilesUIDExportParams { + var ( + formatDefault = string("json") + ) + return &V1ClusterProfilesUIDExportParams{ + Format: &formatDefault, + + timeout: cr.DefaultTimeout, + } +} + +// NewV1ClusterProfilesUIDExportParamsWithTimeout creates a new V1ClusterProfilesUIDExportParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1ClusterProfilesUIDExportParamsWithTimeout(timeout time.Duration) *V1ClusterProfilesUIDExportParams { + var ( + formatDefault = string("json") + ) + return &V1ClusterProfilesUIDExportParams{ + Format: &formatDefault, + + timeout: timeout, + } +} + +// NewV1ClusterProfilesUIDExportParamsWithContext creates a new V1ClusterProfilesUIDExportParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1ClusterProfilesUIDExportParamsWithContext(ctx context.Context) *V1ClusterProfilesUIDExportParams { + var ( + formatDefault = string("json") + ) + return &V1ClusterProfilesUIDExportParams{ + Format: &formatDefault, + + Context: ctx, + } +} + +// NewV1ClusterProfilesUIDExportParamsWithHTTPClient creates a new V1ClusterProfilesUIDExportParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1ClusterProfilesUIDExportParamsWithHTTPClient(client *http.Client) *V1ClusterProfilesUIDExportParams { + var ( + formatDefault = string("json") + ) + return &V1ClusterProfilesUIDExportParams{ + Format: &formatDefault, + HTTPClient: client, + } +} + +/* +V1ClusterProfilesUIDExportParams contains all the parameters to send to the API endpoint +for the v1 cluster profiles Uid export operation typically these are written to a http.Request +*/ +type V1ClusterProfilesUIDExportParams struct { + + /*Format + Cluster profile export file format [ "yaml", "json" ] + + */ + Format *string + /*UID + Cluster profile uid + + */ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cluster profiles Uid export params +func (o *V1ClusterProfilesUIDExportParams) WithTimeout(timeout time.Duration) *V1ClusterProfilesUIDExportParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cluster profiles Uid export params +func (o *V1ClusterProfilesUIDExportParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cluster profiles Uid export params +func (o *V1ClusterProfilesUIDExportParams) WithContext(ctx context.Context) *V1ClusterProfilesUIDExportParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cluster profiles Uid export params +func (o *V1ClusterProfilesUIDExportParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cluster profiles Uid export params +func (o *V1ClusterProfilesUIDExportParams) WithHTTPClient(client *http.Client) *V1ClusterProfilesUIDExportParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cluster profiles Uid export params +func (o *V1ClusterProfilesUIDExportParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithFormat adds the format to the v1 cluster profiles Uid export params +func (o *V1ClusterProfilesUIDExportParams) WithFormat(format *string) *V1ClusterProfilesUIDExportParams { + o.SetFormat(format) + return o +} + +// SetFormat adds the format to the v1 cluster profiles Uid export params +func (o *V1ClusterProfilesUIDExportParams) SetFormat(format *string) { + o.Format = format +} + +// WithUID adds the uid to the v1 cluster profiles Uid export params +func (o *V1ClusterProfilesUIDExportParams) WithUID(uid string) *V1ClusterProfilesUIDExportParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 cluster profiles Uid export params +func (o *V1ClusterProfilesUIDExportParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1ClusterProfilesUIDExportParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Format != nil { + + // query param format + var qrFormat string + if o.Format != nil { + qrFormat = *o.Format + } + qFormat := qrFormat + if qFormat != "" { + if err := r.SetQueryParam("format", qFormat); err != nil { + return err + } + } + + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cluster_profiles_uid_export_responses.go b/api/client/v1/v1_cluster_profiles_uid_export_responses.go new file mode 100644 index 00000000..9c3c4149 --- /dev/null +++ b/api/client/v1/v1_cluster_profiles_uid_export_responses.go @@ -0,0 +1,74 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1ClusterProfilesUIDExportReader is a Reader for the V1ClusterProfilesUIDExport structure. +type V1ClusterProfilesUIDExportReader struct { + formats strfmt.Registry + writer io.Writer +} + +// ReadResponse reads a server response into the received o. +func (o *V1ClusterProfilesUIDExportReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1ClusterProfilesUIDExportOK(o.writer) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1ClusterProfilesUIDExportOK creates a V1ClusterProfilesUIDExportOK with default headers values +func NewV1ClusterProfilesUIDExportOK(writer io.Writer) *V1ClusterProfilesUIDExportOK { + return &V1ClusterProfilesUIDExportOK{ + Payload: writer, + } +} + +/* +V1ClusterProfilesUIDExportOK handles this case with default header values. + +Exports cluster profile as a file +*/ +type V1ClusterProfilesUIDExportOK struct { + ContentDisposition string + + Payload io.Writer +} + +func (o *V1ClusterProfilesUIDExportOK) Error() string { + return fmt.Sprintf("[GET /v1/clusterprofiles/{uid}/export][%d] v1ClusterProfilesUidExportOK %+v", 200, o.Payload) +} + +func (o *V1ClusterProfilesUIDExportOK) GetPayload() io.Writer { + return o.Payload +} + +func (o *V1ClusterProfilesUIDExportOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Content-Disposition + o.ContentDisposition = response.GetHeader("Content-Disposition") + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_cluster_profiles_uid_export_terraform_parameters.go b/api/client/v1/v1_cluster_profiles_uid_export_terraform_parameters.go new file mode 100644 index 00000000..ef19417e --- /dev/null +++ b/api/client/v1/v1_cluster_profiles_uid_export_terraform_parameters.go @@ -0,0 +1,180 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1ClusterProfilesUIDExportTerraformParams creates a new V1ClusterProfilesUIDExportTerraformParams object +// with the default values initialized. +func NewV1ClusterProfilesUIDExportTerraformParams() *V1ClusterProfilesUIDExportTerraformParams { + var ( + formatDefault = string("yaml") + ) + return &V1ClusterProfilesUIDExportTerraformParams{ + Format: &formatDefault, + + timeout: cr.DefaultTimeout, + } +} + +// NewV1ClusterProfilesUIDExportTerraformParamsWithTimeout creates a new V1ClusterProfilesUIDExportTerraformParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1ClusterProfilesUIDExportTerraformParamsWithTimeout(timeout time.Duration) *V1ClusterProfilesUIDExportTerraformParams { + var ( + formatDefault = string("yaml") + ) + return &V1ClusterProfilesUIDExportTerraformParams{ + Format: &formatDefault, + + timeout: timeout, + } +} + +// NewV1ClusterProfilesUIDExportTerraformParamsWithContext creates a new V1ClusterProfilesUIDExportTerraformParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1ClusterProfilesUIDExportTerraformParamsWithContext(ctx context.Context) *V1ClusterProfilesUIDExportTerraformParams { + var ( + formatDefault = string("yaml") + ) + return &V1ClusterProfilesUIDExportTerraformParams{ + Format: &formatDefault, + + Context: ctx, + } +} + +// NewV1ClusterProfilesUIDExportTerraformParamsWithHTTPClient creates a new V1ClusterProfilesUIDExportTerraformParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1ClusterProfilesUIDExportTerraformParamsWithHTTPClient(client *http.Client) *V1ClusterProfilesUIDExportTerraformParams { + var ( + formatDefault = string("yaml") + ) + return &V1ClusterProfilesUIDExportTerraformParams{ + Format: &formatDefault, + HTTPClient: client, + } +} + +/* +V1ClusterProfilesUIDExportTerraformParams contains all the parameters to send to the API endpoint +for the v1 cluster profiles Uid export terraform operation typically these are written to a http.Request +*/ +type V1ClusterProfilesUIDExportTerraformParams struct { + + /*Format + Cluster profile export file format [ "yaml", "json" ] + + */ + Format *string + /*UID + Cluster profile uid + + */ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cluster profiles Uid export terraform params +func (o *V1ClusterProfilesUIDExportTerraformParams) WithTimeout(timeout time.Duration) *V1ClusterProfilesUIDExportTerraformParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cluster profiles Uid export terraform params +func (o *V1ClusterProfilesUIDExportTerraformParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cluster profiles Uid export terraform params +func (o *V1ClusterProfilesUIDExportTerraformParams) WithContext(ctx context.Context) *V1ClusterProfilesUIDExportTerraformParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cluster profiles Uid export terraform params +func (o *V1ClusterProfilesUIDExportTerraformParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cluster profiles Uid export terraform params +func (o *V1ClusterProfilesUIDExportTerraformParams) WithHTTPClient(client *http.Client) *V1ClusterProfilesUIDExportTerraformParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cluster profiles Uid export terraform params +func (o *V1ClusterProfilesUIDExportTerraformParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithFormat adds the format to the v1 cluster profiles Uid export terraform params +func (o *V1ClusterProfilesUIDExportTerraformParams) WithFormat(format *string) *V1ClusterProfilesUIDExportTerraformParams { + o.SetFormat(format) + return o +} + +// SetFormat adds the format to the v1 cluster profiles Uid export terraform params +func (o *V1ClusterProfilesUIDExportTerraformParams) SetFormat(format *string) { + o.Format = format +} + +// WithUID adds the uid to the v1 cluster profiles Uid export terraform params +func (o *V1ClusterProfilesUIDExportTerraformParams) WithUID(uid string) *V1ClusterProfilesUIDExportTerraformParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 cluster profiles Uid export terraform params +func (o *V1ClusterProfilesUIDExportTerraformParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1ClusterProfilesUIDExportTerraformParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Format != nil { + + // query param format + var qrFormat string + if o.Format != nil { + qrFormat = *o.Format + } + qFormat := qrFormat + if qFormat != "" { + if err := r.SetQueryParam("format", qFormat); err != nil { + return err + } + } + + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cluster_profiles_uid_export_terraform_responses.go b/api/client/v1/v1_cluster_profiles_uid_export_terraform_responses.go new file mode 100644 index 00000000..e5fa9041 --- /dev/null +++ b/api/client/v1/v1_cluster_profiles_uid_export_terraform_responses.go @@ -0,0 +1,74 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1ClusterProfilesUIDExportTerraformReader is a Reader for the V1ClusterProfilesUIDExportTerraform structure. +type V1ClusterProfilesUIDExportTerraformReader struct { + formats strfmt.Registry + writer io.Writer +} + +// ReadResponse reads a server response into the received o. +func (o *V1ClusterProfilesUIDExportTerraformReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1ClusterProfilesUIDExportTerraformOK(o.writer) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1ClusterProfilesUIDExportTerraformOK creates a V1ClusterProfilesUIDExportTerraformOK with default headers values +func NewV1ClusterProfilesUIDExportTerraformOK(writer io.Writer) *V1ClusterProfilesUIDExportTerraformOK { + return &V1ClusterProfilesUIDExportTerraformOK{ + Payload: writer, + } +} + +/* +V1ClusterProfilesUIDExportTerraformOK handles this case with default header values. + +Downloads cluster profile export file +*/ +type V1ClusterProfilesUIDExportTerraformOK struct { + ContentDisposition string + + Payload io.Writer +} + +func (o *V1ClusterProfilesUIDExportTerraformOK) Error() string { + return fmt.Sprintf("[GET /v1/clusterprofiles/{uid}/export/terraform][%d] v1ClusterProfilesUidExportTerraformOK %+v", 200, o.Payload) +} + +func (o *V1ClusterProfilesUIDExportTerraformOK) GetPayload() io.Writer { + return o.Payload +} + +func (o *V1ClusterProfilesUIDExportTerraformOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Content-Disposition + o.ContentDisposition = response.GetHeader("Content-Disposition") + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_cluster_profiles_uid_metadata_update_parameters.go b/api/client/v1/v1_cluster_profiles_uid_metadata_update_parameters.go new file mode 100644 index 00000000..d58ce5db --- /dev/null +++ b/api/client/v1/v1_cluster_profiles_uid_metadata_update_parameters.go @@ -0,0 +1,157 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1ClusterProfilesUIDMetadataUpdateParams creates a new V1ClusterProfilesUIDMetadataUpdateParams object +// with the default values initialized. +func NewV1ClusterProfilesUIDMetadataUpdateParams() *V1ClusterProfilesUIDMetadataUpdateParams { + var () + return &V1ClusterProfilesUIDMetadataUpdateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1ClusterProfilesUIDMetadataUpdateParamsWithTimeout creates a new V1ClusterProfilesUIDMetadataUpdateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1ClusterProfilesUIDMetadataUpdateParamsWithTimeout(timeout time.Duration) *V1ClusterProfilesUIDMetadataUpdateParams { + var () + return &V1ClusterProfilesUIDMetadataUpdateParams{ + + timeout: timeout, + } +} + +// NewV1ClusterProfilesUIDMetadataUpdateParamsWithContext creates a new V1ClusterProfilesUIDMetadataUpdateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1ClusterProfilesUIDMetadataUpdateParamsWithContext(ctx context.Context) *V1ClusterProfilesUIDMetadataUpdateParams { + var () + return &V1ClusterProfilesUIDMetadataUpdateParams{ + + Context: ctx, + } +} + +// NewV1ClusterProfilesUIDMetadataUpdateParamsWithHTTPClient creates a new V1ClusterProfilesUIDMetadataUpdateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1ClusterProfilesUIDMetadataUpdateParamsWithHTTPClient(client *http.Client) *V1ClusterProfilesUIDMetadataUpdateParams { + var () + return &V1ClusterProfilesUIDMetadataUpdateParams{ + HTTPClient: client, + } +} + +/* +V1ClusterProfilesUIDMetadataUpdateParams contains all the parameters to send to the API endpoint +for the v1 cluster profiles Uid metadata update operation typically these are written to a http.Request +*/ +type V1ClusterProfilesUIDMetadataUpdateParams struct { + + /*Body*/ + Body *models.V1ProfileMetaEntity + /*UID + Cluster profile uid + + */ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cluster profiles Uid metadata update params +func (o *V1ClusterProfilesUIDMetadataUpdateParams) WithTimeout(timeout time.Duration) *V1ClusterProfilesUIDMetadataUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cluster profiles Uid metadata update params +func (o *V1ClusterProfilesUIDMetadataUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cluster profiles Uid metadata update params +func (o *V1ClusterProfilesUIDMetadataUpdateParams) WithContext(ctx context.Context) *V1ClusterProfilesUIDMetadataUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cluster profiles Uid metadata update params +func (o *V1ClusterProfilesUIDMetadataUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cluster profiles Uid metadata update params +func (o *V1ClusterProfilesUIDMetadataUpdateParams) WithHTTPClient(client *http.Client) *V1ClusterProfilesUIDMetadataUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cluster profiles Uid metadata update params +func (o *V1ClusterProfilesUIDMetadataUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 cluster profiles Uid metadata update params +func (o *V1ClusterProfilesUIDMetadataUpdateParams) WithBody(body *models.V1ProfileMetaEntity) *V1ClusterProfilesUIDMetadataUpdateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 cluster profiles Uid metadata update params +func (o *V1ClusterProfilesUIDMetadataUpdateParams) SetBody(body *models.V1ProfileMetaEntity) { + o.Body = body +} + +// WithUID adds the uid to the v1 cluster profiles Uid metadata update params +func (o *V1ClusterProfilesUIDMetadataUpdateParams) WithUID(uid string) *V1ClusterProfilesUIDMetadataUpdateParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 cluster profiles Uid metadata update params +func (o *V1ClusterProfilesUIDMetadataUpdateParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1ClusterProfilesUIDMetadataUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cluster_profiles_uid_metadata_update_responses.go b/api/client/v1/v1_cluster_profiles_uid_metadata_update_responses.go new file mode 100644 index 00000000..9b17c737 --- /dev/null +++ b/api/client/v1/v1_cluster_profiles_uid_metadata_update_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1ClusterProfilesUIDMetadataUpdateReader is a Reader for the V1ClusterProfilesUIDMetadataUpdate structure. +type V1ClusterProfilesUIDMetadataUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1ClusterProfilesUIDMetadataUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1ClusterProfilesUIDMetadataUpdateNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1ClusterProfilesUIDMetadataUpdateNoContent creates a V1ClusterProfilesUIDMetadataUpdateNoContent with default headers values +func NewV1ClusterProfilesUIDMetadataUpdateNoContent() *V1ClusterProfilesUIDMetadataUpdateNoContent { + return &V1ClusterProfilesUIDMetadataUpdateNoContent{} +} + +/* +V1ClusterProfilesUIDMetadataUpdateNoContent handles this case with default header values. + +The resource was updated successfully +*/ +type V1ClusterProfilesUIDMetadataUpdateNoContent struct { +} + +func (o *V1ClusterProfilesUIDMetadataUpdateNoContent) Error() string { + return fmt.Sprintf("[PATCH /v1/clusterprofiles/{uid}/metadata][%d] v1ClusterProfilesUidMetadataUpdateNoContent ", 204) +} + +func (o *V1ClusterProfilesUIDMetadataUpdateNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_cluster_profiles_uid_packs_add_parameters.go b/api/client/v1/v1_cluster_profiles_uid_packs_add_parameters.go new file mode 100644 index 00000000..4d945387 --- /dev/null +++ b/api/client/v1/v1_cluster_profiles_uid_packs_add_parameters.go @@ -0,0 +1,189 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1ClusterProfilesUIDPacksAddParams creates a new V1ClusterProfilesUIDPacksAddParams object +// with the default values initialized. +func NewV1ClusterProfilesUIDPacksAddParams() *V1ClusterProfilesUIDPacksAddParams { + var () + return &V1ClusterProfilesUIDPacksAddParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1ClusterProfilesUIDPacksAddParamsWithTimeout creates a new V1ClusterProfilesUIDPacksAddParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1ClusterProfilesUIDPacksAddParamsWithTimeout(timeout time.Duration) *V1ClusterProfilesUIDPacksAddParams { + var () + return &V1ClusterProfilesUIDPacksAddParams{ + + timeout: timeout, + } +} + +// NewV1ClusterProfilesUIDPacksAddParamsWithContext creates a new V1ClusterProfilesUIDPacksAddParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1ClusterProfilesUIDPacksAddParamsWithContext(ctx context.Context) *V1ClusterProfilesUIDPacksAddParams { + var () + return &V1ClusterProfilesUIDPacksAddParams{ + + Context: ctx, + } +} + +// NewV1ClusterProfilesUIDPacksAddParamsWithHTTPClient creates a new V1ClusterProfilesUIDPacksAddParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1ClusterProfilesUIDPacksAddParamsWithHTTPClient(client *http.Client) *V1ClusterProfilesUIDPacksAddParams { + var () + return &V1ClusterProfilesUIDPacksAddParams{ + HTTPClient: client, + } +} + +/* +V1ClusterProfilesUIDPacksAddParams contains all the parameters to send to the API endpoint +for the v1 cluster profiles Uid packs add operation typically these are written to a http.Request +*/ +type V1ClusterProfilesUIDPacksAddParams struct { + + /*Body*/ + Body *models.V1PackInputEntity + /*IncludePackMeta + Comma seperated pack meta such as schema, presets + + */ + IncludePackMeta *string + /*UID + Cluster profile uid + + */ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cluster profiles Uid packs add params +func (o *V1ClusterProfilesUIDPacksAddParams) WithTimeout(timeout time.Duration) *V1ClusterProfilesUIDPacksAddParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cluster profiles Uid packs add params +func (o *V1ClusterProfilesUIDPacksAddParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cluster profiles Uid packs add params +func (o *V1ClusterProfilesUIDPacksAddParams) WithContext(ctx context.Context) *V1ClusterProfilesUIDPacksAddParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cluster profiles Uid packs add params +func (o *V1ClusterProfilesUIDPacksAddParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cluster profiles Uid packs add params +func (o *V1ClusterProfilesUIDPacksAddParams) WithHTTPClient(client *http.Client) *V1ClusterProfilesUIDPacksAddParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cluster profiles Uid packs add params +func (o *V1ClusterProfilesUIDPacksAddParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 cluster profiles Uid packs add params +func (o *V1ClusterProfilesUIDPacksAddParams) WithBody(body *models.V1PackInputEntity) *V1ClusterProfilesUIDPacksAddParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 cluster profiles Uid packs add params +func (o *V1ClusterProfilesUIDPacksAddParams) SetBody(body *models.V1PackInputEntity) { + o.Body = body +} + +// WithIncludePackMeta adds the includePackMeta to the v1 cluster profiles Uid packs add params +func (o *V1ClusterProfilesUIDPacksAddParams) WithIncludePackMeta(includePackMeta *string) *V1ClusterProfilesUIDPacksAddParams { + o.SetIncludePackMeta(includePackMeta) + return o +} + +// SetIncludePackMeta adds the includePackMeta to the v1 cluster profiles Uid packs add params +func (o *V1ClusterProfilesUIDPacksAddParams) SetIncludePackMeta(includePackMeta *string) { + o.IncludePackMeta = includePackMeta +} + +// WithUID adds the uid to the v1 cluster profiles Uid packs add params +func (o *V1ClusterProfilesUIDPacksAddParams) WithUID(uid string) *V1ClusterProfilesUIDPacksAddParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 cluster profiles Uid packs add params +func (o *V1ClusterProfilesUIDPacksAddParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1ClusterProfilesUIDPacksAddParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + if o.IncludePackMeta != nil { + + // query param includePackMeta + var qrIncludePackMeta string + if o.IncludePackMeta != nil { + qrIncludePackMeta = *o.IncludePackMeta + } + qIncludePackMeta := qrIncludePackMeta + if qIncludePackMeta != "" { + if err := r.SetQueryParam("includePackMeta", qIncludePackMeta); err != nil { + return err + } + } + + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cluster_profiles_uid_packs_add_responses.go b/api/client/v1/v1_cluster_profiles_uid_packs_add_responses.go new file mode 100644 index 00000000..7420a05b --- /dev/null +++ b/api/client/v1/v1_cluster_profiles_uid_packs_add_responses.go @@ -0,0 +1,77 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1ClusterProfilesUIDPacksAddReader is a Reader for the V1ClusterProfilesUIDPacksAdd structure. +type V1ClusterProfilesUIDPacksAddReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1ClusterProfilesUIDPacksAddReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 201: + result := NewV1ClusterProfilesUIDPacksAddCreated() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1ClusterProfilesUIDPacksAddCreated creates a V1ClusterProfilesUIDPacksAddCreated with default headers values +func NewV1ClusterProfilesUIDPacksAddCreated() *V1ClusterProfilesUIDPacksAddCreated { + return &V1ClusterProfilesUIDPacksAddCreated{} +} + +/* +V1ClusterProfilesUIDPacksAddCreated handles this case with default header values. + +Created successfully +*/ +type V1ClusterProfilesUIDPacksAddCreated struct { + /*Audit uid for the request + */ + AuditUID string + + Payload *models.V1UID +} + +func (o *V1ClusterProfilesUIDPacksAddCreated) Error() string { + return fmt.Sprintf("[POST /v1/clusterprofiles/{uid}/packs][%d] v1ClusterProfilesUidPacksAddCreated %+v", 201, o.Payload) +} + +func (o *V1ClusterProfilesUIDPacksAddCreated) GetPayload() *models.V1UID { + return o.Payload +} + +func (o *V1ClusterProfilesUIDPacksAddCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header AuditUid + o.AuditUID = response.GetHeader("AuditUid") + + o.Payload = new(models.V1UID) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_cluster_profiles_uid_packs_config_get_parameters.go b/api/client/v1/v1_cluster_profiles_uid_packs_config_get_parameters.go new file mode 100644 index 00000000..ba0f55cf --- /dev/null +++ b/api/client/v1/v1_cluster_profiles_uid_packs_config_get_parameters.go @@ -0,0 +1,182 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1ClusterProfilesUIDPacksConfigGetParams creates a new V1ClusterProfilesUIDPacksConfigGetParams object +// with the default values initialized. +func NewV1ClusterProfilesUIDPacksConfigGetParams() *V1ClusterProfilesUIDPacksConfigGetParams { + var () + return &V1ClusterProfilesUIDPacksConfigGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1ClusterProfilesUIDPacksConfigGetParamsWithTimeout creates a new V1ClusterProfilesUIDPacksConfigGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1ClusterProfilesUIDPacksConfigGetParamsWithTimeout(timeout time.Duration) *V1ClusterProfilesUIDPacksConfigGetParams { + var () + return &V1ClusterProfilesUIDPacksConfigGetParams{ + + timeout: timeout, + } +} + +// NewV1ClusterProfilesUIDPacksConfigGetParamsWithContext creates a new V1ClusterProfilesUIDPacksConfigGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1ClusterProfilesUIDPacksConfigGetParamsWithContext(ctx context.Context) *V1ClusterProfilesUIDPacksConfigGetParams { + var () + return &V1ClusterProfilesUIDPacksConfigGetParams{ + + Context: ctx, + } +} + +// NewV1ClusterProfilesUIDPacksConfigGetParamsWithHTTPClient creates a new V1ClusterProfilesUIDPacksConfigGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1ClusterProfilesUIDPacksConfigGetParamsWithHTTPClient(client *http.Client) *V1ClusterProfilesUIDPacksConfigGetParams { + var () + return &V1ClusterProfilesUIDPacksConfigGetParams{ + HTTPClient: client, + } +} + +/* +V1ClusterProfilesUIDPacksConfigGetParams contains all the parameters to send to the API endpoint +for the v1 cluster profiles Uid packs config get operation typically these are written to a http.Request +*/ +type V1ClusterProfilesUIDPacksConfigGetParams struct { + + /*PackName + Cluster profile pack name + + */ + PackName string + /*PackUID + Cluster profile pack uid + + */ + PackUID string + /*UID + cluster profile uid + + */ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cluster profiles Uid packs config get params +func (o *V1ClusterProfilesUIDPacksConfigGetParams) WithTimeout(timeout time.Duration) *V1ClusterProfilesUIDPacksConfigGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cluster profiles Uid packs config get params +func (o *V1ClusterProfilesUIDPacksConfigGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cluster profiles Uid packs config get params +func (o *V1ClusterProfilesUIDPacksConfigGetParams) WithContext(ctx context.Context) *V1ClusterProfilesUIDPacksConfigGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cluster profiles Uid packs config get params +func (o *V1ClusterProfilesUIDPacksConfigGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cluster profiles Uid packs config get params +func (o *V1ClusterProfilesUIDPacksConfigGetParams) WithHTTPClient(client *http.Client) *V1ClusterProfilesUIDPacksConfigGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cluster profiles Uid packs config get params +func (o *V1ClusterProfilesUIDPacksConfigGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithPackName adds the packName to the v1 cluster profiles Uid packs config get params +func (o *V1ClusterProfilesUIDPacksConfigGetParams) WithPackName(packName string) *V1ClusterProfilesUIDPacksConfigGetParams { + o.SetPackName(packName) + return o +} + +// SetPackName adds the packName to the v1 cluster profiles Uid packs config get params +func (o *V1ClusterProfilesUIDPacksConfigGetParams) SetPackName(packName string) { + o.PackName = packName +} + +// WithPackUID adds the packUID to the v1 cluster profiles Uid packs config get params +func (o *V1ClusterProfilesUIDPacksConfigGetParams) WithPackUID(packUID string) *V1ClusterProfilesUIDPacksConfigGetParams { + o.SetPackUID(packUID) + return o +} + +// SetPackUID adds the packUid to the v1 cluster profiles Uid packs config get params +func (o *V1ClusterProfilesUIDPacksConfigGetParams) SetPackUID(packUID string) { + o.PackUID = packUID +} + +// WithUID adds the uid to the v1 cluster profiles Uid packs config get params +func (o *V1ClusterProfilesUIDPacksConfigGetParams) WithUID(uid string) *V1ClusterProfilesUIDPacksConfigGetParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 cluster profiles Uid packs config get params +func (o *V1ClusterProfilesUIDPacksConfigGetParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1ClusterProfilesUIDPacksConfigGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param packName + if err := r.SetPathParam("packName", o.PackName); err != nil { + return err + } + + // query param packUid + qrPackUID := o.PackUID + qPackUID := qrPackUID + if qPackUID != "" { + if err := r.SetQueryParam("packUid", qPackUID); err != nil { + return err + } + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cluster_profiles_uid_packs_config_get_responses.go b/api/client/v1/v1_cluster_profiles_uid_packs_config_get_responses.go new file mode 100644 index 00000000..ba9fb1bb --- /dev/null +++ b/api/client/v1/v1_cluster_profiles_uid_packs_config_get_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1ClusterProfilesUIDPacksConfigGetReader is a Reader for the V1ClusterProfilesUIDPacksConfigGet structure. +type V1ClusterProfilesUIDPacksConfigGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1ClusterProfilesUIDPacksConfigGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1ClusterProfilesUIDPacksConfigGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1ClusterProfilesUIDPacksConfigGetOK creates a V1ClusterProfilesUIDPacksConfigGetOK with default headers values +func NewV1ClusterProfilesUIDPacksConfigGetOK() *V1ClusterProfilesUIDPacksConfigGetOK { + return &V1ClusterProfilesUIDPacksConfigGetOK{} +} + +/* +V1ClusterProfilesUIDPacksConfigGetOK handles this case with default header values. + +An array of cluster profile pack configurations +*/ +type V1ClusterProfilesUIDPacksConfigGetOK struct { + Payload *models.V1ClusterProfilePackConfigList +} + +func (o *V1ClusterProfilesUIDPacksConfigGetOK) Error() string { + return fmt.Sprintf("[GET /v1/clusterprofiles/{uid}/packs/{packName}/config][%d] v1ClusterProfilesUidPacksConfigGetOK %+v", 200, o.Payload) +} + +func (o *V1ClusterProfilesUIDPacksConfigGetOK) GetPayload() *models.V1ClusterProfilePackConfigList { + return o.Payload +} + +func (o *V1ClusterProfilesUIDPacksConfigGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1ClusterProfilePackConfigList) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_cluster_profiles_uid_packs_get_parameters.go b/api/client/v1/v1_cluster_profiles_uid_packs_get_parameters.go new file mode 100644 index 00000000..b0b6b363 --- /dev/null +++ b/api/client/v1/v1_cluster_profiles_uid_packs_get_parameters.go @@ -0,0 +1,168 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1ClusterProfilesUIDPacksGetParams creates a new V1ClusterProfilesUIDPacksGetParams object +// with the default values initialized. +func NewV1ClusterProfilesUIDPacksGetParams() *V1ClusterProfilesUIDPacksGetParams { + var () + return &V1ClusterProfilesUIDPacksGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1ClusterProfilesUIDPacksGetParamsWithTimeout creates a new V1ClusterProfilesUIDPacksGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1ClusterProfilesUIDPacksGetParamsWithTimeout(timeout time.Duration) *V1ClusterProfilesUIDPacksGetParams { + var () + return &V1ClusterProfilesUIDPacksGetParams{ + + timeout: timeout, + } +} + +// NewV1ClusterProfilesUIDPacksGetParamsWithContext creates a new V1ClusterProfilesUIDPacksGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1ClusterProfilesUIDPacksGetParamsWithContext(ctx context.Context) *V1ClusterProfilesUIDPacksGetParams { + var () + return &V1ClusterProfilesUIDPacksGetParams{ + + Context: ctx, + } +} + +// NewV1ClusterProfilesUIDPacksGetParamsWithHTTPClient creates a new V1ClusterProfilesUIDPacksGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1ClusterProfilesUIDPacksGetParamsWithHTTPClient(client *http.Client) *V1ClusterProfilesUIDPacksGetParams { + var () + return &V1ClusterProfilesUIDPacksGetParams{ + HTTPClient: client, + } +} + +/* +V1ClusterProfilesUIDPacksGetParams contains all the parameters to send to the API endpoint +for the v1 cluster profiles Uid packs get operation typically these are written to a http.Request +*/ +type V1ClusterProfilesUIDPacksGetParams struct { + + /*IncludePackMeta + Comma seperated pack meta such as schema, presets + + */ + IncludePackMeta *string + /*UID + Cluster profile uid + + */ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cluster profiles Uid packs get params +func (o *V1ClusterProfilesUIDPacksGetParams) WithTimeout(timeout time.Duration) *V1ClusterProfilesUIDPacksGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cluster profiles Uid packs get params +func (o *V1ClusterProfilesUIDPacksGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cluster profiles Uid packs get params +func (o *V1ClusterProfilesUIDPacksGetParams) WithContext(ctx context.Context) *V1ClusterProfilesUIDPacksGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cluster profiles Uid packs get params +func (o *V1ClusterProfilesUIDPacksGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cluster profiles Uid packs get params +func (o *V1ClusterProfilesUIDPacksGetParams) WithHTTPClient(client *http.Client) *V1ClusterProfilesUIDPacksGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cluster profiles Uid packs get params +func (o *V1ClusterProfilesUIDPacksGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithIncludePackMeta adds the includePackMeta to the v1 cluster profiles Uid packs get params +func (o *V1ClusterProfilesUIDPacksGetParams) WithIncludePackMeta(includePackMeta *string) *V1ClusterProfilesUIDPacksGetParams { + o.SetIncludePackMeta(includePackMeta) + return o +} + +// SetIncludePackMeta adds the includePackMeta to the v1 cluster profiles Uid packs get params +func (o *V1ClusterProfilesUIDPacksGetParams) SetIncludePackMeta(includePackMeta *string) { + o.IncludePackMeta = includePackMeta +} + +// WithUID adds the uid to the v1 cluster profiles Uid packs get params +func (o *V1ClusterProfilesUIDPacksGetParams) WithUID(uid string) *V1ClusterProfilesUIDPacksGetParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 cluster profiles Uid packs get params +func (o *V1ClusterProfilesUIDPacksGetParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1ClusterProfilesUIDPacksGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.IncludePackMeta != nil { + + // query param includePackMeta + var qrIncludePackMeta string + if o.IncludePackMeta != nil { + qrIncludePackMeta = *o.IncludePackMeta + } + qIncludePackMeta := qrIncludePackMeta + if qIncludePackMeta != "" { + if err := r.SetQueryParam("includePackMeta", qIncludePackMeta); err != nil { + return err + } + } + + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cluster_profiles_uid_packs_get_responses.go b/api/client/v1/v1_cluster_profiles_uid_packs_get_responses.go new file mode 100644 index 00000000..b44533df --- /dev/null +++ b/api/client/v1/v1_cluster_profiles_uid_packs_get_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1ClusterProfilesUIDPacksGetReader is a Reader for the V1ClusterProfilesUIDPacksGet structure. +type V1ClusterProfilesUIDPacksGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1ClusterProfilesUIDPacksGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1ClusterProfilesUIDPacksGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1ClusterProfilesUIDPacksGetOK creates a V1ClusterProfilesUIDPacksGetOK with default headers values +func NewV1ClusterProfilesUIDPacksGetOK() *V1ClusterProfilesUIDPacksGetOK { + return &V1ClusterProfilesUIDPacksGetOK{} +} + +/* +V1ClusterProfilesUIDPacksGetOK handles this case with default header values. + +OK +*/ +type V1ClusterProfilesUIDPacksGetOK struct { + Payload *models.V1ClusterProfilePacksEntities +} + +func (o *V1ClusterProfilesUIDPacksGetOK) Error() string { + return fmt.Sprintf("[GET /v1/clusterprofiles/{uid}/packs][%d] v1ClusterProfilesUidPacksGetOK %+v", 200, o.Payload) +} + +func (o *V1ClusterProfilesUIDPacksGetOK) GetPayload() *models.V1ClusterProfilePacksEntities { + return o.Payload +} + +func (o *V1ClusterProfilesUIDPacksGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1ClusterProfilePacksEntities) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_cluster_profiles_uid_packs_manifests_get_parameters.go b/api/client/v1/v1_cluster_profiles_uid_packs_manifests_get_parameters.go new file mode 100644 index 00000000..f862e3e3 --- /dev/null +++ b/api/client/v1/v1_cluster_profiles_uid_packs_manifests_get_parameters.go @@ -0,0 +1,168 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1ClusterProfilesUIDPacksManifestsGetParams creates a new V1ClusterProfilesUIDPacksManifestsGetParams object +// with the default values initialized. +func NewV1ClusterProfilesUIDPacksManifestsGetParams() *V1ClusterProfilesUIDPacksManifestsGetParams { + var () + return &V1ClusterProfilesUIDPacksManifestsGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1ClusterProfilesUIDPacksManifestsGetParamsWithTimeout creates a new V1ClusterProfilesUIDPacksManifestsGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1ClusterProfilesUIDPacksManifestsGetParamsWithTimeout(timeout time.Duration) *V1ClusterProfilesUIDPacksManifestsGetParams { + var () + return &V1ClusterProfilesUIDPacksManifestsGetParams{ + + timeout: timeout, + } +} + +// NewV1ClusterProfilesUIDPacksManifestsGetParamsWithContext creates a new V1ClusterProfilesUIDPacksManifestsGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1ClusterProfilesUIDPacksManifestsGetParamsWithContext(ctx context.Context) *V1ClusterProfilesUIDPacksManifestsGetParams { + var () + return &V1ClusterProfilesUIDPacksManifestsGetParams{ + + Context: ctx, + } +} + +// NewV1ClusterProfilesUIDPacksManifestsGetParamsWithHTTPClient creates a new V1ClusterProfilesUIDPacksManifestsGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1ClusterProfilesUIDPacksManifestsGetParamsWithHTTPClient(client *http.Client) *V1ClusterProfilesUIDPacksManifestsGetParams { + var () + return &V1ClusterProfilesUIDPacksManifestsGetParams{ + HTTPClient: client, + } +} + +/* +V1ClusterProfilesUIDPacksManifestsGetParams contains all the parameters to send to the API endpoint +for the v1 cluster profiles Uid packs manifests get operation typically these are written to a http.Request +*/ +type V1ClusterProfilesUIDPacksManifestsGetParams struct { + + /*IncludePackMeta + Comma seperated pack meta such as schema, presets + + */ + IncludePackMeta *string + /*UID + Cluster profile uid + + */ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cluster profiles Uid packs manifests get params +func (o *V1ClusterProfilesUIDPacksManifestsGetParams) WithTimeout(timeout time.Duration) *V1ClusterProfilesUIDPacksManifestsGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cluster profiles Uid packs manifests get params +func (o *V1ClusterProfilesUIDPacksManifestsGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cluster profiles Uid packs manifests get params +func (o *V1ClusterProfilesUIDPacksManifestsGetParams) WithContext(ctx context.Context) *V1ClusterProfilesUIDPacksManifestsGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cluster profiles Uid packs manifests get params +func (o *V1ClusterProfilesUIDPacksManifestsGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cluster profiles Uid packs manifests get params +func (o *V1ClusterProfilesUIDPacksManifestsGetParams) WithHTTPClient(client *http.Client) *V1ClusterProfilesUIDPacksManifestsGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cluster profiles Uid packs manifests get params +func (o *V1ClusterProfilesUIDPacksManifestsGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithIncludePackMeta adds the includePackMeta to the v1 cluster profiles Uid packs manifests get params +func (o *V1ClusterProfilesUIDPacksManifestsGetParams) WithIncludePackMeta(includePackMeta *string) *V1ClusterProfilesUIDPacksManifestsGetParams { + o.SetIncludePackMeta(includePackMeta) + return o +} + +// SetIncludePackMeta adds the includePackMeta to the v1 cluster profiles Uid packs manifests get params +func (o *V1ClusterProfilesUIDPacksManifestsGetParams) SetIncludePackMeta(includePackMeta *string) { + o.IncludePackMeta = includePackMeta +} + +// WithUID adds the uid to the v1 cluster profiles Uid packs manifests get params +func (o *V1ClusterProfilesUIDPacksManifestsGetParams) WithUID(uid string) *V1ClusterProfilesUIDPacksManifestsGetParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 cluster profiles Uid packs manifests get params +func (o *V1ClusterProfilesUIDPacksManifestsGetParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1ClusterProfilesUIDPacksManifestsGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.IncludePackMeta != nil { + + // query param includePackMeta + var qrIncludePackMeta string + if o.IncludePackMeta != nil { + qrIncludePackMeta = *o.IncludePackMeta + } + qIncludePackMeta := qrIncludePackMeta + if qIncludePackMeta != "" { + if err := r.SetQueryParam("includePackMeta", qIncludePackMeta); err != nil { + return err + } + } + + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cluster_profiles_uid_packs_manifests_get_responses.go b/api/client/v1/v1_cluster_profiles_uid_packs_manifests_get_responses.go new file mode 100644 index 00000000..c5c5a36e --- /dev/null +++ b/api/client/v1/v1_cluster_profiles_uid_packs_manifests_get_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1ClusterProfilesUIDPacksManifestsGetReader is a Reader for the V1ClusterProfilesUIDPacksManifestsGet structure. +type V1ClusterProfilesUIDPacksManifestsGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1ClusterProfilesUIDPacksManifestsGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1ClusterProfilesUIDPacksManifestsGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1ClusterProfilesUIDPacksManifestsGetOK creates a V1ClusterProfilesUIDPacksManifestsGetOK with default headers values +func NewV1ClusterProfilesUIDPacksManifestsGetOK() *V1ClusterProfilesUIDPacksManifestsGetOK { + return &V1ClusterProfilesUIDPacksManifestsGetOK{} +} + +/* +V1ClusterProfilesUIDPacksManifestsGetOK handles this case with default header values. + +OK +*/ +type V1ClusterProfilesUIDPacksManifestsGetOK struct { + Payload *models.V1ClusterProfilePacksManifests +} + +func (o *V1ClusterProfilesUIDPacksManifestsGetOK) Error() string { + return fmt.Sprintf("[GET /v1/clusterprofiles/{uid}/packs/manifests][%d] v1ClusterProfilesUidPacksManifestsGetOK %+v", 200, o.Payload) +} + +func (o *V1ClusterProfilesUIDPacksManifestsGetOK) GetPayload() *models.V1ClusterProfilePacksManifests { + return o.Payload +} + +func (o *V1ClusterProfilesUIDPacksManifestsGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1ClusterProfilePacksManifests) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_cluster_profiles_uid_packs_name_delete_parameters.go b/api/client/v1/v1_cluster_profiles_uid_packs_name_delete_parameters.go new file mode 100644 index 00000000..b8752b9b --- /dev/null +++ b/api/client/v1/v1_cluster_profiles_uid_packs_name_delete_parameters.go @@ -0,0 +1,157 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1ClusterProfilesUIDPacksNameDeleteParams creates a new V1ClusterProfilesUIDPacksNameDeleteParams object +// with the default values initialized. +func NewV1ClusterProfilesUIDPacksNameDeleteParams() *V1ClusterProfilesUIDPacksNameDeleteParams { + var () + return &V1ClusterProfilesUIDPacksNameDeleteParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1ClusterProfilesUIDPacksNameDeleteParamsWithTimeout creates a new V1ClusterProfilesUIDPacksNameDeleteParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1ClusterProfilesUIDPacksNameDeleteParamsWithTimeout(timeout time.Duration) *V1ClusterProfilesUIDPacksNameDeleteParams { + var () + return &V1ClusterProfilesUIDPacksNameDeleteParams{ + + timeout: timeout, + } +} + +// NewV1ClusterProfilesUIDPacksNameDeleteParamsWithContext creates a new V1ClusterProfilesUIDPacksNameDeleteParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1ClusterProfilesUIDPacksNameDeleteParamsWithContext(ctx context.Context) *V1ClusterProfilesUIDPacksNameDeleteParams { + var () + return &V1ClusterProfilesUIDPacksNameDeleteParams{ + + Context: ctx, + } +} + +// NewV1ClusterProfilesUIDPacksNameDeleteParamsWithHTTPClient creates a new V1ClusterProfilesUIDPacksNameDeleteParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1ClusterProfilesUIDPacksNameDeleteParamsWithHTTPClient(client *http.Client) *V1ClusterProfilesUIDPacksNameDeleteParams { + var () + return &V1ClusterProfilesUIDPacksNameDeleteParams{ + HTTPClient: client, + } +} + +/* +V1ClusterProfilesUIDPacksNameDeleteParams contains all the parameters to send to the API endpoint +for the v1 cluster profiles Uid packs name delete operation typically these are written to a http.Request +*/ +type V1ClusterProfilesUIDPacksNameDeleteParams struct { + + /*PackName + Cluster profile pack name + + */ + PackName string + /*UID + Cluster profile uid + + */ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cluster profiles Uid packs name delete params +func (o *V1ClusterProfilesUIDPacksNameDeleteParams) WithTimeout(timeout time.Duration) *V1ClusterProfilesUIDPacksNameDeleteParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cluster profiles Uid packs name delete params +func (o *V1ClusterProfilesUIDPacksNameDeleteParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cluster profiles Uid packs name delete params +func (o *V1ClusterProfilesUIDPacksNameDeleteParams) WithContext(ctx context.Context) *V1ClusterProfilesUIDPacksNameDeleteParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cluster profiles Uid packs name delete params +func (o *V1ClusterProfilesUIDPacksNameDeleteParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cluster profiles Uid packs name delete params +func (o *V1ClusterProfilesUIDPacksNameDeleteParams) WithHTTPClient(client *http.Client) *V1ClusterProfilesUIDPacksNameDeleteParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cluster profiles Uid packs name delete params +func (o *V1ClusterProfilesUIDPacksNameDeleteParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithPackName adds the packName to the v1 cluster profiles Uid packs name delete params +func (o *V1ClusterProfilesUIDPacksNameDeleteParams) WithPackName(packName string) *V1ClusterProfilesUIDPacksNameDeleteParams { + o.SetPackName(packName) + return o +} + +// SetPackName adds the packName to the v1 cluster profiles Uid packs name delete params +func (o *V1ClusterProfilesUIDPacksNameDeleteParams) SetPackName(packName string) { + o.PackName = packName +} + +// WithUID adds the uid to the v1 cluster profiles Uid packs name delete params +func (o *V1ClusterProfilesUIDPacksNameDeleteParams) WithUID(uid string) *V1ClusterProfilesUIDPacksNameDeleteParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 cluster profiles Uid packs name delete params +func (o *V1ClusterProfilesUIDPacksNameDeleteParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1ClusterProfilesUIDPacksNameDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param packName + if err := r.SetPathParam("packName", o.PackName); err != nil { + return err + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cluster_profiles_uid_packs_name_delete_responses.go b/api/client/v1/v1_cluster_profiles_uid_packs_name_delete_responses.go new file mode 100644 index 00000000..956d998b --- /dev/null +++ b/api/client/v1/v1_cluster_profiles_uid_packs_name_delete_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1ClusterProfilesUIDPacksNameDeleteReader is a Reader for the V1ClusterProfilesUIDPacksNameDelete structure. +type V1ClusterProfilesUIDPacksNameDeleteReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1ClusterProfilesUIDPacksNameDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1ClusterProfilesUIDPacksNameDeleteNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1ClusterProfilesUIDPacksNameDeleteNoContent creates a V1ClusterProfilesUIDPacksNameDeleteNoContent with default headers values +func NewV1ClusterProfilesUIDPacksNameDeleteNoContent() *V1ClusterProfilesUIDPacksNameDeleteNoContent { + return &V1ClusterProfilesUIDPacksNameDeleteNoContent{} +} + +/* +V1ClusterProfilesUIDPacksNameDeleteNoContent handles this case with default header values. + +The resource was deleted successfully +*/ +type V1ClusterProfilesUIDPacksNameDeleteNoContent struct { +} + +func (o *V1ClusterProfilesUIDPacksNameDeleteNoContent) Error() string { + return fmt.Sprintf("[DELETE /v1/clusterprofiles/{uid}/packs/{packName}][%d] v1ClusterProfilesUidPacksNameDeleteNoContent ", 204) +} + +func (o *V1ClusterProfilesUIDPacksNameDeleteNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_cluster_profiles_uid_packs_name_get_parameters.go b/api/client/v1/v1_cluster_profiles_uid_packs_name_get_parameters.go new file mode 100644 index 00000000..31516cdd --- /dev/null +++ b/api/client/v1/v1_cluster_profiles_uid_packs_name_get_parameters.go @@ -0,0 +1,157 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1ClusterProfilesUIDPacksNameGetParams creates a new V1ClusterProfilesUIDPacksNameGetParams object +// with the default values initialized. +func NewV1ClusterProfilesUIDPacksNameGetParams() *V1ClusterProfilesUIDPacksNameGetParams { + var () + return &V1ClusterProfilesUIDPacksNameGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1ClusterProfilesUIDPacksNameGetParamsWithTimeout creates a new V1ClusterProfilesUIDPacksNameGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1ClusterProfilesUIDPacksNameGetParamsWithTimeout(timeout time.Duration) *V1ClusterProfilesUIDPacksNameGetParams { + var () + return &V1ClusterProfilesUIDPacksNameGetParams{ + + timeout: timeout, + } +} + +// NewV1ClusterProfilesUIDPacksNameGetParamsWithContext creates a new V1ClusterProfilesUIDPacksNameGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1ClusterProfilesUIDPacksNameGetParamsWithContext(ctx context.Context) *V1ClusterProfilesUIDPacksNameGetParams { + var () + return &V1ClusterProfilesUIDPacksNameGetParams{ + + Context: ctx, + } +} + +// NewV1ClusterProfilesUIDPacksNameGetParamsWithHTTPClient creates a new V1ClusterProfilesUIDPacksNameGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1ClusterProfilesUIDPacksNameGetParamsWithHTTPClient(client *http.Client) *V1ClusterProfilesUIDPacksNameGetParams { + var () + return &V1ClusterProfilesUIDPacksNameGetParams{ + HTTPClient: client, + } +} + +/* +V1ClusterProfilesUIDPacksNameGetParams contains all the parameters to send to the API endpoint +for the v1 cluster profiles Uid packs name get operation typically these are written to a http.Request +*/ +type V1ClusterProfilesUIDPacksNameGetParams struct { + + /*PackName + Cluster profile pack name + + */ + PackName string + /*UID + Cluster profile uid + + */ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cluster profiles Uid packs name get params +func (o *V1ClusterProfilesUIDPacksNameGetParams) WithTimeout(timeout time.Duration) *V1ClusterProfilesUIDPacksNameGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cluster profiles Uid packs name get params +func (o *V1ClusterProfilesUIDPacksNameGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cluster profiles Uid packs name get params +func (o *V1ClusterProfilesUIDPacksNameGetParams) WithContext(ctx context.Context) *V1ClusterProfilesUIDPacksNameGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cluster profiles Uid packs name get params +func (o *V1ClusterProfilesUIDPacksNameGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cluster profiles Uid packs name get params +func (o *V1ClusterProfilesUIDPacksNameGetParams) WithHTTPClient(client *http.Client) *V1ClusterProfilesUIDPacksNameGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cluster profiles Uid packs name get params +func (o *V1ClusterProfilesUIDPacksNameGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithPackName adds the packName to the v1 cluster profiles Uid packs name get params +func (o *V1ClusterProfilesUIDPacksNameGetParams) WithPackName(packName string) *V1ClusterProfilesUIDPacksNameGetParams { + o.SetPackName(packName) + return o +} + +// SetPackName adds the packName to the v1 cluster profiles Uid packs name get params +func (o *V1ClusterProfilesUIDPacksNameGetParams) SetPackName(packName string) { + o.PackName = packName +} + +// WithUID adds the uid to the v1 cluster profiles Uid packs name get params +func (o *V1ClusterProfilesUIDPacksNameGetParams) WithUID(uid string) *V1ClusterProfilesUIDPacksNameGetParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 cluster profiles Uid packs name get params +func (o *V1ClusterProfilesUIDPacksNameGetParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1ClusterProfilesUIDPacksNameGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param packName + if err := r.SetPathParam("packName", o.PackName); err != nil { + return err + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cluster_profiles_uid_packs_name_get_responses.go b/api/client/v1/v1_cluster_profiles_uid_packs_name_get_responses.go new file mode 100644 index 00000000..c1971b3a --- /dev/null +++ b/api/client/v1/v1_cluster_profiles_uid_packs_name_get_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1ClusterProfilesUIDPacksNameGetReader is a Reader for the V1ClusterProfilesUIDPacksNameGet structure. +type V1ClusterProfilesUIDPacksNameGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1ClusterProfilesUIDPacksNameGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1ClusterProfilesUIDPacksNameGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1ClusterProfilesUIDPacksNameGetOK creates a V1ClusterProfilesUIDPacksNameGetOK with default headers values +func NewV1ClusterProfilesUIDPacksNameGetOK() *V1ClusterProfilesUIDPacksNameGetOK { + return &V1ClusterProfilesUIDPacksNameGetOK{} +} + +/* +V1ClusterProfilesUIDPacksNameGetOK handles this case with default header values. + +OK +*/ +type V1ClusterProfilesUIDPacksNameGetOK struct { + Payload *models.V1PackRefSummaryResponse +} + +func (o *V1ClusterProfilesUIDPacksNameGetOK) Error() string { + return fmt.Sprintf("[GET /v1/clusterprofiles/{uid}/packs/{packName}][%d] v1ClusterProfilesUidPacksNameGetOK %+v", 200, o.Payload) +} + +func (o *V1ClusterProfilesUIDPacksNameGetOK) GetPayload() *models.V1PackRefSummaryResponse { + return o.Payload +} + +func (o *V1ClusterProfilesUIDPacksNameGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1PackRefSummaryResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_cluster_profiles_uid_packs_name_manifests_add_parameters.go b/api/client/v1/v1_cluster_profiles_uid_packs_name_manifests_add_parameters.go new file mode 100644 index 00000000..e33d4051 --- /dev/null +++ b/api/client/v1/v1_cluster_profiles_uid_packs_name_manifests_add_parameters.go @@ -0,0 +1,178 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1ClusterProfilesUIDPacksNameManifestsAddParams creates a new V1ClusterProfilesUIDPacksNameManifestsAddParams object +// with the default values initialized. +func NewV1ClusterProfilesUIDPacksNameManifestsAddParams() *V1ClusterProfilesUIDPacksNameManifestsAddParams { + var () + return &V1ClusterProfilesUIDPacksNameManifestsAddParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1ClusterProfilesUIDPacksNameManifestsAddParamsWithTimeout creates a new V1ClusterProfilesUIDPacksNameManifestsAddParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1ClusterProfilesUIDPacksNameManifestsAddParamsWithTimeout(timeout time.Duration) *V1ClusterProfilesUIDPacksNameManifestsAddParams { + var () + return &V1ClusterProfilesUIDPacksNameManifestsAddParams{ + + timeout: timeout, + } +} + +// NewV1ClusterProfilesUIDPacksNameManifestsAddParamsWithContext creates a new V1ClusterProfilesUIDPacksNameManifestsAddParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1ClusterProfilesUIDPacksNameManifestsAddParamsWithContext(ctx context.Context) *V1ClusterProfilesUIDPacksNameManifestsAddParams { + var () + return &V1ClusterProfilesUIDPacksNameManifestsAddParams{ + + Context: ctx, + } +} + +// NewV1ClusterProfilesUIDPacksNameManifestsAddParamsWithHTTPClient creates a new V1ClusterProfilesUIDPacksNameManifestsAddParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1ClusterProfilesUIDPacksNameManifestsAddParamsWithHTTPClient(client *http.Client) *V1ClusterProfilesUIDPacksNameManifestsAddParams { + var () + return &V1ClusterProfilesUIDPacksNameManifestsAddParams{ + HTTPClient: client, + } +} + +/* +V1ClusterProfilesUIDPacksNameManifestsAddParams contains all the parameters to send to the API endpoint +for the v1 cluster profiles Uid packs name manifests add operation typically these are written to a http.Request +*/ +type V1ClusterProfilesUIDPacksNameManifestsAddParams struct { + + /*Body*/ + Body *models.V1ManifestInputEntity + /*PackName + Cluster profile pack name + + */ + PackName string + /*UID + Cluster profile uid + + */ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cluster profiles Uid packs name manifests add params +func (o *V1ClusterProfilesUIDPacksNameManifestsAddParams) WithTimeout(timeout time.Duration) *V1ClusterProfilesUIDPacksNameManifestsAddParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cluster profiles Uid packs name manifests add params +func (o *V1ClusterProfilesUIDPacksNameManifestsAddParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cluster profiles Uid packs name manifests add params +func (o *V1ClusterProfilesUIDPacksNameManifestsAddParams) WithContext(ctx context.Context) *V1ClusterProfilesUIDPacksNameManifestsAddParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cluster profiles Uid packs name manifests add params +func (o *V1ClusterProfilesUIDPacksNameManifestsAddParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cluster profiles Uid packs name manifests add params +func (o *V1ClusterProfilesUIDPacksNameManifestsAddParams) WithHTTPClient(client *http.Client) *V1ClusterProfilesUIDPacksNameManifestsAddParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cluster profiles Uid packs name manifests add params +func (o *V1ClusterProfilesUIDPacksNameManifestsAddParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 cluster profiles Uid packs name manifests add params +func (o *V1ClusterProfilesUIDPacksNameManifestsAddParams) WithBody(body *models.V1ManifestInputEntity) *V1ClusterProfilesUIDPacksNameManifestsAddParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 cluster profiles Uid packs name manifests add params +func (o *V1ClusterProfilesUIDPacksNameManifestsAddParams) SetBody(body *models.V1ManifestInputEntity) { + o.Body = body +} + +// WithPackName adds the packName to the v1 cluster profiles Uid packs name manifests add params +func (o *V1ClusterProfilesUIDPacksNameManifestsAddParams) WithPackName(packName string) *V1ClusterProfilesUIDPacksNameManifestsAddParams { + o.SetPackName(packName) + return o +} + +// SetPackName adds the packName to the v1 cluster profiles Uid packs name manifests add params +func (o *V1ClusterProfilesUIDPacksNameManifestsAddParams) SetPackName(packName string) { + o.PackName = packName +} + +// WithUID adds the uid to the v1 cluster profiles Uid packs name manifests add params +func (o *V1ClusterProfilesUIDPacksNameManifestsAddParams) WithUID(uid string) *V1ClusterProfilesUIDPacksNameManifestsAddParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 cluster profiles Uid packs name manifests add params +func (o *V1ClusterProfilesUIDPacksNameManifestsAddParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1ClusterProfilesUIDPacksNameManifestsAddParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param packName + if err := r.SetPathParam("packName", o.PackName); err != nil { + return err + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cluster_profiles_uid_packs_name_manifests_add_responses.go b/api/client/v1/v1_cluster_profiles_uid_packs_name_manifests_add_responses.go new file mode 100644 index 00000000..e491b31b --- /dev/null +++ b/api/client/v1/v1_cluster_profiles_uid_packs_name_manifests_add_responses.go @@ -0,0 +1,77 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1ClusterProfilesUIDPacksNameManifestsAddReader is a Reader for the V1ClusterProfilesUIDPacksNameManifestsAdd structure. +type V1ClusterProfilesUIDPacksNameManifestsAddReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1ClusterProfilesUIDPacksNameManifestsAddReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 201: + result := NewV1ClusterProfilesUIDPacksNameManifestsAddCreated() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1ClusterProfilesUIDPacksNameManifestsAddCreated creates a V1ClusterProfilesUIDPacksNameManifestsAddCreated with default headers values +func NewV1ClusterProfilesUIDPacksNameManifestsAddCreated() *V1ClusterProfilesUIDPacksNameManifestsAddCreated { + return &V1ClusterProfilesUIDPacksNameManifestsAddCreated{} +} + +/* +V1ClusterProfilesUIDPacksNameManifestsAddCreated handles this case with default header values. + +Created successfully +*/ +type V1ClusterProfilesUIDPacksNameManifestsAddCreated struct { + /*Audit uid for the request + */ + AuditUID string + + Payload *models.V1UID +} + +func (o *V1ClusterProfilesUIDPacksNameManifestsAddCreated) Error() string { + return fmt.Sprintf("[POST /v1/clusterprofiles/{uid}/packs/{packName}/manifests][%d] v1ClusterProfilesUidPacksNameManifestsAddCreated %+v", 201, o.Payload) +} + +func (o *V1ClusterProfilesUIDPacksNameManifestsAddCreated) GetPayload() *models.V1UID { + return o.Payload +} + +func (o *V1ClusterProfilesUIDPacksNameManifestsAddCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header AuditUid + o.AuditUID = response.GetHeader("AuditUid") + + o.Payload = new(models.V1UID) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_cluster_profiles_uid_packs_name_manifests_uid_delete_parameters.go b/api/client/v1/v1_cluster_profiles_uid_packs_name_manifests_uid_delete_parameters.go new file mode 100644 index 00000000..b52f30f5 --- /dev/null +++ b/api/client/v1/v1_cluster_profiles_uid_packs_name_manifests_uid_delete_parameters.go @@ -0,0 +1,178 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1ClusterProfilesUIDPacksNameManifestsUIDDeleteParams creates a new V1ClusterProfilesUIDPacksNameManifestsUIDDeleteParams object +// with the default values initialized. +func NewV1ClusterProfilesUIDPacksNameManifestsUIDDeleteParams() *V1ClusterProfilesUIDPacksNameManifestsUIDDeleteParams { + var () + return &V1ClusterProfilesUIDPacksNameManifestsUIDDeleteParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1ClusterProfilesUIDPacksNameManifestsUIDDeleteParamsWithTimeout creates a new V1ClusterProfilesUIDPacksNameManifestsUIDDeleteParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1ClusterProfilesUIDPacksNameManifestsUIDDeleteParamsWithTimeout(timeout time.Duration) *V1ClusterProfilesUIDPacksNameManifestsUIDDeleteParams { + var () + return &V1ClusterProfilesUIDPacksNameManifestsUIDDeleteParams{ + + timeout: timeout, + } +} + +// NewV1ClusterProfilesUIDPacksNameManifestsUIDDeleteParamsWithContext creates a new V1ClusterProfilesUIDPacksNameManifestsUIDDeleteParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1ClusterProfilesUIDPacksNameManifestsUIDDeleteParamsWithContext(ctx context.Context) *V1ClusterProfilesUIDPacksNameManifestsUIDDeleteParams { + var () + return &V1ClusterProfilesUIDPacksNameManifestsUIDDeleteParams{ + + Context: ctx, + } +} + +// NewV1ClusterProfilesUIDPacksNameManifestsUIDDeleteParamsWithHTTPClient creates a new V1ClusterProfilesUIDPacksNameManifestsUIDDeleteParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1ClusterProfilesUIDPacksNameManifestsUIDDeleteParamsWithHTTPClient(client *http.Client) *V1ClusterProfilesUIDPacksNameManifestsUIDDeleteParams { + var () + return &V1ClusterProfilesUIDPacksNameManifestsUIDDeleteParams{ + HTTPClient: client, + } +} + +/* +V1ClusterProfilesUIDPacksNameManifestsUIDDeleteParams contains all the parameters to send to the API endpoint +for the v1 cluster profiles Uid packs name manifests Uid delete operation typically these are written to a http.Request +*/ +type V1ClusterProfilesUIDPacksNameManifestsUIDDeleteParams struct { + + /*ManifestUID + Cluster profile pack manifest uid + + */ + ManifestUID string + /*PackName + Cluster profile pack name + + */ + PackName string + /*UID + Cluster profile uid + + */ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cluster profiles Uid packs name manifests Uid delete params +func (o *V1ClusterProfilesUIDPacksNameManifestsUIDDeleteParams) WithTimeout(timeout time.Duration) *V1ClusterProfilesUIDPacksNameManifestsUIDDeleteParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cluster profiles Uid packs name manifests Uid delete params +func (o *V1ClusterProfilesUIDPacksNameManifestsUIDDeleteParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cluster profiles Uid packs name manifests Uid delete params +func (o *V1ClusterProfilesUIDPacksNameManifestsUIDDeleteParams) WithContext(ctx context.Context) *V1ClusterProfilesUIDPacksNameManifestsUIDDeleteParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cluster profiles Uid packs name manifests Uid delete params +func (o *V1ClusterProfilesUIDPacksNameManifestsUIDDeleteParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cluster profiles Uid packs name manifests Uid delete params +func (o *V1ClusterProfilesUIDPacksNameManifestsUIDDeleteParams) WithHTTPClient(client *http.Client) *V1ClusterProfilesUIDPacksNameManifestsUIDDeleteParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cluster profiles Uid packs name manifests Uid delete params +func (o *V1ClusterProfilesUIDPacksNameManifestsUIDDeleteParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithManifestUID adds the manifestUID to the v1 cluster profiles Uid packs name manifests Uid delete params +func (o *V1ClusterProfilesUIDPacksNameManifestsUIDDeleteParams) WithManifestUID(manifestUID string) *V1ClusterProfilesUIDPacksNameManifestsUIDDeleteParams { + o.SetManifestUID(manifestUID) + return o +} + +// SetManifestUID adds the manifestUid to the v1 cluster profiles Uid packs name manifests Uid delete params +func (o *V1ClusterProfilesUIDPacksNameManifestsUIDDeleteParams) SetManifestUID(manifestUID string) { + o.ManifestUID = manifestUID +} + +// WithPackName adds the packName to the v1 cluster profiles Uid packs name manifests Uid delete params +func (o *V1ClusterProfilesUIDPacksNameManifestsUIDDeleteParams) WithPackName(packName string) *V1ClusterProfilesUIDPacksNameManifestsUIDDeleteParams { + o.SetPackName(packName) + return o +} + +// SetPackName adds the packName to the v1 cluster profiles Uid packs name manifests Uid delete params +func (o *V1ClusterProfilesUIDPacksNameManifestsUIDDeleteParams) SetPackName(packName string) { + o.PackName = packName +} + +// WithUID adds the uid to the v1 cluster profiles Uid packs name manifests Uid delete params +func (o *V1ClusterProfilesUIDPacksNameManifestsUIDDeleteParams) WithUID(uid string) *V1ClusterProfilesUIDPacksNameManifestsUIDDeleteParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 cluster profiles Uid packs name manifests Uid delete params +func (o *V1ClusterProfilesUIDPacksNameManifestsUIDDeleteParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1ClusterProfilesUIDPacksNameManifestsUIDDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param manifestUid + if err := r.SetPathParam("manifestUid", o.ManifestUID); err != nil { + return err + } + + // path param packName + if err := r.SetPathParam("packName", o.PackName); err != nil { + return err + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cluster_profiles_uid_packs_name_manifests_uid_delete_responses.go b/api/client/v1/v1_cluster_profiles_uid_packs_name_manifests_uid_delete_responses.go new file mode 100644 index 00000000..3eb37538 --- /dev/null +++ b/api/client/v1/v1_cluster_profiles_uid_packs_name_manifests_uid_delete_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1ClusterProfilesUIDPacksNameManifestsUIDDeleteReader is a Reader for the V1ClusterProfilesUIDPacksNameManifestsUIDDelete structure. +type V1ClusterProfilesUIDPacksNameManifestsUIDDeleteReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1ClusterProfilesUIDPacksNameManifestsUIDDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1ClusterProfilesUIDPacksNameManifestsUIDDeleteNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1ClusterProfilesUIDPacksNameManifestsUIDDeleteNoContent creates a V1ClusterProfilesUIDPacksNameManifestsUIDDeleteNoContent with default headers values +func NewV1ClusterProfilesUIDPacksNameManifestsUIDDeleteNoContent() *V1ClusterProfilesUIDPacksNameManifestsUIDDeleteNoContent { + return &V1ClusterProfilesUIDPacksNameManifestsUIDDeleteNoContent{} +} + +/* +V1ClusterProfilesUIDPacksNameManifestsUIDDeleteNoContent handles this case with default header values. + +The resource was deleted successfully +*/ +type V1ClusterProfilesUIDPacksNameManifestsUIDDeleteNoContent struct { +} + +func (o *V1ClusterProfilesUIDPacksNameManifestsUIDDeleteNoContent) Error() string { + return fmt.Sprintf("[DELETE /v1/clusterprofiles/{uid}/packs/{packName}/manifests/{manifestUid}][%d] v1ClusterProfilesUidPacksNameManifestsUidDeleteNoContent ", 204) +} + +func (o *V1ClusterProfilesUIDPacksNameManifestsUIDDeleteNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_cluster_profiles_uid_packs_name_manifests_uid_get_parameters.go b/api/client/v1/v1_cluster_profiles_uid_packs_name_manifests_uid_get_parameters.go new file mode 100644 index 00000000..2075c74b --- /dev/null +++ b/api/client/v1/v1_cluster_profiles_uid_packs_name_manifests_uid_get_parameters.go @@ -0,0 +1,178 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1ClusterProfilesUIDPacksNameManifestsUIDGetParams creates a new V1ClusterProfilesUIDPacksNameManifestsUIDGetParams object +// with the default values initialized. +func NewV1ClusterProfilesUIDPacksNameManifestsUIDGetParams() *V1ClusterProfilesUIDPacksNameManifestsUIDGetParams { + var () + return &V1ClusterProfilesUIDPacksNameManifestsUIDGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1ClusterProfilesUIDPacksNameManifestsUIDGetParamsWithTimeout creates a new V1ClusterProfilesUIDPacksNameManifestsUIDGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1ClusterProfilesUIDPacksNameManifestsUIDGetParamsWithTimeout(timeout time.Duration) *V1ClusterProfilesUIDPacksNameManifestsUIDGetParams { + var () + return &V1ClusterProfilesUIDPacksNameManifestsUIDGetParams{ + + timeout: timeout, + } +} + +// NewV1ClusterProfilesUIDPacksNameManifestsUIDGetParamsWithContext creates a new V1ClusterProfilesUIDPacksNameManifestsUIDGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1ClusterProfilesUIDPacksNameManifestsUIDGetParamsWithContext(ctx context.Context) *V1ClusterProfilesUIDPacksNameManifestsUIDGetParams { + var () + return &V1ClusterProfilesUIDPacksNameManifestsUIDGetParams{ + + Context: ctx, + } +} + +// NewV1ClusterProfilesUIDPacksNameManifestsUIDGetParamsWithHTTPClient creates a new V1ClusterProfilesUIDPacksNameManifestsUIDGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1ClusterProfilesUIDPacksNameManifestsUIDGetParamsWithHTTPClient(client *http.Client) *V1ClusterProfilesUIDPacksNameManifestsUIDGetParams { + var () + return &V1ClusterProfilesUIDPacksNameManifestsUIDGetParams{ + HTTPClient: client, + } +} + +/* +V1ClusterProfilesUIDPacksNameManifestsUIDGetParams contains all the parameters to send to the API endpoint +for the v1 cluster profiles Uid packs name manifests Uid get operation typically these are written to a http.Request +*/ +type V1ClusterProfilesUIDPacksNameManifestsUIDGetParams struct { + + /*ManifestUID + Cluster profile pack manifest uid + + */ + ManifestUID string + /*PackName + Cluster profile pack name + + */ + PackName string + /*UID + Cluster profile uid + + */ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cluster profiles Uid packs name manifests Uid get params +func (o *V1ClusterProfilesUIDPacksNameManifestsUIDGetParams) WithTimeout(timeout time.Duration) *V1ClusterProfilesUIDPacksNameManifestsUIDGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cluster profiles Uid packs name manifests Uid get params +func (o *V1ClusterProfilesUIDPacksNameManifestsUIDGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cluster profiles Uid packs name manifests Uid get params +func (o *V1ClusterProfilesUIDPacksNameManifestsUIDGetParams) WithContext(ctx context.Context) *V1ClusterProfilesUIDPacksNameManifestsUIDGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cluster profiles Uid packs name manifests Uid get params +func (o *V1ClusterProfilesUIDPacksNameManifestsUIDGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cluster profiles Uid packs name manifests Uid get params +func (o *V1ClusterProfilesUIDPacksNameManifestsUIDGetParams) WithHTTPClient(client *http.Client) *V1ClusterProfilesUIDPacksNameManifestsUIDGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cluster profiles Uid packs name manifests Uid get params +func (o *V1ClusterProfilesUIDPacksNameManifestsUIDGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithManifestUID adds the manifestUID to the v1 cluster profiles Uid packs name manifests Uid get params +func (o *V1ClusterProfilesUIDPacksNameManifestsUIDGetParams) WithManifestUID(manifestUID string) *V1ClusterProfilesUIDPacksNameManifestsUIDGetParams { + o.SetManifestUID(manifestUID) + return o +} + +// SetManifestUID adds the manifestUid to the v1 cluster profiles Uid packs name manifests Uid get params +func (o *V1ClusterProfilesUIDPacksNameManifestsUIDGetParams) SetManifestUID(manifestUID string) { + o.ManifestUID = manifestUID +} + +// WithPackName adds the packName to the v1 cluster profiles Uid packs name manifests Uid get params +func (o *V1ClusterProfilesUIDPacksNameManifestsUIDGetParams) WithPackName(packName string) *V1ClusterProfilesUIDPacksNameManifestsUIDGetParams { + o.SetPackName(packName) + return o +} + +// SetPackName adds the packName to the v1 cluster profiles Uid packs name manifests Uid get params +func (o *V1ClusterProfilesUIDPacksNameManifestsUIDGetParams) SetPackName(packName string) { + o.PackName = packName +} + +// WithUID adds the uid to the v1 cluster profiles Uid packs name manifests Uid get params +func (o *V1ClusterProfilesUIDPacksNameManifestsUIDGetParams) WithUID(uid string) *V1ClusterProfilesUIDPacksNameManifestsUIDGetParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 cluster profiles Uid packs name manifests Uid get params +func (o *V1ClusterProfilesUIDPacksNameManifestsUIDGetParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1ClusterProfilesUIDPacksNameManifestsUIDGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param manifestUid + if err := r.SetPathParam("manifestUid", o.ManifestUID); err != nil { + return err + } + + // path param packName + if err := r.SetPathParam("packName", o.PackName); err != nil { + return err + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cluster_profiles_uid_packs_name_manifests_uid_get_responses.go b/api/client/v1/v1_cluster_profiles_uid_packs_name_manifests_uid_get_responses.go new file mode 100644 index 00000000..568a2b8b --- /dev/null +++ b/api/client/v1/v1_cluster_profiles_uid_packs_name_manifests_uid_get_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1ClusterProfilesUIDPacksNameManifestsUIDGetReader is a Reader for the V1ClusterProfilesUIDPacksNameManifestsUIDGet structure. +type V1ClusterProfilesUIDPacksNameManifestsUIDGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1ClusterProfilesUIDPacksNameManifestsUIDGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1ClusterProfilesUIDPacksNameManifestsUIDGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1ClusterProfilesUIDPacksNameManifestsUIDGetOK creates a V1ClusterProfilesUIDPacksNameManifestsUIDGetOK with default headers values +func NewV1ClusterProfilesUIDPacksNameManifestsUIDGetOK() *V1ClusterProfilesUIDPacksNameManifestsUIDGetOK { + return &V1ClusterProfilesUIDPacksNameManifestsUIDGetOK{} +} + +/* +V1ClusterProfilesUIDPacksNameManifestsUIDGetOK handles this case with default header values. + +OK +*/ +type V1ClusterProfilesUIDPacksNameManifestsUIDGetOK struct { + Payload *models.V1ManifestEntity +} + +func (o *V1ClusterProfilesUIDPacksNameManifestsUIDGetOK) Error() string { + return fmt.Sprintf("[GET /v1/clusterprofiles/{uid}/packs/{packName}/manifests/{manifestUid}][%d] v1ClusterProfilesUidPacksNameManifestsUidGetOK %+v", 200, o.Payload) +} + +func (o *V1ClusterProfilesUIDPacksNameManifestsUIDGetOK) GetPayload() *models.V1ManifestEntity { + return o.Payload +} + +func (o *V1ClusterProfilesUIDPacksNameManifestsUIDGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1ManifestEntity) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_cluster_profiles_uid_packs_name_manifests_uid_update_parameters.go b/api/client/v1/v1_cluster_profiles_uid_packs_name_manifests_uid_update_parameters.go new file mode 100644 index 00000000..4a2b6cf1 --- /dev/null +++ b/api/client/v1/v1_cluster_profiles_uid_packs_name_manifests_uid_update_parameters.go @@ -0,0 +1,199 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1ClusterProfilesUIDPacksNameManifestsUIDUpdateParams creates a new V1ClusterProfilesUIDPacksNameManifestsUIDUpdateParams object +// with the default values initialized. +func NewV1ClusterProfilesUIDPacksNameManifestsUIDUpdateParams() *V1ClusterProfilesUIDPacksNameManifestsUIDUpdateParams { + var () + return &V1ClusterProfilesUIDPacksNameManifestsUIDUpdateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1ClusterProfilesUIDPacksNameManifestsUIDUpdateParamsWithTimeout creates a new V1ClusterProfilesUIDPacksNameManifestsUIDUpdateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1ClusterProfilesUIDPacksNameManifestsUIDUpdateParamsWithTimeout(timeout time.Duration) *V1ClusterProfilesUIDPacksNameManifestsUIDUpdateParams { + var () + return &V1ClusterProfilesUIDPacksNameManifestsUIDUpdateParams{ + + timeout: timeout, + } +} + +// NewV1ClusterProfilesUIDPacksNameManifestsUIDUpdateParamsWithContext creates a new V1ClusterProfilesUIDPacksNameManifestsUIDUpdateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1ClusterProfilesUIDPacksNameManifestsUIDUpdateParamsWithContext(ctx context.Context) *V1ClusterProfilesUIDPacksNameManifestsUIDUpdateParams { + var () + return &V1ClusterProfilesUIDPacksNameManifestsUIDUpdateParams{ + + Context: ctx, + } +} + +// NewV1ClusterProfilesUIDPacksNameManifestsUIDUpdateParamsWithHTTPClient creates a new V1ClusterProfilesUIDPacksNameManifestsUIDUpdateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1ClusterProfilesUIDPacksNameManifestsUIDUpdateParamsWithHTTPClient(client *http.Client) *V1ClusterProfilesUIDPacksNameManifestsUIDUpdateParams { + var () + return &V1ClusterProfilesUIDPacksNameManifestsUIDUpdateParams{ + HTTPClient: client, + } +} + +/* +V1ClusterProfilesUIDPacksNameManifestsUIDUpdateParams contains all the parameters to send to the API endpoint +for the v1 cluster profiles Uid packs name manifests Uid update operation typically these are written to a http.Request +*/ +type V1ClusterProfilesUIDPacksNameManifestsUIDUpdateParams struct { + + /*Body*/ + Body *models.V1ManifestInputEntity + /*ManifestUID + Cluster profile pack manifest uid + + */ + ManifestUID string + /*PackName + Cluster profile pack name + + */ + PackName string + /*UID + Cluster profile uid + + */ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cluster profiles Uid packs name manifests Uid update params +func (o *V1ClusterProfilesUIDPacksNameManifestsUIDUpdateParams) WithTimeout(timeout time.Duration) *V1ClusterProfilesUIDPacksNameManifestsUIDUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cluster profiles Uid packs name manifests Uid update params +func (o *V1ClusterProfilesUIDPacksNameManifestsUIDUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cluster profiles Uid packs name manifests Uid update params +func (o *V1ClusterProfilesUIDPacksNameManifestsUIDUpdateParams) WithContext(ctx context.Context) *V1ClusterProfilesUIDPacksNameManifestsUIDUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cluster profiles Uid packs name manifests Uid update params +func (o *V1ClusterProfilesUIDPacksNameManifestsUIDUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cluster profiles Uid packs name manifests Uid update params +func (o *V1ClusterProfilesUIDPacksNameManifestsUIDUpdateParams) WithHTTPClient(client *http.Client) *V1ClusterProfilesUIDPacksNameManifestsUIDUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cluster profiles Uid packs name manifests Uid update params +func (o *V1ClusterProfilesUIDPacksNameManifestsUIDUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 cluster profiles Uid packs name manifests Uid update params +func (o *V1ClusterProfilesUIDPacksNameManifestsUIDUpdateParams) WithBody(body *models.V1ManifestInputEntity) *V1ClusterProfilesUIDPacksNameManifestsUIDUpdateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 cluster profiles Uid packs name manifests Uid update params +func (o *V1ClusterProfilesUIDPacksNameManifestsUIDUpdateParams) SetBody(body *models.V1ManifestInputEntity) { + o.Body = body +} + +// WithManifestUID adds the manifestUID to the v1 cluster profiles Uid packs name manifests Uid update params +func (o *V1ClusterProfilesUIDPacksNameManifestsUIDUpdateParams) WithManifestUID(manifestUID string) *V1ClusterProfilesUIDPacksNameManifestsUIDUpdateParams { + o.SetManifestUID(manifestUID) + return o +} + +// SetManifestUID adds the manifestUid to the v1 cluster profiles Uid packs name manifests Uid update params +func (o *V1ClusterProfilesUIDPacksNameManifestsUIDUpdateParams) SetManifestUID(manifestUID string) { + o.ManifestUID = manifestUID +} + +// WithPackName adds the packName to the v1 cluster profiles Uid packs name manifests Uid update params +func (o *V1ClusterProfilesUIDPacksNameManifestsUIDUpdateParams) WithPackName(packName string) *V1ClusterProfilesUIDPacksNameManifestsUIDUpdateParams { + o.SetPackName(packName) + return o +} + +// SetPackName adds the packName to the v1 cluster profiles Uid packs name manifests Uid update params +func (o *V1ClusterProfilesUIDPacksNameManifestsUIDUpdateParams) SetPackName(packName string) { + o.PackName = packName +} + +// WithUID adds the uid to the v1 cluster profiles Uid packs name manifests Uid update params +func (o *V1ClusterProfilesUIDPacksNameManifestsUIDUpdateParams) WithUID(uid string) *V1ClusterProfilesUIDPacksNameManifestsUIDUpdateParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 cluster profiles Uid packs name manifests Uid update params +func (o *V1ClusterProfilesUIDPacksNameManifestsUIDUpdateParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1ClusterProfilesUIDPacksNameManifestsUIDUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param manifestUid + if err := r.SetPathParam("manifestUid", o.ManifestUID); err != nil { + return err + } + + // path param packName + if err := r.SetPathParam("packName", o.PackName); err != nil { + return err + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cluster_profiles_uid_packs_name_manifests_uid_update_responses.go b/api/client/v1/v1_cluster_profiles_uid_packs_name_manifests_uid_update_responses.go new file mode 100644 index 00000000..9fabdc55 --- /dev/null +++ b/api/client/v1/v1_cluster_profiles_uid_packs_name_manifests_uid_update_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1ClusterProfilesUIDPacksNameManifestsUIDUpdateReader is a Reader for the V1ClusterProfilesUIDPacksNameManifestsUIDUpdate structure. +type V1ClusterProfilesUIDPacksNameManifestsUIDUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1ClusterProfilesUIDPacksNameManifestsUIDUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1ClusterProfilesUIDPacksNameManifestsUIDUpdateNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1ClusterProfilesUIDPacksNameManifestsUIDUpdateNoContent creates a V1ClusterProfilesUIDPacksNameManifestsUIDUpdateNoContent with default headers values +func NewV1ClusterProfilesUIDPacksNameManifestsUIDUpdateNoContent() *V1ClusterProfilesUIDPacksNameManifestsUIDUpdateNoContent { + return &V1ClusterProfilesUIDPacksNameManifestsUIDUpdateNoContent{} +} + +/* +V1ClusterProfilesUIDPacksNameManifestsUIDUpdateNoContent handles this case with default header values. + +The resource was updated successfully +*/ +type V1ClusterProfilesUIDPacksNameManifestsUIDUpdateNoContent struct { +} + +func (o *V1ClusterProfilesUIDPacksNameManifestsUIDUpdateNoContent) Error() string { + return fmt.Sprintf("[PUT /v1/clusterprofiles/{uid}/packs/{packName}/manifests/{manifestUid}][%d] v1ClusterProfilesUidPacksNameManifestsUidUpdateNoContent ", 204) +} + +func (o *V1ClusterProfilesUIDPacksNameManifestsUIDUpdateNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_cluster_profiles_uid_packs_name_update_parameters.go b/api/client/v1/v1_cluster_profiles_uid_packs_name_update_parameters.go new file mode 100644 index 00000000..11a8daf3 --- /dev/null +++ b/api/client/v1/v1_cluster_profiles_uid_packs_name_update_parameters.go @@ -0,0 +1,178 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1ClusterProfilesUIDPacksNameUpdateParams creates a new V1ClusterProfilesUIDPacksNameUpdateParams object +// with the default values initialized. +func NewV1ClusterProfilesUIDPacksNameUpdateParams() *V1ClusterProfilesUIDPacksNameUpdateParams { + var () + return &V1ClusterProfilesUIDPacksNameUpdateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1ClusterProfilesUIDPacksNameUpdateParamsWithTimeout creates a new V1ClusterProfilesUIDPacksNameUpdateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1ClusterProfilesUIDPacksNameUpdateParamsWithTimeout(timeout time.Duration) *V1ClusterProfilesUIDPacksNameUpdateParams { + var () + return &V1ClusterProfilesUIDPacksNameUpdateParams{ + + timeout: timeout, + } +} + +// NewV1ClusterProfilesUIDPacksNameUpdateParamsWithContext creates a new V1ClusterProfilesUIDPacksNameUpdateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1ClusterProfilesUIDPacksNameUpdateParamsWithContext(ctx context.Context) *V1ClusterProfilesUIDPacksNameUpdateParams { + var () + return &V1ClusterProfilesUIDPacksNameUpdateParams{ + + Context: ctx, + } +} + +// NewV1ClusterProfilesUIDPacksNameUpdateParamsWithHTTPClient creates a new V1ClusterProfilesUIDPacksNameUpdateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1ClusterProfilesUIDPacksNameUpdateParamsWithHTTPClient(client *http.Client) *V1ClusterProfilesUIDPacksNameUpdateParams { + var () + return &V1ClusterProfilesUIDPacksNameUpdateParams{ + HTTPClient: client, + } +} + +/* +V1ClusterProfilesUIDPacksNameUpdateParams contains all the parameters to send to the API endpoint +for the v1 cluster profiles Uid packs name update operation typically these are written to a http.Request +*/ +type V1ClusterProfilesUIDPacksNameUpdateParams struct { + + /*Body*/ + Body *models.V1PackUpdateEntity + /*PackName + Cluster profile pack name + + */ + PackName string + /*UID + Cluster profile uid + + */ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cluster profiles Uid packs name update params +func (o *V1ClusterProfilesUIDPacksNameUpdateParams) WithTimeout(timeout time.Duration) *V1ClusterProfilesUIDPacksNameUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cluster profiles Uid packs name update params +func (o *V1ClusterProfilesUIDPacksNameUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cluster profiles Uid packs name update params +func (o *V1ClusterProfilesUIDPacksNameUpdateParams) WithContext(ctx context.Context) *V1ClusterProfilesUIDPacksNameUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cluster profiles Uid packs name update params +func (o *V1ClusterProfilesUIDPacksNameUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cluster profiles Uid packs name update params +func (o *V1ClusterProfilesUIDPacksNameUpdateParams) WithHTTPClient(client *http.Client) *V1ClusterProfilesUIDPacksNameUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cluster profiles Uid packs name update params +func (o *V1ClusterProfilesUIDPacksNameUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 cluster profiles Uid packs name update params +func (o *V1ClusterProfilesUIDPacksNameUpdateParams) WithBody(body *models.V1PackUpdateEntity) *V1ClusterProfilesUIDPacksNameUpdateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 cluster profiles Uid packs name update params +func (o *V1ClusterProfilesUIDPacksNameUpdateParams) SetBody(body *models.V1PackUpdateEntity) { + o.Body = body +} + +// WithPackName adds the packName to the v1 cluster profiles Uid packs name update params +func (o *V1ClusterProfilesUIDPacksNameUpdateParams) WithPackName(packName string) *V1ClusterProfilesUIDPacksNameUpdateParams { + o.SetPackName(packName) + return o +} + +// SetPackName adds the packName to the v1 cluster profiles Uid packs name update params +func (o *V1ClusterProfilesUIDPacksNameUpdateParams) SetPackName(packName string) { + o.PackName = packName +} + +// WithUID adds the uid to the v1 cluster profiles Uid packs name update params +func (o *V1ClusterProfilesUIDPacksNameUpdateParams) WithUID(uid string) *V1ClusterProfilesUIDPacksNameUpdateParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 cluster profiles Uid packs name update params +func (o *V1ClusterProfilesUIDPacksNameUpdateParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1ClusterProfilesUIDPacksNameUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param packName + if err := r.SetPathParam("packName", o.PackName); err != nil { + return err + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cluster_profiles_uid_packs_name_update_responses.go b/api/client/v1/v1_cluster_profiles_uid_packs_name_update_responses.go new file mode 100644 index 00000000..b57fe8da --- /dev/null +++ b/api/client/v1/v1_cluster_profiles_uid_packs_name_update_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1ClusterProfilesUIDPacksNameUpdateReader is a Reader for the V1ClusterProfilesUIDPacksNameUpdate structure. +type V1ClusterProfilesUIDPacksNameUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1ClusterProfilesUIDPacksNameUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1ClusterProfilesUIDPacksNameUpdateNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1ClusterProfilesUIDPacksNameUpdateNoContent creates a V1ClusterProfilesUIDPacksNameUpdateNoContent with default headers values +func NewV1ClusterProfilesUIDPacksNameUpdateNoContent() *V1ClusterProfilesUIDPacksNameUpdateNoContent { + return &V1ClusterProfilesUIDPacksNameUpdateNoContent{} +} + +/* +V1ClusterProfilesUIDPacksNameUpdateNoContent handles this case with default header values. + +The resource was updated successfully +*/ +type V1ClusterProfilesUIDPacksNameUpdateNoContent struct { +} + +func (o *V1ClusterProfilesUIDPacksNameUpdateNoContent) Error() string { + return fmt.Sprintf("[PUT /v1/clusterprofiles/{uid}/packs/{packName}][%d] v1ClusterProfilesUidPacksNameUpdateNoContent ", 204) +} + +func (o *V1ClusterProfilesUIDPacksNameUpdateNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_cluster_profiles_uid_packs_resolved_values_get_parameters.go b/api/client/v1/v1_cluster_profiles_uid_packs_resolved_values_get_parameters.go new file mode 100644 index 00000000..8bb84550 --- /dev/null +++ b/api/client/v1/v1_cluster_profiles_uid_packs_resolved_values_get_parameters.go @@ -0,0 +1,157 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1ClusterProfilesUIDPacksResolvedValuesGetParams creates a new V1ClusterProfilesUIDPacksResolvedValuesGetParams object +// with the default values initialized. +func NewV1ClusterProfilesUIDPacksResolvedValuesGetParams() *V1ClusterProfilesUIDPacksResolvedValuesGetParams { + var () + return &V1ClusterProfilesUIDPacksResolvedValuesGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1ClusterProfilesUIDPacksResolvedValuesGetParamsWithTimeout creates a new V1ClusterProfilesUIDPacksResolvedValuesGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1ClusterProfilesUIDPacksResolvedValuesGetParamsWithTimeout(timeout time.Duration) *V1ClusterProfilesUIDPacksResolvedValuesGetParams { + var () + return &V1ClusterProfilesUIDPacksResolvedValuesGetParams{ + + timeout: timeout, + } +} + +// NewV1ClusterProfilesUIDPacksResolvedValuesGetParamsWithContext creates a new V1ClusterProfilesUIDPacksResolvedValuesGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1ClusterProfilesUIDPacksResolvedValuesGetParamsWithContext(ctx context.Context) *V1ClusterProfilesUIDPacksResolvedValuesGetParams { + var () + return &V1ClusterProfilesUIDPacksResolvedValuesGetParams{ + + Context: ctx, + } +} + +// NewV1ClusterProfilesUIDPacksResolvedValuesGetParamsWithHTTPClient creates a new V1ClusterProfilesUIDPacksResolvedValuesGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1ClusterProfilesUIDPacksResolvedValuesGetParamsWithHTTPClient(client *http.Client) *V1ClusterProfilesUIDPacksResolvedValuesGetParams { + var () + return &V1ClusterProfilesUIDPacksResolvedValuesGetParams{ + HTTPClient: client, + } +} + +/* +V1ClusterProfilesUIDPacksResolvedValuesGetParams contains all the parameters to send to the API endpoint +for the v1 cluster profiles Uid packs resolved values get operation typically these are written to a http.Request +*/ +type V1ClusterProfilesUIDPacksResolvedValuesGetParams struct { + + /*Body*/ + Body *models.V1PackParamsEntity + /*UID + Cluster profile uid + + */ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cluster profiles Uid packs resolved values get params +func (o *V1ClusterProfilesUIDPacksResolvedValuesGetParams) WithTimeout(timeout time.Duration) *V1ClusterProfilesUIDPacksResolvedValuesGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cluster profiles Uid packs resolved values get params +func (o *V1ClusterProfilesUIDPacksResolvedValuesGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cluster profiles Uid packs resolved values get params +func (o *V1ClusterProfilesUIDPacksResolvedValuesGetParams) WithContext(ctx context.Context) *V1ClusterProfilesUIDPacksResolvedValuesGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cluster profiles Uid packs resolved values get params +func (o *V1ClusterProfilesUIDPacksResolvedValuesGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cluster profiles Uid packs resolved values get params +func (o *V1ClusterProfilesUIDPacksResolvedValuesGetParams) WithHTTPClient(client *http.Client) *V1ClusterProfilesUIDPacksResolvedValuesGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cluster profiles Uid packs resolved values get params +func (o *V1ClusterProfilesUIDPacksResolvedValuesGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 cluster profiles Uid packs resolved values get params +func (o *V1ClusterProfilesUIDPacksResolvedValuesGetParams) WithBody(body *models.V1PackParamsEntity) *V1ClusterProfilesUIDPacksResolvedValuesGetParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 cluster profiles Uid packs resolved values get params +func (o *V1ClusterProfilesUIDPacksResolvedValuesGetParams) SetBody(body *models.V1PackParamsEntity) { + o.Body = body +} + +// WithUID adds the uid to the v1 cluster profiles Uid packs resolved values get params +func (o *V1ClusterProfilesUIDPacksResolvedValuesGetParams) WithUID(uid string) *V1ClusterProfilesUIDPacksResolvedValuesGetParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 cluster profiles Uid packs resolved values get params +func (o *V1ClusterProfilesUIDPacksResolvedValuesGetParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1ClusterProfilesUIDPacksResolvedValuesGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cluster_profiles_uid_packs_resolved_values_get_responses.go b/api/client/v1/v1_cluster_profiles_uid_packs_resolved_values_get_responses.go new file mode 100644 index 00000000..ca9b4b31 --- /dev/null +++ b/api/client/v1/v1_cluster_profiles_uid_packs_resolved_values_get_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1ClusterProfilesUIDPacksResolvedValuesGetReader is a Reader for the V1ClusterProfilesUIDPacksResolvedValuesGet structure. +type V1ClusterProfilesUIDPacksResolvedValuesGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1ClusterProfilesUIDPacksResolvedValuesGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1ClusterProfilesUIDPacksResolvedValuesGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1ClusterProfilesUIDPacksResolvedValuesGetOK creates a V1ClusterProfilesUIDPacksResolvedValuesGetOK with default headers values +func NewV1ClusterProfilesUIDPacksResolvedValuesGetOK() *V1ClusterProfilesUIDPacksResolvedValuesGetOK { + return &V1ClusterProfilesUIDPacksResolvedValuesGetOK{} +} + +/* +V1ClusterProfilesUIDPacksResolvedValuesGetOK handles this case with default header values. + +OK +*/ +type V1ClusterProfilesUIDPacksResolvedValuesGetOK struct { + Payload *models.V1PackResolvedValues +} + +func (o *V1ClusterProfilesUIDPacksResolvedValuesGetOK) Error() string { + return fmt.Sprintf("[GET /v1/clusterprofiles/{uid}/packs/resolvedValues][%d] v1ClusterProfilesUidPacksResolvedValuesGetOK %+v", 200, o.Payload) +} + +func (o *V1ClusterProfilesUIDPacksResolvedValuesGetOK) GetPayload() *models.V1PackResolvedValues { + return o.Payload +} + +func (o *V1ClusterProfilesUIDPacksResolvedValuesGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1PackResolvedValues) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_cluster_profiles_uid_packs_uid_manifests_parameters.go b/api/client/v1/v1_cluster_profiles_uid_packs_uid_manifests_parameters.go new file mode 100644 index 00000000..dc4baac3 --- /dev/null +++ b/api/client/v1/v1_cluster_profiles_uid_packs_uid_manifests_parameters.go @@ -0,0 +1,157 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1ClusterProfilesUIDPacksUIDManifestsParams creates a new V1ClusterProfilesUIDPacksUIDManifestsParams object +// with the default values initialized. +func NewV1ClusterProfilesUIDPacksUIDManifestsParams() *V1ClusterProfilesUIDPacksUIDManifestsParams { + var () + return &V1ClusterProfilesUIDPacksUIDManifestsParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1ClusterProfilesUIDPacksUIDManifestsParamsWithTimeout creates a new V1ClusterProfilesUIDPacksUIDManifestsParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1ClusterProfilesUIDPacksUIDManifestsParamsWithTimeout(timeout time.Duration) *V1ClusterProfilesUIDPacksUIDManifestsParams { + var () + return &V1ClusterProfilesUIDPacksUIDManifestsParams{ + + timeout: timeout, + } +} + +// NewV1ClusterProfilesUIDPacksUIDManifestsParamsWithContext creates a new V1ClusterProfilesUIDPacksUIDManifestsParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1ClusterProfilesUIDPacksUIDManifestsParamsWithContext(ctx context.Context) *V1ClusterProfilesUIDPacksUIDManifestsParams { + var () + return &V1ClusterProfilesUIDPacksUIDManifestsParams{ + + Context: ctx, + } +} + +// NewV1ClusterProfilesUIDPacksUIDManifestsParamsWithHTTPClient creates a new V1ClusterProfilesUIDPacksUIDManifestsParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1ClusterProfilesUIDPacksUIDManifestsParamsWithHTTPClient(client *http.Client) *V1ClusterProfilesUIDPacksUIDManifestsParams { + var () + return &V1ClusterProfilesUIDPacksUIDManifestsParams{ + HTTPClient: client, + } +} + +/* +V1ClusterProfilesUIDPacksUIDManifestsParams contains all the parameters to send to the API endpoint +for the v1 cluster profiles Uid packs Uid manifests operation typically these are written to a http.Request +*/ +type V1ClusterProfilesUIDPacksUIDManifestsParams struct { + + /*PackName + Cluster profile pack name + + */ + PackName string + /*UID + Cluster profile uid + + */ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cluster profiles Uid packs Uid manifests params +func (o *V1ClusterProfilesUIDPacksUIDManifestsParams) WithTimeout(timeout time.Duration) *V1ClusterProfilesUIDPacksUIDManifestsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cluster profiles Uid packs Uid manifests params +func (o *V1ClusterProfilesUIDPacksUIDManifestsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cluster profiles Uid packs Uid manifests params +func (o *V1ClusterProfilesUIDPacksUIDManifestsParams) WithContext(ctx context.Context) *V1ClusterProfilesUIDPacksUIDManifestsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cluster profiles Uid packs Uid manifests params +func (o *V1ClusterProfilesUIDPacksUIDManifestsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cluster profiles Uid packs Uid manifests params +func (o *V1ClusterProfilesUIDPacksUIDManifestsParams) WithHTTPClient(client *http.Client) *V1ClusterProfilesUIDPacksUIDManifestsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cluster profiles Uid packs Uid manifests params +func (o *V1ClusterProfilesUIDPacksUIDManifestsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithPackName adds the packName to the v1 cluster profiles Uid packs Uid manifests params +func (o *V1ClusterProfilesUIDPacksUIDManifestsParams) WithPackName(packName string) *V1ClusterProfilesUIDPacksUIDManifestsParams { + o.SetPackName(packName) + return o +} + +// SetPackName adds the packName to the v1 cluster profiles Uid packs Uid manifests params +func (o *V1ClusterProfilesUIDPacksUIDManifestsParams) SetPackName(packName string) { + o.PackName = packName +} + +// WithUID adds the uid to the v1 cluster profiles Uid packs Uid manifests params +func (o *V1ClusterProfilesUIDPacksUIDManifestsParams) WithUID(uid string) *V1ClusterProfilesUIDPacksUIDManifestsParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 cluster profiles Uid packs Uid manifests params +func (o *V1ClusterProfilesUIDPacksUIDManifestsParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1ClusterProfilesUIDPacksUIDManifestsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param packName + if err := r.SetPathParam("packName", o.PackName); err != nil { + return err + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cluster_profiles_uid_packs_uid_manifests_responses.go b/api/client/v1/v1_cluster_profiles_uid_packs_uid_manifests_responses.go new file mode 100644 index 00000000..cebafe25 --- /dev/null +++ b/api/client/v1/v1_cluster_profiles_uid_packs_uid_manifests_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1ClusterProfilesUIDPacksUIDManifestsReader is a Reader for the V1ClusterProfilesUIDPacksUIDManifests structure. +type V1ClusterProfilesUIDPacksUIDManifestsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1ClusterProfilesUIDPacksUIDManifestsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1ClusterProfilesUIDPacksUIDManifestsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1ClusterProfilesUIDPacksUIDManifestsOK creates a V1ClusterProfilesUIDPacksUIDManifestsOK with default headers values +func NewV1ClusterProfilesUIDPacksUIDManifestsOK() *V1ClusterProfilesUIDPacksUIDManifestsOK { + return &V1ClusterProfilesUIDPacksUIDManifestsOK{} +} + +/* +V1ClusterProfilesUIDPacksUIDManifestsOK handles this case with default header values. + +OK +*/ +type V1ClusterProfilesUIDPacksUIDManifestsOK struct { + Payload *models.V1ManifestEntities +} + +func (o *V1ClusterProfilesUIDPacksUIDManifestsOK) Error() string { + return fmt.Sprintf("[GET /v1/clusterprofiles/{uid}/packs/{packName}/manifests][%d] v1ClusterProfilesUidPacksUidManifestsOK %+v", 200, o.Payload) +} + +func (o *V1ClusterProfilesUIDPacksUIDManifestsOK) GetPayload() *models.V1ManifestEntities { + return o.Payload +} + +func (o *V1ClusterProfilesUIDPacksUIDManifestsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1ManifestEntities) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_cluster_profiles_uid_spc_download_parameters.go b/api/client/v1/v1_cluster_profiles_uid_spc_download_parameters.go new file mode 100644 index 00000000..93e1d2ca --- /dev/null +++ b/api/client/v1/v1_cluster_profiles_uid_spc_download_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1ClusterProfilesUIDSpcDownloadParams creates a new V1ClusterProfilesUIDSpcDownloadParams object +// with the default values initialized. +func NewV1ClusterProfilesUIDSpcDownloadParams() *V1ClusterProfilesUIDSpcDownloadParams { + var () + return &V1ClusterProfilesUIDSpcDownloadParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1ClusterProfilesUIDSpcDownloadParamsWithTimeout creates a new V1ClusterProfilesUIDSpcDownloadParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1ClusterProfilesUIDSpcDownloadParamsWithTimeout(timeout time.Duration) *V1ClusterProfilesUIDSpcDownloadParams { + var () + return &V1ClusterProfilesUIDSpcDownloadParams{ + + timeout: timeout, + } +} + +// NewV1ClusterProfilesUIDSpcDownloadParamsWithContext creates a new V1ClusterProfilesUIDSpcDownloadParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1ClusterProfilesUIDSpcDownloadParamsWithContext(ctx context.Context) *V1ClusterProfilesUIDSpcDownloadParams { + var () + return &V1ClusterProfilesUIDSpcDownloadParams{ + + Context: ctx, + } +} + +// NewV1ClusterProfilesUIDSpcDownloadParamsWithHTTPClient creates a new V1ClusterProfilesUIDSpcDownloadParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1ClusterProfilesUIDSpcDownloadParamsWithHTTPClient(client *http.Client) *V1ClusterProfilesUIDSpcDownloadParams { + var () + return &V1ClusterProfilesUIDSpcDownloadParams{ + HTTPClient: client, + } +} + +/* +V1ClusterProfilesUIDSpcDownloadParams contains all the parameters to send to the API endpoint +for the v1 cluster profiles Uid spc download operation typically these are written to a http.Request +*/ +type V1ClusterProfilesUIDSpcDownloadParams struct { + + /*UID + Cluster profile uid + + */ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cluster profiles Uid spc download params +func (o *V1ClusterProfilesUIDSpcDownloadParams) WithTimeout(timeout time.Duration) *V1ClusterProfilesUIDSpcDownloadParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cluster profiles Uid spc download params +func (o *V1ClusterProfilesUIDSpcDownloadParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cluster profiles Uid spc download params +func (o *V1ClusterProfilesUIDSpcDownloadParams) WithContext(ctx context.Context) *V1ClusterProfilesUIDSpcDownloadParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cluster profiles Uid spc download params +func (o *V1ClusterProfilesUIDSpcDownloadParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cluster profiles Uid spc download params +func (o *V1ClusterProfilesUIDSpcDownloadParams) WithHTTPClient(client *http.Client) *V1ClusterProfilesUIDSpcDownloadParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cluster profiles Uid spc download params +func (o *V1ClusterProfilesUIDSpcDownloadParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithUID adds the uid to the v1 cluster profiles Uid spc download params +func (o *V1ClusterProfilesUIDSpcDownloadParams) WithUID(uid string) *V1ClusterProfilesUIDSpcDownloadParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 cluster profiles Uid spc download params +func (o *V1ClusterProfilesUIDSpcDownloadParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1ClusterProfilesUIDSpcDownloadParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cluster_profiles_uid_spc_download_responses.go b/api/client/v1/v1_cluster_profiles_uid_spc_download_responses.go new file mode 100644 index 00000000..e4afa521 --- /dev/null +++ b/api/client/v1/v1_cluster_profiles_uid_spc_download_responses.go @@ -0,0 +1,74 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1ClusterProfilesUIDSpcDownloadReader is a Reader for the V1ClusterProfilesUIDSpcDownload structure. +type V1ClusterProfilesUIDSpcDownloadReader struct { + formats strfmt.Registry + writer io.Writer +} + +// ReadResponse reads a server response into the received o. +func (o *V1ClusterProfilesUIDSpcDownloadReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1ClusterProfilesUIDSpcDownloadOK(o.writer) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1ClusterProfilesUIDSpcDownloadOK creates a V1ClusterProfilesUIDSpcDownloadOK with default headers values +func NewV1ClusterProfilesUIDSpcDownloadOK(writer io.Writer) *V1ClusterProfilesUIDSpcDownloadOK { + return &V1ClusterProfilesUIDSpcDownloadOK{ + Payload: writer, + } +} + +/* +V1ClusterProfilesUIDSpcDownloadOK handles this case with default header values. + +Download cluster profile archive file +*/ +type V1ClusterProfilesUIDSpcDownloadOK struct { + ContentDisposition string + + Payload io.Writer +} + +func (o *V1ClusterProfilesUIDSpcDownloadOK) Error() string { + return fmt.Sprintf("[GET /v1/clusterprofiles/{uid}/spc/download][%d] v1ClusterProfilesUidSpcDownloadOK %+v", 200, o.Payload) +} + +func (o *V1ClusterProfilesUIDSpcDownloadOK) GetPayload() io.Writer { + return o.Payload +} + +func (o *V1ClusterProfilesUIDSpcDownloadOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Content-Disposition + o.ContentDisposition = response.GetHeader("Content-Disposition") + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_cluster_profiles_uid_summary_parameters.go b/api/client/v1/v1_cluster_profiles_uid_summary_parameters.go new file mode 100644 index 00000000..15daff00 --- /dev/null +++ b/api/client/v1/v1_cluster_profiles_uid_summary_parameters.go @@ -0,0 +1,133 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1ClusterProfilesUIDSummaryParams creates a new V1ClusterProfilesUIDSummaryParams object +// with the default values initialized. +func NewV1ClusterProfilesUIDSummaryParams() *V1ClusterProfilesUIDSummaryParams { + var () + return &V1ClusterProfilesUIDSummaryParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1ClusterProfilesUIDSummaryParamsWithTimeout creates a new V1ClusterProfilesUIDSummaryParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1ClusterProfilesUIDSummaryParamsWithTimeout(timeout time.Duration) *V1ClusterProfilesUIDSummaryParams { + var () + return &V1ClusterProfilesUIDSummaryParams{ + + timeout: timeout, + } +} + +// NewV1ClusterProfilesUIDSummaryParamsWithContext creates a new V1ClusterProfilesUIDSummaryParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1ClusterProfilesUIDSummaryParamsWithContext(ctx context.Context) *V1ClusterProfilesUIDSummaryParams { + var () + return &V1ClusterProfilesUIDSummaryParams{ + + Context: ctx, + } +} + +// NewV1ClusterProfilesUIDSummaryParamsWithHTTPClient creates a new V1ClusterProfilesUIDSummaryParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1ClusterProfilesUIDSummaryParamsWithHTTPClient(client *http.Client) *V1ClusterProfilesUIDSummaryParams { + var () + return &V1ClusterProfilesUIDSummaryParams{ + HTTPClient: client, + } +} + +/* +V1ClusterProfilesUIDSummaryParams contains all the parameters to send to the API endpoint +for the v1 cluster profiles Uid summary operation typically these are written to a http.Request +*/ +type V1ClusterProfilesUIDSummaryParams struct { + + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cluster profiles Uid summary params +func (o *V1ClusterProfilesUIDSummaryParams) WithTimeout(timeout time.Duration) *V1ClusterProfilesUIDSummaryParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cluster profiles Uid summary params +func (o *V1ClusterProfilesUIDSummaryParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cluster profiles Uid summary params +func (o *V1ClusterProfilesUIDSummaryParams) WithContext(ctx context.Context) *V1ClusterProfilesUIDSummaryParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cluster profiles Uid summary params +func (o *V1ClusterProfilesUIDSummaryParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cluster profiles Uid summary params +func (o *V1ClusterProfilesUIDSummaryParams) WithHTTPClient(client *http.Client) *V1ClusterProfilesUIDSummaryParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cluster profiles Uid summary params +func (o *V1ClusterProfilesUIDSummaryParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithUID adds the uid to the v1 cluster profiles Uid summary params +func (o *V1ClusterProfilesUIDSummaryParams) WithUID(uid string) *V1ClusterProfilesUIDSummaryParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 cluster profiles Uid summary params +func (o *V1ClusterProfilesUIDSummaryParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1ClusterProfilesUIDSummaryParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cluster_profiles_uid_summary_responses.go b/api/client/v1/v1_cluster_profiles_uid_summary_responses.go new file mode 100644 index 00000000..7a75f26f --- /dev/null +++ b/api/client/v1/v1_cluster_profiles_uid_summary_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1ClusterProfilesUIDSummaryReader is a Reader for the V1ClusterProfilesUIDSummary structure. +type V1ClusterProfilesUIDSummaryReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1ClusterProfilesUIDSummaryReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1ClusterProfilesUIDSummaryOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1ClusterProfilesUIDSummaryOK creates a V1ClusterProfilesUIDSummaryOK with default headers values +func NewV1ClusterProfilesUIDSummaryOK() *V1ClusterProfilesUIDSummaryOK { + return &V1ClusterProfilesUIDSummaryOK{} +} + +/* +V1ClusterProfilesUIDSummaryOK handles this case with default header values. + +Cluster profile summary response +*/ +type V1ClusterProfilesUIDSummaryOK struct { + Payload *models.V1ClusterProfileSummary +} + +func (o *V1ClusterProfilesUIDSummaryOK) Error() string { + return fmt.Sprintf("[GET /v1/dashboard/clusterprofiles/{uid}][%d] v1ClusterProfilesUidSummaryOK %+v", 200, o.Payload) +} + +func (o *V1ClusterProfilesUIDSummaryOK) GetPayload() *models.V1ClusterProfileSummary { + return o.Payload +} + +func (o *V1ClusterProfilesUIDSummaryOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1ClusterProfileSummary) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_cluster_profiles_uid_validate_packs_parameters.go b/api/client/v1/v1_cluster_profiles_uid_validate_packs_parameters.go new file mode 100644 index 00000000..a669273f --- /dev/null +++ b/api/client/v1/v1_cluster_profiles_uid_validate_packs_parameters.go @@ -0,0 +1,157 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1ClusterProfilesUIDValidatePacksParams creates a new V1ClusterProfilesUIDValidatePacksParams object +// with the default values initialized. +func NewV1ClusterProfilesUIDValidatePacksParams() *V1ClusterProfilesUIDValidatePacksParams { + var () + return &V1ClusterProfilesUIDValidatePacksParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1ClusterProfilesUIDValidatePacksParamsWithTimeout creates a new V1ClusterProfilesUIDValidatePacksParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1ClusterProfilesUIDValidatePacksParamsWithTimeout(timeout time.Duration) *V1ClusterProfilesUIDValidatePacksParams { + var () + return &V1ClusterProfilesUIDValidatePacksParams{ + + timeout: timeout, + } +} + +// NewV1ClusterProfilesUIDValidatePacksParamsWithContext creates a new V1ClusterProfilesUIDValidatePacksParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1ClusterProfilesUIDValidatePacksParamsWithContext(ctx context.Context) *V1ClusterProfilesUIDValidatePacksParams { + var () + return &V1ClusterProfilesUIDValidatePacksParams{ + + Context: ctx, + } +} + +// NewV1ClusterProfilesUIDValidatePacksParamsWithHTTPClient creates a new V1ClusterProfilesUIDValidatePacksParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1ClusterProfilesUIDValidatePacksParamsWithHTTPClient(client *http.Client) *V1ClusterProfilesUIDValidatePacksParams { + var () + return &V1ClusterProfilesUIDValidatePacksParams{ + HTTPClient: client, + } +} + +/* +V1ClusterProfilesUIDValidatePacksParams contains all the parameters to send to the API endpoint +for the v1 cluster profiles Uid validate packs operation typically these are written to a http.Request +*/ +type V1ClusterProfilesUIDValidatePacksParams struct { + + /*Body*/ + Body *models.V1ClusterProfileTemplateDraft + /*UID + Cluster profile uid + + */ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cluster profiles Uid validate packs params +func (o *V1ClusterProfilesUIDValidatePacksParams) WithTimeout(timeout time.Duration) *V1ClusterProfilesUIDValidatePacksParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cluster profiles Uid validate packs params +func (o *V1ClusterProfilesUIDValidatePacksParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cluster profiles Uid validate packs params +func (o *V1ClusterProfilesUIDValidatePacksParams) WithContext(ctx context.Context) *V1ClusterProfilesUIDValidatePacksParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cluster profiles Uid validate packs params +func (o *V1ClusterProfilesUIDValidatePacksParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cluster profiles Uid validate packs params +func (o *V1ClusterProfilesUIDValidatePacksParams) WithHTTPClient(client *http.Client) *V1ClusterProfilesUIDValidatePacksParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cluster profiles Uid validate packs params +func (o *V1ClusterProfilesUIDValidatePacksParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 cluster profiles Uid validate packs params +func (o *V1ClusterProfilesUIDValidatePacksParams) WithBody(body *models.V1ClusterProfileTemplateDraft) *V1ClusterProfilesUIDValidatePacksParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 cluster profiles Uid validate packs params +func (o *V1ClusterProfilesUIDValidatePacksParams) SetBody(body *models.V1ClusterProfileTemplateDraft) { + o.Body = body +} + +// WithUID adds the uid to the v1 cluster profiles Uid validate packs params +func (o *V1ClusterProfilesUIDValidatePacksParams) WithUID(uid string) *V1ClusterProfilesUIDValidatePacksParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 cluster profiles Uid validate packs params +func (o *V1ClusterProfilesUIDValidatePacksParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1ClusterProfilesUIDValidatePacksParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cluster_profiles_uid_validate_packs_responses.go b/api/client/v1/v1_cluster_profiles_uid_validate_packs_responses.go new file mode 100644 index 00000000..08860c30 --- /dev/null +++ b/api/client/v1/v1_cluster_profiles_uid_validate_packs_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1ClusterProfilesUIDValidatePacksReader is a Reader for the V1ClusterProfilesUIDValidatePacks structure. +type V1ClusterProfilesUIDValidatePacksReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1ClusterProfilesUIDValidatePacksReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1ClusterProfilesUIDValidatePacksOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1ClusterProfilesUIDValidatePacksOK creates a V1ClusterProfilesUIDValidatePacksOK with default headers values +func NewV1ClusterProfilesUIDValidatePacksOK() *V1ClusterProfilesUIDValidatePacksOK { + return &V1ClusterProfilesUIDValidatePacksOK{} +} + +/* +V1ClusterProfilesUIDValidatePacksOK handles this case with default header values. + +Cluster profile packs validation response +*/ +type V1ClusterProfilesUIDValidatePacksOK struct { + Payload *models.V1ClusterProfileValidatorResponse +} + +func (o *V1ClusterProfilesUIDValidatePacksOK) Error() string { + return fmt.Sprintf("[POST /v1/clusterprofiles/{uid}/validate/packs][%d] v1ClusterProfilesUidValidatePacksOK %+v", 200, o.Payload) +} + +func (o *V1ClusterProfilesUIDValidatePacksOK) GetPayload() *models.V1ClusterProfileValidatorResponse { + return o.Payload +} + +func (o *V1ClusterProfilesUIDValidatePacksOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1ClusterProfileValidatorResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_cluster_profiles_uid_variables_delete_parameters.go b/api/client/v1/v1_cluster_profiles_uid_variables_delete_parameters.go new file mode 100644 index 00000000..b6417126 --- /dev/null +++ b/api/client/v1/v1_cluster_profiles_uid_variables_delete_parameters.go @@ -0,0 +1,157 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1ClusterProfilesUIDVariablesDeleteParams creates a new V1ClusterProfilesUIDVariablesDeleteParams object +// with the default values initialized. +func NewV1ClusterProfilesUIDVariablesDeleteParams() *V1ClusterProfilesUIDVariablesDeleteParams { + var () + return &V1ClusterProfilesUIDVariablesDeleteParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1ClusterProfilesUIDVariablesDeleteParamsWithTimeout creates a new V1ClusterProfilesUIDVariablesDeleteParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1ClusterProfilesUIDVariablesDeleteParamsWithTimeout(timeout time.Duration) *V1ClusterProfilesUIDVariablesDeleteParams { + var () + return &V1ClusterProfilesUIDVariablesDeleteParams{ + + timeout: timeout, + } +} + +// NewV1ClusterProfilesUIDVariablesDeleteParamsWithContext creates a new V1ClusterProfilesUIDVariablesDeleteParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1ClusterProfilesUIDVariablesDeleteParamsWithContext(ctx context.Context) *V1ClusterProfilesUIDVariablesDeleteParams { + var () + return &V1ClusterProfilesUIDVariablesDeleteParams{ + + Context: ctx, + } +} + +// NewV1ClusterProfilesUIDVariablesDeleteParamsWithHTTPClient creates a new V1ClusterProfilesUIDVariablesDeleteParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1ClusterProfilesUIDVariablesDeleteParamsWithHTTPClient(client *http.Client) *V1ClusterProfilesUIDVariablesDeleteParams { + var () + return &V1ClusterProfilesUIDVariablesDeleteParams{ + HTTPClient: client, + } +} + +/* +V1ClusterProfilesUIDVariablesDeleteParams contains all the parameters to send to the API endpoint +for the v1 cluster profiles Uid variables delete operation typically these are written to a http.Request +*/ +type V1ClusterProfilesUIDVariablesDeleteParams struct { + + /*Body*/ + Body *models.V1VariableNames + /*UID + Cluster profile uid + + */ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cluster profiles Uid variables delete params +func (o *V1ClusterProfilesUIDVariablesDeleteParams) WithTimeout(timeout time.Duration) *V1ClusterProfilesUIDVariablesDeleteParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cluster profiles Uid variables delete params +func (o *V1ClusterProfilesUIDVariablesDeleteParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cluster profiles Uid variables delete params +func (o *V1ClusterProfilesUIDVariablesDeleteParams) WithContext(ctx context.Context) *V1ClusterProfilesUIDVariablesDeleteParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cluster profiles Uid variables delete params +func (o *V1ClusterProfilesUIDVariablesDeleteParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cluster profiles Uid variables delete params +func (o *V1ClusterProfilesUIDVariablesDeleteParams) WithHTTPClient(client *http.Client) *V1ClusterProfilesUIDVariablesDeleteParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cluster profiles Uid variables delete params +func (o *V1ClusterProfilesUIDVariablesDeleteParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 cluster profiles Uid variables delete params +func (o *V1ClusterProfilesUIDVariablesDeleteParams) WithBody(body *models.V1VariableNames) *V1ClusterProfilesUIDVariablesDeleteParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 cluster profiles Uid variables delete params +func (o *V1ClusterProfilesUIDVariablesDeleteParams) SetBody(body *models.V1VariableNames) { + o.Body = body +} + +// WithUID adds the uid to the v1 cluster profiles Uid variables delete params +func (o *V1ClusterProfilesUIDVariablesDeleteParams) WithUID(uid string) *V1ClusterProfilesUIDVariablesDeleteParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 cluster profiles Uid variables delete params +func (o *V1ClusterProfilesUIDVariablesDeleteParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1ClusterProfilesUIDVariablesDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cluster_profiles_uid_variables_delete_responses.go b/api/client/v1/v1_cluster_profiles_uid_variables_delete_responses.go new file mode 100644 index 00000000..63553907 --- /dev/null +++ b/api/client/v1/v1_cluster_profiles_uid_variables_delete_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1ClusterProfilesUIDVariablesDeleteReader is a Reader for the V1ClusterProfilesUIDVariablesDelete structure. +type V1ClusterProfilesUIDVariablesDeleteReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1ClusterProfilesUIDVariablesDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1ClusterProfilesUIDVariablesDeleteNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1ClusterProfilesUIDVariablesDeleteNoContent creates a V1ClusterProfilesUIDVariablesDeleteNoContent with default headers values +func NewV1ClusterProfilesUIDVariablesDeleteNoContent() *V1ClusterProfilesUIDVariablesDeleteNoContent { + return &V1ClusterProfilesUIDVariablesDeleteNoContent{} +} + +/* +V1ClusterProfilesUIDVariablesDeleteNoContent handles this case with default header values. + +The resource was deleted successfully +*/ +type V1ClusterProfilesUIDVariablesDeleteNoContent struct { +} + +func (o *V1ClusterProfilesUIDVariablesDeleteNoContent) Error() string { + return fmt.Sprintf("[DELETE /v1/clusterprofiles/{uid}/variables][%d] v1ClusterProfilesUidVariablesDeleteNoContent ", 204) +} + +func (o *V1ClusterProfilesUIDVariablesDeleteNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_cluster_profiles_uid_variables_get_parameters.go b/api/client/v1/v1_cluster_profiles_uid_variables_get_parameters.go new file mode 100644 index 00000000..1d050d6a --- /dev/null +++ b/api/client/v1/v1_cluster_profiles_uid_variables_get_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1ClusterProfilesUIDVariablesGetParams creates a new V1ClusterProfilesUIDVariablesGetParams object +// with the default values initialized. +func NewV1ClusterProfilesUIDVariablesGetParams() *V1ClusterProfilesUIDVariablesGetParams { + var () + return &V1ClusterProfilesUIDVariablesGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1ClusterProfilesUIDVariablesGetParamsWithTimeout creates a new V1ClusterProfilesUIDVariablesGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1ClusterProfilesUIDVariablesGetParamsWithTimeout(timeout time.Duration) *V1ClusterProfilesUIDVariablesGetParams { + var () + return &V1ClusterProfilesUIDVariablesGetParams{ + + timeout: timeout, + } +} + +// NewV1ClusterProfilesUIDVariablesGetParamsWithContext creates a new V1ClusterProfilesUIDVariablesGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1ClusterProfilesUIDVariablesGetParamsWithContext(ctx context.Context) *V1ClusterProfilesUIDVariablesGetParams { + var () + return &V1ClusterProfilesUIDVariablesGetParams{ + + Context: ctx, + } +} + +// NewV1ClusterProfilesUIDVariablesGetParamsWithHTTPClient creates a new V1ClusterProfilesUIDVariablesGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1ClusterProfilesUIDVariablesGetParamsWithHTTPClient(client *http.Client) *V1ClusterProfilesUIDVariablesGetParams { + var () + return &V1ClusterProfilesUIDVariablesGetParams{ + HTTPClient: client, + } +} + +/* +V1ClusterProfilesUIDVariablesGetParams contains all the parameters to send to the API endpoint +for the v1 cluster profiles Uid variables get operation typically these are written to a http.Request +*/ +type V1ClusterProfilesUIDVariablesGetParams struct { + + /*UID + Cluster profile uid + + */ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cluster profiles Uid variables get params +func (o *V1ClusterProfilesUIDVariablesGetParams) WithTimeout(timeout time.Duration) *V1ClusterProfilesUIDVariablesGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cluster profiles Uid variables get params +func (o *V1ClusterProfilesUIDVariablesGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cluster profiles Uid variables get params +func (o *V1ClusterProfilesUIDVariablesGetParams) WithContext(ctx context.Context) *V1ClusterProfilesUIDVariablesGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cluster profiles Uid variables get params +func (o *V1ClusterProfilesUIDVariablesGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cluster profiles Uid variables get params +func (o *V1ClusterProfilesUIDVariablesGetParams) WithHTTPClient(client *http.Client) *V1ClusterProfilesUIDVariablesGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cluster profiles Uid variables get params +func (o *V1ClusterProfilesUIDVariablesGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithUID adds the uid to the v1 cluster profiles Uid variables get params +func (o *V1ClusterProfilesUIDVariablesGetParams) WithUID(uid string) *V1ClusterProfilesUIDVariablesGetParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 cluster profiles Uid variables get params +func (o *V1ClusterProfilesUIDVariablesGetParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1ClusterProfilesUIDVariablesGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cluster_profiles_uid_variables_get_responses.go b/api/client/v1/v1_cluster_profiles_uid_variables_get_responses.go new file mode 100644 index 00000000..ffea2b55 --- /dev/null +++ b/api/client/v1/v1_cluster_profiles_uid_variables_get_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1ClusterProfilesUIDVariablesGetReader is a Reader for the V1ClusterProfilesUIDVariablesGet structure. +type V1ClusterProfilesUIDVariablesGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1ClusterProfilesUIDVariablesGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1ClusterProfilesUIDVariablesGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1ClusterProfilesUIDVariablesGetOK creates a V1ClusterProfilesUIDVariablesGetOK with default headers values +func NewV1ClusterProfilesUIDVariablesGetOK() *V1ClusterProfilesUIDVariablesGetOK { + return &V1ClusterProfilesUIDVariablesGetOK{} +} + +/* +V1ClusterProfilesUIDVariablesGetOK handles this case with default header values. + +OK +*/ +type V1ClusterProfilesUIDVariablesGetOK struct { + Payload *models.V1Variables +} + +func (o *V1ClusterProfilesUIDVariablesGetOK) Error() string { + return fmt.Sprintf("[GET /v1/clusterprofiles/{uid}/variables][%d] v1ClusterProfilesUidVariablesGetOK %+v", 200, o.Payload) +} + +func (o *V1ClusterProfilesUIDVariablesGetOK) GetPayload() *models.V1Variables { + return o.Payload +} + +func (o *V1ClusterProfilesUIDVariablesGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1Variables) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_cluster_profiles_uid_variables_patch_parameters.go b/api/client/v1/v1_cluster_profiles_uid_variables_patch_parameters.go new file mode 100644 index 00000000..d70eb413 --- /dev/null +++ b/api/client/v1/v1_cluster_profiles_uid_variables_patch_parameters.go @@ -0,0 +1,157 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1ClusterProfilesUIDVariablesPatchParams creates a new V1ClusterProfilesUIDVariablesPatchParams object +// with the default values initialized. +func NewV1ClusterProfilesUIDVariablesPatchParams() *V1ClusterProfilesUIDVariablesPatchParams { + var () + return &V1ClusterProfilesUIDVariablesPatchParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1ClusterProfilesUIDVariablesPatchParamsWithTimeout creates a new V1ClusterProfilesUIDVariablesPatchParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1ClusterProfilesUIDVariablesPatchParamsWithTimeout(timeout time.Duration) *V1ClusterProfilesUIDVariablesPatchParams { + var () + return &V1ClusterProfilesUIDVariablesPatchParams{ + + timeout: timeout, + } +} + +// NewV1ClusterProfilesUIDVariablesPatchParamsWithContext creates a new V1ClusterProfilesUIDVariablesPatchParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1ClusterProfilesUIDVariablesPatchParamsWithContext(ctx context.Context) *V1ClusterProfilesUIDVariablesPatchParams { + var () + return &V1ClusterProfilesUIDVariablesPatchParams{ + + Context: ctx, + } +} + +// NewV1ClusterProfilesUIDVariablesPatchParamsWithHTTPClient creates a new V1ClusterProfilesUIDVariablesPatchParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1ClusterProfilesUIDVariablesPatchParamsWithHTTPClient(client *http.Client) *V1ClusterProfilesUIDVariablesPatchParams { + var () + return &V1ClusterProfilesUIDVariablesPatchParams{ + HTTPClient: client, + } +} + +/* +V1ClusterProfilesUIDVariablesPatchParams contains all the parameters to send to the API endpoint +for the v1 cluster profiles Uid variables patch operation typically these are written to a http.Request +*/ +type V1ClusterProfilesUIDVariablesPatchParams struct { + + /*Body*/ + Body *models.V1Variables + /*UID + Cluster profile uid + + */ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cluster profiles Uid variables patch params +func (o *V1ClusterProfilesUIDVariablesPatchParams) WithTimeout(timeout time.Duration) *V1ClusterProfilesUIDVariablesPatchParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cluster profiles Uid variables patch params +func (o *V1ClusterProfilesUIDVariablesPatchParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cluster profiles Uid variables patch params +func (o *V1ClusterProfilesUIDVariablesPatchParams) WithContext(ctx context.Context) *V1ClusterProfilesUIDVariablesPatchParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cluster profiles Uid variables patch params +func (o *V1ClusterProfilesUIDVariablesPatchParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cluster profiles Uid variables patch params +func (o *V1ClusterProfilesUIDVariablesPatchParams) WithHTTPClient(client *http.Client) *V1ClusterProfilesUIDVariablesPatchParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cluster profiles Uid variables patch params +func (o *V1ClusterProfilesUIDVariablesPatchParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 cluster profiles Uid variables patch params +func (o *V1ClusterProfilesUIDVariablesPatchParams) WithBody(body *models.V1Variables) *V1ClusterProfilesUIDVariablesPatchParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 cluster profiles Uid variables patch params +func (o *V1ClusterProfilesUIDVariablesPatchParams) SetBody(body *models.V1Variables) { + o.Body = body +} + +// WithUID adds the uid to the v1 cluster profiles Uid variables patch params +func (o *V1ClusterProfilesUIDVariablesPatchParams) WithUID(uid string) *V1ClusterProfilesUIDVariablesPatchParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 cluster profiles Uid variables patch params +func (o *V1ClusterProfilesUIDVariablesPatchParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1ClusterProfilesUIDVariablesPatchParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cluster_profiles_uid_variables_patch_responses.go b/api/client/v1/v1_cluster_profiles_uid_variables_patch_responses.go new file mode 100644 index 00000000..0a3e427b --- /dev/null +++ b/api/client/v1/v1_cluster_profiles_uid_variables_patch_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1ClusterProfilesUIDVariablesPatchReader is a Reader for the V1ClusterProfilesUIDVariablesPatch structure. +type V1ClusterProfilesUIDVariablesPatchReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1ClusterProfilesUIDVariablesPatchReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1ClusterProfilesUIDVariablesPatchNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1ClusterProfilesUIDVariablesPatchNoContent creates a V1ClusterProfilesUIDVariablesPatchNoContent with default headers values +func NewV1ClusterProfilesUIDVariablesPatchNoContent() *V1ClusterProfilesUIDVariablesPatchNoContent { + return &V1ClusterProfilesUIDVariablesPatchNoContent{} +} + +/* +V1ClusterProfilesUIDVariablesPatchNoContent handles this case with default header values. + +The resource was updated successfully +*/ +type V1ClusterProfilesUIDVariablesPatchNoContent struct { +} + +func (o *V1ClusterProfilesUIDVariablesPatchNoContent) Error() string { + return fmt.Sprintf("[PATCH /v1/clusterprofiles/{uid}/variables][%d] v1ClusterProfilesUidVariablesPatchNoContent ", 204) +} + +func (o *V1ClusterProfilesUIDVariablesPatchNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_cluster_profiles_uid_variables_put_parameters.go b/api/client/v1/v1_cluster_profiles_uid_variables_put_parameters.go new file mode 100644 index 00000000..dab66ed0 --- /dev/null +++ b/api/client/v1/v1_cluster_profiles_uid_variables_put_parameters.go @@ -0,0 +1,157 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1ClusterProfilesUIDVariablesPutParams creates a new V1ClusterProfilesUIDVariablesPutParams object +// with the default values initialized. +func NewV1ClusterProfilesUIDVariablesPutParams() *V1ClusterProfilesUIDVariablesPutParams { + var () + return &V1ClusterProfilesUIDVariablesPutParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1ClusterProfilesUIDVariablesPutParamsWithTimeout creates a new V1ClusterProfilesUIDVariablesPutParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1ClusterProfilesUIDVariablesPutParamsWithTimeout(timeout time.Duration) *V1ClusterProfilesUIDVariablesPutParams { + var () + return &V1ClusterProfilesUIDVariablesPutParams{ + + timeout: timeout, + } +} + +// NewV1ClusterProfilesUIDVariablesPutParamsWithContext creates a new V1ClusterProfilesUIDVariablesPutParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1ClusterProfilesUIDVariablesPutParamsWithContext(ctx context.Context) *V1ClusterProfilesUIDVariablesPutParams { + var () + return &V1ClusterProfilesUIDVariablesPutParams{ + + Context: ctx, + } +} + +// NewV1ClusterProfilesUIDVariablesPutParamsWithHTTPClient creates a new V1ClusterProfilesUIDVariablesPutParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1ClusterProfilesUIDVariablesPutParamsWithHTTPClient(client *http.Client) *V1ClusterProfilesUIDVariablesPutParams { + var () + return &V1ClusterProfilesUIDVariablesPutParams{ + HTTPClient: client, + } +} + +/* +V1ClusterProfilesUIDVariablesPutParams contains all the parameters to send to the API endpoint +for the v1 cluster profiles Uid variables put operation typically these are written to a http.Request +*/ +type V1ClusterProfilesUIDVariablesPutParams struct { + + /*Body*/ + Body *models.V1Variables + /*UID + Cluster profile uid + + */ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cluster profiles Uid variables put params +func (o *V1ClusterProfilesUIDVariablesPutParams) WithTimeout(timeout time.Duration) *V1ClusterProfilesUIDVariablesPutParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cluster profiles Uid variables put params +func (o *V1ClusterProfilesUIDVariablesPutParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cluster profiles Uid variables put params +func (o *V1ClusterProfilesUIDVariablesPutParams) WithContext(ctx context.Context) *V1ClusterProfilesUIDVariablesPutParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cluster profiles Uid variables put params +func (o *V1ClusterProfilesUIDVariablesPutParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cluster profiles Uid variables put params +func (o *V1ClusterProfilesUIDVariablesPutParams) WithHTTPClient(client *http.Client) *V1ClusterProfilesUIDVariablesPutParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cluster profiles Uid variables put params +func (o *V1ClusterProfilesUIDVariablesPutParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 cluster profiles Uid variables put params +func (o *V1ClusterProfilesUIDVariablesPutParams) WithBody(body *models.V1Variables) *V1ClusterProfilesUIDVariablesPutParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 cluster profiles Uid variables put params +func (o *V1ClusterProfilesUIDVariablesPutParams) SetBody(body *models.V1Variables) { + o.Body = body +} + +// WithUID adds the uid to the v1 cluster profiles Uid variables put params +func (o *V1ClusterProfilesUIDVariablesPutParams) WithUID(uid string) *V1ClusterProfilesUIDVariablesPutParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 cluster profiles Uid variables put params +func (o *V1ClusterProfilesUIDVariablesPutParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1ClusterProfilesUIDVariablesPutParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cluster_profiles_uid_variables_put_responses.go b/api/client/v1/v1_cluster_profiles_uid_variables_put_responses.go new file mode 100644 index 00000000..276e9168 --- /dev/null +++ b/api/client/v1/v1_cluster_profiles_uid_variables_put_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1ClusterProfilesUIDVariablesPutReader is a Reader for the V1ClusterProfilesUIDVariablesPut structure. +type V1ClusterProfilesUIDVariablesPutReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1ClusterProfilesUIDVariablesPutReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1ClusterProfilesUIDVariablesPutNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1ClusterProfilesUIDVariablesPutNoContent creates a V1ClusterProfilesUIDVariablesPutNoContent with default headers values +func NewV1ClusterProfilesUIDVariablesPutNoContent() *V1ClusterProfilesUIDVariablesPutNoContent { + return &V1ClusterProfilesUIDVariablesPutNoContent{} +} + +/* +V1ClusterProfilesUIDVariablesPutNoContent handles this case with default header values. + +The resource was updated successfully +*/ +type V1ClusterProfilesUIDVariablesPutNoContent struct { +} + +func (o *V1ClusterProfilesUIDVariablesPutNoContent) Error() string { + return fmt.Sprintf("[PUT /v1/clusterprofiles/{uid}/variables][%d] v1ClusterProfilesUidVariablesPutNoContent ", 204) +} + +func (o *V1ClusterProfilesUIDVariablesPutNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_cluster_profiles_update_parameters.go b/api/client/v1/v1_cluster_profiles_update_parameters.go new file mode 100644 index 00000000..858a3af5 --- /dev/null +++ b/api/client/v1/v1_cluster_profiles_update_parameters.go @@ -0,0 +1,189 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1ClusterProfilesUpdateParams creates a new V1ClusterProfilesUpdateParams object +// with the default values initialized. +func NewV1ClusterProfilesUpdateParams() *V1ClusterProfilesUpdateParams { + var () + return &V1ClusterProfilesUpdateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1ClusterProfilesUpdateParamsWithTimeout creates a new V1ClusterProfilesUpdateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1ClusterProfilesUpdateParamsWithTimeout(timeout time.Duration) *V1ClusterProfilesUpdateParams { + var () + return &V1ClusterProfilesUpdateParams{ + + timeout: timeout, + } +} + +// NewV1ClusterProfilesUpdateParamsWithContext creates a new V1ClusterProfilesUpdateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1ClusterProfilesUpdateParamsWithContext(ctx context.Context) *V1ClusterProfilesUpdateParams { + var () + return &V1ClusterProfilesUpdateParams{ + + Context: ctx, + } +} + +// NewV1ClusterProfilesUpdateParamsWithHTTPClient creates a new V1ClusterProfilesUpdateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1ClusterProfilesUpdateParamsWithHTTPClient(client *http.Client) *V1ClusterProfilesUpdateParams { + var () + return &V1ClusterProfilesUpdateParams{ + HTTPClient: client, + } +} + +/* +V1ClusterProfilesUpdateParams contains all the parameters to send to the API endpoint +for the v1 cluster profiles update operation typically these are written to a http.Request +*/ +type V1ClusterProfilesUpdateParams struct { + + /*Body*/ + Body *models.V1ClusterProfileUpdateEntity + /*IncludePackMeta + Comma seperated pack meta such as schema, presets + + */ + IncludePackMeta *string + /*UID + Cluster profile uid + + */ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cluster profiles update params +func (o *V1ClusterProfilesUpdateParams) WithTimeout(timeout time.Duration) *V1ClusterProfilesUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cluster profiles update params +func (o *V1ClusterProfilesUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cluster profiles update params +func (o *V1ClusterProfilesUpdateParams) WithContext(ctx context.Context) *V1ClusterProfilesUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cluster profiles update params +func (o *V1ClusterProfilesUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cluster profiles update params +func (o *V1ClusterProfilesUpdateParams) WithHTTPClient(client *http.Client) *V1ClusterProfilesUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cluster profiles update params +func (o *V1ClusterProfilesUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 cluster profiles update params +func (o *V1ClusterProfilesUpdateParams) WithBody(body *models.V1ClusterProfileUpdateEntity) *V1ClusterProfilesUpdateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 cluster profiles update params +func (o *V1ClusterProfilesUpdateParams) SetBody(body *models.V1ClusterProfileUpdateEntity) { + o.Body = body +} + +// WithIncludePackMeta adds the includePackMeta to the v1 cluster profiles update params +func (o *V1ClusterProfilesUpdateParams) WithIncludePackMeta(includePackMeta *string) *V1ClusterProfilesUpdateParams { + o.SetIncludePackMeta(includePackMeta) + return o +} + +// SetIncludePackMeta adds the includePackMeta to the v1 cluster profiles update params +func (o *V1ClusterProfilesUpdateParams) SetIncludePackMeta(includePackMeta *string) { + o.IncludePackMeta = includePackMeta +} + +// WithUID adds the uid to the v1 cluster profiles update params +func (o *V1ClusterProfilesUpdateParams) WithUID(uid string) *V1ClusterProfilesUpdateParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 cluster profiles update params +func (o *V1ClusterProfilesUpdateParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1ClusterProfilesUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + if o.IncludePackMeta != nil { + + // query param includePackMeta + var qrIncludePackMeta string + if o.IncludePackMeta != nil { + qrIncludePackMeta = *o.IncludePackMeta + } + qIncludePackMeta := qrIncludePackMeta + if qIncludePackMeta != "" { + if err := r.SetQueryParam("includePackMeta", qIncludePackMeta); err != nil { + return err + } + } + + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cluster_profiles_update_responses.go b/api/client/v1/v1_cluster_profiles_update_responses.go new file mode 100644 index 00000000..752fc3ac --- /dev/null +++ b/api/client/v1/v1_cluster_profiles_update_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1ClusterProfilesUpdateReader is a Reader for the V1ClusterProfilesUpdate structure. +type V1ClusterProfilesUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1ClusterProfilesUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1ClusterProfilesUpdateNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1ClusterProfilesUpdateNoContent creates a V1ClusterProfilesUpdateNoContent with default headers values +func NewV1ClusterProfilesUpdateNoContent() *V1ClusterProfilesUpdateNoContent { + return &V1ClusterProfilesUpdateNoContent{} +} + +/* +V1ClusterProfilesUpdateNoContent handles this case with default header values. + +The resource was updated successfully +*/ +type V1ClusterProfilesUpdateNoContent struct { +} + +func (o *V1ClusterProfilesUpdateNoContent) Error() string { + return fmt.Sprintf("[PUT /v1/clusterprofiles/{uid}][%d] v1ClusterProfilesUpdateNoContent ", 204) +} + +func (o *V1ClusterProfilesUpdateNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_cluster_profiles_validate_name_version_parameters.go b/api/client/v1/v1_cluster_profiles_validate_name_version_parameters.go new file mode 100644 index 00000000..036a4f50 --- /dev/null +++ b/api/client/v1/v1_cluster_profiles_validate_name_version_parameters.go @@ -0,0 +1,179 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1ClusterProfilesValidateNameVersionParams creates a new V1ClusterProfilesValidateNameVersionParams object +// with the default values initialized. +func NewV1ClusterProfilesValidateNameVersionParams() *V1ClusterProfilesValidateNameVersionParams { + var () + return &V1ClusterProfilesValidateNameVersionParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1ClusterProfilesValidateNameVersionParamsWithTimeout creates a new V1ClusterProfilesValidateNameVersionParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1ClusterProfilesValidateNameVersionParamsWithTimeout(timeout time.Duration) *V1ClusterProfilesValidateNameVersionParams { + var () + return &V1ClusterProfilesValidateNameVersionParams{ + + timeout: timeout, + } +} + +// NewV1ClusterProfilesValidateNameVersionParamsWithContext creates a new V1ClusterProfilesValidateNameVersionParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1ClusterProfilesValidateNameVersionParamsWithContext(ctx context.Context) *V1ClusterProfilesValidateNameVersionParams { + var () + return &V1ClusterProfilesValidateNameVersionParams{ + + Context: ctx, + } +} + +// NewV1ClusterProfilesValidateNameVersionParamsWithHTTPClient creates a new V1ClusterProfilesValidateNameVersionParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1ClusterProfilesValidateNameVersionParamsWithHTTPClient(client *http.Client) *V1ClusterProfilesValidateNameVersionParams { + var () + return &V1ClusterProfilesValidateNameVersionParams{ + HTTPClient: client, + } +} + +/* +V1ClusterProfilesValidateNameVersionParams contains all the parameters to send to the API endpoint +for the v1 cluster profiles validate name version operation typically these are written to a http.Request +*/ +type V1ClusterProfilesValidateNameVersionParams struct { + + /*Name + Cluster profile name + + */ + Name *string + /*Version + Cluster profile version + + */ + Version *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cluster profiles validate name version params +func (o *V1ClusterProfilesValidateNameVersionParams) WithTimeout(timeout time.Duration) *V1ClusterProfilesValidateNameVersionParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cluster profiles validate name version params +func (o *V1ClusterProfilesValidateNameVersionParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cluster profiles validate name version params +func (o *V1ClusterProfilesValidateNameVersionParams) WithContext(ctx context.Context) *V1ClusterProfilesValidateNameVersionParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cluster profiles validate name version params +func (o *V1ClusterProfilesValidateNameVersionParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cluster profiles validate name version params +func (o *V1ClusterProfilesValidateNameVersionParams) WithHTTPClient(client *http.Client) *V1ClusterProfilesValidateNameVersionParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cluster profiles validate name version params +func (o *V1ClusterProfilesValidateNameVersionParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithName adds the name to the v1 cluster profiles validate name version params +func (o *V1ClusterProfilesValidateNameVersionParams) WithName(name *string) *V1ClusterProfilesValidateNameVersionParams { + o.SetName(name) + return o +} + +// SetName adds the name to the v1 cluster profiles validate name version params +func (o *V1ClusterProfilesValidateNameVersionParams) SetName(name *string) { + o.Name = name +} + +// WithVersion adds the version to the v1 cluster profiles validate name version params +func (o *V1ClusterProfilesValidateNameVersionParams) WithVersion(version *string) *V1ClusterProfilesValidateNameVersionParams { + o.SetVersion(version) + return o +} + +// SetVersion adds the version to the v1 cluster profiles validate name version params +func (o *V1ClusterProfilesValidateNameVersionParams) SetVersion(version *string) { + o.Version = version +} + +// WriteToRequest writes these params to a swagger request +func (o *V1ClusterProfilesValidateNameVersionParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Name != nil { + + // query param name + var qrName string + if o.Name != nil { + qrName = *o.Name + } + qName := qrName + if qName != "" { + if err := r.SetQueryParam("name", qName); err != nil { + return err + } + } + + } + + if o.Version != nil { + + // query param version + var qrVersion string + if o.Version != nil { + qrVersion = *o.Version + } + qVersion := qrVersion + if qVersion != "" { + if err := r.SetQueryParam("version", qVersion); err != nil { + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cluster_profiles_validate_name_version_responses.go b/api/client/v1/v1_cluster_profiles_validate_name_version_responses.go new file mode 100644 index 00000000..45b5ab2c --- /dev/null +++ b/api/client/v1/v1_cluster_profiles_validate_name_version_responses.go @@ -0,0 +1,61 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1ClusterProfilesValidateNameVersionReader is a Reader for the V1ClusterProfilesValidateNameVersion structure. +type V1ClusterProfilesValidateNameVersionReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1ClusterProfilesValidateNameVersionReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1ClusterProfilesValidateNameVersionNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1ClusterProfilesValidateNameVersionNoContent creates a V1ClusterProfilesValidateNameVersionNoContent with default headers values +func NewV1ClusterProfilesValidateNameVersionNoContent() *V1ClusterProfilesValidateNameVersionNoContent { + return &V1ClusterProfilesValidateNameVersionNoContent{} +} + +/* +V1ClusterProfilesValidateNameVersionNoContent handles this case with default header values. + +Ok response without content +*/ +type V1ClusterProfilesValidateNameVersionNoContent struct { + /*Audit uid for the request + */ + AuditUID string +} + +func (o *V1ClusterProfilesValidateNameVersionNoContent) Error() string { + return fmt.Sprintf("[GET /v1/clusterprofiles/validate/name][%d] v1ClusterProfilesValidateNameVersionNoContent ", 204) +} + +func (o *V1ClusterProfilesValidateNameVersionNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header AuditUid + o.AuditUID = response.GetHeader("AuditUid") + + return nil +} diff --git a/api/client/v1/v1_cluster_profiles_validate_packs_parameters.go b/api/client/v1/v1_cluster_profiles_validate_packs_parameters.go new file mode 100644 index 00000000..69ae623d --- /dev/null +++ b/api/client/v1/v1_cluster_profiles_validate_packs_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1ClusterProfilesValidatePacksParams creates a new V1ClusterProfilesValidatePacksParams object +// with the default values initialized. +func NewV1ClusterProfilesValidatePacksParams() *V1ClusterProfilesValidatePacksParams { + var () + return &V1ClusterProfilesValidatePacksParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1ClusterProfilesValidatePacksParamsWithTimeout creates a new V1ClusterProfilesValidatePacksParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1ClusterProfilesValidatePacksParamsWithTimeout(timeout time.Duration) *V1ClusterProfilesValidatePacksParams { + var () + return &V1ClusterProfilesValidatePacksParams{ + + timeout: timeout, + } +} + +// NewV1ClusterProfilesValidatePacksParamsWithContext creates a new V1ClusterProfilesValidatePacksParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1ClusterProfilesValidatePacksParamsWithContext(ctx context.Context) *V1ClusterProfilesValidatePacksParams { + var () + return &V1ClusterProfilesValidatePacksParams{ + + Context: ctx, + } +} + +// NewV1ClusterProfilesValidatePacksParamsWithHTTPClient creates a new V1ClusterProfilesValidatePacksParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1ClusterProfilesValidatePacksParamsWithHTTPClient(client *http.Client) *V1ClusterProfilesValidatePacksParams { + var () + return &V1ClusterProfilesValidatePacksParams{ + HTTPClient: client, + } +} + +/* +V1ClusterProfilesValidatePacksParams contains all the parameters to send to the API endpoint +for the v1 cluster profiles validate packs operation typically these are written to a http.Request +*/ +type V1ClusterProfilesValidatePacksParams struct { + + /*Body*/ + Body *models.V1ClusterProfileTemplateDraft + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cluster profiles validate packs params +func (o *V1ClusterProfilesValidatePacksParams) WithTimeout(timeout time.Duration) *V1ClusterProfilesValidatePacksParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cluster profiles validate packs params +func (o *V1ClusterProfilesValidatePacksParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cluster profiles validate packs params +func (o *V1ClusterProfilesValidatePacksParams) WithContext(ctx context.Context) *V1ClusterProfilesValidatePacksParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cluster profiles validate packs params +func (o *V1ClusterProfilesValidatePacksParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cluster profiles validate packs params +func (o *V1ClusterProfilesValidatePacksParams) WithHTTPClient(client *http.Client) *V1ClusterProfilesValidatePacksParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cluster profiles validate packs params +func (o *V1ClusterProfilesValidatePacksParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 cluster profiles validate packs params +func (o *V1ClusterProfilesValidatePacksParams) WithBody(body *models.V1ClusterProfileTemplateDraft) *V1ClusterProfilesValidatePacksParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 cluster profiles validate packs params +func (o *V1ClusterProfilesValidatePacksParams) SetBody(body *models.V1ClusterProfileTemplateDraft) { + o.Body = body +} + +// WriteToRequest writes these params to a swagger request +func (o *V1ClusterProfilesValidatePacksParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cluster_profiles_validate_packs_responses.go b/api/client/v1/v1_cluster_profiles_validate_packs_responses.go new file mode 100644 index 00000000..a35b7570 --- /dev/null +++ b/api/client/v1/v1_cluster_profiles_validate_packs_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1ClusterProfilesValidatePacksReader is a Reader for the V1ClusterProfilesValidatePacks structure. +type V1ClusterProfilesValidatePacksReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1ClusterProfilesValidatePacksReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1ClusterProfilesValidatePacksOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1ClusterProfilesValidatePacksOK creates a V1ClusterProfilesValidatePacksOK with default headers values +func NewV1ClusterProfilesValidatePacksOK() *V1ClusterProfilesValidatePacksOK { + return &V1ClusterProfilesValidatePacksOK{} +} + +/* +V1ClusterProfilesValidatePacksOK handles this case with default header values. + +Cluster profile packs validation response +*/ +type V1ClusterProfilesValidatePacksOK struct { + Payload *models.V1ClusterProfileValidatorResponse +} + +func (o *V1ClusterProfilesValidatePacksOK) Error() string { + return fmt.Sprintf("[POST /v1/clusterprofiles/validate/packs][%d] v1ClusterProfilesValidatePacksOK %+v", 200, o.Payload) +} + +func (o *V1ClusterProfilesValidatePacksOK) GetPayload() *models.V1ClusterProfileValidatorResponse { + return o.Payload +} + +func (o *V1ClusterProfilesValidatePacksOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1ClusterProfileValidatorResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_cluster_vm_snapshots_list_parameters.go b/api/client/v1/v1_cluster_vm_snapshots_list_parameters.go new file mode 100644 index 00000000..48f1d577 --- /dev/null +++ b/api/client/v1/v1_cluster_vm_snapshots_list_parameters.go @@ -0,0 +1,262 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// NewV1ClusterVMSnapshotsListParams creates a new V1ClusterVMSnapshotsListParams object +// with the default values initialized. +func NewV1ClusterVMSnapshotsListParams() *V1ClusterVMSnapshotsListParams { + var ( + limitDefault = int64(50) + ) + return &V1ClusterVMSnapshotsListParams{ + Limit: &limitDefault, + + timeout: cr.DefaultTimeout, + } +} + +// NewV1ClusterVMSnapshotsListParamsWithTimeout creates a new V1ClusterVMSnapshotsListParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1ClusterVMSnapshotsListParamsWithTimeout(timeout time.Duration) *V1ClusterVMSnapshotsListParams { + var ( + limitDefault = int64(50) + ) + return &V1ClusterVMSnapshotsListParams{ + Limit: &limitDefault, + + timeout: timeout, + } +} + +// NewV1ClusterVMSnapshotsListParamsWithContext creates a new V1ClusterVMSnapshotsListParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1ClusterVMSnapshotsListParamsWithContext(ctx context.Context) *V1ClusterVMSnapshotsListParams { + var ( + limitDefault = int64(50) + ) + return &V1ClusterVMSnapshotsListParams{ + Limit: &limitDefault, + + Context: ctx, + } +} + +// NewV1ClusterVMSnapshotsListParamsWithHTTPClient creates a new V1ClusterVMSnapshotsListParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1ClusterVMSnapshotsListParamsWithHTTPClient(client *http.Client) *V1ClusterVMSnapshotsListParams { + var ( + limitDefault = int64(50) + ) + return &V1ClusterVMSnapshotsListParams{ + Limit: &limitDefault, + HTTPClient: client, + } +} + +/* +V1ClusterVMSnapshotsListParams contains all the parameters to send to the API endpoint +for the v1 cluster VM snapshots list operation typically these are written to a http.Request +*/ +type V1ClusterVMSnapshotsListParams struct { + + /*Continue + continue token to paginate the subsequent data items + + */ + Continue *string + /*Limit + limit is a maximum number of responses to return for a list call. Default and maximum value of the limit is 50. + If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. + + */ + Limit *int64 + /*Namespace + Namespace names, comma separated value (ex: dev,test). If namespace is empty it returns the specific resource under all namespace + + */ + Namespace []string + /*UID + Cluster uid + + */ + UID string + /*VMName + vmName is comma separated value (ex: name1,name2). + + */ + VMName []string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cluster VM snapshots list params +func (o *V1ClusterVMSnapshotsListParams) WithTimeout(timeout time.Duration) *V1ClusterVMSnapshotsListParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cluster VM snapshots list params +func (o *V1ClusterVMSnapshotsListParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cluster VM snapshots list params +func (o *V1ClusterVMSnapshotsListParams) WithContext(ctx context.Context) *V1ClusterVMSnapshotsListParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cluster VM snapshots list params +func (o *V1ClusterVMSnapshotsListParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cluster VM snapshots list params +func (o *V1ClusterVMSnapshotsListParams) WithHTTPClient(client *http.Client) *V1ClusterVMSnapshotsListParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cluster VM snapshots list params +func (o *V1ClusterVMSnapshotsListParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithContinue adds the continueVar to the v1 cluster VM snapshots list params +func (o *V1ClusterVMSnapshotsListParams) WithContinue(continueVar *string) *V1ClusterVMSnapshotsListParams { + o.SetContinue(continueVar) + return o +} + +// SetContinue adds the continue to the v1 cluster VM snapshots list params +func (o *V1ClusterVMSnapshotsListParams) SetContinue(continueVar *string) { + o.Continue = continueVar +} + +// WithLimit adds the limit to the v1 cluster VM snapshots list params +func (o *V1ClusterVMSnapshotsListParams) WithLimit(limit *int64) *V1ClusterVMSnapshotsListParams { + o.SetLimit(limit) + return o +} + +// SetLimit adds the limit to the v1 cluster VM snapshots list params +func (o *V1ClusterVMSnapshotsListParams) SetLimit(limit *int64) { + o.Limit = limit +} + +// WithNamespace adds the namespace to the v1 cluster VM snapshots list params +func (o *V1ClusterVMSnapshotsListParams) WithNamespace(namespace []string) *V1ClusterVMSnapshotsListParams { + o.SetNamespace(namespace) + return o +} + +// SetNamespace adds the namespace to the v1 cluster VM snapshots list params +func (o *V1ClusterVMSnapshotsListParams) SetNamespace(namespace []string) { + o.Namespace = namespace +} + +// WithUID adds the uid to the v1 cluster VM snapshots list params +func (o *V1ClusterVMSnapshotsListParams) WithUID(uid string) *V1ClusterVMSnapshotsListParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 cluster VM snapshots list params +func (o *V1ClusterVMSnapshotsListParams) SetUID(uid string) { + o.UID = uid +} + +// WithVMName adds the vMName to the v1 cluster VM snapshots list params +func (o *V1ClusterVMSnapshotsListParams) WithVMName(vMName []string) *V1ClusterVMSnapshotsListParams { + o.SetVMName(vMName) + return o +} + +// SetVMName adds the vmName to the v1 cluster VM snapshots list params +func (o *V1ClusterVMSnapshotsListParams) SetVMName(vMName []string) { + o.VMName = vMName +} + +// WriteToRequest writes these params to a swagger request +func (o *V1ClusterVMSnapshotsListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Continue != nil { + + // query param continue + var qrContinue string + if o.Continue != nil { + qrContinue = *o.Continue + } + qContinue := qrContinue + if qContinue != "" { + if err := r.SetQueryParam("continue", qContinue); err != nil { + return err + } + } + + } + + if o.Limit != nil { + + // query param limit + var qrLimit int64 + if o.Limit != nil { + qrLimit = *o.Limit + } + qLimit := swag.FormatInt64(qrLimit) + if qLimit != "" { + if err := r.SetQueryParam("limit", qLimit); err != nil { + return err + } + } + + } + + valuesNamespace := o.Namespace + + joinedNamespace := swag.JoinByFormat(valuesNamespace, "csv") + // query array param namespace + if err := r.SetQueryParam("namespace", joinedNamespace...); err != nil { + return err + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + valuesVMName := o.VMName + + joinedVMName := swag.JoinByFormat(valuesVMName, "csv") + // query array param vmName + if err := r.SetQueryParam("vmName", joinedVMName...); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cluster_vm_snapshots_list_responses.go b/api/client/v1/v1_cluster_vm_snapshots_list_responses.go new file mode 100644 index 00000000..c92f8226 --- /dev/null +++ b/api/client/v1/v1_cluster_vm_snapshots_list_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1ClusterVMSnapshotsListReader is a Reader for the V1ClusterVMSnapshotsList structure. +type V1ClusterVMSnapshotsListReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1ClusterVMSnapshotsListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1ClusterVMSnapshotsListOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1ClusterVMSnapshotsListOK creates a V1ClusterVMSnapshotsListOK with default headers values +func NewV1ClusterVMSnapshotsListOK() *V1ClusterVMSnapshotsListOK { + return &V1ClusterVMSnapshotsListOK{} +} + +/* +V1ClusterVMSnapshotsListOK handles this case with default header values. + +OK +*/ +type V1ClusterVMSnapshotsListOK struct { + Payload *models.V1VirtualMachineSnapshotList +} + +func (o *V1ClusterVMSnapshotsListOK) Error() string { + return fmt.Sprintf("[GET /v1/spectroclusters/{uid}/vms/snapshot][%d] v1ClusterVmSnapshotsListOK %+v", 200, o.Payload) +} + +func (o *V1ClusterVMSnapshotsListOK) GetPayload() *models.V1VirtualMachineSnapshotList { + return o.Payload +} + +func (o *V1ClusterVMSnapshotsListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1VirtualMachineSnapshotList) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_control_plane_health_check_timeout_update_parameters.go b/api/client/v1/v1_control_plane_health_check_timeout_update_parameters.go new file mode 100644 index 00000000..fc651f22 --- /dev/null +++ b/api/client/v1/v1_control_plane_health_check_timeout_update_parameters.go @@ -0,0 +1,157 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1ControlPlaneHealthCheckTimeoutUpdateParams creates a new V1ControlPlaneHealthCheckTimeoutUpdateParams object +// with the default values initialized. +func NewV1ControlPlaneHealthCheckTimeoutUpdateParams() *V1ControlPlaneHealthCheckTimeoutUpdateParams { + var () + return &V1ControlPlaneHealthCheckTimeoutUpdateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1ControlPlaneHealthCheckTimeoutUpdateParamsWithTimeout creates a new V1ControlPlaneHealthCheckTimeoutUpdateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1ControlPlaneHealthCheckTimeoutUpdateParamsWithTimeout(timeout time.Duration) *V1ControlPlaneHealthCheckTimeoutUpdateParams { + var () + return &V1ControlPlaneHealthCheckTimeoutUpdateParams{ + + timeout: timeout, + } +} + +// NewV1ControlPlaneHealthCheckTimeoutUpdateParamsWithContext creates a new V1ControlPlaneHealthCheckTimeoutUpdateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1ControlPlaneHealthCheckTimeoutUpdateParamsWithContext(ctx context.Context) *V1ControlPlaneHealthCheckTimeoutUpdateParams { + var () + return &V1ControlPlaneHealthCheckTimeoutUpdateParams{ + + Context: ctx, + } +} + +// NewV1ControlPlaneHealthCheckTimeoutUpdateParamsWithHTTPClient creates a new V1ControlPlaneHealthCheckTimeoutUpdateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1ControlPlaneHealthCheckTimeoutUpdateParamsWithHTTPClient(client *http.Client) *V1ControlPlaneHealthCheckTimeoutUpdateParams { + var () + return &V1ControlPlaneHealthCheckTimeoutUpdateParams{ + HTTPClient: client, + } +} + +/* +V1ControlPlaneHealthCheckTimeoutUpdateParams contains all the parameters to send to the API endpoint +for the v1 control plane health check timeout update operation typically these are written to a http.Request +*/ +type V1ControlPlaneHealthCheckTimeoutUpdateParams struct { + + /*Body*/ + Body *models.V1ControlPlaneHealthCheckTimeoutEntity + /*UID + Cluster uid + + */ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 control plane health check timeout update params +func (o *V1ControlPlaneHealthCheckTimeoutUpdateParams) WithTimeout(timeout time.Duration) *V1ControlPlaneHealthCheckTimeoutUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 control plane health check timeout update params +func (o *V1ControlPlaneHealthCheckTimeoutUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 control plane health check timeout update params +func (o *V1ControlPlaneHealthCheckTimeoutUpdateParams) WithContext(ctx context.Context) *V1ControlPlaneHealthCheckTimeoutUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 control plane health check timeout update params +func (o *V1ControlPlaneHealthCheckTimeoutUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 control plane health check timeout update params +func (o *V1ControlPlaneHealthCheckTimeoutUpdateParams) WithHTTPClient(client *http.Client) *V1ControlPlaneHealthCheckTimeoutUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 control plane health check timeout update params +func (o *V1ControlPlaneHealthCheckTimeoutUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 control plane health check timeout update params +func (o *V1ControlPlaneHealthCheckTimeoutUpdateParams) WithBody(body *models.V1ControlPlaneHealthCheckTimeoutEntity) *V1ControlPlaneHealthCheckTimeoutUpdateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 control plane health check timeout update params +func (o *V1ControlPlaneHealthCheckTimeoutUpdateParams) SetBody(body *models.V1ControlPlaneHealthCheckTimeoutEntity) { + o.Body = body +} + +// WithUID adds the uid to the v1 control plane health check timeout update params +func (o *V1ControlPlaneHealthCheckTimeoutUpdateParams) WithUID(uid string) *V1ControlPlaneHealthCheckTimeoutUpdateParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 control plane health check timeout update params +func (o *V1ControlPlaneHealthCheckTimeoutUpdateParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1ControlPlaneHealthCheckTimeoutUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_control_plane_health_check_timeout_update_responses.go b/api/client/v1/v1_control_plane_health_check_timeout_update_responses.go new file mode 100644 index 00000000..5cbc1da0 --- /dev/null +++ b/api/client/v1/v1_control_plane_health_check_timeout_update_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1ControlPlaneHealthCheckTimeoutUpdateReader is a Reader for the V1ControlPlaneHealthCheckTimeoutUpdate structure. +type V1ControlPlaneHealthCheckTimeoutUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1ControlPlaneHealthCheckTimeoutUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1ControlPlaneHealthCheckTimeoutUpdateNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1ControlPlaneHealthCheckTimeoutUpdateNoContent creates a V1ControlPlaneHealthCheckTimeoutUpdateNoContent with default headers values +func NewV1ControlPlaneHealthCheckTimeoutUpdateNoContent() *V1ControlPlaneHealthCheckTimeoutUpdateNoContent { + return &V1ControlPlaneHealthCheckTimeoutUpdateNoContent{} +} + +/* +V1ControlPlaneHealthCheckTimeoutUpdateNoContent handles this case with default header values. + +The resource was updated successfully +*/ +type V1ControlPlaneHealthCheckTimeoutUpdateNoContent struct { +} + +func (o *V1ControlPlaneHealthCheckTimeoutUpdateNoContent) Error() string { + return fmt.Sprintf("[PATCH /v1/spectroclusters/{uid}/clusterConfig/controlPlaneHealthCheckTimeout][%d] v1ControlPlaneHealthCheckTimeoutUpdateNoContent ", 204) +} + +func (o *V1ControlPlaneHealthCheckTimeoutUpdateNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_cox_edge_account_validate_parameters.go b/api/client/v1/v1_cox_edge_account_validate_parameters.go new file mode 100644 index 00000000..fa2f57d6 --- /dev/null +++ b/api/client/v1/v1_cox_edge_account_validate_parameters.go @@ -0,0 +1,139 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1CoxEdgeAccountValidateParams creates a new V1CoxEdgeAccountValidateParams object +// with the default values initialized. +func NewV1CoxEdgeAccountValidateParams() *V1CoxEdgeAccountValidateParams { + var () + return &V1CoxEdgeAccountValidateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CoxEdgeAccountValidateParamsWithTimeout creates a new V1CoxEdgeAccountValidateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CoxEdgeAccountValidateParamsWithTimeout(timeout time.Duration) *V1CoxEdgeAccountValidateParams { + var () + return &V1CoxEdgeAccountValidateParams{ + + timeout: timeout, + } +} + +// NewV1CoxEdgeAccountValidateParamsWithContext creates a new V1CoxEdgeAccountValidateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CoxEdgeAccountValidateParamsWithContext(ctx context.Context) *V1CoxEdgeAccountValidateParams { + var () + return &V1CoxEdgeAccountValidateParams{ + + Context: ctx, + } +} + +// NewV1CoxEdgeAccountValidateParamsWithHTTPClient creates a new V1CoxEdgeAccountValidateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CoxEdgeAccountValidateParamsWithHTTPClient(client *http.Client) *V1CoxEdgeAccountValidateParams { + var () + return &V1CoxEdgeAccountValidateParams{ + HTTPClient: client, + } +} + +/* +V1CoxEdgeAccountValidateParams contains all the parameters to send to the API endpoint +for the v1 cox edge account validate operation typically these are written to a http.Request +*/ +type V1CoxEdgeAccountValidateParams struct { + + /*Account + Request payload to validate CoxEdge cloud account + + */ + Account *models.V1CoxEdgeCloudAccount + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cox edge account validate params +func (o *V1CoxEdgeAccountValidateParams) WithTimeout(timeout time.Duration) *V1CoxEdgeAccountValidateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cox edge account validate params +func (o *V1CoxEdgeAccountValidateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cox edge account validate params +func (o *V1CoxEdgeAccountValidateParams) WithContext(ctx context.Context) *V1CoxEdgeAccountValidateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cox edge account validate params +func (o *V1CoxEdgeAccountValidateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cox edge account validate params +func (o *V1CoxEdgeAccountValidateParams) WithHTTPClient(client *http.Client) *V1CoxEdgeAccountValidateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cox edge account validate params +func (o *V1CoxEdgeAccountValidateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithAccount adds the account to the v1 cox edge account validate params +func (o *V1CoxEdgeAccountValidateParams) WithAccount(account *models.V1CoxEdgeCloudAccount) *V1CoxEdgeAccountValidateParams { + o.SetAccount(account) + return o +} + +// SetAccount adds the account to the v1 cox edge account validate params +func (o *V1CoxEdgeAccountValidateParams) SetAccount(account *models.V1CoxEdgeCloudAccount) { + o.Account = account +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CoxEdgeAccountValidateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Account != nil { + if err := r.SetBodyParam(o.Account); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cox_edge_account_validate_responses.go b/api/client/v1/v1_cox_edge_account_validate_responses.go new file mode 100644 index 00000000..04bb52e5 --- /dev/null +++ b/api/client/v1/v1_cox_edge_account_validate_responses.go @@ -0,0 +1,61 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1CoxEdgeAccountValidateReader is a Reader for the V1CoxEdgeAccountValidate structure. +type V1CoxEdgeAccountValidateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CoxEdgeAccountValidateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1CoxEdgeAccountValidateNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CoxEdgeAccountValidateNoContent creates a V1CoxEdgeAccountValidateNoContent with default headers values +func NewV1CoxEdgeAccountValidateNoContent() *V1CoxEdgeAccountValidateNoContent { + return &V1CoxEdgeAccountValidateNoContent{} +} + +/* +V1CoxEdgeAccountValidateNoContent handles this case with default header values. + +Ok response without content +*/ +type V1CoxEdgeAccountValidateNoContent struct { + /*Audit uid for the request + */ + AuditUID string +} + +func (o *V1CoxEdgeAccountValidateNoContent) Error() string { + return fmt.Sprintf("[POST /v1/clouds/coxedge/account/validate][%d] v1CoxEdgeAccountValidateNoContent ", 204) +} + +func (o *V1CoxEdgeAccountValidateNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header AuditUid + o.AuditUID = response.GetHeader("AuditUid") + + return nil +} diff --git a/api/client/v1/v1_cox_edge_base_urls_parameters.go b/api/client/v1/v1_cox_edge_base_urls_parameters.go new file mode 100644 index 00000000..6fcfc244 --- /dev/null +++ b/api/client/v1/v1_cox_edge_base_urls_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1CoxEdgeBaseUrlsParams creates a new V1CoxEdgeBaseUrlsParams object +// with the default values initialized. +func NewV1CoxEdgeBaseUrlsParams() *V1CoxEdgeBaseUrlsParams { + + return &V1CoxEdgeBaseUrlsParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CoxEdgeBaseUrlsParamsWithTimeout creates a new V1CoxEdgeBaseUrlsParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CoxEdgeBaseUrlsParamsWithTimeout(timeout time.Duration) *V1CoxEdgeBaseUrlsParams { + + return &V1CoxEdgeBaseUrlsParams{ + + timeout: timeout, + } +} + +// NewV1CoxEdgeBaseUrlsParamsWithContext creates a new V1CoxEdgeBaseUrlsParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CoxEdgeBaseUrlsParamsWithContext(ctx context.Context) *V1CoxEdgeBaseUrlsParams { + + return &V1CoxEdgeBaseUrlsParams{ + + Context: ctx, + } +} + +// NewV1CoxEdgeBaseUrlsParamsWithHTTPClient creates a new V1CoxEdgeBaseUrlsParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CoxEdgeBaseUrlsParamsWithHTTPClient(client *http.Client) *V1CoxEdgeBaseUrlsParams { + + return &V1CoxEdgeBaseUrlsParams{ + HTTPClient: client, + } +} + +/* +V1CoxEdgeBaseUrlsParams contains all the parameters to send to the API endpoint +for the v1 cox edge base urls operation typically these are written to a http.Request +*/ +type V1CoxEdgeBaseUrlsParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cox edge base urls params +func (o *V1CoxEdgeBaseUrlsParams) WithTimeout(timeout time.Duration) *V1CoxEdgeBaseUrlsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cox edge base urls params +func (o *V1CoxEdgeBaseUrlsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cox edge base urls params +func (o *V1CoxEdgeBaseUrlsParams) WithContext(ctx context.Context) *V1CoxEdgeBaseUrlsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cox edge base urls params +func (o *V1CoxEdgeBaseUrlsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cox edge base urls params +func (o *V1CoxEdgeBaseUrlsParams) WithHTTPClient(client *http.Client) *V1CoxEdgeBaseUrlsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cox edge base urls params +func (o *V1CoxEdgeBaseUrlsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CoxEdgeBaseUrlsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cox_edge_base_urls_responses.go b/api/client/v1/v1_cox_edge_base_urls_responses.go new file mode 100644 index 00000000..50201905 --- /dev/null +++ b/api/client/v1/v1_cox_edge_base_urls_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1CoxEdgeBaseUrlsReader is a Reader for the V1CoxEdgeBaseUrls structure. +type V1CoxEdgeBaseUrlsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CoxEdgeBaseUrlsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1CoxEdgeBaseUrlsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CoxEdgeBaseUrlsOK creates a V1CoxEdgeBaseUrlsOK with default headers values +func NewV1CoxEdgeBaseUrlsOK() *V1CoxEdgeBaseUrlsOK { + return &V1CoxEdgeBaseUrlsOK{} +} + +/* +V1CoxEdgeBaseUrlsOK handles this case with default header values. + +(empty) +*/ +type V1CoxEdgeBaseUrlsOK struct { + Payload *models.V1CoxEdgeBaseUrls +} + +func (o *V1CoxEdgeBaseUrlsOK) Error() string { + return fmt.Sprintf("[GET /v1/clouds/coxedge/default/baseurls][%d] v1CoxEdgeBaseUrlsOK %+v", 200, o.Payload) +} + +func (o *V1CoxEdgeBaseUrlsOK) GetPayload() *models.V1CoxEdgeBaseUrls { + return o.Payload +} + +func (o *V1CoxEdgeBaseUrlsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1CoxEdgeBaseUrls) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_cox_edge_environments_get_parameters.go b/api/client/v1/v1_cox_edge_environments_get_parameters.go new file mode 100644 index 00000000..32caa7f0 --- /dev/null +++ b/api/client/v1/v1_cox_edge_environments_get_parameters.go @@ -0,0 +1,172 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1CoxEdgeEnvironmentsGetParams creates a new V1CoxEdgeEnvironmentsGetParams object +// with the default values initialized. +func NewV1CoxEdgeEnvironmentsGetParams() *V1CoxEdgeEnvironmentsGetParams { + var () + return &V1CoxEdgeEnvironmentsGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CoxEdgeEnvironmentsGetParamsWithTimeout creates a new V1CoxEdgeEnvironmentsGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CoxEdgeEnvironmentsGetParamsWithTimeout(timeout time.Duration) *V1CoxEdgeEnvironmentsGetParams { + var () + return &V1CoxEdgeEnvironmentsGetParams{ + + timeout: timeout, + } +} + +// NewV1CoxEdgeEnvironmentsGetParamsWithContext creates a new V1CoxEdgeEnvironmentsGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CoxEdgeEnvironmentsGetParamsWithContext(ctx context.Context) *V1CoxEdgeEnvironmentsGetParams { + var () + return &V1CoxEdgeEnvironmentsGetParams{ + + Context: ctx, + } +} + +// NewV1CoxEdgeEnvironmentsGetParamsWithHTTPClient creates a new V1CoxEdgeEnvironmentsGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CoxEdgeEnvironmentsGetParamsWithHTTPClient(client *http.Client) *V1CoxEdgeEnvironmentsGetParams { + var () + return &V1CoxEdgeEnvironmentsGetParams{ + HTTPClient: client, + } +} + +/* +V1CoxEdgeEnvironmentsGetParams contains all the parameters to send to the API endpoint +for the v1 cox edge environments get operation typically these are written to a http.Request +*/ +type V1CoxEdgeEnvironmentsGetParams struct { + + /*CloudAccountUID + Uid for the specific CoxEdge cloud account + + */ + CloudAccountUID string + /*OrganizationID + OrganizationId for the specific CoxEdge account + + */ + OrganizationID *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cox edge environments get params +func (o *V1CoxEdgeEnvironmentsGetParams) WithTimeout(timeout time.Duration) *V1CoxEdgeEnvironmentsGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cox edge environments get params +func (o *V1CoxEdgeEnvironmentsGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cox edge environments get params +func (o *V1CoxEdgeEnvironmentsGetParams) WithContext(ctx context.Context) *V1CoxEdgeEnvironmentsGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cox edge environments get params +func (o *V1CoxEdgeEnvironmentsGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cox edge environments get params +func (o *V1CoxEdgeEnvironmentsGetParams) WithHTTPClient(client *http.Client) *V1CoxEdgeEnvironmentsGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cox edge environments get params +func (o *V1CoxEdgeEnvironmentsGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithCloudAccountUID adds the cloudAccountUID to the v1 cox edge environments get params +func (o *V1CoxEdgeEnvironmentsGetParams) WithCloudAccountUID(cloudAccountUID string) *V1CoxEdgeEnvironmentsGetParams { + o.SetCloudAccountUID(cloudAccountUID) + return o +} + +// SetCloudAccountUID adds the cloudAccountUid to the v1 cox edge environments get params +func (o *V1CoxEdgeEnvironmentsGetParams) SetCloudAccountUID(cloudAccountUID string) { + o.CloudAccountUID = cloudAccountUID +} + +// WithOrganizationID adds the organizationID to the v1 cox edge environments get params +func (o *V1CoxEdgeEnvironmentsGetParams) WithOrganizationID(organizationID *string) *V1CoxEdgeEnvironmentsGetParams { + o.SetOrganizationID(organizationID) + return o +} + +// SetOrganizationID adds the organizationId to the v1 cox edge environments get params +func (o *V1CoxEdgeEnvironmentsGetParams) SetOrganizationID(organizationID *string) { + o.OrganizationID = organizationID +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CoxEdgeEnvironmentsGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // query param cloudAccountUid + qrCloudAccountUID := o.CloudAccountUID + qCloudAccountUID := qrCloudAccountUID + if qCloudAccountUID != "" { + if err := r.SetQueryParam("cloudAccountUid", qCloudAccountUID); err != nil { + return err + } + } + + if o.OrganizationID != nil { + + // query param organizationId + var qrOrganizationID string + if o.OrganizationID != nil { + qrOrganizationID = *o.OrganizationID + } + qOrganizationID := qrOrganizationID + if qOrganizationID != "" { + if err := r.SetQueryParam("organizationId", qOrganizationID); err != nil { + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cox_edge_environments_get_responses.go b/api/client/v1/v1_cox_edge_environments_get_responses.go new file mode 100644 index 00000000..c6287a47 --- /dev/null +++ b/api/client/v1/v1_cox_edge_environments_get_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1CoxEdgeEnvironmentsGetReader is a Reader for the V1CoxEdgeEnvironmentsGet structure. +type V1CoxEdgeEnvironmentsGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CoxEdgeEnvironmentsGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1CoxEdgeEnvironmentsGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CoxEdgeEnvironmentsGetOK creates a V1CoxEdgeEnvironmentsGetOK with default headers values +func NewV1CoxEdgeEnvironmentsGetOK() *V1CoxEdgeEnvironmentsGetOK { + return &V1CoxEdgeEnvironmentsGetOK{} +} + +/* +V1CoxEdgeEnvironmentsGetOK handles this case with default header values. + +List of CoxEdge environments +*/ +type V1CoxEdgeEnvironmentsGetOK struct { + Payload *models.V1CoxEdgeEnvironments +} + +func (o *V1CoxEdgeEnvironmentsGetOK) Error() string { + return fmt.Sprintf("[GET /v1/clouds/coxedge/environments][%d] v1CoxEdgeEnvironmentsGetOK %+v", 200, o.Payload) +} + +func (o *V1CoxEdgeEnvironmentsGetOK) GetPayload() *models.V1CoxEdgeEnvironments { + return o.Payload +} + +func (o *V1CoxEdgeEnvironmentsGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1CoxEdgeEnvironments) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_cox_edge_environments_parameters.go b/api/client/v1/v1_cox_edge_environments_parameters.go new file mode 100644 index 00000000..e6c7ca34 --- /dev/null +++ b/api/client/v1/v1_cox_edge_environments_parameters.go @@ -0,0 +1,139 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1CoxEdgeEnvironmentsParams creates a new V1CoxEdgeEnvironmentsParams object +// with the default values initialized. +func NewV1CoxEdgeEnvironmentsParams() *V1CoxEdgeEnvironmentsParams { + var () + return &V1CoxEdgeEnvironmentsParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CoxEdgeEnvironmentsParamsWithTimeout creates a new V1CoxEdgeEnvironmentsParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CoxEdgeEnvironmentsParamsWithTimeout(timeout time.Duration) *V1CoxEdgeEnvironmentsParams { + var () + return &V1CoxEdgeEnvironmentsParams{ + + timeout: timeout, + } +} + +// NewV1CoxEdgeEnvironmentsParamsWithContext creates a new V1CoxEdgeEnvironmentsParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CoxEdgeEnvironmentsParamsWithContext(ctx context.Context) *V1CoxEdgeEnvironmentsParams { + var () + return &V1CoxEdgeEnvironmentsParams{ + + Context: ctx, + } +} + +// NewV1CoxEdgeEnvironmentsParamsWithHTTPClient creates a new V1CoxEdgeEnvironmentsParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CoxEdgeEnvironmentsParamsWithHTTPClient(client *http.Client) *V1CoxEdgeEnvironmentsParams { + var () + return &V1CoxEdgeEnvironmentsParams{ + HTTPClient: client, + } +} + +/* +V1CoxEdgeEnvironmentsParams contains all the parameters to send to the API endpoint +for the v1 cox edge environments operation typically these are written to a http.Request +*/ +type V1CoxEdgeEnvironmentsParams struct { + + /*Spec + Request payload to get CoxEdge environments + + */ + Spec *models.V1CoxEdgeEnvironmentsRequest + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cox edge environments params +func (o *V1CoxEdgeEnvironmentsParams) WithTimeout(timeout time.Duration) *V1CoxEdgeEnvironmentsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cox edge environments params +func (o *V1CoxEdgeEnvironmentsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cox edge environments params +func (o *V1CoxEdgeEnvironmentsParams) WithContext(ctx context.Context) *V1CoxEdgeEnvironmentsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cox edge environments params +func (o *V1CoxEdgeEnvironmentsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cox edge environments params +func (o *V1CoxEdgeEnvironmentsParams) WithHTTPClient(client *http.Client) *V1CoxEdgeEnvironmentsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cox edge environments params +func (o *V1CoxEdgeEnvironmentsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithSpec adds the spec to the v1 cox edge environments params +func (o *V1CoxEdgeEnvironmentsParams) WithSpec(spec *models.V1CoxEdgeEnvironmentsRequest) *V1CoxEdgeEnvironmentsParams { + o.SetSpec(spec) + return o +} + +// SetSpec adds the spec to the v1 cox edge environments params +func (o *V1CoxEdgeEnvironmentsParams) SetSpec(spec *models.V1CoxEdgeEnvironmentsRequest) { + o.Spec = spec +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CoxEdgeEnvironmentsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Spec != nil { + if err := r.SetBodyParam(o.Spec); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cox_edge_environments_responses.go b/api/client/v1/v1_cox_edge_environments_responses.go new file mode 100644 index 00000000..22fbbfc1 --- /dev/null +++ b/api/client/v1/v1_cox_edge_environments_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1CoxEdgeEnvironmentsReader is a Reader for the V1CoxEdgeEnvironments structure. +type V1CoxEdgeEnvironmentsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CoxEdgeEnvironmentsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1CoxEdgeEnvironmentsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CoxEdgeEnvironmentsOK creates a V1CoxEdgeEnvironmentsOK with default headers values +func NewV1CoxEdgeEnvironmentsOK() *V1CoxEdgeEnvironmentsOK { + return &V1CoxEdgeEnvironmentsOK{} +} + +/* +V1CoxEdgeEnvironmentsOK handles this case with default header values. + +List of CoxEdge environments +*/ +type V1CoxEdgeEnvironmentsOK struct { + Payload *models.V1CoxEdgeEnvironments +} + +func (o *V1CoxEdgeEnvironmentsOK) Error() string { + return fmt.Sprintf("[POST /v1/clouds/coxedge/environments][%d] v1CoxEdgeEnvironmentsOK %+v", 200, o.Payload) +} + +func (o *V1CoxEdgeEnvironmentsOK) GetPayload() *models.V1CoxEdgeEnvironments { + return o.Payload +} + +func (o *V1CoxEdgeEnvironmentsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1CoxEdgeEnvironments) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_cox_edge_instance_types_parameters.go b/api/client/v1/v1_cox_edge_instance_types_parameters.go new file mode 100644 index 00000000..52bf614c --- /dev/null +++ b/api/client/v1/v1_cox_edge_instance_types_parameters.go @@ -0,0 +1,201 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// NewV1CoxEdgeInstanceTypesParams creates a new V1CoxEdgeInstanceTypesParams object +// with the default values initialized. +func NewV1CoxEdgeInstanceTypesParams() *V1CoxEdgeInstanceTypesParams { + var () + return &V1CoxEdgeInstanceTypesParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CoxEdgeInstanceTypesParamsWithTimeout creates a new V1CoxEdgeInstanceTypesParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CoxEdgeInstanceTypesParamsWithTimeout(timeout time.Duration) *V1CoxEdgeInstanceTypesParams { + var () + return &V1CoxEdgeInstanceTypesParams{ + + timeout: timeout, + } +} + +// NewV1CoxEdgeInstanceTypesParamsWithContext creates a new V1CoxEdgeInstanceTypesParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CoxEdgeInstanceTypesParamsWithContext(ctx context.Context) *V1CoxEdgeInstanceTypesParams { + var () + return &V1CoxEdgeInstanceTypesParams{ + + Context: ctx, + } +} + +// NewV1CoxEdgeInstanceTypesParamsWithHTTPClient creates a new V1CoxEdgeInstanceTypesParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CoxEdgeInstanceTypesParamsWithHTTPClient(client *http.Client) *V1CoxEdgeInstanceTypesParams { + var () + return &V1CoxEdgeInstanceTypesParams{ + HTTPClient: client, + } +} + +/* +V1CoxEdgeInstanceTypesParams contains all the parameters to send to the API endpoint +for the v1 cox edge instance types operation typically these are written to a http.Request +*/ +type V1CoxEdgeInstanceTypesParams struct { + + /*CPUGtEq + Filter for instances having cpu greater than or equal + + */ + CPUGtEq *float64 + /*MemoryGtEq + Filter for instances having memory greater than or equal + + */ + MemoryGtEq *float64 + /*Region + Region for which CoxEdge instances are listed + + */ + Region string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cox edge instance types params +func (o *V1CoxEdgeInstanceTypesParams) WithTimeout(timeout time.Duration) *V1CoxEdgeInstanceTypesParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cox edge instance types params +func (o *V1CoxEdgeInstanceTypesParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cox edge instance types params +func (o *V1CoxEdgeInstanceTypesParams) WithContext(ctx context.Context) *V1CoxEdgeInstanceTypesParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cox edge instance types params +func (o *V1CoxEdgeInstanceTypesParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cox edge instance types params +func (o *V1CoxEdgeInstanceTypesParams) WithHTTPClient(client *http.Client) *V1CoxEdgeInstanceTypesParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cox edge instance types params +func (o *V1CoxEdgeInstanceTypesParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithCPUGtEq adds the cPUGtEq to the v1 cox edge instance types params +func (o *V1CoxEdgeInstanceTypesParams) WithCPUGtEq(cPUGtEq *float64) *V1CoxEdgeInstanceTypesParams { + o.SetCPUGtEq(cPUGtEq) + return o +} + +// SetCPUGtEq adds the cpuGtEq to the v1 cox edge instance types params +func (o *V1CoxEdgeInstanceTypesParams) SetCPUGtEq(cPUGtEq *float64) { + o.CPUGtEq = cPUGtEq +} + +// WithMemoryGtEq adds the memoryGtEq to the v1 cox edge instance types params +func (o *V1CoxEdgeInstanceTypesParams) WithMemoryGtEq(memoryGtEq *float64) *V1CoxEdgeInstanceTypesParams { + o.SetMemoryGtEq(memoryGtEq) + return o +} + +// SetMemoryGtEq adds the memoryGtEq to the v1 cox edge instance types params +func (o *V1CoxEdgeInstanceTypesParams) SetMemoryGtEq(memoryGtEq *float64) { + o.MemoryGtEq = memoryGtEq +} + +// WithRegion adds the region to the v1 cox edge instance types params +func (o *V1CoxEdgeInstanceTypesParams) WithRegion(region string) *V1CoxEdgeInstanceTypesParams { + o.SetRegion(region) + return o +} + +// SetRegion adds the region to the v1 cox edge instance types params +func (o *V1CoxEdgeInstanceTypesParams) SetRegion(region string) { + o.Region = region +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CoxEdgeInstanceTypesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.CPUGtEq != nil { + + // query param cpuGtEq + var qrCPUGtEq float64 + if o.CPUGtEq != nil { + qrCPUGtEq = *o.CPUGtEq + } + qCPUGtEq := swag.FormatFloat64(qrCPUGtEq) + if qCPUGtEq != "" { + if err := r.SetQueryParam("cpuGtEq", qCPUGtEq); err != nil { + return err + } + } + + } + + if o.MemoryGtEq != nil { + + // query param memoryGtEq + var qrMemoryGtEq float64 + if o.MemoryGtEq != nil { + qrMemoryGtEq = *o.MemoryGtEq + } + qMemoryGtEq := swag.FormatFloat64(qrMemoryGtEq) + if qMemoryGtEq != "" { + if err := r.SetQueryParam("memoryGtEq", qMemoryGtEq); err != nil { + return err + } + } + + } + + // path param region + if err := r.SetPathParam("region", o.Region); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cox_edge_instance_types_responses.go b/api/client/v1/v1_cox_edge_instance_types_responses.go new file mode 100644 index 00000000..8b156590 --- /dev/null +++ b/api/client/v1/v1_cox_edge_instance_types_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1CoxEdgeInstanceTypesReader is a Reader for the V1CoxEdgeInstanceTypes structure. +type V1CoxEdgeInstanceTypesReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CoxEdgeInstanceTypesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1CoxEdgeInstanceTypesOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CoxEdgeInstanceTypesOK creates a V1CoxEdgeInstanceTypesOK with default headers values +func NewV1CoxEdgeInstanceTypesOK() *V1CoxEdgeInstanceTypesOK { + return &V1CoxEdgeInstanceTypesOK{} +} + +/* +V1CoxEdgeInstanceTypesOK handles this case with default header values. + +(empty) +*/ +type V1CoxEdgeInstanceTypesOK struct { + Payload *models.V1CoxEdgeInstanceTypes +} + +func (o *V1CoxEdgeInstanceTypesOK) Error() string { + return fmt.Sprintf("[GET /v1/clouds/coxedge/regions/{region}/instancetypes][%d] v1CoxEdgeInstanceTypesOK %+v", 200, o.Payload) +} + +func (o *V1CoxEdgeInstanceTypesOK) GetPayload() *models.V1CoxEdgeInstanceTypes { + return o.Payload +} + +func (o *V1CoxEdgeInstanceTypesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1CoxEdgeInstanceTypes) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_cox_edge_organizations_get_parameters.go b/api/client/v1/v1_cox_edge_organizations_get_parameters.go new file mode 100644 index 00000000..62094a23 --- /dev/null +++ b/api/client/v1/v1_cox_edge_organizations_get_parameters.go @@ -0,0 +1,140 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1CoxEdgeOrganizationsGetParams creates a new V1CoxEdgeOrganizationsGetParams object +// with the default values initialized. +func NewV1CoxEdgeOrganizationsGetParams() *V1CoxEdgeOrganizationsGetParams { + var () + return &V1CoxEdgeOrganizationsGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CoxEdgeOrganizationsGetParamsWithTimeout creates a new V1CoxEdgeOrganizationsGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CoxEdgeOrganizationsGetParamsWithTimeout(timeout time.Duration) *V1CoxEdgeOrganizationsGetParams { + var () + return &V1CoxEdgeOrganizationsGetParams{ + + timeout: timeout, + } +} + +// NewV1CoxEdgeOrganizationsGetParamsWithContext creates a new V1CoxEdgeOrganizationsGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CoxEdgeOrganizationsGetParamsWithContext(ctx context.Context) *V1CoxEdgeOrganizationsGetParams { + var () + return &V1CoxEdgeOrganizationsGetParams{ + + Context: ctx, + } +} + +// NewV1CoxEdgeOrganizationsGetParamsWithHTTPClient creates a new V1CoxEdgeOrganizationsGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CoxEdgeOrganizationsGetParamsWithHTTPClient(client *http.Client) *V1CoxEdgeOrganizationsGetParams { + var () + return &V1CoxEdgeOrganizationsGetParams{ + HTTPClient: client, + } +} + +/* +V1CoxEdgeOrganizationsGetParams contains all the parameters to send to the API endpoint +for the v1 cox edge organizations get operation typically these are written to a http.Request +*/ +type V1CoxEdgeOrganizationsGetParams struct { + + /*CloudAccountUID + Uid for the specific CoxEdge cloud account + + */ + CloudAccountUID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cox edge organizations get params +func (o *V1CoxEdgeOrganizationsGetParams) WithTimeout(timeout time.Duration) *V1CoxEdgeOrganizationsGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cox edge organizations get params +func (o *V1CoxEdgeOrganizationsGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cox edge organizations get params +func (o *V1CoxEdgeOrganizationsGetParams) WithContext(ctx context.Context) *V1CoxEdgeOrganizationsGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cox edge organizations get params +func (o *V1CoxEdgeOrganizationsGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cox edge organizations get params +func (o *V1CoxEdgeOrganizationsGetParams) WithHTTPClient(client *http.Client) *V1CoxEdgeOrganizationsGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cox edge organizations get params +func (o *V1CoxEdgeOrganizationsGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithCloudAccountUID adds the cloudAccountUID to the v1 cox edge organizations get params +func (o *V1CoxEdgeOrganizationsGetParams) WithCloudAccountUID(cloudAccountUID string) *V1CoxEdgeOrganizationsGetParams { + o.SetCloudAccountUID(cloudAccountUID) + return o +} + +// SetCloudAccountUID adds the cloudAccountUid to the v1 cox edge organizations get params +func (o *V1CoxEdgeOrganizationsGetParams) SetCloudAccountUID(cloudAccountUID string) { + o.CloudAccountUID = cloudAccountUID +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CoxEdgeOrganizationsGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // query param cloudAccountUid + qrCloudAccountUID := o.CloudAccountUID + qCloudAccountUID := qrCloudAccountUID + if qCloudAccountUID != "" { + if err := r.SetQueryParam("cloudAccountUid", qCloudAccountUID); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cox_edge_organizations_get_responses.go b/api/client/v1/v1_cox_edge_organizations_get_responses.go new file mode 100644 index 00000000..746d6f4a --- /dev/null +++ b/api/client/v1/v1_cox_edge_organizations_get_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1CoxEdgeOrganizationsGetReader is a Reader for the V1CoxEdgeOrganizationsGet structure. +type V1CoxEdgeOrganizationsGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CoxEdgeOrganizationsGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1CoxEdgeOrganizationsGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CoxEdgeOrganizationsGetOK creates a V1CoxEdgeOrganizationsGetOK with default headers values +func NewV1CoxEdgeOrganizationsGetOK() *V1CoxEdgeOrganizationsGetOK { + return &V1CoxEdgeOrganizationsGetOK{} +} + +/* +V1CoxEdgeOrganizationsGetOK handles this case with default header values. + +List of CoxEdge organizations +*/ +type V1CoxEdgeOrganizationsGetOK struct { + Payload *models.V1CoxEdgeOrganizations +} + +func (o *V1CoxEdgeOrganizationsGetOK) Error() string { + return fmt.Sprintf("[GET /v1/clouds/coxedge/organizations][%d] v1CoxEdgeOrganizationsGetOK %+v", 200, o.Payload) +} + +func (o *V1CoxEdgeOrganizationsGetOK) GetPayload() *models.V1CoxEdgeOrganizations { + return o.Payload +} + +func (o *V1CoxEdgeOrganizationsGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1CoxEdgeOrganizations) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_cox_edge_organizations_parameters.go b/api/client/v1/v1_cox_edge_organizations_parameters.go new file mode 100644 index 00000000..05b3cc15 --- /dev/null +++ b/api/client/v1/v1_cox_edge_organizations_parameters.go @@ -0,0 +1,139 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1CoxEdgeOrganizationsParams creates a new V1CoxEdgeOrganizationsParams object +// with the default values initialized. +func NewV1CoxEdgeOrganizationsParams() *V1CoxEdgeOrganizationsParams { + var () + return &V1CoxEdgeOrganizationsParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CoxEdgeOrganizationsParamsWithTimeout creates a new V1CoxEdgeOrganizationsParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CoxEdgeOrganizationsParamsWithTimeout(timeout time.Duration) *V1CoxEdgeOrganizationsParams { + var () + return &V1CoxEdgeOrganizationsParams{ + + timeout: timeout, + } +} + +// NewV1CoxEdgeOrganizationsParamsWithContext creates a new V1CoxEdgeOrganizationsParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CoxEdgeOrganizationsParamsWithContext(ctx context.Context) *V1CoxEdgeOrganizationsParams { + var () + return &V1CoxEdgeOrganizationsParams{ + + Context: ctx, + } +} + +// NewV1CoxEdgeOrganizationsParamsWithHTTPClient creates a new V1CoxEdgeOrganizationsParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CoxEdgeOrganizationsParamsWithHTTPClient(client *http.Client) *V1CoxEdgeOrganizationsParams { + var () + return &V1CoxEdgeOrganizationsParams{ + HTTPClient: client, + } +} + +/* +V1CoxEdgeOrganizationsParams contains all the parameters to send to the API endpoint +for the v1 cox edge organizations operation typically these are written to a http.Request +*/ +type V1CoxEdgeOrganizationsParams struct { + + /*Spec + Request payload to get CoxEdge organizations + + */ + Spec *models.V1CoxEdgeCredentials + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cox edge organizations params +func (o *V1CoxEdgeOrganizationsParams) WithTimeout(timeout time.Duration) *V1CoxEdgeOrganizationsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cox edge organizations params +func (o *V1CoxEdgeOrganizationsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cox edge organizations params +func (o *V1CoxEdgeOrganizationsParams) WithContext(ctx context.Context) *V1CoxEdgeOrganizationsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cox edge organizations params +func (o *V1CoxEdgeOrganizationsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cox edge organizations params +func (o *V1CoxEdgeOrganizationsParams) WithHTTPClient(client *http.Client) *V1CoxEdgeOrganizationsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cox edge organizations params +func (o *V1CoxEdgeOrganizationsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithSpec adds the spec to the v1 cox edge organizations params +func (o *V1CoxEdgeOrganizationsParams) WithSpec(spec *models.V1CoxEdgeCredentials) *V1CoxEdgeOrganizationsParams { + o.SetSpec(spec) + return o +} + +// SetSpec adds the spec to the v1 cox edge organizations params +func (o *V1CoxEdgeOrganizationsParams) SetSpec(spec *models.V1CoxEdgeCredentials) { + o.Spec = spec +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CoxEdgeOrganizationsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Spec != nil { + if err := r.SetBodyParam(o.Spec); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cox_edge_organizations_responses.go b/api/client/v1/v1_cox_edge_organizations_responses.go new file mode 100644 index 00000000..5382144c --- /dev/null +++ b/api/client/v1/v1_cox_edge_organizations_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1CoxEdgeOrganizationsReader is a Reader for the V1CoxEdgeOrganizations structure. +type V1CoxEdgeOrganizationsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CoxEdgeOrganizationsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1CoxEdgeOrganizationsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CoxEdgeOrganizationsOK creates a V1CoxEdgeOrganizationsOK with default headers values +func NewV1CoxEdgeOrganizationsOK() *V1CoxEdgeOrganizationsOK { + return &V1CoxEdgeOrganizationsOK{} +} + +/* +V1CoxEdgeOrganizationsOK handles this case with default header values. + +List of CoxEdge organizations +*/ +type V1CoxEdgeOrganizationsOK struct { + Payload *models.V1CoxEdgeOrganizations +} + +func (o *V1CoxEdgeOrganizationsOK) Error() string { + return fmt.Sprintf("[POST /v1/clouds/coxedge/organizations][%d] v1CoxEdgeOrganizationsOK %+v", 200, o.Payload) +} + +func (o *V1CoxEdgeOrganizationsOK) GetPayload() *models.V1CoxEdgeOrganizations { + return o.Payload +} + +func (o *V1CoxEdgeOrganizationsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1CoxEdgeOrganizations) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_cox_edge_regions_parameters.go b/api/client/v1/v1_cox_edge_regions_parameters.go new file mode 100644 index 00000000..a6e27798 --- /dev/null +++ b/api/client/v1/v1_cox_edge_regions_parameters.go @@ -0,0 +1,243 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1CoxEdgeRegionsParams creates a new V1CoxEdgeRegionsParams object +// with the default values initialized. +func NewV1CoxEdgeRegionsParams() *V1CoxEdgeRegionsParams { + var () + return &V1CoxEdgeRegionsParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CoxEdgeRegionsParamsWithTimeout creates a new V1CoxEdgeRegionsParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CoxEdgeRegionsParamsWithTimeout(timeout time.Duration) *V1CoxEdgeRegionsParams { + var () + return &V1CoxEdgeRegionsParams{ + + timeout: timeout, + } +} + +// NewV1CoxEdgeRegionsParamsWithContext creates a new V1CoxEdgeRegionsParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CoxEdgeRegionsParamsWithContext(ctx context.Context) *V1CoxEdgeRegionsParams { + var () + return &V1CoxEdgeRegionsParams{ + + Context: ctx, + } +} + +// NewV1CoxEdgeRegionsParamsWithHTTPClient creates a new V1CoxEdgeRegionsParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CoxEdgeRegionsParamsWithHTTPClient(client *http.Client) *V1CoxEdgeRegionsParams { + var () + return &V1CoxEdgeRegionsParams{ + HTTPClient: client, + } +} + +/* +V1CoxEdgeRegionsParams contains all the parameters to send to the API endpoint +for the v1 cox edge regions operation typically these are written to a http.Request +*/ +type V1CoxEdgeRegionsParams struct { + + /*CloudAccountUID + Uid for the specific AWS cloud account + + */ + CloudAccountUID *string + /*Environment + CoxEdge environment name + + */ + Environment *string + /*OrganizationID + CoxEdge organization id + + */ + OrganizationID *string + /*Service + CoxEdge service name + + */ + Service *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cox edge regions params +func (o *V1CoxEdgeRegionsParams) WithTimeout(timeout time.Duration) *V1CoxEdgeRegionsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cox edge regions params +func (o *V1CoxEdgeRegionsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cox edge regions params +func (o *V1CoxEdgeRegionsParams) WithContext(ctx context.Context) *V1CoxEdgeRegionsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cox edge regions params +func (o *V1CoxEdgeRegionsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cox edge regions params +func (o *V1CoxEdgeRegionsParams) WithHTTPClient(client *http.Client) *V1CoxEdgeRegionsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cox edge regions params +func (o *V1CoxEdgeRegionsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithCloudAccountUID adds the cloudAccountUID to the v1 cox edge regions params +func (o *V1CoxEdgeRegionsParams) WithCloudAccountUID(cloudAccountUID *string) *V1CoxEdgeRegionsParams { + o.SetCloudAccountUID(cloudAccountUID) + return o +} + +// SetCloudAccountUID adds the cloudAccountUid to the v1 cox edge regions params +func (o *V1CoxEdgeRegionsParams) SetCloudAccountUID(cloudAccountUID *string) { + o.CloudAccountUID = cloudAccountUID +} + +// WithEnvironment adds the environment to the v1 cox edge regions params +func (o *V1CoxEdgeRegionsParams) WithEnvironment(environment *string) *V1CoxEdgeRegionsParams { + o.SetEnvironment(environment) + return o +} + +// SetEnvironment adds the environment to the v1 cox edge regions params +func (o *V1CoxEdgeRegionsParams) SetEnvironment(environment *string) { + o.Environment = environment +} + +// WithOrganizationID adds the organizationID to the v1 cox edge regions params +func (o *V1CoxEdgeRegionsParams) WithOrganizationID(organizationID *string) *V1CoxEdgeRegionsParams { + o.SetOrganizationID(organizationID) + return o +} + +// SetOrganizationID adds the organizationId to the v1 cox edge regions params +func (o *V1CoxEdgeRegionsParams) SetOrganizationID(organizationID *string) { + o.OrganizationID = organizationID +} + +// WithService adds the service to the v1 cox edge regions params +func (o *V1CoxEdgeRegionsParams) WithService(service *string) *V1CoxEdgeRegionsParams { + o.SetService(service) + return o +} + +// SetService adds the service to the v1 cox edge regions params +func (o *V1CoxEdgeRegionsParams) SetService(service *string) { + o.Service = service +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CoxEdgeRegionsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.CloudAccountUID != nil { + + // query param cloudAccountUid + var qrCloudAccountUID string + if o.CloudAccountUID != nil { + qrCloudAccountUID = *o.CloudAccountUID + } + qCloudAccountUID := qrCloudAccountUID + if qCloudAccountUID != "" { + if err := r.SetQueryParam("cloudAccountUid", qCloudAccountUID); err != nil { + return err + } + } + + } + + if o.Environment != nil { + + // query param environment + var qrEnvironment string + if o.Environment != nil { + qrEnvironment = *o.Environment + } + qEnvironment := qrEnvironment + if qEnvironment != "" { + if err := r.SetQueryParam("environment", qEnvironment); err != nil { + return err + } + } + + } + + if o.OrganizationID != nil { + + // query param organizationId + var qrOrganizationID string + if o.OrganizationID != nil { + qrOrganizationID = *o.OrganizationID + } + qOrganizationID := qrOrganizationID + if qOrganizationID != "" { + if err := r.SetQueryParam("organizationId", qOrganizationID); err != nil { + return err + } + } + + } + + if o.Service != nil { + + // query param service + var qrService string + if o.Service != nil { + qrService = *o.Service + } + qService := qrService + if qService != "" { + if err := r.SetQueryParam("service", qService); err != nil { + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cox_edge_regions_responses.go b/api/client/v1/v1_cox_edge_regions_responses.go new file mode 100644 index 00000000..304386b1 --- /dev/null +++ b/api/client/v1/v1_cox_edge_regions_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1CoxEdgeRegionsReader is a Reader for the V1CoxEdgeRegions structure. +type V1CoxEdgeRegionsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CoxEdgeRegionsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1CoxEdgeRegionsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CoxEdgeRegionsOK creates a V1CoxEdgeRegionsOK with default headers values +func NewV1CoxEdgeRegionsOK() *V1CoxEdgeRegionsOK { + return &V1CoxEdgeRegionsOK{} +} + +/* +V1CoxEdgeRegionsOK handles this case with default header values. + +(empty) +*/ +type V1CoxEdgeRegionsOK struct { + Payload *models.V1CoxEdgeRegions +} + +func (o *V1CoxEdgeRegionsOK) Error() string { + return fmt.Sprintf("[GET /v1/clouds/coxedge/regions][%d] v1CoxEdgeRegionsOK %+v", 200, o.Payload) +} + +func (o *V1CoxEdgeRegionsOK) GetPayload() *models.V1CoxEdgeRegions { + return o.Payload +} + +func (o *V1CoxEdgeRegionsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1CoxEdgeRegions) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_cox_edge_services_get_parameters.go b/api/client/v1/v1_cox_edge_services_get_parameters.go new file mode 100644 index 00000000..e9fb285c --- /dev/null +++ b/api/client/v1/v1_cox_edge_services_get_parameters.go @@ -0,0 +1,172 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1CoxEdgeServicesGetParams creates a new V1CoxEdgeServicesGetParams object +// with the default values initialized. +func NewV1CoxEdgeServicesGetParams() *V1CoxEdgeServicesGetParams { + var () + return &V1CoxEdgeServicesGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CoxEdgeServicesGetParamsWithTimeout creates a new V1CoxEdgeServicesGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CoxEdgeServicesGetParamsWithTimeout(timeout time.Duration) *V1CoxEdgeServicesGetParams { + var () + return &V1CoxEdgeServicesGetParams{ + + timeout: timeout, + } +} + +// NewV1CoxEdgeServicesGetParamsWithContext creates a new V1CoxEdgeServicesGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CoxEdgeServicesGetParamsWithContext(ctx context.Context) *V1CoxEdgeServicesGetParams { + var () + return &V1CoxEdgeServicesGetParams{ + + Context: ctx, + } +} + +// NewV1CoxEdgeServicesGetParamsWithHTTPClient creates a new V1CoxEdgeServicesGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CoxEdgeServicesGetParamsWithHTTPClient(client *http.Client) *V1CoxEdgeServicesGetParams { + var () + return &V1CoxEdgeServicesGetParams{ + HTTPClient: client, + } +} + +/* +V1CoxEdgeServicesGetParams contains all the parameters to send to the API endpoint +for the v1 cox edge services get operation typically these are written to a http.Request +*/ +type V1CoxEdgeServicesGetParams struct { + + /*CloudAccountUID + Uid for the specific CoxEdge cloud account + + */ + CloudAccountUID string + /*OrganizationID + OrganizationId for the specific CoxEdge account + + */ + OrganizationID *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cox edge services get params +func (o *V1CoxEdgeServicesGetParams) WithTimeout(timeout time.Duration) *V1CoxEdgeServicesGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cox edge services get params +func (o *V1CoxEdgeServicesGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cox edge services get params +func (o *V1CoxEdgeServicesGetParams) WithContext(ctx context.Context) *V1CoxEdgeServicesGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cox edge services get params +func (o *V1CoxEdgeServicesGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cox edge services get params +func (o *V1CoxEdgeServicesGetParams) WithHTTPClient(client *http.Client) *V1CoxEdgeServicesGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cox edge services get params +func (o *V1CoxEdgeServicesGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithCloudAccountUID adds the cloudAccountUID to the v1 cox edge services get params +func (o *V1CoxEdgeServicesGetParams) WithCloudAccountUID(cloudAccountUID string) *V1CoxEdgeServicesGetParams { + o.SetCloudAccountUID(cloudAccountUID) + return o +} + +// SetCloudAccountUID adds the cloudAccountUid to the v1 cox edge services get params +func (o *V1CoxEdgeServicesGetParams) SetCloudAccountUID(cloudAccountUID string) { + o.CloudAccountUID = cloudAccountUID +} + +// WithOrganizationID adds the organizationID to the v1 cox edge services get params +func (o *V1CoxEdgeServicesGetParams) WithOrganizationID(organizationID *string) *V1CoxEdgeServicesGetParams { + o.SetOrganizationID(organizationID) + return o +} + +// SetOrganizationID adds the organizationId to the v1 cox edge services get params +func (o *V1CoxEdgeServicesGetParams) SetOrganizationID(organizationID *string) { + o.OrganizationID = organizationID +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CoxEdgeServicesGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // query param cloudAccountUid + qrCloudAccountUID := o.CloudAccountUID + qCloudAccountUID := qrCloudAccountUID + if qCloudAccountUID != "" { + if err := r.SetQueryParam("cloudAccountUid", qCloudAccountUID); err != nil { + return err + } + } + + if o.OrganizationID != nil { + + // query param organizationId + var qrOrganizationID string + if o.OrganizationID != nil { + qrOrganizationID = *o.OrganizationID + } + qOrganizationID := qrOrganizationID + if qOrganizationID != "" { + if err := r.SetQueryParam("organizationId", qOrganizationID); err != nil { + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cox_edge_services_get_responses.go b/api/client/v1/v1_cox_edge_services_get_responses.go new file mode 100644 index 00000000..b7fde851 --- /dev/null +++ b/api/client/v1/v1_cox_edge_services_get_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1CoxEdgeServicesGetReader is a Reader for the V1CoxEdgeServicesGet structure. +type V1CoxEdgeServicesGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CoxEdgeServicesGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1CoxEdgeServicesGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CoxEdgeServicesGetOK creates a V1CoxEdgeServicesGetOK with default headers values +func NewV1CoxEdgeServicesGetOK() *V1CoxEdgeServicesGetOK { + return &V1CoxEdgeServicesGetOK{} +} + +/* +V1CoxEdgeServicesGetOK handles this case with default header values. + +List of CoxEdge services +*/ +type V1CoxEdgeServicesGetOK struct { + Payload *models.V1CoxEdgeServices +} + +func (o *V1CoxEdgeServicesGetOK) Error() string { + return fmt.Sprintf("[GET /v1/clouds/coxedge/services][%d] v1CoxEdgeServicesGetOK %+v", 200, o.Payload) +} + +func (o *V1CoxEdgeServicesGetOK) GetPayload() *models.V1CoxEdgeServices { + return o.Payload +} + +func (o *V1CoxEdgeServicesGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1CoxEdgeServices) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_cox_edge_services_parameters.go b/api/client/v1/v1_cox_edge_services_parameters.go new file mode 100644 index 00000000..780bc41c --- /dev/null +++ b/api/client/v1/v1_cox_edge_services_parameters.go @@ -0,0 +1,139 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1CoxEdgeServicesParams creates a new V1CoxEdgeServicesParams object +// with the default values initialized. +func NewV1CoxEdgeServicesParams() *V1CoxEdgeServicesParams { + var () + return &V1CoxEdgeServicesParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CoxEdgeServicesParamsWithTimeout creates a new V1CoxEdgeServicesParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CoxEdgeServicesParamsWithTimeout(timeout time.Duration) *V1CoxEdgeServicesParams { + var () + return &V1CoxEdgeServicesParams{ + + timeout: timeout, + } +} + +// NewV1CoxEdgeServicesParamsWithContext creates a new V1CoxEdgeServicesParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CoxEdgeServicesParamsWithContext(ctx context.Context) *V1CoxEdgeServicesParams { + var () + return &V1CoxEdgeServicesParams{ + + Context: ctx, + } +} + +// NewV1CoxEdgeServicesParamsWithHTTPClient creates a new V1CoxEdgeServicesParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CoxEdgeServicesParamsWithHTTPClient(client *http.Client) *V1CoxEdgeServicesParams { + var () + return &V1CoxEdgeServicesParams{ + HTTPClient: client, + } +} + +/* +V1CoxEdgeServicesParams contains all the parameters to send to the API endpoint +for the v1 cox edge services operation typically these are written to a http.Request +*/ +type V1CoxEdgeServicesParams struct { + + /*Spec + Request payload to get CoxEdge services + + */ + Spec *models.V1CoxEdgeCredentials + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 cox edge services params +func (o *V1CoxEdgeServicesParams) WithTimeout(timeout time.Duration) *V1CoxEdgeServicesParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 cox edge services params +func (o *V1CoxEdgeServicesParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 cox edge services params +func (o *V1CoxEdgeServicesParams) WithContext(ctx context.Context) *V1CoxEdgeServicesParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 cox edge services params +func (o *V1CoxEdgeServicesParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 cox edge services params +func (o *V1CoxEdgeServicesParams) WithHTTPClient(client *http.Client) *V1CoxEdgeServicesParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 cox edge services params +func (o *V1CoxEdgeServicesParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithSpec adds the spec to the v1 cox edge services params +func (o *V1CoxEdgeServicesParams) WithSpec(spec *models.V1CoxEdgeCredentials) *V1CoxEdgeServicesParams { + o.SetSpec(spec) + return o +} + +// SetSpec adds the spec to the v1 cox edge services params +func (o *V1CoxEdgeServicesParams) SetSpec(spec *models.V1CoxEdgeCredentials) { + o.Spec = spec +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CoxEdgeServicesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Spec != nil { + if err := r.SetBodyParam(o.Spec); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_cox_edge_services_responses.go b/api/client/v1/v1_cox_edge_services_responses.go new file mode 100644 index 00000000..0c5084a9 --- /dev/null +++ b/api/client/v1/v1_cox_edge_services_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1CoxEdgeServicesReader is a Reader for the V1CoxEdgeServices structure. +type V1CoxEdgeServicesReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CoxEdgeServicesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1CoxEdgeServicesOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CoxEdgeServicesOK creates a V1CoxEdgeServicesOK with default headers values +func NewV1CoxEdgeServicesOK() *V1CoxEdgeServicesOK { + return &V1CoxEdgeServicesOK{} +} + +/* +V1CoxEdgeServicesOK handles this case with default header values. + +(empty) +*/ +type V1CoxEdgeServicesOK struct { + Payload *models.V1CoxEdgeServices +} + +func (o *V1CoxEdgeServicesOK) Error() string { + return fmt.Sprintf("[POST /v1/clouds/coxedge/services][%d] v1CoxEdgeServicesOK %+v", 200, o.Payload) +} + +func (o *V1CoxEdgeServicesOK) GetPayload() *models.V1CoxEdgeServices { + return o.Payload +} + +func (o *V1CoxEdgeServicesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1CoxEdgeServices) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_custom_cloud_type_bootstrap_delete_parameters.go b/api/client/v1/v1_custom_cloud_type_bootstrap_delete_parameters.go new file mode 100644 index 00000000..30f4168c --- /dev/null +++ b/api/client/v1/v1_custom_cloud_type_bootstrap_delete_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1CustomCloudTypeBootstrapDeleteParams creates a new V1CustomCloudTypeBootstrapDeleteParams object +// with the default values initialized. +func NewV1CustomCloudTypeBootstrapDeleteParams() *V1CustomCloudTypeBootstrapDeleteParams { + var () + return &V1CustomCloudTypeBootstrapDeleteParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CustomCloudTypeBootstrapDeleteParamsWithTimeout creates a new V1CustomCloudTypeBootstrapDeleteParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CustomCloudTypeBootstrapDeleteParamsWithTimeout(timeout time.Duration) *V1CustomCloudTypeBootstrapDeleteParams { + var () + return &V1CustomCloudTypeBootstrapDeleteParams{ + + timeout: timeout, + } +} + +// NewV1CustomCloudTypeBootstrapDeleteParamsWithContext creates a new V1CustomCloudTypeBootstrapDeleteParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CustomCloudTypeBootstrapDeleteParamsWithContext(ctx context.Context) *V1CustomCloudTypeBootstrapDeleteParams { + var () + return &V1CustomCloudTypeBootstrapDeleteParams{ + + Context: ctx, + } +} + +// NewV1CustomCloudTypeBootstrapDeleteParamsWithHTTPClient creates a new V1CustomCloudTypeBootstrapDeleteParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CustomCloudTypeBootstrapDeleteParamsWithHTTPClient(client *http.Client) *V1CustomCloudTypeBootstrapDeleteParams { + var () + return &V1CustomCloudTypeBootstrapDeleteParams{ + HTTPClient: client, + } +} + +/* +V1CustomCloudTypeBootstrapDeleteParams contains all the parameters to send to the API endpoint +for the v1 custom cloud type bootstrap delete operation typically these are written to a http.Request +*/ +type V1CustomCloudTypeBootstrapDeleteParams struct { + + /*CloudType + Unique cloud type + + */ + CloudType string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 custom cloud type bootstrap delete params +func (o *V1CustomCloudTypeBootstrapDeleteParams) WithTimeout(timeout time.Duration) *V1CustomCloudTypeBootstrapDeleteParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 custom cloud type bootstrap delete params +func (o *V1CustomCloudTypeBootstrapDeleteParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 custom cloud type bootstrap delete params +func (o *V1CustomCloudTypeBootstrapDeleteParams) WithContext(ctx context.Context) *V1CustomCloudTypeBootstrapDeleteParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 custom cloud type bootstrap delete params +func (o *V1CustomCloudTypeBootstrapDeleteParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 custom cloud type bootstrap delete params +func (o *V1CustomCloudTypeBootstrapDeleteParams) WithHTTPClient(client *http.Client) *V1CustomCloudTypeBootstrapDeleteParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 custom cloud type bootstrap delete params +func (o *V1CustomCloudTypeBootstrapDeleteParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithCloudType adds the cloudType to the v1 custom cloud type bootstrap delete params +func (o *V1CustomCloudTypeBootstrapDeleteParams) WithCloudType(cloudType string) *V1CustomCloudTypeBootstrapDeleteParams { + o.SetCloudType(cloudType) + return o +} + +// SetCloudType adds the cloudType to the v1 custom cloud type bootstrap delete params +func (o *V1CustomCloudTypeBootstrapDeleteParams) SetCloudType(cloudType string) { + o.CloudType = cloudType +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CustomCloudTypeBootstrapDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param cloudType + if err := r.SetPathParam("cloudType", o.CloudType); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_custom_cloud_type_bootstrap_delete_responses.go b/api/client/v1/v1_custom_cloud_type_bootstrap_delete_responses.go new file mode 100644 index 00000000..eaacfbd8 --- /dev/null +++ b/api/client/v1/v1_custom_cloud_type_bootstrap_delete_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1CustomCloudTypeBootstrapDeleteReader is a Reader for the V1CustomCloudTypeBootstrapDelete structure. +type V1CustomCloudTypeBootstrapDeleteReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CustomCloudTypeBootstrapDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1CustomCloudTypeBootstrapDeleteNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CustomCloudTypeBootstrapDeleteNoContent creates a V1CustomCloudTypeBootstrapDeleteNoContent with default headers values +func NewV1CustomCloudTypeBootstrapDeleteNoContent() *V1CustomCloudTypeBootstrapDeleteNoContent { + return &V1CustomCloudTypeBootstrapDeleteNoContent{} +} + +/* +V1CustomCloudTypeBootstrapDeleteNoContent handles this case with default header values. + +The resource was deleted successfully +*/ +type V1CustomCloudTypeBootstrapDeleteNoContent struct { +} + +func (o *V1CustomCloudTypeBootstrapDeleteNoContent) Error() string { + return fmt.Sprintf("[DELETE /v1/clouds/cloudTypes/{cloudType}/content/bootstrap][%d] v1CustomCloudTypeBootstrapDeleteNoContent ", 204) +} + +func (o *V1CustomCloudTypeBootstrapDeleteNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_custom_cloud_type_bootstrap_get_parameters.go b/api/client/v1/v1_custom_cloud_type_bootstrap_get_parameters.go new file mode 100644 index 00000000..6a02a35b --- /dev/null +++ b/api/client/v1/v1_custom_cloud_type_bootstrap_get_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1CustomCloudTypeBootstrapGetParams creates a new V1CustomCloudTypeBootstrapGetParams object +// with the default values initialized. +func NewV1CustomCloudTypeBootstrapGetParams() *V1CustomCloudTypeBootstrapGetParams { + var () + return &V1CustomCloudTypeBootstrapGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CustomCloudTypeBootstrapGetParamsWithTimeout creates a new V1CustomCloudTypeBootstrapGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CustomCloudTypeBootstrapGetParamsWithTimeout(timeout time.Duration) *V1CustomCloudTypeBootstrapGetParams { + var () + return &V1CustomCloudTypeBootstrapGetParams{ + + timeout: timeout, + } +} + +// NewV1CustomCloudTypeBootstrapGetParamsWithContext creates a new V1CustomCloudTypeBootstrapGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CustomCloudTypeBootstrapGetParamsWithContext(ctx context.Context) *V1CustomCloudTypeBootstrapGetParams { + var () + return &V1CustomCloudTypeBootstrapGetParams{ + + Context: ctx, + } +} + +// NewV1CustomCloudTypeBootstrapGetParamsWithHTTPClient creates a new V1CustomCloudTypeBootstrapGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CustomCloudTypeBootstrapGetParamsWithHTTPClient(client *http.Client) *V1CustomCloudTypeBootstrapGetParams { + var () + return &V1CustomCloudTypeBootstrapGetParams{ + HTTPClient: client, + } +} + +/* +V1CustomCloudTypeBootstrapGetParams contains all the parameters to send to the API endpoint +for the v1 custom cloud type bootstrap get operation typically these are written to a http.Request +*/ +type V1CustomCloudTypeBootstrapGetParams struct { + + /*CloudType + Unique cloud type + + */ + CloudType string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 custom cloud type bootstrap get params +func (o *V1CustomCloudTypeBootstrapGetParams) WithTimeout(timeout time.Duration) *V1CustomCloudTypeBootstrapGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 custom cloud type bootstrap get params +func (o *V1CustomCloudTypeBootstrapGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 custom cloud type bootstrap get params +func (o *V1CustomCloudTypeBootstrapGetParams) WithContext(ctx context.Context) *V1CustomCloudTypeBootstrapGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 custom cloud type bootstrap get params +func (o *V1CustomCloudTypeBootstrapGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 custom cloud type bootstrap get params +func (o *V1CustomCloudTypeBootstrapGetParams) WithHTTPClient(client *http.Client) *V1CustomCloudTypeBootstrapGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 custom cloud type bootstrap get params +func (o *V1CustomCloudTypeBootstrapGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithCloudType adds the cloudType to the v1 custom cloud type bootstrap get params +func (o *V1CustomCloudTypeBootstrapGetParams) WithCloudType(cloudType string) *V1CustomCloudTypeBootstrapGetParams { + o.SetCloudType(cloudType) + return o +} + +// SetCloudType adds the cloudType to the v1 custom cloud type bootstrap get params +func (o *V1CustomCloudTypeBootstrapGetParams) SetCloudType(cloudType string) { + o.CloudType = cloudType +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CustomCloudTypeBootstrapGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param cloudType + if err := r.SetPathParam("cloudType", o.CloudType); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_custom_cloud_type_bootstrap_get_responses.go b/api/client/v1/v1_custom_cloud_type_bootstrap_get_responses.go new file mode 100644 index 00000000..29567dea --- /dev/null +++ b/api/client/v1/v1_custom_cloud_type_bootstrap_get_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1CustomCloudTypeBootstrapGetReader is a Reader for the V1CustomCloudTypeBootstrapGet structure. +type V1CustomCloudTypeBootstrapGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CustomCloudTypeBootstrapGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1CustomCloudTypeBootstrapGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CustomCloudTypeBootstrapGetOK creates a V1CustomCloudTypeBootstrapGetOK with default headers values +func NewV1CustomCloudTypeBootstrapGetOK() *V1CustomCloudTypeBootstrapGetOK { + return &V1CustomCloudTypeBootstrapGetOK{} +} + +/* +V1CustomCloudTypeBootstrapGetOK handles this case with default header values. + +(empty) +*/ +type V1CustomCloudTypeBootstrapGetOK struct { + Payload *models.V1CustomCloudTypeContentResponse +} + +func (o *V1CustomCloudTypeBootstrapGetOK) Error() string { + return fmt.Sprintf("[GET /v1/clouds/cloudTypes/{cloudType}/content/bootstrap][%d] v1CustomCloudTypeBootstrapGetOK %+v", 200, o.Payload) +} + +func (o *V1CustomCloudTypeBootstrapGetOK) GetPayload() *models.V1CustomCloudTypeContentResponse { + return o.Payload +} + +func (o *V1CustomCloudTypeBootstrapGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1CustomCloudTypeContentResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_custom_cloud_type_bootstrap_update_parameters.go b/api/client/v1/v1_custom_cloud_type_bootstrap_update_parameters.go new file mode 100644 index 00000000..62a46ab2 --- /dev/null +++ b/api/client/v1/v1_custom_cloud_type_bootstrap_update_parameters.go @@ -0,0 +1,162 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1CustomCloudTypeBootstrapUpdateParams creates a new V1CustomCloudTypeBootstrapUpdateParams object +// with the default values initialized. +func NewV1CustomCloudTypeBootstrapUpdateParams() *V1CustomCloudTypeBootstrapUpdateParams { + var () + return &V1CustomCloudTypeBootstrapUpdateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CustomCloudTypeBootstrapUpdateParamsWithTimeout creates a new V1CustomCloudTypeBootstrapUpdateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CustomCloudTypeBootstrapUpdateParamsWithTimeout(timeout time.Duration) *V1CustomCloudTypeBootstrapUpdateParams { + var () + return &V1CustomCloudTypeBootstrapUpdateParams{ + + timeout: timeout, + } +} + +// NewV1CustomCloudTypeBootstrapUpdateParamsWithContext creates a new V1CustomCloudTypeBootstrapUpdateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CustomCloudTypeBootstrapUpdateParamsWithContext(ctx context.Context) *V1CustomCloudTypeBootstrapUpdateParams { + var () + return &V1CustomCloudTypeBootstrapUpdateParams{ + + Context: ctx, + } +} + +// NewV1CustomCloudTypeBootstrapUpdateParamsWithHTTPClient creates a new V1CustomCloudTypeBootstrapUpdateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CustomCloudTypeBootstrapUpdateParamsWithHTTPClient(client *http.Client) *V1CustomCloudTypeBootstrapUpdateParams { + var () + return &V1CustomCloudTypeBootstrapUpdateParams{ + HTTPClient: client, + } +} + +/* +V1CustomCloudTypeBootstrapUpdateParams contains all the parameters to send to the API endpoint +for the v1 custom cloud type bootstrap update operation typically these are written to a http.Request +*/ +type V1CustomCloudTypeBootstrapUpdateParams struct { + + /*CloudType + Unique cloud type + + */ + CloudType string + /*FileName*/ + FileName runtime.NamedReadCloser + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 custom cloud type bootstrap update params +func (o *V1CustomCloudTypeBootstrapUpdateParams) WithTimeout(timeout time.Duration) *V1CustomCloudTypeBootstrapUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 custom cloud type bootstrap update params +func (o *V1CustomCloudTypeBootstrapUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 custom cloud type bootstrap update params +func (o *V1CustomCloudTypeBootstrapUpdateParams) WithContext(ctx context.Context) *V1CustomCloudTypeBootstrapUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 custom cloud type bootstrap update params +func (o *V1CustomCloudTypeBootstrapUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 custom cloud type bootstrap update params +func (o *V1CustomCloudTypeBootstrapUpdateParams) WithHTTPClient(client *http.Client) *V1CustomCloudTypeBootstrapUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 custom cloud type bootstrap update params +func (o *V1CustomCloudTypeBootstrapUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithCloudType adds the cloudType to the v1 custom cloud type bootstrap update params +func (o *V1CustomCloudTypeBootstrapUpdateParams) WithCloudType(cloudType string) *V1CustomCloudTypeBootstrapUpdateParams { + o.SetCloudType(cloudType) + return o +} + +// SetCloudType adds the cloudType to the v1 custom cloud type bootstrap update params +func (o *V1CustomCloudTypeBootstrapUpdateParams) SetCloudType(cloudType string) { + o.CloudType = cloudType +} + +// WithFileName adds the fileName to the v1 custom cloud type bootstrap update params +func (o *V1CustomCloudTypeBootstrapUpdateParams) WithFileName(fileName runtime.NamedReadCloser) *V1CustomCloudTypeBootstrapUpdateParams { + o.SetFileName(fileName) + return o +} + +// SetFileName adds the fileName to the v1 custom cloud type bootstrap update params +func (o *V1CustomCloudTypeBootstrapUpdateParams) SetFileName(fileName runtime.NamedReadCloser) { + o.FileName = fileName +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CustomCloudTypeBootstrapUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param cloudType + if err := r.SetPathParam("cloudType", o.CloudType); err != nil { + return err + } + + if o.FileName != nil { + + if o.FileName != nil { + + // form file param fileName + if err := r.SetFileParam("fileName", o.FileName); err != nil { + return err + } + + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_custom_cloud_type_bootstrap_update_responses.go b/api/client/v1/v1_custom_cloud_type_bootstrap_update_responses.go new file mode 100644 index 00000000..36af819a --- /dev/null +++ b/api/client/v1/v1_custom_cloud_type_bootstrap_update_responses.go @@ -0,0 +1,61 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1CustomCloudTypeBootstrapUpdateReader is a Reader for the V1CustomCloudTypeBootstrapUpdate structure. +type V1CustomCloudTypeBootstrapUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CustomCloudTypeBootstrapUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1CustomCloudTypeBootstrapUpdateNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CustomCloudTypeBootstrapUpdateNoContent creates a V1CustomCloudTypeBootstrapUpdateNoContent with default headers values +func NewV1CustomCloudTypeBootstrapUpdateNoContent() *V1CustomCloudTypeBootstrapUpdateNoContent { + return &V1CustomCloudTypeBootstrapUpdateNoContent{} +} + +/* +V1CustomCloudTypeBootstrapUpdateNoContent handles this case with default header values. + +Ok response without content +*/ +type V1CustomCloudTypeBootstrapUpdateNoContent struct { + /*Audit uid for the request + */ + AuditUID string +} + +func (o *V1CustomCloudTypeBootstrapUpdateNoContent) Error() string { + return fmt.Sprintf("[PUT /v1/clouds/cloudTypes/{cloudType}/content/bootstrap][%d] v1CustomCloudTypeBootstrapUpdateNoContent ", 204) +} + +func (o *V1CustomCloudTypeBootstrapUpdateNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header AuditUid + o.AuditUID = response.GetHeader("AuditUid") + + return nil +} diff --git a/api/client/v1/v1_custom_cloud_type_cloud_account_keys_get_parameters.go b/api/client/v1/v1_custom_cloud_type_cloud_account_keys_get_parameters.go new file mode 100644 index 00000000..58eade6d --- /dev/null +++ b/api/client/v1/v1_custom_cloud_type_cloud_account_keys_get_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1CustomCloudTypeCloudAccountKeysGetParams creates a new V1CustomCloudTypeCloudAccountKeysGetParams object +// with the default values initialized. +func NewV1CustomCloudTypeCloudAccountKeysGetParams() *V1CustomCloudTypeCloudAccountKeysGetParams { + var () + return &V1CustomCloudTypeCloudAccountKeysGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CustomCloudTypeCloudAccountKeysGetParamsWithTimeout creates a new V1CustomCloudTypeCloudAccountKeysGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CustomCloudTypeCloudAccountKeysGetParamsWithTimeout(timeout time.Duration) *V1CustomCloudTypeCloudAccountKeysGetParams { + var () + return &V1CustomCloudTypeCloudAccountKeysGetParams{ + + timeout: timeout, + } +} + +// NewV1CustomCloudTypeCloudAccountKeysGetParamsWithContext creates a new V1CustomCloudTypeCloudAccountKeysGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CustomCloudTypeCloudAccountKeysGetParamsWithContext(ctx context.Context) *V1CustomCloudTypeCloudAccountKeysGetParams { + var () + return &V1CustomCloudTypeCloudAccountKeysGetParams{ + + Context: ctx, + } +} + +// NewV1CustomCloudTypeCloudAccountKeysGetParamsWithHTTPClient creates a new V1CustomCloudTypeCloudAccountKeysGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CustomCloudTypeCloudAccountKeysGetParamsWithHTTPClient(client *http.Client) *V1CustomCloudTypeCloudAccountKeysGetParams { + var () + return &V1CustomCloudTypeCloudAccountKeysGetParams{ + HTTPClient: client, + } +} + +/* +V1CustomCloudTypeCloudAccountKeysGetParams contains all the parameters to send to the API endpoint +for the v1 custom cloud type cloud account keys get operation typically these are written to a http.Request +*/ +type V1CustomCloudTypeCloudAccountKeysGetParams struct { + + /*CloudType + Unique cloud type + + */ + CloudType string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 custom cloud type cloud account keys get params +func (o *V1CustomCloudTypeCloudAccountKeysGetParams) WithTimeout(timeout time.Duration) *V1CustomCloudTypeCloudAccountKeysGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 custom cloud type cloud account keys get params +func (o *V1CustomCloudTypeCloudAccountKeysGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 custom cloud type cloud account keys get params +func (o *V1CustomCloudTypeCloudAccountKeysGetParams) WithContext(ctx context.Context) *V1CustomCloudTypeCloudAccountKeysGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 custom cloud type cloud account keys get params +func (o *V1CustomCloudTypeCloudAccountKeysGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 custom cloud type cloud account keys get params +func (o *V1CustomCloudTypeCloudAccountKeysGetParams) WithHTTPClient(client *http.Client) *V1CustomCloudTypeCloudAccountKeysGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 custom cloud type cloud account keys get params +func (o *V1CustomCloudTypeCloudAccountKeysGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithCloudType adds the cloudType to the v1 custom cloud type cloud account keys get params +func (o *V1CustomCloudTypeCloudAccountKeysGetParams) WithCloudType(cloudType string) *V1CustomCloudTypeCloudAccountKeysGetParams { + o.SetCloudType(cloudType) + return o +} + +// SetCloudType adds the cloudType to the v1 custom cloud type cloud account keys get params +func (o *V1CustomCloudTypeCloudAccountKeysGetParams) SetCloudType(cloudType string) { + o.CloudType = cloudType +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CustomCloudTypeCloudAccountKeysGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param cloudType + if err := r.SetPathParam("cloudType", o.CloudType); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_custom_cloud_type_cloud_account_keys_get_responses.go b/api/client/v1/v1_custom_cloud_type_cloud_account_keys_get_responses.go new file mode 100644 index 00000000..7d42d962 --- /dev/null +++ b/api/client/v1/v1_custom_cloud_type_cloud_account_keys_get_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1CustomCloudTypeCloudAccountKeysGetReader is a Reader for the V1CustomCloudTypeCloudAccountKeysGet structure. +type V1CustomCloudTypeCloudAccountKeysGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CustomCloudTypeCloudAccountKeysGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1CustomCloudTypeCloudAccountKeysGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CustomCloudTypeCloudAccountKeysGetOK creates a V1CustomCloudTypeCloudAccountKeysGetOK with default headers values +func NewV1CustomCloudTypeCloudAccountKeysGetOK() *V1CustomCloudTypeCloudAccountKeysGetOK { + return &V1CustomCloudTypeCloudAccountKeysGetOK{} +} + +/* +V1CustomCloudTypeCloudAccountKeysGetOK handles this case with default header values. + +(empty) +*/ +type V1CustomCloudTypeCloudAccountKeysGetOK struct { + Payload *models.V1CustomCloudTypeCloudAccountKeys +} + +func (o *V1CustomCloudTypeCloudAccountKeysGetOK) Error() string { + return fmt.Sprintf("[GET /v1/clouds/cloudTypes/{cloudType}/cloudAccountKeys][%d] v1CustomCloudTypeCloudAccountKeysGetOK %+v", 200, o.Payload) +} + +func (o *V1CustomCloudTypeCloudAccountKeysGetOK) GetPayload() *models.V1CustomCloudTypeCloudAccountKeys { + return o.Payload +} + +func (o *V1CustomCloudTypeCloudAccountKeysGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1CustomCloudTypeCloudAccountKeys) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_custom_cloud_type_cloud_account_keys_update_parameters.go b/api/client/v1/v1_custom_cloud_type_cloud_account_keys_update_parameters.go new file mode 100644 index 00000000..dc5474ff --- /dev/null +++ b/api/client/v1/v1_custom_cloud_type_cloud_account_keys_update_parameters.go @@ -0,0 +1,160 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1CustomCloudTypeCloudAccountKeysUpdateParams creates a new V1CustomCloudTypeCloudAccountKeysUpdateParams object +// with the default values initialized. +func NewV1CustomCloudTypeCloudAccountKeysUpdateParams() *V1CustomCloudTypeCloudAccountKeysUpdateParams { + var () + return &V1CustomCloudTypeCloudAccountKeysUpdateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CustomCloudTypeCloudAccountKeysUpdateParamsWithTimeout creates a new V1CustomCloudTypeCloudAccountKeysUpdateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CustomCloudTypeCloudAccountKeysUpdateParamsWithTimeout(timeout time.Duration) *V1CustomCloudTypeCloudAccountKeysUpdateParams { + var () + return &V1CustomCloudTypeCloudAccountKeysUpdateParams{ + + timeout: timeout, + } +} + +// NewV1CustomCloudTypeCloudAccountKeysUpdateParamsWithContext creates a new V1CustomCloudTypeCloudAccountKeysUpdateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CustomCloudTypeCloudAccountKeysUpdateParamsWithContext(ctx context.Context) *V1CustomCloudTypeCloudAccountKeysUpdateParams { + var () + return &V1CustomCloudTypeCloudAccountKeysUpdateParams{ + + Context: ctx, + } +} + +// NewV1CustomCloudTypeCloudAccountKeysUpdateParamsWithHTTPClient creates a new V1CustomCloudTypeCloudAccountKeysUpdateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CustomCloudTypeCloudAccountKeysUpdateParamsWithHTTPClient(client *http.Client) *V1CustomCloudTypeCloudAccountKeysUpdateParams { + var () + return &V1CustomCloudTypeCloudAccountKeysUpdateParams{ + HTTPClient: client, + } +} + +/* +V1CustomCloudTypeCloudAccountKeysUpdateParams contains all the parameters to send to the API endpoint +for the v1 custom cloud type cloud account keys update operation typically these are written to a http.Request +*/ +type V1CustomCloudTypeCloudAccountKeysUpdateParams struct { + + /*Body + Request payload for custom cloud meta entity + + */ + Body *models.V1CustomCloudTypeCloudAccountKeys + /*CloudType + Unique cloud type + + */ + CloudType string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 custom cloud type cloud account keys update params +func (o *V1CustomCloudTypeCloudAccountKeysUpdateParams) WithTimeout(timeout time.Duration) *V1CustomCloudTypeCloudAccountKeysUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 custom cloud type cloud account keys update params +func (o *V1CustomCloudTypeCloudAccountKeysUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 custom cloud type cloud account keys update params +func (o *V1CustomCloudTypeCloudAccountKeysUpdateParams) WithContext(ctx context.Context) *V1CustomCloudTypeCloudAccountKeysUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 custom cloud type cloud account keys update params +func (o *V1CustomCloudTypeCloudAccountKeysUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 custom cloud type cloud account keys update params +func (o *V1CustomCloudTypeCloudAccountKeysUpdateParams) WithHTTPClient(client *http.Client) *V1CustomCloudTypeCloudAccountKeysUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 custom cloud type cloud account keys update params +func (o *V1CustomCloudTypeCloudAccountKeysUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 custom cloud type cloud account keys update params +func (o *V1CustomCloudTypeCloudAccountKeysUpdateParams) WithBody(body *models.V1CustomCloudTypeCloudAccountKeys) *V1CustomCloudTypeCloudAccountKeysUpdateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 custom cloud type cloud account keys update params +func (o *V1CustomCloudTypeCloudAccountKeysUpdateParams) SetBody(body *models.V1CustomCloudTypeCloudAccountKeys) { + o.Body = body +} + +// WithCloudType adds the cloudType to the v1 custom cloud type cloud account keys update params +func (o *V1CustomCloudTypeCloudAccountKeysUpdateParams) WithCloudType(cloudType string) *V1CustomCloudTypeCloudAccountKeysUpdateParams { + o.SetCloudType(cloudType) + return o +} + +// SetCloudType adds the cloudType to the v1 custom cloud type cloud account keys update params +func (o *V1CustomCloudTypeCloudAccountKeysUpdateParams) SetCloudType(cloudType string) { + o.CloudType = cloudType +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CustomCloudTypeCloudAccountKeysUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param cloudType + if err := r.SetPathParam("cloudType", o.CloudType); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_custom_cloud_type_cloud_account_keys_update_responses.go b/api/client/v1/v1_custom_cloud_type_cloud_account_keys_update_responses.go new file mode 100644 index 00000000..df90c389 --- /dev/null +++ b/api/client/v1/v1_custom_cloud_type_cloud_account_keys_update_responses.go @@ -0,0 +1,61 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1CustomCloudTypeCloudAccountKeysUpdateReader is a Reader for the V1CustomCloudTypeCloudAccountKeysUpdate structure. +type V1CustomCloudTypeCloudAccountKeysUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CustomCloudTypeCloudAccountKeysUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1CustomCloudTypeCloudAccountKeysUpdateNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CustomCloudTypeCloudAccountKeysUpdateNoContent creates a V1CustomCloudTypeCloudAccountKeysUpdateNoContent with default headers values +func NewV1CustomCloudTypeCloudAccountKeysUpdateNoContent() *V1CustomCloudTypeCloudAccountKeysUpdateNoContent { + return &V1CustomCloudTypeCloudAccountKeysUpdateNoContent{} +} + +/* +V1CustomCloudTypeCloudAccountKeysUpdateNoContent handles this case with default header values. + +Ok response without content +*/ +type V1CustomCloudTypeCloudAccountKeysUpdateNoContent struct { + /*Audit uid for the request + */ + AuditUID string +} + +func (o *V1CustomCloudTypeCloudAccountKeysUpdateNoContent) Error() string { + return fmt.Sprintf("[PUT /v1/clouds/cloudTypes/{cloudType}/cloudAccountKeys][%d] v1CustomCloudTypeCloudAccountKeysUpdateNoContent ", 204) +} + +func (o *V1CustomCloudTypeCloudAccountKeysUpdateNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header AuditUid + o.AuditUID = response.GetHeader("AuditUid") + + return nil +} diff --git a/api/client/v1/v1_custom_cloud_type_cloud_provider_delete_parameters.go b/api/client/v1/v1_custom_cloud_type_cloud_provider_delete_parameters.go new file mode 100644 index 00000000..b88547af --- /dev/null +++ b/api/client/v1/v1_custom_cloud_type_cloud_provider_delete_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1CustomCloudTypeCloudProviderDeleteParams creates a new V1CustomCloudTypeCloudProviderDeleteParams object +// with the default values initialized. +func NewV1CustomCloudTypeCloudProviderDeleteParams() *V1CustomCloudTypeCloudProviderDeleteParams { + var () + return &V1CustomCloudTypeCloudProviderDeleteParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CustomCloudTypeCloudProviderDeleteParamsWithTimeout creates a new V1CustomCloudTypeCloudProviderDeleteParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CustomCloudTypeCloudProviderDeleteParamsWithTimeout(timeout time.Duration) *V1CustomCloudTypeCloudProviderDeleteParams { + var () + return &V1CustomCloudTypeCloudProviderDeleteParams{ + + timeout: timeout, + } +} + +// NewV1CustomCloudTypeCloudProviderDeleteParamsWithContext creates a new V1CustomCloudTypeCloudProviderDeleteParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CustomCloudTypeCloudProviderDeleteParamsWithContext(ctx context.Context) *V1CustomCloudTypeCloudProviderDeleteParams { + var () + return &V1CustomCloudTypeCloudProviderDeleteParams{ + + Context: ctx, + } +} + +// NewV1CustomCloudTypeCloudProviderDeleteParamsWithHTTPClient creates a new V1CustomCloudTypeCloudProviderDeleteParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CustomCloudTypeCloudProviderDeleteParamsWithHTTPClient(client *http.Client) *V1CustomCloudTypeCloudProviderDeleteParams { + var () + return &V1CustomCloudTypeCloudProviderDeleteParams{ + HTTPClient: client, + } +} + +/* +V1CustomCloudTypeCloudProviderDeleteParams contains all the parameters to send to the API endpoint +for the v1 custom cloud type cloud provider delete operation typically these are written to a http.Request +*/ +type V1CustomCloudTypeCloudProviderDeleteParams struct { + + /*CloudType + Unique cloud type + + */ + CloudType string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 custom cloud type cloud provider delete params +func (o *V1CustomCloudTypeCloudProviderDeleteParams) WithTimeout(timeout time.Duration) *V1CustomCloudTypeCloudProviderDeleteParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 custom cloud type cloud provider delete params +func (o *V1CustomCloudTypeCloudProviderDeleteParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 custom cloud type cloud provider delete params +func (o *V1CustomCloudTypeCloudProviderDeleteParams) WithContext(ctx context.Context) *V1CustomCloudTypeCloudProviderDeleteParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 custom cloud type cloud provider delete params +func (o *V1CustomCloudTypeCloudProviderDeleteParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 custom cloud type cloud provider delete params +func (o *V1CustomCloudTypeCloudProviderDeleteParams) WithHTTPClient(client *http.Client) *V1CustomCloudTypeCloudProviderDeleteParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 custom cloud type cloud provider delete params +func (o *V1CustomCloudTypeCloudProviderDeleteParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithCloudType adds the cloudType to the v1 custom cloud type cloud provider delete params +func (o *V1CustomCloudTypeCloudProviderDeleteParams) WithCloudType(cloudType string) *V1CustomCloudTypeCloudProviderDeleteParams { + o.SetCloudType(cloudType) + return o +} + +// SetCloudType adds the cloudType to the v1 custom cloud type cloud provider delete params +func (o *V1CustomCloudTypeCloudProviderDeleteParams) SetCloudType(cloudType string) { + o.CloudType = cloudType +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CustomCloudTypeCloudProviderDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param cloudType + if err := r.SetPathParam("cloudType", o.CloudType); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_custom_cloud_type_cloud_provider_delete_responses.go b/api/client/v1/v1_custom_cloud_type_cloud_provider_delete_responses.go new file mode 100644 index 00000000..6e5c6a8c --- /dev/null +++ b/api/client/v1/v1_custom_cloud_type_cloud_provider_delete_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1CustomCloudTypeCloudProviderDeleteReader is a Reader for the V1CustomCloudTypeCloudProviderDelete structure. +type V1CustomCloudTypeCloudProviderDeleteReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CustomCloudTypeCloudProviderDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1CustomCloudTypeCloudProviderDeleteNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CustomCloudTypeCloudProviderDeleteNoContent creates a V1CustomCloudTypeCloudProviderDeleteNoContent with default headers values +func NewV1CustomCloudTypeCloudProviderDeleteNoContent() *V1CustomCloudTypeCloudProviderDeleteNoContent { + return &V1CustomCloudTypeCloudProviderDeleteNoContent{} +} + +/* +V1CustomCloudTypeCloudProviderDeleteNoContent handles this case with default header values. + +The resource was deleted successfully +*/ +type V1CustomCloudTypeCloudProviderDeleteNoContent struct { +} + +func (o *V1CustomCloudTypeCloudProviderDeleteNoContent) Error() string { + return fmt.Sprintf("[DELETE /v1/clouds/cloudTypes/{cloudType}/content/cloudProvider][%d] v1CustomCloudTypeCloudProviderDeleteNoContent ", 204) +} + +func (o *V1CustomCloudTypeCloudProviderDeleteNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_custom_cloud_type_cloud_provider_get_parameters.go b/api/client/v1/v1_custom_cloud_type_cloud_provider_get_parameters.go new file mode 100644 index 00000000..4b6b6ee8 --- /dev/null +++ b/api/client/v1/v1_custom_cloud_type_cloud_provider_get_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1CustomCloudTypeCloudProviderGetParams creates a new V1CustomCloudTypeCloudProviderGetParams object +// with the default values initialized. +func NewV1CustomCloudTypeCloudProviderGetParams() *V1CustomCloudTypeCloudProviderGetParams { + var () + return &V1CustomCloudTypeCloudProviderGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CustomCloudTypeCloudProviderGetParamsWithTimeout creates a new V1CustomCloudTypeCloudProviderGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CustomCloudTypeCloudProviderGetParamsWithTimeout(timeout time.Duration) *V1CustomCloudTypeCloudProviderGetParams { + var () + return &V1CustomCloudTypeCloudProviderGetParams{ + + timeout: timeout, + } +} + +// NewV1CustomCloudTypeCloudProviderGetParamsWithContext creates a new V1CustomCloudTypeCloudProviderGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CustomCloudTypeCloudProviderGetParamsWithContext(ctx context.Context) *V1CustomCloudTypeCloudProviderGetParams { + var () + return &V1CustomCloudTypeCloudProviderGetParams{ + + Context: ctx, + } +} + +// NewV1CustomCloudTypeCloudProviderGetParamsWithHTTPClient creates a new V1CustomCloudTypeCloudProviderGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CustomCloudTypeCloudProviderGetParamsWithHTTPClient(client *http.Client) *V1CustomCloudTypeCloudProviderGetParams { + var () + return &V1CustomCloudTypeCloudProviderGetParams{ + HTTPClient: client, + } +} + +/* +V1CustomCloudTypeCloudProviderGetParams contains all the parameters to send to the API endpoint +for the v1 custom cloud type cloud provider get operation typically these are written to a http.Request +*/ +type V1CustomCloudTypeCloudProviderGetParams struct { + + /*CloudType + Unique cloud type + + */ + CloudType string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 custom cloud type cloud provider get params +func (o *V1CustomCloudTypeCloudProviderGetParams) WithTimeout(timeout time.Duration) *V1CustomCloudTypeCloudProviderGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 custom cloud type cloud provider get params +func (o *V1CustomCloudTypeCloudProviderGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 custom cloud type cloud provider get params +func (o *V1CustomCloudTypeCloudProviderGetParams) WithContext(ctx context.Context) *V1CustomCloudTypeCloudProviderGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 custom cloud type cloud provider get params +func (o *V1CustomCloudTypeCloudProviderGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 custom cloud type cloud provider get params +func (o *V1CustomCloudTypeCloudProviderGetParams) WithHTTPClient(client *http.Client) *V1CustomCloudTypeCloudProviderGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 custom cloud type cloud provider get params +func (o *V1CustomCloudTypeCloudProviderGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithCloudType adds the cloudType to the v1 custom cloud type cloud provider get params +func (o *V1CustomCloudTypeCloudProviderGetParams) WithCloudType(cloudType string) *V1CustomCloudTypeCloudProviderGetParams { + o.SetCloudType(cloudType) + return o +} + +// SetCloudType adds the cloudType to the v1 custom cloud type cloud provider get params +func (o *V1CustomCloudTypeCloudProviderGetParams) SetCloudType(cloudType string) { + o.CloudType = cloudType +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CustomCloudTypeCloudProviderGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param cloudType + if err := r.SetPathParam("cloudType", o.CloudType); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_custom_cloud_type_cloud_provider_get_responses.go b/api/client/v1/v1_custom_cloud_type_cloud_provider_get_responses.go new file mode 100644 index 00000000..e99f00f0 --- /dev/null +++ b/api/client/v1/v1_custom_cloud_type_cloud_provider_get_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1CustomCloudTypeCloudProviderGetReader is a Reader for the V1CustomCloudTypeCloudProviderGet structure. +type V1CustomCloudTypeCloudProviderGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CustomCloudTypeCloudProviderGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1CustomCloudTypeCloudProviderGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CustomCloudTypeCloudProviderGetOK creates a V1CustomCloudTypeCloudProviderGetOK with default headers values +func NewV1CustomCloudTypeCloudProviderGetOK() *V1CustomCloudTypeCloudProviderGetOK { + return &V1CustomCloudTypeCloudProviderGetOK{} +} + +/* +V1CustomCloudTypeCloudProviderGetOK handles this case with default header values. + +(empty) +*/ +type V1CustomCloudTypeCloudProviderGetOK struct { + Payload *models.V1CustomCloudTypeContentResponse +} + +func (o *V1CustomCloudTypeCloudProviderGetOK) Error() string { + return fmt.Sprintf("[GET /v1/clouds/cloudTypes/{cloudType}/content/cloudProvider][%d] v1CustomCloudTypeCloudProviderGetOK %+v", 200, o.Payload) +} + +func (o *V1CustomCloudTypeCloudProviderGetOK) GetPayload() *models.V1CustomCloudTypeContentResponse { + return o.Payload +} + +func (o *V1CustomCloudTypeCloudProviderGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1CustomCloudTypeContentResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_custom_cloud_type_cloud_provider_update_parameters.go b/api/client/v1/v1_custom_cloud_type_cloud_provider_update_parameters.go new file mode 100644 index 00000000..6a38c42f --- /dev/null +++ b/api/client/v1/v1_custom_cloud_type_cloud_provider_update_parameters.go @@ -0,0 +1,162 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1CustomCloudTypeCloudProviderUpdateParams creates a new V1CustomCloudTypeCloudProviderUpdateParams object +// with the default values initialized. +func NewV1CustomCloudTypeCloudProviderUpdateParams() *V1CustomCloudTypeCloudProviderUpdateParams { + var () + return &V1CustomCloudTypeCloudProviderUpdateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CustomCloudTypeCloudProviderUpdateParamsWithTimeout creates a new V1CustomCloudTypeCloudProviderUpdateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CustomCloudTypeCloudProviderUpdateParamsWithTimeout(timeout time.Duration) *V1CustomCloudTypeCloudProviderUpdateParams { + var () + return &V1CustomCloudTypeCloudProviderUpdateParams{ + + timeout: timeout, + } +} + +// NewV1CustomCloudTypeCloudProviderUpdateParamsWithContext creates a new V1CustomCloudTypeCloudProviderUpdateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CustomCloudTypeCloudProviderUpdateParamsWithContext(ctx context.Context) *V1CustomCloudTypeCloudProviderUpdateParams { + var () + return &V1CustomCloudTypeCloudProviderUpdateParams{ + + Context: ctx, + } +} + +// NewV1CustomCloudTypeCloudProviderUpdateParamsWithHTTPClient creates a new V1CustomCloudTypeCloudProviderUpdateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CustomCloudTypeCloudProviderUpdateParamsWithHTTPClient(client *http.Client) *V1CustomCloudTypeCloudProviderUpdateParams { + var () + return &V1CustomCloudTypeCloudProviderUpdateParams{ + HTTPClient: client, + } +} + +/* +V1CustomCloudTypeCloudProviderUpdateParams contains all the parameters to send to the API endpoint +for the v1 custom cloud type cloud provider update operation typically these are written to a http.Request +*/ +type V1CustomCloudTypeCloudProviderUpdateParams struct { + + /*CloudType + Unique cloud type + + */ + CloudType string + /*FileName*/ + FileName runtime.NamedReadCloser + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 custom cloud type cloud provider update params +func (o *V1CustomCloudTypeCloudProviderUpdateParams) WithTimeout(timeout time.Duration) *V1CustomCloudTypeCloudProviderUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 custom cloud type cloud provider update params +func (o *V1CustomCloudTypeCloudProviderUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 custom cloud type cloud provider update params +func (o *V1CustomCloudTypeCloudProviderUpdateParams) WithContext(ctx context.Context) *V1CustomCloudTypeCloudProviderUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 custom cloud type cloud provider update params +func (o *V1CustomCloudTypeCloudProviderUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 custom cloud type cloud provider update params +func (o *V1CustomCloudTypeCloudProviderUpdateParams) WithHTTPClient(client *http.Client) *V1CustomCloudTypeCloudProviderUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 custom cloud type cloud provider update params +func (o *V1CustomCloudTypeCloudProviderUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithCloudType adds the cloudType to the v1 custom cloud type cloud provider update params +func (o *V1CustomCloudTypeCloudProviderUpdateParams) WithCloudType(cloudType string) *V1CustomCloudTypeCloudProviderUpdateParams { + o.SetCloudType(cloudType) + return o +} + +// SetCloudType adds the cloudType to the v1 custom cloud type cloud provider update params +func (o *V1CustomCloudTypeCloudProviderUpdateParams) SetCloudType(cloudType string) { + o.CloudType = cloudType +} + +// WithFileName adds the fileName to the v1 custom cloud type cloud provider update params +func (o *V1CustomCloudTypeCloudProviderUpdateParams) WithFileName(fileName runtime.NamedReadCloser) *V1CustomCloudTypeCloudProviderUpdateParams { + o.SetFileName(fileName) + return o +} + +// SetFileName adds the fileName to the v1 custom cloud type cloud provider update params +func (o *V1CustomCloudTypeCloudProviderUpdateParams) SetFileName(fileName runtime.NamedReadCloser) { + o.FileName = fileName +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CustomCloudTypeCloudProviderUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param cloudType + if err := r.SetPathParam("cloudType", o.CloudType); err != nil { + return err + } + + if o.FileName != nil { + + if o.FileName != nil { + + // form file param fileName + if err := r.SetFileParam("fileName", o.FileName); err != nil { + return err + } + + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_custom_cloud_type_cloud_provider_update_responses.go b/api/client/v1/v1_custom_cloud_type_cloud_provider_update_responses.go new file mode 100644 index 00000000..6ad8558b --- /dev/null +++ b/api/client/v1/v1_custom_cloud_type_cloud_provider_update_responses.go @@ -0,0 +1,61 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1CustomCloudTypeCloudProviderUpdateReader is a Reader for the V1CustomCloudTypeCloudProviderUpdate structure. +type V1CustomCloudTypeCloudProviderUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CustomCloudTypeCloudProviderUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1CustomCloudTypeCloudProviderUpdateNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CustomCloudTypeCloudProviderUpdateNoContent creates a V1CustomCloudTypeCloudProviderUpdateNoContent with default headers values +func NewV1CustomCloudTypeCloudProviderUpdateNoContent() *V1CustomCloudTypeCloudProviderUpdateNoContent { + return &V1CustomCloudTypeCloudProviderUpdateNoContent{} +} + +/* +V1CustomCloudTypeCloudProviderUpdateNoContent handles this case with default header values. + +Ok response without content +*/ +type V1CustomCloudTypeCloudProviderUpdateNoContent struct { + /*Audit uid for the request + */ + AuditUID string +} + +func (o *V1CustomCloudTypeCloudProviderUpdateNoContent) Error() string { + return fmt.Sprintf("[PUT /v1/clouds/cloudTypes/{cloudType}/content/cloudProvider][%d] v1CustomCloudTypeCloudProviderUpdateNoContent ", 204) +} + +func (o *V1CustomCloudTypeCloudProviderUpdateNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header AuditUid + o.AuditUID = response.GetHeader("AuditUid") + + return nil +} diff --git a/api/client/v1/v1_custom_cloud_type_cluster_template_delete_parameters.go b/api/client/v1/v1_custom_cloud_type_cluster_template_delete_parameters.go new file mode 100644 index 00000000..930b85a8 --- /dev/null +++ b/api/client/v1/v1_custom_cloud_type_cluster_template_delete_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1CustomCloudTypeClusterTemplateDeleteParams creates a new V1CustomCloudTypeClusterTemplateDeleteParams object +// with the default values initialized. +func NewV1CustomCloudTypeClusterTemplateDeleteParams() *V1CustomCloudTypeClusterTemplateDeleteParams { + var () + return &V1CustomCloudTypeClusterTemplateDeleteParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CustomCloudTypeClusterTemplateDeleteParamsWithTimeout creates a new V1CustomCloudTypeClusterTemplateDeleteParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CustomCloudTypeClusterTemplateDeleteParamsWithTimeout(timeout time.Duration) *V1CustomCloudTypeClusterTemplateDeleteParams { + var () + return &V1CustomCloudTypeClusterTemplateDeleteParams{ + + timeout: timeout, + } +} + +// NewV1CustomCloudTypeClusterTemplateDeleteParamsWithContext creates a new V1CustomCloudTypeClusterTemplateDeleteParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CustomCloudTypeClusterTemplateDeleteParamsWithContext(ctx context.Context) *V1CustomCloudTypeClusterTemplateDeleteParams { + var () + return &V1CustomCloudTypeClusterTemplateDeleteParams{ + + Context: ctx, + } +} + +// NewV1CustomCloudTypeClusterTemplateDeleteParamsWithHTTPClient creates a new V1CustomCloudTypeClusterTemplateDeleteParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CustomCloudTypeClusterTemplateDeleteParamsWithHTTPClient(client *http.Client) *V1CustomCloudTypeClusterTemplateDeleteParams { + var () + return &V1CustomCloudTypeClusterTemplateDeleteParams{ + HTTPClient: client, + } +} + +/* +V1CustomCloudTypeClusterTemplateDeleteParams contains all the parameters to send to the API endpoint +for the v1 custom cloud type cluster template delete operation typically these are written to a http.Request +*/ +type V1CustomCloudTypeClusterTemplateDeleteParams struct { + + /*CloudType + Unique cloud type + + */ + CloudType string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 custom cloud type cluster template delete params +func (o *V1CustomCloudTypeClusterTemplateDeleteParams) WithTimeout(timeout time.Duration) *V1CustomCloudTypeClusterTemplateDeleteParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 custom cloud type cluster template delete params +func (o *V1CustomCloudTypeClusterTemplateDeleteParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 custom cloud type cluster template delete params +func (o *V1CustomCloudTypeClusterTemplateDeleteParams) WithContext(ctx context.Context) *V1CustomCloudTypeClusterTemplateDeleteParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 custom cloud type cluster template delete params +func (o *V1CustomCloudTypeClusterTemplateDeleteParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 custom cloud type cluster template delete params +func (o *V1CustomCloudTypeClusterTemplateDeleteParams) WithHTTPClient(client *http.Client) *V1CustomCloudTypeClusterTemplateDeleteParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 custom cloud type cluster template delete params +func (o *V1CustomCloudTypeClusterTemplateDeleteParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithCloudType adds the cloudType to the v1 custom cloud type cluster template delete params +func (o *V1CustomCloudTypeClusterTemplateDeleteParams) WithCloudType(cloudType string) *V1CustomCloudTypeClusterTemplateDeleteParams { + o.SetCloudType(cloudType) + return o +} + +// SetCloudType adds the cloudType to the v1 custom cloud type cluster template delete params +func (o *V1CustomCloudTypeClusterTemplateDeleteParams) SetCloudType(cloudType string) { + o.CloudType = cloudType +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CustomCloudTypeClusterTemplateDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param cloudType + if err := r.SetPathParam("cloudType", o.CloudType); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_custom_cloud_type_cluster_template_delete_responses.go b/api/client/v1/v1_custom_cloud_type_cluster_template_delete_responses.go new file mode 100644 index 00000000..2c40c736 --- /dev/null +++ b/api/client/v1/v1_custom_cloud_type_cluster_template_delete_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1CustomCloudTypeClusterTemplateDeleteReader is a Reader for the V1CustomCloudTypeClusterTemplateDelete structure. +type V1CustomCloudTypeClusterTemplateDeleteReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CustomCloudTypeClusterTemplateDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1CustomCloudTypeClusterTemplateDeleteNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CustomCloudTypeClusterTemplateDeleteNoContent creates a V1CustomCloudTypeClusterTemplateDeleteNoContent with default headers values +func NewV1CustomCloudTypeClusterTemplateDeleteNoContent() *V1CustomCloudTypeClusterTemplateDeleteNoContent { + return &V1CustomCloudTypeClusterTemplateDeleteNoContent{} +} + +/* +V1CustomCloudTypeClusterTemplateDeleteNoContent handles this case with default header values. + +The resource was deleted successfully +*/ +type V1CustomCloudTypeClusterTemplateDeleteNoContent struct { +} + +func (o *V1CustomCloudTypeClusterTemplateDeleteNoContent) Error() string { + return fmt.Sprintf("[DELETE /v1/clouds/cloudTypes/{cloudType}/content/templates/clusterTemplate][%d] v1CustomCloudTypeClusterTemplateDeleteNoContent ", 204) +} + +func (o *V1CustomCloudTypeClusterTemplateDeleteNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_custom_cloud_type_cluster_template_get_parameters.go b/api/client/v1/v1_custom_cloud_type_cluster_template_get_parameters.go new file mode 100644 index 00000000..10d2d50f --- /dev/null +++ b/api/client/v1/v1_custom_cloud_type_cluster_template_get_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1CustomCloudTypeClusterTemplateGetParams creates a new V1CustomCloudTypeClusterTemplateGetParams object +// with the default values initialized. +func NewV1CustomCloudTypeClusterTemplateGetParams() *V1CustomCloudTypeClusterTemplateGetParams { + var () + return &V1CustomCloudTypeClusterTemplateGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CustomCloudTypeClusterTemplateGetParamsWithTimeout creates a new V1CustomCloudTypeClusterTemplateGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CustomCloudTypeClusterTemplateGetParamsWithTimeout(timeout time.Duration) *V1CustomCloudTypeClusterTemplateGetParams { + var () + return &V1CustomCloudTypeClusterTemplateGetParams{ + + timeout: timeout, + } +} + +// NewV1CustomCloudTypeClusterTemplateGetParamsWithContext creates a new V1CustomCloudTypeClusterTemplateGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CustomCloudTypeClusterTemplateGetParamsWithContext(ctx context.Context) *V1CustomCloudTypeClusterTemplateGetParams { + var () + return &V1CustomCloudTypeClusterTemplateGetParams{ + + Context: ctx, + } +} + +// NewV1CustomCloudTypeClusterTemplateGetParamsWithHTTPClient creates a new V1CustomCloudTypeClusterTemplateGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CustomCloudTypeClusterTemplateGetParamsWithHTTPClient(client *http.Client) *V1CustomCloudTypeClusterTemplateGetParams { + var () + return &V1CustomCloudTypeClusterTemplateGetParams{ + HTTPClient: client, + } +} + +/* +V1CustomCloudTypeClusterTemplateGetParams contains all the parameters to send to the API endpoint +for the v1 custom cloud type cluster template get operation typically these are written to a http.Request +*/ +type V1CustomCloudTypeClusterTemplateGetParams struct { + + /*CloudType + Unique cloud type + + */ + CloudType string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 custom cloud type cluster template get params +func (o *V1CustomCloudTypeClusterTemplateGetParams) WithTimeout(timeout time.Duration) *V1CustomCloudTypeClusterTemplateGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 custom cloud type cluster template get params +func (o *V1CustomCloudTypeClusterTemplateGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 custom cloud type cluster template get params +func (o *V1CustomCloudTypeClusterTemplateGetParams) WithContext(ctx context.Context) *V1CustomCloudTypeClusterTemplateGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 custom cloud type cluster template get params +func (o *V1CustomCloudTypeClusterTemplateGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 custom cloud type cluster template get params +func (o *V1CustomCloudTypeClusterTemplateGetParams) WithHTTPClient(client *http.Client) *V1CustomCloudTypeClusterTemplateGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 custom cloud type cluster template get params +func (o *V1CustomCloudTypeClusterTemplateGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithCloudType adds the cloudType to the v1 custom cloud type cluster template get params +func (o *V1CustomCloudTypeClusterTemplateGetParams) WithCloudType(cloudType string) *V1CustomCloudTypeClusterTemplateGetParams { + o.SetCloudType(cloudType) + return o +} + +// SetCloudType adds the cloudType to the v1 custom cloud type cluster template get params +func (o *V1CustomCloudTypeClusterTemplateGetParams) SetCloudType(cloudType string) { + o.CloudType = cloudType +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CustomCloudTypeClusterTemplateGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param cloudType + if err := r.SetPathParam("cloudType", o.CloudType); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_custom_cloud_type_cluster_template_get_responses.go b/api/client/v1/v1_custom_cloud_type_cluster_template_get_responses.go new file mode 100644 index 00000000..6cfca831 --- /dev/null +++ b/api/client/v1/v1_custom_cloud_type_cluster_template_get_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1CustomCloudTypeClusterTemplateGetReader is a Reader for the V1CustomCloudTypeClusterTemplateGet structure. +type V1CustomCloudTypeClusterTemplateGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CustomCloudTypeClusterTemplateGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1CustomCloudTypeClusterTemplateGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CustomCloudTypeClusterTemplateGetOK creates a V1CustomCloudTypeClusterTemplateGetOK with default headers values +func NewV1CustomCloudTypeClusterTemplateGetOK() *V1CustomCloudTypeClusterTemplateGetOK { + return &V1CustomCloudTypeClusterTemplateGetOK{} +} + +/* +V1CustomCloudTypeClusterTemplateGetOK handles this case with default header values. + +(empty) +*/ +type V1CustomCloudTypeClusterTemplateGetOK struct { + Payload *models.V1CustomCloudTypeContentResponse +} + +func (o *V1CustomCloudTypeClusterTemplateGetOK) Error() string { + return fmt.Sprintf("[GET /v1/clouds/cloudTypes/{cloudType}/content/templates/clusterTemplate][%d] v1CustomCloudTypeClusterTemplateGetOK %+v", 200, o.Payload) +} + +func (o *V1CustomCloudTypeClusterTemplateGetOK) GetPayload() *models.V1CustomCloudTypeContentResponse { + return o.Payload +} + +func (o *V1CustomCloudTypeClusterTemplateGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1CustomCloudTypeContentResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_custom_cloud_type_cluster_template_update_parameters.go b/api/client/v1/v1_custom_cloud_type_cluster_template_update_parameters.go new file mode 100644 index 00000000..a0ccf87c --- /dev/null +++ b/api/client/v1/v1_custom_cloud_type_cluster_template_update_parameters.go @@ -0,0 +1,162 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1CustomCloudTypeClusterTemplateUpdateParams creates a new V1CustomCloudTypeClusterTemplateUpdateParams object +// with the default values initialized. +func NewV1CustomCloudTypeClusterTemplateUpdateParams() *V1CustomCloudTypeClusterTemplateUpdateParams { + var () + return &V1CustomCloudTypeClusterTemplateUpdateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CustomCloudTypeClusterTemplateUpdateParamsWithTimeout creates a new V1CustomCloudTypeClusterTemplateUpdateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CustomCloudTypeClusterTemplateUpdateParamsWithTimeout(timeout time.Duration) *V1CustomCloudTypeClusterTemplateUpdateParams { + var () + return &V1CustomCloudTypeClusterTemplateUpdateParams{ + + timeout: timeout, + } +} + +// NewV1CustomCloudTypeClusterTemplateUpdateParamsWithContext creates a new V1CustomCloudTypeClusterTemplateUpdateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CustomCloudTypeClusterTemplateUpdateParamsWithContext(ctx context.Context) *V1CustomCloudTypeClusterTemplateUpdateParams { + var () + return &V1CustomCloudTypeClusterTemplateUpdateParams{ + + Context: ctx, + } +} + +// NewV1CustomCloudTypeClusterTemplateUpdateParamsWithHTTPClient creates a new V1CustomCloudTypeClusterTemplateUpdateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CustomCloudTypeClusterTemplateUpdateParamsWithHTTPClient(client *http.Client) *V1CustomCloudTypeClusterTemplateUpdateParams { + var () + return &V1CustomCloudTypeClusterTemplateUpdateParams{ + HTTPClient: client, + } +} + +/* +V1CustomCloudTypeClusterTemplateUpdateParams contains all the parameters to send to the API endpoint +for the v1 custom cloud type cluster template update operation typically these are written to a http.Request +*/ +type V1CustomCloudTypeClusterTemplateUpdateParams struct { + + /*CloudType + Unique cloud type + + */ + CloudType string + /*FileName*/ + FileName runtime.NamedReadCloser + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 custom cloud type cluster template update params +func (o *V1CustomCloudTypeClusterTemplateUpdateParams) WithTimeout(timeout time.Duration) *V1CustomCloudTypeClusterTemplateUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 custom cloud type cluster template update params +func (o *V1CustomCloudTypeClusterTemplateUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 custom cloud type cluster template update params +func (o *V1CustomCloudTypeClusterTemplateUpdateParams) WithContext(ctx context.Context) *V1CustomCloudTypeClusterTemplateUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 custom cloud type cluster template update params +func (o *V1CustomCloudTypeClusterTemplateUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 custom cloud type cluster template update params +func (o *V1CustomCloudTypeClusterTemplateUpdateParams) WithHTTPClient(client *http.Client) *V1CustomCloudTypeClusterTemplateUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 custom cloud type cluster template update params +func (o *V1CustomCloudTypeClusterTemplateUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithCloudType adds the cloudType to the v1 custom cloud type cluster template update params +func (o *V1CustomCloudTypeClusterTemplateUpdateParams) WithCloudType(cloudType string) *V1CustomCloudTypeClusterTemplateUpdateParams { + o.SetCloudType(cloudType) + return o +} + +// SetCloudType adds the cloudType to the v1 custom cloud type cluster template update params +func (o *V1CustomCloudTypeClusterTemplateUpdateParams) SetCloudType(cloudType string) { + o.CloudType = cloudType +} + +// WithFileName adds the fileName to the v1 custom cloud type cluster template update params +func (o *V1CustomCloudTypeClusterTemplateUpdateParams) WithFileName(fileName runtime.NamedReadCloser) *V1CustomCloudTypeClusterTemplateUpdateParams { + o.SetFileName(fileName) + return o +} + +// SetFileName adds the fileName to the v1 custom cloud type cluster template update params +func (o *V1CustomCloudTypeClusterTemplateUpdateParams) SetFileName(fileName runtime.NamedReadCloser) { + o.FileName = fileName +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CustomCloudTypeClusterTemplateUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param cloudType + if err := r.SetPathParam("cloudType", o.CloudType); err != nil { + return err + } + + if o.FileName != nil { + + if o.FileName != nil { + + // form file param fileName + if err := r.SetFileParam("fileName", o.FileName); err != nil { + return err + } + + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_custom_cloud_type_cluster_template_update_responses.go b/api/client/v1/v1_custom_cloud_type_cluster_template_update_responses.go new file mode 100644 index 00000000..41259437 --- /dev/null +++ b/api/client/v1/v1_custom_cloud_type_cluster_template_update_responses.go @@ -0,0 +1,61 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1CustomCloudTypeClusterTemplateUpdateReader is a Reader for the V1CustomCloudTypeClusterTemplateUpdate structure. +type V1CustomCloudTypeClusterTemplateUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CustomCloudTypeClusterTemplateUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1CustomCloudTypeClusterTemplateUpdateNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CustomCloudTypeClusterTemplateUpdateNoContent creates a V1CustomCloudTypeClusterTemplateUpdateNoContent with default headers values +func NewV1CustomCloudTypeClusterTemplateUpdateNoContent() *V1CustomCloudTypeClusterTemplateUpdateNoContent { + return &V1CustomCloudTypeClusterTemplateUpdateNoContent{} +} + +/* +V1CustomCloudTypeClusterTemplateUpdateNoContent handles this case with default header values. + +Ok response without content +*/ +type V1CustomCloudTypeClusterTemplateUpdateNoContent struct { + /*Audit uid for the request + */ + AuditUID string +} + +func (o *V1CustomCloudTypeClusterTemplateUpdateNoContent) Error() string { + return fmt.Sprintf("[PUT /v1/clouds/cloudTypes/{cloudType}/content/templates/clusterTemplate][%d] v1CustomCloudTypeClusterTemplateUpdateNoContent ", 204) +} + +func (o *V1CustomCloudTypeClusterTemplateUpdateNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header AuditUid + o.AuditUID = response.GetHeader("AuditUid") + + return nil +} diff --git a/api/client/v1/v1_custom_cloud_type_control_plane_delete_parameters.go b/api/client/v1/v1_custom_cloud_type_control_plane_delete_parameters.go new file mode 100644 index 00000000..1f573f2c --- /dev/null +++ b/api/client/v1/v1_custom_cloud_type_control_plane_delete_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1CustomCloudTypeControlPlaneDeleteParams creates a new V1CustomCloudTypeControlPlaneDeleteParams object +// with the default values initialized. +func NewV1CustomCloudTypeControlPlaneDeleteParams() *V1CustomCloudTypeControlPlaneDeleteParams { + var () + return &V1CustomCloudTypeControlPlaneDeleteParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CustomCloudTypeControlPlaneDeleteParamsWithTimeout creates a new V1CustomCloudTypeControlPlaneDeleteParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CustomCloudTypeControlPlaneDeleteParamsWithTimeout(timeout time.Duration) *V1CustomCloudTypeControlPlaneDeleteParams { + var () + return &V1CustomCloudTypeControlPlaneDeleteParams{ + + timeout: timeout, + } +} + +// NewV1CustomCloudTypeControlPlaneDeleteParamsWithContext creates a new V1CustomCloudTypeControlPlaneDeleteParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CustomCloudTypeControlPlaneDeleteParamsWithContext(ctx context.Context) *V1CustomCloudTypeControlPlaneDeleteParams { + var () + return &V1CustomCloudTypeControlPlaneDeleteParams{ + + Context: ctx, + } +} + +// NewV1CustomCloudTypeControlPlaneDeleteParamsWithHTTPClient creates a new V1CustomCloudTypeControlPlaneDeleteParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CustomCloudTypeControlPlaneDeleteParamsWithHTTPClient(client *http.Client) *V1CustomCloudTypeControlPlaneDeleteParams { + var () + return &V1CustomCloudTypeControlPlaneDeleteParams{ + HTTPClient: client, + } +} + +/* +V1CustomCloudTypeControlPlaneDeleteParams contains all the parameters to send to the API endpoint +for the v1 custom cloud type control plane delete operation typically these are written to a http.Request +*/ +type V1CustomCloudTypeControlPlaneDeleteParams struct { + + /*CloudType + Unique cloud type + + */ + CloudType string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 custom cloud type control plane delete params +func (o *V1CustomCloudTypeControlPlaneDeleteParams) WithTimeout(timeout time.Duration) *V1CustomCloudTypeControlPlaneDeleteParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 custom cloud type control plane delete params +func (o *V1CustomCloudTypeControlPlaneDeleteParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 custom cloud type control plane delete params +func (o *V1CustomCloudTypeControlPlaneDeleteParams) WithContext(ctx context.Context) *V1CustomCloudTypeControlPlaneDeleteParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 custom cloud type control plane delete params +func (o *V1CustomCloudTypeControlPlaneDeleteParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 custom cloud type control plane delete params +func (o *V1CustomCloudTypeControlPlaneDeleteParams) WithHTTPClient(client *http.Client) *V1CustomCloudTypeControlPlaneDeleteParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 custom cloud type control plane delete params +func (o *V1CustomCloudTypeControlPlaneDeleteParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithCloudType adds the cloudType to the v1 custom cloud type control plane delete params +func (o *V1CustomCloudTypeControlPlaneDeleteParams) WithCloudType(cloudType string) *V1CustomCloudTypeControlPlaneDeleteParams { + o.SetCloudType(cloudType) + return o +} + +// SetCloudType adds the cloudType to the v1 custom cloud type control plane delete params +func (o *V1CustomCloudTypeControlPlaneDeleteParams) SetCloudType(cloudType string) { + o.CloudType = cloudType +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CustomCloudTypeControlPlaneDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param cloudType + if err := r.SetPathParam("cloudType", o.CloudType); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_custom_cloud_type_control_plane_delete_responses.go b/api/client/v1/v1_custom_cloud_type_control_plane_delete_responses.go new file mode 100644 index 00000000..3ff907c8 --- /dev/null +++ b/api/client/v1/v1_custom_cloud_type_control_plane_delete_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1CustomCloudTypeControlPlaneDeleteReader is a Reader for the V1CustomCloudTypeControlPlaneDelete structure. +type V1CustomCloudTypeControlPlaneDeleteReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CustomCloudTypeControlPlaneDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1CustomCloudTypeControlPlaneDeleteNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CustomCloudTypeControlPlaneDeleteNoContent creates a V1CustomCloudTypeControlPlaneDeleteNoContent with default headers values +func NewV1CustomCloudTypeControlPlaneDeleteNoContent() *V1CustomCloudTypeControlPlaneDeleteNoContent { + return &V1CustomCloudTypeControlPlaneDeleteNoContent{} +} + +/* +V1CustomCloudTypeControlPlaneDeleteNoContent handles this case with default header values. + +The resource was deleted successfully +*/ +type V1CustomCloudTypeControlPlaneDeleteNoContent struct { +} + +func (o *V1CustomCloudTypeControlPlaneDeleteNoContent) Error() string { + return fmt.Sprintf("[DELETE /v1/clouds/cloudTypes/{cloudType}/content/controlPlane][%d] v1CustomCloudTypeControlPlaneDeleteNoContent ", 204) +} + +func (o *V1CustomCloudTypeControlPlaneDeleteNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_custom_cloud_type_control_plane_get_parameters.go b/api/client/v1/v1_custom_cloud_type_control_plane_get_parameters.go new file mode 100644 index 00000000..e2d9667b --- /dev/null +++ b/api/client/v1/v1_custom_cloud_type_control_plane_get_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1CustomCloudTypeControlPlaneGetParams creates a new V1CustomCloudTypeControlPlaneGetParams object +// with the default values initialized. +func NewV1CustomCloudTypeControlPlaneGetParams() *V1CustomCloudTypeControlPlaneGetParams { + var () + return &V1CustomCloudTypeControlPlaneGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CustomCloudTypeControlPlaneGetParamsWithTimeout creates a new V1CustomCloudTypeControlPlaneGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CustomCloudTypeControlPlaneGetParamsWithTimeout(timeout time.Duration) *V1CustomCloudTypeControlPlaneGetParams { + var () + return &V1CustomCloudTypeControlPlaneGetParams{ + + timeout: timeout, + } +} + +// NewV1CustomCloudTypeControlPlaneGetParamsWithContext creates a new V1CustomCloudTypeControlPlaneGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CustomCloudTypeControlPlaneGetParamsWithContext(ctx context.Context) *V1CustomCloudTypeControlPlaneGetParams { + var () + return &V1CustomCloudTypeControlPlaneGetParams{ + + Context: ctx, + } +} + +// NewV1CustomCloudTypeControlPlaneGetParamsWithHTTPClient creates a new V1CustomCloudTypeControlPlaneGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CustomCloudTypeControlPlaneGetParamsWithHTTPClient(client *http.Client) *V1CustomCloudTypeControlPlaneGetParams { + var () + return &V1CustomCloudTypeControlPlaneGetParams{ + HTTPClient: client, + } +} + +/* +V1CustomCloudTypeControlPlaneGetParams contains all the parameters to send to the API endpoint +for the v1 custom cloud type control plane get operation typically these are written to a http.Request +*/ +type V1CustomCloudTypeControlPlaneGetParams struct { + + /*CloudType + Unique cloud type + + */ + CloudType string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 custom cloud type control plane get params +func (o *V1CustomCloudTypeControlPlaneGetParams) WithTimeout(timeout time.Duration) *V1CustomCloudTypeControlPlaneGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 custom cloud type control plane get params +func (o *V1CustomCloudTypeControlPlaneGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 custom cloud type control plane get params +func (o *V1CustomCloudTypeControlPlaneGetParams) WithContext(ctx context.Context) *V1CustomCloudTypeControlPlaneGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 custom cloud type control plane get params +func (o *V1CustomCloudTypeControlPlaneGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 custom cloud type control plane get params +func (o *V1CustomCloudTypeControlPlaneGetParams) WithHTTPClient(client *http.Client) *V1CustomCloudTypeControlPlaneGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 custom cloud type control plane get params +func (o *V1CustomCloudTypeControlPlaneGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithCloudType adds the cloudType to the v1 custom cloud type control plane get params +func (o *V1CustomCloudTypeControlPlaneGetParams) WithCloudType(cloudType string) *V1CustomCloudTypeControlPlaneGetParams { + o.SetCloudType(cloudType) + return o +} + +// SetCloudType adds the cloudType to the v1 custom cloud type control plane get params +func (o *V1CustomCloudTypeControlPlaneGetParams) SetCloudType(cloudType string) { + o.CloudType = cloudType +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CustomCloudTypeControlPlaneGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param cloudType + if err := r.SetPathParam("cloudType", o.CloudType); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_custom_cloud_type_control_plane_get_responses.go b/api/client/v1/v1_custom_cloud_type_control_plane_get_responses.go new file mode 100644 index 00000000..0a408db5 --- /dev/null +++ b/api/client/v1/v1_custom_cloud_type_control_plane_get_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1CustomCloudTypeControlPlaneGetReader is a Reader for the V1CustomCloudTypeControlPlaneGet structure. +type V1CustomCloudTypeControlPlaneGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CustomCloudTypeControlPlaneGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1CustomCloudTypeControlPlaneGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CustomCloudTypeControlPlaneGetOK creates a V1CustomCloudTypeControlPlaneGetOK with default headers values +func NewV1CustomCloudTypeControlPlaneGetOK() *V1CustomCloudTypeControlPlaneGetOK { + return &V1CustomCloudTypeControlPlaneGetOK{} +} + +/* +V1CustomCloudTypeControlPlaneGetOK handles this case with default header values. + +(empty) +*/ +type V1CustomCloudTypeControlPlaneGetOK struct { + Payload *models.V1CustomCloudTypeContentResponse +} + +func (o *V1CustomCloudTypeControlPlaneGetOK) Error() string { + return fmt.Sprintf("[GET /v1/clouds/cloudTypes/{cloudType}/content/controlPlane][%d] v1CustomCloudTypeControlPlaneGetOK %+v", 200, o.Payload) +} + +func (o *V1CustomCloudTypeControlPlaneGetOK) GetPayload() *models.V1CustomCloudTypeContentResponse { + return o.Payload +} + +func (o *V1CustomCloudTypeControlPlaneGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1CustomCloudTypeContentResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_custom_cloud_type_control_plane_pool_template_delete_parameters.go b/api/client/v1/v1_custom_cloud_type_control_plane_pool_template_delete_parameters.go new file mode 100644 index 00000000..29561c33 --- /dev/null +++ b/api/client/v1/v1_custom_cloud_type_control_plane_pool_template_delete_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1CustomCloudTypeControlPlanePoolTemplateDeleteParams creates a new V1CustomCloudTypeControlPlanePoolTemplateDeleteParams object +// with the default values initialized. +func NewV1CustomCloudTypeControlPlanePoolTemplateDeleteParams() *V1CustomCloudTypeControlPlanePoolTemplateDeleteParams { + var () + return &V1CustomCloudTypeControlPlanePoolTemplateDeleteParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CustomCloudTypeControlPlanePoolTemplateDeleteParamsWithTimeout creates a new V1CustomCloudTypeControlPlanePoolTemplateDeleteParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CustomCloudTypeControlPlanePoolTemplateDeleteParamsWithTimeout(timeout time.Duration) *V1CustomCloudTypeControlPlanePoolTemplateDeleteParams { + var () + return &V1CustomCloudTypeControlPlanePoolTemplateDeleteParams{ + + timeout: timeout, + } +} + +// NewV1CustomCloudTypeControlPlanePoolTemplateDeleteParamsWithContext creates a new V1CustomCloudTypeControlPlanePoolTemplateDeleteParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CustomCloudTypeControlPlanePoolTemplateDeleteParamsWithContext(ctx context.Context) *V1CustomCloudTypeControlPlanePoolTemplateDeleteParams { + var () + return &V1CustomCloudTypeControlPlanePoolTemplateDeleteParams{ + + Context: ctx, + } +} + +// NewV1CustomCloudTypeControlPlanePoolTemplateDeleteParamsWithHTTPClient creates a new V1CustomCloudTypeControlPlanePoolTemplateDeleteParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CustomCloudTypeControlPlanePoolTemplateDeleteParamsWithHTTPClient(client *http.Client) *V1CustomCloudTypeControlPlanePoolTemplateDeleteParams { + var () + return &V1CustomCloudTypeControlPlanePoolTemplateDeleteParams{ + HTTPClient: client, + } +} + +/* +V1CustomCloudTypeControlPlanePoolTemplateDeleteParams contains all the parameters to send to the API endpoint +for the v1 custom cloud type control plane pool template delete operation typically these are written to a http.Request +*/ +type V1CustomCloudTypeControlPlanePoolTemplateDeleteParams struct { + + /*CloudType + Unique cloud type + + */ + CloudType string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 custom cloud type control plane pool template delete params +func (o *V1CustomCloudTypeControlPlanePoolTemplateDeleteParams) WithTimeout(timeout time.Duration) *V1CustomCloudTypeControlPlanePoolTemplateDeleteParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 custom cloud type control plane pool template delete params +func (o *V1CustomCloudTypeControlPlanePoolTemplateDeleteParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 custom cloud type control plane pool template delete params +func (o *V1CustomCloudTypeControlPlanePoolTemplateDeleteParams) WithContext(ctx context.Context) *V1CustomCloudTypeControlPlanePoolTemplateDeleteParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 custom cloud type control plane pool template delete params +func (o *V1CustomCloudTypeControlPlanePoolTemplateDeleteParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 custom cloud type control plane pool template delete params +func (o *V1CustomCloudTypeControlPlanePoolTemplateDeleteParams) WithHTTPClient(client *http.Client) *V1CustomCloudTypeControlPlanePoolTemplateDeleteParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 custom cloud type control plane pool template delete params +func (o *V1CustomCloudTypeControlPlanePoolTemplateDeleteParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithCloudType adds the cloudType to the v1 custom cloud type control plane pool template delete params +func (o *V1CustomCloudTypeControlPlanePoolTemplateDeleteParams) WithCloudType(cloudType string) *V1CustomCloudTypeControlPlanePoolTemplateDeleteParams { + o.SetCloudType(cloudType) + return o +} + +// SetCloudType adds the cloudType to the v1 custom cloud type control plane pool template delete params +func (o *V1CustomCloudTypeControlPlanePoolTemplateDeleteParams) SetCloudType(cloudType string) { + o.CloudType = cloudType +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CustomCloudTypeControlPlanePoolTemplateDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param cloudType + if err := r.SetPathParam("cloudType", o.CloudType); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_custom_cloud_type_control_plane_pool_template_delete_responses.go b/api/client/v1/v1_custom_cloud_type_control_plane_pool_template_delete_responses.go new file mode 100644 index 00000000..8884fffb --- /dev/null +++ b/api/client/v1/v1_custom_cloud_type_control_plane_pool_template_delete_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1CustomCloudTypeControlPlanePoolTemplateDeleteReader is a Reader for the V1CustomCloudTypeControlPlanePoolTemplateDelete structure. +type V1CustomCloudTypeControlPlanePoolTemplateDeleteReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CustomCloudTypeControlPlanePoolTemplateDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1CustomCloudTypeControlPlanePoolTemplateDeleteNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CustomCloudTypeControlPlanePoolTemplateDeleteNoContent creates a V1CustomCloudTypeControlPlanePoolTemplateDeleteNoContent with default headers values +func NewV1CustomCloudTypeControlPlanePoolTemplateDeleteNoContent() *V1CustomCloudTypeControlPlanePoolTemplateDeleteNoContent { + return &V1CustomCloudTypeControlPlanePoolTemplateDeleteNoContent{} +} + +/* +V1CustomCloudTypeControlPlanePoolTemplateDeleteNoContent handles this case with default header values. + +The resource was deleted successfully +*/ +type V1CustomCloudTypeControlPlanePoolTemplateDeleteNoContent struct { +} + +func (o *V1CustomCloudTypeControlPlanePoolTemplateDeleteNoContent) Error() string { + return fmt.Sprintf("[DELETE /v1/clouds/cloudTypes/{cloudType}/content/templates/controlPlanePoolTemplate][%d] v1CustomCloudTypeControlPlanePoolTemplateDeleteNoContent ", 204) +} + +func (o *V1CustomCloudTypeControlPlanePoolTemplateDeleteNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_custom_cloud_type_control_plane_pool_template_get_parameters.go b/api/client/v1/v1_custom_cloud_type_control_plane_pool_template_get_parameters.go new file mode 100644 index 00000000..bc464803 --- /dev/null +++ b/api/client/v1/v1_custom_cloud_type_control_plane_pool_template_get_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1CustomCloudTypeControlPlanePoolTemplateGetParams creates a new V1CustomCloudTypeControlPlanePoolTemplateGetParams object +// with the default values initialized. +func NewV1CustomCloudTypeControlPlanePoolTemplateGetParams() *V1CustomCloudTypeControlPlanePoolTemplateGetParams { + var () + return &V1CustomCloudTypeControlPlanePoolTemplateGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CustomCloudTypeControlPlanePoolTemplateGetParamsWithTimeout creates a new V1CustomCloudTypeControlPlanePoolTemplateGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CustomCloudTypeControlPlanePoolTemplateGetParamsWithTimeout(timeout time.Duration) *V1CustomCloudTypeControlPlanePoolTemplateGetParams { + var () + return &V1CustomCloudTypeControlPlanePoolTemplateGetParams{ + + timeout: timeout, + } +} + +// NewV1CustomCloudTypeControlPlanePoolTemplateGetParamsWithContext creates a new V1CustomCloudTypeControlPlanePoolTemplateGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CustomCloudTypeControlPlanePoolTemplateGetParamsWithContext(ctx context.Context) *V1CustomCloudTypeControlPlanePoolTemplateGetParams { + var () + return &V1CustomCloudTypeControlPlanePoolTemplateGetParams{ + + Context: ctx, + } +} + +// NewV1CustomCloudTypeControlPlanePoolTemplateGetParamsWithHTTPClient creates a new V1CustomCloudTypeControlPlanePoolTemplateGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CustomCloudTypeControlPlanePoolTemplateGetParamsWithHTTPClient(client *http.Client) *V1CustomCloudTypeControlPlanePoolTemplateGetParams { + var () + return &V1CustomCloudTypeControlPlanePoolTemplateGetParams{ + HTTPClient: client, + } +} + +/* +V1CustomCloudTypeControlPlanePoolTemplateGetParams contains all the parameters to send to the API endpoint +for the v1 custom cloud type control plane pool template get operation typically these are written to a http.Request +*/ +type V1CustomCloudTypeControlPlanePoolTemplateGetParams struct { + + /*CloudType + Unique cloud type + + */ + CloudType string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 custom cloud type control plane pool template get params +func (o *V1CustomCloudTypeControlPlanePoolTemplateGetParams) WithTimeout(timeout time.Duration) *V1CustomCloudTypeControlPlanePoolTemplateGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 custom cloud type control plane pool template get params +func (o *V1CustomCloudTypeControlPlanePoolTemplateGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 custom cloud type control plane pool template get params +func (o *V1CustomCloudTypeControlPlanePoolTemplateGetParams) WithContext(ctx context.Context) *V1CustomCloudTypeControlPlanePoolTemplateGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 custom cloud type control plane pool template get params +func (o *V1CustomCloudTypeControlPlanePoolTemplateGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 custom cloud type control plane pool template get params +func (o *V1CustomCloudTypeControlPlanePoolTemplateGetParams) WithHTTPClient(client *http.Client) *V1CustomCloudTypeControlPlanePoolTemplateGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 custom cloud type control plane pool template get params +func (o *V1CustomCloudTypeControlPlanePoolTemplateGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithCloudType adds the cloudType to the v1 custom cloud type control plane pool template get params +func (o *V1CustomCloudTypeControlPlanePoolTemplateGetParams) WithCloudType(cloudType string) *V1CustomCloudTypeControlPlanePoolTemplateGetParams { + o.SetCloudType(cloudType) + return o +} + +// SetCloudType adds the cloudType to the v1 custom cloud type control plane pool template get params +func (o *V1CustomCloudTypeControlPlanePoolTemplateGetParams) SetCloudType(cloudType string) { + o.CloudType = cloudType +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CustomCloudTypeControlPlanePoolTemplateGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param cloudType + if err := r.SetPathParam("cloudType", o.CloudType); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_custom_cloud_type_control_plane_pool_template_get_responses.go b/api/client/v1/v1_custom_cloud_type_control_plane_pool_template_get_responses.go new file mode 100644 index 00000000..53fe2c34 --- /dev/null +++ b/api/client/v1/v1_custom_cloud_type_control_plane_pool_template_get_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1CustomCloudTypeControlPlanePoolTemplateGetReader is a Reader for the V1CustomCloudTypeControlPlanePoolTemplateGet structure. +type V1CustomCloudTypeControlPlanePoolTemplateGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CustomCloudTypeControlPlanePoolTemplateGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1CustomCloudTypeControlPlanePoolTemplateGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CustomCloudTypeControlPlanePoolTemplateGetOK creates a V1CustomCloudTypeControlPlanePoolTemplateGetOK with default headers values +func NewV1CustomCloudTypeControlPlanePoolTemplateGetOK() *V1CustomCloudTypeControlPlanePoolTemplateGetOK { + return &V1CustomCloudTypeControlPlanePoolTemplateGetOK{} +} + +/* +V1CustomCloudTypeControlPlanePoolTemplateGetOK handles this case with default header values. + +(empty) +*/ +type V1CustomCloudTypeControlPlanePoolTemplateGetOK struct { + Payload *models.V1CustomCloudTypeContentResponse +} + +func (o *V1CustomCloudTypeControlPlanePoolTemplateGetOK) Error() string { + return fmt.Sprintf("[GET /v1/clouds/cloudTypes/{cloudType}/content/templates/controlPlanePoolTemplate][%d] v1CustomCloudTypeControlPlanePoolTemplateGetOK %+v", 200, o.Payload) +} + +func (o *V1CustomCloudTypeControlPlanePoolTemplateGetOK) GetPayload() *models.V1CustomCloudTypeContentResponse { + return o.Payload +} + +func (o *V1CustomCloudTypeControlPlanePoolTemplateGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1CustomCloudTypeContentResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_custom_cloud_type_control_plane_pool_template_update_parameters.go b/api/client/v1/v1_custom_cloud_type_control_plane_pool_template_update_parameters.go new file mode 100644 index 00000000..1d46812b --- /dev/null +++ b/api/client/v1/v1_custom_cloud_type_control_plane_pool_template_update_parameters.go @@ -0,0 +1,162 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1CustomCloudTypeControlPlanePoolTemplateUpdateParams creates a new V1CustomCloudTypeControlPlanePoolTemplateUpdateParams object +// with the default values initialized. +func NewV1CustomCloudTypeControlPlanePoolTemplateUpdateParams() *V1CustomCloudTypeControlPlanePoolTemplateUpdateParams { + var () + return &V1CustomCloudTypeControlPlanePoolTemplateUpdateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CustomCloudTypeControlPlanePoolTemplateUpdateParamsWithTimeout creates a new V1CustomCloudTypeControlPlanePoolTemplateUpdateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CustomCloudTypeControlPlanePoolTemplateUpdateParamsWithTimeout(timeout time.Duration) *V1CustomCloudTypeControlPlanePoolTemplateUpdateParams { + var () + return &V1CustomCloudTypeControlPlanePoolTemplateUpdateParams{ + + timeout: timeout, + } +} + +// NewV1CustomCloudTypeControlPlanePoolTemplateUpdateParamsWithContext creates a new V1CustomCloudTypeControlPlanePoolTemplateUpdateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CustomCloudTypeControlPlanePoolTemplateUpdateParamsWithContext(ctx context.Context) *V1CustomCloudTypeControlPlanePoolTemplateUpdateParams { + var () + return &V1CustomCloudTypeControlPlanePoolTemplateUpdateParams{ + + Context: ctx, + } +} + +// NewV1CustomCloudTypeControlPlanePoolTemplateUpdateParamsWithHTTPClient creates a new V1CustomCloudTypeControlPlanePoolTemplateUpdateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CustomCloudTypeControlPlanePoolTemplateUpdateParamsWithHTTPClient(client *http.Client) *V1CustomCloudTypeControlPlanePoolTemplateUpdateParams { + var () + return &V1CustomCloudTypeControlPlanePoolTemplateUpdateParams{ + HTTPClient: client, + } +} + +/* +V1CustomCloudTypeControlPlanePoolTemplateUpdateParams contains all the parameters to send to the API endpoint +for the v1 custom cloud type control plane pool template update operation typically these are written to a http.Request +*/ +type V1CustomCloudTypeControlPlanePoolTemplateUpdateParams struct { + + /*CloudType + Unique cloud type + + */ + CloudType string + /*FileName*/ + FileName runtime.NamedReadCloser + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 custom cloud type control plane pool template update params +func (o *V1CustomCloudTypeControlPlanePoolTemplateUpdateParams) WithTimeout(timeout time.Duration) *V1CustomCloudTypeControlPlanePoolTemplateUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 custom cloud type control plane pool template update params +func (o *V1CustomCloudTypeControlPlanePoolTemplateUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 custom cloud type control plane pool template update params +func (o *V1CustomCloudTypeControlPlanePoolTemplateUpdateParams) WithContext(ctx context.Context) *V1CustomCloudTypeControlPlanePoolTemplateUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 custom cloud type control plane pool template update params +func (o *V1CustomCloudTypeControlPlanePoolTemplateUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 custom cloud type control plane pool template update params +func (o *V1CustomCloudTypeControlPlanePoolTemplateUpdateParams) WithHTTPClient(client *http.Client) *V1CustomCloudTypeControlPlanePoolTemplateUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 custom cloud type control plane pool template update params +func (o *V1CustomCloudTypeControlPlanePoolTemplateUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithCloudType adds the cloudType to the v1 custom cloud type control plane pool template update params +func (o *V1CustomCloudTypeControlPlanePoolTemplateUpdateParams) WithCloudType(cloudType string) *V1CustomCloudTypeControlPlanePoolTemplateUpdateParams { + o.SetCloudType(cloudType) + return o +} + +// SetCloudType adds the cloudType to the v1 custom cloud type control plane pool template update params +func (o *V1CustomCloudTypeControlPlanePoolTemplateUpdateParams) SetCloudType(cloudType string) { + o.CloudType = cloudType +} + +// WithFileName adds the fileName to the v1 custom cloud type control plane pool template update params +func (o *V1CustomCloudTypeControlPlanePoolTemplateUpdateParams) WithFileName(fileName runtime.NamedReadCloser) *V1CustomCloudTypeControlPlanePoolTemplateUpdateParams { + o.SetFileName(fileName) + return o +} + +// SetFileName adds the fileName to the v1 custom cloud type control plane pool template update params +func (o *V1CustomCloudTypeControlPlanePoolTemplateUpdateParams) SetFileName(fileName runtime.NamedReadCloser) { + o.FileName = fileName +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CustomCloudTypeControlPlanePoolTemplateUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param cloudType + if err := r.SetPathParam("cloudType", o.CloudType); err != nil { + return err + } + + if o.FileName != nil { + + if o.FileName != nil { + + // form file param fileName + if err := r.SetFileParam("fileName", o.FileName); err != nil { + return err + } + + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_custom_cloud_type_control_plane_pool_template_update_responses.go b/api/client/v1/v1_custom_cloud_type_control_plane_pool_template_update_responses.go new file mode 100644 index 00000000..85d40781 --- /dev/null +++ b/api/client/v1/v1_custom_cloud_type_control_plane_pool_template_update_responses.go @@ -0,0 +1,61 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1CustomCloudTypeControlPlanePoolTemplateUpdateReader is a Reader for the V1CustomCloudTypeControlPlanePoolTemplateUpdate structure. +type V1CustomCloudTypeControlPlanePoolTemplateUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CustomCloudTypeControlPlanePoolTemplateUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1CustomCloudTypeControlPlanePoolTemplateUpdateNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CustomCloudTypeControlPlanePoolTemplateUpdateNoContent creates a V1CustomCloudTypeControlPlanePoolTemplateUpdateNoContent with default headers values +func NewV1CustomCloudTypeControlPlanePoolTemplateUpdateNoContent() *V1CustomCloudTypeControlPlanePoolTemplateUpdateNoContent { + return &V1CustomCloudTypeControlPlanePoolTemplateUpdateNoContent{} +} + +/* +V1CustomCloudTypeControlPlanePoolTemplateUpdateNoContent handles this case with default header values. + +Ok response without content +*/ +type V1CustomCloudTypeControlPlanePoolTemplateUpdateNoContent struct { + /*Audit uid for the request + */ + AuditUID string +} + +func (o *V1CustomCloudTypeControlPlanePoolTemplateUpdateNoContent) Error() string { + return fmt.Sprintf("[PUT /v1/clouds/cloudTypes/{cloudType}/content/templates/controlPlanePoolTemplate][%d] v1CustomCloudTypeControlPlanePoolTemplateUpdateNoContent ", 204) +} + +func (o *V1CustomCloudTypeControlPlanePoolTemplateUpdateNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header AuditUid + o.AuditUID = response.GetHeader("AuditUid") + + return nil +} diff --git a/api/client/v1/v1_custom_cloud_type_control_plane_update_parameters.go b/api/client/v1/v1_custom_cloud_type_control_plane_update_parameters.go new file mode 100644 index 00000000..e36011fe --- /dev/null +++ b/api/client/v1/v1_custom_cloud_type_control_plane_update_parameters.go @@ -0,0 +1,162 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1CustomCloudTypeControlPlaneUpdateParams creates a new V1CustomCloudTypeControlPlaneUpdateParams object +// with the default values initialized. +func NewV1CustomCloudTypeControlPlaneUpdateParams() *V1CustomCloudTypeControlPlaneUpdateParams { + var () + return &V1CustomCloudTypeControlPlaneUpdateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CustomCloudTypeControlPlaneUpdateParamsWithTimeout creates a new V1CustomCloudTypeControlPlaneUpdateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CustomCloudTypeControlPlaneUpdateParamsWithTimeout(timeout time.Duration) *V1CustomCloudTypeControlPlaneUpdateParams { + var () + return &V1CustomCloudTypeControlPlaneUpdateParams{ + + timeout: timeout, + } +} + +// NewV1CustomCloudTypeControlPlaneUpdateParamsWithContext creates a new V1CustomCloudTypeControlPlaneUpdateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CustomCloudTypeControlPlaneUpdateParamsWithContext(ctx context.Context) *V1CustomCloudTypeControlPlaneUpdateParams { + var () + return &V1CustomCloudTypeControlPlaneUpdateParams{ + + Context: ctx, + } +} + +// NewV1CustomCloudTypeControlPlaneUpdateParamsWithHTTPClient creates a new V1CustomCloudTypeControlPlaneUpdateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CustomCloudTypeControlPlaneUpdateParamsWithHTTPClient(client *http.Client) *V1CustomCloudTypeControlPlaneUpdateParams { + var () + return &V1CustomCloudTypeControlPlaneUpdateParams{ + HTTPClient: client, + } +} + +/* +V1CustomCloudTypeControlPlaneUpdateParams contains all the parameters to send to the API endpoint +for the v1 custom cloud type control plane update operation typically these are written to a http.Request +*/ +type V1CustomCloudTypeControlPlaneUpdateParams struct { + + /*CloudType + Unique cloud type + + */ + CloudType string + /*FileName*/ + FileName runtime.NamedReadCloser + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 custom cloud type control plane update params +func (o *V1CustomCloudTypeControlPlaneUpdateParams) WithTimeout(timeout time.Duration) *V1CustomCloudTypeControlPlaneUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 custom cloud type control plane update params +func (o *V1CustomCloudTypeControlPlaneUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 custom cloud type control plane update params +func (o *V1CustomCloudTypeControlPlaneUpdateParams) WithContext(ctx context.Context) *V1CustomCloudTypeControlPlaneUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 custom cloud type control plane update params +func (o *V1CustomCloudTypeControlPlaneUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 custom cloud type control plane update params +func (o *V1CustomCloudTypeControlPlaneUpdateParams) WithHTTPClient(client *http.Client) *V1CustomCloudTypeControlPlaneUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 custom cloud type control plane update params +func (o *V1CustomCloudTypeControlPlaneUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithCloudType adds the cloudType to the v1 custom cloud type control plane update params +func (o *V1CustomCloudTypeControlPlaneUpdateParams) WithCloudType(cloudType string) *V1CustomCloudTypeControlPlaneUpdateParams { + o.SetCloudType(cloudType) + return o +} + +// SetCloudType adds the cloudType to the v1 custom cloud type control plane update params +func (o *V1CustomCloudTypeControlPlaneUpdateParams) SetCloudType(cloudType string) { + o.CloudType = cloudType +} + +// WithFileName adds the fileName to the v1 custom cloud type control plane update params +func (o *V1CustomCloudTypeControlPlaneUpdateParams) WithFileName(fileName runtime.NamedReadCloser) *V1CustomCloudTypeControlPlaneUpdateParams { + o.SetFileName(fileName) + return o +} + +// SetFileName adds the fileName to the v1 custom cloud type control plane update params +func (o *V1CustomCloudTypeControlPlaneUpdateParams) SetFileName(fileName runtime.NamedReadCloser) { + o.FileName = fileName +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CustomCloudTypeControlPlaneUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param cloudType + if err := r.SetPathParam("cloudType", o.CloudType); err != nil { + return err + } + + if o.FileName != nil { + + if o.FileName != nil { + + // form file param fileName + if err := r.SetFileParam("fileName", o.FileName); err != nil { + return err + } + + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_custom_cloud_type_control_plane_update_responses.go b/api/client/v1/v1_custom_cloud_type_control_plane_update_responses.go new file mode 100644 index 00000000..ce344d52 --- /dev/null +++ b/api/client/v1/v1_custom_cloud_type_control_plane_update_responses.go @@ -0,0 +1,61 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1CustomCloudTypeControlPlaneUpdateReader is a Reader for the V1CustomCloudTypeControlPlaneUpdate structure. +type V1CustomCloudTypeControlPlaneUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CustomCloudTypeControlPlaneUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1CustomCloudTypeControlPlaneUpdateNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CustomCloudTypeControlPlaneUpdateNoContent creates a V1CustomCloudTypeControlPlaneUpdateNoContent with default headers values +func NewV1CustomCloudTypeControlPlaneUpdateNoContent() *V1CustomCloudTypeControlPlaneUpdateNoContent { + return &V1CustomCloudTypeControlPlaneUpdateNoContent{} +} + +/* +V1CustomCloudTypeControlPlaneUpdateNoContent handles this case with default header values. + +Ok response without content +*/ +type V1CustomCloudTypeControlPlaneUpdateNoContent struct { + /*Audit uid for the request + */ + AuditUID string +} + +func (o *V1CustomCloudTypeControlPlaneUpdateNoContent) Error() string { + return fmt.Sprintf("[PUT /v1/clouds/cloudTypes/{cloudType}/content/controlPlane][%d] v1CustomCloudTypeControlPlaneUpdateNoContent ", 204) +} + +func (o *V1CustomCloudTypeControlPlaneUpdateNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header AuditUid + o.AuditUID = response.GetHeader("AuditUid") + + return nil +} diff --git a/api/client/v1/v1_custom_cloud_type_logo_get_parameters.go b/api/client/v1/v1_custom_cloud_type_logo_get_parameters.go new file mode 100644 index 00000000..c466c2f5 --- /dev/null +++ b/api/client/v1/v1_custom_cloud_type_logo_get_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1CustomCloudTypeLogoGetParams creates a new V1CustomCloudTypeLogoGetParams object +// with the default values initialized. +func NewV1CustomCloudTypeLogoGetParams() *V1CustomCloudTypeLogoGetParams { + var () + return &V1CustomCloudTypeLogoGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CustomCloudTypeLogoGetParamsWithTimeout creates a new V1CustomCloudTypeLogoGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CustomCloudTypeLogoGetParamsWithTimeout(timeout time.Duration) *V1CustomCloudTypeLogoGetParams { + var () + return &V1CustomCloudTypeLogoGetParams{ + + timeout: timeout, + } +} + +// NewV1CustomCloudTypeLogoGetParamsWithContext creates a new V1CustomCloudTypeLogoGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CustomCloudTypeLogoGetParamsWithContext(ctx context.Context) *V1CustomCloudTypeLogoGetParams { + var () + return &V1CustomCloudTypeLogoGetParams{ + + Context: ctx, + } +} + +// NewV1CustomCloudTypeLogoGetParamsWithHTTPClient creates a new V1CustomCloudTypeLogoGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CustomCloudTypeLogoGetParamsWithHTTPClient(client *http.Client) *V1CustomCloudTypeLogoGetParams { + var () + return &V1CustomCloudTypeLogoGetParams{ + HTTPClient: client, + } +} + +/* +V1CustomCloudTypeLogoGetParams contains all the parameters to send to the API endpoint +for the v1 custom cloud type logo get operation typically these are written to a http.Request +*/ +type V1CustomCloudTypeLogoGetParams struct { + + /*CloudType + Unique cloud type + + */ + CloudType string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 custom cloud type logo get params +func (o *V1CustomCloudTypeLogoGetParams) WithTimeout(timeout time.Duration) *V1CustomCloudTypeLogoGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 custom cloud type logo get params +func (o *V1CustomCloudTypeLogoGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 custom cloud type logo get params +func (o *V1CustomCloudTypeLogoGetParams) WithContext(ctx context.Context) *V1CustomCloudTypeLogoGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 custom cloud type logo get params +func (o *V1CustomCloudTypeLogoGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 custom cloud type logo get params +func (o *V1CustomCloudTypeLogoGetParams) WithHTTPClient(client *http.Client) *V1CustomCloudTypeLogoGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 custom cloud type logo get params +func (o *V1CustomCloudTypeLogoGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithCloudType adds the cloudType to the v1 custom cloud type logo get params +func (o *V1CustomCloudTypeLogoGetParams) WithCloudType(cloudType string) *V1CustomCloudTypeLogoGetParams { + o.SetCloudType(cloudType) + return o +} + +// SetCloudType adds the cloudType to the v1 custom cloud type logo get params +func (o *V1CustomCloudTypeLogoGetParams) SetCloudType(cloudType string) { + o.CloudType = cloudType +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CustomCloudTypeLogoGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param cloudType + if err := r.SetPathParam("cloudType", o.CloudType); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_custom_cloud_type_logo_get_responses.go b/api/client/v1/v1_custom_cloud_type_logo_get_responses.go new file mode 100644 index 00000000..2ab5af6c --- /dev/null +++ b/api/client/v1/v1_custom_cloud_type_logo_get_responses.go @@ -0,0 +1,74 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1CustomCloudTypeLogoGetReader is a Reader for the V1CustomCloudTypeLogoGet structure. +type V1CustomCloudTypeLogoGetReader struct { + formats strfmt.Registry + writer io.Writer +} + +// ReadResponse reads a server response into the received o. +func (o *V1CustomCloudTypeLogoGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1CustomCloudTypeLogoGetOK(o.writer) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CustomCloudTypeLogoGetOK creates a V1CustomCloudTypeLogoGetOK with default headers values +func NewV1CustomCloudTypeLogoGetOK(writer io.Writer) *V1CustomCloudTypeLogoGetOK { + return &V1CustomCloudTypeLogoGetOK{ + Payload: writer, + } +} + +/* +V1CustomCloudTypeLogoGetOK handles this case with default header values. + +Download the logo +*/ +type V1CustomCloudTypeLogoGetOK struct { + ContentDisposition string + + Payload io.Writer +} + +func (o *V1CustomCloudTypeLogoGetOK) Error() string { + return fmt.Sprintf("[GET /v1/clouds/cloudTypes/{cloudType}/logo][%d] v1CustomCloudTypeLogoGetOK %+v", 200, o.Payload) +} + +func (o *V1CustomCloudTypeLogoGetOK) GetPayload() io.Writer { + return o.Payload +} + +func (o *V1CustomCloudTypeLogoGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Content-Disposition + o.ContentDisposition = response.GetHeader("Content-Disposition") + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_custom_cloud_type_logo_update_parameters.go b/api/client/v1/v1_custom_cloud_type_logo_update_parameters.go new file mode 100644 index 00000000..d2becf3d --- /dev/null +++ b/api/client/v1/v1_custom_cloud_type_logo_update_parameters.go @@ -0,0 +1,162 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1CustomCloudTypeLogoUpdateParams creates a new V1CustomCloudTypeLogoUpdateParams object +// with the default values initialized. +func NewV1CustomCloudTypeLogoUpdateParams() *V1CustomCloudTypeLogoUpdateParams { + var () + return &V1CustomCloudTypeLogoUpdateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CustomCloudTypeLogoUpdateParamsWithTimeout creates a new V1CustomCloudTypeLogoUpdateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CustomCloudTypeLogoUpdateParamsWithTimeout(timeout time.Duration) *V1CustomCloudTypeLogoUpdateParams { + var () + return &V1CustomCloudTypeLogoUpdateParams{ + + timeout: timeout, + } +} + +// NewV1CustomCloudTypeLogoUpdateParamsWithContext creates a new V1CustomCloudTypeLogoUpdateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CustomCloudTypeLogoUpdateParamsWithContext(ctx context.Context) *V1CustomCloudTypeLogoUpdateParams { + var () + return &V1CustomCloudTypeLogoUpdateParams{ + + Context: ctx, + } +} + +// NewV1CustomCloudTypeLogoUpdateParamsWithHTTPClient creates a new V1CustomCloudTypeLogoUpdateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CustomCloudTypeLogoUpdateParamsWithHTTPClient(client *http.Client) *V1CustomCloudTypeLogoUpdateParams { + var () + return &V1CustomCloudTypeLogoUpdateParams{ + HTTPClient: client, + } +} + +/* +V1CustomCloudTypeLogoUpdateParams contains all the parameters to send to the API endpoint +for the v1 custom cloud type logo update operation typically these are written to a http.Request +*/ +type V1CustomCloudTypeLogoUpdateParams struct { + + /*CloudType + Unique cloud type + + */ + CloudType string + /*FileName*/ + FileName runtime.NamedReadCloser + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 custom cloud type logo update params +func (o *V1CustomCloudTypeLogoUpdateParams) WithTimeout(timeout time.Duration) *V1CustomCloudTypeLogoUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 custom cloud type logo update params +func (o *V1CustomCloudTypeLogoUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 custom cloud type logo update params +func (o *V1CustomCloudTypeLogoUpdateParams) WithContext(ctx context.Context) *V1CustomCloudTypeLogoUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 custom cloud type logo update params +func (o *V1CustomCloudTypeLogoUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 custom cloud type logo update params +func (o *V1CustomCloudTypeLogoUpdateParams) WithHTTPClient(client *http.Client) *V1CustomCloudTypeLogoUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 custom cloud type logo update params +func (o *V1CustomCloudTypeLogoUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithCloudType adds the cloudType to the v1 custom cloud type logo update params +func (o *V1CustomCloudTypeLogoUpdateParams) WithCloudType(cloudType string) *V1CustomCloudTypeLogoUpdateParams { + o.SetCloudType(cloudType) + return o +} + +// SetCloudType adds the cloudType to the v1 custom cloud type logo update params +func (o *V1CustomCloudTypeLogoUpdateParams) SetCloudType(cloudType string) { + o.CloudType = cloudType +} + +// WithFileName adds the fileName to the v1 custom cloud type logo update params +func (o *V1CustomCloudTypeLogoUpdateParams) WithFileName(fileName runtime.NamedReadCloser) *V1CustomCloudTypeLogoUpdateParams { + o.SetFileName(fileName) + return o +} + +// SetFileName adds the fileName to the v1 custom cloud type logo update params +func (o *V1CustomCloudTypeLogoUpdateParams) SetFileName(fileName runtime.NamedReadCloser) { + o.FileName = fileName +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CustomCloudTypeLogoUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param cloudType + if err := r.SetPathParam("cloudType", o.CloudType); err != nil { + return err + } + + if o.FileName != nil { + + if o.FileName != nil { + + // form file param fileName + if err := r.SetFileParam("fileName", o.FileName); err != nil { + return err + } + + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_custom_cloud_type_logo_update_responses.go b/api/client/v1/v1_custom_cloud_type_logo_update_responses.go new file mode 100644 index 00000000..b62aa133 --- /dev/null +++ b/api/client/v1/v1_custom_cloud_type_logo_update_responses.go @@ -0,0 +1,61 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1CustomCloudTypeLogoUpdateReader is a Reader for the V1CustomCloudTypeLogoUpdate structure. +type V1CustomCloudTypeLogoUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CustomCloudTypeLogoUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1CustomCloudTypeLogoUpdateNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CustomCloudTypeLogoUpdateNoContent creates a V1CustomCloudTypeLogoUpdateNoContent with default headers values +func NewV1CustomCloudTypeLogoUpdateNoContent() *V1CustomCloudTypeLogoUpdateNoContent { + return &V1CustomCloudTypeLogoUpdateNoContent{} +} + +/* +V1CustomCloudTypeLogoUpdateNoContent handles this case with default header values. + +Ok response without content +*/ +type V1CustomCloudTypeLogoUpdateNoContent struct { + /*Audit uid for the request + */ + AuditUID string +} + +func (o *V1CustomCloudTypeLogoUpdateNoContent) Error() string { + return fmt.Sprintf("[PUT /v1/clouds/cloudTypes/{cloudType}/logo][%d] v1CustomCloudTypeLogoUpdateNoContent ", 204) +} + +func (o *V1CustomCloudTypeLogoUpdateNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header AuditUid + o.AuditUID = response.GetHeader("AuditUid") + + return nil +} diff --git a/api/client/v1/v1_custom_cloud_type_meta_get_parameters.go b/api/client/v1/v1_custom_cloud_type_meta_get_parameters.go new file mode 100644 index 00000000..2cd05f4c --- /dev/null +++ b/api/client/v1/v1_custom_cloud_type_meta_get_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1CustomCloudTypeMetaGetParams creates a new V1CustomCloudTypeMetaGetParams object +// with the default values initialized. +func NewV1CustomCloudTypeMetaGetParams() *V1CustomCloudTypeMetaGetParams { + var () + return &V1CustomCloudTypeMetaGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CustomCloudTypeMetaGetParamsWithTimeout creates a new V1CustomCloudTypeMetaGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CustomCloudTypeMetaGetParamsWithTimeout(timeout time.Duration) *V1CustomCloudTypeMetaGetParams { + var () + return &V1CustomCloudTypeMetaGetParams{ + + timeout: timeout, + } +} + +// NewV1CustomCloudTypeMetaGetParamsWithContext creates a new V1CustomCloudTypeMetaGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CustomCloudTypeMetaGetParamsWithContext(ctx context.Context) *V1CustomCloudTypeMetaGetParams { + var () + return &V1CustomCloudTypeMetaGetParams{ + + Context: ctx, + } +} + +// NewV1CustomCloudTypeMetaGetParamsWithHTTPClient creates a new V1CustomCloudTypeMetaGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CustomCloudTypeMetaGetParamsWithHTTPClient(client *http.Client) *V1CustomCloudTypeMetaGetParams { + var () + return &V1CustomCloudTypeMetaGetParams{ + HTTPClient: client, + } +} + +/* +V1CustomCloudTypeMetaGetParams contains all the parameters to send to the API endpoint +for the v1 custom cloud type meta get operation typically these are written to a http.Request +*/ +type V1CustomCloudTypeMetaGetParams struct { + + /*CloudType + Unique cloud type + + */ + CloudType string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 custom cloud type meta get params +func (o *V1CustomCloudTypeMetaGetParams) WithTimeout(timeout time.Duration) *V1CustomCloudTypeMetaGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 custom cloud type meta get params +func (o *V1CustomCloudTypeMetaGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 custom cloud type meta get params +func (o *V1CustomCloudTypeMetaGetParams) WithContext(ctx context.Context) *V1CustomCloudTypeMetaGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 custom cloud type meta get params +func (o *V1CustomCloudTypeMetaGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 custom cloud type meta get params +func (o *V1CustomCloudTypeMetaGetParams) WithHTTPClient(client *http.Client) *V1CustomCloudTypeMetaGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 custom cloud type meta get params +func (o *V1CustomCloudTypeMetaGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithCloudType adds the cloudType to the v1 custom cloud type meta get params +func (o *V1CustomCloudTypeMetaGetParams) WithCloudType(cloudType string) *V1CustomCloudTypeMetaGetParams { + o.SetCloudType(cloudType) + return o +} + +// SetCloudType adds the cloudType to the v1 custom cloud type meta get params +func (o *V1CustomCloudTypeMetaGetParams) SetCloudType(cloudType string) { + o.CloudType = cloudType +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CustomCloudTypeMetaGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param cloudType + if err := r.SetPathParam("cloudType", o.CloudType); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_custom_cloud_type_meta_get_responses.go b/api/client/v1/v1_custom_cloud_type_meta_get_responses.go new file mode 100644 index 00000000..45b02e9c --- /dev/null +++ b/api/client/v1/v1_custom_cloud_type_meta_get_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1CustomCloudTypeMetaGetReader is a Reader for the V1CustomCloudTypeMetaGet structure. +type V1CustomCloudTypeMetaGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CustomCloudTypeMetaGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1CustomCloudTypeMetaGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CustomCloudTypeMetaGetOK creates a V1CustomCloudTypeMetaGetOK with default headers values +func NewV1CustomCloudTypeMetaGetOK() *V1CustomCloudTypeMetaGetOK { + return &V1CustomCloudTypeMetaGetOK{} +} + +/* +V1CustomCloudTypeMetaGetOK handles this case with default header values. + +(empty) +*/ +type V1CustomCloudTypeMetaGetOK struct { + Payload *models.V1CustomCloudMetaEntity +} + +func (o *V1CustomCloudTypeMetaGetOK) Error() string { + return fmt.Sprintf("[GET /v1/clouds/cloudTypes/{cloudType}/meta][%d] v1CustomCloudTypeMetaGetOK %+v", 200, o.Payload) +} + +func (o *V1CustomCloudTypeMetaGetOK) GetPayload() *models.V1CustomCloudMetaEntity { + return o.Payload +} + +func (o *V1CustomCloudTypeMetaGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1CustomCloudMetaEntity) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_custom_cloud_type_meta_update_parameters.go b/api/client/v1/v1_custom_cloud_type_meta_update_parameters.go new file mode 100644 index 00000000..b5429c97 --- /dev/null +++ b/api/client/v1/v1_custom_cloud_type_meta_update_parameters.go @@ -0,0 +1,160 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1CustomCloudTypeMetaUpdateParams creates a new V1CustomCloudTypeMetaUpdateParams object +// with the default values initialized. +func NewV1CustomCloudTypeMetaUpdateParams() *V1CustomCloudTypeMetaUpdateParams { + var () + return &V1CustomCloudTypeMetaUpdateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CustomCloudTypeMetaUpdateParamsWithTimeout creates a new V1CustomCloudTypeMetaUpdateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CustomCloudTypeMetaUpdateParamsWithTimeout(timeout time.Duration) *V1CustomCloudTypeMetaUpdateParams { + var () + return &V1CustomCloudTypeMetaUpdateParams{ + + timeout: timeout, + } +} + +// NewV1CustomCloudTypeMetaUpdateParamsWithContext creates a new V1CustomCloudTypeMetaUpdateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CustomCloudTypeMetaUpdateParamsWithContext(ctx context.Context) *V1CustomCloudTypeMetaUpdateParams { + var () + return &V1CustomCloudTypeMetaUpdateParams{ + + Context: ctx, + } +} + +// NewV1CustomCloudTypeMetaUpdateParamsWithHTTPClient creates a new V1CustomCloudTypeMetaUpdateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CustomCloudTypeMetaUpdateParamsWithHTTPClient(client *http.Client) *V1CustomCloudTypeMetaUpdateParams { + var () + return &V1CustomCloudTypeMetaUpdateParams{ + HTTPClient: client, + } +} + +/* +V1CustomCloudTypeMetaUpdateParams contains all the parameters to send to the API endpoint +for the v1 custom cloud type meta update operation typically these are written to a http.Request +*/ +type V1CustomCloudTypeMetaUpdateParams struct { + + /*Body + Request payload for custom cloud meta entity + + */ + Body *models.V1CustomCloudRequestEntity + /*CloudType + Unique cloud type + + */ + CloudType string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 custom cloud type meta update params +func (o *V1CustomCloudTypeMetaUpdateParams) WithTimeout(timeout time.Duration) *V1CustomCloudTypeMetaUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 custom cloud type meta update params +func (o *V1CustomCloudTypeMetaUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 custom cloud type meta update params +func (o *V1CustomCloudTypeMetaUpdateParams) WithContext(ctx context.Context) *V1CustomCloudTypeMetaUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 custom cloud type meta update params +func (o *V1CustomCloudTypeMetaUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 custom cloud type meta update params +func (o *V1CustomCloudTypeMetaUpdateParams) WithHTTPClient(client *http.Client) *V1CustomCloudTypeMetaUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 custom cloud type meta update params +func (o *V1CustomCloudTypeMetaUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 custom cloud type meta update params +func (o *V1CustomCloudTypeMetaUpdateParams) WithBody(body *models.V1CustomCloudRequestEntity) *V1CustomCloudTypeMetaUpdateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 custom cloud type meta update params +func (o *V1CustomCloudTypeMetaUpdateParams) SetBody(body *models.V1CustomCloudRequestEntity) { + o.Body = body +} + +// WithCloudType adds the cloudType to the v1 custom cloud type meta update params +func (o *V1CustomCloudTypeMetaUpdateParams) WithCloudType(cloudType string) *V1CustomCloudTypeMetaUpdateParams { + o.SetCloudType(cloudType) + return o +} + +// SetCloudType adds the cloudType to the v1 custom cloud type meta update params +func (o *V1CustomCloudTypeMetaUpdateParams) SetCloudType(cloudType string) { + o.CloudType = cloudType +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CustomCloudTypeMetaUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param cloudType + if err := r.SetPathParam("cloudType", o.CloudType); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_custom_cloud_type_meta_update_responses.go b/api/client/v1/v1_custom_cloud_type_meta_update_responses.go new file mode 100644 index 00000000..e77681e6 --- /dev/null +++ b/api/client/v1/v1_custom_cloud_type_meta_update_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1CustomCloudTypeMetaUpdateReader is a Reader for the V1CustomCloudTypeMetaUpdate structure. +type V1CustomCloudTypeMetaUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CustomCloudTypeMetaUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1CustomCloudTypeMetaUpdateNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CustomCloudTypeMetaUpdateNoContent creates a V1CustomCloudTypeMetaUpdateNoContent with default headers values +func NewV1CustomCloudTypeMetaUpdateNoContent() *V1CustomCloudTypeMetaUpdateNoContent { + return &V1CustomCloudTypeMetaUpdateNoContent{} +} + +/* +V1CustomCloudTypeMetaUpdateNoContent handles this case with default header values. + +The resource was updated successfully +*/ +type V1CustomCloudTypeMetaUpdateNoContent struct { +} + +func (o *V1CustomCloudTypeMetaUpdateNoContent) Error() string { + return fmt.Sprintf("[PUT /v1/clouds/cloudTypes/{cloudType}/meta][%d] v1CustomCloudTypeMetaUpdateNoContent ", 204) +} + +func (o *V1CustomCloudTypeMetaUpdateNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_custom_cloud_type_register_parameters.go b/api/client/v1/v1_custom_cloud_type_register_parameters.go new file mode 100644 index 00000000..8d6b01f2 --- /dev/null +++ b/api/client/v1/v1_custom_cloud_type_register_parameters.go @@ -0,0 +1,139 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1CustomCloudTypeRegisterParams creates a new V1CustomCloudTypeRegisterParams object +// with the default values initialized. +func NewV1CustomCloudTypeRegisterParams() *V1CustomCloudTypeRegisterParams { + var () + return &V1CustomCloudTypeRegisterParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CustomCloudTypeRegisterParamsWithTimeout creates a new V1CustomCloudTypeRegisterParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CustomCloudTypeRegisterParamsWithTimeout(timeout time.Duration) *V1CustomCloudTypeRegisterParams { + var () + return &V1CustomCloudTypeRegisterParams{ + + timeout: timeout, + } +} + +// NewV1CustomCloudTypeRegisterParamsWithContext creates a new V1CustomCloudTypeRegisterParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CustomCloudTypeRegisterParamsWithContext(ctx context.Context) *V1CustomCloudTypeRegisterParams { + var () + return &V1CustomCloudTypeRegisterParams{ + + Context: ctx, + } +} + +// NewV1CustomCloudTypeRegisterParamsWithHTTPClient creates a new V1CustomCloudTypeRegisterParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CustomCloudTypeRegisterParamsWithHTTPClient(client *http.Client) *V1CustomCloudTypeRegisterParams { + var () + return &V1CustomCloudTypeRegisterParams{ + HTTPClient: client, + } +} + +/* +V1CustomCloudTypeRegisterParams contains all the parameters to send to the API endpoint +for the v1 custom cloud type register operation typically these are written to a http.Request +*/ +type V1CustomCloudTypeRegisterParams struct { + + /*Body + Request payload to register custom cloud type + + */ + Body *models.V1CustomCloudRequestEntity + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 custom cloud type register params +func (o *V1CustomCloudTypeRegisterParams) WithTimeout(timeout time.Duration) *V1CustomCloudTypeRegisterParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 custom cloud type register params +func (o *V1CustomCloudTypeRegisterParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 custom cloud type register params +func (o *V1CustomCloudTypeRegisterParams) WithContext(ctx context.Context) *V1CustomCloudTypeRegisterParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 custom cloud type register params +func (o *V1CustomCloudTypeRegisterParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 custom cloud type register params +func (o *V1CustomCloudTypeRegisterParams) WithHTTPClient(client *http.Client) *V1CustomCloudTypeRegisterParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 custom cloud type register params +func (o *V1CustomCloudTypeRegisterParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 custom cloud type register params +func (o *V1CustomCloudTypeRegisterParams) WithBody(body *models.V1CustomCloudRequestEntity) *V1CustomCloudTypeRegisterParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 custom cloud type register params +func (o *V1CustomCloudTypeRegisterParams) SetBody(body *models.V1CustomCloudRequestEntity) { + o.Body = body +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CustomCloudTypeRegisterParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_custom_cloud_type_register_responses.go b/api/client/v1/v1_custom_cloud_type_register_responses.go new file mode 100644 index 00000000..902ea64e --- /dev/null +++ b/api/client/v1/v1_custom_cloud_type_register_responses.go @@ -0,0 +1,77 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1CustomCloudTypeRegisterReader is a Reader for the V1CustomCloudTypeRegister structure. +type V1CustomCloudTypeRegisterReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CustomCloudTypeRegisterReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 201: + result := NewV1CustomCloudTypeRegisterCreated() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CustomCloudTypeRegisterCreated creates a V1CustomCloudTypeRegisterCreated with default headers values +func NewV1CustomCloudTypeRegisterCreated() *V1CustomCloudTypeRegisterCreated { + return &V1CustomCloudTypeRegisterCreated{} +} + +/* +V1CustomCloudTypeRegisterCreated handles this case with default header values. + +Created successfully +*/ +type V1CustomCloudTypeRegisterCreated struct { + /*Audit uid for the request + */ + AuditUID string + + Payload *models.V1UID +} + +func (o *V1CustomCloudTypeRegisterCreated) Error() string { + return fmt.Sprintf("[POST /v1/clouds/cloudTypes/register][%d] v1CustomCloudTypeRegisterCreated %+v", 201, o.Payload) +} + +func (o *V1CustomCloudTypeRegisterCreated) GetPayload() *models.V1UID { + return o.Payload +} + +func (o *V1CustomCloudTypeRegisterCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header AuditUid + o.AuditUID = response.GetHeader("AuditUid") + + o.Payload = new(models.V1UID) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_custom_cloud_type_worker_pool_template_delete_parameters.go b/api/client/v1/v1_custom_cloud_type_worker_pool_template_delete_parameters.go new file mode 100644 index 00000000..507b9723 --- /dev/null +++ b/api/client/v1/v1_custom_cloud_type_worker_pool_template_delete_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1CustomCloudTypeWorkerPoolTemplateDeleteParams creates a new V1CustomCloudTypeWorkerPoolTemplateDeleteParams object +// with the default values initialized. +func NewV1CustomCloudTypeWorkerPoolTemplateDeleteParams() *V1CustomCloudTypeWorkerPoolTemplateDeleteParams { + var () + return &V1CustomCloudTypeWorkerPoolTemplateDeleteParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CustomCloudTypeWorkerPoolTemplateDeleteParamsWithTimeout creates a new V1CustomCloudTypeWorkerPoolTemplateDeleteParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CustomCloudTypeWorkerPoolTemplateDeleteParamsWithTimeout(timeout time.Duration) *V1CustomCloudTypeWorkerPoolTemplateDeleteParams { + var () + return &V1CustomCloudTypeWorkerPoolTemplateDeleteParams{ + + timeout: timeout, + } +} + +// NewV1CustomCloudTypeWorkerPoolTemplateDeleteParamsWithContext creates a new V1CustomCloudTypeWorkerPoolTemplateDeleteParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CustomCloudTypeWorkerPoolTemplateDeleteParamsWithContext(ctx context.Context) *V1CustomCloudTypeWorkerPoolTemplateDeleteParams { + var () + return &V1CustomCloudTypeWorkerPoolTemplateDeleteParams{ + + Context: ctx, + } +} + +// NewV1CustomCloudTypeWorkerPoolTemplateDeleteParamsWithHTTPClient creates a new V1CustomCloudTypeWorkerPoolTemplateDeleteParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CustomCloudTypeWorkerPoolTemplateDeleteParamsWithHTTPClient(client *http.Client) *V1CustomCloudTypeWorkerPoolTemplateDeleteParams { + var () + return &V1CustomCloudTypeWorkerPoolTemplateDeleteParams{ + HTTPClient: client, + } +} + +/* +V1CustomCloudTypeWorkerPoolTemplateDeleteParams contains all the parameters to send to the API endpoint +for the v1 custom cloud type worker pool template delete operation typically these are written to a http.Request +*/ +type V1CustomCloudTypeWorkerPoolTemplateDeleteParams struct { + + /*CloudType + Unique cloud type + + */ + CloudType string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 custom cloud type worker pool template delete params +func (o *V1CustomCloudTypeWorkerPoolTemplateDeleteParams) WithTimeout(timeout time.Duration) *V1CustomCloudTypeWorkerPoolTemplateDeleteParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 custom cloud type worker pool template delete params +func (o *V1CustomCloudTypeWorkerPoolTemplateDeleteParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 custom cloud type worker pool template delete params +func (o *V1CustomCloudTypeWorkerPoolTemplateDeleteParams) WithContext(ctx context.Context) *V1CustomCloudTypeWorkerPoolTemplateDeleteParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 custom cloud type worker pool template delete params +func (o *V1CustomCloudTypeWorkerPoolTemplateDeleteParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 custom cloud type worker pool template delete params +func (o *V1CustomCloudTypeWorkerPoolTemplateDeleteParams) WithHTTPClient(client *http.Client) *V1CustomCloudTypeWorkerPoolTemplateDeleteParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 custom cloud type worker pool template delete params +func (o *V1CustomCloudTypeWorkerPoolTemplateDeleteParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithCloudType adds the cloudType to the v1 custom cloud type worker pool template delete params +func (o *V1CustomCloudTypeWorkerPoolTemplateDeleteParams) WithCloudType(cloudType string) *V1CustomCloudTypeWorkerPoolTemplateDeleteParams { + o.SetCloudType(cloudType) + return o +} + +// SetCloudType adds the cloudType to the v1 custom cloud type worker pool template delete params +func (o *V1CustomCloudTypeWorkerPoolTemplateDeleteParams) SetCloudType(cloudType string) { + o.CloudType = cloudType +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CustomCloudTypeWorkerPoolTemplateDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param cloudType + if err := r.SetPathParam("cloudType", o.CloudType); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_custom_cloud_type_worker_pool_template_delete_responses.go b/api/client/v1/v1_custom_cloud_type_worker_pool_template_delete_responses.go new file mode 100644 index 00000000..75ca560b --- /dev/null +++ b/api/client/v1/v1_custom_cloud_type_worker_pool_template_delete_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1CustomCloudTypeWorkerPoolTemplateDeleteReader is a Reader for the V1CustomCloudTypeWorkerPoolTemplateDelete structure. +type V1CustomCloudTypeWorkerPoolTemplateDeleteReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CustomCloudTypeWorkerPoolTemplateDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1CustomCloudTypeWorkerPoolTemplateDeleteNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CustomCloudTypeWorkerPoolTemplateDeleteNoContent creates a V1CustomCloudTypeWorkerPoolTemplateDeleteNoContent with default headers values +func NewV1CustomCloudTypeWorkerPoolTemplateDeleteNoContent() *V1CustomCloudTypeWorkerPoolTemplateDeleteNoContent { + return &V1CustomCloudTypeWorkerPoolTemplateDeleteNoContent{} +} + +/* +V1CustomCloudTypeWorkerPoolTemplateDeleteNoContent handles this case with default header values. + +The resource was deleted successfully +*/ +type V1CustomCloudTypeWorkerPoolTemplateDeleteNoContent struct { +} + +func (o *V1CustomCloudTypeWorkerPoolTemplateDeleteNoContent) Error() string { + return fmt.Sprintf("[DELETE /v1/clouds/cloudTypes/{cloudType}/content/templates/workerPoolTemplate][%d] v1CustomCloudTypeWorkerPoolTemplateDeleteNoContent ", 204) +} + +func (o *V1CustomCloudTypeWorkerPoolTemplateDeleteNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_custom_cloud_type_worker_pool_template_get_parameters.go b/api/client/v1/v1_custom_cloud_type_worker_pool_template_get_parameters.go new file mode 100644 index 00000000..bb180c1a --- /dev/null +++ b/api/client/v1/v1_custom_cloud_type_worker_pool_template_get_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1CustomCloudTypeWorkerPoolTemplateGetParams creates a new V1CustomCloudTypeWorkerPoolTemplateGetParams object +// with the default values initialized. +func NewV1CustomCloudTypeWorkerPoolTemplateGetParams() *V1CustomCloudTypeWorkerPoolTemplateGetParams { + var () + return &V1CustomCloudTypeWorkerPoolTemplateGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CustomCloudTypeWorkerPoolTemplateGetParamsWithTimeout creates a new V1CustomCloudTypeWorkerPoolTemplateGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CustomCloudTypeWorkerPoolTemplateGetParamsWithTimeout(timeout time.Duration) *V1CustomCloudTypeWorkerPoolTemplateGetParams { + var () + return &V1CustomCloudTypeWorkerPoolTemplateGetParams{ + + timeout: timeout, + } +} + +// NewV1CustomCloudTypeWorkerPoolTemplateGetParamsWithContext creates a new V1CustomCloudTypeWorkerPoolTemplateGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CustomCloudTypeWorkerPoolTemplateGetParamsWithContext(ctx context.Context) *V1CustomCloudTypeWorkerPoolTemplateGetParams { + var () + return &V1CustomCloudTypeWorkerPoolTemplateGetParams{ + + Context: ctx, + } +} + +// NewV1CustomCloudTypeWorkerPoolTemplateGetParamsWithHTTPClient creates a new V1CustomCloudTypeWorkerPoolTemplateGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CustomCloudTypeWorkerPoolTemplateGetParamsWithHTTPClient(client *http.Client) *V1CustomCloudTypeWorkerPoolTemplateGetParams { + var () + return &V1CustomCloudTypeWorkerPoolTemplateGetParams{ + HTTPClient: client, + } +} + +/* +V1CustomCloudTypeWorkerPoolTemplateGetParams contains all the parameters to send to the API endpoint +for the v1 custom cloud type worker pool template get operation typically these are written to a http.Request +*/ +type V1CustomCloudTypeWorkerPoolTemplateGetParams struct { + + /*CloudType + Unique cloud type + + */ + CloudType string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 custom cloud type worker pool template get params +func (o *V1CustomCloudTypeWorkerPoolTemplateGetParams) WithTimeout(timeout time.Duration) *V1CustomCloudTypeWorkerPoolTemplateGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 custom cloud type worker pool template get params +func (o *V1CustomCloudTypeWorkerPoolTemplateGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 custom cloud type worker pool template get params +func (o *V1CustomCloudTypeWorkerPoolTemplateGetParams) WithContext(ctx context.Context) *V1CustomCloudTypeWorkerPoolTemplateGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 custom cloud type worker pool template get params +func (o *V1CustomCloudTypeWorkerPoolTemplateGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 custom cloud type worker pool template get params +func (o *V1CustomCloudTypeWorkerPoolTemplateGetParams) WithHTTPClient(client *http.Client) *V1CustomCloudTypeWorkerPoolTemplateGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 custom cloud type worker pool template get params +func (o *V1CustomCloudTypeWorkerPoolTemplateGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithCloudType adds the cloudType to the v1 custom cloud type worker pool template get params +func (o *V1CustomCloudTypeWorkerPoolTemplateGetParams) WithCloudType(cloudType string) *V1CustomCloudTypeWorkerPoolTemplateGetParams { + o.SetCloudType(cloudType) + return o +} + +// SetCloudType adds the cloudType to the v1 custom cloud type worker pool template get params +func (o *V1CustomCloudTypeWorkerPoolTemplateGetParams) SetCloudType(cloudType string) { + o.CloudType = cloudType +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CustomCloudTypeWorkerPoolTemplateGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param cloudType + if err := r.SetPathParam("cloudType", o.CloudType); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_custom_cloud_type_worker_pool_template_get_responses.go b/api/client/v1/v1_custom_cloud_type_worker_pool_template_get_responses.go new file mode 100644 index 00000000..5c9c3c14 --- /dev/null +++ b/api/client/v1/v1_custom_cloud_type_worker_pool_template_get_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1CustomCloudTypeWorkerPoolTemplateGetReader is a Reader for the V1CustomCloudTypeWorkerPoolTemplateGet structure. +type V1CustomCloudTypeWorkerPoolTemplateGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CustomCloudTypeWorkerPoolTemplateGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1CustomCloudTypeWorkerPoolTemplateGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CustomCloudTypeWorkerPoolTemplateGetOK creates a V1CustomCloudTypeWorkerPoolTemplateGetOK with default headers values +func NewV1CustomCloudTypeWorkerPoolTemplateGetOK() *V1CustomCloudTypeWorkerPoolTemplateGetOK { + return &V1CustomCloudTypeWorkerPoolTemplateGetOK{} +} + +/* +V1CustomCloudTypeWorkerPoolTemplateGetOK handles this case with default header values. + +(empty) +*/ +type V1CustomCloudTypeWorkerPoolTemplateGetOK struct { + Payload *models.V1CustomCloudTypeContentResponse +} + +func (o *V1CustomCloudTypeWorkerPoolTemplateGetOK) Error() string { + return fmt.Sprintf("[GET /v1/clouds/cloudTypes/{cloudType}/content/templates/workerPoolTemplate][%d] v1CustomCloudTypeWorkerPoolTemplateGetOK %+v", 200, o.Payload) +} + +func (o *V1CustomCloudTypeWorkerPoolTemplateGetOK) GetPayload() *models.V1CustomCloudTypeContentResponse { + return o.Payload +} + +func (o *V1CustomCloudTypeWorkerPoolTemplateGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1CustomCloudTypeContentResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_custom_cloud_type_worker_pool_template_update_parameters.go b/api/client/v1/v1_custom_cloud_type_worker_pool_template_update_parameters.go new file mode 100644 index 00000000..8c60e6ce --- /dev/null +++ b/api/client/v1/v1_custom_cloud_type_worker_pool_template_update_parameters.go @@ -0,0 +1,162 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1CustomCloudTypeWorkerPoolTemplateUpdateParams creates a new V1CustomCloudTypeWorkerPoolTemplateUpdateParams object +// with the default values initialized. +func NewV1CustomCloudTypeWorkerPoolTemplateUpdateParams() *V1CustomCloudTypeWorkerPoolTemplateUpdateParams { + var () + return &V1CustomCloudTypeWorkerPoolTemplateUpdateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CustomCloudTypeWorkerPoolTemplateUpdateParamsWithTimeout creates a new V1CustomCloudTypeWorkerPoolTemplateUpdateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CustomCloudTypeWorkerPoolTemplateUpdateParamsWithTimeout(timeout time.Duration) *V1CustomCloudTypeWorkerPoolTemplateUpdateParams { + var () + return &V1CustomCloudTypeWorkerPoolTemplateUpdateParams{ + + timeout: timeout, + } +} + +// NewV1CustomCloudTypeWorkerPoolTemplateUpdateParamsWithContext creates a new V1CustomCloudTypeWorkerPoolTemplateUpdateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CustomCloudTypeWorkerPoolTemplateUpdateParamsWithContext(ctx context.Context) *V1CustomCloudTypeWorkerPoolTemplateUpdateParams { + var () + return &V1CustomCloudTypeWorkerPoolTemplateUpdateParams{ + + Context: ctx, + } +} + +// NewV1CustomCloudTypeWorkerPoolTemplateUpdateParamsWithHTTPClient creates a new V1CustomCloudTypeWorkerPoolTemplateUpdateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CustomCloudTypeWorkerPoolTemplateUpdateParamsWithHTTPClient(client *http.Client) *V1CustomCloudTypeWorkerPoolTemplateUpdateParams { + var () + return &V1CustomCloudTypeWorkerPoolTemplateUpdateParams{ + HTTPClient: client, + } +} + +/* +V1CustomCloudTypeWorkerPoolTemplateUpdateParams contains all the parameters to send to the API endpoint +for the v1 custom cloud type worker pool template update operation typically these are written to a http.Request +*/ +type V1CustomCloudTypeWorkerPoolTemplateUpdateParams struct { + + /*CloudType + Unique cloud type + + */ + CloudType string + /*FileName*/ + FileName runtime.NamedReadCloser + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 custom cloud type worker pool template update params +func (o *V1CustomCloudTypeWorkerPoolTemplateUpdateParams) WithTimeout(timeout time.Duration) *V1CustomCloudTypeWorkerPoolTemplateUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 custom cloud type worker pool template update params +func (o *V1CustomCloudTypeWorkerPoolTemplateUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 custom cloud type worker pool template update params +func (o *V1CustomCloudTypeWorkerPoolTemplateUpdateParams) WithContext(ctx context.Context) *V1CustomCloudTypeWorkerPoolTemplateUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 custom cloud type worker pool template update params +func (o *V1CustomCloudTypeWorkerPoolTemplateUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 custom cloud type worker pool template update params +func (o *V1CustomCloudTypeWorkerPoolTemplateUpdateParams) WithHTTPClient(client *http.Client) *V1CustomCloudTypeWorkerPoolTemplateUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 custom cloud type worker pool template update params +func (o *V1CustomCloudTypeWorkerPoolTemplateUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithCloudType adds the cloudType to the v1 custom cloud type worker pool template update params +func (o *V1CustomCloudTypeWorkerPoolTemplateUpdateParams) WithCloudType(cloudType string) *V1CustomCloudTypeWorkerPoolTemplateUpdateParams { + o.SetCloudType(cloudType) + return o +} + +// SetCloudType adds the cloudType to the v1 custom cloud type worker pool template update params +func (o *V1CustomCloudTypeWorkerPoolTemplateUpdateParams) SetCloudType(cloudType string) { + o.CloudType = cloudType +} + +// WithFileName adds the fileName to the v1 custom cloud type worker pool template update params +func (o *V1CustomCloudTypeWorkerPoolTemplateUpdateParams) WithFileName(fileName runtime.NamedReadCloser) *V1CustomCloudTypeWorkerPoolTemplateUpdateParams { + o.SetFileName(fileName) + return o +} + +// SetFileName adds the fileName to the v1 custom cloud type worker pool template update params +func (o *V1CustomCloudTypeWorkerPoolTemplateUpdateParams) SetFileName(fileName runtime.NamedReadCloser) { + o.FileName = fileName +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CustomCloudTypeWorkerPoolTemplateUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param cloudType + if err := r.SetPathParam("cloudType", o.CloudType); err != nil { + return err + } + + if o.FileName != nil { + + if o.FileName != nil { + + // form file param fileName + if err := r.SetFileParam("fileName", o.FileName); err != nil { + return err + } + + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_custom_cloud_type_worker_pool_template_update_responses.go b/api/client/v1/v1_custom_cloud_type_worker_pool_template_update_responses.go new file mode 100644 index 00000000..46eb749c --- /dev/null +++ b/api/client/v1/v1_custom_cloud_type_worker_pool_template_update_responses.go @@ -0,0 +1,61 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1CustomCloudTypeWorkerPoolTemplateUpdateReader is a Reader for the V1CustomCloudTypeWorkerPoolTemplateUpdate structure. +type V1CustomCloudTypeWorkerPoolTemplateUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CustomCloudTypeWorkerPoolTemplateUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1CustomCloudTypeWorkerPoolTemplateUpdateNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CustomCloudTypeWorkerPoolTemplateUpdateNoContent creates a V1CustomCloudTypeWorkerPoolTemplateUpdateNoContent with default headers values +func NewV1CustomCloudTypeWorkerPoolTemplateUpdateNoContent() *V1CustomCloudTypeWorkerPoolTemplateUpdateNoContent { + return &V1CustomCloudTypeWorkerPoolTemplateUpdateNoContent{} +} + +/* +V1CustomCloudTypeWorkerPoolTemplateUpdateNoContent handles this case with default header values. + +Ok response without content +*/ +type V1CustomCloudTypeWorkerPoolTemplateUpdateNoContent struct { + /*Audit uid for the request + */ + AuditUID string +} + +func (o *V1CustomCloudTypeWorkerPoolTemplateUpdateNoContent) Error() string { + return fmt.Sprintf("[PUT /v1/clouds/cloudTypes/{cloudType}/content/templates/workerPoolTemplate][%d] v1CustomCloudTypeWorkerPoolTemplateUpdateNoContent ", 204) +} + +func (o *V1CustomCloudTypeWorkerPoolTemplateUpdateNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header AuditUid + o.AuditUID = response.GetHeader("AuditUid") + + return nil +} diff --git a/api/client/v1/v1_custom_cloud_types_delete_parameters.go b/api/client/v1/v1_custom_cloud_types_delete_parameters.go new file mode 100644 index 00000000..01552b3f --- /dev/null +++ b/api/client/v1/v1_custom_cloud_types_delete_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1CustomCloudTypesDeleteParams creates a new V1CustomCloudTypesDeleteParams object +// with the default values initialized. +func NewV1CustomCloudTypesDeleteParams() *V1CustomCloudTypesDeleteParams { + var () + return &V1CustomCloudTypesDeleteParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CustomCloudTypesDeleteParamsWithTimeout creates a new V1CustomCloudTypesDeleteParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CustomCloudTypesDeleteParamsWithTimeout(timeout time.Duration) *V1CustomCloudTypesDeleteParams { + var () + return &V1CustomCloudTypesDeleteParams{ + + timeout: timeout, + } +} + +// NewV1CustomCloudTypesDeleteParamsWithContext creates a new V1CustomCloudTypesDeleteParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CustomCloudTypesDeleteParamsWithContext(ctx context.Context) *V1CustomCloudTypesDeleteParams { + var () + return &V1CustomCloudTypesDeleteParams{ + + Context: ctx, + } +} + +// NewV1CustomCloudTypesDeleteParamsWithHTTPClient creates a new V1CustomCloudTypesDeleteParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CustomCloudTypesDeleteParamsWithHTTPClient(client *http.Client) *V1CustomCloudTypesDeleteParams { + var () + return &V1CustomCloudTypesDeleteParams{ + HTTPClient: client, + } +} + +/* +V1CustomCloudTypesDeleteParams contains all the parameters to send to the API endpoint +for the v1 custom cloud types delete operation typically these are written to a http.Request +*/ +type V1CustomCloudTypesDeleteParams struct { + + /*CloudType + Unique cloud type + + */ + CloudType string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 custom cloud types delete params +func (o *V1CustomCloudTypesDeleteParams) WithTimeout(timeout time.Duration) *V1CustomCloudTypesDeleteParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 custom cloud types delete params +func (o *V1CustomCloudTypesDeleteParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 custom cloud types delete params +func (o *V1CustomCloudTypesDeleteParams) WithContext(ctx context.Context) *V1CustomCloudTypesDeleteParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 custom cloud types delete params +func (o *V1CustomCloudTypesDeleteParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 custom cloud types delete params +func (o *V1CustomCloudTypesDeleteParams) WithHTTPClient(client *http.Client) *V1CustomCloudTypesDeleteParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 custom cloud types delete params +func (o *V1CustomCloudTypesDeleteParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithCloudType adds the cloudType to the v1 custom cloud types delete params +func (o *V1CustomCloudTypesDeleteParams) WithCloudType(cloudType string) *V1CustomCloudTypesDeleteParams { + o.SetCloudType(cloudType) + return o +} + +// SetCloudType adds the cloudType to the v1 custom cloud types delete params +func (o *V1CustomCloudTypesDeleteParams) SetCloudType(cloudType string) { + o.CloudType = cloudType +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CustomCloudTypesDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param cloudType + if err := r.SetPathParam("cloudType", o.CloudType); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_custom_cloud_types_delete_responses.go b/api/client/v1/v1_custom_cloud_types_delete_responses.go new file mode 100644 index 00000000..829843c5 --- /dev/null +++ b/api/client/v1/v1_custom_cloud_types_delete_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1CustomCloudTypesDeleteReader is a Reader for the V1CustomCloudTypesDelete structure. +type V1CustomCloudTypesDeleteReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CustomCloudTypesDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1CustomCloudTypesDeleteNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CustomCloudTypesDeleteNoContent creates a V1CustomCloudTypesDeleteNoContent with default headers values +func NewV1CustomCloudTypesDeleteNoContent() *V1CustomCloudTypesDeleteNoContent { + return &V1CustomCloudTypesDeleteNoContent{} +} + +/* +V1CustomCloudTypesDeleteNoContent handles this case with default header values. + +The resource was deleted successfully +*/ +type V1CustomCloudTypesDeleteNoContent struct { +} + +func (o *V1CustomCloudTypesDeleteNoContent) Error() string { + return fmt.Sprintf("[DELETE /v1/clouds/cloudTypes/{cloudType}][%d] v1CustomCloudTypesDeleteNoContent ", 204) +} + +func (o *V1CustomCloudTypesDeleteNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_custom_cloud_types_get_parameters.go b/api/client/v1/v1_custom_cloud_types_get_parameters.go new file mode 100644 index 00000000..91ae5406 --- /dev/null +++ b/api/client/v1/v1_custom_cloud_types_get_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1CustomCloudTypesGetParams creates a new V1CustomCloudTypesGetParams object +// with the default values initialized. +func NewV1CustomCloudTypesGetParams() *V1CustomCloudTypesGetParams { + + return &V1CustomCloudTypesGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1CustomCloudTypesGetParamsWithTimeout creates a new V1CustomCloudTypesGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1CustomCloudTypesGetParamsWithTimeout(timeout time.Duration) *V1CustomCloudTypesGetParams { + + return &V1CustomCloudTypesGetParams{ + + timeout: timeout, + } +} + +// NewV1CustomCloudTypesGetParamsWithContext creates a new V1CustomCloudTypesGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1CustomCloudTypesGetParamsWithContext(ctx context.Context) *V1CustomCloudTypesGetParams { + + return &V1CustomCloudTypesGetParams{ + + Context: ctx, + } +} + +// NewV1CustomCloudTypesGetParamsWithHTTPClient creates a new V1CustomCloudTypesGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1CustomCloudTypesGetParamsWithHTTPClient(client *http.Client) *V1CustomCloudTypesGetParams { + + return &V1CustomCloudTypesGetParams{ + HTTPClient: client, + } +} + +/* +V1CustomCloudTypesGetParams contains all the parameters to send to the API endpoint +for the v1 custom cloud types get operation typically these are written to a http.Request +*/ +type V1CustomCloudTypesGetParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 custom cloud types get params +func (o *V1CustomCloudTypesGetParams) WithTimeout(timeout time.Duration) *V1CustomCloudTypesGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 custom cloud types get params +func (o *V1CustomCloudTypesGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 custom cloud types get params +func (o *V1CustomCloudTypesGetParams) WithContext(ctx context.Context) *V1CustomCloudTypesGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 custom cloud types get params +func (o *V1CustomCloudTypesGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 custom cloud types get params +func (o *V1CustomCloudTypesGetParams) WithHTTPClient(client *http.Client) *V1CustomCloudTypesGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 custom cloud types get params +func (o *V1CustomCloudTypesGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *V1CustomCloudTypesGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_custom_cloud_types_get_responses.go b/api/client/v1/v1_custom_cloud_types_get_responses.go new file mode 100644 index 00000000..54c1a512 --- /dev/null +++ b/api/client/v1/v1_custom_cloud_types_get_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1CustomCloudTypesGetReader is a Reader for the V1CustomCloudTypesGet structure. +type V1CustomCloudTypesGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1CustomCloudTypesGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1CustomCloudTypesGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1CustomCloudTypesGetOK creates a V1CustomCloudTypesGetOK with default headers values +func NewV1CustomCloudTypesGetOK() *V1CustomCloudTypesGetOK { + return &V1CustomCloudTypesGetOK{} +} + +/* +V1CustomCloudTypesGetOK handles this case with default header values. + +(empty) +*/ +type V1CustomCloudTypesGetOK struct { + Payload *models.V1CustomCloudTypes +} + +func (o *V1CustomCloudTypesGetOK) Error() string { + return fmt.Sprintf("[GET /v1/clouds/cloudTypes][%d] v1CustomCloudTypesGetOK %+v", 200, o.Payload) +} + +func (o *V1CustomCloudTypesGetOK) GetPayload() *models.V1CustomCloudTypes { + return o.Payload +} + +func (o *V1CustomCloudTypesGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1CustomCloudTypes) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_dashboard_app_deployments_parameters.go b/api/client/v1/v1_dashboard_app_deployments_parameters.go new file mode 100644 index 00000000..2a32eaa5 --- /dev/null +++ b/api/client/v1/v1_dashboard_app_deployments_parameters.go @@ -0,0 +1,234 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1DashboardAppDeploymentsParams creates a new V1DashboardAppDeploymentsParams object +// with the default values initialized. +func NewV1DashboardAppDeploymentsParams() *V1DashboardAppDeploymentsParams { + var () + return &V1DashboardAppDeploymentsParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1DashboardAppDeploymentsParamsWithTimeout creates a new V1DashboardAppDeploymentsParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1DashboardAppDeploymentsParamsWithTimeout(timeout time.Duration) *V1DashboardAppDeploymentsParams { + var () + return &V1DashboardAppDeploymentsParams{ + + timeout: timeout, + } +} + +// NewV1DashboardAppDeploymentsParamsWithContext creates a new V1DashboardAppDeploymentsParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1DashboardAppDeploymentsParamsWithContext(ctx context.Context) *V1DashboardAppDeploymentsParams { + var () + return &V1DashboardAppDeploymentsParams{ + + Context: ctx, + } +} + +// NewV1DashboardAppDeploymentsParamsWithHTTPClient creates a new V1DashboardAppDeploymentsParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1DashboardAppDeploymentsParamsWithHTTPClient(client *http.Client) *V1DashboardAppDeploymentsParams { + var () + return &V1DashboardAppDeploymentsParams{ + HTTPClient: client, + } +} + +/* +V1DashboardAppDeploymentsParams contains all the parameters to send to the API endpoint +for the v1 dashboard app deployments operation typically these are written to a http.Request +*/ +type V1DashboardAppDeploymentsParams struct { + + /*Body*/ + Body *models.V1AppDeploymentsFilterSpec + /*Continue + continue token to paginate the subsequent data items + + */ + Continue *string + /*Limit + limit is a maximum number of responses to return for a list call. Maximum value of the limit is 50. + If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. + + */ + Limit *int64 + /*Offset + offset is the next index number from which the response will start. The response offset value can be used along with continue token for the pagination. + + */ + Offset *int64 + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 dashboard app deployments params +func (o *V1DashboardAppDeploymentsParams) WithTimeout(timeout time.Duration) *V1DashboardAppDeploymentsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 dashboard app deployments params +func (o *V1DashboardAppDeploymentsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 dashboard app deployments params +func (o *V1DashboardAppDeploymentsParams) WithContext(ctx context.Context) *V1DashboardAppDeploymentsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 dashboard app deployments params +func (o *V1DashboardAppDeploymentsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 dashboard app deployments params +func (o *V1DashboardAppDeploymentsParams) WithHTTPClient(client *http.Client) *V1DashboardAppDeploymentsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 dashboard app deployments params +func (o *V1DashboardAppDeploymentsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 dashboard app deployments params +func (o *V1DashboardAppDeploymentsParams) WithBody(body *models.V1AppDeploymentsFilterSpec) *V1DashboardAppDeploymentsParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 dashboard app deployments params +func (o *V1DashboardAppDeploymentsParams) SetBody(body *models.V1AppDeploymentsFilterSpec) { + o.Body = body +} + +// WithContinue adds the continueVar to the v1 dashboard app deployments params +func (o *V1DashboardAppDeploymentsParams) WithContinue(continueVar *string) *V1DashboardAppDeploymentsParams { + o.SetContinue(continueVar) + return o +} + +// SetContinue adds the continue to the v1 dashboard app deployments params +func (o *V1DashboardAppDeploymentsParams) SetContinue(continueVar *string) { + o.Continue = continueVar +} + +// WithLimit adds the limit to the v1 dashboard app deployments params +func (o *V1DashboardAppDeploymentsParams) WithLimit(limit *int64) *V1DashboardAppDeploymentsParams { + o.SetLimit(limit) + return o +} + +// SetLimit adds the limit to the v1 dashboard app deployments params +func (o *V1DashboardAppDeploymentsParams) SetLimit(limit *int64) { + o.Limit = limit +} + +// WithOffset adds the offset to the v1 dashboard app deployments params +func (o *V1DashboardAppDeploymentsParams) WithOffset(offset *int64) *V1DashboardAppDeploymentsParams { + o.SetOffset(offset) + return o +} + +// SetOffset adds the offset to the v1 dashboard app deployments params +func (o *V1DashboardAppDeploymentsParams) SetOffset(offset *int64) { + o.Offset = offset +} + +// WriteToRequest writes these params to a swagger request +func (o *V1DashboardAppDeploymentsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + if o.Continue != nil { + + // query param continue + var qrContinue string + if o.Continue != nil { + qrContinue = *o.Continue + } + qContinue := qrContinue + if qContinue != "" { + if err := r.SetQueryParam("continue", qContinue); err != nil { + return err + } + } + + } + + if o.Limit != nil { + + // query param limit + var qrLimit int64 + if o.Limit != nil { + qrLimit = *o.Limit + } + qLimit := swag.FormatInt64(qrLimit) + if qLimit != "" { + if err := r.SetQueryParam("limit", qLimit); err != nil { + return err + } + } + + } + + if o.Offset != nil { + + // query param offset + var qrOffset int64 + if o.Offset != nil { + qrOffset = *o.Offset + } + qOffset := swag.FormatInt64(qrOffset) + if qOffset != "" { + if err := r.SetQueryParam("offset", qOffset); err != nil { + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_dashboard_app_deployments_responses.go b/api/client/v1/v1_dashboard_app_deployments_responses.go new file mode 100644 index 00000000..12185846 --- /dev/null +++ b/api/client/v1/v1_dashboard_app_deployments_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1DashboardAppDeploymentsReader is a Reader for the V1DashboardAppDeployments structure. +type V1DashboardAppDeploymentsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1DashboardAppDeploymentsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1DashboardAppDeploymentsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1DashboardAppDeploymentsOK creates a V1DashboardAppDeploymentsOK with default headers values +func NewV1DashboardAppDeploymentsOK() *V1DashboardAppDeploymentsOK { + return &V1DashboardAppDeploymentsOK{} +} + +/* +V1DashboardAppDeploymentsOK handles this case with default header values. + +An array of application deployment summary items +*/ +type V1DashboardAppDeploymentsOK struct { + Payload *models.V1AppDeploymentsSummary +} + +func (o *V1DashboardAppDeploymentsOK) Error() string { + return fmt.Sprintf("[POST /v1/dashboard/appDeployments][%d] v1DashboardAppDeploymentsOK %+v", 200, o.Payload) +} + +func (o *V1DashboardAppDeploymentsOK) GetPayload() *models.V1AppDeploymentsSummary { + return o.Payload +} + +func (o *V1DashboardAppDeploymentsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1AppDeploymentsSummary) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_dashboard_app_profiles_metadata_parameters.go b/api/client/v1/v1_dashboard_app_profiles_metadata_parameters.go new file mode 100644 index 00000000..ee7e0f49 --- /dev/null +++ b/api/client/v1/v1_dashboard_app_profiles_metadata_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1DashboardAppProfilesMetadataParams creates a new V1DashboardAppProfilesMetadataParams object +// with the default values initialized. +func NewV1DashboardAppProfilesMetadataParams() *V1DashboardAppProfilesMetadataParams { + + return &V1DashboardAppProfilesMetadataParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1DashboardAppProfilesMetadataParamsWithTimeout creates a new V1DashboardAppProfilesMetadataParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1DashboardAppProfilesMetadataParamsWithTimeout(timeout time.Duration) *V1DashboardAppProfilesMetadataParams { + + return &V1DashboardAppProfilesMetadataParams{ + + timeout: timeout, + } +} + +// NewV1DashboardAppProfilesMetadataParamsWithContext creates a new V1DashboardAppProfilesMetadataParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1DashboardAppProfilesMetadataParamsWithContext(ctx context.Context) *V1DashboardAppProfilesMetadataParams { + + return &V1DashboardAppProfilesMetadataParams{ + + Context: ctx, + } +} + +// NewV1DashboardAppProfilesMetadataParamsWithHTTPClient creates a new V1DashboardAppProfilesMetadataParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1DashboardAppProfilesMetadataParamsWithHTTPClient(client *http.Client) *V1DashboardAppProfilesMetadataParams { + + return &V1DashboardAppProfilesMetadataParams{ + HTTPClient: client, + } +} + +/* +V1DashboardAppProfilesMetadataParams contains all the parameters to send to the API endpoint +for the v1 dashboard app profiles metadata operation typically these are written to a http.Request +*/ +type V1DashboardAppProfilesMetadataParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 dashboard app profiles metadata params +func (o *V1DashboardAppProfilesMetadataParams) WithTimeout(timeout time.Duration) *V1DashboardAppProfilesMetadataParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 dashboard app profiles metadata params +func (o *V1DashboardAppProfilesMetadataParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 dashboard app profiles metadata params +func (o *V1DashboardAppProfilesMetadataParams) WithContext(ctx context.Context) *V1DashboardAppProfilesMetadataParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 dashboard app profiles metadata params +func (o *V1DashboardAppProfilesMetadataParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 dashboard app profiles metadata params +func (o *V1DashboardAppProfilesMetadataParams) WithHTTPClient(client *http.Client) *V1DashboardAppProfilesMetadataParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 dashboard app profiles metadata params +func (o *V1DashboardAppProfilesMetadataParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *V1DashboardAppProfilesMetadataParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_dashboard_app_profiles_metadata_responses.go b/api/client/v1/v1_dashboard_app_profiles_metadata_responses.go new file mode 100644 index 00000000..1d557c18 --- /dev/null +++ b/api/client/v1/v1_dashboard_app_profiles_metadata_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1DashboardAppProfilesMetadataReader is a Reader for the V1DashboardAppProfilesMetadata structure. +type V1DashboardAppProfilesMetadataReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1DashboardAppProfilesMetadataReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1DashboardAppProfilesMetadataOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1DashboardAppProfilesMetadataOK creates a V1DashboardAppProfilesMetadataOK with default headers values +func NewV1DashboardAppProfilesMetadataOK() *V1DashboardAppProfilesMetadataOK { + return &V1DashboardAppProfilesMetadataOK{} +} + +/* +V1DashboardAppProfilesMetadataOK handles this case with default header values. + +An array of application profile summary items +*/ +type V1DashboardAppProfilesMetadataOK struct { + Payload *models.V1AppProfilesMetadata +} + +func (o *V1DashboardAppProfilesMetadataOK) Error() string { + return fmt.Sprintf("[GET /v1/dashboard/appProfiles/metadata][%d] v1DashboardAppProfilesMetadataOK %+v", 200, o.Payload) +} + +func (o *V1DashboardAppProfilesMetadataOK) GetPayload() *models.V1AppProfilesMetadata { + return o.Payload +} + +func (o *V1DashboardAppProfilesMetadataOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1AppProfilesMetadata) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_dashboard_app_profiles_parameters.go b/api/client/v1/v1_dashboard_app_profiles_parameters.go new file mode 100644 index 00000000..59c9815d --- /dev/null +++ b/api/client/v1/v1_dashboard_app_profiles_parameters.go @@ -0,0 +1,234 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1DashboardAppProfilesParams creates a new V1DashboardAppProfilesParams object +// with the default values initialized. +func NewV1DashboardAppProfilesParams() *V1DashboardAppProfilesParams { + var () + return &V1DashboardAppProfilesParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1DashboardAppProfilesParamsWithTimeout creates a new V1DashboardAppProfilesParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1DashboardAppProfilesParamsWithTimeout(timeout time.Duration) *V1DashboardAppProfilesParams { + var () + return &V1DashboardAppProfilesParams{ + + timeout: timeout, + } +} + +// NewV1DashboardAppProfilesParamsWithContext creates a new V1DashboardAppProfilesParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1DashboardAppProfilesParamsWithContext(ctx context.Context) *V1DashboardAppProfilesParams { + var () + return &V1DashboardAppProfilesParams{ + + Context: ctx, + } +} + +// NewV1DashboardAppProfilesParamsWithHTTPClient creates a new V1DashboardAppProfilesParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1DashboardAppProfilesParamsWithHTTPClient(client *http.Client) *V1DashboardAppProfilesParams { + var () + return &V1DashboardAppProfilesParams{ + HTTPClient: client, + } +} + +/* +V1DashboardAppProfilesParams contains all the parameters to send to the API endpoint +for the v1 dashboard app profiles operation typically these are written to a http.Request +*/ +type V1DashboardAppProfilesParams struct { + + /*Body*/ + Body *models.V1AppProfilesFilterSpec + /*Continue + continue token to paginate the subsequent data items + + */ + Continue *string + /*Limit + limit is a maximum number of responses to return for a list call. Maximum value of the limit is 50. + If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. + + */ + Limit *int64 + /*Offset + offset is the next index number from which the response will start. The response offset value can be used along with continue token for the pagination. + + */ + Offset *int64 + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 dashboard app profiles params +func (o *V1DashboardAppProfilesParams) WithTimeout(timeout time.Duration) *V1DashboardAppProfilesParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 dashboard app profiles params +func (o *V1DashboardAppProfilesParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 dashboard app profiles params +func (o *V1DashboardAppProfilesParams) WithContext(ctx context.Context) *V1DashboardAppProfilesParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 dashboard app profiles params +func (o *V1DashboardAppProfilesParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 dashboard app profiles params +func (o *V1DashboardAppProfilesParams) WithHTTPClient(client *http.Client) *V1DashboardAppProfilesParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 dashboard app profiles params +func (o *V1DashboardAppProfilesParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 dashboard app profiles params +func (o *V1DashboardAppProfilesParams) WithBody(body *models.V1AppProfilesFilterSpec) *V1DashboardAppProfilesParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 dashboard app profiles params +func (o *V1DashboardAppProfilesParams) SetBody(body *models.V1AppProfilesFilterSpec) { + o.Body = body +} + +// WithContinue adds the continueVar to the v1 dashboard app profiles params +func (o *V1DashboardAppProfilesParams) WithContinue(continueVar *string) *V1DashboardAppProfilesParams { + o.SetContinue(continueVar) + return o +} + +// SetContinue adds the continue to the v1 dashboard app profiles params +func (o *V1DashboardAppProfilesParams) SetContinue(continueVar *string) { + o.Continue = continueVar +} + +// WithLimit adds the limit to the v1 dashboard app profiles params +func (o *V1DashboardAppProfilesParams) WithLimit(limit *int64) *V1DashboardAppProfilesParams { + o.SetLimit(limit) + return o +} + +// SetLimit adds the limit to the v1 dashboard app profiles params +func (o *V1DashboardAppProfilesParams) SetLimit(limit *int64) { + o.Limit = limit +} + +// WithOffset adds the offset to the v1 dashboard app profiles params +func (o *V1DashboardAppProfilesParams) WithOffset(offset *int64) *V1DashboardAppProfilesParams { + o.SetOffset(offset) + return o +} + +// SetOffset adds the offset to the v1 dashboard app profiles params +func (o *V1DashboardAppProfilesParams) SetOffset(offset *int64) { + o.Offset = offset +} + +// WriteToRequest writes these params to a swagger request +func (o *V1DashboardAppProfilesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + if o.Continue != nil { + + // query param continue + var qrContinue string + if o.Continue != nil { + qrContinue = *o.Continue + } + qContinue := qrContinue + if qContinue != "" { + if err := r.SetQueryParam("continue", qContinue); err != nil { + return err + } + } + + } + + if o.Limit != nil { + + // query param limit + var qrLimit int64 + if o.Limit != nil { + qrLimit = *o.Limit + } + qLimit := swag.FormatInt64(qrLimit) + if qLimit != "" { + if err := r.SetQueryParam("limit", qLimit); err != nil { + return err + } + } + + } + + if o.Offset != nil { + + // query param offset + var qrOffset int64 + if o.Offset != nil { + qrOffset = *o.Offset + } + qOffset := swag.FormatInt64(qrOffset) + if qOffset != "" { + if err := r.SetQueryParam("offset", qOffset); err != nil { + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_dashboard_app_profiles_responses.go b/api/client/v1/v1_dashboard_app_profiles_responses.go new file mode 100644 index 00000000..700bb4fe --- /dev/null +++ b/api/client/v1/v1_dashboard_app_profiles_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1DashboardAppProfilesReader is a Reader for the V1DashboardAppProfiles structure. +type V1DashboardAppProfilesReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1DashboardAppProfilesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1DashboardAppProfilesOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1DashboardAppProfilesOK creates a V1DashboardAppProfilesOK with default headers values +func NewV1DashboardAppProfilesOK() *V1DashboardAppProfilesOK { + return &V1DashboardAppProfilesOK{} +} + +/* +V1DashboardAppProfilesOK handles this case with default header values. + +An array of application profiles summary items +*/ +type V1DashboardAppProfilesOK struct { + Payload *models.V1AppProfilesSummary +} + +func (o *V1DashboardAppProfilesOK) Error() string { + return fmt.Sprintf("[POST /v1/dashboard/appProfiles][%d] v1DashboardAppProfilesOK %+v", 200, o.Payload) +} + +func (o *V1DashboardAppProfilesOK) GetPayload() *models.V1AppProfilesSummary { + return o.Payload +} + +func (o *V1DashboardAppProfilesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1AppProfilesSummary) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_dashboard_cloud_accounts_metadata_parameters.go b/api/client/v1/v1_dashboard_cloud_accounts_metadata_parameters.go new file mode 100644 index 00000000..0d2fc16c --- /dev/null +++ b/api/client/v1/v1_dashboard_cloud_accounts_metadata_parameters.go @@ -0,0 +1,144 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1DashboardCloudAccountsMetadataParams creates a new V1DashboardCloudAccountsMetadataParams object +// with the default values initialized. +func NewV1DashboardCloudAccountsMetadataParams() *V1DashboardCloudAccountsMetadataParams { + var () + return &V1DashboardCloudAccountsMetadataParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1DashboardCloudAccountsMetadataParamsWithTimeout creates a new V1DashboardCloudAccountsMetadataParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1DashboardCloudAccountsMetadataParamsWithTimeout(timeout time.Duration) *V1DashboardCloudAccountsMetadataParams { + var () + return &V1DashboardCloudAccountsMetadataParams{ + + timeout: timeout, + } +} + +// NewV1DashboardCloudAccountsMetadataParamsWithContext creates a new V1DashboardCloudAccountsMetadataParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1DashboardCloudAccountsMetadataParamsWithContext(ctx context.Context) *V1DashboardCloudAccountsMetadataParams { + var () + return &V1DashboardCloudAccountsMetadataParams{ + + Context: ctx, + } +} + +// NewV1DashboardCloudAccountsMetadataParamsWithHTTPClient creates a new V1DashboardCloudAccountsMetadataParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1DashboardCloudAccountsMetadataParamsWithHTTPClient(client *http.Client) *V1DashboardCloudAccountsMetadataParams { + var () + return &V1DashboardCloudAccountsMetadataParams{ + HTTPClient: client, + } +} + +/* +V1DashboardCloudAccountsMetadataParams contains all the parameters to send to the API endpoint +for the v1 dashboard cloud accounts metadata operation typically these are written to a http.Request +*/ +type V1DashboardCloudAccountsMetadataParams struct { + + /*Environment*/ + Environment *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 dashboard cloud accounts metadata params +func (o *V1DashboardCloudAccountsMetadataParams) WithTimeout(timeout time.Duration) *V1DashboardCloudAccountsMetadataParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 dashboard cloud accounts metadata params +func (o *V1DashboardCloudAccountsMetadataParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 dashboard cloud accounts metadata params +func (o *V1DashboardCloudAccountsMetadataParams) WithContext(ctx context.Context) *V1DashboardCloudAccountsMetadataParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 dashboard cloud accounts metadata params +func (o *V1DashboardCloudAccountsMetadataParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 dashboard cloud accounts metadata params +func (o *V1DashboardCloudAccountsMetadataParams) WithHTTPClient(client *http.Client) *V1DashboardCloudAccountsMetadataParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 dashboard cloud accounts metadata params +func (o *V1DashboardCloudAccountsMetadataParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithEnvironment adds the environment to the v1 dashboard cloud accounts metadata params +func (o *V1DashboardCloudAccountsMetadataParams) WithEnvironment(environment *string) *V1DashboardCloudAccountsMetadataParams { + o.SetEnvironment(environment) + return o +} + +// SetEnvironment adds the environment to the v1 dashboard cloud accounts metadata params +func (o *V1DashboardCloudAccountsMetadataParams) SetEnvironment(environment *string) { + o.Environment = environment +} + +// WriteToRequest writes these params to a swagger request +func (o *V1DashboardCloudAccountsMetadataParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Environment != nil { + + // query param environment + var qrEnvironment string + if o.Environment != nil { + qrEnvironment = *o.Environment + } + qEnvironment := qrEnvironment + if qEnvironment != "" { + if err := r.SetQueryParam("environment", qEnvironment); err != nil { + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_dashboard_cloud_accounts_metadata_responses.go b/api/client/v1/v1_dashboard_cloud_accounts_metadata_responses.go new file mode 100644 index 00000000..bba171f0 --- /dev/null +++ b/api/client/v1/v1_dashboard_cloud_accounts_metadata_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1DashboardCloudAccountsMetadataReader is a Reader for the V1DashboardCloudAccountsMetadata structure. +type V1DashboardCloudAccountsMetadataReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1DashboardCloudAccountsMetadataReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1DashboardCloudAccountsMetadataOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1DashboardCloudAccountsMetadataOK creates a V1DashboardCloudAccountsMetadataOK with default headers values +func NewV1DashboardCloudAccountsMetadataOK() *V1DashboardCloudAccountsMetadataOK { + return &V1DashboardCloudAccountsMetadataOK{} +} + +/* +V1DashboardCloudAccountsMetadataOK handles this case with default header values. + +An array of cloud accounts summary items +*/ +type V1DashboardCloudAccountsMetadataOK struct { + Payload *models.V1CloudAccountsMetadata +} + +func (o *V1DashboardCloudAccountsMetadataOK) Error() string { + return fmt.Sprintf("[GET /v1/dashboard/cloudaccounts/metadata][%d] v1DashboardCloudAccountsMetadataOK %+v", 200, o.Payload) +} + +func (o *V1DashboardCloudAccountsMetadataOK) GetPayload() *models.V1CloudAccountsMetadata { + return o.Payload +} + +func (o *V1DashboardCloudAccountsMetadataOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1CloudAccountsMetadata) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_dashboard_clusters_search_summary_export_get_parameters.go b/api/client/v1/v1_dashboard_clusters_search_summary_export_get_parameters.go new file mode 100644 index 00000000..00664915 --- /dev/null +++ b/api/client/v1/v1_dashboard_clusters_search_summary_export_get_parameters.go @@ -0,0 +1,185 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1DashboardClustersSearchSummaryExportGetParams creates a new V1DashboardClustersSearchSummaryExportGetParams object +// with the default values initialized. +func NewV1DashboardClustersSearchSummaryExportGetParams() *V1DashboardClustersSearchSummaryExportGetParams { + var ( + formatDefault = string("csv") + ) + return &V1DashboardClustersSearchSummaryExportGetParams{ + Format: &formatDefault, + + timeout: cr.DefaultTimeout, + } +} + +// NewV1DashboardClustersSearchSummaryExportGetParamsWithTimeout creates a new V1DashboardClustersSearchSummaryExportGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1DashboardClustersSearchSummaryExportGetParamsWithTimeout(timeout time.Duration) *V1DashboardClustersSearchSummaryExportGetParams { + var ( + formatDefault = string("csv") + ) + return &V1DashboardClustersSearchSummaryExportGetParams{ + Format: &formatDefault, + + timeout: timeout, + } +} + +// NewV1DashboardClustersSearchSummaryExportGetParamsWithContext creates a new V1DashboardClustersSearchSummaryExportGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1DashboardClustersSearchSummaryExportGetParamsWithContext(ctx context.Context) *V1DashboardClustersSearchSummaryExportGetParams { + var ( + formatDefault = string("csv") + ) + return &V1DashboardClustersSearchSummaryExportGetParams{ + Format: &formatDefault, + + Context: ctx, + } +} + +// NewV1DashboardClustersSearchSummaryExportGetParamsWithHTTPClient creates a new V1DashboardClustersSearchSummaryExportGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1DashboardClustersSearchSummaryExportGetParamsWithHTTPClient(client *http.Client) *V1DashboardClustersSearchSummaryExportGetParams { + var ( + formatDefault = string("csv") + ) + return &V1DashboardClustersSearchSummaryExportGetParams{ + Format: &formatDefault, + HTTPClient: client, + } +} + +/* +V1DashboardClustersSearchSummaryExportGetParams contains all the parameters to send to the API endpoint +for the v1 dashboard clusters search summary export get operation typically these are written to a http.Request +*/ +type V1DashboardClustersSearchSummaryExportGetParams struct { + + /*EncodedFilter*/ + EncodedFilter *string + /*Format*/ + Format *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 dashboard clusters search summary export get params +func (o *V1DashboardClustersSearchSummaryExportGetParams) WithTimeout(timeout time.Duration) *V1DashboardClustersSearchSummaryExportGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 dashboard clusters search summary export get params +func (o *V1DashboardClustersSearchSummaryExportGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 dashboard clusters search summary export get params +func (o *V1DashboardClustersSearchSummaryExportGetParams) WithContext(ctx context.Context) *V1DashboardClustersSearchSummaryExportGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 dashboard clusters search summary export get params +func (o *V1DashboardClustersSearchSummaryExportGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 dashboard clusters search summary export get params +func (o *V1DashboardClustersSearchSummaryExportGetParams) WithHTTPClient(client *http.Client) *V1DashboardClustersSearchSummaryExportGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 dashboard clusters search summary export get params +func (o *V1DashboardClustersSearchSummaryExportGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithEncodedFilter adds the encodedFilter to the v1 dashboard clusters search summary export get params +func (o *V1DashboardClustersSearchSummaryExportGetParams) WithEncodedFilter(encodedFilter *string) *V1DashboardClustersSearchSummaryExportGetParams { + o.SetEncodedFilter(encodedFilter) + return o +} + +// SetEncodedFilter adds the encodedFilter to the v1 dashboard clusters search summary export get params +func (o *V1DashboardClustersSearchSummaryExportGetParams) SetEncodedFilter(encodedFilter *string) { + o.EncodedFilter = encodedFilter +} + +// WithFormat adds the format to the v1 dashboard clusters search summary export get params +func (o *V1DashboardClustersSearchSummaryExportGetParams) WithFormat(format *string) *V1DashboardClustersSearchSummaryExportGetParams { + o.SetFormat(format) + return o +} + +// SetFormat adds the format to the v1 dashboard clusters search summary export get params +func (o *V1DashboardClustersSearchSummaryExportGetParams) SetFormat(format *string) { + o.Format = format +} + +// WriteToRequest writes these params to a swagger request +func (o *V1DashboardClustersSearchSummaryExportGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.EncodedFilter != nil { + + // query param encodedFilter + var qrEncodedFilter string + if o.EncodedFilter != nil { + qrEncodedFilter = *o.EncodedFilter + } + qEncodedFilter := qrEncodedFilter + if qEncodedFilter != "" { + if err := r.SetQueryParam("encodedFilter", qEncodedFilter); err != nil { + return err + } + } + + } + + if o.Format != nil { + + // query param format + var qrFormat string + if o.Format != nil { + qrFormat = *o.Format + } + qFormat := qrFormat + if qFormat != "" { + if err := r.SetQueryParam("format", qFormat); err != nil { + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_dashboard_clusters_search_summary_export_get_responses.go b/api/client/v1/v1_dashboard_clusters_search_summary_export_get_responses.go new file mode 100644 index 00000000..639d2edb --- /dev/null +++ b/api/client/v1/v1_dashboard_clusters_search_summary_export_get_responses.go @@ -0,0 +1,79 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1DashboardClustersSearchSummaryExportGetReader is a Reader for the V1DashboardClustersSearchSummaryExportGet structure. +type V1DashboardClustersSearchSummaryExportGetReader struct { + formats strfmt.Registry + writer io.Writer +} + +// ReadResponse reads a server response into the received o. +func (o *V1DashboardClustersSearchSummaryExportGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1DashboardClustersSearchSummaryExportGetOK(o.writer) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1DashboardClustersSearchSummaryExportGetOK creates a V1DashboardClustersSearchSummaryExportGetOK with default headers values +func NewV1DashboardClustersSearchSummaryExportGetOK(writer io.Writer) *V1DashboardClustersSearchSummaryExportGetOK { + return &V1DashboardClustersSearchSummaryExportGetOK{ + Payload: writer, + } +} + +/* +V1DashboardClustersSearchSummaryExportGetOK handles this case with default header values. + +OK +*/ +type V1DashboardClustersSearchSummaryExportGetOK struct { + ContentDisposition string + + ContentType string + + Payload io.Writer +} + +func (o *V1DashboardClustersSearchSummaryExportGetOK) Error() string { + return fmt.Sprintf("[GET /v1/dashboard/spectroclusters/search/export][%d] v1DashboardClustersSearchSummaryExportGetOK %+v", 200, o.Payload) +} + +func (o *V1DashboardClustersSearchSummaryExportGetOK) GetPayload() io.Writer { + return o.Payload +} + +func (o *V1DashboardClustersSearchSummaryExportGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Content-Disposition + o.ContentDisposition = response.GetHeader("Content-Disposition") + + // response header Content-Type + o.ContentType = response.GetHeader("Content-Type") + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_dashboard_clusters_search_summary_export_parameters.go b/api/client/v1/v1_dashboard_clusters_search_summary_export_parameters.go new file mode 100644 index 00000000..cde820c6 --- /dev/null +++ b/api/client/v1/v1_dashboard_clusters_search_summary_export_parameters.go @@ -0,0 +1,177 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1DashboardClustersSearchSummaryExportParams creates a new V1DashboardClustersSearchSummaryExportParams object +// with the default values initialized. +func NewV1DashboardClustersSearchSummaryExportParams() *V1DashboardClustersSearchSummaryExportParams { + var ( + formatDefault = string("csv") + ) + return &V1DashboardClustersSearchSummaryExportParams{ + Format: &formatDefault, + + timeout: cr.DefaultTimeout, + } +} + +// NewV1DashboardClustersSearchSummaryExportParamsWithTimeout creates a new V1DashboardClustersSearchSummaryExportParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1DashboardClustersSearchSummaryExportParamsWithTimeout(timeout time.Duration) *V1DashboardClustersSearchSummaryExportParams { + var ( + formatDefault = string("csv") + ) + return &V1DashboardClustersSearchSummaryExportParams{ + Format: &formatDefault, + + timeout: timeout, + } +} + +// NewV1DashboardClustersSearchSummaryExportParamsWithContext creates a new V1DashboardClustersSearchSummaryExportParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1DashboardClustersSearchSummaryExportParamsWithContext(ctx context.Context) *V1DashboardClustersSearchSummaryExportParams { + var ( + formatDefault = string("csv") + ) + return &V1DashboardClustersSearchSummaryExportParams{ + Format: &formatDefault, + + Context: ctx, + } +} + +// NewV1DashboardClustersSearchSummaryExportParamsWithHTTPClient creates a new V1DashboardClustersSearchSummaryExportParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1DashboardClustersSearchSummaryExportParamsWithHTTPClient(client *http.Client) *V1DashboardClustersSearchSummaryExportParams { + var ( + formatDefault = string("csv") + ) + return &V1DashboardClustersSearchSummaryExportParams{ + Format: &formatDefault, + HTTPClient: client, + } +} + +/* +V1DashboardClustersSearchSummaryExportParams contains all the parameters to send to the API endpoint +for the v1 dashboard clusters search summary export operation typically these are written to a http.Request +*/ +type V1DashboardClustersSearchSummaryExportParams struct { + + /*Body*/ + Body *models.V1SearchFilterSummarySpec + /*Format*/ + Format *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 dashboard clusters search summary export params +func (o *V1DashboardClustersSearchSummaryExportParams) WithTimeout(timeout time.Duration) *V1DashboardClustersSearchSummaryExportParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 dashboard clusters search summary export params +func (o *V1DashboardClustersSearchSummaryExportParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 dashboard clusters search summary export params +func (o *V1DashboardClustersSearchSummaryExportParams) WithContext(ctx context.Context) *V1DashboardClustersSearchSummaryExportParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 dashboard clusters search summary export params +func (o *V1DashboardClustersSearchSummaryExportParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 dashboard clusters search summary export params +func (o *V1DashboardClustersSearchSummaryExportParams) WithHTTPClient(client *http.Client) *V1DashboardClustersSearchSummaryExportParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 dashboard clusters search summary export params +func (o *V1DashboardClustersSearchSummaryExportParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 dashboard clusters search summary export params +func (o *V1DashboardClustersSearchSummaryExportParams) WithBody(body *models.V1SearchFilterSummarySpec) *V1DashboardClustersSearchSummaryExportParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 dashboard clusters search summary export params +func (o *V1DashboardClustersSearchSummaryExportParams) SetBody(body *models.V1SearchFilterSummarySpec) { + o.Body = body +} + +// WithFormat adds the format to the v1 dashboard clusters search summary export params +func (o *V1DashboardClustersSearchSummaryExportParams) WithFormat(format *string) *V1DashboardClustersSearchSummaryExportParams { + o.SetFormat(format) + return o +} + +// SetFormat adds the format to the v1 dashboard clusters search summary export params +func (o *V1DashboardClustersSearchSummaryExportParams) SetFormat(format *string) { + o.Format = format +} + +// WriteToRequest writes these params to a swagger request +func (o *V1DashboardClustersSearchSummaryExportParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + if o.Format != nil { + + // query param format + var qrFormat string + if o.Format != nil { + qrFormat = *o.Format + } + qFormat := qrFormat + if qFormat != "" { + if err := r.SetQueryParam("format", qFormat); err != nil { + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_dashboard_clusters_search_summary_export_responses.go b/api/client/v1/v1_dashboard_clusters_search_summary_export_responses.go new file mode 100644 index 00000000..941bbbb3 --- /dev/null +++ b/api/client/v1/v1_dashboard_clusters_search_summary_export_responses.go @@ -0,0 +1,74 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1DashboardClustersSearchSummaryExportReader is a Reader for the V1DashboardClustersSearchSummaryExport structure. +type V1DashboardClustersSearchSummaryExportReader struct { + formats strfmt.Registry + writer io.Writer +} + +// ReadResponse reads a server response into the received o. +func (o *V1DashboardClustersSearchSummaryExportReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1DashboardClustersSearchSummaryExportOK(o.writer) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1DashboardClustersSearchSummaryExportOK creates a V1DashboardClustersSearchSummaryExportOK with default headers values +func NewV1DashboardClustersSearchSummaryExportOK(writer io.Writer) *V1DashboardClustersSearchSummaryExportOK { + return &V1DashboardClustersSearchSummaryExportOK{ + Payload: writer, + } +} + +/* +V1DashboardClustersSearchSummaryExportOK handles this case with default header values. + +download file +*/ +type V1DashboardClustersSearchSummaryExportOK struct { + ContentDisposition string + + Payload io.Writer +} + +func (o *V1DashboardClustersSearchSummaryExportOK) Error() string { + return fmt.Sprintf("[POST /v1/dashboard/spectroclusters/search/export][%d] v1DashboardClustersSearchSummaryExportOK %+v", 200, o.Payload) +} + +func (o *V1DashboardClustersSearchSummaryExportOK) GetPayload() io.Writer { + return o.Payload +} + +func (o *V1DashboardClustersSearchSummaryExportOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Content-Disposition + o.ContentDisposition = response.GetHeader("Content-Disposition") + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_dashboard_edgehosts_search_parameters.go b/api/client/v1/v1_dashboard_edgehosts_search_parameters.go new file mode 100644 index 00000000..c5e9e478 --- /dev/null +++ b/api/client/v1/v1_dashboard_edgehosts_search_parameters.go @@ -0,0 +1,234 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1DashboardEdgehostsSearchParams creates a new V1DashboardEdgehostsSearchParams object +// with the default values initialized. +func NewV1DashboardEdgehostsSearchParams() *V1DashboardEdgehostsSearchParams { + var () + return &V1DashboardEdgehostsSearchParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1DashboardEdgehostsSearchParamsWithTimeout creates a new V1DashboardEdgehostsSearchParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1DashboardEdgehostsSearchParamsWithTimeout(timeout time.Duration) *V1DashboardEdgehostsSearchParams { + var () + return &V1DashboardEdgehostsSearchParams{ + + timeout: timeout, + } +} + +// NewV1DashboardEdgehostsSearchParamsWithContext creates a new V1DashboardEdgehostsSearchParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1DashboardEdgehostsSearchParamsWithContext(ctx context.Context) *V1DashboardEdgehostsSearchParams { + var () + return &V1DashboardEdgehostsSearchParams{ + + Context: ctx, + } +} + +// NewV1DashboardEdgehostsSearchParamsWithHTTPClient creates a new V1DashboardEdgehostsSearchParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1DashboardEdgehostsSearchParamsWithHTTPClient(client *http.Client) *V1DashboardEdgehostsSearchParams { + var () + return &V1DashboardEdgehostsSearchParams{ + HTTPClient: client, + } +} + +/* +V1DashboardEdgehostsSearchParams contains all the parameters to send to the API endpoint +for the v1 dashboard edgehosts search operation typically these are written to a http.Request +*/ +type V1DashboardEdgehostsSearchParams struct { + + /*Body*/ + Body *models.V1SearchFilterSummarySpec + /*Continue + continue token to paginate the subsequent data items + + */ + Continue *string + /*Limit + limit is a maximum number of responses to return for a list call. Maximum value of the limit is 50. + If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. + + */ + Limit *int64 + /*Offset + offset is the next index number from which the response will start. The response offset value can be used along with continue token for the pagination. + + */ + Offset *int64 + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 dashboard edgehosts search params +func (o *V1DashboardEdgehostsSearchParams) WithTimeout(timeout time.Duration) *V1DashboardEdgehostsSearchParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 dashboard edgehosts search params +func (o *V1DashboardEdgehostsSearchParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 dashboard edgehosts search params +func (o *V1DashboardEdgehostsSearchParams) WithContext(ctx context.Context) *V1DashboardEdgehostsSearchParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 dashboard edgehosts search params +func (o *V1DashboardEdgehostsSearchParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 dashboard edgehosts search params +func (o *V1DashboardEdgehostsSearchParams) WithHTTPClient(client *http.Client) *V1DashboardEdgehostsSearchParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 dashboard edgehosts search params +func (o *V1DashboardEdgehostsSearchParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 dashboard edgehosts search params +func (o *V1DashboardEdgehostsSearchParams) WithBody(body *models.V1SearchFilterSummarySpec) *V1DashboardEdgehostsSearchParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 dashboard edgehosts search params +func (o *V1DashboardEdgehostsSearchParams) SetBody(body *models.V1SearchFilterSummarySpec) { + o.Body = body +} + +// WithContinue adds the continueVar to the v1 dashboard edgehosts search params +func (o *V1DashboardEdgehostsSearchParams) WithContinue(continueVar *string) *V1DashboardEdgehostsSearchParams { + o.SetContinue(continueVar) + return o +} + +// SetContinue adds the continue to the v1 dashboard edgehosts search params +func (o *V1DashboardEdgehostsSearchParams) SetContinue(continueVar *string) { + o.Continue = continueVar +} + +// WithLimit adds the limit to the v1 dashboard edgehosts search params +func (o *V1DashboardEdgehostsSearchParams) WithLimit(limit *int64) *V1DashboardEdgehostsSearchParams { + o.SetLimit(limit) + return o +} + +// SetLimit adds the limit to the v1 dashboard edgehosts search params +func (o *V1DashboardEdgehostsSearchParams) SetLimit(limit *int64) { + o.Limit = limit +} + +// WithOffset adds the offset to the v1 dashboard edgehosts search params +func (o *V1DashboardEdgehostsSearchParams) WithOffset(offset *int64) *V1DashboardEdgehostsSearchParams { + o.SetOffset(offset) + return o +} + +// SetOffset adds the offset to the v1 dashboard edgehosts search params +func (o *V1DashboardEdgehostsSearchParams) SetOffset(offset *int64) { + o.Offset = offset +} + +// WriteToRequest writes these params to a swagger request +func (o *V1DashboardEdgehostsSearchParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + if o.Continue != nil { + + // query param continue + var qrContinue string + if o.Continue != nil { + qrContinue = *o.Continue + } + qContinue := qrContinue + if qContinue != "" { + if err := r.SetQueryParam("continue", qContinue); err != nil { + return err + } + } + + } + + if o.Limit != nil { + + // query param limit + var qrLimit int64 + if o.Limit != nil { + qrLimit = *o.Limit + } + qLimit := swag.FormatInt64(qrLimit) + if qLimit != "" { + if err := r.SetQueryParam("limit", qLimit); err != nil { + return err + } + } + + } + + if o.Offset != nil { + + // query param offset + var qrOffset int64 + if o.Offset != nil { + qrOffset = *o.Offset + } + qOffset := swag.FormatInt64(qrOffset) + if qOffset != "" { + if err := r.SetQueryParam("offset", qOffset); err != nil { + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_dashboard_edgehosts_search_responses.go b/api/client/v1/v1_dashboard_edgehosts_search_responses.go new file mode 100644 index 00000000..a931c7e4 --- /dev/null +++ b/api/client/v1/v1_dashboard_edgehosts_search_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1DashboardEdgehostsSearchReader is a Reader for the V1DashboardEdgehostsSearch structure. +type V1DashboardEdgehostsSearchReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1DashboardEdgehostsSearchReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1DashboardEdgehostsSearchOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1DashboardEdgehostsSearchOK creates a V1DashboardEdgehostsSearchOK with default headers values +func NewV1DashboardEdgehostsSearchOK() *V1DashboardEdgehostsSearchOK { + return &V1DashboardEdgehostsSearchOK{} +} + +/* +V1DashboardEdgehostsSearchOK handles this case with default header values. + +An array of edgehost summary items +*/ +type V1DashboardEdgehostsSearchOK struct { + Payload *models.V1EdgeHostsSearchSummary +} + +func (o *V1DashboardEdgehostsSearchOK) Error() string { + return fmt.Sprintf("[POST /v1/dashboard/edgehosts/search][%d] v1DashboardEdgehostsSearchOK %+v", 200, o.Payload) +} + +func (o *V1DashboardEdgehostsSearchOK) GetPayload() *models.V1EdgeHostsSearchSummary { + return o.Payload +} + +func (o *V1DashboardEdgehostsSearchOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1EdgeHostsSearchSummary) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_dashboard_edgehosts_search_schema_get_parameters.go b/api/client/v1/v1_dashboard_edgehosts_search_schema_get_parameters.go new file mode 100644 index 00000000..93c3e257 --- /dev/null +++ b/api/client/v1/v1_dashboard_edgehosts_search_schema_get_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1DashboardEdgehostsSearchSchemaGetParams creates a new V1DashboardEdgehostsSearchSchemaGetParams object +// with the default values initialized. +func NewV1DashboardEdgehostsSearchSchemaGetParams() *V1DashboardEdgehostsSearchSchemaGetParams { + + return &V1DashboardEdgehostsSearchSchemaGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1DashboardEdgehostsSearchSchemaGetParamsWithTimeout creates a new V1DashboardEdgehostsSearchSchemaGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1DashboardEdgehostsSearchSchemaGetParamsWithTimeout(timeout time.Duration) *V1DashboardEdgehostsSearchSchemaGetParams { + + return &V1DashboardEdgehostsSearchSchemaGetParams{ + + timeout: timeout, + } +} + +// NewV1DashboardEdgehostsSearchSchemaGetParamsWithContext creates a new V1DashboardEdgehostsSearchSchemaGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1DashboardEdgehostsSearchSchemaGetParamsWithContext(ctx context.Context) *V1DashboardEdgehostsSearchSchemaGetParams { + + return &V1DashboardEdgehostsSearchSchemaGetParams{ + + Context: ctx, + } +} + +// NewV1DashboardEdgehostsSearchSchemaGetParamsWithHTTPClient creates a new V1DashboardEdgehostsSearchSchemaGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1DashboardEdgehostsSearchSchemaGetParamsWithHTTPClient(client *http.Client) *V1DashboardEdgehostsSearchSchemaGetParams { + + return &V1DashboardEdgehostsSearchSchemaGetParams{ + HTTPClient: client, + } +} + +/* +V1DashboardEdgehostsSearchSchemaGetParams contains all the parameters to send to the API endpoint +for the v1 dashboard edgehosts search schema get operation typically these are written to a http.Request +*/ +type V1DashboardEdgehostsSearchSchemaGetParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 dashboard edgehosts search schema get params +func (o *V1DashboardEdgehostsSearchSchemaGetParams) WithTimeout(timeout time.Duration) *V1DashboardEdgehostsSearchSchemaGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 dashboard edgehosts search schema get params +func (o *V1DashboardEdgehostsSearchSchemaGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 dashboard edgehosts search schema get params +func (o *V1DashboardEdgehostsSearchSchemaGetParams) WithContext(ctx context.Context) *V1DashboardEdgehostsSearchSchemaGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 dashboard edgehosts search schema get params +func (o *V1DashboardEdgehostsSearchSchemaGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 dashboard edgehosts search schema get params +func (o *V1DashboardEdgehostsSearchSchemaGetParams) WithHTTPClient(client *http.Client) *V1DashboardEdgehostsSearchSchemaGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 dashboard edgehosts search schema get params +func (o *V1DashboardEdgehostsSearchSchemaGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *V1DashboardEdgehostsSearchSchemaGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_dashboard_edgehosts_search_schema_get_responses.go b/api/client/v1/v1_dashboard_edgehosts_search_schema_get_responses.go new file mode 100644 index 00000000..24c45fcf --- /dev/null +++ b/api/client/v1/v1_dashboard_edgehosts_search_schema_get_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1DashboardEdgehostsSearchSchemaGetReader is a Reader for the V1DashboardEdgehostsSearchSchemaGet structure. +type V1DashboardEdgehostsSearchSchemaGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1DashboardEdgehostsSearchSchemaGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1DashboardEdgehostsSearchSchemaGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1DashboardEdgehostsSearchSchemaGetOK creates a V1DashboardEdgehostsSearchSchemaGetOK with default headers values +func NewV1DashboardEdgehostsSearchSchemaGetOK() *V1DashboardEdgehostsSearchSchemaGetOK { + return &V1DashboardEdgehostsSearchSchemaGetOK{} +} + +/* +V1DashboardEdgehostsSearchSchemaGetOK handles this case with default header values. + +An array of schema items +*/ +type V1DashboardEdgehostsSearchSchemaGetOK struct { + Payload *models.V1SearchFilterSchemaSpec +} + +func (o *V1DashboardEdgehostsSearchSchemaGetOK) Error() string { + return fmt.Sprintf("[GET /v1/dashboard/edgehosts/search/schema][%d] v1DashboardEdgehostsSearchSchemaGetOK %+v", 200, o.Payload) +} + +func (o *V1DashboardEdgehostsSearchSchemaGetOK) GetPayload() *models.V1SearchFilterSchemaSpec { + return o.Payload +} + +func (o *V1DashboardEdgehostsSearchSchemaGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1SearchFilterSchemaSpec) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_dashboard_pcg_search_schema_get_parameters.go b/api/client/v1/v1_dashboard_pcg_search_schema_get_parameters.go new file mode 100644 index 00000000..375299d2 --- /dev/null +++ b/api/client/v1/v1_dashboard_pcg_search_schema_get_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1DashboardPcgSearchSchemaGetParams creates a new V1DashboardPcgSearchSchemaGetParams object +// with the default values initialized. +func NewV1DashboardPcgSearchSchemaGetParams() *V1DashboardPcgSearchSchemaGetParams { + + return &V1DashboardPcgSearchSchemaGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1DashboardPcgSearchSchemaGetParamsWithTimeout creates a new V1DashboardPcgSearchSchemaGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1DashboardPcgSearchSchemaGetParamsWithTimeout(timeout time.Duration) *V1DashboardPcgSearchSchemaGetParams { + + return &V1DashboardPcgSearchSchemaGetParams{ + + timeout: timeout, + } +} + +// NewV1DashboardPcgSearchSchemaGetParamsWithContext creates a new V1DashboardPcgSearchSchemaGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1DashboardPcgSearchSchemaGetParamsWithContext(ctx context.Context) *V1DashboardPcgSearchSchemaGetParams { + + return &V1DashboardPcgSearchSchemaGetParams{ + + Context: ctx, + } +} + +// NewV1DashboardPcgSearchSchemaGetParamsWithHTTPClient creates a new V1DashboardPcgSearchSchemaGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1DashboardPcgSearchSchemaGetParamsWithHTTPClient(client *http.Client) *V1DashboardPcgSearchSchemaGetParams { + + return &V1DashboardPcgSearchSchemaGetParams{ + HTTPClient: client, + } +} + +/* +V1DashboardPcgSearchSchemaGetParams contains all the parameters to send to the API endpoint +for the v1 dashboard pcg search schema get operation typically these are written to a http.Request +*/ +type V1DashboardPcgSearchSchemaGetParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 dashboard pcg search schema get params +func (o *V1DashboardPcgSearchSchemaGetParams) WithTimeout(timeout time.Duration) *V1DashboardPcgSearchSchemaGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 dashboard pcg search schema get params +func (o *V1DashboardPcgSearchSchemaGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 dashboard pcg search schema get params +func (o *V1DashboardPcgSearchSchemaGetParams) WithContext(ctx context.Context) *V1DashboardPcgSearchSchemaGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 dashboard pcg search schema get params +func (o *V1DashboardPcgSearchSchemaGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 dashboard pcg search schema get params +func (o *V1DashboardPcgSearchSchemaGetParams) WithHTTPClient(client *http.Client) *V1DashboardPcgSearchSchemaGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 dashboard pcg search schema get params +func (o *V1DashboardPcgSearchSchemaGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *V1DashboardPcgSearchSchemaGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_dashboard_pcg_search_schema_get_responses.go b/api/client/v1/v1_dashboard_pcg_search_schema_get_responses.go new file mode 100644 index 00000000..071ee31f --- /dev/null +++ b/api/client/v1/v1_dashboard_pcg_search_schema_get_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1DashboardPcgSearchSchemaGetReader is a Reader for the V1DashboardPcgSearchSchemaGet structure. +type V1DashboardPcgSearchSchemaGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1DashboardPcgSearchSchemaGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1DashboardPcgSearchSchemaGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1DashboardPcgSearchSchemaGetOK creates a V1DashboardPcgSearchSchemaGetOK with default headers values +func NewV1DashboardPcgSearchSchemaGetOK() *V1DashboardPcgSearchSchemaGetOK { + return &V1DashboardPcgSearchSchemaGetOK{} +} + +/* +V1DashboardPcgSearchSchemaGetOK handles this case with default header values. + +An array of schema items +*/ +type V1DashboardPcgSearchSchemaGetOK struct { + Payload *models.V1SearchFilterSchemaSpec +} + +func (o *V1DashboardPcgSearchSchemaGetOK) Error() string { + return fmt.Sprintf("[GET /v1/dashboard/pcgs/search/schema][%d] v1DashboardPcgSearchSchemaGetOK %+v", 200, o.Payload) +} + +func (o *V1DashboardPcgSearchSchemaGetOK) GetPayload() *models.V1SearchFilterSchemaSpec { + return o.Payload +} + +func (o *V1DashboardPcgSearchSchemaGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1SearchFilterSchemaSpec) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_dashboard_pcgs_search_summary_parameters.go b/api/client/v1/v1_dashboard_pcgs_search_summary_parameters.go new file mode 100644 index 00000000..61ab505b --- /dev/null +++ b/api/client/v1/v1_dashboard_pcgs_search_summary_parameters.go @@ -0,0 +1,234 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1DashboardPcgsSearchSummaryParams creates a new V1DashboardPcgsSearchSummaryParams object +// with the default values initialized. +func NewV1DashboardPcgsSearchSummaryParams() *V1DashboardPcgsSearchSummaryParams { + var () + return &V1DashboardPcgsSearchSummaryParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1DashboardPcgsSearchSummaryParamsWithTimeout creates a new V1DashboardPcgsSearchSummaryParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1DashboardPcgsSearchSummaryParamsWithTimeout(timeout time.Duration) *V1DashboardPcgsSearchSummaryParams { + var () + return &V1DashboardPcgsSearchSummaryParams{ + + timeout: timeout, + } +} + +// NewV1DashboardPcgsSearchSummaryParamsWithContext creates a new V1DashboardPcgsSearchSummaryParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1DashboardPcgsSearchSummaryParamsWithContext(ctx context.Context) *V1DashboardPcgsSearchSummaryParams { + var () + return &V1DashboardPcgsSearchSummaryParams{ + + Context: ctx, + } +} + +// NewV1DashboardPcgsSearchSummaryParamsWithHTTPClient creates a new V1DashboardPcgsSearchSummaryParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1DashboardPcgsSearchSummaryParamsWithHTTPClient(client *http.Client) *V1DashboardPcgsSearchSummaryParams { + var () + return &V1DashboardPcgsSearchSummaryParams{ + HTTPClient: client, + } +} + +/* +V1DashboardPcgsSearchSummaryParams contains all the parameters to send to the API endpoint +for the v1 dashboard pcgs search summary operation typically these are written to a http.Request +*/ +type V1DashboardPcgsSearchSummaryParams struct { + + /*Body*/ + Body *models.V1SearchFilterSummarySpec + /*Continue + continue token to paginate the subsequent data items + + */ + Continue *string + /*Limit + limit is a maximum number of responses to return for a list call. Maximum value of the limit is 50. + If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. + + */ + Limit *int64 + /*Offset + offset is the next index number from which the response will start. The response offset value can be used along with continue token for the pagination. + + */ + Offset *int64 + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 dashboard pcgs search summary params +func (o *V1DashboardPcgsSearchSummaryParams) WithTimeout(timeout time.Duration) *V1DashboardPcgsSearchSummaryParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 dashboard pcgs search summary params +func (o *V1DashboardPcgsSearchSummaryParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 dashboard pcgs search summary params +func (o *V1DashboardPcgsSearchSummaryParams) WithContext(ctx context.Context) *V1DashboardPcgsSearchSummaryParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 dashboard pcgs search summary params +func (o *V1DashboardPcgsSearchSummaryParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 dashboard pcgs search summary params +func (o *V1DashboardPcgsSearchSummaryParams) WithHTTPClient(client *http.Client) *V1DashboardPcgsSearchSummaryParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 dashboard pcgs search summary params +func (o *V1DashboardPcgsSearchSummaryParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 dashboard pcgs search summary params +func (o *V1DashboardPcgsSearchSummaryParams) WithBody(body *models.V1SearchFilterSummarySpec) *V1DashboardPcgsSearchSummaryParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 dashboard pcgs search summary params +func (o *V1DashboardPcgsSearchSummaryParams) SetBody(body *models.V1SearchFilterSummarySpec) { + o.Body = body +} + +// WithContinue adds the continueVar to the v1 dashboard pcgs search summary params +func (o *V1DashboardPcgsSearchSummaryParams) WithContinue(continueVar *string) *V1DashboardPcgsSearchSummaryParams { + o.SetContinue(continueVar) + return o +} + +// SetContinue adds the continue to the v1 dashboard pcgs search summary params +func (o *V1DashboardPcgsSearchSummaryParams) SetContinue(continueVar *string) { + o.Continue = continueVar +} + +// WithLimit adds the limit to the v1 dashboard pcgs search summary params +func (o *V1DashboardPcgsSearchSummaryParams) WithLimit(limit *int64) *V1DashboardPcgsSearchSummaryParams { + o.SetLimit(limit) + return o +} + +// SetLimit adds the limit to the v1 dashboard pcgs search summary params +func (o *V1DashboardPcgsSearchSummaryParams) SetLimit(limit *int64) { + o.Limit = limit +} + +// WithOffset adds the offset to the v1 dashboard pcgs search summary params +func (o *V1DashboardPcgsSearchSummaryParams) WithOffset(offset *int64) *V1DashboardPcgsSearchSummaryParams { + o.SetOffset(offset) + return o +} + +// SetOffset adds the offset to the v1 dashboard pcgs search summary params +func (o *V1DashboardPcgsSearchSummaryParams) SetOffset(offset *int64) { + o.Offset = offset +} + +// WriteToRequest writes these params to a swagger request +func (o *V1DashboardPcgsSearchSummaryParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + if o.Continue != nil { + + // query param continue + var qrContinue string + if o.Continue != nil { + qrContinue = *o.Continue + } + qContinue := qrContinue + if qContinue != "" { + if err := r.SetQueryParam("continue", qContinue); err != nil { + return err + } + } + + } + + if o.Limit != nil { + + // query param limit + var qrLimit int64 + if o.Limit != nil { + qrLimit = *o.Limit + } + qLimit := swag.FormatInt64(qrLimit) + if qLimit != "" { + if err := r.SetQueryParam("limit", qLimit); err != nil { + return err + } + } + + } + + if o.Offset != nil { + + // query param offset + var qrOffset int64 + if o.Offset != nil { + qrOffset = *o.Offset + } + qOffset := swag.FormatInt64(qrOffset) + if qOffset != "" { + if err := r.SetQueryParam("offset", qOffset); err != nil { + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_dashboard_pcgs_search_summary_responses.go b/api/client/v1/v1_dashboard_pcgs_search_summary_responses.go new file mode 100644 index 00000000..91f8e184 --- /dev/null +++ b/api/client/v1/v1_dashboard_pcgs_search_summary_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1DashboardPcgsSearchSummaryReader is a Reader for the V1DashboardPcgsSearchSummary structure. +type V1DashboardPcgsSearchSummaryReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1DashboardPcgsSearchSummaryReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1DashboardPcgsSearchSummaryOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1DashboardPcgsSearchSummaryOK creates a V1DashboardPcgsSearchSummaryOK with default headers values +func NewV1DashboardPcgsSearchSummaryOK() *V1DashboardPcgsSearchSummaryOK { + return &V1DashboardPcgsSearchSummaryOK{} +} + +/* +V1DashboardPcgsSearchSummaryOK handles this case with default header values. + +An array of cluster summary items +*/ +type V1DashboardPcgsSearchSummaryOK struct { + Payload *models.V1PcgsSummary +} + +func (o *V1DashboardPcgsSearchSummaryOK) Error() string { + return fmt.Sprintf("[POST /v1/dashboard/pcgs/search][%d] v1DashboardPcgsSearchSummaryOK %+v", 200, o.Payload) +} + +func (o *V1DashboardPcgsSearchSummaryOK) GetPayload() *models.V1PcgsSummary { + return o.Payload +} + +func (o *V1DashboardPcgsSearchSummaryOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1PcgsSummary) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_dashboard_spectro_clusters_cost_summary_parameters.go b/api/client/v1/v1_dashboard_spectro_clusters_cost_summary_parameters.go new file mode 100644 index 00000000..26899752 --- /dev/null +++ b/api/client/v1/v1_dashboard_spectro_clusters_cost_summary_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1DashboardSpectroClustersCostSummaryParams creates a new V1DashboardSpectroClustersCostSummaryParams object +// with the default values initialized. +func NewV1DashboardSpectroClustersCostSummaryParams() *V1DashboardSpectroClustersCostSummaryParams { + var () + return &V1DashboardSpectroClustersCostSummaryParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1DashboardSpectroClustersCostSummaryParamsWithTimeout creates a new V1DashboardSpectroClustersCostSummaryParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1DashboardSpectroClustersCostSummaryParamsWithTimeout(timeout time.Duration) *V1DashboardSpectroClustersCostSummaryParams { + var () + return &V1DashboardSpectroClustersCostSummaryParams{ + + timeout: timeout, + } +} + +// NewV1DashboardSpectroClustersCostSummaryParamsWithContext creates a new V1DashboardSpectroClustersCostSummaryParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1DashboardSpectroClustersCostSummaryParamsWithContext(ctx context.Context) *V1DashboardSpectroClustersCostSummaryParams { + var () + return &V1DashboardSpectroClustersCostSummaryParams{ + + Context: ctx, + } +} + +// NewV1DashboardSpectroClustersCostSummaryParamsWithHTTPClient creates a new V1DashboardSpectroClustersCostSummaryParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1DashboardSpectroClustersCostSummaryParamsWithHTTPClient(client *http.Client) *V1DashboardSpectroClustersCostSummaryParams { + var () + return &V1DashboardSpectroClustersCostSummaryParams{ + HTTPClient: client, + } +} + +/* +V1DashboardSpectroClustersCostSummaryParams contains all the parameters to send to the API endpoint +for the v1 dashboard spectro clusters cost summary operation typically these are written to a http.Request +*/ +type V1DashboardSpectroClustersCostSummaryParams struct { + + /*Body*/ + Body *models.V1SpectroClusterCloudCostSummarySpec + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 dashboard spectro clusters cost summary params +func (o *V1DashboardSpectroClustersCostSummaryParams) WithTimeout(timeout time.Duration) *V1DashboardSpectroClustersCostSummaryParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 dashboard spectro clusters cost summary params +func (o *V1DashboardSpectroClustersCostSummaryParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 dashboard spectro clusters cost summary params +func (o *V1DashboardSpectroClustersCostSummaryParams) WithContext(ctx context.Context) *V1DashboardSpectroClustersCostSummaryParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 dashboard spectro clusters cost summary params +func (o *V1DashboardSpectroClustersCostSummaryParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 dashboard spectro clusters cost summary params +func (o *V1DashboardSpectroClustersCostSummaryParams) WithHTTPClient(client *http.Client) *V1DashboardSpectroClustersCostSummaryParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 dashboard spectro clusters cost summary params +func (o *V1DashboardSpectroClustersCostSummaryParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 dashboard spectro clusters cost summary params +func (o *V1DashboardSpectroClustersCostSummaryParams) WithBody(body *models.V1SpectroClusterCloudCostSummarySpec) *V1DashboardSpectroClustersCostSummaryParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 dashboard spectro clusters cost summary params +func (o *V1DashboardSpectroClustersCostSummaryParams) SetBody(body *models.V1SpectroClusterCloudCostSummarySpec) { + o.Body = body +} + +// WriteToRequest writes these params to a swagger request +func (o *V1DashboardSpectroClustersCostSummaryParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_dashboard_spectro_clusters_cost_summary_responses.go b/api/client/v1/v1_dashboard_spectro_clusters_cost_summary_responses.go new file mode 100644 index 00000000..d5e3e314 --- /dev/null +++ b/api/client/v1/v1_dashboard_spectro_clusters_cost_summary_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1DashboardSpectroClustersCostSummaryReader is a Reader for the V1DashboardSpectroClustersCostSummary structure. +type V1DashboardSpectroClustersCostSummaryReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1DashboardSpectroClustersCostSummaryReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1DashboardSpectroClustersCostSummaryOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1DashboardSpectroClustersCostSummaryOK creates a V1DashboardSpectroClustersCostSummaryOK with default headers values +func NewV1DashboardSpectroClustersCostSummaryOK() *V1DashboardSpectroClustersCostSummaryOK { + return &V1DashboardSpectroClustersCostSummaryOK{} +} + +/* +V1DashboardSpectroClustersCostSummaryOK handles this case with default header values. + +An array of resources cloud cost summary items +*/ +type V1DashboardSpectroClustersCostSummaryOK struct { + Payload *models.V1ResourcesCloudCostSummary +} + +func (o *V1DashboardSpectroClustersCostSummaryOK) Error() string { + return fmt.Sprintf("[POST /v1/dashboard/spectroclusters/cost][%d] v1DashboardSpectroClustersCostSummaryOK %+v", 200, o.Payload) +} + +func (o *V1DashboardSpectroClustersCostSummaryOK) GetPayload() *models.V1ResourcesCloudCostSummary { + return o.Payload +} + +func (o *V1DashboardSpectroClustersCostSummaryOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1ResourcesCloudCostSummary) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_dashboard_spectro_clusters_repave_list_parameters.go b/api/client/v1/v1_dashboard_spectro_clusters_repave_list_parameters.go new file mode 100644 index 00000000..d6297920 --- /dev/null +++ b/api/client/v1/v1_dashboard_spectro_clusters_repave_list_parameters.go @@ -0,0 +1,254 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// NewV1DashboardSpectroClustersRepaveListParams creates a new V1DashboardSpectroClustersRepaveListParams object +// with the default values initialized. +func NewV1DashboardSpectroClustersRepaveListParams() *V1DashboardSpectroClustersRepaveListParams { + var ( + repaveStateDefault = string("Pending") + ) + return &V1DashboardSpectroClustersRepaveListParams{ + RepaveState: &repaveStateDefault, + + timeout: cr.DefaultTimeout, + } +} + +// NewV1DashboardSpectroClustersRepaveListParamsWithTimeout creates a new V1DashboardSpectroClustersRepaveListParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1DashboardSpectroClustersRepaveListParamsWithTimeout(timeout time.Duration) *V1DashboardSpectroClustersRepaveListParams { + var ( + repaveStateDefault = string("Pending") + ) + return &V1DashboardSpectroClustersRepaveListParams{ + RepaveState: &repaveStateDefault, + + timeout: timeout, + } +} + +// NewV1DashboardSpectroClustersRepaveListParamsWithContext creates a new V1DashboardSpectroClustersRepaveListParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1DashboardSpectroClustersRepaveListParamsWithContext(ctx context.Context) *V1DashboardSpectroClustersRepaveListParams { + var ( + repaveStateDefault = string("Pending") + ) + return &V1DashboardSpectroClustersRepaveListParams{ + RepaveState: &repaveStateDefault, + + Context: ctx, + } +} + +// NewV1DashboardSpectroClustersRepaveListParamsWithHTTPClient creates a new V1DashboardSpectroClustersRepaveListParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1DashboardSpectroClustersRepaveListParamsWithHTTPClient(client *http.Client) *V1DashboardSpectroClustersRepaveListParams { + var ( + repaveStateDefault = string("Pending") + ) + return &V1DashboardSpectroClustersRepaveListParams{ + RepaveState: &repaveStateDefault, + HTTPClient: client, + } +} + +/* +V1DashboardSpectroClustersRepaveListParams contains all the parameters to send to the API endpoint +for the v1 dashboard spectro clusters repave list operation typically these are written to a http.Request +*/ +type V1DashboardSpectroClustersRepaveListParams struct { + + /*Continue + continue token to paginate the subsequent data items + + */ + Continue *string + /*Limit + limit is a maximum number of responses to return for a list call. Maximum value of the limit is 50. + If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. + + */ + Limit *int64 + /*Offset + offset is the next index number from which the response will start. The response offset value can be used along with continue token for the pagination. + + */ + Offset *int64 + /*RepaveState*/ + RepaveState *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 dashboard spectro clusters repave list params +func (o *V1DashboardSpectroClustersRepaveListParams) WithTimeout(timeout time.Duration) *V1DashboardSpectroClustersRepaveListParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 dashboard spectro clusters repave list params +func (o *V1DashboardSpectroClustersRepaveListParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 dashboard spectro clusters repave list params +func (o *V1DashboardSpectroClustersRepaveListParams) WithContext(ctx context.Context) *V1DashboardSpectroClustersRepaveListParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 dashboard spectro clusters repave list params +func (o *V1DashboardSpectroClustersRepaveListParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 dashboard spectro clusters repave list params +func (o *V1DashboardSpectroClustersRepaveListParams) WithHTTPClient(client *http.Client) *V1DashboardSpectroClustersRepaveListParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 dashboard spectro clusters repave list params +func (o *V1DashboardSpectroClustersRepaveListParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithContinue adds the continueVar to the v1 dashboard spectro clusters repave list params +func (o *V1DashboardSpectroClustersRepaveListParams) WithContinue(continueVar *string) *V1DashboardSpectroClustersRepaveListParams { + o.SetContinue(continueVar) + return o +} + +// SetContinue adds the continue to the v1 dashboard spectro clusters repave list params +func (o *V1DashboardSpectroClustersRepaveListParams) SetContinue(continueVar *string) { + o.Continue = continueVar +} + +// WithLimit adds the limit to the v1 dashboard spectro clusters repave list params +func (o *V1DashboardSpectroClustersRepaveListParams) WithLimit(limit *int64) *V1DashboardSpectroClustersRepaveListParams { + o.SetLimit(limit) + return o +} + +// SetLimit adds the limit to the v1 dashboard spectro clusters repave list params +func (o *V1DashboardSpectroClustersRepaveListParams) SetLimit(limit *int64) { + o.Limit = limit +} + +// WithOffset adds the offset to the v1 dashboard spectro clusters repave list params +func (o *V1DashboardSpectroClustersRepaveListParams) WithOffset(offset *int64) *V1DashboardSpectroClustersRepaveListParams { + o.SetOffset(offset) + return o +} + +// SetOffset adds the offset to the v1 dashboard spectro clusters repave list params +func (o *V1DashboardSpectroClustersRepaveListParams) SetOffset(offset *int64) { + o.Offset = offset +} + +// WithRepaveState adds the repaveState to the v1 dashboard spectro clusters repave list params +func (o *V1DashboardSpectroClustersRepaveListParams) WithRepaveState(repaveState *string) *V1DashboardSpectroClustersRepaveListParams { + o.SetRepaveState(repaveState) + return o +} + +// SetRepaveState adds the repaveState to the v1 dashboard spectro clusters repave list params +func (o *V1DashboardSpectroClustersRepaveListParams) SetRepaveState(repaveState *string) { + o.RepaveState = repaveState +} + +// WriteToRequest writes these params to a swagger request +func (o *V1DashboardSpectroClustersRepaveListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Continue != nil { + + // query param continue + var qrContinue string + if o.Continue != nil { + qrContinue = *o.Continue + } + qContinue := qrContinue + if qContinue != "" { + if err := r.SetQueryParam("continue", qContinue); err != nil { + return err + } + } + + } + + if o.Limit != nil { + + // query param limit + var qrLimit int64 + if o.Limit != nil { + qrLimit = *o.Limit + } + qLimit := swag.FormatInt64(qrLimit) + if qLimit != "" { + if err := r.SetQueryParam("limit", qLimit); err != nil { + return err + } + } + + } + + if o.Offset != nil { + + // query param offset + var qrOffset int64 + if o.Offset != nil { + qrOffset = *o.Offset + } + qOffset := swag.FormatInt64(qrOffset) + if qOffset != "" { + if err := r.SetQueryParam("offset", qOffset); err != nil { + return err + } + } + + } + + if o.RepaveState != nil { + + // query param repaveState + var qrRepaveState string + if o.RepaveState != nil { + qrRepaveState = *o.RepaveState + } + qRepaveState := qrRepaveState + if qRepaveState != "" { + if err := r.SetQueryParam("repaveState", qRepaveState); err != nil { + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_dashboard_spectro_clusters_repave_list_responses.go b/api/client/v1/v1_dashboard_spectro_clusters_repave_list_responses.go new file mode 100644 index 00000000..98c4c29b --- /dev/null +++ b/api/client/v1/v1_dashboard_spectro_clusters_repave_list_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1DashboardSpectroClustersRepaveListReader is a Reader for the V1DashboardSpectroClustersRepaveList structure. +type V1DashboardSpectroClustersRepaveListReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1DashboardSpectroClustersRepaveListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1DashboardSpectroClustersRepaveListOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1DashboardSpectroClustersRepaveListOK creates a V1DashboardSpectroClustersRepaveListOK with default headers values +func NewV1DashboardSpectroClustersRepaveListOK() *V1DashboardSpectroClustersRepaveListOK { + return &V1DashboardSpectroClustersRepaveListOK{} +} + +/* +V1DashboardSpectroClustersRepaveListOK handles this case with default header values. + +An array of cluster summary items +*/ +type V1DashboardSpectroClustersRepaveListOK struct { + Payload *models.V1SpectroClustersSummary +} + +func (o *V1DashboardSpectroClustersRepaveListOK) Error() string { + return fmt.Sprintf("[GET /v1/dashboard/spectroclusters/repaveStatus][%d] v1DashboardSpectroClustersRepaveListOK %+v", 200, o.Payload) +} + +func (o *V1DashboardSpectroClustersRepaveListOK) GetPayload() *models.V1SpectroClustersSummary { + return o.Payload +} + +func (o *V1DashboardSpectroClustersRepaveListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1SpectroClustersSummary) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_dashboard_spectro_clusters_search_input_parameters.go b/api/client/v1/v1_dashboard_spectro_clusters_search_input_parameters.go new file mode 100644 index 00000000..d19a07bf --- /dev/null +++ b/api/client/v1/v1_dashboard_spectro_clusters_search_input_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1DashboardSpectroClustersSearchInputParams creates a new V1DashboardSpectroClustersSearchInputParams object +// with the default values initialized. +func NewV1DashboardSpectroClustersSearchInputParams() *V1DashboardSpectroClustersSearchInputParams { + + return &V1DashboardSpectroClustersSearchInputParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1DashboardSpectroClustersSearchInputParamsWithTimeout creates a new V1DashboardSpectroClustersSearchInputParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1DashboardSpectroClustersSearchInputParamsWithTimeout(timeout time.Duration) *V1DashboardSpectroClustersSearchInputParams { + + return &V1DashboardSpectroClustersSearchInputParams{ + + timeout: timeout, + } +} + +// NewV1DashboardSpectroClustersSearchInputParamsWithContext creates a new V1DashboardSpectroClustersSearchInputParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1DashboardSpectroClustersSearchInputParamsWithContext(ctx context.Context) *V1DashboardSpectroClustersSearchInputParams { + + return &V1DashboardSpectroClustersSearchInputParams{ + + Context: ctx, + } +} + +// NewV1DashboardSpectroClustersSearchInputParamsWithHTTPClient creates a new V1DashboardSpectroClustersSearchInputParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1DashboardSpectroClustersSearchInputParamsWithHTTPClient(client *http.Client) *V1DashboardSpectroClustersSearchInputParams { + + return &V1DashboardSpectroClustersSearchInputParams{ + HTTPClient: client, + } +} + +/* +V1DashboardSpectroClustersSearchInputParams contains all the parameters to send to the API endpoint +for the v1 dashboard spectro clusters search input operation typically these are written to a http.Request +*/ +type V1DashboardSpectroClustersSearchInputParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 dashboard spectro clusters search input params +func (o *V1DashboardSpectroClustersSearchInputParams) WithTimeout(timeout time.Duration) *V1DashboardSpectroClustersSearchInputParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 dashboard spectro clusters search input params +func (o *V1DashboardSpectroClustersSearchInputParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 dashboard spectro clusters search input params +func (o *V1DashboardSpectroClustersSearchInputParams) WithContext(ctx context.Context) *V1DashboardSpectroClustersSearchInputParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 dashboard spectro clusters search input params +func (o *V1DashboardSpectroClustersSearchInputParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 dashboard spectro clusters search input params +func (o *V1DashboardSpectroClustersSearchInputParams) WithHTTPClient(client *http.Client) *V1DashboardSpectroClustersSearchInputParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 dashboard spectro clusters search input params +func (o *V1DashboardSpectroClustersSearchInputParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *V1DashboardSpectroClustersSearchInputParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_dashboard_spectro_clusters_search_input_responses.go b/api/client/v1/v1_dashboard_spectro_clusters_search_input_responses.go new file mode 100644 index 00000000..bf6b7672 --- /dev/null +++ b/api/client/v1/v1_dashboard_spectro_clusters_search_input_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1DashboardSpectroClustersSearchInputReader is a Reader for the V1DashboardSpectroClustersSearchInput structure. +type V1DashboardSpectroClustersSearchInputReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1DashboardSpectroClustersSearchInputReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1DashboardSpectroClustersSearchInputOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1DashboardSpectroClustersSearchInputOK creates a V1DashboardSpectroClustersSearchInputOK with default headers values +func NewV1DashboardSpectroClustersSearchInputOK() *V1DashboardSpectroClustersSearchInputOK { + return &V1DashboardSpectroClustersSearchInputOK{} +} + +/* +V1DashboardSpectroClustersSearchInputOK handles this case with default header values. + +An array of cluster search filter input items +*/ +type V1DashboardSpectroClustersSearchInputOK struct { + Payload *models.V1ClusterSearchInputSpec +} + +func (o *V1DashboardSpectroClustersSearchInputOK) Error() string { + return fmt.Sprintf("[GET /v1/dashboard/spectroclusters/search/input][%d] v1DashboardSpectroClustersSearchInputOK %+v", 200, o.Payload) +} + +func (o *V1DashboardSpectroClustersSearchInputOK) GetPayload() *models.V1ClusterSearchInputSpec { + return o.Payload +} + +func (o *V1DashboardSpectroClustersSearchInputOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1ClusterSearchInputSpec) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_dashboard_spectro_clusters_uid_workloads_cluster_role_binding_parameters.go b/api/client/v1/v1_dashboard_spectro_clusters_uid_workloads_cluster_role_binding_parameters.go new file mode 100644 index 00000000..9eaabb2a --- /dev/null +++ b/api/client/v1/v1_dashboard_spectro_clusters_uid_workloads_cluster_role_binding_parameters.go @@ -0,0 +1,154 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1DashboardSpectroClustersUIDWorkloadsClusterRoleBindingParams creates a new V1DashboardSpectroClustersUIDWorkloadsClusterRoleBindingParams object +// with the default values initialized. +func NewV1DashboardSpectroClustersUIDWorkloadsClusterRoleBindingParams() *V1DashboardSpectroClustersUIDWorkloadsClusterRoleBindingParams { + var () + return &V1DashboardSpectroClustersUIDWorkloadsClusterRoleBindingParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1DashboardSpectroClustersUIDWorkloadsClusterRoleBindingParamsWithTimeout creates a new V1DashboardSpectroClustersUIDWorkloadsClusterRoleBindingParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1DashboardSpectroClustersUIDWorkloadsClusterRoleBindingParamsWithTimeout(timeout time.Duration) *V1DashboardSpectroClustersUIDWorkloadsClusterRoleBindingParams { + var () + return &V1DashboardSpectroClustersUIDWorkloadsClusterRoleBindingParams{ + + timeout: timeout, + } +} + +// NewV1DashboardSpectroClustersUIDWorkloadsClusterRoleBindingParamsWithContext creates a new V1DashboardSpectroClustersUIDWorkloadsClusterRoleBindingParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1DashboardSpectroClustersUIDWorkloadsClusterRoleBindingParamsWithContext(ctx context.Context) *V1DashboardSpectroClustersUIDWorkloadsClusterRoleBindingParams { + var () + return &V1DashboardSpectroClustersUIDWorkloadsClusterRoleBindingParams{ + + Context: ctx, + } +} + +// NewV1DashboardSpectroClustersUIDWorkloadsClusterRoleBindingParamsWithHTTPClient creates a new V1DashboardSpectroClustersUIDWorkloadsClusterRoleBindingParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1DashboardSpectroClustersUIDWorkloadsClusterRoleBindingParamsWithHTTPClient(client *http.Client) *V1DashboardSpectroClustersUIDWorkloadsClusterRoleBindingParams { + var () + return &V1DashboardSpectroClustersUIDWorkloadsClusterRoleBindingParams{ + HTTPClient: client, + } +} + +/* +V1DashboardSpectroClustersUIDWorkloadsClusterRoleBindingParams contains all the parameters to send to the API endpoint +for the v1 dashboard spectro clusters Uid workloads cluster role binding operation typically these are written to a http.Request +*/ +type V1DashboardSpectroClustersUIDWorkloadsClusterRoleBindingParams struct { + + /*Body*/ + Body *models.V1ClusterWorkloadsSpec + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 dashboard spectro clusters Uid workloads cluster role binding params +func (o *V1DashboardSpectroClustersUIDWorkloadsClusterRoleBindingParams) WithTimeout(timeout time.Duration) *V1DashboardSpectroClustersUIDWorkloadsClusterRoleBindingParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 dashboard spectro clusters Uid workloads cluster role binding params +func (o *V1DashboardSpectroClustersUIDWorkloadsClusterRoleBindingParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 dashboard spectro clusters Uid workloads cluster role binding params +func (o *V1DashboardSpectroClustersUIDWorkloadsClusterRoleBindingParams) WithContext(ctx context.Context) *V1DashboardSpectroClustersUIDWorkloadsClusterRoleBindingParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 dashboard spectro clusters Uid workloads cluster role binding params +func (o *V1DashboardSpectroClustersUIDWorkloadsClusterRoleBindingParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 dashboard spectro clusters Uid workloads cluster role binding params +func (o *V1DashboardSpectroClustersUIDWorkloadsClusterRoleBindingParams) WithHTTPClient(client *http.Client) *V1DashboardSpectroClustersUIDWorkloadsClusterRoleBindingParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 dashboard spectro clusters Uid workloads cluster role binding params +func (o *V1DashboardSpectroClustersUIDWorkloadsClusterRoleBindingParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 dashboard spectro clusters Uid workloads cluster role binding params +func (o *V1DashboardSpectroClustersUIDWorkloadsClusterRoleBindingParams) WithBody(body *models.V1ClusterWorkloadsSpec) *V1DashboardSpectroClustersUIDWorkloadsClusterRoleBindingParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 dashboard spectro clusters Uid workloads cluster role binding params +func (o *V1DashboardSpectroClustersUIDWorkloadsClusterRoleBindingParams) SetBody(body *models.V1ClusterWorkloadsSpec) { + o.Body = body +} + +// WithUID adds the uid to the v1 dashboard spectro clusters Uid workloads cluster role binding params +func (o *V1DashboardSpectroClustersUIDWorkloadsClusterRoleBindingParams) WithUID(uid string) *V1DashboardSpectroClustersUIDWorkloadsClusterRoleBindingParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 dashboard spectro clusters Uid workloads cluster role binding params +func (o *V1DashboardSpectroClustersUIDWorkloadsClusterRoleBindingParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1DashboardSpectroClustersUIDWorkloadsClusterRoleBindingParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_dashboard_spectro_clusters_uid_workloads_cluster_role_binding_responses.go b/api/client/v1/v1_dashboard_spectro_clusters_uid_workloads_cluster_role_binding_responses.go new file mode 100644 index 00000000..74ca7e5c --- /dev/null +++ b/api/client/v1/v1_dashboard_spectro_clusters_uid_workloads_cluster_role_binding_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1DashboardSpectroClustersUIDWorkloadsClusterRoleBindingReader is a Reader for the V1DashboardSpectroClustersUIDWorkloadsClusterRoleBinding structure. +type V1DashboardSpectroClustersUIDWorkloadsClusterRoleBindingReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1DashboardSpectroClustersUIDWorkloadsClusterRoleBindingReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1DashboardSpectroClustersUIDWorkloadsClusterRoleBindingOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1DashboardSpectroClustersUIDWorkloadsClusterRoleBindingOK creates a V1DashboardSpectroClustersUIDWorkloadsClusterRoleBindingOK with default headers values +func NewV1DashboardSpectroClustersUIDWorkloadsClusterRoleBindingOK() *V1DashboardSpectroClustersUIDWorkloadsClusterRoleBindingOK { + return &V1DashboardSpectroClustersUIDWorkloadsClusterRoleBindingOK{} +} + +/* +V1DashboardSpectroClustersUIDWorkloadsClusterRoleBindingOK handles this case with default header values. + +An array of cluster workload clusterrolebindings +*/ +type V1DashboardSpectroClustersUIDWorkloadsClusterRoleBindingOK struct { + Payload *models.V1ClusterWorkloadRoleBindings +} + +func (o *V1DashboardSpectroClustersUIDWorkloadsClusterRoleBindingOK) Error() string { + return fmt.Sprintf("[POST /v1/dashboard/spectroclusters/{uid}/workloads/clusterrolebinding][%d] v1DashboardSpectroClustersUidWorkloadsClusterRoleBindingOK %+v", 200, o.Payload) +} + +func (o *V1DashboardSpectroClustersUIDWorkloadsClusterRoleBindingOK) GetPayload() *models.V1ClusterWorkloadRoleBindings { + return o.Payload +} + +func (o *V1DashboardSpectroClustersUIDWorkloadsClusterRoleBindingOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1ClusterWorkloadRoleBindings) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_dashboard_spectro_clusters_uid_workloads_cron_job_parameters.go b/api/client/v1/v1_dashboard_spectro_clusters_uid_workloads_cron_job_parameters.go new file mode 100644 index 00000000..e9d6316a --- /dev/null +++ b/api/client/v1/v1_dashboard_spectro_clusters_uid_workloads_cron_job_parameters.go @@ -0,0 +1,154 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1DashboardSpectroClustersUIDWorkloadsCronJobParams creates a new V1DashboardSpectroClustersUIDWorkloadsCronJobParams object +// with the default values initialized. +func NewV1DashboardSpectroClustersUIDWorkloadsCronJobParams() *V1DashboardSpectroClustersUIDWorkloadsCronJobParams { + var () + return &V1DashboardSpectroClustersUIDWorkloadsCronJobParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1DashboardSpectroClustersUIDWorkloadsCronJobParamsWithTimeout creates a new V1DashboardSpectroClustersUIDWorkloadsCronJobParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1DashboardSpectroClustersUIDWorkloadsCronJobParamsWithTimeout(timeout time.Duration) *V1DashboardSpectroClustersUIDWorkloadsCronJobParams { + var () + return &V1DashboardSpectroClustersUIDWorkloadsCronJobParams{ + + timeout: timeout, + } +} + +// NewV1DashboardSpectroClustersUIDWorkloadsCronJobParamsWithContext creates a new V1DashboardSpectroClustersUIDWorkloadsCronJobParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1DashboardSpectroClustersUIDWorkloadsCronJobParamsWithContext(ctx context.Context) *V1DashboardSpectroClustersUIDWorkloadsCronJobParams { + var () + return &V1DashboardSpectroClustersUIDWorkloadsCronJobParams{ + + Context: ctx, + } +} + +// NewV1DashboardSpectroClustersUIDWorkloadsCronJobParamsWithHTTPClient creates a new V1DashboardSpectroClustersUIDWorkloadsCronJobParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1DashboardSpectroClustersUIDWorkloadsCronJobParamsWithHTTPClient(client *http.Client) *V1DashboardSpectroClustersUIDWorkloadsCronJobParams { + var () + return &V1DashboardSpectroClustersUIDWorkloadsCronJobParams{ + HTTPClient: client, + } +} + +/* +V1DashboardSpectroClustersUIDWorkloadsCronJobParams contains all the parameters to send to the API endpoint +for the v1 dashboard spectro clusters Uid workloads cron job operation typically these are written to a http.Request +*/ +type V1DashboardSpectroClustersUIDWorkloadsCronJobParams struct { + + /*Body*/ + Body *models.V1ClusterWorkloadsSpec + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 dashboard spectro clusters Uid workloads cron job params +func (o *V1DashboardSpectroClustersUIDWorkloadsCronJobParams) WithTimeout(timeout time.Duration) *V1DashboardSpectroClustersUIDWorkloadsCronJobParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 dashboard spectro clusters Uid workloads cron job params +func (o *V1DashboardSpectroClustersUIDWorkloadsCronJobParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 dashboard spectro clusters Uid workloads cron job params +func (o *V1DashboardSpectroClustersUIDWorkloadsCronJobParams) WithContext(ctx context.Context) *V1DashboardSpectroClustersUIDWorkloadsCronJobParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 dashboard spectro clusters Uid workloads cron job params +func (o *V1DashboardSpectroClustersUIDWorkloadsCronJobParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 dashboard spectro clusters Uid workloads cron job params +func (o *V1DashboardSpectroClustersUIDWorkloadsCronJobParams) WithHTTPClient(client *http.Client) *V1DashboardSpectroClustersUIDWorkloadsCronJobParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 dashboard spectro clusters Uid workloads cron job params +func (o *V1DashboardSpectroClustersUIDWorkloadsCronJobParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 dashboard spectro clusters Uid workloads cron job params +func (o *V1DashboardSpectroClustersUIDWorkloadsCronJobParams) WithBody(body *models.V1ClusterWorkloadsSpec) *V1DashboardSpectroClustersUIDWorkloadsCronJobParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 dashboard spectro clusters Uid workloads cron job params +func (o *V1DashboardSpectroClustersUIDWorkloadsCronJobParams) SetBody(body *models.V1ClusterWorkloadsSpec) { + o.Body = body +} + +// WithUID adds the uid to the v1 dashboard spectro clusters Uid workloads cron job params +func (o *V1DashboardSpectroClustersUIDWorkloadsCronJobParams) WithUID(uid string) *V1DashboardSpectroClustersUIDWorkloadsCronJobParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 dashboard spectro clusters Uid workloads cron job params +func (o *V1DashboardSpectroClustersUIDWorkloadsCronJobParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1DashboardSpectroClustersUIDWorkloadsCronJobParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_dashboard_spectro_clusters_uid_workloads_cron_job_responses.go b/api/client/v1/v1_dashboard_spectro_clusters_uid_workloads_cron_job_responses.go new file mode 100644 index 00000000..79da1717 --- /dev/null +++ b/api/client/v1/v1_dashboard_spectro_clusters_uid_workloads_cron_job_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1DashboardSpectroClustersUIDWorkloadsCronJobReader is a Reader for the V1DashboardSpectroClustersUIDWorkloadsCronJob structure. +type V1DashboardSpectroClustersUIDWorkloadsCronJobReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1DashboardSpectroClustersUIDWorkloadsCronJobReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1DashboardSpectroClustersUIDWorkloadsCronJobOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1DashboardSpectroClustersUIDWorkloadsCronJobOK creates a V1DashboardSpectroClustersUIDWorkloadsCronJobOK with default headers values +func NewV1DashboardSpectroClustersUIDWorkloadsCronJobOK() *V1DashboardSpectroClustersUIDWorkloadsCronJobOK { + return &V1DashboardSpectroClustersUIDWorkloadsCronJobOK{} +} + +/* +V1DashboardSpectroClustersUIDWorkloadsCronJobOK handles this case with default header values. + +An array of cluster workload cronjobs +*/ +type V1DashboardSpectroClustersUIDWorkloadsCronJobOK struct { + Payload *models.V1ClusterWorkloadCronJobs +} + +func (o *V1DashboardSpectroClustersUIDWorkloadsCronJobOK) Error() string { + return fmt.Sprintf("[POST /v1/dashboard/spectroclusters/{uid}/workloads/cronjob][%d] v1DashboardSpectroClustersUidWorkloadsCronJobOK %+v", 200, o.Payload) +} + +func (o *V1DashboardSpectroClustersUIDWorkloadsCronJobOK) GetPayload() *models.V1ClusterWorkloadCronJobs { + return o.Payload +} + +func (o *V1DashboardSpectroClustersUIDWorkloadsCronJobOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1ClusterWorkloadCronJobs) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_dashboard_spectro_clusters_uid_workloads_daemon_set_parameters.go b/api/client/v1/v1_dashboard_spectro_clusters_uid_workloads_daemon_set_parameters.go new file mode 100644 index 00000000..5b6ab7c5 --- /dev/null +++ b/api/client/v1/v1_dashboard_spectro_clusters_uid_workloads_daemon_set_parameters.go @@ -0,0 +1,154 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1DashboardSpectroClustersUIDWorkloadsDaemonSetParams creates a new V1DashboardSpectroClustersUIDWorkloadsDaemonSetParams object +// with the default values initialized. +func NewV1DashboardSpectroClustersUIDWorkloadsDaemonSetParams() *V1DashboardSpectroClustersUIDWorkloadsDaemonSetParams { + var () + return &V1DashboardSpectroClustersUIDWorkloadsDaemonSetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1DashboardSpectroClustersUIDWorkloadsDaemonSetParamsWithTimeout creates a new V1DashboardSpectroClustersUIDWorkloadsDaemonSetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1DashboardSpectroClustersUIDWorkloadsDaemonSetParamsWithTimeout(timeout time.Duration) *V1DashboardSpectroClustersUIDWorkloadsDaemonSetParams { + var () + return &V1DashboardSpectroClustersUIDWorkloadsDaemonSetParams{ + + timeout: timeout, + } +} + +// NewV1DashboardSpectroClustersUIDWorkloadsDaemonSetParamsWithContext creates a new V1DashboardSpectroClustersUIDWorkloadsDaemonSetParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1DashboardSpectroClustersUIDWorkloadsDaemonSetParamsWithContext(ctx context.Context) *V1DashboardSpectroClustersUIDWorkloadsDaemonSetParams { + var () + return &V1DashboardSpectroClustersUIDWorkloadsDaemonSetParams{ + + Context: ctx, + } +} + +// NewV1DashboardSpectroClustersUIDWorkloadsDaemonSetParamsWithHTTPClient creates a new V1DashboardSpectroClustersUIDWorkloadsDaemonSetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1DashboardSpectroClustersUIDWorkloadsDaemonSetParamsWithHTTPClient(client *http.Client) *V1DashboardSpectroClustersUIDWorkloadsDaemonSetParams { + var () + return &V1DashboardSpectroClustersUIDWorkloadsDaemonSetParams{ + HTTPClient: client, + } +} + +/* +V1DashboardSpectroClustersUIDWorkloadsDaemonSetParams contains all the parameters to send to the API endpoint +for the v1 dashboard spectro clusters Uid workloads daemon set operation typically these are written to a http.Request +*/ +type V1DashboardSpectroClustersUIDWorkloadsDaemonSetParams struct { + + /*Body*/ + Body *models.V1ClusterWorkloadsSpec + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 dashboard spectro clusters Uid workloads daemon set params +func (o *V1DashboardSpectroClustersUIDWorkloadsDaemonSetParams) WithTimeout(timeout time.Duration) *V1DashboardSpectroClustersUIDWorkloadsDaemonSetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 dashboard spectro clusters Uid workloads daemon set params +func (o *V1DashboardSpectroClustersUIDWorkloadsDaemonSetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 dashboard spectro clusters Uid workloads daemon set params +func (o *V1DashboardSpectroClustersUIDWorkloadsDaemonSetParams) WithContext(ctx context.Context) *V1DashboardSpectroClustersUIDWorkloadsDaemonSetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 dashboard spectro clusters Uid workloads daemon set params +func (o *V1DashboardSpectroClustersUIDWorkloadsDaemonSetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 dashboard spectro clusters Uid workloads daemon set params +func (o *V1DashboardSpectroClustersUIDWorkloadsDaemonSetParams) WithHTTPClient(client *http.Client) *V1DashboardSpectroClustersUIDWorkloadsDaemonSetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 dashboard spectro clusters Uid workloads daemon set params +func (o *V1DashboardSpectroClustersUIDWorkloadsDaemonSetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 dashboard spectro clusters Uid workloads daemon set params +func (o *V1DashboardSpectroClustersUIDWorkloadsDaemonSetParams) WithBody(body *models.V1ClusterWorkloadsSpec) *V1DashboardSpectroClustersUIDWorkloadsDaemonSetParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 dashboard spectro clusters Uid workloads daemon set params +func (o *V1DashboardSpectroClustersUIDWorkloadsDaemonSetParams) SetBody(body *models.V1ClusterWorkloadsSpec) { + o.Body = body +} + +// WithUID adds the uid to the v1 dashboard spectro clusters Uid workloads daemon set params +func (o *V1DashboardSpectroClustersUIDWorkloadsDaemonSetParams) WithUID(uid string) *V1DashboardSpectroClustersUIDWorkloadsDaemonSetParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 dashboard spectro clusters Uid workloads daemon set params +func (o *V1DashboardSpectroClustersUIDWorkloadsDaemonSetParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1DashboardSpectroClustersUIDWorkloadsDaemonSetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_dashboard_spectro_clusters_uid_workloads_daemon_set_responses.go b/api/client/v1/v1_dashboard_spectro_clusters_uid_workloads_daemon_set_responses.go new file mode 100644 index 00000000..df8f7b85 --- /dev/null +++ b/api/client/v1/v1_dashboard_spectro_clusters_uid_workloads_daemon_set_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1DashboardSpectroClustersUIDWorkloadsDaemonSetReader is a Reader for the V1DashboardSpectroClustersUIDWorkloadsDaemonSet structure. +type V1DashboardSpectroClustersUIDWorkloadsDaemonSetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1DashboardSpectroClustersUIDWorkloadsDaemonSetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1DashboardSpectroClustersUIDWorkloadsDaemonSetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1DashboardSpectroClustersUIDWorkloadsDaemonSetOK creates a V1DashboardSpectroClustersUIDWorkloadsDaemonSetOK with default headers values +func NewV1DashboardSpectroClustersUIDWorkloadsDaemonSetOK() *V1DashboardSpectroClustersUIDWorkloadsDaemonSetOK { + return &V1DashboardSpectroClustersUIDWorkloadsDaemonSetOK{} +} + +/* +V1DashboardSpectroClustersUIDWorkloadsDaemonSetOK handles this case with default header values. + +An array of cluster workload daemonsets +*/ +type V1DashboardSpectroClustersUIDWorkloadsDaemonSetOK struct { + Payload *models.V1ClusterWorkloadDaemonSets +} + +func (o *V1DashboardSpectroClustersUIDWorkloadsDaemonSetOK) Error() string { + return fmt.Sprintf("[POST /v1/dashboard/spectroclusters/{uid}/workloads/daemonset][%d] v1DashboardSpectroClustersUidWorkloadsDaemonSetOK %+v", 200, o.Payload) +} + +func (o *V1DashboardSpectroClustersUIDWorkloadsDaemonSetOK) GetPayload() *models.V1ClusterWorkloadDaemonSets { + return o.Payload +} + +func (o *V1DashboardSpectroClustersUIDWorkloadsDaemonSetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1ClusterWorkloadDaemonSets) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_dashboard_spectro_clusters_uid_workloads_deployment_parameters.go b/api/client/v1/v1_dashboard_spectro_clusters_uid_workloads_deployment_parameters.go new file mode 100644 index 00000000..8c2cc4cf --- /dev/null +++ b/api/client/v1/v1_dashboard_spectro_clusters_uid_workloads_deployment_parameters.go @@ -0,0 +1,154 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1DashboardSpectroClustersUIDWorkloadsDeploymentParams creates a new V1DashboardSpectroClustersUIDWorkloadsDeploymentParams object +// with the default values initialized. +func NewV1DashboardSpectroClustersUIDWorkloadsDeploymentParams() *V1DashboardSpectroClustersUIDWorkloadsDeploymentParams { + var () + return &V1DashboardSpectroClustersUIDWorkloadsDeploymentParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1DashboardSpectroClustersUIDWorkloadsDeploymentParamsWithTimeout creates a new V1DashboardSpectroClustersUIDWorkloadsDeploymentParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1DashboardSpectroClustersUIDWorkloadsDeploymentParamsWithTimeout(timeout time.Duration) *V1DashboardSpectroClustersUIDWorkloadsDeploymentParams { + var () + return &V1DashboardSpectroClustersUIDWorkloadsDeploymentParams{ + + timeout: timeout, + } +} + +// NewV1DashboardSpectroClustersUIDWorkloadsDeploymentParamsWithContext creates a new V1DashboardSpectroClustersUIDWorkloadsDeploymentParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1DashboardSpectroClustersUIDWorkloadsDeploymentParamsWithContext(ctx context.Context) *V1DashboardSpectroClustersUIDWorkloadsDeploymentParams { + var () + return &V1DashboardSpectroClustersUIDWorkloadsDeploymentParams{ + + Context: ctx, + } +} + +// NewV1DashboardSpectroClustersUIDWorkloadsDeploymentParamsWithHTTPClient creates a new V1DashboardSpectroClustersUIDWorkloadsDeploymentParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1DashboardSpectroClustersUIDWorkloadsDeploymentParamsWithHTTPClient(client *http.Client) *V1DashboardSpectroClustersUIDWorkloadsDeploymentParams { + var () + return &V1DashboardSpectroClustersUIDWorkloadsDeploymentParams{ + HTTPClient: client, + } +} + +/* +V1DashboardSpectroClustersUIDWorkloadsDeploymentParams contains all the parameters to send to the API endpoint +for the v1 dashboard spectro clusters Uid workloads deployment operation typically these are written to a http.Request +*/ +type V1DashboardSpectroClustersUIDWorkloadsDeploymentParams struct { + + /*Body*/ + Body *models.V1ClusterWorkloadsSpec + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 dashboard spectro clusters Uid workloads deployment params +func (o *V1DashboardSpectroClustersUIDWorkloadsDeploymentParams) WithTimeout(timeout time.Duration) *V1DashboardSpectroClustersUIDWorkloadsDeploymentParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 dashboard spectro clusters Uid workloads deployment params +func (o *V1DashboardSpectroClustersUIDWorkloadsDeploymentParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 dashboard spectro clusters Uid workloads deployment params +func (o *V1DashboardSpectroClustersUIDWorkloadsDeploymentParams) WithContext(ctx context.Context) *V1DashboardSpectroClustersUIDWorkloadsDeploymentParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 dashboard spectro clusters Uid workloads deployment params +func (o *V1DashboardSpectroClustersUIDWorkloadsDeploymentParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 dashboard spectro clusters Uid workloads deployment params +func (o *V1DashboardSpectroClustersUIDWorkloadsDeploymentParams) WithHTTPClient(client *http.Client) *V1DashboardSpectroClustersUIDWorkloadsDeploymentParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 dashboard spectro clusters Uid workloads deployment params +func (o *V1DashboardSpectroClustersUIDWorkloadsDeploymentParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 dashboard spectro clusters Uid workloads deployment params +func (o *V1DashboardSpectroClustersUIDWorkloadsDeploymentParams) WithBody(body *models.V1ClusterWorkloadsSpec) *V1DashboardSpectroClustersUIDWorkloadsDeploymentParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 dashboard spectro clusters Uid workloads deployment params +func (o *V1DashboardSpectroClustersUIDWorkloadsDeploymentParams) SetBody(body *models.V1ClusterWorkloadsSpec) { + o.Body = body +} + +// WithUID adds the uid to the v1 dashboard spectro clusters Uid workloads deployment params +func (o *V1DashboardSpectroClustersUIDWorkloadsDeploymentParams) WithUID(uid string) *V1DashboardSpectroClustersUIDWorkloadsDeploymentParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 dashboard spectro clusters Uid workloads deployment params +func (o *V1DashboardSpectroClustersUIDWorkloadsDeploymentParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1DashboardSpectroClustersUIDWorkloadsDeploymentParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_dashboard_spectro_clusters_uid_workloads_deployment_responses.go b/api/client/v1/v1_dashboard_spectro_clusters_uid_workloads_deployment_responses.go new file mode 100644 index 00000000..c9a75f5a --- /dev/null +++ b/api/client/v1/v1_dashboard_spectro_clusters_uid_workloads_deployment_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1DashboardSpectroClustersUIDWorkloadsDeploymentReader is a Reader for the V1DashboardSpectroClustersUIDWorkloadsDeployment structure. +type V1DashboardSpectroClustersUIDWorkloadsDeploymentReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1DashboardSpectroClustersUIDWorkloadsDeploymentReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1DashboardSpectroClustersUIDWorkloadsDeploymentOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1DashboardSpectroClustersUIDWorkloadsDeploymentOK creates a V1DashboardSpectroClustersUIDWorkloadsDeploymentOK with default headers values +func NewV1DashboardSpectroClustersUIDWorkloadsDeploymentOK() *V1DashboardSpectroClustersUIDWorkloadsDeploymentOK { + return &V1DashboardSpectroClustersUIDWorkloadsDeploymentOK{} +} + +/* +V1DashboardSpectroClustersUIDWorkloadsDeploymentOK handles this case with default header values. + +An array of cluster workload deployments +*/ +type V1DashboardSpectroClustersUIDWorkloadsDeploymentOK struct { + Payload *models.V1ClusterWorkloadDeployments +} + +func (o *V1DashboardSpectroClustersUIDWorkloadsDeploymentOK) Error() string { + return fmt.Sprintf("[POST /v1/dashboard/spectroclusters/{uid}/workloads/deployment][%d] v1DashboardSpectroClustersUidWorkloadsDeploymentOK %+v", 200, o.Payload) +} + +func (o *V1DashboardSpectroClustersUIDWorkloadsDeploymentOK) GetPayload() *models.V1ClusterWorkloadDeployments { + return o.Payload +} + +func (o *V1DashboardSpectroClustersUIDWorkloadsDeploymentOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1ClusterWorkloadDeployments) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_dashboard_spectro_clusters_uid_workloads_job_parameters.go b/api/client/v1/v1_dashboard_spectro_clusters_uid_workloads_job_parameters.go new file mode 100644 index 00000000..f4fd180c --- /dev/null +++ b/api/client/v1/v1_dashboard_spectro_clusters_uid_workloads_job_parameters.go @@ -0,0 +1,154 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1DashboardSpectroClustersUIDWorkloadsJobParams creates a new V1DashboardSpectroClustersUIDWorkloadsJobParams object +// with the default values initialized. +func NewV1DashboardSpectroClustersUIDWorkloadsJobParams() *V1DashboardSpectroClustersUIDWorkloadsJobParams { + var () + return &V1DashboardSpectroClustersUIDWorkloadsJobParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1DashboardSpectroClustersUIDWorkloadsJobParamsWithTimeout creates a new V1DashboardSpectroClustersUIDWorkloadsJobParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1DashboardSpectroClustersUIDWorkloadsJobParamsWithTimeout(timeout time.Duration) *V1DashboardSpectroClustersUIDWorkloadsJobParams { + var () + return &V1DashboardSpectroClustersUIDWorkloadsJobParams{ + + timeout: timeout, + } +} + +// NewV1DashboardSpectroClustersUIDWorkloadsJobParamsWithContext creates a new V1DashboardSpectroClustersUIDWorkloadsJobParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1DashboardSpectroClustersUIDWorkloadsJobParamsWithContext(ctx context.Context) *V1DashboardSpectroClustersUIDWorkloadsJobParams { + var () + return &V1DashboardSpectroClustersUIDWorkloadsJobParams{ + + Context: ctx, + } +} + +// NewV1DashboardSpectroClustersUIDWorkloadsJobParamsWithHTTPClient creates a new V1DashboardSpectroClustersUIDWorkloadsJobParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1DashboardSpectroClustersUIDWorkloadsJobParamsWithHTTPClient(client *http.Client) *V1DashboardSpectroClustersUIDWorkloadsJobParams { + var () + return &V1DashboardSpectroClustersUIDWorkloadsJobParams{ + HTTPClient: client, + } +} + +/* +V1DashboardSpectroClustersUIDWorkloadsJobParams contains all the parameters to send to the API endpoint +for the v1 dashboard spectro clusters Uid workloads job operation typically these are written to a http.Request +*/ +type V1DashboardSpectroClustersUIDWorkloadsJobParams struct { + + /*Body*/ + Body *models.V1ClusterWorkloadsSpec + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 dashboard spectro clusters Uid workloads job params +func (o *V1DashboardSpectroClustersUIDWorkloadsJobParams) WithTimeout(timeout time.Duration) *V1DashboardSpectroClustersUIDWorkloadsJobParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 dashboard spectro clusters Uid workloads job params +func (o *V1DashboardSpectroClustersUIDWorkloadsJobParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 dashboard spectro clusters Uid workloads job params +func (o *V1DashboardSpectroClustersUIDWorkloadsJobParams) WithContext(ctx context.Context) *V1DashboardSpectroClustersUIDWorkloadsJobParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 dashboard spectro clusters Uid workloads job params +func (o *V1DashboardSpectroClustersUIDWorkloadsJobParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 dashboard spectro clusters Uid workloads job params +func (o *V1DashboardSpectroClustersUIDWorkloadsJobParams) WithHTTPClient(client *http.Client) *V1DashboardSpectroClustersUIDWorkloadsJobParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 dashboard spectro clusters Uid workloads job params +func (o *V1DashboardSpectroClustersUIDWorkloadsJobParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 dashboard spectro clusters Uid workloads job params +func (o *V1DashboardSpectroClustersUIDWorkloadsJobParams) WithBody(body *models.V1ClusterWorkloadsSpec) *V1DashboardSpectroClustersUIDWorkloadsJobParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 dashboard spectro clusters Uid workloads job params +func (o *V1DashboardSpectroClustersUIDWorkloadsJobParams) SetBody(body *models.V1ClusterWorkloadsSpec) { + o.Body = body +} + +// WithUID adds the uid to the v1 dashboard spectro clusters Uid workloads job params +func (o *V1DashboardSpectroClustersUIDWorkloadsJobParams) WithUID(uid string) *V1DashboardSpectroClustersUIDWorkloadsJobParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 dashboard spectro clusters Uid workloads job params +func (o *V1DashboardSpectroClustersUIDWorkloadsJobParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1DashboardSpectroClustersUIDWorkloadsJobParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_dashboard_spectro_clusters_uid_workloads_job_responses.go b/api/client/v1/v1_dashboard_spectro_clusters_uid_workloads_job_responses.go new file mode 100644 index 00000000..81544043 --- /dev/null +++ b/api/client/v1/v1_dashboard_spectro_clusters_uid_workloads_job_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1DashboardSpectroClustersUIDWorkloadsJobReader is a Reader for the V1DashboardSpectroClustersUIDWorkloadsJob structure. +type V1DashboardSpectroClustersUIDWorkloadsJobReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1DashboardSpectroClustersUIDWorkloadsJobReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1DashboardSpectroClustersUIDWorkloadsJobOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1DashboardSpectroClustersUIDWorkloadsJobOK creates a V1DashboardSpectroClustersUIDWorkloadsJobOK with default headers values +func NewV1DashboardSpectroClustersUIDWorkloadsJobOK() *V1DashboardSpectroClustersUIDWorkloadsJobOK { + return &V1DashboardSpectroClustersUIDWorkloadsJobOK{} +} + +/* +V1DashboardSpectroClustersUIDWorkloadsJobOK handles this case with default header values. + +An array of cluster workload jobs +*/ +type V1DashboardSpectroClustersUIDWorkloadsJobOK struct { + Payload *models.V1ClusterWorkloadJobs +} + +func (o *V1DashboardSpectroClustersUIDWorkloadsJobOK) Error() string { + return fmt.Sprintf("[POST /v1/dashboard/spectroclusters/{uid}/workloads/job][%d] v1DashboardSpectroClustersUidWorkloadsJobOK %+v", 200, o.Payload) +} + +func (o *V1DashboardSpectroClustersUIDWorkloadsJobOK) GetPayload() *models.V1ClusterWorkloadJobs { + return o.Payload +} + +func (o *V1DashboardSpectroClustersUIDWorkloadsJobOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1ClusterWorkloadJobs) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_dashboard_spectro_clusters_uid_workloads_namespace_parameters.go b/api/client/v1/v1_dashboard_spectro_clusters_uid_workloads_namespace_parameters.go new file mode 100644 index 00000000..a979ec92 --- /dev/null +++ b/api/client/v1/v1_dashboard_spectro_clusters_uid_workloads_namespace_parameters.go @@ -0,0 +1,154 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1DashboardSpectroClustersUIDWorkloadsNamespaceParams creates a new V1DashboardSpectroClustersUIDWorkloadsNamespaceParams object +// with the default values initialized. +func NewV1DashboardSpectroClustersUIDWorkloadsNamespaceParams() *V1DashboardSpectroClustersUIDWorkloadsNamespaceParams { + var () + return &V1DashboardSpectroClustersUIDWorkloadsNamespaceParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1DashboardSpectroClustersUIDWorkloadsNamespaceParamsWithTimeout creates a new V1DashboardSpectroClustersUIDWorkloadsNamespaceParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1DashboardSpectroClustersUIDWorkloadsNamespaceParamsWithTimeout(timeout time.Duration) *V1DashboardSpectroClustersUIDWorkloadsNamespaceParams { + var () + return &V1DashboardSpectroClustersUIDWorkloadsNamespaceParams{ + + timeout: timeout, + } +} + +// NewV1DashboardSpectroClustersUIDWorkloadsNamespaceParamsWithContext creates a new V1DashboardSpectroClustersUIDWorkloadsNamespaceParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1DashboardSpectroClustersUIDWorkloadsNamespaceParamsWithContext(ctx context.Context) *V1DashboardSpectroClustersUIDWorkloadsNamespaceParams { + var () + return &V1DashboardSpectroClustersUIDWorkloadsNamespaceParams{ + + Context: ctx, + } +} + +// NewV1DashboardSpectroClustersUIDWorkloadsNamespaceParamsWithHTTPClient creates a new V1DashboardSpectroClustersUIDWorkloadsNamespaceParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1DashboardSpectroClustersUIDWorkloadsNamespaceParamsWithHTTPClient(client *http.Client) *V1DashboardSpectroClustersUIDWorkloadsNamespaceParams { + var () + return &V1DashboardSpectroClustersUIDWorkloadsNamespaceParams{ + HTTPClient: client, + } +} + +/* +V1DashboardSpectroClustersUIDWorkloadsNamespaceParams contains all the parameters to send to the API endpoint +for the v1 dashboard spectro clusters Uid workloads namespace operation typically these are written to a http.Request +*/ +type V1DashboardSpectroClustersUIDWorkloadsNamespaceParams struct { + + /*Body*/ + Body *models.V1ClusterWorkloadsSpec + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 dashboard spectro clusters Uid workloads namespace params +func (o *V1DashboardSpectroClustersUIDWorkloadsNamespaceParams) WithTimeout(timeout time.Duration) *V1DashboardSpectroClustersUIDWorkloadsNamespaceParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 dashboard spectro clusters Uid workloads namespace params +func (o *V1DashboardSpectroClustersUIDWorkloadsNamespaceParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 dashboard spectro clusters Uid workloads namespace params +func (o *V1DashboardSpectroClustersUIDWorkloadsNamespaceParams) WithContext(ctx context.Context) *V1DashboardSpectroClustersUIDWorkloadsNamespaceParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 dashboard spectro clusters Uid workloads namespace params +func (o *V1DashboardSpectroClustersUIDWorkloadsNamespaceParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 dashboard spectro clusters Uid workloads namespace params +func (o *V1DashboardSpectroClustersUIDWorkloadsNamespaceParams) WithHTTPClient(client *http.Client) *V1DashboardSpectroClustersUIDWorkloadsNamespaceParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 dashboard spectro clusters Uid workloads namespace params +func (o *V1DashboardSpectroClustersUIDWorkloadsNamespaceParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 dashboard spectro clusters Uid workloads namespace params +func (o *V1DashboardSpectroClustersUIDWorkloadsNamespaceParams) WithBody(body *models.V1ClusterWorkloadsSpec) *V1DashboardSpectroClustersUIDWorkloadsNamespaceParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 dashboard spectro clusters Uid workloads namespace params +func (o *V1DashboardSpectroClustersUIDWorkloadsNamespaceParams) SetBody(body *models.V1ClusterWorkloadsSpec) { + o.Body = body +} + +// WithUID adds the uid to the v1 dashboard spectro clusters Uid workloads namespace params +func (o *V1DashboardSpectroClustersUIDWorkloadsNamespaceParams) WithUID(uid string) *V1DashboardSpectroClustersUIDWorkloadsNamespaceParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 dashboard spectro clusters Uid workloads namespace params +func (o *V1DashboardSpectroClustersUIDWorkloadsNamespaceParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1DashboardSpectroClustersUIDWorkloadsNamespaceParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_dashboard_spectro_clusters_uid_workloads_namespace_responses.go b/api/client/v1/v1_dashboard_spectro_clusters_uid_workloads_namespace_responses.go new file mode 100644 index 00000000..40b77af4 --- /dev/null +++ b/api/client/v1/v1_dashboard_spectro_clusters_uid_workloads_namespace_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1DashboardSpectroClustersUIDWorkloadsNamespaceReader is a Reader for the V1DashboardSpectroClustersUIDWorkloadsNamespace structure. +type V1DashboardSpectroClustersUIDWorkloadsNamespaceReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1DashboardSpectroClustersUIDWorkloadsNamespaceReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1DashboardSpectroClustersUIDWorkloadsNamespaceOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1DashboardSpectroClustersUIDWorkloadsNamespaceOK creates a V1DashboardSpectroClustersUIDWorkloadsNamespaceOK with default headers values +func NewV1DashboardSpectroClustersUIDWorkloadsNamespaceOK() *V1DashboardSpectroClustersUIDWorkloadsNamespaceOK { + return &V1DashboardSpectroClustersUIDWorkloadsNamespaceOK{} +} + +/* +V1DashboardSpectroClustersUIDWorkloadsNamespaceOK handles this case with default header values. + +An array of cluster workload namespaces +*/ +type V1DashboardSpectroClustersUIDWorkloadsNamespaceOK struct { + Payload *models.V1ClusterWorkloadNamespaces +} + +func (o *V1DashboardSpectroClustersUIDWorkloadsNamespaceOK) Error() string { + return fmt.Sprintf("[POST /v1/dashboard/spectroclusters/{uid}/workloads/namespace][%d] v1DashboardSpectroClustersUidWorkloadsNamespaceOK %+v", 200, o.Payload) +} + +func (o *V1DashboardSpectroClustersUIDWorkloadsNamespaceOK) GetPayload() *models.V1ClusterWorkloadNamespaces { + return o.Payload +} + +func (o *V1DashboardSpectroClustersUIDWorkloadsNamespaceOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1ClusterWorkloadNamespaces) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_dashboard_spectro_clusters_uid_workloads_parameters.go b/api/client/v1/v1_dashboard_spectro_clusters_uid_workloads_parameters.go new file mode 100644 index 00000000..604ada57 --- /dev/null +++ b/api/client/v1/v1_dashboard_spectro_clusters_uid_workloads_parameters.go @@ -0,0 +1,154 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1DashboardSpectroClustersUIDWorkloadsParams creates a new V1DashboardSpectroClustersUIDWorkloadsParams object +// with the default values initialized. +func NewV1DashboardSpectroClustersUIDWorkloadsParams() *V1DashboardSpectroClustersUIDWorkloadsParams { + var () + return &V1DashboardSpectroClustersUIDWorkloadsParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1DashboardSpectroClustersUIDWorkloadsParamsWithTimeout creates a new V1DashboardSpectroClustersUIDWorkloadsParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1DashboardSpectroClustersUIDWorkloadsParamsWithTimeout(timeout time.Duration) *V1DashboardSpectroClustersUIDWorkloadsParams { + var () + return &V1DashboardSpectroClustersUIDWorkloadsParams{ + + timeout: timeout, + } +} + +// NewV1DashboardSpectroClustersUIDWorkloadsParamsWithContext creates a new V1DashboardSpectroClustersUIDWorkloadsParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1DashboardSpectroClustersUIDWorkloadsParamsWithContext(ctx context.Context) *V1DashboardSpectroClustersUIDWorkloadsParams { + var () + return &V1DashboardSpectroClustersUIDWorkloadsParams{ + + Context: ctx, + } +} + +// NewV1DashboardSpectroClustersUIDWorkloadsParamsWithHTTPClient creates a new V1DashboardSpectroClustersUIDWorkloadsParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1DashboardSpectroClustersUIDWorkloadsParamsWithHTTPClient(client *http.Client) *V1DashboardSpectroClustersUIDWorkloadsParams { + var () + return &V1DashboardSpectroClustersUIDWorkloadsParams{ + HTTPClient: client, + } +} + +/* +V1DashboardSpectroClustersUIDWorkloadsParams contains all the parameters to send to the API endpoint +for the v1 dashboard spectro clusters Uid workloads operation typically these are written to a http.Request +*/ +type V1DashboardSpectroClustersUIDWorkloadsParams struct { + + /*Body*/ + Body *models.V1ClusterWorkloadsSpec + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 dashboard spectro clusters Uid workloads params +func (o *V1DashboardSpectroClustersUIDWorkloadsParams) WithTimeout(timeout time.Duration) *V1DashboardSpectroClustersUIDWorkloadsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 dashboard spectro clusters Uid workloads params +func (o *V1DashboardSpectroClustersUIDWorkloadsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 dashboard spectro clusters Uid workloads params +func (o *V1DashboardSpectroClustersUIDWorkloadsParams) WithContext(ctx context.Context) *V1DashboardSpectroClustersUIDWorkloadsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 dashboard spectro clusters Uid workloads params +func (o *V1DashboardSpectroClustersUIDWorkloadsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 dashboard spectro clusters Uid workloads params +func (o *V1DashboardSpectroClustersUIDWorkloadsParams) WithHTTPClient(client *http.Client) *V1DashboardSpectroClustersUIDWorkloadsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 dashboard spectro clusters Uid workloads params +func (o *V1DashboardSpectroClustersUIDWorkloadsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 dashboard spectro clusters Uid workloads params +func (o *V1DashboardSpectroClustersUIDWorkloadsParams) WithBody(body *models.V1ClusterWorkloadsSpec) *V1DashboardSpectroClustersUIDWorkloadsParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 dashboard spectro clusters Uid workloads params +func (o *V1DashboardSpectroClustersUIDWorkloadsParams) SetBody(body *models.V1ClusterWorkloadsSpec) { + o.Body = body +} + +// WithUID adds the uid to the v1 dashboard spectro clusters Uid workloads params +func (o *V1DashboardSpectroClustersUIDWorkloadsParams) WithUID(uid string) *V1DashboardSpectroClustersUIDWorkloadsParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 dashboard spectro clusters Uid workloads params +func (o *V1DashboardSpectroClustersUIDWorkloadsParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1DashboardSpectroClustersUIDWorkloadsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_dashboard_spectro_clusters_uid_workloads_pod_parameters.go b/api/client/v1/v1_dashboard_spectro_clusters_uid_workloads_pod_parameters.go new file mode 100644 index 00000000..abfcd6cb --- /dev/null +++ b/api/client/v1/v1_dashboard_spectro_clusters_uid_workloads_pod_parameters.go @@ -0,0 +1,154 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1DashboardSpectroClustersUIDWorkloadsPodParams creates a new V1DashboardSpectroClustersUIDWorkloadsPodParams object +// with the default values initialized. +func NewV1DashboardSpectroClustersUIDWorkloadsPodParams() *V1DashboardSpectroClustersUIDWorkloadsPodParams { + var () + return &V1DashboardSpectroClustersUIDWorkloadsPodParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1DashboardSpectroClustersUIDWorkloadsPodParamsWithTimeout creates a new V1DashboardSpectroClustersUIDWorkloadsPodParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1DashboardSpectroClustersUIDWorkloadsPodParamsWithTimeout(timeout time.Duration) *V1DashboardSpectroClustersUIDWorkloadsPodParams { + var () + return &V1DashboardSpectroClustersUIDWorkloadsPodParams{ + + timeout: timeout, + } +} + +// NewV1DashboardSpectroClustersUIDWorkloadsPodParamsWithContext creates a new V1DashboardSpectroClustersUIDWorkloadsPodParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1DashboardSpectroClustersUIDWorkloadsPodParamsWithContext(ctx context.Context) *V1DashboardSpectroClustersUIDWorkloadsPodParams { + var () + return &V1DashboardSpectroClustersUIDWorkloadsPodParams{ + + Context: ctx, + } +} + +// NewV1DashboardSpectroClustersUIDWorkloadsPodParamsWithHTTPClient creates a new V1DashboardSpectroClustersUIDWorkloadsPodParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1DashboardSpectroClustersUIDWorkloadsPodParamsWithHTTPClient(client *http.Client) *V1DashboardSpectroClustersUIDWorkloadsPodParams { + var () + return &V1DashboardSpectroClustersUIDWorkloadsPodParams{ + HTTPClient: client, + } +} + +/* +V1DashboardSpectroClustersUIDWorkloadsPodParams contains all the parameters to send to the API endpoint +for the v1 dashboard spectro clusters Uid workloads pod operation typically these are written to a http.Request +*/ +type V1DashboardSpectroClustersUIDWorkloadsPodParams struct { + + /*Body*/ + Body *models.V1ClusterWorkloadsSpec + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 dashboard spectro clusters Uid workloads pod params +func (o *V1DashboardSpectroClustersUIDWorkloadsPodParams) WithTimeout(timeout time.Duration) *V1DashboardSpectroClustersUIDWorkloadsPodParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 dashboard spectro clusters Uid workloads pod params +func (o *V1DashboardSpectroClustersUIDWorkloadsPodParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 dashboard spectro clusters Uid workloads pod params +func (o *V1DashboardSpectroClustersUIDWorkloadsPodParams) WithContext(ctx context.Context) *V1DashboardSpectroClustersUIDWorkloadsPodParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 dashboard spectro clusters Uid workloads pod params +func (o *V1DashboardSpectroClustersUIDWorkloadsPodParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 dashboard spectro clusters Uid workloads pod params +func (o *V1DashboardSpectroClustersUIDWorkloadsPodParams) WithHTTPClient(client *http.Client) *V1DashboardSpectroClustersUIDWorkloadsPodParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 dashboard spectro clusters Uid workloads pod params +func (o *V1DashboardSpectroClustersUIDWorkloadsPodParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 dashboard spectro clusters Uid workloads pod params +func (o *V1DashboardSpectroClustersUIDWorkloadsPodParams) WithBody(body *models.V1ClusterWorkloadsSpec) *V1DashboardSpectroClustersUIDWorkloadsPodParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 dashboard spectro clusters Uid workloads pod params +func (o *V1DashboardSpectroClustersUIDWorkloadsPodParams) SetBody(body *models.V1ClusterWorkloadsSpec) { + o.Body = body +} + +// WithUID adds the uid to the v1 dashboard spectro clusters Uid workloads pod params +func (o *V1DashboardSpectroClustersUIDWorkloadsPodParams) WithUID(uid string) *V1DashboardSpectroClustersUIDWorkloadsPodParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 dashboard spectro clusters Uid workloads pod params +func (o *V1DashboardSpectroClustersUIDWorkloadsPodParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1DashboardSpectroClustersUIDWorkloadsPodParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_dashboard_spectro_clusters_uid_workloads_pod_responses.go b/api/client/v1/v1_dashboard_spectro_clusters_uid_workloads_pod_responses.go new file mode 100644 index 00000000..cb7afce4 --- /dev/null +++ b/api/client/v1/v1_dashboard_spectro_clusters_uid_workloads_pod_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1DashboardSpectroClustersUIDWorkloadsPodReader is a Reader for the V1DashboardSpectroClustersUIDWorkloadsPod structure. +type V1DashboardSpectroClustersUIDWorkloadsPodReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1DashboardSpectroClustersUIDWorkloadsPodReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1DashboardSpectroClustersUIDWorkloadsPodOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1DashboardSpectroClustersUIDWorkloadsPodOK creates a V1DashboardSpectroClustersUIDWorkloadsPodOK with default headers values +func NewV1DashboardSpectroClustersUIDWorkloadsPodOK() *V1DashboardSpectroClustersUIDWorkloadsPodOK { + return &V1DashboardSpectroClustersUIDWorkloadsPodOK{} +} + +/* +V1DashboardSpectroClustersUIDWorkloadsPodOK handles this case with default header values. + +An array of cluster workload pods +*/ +type V1DashboardSpectroClustersUIDWorkloadsPodOK struct { + Payload *models.V1ClusterWorkloadPods +} + +func (o *V1DashboardSpectroClustersUIDWorkloadsPodOK) Error() string { + return fmt.Sprintf("[POST /v1/dashboard/spectroclusters/{uid}/workloads/pod][%d] v1DashboardSpectroClustersUidWorkloadsPodOK %+v", 200, o.Payload) +} + +func (o *V1DashboardSpectroClustersUIDWorkloadsPodOK) GetPayload() *models.V1ClusterWorkloadPods { + return o.Payload +} + +func (o *V1DashboardSpectroClustersUIDWorkloadsPodOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1ClusterWorkloadPods) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_dashboard_spectro_clusters_uid_workloads_responses.go b/api/client/v1/v1_dashboard_spectro_clusters_uid_workloads_responses.go new file mode 100644 index 00000000..284f2135 --- /dev/null +++ b/api/client/v1/v1_dashboard_spectro_clusters_uid_workloads_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1DashboardSpectroClustersUIDWorkloadsReader is a Reader for the V1DashboardSpectroClustersUIDWorkloads structure. +type V1DashboardSpectroClustersUIDWorkloadsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1DashboardSpectroClustersUIDWorkloadsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1DashboardSpectroClustersUIDWorkloadsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1DashboardSpectroClustersUIDWorkloadsOK creates a V1DashboardSpectroClustersUIDWorkloadsOK with default headers values +func NewV1DashboardSpectroClustersUIDWorkloadsOK() *V1DashboardSpectroClustersUIDWorkloadsOK { + return &V1DashboardSpectroClustersUIDWorkloadsOK{} +} + +/* +V1DashboardSpectroClustersUIDWorkloadsOK handles this case with default header values. + +An array of cluster workloads +*/ +type V1DashboardSpectroClustersUIDWorkloadsOK struct { + Payload *models.V1ClusterWorkload +} + +func (o *V1DashboardSpectroClustersUIDWorkloadsOK) Error() string { + return fmt.Sprintf("[POST /v1/dashboard/spectroclusters/{uid}/workloads][%d] v1DashboardSpectroClustersUidWorkloadsOK %+v", 200, o.Payload) +} + +func (o *V1DashboardSpectroClustersUIDWorkloadsOK) GetPayload() *models.V1ClusterWorkload { + return o.Payload +} + +func (o *V1DashboardSpectroClustersUIDWorkloadsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1ClusterWorkload) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_dashboard_spectro_clusters_uid_workloads_role_binding_parameters.go b/api/client/v1/v1_dashboard_spectro_clusters_uid_workloads_role_binding_parameters.go new file mode 100644 index 00000000..85a90759 --- /dev/null +++ b/api/client/v1/v1_dashboard_spectro_clusters_uid_workloads_role_binding_parameters.go @@ -0,0 +1,154 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1DashboardSpectroClustersUIDWorkloadsRoleBindingParams creates a new V1DashboardSpectroClustersUIDWorkloadsRoleBindingParams object +// with the default values initialized. +func NewV1DashboardSpectroClustersUIDWorkloadsRoleBindingParams() *V1DashboardSpectroClustersUIDWorkloadsRoleBindingParams { + var () + return &V1DashboardSpectroClustersUIDWorkloadsRoleBindingParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1DashboardSpectroClustersUIDWorkloadsRoleBindingParamsWithTimeout creates a new V1DashboardSpectroClustersUIDWorkloadsRoleBindingParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1DashboardSpectroClustersUIDWorkloadsRoleBindingParamsWithTimeout(timeout time.Duration) *V1DashboardSpectroClustersUIDWorkloadsRoleBindingParams { + var () + return &V1DashboardSpectroClustersUIDWorkloadsRoleBindingParams{ + + timeout: timeout, + } +} + +// NewV1DashboardSpectroClustersUIDWorkloadsRoleBindingParamsWithContext creates a new V1DashboardSpectroClustersUIDWorkloadsRoleBindingParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1DashboardSpectroClustersUIDWorkloadsRoleBindingParamsWithContext(ctx context.Context) *V1DashboardSpectroClustersUIDWorkloadsRoleBindingParams { + var () + return &V1DashboardSpectroClustersUIDWorkloadsRoleBindingParams{ + + Context: ctx, + } +} + +// NewV1DashboardSpectroClustersUIDWorkloadsRoleBindingParamsWithHTTPClient creates a new V1DashboardSpectroClustersUIDWorkloadsRoleBindingParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1DashboardSpectroClustersUIDWorkloadsRoleBindingParamsWithHTTPClient(client *http.Client) *V1DashboardSpectroClustersUIDWorkloadsRoleBindingParams { + var () + return &V1DashboardSpectroClustersUIDWorkloadsRoleBindingParams{ + HTTPClient: client, + } +} + +/* +V1DashboardSpectroClustersUIDWorkloadsRoleBindingParams contains all the parameters to send to the API endpoint +for the v1 dashboard spectro clusters Uid workloads role binding operation typically these are written to a http.Request +*/ +type V1DashboardSpectroClustersUIDWorkloadsRoleBindingParams struct { + + /*Body*/ + Body *models.V1ClusterWorkloadsSpec + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 dashboard spectro clusters Uid workloads role binding params +func (o *V1DashboardSpectroClustersUIDWorkloadsRoleBindingParams) WithTimeout(timeout time.Duration) *V1DashboardSpectroClustersUIDWorkloadsRoleBindingParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 dashboard spectro clusters Uid workloads role binding params +func (o *V1DashboardSpectroClustersUIDWorkloadsRoleBindingParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 dashboard spectro clusters Uid workloads role binding params +func (o *V1DashboardSpectroClustersUIDWorkloadsRoleBindingParams) WithContext(ctx context.Context) *V1DashboardSpectroClustersUIDWorkloadsRoleBindingParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 dashboard spectro clusters Uid workloads role binding params +func (o *V1DashboardSpectroClustersUIDWorkloadsRoleBindingParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 dashboard spectro clusters Uid workloads role binding params +func (o *V1DashboardSpectroClustersUIDWorkloadsRoleBindingParams) WithHTTPClient(client *http.Client) *V1DashboardSpectroClustersUIDWorkloadsRoleBindingParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 dashboard spectro clusters Uid workloads role binding params +func (o *V1DashboardSpectroClustersUIDWorkloadsRoleBindingParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 dashboard spectro clusters Uid workloads role binding params +func (o *V1DashboardSpectroClustersUIDWorkloadsRoleBindingParams) WithBody(body *models.V1ClusterWorkloadsSpec) *V1DashboardSpectroClustersUIDWorkloadsRoleBindingParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 dashboard spectro clusters Uid workloads role binding params +func (o *V1DashboardSpectroClustersUIDWorkloadsRoleBindingParams) SetBody(body *models.V1ClusterWorkloadsSpec) { + o.Body = body +} + +// WithUID adds the uid to the v1 dashboard spectro clusters Uid workloads role binding params +func (o *V1DashboardSpectroClustersUIDWorkloadsRoleBindingParams) WithUID(uid string) *V1DashboardSpectroClustersUIDWorkloadsRoleBindingParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 dashboard spectro clusters Uid workloads role binding params +func (o *V1DashboardSpectroClustersUIDWorkloadsRoleBindingParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1DashboardSpectroClustersUIDWorkloadsRoleBindingParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_dashboard_spectro_clusters_uid_workloads_role_binding_responses.go b/api/client/v1/v1_dashboard_spectro_clusters_uid_workloads_role_binding_responses.go new file mode 100644 index 00000000..b1fc07a2 --- /dev/null +++ b/api/client/v1/v1_dashboard_spectro_clusters_uid_workloads_role_binding_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1DashboardSpectroClustersUIDWorkloadsRoleBindingReader is a Reader for the V1DashboardSpectroClustersUIDWorkloadsRoleBinding structure. +type V1DashboardSpectroClustersUIDWorkloadsRoleBindingReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1DashboardSpectroClustersUIDWorkloadsRoleBindingReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1DashboardSpectroClustersUIDWorkloadsRoleBindingOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1DashboardSpectroClustersUIDWorkloadsRoleBindingOK creates a V1DashboardSpectroClustersUIDWorkloadsRoleBindingOK with default headers values +func NewV1DashboardSpectroClustersUIDWorkloadsRoleBindingOK() *V1DashboardSpectroClustersUIDWorkloadsRoleBindingOK { + return &V1DashboardSpectroClustersUIDWorkloadsRoleBindingOK{} +} + +/* +V1DashboardSpectroClustersUIDWorkloadsRoleBindingOK handles this case with default header values. + +An array of cluster workload rolebindings +*/ +type V1DashboardSpectroClustersUIDWorkloadsRoleBindingOK struct { + Payload *models.V1ClusterWorkloadRoleBindings +} + +func (o *V1DashboardSpectroClustersUIDWorkloadsRoleBindingOK) Error() string { + return fmt.Sprintf("[POST /v1/dashboard/spectroclusters/{uid}/workloads/rolebinding][%d] v1DashboardSpectroClustersUidWorkloadsRoleBindingOK %+v", 200, o.Payload) +} + +func (o *V1DashboardSpectroClustersUIDWorkloadsRoleBindingOK) GetPayload() *models.V1ClusterWorkloadRoleBindings { + return o.Payload +} + +func (o *V1DashboardSpectroClustersUIDWorkloadsRoleBindingOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1ClusterWorkloadRoleBindings) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_dashboard_spectro_clusters_uid_workloads_stateful_set_parameters.go b/api/client/v1/v1_dashboard_spectro_clusters_uid_workloads_stateful_set_parameters.go new file mode 100644 index 00000000..1ff304a2 --- /dev/null +++ b/api/client/v1/v1_dashboard_spectro_clusters_uid_workloads_stateful_set_parameters.go @@ -0,0 +1,154 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1DashboardSpectroClustersUIDWorkloadsStatefulSetParams creates a new V1DashboardSpectroClustersUIDWorkloadsStatefulSetParams object +// with the default values initialized. +func NewV1DashboardSpectroClustersUIDWorkloadsStatefulSetParams() *V1DashboardSpectroClustersUIDWorkloadsStatefulSetParams { + var () + return &V1DashboardSpectroClustersUIDWorkloadsStatefulSetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1DashboardSpectroClustersUIDWorkloadsStatefulSetParamsWithTimeout creates a new V1DashboardSpectroClustersUIDWorkloadsStatefulSetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1DashboardSpectroClustersUIDWorkloadsStatefulSetParamsWithTimeout(timeout time.Duration) *V1DashboardSpectroClustersUIDWorkloadsStatefulSetParams { + var () + return &V1DashboardSpectroClustersUIDWorkloadsStatefulSetParams{ + + timeout: timeout, + } +} + +// NewV1DashboardSpectroClustersUIDWorkloadsStatefulSetParamsWithContext creates a new V1DashboardSpectroClustersUIDWorkloadsStatefulSetParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1DashboardSpectroClustersUIDWorkloadsStatefulSetParamsWithContext(ctx context.Context) *V1DashboardSpectroClustersUIDWorkloadsStatefulSetParams { + var () + return &V1DashboardSpectroClustersUIDWorkloadsStatefulSetParams{ + + Context: ctx, + } +} + +// NewV1DashboardSpectroClustersUIDWorkloadsStatefulSetParamsWithHTTPClient creates a new V1DashboardSpectroClustersUIDWorkloadsStatefulSetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1DashboardSpectroClustersUIDWorkloadsStatefulSetParamsWithHTTPClient(client *http.Client) *V1DashboardSpectroClustersUIDWorkloadsStatefulSetParams { + var () + return &V1DashboardSpectroClustersUIDWorkloadsStatefulSetParams{ + HTTPClient: client, + } +} + +/* +V1DashboardSpectroClustersUIDWorkloadsStatefulSetParams contains all the parameters to send to the API endpoint +for the v1 dashboard spectro clusters Uid workloads stateful set operation typically these are written to a http.Request +*/ +type V1DashboardSpectroClustersUIDWorkloadsStatefulSetParams struct { + + /*Body*/ + Body *models.V1ClusterWorkloadsSpec + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 dashboard spectro clusters Uid workloads stateful set params +func (o *V1DashboardSpectroClustersUIDWorkloadsStatefulSetParams) WithTimeout(timeout time.Duration) *V1DashboardSpectroClustersUIDWorkloadsStatefulSetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 dashboard spectro clusters Uid workloads stateful set params +func (o *V1DashboardSpectroClustersUIDWorkloadsStatefulSetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 dashboard spectro clusters Uid workloads stateful set params +func (o *V1DashboardSpectroClustersUIDWorkloadsStatefulSetParams) WithContext(ctx context.Context) *V1DashboardSpectroClustersUIDWorkloadsStatefulSetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 dashboard spectro clusters Uid workloads stateful set params +func (o *V1DashboardSpectroClustersUIDWorkloadsStatefulSetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 dashboard spectro clusters Uid workloads stateful set params +func (o *V1DashboardSpectroClustersUIDWorkloadsStatefulSetParams) WithHTTPClient(client *http.Client) *V1DashboardSpectroClustersUIDWorkloadsStatefulSetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 dashboard spectro clusters Uid workloads stateful set params +func (o *V1DashboardSpectroClustersUIDWorkloadsStatefulSetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 dashboard spectro clusters Uid workloads stateful set params +func (o *V1DashboardSpectroClustersUIDWorkloadsStatefulSetParams) WithBody(body *models.V1ClusterWorkloadsSpec) *V1DashboardSpectroClustersUIDWorkloadsStatefulSetParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 dashboard spectro clusters Uid workloads stateful set params +func (o *V1DashboardSpectroClustersUIDWorkloadsStatefulSetParams) SetBody(body *models.V1ClusterWorkloadsSpec) { + o.Body = body +} + +// WithUID adds the uid to the v1 dashboard spectro clusters Uid workloads stateful set params +func (o *V1DashboardSpectroClustersUIDWorkloadsStatefulSetParams) WithUID(uid string) *V1DashboardSpectroClustersUIDWorkloadsStatefulSetParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 dashboard spectro clusters Uid workloads stateful set params +func (o *V1DashboardSpectroClustersUIDWorkloadsStatefulSetParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1DashboardSpectroClustersUIDWorkloadsStatefulSetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_dashboard_spectro_clusters_uid_workloads_stateful_set_responses.go b/api/client/v1/v1_dashboard_spectro_clusters_uid_workloads_stateful_set_responses.go new file mode 100644 index 00000000..eafec783 --- /dev/null +++ b/api/client/v1/v1_dashboard_spectro_clusters_uid_workloads_stateful_set_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1DashboardSpectroClustersUIDWorkloadsStatefulSetReader is a Reader for the V1DashboardSpectroClustersUIDWorkloadsStatefulSet structure. +type V1DashboardSpectroClustersUIDWorkloadsStatefulSetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1DashboardSpectroClustersUIDWorkloadsStatefulSetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1DashboardSpectroClustersUIDWorkloadsStatefulSetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1DashboardSpectroClustersUIDWorkloadsStatefulSetOK creates a V1DashboardSpectroClustersUIDWorkloadsStatefulSetOK with default headers values +func NewV1DashboardSpectroClustersUIDWorkloadsStatefulSetOK() *V1DashboardSpectroClustersUIDWorkloadsStatefulSetOK { + return &V1DashboardSpectroClustersUIDWorkloadsStatefulSetOK{} +} + +/* +V1DashboardSpectroClustersUIDWorkloadsStatefulSetOK handles this case with default header values. + +An array of cluster workload statefulsets +*/ +type V1DashboardSpectroClustersUIDWorkloadsStatefulSetOK struct { + Payload *models.V1ClusterWorkloadStatefulSets +} + +func (o *V1DashboardSpectroClustersUIDWorkloadsStatefulSetOK) Error() string { + return fmt.Sprintf("[POST /v1/dashboard/spectroclusters/{uid}/workloads/statefulset][%d] v1DashboardSpectroClustersUidWorkloadsStatefulSetOK %+v", 200, o.Payload) +} + +func (o *V1DashboardSpectroClustersUIDWorkloadsStatefulSetOK) GetPayload() *models.V1ClusterWorkloadStatefulSets { + return o.Payload +} + +func (o *V1DashboardSpectroClustersUIDWorkloadsStatefulSetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1ClusterWorkloadStatefulSets) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_dashboard_vm_enabled_clusters_list_parameters.go b/api/client/v1/v1_dashboard_vm_enabled_clusters_list_parameters.go new file mode 100644 index 00000000..af73e5e1 --- /dev/null +++ b/api/client/v1/v1_dashboard_vm_enabled_clusters_list_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1DashboardVMEnabledClustersListParams creates a new V1DashboardVMEnabledClustersListParams object +// with the default values initialized. +func NewV1DashboardVMEnabledClustersListParams() *V1DashboardVMEnabledClustersListParams { + + return &V1DashboardVMEnabledClustersListParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1DashboardVMEnabledClustersListParamsWithTimeout creates a new V1DashboardVMEnabledClustersListParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1DashboardVMEnabledClustersListParamsWithTimeout(timeout time.Duration) *V1DashboardVMEnabledClustersListParams { + + return &V1DashboardVMEnabledClustersListParams{ + + timeout: timeout, + } +} + +// NewV1DashboardVMEnabledClustersListParamsWithContext creates a new V1DashboardVMEnabledClustersListParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1DashboardVMEnabledClustersListParamsWithContext(ctx context.Context) *V1DashboardVMEnabledClustersListParams { + + return &V1DashboardVMEnabledClustersListParams{ + + Context: ctx, + } +} + +// NewV1DashboardVMEnabledClustersListParamsWithHTTPClient creates a new V1DashboardVMEnabledClustersListParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1DashboardVMEnabledClustersListParamsWithHTTPClient(client *http.Client) *V1DashboardVMEnabledClustersListParams { + + return &V1DashboardVMEnabledClustersListParams{ + HTTPClient: client, + } +} + +/* +V1DashboardVMEnabledClustersListParams contains all the parameters to send to the API endpoint +for the v1 dashboard VM enabled clusters list operation typically these are written to a http.Request +*/ +type V1DashboardVMEnabledClustersListParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 dashboard VM enabled clusters list params +func (o *V1DashboardVMEnabledClustersListParams) WithTimeout(timeout time.Duration) *V1DashboardVMEnabledClustersListParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 dashboard VM enabled clusters list params +func (o *V1DashboardVMEnabledClustersListParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 dashboard VM enabled clusters list params +func (o *V1DashboardVMEnabledClustersListParams) WithContext(ctx context.Context) *V1DashboardVMEnabledClustersListParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 dashboard VM enabled clusters list params +func (o *V1DashboardVMEnabledClustersListParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 dashboard VM enabled clusters list params +func (o *V1DashboardVMEnabledClustersListParams) WithHTTPClient(client *http.Client) *V1DashboardVMEnabledClustersListParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 dashboard VM enabled clusters list params +func (o *V1DashboardVMEnabledClustersListParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *V1DashboardVMEnabledClustersListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_dashboard_vm_enabled_clusters_list_responses.go b/api/client/v1/v1_dashboard_vm_enabled_clusters_list_responses.go new file mode 100644 index 00000000..870da9bd --- /dev/null +++ b/api/client/v1/v1_dashboard_vm_enabled_clusters_list_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1DashboardVMEnabledClustersListReader is a Reader for the V1DashboardVMEnabledClustersList structure. +type V1DashboardVMEnabledClustersListReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1DashboardVMEnabledClustersListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1DashboardVMEnabledClustersListOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1DashboardVMEnabledClustersListOK creates a V1DashboardVMEnabledClustersListOK with default headers values +func NewV1DashboardVMEnabledClustersListOK() *V1DashboardVMEnabledClustersListOK { + return &V1DashboardVMEnabledClustersListOK{} +} + +/* +V1DashboardVMEnabledClustersListOK handles this case with default header values. + +An array of schema items +*/ +type V1DashboardVMEnabledClustersListOK struct { + Payload *models.V1VMClusters +} + +func (o *V1DashboardVMEnabledClustersListOK) Error() string { + return fmt.Sprintf("[GET /v1/dashboard/spectroclusters/vms][%d] v1DashboardVmEnabledClustersListOK %+v", 200, o.Payload) +} + +func (o *V1DashboardVMEnabledClustersListOK) GetPayload() *models.V1VMClusters { + return o.Payload +} + +func (o *V1DashboardVMEnabledClustersListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1VMClusters) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_dashboard_workspaces_list_parameters.go b/api/client/v1/v1_dashboard_workspaces_list_parameters.go new file mode 100644 index 00000000..869272bd --- /dev/null +++ b/api/client/v1/v1_dashboard_workspaces_list_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1DashboardWorkspacesListParams creates a new V1DashboardWorkspacesListParams object +// with the default values initialized. +func NewV1DashboardWorkspacesListParams() *V1DashboardWorkspacesListParams { + + return &V1DashboardWorkspacesListParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1DashboardWorkspacesListParamsWithTimeout creates a new V1DashboardWorkspacesListParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1DashboardWorkspacesListParamsWithTimeout(timeout time.Duration) *V1DashboardWorkspacesListParams { + + return &V1DashboardWorkspacesListParams{ + + timeout: timeout, + } +} + +// NewV1DashboardWorkspacesListParamsWithContext creates a new V1DashboardWorkspacesListParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1DashboardWorkspacesListParamsWithContext(ctx context.Context) *V1DashboardWorkspacesListParams { + + return &V1DashboardWorkspacesListParams{ + + Context: ctx, + } +} + +// NewV1DashboardWorkspacesListParamsWithHTTPClient creates a new V1DashboardWorkspacesListParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1DashboardWorkspacesListParamsWithHTTPClient(client *http.Client) *V1DashboardWorkspacesListParams { + + return &V1DashboardWorkspacesListParams{ + HTTPClient: client, + } +} + +/* +V1DashboardWorkspacesListParams contains all the parameters to send to the API endpoint +for the v1 dashboard workspaces list operation typically these are written to a http.Request +*/ +type V1DashboardWorkspacesListParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 dashboard workspaces list params +func (o *V1DashboardWorkspacesListParams) WithTimeout(timeout time.Duration) *V1DashboardWorkspacesListParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 dashboard workspaces list params +func (o *V1DashboardWorkspacesListParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 dashboard workspaces list params +func (o *V1DashboardWorkspacesListParams) WithContext(ctx context.Context) *V1DashboardWorkspacesListParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 dashboard workspaces list params +func (o *V1DashboardWorkspacesListParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 dashboard workspaces list params +func (o *V1DashboardWorkspacesListParams) WithHTTPClient(client *http.Client) *V1DashboardWorkspacesListParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 dashboard workspaces list params +func (o *V1DashboardWorkspacesListParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *V1DashboardWorkspacesListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_dashboard_workspaces_list_responses.go b/api/client/v1/v1_dashboard_workspaces_list_responses.go new file mode 100644 index 00000000..01639f0b --- /dev/null +++ b/api/client/v1/v1_dashboard_workspaces_list_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1DashboardWorkspacesListReader is a Reader for the V1DashboardWorkspacesList structure. +type V1DashboardWorkspacesListReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1DashboardWorkspacesListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1DashboardWorkspacesListOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1DashboardWorkspacesListOK creates a V1DashboardWorkspacesListOK with default headers values +func NewV1DashboardWorkspacesListOK() *V1DashboardWorkspacesListOK { + return &V1DashboardWorkspacesListOK{} +} + +/* +V1DashboardWorkspacesListOK handles this case with default header values. + +An array of workspace +*/ +type V1DashboardWorkspacesListOK struct { + Payload *models.V1DashboardWorkspaces +} + +func (o *V1DashboardWorkspacesListOK) Error() string { + return fmt.Sprintf("[GET /v1/dashboard/workspaces][%d] v1DashboardWorkspacesListOK %+v", 200, o.Payload) +} + +func (o *V1DashboardWorkspacesListOK) GetPayload() *models.V1DashboardWorkspaces { + return o.Payload +} + +func (o *V1DashboardWorkspacesListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1DashboardWorkspaces) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_dashboard_workspaces_uid_spectro_clusters_workloads_cluster_role_binding_parameters.go b/api/client/v1/v1_dashboard_workspaces_uid_spectro_clusters_workloads_cluster_role_binding_parameters.go new file mode 100644 index 00000000..66056e58 --- /dev/null +++ b/api/client/v1/v1_dashboard_workspaces_uid_spectro_clusters_workloads_cluster_role_binding_parameters.go @@ -0,0 +1,154 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1DashboardWorkspacesUIDSpectroClustersWorkloadsClusterRoleBindingParams creates a new V1DashboardWorkspacesUIDSpectroClustersWorkloadsClusterRoleBindingParams object +// with the default values initialized. +func NewV1DashboardWorkspacesUIDSpectroClustersWorkloadsClusterRoleBindingParams() *V1DashboardWorkspacesUIDSpectroClustersWorkloadsClusterRoleBindingParams { + var () + return &V1DashboardWorkspacesUIDSpectroClustersWorkloadsClusterRoleBindingParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1DashboardWorkspacesUIDSpectroClustersWorkloadsClusterRoleBindingParamsWithTimeout creates a new V1DashboardWorkspacesUIDSpectroClustersWorkloadsClusterRoleBindingParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1DashboardWorkspacesUIDSpectroClustersWorkloadsClusterRoleBindingParamsWithTimeout(timeout time.Duration) *V1DashboardWorkspacesUIDSpectroClustersWorkloadsClusterRoleBindingParams { + var () + return &V1DashboardWorkspacesUIDSpectroClustersWorkloadsClusterRoleBindingParams{ + + timeout: timeout, + } +} + +// NewV1DashboardWorkspacesUIDSpectroClustersWorkloadsClusterRoleBindingParamsWithContext creates a new V1DashboardWorkspacesUIDSpectroClustersWorkloadsClusterRoleBindingParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1DashboardWorkspacesUIDSpectroClustersWorkloadsClusterRoleBindingParamsWithContext(ctx context.Context) *V1DashboardWorkspacesUIDSpectroClustersWorkloadsClusterRoleBindingParams { + var () + return &V1DashboardWorkspacesUIDSpectroClustersWorkloadsClusterRoleBindingParams{ + + Context: ctx, + } +} + +// NewV1DashboardWorkspacesUIDSpectroClustersWorkloadsClusterRoleBindingParamsWithHTTPClient creates a new V1DashboardWorkspacesUIDSpectroClustersWorkloadsClusterRoleBindingParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1DashboardWorkspacesUIDSpectroClustersWorkloadsClusterRoleBindingParamsWithHTTPClient(client *http.Client) *V1DashboardWorkspacesUIDSpectroClustersWorkloadsClusterRoleBindingParams { + var () + return &V1DashboardWorkspacesUIDSpectroClustersWorkloadsClusterRoleBindingParams{ + HTTPClient: client, + } +} + +/* +V1DashboardWorkspacesUIDSpectroClustersWorkloadsClusterRoleBindingParams contains all the parameters to send to the API endpoint +for the v1 dashboard workspaces Uid spectro clusters workloads cluster role binding operation typically these are written to a http.Request +*/ +type V1DashboardWorkspacesUIDSpectroClustersWorkloadsClusterRoleBindingParams struct { + + /*Body*/ + Body *models.V1WorkspaceWorkloadsSpec + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 dashboard workspaces Uid spectro clusters workloads cluster role binding params +func (o *V1DashboardWorkspacesUIDSpectroClustersWorkloadsClusterRoleBindingParams) WithTimeout(timeout time.Duration) *V1DashboardWorkspacesUIDSpectroClustersWorkloadsClusterRoleBindingParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 dashboard workspaces Uid spectro clusters workloads cluster role binding params +func (o *V1DashboardWorkspacesUIDSpectroClustersWorkloadsClusterRoleBindingParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 dashboard workspaces Uid spectro clusters workloads cluster role binding params +func (o *V1DashboardWorkspacesUIDSpectroClustersWorkloadsClusterRoleBindingParams) WithContext(ctx context.Context) *V1DashboardWorkspacesUIDSpectroClustersWorkloadsClusterRoleBindingParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 dashboard workspaces Uid spectro clusters workloads cluster role binding params +func (o *V1DashboardWorkspacesUIDSpectroClustersWorkloadsClusterRoleBindingParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 dashboard workspaces Uid spectro clusters workloads cluster role binding params +func (o *V1DashboardWorkspacesUIDSpectroClustersWorkloadsClusterRoleBindingParams) WithHTTPClient(client *http.Client) *V1DashboardWorkspacesUIDSpectroClustersWorkloadsClusterRoleBindingParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 dashboard workspaces Uid spectro clusters workloads cluster role binding params +func (o *V1DashboardWorkspacesUIDSpectroClustersWorkloadsClusterRoleBindingParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 dashboard workspaces Uid spectro clusters workloads cluster role binding params +func (o *V1DashboardWorkspacesUIDSpectroClustersWorkloadsClusterRoleBindingParams) WithBody(body *models.V1WorkspaceWorkloadsSpec) *V1DashboardWorkspacesUIDSpectroClustersWorkloadsClusterRoleBindingParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 dashboard workspaces Uid spectro clusters workloads cluster role binding params +func (o *V1DashboardWorkspacesUIDSpectroClustersWorkloadsClusterRoleBindingParams) SetBody(body *models.V1WorkspaceWorkloadsSpec) { + o.Body = body +} + +// WithUID adds the uid to the v1 dashboard workspaces Uid spectro clusters workloads cluster role binding params +func (o *V1DashboardWorkspacesUIDSpectroClustersWorkloadsClusterRoleBindingParams) WithUID(uid string) *V1DashboardWorkspacesUIDSpectroClustersWorkloadsClusterRoleBindingParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 dashboard workspaces Uid spectro clusters workloads cluster role binding params +func (o *V1DashboardWorkspacesUIDSpectroClustersWorkloadsClusterRoleBindingParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1DashboardWorkspacesUIDSpectroClustersWorkloadsClusterRoleBindingParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_dashboard_workspaces_uid_spectro_clusters_workloads_cluster_role_binding_responses.go b/api/client/v1/v1_dashboard_workspaces_uid_spectro_clusters_workloads_cluster_role_binding_responses.go new file mode 100644 index 00000000..aff44d12 --- /dev/null +++ b/api/client/v1/v1_dashboard_workspaces_uid_spectro_clusters_workloads_cluster_role_binding_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1DashboardWorkspacesUIDSpectroClustersWorkloadsClusterRoleBindingReader is a Reader for the V1DashboardWorkspacesUIDSpectroClustersWorkloadsClusterRoleBinding structure. +type V1DashboardWorkspacesUIDSpectroClustersWorkloadsClusterRoleBindingReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1DashboardWorkspacesUIDSpectroClustersWorkloadsClusterRoleBindingReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1DashboardWorkspacesUIDSpectroClustersWorkloadsClusterRoleBindingOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1DashboardWorkspacesUIDSpectroClustersWorkloadsClusterRoleBindingOK creates a V1DashboardWorkspacesUIDSpectroClustersWorkloadsClusterRoleBindingOK with default headers values +func NewV1DashboardWorkspacesUIDSpectroClustersWorkloadsClusterRoleBindingOK() *V1DashboardWorkspacesUIDSpectroClustersWorkloadsClusterRoleBindingOK { + return &V1DashboardWorkspacesUIDSpectroClustersWorkloadsClusterRoleBindingOK{} +} + +/* +V1DashboardWorkspacesUIDSpectroClustersWorkloadsClusterRoleBindingOK handles this case with default header values. + +An array of clusters workload clusterrolebindings +*/ +type V1DashboardWorkspacesUIDSpectroClustersWorkloadsClusterRoleBindingOK struct { + Payload *models.V1WorkspaceClustersWorkloadRoleBindings +} + +func (o *V1DashboardWorkspacesUIDSpectroClustersWorkloadsClusterRoleBindingOK) Error() string { + return fmt.Sprintf("[POST /v1/dashboard/workspaces/{uid}/spectroclusters/workloads/clusterrolebinding][%d] v1DashboardWorkspacesUidSpectroClustersWorkloadsClusterRoleBindingOK %+v", 200, o.Payload) +} + +func (o *V1DashboardWorkspacesUIDSpectroClustersWorkloadsClusterRoleBindingOK) GetPayload() *models.V1WorkspaceClustersWorkloadRoleBindings { + return o.Payload +} + +func (o *V1DashboardWorkspacesUIDSpectroClustersWorkloadsClusterRoleBindingOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1WorkspaceClustersWorkloadRoleBindings) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_dashboard_workspaces_uid_spectro_clusters_workloads_cron_job_parameters.go b/api/client/v1/v1_dashboard_workspaces_uid_spectro_clusters_workloads_cron_job_parameters.go new file mode 100644 index 00000000..407a390f --- /dev/null +++ b/api/client/v1/v1_dashboard_workspaces_uid_spectro_clusters_workloads_cron_job_parameters.go @@ -0,0 +1,154 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1DashboardWorkspacesUIDSpectroClustersWorkloadsCronJobParams creates a new V1DashboardWorkspacesUIDSpectroClustersWorkloadsCronJobParams object +// with the default values initialized. +func NewV1DashboardWorkspacesUIDSpectroClustersWorkloadsCronJobParams() *V1DashboardWorkspacesUIDSpectroClustersWorkloadsCronJobParams { + var () + return &V1DashboardWorkspacesUIDSpectroClustersWorkloadsCronJobParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1DashboardWorkspacesUIDSpectroClustersWorkloadsCronJobParamsWithTimeout creates a new V1DashboardWorkspacesUIDSpectroClustersWorkloadsCronJobParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1DashboardWorkspacesUIDSpectroClustersWorkloadsCronJobParamsWithTimeout(timeout time.Duration) *V1DashboardWorkspacesUIDSpectroClustersWorkloadsCronJobParams { + var () + return &V1DashboardWorkspacesUIDSpectroClustersWorkloadsCronJobParams{ + + timeout: timeout, + } +} + +// NewV1DashboardWorkspacesUIDSpectroClustersWorkloadsCronJobParamsWithContext creates a new V1DashboardWorkspacesUIDSpectroClustersWorkloadsCronJobParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1DashboardWorkspacesUIDSpectroClustersWorkloadsCronJobParamsWithContext(ctx context.Context) *V1DashboardWorkspacesUIDSpectroClustersWorkloadsCronJobParams { + var () + return &V1DashboardWorkspacesUIDSpectroClustersWorkloadsCronJobParams{ + + Context: ctx, + } +} + +// NewV1DashboardWorkspacesUIDSpectroClustersWorkloadsCronJobParamsWithHTTPClient creates a new V1DashboardWorkspacesUIDSpectroClustersWorkloadsCronJobParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1DashboardWorkspacesUIDSpectroClustersWorkloadsCronJobParamsWithHTTPClient(client *http.Client) *V1DashboardWorkspacesUIDSpectroClustersWorkloadsCronJobParams { + var () + return &V1DashboardWorkspacesUIDSpectroClustersWorkloadsCronJobParams{ + HTTPClient: client, + } +} + +/* +V1DashboardWorkspacesUIDSpectroClustersWorkloadsCronJobParams contains all the parameters to send to the API endpoint +for the v1 dashboard workspaces Uid spectro clusters workloads cron job operation typically these are written to a http.Request +*/ +type V1DashboardWorkspacesUIDSpectroClustersWorkloadsCronJobParams struct { + + /*Body*/ + Body *models.V1WorkspaceWorkloadsSpec + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 dashboard workspaces Uid spectro clusters workloads cron job params +func (o *V1DashboardWorkspacesUIDSpectroClustersWorkloadsCronJobParams) WithTimeout(timeout time.Duration) *V1DashboardWorkspacesUIDSpectroClustersWorkloadsCronJobParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 dashboard workspaces Uid spectro clusters workloads cron job params +func (o *V1DashboardWorkspacesUIDSpectroClustersWorkloadsCronJobParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 dashboard workspaces Uid spectro clusters workloads cron job params +func (o *V1DashboardWorkspacesUIDSpectroClustersWorkloadsCronJobParams) WithContext(ctx context.Context) *V1DashboardWorkspacesUIDSpectroClustersWorkloadsCronJobParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 dashboard workspaces Uid spectro clusters workloads cron job params +func (o *V1DashboardWorkspacesUIDSpectroClustersWorkloadsCronJobParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 dashboard workspaces Uid spectro clusters workloads cron job params +func (o *V1DashboardWorkspacesUIDSpectroClustersWorkloadsCronJobParams) WithHTTPClient(client *http.Client) *V1DashboardWorkspacesUIDSpectroClustersWorkloadsCronJobParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 dashboard workspaces Uid spectro clusters workloads cron job params +func (o *V1DashboardWorkspacesUIDSpectroClustersWorkloadsCronJobParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 dashboard workspaces Uid spectro clusters workloads cron job params +func (o *V1DashboardWorkspacesUIDSpectroClustersWorkloadsCronJobParams) WithBody(body *models.V1WorkspaceWorkloadsSpec) *V1DashboardWorkspacesUIDSpectroClustersWorkloadsCronJobParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 dashboard workspaces Uid spectro clusters workloads cron job params +func (o *V1DashboardWorkspacesUIDSpectroClustersWorkloadsCronJobParams) SetBody(body *models.V1WorkspaceWorkloadsSpec) { + o.Body = body +} + +// WithUID adds the uid to the v1 dashboard workspaces Uid spectro clusters workloads cron job params +func (o *V1DashboardWorkspacesUIDSpectroClustersWorkloadsCronJobParams) WithUID(uid string) *V1DashboardWorkspacesUIDSpectroClustersWorkloadsCronJobParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 dashboard workspaces Uid spectro clusters workloads cron job params +func (o *V1DashboardWorkspacesUIDSpectroClustersWorkloadsCronJobParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1DashboardWorkspacesUIDSpectroClustersWorkloadsCronJobParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_dashboard_workspaces_uid_spectro_clusters_workloads_cron_job_responses.go b/api/client/v1/v1_dashboard_workspaces_uid_spectro_clusters_workloads_cron_job_responses.go new file mode 100644 index 00000000..7226025f --- /dev/null +++ b/api/client/v1/v1_dashboard_workspaces_uid_spectro_clusters_workloads_cron_job_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1DashboardWorkspacesUIDSpectroClustersWorkloadsCronJobReader is a Reader for the V1DashboardWorkspacesUIDSpectroClustersWorkloadsCronJob structure. +type V1DashboardWorkspacesUIDSpectroClustersWorkloadsCronJobReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1DashboardWorkspacesUIDSpectroClustersWorkloadsCronJobReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1DashboardWorkspacesUIDSpectroClustersWorkloadsCronJobOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1DashboardWorkspacesUIDSpectroClustersWorkloadsCronJobOK creates a V1DashboardWorkspacesUIDSpectroClustersWorkloadsCronJobOK with default headers values +func NewV1DashboardWorkspacesUIDSpectroClustersWorkloadsCronJobOK() *V1DashboardWorkspacesUIDSpectroClustersWorkloadsCronJobOK { + return &V1DashboardWorkspacesUIDSpectroClustersWorkloadsCronJobOK{} +} + +/* +V1DashboardWorkspacesUIDSpectroClustersWorkloadsCronJobOK handles this case with default header values. + +An array of clusters workload cronjobs +*/ +type V1DashboardWorkspacesUIDSpectroClustersWorkloadsCronJobOK struct { + Payload *models.V1WorkspaceClustersWorkloadCronJobs +} + +func (o *V1DashboardWorkspacesUIDSpectroClustersWorkloadsCronJobOK) Error() string { + return fmt.Sprintf("[POST /v1/dashboard/workspaces/{uid}/spectroclusters/workloads/cronjob][%d] v1DashboardWorkspacesUidSpectroClustersWorkloadsCronJobOK %+v", 200, o.Payload) +} + +func (o *V1DashboardWorkspacesUIDSpectroClustersWorkloadsCronJobOK) GetPayload() *models.V1WorkspaceClustersWorkloadCronJobs { + return o.Payload +} + +func (o *V1DashboardWorkspacesUIDSpectroClustersWorkloadsCronJobOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1WorkspaceClustersWorkloadCronJobs) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_dashboard_workspaces_uid_spectro_clusters_workloads_daemon_set_parameters.go b/api/client/v1/v1_dashboard_workspaces_uid_spectro_clusters_workloads_daemon_set_parameters.go new file mode 100644 index 00000000..b405903e --- /dev/null +++ b/api/client/v1/v1_dashboard_workspaces_uid_spectro_clusters_workloads_daemon_set_parameters.go @@ -0,0 +1,154 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1DashboardWorkspacesUIDSpectroClustersWorkloadsDaemonSetParams creates a new V1DashboardWorkspacesUIDSpectroClustersWorkloadsDaemonSetParams object +// with the default values initialized. +func NewV1DashboardWorkspacesUIDSpectroClustersWorkloadsDaemonSetParams() *V1DashboardWorkspacesUIDSpectroClustersWorkloadsDaemonSetParams { + var () + return &V1DashboardWorkspacesUIDSpectroClustersWorkloadsDaemonSetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1DashboardWorkspacesUIDSpectroClustersWorkloadsDaemonSetParamsWithTimeout creates a new V1DashboardWorkspacesUIDSpectroClustersWorkloadsDaemonSetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1DashboardWorkspacesUIDSpectroClustersWorkloadsDaemonSetParamsWithTimeout(timeout time.Duration) *V1DashboardWorkspacesUIDSpectroClustersWorkloadsDaemonSetParams { + var () + return &V1DashboardWorkspacesUIDSpectroClustersWorkloadsDaemonSetParams{ + + timeout: timeout, + } +} + +// NewV1DashboardWorkspacesUIDSpectroClustersWorkloadsDaemonSetParamsWithContext creates a new V1DashboardWorkspacesUIDSpectroClustersWorkloadsDaemonSetParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1DashboardWorkspacesUIDSpectroClustersWorkloadsDaemonSetParamsWithContext(ctx context.Context) *V1DashboardWorkspacesUIDSpectroClustersWorkloadsDaemonSetParams { + var () + return &V1DashboardWorkspacesUIDSpectroClustersWorkloadsDaemonSetParams{ + + Context: ctx, + } +} + +// NewV1DashboardWorkspacesUIDSpectroClustersWorkloadsDaemonSetParamsWithHTTPClient creates a new V1DashboardWorkspacesUIDSpectroClustersWorkloadsDaemonSetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1DashboardWorkspacesUIDSpectroClustersWorkloadsDaemonSetParamsWithHTTPClient(client *http.Client) *V1DashboardWorkspacesUIDSpectroClustersWorkloadsDaemonSetParams { + var () + return &V1DashboardWorkspacesUIDSpectroClustersWorkloadsDaemonSetParams{ + HTTPClient: client, + } +} + +/* +V1DashboardWorkspacesUIDSpectroClustersWorkloadsDaemonSetParams contains all the parameters to send to the API endpoint +for the v1 dashboard workspaces Uid spectro clusters workloads daemon set operation typically these are written to a http.Request +*/ +type V1DashboardWorkspacesUIDSpectroClustersWorkloadsDaemonSetParams struct { + + /*Body*/ + Body *models.V1WorkspaceWorkloadsSpec + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 dashboard workspaces Uid spectro clusters workloads daemon set params +func (o *V1DashboardWorkspacesUIDSpectroClustersWorkloadsDaemonSetParams) WithTimeout(timeout time.Duration) *V1DashboardWorkspacesUIDSpectroClustersWorkloadsDaemonSetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 dashboard workspaces Uid spectro clusters workloads daemon set params +func (o *V1DashboardWorkspacesUIDSpectroClustersWorkloadsDaemonSetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 dashboard workspaces Uid spectro clusters workloads daemon set params +func (o *V1DashboardWorkspacesUIDSpectroClustersWorkloadsDaemonSetParams) WithContext(ctx context.Context) *V1DashboardWorkspacesUIDSpectroClustersWorkloadsDaemonSetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 dashboard workspaces Uid spectro clusters workloads daemon set params +func (o *V1DashboardWorkspacesUIDSpectroClustersWorkloadsDaemonSetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 dashboard workspaces Uid spectro clusters workloads daemon set params +func (o *V1DashboardWorkspacesUIDSpectroClustersWorkloadsDaemonSetParams) WithHTTPClient(client *http.Client) *V1DashboardWorkspacesUIDSpectroClustersWorkloadsDaemonSetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 dashboard workspaces Uid spectro clusters workloads daemon set params +func (o *V1DashboardWorkspacesUIDSpectroClustersWorkloadsDaemonSetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 dashboard workspaces Uid spectro clusters workloads daemon set params +func (o *V1DashboardWorkspacesUIDSpectroClustersWorkloadsDaemonSetParams) WithBody(body *models.V1WorkspaceWorkloadsSpec) *V1DashboardWorkspacesUIDSpectroClustersWorkloadsDaemonSetParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 dashboard workspaces Uid spectro clusters workloads daemon set params +func (o *V1DashboardWorkspacesUIDSpectroClustersWorkloadsDaemonSetParams) SetBody(body *models.V1WorkspaceWorkloadsSpec) { + o.Body = body +} + +// WithUID adds the uid to the v1 dashboard workspaces Uid spectro clusters workloads daemon set params +func (o *V1DashboardWorkspacesUIDSpectroClustersWorkloadsDaemonSetParams) WithUID(uid string) *V1DashboardWorkspacesUIDSpectroClustersWorkloadsDaemonSetParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 dashboard workspaces Uid spectro clusters workloads daemon set params +func (o *V1DashboardWorkspacesUIDSpectroClustersWorkloadsDaemonSetParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1DashboardWorkspacesUIDSpectroClustersWorkloadsDaemonSetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_dashboard_workspaces_uid_spectro_clusters_workloads_daemon_set_responses.go b/api/client/v1/v1_dashboard_workspaces_uid_spectro_clusters_workloads_daemon_set_responses.go new file mode 100644 index 00000000..5c7e2352 --- /dev/null +++ b/api/client/v1/v1_dashboard_workspaces_uid_spectro_clusters_workloads_daemon_set_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1DashboardWorkspacesUIDSpectroClustersWorkloadsDaemonSetReader is a Reader for the V1DashboardWorkspacesUIDSpectroClustersWorkloadsDaemonSet structure. +type V1DashboardWorkspacesUIDSpectroClustersWorkloadsDaemonSetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1DashboardWorkspacesUIDSpectroClustersWorkloadsDaemonSetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1DashboardWorkspacesUIDSpectroClustersWorkloadsDaemonSetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1DashboardWorkspacesUIDSpectroClustersWorkloadsDaemonSetOK creates a V1DashboardWorkspacesUIDSpectroClustersWorkloadsDaemonSetOK with default headers values +func NewV1DashboardWorkspacesUIDSpectroClustersWorkloadsDaemonSetOK() *V1DashboardWorkspacesUIDSpectroClustersWorkloadsDaemonSetOK { + return &V1DashboardWorkspacesUIDSpectroClustersWorkloadsDaemonSetOK{} +} + +/* +V1DashboardWorkspacesUIDSpectroClustersWorkloadsDaemonSetOK handles this case with default header values. + +An array of clusters workload daemonsets +*/ +type V1DashboardWorkspacesUIDSpectroClustersWorkloadsDaemonSetOK struct { + Payload *models.V1WorkspaceClustersWorkloadDaemonSets +} + +func (o *V1DashboardWorkspacesUIDSpectroClustersWorkloadsDaemonSetOK) Error() string { + return fmt.Sprintf("[POST /v1/dashboard/workspaces/{uid}/spectroclusters/workloads/daemonset][%d] v1DashboardWorkspacesUidSpectroClustersWorkloadsDaemonSetOK %+v", 200, o.Payload) +} + +func (o *V1DashboardWorkspacesUIDSpectroClustersWorkloadsDaemonSetOK) GetPayload() *models.V1WorkspaceClustersWorkloadDaemonSets { + return o.Payload +} + +func (o *V1DashboardWorkspacesUIDSpectroClustersWorkloadsDaemonSetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1WorkspaceClustersWorkloadDaemonSets) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_dashboard_workspaces_uid_spectro_clusters_workloads_deployment_parameters.go b/api/client/v1/v1_dashboard_workspaces_uid_spectro_clusters_workloads_deployment_parameters.go new file mode 100644 index 00000000..b8a25b34 --- /dev/null +++ b/api/client/v1/v1_dashboard_workspaces_uid_spectro_clusters_workloads_deployment_parameters.go @@ -0,0 +1,154 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1DashboardWorkspacesUIDSpectroClustersWorkloadsDeploymentParams creates a new V1DashboardWorkspacesUIDSpectroClustersWorkloadsDeploymentParams object +// with the default values initialized. +func NewV1DashboardWorkspacesUIDSpectroClustersWorkloadsDeploymentParams() *V1DashboardWorkspacesUIDSpectroClustersWorkloadsDeploymentParams { + var () + return &V1DashboardWorkspacesUIDSpectroClustersWorkloadsDeploymentParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1DashboardWorkspacesUIDSpectroClustersWorkloadsDeploymentParamsWithTimeout creates a new V1DashboardWorkspacesUIDSpectroClustersWorkloadsDeploymentParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1DashboardWorkspacesUIDSpectroClustersWorkloadsDeploymentParamsWithTimeout(timeout time.Duration) *V1DashboardWorkspacesUIDSpectroClustersWorkloadsDeploymentParams { + var () + return &V1DashboardWorkspacesUIDSpectroClustersWorkloadsDeploymentParams{ + + timeout: timeout, + } +} + +// NewV1DashboardWorkspacesUIDSpectroClustersWorkloadsDeploymentParamsWithContext creates a new V1DashboardWorkspacesUIDSpectroClustersWorkloadsDeploymentParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1DashboardWorkspacesUIDSpectroClustersWorkloadsDeploymentParamsWithContext(ctx context.Context) *V1DashboardWorkspacesUIDSpectroClustersWorkloadsDeploymentParams { + var () + return &V1DashboardWorkspacesUIDSpectroClustersWorkloadsDeploymentParams{ + + Context: ctx, + } +} + +// NewV1DashboardWorkspacesUIDSpectroClustersWorkloadsDeploymentParamsWithHTTPClient creates a new V1DashboardWorkspacesUIDSpectroClustersWorkloadsDeploymentParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1DashboardWorkspacesUIDSpectroClustersWorkloadsDeploymentParamsWithHTTPClient(client *http.Client) *V1DashboardWorkspacesUIDSpectroClustersWorkloadsDeploymentParams { + var () + return &V1DashboardWorkspacesUIDSpectroClustersWorkloadsDeploymentParams{ + HTTPClient: client, + } +} + +/* +V1DashboardWorkspacesUIDSpectroClustersWorkloadsDeploymentParams contains all the parameters to send to the API endpoint +for the v1 dashboard workspaces Uid spectro clusters workloads deployment operation typically these are written to a http.Request +*/ +type V1DashboardWorkspacesUIDSpectroClustersWorkloadsDeploymentParams struct { + + /*Body*/ + Body *models.V1WorkspaceWorkloadsSpec + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 dashboard workspaces Uid spectro clusters workloads deployment params +func (o *V1DashboardWorkspacesUIDSpectroClustersWorkloadsDeploymentParams) WithTimeout(timeout time.Duration) *V1DashboardWorkspacesUIDSpectroClustersWorkloadsDeploymentParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 dashboard workspaces Uid spectro clusters workloads deployment params +func (o *V1DashboardWorkspacesUIDSpectroClustersWorkloadsDeploymentParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 dashboard workspaces Uid spectro clusters workloads deployment params +func (o *V1DashboardWorkspacesUIDSpectroClustersWorkloadsDeploymentParams) WithContext(ctx context.Context) *V1DashboardWorkspacesUIDSpectroClustersWorkloadsDeploymentParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 dashboard workspaces Uid spectro clusters workloads deployment params +func (o *V1DashboardWorkspacesUIDSpectroClustersWorkloadsDeploymentParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 dashboard workspaces Uid spectro clusters workloads deployment params +func (o *V1DashboardWorkspacesUIDSpectroClustersWorkloadsDeploymentParams) WithHTTPClient(client *http.Client) *V1DashboardWorkspacesUIDSpectroClustersWorkloadsDeploymentParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 dashboard workspaces Uid spectro clusters workloads deployment params +func (o *V1DashboardWorkspacesUIDSpectroClustersWorkloadsDeploymentParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 dashboard workspaces Uid spectro clusters workloads deployment params +func (o *V1DashboardWorkspacesUIDSpectroClustersWorkloadsDeploymentParams) WithBody(body *models.V1WorkspaceWorkloadsSpec) *V1DashboardWorkspacesUIDSpectroClustersWorkloadsDeploymentParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 dashboard workspaces Uid spectro clusters workloads deployment params +func (o *V1DashboardWorkspacesUIDSpectroClustersWorkloadsDeploymentParams) SetBody(body *models.V1WorkspaceWorkloadsSpec) { + o.Body = body +} + +// WithUID adds the uid to the v1 dashboard workspaces Uid spectro clusters workloads deployment params +func (o *V1DashboardWorkspacesUIDSpectroClustersWorkloadsDeploymentParams) WithUID(uid string) *V1DashboardWorkspacesUIDSpectroClustersWorkloadsDeploymentParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 dashboard workspaces Uid spectro clusters workloads deployment params +func (o *V1DashboardWorkspacesUIDSpectroClustersWorkloadsDeploymentParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1DashboardWorkspacesUIDSpectroClustersWorkloadsDeploymentParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_dashboard_workspaces_uid_spectro_clusters_workloads_deployment_responses.go b/api/client/v1/v1_dashboard_workspaces_uid_spectro_clusters_workloads_deployment_responses.go new file mode 100644 index 00000000..3c553ba9 --- /dev/null +++ b/api/client/v1/v1_dashboard_workspaces_uid_spectro_clusters_workloads_deployment_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1DashboardWorkspacesUIDSpectroClustersWorkloadsDeploymentReader is a Reader for the V1DashboardWorkspacesUIDSpectroClustersWorkloadsDeployment structure. +type V1DashboardWorkspacesUIDSpectroClustersWorkloadsDeploymentReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1DashboardWorkspacesUIDSpectroClustersWorkloadsDeploymentReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1DashboardWorkspacesUIDSpectroClustersWorkloadsDeploymentOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1DashboardWorkspacesUIDSpectroClustersWorkloadsDeploymentOK creates a V1DashboardWorkspacesUIDSpectroClustersWorkloadsDeploymentOK with default headers values +func NewV1DashboardWorkspacesUIDSpectroClustersWorkloadsDeploymentOK() *V1DashboardWorkspacesUIDSpectroClustersWorkloadsDeploymentOK { + return &V1DashboardWorkspacesUIDSpectroClustersWorkloadsDeploymentOK{} +} + +/* +V1DashboardWorkspacesUIDSpectroClustersWorkloadsDeploymentOK handles this case with default header values. + +An array of clusters workload deployments +*/ +type V1DashboardWorkspacesUIDSpectroClustersWorkloadsDeploymentOK struct { + Payload *models.V1WorkspaceClustersWorkloadDeployments +} + +func (o *V1DashboardWorkspacesUIDSpectroClustersWorkloadsDeploymentOK) Error() string { + return fmt.Sprintf("[POST /v1/dashboard/workspaces/{uid}/spectroclusters/workloads/deployment][%d] v1DashboardWorkspacesUidSpectroClustersWorkloadsDeploymentOK %+v", 200, o.Payload) +} + +func (o *V1DashboardWorkspacesUIDSpectroClustersWorkloadsDeploymentOK) GetPayload() *models.V1WorkspaceClustersWorkloadDeployments { + return o.Payload +} + +func (o *V1DashboardWorkspacesUIDSpectroClustersWorkloadsDeploymentOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1WorkspaceClustersWorkloadDeployments) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_dashboard_workspaces_uid_spectro_clusters_workloads_job_parameters.go b/api/client/v1/v1_dashboard_workspaces_uid_spectro_clusters_workloads_job_parameters.go new file mode 100644 index 00000000..378bd84b --- /dev/null +++ b/api/client/v1/v1_dashboard_workspaces_uid_spectro_clusters_workloads_job_parameters.go @@ -0,0 +1,154 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1DashboardWorkspacesUIDSpectroClustersWorkloadsJobParams creates a new V1DashboardWorkspacesUIDSpectroClustersWorkloadsJobParams object +// with the default values initialized. +func NewV1DashboardWorkspacesUIDSpectroClustersWorkloadsJobParams() *V1DashboardWorkspacesUIDSpectroClustersWorkloadsJobParams { + var () + return &V1DashboardWorkspacesUIDSpectroClustersWorkloadsJobParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1DashboardWorkspacesUIDSpectroClustersWorkloadsJobParamsWithTimeout creates a new V1DashboardWorkspacesUIDSpectroClustersWorkloadsJobParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1DashboardWorkspacesUIDSpectroClustersWorkloadsJobParamsWithTimeout(timeout time.Duration) *V1DashboardWorkspacesUIDSpectroClustersWorkloadsJobParams { + var () + return &V1DashboardWorkspacesUIDSpectroClustersWorkloadsJobParams{ + + timeout: timeout, + } +} + +// NewV1DashboardWorkspacesUIDSpectroClustersWorkloadsJobParamsWithContext creates a new V1DashboardWorkspacesUIDSpectroClustersWorkloadsJobParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1DashboardWorkspacesUIDSpectroClustersWorkloadsJobParamsWithContext(ctx context.Context) *V1DashboardWorkspacesUIDSpectroClustersWorkloadsJobParams { + var () + return &V1DashboardWorkspacesUIDSpectroClustersWorkloadsJobParams{ + + Context: ctx, + } +} + +// NewV1DashboardWorkspacesUIDSpectroClustersWorkloadsJobParamsWithHTTPClient creates a new V1DashboardWorkspacesUIDSpectroClustersWorkloadsJobParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1DashboardWorkspacesUIDSpectroClustersWorkloadsJobParamsWithHTTPClient(client *http.Client) *V1DashboardWorkspacesUIDSpectroClustersWorkloadsJobParams { + var () + return &V1DashboardWorkspacesUIDSpectroClustersWorkloadsJobParams{ + HTTPClient: client, + } +} + +/* +V1DashboardWorkspacesUIDSpectroClustersWorkloadsJobParams contains all the parameters to send to the API endpoint +for the v1 dashboard workspaces Uid spectro clusters workloads job operation typically these are written to a http.Request +*/ +type V1DashboardWorkspacesUIDSpectroClustersWorkloadsJobParams struct { + + /*Body*/ + Body *models.V1WorkspaceWorkloadsSpec + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 dashboard workspaces Uid spectro clusters workloads job params +func (o *V1DashboardWorkspacesUIDSpectroClustersWorkloadsJobParams) WithTimeout(timeout time.Duration) *V1DashboardWorkspacesUIDSpectroClustersWorkloadsJobParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 dashboard workspaces Uid spectro clusters workloads job params +func (o *V1DashboardWorkspacesUIDSpectroClustersWorkloadsJobParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 dashboard workspaces Uid spectro clusters workloads job params +func (o *V1DashboardWorkspacesUIDSpectroClustersWorkloadsJobParams) WithContext(ctx context.Context) *V1DashboardWorkspacesUIDSpectroClustersWorkloadsJobParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 dashboard workspaces Uid spectro clusters workloads job params +func (o *V1DashboardWorkspacesUIDSpectroClustersWorkloadsJobParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 dashboard workspaces Uid spectro clusters workloads job params +func (o *V1DashboardWorkspacesUIDSpectroClustersWorkloadsJobParams) WithHTTPClient(client *http.Client) *V1DashboardWorkspacesUIDSpectroClustersWorkloadsJobParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 dashboard workspaces Uid spectro clusters workloads job params +func (o *V1DashboardWorkspacesUIDSpectroClustersWorkloadsJobParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 dashboard workspaces Uid spectro clusters workloads job params +func (o *V1DashboardWorkspacesUIDSpectroClustersWorkloadsJobParams) WithBody(body *models.V1WorkspaceWorkloadsSpec) *V1DashboardWorkspacesUIDSpectroClustersWorkloadsJobParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 dashboard workspaces Uid spectro clusters workloads job params +func (o *V1DashboardWorkspacesUIDSpectroClustersWorkloadsJobParams) SetBody(body *models.V1WorkspaceWorkloadsSpec) { + o.Body = body +} + +// WithUID adds the uid to the v1 dashboard workspaces Uid spectro clusters workloads job params +func (o *V1DashboardWorkspacesUIDSpectroClustersWorkloadsJobParams) WithUID(uid string) *V1DashboardWorkspacesUIDSpectroClustersWorkloadsJobParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 dashboard workspaces Uid spectro clusters workloads job params +func (o *V1DashboardWorkspacesUIDSpectroClustersWorkloadsJobParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1DashboardWorkspacesUIDSpectroClustersWorkloadsJobParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_dashboard_workspaces_uid_spectro_clusters_workloads_job_responses.go b/api/client/v1/v1_dashboard_workspaces_uid_spectro_clusters_workloads_job_responses.go new file mode 100644 index 00000000..5a2b514e --- /dev/null +++ b/api/client/v1/v1_dashboard_workspaces_uid_spectro_clusters_workloads_job_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1DashboardWorkspacesUIDSpectroClustersWorkloadsJobReader is a Reader for the V1DashboardWorkspacesUIDSpectroClustersWorkloadsJob structure. +type V1DashboardWorkspacesUIDSpectroClustersWorkloadsJobReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1DashboardWorkspacesUIDSpectroClustersWorkloadsJobReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1DashboardWorkspacesUIDSpectroClustersWorkloadsJobOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1DashboardWorkspacesUIDSpectroClustersWorkloadsJobOK creates a V1DashboardWorkspacesUIDSpectroClustersWorkloadsJobOK with default headers values +func NewV1DashboardWorkspacesUIDSpectroClustersWorkloadsJobOK() *V1DashboardWorkspacesUIDSpectroClustersWorkloadsJobOK { + return &V1DashboardWorkspacesUIDSpectroClustersWorkloadsJobOK{} +} + +/* +V1DashboardWorkspacesUIDSpectroClustersWorkloadsJobOK handles this case with default header values. + +An array of clusters workload jobs +*/ +type V1DashboardWorkspacesUIDSpectroClustersWorkloadsJobOK struct { + Payload *models.V1WorkspaceClustersWorkloadJobs +} + +func (o *V1DashboardWorkspacesUIDSpectroClustersWorkloadsJobOK) Error() string { + return fmt.Sprintf("[POST /v1/dashboard/workspaces/{uid}/spectroclusters/workloads/job][%d] v1DashboardWorkspacesUidSpectroClustersWorkloadsJobOK %+v", 200, o.Payload) +} + +func (o *V1DashboardWorkspacesUIDSpectroClustersWorkloadsJobOK) GetPayload() *models.V1WorkspaceClustersWorkloadJobs { + return o.Payload +} + +func (o *V1DashboardWorkspacesUIDSpectroClustersWorkloadsJobOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1WorkspaceClustersWorkloadJobs) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_dashboard_workspaces_uid_spectro_clusters_workloads_namespace_parameters.go b/api/client/v1/v1_dashboard_workspaces_uid_spectro_clusters_workloads_namespace_parameters.go new file mode 100644 index 00000000..90cc79a0 --- /dev/null +++ b/api/client/v1/v1_dashboard_workspaces_uid_spectro_clusters_workloads_namespace_parameters.go @@ -0,0 +1,154 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1DashboardWorkspacesUIDSpectroClustersWorkloadsNamespaceParams creates a new V1DashboardWorkspacesUIDSpectroClustersWorkloadsNamespaceParams object +// with the default values initialized. +func NewV1DashboardWorkspacesUIDSpectroClustersWorkloadsNamespaceParams() *V1DashboardWorkspacesUIDSpectroClustersWorkloadsNamespaceParams { + var () + return &V1DashboardWorkspacesUIDSpectroClustersWorkloadsNamespaceParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1DashboardWorkspacesUIDSpectroClustersWorkloadsNamespaceParamsWithTimeout creates a new V1DashboardWorkspacesUIDSpectroClustersWorkloadsNamespaceParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1DashboardWorkspacesUIDSpectroClustersWorkloadsNamespaceParamsWithTimeout(timeout time.Duration) *V1DashboardWorkspacesUIDSpectroClustersWorkloadsNamespaceParams { + var () + return &V1DashboardWorkspacesUIDSpectroClustersWorkloadsNamespaceParams{ + + timeout: timeout, + } +} + +// NewV1DashboardWorkspacesUIDSpectroClustersWorkloadsNamespaceParamsWithContext creates a new V1DashboardWorkspacesUIDSpectroClustersWorkloadsNamespaceParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1DashboardWorkspacesUIDSpectroClustersWorkloadsNamespaceParamsWithContext(ctx context.Context) *V1DashboardWorkspacesUIDSpectroClustersWorkloadsNamespaceParams { + var () + return &V1DashboardWorkspacesUIDSpectroClustersWorkloadsNamespaceParams{ + + Context: ctx, + } +} + +// NewV1DashboardWorkspacesUIDSpectroClustersWorkloadsNamespaceParamsWithHTTPClient creates a new V1DashboardWorkspacesUIDSpectroClustersWorkloadsNamespaceParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1DashboardWorkspacesUIDSpectroClustersWorkloadsNamespaceParamsWithHTTPClient(client *http.Client) *V1DashboardWorkspacesUIDSpectroClustersWorkloadsNamespaceParams { + var () + return &V1DashboardWorkspacesUIDSpectroClustersWorkloadsNamespaceParams{ + HTTPClient: client, + } +} + +/* +V1DashboardWorkspacesUIDSpectroClustersWorkloadsNamespaceParams contains all the parameters to send to the API endpoint +for the v1 dashboard workspaces Uid spectro clusters workloads namespace operation typically these are written to a http.Request +*/ +type V1DashboardWorkspacesUIDSpectroClustersWorkloadsNamespaceParams struct { + + /*Body*/ + Body *models.V1WorkspaceWorkloadsSpec + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 dashboard workspaces Uid spectro clusters workloads namespace params +func (o *V1DashboardWorkspacesUIDSpectroClustersWorkloadsNamespaceParams) WithTimeout(timeout time.Duration) *V1DashboardWorkspacesUIDSpectroClustersWorkloadsNamespaceParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 dashboard workspaces Uid spectro clusters workloads namespace params +func (o *V1DashboardWorkspacesUIDSpectroClustersWorkloadsNamespaceParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 dashboard workspaces Uid spectro clusters workloads namespace params +func (o *V1DashboardWorkspacesUIDSpectroClustersWorkloadsNamespaceParams) WithContext(ctx context.Context) *V1DashboardWorkspacesUIDSpectroClustersWorkloadsNamespaceParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 dashboard workspaces Uid spectro clusters workloads namespace params +func (o *V1DashboardWorkspacesUIDSpectroClustersWorkloadsNamespaceParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 dashboard workspaces Uid spectro clusters workloads namespace params +func (o *V1DashboardWorkspacesUIDSpectroClustersWorkloadsNamespaceParams) WithHTTPClient(client *http.Client) *V1DashboardWorkspacesUIDSpectroClustersWorkloadsNamespaceParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 dashboard workspaces Uid spectro clusters workloads namespace params +func (o *V1DashboardWorkspacesUIDSpectroClustersWorkloadsNamespaceParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 dashboard workspaces Uid spectro clusters workloads namespace params +func (o *V1DashboardWorkspacesUIDSpectroClustersWorkloadsNamespaceParams) WithBody(body *models.V1WorkspaceWorkloadsSpec) *V1DashboardWorkspacesUIDSpectroClustersWorkloadsNamespaceParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 dashboard workspaces Uid spectro clusters workloads namespace params +func (o *V1DashboardWorkspacesUIDSpectroClustersWorkloadsNamespaceParams) SetBody(body *models.V1WorkspaceWorkloadsSpec) { + o.Body = body +} + +// WithUID adds the uid to the v1 dashboard workspaces Uid spectro clusters workloads namespace params +func (o *V1DashboardWorkspacesUIDSpectroClustersWorkloadsNamespaceParams) WithUID(uid string) *V1DashboardWorkspacesUIDSpectroClustersWorkloadsNamespaceParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 dashboard workspaces Uid spectro clusters workloads namespace params +func (o *V1DashboardWorkspacesUIDSpectroClustersWorkloadsNamespaceParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1DashboardWorkspacesUIDSpectroClustersWorkloadsNamespaceParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_dashboard_workspaces_uid_spectro_clusters_workloads_namespace_responses.go b/api/client/v1/v1_dashboard_workspaces_uid_spectro_clusters_workloads_namespace_responses.go new file mode 100644 index 00000000..4f72b49c --- /dev/null +++ b/api/client/v1/v1_dashboard_workspaces_uid_spectro_clusters_workloads_namespace_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1DashboardWorkspacesUIDSpectroClustersWorkloadsNamespaceReader is a Reader for the V1DashboardWorkspacesUIDSpectroClustersWorkloadsNamespace structure. +type V1DashboardWorkspacesUIDSpectroClustersWorkloadsNamespaceReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1DashboardWorkspacesUIDSpectroClustersWorkloadsNamespaceReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1DashboardWorkspacesUIDSpectroClustersWorkloadsNamespaceOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1DashboardWorkspacesUIDSpectroClustersWorkloadsNamespaceOK creates a V1DashboardWorkspacesUIDSpectroClustersWorkloadsNamespaceOK with default headers values +func NewV1DashboardWorkspacesUIDSpectroClustersWorkloadsNamespaceOK() *V1DashboardWorkspacesUIDSpectroClustersWorkloadsNamespaceOK { + return &V1DashboardWorkspacesUIDSpectroClustersWorkloadsNamespaceOK{} +} + +/* +V1DashboardWorkspacesUIDSpectroClustersWorkloadsNamespaceOK handles this case with default header values. + +An array of clusters workload namespaces +*/ +type V1DashboardWorkspacesUIDSpectroClustersWorkloadsNamespaceOK struct { + Payload *models.V1WorkspaceClustersWorkloadNamespaces +} + +func (o *V1DashboardWorkspacesUIDSpectroClustersWorkloadsNamespaceOK) Error() string { + return fmt.Sprintf("[POST /v1/dashboard/workspaces/{uid}/spectroclusters/workloads/namespace][%d] v1DashboardWorkspacesUidSpectroClustersWorkloadsNamespaceOK %+v", 200, o.Payload) +} + +func (o *V1DashboardWorkspacesUIDSpectroClustersWorkloadsNamespaceOK) GetPayload() *models.V1WorkspaceClustersWorkloadNamespaces { + return o.Payload +} + +func (o *V1DashboardWorkspacesUIDSpectroClustersWorkloadsNamespaceOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1WorkspaceClustersWorkloadNamespaces) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_dashboard_workspaces_uid_spectro_clusters_workloads_pod_parameters.go b/api/client/v1/v1_dashboard_workspaces_uid_spectro_clusters_workloads_pod_parameters.go new file mode 100644 index 00000000..5f4946f1 --- /dev/null +++ b/api/client/v1/v1_dashboard_workspaces_uid_spectro_clusters_workloads_pod_parameters.go @@ -0,0 +1,154 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1DashboardWorkspacesUIDSpectroClustersWorkloadsPodParams creates a new V1DashboardWorkspacesUIDSpectroClustersWorkloadsPodParams object +// with the default values initialized. +func NewV1DashboardWorkspacesUIDSpectroClustersWorkloadsPodParams() *V1DashboardWorkspacesUIDSpectroClustersWorkloadsPodParams { + var () + return &V1DashboardWorkspacesUIDSpectroClustersWorkloadsPodParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1DashboardWorkspacesUIDSpectroClustersWorkloadsPodParamsWithTimeout creates a new V1DashboardWorkspacesUIDSpectroClustersWorkloadsPodParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1DashboardWorkspacesUIDSpectroClustersWorkloadsPodParamsWithTimeout(timeout time.Duration) *V1DashboardWorkspacesUIDSpectroClustersWorkloadsPodParams { + var () + return &V1DashboardWorkspacesUIDSpectroClustersWorkloadsPodParams{ + + timeout: timeout, + } +} + +// NewV1DashboardWorkspacesUIDSpectroClustersWorkloadsPodParamsWithContext creates a new V1DashboardWorkspacesUIDSpectroClustersWorkloadsPodParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1DashboardWorkspacesUIDSpectroClustersWorkloadsPodParamsWithContext(ctx context.Context) *V1DashboardWorkspacesUIDSpectroClustersWorkloadsPodParams { + var () + return &V1DashboardWorkspacesUIDSpectroClustersWorkloadsPodParams{ + + Context: ctx, + } +} + +// NewV1DashboardWorkspacesUIDSpectroClustersWorkloadsPodParamsWithHTTPClient creates a new V1DashboardWorkspacesUIDSpectroClustersWorkloadsPodParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1DashboardWorkspacesUIDSpectroClustersWorkloadsPodParamsWithHTTPClient(client *http.Client) *V1DashboardWorkspacesUIDSpectroClustersWorkloadsPodParams { + var () + return &V1DashboardWorkspacesUIDSpectroClustersWorkloadsPodParams{ + HTTPClient: client, + } +} + +/* +V1DashboardWorkspacesUIDSpectroClustersWorkloadsPodParams contains all the parameters to send to the API endpoint +for the v1 dashboard workspaces Uid spectro clusters workloads pod operation typically these are written to a http.Request +*/ +type V1DashboardWorkspacesUIDSpectroClustersWorkloadsPodParams struct { + + /*Body*/ + Body *models.V1WorkspaceWorkloadsSpec + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 dashboard workspaces Uid spectro clusters workloads pod params +func (o *V1DashboardWorkspacesUIDSpectroClustersWorkloadsPodParams) WithTimeout(timeout time.Duration) *V1DashboardWorkspacesUIDSpectroClustersWorkloadsPodParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 dashboard workspaces Uid spectro clusters workloads pod params +func (o *V1DashboardWorkspacesUIDSpectroClustersWorkloadsPodParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 dashboard workspaces Uid spectro clusters workloads pod params +func (o *V1DashboardWorkspacesUIDSpectroClustersWorkloadsPodParams) WithContext(ctx context.Context) *V1DashboardWorkspacesUIDSpectroClustersWorkloadsPodParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 dashboard workspaces Uid spectro clusters workloads pod params +func (o *V1DashboardWorkspacesUIDSpectroClustersWorkloadsPodParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 dashboard workspaces Uid spectro clusters workloads pod params +func (o *V1DashboardWorkspacesUIDSpectroClustersWorkloadsPodParams) WithHTTPClient(client *http.Client) *V1DashboardWorkspacesUIDSpectroClustersWorkloadsPodParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 dashboard workspaces Uid spectro clusters workloads pod params +func (o *V1DashboardWorkspacesUIDSpectroClustersWorkloadsPodParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 dashboard workspaces Uid spectro clusters workloads pod params +func (o *V1DashboardWorkspacesUIDSpectroClustersWorkloadsPodParams) WithBody(body *models.V1WorkspaceWorkloadsSpec) *V1DashboardWorkspacesUIDSpectroClustersWorkloadsPodParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 dashboard workspaces Uid spectro clusters workloads pod params +func (o *V1DashboardWorkspacesUIDSpectroClustersWorkloadsPodParams) SetBody(body *models.V1WorkspaceWorkloadsSpec) { + o.Body = body +} + +// WithUID adds the uid to the v1 dashboard workspaces Uid spectro clusters workloads pod params +func (o *V1DashboardWorkspacesUIDSpectroClustersWorkloadsPodParams) WithUID(uid string) *V1DashboardWorkspacesUIDSpectroClustersWorkloadsPodParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 dashboard workspaces Uid spectro clusters workloads pod params +func (o *V1DashboardWorkspacesUIDSpectroClustersWorkloadsPodParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1DashboardWorkspacesUIDSpectroClustersWorkloadsPodParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_dashboard_workspaces_uid_spectro_clusters_workloads_pod_responses.go b/api/client/v1/v1_dashboard_workspaces_uid_spectro_clusters_workloads_pod_responses.go new file mode 100644 index 00000000..6315a92e --- /dev/null +++ b/api/client/v1/v1_dashboard_workspaces_uid_spectro_clusters_workloads_pod_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1DashboardWorkspacesUIDSpectroClustersWorkloadsPodReader is a Reader for the V1DashboardWorkspacesUIDSpectroClustersWorkloadsPod structure. +type V1DashboardWorkspacesUIDSpectroClustersWorkloadsPodReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1DashboardWorkspacesUIDSpectroClustersWorkloadsPodReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1DashboardWorkspacesUIDSpectroClustersWorkloadsPodOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1DashboardWorkspacesUIDSpectroClustersWorkloadsPodOK creates a V1DashboardWorkspacesUIDSpectroClustersWorkloadsPodOK with default headers values +func NewV1DashboardWorkspacesUIDSpectroClustersWorkloadsPodOK() *V1DashboardWorkspacesUIDSpectroClustersWorkloadsPodOK { + return &V1DashboardWorkspacesUIDSpectroClustersWorkloadsPodOK{} +} + +/* +V1DashboardWorkspacesUIDSpectroClustersWorkloadsPodOK handles this case with default header values. + +An array of clusters workload pods +*/ +type V1DashboardWorkspacesUIDSpectroClustersWorkloadsPodOK struct { + Payload *models.V1WorkspaceClustersWorkloadPods +} + +func (o *V1DashboardWorkspacesUIDSpectroClustersWorkloadsPodOK) Error() string { + return fmt.Sprintf("[POST /v1/dashboard/workspaces/{uid}/spectroclusters/workloads/pod][%d] v1DashboardWorkspacesUidSpectroClustersWorkloadsPodOK %+v", 200, o.Payload) +} + +func (o *V1DashboardWorkspacesUIDSpectroClustersWorkloadsPodOK) GetPayload() *models.V1WorkspaceClustersWorkloadPods { + return o.Payload +} + +func (o *V1DashboardWorkspacesUIDSpectroClustersWorkloadsPodOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1WorkspaceClustersWorkloadPods) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_dashboard_workspaces_uid_spectro_clusters_workloads_role_binding_parameters.go b/api/client/v1/v1_dashboard_workspaces_uid_spectro_clusters_workloads_role_binding_parameters.go new file mode 100644 index 00000000..655b07f4 --- /dev/null +++ b/api/client/v1/v1_dashboard_workspaces_uid_spectro_clusters_workloads_role_binding_parameters.go @@ -0,0 +1,154 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1DashboardWorkspacesUIDSpectroClustersWorkloadsRoleBindingParams creates a new V1DashboardWorkspacesUIDSpectroClustersWorkloadsRoleBindingParams object +// with the default values initialized. +func NewV1DashboardWorkspacesUIDSpectroClustersWorkloadsRoleBindingParams() *V1DashboardWorkspacesUIDSpectroClustersWorkloadsRoleBindingParams { + var () + return &V1DashboardWorkspacesUIDSpectroClustersWorkloadsRoleBindingParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1DashboardWorkspacesUIDSpectroClustersWorkloadsRoleBindingParamsWithTimeout creates a new V1DashboardWorkspacesUIDSpectroClustersWorkloadsRoleBindingParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1DashboardWorkspacesUIDSpectroClustersWorkloadsRoleBindingParamsWithTimeout(timeout time.Duration) *V1DashboardWorkspacesUIDSpectroClustersWorkloadsRoleBindingParams { + var () + return &V1DashboardWorkspacesUIDSpectroClustersWorkloadsRoleBindingParams{ + + timeout: timeout, + } +} + +// NewV1DashboardWorkspacesUIDSpectroClustersWorkloadsRoleBindingParamsWithContext creates a new V1DashboardWorkspacesUIDSpectroClustersWorkloadsRoleBindingParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1DashboardWorkspacesUIDSpectroClustersWorkloadsRoleBindingParamsWithContext(ctx context.Context) *V1DashboardWorkspacesUIDSpectroClustersWorkloadsRoleBindingParams { + var () + return &V1DashboardWorkspacesUIDSpectroClustersWorkloadsRoleBindingParams{ + + Context: ctx, + } +} + +// NewV1DashboardWorkspacesUIDSpectroClustersWorkloadsRoleBindingParamsWithHTTPClient creates a new V1DashboardWorkspacesUIDSpectroClustersWorkloadsRoleBindingParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1DashboardWorkspacesUIDSpectroClustersWorkloadsRoleBindingParamsWithHTTPClient(client *http.Client) *V1DashboardWorkspacesUIDSpectroClustersWorkloadsRoleBindingParams { + var () + return &V1DashboardWorkspacesUIDSpectroClustersWorkloadsRoleBindingParams{ + HTTPClient: client, + } +} + +/* +V1DashboardWorkspacesUIDSpectroClustersWorkloadsRoleBindingParams contains all the parameters to send to the API endpoint +for the v1 dashboard workspaces Uid spectro clusters workloads role binding operation typically these are written to a http.Request +*/ +type V1DashboardWorkspacesUIDSpectroClustersWorkloadsRoleBindingParams struct { + + /*Body*/ + Body *models.V1WorkspaceWorkloadsSpec + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 dashboard workspaces Uid spectro clusters workloads role binding params +func (o *V1DashboardWorkspacesUIDSpectroClustersWorkloadsRoleBindingParams) WithTimeout(timeout time.Duration) *V1DashboardWorkspacesUIDSpectroClustersWorkloadsRoleBindingParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 dashboard workspaces Uid spectro clusters workloads role binding params +func (o *V1DashboardWorkspacesUIDSpectroClustersWorkloadsRoleBindingParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 dashboard workspaces Uid spectro clusters workloads role binding params +func (o *V1DashboardWorkspacesUIDSpectroClustersWorkloadsRoleBindingParams) WithContext(ctx context.Context) *V1DashboardWorkspacesUIDSpectroClustersWorkloadsRoleBindingParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 dashboard workspaces Uid spectro clusters workloads role binding params +func (o *V1DashboardWorkspacesUIDSpectroClustersWorkloadsRoleBindingParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 dashboard workspaces Uid spectro clusters workloads role binding params +func (o *V1DashboardWorkspacesUIDSpectroClustersWorkloadsRoleBindingParams) WithHTTPClient(client *http.Client) *V1DashboardWorkspacesUIDSpectroClustersWorkloadsRoleBindingParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 dashboard workspaces Uid spectro clusters workloads role binding params +func (o *V1DashboardWorkspacesUIDSpectroClustersWorkloadsRoleBindingParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 dashboard workspaces Uid spectro clusters workloads role binding params +func (o *V1DashboardWorkspacesUIDSpectroClustersWorkloadsRoleBindingParams) WithBody(body *models.V1WorkspaceWorkloadsSpec) *V1DashboardWorkspacesUIDSpectroClustersWorkloadsRoleBindingParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 dashboard workspaces Uid spectro clusters workloads role binding params +func (o *V1DashboardWorkspacesUIDSpectroClustersWorkloadsRoleBindingParams) SetBody(body *models.V1WorkspaceWorkloadsSpec) { + o.Body = body +} + +// WithUID adds the uid to the v1 dashboard workspaces Uid spectro clusters workloads role binding params +func (o *V1DashboardWorkspacesUIDSpectroClustersWorkloadsRoleBindingParams) WithUID(uid string) *V1DashboardWorkspacesUIDSpectroClustersWorkloadsRoleBindingParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 dashboard workspaces Uid spectro clusters workloads role binding params +func (o *V1DashboardWorkspacesUIDSpectroClustersWorkloadsRoleBindingParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1DashboardWorkspacesUIDSpectroClustersWorkloadsRoleBindingParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_dashboard_workspaces_uid_spectro_clusters_workloads_role_binding_responses.go b/api/client/v1/v1_dashboard_workspaces_uid_spectro_clusters_workloads_role_binding_responses.go new file mode 100644 index 00000000..7956bf65 --- /dev/null +++ b/api/client/v1/v1_dashboard_workspaces_uid_spectro_clusters_workloads_role_binding_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1DashboardWorkspacesUIDSpectroClustersWorkloadsRoleBindingReader is a Reader for the V1DashboardWorkspacesUIDSpectroClustersWorkloadsRoleBinding structure. +type V1DashboardWorkspacesUIDSpectroClustersWorkloadsRoleBindingReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1DashboardWorkspacesUIDSpectroClustersWorkloadsRoleBindingReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1DashboardWorkspacesUIDSpectroClustersWorkloadsRoleBindingOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1DashboardWorkspacesUIDSpectroClustersWorkloadsRoleBindingOK creates a V1DashboardWorkspacesUIDSpectroClustersWorkloadsRoleBindingOK with default headers values +func NewV1DashboardWorkspacesUIDSpectroClustersWorkloadsRoleBindingOK() *V1DashboardWorkspacesUIDSpectroClustersWorkloadsRoleBindingOK { + return &V1DashboardWorkspacesUIDSpectroClustersWorkloadsRoleBindingOK{} +} + +/* +V1DashboardWorkspacesUIDSpectroClustersWorkloadsRoleBindingOK handles this case with default header values. + +An array of clusters workload rolebindings +*/ +type V1DashboardWorkspacesUIDSpectroClustersWorkloadsRoleBindingOK struct { + Payload *models.V1WorkspaceClustersWorkloadRoleBindings +} + +func (o *V1DashboardWorkspacesUIDSpectroClustersWorkloadsRoleBindingOK) Error() string { + return fmt.Sprintf("[POST /v1/dashboard/workspaces/{uid}/spectroclusters/workloads/rolebinding][%d] v1DashboardWorkspacesUidSpectroClustersWorkloadsRoleBindingOK %+v", 200, o.Payload) +} + +func (o *V1DashboardWorkspacesUIDSpectroClustersWorkloadsRoleBindingOK) GetPayload() *models.V1WorkspaceClustersWorkloadRoleBindings { + return o.Payload +} + +func (o *V1DashboardWorkspacesUIDSpectroClustersWorkloadsRoleBindingOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1WorkspaceClustersWorkloadRoleBindings) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_dashboard_workspaces_uid_spectro_clusters_workloads_stateful_set_parameters.go b/api/client/v1/v1_dashboard_workspaces_uid_spectro_clusters_workloads_stateful_set_parameters.go new file mode 100644 index 00000000..4600949d --- /dev/null +++ b/api/client/v1/v1_dashboard_workspaces_uid_spectro_clusters_workloads_stateful_set_parameters.go @@ -0,0 +1,154 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1DashboardWorkspacesUIDSpectroClustersWorkloadsStatefulSetParams creates a new V1DashboardWorkspacesUIDSpectroClustersWorkloadsStatefulSetParams object +// with the default values initialized. +func NewV1DashboardWorkspacesUIDSpectroClustersWorkloadsStatefulSetParams() *V1DashboardWorkspacesUIDSpectroClustersWorkloadsStatefulSetParams { + var () + return &V1DashboardWorkspacesUIDSpectroClustersWorkloadsStatefulSetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1DashboardWorkspacesUIDSpectroClustersWorkloadsStatefulSetParamsWithTimeout creates a new V1DashboardWorkspacesUIDSpectroClustersWorkloadsStatefulSetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1DashboardWorkspacesUIDSpectroClustersWorkloadsStatefulSetParamsWithTimeout(timeout time.Duration) *V1DashboardWorkspacesUIDSpectroClustersWorkloadsStatefulSetParams { + var () + return &V1DashboardWorkspacesUIDSpectroClustersWorkloadsStatefulSetParams{ + + timeout: timeout, + } +} + +// NewV1DashboardWorkspacesUIDSpectroClustersWorkloadsStatefulSetParamsWithContext creates a new V1DashboardWorkspacesUIDSpectroClustersWorkloadsStatefulSetParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1DashboardWorkspacesUIDSpectroClustersWorkloadsStatefulSetParamsWithContext(ctx context.Context) *V1DashboardWorkspacesUIDSpectroClustersWorkloadsStatefulSetParams { + var () + return &V1DashboardWorkspacesUIDSpectroClustersWorkloadsStatefulSetParams{ + + Context: ctx, + } +} + +// NewV1DashboardWorkspacesUIDSpectroClustersWorkloadsStatefulSetParamsWithHTTPClient creates a new V1DashboardWorkspacesUIDSpectroClustersWorkloadsStatefulSetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1DashboardWorkspacesUIDSpectroClustersWorkloadsStatefulSetParamsWithHTTPClient(client *http.Client) *V1DashboardWorkspacesUIDSpectroClustersWorkloadsStatefulSetParams { + var () + return &V1DashboardWorkspacesUIDSpectroClustersWorkloadsStatefulSetParams{ + HTTPClient: client, + } +} + +/* +V1DashboardWorkspacesUIDSpectroClustersWorkloadsStatefulSetParams contains all the parameters to send to the API endpoint +for the v1 dashboard workspaces Uid spectro clusters workloads stateful set operation typically these are written to a http.Request +*/ +type V1DashboardWorkspacesUIDSpectroClustersWorkloadsStatefulSetParams struct { + + /*Body*/ + Body *models.V1WorkspaceWorkloadsSpec + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 dashboard workspaces Uid spectro clusters workloads stateful set params +func (o *V1DashboardWorkspacesUIDSpectroClustersWorkloadsStatefulSetParams) WithTimeout(timeout time.Duration) *V1DashboardWorkspacesUIDSpectroClustersWorkloadsStatefulSetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 dashboard workspaces Uid spectro clusters workloads stateful set params +func (o *V1DashboardWorkspacesUIDSpectroClustersWorkloadsStatefulSetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 dashboard workspaces Uid spectro clusters workloads stateful set params +func (o *V1DashboardWorkspacesUIDSpectroClustersWorkloadsStatefulSetParams) WithContext(ctx context.Context) *V1DashboardWorkspacesUIDSpectroClustersWorkloadsStatefulSetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 dashboard workspaces Uid spectro clusters workloads stateful set params +func (o *V1DashboardWorkspacesUIDSpectroClustersWorkloadsStatefulSetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 dashboard workspaces Uid spectro clusters workloads stateful set params +func (o *V1DashboardWorkspacesUIDSpectroClustersWorkloadsStatefulSetParams) WithHTTPClient(client *http.Client) *V1DashboardWorkspacesUIDSpectroClustersWorkloadsStatefulSetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 dashboard workspaces Uid spectro clusters workloads stateful set params +func (o *V1DashboardWorkspacesUIDSpectroClustersWorkloadsStatefulSetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 dashboard workspaces Uid spectro clusters workloads stateful set params +func (o *V1DashboardWorkspacesUIDSpectroClustersWorkloadsStatefulSetParams) WithBody(body *models.V1WorkspaceWorkloadsSpec) *V1DashboardWorkspacesUIDSpectroClustersWorkloadsStatefulSetParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 dashboard workspaces Uid spectro clusters workloads stateful set params +func (o *V1DashboardWorkspacesUIDSpectroClustersWorkloadsStatefulSetParams) SetBody(body *models.V1WorkspaceWorkloadsSpec) { + o.Body = body +} + +// WithUID adds the uid to the v1 dashboard workspaces Uid spectro clusters workloads stateful set params +func (o *V1DashboardWorkspacesUIDSpectroClustersWorkloadsStatefulSetParams) WithUID(uid string) *V1DashboardWorkspacesUIDSpectroClustersWorkloadsStatefulSetParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 dashboard workspaces Uid spectro clusters workloads stateful set params +func (o *V1DashboardWorkspacesUIDSpectroClustersWorkloadsStatefulSetParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1DashboardWorkspacesUIDSpectroClustersWorkloadsStatefulSetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_dashboard_workspaces_uid_spectro_clusters_workloads_stateful_set_responses.go b/api/client/v1/v1_dashboard_workspaces_uid_spectro_clusters_workloads_stateful_set_responses.go new file mode 100644 index 00000000..414198de --- /dev/null +++ b/api/client/v1/v1_dashboard_workspaces_uid_spectro_clusters_workloads_stateful_set_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1DashboardWorkspacesUIDSpectroClustersWorkloadsStatefulSetReader is a Reader for the V1DashboardWorkspacesUIDSpectroClustersWorkloadsStatefulSet structure. +type V1DashboardWorkspacesUIDSpectroClustersWorkloadsStatefulSetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1DashboardWorkspacesUIDSpectroClustersWorkloadsStatefulSetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1DashboardWorkspacesUIDSpectroClustersWorkloadsStatefulSetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1DashboardWorkspacesUIDSpectroClustersWorkloadsStatefulSetOK creates a V1DashboardWorkspacesUIDSpectroClustersWorkloadsStatefulSetOK with default headers values +func NewV1DashboardWorkspacesUIDSpectroClustersWorkloadsStatefulSetOK() *V1DashboardWorkspacesUIDSpectroClustersWorkloadsStatefulSetOK { + return &V1DashboardWorkspacesUIDSpectroClustersWorkloadsStatefulSetOK{} +} + +/* +V1DashboardWorkspacesUIDSpectroClustersWorkloadsStatefulSetOK handles this case with default header values. + +An array of clusters workload statefulsets +*/ +type V1DashboardWorkspacesUIDSpectroClustersWorkloadsStatefulSetOK struct { + Payload *models.V1WorkspaceClustersWorkloadStatefulSets +} + +func (o *V1DashboardWorkspacesUIDSpectroClustersWorkloadsStatefulSetOK) Error() string { + return fmt.Sprintf("[POST /v1/dashboard/workspaces/{uid}/spectroclusters/workloads/statefulset][%d] v1DashboardWorkspacesUidSpectroClustersWorkloadsStatefulSetOK %+v", 200, o.Payload) +} + +func (o *V1DashboardWorkspacesUIDSpectroClustersWorkloadsStatefulSetOK) GetPayload() *models.V1WorkspaceClustersWorkloadStatefulSets { + return o.Payload +} + +func (o *V1DashboardWorkspacesUIDSpectroClustersWorkloadsStatefulSetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1WorkspaceClustersWorkloadStatefulSets) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_data_sinks_cloud_watch_sink_parameters.go b/api/client/v1/v1_data_sinks_cloud_watch_sink_parameters.go new file mode 100644 index 00000000..332cea27 --- /dev/null +++ b/api/client/v1/v1_data_sinks_cloud_watch_sink_parameters.go @@ -0,0 +1,139 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1DataSinksCloudWatchSinkParams creates a new V1DataSinksCloudWatchSinkParams object +// with the default values initialized. +func NewV1DataSinksCloudWatchSinkParams() *V1DataSinksCloudWatchSinkParams { + var () + return &V1DataSinksCloudWatchSinkParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1DataSinksCloudWatchSinkParamsWithTimeout creates a new V1DataSinksCloudWatchSinkParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1DataSinksCloudWatchSinkParamsWithTimeout(timeout time.Duration) *V1DataSinksCloudWatchSinkParams { + var () + return &V1DataSinksCloudWatchSinkParams{ + + timeout: timeout, + } +} + +// NewV1DataSinksCloudWatchSinkParamsWithContext creates a new V1DataSinksCloudWatchSinkParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1DataSinksCloudWatchSinkParamsWithContext(ctx context.Context) *V1DataSinksCloudWatchSinkParams { + var () + return &V1DataSinksCloudWatchSinkParams{ + + Context: ctx, + } +} + +// NewV1DataSinksCloudWatchSinkParamsWithHTTPClient creates a new V1DataSinksCloudWatchSinkParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1DataSinksCloudWatchSinkParamsWithHTTPClient(client *http.Client) *V1DataSinksCloudWatchSinkParams { + var () + return &V1DataSinksCloudWatchSinkParams{ + HTTPClient: client, + } +} + +/* +V1DataSinksCloudWatchSinkParams contains all the parameters to send to the API endpoint +for the v1 data sinks cloud watch sink operation typically these are written to a http.Request +*/ +type V1DataSinksCloudWatchSinkParams struct { + + /*DataSinkCloudWatchConfig + Request payload for cloud watch config + + */ + DataSinkCloudWatchConfig *models.V1DataSinkCloudWatchConfig + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 data sinks cloud watch sink params +func (o *V1DataSinksCloudWatchSinkParams) WithTimeout(timeout time.Duration) *V1DataSinksCloudWatchSinkParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 data sinks cloud watch sink params +func (o *V1DataSinksCloudWatchSinkParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 data sinks cloud watch sink params +func (o *V1DataSinksCloudWatchSinkParams) WithContext(ctx context.Context) *V1DataSinksCloudWatchSinkParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 data sinks cloud watch sink params +func (o *V1DataSinksCloudWatchSinkParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 data sinks cloud watch sink params +func (o *V1DataSinksCloudWatchSinkParams) WithHTTPClient(client *http.Client) *V1DataSinksCloudWatchSinkParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 data sinks cloud watch sink params +func (o *V1DataSinksCloudWatchSinkParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithDataSinkCloudWatchConfig adds the dataSinkCloudWatchConfig to the v1 data sinks cloud watch sink params +func (o *V1DataSinksCloudWatchSinkParams) WithDataSinkCloudWatchConfig(dataSinkCloudWatchConfig *models.V1DataSinkCloudWatchConfig) *V1DataSinksCloudWatchSinkParams { + o.SetDataSinkCloudWatchConfig(dataSinkCloudWatchConfig) + return o +} + +// SetDataSinkCloudWatchConfig adds the dataSinkCloudWatchConfig to the v1 data sinks cloud watch sink params +func (o *V1DataSinksCloudWatchSinkParams) SetDataSinkCloudWatchConfig(dataSinkCloudWatchConfig *models.V1DataSinkCloudWatchConfig) { + o.DataSinkCloudWatchConfig = dataSinkCloudWatchConfig +} + +// WriteToRequest writes these params to a swagger request +func (o *V1DataSinksCloudWatchSinkParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.DataSinkCloudWatchConfig != nil { + if err := r.SetBodyParam(o.DataSinkCloudWatchConfig); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_data_sinks_cloud_watch_sink_responses.go b/api/client/v1/v1_data_sinks_cloud_watch_sink_responses.go new file mode 100644 index 00000000..292f182c --- /dev/null +++ b/api/client/v1/v1_data_sinks_cloud_watch_sink_responses.go @@ -0,0 +1,61 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1DataSinksCloudWatchSinkReader is a Reader for the V1DataSinksCloudWatchSink structure. +type V1DataSinksCloudWatchSinkReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1DataSinksCloudWatchSinkReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1DataSinksCloudWatchSinkNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1DataSinksCloudWatchSinkNoContent creates a V1DataSinksCloudWatchSinkNoContent with default headers values +func NewV1DataSinksCloudWatchSinkNoContent() *V1DataSinksCloudWatchSinkNoContent { + return &V1DataSinksCloudWatchSinkNoContent{} +} + +/* +V1DataSinksCloudWatchSinkNoContent handles this case with default header values. + +Ok response without content +*/ +type V1DataSinksCloudWatchSinkNoContent struct { + /*Audit uid for the request + */ + AuditUID string +} + +func (o *V1DataSinksCloudWatchSinkNoContent) Error() string { + return fmt.Sprintf("[POST /v1/datasinks/cloudwatch][%d] v1DataSinksCloudWatchSinkNoContent ", 204) +} + +func (o *V1DataSinksCloudWatchSinkNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header AuditUid + o.AuditUID = response.GetHeader("AuditUid") + + return nil +} diff --git a/api/client/v1/v1_ecr_registries_create_parameters.go b/api/client/v1/v1_ecr_registries_create_parameters.go new file mode 100644 index 00000000..d48a1518 --- /dev/null +++ b/api/client/v1/v1_ecr_registries_create_parameters.go @@ -0,0 +1,178 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1EcrRegistriesCreateParams creates a new V1EcrRegistriesCreateParams object +// with the default values initialized. +func NewV1EcrRegistriesCreateParams() *V1EcrRegistriesCreateParams { + var ( + skipPackSyncDefault = bool(false) + ) + return &V1EcrRegistriesCreateParams{ + SkipPackSync: &skipPackSyncDefault, + + timeout: cr.DefaultTimeout, + } +} + +// NewV1EcrRegistriesCreateParamsWithTimeout creates a new V1EcrRegistriesCreateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1EcrRegistriesCreateParamsWithTimeout(timeout time.Duration) *V1EcrRegistriesCreateParams { + var ( + skipPackSyncDefault = bool(false) + ) + return &V1EcrRegistriesCreateParams{ + SkipPackSync: &skipPackSyncDefault, + + timeout: timeout, + } +} + +// NewV1EcrRegistriesCreateParamsWithContext creates a new V1EcrRegistriesCreateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1EcrRegistriesCreateParamsWithContext(ctx context.Context) *V1EcrRegistriesCreateParams { + var ( + skipPackSyncDefault = bool(false) + ) + return &V1EcrRegistriesCreateParams{ + SkipPackSync: &skipPackSyncDefault, + + Context: ctx, + } +} + +// NewV1EcrRegistriesCreateParamsWithHTTPClient creates a new V1EcrRegistriesCreateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1EcrRegistriesCreateParamsWithHTTPClient(client *http.Client) *V1EcrRegistriesCreateParams { + var ( + skipPackSyncDefault = bool(false) + ) + return &V1EcrRegistriesCreateParams{ + SkipPackSync: &skipPackSyncDefault, + HTTPClient: client, + } +} + +/* +V1EcrRegistriesCreateParams contains all the parameters to send to the API endpoint +for the v1 ecr registries create operation typically these are written to a http.Request +*/ +type V1EcrRegistriesCreateParams struct { + + /*Body*/ + Body *models.V1EcrRegistry + /*SkipPackSync*/ + SkipPackSync *bool + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 ecr registries create params +func (o *V1EcrRegistriesCreateParams) WithTimeout(timeout time.Duration) *V1EcrRegistriesCreateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 ecr registries create params +func (o *V1EcrRegistriesCreateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 ecr registries create params +func (o *V1EcrRegistriesCreateParams) WithContext(ctx context.Context) *V1EcrRegistriesCreateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 ecr registries create params +func (o *V1EcrRegistriesCreateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 ecr registries create params +func (o *V1EcrRegistriesCreateParams) WithHTTPClient(client *http.Client) *V1EcrRegistriesCreateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 ecr registries create params +func (o *V1EcrRegistriesCreateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 ecr registries create params +func (o *V1EcrRegistriesCreateParams) WithBody(body *models.V1EcrRegistry) *V1EcrRegistriesCreateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 ecr registries create params +func (o *V1EcrRegistriesCreateParams) SetBody(body *models.V1EcrRegistry) { + o.Body = body +} + +// WithSkipPackSync adds the skipPackSync to the v1 ecr registries create params +func (o *V1EcrRegistriesCreateParams) WithSkipPackSync(skipPackSync *bool) *V1EcrRegistriesCreateParams { + o.SetSkipPackSync(skipPackSync) + return o +} + +// SetSkipPackSync adds the skipPackSync to the v1 ecr registries create params +func (o *V1EcrRegistriesCreateParams) SetSkipPackSync(skipPackSync *bool) { + o.SkipPackSync = skipPackSync +} + +// WriteToRequest writes these params to a swagger request +func (o *V1EcrRegistriesCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + if o.SkipPackSync != nil { + + // query param skipPackSync + var qrSkipPackSync bool + if o.SkipPackSync != nil { + qrSkipPackSync = *o.SkipPackSync + } + qSkipPackSync := swag.FormatBool(qrSkipPackSync) + if qSkipPackSync != "" { + if err := r.SetQueryParam("skipPackSync", qSkipPackSync); err != nil { + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_ecr_registries_create_responses.go b/api/client/v1/v1_ecr_registries_create_responses.go new file mode 100644 index 00000000..1c3ccc95 --- /dev/null +++ b/api/client/v1/v1_ecr_registries_create_responses.go @@ -0,0 +1,77 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1EcrRegistriesCreateReader is a Reader for the V1EcrRegistriesCreate structure. +type V1EcrRegistriesCreateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1EcrRegistriesCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 201: + result := NewV1EcrRegistriesCreateCreated() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1EcrRegistriesCreateCreated creates a V1EcrRegistriesCreateCreated with default headers values +func NewV1EcrRegistriesCreateCreated() *V1EcrRegistriesCreateCreated { + return &V1EcrRegistriesCreateCreated{} +} + +/* +V1EcrRegistriesCreateCreated handles this case with default header values. + +Created successfully +*/ +type V1EcrRegistriesCreateCreated struct { + /*Audit uid for the request + */ + AuditUID string + + Payload *models.V1UID +} + +func (o *V1EcrRegistriesCreateCreated) Error() string { + return fmt.Sprintf("[POST /v1/registries/oci/ecr][%d] v1EcrRegistriesCreateCreated %+v", 201, o.Payload) +} + +func (o *V1EcrRegistriesCreateCreated) GetPayload() *models.V1UID { + return o.Payload +} + +func (o *V1EcrRegistriesCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header AuditUid + o.AuditUID = response.GetHeader("AuditUid") + + o.Payload = new(models.V1UID) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_ecr_registries_uid_delete_parameters.go b/api/client/v1/v1_ecr_registries_uid_delete_parameters.go new file mode 100644 index 00000000..b97b0dc0 --- /dev/null +++ b/api/client/v1/v1_ecr_registries_uid_delete_parameters.go @@ -0,0 +1,133 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1EcrRegistriesUIDDeleteParams creates a new V1EcrRegistriesUIDDeleteParams object +// with the default values initialized. +func NewV1EcrRegistriesUIDDeleteParams() *V1EcrRegistriesUIDDeleteParams { + var () + return &V1EcrRegistriesUIDDeleteParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1EcrRegistriesUIDDeleteParamsWithTimeout creates a new V1EcrRegistriesUIDDeleteParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1EcrRegistriesUIDDeleteParamsWithTimeout(timeout time.Duration) *V1EcrRegistriesUIDDeleteParams { + var () + return &V1EcrRegistriesUIDDeleteParams{ + + timeout: timeout, + } +} + +// NewV1EcrRegistriesUIDDeleteParamsWithContext creates a new V1EcrRegistriesUIDDeleteParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1EcrRegistriesUIDDeleteParamsWithContext(ctx context.Context) *V1EcrRegistriesUIDDeleteParams { + var () + return &V1EcrRegistriesUIDDeleteParams{ + + Context: ctx, + } +} + +// NewV1EcrRegistriesUIDDeleteParamsWithHTTPClient creates a new V1EcrRegistriesUIDDeleteParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1EcrRegistriesUIDDeleteParamsWithHTTPClient(client *http.Client) *V1EcrRegistriesUIDDeleteParams { + var () + return &V1EcrRegistriesUIDDeleteParams{ + HTTPClient: client, + } +} + +/* +V1EcrRegistriesUIDDeleteParams contains all the parameters to send to the API endpoint +for the v1 ecr registries Uid delete operation typically these are written to a http.Request +*/ +type V1EcrRegistriesUIDDeleteParams struct { + + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 ecr registries Uid delete params +func (o *V1EcrRegistriesUIDDeleteParams) WithTimeout(timeout time.Duration) *V1EcrRegistriesUIDDeleteParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 ecr registries Uid delete params +func (o *V1EcrRegistriesUIDDeleteParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 ecr registries Uid delete params +func (o *V1EcrRegistriesUIDDeleteParams) WithContext(ctx context.Context) *V1EcrRegistriesUIDDeleteParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 ecr registries Uid delete params +func (o *V1EcrRegistriesUIDDeleteParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 ecr registries Uid delete params +func (o *V1EcrRegistriesUIDDeleteParams) WithHTTPClient(client *http.Client) *V1EcrRegistriesUIDDeleteParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 ecr registries Uid delete params +func (o *V1EcrRegistriesUIDDeleteParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithUID adds the uid to the v1 ecr registries Uid delete params +func (o *V1EcrRegistriesUIDDeleteParams) WithUID(uid string) *V1EcrRegistriesUIDDeleteParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 ecr registries Uid delete params +func (o *V1EcrRegistriesUIDDeleteParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1EcrRegistriesUIDDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_ecr_registries_uid_delete_responses.go b/api/client/v1/v1_ecr_registries_uid_delete_responses.go new file mode 100644 index 00000000..3768c1d8 --- /dev/null +++ b/api/client/v1/v1_ecr_registries_uid_delete_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1EcrRegistriesUIDDeleteReader is a Reader for the V1EcrRegistriesUIDDelete structure. +type V1EcrRegistriesUIDDeleteReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1EcrRegistriesUIDDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1EcrRegistriesUIDDeleteNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1EcrRegistriesUIDDeleteNoContent creates a V1EcrRegistriesUIDDeleteNoContent with default headers values +func NewV1EcrRegistriesUIDDeleteNoContent() *V1EcrRegistriesUIDDeleteNoContent { + return &V1EcrRegistriesUIDDeleteNoContent{} +} + +/* +V1EcrRegistriesUIDDeleteNoContent handles this case with default header values. + +The resource was deleted successfully +*/ +type V1EcrRegistriesUIDDeleteNoContent struct { +} + +func (o *V1EcrRegistriesUIDDeleteNoContent) Error() string { + return fmt.Sprintf("[DELETE /v1/registries/oci/{uid}/ecr][%d] v1EcrRegistriesUidDeleteNoContent ", 204) +} + +func (o *V1EcrRegistriesUIDDeleteNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_ecr_registries_uid_get_parameters.go b/api/client/v1/v1_ecr_registries_uid_get_parameters.go new file mode 100644 index 00000000..5de791f4 --- /dev/null +++ b/api/client/v1/v1_ecr_registries_uid_get_parameters.go @@ -0,0 +1,133 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1EcrRegistriesUIDGetParams creates a new V1EcrRegistriesUIDGetParams object +// with the default values initialized. +func NewV1EcrRegistriesUIDGetParams() *V1EcrRegistriesUIDGetParams { + var () + return &V1EcrRegistriesUIDGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1EcrRegistriesUIDGetParamsWithTimeout creates a new V1EcrRegistriesUIDGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1EcrRegistriesUIDGetParamsWithTimeout(timeout time.Duration) *V1EcrRegistriesUIDGetParams { + var () + return &V1EcrRegistriesUIDGetParams{ + + timeout: timeout, + } +} + +// NewV1EcrRegistriesUIDGetParamsWithContext creates a new V1EcrRegistriesUIDGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1EcrRegistriesUIDGetParamsWithContext(ctx context.Context) *V1EcrRegistriesUIDGetParams { + var () + return &V1EcrRegistriesUIDGetParams{ + + Context: ctx, + } +} + +// NewV1EcrRegistriesUIDGetParamsWithHTTPClient creates a new V1EcrRegistriesUIDGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1EcrRegistriesUIDGetParamsWithHTTPClient(client *http.Client) *V1EcrRegistriesUIDGetParams { + var () + return &V1EcrRegistriesUIDGetParams{ + HTTPClient: client, + } +} + +/* +V1EcrRegistriesUIDGetParams contains all the parameters to send to the API endpoint +for the v1 ecr registries Uid get operation typically these are written to a http.Request +*/ +type V1EcrRegistriesUIDGetParams struct { + + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 ecr registries Uid get params +func (o *V1EcrRegistriesUIDGetParams) WithTimeout(timeout time.Duration) *V1EcrRegistriesUIDGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 ecr registries Uid get params +func (o *V1EcrRegistriesUIDGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 ecr registries Uid get params +func (o *V1EcrRegistriesUIDGetParams) WithContext(ctx context.Context) *V1EcrRegistriesUIDGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 ecr registries Uid get params +func (o *V1EcrRegistriesUIDGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 ecr registries Uid get params +func (o *V1EcrRegistriesUIDGetParams) WithHTTPClient(client *http.Client) *V1EcrRegistriesUIDGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 ecr registries Uid get params +func (o *V1EcrRegistriesUIDGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithUID adds the uid to the v1 ecr registries Uid get params +func (o *V1EcrRegistriesUIDGetParams) WithUID(uid string) *V1EcrRegistriesUIDGetParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 ecr registries Uid get params +func (o *V1EcrRegistriesUIDGetParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1EcrRegistriesUIDGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_ecr_registries_uid_get_responses.go b/api/client/v1/v1_ecr_registries_uid_get_responses.go new file mode 100644 index 00000000..06ca2eb8 --- /dev/null +++ b/api/client/v1/v1_ecr_registries_uid_get_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1EcrRegistriesUIDGetReader is a Reader for the V1EcrRegistriesUIDGet structure. +type V1EcrRegistriesUIDGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1EcrRegistriesUIDGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1EcrRegistriesUIDGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1EcrRegistriesUIDGetOK creates a V1EcrRegistriesUIDGetOK with default headers values +func NewV1EcrRegistriesUIDGetOK() *V1EcrRegistriesUIDGetOK { + return &V1EcrRegistriesUIDGetOK{} +} + +/* +V1EcrRegistriesUIDGetOK handles this case with default header values. + +OK +*/ +type V1EcrRegistriesUIDGetOK struct { + Payload *models.V1EcrRegistry +} + +func (o *V1EcrRegistriesUIDGetOK) Error() string { + return fmt.Sprintf("[GET /v1/registries/oci/{uid}/ecr][%d] v1EcrRegistriesUidGetOK %+v", 200, o.Payload) +} + +func (o *V1EcrRegistriesUIDGetOK) GetPayload() *models.V1EcrRegistry { + return o.Payload +} + +func (o *V1EcrRegistriesUIDGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1EcrRegistry) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_ecr_registries_uid_sync_parameters.go b/api/client/v1/v1_ecr_registries_uid_sync_parameters.go new file mode 100644 index 00000000..7af820cd --- /dev/null +++ b/api/client/v1/v1_ecr_registries_uid_sync_parameters.go @@ -0,0 +1,175 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// NewV1EcrRegistriesUIDSyncParams creates a new V1EcrRegistriesUIDSyncParams object +// with the default values initialized. +func NewV1EcrRegistriesUIDSyncParams() *V1EcrRegistriesUIDSyncParams { + var ( + forceSyncDefault = bool(false) + ) + return &V1EcrRegistriesUIDSyncParams{ + ForceSync: &forceSyncDefault, + + timeout: cr.DefaultTimeout, + } +} + +// NewV1EcrRegistriesUIDSyncParamsWithTimeout creates a new V1EcrRegistriesUIDSyncParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1EcrRegistriesUIDSyncParamsWithTimeout(timeout time.Duration) *V1EcrRegistriesUIDSyncParams { + var ( + forceSyncDefault = bool(false) + ) + return &V1EcrRegistriesUIDSyncParams{ + ForceSync: &forceSyncDefault, + + timeout: timeout, + } +} + +// NewV1EcrRegistriesUIDSyncParamsWithContext creates a new V1EcrRegistriesUIDSyncParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1EcrRegistriesUIDSyncParamsWithContext(ctx context.Context) *V1EcrRegistriesUIDSyncParams { + var ( + forceSyncDefault = bool(false) + ) + return &V1EcrRegistriesUIDSyncParams{ + ForceSync: &forceSyncDefault, + + Context: ctx, + } +} + +// NewV1EcrRegistriesUIDSyncParamsWithHTTPClient creates a new V1EcrRegistriesUIDSyncParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1EcrRegistriesUIDSyncParamsWithHTTPClient(client *http.Client) *V1EcrRegistriesUIDSyncParams { + var ( + forceSyncDefault = bool(false) + ) + return &V1EcrRegistriesUIDSyncParams{ + ForceSync: &forceSyncDefault, + HTTPClient: client, + } +} + +/* +V1EcrRegistriesUIDSyncParams contains all the parameters to send to the API endpoint +for the v1 ecr registries Uid sync operation typically these are written to a http.Request +*/ +type V1EcrRegistriesUIDSyncParams struct { + + /*ForceSync*/ + ForceSync *bool + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 ecr registries Uid sync params +func (o *V1EcrRegistriesUIDSyncParams) WithTimeout(timeout time.Duration) *V1EcrRegistriesUIDSyncParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 ecr registries Uid sync params +func (o *V1EcrRegistriesUIDSyncParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 ecr registries Uid sync params +func (o *V1EcrRegistriesUIDSyncParams) WithContext(ctx context.Context) *V1EcrRegistriesUIDSyncParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 ecr registries Uid sync params +func (o *V1EcrRegistriesUIDSyncParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 ecr registries Uid sync params +func (o *V1EcrRegistriesUIDSyncParams) WithHTTPClient(client *http.Client) *V1EcrRegistriesUIDSyncParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 ecr registries Uid sync params +func (o *V1EcrRegistriesUIDSyncParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithForceSync adds the forceSync to the v1 ecr registries Uid sync params +func (o *V1EcrRegistriesUIDSyncParams) WithForceSync(forceSync *bool) *V1EcrRegistriesUIDSyncParams { + o.SetForceSync(forceSync) + return o +} + +// SetForceSync adds the forceSync to the v1 ecr registries Uid sync params +func (o *V1EcrRegistriesUIDSyncParams) SetForceSync(forceSync *bool) { + o.ForceSync = forceSync +} + +// WithUID adds the uid to the v1 ecr registries Uid sync params +func (o *V1EcrRegistriesUIDSyncParams) WithUID(uid string) *V1EcrRegistriesUIDSyncParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 ecr registries Uid sync params +func (o *V1EcrRegistriesUIDSyncParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1EcrRegistriesUIDSyncParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.ForceSync != nil { + + // query param forceSync + var qrForceSync bool + if o.ForceSync != nil { + qrForceSync = *o.ForceSync + } + qForceSync := swag.FormatBool(qrForceSync) + if qForceSync != "" { + if err := r.SetQueryParam("forceSync", qForceSync); err != nil { + return err + } + } + + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_ecr_registries_uid_sync_responses.go b/api/client/v1/v1_ecr_registries_uid_sync_responses.go new file mode 100644 index 00000000..1f63ef12 --- /dev/null +++ b/api/client/v1/v1_ecr_registries_uid_sync_responses.go @@ -0,0 +1,61 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1EcrRegistriesUIDSyncReader is a Reader for the V1EcrRegistriesUIDSync structure. +type V1EcrRegistriesUIDSyncReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1EcrRegistriesUIDSyncReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 202: + result := NewV1EcrRegistriesUIDSyncAccepted() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1EcrRegistriesUIDSyncAccepted creates a V1EcrRegistriesUIDSyncAccepted with default headers values +func NewV1EcrRegistriesUIDSyncAccepted() *V1EcrRegistriesUIDSyncAccepted { + return &V1EcrRegistriesUIDSyncAccepted{} +} + +/* +V1EcrRegistriesUIDSyncAccepted handles this case with default header values. + +Ok response without content +*/ +type V1EcrRegistriesUIDSyncAccepted struct { + /*Audit uid for the request + */ + AuditUID string +} + +func (o *V1EcrRegistriesUIDSyncAccepted) Error() string { + return fmt.Sprintf("[POST /v1/registries/oci/{uid}/ecr/sync][%d] v1EcrRegistriesUidSyncAccepted ", 202) +} + +func (o *V1EcrRegistriesUIDSyncAccepted) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header AuditUid + o.AuditUID = response.GetHeader("AuditUid") + + return nil +} diff --git a/api/client/v1/v1_ecr_registries_uid_sync_status_parameters.go b/api/client/v1/v1_ecr_registries_uid_sync_status_parameters.go new file mode 100644 index 00000000..3a5eb8ea --- /dev/null +++ b/api/client/v1/v1_ecr_registries_uid_sync_status_parameters.go @@ -0,0 +1,133 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1EcrRegistriesUIDSyncStatusParams creates a new V1EcrRegistriesUIDSyncStatusParams object +// with the default values initialized. +func NewV1EcrRegistriesUIDSyncStatusParams() *V1EcrRegistriesUIDSyncStatusParams { + var () + return &V1EcrRegistriesUIDSyncStatusParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1EcrRegistriesUIDSyncStatusParamsWithTimeout creates a new V1EcrRegistriesUIDSyncStatusParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1EcrRegistriesUIDSyncStatusParamsWithTimeout(timeout time.Duration) *V1EcrRegistriesUIDSyncStatusParams { + var () + return &V1EcrRegistriesUIDSyncStatusParams{ + + timeout: timeout, + } +} + +// NewV1EcrRegistriesUIDSyncStatusParamsWithContext creates a new V1EcrRegistriesUIDSyncStatusParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1EcrRegistriesUIDSyncStatusParamsWithContext(ctx context.Context) *V1EcrRegistriesUIDSyncStatusParams { + var () + return &V1EcrRegistriesUIDSyncStatusParams{ + + Context: ctx, + } +} + +// NewV1EcrRegistriesUIDSyncStatusParamsWithHTTPClient creates a new V1EcrRegistriesUIDSyncStatusParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1EcrRegistriesUIDSyncStatusParamsWithHTTPClient(client *http.Client) *V1EcrRegistriesUIDSyncStatusParams { + var () + return &V1EcrRegistriesUIDSyncStatusParams{ + HTTPClient: client, + } +} + +/* +V1EcrRegistriesUIDSyncStatusParams contains all the parameters to send to the API endpoint +for the v1 ecr registries Uid sync status operation typically these are written to a http.Request +*/ +type V1EcrRegistriesUIDSyncStatusParams struct { + + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 ecr registries Uid sync status params +func (o *V1EcrRegistriesUIDSyncStatusParams) WithTimeout(timeout time.Duration) *V1EcrRegistriesUIDSyncStatusParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 ecr registries Uid sync status params +func (o *V1EcrRegistriesUIDSyncStatusParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 ecr registries Uid sync status params +func (o *V1EcrRegistriesUIDSyncStatusParams) WithContext(ctx context.Context) *V1EcrRegistriesUIDSyncStatusParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 ecr registries Uid sync status params +func (o *V1EcrRegistriesUIDSyncStatusParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 ecr registries Uid sync status params +func (o *V1EcrRegistriesUIDSyncStatusParams) WithHTTPClient(client *http.Client) *V1EcrRegistriesUIDSyncStatusParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 ecr registries Uid sync status params +func (o *V1EcrRegistriesUIDSyncStatusParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithUID adds the uid to the v1 ecr registries Uid sync status params +func (o *V1EcrRegistriesUIDSyncStatusParams) WithUID(uid string) *V1EcrRegistriesUIDSyncStatusParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 ecr registries Uid sync status params +func (o *V1EcrRegistriesUIDSyncStatusParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1EcrRegistriesUIDSyncStatusParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_ecr_registries_uid_sync_status_responses.go b/api/client/v1/v1_ecr_registries_uid_sync_status_responses.go new file mode 100644 index 00000000..32e22feb --- /dev/null +++ b/api/client/v1/v1_ecr_registries_uid_sync_status_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1EcrRegistriesUIDSyncStatusReader is a Reader for the V1EcrRegistriesUIDSyncStatus structure. +type V1EcrRegistriesUIDSyncStatusReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1EcrRegistriesUIDSyncStatusReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1EcrRegistriesUIDSyncStatusOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1EcrRegistriesUIDSyncStatusOK creates a V1EcrRegistriesUIDSyncStatusOK with default headers values +func NewV1EcrRegistriesUIDSyncStatusOK() *V1EcrRegistriesUIDSyncStatusOK { + return &V1EcrRegistriesUIDSyncStatusOK{} +} + +/* +V1EcrRegistriesUIDSyncStatusOK handles this case with default header values. + +Ecr registry sync status +*/ +type V1EcrRegistriesUIDSyncStatusOK struct { + Payload *models.V1RegistrySyncStatus +} + +func (o *V1EcrRegistriesUIDSyncStatusOK) Error() string { + return fmt.Sprintf("[GET /v1/registries/oci/{uid}/ecr/sync/status][%d] v1EcrRegistriesUidSyncStatusOK %+v", 200, o.Payload) +} + +func (o *V1EcrRegistriesUIDSyncStatusOK) GetPayload() *models.V1RegistrySyncStatus { + return o.Payload +} + +func (o *V1EcrRegistriesUIDSyncStatusOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1RegistrySyncStatus) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_ecr_registries_uid_update_parameters.go b/api/client/v1/v1_ecr_registries_uid_update_parameters.go new file mode 100644 index 00000000..c703153b --- /dev/null +++ b/api/client/v1/v1_ecr_registries_uid_update_parameters.go @@ -0,0 +1,154 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1EcrRegistriesUIDUpdateParams creates a new V1EcrRegistriesUIDUpdateParams object +// with the default values initialized. +func NewV1EcrRegistriesUIDUpdateParams() *V1EcrRegistriesUIDUpdateParams { + var () + return &V1EcrRegistriesUIDUpdateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1EcrRegistriesUIDUpdateParamsWithTimeout creates a new V1EcrRegistriesUIDUpdateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1EcrRegistriesUIDUpdateParamsWithTimeout(timeout time.Duration) *V1EcrRegistriesUIDUpdateParams { + var () + return &V1EcrRegistriesUIDUpdateParams{ + + timeout: timeout, + } +} + +// NewV1EcrRegistriesUIDUpdateParamsWithContext creates a new V1EcrRegistriesUIDUpdateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1EcrRegistriesUIDUpdateParamsWithContext(ctx context.Context) *V1EcrRegistriesUIDUpdateParams { + var () + return &V1EcrRegistriesUIDUpdateParams{ + + Context: ctx, + } +} + +// NewV1EcrRegistriesUIDUpdateParamsWithHTTPClient creates a new V1EcrRegistriesUIDUpdateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1EcrRegistriesUIDUpdateParamsWithHTTPClient(client *http.Client) *V1EcrRegistriesUIDUpdateParams { + var () + return &V1EcrRegistriesUIDUpdateParams{ + HTTPClient: client, + } +} + +/* +V1EcrRegistriesUIDUpdateParams contains all the parameters to send to the API endpoint +for the v1 ecr registries Uid update operation typically these are written to a http.Request +*/ +type V1EcrRegistriesUIDUpdateParams struct { + + /*Body*/ + Body *models.V1EcrRegistry + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 ecr registries Uid update params +func (o *V1EcrRegistriesUIDUpdateParams) WithTimeout(timeout time.Duration) *V1EcrRegistriesUIDUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 ecr registries Uid update params +func (o *V1EcrRegistriesUIDUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 ecr registries Uid update params +func (o *V1EcrRegistriesUIDUpdateParams) WithContext(ctx context.Context) *V1EcrRegistriesUIDUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 ecr registries Uid update params +func (o *V1EcrRegistriesUIDUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 ecr registries Uid update params +func (o *V1EcrRegistriesUIDUpdateParams) WithHTTPClient(client *http.Client) *V1EcrRegistriesUIDUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 ecr registries Uid update params +func (o *V1EcrRegistriesUIDUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 ecr registries Uid update params +func (o *V1EcrRegistriesUIDUpdateParams) WithBody(body *models.V1EcrRegistry) *V1EcrRegistriesUIDUpdateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 ecr registries Uid update params +func (o *V1EcrRegistriesUIDUpdateParams) SetBody(body *models.V1EcrRegistry) { + o.Body = body +} + +// WithUID adds the uid to the v1 ecr registries Uid update params +func (o *V1EcrRegistriesUIDUpdateParams) WithUID(uid string) *V1EcrRegistriesUIDUpdateParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 ecr registries Uid update params +func (o *V1EcrRegistriesUIDUpdateParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1EcrRegistriesUIDUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_ecr_registries_uid_update_responses.go b/api/client/v1/v1_ecr_registries_uid_update_responses.go new file mode 100644 index 00000000..be2886ab --- /dev/null +++ b/api/client/v1/v1_ecr_registries_uid_update_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1EcrRegistriesUIDUpdateReader is a Reader for the V1EcrRegistriesUIDUpdate structure. +type V1EcrRegistriesUIDUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1EcrRegistriesUIDUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1EcrRegistriesUIDUpdateNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1EcrRegistriesUIDUpdateNoContent creates a V1EcrRegistriesUIDUpdateNoContent with default headers values +func NewV1EcrRegistriesUIDUpdateNoContent() *V1EcrRegistriesUIDUpdateNoContent { + return &V1EcrRegistriesUIDUpdateNoContent{} +} + +/* +V1EcrRegistriesUIDUpdateNoContent handles this case with default header values. + +The resource was updated successfully +*/ +type V1EcrRegistriesUIDUpdateNoContent struct { +} + +func (o *V1EcrRegistriesUIDUpdateNoContent) Error() string { + return fmt.Sprintf("[PUT /v1/registries/oci/{uid}/ecr][%d] v1EcrRegistriesUidUpdateNoContent ", 204) +} + +func (o *V1EcrRegistriesUIDUpdateNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_ecr_registries_validate_parameters.go b/api/client/v1/v1_ecr_registries_validate_parameters.go new file mode 100644 index 00000000..3e35fc04 --- /dev/null +++ b/api/client/v1/v1_ecr_registries_validate_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1EcrRegistriesValidateParams creates a new V1EcrRegistriesValidateParams object +// with the default values initialized. +func NewV1EcrRegistriesValidateParams() *V1EcrRegistriesValidateParams { + var () + return &V1EcrRegistriesValidateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1EcrRegistriesValidateParamsWithTimeout creates a new V1EcrRegistriesValidateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1EcrRegistriesValidateParamsWithTimeout(timeout time.Duration) *V1EcrRegistriesValidateParams { + var () + return &V1EcrRegistriesValidateParams{ + + timeout: timeout, + } +} + +// NewV1EcrRegistriesValidateParamsWithContext creates a new V1EcrRegistriesValidateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1EcrRegistriesValidateParamsWithContext(ctx context.Context) *V1EcrRegistriesValidateParams { + var () + return &V1EcrRegistriesValidateParams{ + + Context: ctx, + } +} + +// NewV1EcrRegistriesValidateParamsWithHTTPClient creates a new V1EcrRegistriesValidateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1EcrRegistriesValidateParamsWithHTTPClient(client *http.Client) *V1EcrRegistriesValidateParams { + var () + return &V1EcrRegistriesValidateParams{ + HTTPClient: client, + } +} + +/* +V1EcrRegistriesValidateParams contains all the parameters to send to the API endpoint +for the v1 ecr registries validate operation typically these are written to a http.Request +*/ +type V1EcrRegistriesValidateParams struct { + + /*Body*/ + Body *models.V1EcrRegistrySpec + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 ecr registries validate params +func (o *V1EcrRegistriesValidateParams) WithTimeout(timeout time.Duration) *V1EcrRegistriesValidateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 ecr registries validate params +func (o *V1EcrRegistriesValidateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 ecr registries validate params +func (o *V1EcrRegistriesValidateParams) WithContext(ctx context.Context) *V1EcrRegistriesValidateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 ecr registries validate params +func (o *V1EcrRegistriesValidateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 ecr registries validate params +func (o *V1EcrRegistriesValidateParams) WithHTTPClient(client *http.Client) *V1EcrRegistriesValidateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 ecr registries validate params +func (o *V1EcrRegistriesValidateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 ecr registries validate params +func (o *V1EcrRegistriesValidateParams) WithBody(body *models.V1EcrRegistrySpec) *V1EcrRegistriesValidateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 ecr registries validate params +func (o *V1EcrRegistriesValidateParams) SetBody(body *models.V1EcrRegistrySpec) { + o.Body = body +} + +// WriteToRequest writes these params to a swagger request +func (o *V1EcrRegistriesValidateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_ecr_registries_validate_responses.go b/api/client/v1/v1_ecr_registries_validate_responses.go new file mode 100644 index 00000000..eb5c558e --- /dev/null +++ b/api/client/v1/v1_ecr_registries_validate_responses.go @@ -0,0 +1,61 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1EcrRegistriesValidateReader is a Reader for the V1EcrRegistriesValidate structure. +type V1EcrRegistriesValidateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1EcrRegistriesValidateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1EcrRegistriesValidateNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1EcrRegistriesValidateNoContent creates a V1EcrRegistriesValidateNoContent with default headers values +func NewV1EcrRegistriesValidateNoContent() *V1EcrRegistriesValidateNoContent { + return &V1EcrRegistriesValidateNoContent{} +} + +/* +V1EcrRegistriesValidateNoContent handles this case with default header values. + +Ok response without content +*/ +type V1EcrRegistriesValidateNoContent struct { + /*Audit uid for the request + */ + AuditUID string +} + +func (o *V1EcrRegistriesValidateNoContent) Error() string { + return fmt.Sprintf("[POST /v1/registries/oci/ecr/validate][%d] v1EcrRegistriesValidateNoContent ", 204) +} + +func (o *V1EcrRegistriesValidateNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header AuditUid + o.AuditUID = response.GetHeader("AuditUid") + + return nil +} diff --git a/api/client/v1/v1_edge_clusters_hosts_list_parameters.go b/api/client/v1/v1_edge_clusters_hosts_list_parameters.go new file mode 100644 index 00000000..0f093f9a --- /dev/null +++ b/api/client/v1/v1_edge_clusters_hosts_list_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1EdgeClustersHostsListParams creates a new V1EdgeClustersHostsListParams object +// with the default values initialized. +func NewV1EdgeClustersHostsListParams() *V1EdgeClustersHostsListParams { + var () + return &V1EdgeClustersHostsListParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1EdgeClustersHostsListParamsWithTimeout creates a new V1EdgeClustersHostsListParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1EdgeClustersHostsListParamsWithTimeout(timeout time.Duration) *V1EdgeClustersHostsListParams { + var () + return &V1EdgeClustersHostsListParams{ + + timeout: timeout, + } +} + +// NewV1EdgeClustersHostsListParamsWithContext creates a new V1EdgeClustersHostsListParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1EdgeClustersHostsListParamsWithContext(ctx context.Context) *V1EdgeClustersHostsListParams { + var () + return &V1EdgeClustersHostsListParams{ + + Context: ctx, + } +} + +// NewV1EdgeClustersHostsListParamsWithHTTPClient creates a new V1EdgeClustersHostsListParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1EdgeClustersHostsListParamsWithHTTPClient(client *http.Client) *V1EdgeClustersHostsListParams { + var () + return &V1EdgeClustersHostsListParams{ + HTTPClient: client, + } +} + +/* +V1EdgeClustersHostsListParams contains all the parameters to send to the API endpoint +for the v1 edge clusters hosts list operation typically these are written to a http.Request +*/ +type V1EdgeClustersHostsListParams struct { + + /*UID + Cluster uid + + */ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 edge clusters hosts list params +func (o *V1EdgeClustersHostsListParams) WithTimeout(timeout time.Duration) *V1EdgeClustersHostsListParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 edge clusters hosts list params +func (o *V1EdgeClustersHostsListParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 edge clusters hosts list params +func (o *V1EdgeClustersHostsListParams) WithContext(ctx context.Context) *V1EdgeClustersHostsListParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 edge clusters hosts list params +func (o *V1EdgeClustersHostsListParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 edge clusters hosts list params +func (o *V1EdgeClustersHostsListParams) WithHTTPClient(client *http.Client) *V1EdgeClustersHostsListParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 edge clusters hosts list params +func (o *V1EdgeClustersHostsListParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithUID adds the uid to the v1 edge clusters hosts list params +func (o *V1EdgeClustersHostsListParams) WithUID(uid string) *V1EdgeClustersHostsListParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 edge clusters hosts list params +func (o *V1EdgeClustersHostsListParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1EdgeClustersHostsListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_edge_clusters_hosts_list_responses.go b/api/client/v1/v1_edge_clusters_hosts_list_responses.go new file mode 100644 index 00000000..a6ac4dc2 --- /dev/null +++ b/api/client/v1/v1_edge_clusters_hosts_list_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1EdgeClustersHostsListReader is a Reader for the V1EdgeClustersHostsList structure. +type V1EdgeClustersHostsListReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1EdgeClustersHostsListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1EdgeClustersHostsListOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1EdgeClustersHostsListOK creates a V1EdgeClustersHostsListOK with default headers values +func NewV1EdgeClustersHostsListOK() *V1EdgeClustersHostsListOK { + return &V1EdgeClustersHostsListOK{} +} + +/* +V1EdgeClustersHostsListOK handles this case with default header values. + +List of edge host device +*/ +type V1EdgeClustersHostsListOK struct { + Payload *models.V1EdgeHostDevices +} + +func (o *V1EdgeClustersHostsListOK) Error() string { + return fmt.Sprintf("[GET /v1/spectroclusters/{uid}/edge/edgeHosts][%d] v1EdgeClustersHostsListOK %+v", 200, o.Payload) +} + +func (o *V1EdgeClustersHostsListOK) GetPayload() *models.V1EdgeHostDevices { + return o.Payload +} + +func (o *V1EdgeClustersHostsListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1EdgeHostDevices) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_edge_host_device_host_check_sum_update_parameters.go b/api/client/v1/v1_edge_host_device_host_check_sum_update_parameters.go new file mode 100644 index 00000000..5cbe3d85 --- /dev/null +++ b/api/client/v1/v1_edge_host_device_host_check_sum_update_parameters.go @@ -0,0 +1,154 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1EdgeHostDeviceHostCheckSumUpdateParams creates a new V1EdgeHostDeviceHostCheckSumUpdateParams object +// with the default values initialized. +func NewV1EdgeHostDeviceHostCheckSumUpdateParams() *V1EdgeHostDeviceHostCheckSumUpdateParams { + var () + return &V1EdgeHostDeviceHostCheckSumUpdateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1EdgeHostDeviceHostCheckSumUpdateParamsWithTimeout creates a new V1EdgeHostDeviceHostCheckSumUpdateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1EdgeHostDeviceHostCheckSumUpdateParamsWithTimeout(timeout time.Duration) *V1EdgeHostDeviceHostCheckSumUpdateParams { + var () + return &V1EdgeHostDeviceHostCheckSumUpdateParams{ + + timeout: timeout, + } +} + +// NewV1EdgeHostDeviceHostCheckSumUpdateParamsWithContext creates a new V1EdgeHostDeviceHostCheckSumUpdateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1EdgeHostDeviceHostCheckSumUpdateParamsWithContext(ctx context.Context) *V1EdgeHostDeviceHostCheckSumUpdateParams { + var () + return &V1EdgeHostDeviceHostCheckSumUpdateParams{ + + Context: ctx, + } +} + +// NewV1EdgeHostDeviceHostCheckSumUpdateParamsWithHTTPClient creates a new V1EdgeHostDeviceHostCheckSumUpdateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1EdgeHostDeviceHostCheckSumUpdateParamsWithHTTPClient(client *http.Client) *V1EdgeHostDeviceHostCheckSumUpdateParams { + var () + return &V1EdgeHostDeviceHostCheckSumUpdateParams{ + HTTPClient: client, + } +} + +/* +V1EdgeHostDeviceHostCheckSumUpdateParams contains all the parameters to send to the API endpoint +for the v1 edge host device host check sum update operation typically these are written to a http.Request +*/ +type V1EdgeHostDeviceHostCheckSumUpdateParams struct { + + /*Body*/ + Body *models.V1EdgeHostDeviceHostCheckSum + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 edge host device host check sum update params +func (o *V1EdgeHostDeviceHostCheckSumUpdateParams) WithTimeout(timeout time.Duration) *V1EdgeHostDeviceHostCheckSumUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 edge host device host check sum update params +func (o *V1EdgeHostDeviceHostCheckSumUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 edge host device host check sum update params +func (o *V1EdgeHostDeviceHostCheckSumUpdateParams) WithContext(ctx context.Context) *V1EdgeHostDeviceHostCheckSumUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 edge host device host check sum update params +func (o *V1EdgeHostDeviceHostCheckSumUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 edge host device host check sum update params +func (o *V1EdgeHostDeviceHostCheckSumUpdateParams) WithHTTPClient(client *http.Client) *V1EdgeHostDeviceHostCheckSumUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 edge host device host check sum update params +func (o *V1EdgeHostDeviceHostCheckSumUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 edge host device host check sum update params +func (o *V1EdgeHostDeviceHostCheckSumUpdateParams) WithBody(body *models.V1EdgeHostDeviceHostCheckSum) *V1EdgeHostDeviceHostCheckSumUpdateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 edge host device host check sum update params +func (o *V1EdgeHostDeviceHostCheckSumUpdateParams) SetBody(body *models.V1EdgeHostDeviceHostCheckSum) { + o.Body = body +} + +// WithUID adds the uid to the v1 edge host device host check sum update params +func (o *V1EdgeHostDeviceHostCheckSumUpdateParams) WithUID(uid string) *V1EdgeHostDeviceHostCheckSumUpdateParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 edge host device host check sum update params +func (o *V1EdgeHostDeviceHostCheckSumUpdateParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1EdgeHostDeviceHostCheckSumUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_edge_host_device_host_check_sum_update_responses.go b/api/client/v1/v1_edge_host_device_host_check_sum_update_responses.go new file mode 100644 index 00000000..37cd892d --- /dev/null +++ b/api/client/v1/v1_edge_host_device_host_check_sum_update_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1EdgeHostDeviceHostCheckSumUpdateReader is a Reader for the V1EdgeHostDeviceHostCheckSumUpdate structure. +type V1EdgeHostDeviceHostCheckSumUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1EdgeHostDeviceHostCheckSumUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1EdgeHostDeviceHostCheckSumUpdateNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1EdgeHostDeviceHostCheckSumUpdateNoContent creates a V1EdgeHostDeviceHostCheckSumUpdateNoContent with default headers values +func NewV1EdgeHostDeviceHostCheckSumUpdateNoContent() *V1EdgeHostDeviceHostCheckSumUpdateNoContent { + return &V1EdgeHostDeviceHostCheckSumUpdateNoContent{} +} + +/* +V1EdgeHostDeviceHostCheckSumUpdateNoContent handles this case with default header values. + +The resource was updated successfully +*/ +type V1EdgeHostDeviceHostCheckSumUpdateNoContent struct { +} + +func (o *V1EdgeHostDeviceHostCheckSumUpdateNoContent) Error() string { + return fmt.Sprintf("[PATCH /v1/edgehosts/{uid}/hostCheckSum][%d] v1EdgeHostDeviceHostCheckSumUpdateNoContent ", 204) +} + +func (o *V1EdgeHostDeviceHostCheckSumUpdateNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_edge_host_device_host_pairing_key_update_parameters.go b/api/client/v1/v1_edge_host_device_host_pairing_key_update_parameters.go new file mode 100644 index 00000000..523b109d --- /dev/null +++ b/api/client/v1/v1_edge_host_device_host_pairing_key_update_parameters.go @@ -0,0 +1,154 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1EdgeHostDeviceHostPairingKeyUpdateParams creates a new V1EdgeHostDeviceHostPairingKeyUpdateParams object +// with the default values initialized. +func NewV1EdgeHostDeviceHostPairingKeyUpdateParams() *V1EdgeHostDeviceHostPairingKeyUpdateParams { + var () + return &V1EdgeHostDeviceHostPairingKeyUpdateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1EdgeHostDeviceHostPairingKeyUpdateParamsWithTimeout creates a new V1EdgeHostDeviceHostPairingKeyUpdateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1EdgeHostDeviceHostPairingKeyUpdateParamsWithTimeout(timeout time.Duration) *V1EdgeHostDeviceHostPairingKeyUpdateParams { + var () + return &V1EdgeHostDeviceHostPairingKeyUpdateParams{ + + timeout: timeout, + } +} + +// NewV1EdgeHostDeviceHostPairingKeyUpdateParamsWithContext creates a new V1EdgeHostDeviceHostPairingKeyUpdateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1EdgeHostDeviceHostPairingKeyUpdateParamsWithContext(ctx context.Context) *V1EdgeHostDeviceHostPairingKeyUpdateParams { + var () + return &V1EdgeHostDeviceHostPairingKeyUpdateParams{ + + Context: ctx, + } +} + +// NewV1EdgeHostDeviceHostPairingKeyUpdateParamsWithHTTPClient creates a new V1EdgeHostDeviceHostPairingKeyUpdateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1EdgeHostDeviceHostPairingKeyUpdateParamsWithHTTPClient(client *http.Client) *V1EdgeHostDeviceHostPairingKeyUpdateParams { + var () + return &V1EdgeHostDeviceHostPairingKeyUpdateParams{ + HTTPClient: client, + } +} + +/* +V1EdgeHostDeviceHostPairingKeyUpdateParams contains all the parameters to send to the API endpoint +for the v1 edge host device host pairing key update operation typically these are written to a http.Request +*/ +type V1EdgeHostDeviceHostPairingKeyUpdateParams struct { + + /*Body*/ + Body *models.V1EdgeHostDeviceHostPairingKey + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 edge host device host pairing key update params +func (o *V1EdgeHostDeviceHostPairingKeyUpdateParams) WithTimeout(timeout time.Duration) *V1EdgeHostDeviceHostPairingKeyUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 edge host device host pairing key update params +func (o *V1EdgeHostDeviceHostPairingKeyUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 edge host device host pairing key update params +func (o *V1EdgeHostDeviceHostPairingKeyUpdateParams) WithContext(ctx context.Context) *V1EdgeHostDeviceHostPairingKeyUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 edge host device host pairing key update params +func (o *V1EdgeHostDeviceHostPairingKeyUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 edge host device host pairing key update params +func (o *V1EdgeHostDeviceHostPairingKeyUpdateParams) WithHTTPClient(client *http.Client) *V1EdgeHostDeviceHostPairingKeyUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 edge host device host pairing key update params +func (o *V1EdgeHostDeviceHostPairingKeyUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 edge host device host pairing key update params +func (o *V1EdgeHostDeviceHostPairingKeyUpdateParams) WithBody(body *models.V1EdgeHostDeviceHostPairingKey) *V1EdgeHostDeviceHostPairingKeyUpdateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 edge host device host pairing key update params +func (o *V1EdgeHostDeviceHostPairingKeyUpdateParams) SetBody(body *models.V1EdgeHostDeviceHostPairingKey) { + o.Body = body +} + +// WithUID adds the uid to the v1 edge host device host pairing key update params +func (o *V1EdgeHostDeviceHostPairingKeyUpdateParams) WithUID(uid string) *V1EdgeHostDeviceHostPairingKeyUpdateParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 edge host device host pairing key update params +func (o *V1EdgeHostDeviceHostPairingKeyUpdateParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1EdgeHostDeviceHostPairingKeyUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_edge_host_device_host_pairing_key_update_responses.go b/api/client/v1/v1_edge_host_device_host_pairing_key_update_responses.go new file mode 100644 index 00000000..135c6116 --- /dev/null +++ b/api/client/v1/v1_edge_host_device_host_pairing_key_update_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1EdgeHostDeviceHostPairingKeyUpdateReader is a Reader for the V1EdgeHostDeviceHostPairingKeyUpdate structure. +type V1EdgeHostDeviceHostPairingKeyUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1EdgeHostDeviceHostPairingKeyUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1EdgeHostDeviceHostPairingKeyUpdateNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1EdgeHostDeviceHostPairingKeyUpdateNoContent creates a V1EdgeHostDeviceHostPairingKeyUpdateNoContent with default headers values +func NewV1EdgeHostDeviceHostPairingKeyUpdateNoContent() *V1EdgeHostDeviceHostPairingKeyUpdateNoContent { + return &V1EdgeHostDeviceHostPairingKeyUpdateNoContent{} +} + +/* +V1EdgeHostDeviceHostPairingKeyUpdateNoContent handles this case with default header values. + +The resource was updated successfully +*/ +type V1EdgeHostDeviceHostPairingKeyUpdateNoContent struct { +} + +func (o *V1EdgeHostDeviceHostPairingKeyUpdateNoContent) Error() string { + return fmt.Sprintf("[PATCH /v1/edgehosts/{uid}/hostPairingKey][%d] v1EdgeHostDeviceHostPairingKeyUpdateNoContent ", 204) +} + +func (o *V1EdgeHostDeviceHostPairingKeyUpdateNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_edge_host_devices_create_parameters.go b/api/client/v1/v1_edge_host_devices_create_parameters.go new file mode 100644 index 00000000..a68a8caa --- /dev/null +++ b/api/client/v1/v1_edge_host_devices_create_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1EdgeHostDevicesCreateParams creates a new V1EdgeHostDevicesCreateParams object +// with the default values initialized. +func NewV1EdgeHostDevicesCreateParams() *V1EdgeHostDevicesCreateParams { + var () + return &V1EdgeHostDevicesCreateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1EdgeHostDevicesCreateParamsWithTimeout creates a new V1EdgeHostDevicesCreateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1EdgeHostDevicesCreateParamsWithTimeout(timeout time.Duration) *V1EdgeHostDevicesCreateParams { + var () + return &V1EdgeHostDevicesCreateParams{ + + timeout: timeout, + } +} + +// NewV1EdgeHostDevicesCreateParamsWithContext creates a new V1EdgeHostDevicesCreateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1EdgeHostDevicesCreateParamsWithContext(ctx context.Context) *V1EdgeHostDevicesCreateParams { + var () + return &V1EdgeHostDevicesCreateParams{ + + Context: ctx, + } +} + +// NewV1EdgeHostDevicesCreateParamsWithHTTPClient creates a new V1EdgeHostDevicesCreateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1EdgeHostDevicesCreateParamsWithHTTPClient(client *http.Client) *V1EdgeHostDevicesCreateParams { + var () + return &V1EdgeHostDevicesCreateParams{ + HTTPClient: client, + } +} + +/* +V1EdgeHostDevicesCreateParams contains all the parameters to send to the API endpoint +for the v1 edge host devices create operation typically these are written to a http.Request +*/ +type V1EdgeHostDevicesCreateParams struct { + + /*Body*/ + Body *models.V1EdgeHostDeviceEntity + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 edge host devices create params +func (o *V1EdgeHostDevicesCreateParams) WithTimeout(timeout time.Duration) *V1EdgeHostDevicesCreateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 edge host devices create params +func (o *V1EdgeHostDevicesCreateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 edge host devices create params +func (o *V1EdgeHostDevicesCreateParams) WithContext(ctx context.Context) *V1EdgeHostDevicesCreateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 edge host devices create params +func (o *V1EdgeHostDevicesCreateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 edge host devices create params +func (o *V1EdgeHostDevicesCreateParams) WithHTTPClient(client *http.Client) *V1EdgeHostDevicesCreateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 edge host devices create params +func (o *V1EdgeHostDevicesCreateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 edge host devices create params +func (o *V1EdgeHostDevicesCreateParams) WithBody(body *models.V1EdgeHostDeviceEntity) *V1EdgeHostDevicesCreateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 edge host devices create params +func (o *V1EdgeHostDevicesCreateParams) SetBody(body *models.V1EdgeHostDeviceEntity) { + o.Body = body +} + +// WriteToRequest writes these params to a swagger request +func (o *V1EdgeHostDevicesCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_edge_host_devices_create_responses.go b/api/client/v1/v1_edge_host_devices_create_responses.go new file mode 100644 index 00000000..cdfa91a7 --- /dev/null +++ b/api/client/v1/v1_edge_host_devices_create_responses.go @@ -0,0 +1,77 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1EdgeHostDevicesCreateReader is a Reader for the V1EdgeHostDevicesCreate structure. +type V1EdgeHostDevicesCreateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1EdgeHostDevicesCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 201: + result := NewV1EdgeHostDevicesCreateCreated() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1EdgeHostDevicesCreateCreated creates a V1EdgeHostDevicesCreateCreated with default headers values +func NewV1EdgeHostDevicesCreateCreated() *V1EdgeHostDevicesCreateCreated { + return &V1EdgeHostDevicesCreateCreated{} +} + +/* +V1EdgeHostDevicesCreateCreated handles this case with default header values. + +Created successfully +*/ +type V1EdgeHostDevicesCreateCreated struct { + /*Audit uid for the request + */ + AuditUID string + + Payload *models.V1UID +} + +func (o *V1EdgeHostDevicesCreateCreated) Error() string { + return fmt.Sprintf("[POST /v1/edgehosts][%d] v1EdgeHostDevicesCreateCreated %+v", 201, o.Payload) +} + +func (o *V1EdgeHostDevicesCreateCreated) GetPayload() *models.V1UID { + return o.Payload +} + +func (o *V1EdgeHostDevicesCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header AuditUid + o.AuditUID = response.GetHeader("AuditUid") + + o.Payload = new(models.V1UID) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_edge_host_devices_health_update_parameters.go b/api/client/v1/v1_edge_host_devices_health_update_parameters.go new file mode 100644 index 00000000..66f78b0d --- /dev/null +++ b/api/client/v1/v1_edge_host_devices_health_update_parameters.go @@ -0,0 +1,154 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1EdgeHostDevicesHealthUpdateParams creates a new V1EdgeHostDevicesHealthUpdateParams object +// with the default values initialized. +func NewV1EdgeHostDevicesHealthUpdateParams() *V1EdgeHostDevicesHealthUpdateParams { + var () + return &V1EdgeHostDevicesHealthUpdateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1EdgeHostDevicesHealthUpdateParamsWithTimeout creates a new V1EdgeHostDevicesHealthUpdateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1EdgeHostDevicesHealthUpdateParamsWithTimeout(timeout time.Duration) *V1EdgeHostDevicesHealthUpdateParams { + var () + return &V1EdgeHostDevicesHealthUpdateParams{ + + timeout: timeout, + } +} + +// NewV1EdgeHostDevicesHealthUpdateParamsWithContext creates a new V1EdgeHostDevicesHealthUpdateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1EdgeHostDevicesHealthUpdateParamsWithContext(ctx context.Context) *V1EdgeHostDevicesHealthUpdateParams { + var () + return &V1EdgeHostDevicesHealthUpdateParams{ + + Context: ctx, + } +} + +// NewV1EdgeHostDevicesHealthUpdateParamsWithHTTPClient creates a new V1EdgeHostDevicesHealthUpdateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1EdgeHostDevicesHealthUpdateParamsWithHTTPClient(client *http.Client) *V1EdgeHostDevicesHealthUpdateParams { + var () + return &V1EdgeHostDevicesHealthUpdateParams{ + HTTPClient: client, + } +} + +/* +V1EdgeHostDevicesHealthUpdateParams contains all the parameters to send to the API endpoint +for the v1 edge host devices health update operation typically these are written to a http.Request +*/ +type V1EdgeHostDevicesHealthUpdateParams struct { + + /*Body*/ + Body *models.V1EdgeHostHealth + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 edge host devices health update params +func (o *V1EdgeHostDevicesHealthUpdateParams) WithTimeout(timeout time.Duration) *V1EdgeHostDevicesHealthUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 edge host devices health update params +func (o *V1EdgeHostDevicesHealthUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 edge host devices health update params +func (o *V1EdgeHostDevicesHealthUpdateParams) WithContext(ctx context.Context) *V1EdgeHostDevicesHealthUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 edge host devices health update params +func (o *V1EdgeHostDevicesHealthUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 edge host devices health update params +func (o *V1EdgeHostDevicesHealthUpdateParams) WithHTTPClient(client *http.Client) *V1EdgeHostDevicesHealthUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 edge host devices health update params +func (o *V1EdgeHostDevicesHealthUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 edge host devices health update params +func (o *V1EdgeHostDevicesHealthUpdateParams) WithBody(body *models.V1EdgeHostHealth) *V1EdgeHostDevicesHealthUpdateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 edge host devices health update params +func (o *V1EdgeHostDevicesHealthUpdateParams) SetBody(body *models.V1EdgeHostHealth) { + o.Body = body +} + +// WithUID adds the uid to the v1 edge host devices health update params +func (o *V1EdgeHostDevicesHealthUpdateParams) WithUID(uid string) *V1EdgeHostDevicesHealthUpdateParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 edge host devices health update params +func (o *V1EdgeHostDevicesHealthUpdateParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1EdgeHostDevicesHealthUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_edge_host_devices_health_update_responses.go b/api/client/v1/v1_edge_host_devices_health_update_responses.go new file mode 100644 index 00000000..8649dae0 --- /dev/null +++ b/api/client/v1/v1_edge_host_devices_health_update_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1EdgeHostDevicesHealthUpdateReader is a Reader for the V1EdgeHostDevicesHealthUpdate structure. +type V1EdgeHostDevicesHealthUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1EdgeHostDevicesHealthUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1EdgeHostDevicesHealthUpdateNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1EdgeHostDevicesHealthUpdateNoContent creates a V1EdgeHostDevicesHealthUpdateNoContent with default headers values +func NewV1EdgeHostDevicesHealthUpdateNoContent() *V1EdgeHostDevicesHealthUpdateNoContent { + return &V1EdgeHostDevicesHealthUpdateNoContent{} +} + +/* +V1EdgeHostDevicesHealthUpdateNoContent handles this case with default header values. + +The resource was updated successfully +*/ +type V1EdgeHostDevicesHealthUpdateNoContent struct { +} + +func (o *V1EdgeHostDevicesHealthUpdateNoContent) Error() string { + return fmt.Sprintf("[PATCH /v1/edgehosts/{uid}/health][%d] v1EdgeHostDevicesHealthUpdateNoContent ", 204) +} + +func (o *V1EdgeHostDevicesHealthUpdateNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_edge_host_devices_register_parameters.go b/api/client/v1/v1_edge_host_devices_register_parameters.go new file mode 100644 index 00000000..d9203bf7 --- /dev/null +++ b/api/client/v1/v1_edge_host_devices_register_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1EdgeHostDevicesRegisterParams creates a new V1EdgeHostDevicesRegisterParams object +// with the default values initialized. +func NewV1EdgeHostDevicesRegisterParams() *V1EdgeHostDevicesRegisterParams { + var () + return &V1EdgeHostDevicesRegisterParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1EdgeHostDevicesRegisterParamsWithTimeout creates a new V1EdgeHostDevicesRegisterParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1EdgeHostDevicesRegisterParamsWithTimeout(timeout time.Duration) *V1EdgeHostDevicesRegisterParams { + var () + return &V1EdgeHostDevicesRegisterParams{ + + timeout: timeout, + } +} + +// NewV1EdgeHostDevicesRegisterParamsWithContext creates a new V1EdgeHostDevicesRegisterParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1EdgeHostDevicesRegisterParamsWithContext(ctx context.Context) *V1EdgeHostDevicesRegisterParams { + var () + return &V1EdgeHostDevicesRegisterParams{ + + Context: ctx, + } +} + +// NewV1EdgeHostDevicesRegisterParamsWithHTTPClient creates a new V1EdgeHostDevicesRegisterParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1EdgeHostDevicesRegisterParamsWithHTTPClient(client *http.Client) *V1EdgeHostDevicesRegisterParams { + var () + return &V1EdgeHostDevicesRegisterParams{ + HTTPClient: client, + } +} + +/* +V1EdgeHostDevicesRegisterParams contains all the parameters to send to the API endpoint +for the v1 edge host devices register operation typically these are written to a http.Request +*/ +type V1EdgeHostDevicesRegisterParams struct { + + /*Body*/ + Body *models.V1EdgeHostDevice + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 edge host devices register params +func (o *V1EdgeHostDevicesRegisterParams) WithTimeout(timeout time.Duration) *V1EdgeHostDevicesRegisterParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 edge host devices register params +func (o *V1EdgeHostDevicesRegisterParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 edge host devices register params +func (o *V1EdgeHostDevicesRegisterParams) WithContext(ctx context.Context) *V1EdgeHostDevicesRegisterParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 edge host devices register params +func (o *V1EdgeHostDevicesRegisterParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 edge host devices register params +func (o *V1EdgeHostDevicesRegisterParams) WithHTTPClient(client *http.Client) *V1EdgeHostDevicesRegisterParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 edge host devices register params +func (o *V1EdgeHostDevicesRegisterParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 edge host devices register params +func (o *V1EdgeHostDevicesRegisterParams) WithBody(body *models.V1EdgeHostDevice) *V1EdgeHostDevicesRegisterParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 edge host devices register params +func (o *V1EdgeHostDevicesRegisterParams) SetBody(body *models.V1EdgeHostDevice) { + o.Body = body +} + +// WriteToRequest writes these params to a swagger request +func (o *V1EdgeHostDevicesRegisterParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_edge_host_devices_register_responses.go b/api/client/v1/v1_edge_host_devices_register_responses.go new file mode 100644 index 00000000..55c3dbba --- /dev/null +++ b/api/client/v1/v1_edge_host_devices_register_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1EdgeHostDevicesRegisterReader is a Reader for the V1EdgeHostDevicesRegister structure. +type V1EdgeHostDevicesRegisterReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1EdgeHostDevicesRegisterReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1EdgeHostDevicesRegisterOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1EdgeHostDevicesRegisterOK creates a V1EdgeHostDevicesRegisterOK with default headers values +func NewV1EdgeHostDevicesRegisterOK() *V1EdgeHostDevicesRegisterOK { + return &V1EdgeHostDevicesRegisterOK{} +} + +/* +V1EdgeHostDevicesRegisterOK handles this case with default header values. + +OK +*/ +type V1EdgeHostDevicesRegisterOK struct { + Payload *models.V1EdgeHostDevice +} + +func (o *V1EdgeHostDevicesRegisterOK) Error() string { + return fmt.Sprintf("[POST /v1/edgehosts/register][%d] v1EdgeHostDevicesRegisterOK %+v", 200, o.Payload) +} + +func (o *V1EdgeHostDevicesRegisterOK) GetPayload() *models.V1EdgeHostDevice { + return o.Payload +} + +func (o *V1EdgeHostDevicesRegisterOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1EdgeHostDevice) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_edge_host_devices_uid_cluster_associate_parameters.go b/api/client/v1/v1_edge_host_devices_uid_cluster_associate_parameters.go new file mode 100644 index 00000000..918046c1 --- /dev/null +++ b/api/client/v1/v1_edge_host_devices_uid_cluster_associate_parameters.go @@ -0,0 +1,154 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1EdgeHostDevicesUIDClusterAssociateParams creates a new V1EdgeHostDevicesUIDClusterAssociateParams object +// with the default values initialized. +func NewV1EdgeHostDevicesUIDClusterAssociateParams() *V1EdgeHostDevicesUIDClusterAssociateParams { + var () + return &V1EdgeHostDevicesUIDClusterAssociateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1EdgeHostDevicesUIDClusterAssociateParamsWithTimeout creates a new V1EdgeHostDevicesUIDClusterAssociateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1EdgeHostDevicesUIDClusterAssociateParamsWithTimeout(timeout time.Duration) *V1EdgeHostDevicesUIDClusterAssociateParams { + var () + return &V1EdgeHostDevicesUIDClusterAssociateParams{ + + timeout: timeout, + } +} + +// NewV1EdgeHostDevicesUIDClusterAssociateParamsWithContext creates a new V1EdgeHostDevicesUIDClusterAssociateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1EdgeHostDevicesUIDClusterAssociateParamsWithContext(ctx context.Context) *V1EdgeHostDevicesUIDClusterAssociateParams { + var () + return &V1EdgeHostDevicesUIDClusterAssociateParams{ + + Context: ctx, + } +} + +// NewV1EdgeHostDevicesUIDClusterAssociateParamsWithHTTPClient creates a new V1EdgeHostDevicesUIDClusterAssociateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1EdgeHostDevicesUIDClusterAssociateParamsWithHTTPClient(client *http.Client) *V1EdgeHostDevicesUIDClusterAssociateParams { + var () + return &V1EdgeHostDevicesUIDClusterAssociateParams{ + HTTPClient: client, + } +} + +/* +V1EdgeHostDevicesUIDClusterAssociateParams contains all the parameters to send to the API endpoint +for the v1 edge host devices Uid cluster associate operation typically these are written to a http.Request +*/ +type V1EdgeHostDevicesUIDClusterAssociateParams struct { + + /*Body*/ + Body *models.V1EdgeHostClusterEntity + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 edge host devices Uid cluster associate params +func (o *V1EdgeHostDevicesUIDClusterAssociateParams) WithTimeout(timeout time.Duration) *V1EdgeHostDevicesUIDClusterAssociateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 edge host devices Uid cluster associate params +func (o *V1EdgeHostDevicesUIDClusterAssociateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 edge host devices Uid cluster associate params +func (o *V1EdgeHostDevicesUIDClusterAssociateParams) WithContext(ctx context.Context) *V1EdgeHostDevicesUIDClusterAssociateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 edge host devices Uid cluster associate params +func (o *V1EdgeHostDevicesUIDClusterAssociateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 edge host devices Uid cluster associate params +func (o *V1EdgeHostDevicesUIDClusterAssociateParams) WithHTTPClient(client *http.Client) *V1EdgeHostDevicesUIDClusterAssociateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 edge host devices Uid cluster associate params +func (o *V1EdgeHostDevicesUIDClusterAssociateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 edge host devices Uid cluster associate params +func (o *V1EdgeHostDevicesUIDClusterAssociateParams) WithBody(body *models.V1EdgeHostClusterEntity) *V1EdgeHostDevicesUIDClusterAssociateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 edge host devices Uid cluster associate params +func (o *V1EdgeHostDevicesUIDClusterAssociateParams) SetBody(body *models.V1EdgeHostClusterEntity) { + o.Body = body +} + +// WithUID adds the uid to the v1 edge host devices Uid cluster associate params +func (o *V1EdgeHostDevicesUIDClusterAssociateParams) WithUID(uid string) *V1EdgeHostDevicesUIDClusterAssociateParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 edge host devices Uid cluster associate params +func (o *V1EdgeHostDevicesUIDClusterAssociateParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1EdgeHostDevicesUIDClusterAssociateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_edge_host_devices_uid_cluster_associate_responses.go b/api/client/v1/v1_edge_host_devices_uid_cluster_associate_responses.go new file mode 100644 index 00000000..446ffbf8 --- /dev/null +++ b/api/client/v1/v1_edge_host_devices_uid_cluster_associate_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1EdgeHostDevicesUIDClusterAssociateReader is a Reader for the V1EdgeHostDevicesUIDClusterAssociate structure. +type V1EdgeHostDevicesUIDClusterAssociateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1EdgeHostDevicesUIDClusterAssociateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1EdgeHostDevicesUIDClusterAssociateNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1EdgeHostDevicesUIDClusterAssociateNoContent creates a V1EdgeHostDevicesUIDClusterAssociateNoContent with default headers values +func NewV1EdgeHostDevicesUIDClusterAssociateNoContent() *V1EdgeHostDevicesUIDClusterAssociateNoContent { + return &V1EdgeHostDevicesUIDClusterAssociateNoContent{} +} + +/* +V1EdgeHostDevicesUIDClusterAssociateNoContent handles this case with default header values. + +The resource was updated successfully +*/ +type V1EdgeHostDevicesUIDClusterAssociateNoContent struct { +} + +func (o *V1EdgeHostDevicesUIDClusterAssociateNoContent) Error() string { + return fmt.Sprintf("[PATCH /v1/edgehosts/{uid}/cluster/associate][%d] v1EdgeHostDevicesUidClusterAssociateNoContent ", 204) +} + +func (o *V1EdgeHostDevicesUIDClusterAssociateNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_edge_host_devices_uid_cluster_deassociate_parameters.go b/api/client/v1/v1_edge_host_devices_uid_cluster_deassociate_parameters.go new file mode 100644 index 00000000..f0ffcecc --- /dev/null +++ b/api/client/v1/v1_edge_host_devices_uid_cluster_deassociate_parameters.go @@ -0,0 +1,133 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1EdgeHostDevicesUIDClusterDeassociateParams creates a new V1EdgeHostDevicesUIDClusterDeassociateParams object +// with the default values initialized. +func NewV1EdgeHostDevicesUIDClusterDeassociateParams() *V1EdgeHostDevicesUIDClusterDeassociateParams { + var () + return &V1EdgeHostDevicesUIDClusterDeassociateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1EdgeHostDevicesUIDClusterDeassociateParamsWithTimeout creates a new V1EdgeHostDevicesUIDClusterDeassociateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1EdgeHostDevicesUIDClusterDeassociateParamsWithTimeout(timeout time.Duration) *V1EdgeHostDevicesUIDClusterDeassociateParams { + var () + return &V1EdgeHostDevicesUIDClusterDeassociateParams{ + + timeout: timeout, + } +} + +// NewV1EdgeHostDevicesUIDClusterDeassociateParamsWithContext creates a new V1EdgeHostDevicesUIDClusterDeassociateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1EdgeHostDevicesUIDClusterDeassociateParamsWithContext(ctx context.Context) *V1EdgeHostDevicesUIDClusterDeassociateParams { + var () + return &V1EdgeHostDevicesUIDClusterDeassociateParams{ + + Context: ctx, + } +} + +// NewV1EdgeHostDevicesUIDClusterDeassociateParamsWithHTTPClient creates a new V1EdgeHostDevicesUIDClusterDeassociateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1EdgeHostDevicesUIDClusterDeassociateParamsWithHTTPClient(client *http.Client) *V1EdgeHostDevicesUIDClusterDeassociateParams { + var () + return &V1EdgeHostDevicesUIDClusterDeassociateParams{ + HTTPClient: client, + } +} + +/* +V1EdgeHostDevicesUIDClusterDeassociateParams contains all the parameters to send to the API endpoint +for the v1 edge host devices Uid cluster deassociate operation typically these are written to a http.Request +*/ +type V1EdgeHostDevicesUIDClusterDeassociateParams struct { + + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 edge host devices Uid cluster deassociate params +func (o *V1EdgeHostDevicesUIDClusterDeassociateParams) WithTimeout(timeout time.Duration) *V1EdgeHostDevicesUIDClusterDeassociateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 edge host devices Uid cluster deassociate params +func (o *V1EdgeHostDevicesUIDClusterDeassociateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 edge host devices Uid cluster deassociate params +func (o *V1EdgeHostDevicesUIDClusterDeassociateParams) WithContext(ctx context.Context) *V1EdgeHostDevicesUIDClusterDeassociateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 edge host devices Uid cluster deassociate params +func (o *V1EdgeHostDevicesUIDClusterDeassociateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 edge host devices Uid cluster deassociate params +func (o *V1EdgeHostDevicesUIDClusterDeassociateParams) WithHTTPClient(client *http.Client) *V1EdgeHostDevicesUIDClusterDeassociateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 edge host devices Uid cluster deassociate params +func (o *V1EdgeHostDevicesUIDClusterDeassociateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithUID adds the uid to the v1 edge host devices Uid cluster deassociate params +func (o *V1EdgeHostDevicesUIDClusterDeassociateParams) WithUID(uid string) *V1EdgeHostDevicesUIDClusterDeassociateParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 edge host devices Uid cluster deassociate params +func (o *V1EdgeHostDevicesUIDClusterDeassociateParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1EdgeHostDevicesUIDClusterDeassociateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_edge_host_devices_uid_cluster_deassociate_responses.go b/api/client/v1/v1_edge_host_devices_uid_cluster_deassociate_responses.go new file mode 100644 index 00000000..182686e2 --- /dev/null +++ b/api/client/v1/v1_edge_host_devices_uid_cluster_deassociate_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1EdgeHostDevicesUIDClusterDeassociateReader is a Reader for the V1EdgeHostDevicesUIDClusterDeassociate structure. +type V1EdgeHostDevicesUIDClusterDeassociateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1EdgeHostDevicesUIDClusterDeassociateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1EdgeHostDevicesUIDClusterDeassociateNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1EdgeHostDevicesUIDClusterDeassociateNoContent creates a V1EdgeHostDevicesUIDClusterDeassociateNoContent with default headers values +func NewV1EdgeHostDevicesUIDClusterDeassociateNoContent() *V1EdgeHostDevicesUIDClusterDeassociateNoContent { + return &V1EdgeHostDevicesUIDClusterDeassociateNoContent{} +} + +/* +V1EdgeHostDevicesUIDClusterDeassociateNoContent handles this case with default header values. + +The resource was deleted successfully +*/ +type V1EdgeHostDevicesUIDClusterDeassociateNoContent struct { +} + +func (o *V1EdgeHostDevicesUIDClusterDeassociateNoContent) Error() string { + return fmt.Sprintf("[DELETE /v1/edgehosts/{uid}/cluster/associate][%d] v1EdgeHostDevicesUidClusterDeassociateNoContent ", 204) +} + +func (o *V1EdgeHostDevicesUIDClusterDeassociateNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_edge_host_devices_uid_delete_parameters.go b/api/client/v1/v1_edge_host_devices_uid_delete_parameters.go new file mode 100644 index 00000000..2a0912d3 --- /dev/null +++ b/api/client/v1/v1_edge_host_devices_uid_delete_parameters.go @@ -0,0 +1,133 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1EdgeHostDevicesUIDDeleteParams creates a new V1EdgeHostDevicesUIDDeleteParams object +// with the default values initialized. +func NewV1EdgeHostDevicesUIDDeleteParams() *V1EdgeHostDevicesUIDDeleteParams { + var () + return &V1EdgeHostDevicesUIDDeleteParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1EdgeHostDevicesUIDDeleteParamsWithTimeout creates a new V1EdgeHostDevicesUIDDeleteParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1EdgeHostDevicesUIDDeleteParamsWithTimeout(timeout time.Duration) *V1EdgeHostDevicesUIDDeleteParams { + var () + return &V1EdgeHostDevicesUIDDeleteParams{ + + timeout: timeout, + } +} + +// NewV1EdgeHostDevicesUIDDeleteParamsWithContext creates a new V1EdgeHostDevicesUIDDeleteParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1EdgeHostDevicesUIDDeleteParamsWithContext(ctx context.Context) *V1EdgeHostDevicesUIDDeleteParams { + var () + return &V1EdgeHostDevicesUIDDeleteParams{ + + Context: ctx, + } +} + +// NewV1EdgeHostDevicesUIDDeleteParamsWithHTTPClient creates a new V1EdgeHostDevicesUIDDeleteParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1EdgeHostDevicesUIDDeleteParamsWithHTTPClient(client *http.Client) *V1EdgeHostDevicesUIDDeleteParams { + var () + return &V1EdgeHostDevicesUIDDeleteParams{ + HTTPClient: client, + } +} + +/* +V1EdgeHostDevicesUIDDeleteParams contains all the parameters to send to the API endpoint +for the v1 edge host devices Uid delete operation typically these are written to a http.Request +*/ +type V1EdgeHostDevicesUIDDeleteParams struct { + + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 edge host devices Uid delete params +func (o *V1EdgeHostDevicesUIDDeleteParams) WithTimeout(timeout time.Duration) *V1EdgeHostDevicesUIDDeleteParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 edge host devices Uid delete params +func (o *V1EdgeHostDevicesUIDDeleteParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 edge host devices Uid delete params +func (o *V1EdgeHostDevicesUIDDeleteParams) WithContext(ctx context.Context) *V1EdgeHostDevicesUIDDeleteParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 edge host devices Uid delete params +func (o *V1EdgeHostDevicesUIDDeleteParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 edge host devices Uid delete params +func (o *V1EdgeHostDevicesUIDDeleteParams) WithHTTPClient(client *http.Client) *V1EdgeHostDevicesUIDDeleteParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 edge host devices Uid delete params +func (o *V1EdgeHostDevicesUIDDeleteParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithUID adds the uid to the v1 edge host devices Uid delete params +func (o *V1EdgeHostDevicesUIDDeleteParams) WithUID(uid string) *V1EdgeHostDevicesUIDDeleteParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 edge host devices Uid delete params +func (o *V1EdgeHostDevicesUIDDeleteParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1EdgeHostDevicesUIDDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_edge_host_devices_uid_delete_responses.go b/api/client/v1/v1_edge_host_devices_uid_delete_responses.go new file mode 100644 index 00000000..9010407e --- /dev/null +++ b/api/client/v1/v1_edge_host_devices_uid_delete_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1EdgeHostDevicesUIDDeleteReader is a Reader for the V1EdgeHostDevicesUIDDelete structure. +type V1EdgeHostDevicesUIDDeleteReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1EdgeHostDevicesUIDDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1EdgeHostDevicesUIDDeleteNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1EdgeHostDevicesUIDDeleteNoContent creates a V1EdgeHostDevicesUIDDeleteNoContent with default headers values +func NewV1EdgeHostDevicesUIDDeleteNoContent() *V1EdgeHostDevicesUIDDeleteNoContent { + return &V1EdgeHostDevicesUIDDeleteNoContent{} +} + +/* +V1EdgeHostDevicesUIDDeleteNoContent handles this case with default header values. + +The resource was deleted successfully +*/ +type V1EdgeHostDevicesUIDDeleteNoContent struct { +} + +func (o *V1EdgeHostDevicesUIDDeleteNoContent) Error() string { + return fmt.Sprintf("[DELETE /v1/edgehosts/{uid}][%d] v1EdgeHostDevicesUidDeleteNoContent ", 204) +} + +func (o *V1EdgeHostDevicesUIDDeleteNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_edge_host_devices_uid_get_parameters.go b/api/client/v1/v1_edge_host_devices_uid_get_parameters.go new file mode 100644 index 00000000..2de29b0a --- /dev/null +++ b/api/client/v1/v1_edge_host_devices_uid_get_parameters.go @@ -0,0 +1,178 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// NewV1EdgeHostDevicesUIDGetParams creates a new V1EdgeHostDevicesUIDGetParams object +// with the default values initialized. +func NewV1EdgeHostDevicesUIDGetParams() *V1EdgeHostDevicesUIDGetParams { + var ( + resolvePackValuesDefault = bool(false) + ) + return &V1EdgeHostDevicesUIDGetParams{ + ResolvePackValues: &resolvePackValuesDefault, + + timeout: cr.DefaultTimeout, + } +} + +// NewV1EdgeHostDevicesUIDGetParamsWithTimeout creates a new V1EdgeHostDevicesUIDGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1EdgeHostDevicesUIDGetParamsWithTimeout(timeout time.Duration) *V1EdgeHostDevicesUIDGetParams { + var ( + resolvePackValuesDefault = bool(false) + ) + return &V1EdgeHostDevicesUIDGetParams{ + ResolvePackValues: &resolvePackValuesDefault, + + timeout: timeout, + } +} + +// NewV1EdgeHostDevicesUIDGetParamsWithContext creates a new V1EdgeHostDevicesUIDGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1EdgeHostDevicesUIDGetParamsWithContext(ctx context.Context) *V1EdgeHostDevicesUIDGetParams { + var ( + resolvePackValuesDefault = bool(false) + ) + return &V1EdgeHostDevicesUIDGetParams{ + ResolvePackValues: &resolvePackValuesDefault, + + Context: ctx, + } +} + +// NewV1EdgeHostDevicesUIDGetParamsWithHTTPClient creates a new V1EdgeHostDevicesUIDGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1EdgeHostDevicesUIDGetParamsWithHTTPClient(client *http.Client) *V1EdgeHostDevicesUIDGetParams { + var ( + resolvePackValuesDefault = bool(false) + ) + return &V1EdgeHostDevicesUIDGetParams{ + ResolvePackValues: &resolvePackValuesDefault, + HTTPClient: client, + } +} + +/* +V1EdgeHostDevicesUIDGetParams contains all the parameters to send to the API endpoint +for the v1 edge host devices Uid get operation typically these are written to a http.Request +*/ +type V1EdgeHostDevicesUIDGetParams struct { + + /*ResolvePackValues + resolve pack values if set to true + + */ + ResolvePackValues *bool + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 edge host devices Uid get params +func (o *V1EdgeHostDevicesUIDGetParams) WithTimeout(timeout time.Duration) *V1EdgeHostDevicesUIDGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 edge host devices Uid get params +func (o *V1EdgeHostDevicesUIDGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 edge host devices Uid get params +func (o *V1EdgeHostDevicesUIDGetParams) WithContext(ctx context.Context) *V1EdgeHostDevicesUIDGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 edge host devices Uid get params +func (o *V1EdgeHostDevicesUIDGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 edge host devices Uid get params +func (o *V1EdgeHostDevicesUIDGetParams) WithHTTPClient(client *http.Client) *V1EdgeHostDevicesUIDGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 edge host devices Uid get params +func (o *V1EdgeHostDevicesUIDGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithResolvePackValues adds the resolvePackValues to the v1 edge host devices Uid get params +func (o *V1EdgeHostDevicesUIDGetParams) WithResolvePackValues(resolvePackValues *bool) *V1EdgeHostDevicesUIDGetParams { + o.SetResolvePackValues(resolvePackValues) + return o +} + +// SetResolvePackValues adds the resolvePackValues to the v1 edge host devices Uid get params +func (o *V1EdgeHostDevicesUIDGetParams) SetResolvePackValues(resolvePackValues *bool) { + o.ResolvePackValues = resolvePackValues +} + +// WithUID adds the uid to the v1 edge host devices Uid get params +func (o *V1EdgeHostDevicesUIDGetParams) WithUID(uid string) *V1EdgeHostDevicesUIDGetParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 edge host devices Uid get params +func (o *V1EdgeHostDevicesUIDGetParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1EdgeHostDevicesUIDGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.ResolvePackValues != nil { + + // query param resolvePackValues + var qrResolvePackValues bool + if o.ResolvePackValues != nil { + qrResolvePackValues = *o.ResolvePackValues + } + qResolvePackValues := swag.FormatBool(qrResolvePackValues) + if qResolvePackValues != "" { + if err := r.SetQueryParam("resolvePackValues", qResolvePackValues); err != nil { + return err + } + } + + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_edge_host_devices_uid_get_responses.go b/api/client/v1/v1_edge_host_devices_uid_get_responses.go new file mode 100644 index 00000000..78f8fcf8 --- /dev/null +++ b/api/client/v1/v1_edge_host_devices_uid_get_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1EdgeHostDevicesUIDGetReader is a Reader for the V1EdgeHostDevicesUIDGet structure. +type V1EdgeHostDevicesUIDGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1EdgeHostDevicesUIDGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1EdgeHostDevicesUIDGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1EdgeHostDevicesUIDGetOK creates a V1EdgeHostDevicesUIDGetOK with default headers values +func NewV1EdgeHostDevicesUIDGetOK() *V1EdgeHostDevicesUIDGetOK { + return &V1EdgeHostDevicesUIDGetOK{} +} + +/* +V1EdgeHostDevicesUIDGetOK handles this case with default header values. + +OK +*/ +type V1EdgeHostDevicesUIDGetOK struct { + Payload *models.V1EdgeHostDevice +} + +func (o *V1EdgeHostDevicesUIDGetOK) Error() string { + return fmt.Sprintf("[GET /v1/edgehosts/{uid}][%d] v1EdgeHostDevicesUidGetOK %+v", 200, o.Payload) +} + +func (o *V1EdgeHostDevicesUIDGetOK) GetPayload() *models.V1EdgeHostDevice { + return o.Payload +} + +func (o *V1EdgeHostDevicesUIDGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1EdgeHostDevice) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_edge_host_devices_uid_meta_update_parameters.go b/api/client/v1/v1_edge_host_devices_uid_meta_update_parameters.go new file mode 100644 index 00000000..5c620a87 --- /dev/null +++ b/api/client/v1/v1_edge_host_devices_uid_meta_update_parameters.go @@ -0,0 +1,154 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1EdgeHostDevicesUIDMetaUpdateParams creates a new V1EdgeHostDevicesUIDMetaUpdateParams object +// with the default values initialized. +func NewV1EdgeHostDevicesUIDMetaUpdateParams() *V1EdgeHostDevicesUIDMetaUpdateParams { + var () + return &V1EdgeHostDevicesUIDMetaUpdateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1EdgeHostDevicesUIDMetaUpdateParamsWithTimeout creates a new V1EdgeHostDevicesUIDMetaUpdateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1EdgeHostDevicesUIDMetaUpdateParamsWithTimeout(timeout time.Duration) *V1EdgeHostDevicesUIDMetaUpdateParams { + var () + return &V1EdgeHostDevicesUIDMetaUpdateParams{ + + timeout: timeout, + } +} + +// NewV1EdgeHostDevicesUIDMetaUpdateParamsWithContext creates a new V1EdgeHostDevicesUIDMetaUpdateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1EdgeHostDevicesUIDMetaUpdateParamsWithContext(ctx context.Context) *V1EdgeHostDevicesUIDMetaUpdateParams { + var () + return &V1EdgeHostDevicesUIDMetaUpdateParams{ + + Context: ctx, + } +} + +// NewV1EdgeHostDevicesUIDMetaUpdateParamsWithHTTPClient creates a new V1EdgeHostDevicesUIDMetaUpdateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1EdgeHostDevicesUIDMetaUpdateParamsWithHTTPClient(client *http.Client) *V1EdgeHostDevicesUIDMetaUpdateParams { + var () + return &V1EdgeHostDevicesUIDMetaUpdateParams{ + HTTPClient: client, + } +} + +/* +V1EdgeHostDevicesUIDMetaUpdateParams contains all the parameters to send to the API endpoint +for the v1 edge host devices Uid meta update operation typically these are written to a http.Request +*/ +type V1EdgeHostDevicesUIDMetaUpdateParams struct { + + /*Body*/ + Body *models.V1EdgeHostDeviceMetaUpdateEntity + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 edge host devices Uid meta update params +func (o *V1EdgeHostDevicesUIDMetaUpdateParams) WithTimeout(timeout time.Duration) *V1EdgeHostDevicesUIDMetaUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 edge host devices Uid meta update params +func (o *V1EdgeHostDevicesUIDMetaUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 edge host devices Uid meta update params +func (o *V1EdgeHostDevicesUIDMetaUpdateParams) WithContext(ctx context.Context) *V1EdgeHostDevicesUIDMetaUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 edge host devices Uid meta update params +func (o *V1EdgeHostDevicesUIDMetaUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 edge host devices Uid meta update params +func (o *V1EdgeHostDevicesUIDMetaUpdateParams) WithHTTPClient(client *http.Client) *V1EdgeHostDevicesUIDMetaUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 edge host devices Uid meta update params +func (o *V1EdgeHostDevicesUIDMetaUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 edge host devices Uid meta update params +func (o *V1EdgeHostDevicesUIDMetaUpdateParams) WithBody(body *models.V1EdgeHostDeviceMetaUpdateEntity) *V1EdgeHostDevicesUIDMetaUpdateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 edge host devices Uid meta update params +func (o *V1EdgeHostDevicesUIDMetaUpdateParams) SetBody(body *models.V1EdgeHostDeviceMetaUpdateEntity) { + o.Body = body +} + +// WithUID adds the uid to the v1 edge host devices Uid meta update params +func (o *V1EdgeHostDevicesUIDMetaUpdateParams) WithUID(uid string) *V1EdgeHostDevicesUIDMetaUpdateParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 edge host devices Uid meta update params +func (o *V1EdgeHostDevicesUIDMetaUpdateParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1EdgeHostDevicesUIDMetaUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_edge_host_devices_uid_meta_update_responses.go b/api/client/v1/v1_edge_host_devices_uid_meta_update_responses.go new file mode 100644 index 00000000..5c0284eb --- /dev/null +++ b/api/client/v1/v1_edge_host_devices_uid_meta_update_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1EdgeHostDevicesUIDMetaUpdateReader is a Reader for the V1EdgeHostDevicesUIDMetaUpdate structure. +type V1EdgeHostDevicesUIDMetaUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1EdgeHostDevicesUIDMetaUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1EdgeHostDevicesUIDMetaUpdateNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1EdgeHostDevicesUIDMetaUpdateNoContent creates a V1EdgeHostDevicesUIDMetaUpdateNoContent with default headers values +func NewV1EdgeHostDevicesUIDMetaUpdateNoContent() *V1EdgeHostDevicesUIDMetaUpdateNoContent { + return &V1EdgeHostDevicesUIDMetaUpdateNoContent{} +} + +/* +V1EdgeHostDevicesUIDMetaUpdateNoContent handles this case with default header values. + +The resource was updated successfully +*/ +type V1EdgeHostDevicesUIDMetaUpdateNoContent struct { +} + +func (o *V1EdgeHostDevicesUIDMetaUpdateNoContent) Error() string { + return fmt.Sprintf("[PUT /v1/edgehosts/{uid}/meta][%d] v1EdgeHostDevicesUidMetaUpdateNoContent ", 204) +} + +func (o *V1EdgeHostDevicesUIDMetaUpdateNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_edge_host_devices_uid_pack_manifests_uid_get_parameters.go b/api/client/v1/v1_edge_host_devices_uid_pack_manifests_uid_get_parameters.go new file mode 100644 index 00000000..5f710425 --- /dev/null +++ b/api/client/v1/v1_edge_host_devices_uid_pack_manifests_uid_get_parameters.go @@ -0,0 +1,202 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// NewV1EdgeHostDevicesUIDPackManifestsUIDGetParams creates a new V1EdgeHostDevicesUIDPackManifestsUIDGetParams object +// with the default values initialized. +func NewV1EdgeHostDevicesUIDPackManifestsUIDGetParams() *V1EdgeHostDevicesUIDPackManifestsUIDGetParams { + var ( + resolveManifestValuesDefault = bool(false) + ) + return &V1EdgeHostDevicesUIDPackManifestsUIDGetParams{ + ResolveManifestValues: &resolveManifestValuesDefault, + + timeout: cr.DefaultTimeout, + } +} + +// NewV1EdgeHostDevicesUIDPackManifestsUIDGetParamsWithTimeout creates a new V1EdgeHostDevicesUIDPackManifestsUIDGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1EdgeHostDevicesUIDPackManifestsUIDGetParamsWithTimeout(timeout time.Duration) *V1EdgeHostDevicesUIDPackManifestsUIDGetParams { + var ( + resolveManifestValuesDefault = bool(false) + ) + return &V1EdgeHostDevicesUIDPackManifestsUIDGetParams{ + ResolveManifestValues: &resolveManifestValuesDefault, + + timeout: timeout, + } +} + +// NewV1EdgeHostDevicesUIDPackManifestsUIDGetParamsWithContext creates a new V1EdgeHostDevicesUIDPackManifestsUIDGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1EdgeHostDevicesUIDPackManifestsUIDGetParamsWithContext(ctx context.Context) *V1EdgeHostDevicesUIDPackManifestsUIDGetParams { + var ( + resolveManifestValuesDefault = bool(false) + ) + return &V1EdgeHostDevicesUIDPackManifestsUIDGetParams{ + ResolveManifestValues: &resolveManifestValuesDefault, + + Context: ctx, + } +} + +// NewV1EdgeHostDevicesUIDPackManifestsUIDGetParamsWithHTTPClient creates a new V1EdgeHostDevicesUIDPackManifestsUIDGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1EdgeHostDevicesUIDPackManifestsUIDGetParamsWithHTTPClient(client *http.Client) *V1EdgeHostDevicesUIDPackManifestsUIDGetParams { + var ( + resolveManifestValuesDefault = bool(false) + ) + return &V1EdgeHostDevicesUIDPackManifestsUIDGetParams{ + ResolveManifestValues: &resolveManifestValuesDefault, + HTTPClient: client, + } +} + +/* +V1EdgeHostDevicesUIDPackManifestsUIDGetParams contains all the parameters to send to the API endpoint +for the v1 edge host devices Uid pack manifests Uid get operation typically these are written to a http.Request +*/ +type V1EdgeHostDevicesUIDPackManifestsUIDGetParams struct { + + /*ManifestUID + manifest uid which is part of the pack ref + + */ + ManifestUID string + /*ResolveManifestValues + resolve pack manifest values if set to true + + */ + ResolveManifestValues *bool + /*UID + edge host uid + + */ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 edge host devices Uid pack manifests Uid get params +func (o *V1EdgeHostDevicesUIDPackManifestsUIDGetParams) WithTimeout(timeout time.Duration) *V1EdgeHostDevicesUIDPackManifestsUIDGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 edge host devices Uid pack manifests Uid get params +func (o *V1EdgeHostDevicesUIDPackManifestsUIDGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 edge host devices Uid pack manifests Uid get params +func (o *V1EdgeHostDevicesUIDPackManifestsUIDGetParams) WithContext(ctx context.Context) *V1EdgeHostDevicesUIDPackManifestsUIDGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 edge host devices Uid pack manifests Uid get params +func (o *V1EdgeHostDevicesUIDPackManifestsUIDGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 edge host devices Uid pack manifests Uid get params +func (o *V1EdgeHostDevicesUIDPackManifestsUIDGetParams) WithHTTPClient(client *http.Client) *V1EdgeHostDevicesUIDPackManifestsUIDGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 edge host devices Uid pack manifests Uid get params +func (o *V1EdgeHostDevicesUIDPackManifestsUIDGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithManifestUID adds the manifestUID to the v1 edge host devices Uid pack manifests Uid get params +func (o *V1EdgeHostDevicesUIDPackManifestsUIDGetParams) WithManifestUID(manifestUID string) *V1EdgeHostDevicesUIDPackManifestsUIDGetParams { + o.SetManifestUID(manifestUID) + return o +} + +// SetManifestUID adds the manifestUid to the v1 edge host devices Uid pack manifests Uid get params +func (o *V1EdgeHostDevicesUIDPackManifestsUIDGetParams) SetManifestUID(manifestUID string) { + o.ManifestUID = manifestUID +} + +// WithResolveManifestValues adds the resolveManifestValues to the v1 edge host devices Uid pack manifests Uid get params +func (o *V1EdgeHostDevicesUIDPackManifestsUIDGetParams) WithResolveManifestValues(resolveManifestValues *bool) *V1EdgeHostDevicesUIDPackManifestsUIDGetParams { + o.SetResolveManifestValues(resolveManifestValues) + return o +} + +// SetResolveManifestValues adds the resolveManifestValues to the v1 edge host devices Uid pack manifests Uid get params +func (o *V1EdgeHostDevicesUIDPackManifestsUIDGetParams) SetResolveManifestValues(resolveManifestValues *bool) { + o.ResolveManifestValues = resolveManifestValues +} + +// WithUID adds the uid to the v1 edge host devices Uid pack manifests Uid get params +func (o *V1EdgeHostDevicesUIDPackManifestsUIDGetParams) WithUID(uid string) *V1EdgeHostDevicesUIDPackManifestsUIDGetParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 edge host devices Uid pack manifests Uid get params +func (o *V1EdgeHostDevicesUIDPackManifestsUIDGetParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1EdgeHostDevicesUIDPackManifestsUIDGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param manifestUid + if err := r.SetPathParam("manifestUid", o.ManifestUID); err != nil { + return err + } + + if o.ResolveManifestValues != nil { + + // query param resolveManifestValues + var qrResolveManifestValues bool + if o.ResolveManifestValues != nil { + qrResolveManifestValues = *o.ResolveManifestValues + } + qResolveManifestValues := swag.FormatBool(qrResolveManifestValues) + if qResolveManifestValues != "" { + if err := r.SetQueryParam("resolveManifestValues", qResolveManifestValues); err != nil { + return err + } + } + + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_edge_host_devices_uid_pack_manifests_uid_get_responses.go b/api/client/v1/v1_edge_host_devices_uid_pack_manifests_uid_get_responses.go new file mode 100644 index 00000000..822e65d6 --- /dev/null +++ b/api/client/v1/v1_edge_host_devices_uid_pack_manifests_uid_get_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1EdgeHostDevicesUIDPackManifestsUIDGetReader is a Reader for the V1EdgeHostDevicesUIDPackManifestsUIDGet structure. +type V1EdgeHostDevicesUIDPackManifestsUIDGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1EdgeHostDevicesUIDPackManifestsUIDGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1EdgeHostDevicesUIDPackManifestsUIDGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1EdgeHostDevicesUIDPackManifestsUIDGetOK creates a V1EdgeHostDevicesUIDPackManifestsUIDGetOK with default headers values +func NewV1EdgeHostDevicesUIDPackManifestsUIDGetOK() *V1EdgeHostDevicesUIDPackManifestsUIDGetOK { + return &V1EdgeHostDevicesUIDPackManifestsUIDGetOK{} +} + +/* +V1EdgeHostDevicesUIDPackManifestsUIDGetOK handles this case with default header values. + +Pack manifest content +*/ +type V1EdgeHostDevicesUIDPackManifestsUIDGetOK struct { + Payload *models.V1Manifest +} + +func (o *V1EdgeHostDevicesUIDPackManifestsUIDGetOK) Error() string { + return fmt.Sprintf("[GET /v1/edgehosts/{uid}/pack/manifests/{manifestUid}][%d] v1EdgeHostDevicesUidPackManifestsUidGetOK %+v", 200, o.Payload) +} + +func (o *V1EdgeHostDevicesUIDPackManifestsUIDGetOK) GetPayload() *models.V1Manifest { + return o.Payload +} + +func (o *V1EdgeHostDevicesUIDPackManifestsUIDGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1Manifest) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_edge_host_devices_uid_packs_status_patch_parameters.go b/api/client/v1/v1_edge_host_devices_uid_packs_status_patch_parameters.go new file mode 100644 index 00000000..a3688abb --- /dev/null +++ b/api/client/v1/v1_edge_host_devices_uid_packs_status_patch_parameters.go @@ -0,0 +1,154 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1EdgeHostDevicesUIDPacksStatusPatchParams creates a new V1EdgeHostDevicesUIDPacksStatusPatchParams object +// with the default values initialized. +func NewV1EdgeHostDevicesUIDPacksStatusPatchParams() *V1EdgeHostDevicesUIDPacksStatusPatchParams { + var () + return &V1EdgeHostDevicesUIDPacksStatusPatchParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1EdgeHostDevicesUIDPacksStatusPatchParamsWithTimeout creates a new V1EdgeHostDevicesUIDPacksStatusPatchParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1EdgeHostDevicesUIDPacksStatusPatchParamsWithTimeout(timeout time.Duration) *V1EdgeHostDevicesUIDPacksStatusPatchParams { + var () + return &V1EdgeHostDevicesUIDPacksStatusPatchParams{ + + timeout: timeout, + } +} + +// NewV1EdgeHostDevicesUIDPacksStatusPatchParamsWithContext creates a new V1EdgeHostDevicesUIDPacksStatusPatchParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1EdgeHostDevicesUIDPacksStatusPatchParamsWithContext(ctx context.Context) *V1EdgeHostDevicesUIDPacksStatusPatchParams { + var () + return &V1EdgeHostDevicesUIDPacksStatusPatchParams{ + + Context: ctx, + } +} + +// NewV1EdgeHostDevicesUIDPacksStatusPatchParamsWithHTTPClient creates a new V1EdgeHostDevicesUIDPacksStatusPatchParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1EdgeHostDevicesUIDPacksStatusPatchParamsWithHTTPClient(client *http.Client) *V1EdgeHostDevicesUIDPacksStatusPatchParams { + var () + return &V1EdgeHostDevicesUIDPacksStatusPatchParams{ + HTTPClient: client, + } +} + +/* +V1EdgeHostDevicesUIDPacksStatusPatchParams contains all the parameters to send to the API endpoint +for the v1 edge host devices Uid packs status patch operation typically these are written to a http.Request +*/ +type V1EdgeHostDevicesUIDPacksStatusPatchParams struct { + + /*Body*/ + Body *models.V1SpectroClusterPacksStatusEntity + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 edge host devices Uid packs status patch params +func (o *V1EdgeHostDevicesUIDPacksStatusPatchParams) WithTimeout(timeout time.Duration) *V1EdgeHostDevicesUIDPacksStatusPatchParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 edge host devices Uid packs status patch params +func (o *V1EdgeHostDevicesUIDPacksStatusPatchParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 edge host devices Uid packs status patch params +func (o *V1EdgeHostDevicesUIDPacksStatusPatchParams) WithContext(ctx context.Context) *V1EdgeHostDevicesUIDPacksStatusPatchParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 edge host devices Uid packs status patch params +func (o *V1EdgeHostDevicesUIDPacksStatusPatchParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 edge host devices Uid packs status patch params +func (o *V1EdgeHostDevicesUIDPacksStatusPatchParams) WithHTTPClient(client *http.Client) *V1EdgeHostDevicesUIDPacksStatusPatchParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 edge host devices Uid packs status patch params +func (o *V1EdgeHostDevicesUIDPacksStatusPatchParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 edge host devices Uid packs status patch params +func (o *V1EdgeHostDevicesUIDPacksStatusPatchParams) WithBody(body *models.V1SpectroClusterPacksStatusEntity) *V1EdgeHostDevicesUIDPacksStatusPatchParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 edge host devices Uid packs status patch params +func (o *V1EdgeHostDevicesUIDPacksStatusPatchParams) SetBody(body *models.V1SpectroClusterPacksStatusEntity) { + o.Body = body +} + +// WithUID adds the uid to the v1 edge host devices Uid packs status patch params +func (o *V1EdgeHostDevicesUIDPacksStatusPatchParams) WithUID(uid string) *V1EdgeHostDevicesUIDPacksStatusPatchParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 edge host devices Uid packs status patch params +func (o *V1EdgeHostDevicesUIDPacksStatusPatchParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1EdgeHostDevicesUIDPacksStatusPatchParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_edge_host_devices_uid_packs_status_patch_responses.go b/api/client/v1/v1_edge_host_devices_uid_packs_status_patch_responses.go new file mode 100644 index 00000000..7d927bb1 --- /dev/null +++ b/api/client/v1/v1_edge_host_devices_uid_packs_status_patch_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1EdgeHostDevicesUIDPacksStatusPatchReader is a Reader for the V1EdgeHostDevicesUIDPacksStatusPatch structure. +type V1EdgeHostDevicesUIDPacksStatusPatchReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1EdgeHostDevicesUIDPacksStatusPatchReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1EdgeHostDevicesUIDPacksStatusPatchNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1EdgeHostDevicesUIDPacksStatusPatchNoContent creates a V1EdgeHostDevicesUIDPacksStatusPatchNoContent with default headers values +func NewV1EdgeHostDevicesUIDPacksStatusPatchNoContent() *V1EdgeHostDevicesUIDPacksStatusPatchNoContent { + return &V1EdgeHostDevicesUIDPacksStatusPatchNoContent{} +} + +/* +V1EdgeHostDevicesUIDPacksStatusPatchNoContent handles this case with default header values. + +The resource was updated successfully +*/ +type V1EdgeHostDevicesUIDPacksStatusPatchNoContent struct { +} + +func (o *V1EdgeHostDevicesUIDPacksStatusPatchNoContent) Error() string { + return fmt.Sprintf("[PATCH /v1/edgehosts/{uid}/packs/status][%d] v1EdgeHostDevicesUidPacksStatusPatchNoContent ", 204) +} + +func (o *V1EdgeHostDevicesUIDPacksStatusPatchNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_edge_host_devices_uid_profiles_get_parameters.go b/api/client/v1/v1_edge_host_devices_uid_profiles_get_parameters.go new file mode 100644 index 00000000..6322b205 --- /dev/null +++ b/api/client/v1/v1_edge_host_devices_uid_profiles_get_parameters.go @@ -0,0 +1,165 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1EdgeHostDevicesUIDProfilesGetParams creates a new V1EdgeHostDevicesUIDProfilesGetParams object +// with the default values initialized. +func NewV1EdgeHostDevicesUIDProfilesGetParams() *V1EdgeHostDevicesUIDProfilesGetParams { + var () + return &V1EdgeHostDevicesUIDProfilesGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1EdgeHostDevicesUIDProfilesGetParamsWithTimeout creates a new V1EdgeHostDevicesUIDProfilesGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1EdgeHostDevicesUIDProfilesGetParamsWithTimeout(timeout time.Duration) *V1EdgeHostDevicesUIDProfilesGetParams { + var () + return &V1EdgeHostDevicesUIDProfilesGetParams{ + + timeout: timeout, + } +} + +// NewV1EdgeHostDevicesUIDProfilesGetParamsWithContext creates a new V1EdgeHostDevicesUIDProfilesGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1EdgeHostDevicesUIDProfilesGetParamsWithContext(ctx context.Context) *V1EdgeHostDevicesUIDProfilesGetParams { + var () + return &V1EdgeHostDevicesUIDProfilesGetParams{ + + Context: ctx, + } +} + +// NewV1EdgeHostDevicesUIDProfilesGetParamsWithHTTPClient creates a new V1EdgeHostDevicesUIDProfilesGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1EdgeHostDevicesUIDProfilesGetParamsWithHTTPClient(client *http.Client) *V1EdgeHostDevicesUIDProfilesGetParams { + var () + return &V1EdgeHostDevicesUIDProfilesGetParams{ + HTTPClient: client, + } +} + +/* +V1EdgeHostDevicesUIDProfilesGetParams contains all the parameters to send to the API endpoint +for the v1 edge host devices Uid profiles get operation typically these are written to a http.Request +*/ +type V1EdgeHostDevicesUIDProfilesGetParams struct { + + /*IncludePackMeta + includes pack meta such as schema, presets + + */ + IncludePackMeta *string + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 edge host devices Uid profiles get params +func (o *V1EdgeHostDevicesUIDProfilesGetParams) WithTimeout(timeout time.Duration) *V1EdgeHostDevicesUIDProfilesGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 edge host devices Uid profiles get params +func (o *V1EdgeHostDevicesUIDProfilesGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 edge host devices Uid profiles get params +func (o *V1EdgeHostDevicesUIDProfilesGetParams) WithContext(ctx context.Context) *V1EdgeHostDevicesUIDProfilesGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 edge host devices Uid profiles get params +func (o *V1EdgeHostDevicesUIDProfilesGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 edge host devices Uid profiles get params +func (o *V1EdgeHostDevicesUIDProfilesGetParams) WithHTTPClient(client *http.Client) *V1EdgeHostDevicesUIDProfilesGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 edge host devices Uid profiles get params +func (o *V1EdgeHostDevicesUIDProfilesGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithIncludePackMeta adds the includePackMeta to the v1 edge host devices Uid profiles get params +func (o *V1EdgeHostDevicesUIDProfilesGetParams) WithIncludePackMeta(includePackMeta *string) *V1EdgeHostDevicesUIDProfilesGetParams { + o.SetIncludePackMeta(includePackMeta) + return o +} + +// SetIncludePackMeta adds the includePackMeta to the v1 edge host devices Uid profiles get params +func (o *V1EdgeHostDevicesUIDProfilesGetParams) SetIncludePackMeta(includePackMeta *string) { + o.IncludePackMeta = includePackMeta +} + +// WithUID adds the uid to the v1 edge host devices Uid profiles get params +func (o *V1EdgeHostDevicesUIDProfilesGetParams) WithUID(uid string) *V1EdgeHostDevicesUIDProfilesGetParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 edge host devices Uid profiles get params +func (o *V1EdgeHostDevicesUIDProfilesGetParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1EdgeHostDevicesUIDProfilesGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.IncludePackMeta != nil { + + // query param includePackMeta + var qrIncludePackMeta string + if o.IncludePackMeta != nil { + qrIncludePackMeta = *o.IncludePackMeta + } + qIncludePackMeta := qrIncludePackMeta + if qIncludePackMeta != "" { + if err := r.SetQueryParam("includePackMeta", qIncludePackMeta); err != nil { + return err + } + } + + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_edge_host_devices_uid_profiles_get_responses.go b/api/client/v1/v1_edge_host_devices_uid_profiles_get_responses.go new file mode 100644 index 00000000..096a1a65 --- /dev/null +++ b/api/client/v1/v1_edge_host_devices_uid_profiles_get_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1EdgeHostDevicesUIDProfilesGetReader is a Reader for the V1EdgeHostDevicesUIDProfilesGet structure. +type V1EdgeHostDevicesUIDProfilesGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1EdgeHostDevicesUIDProfilesGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1EdgeHostDevicesUIDProfilesGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1EdgeHostDevicesUIDProfilesGetOK creates a V1EdgeHostDevicesUIDProfilesGetOK with default headers values +func NewV1EdgeHostDevicesUIDProfilesGetOK() *V1EdgeHostDevicesUIDProfilesGetOK { + return &V1EdgeHostDevicesUIDProfilesGetOK{} +} + +/* +V1EdgeHostDevicesUIDProfilesGetOK handles this case with default header values. + +OK +*/ +type V1EdgeHostDevicesUIDProfilesGetOK struct { + Payload *models.V1SpectroClusterProfileList +} + +func (o *V1EdgeHostDevicesUIDProfilesGetOK) Error() string { + return fmt.Sprintf("[GET /v1/edgehosts/{uid}/profiles][%d] v1EdgeHostDevicesUidProfilesGetOK %+v", 200, o.Payload) +} + +func (o *V1EdgeHostDevicesUIDProfilesGetOK) GetPayload() *models.V1SpectroClusterProfileList { + return o.Payload +} + +func (o *V1EdgeHostDevicesUIDProfilesGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1SpectroClusterProfileList) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_edge_host_devices_uid_profiles_update_parameters.go b/api/client/v1/v1_edge_host_devices_uid_profiles_update_parameters.go new file mode 100644 index 00000000..d043790d --- /dev/null +++ b/api/client/v1/v1_edge_host_devices_uid_profiles_update_parameters.go @@ -0,0 +1,154 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1EdgeHostDevicesUIDProfilesUpdateParams creates a new V1EdgeHostDevicesUIDProfilesUpdateParams object +// with the default values initialized. +func NewV1EdgeHostDevicesUIDProfilesUpdateParams() *V1EdgeHostDevicesUIDProfilesUpdateParams { + var () + return &V1EdgeHostDevicesUIDProfilesUpdateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1EdgeHostDevicesUIDProfilesUpdateParamsWithTimeout creates a new V1EdgeHostDevicesUIDProfilesUpdateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1EdgeHostDevicesUIDProfilesUpdateParamsWithTimeout(timeout time.Duration) *V1EdgeHostDevicesUIDProfilesUpdateParams { + var () + return &V1EdgeHostDevicesUIDProfilesUpdateParams{ + + timeout: timeout, + } +} + +// NewV1EdgeHostDevicesUIDProfilesUpdateParamsWithContext creates a new V1EdgeHostDevicesUIDProfilesUpdateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1EdgeHostDevicesUIDProfilesUpdateParamsWithContext(ctx context.Context) *V1EdgeHostDevicesUIDProfilesUpdateParams { + var () + return &V1EdgeHostDevicesUIDProfilesUpdateParams{ + + Context: ctx, + } +} + +// NewV1EdgeHostDevicesUIDProfilesUpdateParamsWithHTTPClient creates a new V1EdgeHostDevicesUIDProfilesUpdateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1EdgeHostDevicesUIDProfilesUpdateParamsWithHTTPClient(client *http.Client) *V1EdgeHostDevicesUIDProfilesUpdateParams { + var () + return &V1EdgeHostDevicesUIDProfilesUpdateParams{ + HTTPClient: client, + } +} + +/* +V1EdgeHostDevicesUIDProfilesUpdateParams contains all the parameters to send to the API endpoint +for the v1 edge host devices Uid profiles update operation typically these are written to a http.Request +*/ +type V1EdgeHostDevicesUIDProfilesUpdateParams struct { + + /*Body*/ + Body *models.V1SpectroClusterProfiles + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 edge host devices Uid profiles update params +func (o *V1EdgeHostDevicesUIDProfilesUpdateParams) WithTimeout(timeout time.Duration) *V1EdgeHostDevicesUIDProfilesUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 edge host devices Uid profiles update params +func (o *V1EdgeHostDevicesUIDProfilesUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 edge host devices Uid profiles update params +func (o *V1EdgeHostDevicesUIDProfilesUpdateParams) WithContext(ctx context.Context) *V1EdgeHostDevicesUIDProfilesUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 edge host devices Uid profiles update params +func (o *V1EdgeHostDevicesUIDProfilesUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 edge host devices Uid profiles update params +func (o *V1EdgeHostDevicesUIDProfilesUpdateParams) WithHTTPClient(client *http.Client) *V1EdgeHostDevicesUIDProfilesUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 edge host devices Uid profiles update params +func (o *V1EdgeHostDevicesUIDProfilesUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 edge host devices Uid profiles update params +func (o *V1EdgeHostDevicesUIDProfilesUpdateParams) WithBody(body *models.V1SpectroClusterProfiles) *V1EdgeHostDevicesUIDProfilesUpdateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 edge host devices Uid profiles update params +func (o *V1EdgeHostDevicesUIDProfilesUpdateParams) SetBody(body *models.V1SpectroClusterProfiles) { + o.Body = body +} + +// WithUID adds the uid to the v1 edge host devices Uid profiles update params +func (o *V1EdgeHostDevicesUIDProfilesUpdateParams) WithUID(uid string) *V1EdgeHostDevicesUIDProfilesUpdateParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 edge host devices Uid profiles update params +func (o *V1EdgeHostDevicesUIDProfilesUpdateParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1EdgeHostDevicesUIDProfilesUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_edge_host_devices_uid_profiles_update_responses.go b/api/client/v1/v1_edge_host_devices_uid_profiles_update_responses.go new file mode 100644 index 00000000..44d1b26c --- /dev/null +++ b/api/client/v1/v1_edge_host_devices_uid_profiles_update_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1EdgeHostDevicesUIDProfilesUpdateReader is a Reader for the V1EdgeHostDevicesUIDProfilesUpdate structure. +type V1EdgeHostDevicesUIDProfilesUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1EdgeHostDevicesUIDProfilesUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1EdgeHostDevicesUIDProfilesUpdateNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1EdgeHostDevicesUIDProfilesUpdateNoContent creates a V1EdgeHostDevicesUIDProfilesUpdateNoContent with default headers values +func NewV1EdgeHostDevicesUIDProfilesUpdateNoContent() *V1EdgeHostDevicesUIDProfilesUpdateNoContent { + return &V1EdgeHostDevicesUIDProfilesUpdateNoContent{} +} + +/* +V1EdgeHostDevicesUIDProfilesUpdateNoContent handles this case with default header values. + +The resource was updated successfully +*/ +type V1EdgeHostDevicesUIDProfilesUpdateNoContent struct { +} + +func (o *V1EdgeHostDevicesUIDProfilesUpdateNoContent) Error() string { + return fmt.Sprintf("[PUT /v1/edgehosts/{uid}/profiles][%d] v1EdgeHostDevicesUidProfilesUpdateNoContent ", 204) +} + +func (o *V1EdgeHostDevicesUIDProfilesUpdateNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_edge_host_devices_uid_spc_download_parameters.go b/api/client/v1/v1_edge_host_devices_uid_spc_download_parameters.go new file mode 100644 index 00000000..b197e0f7 --- /dev/null +++ b/api/client/v1/v1_edge_host_devices_uid_spc_download_parameters.go @@ -0,0 +1,133 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1EdgeHostDevicesUIDSpcDownloadParams creates a new V1EdgeHostDevicesUIDSpcDownloadParams object +// with the default values initialized. +func NewV1EdgeHostDevicesUIDSpcDownloadParams() *V1EdgeHostDevicesUIDSpcDownloadParams { + var () + return &V1EdgeHostDevicesUIDSpcDownloadParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1EdgeHostDevicesUIDSpcDownloadParamsWithTimeout creates a new V1EdgeHostDevicesUIDSpcDownloadParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1EdgeHostDevicesUIDSpcDownloadParamsWithTimeout(timeout time.Duration) *V1EdgeHostDevicesUIDSpcDownloadParams { + var () + return &V1EdgeHostDevicesUIDSpcDownloadParams{ + + timeout: timeout, + } +} + +// NewV1EdgeHostDevicesUIDSpcDownloadParamsWithContext creates a new V1EdgeHostDevicesUIDSpcDownloadParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1EdgeHostDevicesUIDSpcDownloadParamsWithContext(ctx context.Context) *V1EdgeHostDevicesUIDSpcDownloadParams { + var () + return &V1EdgeHostDevicesUIDSpcDownloadParams{ + + Context: ctx, + } +} + +// NewV1EdgeHostDevicesUIDSpcDownloadParamsWithHTTPClient creates a new V1EdgeHostDevicesUIDSpcDownloadParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1EdgeHostDevicesUIDSpcDownloadParamsWithHTTPClient(client *http.Client) *V1EdgeHostDevicesUIDSpcDownloadParams { + var () + return &V1EdgeHostDevicesUIDSpcDownloadParams{ + HTTPClient: client, + } +} + +/* +V1EdgeHostDevicesUIDSpcDownloadParams contains all the parameters to send to the API endpoint +for the v1 edge host devices Uid spc download operation typically these are written to a http.Request +*/ +type V1EdgeHostDevicesUIDSpcDownloadParams struct { + + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 edge host devices Uid spc download params +func (o *V1EdgeHostDevicesUIDSpcDownloadParams) WithTimeout(timeout time.Duration) *V1EdgeHostDevicesUIDSpcDownloadParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 edge host devices Uid spc download params +func (o *V1EdgeHostDevicesUIDSpcDownloadParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 edge host devices Uid spc download params +func (o *V1EdgeHostDevicesUIDSpcDownloadParams) WithContext(ctx context.Context) *V1EdgeHostDevicesUIDSpcDownloadParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 edge host devices Uid spc download params +func (o *V1EdgeHostDevicesUIDSpcDownloadParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 edge host devices Uid spc download params +func (o *V1EdgeHostDevicesUIDSpcDownloadParams) WithHTTPClient(client *http.Client) *V1EdgeHostDevicesUIDSpcDownloadParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 edge host devices Uid spc download params +func (o *V1EdgeHostDevicesUIDSpcDownloadParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithUID adds the uid to the v1 edge host devices Uid spc download params +func (o *V1EdgeHostDevicesUIDSpcDownloadParams) WithUID(uid string) *V1EdgeHostDevicesUIDSpcDownloadParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 edge host devices Uid spc download params +func (o *V1EdgeHostDevicesUIDSpcDownloadParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1EdgeHostDevicesUIDSpcDownloadParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_edge_host_devices_uid_spc_download_responses.go b/api/client/v1/v1_edge_host_devices_uid_spc_download_responses.go new file mode 100644 index 00000000..513a9bb7 --- /dev/null +++ b/api/client/v1/v1_edge_host_devices_uid_spc_download_responses.go @@ -0,0 +1,74 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1EdgeHostDevicesUIDSpcDownloadReader is a Reader for the V1EdgeHostDevicesUIDSpcDownload structure. +type V1EdgeHostDevicesUIDSpcDownloadReader struct { + formats strfmt.Registry + writer io.Writer +} + +// ReadResponse reads a server response into the received o. +func (o *V1EdgeHostDevicesUIDSpcDownloadReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1EdgeHostDevicesUIDSpcDownloadOK(o.writer) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1EdgeHostDevicesUIDSpcDownloadOK creates a V1EdgeHostDevicesUIDSpcDownloadOK with default headers values +func NewV1EdgeHostDevicesUIDSpcDownloadOK(writer io.Writer) *V1EdgeHostDevicesUIDSpcDownloadOK { + return &V1EdgeHostDevicesUIDSpcDownloadOK{ + Payload: writer, + } +} + +/* +V1EdgeHostDevicesUIDSpcDownloadOK handles this case with default header values. + +download spc archive file +*/ +type V1EdgeHostDevicesUIDSpcDownloadOK struct { + ContentDisposition string + + Payload io.Writer +} + +func (o *V1EdgeHostDevicesUIDSpcDownloadOK) Error() string { + return fmt.Sprintf("[GET /v1/edgehosts/{uid}/spc/download][%d] v1EdgeHostDevicesUidSpcDownloadOK %+v", 200, o.Payload) +} + +func (o *V1EdgeHostDevicesUIDSpcDownloadOK) GetPayload() io.Writer { + return o.Payload +} + +func (o *V1EdgeHostDevicesUIDSpcDownloadOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Content-Disposition + o.ContentDisposition = response.GetHeader("Content-Disposition") + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_edge_host_devices_uid_update_parameters.go b/api/client/v1/v1_edge_host_devices_uid_update_parameters.go new file mode 100644 index 00000000..38a9870b --- /dev/null +++ b/api/client/v1/v1_edge_host_devices_uid_update_parameters.go @@ -0,0 +1,154 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1EdgeHostDevicesUIDUpdateParams creates a new V1EdgeHostDevicesUIDUpdateParams object +// with the default values initialized. +func NewV1EdgeHostDevicesUIDUpdateParams() *V1EdgeHostDevicesUIDUpdateParams { + var () + return &V1EdgeHostDevicesUIDUpdateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1EdgeHostDevicesUIDUpdateParamsWithTimeout creates a new V1EdgeHostDevicesUIDUpdateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1EdgeHostDevicesUIDUpdateParamsWithTimeout(timeout time.Duration) *V1EdgeHostDevicesUIDUpdateParams { + var () + return &V1EdgeHostDevicesUIDUpdateParams{ + + timeout: timeout, + } +} + +// NewV1EdgeHostDevicesUIDUpdateParamsWithContext creates a new V1EdgeHostDevicesUIDUpdateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1EdgeHostDevicesUIDUpdateParamsWithContext(ctx context.Context) *V1EdgeHostDevicesUIDUpdateParams { + var () + return &V1EdgeHostDevicesUIDUpdateParams{ + + Context: ctx, + } +} + +// NewV1EdgeHostDevicesUIDUpdateParamsWithHTTPClient creates a new V1EdgeHostDevicesUIDUpdateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1EdgeHostDevicesUIDUpdateParamsWithHTTPClient(client *http.Client) *V1EdgeHostDevicesUIDUpdateParams { + var () + return &V1EdgeHostDevicesUIDUpdateParams{ + HTTPClient: client, + } +} + +/* +V1EdgeHostDevicesUIDUpdateParams contains all the parameters to send to the API endpoint +for the v1 edge host devices Uid update operation typically these are written to a http.Request +*/ +type V1EdgeHostDevicesUIDUpdateParams struct { + + /*Body*/ + Body *models.V1EdgeHostDevice + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 edge host devices Uid update params +func (o *V1EdgeHostDevicesUIDUpdateParams) WithTimeout(timeout time.Duration) *V1EdgeHostDevicesUIDUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 edge host devices Uid update params +func (o *V1EdgeHostDevicesUIDUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 edge host devices Uid update params +func (o *V1EdgeHostDevicesUIDUpdateParams) WithContext(ctx context.Context) *V1EdgeHostDevicesUIDUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 edge host devices Uid update params +func (o *V1EdgeHostDevicesUIDUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 edge host devices Uid update params +func (o *V1EdgeHostDevicesUIDUpdateParams) WithHTTPClient(client *http.Client) *V1EdgeHostDevicesUIDUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 edge host devices Uid update params +func (o *V1EdgeHostDevicesUIDUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 edge host devices Uid update params +func (o *V1EdgeHostDevicesUIDUpdateParams) WithBody(body *models.V1EdgeHostDevice) *V1EdgeHostDevicesUIDUpdateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 edge host devices Uid update params +func (o *V1EdgeHostDevicesUIDUpdateParams) SetBody(body *models.V1EdgeHostDevice) { + o.Body = body +} + +// WithUID adds the uid to the v1 edge host devices Uid update params +func (o *V1EdgeHostDevicesUIDUpdateParams) WithUID(uid string) *V1EdgeHostDevicesUIDUpdateParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 edge host devices Uid update params +func (o *V1EdgeHostDevicesUIDUpdateParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1EdgeHostDevicesUIDUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_edge_host_devices_uid_update_responses.go b/api/client/v1/v1_edge_host_devices_uid_update_responses.go new file mode 100644 index 00000000..da0f0cad --- /dev/null +++ b/api/client/v1/v1_edge_host_devices_uid_update_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1EdgeHostDevicesUIDUpdateReader is a Reader for the V1EdgeHostDevicesUIDUpdate structure. +type V1EdgeHostDevicesUIDUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1EdgeHostDevicesUIDUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1EdgeHostDevicesUIDUpdateNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1EdgeHostDevicesUIDUpdateNoContent creates a V1EdgeHostDevicesUIDUpdateNoContent with default headers values +func NewV1EdgeHostDevicesUIDUpdateNoContent() *V1EdgeHostDevicesUIDUpdateNoContent { + return &V1EdgeHostDevicesUIDUpdateNoContent{} +} + +/* +V1EdgeHostDevicesUIDUpdateNoContent handles this case with default header values. + +The resource was updated successfully +*/ +type V1EdgeHostDevicesUIDUpdateNoContent struct { +} + +func (o *V1EdgeHostDevicesUIDUpdateNoContent) Error() string { + return fmt.Sprintf("[PUT /v1/edgehosts/{uid}][%d] v1EdgeHostDevicesUidUpdateNoContent ", 204) +} + +func (o *V1EdgeHostDevicesUIDUpdateNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_edge_host_devices_uid_vsphere_properties_update_parameters.go b/api/client/v1/v1_edge_host_devices_uid_vsphere_properties_update_parameters.go new file mode 100644 index 00000000..02c5c701 --- /dev/null +++ b/api/client/v1/v1_edge_host_devices_uid_vsphere_properties_update_parameters.go @@ -0,0 +1,154 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1EdgeHostDevicesUIDVspherePropertiesUpdateParams creates a new V1EdgeHostDevicesUIDVspherePropertiesUpdateParams object +// with the default values initialized. +func NewV1EdgeHostDevicesUIDVspherePropertiesUpdateParams() *V1EdgeHostDevicesUIDVspherePropertiesUpdateParams { + var () + return &V1EdgeHostDevicesUIDVspherePropertiesUpdateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1EdgeHostDevicesUIDVspherePropertiesUpdateParamsWithTimeout creates a new V1EdgeHostDevicesUIDVspherePropertiesUpdateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1EdgeHostDevicesUIDVspherePropertiesUpdateParamsWithTimeout(timeout time.Duration) *V1EdgeHostDevicesUIDVspherePropertiesUpdateParams { + var () + return &V1EdgeHostDevicesUIDVspherePropertiesUpdateParams{ + + timeout: timeout, + } +} + +// NewV1EdgeHostDevicesUIDVspherePropertiesUpdateParamsWithContext creates a new V1EdgeHostDevicesUIDVspherePropertiesUpdateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1EdgeHostDevicesUIDVspherePropertiesUpdateParamsWithContext(ctx context.Context) *V1EdgeHostDevicesUIDVspherePropertiesUpdateParams { + var () + return &V1EdgeHostDevicesUIDVspherePropertiesUpdateParams{ + + Context: ctx, + } +} + +// NewV1EdgeHostDevicesUIDVspherePropertiesUpdateParamsWithHTTPClient creates a new V1EdgeHostDevicesUIDVspherePropertiesUpdateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1EdgeHostDevicesUIDVspherePropertiesUpdateParamsWithHTTPClient(client *http.Client) *V1EdgeHostDevicesUIDVspherePropertiesUpdateParams { + var () + return &V1EdgeHostDevicesUIDVspherePropertiesUpdateParams{ + HTTPClient: client, + } +} + +/* +V1EdgeHostDevicesUIDVspherePropertiesUpdateParams contains all the parameters to send to the API endpoint +for the v1 edge host devices Uid vsphere properties update operation typically these are written to a http.Request +*/ +type V1EdgeHostDevicesUIDVspherePropertiesUpdateParams struct { + + /*Body*/ + Body *models.V1EdgeHostVsphereCloudProperties + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 edge host devices Uid vsphere properties update params +func (o *V1EdgeHostDevicesUIDVspherePropertiesUpdateParams) WithTimeout(timeout time.Duration) *V1EdgeHostDevicesUIDVspherePropertiesUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 edge host devices Uid vsphere properties update params +func (o *V1EdgeHostDevicesUIDVspherePropertiesUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 edge host devices Uid vsphere properties update params +func (o *V1EdgeHostDevicesUIDVspherePropertiesUpdateParams) WithContext(ctx context.Context) *V1EdgeHostDevicesUIDVspherePropertiesUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 edge host devices Uid vsphere properties update params +func (o *V1EdgeHostDevicesUIDVspherePropertiesUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 edge host devices Uid vsphere properties update params +func (o *V1EdgeHostDevicesUIDVspherePropertiesUpdateParams) WithHTTPClient(client *http.Client) *V1EdgeHostDevicesUIDVspherePropertiesUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 edge host devices Uid vsphere properties update params +func (o *V1EdgeHostDevicesUIDVspherePropertiesUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 edge host devices Uid vsphere properties update params +func (o *V1EdgeHostDevicesUIDVspherePropertiesUpdateParams) WithBody(body *models.V1EdgeHostVsphereCloudProperties) *V1EdgeHostDevicesUIDVspherePropertiesUpdateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 edge host devices Uid vsphere properties update params +func (o *V1EdgeHostDevicesUIDVspherePropertiesUpdateParams) SetBody(body *models.V1EdgeHostVsphereCloudProperties) { + o.Body = body +} + +// WithUID adds the uid to the v1 edge host devices Uid vsphere properties update params +func (o *V1EdgeHostDevicesUIDVspherePropertiesUpdateParams) WithUID(uid string) *V1EdgeHostDevicesUIDVspherePropertiesUpdateParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 edge host devices Uid vsphere properties update params +func (o *V1EdgeHostDevicesUIDVspherePropertiesUpdateParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1EdgeHostDevicesUIDVspherePropertiesUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_edge_host_devices_uid_vsphere_properties_update_responses.go b/api/client/v1/v1_edge_host_devices_uid_vsphere_properties_update_responses.go new file mode 100644 index 00000000..63eddf64 --- /dev/null +++ b/api/client/v1/v1_edge_host_devices_uid_vsphere_properties_update_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1EdgeHostDevicesUIDVspherePropertiesUpdateReader is a Reader for the V1EdgeHostDevicesUIDVspherePropertiesUpdate structure. +type V1EdgeHostDevicesUIDVspherePropertiesUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1EdgeHostDevicesUIDVspherePropertiesUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1EdgeHostDevicesUIDVspherePropertiesUpdateNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1EdgeHostDevicesUIDVspherePropertiesUpdateNoContent creates a V1EdgeHostDevicesUIDVspherePropertiesUpdateNoContent with default headers values +func NewV1EdgeHostDevicesUIDVspherePropertiesUpdateNoContent() *V1EdgeHostDevicesUIDVspherePropertiesUpdateNoContent { + return &V1EdgeHostDevicesUIDVspherePropertiesUpdateNoContent{} +} + +/* +V1EdgeHostDevicesUIDVspherePropertiesUpdateNoContent handles this case with default header values. + +The resource was updated successfully +*/ +type V1EdgeHostDevicesUIDVspherePropertiesUpdateNoContent struct { +} + +func (o *V1EdgeHostDevicesUIDVspherePropertiesUpdateNoContent) Error() string { + return fmt.Sprintf("[PUT /v1/edgehosts/{uid}/vsphere/properties][%d] v1EdgeHostDevicesUidVspherePropertiesUpdateNoContent ", 204) +} + +func (o *V1EdgeHostDevicesUIDVspherePropertiesUpdateNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_edge_hosts_metadata_parameters.go b/api/client/v1/v1_edge_hosts_metadata_parameters.go new file mode 100644 index 00000000..204b090a --- /dev/null +++ b/api/client/v1/v1_edge_hosts_metadata_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1EdgeHostsMetadataParams creates a new V1EdgeHostsMetadataParams object +// with the default values initialized. +func NewV1EdgeHostsMetadataParams() *V1EdgeHostsMetadataParams { + var () + return &V1EdgeHostsMetadataParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1EdgeHostsMetadataParamsWithTimeout creates a new V1EdgeHostsMetadataParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1EdgeHostsMetadataParamsWithTimeout(timeout time.Duration) *V1EdgeHostsMetadataParams { + var () + return &V1EdgeHostsMetadataParams{ + + timeout: timeout, + } +} + +// NewV1EdgeHostsMetadataParamsWithContext creates a new V1EdgeHostsMetadataParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1EdgeHostsMetadataParamsWithContext(ctx context.Context) *V1EdgeHostsMetadataParams { + var () + return &V1EdgeHostsMetadataParams{ + + Context: ctx, + } +} + +// NewV1EdgeHostsMetadataParamsWithHTTPClient creates a new V1EdgeHostsMetadataParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1EdgeHostsMetadataParamsWithHTTPClient(client *http.Client) *V1EdgeHostsMetadataParams { + var () + return &V1EdgeHostsMetadataParams{ + HTTPClient: client, + } +} + +/* +V1EdgeHostsMetadataParams contains all the parameters to send to the API endpoint +for the v1 edge hosts metadata operation typically these are written to a http.Request +*/ +type V1EdgeHostsMetadataParams struct { + + /*Body*/ + Body *models.V1EdgeHostsMetadataFilter + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 edge hosts metadata params +func (o *V1EdgeHostsMetadataParams) WithTimeout(timeout time.Duration) *V1EdgeHostsMetadataParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 edge hosts metadata params +func (o *V1EdgeHostsMetadataParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 edge hosts metadata params +func (o *V1EdgeHostsMetadataParams) WithContext(ctx context.Context) *V1EdgeHostsMetadataParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 edge hosts metadata params +func (o *V1EdgeHostsMetadataParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 edge hosts metadata params +func (o *V1EdgeHostsMetadataParams) WithHTTPClient(client *http.Client) *V1EdgeHostsMetadataParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 edge hosts metadata params +func (o *V1EdgeHostsMetadataParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 edge hosts metadata params +func (o *V1EdgeHostsMetadataParams) WithBody(body *models.V1EdgeHostsMetadataFilter) *V1EdgeHostsMetadataParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 edge hosts metadata params +func (o *V1EdgeHostsMetadataParams) SetBody(body *models.V1EdgeHostsMetadataFilter) { + o.Body = body +} + +// WriteToRequest writes these params to a swagger request +func (o *V1EdgeHostsMetadataParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_edge_hosts_metadata_quick_filter_get_parameters.go b/api/client/v1/v1_edge_hosts_metadata_quick_filter_get_parameters.go new file mode 100644 index 00000000..3aa43d7d --- /dev/null +++ b/api/client/v1/v1_edge_hosts_metadata_quick_filter_get_parameters.go @@ -0,0 +1,173 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1EdgeHostsMetadataQuickFilterGetParams creates a new V1EdgeHostsMetadataQuickFilterGetParams object +// with the default values initialized. +func NewV1EdgeHostsMetadataQuickFilterGetParams() *V1EdgeHostsMetadataQuickFilterGetParams { + var () + return &V1EdgeHostsMetadataQuickFilterGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1EdgeHostsMetadataQuickFilterGetParamsWithTimeout creates a new V1EdgeHostsMetadataQuickFilterGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1EdgeHostsMetadataQuickFilterGetParamsWithTimeout(timeout time.Duration) *V1EdgeHostsMetadataQuickFilterGetParams { + var () + return &V1EdgeHostsMetadataQuickFilterGetParams{ + + timeout: timeout, + } +} + +// NewV1EdgeHostsMetadataQuickFilterGetParamsWithContext creates a new V1EdgeHostsMetadataQuickFilterGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1EdgeHostsMetadataQuickFilterGetParamsWithContext(ctx context.Context) *V1EdgeHostsMetadataQuickFilterGetParams { + var () + return &V1EdgeHostsMetadataQuickFilterGetParams{ + + Context: ctx, + } +} + +// NewV1EdgeHostsMetadataQuickFilterGetParamsWithHTTPClient creates a new V1EdgeHostsMetadataQuickFilterGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1EdgeHostsMetadataQuickFilterGetParamsWithHTTPClient(client *http.Client) *V1EdgeHostsMetadataQuickFilterGetParams { + var () + return &V1EdgeHostsMetadataQuickFilterGetParams{ + HTTPClient: client, + } +} + +/* +V1EdgeHostsMetadataQuickFilterGetParams contains all the parameters to send to the API endpoint +for the v1 edge hosts metadata quick filter get operation typically these are written to a http.Request +*/ +type V1EdgeHostsMetadataQuickFilterGetParams struct { + + /*QuickFilter*/ + QuickFilter *string + /*Type*/ + Type *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 edge hosts metadata quick filter get params +func (o *V1EdgeHostsMetadataQuickFilterGetParams) WithTimeout(timeout time.Duration) *V1EdgeHostsMetadataQuickFilterGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 edge hosts metadata quick filter get params +func (o *V1EdgeHostsMetadataQuickFilterGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 edge hosts metadata quick filter get params +func (o *V1EdgeHostsMetadataQuickFilterGetParams) WithContext(ctx context.Context) *V1EdgeHostsMetadataQuickFilterGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 edge hosts metadata quick filter get params +func (o *V1EdgeHostsMetadataQuickFilterGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 edge hosts metadata quick filter get params +func (o *V1EdgeHostsMetadataQuickFilterGetParams) WithHTTPClient(client *http.Client) *V1EdgeHostsMetadataQuickFilterGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 edge hosts metadata quick filter get params +func (o *V1EdgeHostsMetadataQuickFilterGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithQuickFilter adds the quickFilter to the v1 edge hosts metadata quick filter get params +func (o *V1EdgeHostsMetadataQuickFilterGetParams) WithQuickFilter(quickFilter *string) *V1EdgeHostsMetadataQuickFilterGetParams { + o.SetQuickFilter(quickFilter) + return o +} + +// SetQuickFilter adds the quickFilter to the v1 edge hosts metadata quick filter get params +func (o *V1EdgeHostsMetadataQuickFilterGetParams) SetQuickFilter(quickFilter *string) { + o.QuickFilter = quickFilter +} + +// WithType adds the typeVar to the v1 edge hosts metadata quick filter get params +func (o *V1EdgeHostsMetadataQuickFilterGetParams) WithType(typeVar *string) *V1EdgeHostsMetadataQuickFilterGetParams { + o.SetType(typeVar) + return o +} + +// SetType adds the type to the v1 edge hosts metadata quick filter get params +func (o *V1EdgeHostsMetadataQuickFilterGetParams) SetType(typeVar *string) { + o.Type = typeVar +} + +// WriteToRequest writes these params to a swagger request +func (o *V1EdgeHostsMetadataQuickFilterGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.QuickFilter != nil { + + // query param quickFilter + var qrQuickFilter string + if o.QuickFilter != nil { + qrQuickFilter = *o.QuickFilter + } + qQuickFilter := qrQuickFilter + if qQuickFilter != "" { + if err := r.SetQueryParam("quickFilter", qQuickFilter); err != nil { + return err + } + } + + } + + if o.Type != nil { + + // query param type + var qrType string + if o.Type != nil { + qrType = *o.Type + } + qType := qrType + if qType != "" { + if err := r.SetQueryParam("type", qType); err != nil { + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_edge_hosts_metadata_quick_filter_get_responses.go b/api/client/v1/v1_edge_hosts_metadata_quick_filter_get_responses.go new file mode 100644 index 00000000..27a7eef0 --- /dev/null +++ b/api/client/v1/v1_edge_hosts_metadata_quick_filter_get_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1EdgeHostsMetadataQuickFilterGetReader is a Reader for the V1EdgeHostsMetadataQuickFilterGet structure. +type V1EdgeHostsMetadataQuickFilterGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1EdgeHostsMetadataQuickFilterGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1EdgeHostsMetadataQuickFilterGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1EdgeHostsMetadataQuickFilterGetOK creates a V1EdgeHostsMetadataQuickFilterGetOK with default headers values +func NewV1EdgeHostsMetadataQuickFilterGetOK() *V1EdgeHostsMetadataQuickFilterGetOK { + return &V1EdgeHostsMetadataQuickFilterGetOK{} +} + +/* +V1EdgeHostsMetadataQuickFilterGetOK handles this case with default header values. + +An array of edge host metadata +*/ +type V1EdgeHostsMetadataQuickFilterGetOK struct { + Payload *models.V1EdgeHostsMeta +} + +func (o *V1EdgeHostsMetadataQuickFilterGetOK) Error() string { + return fmt.Sprintf("[GET /v1/edgehosts/metadata][%d] v1EdgeHostsMetadataQuickFilterGetOK %+v", 200, o.Payload) +} + +func (o *V1EdgeHostsMetadataQuickFilterGetOK) GetPayload() *models.V1EdgeHostsMeta { + return o.Payload +} + +func (o *V1EdgeHostsMetadataQuickFilterGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1EdgeHostsMeta) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_edge_hosts_metadata_responses.go b/api/client/v1/v1_edge_hosts_metadata_responses.go new file mode 100644 index 00000000..12c391a1 --- /dev/null +++ b/api/client/v1/v1_edge_hosts_metadata_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1EdgeHostsMetadataReader is a Reader for the V1EdgeHostsMetadata structure. +type V1EdgeHostsMetadataReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1EdgeHostsMetadataReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1EdgeHostsMetadataOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1EdgeHostsMetadataOK creates a V1EdgeHostsMetadataOK with default headers values +func NewV1EdgeHostsMetadataOK() *V1EdgeHostsMetadataOK { + return &V1EdgeHostsMetadataOK{} +} + +/* +V1EdgeHostsMetadataOK handles this case with default header values. + +An array of edgehost summary items +*/ +type V1EdgeHostsMetadataOK struct { + Payload *models.V1EdgeHostsMetadataSummary +} + +func (o *V1EdgeHostsMetadataOK) Error() string { + return fmt.Sprintf("[POST /v1/dashboard/appliances/metadata][%d] v1EdgeHostsMetadataOK %+v", 200, o.Payload) +} + +func (o *V1EdgeHostsMetadataOK) GetPayload() *models.V1EdgeHostsMetadataSummary { + return o.Payload +} + +func (o *V1EdgeHostsMetadataOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1EdgeHostsMetadataSummary) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_edge_hosts_tags_get_parameters.go b/api/client/v1/v1_edge_hosts_tags_get_parameters.go new file mode 100644 index 00000000..ed234095 --- /dev/null +++ b/api/client/v1/v1_edge_hosts_tags_get_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1EdgeHostsTagsGetParams creates a new V1EdgeHostsTagsGetParams object +// with the default values initialized. +func NewV1EdgeHostsTagsGetParams() *V1EdgeHostsTagsGetParams { + + return &V1EdgeHostsTagsGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1EdgeHostsTagsGetParamsWithTimeout creates a new V1EdgeHostsTagsGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1EdgeHostsTagsGetParamsWithTimeout(timeout time.Duration) *V1EdgeHostsTagsGetParams { + + return &V1EdgeHostsTagsGetParams{ + + timeout: timeout, + } +} + +// NewV1EdgeHostsTagsGetParamsWithContext creates a new V1EdgeHostsTagsGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1EdgeHostsTagsGetParamsWithContext(ctx context.Context) *V1EdgeHostsTagsGetParams { + + return &V1EdgeHostsTagsGetParams{ + + Context: ctx, + } +} + +// NewV1EdgeHostsTagsGetParamsWithHTTPClient creates a new V1EdgeHostsTagsGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1EdgeHostsTagsGetParamsWithHTTPClient(client *http.Client) *V1EdgeHostsTagsGetParams { + + return &V1EdgeHostsTagsGetParams{ + HTTPClient: client, + } +} + +/* +V1EdgeHostsTagsGetParams contains all the parameters to send to the API endpoint +for the v1 edge hosts tags get operation typically these are written to a http.Request +*/ +type V1EdgeHostsTagsGetParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 edge hosts tags get params +func (o *V1EdgeHostsTagsGetParams) WithTimeout(timeout time.Duration) *V1EdgeHostsTagsGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 edge hosts tags get params +func (o *V1EdgeHostsTagsGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 edge hosts tags get params +func (o *V1EdgeHostsTagsGetParams) WithContext(ctx context.Context) *V1EdgeHostsTagsGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 edge hosts tags get params +func (o *V1EdgeHostsTagsGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 edge hosts tags get params +func (o *V1EdgeHostsTagsGetParams) WithHTTPClient(client *http.Client) *V1EdgeHostsTagsGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 edge hosts tags get params +func (o *V1EdgeHostsTagsGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *V1EdgeHostsTagsGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_edge_hosts_tags_get_responses.go b/api/client/v1/v1_edge_hosts_tags_get_responses.go new file mode 100644 index 00000000..36de2092 --- /dev/null +++ b/api/client/v1/v1_edge_hosts_tags_get_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1EdgeHostsTagsGetReader is a Reader for the V1EdgeHostsTagsGet structure. +type V1EdgeHostsTagsGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1EdgeHostsTagsGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1EdgeHostsTagsGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1EdgeHostsTagsGetOK creates a V1EdgeHostsTagsGetOK with default headers values +func NewV1EdgeHostsTagsGetOK() *V1EdgeHostsTagsGetOK { + return &V1EdgeHostsTagsGetOK{} +} + +/* +V1EdgeHostsTagsGetOK handles this case with default header values. + +An array of edge hosts tags +*/ +type V1EdgeHostsTagsGetOK struct { + Payload *models.V1EdgeHostsTags +} + +func (o *V1EdgeHostsTagsGetOK) Error() string { + return fmt.Sprintf("[GET /v1/edgehosts/tags][%d] v1EdgeHostsTagsGetOK %+v", 200, o.Payload) +} + +func (o *V1EdgeHostsTagsGetOK) GetPayload() *models.V1EdgeHostsTags { + return o.Payload +} + +func (o *V1EdgeHostsTagsGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1EdgeHostsTags) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_edge_hosts_uid_reset_parameters.go b/api/client/v1/v1_edge_hosts_uid_reset_parameters.go new file mode 100644 index 00000000..732c8bd9 --- /dev/null +++ b/api/client/v1/v1_edge_hosts_uid_reset_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1EdgeHostsUIDResetParams creates a new V1EdgeHostsUIDResetParams object +// with the default values initialized. +func NewV1EdgeHostsUIDResetParams() *V1EdgeHostsUIDResetParams { + var () + return &V1EdgeHostsUIDResetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1EdgeHostsUIDResetParamsWithTimeout creates a new V1EdgeHostsUIDResetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1EdgeHostsUIDResetParamsWithTimeout(timeout time.Duration) *V1EdgeHostsUIDResetParams { + var () + return &V1EdgeHostsUIDResetParams{ + + timeout: timeout, + } +} + +// NewV1EdgeHostsUIDResetParamsWithContext creates a new V1EdgeHostsUIDResetParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1EdgeHostsUIDResetParamsWithContext(ctx context.Context) *V1EdgeHostsUIDResetParams { + var () + return &V1EdgeHostsUIDResetParams{ + + Context: ctx, + } +} + +// NewV1EdgeHostsUIDResetParamsWithHTTPClient creates a new V1EdgeHostsUIDResetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1EdgeHostsUIDResetParamsWithHTTPClient(client *http.Client) *V1EdgeHostsUIDResetParams { + var () + return &V1EdgeHostsUIDResetParams{ + HTTPClient: client, + } +} + +/* +V1EdgeHostsUIDResetParams contains all the parameters to send to the API endpoint +for the v1 edge hosts Uid reset operation typically these are written to a http.Request +*/ +type V1EdgeHostsUIDResetParams struct { + + /*UID + Edge host uid + + */ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 edge hosts Uid reset params +func (o *V1EdgeHostsUIDResetParams) WithTimeout(timeout time.Duration) *V1EdgeHostsUIDResetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 edge hosts Uid reset params +func (o *V1EdgeHostsUIDResetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 edge hosts Uid reset params +func (o *V1EdgeHostsUIDResetParams) WithContext(ctx context.Context) *V1EdgeHostsUIDResetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 edge hosts Uid reset params +func (o *V1EdgeHostsUIDResetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 edge hosts Uid reset params +func (o *V1EdgeHostsUIDResetParams) WithHTTPClient(client *http.Client) *V1EdgeHostsUIDResetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 edge hosts Uid reset params +func (o *V1EdgeHostsUIDResetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithUID adds the uid to the v1 edge hosts Uid reset params +func (o *V1EdgeHostsUIDResetParams) WithUID(uid string) *V1EdgeHostsUIDResetParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 edge hosts Uid reset params +func (o *V1EdgeHostsUIDResetParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1EdgeHostsUIDResetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_edge_hosts_uid_reset_responses.go b/api/client/v1/v1_edge_hosts_uid_reset_responses.go new file mode 100644 index 00000000..7e41b237 --- /dev/null +++ b/api/client/v1/v1_edge_hosts_uid_reset_responses.go @@ -0,0 +1,61 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1EdgeHostsUIDResetReader is a Reader for the V1EdgeHostsUIDReset structure. +type V1EdgeHostsUIDResetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1EdgeHostsUIDResetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1EdgeHostsUIDResetNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1EdgeHostsUIDResetNoContent creates a V1EdgeHostsUIDResetNoContent with default headers values +func NewV1EdgeHostsUIDResetNoContent() *V1EdgeHostsUIDResetNoContent { + return &V1EdgeHostsUIDResetNoContent{} +} + +/* +V1EdgeHostsUIDResetNoContent handles this case with default header values. + +Ok response without content +*/ +type V1EdgeHostsUIDResetNoContent struct { + /*Audit uid for the request + */ + AuditUID string +} + +func (o *V1EdgeHostsUIDResetNoContent) Error() string { + return fmt.Sprintf("[PUT /v1/edgehosts/{uid}/reset][%d] v1EdgeHostsUidResetNoContent ", 204) +} + +func (o *V1EdgeHostsUIDResetNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header AuditUid + o.AuditUID = response.GetHeader("AuditUid") + + return nil +} diff --git a/api/client/v1/v1_edge_native_clusters_hosts_list_parameters.go b/api/client/v1/v1_edge_native_clusters_hosts_list_parameters.go new file mode 100644 index 00000000..2329276b --- /dev/null +++ b/api/client/v1/v1_edge_native_clusters_hosts_list_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1EdgeNativeClustersHostsListParams creates a new V1EdgeNativeClustersHostsListParams object +// with the default values initialized. +func NewV1EdgeNativeClustersHostsListParams() *V1EdgeNativeClustersHostsListParams { + var () + return &V1EdgeNativeClustersHostsListParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1EdgeNativeClustersHostsListParamsWithTimeout creates a new V1EdgeNativeClustersHostsListParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1EdgeNativeClustersHostsListParamsWithTimeout(timeout time.Duration) *V1EdgeNativeClustersHostsListParams { + var () + return &V1EdgeNativeClustersHostsListParams{ + + timeout: timeout, + } +} + +// NewV1EdgeNativeClustersHostsListParamsWithContext creates a new V1EdgeNativeClustersHostsListParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1EdgeNativeClustersHostsListParamsWithContext(ctx context.Context) *V1EdgeNativeClustersHostsListParams { + var () + return &V1EdgeNativeClustersHostsListParams{ + + Context: ctx, + } +} + +// NewV1EdgeNativeClustersHostsListParamsWithHTTPClient creates a new V1EdgeNativeClustersHostsListParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1EdgeNativeClustersHostsListParamsWithHTTPClient(client *http.Client) *V1EdgeNativeClustersHostsListParams { + var () + return &V1EdgeNativeClustersHostsListParams{ + HTTPClient: client, + } +} + +/* +V1EdgeNativeClustersHostsListParams contains all the parameters to send to the API endpoint +for the v1 edge native clusters hosts list operation typically these are written to a http.Request +*/ +type V1EdgeNativeClustersHostsListParams struct { + + /*UID + Cluster uid + + */ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 edge native clusters hosts list params +func (o *V1EdgeNativeClustersHostsListParams) WithTimeout(timeout time.Duration) *V1EdgeNativeClustersHostsListParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 edge native clusters hosts list params +func (o *V1EdgeNativeClustersHostsListParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 edge native clusters hosts list params +func (o *V1EdgeNativeClustersHostsListParams) WithContext(ctx context.Context) *V1EdgeNativeClustersHostsListParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 edge native clusters hosts list params +func (o *V1EdgeNativeClustersHostsListParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 edge native clusters hosts list params +func (o *V1EdgeNativeClustersHostsListParams) WithHTTPClient(client *http.Client) *V1EdgeNativeClustersHostsListParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 edge native clusters hosts list params +func (o *V1EdgeNativeClustersHostsListParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithUID adds the uid to the v1 edge native clusters hosts list params +func (o *V1EdgeNativeClustersHostsListParams) WithUID(uid string) *V1EdgeNativeClustersHostsListParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 edge native clusters hosts list params +func (o *V1EdgeNativeClustersHostsListParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1EdgeNativeClustersHostsListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_edge_native_clusters_hosts_list_responses.go b/api/client/v1/v1_edge_native_clusters_hosts_list_responses.go new file mode 100644 index 00000000..34fb677c --- /dev/null +++ b/api/client/v1/v1_edge_native_clusters_hosts_list_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1EdgeNativeClustersHostsListReader is a Reader for the V1EdgeNativeClustersHostsList structure. +type V1EdgeNativeClustersHostsListReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1EdgeNativeClustersHostsListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1EdgeNativeClustersHostsListOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1EdgeNativeClustersHostsListOK creates a V1EdgeNativeClustersHostsListOK with default headers values +func NewV1EdgeNativeClustersHostsListOK() *V1EdgeNativeClustersHostsListOK { + return &V1EdgeNativeClustersHostsListOK{} +} + +/* +V1EdgeNativeClustersHostsListOK handles this case with default header values. + +List of edge host device +*/ +type V1EdgeNativeClustersHostsListOK struct { + Payload *models.V1EdgeHostDevices +} + +func (o *V1EdgeNativeClustersHostsListOK) Error() string { + return fmt.Sprintf("[GET /v1/spectroclusters/{uid}/edge-native/edgeHosts][%d] v1EdgeNativeClustersHostsListOK %+v", 200, o.Payload) +} + +func (o *V1EdgeNativeClustersHostsListOK) GetPayload() *models.V1EdgeHostDevices { + return o.Payload +} + +func (o *V1EdgeNativeClustersHostsListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1EdgeHostDevices) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_edge_tokens_create_parameters.go b/api/client/v1/v1_edge_tokens_create_parameters.go new file mode 100644 index 00000000..63b627e2 --- /dev/null +++ b/api/client/v1/v1_edge_tokens_create_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1EdgeTokensCreateParams creates a new V1EdgeTokensCreateParams object +// with the default values initialized. +func NewV1EdgeTokensCreateParams() *V1EdgeTokensCreateParams { + var () + return &V1EdgeTokensCreateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1EdgeTokensCreateParamsWithTimeout creates a new V1EdgeTokensCreateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1EdgeTokensCreateParamsWithTimeout(timeout time.Duration) *V1EdgeTokensCreateParams { + var () + return &V1EdgeTokensCreateParams{ + + timeout: timeout, + } +} + +// NewV1EdgeTokensCreateParamsWithContext creates a new V1EdgeTokensCreateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1EdgeTokensCreateParamsWithContext(ctx context.Context) *V1EdgeTokensCreateParams { + var () + return &V1EdgeTokensCreateParams{ + + Context: ctx, + } +} + +// NewV1EdgeTokensCreateParamsWithHTTPClient creates a new V1EdgeTokensCreateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1EdgeTokensCreateParamsWithHTTPClient(client *http.Client) *V1EdgeTokensCreateParams { + var () + return &V1EdgeTokensCreateParams{ + HTTPClient: client, + } +} + +/* +V1EdgeTokensCreateParams contains all the parameters to send to the API endpoint +for the v1 edge tokens create operation typically these are written to a http.Request +*/ +type V1EdgeTokensCreateParams struct { + + /*Body*/ + Body *models.V1EdgeTokenEntity + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 edge tokens create params +func (o *V1EdgeTokensCreateParams) WithTimeout(timeout time.Duration) *V1EdgeTokensCreateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 edge tokens create params +func (o *V1EdgeTokensCreateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 edge tokens create params +func (o *V1EdgeTokensCreateParams) WithContext(ctx context.Context) *V1EdgeTokensCreateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 edge tokens create params +func (o *V1EdgeTokensCreateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 edge tokens create params +func (o *V1EdgeTokensCreateParams) WithHTTPClient(client *http.Client) *V1EdgeTokensCreateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 edge tokens create params +func (o *V1EdgeTokensCreateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 edge tokens create params +func (o *V1EdgeTokensCreateParams) WithBody(body *models.V1EdgeTokenEntity) *V1EdgeTokensCreateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 edge tokens create params +func (o *V1EdgeTokensCreateParams) SetBody(body *models.V1EdgeTokenEntity) { + o.Body = body +} + +// WriteToRequest writes these params to a swagger request +func (o *V1EdgeTokensCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_edge_tokens_create_responses.go b/api/client/v1/v1_edge_tokens_create_responses.go new file mode 100644 index 00000000..96d3210b --- /dev/null +++ b/api/client/v1/v1_edge_tokens_create_responses.go @@ -0,0 +1,77 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1EdgeTokensCreateReader is a Reader for the V1EdgeTokensCreate structure. +type V1EdgeTokensCreateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1EdgeTokensCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 201: + result := NewV1EdgeTokensCreateCreated() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1EdgeTokensCreateCreated creates a V1EdgeTokensCreateCreated with default headers values +func NewV1EdgeTokensCreateCreated() *V1EdgeTokensCreateCreated { + return &V1EdgeTokensCreateCreated{} +} + +/* +V1EdgeTokensCreateCreated handles this case with default header values. + +Created successfully +*/ +type V1EdgeTokensCreateCreated struct { + /*Audit uid for the request + */ + AuditUID string + + Payload *models.V1UID +} + +func (o *V1EdgeTokensCreateCreated) Error() string { + return fmt.Sprintf("[POST /v1/edgehosts/tokens][%d] v1EdgeTokensCreateCreated %+v", 201, o.Payload) +} + +func (o *V1EdgeTokensCreateCreated) GetPayload() *models.V1UID { + return o.Payload +} + +func (o *V1EdgeTokensCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header AuditUid + o.AuditUID = response.GetHeader("AuditUid") + + o.Payload = new(models.V1UID) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_edge_tokens_list_parameters.go b/api/client/v1/v1_edge_tokens_list_parameters.go new file mode 100644 index 00000000..00f30902 --- /dev/null +++ b/api/client/v1/v1_edge_tokens_list_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1EdgeTokensListParams creates a new V1EdgeTokensListParams object +// with the default values initialized. +func NewV1EdgeTokensListParams() *V1EdgeTokensListParams { + + return &V1EdgeTokensListParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1EdgeTokensListParamsWithTimeout creates a new V1EdgeTokensListParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1EdgeTokensListParamsWithTimeout(timeout time.Duration) *V1EdgeTokensListParams { + + return &V1EdgeTokensListParams{ + + timeout: timeout, + } +} + +// NewV1EdgeTokensListParamsWithContext creates a new V1EdgeTokensListParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1EdgeTokensListParamsWithContext(ctx context.Context) *V1EdgeTokensListParams { + + return &V1EdgeTokensListParams{ + + Context: ctx, + } +} + +// NewV1EdgeTokensListParamsWithHTTPClient creates a new V1EdgeTokensListParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1EdgeTokensListParamsWithHTTPClient(client *http.Client) *V1EdgeTokensListParams { + + return &V1EdgeTokensListParams{ + HTTPClient: client, + } +} + +/* +V1EdgeTokensListParams contains all the parameters to send to the API endpoint +for the v1 edge tokens list operation typically these are written to a http.Request +*/ +type V1EdgeTokensListParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 edge tokens list params +func (o *V1EdgeTokensListParams) WithTimeout(timeout time.Duration) *V1EdgeTokensListParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 edge tokens list params +func (o *V1EdgeTokensListParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 edge tokens list params +func (o *V1EdgeTokensListParams) WithContext(ctx context.Context) *V1EdgeTokensListParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 edge tokens list params +func (o *V1EdgeTokensListParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 edge tokens list params +func (o *V1EdgeTokensListParams) WithHTTPClient(client *http.Client) *V1EdgeTokensListParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 edge tokens list params +func (o *V1EdgeTokensListParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *V1EdgeTokensListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_edge_tokens_list_responses.go b/api/client/v1/v1_edge_tokens_list_responses.go new file mode 100644 index 00000000..54b33755 --- /dev/null +++ b/api/client/v1/v1_edge_tokens_list_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1EdgeTokensListReader is a Reader for the V1EdgeTokensList structure. +type V1EdgeTokensListReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1EdgeTokensListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1EdgeTokensListOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1EdgeTokensListOK creates a V1EdgeTokensListOK with default headers values +func NewV1EdgeTokensListOK() *V1EdgeTokensListOK { + return &V1EdgeTokensListOK{} +} + +/* +V1EdgeTokensListOK handles this case with default header values. + +An array of edge tokens +*/ +type V1EdgeTokensListOK struct { + Payload *models.V1EdgeTokens +} + +func (o *V1EdgeTokensListOK) Error() string { + return fmt.Sprintf("[GET /v1/edgehosts/tokens][%d] v1EdgeTokensListOK %+v", 200, o.Payload) +} + +func (o *V1EdgeTokensListOK) GetPayload() *models.V1EdgeTokens { + return o.Payload +} + +func (o *V1EdgeTokensListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1EdgeTokens) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_edge_tokens_uid_delete_parameters.go b/api/client/v1/v1_edge_tokens_uid_delete_parameters.go new file mode 100644 index 00000000..b0f5dae2 --- /dev/null +++ b/api/client/v1/v1_edge_tokens_uid_delete_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1EdgeTokensUIDDeleteParams creates a new V1EdgeTokensUIDDeleteParams object +// with the default values initialized. +func NewV1EdgeTokensUIDDeleteParams() *V1EdgeTokensUIDDeleteParams { + var () + return &V1EdgeTokensUIDDeleteParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1EdgeTokensUIDDeleteParamsWithTimeout creates a new V1EdgeTokensUIDDeleteParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1EdgeTokensUIDDeleteParamsWithTimeout(timeout time.Duration) *V1EdgeTokensUIDDeleteParams { + var () + return &V1EdgeTokensUIDDeleteParams{ + + timeout: timeout, + } +} + +// NewV1EdgeTokensUIDDeleteParamsWithContext creates a new V1EdgeTokensUIDDeleteParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1EdgeTokensUIDDeleteParamsWithContext(ctx context.Context) *V1EdgeTokensUIDDeleteParams { + var () + return &V1EdgeTokensUIDDeleteParams{ + + Context: ctx, + } +} + +// NewV1EdgeTokensUIDDeleteParamsWithHTTPClient creates a new V1EdgeTokensUIDDeleteParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1EdgeTokensUIDDeleteParamsWithHTTPClient(client *http.Client) *V1EdgeTokensUIDDeleteParams { + var () + return &V1EdgeTokensUIDDeleteParams{ + HTTPClient: client, + } +} + +/* +V1EdgeTokensUIDDeleteParams contains all the parameters to send to the API endpoint +for the v1 edge tokens Uid delete operation typically these are written to a http.Request +*/ +type V1EdgeTokensUIDDeleteParams struct { + + /*UID + Edge token uid + + */ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 edge tokens Uid delete params +func (o *V1EdgeTokensUIDDeleteParams) WithTimeout(timeout time.Duration) *V1EdgeTokensUIDDeleteParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 edge tokens Uid delete params +func (o *V1EdgeTokensUIDDeleteParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 edge tokens Uid delete params +func (o *V1EdgeTokensUIDDeleteParams) WithContext(ctx context.Context) *V1EdgeTokensUIDDeleteParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 edge tokens Uid delete params +func (o *V1EdgeTokensUIDDeleteParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 edge tokens Uid delete params +func (o *V1EdgeTokensUIDDeleteParams) WithHTTPClient(client *http.Client) *V1EdgeTokensUIDDeleteParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 edge tokens Uid delete params +func (o *V1EdgeTokensUIDDeleteParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithUID adds the uid to the v1 edge tokens Uid delete params +func (o *V1EdgeTokensUIDDeleteParams) WithUID(uid string) *V1EdgeTokensUIDDeleteParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 edge tokens Uid delete params +func (o *V1EdgeTokensUIDDeleteParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1EdgeTokensUIDDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_edge_tokens_uid_delete_responses.go b/api/client/v1/v1_edge_tokens_uid_delete_responses.go new file mode 100644 index 00000000..a8730f39 --- /dev/null +++ b/api/client/v1/v1_edge_tokens_uid_delete_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1EdgeTokensUIDDeleteReader is a Reader for the V1EdgeTokensUIDDelete structure. +type V1EdgeTokensUIDDeleteReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1EdgeTokensUIDDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1EdgeTokensUIDDeleteNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1EdgeTokensUIDDeleteNoContent creates a V1EdgeTokensUIDDeleteNoContent with default headers values +func NewV1EdgeTokensUIDDeleteNoContent() *V1EdgeTokensUIDDeleteNoContent { + return &V1EdgeTokensUIDDeleteNoContent{} +} + +/* +V1EdgeTokensUIDDeleteNoContent handles this case with default header values. + +The resource was deleted successfully +*/ +type V1EdgeTokensUIDDeleteNoContent struct { +} + +func (o *V1EdgeTokensUIDDeleteNoContent) Error() string { + return fmt.Sprintf("[DELETE /v1/edgehosts/tokens/{uid}][%d] v1EdgeTokensUidDeleteNoContent ", 204) +} + +func (o *V1EdgeTokensUIDDeleteNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_edge_tokens_uid_get_parameters.go b/api/client/v1/v1_edge_tokens_uid_get_parameters.go new file mode 100644 index 00000000..8707086c --- /dev/null +++ b/api/client/v1/v1_edge_tokens_uid_get_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1EdgeTokensUIDGetParams creates a new V1EdgeTokensUIDGetParams object +// with the default values initialized. +func NewV1EdgeTokensUIDGetParams() *V1EdgeTokensUIDGetParams { + var () + return &V1EdgeTokensUIDGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1EdgeTokensUIDGetParamsWithTimeout creates a new V1EdgeTokensUIDGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1EdgeTokensUIDGetParamsWithTimeout(timeout time.Duration) *V1EdgeTokensUIDGetParams { + var () + return &V1EdgeTokensUIDGetParams{ + + timeout: timeout, + } +} + +// NewV1EdgeTokensUIDGetParamsWithContext creates a new V1EdgeTokensUIDGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1EdgeTokensUIDGetParamsWithContext(ctx context.Context) *V1EdgeTokensUIDGetParams { + var () + return &V1EdgeTokensUIDGetParams{ + + Context: ctx, + } +} + +// NewV1EdgeTokensUIDGetParamsWithHTTPClient creates a new V1EdgeTokensUIDGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1EdgeTokensUIDGetParamsWithHTTPClient(client *http.Client) *V1EdgeTokensUIDGetParams { + var () + return &V1EdgeTokensUIDGetParams{ + HTTPClient: client, + } +} + +/* +V1EdgeTokensUIDGetParams contains all the parameters to send to the API endpoint +for the v1 edge tokens Uid get operation typically these are written to a http.Request +*/ +type V1EdgeTokensUIDGetParams struct { + + /*UID + Edge token uid + + */ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 edge tokens Uid get params +func (o *V1EdgeTokensUIDGetParams) WithTimeout(timeout time.Duration) *V1EdgeTokensUIDGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 edge tokens Uid get params +func (o *V1EdgeTokensUIDGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 edge tokens Uid get params +func (o *V1EdgeTokensUIDGetParams) WithContext(ctx context.Context) *V1EdgeTokensUIDGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 edge tokens Uid get params +func (o *V1EdgeTokensUIDGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 edge tokens Uid get params +func (o *V1EdgeTokensUIDGetParams) WithHTTPClient(client *http.Client) *V1EdgeTokensUIDGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 edge tokens Uid get params +func (o *V1EdgeTokensUIDGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithUID adds the uid to the v1 edge tokens Uid get params +func (o *V1EdgeTokensUIDGetParams) WithUID(uid string) *V1EdgeTokensUIDGetParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 edge tokens Uid get params +func (o *V1EdgeTokensUIDGetParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1EdgeTokensUIDGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_edge_tokens_uid_get_responses.go b/api/client/v1/v1_edge_tokens_uid_get_responses.go new file mode 100644 index 00000000..af001e81 --- /dev/null +++ b/api/client/v1/v1_edge_tokens_uid_get_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1EdgeTokensUIDGetReader is a Reader for the V1EdgeTokensUIDGet structure. +type V1EdgeTokensUIDGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1EdgeTokensUIDGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1EdgeTokensUIDGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1EdgeTokensUIDGetOK creates a V1EdgeTokensUIDGetOK with default headers values +func NewV1EdgeTokensUIDGetOK() *V1EdgeTokensUIDGetOK { + return &V1EdgeTokensUIDGetOK{} +} + +/* +V1EdgeTokensUIDGetOK handles this case with default header values. + +OK +*/ +type V1EdgeTokensUIDGetOK struct { + Payload *models.V1EdgeToken +} + +func (o *V1EdgeTokensUIDGetOK) Error() string { + return fmt.Sprintf("[GET /v1/edgehosts/tokens/{uid}][%d] v1EdgeTokensUidGetOK %+v", 200, o.Payload) +} + +func (o *V1EdgeTokensUIDGetOK) GetPayload() *models.V1EdgeToken { + return o.Payload +} + +func (o *V1EdgeTokensUIDGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1EdgeToken) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_edge_tokens_uid_state_parameters.go b/api/client/v1/v1_edge_tokens_uid_state_parameters.go new file mode 100644 index 00000000..91958064 --- /dev/null +++ b/api/client/v1/v1_edge_tokens_uid_state_parameters.go @@ -0,0 +1,157 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1EdgeTokensUIDStateParams creates a new V1EdgeTokensUIDStateParams object +// with the default values initialized. +func NewV1EdgeTokensUIDStateParams() *V1EdgeTokensUIDStateParams { + var () + return &V1EdgeTokensUIDStateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1EdgeTokensUIDStateParamsWithTimeout creates a new V1EdgeTokensUIDStateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1EdgeTokensUIDStateParamsWithTimeout(timeout time.Duration) *V1EdgeTokensUIDStateParams { + var () + return &V1EdgeTokensUIDStateParams{ + + timeout: timeout, + } +} + +// NewV1EdgeTokensUIDStateParamsWithContext creates a new V1EdgeTokensUIDStateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1EdgeTokensUIDStateParamsWithContext(ctx context.Context) *V1EdgeTokensUIDStateParams { + var () + return &V1EdgeTokensUIDStateParams{ + + Context: ctx, + } +} + +// NewV1EdgeTokensUIDStateParamsWithHTTPClient creates a new V1EdgeTokensUIDStateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1EdgeTokensUIDStateParamsWithHTTPClient(client *http.Client) *V1EdgeTokensUIDStateParams { + var () + return &V1EdgeTokensUIDStateParams{ + HTTPClient: client, + } +} + +/* +V1EdgeTokensUIDStateParams contains all the parameters to send to the API endpoint +for the v1 edge tokens Uid state operation typically these are written to a http.Request +*/ +type V1EdgeTokensUIDStateParams struct { + + /*Body*/ + Body *models.V1EdgeTokenActiveState + /*UID + Edge token uid + + */ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 edge tokens Uid state params +func (o *V1EdgeTokensUIDStateParams) WithTimeout(timeout time.Duration) *V1EdgeTokensUIDStateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 edge tokens Uid state params +func (o *V1EdgeTokensUIDStateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 edge tokens Uid state params +func (o *V1EdgeTokensUIDStateParams) WithContext(ctx context.Context) *V1EdgeTokensUIDStateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 edge tokens Uid state params +func (o *V1EdgeTokensUIDStateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 edge tokens Uid state params +func (o *V1EdgeTokensUIDStateParams) WithHTTPClient(client *http.Client) *V1EdgeTokensUIDStateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 edge tokens Uid state params +func (o *V1EdgeTokensUIDStateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 edge tokens Uid state params +func (o *V1EdgeTokensUIDStateParams) WithBody(body *models.V1EdgeTokenActiveState) *V1EdgeTokensUIDStateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 edge tokens Uid state params +func (o *V1EdgeTokensUIDStateParams) SetBody(body *models.V1EdgeTokenActiveState) { + o.Body = body +} + +// WithUID adds the uid to the v1 edge tokens Uid state params +func (o *V1EdgeTokensUIDStateParams) WithUID(uid string) *V1EdgeTokensUIDStateParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 edge tokens Uid state params +func (o *V1EdgeTokensUIDStateParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1EdgeTokensUIDStateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_edge_tokens_uid_state_responses.go b/api/client/v1/v1_edge_tokens_uid_state_responses.go new file mode 100644 index 00000000..4e7232c3 --- /dev/null +++ b/api/client/v1/v1_edge_tokens_uid_state_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1EdgeTokensUIDStateReader is a Reader for the V1EdgeTokensUIDState structure. +type V1EdgeTokensUIDStateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1EdgeTokensUIDStateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1EdgeTokensUIDStateNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1EdgeTokensUIDStateNoContent creates a V1EdgeTokensUIDStateNoContent with default headers values +func NewV1EdgeTokensUIDStateNoContent() *V1EdgeTokensUIDStateNoContent { + return &V1EdgeTokensUIDStateNoContent{} +} + +/* +V1EdgeTokensUIDStateNoContent handles this case with default header values. + +The resource was updated successfully +*/ +type V1EdgeTokensUIDStateNoContent struct { +} + +func (o *V1EdgeTokensUIDStateNoContent) Error() string { + return fmt.Sprintf("[PUT /v1/edgehosts/tokens/{uid}/state][%d] v1EdgeTokensUidStateNoContent ", 204) +} + +func (o *V1EdgeTokensUIDStateNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_edge_tokens_uid_update_parameters.go b/api/client/v1/v1_edge_tokens_uid_update_parameters.go new file mode 100644 index 00000000..72de8a11 --- /dev/null +++ b/api/client/v1/v1_edge_tokens_uid_update_parameters.go @@ -0,0 +1,157 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1EdgeTokensUIDUpdateParams creates a new V1EdgeTokensUIDUpdateParams object +// with the default values initialized. +func NewV1EdgeTokensUIDUpdateParams() *V1EdgeTokensUIDUpdateParams { + var () + return &V1EdgeTokensUIDUpdateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1EdgeTokensUIDUpdateParamsWithTimeout creates a new V1EdgeTokensUIDUpdateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1EdgeTokensUIDUpdateParamsWithTimeout(timeout time.Duration) *V1EdgeTokensUIDUpdateParams { + var () + return &V1EdgeTokensUIDUpdateParams{ + + timeout: timeout, + } +} + +// NewV1EdgeTokensUIDUpdateParamsWithContext creates a new V1EdgeTokensUIDUpdateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1EdgeTokensUIDUpdateParamsWithContext(ctx context.Context) *V1EdgeTokensUIDUpdateParams { + var () + return &V1EdgeTokensUIDUpdateParams{ + + Context: ctx, + } +} + +// NewV1EdgeTokensUIDUpdateParamsWithHTTPClient creates a new V1EdgeTokensUIDUpdateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1EdgeTokensUIDUpdateParamsWithHTTPClient(client *http.Client) *V1EdgeTokensUIDUpdateParams { + var () + return &V1EdgeTokensUIDUpdateParams{ + HTTPClient: client, + } +} + +/* +V1EdgeTokensUIDUpdateParams contains all the parameters to send to the API endpoint +for the v1 edge tokens Uid update operation typically these are written to a http.Request +*/ +type V1EdgeTokensUIDUpdateParams struct { + + /*Body*/ + Body *models.V1EdgeTokenUpdate + /*UID + Edge token uid + + */ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 edge tokens Uid update params +func (o *V1EdgeTokensUIDUpdateParams) WithTimeout(timeout time.Duration) *V1EdgeTokensUIDUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 edge tokens Uid update params +func (o *V1EdgeTokensUIDUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 edge tokens Uid update params +func (o *V1EdgeTokensUIDUpdateParams) WithContext(ctx context.Context) *V1EdgeTokensUIDUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 edge tokens Uid update params +func (o *V1EdgeTokensUIDUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 edge tokens Uid update params +func (o *V1EdgeTokensUIDUpdateParams) WithHTTPClient(client *http.Client) *V1EdgeTokensUIDUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 edge tokens Uid update params +func (o *V1EdgeTokensUIDUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 edge tokens Uid update params +func (o *V1EdgeTokensUIDUpdateParams) WithBody(body *models.V1EdgeTokenUpdate) *V1EdgeTokensUIDUpdateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 edge tokens Uid update params +func (o *V1EdgeTokensUIDUpdateParams) SetBody(body *models.V1EdgeTokenUpdate) { + o.Body = body +} + +// WithUID adds the uid to the v1 edge tokens Uid update params +func (o *V1EdgeTokensUIDUpdateParams) WithUID(uid string) *V1EdgeTokensUIDUpdateParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 edge tokens Uid update params +func (o *V1EdgeTokensUIDUpdateParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1EdgeTokensUIDUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_edge_tokens_uid_update_responses.go b/api/client/v1/v1_edge_tokens_uid_update_responses.go new file mode 100644 index 00000000..b0ee8cc8 --- /dev/null +++ b/api/client/v1/v1_edge_tokens_uid_update_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1EdgeTokensUIDUpdateReader is a Reader for the V1EdgeTokensUIDUpdate structure. +type V1EdgeTokensUIDUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1EdgeTokensUIDUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1EdgeTokensUIDUpdateNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1EdgeTokensUIDUpdateNoContent creates a V1EdgeTokensUIDUpdateNoContent with default headers values +func NewV1EdgeTokensUIDUpdateNoContent() *V1EdgeTokensUIDUpdateNoContent { + return &V1EdgeTokensUIDUpdateNoContent{} +} + +/* +V1EdgeTokensUIDUpdateNoContent handles this case with default header values. + +The resource was updated successfully +*/ +type V1EdgeTokensUIDUpdateNoContent struct { +} + +func (o *V1EdgeTokensUIDUpdateNoContent) Error() string { + return fmt.Sprintf("[PUT /v1/edgehosts/tokens/{uid}][%d] v1EdgeTokensUidUpdateNoContent ", 204) +} + +func (o *V1EdgeTokensUIDUpdateNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_eks_properties_validate_parameters.go b/api/client/v1/v1_eks_properties_validate_parameters.go new file mode 100644 index 00000000..a1cb7747 --- /dev/null +++ b/api/client/v1/v1_eks_properties_validate_parameters.go @@ -0,0 +1,139 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1EksPropertiesValidateParams creates a new V1EksPropertiesValidateParams object +// with the default values initialized. +func NewV1EksPropertiesValidateParams() *V1EksPropertiesValidateParams { + var () + return &V1EksPropertiesValidateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1EksPropertiesValidateParamsWithTimeout creates a new V1EksPropertiesValidateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1EksPropertiesValidateParamsWithTimeout(timeout time.Duration) *V1EksPropertiesValidateParams { + var () + return &V1EksPropertiesValidateParams{ + + timeout: timeout, + } +} + +// NewV1EksPropertiesValidateParamsWithContext creates a new V1EksPropertiesValidateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1EksPropertiesValidateParamsWithContext(ctx context.Context) *V1EksPropertiesValidateParams { + var () + return &V1EksPropertiesValidateParams{ + + Context: ctx, + } +} + +// NewV1EksPropertiesValidateParamsWithHTTPClient creates a new V1EksPropertiesValidateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1EksPropertiesValidateParamsWithHTTPClient(client *http.Client) *V1EksPropertiesValidateParams { + var () + return &V1EksPropertiesValidateParams{ + HTTPClient: client, + } +} + +/* +V1EksPropertiesValidateParams contains all the parameters to send to the API endpoint +for the v1 eks properties validate operation typically these are written to a http.Request +*/ +type V1EksPropertiesValidateParams struct { + + /*Properties + Request payload for EKS properties validate spec + + */ + Properties *models.V1EksPropertiesValidateSpec + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 eks properties validate params +func (o *V1EksPropertiesValidateParams) WithTimeout(timeout time.Duration) *V1EksPropertiesValidateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 eks properties validate params +func (o *V1EksPropertiesValidateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 eks properties validate params +func (o *V1EksPropertiesValidateParams) WithContext(ctx context.Context) *V1EksPropertiesValidateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 eks properties validate params +func (o *V1EksPropertiesValidateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 eks properties validate params +func (o *V1EksPropertiesValidateParams) WithHTTPClient(client *http.Client) *V1EksPropertiesValidateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 eks properties validate params +func (o *V1EksPropertiesValidateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithProperties adds the properties to the v1 eks properties validate params +func (o *V1EksPropertiesValidateParams) WithProperties(properties *models.V1EksPropertiesValidateSpec) *V1EksPropertiesValidateParams { + o.SetProperties(properties) + return o +} + +// SetProperties adds the properties to the v1 eks properties validate params +func (o *V1EksPropertiesValidateParams) SetProperties(properties *models.V1EksPropertiesValidateSpec) { + o.Properties = properties +} + +// WriteToRequest writes these params to a swagger request +func (o *V1EksPropertiesValidateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Properties != nil { + if err := r.SetBodyParam(o.Properties); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_eks_properties_validate_responses.go b/api/client/v1/v1_eks_properties_validate_responses.go new file mode 100644 index 00000000..2f7fe8f5 --- /dev/null +++ b/api/client/v1/v1_eks_properties_validate_responses.go @@ -0,0 +1,61 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1EksPropertiesValidateReader is a Reader for the V1EksPropertiesValidate structure. +type V1EksPropertiesValidateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1EksPropertiesValidateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1EksPropertiesValidateNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1EksPropertiesValidateNoContent creates a V1EksPropertiesValidateNoContent with default headers values +func NewV1EksPropertiesValidateNoContent() *V1EksPropertiesValidateNoContent { + return &V1EksPropertiesValidateNoContent{} +} + +/* +V1EksPropertiesValidateNoContent handles this case with default header values. + +Ok response without content +*/ +type V1EksPropertiesValidateNoContent struct { + /*Audit uid for the request + */ + AuditUID string +} + +func (o *V1EksPropertiesValidateNoContent) Error() string { + return fmt.Sprintf("[POST /v1/clouds/eks/properties/validate][%d] v1EksPropertiesValidateNoContent ", 204) +} + +func (o *V1EksPropertiesValidateNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header AuditUid + o.AuditUID = response.GetHeader("AuditUid") + + return nil +} diff --git a/api/client/v1/v1_events_components_create_bulk_parameters.go b/api/client/v1/v1_events_components_create_bulk_parameters.go new file mode 100644 index 00000000..fe46a53c --- /dev/null +++ b/api/client/v1/v1_events_components_create_bulk_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1EventsComponentsCreateBulkParams creates a new V1EventsComponentsCreateBulkParams object +// with the default values initialized. +func NewV1EventsComponentsCreateBulkParams() *V1EventsComponentsCreateBulkParams { + var () + return &V1EventsComponentsCreateBulkParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1EventsComponentsCreateBulkParamsWithTimeout creates a new V1EventsComponentsCreateBulkParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1EventsComponentsCreateBulkParamsWithTimeout(timeout time.Duration) *V1EventsComponentsCreateBulkParams { + var () + return &V1EventsComponentsCreateBulkParams{ + + timeout: timeout, + } +} + +// NewV1EventsComponentsCreateBulkParamsWithContext creates a new V1EventsComponentsCreateBulkParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1EventsComponentsCreateBulkParamsWithContext(ctx context.Context) *V1EventsComponentsCreateBulkParams { + var () + return &V1EventsComponentsCreateBulkParams{ + + Context: ctx, + } +} + +// NewV1EventsComponentsCreateBulkParamsWithHTTPClient creates a new V1EventsComponentsCreateBulkParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1EventsComponentsCreateBulkParamsWithHTTPClient(client *http.Client) *V1EventsComponentsCreateBulkParams { + var () + return &V1EventsComponentsCreateBulkParams{ + HTTPClient: client, + } +} + +/* +V1EventsComponentsCreateBulkParams contains all the parameters to send to the API endpoint +for the v1 events components create bulk operation typically these are written to a http.Request +*/ +type V1EventsComponentsCreateBulkParams struct { + + /*Body*/ + Body models.V1BulkEvents + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 events components create bulk params +func (o *V1EventsComponentsCreateBulkParams) WithTimeout(timeout time.Duration) *V1EventsComponentsCreateBulkParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 events components create bulk params +func (o *V1EventsComponentsCreateBulkParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 events components create bulk params +func (o *V1EventsComponentsCreateBulkParams) WithContext(ctx context.Context) *V1EventsComponentsCreateBulkParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 events components create bulk params +func (o *V1EventsComponentsCreateBulkParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 events components create bulk params +func (o *V1EventsComponentsCreateBulkParams) WithHTTPClient(client *http.Client) *V1EventsComponentsCreateBulkParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 events components create bulk params +func (o *V1EventsComponentsCreateBulkParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 events components create bulk params +func (o *V1EventsComponentsCreateBulkParams) WithBody(body models.V1BulkEvents) *V1EventsComponentsCreateBulkParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 events components create bulk params +func (o *V1EventsComponentsCreateBulkParams) SetBody(body models.V1BulkEvents) { + o.Body = body +} + +// WriteToRequest writes these params to a swagger request +func (o *V1EventsComponentsCreateBulkParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_events_components_create_bulk_responses.go b/api/client/v1/v1_events_components_create_bulk_responses.go new file mode 100644 index 00000000..99ebb6ba --- /dev/null +++ b/api/client/v1/v1_events_components_create_bulk_responses.go @@ -0,0 +1,68 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1EventsComponentsCreateBulkReader is a Reader for the V1EventsComponentsCreateBulk structure. +type V1EventsComponentsCreateBulkReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1EventsComponentsCreateBulkReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 201: + result := NewV1EventsComponentsCreateBulkCreated() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1EventsComponentsCreateBulkCreated creates a V1EventsComponentsCreateBulkCreated with default headers values +func NewV1EventsComponentsCreateBulkCreated() *V1EventsComponentsCreateBulkCreated { + return &V1EventsComponentsCreateBulkCreated{} +} + +/* +V1EventsComponentsCreateBulkCreated handles this case with default header values. + +Created successfully +*/ +type V1EventsComponentsCreateBulkCreated struct { + Payload models.V1Uids +} + +func (o *V1EventsComponentsCreateBulkCreated) Error() string { + return fmt.Sprintf("[POST /v1/events/components/bulk][%d] v1EventsComponentsCreateBulkCreated %+v", 201, o.Payload) +} + +func (o *V1EventsComponentsCreateBulkCreated) GetPayload() models.V1Uids { + return o.Payload +} + +func (o *V1EventsComponentsCreateBulkCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_events_components_create_parameters.go b/api/client/v1/v1_events_components_create_parameters.go new file mode 100644 index 00000000..2a909134 --- /dev/null +++ b/api/client/v1/v1_events_components_create_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1EventsComponentsCreateParams creates a new V1EventsComponentsCreateParams object +// with the default values initialized. +func NewV1EventsComponentsCreateParams() *V1EventsComponentsCreateParams { + var () + return &V1EventsComponentsCreateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1EventsComponentsCreateParamsWithTimeout creates a new V1EventsComponentsCreateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1EventsComponentsCreateParamsWithTimeout(timeout time.Duration) *V1EventsComponentsCreateParams { + var () + return &V1EventsComponentsCreateParams{ + + timeout: timeout, + } +} + +// NewV1EventsComponentsCreateParamsWithContext creates a new V1EventsComponentsCreateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1EventsComponentsCreateParamsWithContext(ctx context.Context) *V1EventsComponentsCreateParams { + var () + return &V1EventsComponentsCreateParams{ + + Context: ctx, + } +} + +// NewV1EventsComponentsCreateParamsWithHTTPClient creates a new V1EventsComponentsCreateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1EventsComponentsCreateParamsWithHTTPClient(client *http.Client) *V1EventsComponentsCreateParams { + var () + return &V1EventsComponentsCreateParams{ + HTTPClient: client, + } +} + +/* +V1EventsComponentsCreateParams contains all the parameters to send to the API endpoint +for the v1 events components create operation typically these are written to a http.Request +*/ +type V1EventsComponentsCreateParams struct { + + /*Body*/ + Body *models.V1Event + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 events components create params +func (o *V1EventsComponentsCreateParams) WithTimeout(timeout time.Duration) *V1EventsComponentsCreateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 events components create params +func (o *V1EventsComponentsCreateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 events components create params +func (o *V1EventsComponentsCreateParams) WithContext(ctx context.Context) *V1EventsComponentsCreateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 events components create params +func (o *V1EventsComponentsCreateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 events components create params +func (o *V1EventsComponentsCreateParams) WithHTTPClient(client *http.Client) *V1EventsComponentsCreateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 events components create params +func (o *V1EventsComponentsCreateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 events components create params +func (o *V1EventsComponentsCreateParams) WithBody(body *models.V1Event) *V1EventsComponentsCreateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 events components create params +func (o *V1EventsComponentsCreateParams) SetBody(body *models.V1Event) { + o.Body = body +} + +// WriteToRequest writes these params to a swagger request +func (o *V1EventsComponentsCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_events_components_create_responses.go b/api/client/v1/v1_events_components_create_responses.go new file mode 100644 index 00000000..a0525949 --- /dev/null +++ b/api/client/v1/v1_events_components_create_responses.go @@ -0,0 +1,77 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1EventsComponentsCreateReader is a Reader for the V1EventsComponentsCreate structure. +type V1EventsComponentsCreateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1EventsComponentsCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 201: + result := NewV1EventsComponentsCreateCreated() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1EventsComponentsCreateCreated creates a V1EventsComponentsCreateCreated with default headers values +func NewV1EventsComponentsCreateCreated() *V1EventsComponentsCreateCreated { + return &V1EventsComponentsCreateCreated{} +} + +/* +V1EventsComponentsCreateCreated handles this case with default header values. + +Created successfully +*/ +type V1EventsComponentsCreateCreated struct { + /*Audit uid for the request + */ + AuditUID string + + Payload *models.V1UID +} + +func (o *V1EventsComponentsCreateCreated) Error() string { + return fmt.Sprintf("[POST /v1/events/components][%d] v1EventsComponentsCreateCreated %+v", 201, o.Payload) +} + +func (o *V1EventsComponentsCreateCreated) GetPayload() *models.V1UID { + return o.Payload +} + +func (o *V1EventsComponentsCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header AuditUid + o.AuditUID = response.GetHeader("AuditUid") + + o.Payload = new(models.V1UID) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_events_components_list_parameters.go b/api/client/v1/v1_events_components_list_parameters.go new file mode 100644 index 00000000..89e5c0b2 --- /dev/null +++ b/api/client/v1/v1_events_components_list_parameters.go @@ -0,0 +1,323 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// NewV1EventsComponentsListParams creates a new V1EventsComponentsListParams object +// with the default values initialized. +func NewV1EventsComponentsListParams() *V1EventsComponentsListParams { + var ( + limitDefault = int64(50) + ) + return &V1EventsComponentsListParams{ + Limit: &limitDefault, + + timeout: cr.DefaultTimeout, + } +} + +// NewV1EventsComponentsListParamsWithTimeout creates a new V1EventsComponentsListParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1EventsComponentsListParamsWithTimeout(timeout time.Duration) *V1EventsComponentsListParams { + var ( + limitDefault = int64(50) + ) + return &V1EventsComponentsListParams{ + Limit: &limitDefault, + + timeout: timeout, + } +} + +// NewV1EventsComponentsListParamsWithContext creates a new V1EventsComponentsListParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1EventsComponentsListParamsWithContext(ctx context.Context) *V1EventsComponentsListParams { + var ( + limitDefault = int64(50) + ) + return &V1EventsComponentsListParams{ + Limit: &limitDefault, + + Context: ctx, + } +} + +// NewV1EventsComponentsListParamsWithHTTPClient creates a new V1EventsComponentsListParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1EventsComponentsListParamsWithHTTPClient(client *http.Client) *V1EventsComponentsListParams { + var ( + limitDefault = int64(50) + ) + return &V1EventsComponentsListParams{ + Limit: &limitDefault, + HTTPClient: client, + } +} + +/* +V1EventsComponentsListParams contains all the parameters to send to the API endpoint +for the v1 events components list operation typically these are written to a http.Request +*/ +type V1EventsComponentsListParams struct { + + /*Continue + continue token to paginate the subsequent data items + + */ + Continue *string + /*Fields + Set of fields to be presented in the response with values. The fields are comma separated. Eg: metadata.uid,metadata.name + + */ + Fields *string + /*Filters + Filters can be combined with AND, OR operators with field path name. Eg: metadata.name=TestServiceANDspec.cloudType=aws + + Server will be restricted to certain fields based on the indexed data for each resource. + + */ + Filters *string + /*Limit + limit is a maximum number of responses to return for a list call. Default and maximum value of the limit is 50. + If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. + + */ + Limit *int64 + /*Offset + offset is the next index number from which the response will start. The response offset value can be used along with continue token for the pagination. + + */ + Offset *int64 + /*OrderBy + Specify the fields with sort order. 1 indicates ascending and -1 for descending. Eg: orderBy=metadata.name=1,metadata.uid=-1 + + */ + OrderBy *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 events components list params +func (o *V1EventsComponentsListParams) WithTimeout(timeout time.Duration) *V1EventsComponentsListParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 events components list params +func (o *V1EventsComponentsListParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 events components list params +func (o *V1EventsComponentsListParams) WithContext(ctx context.Context) *V1EventsComponentsListParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 events components list params +func (o *V1EventsComponentsListParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 events components list params +func (o *V1EventsComponentsListParams) WithHTTPClient(client *http.Client) *V1EventsComponentsListParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 events components list params +func (o *V1EventsComponentsListParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithContinue adds the continueVar to the v1 events components list params +func (o *V1EventsComponentsListParams) WithContinue(continueVar *string) *V1EventsComponentsListParams { + o.SetContinue(continueVar) + return o +} + +// SetContinue adds the continue to the v1 events components list params +func (o *V1EventsComponentsListParams) SetContinue(continueVar *string) { + o.Continue = continueVar +} + +// WithFields adds the fields to the v1 events components list params +func (o *V1EventsComponentsListParams) WithFields(fields *string) *V1EventsComponentsListParams { + o.SetFields(fields) + return o +} + +// SetFields adds the fields to the v1 events components list params +func (o *V1EventsComponentsListParams) SetFields(fields *string) { + o.Fields = fields +} + +// WithFilters adds the filters to the v1 events components list params +func (o *V1EventsComponentsListParams) WithFilters(filters *string) *V1EventsComponentsListParams { + o.SetFilters(filters) + return o +} + +// SetFilters adds the filters to the v1 events components list params +func (o *V1EventsComponentsListParams) SetFilters(filters *string) { + o.Filters = filters +} + +// WithLimit adds the limit to the v1 events components list params +func (o *V1EventsComponentsListParams) WithLimit(limit *int64) *V1EventsComponentsListParams { + o.SetLimit(limit) + return o +} + +// SetLimit adds the limit to the v1 events components list params +func (o *V1EventsComponentsListParams) SetLimit(limit *int64) { + o.Limit = limit +} + +// WithOffset adds the offset to the v1 events components list params +func (o *V1EventsComponentsListParams) WithOffset(offset *int64) *V1EventsComponentsListParams { + o.SetOffset(offset) + return o +} + +// SetOffset adds the offset to the v1 events components list params +func (o *V1EventsComponentsListParams) SetOffset(offset *int64) { + o.Offset = offset +} + +// WithOrderBy adds the orderBy to the v1 events components list params +func (o *V1EventsComponentsListParams) WithOrderBy(orderBy *string) *V1EventsComponentsListParams { + o.SetOrderBy(orderBy) + return o +} + +// SetOrderBy adds the orderBy to the v1 events components list params +func (o *V1EventsComponentsListParams) SetOrderBy(orderBy *string) { + o.OrderBy = orderBy +} + +// WriteToRequest writes these params to a swagger request +func (o *V1EventsComponentsListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Continue != nil { + + // query param continue + var qrContinue string + if o.Continue != nil { + qrContinue = *o.Continue + } + qContinue := qrContinue + if qContinue != "" { + if err := r.SetQueryParam("continue", qContinue); err != nil { + return err + } + } + + } + + if o.Fields != nil { + + // query param fields + var qrFields string + if o.Fields != nil { + qrFields = *o.Fields + } + qFields := qrFields + if qFields != "" { + if err := r.SetQueryParam("fields", qFields); err != nil { + return err + } + } + + } + + if o.Filters != nil { + + // query param filters + var qrFilters string + if o.Filters != nil { + qrFilters = *o.Filters + } + qFilters := qrFilters + if qFilters != "" { + if err := r.SetQueryParam("filters", qFilters); err != nil { + return err + } + } + + } + + if o.Limit != nil { + + // query param limit + var qrLimit int64 + if o.Limit != nil { + qrLimit = *o.Limit + } + qLimit := swag.FormatInt64(qrLimit) + if qLimit != "" { + if err := r.SetQueryParam("limit", qLimit); err != nil { + return err + } + } + + } + + if o.Offset != nil { + + // query param offset + var qrOffset int64 + if o.Offset != nil { + qrOffset = *o.Offset + } + qOffset := swag.FormatInt64(qrOffset) + if qOffset != "" { + if err := r.SetQueryParam("offset", qOffset); err != nil { + return err + } + } + + } + + if o.OrderBy != nil { + + // query param orderBy + var qrOrderBy string + if o.OrderBy != nil { + qrOrderBy = *o.OrderBy + } + qOrderBy := qrOrderBy + if qOrderBy != "" { + if err := r.SetQueryParam("orderBy", qOrderBy); err != nil { + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_events_components_list_responses.go b/api/client/v1/v1_events_components_list_responses.go new file mode 100644 index 00000000..bad86a9e --- /dev/null +++ b/api/client/v1/v1_events_components_list_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1EventsComponentsListReader is a Reader for the V1EventsComponentsList structure. +type V1EventsComponentsListReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1EventsComponentsListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1EventsComponentsListOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1EventsComponentsListOK creates a V1EventsComponentsListOK with default headers values +func NewV1EventsComponentsListOK() *V1EventsComponentsListOK { + return &V1EventsComponentsListOK{} +} + +/* +V1EventsComponentsListOK handles this case with default header values. + +An array of component events items +*/ +type V1EventsComponentsListOK struct { + Payload *models.V1Events +} + +func (o *V1EventsComponentsListOK) Error() string { + return fmt.Sprintf("[GET /v1/events/components][%d] v1EventsComponentsListOK %+v", 200, o.Payload) +} + +func (o *V1EventsComponentsListOK) GetPayload() *models.V1Events { + return o.Payload +} + +func (o *V1EventsComponentsListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1Events) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_events_components_obj_type_uid_delete_parameters.go b/api/client/v1/v1_events_components_obj_type_uid_delete_parameters.go new file mode 100644 index 00000000..301db94f --- /dev/null +++ b/api/client/v1/v1_events_components_obj_type_uid_delete_parameters.go @@ -0,0 +1,157 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1EventsComponentsObjTypeUIDDeleteParams creates a new V1EventsComponentsObjTypeUIDDeleteParams object +// with the default values initialized. +func NewV1EventsComponentsObjTypeUIDDeleteParams() *V1EventsComponentsObjTypeUIDDeleteParams { + var () + return &V1EventsComponentsObjTypeUIDDeleteParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1EventsComponentsObjTypeUIDDeleteParamsWithTimeout creates a new V1EventsComponentsObjTypeUIDDeleteParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1EventsComponentsObjTypeUIDDeleteParamsWithTimeout(timeout time.Duration) *V1EventsComponentsObjTypeUIDDeleteParams { + var () + return &V1EventsComponentsObjTypeUIDDeleteParams{ + + timeout: timeout, + } +} + +// NewV1EventsComponentsObjTypeUIDDeleteParamsWithContext creates a new V1EventsComponentsObjTypeUIDDeleteParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1EventsComponentsObjTypeUIDDeleteParamsWithContext(ctx context.Context) *V1EventsComponentsObjTypeUIDDeleteParams { + var () + return &V1EventsComponentsObjTypeUIDDeleteParams{ + + Context: ctx, + } +} + +// NewV1EventsComponentsObjTypeUIDDeleteParamsWithHTTPClient creates a new V1EventsComponentsObjTypeUIDDeleteParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1EventsComponentsObjTypeUIDDeleteParamsWithHTTPClient(client *http.Client) *V1EventsComponentsObjTypeUIDDeleteParams { + var () + return &V1EventsComponentsObjTypeUIDDeleteParams{ + HTTPClient: client, + } +} + +/* +V1EventsComponentsObjTypeUIDDeleteParams contains all the parameters to send to the API endpoint +for the v1 events components obj type Uid delete operation typically these are written to a http.Request +*/ +type V1EventsComponentsObjTypeUIDDeleteParams struct { + + /*ObjectKind + Describes the related object uid for which events has to be fetched + + */ + ObjectKind string + /*ObjectUID + Describes the related object kind for which events has to be fetched + + */ + ObjectUID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 events components obj type Uid delete params +func (o *V1EventsComponentsObjTypeUIDDeleteParams) WithTimeout(timeout time.Duration) *V1EventsComponentsObjTypeUIDDeleteParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 events components obj type Uid delete params +func (o *V1EventsComponentsObjTypeUIDDeleteParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 events components obj type Uid delete params +func (o *V1EventsComponentsObjTypeUIDDeleteParams) WithContext(ctx context.Context) *V1EventsComponentsObjTypeUIDDeleteParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 events components obj type Uid delete params +func (o *V1EventsComponentsObjTypeUIDDeleteParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 events components obj type Uid delete params +func (o *V1EventsComponentsObjTypeUIDDeleteParams) WithHTTPClient(client *http.Client) *V1EventsComponentsObjTypeUIDDeleteParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 events components obj type Uid delete params +func (o *V1EventsComponentsObjTypeUIDDeleteParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithObjectKind adds the objectKind to the v1 events components obj type Uid delete params +func (o *V1EventsComponentsObjTypeUIDDeleteParams) WithObjectKind(objectKind string) *V1EventsComponentsObjTypeUIDDeleteParams { + o.SetObjectKind(objectKind) + return o +} + +// SetObjectKind adds the objectKind to the v1 events components obj type Uid delete params +func (o *V1EventsComponentsObjTypeUIDDeleteParams) SetObjectKind(objectKind string) { + o.ObjectKind = objectKind +} + +// WithObjectUID adds the objectUID to the v1 events components obj type Uid delete params +func (o *V1EventsComponentsObjTypeUIDDeleteParams) WithObjectUID(objectUID string) *V1EventsComponentsObjTypeUIDDeleteParams { + o.SetObjectUID(objectUID) + return o +} + +// SetObjectUID adds the objectUid to the v1 events components obj type Uid delete params +func (o *V1EventsComponentsObjTypeUIDDeleteParams) SetObjectUID(objectUID string) { + o.ObjectUID = objectUID +} + +// WriteToRequest writes these params to a swagger request +func (o *V1EventsComponentsObjTypeUIDDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param objectKind + if err := r.SetPathParam("objectKind", o.ObjectKind); err != nil { + return err + } + + // path param objectUid + if err := r.SetPathParam("objectUid", o.ObjectUID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_events_components_obj_type_uid_delete_responses.go b/api/client/v1/v1_events_components_obj_type_uid_delete_responses.go new file mode 100644 index 00000000..9e9efa3d --- /dev/null +++ b/api/client/v1/v1_events_components_obj_type_uid_delete_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1EventsComponentsObjTypeUIDDeleteReader is a Reader for the V1EventsComponentsObjTypeUIDDelete structure. +type V1EventsComponentsObjTypeUIDDeleteReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1EventsComponentsObjTypeUIDDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1EventsComponentsObjTypeUIDDeleteNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1EventsComponentsObjTypeUIDDeleteNoContent creates a V1EventsComponentsObjTypeUIDDeleteNoContent with default headers values +func NewV1EventsComponentsObjTypeUIDDeleteNoContent() *V1EventsComponentsObjTypeUIDDeleteNoContent { + return &V1EventsComponentsObjTypeUIDDeleteNoContent{} +} + +/* +V1EventsComponentsObjTypeUIDDeleteNoContent handles this case with default header values. + +The resource was deleted successfully +*/ +type V1EventsComponentsObjTypeUIDDeleteNoContent struct { +} + +func (o *V1EventsComponentsObjTypeUIDDeleteNoContent) Error() string { + return fmt.Sprintf("[DELETE /v1/events/components/{objectKind}/{objectUid}][%d] v1EventsComponentsObjTypeUidDeleteNoContent ", 204) +} + +func (o *V1EventsComponentsObjTypeUIDDeleteNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_events_components_obj_type_uid_list_parameters.go b/api/client/v1/v1_events_components_obj_type_uid_list_parameters.go new file mode 100644 index 00000000..dcf636c0 --- /dev/null +++ b/api/client/v1/v1_events_components_obj_type_uid_list_parameters.go @@ -0,0 +1,365 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// NewV1EventsComponentsObjTypeUIDListParams creates a new V1EventsComponentsObjTypeUIDListParams object +// with the default values initialized. +func NewV1EventsComponentsObjTypeUIDListParams() *V1EventsComponentsObjTypeUIDListParams { + var ( + limitDefault = int64(50) + ) + return &V1EventsComponentsObjTypeUIDListParams{ + Limit: &limitDefault, + + timeout: cr.DefaultTimeout, + } +} + +// NewV1EventsComponentsObjTypeUIDListParamsWithTimeout creates a new V1EventsComponentsObjTypeUIDListParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1EventsComponentsObjTypeUIDListParamsWithTimeout(timeout time.Duration) *V1EventsComponentsObjTypeUIDListParams { + var ( + limitDefault = int64(50) + ) + return &V1EventsComponentsObjTypeUIDListParams{ + Limit: &limitDefault, + + timeout: timeout, + } +} + +// NewV1EventsComponentsObjTypeUIDListParamsWithContext creates a new V1EventsComponentsObjTypeUIDListParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1EventsComponentsObjTypeUIDListParamsWithContext(ctx context.Context) *V1EventsComponentsObjTypeUIDListParams { + var ( + limitDefault = int64(50) + ) + return &V1EventsComponentsObjTypeUIDListParams{ + Limit: &limitDefault, + + Context: ctx, + } +} + +// NewV1EventsComponentsObjTypeUIDListParamsWithHTTPClient creates a new V1EventsComponentsObjTypeUIDListParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1EventsComponentsObjTypeUIDListParamsWithHTTPClient(client *http.Client) *V1EventsComponentsObjTypeUIDListParams { + var ( + limitDefault = int64(50) + ) + return &V1EventsComponentsObjTypeUIDListParams{ + Limit: &limitDefault, + HTTPClient: client, + } +} + +/* +V1EventsComponentsObjTypeUIDListParams contains all the parameters to send to the API endpoint +for the v1 events components obj type Uid list operation typically these are written to a http.Request +*/ +type V1EventsComponentsObjTypeUIDListParams struct { + + /*Continue + continue token to paginate the subsequent data items + + */ + Continue *string + /*Fields + Set of fields to be presented in the response with values. The fields are comma separated. Eg: metadata.uid,metadata.name + + */ + Fields *string + /*Filters + Filters can be combined with AND, OR operators with field path name. Eg: metadata.name=TestServiceANDspec.cloudType=aws + + Server will be restricted to certain fields based on the indexed data for each resource. + + */ + Filters *string + /*Limit + limit is a maximum number of responses to return for a list call. Default and maximum value of the limit is 50. + If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. + + */ + Limit *int64 + /*ObjectKind + Describes the related object uid for which events has to be fetched + + */ + ObjectKind string + /*ObjectUID + Describes the related object kind for which events has to be fetched + + */ + ObjectUID string + /*Offset + offset is the next index number from which the response will start. The response offset value can be used along with continue token for the pagination. + + */ + Offset *int64 + /*OrderBy + Specify the fields with sort order. 1 indicates ascending and -1 for descending. Eg: orderBy=metadata.name=1,metadata.uid=-1 + + */ + OrderBy *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 events components obj type Uid list params +func (o *V1EventsComponentsObjTypeUIDListParams) WithTimeout(timeout time.Duration) *V1EventsComponentsObjTypeUIDListParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 events components obj type Uid list params +func (o *V1EventsComponentsObjTypeUIDListParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 events components obj type Uid list params +func (o *V1EventsComponentsObjTypeUIDListParams) WithContext(ctx context.Context) *V1EventsComponentsObjTypeUIDListParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 events components obj type Uid list params +func (o *V1EventsComponentsObjTypeUIDListParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 events components obj type Uid list params +func (o *V1EventsComponentsObjTypeUIDListParams) WithHTTPClient(client *http.Client) *V1EventsComponentsObjTypeUIDListParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 events components obj type Uid list params +func (o *V1EventsComponentsObjTypeUIDListParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithContinue adds the continueVar to the v1 events components obj type Uid list params +func (o *V1EventsComponentsObjTypeUIDListParams) WithContinue(continueVar *string) *V1EventsComponentsObjTypeUIDListParams { + o.SetContinue(continueVar) + return o +} + +// SetContinue adds the continue to the v1 events components obj type Uid list params +func (o *V1EventsComponentsObjTypeUIDListParams) SetContinue(continueVar *string) { + o.Continue = continueVar +} + +// WithFields adds the fields to the v1 events components obj type Uid list params +func (o *V1EventsComponentsObjTypeUIDListParams) WithFields(fields *string) *V1EventsComponentsObjTypeUIDListParams { + o.SetFields(fields) + return o +} + +// SetFields adds the fields to the v1 events components obj type Uid list params +func (o *V1EventsComponentsObjTypeUIDListParams) SetFields(fields *string) { + o.Fields = fields +} + +// WithFilters adds the filters to the v1 events components obj type Uid list params +func (o *V1EventsComponentsObjTypeUIDListParams) WithFilters(filters *string) *V1EventsComponentsObjTypeUIDListParams { + o.SetFilters(filters) + return o +} + +// SetFilters adds the filters to the v1 events components obj type Uid list params +func (o *V1EventsComponentsObjTypeUIDListParams) SetFilters(filters *string) { + o.Filters = filters +} + +// WithLimit adds the limit to the v1 events components obj type Uid list params +func (o *V1EventsComponentsObjTypeUIDListParams) WithLimit(limit *int64) *V1EventsComponentsObjTypeUIDListParams { + o.SetLimit(limit) + return o +} + +// SetLimit adds the limit to the v1 events components obj type Uid list params +func (o *V1EventsComponentsObjTypeUIDListParams) SetLimit(limit *int64) { + o.Limit = limit +} + +// WithObjectKind adds the objectKind to the v1 events components obj type Uid list params +func (o *V1EventsComponentsObjTypeUIDListParams) WithObjectKind(objectKind string) *V1EventsComponentsObjTypeUIDListParams { + o.SetObjectKind(objectKind) + return o +} + +// SetObjectKind adds the objectKind to the v1 events components obj type Uid list params +func (o *V1EventsComponentsObjTypeUIDListParams) SetObjectKind(objectKind string) { + o.ObjectKind = objectKind +} + +// WithObjectUID adds the objectUID to the v1 events components obj type Uid list params +func (o *V1EventsComponentsObjTypeUIDListParams) WithObjectUID(objectUID string) *V1EventsComponentsObjTypeUIDListParams { + o.SetObjectUID(objectUID) + return o +} + +// SetObjectUID adds the objectUid to the v1 events components obj type Uid list params +func (o *V1EventsComponentsObjTypeUIDListParams) SetObjectUID(objectUID string) { + o.ObjectUID = objectUID +} + +// WithOffset adds the offset to the v1 events components obj type Uid list params +func (o *V1EventsComponentsObjTypeUIDListParams) WithOffset(offset *int64) *V1EventsComponentsObjTypeUIDListParams { + o.SetOffset(offset) + return o +} + +// SetOffset adds the offset to the v1 events components obj type Uid list params +func (o *V1EventsComponentsObjTypeUIDListParams) SetOffset(offset *int64) { + o.Offset = offset +} + +// WithOrderBy adds the orderBy to the v1 events components obj type Uid list params +func (o *V1EventsComponentsObjTypeUIDListParams) WithOrderBy(orderBy *string) *V1EventsComponentsObjTypeUIDListParams { + o.SetOrderBy(orderBy) + return o +} + +// SetOrderBy adds the orderBy to the v1 events components obj type Uid list params +func (o *V1EventsComponentsObjTypeUIDListParams) SetOrderBy(orderBy *string) { + o.OrderBy = orderBy +} + +// WriteToRequest writes these params to a swagger request +func (o *V1EventsComponentsObjTypeUIDListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Continue != nil { + + // query param continue + var qrContinue string + if o.Continue != nil { + qrContinue = *o.Continue + } + qContinue := qrContinue + if qContinue != "" { + if err := r.SetQueryParam("continue", qContinue); err != nil { + return err + } + } + + } + + if o.Fields != nil { + + // query param fields + var qrFields string + if o.Fields != nil { + qrFields = *o.Fields + } + qFields := qrFields + if qFields != "" { + if err := r.SetQueryParam("fields", qFields); err != nil { + return err + } + } + + } + + if o.Filters != nil { + + // query param filters + var qrFilters string + if o.Filters != nil { + qrFilters = *o.Filters + } + qFilters := qrFilters + if qFilters != "" { + if err := r.SetQueryParam("filters", qFilters); err != nil { + return err + } + } + + } + + if o.Limit != nil { + + // query param limit + var qrLimit int64 + if o.Limit != nil { + qrLimit = *o.Limit + } + qLimit := swag.FormatInt64(qrLimit) + if qLimit != "" { + if err := r.SetQueryParam("limit", qLimit); err != nil { + return err + } + } + + } + + // path param objectKind + if err := r.SetPathParam("objectKind", o.ObjectKind); err != nil { + return err + } + + // path param objectUid + if err := r.SetPathParam("objectUid", o.ObjectUID); err != nil { + return err + } + + if o.Offset != nil { + + // query param offset + var qrOffset int64 + if o.Offset != nil { + qrOffset = *o.Offset + } + qOffset := swag.FormatInt64(qrOffset) + if qOffset != "" { + if err := r.SetQueryParam("offset", qOffset); err != nil { + return err + } + } + + } + + if o.OrderBy != nil { + + // query param orderBy + var qrOrderBy string + if o.OrderBy != nil { + qrOrderBy = *o.OrderBy + } + qOrderBy := qrOrderBy + if qOrderBy != "" { + if err := r.SetQueryParam("orderBy", qOrderBy); err != nil { + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_events_components_obj_type_uid_list_responses.go b/api/client/v1/v1_events_components_obj_type_uid_list_responses.go new file mode 100644 index 00000000..ebb2c74f --- /dev/null +++ b/api/client/v1/v1_events_components_obj_type_uid_list_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1EventsComponentsObjTypeUIDListReader is a Reader for the V1EventsComponentsObjTypeUIDList structure. +type V1EventsComponentsObjTypeUIDListReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1EventsComponentsObjTypeUIDListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1EventsComponentsObjTypeUIDListOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1EventsComponentsObjTypeUIDListOK creates a V1EventsComponentsObjTypeUIDListOK with default headers values +func NewV1EventsComponentsObjTypeUIDListOK() *V1EventsComponentsObjTypeUIDListOK { + return &V1EventsComponentsObjTypeUIDListOK{} +} + +/* +V1EventsComponentsObjTypeUIDListOK handles this case with default header values. + +An array of component event items +*/ +type V1EventsComponentsObjTypeUIDListOK struct { + Payload *models.V1Events +} + +func (o *V1EventsComponentsObjTypeUIDListOK) Error() string { + return fmt.Sprintf("[GET /v1/events/components/{objectKind}/{objectUid}][%d] v1EventsComponentsObjTypeUidListOK %+v", 200, o.Payload) +} + +func (o *V1EventsComponentsObjTypeUIDListOK) GetPayload() *models.V1Events { + return o.Payload +} + +func (o *V1EventsComponentsObjTypeUIDListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1Events) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_features_list_parameters.go b/api/client/v1/v1_features_list_parameters.go new file mode 100644 index 00000000..25f8e302 --- /dev/null +++ b/api/client/v1/v1_features_list_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1FeaturesListParams creates a new V1FeaturesListParams object +// with the default values initialized. +func NewV1FeaturesListParams() *V1FeaturesListParams { + + return &V1FeaturesListParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1FeaturesListParamsWithTimeout creates a new V1FeaturesListParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1FeaturesListParamsWithTimeout(timeout time.Duration) *V1FeaturesListParams { + + return &V1FeaturesListParams{ + + timeout: timeout, + } +} + +// NewV1FeaturesListParamsWithContext creates a new V1FeaturesListParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1FeaturesListParamsWithContext(ctx context.Context) *V1FeaturesListParams { + + return &V1FeaturesListParams{ + + Context: ctx, + } +} + +// NewV1FeaturesListParamsWithHTTPClient creates a new V1FeaturesListParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1FeaturesListParamsWithHTTPClient(client *http.Client) *V1FeaturesListParams { + + return &V1FeaturesListParams{ + HTTPClient: client, + } +} + +/* +V1FeaturesListParams contains all the parameters to send to the API endpoint +for the v1 features list operation typically these are written to a http.Request +*/ +type V1FeaturesListParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 features list params +func (o *V1FeaturesListParams) WithTimeout(timeout time.Duration) *V1FeaturesListParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 features list params +func (o *V1FeaturesListParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 features list params +func (o *V1FeaturesListParams) WithContext(ctx context.Context) *V1FeaturesListParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 features list params +func (o *V1FeaturesListParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 features list params +func (o *V1FeaturesListParams) WithHTTPClient(client *http.Client) *V1FeaturesListParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 features list params +func (o *V1FeaturesListParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *V1FeaturesListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_features_list_responses.go b/api/client/v1/v1_features_list_responses.go new file mode 100644 index 00000000..5e2e7dc7 --- /dev/null +++ b/api/client/v1/v1_features_list_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1FeaturesListReader is a Reader for the V1FeaturesList structure. +type V1FeaturesListReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1FeaturesListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1FeaturesListOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1FeaturesListOK creates a V1FeaturesListOK with default headers values +func NewV1FeaturesListOK() *V1FeaturesListOK { + return &V1FeaturesListOK{} +} + +/* +V1FeaturesListOK handles this case with default header values. + +OK +*/ +type V1FeaturesListOK struct { + Payload *models.V1Features +} + +func (o *V1FeaturesListOK) Error() string { + return fmt.Sprintf("[GET /v1/features][%d] v1FeaturesListOK %+v", 200, o.Payload) +} + +func (o *V1FeaturesListOK) GetPayload() *models.V1Features { + return o.Payload +} + +func (o *V1FeaturesListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1Features) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_features_update_parameters.go b/api/client/v1/v1_features_update_parameters.go new file mode 100644 index 00000000..6d17aa54 --- /dev/null +++ b/api/client/v1/v1_features_update_parameters.go @@ -0,0 +1,157 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1FeaturesUpdateParams creates a new V1FeaturesUpdateParams object +// with the default values initialized. +func NewV1FeaturesUpdateParams() *V1FeaturesUpdateParams { + var () + return &V1FeaturesUpdateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1FeaturesUpdateParamsWithTimeout creates a new V1FeaturesUpdateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1FeaturesUpdateParamsWithTimeout(timeout time.Duration) *V1FeaturesUpdateParams { + var () + return &V1FeaturesUpdateParams{ + + timeout: timeout, + } +} + +// NewV1FeaturesUpdateParamsWithContext creates a new V1FeaturesUpdateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1FeaturesUpdateParamsWithContext(ctx context.Context) *V1FeaturesUpdateParams { + var () + return &V1FeaturesUpdateParams{ + + Context: ctx, + } +} + +// NewV1FeaturesUpdateParamsWithHTTPClient creates a new V1FeaturesUpdateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1FeaturesUpdateParamsWithHTTPClient(client *http.Client) *V1FeaturesUpdateParams { + var () + return &V1FeaturesUpdateParams{ + HTTPClient: client, + } +} + +/* +V1FeaturesUpdateParams contains all the parameters to send to the API endpoint +for the v1 features update operation typically these are written to a http.Request +*/ +type V1FeaturesUpdateParams struct { + + /*Body*/ + Body *models.V1FeatureUpdate + /*UID + Specify the feature uid + + */ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 features update params +func (o *V1FeaturesUpdateParams) WithTimeout(timeout time.Duration) *V1FeaturesUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 features update params +func (o *V1FeaturesUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 features update params +func (o *V1FeaturesUpdateParams) WithContext(ctx context.Context) *V1FeaturesUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 features update params +func (o *V1FeaturesUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 features update params +func (o *V1FeaturesUpdateParams) WithHTTPClient(client *http.Client) *V1FeaturesUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 features update params +func (o *V1FeaturesUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 features update params +func (o *V1FeaturesUpdateParams) WithBody(body *models.V1FeatureUpdate) *V1FeaturesUpdateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 features update params +func (o *V1FeaturesUpdateParams) SetBody(body *models.V1FeatureUpdate) { + o.Body = body +} + +// WithUID adds the uid to the v1 features update params +func (o *V1FeaturesUpdateParams) WithUID(uid string) *V1FeaturesUpdateParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 features update params +func (o *V1FeaturesUpdateParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1FeaturesUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_features_update_responses.go b/api/client/v1/v1_features_update_responses.go new file mode 100644 index 00000000..21eaf6e8 --- /dev/null +++ b/api/client/v1/v1_features_update_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1FeaturesUpdateReader is a Reader for the V1FeaturesUpdate structure. +type V1FeaturesUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1FeaturesUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1FeaturesUpdateNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1FeaturesUpdateNoContent creates a V1FeaturesUpdateNoContent with default headers values +func NewV1FeaturesUpdateNoContent() *V1FeaturesUpdateNoContent { + return &V1FeaturesUpdateNoContent{} +} + +/* +V1FeaturesUpdateNoContent handles this case with default header values. + +The resource was updated successfully +*/ +type V1FeaturesUpdateNoContent struct { +} + +func (o *V1FeaturesUpdateNoContent) Error() string { + return fmt.Sprintf("[PUT /v1/features/{uid}][%d] v1FeaturesUpdateNoContent ", 204) +} + +func (o *V1FeaturesUpdateNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_filters_list_parameters.go b/api/client/v1/v1_filters_list_parameters.go new file mode 100644 index 00000000..42c630d2 --- /dev/null +++ b/api/client/v1/v1_filters_list_parameters.go @@ -0,0 +1,225 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// NewV1FiltersListParams creates a new V1FiltersListParams object +// with the default values initialized. +func NewV1FiltersListParams() *V1FiltersListParams { + var ( + limitDefault = int64(50) + ) + return &V1FiltersListParams{ + Limit: &limitDefault, + + timeout: cr.DefaultTimeout, + } +} + +// NewV1FiltersListParamsWithTimeout creates a new V1FiltersListParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1FiltersListParamsWithTimeout(timeout time.Duration) *V1FiltersListParams { + var ( + limitDefault = int64(50) + ) + return &V1FiltersListParams{ + Limit: &limitDefault, + + timeout: timeout, + } +} + +// NewV1FiltersListParamsWithContext creates a new V1FiltersListParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1FiltersListParamsWithContext(ctx context.Context) *V1FiltersListParams { + var ( + limitDefault = int64(50) + ) + return &V1FiltersListParams{ + Limit: &limitDefault, + + Context: ctx, + } +} + +// NewV1FiltersListParamsWithHTTPClient creates a new V1FiltersListParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1FiltersListParamsWithHTTPClient(client *http.Client) *V1FiltersListParams { + var ( + limitDefault = int64(50) + ) + return &V1FiltersListParams{ + Limit: &limitDefault, + HTTPClient: client, + } +} + +/* +V1FiltersListParams contains all the parameters to send to the API endpoint +for the v1 filters list operation typically these are written to a http.Request +*/ +type V1FiltersListParams struct { + + /*Continue + continue token to paginate the subsequent data items + + */ + Continue *string + /*Limit + limit is a maximum number of responses to return for a list call. Default and maximum value of the limit is 50. + If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. + + */ + Limit *int64 + /*Offset + offset is the next index number from which the response will start. The response offset value can be used along with continue token for the pagination. + + */ + Offset *int64 + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 filters list params +func (o *V1FiltersListParams) WithTimeout(timeout time.Duration) *V1FiltersListParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 filters list params +func (o *V1FiltersListParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 filters list params +func (o *V1FiltersListParams) WithContext(ctx context.Context) *V1FiltersListParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 filters list params +func (o *V1FiltersListParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 filters list params +func (o *V1FiltersListParams) WithHTTPClient(client *http.Client) *V1FiltersListParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 filters list params +func (o *V1FiltersListParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithContinue adds the continueVar to the v1 filters list params +func (o *V1FiltersListParams) WithContinue(continueVar *string) *V1FiltersListParams { + o.SetContinue(continueVar) + return o +} + +// SetContinue adds the continue to the v1 filters list params +func (o *V1FiltersListParams) SetContinue(continueVar *string) { + o.Continue = continueVar +} + +// WithLimit adds the limit to the v1 filters list params +func (o *V1FiltersListParams) WithLimit(limit *int64) *V1FiltersListParams { + o.SetLimit(limit) + return o +} + +// SetLimit adds the limit to the v1 filters list params +func (o *V1FiltersListParams) SetLimit(limit *int64) { + o.Limit = limit +} + +// WithOffset adds the offset to the v1 filters list params +func (o *V1FiltersListParams) WithOffset(offset *int64) *V1FiltersListParams { + o.SetOffset(offset) + return o +} + +// SetOffset adds the offset to the v1 filters list params +func (o *V1FiltersListParams) SetOffset(offset *int64) { + o.Offset = offset +} + +// WriteToRequest writes these params to a swagger request +func (o *V1FiltersListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Continue != nil { + + // query param continue + var qrContinue string + if o.Continue != nil { + qrContinue = *o.Continue + } + qContinue := qrContinue + if qContinue != "" { + if err := r.SetQueryParam("continue", qContinue); err != nil { + return err + } + } + + } + + if o.Limit != nil { + + // query param limit + var qrLimit int64 + if o.Limit != nil { + qrLimit = *o.Limit + } + qLimit := swag.FormatInt64(qrLimit) + if qLimit != "" { + if err := r.SetQueryParam("limit", qLimit); err != nil { + return err + } + } + + } + + if o.Offset != nil { + + // query param offset + var qrOffset int64 + if o.Offset != nil { + qrOffset = *o.Offset + } + qOffset := swag.FormatInt64(qrOffset) + if qOffset != "" { + if err := r.SetQueryParam("offset", qOffset); err != nil { + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_filters_list_responses.go b/api/client/v1/v1_filters_list_responses.go new file mode 100644 index 00000000..923147bd --- /dev/null +++ b/api/client/v1/v1_filters_list_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1FiltersListReader is a Reader for the V1FiltersList structure. +type V1FiltersListReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1FiltersListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1FiltersListOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1FiltersListOK creates a V1FiltersListOK with default headers values +func NewV1FiltersListOK() *V1FiltersListOK { + return &V1FiltersListOK{} +} + +/* +V1FiltersListOK handles this case with default header values. + +An array of filters +*/ +type V1FiltersListOK struct { + Payload *models.V1FiltersSummary +} + +func (o *V1FiltersListOK) Error() string { + return fmt.Sprintf("[GET /v1/filters][%d] v1FiltersListOK %+v", 200, o.Payload) +} + +func (o *V1FiltersListOK) GetPayload() *models.V1FiltersSummary { + return o.Payload +} + +func (o *V1FiltersListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1FiltersSummary) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_filters_metadata_parameters.go b/api/client/v1/v1_filters_metadata_parameters.go new file mode 100644 index 00000000..2d4fc8db --- /dev/null +++ b/api/client/v1/v1_filters_metadata_parameters.go @@ -0,0 +1,147 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1FiltersMetadataParams creates a new V1FiltersMetadataParams object +// with the default values initialized. +func NewV1FiltersMetadataParams() *V1FiltersMetadataParams { + var () + return &V1FiltersMetadataParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1FiltersMetadataParamsWithTimeout creates a new V1FiltersMetadataParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1FiltersMetadataParamsWithTimeout(timeout time.Duration) *V1FiltersMetadataParams { + var () + return &V1FiltersMetadataParams{ + + timeout: timeout, + } +} + +// NewV1FiltersMetadataParamsWithContext creates a new V1FiltersMetadataParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1FiltersMetadataParamsWithContext(ctx context.Context) *V1FiltersMetadataParams { + var () + return &V1FiltersMetadataParams{ + + Context: ctx, + } +} + +// NewV1FiltersMetadataParamsWithHTTPClient creates a new V1FiltersMetadataParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1FiltersMetadataParamsWithHTTPClient(client *http.Client) *V1FiltersMetadataParams { + var () + return &V1FiltersMetadataParams{ + HTTPClient: client, + } +} + +/* +V1FiltersMetadataParams contains all the parameters to send to the API endpoint +for the v1 filters metadata operation typically these are written to a http.Request +*/ +type V1FiltersMetadataParams struct { + + /*FilterType + filterType can be - [tag, meta, resource] + + */ + FilterType *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 filters metadata params +func (o *V1FiltersMetadataParams) WithTimeout(timeout time.Duration) *V1FiltersMetadataParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 filters metadata params +func (o *V1FiltersMetadataParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 filters metadata params +func (o *V1FiltersMetadataParams) WithContext(ctx context.Context) *V1FiltersMetadataParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 filters metadata params +func (o *V1FiltersMetadataParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 filters metadata params +func (o *V1FiltersMetadataParams) WithHTTPClient(client *http.Client) *V1FiltersMetadataParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 filters metadata params +func (o *V1FiltersMetadataParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithFilterType adds the filterType to the v1 filters metadata params +func (o *V1FiltersMetadataParams) WithFilterType(filterType *string) *V1FiltersMetadataParams { + o.SetFilterType(filterType) + return o +} + +// SetFilterType adds the filterType to the v1 filters metadata params +func (o *V1FiltersMetadataParams) SetFilterType(filterType *string) { + o.FilterType = filterType +} + +// WriteToRequest writes these params to a swagger request +func (o *V1FiltersMetadataParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.FilterType != nil { + + // query param filterType + var qrFilterType string + if o.FilterType != nil { + qrFilterType = *o.FilterType + } + qFilterType := qrFilterType + if qFilterType != "" { + if err := r.SetQueryParam("filterType", qFilterType); err != nil { + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_filters_metadata_responses.go b/api/client/v1/v1_filters_metadata_responses.go new file mode 100644 index 00000000..870d4628 --- /dev/null +++ b/api/client/v1/v1_filters_metadata_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1FiltersMetadataReader is a Reader for the V1FiltersMetadata structure. +type V1FiltersMetadataReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1FiltersMetadataReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1FiltersMetadataOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1FiltersMetadataOK creates a V1FiltersMetadataOK with default headers values +func NewV1FiltersMetadataOK() *V1FiltersMetadataOK { + return &V1FiltersMetadataOK{} +} + +/* +V1FiltersMetadataOK handles this case with default header values. + +An array of filters +*/ +type V1FiltersMetadataOK struct { + Payload *models.V1FiltersMetadata +} + +func (o *V1FiltersMetadataOK) Error() string { + return fmt.Sprintf("[GET /v1/filters/metadata][%d] v1FiltersMetadataOK %+v", 200, o.Payload) +} + +func (o *V1FiltersMetadataOK) GetPayload() *models.V1FiltersMetadata { + return o.Payload +} + +func (o *V1FiltersMetadataOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1FiltersMetadata) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_gcp_account_validate_parameters.go b/api/client/v1/v1_gcp_account_validate_parameters.go new file mode 100644 index 00000000..488a000d --- /dev/null +++ b/api/client/v1/v1_gcp_account_validate_parameters.go @@ -0,0 +1,139 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1GcpAccountValidateParams creates a new V1GcpAccountValidateParams object +// with the default values initialized. +func NewV1GcpAccountValidateParams() *V1GcpAccountValidateParams { + var () + return &V1GcpAccountValidateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1GcpAccountValidateParamsWithTimeout creates a new V1GcpAccountValidateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1GcpAccountValidateParamsWithTimeout(timeout time.Duration) *V1GcpAccountValidateParams { + var () + return &V1GcpAccountValidateParams{ + + timeout: timeout, + } +} + +// NewV1GcpAccountValidateParamsWithContext creates a new V1GcpAccountValidateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1GcpAccountValidateParamsWithContext(ctx context.Context) *V1GcpAccountValidateParams { + var () + return &V1GcpAccountValidateParams{ + + Context: ctx, + } +} + +// NewV1GcpAccountValidateParamsWithHTTPClient creates a new V1GcpAccountValidateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1GcpAccountValidateParamsWithHTTPClient(client *http.Client) *V1GcpAccountValidateParams { + var () + return &V1GcpAccountValidateParams{ + HTTPClient: client, + } +} + +/* +V1GcpAccountValidateParams contains all the parameters to send to the API endpoint +for the v1 gcp account validate operation typically these are written to a http.Request +*/ +type V1GcpAccountValidateParams struct { + + /*GcpCloudAccount + Uid for the specific GCP cloud account + + */ + GcpCloudAccount *models.V1GcpCloudAccountValidateEntity + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 gcp account validate params +func (o *V1GcpAccountValidateParams) WithTimeout(timeout time.Duration) *V1GcpAccountValidateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 gcp account validate params +func (o *V1GcpAccountValidateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 gcp account validate params +func (o *V1GcpAccountValidateParams) WithContext(ctx context.Context) *V1GcpAccountValidateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 gcp account validate params +func (o *V1GcpAccountValidateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 gcp account validate params +func (o *V1GcpAccountValidateParams) WithHTTPClient(client *http.Client) *V1GcpAccountValidateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 gcp account validate params +func (o *V1GcpAccountValidateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithGcpCloudAccount adds the gcpCloudAccount to the v1 gcp account validate params +func (o *V1GcpAccountValidateParams) WithGcpCloudAccount(gcpCloudAccount *models.V1GcpCloudAccountValidateEntity) *V1GcpAccountValidateParams { + o.SetGcpCloudAccount(gcpCloudAccount) + return o +} + +// SetGcpCloudAccount adds the gcpCloudAccount to the v1 gcp account validate params +func (o *V1GcpAccountValidateParams) SetGcpCloudAccount(gcpCloudAccount *models.V1GcpCloudAccountValidateEntity) { + o.GcpCloudAccount = gcpCloudAccount +} + +// WriteToRequest writes these params to a swagger request +func (o *V1GcpAccountValidateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.GcpCloudAccount != nil { + if err := r.SetBodyParam(o.GcpCloudAccount); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_gcp_account_validate_responses.go b/api/client/v1/v1_gcp_account_validate_responses.go new file mode 100644 index 00000000..21f09639 --- /dev/null +++ b/api/client/v1/v1_gcp_account_validate_responses.go @@ -0,0 +1,61 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1GcpAccountValidateReader is a Reader for the V1GcpAccountValidate structure. +type V1GcpAccountValidateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1GcpAccountValidateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1GcpAccountValidateNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1GcpAccountValidateNoContent creates a V1GcpAccountValidateNoContent with default headers values +func NewV1GcpAccountValidateNoContent() *V1GcpAccountValidateNoContent { + return &V1GcpAccountValidateNoContent{} +} + +/* +V1GcpAccountValidateNoContent handles this case with default header values. + +Ok response without content +*/ +type V1GcpAccountValidateNoContent struct { + /*Audit uid for the request + */ + AuditUID string +} + +func (o *V1GcpAccountValidateNoContent) Error() string { + return fmt.Sprintf("[POST /v1/clouds/gcp/account/validate][%d] v1GcpAccountValidateNoContent ", 204) +} + +func (o *V1GcpAccountValidateNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header AuditUid + o.AuditUID = response.GetHeader("AuditUid") + + return nil +} diff --git a/api/client/v1/v1_gcp_availability_zones_parameters.go b/api/client/v1/v1_gcp_availability_zones_parameters.go new file mode 100644 index 00000000..48d266f1 --- /dev/null +++ b/api/client/v1/v1_gcp_availability_zones_parameters.go @@ -0,0 +1,161 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1GcpAvailabilityZonesParams creates a new V1GcpAvailabilityZonesParams object +// with the default values initialized. +func NewV1GcpAvailabilityZonesParams() *V1GcpAvailabilityZonesParams { + var () + return &V1GcpAvailabilityZonesParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1GcpAvailabilityZonesParamsWithTimeout creates a new V1GcpAvailabilityZonesParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1GcpAvailabilityZonesParamsWithTimeout(timeout time.Duration) *V1GcpAvailabilityZonesParams { + var () + return &V1GcpAvailabilityZonesParams{ + + timeout: timeout, + } +} + +// NewV1GcpAvailabilityZonesParamsWithContext creates a new V1GcpAvailabilityZonesParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1GcpAvailabilityZonesParamsWithContext(ctx context.Context) *V1GcpAvailabilityZonesParams { + var () + return &V1GcpAvailabilityZonesParams{ + + Context: ctx, + } +} + +// NewV1GcpAvailabilityZonesParamsWithHTTPClient creates a new V1GcpAvailabilityZonesParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1GcpAvailabilityZonesParamsWithHTTPClient(client *http.Client) *V1GcpAvailabilityZonesParams { + var () + return &V1GcpAvailabilityZonesParams{ + HTTPClient: client, + } +} + +/* +V1GcpAvailabilityZonesParams contains all the parameters to send to the API endpoint +for the v1 gcp availability zones operation typically these are written to a http.Request +*/ +type V1GcpAvailabilityZonesParams struct { + + /*CloudAccountUID + Uid for the specific GCP cloud account + + */ + CloudAccountUID string + /*Project + Project Name for which GCP zones are requested + + */ + Project string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 gcp availability zones params +func (o *V1GcpAvailabilityZonesParams) WithTimeout(timeout time.Duration) *V1GcpAvailabilityZonesParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 gcp availability zones params +func (o *V1GcpAvailabilityZonesParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 gcp availability zones params +func (o *V1GcpAvailabilityZonesParams) WithContext(ctx context.Context) *V1GcpAvailabilityZonesParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 gcp availability zones params +func (o *V1GcpAvailabilityZonesParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 gcp availability zones params +func (o *V1GcpAvailabilityZonesParams) WithHTTPClient(client *http.Client) *V1GcpAvailabilityZonesParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 gcp availability zones params +func (o *V1GcpAvailabilityZonesParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithCloudAccountUID adds the cloudAccountUID to the v1 gcp availability zones params +func (o *V1GcpAvailabilityZonesParams) WithCloudAccountUID(cloudAccountUID string) *V1GcpAvailabilityZonesParams { + o.SetCloudAccountUID(cloudAccountUID) + return o +} + +// SetCloudAccountUID adds the cloudAccountUid to the v1 gcp availability zones params +func (o *V1GcpAvailabilityZonesParams) SetCloudAccountUID(cloudAccountUID string) { + o.CloudAccountUID = cloudAccountUID +} + +// WithProject adds the project to the v1 gcp availability zones params +func (o *V1GcpAvailabilityZonesParams) WithProject(project string) *V1GcpAvailabilityZonesParams { + o.SetProject(project) + return o +} + +// SetProject adds the project to the v1 gcp availability zones params +func (o *V1GcpAvailabilityZonesParams) SetProject(project string) { + o.Project = project +} + +// WriteToRequest writes these params to a swagger request +func (o *V1GcpAvailabilityZonesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // query param cloudAccountUid + qrCloudAccountUID := o.CloudAccountUID + qCloudAccountUID := qrCloudAccountUID + if qCloudAccountUID != "" { + if err := r.SetQueryParam("cloudAccountUid", qCloudAccountUID); err != nil { + return err + } + } + + // path param project + if err := r.SetPathParam("project", o.Project); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_gcp_availability_zones_responses.go b/api/client/v1/v1_gcp_availability_zones_responses.go new file mode 100644 index 00000000..c75452b8 --- /dev/null +++ b/api/client/v1/v1_gcp_availability_zones_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1GcpAvailabilityZonesReader is a Reader for the V1GcpAvailabilityZones structure. +type V1GcpAvailabilityZonesReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1GcpAvailabilityZonesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1GcpAvailabilityZonesOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1GcpAvailabilityZonesOK creates a V1GcpAvailabilityZonesOK with default headers values +func NewV1GcpAvailabilityZonesOK() *V1GcpAvailabilityZonesOK { + return &V1GcpAvailabilityZonesOK{} +} + +/* +V1GcpAvailabilityZonesOK handles this case with default header values. + +(empty) +*/ +type V1GcpAvailabilityZonesOK struct { + Payload *models.V1GcpZones +} + +func (o *V1GcpAvailabilityZonesOK) Error() string { + return fmt.Sprintf("[GET /v1/clouds/gcp/projects/{project}/zones][%d] v1GcpAvailabilityZonesOK %+v", 200, o.Payload) +} + +func (o *V1GcpAvailabilityZonesOK) GetPayload() *models.V1GcpZones { + return o.Payload +} + +func (o *V1GcpAvailabilityZonesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1GcpZones) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_gcp_az_validate_parameters.go b/api/client/v1/v1_gcp_az_validate_parameters.go new file mode 100644 index 00000000..2fa36778 --- /dev/null +++ b/api/client/v1/v1_gcp_az_validate_parameters.go @@ -0,0 +1,139 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1GcpAzValidateParams creates a new V1GcpAzValidateParams object +// with the default values initialized. +func NewV1GcpAzValidateParams() *V1GcpAzValidateParams { + var () + return &V1GcpAzValidateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1GcpAzValidateParamsWithTimeout creates a new V1GcpAzValidateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1GcpAzValidateParamsWithTimeout(timeout time.Duration) *V1GcpAzValidateParams { + var () + return &V1GcpAzValidateParams{ + + timeout: timeout, + } +} + +// NewV1GcpAzValidateParamsWithContext creates a new V1GcpAzValidateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1GcpAzValidateParamsWithContext(ctx context.Context) *V1GcpAzValidateParams { + var () + return &V1GcpAzValidateParams{ + + Context: ctx, + } +} + +// NewV1GcpAzValidateParamsWithHTTPClient creates a new V1GcpAzValidateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1GcpAzValidateParamsWithHTTPClient(client *http.Client) *V1GcpAzValidateParams { + var () + return &V1GcpAzValidateParams{ + HTTPClient: client, + } +} + +/* +V1GcpAzValidateParams contains all the parameters to send to the API endpoint +for the v1 gcp az validate operation typically these are written to a http.Request +*/ +type V1GcpAzValidateParams struct { + + /*Entity + Uid for the specific GCP cloud account + + */ + Entity *models.V1AzValidateEntity + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 gcp az validate params +func (o *V1GcpAzValidateParams) WithTimeout(timeout time.Duration) *V1GcpAzValidateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 gcp az validate params +func (o *V1GcpAzValidateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 gcp az validate params +func (o *V1GcpAzValidateParams) WithContext(ctx context.Context) *V1GcpAzValidateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 gcp az validate params +func (o *V1GcpAzValidateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 gcp az validate params +func (o *V1GcpAzValidateParams) WithHTTPClient(client *http.Client) *V1GcpAzValidateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 gcp az validate params +func (o *V1GcpAzValidateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithEntity adds the entity to the v1 gcp az validate params +func (o *V1GcpAzValidateParams) WithEntity(entity *models.V1AzValidateEntity) *V1GcpAzValidateParams { + o.SetEntity(entity) + return o +} + +// SetEntity adds the entity to the v1 gcp az validate params +func (o *V1GcpAzValidateParams) SetEntity(entity *models.V1AzValidateEntity) { + o.Entity = entity +} + +// WriteToRequest writes these params to a swagger request +func (o *V1GcpAzValidateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Entity != nil { + if err := r.SetBodyParam(o.Entity); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_gcp_az_validate_responses.go b/api/client/v1/v1_gcp_az_validate_responses.go new file mode 100644 index 00000000..0a78b693 --- /dev/null +++ b/api/client/v1/v1_gcp_az_validate_responses.go @@ -0,0 +1,61 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1GcpAzValidateReader is a Reader for the V1GcpAzValidate structure. +type V1GcpAzValidateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1GcpAzValidateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1GcpAzValidateNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1GcpAzValidateNoContent creates a V1GcpAzValidateNoContent with default headers values +func NewV1GcpAzValidateNoContent() *V1GcpAzValidateNoContent { + return &V1GcpAzValidateNoContent{} +} + +/* +V1GcpAzValidateNoContent handles this case with default header values. + +Ok response without content +*/ +type V1GcpAzValidateNoContent struct { + /*Audit uid for the request + */ + AuditUID string +} + +func (o *V1GcpAzValidateNoContent) Error() string { + return fmt.Sprintf("[POST /v1/clouds/gcp/azs/validate][%d] v1GcpAzValidateNoContent ", 204) +} + +func (o *V1GcpAzValidateNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header AuditUid + o.AuditUID = response.GetHeader("AuditUid") + + return nil +} diff --git a/api/client/v1/v1_gcp_bucket_name_validate_parameters.go b/api/client/v1/v1_gcp_bucket_name_validate_parameters.go new file mode 100644 index 00000000..3ed6ed25 --- /dev/null +++ b/api/client/v1/v1_gcp_bucket_name_validate_parameters.go @@ -0,0 +1,139 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1GcpBucketNameValidateParams creates a new V1GcpBucketNameValidateParams object +// with the default values initialized. +func NewV1GcpBucketNameValidateParams() *V1GcpBucketNameValidateParams { + var () + return &V1GcpBucketNameValidateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1GcpBucketNameValidateParamsWithTimeout creates a new V1GcpBucketNameValidateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1GcpBucketNameValidateParamsWithTimeout(timeout time.Duration) *V1GcpBucketNameValidateParams { + var () + return &V1GcpBucketNameValidateParams{ + + timeout: timeout, + } +} + +// NewV1GcpBucketNameValidateParamsWithContext creates a new V1GcpBucketNameValidateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1GcpBucketNameValidateParamsWithContext(ctx context.Context) *V1GcpBucketNameValidateParams { + var () + return &V1GcpBucketNameValidateParams{ + + Context: ctx, + } +} + +// NewV1GcpBucketNameValidateParamsWithHTTPClient creates a new V1GcpBucketNameValidateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1GcpBucketNameValidateParamsWithHTTPClient(client *http.Client) *V1GcpBucketNameValidateParams { + var () + return &V1GcpBucketNameValidateParams{ + HTTPClient: client, + } +} + +/* +V1GcpBucketNameValidateParams contains all the parameters to send to the API endpoint +for the v1 gcp bucket name validate operation typically these are written to a http.Request +*/ +type V1GcpBucketNameValidateParams struct { + + /*Body + Request payload for GCP account name validate + + */ + Body *models.V1GcpAccountNameValidateSpec + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 gcp bucket name validate params +func (o *V1GcpBucketNameValidateParams) WithTimeout(timeout time.Duration) *V1GcpBucketNameValidateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 gcp bucket name validate params +func (o *V1GcpBucketNameValidateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 gcp bucket name validate params +func (o *V1GcpBucketNameValidateParams) WithContext(ctx context.Context) *V1GcpBucketNameValidateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 gcp bucket name validate params +func (o *V1GcpBucketNameValidateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 gcp bucket name validate params +func (o *V1GcpBucketNameValidateParams) WithHTTPClient(client *http.Client) *V1GcpBucketNameValidateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 gcp bucket name validate params +func (o *V1GcpBucketNameValidateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 gcp bucket name validate params +func (o *V1GcpBucketNameValidateParams) WithBody(body *models.V1GcpAccountNameValidateSpec) *V1GcpBucketNameValidateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 gcp bucket name validate params +func (o *V1GcpBucketNameValidateParams) SetBody(body *models.V1GcpAccountNameValidateSpec) { + o.Body = body +} + +// WriteToRequest writes these params to a swagger request +func (o *V1GcpBucketNameValidateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_gcp_bucket_name_validate_responses.go b/api/client/v1/v1_gcp_bucket_name_validate_responses.go new file mode 100644 index 00000000..945298f8 --- /dev/null +++ b/api/client/v1/v1_gcp_bucket_name_validate_responses.go @@ -0,0 +1,61 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1GcpBucketNameValidateReader is a Reader for the V1GcpBucketNameValidate structure. +type V1GcpBucketNameValidateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1GcpBucketNameValidateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1GcpBucketNameValidateNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1GcpBucketNameValidateNoContent creates a V1GcpBucketNameValidateNoContent with default headers values +func NewV1GcpBucketNameValidateNoContent() *V1GcpBucketNameValidateNoContent { + return &V1GcpBucketNameValidateNoContent{} +} + +/* +V1GcpBucketNameValidateNoContent handles this case with default header values. + +Ok response without content +*/ +type V1GcpBucketNameValidateNoContent struct { + /*Audit uid for the request + */ + AuditUID string +} + +func (o *V1GcpBucketNameValidateNoContent) Error() string { + return fmt.Sprintf("[POST /v1/clouds/gcp/bucketname/validate][%d] v1GcpBucketNameValidateNoContent ", 204) +} + +func (o *V1GcpBucketNameValidateNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header AuditUid + o.AuditUID = response.GetHeader("AuditUid") + + return nil +} diff --git a/api/client/v1/v1_gcp_container_image_validate_parameters.go b/api/client/v1/v1_gcp_container_image_validate_parameters.go new file mode 100644 index 00000000..bd86e564 --- /dev/null +++ b/api/client/v1/v1_gcp_container_image_validate_parameters.go @@ -0,0 +1,165 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1GcpContainerImageValidateParams creates a new V1GcpContainerImageValidateParams object +// with the default values initialized. +func NewV1GcpContainerImageValidateParams() *V1GcpContainerImageValidateParams { + var () + return &V1GcpContainerImageValidateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1GcpContainerImageValidateParamsWithTimeout creates a new V1GcpContainerImageValidateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1GcpContainerImageValidateParamsWithTimeout(timeout time.Duration) *V1GcpContainerImageValidateParams { + var () + return &V1GcpContainerImageValidateParams{ + + timeout: timeout, + } +} + +// NewV1GcpContainerImageValidateParamsWithContext creates a new V1GcpContainerImageValidateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1GcpContainerImageValidateParamsWithContext(ctx context.Context) *V1GcpContainerImageValidateParams { + var () + return &V1GcpContainerImageValidateParams{ + + Context: ctx, + } +} + +// NewV1GcpContainerImageValidateParamsWithHTTPClient creates a new V1GcpContainerImageValidateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1GcpContainerImageValidateParamsWithHTTPClient(client *http.Client) *V1GcpContainerImageValidateParams { + var () + return &V1GcpContainerImageValidateParams{ + HTTPClient: client, + } +} + +/* +V1GcpContainerImageValidateParams contains all the parameters to send to the API endpoint +for the v1 gcp container image validate operation typically these are written to a http.Request +*/ +type V1GcpContainerImageValidateParams struct { + + /*ImagePath + image path in the container + + */ + ImagePath string + /*Tag + tag in the GCP container + + */ + Tag string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 gcp container image validate params +func (o *V1GcpContainerImageValidateParams) WithTimeout(timeout time.Duration) *V1GcpContainerImageValidateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 gcp container image validate params +func (o *V1GcpContainerImageValidateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 gcp container image validate params +func (o *V1GcpContainerImageValidateParams) WithContext(ctx context.Context) *V1GcpContainerImageValidateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 gcp container image validate params +func (o *V1GcpContainerImageValidateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 gcp container image validate params +func (o *V1GcpContainerImageValidateParams) WithHTTPClient(client *http.Client) *V1GcpContainerImageValidateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 gcp container image validate params +func (o *V1GcpContainerImageValidateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithImagePath adds the imagePath to the v1 gcp container image validate params +func (o *V1GcpContainerImageValidateParams) WithImagePath(imagePath string) *V1GcpContainerImageValidateParams { + o.SetImagePath(imagePath) + return o +} + +// SetImagePath adds the imagePath to the v1 gcp container image validate params +func (o *V1GcpContainerImageValidateParams) SetImagePath(imagePath string) { + o.ImagePath = imagePath +} + +// WithTag adds the tag to the v1 gcp container image validate params +func (o *V1GcpContainerImageValidateParams) WithTag(tag string) *V1GcpContainerImageValidateParams { + o.SetTag(tag) + return o +} + +// SetTag adds the tag to the v1 gcp container image validate params +func (o *V1GcpContainerImageValidateParams) SetTag(tag string) { + o.Tag = tag +} + +// WriteToRequest writes these params to a swagger request +func (o *V1GcpContainerImageValidateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // query param imagePath + qrImagePath := o.ImagePath + qImagePath := qrImagePath + if qImagePath != "" { + if err := r.SetQueryParam("imagePath", qImagePath); err != nil { + return err + } + } + + // query param tag + qrTag := o.Tag + qTag := qrTag + if qTag != "" { + if err := r.SetQueryParam("tag", qTag); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_gcp_container_image_validate_responses.go b/api/client/v1/v1_gcp_container_image_validate_responses.go new file mode 100644 index 00000000..e25cf62a --- /dev/null +++ b/api/client/v1/v1_gcp_container_image_validate_responses.go @@ -0,0 +1,61 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1GcpContainerImageValidateReader is a Reader for the V1GcpContainerImageValidate structure. +type V1GcpContainerImageValidateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1GcpContainerImageValidateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1GcpContainerImageValidateNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1GcpContainerImageValidateNoContent creates a V1GcpContainerImageValidateNoContent with default headers values +func NewV1GcpContainerImageValidateNoContent() *V1GcpContainerImageValidateNoContent { + return &V1GcpContainerImageValidateNoContent{} +} + +/* +V1GcpContainerImageValidateNoContent handles this case with default header values. + +Ok response without content +*/ +type V1GcpContainerImageValidateNoContent struct { + /*Audit uid for the request + */ + AuditUID string +} + +func (o *V1GcpContainerImageValidateNoContent) Error() string { + return fmt.Sprintf("[GET /v1/clouds/gcp/image/container/validate][%d] v1GcpContainerImageValidateNoContent ", 204) +} + +func (o *V1GcpContainerImageValidateNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header AuditUid + o.AuditUID = response.GetHeader("AuditUid") + + return nil +} diff --git a/api/client/v1/v1_gcp_image_url_parameters.go b/api/client/v1/v1_gcp_image_url_parameters.go new file mode 100644 index 00000000..4781e2c3 --- /dev/null +++ b/api/client/v1/v1_gcp_image_url_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1GcpImageURLParams creates a new V1GcpImageURLParams object +// with the default values initialized. +func NewV1GcpImageURLParams() *V1GcpImageURLParams { + var () + return &V1GcpImageURLParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1GcpImageURLParamsWithTimeout creates a new V1GcpImageURLParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1GcpImageURLParamsWithTimeout(timeout time.Duration) *V1GcpImageURLParams { + var () + return &V1GcpImageURLParams{ + + timeout: timeout, + } +} + +// NewV1GcpImageURLParamsWithContext creates a new V1GcpImageURLParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1GcpImageURLParamsWithContext(ctx context.Context) *V1GcpImageURLParams { + var () + return &V1GcpImageURLParams{ + + Context: ctx, + } +} + +// NewV1GcpImageURLParamsWithHTTPClient creates a new V1GcpImageURLParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1GcpImageURLParamsWithHTTPClient(client *http.Client) *V1GcpImageURLParams { + var () + return &V1GcpImageURLParams{ + HTTPClient: client, + } +} + +/* +V1GcpImageURLParams contains all the parameters to send to the API endpoint +for the v1 gcp image Url operation typically these are written to a http.Request +*/ +type V1GcpImageURLParams struct { + + /*ImageName + imageName for which GCP image url is requested + + */ + ImageName string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 gcp image Url params +func (o *V1GcpImageURLParams) WithTimeout(timeout time.Duration) *V1GcpImageURLParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 gcp image Url params +func (o *V1GcpImageURLParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 gcp image Url params +func (o *V1GcpImageURLParams) WithContext(ctx context.Context) *V1GcpImageURLParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 gcp image Url params +func (o *V1GcpImageURLParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 gcp image Url params +func (o *V1GcpImageURLParams) WithHTTPClient(client *http.Client) *V1GcpImageURLParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 gcp image Url params +func (o *V1GcpImageURLParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithImageName adds the imageName to the v1 gcp image Url params +func (o *V1GcpImageURLParams) WithImageName(imageName string) *V1GcpImageURLParams { + o.SetImageName(imageName) + return o +} + +// SetImageName adds the imageName to the v1 gcp image Url params +func (o *V1GcpImageURLParams) SetImageName(imageName string) { + o.ImageName = imageName +} + +// WriteToRequest writes these params to a swagger request +func (o *V1GcpImageURLParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param imageName + if err := r.SetPathParam("imageName", o.ImageName); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_gcp_image_url_responses.go b/api/client/v1/v1_gcp_image_url_responses.go new file mode 100644 index 00000000..93e626c8 --- /dev/null +++ b/api/client/v1/v1_gcp_image_url_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1GcpImageURLReader is a Reader for the V1GcpImageURL structure. +type V1GcpImageURLReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1GcpImageURLReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1GcpImageURLOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1GcpImageURLOK creates a V1GcpImageURLOK with default headers values +func NewV1GcpImageURLOK() *V1GcpImageURLOK { + return &V1GcpImageURLOK{} +} + +/* +V1GcpImageURLOK handles this case with default header values. + +(empty) +*/ +type V1GcpImageURLOK struct { + Payload *models.V1GcpImageURLEntity +} + +func (o *V1GcpImageURLOK) Error() string { + return fmt.Sprintf("[GET /v1/clouds/gcp/images/{imageName}/url][%d] v1GcpImageUrlOK %+v", 200, o.Payload) +} + +func (o *V1GcpImageURLOK) GetPayload() *models.V1GcpImageURLEntity { + return o.Payload +} + +func (o *V1GcpImageURLOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1GcpImageURLEntity) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_gcp_instance_types_parameters.go b/api/client/v1/v1_gcp_instance_types_parameters.go new file mode 100644 index 00000000..70b2a90b --- /dev/null +++ b/api/client/v1/v1_gcp_instance_types_parameters.go @@ -0,0 +1,233 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// NewV1GcpInstanceTypesParams creates a new V1GcpInstanceTypesParams object +// with the default values initialized. +func NewV1GcpInstanceTypesParams() *V1GcpInstanceTypesParams { + var () + return &V1GcpInstanceTypesParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1GcpInstanceTypesParamsWithTimeout creates a new V1GcpInstanceTypesParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1GcpInstanceTypesParamsWithTimeout(timeout time.Duration) *V1GcpInstanceTypesParams { + var () + return &V1GcpInstanceTypesParams{ + + timeout: timeout, + } +} + +// NewV1GcpInstanceTypesParamsWithContext creates a new V1GcpInstanceTypesParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1GcpInstanceTypesParamsWithContext(ctx context.Context) *V1GcpInstanceTypesParams { + var () + return &V1GcpInstanceTypesParams{ + + Context: ctx, + } +} + +// NewV1GcpInstanceTypesParamsWithHTTPClient creates a new V1GcpInstanceTypesParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1GcpInstanceTypesParamsWithHTTPClient(client *http.Client) *V1GcpInstanceTypesParams { + var () + return &V1GcpInstanceTypesParams{ + HTTPClient: client, + } +} + +/* +V1GcpInstanceTypesParams contains all the parameters to send to the API endpoint +for the v1 gcp instance types operation typically these are written to a http.Request +*/ +type V1GcpInstanceTypesParams struct { + + /*CPUGtEq + Filter for instances having cpu greater than or equal + + */ + CPUGtEq *float64 + /*GpuGtEq + Filter for instances having gpu greater than or equal + + */ + GpuGtEq *float64 + /*MemoryGtEq + Filter for instances having memory greater than or equal + + */ + MemoryGtEq *float64 + /*Region + Region for which GCP instance types are requested + + */ + Region string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 gcp instance types params +func (o *V1GcpInstanceTypesParams) WithTimeout(timeout time.Duration) *V1GcpInstanceTypesParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 gcp instance types params +func (o *V1GcpInstanceTypesParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 gcp instance types params +func (o *V1GcpInstanceTypesParams) WithContext(ctx context.Context) *V1GcpInstanceTypesParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 gcp instance types params +func (o *V1GcpInstanceTypesParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 gcp instance types params +func (o *V1GcpInstanceTypesParams) WithHTTPClient(client *http.Client) *V1GcpInstanceTypesParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 gcp instance types params +func (o *V1GcpInstanceTypesParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithCPUGtEq adds the cPUGtEq to the v1 gcp instance types params +func (o *V1GcpInstanceTypesParams) WithCPUGtEq(cPUGtEq *float64) *V1GcpInstanceTypesParams { + o.SetCPUGtEq(cPUGtEq) + return o +} + +// SetCPUGtEq adds the cpuGtEq to the v1 gcp instance types params +func (o *V1GcpInstanceTypesParams) SetCPUGtEq(cPUGtEq *float64) { + o.CPUGtEq = cPUGtEq +} + +// WithGpuGtEq adds the gpuGtEq to the v1 gcp instance types params +func (o *V1GcpInstanceTypesParams) WithGpuGtEq(gpuGtEq *float64) *V1GcpInstanceTypesParams { + o.SetGpuGtEq(gpuGtEq) + return o +} + +// SetGpuGtEq adds the gpuGtEq to the v1 gcp instance types params +func (o *V1GcpInstanceTypesParams) SetGpuGtEq(gpuGtEq *float64) { + o.GpuGtEq = gpuGtEq +} + +// WithMemoryGtEq adds the memoryGtEq to the v1 gcp instance types params +func (o *V1GcpInstanceTypesParams) WithMemoryGtEq(memoryGtEq *float64) *V1GcpInstanceTypesParams { + o.SetMemoryGtEq(memoryGtEq) + return o +} + +// SetMemoryGtEq adds the memoryGtEq to the v1 gcp instance types params +func (o *V1GcpInstanceTypesParams) SetMemoryGtEq(memoryGtEq *float64) { + o.MemoryGtEq = memoryGtEq +} + +// WithRegion adds the region to the v1 gcp instance types params +func (o *V1GcpInstanceTypesParams) WithRegion(region string) *V1GcpInstanceTypesParams { + o.SetRegion(region) + return o +} + +// SetRegion adds the region to the v1 gcp instance types params +func (o *V1GcpInstanceTypesParams) SetRegion(region string) { + o.Region = region +} + +// WriteToRequest writes these params to a swagger request +func (o *V1GcpInstanceTypesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.CPUGtEq != nil { + + // query param cpuGtEq + var qrCPUGtEq float64 + if o.CPUGtEq != nil { + qrCPUGtEq = *o.CPUGtEq + } + qCPUGtEq := swag.FormatFloat64(qrCPUGtEq) + if qCPUGtEq != "" { + if err := r.SetQueryParam("cpuGtEq", qCPUGtEq); err != nil { + return err + } + } + + } + + if o.GpuGtEq != nil { + + // query param gpuGtEq + var qrGpuGtEq float64 + if o.GpuGtEq != nil { + qrGpuGtEq = *o.GpuGtEq + } + qGpuGtEq := swag.FormatFloat64(qrGpuGtEq) + if qGpuGtEq != "" { + if err := r.SetQueryParam("gpuGtEq", qGpuGtEq); err != nil { + return err + } + } + + } + + if o.MemoryGtEq != nil { + + // query param memoryGtEq + var qrMemoryGtEq float64 + if o.MemoryGtEq != nil { + qrMemoryGtEq = *o.MemoryGtEq + } + qMemoryGtEq := swag.FormatFloat64(qrMemoryGtEq) + if qMemoryGtEq != "" { + if err := r.SetQueryParam("memoryGtEq", qMemoryGtEq); err != nil { + return err + } + } + + } + + // path param region + if err := r.SetPathParam("region", o.Region); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_gcp_instance_types_responses.go b/api/client/v1/v1_gcp_instance_types_responses.go new file mode 100644 index 00000000..60276852 --- /dev/null +++ b/api/client/v1/v1_gcp_instance_types_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1GcpInstanceTypesReader is a Reader for the V1GcpInstanceTypes structure. +type V1GcpInstanceTypesReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1GcpInstanceTypesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1GcpInstanceTypesOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1GcpInstanceTypesOK creates a V1GcpInstanceTypesOK with default headers values +func NewV1GcpInstanceTypesOK() *V1GcpInstanceTypesOK { + return &V1GcpInstanceTypesOK{} +} + +/* +V1GcpInstanceTypesOK handles this case with default header values. + +(empty) +*/ +type V1GcpInstanceTypesOK struct { + Payload *models.V1GcpInstanceTypes +} + +func (o *V1GcpInstanceTypesOK) Error() string { + return fmt.Sprintf("[GET /v1/clouds/gcp/regions/{region}/instancetypes][%d] v1GcpInstanceTypesOK %+v", 200, o.Payload) +} + +func (o *V1GcpInstanceTypesOK) GetPayload() *models.V1GcpInstanceTypes { + return o.Payload +} + +func (o *V1GcpInstanceTypesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1GcpInstanceTypes) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_gcp_networks_parameters.go b/api/client/v1/v1_gcp_networks_parameters.go new file mode 100644 index 00000000..43155b36 --- /dev/null +++ b/api/client/v1/v1_gcp_networks_parameters.go @@ -0,0 +1,182 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1GcpNetworksParams creates a new V1GcpNetworksParams object +// with the default values initialized. +func NewV1GcpNetworksParams() *V1GcpNetworksParams { + var () + return &V1GcpNetworksParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1GcpNetworksParamsWithTimeout creates a new V1GcpNetworksParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1GcpNetworksParamsWithTimeout(timeout time.Duration) *V1GcpNetworksParams { + var () + return &V1GcpNetworksParams{ + + timeout: timeout, + } +} + +// NewV1GcpNetworksParamsWithContext creates a new V1GcpNetworksParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1GcpNetworksParamsWithContext(ctx context.Context) *V1GcpNetworksParams { + var () + return &V1GcpNetworksParams{ + + Context: ctx, + } +} + +// NewV1GcpNetworksParamsWithHTTPClient creates a new V1GcpNetworksParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1GcpNetworksParamsWithHTTPClient(client *http.Client) *V1GcpNetworksParams { + var () + return &V1GcpNetworksParams{ + HTTPClient: client, + } +} + +/* +V1GcpNetworksParams contains all the parameters to send to the API endpoint +for the v1 gcp networks operation typically these are written to a http.Request +*/ +type V1GcpNetworksParams struct { + + /*CloudAccountUID + Uid for the specific GCP cloud account + + */ + CloudAccountUID string + /*Project + Project Name for which GCP networks are requested + + */ + Project string + /*Region + Region for which GCP networks are requested + + */ + Region string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 gcp networks params +func (o *V1GcpNetworksParams) WithTimeout(timeout time.Duration) *V1GcpNetworksParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 gcp networks params +func (o *V1GcpNetworksParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 gcp networks params +func (o *V1GcpNetworksParams) WithContext(ctx context.Context) *V1GcpNetworksParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 gcp networks params +func (o *V1GcpNetworksParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 gcp networks params +func (o *V1GcpNetworksParams) WithHTTPClient(client *http.Client) *V1GcpNetworksParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 gcp networks params +func (o *V1GcpNetworksParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithCloudAccountUID adds the cloudAccountUID to the v1 gcp networks params +func (o *V1GcpNetworksParams) WithCloudAccountUID(cloudAccountUID string) *V1GcpNetworksParams { + o.SetCloudAccountUID(cloudAccountUID) + return o +} + +// SetCloudAccountUID adds the cloudAccountUid to the v1 gcp networks params +func (o *V1GcpNetworksParams) SetCloudAccountUID(cloudAccountUID string) { + o.CloudAccountUID = cloudAccountUID +} + +// WithProject adds the project to the v1 gcp networks params +func (o *V1GcpNetworksParams) WithProject(project string) *V1GcpNetworksParams { + o.SetProject(project) + return o +} + +// SetProject adds the project to the v1 gcp networks params +func (o *V1GcpNetworksParams) SetProject(project string) { + o.Project = project +} + +// WithRegion adds the region to the v1 gcp networks params +func (o *V1GcpNetworksParams) WithRegion(region string) *V1GcpNetworksParams { + o.SetRegion(region) + return o +} + +// SetRegion adds the region to the v1 gcp networks params +func (o *V1GcpNetworksParams) SetRegion(region string) { + o.Region = region +} + +// WriteToRequest writes these params to a swagger request +func (o *V1GcpNetworksParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // query param cloudAccountUid + qrCloudAccountUID := o.CloudAccountUID + qCloudAccountUID := qrCloudAccountUID + if qCloudAccountUID != "" { + if err := r.SetQueryParam("cloudAccountUid", qCloudAccountUID); err != nil { + return err + } + } + + // path param project + if err := r.SetPathParam("project", o.Project); err != nil { + return err + } + + // path param region + if err := r.SetPathParam("region", o.Region); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_gcp_networks_responses.go b/api/client/v1/v1_gcp_networks_responses.go new file mode 100644 index 00000000..794faaed --- /dev/null +++ b/api/client/v1/v1_gcp_networks_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1GcpNetworksReader is a Reader for the V1GcpNetworks structure. +type V1GcpNetworksReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1GcpNetworksReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1GcpNetworksOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1GcpNetworksOK creates a V1GcpNetworksOK with default headers values +func NewV1GcpNetworksOK() *V1GcpNetworksOK { + return &V1GcpNetworksOK{} +} + +/* +V1GcpNetworksOK handles this case with default header values. + +(empty) +*/ +type V1GcpNetworksOK struct { + Payload *models.V1GcpNetworks +} + +func (o *V1GcpNetworksOK) Error() string { + return fmt.Sprintf("[GET /v1/clouds/gcp/projects/{project}/regions/{region}/networks][%d] v1GcpNetworksOK %+v", 200, o.Payload) +} + +func (o *V1GcpNetworksOK) GetPayload() *models.V1GcpNetworks { + return o.Payload +} + +func (o *V1GcpNetworksOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1GcpNetworks) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_gcp_project_validate_parameters.go b/api/client/v1/v1_gcp_project_validate_parameters.go new file mode 100644 index 00000000..14d7bd33 --- /dev/null +++ b/api/client/v1/v1_gcp_project_validate_parameters.go @@ -0,0 +1,160 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1GcpProjectValidateParams creates a new V1GcpProjectValidateParams object +// with the default values initialized. +func NewV1GcpProjectValidateParams() *V1GcpProjectValidateParams { + var () + return &V1GcpProjectValidateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1GcpProjectValidateParamsWithTimeout creates a new V1GcpProjectValidateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1GcpProjectValidateParamsWithTimeout(timeout time.Duration) *V1GcpProjectValidateParams { + var () + return &V1GcpProjectValidateParams{ + + timeout: timeout, + } +} + +// NewV1GcpProjectValidateParamsWithContext creates a new V1GcpProjectValidateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1GcpProjectValidateParamsWithContext(ctx context.Context) *V1GcpProjectValidateParams { + var () + return &V1GcpProjectValidateParams{ + + Context: ctx, + } +} + +// NewV1GcpProjectValidateParamsWithHTTPClient creates a new V1GcpProjectValidateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1GcpProjectValidateParamsWithHTTPClient(client *http.Client) *V1GcpProjectValidateParams { + var () + return &V1GcpProjectValidateParams{ + HTTPClient: client, + } +} + +/* +V1GcpProjectValidateParams contains all the parameters to send to the API endpoint +for the v1 gcp project validate operation typically these are written to a http.Request +*/ +type V1GcpProjectValidateParams struct { + + /*CloudAccountUID + Uid for the specific GCP cloud account + + */ + CloudAccountUID *models.V1CloudAccountUIDEntity + /*Project + GCP project uid + + */ + Project string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 gcp project validate params +func (o *V1GcpProjectValidateParams) WithTimeout(timeout time.Duration) *V1GcpProjectValidateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 gcp project validate params +func (o *V1GcpProjectValidateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 gcp project validate params +func (o *V1GcpProjectValidateParams) WithContext(ctx context.Context) *V1GcpProjectValidateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 gcp project validate params +func (o *V1GcpProjectValidateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 gcp project validate params +func (o *V1GcpProjectValidateParams) WithHTTPClient(client *http.Client) *V1GcpProjectValidateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 gcp project validate params +func (o *V1GcpProjectValidateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithCloudAccountUID adds the cloudAccountUID to the v1 gcp project validate params +func (o *V1GcpProjectValidateParams) WithCloudAccountUID(cloudAccountUID *models.V1CloudAccountUIDEntity) *V1GcpProjectValidateParams { + o.SetCloudAccountUID(cloudAccountUID) + return o +} + +// SetCloudAccountUID adds the cloudAccountUid to the v1 gcp project validate params +func (o *V1GcpProjectValidateParams) SetCloudAccountUID(cloudAccountUID *models.V1CloudAccountUIDEntity) { + o.CloudAccountUID = cloudAccountUID +} + +// WithProject adds the project to the v1 gcp project validate params +func (o *V1GcpProjectValidateParams) WithProject(project string) *V1GcpProjectValidateParams { + o.SetProject(project) + return o +} + +// SetProject adds the project to the v1 gcp project validate params +func (o *V1GcpProjectValidateParams) SetProject(project string) { + o.Project = project +} + +// WriteToRequest writes these params to a swagger request +func (o *V1GcpProjectValidateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.CloudAccountUID != nil { + if err := r.SetBodyParam(o.CloudAccountUID); err != nil { + return err + } + } + + // path param project + if err := r.SetPathParam("project", o.Project); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_gcp_project_validate_responses.go b/api/client/v1/v1_gcp_project_validate_responses.go new file mode 100644 index 00000000..9a76e307 --- /dev/null +++ b/api/client/v1/v1_gcp_project_validate_responses.go @@ -0,0 +1,61 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1GcpProjectValidateReader is a Reader for the V1GcpProjectValidate structure. +type V1GcpProjectValidateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1GcpProjectValidateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1GcpProjectValidateNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1GcpProjectValidateNoContent creates a V1GcpProjectValidateNoContent with default headers values +func NewV1GcpProjectValidateNoContent() *V1GcpProjectValidateNoContent { + return &V1GcpProjectValidateNoContent{} +} + +/* +V1GcpProjectValidateNoContent handles this case with default header values. + +Ok response without content +*/ +type V1GcpProjectValidateNoContent struct { + /*Audit uid for the request + */ + AuditUID string +} + +func (o *V1GcpProjectValidateNoContent) Error() string { + return fmt.Sprintf("[POST /v1/clouds/gcp/projects/{project}/validate][%d] v1GcpProjectValidateNoContent ", 204) +} + +func (o *V1GcpProjectValidateNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header AuditUid + o.AuditUID = response.GetHeader("AuditUid") + + return nil +} diff --git a/api/client/v1/v1_gcp_projects_parameters.go b/api/client/v1/v1_gcp_projects_parameters.go new file mode 100644 index 00000000..acc1fd6f --- /dev/null +++ b/api/client/v1/v1_gcp_projects_parameters.go @@ -0,0 +1,140 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1GcpProjectsParams creates a new V1GcpProjectsParams object +// with the default values initialized. +func NewV1GcpProjectsParams() *V1GcpProjectsParams { + var () + return &V1GcpProjectsParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1GcpProjectsParamsWithTimeout creates a new V1GcpProjectsParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1GcpProjectsParamsWithTimeout(timeout time.Duration) *V1GcpProjectsParams { + var () + return &V1GcpProjectsParams{ + + timeout: timeout, + } +} + +// NewV1GcpProjectsParamsWithContext creates a new V1GcpProjectsParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1GcpProjectsParamsWithContext(ctx context.Context) *V1GcpProjectsParams { + var () + return &V1GcpProjectsParams{ + + Context: ctx, + } +} + +// NewV1GcpProjectsParamsWithHTTPClient creates a new V1GcpProjectsParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1GcpProjectsParamsWithHTTPClient(client *http.Client) *V1GcpProjectsParams { + var () + return &V1GcpProjectsParams{ + HTTPClient: client, + } +} + +/* +V1GcpProjectsParams contains all the parameters to send to the API endpoint +for the v1 gcp projects operation typically these are written to a http.Request +*/ +type V1GcpProjectsParams struct { + + /*CloudAccountUID + Uid for the specific GCP cloud account + + */ + CloudAccountUID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 gcp projects params +func (o *V1GcpProjectsParams) WithTimeout(timeout time.Duration) *V1GcpProjectsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 gcp projects params +func (o *V1GcpProjectsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 gcp projects params +func (o *V1GcpProjectsParams) WithContext(ctx context.Context) *V1GcpProjectsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 gcp projects params +func (o *V1GcpProjectsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 gcp projects params +func (o *V1GcpProjectsParams) WithHTTPClient(client *http.Client) *V1GcpProjectsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 gcp projects params +func (o *V1GcpProjectsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithCloudAccountUID adds the cloudAccountUID to the v1 gcp projects params +func (o *V1GcpProjectsParams) WithCloudAccountUID(cloudAccountUID string) *V1GcpProjectsParams { + o.SetCloudAccountUID(cloudAccountUID) + return o +} + +// SetCloudAccountUID adds the cloudAccountUid to the v1 gcp projects params +func (o *V1GcpProjectsParams) SetCloudAccountUID(cloudAccountUID string) { + o.CloudAccountUID = cloudAccountUID +} + +// WriteToRequest writes these params to a swagger request +func (o *V1GcpProjectsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // query param cloudAccountUid + qrCloudAccountUID := o.CloudAccountUID + qCloudAccountUID := qrCloudAccountUID + if qCloudAccountUID != "" { + if err := r.SetQueryParam("cloudAccountUid", qCloudAccountUID); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_gcp_projects_responses.go b/api/client/v1/v1_gcp_projects_responses.go new file mode 100644 index 00000000..ce11fc38 --- /dev/null +++ b/api/client/v1/v1_gcp_projects_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1GcpProjectsReader is a Reader for the V1GcpProjects structure. +type V1GcpProjectsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1GcpProjectsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1GcpProjectsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1GcpProjectsOK creates a V1GcpProjectsOK with default headers values +func NewV1GcpProjectsOK() *V1GcpProjectsOK { + return &V1GcpProjectsOK{} +} + +/* +V1GcpProjectsOK handles this case with default header values. + +(empty) +*/ +type V1GcpProjectsOK struct { + Payload *models.V1GcpProjects +} + +func (o *V1GcpProjectsOK) Error() string { + return fmt.Sprintf("[GET /v1/clouds/gcp/projects][%d] v1GcpProjectsOK %+v", 200, o.Payload) +} + +func (o *V1GcpProjectsOK) GetPayload() *models.V1GcpProjects { + return o.Payload +} + +func (o *V1GcpProjectsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1GcpProjects) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_gcp_properties_validate_parameters.go b/api/client/v1/v1_gcp_properties_validate_parameters.go new file mode 100644 index 00000000..15ba931f --- /dev/null +++ b/api/client/v1/v1_gcp_properties_validate_parameters.go @@ -0,0 +1,139 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1GcpPropertiesValidateParams creates a new V1GcpPropertiesValidateParams object +// with the default values initialized. +func NewV1GcpPropertiesValidateParams() *V1GcpPropertiesValidateParams { + var () + return &V1GcpPropertiesValidateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1GcpPropertiesValidateParamsWithTimeout creates a new V1GcpPropertiesValidateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1GcpPropertiesValidateParamsWithTimeout(timeout time.Duration) *V1GcpPropertiesValidateParams { + var () + return &V1GcpPropertiesValidateParams{ + + timeout: timeout, + } +} + +// NewV1GcpPropertiesValidateParamsWithContext creates a new V1GcpPropertiesValidateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1GcpPropertiesValidateParamsWithContext(ctx context.Context) *V1GcpPropertiesValidateParams { + var () + return &V1GcpPropertiesValidateParams{ + + Context: ctx, + } +} + +// NewV1GcpPropertiesValidateParamsWithHTTPClient creates a new V1GcpPropertiesValidateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1GcpPropertiesValidateParamsWithHTTPClient(client *http.Client) *V1GcpPropertiesValidateParams { + var () + return &V1GcpPropertiesValidateParams{ + HTTPClient: client, + } +} + +/* +V1GcpPropertiesValidateParams contains all the parameters to send to the API endpoint +for the v1 gcp properties validate operation typically these are written to a http.Request +*/ +type V1GcpPropertiesValidateParams struct { + + /*Properties + Request payload for GCP properties validate spec + + */ + Properties *models.V1GcpPropertiesValidateSpec + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 gcp properties validate params +func (o *V1GcpPropertiesValidateParams) WithTimeout(timeout time.Duration) *V1GcpPropertiesValidateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 gcp properties validate params +func (o *V1GcpPropertiesValidateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 gcp properties validate params +func (o *V1GcpPropertiesValidateParams) WithContext(ctx context.Context) *V1GcpPropertiesValidateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 gcp properties validate params +func (o *V1GcpPropertiesValidateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 gcp properties validate params +func (o *V1GcpPropertiesValidateParams) WithHTTPClient(client *http.Client) *V1GcpPropertiesValidateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 gcp properties validate params +func (o *V1GcpPropertiesValidateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithProperties adds the properties to the v1 gcp properties validate params +func (o *V1GcpPropertiesValidateParams) WithProperties(properties *models.V1GcpPropertiesValidateSpec) *V1GcpPropertiesValidateParams { + o.SetProperties(properties) + return o +} + +// SetProperties adds the properties to the v1 gcp properties validate params +func (o *V1GcpPropertiesValidateParams) SetProperties(properties *models.V1GcpPropertiesValidateSpec) { + o.Properties = properties +} + +// WriteToRequest writes these params to a swagger request +func (o *V1GcpPropertiesValidateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Properties != nil { + if err := r.SetBodyParam(o.Properties); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_gcp_properties_validate_responses.go b/api/client/v1/v1_gcp_properties_validate_responses.go new file mode 100644 index 00000000..5a6f3c30 --- /dev/null +++ b/api/client/v1/v1_gcp_properties_validate_responses.go @@ -0,0 +1,61 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1GcpPropertiesValidateReader is a Reader for the V1GcpPropertiesValidate structure. +type V1GcpPropertiesValidateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1GcpPropertiesValidateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1GcpPropertiesValidateNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1GcpPropertiesValidateNoContent creates a V1GcpPropertiesValidateNoContent with default headers values +func NewV1GcpPropertiesValidateNoContent() *V1GcpPropertiesValidateNoContent { + return &V1GcpPropertiesValidateNoContent{} +} + +/* +V1GcpPropertiesValidateNoContent handles this case with default header values. + +Ok response without content +*/ +type V1GcpPropertiesValidateNoContent struct { + /*Audit uid for the request + */ + AuditUID string +} + +func (o *V1GcpPropertiesValidateNoContent) Error() string { + return fmt.Sprintf("[POST /v1/clouds/gcp/properties/validate][%d] v1GcpPropertiesValidateNoContent ", 204) +} + +func (o *V1GcpPropertiesValidateNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header AuditUid + o.AuditUID = response.GetHeader("AuditUid") + + return nil +} diff --git a/api/client/v1/v1_gcp_regions_parameters.go b/api/client/v1/v1_gcp_regions_parameters.go new file mode 100644 index 00000000..978fb232 --- /dev/null +++ b/api/client/v1/v1_gcp_regions_parameters.go @@ -0,0 +1,161 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1GcpRegionsParams creates a new V1GcpRegionsParams object +// with the default values initialized. +func NewV1GcpRegionsParams() *V1GcpRegionsParams { + var () + return &V1GcpRegionsParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1GcpRegionsParamsWithTimeout creates a new V1GcpRegionsParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1GcpRegionsParamsWithTimeout(timeout time.Duration) *V1GcpRegionsParams { + var () + return &V1GcpRegionsParams{ + + timeout: timeout, + } +} + +// NewV1GcpRegionsParamsWithContext creates a new V1GcpRegionsParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1GcpRegionsParamsWithContext(ctx context.Context) *V1GcpRegionsParams { + var () + return &V1GcpRegionsParams{ + + Context: ctx, + } +} + +// NewV1GcpRegionsParamsWithHTTPClient creates a new V1GcpRegionsParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1GcpRegionsParamsWithHTTPClient(client *http.Client) *V1GcpRegionsParams { + var () + return &V1GcpRegionsParams{ + HTTPClient: client, + } +} + +/* +V1GcpRegionsParams contains all the parameters to send to the API endpoint +for the v1 gcp regions operation typically these are written to a http.Request +*/ +type V1GcpRegionsParams struct { + + /*CloudAccountUID + Uid for the specific GCP cloud account + + */ + CloudAccountUID string + /*Project + Project Name for which GCP zones are requested + + */ + Project string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 gcp regions params +func (o *V1GcpRegionsParams) WithTimeout(timeout time.Duration) *V1GcpRegionsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 gcp regions params +func (o *V1GcpRegionsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 gcp regions params +func (o *V1GcpRegionsParams) WithContext(ctx context.Context) *V1GcpRegionsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 gcp regions params +func (o *V1GcpRegionsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 gcp regions params +func (o *V1GcpRegionsParams) WithHTTPClient(client *http.Client) *V1GcpRegionsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 gcp regions params +func (o *V1GcpRegionsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithCloudAccountUID adds the cloudAccountUID to the v1 gcp regions params +func (o *V1GcpRegionsParams) WithCloudAccountUID(cloudAccountUID string) *V1GcpRegionsParams { + o.SetCloudAccountUID(cloudAccountUID) + return o +} + +// SetCloudAccountUID adds the cloudAccountUid to the v1 gcp regions params +func (o *V1GcpRegionsParams) SetCloudAccountUID(cloudAccountUID string) { + o.CloudAccountUID = cloudAccountUID +} + +// WithProject adds the project to the v1 gcp regions params +func (o *V1GcpRegionsParams) WithProject(project string) *V1GcpRegionsParams { + o.SetProject(project) + return o +} + +// SetProject adds the project to the v1 gcp regions params +func (o *V1GcpRegionsParams) SetProject(project string) { + o.Project = project +} + +// WriteToRequest writes these params to a swagger request +func (o *V1GcpRegionsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // query param cloudAccountUid + qrCloudAccountUID := o.CloudAccountUID + qCloudAccountUID := qrCloudAccountUID + if qCloudAccountUID != "" { + if err := r.SetQueryParam("cloudAccountUid", qCloudAccountUID); err != nil { + return err + } + } + + // path param project + if err := r.SetPathParam("project", o.Project); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_gcp_regions_responses.go b/api/client/v1/v1_gcp_regions_responses.go new file mode 100644 index 00000000..3e0d33ad --- /dev/null +++ b/api/client/v1/v1_gcp_regions_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1GcpRegionsReader is a Reader for the V1GcpRegions structure. +type V1GcpRegionsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1GcpRegionsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1GcpRegionsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1GcpRegionsOK creates a V1GcpRegionsOK with default headers values +func NewV1GcpRegionsOK() *V1GcpRegionsOK { + return &V1GcpRegionsOK{} +} + +/* +V1GcpRegionsOK handles this case with default header values. + +(empty) +*/ +type V1GcpRegionsOK struct { + Payload *models.V1GcpRegions +} + +func (o *V1GcpRegionsOK) Error() string { + return fmt.Sprintf("[GET /v1/clouds/gcp/projects/{project}/regions][%d] v1GcpRegionsOK %+v", 200, o.Payload) +} + +func (o *V1GcpRegionsOK) GetPayload() *models.V1GcpRegions { + return o.Payload +} + +func (o *V1GcpRegionsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1GcpRegions) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_gcp_storage_types_parameters.go b/api/client/v1/v1_gcp_storage_types_parameters.go new file mode 100644 index 00000000..a0808dea --- /dev/null +++ b/api/client/v1/v1_gcp_storage_types_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1GcpStorageTypesParams creates a new V1GcpStorageTypesParams object +// with the default values initialized. +func NewV1GcpStorageTypesParams() *V1GcpStorageTypesParams { + var () + return &V1GcpStorageTypesParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1GcpStorageTypesParamsWithTimeout creates a new V1GcpStorageTypesParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1GcpStorageTypesParamsWithTimeout(timeout time.Duration) *V1GcpStorageTypesParams { + var () + return &V1GcpStorageTypesParams{ + + timeout: timeout, + } +} + +// NewV1GcpStorageTypesParamsWithContext creates a new V1GcpStorageTypesParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1GcpStorageTypesParamsWithContext(ctx context.Context) *V1GcpStorageTypesParams { + var () + return &V1GcpStorageTypesParams{ + + Context: ctx, + } +} + +// NewV1GcpStorageTypesParamsWithHTTPClient creates a new V1GcpStorageTypesParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1GcpStorageTypesParamsWithHTTPClient(client *http.Client) *V1GcpStorageTypesParams { + var () + return &V1GcpStorageTypesParams{ + HTTPClient: client, + } +} + +/* +V1GcpStorageTypesParams contains all the parameters to send to the API endpoint +for the v1 gcp storage types operation typically these are written to a http.Request +*/ +type V1GcpStorageTypesParams struct { + + /*Region + Region for which GCP storage types are requested + + */ + Region string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 gcp storage types params +func (o *V1GcpStorageTypesParams) WithTimeout(timeout time.Duration) *V1GcpStorageTypesParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 gcp storage types params +func (o *V1GcpStorageTypesParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 gcp storage types params +func (o *V1GcpStorageTypesParams) WithContext(ctx context.Context) *V1GcpStorageTypesParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 gcp storage types params +func (o *V1GcpStorageTypesParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 gcp storage types params +func (o *V1GcpStorageTypesParams) WithHTTPClient(client *http.Client) *V1GcpStorageTypesParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 gcp storage types params +func (o *V1GcpStorageTypesParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithRegion adds the region to the v1 gcp storage types params +func (o *V1GcpStorageTypesParams) WithRegion(region string) *V1GcpStorageTypesParams { + o.SetRegion(region) + return o +} + +// SetRegion adds the region to the v1 gcp storage types params +func (o *V1GcpStorageTypesParams) SetRegion(region string) { + o.Region = region +} + +// WriteToRequest writes these params to a swagger request +func (o *V1GcpStorageTypesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param region + if err := r.SetPathParam("region", o.Region); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_gcp_storage_types_responses.go b/api/client/v1/v1_gcp_storage_types_responses.go new file mode 100644 index 00000000..38d78215 --- /dev/null +++ b/api/client/v1/v1_gcp_storage_types_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1GcpStorageTypesReader is a Reader for the V1GcpStorageTypes structure. +type V1GcpStorageTypesReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1GcpStorageTypesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1GcpStorageTypesOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1GcpStorageTypesOK creates a V1GcpStorageTypesOK with default headers values +func NewV1GcpStorageTypesOK() *V1GcpStorageTypesOK { + return &V1GcpStorageTypesOK{} +} + +/* +V1GcpStorageTypesOK handles this case with default header values. + +(empty) +*/ +type V1GcpStorageTypesOK struct { + Payload *models.V1GcpStorageTypes +} + +func (o *V1GcpStorageTypesOK) Error() string { + return fmt.Sprintf("[GET /v1/clouds/gcp/regions/{region}/storagetypes][%d] v1GcpStorageTypesOK %+v", 200, o.Payload) +} + +func (o *V1GcpStorageTypesOK) GetPayload() *models.V1GcpStorageTypes { + return o.Payload +} + +func (o *V1GcpStorageTypesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1GcpStorageTypes) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_gcp_zones_parameters.go b/api/client/v1/v1_gcp_zones_parameters.go new file mode 100644 index 00000000..9c5ba103 --- /dev/null +++ b/api/client/v1/v1_gcp_zones_parameters.go @@ -0,0 +1,182 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1GcpZonesParams creates a new V1GcpZonesParams object +// with the default values initialized. +func NewV1GcpZonesParams() *V1GcpZonesParams { + var () + return &V1GcpZonesParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1GcpZonesParamsWithTimeout creates a new V1GcpZonesParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1GcpZonesParamsWithTimeout(timeout time.Duration) *V1GcpZonesParams { + var () + return &V1GcpZonesParams{ + + timeout: timeout, + } +} + +// NewV1GcpZonesParamsWithContext creates a new V1GcpZonesParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1GcpZonesParamsWithContext(ctx context.Context) *V1GcpZonesParams { + var () + return &V1GcpZonesParams{ + + Context: ctx, + } +} + +// NewV1GcpZonesParamsWithHTTPClient creates a new V1GcpZonesParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1GcpZonesParamsWithHTTPClient(client *http.Client) *V1GcpZonesParams { + var () + return &V1GcpZonesParams{ + HTTPClient: client, + } +} + +/* +V1GcpZonesParams contains all the parameters to send to the API endpoint +for the v1 gcp zones operation typically these are written to a http.Request +*/ +type V1GcpZonesParams struct { + + /*CloudAccountUID + Uid for the specific GCP cloud account + + */ + CloudAccountUID string + /*Project + Project Name for which GCP zones are requested + + */ + Project string + /*Region + Region for which GCP zones are requested + + */ + Region string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 gcp zones params +func (o *V1GcpZonesParams) WithTimeout(timeout time.Duration) *V1GcpZonesParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 gcp zones params +func (o *V1GcpZonesParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 gcp zones params +func (o *V1GcpZonesParams) WithContext(ctx context.Context) *V1GcpZonesParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 gcp zones params +func (o *V1GcpZonesParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 gcp zones params +func (o *V1GcpZonesParams) WithHTTPClient(client *http.Client) *V1GcpZonesParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 gcp zones params +func (o *V1GcpZonesParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithCloudAccountUID adds the cloudAccountUID to the v1 gcp zones params +func (o *V1GcpZonesParams) WithCloudAccountUID(cloudAccountUID string) *V1GcpZonesParams { + o.SetCloudAccountUID(cloudAccountUID) + return o +} + +// SetCloudAccountUID adds the cloudAccountUid to the v1 gcp zones params +func (o *V1GcpZonesParams) SetCloudAccountUID(cloudAccountUID string) { + o.CloudAccountUID = cloudAccountUID +} + +// WithProject adds the project to the v1 gcp zones params +func (o *V1GcpZonesParams) WithProject(project string) *V1GcpZonesParams { + o.SetProject(project) + return o +} + +// SetProject adds the project to the v1 gcp zones params +func (o *V1GcpZonesParams) SetProject(project string) { + o.Project = project +} + +// WithRegion adds the region to the v1 gcp zones params +func (o *V1GcpZonesParams) WithRegion(region string) *V1GcpZonesParams { + o.SetRegion(region) + return o +} + +// SetRegion adds the region to the v1 gcp zones params +func (o *V1GcpZonesParams) SetRegion(region string) { + o.Region = region +} + +// WriteToRequest writes these params to a swagger request +func (o *V1GcpZonesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // query param cloudAccountUid + qrCloudAccountUID := o.CloudAccountUID + qCloudAccountUID := qrCloudAccountUID + if qCloudAccountUID != "" { + if err := r.SetQueryParam("cloudAccountUid", qCloudAccountUID); err != nil { + return err + } + } + + // path param project + if err := r.SetPathParam("project", o.Project); err != nil { + return err + } + + // path param region + if err := r.SetPathParam("region", o.Region); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_gcp_zones_responses.go b/api/client/v1/v1_gcp_zones_responses.go new file mode 100644 index 00000000..2433da51 --- /dev/null +++ b/api/client/v1/v1_gcp_zones_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1GcpZonesReader is a Reader for the V1GcpZones structure. +type V1GcpZonesReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1GcpZonesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1GcpZonesOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1GcpZonesOK creates a V1GcpZonesOK with default headers values +func NewV1GcpZonesOK() *V1GcpZonesOK { + return &V1GcpZonesOK{} +} + +/* +V1GcpZonesOK handles this case with default header values. + +(empty) +*/ +type V1GcpZonesOK struct { + Payload *models.V1GcpZones +} + +func (o *V1GcpZonesOK) Error() string { + return fmt.Sprintf("[GET /v1/clouds/gcp/projects/{project}/regions/{region}/zones][%d] v1GcpZonesOK %+v", 200, o.Payload) +} + +func (o *V1GcpZonesOK) GetPayload() *models.V1GcpZones { + return o.Payload +} + +func (o *V1GcpZonesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1GcpZones) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_host_cluster_config_update_parameters.go b/api/client/v1/v1_host_cluster_config_update_parameters.go new file mode 100644 index 00000000..92a3de34 --- /dev/null +++ b/api/client/v1/v1_host_cluster_config_update_parameters.go @@ -0,0 +1,157 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1HostClusterConfigUpdateParams creates a new V1HostClusterConfigUpdateParams object +// with the default values initialized. +func NewV1HostClusterConfigUpdateParams() *V1HostClusterConfigUpdateParams { + var () + return &V1HostClusterConfigUpdateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1HostClusterConfigUpdateParamsWithTimeout creates a new V1HostClusterConfigUpdateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1HostClusterConfigUpdateParamsWithTimeout(timeout time.Duration) *V1HostClusterConfigUpdateParams { + var () + return &V1HostClusterConfigUpdateParams{ + + timeout: timeout, + } +} + +// NewV1HostClusterConfigUpdateParamsWithContext creates a new V1HostClusterConfigUpdateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1HostClusterConfigUpdateParamsWithContext(ctx context.Context) *V1HostClusterConfigUpdateParams { + var () + return &V1HostClusterConfigUpdateParams{ + + Context: ctx, + } +} + +// NewV1HostClusterConfigUpdateParamsWithHTTPClient creates a new V1HostClusterConfigUpdateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1HostClusterConfigUpdateParamsWithHTTPClient(client *http.Client) *V1HostClusterConfigUpdateParams { + var () + return &V1HostClusterConfigUpdateParams{ + HTTPClient: client, + } +} + +/* +V1HostClusterConfigUpdateParams contains all the parameters to send to the API endpoint +for the v1 host cluster config update operation typically these are written to a http.Request +*/ +type V1HostClusterConfigUpdateParams struct { + + /*Body*/ + Body *models.V1HostClusterConfigEntity + /*UID + Cluster uid + + */ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 host cluster config update params +func (o *V1HostClusterConfigUpdateParams) WithTimeout(timeout time.Duration) *V1HostClusterConfigUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 host cluster config update params +func (o *V1HostClusterConfigUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 host cluster config update params +func (o *V1HostClusterConfigUpdateParams) WithContext(ctx context.Context) *V1HostClusterConfigUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 host cluster config update params +func (o *V1HostClusterConfigUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 host cluster config update params +func (o *V1HostClusterConfigUpdateParams) WithHTTPClient(client *http.Client) *V1HostClusterConfigUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 host cluster config update params +func (o *V1HostClusterConfigUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 host cluster config update params +func (o *V1HostClusterConfigUpdateParams) WithBody(body *models.V1HostClusterConfigEntity) *V1HostClusterConfigUpdateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 host cluster config update params +func (o *V1HostClusterConfigUpdateParams) SetBody(body *models.V1HostClusterConfigEntity) { + o.Body = body +} + +// WithUID adds the uid to the v1 host cluster config update params +func (o *V1HostClusterConfigUpdateParams) WithUID(uid string) *V1HostClusterConfigUpdateParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 host cluster config update params +func (o *V1HostClusterConfigUpdateParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1HostClusterConfigUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_host_cluster_config_update_responses.go b/api/client/v1/v1_host_cluster_config_update_responses.go new file mode 100644 index 00000000..6d28cb31 --- /dev/null +++ b/api/client/v1/v1_host_cluster_config_update_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1HostClusterConfigUpdateReader is a Reader for the V1HostClusterConfigUpdate structure. +type V1HostClusterConfigUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1HostClusterConfigUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1HostClusterConfigUpdateNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1HostClusterConfigUpdateNoContent creates a V1HostClusterConfigUpdateNoContent with default headers values +func NewV1HostClusterConfigUpdateNoContent() *V1HostClusterConfigUpdateNoContent { + return &V1HostClusterConfigUpdateNoContent{} +} + +/* +V1HostClusterConfigUpdateNoContent handles this case with default header values. + +The resource was updated successfully +*/ +type V1HostClusterConfigUpdateNoContent struct { +} + +func (o *V1HostClusterConfigUpdateNoContent) Error() string { + return fmt.Sprintf("[PATCH /v1/spectroclusters/{uid}/clusterConfig/hostCluster][%d] v1HostClusterConfigUpdateNoContent ", 204) +} + +func (o *V1HostClusterConfigUpdateNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_invoice_uid_report_invoice_pdf_parameters.go b/api/client/v1/v1_invoice_uid_report_invoice_pdf_parameters.go new file mode 100644 index 00000000..50419669 --- /dev/null +++ b/api/client/v1/v1_invoice_uid_report_invoice_pdf_parameters.go @@ -0,0 +1,157 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1InvoiceUIDReportInvoicePdfParams creates a new V1InvoiceUIDReportInvoicePdfParams object +// with the default values initialized. +func NewV1InvoiceUIDReportInvoicePdfParams() *V1InvoiceUIDReportInvoicePdfParams { + var () + return &V1InvoiceUIDReportInvoicePdfParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1InvoiceUIDReportInvoicePdfParamsWithTimeout creates a new V1InvoiceUIDReportInvoicePdfParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1InvoiceUIDReportInvoicePdfParamsWithTimeout(timeout time.Duration) *V1InvoiceUIDReportInvoicePdfParams { + var () + return &V1InvoiceUIDReportInvoicePdfParams{ + + timeout: timeout, + } +} + +// NewV1InvoiceUIDReportInvoicePdfParamsWithContext creates a new V1InvoiceUIDReportInvoicePdfParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1InvoiceUIDReportInvoicePdfParamsWithContext(ctx context.Context) *V1InvoiceUIDReportInvoicePdfParams { + var () + return &V1InvoiceUIDReportInvoicePdfParams{ + + Context: ctx, + } +} + +// NewV1InvoiceUIDReportInvoicePdfParamsWithHTTPClient creates a new V1InvoiceUIDReportInvoicePdfParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1InvoiceUIDReportInvoicePdfParamsWithHTTPClient(client *http.Client) *V1InvoiceUIDReportInvoicePdfParams { + var () + return &V1InvoiceUIDReportInvoicePdfParams{ + HTTPClient: client, + } +} + +/* +V1InvoiceUIDReportInvoicePdfParams contains all the parameters to send to the API endpoint +for the v1 invoice Uid report invoice pdf operation typically these are written to a http.Request +*/ +type V1InvoiceUIDReportInvoicePdfParams struct { + + /*InvoiceUID + Specify the invoice uid + + */ + InvoiceUID string + /*TenantUID + Specify the tenant uid + + */ + TenantUID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 invoice Uid report invoice pdf params +func (o *V1InvoiceUIDReportInvoicePdfParams) WithTimeout(timeout time.Duration) *V1InvoiceUIDReportInvoicePdfParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 invoice Uid report invoice pdf params +func (o *V1InvoiceUIDReportInvoicePdfParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 invoice Uid report invoice pdf params +func (o *V1InvoiceUIDReportInvoicePdfParams) WithContext(ctx context.Context) *V1InvoiceUIDReportInvoicePdfParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 invoice Uid report invoice pdf params +func (o *V1InvoiceUIDReportInvoicePdfParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 invoice Uid report invoice pdf params +func (o *V1InvoiceUIDReportInvoicePdfParams) WithHTTPClient(client *http.Client) *V1InvoiceUIDReportInvoicePdfParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 invoice Uid report invoice pdf params +func (o *V1InvoiceUIDReportInvoicePdfParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithInvoiceUID adds the invoiceUID to the v1 invoice Uid report invoice pdf params +func (o *V1InvoiceUIDReportInvoicePdfParams) WithInvoiceUID(invoiceUID string) *V1InvoiceUIDReportInvoicePdfParams { + o.SetInvoiceUID(invoiceUID) + return o +} + +// SetInvoiceUID adds the invoiceUid to the v1 invoice Uid report invoice pdf params +func (o *V1InvoiceUIDReportInvoicePdfParams) SetInvoiceUID(invoiceUID string) { + o.InvoiceUID = invoiceUID +} + +// WithTenantUID adds the tenantUID to the v1 invoice Uid report invoice pdf params +func (o *V1InvoiceUIDReportInvoicePdfParams) WithTenantUID(tenantUID string) *V1InvoiceUIDReportInvoicePdfParams { + o.SetTenantUID(tenantUID) + return o +} + +// SetTenantUID adds the tenantUid to the v1 invoice Uid report invoice pdf params +func (o *V1InvoiceUIDReportInvoicePdfParams) SetTenantUID(tenantUID string) { + o.TenantUID = tenantUID +} + +// WriteToRequest writes these params to a swagger request +func (o *V1InvoiceUIDReportInvoicePdfParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param invoiceUid + if err := r.SetPathParam("invoiceUid", o.InvoiceUID); err != nil { + return err + } + + // path param tenantUid + if err := r.SetPathParam("tenantUid", o.TenantUID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_invoice_uid_report_invoice_pdf_responses.go b/api/client/v1/v1_invoice_uid_report_invoice_pdf_responses.go new file mode 100644 index 00000000..7728230a --- /dev/null +++ b/api/client/v1/v1_invoice_uid_report_invoice_pdf_responses.go @@ -0,0 +1,79 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1InvoiceUIDReportInvoicePdfReader is a Reader for the V1InvoiceUIDReportInvoicePdf structure. +type V1InvoiceUIDReportInvoicePdfReader struct { + formats strfmt.Registry + writer io.Writer +} + +// ReadResponse reads a server response into the received o. +func (o *V1InvoiceUIDReportInvoicePdfReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1InvoiceUIDReportInvoicePdfOK(o.writer) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1InvoiceUIDReportInvoicePdfOK creates a V1InvoiceUIDReportInvoicePdfOK with default headers values +func NewV1InvoiceUIDReportInvoicePdfOK(writer io.Writer) *V1InvoiceUIDReportInvoicePdfOK { + return &V1InvoiceUIDReportInvoicePdfOK{ + Payload: writer, + } +} + +/* +V1InvoiceUIDReportInvoicePdfOK handles this case with default header values. + +OK +*/ +type V1InvoiceUIDReportInvoicePdfOK struct { + ContentDisposition string + + ContentType string + + Payload io.Writer +} + +func (o *V1InvoiceUIDReportInvoicePdfOK) Error() string { + return fmt.Sprintf("[GET /v1/tenants/{tenantUid}/invoices/{invoiceUid}/report/invoice/pdf][%d] v1InvoiceUidReportInvoicePdfOK %+v", 200, o.Payload) +} + +func (o *V1InvoiceUIDReportInvoicePdfOK) GetPayload() io.Writer { + return o.Payload +} + +func (o *V1InvoiceUIDReportInvoicePdfOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Content-Disposition + o.ContentDisposition = response.GetHeader("Content-Disposition") + + // response header Content-Type + o.ContentType = response.GetHeader("Content-Type") + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_invoice_uid_report_pdf_parameters.go b/api/client/v1/v1_invoice_uid_report_pdf_parameters.go new file mode 100644 index 00000000..514bd28d --- /dev/null +++ b/api/client/v1/v1_invoice_uid_report_pdf_parameters.go @@ -0,0 +1,157 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1InvoiceUIDReportPdfParams creates a new V1InvoiceUIDReportPdfParams object +// with the default values initialized. +func NewV1InvoiceUIDReportPdfParams() *V1InvoiceUIDReportPdfParams { + var () + return &V1InvoiceUIDReportPdfParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1InvoiceUIDReportPdfParamsWithTimeout creates a new V1InvoiceUIDReportPdfParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1InvoiceUIDReportPdfParamsWithTimeout(timeout time.Duration) *V1InvoiceUIDReportPdfParams { + var () + return &V1InvoiceUIDReportPdfParams{ + + timeout: timeout, + } +} + +// NewV1InvoiceUIDReportPdfParamsWithContext creates a new V1InvoiceUIDReportPdfParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1InvoiceUIDReportPdfParamsWithContext(ctx context.Context) *V1InvoiceUIDReportPdfParams { + var () + return &V1InvoiceUIDReportPdfParams{ + + Context: ctx, + } +} + +// NewV1InvoiceUIDReportPdfParamsWithHTTPClient creates a new V1InvoiceUIDReportPdfParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1InvoiceUIDReportPdfParamsWithHTTPClient(client *http.Client) *V1InvoiceUIDReportPdfParams { + var () + return &V1InvoiceUIDReportPdfParams{ + HTTPClient: client, + } +} + +/* +V1InvoiceUIDReportPdfParams contains all the parameters to send to the API endpoint +for the v1 invoice Uid report pdf operation typically these are written to a http.Request +*/ +type V1InvoiceUIDReportPdfParams struct { + + /*InvoiceUID + Specify the invoice uid + + */ + InvoiceUID string + /*TenantUID + Specify the tenant uid + + */ + TenantUID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 invoice Uid report pdf params +func (o *V1InvoiceUIDReportPdfParams) WithTimeout(timeout time.Duration) *V1InvoiceUIDReportPdfParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 invoice Uid report pdf params +func (o *V1InvoiceUIDReportPdfParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 invoice Uid report pdf params +func (o *V1InvoiceUIDReportPdfParams) WithContext(ctx context.Context) *V1InvoiceUIDReportPdfParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 invoice Uid report pdf params +func (o *V1InvoiceUIDReportPdfParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 invoice Uid report pdf params +func (o *V1InvoiceUIDReportPdfParams) WithHTTPClient(client *http.Client) *V1InvoiceUIDReportPdfParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 invoice Uid report pdf params +func (o *V1InvoiceUIDReportPdfParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithInvoiceUID adds the invoiceUID to the v1 invoice Uid report pdf params +func (o *V1InvoiceUIDReportPdfParams) WithInvoiceUID(invoiceUID string) *V1InvoiceUIDReportPdfParams { + o.SetInvoiceUID(invoiceUID) + return o +} + +// SetInvoiceUID adds the invoiceUid to the v1 invoice Uid report pdf params +func (o *V1InvoiceUIDReportPdfParams) SetInvoiceUID(invoiceUID string) { + o.InvoiceUID = invoiceUID +} + +// WithTenantUID adds the tenantUID to the v1 invoice Uid report pdf params +func (o *V1InvoiceUIDReportPdfParams) WithTenantUID(tenantUID string) *V1InvoiceUIDReportPdfParams { + o.SetTenantUID(tenantUID) + return o +} + +// SetTenantUID adds the tenantUid to the v1 invoice Uid report pdf params +func (o *V1InvoiceUIDReportPdfParams) SetTenantUID(tenantUID string) { + o.TenantUID = tenantUID +} + +// WriteToRequest writes these params to a swagger request +func (o *V1InvoiceUIDReportPdfParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param invoiceUid + if err := r.SetPathParam("invoiceUid", o.InvoiceUID); err != nil { + return err + } + + // path param tenantUid + if err := r.SetPathParam("tenantUid", o.TenantUID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_invoice_uid_report_pdf_responses.go b/api/client/v1/v1_invoice_uid_report_pdf_responses.go new file mode 100644 index 00000000..0f181e3d --- /dev/null +++ b/api/client/v1/v1_invoice_uid_report_pdf_responses.go @@ -0,0 +1,79 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1InvoiceUIDReportPdfReader is a Reader for the V1InvoiceUIDReportPdf structure. +type V1InvoiceUIDReportPdfReader struct { + formats strfmt.Registry + writer io.Writer +} + +// ReadResponse reads a server response into the received o. +func (o *V1InvoiceUIDReportPdfReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1InvoiceUIDReportPdfOK(o.writer) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1InvoiceUIDReportPdfOK creates a V1InvoiceUIDReportPdfOK with default headers values +func NewV1InvoiceUIDReportPdfOK(writer io.Writer) *V1InvoiceUIDReportPdfOK { + return &V1InvoiceUIDReportPdfOK{ + Payload: writer, + } +} + +/* +V1InvoiceUIDReportPdfOK handles this case with default header values. + +OK +*/ +type V1InvoiceUIDReportPdfOK struct { + ContentDisposition string + + ContentType string + + Payload io.Writer +} + +func (o *V1InvoiceUIDReportPdfOK) Error() string { + return fmt.Sprintf("[GET /v1/tenants/{tenantUid}/invoices/{invoiceUid}/report/pdf][%d] v1InvoiceUidReportPdfOK %+v", 200, o.Payload) +} + +func (o *V1InvoiceUIDReportPdfOK) GetPayload() io.Writer { + return o.Payload +} + +func (o *V1InvoiceUIDReportPdfOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Content-Disposition + o.ContentDisposition = response.GetHeader("Content-Disposition") + + // response header Content-Type + o.ContentType = response.GetHeader("Content-Type") + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_invoice_uid_report_usage_pdf_parameters.go b/api/client/v1/v1_invoice_uid_report_usage_pdf_parameters.go new file mode 100644 index 00000000..8c5b47bd --- /dev/null +++ b/api/client/v1/v1_invoice_uid_report_usage_pdf_parameters.go @@ -0,0 +1,157 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1InvoiceUIDReportUsagePdfParams creates a new V1InvoiceUIDReportUsagePdfParams object +// with the default values initialized. +func NewV1InvoiceUIDReportUsagePdfParams() *V1InvoiceUIDReportUsagePdfParams { + var () + return &V1InvoiceUIDReportUsagePdfParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1InvoiceUIDReportUsagePdfParamsWithTimeout creates a new V1InvoiceUIDReportUsagePdfParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1InvoiceUIDReportUsagePdfParamsWithTimeout(timeout time.Duration) *V1InvoiceUIDReportUsagePdfParams { + var () + return &V1InvoiceUIDReportUsagePdfParams{ + + timeout: timeout, + } +} + +// NewV1InvoiceUIDReportUsagePdfParamsWithContext creates a new V1InvoiceUIDReportUsagePdfParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1InvoiceUIDReportUsagePdfParamsWithContext(ctx context.Context) *V1InvoiceUIDReportUsagePdfParams { + var () + return &V1InvoiceUIDReportUsagePdfParams{ + + Context: ctx, + } +} + +// NewV1InvoiceUIDReportUsagePdfParamsWithHTTPClient creates a new V1InvoiceUIDReportUsagePdfParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1InvoiceUIDReportUsagePdfParamsWithHTTPClient(client *http.Client) *V1InvoiceUIDReportUsagePdfParams { + var () + return &V1InvoiceUIDReportUsagePdfParams{ + HTTPClient: client, + } +} + +/* +V1InvoiceUIDReportUsagePdfParams contains all the parameters to send to the API endpoint +for the v1 invoice Uid report usage pdf operation typically these are written to a http.Request +*/ +type V1InvoiceUIDReportUsagePdfParams struct { + + /*InvoiceUID + Specify the invoice uid + + */ + InvoiceUID string + /*TenantUID + Specify the tenant uid + + */ + TenantUID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 invoice Uid report usage pdf params +func (o *V1InvoiceUIDReportUsagePdfParams) WithTimeout(timeout time.Duration) *V1InvoiceUIDReportUsagePdfParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 invoice Uid report usage pdf params +func (o *V1InvoiceUIDReportUsagePdfParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 invoice Uid report usage pdf params +func (o *V1InvoiceUIDReportUsagePdfParams) WithContext(ctx context.Context) *V1InvoiceUIDReportUsagePdfParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 invoice Uid report usage pdf params +func (o *V1InvoiceUIDReportUsagePdfParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 invoice Uid report usage pdf params +func (o *V1InvoiceUIDReportUsagePdfParams) WithHTTPClient(client *http.Client) *V1InvoiceUIDReportUsagePdfParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 invoice Uid report usage pdf params +func (o *V1InvoiceUIDReportUsagePdfParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithInvoiceUID adds the invoiceUID to the v1 invoice Uid report usage pdf params +func (o *V1InvoiceUIDReportUsagePdfParams) WithInvoiceUID(invoiceUID string) *V1InvoiceUIDReportUsagePdfParams { + o.SetInvoiceUID(invoiceUID) + return o +} + +// SetInvoiceUID adds the invoiceUid to the v1 invoice Uid report usage pdf params +func (o *V1InvoiceUIDReportUsagePdfParams) SetInvoiceUID(invoiceUID string) { + o.InvoiceUID = invoiceUID +} + +// WithTenantUID adds the tenantUID to the v1 invoice Uid report usage pdf params +func (o *V1InvoiceUIDReportUsagePdfParams) WithTenantUID(tenantUID string) *V1InvoiceUIDReportUsagePdfParams { + o.SetTenantUID(tenantUID) + return o +} + +// SetTenantUID adds the tenantUid to the v1 invoice Uid report usage pdf params +func (o *V1InvoiceUIDReportUsagePdfParams) SetTenantUID(tenantUID string) { + o.TenantUID = tenantUID +} + +// WriteToRequest writes these params to a swagger request +func (o *V1InvoiceUIDReportUsagePdfParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param invoiceUid + if err := r.SetPathParam("invoiceUid", o.InvoiceUID); err != nil { + return err + } + + // path param tenantUid + if err := r.SetPathParam("tenantUid", o.TenantUID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_invoice_uid_report_usage_pdf_responses.go b/api/client/v1/v1_invoice_uid_report_usage_pdf_responses.go new file mode 100644 index 00000000..0128f866 --- /dev/null +++ b/api/client/v1/v1_invoice_uid_report_usage_pdf_responses.go @@ -0,0 +1,79 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1InvoiceUIDReportUsagePdfReader is a Reader for the V1InvoiceUIDReportUsagePdf structure. +type V1InvoiceUIDReportUsagePdfReader struct { + formats strfmt.Registry + writer io.Writer +} + +// ReadResponse reads a server response into the received o. +func (o *V1InvoiceUIDReportUsagePdfReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1InvoiceUIDReportUsagePdfOK(o.writer) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1InvoiceUIDReportUsagePdfOK creates a V1InvoiceUIDReportUsagePdfOK with default headers values +func NewV1InvoiceUIDReportUsagePdfOK(writer io.Writer) *V1InvoiceUIDReportUsagePdfOK { + return &V1InvoiceUIDReportUsagePdfOK{ + Payload: writer, + } +} + +/* +V1InvoiceUIDReportUsagePdfOK handles this case with default header values. + +OK +*/ +type V1InvoiceUIDReportUsagePdfOK struct { + ContentDisposition string + + ContentType string + + Payload io.Writer +} + +func (o *V1InvoiceUIDReportUsagePdfOK) Error() string { + return fmt.Sprintf("[GET /v1/tenants/{tenantUid}/invoices/{invoiceUid}/report/usage/pdf][%d] v1InvoiceUidReportUsagePdfOK %+v", 200, o.Payload) +} + +func (o *V1InvoiceUIDReportUsagePdfOK) GetPayload() io.Writer { + return o.Payload +} + +func (o *V1InvoiceUIDReportUsagePdfOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Content-Disposition + o.ContentDisposition = response.GetHeader("Content-Disposition") + + // response header Content-Type + o.ContentType = response.GetHeader("Content-Type") + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_invoices_uid_get_parameters.go b/api/client/v1/v1_invoices_uid_get_parameters.go new file mode 100644 index 00000000..e09440f4 --- /dev/null +++ b/api/client/v1/v1_invoices_uid_get_parameters.go @@ -0,0 +1,157 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1InvoicesUIDGetParams creates a new V1InvoicesUIDGetParams object +// with the default values initialized. +func NewV1InvoicesUIDGetParams() *V1InvoicesUIDGetParams { + var () + return &V1InvoicesUIDGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1InvoicesUIDGetParamsWithTimeout creates a new V1InvoicesUIDGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1InvoicesUIDGetParamsWithTimeout(timeout time.Duration) *V1InvoicesUIDGetParams { + var () + return &V1InvoicesUIDGetParams{ + + timeout: timeout, + } +} + +// NewV1InvoicesUIDGetParamsWithContext creates a new V1InvoicesUIDGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1InvoicesUIDGetParamsWithContext(ctx context.Context) *V1InvoicesUIDGetParams { + var () + return &V1InvoicesUIDGetParams{ + + Context: ctx, + } +} + +// NewV1InvoicesUIDGetParamsWithHTTPClient creates a new V1InvoicesUIDGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1InvoicesUIDGetParamsWithHTTPClient(client *http.Client) *V1InvoicesUIDGetParams { + var () + return &V1InvoicesUIDGetParams{ + HTTPClient: client, + } +} + +/* +V1InvoicesUIDGetParams contains all the parameters to send to the API endpoint +for the v1 invoices Uid get operation typically these are written to a http.Request +*/ +type V1InvoicesUIDGetParams struct { + + /*InvoiceUID + Specify the invoice uid + + */ + InvoiceUID string + /*TenantUID + Specify the tenant uid + + */ + TenantUID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 invoices Uid get params +func (o *V1InvoicesUIDGetParams) WithTimeout(timeout time.Duration) *V1InvoicesUIDGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 invoices Uid get params +func (o *V1InvoicesUIDGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 invoices Uid get params +func (o *V1InvoicesUIDGetParams) WithContext(ctx context.Context) *V1InvoicesUIDGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 invoices Uid get params +func (o *V1InvoicesUIDGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 invoices Uid get params +func (o *V1InvoicesUIDGetParams) WithHTTPClient(client *http.Client) *V1InvoicesUIDGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 invoices Uid get params +func (o *V1InvoicesUIDGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithInvoiceUID adds the invoiceUID to the v1 invoices Uid get params +func (o *V1InvoicesUIDGetParams) WithInvoiceUID(invoiceUID string) *V1InvoicesUIDGetParams { + o.SetInvoiceUID(invoiceUID) + return o +} + +// SetInvoiceUID adds the invoiceUid to the v1 invoices Uid get params +func (o *V1InvoicesUIDGetParams) SetInvoiceUID(invoiceUID string) { + o.InvoiceUID = invoiceUID +} + +// WithTenantUID adds the tenantUID to the v1 invoices Uid get params +func (o *V1InvoicesUIDGetParams) WithTenantUID(tenantUID string) *V1InvoicesUIDGetParams { + o.SetTenantUID(tenantUID) + return o +} + +// SetTenantUID adds the tenantUid to the v1 invoices Uid get params +func (o *V1InvoicesUIDGetParams) SetTenantUID(tenantUID string) { + o.TenantUID = tenantUID +} + +// WriteToRequest writes these params to a swagger request +func (o *V1InvoicesUIDGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param invoiceUid + if err := r.SetPathParam("invoiceUid", o.InvoiceUID); err != nil { + return err + } + + // path param tenantUid + if err := r.SetPathParam("tenantUid", o.TenantUID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_invoices_uid_get_responses.go b/api/client/v1/v1_invoices_uid_get_responses.go new file mode 100644 index 00000000..1d207fb2 --- /dev/null +++ b/api/client/v1/v1_invoices_uid_get_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1InvoicesUIDGetReader is a Reader for the V1InvoicesUIDGet structure. +type V1InvoicesUIDGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1InvoicesUIDGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1InvoicesUIDGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1InvoicesUIDGetOK creates a V1InvoicesUIDGetOK with default headers values +func NewV1InvoicesUIDGetOK() *V1InvoicesUIDGetOK { + return &V1InvoicesUIDGetOK{} +} + +/* +V1InvoicesUIDGetOK handles this case with default header values. + +(empty) +*/ +type V1InvoicesUIDGetOK struct { + Payload *models.V1Invoice +} + +func (o *V1InvoicesUIDGetOK) Error() string { + return fmt.Sprintf("[GET /v1/tenants/{tenantUid}/invoices/{invoiceUid}][%d] v1InvoicesUidGetOK %+v", 200, o.Payload) +} + +func (o *V1InvoicesUIDGetOK) GetPayload() *models.V1Invoice { + return o.Payload +} + +func (o *V1InvoicesUIDGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1Invoice) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_libvirt_clusters_hosts_list_parameters.go b/api/client/v1/v1_libvirt_clusters_hosts_list_parameters.go new file mode 100644 index 00000000..8d152449 --- /dev/null +++ b/api/client/v1/v1_libvirt_clusters_hosts_list_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1LibvirtClustersHostsListParams creates a new V1LibvirtClustersHostsListParams object +// with the default values initialized. +func NewV1LibvirtClustersHostsListParams() *V1LibvirtClustersHostsListParams { + var () + return &V1LibvirtClustersHostsListParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1LibvirtClustersHostsListParamsWithTimeout creates a new V1LibvirtClustersHostsListParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1LibvirtClustersHostsListParamsWithTimeout(timeout time.Duration) *V1LibvirtClustersHostsListParams { + var () + return &V1LibvirtClustersHostsListParams{ + + timeout: timeout, + } +} + +// NewV1LibvirtClustersHostsListParamsWithContext creates a new V1LibvirtClustersHostsListParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1LibvirtClustersHostsListParamsWithContext(ctx context.Context) *V1LibvirtClustersHostsListParams { + var () + return &V1LibvirtClustersHostsListParams{ + + Context: ctx, + } +} + +// NewV1LibvirtClustersHostsListParamsWithHTTPClient creates a new V1LibvirtClustersHostsListParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1LibvirtClustersHostsListParamsWithHTTPClient(client *http.Client) *V1LibvirtClustersHostsListParams { + var () + return &V1LibvirtClustersHostsListParams{ + HTTPClient: client, + } +} + +/* +V1LibvirtClustersHostsListParams contains all the parameters to send to the API endpoint +for the v1 libvirt clusters hosts list operation typically these are written to a http.Request +*/ +type V1LibvirtClustersHostsListParams struct { + + /*UID + Cluster uid + + */ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 libvirt clusters hosts list params +func (o *V1LibvirtClustersHostsListParams) WithTimeout(timeout time.Duration) *V1LibvirtClustersHostsListParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 libvirt clusters hosts list params +func (o *V1LibvirtClustersHostsListParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 libvirt clusters hosts list params +func (o *V1LibvirtClustersHostsListParams) WithContext(ctx context.Context) *V1LibvirtClustersHostsListParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 libvirt clusters hosts list params +func (o *V1LibvirtClustersHostsListParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 libvirt clusters hosts list params +func (o *V1LibvirtClustersHostsListParams) WithHTTPClient(client *http.Client) *V1LibvirtClustersHostsListParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 libvirt clusters hosts list params +func (o *V1LibvirtClustersHostsListParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithUID adds the uid to the v1 libvirt clusters hosts list params +func (o *V1LibvirtClustersHostsListParams) WithUID(uid string) *V1LibvirtClustersHostsListParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 libvirt clusters hosts list params +func (o *V1LibvirtClustersHostsListParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1LibvirtClustersHostsListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_libvirt_clusters_hosts_list_responses.go b/api/client/v1/v1_libvirt_clusters_hosts_list_responses.go new file mode 100644 index 00000000..5dfe61da --- /dev/null +++ b/api/client/v1/v1_libvirt_clusters_hosts_list_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1LibvirtClustersHostsListReader is a Reader for the V1LibvirtClustersHostsList structure. +type V1LibvirtClustersHostsListReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1LibvirtClustersHostsListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1LibvirtClustersHostsListOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1LibvirtClustersHostsListOK creates a V1LibvirtClustersHostsListOK with default headers values +func NewV1LibvirtClustersHostsListOK() *V1LibvirtClustersHostsListOK { + return &V1LibvirtClustersHostsListOK{} +} + +/* +V1LibvirtClustersHostsListOK handles this case with default header values. + +List of edge host devices +*/ +type V1LibvirtClustersHostsListOK struct { + Payload *models.V1EdgeHostDevices +} + +func (o *V1LibvirtClustersHostsListOK) Error() string { + return fmt.Sprintf("[GET /v1/spectroclusters/{uid}/libvirt/edgeHosts][%d] v1LibvirtClustersHostsListOK %+v", 200, o.Payload) +} + +func (o *V1LibvirtClustersHostsListOK) GetPayload() *models.V1EdgeHostDevices { + return o.Payload +} + +func (o *V1LibvirtClustersHostsListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1EdgeHostDevices) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_maas_account_validate_parameters.go b/api/client/v1/v1_maas_account_validate_parameters.go new file mode 100644 index 00000000..cd8f6c5e --- /dev/null +++ b/api/client/v1/v1_maas_account_validate_parameters.go @@ -0,0 +1,139 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1MaasAccountValidateParams creates a new V1MaasAccountValidateParams object +// with the default values initialized. +func NewV1MaasAccountValidateParams() *V1MaasAccountValidateParams { + var () + return &V1MaasAccountValidateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1MaasAccountValidateParamsWithTimeout creates a new V1MaasAccountValidateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1MaasAccountValidateParamsWithTimeout(timeout time.Duration) *V1MaasAccountValidateParams { + var () + return &V1MaasAccountValidateParams{ + + timeout: timeout, + } +} + +// NewV1MaasAccountValidateParamsWithContext creates a new V1MaasAccountValidateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1MaasAccountValidateParamsWithContext(ctx context.Context) *V1MaasAccountValidateParams { + var () + return &V1MaasAccountValidateParams{ + + Context: ctx, + } +} + +// NewV1MaasAccountValidateParamsWithHTTPClient creates a new V1MaasAccountValidateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1MaasAccountValidateParamsWithHTTPClient(client *http.Client) *V1MaasAccountValidateParams { + var () + return &V1MaasAccountValidateParams{ + HTTPClient: client, + } +} + +/* +V1MaasAccountValidateParams contains all the parameters to send to the API endpoint +for the v1 maas account validate operation typically these are written to a http.Request +*/ +type V1MaasAccountValidateParams struct { + + /*Account + Request payload for Maas cloud account + + */ + Account *models.V1MaasCloudAccount + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 maas account validate params +func (o *V1MaasAccountValidateParams) WithTimeout(timeout time.Duration) *V1MaasAccountValidateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 maas account validate params +func (o *V1MaasAccountValidateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 maas account validate params +func (o *V1MaasAccountValidateParams) WithContext(ctx context.Context) *V1MaasAccountValidateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 maas account validate params +func (o *V1MaasAccountValidateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 maas account validate params +func (o *V1MaasAccountValidateParams) WithHTTPClient(client *http.Client) *V1MaasAccountValidateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 maas account validate params +func (o *V1MaasAccountValidateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithAccount adds the account to the v1 maas account validate params +func (o *V1MaasAccountValidateParams) WithAccount(account *models.V1MaasCloudAccount) *V1MaasAccountValidateParams { + o.SetAccount(account) + return o +} + +// SetAccount adds the account to the v1 maas account validate params +func (o *V1MaasAccountValidateParams) SetAccount(account *models.V1MaasCloudAccount) { + o.Account = account +} + +// WriteToRequest writes these params to a swagger request +func (o *V1MaasAccountValidateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Account != nil { + if err := r.SetBodyParam(o.Account); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_maas_account_validate_responses.go b/api/client/v1/v1_maas_account_validate_responses.go new file mode 100644 index 00000000..0731c0eb --- /dev/null +++ b/api/client/v1/v1_maas_account_validate_responses.go @@ -0,0 +1,61 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1MaasAccountValidateReader is a Reader for the V1MaasAccountValidate structure. +type V1MaasAccountValidateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1MaasAccountValidateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1MaasAccountValidateNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1MaasAccountValidateNoContent creates a V1MaasAccountValidateNoContent with default headers values +func NewV1MaasAccountValidateNoContent() *V1MaasAccountValidateNoContent { + return &V1MaasAccountValidateNoContent{} +} + +/* +V1MaasAccountValidateNoContent handles this case with default header values. + +Ok response without content +*/ +type V1MaasAccountValidateNoContent struct { + /*Audit uid for the request + */ + AuditUID string +} + +func (o *V1MaasAccountValidateNoContent) Error() string { + return fmt.Sprintf("[POST /v1/clouds/maas/account/validate][%d] v1MaasAccountValidateNoContent ", 204) +} + +func (o *V1MaasAccountValidateNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header AuditUid + o.AuditUID = response.GetHeader("AuditUid") + + return nil +} diff --git a/api/client/v1/v1_maas_accounts_uid_azs_parameters.go b/api/client/v1/v1_maas_accounts_uid_azs_parameters.go new file mode 100644 index 00000000..72dfe7d0 --- /dev/null +++ b/api/client/v1/v1_maas_accounts_uid_azs_parameters.go @@ -0,0 +1,133 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1MaasAccountsUIDAzsParams creates a new V1MaasAccountsUIDAzsParams object +// with the default values initialized. +func NewV1MaasAccountsUIDAzsParams() *V1MaasAccountsUIDAzsParams { + var () + return &V1MaasAccountsUIDAzsParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1MaasAccountsUIDAzsParamsWithTimeout creates a new V1MaasAccountsUIDAzsParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1MaasAccountsUIDAzsParamsWithTimeout(timeout time.Duration) *V1MaasAccountsUIDAzsParams { + var () + return &V1MaasAccountsUIDAzsParams{ + + timeout: timeout, + } +} + +// NewV1MaasAccountsUIDAzsParamsWithContext creates a new V1MaasAccountsUIDAzsParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1MaasAccountsUIDAzsParamsWithContext(ctx context.Context) *V1MaasAccountsUIDAzsParams { + var () + return &V1MaasAccountsUIDAzsParams{ + + Context: ctx, + } +} + +// NewV1MaasAccountsUIDAzsParamsWithHTTPClient creates a new V1MaasAccountsUIDAzsParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1MaasAccountsUIDAzsParamsWithHTTPClient(client *http.Client) *V1MaasAccountsUIDAzsParams { + var () + return &V1MaasAccountsUIDAzsParams{ + HTTPClient: client, + } +} + +/* +V1MaasAccountsUIDAzsParams contains all the parameters to send to the API endpoint +for the v1 maas accounts Uid azs operation typically these are written to a http.Request +*/ +type V1MaasAccountsUIDAzsParams struct { + + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 maas accounts Uid azs params +func (o *V1MaasAccountsUIDAzsParams) WithTimeout(timeout time.Duration) *V1MaasAccountsUIDAzsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 maas accounts Uid azs params +func (o *V1MaasAccountsUIDAzsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 maas accounts Uid azs params +func (o *V1MaasAccountsUIDAzsParams) WithContext(ctx context.Context) *V1MaasAccountsUIDAzsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 maas accounts Uid azs params +func (o *V1MaasAccountsUIDAzsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 maas accounts Uid azs params +func (o *V1MaasAccountsUIDAzsParams) WithHTTPClient(client *http.Client) *V1MaasAccountsUIDAzsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 maas accounts Uid azs params +func (o *V1MaasAccountsUIDAzsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithUID adds the uid to the v1 maas accounts Uid azs params +func (o *V1MaasAccountsUIDAzsParams) WithUID(uid string) *V1MaasAccountsUIDAzsParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 maas accounts Uid azs params +func (o *V1MaasAccountsUIDAzsParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1MaasAccountsUIDAzsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_maas_accounts_uid_azs_responses.go b/api/client/v1/v1_maas_accounts_uid_azs_responses.go new file mode 100644 index 00000000..1c5edb73 --- /dev/null +++ b/api/client/v1/v1_maas_accounts_uid_azs_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1MaasAccountsUIDAzsReader is a Reader for the V1MaasAccountsUIDAzs structure. +type V1MaasAccountsUIDAzsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1MaasAccountsUIDAzsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1MaasAccountsUIDAzsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1MaasAccountsUIDAzsOK creates a V1MaasAccountsUIDAzsOK with default headers values +func NewV1MaasAccountsUIDAzsOK() *V1MaasAccountsUIDAzsOK { + return &V1MaasAccountsUIDAzsOK{} +} + +/* +V1MaasAccountsUIDAzsOK handles this case with default header values. + +(empty) +*/ +type V1MaasAccountsUIDAzsOK struct { + Payload *models.V1MaasZones +} + +func (o *V1MaasAccountsUIDAzsOK) Error() string { + return fmt.Sprintf("[GET /v1/cloudaccounts/maas/{uid}/properties/azs][%d] v1MaasAccountsUidAzsOK %+v", 200, o.Payload) +} + +func (o *V1MaasAccountsUIDAzsOK) GetPayload() *models.V1MaasZones { + return o.Payload +} + +func (o *V1MaasAccountsUIDAzsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1MaasZones) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_maas_accounts_uid_domains_parameters.go b/api/client/v1/v1_maas_accounts_uid_domains_parameters.go new file mode 100644 index 00000000..6f3cf7d5 --- /dev/null +++ b/api/client/v1/v1_maas_accounts_uid_domains_parameters.go @@ -0,0 +1,133 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1MaasAccountsUIDDomainsParams creates a new V1MaasAccountsUIDDomainsParams object +// with the default values initialized. +func NewV1MaasAccountsUIDDomainsParams() *V1MaasAccountsUIDDomainsParams { + var () + return &V1MaasAccountsUIDDomainsParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1MaasAccountsUIDDomainsParamsWithTimeout creates a new V1MaasAccountsUIDDomainsParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1MaasAccountsUIDDomainsParamsWithTimeout(timeout time.Duration) *V1MaasAccountsUIDDomainsParams { + var () + return &V1MaasAccountsUIDDomainsParams{ + + timeout: timeout, + } +} + +// NewV1MaasAccountsUIDDomainsParamsWithContext creates a new V1MaasAccountsUIDDomainsParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1MaasAccountsUIDDomainsParamsWithContext(ctx context.Context) *V1MaasAccountsUIDDomainsParams { + var () + return &V1MaasAccountsUIDDomainsParams{ + + Context: ctx, + } +} + +// NewV1MaasAccountsUIDDomainsParamsWithHTTPClient creates a new V1MaasAccountsUIDDomainsParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1MaasAccountsUIDDomainsParamsWithHTTPClient(client *http.Client) *V1MaasAccountsUIDDomainsParams { + var () + return &V1MaasAccountsUIDDomainsParams{ + HTTPClient: client, + } +} + +/* +V1MaasAccountsUIDDomainsParams contains all the parameters to send to the API endpoint +for the v1 maas accounts Uid domains operation typically these are written to a http.Request +*/ +type V1MaasAccountsUIDDomainsParams struct { + + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 maas accounts Uid domains params +func (o *V1MaasAccountsUIDDomainsParams) WithTimeout(timeout time.Duration) *V1MaasAccountsUIDDomainsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 maas accounts Uid domains params +func (o *V1MaasAccountsUIDDomainsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 maas accounts Uid domains params +func (o *V1MaasAccountsUIDDomainsParams) WithContext(ctx context.Context) *V1MaasAccountsUIDDomainsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 maas accounts Uid domains params +func (o *V1MaasAccountsUIDDomainsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 maas accounts Uid domains params +func (o *V1MaasAccountsUIDDomainsParams) WithHTTPClient(client *http.Client) *V1MaasAccountsUIDDomainsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 maas accounts Uid domains params +func (o *V1MaasAccountsUIDDomainsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithUID adds the uid to the v1 maas accounts Uid domains params +func (o *V1MaasAccountsUIDDomainsParams) WithUID(uid string) *V1MaasAccountsUIDDomainsParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 maas accounts Uid domains params +func (o *V1MaasAccountsUIDDomainsParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1MaasAccountsUIDDomainsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_maas_accounts_uid_domains_responses.go b/api/client/v1/v1_maas_accounts_uid_domains_responses.go new file mode 100644 index 00000000..fb9a1f1c --- /dev/null +++ b/api/client/v1/v1_maas_accounts_uid_domains_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1MaasAccountsUIDDomainsReader is a Reader for the V1MaasAccountsUIDDomains structure. +type V1MaasAccountsUIDDomainsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1MaasAccountsUIDDomainsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1MaasAccountsUIDDomainsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1MaasAccountsUIDDomainsOK creates a V1MaasAccountsUIDDomainsOK with default headers values +func NewV1MaasAccountsUIDDomainsOK() *V1MaasAccountsUIDDomainsOK { + return &V1MaasAccountsUIDDomainsOK{} +} + +/* +V1MaasAccountsUIDDomainsOK handles this case with default header values. + +(empty) +*/ +type V1MaasAccountsUIDDomainsOK struct { + Payload *models.V1MaasDomains +} + +func (o *V1MaasAccountsUIDDomainsOK) Error() string { + return fmt.Sprintf("[GET /v1/cloudaccounts/maas/{uid}/properties/domains][%d] v1MaasAccountsUidDomainsOK %+v", 200, o.Payload) +} + +func (o *V1MaasAccountsUIDDomainsOK) GetPayload() *models.V1MaasDomains { + return o.Payload +} + +func (o *V1MaasAccountsUIDDomainsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1MaasDomains) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_maas_accounts_uid_pools_parameters.go b/api/client/v1/v1_maas_accounts_uid_pools_parameters.go new file mode 100644 index 00000000..6385b30a --- /dev/null +++ b/api/client/v1/v1_maas_accounts_uid_pools_parameters.go @@ -0,0 +1,133 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1MaasAccountsUIDPoolsParams creates a new V1MaasAccountsUIDPoolsParams object +// with the default values initialized. +func NewV1MaasAccountsUIDPoolsParams() *V1MaasAccountsUIDPoolsParams { + var () + return &V1MaasAccountsUIDPoolsParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1MaasAccountsUIDPoolsParamsWithTimeout creates a new V1MaasAccountsUIDPoolsParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1MaasAccountsUIDPoolsParamsWithTimeout(timeout time.Duration) *V1MaasAccountsUIDPoolsParams { + var () + return &V1MaasAccountsUIDPoolsParams{ + + timeout: timeout, + } +} + +// NewV1MaasAccountsUIDPoolsParamsWithContext creates a new V1MaasAccountsUIDPoolsParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1MaasAccountsUIDPoolsParamsWithContext(ctx context.Context) *V1MaasAccountsUIDPoolsParams { + var () + return &V1MaasAccountsUIDPoolsParams{ + + Context: ctx, + } +} + +// NewV1MaasAccountsUIDPoolsParamsWithHTTPClient creates a new V1MaasAccountsUIDPoolsParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1MaasAccountsUIDPoolsParamsWithHTTPClient(client *http.Client) *V1MaasAccountsUIDPoolsParams { + var () + return &V1MaasAccountsUIDPoolsParams{ + HTTPClient: client, + } +} + +/* +V1MaasAccountsUIDPoolsParams contains all the parameters to send to the API endpoint +for the v1 maas accounts Uid pools operation typically these are written to a http.Request +*/ +type V1MaasAccountsUIDPoolsParams struct { + + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 maas accounts Uid pools params +func (o *V1MaasAccountsUIDPoolsParams) WithTimeout(timeout time.Duration) *V1MaasAccountsUIDPoolsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 maas accounts Uid pools params +func (o *V1MaasAccountsUIDPoolsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 maas accounts Uid pools params +func (o *V1MaasAccountsUIDPoolsParams) WithContext(ctx context.Context) *V1MaasAccountsUIDPoolsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 maas accounts Uid pools params +func (o *V1MaasAccountsUIDPoolsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 maas accounts Uid pools params +func (o *V1MaasAccountsUIDPoolsParams) WithHTTPClient(client *http.Client) *V1MaasAccountsUIDPoolsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 maas accounts Uid pools params +func (o *V1MaasAccountsUIDPoolsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithUID adds the uid to the v1 maas accounts Uid pools params +func (o *V1MaasAccountsUIDPoolsParams) WithUID(uid string) *V1MaasAccountsUIDPoolsParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 maas accounts Uid pools params +func (o *V1MaasAccountsUIDPoolsParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1MaasAccountsUIDPoolsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_maas_accounts_uid_pools_responses.go b/api/client/v1/v1_maas_accounts_uid_pools_responses.go new file mode 100644 index 00000000..aa4aa2e3 --- /dev/null +++ b/api/client/v1/v1_maas_accounts_uid_pools_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1MaasAccountsUIDPoolsReader is a Reader for the V1MaasAccountsUIDPools structure. +type V1MaasAccountsUIDPoolsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1MaasAccountsUIDPoolsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1MaasAccountsUIDPoolsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1MaasAccountsUIDPoolsOK creates a V1MaasAccountsUIDPoolsOK with default headers values +func NewV1MaasAccountsUIDPoolsOK() *V1MaasAccountsUIDPoolsOK { + return &V1MaasAccountsUIDPoolsOK{} +} + +/* +V1MaasAccountsUIDPoolsOK handles this case with default header values. + +(empty) +*/ +type V1MaasAccountsUIDPoolsOK struct { + Payload *models.V1MaasPools +} + +func (o *V1MaasAccountsUIDPoolsOK) Error() string { + return fmt.Sprintf("[GET /v1/cloudaccounts/maas/{uid}/properties/resourcePools][%d] v1MaasAccountsUidPoolsOK %+v", 200, o.Payload) +} + +func (o *V1MaasAccountsUIDPoolsOK) GetPayload() *models.V1MaasPools { + return o.Payload +} + +func (o *V1MaasAccountsUIDPoolsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1MaasPools) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_maas_accounts_uid_subnets_parameters.go b/api/client/v1/v1_maas_accounts_uid_subnets_parameters.go new file mode 100644 index 00000000..48ae98a9 --- /dev/null +++ b/api/client/v1/v1_maas_accounts_uid_subnets_parameters.go @@ -0,0 +1,133 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1MaasAccountsUIDSubnetsParams creates a new V1MaasAccountsUIDSubnetsParams object +// with the default values initialized. +func NewV1MaasAccountsUIDSubnetsParams() *V1MaasAccountsUIDSubnetsParams { + var () + return &V1MaasAccountsUIDSubnetsParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1MaasAccountsUIDSubnetsParamsWithTimeout creates a new V1MaasAccountsUIDSubnetsParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1MaasAccountsUIDSubnetsParamsWithTimeout(timeout time.Duration) *V1MaasAccountsUIDSubnetsParams { + var () + return &V1MaasAccountsUIDSubnetsParams{ + + timeout: timeout, + } +} + +// NewV1MaasAccountsUIDSubnetsParamsWithContext creates a new V1MaasAccountsUIDSubnetsParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1MaasAccountsUIDSubnetsParamsWithContext(ctx context.Context) *V1MaasAccountsUIDSubnetsParams { + var () + return &V1MaasAccountsUIDSubnetsParams{ + + Context: ctx, + } +} + +// NewV1MaasAccountsUIDSubnetsParamsWithHTTPClient creates a new V1MaasAccountsUIDSubnetsParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1MaasAccountsUIDSubnetsParamsWithHTTPClient(client *http.Client) *V1MaasAccountsUIDSubnetsParams { + var () + return &V1MaasAccountsUIDSubnetsParams{ + HTTPClient: client, + } +} + +/* +V1MaasAccountsUIDSubnetsParams contains all the parameters to send to the API endpoint +for the v1 maas accounts Uid subnets operation typically these are written to a http.Request +*/ +type V1MaasAccountsUIDSubnetsParams struct { + + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 maas accounts Uid subnets params +func (o *V1MaasAccountsUIDSubnetsParams) WithTimeout(timeout time.Duration) *V1MaasAccountsUIDSubnetsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 maas accounts Uid subnets params +func (o *V1MaasAccountsUIDSubnetsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 maas accounts Uid subnets params +func (o *V1MaasAccountsUIDSubnetsParams) WithContext(ctx context.Context) *V1MaasAccountsUIDSubnetsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 maas accounts Uid subnets params +func (o *V1MaasAccountsUIDSubnetsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 maas accounts Uid subnets params +func (o *V1MaasAccountsUIDSubnetsParams) WithHTTPClient(client *http.Client) *V1MaasAccountsUIDSubnetsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 maas accounts Uid subnets params +func (o *V1MaasAccountsUIDSubnetsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithUID adds the uid to the v1 maas accounts Uid subnets params +func (o *V1MaasAccountsUIDSubnetsParams) WithUID(uid string) *V1MaasAccountsUIDSubnetsParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 maas accounts Uid subnets params +func (o *V1MaasAccountsUIDSubnetsParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1MaasAccountsUIDSubnetsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_maas_accounts_uid_subnets_responses.go b/api/client/v1/v1_maas_accounts_uid_subnets_responses.go new file mode 100644 index 00000000..66419460 --- /dev/null +++ b/api/client/v1/v1_maas_accounts_uid_subnets_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1MaasAccountsUIDSubnetsReader is a Reader for the V1MaasAccountsUIDSubnets structure. +type V1MaasAccountsUIDSubnetsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1MaasAccountsUIDSubnetsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1MaasAccountsUIDSubnetsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1MaasAccountsUIDSubnetsOK creates a V1MaasAccountsUIDSubnetsOK with default headers values +func NewV1MaasAccountsUIDSubnetsOK() *V1MaasAccountsUIDSubnetsOK { + return &V1MaasAccountsUIDSubnetsOK{} +} + +/* +V1MaasAccountsUIDSubnetsOK handles this case with default header values. + +(empty) +*/ +type V1MaasAccountsUIDSubnetsOK struct { + Payload *models.V1MaasSubnets +} + +func (o *V1MaasAccountsUIDSubnetsOK) Error() string { + return fmt.Sprintf("[GET /v1/cloudaccounts/maas/{uid}/properties/subnets][%d] v1MaasAccountsUidSubnetsOK %+v", 200, o.Payload) +} + +func (o *V1MaasAccountsUIDSubnetsOK) GetPayload() *models.V1MaasSubnets { + return o.Payload +} + +func (o *V1MaasAccountsUIDSubnetsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1MaasSubnets) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_maas_accounts_uid_tags_parameters.go b/api/client/v1/v1_maas_accounts_uid_tags_parameters.go new file mode 100644 index 00000000..4438220d --- /dev/null +++ b/api/client/v1/v1_maas_accounts_uid_tags_parameters.go @@ -0,0 +1,133 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1MaasAccountsUIDTagsParams creates a new V1MaasAccountsUIDTagsParams object +// with the default values initialized. +func NewV1MaasAccountsUIDTagsParams() *V1MaasAccountsUIDTagsParams { + var () + return &V1MaasAccountsUIDTagsParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1MaasAccountsUIDTagsParamsWithTimeout creates a new V1MaasAccountsUIDTagsParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1MaasAccountsUIDTagsParamsWithTimeout(timeout time.Duration) *V1MaasAccountsUIDTagsParams { + var () + return &V1MaasAccountsUIDTagsParams{ + + timeout: timeout, + } +} + +// NewV1MaasAccountsUIDTagsParamsWithContext creates a new V1MaasAccountsUIDTagsParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1MaasAccountsUIDTagsParamsWithContext(ctx context.Context) *V1MaasAccountsUIDTagsParams { + var () + return &V1MaasAccountsUIDTagsParams{ + + Context: ctx, + } +} + +// NewV1MaasAccountsUIDTagsParamsWithHTTPClient creates a new V1MaasAccountsUIDTagsParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1MaasAccountsUIDTagsParamsWithHTTPClient(client *http.Client) *V1MaasAccountsUIDTagsParams { + var () + return &V1MaasAccountsUIDTagsParams{ + HTTPClient: client, + } +} + +/* +V1MaasAccountsUIDTagsParams contains all the parameters to send to the API endpoint +for the v1 maas accounts Uid tags operation typically these are written to a http.Request +*/ +type V1MaasAccountsUIDTagsParams struct { + + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 maas accounts Uid tags params +func (o *V1MaasAccountsUIDTagsParams) WithTimeout(timeout time.Duration) *V1MaasAccountsUIDTagsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 maas accounts Uid tags params +func (o *V1MaasAccountsUIDTagsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 maas accounts Uid tags params +func (o *V1MaasAccountsUIDTagsParams) WithContext(ctx context.Context) *V1MaasAccountsUIDTagsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 maas accounts Uid tags params +func (o *V1MaasAccountsUIDTagsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 maas accounts Uid tags params +func (o *V1MaasAccountsUIDTagsParams) WithHTTPClient(client *http.Client) *V1MaasAccountsUIDTagsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 maas accounts Uid tags params +func (o *V1MaasAccountsUIDTagsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithUID adds the uid to the v1 maas accounts Uid tags params +func (o *V1MaasAccountsUIDTagsParams) WithUID(uid string) *V1MaasAccountsUIDTagsParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 maas accounts Uid tags params +func (o *V1MaasAccountsUIDTagsParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1MaasAccountsUIDTagsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_maas_accounts_uid_tags_responses.go b/api/client/v1/v1_maas_accounts_uid_tags_responses.go new file mode 100644 index 00000000..dd97d7e5 --- /dev/null +++ b/api/client/v1/v1_maas_accounts_uid_tags_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1MaasAccountsUIDTagsReader is a Reader for the V1MaasAccountsUIDTags structure. +type V1MaasAccountsUIDTagsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1MaasAccountsUIDTagsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1MaasAccountsUIDTagsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1MaasAccountsUIDTagsOK creates a V1MaasAccountsUIDTagsOK with default headers values +func NewV1MaasAccountsUIDTagsOK() *V1MaasAccountsUIDTagsOK { + return &V1MaasAccountsUIDTagsOK{} +} + +/* +V1MaasAccountsUIDTagsOK handles this case with default header values. + +(empty) +*/ +type V1MaasAccountsUIDTagsOK struct { + Payload *models.V1MaasTags +} + +func (o *V1MaasAccountsUIDTagsOK) Error() string { + return fmt.Sprintf("[GET /v1/cloudaccounts/maas/{uid}/properties/tags][%d] v1MaasAccountsUidTagsOK %+v", 200, o.Payload) +} + +func (o *V1MaasAccountsUIDTagsOK) GetPayload() *models.V1MaasTags { + return o.Payload +} + +func (o *V1MaasAccountsUIDTagsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1MaasTags) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_maas_domains_get_parameters.go b/api/client/v1/v1_maas_domains_get_parameters.go new file mode 100644 index 00000000..01a29e15 --- /dev/null +++ b/api/client/v1/v1_maas_domains_get_parameters.go @@ -0,0 +1,147 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1MaasDomainsGetParams creates a new V1MaasDomainsGetParams object +// with the default values initialized. +func NewV1MaasDomainsGetParams() *V1MaasDomainsGetParams { + var () + return &V1MaasDomainsGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1MaasDomainsGetParamsWithTimeout creates a new V1MaasDomainsGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1MaasDomainsGetParamsWithTimeout(timeout time.Duration) *V1MaasDomainsGetParams { + var () + return &V1MaasDomainsGetParams{ + + timeout: timeout, + } +} + +// NewV1MaasDomainsGetParamsWithContext creates a new V1MaasDomainsGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1MaasDomainsGetParamsWithContext(ctx context.Context) *V1MaasDomainsGetParams { + var () + return &V1MaasDomainsGetParams{ + + Context: ctx, + } +} + +// NewV1MaasDomainsGetParamsWithHTTPClient creates a new V1MaasDomainsGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1MaasDomainsGetParamsWithHTTPClient(client *http.Client) *V1MaasDomainsGetParams { + var () + return &V1MaasDomainsGetParams{ + HTTPClient: client, + } +} + +/* +V1MaasDomainsGetParams contains all the parameters to send to the API endpoint +for the v1 maas domains get operation typically these are written to a http.Request +*/ +type V1MaasDomainsGetParams struct { + + /*CloudAccountUID + Uid for the specific Maas cloud account + + */ + CloudAccountUID *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 maas domains get params +func (o *V1MaasDomainsGetParams) WithTimeout(timeout time.Duration) *V1MaasDomainsGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 maas domains get params +func (o *V1MaasDomainsGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 maas domains get params +func (o *V1MaasDomainsGetParams) WithContext(ctx context.Context) *V1MaasDomainsGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 maas domains get params +func (o *V1MaasDomainsGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 maas domains get params +func (o *V1MaasDomainsGetParams) WithHTTPClient(client *http.Client) *V1MaasDomainsGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 maas domains get params +func (o *V1MaasDomainsGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithCloudAccountUID adds the cloudAccountUID to the v1 maas domains get params +func (o *V1MaasDomainsGetParams) WithCloudAccountUID(cloudAccountUID *string) *V1MaasDomainsGetParams { + o.SetCloudAccountUID(cloudAccountUID) + return o +} + +// SetCloudAccountUID adds the cloudAccountUid to the v1 maas domains get params +func (o *V1MaasDomainsGetParams) SetCloudAccountUID(cloudAccountUID *string) { + o.CloudAccountUID = cloudAccountUID +} + +// WriteToRequest writes these params to a swagger request +func (o *V1MaasDomainsGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.CloudAccountUID != nil { + + // query param cloudAccountUid + var qrCloudAccountUID string + if o.CloudAccountUID != nil { + qrCloudAccountUID = *o.CloudAccountUID + } + qCloudAccountUID := qrCloudAccountUID + if qCloudAccountUID != "" { + if err := r.SetQueryParam("cloudAccountUid", qCloudAccountUID); err != nil { + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_maas_domains_get_responses.go b/api/client/v1/v1_maas_domains_get_responses.go new file mode 100644 index 00000000..59eb3e16 --- /dev/null +++ b/api/client/v1/v1_maas_domains_get_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1MaasDomainsGetReader is a Reader for the V1MaasDomainsGet structure. +type V1MaasDomainsGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1MaasDomainsGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1MaasDomainsGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1MaasDomainsGetOK creates a V1MaasDomainsGetOK with default headers values +func NewV1MaasDomainsGetOK() *V1MaasDomainsGetOK { + return &V1MaasDomainsGetOK{} +} + +/* +V1MaasDomainsGetOK handles this case with default header values. + +(empty) +*/ +type V1MaasDomainsGetOK struct { + Payload *models.V1MaasDomains +} + +func (o *V1MaasDomainsGetOK) Error() string { + return fmt.Sprintf("[GET /v1/clouds/maas/domains][%d] v1MaasDomainsGetOK %+v", 200, o.Payload) +} + +func (o *V1MaasDomainsGetOK) GetPayload() *models.V1MaasDomains { + return o.Payload +} + +func (o *V1MaasDomainsGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1MaasDomains) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_maas_pools_get_parameters.go b/api/client/v1/v1_maas_pools_get_parameters.go new file mode 100644 index 00000000..03d2bacb --- /dev/null +++ b/api/client/v1/v1_maas_pools_get_parameters.go @@ -0,0 +1,147 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1MaasPoolsGetParams creates a new V1MaasPoolsGetParams object +// with the default values initialized. +func NewV1MaasPoolsGetParams() *V1MaasPoolsGetParams { + var () + return &V1MaasPoolsGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1MaasPoolsGetParamsWithTimeout creates a new V1MaasPoolsGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1MaasPoolsGetParamsWithTimeout(timeout time.Duration) *V1MaasPoolsGetParams { + var () + return &V1MaasPoolsGetParams{ + + timeout: timeout, + } +} + +// NewV1MaasPoolsGetParamsWithContext creates a new V1MaasPoolsGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1MaasPoolsGetParamsWithContext(ctx context.Context) *V1MaasPoolsGetParams { + var () + return &V1MaasPoolsGetParams{ + + Context: ctx, + } +} + +// NewV1MaasPoolsGetParamsWithHTTPClient creates a new V1MaasPoolsGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1MaasPoolsGetParamsWithHTTPClient(client *http.Client) *V1MaasPoolsGetParams { + var () + return &V1MaasPoolsGetParams{ + HTTPClient: client, + } +} + +/* +V1MaasPoolsGetParams contains all the parameters to send to the API endpoint +for the v1 maas pools get operation typically these are written to a http.Request +*/ +type V1MaasPoolsGetParams struct { + + /*CloudAccountUID + Uid for the specific Maas cloud account + + */ + CloudAccountUID *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 maas pools get params +func (o *V1MaasPoolsGetParams) WithTimeout(timeout time.Duration) *V1MaasPoolsGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 maas pools get params +func (o *V1MaasPoolsGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 maas pools get params +func (o *V1MaasPoolsGetParams) WithContext(ctx context.Context) *V1MaasPoolsGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 maas pools get params +func (o *V1MaasPoolsGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 maas pools get params +func (o *V1MaasPoolsGetParams) WithHTTPClient(client *http.Client) *V1MaasPoolsGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 maas pools get params +func (o *V1MaasPoolsGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithCloudAccountUID adds the cloudAccountUID to the v1 maas pools get params +func (o *V1MaasPoolsGetParams) WithCloudAccountUID(cloudAccountUID *string) *V1MaasPoolsGetParams { + o.SetCloudAccountUID(cloudAccountUID) + return o +} + +// SetCloudAccountUID adds the cloudAccountUid to the v1 maas pools get params +func (o *V1MaasPoolsGetParams) SetCloudAccountUID(cloudAccountUID *string) { + o.CloudAccountUID = cloudAccountUID +} + +// WriteToRequest writes these params to a swagger request +func (o *V1MaasPoolsGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.CloudAccountUID != nil { + + // query param cloudAccountUid + var qrCloudAccountUID string + if o.CloudAccountUID != nil { + qrCloudAccountUID = *o.CloudAccountUID + } + qCloudAccountUID := qrCloudAccountUID + if qCloudAccountUID != "" { + if err := r.SetQueryParam("cloudAccountUid", qCloudAccountUID); err != nil { + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_maas_pools_get_responses.go b/api/client/v1/v1_maas_pools_get_responses.go new file mode 100644 index 00000000..0969f109 --- /dev/null +++ b/api/client/v1/v1_maas_pools_get_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1MaasPoolsGetReader is a Reader for the V1MaasPoolsGet structure. +type V1MaasPoolsGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1MaasPoolsGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1MaasPoolsGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1MaasPoolsGetOK creates a V1MaasPoolsGetOK with default headers values +func NewV1MaasPoolsGetOK() *V1MaasPoolsGetOK { + return &V1MaasPoolsGetOK{} +} + +/* +V1MaasPoolsGetOK handles this case with default header values. + +(empty) +*/ +type V1MaasPoolsGetOK struct { + Payload *models.V1MaasPools +} + +func (o *V1MaasPoolsGetOK) Error() string { + return fmt.Sprintf("[GET /v1/clouds/maas/resourcePools][%d] v1MaasPoolsGetOK %+v", 200, o.Payload) +} + +func (o *V1MaasPoolsGetOK) GetPayload() *models.V1MaasPools { + return o.Payload +} + +func (o *V1MaasPoolsGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1MaasPools) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_maas_subnets_get_parameters.go b/api/client/v1/v1_maas_subnets_get_parameters.go new file mode 100644 index 00000000..02a2e7cd --- /dev/null +++ b/api/client/v1/v1_maas_subnets_get_parameters.go @@ -0,0 +1,147 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1MaasSubnetsGetParams creates a new V1MaasSubnetsGetParams object +// with the default values initialized. +func NewV1MaasSubnetsGetParams() *V1MaasSubnetsGetParams { + var () + return &V1MaasSubnetsGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1MaasSubnetsGetParamsWithTimeout creates a new V1MaasSubnetsGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1MaasSubnetsGetParamsWithTimeout(timeout time.Duration) *V1MaasSubnetsGetParams { + var () + return &V1MaasSubnetsGetParams{ + + timeout: timeout, + } +} + +// NewV1MaasSubnetsGetParamsWithContext creates a new V1MaasSubnetsGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1MaasSubnetsGetParamsWithContext(ctx context.Context) *V1MaasSubnetsGetParams { + var () + return &V1MaasSubnetsGetParams{ + + Context: ctx, + } +} + +// NewV1MaasSubnetsGetParamsWithHTTPClient creates a new V1MaasSubnetsGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1MaasSubnetsGetParamsWithHTTPClient(client *http.Client) *V1MaasSubnetsGetParams { + var () + return &V1MaasSubnetsGetParams{ + HTTPClient: client, + } +} + +/* +V1MaasSubnetsGetParams contains all the parameters to send to the API endpoint +for the v1 maas subnets get operation typically these are written to a http.Request +*/ +type V1MaasSubnetsGetParams struct { + + /*CloudAccountUID + Uid for the specific Maas cloud account + + */ + CloudAccountUID *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 maas subnets get params +func (o *V1MaasSubnetsGetParams) WithTimeout(timeout time.Duration) *V1MaasSubnetsGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 maas subnets get params +func (o *V1MaasSubnetsGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 maas subnets get params +func (o *V1MaasSubnetsGetParams) WithContext(ctx context.Context) *V1MaasSubnetsGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 maas subnets get params +func (o *V1MaasSubnetsGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 maas subnets get params +func (o *V1MaasSubnetsGetParams) WithHTTPClient(client *http.Client) *V1MaasSubnetsGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 maas subnets get params +func (o *V1MaasSubnetsGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithCloudAccountUID adds the cloudAccountUID to the v1 maas subnets get params +func (o *V1MaasSubnetsGetParams) WithCloudAccountUID(cloudAccountUID *string) *V1MaasSubnetsGetParams { + o.SetCloudAccountUID(cloudAccountUID) + return o +} + +// SetCloudAccountUID adds the cloudAccountUid to the v1 maas subnets get params +func (o *V1MaasSubnetsGetParams) SetCloudAccountUID(cloudAccountUID *string) { + o.CloudAccountUID = cloudAccountUID +} + +// WriteToRequest writes these params to a swagger request +func (o *V1MaasSubnetsGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.CloudAccountUID != nil { + + // query param cloudAccountUid + var qrCloudAccountUID string + if o.CloudAccountUID != nil { + qrCloudAccountUID = *o.CloudAccountUID + } + qCloudAccountUID := qrCloudAccountUID + if qCloudAccountUID != "" { + if err := r.SetQueryParam("cloudAccountUid", qCloudAccountUID); err != nil { + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_maas_subnets_get_responses.go b/api/client/v1/v1_maas_subnets_get_responses.go new file mode 100644 index 00000000..3beb40a1 --- /dev/null +++ b/api/client/v1/v1_maas_subnets_get_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1MaasSubnetsGetReader is a Reader for the V1MaasSubnetsGet structure. +type V1MaasSubnetsGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1MaasSubnetsGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1MaasSubnetsGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1MaasSubnetsGetOK creates a V1MaasSubnetsGetOK with default headers values +func NewV1MaasSubnetsGetOK() *V1MaasSubnetsGetOK { + return &V1MaasSubnetsGetOK{} +} + +/* +V1MaasSubnetsGetOK handles this case with default header values. + +(empty) +*/ +type V1MaasSubnetsGetOK struct { + Payload *models.V1MaasSubnets +} + +func (o *V1MaasSubnetsGetOK) Error() string { + return fmt.Sprintf("[GET /v1/clouds/maas/subnets][%d] v1MaasSubnetsGetOK %+v", 200, o.Payload) +} + +func (o *V1MaasSubnetsGetOK) GetPayload() *models.V1MaasSubnets { + return o.Payload +} + +func (o *V1MaasSubnetsGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1MaasSubnets) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_maas_tags_get_parameters.go b/api/client/v1/v1_maas_tags_get_parameters.go new file mode 100644 index 00000000..927feb64 --- /dev/null +++ b/api/client/v1/v1_maas_tags_get_parameters.go @@ -0,0 +1,147 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1MaasTagsGetParams creates a new V1MaasTagsGetParams object +// with the default values initialized. +func NewV1MaasTagsGetParams() *V1MaasTagsGetParams { + var () + return &V1MaasTagsGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1MaasTagsGetParamsWithTimeout creates a new V1MaasTagsGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1MaasTagsGetParamsWithTimeout(timeout time.Duration) *V1MaasTagsGetParams { + var () + return &V1MaasTagsGetParams{ + + timeout: timeout, + } +} + +// NewV1MaasTagsGetParamsWithContext creates a new V1MaasTagsGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1MaasTagsGetParamsWithContext(ctx context.Context) *V1MaasTagsGetParams { + var () + return &V1MaasTagsGetParams{ + + Context: ctx, + } +} + +// NewV1MaasTagsGetParamsWithHTTPClient creates a new V1MaasTagsGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1MaasTagsGetParamsWithHTTPClient(client *http.Client) *V1MaasTagsGetParams { + var () + return &V1MaasTagsGetParams{ + HTTPClient: client, + } +} + +/* +V1MaasTagsGetParams contains all the parameters to send to the API endpoint +for the v1 maas tags get operation typically these are written to a http.Request +*/ +type V1MaasTagsGetParams struct { + + /*CloudAccountUID + Uid for the specific Maas cloud account + + */ + CloudAccountUID *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 maas tags get params +func (o *V1MaasTagsGetParams) WithTimeout(timeout time.Duration) *V1MaasTagsGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 maas tags get params +func (o *V1MaasTagsGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 maas tags get params +func (o *V1MaasTagsGetParams) WithContext(ctx context.Context) *V1MaasTagsGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 maas tags get params +func (o *V1MaasTagsGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 maas tags get params +func (o *V1MaasTagsGetParams) WithHTTPClient(client *http.Client) *V1MaasTagsGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 maas tags get params +func (o *V1MaasTagsGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithCloudAccountUID adds the cloudAccountUID to the v1 maas tags get params +func (o *V1MaasTagsGetParams) WithCloudAccountUID(cloudAccountUID *string) *V1MaasTagsGetParams { + o.SetCloudAccountUID(cloudAccountUID) + return o +} + +// SetCloudAccountUID adds the cloudAccountUid to the v1 maas tags get params +func (o *V1MaasTagsGetParams) SetCloudAccountUID(cloudAccountUID *string) { + o.CloudAccountUID = cloudAccountUID +} + +// WriteToRequest writes these params to a swagger request +func (o *V1MaasTagsGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.CloudAccountUID != nil { + + // query param cloudAccountUid + var qrCloudAccountUID string + if o.CloudAccountUID != nil { + qrCloudAccountUID = *o.CloudAccountUID + } + qCloudAccountUID := qrCloudAccountUID + if qCloudAccountUID != "" { + if err := r.SetQueryParam("cloudAccountUid", qCloudAccountUID); err != nil { + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_maas_tags_get_responses.go b/api/client/v1/v1_maas_tags_get_responses.go new file mode 100644 index 00000000..20e0e2b2 --- /dev/null +++ b/api/client/v1/v1_maas_tags_get_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1MaasTagsGetReader is a Reader for the V1MaasTagsGet structure. +type V1MaasTagsGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1MaasTagsGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1MaasTagsGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1MaasTagsGetOK creates a V1MaasTagsGetOK with default headers values +func NewV1MaasTagsGetOK() *V1MaasTagsGetOK { + return &V1MaasTagsGetOK{} +} + +/* +V1MaasTagsGetOK handles this case with default header values. + +(empty) +*/ +type V1MaasTagsGetOK struct { + Payload *models.V1MaasTags +} + +func (o *V1MaasTagsGetOK) Error() string { + return fmt.Sprintf("[GET /v1/clouds/maas/tags][%d] v1MaasTagsGetOK %+v", 200, o.Payload) +} + +func (o *V1MaasTagsGetOK) GetPayload() *models.V1MaasTags { + return o.Payload +} + +func (o *V1MaasTagsGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1MaasTags) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_maas_zones_get_parameters.go b/api/client/v1/v1_maas_zones_get_parameters.go new file mode 100644 index 00000000..b23149fd --- /dev/null +++ b/api/client/v1/v1_maas_zones_get_parameters.go @@ -0,0 +1,147 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1MaasZonesGetParams creates a new V1MaasZonesGetParams object +// with the default values initialized. +func NewV1MaasZonesGetParams() *V1MaasZonesGetParams { + var () + return &V1MaasZonesGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1MaasZonesGetParamsWithTimeout creates a new V1MaasZonesGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1MaasZonesGetParamsWithTimeout(timeout time.Duration) *V1MaasZonesGetParams { + var () + return &V1MaasZonesGetParams{ + + timeout: timeout, + } +} + +// NewV1MaasZonesGetParamsWithContext creates a new V1MaasZonesGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1MaasZonesGetParamsWithContext(ctx context.Context) *V1MaasZonesGetParams { + var () + return &V1MaasZonesGetParams{ + + Context: ctx, + } +} + +// NewV1MaasZonesGetParamsWithHTTPClient creates a new V1MaasZonesGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1MaasZonesGetParamsWithHTTPClient(client *http.Client) *V1MaasZonesGetParams { + var () + return &V1MaasZonesGetParams{ + HTTPClient: client, + } +} + +/* +V1MaasZonesGetParams contains all the parameters to send to the API endpoint +for the v1 maas zones get operation typically these are written to a http.Request +*/ +type V1MaasZonesGetParams struct { + + /*CloudAccountUID + Uid for the specific Maas cloud account + + */ + CloudAccountUID *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 maas zones get params +func (o *V1MaasZonesGetParams) WithTimeout(timeout time.Duration) *V1MaasZonesGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 maas zones get params +func (o *V1MaasZonesGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 maas zones get params +func (o *V1MaasZonesGetParams) WithContext(ctx context.Context) *V1MaasZonesGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 maas zones get params +func (o *V1MaasZonesGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 maas zones get params +func (o *V1MaasZonesGetParams) WithHTTPClient(client *http.Client) *V1MaasZonesGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 maas zones get params +func (o *V1MaasZonesGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithCloudAccountUID adds the cloudAccountUID to the v1 maas zones get params +func (o *V1MaasZonesGetParams) WithCloudAccountUID(cloudAccountUID *string) *V1MaasZonesGetParams { + o.SetCloudAccountUID(cloudAccountUID) + return o +} + +// SetCloudAccountUID adds the cloudAccountUid to the v1 maas zones get params +func (o *V1MaasZonesGetParams) SetCloudAccountUID(cloudAccountUID *string) { + o.CloudAccountUID = cloudAccountUID +} + +// WriteToRequest writes these params to a swagger request +func (o *V1MaasZonesGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.CloudAccountUID != nil { + + // query param cloudAccountUid + var qrCloudAccountUID string + if o.CloudAccountUID != nil { + qrCloudAccountUID = *o.CloudAccountUID + } + qCloudAccountUID := qrCloudAccountUID + if qCloudAccountUID != "" { + if err := r.SetQueryParam("cloudAccountUid", qCloudAccountUID); err != nil { + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_maas_zones_get_responses.go b/api/client/v1/v1_maas_zones_get_responses.go new file mode 100644 index 00000000..4e827f05 --- /dev/null +++ b/api/client/v1/v1_maas_zones_get_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1MaasZonesGetReader is a Reader for the V1MaasZonesGet structure. +type V1MaasZonesGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1MaasZonesGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1MaasZonesGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1MaasZonesGetOK creates a V1MaasZonesGetOK with default headers values +func NewV1MaasZonesGetOK() *V1MaasZonesGetOK { + return &V1MaasZonesGetOK{} +} + +/* +V1MaasZonesGetOK handles this case with default header values. + +(empty) +*/ +type V1MaasZonesGetOK struct { + Payload *models.V1MaasZones +} + +func (o *V1MaasZonesGetOK) Error() string { + return fmt.Sprintf("[GET /v1/clouds/maas/azs][%d] v1MaasZonesGetOK %+v", 200, o.Payload) +} + +func (o *V1MaasZonesGetOK) GetPayload() *models.V1MaasZones { + return o.Payload +} + +func (o *V1MaasZonesGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1MaasZones) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_macros_list_parameters.go b/api/client/v1/v1_macros_list_parameters.go new file mode 100644 index 00000000..7d01a486 --- /dev/null +++ b/api/client/v1/v1_macros_list_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1MacrosListParams creates a new V1MacrosListParams object +// with the default values initialized. +func NewV1MacrosListParams() *V1MacrosListParams { + + return &V1MacrosListParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1MacrosListParamsWithTimeout creates a new V1MacrosListParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1MacrosListParamsWithTimeout(timeout time.Duration) *V1MacrosListParams { + + return &V1MacrosListParams{ + + timeout: timeout, + } +} + +// NewV1MacrosListParamsWithContext creates a new V1MacrosListParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1MacrosListParamsWithContext(ctx context.Context) *V1MacrosListParams { + + return &V1MacrosListParams{ + + Context: ctx, + } +} + +// NewV1MacrosListParamsWithHTTPClient creates a new V1MacrosListParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1MacrosListParamsWithHTTPClient(client *http.Client) *V1MacrosListParams { + + return &V1MacrosListParams{ + HTTPClient: client, + } +} + +/* +V1MacrosListParams contains all the parameters to send to the API endpoint +for the v1 macros list operation typically these are written to a http.Request +*/ +type V1MacrosListParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 macros list params +func (o *V1MacrosListParams) WithTimeout(timeout time.Duration) *V1MacrosListParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 macros list params +func (o *V1MacrosListParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 macros list params +func (o *V1MacrosListParams) WithContext(ctx context.Context) *V1MacrosListParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 macros list params +func (o *V1MacrosListParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 macros list params +func (o *V1MacrosListParams) WithHTTPClient(client *http.Client) *V1MacrosListParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 macros list params +func (o *V1MacrosListParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *V1MacrosListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_macros_list_responses.go b/api/client/v1/v1_macros_list_responses.go new file mode 100644 index 00000000..8a9ca568 --- /dev/null +++ b/api/client/v1/v1_macros_list_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1MacrosListReader is a Reader for the V1MacrosList structure. +type V1MacrosListReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1MacrosListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1MacrosListOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1MacrosListOK creates a V1MacrosListOK with default headers values +func NewV1MacrosListOK() *V1MacrosListOK { + return &V1MacrosListOK{} +} + +/* +V1MacrosListOK handles this case with default header values. + +OK +*/ +type V1MacrosListOK struct { + Payload *models.V1Macros +} + +func (o *V1MacrosListOK) Error() string { + return fmt.Sprintf("[GET /v1/clusterprofiles/macros][%d] v1MacrosListOK %+v", 200, o.Payload) +} + +func (o *V1MacrosListOK) GetPayload() *models.V1Macros { + return o.Payload +} + +func (o *V1MacrosListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1Macros) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_metrics_list_parameters.go b/api/client/v1/v1_metrics_list_parameters.go new file mode 100644 index 00000000..805b7ab8 --- /dev/null +++ b/api/client/v1/v1_metrics_list_parameters.go @@ -0,0 +1,425 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// NewV1MetricsListParams creates a new V1MetricsListParams object +// with the default values initialized. +func NewV1MetricsListParams() *V1MetricsListParams { + var ( + discreteDefault = bool(false) + includeControlPlaneMachinesDefault = bool(false) + includeMasterMachinesDefault = bool(false) + metricKindDefault = string("all") + periodDefault = int32(1) + ) + return &V1MetricsListParams{ + Discrete: &discreteDefault, + IncludeControlPlaneMachines: &includeControlPlaneMachinesDefault, + IncludeMasterMachines: &includeMasterMachinesDefault, + MetricKind: &metricKindDefault, + Period: &periodDefault, + + timeout: cr.DefaultTimeout, + } +} + +// NewV1MetricsListParamsWithTimeout creates a new V1MetricsListParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1MetricsListParamsWithTimeout(timeout time.Duration) *V1MetricsListParams { + var ( + discreteDefault = bool(false) + includeControlPlaneMachinesDefault = bool(false) + includeMasterMachinesDefault = bool(false) + metricKindDefault = string("all") + periodDefault = int32(1) + ) + return &V1MetricsListParams{ + Discrete: &discreteDefault, + IncludeControlPlaneMachines: &includeControlPlaneMachinesDefault, + IncludeMasterMachines: &includeMasterMachinesDefault, + MetricKind: &metricKindDefault, + Period: &periodDefault, + + timeout: timeout, + } +} + +// NewV1MetricsListParamsWithContext creates a new V1MetricsListParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1MetricsListParamsWithContext(ctx context.Context) *V1MetricsListParams { + var ( + discreteDefault = bool(false) + includeControlPlaneMachinesDefault = bool(false) + includeMasterMachinesDefault = bool(false) + metricKindDefault = string("all") + periodDefault = int32(1) + ) + return &V1MetricsListParams{ + Discrete: &discreteDefault, + IncludeControlPlaneMachines: &includeControlPlaneMachinesDefault, + IncludeMasterMachines: &includeMasterMachinesDefault, + MetricKind: &metricKindDefault, + Period: &periodDefault, + + Context: ctx, + } +} + +// NewV1MetricsListParamsWithHTTPClient creates a new V1MetricsListParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1MetricsListParamsWithHTTPClient(client *http.Client) *V1MetricsListParams { + var ( + discreteDefault = bool(false) + includeControlPlaneMachinesDefault = bool(false) + includeMasterMachinesDefault = bool(false) + metricKindDefault = string("all") + periodDefault = int32(1) + ) + return &V1MetricsListParams{ + Discrete: &discreteDefault, + IncludeControlPlaneMachines: &includeControlPlaneMachinesDefault, + IncludeMasterMachines: &includeMasterMachinesDefault, + MetricKind: &metricKindDefault, + Period: &periodDefault, + HTTPClient: client, + } +} + +/* +V1MetricsListParams contains all the parameters to send to the API endpoint +for the v1 metrics list operation typically these are written to a http.Request +*/ +type V1MetricsListParams struct { + + /*Discrete + if true then api returns only aggregation values, else api returns all data points by default + + */ + Discrete *bool + /*EndTime + Time is a wrapper around time.Time which supports correct marshaling to YAML and JSON. Wrappers are provided for many of the factory methods that the time package offers. + + */ + EndTime *strfmt.DateTime + /*IncludeControlPlaneMachines + includeControlPlaneMachines in boolean, group the data point by including control plane nodes if set to true + + */ + IncludeControlPlaneMachines *bool + /*IncludeMasterMachines + Deprecated. includeMasterMachines in boolean, group the data point by including control plane nodes if set to true + + */ + IncludeMasterMachines *bool + /*MetricKind*/ + MetricKind *string + /*Period*/ + Period *int32 + /*ResourceKind*/ + ResourceKind string + /*SpectroClusterUID*/ + SpectroClusterUID *string + /*StartTime + Time is a wrapper around time.Time which supports correct marshaling to YAML and JSON. Wrappers are provided for many of the factory methods that the time package offers. + + */ + StartTime *strfmt.DateTime + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 metrics list params +func (o *V1MetricsListParams) WithTimeout(timeout time.Duration) *V1MetricsListParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 metrics list params +func (o *V1MetricsListParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 metrics list params +func (o *V1MetricsListParams) WithContext(ctx context.Context) *V1MetricsListParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 metrics list params +func (o *V1MetricsListParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 metrics list params +func (o *V1MetricsListParams) WithHTTPClient(client *http.Client) *V1MetricsListParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 metrics list params +func (o *V1MetricsListParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithDiscrete adds the discrete to the v1 metrics list params +func (o *V1MetricsListParams) WithDiscrete(discrete *bool) *V1MetricsListParams { + o.SetDiscrete(discrete) + return o +} + +// SetDiscrete adds the discrete to the v1 metrics list params +func (o *V1MetricsListParams) SetDiscrete(discrete *bool) { + o.Discrete = discrete +} + +// WithEndTime adds the endTime to the v1 metrics list params +func (o *V1MetricsListParams) WithEndTime(endTime *strfmt.DateTime) *V1MetricsListParams { + o.SetEndTime(endTime) + return o +} + +// SetEndTime adds the endTime to the v1 metrics list params +func (o *V1MetricsListParams) SetEndTime(endTime *strfmt.DateTime) { + o.EndTime = endTime +} + +// WithIncludeControlPlaneMachines adds the includeControlPlaneMachines to the v1 metrics list params +func (o *V1MetricsListParams) WithIncludeControlPlaneMachines(includeControlPlaneMachines *bool) *V1MetricsListParams { + o.SetIncludeControlPlaneMachines(includeControlPlaneMachines) + return o +} + +// SetIncludeControlPlaneMachines adds the includeControlPlaneMachines to the v1 metrics list params +func (o *V1MetricsListParams) SetIncludeControlPlaneMachines(includeControlPlaneMachines *bool) { + o.IncludeControlPlaneMachines = includeControlPlaneMachines +} + +// WithIncludeMasterMachines adds the includeMasterMachines to the v1 metrics list params +func (o *V1MetricsListParams) WithIncludeMasterMachines(includeMasterMachines *bool) *V1MetricsListParams { + o.SetIncludeMasterMachines(includeMasterMachines) + return o +} + +// SetIncludeMasterMachines adds the includeMasterMachines to the v1 metrics list params +func (o *V1MetricsListParams) SetIncludeMasterMachines(includeMasterMachines *bool) { + o.IncludeMasterMachines = includeMasterMachines +} + +// WithMetricKind adds the metricKind to the v1 metrics list params +func (o *V1MetricsListParams) WithMetricKind(metricKind *string) *V1MetricsListParams { + o.SetMetricKind(metricKind) + return o +} + +// SetMetricKind adds the metricKind to the v1 metrics list params +func (o *V1MetricsListParams) SetMetricKind(metricKind *string) { + o.MetricKind = metricKind +} + +// WithPeriod adds the period to the v1 metrics list params +func (o *V1MetricsListParams) WithPeriod(period *int32) *V1MetricsListParams { + o.SetPeriod(period) + return o +} + +// SetPeriod adds the period to the v1 metrics list params +func (o *V1MetricsListParams) SetPeriod(period *int32) { + o.Period = period +} + +// WithResourceKind adds the resourceKind to the v1 metrics list params +func (o *V1MetricsListParams) WithResourceKind(resourceKind string) *V1MetricsListParams { + o.SetResourceKind(resourceKind) + return o +} + +// SetResourceKind adds the resourceKind to the v1 metrics list params +func (o *V1MetricsListParams) SetResourceKind(resourceKind string) { + o.ResourceKind = resourceKind +} + +// WithSpectroClusterUID adds the spectroClusterUID to the v1 metrics list params +func (o *V1MetricsListParams) WithSpectroClusterUID(spectroClusterUID *string) *V1MetricsListParams { + o.SetSpectroClusterUID(spectroClusterUID) + return o +} + +// SetSpectroClusterUID adds the spectroClusterUid to the v1 metrics list params +func (o *V1MetricsListParams) SetSpectroClusterUID(spectroClusterUID *string) { + o.SpectroClusterUID = spectroClusterUID +} + +// WithStartTime adds the startTime to the v1 metrics list params +func (o *V1MetricsListParams) WithStartTime(startTime *strfmt.DateTime) *V1MetricsListParams { + o.SetStartTime(startTime) + return o +} + +// SetStartTime adds the startTime to the v1 metrics list params +func (o *V1MetricsListParams) SetStartTime(startTime *strfmt.DateTime) { + o.StartTime = startTime +} + +// WriteToRequest writes these params to a swagger request +func (o *V1MetricsListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Discrete != nil { + + // query param discrete + var qrDiscrete bool + if o.Discrete != nil { + qrDiscrete = *o.Discrete + } + qDiscrete := swag.FormatBool(qrDiscrete) + if qDiscrete != "" { + if err := r.SetQueryParam("discrete", qDiscrete); err != nil { + return err + } + } + + } + + if o.EndTime != nil { + + // query param endTime + var qrEndTime strfmt.DateTime + if o.EndTime != nil { + qrEndTime = *o.EndTime + } + qEndTime := qrEndTime.String() + if qEndTime != "" { + if err := r.SetQueryParam("endTime", qEndTime); err != nil { + return err + } + } + + } + + if o.IncludeControlPlaneMachines != nil { + + // query param includeControlPlaneMachines + var qrIncludeControlPlaneMachines bool + if o.IncludeControlPlaneMachines != nil { + qrIncludeControlPlaneMachines = *o.IncludeControlPlaneMachines + } + qIncludeControlPlaneMachines := swag.FormatBool(qrIncludeControlPlaneMachines) + if qIncludeControlPlaneMachines != "" { + if err := r.SetQueryParam("includeControlPlaneMachines", qIncludeControlPlaneMachines); err != nil { + return err + } + } + + } + + if o.IncludeMasterMachines != nil { + + // query param includeMasterMachines + var qrIncludeMasterMachines bool + if o.IncludeMasterMachines != nil { + qrIncludeMasterMachines = *o.IncludeMasterMachines + } + qIncludeMasterMachines := swag.FormatBool(qrIncludeMasterMachines) + if qIncludeMasterMachines != "" { + if err := r.SetQueryParam("includeMasterMachines", qIncludeMasterMachines); err != nil { + return err + } + } + + } + + if o.MetricKind != nil { + + // query param metricKind + var qrMetricKind string + if o.MetricKind != nil { + qrMetricKind = *o.MetricKind + } + qMetricKind := qrMetricKind + if qMetricKind != "" { + if err := r.SetQueryParam("metricKind", qMetricKind); err != nil { + return err + } + } + + } + + if o.Period != nil { + + // query param period + var qrPeriod int32 + if o.Period != nil { + qrPeriod = *o.Period + } + qPeriod := swag.FormatInt32(qrPeriod) + if qPeriod != "" { + if err := r.SetQueryParam("period", qPeriod); err != nil { + return err + } + } + + } + + // path param resourceKind + if err := r.SetPathParam("resourceKind", o.ResourceKind); err != nil { + return err + } + + if o.SpectroClusterUID != nil { + + // query param spectroClusterUid + var qrSpectroClusterUID string + if o.SpectroClusterUID != nil { + qrSpectroClusterUID = *o.SpectroClusterUID + } + qSpectroClusterUID := qrSpectroClusterUID + if qSpectroClusterUID != "" { + if err := r.SetQueryParam("spectroClusterUid", qSpectroClusterUID); err != nil { + return err + } + } + + } + + if o.StartTime != nil { + + // query param startTime + var qrStartTime strfmt.DateTime + if o.StartTime != nil { + qrStartTime = *o.StartTime + } + qStartTime := qrStartTime.String() + if qStartTime != "" { + if err := r.SetQueryParam("startTime", qStartTime); err != nil { + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_metrics_list_responses.go b/api/client/v1/v1_metrics_list_responses.go new file mode 100644 index 00000000..86ed7ed5 --- /dev/null +++ b/api/client/v1/v1_metrics_list_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1MetricsListReader is a Reader for the V1MetricsList structure. +type V1MetricsListReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1MetricsListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1MetricsListOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1MetricsListOK creates a V1MetricsListOK with default headers values +func NewV1MetricsListOK() *V1MetricsListOK { + return &V1MetricsListOK{} +} + +/* +V1MetricsListOK handles this case with default header values. + +An array of metric items +*/ +type V1MetricsListOK struct { + Payload *models.V1MetricTimeSeriesList +} + +func (o *V1MetricsListOK) Error() string { + return fmt.Sprintf("[GET /v1/metrics/{resourceKind}/values][%d] v1MetricsListOK %+v", 200, o.Payload) +} + +func (o *V1MetricsListOK) GetPayload() *models.V1MetricTimeSeriesList { + return o.Payload +} + +func (o *V1MetricsListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1MetricTimeSeriesList) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_metrics_uid_delete_parameters.go b/api/client/v1/v1_metrics_uid_delete_parameters.go new file mode 100644 index 00000000..43c24823 --- /dev/null +++ b/api/client/v1/v1_metrics_uid_delete_parameters.go @@ -0,0 +1,151 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1MetricsUIDDeleteParams creates a new V1MetricsUIDDeleteParams object +// with the default values initialized. +func NewV1MetricsUIDDeleteParams() *V1MetricsUIDDeleteParams { + var () + return &V1MetricsUIDDeleteParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1MetricsUIDDeleteParamsWithTimeout creates a new V1MetricsUIDDeleteParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1MetricsUIDDeleteParamsWithTimeout(timeout time.Duration) *V1MetricsUIDDeleteParams { + var () + return &V1MetricsUIDDeleteParams{ + + timeout: timeout, + } +} + +// NewV1MetricsUIDDeleteParamsWithContext creates a new V1MetricsUIDDeleteParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1MetricsUIDDeleteParamsWithContext(ctx context.Context) *V1MetricsUIDDeleteParams { + var () + return &V1MetricsUIDDeleteParams{ + + Context: ctx, + } +} + +// NewV1MetricsUIDDeleteParamsWithHTTPClient creates a new V1MetricsUIDDeleteParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1MetricsUIDDeleteParamsWithHTTPClient(client *http.Client) *V1MetricsUIDDeleteParams { + var () + return &V1MetricsUIDDeleteParams{ + HTTPClient: client, + } +} + +/* +V1MetricsUIDDeleteParams contains all the parameters to send to the API endpoint +for the v1 metrics Uid delete operation typically these are written to a http.Request +*/ +type V1MetricsUIDDeleteParams struct { + + /*ResourceKind*/ + ResourceKind string + /*ResourceUID*/ + ResourceUID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 metrics Uid delete params +func (o *V1MetricsUIDDeleteParams) WithTimeout(timeout time.Duration) *V1MetricsUIDDeleteParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 metrics Uid delete params +func (o *V1MetricsUIDDeleteParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 metrics Uid delete params +func (o *V1MetricsUIDDeleteParams) WithContext(ctx context.Context) *V1MetricsUIDDeleteParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 metrics Uid delete params +func (o *V1MetricsUIDDeleteParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 metrics Uid delete params +func (o *V1MetricsUIDDeleteParams) WithHTTPClient(client *http.Client) *V1MetricsUIDDeleteParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 metrics Uid delete params +func (o *V1MetricsUIDDeleteParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithResourceKind adds the resourceKind to the v1 metrics Uid delete params +func (o *V1MetricsUIDDeleteParams) WithResourceKind(resourceKind string) *V1MetricsUIDDeleteParams { + o.SetResourceKind(resourceKind) + return o +} + +// SetResourceKind adds the resourceKind to the v1 metrics Uid delete params +func (o *V1MetricsUIDDeleteParams) SetResourceKind(resourceKind string) { + o.ResourceKind = resourceKind +} + +// WithResourceUID adds the resourceUID to the v1 metrics Uid delete params +func (o *V1MetricsUIDDeleteParams) WithResourceUID(resourceUID string) *V1MetricsUIDDeleteParams { + o.SetResourceUID(resourceUID) + return o +} + +// SetResourceUID adds the resourceUid to the v1 metrics Uid delete params +func (o *V1MetricsUIDDeleteParams) SetResourceUID(resourceUID string) { + o.ResourceUID = resourceUID +} + +// WriteToRequest writes these params to a swagger request +func (o *V1MetricsUIDDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param resourceKind + if err := r.SetPathParam("resourceKind", o.ResourceKind); err != nil { + return err + } + + // path param resourceUid + if err := r.SetPathParam("resourceUid", o.ResourceUID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_metrics_uid_delete_responses.go b/api/client/v1/v1_metrics_uid_delete_responses.go new file mode 100644 index 00000000..0c961119 --- /dev/null +++ b/api/client/v1/v1_metrics_uid_delete_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1MetricsUIDDeleteReader is a Reader for the V1MetricsUIDDelete structure. +type V1MetricsUIDDeleteReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1MetricsUIDDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1MetricsUIDDeleteNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1MetricsUIDDeleteNoContent creates a V1MetricsUIDDeleteNoContent with default headers values +func NewV1MetricsUIDDeleteNoContent() *V1MetricsUIDDeleteNoContent { + return &V1MetricsUIDDeleteNoContent{} +} + +/* +V1MetricsUIDDeleteNoContent handles this case with default header values. + +The resource was deleted successfully +*/ +type V1MetricsUIDDeleteNoContent struct { +} + +func (o *V1MetricsUIDDeleteNoContent) Error() string { + return fmt.Sprintf("[DELETE /v1/metrics/{resourceKind}/{resourceUid}/values][%d] v1MetricsUidDeleteNoContent ", 204) +} + +func (o *V1MetricsUIDDeleteNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_metrics_uid_list_parameters.go b/api/client/v1/v1_metrics_uid_list_parameters.go new file mode 100644 index 00000000..224bf0ae --- /dev/null +++ b/api/client/v1/v1_metrics_uid_list_parameters.go @@ -0,0 +1,420 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// NewV1MetricsUIDListParams creates a new V1MetricsUIDListParams object +// with the default values initialized. +func NewV1MetricsUIDListParams() *V1MetricsUIDListParams { + var ( + discreteDefault = bool(false) + includeControlPlaneMachinesDefault = bool(false) + includeMasterMachinesDefault = bool(false) + metricKindDefault = string("all") + periodDefault = int32(1) + ) + return &V1MetricsUIDListParams{ + Discrete: &discreteDefault, + IncludeControlPlaneMachines: &includeControlPlaneMachinesDefault, + IncludeMasterMachines: &includeMasterMachinesDefault, + MetricKind: &metricKindDefault, + Period: &periodDefault, + + timeout: cr.DefaultTimeout, + } +} + +// NewV1MetricsUIDListParamsWithTimeout creates a new V1MetricsUIDListParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1MetricsUIDListParamsWithTimeout(timeout time.Duration) *V1MetricsUIDListParams { + var ( + discreteDefault = bool(false) + includeControlPlaneMachinesDefault = bool(false) + includeMasterMachinesDefault = bool(false) + metricKindDefault = string("all") + periodDefault = int32(1) + ) + return &V1MetricsUIDListParams{ + Discrete: &discreteDefault, + IncludeControlPlaneMachines: &includeControlPlaneMachinesDefault, + IncludeMasterMachines: &includeMasterMachinesDefault, + MetricKind: &metricKindDefault, + Period: &periodDefault, + + timeout: timeout, + } +} + +// NewV1MetricsUIDListParamsWithContext creates a new V1MetricsUIDListParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1MetricsUIDListParamsWithContext(ctx context.Context) *V1MetricsUIDListParams { + var ( + discreteDefault = bool(false) + includeControlPlaneMachinesDefault = bool(false) + includeMasterMachinesDefault = bool(false) + metricKindDefault = string("all") + periodDefault = int32(1) + ) + return &V1MetricsUIDListParams{ + Discrete: &discreteDefault, + IncludeControlPlaneMachines: &includeControlPlaneMachinesDefault, + IncludeMasterMachines: &includeMasterMachinesDefault, + MetricKind: &metricKindDefault, + Period: &periodDefault, + + Context: ctx, + } +} + +// NewV1MetricsUIDListParamsWithHTTPClient creates a new V1MetricsUIDListParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1MetricsUIDListParamsWithHTTPClient(client *http.Client) *V1MetricsUIDListParams { + var ( + discreteDefault = bool(false) + includeControlPlaneMachinesDefault = bool(false) + includeMasterMachinesDefault = bool(false) + metricKindDefault = string("all") + periodDefault = int32(1) + ) + return &V1MetricsUIDListParams{ + Discrete: &discreteDefault, + IncludeControlPlaneMachines: &includeControlPlaneMachinesDefault, + IncludeMasterMachines: &includeMasterMachinesDefault, + MetricKind: &metricKindDefault, + Period: &periodDefault, + HTTPClient: client, + } +} + +/* +V1MetricsUIDListParams contains all the parameters to send to the API endpoint +for the v1 metrics Uid list operation typically these are written to a http.Request +*/ +type V1MetricsUIDListParams struct { + + /*Discrete + if true then api returns only aggregation values, else api returns all data points by default + + */ + Discrete *bool + /*EndTime + Time is a wrapper around time.Time which supports correct marshaling to YAML and JSON. Wrappers are provided for many of the factory methods that the time package offers. + + */ + EndTime *strfmt.DateTime + /*IncludeControlPlaneMachines + includeControlPlaneMachines in boolean, group the data point by including control plane nodes if set to true + + */ + IncludeControlPlaneMachines *bool + /*IncludeMasterMachines + Deprecated. includeMasterMachines in boolean, group the data point by including control plane nodes if set to true + + */ + IncludeMasterMachines *bool + /*MetricKind + multiple metric kinds can be provided with comma separated + + */ + MetricKind *string + /*Period + period in minutes, group the data point by the specified period + + */ + Period *int32 + /*ResourceKind*/ + ResourceKind string + /*ResourceUID*/ + ResourceUID string + /*StartTime + Time is a wrapper around time.Time which supports correct marshaling to YAML and JSON. Wrappers are provided for many of the factory methods that the time package offers. + + */ + StartTime *strfmt.DateTime + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 metrics Uid list params +func (o *V1MetricsUIDListParams) WithTimeout(timeout time.Duration) *V1MetricsUIDListParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 metrics Uid list params +func (o *V1MetricsUIDListParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 metrics Uid list params +func (o *V1MetricsUIDListParams) WithContext(ctx context.Context) *V1MetricsUIDListParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 metrics Uid list params +func (o *V1MetricsUIDListParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 metrics Uid list params +func (o *V1MetricsUIDListParams) WithHTTPClient(client *http.Client) *V1MetricsUIDListParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 metrics Uid list params +func (o *V1MetricsUIDListParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithDiscrete adds the discrete to the v1 metrics Uid list params +func (o *V1MetricsUIDListParams) WithDiscrete(discrete *bool) *V1MetricsUIDListParams { + o.SetDiscrete(discrete) + return o +} + +// SetDiscrete adds the discrete to the v1 metrics Uid list params +func (o *V1MetricsUIDListParams) SetDiscrete(discrete *bool) { + o.Discrete = discrete +} + +// WithEndTime adds the endTime to the v1 metrics Uid list params +func (o *V1MetricsUIDListParams) WithEndTime(endTime *strfmt.DateTime) *V1MetricsUIDListParams { + o.SetEndTime(endTime) + return o +} + +// SetEndTime adds the endTime to the v1 metrics Uid list params +func (o *V1MetricsUIDListParams) SetEndTime(endTime *strfmt.DateTime) { + o.EndTime = endTime +} + +// WithIncludeControlPlaneMachines adds the includeControlPlaneMachines to the v1 metrics Uid list params +func (o *V1MetricsUIDListParams) WithIncludeControlPlaneMachines(includeControlPlaneMachines *bool) *V1MetricsUIDListParams { + o.SetIncludeControlPlaneMachines(includeControlPlaneMachines) + return o +} + +// SetIncludeControlPlaneMachines adds the includeControlPlaneMachines to the v1 metrics Uid list params +func (o *V1MetricsUIDListParams) SetIncludeControlPlaneMachines(includeControlPlaneMachines *bool) { + o.IncludeControlPlaneMachines = includeControlPlaneMachines +} + +// WithIncludeMasterMachines adds the includeMasterMachines to the v1 metrics Uid list params +func (o *V1MetricsUIDListParams) WithIncludeMasterMachines(includeMasterMachines *bool) *V1MetricsUIDListParams { + o.SetIncludeMasterMachines(includeMasterMachines) + return o +} + +// SetIncludeMasterMachines adds the includeMasterMachines to the v1 metrics Uid list params +func (o *V1MetricsUIDListParams) SetIncludeMasterMachines(includeMasterMachines *bool) { + o.IncludeMasterMachines = includeMasterMachines +} + +// WithMetricKind adds the metricKind to the v1 metrics Uid list params +func (o *V1MetricsUIDListParams) WithMetricKind(metricKind *string) *V1MetricsUIDListParams { + o.SetMetricKind(metricKind) + return o +} + +// SetMetricKind adds the metricKind to the v1 metrics Uid list params +func (o *V1MetricsUIDListParams) SetMetricKind(metricKind *string) { + o.MetricKind = metricKind +} + +// WithPeriod adds the period to the v1 metrics Uid list params +func (o *V1MetricsUIDListParams) WithPeriod(period *int32) *V1MetricsUIDListParams { + o.SetPeriod(period) + return o +} + +// SetPeriod adds the period to the v1 metrics Uid list params +func (o *V1MetricsUIDListParams) SetPeriod(period *int32) { + o.Period = period +} + +// WithResourceKind adds the resourceKind to the v1 metrics Uid list params +func (o *V1MetricsUIDListParams) WithResourceKind(resourceKind string) *V1MetricsUIDListParams { + o.SetResourceKind(resourceKind) + return o +} + +// SetResourceKind adds the resourceKind to the v1 metrics Uid list params +func (o *V1MetricsUIDListParams) SetResourceKind(resourceKind string) { + o.ResourceKind = resourceKind +} + +// WithResourceUID adds the resourceUID to the v1 metrics Uid list params +func (o *V1MetricsUIDListParams) WithResourceUID(resourceUID string) *V1MetricsUIDListParams { + o.SetResourceUID(resourceUID) + return o +} + +// SetResourceUID adds the resourceUid to the v1 metrics Uid list params +func (o *V1MetricsUIDListParams) SetResourceUID(resourceUID string) { + o.ResourceUID = resourceUID +} + +// WithStartTime adds the startTime to the v1 metrics Uid list params +func (o *V1MetricsUIDListParams) WithStartTime(startTime *strfmt.DateTime) *V1MetricsUIDListParams { + o.SetStartTime(startTime) + return o +} + +// SetStartTime adds the startTime to the v1 metrics Uid list params +func (o *V1MetricsUIDListParams) SetStartTime(startTime *strfmt.DateTime) { + o.StartTime = startTime +} + +// WriteToRequest writes these params to a swagger request +func (o *V1MetricsUIDListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Discrete != nil { + + // query param discrete + var qrDiscrete bool + if o.Discrete != nil { + qrDiscrete = *o.Discrete + } + qDiscrete := swag.FormatBool(qrDiscrete) + if qDiscrete != "" { + if err := r.SetQueryParam("discrete", qDiscrete); err != nil { + return err + } + } + + } + + if o.EndTime != nil { + + // query param endTime + var qrEndTime strfmt.DateTime + if o.EndTime != nil { + qrEndTime = *o.EndTime + } + qEndTime := qrEndTime.String() + if qEndTime != "" { + if err := r.SetQueryParam("endTime", qEndTime); err != nil { + return err + } + } + + } + + if o.IncludeControlPlaneMachines != nil { + + // query param includeControlPlaneMachines + var qrIncludeControlPlaneMachines bool + if o.IncludeControlPlaneMachines != nil { + qrIncludeControlPlaneMachines = *o.IncludeControlPlaneMachines + } + qIncludeControlPlaneMachines := swag.FormatBool(qrIncludeControlPlaneMachines) + if qIncludeControlPlaneMachines != "" { + if err := r.SetQueryParam("includeControlPlaneMachines", qIncludeControlPlaneMachines); err != nil { + return err + } + } + + } + + if o.IncludeMasterMachines != nil { + + // query param includeMasterMachines + var qrIncludeMasterMachines bool + if o.IncludeMasterMachines != nil { + qrIncludeMasterMachines = *o.IncludeMasterMachines + } + qIncludeMasterMachines := swag.FormatBool(qrIncludeMasterMachines) + if qIncludeMasterMachines != "" { + if err := r.SetQueryParam("includeMasterMachines", qIncludeMasterMachines); err != nil { + return err + } + } + + } + + if o.MetricKind != nil { + + // query param metricKind + var qrMetricKind string + if o.MetricKind != nil { + qrMetricKind = *o.MetricKind + } + qMetricKind := qrMetricKind + if qMetricKind != "" { + if err := r.SetQueryParam("metricKind", qMetricKind); err != nil { + return err + } + } + + } + + if o.Period != nil { + + // query param period + var qrPeriod int32 + if o.Period != nil { + qrPeriod = *o.Period + } + qPeriod := swag.FormatInt32(qrPeriod) + if qPeriod != "" { + if err := r.SetQueryParam("period", qPeriod); err != nil { + return err + } + } + + } + + // path param resourceKind + if err := r.SetPathParam("resourceKind", o.ResourceKind); err != nil { + return err + } + + // path param resourceUid + if err := r.SetPathParam("resourceUid", o.ResourceUID); err != nil { + return err + } + + if o.StartTime != nil { + + // query param startTime + var qrStartTime strfmt.DateTime + if o.StartTime != nil { + qrStartTime = *o.StartTime + } + qStartTime := qrStartTime.String() + if qStartTime != "" { + if err := r.SetQueryParam("startTime", qStartTime); err != nil { + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_metrics_uid_list_responses.go b/api/client/v1/v1_metrics_uid_list_responses.go new file mode 100644 index 00000000..1a4c0881 --- /dev/null +++ b/api/client/v1/v1_metrics_uid_list_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1MetricsUIDListReader is a Reader for the V1MetricsUIDList structure. +type V1MetricsUIDListReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1MetricsUIDListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1MetricsUIDListOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1MetricsUIDListOK creates a V1MetricsUIDListOK with default headers values +func NewV1MetricsUIDListOK() *V1MetricsUIDListOK { + return &V1MetricsUIDListOK{} +} + +/* +V1MetricsUIDListOK handles this case with default header values. + +An array of metric items +*/ +type V1MetricsUIDListOK struct { + Payload *models.V1MetricTimeSeries +} + +func (o *V1MetricsUIDListOK) Error() string { + return fmt.Sprintf("[GET /v1/metrics/{resourceKind}/{resourceUid}/values][%d] v1MetricsUidListOK %+v", 200, o.Payload) +} + +func (o *V1MetricsUIDListOK) GetPayload() *models.V1MetricTimeSeries { + return o.Payload +} + +func (o *V1MetricsUIDListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1MetricTimeSeries) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_notifications_event_create_parameters.go b/api/client/v1/v1_notifications_event_create_parameters.go new file mode 100644 index 00000000..b88c94eb --- /dev/null +++ b/api/client/v1/v1_notifications_event_create_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1NotificationsEventCreateParams creates a new V1NotificationsEventCreateParams object +// with the default values initialized. +func NewV1NotificationsEventCreateParams() *V1NotificationsEventCreateParams { + var () + return &V1NotificationsEventCreateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1NotificationsEventCreateParamsWithTimeout creates a new V1NotificationsEventCreateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1NotificationsEventCreateParamsWithTimeout(timeout time.Duration) *V1NotificationsEventCreateParams { + var () + return &V1NotificationsEventCreateParams{ + + timeout: timeout, + } +} + +// NewV1NotificationsEventCreateParamsWithContext creates a new V1NotificationsEventCreateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1NotificationsEventCreateParamsWithContext(ctx context.Context) *V1NotificationsEventCreateParams { + var () + return &V1NotificationsEventCreateParams{ + + Context: ctx, + } +} + +// NewV1NotificationsEventCreateParamsWithHTTPClient creates a new V1NotificationsEventCreateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1NotificationsEventCreateParamsWithHTTPClient(client *http.Client) *V1NotificationsEventCreateParams { + var () + return &V1NotificationsEventCreateParams{ + HTTPClient: client, + } +} + +/* +V1NotificationsEventCreateParams contains all the parameters to send to the API endpoint +for the v1 notifications event create operation typically these are written to a http.Request +*/ +type V1NotificationsEventCreateParams struct { + + /*Body*/ + Body *models.V1NotificationEvent + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 notifications event create params +func (o *V1NotificationsEventCreateParams) WithTimeout(timeout time.Duration) *V1NotificationsEventCreateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 notifications event create params +func (o *V1NotificationsEventCreateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 notifications event create params +func (o *V1NotificationsEventCreateParams) WithContext(ctx context.Context) *V1NotificationsEventCreateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 notifications event create params +func (o *V1NotificationsEventCreateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 notifications event create params +func (o *V1NotificationsEventCreateParams) WithHTTPClient(client *http.Client) *V1NotificationsEventCreateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 notifications event create params +func (o *V1NotificationsEventCreateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 notifications event create params +func (o *V1NotificationsEventCreateParams) WithBody(body *models.V1NotificationEvent) *V1NotificationsEventCreateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 notifications event create params +func (o *V1NotificationsEventCreateParams) SetBody(body *models.V1NotificationEvent) { + o.Body = body +} + +// WriteToRequest writes these params to a swagger request +func (o *V1NotificationsEventCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_notifications_event_create_responses.go b/api/client/v1/v1_notifications_event_create_responses.go new file mode 100644 index 00000000..1e6f6e6c --- /dev/null +++ b/api/client/v1/v1_notifications_event_create_responses.go @@ -0,0 +1,77 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1NotificationsEventCreateReader is a Reader for the V1NotificationsEventCreate structure. +type V1NotificationsEventCreateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1NotificationsEventCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 201: + result := NewV1NotificationsEventCreateCreated() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1NotificationsEventCreateCreated creates a V1NotificationsEventCreateCreated with default headers values +func NewV1NotificationsEventCreateCreated() *V1NotificationsEventCreateCreated { + return &V1NotificationsEventCreateCreated{} +} + +/* +V1NotificationsEventCreateCreated handles this case with default header values. + +Created successfully +*/ +type V1NotificationsEventCreateCreated struct { + /*Audit uid for the request + */ + AuditUID string + + Payload *models.V1UID +} + +func (o *V1NotificationsEventCreateCreated) Error() string { + return fmt.Sprintf("[POST /v1/notifications/events][%d] v1NotificationsEventCreateCreated %+v", 201, o.Payload) +} + +func (o *V1NotificationsEventCreateCreated) GetPayload() *models.V1UID { + return o.Payload +} + +func (o *V1NotificationsEventCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header AuditUid + o.AuditUID = response.GetHeader("AuditUid") + + o.Payload = new(models.V1UID) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_notifications_list_parameters.go b/api/client/v1/v1_notifications_list_parameters.go new file mode 100644 index 00000000..7121bde7 --- /dev/null +++ b/api/client/v1/v1_notifications_list_parameters.go @@ -0,0 +1,323 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// NewV1NotificationsListParams creates a new V1NotificationsListParams object +// with the default values initialized. +func NewV1NotificationsListParams() *V1NotificationsListParams { + var ( + limitDefault = int64(50) + ) + return &V1NotificationsListParams{ + Limit: &limitDefault, + + timeout: cr.DefaultTimeout, + } +} + +// NewV1NotificationsListParamsWithTimeout creates a new V1NotificationsListParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1NotificationsListParamsWithTimeout(timeout time.Duration) *V1NotificationsListParams { + var ( + limitDefault = int64(50) + ) + return &V1NotificationsListParams{ + Limit: &limitDefault, + + timeout: timeout, + } +} + +// NewV1NotificationsListParamsWithContext creates a new V1NotificationsListParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1NotificationsListParamsWithContext(ctx context.Context) *V1NotificationsListParams { + var ( + limitDefault = int64(50) + ) + return &V1NotificationsListParams{ + Limit: &limitDefault, + + Context: ctx, + } +} + +// NewV1NotificationsListParamsWithHTTPClient creates a new V1NotificationsListParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1NotificationsListParamsWithHTTPClient(client *http.Client) *V1NotificationsListParams { + var ( + limitDefault = int64(50) + ) + return &V1NotificationsListParams{ + Limit: &limitDefault, + HTTPClient: client, + } +} + +/* +V1NotificationsListParams contains all the parameters to send to the API endpoint +for the v1 notifications list operation typically these are written to a http.Request +*/ +type V1NotificationsListParams struct { + + /*Continue + continue token to paginate the subsequent data items + + */ + Continue *string + /*Fields + Set of fields to be presented in the response with values. The fields are comma separated. Eg: metadata.uid,metadata.name + + */ + Fields *string + /*Filters + Filters can be combined with AND, OR operators with field path name. Eg: metadata.name=TestServiceANDspec.cloudType=aws + + Server will be restricted to certain fields based on the indexed data for each resource. + + */ + Filters *string + /*Limit + limit is a maximum number of responses to return for a list call. Default and maximum value of the limit is 50. + If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. + + */ + Limit *int64 + /*Offset + offset is the next index number from which the response will start. The response offset value can be used along with continue token for the pagination. + + */ + Offset *int64 + /*OrderBy + Specify the fields with sort order. 1 indicates ascending and -1 for descending. Eg: orderBy=metadata.name=1,metadata.uid=-1 + + */ + OrderBy *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 notifications list params +func (o *V1NotificationsListParams) WithTimeout(timeout time.Duration) *V1NotificationsListParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 notifications list params +func (o *V1NotificationsListParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 notifications list params +func (o *V1NotificationsListParams) WithContext(ctx context.Context) *V1NotificationsListParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 notifications list params +func (o *V1NotificationsListParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 notifications list params +func (o *V1NotificationsListParams) WithHTTPClient(client *http.Client) *V1NotificationsListParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 notifications list params +func (o *V1NotificationsListParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithContinue adds the continueVar to the v1 notifications list params +func (o *V1NotificationsListParams) WithContinue(continueVar *string) *V1NotificationsListParams { + o.SetContinue(continueVar) + return o +} + +// SetContinue adds the continue to the v1 notifications list params +func (o *V1NotificationsListParams) SetContinue(continueVar *string) { + o.Continue = continueVar +} + +// WithFields adds the fields to the v1 notifications list params +func (o *V1NotificationsListParams) WithFields(fields *string) *V1NotificationsListParams { + o.SetFields(fields) + return o +} + +// SetFields adds the fields to the v1 notifications list params +func (o *V1NotificationsListParams) SetFields(fields *string) { + o.Fields = fields +} + +// WithFilters adds the filters to the v1 notifications list params +func (o *V1NotificationsListParams) WithFilters(filters *string) *V1NotificationsListParams { + o.SetFilters(filters) + return o +} + +// SetFilters adds the filters to the v1 notifications list params +func (o *V1NotificationsListParams) SetFilters(filters *string) { + o.Filters = filters +} + +// WithLimit adds the limit to the v1 notifications list params +func (o *V1NotificationsListParams) WithLimit(limit *int64) *V1NotificationsListParams { + o.SetLimit(limit) + return o +} + +// SetLimit adds the limit to the v1 notifications list params +func (o *V1NotificationsListParams) SetLimit(limit *int64) { + o.Limit = limit +} + +// WithOffset adds the offset to the v1 notifications list params +func (o *V1NotificationsListParams) WithOffset(offset *int64) *V1NotificationsListParams { + o.SetOffset(offset) + return o +} + +// SetOffset adds the offset to the v1 notifications list params +func (o *V1NotificationsListParams) SetOffset(offset *int64) { + o.Offset = offset +} + +// WithOrderBy adds the orderBy to the v1 notifications list params +func (o *V1NotificationsListParams) WithOrderBy(orderBy *string) *V1NotificationsListParams { + o.SetOrderBy(orderBy) + return o +} + +// SetOrderBy adds the orderBy to the v1 notifications list params +func (o *V1NotificationsListParams) SetOrderBy(orderBy *string) { + o.OrderBy = orderBy +} + +// WriteToRequest writes these params to a swagger request +func (o *V1NotificationsListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Continue != nil { + + // query param continue + var qrContinue string + if o.Continue != nil { + qrContinue = *o.Continue + } + qContinue := qrContinue + if qContinue != "" { + if err := r.SetQueryParam("continue", qContinue); err != nil { + return err + } + } + + } + + if o.Fields != nil { + + // query param fields + var qrFields string + if o.Fields != nil { + qrFields = *o.Fields + } + qFields := qrFields + if qFields != "" { + if err := r.SetQueryParam("fields", qFields); err != nil { + return err + } + } + + } + + if o.Filters != nil { + + // query param filters + var qrFilters string + if o.Filters != nil { + qrFilters = *o.Filters + } + qFilters := qrFilters + if qFilters != "" { + if err := r.SetQueryParam("filters", qFilters); err != nil { + return err + } + } + + } + + if o.Limit != nil { + + // query param limit + var qrLimit int64 + if o.Limit != nil { + qrLimit = *o.Limit + } + qLimit := swag.FormatInt64(qrLimit) + if qLimit != "" { + if err := r.SetQueryParam("limit", qLimit); err != nil { + return err + } + } + + } + + if o.Offset != nil { + + // query param offset + var qrOffset int64 + if o.Offset != nil { + qrOffset = *o.Offset + } + qOffset := swag.FormatInt64(qrOffset) + if qOffset != "" { + if err := r.SetQueryParam("offset", qOffset); err != nil { + return err + } + } + + } + + if o.OrderBy != nil { + + // query param orderBy + var qrOrderBy string + if o.OrderBy != nil { + qrOrderBy = *o.OrderBy + } + qOrderBy := qrOrderBy + if qOrderBy != "" { + if err := r.SetQueryParam("orderBy", qOrderBy); err != nil { + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_notifications_list_responses.go b/api/client/v1/v1_notifications_list_responses.go new file mode 100644 index 00000000..d13a0cc2 --- /dev/null +++ b/api/client/v1/v1_notifications_list_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1NotificationsListReader is a Reader for the V1NotificationsList structure. +type V1NotificationsListReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1NotificationsListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1NotificationsListOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1NotificationsListOK creates a V1NotificationsListOK with default headers values +func NewV1NotificationsListOK() *V1NotificationsListOK { + return &V1NotificationsListOK{} +} + +/* +V1NotificationsListOK handles this case with default header values. + +An array of notification items +*/ +type V1NotificationsListOK struct { + Payload *models.V1Notifications +} + +func (o *V1NotificationsListOK) Error() string { + return fmt.Sprintf("[GET /v1/notifications/][%d] v1NotificationsListOK %+v", 200, o.Payload) +} + +func (o *V1NotificationsListOK) GetPayload() *models.V1Notifications { + return o.Payload +} + +func (o *V1NotificationsListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1Notifications) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_notifications_obj_type_uid_list_parameters.go b/api/client/v1/v1_notifications_obj_type_uid_list_parameters.go new file mode 100644 index 00000000..6b621e57 --- /dev/null +++ b/api/client/v1/v1_notifications_obj_type_uid_list_parameters.go @@ -0,0 +1,397 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// NewV1NotificationsObjTypeUIDListParams creates a new V1NotificationsObjTypeUIDListParams object +// with the default values initialized. +func NewV1NotificationsObjTypeUIDListParams() *V1NotificationsObjTypeUIDListParams { + var ( + limitDefault = int64(50) + ) + return &V1NotificationsObjTypeUIDListParams{ + Limit: &limitDefault, + + timeout: cr.DefaultTimeout, + } +} + +// NewV1NotificationsObjTypeUIDListParamsWithTimeout creates a new V1NotificationsObjTypeUIDListParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1NotificationsObjTypeUIDListParamsWithTimeout(timeout time.Duration) *V1NotificationsObjTypeUIDListParams { + var ( + limitDefault = int64(50) + ) + return &V1NotificationsObjTypeUIDListParams{ + Limit: &limitDefault, + + timeout: timeout, + } +} + +// NewV1NotificationsObjTypeUIDListParamsWithContext creates a new V1NotificationsObjTypeUIDListParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1NotificationsObjTypeUIDListParamsWithContext(ctx context.Context) *V1NotificationsObjTypeUIDListParams { + var ( + limitDefault = int64(50) + ) + return &V1NotificationsObjTypeUIDListParams{ + Limit: &limitDefault, + + Context: ctx, + } +} + +// NewV1NotificationsObjTypeUIDListParamsWithHTTPClient creates a new V1NotificationsObjTypeUIDListParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1NotificationsObjTypeUIDListParamsWithHTTPClient(client *http.Client) *V1NotificationsObjTypeUIDListParams { + var ( + limitDefault = int64(50) + ) + return &V1NotificationsObjTypeUIDListParams{ + Limit: &limitDefault, + HTTPClient: client, + } +} + +/* +V1NotificationsObjTypeUIDListParams contains all the parameters to send to the API endpoint +for the v1 notifications obj type Uid list operation typically these are written to a http.Request +*/ +type V1NotificationsObjTypeUIDListParams struct { + + /*Continue + continue token to paginate the subsequent data items + + */ + Continue *string + /*Fields + Set of fields to be presented in the response with values. The fields are comma separated. Eg: metadata.uid,metadata.name + + */ + Fields *string + /*Filters + Filters can be combined with AND, OR operators with field path name. Eg: metadata.name=TestServiceANDspec.cloudType=aws + + Server will be restricted to certain fields based on the indexed data for each resource. + + */ + Filters *string + /*IsDone + Describes a way to fetch "done" notifications + + */ + IsDone *string + /*Limit + limit is a maximum number of responses to return for a list call. Default and maximum value of the limit is 50. + If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. + + */ + Limit *int64 + /*ObjectKind + Describes the related object kind for which notifications have to be fetched + + */ + ObjectKind string + /*ObjectUID + Describes the related object uid for which notifications have to be fetched + + */ + ObjectUID string + /*Offset + offset is the next index number from which the response will start. The response offset value can be used along with continue token for the pagination. + + */ + Offset *int64 + /*OrderBy + Specify the fields with sort order. 1 indicates ascending and -1 for descending. Eg: orderBy=metadata.name=1,metadata.uid=-1 + + */ + OrderBy *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 notifications obj type Uid list params +func (o *V1NotificationsObjTypeUIDListParams) WithTimeout(timeout time.Duration) *V1NotificationsObjTypeUIDListParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 notifications obj type Uid list params +func (o *V1NotificationsObjTypeUIDListParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 notifications obj type Uid list params +func (o *V1NotificationsObjTypeUIDListParams) WithContext(ctx context.Context) *V1NotificationsObjTypeUIDListParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 notifications obj type Uid list params +func (o *V1NotificationsObjTypeUIDListParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 notifications obj type Uid list params +func (o *V1NotificationsObjTypeUIDListParams) WithHTTPClient(client *http.Client) *V1NotificationsObjTypeUIDListParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 notifications obj type Uid list params +func (o *V1NotificationsObjTypeUIDListParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithContinue adds the continueVar to the v1 notifications obj type Uid list params +func (o *V1NotificationsObjTypeUIDListParams) WithContinue(continueVar *string) *V1NotificationsObjTypeUIDListParams { + o.SetContinue(continueVar) + return o +} + +// SetContinue adds the continue to the v1 notifications obj type Uid list params +func (o *V1NotificationsObjTypeUIDListParams) SetContinue(continueVar *string) { + o.Continue = continueVar +} + +// WithFields adds the fields to the v1 notifications obj type Uid list params +func (o *V1NotificationsObjTypeUIDListParams) WithFields(fields *string) *V1NotificationsObjTypeUIDListParams { + o.SetFields(fields) + return o +} + +// SetFields adds the fields to the v1 notifications obj type Uid list params +func (o *V1NotificationsObjTypeUIDListParams) SetFields(fields *string) { + o.Fields = fields +} + +// WithFilters adds the filters to the v1 notifications obj type Uid list params +func (o *V1NotificationsObjTypeUIDListParams) WithFilters(filters *string) *V1NotificationsObjTypeUIDListParams { + o.SetFilters(filters) + return o +} + +// SetFilters adds the filters to the v1 notifications obj type Uid list params +func (o *V1NotificationsObjTypeUIDListParams) SetFilters(filters *string) { + o.Filters = filters +} + +// WithIsDone adds the isDone to the v1 notifications obj type Uid list params +func (o *V1NotificationsObjTypeUIDListParams) WithIsDone(isDone *string) *V1NotificationsObjTypeUIDListParams { + o.SetIsDone(isDone) + return o +} + +// SetIsDone adds the isDone to the v1 notifications obj type Uid list params +func (o *V1NotificationsObjTypeUIDListParams) SetIsDone(isDone *string) { + o.IsDone = isDone +} + +// WithLimit adds the limit to the v1 notifications obj type Uid list params +func (o *V1NotificationsObjTypeUIDListParams) WithLimit(limit *int64) *V1NotificationsObjTypeUIDListParams { + o.SetLimit(limit) + return o +} + +// SetLimit adds the limit to the v1 notifications obj type Uid list params +func (o *V1NotificationsObjTypeUIDListParams) SetLimit(limit *int64) { + o.Limit = limit +} + +// WithObjectKind adds the objectKind to the v1 notifications obj type Uid list params +func (o *V1NotificationsObjTypeUIDListParams) WithObjectKind(objectKind string) *V1NotificationsObjTypeUIDListParams { + o.SetObjectKind(objectKind) + return o +} + +// SetObjectKind adds the objectKind to the v1 notifications obj type Uid list params +func (o *V1NotificationsObjTypeUIDListParams) SetObjectKind(objectKind string) { + o.ObjectKind = objectKind +} + +// WithObjectUID adds the objectUID to the v1 notifications obj type Uid list params +func (o *V1NotificationsObjTypeUIDListParams) WithObjectUID(objectUID string) *V1NotificationsObjTypeUIDListParams { + o.SetObjectUID(objectUID) + return o +} + +// SetObjectUID adds the objectUid to the v1 notifications obj type Uid list params +func (o *V1NotificationsObjTypeUIDListParams) SetObjectUID(objectUID string) { + o.ObjectUID = objectUID +} + +// WithOffset adds the offset to the v1 notifications obj type Uid list params +func (o *V1NotificationsObjTypeUIDListParams) WithOffset(offset *int64) *V1NotificationsObjTypeUIDListParams { + o.SetOffset(offset) + return o +} + +// SetOffset adds the offset to the v1 notifications obj type Uid list params +func (o *V1NotificationsObjTypeUIDListParams) SetOffset(offset *int64) { + o.Offset = offset +} + +// WithOrderBy adds the orderBy to the v1 notifications obj type Uid list params +func (o *V1NotificationsObjTypeUIDListParams) WithOrderBy(orderBy *string) *V1NotificationsObjTypeUIDListParams { + o.SetOrderBy(orderBy) + return o +} + +// SetOrderBy adds the orderBy to the v1 notifications obj type Uid list params +func (o *V1NotificationsObjTypeUIDListParams) SetOrderBy(orderBy *string) { + o.OrderBy = orderBy +} + +// WriteToRequest writes these params to a swagger request +func (o *V1NotificationsObjTypeUIDListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Continue != nil { + + // query param continue + var qrContinue string + if o.Continue != nil { + qrContinue = *o.Continue + } + qContinue := qrContinue + if qContinue != "" { + if err := r.SetQueryParam("continue", qContinue); err != nil { + return err + } + } + + } + + if o.Fields != nil { + + // query param fields + var qrFields string + if o.Fields != nil { + qrFields = *o.Fields + } + qFields := qrFields + if qFields != "" { + if err := r.SetQueryParam("fields", qFields); err != nil { + return err + } + } + + } + + if o.Filters != nil { + + // query param filters + var qrFilters string + if o.Filters != nil { + qrFilters = *o.Filters + } + qFilters := qrFilters + if qFilters != "" { + if err := r.SetQueryParam("filters", qFilters); err != nil { + return err + } + } + + } + + if o.IsDone != nil { + + // query param isDone + var qrIsDone string + if o.IsDone != nil { + qrIsDone = *o.IsDone + } + qIsDone := qrIsDone + if qIsDone != "" { + if err := r.SetQueryParam("isDone", qIsDone); err != nil { + return err + } + } + + } + + if o.Limit != nil { + + // query param limit + var qrLimit int64 + if o.Limit != nil { + qrLimit = *o.Limit + } + qLimit := swag.FormatInt64(qrLimit) + if qLimit != "" { + if err := r.SetQueryParam("limit", qLimit); err != nil { + return err + } + } + + } + + // path param objectKind + if err := r.SetPathParam("objectKind", o.ObjectKind); err != nil { + return err + } + + // path param objectUid + if err := r.SetPathParam("objectUid", o.ObjectUID); err != nil { + return err + } + + if o.Offset != nil { + + // query param offset + var qrOffset int64 + if o.Offset != nil { + qrOffset = *o.Offset + } + qOffset := swag.FormatInt64(qrOffset) + if qOffset != "" { + if err := r.SetQueryParam("offset", qOffset); err != nil { + return err + } + } + + } + + if o.OrderBy != nil { + + // query param orderBy + var qrOrderBy string + if o.OrderBy != nil { + qrOrderBy = *o.OrderBy + } + qOrderBy := qrOrderBy + if qOrderBy != "" { + if err := r.SetQueryParam("orderBy", qOrderBy); err != nil { + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_notifications_obj_type_uid_list_responses.go b/api/client/v1/v1_notifications_obj_type_uid_list_responses.go new file mode 100644 index 00000000..a4684e35 --- /dev/null +++ b/api/client/v1/v1_notifications_obj_type_uid_list_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1NotificationsObjTypeUIDListReader is a Reader for the V1NotificationsObjTypeUIDList structure. +type V1NotificationsObjTypeUIDListReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1NotificationsObjTypeUIDListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1NotificationsObjTypeUIDListOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1NotificationsObjTypeUIDListOK creates a V1NotificationsObjTypeUIDListOK with default headers values +func NewV1NotificationsObjTypeUIDListOK() *V1NotificationsObjTypeUIDListOK { + return &V1NotificationsObjTypeUIDListOK{} +} + +/* +V1NotificationsObjTypeUIDListOK handles this case with default header values. + +An array of component event items +*/ +type V1NotificationsObjTypeUIDListOK struct { + Payload *models.V1Notifications +} + +func (o *V1NotificationsObjTypeUIDListOK) Error() string { + return fmt.Sprintf("[GET /v1/notifications/{objectKind}/{objectUid}][%d] v1NotificationsObjTypeUidListOK %+v", 200, o.Payload) +} + +func (o *V1NotificationsObjTypeUIDListOK) GetPayload() *models.V1Notifications { + return o.Payload +} + +func (o *V1NotificationsObjTypeUIDListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1Notifications) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_notifications_uid_ack_parameters.go b/api/client/v1/v1_notifications_uid_ack_parameters.go new file mode 100644 index 00000000..d48ced0f --- /dev/null +++ b/api/client/v1/v1_notifications_uid_ack_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1NotificationsUIDAckParams creates a new V1NotificationsUIDAckParams object +// with the default values initialized. +func NewV1NotificationsUIDAckParams() *V1NotificationsUIDAckParams { + var () + return &V1NotificationsUIDAckParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1NotificationsUIDAckParamsWithTimeout creates a new V1NotificationsUIDAckParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1NotificationsUIDAckParamsWithTimeout(timeout time.Duration) *V1NotificationsUIDAckParams { + var () + return &V1NotificationsUIDAckParams{ + + timeout: timeout, + } +} + +// NewV1NotificationsUIDAckParamsWithContext creates a new V1NotificationsUIDAckParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1NotificationsUIDAckParamsWithContext(ctx context.Context) *V1NotificationsUIDAckParams { + var () + return &V1NotificationsUIDAckParams{ + + Context: ctx, + } +} + +// NewV1NotificationsUIDAckParamsWithHTTPClient creates a new V1NotificationsUIDAckParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1NotificationsUIDAckParamsWithHTTPClient(client *http.Client) *V1NotificationsUIDAckParams { + var () + return &V1NotificationsUIDAckParams{ + HTTPClient: client, + } +} + +/* +V1NotificationsUIDAckParams contains all the parameters to send to the API endpoint +for the v1 notifications Uid ack operation typically these are written to a http.Request +*/ +type V1NotificationsUIDAckParams struct { + + /*UID + Describes acknowledging notification uid + + */ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 notifications Uid ack params +func (o *V1NotificationsUIDAckParams) WithTimeout(timeout time.Duration) *V1NotificationsUIDAckParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 notifications Uid ack params +func (o *V1NotificationsUIDAckParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 notifications Uid ack params +func (o *V1NotificationsUIDAckParams) WithContext(ctx context.Context) *V1NotificationsUIDAckParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 notifications Uid ack params +func (o *V1NotificationsUIDAckParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 notifications Uid ack params +func (o *V1NotificationsUIDAckParams) WithHTTPClient(client *http.Client) *V1NotificationsUIDAckParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 notifications Uid ack params +func (o *V1NotificationsUIDAckParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithUID adds the uid to the v1 notifications Uid ack params +func (o *V1NotificationsUIDAckParams) WithUID(uid string) *V1NotificationsUIDAckParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 notifications Uid ack params +func (o *V1NotificationsUIDAckParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1NotificationsUIDAckParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_notifications_uid_ack_responses.go b/api/client/v1/v1_notifications_uid_ack_responses.go new file mode 100644 index 00000000..618237d9 --- /dev/null +++ b/api/client/v1/v1_notifications_uid_ack_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1NotificationsUIDAckReader is a Reader for the V1NotificationsUIDAck structure. +type V1NotificationsUIDAckReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1NotificationsUIDAckReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1NotificationsUIDAckNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1NotificationsUIDAckNoContent creates a V1NotificationsUIDAckNoContent with default headers values +func NewV1NotificationsUIDAckNoContent() *V1NotificationsUIDAckNoContent { + return &V1NotificationsUIDAckNoContent{} +} + +/* +V1NotificationsUIDAckNoContent handles this case with default header values. + +The resource was updated successfully +*/ +type V1NotificationsUIDAckNoContent struct { +} + +func (o *V1NotificationsUIDAckNoContent) Error() string { + return fmt.Sprintf("[PATCH /v1/notifications/{uid}/ack][%d] v1NotificationsUidAckNoContent ", 204) +} + +func (o *V1NotificationsUIDAckNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_notifications_uid_done_parameters.go b/api/client/v1/v1_notifications_uid_done_parameters.go new file mode 100644 index 00000000..21975b7e --- /dev/null +++ b/api/client/v1/v1_notifications_uid_done_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1NotificationsUIDDoneParams creates a new V1NotificationsUIDDoneParams object +// with the default values initialized. +func NewV1NotificationsUIDDoneParams() *V1NotificationsUIDDoneParams { + var () + return &V1NotificationsUIDDoneParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1NotificationsUIDDoneParamsWithTimeout creates a new V1NotificationsUIDDoneParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1NotificationsUIDDoneParamsWithTimeout(timeout time.Duration) *V1NotificationsUIDDoneParams { + var () + return &V1NotificationsUIDDoneParams{ + + timeout: timeout, + } +} + +// NewV1NotificationsUIDDoneParamsWithContext creates a new V1NotificationsUIDDoneParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1NotificationsUIDDoneParamsWithContext(ctx context.Context) *V1NotificationsUIDDoneParams { + var () + return &V1NotificationsUIDDoneParams{ + + Context: ctx, + } +} + +// NewV1NotificationsUIDDoneParamsWithHTTPClient creates a new V1NotificationsUIDDoneParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1NotificationsUIDDoneParamsWithHTTPClient(client *http.Client) *V1NotificationsUIDDoneParams { + var () + return &V1NotificationsUIDDoneParams{ + HTTPClient: client, + } +} + +/* +V1NotificationsUIDDoneParams contains all the parameters to send to the API endpoint +for the v1 notifications Uid done operation typically these are written to a http.Request +*/ +type V1NotificationsUIDDoneParams struct { + + /*UID + Describes notification uid + + */ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 notifications Uid done params +func (o *V1NotificationsUIDDoneParams) WithTimeout(timeout time.Duration) *V1NotificationsUIDDoneParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 notifications Uid done params +func (o *V1NotificationsUIDDoneParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 notifications Uid done params +func (o *V1NotificationsUIDDoneParams) WithContext(ctx context.Context) *V1NotificationsUIDDoneParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 notifications Uid done params +func (o *V1NotificationsUIDDoneParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 notifications Uid done params +func (o *V1NotificationsUIDDoneParams) WithHTTPClient(client *http.Client) *V1NotificationsUIDDoneParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 notifications Uid done params +func (o *V1NotificationsUIDDoneParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithUID adds the uid to the v1 notifications Uid done params +func (o *V1NotificationsUIDDoneParams) WithUID(uid string) *V1NotificationsUIDDoneParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 notifications Uid done params +func (o *V1NotificationsUIDDoneParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1NotificationsUIDDoneParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_notifications_uid_done_responses.go b/api/client/v1/v1_notifications_uid_done_responses.go new file mode 100644 index 00000000..0f91c9d8 --- /dev/null +++ b/api/client/v1/v1_notifications_uid_done_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1NotificationsUIDDoneReader is a Reader for the V1NotificationsUIDDone structure. +type V1NotificationsUIDDoneReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1NotificationsUIDDoneReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1NotificationsUIDDoneNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1NotificationsUIDDoneNoContent creates a V1NotificationsUIDDoneNoContent with default headers values +func NewV1NotificationsUIDDoneNoContent() *V1NotificationsUIDDoneNoContent { + return &V1NotificationsUIDDoneNoContent{} +} + +/* +V1NotificationsUIDDoneNoContent handles this case with default header values. + +The resource was updated successfully +*/ +type V1NotificationsUIDDoneNoContent struct { +} + +func (o *V1NotificationsUIDDoneNoContent) Error() string { + return fmt.Sprintf("[PATCH /v1/notifications/{uid}/done][%d] v1NotificationsUidDoneNoContent ", 204) +} + +func (o *V1NotificationsUIDDoneNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_oci_image_registry_get_parameters.go b/api/client/v1/v1_oci_image_registry_get_parameters.go new file mode 100644 index 00000000..92f92f01 --- /dev/null +++ b/api/client/v1/v1_oci_image_registry_get_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1OciImageRegistryGetParams creates a new V1OciImageRegistryGetParams object +// with the default values initialized. +func NewV1OciImageRegistryGetParams() *V1OciImageRegistryGetParams { + + return &V1OciImageRegistryGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1OciImageRegistryGetParamsWithTimeout creates a new V1OciImageRegistryGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1OciImageRegistryGetParamsWithTimeout(timeout time.Duration) *V1OciImageRegistryGetParams { + + return &V1OciImageRegistryGetParams{ + + timeout: timeout, + } +} + +// NewV1OciImageRegistryGetParamsWithContext creates a new V1OciImageRegistryGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1OciImageRegistryGetParamsWithContext(ctx context.Context) *V1OciImageRegistryGetParams { + + return &V1OciImageRegistryGetParams{ + + Context: ctx, + } +} + +// NewV1OciImageRegistryGetParamsWithHTTPClient creates a new V1OciImageRegistryGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1OciImageRegistryGetParamsWithHTTPClient(client *http.Client) *V1OciImageRegistryGetParams { + + return &V1OciImageRegistryGetParams{ + HTTPClient: client, + } +} + +/* +V1OciImageRegistryGetParams contains all the parameters to send to the API endpoint +for the v1 oci image registry get operation typically these are written to a http.Request +*/ +type V1OciImageRegistryGetParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 oci image registry get params +func (o *V1OciImageRegistryGetParams) WithTimeout(timeout time.Duration) *V1OciImageRegistryGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 oci image registry get params +func (o *V1OciImageRegistryGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 oci image registry get params +func (o *V1OciImageRegistryGetParams) WithContext(ctx context.Context) *V1OciImageRegistryGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 oci image registry get params +func (o *V1OciImageRegistryGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 oci image registry get params +func (o *V1OciImageRegistryGetParams) WithHTTPClient(client *http.Client) *V1OciImageRegistryGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 oci image registry get params +func (o *V1OciImageRegistryGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *V1OciImageRegistryGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_oci_image_registry_get_responses.go b/api/client/v1/v1_oci_image_registry_get_responses.go new file mode 100644 index 00000000..2ca8f3a1 --- /dev/null +++ b/api/client/v1/v1_oci_image_registry_get_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1OciImageRegistryGetReader is a Reader for the V1OciImageRegistryGet structure. +type V1OciImageRegistryGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1OciImageRegistryGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1OciImageRegistryGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1OciImageRegistryGetOK creates a V1OciImageRegistryGetOK with default headers values +func NewV1OciImageRegistryGetOK() *V1OciImageRegistryGetOK { + return &V1OciImageRegistryGetOK{} +} + +/* +V1OciImageRegistryGetOK handles this case with default header values. + +(empty) +*/ +type V1OciImageRegistryGetOK struct { + Payload *models.V1OciImageRegistry +} + +func (o *V1OciImageRegistryGetOK) Error() string { + return fmt.Sprintf("[GET /v1/registries/oci/image][%d] v1OciImageRegistryGetOK %+v", 200, o.Payload) +} + +func (o *V1OciImageRegistryGetOK) GetPayload() *models.V1OciImageRegistry { + return o.Payload +} + +func (o *V1OciImageRegistryGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1OciImageRegistry) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_oci_registries_get_parameters.go b/api/client/v1/v1_oci_registries_get_parameters.go new file mode 100644 index 00000000..5dd595a3 --- /dev/null +++ b/api/client/v1/v1_oci_registries_get_parameters.go @@ -0,0 +1,162 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1OciRegistriesGetParams creates a new V1OciRegistriesGetParams object +// with the default values initialized. +func NewV1OciRegistriesGetParams() *V1OciRegistriesGetParams { + var () + return &V1OciRegistriesGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1OciRegistriesGetParamsWithTimeout creates a new V1OciRegistriesGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1OciRegistriesGetParamsWithTimeout(timeout time.Duration) *V1OciRegistriesGetParams { + var () + return &V1OciRegistriesGetParams{ + + timeout: timeout, + } +} + +// NewV1OciRegistriesGetParamsWithContext creates a new V1OciRegistriesGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1OciRegistriesGetParamsWithContext(ctx context.Context) *V1OciRegistriesGetParams { + var () + return &V1OciRegistriesGetParams{ + + Context: ctx, + } +} + +// NewV1OciRegistriesGetParamsWithHTTPClient creates a new V1OciRegistriesGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1OciRegistriesGetParamsWithHTTPClient(client *http.Client) *V1OciRegistriesGetParams { + var () + return &V1OciRegistriesGetParams{ + HTTPClient: client, + } +} + +/* +V1OciRegistriesGetParams contains all the parameters to send to the API endpoint +for the v1 oci registries get operation typically these are written to a http.Request +*/ +type V1OciRegistriesGetParams struct { + + /*ClusterUID*/ + ClusterUID *string + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 oci registries get params +func (o *V1OciRegistriesGetParams) WithTimeout(timeout time.Duration) *V1OciRegistriesGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 oci registries get params +func (o *V1OciRegistriesGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 oci registries get params +func (o *V1OciRegistriesGetParams) WithContext(ctx context.Context) *V1OciRegistriesGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 oci registries get params +func (o *V1OciRegistriesGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 oci registries get params +func (o *V1OciRegistriesGetParams) WithHTTPClient(client *http.Client) *V1OciRegistriesGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 oci registries get params +func (o *V1OciRegistriesGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithClusterUID adds the clusterUID to the v1 oci registries get params +func (o *V1OciRegistriesGetParams) WithClusterUID(clusterUID *string) *V1OciRegistriesGetParams { + o.SetClusterUID(clusterUID) + return o +} + +// SetClusterUID adds the clusterUid to the v1 oci registries get params +func (o *V1OciRegistriesGetParams) SetClusterUID(clusterUID *string) { + o.ClusterUID = clusterUID +} + +// WithUID adds the uid to the v1 oci registries get params +func (o *V1OciRegistriesGetParams) WithUID(uid string) *V1OciRegistriesGetParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 oci registries get params +func (o *V1OciRegistriesGetParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1OciRegistriesGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.ClusterUID != nil { + + // query param clusterUid + var qrClusterUID string + if o.ClusterUID != nil { + qrClusterUID = *o.ClusterUID + } + qClusterUID := qrClusterUID + if qClusterUID != "" { + if err := r.SetQueryParam("clusterUid", qClusterUID); err != nil { + return err + } + } + + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_oci_registries_get_responses.go b/api/client/v1/v1_oci_registries_get_responses.go new file mode 100644 index 00000000..54e13393 --- /dev/null +++ b/api/client/v1/v1_oci_registries_get_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1OciRegistriesGetReader is a Reader for the V1OciRegistriesGet structure. +type V1OciRegistriesGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1OciRegistriesGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1OciRegistriesGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1OciRegistriesGetOK creates a V1OciRegistriesGetOK with default headers values +func NewV1OciRegistriesGetOK() *V1OciRegistriesGetOK { + return &V1OciRegistriesGetOK{} +} + +/* +V1OciRegistriesGetOK handles this case with default header values. + +OK +*/ +type V1OciRegistriesGetOK struct { + Payload *models.V1OciRegistryEntity +} + +func (o *V1OciRegistriesGetOK) Error() string { + return fmt.Sprintf("[GET /v1/registries/oci/{uid}][%d] v1OciRegistriesGetOK %+v", 200, o.Payload) +} + +func (o *V1OciRegistriesGetOK) GetPayload() *models.V1OciRegistryEntity { + return o.Payload +} + +func (o *V1OciRegistriesGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1OciRegistryEntity) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_oci_registries_summary_parameters.go b/api/client/v1/v1_oci_registries_summary_parameters.go new file mode 100644 index 00000000..214d3367 --- /dev/null +++ b/api/client/v1/v1_oci_registries_summary_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1OciRegistriesSummaryParams creates a new V1OciRegistriesSummaryParams object +// with the default values initialized. +func NewV1OciRegistriesSummaryParams() *V1OciRegistriesSummaryParams { + + return &V1OciRegistriesSummaryParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1OciRegistriesSummaryParamsWithTimeout creates a new V1OciRegistriesSummaryParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1OciRegistriesSummaryParamsWithTimeout(timeout time.Duration) *V1OciRegistriesSummaryParams { + + return &V1OciRegistriesSummaryParams{ + + timeout: timeout, + } +} + +// NewV1OciRegistriesSummaryParamsWithContext creates a new V1OciRegistriesSummaryParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1OciRegistriesSummaryParamsWithContext(ctx context.Context) *V1OciRegistriesSummaryParams { + + return &V1OciRegistriesSummaryParams{ + + Context: ctx, + } +} + +// NewV1OciRegistriesSummaryParamsWithHTTPClient creates a new V1OciRegistriesSummaryParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1OciRegistriesSummaryParamsWithHTTPClient(client *http.Client) *V1OciRegistriesSummaryParams { + + return &V1OciRegistriesSummaryParams{ + HTTPClient: client, + } +} + +/* +V1OciRegistriesSummaryParams contains all the parameters to send to the API endpoint +for the v1 oci registries summary operation typically these are written to a http.Request +*/ +type V1OciRegistriesSummaryParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 oci registries summary params +func (o *V1OciRegistriesSummaryParams) WithTimeout(timeout time.Duration) *V1OciRegistriesSummaryParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 oci registries summary params +func (o *V1OciRegistriesSummaryParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 oci registries summary params +func (o *V1OciRegistriesSummaryParams) WithContext(ctx context.Context) *V1OciRegistriesSummaryParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 oci registries summary params +func (o *V1OciRegistriesSummaryParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 oci registries summary params +func (o *V1OciRegistriesSummaryParams) WithHTTPClient(client *http.Client) *V1OciRegistriesSummaryParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 oci registries summary params +func (o *V1OciRegistriesSummaryParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *V1OciRegistriesSummaryParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_oci_registries_summary_responses.go b/api/client/v1/v1_oci_registries_summary_responses.go new file mode 100644 index 00000000..e329e885 --- /dev/null +++ b/api/client/v1/v1_oci_registries_summary_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1OciRegistriesSummaryReader is a Reader for the V1OciRegistriesSummary structure. +type V1OciRegistriesSummaryReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1OciRegistriesSummaryReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1OciRegistriesSummaryOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1OciRegistriesSummaryOK creates a V1OciRegistriesSummaryOK with default headers values +func NewV1OciRegistriesSummaryOK() *V1OciRegistriesSummaryOK { + return &V1OciRegistriesSummaryOK{} +} + +/* +V1OciRegistriesSummaryOK handles this case with default header values. + +An array of oci registry items +*/ +type V1OciRegistriesSummaryOK struct { + Payload *models.V1OciRegistries +} + +func (o *V1OciRegistriesSummaryOK) Error() string { + return fmt.Sprintf("[GET /v1/registries/oci/summary][%d] v1OciRegistriesSummaryOK %+v", 200, o.Payload) +} + +func (o *V1OciRegistriesSummaryOK) GetPayload() *models.V1OciRegistries { + return o.Payload +} + +func (o *V1OciRegistriesSummaryOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1OciRegistries) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_oidc_callback_parameters.go b/api/client/v1/v1_oidc_callback_parameters.go new file mode 100644 index 00000000..aaa0b8ce --- /dev/null +++ b/api/client/v1/v1_oidc_callback_parameters.go @@ -0,0 +1,264 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1OidcCallbackParams creates a new V1OidcCallbackParams object +// with the default values initialized. +func NewV1OidcCallbackParams() *V1OidcCallbackParams { + var () + return &V1OidcCallbackParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1OidcCallbackParamsWithTimeout creates a new V1OidcCallbackParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1OidcCallbackParamsWithTimeout(timeout time.Duration) *V1OidcCallbackParams { + var () + return &V1OidcCallbackParams{ + + timeout: timeout, + } +} + +// NewV1OidcCallbackParamsWithContext creates a new V1OidcCallbackParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1OidcCallbackParamsWithContext(ctx context.Context) *V1OidcCallbackParams { + var () + return &V1OidcCallbackParams{ + + Context: ctx, + } +} + +// NewV1OidcCallbackParamsWithHTTPClient creates a new V1OidcCallbackParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1OidcCallbackParamsWithHTTPClient(client *http.Client) *V1OidcCallbackParams { + var () + return &V1OidcCallbackParams{ + HTTPClient: client, + } +} + +/* +V1OidcCallbackParams contains all the parameters to send to the API endpoint +for the v1 oidc callback operation typically these are written to a http.Request +*/ +type V1OidcCallbackParams struct { + + /*Code + Describes temporary and very short lived code sent by IDP to validate the token + + */ + Code *string + /*Error + Describes a error code in case the IDP is not able to validate and authenticates the user + + */ + Error *string + /*ErrorDescription + Describes a error in case the IDP is not able to validate and authenticates the user + + */ + ErrorDescription *string + /*Org + Organization name + + */ + Org string + /*State + Describes a state to validate and associate request and response + + */ + State *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 oidc callback params +func (o *V1OidcCallbackParams) WithTimeout(timeout time.Duration) *V1OidcCallbackParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 oidc callback params +func (o *V1OidcCallbackParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 oidc callback params +func (o *V1OidcCallbackParams) WithContext(ctx context.Context) *V1OidcCallbackParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 oidc callback params +func (o *V1OidcCallbackParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 oidc callback params +func (o *V1OidcCallbackParams) WithHTTPClient(client *http.Client) *V1OidcCallbackParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 oidc callback params +func (o *V1OidcCallbackParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithCode adds the code to the v1 oidc callback params +func (o *V1OidcCallbackParams) WithCode(code *string) *V1OidcCallbackParams { + o.SetCode(code) + return o +} + +// SetCode adds the code to the v1 oidc callback params +func (o *V1OidcCallbackParams) SetCode(code *string) { + o.Code = code +} + +// WithError adds the error to the v1 oidc callback params +func (o *V1OidcCallbackParams) WithError(error *string) *V1OidcCallbackParams { + o.SetError(error) + return o +} + +// SetError adds the error to the v1 oidc callback params +func (o *V1OidcCallbackParams) SetError(error *string) { + o.Error = error +} + +// WithErrorDescription adds the errorDescription to the v1 oidc callback params +func (o *V1OidcCallbackParams) WithErrorDescription(errorDescription *string) *V1OidcCallbackParams { + o.SetErrorDescription(errorDescription) + return o +} + +// SetErrorDescription adds the errorDescription to the v1 oidc callback params +func (o *V1OidcCallbackParams) SetErrorDescription(errorDescription *string) { + o.ErrorDescription = errorDescription +} + +// WithOrg adds the org to the v1 oidc callback params +func (o *V1OidcCallbackParams) WithOrg(org string) *V1OidcCallbackParams { + o.SetOrg(org) + return o +} + +// SetOrg adds the org to the v1 oidc callback params +func (o *V1OidcCallbackParams) SetOrg(org string) { + o.Org = org +} + +// WithState adds the state to the v1 oidc callback params +func (o *V1OidcCallbackParams) WithState(state *string) *V1OidcCallbackParams { + o.SetState(state) + return o +} + +// SetState adds the state to the v1 oidc callback params +func (o *V1OidcCallbackParams) SetState(state *string) { + o.State = state +} + +// WriteToRequest writes these params to a swagger request +func (o *V1OidcCallbackParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Code != nil { + + // query param code + var qrCode string + if o.Code != nil { + qrCode = *o.Code + } + qCode := qrCode + if qCode != "" { + if err := r.SetQueryParam("code", qCode); err != nil { + return err + } + } + + } + + if o.Error != nil { + + // query param error + var qrError string + if o.Error != nil { + qrError = *o.Error + } + qError := qrError + if qError != "" { + if err := r.SetQueryParam("error", qError); err != nil { + return err + } + } + + } + + if o.ErrorDescription != nil { + + // query param error_description + var qrErrorDescription string + if o.ErrorDescription != nil { + qrErrorDescription = *o.ErrorDescription + } + qErrorDescription := qrErrorDescription + if qErrorDescription != "" { + if err := r.SetQueryParam("error_description", qErrorDescription); err != nil { + return err + } + } + + } + + // path param org + if err := r.SetPathParam("org", o.Org); err != nil { + return err + } + + if o.State != nil { + + // query param state + var qrState string + if o.State != nil { + qrState = *o.State + } + qState := qrState + if qState != "" { + if err := r.SetQueryParam("state", qState); err != nil { + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_oidc_callback_responses.go b/api/client/v1/v1_oidc_callback_responses.go new file mode 100644 index 00000000..de86ba6e --- /dev/null +++ b/api/client/v1/v1_oidc_callback_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1OidcCallbackReader is a Reader for the V1OidcCallback structure. +type V1OidcCallbackReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1OidcCallbackReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1OidcCallbackOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1OidcCallbackOK creates a V1OidcCallbackOK with default headers values +func NewV1OidcCallbackOK() *V1OidcCallbackOK { + return &V1OidcCallbackOK{} +} + +/* +V1OidcCallbackOK handles this case with default header values. + +OK +*/ +type V1OidcCallbackOK struct { + Payload *models.V1UserToken +} + +func (o *V1OidcCallbackOK) Error() string { + return fmt.Sprintf("[GET /v1/auth/org/{org}/oidc/callback][%d] v1OidcCallbackOK %+v", 200, o.Payload) +} + +func (o *V1OidcCallbackOK) GetPayload() *models.V1UserToken { + return o.Payload +} + +func (o *V1OidcCallbackOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1UserToken) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_oidc_logout_parameters.go b/api/client/v1/v1_oidc_logout_parameters.go new file mode 100644 index 00000000..375f4036 --- /dev/null +++ b/api/client/v1/v1_oidc_logout_parameters.go @@ -0,0 +1,168 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1OidcLogoutParams creates a new V1OidcLogoutParams object +// with the default values initialized. +func NewV1OidcLogoutParams() *V1OidcLogoutParams { + var () + return &V1OidcLogoutParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1OidcLogoutParamsWithTimeout creates a new V1OidcLogoutParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1OidcLogoutParamsWithTimeout(timeout time.Duration) *V1OidcLogoutParams { + var () + return &V1OidcLogoutParams{ + + timeout: timeout, + } +} + +// NewV1OidcLogoutParamsWithContext creates a new V1OidcLogoutParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1OidcLogoutParamsWithContext(ctx context.Context) *V1OidcLogoutParams { + var () + return &V1OidcLogoutParams{ + + Context: ctx, + } +} + +// NewV1OidcLogoutParamsWithHTTPClient creates a new V1OidcLogoutParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1OidcLogoutParamsWithHTTPClient(client *http.Client) *V1OidcLogoutParams { + var () + return &V1OidcLogoutParams{ + HTTPClient: client, + } +} + +/* +V1OidcLogoutParams contains all the parameters to send to the API endpoint +for the v1 oidc logout operation typically these are written to a http.Request +*/ +type V1OidcLogoutParams struct { + + /*Org + Organization name + + */ + Org string + /*State + Describes a state to validate and associate request and response + + */ + State *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 oidc logout params +func (o *V1OidcLogoutParams) WithTimeout(timeout time.Duration) *V1OidcLogoutParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 oidc logout params +func (o *V1OidcLogoutParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 oidc logout params +func (o *V1OidcLogoutParams) WithContext(ctx context.Context) *V1OidcLogoutParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 oidc logout params +func (o *V1OidcLogoutParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 oidc logout params +func (o *V1OidcLogoutParams) WithHTTPClient(client *http.Client) *V1OidcLogoutParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 oidc logout params +func (o *V1OidcLogoutParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithOrg adds the org to the v1 oidc logout params +func (o *V1OidcLogoutParams) WithOrg(org string) *V1OidcLogoutParams { + o.SetOrg(org) + return o +} + +// SetOrg adds the org to the v1 oidc logout params +func (o *V1OidcLogoutParams) SetOrg(org string) { + o.Org = org +} + +// WithState adds the state to the v1 oidc logout params +func (o *V1OidcLogoutParams) WithState(state *string) *V1OidcLogoutParams { + o.SetState(state) + return o +} + +// SetState adds the state to the v1 oidc logout params +func (o *V1OidcLogoutParams) SetState(state *string) { + o.State = state +} + +// WriteToRequest writes these params to a swagger request +func (o *V1OidcLogoutParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param org + if err := r.SetPathParam("org", o.Org); err != nil { + return err + } + + if o.State != nil { + + // query param state + var qrState string + if o.State != nil { + qrState = *o.State + } + qState := qrState + if qState != "" { + if err := r.SetQueryParam("state", qState); err != nil { + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_oidc_logout_responses.go b/api/client/v1/v1_oidc_logout_responses.go new file mode 100644 index 00000000..1622b6d7 --- /dev/null +++ b/api/client/v1/v1_oidc_logout_responses.go @@ -0,0 +1,61 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1OidcLogoutReader is a Reader for the V1OidcLogout structure. +type V1OidcLogoutReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1OidcLogoutReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1OidcLogoutNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1OidcLogoutNoContent creates a V1OidcLogoutNoContent with default headers values +func NewV1OidcLogoutNoContent() *V1OidcLogoutNoContent { + return &V1OidcLogoutNoContent{} +} + +/* +V1OidcLogoutNoContent handles this case with default header values. + +Ok response without content +*/ +type V1OidcLogoutNoContent struct { + /*Audit uid for the request + */ + AuditUID string +} + +func (o *V1OidcLogoutNoContent) Error() string { + return fmt.Sprintf("[GET /v1/auth/org/{org}/oidc/logout][%d] v1OidcLogoutNoContent ", 204) +} + +func (o *V1OidcLogoutNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header AuditUid + o.AuditUID = response.GetHeader("AuditUid") + + return nil +} diff --git a/api/client/v1/v1_open_stack_account_validate_parameters.go b/api/client/v1/v1_open_stack_account_validate_parameters.go new file mode 100644 index 00000000..d54258ee --- /dev/null +++ b/api/client/v1/v1_open_stack_account_validate_parameters.go @@ -0,0 +1,139 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1OpenStackAccountValidateParams creates a new V1OpenStackAccountValidateParams object +// with the default values initialized. +func NewV1OpenStackAccountValidateParams() *V1OpenStackAccountValidateParams { + var () + return &V1OpenStackAccountValidateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1OpenStackAccountValidateParamsWithTimeout creates a new V1OpenStackAccountValidateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1OpenStackAccountValidateParamsWithTimeout(timeout time.Duration) *V1OpenStackAccountValidateParams { + var () + return &V1OpenStackAccountValidateParams{ + + timeout: timeout, + } +} + +// NewV1OpenStackAccountValidateParamsWithContext creates a new V1OpenStackAccountValidateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1OpenStackAccountValidateParamsWithContext(ctx context.Context) *V1OpenStackAccountValidateParams { + var () + return &V1OpenStackAccountValidateParams{ + + Context: ctx, + } +} + +// NewV1OpenStackAccountValidateParamsWithHTTPClient creates a new V1OpenStackAccountValidateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1OpenStackAccountValidateParamsWithHTTPClient(client *http.Client) *V1OpenStackAccountValidateParams { + var () + return &V1OpenStackAccountValidateParams{ + HTTPClient: client, + } +} + +/* +V1OpenStackAccountValidateParams contains all the parameters to send to the API endpoint +for the v1 open stack account validate operation typically these are written to a http.Request +*/ +type V1OpenStackAccountValidateParams struct { + + /*OpenstackCloudAccount + Request payload for OpenStack cloud account + + */ + OpenstackCloudAccount *models.V1OpenStackCloudAccount + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 open stack account validate params +func (o *V1OpenStackAccountValidateParams) WithTimeout(timeout time.Duration) *V1OpenStackAccountValidateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 open stack account validate params +func (o *V1OpenStackAccountValidateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 open stack account validate params +func (o *V1OpenStackAccountValidateParams) WithContext(ctx context.Context) *V1OpenStackAccountValidateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 open stack account validate params +func (o *V1OpenStackAccountValidateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 open stack account validate params +func (o *V1OpenStackAccountValidateParams) WithHTTPClient(client *http.Client) *V1OpenStackAccountValidateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 open stack account validate params +func (o *V1OpenStackAccountValidateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithOpenstackCloudAccount adds the openstackCloudAccount to the v1 open stack account validate params +func (o *V1OpenStackAccountValidateParams) WithOpenstackCloudAccount(openstackCloudAccount *models.V1OpenStackCloudAccount) *V1OpenStackAccountValidateParams { + o.SetOpenstackCloudAccount(openstackCloudAccount) + return o +} + +// SetOpenstackCloudAccount adds the openstackCloudAccount to the v1 open stack account validate params +func (o *V1OpenStackAccountValidateParams) SetOpenstackCloudAccount(openstackCloudAccount *models.V1OpenStackCloudAccount) { + o.OpenstackCloudAccount = openstackCloudAccount +} + +// WriteToRequest writes these params to a swagger request +func (o *V1OpenStackAccountValidateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.OpenstackCloudAccount != nil { + if err := r.SetBodyParam(o.OpenstackCloudAccount); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_open_stack_account_validate_responses.go b/api/client/v1/v1_open_stack_account_validate_responses.go new file mode 100644 index 00000000..6ec3b5bc --- /dev/null +++ b/api/client/v1/v1_open_stack_account_validate_responses.go @@ -0,0 +1,61 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1OpenStackAccountValidateReader is a Reader for the V1OpenStackAccountValidate structure. +type V1OpenStackAccountValidateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1OpenStackAccountValidateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1OpenStackAccountValidateNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1OpenStackAccountValidateNoContent creates a V1OpenStackAccountValidateNoContent with default headers values +func NewV1OpenStackAccountValidateNoContent() *V1OpenStackAccountValidateNoContent { + return &V1OpenStackAccountValidateNoContent{} +} + +/* +V1OpenStackAccountValidateNoContent handles this case with default header values. + +Ok response without content +*/ +type V1OpenStackAccountValidateNoContent struct { + /*Audit uid for the request + */ + AuditUID string +} + +func (o *V1OpenStackAccountValidateNoContent) Error() string { + return fmt.Sprintf("[POST /v1/clouds/openstack/account/validate][%d] v1OpenStackAccountValidateNoContent ", 204) +} + +func (o *V1OpenStackAccountValidateNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header AuditUid + o.AuditUID = response.GetHeader("AuditUid") + + return nil +} diff --git a/api/client/v1/v1_open_stack_azs_get_parameters.go b/api/client/v1/v1_open_stack_azs_get_parameters.go new file mode 100644 index 00000000..8287f459 --- /dev/null +++ b/api/client/v1/v1_open_stack_azs_get_parameters.go @@ -0,0 +1,243 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1OpenStackAzsGetParams creates a new V1OpenStackAzsGetParams object +// with the default values initialized. +func NewV1OpenStackAzsGetParams() *V1OpenStackAzsGetParams { + var () + return &V1OpenStackAzsGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1OpenStackAzsGetParamsWithTimeout creates a new V1OpenStackAzsGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1OpenStackAzsGetParamsWithTimeout(timeout time.Duration) *V1OpenStackAzsGetParams { + var () + return &V1OpenStackAzsGetParams{ + + timeout: timeout, + } +} + +// NewV1OpenStackAzsGetParamsWithContext creates a new V1OpenStackAzsGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1OpenStackAzsGetParamsWithContext(ctx context.Context) *V1OpenStackAzsGetParams { + var () + return &V1OpenStackAzsGetParams{ + + Context: ctx, + } +} + +// NewV1OpenStackAzsGetParamsWithHTTPClient creates a new V1OpenStackAzsGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1OpenStackAzsGetParamsWithHTTPClient(client *http.Client) *V1OpenStackAzsGetParams { + var () + return &V1OpenStackAzsGetParams{ + HTTPClient: client, + } +} + +/* +V1OpenStackAzsGetParams contains all the parameters to send to the API endpoint +for the v1 open stack azs get operation typically these are written to a http.Request +*/ +type V1OpenStackAzsGetParams struct { + + /*CloudAccountUID + Uid for the specific OpenStack cloud account + + */ + CloudAccountUID *string + /*Domain + domain for which OpenStack azs are requested + + */ + Domain *string + /*Project + project for which OpenStack azs are requested + + */ + Project *string + /*Region + region for which OpenStack azs are requested + + */ + Region *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 open stack azs get params +func (o *V1OpenStackAzsGetParams) WithTimeout(timeout time.Duration) *V1OpenStackAzsGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 open stack azs get params +func (o *V1OpenStackAzsGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 open stack azs get params +func (o *V1OpenStackAzsGetParams) WithContext(ctx context.Context) *V1OpenStackAzsGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 open stack azs get params +func (o *V1OpenStackAzsGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 open stack azs get params +func (o *V1OpenStackAzsGetParams) WithHTTPClient(client *http.Client) *V1OpenStackAzsGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 open stack azs get params +func (o *V1OpenStackAzsGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithCloudAccountUID adds the cloudAccountUID to the v1 open stack azs get params +func (o *V1OpenStackAzsGetParams) WithCloudAccountUID(cloudAccountUID *string) *V1OpenStackAzsGetParams { + o.SetCloudAccountUID(cloudAccountUID) + return o +} + +// SetCloudAccountUID adds the cloudAccountUid to the v1 open stack azs get params +func (o *V1OpenStackAzsGetParams) SetCloudAccountUID(cloudAccountUID *string) { + o.CloudAccountUID = cloudAccountUID +} + +// WithDomain adds the domain to the v1 open stack azs get params +func (o *V1OpenStackAzsGetParams) WithDomain(domain *string) *V1OpenStackAzsGetParams { + o.SetDomain(domain) + return o +} + +// SetDomain adds the domain to the v1 open stack azs get params +func (o *V1OpenStackAzsGetParams) SetDomain(domain *string) { + o.Domain = domain +} + +// WithProject adds the project to the v1 open stack azs get params +func (o *V1OpenStackAzsGetParams) WithProject(project *string) *V1OpenStackAzsGetParams { + o.SetProject(project) + return o +} + +// SetProject adds the project to the v1 open stack azs get params +func (o *V1OpenStackAzsGetParams) SetProject(project *string) { + o.Project = project +} + +// WithRegion adds the region to the v1 open stack azs get params +func (o *V1OpenStackAzsGetParams) WithRegion(region *string) *V1OpenStackAzsGetParams { + o.SetRegion(region) + return o +} + +// SetRegion adds the region to the v1 open stack azs get params +func (o *V1OpenStackAzsGetParams) SetRegion(region *string) { + o.Region = region +} + +// WriteToRequest writes these params to a swagger request +func (o *V1OpenStackAzsGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.CloudAccountUID != nil { + + // query param cloudAccountUid + var qrCloudAccountUID string + if o.CloudAccountUID != nil { + qrCloudAccountUID = *o.CloudAccountUID + } + qCloudAccountUID := qrCloudAccountUID + if qCloudAccountUID != "" { + if err := r.SetQueryParam("cloudAccountUid", qCloudAccountUID); err != nil { + return err + } + } + + } + + if o.Domain != nil { + + // query param domain + var qrDomain string + if o.Domain != nil { + qrDomain = *o.Domain + } + qDomain := qrDomain + if qDomain != "" { + if err := r.SetQueryParam("domain", qDomain); err != nil { + return err + } + } + + } + + if o.Project != nil { + + // query param project + var qrProject string + if o.Project != nil { + qrProject = *o.Project + } + qProject := qrProject + if qProject != "" { + if err := r.SetQueryParam("project", qProject); err != nil { + return err + } + } + + } + + if o.Region != nil { + + // query param region + var qrRegion string + if o.Region != nil { + qrRegion = *o.Region + } + qRegion := qrRegion + if qRegion != "" { + if err := r.SetQueryParam("region", qRegion); err != nil { + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_open_stack_azs_get_responses.go b/api/client/v1/v1_open_stack_azs_get_responses.go new file mode 100644 index 00000000..51e31df5 --- /dev/null +++ b/api/client/v1/v1_open_stack_azs_get_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1OpenStackAzsGetReader is a Reader for the V1OpenStackAzsGet structure. +type V1OpenStackAzsGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1OpenStackAzsGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1OpenStackAzsGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1OpenStackAzsGetOK creates a V1OpenStackAzsGetOK with default headers values +func NewV1OpenStackAzsGetOK() *V1OpenStackAzsGetOK { + return &V1OpenStackAzsGetOK{} +} + +/* +V1OpenStackAzsGetOK handles this case with default header values. + +(empty) +*/ +type V1OpenStackAzsGetOK struct { + Payload *models.V1OpenStackAzs +} + +func (o *V1OpenStackAzsGetOK) Error() string { + return fmt.Sprintf("[GET /v1/clouds/openstack/azs][%d] v1OpenStackAzsGetOK %+v", 200, o.Payload) +} + +func (o *V1OpenStackAzsGetOK) GetPayload() *models.V1OpenStackAzs { + return o.Payload +} + +func (o *V1OpenStackAzsGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1OpenStackAzs) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_open_stack_flavors_get_parameters.go b/api/client/v1/v1_open_stack_flavors_get_parameters.go new file mode 100644 index 00000000..4df28570 --- /dev/null +++ b/api/client/v1/v1_open_stack_flavors_get_parameters.go @@ -0,0 +1,243 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1OpenStackFlavorsGetParams creates a new V1OpenStackFlavorsGetParams object +// with the default values initialized. +func NewV1OpenStackFlavorsGetParams() *V1OpenStackFlavorsGetParams { + var () + return &V1OpenStackFlavorsGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1OpenStackFlavorsGetParamsWithTimeout creates a new V1OpenStackFlavorsGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1OpenStackFlavorsGetParamsWithTimeout(timeout time.Duration) *V1OpenStackFlavorsGetParams { + var () + return &V1OpenStackFlavorsGetParams{ + + timeout: timeout, + } +} + +// NewV1OpenStackFlavorsGetParamsWithContext creates a new V1OpenStackFlavorsGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1OpenStackFlavorsGetParamsWithContext(ctx context.Context) *V1OpenStackFlavorsGetParams { + var () + return &V1OpenStackFlavorsGetParams{ + + Context: ctx, + } +} + +// NewV1OpenStackFlavorsGetParamsWithHTTPClient creates a new V1OpenStackFlavorsGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1OpenStackFlavorsGetParamsWithHTTPClient(client *http.Client) *V1OpenStackFlavorsGetParams { + var () + return &V1OpenStackFlavorsGetParams{ + HTTPClient: client, + } +} + +/* +V1OpenStackFlavorsGetParams contains all the parameters to send to the API endpoint +for the v1 open stack flavors get operation typically these are written to a http.Request +*/ +type V1OpenStackFlavorsGetParams struct { + + /*CloudAccountUID + Uid for the specific OpenStack cloud account + + */ + CloudAccountUID *string + /*Domain + domain for which OpenStack flavors are requested + + */ + Domain *string + /*Project + project for which OpenStack flavors are requested + + */ + Project *string + /*Region + region for which OpenStack flavors are requested + + */ + Region *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 open stack flavors get params +func (o *V1OpenStackFlavorsGetParams) WithTimeout(timeout time.Duration) *V1OpenStackFlavorsGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 open stack flavors get params +func (o *V1OpenStackFlavorsGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 open stack flavors get params +func (o *V1OpenStackFlavorsGetParams) WithContext(ctx context.Context) *V1OpenStackFlavorsGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 open stack flavors get params +func (o *V1OpenStackFlavorsGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 open stack flavors get params +func (o *V1OpenStackFlavorsGetParams) WithHTTPClient(client *http.Client) *V1OpenStackFlavorsGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 open stack flavors get params +func (o *V1OpenStackFlavorsGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithCloudAccountUID adds the cloudAccountUID to the v1 open stack flavors get params +func (o *V1OpenStackFlavorsGetParams) WithCloudAccountUID(cloudAccountUID *string) *V1OpenStackFlavorsGetParams { + o.SetCloudAccountUID(cloudAccountUID) + return o +} + +// SetCloudAccountUID adds the cloudAccountUid to the v1 open stack flavors get params +func (o *V1OpenStackFlavorsGetParams) SetCloudAccountUID(cloudAccountUID *string) { + o.CloudAccountUID = cloudAccountUID +} + +// WithDomain adds the domain to the v1 open stack flavors get params +func (o *V1OpenStackFlavorsGetParams) WithDomain(domain *string) *V1OpenStackFlavorsGetParams { + o.SetDomain(domain) + return o +} + +// SetDomain adds the domain to the v1 open stack flavors get params +func (o *V1OpenStackFlavorsGetParams) SetDomain(domain *string) { + o.Domain = domain +} + +// WithProject adds the project to the v1 open stack flavors get params +func (o *V1OpenStackFlavorsGetParams) WithProject(project *string) *V1OpenStackFlavorsGetParams { + o.SetProject(project) + return o +} + +// SetProject adds the project to the v1 open stack flavors get params +func (o *V1OpenStackFlavorsGetParams) SetProject(project *string) { + o.Project = project +} + +// WithRegion adds the region to the v1 open stack flavors get params +func (o *V1OpenStackFlavorsGetParams) WithRegion(region *string) *V1OpenStackFlavorsGetParams { + o.SetRegion(region) + return o +} + +// SetRegion adds the region to the v1 open stack flavors get params +func (o *V1OpenStackFlavorsGetParams) SetRegion(region *string) { + o.Region = region +} + +// WriteToRequest writes these params to a swagger request +func (o *V1OpenStackFlavorsGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.CloudAccountUID != nil { + + // query param cloudAccountUid + var qrCloudAccountUID string + if o.CloudAccountUID != nil { + qrCloudAccountUID = *o.CloudAccountUID + } + qCloudAccountUID := qrCloudAccountUID + if qCloudAccountUID != "" { + if err := r.SetQueryParam("cloudAccountUid", qCloudAccountUID); err != nil { + return err + } + } + + } + + if o.Domain != nil { + + // query param domain + var qrDomain string + if o.Domain != nil { + qrDomain = *o.Domain + } + qDomain := qrDomain + if qDomain != "" { + if err := r.SetQueryParam("domain", qDomain); err != nil { + return err + } + } + + } + + if o.Project != nil { + + // query param project + var qrProject string + if o.Project != nil { + qrProject = *o.Project + } + qProject := qrProject + if qProject != "" { + if err := r.SetQueryParam("project", qProject); err != nil { + return err + } + } + + } + + if o.Region != nil { + + // query param region + var qrRegion string + if o.Region != nil { + qrRegion = *o.Region + } + qRegion := qrRegion + if qRegion != "" { + if err := r.SetQueryParam("region", qRegion); err != nil { + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_open_stack_flavors_get_responses.go b/api/client/v1/v1_open_stack_flavors_get_responses.go new file mode 100644 index 00000000..a148258b --- /dev/null +++ b/api/client/v1/v1_open_stack_flavors_get_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1OpenStackFlavorsGetReader is a Reader for the V1OpenStackFlavorsGet structure. +type V1OpenStackFlavorsGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1OpenStackFlavorsGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1OpenStackFlavorsGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1OpenStackFlavorsGetOK creates a V1OpenStackFlavorsGetOK with default headers values +func NewV1OpenStackFlavorsGetOK() *V1OpenStackFlavorsGetOK { + return &V1OpenStackFlavorsGetOK{} +} + +/* +V1OpenStackFlavorsGetOK handles this case with default header values. + +(empty) +*/ +type V1OpenStackFlavorsGetOK struct { + Payload *models.V1OpenStackFlavors +} + +func (o *V1OpenStackFlavorsGetOK) Error() string { + return fmt.Sprintf("[GET /v1/clouds/openstack/flavors][%d] v1OpenStackFlavorsGetOK %+v", 200, o.Payload) +} + +func (o *V1OpenStackFlavorsGetOK) GetPayload() *models.V1OpenStackFlavors { + return o.Payload +} + +func (o *V1OpenStackFlavorsGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1OpenStackFlavors) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_open_stack_keypairs_get_parameters.go b/api/client/v1/v1_open_stack_keypairs_get_parameters.go new file mode 100644 index 00000000..bcb4622c --- /dev/null +++ b/api/client/v1/v1_open_stack_keypairs_get_parameters.go @@ -0,0 +1,243 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1OpenStackKeypairsGetParams creates a new V1OpenStackKeypairsGetParams object +// with the default values initialized. +func NewV1OpenStackKeypairsGetParams() *V1OpenStackKeypairsGetParams { + var () + return &V1OpenStackKeypairsGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1OpenStackKeypairsGetParamsWithTimeout creates a new V1OpenStackKeypairsGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1OpenStackKeypairsGetParamsWithTimeout(timeout time.Duration) *V1OpenStackKeypairsGetParams { + var () + return &V1OpenStackKeypairsGetParams{ + + timeout: timeout, + } +} + +// NewV1OpenStackKeypairsGetParamsWithContext creates a new V1OpenStackKeypairsGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1OpenStackKeypairsGetParamsWithContext(ctx context.Context) *V1OpenStackKeypairsGetParams { + var () + return &V1OpenStackKeypairsGetParams{ + + Context: ctx, + } +} + +// NewV1OpenStackKeypairsGetParamsWithHTTPClient creates a new V1OpenStackKeypairsGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1OpenStackKeypairsGetParamsWithHTTPClient(client *http.Client) *V1OpenStackKeypairsGetParams { + var () + return &V1OpenStackKeypairsGetParams{ + HTTPClient: client, + } +} + +/* +V1OpenStackKeypairsGetParams contains all the parameters to send to the API endpoint +for the v1 open stack keypairs get operation typically these are written to a http.Request +*/ +type V1OpenStackKeypairsGetParams struct { + + /*CloudAccountUID + Uid for the specific OpenStack cloud account + + */ + CloudAccountUID *string + /*Domain + domain for which OpenStack keypairs are requested + + */ + Domain *string + /*Project + project for which OpenStack keypairs are requested + + */ + Project *string + /*Region + region for which OpenStack keypairs are requested + + */ + Region *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 open stack keypairs get params +func (o *V1OpenStackKeypairsGetParams) WithTimeout(timeout time.Duration) *V1OpenStackKeypairsGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 open stack keypairs get params +func (o *V1OpenStackKeypairsGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 open stack keypairs get params +func (o *V1OpenStackKeypairsGetParams) WithContext(ctx context.Context) *V1OpenStackKeypairsGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 open stack keypairs get params +func (o *V1OpenStackKeypairsGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 open stack keypairs get params +func (o *V1OpenStackKeypairsGetParams) WithHTTPClient(client *http.Client) *V1OpenStackKeypairsGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 open stack keypairs get params +func (o *V1OpenStackKeypairsGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithCloudAccountUID adds the cloudAccountUID to the v1 open stack keypairs get params +func (o *V1OpenStackKeypairsGetParams) WithCloudAccountUID(cloudAccountUID *string) *V1OpenStackKeypairsGetParams { + o.SetCloudAccountUID(cloudAccountUID) + return o +} + +// SetCloudAccountUID adds the cloudAccountUid to the v1 open stack keypairs get params +func (o *V1OpenStackKeypairsGetParams) SetCloudAccountUID(cloudAccountUID *string) { + o.CloudAccountUID = cloudAccountUID +} + +// WithDomain adds the domain to the v1 open stack keypairs get params +func (o *V1OpenStackKeypairsGetParams) WithDomain(domain *string) *V1OpenStackKeypairsGetParams { + o.SetDomain(domain) + return o +} + +// SetDomain adds the domain to the v1 open stack keypairs get params +func (o *V1OpenStackKeypairsGetParams) SetDomain(domain *string) { + o.Domain = domain +} + +// WithProject adds the project to the v1 open stack keypairs get params +func (o *V1OpenStackKeypairsGetParams) WithProject(project *string) *V1OpenStackKeypairsGetParams { + o.SetProject(project) + return o +} + +// SetProject adds the project to the v1 open stack keypairs get params +func (o *V1OpenStackKeypairsGetParams) SetProject(project *string) { + o.Project = project +} + +// WithRegion adds the region to the v1 open stack keypairs get params +func (o *V1OpenStackKeypairsGetParams) WithRegion(region *string) *V1OpenStackKeypairsGetParams { + o.SetRegion(region) + return o +} + +// SetRegion adds the region to the v1 open stack keypairs get params +func (o *V1OpenStackKeypairsGetParams) SetRegion(region *string) { + o.Region = region +} + +// WriteToRequest writes these params to a swagger request +func (o *V1OpenStackKeypairsGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.CloudAccountUID != nil { + + // query param cloudAccountUid + var qrCloudAccountUID string + if o.CloudAccountUID != nil { + qrCloudAccountUID = *o.CloudAccountUID + } + qCloudAccountUID := qrCloudAccountUID + if qCloudAccountUID != "" { + if err := r.SetQueryParam("cloudAccountUid", qCloudAccountUID); err != nil { + return err + } + } + + } + + if o.Domain != nil { + + // query param domain + var qrDomain string + if o.Domain != nil { + qrDomain = *o.Domain + } + qDomain := qrDomain + if qDomain != "" { + if err := r.SetQueryParam("domain", qDomain); err != nil { + return err + } + } + + } + + if o.Project != nil { + + // query param project + var qrProject string + if o.Project != nil { + qrProject = *o.Project + } + qProject := qrProject + if qProject != "" { + if err := r.SetQueryParam("project", qProject); err != nil { + return err + } + } + + } + + if o.Region != nil { + + // query param region + var qrRegion string + if o.Region != nil { + qrRegion = *o.Region + } + qRegion := qrRegion + if qRegion != "" { + if err := r.SetQueryParam("region", qRegion); err != nil { + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_open_stack_keypairs_get_responses.go b/api/client/v1/v1_open_stack_keypairs_get_responses.go new file mode 100644 index 00000000..81337415 --- /dev/null +++ b/api/client/v1/v1_open_stack_keypairs_get_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1OpenStackKeypairsGetReader is a Reader for the V1OpenStackKeypairsGet structure. +type V1OpenStackKeypairsGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1OpenStackKeypairsGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1OpenStackKeypairsGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1OpenStackKeypairsGetOK creates a V1OpenStackKeypairsGetOK with default headers values +func NewV1OpenStackKeypairsGetOK() *V1OpenStackKeypairsGetOK { + return &V1OpenStackKeypairsGetOK{} +} + +/* +V1OpenStackKeypairsGetOK handles this case with default header values. + +(empty) +*/ +type V1OpenStackKeypairsGetOK struct { + Payload *models.V1OpenStackKeypairs +} + +func (o *V1OpenStackKeypairsGetOK) Error() string { + return fmt.Sprintf("[GET /v1/clouds/openstack/keypairs][%d] v1OpenStackKeypairsGetOK %+v", 200, o.Payload) +} + +func (o *V1OpenStackKeypairsGetOK) GetPayload() *models.V1OpenStackKeypairs { + return o.Payload +} + +func (o *V1OpenStackKeypairsGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1OpenStackKeypairs) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_open_stack_networks_get_parameters.go b/api/client/v1/v1_open_stack_networks_get_parameters.go new file mode 100644 index 00000000..8cd44546 --- /dev/null +++ b/api/client/v1/v1_open_stack_networks_get_parameters.go @@ -0,0 +1,243 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1OpenStackNetworksGetParams creates a new V1OpenStackNetworksGetParams object +// with the default values initialized. +func NewV1OpenStackNetworksGetParams() *V1OpenStackNetworksGetParams { + var () + return &V1OpenStackNetworksGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1OpenStackNetworksGetParamsWithTimeout creates a new V1OpenStackNetworksGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1OpenStackNetworksGetParamsWithTimeout(timeout time.Duration) *V1OpenStackNetworksGetParams { + var () + return &V1OpenStackNetworksGetParams{ + + timeout: timeout, + } +} + +// NewV1OpenStackNetworksGetParamsWithContext creates a new V1OpenStackNetworksGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1OpenStackNetworksGetParamsWithContext(ctx context.Context) *V1OpenStackNetworksGetParams { + var () + return &V1OpenStackNetworksGetParams{ + + Context: ctx, + } +} + +// NewV1OpenStackNetworksGetParamsWithHTTPClient creates a new V1OpenStackNetworksGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1OpenStackNetworksGetParamsWithHTTPClient(client *http.Client) *V1OpenStackNetworksGetParams { + var () + return &V1OpenStackNetworksGetParams{ + HTTPClient: client, + } +} + +/* +V1OpenStackNetworksGetParams contains all the parameters to send to the API endpoint +for the v1 open stack networks get operation typically these are written to a http.Request +*/ +type V1OpenStackNetworksGetParams struct { + + /*CloudAccountUID + Uid for the specific OpenStack cloud account + + */ + CloudAccountUID *string + /*Domain + domain for which OpenStack networks are requested + + */ + Domain *string + /*Project + project for which OpenStack networks are requested + + */ + Project *string + /*Region + region for which OpenStack networks are requested + + */ + Region *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 open stack networks get params +func (o *V1OpenStackNetworksGetParams) WithTimeout(timeout time.Duration) *V1OpenStackNetworksGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 open stack networks get params +func (o *V1OpenStackNetworksGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 open stack networks get params +func (o *V1OpenStackNetworksGetParams) WithContext(ctx context.Context) *V1OpenStackNetworksGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 open stack networks get params +func (o *V1OpenStackNetworksGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 open stack networks get params +func (o *V1OpenStackNetworksGetParams) WithHTTPClient(client *http.Client) *V1OpenStackNetworksGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 open stack networks get params +func (o *V1OpenStackNetworksGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithCloudAccountUID adds the cloudAccountUID to the v1 open stack networks get params +func (o *V1OpenStackNetworksGetParams) WithCloudAccountUID(cloudAccountUID *string) *V1OpenStackNetworksGetParams { + o.SetCloudAccountUID(cloudAccountUID) + return o +} + +// SetCloudAccountUID adds the cloudAccountUid to the v1 open stack networks get params +func (o *V1OpenStackNetworksGetParams) SetCloudAccountUID(cloudAccountUID *string) { + o.CloudAccountUID = cloudAccountUID +} + +// WithDomain adds the domain to the v1 open stack networks get params +func (o *V1OpenStackNetworksGetParams) WithDomain(domain *string) *V1OpenStackNetworksGetParams { + o.SetDomain(domain) + return o +} + +// SetDomain adds the domain to the v1 open stack networks get params +func (o *V1OpenStackNetworksGetParams) SetDomain(domain *string) { + o.Domain = domain +} + +// WithProject adds the project to the v1 open stack networks get params +func (o *V1OpenStackNetworksGetParams) WithProject(project *string) *V1OpenStackNetworksGetParams { + o.SetProject(project) + return o +} + +// SetProject adds the project to the v1 open stack networks get params +func (o *V1OpenStackNetworksGetParams) SetProject(project *string) { + o.Project = project +} + +// WithRegion adds the region to the v1 open stack networks get params +func (o *V1OpenStackNetworksGetParams) WithRegion(region *string) *V1OpenStackNetworksGetParams { + o.SetRegion(region) + return o +} + +// SetRegion adds the region to the v1 open stack networks get params +func (o *V1OpenStackNetworksGetParams) SetRegion(region *string) { + o.Region = region +} + +// WriteToRequest writes these params to a swagger request +func (o *V1OpenStackNetworksGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.CloudAccountUID != nil { + + // query param cloudAccountUid + var qrCloudAccountUID string + if o.CloudAccountUID != nil { + qrCloudAccountUID = *o.CloudAccountUID + } + qCloudAccountUID := qrCloudAccountUID + if qCloudAccountUID != "" { + if err := r.SetQueryParam("cloudAccountUid", qCloudAccountUID); err != nil { + return err + } + } + + } + + if o.Domain != nil { + + // query param domain + var qrDomain string + if o.Domain != nil { + qrDomain = *o.Domain + } + qDomain := qrDomain + if qDomain != "" { + if err := r.SetQueryParam("domain", qDomain); err != nil { + return err + } + } + + } + + if o.Project != nil { + + // query param project + var qrProject string + if o.Project != nil { + qrProject = *o.Project + } + qProject := qrProject + if qProject != "" { + if err := r.SetQueryParam("project", qProject); err != nil { + return err + } + } + + } + + if o.Region != nil { + + // query param region + var qrRegion string + if o.Region != nil { + qrRegion = *o.Region + } + qRegion := qrRegion + if qRegion != "" { + if err := r.SetQueryParam("region", qRegion); err != nil { + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_open_stack_networks_get_responses.go b/api/client/v1/v1_open_stack_networks_get_responses.go new file mode 100644 index 00000000..9e88f88e --- /dev/null +++ b/api/client/v1/v1_open_stack_networks_get_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1OpenStackNetworksGetReader is a Reader for the V1OpenStackNetworksGet structure. +type V1OpenStackNetworksGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1OpenStackNetworksGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1OpenStackNetworksGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1OpenStackNetworksGetOK creates a V1OpenStackNetworksGetOK with default headers values +func NewV1OpenStackNetworksGetOK() *V1OpenStackNetworksGetOK { + return &V1OpenStackNetworksGetOK{} +} + +/* +V1OpenStackNetworksGetOK handles this case with default header values. + +(empty) +*/ +type V1OpenStackNetworksGetOK struct { + Payload *models.V1OpenStackNetworks +} + +func (o *V1OpenStackNetworksGetOK) Error() string { + return fmt.Sprintf("[GET /v1/clouds/openstack/networks][%d] v1OpenStackNetworksGetOK %+v", 200, o.Payload) +} + +func (o *V1OpenStackNetworksGetOK) GetPayload() *models.V1OpenStackNetworks { + return o.Payload +} + +func (o *V1OpenStackNetworksGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1OpenStackNetworks) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_open_stack_projects_get_parameters.go b/api/client/v1/v1_open_stack_projects_get_parameters.go new file mode 100644 index 00000000..092b4f30 --- /dev/null +++ b/api/client/v1/v1_open_stack_projects_get_parameters.go @@ -0,0 +1,147 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1OpenStackProjectsGetParams creates a new V1OpenStackProjectsGetParams object +// with the default values initialized. +func NewV1OpenStackProjectsGetParams() *V1OpenStackProjectsGetParams { + var () + return &V1OpenStackProjectsGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1OpenStackProjectsGetParamsWithTimeout creates a new V1OpenStackProjectsGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1OpenStackProjectsGetParamsWithTimeout(timeout time.Duration) *V1OpenStackProjectsGetParams { + var () + return &V1OpenStackProjectsGetParams{ + + timeout: timeout, + } +} + +// NewV1OpenStackProjectsGetParamsWithContext creates a new V1OpenStackProjectsGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1OpenStackProjectsGetParamsWithContext(ctx context.Context) *V1OpenStackProjectsGetParams { + var () + return &V1OpenStackProjectsGetParams{ + + Context: ctx, + } +} + +// NewV1OpenStackProjectsGetParamsWithHTTPClient creates a new V1OpenStackProjectsGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1OpenStackProjectsGetParamsWithHTTPClient(client *http.Client) *V1OpenStackProjectsGetParams { + var () + return &V1OpenStackProjectsGetParams{ + HTTPClient: client, + } +} + +/* +V1OpenStackProjectsGetParams contains all the parameters to send to the API endpoint +for the v1 open stack projects get operation typically these are written to a http.Request +*/ +type V1OpenStackProjectsGetParams struct { + + /*CloudAccountUID + Uid for the specific OpenStack cloud account + + */ + CloudAccountUID *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 open stack projects get params +func (o *V1OpenStackProjectsGetParams) WithTimeout(timeout time.Duration) *V1OpenStackProjectsGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 open stack projects get params +func (o *V1OpenStackProjectsGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 open stack projects get params +func (o *V1OpenStackProjectsGetParams) WithContext(ctx context.Context) *V1OpenStackProjectsGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 open stack projects get params +func (o *V1OpenStackProjectsGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 open stack projects get params +func (o *V1OpenStackProjectsGetParams) WithHTTPClient(client *http.Client) *V1OpenStackProjectsGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 open stack projects get params +func (o *V1OpenStackProjectsGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithCloudAccountUID adds the cloudAccountUID to the v1 open stack projects get params +func (o *V1OpenStackProjectsGetParams) WithCloudAccountUID(cloudAccountUID *string) *V1OpenStackProjectsGetParams { + o.SetCloudAccountUID(cloudAccountUID) + return o +} + +// SetCloudAccountUID adds the cloudAccountUid to the v1 open stack projects get params +func (o *V1OpenStackProjectsGetParams) SetCloudAccountUID(cloudAccountUID *string) { + o.CloudAccountUID = cloudAccountUID +} + +// WriteToRequest writes these params to a swagger request +func (o *V1OpenStackProjectsGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.CloudAccountUID != nil { + + // query param cloudAccountUid + var qrCloudAccountUID string + if o.CloudAccountUID != nil { + qrCloudAccountUID = *o.CloudAccountUID + } + qCloudAccountUID := qrCloudAccountUID + if qCloudAccountUID != "" { + if err := r.SetQueryParam("cloudAccountUid", qCloudAccountUID); err != nil { + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_open_stack_projects_get_responses.go b/api/client/v1/v1_open_stack_projects_get_responses.go new file mode 100644 index 00000000..82db92c3 --- /dev/null +++ b/api/client/v1/v1_open_stack_projects_get_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1OpenStackProjectsGetReader is a Reader for the V1OpenStackProjectsGet structure. +type V1OpenStackProjectsGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1OpenStackProjectsGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1OpenStackProjectsGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1OpenStackProjectsGetOK creates a V1OpenStackProjectsGetOK with default headers values +func NewV1OpenStackProjectsGetOK() *V1OpenStackProjectsGetOK { + return &V1OpenStackProjectsGetOK{} +} + +/* +V1OpenStackProjectsGetOK handles this case with default header values. + +(empty) +*/ +type V1OpenStackProjectsGetOK struct { + Payload *models.V1OpenStackProjects +} + +func (o *V1OpenStackProjectsGetOK) Error() string { + return fmt.Sprintf("[GET /v1/clouds/openstack/projects][%d] v1OpenStackProjectsGetOK %+v", 200, o.Payload) +} + +func (o *V1OpenStackProjectsGetOK) GetPayload() *models.V1OpenStackProjects { + return o.Payload +} + +func (o *V1OpenStackProjectsGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1OpenStackProjects) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_open_stack_regions_get_parameters.go b/api/client/v1/v1_open_stack_regions_get_parameters.go new file mode 100644 index 00000000..b0e5e22c --- /dev/null +++ b/api/client/v1/v1_open_stack_regions_get_parameters.go @@ -0,0 +1,147 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1OpenStackRegionsGetParams creates a new V1OpenStackRegionsGetParams object +// with the default values initialized. +func NewV1OpenStackRegionsGetParams() *V1OpenStackRegionsGetParams { + var () + return &V1OpenStackRegionsGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1OpenStackRegionsGetParamsWithTimeout creates a new V1OpenStackRegionsGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1OpenStackRegionsGetParamsWithTimeout(timeout time.Duration) *V1OpenStackRegionsGetParams { + var () + return &V1OpenStackRegionsGetParams{ + + timeout: timeout, + } +} + +// NewV1OpenStackRegionsGetParamsWithContext creates a new V1OpenStackRegionsGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1OpenStackRegionsGetParamsWithContext(ctx context.Context) *V1OpenStackRegionsGetParams { + var () + return &V1OpenStackRegionsGetParams{ + + Context: ctx, + } +} + +// NewV1OpenStackRegionsGetParamsWithHTTPClient creates a new V1OpenStackRegionsGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1OpenStackRegionsGetParamsWithHTTPClient(client *http.Client) *V1OpenStackRegionsGetParams { + var () + return &V1OpenStackRegionsGetParams{ + HTTPClient: client, + } +} + +/* +V1OpenStackRegionsGetParams contains all the parameters to send to the API endpoint +for the v1 open stack regions get operation typically these are written to a http.Request +*/ +type V1OpenStackRegionsGetParams struct { + + /*CloudAccountUID + Uid for the specific OpenStack cloud account + + */ + CloudAccountUID *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 open stack regions get params +func (o *V1OpenStackRegionsGetParams) WithTimeout(timeout time.Duration) *V1OpenStackRegionsGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 open stack regions get params +func (o *V1OpenStackRegionsGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 open stack regions get params +func (o *V1OpenStackRegionsGetParams) WithContext(ctx context.Context) *V1OpenStackRegionsGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 open stack regions get params +func (o *V1OpenStackRegionsGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 open stack regions get params +func (o *V1OpenStackRegionsGetParams) WithHTTPClient(client *http.Client) *V1OpenStackRegionsGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 open stack regions get params +func (o *V1OpenStackRegionsGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithCloudAccountUID adds the cloudAccountUID to the v1 open stack regions get params +func (o *V1OpenStackRegionsGetParams) WithCloudAccountUID(cloudAccountUID *string) *V1OpenStackRegionsGetParams { + o.SetCloudAccountUID(cloudAccountUID) + return o +} + +// SetCloudAccountUID adds the cloudAccountUid to the v1 open stack regions get params +func (o *V1OpenStackRegionsGetParams) SetCloudAccountUID(cloudAccountUID *string) { + o.CloudAccountUID = cloudAccountUID +} + +// WriteToRequest writes these params to a swagger request +func (o *V1OpenStackRegionsGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.CloudAccountUID != nil { + + // query param cloudAccountUid + var qrCloudAccountUID string + if o.CloudAccountUID != nil { + qrCloudAccountUID = *o.CloudAccountUID + } + qCloudAccountUID := qrCloudAccountUID + if qCloudAccountUID != "" { + if err := r.SetQueryParam("cloudAccountUid", qCloudAccountUID); err != nil { + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_open_stack_regions_get_responses.go b/api/client/v1/v1_open_stack_regions_get_responses.go new file mode 100644 index 00000000..2b7d8d87 --- /dev/null +++ b/api/client/v1/v1_open_stack_regions_get_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1OpenStackRegionsGetReader is a Reader for the V1OpenStackRegionsGet structure. +type V1OpenStackRegionsGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1OpenStackRegionsGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1OpenStackRegionsGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1OpenStackRegionsGetOK creates a V1OpenStackRegionsGetOK with default headers values +func NewV1OpenStackRegionsGetOK() *V1OpenStackRegionsGetOK { + return &V1OpenStackRegionsGetOK{} +} + +/* +V1OpenStackRegionsGetOK handles this case with default header values. + +(empty) +*/ +type V1OpenStackRegionsGetOK struct { + Payload *models.V1OpenStackRegions +} + +func (o *V1OpenStackRegionsGetOK) Error() string { + return fmt.Sprintf("[GET /v1/clouds/openstack/regions][%d] v1OpenStackRegionsGetOK %+v", 200, o.Payload) +} + +func (o *V1OpenStackRegionsGetOK) GetPayload() *models.V1OpenStackRegions { + return o.Payload +} + +func (o *V1OpenStackRegionsGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1OpenStackRegions) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_openstack_accounts_uid_azs_parameters.go b/api/client/v1/v1_openstack_accounts_uid_azs_parameters.go new file mode 100644 index 00000000..da0e7917 --- /dev/null +++ b/api/client/v1/v1_openstack_accounts_uid_azs_parameters.go @@ -0,0 +1,220 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1OpenstackAccountsUIDAzsParams creates a new V1OpenstackAccountsUIDAzsParams object +// with the default values initialized. +func NewV1OpenstackAccountsUIDAzsParams() *V1OpenstackAccountsUIDAzsParams { + var () + return &V1OpenstackAccountsUIDAzsParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1OpenstackAccountsUIDAzsParamsWithTimeout creates a new V1OpenstackAccountsUIDAzsParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1OpenstackAccountsUIDAzsParamsWithTimeout(timeout time.Duration) *V1OpenstackAccountsUIDAzsParams { + var () + return &V1OpenstackAccountsUIDAzsParams{ + + timeout: timeout, + } +} + +// NewV1OpenstackAccountsUIDAzsParamsWithContext creates a new V1OpenstackAccountsUIDAzsParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1OpenstackAccountsUIDAzsParamsWithContext(ctx context.Context) *V1OpenstackAccountsUIDAzsParams { + var () + return &V1OpenstackAccountsUIDAzsParams{ + + Context: ctx, + } +} + +// NewV1OpenstackAccountsUIDAzsParamsWithHTTPClient creates a new V1OpenstackAccountsUIDAzsParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1OpenstackAccountsUIDAzsParamsWithHTTPClient(client *http.Client) *V1OpenstackAccountsUIDAzsParams { + var () + return &V1OpenstackAccountsUIDAzsParams{ + HTTPClient: client, + } +} + +/* +V1OpenstackAccountsUIDAzsParams contains all the parameters to send to the API endpoint +for the v1 openstack accounts Uid azs operation typically these are written to a http.Request +*/ +type V1OpenstackAccountsUIDAzsParams struct { + + /*Domain*/ + Domain *string + /*Project*/ + Project *string + /*Region*/ + Region *string + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 openstack accounts Uid azs params +func (o *V1OpenstackAccountsUIDAzsParams) WithTimeout(timeout time.Duration) *V1OpenstackAccountsUIDAzsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 openstack accounts Uid azs params +func (o *V1OpenstackAccountsUIDAzsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 openstack accounts Uid azs params +func (o *V1OpenstackAccountsUIDAzsParams) WithContext(ctx context.Context) *V1OpenstackAccountsUIDAzsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 openstack accounts Uid azs params +func (o *V1OpenstackAccountsUIDAzsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 openstack accounts Uid azs params +func (o *V1OpenstackAccountsUIDAzsParams) WithHTTPClient(client *http.Client) *V1OpenstackAccountsUIDAzsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 openstack accounts Uid azs params +func (o *V1OpenstackAccountsUIDAzsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithDomain adds the domain to the v1 openstack accounts Uid azs params +func (o *V1OpenstackAccountsUIDAzsParams) WithDomain(domain *string) *V1OpenstackAccountsUIDAzsParams { + o.SetDomain(domain) + return o +} + +// SetDomain adds the domain to the v1 openstack accounts Uid azs params +func (o *V1OpenstackAccountsUIDAzsParams) SetDomain(domain *string) { + o.Domain = domain +} + +// WithProject adds the project to the v1 openstack accounts Uid azs params +func (o *V1OpenstackAccountsUIDAzsParams) WithProject(project *string) *V1OpenstackAccountsUIDAzsParams { + o.SetProject(project) + return o +} + +// SetProject adds the project to the v1 openstack accounts Uid azs params +func (o *V1OpenstackAccountsUIDAzsParams) SetProject(project *string) { + o.Project = project +} + +// WithRegion adds the region to the v1 openstack accounts Uid azs params +func (o *V1OpenstackAccountsUIDAzsParams) WithRegion(region *string) *V1OpenstackAccountsUIDAzsParams { + o.SetRegion(region) + return o +} + +// SetRegion adds the region to the v1 openstack accounts Uid azs params +func (o *V1OpenstackAccountsUIDAzsParams) SetRegion(region *string) { + o.Region = region +} + +// WithUID adds the uid to the v1 openstack accounts Uid azs params +func (o *V1OpenstackAccountsUIDAzsParams) WithUID(uid string) *V1OpenstackAccountsUIDAzsParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 openstack accounts Uid azs params +func (o *V1OpenstackAccountsUIDAzsParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1OpenstackAccountsUIDAzsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Domain != nil { + + // query param domain + var qrDomain string + if o.Domain != nil { + qrDomain = *o.Domain + } + qDomain := qrDomain + if qDomain != "" { + if err := r.SetQueryParam("domain", qDomain); err != nil { + return err + } + } + + } + + if o.Project != nil { + + // query param project + var qrProject string + if o.Project != nil { + qrProject = *o.Project + } + qProject := qrProject + if qProject != "" { + if err := r.SetQueryParam("project", qProject); err != nil { + return err + } + } + + } + + if o.Region != nil { + + // query param region + var qrRegion string + if o.Region != nil { + qrRegion = *o.Region + } + qRegion := qrRegion + if qRegion != "" { + if err := r.SetQueryParam("region", qRegion); err != nil { + return err + } + } + + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_openstack_accounts_uid_azs_responses.go b/api/client/v1/v1_openstack_accounts_uid_azs_responses.go new file mode 100644 index 00000000..b816ff7d --- /dev/null +++ b/api/client/v1/v1_openstack_accounts_uid_azs_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1OpenstackAccountsUIDAzsReader is a Reader for the V1OpenstackAccountsUIDAzs structure. +type V1OpenstackAccountsUIDAzsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1OpenstackAccountsUIDAzsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1OpenstackAccountsUIDAzsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1OpenstackAccountsUIDAzsOK creates a V1OpenstackAccountsUIDAzsOK with default headers values +func NewV1OpenstackAccountsUIDAzsOK() *V1OpenstackAccountsUIDAzsOK { + return &V1OpenstackAccountsUIDAzsOK{} +} + +/* +V1OpenstackAccountsUIDAzsOK handles this case with default header values. + +(empty) +*/ +type V1OpenstackAccountsUIDAzsOK struct { + Payload *models.V1OpenStackAzs +} + +func (o *V1OpenstackAccountsUIDAzsOK) Error() string { + return fmt.Sprintf("[GET /v1/cloudaccounts/openstack/{uid}/properties/azs][%d] v1OpenstackAccountsUidAzsOK %+v", 200, o.Payload) +} + +func (o *V1OpenstackAccountsUIDAzsOK) GetPayload() *models.V1OpenStackAzs { + return o.Payload +} + +func (o *V1OpenstackAccountsUIDAzsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1OpenStackAzs) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_openstack_accounts_uid_flavors_parameters.go b/api/client/v1/v1_openstack_accounts_uid_flavors_parameters.go new file mode 100644 index 00000000..5c451204 --- /dev/null +++ b/api/client/v1/v1_openstack_accounts_uid_flavors_parameters.go @@ -0,0 +1,220 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1OpenstackAccountsUIDFlavorsParams creates a new V1OpenstackAccountsUIDFlavorsParams object +// with the default values initialized. +func NewV1OpenstackAccountsUIDFlavorsParams() *V1OpenstackAccountsUIDFlavorsParams { + var () + return &V1OpenstackAccountsUIDFlavorsParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1OpenstackAccountsUIDFlavorsParamsWithTimeout creates a new V1OpenstackAccountsUIDFlavorsParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1OpenstackAccountsUIDFlavorsParamsWithTimeout(timeout time.Duration) *V1OpenstackAccountsUIDFlavorsParams { + var () + return &V1OpenstackAccountsUIDFlavorsParams{ + + timeout: timeout, + } +} + +// NewV1OpenstackAccountsUIDFlavorsParamsWithContext creates a new V1OpenstackAccountsUIDFlavorsParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1OpenstackAccountsUIDFlavorsParamsWithContext(ctx context.Context) *V1OpenstackAccountsUIDFlavorsParams { + var () + return &V1OpenstackAccountsUIDFlavorsParams{ + + Context: ctx, + } +} + +// NewV1OpenstackAccountsUIDFlavorsParamsWithHTTPClient creates a new V1OpenstackAccountsUIDFlavorsParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1OpenstackAccountsUIDFlavorsParamsWithHTTPClient(client *http.Client) *V1OpenstackAccountsUIDFlavorsParams { + var () + return &V1OpenstackAccountsUIDFlavorsParams{ + HTTPClient: client, + } +} + +/* +V1OpenstackAccountsUIDFlavorsParams contains all the parameters to send to the API endpoint +for the v1 openstack accounts Uid flavors operation typically these are written to a http.Request +*/ +type V1OpenstackAccountsUIDFlavorsParams struct { + + /*Domain*/ + Domain *string + /*Project*/ + Project *string + /*Region*/ + Region *string + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 openstack accounts Uid flavors params +func (o *V1OpenstackAccountsUIDFlavorsParams) WithTimeout(timeout time.Duration) *V1OpenstackAccountsUIDFlavorsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 openstack accounts Uid flavors params +func (o *V1OpenstackAccountsUIDFlavorsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 openstack accounts Uid flavors params +func (o *V1OpenstackAccountsUIDFlavorsParams) WithContext(ctx context.Context) *V1OpenstackAccountsUIDFlavorsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 openstack accounts Uid flavors params +func (o *V1OpenstackAccountsUIDFlavorsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 openstack accounts Uid flavors params +func (o *V1OpenstackAccountsUIDFlavorsParams) WithHTTPClient(client *http.Client) *V1OpenstackAccountsUIDFlavorsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 openstack accounts Uid flavors params +func (o *V1OpenstackAccountsUIDFlavorsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithDomain adds the domain to the v1 openstack accounts Uid flavors params +func (o *V1OpenstackAccountsUIDFlavorsParams) WithDomain(domain *string) *V1OpenstackAccountsUIDFlavorsParams { + o.SetDomain(domain) + return o +} + +// SetDomain adds the domain to the v1 openstack accounts Uid flavors params +func (o *V1OpenstackAccountsUIDFlavorsParams) SetDomain(domain *string) { + o.Domain = domain +} + +// WithProject adds the project to the v1 openstack accounts Uid flavors params +func (o *V1OpenstackAccountsUIDFlavorsParams) WithProject(project *string) *V1OpenstackAccountsUIDFlavorsParams { + o.SetProject(project) + return o +} + +// SetProject adds the project to the v1 openstack accounts Uid flavors params +func (o *V1OpenstackAccountsUIDFlavorsParams) SetProject(project *string) { + o.Project = project +} + +// WithRegion adds the region to the v1 openstack accounts Uid flavors params +func (o *V1OpenstackAccountsUIDFlavorsParams) WithRegion(region *string) *V1OpenstackAccountsUIDFlavorsParams { + o.SetRegion(region) + return o +} + +// SetRegion adds the region to the v1 openstack accounts Uid flavors params +func (o *V1OpenstackAccountsUIDFlavorsParams) SetRegion(region *string) { + o.Region = region +} + +// WithUID adds the uid to the v1 openstack accounts Uid flavors params +func (o *V1OpenstackAccountsUIDFlavorsParams) WithUID(uid string) *V1OpenstackAccountsUIDFlavorsParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 openstack accounts Uid flavors params +func (o *V1OpenstackAccountsUIDFlavorsParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1OpenstackAccountsUIDFlavorsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Domain != nil { + + // query param domain + var qrDomain string + if o.Domain != nil { + qrDomain = *o.Domain + } + qDomain := qrDomain + if qDomain != "" { + if err := r.SetQueryParam("domain", qDomain); err != nil { + return err + } + } + + } + + if o.Project != nil { + + // query param project + var qrProject string + if o.Project != nil { + qrProject = *o.Project + } + qProject := qrProject + if qProject != "" { + if err := r.SetQueryParam("project", qProject); err != nil { + return err + } + } + + } + + if o.Region != nil { + + // query param region + var qrRegion string + if o.Region != nil { + qrRegion = *o.Region + } + qRegion := qrRegion + if qRegion != "" { + if err := r.SetQueryParam("region", qRegion); err != nil { + return err + } + } + + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_openstack_accounts_uid_flavors_responses.go b/api/client/v1/v1_openstack_accounts_uid_flavors_responses.go new file mode 100644 index 00000000..5fa68dc0 --- /dev/null +++ b/api/client/v1/v1_openstack_accounts_uid_flavors_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1OpenstackAccountsUIDFlavorsReader is a Reader for the V1OpenstackAccountsUIDFlavors structure. +type V1OpenstackAccountsUIDFlavorsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1OpenstackAccountsUIDFlavorsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1OpenstackAccountsUIDFlavorsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1OpenstackAccountsUIDFlavorsOK creates a V1OpenstackAccountsUIDFlavorsOK with default headers values +func NewV1OpenstackAccountsUIDFlavorsOK() *V1OpenstackAccountsUIDFlavorsOK { + return &V1OpenstackAccountsUIDFlavorsOK{} +} + +/* +V1OpenstackAccountsUIDFlavorsOK handles this case with default header values. + +(empty) +*/ +type V1OpenstackAccountsUIDFlavorsOK struct { + Payload *models.V1OpenStackFlavors +} + +func (o *V1OpenstackAccountsUIDFlavorsOK) Error() string { + return fmt.Sprintf("[GET /v1/cloudaccounts/openstack/{uid}/properties/flavors][%d] v1OpenstackAccountsUidFlavorsOK %+v", 200, o.Payload) +} + +func (o *V1OpenstackAccountsUIDFlavorsOK) GetPayload() *models.V1OpenStackFlavors { + return o.Payload +} + +func (o *V1OpenstackAccountsUIDFlavorsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1OpenStackFlavors) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_openstack_accounts_uid_keypairs_parameters.go b/api/client/v1/v1_openstack_accounts_uid_keypairs_parameters.go new file mode 100644 index 00000000..8dc795f4 --- /dev/null +++ b/api/client/v1/v1_openstack_accounts_uid_keypairs_parameters.go @@ -0,0 +1,220 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1OpenstackAccountsUIDKeypairsParams creates a new V1OpenstackAccountsUIDKeypairsParams object +// with the default values initialized. +func NewV1OpenstackAccountsUIDKeypairsParams() *V1OpenstackAccountsUIDKeypairsParams { + var () + return &V1OpenstackAccountsUIDKeypairsParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1OpenstackAccountsUIDKeypairsParamsWithTimeout creates a new V1OpenstackAccountsUIDKeypairsParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1OpenstackAccountsUIDKeypairsParamsWithTimeout(timeout time.Duration) *V1OpenstackAccountsUIDKeypairsParams { + var () + return &V1OpenstackAccountsUIDKeypairsParams{ + + timeout: timeout, + } +} + +// NewV1OpenstackAccountsUIDKeypairsParamsWithContext creates a new V1OpenstackAccountsUIDKeypairsParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1OpenstackAccountsUIDKeypairsParamsWithContext(ctx context.Context) *V1OpenstackAccountsUIDKeypairsParams { + var () + return &V1OpenstackAccountsUIDKeypairsParams{ + + Context: ctx, + } +} + +// NewV1OpenstackAccountsUIDKeypairsParamsWithHTTPClient creates a new V1OpenstackAccountsUIDKeypairsParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1OpenstackAccountsUIDKeypairsParamsWithHTTPClient(client *http.Client) *V1OpenstackAccountsUIDKeypairsParams { + var () + return &V1OpenstackAccountsUIDKeypairsParams{ + HTTPClient: client, + } +} + +/* +V1OpenstackAccountsUIDKeypairsParams contains all the parameters to send to the API endpoint +for the v1 openstack accounts Uid keypairs operation typically these are written to a http.Request +*/ +type V1OpenstackAccountsUIDKeypairsParams struct { + + /*Domain*/ + Domain *string + /*Project*/ + Project *string + /*Region*/ + Region *string + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 openstack accounts Uid keypairs params +func (o *V1OpenstackAccountsUIDKeypairsParams) WithTimeout(timeout time.Duration) *V1OpenstackAccountsUIDKeypairsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 openstack accounts Uid keypairs params +func (o *V1OpenstackAccountsUIDKeypairsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 openstack accounts Uid keypairs params +func (o *V1OpenstackAccountsUIDKeypairsParams) WithContext(ctx context.Context) *V1OpenstackAccountsUIDKeypairsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 openstack accounts Uid keypairs params +func (o *V1OpenstackAccountsUIDKeypairsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 openstack accounts Uid keypairs params +func (o *V1OpenstackAccountsUIDKeypairsParams) WithHTTPClient(client *http.Client) *V1OpenstackAccountsUIDKeypairsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 openstack accounts Uid keypairs params +func (o *V1OpenstackAccountsUIDKeypairsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithDomain adds the domain to the v1 openstack accounts Uid keypairs params +func (o *V1OpenstackAccountsUIDKeypairsParams) WithDomain(domain *string) *V1OpenstackAccountsUIDKeypairsParams { + o.SetDomain(domain) + return o +} + +// SetDomain adds the domain to the v1 openstack accounts Uid keypairs params +func (o *V1OpenstackAccountsUIDKeypairsParams) SetDomain(domain *string) { + o.Domain = domain +} + +// WithProject adds the project to the v1 openstack accounts Uid keypairs params +func (o *V1OpenstackAccountsUIDKeypairsParams) WithProject(project *string) *V1OpenstackAccountsUIDKeypairsParams { + o.SetProject(project) + return o +} + +// SetProject adds the project to the v1 openstack accounts Uid keypairs params +func (o *V1OpenstackAccountsUIDKeypairsParams) SetProject(project *string) { + o.Project = project +} + +// WithRegion adds the region to the v1 openstack accounts Uid keypairs params +func (o *V1OpenstackAccountsUIDKeypairsParams) WithRegion(region *string) *V1OpenstackAccountsUIDKeypairsParams { + o.SetRegion(region) + return o +} + +// SetRegion adds the region to the v1 openstack accounts Uid keypairs params +func (o *V1OpenstackAccountsUIDKeypairsParams) SetRegion(region *string) { + o.Region = region +} + +// WithUID adds the uid to the v1 openstack accounts Uid keypairs params +func (o *V1OpenstackAccountsUIDKeypairsParams) WithUID(uid string) *V1OpenstackAccountsUIDKeypairsParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 openstack accounts Uid keypairs params +func (o *V1OpenstackAccountsUIDKeypairsParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1OpenstackAccountsUIDKeypairsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Domain != nil { + + // query param domain + var qrDomain string + if o.Domain != nil { + qrDomain = *o.Domain + } + qDomain := qrDomain + if qDomain != "" { + if err := r.SetQueryParam("domain", qDomain); err != nil { + return err + } + } + + } + + if o.Project != nil { + + // query param project + var qrProject string + if o.Project != nil { + qrProject = *o.Project + } + qProject := qrProject + if qProject != "" { + if err := r.SetQueryParam("project", qProject); err != nil { + return err + } + } + + } + + if o.Region != nil { + + // query param region + var qrRegion string + if o.Region != nil { + qrRegion = *o.Region + } + qRegion := qrRegion + if qRegion != "" { + if err := r.SetQueryParam("region", qRegion); err != nil { + return err + } + } + + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_openstack_accounts_uid_keypairs_responses.go b/api/client/v1/v1_openstack_accounts_uid_keypairs_responses.go new file mode 100644 index 00000000..379f760a --- /dev/null +++ b/api/client/v1/v1_openstack_accounts_uid_keypairs_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1OpenstackAccountsUIDKeypairsReader is a Reader for the V1OpenstackAccountsUIDKeypairs structure. +type V1OpenstackAccountsUIDKeypairsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1OpenstackAccountsUIDKeypairsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1OpenstackAccountsUIDKeypairsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1OpenstackAccountsUIDKeypairsOK creates a V1OpenstackAccountsUIDKeypairsOK with default headers values +func NewV1OpenstackAccountsUIDKeypairsOK() *V1OpenstackAccountsUIDKeypairsOK { + return &V1OpenstackAccountsUIDKeypairsOK{} +} + +/* +V1OpenstackAccountsUIDKeypairsOK handles this case with default header values. + +(empty) +*/ +type V1OpenstackAccountsUIDKeypairsOK struct { + Payload *models.V1OpenStackKeypairs +} + +func (o *V1OpenstackAccountsUIDKeypairsOK) Error() string { + return fmt.Sprintf("[GET /v1/cloudaccounts/openstack/{uid}/properties/keypairs][%d] v1OpenstackAccountsUidKeypairsOK %+v", 200, o.Payload) +} + +func (o *V1OpenstackAccountsUIDKeypairsOK) GetPayload() *models.V1OpenStackKeypairs { + return o.Payload +} + +func (o *V1OpenstackAccountsUIDKeypairsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1OpenStackKeypairs) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_openstack_accounts_uid_networks_parameters.go b/api/client/v1/v1_openstack_accounts_uid_networks_parameters.go new file mode 100644 index 00000000..0b6da372 --- /dev/null +++ b/api/client/v1/v1_openstack_accounts_uid_networks_parameters.go @@ -0,0 +1,220 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1OpenstackAccountsUIDNetworksParams creates a new V1OpenstackAccountsUIDNetworksParams object +// with the default values initialized. +func NewV1OpenstackAccountsUIDNetworksParams() *V1OpenstackAccountsUIDNetworksParams { + var () + return &V1OpenstackAccountsUIDNetworksParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1OpenstackAccountsUIDNetworksParamsWithTimeout creates a new V1OpenstackAccountsUIDNetworksParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1OpenstackAccountsUIDNetworksParamsWithTimeout(timeout time.Duration) *V1OpenstackAccountsUIDNetworksParams { + var () + return &V1OpenstackAccountsUIDNetworksParams{ + + timeout: timeout, + } +} + +// NewV1OpenstackAccountsUIDNetworksParamsWithContext creates a new V1OpenstackAccountsUIDNetworksParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1OpenstackAccountsUIDNetworksParamsWithContext(ctx context.Context) *V1OpenstackAccountsUIDNetworksParams { + var () + return &V1OpenstackAccountsUIDNetworksParams{ + + Context: ctx, + } +} + +// NewV1OpenstackAccountsUIDNetworksParamsWithHTTPClient creates a new V1OpenstackAccountsUIDNetworksParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1OpenstackAccountsUIDNetworksParamsWithHTTPClient(client *http.Client) *V1OpenstackAccountsUIDNetworksParams { + var () + return &V1OpenstackAccountsUIDNetworksParams{ + HTTPClient: client, + } +} + +/* +V1OpenstackAccountsUIDNetworksParams contains all the parameters to send to the API endpoint +for the v1 openstack accounts Uid networks operation typically these are written to a http.Request +*/ +type V1OpenstackAccountsUIDNetworksParams struct { + + /*Domain*/ + Domain *string + /*Project*/ + Project *string + /*Region*/ + Region *string + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 openstack accounts Uid networks params +func (o *V1OpenstackAccountsUIDNetworksParams) WithTimeout(timeout time.Duration) *V1OpenstackAccountsUIDNetworksParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 openstack accounts Uid networks params +func (o *V1OpenstackAccountsUIDNetworksParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 openstack accounts Uid networks params +func (o *V1OpenstackAccountsUIDNetworksParams) WithContext(ctx context.Context) *V1OpenstackAccountsUIDNetworksParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 openstack accounts Uid networks params +func (o *V1OpenstackAccountsUIDNetworksParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 openstack accounts Uid networks params +func (o *V1OpenstackAccountsUIDNetworksParams) WithHTTPClient(client *http.Client) *V1OpenstackAccountsUIDNetworksParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 openstack accounts Uid networks params +func (o *V1OpenstackAccountsUIDNetworksParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithDomain adds the domain to the v1 openstack accounts Uid networks params +func (o *V1OpenstackAccountsUIDNetworksParams) WithDomain(domain *string) *V1OpenstackAccountsUIDNetworksParams { + o.SetDomain(domain) + return o +} + +// SetDomain adds the domain to the v1 openstack accounts Uid networks params +func (o *V1OpenstackAccountsUIDNetworksParams) SetDomain(domain *string) { + o.Domain = domain +} + +// WithProject adds the project to the v1 openstack accounts Uid networks params +func (o *V1OpenstackAccountsUIDNetworksParams) WithProject(project *string) *V1OpenstackAccountsUIDNetworksParams { + o.SetProject(project) + return o +} + +// SetProject adds the project to the v1 openstack accounts Uid networks params +func (o *V1OpenstackAccountsUIDNetworksParams) SetProject(project *string) { + o.Project = project +} + +// WithRegion adds the region to the v1 openstack accounts Uid networks params +func (o *V1OpenstackAccountsUIDNetworksParams) WithRegion(region *string) *V1OpenstackAccountsUIDNetworksParams { + o.SetRegion(region) + return o +} + +// SetRegion adds the region to the v1 openstack accounts Uid networks params +func (o *V1OpenstackAccountsUIDNetworksParams) SetRegion(region *string) { + o.Region = region +} + +// WithUID adds the uid to the v1 openstack accounts Uid networks params +func (o *V1OpenstackAccountsUIDNetworksParams) WithUID(uid string) *V1OpenstackAccountsUIDNetworksParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 openstack accounts Uid networks params +func (o *V1OpenstackAccountsUIDNetworksParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1OpenstackAccountsUIDNetworksParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Domain != nil { + + // query param domain + var qrDomain string + if o.Domain != nil { + qrDomain = *o.Domain + } + qDomain := qrDomain + if qDomain != "" { + if err := r.SetQueryParam("domain", qDomain); err != nil { + return err + } + } + + } + + if o.Project != nil { + + // query param project + var qrProject string + if o.Project != nil { + qrProject = *o.Project + } + qProject := qrProject + if qProject != "" { + if err := r.SetQueryParam("project", qProject); err != nil { + return err + } + } + + } + + if o.Region != nil { + + // query param region + var qrRegion string + if o.Region != nil { + qrRegion = *o.Region + } + qRegion := qrRegion + if qRegion != "" { + if err := r.SetQueryParam("region", qRegion); err != nil { + return err + } + } + + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_openstack_accounts_uid_networks_responses.go b/api/client/v1/v1_openstack_accounts_uid_networks_responses.go new file mode 100644 index 00000000..fa82e3db --- /dev/null +++ b/api/client/v1/v1_openstack_accounts_uid_networks_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1OpenstackAccountsUIDNetworksReader is a Reader for the V1OpenstackAccountsUIDNetworks structure. +type V1OpenstackAccountsUIDNetworksReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1OpenstackAccountsUIDNetworksReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1OpenstackAccountsUIDNetworksOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1OpenstackAccountsUIDNetworksOK creates a V1OpenstackAccountsUIDNetworksOK with default headers values +func NewV1OpenstackAccountsUIDNetworksOK() *V1OpenstackAccountsUIDNetworksOK { + return &V1OpenstackAccountsUIDNetworksOK{} +} + +/* +V1OpenstackAccountsUIDNetworksOK handles this case with default header values. + +(empty) +*/ +type V1OpenstackAccountsUIDNetworksOK struct { + Payload *models.V1OpenStackNetworks +} + +func (o *V1OpenstackAccountsUIDNetworksOK) Error() string { + return fmt.Sprintf("[GET /v1/cloudaccounts/openstack/{uid}/properties/networks][%d] v1OpenstackAccountsUidNetworksOK %+v", 200, o.Payload) +} + +func (o *V1OpenstackAccountsUIDNetworksOK) GetPayload() *models.V1OpenStackNetworks { + return o.Payload +} + +func (o *V1OpenstackAccountsUIDNetworksOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1OpenStackNetworks) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_openstack_accounts_uid_projects_parameters.go b/api/client/v1/v1_openstack_accounts_uid_projects_parameters.go new file mode 100644 index 00000000..3f61b6cf --- /dev/null +++ b/api/client/v1/v1_openstack_accounts_uid_projects_parameters.go @@ -0,0 +1,133 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1OpenstackAccountsUIDProjectsParams creates a new V1OpenstackAccountsUIDProjectsParams object +// with the default values initialized. +func NewV1OpenstackAccountsUIDProjectsParams() *V1OpenstackAccountsUIDProjectsParams { + var () + return &V1OpenstackAccountsUIDProjectsParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1OpenstackAccountsUIDProjectsParamsWithTimeout creates a new V1OpenstackAccountsUIDProjectsParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1OpenstackAccountsUIDProjectsParamsWithTimeout(timeout time.Duration) *V1OpenstackAccountsUIDProjectsParams { + var () + return &V1OpenstackAccountsUIDProjectsParams{ + + timeout: timeout, + } +} + +// NewV1OpenstackAccountsUIDProjectsParamsWithContext creates a new V1OpenstackAccountsUIDProjectsParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1OpenstackAccountsUIDProjectsParamsWithContext(ctx context.Context) *V1OpenstackAccountsUIDProjectsParams { + var () + return &V1OpenstackAccountsUIDProjectsParams{ + + Context: ctx, + } +} + +// NewV1OpenstackAccountsUIDProjectsParamsWithHTTPClient creates a new V1OpenstackAccountsUIDProjectsParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1OpenstackAccountsUIDProjectsParamsWithHTTPClient(client *http.Client) *V1OpenstackAccountsUIDProjectsParams { + var () + return &V1OpenstackAccountsUIDProjectsParams{ + HTTPClient: client, + } +} + +/* +V1OpenstackAccountsUIDProjectsParams contains all the parameters to send to the API endpoint +for the v1 openstack accounts Uid projects operation typically these are written to a http.Request +*/ +type V1OpenstackAccountsUIDProjectsParams struct { + + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 openstack accounts Uid projects params +func (o *V1OpenstackAccountsUIDProjectsParams) WithTimeout(timeout time.Duration) *V1OpenstackAccountsUIDProjectsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 openstack accounts Uid projects params +func (o *V1OpenstackAccountsUIDProjectsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 openstack accounts Uid projects params +func (o *V1OpenstackAccountsUIDProjectsParams) WithContext(ctx context.Context) *V1OpenstackAccountsUIDProjectsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 openstack accounts Uid projects params +func (o *V1OpenstackAccountsUIDProjectsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 openstack accounts Uid projects params +func (o *V1OpenstackAccountsUIDProjectsParams) WithHTTPClient(client *http.Client) *V1OpenstackAccountsUIDProjectsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 openstack accounts Uid projects params +func (o *V1OpenstackAccountsUIDProjectsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithUID adds the uid to the v1 openstack accounts Uid projects params +func (o *V1OpenstackAccountsUIDProjectsParams) WithUID(uid string) *V1OpenstackAccountsUIDProjectsParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 openstack accounts Uid projects params +func (o *V1OpenstackAccountsUIDProjectsParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1OpenstackAccountsUIDProjectsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_openstack_accounts_uid_projects_responses.go b/api/client/v1/v1_openstack_accounts_uid_projects_responses.go new file mode 100644 index 00000000..07c65a40 --- /dev/null +++ b/api/client/v1/v1_openstack_accounts_uid_projects_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1OpenstackAccountsUIDProjectsReader is a Reader for the V1OpenstackAccountsUIDProjects structure. +type V1OpenstackAccountsUIDProjectsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1OpenstackAccountsUIDProjectsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1OpenstackAccountsUIDProjectsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1OpenstackAccountsUIDProjectsOK creates a V1OpenstackAccountsUIDProjectsOK with default headers values +func NewV1OpenstackAccountsUIDProjectsOK() *V1OpenstackAccountsUIDProjectsOK { + return &V1OpenstackAccountsUIDProjectsOK{} +} + +/* +V1OpenstackAccountsUIDProjectsOK handles this case with default header values. + +(empty) +*/ +type V1OpenstackAccountsUIDProjectsOK struct { + Payload *models.V1OpenStackProjects +} + +func (o *V1OpenstackAccountsUIDProjectsOK) Error() string { + return fmt.Sprintf("[GET /v1/cloudaccounts/openstack/{uid}/properties/projects][%d] v1OpenstackAccountsUidProjectsOK %+v", 200, o.Payload) +} + +func (o *V1OpenstackAccountsUIDProjectsOK) GetPayload() *models.V1OpenStackProjects { + return o.Payload +} + +func (o *V1OpenstackAccountsUIDProjectsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1OpenStackProjects) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_openstack_accounts_uid_regions_parameters.go b/api/client/v1/v1_openstack_accounts_uid_regions_parameters.go new file mode 100644 index 00000000..097f4ab6 --- /dev/null +++ b/api/client/v1/v1_openstack_accounts_uid_regions_parameters.go @@ -0,0 +1,133 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1OpenstackAccountsUIDRegionsParams creates a new V1OpenstackAccountsUIDRegionsParams object +// with the default values initialized. +func NewV1OpenstackAccountsUIDRegionsParams() *V1OpenstackAccountsUIDRegionsParams { + var () + return &V1OpenstackAccountsUIDRegionsParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1OpenstackAccountsUIDRegionsParamsWithTimeout creates a new V1OpenstackAccountsUIDRegionsParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1OpenstackAccountsUIDRegionsParamsWithTimeout(timeout time.Duration) *V1OpenstackAccountsUIDRegionsParams { + var () + return &V1OpenstackAccountsUIDRegionsParams{ + + timeout: timeout, + } +} + +// NewV1OpenstackAccountsUIDRegionsParamsWithContext creates a new V1OpenstackAccountsUIDRegionsParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1OpenstackAccountsUIDRegionsParamsWithContext(ctx context.Context) *V1OpenstackAccountsUIDRegionsParams { + var () + return &V1OpenstackAccountsUIDRegionsParams{ + + Context: ctx, + } +} + +// NewV1OpenstackAccountsUIDRegionsParamsWithHTTPClient creates a new V1OpenstackAccountsUIDRegionsParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1OpenstackAccountsUIDRegionsParamsWithHTTPClient(client *http.Client) *V1OpenstackAccountsUIDRegionsParams { + var () + return &V1OpenstackAccountsUIDRegionsParams{ + HTTPClient: client, + } +} + +/* +V1OpenstackAccountsUIDRegionsParams contains all the parameters to send to the API endpoint +for the v1 openstack accounts Uid regions operation typically these are written to a http.Request +*/ +type V1OpenstackAccountsUIDRegionsParams struct { + + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 openstack accounts Uid regions params +func (o *V1OpenstackAccountsUIDRegionsParams) WithTimeout(timeout time.Duration) *V1OpenstackAccountsUIDRegionsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 openstack accounts Uid regions params +func (o *V1OpenstackAccountsUIDRegionsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 openstack accounts Uid regions params +func (o *V1OpenstackAccountsUIDRegionsParams) WithContext(ctx context.Context) *V1OpenstackAccountsUIDRegionsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 openstack accounts Uid regions params +func (o *V1OpenstackAccountsUIDRegionsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 openstack accounts Uid regions params +func (o *V1OpenstackAccountsUIDRegionsParams) WithHTTPClient(client *http.Client) *V1OpenstackAccountsUIDRegionsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 openstack accounts Uid regions params +func (o *V1OpenstackAccountsUIDRegionsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithUID adds the uid to the v1 openstack accounts Uid regions params +func (o *V1OpenstackAccountsUIDRegionsParams) WithUID(uid string) *V1OpenstackAccountsUIDRegionsParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 openstack accounts Uid regions params +func (o *V1OpenstackAccountsUIDRegionsParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1OpenstackAccountsUIDRegionsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_openstack_accounts_uid_regions_responses.go b/api/client/v1/v1_openstack_accounts_uid_regions_responses.go new file mode 100644 index 00000000..61c4f6ab --- /dev/null +++ b/api/client/v1/v1_openstack_accounts_uid_regions_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1OpenstackAccountsUIDRegionsReader is a Reader for the V1OpenstackAccountsUIDRegions structure. +type V1OpenstackAccountsUIDRegionsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1OpenstackAccountsUIDRegionsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1OpenstackAccountsUIDRegionsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1OpenstackAccountsUIDRegionsOK creates a V1OpenstackAccountsUIDRegionsOK with default headers values +func NewV1OpenstackAccountsUIDRegionsOK() *V1OpenstackAccountsUIDRegionsOK { + return &V1OpenstackAccountsUIDRegionsOK{} +} + +/* +V1OpenstackAccountsUIDRegionsOK handles this case with default header values. + +(empty) +*/ +type V1OpenstackAccountsUIDRegionsOK struct { + Payload *models.V1OpenStackRegions +} + +func (o *V1OpenstackAccountsUIDRegionsOK) Error() string { + return fmt.Sprintf("[GET /v1/cloudaccounts/openstack/{uid}/properties/regions][%d] v1OpenstackAccountsUidRegionsOK %+v", 200, o.Payload) +} + +func (o *V1OpenstackAccountsUIDRegionsOK) GetPayload() *models.V1OpenStackRegions { + return o.Payload +} + +func (o *V1OpenstackAccountsUIDRegionsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1OpenStackRegions) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_overlords_list_parameters.go b/api/client/v1/v1_overlords_list_parameters.go new file mode 100644 index 00000000..8d133566 --- /dev/null +++ b/api/client/v1/v1_overlords_list_parameters.go @@ -0,0 +1,144 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1OverlordsListParams creates a new V1OverlordsListParams object +// with the default values initialized. +func NewV1OverlordsListParams() *V1OverlordsListParams { + var () + return &V1OverlordsListParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1OverlordsListParamsWithTimeout creates a new V1OverlordsListParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1OverlordsListParamsWithTimeout(timeout time.Duration) *V1OverlordsListParams { + var () + return &V1OverlordsListParams{ + + timeout: timeout, + } +} + +// NewV1OverlordsListParamsWithContext creates a new V1OverlordsListParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1OverlordsListParamsWithContext(ctx context.Context) *V1OverlordsListParams { + var () + return &V1OverlordsListParams{ + + Context: ctx, + } +} + +// NewV1OverlordsListParamsWithHTTPClient creates a new V1OverlordsListParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1OverlordsListParamsWithHTTPClient(client *http.Client) *V1OverlordsListParams { + var () + return &V1OverlordsListParams{ + HTTPClient: client, + } +} + +/* +V1OverlordsListParams contains all the parameters to send to the API endpoint +for the v1 overlords list operation typically these are written to a http.Request +*/ +type V1OverlordsListParams struct { + + /*Name*/ + Name *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 overlords list params +func (o *V1OverlordsListParams) WithTimeout(timeout time.Duration) *V1OverlordsListParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 overlords list params +func (o *V1OverlordsListParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 overlords list params +func (o *V1OverlordsListParams) WithContext(ctx context.Context) *V1OverlordsListParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 overlords list params +func (o *V1OverlordsListParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 overlords list params +func (o *V1OverlordsListParams) WithHTTPClient(client *http.Client) *V1OverlordsListParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 overlords list params +func (o *V1OverlordsListParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithName adds the name to the v1 overlords list params +func (o *V1OverlordsListParams) WithName(name *string) *V1OverlordsListParams { + o.SetName(name) + return o +} + +// SetName adds the name to the v1 overlords list params +func (o *V1OverlordsListParams) SetName(name *string) { + o.Name = name +} + +// WriteToRequest writes these params to a swagger request +func (o *V1OverlordsListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Name != nil { + + // query param name + var qrName string + if o.Name != nil { + qrName = *o.Name + } + qName := qrName + if qName != "" { + if err := r.SetQueryParam("name", qName); err != nil { + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_overlords_list_responses.go b/api/client/v1/v1_overlords_list_responses.go new file mode 100644 index 00000000..069a63a9 --- /dev/null +++ b/api/client/v1/v1_overlords_list_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1OverlordsListReader is a Reader for the V1OverlordsList structure. +type V1OverlordsListReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1OverlordsListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1OverlordsListOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1OverlordsListOK creates a V1OverlordsListOK with default headers values +func NewV1OverlordsListOK() *V1OverlordsListOK { + return &V1OverlordsListOK{} +} + +/* +V1OverlordsListOK handles this case with default header values. + +(empty) +*/ +type V1OverlordsListOK struct { + Payload *models.V1Overlords +} + +func (o *V1OverlordsListOK) Error() string { + return fmt.Sprintf("[GET /v1/overlords][%d] v1OverlordsListOK %+v", 200, o.Payload) +} + +func (o *V1OverlordsListOK) GetPayload() *models.V1Overlords { + return o.Payload +} + +func (o *V1OverlordsListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1Overlords) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_overlords_maas_manifest_parameters.go b/api/client/v1/v1_overlords_maas_manifest_parameters.go new file mode 100644 index 00000000..30c30988 --- /dev/null +++ b/api/client/v1/v1_overlords_maas_manifest_parameters.go @@ -0,0 +1,137 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1OverlordsMaasManifestParams creates a new V1OverlordsMaasManifestParams object +// with the default values initialized. +func NewV1OverlordsMaasManifestParams() *V1OverlordsMaasManifestParams { + var () + return &V1OverlordsMaasManifestParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1OverlordsMaasManifestParamsWithTimeout creates a new V1OverlordsMaasManifestParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1OverlordsMaasManifestParamsWithTimeout(timeout time.Duration) *V1OverlordsMaasManifestParams { + var () + return &V1OverlordsMaasManifestParams{ + + timeout: timeout, + } +} + +// NewV1OverlordsMaasManifestParamsWithContext creates a new V1OverlordsMaasManifestParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1OverlordsMaasManifestParamsWithContext(ctx context.Context) *V1OverlordsMaasManifestParams { + var () + return &V1OverlordsMaasManifestParams{ + + Context: ctx, + } +} + +// NewV1OverlordsMaasManifestParamsWithHTTPClient creates a new V1OverlordsMaasManifestParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1OverlordsMaasManifestParamsWithHTTPClient(client *http.Client) *V1OverlordsMaasManifestParams { + var () + return &V1OverlordsMaasManifestParams{ + HTTPClient: client, + } +} + +/* +V1OverlordsMaasManifestParams contains all the parameters to send to the API endpoint +for the v1 overlords maas manifest operation typically these are written to a http.Request +*/ +type V1OverlordsMaasManifestParams struct { + + /*PairingCode*/ + PairingCode string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 overlords maas manifest params +func (o *V1OverlordsMaasManifestParams) WithTimeout(timeout time.Duration) *V1OverlordsMaasManifestParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 overlords maas manifest params +func (o *V1OverlordsMaasManifestParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 overlords maas manifest params +func (o *V1OverlordsMaasManifestParams) WithContext(ctx context.Context) *V1OverlordsMaasManifestParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 overlords maas manifest params +func (o *V1OverlordsMaasManifestParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 overlords maas manifest params +func (o *V1OverlordsMaasManifestParams) WithHTTPClient(client *http.Client) *V1OverlordsMaasManifestParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 overlords maas manifest params +func (o *V1OverlordsMaasManifestParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithPairingCode adds the pairingCode to the v1 overlords maas manifest params +func (o *V1OverlordsMaasManifestParams) WithPairingCode(pairingCode string) *V1OverlordsMaasManifestParams { + o.SetPairingCode(pairingCode) + return o +} + +// SetPairingCode adds the pairingCode to the v1 overlords maas manifest params +func (o *V1OverlordsMaasManifestParams) SetPairingCode(pairingCode string) { + o.PairingCode = pairingCode +} + +// WriteToRequest writes these params to a swagger request +func (o *V1OverlordsMaasManifestParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // query param pairingCode + qrPairingCode := o.PairingCode + qPairingCode := qrPairingCode + if qPairingCode != "" { + if err := r.SetQueryParam("pairingCode", qPairingCode); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_overlords_maas_manifest_responses.go b/api/client/v1/v1_overlords_maas_manifest_responses.go new file mode 100644 index 00000000..ccc33b52 --- /dev/null +++ b/api/client/v1/v1_overlords_maas_manifest_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1OverlordsMaasManifestReader is a Reader for the V1OverlordsMaasManifest structure. +type V1OverlordsMaasManifestReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1OverlordsMaasManifestReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1OverlordsMaasManifestOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1OverlordsMaasManifestOK creates a V1OverlordsMaasManifestOK with default headers values +func NewV1OverlordsMaasManifestOK() *V1OverlordsMaasManifestOK { + return &V1OverlordsMaasManifestOK{} +} + +/* +V1OverlordsMaasManifestOK handles this case with default header values. + +(empty) +*/ +type V1OverlordsMaasManifestOK struct { + Payload *models.V1OverlordManifest +} + +func (o *V1OverlordsMaasManifestOK) Error() string { + return fmt.Sprintf("[GET /v1/overlords/maas/manifest][%d] v1OverlordsMaasManifestOK %+v", 200, o.Payload) +} + +func (o *V1OverlordsMaasManifestOK) GetPayload() *models.V1OverlordManifest { + return o.Payload +} + +func (o *V1OverlordsMaasManifestOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1OverlordManifest) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_overlords_migrate_parameters.go b/api/client/v1/v1_overlords_migrate_parameters.go new file mode 100644 index 00000000..8a02f048 --- /dev/null +++ b/api/client/v1/v1_overlords_migrate_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1OverlordsMigrateParams creates a new V1OverlordsMigrateParams object +// with the default values initialized. +func NewV1OverlordsMigrateParams() *V1OverlordsMigrateParams { + var () + return &V1OverlordsMigrateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1OverlordsMigrateParamsWithTimeout creates a new V1OverlordsMigrateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1OverlordsMigrateParamsWithTimeout(timeout time.Duration) *V1OverlordsMigrateParams { + var () + return &V1OverlordsMigrateParams{ + + timeout: timeout, + } +} + +// NewV1OverlordsMigrateParamsWithContext creates a new V1OverlordsMigrateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1OverlordsMigrateParamsWithContext(ctx context.Context) *V1OverlordsMigrateParams { + var () + return &V1OverlordsMigrateParams{ + + Context: ctx, + } +} + +// NewV1OverlordsMigrateParamsWithHTTPClient creates a new V1OverlordsMigrateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1OverlordsMigrateParamsWithHTTPClient(client *http.Client) *V1OverlordsMigrateParams { + var () + return &V1OverlordsMigrateParams{ + HTTPClient: client, + } +} + +/* +V1OverlordsMigrateParams contains all the parameters to send to the API endpoint +for the v1 overlords migrate operation typically these are written to a http.Request +*/ +type V1OverlordsMigrateParams struct { + + /*Body*/ + Body *models.V1OverlordMigrateEntity + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 overlords migrate params +func (o *V1OverlordsMigrateParams) WithTimeout(timeout time.Duration) *V1OverlordsMigrateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 overlords migrate params +func (o *V1OverlordsMigrateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 overlords migrate params +func (o *V1OverlordsMigrateParams) WithContext(ctx context.Context) *V1OverlordsMigrateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 overlords migrate params +func (o *V1OverlordsMigrateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 overlords migrate params +func (o *V1OverlordsMigrateParams) WithHTTPClient(client *http.Client) *V1OverlordsMigrateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 overlords migrate params +func (o *V1OverlordsMigrateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 overlords migrate params +func (o *V1OverlordsMigrateParams) WithBody(body *models.V1OverlordMigrateEntity) *V1OverlordsMigrateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 overlords migrate params +func (o *V1OverlordsMigrateParams) SetBody(body *models.V1OverlordMigrateEntity) { + o.Body = body +} + +// WriteToRequest writes these params to a swagger request +func (o *V1OverlordsMigrateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_overlords_migrate_responses.go b/api/client/v1/v1_overlords_migrate_responses.go new file mode 100644 index 00000000..6a1ad9b8 --- /dev/null +++ b/api/client/v1/v1_overlords_migrate_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1OverlordsMigrateReader is a Reader for the V1OverlordsMigrate structure. +type V1OverlordsMigrateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1OverlordsMigrateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1OverlordsMigrateNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1OverlordsMigrateNoContent creates a V1OverlordsMigrateNoContent with default headers values +func NewV1OverlordsMigrateNoContent() *V1OverlordsMigrateNoContent { + return &V1OverlordsMigrateNoContent{} +} + +/* +V1OverlordsMigrateNoContent handles this case with default header values. + +The resource was updated successfully +*/ +type V1OverlordsMigrateNoContent struct { +} + +func (o *V1OverlordsMigrateNoContent) Error() string { + return fmt.Sprintf("[POST /v1/overlords/migrate][%d] v1OverlordsMigrateNoContent ", 204) +} + +func (o *V1OverlordsMigrateNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_overlords_open_stack_manifest_parameters.go b/api/client/v1/v1_overlords_open_stack_manifest_parameters.go new file mode 100644 index 00000000..209a5dd6 --- /dev/null +++ b/api/client/v1/v1_overlords_open_stack_manifest_parameters.go @@ -0,0 +1,137 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1OverlordsOpenStackManifestParams creates a new V1OverlordsOpenStackManifestParams object +// with the default values initialized. +func NewV1OverlordsOpenStackManifestParams() *V1OverlordsOpenStackManifestParams { + var () + return &V1OverlordsOpenStackManifestParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1OverlordsOpenStackManifestParamsWithTimeout creates a new V1OverlordsOpenStackManifestParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1OverlordsOpenStackManifestParamsWithTimeout(timeout time.Duration) *V1OverlordsOpenStackManifestParams { + var () + return &V1OverlordsOpenStackManifestParams{ + + timeout: timeout, + } +} + +// NewV1OverlordsOpenStackManifestParamsWithContext creates a new V1OverlordsOpenStackManifestParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1OverlordsOpenStackManifestParamsWithContext(ctx context.Context) *V1OverlordsOpenStackManifestParams { + var () + return &V1OverlordsOpenStackManifestParams{ + + Context: ctx, + } +} + +// NewV1OverlordsOpenStackManifestParamsWithHTTPClient creates a new V1OverlordsOpenStackManifestParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1OverlordsOpenStackManifestParamsWithHTTPClient(client *http.Client) *V1OverlordsOpenStackManifestParams { + var () + return &V1OverlordsOpenStackManifestParams{ + HTTPClient: client, + } +} + +/* +V1OverlordsOpenStackManifestParams contains all the parameters to send to the API endpoint +for the v1 overlords open stack manifest operation typically these are written to a http.Request +*/ +type V1OverlordsOpenStackManifestParams struct { + + /*PairingCode*/ + PairingCode string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 overlords open stack manifest params +func (o *V1OverlordsOpenStackManifestParams) WithTimeout(timeout time.Duration) *V1OverlordsOpenStackManifestParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 overlords open stack manifest params +func (o *V1OverlordsOpenStackManifestParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 overlords open stack manifest params +func (o *V1OverlordsOpenStackManifestParams) WithContext(ctx context.Context) *V1OverlordsOpenStackManifestParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 overlords open stack manifest params +func (o *V1OverlordsOpenStackManifestParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 overlords open stack manifest params +func (o *V1OverlordsOpenStackManifestParams) WithHTTPClient(client *http.Client) *V1OverlordsOpenStackManifestParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 overlords open stack manifest params +func (o *V1OverlordsOpenStackManifestParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithPairingCode adds the pairingCode to the v1 overlords open stack manifest params +func (o *V1OverlordsOpenStackManifestParams) WithPairingCode(pairingCode string) *V1OverlordsOpenStackManifestParams { + o.SetPairingCode(pairingCode) + return o +} + +// SetPairingCode adds the pairingCode to the v1 overlords open stack manifest params +func (o *V1OverlordsOpenStackManifestParams) SetPairingCode(pairingCode string) { + o.PairingCode = pairingCode +} + +// WriteToRequest writes these params to a swagger request +func (o *V1OverlordsOpenStackManifestParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // query param pairingCode + qrPairingCode := o.PairingCode + qPairingCode := qrPairingCode + if qPairingCode != "" { + if err := r.SetQueryParam("pairingCode", qPairingCode); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_overlords_open_stack_manifest_responses.go b/api/client/v1/v1_overlords_open_stack_manifest_responses.go new file mode 100644 index 00000000..c3677d00 --- /dev/null +++ b/api/client/v1/v1_overlords_open_stack_manifest_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1OverlordsOpenStackManifestReader is a Reader for the V1OverlordsOpenStackManifest structure. +type V1OverlordsOpenStackManifestReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1OverlordsOpenStackManifestReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1OverlordsOpenStackManifestOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1OverlordsOpenStackManifestOK creates a V1OverlordsOpenStackManifestOK with default headers values +func NewV1OverlordsOpenStackManifestOK() *V1OverlordsOpenStackManifestOK { + return &V1OverlordsOpenStackManifestOK{} +} + +/* +V1OverlordsOpenStackManifestOK handles this case with default header values. + +(empty) +*/ +type V1OverlordsOpenStackManifestOK struct { + Payload *models.V1OverlordManifest +} + +func (o *V1OverlordsOpenStackManifestOK) Error() string { + return fmt.Sprintf("[GET /v1/overlords/openstack/manifest][%d] v1OverlordsOpenStackManifestOK %+v", 200, o.Payload) +} + +func (o *V1OverlordsOpenStackManifestOK) GetPayload() *models.V1OverlordManifest { + return o.Payload +} + +func (o *V1OverlordsOpenStackManifestOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1OverlordManifest) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_overlords_pairing_code_parameters.go b/api/client/v1/v1_overlords_pairing_code_parameters.go new file mode 100644 index 00000000..9f54e4e1 --- /dev/null +++ b/api/client/v1/v1_overlords_pairing_code_parameters.go @@ -0,0 +1,144 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1OverlordsPairingCodeParams creates a new V1OverlordsPairingCodeParams object +// with the default values initialized. +func NewV1OverlordsPairingCodeParams() *V1OverlordsPairingCodeParams { + var () + return &V1OverlordsPairingCodeParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1OverlordsPairingCodeParamsWithTimeout creates a new V1OverlordsPairingCodeParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1OverlordsPairingCodeParamsWithTimeout(timeout time.Duration) *V1OverlordsPairingCodeParams { + var () + return &V1OverlordsPairingCodeParams{ + + timeout: timeout, + } +} + +// NewV1OverlordsPairingCodeParamsWithContext creates a new V1OverlordsPairingCodeParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1OverlordsPairingCodeParamsWithContext(ctx context.Context) *V1OverlordsPairingCodeParams { + var () + return &V1OverlordsPairingCodeParams{ + + Context: ctx, + } +} + +// NewV1OverlordsPairingCodeParamsWithHTTPClient creates a new V1OverlordsPairingCodeParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1OverlordsPairingCodeParamsWithHTTPClient(client *http.Client) *V1OverlordsPairingCodeParams { + var () + return &V1OverlordsPairingCodeParams{ + HTTPClient: client, + } +} + +/* +V1OverlordsPairingCodeParams contains all the parameters to send to the API endpoint +for the v1 overlords pairing code operation typically these are written to a http.Request +*/ +type V1OverlordsPairingCodeParams struct { + + /*CloudType*/ + CloudType *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 overlords pairing code params +func (o *V1OverlordsPairingCodeParams) WithTimeout(timeout time.Duration) *V1OverlordsPairingCodeParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 overlords pairing code params +func (o *V1OverlordsPairingCodeParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 overlords pairing code params +func (o *V1OverlordsPairingCodeParams) WithContext(ctx context.Context) *V1OverlordsPairingCodeParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 overlords pairing code params +func (o *V1OverlordsPairingCodeParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 overlords pairing code params +func (o *V1OverlordsPairingCodeParams) WithHTTPClient(client *http.Client) *V1OverlordsPairingCodeParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 overlords pairing code params +func (o *V1OverlordsPairingCodeParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithCloudType adds the cloudType to the v1 overlords pairing code params +func (o *V1OverlordsPairingCodeParams) WithCloudType(cloudType *string) *V1OverlordsPairingCodeParams { + o.SetCloudType(cloudType) + return o +} + +// SetCloudType adds the cloudType to the v1 overlords pairing code params +func (o *V1OverlordsPairingCodeParams) SetCloudType(cloudType *string) { + o.CloudType = cloudType +} + +// WriteToRequest writes these params to a swagger request +func (o *V1OverlordsPairingCodeParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.CloudType != nil { + + // query param cloudType + var qrCloudType string + if o.CloudType != nil { + qrCloudType = *o.CloudType + } + qCloudType := qrCloudType + if qCloudType != "" { + if err := r.SetQueryParam("cloudType", qCloudType); err != nil { + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_overlords_pairing_code_responses.go b/api/client/v1/v1_overlords_pairing_code_responses.go new file mode 100644 index 00000000..b2b861ab --- /dev/null +++ b/api/client/v1/v1_overlords_pairing_code_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1OverlordsPairingCodeReader is a Reader for the V1OverlordsPairingCode structure. +type V1OverlordsPairingCodeReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1OverlordsPairingCodeReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1OverlordsPairingCodeOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1OverlordsPairingCodeOK creates a V1OverlordsPairingCodeOK with default headers values +func NewV1OverlordsPairingCodeOK() *V1OverlordsPairingCodeOK { + return &V1OverlordsPairingCodeOK{} +} + +/* +V1OverlordsPairingCodeOK handles this case with default header values. + +(empty) +*/ +type V1OverlordsPairingCodeOK struct { + Payload *models.V1PairingCode +} + +func (o *V1OverlordsPairingCodeOK) Error() string { + return fmt.Sprintf("[GET /v1/overlords/pairing/code][%d] v1OverlordsPairingCodeOK %+v", 200, o.Payload) +} + +func (o *V1OverlordsPairingCodeOK) GetPayload() *models.V1PairingCode { + return o.Payload +} + +func (o *V1OverlordsPairingCodeOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1PairingCode) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_overlords_uid_delete_parameters.go b/api/client/v1/v1_overlords_uid_delete_parameters.go new file mode 100644 index 00000000..b4e20bc6 --- /dev/null +++ b/api/client/v1/v1_overlords_uid_delete_parameters.go @@ -0,0 +1,133 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1OverlordsUIDDeleteParams creates a new V1OverlordsUIDDeleteParams object +// with the default values initialized. +func NewV1OverlordsUIDDeleteParams() *V1OverlordsUIDDeleteParams { + var () + return &V1OverlordsUIDDeleteParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1OverlordsUIDDeleteParamsWithTimeout creates a new V1OverlordsUIDDeleteParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1OverlordsUIDDeleteParamsWithTimeout(timeout time.Duration) *V1OverlordsUIDDeleteParams { + var () + return &V1OverlordsUIDDeleteParams{ + + timeout: timeout, + } +} + +// NewV1OverlordsUIDDeleteParamsWithContext creates a new V1OverlordsUIDDeleteParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1OverlordsUIDDeleteParamsWithContext(ctx context.Context) *V1OverlordsUIDDeleteParams { + var () + return &V1OverlordsUIDDeleteParams{ + + Context: ctx, + } +} + +// NewV1OverlordsUIDDeleteParamsWithHTTPClient creates a new V1OverlordsUIDDeleteParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1OverlordsUIDDeleteParamsWithHTTPClient(client *http.Client) *V1OverlordsUIDDeleteParams { + var () + return &V1OverlordsUIDDeleteParams{ + HTTPClient: client, + } +} + +/* +V1OverlordsUIDDeleteParams contains all the parameters to send to the API endpoint +for the v1 overlords Uid delete operation typically these are written to a http.Request +*/ +type V1OverlordsUIDDeleteParams struct { + + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 overlords Uid delete params +func (o *V1OverlordsUIDDeleteParams) WithTimeout(timeout time.Duration) *V1OverlordsUIDDeleteParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 overlords Uid delete params +func (o *V1OverlordsUIDDeleteParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 overlords Uid delete params +func (o *V1OverlordsUIDDeleteParams) WithContext(ctx context.Context) *V1OverlordsUIDDeleteParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 overlords Uid delete params +func (o *V1OverlordsUIDDeleteParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 overlords Uid delete params +func (o *V1OverlordsUIDDeleteParams) WithHTTPClient(client *http.Client) *V1OverlordsUIDDeleteParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 overlords Uid delete params +func (o *V1OverlordsUIDDeleteParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithUID adds the uid to the v1 overlords Uid delete params +func (o *V1OverlordsUIDDeleteParams) WithUID(uid string) *V1OverlordsUIDDeleteParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 overlords Uid delete params +func (o *V1OverlordsUIDDeleteParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1OverlordsUIDDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_overlords_uid_delete_responses.go b/api/client/v1/v1_overlords_uid_delete_responses.go new file mode 100644 index 00000000..d0eadb87 --- /dev/null +++ b/api/client/v1/v1_overlords_uid_delete_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1OverlordsUIDDeleteReader is a Reader for the V1OverlordsUIDDelete structure. +type V1OverlordsUIDDeleteReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1OverlordsUIDDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1OverlordsUIDDeleteOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1OverlordsUIDDeleteOK creates a V1OverlordsUIDDeleteOK with default headers values +func NewV1OverlordsUIDDeleteOK() *V1OverlordsUIDDeleteOK { + return &V1OverlordsUIDDeleteOK{} +} + +/* +V1OverlordsUIDDeleteOK handles this case with default header values. + +(empty) +*/ +type V1OverlordsUIDDeleteOK struct { + Payload *models.V1DeletedMsg +} + +func (o *V1OverlordsUIDDeleteOK) Error() string { + return fmt.Sprintf("[DELETE /v1/overlords/{uid}][%d] v1OverlordsUidDeleteOK %+v", 200, o.Payload) +} + +func (o *V1OverlordsUIDDeleteOK) GetPayload() *models.V1DeletedMsg { + return o.Payload +} + +func (o *V1OverlordsUIDDeleteOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1DeletedMsg) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_overlords_uid_get_parameters.go b/api/client/v1/v1_overlords_uid_get_parameters.go new file mode 100644 index 00000000..13dabb27 --- /dev/null +++ b/api/client/v1/v1_overlords_uid_get_parameters.go @@ -0,0 +1,133 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1OverlordsUIDGetParams creates a new V1OverlordsUIDGetParams object +// with the default values initialized. +func NewV1OverlordsUIDGetParams() *V1OverlordsUIDGetParams { + var () + return &V1OverlordsUIDGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1OverlordsUIDGetParamsWithTimeout creates a new V1OverlordsUIDGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1OverlordsUIDGetParamsWithTimeout(timeout time.Duration) *V1OverlordsUIDGetParams { + var () + return &V1OverlordsUIDGetParams{ + + timeout: timeout, + } +} + +// NewV1OverlordsUIDGetParamsWithContext creates a new V1OverlordsUIDGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1OverlordsUIDGetParamsWithContext(ctx context.Context) *V1OverlordsUIDGetParams { + var () + return &V1OverlordsUIDGetParams{ + + Context: ctx, + } +} + +// NewV1OverlordsUIDGetParamsWithHTTPClient creates a new V1OverlordsUIDGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1OverlordsUIDGetParamsWithHTTPClient(client *http.Client) *V1OverlordsUIDGetParams { + var () + return &V1OverlordsUIDGetParams{ + HTTPClient: client, + } +} + +/* +V1OverlordsUIDGetParams contains all the parameters to send to the API endpoint +for the v1 overlords Uid get operation typically these are written to a http.Request +*/ +type V1OverlordsUIDGetParams struct { + + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 overlords Uid get params +func (o *V1OverlordsUIDGetParams) WithTimeout(timeout time.Duration) *V1OverlordsUIDGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 overlords Uid get params +func (o *V1OverlordsUIDGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 overlords Uid get params +func (o *V1OverlordsUIDGetParams) WithContext(ctx context.Context) *V1OverlordsUIDGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 overlords Uid get params +func (o *V1OverlordsUIDGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 overlords Uid get params +func (o *V1OverlordsUIDGetParams) WithHTTPClient(client *http.Client) *V1OverlordsUIDGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 overlords Uid get params +func (o *V1OverlordsUIDGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithUID adds the uid to the v1 overlords Uid get params +func (o *V1OverlordsUIDGetParams) WithUID(uid string) *V1OverlordsUIDGetParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 overlords Uid get params +func (o *V1OverlordsUIDGetParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1OverlordsUIDGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_overlords_uid_get_responses.go b/api/client/v1/v1_overlords_uid_get_responses.go new file mode 100644 index 00000000..9b1c2ab9 --- /dev/null +++ b/api/client/v1/v1_overlords_uid_get_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1OverlordsUIDGetReader is a Reader for the V1OverlordsUIDGet structure. +type V1OverlordsUIDGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1OverlordsUIDGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1OverlordsUIDGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1OverlordsUIDGetOK creates a V1OverlordsUIDGetOK with default headers values +func NewV1OverlordsUIDGetOK() *V1OverlordsUIDGetOK { + return &V1OverlordsUIDGetOK{} +} + +/* +V1OverlordsUIDGetOK handles this case with default header values. + +(empty) +*/ +type V1OverlordsUIDGetOK struct { + Payload *models.V1Overlord +} + +func (o *V1OverlordsUIDGetOK) Error() string { + return fmt.Sprintf("[GET /v1/overlords/{uid}][%d] v1OverlordsUidGetOK %+v", 200, o.Payload) +} + +func (o *V1OverlordsUIDGetOK) GetPayload() *models.V1Overlord { + return o.Payload +} + +func (o *V1OverlordsUIDGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1Overlord) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_overlords_uid_maas_account_create_parameters.go b/api/client/v1/v1_overlords_uid_maas_account_create_parameters.go new file mode 100644 index 00000000..30bb5228 --- /dev/null +++ b/api/client/v1/v1_overlords_uid_maas_account_create_parameters.go @@ -0,0 +1,154 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1OverlordsUIDMaasAccountCreateParams creates a new V1OverlordsUIDMaasAccountCreateParams object +// with the default values initialized. +func NewV1OverlordsUIDMaasAccountCreateParams() *V1OverlordsUIDMaasAccountCreateParams { + var () + return &V1OverlordsUIDMaasAccountCreateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1OverlordsUIDMaasAccountCreateParamsWithTimeout creates a new V1OverlordsUIDMaasAccountCreateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1OverlordsUIDMaasAccountCreateParamsWithTimeout(timeout time.Duration) *V1OverlordsUIDMaasAccountCreateParams { + var () + return &V1OverlordsUIDMaasAccountCreateParams{ + + timeout: timeout, + } +} + +// NewV1OverlordsUIDMaasAccountCreateParamsWithContext creates a new V1OverlordsUIDMaasAccountCreateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1OverlordsUIDMaasAccountCreateParamsWithContext(ctx context.Context) *V1OverlordsUIDMaasAccountCreateParams { + var () + return &V1OverlordsUIDMaasAccountCreateParams{ + + Context: ctx, + } +} + +// NewV1OverlordsUIDMaasAccountCreateParamsWithHTTPClient creates a new V1OverlordsUIDMaasAccountCreateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1OverlordsUIDMaasAccountCreateParamsWithHTTPClient(client *http.Client) *V1OverlordsUIDMaasAccountCreateParams { + var () + return &V1OverlordsUIDMaasAccountCreateParams{ + HTTPClient: client, + } +} + +/* +V1OverlordsUIDMaasAccountCreateParams contains all the parameters to send to the API endpoint +for the v1 overlords Uid maas account create operation typically these are written to a http.Request +*/ +type V1OverlordsUIDMaasAccountCreateParams struct { + + /*Body*/ + Body *models.V1OverlordMaasAccountCreate + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 overlords Uid maas account create params +func (o *V1OverlordsUIDMaasAccountCreateParams) WithTimeout(timeout time.Duration) *V1OverlordsUIDMaasAccountCreateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 overlords Uid maas account create params +func (o *V1OverlordsUIDMaasAccountCreateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 overlords Uid maas account create params +func (o *V1OverlordsUIDMaasAccountCreateParams) WithContext(ctx context.Context) *V1OverlordsUIDMaasAccountCreateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 overlords Uid maas account create params +func (o *V1OverlordsUIDMaasAccountCreateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 overlords Uid maas account create params +func (o *V1OverlordsUIDMaasAccountCreateParams) WithHTTPClient(client *http.Client) *V1OverlordsUIDMaasAccountCreateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 overlords Uid maas account create params +func (o *V1OverlordsUIDMaasAccountCreateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 overlords Uid maas account create params +func (o *V1OverlordsUIDMaasAccountCreateParams) WithBody(body *models.V1OverlordMaasAccountCreate) *V1OverlordsUIDMaasAccountCreateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 overlords Uid maas account create params +func (o *V1OverlordsUIDMaasAccountCreateParams) SetBody(body *models.V1OverlordMaasAccountCreate) { + o.Body = body +} + +// WithUID adds the uid to the v1 overlords Uid maas account create params +func (o *V1OverlordsUIDMaasAccountCreateParams) WithUID(uid string) *V1OverlordsUIDMaasAccountCreateParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 overlords Uid maas account create params +func (o *V1OverlordsUIDMaasAccountCreateParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1OverlordsUIDMaasAccountCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_overlords_uid_maas_account_create_responses.go b/api/client/v1/v1_overlords_uid_maas_account_create_responses.go new file mode 100644 index 00000000..0de17298 --- /dev/null +++ b/api/client/v1/v1_overlords_uid_maas_account_create_responses.go @@ -0,0 +1,77 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1OverlordsUIDMaasAccountCreateReader is a Reader for the V1OverlordsUIDMaasAccountCreate structure. +type V1OverlordsUIDMaasAccountCreateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1OverlordsUIDMaasAccountCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 201: + result := NewV1OverlordsUIDMaasAccountCreateCreated() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1OverlordsUIDMaasAccountCreateCreated creates a V1OverlordsUIDMaasAccountCreateCreated with default headers values +func NewV1OverlordsUIDMaasAccountCreateCreated() *V1OverlordsUIDMaasAccountCreateCreated { + return &V1OverlordsUIDMaasAccountCreateCreated{} +} + +/* +V1OverlordsUIDMaasAccountCreateCreated handles this case with default header values. + +Created successfully +*/ +type V1OverlordsUIDMaasAccountCreateCreated struct { + /*Audit uid for the request + */ + AuditUID string + + Payload *models.V1UID +} + +func (o *V1OverlordsUIDMaasAccountCreateCreated) Error() string { + return fmt.Sprintf("[POST /v1/overlords/maas/{uid}/account][%d] v1OverlordsUidMaasAccountCreateCreated %+v", 201, o.Payload) +} + +func (o *V1OverlordsUIDMaasAccountCreateCreated) GetPayload() *models.V1UID { + return o.Payload +} + +func (o *V1OverlordsUIDMaasAccountCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header AuditUid + o.AuditUID = response.GetHeader("AuditUid") + + o.Payload = new(models.V1UID) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_overlords_uid_maas_account_update_parameters.go b/api/client/v1/v1_overlords_uid_maas_account_update_parameters.go new file mode 100644 index 00000000..ad5101e6 --- /dev/null +++ b/api/client/v1/v1_overlords_uid_maas_account_update_parameters.go @@ -0,0 +1,154 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1OverlordsUIDMaasAccountUpdateParams creates a new V1OverlordsUIDMaasAccountUpdateParams object +// with the default values initialized. +func NewV1OverlordsUIDMaasAccountUpdateParams() *V1OverlordsUIDMaasAccountUpdateParams { + var () + return &V1OverlordsUIDMaasAccountUpdateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1OverlordsUIDMaasAccountUpdateParamsWithTimeout creates a new V1OverlordsUIDMaasAccountUpdateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1OverlordsUIDMaasAccountUpdateParamsWithTimeout(timeout time.Duration) *V1OverlordsUIDMaasAccountUpdateParams { + var () + return &V1OverlordsUIDMaasAccountUpdateParams{ + + timeout: timeout, + } +} + +// NewV1OverlordsUIDMaasAccountUpdateParamsWithContext creates a new V1OverlordsUIDMaasAccountUpdateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1OverlordsUIDMaasAccountUpdateParamsWithContext(ctx context.Context) *V1OverlordsUIDMaasAccountUpdateParams { + var () + return &V1OverlordsUIDMaasAccountUpdateParams{ + + Context: ctx, + } +} + +// NewV1OverlordsUIDMaasAccountUpdateParamsWithHTTPClient creates a new V1OverlordsUIDMaasAccountUpdateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1OverlordsUIDMaasAccountUpdateParamsWithHTTPClient(client *http.Client) *V1OverlordsUIDMaasAccountUpdateParams { + var () + return &V1OverlordsUIDMaasAccountUpdateParams{ + HTTPClient: client, + } +} + +/* +V1OverlordsUIDMaasAccountUpdateParams contains all the parameters to send to the API endpoint +for the v1 overlords Uid maas account update operation typically these are written to a http.Request +*/ +type V1OverlordsUIDMaasAccountUpdateParams struct { + + /*Body*/ + Body *models.V1OverlordMaasAccountEntity + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 overlords Uid maas account update params +func (o *V1OverlordsUIDMaasAccountUpdateParams) WithTimeout(timeout time.Duration) *V1OverlordsUIDMaasAccountUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 overlords Uid maas account update params +func (o *V1OverlordsUIDMaasAccountUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 overlords Uid maas account update params +func (o *V1OverlordsUIDMaasAccountUpdateParams) WithContext(ctx context.Context) *V1OverlordsUIDMaasAccountUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 overlords Uid maas account update params +func (o *V1OverlordsUIDMaasAccountUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 overlords Uid maas account update params +func (o *V1OverlordsUIDMaasAccountUpdateParams) WithHTTPClient(client *http.Client) *V1OverlordsUIDMaasAccountUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 overlords Uid maas account update params +func (o *V1OverlordsUIDMaasAccountUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 overlords Uid maas account update params +func (o *V1OverlordsUIDMaasAccountUpdateParams) WithBody(body *models.V1OverlordMaasAccountEntity) *V1OverlordsUIDMaasAccountUpdateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 overlords Uid maas account update params +func (o *V1OverlordsUIDMaasAccountUpdateParams) SetBody(body *models.V1OverlordMaasAccountEntity) { + o.Body = body +} + +// WithUID adds the uid to the v1 overlords Uid maas account update params +func (o *V1OverlordsUIDMaasAccountUpdateParams) WithUID(uid string) *V1OverlordsUIDMaasAccountUpdateParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 overlords Uid maas account update params +func (o *V1OverlordsUIDMaasAccountUpdateParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1OverlordsUIDMaasAccountUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_overlords_uid_maas_account_update_responses.go b/api/client/v1/v1_overlords_uid_maas_account_update_responses.go new file mode 100644 index 00000000..918c82c1 --- /dev/null +++ b/api/client/v1/v1_overlords_uid_maas_account_update_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1OverlordsUIDMaasAccountUpdateReader is a Reader for the V1OverlordsUIDMaasAccountUpdate structure. +type V1OverlordsUIDMaasAccountUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1OverlordsUIDMaasAccountUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1OverlordsUIDMaasAccountUpdateNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1OverlordsUIDMaasAccountUpdateNoContent creates a V1OverlordsUIDMaasAccountUpdateNoContent with default headers values +func NewV1OverlordsUIDMaasAccountUpdateNoContent() *V1OverlordsUIDMaasAccountUpdateNoContent { + return &V1OverlordsUIDMaasAccountUpdateNoContent{} +} + +/* +V1OverlordsUIDMaasAccountUpdateNoContent handles this case with default header values. + +The resource was updated successfully +*/ +type V1OverlordsUIDMaasAccountUpdateNoContent struct { +} + +func (o *V1OverlordsUIDMaasAccountUpdateNoContent) Error() string { + return fmt.Sprintf("[PUT /v1/overlords/maas/{uid}/account][%d] v1OverlordsUidMaasAccountUpdateNoContent ", 204) +} + +func (o *V1OverlordsUIDMaasAccountUpdateNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_overlords_uid_maas_account_validate_parameters.go b/api/client/v1/v1_overlords_uid_maas_account_validate_parameters.go new file mode 100644 index 00000000..fb57b2b6 --- /dev/null +++ b/api/client/v1/v1_overlords_uid_maas_account_validate_parameters.go @@ -0,0 +1,150 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1OverlordsUIDMaasAccountValidateParams creates a new V1OverlordsUIDMaasAccountValidateParams object +// with the default values initialized. +func NewV1OverlordsUIDMaasAccountValidateParams() *V1OverlordsUIDMaasAccountValidateParams { + var () + return &V1OverlordsUIDMaasAccountValidateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1OverlordsUIDMaasAccountValidateParamsWithTimeout creates a new V1OverlordsUIDMaasAccountValidateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1OverlordsUIDMaasAccountValidateParamsWithTimeout(timeout time.Duration) *V1OverlordsUIDMaasAccountValidateParams { + var () + return &V1OverlordsUIDMaasAccountValidateParams{ + + timeout: timeout, + } +} + +// NewV1OverlordsUIDMaasAccountValidateParamsWithContext creates a new V1OverlordsUIDMaasAccountValidateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1OverlordsUIDMaasAccountValidateParamsWithContext(ctx context.Context) *V1OverlordsUIDMaasAccountValidateParams { + var () + return &V1OverlordsUIDMaasAccountValidateParams{ + + Context: ctx, + } +} + +// NewV1OverlordsUIDMaasAccountValidateParamsWithHTTPClient creates a new V1OverlordsUIDMaasAccountValidateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1OverlordsUIDMaasAccountValidateParamsWithHTTPClient(client *http.Client) *V1OverlordsUIDMaasAccountValidateParams { + var () + return &V1OverlordsUIDMaasAccountValidateParams{ + HTTPClient: client, + } +} + +/* +V1OverlordsUIDMaasAccountValidateParams contains all the parameters to send to the API endpoint +for the v1 overlords Uid maas account validate operation typically these are written to a http.Request +*/ +type V1OverlordsUIDMaasAccountValidateParams struct { + + /*Body*/ + Body V1OverlordsUIDMaasAccountValidateBody + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 overlords Uid maas account validate params +func (o *V1OverlordsUIDMaasAccountValidateParams) WithTimeout(timeout time.Duration) *V1OverlordsUIDMaasAccountValidateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 overlords Uid maas account validate params +func (o *V1OverlordsUIDMaasAccountValidateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 overlords Uid maas account validate params +func (o *V1OverlordsUIDMaasAccountValidateParams) WithContext(ctx context.Context) *V1OverlordsUIDMaasAccountValidateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 overlords Uid maas account validate params +func (o *V1OverlordsUIDMaasAccountValidateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 overlords Uid maas account validate params +func (o *V1OverlordsUIDMaasAccountValidateParams) WithHTTPClient(client *http.Client) *V1OverlordsUIDMaasAccountValidateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 overlords Uid maas account validate params +func (o *V1OverlordsUIDMaasAccountValidateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 overlords Uid maas account validate params +func (o *V1OverlordsUIDMaasAccountValidateParams) WithBody(body V1OverlordsUIDMaasAccountValidateBody) *V1OverlordsUIDMaasAccountValidateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 overlords Uid maas account validate params +func (o *V1OverlordsUIDMaasAccountValidateParams) SetBody(body V1OverlordsUIDMaasAccountValidateBody) { + o.Body = body +} + +// WithUID adds the uid to the v1 overlords Uid maas account validate params +func (o *V1OverlordsUIDMaasAccountValidateParams) WithUID(uid string) *V1OverlordsUIDMaasAccountValidateParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 overlords Uid maas account validate params +func (o *V1OverlordsUIDMaasAccountValidateParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1OverlordsUIDMaasAccountValidateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_overlords_uid_maas_account_validate_responses.go b/api/client/v1/v1_overlords_uid_maas_account_validate_responses.go new file mode 100644 index 00000000..26a9d2a4 --- /dev/null +++ b/api/client/v1/v1_overlords_uid_maas_account_validate_responses.go @@ -0,0 +1,125 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1OverlordsUIDMaasAccountValidateReader is a Reader for the V1OverlordsUIDMaasAccountValidate structure. +type V1OverlordsUIDMaasAccountValidateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1OverlordsUIDMaasAccountValidateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1OverlordsUIDMaasAccountValidateNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1OverlordsUIDMaasAccountValidateNoContent creates a V1OverlordsUIDMaasAccountValidateNoContent with default headers values +func NewV1OverlordsUIDMaasAccountValidateNoContent() *V1OverlordsUIDMaasAccountValidateNoContent { + return &V1OverlordsUIDMaasAccountValidateNoContent{} +} + +/* +V1OverlordsUIDMaasAccountValidateNoContent handles this case with default header values. + +Ok response without content +*/ +type V1OverlordsUIDMaasAccountValidateNoContent struct { + /*Audit uid for the request + */ + AuditUID string +} + +func (o *V1OverlordsUIDMaasAccountValidateNoContent) Error() string { + return fmt.Sprintf("[POST /v1/overlords/maas/{uid}/account/validate][%d] v1OverlordsUidMaasAccountValidateNoContent ", 204) +} + +func (o *V1OverlordsUIDMaasAccountValidateNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header AuditUid + o.AuditUID = response.GetHeader("AuditUid") + + return nil +} + +/* +V1OverlordsUIDMaasAccountValidateBody v1 overlords UID maas account validate body +swagger:model V1OverlordsUIDMaasAccountValidateBody +*/ +type V1OverlordsUIDMaasAccountValidateBody struct { + + // account + Account *models.V1MaasCloudAccount `json:"account,omitempty"` +} + +// Validate validates this v1 overlords UID maas account validate body +func (o *V1OverlordsUIDMaasAccountValidateBody) Validate(formats strfmt.Registry) error { + var res []error + + if err := o.validateAccount(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (o *V1OverlordsUIDMaasAccountValidateBody) validateAccount(formats strfmt.Registry) error { + + if swag.IsZero(o.Account) { // not required + return nil + } + + if o.Account != nil { + if err := o.Account.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("body" + "." + "account") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (o *V1OverlordsUIDMaasAccountValidateBody) MarshalBinary() ([]byte, error) { + if o == nil { + return nil, nil + } + return swag.WriteJSON(o) +} + +// UnmarshalBinary interface implementation +func (o *V1OverlordsUIDMaasAccountValidateBody) UnmarshalBinary(b []byte) error { + var res V1OverlordsUIDMaasAccountValidateBody + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *o = res + return nil +} diff --git a/api/client/v1/v1_overlords_uid_maas_cloud_config_create_parameters.go b/api/client/v1/v1_overlords_uid_maas_cloud_config_create_parameters.go new file mode 100644 index 00000000..7d0ec83b --- /dev/null +++ b/api/client/v1/v1_overlords_uid_maas_cloud_config_create_parameters.go @@ -0,0 +1,154 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1OverlordsUIDMaasCloudConfigCreateParams creates a new V1OverlordsUIDMaasCloudConfigCreateParams object +// with the default values initialized. +func NewV1OverlordsUIDMaasCloudConfigCreateParams() *V1OverlordsUIDMaasCloudConfigCreateParams { + var () + return &V1OverlordsUIDMaasCloudConfigCreateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1OverlordsUIDMaasCloudConfigCreateParamsWithTimeout creates a new V1OverlordsUIDMaasCloudConfigCreateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1OverlordsUIDMaasCloudConfigCreateParamsWithTimeout(timeout time.Duration) *V1OverlordsUIDMaasCloudConfigCreateParams { + var () + return &V1OverlordsUIDMaasCloudConfigCreateParams{ + + timeout: timeout, + } +} + +// NewV1OverlordsUIDMaasCloudConfigCreateParamsWithContext creates a new V1OverlordsUIDMaasCloudConfigCreateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1OverlordsUIDMaasCloudConfigCreateParamsWithContext(ctx context.Context) *V1OverlordsUIDMaasCloudConfigCreateParams { + var () + return &V1OverlordsUIDMaasCloudConfigCreateParams{ + + Context: ctx, + } +} + +// NewV1OverlordsUIDMaasCloudConfigCreateParamsWithHTTPClient creates a new V1OverlordsUIDMaasCloudConfigCreateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1OverlordsUIDMaasCloudConfigCreateParamsWithHTTPClient(client *http.Client) *V1OverlordsUIDMaasCloudConfigCreateParams { + var () + return &V1OverlordsUIDMaasCloudConfigCreateParams{ + HTTPClient: client, + } +} + +/* +V1OverlordsUIDMaasCloudConfigCreateParams contains all the parameters to send to the API endpoint +for the v1 overlords Uid maas cloud config create operation typically these are written to a http.Request +*/ +type V1OverlordsUIDMaasCloudConfigCreateParams struct { + + /*Body*/ + Body *models.V1OverlordMaasCloudConfig + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 overlords Uid maas cloud config create params +func (o *V1OverlordsUIDMaasCloudConfigCreateParams) WithTimeout(timeout time.Duration) *V1OverlordsUIDMaasCloudConfigCreateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 overlords Uid maas cloud config create params +func (o *V1OverlordsUIDMaasCloudConfigCreateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 overlords Uid maas cloud config create params +func (o *V1OverlordsUIDMaasCloudConfigCreateParams) WithContext(ctx context.Context) *V1OverlordsUIDMaasCloudConfigCreateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 overlords Uid maas cloud config create params +func (o *V1OverlordsUIDMaasCloudConfigCreateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 overlords Uid maas cloud config create params +func (o *V1OverlordsUIDMaasCloudConfigCreateParams) WithHTTPClient(client *http.Client) *V1OverlordsUIDMaasCloudConfigCreateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 overlords Uid maas cloud config create params +func (o *V1OverlordsUIDMaasCloudConfigCreateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 overlords Uid maas cloud config create params +func (o *V1OverlordsUIDMaasCloudConfigCreateParams) WithBody(body *models.V1OverlordMaasCloudConfig) *V1OverlordsUIDMaasCloudConfigCreateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 overlords Uid maas cloud config create params +func (o *V1OverlordsUIDMaasCloudConfigCreateParams) SetBody(body *models.V1OverlordMaasCloudConfig) { + o.Body = body +} + +// WithUID adds the uid to the v1 overlords Uid maas cloud config create params +func (o *V1OverlordsUIDMaasCloudConfigCreateParams) WithUID(uid string) *V1OverlordsUIDMaasCloudConfigCreateParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 overlords Uid maas cloud config create params +func (o *V1OverlordsUIDMaasCloudConfigCreateParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1OverlordsUIDMaasCloudConfigCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_overlords_uid_maas_cloud_config_create_responses.go b/api/client/v1/v1_overlords_uid_maas_cloud_config_create_responses.go new file mode 100644 index 00000000..10d7206f --- /dev/null +++ b/api/client/v1/v1_overlords_uid_maas_cloud_config_create_responses.go @@ -0,0 +1,77 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1OverlordsUIDMaasCloudConfigCreateReader is a Reader for the V1OverlordsUIDMaasCloudConfigCreate structure. +type V1OverlordsUIDMaasCloudConfigCreateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1OverlordsUIDMaasCloudConfigCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 201: + result := NewV1OverlordsUIDMaasCloudConfigCreateCreated() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1OverlordsUIDMaasCloudConfigCreateCreated creates a V1OverlordsUIDMaasCloudConfigCreateCreated with default headers values +func NewV1OverlordsUIDMaasCloudConfigCreateCreated() *V1OverlordsUIDMaasCloudConfigCreateCreated { + return &V1OverlordsUIDMaasCloudConfigCreateCreated{} +} + +/* +V1OverlordsUIDMaasCloudConfigCreateCreated handles this case with default header values. + +Created successfully +*/ +type V1OverlordsUIDMaasCloudConfigCreateCreated struct { + /*Audit uid for the request + */ + AuditUID string + + Payload *models.V1UID +} + +func (o *V1OverlordsUIDMaasCloudConfigCreateCreated) Error() string { + return fmt.Sprintf("[POST /v1/overlords/maas/{uid}/cloudconfig][%d] v1OverlordsUidMaasCloudConfigCreateCreated %+v", 201, o.Payload) +} + +func (o *V1OverlordsUIDMaasCloudConfigCreateCreated) GetPayload() *models.V1UID { + return o.Payload +} + +func (o *V1OverlordsUIDMaasCloudConfigCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header AuditUid + o.AuditUID = response.GetHeader("AuditUid") + + o.Payload = new(models.V1UID) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_overlords_uid_maas_cloud_config_update_parameters.go b/api/client/v1/v1_overlords_uid_maas_cloud_config_update_parameters.go new file mode 100644 index 00000000..5ed650f0 --- /dev/null +++ b/api/client/v1/v1_overlords_uid_maas_cloud_config_update_parameters.go @@ -0,0 +1,154 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1OverlordsUIDMaasCloudConfigUpdateParams creates a new V1OverlordsUIDMaasCloudConfigUpdateParams object +// with the default values initialized. +func NewV1OverlordsUIDMaasCloudConfigUpdateParams() *V1OverlordsUIDMaasCloudConfigUpdateParams { + var () + return &V1OverlordsUIDMaasCloudConfigUpdateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1OverlordsUIDMaasCloudConfigUpdateParamsWithTimeout creates a new V1OverlordsUIDMaasCloudConfigUpdateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1OverlordsUIDMaasCloudConfigUpdateParamsWithTimeout(timeout time.Duration) *V1OverlordsUIDMaasCloudConfigUpdateParams { + var () + return &V1OverlordsUIDMaasCloudConfigUpdateParams{ + + timeout: timeout, + } +} + +// NewV1OverlordsUIDMaasCloudConfigUpdateParamsWithContext creates a new V1OverlordsUIDMaasCloudConfigUpdateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1OverlordsUIDMaasCloudConfigUpdateParamsWithContext(ctx context.Context) *V1OverlordsUIDMaasCloudConfigUpdateParams { + var () + return &V1OverlordsUIDMaasCloudConfigUpdateParams{ + + Context: ctx, + } +} + +// NewV1OverlordsUIDMaasCloudConfigUpdateParamsWithHTTPClient creates a new V1OverlordsUIDMaasCloudConfigUpdateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1OverlordsUIDMaasCloudConfigUpdateParamsWithHTTPClient(client *http.Client) *V1OverlordsUIDMaasCloudConfigUpdateParams { + var () + return &V1OverlordsUIDMaasCloudConfigUpdateParams{ + HTTPClient: client, + } +} + +/* +V1OverlordsUIDMaasCloudConfigUpdateParams contains all the parameters to send to the API endpoint +for the v1 overlords Uid maas cloud config update operation typically these are written to a http.Request +*/ +type V1OverlordsUIDMaasCloudConfigUpdateParams struct { + + /*Body*/ + Body *models.V1OverlordMaasCloudConfig + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 overlords Uid maas cloud config update params +func (o *V1OverlordsUIDMaasCloudConfigUpdateParams) WithTimeout(timeout time.Duration) *V1OverlordsUIDMaasCloudConfigUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 overlords Uid maas cloud config update params +func (o *V1OverlordsUIDMaasCloudConfigUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 overlords Uid maas cloud config update params +func (o *V1OverlordsUIDMaasCloudConfigUpdateParams) WithContext(ctx context.Context) *V1OverlordsUIDMaasCloudConfigUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 overlords Uid maas cloud config update params +func (o *V1OverlordsUIDMaasCloudConfigUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 overlords Uid maas cloud config update params +func (o *V1OverlordsUIDMaasCloudConfigUpdateParams) WithHTTPClient(client *http.Client) *V1OverlordsUIDMaasCloudConfigUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 overlords Uid maas cloud config update params +func (o *V1OverlordsUIDMaasCloudConfigUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 overlords Uid maas cloud config update params +func (o *V1OverlordsUIDMaasCloudConfigUpdateParams) WithBody(body *models.V1OverlordMaasCloudConfig) *V1OverlordsUIDMaasCloudConfigUpdateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 overlords Uid maas cloud config update params +func (o *V1OverlordsUIDMaasCloudConfigUpdateParams) SetBody(body *models.V1OverlordMaasCloudConfig) { + o.Body = body +} + +// WithUID adds the uid to the v1 overlords Uid maas cloud config update params +func (o *V1OverlordsUIDMaasCloudConfigUpdateParams) WithUID(uid string) *V1OverlordsUIDMaasCloudConfigUpdateParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 overlords Uid maas cloud config update params +func (o *V1OverlordsUIDMaasCloudConfigUpdateParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1OverlordsUIDMaasCloudConfigUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_overlords_uid_maas_cloud_config_update_responses.go b/api/client/v1/v1_overlords_uid_maas_cloud_config_update_responses.go new file mode 100644 index 00000000..739a8690 --- /dev/null +++ b/api/client/v1/v1_overlords_uid_maas_cloud_config_update_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1OverlordsUIDMaasCloudConfigUpdateReader is a Reader for the V1OverlordsUIDMaasCloudConfigUpdate structure. +type V1OverlordsUIDMaasCloudConfigUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1OverlordsUIDMaasCloudConfigUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1OverlordsUIDMaasCloudConfigUpdateNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1OverlordsUIDMaasCloudConfigUpdateNoContent creates a V1OverlordsUIDMaasCloudConfigUpdateNoContent with default headers values +func NewV1OverlordsUIDMaasCloudConfigUpdateNoContent() *V1OverlordsUIDMaasCloudConfigUpdateNoContent { + return &V1OverlordsUIDMaasCloudConfigUpdateNoContent{} +} + +/* +V1OverlordsUIDMaasCloudConfigUpdateNoContent handles this case with default header values. + +The resource was updated successfully +*/ +type V1OverlordsUIDMaasCloudConfigUpdateNoContent struct { +} + +func (o *V1OverlordsUIDMaasCloudConfigUpdateNoContent) Error() string { + return fmt.Sprintf("[PUT /v1/overlords/maas/{uid}/cloudconfig][%d] v1OverlordsUidMaasCloudConfigUpdateNoContent ", 204) +} + +func (o *V1OverlordsUIDMaasCloudConfigUpdateNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_overlords_uid_maas_cluster_profile_parameters.go b/api/client/v1/v1_overlords_uid_maas_cluster_profile_parameters.go new file mode 100644 index 00000000..11897f9f --- /dev/null +++ b/api/client/v1/v1_overlords_uid_maas_cluster_profile_parameters.go @@ -0,0 +1,133 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1OverlordsUIDMaasClusterProfileParams creates a new V1OverlordsUIDMaasClusterProfileParams object +// with the default values initialized. +func NewV1OverlordsUIDMaasClusterProfileParams() *V1OverlordsUIDMaasClusterProfileParams { + var () + return &V1OverlordsUIDMaasClusterProfileParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1OverlordsUIDMaasClusterProfileParamsWithTimeout creates a new V1OverlordsUIDMaasClusterProfileParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1OverlordsUIDMaasClusterProfileParamsWithTimeout(timeout time.Duration) *V1OverlordsUIDMaasClusterProfileParams { + var () + return &V1OverlordsUIDMaasClusterProfileParams{ + + timeout: timeout, + } +} + +// NewV1OverlordsUIDMaasClusterProfileParamsWithContext creates a new V1OverlordsUIDMaasClusterProfileParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1OverlordsUIDMaasClusterProfileParamsWithContext(ctx context.Context) *V1OverlordsUIDMaasClusterProfileParams { + var () + return &V1OverlordsUIDMaasClusterProfileParams{ + + Context: ctx, + } +} + +// NewV1OverlordsUIDMaasClusterProfileParamsWithHTTPClient creates a new V1OverlordsUIDMaasClusterProfileParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1OverlordsUIDMaasClusterProfileParamsWithHTTPClient(client *http.Client) *V1OverlordsUIDMaasClusterProfileParams { + var () + return &V1OverlordsUIDMaasClusterProfileParams{ + HTTPClient: client, + } +} + +/* +V1OverlordsUIDMaasClusterProfileParams contains all the parameters to send to the API endpoint +for the v1 overlords Uid maas cluster profile operation typically these are written to a http.Request +*/ +type V1OverlordsUIDMaasClusterProfileParams struct { + + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 overlords Uid maas cluster profile params +func (o *V1OverlordsUIDMaasClusterProfileParams) WithTimeout(timeout time.Duration) *V1OverlordsUIDMaasClusterProfileParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 overlords Uid maas cluster profile params +func (o *V1OverlordsUIDMaasClusterProfileParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 overlords Uid maas cluster profile params +func (o *V1OverlordsUIDMaasClusterProfileParams) WithContext(ctx context.Context) *V1OverlordsUIDMaasClusterProfileParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 overlords Uid maas cluster profile params +func (o *V1OverlordsUIDMaasClusterProfileParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 overlords Uid maas cluster profile params +func (o *V1OverlordsUIDMaasClusterProfileParams) WithHTTPClient(client *http.Client) *V1OverlordsUIDMaasClusterProfileParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 overlords Uid maas cluster profile params +func (o *V1OverlordsUIDMaasClusterProfileParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithUID adds the uid to the v1 overlords Uid maas cluster profile params +func (o *V1OverlordsUIDMaasClusterProfileParams) WithUID(uid string) *V1OverlordsUIDMaasClusterProfileParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 overlords Uid maas cluster profile params +func (o *V1OverlordsUIDMaasClusterProfileParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1OverlordsUIDMaasClusterProfileParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_overlords_uid_maas_cluster_profile_responses.go b/api/client/v1/v1_overlords_uid_maas_cluster_profile_responses.go new file mode 100644 index 00000000..3438b320 --- /dev/null +++ b/api/client/v1/v1_overlords_uid_maas_cluster_profile_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1OverlordsUIDMaasClusterProfileReader is a Reader for the V1OverlordsUIDMaasClusterProfile structure. +type V1OverlordsUIDMaasClusterProfileReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1OverlordsUIDMaasClusterProfileReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1OverlordsUIDMaasClusterProfileOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1OverlordsUIDMaasClusterProfileOK creates a V1OverlordsUIDMaasClusterProfileOK with default headers values +func NewV1OverlordsUIDMaasClusterProfileOK() *V1OverlordsUIDMaasClusterProfileOK { + return &V1OverlordsUIDMaasClusterProfileOK{} +} + +/* +V1OverlordsUIDMaasClusterProfileOK handles this case with default header values. + +OK +*/ +type V1OverlordsUIDMaasClusterProfileOK struct { + Payload *models.V1ClusterProfile +} + +func (o *V1OverlordsUIDMaasClusterProfileOK) Error() string { + return fmt.Sprintf("[GET /v1/overlords/maas/{uid}/clusterprofile][%d] v1OverlordsUidMaasClusterProfileOK %+v", 200, o.Payload) +} + +func (o *V1OverlordsUIDMaasClusterProfileOK) GetPayload() *models.V1ClusterProfile { + return o.Payload +} + +func (o *V1OverlordsUIDMaasClusterProfileOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1ClusterProfile) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_overlords_uid_metadata_update_parameters.go b/api/client/v1/v1_overlords_uid_metadata_update_parameters.go new file mode 100644 index 00000000..7bf077a0 --- /dev/null +++ b/api/client/v1/v1_overlords_uid_metadata_update_parameters.go @@ -0,0 +1,154 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1OverlordsUIDMetadataUpdateParams creates a new V1OverlordsUIDMetadataUpdateParams object +// with the default values initialized. +func NewV1OverlordsUIDMetadataUpdateParams() *V1OverlordsUIDMetadataUpdateParams { + var () + return &V1OverlordsUIDMetadataUpdateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1OverlordsUIDMetadataUpdateParamsWithTimeout creates a new V1OverlordsUIDMetadataUpdateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1OverlordsUIDMetadataUpdateParamsWithTimeout(timeout time.Duration) *V1OverlordsUIDMetadataUpdateParams { + var () + return &V1OverlordsUIDMetadataUpdateParams{ + + timeout: timeout, + } +} + +// NewV1OverlordsUIDMetadataUpdateParamsWithContext creates a new V1OverlordsUIDMetadataUpdateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1OverlordsUIDMetadataUpdateParamsWithContext(ctx context.Context) *V1OverlordsUIDMetadataUpdateParams { + var () + return &V1OverlordsUIDMetadataUpdateParams{ + + Context: ctx, + } +} + +// NewV1OverlordsUIDMetadataUpdateParamsWithHTTPClient creates a new V1OverlordsUIDMetadataUpdateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1OverlordsUIDMetadataUpdateParamsWithHTTPClient(client *http.Client) *V1OverlordsUIDMetadataUpdateParams { + var () + return &V1OverlordsUIDMetadataUpdateParams{ + HTTPClient: client, + } +} + +/* +V1OverlordsUIDMetadataUpdateParams contains all the parameters to send to the API endpoint +for the v1 overlords Uid metadata update operation typically these are written to a http.Request +*/ +type V1OverlordsUIDMetadataUpdateParams struct { + + /*Body*/ + Body *models.V1ObjectMetaInputEntitySchema + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 overlords Uid metadata update params +func (o *V1OverlordsUIDMetadataUpdateParams) WithTimeout(timeout time.Duration) *V1OverlordsUIDMetadataUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 overlords Uid metadata update params +func (o *V1OverlordsUIDMetadataUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 overlords Uid metadata update params +func (o *V1OverlordsUIDMetadataUpdateParams) WithContext(ctx context.Context) *V1OverlordsUIDMetadataUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 overlords Uid metadata update params +func (o *V1OverlordsUIDMetadataUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 overlords Uid metadata update params +func (o *V1OverlordsUIDMetadataUpdateParams) WithHTTPClient(client *http.Client) *V1OverlordsUIDMetadataUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 overlords Uid metadata update params +func (o *V1OverlordsUIDMetadataUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 overlords Uid metadata update params +func (o *V1OverlordsUIDMetadataUpdateParams) WithBody(body *models.V1ObjectMetaInputEntitySchema) *V1OverlordsUIDMetadataUpdateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 overlords Uid metadata update params +func (o *V1OverlordsUIDMetadataUpdateParams) SetBody(body *models.V1ObjectMetaInputEntitySchema) { + o.Body = body +} + +// WithUID adds the uid to the v1 overlords Uid metadata update params +func (o *V1OverlordsUIDMetadataUpdateParams) WithUID(uid string) *V1OverlordsUIDMetadataUpdateParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 overlords Uid metadata update params +func (o *V1OverlordsUIDMetadataUpdateParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1OverlordsUIDMetadataUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_overlords_uid_metadata_update_responses.go b/api/client/v1/v1_overlords_uid_metadata_update_responses.go new file mode 100644 index 00000000..cd47bd3d --- /dev/null +++ b/api/client/v1/v1_overlords_uid_metadata_update_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1OverlordsUIDMetadataUpdateReader is a Reader for the V1OverlordsUIDMetadataUpdate structure. +type V1OverlordsUIDMetadataUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1OverlordsUIDMetadataUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1OverlordsUIDMetadataUpdateNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1OverlordsUIDMetadataUpdateNoContent creates a V1OverlordsUIDMetadataUpdateNoContent with default headers values +func NewV1OverlordsUIDMetadataUpdateNoContent() *V1OverlordsUIDMetadataUpdateNoContent { + return &V1OverlordsUIDMetadataUpdateNoContent{} +} + +/* +V1OverlordsUIDMetadataUpdateNoContent handles this case with default header values. + +The resource was updated successfully +*/ +type V1OverlordsUIDMetadataUpdateNoContent struct { +} + +func (o *V1OverlordsUIDMetadataUpdateNoContent) Error() string { + return fmt.Sprintf("[PUT /v1/overlords/{uid}/metadata][%d] v1OverlordsUidMetadataUpdateNoContent ", 204) +} + +func (o *V1OverlordsUIDMetadataUpdateNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_overlords_uid_open_stack_account_create_parameters.go b/api/client/v1/v1_overlords_uid_open_stack_account_create_parameters.go new file mode 100644 index 00000000..be0debf3 --- /dev/null +++ b/api/client/v1/v1_overlords_uid_open_stack_account_create_parameters.go @@ -0,0 +1,154 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1OverlordsUIDOpenStackAccountCreateParams creates a new V1OverlordsUIDOpenStackAccountCreateParams object +// with the default values initialized. +func NewV1OverlordsUIDOpenStackAccountCreateParams() *V1OverlordsUIDOpenStackAccountCreateParams { + var () + return &V1OverlordsUIDOpenStackAccountCreateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1OverlordsUIDOpenStackAccountCreateParamsWithTimeout creates a new V1OverlordsUIDOpenStackAccountCreateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1OverlordsUIDOpenStackAccountCreateParamsWithTimeout(timeout time.Duration) *V1OverlordsUIDOpenStackAccountCreateParams { + var () + return &V1OverlordsUIDOpenStackAccountCreateParams{ + + timeout: timeout, + } +} + +// NewV1OverlordsUIDOpenStackAccountCreateParamsWithContext creates a new V1OverlordsUIDOpenStackAccountCreateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1OverlordsUIDOpenStackAccountCreateParamsWithContext(ctx context.Context) *V1OverlordsUIDOpenStackAccountCreateParams { + var () + return &V1OverlordsUIDOpenStackAccountCreateParams{ + + Context: ctx, + } +} + +// NewV1OverlordsUIDOpenStackAccountCreateParamsWithHTTPClient creates a new V1OverlordsUIDOpenStackAccountCreateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1OverlordsUIDOpenStackAccountCreateParamsWithHTTPClient(client *http.Client) *V1OverlordsUIDOpenStackAccountCreateParams { + var () + return &V1OverlordsUIDOpenStackAccountCreateParams{ + HTTPClient: client, + } +} + +/* +V1OverlordsUIDOpenStackAccountCreateParams contains all the parameters to send to the API endpoint +for the v1 overlords Uid open stack account create operation typically these are written to a http.Request +*/ +type V1OverlordsUIDOpenStackAccountCreateParams struct { + + /*Body*/ + Body *models.V1OverlordOpenStackAccountCreate + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 overlords Uid open stack account create params +func (o *V1OverlordsUIDOpenStackAccountCreateParams) WithTimeout(timeout time.Duration) *V1OverlordsUIDOpenStackAccountCreateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 overlords Uid open stack account create params +func (o *V1OverlordsUIDOpenStackAccountCreateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 overlords Uid open stack account create params +func (o *V1OverlordsUIDOpenStackAccountCreateParams) WithContext(ctx context.Context) *V1OverlordsUIDOpenStackAccountCreateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 overlords Uid open stack account create params +func (o *V1OverlordsUIDOpenStackAccountCreateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 overlords Uid open stack account create params +func (o *V1OverlordsUIDOpenStackAccountCreateParams) WithHTTPClient(client *http.Client) *V1OverlordsUIDOpenStackAccountCreateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 overlords Uid open stack account create params +func (o *V1OverlordsUIDOpenStackAccountCreateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 overlords Uid open stack account create params +func (o *V1OverlordsUIDOpenStackAccountCreateParams) WithBody(body *models.V1OverlordOpenStackAccountCreate) *V1OverlordsUIDOpenStackAccountCreateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 overlords Uid open stack account create params +func (o *V1OverlordsUIDOpenStackAccountCreateParams) SetBody(body *models.V1OverlordOpenStackAccountCreate) { + o.Body = body +} + +// WithUID adds the uid to the v1 overlords Uid open stack account create params +func (o *V1OverlordsUIDOpenStackAccountCreateParams) WithUID(uid string) *V1OverlordsUIDOpenStackAccountCreateParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 overlords Uid open stack account create params +func (o *V1OverlordsUIDOpenStackAccountCreateParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1OverlordsUIDOpenStackAccountCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_overlords_uid_open_stack_account_create_responses.go b/api/client/v1/v1_overlords_uid_open_stack_account_create_responses.go new file mode 100644 index 00000000..3aeb1a4f --- /dev/null +++ b/api/client/v1/v1_overlords_uid_open_stack_account_create_responses.go @@ -0,0 +1,77 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1OverlordsUIDOpenStackAccountCreateReader is a Reader for the V1OverlordsUIDOpenStackAccountCreate structure. +type V1OverlordsUIDOpenStackAccountCreateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1OverlordsUIDOpenStackAccountCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 201: + result := NewV1OverlordsUIDOpenStackAccountCreateCreated() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1OverlordsUIDOpenStackAccountCreateCreated creates a V1OverlordsUIDOpenStackAccountCreateCreated with default headers values +func NewV1OverlordsUIDOpenStackAccountCreateCreated() *V1OverlordsUIDOpenStackAccountCreateCreated { + return &V1OverlordsUIDOpenStackAccountCreateCreated{} +} + +/* +V1OverlordsUIDOpenStackAccountCreateCreated handles this case with default header values. + +Created successfully +*/ +type V1OverlordsUIDOpenStackAccountCreateCreated struct { + /*Audit uid for the request + */ + AuditUID string + + Payload *models.V1UID +} + +func (o *V1OverlordsUIDOpenStackAccountCreateCreated) Error() string { + return fmt.Sprintf("[POST /v1/overlords/openstack/{uid}/account][%d] v1OverlordsUidOpenStackAccountCreateCreated %+v", 201, o.Payload) +} + +func (o *V1OverlordsUIDOpenStackAccountCreateCreated) GetPayload() *models.V1UID { + return o.Payload +} + +func (o *V1OverlordsUIDOpenStackAccountCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header AuditUid + o.AuditUID = response.GetHeader("AuditUid") + + o.Payload = new(models.V1UID) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_overlords_uid_open_stack_account_update_parameters.go b/api/client/v1/v1_overlords_uid_open_stack_account_update_parameters.go new file mode 100644 index 00000000..b24102b3 --- /dev/null +++ b/api/client/v1/v1_overlords_uid_open_stack_account_update_parameters.go @@ -0,0 +1,154 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1OverlordsUIDOpenStackAccountUpdateParams creates a new V1OverlordsUIDOpenStackAccountUpdateParams object +// with the default values initialized. +func NewV1OverlordsUIDOpenStackAccountUpdateParams() *V1OverlordsUIDOpenStackAccountUpdateParams { + var () + return &V1OverlordsUIDOpenStackAccountUpdateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1OverlordsUIDOpenStackAccountUpdateParamsWithTimeout creates a new V1OverlordsUIDOpenStackAccountUpdateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1OverlordsUIDOpenStackAccountUpdateParamsWithTimeout(timeout time.Duration) *V1OverlordsUIDOpenStackAccountUpdateParams { + var () + return &V1OverlordsUIDOpenStackAccountUpdateParams{ + + timeout: timeout, + } +} + +// NewV1OverlordsUIDOpenStackAccountUpdateParamsWithContext creates a new V1OverlordsUIDOpenStackAccountUpdateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1OverlordsUIDOpenStackAccountUpdateParamsWithContext(ctx context.Context) *V1OverlordsUIDOpenStackAccountUpdateParams { + var () + return &V1OverlordsUIDOpenStackAccountUpdateParams{ + + Context: ctx, + } +} + +// NewV1OverlordsUIDOpenStackAccountUpdateParamsWithHTTPClient creates a new V1OverlordsUIDOpenStackAccountUpdateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1OverlordsUIDOpenStackAccountUpdateParamsWithHTTPClient(client *http.Client) *V1OverlordsUIDOpenStackAccountUpdateParams { + var () + return &V1OverlordsUIDOpenStackAccountUpdateParams{ + HTTPClient: client, + } +} + +/* +V1OverlordsUIDOpenStackAccountUpdateParams contains all the parameters to send to the API endpoint +for the v1 overlords Uid open stack account update operation typically these are written to a http.Request +*/ +type V1OverlordsUIDOpenStackAccountUpdateParams struct { + + /*Body*/ + Body *models.V1OverlordOpenStackAccountEntity + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 overlords Uid open stack account update params +func (o *V1OverlordsUIDOpenStackAccountUpdateParams) WithTimeout(timeout time.Duration) *V1OverlordsUIDOpenStackAccountUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 overlords Uid open stack account update params +func (o *V1OverlordsUIDOpenStackAccountUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 overlords Uid open stack account update params +func (o *V1OverlordsUIDOpenStackAccountUpdateParams) WithContext(ctx context.Context) *V1OverlordsUIDOpenStackAccountUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 overlords Uid open stack account update params +func (o *V1OverlordsUIDOpenStackAccountUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 overlords Uid open stack account update params +func (o *V1OverlordsUIDOpenStackAccountUpdateParams) WithHTTPClient(client *http.Client) *V1OverlordsUIDOpenStackAccountUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 overlords Uid open stack account update params +func (o *V1OverlordsUIDOpenStackAccountUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 overlords Uid open stack account update params +func (o *V1OverlordsUIDOpenStackAccountUpdateParams) WithBody(body *models.V1OverlordOpenStackAccountEntity) *V1OverlordsUIDOpenStackAccountUpdateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 overlords Uid open stack account update params +func (o *V1OverlordsUIDOpenStackAccountUpdateParams) SetBody(body *models.V1OverlordOpenStackAccountEntity) { + o.Body = body +} + +// WithUID adds the uid to the v1 overlords Uid open stack account update params +func (o *V1OverlordsUIDOpenStackAccountUpdateParams) WithUID(uid string) *V1OverlordsUIDOpenStackAccountUpdateParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 overlords Uid open stack account update params +func (o *V1OverlordsUIDOpenStackAccountUpdateParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1OverlordsUIDOpenStackAccountUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_overlords_uid_open_stack_account_update_responses.go b/api/client/v1/v1_overlords_uid_open_stack_account_update_responses.go new file mode 100644 index 00000000..d2cf5d7f --- /dev/null +++ b/api/client/v1/v1_overlords_uid_open_stack_account_update_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1OverlordsUIDOpenStackAccountUpdateReader is a Reader for the V1OverlordsUIDOpenStackAccountUpdate structure. +type V1OverlordsUIDOpenStackAccountUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1OverlordsUIDOpenStackAccountUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1OverlordsUIDOpenStackAccountUpdateNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1OverlordsUIDOpenStackAccountUpdateNoContent creates a V1OverlordsUIDOpenStackAccountUpdateNoContent with default headers values +func NewV1OverlordsUIDOpenStackAccountUpdateNoContent() *V1OverlordsUIDOpenStackAccountUpdateNoContent { + return &V1OverlordsUIDOpenStackAccountUpdateNoContent{} +} + +/* +V1OverlordsUIDOpenStackAccountUpdateNoContent handles this case with default header values. + +The resource was updated successfully +*/ +type V1OverlordsUIDOpenStackAccountUpdateNoContent struct { +} + +func (o *V1OverlordsUIDOpenStackAccountUpdateNoContent) Error() string { + return fmt.Sprintf("[PUT /v1/overlords/openstack/{uid}/account][%d] v1OverlordsUidOpenStackAccountUpdateNoContent ", 204) +} + +func (o *V1OverlordsUIDOpenStackAccountUpdateNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_overlords_uid_open_stack_account_validate_parameters.go b/api/client/v1/v1_overlords_uid_open_stack_account_validate_parameters.go new file mode 100644 index 00000000..16fba2b3 --- /dev/null +++ b/api/client/v1/v1_overlords_uid_open_stack_account_validate_parameters.go @@ -0,0 +1,150 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1OverlordsUIDOpenStackAccountValidateParams creates a new V1OverlordsUIDOpenStackAccountValidateParams object +// with the default values initialized. +func NewV1OverlordsUIDOpenStackAccountValidateParams() *V1OverlordsUIDOpenStackAccountValidateParams { + var () + return &V1OverlordsUIDOpenStackAccountValidateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1OverlordsUIDOpenStackAccountValidateParamsWithTimeout creates a new V1OverlordsUIDOpenStackAccountValidateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1OverlordsUIDOpenStackAccountValidateParamsWithTimeout(timeout time.Duration) *V1OverlordsUIDOpenStackAccountValidateParams { + var () + return &V1OverlordsUIDOpenStackAccountValidateParams{ + + timeout: timeout, + } +} + +// NewV1OverlordsUIDOpenStackAccountValidateParamsWithContext creates a new V1OverlordsUIDOpenStackAccountValidateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1OverlordsUIDOpenStackAccountValidateParamsWithContext(ctx context.Context) *V1OverlordsUIDOpenStackAccountValidateParams { + var () + return &V1OverlordsUIDOpenStackAccountValidateParams{ + + Context: ctx, + } +} + +// NewV1OverlordsUIDOpenStackAccountValidateParamsWithHTTPClient creates a new V1OverlordsUIDOpenStackAccountValidateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1OverlordsUIDOpenStackAccountValidateParamsWithHTTPClient(client *http.Client) *V1OverlordsUIDOpenStackAccountValidateParams { + var () + return &V1OverlordsUIDOpenStackAccountValidateParams{ + HTTPClient: client, + } +} + +/* +V1OverlordsUIDOpenStackAccountValidateParams contains all the parameters to send to the API endpoint +for the v1 overlords Uid open stack account validate operation typically these are written to a http.Request +*/ +type V1OverlordsUIDOpenStackAccountValidateParams struct { + + /*Body*/ + Body V1OverlordsUIDOpenStackAccountValidateBody + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 overlords Uid open stack account validate params +func (o *V1OverlordsUIDOpenStackAccountValidateParams) WithTimeout(timeout time.Duration) *V1OverlordsUIDOpenStackAccountValidateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 overlords Uid open stack account validate params +func (o *V1OverlordsUIDOpenStackAccountValidateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 overlords Uid open stack account validate params +func (o *V1OverlordsUIDOpenStackAccountValidateParams) WithContext(ctx context.Context) *V1OverlordsUIDOpenStackAccountValidateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 overlords Uid open stack account validate params +func (o *V1OverlordsUIDOpenStackAccountValidateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 overlords Uid open stack account validate params +func (o *V1OverlordsUIDOpenStackAccountValidateParams) WithHTTPClient(client *http.Client) *V1OverlordsUIDOpenStackAccountValidateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 overlords Uid open stack account validate params +func (o *V1OverlordsUIDOpenStackAccountValidateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 overlords Uid open stack account validate params +func (o *V1OverlordsUIDOpenStackAccountValidateParams) WithBody(body V1OverlordsUIDOpenStackAccountValidateBody) *V1OverlordsUIDOpenStackAccountValidateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 overlords Uid open stack account validate params +func (o *V1OverlordsUIDOpenStackAccountValidateParams) SetBody(body V1OverlordsUIDOpenStackAccountValidateBody) { + o.Body = body +} + +// WithUID adds the uid to the v1 overlords Uid open stack account validate params +func (o *V1OverlordsUIDOpenStackAccountValidateParams) WithUID(uid string) *V1OverlordsUIDOpenStackAccountValidateParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 overlords Uid open stack account validate params +func (o *V1OverlordsUIDOpenStackAccountValidateParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1OverlordsUIDOpenStackAccountValidateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_overlords_uid_open_stack_account_validate_responses.go b/api/client/v1/v1_overlords_uid_open_stack_account_validate_responses.go new file mode 100644 index 00000000..f804948f --- /dev/null +++ b/api/client/v1/v1_overlords_uid_open_stack_account_validate_responses.go @@ -0,0 +1,125 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1OverlordsUIDOpenStackAccountValidateReader is a Reader for the V1OverlordsUIDOpenStackAccountValidate structure. +type V1OverlordsUIDOpenStackAccountValidateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1OverlordsUIDOpenStackAccountValidateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1OverlordsUIDOpenStackAccountValidateNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1OverlordsUIDOpenStackAccountValidateNoContent creates a V1OverlordsUIDOpenStackAccountValidateNoContent with default headers values +func NewV1OverlordsUIDOpenStackAccountValidateNoContent() *V1OverlordsUIDOpenStackAccountValidateNoContent { + return &V1OverlordsUIDOpenStackAccountValidateNoContent{} +} + +/* +V1OverlordsUIDOpenStackAccountValidateNoContent handles this case with default header values. + +Ok response without content +*/ +type V1OverlordsUIDOpenStackAccountValidateNoContent struct { + /*Audit uid for the request + */ + AuditUID string +} + +func (o *V1OverlordsUIDOpenStackAccountValidateNoContent) Error() string { + return fmt.Sprintf("[POST /v1/overlords/openstack/{uid}/account/validate][%d] v1OverlordsUidOpenStackAccountValidateNoContent ", 204) +} + +func (o *V1OverlordsUIDOpenStackAccountValidateNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header AuditUid + o.AuditUID = response.GetHeader("AuditUid") + + return nil +} + +/* +V1OverlordsUIDOpenStackAccountValidateBody v1 overlords UID open stack account validate body +swagger:model V1OverlordsUIDOpenStackAccountValidateBody +*/ +type V1OverlordsUIDOpenStackAccountValidateBody struct { + + // account + Account *models.V1OpenStackCloudAccount `json:"account,omitempty"` +} + +// Validate validates this v1 overlords UID open stack account validate body +func (o *V1OverlordsUIDOpenStackAccountValidateBody) Validate(formats strfmt.Registry) error { + var res []error + + if err := o.validateAccount(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (o *V1OverlordsUIDOpenStackAccountValidateBody) validateAccount(formats strfmt.Registry) error { + + if swag.IsZero(o.Account) { // not required + return nil + } + + if o.Account != nil { + if err := o.Account.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("body" + "." + "account") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (o *V1OverlordsUIDOpenStackAccountValidateBody) MarshalBinary() ([]byte, error) { + if o == nil { + return nil, nil + } + return swag.WriteJSON(o) +} + +// UnmarshalBinary interface implementation +func (o *V1OverlordsUIDOpenStackAccountValidateBody) UnmarshalBinary(b []byte) error { + var res V1OverlordsUIDOpenStackAccountValidateBody + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *o = res + return nil +} diff --git a/api/client/v1/v1_overlords_uid_open_stack_cloud_config_create_parameters.go b/api/client/v1/v1_overlords_uid_open_stack_cloud_config_create_parameters.go new file mode 100644 index 00000000..37e8f11d --- /dev/null +++ b/api/client/v1/v1_overlords_uid_open_stack_cloud_config_create_parameters.go @@ -0,0 +1,154 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1OverlordsUIDOpenStackCloudConfigCreateParams creates a new V1OverlordsUIDOpenStackCloudConfigCreateParams object +// with the default values initialized. +func NewV1OverlordsUIDOpenStackCloudConfigCreateParams() *V1OverlordsUIDOpenStackCloudConfigCreateParams { + var () + return &V1OverlordsUIDOpenStackCloudConfigCreateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1OverlordsUIDOpenStackCloudConfigCreateParamsWithTimeout creates a new V1OverlordsUIDOpenStackCloudConfigCreateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1OverlordsUIDOpenStackCloudConfigCreateParamsWithTimeout(timeout time.Duration) *V1OverlordsUIDOpenStackCloudConfigCreateParams { + var () + return &V1OverlordsUIDOpenStackCloudConfigCreateParams{ + + timeout: timeout, + } +} + +// NewV1OverlordsUIDOpenStackCloudConfigCreateParamsWithContext creates a new V1OverlordsUIDOpenStackCloudConfigCreateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1OverlordsUIDOpenStackCloudConfigCreateParamsWithContext(ctx context.Context) *V1OverlordsUIDOpenStackCloudConfigCreateParams { + var () + return &V1OverlordsUIDOpenStackCloudConfigCreateParams{ + + Context: ctx, + } +} + +// NewV1OverlordsUIDOpenStackCloudConfigCreateParamsWithHTTPClient creates a new V1OverlordsUIDOpenStackCloudConfigCreateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1OverlordsUIDOpenStackCloudConfigCreateParamsWithHTTPClient(client *http.Client) *V1OverlordsUIDOpenStackCloudConfigCreateParams { + var () + return &V1OverlordsUIDOpenStackCloudConfigCreateParams{ + HTTPClient: client, + } +} + +/* +V1OverlordsUIDOpenStackCloudConfigCreateParams contains all the parameters to send to the API endpoint +for the v1 overlords Uid open stack cloud config create operation typically these are written to a http.Request +*/ +type V1OverlordsUIDOpenStackCloudConfigCreateParams struct { + + /*Body*/ + Body *models.V1OverlordOpenStackCloudConfig + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 overlords Uid open stack cloud config create params +func (o *V1OverlordsUIDOpenStackCloudConfigCreateParams) WithTimeout(timeout time.Duration) *V1OverlordsUIDOpenStackCloudConfigCreateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 overlords Uid open stack cloud config create params +func (o *V1OverlordsUIDOpenStackCloudConfigCreateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 overlords Uid open stack cloud config create params +func (o *V1OverlordsUIDOpenStackCloudConfigCreateParams) WithContext(ctx context.Context) *V1OverlordsUIDOpenStackCloudConfigCreateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 overlords Uid open stack cloud config create params +func (o *V1OverlordsUIDOpenStackCloudConfigCreateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 overlords Uid open stack cloud config create params +func (o *V1OverlordsUIDOpenStackCloudConfigCreateParams) WithHTTPClient(client *http.Client) *V1OverlordsUIDOpenStackCloudConfigCreateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 overlords Uid open stack cloud config create params +func (o *V1OverlordsUIDOpenStackCloudConfigCreateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 overlords Uid open stack cloud config create params +func (o *V1OverlordsUIDOpenStackCloudConfigCreateParams) WithBody(body *models.V1OverlordOpenStackCloudConfig) *V1OverlordsUIDOpenStackCloudConfigCreateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 overlords Uid open stack cloud config create params +func (o *V1OverlordsUIDOpenStackCloudConfigCreateParams) SetBody(body *models.V1OverlordOpenStackCloudConfig) { + o.Body = body +} + +// WithUID adds the uid to the v1 overlords Uid open stack cloud config create params +func (o *V1OverlordsUIDOpenStackCloudConfigCreateParams) WithUID(uid string) *V1OverlordsUIDOpenStackCloudConfigCreateParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 overlords Uid open stack cloud config create params +func (o *V1OverlordsUIDOpenStackCloudConfigCreateParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1OverlordsUIDOpenStackCloudConfigCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_overlords_uid_open_stack_cloud_config_create_responses.go b/api/client/v1/v1_overlords_uid_open_stack_cloud_config_create_responses.go new file mode 100644 index 00000000..dc977fd1 --- /dev/null +++ b/api/client/v1/v1_overlords_uid_open_stack_cloud_config_create_responses.go @@ -0,0 +1,77 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1OverlordsUIDOpenStackCloudConfigCreateReader is a Reader for the V1OverlordsUIDOpenStackCloudConfigCreate structure. +type V1OverlordsUIDOpenStackCloudConfigCreateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1OverlordsUIDOpenStackCloudConfigCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 201: + result := NewV1OverlordsUIDOpenStackCloudConfigCreateCreated() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1OverlordsUIDOpenStackCloudConfigCreateCreated creates a V1OverlordsUIDOpenStackCloudConfigCreateCreated with default headers values +func NewV1OverlordsUIDOpenStackCloudConfigCreateCreated() *V1OverlordsUIDOpenStackCloudConfigCreateCreated { + return &V1OverlordsUIDOpenStackCloudConfigCreateCreated{} +} + +/* +V1OverlordsUIDOpenStackCloudConfigCreateCreated handles this case with default header values. + +Created successfully +*/ +type V1OverlordsUIDOpenStackCloudConfigCreateCreated struct { + /*Audit uid for the request + */ + AuditUID string + + Payload *models.V1UID +} + +func (o *V1OverlordsUIDOpenStackCloudConfigCreateCreated) Error() string { + return fmt.Sprintf("[POST /v1/overlords/openstack/{uid}/cloudconfig][%d] v1OverlordsUidOpenStackCloudConfigCreateCreated %+v", 201, o.Payload) +} + +func (o *V1OverlordsUIDOpenStackCloudConfigCreateCreated) GetPayload() *models.V1UID { + return o.Payload +} + +func (o *V1OverlordsUIDOpenStackCloudConfigCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header AuditUid + o.AuditUID = response.GetHeader("AuditUid") + + o.Payload = new(models.V1UID) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_overlords_uid_open_stack_cloud_config_update_parameters.go b/api/client/v1/v1_overlords_uid_open_stack_cloud_config_update_parameters.go new file mode 100644 index 00000000..bfe910cd --- /dev/null +++ b/api/client/v1/v1_overlords_uid_open_stack_cloud_config_update_parameters.go @@ -0,0 +1,154 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1OverlordsUIDOpenStackCloudConfigUpdateParams creates a new V1OverlordsUIDOpenStackCloudConfigUpdateParams object +// with the default values initialized. +func NewV1OverlordsUIDOpenStackCloudConfigUpdateParams() *V1OverlordsUIDOpenStackCloudConfigUpdateParams { + var () + return &V1OverlordsUIDOpenStackCloudConfigUpdateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1OverlordsUIDOpenStackCloudConfigUpdateParamsWithTimeout creates a new V1OverlordsUIDOpenStackCloudConfigUpdateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1OverlordsUIDOpenStackCloudConfigUpdateParamsWithTimeout(timeout time.Duration) *V1OverlordsUIDOpenStackCloudConfigUpdateParams { + var () + return &V1OverlordsUIDOpenStackCloudConfigUpdateParams{ + + timeout: timeout, + } +} + +// NewV1OverlordsUIDOpenStackCloudConfigUpdateParamsWithContext creates a new V1OverlordsUIDOpenStackCloudConfigUpdateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1OverlordsUIDOpenStackCloudConfigUpdateParamsWithContext(ctx context.Context) *V1OverlordsUIDOpenStackCloudConfigUpdateParams { + var () + return &V1OverlordsUIDOpenStackCloudConfigUpdateParams{ + + Context: ctx, + } +} + +// NewV1OverlordsUIDOpenStackCloudConfigUpdateParamsWithHTTPClient creates a new V1OverlordsUIDOpenStackCloudConfigUpdateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1OverlordsUIDOpenStackCloudConfigUpdateParamsWithHTTPClient(client *http.Client) *V1OverlordsUIDOpenStackCloudConfigUpdateParams { + var () + return &V1OverlordsUIDOpenStackCloudConfigUpdateParams{ + HTTPClient: client, + } +} + +/* +V1OverlordsUIDOpenStackCloudConfigUpdateParams contains all the parameters to send to the API endpoint +for the v1 overlords Uid open stack cloud config update operation typically these are written to a http.Request +*/ +type V1OverlordsUIDOpenStackCloudConfigUpdateParams struct { + + /*Body*/ + Body *models.V1OverlordOpenStackCloudConfig + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 overlords Uid open stack cloud config update params +func (o *V1OverlordsUIDOpenStackCloudConfigUpdateParams) WithTimeout(timeout time.Duration) *V1OverlordsUIDOpenStackCloudConfigUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 overlords Uid open stack cloud config update params +func (o *V1OverlordsUIDOpenStackCloudConfigUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 overlords Uid open stack cloud config update params +func (o *V1OverlordsUIDOpenStackCloudConfigUpdateParams) WithContext(ctx context.Context) *V1OverlordsUIDOpenStackCloudConfigUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 overlords Uid open stack cloud config update params +func (o *V1OverlordsUIDOpenStackCloudConfigUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 overlords Uid open stack cloud config update params +func (o *V1OverlordsUIDOpenStackCloudConfigUpdateParams) WithHTTPClient(client *http.Client) *V1OverlordsUIDOpenStackCloudConfigUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 overlords Uid open stack cloud config update params +func (o *V1OverlordsUIDOpenStackCloudConfigUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 overlords Uid open stack cloud config update params +func (o *V1OverlordsUIDOpenStackCloudConfigUpdateParams) WithBody(body *models.V1OverlordOpenStackCloudConfig) *V1OverlordsUIDOpenStackCloudConfigUpdateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 overlords Uid open stack cloud config update params +func (o *V1OverlordsUIDOpenStackCloudConfigUpdateParams) SetBody(body *models.V1OverlordOpenStackCloudConfig) { + o.Body = body +} + +// WithUID adds the uid to the v1 overlords Uid open stack cloud config update params +func (o *V1OverlordsUIDOpenStackCloudConfigUpdateParams) WithUID(uid string) *V1OverlordsUIDOpenStackCloudConfigUpdateParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 overlords Uid open stack cloud config update params +func (o *V1OverlordsUIDOpenStackCloudConfigUpdateParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1OverlordsUIDOpenStackCloudConfigUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_overlords_uid_open_stack_cloud_config_update_responses.go b/api/client/v1/v1_overlords_uid_open_stack_cloud_config_update_responses.go new file mode 100644 index 00000000..25e661c9 --- /dev/null +++ b/api/client/v1/v1_overlords_uid_open_stack_cloud_config_update_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1OverlordsUIDOpenStackCloudConfigUpdateReader is a Reader for the V1OverlordsUIDOpenStackCloudConfigUpdate structure. +type V1OverlordsUIDOpenStackCloudConfigUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1OverlordsUIDOpenStackCloudConfigUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1OverlordsUIDOpenStackCloudConfigUpdateNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1OverlordsUIDOpenStackCloudConfigUpdateNoContent creates a V1OverlordsUIDOpenStackCloudConfigUpdateNoContent with default headers values +func NewV1OverlordsUIDOpenStackCloudConfigUpdateNoContent() *V1OverlordsUIDOpenStackCloudConfigUpdateNoContent { + return &V1OverlordsUIDOpenStackCloudConfigUpdateNoContent{} +} + +/* +V1OverlordsUIDOpenStackCloudConfigUpdateNoContent handles this case with default header values. + +The resource was updated successfully +*/ +type V1OverlordsUIDOpenStackCloudConfigUpdateNoContent struct { +} + +func (o *V1OverlordsUIDOpenStackCloudConfigUpdateNoContent) Error() string { + return fmt.Sprintf("[PUT /v1/overlords/openstack/{uid}/cloudconfig][%d] v1OverlordsUidOpenStackCloudConfigUpdateNoContent ", 204) +} + +func (o *V1OverlordsUIDOpenStackCloudConfigUpdateNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_overlords_uid_open_stack_cluster_profile_parameters.go b/api/client/v1/v1_overlords_uid_open_stack_cluster_profile_parameters.go new file mode 100644 index 00000000..3ed52989 --- /dev/null +++ b/api/client/v1/v1_overlords_uid_open_stack_cluster_profile_parameters.go @@ -0,0 +1,133 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1OverlordsUIDOpenStackClusterProfileParams creates a new V1OverlordsUIDOpenStackClusterProfileParams object +// with the default values initialized. +func NewV1OverlordsUIDOpenStackClusterProfileParams() *V1OverlordsUIDOpenStackClusterProfileParams { + var () + return &V1OverlordsUIDOpenStackClusterProfileParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1OverlordsUIDOpenStackClusterProfileParamsWithTimeout creates a new V1OverlordsUIDOpenStackClusterProfileParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1OverlordsUIDOpenStackClusterProfileParamsWithTimeout(timeout time.Duration) *V1OverlordsUIDOpenStackClusterProfileParams { + var () + return &V1OverlordsUIDOpenStackClusterProfileParams{ + + timeout: timeout, + } +} + +// NewV1OverlordsUIDOpenStackClusterProfileParamsWithContext creates a new V1OverlordsUIDOpenStackClusterProfileParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1OverlordsUIDOpenStackClusterProfileParamsWithContext(ctx context.Context) *V1OverlordsUIDOpenStackClusterProfileParams { + var () + return &V1OverlordsUIDOpenStackClusterProfileParams{ + + Context: ctx, + } +} + +// NewV1OverlordsUIDOpenStackClusterProfileParamsWithHTTPClient creates a new V1OverlordsUIDOpenStackClusterProfileParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1OverlordsUIDOpenStackClusterProfileParamsWithHTTPClient(client *http.Client) *V1OverlordsUIDOpenStackClusterProfileParams { + var () + return &V1OverlordsUIDOpenStackClusterProfileParams{ + HTTPClient: client, + } +} + +/* +V1OverlordsUIDOpenStackClusterProfileParams contains all the parameters to send to the API endpoint +for the v1 overlords Uid open stack cluster profile operation typically these are written to a http.Request +*/ +type V1OverlordsUIDOpenStackClusterProfileParams struct { + + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 overlords Uid open stack cluster profile params +func (o *V1OverlordsUIDOpenStackClusterProfileParams) WithTimeout(timeout time.Duration) *V1OverlordsUIDOpenStackClusterProfileParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 overlords Uid open stack cluster profile params +func (o *V1OverlordsUIDOpenStackClusterProfileParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 overlords Uid open stack cluster profile params +func (o *V1OverlordsUIDOpenStackClusterProfileParams) WithContext(ctx context.Context) *V1OverlordsUIDOpenStackClusterProfileParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 overlords Uid open stack cluster profile params +func (o *V1OverlordsUIDOpenStackClusterProfileParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 overlords Uid open stack cluster profile params +func (o *V1OverlordsUIDOpenStackClusterProfileParams) WithHTTPClient(client *http.Client) *V1OverlordsUIDOpenStackClusterProfileParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 overlords Uid open stack cluster profile params +func (o *V1OverlordsUIDOpenStackClusterProfileParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithUID adds the uid to the v1 overlords Uid open stack cluster profile params +func (o *V1OverlordsUIDOpenStackClusterProfileParams) WithUID(uid string) *V1OverlordsUIDOpenStackClusterProfileParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 overlords Uid open stack cluster profile params +func (o *V1OverlordsUIDOpenStackClusterProfileParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1OverlordsUIDOpenStackClusterProfileParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_overlords_uid_open_stack_cluster_profile_responses.go b/api/client/v1/v1_overlords_uid_open_stack_cluster_profile_responses.go new file mode 100644 index 00000000..957e7377 --- /dev/null +++ b/api/client/v1/v1_overlords_uid_open_stack_cluster_profile_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1OverlordsUIDOpenStackClusterProfileReader is a Reader for the V1OverlordsUIDOpenStackClusterProfile structure. +type V1OverlordsUIDOpenStackClusterProfileReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1OverlordsUIDOpenStackClusterProfileReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1OverlordsUIDOpenStackClusterProfileOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1OverlordsUIDOpenStackClusterProfileOK creates a V1OverlordsUIDOpenStackClusterProfileOK with default headers values +func NewV1OverlordsUIDOpenStackClusterProfileOK() *V1OverlordsUIDOpenStackClusterProfileOK { + return &V1OverlordsUIDOpenStackClusterProfileOK{} +} + +/* +V1OverlordsUIDOpenStackClusterProfileOK handles this case with default header values. + +OK +*/ +type V1OverlordsUIDOpenStackClusterProfileOK struct { + Payload *models.V1ClusterProfile +} + +func (o *V1OverlordsUIDOpenStackClusterProfileOK) Error() string { + return fmt.Sprintf("[GET /v1/overlords/openstack/{uid}/clusterprofile][%d] v1OverlordsUidOpenStackClusterProfileOK %+v", 200, o.Payload) +} + +func (o *V1OverlordsUIDOpenStackClusterProfileOK) GetPayload() *models.V1ClusterProfile { + return o.Payload +} + +func (o *V1OverlordsUIDOpenStackClusterProfileOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1ClusterProfile) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_overlords_uid_pool_create_parameters.go b/api/client/v1/v1_overlords_uid_pool_create_parameters.go new file mode 100644 index 00000000..aed493fe --- /dev/null +++ b/api/client/v1/v1_overlords_uid_pool_create_parameters.go @@ -0,0 +1,154 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1OverlordsUIDPoolCreateParams creates a new V1OverlordsUIDPoolCreateParams object +// with the default values initialized. +func NewV1OverlordsUIDPoolCreateParams() *V1OverlordsUIDPoolCreateParams { + var () + return &V1OverlordsUIDPoolCreateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1OverlordsUIDPoolCreateParamsWithTimeout creates a new V1OverlordsUIDPoolCreateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1OverlordsUIDPoolCreateParamsWithTimeout(timeout time.Duration) *V1OverlordsUIDPoolCreateParams { + var () + return &V1OverlordsUIDPoolCreateParams{ + + timeout: timeout, + } +} + +// NewV1OverlordsUIDPoolCreateParamsWithContext creates a new V1OverlordsUIDPoolCreateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1OverlordsUIDPoolCreateParamsWithContext(ctx context.Context) *V1OverlordsUIDPoolCreateParams { + var () + return &V1OverlordsUIDPoolCreateParams{ + + Context: ctx, + } +} + +// NewV1OverlordsUIDPoolCreateParamsWithHTTPClient creates a new V1OverlordsUIDPoolCreateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1OverlordsUIDPoolCreateParamsWithHTTPClient(client *http.Client) *V1OverlordsUIDPoolCreateParams { + var () + return &V1OverlordsUIDPoolCreateParams{ + HTTPClient: client, + } +} + +/* +V1OverlordsUIDPoolCreateParams contains all the parameters to send to the API endpoint +for the v1 overlords Uid pool create operation typically these are written to a http.Request +*/ +type V1OverlordsUIDPoolCreateParams struct { + + /*Body*/ + Body *models.V1IPPoolInputEntity + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 overlords Uid pool create params +func (o *V1OverlordsUIDPoolCreateParams) WithTimeout(timeout time.Duration) *V1OverlordsUIDPoolCreateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 overlords Uid pool create params +func (o *V1OverlordsUIDPoolCreateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 overlords Uid pool create params +func (o *V1OverlordsUIDPoolCreateParams) WithContext(ctx context.Context) *V1OverlordsUIDPoolCreateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 overlords Uid pool create params +func (o *V1OverlordsUIDPoolCreateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 overlords Uid pool create params +func (o *V1OverlordsUIDPoolCreateParams) WithHTTPClient(client *http.Client) *V1OverlordsUIDPoolCreateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 overlords Uid pool create params +func (o *V1OverlordsUIDPoolCreateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 overlords Uid pool create params +func (o *V1OverlordsUIDPoolCreateParams) WithBody(body *models.V1IPPoolInputEntity) *V1OverlordsUIDPoolCreateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 overlords Uid pool create params +func (o *V1OverlordsUIDPoolCreateParams) SetBody(body *models.V1IPPoolInputEntity) { + o.Body = body +} + +// WithUID adds the uid to the v1 overlords Uid pool create params +func (o *V1OverlordsUIDPoolCreateParams) WithUID(uid string) *V1OverlordsUIDPoolCreateParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 overlords Uid pool create params +func (o *V1OverlordsUIDPoolCreateParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1OverlordsUIDPoolCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_overlords_uid_pool_create_responses.go b/api/client/v1/v1_overlords_uid_pool_create_responses.go new file mode 100644 index 00000000..b95693bd --- /dev/null +++ b/api/client/v1/v1_overlords_uid_pool_create_responses.go @@ -0,0 +1,77 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1OverlordsUIDPoolCreateReader is a Reader for the V1OverlordsUIDPoolCreate structure. +type V1OverlordsUIDPoolCreateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1OverlordsUIDPoolCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 201: + result := NewV1OverlordsUIDPoolCreateCreated() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1OverlordsUIDPoolCreateCreated creates a V1OverlordsUIDPoolCreateCreated with default headers values +func NewV1OverlordsUIDPoolCreateCreated() *V1OverlordsUIDPoolCreateCreated { + return &V1OverlordsUIDPoolCreateCreated{} +} + +/* +V1OverlordsUIDPoolCreateCreated handles this case with default header values. + +Created successfully +*/ +type V1OverlordsUIDPoolCreateCreated struct { + /*Audit uid for the request + */ + AuditUID string + + Payload *models.V1UID +} + +func (o *V1OverlordsUIDPoolCreateCreated) Error() string { + return fmt.Sprintf("[POST /v1/overlords/vsphere/{uid}/pools][%d] v1OverlordsUidPoolCreateCreated %+v", 201, o.Payload) +} + +func (o *V1OverlordsUIDPoolCreateCreated) GetPayload() *models.V1UID { + return o.Payload +} + +func (o *V1OverlordsUIDPoolCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header AuditUid + o.AuditUID = response.GetHeader("AuditUid") + + o.Payload = new(models.V1UID) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_overlords_uid_pool_delete_parameters.go b/api/client/v1/v1_overlords_uid_pool_delete_parameters.go new file mode 100644 index 00000000..9a8caf36 --- /dev/null +++ b/api/client/v1/v1_overlords_uid_pool_delete_parameters.go @@ -0,0 +1,151 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1OverlordsUIDPoolDeleteParams creates a new V1OverlordsUIDPoolDeleteParams object +// with the default values initialized. +func NewV1OverlordsUIDPoolDeleteParams() *V1OverlordsUIDPoolDeleteParams { + var () + return &V1OverlordsUIDPoolDeleteParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1OverlordsUIDPoolDeleteParamsWithTimeout creates a new V1OverlordsUIDPoolDeleteParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1OverlordsUIDPoolDeleteParamsWithTimeout(timeout time.Duration) *V1OverlordsUIDPoolDeleteParams { + var () + return &V1OverlordsUIDPoolDeleteParams{ + + timeout: timeout, + } +} + +// NewV1OverlordsUIDPoolDeleteParamsWithContext creates a new V1OverlordsUIDPoolDeleteParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1OverlordsUIDPoolDeleteParamsWithContext(ctx context.Context) *V1OverlordsUIDPoolDeleteParams { + var () + return &V1OverlordsUIDPoolDeleteParams{ + + Context: ctx, + } +} + +// NewV1OverlordsUIDPoolDeleteParamsWithHTTPClient creates a new V1OverlordsUIDPoolDeleteParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1OverlordsUIDPoolDeleteParamsWithHTTPClient(client *http.Client) *V1OverlordsUIDPoolDeleteParams { + var () + return &V1OverlordsUIDPoolDeleteParams{ + HTTPClient: client, + } +} + +/* +V1OverlordsUIDPoolDeleteParams contains all the parameters to send to the API endpoint +for the v1 overlords Uid pool delete operation typically these are written to a http.Request +*/ +type V1OverlordsUIDPoolDeleteParams struct { + + /*PoolUID*/ + PoolUID string + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 overlords Uid pool delete params +func (o *V1OverlordsUIDPoolDeleteParams) WithTimeout(timeout time.Duration) *V1OverlordsUIDPoolDeleteParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 overlords Uid pool delete params +func (o *V1OverlordsUIDPoolDeleteParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 overlords Uid pool delete params +func (o *V1OverlordsUIDPoolDeleteParams) WithContext(ctx context.Context) *V1OverlordsUIDPoolDeleteParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 overlords Uid pool delete params +func (o *V1OverlordsUIDPoolDeleteParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 overlords Uid pool delete params +func (o *V1OverlordsUIDPoolDeleteParams) WithHTTPClient(client *http.Client) *V1OverlordsUIDPoolDeleteParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 overlords Uid pool delete params +func (o *V1OverlordsUIDPoolDeleteParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithPoolUID adds the poolUID to the v1 overlords Uid pool delete params +func (o *V1OverlordsUIDPoolDeleteParams) WithPoolUID(poolUID string) *V1OverlordsUIDPoolDeleteParams { + o.SetPoolUID(poolUID) + return o +} + +// SetPoolUID adds the poolUid to the v1 overlords Uid pool delete params +func (o *V1OverlordsUIDPoolDeleteParams) SetPoolUID(poolUID string) { + o.PoolUID = poolUID +} + +// WithUID adds the uid to the v1 overlords Uid pool delete params +func (o *V1OverlordsUIDPoolDeleteParams) WithUID(uid string) *V1OverlordsUIDPoolDeleteParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 overlords Uid pool delete params +func (o *V1OverlordsUIDPoolDeleteParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1OverlordsUIDPoolDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param poolUid + if err := r.SetPathParam("poolUid", o.PoolUID); err != nil { + return err + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_overlords_uid_pool_delete_responses.go b/api/client/v1/v1_overlords_uid_pool_delete_responses.go new file mode 100644 index 00000000..dc1abdc5 --- /dev/null +++ b/api/client/v1/v1_overlords_uid_pool_delete_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1OverlordsUIDPoolDeleteReader is a Reader for the V1OverlordsUIDPoolDelete structure. +type V1OverlordsUIDPoolDeleteReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1OverlordsUIDPoolDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1OverlordsUIDPoolDeleteNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1OverlordsUIDPoolDeleteNoContent creates a V1OverlordsUIDPoolDeleteNoContent with default headers values +func NewV1OverlordsUIDPoolDeleteNoContent() *V1OverlordsUIDPoolDeleteNoContent { + return &V1OverlordsUIDPoolDeleteNoContent{} +} + +/* +V1OverlordsUIDPoolDeleteNoContent handles this case with default header values. + +The resource was deleted successfully +*/ +type V1OverlordsUIDPoolDeleteNoContent struct { +} + +func (o *V1OverlordsUIDPoolDeleteNoContent) Error() string { + return fmt.Sprintf("[DELETE /v1/overlords/vsphere/{uid}/pools/{poolUid}][%d] v1OverlordsUidPoolDeleteNoContent ", 204) +} + +func (o *V1OverlordsUIDPoolDeleteNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_overlords_uid_pool_update_parameters.go b/api/client/v1/v1_overlords_uid_pool_update_parameters.go new file mode 100644 index 00000000..4e9eec6a --- /dev/null +++ b/api/client/v1/v1_overlords_uid_pool_update_parameters.go @@ -0,0 +1,172 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1OverlordsUIDPoolUpdateParams creates a new V1OverlordsUIDPoolUpdateParams object +// with the default values initialized. +func NewV1OverlordsUIDPoolUpdateParams() *V1OverlordsUIDPoolUpdateParams { + var () + return &V1OverlordsUIDPoolUpdateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1OverlordsUIDPoolUpdateParamsWithTimeout creates a new V1OverlordsUIDPoolUpdateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1OverlordsUIDPoolUpdateParamsWithTimeout(timeout time.Duration) *V1OverlordsUIDPoolUpdateParams { + var () + return &V1OverlordsUIDPoolUpdateParams{ + + timeout: timeout, + } +} + +// NewV1OverlordsUIDPoolUpdateParamsWithContext creates a new V1OverlordsUIDPoolUpdateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1OverlordsUIDPoolUpdateParamsWithContext(ctx context.Context) *V1OverlordsUIDPoolUpdateParams { + var () + return &V1OverlordsUIDPoolUpdateParams{ + + Context: ctx, + } +} + +// NewV1OverlordsUIDPoolUpdateParamsWithHTTPClient creates a new V1OverlordsUIDPoolUpdateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1OverlordsUIDPoolUpdateParamsWithHTTPClient(client *http.Client) *V1OverlordsUIDPoolUpdateParams { + var () + return &V1OverlordsUIDPoolUpdateParams{ + HTTPClient: client, + } +} + +/* +V1OverlordsUIDPoolUpdateParams contains all the parameters to send to the API endpoint +for the v1 overlords Uid pool update operation typically these are written to a http.Request +*/ +type V1OverlordsUIDPoolUpdateParams struct { + + /*Body*/ + Body *models.V1IPPoolInputEntity + /*PoolUID*/ + PoolUID string + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 overlords Uid pool update params +func (o *V1OverlordsUIDPoolUpdateParams) WithTimeout(timeout time.Duration) *V1OverlordsUIDPoolUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 overlords Uid pool update params +func (o *V1OverlordsUIDPoolUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 overlords Uid pool update params +func (o *V1OverlordsUIDPoolUpdateParams) WithContext(ctx context.Context) *V1OverlordsUIDPoolUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 overlords Uid pool update params +func (o *V1OverlordsUIDPoolUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 overlords Uid pool update params +func (o *V1OverlordsUIDPoolUpdateParams) WithHTTPClient(client *http.Client) *V1OverlordsUIDPoolUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 overlords Uid pool update params +func (o *V1OverlordsUIDPoolUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 overlords Uid pool update params +func (o *V1OverlordsUIDPoolUpdateParams) WithBody(body *models.V1IPPoolInputEntity) *V1OverlordsUIDPoolUpdateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 overlords Uid pool update params +func (o *V1OverlordsUIDPoolUpdateParams) SetBody(body *models.V1IPPoolInputEntity) { + o.Body = body +} + +// WithPoolUID adds the poolUID to the v1 overlords Uid pool update params +func (o *V1OverlordsUIDPoolUpdateParams) WithPoolUID(poolUID string) *V1OverlordsUIDPoolUpdateParams { + o.SetPoolUID(poolUID) + return o +} + +// SetPoolUID adds the poolUid to the v1 overlords Uid pool update params +func (o *V1OverlordsUIDPoolUpdateParams) SetPoolUID(poolUID string) { + o.PoolUID = poolUID +} + +// WithUID adds the uid to the v1 overlords Uid pool update params +func (o *V1OverlordsUIDPoolUpdateParams) WithUID(uid string) *V1OverlordsUIDPoolUpdateParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 overlords Uid pool update params +func (o *V1OverlordsUIDPoolUpdateParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1OverlordsUIDPoolUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param poolUid + if err := r.SetPathParam("poolUid", o.PoolUID); err != nil { + return err + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_overlords_uid_pool_update_responses.go b/api/client/v1/v1_overlords_uid_pool_update_responses.go new file mode 100644 index 00000000..5deeb154 --- /dev/null +++ b/api/client/v1/v1_overlords_uid_pool_update_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1OverlordsUIDPoolUpdateReader is a Reader for the V1OverlordsUIDPoolUpdate structure. +type V1OverlordsUIDPoolUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1OverlordsUIDPoolUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1OverlordsUIDPoolUpdateNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1OverlordsUIDPoolUpdateNoContent creates a V1OverlordsUIDPoolUpdateNoContent with default headers values +func NewV1OverlordsUIDPoolUpdateNoContent() *V1OverlordsUIDPoolUpdateNoContent { + return &V1OverlordsUIDPoolUpdateNoContent{} +} + +/* +V1OverlordsUIDPoolUpdateNoContent handles this case with default header values. + +The resource was updated successfully +*/ +type V1OverlordsUIDPoolUpdateNoContent struct { +} + +func (o *V1OverlordsUIDPoolUpdateNoContent) Error() string { + return fmt.Sprintf("[PUT /v1/overlords/vsphere/{uid}/pools/{poolUid}][%d] v1OverlordsUidPoolUpdateNoContent ", 204) +} + +func (o *V1OverlordsUIDPoolUpdateNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_overlords_uid_pools_list_parameters.go b/api/client/v1/v1_overlords_uid_pools_list_parameters.go new file mode 100644 index 00000000..b55a0d2e --- /dev/null +++ b/api/client/v1/v1_overlords_uid_pools_list_parameters.go @@ -0,0 +1,133 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1OverlordsUIDPoolsListParams creates a new V1OverlordsUIDPoolsListParams object +// with the default values initialized. +func NewV1OverlordsUIDPoolsListParams() *V1OverlordsUIDPoolsListParams { + var () + return &V1OverlordsUIDPoolsListParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1OverlordsUIDPoolsListParamsWithTimeout creates a new V1OverlordsUIDPoolsListParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1OverlordsUIDPoolsListParamsWithTimeout(timeout time.Duration) *V1OverlordsUIDPoolsListParams { + var () + return &V1OverlordsUIDPoolsListParams{ + + timeout: timeout, + } +} + +// NewV1OverlordsUIDPoolsListParamsWithContext creates a new V1OverlordsUIDPoolsListParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1OverlordsUIDPoolsListParamsWithContext(ctx context.Context) *V1OverlordsUIDPoolsListParams { + var () + return &V1OverlordsUIDPoolsListParams{ + + Context: ctx, + } +} + +// NewV1OverlordsUIDPoolsListParamsWithHTTPClient creates a new V1OverlordsUIDPoolsListParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1OverlordsUIDPoolsListParamsWithHTTPClient(client *http.Client) *V1OverlordsUIDPoolsListParams { + var () + return &V1OverlordsUIDPoolsListParams{ + HTTPClient: client, + } +} + +/* +V1OverlordsUIDPoolsListParams contains all the parameters to send to the API endpoint +for the v1 overlords Uid pools list operation typically these are written to a http.Request +*/ +type V1OverlordsUIDPoolsListParams struct { + + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 overlords Uid pools list params +func (o *V1OverlordsUIDPoolsListParams) WithTimeout(timeout time.Duration) *V1OverlordsUIDPoolsListParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 overlords Uid pools list params +func (o *V1OverlordsUIDPoolsListParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 overlords Uid pools list params +func (o *V1OverlordsUIDPoolsListParams) WithContext(ctx context.Context) *V1OverlordsUIDPoolsListParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 overlords Uid pools list params +func (o *V1OverlordsUIDPoolsListParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 overlords Uid pools list params +func (o *V1OverlordsUIDPoolsListParams) WithHTTPClient(client *http.Client) *V1OverlordsUIDPoolsListParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 overlords Uid pools list params +func (o *V1OverlordsUIDPoolsListParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithUID adds the uid to the v1 overlords Uid pools list params +func (o *V1OverlordsUIDPoolsListParams) WithUID(uid string) *V1OverlordsUIDPoolsListParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 overlords Uid pools list params +func (o *V1OverlordsUIDPoolsListParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1OverlordsUIDPoolsListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_overlords_uid_pools_list_responses.go b/api/client/v1/v1_overlords_uid_pools_list_responses.go new file mode 100644 index 00000000..b21568e4 --- /dev/null +++ b/api/client/v1/v1_overlords_uid_pools_list_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1OverlordsUIDPoolsListReader is a Reader for the V1OverlordsUIDPoolsList structure. +type V1OverlordsUIDPoolsListReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1OverlordsUIDPoolsListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1OverlordsUIDPoolsListOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1OverlordsUIDPoolsListOK creates a V1OverlordsUIDPoolsListOK with default headers values +func NewV1OverlordsUIDPoolsListOK() *V1OverlordsUIDPoolsListOK { + return &V1OverlordsUIDPoolsListOK{} +} + +/* +V1OverlordsUIDPoolsListOK handles this case with default header values. + +(empty) +*/ +type V1OverlordsUIDPoolsListOK struct { + Payload *models.V1IPPools +} + +func (o *V1OverlordsUIDPoolsListOK) Error() string { + return fmt.Sprintf("[GET /v1/overlords/vsphere/{uid}/pools][%d] v1OverlordsUidPoolsListOK %+v", 200, o.Payload) +} + +func (o *V1OverlordsUIDPoolsListOK) GetPayload() *models.V1IPPools { + return o.Payload +} + +func (o *V1OverlordsUIDPoolsListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1IPPools) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_overlords_uid_reset_parameters.go b/api/client/v1/v1_overlords_uid_reset_parameters.go new file mode 100644 index 00000000..c065ae48 --- /dev/null +++ b/api/client/v1/v1_overlords_uid_reset_parameters.go @@ -0,0 +1,133 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1OverlordsUIDResetParams creates a new V1OverlordsUIDResetParams object +// with the default values initialized. +func NewV1OverlordsUIDResetParams() *V1OverlordsUIDResetParams { + var () + return &V1OverlordsUIDResetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1OverlordsUIDResetParamsWithTimeout creates a new V1OverlordsUIDResetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1OverlordsUIDResetParamsWithTimeout(timeout time.Duration) *V1OverlordsUIDResetParams { + var () + return &V1OverlordsUIDResetParams{ + + timeout: timeout, + } +} + +// NewV1OverlordsUIDResetParamsWithContext creates a new V1OverlordsUIDResetParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1OverlordsUIDResetParamsWithContext(ctx context.Context) *V1OverlordsUIDResetParams { + var () + return &V1OverlordsUIDResetParams{ + + Context: ctx, + } +} + +// NewV1OverlordsUIDResetParamsWithHTTPClient creates a new V1OverlordsUIDResetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1OverlordsUIDResetParamsWithHTTPClient(client *http.Client) *V1OverlordsUIDResetParams { + var () + return &V1OverlordsUIDResetParams{ + HTTPClient: client, + } +} + +/* +V1OverlordsUIDResetParams contains all the parameters to send to the API endpoint +for the v1 overlords Uid reset operation typically these are written to a http.Request +*/ +type V1OverlordsUIDResetParams struct { + + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 overlords Uid reset params +func (o *V1OverlordsUIDResetParams) WithTimeout(timeout time.Duration) *V1OverlordsUIDResetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 overlords Uid reset params +func (o *V1OverlordsUIDResetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 overlords Uid reset params +func (o *V1OverlordsUIDResetParams) WithContext(ctx context.Context) *V1OverlordsUIDResetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 overlords Uid reset params +func (o *V1OverlordsUIDResetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 overlords Uid reset params +func (o *V1OverlordsUIDResetParams) WithHTTPClient(client *http.Client) *V1OverlordsUIDResetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 overlords Uid reset params +func (o *V1OverlordsUIDResetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithUID adds the uid to the v1 overlords Uid reset params +func (o *V1OverlordsUIDResetParams) WithUID(uid string) *V1OverlordsUIDResetParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 overlords Uid reset params +func (o *V1OverlordsUIDResetParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1OverlordsUIDResetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_overlords_uid_reset_responses.go b/api/client/v1/v1_overlords_uid_reset_responses.go new file mode 100644 index 00000000..40877249 --- /dev/null +++ b/api/client/v1/v1_overlords_uid_reset_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1OverlordsUIDResetReader is a Reader for the V1OverlordsUIDReset structure. +type V1OverlordsUIDResetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1OverlordsUIDResetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1OverlordsUIDResetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1OverlordsUIDResetOK creates a V1OverlordsUIDResetOK with default headers values +func NewV1OverlordsUIDResetOK() *V1OverlordsUIDResetOK { + return &V1OverlordsUIDResetOK{} +} + +/* +V1OverlordsUIDResetOK handles this case with default header values. + +(empty) +*/ +type V1OverlordsUIDResetOK struct { + Payload *models.V1UpdatedMsg +} + +func (o *V1OverlordsUIDResetOK) Error() string { + return fmt.Sprintf("[PUT /v1/overlords/{uid}/reset][%d] v1OverlordsUidResetOK %+v", 200, o.Payload) +} + +func (o *V1OverlordsUIDResetOK) GetPayload() *models.V1UpdatedMsg { + return o.Payload +} + +func (o *V1OverlordsUIDResetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1UpdatedMsg) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_overlords_uid_vsphere_account_create_parameters.go b/api/client/v1/v1_overlords_uid_vsphere_account_create_parameters.go new file mode 100644 index 00000000..c6226784 --- /dev/null +++ b/api/client/v1/v1_overlords_uid_vsphere_account_create_parameters.go @@ -0,0 +1,154 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1OverlordsUIDVsphereAccountCreateParams creates a new V1OverlordsUIDVsphereAccountCreateParams object +// with the default values initialized. +func NewV1OverlordsUIDVsphereAccountCreateParams() *V1OverlordsUIDVsphereAccountCreateParams { + var () + return &V1OverlordsUIDVsphereAccountCreateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1OverlordsUIDVsphereAccountCreateParamsWithTimeout creates a new V1OverlordsUIDVsphereAccountCreateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1OverlordsUIDVsphereAccountCreateParamsWithTimeout(timeout time.Duration) *V1OverlordsUIDVsphereAccountCreateParams { + var () + return &V1OverlordsUIDVsphereAccountCreateParams{ + + timeout: timeout, + } +} + +// NewV1OverlordsUIDVsphereAccountCreateParamsWithContext creates a new V1OverlordsUIDVsphereAccountCreateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1OverlordsUIDVsphereAccountCreateParamsWithContext(ctx context.Context) *V1OverlordsUIDVsphereAccountCreateParams { + var () + return &V1OverlordsUIDVsphereAccountCreateParams{ + + Context: ctx, + } +} + +// NewV1OverlordsUIDVsphereAccountCreateParamsWithHTTPClient creates a new V1OverlordsUIDVsphereAccountCreateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1OverlordsUIDVsphereAccountCreateParamsWithHTTPClient(client *http.Client) *V1OverlordsUIDVsphereAccountCreateParams { + var () + return &V1OverlordsUIDVsphereAccountCreateParams{ + HTTPClient: client, + } +} + +/* +V1OverlordsUIDVsphereAccountCreateParams contains all the parameters to send to the API endpoint +for the v1 overlords Uid vsphere account create operation typically these are written to a http.Request +*/ +type V1OverlordsUIDVsphereAccountCreateParams struct { + + /*Body*/ + Body *models.V1OverlordVsphereAccountCreate + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 overlords Uid vsphere account create params +func (o *V1OverlordsUIDVsphereAccountCreateParams) WithTimeout(timeout time.Duration) *V1OverlordsUIDVsphereAccountCreateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 overlords Uid vsphere account create params +func (o *V1OverlordsUIDVsphereAccountCreateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 overlords Uid vsphere account create params +func (o *V1OverlordsUIDVsphereAccountCreateParams) WithContext(ctx context.Context) *V1OverlordsUIDVsphereAccountCreateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 overlords Uid vsphere account create params +func (o *V1OverlordsUIDVsphereAccountCreateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 overlords Uid vsphere account create params +func (o *V1OverlordsUIDVsphereAccountCreateParams) WithHTTPClient(client *http.Client) *V1OverlordsUIDVsphereAccountCreateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 overlords Uid vsphere account create params +func (o *V1OverlordsUIDVsphereAccountCreateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 overlords Uid vsphere account create params +func (o *V1OverlordsUIDVsphereAccountCreateParams) WithBody(body *models.V1OverlordVsphereAccountCreate) *V1OverlordsUIDVsphereAccountCreateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 overlords Uid vsphere account create params +func (o *V1OverlordsUIDVsphereAccountCreateParams) SetBody(body *models.V1OverlordVsphereAccountCreate) { + o.Body = body +} + +// WithUID adds the uid to the v1 overlords Uid vsphere account create params +func (o *V1OverlordsUIDVsphereAccountCreateParams) WithUID(uid string) *V1OverlordsUIDVsphereAccountCreateParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 overlords Uid vsphere account create params +func (o *V1OverlordsUIDVsphereAccountCreateParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1OverlordsUIDVsphereAccountCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_overlords_uid_vsphere_account_create_responses.go b/api/client/v1/v1_overlords_uid_vsphere_account_create_responses.go new file mode 100644 index 00000000..7dd2db1b --- /dev/null +++ b/api/client/v1/v1_overlords_uid_vsphere_account_create_responses.go @@ -0,0 +1,77 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1OverlordsUIDVsphereAccountCreateReader is a Reader for the V1OverlordsUIDVsphereAccountCreate structure. +type V1OverlordsUIDVsphereAccountCreateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1OverlordsUIDVsphereAccountCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 201: + result := NewV1OverlordsUIDVsphereAccountCreateCreated() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1OverlordsUIDVsphereAccountCreateCreated creates a V1OverlordsUIDVsphereAccountCreateCreated with default headers values +func NewV1OverlordsUIDVsphereAccountCreateCreated() *V1OverlordsUIDVsphereAccountCreateCreated { + return &V1OverlordsUIDVsphereAccountCreateCreated{} +} + +/* +V1OverlordsUIDVsphereAccountCreateCreated handles this case with default header values. + +Created successfully +*/ +type V1OverlordsUIDVsphereAccountCreateCreated struct { + /*Audit uid for the request + */ + AuditUID string + + Payload *models.V1UID +} + +func (o *V1OverlordsUIDVsphereAccountCreateCreated) Error() string { + return fmt.Sprintf("[POST /v1/overlords/vsphere/{uid}/account][%d] v1OverlordsUidVsphereAccountCreateCreated %+v", 201, o.Payload) +} + +func (o *V1OverlordsUIDVsphereAccountCreateCreated) GetPayload() *models.V1UID { + return o.Payload +} + +func (o *V1OverlordsUIDVsphereAccountCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header AuditUid + o.AuditUID = response.GetHeader("AuditUid") + + o.Payload = new(models.V1UID) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_overlords_uid_vsphere_account_update_parameters.go b/api/client/v1/v1_overlords_uid_vsphere_account_update_parameters.go new file mode 100644 index 00000000..84810b66 --- /dev/null +++ b/api/client/v1/v1_overlords_uid_vsphere_account_update_parameters.go @@ -0,0 +1,154 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1OverlordsUIDVsphereAccountUpdateParams creates a new V1OverlordsUIDVsphereAccountUpdateParams object +// with the default values initialized. +func NewV1OverlordsUIDVsphereAccountUpdateParams() *V1OverlordsUIDVsphereAccountUpdateParams { + var () + return &V1OverlordsUIDVsphereAccountUpdateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1OverlordsUIDVsphereAccountUpdateParamsWithTimeout creates a new V1OverlordsUIDVsphereAccountUpdateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1OverlordsUIDVsphereAccountUpdateParamsWithTimeout(timeout time.Duration) *V1OverlordsUIDVsphereAccountUpdateParams { + var () + return &V1OverlordsUIDVsphereAccountUpdateParams{ + + timeout: timeout, + } +} + +// NewV1OverlordsUIDVsphereAccountUpdateParamsWithContext creates a new V1OverlordsUIDVsphereAccountUpdateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1OverlordsUIDVsphereAccountUpdateParamsWithContext(ctx context.Context) *V1OverlordsUIDVsphereAccountUpdateParams { + var () + return &V1OverlordsUIDVsphereAccountUpdateParams{ + + Context: ctx, + } +} + +// NewV1OverlordsUIDVsphereAccountUpdateParamsWithHTTPClient creates a new V1OverlordsUIDVsphereAccountUpdateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1OverlordsUIDVsphereAccountUpdateParamsWithHTTPClient(client *http.Client) *V1OverlordsUIDVsphereAccountUpdateParams { + var () + return &V1OverlordsUIDVsphereAccountUpdateParams{ + HTTPClient: client, + } +} + +/* +V1OverlordsUIDVsphereAccountUpdateParams contains all the parameters to send to the API endpoint +for the v1 overlords Uid vsphere account update operation typically these are written to a http.Request +*/ +type V1OverlordsUIDVsphereAccountUpdateParams struct { + + /*Body*/ + Body *models.V1OverlordVsphereAccountEntity + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 overlords Uid vsphere account update params +func (o *V1OverlordsUIDVsphereAccountUpdateParams) WithTimeout(timeout time.Duration) *V1OverlordsUIDVsphereAccountUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 overlords Uid vsphere account update params +func (o *V1OverlordsUIDVsphereAccountUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 overlords Uid vsphere account update params +func (o *V1OverlordsUIDVsphereAccountUpdateParams) WithContext(ctx context.Context) *V1OverlordsUIDVsphereAccountUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 overlords Uid vsphere account update params +func (o *V1OverlordsUIDVsphereAccountUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 overlords Uid vsphere account update params +func (o *V1OverlordsUIDVsphereAccountUpdateParams) WithHTTPClient(client *http.Client) *V1OverlordsUIDVsphereAccountUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 overlords Uid vsphere account update params +func (o *V1OverlordsUIDVsphereAccountUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 overlords Uid vsphere account update params +func (o *V1OverlordsUIDVsphereAccountUpdateParams) WithBody(body *models.V1OverlordVsphereAccountEntity) *V1OverlordsUIDVsphereAccountUpdateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 overlords Uid vsphere account update params +func (o *V1OverlordsUIDVsphereAccountUpdateParams) SetBody(body *models.V1OverlordVsphereAccountEntity) { + o.Body = body +} + +// WithUID adds the uid to the v1 overlords Uid vsphere account update params +func (o *V1OverlordsUIDVsphereAccountUpdateParams) WithUID(uid string) *V1OverlordsUIDVsphereAccountUpdateParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 overlords Uid vsphere account update params +func (o *V1OverlordsUIDVsphereAccountUpdateParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1OverlordsUIDVsphereAccountUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_overlords_uid_vsphere_account_update_responses.go b/api/client/v1/v1_overlords_uid_vsphere_account_update_responses.go new file mode 100644 index 00000000..d296cd02 --- /dev/null +++ b/api/client/v1/v1_overlords_uid_vsphere_account_update_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1OverlordsUIDVsphereAccountUpdateReader is a Reader for the V1OverlordsUIDVsphereAccountUpdate structure. +type V1OverlordsUIDVsphereAccountUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1OverlordsUIDVsphereAccountUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1OverlordsUIDVsphereAccountUpdateNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1OverlordsUIDVsphereAccountUpdateNoContent creates a V1OverlordsUIDVsphereAccountUpdateNoContent with default headers values +func NewV1OverlordsUIDVsphereAccountUpdateNoContent() *V1OverlordsUIDVsphereAccountUpdateNoContent { + return &V1OverlordsUIDVsphereAccountUpdateNoContent{} +} + +/* +V1OverlordsUIDVsphereAccountUpdateNoContent handles this case with default header values. + +The resource was updated successfully +*/ +type V1OverlordsUIDVsphereAccountUpdateNoContent struct { +} + +func (o *V1OverlordsUIDVsphereAccountUpdateNoContent) Error() string { + return fmt.Sprintf("[PUT /v1/overlords/vsphere/{uid}/account][%d] v1OverlordsUidVsphereAccountUpdateNoContent ", 204) +} + +func (o *V1OverlordsUIDVsphereAccountUpdateNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_overlords_uid_vsphere_account_validate_parameters.go b/api/client/v1/v1_overlords_uid_vsphere_account_validate_parameters.go new file mode 100644 index 00000000..52b7c4cd --- /dev/null +++ b/api/client/v1/v1_overlords_uid_vsphere_account_validate_parameters.go @@ -0,0 +1,150 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1OverlordsUIDVsphereAccountValidateParams creates a new V1OverlordsUIDVsphereAccountValidateParams object +// with the default values initialized. +func NewV1OverlordsUIDVsphereAccountValidateParams() *V1OverlordsUIDVsphereAccountValidateParams { + var () + return &V1OverlordsUIDVsphereAccountValidateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1OverlordsUIDVsphereAccountValidateParamsWithTimeout creates a new V1OverlordsUIDVsphereAccountValidateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1OverlordsUIDVsphereAccountValidateParamsWithTimeout(timeout time.Duration) *V1OverlordsUIDVsphereAccountValidateParams { + var () + return &V1OverlordsUIDVsphereAccountValidateParams{ + + timeout: timeout, + } +} + +// NewV1OverlordsUIDVsphereAccountValidateParamsWithContext creates a new V1OverlordsUIDVsphereAccountValidateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1OverlordsUIDVsphereAccountValidateParamsWithContext(ctx context.Context) *V1OverlordsUIDVsphereAccountValidateParams { + var () + return &V1OverlordsUIDVsphereAccountValidateParams{ + + Context: ctx, + } +} + +// NewV1OverlordsUIDVsphereAccountValidateParamsWithHTTPClient creates a new V1OverlordsUIDVsphereAccountValidateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1OverlordsUIDVsphereAccountValidateParamsWithHTTPClient(client *http.Client) *V1OverlordsUIDVsphereAccountValidateParams { + var () + return &V1OverlordsUIDVsphereAccountValidateParams{ + HTTPClient: client, + } +} + +/* +V1OverlordsUIDVsphereAccountValidateParams contains all the parameters to send to the API endpoint +for the v1 overlords Uid vsphere account validate operation typically these are written to a http.Request +*/ +type V1OverlordsUIDVsphereAccountValidateParams struct { + + /*Body*/ + Body V1OverlordsUIDVsphereAccountValidateBody + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 overlords Uid vsphere account validate params +func (o *V1OverlordsUIDVsphereAccountValidateParams) WithTimeout(timeout time.Duration) *V1OverlordsUIDVsphereAccountValidateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 overlords Uid vsphere account validate params +func (o *V1OverlordsUIDVsphereAccountValidateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 overlords Uid vsphere account validate params +func (o *V1OverlordsUIDVsphereAccountValidateParams) WithContext(ctx context.Context) *V1OverlordsUIDVsphereAccountValidateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 overlords Uid vsphere account validate params +func (o *V1OverlordsUIDVsphereAccountValidateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 overlords Uid vsphere account validate params +func (o *V1OverlordsUIDVsphereAccountValidateParams) WithHTTPClient(client *http.Client) *V1OverlordsUIDVsphereAccountValidateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 overlords Uid vsphere account validate params +func (o *V1OverlordsUIDVsphereAccountValidateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 overlords Uid vsphere account validate params +func (o *V1OverlordsUIDVsphereAccountValidateParams) WithBody(body V1OverlordsUIDVsphereAccountValidateBody) *V1OverlordsUIDVsphereAccountValidateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 overlords Uid vsphere account validate params +func (o *V1OverlordsUIDVsphereAccountValidateParams) SetBody(body V1OverlordsUIDVsphereAccountValidateBody) { + o.Body = body +} + +// WithUID adds the uid to the v1 overlords Uid vsphere account validate params +func (o *V1OverlordsUIDVsphereAccountValidateParams) WithUID(uid string) *V1OverlordsUIDVsphereAccountValidateParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 overlords Uid vsphere account validate params +func (o *V1OverlordsUIDVsphereAccountValidateParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1OverlordsUIDVsphereAccountValidateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_overlords_uid_vsphere_account_validate_responses.go b/api/client/v1/v1_overlords_uid_vsphere_account_validate_responses.go new file mode 100644 index 00000000..72b9aaeb --- /dev/null +++ b/api/client/v1/v1_overlords_uid_vsphere_account_validate_responses.go @@ -0,0 +1,125 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1OverlordsUIDVsphereAccountValidateReader is a Reader for the V1OverlordsUIDVsphereAccountValidate structure. +type V1OverlordsUIDVsphereAccountValidateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1OverlordsUIDVsphereAccountValidateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1OverlordsUIDVsphereAccountValidateNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1OverlordsUIDVsphereAccountValidateNoContent creates a V1OverlordsUIDVsphereAccountValidateNoContent with default headers values +func NewV1OverlordsUIDVsphereAccountValidateNoContent() *V1OverlordsUIDVsphereAccountValidateNoContent { + return &V1OverlordsUIDVsphereAccountValidateNoContent{} +} + +/* +V1OverlordsUIDVsphereAccountValidateNoContent handles this case with default header values. + +Ok response without content +*/ +type V1OverlordsUIDVsphereAccountValidateNoContent struct { + /*Audit uid for the request + */ + AuditUID string +} + +func (o *V1OverlordsUIDVsphereAccountValidateNoContent) Error() string { + return fmt.Sprintf("[POST /v1/overlords/vsphere/{uid}/account/validate][%d] v1OverlordsUidVsphereAccountValidateNoContent ", 204) +} + +func (o *V1OverlordsUIDVsphereAccountValidateNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header AuditUid + o.AuditUID = response.GetHeader("AuditUid") + + return nil +} + +/* +V1OverlordsUIDVsphereAccountValidateBody v1 overlords UID vsphere account validate body +swagger:model V1OverlordsUIDVsphereAccountValidateBody +*/ +type V1OverlordsUIDVsphereAccountValidateBody struct { + + // account + Account *models.V1VsphereCloudAccount `json:"account,omitempty"` +} + +// Validate validates this v1 overlords UID vsphere account validate body +func (o *V1OverlordsUIDVsphereAccountValidateBody) Validate(formats strfmt.Registry) error { + var res []error + + if err := o.validateAccount(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (o *V1OverlordsUIDVsphereAccountValidateBody) validateAccount(formats strfmt.Registry) error { + + if swag.IsZero(o.Account) { // not required + return nil + } + + if o.Account != nil { + if err := o.Account.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("body" + "." + "account") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (o *V1OverlordsUIDVsphereAccountValidateBody) MarshalBinary() ([]byte, error) { + if o == nil { + return nil, nil + } + return swag.WriteJSON(o) +} + +// UnmarshalBinary interface implementation +func (o *V1OverlordsUIDVsphereAccountValidateBody) UnmarshalBinary(b []byte) error { + var res V1OverlordsUIDVsphereAccountValidateBody + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *o = res + return nil +} diff --git a/api/client/v1/v1_overlords_uid_vsphere_cloud_config_create_parameters.go b/api/client/v1/v1_overlords_uid_vsphere_cloud_config_create_parameters.go new file mode 100644 index 00000000..293bd027 --- /dev/null +++ b/api/client/v1/v1_overlords_uid_vsphere_cloud_config_create_parameters.go @@ -0,0 +1,154 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1OverlordsUIDVsphereCloudConfigCreateParams creates a new V1OverlordsUIDVsphereCloudConfigCreateParams object +// with the default values initialized. +func NewV1OverlordsUIDVsphereCloudConfigCreateParams() *V1OverlordsUIDVsphereCloudConfigCreateParams { + var () + return &V1OverlordsUIDVsphereCloudConfigCreateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1OverlordsUIDVsphereCloudConfigCreateParamsWithTimeout creates a new V1OverlordsUIDVsphereCloudConfigCreateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1OverlordsUIDVsphereCloudConfigCreateParamsWithTimeout(timeout time.Duration) *V1OverlordsUIDVsphereCloudConfigCreateParams { + var () + return &V1OverlordsUIDVsphereCloudConfigCreateParams{ + + timeout: timeout, + } +} + +// NewV1OverlordsUIDVsphereCloudConfigCreateParamsWithContext creates a new V1OverlordsUIDVsphereCloudConfigCreateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1OverlordsUIDVsphereCloudConfigCreateParamsWithContext(ctx context.Context) *V1OverlordsUIDVsphereCloudConfigCreateParams { + var () + return &V1OverlordsUIDVsphereCloudConfigCreateParams{ + + Context: ctx, + } +} + +// NewV1OverlordsUIDVsphereCloudConfigCreateParamsWithHTTPClient creates a new V1OverlordsUIDVsphereCloudConfigCreateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1OverlordsUIDVsphereCloudConfigCreateParamsWithHTTPClient(client *http.Client) *V1OverlordsUIDVsphereCloudConfigCreateParams { + var () + return &V1OverlordsUIDVsphereCloudConfigCreateParams{ + HTTPClient: client, + } +} + +/* +V1OverlordsUIDVsphereCloudConfigCreateParams contains all the parameters to send to the API endpoint +for the v1 overlords Uid vsphere cloud config create operation typically these are written to a http.Request +*/ +type V1OverlordsUIDVsphereCloudConfigCreateParams struct { + + /*Body*/ + Body *models.V1OverlordVsphereCloudConfig + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 overlords Uid vsphere cloud config create params +func (o *V1OverlordsUIDVsphereCloudConfigCreateParams) WithTimeout(timeout time.Duration) *V1OverlordsUIDVsphereCloudConfigCreateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 overlords Uid vsphere cloud config create params +func (o *V1OverlordsUIDVsphereCloudConfigCreateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 overlords Uid vsphere cloud config create params +func (o *V1OverlordsUIDVsphereCloudConfigCreateParams) WithContext(ctx context.Context) *V1OverlordsUIDVsphereCloudConfigCreateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 overlords Uid vsphere cloud config create params +func (o *V1OverlordsUIDVsphereCloudConfigCreateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 overlords Uid vsphere cloud config create params +func (o *V1OverlordsUIDVsphereCloudConfigCreateParams) WithHTTPClient(client *http.Client) *V1OverlordsUIDVsphereCloudConfigCreateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 overlords Uid vsphere cloud config create params +func (o *V1OverlordsUIDVsphereCloudConfigCreateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 overlords Uid vsphere cloud config create params +func (o *V1OverlordsUIDVsphereCloudConfigCreateParams) WithBody(body *models.V1OverlordVsphereCloudConfig) *V1OverlordsUIDVsphereCloudConfigCreateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 overlords Uid vsphere cloud config create params +func (o *V1OverlordsUIDVsphereCloudConfigCreateParams) SetBody(body *models.V1OverlordVsphereCloudConfig) { + o.Body = body +} + +// WithUID adds the uid to the v1 overlords Uid vsphere cloud config create params +func (o *V1OverlordsUIDVsphereCloudConfigCreateParams) WithUID(uid string) *V1OverlordsUIDVsphereCloudConfigCreateParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 overlords Uid vsphere cloud config create params +func (o *V1OverlordsUIDVsphereCloudConfigCreateParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1OverlordsUIDVsphereCloudConfigCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_overlords_uid_vsphere_cloud_config_create_responses.go b/api/client/v1/v1_overlords_uid_vsphere_cloud_config_create_responses.go new file mode 100644 index 00000000..e2073eee --- /dev/null +++ b/api/client/v1/v1_overlords_uid_vsphere_cloud_config_create_responses.go @@ -0,0 +1,77 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1OverlordsUIDVsphereCloudConfigCreateReader is a Reader for the V1OverlordsUIDVsphereCloudConfigCreate structure. +type V1OverlordsUIDVsphereCloudConfigCreateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1OverlordsUIDVsphereCloudConfigCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 201: + result := NewV1OverlordsUIDVsphereCloudConfigCreateCreated() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1OverlordsUIDVsphereCloudConfigCreateCreated creates a V1OverlordsUIDVsphereCloudConfigCreateCreated with default headers values +func NewV1OverlordsUIDVsphereCloudConfigCreateCreated() *V1OverlordsUIDVsphereCloudConfigCreateCreated { + return &V1OverlordsUIDVsphereCloudConfigCreateCreated{} +} + +/* +V1OverlordsUIDVsphereCloudConfigCreateCreated handles this case with default header values. + +Created successfully +*/ +type V1OverlordsUIDVsphereCloudConfigCreateCreated struct { + /*Audit uid for the request + */ + AuditUID string + + Payload *models.V1UID +} + +func (o *V1OverlordsUIDVsphereCloudConfigCreateCreated) Error() string { + return fmt.Sprintf("[POST /v1/overlords/vsphere/{uid}/cloudconfig][%d] v1OverlordsUidVsphereCloudConfigCreateCreated %+v", 201, o.Payload) +} + +func (o *V1OverlordsUIDVsphereCloudConfigCreateCreated) GetPayload() *models.V1UID { + return o.Payload +} + +func (o *V1OverlordsUIDVsphereCloudConfigCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header AuditUid + o.AuditUID = response.GetHeader("AuditUid") + + o.Payload = new(models.V1UID) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_overlords_uid_vsphere_cloud_config_update_parameters.go b/api/client/v1/v1_overlords_uid_vsphere_cloud_config_update_parameters.go new file mode 100644 index 00000000..efcb61dc --- /dev/null +++ b/api/client/v1/v1_overlords_uid_vsphere_cloud_config_update_parameters.go @@ -0,0 +1,154 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1OverlordsUIDVsphereCloudConfigUpdateParams creates a new V1OverlordsUIDVsphereCloudConfigUpdateParams object +// with the default values initialized. +func NewV1OverlordsUIDVsphereCloudConfigUpdateParams() *V1OverlordsUIDVsphereCloudConfigUpdateParams { + var () + return &V1OverlordsUIDVsphereCloudConfigUpdateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1OverlordsUIDVsphereCloudConfigUpdateParamsWithTimeout creates a new V1OverlordsUIDVsphereCloudConfigUpdateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1OverlordsUIDVsphereCloudConfigUpdateParamsWithTimeout(timeout time.Duration) *V1OverlordsUIDVsphereCloudConfigUpdateParams { + var () + return &V1OverlordsUIDVsphereCloudConfigUpdateParams{ + + timeout: timeout, + } +} + +// NewV1OverlordsUIDVsphereCloudConfigUpdateParamsWithContext creates a new V1OverlordsUIDVsphereCloudConfigUpdateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1OverlordsUIDVsphereCloudConfigUpdateParamsWithContext(ctx context.Context) *V1OverlordsUIDVsphereCloudConfigUpdateParams { + var () + return &V1OverlordsUIDVsphereCloudConfigUpdateParams{ + + Context: ctx, + } +} + +// NewV1OverlordsUIDVsphereCloudConfigUpdateParamsWithHTTPClient creates a new V1OverlordsUIDVsphereCloudConfigUpdateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1OverlordsUIDVsphereCloudConfigUpdateParamsWithHTTPClient(client *http.Client) *V1OverlordsUIDVsphereCloudConfigUpdateParams { + var () + return &V1OverlordsUIDVsphereCloudConfigUpdateParams{ + HTTPClient: client, + } +} + +/* +V1OverlordsUIDVsphereCloudConfigUpdateParams contains all the parameters to send to the API endpoint +for the v1 overlords Uid vsphere cloud config update operation typically these are written to a http.Request +*/ +type V1OverlordsUIDVsphereCloudConfigUpdateParams struct { + + /*Body*/ + Body *models.V1OverlordVsphereCloudConfig + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 overlords Uid vsphere cloud config update params +func (o *V1OverlordsUIDVsphereCloudConfigUpdateParams) WithTimeout(timeout time.Duration) *V1OverlordsUIDVsphereCloudConfigUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 overlords Uid vsphere cloud config update params +func (o *V1OverlordsUIDVsphereCloudConfigUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 overlords Uid vsphere cloud config update params +func (o *V1OverlordsUIDVsphereCloudConfigUpdateParams) WithContext(ctx context.Context) *V1OverlordsUIDVsphereCloudConfigUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 overlords Uid vsphere cloud config update params +func (o *V1OverlordsUIDVsphereCloudConfigUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 overlords Uid vsphere cloud config update params +func (o *V1OverlordsUIDVsphereCloudConfigUpdateParams) WithHTTPClient(client *http.Client) *V1OverlordsUIDVsphereCloudConfigUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 overlords Uid vsphere cloud config update params +func (o *V1OverlordsUIDVsphereCloudConfigUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 overlords Uid vsphere cloud config update params +func (o *V1OverlordsUIDVsphereCloudConfigUpdateParams) WithBody(body *models.V1OverlordVsphereCloudConfig) *V1OverlordsUIDVsphereCloudConfigUpdateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 overlords Uid vsphere cloud config update params +func (o *V1OverlordsUIDVsphereCloudConfigUpdateParams) SetBody(body *models.V1OverlordVsphereCloudConfig) { + o.Body = body +} + +// WithUID adds the uid to the v1 overlords Uid vsphere cloud config update params +func (o *V1OverlordsUIDVsphereCloudConfigUpdateParams) WithUID(uid string) *V1OverlordsUIDVsphereCloudConfigUpdateParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 overlords Uid vsphere cloud config update params +func (o *V1OverlordsUIDVsphereCloudConfigUpdateParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1OverlordsUIDVsphereCloudConfigUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_overlords_uid_vsphere_cloud_config_update_responses.go b/api/client/v1/v1_overlords_uid_vsphere_cloud_config_update_responses.go new file mode 100644 index 00000000..2c789827 --- /dev/null +++ b/api/client/v1/v1_overlords_uid_vsphere_cloud_config_update_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1OverlordsUIDVsphereCloudConfigUpdateReader is a Reader for the V1OverlordsUIDVsphereCloudConfigUpdate structure. +type V1OverlordsUIDVsphereCloudConfigUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1OverlordsUIDVsphereCloudConfigUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1OverlordsUIDVsphereCloudConfigUpdateNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1OverlordsUIDVsphereCloudConfigUpdateNoContent creates a V1OverlordsUIDVsphereCloudConfigUpdateNoContent with default headers values +func NewV1OverlordsUIDVsphereCloudConfigUpdateNoContent() *V1OverlordsUIDVsphereCloudConfigUpdateNoContent { + return &V1OverlordsUIDVsphereCloudConfigUpdateNoContent{} +} + +/* +V1OverlordsUIDVsphereCloudConfigUpdateNoContent handles this case with default header values. + +The resource was updated successfully +*/ +type V1OverlordsUIDVsphereCloudConfigUpdateNoContent struct { +} + +func (o *V1OverlordsUIDVsphereCloudConfigUpdateNoContent) Error() string { + return fmt.Sprintf("[PUT /v1/overlords/vsphere/{uid}/cloudconfig][%d] v1OverlordsUidVsphereCloudConfigUpdateNoContent ", 204) +} + +func (o *V1OverlordsUIDVsphereCloudConfigUpdateNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_overlords_uid_vsphere_cluster_profile_parameters.go b/api/client/v1/v1_overlords_uid_vsphere_cluster_profile_parameters.go new file mode 100644 index 00000000..be0639e6 --- /dev/null +++ b/api/client/v1/v1_overlords_uid_vsphere_cluster_profile_parameters.go @@ -0,0 +1,133 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1OverlordsUIDVsphereClusterProfileParams creates a new V1OverlordsUIDVsphereClusterProfileParams object +// with the default values initialized. +func NewV1OverlordsUIDVsphereClusterProfileParams() *V1OverlordsUIDVsphereClusterProfileParams { + var () + return &V1OverlordsUIDVsphereClusterProfileParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1OverlordsUIDVsphereClusterProfileParamsWithTimeout creates a new V1OverlordsUIDVsphereClusterProfileParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1OverlordsUIDVsphereClusterProfileParamsWithTimeout(timeout time.Duration) *V1OverlordsUIDVsphereClusterProfileParams { + var () + return &V1OverlordsUIDVsphereClusterProfileParams{ + + timeout: timeout, + } +} + +// NewV1OverlordsUIDVsphereClusterProfileParamsWithContext creates a new V1OverlordsUIDVsphereClusterProfileParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1OverlordsUIDVsphereClusterProfileParamsWithContext(ctx context.Context) *V1OverlordsUIDVsphereClusterProfileParams { + var () + return &V1OverlordsUIDVsphereClusterProfileParams{ + + Context: ctx, + } +} + +// NewV1OverlordsUIDVsphereClusterProfileParamsWithHTTPClient creates a new V1OverlordsUIDVsphereClusterProfileParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1OverlordsUIDVsphereClusterProfileParamsWithHTTPClient(client *http.Client) *V1OverlordsUIDVsphereClusterProfileParams { + var () + return &V1OverlordsUIDVsphereClusterProfileParams{ + HTTPClient: client, + } +} + +/* +V1OverlordsUIDVsphereClusterProfileParams contains all the parameters to send to the API endpoint +for the v1 overlords Uid vsphere cluster profile operation typically these are written to a http.Request +*/ +type V1OverlordsUIDVsphereClusterProfileParams struct { + + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 overlords Uid vsphere cluster profile params +func (o *V1OverlordsUIDVsphereClusterProfileParams) WithTimeout(timeout time.Duration) *V1OverlordsUIDVsphereClusterProfileParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 overlords Uid vsphere cluster profile params +func (o *V1OverlordsUIDVsphereClusterProfileParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 overlords Uid vsphere cluster profile params +func (o *V1OverlordsUIDVsphereClusterProfileParams) WithContext(ctx context.Context) *V1OverlordsUIDVsphereClusterProfileParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 overlords Uid vsphere cluster profile params +func (o *V1OverlordsUIDVsphereClusterProfileParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 overlords Uid vsphere cluster profile params +func (o *V1OverlordsUIDVsphereClusterProfileParams) WithHTTPClient(client *http.Client) *V1OverlordsUIDVsphereClusterProfileParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 overlords Uid vsphere cluster profile params +func (o *V1OverlordsUIDVsphereClusterProfileParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithUID adds the uid to the v1 overlords Uid vsphere cluster profile params +func (o *V1OverlordsUIDVsphereClusterProfileParams) WithUID(uid string) *V1OverlordsUIDVsphereClusterProfileParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 overlords Uid vsphere cluster profile params +func (o *V1OverlordsUIDVsphereClusterProfileParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1OverlordsUIDVsphereClusterProfileParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_overlords_uid_vsphere_cluster_profile_responses.go b/api/client/v1/v1_overlords_uid_vsphere_cluster_profile_responses.go new file mode 100644 index 00000000..7f56e6d2 --- /dev/null +++ b/api/client/v1/v1_overlords_uid_vsphere_cluster_profile_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1OverlordsUIDVsphereClusterProfileReader is a Reader for the V1OverlordsUIDVsphereClusterProfile structure. +type V1OverlordsUIDVsphereClusterProfileReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1OverlordsUIDVsphereClusterProfileReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1OverlordsUIDVsphereClusterProfileOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1OverlordsUIDVsphereClusterProfileOK creates a V1OverlordsUIDVsphereClusterProfileOK with default headers values +func NewV1OverlordsUIDVsphereClusterProfileOK() *V1OverlordsUIDVsphereClusterProfileOK { + return &V1OverlordsUIDVsphereClusterProfileOK{} +} + +/* +V1OverlordsUIDVsphereClusterProfileOK handles this case with default header values. + +OK +*/ +type V1OverlordsUIDVsphereClusterProfileOK struct { + Payload *models.V1ClusterProfile +} + +func (o *V1OverlordsUIDVsphereClusterProfileOK) Error() string { + return fmt.Sprintf("[GET /v1/overlords/vsphere/{uid}/clusterprofile][%d] v1OverlordsUidVsphereClusterProfileOK %+v", 200, o.Payload) +} + +func (o *V1OverlordsUIDVsphereClusterProfileOK) GetPayload() *models.V1ClusterProfile { + return o.Payload +} + +func (o *V1OverlordsUIDVsphereClusterProfileOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1ClusterProfile) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_overlords_uid_vsphere_computecluster_res_parameters.go b/api/client/v1/v1_overlords_uid_vsphere_computecluster_res_parameters.go new file mode 100644 index 00000000..5e378fee --- /dev/null +++ b/api/client/v1/v1_overlords_uid_vsphere_computecluster_res_parameters.go @@ -0,0 +1,177 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1OverlordsUIDVsphereComputeclusterResParams creates a new V1OverlordsUIDVsphereComputeclusterResParams object +// with the default values initialized. +func NewV1OverlordsUIDVsphereComputeclusterResParams() *V1OverlordsUIDVsphereComputeclusterResParams { + var () + return &V1OverlordsUIDVsphereComputeclusterResParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1OverlordsUIDVsphereComputeclusterResParamsWithTimeout creates a new V1OverlordsUIDVsphereComputeclusterResParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1OverlordsUIDVsphereComputeclusterResParamsWithTimeout(timeout time.Duration) *V1OverlordsUIDVsphereComputeclusterResParams { + var () + return &V1OverlordsUIDVsphereComputeclusterResParams{ + + timeout: timeout, + } +} + +// NewV1OverlordsUIDVsphereComputeclusterResParamsWithContext creates a new V1OverlordsUIDVsphereComputeclusterResParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1OverlordsUIDVsphereComputeclusterResParamsWithContext(ctx context.Context) *V1OverlordsUIDVsphereComputeclusterResParams { + var () + return &V1OverlordsUIDVsphereComputeclusterResParams{ + + Context: ctx, + } +} + +// NewV1OverlordsUIDVsphereComputeclusterResParamsWithHTTPClient creates a new V1OverlordsUIDVsphereComputeclusterResParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1OverlordsUIDVsphereComputeclusterResParamsWithHTTPClient(client *http.Client) *V1OverlordsUIDVsphereComputeclusterResParams { + var () + return &V1OverlordsUIDVsphereComputeclusterResParams{ + HTTPClient: client, + } +} + +/* +V1OverlordsUIDVsphereComputeclusterResParams contains all the parameters to send to the API endpoint +for the v1 overlords Uid vsphere computecluster res operation typically these are written to a http.Request +*/ +type V1OverlordsUIDVsphereComputeclusterResParams struct { + + /*Computecluster*/ + Computecluster string + /*Datacenter*/ + Datacenter string + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 overlords Uid vsphere computecluster res params +func (o *V1OverlordsUIDVsphereComputeclusterResParams) WithTimeout(timeout time.Duration) *V1OverlordsUIDVsphereComputeclusterResParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 overlords Uid vsphere computecluster res params +func (o *V1OverlordsUIDVsphereComputeclusterResParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 overlords Uid vsphere computecluster res params +func (o *V1OverlordsUIDVsphereComputeclusterResParams) WithContext(ctx context.Context) *V1OverlordsUIDVsphereComputeclusterResParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 overlords Uid vsphere computecluster res params +func (o *V1OverlordsUIDVsphereComputeclusterResParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 overlords Uid vsphere computecluster res params +func (o *V1OverlordsUIDVsphereComputeclusterResParams) WithHTTPClient(client *http.Client) *V1OverlordsUIDVsphereComputeclusterResParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 overlords Uid vsphere computecluster res params +func (o *V1OverlordsUIDVsphereComputeclusterResParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithComputecluster adds the computecluster to the v1 overlords Uid vsphere computecluster res params +func (o *V1OverlordsUIDVsphereComputeclusterResParams) WithComputecluster(computecluster string) *V1OverlordsUIDVsphereComputeclusterResParams { + o.SetComputecluster(computecluster) + return o +} + +// SetComputecluster adds the computecluster to the v1 overlords Uid vsphere computecluster res params +func (o *V1OverlordsUIDVsphereComputeclusterResParams) SetComputecluster(computecluster string) { + o.Computecluster = computecluster +} + +// WithDatacenter adds the datacenter to the v1 overlords Uid vsphere computecluster res params +func (o *V1OverlordsUIDVsphereComputeclusterResParams) WithDatacenter(datacenter string) *V1OverlordsUIDVsphereComputeclusterResParams { + o.SetDatacenter(datacenter) + return o +} + +// SetDatacenter adds the datacenter to the v1 overlords Uid vsphere computecluster res params +func (o *V1OverlordsUIDVsphereComputeclusterResParams) SetDatacenter(datacenter string) { + o.Datacenter = datacenter +} + +// WithUID adds the uid to the v1 overlords Uid vsphere computecluster res params +func (o *V1OverlordsUIDVsphereComputeclusterResParams) WithUID(uid string) *V1OverlordsUIDVsphereComputeclusterResParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 overlords Uid vsphere computecluster res params +func (o *V1OverlordsUIDVsphereComputeclusterResParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1OverlordsUIDVsphereComputeclusterResParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // query param computecluster + qrComputecluster := o.Computecluster + qComputecluster := qrComputecluster + if qComputecluster != "" { + if err := r.SetQueryParam("computecluster", qComputecluster); err != nil { + return err + } + } + + // query param datacenter + qrDatacenter := o.Datacenter + qDatacenter := qrDatacenter + if qDatacenter != "" { + if err := r.SetQueryParam("datacenter", qDatacenter); err != nil { + return err + } + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_overlords_uid_vsphere_computecluster_res_responses.go b/api/client/v1/v1_overlords_uid_vsphere_computecluster_res_responses.go new file mode 100644 index 00000000..42edccf5 --- /dev/null +++ b/api/client/v1/v1_overlords_uid_vsphere_computecluster_res_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1OverlordsUIDVsphereComputeclusterResReader is a Reader for the V1OverlordsUIDVsphereComputeclusterRes structure. +type V1OverlordsUIDVsphereComputeclusterResReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1OverlordsUIDVsphereComputeclusterResReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1OverlordsUIDVsphereComputeclusterResOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1OverlordsUIDVsphereComputeclusterResOK creates a V1OverlordsUIDVsphereComputeclusterResOK with default headers values +func NewV1OverlordsUIDVsphereComputeclusterResOK() *V1OverlordsUIDVsphereComputeclusterResOK { + return &V1OverlordsUIDVsphereComputeclusterResOK{} +} + +/* +V1OverlordsUIDVsphereComputeclusterResOK handles this case with default header values. + +(empty) +*/ +type V1OverlordsUIDVsphereComputeclusterResOK struct { + Payload *models.V1VsphereComputeClusterResources +} + +func (o *V1OverlordsUIDVsphereComputeclusterResOK) Error() string { + return fmt.Sprintf("[GET /v1/overlords/vsphere/{uid}/properties/computecluster/resources][%d] v1OverlordsUidVsphereComputeclusterResOK %+v", 200, o.Payload) +} + +func (o *V1OverlordsUIDVsphereComputeclusterResOK) GetPayload() *models.V1VsphereComputeClusterResources { + return o.Payload +} + +func (o *V1OverlordsUIDVsphereComputeclusterResOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1VsphereComputeClusterResources) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_overlords_uid_vsphere_datacenters_parameters.go b/api/client/v1/v1_overlords_uid_vsphere_datacenters_parameters.go new file mode 100644 index 00000000..39dbda95 --- /dev/null +++ b/api/client/v1/v1_overlords_uid_vsphere_datacenters_parameters.go @@ -0,0 +1,133 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1OverlordsUIDVsphereDatacentersParams creates a new V1OverlordsUIDVsphereDatacentersParams object +// with the default values initialized. +func NewV1OverlordsUIDVsphereDatacentersParams() *V1OverlordsUIDVsphereDatacentersParams { + var () + return &V1OverlordsUIDVsphereDatacentersParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1OverlordsUIDVsphereDatacentersParamsWithTimeout creates a new V1OverlordsUIDVsphereDatacentersParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1OverlordsUIDVsphereDatacentersParamsWithTimeout(timeout time.Duration) *V1OverlordsUIDVsphereDatacentersParams { + var () + return &V1OverlordsUIDVsphereDatacentersParams{ + + timeout: timeout, + } +} + +// NewV1OverlordsUIDVsphereDatacentersParamsWithContext creates a new V1OverlordsUIDVsphereDatacentersParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1OverlordsUIDVsphereDatacentersParamsWithContext(ctx context.Context) *V1OverlordsUIDVsphereDatacentersParams { + var () + return &V1OverlordsUIDVsphereDatacentersParams{ + + Context: ctx, + } +} + +// NewV1OverlordsUIDVsphereDatacentersParamsWithHTTPClient creates a new V1OverlordsUIDVsphereDatacentersParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1OverlordsUIDVsphereDatacentersParamsWithHTTPClient(client *http.Client) *V1OverlordsUIDVsphereDatacentersParams { + var () + return &V1OverlordsUIDVsphereDatacentersParams{ + HTTPClient: client, + } +} + +/* +V1OverlordsUIDVsphereDatacentersParams contains all the parameters to send to the API endpoint +for the v1 overlords Uid vsphere datacenters operation typically these are written to a http.Request +*/ +type V1OverlordsUIDVsphereDatacentersParams struct { + + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 overlords Uid vsphere datacenters params +func (o *V1OverlordsUIDVsphereDatacentersParams) WithTimeout(timeout time.Duration) *V1OverlordsUIDVsphereDatacentersParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 overlords Uid vsphere datacenters params +func (o *V1OverlordsUIDVsphereDatacentersParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 overlords Uid vsphere datacenters params +func (o *V1OverlordsUIDVsphereDatacentersParams) WithContext(ctx context.Context) *V1OverlordsUIDVsphereDatacentersParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 overlords Uid vsphere datacenters params +func (o *V1OverlordsUIDVsphereDatacentersParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 overlords Uid vsphere datacenters params +func (o *V1OverlordsUIDVsphereDatacentersParams) WithHTTPClient(client *http.Client) *V1OverlordsUIDVsphereDatacentersParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 overlords Uid vsphere datacenters params +func (o *V1OverlordsUIDVsphereDatacentersParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithUID adds the uid to the v1 overlords Uid vsphere datacenters params +func (o *V1OverlordsUIDVsphereDatacentersParams) WithUID(uid string) *V1OverlordsUIDVsphereDatacentersParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 overlords Uid vsphere datacenters params +func (o *V1OverlordsUIDVsphereDatacentersParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1OverlordsUIDVsphereDatacentersParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_overlords_uid_vsphere_datacenters_responses.go b/api/client/v1/v1_overlords_uid_vsphere_datacenters_responses.go new file mode 100644 index 00000000..1afc15a3 --- /dev/null +++ b/api/client/v1/v1_overlords_uid_vsphere_datacenters_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1OverlordsUIDVsphereDatacentersReader is a Reader for the V1OverlordsUIDVsphereDatacenters structure. +type V1OverlordsUIDVsphereDatacentersReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1OverlordsUIDVsphereDatacentersReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1OverlordsUIDVsphereDatacentersOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1OverlordsUIDVsphereDatacentersOK creates a V1OverlordsUIDVsphereDatacentersOK with default headers values +func NewV1OverlordsUIDVsphereDatacentersOK() *V1OverlordsUIDVsphereDatacentersOK { + return &V1OverlordsUIDVsphereDatacentersOK{} +} + +/* +V1OverlordsUIDVsphereDatacentersOK handles this case with default header values. + +(empty) +*/ +type V1OverlordsUIDVsphereDatacentersOK struct { + Payload *models.V1VsphereDatacenters +} + +func (o *V1OverlordsUIDVsphereDatacentersOK) Error() string { + return fmt.Sprintf("[GET /v1/overlords/vsphere/{uid}/properties/datacenters][%d] v1OverlordsUidVsphereDatacentersOK %+v", 200, o.Payload) +} + +func (o *V1OverlordsUIDVsphereDatacentersOK) GetPayload() *models.V1VsphereDatacenters { + return o.Payload +} + +func (o *V1OverlordsUIDVsphereDatacentersOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1VsphereDatacenters) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_overlords_vsphere_manifest_parameters.go b/api/client/v1/v1_overlords_vsphere_manifest_parameters.go new file mode 100644 index 00000000..4536a1fb --- /dev/null +++ b/api/client/v1/v1_overlords_vsphere_manifest_parameters.go @@ -0,0 +1,137 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1OverlordsVsphereManifestParams creates a new V1OverlordsVsphereManifestParams object +// with the default values initialized. +func NewV1OverlordsVsphereManifestParams() *V1OverlordsVsphereManifestParams { + var () + return &V1OverlordsVsphereManifestParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1OverlordsVsphereManifestParamsWithTimeout creates a new V1OverlordsVsphereManifestParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1OverlordsVsphereManifestParamsWithTimeout(timeout time.Duration) *V1OverlordsVsphereManifestParams { + var () + return &V1OverlordsVsphereManifestParams{ + + timeout: timeout, + } +} + +// NewV1OverlordsVsphereManifestParamsWithContext creates a new V1OverlordsVsphereManifestParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1OverlordsVsphereManifestParamsWithContext(ctx context.Context) *V1OverlordsVsphereManifestParams { + var () + return &V1OverlordsVsphereManifestParams{ + + Context: ctx, + } +} + +// NewV1OverlordsVsphereManifestParamsWithHTTPClient creates a new V1OverlordsVsphereManifestParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1OverlordsVsphereManifestParamsWithHTTPClient(client *http.Client) *V1OverlordsVsphereManifestParams { + var () + return &V1OverlordsVsphereManifestParams{ + HTTPClient: client, + } +} + +/* +V1OverlordsVsphereManifestParams contains all the parameters to send to the API endpoint +for the v1 overlords vsphere manifest operation typically these are written to a http.Request +*/ +type V1OverlordsVsphereManifestParams struct { + + /*PairingCode*/ + PairingCode string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 overlords vsphere manifest params +func (o *V1OverlordsVsphereManifestParams) WithTimeout(timeout time.Duration) *V1OverlordsVsphereManifestParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 overlords vsphere manifest params +func (o *V1OverlordsVsphereManifestParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 overlords vsphere manifest params +func (o *V1OverlordsVsphereManifestParams) WithContext(ctx context.Context) *V1OverlordsVsphereManifestParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 overlords vsphere manifest params +func (o *V1OverlordsVsphereManifestParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 overlords vsphere manifest params +func (o *V1OverlordsVsphereManifestParams) WithHTTPClient(client *http.Client) *V1OverlordsVsphereManifestParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 overlords vsphere manifest params +func (o *V1OverlordsVsphereManifestParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithPairingCode adds the pairingCode to the v1 overlords vsphere manifest params +func (o *V1OverlordsVsphereManifestParams) WithPairingCode(pairingCode string) *V1OverlordsVsphereManifestParams { + o.SetPairingCode(pairingCode) + return o +} + +// SetPairingCode adds the pairingCode to the v1 overlords vsphere manifest params +func (o *V1OverlordsVsphereManifestParams) SetPairingCode(pairingCode string) { + o.PairingCode = pairingCode +} + +// WriteToRequest writes these params to a swagger request +func (o *V1OverlordsVsphereManifestParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // query param pairingCode + qrPairingCode := o.PairingCode + qPairingCode := qrPairingCode + if qPairingCode != "" { + if err := r.SetQueryParam("pairingCode", qPairingCode); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_overlords_vsphere_manifest_responses.go b/api/client/v1/v1_overlords_vsphere_manifest_responses.go new file mode 100644 index 00000000..564c2b7d --- /dev/null +++ b/api/client/v1/v1_overlords_vsphere_manifest_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1OverlordsVsphereManifestReader is a Reader for the V1OverlordsVsphereManifest structure. +type V1OverlordsVsphereManifestReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1OverlordsVsphereManifestReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1OverlordsVsphereManifestOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1OverlordsVsphereManifestOK creates a V1OverlordsVsphereManifestOK with default headers values +func NewV1OverlordsVsphereManifestOK() *V1OverlordsVsphereManifestOK { + return &V1OverlordsVsphereManifestOK{} +} + +/* +V1OverlordsVsphereManifestOK handles this case with default header values. + +(empty) +*/ +type V1OverlordsVsphereManifestOK struct { + Payload *models.V1OverlordManifest +} + +func (o *V1OverlordsVsphereManifestOK) Error() string { + return fmt.Sprintf("[GET /v1/overlords/vsphere/manifest][%d] v1OverlordsVsphereManifestOK %+v", 200, o.Payload) +} + +func (o *V1OverlordsVsphereManifestOK) GetPayload() *models.V1OverlordManifest { + return o.Payload +} + +func (o *V1OverlordsVsphereManifestOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1OverlordManifest) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_overlords_vsphere_ova_get_parameters.go b/api/client/v1/v1_overlords_vsphere_ova_get_parameters.go new file mode 100644 index 00000000..a8f1aefb --- /dev/null +++ b/api/client/v1/v1_overlords_vsphere_ova_get_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1OverlordsVsphereOvaGetParams creates a new V1OverlordsVsphereOvaGetParams object +// with the default values initialized. +func NewV1OverlordsVsphereOvaGetParams() *V1OverlordsVsphereOvaGetParams { + + return &V1OverlordsVsphereOvaGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1OverlordsVsphereOvaGetParamsWithTimeout creates a new V1OverlordsVsphereOvaGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1OverlordsVsphereOvaGetParamsWithTimeout(timeout time.Duration) *V1OverlordsVsphereOvaGetParams { + + return &V1OverlordsVsphereOvaGetParams{ + + timeout: timeout, + } +} + +// NewV1OverlordsVsphereOvaGetParamsWithContext creates a new V1OverlordsVsphereOvaGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1OverlordsVsphereOvaGetParamsWithContext(ctx context.Context) *V1OverlordsVsphereOvaGetParams { + + return &V1OverlordsVsphereOvaGetParams{ + + Context: ctx, + } +} + +// NewV1OverlordsVsphereOvaGetParamsWithHTTPClient creates a new V1OverlordsVsphereOvaGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1OverlordsVsphereOvaGetParamsWithHTTPClient(client *http.Client) *V1OverlordsVsphereOvaGetParams { + + return &V1OverlordsVsphereOvaGetParams{ + HTTPClient: client, + } +} + +/* +V1OverlordsVsphereOvaGetParams contains all the parameters to send to the API endpoint +for the v1 overlords vsphere ova get operation typically these are written to a http.Request +*/ +type V1OverlordsVsphereOvaGetParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 overlords vsphere ova get params +func (o *V1OverlordsVsphereOvaGetParams) WithTimeout(timeout time.Duration) *V1OverlordsVsphereOvaGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 overlords vsphere ova get params +func (o *V1OverlordsVsphereOvaGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 overlords vsphere ova get params +func (o *V1OverlordsVsphereOvaGetParams) WithContext(ctx context.Context) *V1OverlordsVsphereOvaGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 overlords vsphere ova get params +func (o *V1OverlordsVsphereOvaGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 overlords vsphere ova get params +func (o *V1OverlordsVsphereOvaGetParams) WithHTTPClient(client *http.Client) *V1OverlordsVsphereOvaGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 overlords vsphere ova get params +func (o *V1OverlordsVsphereOvaGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *V1OverlordsVsphereOvaGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_overlords_vsphere_ova_get_responses.go b/api/client/v1/v1_overlords_vsphere_ova_get_responses.go new file mode 100644 index 00000000..e841e3e0 --- /dev/null +++ b/api/client/v1/v1_overlords_vsphere_ova_get_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1OverlordsVsphereOvaGetReader is a Reader for the V1OverlordsVsphereOvaGet structure. +type V1OverlordsVsphereOvaGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1OverlordsVsphereOvaGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1OverlordsVsphereOvaGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1OverlordsVsphereOvaGetOK creates a V1OverlordsVsphereOvaGetOK with default headers values +func NewV1OverlordsVsphereOvaGetOK() *V1OverlordsVsphereOvaGetOK { + return &V1OverlordsVsphereOvaGetOK{} +} + +/* +V1OverlordsVsphereOvaGetOK handles this case with default header values. + +(empty) +*/ +type V1OverlordsVsphereOvaGetOK struct { + Payload *models.V1OverloadVsphereOva +} + +func (o *V1OverlordsVsphereOvaGetOK) Error() string { + return fmt.Sprintf("[GET /v1/overlords/vsphere/ova][%d] v1OverlordsVsphereOvaGetOK %+v", 200, o.Payload) +} + +func (o *V1OverlordsVsphereOvaGetOK) GetPayload() *models.V1OverloadVsphereOva { + return o.Payload +} + +func (o *V1OverlordsVsphereOvaGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1OverloadVsphereOva) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_packs_name_registry_uid_list_parameters.go b/api/client/v1/v1_packs_name_registry_uid_list_parameters.go new file mode 100644 index 00000000..ca1a8cb7 --- /dev/null +++ b/api/client/v1/v1_packs_name_registry_uid_list_parameters.go @@ -0,0 +1,265 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1PacksNameRegistryUIDListParams creates a new V1PacksNameRegistryUIDListParams object +// with the default values initialized. +func NewV1PacksNameRegistryUIDListParams() *V1PacksNameRegistryUIDListParams { + var ( + cloudTypeDefault = string("all") + ) + return &V1PacksNameRegistryUIDListParams{ + CloudType: &cloudTypeDefault, + + timeout: cr.DefaultTimeout, + } +} + +// NewV1PacksNameRegistryUIDListParamsWithTimeout creates a new V1PacksNameRegistryUIDListParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1PacksNameRegistryUIDListParamsWithTimeout(timeout time.Duration) *V1PacksNameRegistryUIDListParams { + var ( + cloudTypeDefault = string("all") + ) + return &V1PacksNameRegistryUIDListParams{ + CloudType: &cloudTypeDefault, + + timeout: timeout, + } +} + +// NewV1PacksNameRegistryUIDListParamsWithContext creates a new V1PacksNameRegistryUIDListParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1PacksNameRegistryUIDListParamsWithContext(ctx context.Context) *V1PacksNameRegistryUIDListParams { + var ( + cloudTypeDefault = string("all") + ) + return &V1PacksNameRegistryUIDListParams{ + CloudType: &cloudTypeDefault, + + Context: ctx, + } +} + +// NewV1PacksNameRegistryUIDListParamsWithHTTPClient creates a new V1PacksNameRegistryUIDListParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1PacksNameRegistryUIDListParamsWithHTTPClient(client *http.Client) *V1PacksNameRegistryUIDListParams { + var ( + cloudTypeDefault = string("all") + ) + return &V1PacksNameRegistryUIDListParams{ + CloudType: &cloudTypeDefault, + HTTPClient: client, + } +} + +/* +V1PacksNameRegistryUIDListParams contains all the parameters to send to the API endpoint +for the v1 packs name registry Uid list operation typically these are written to a http.Request +*/ +type V1PacksNameRegistryUIDListParams struct { + + /*CloudType + Pack cloud type + + */ + CloudType *string + /*Layer + Pack layer + + */ + Layer *string + /*PackName + Pack name + + */ + PackName string + /*RegistryUID + Pack registry uid + + */ + RegistryUID string + /*States + Comma seperated pack states. Example values are "deprecated" "deprecated,disabled". If states is not specified or empty then by default API will return all packs except "disabled" packs + + */ + States *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 packs name registry Uid list params +func (o *V1PacksNameRegistryUIDListParams) WithTimeout(timeout time.Duration) *V1PacksNameRegistryUIDListParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 packs name registry Uid list params +func (o *V1PacksNameRegistryUIDListParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 packs name registry Uid list params +func (o *V1PacksNameRegistryUIDListParams) WithContext(ctx context.Context) *V1PacksNameRegistryUIDListParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 packs name registry Uid list params +func (o *V1PacksNameRegistryUIDListParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 packs name registry Uid list params +func (o *V1PacksNameRegistryUIDListParams) WithHTTPClient(client *http.Client) *V1PacksNameRegistryUIDListParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 packs name registry Uid list params +func (o *V1PacksNameRegistryUIDListParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithCloudType adds the cloudType to the v1 packs name registry Uid list params +func (o *V1PacksNameRegistryUIDListParams) WithCloudType(cloudType *string) *V1PacksNameRegistryUIDListParams { + o.SetCloudType(cloudType) + return o +} + +// SetCloudType adds the cloudType to the v1 packs name registry Uid list params +func (o *V1PacksNameRegistryUIDListParams) SetCloudType(cloudType *string) { + o.CloudType = cloudType +} + +// WithLayer adds the layer to the v1 packs name registry Uid list params +func (o *V1PacksNameRegistryUIDListParams) WithLayer(layer *string) *V1PacksNameRegistryUIDListParams { + o.SetLayer(layer) + return o +} + +// SetLayer adds the layer to the v1 packs name registry Uid list params +func (o *V1PacksNameRegistryUIDListParams) SetLayer(layer *string) { + o.Layer = layer +} + +// WithPackName adds the packName to the v1 packs name registry Uid list params +func (o *V1PacksNameRegistryUIDListParams) WithPackName(packName string) *V1PacksNameRegistryUIDListParams { + o.SetPackName(packName) + return o +} + +// SetPackName adds the packName to the v1 packs name registry Uid list params +func (o *V1PacksNameRegistryUIDListParams) SetPackName(packName string) { + o.PackName = packName +} + +// WithRegistryUID adds the registryUID to the v1 packs name registry Uid list params +func (o *V1PacksNameRegistryUIDListParams) WithRegistryUID(registryUID string) *V1PacksNameRegistryUIDListParams { + o.SetRegistryUID(registryUID) + return o +} + +// SetRegistryUID adds the registryUid to the v1 packs name registry Uid list params +func (o *V1PacksNameRegistryUIDListParams) SetRegistryUID(registryUID string) { + o.RegistryUID = registryUID +} + +// WithStates adds the states to the v1 packs name registry Uid list params +func (o *V1PacksNameRegistryUIDListParams) WithStates(states *string) *V1PacksNameRegistryUIDListParams { + o.SetStates(states) + return o +} + +// SetStates adds the states to the v1 packs name registry Uid list params +func (o *V1PacksNameRegistryUIDListParams) SetStates(states *string) { + o.States = states +} + +// WriteToRequest writes these params to a swagger request +func (o *V1PacksNameRegistryUIDListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.CloudType != nil { + + // query param cloudType + var qrCloudType string + if o.CloudType != nil { + qrCloudType = *o.CloudType + } + qCloudType := qrCloudType + if qCloudType != "" { + if err := r.SetQueryParam("cloudType", qCloudType); err != nil { + return err + } + } + + } + + if o.Layer != nil { + + // query param layer + var qrLayer string + if o.Layer != nil { + qrLayer = *o.Layer + } + qLayer := qrLayer + if qLayer != "" { + if err := r.SetQueryParam("layer", qLayer); err != nil { + return err + } + } + + } + + // path param packName + if err := r.SetPathParam("packName", o.PackName); err != nil { + return err + } + + // path param registryUid + if err := r.SetPathParam("registryUid", o.RegistryUID); err != nil { + return err + } + + if o.States != nil { + + // query param states + var qrStates string + if o.States != nil { + qrStates = *o.States + } + qStates := qrStates + if qStates != "" { + if err := r.SetQueryParam("states", qStates); err != nil { + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_packs_name_registry_uid_list_responses.go b/api/client/v1/v1_packs_name_registry_uid_list_responses.go new file mode 100644 index 00000000..948abe66 --- /dev/null +++ b/api/client/v1/v1_packs_name_registry_uid_list_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1PacksNameRegistryUIDListReader is a Reader for the V1PacksNameRegistryUIDList structure. +type V1PacksNameRegistryUIDListReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1PacksNameRegistryUIDListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1PacksNameRegistryUIDListOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1PacksNameRegistryUIDListOK creates a V1PacksNameRegistryUIDListOK with default headers values +func NewV1PacksNameRegistryUIDListOK() *V1PacksNameRegistryUIDListOK { + return &V1PacksNameRegistryUIDListOK{} +} + +/* +V1PacksNameRegistryUIDListOK handles this case with default header values. + +(empty) +*/ +type V1PacksNameRegistryUIDListOK struct { + Payload *models.V1PackTagEntity +} + +func (o *V1PacksNameRegistryUIDListOK) Error() string { + return fmt.Sprintf("[GET /v1/packs/{packName}/registries/{registryUid}][%d] v1PacksNameRegistryUidListOK %+v", 200, o.Payload) +} + +func (o *V1PacksNameRegistryUIDListOK) GetPayload() *models.V1PackTagEntity { + return o.Payload +} + +func (o *V1PacksNameRegistryUIDListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1PackTagEntity) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_packs_pack_uid_logo_parameters.go b/api/client/v1/v1_packs_pack_uid_logo_parameters.go new file mode 100644 index 00000000..c727b3cd --- /dev/null +++ b/api/client/v1/v1_packs_pack_uid_logo_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1PacksPackUIDLogoParams creates a new V1PacksPackUIDLogoParams object +// with the default values initialized. +func NewV1PacksPackUIDLogoParams() *V1PacksPackUIDLogoParams { + var () + return &V1PacksPackUIDLogoParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1PacksPackUIDLogoParamsWithTimeout creates a new V1PacksPackUIDLogoParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1PacksPackUIDLogoParamsWithTimeout(timeout time.Duration) *V1PacksPackUIDLogoParams { + var () + return &V1PacksPackUIDLogoParams{ + + timeout: timeout, + } +} + +// NewV1PacksPackUIDLogoParamsWithContext creates a new V1PacksPackUIDLogoParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1PacksPackUIDLogoParamsWithContext(ctx context.Context) *V1PacksPackUIDLogoParams { + var () + return &V1PacksPackUIDLogoParams{ + + Context: ctx, + } +} + +// NewV1PacksPackUIDLogoParamsWithHTTPClient creates a new V1PacksPackUIDLogoParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1PacksPackUIDLogoParamsWithHTTPClient(client *http.Client) *V1PacksPackUIDLogoParams { + var () + return &V1PacksPackUIDLogoParams{ + HTTPClient: client, + } +} + +/* +V1PacksPackUIDLogoParams contains all the parameters to send to the API endpoint +for the v1 packs pack Uid logo operation typically these are written to a http.Request +*/ +type V1PacksPackUIDLogoParams struct { + + /*PackUID + Pack uid + + */ + PackUID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 packs pack Uid logo params +func (o *V1PacksPackUIDLogoParams) WithTimeout(timeout time.Duration) *V1PacksPackUIDLogoParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 packs pack Uid logo params +func (o *V1PacksPackUIDLogoParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 packs pack Uid logo params +func (o *V1PacksPackUIDLogoParams) WithContext(ctx context.Context) *V1PacksPackUIDLogoParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 packs pack Uid logo params +func (o *V1PacksPackUIDLogoParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 packs pack Uid logo params +func (o *V1PacksPackUIDLogoParams) WithHTTPClient(client *http.Client) *V1PacksPackUIDLogoParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 packs pack Uid logo params +func (o *V1PacksPackUIDLogoParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithPackUID adds the packUID to the v1 packs pack Uid logo params +func (o *V1PacksPackUIDLogoParams) WithPackUID(packUID string) *V1PacksPackUIDLogoParams { + o.SetPackUID(packUID) + return o +} + +// SetPackUID adds the packUid to the v1 packs pack Uid logo params +func (o *V1PacksPackUIDLogoParams) SetPackUID(packUID string) { + o.PackUID = packUID +} + +// WriteToRequest writes these params to a swagger request +func (o *V1PacksPackUIDLogoParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param packUid + if err := r.SetPathParam("packUid", o.PackUID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_packs_pack_uid_logo_responses.go b/api/client/v1/v1_packs_pack_uid_logo_responses.go new file mode 100644 index 00000000..84a353d6 --- /dev/null +++ b/api/client/v1/v1_packs_pack_uid_logo_responses.go @@ -0,0 +1,81 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1PacksPackUIDLogoReader is a Reader for the V1PacksPackUIDLogo structure. +type V1PacksPackUIDLogoReader struct { + formats strfmt.Registry + writer io.Writer +} + +// ReadResponse reads a server response into the received o. +func (o *V1PacksPackUIDLogoReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1PacksPackUIDLogoOK(o.writer) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1PacksPackUIDLogoOK creates a V1PacksPackUIDLogoOK with default headers values +func NewV1PacksPackUIDLogoOK(writer io.Writer) *V1PacksPackUIDLogoOK { + return &V1PacksPackUIDLogoOK{ + Payload: writer, + } +} + +/* +V1PacksPackUIDLogoOK handles this case with default header values. + +OK +*/ +type V1PacksPackUIDLogoOK struct { + /*Cache control directive for the response + */ + CacheControl string + + Expires string + + Payload io.Writer +} + +func (o *V1PacksPackUIDLogoOK) Error() string { + return fmt.Sprintf("[GET /v1/packs/{packUid}/logo][%d] v1PacksPackUidLogoOK %+v", 200, o.Payload) +} + +func (o *V1PacksPackUIDLogoOK) GetPayload() io.Writer { + return o.Payload +} + +func (o *V1PacksPackUIDLogoOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Cache-Control + o.CacheControl = response.GetHeader("Cache-Control") + + // response header Expires + o.Expires = response.GetHeader("Expires") + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_packs_search_parameters.go b/api/client/v1/v1_packs_search_parameters.go new file mode 100644 index 00000000..c4d1fcb2 --- /dev/null +++ b/api/client/v1/v1_packs_search_parameters.go @@ -0,0 +1,246 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1PacksSearchParams creates a new V1PacksSearchParams object +// with the default values initialized. +func NewV1PacksSearchParams() *V1PacksSearchParams { + var ( + limitDefault = int64(50) + ) + return &V1PacksSearchParams{ + Limit: &limitDefault, + + timeout: cr.DefaultTimeout, + } +} + +// NewV1PacksSearchParamsWithTimeout creates a new V1PacksSearchParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1PacksSearchParamsWithTimeout(timeout time.Duration) *V1PacksSearchParams { + var ( + limitDefault = int64(50) + ) + return &V1PacksSearchParams{ + Limit: &limitDefault, + + timeout: timeout, + } +} + +// NewV1PacksSearchParamsWithContext creates a new V1PacksSearchParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1PacksSearchParamsWithContext(ctx context.Context) *V1PacksSearchParams { + var ( + limitDefault = int64(50) + ) + return &V1PacksSearchParams{ + Limit: &limitDefault, + + Context: ctx, + } +} + +// NewV1PacksSearchParamsWithHTTPClient creates a new V1PacksSearchParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1PacksSearchParamsWithHTTPClient(client *http.Client) *V1PacksSearchParams { + var ( + limitDefault = int64(50) + ) + return &V1PacksSearchParams{ + Limit: &limitDefault, + HTTPClient: client, + } +} + +/* +V1PacksSearchParams contains all the parameters to send to the API endpoint +for the v1 packs search operation typically these are written to a http.Request +*/ +type V1PacksSearchParams struct { + + /*Body*/ + Body *models.V1PacksFilterSpec + /*Continue + continue token to paginate the subsequent data items + + */ + Continue *string + /*Limit + limit is a maximum number of responses to return for a list call. Default and maximum value of the limit is 50. + If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. + + */ + Limit *int64 + /*Offset + offset is the next index number from which the response will start. The response offset value can be used along with continue token for the pagination. + + */ + Offset *int64 + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 packs search params +func (o *V1PacksSearchParams) WithTimeout(timeout time.Duration) *V1PacksSearchParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 packs search params +func (o *V1PacksSearchParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 packs search params +func (o *V1PacksSearchParams) WithContext(ctx context.Context) *V1PacksSearchParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 packs search params +func (o *V1PacksSearchParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 packs search params +func (o *V1PacksSearchParams) WithHTTPClient(client *http.Client) *V1PacksSearchParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 packs search params +func (o *V1PacksSearchParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 packs search params +func (o *V1PacksSearchParams) WithBody(body *models.V1PacksFilterSpec) *V1PacksSearchParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 packs search params +func (o *V1PacksSearchParams) SetBody(body *models.V1PacksFilterSpec) { + o.Body = body +} + +// WithContinue adds the continueVar to the v1 packs search params +func (o *V1PacksSearchParams) WithContinue(continueVar *string) *V1PacksSearchParams { + o.SetContinue(continueVar) + return o +} + +// SetContinue adds the continue to the v1 packs search params +func (o *V1PacksSearchParams) SetContinue(continueVar *string) { + o.Continue = continueVar +} + +// WithLimit adds the limit to the v1 packs search params +func (o *V1PacksSearchParams) WithLimit(limit *int64) *V1PacksSearchParams { + o.SetLimit(limit) + return o +} + +// SetLimit adds the limit to the v1 packs search params +func (o *V1PacksSearchParams) SetLimit(limit *int64) { + o.Limit = limit +} + +// WithOffset adds the offset to the v1 packs search params +func (o *V1PacksSearchParams) WithOffset(offset *int64) *V1PacksSearchParams { + o.SetOffset(offset) + return o +} + +// SetOffset adds the offset to the v1 packs search params +func (o *V1PacksSearchParams) SetOffset(offset *int64) { + o.Offset = offset +} + +// WriteToRequest writes these params to a swagger request +func (o *V1PacksSearchParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + if o.Continue != nil { + + // query param continue + var qrContinue string + if o.Continue != nil { + qrContinue = *o.Continue + } + qContinue := qrContinue + if qContinue != "" { + if err := r.SetQueryParam("continue", qContinue); err != nil { + return err + } + } + + } + + if o.Limit != nil { + + // query param limit + var qrLimit int64 + if o.Limit != nil { + qrLimit = *o.Limit + } + qLimit := swag.FormatInt64(qrLimit) + if qLimit != "" { + if err := r.SetQueryParam("limit", qLimit); err != nil { + return err + } + } + + } + + if o.Offset != nil { + + // query param offset + var qrOffset int64 + if o.Offset != nil { + qrOffset = *o.Offset + } + qOffset := swag.FormatInt64(qrOffset) + if qOffset != "" { + if err := r.SetQueryParam("offset", qOffset); err != nil { + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_packs_search_responses.go b/api/client/v1/v1_packs_search_responses.go new file mode 100644 index 00000000..e1a9685f --- /dev/null +++ b/api/client/v1/v1_packs_search_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1PacksSearchReader is a Reader for the V1PacksSearch structure. +type V1PacksSearchReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1PacksSearchReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1PacksSearchOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1PacksSearchOK creates a V1PacksSearchOK with default headers values +func NewV1PacksSearchOK() *V1PacksSearchOK { + return &V1PacksSearchOK{} +} + +/* +V1PacksSearchOK handles this case with default header values. + +An array of pack summary items +*/ +type V1PacksSearchOK struct { + Payload *models.V1PackMetadataList +} + +func (o *V1PacksSearchOK) Error() string { + return fmt.Sprintf("[POST /v1/packs/search][%d] v1PacksSearchOK %+v", 200, o.Payload) +} + +func (o *V1PacksSearchOK) GetPayload() *models.V1PackMetadataList { + return o.Payload +} + +func (o *V1PacksSearchOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1PackMetadataList) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_packs_summary_delete_parameters.go b/api/client/v1/v1_packs_summary_delete_parameters.go new file mode 100644 index 00000000..7605acb3 --- /dev/null +++ b/api/client/v1/v1_packs_summary_delete_parameters.go @@ -0,0 +1,149 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1PacksSummaryDeleteParams creates a new V1PacksSummaryDeleteParams object +// with the default values initialized. +func NewV1PacksSummaryDeleteParams() *V1PacksSummaryDeleteParams { + var () + return &V1PacksSummaryDeleteParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1PacksSummaryDeleteParamsWithTimeout creates a new V1PacksSummaryDeleteParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1PacksSummaryDeleteParamsWithTimeout(timeout time.Duration) *V1PacksSummaryDeleteParams { + var () + return &V1PacksSummaryDeleteParams{ + + timeout: timeout, + } +} + +// NewV1PacksSummaryDeleteParamsWithContext creates a new V1PacksSummaryDeleteParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1PacksSummaryDeleteParamsWithContext(ctx context.Context) *V1PacksSummaryDeleteParams { + var () + return &V1PacksSummaryDeleteParams{ + + Context: ctx, + } +} + +// NewV1PacksSummaryDeleteParamsWithHTTPClient creates a new V1PacksSummaryDeleteParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1PacksSummaryDeleteParamsWithHTTPClient(client *http.Client) *V1PacksSummaryDeleteParams { + var () + return &V1PacksSummaryDeleteParams{ + HTTPClient: client, + } +} + +/* +V1PacksSummaryDeleteParams contains all the parameters to send to the API endpoint +for the v1 packs summary delete operation typically these are written to a http.Request +*/ +type V1PacksSummaryDeleteParams struct { + + /*Filters + Filters can be combined with AND, OR operators with field path name. Eg: metadata.name=TestServiceANDspec.cloudType=aws + + Server will be restricted to certain fields based on the indexed data for each resource. + + */ + Filters *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 packs summary delete params +func (o *V1PacksSummaryDeleteParams) WithTimeout(timeout time.Duration) *V1PacksSummaryDeleteParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 packs summary delete params +func (o *V1PacksSummaryDeleteParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 packs summary delete params +func (o *V1PacksSummaryDeleteParams) WithContext(ctx context.Context) *V1PacksSummaryDeleteParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 packs summary delete params +func (o *V1PacksSummaryDeleteParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 packs summary delete params +func (o *V1PacksSummaryDeleteParams) WithHTTPClient(client *http.Client) *V1PacksSummaryDeleteParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 packs summary delete params +func (o *V1PacksSummaryDeleteParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithFilters adds the filters to the v1 packs summary delete params +func (o *V1PacksSummaryDeleteParams) WithFilters(filters *string) *V1PacksSummaryDeleteParams { + o.SetFilters(filters) + return o +} + +// SetFilters adds the filters to the v1 packs summary delete params +func (o *V1PacksSummaryDeleteParams) SetFilters(filters *string) { + o.Filters = filters +} + +// WriteToRequest writes these params to a swagger request +func (o *V1PacksSummaryDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Filters != nil { + + // query param filters + var qrFilters string + if o.Filters != nil { + qrFilters = *o.Filters + } + qFilters := qrFilters + if qFilters != "" { + if err := r.SetQueryParam("filters", qFilters); err != nil { + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_packs_summary_delete_responses.go b/api/client/v1/v1_packs_summary_delete_responses.go new file mode 100644 index 00000000..c0aca8ec --- /dev/null +++ b/api/client/v1/v1_packs_summary_delete_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1PacksSummaryDeleteReader is a Reader for the V1PacksSummaryDelete structure. +type V1PacksSummaryDeleteReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1PacksSummaryDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1PacksSummaryDeleteOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1PacksSummaryDeleteOK creates a V1PacksSummaryDeleteOK with default headers values +func NewV1PacksSummaryDeleteOK() *V1PacksSummaryDeleteOK { + return &V1PacksSummaryDeleteOK{} +} + +/* +V1PacksSummaryDeleteOK handles this case with default header values. + +(empty) +*/ +type V1PacksSummaryDeleteOK struct { + Payload *models.V1DeleteMeta +} + +func (o *V1PacksSummaryDeleteOK) Error() string { + return fmt.Sprintf("[DELETE /v1/packs][%d] v1PacksSummaryDeleteOK %+v", 200, o.Payload) +} + +func (o *V1PacksSummaryDeleteOK) GetPayload() *models.V1DeleteMeta { + return o.Payload +} + +func (o *V1PacksSummaryDeleteOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1DeleteMeta) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_packs_summary_list_parameters.go b/api/client/v1/v1_packs_summary_list_parameters.go new file mode 100644 index 00000000..12839b43 --- /dev/null +++ b/api/client/v1/v1_packs_summary_list_parameters.go @@ -0,0 +1,323 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// NewV1PacksSummaryListParams creates a new V1PacksSummaryListParams object +// with the default values initialized. +func NewV1PacksSummaryListParams() *V1PacksSummaryListParams { + var ( + limitDefault = int64(50) + ) + return &V1PacksSummaryListParams{ + Limit: &limitDefault, + + timeout: cr.DefaultTimeout, + } +} + +// NewV1PacksSummaryListParamsWithTimeout creates a new V1PacksSummaryListParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1PacksSummaryListParamsWithTimeout(timeout time.Duration) *V1PacksSummaryListParams { + var ( + limitDefault = int64(50) + ) + return &V1PacksSummaryListParams{ + Limit: &limitDefault, + + timeout: timeout, + } +} + +// NewV1PacksSummaryListParamsWithContext creates a new V1PacksSummaryListParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1PacksSummaryListParamsWithContext(ctx context.Context) *V1PacksSummaryListParams { + var ( + limitDefault = int64(50) + ) + return &V1PacksSummaryListParams{ + Limit: &limitDefault, + + Context: ctx, + } +} + +// NewV1PacksSummaryListParamsWithHTTPClient creates a new V1PacksSummaryListParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1PacksSummaryListParamsWithHTTPClient(client *http.Client) *V1PacksSummaryListParams { + var ( + limitDefault = int64(50) + ) + return &V1PacksSummaryListParams{ + Limit: &limitDefault, + HTTPClient: client, + } +} + +/* +V1PacksSummaryListParams contains all the parameters to send to the API endpoint +for the v1 packs summary list operation typically these are written to a http.Request +*/ +type V1PacksSummaryListParams struct { + + /*Continue + continue token to paginate the subsequent data items + + */ + Continue *string + /*Fields + Set of fields to be presented in the response with values. The fields are comma separated. Eg: metadata.uid,metadata.name + + */ + Fields *string + /*Filters + Filters can be combined with AND, OR operators with field path name. Eg: metadata.name=TestServiceANDspec.cloudType=aws + + Server will be restricted to certain fields based on the indexed data for each resource. + + */ + Filters *string + /*Limit + limit is a maximum number of responses to return for a list call. Default and maximum value of the limit is 50. + If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. + + */ + Limit *int64 + /*Offset + offset is the next index number from which the response will start. The response offset value can be used along with continue token for the pagination. + + */ + Offset *int64 + /*OrderBy + Specify the fields with sort order. 1 indicates ascending and -1 for descending. Eg: orderBy=metadata.name=1,metadata.uid=-1 + + */ + OrderBy *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 packs summary list params +func (o *V1PacksSummaryListParams) WithTimeout(timeout time.Duration) *V1PacksSummaryListParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 packs summary list params +func (o *V1PacksSummaryListParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 packs summary list params +func (o *V1PacksSummaryListParams) WithContext(ctx context.Context) *V1PacksSummaryListParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 packs summary list params +func (o *V1PacksSummaryListParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 packs summary list params +func (o *V1PacksSummaryListParams) WithHTTPClient(client *http.Client) *V1PacksSummaryListParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 packs summary list params +func (o *V1PacksSummaryListParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithContinue adds the continueVar to the v1 packs summary list params +func (o *V1PacksSummaryListParams) WithContinue(continueVar *string) *V1PacksSummaryListParams { + o.SetContinue(continueVar) + return o +} + +// SetContinue adds the continue to the v1 packs summary list params +func (o *V1PacksSummaryListParams) SetContinue(continueVar *string) { + o.Continue = continueVar +} + +// WithFields adds the fields to the v1 packs summary list params +func (o *V1PacksSummaryListParams) WithFields(fields *string) *V1PacksSummaryListParams { + o.SetFields(fields) + return o +} + +// SetFields adds the fields to the v1 packs summary list params +func (o *V1PacksSummaryListParams) SetFields(fields *string) { + o.Fields = fields +} + +// WithFilters adds the filters to the v1 packs summary list params +func (o *V1PacksSummaryListParams) WithFilters(filters *string) *V1PacksSummaryListParams { + o.SetFilters(filters) + return o +} + +// SetFilters adds the filters to the v1 packs summary list params +func (o *V1PacksSummaryListParams) SetFilters(filters *string) { + o.Filters = filters +} + +// WithLimit adds the limit to the v1 packs summary list params +func (o *V1PacksSummaryListParams) WithLimit(limit *int64) *V1PacksSummaryListParams { + o.SetLimit(limit) + return o +} + +// SetLimit adds the limit to the v1 packs summary list params +func (o *V1PacksSummaryListParams) SetLimit(limit *int64) { + o.Limit = limit +} + +// WithOffset adds the offset to the v1 packs summary list params +func (o *V1PacksSummaryListParams) WithOffset(offset *int64) *V1PacksSummaryListParams { + o.SetOffset(offset) + return o +} + +// SetOffset adds the offset to the v1 packs summary list params +func (o *V1PacksSummaryListParams) SetOffset(offset *int64) { + o.Offset = offset +} + +// WithOrderBy adds the orderBy to the v1 packs summary list params +func (o *V1PacksSummaryListParams) WithOrderBy(orderBy *string) *V1PacksSummaryListParams { + o.SetOrderBy(orderBy) + return o +} + +// SetOrderBy adds the orderBy to the v1 packs summary list params +func (o *V1PacksSummaryListParams) SetOrderBy(orderBy *string) { + o.OrderBy = orderBy +} + +// WriteToRequest writes these params to a swagger request +func (o *V1PacksSummaryListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Continue != nil { + + // query param continue + var qrContinue string + if o.Continue != nil { + qrContinue = *o.Continue + } + qContinue := qrContinue + if qContinue != "" { + if err := r.SetQueryParam("continue", qContinue); err != nil { + return err + } + } + + } + + if o.Fields != nil { + + // query param fields + var qrFields string + if o.Fields != nil { + qrFields = *o.Fields + } + qFields := qrFields + if qFields != "" { + if err := r.SetQueryParam("fields", qFields); err != nil { + return err + } + } + + } + + if o.Filters != nil { + + // query param filters + var qrFilters string + if o.Filters != nil { + qrFilters = *o.Filters + } + qFilters := qrFilters + if qFilters != "" { + if err := r.SetQueryParam("filters", qFilters); err != nil { + return err + } + } + + } + + if o.Limit != nil { + + // query param limit + var qrLimit int64 + if o.Limit != nil { + qrLimit = *o.Limit + } + qLimit := swag.FormatInt64(qrLimit) + if qLimit != "" { + if err := r.SetQueryParam("limit", qLimit); err != nil { + return err + } + } + + } + + if o.Offset != nil { + + // query param offset + var qrOffset int64 + if o.Offset != nil { + qrOffset = *o.Offset + } + qOffset := swag.FormatInt64(qrOffset) + if qOffset != "" { + if err := r.SetQueryParam("offset", qOffset); err != nil { + return err + } + } + + } + + if o.OrderBy != nil { + + // query param orderBy + var qrOrderBy string + if o.OrderBy != nil { + qrOrderBy = *o.OrderBy + } + qOrderBy := qrOrderBy + if qOrderBy != "" { + if err := r.SetQueryParam("orderBy", qOrderBy); err != nil { + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_packs_summary_list_responses.go b/api/client/v1/v1_packs_summary_list_responses.go new file mode 100644 index 00000000..243e7435 --- /dev/null +++ b/api/client/v1/v1_packs_summary_list_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1PacksSummaryListReader is a Reader for the V1PacksSummaryList structure. +type V1PacksSummaryListReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1PacksSummaryListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1PacksSummaryListOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1PacksSummaryListOK creates a V1PacksSummaryListOK with default headers values +func NewV1PacksSummaryListOK() *V1PacksSummaryListOK { + return &V1PacksSummaryListOK{} +} + +/* +V1PacksSummaryListOK handles this case with default header values. + +An array of pack summary items +*/ +type V1PacksSummaryListOK struct { + Payload *models.V1PackSummaries +} + +func (o *V1PacksSummaryListOK) Error() string { + return fmt.Sprintf("[GET /v1/packs][%d] v1PacksSummaryListOK %+v", 200, o.Payload) +} + +func (o *V1PacksSummaryListOK) GetPayload() *models.V1PackSummaries { + return o.Payload +} + +func (o *V1PacksSummaryListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1PackSummaries) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_packs_uid_parameters.go b/api/client/v1/v1_packs_uid_parameters.go new file mode 100644 index 00000000..92dbf205 --- /dev/null +++ b/api/client/v1/v1_packs_uid_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1PacksUIDParams creates a new V1PacksUIDParams object +// with the default values initialized. +func NewV1PacksUIDParams() *V1PacksUIDParams { + var () + return &V1PacksUIDParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1PacksUIDParamsWithTimeout creates a new V1PacksUIDParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1PacksUIDParamsWithTimeout(timeout time.Duration) *V1PacksUIDParams { + var () + return &V1PacksUIDParams{ + + timeout: timeout, + } +} + +// NewV1PacksUIDParamsWithContext creates a new V1PacksUIDParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1PacksUIDParamsWithContext(ctx context.Context) *V1PacksUIDParams { + var () + return &V1PacksUIDParams{ + + Context: ctx, + } +} + +// NewV1PacksUIDParamsWithHTTPClient creates a new V1PacksUIDParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1PacksUIDParamsWithHTTPClient(client *http.Client) *V1PacksUIDParams { + var () + return &V1PacksUIDParams{ + HTTPClient: client, + } +} + +/* +V1PacksUIDParams contains all the parameters to send to the API endpoint +for the v1 packs Uid operation typically these are written to a http.Request +*/ +type V1PacksUIDParams struct { + + /*UID + Pack uid + + */ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 packs Uid params +func (o *V1PacksUIDParams) WithTimeout(timeout time.Duration) *V1PacksUIDParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 packs Uid params +func (o *V1PacksUIDParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 packs Uid params +func (o *V1PacksUIDParams) WithContext(ctx context.Context) *V1PacksUIDParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 packs Uid params +func (o *V1PacksUIDParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 packs Uid params +func (o *V1PacksUIDParams) WithHTTPClient(client *http.Client) *V1PacksUIDParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 packs Uid params +func (o *V1PacksUIDParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithUID adds the uid to the v1 packs Uid params +func (o *V1PacksUIDParams) WithUID(uid string) *V1PacksUIDParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 packs Uid params +func (o *V1PacksUIDParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1PacksUIDParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_packs_uid_readme_parameters.go b/api/client/v1/v1_packs_uid_readme_parameters.go new file mode 100644 index 00000000..ade2c95e --- /dev/null +++ b/api/client/v1/v1_packs_uid_readme_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1PacksUIDReadmeParams creates a new V1PacksUIDReadmeParams object +// with the default values initialized. +func NewV1PacksUIDReadmeParams() *V1PacksUIDReadmeParams { + var () + return &V1PacksUIDReadmeParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1PacksUIDReadmeParamsWithTimeout creates a new V1PacksUIDReadmeParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1PacksUIDReadmeParamsWithTimeout(timeout time.Duration) *V1PacksUIDReadmeParams { + var () + return &V1PacksUIDReadmeParams{ + + timeout: timeout, + } +} + +// NewV1PacksUIDReadmeParamsWithContext creates a new V1PacksUIDReadmeParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1PacksUIDReadmeParamsWithContext(ctx context.Context) *V1PacksUIDReadmeParams { + var () + return &V1PacksUIDReadmeParams{ + + Context: ctx, + } +} + +// NewV1PacksUIDReadmeParamsWithHTTPClient creates a new V1PacksUIDReadmeParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1PacksUIDReadmeParamsWithHTTPClient(client *http.Client) *V1PacksUIDReadmeParams { + var () + return &V1PacksUIDReadmeParams{ + HTTPClient: client, + } +} + +/* +V1PacksUIDReadmeParams contains all the parameters to send to the API endpoint +for the v1 packs Uid readme operation typically these are written to a http.Request +*/ +type V1PacksUIDReadmeParams struct { + + /*UID + Pack uid + + */ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 packs Uid readme params +func (o *V1PacksUIDReadmeParams) WithTimeout(timeout time.Duration) *V1PacksUIDReadmeParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 packs Uid readme params +func (o *V1PacksUIDReadmeParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 packs Uid readme params +func (o *V1PacksUIDReadmeParams) WithContext(ctx context.Context) *V1PacksUIDReadmeParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 packs Uid readme params +func (o *V1PacksUIDReadmeParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 packs Uid readme params +func (o *V1PacksUIDReadmeParams) WithHTTPClient(client *http.Client) *V1PacksUIDReadmeParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 packs Uid readme params +func (o *V1PacksUIDReadmeParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithUID adds the uid to the v1 packs Uid readme params +func (o *V1PacksUIDReadmeParams) WithUID(uid string) *V1PacksUIDReadmeParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 packs Uid readme params +func (o *V1PacksUIDReadmeParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1PacksUIDReadmeParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_packs_uid_readme_responses.go b/api/client/v1/v1_packs_uid_readme_responses.go new file mode 100644 index 00000000..76b4ec1b --- /dev/null +++ b/api/client/v1/v1_packs_uid_readme_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1PacksUIDReadmeReader is a Reader for the V1PacksUIDReadme structure. +type V1PacksUIDReadmeReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1PacksUIDReadmeReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1PacksUIDReadmeOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1PacksUIDReadmeOK creates a V1PacksUIDReadmeOK with default headers values +func NewV1PacksUIDReadmeOK() *V1PacksUIDReadmeOK { + return &V1PacksUIDReadmeOK{} +} + +/* +V1PacksUIDReadmeOK handles this case with default header values. + +Readme describes the documentation of the specified pack +*/ +type V1PacksUIDReadmeOK struct { + Payload *models.V1PackReadme +} + +func (o *V1PacksUIDReadmeOK) Error() string { + return fmt.Sprintf("[GET /v1/packs/{uid}/readme][%d] v1PacksUidReadmeOK %+v", 200, o.Payload) +} + +func (o *V1PacksUIDReadmeOK) GetPayload() *models.V1PackReadme { + return o.Payload +} + +func (o *V1PacksUIDReadmeOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1PackReadme) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_packs_uid_responses.go b/api/client/v1/v1_packs_uid_responses.go new file mode 100644 index 00000000..860d00cf --- /dev/null +++ b/api/client/v1/v1_packs_uid_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1PacksUIDReader is a Reader for the V1PacksUID structure. +type V1PacksUIDReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1PacksUIDReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1PacksUIDOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1PacksUIDOK creates a V1PacksUIDOK with default headers values +func NewV1PacksUIDOK() *V1PacksUIDOK { + return &V1PacksUIDOK{} +} + +/* +V1PacksUIDOK handles this case with default header values. + +A pack for the specified uid +*/ +type V1PacksUIDOK struct { + Payload *models.V1PackTagEntity +} + +func (o *V1PacksUIDOK) Error() string { + return fmt.Sprintf("[GET /v1/packs/{uid}][%d] v1PacksUidOK %+v", 200, o.Payload) +} + +func (o *V1PacksUIDOK) GetPayload() *models.V1PackTagEntity { + return o.Payload +} + +func (o *V1PacksUIDOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1PackTagEntity) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_password_activate_parameters.go b/api/client/v1/v1_password_activate_parameters.go new file mode 100644 index 00000000..7ea90129 --- /dev/null +++ b/api/client/v1/v1_password_activate_parameters.go @@ -0,0 +1,153 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1PasswordActivateParams creates a new V1PasswordActivateParams object +// with the default values initialized. +func NewV1PasswordActivateParams() *V1PasswordActivateParams { + var () + return &V1PasswordActivateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1PasswordActivateParamsWithTimeout creates a new V1PasswordActivateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1PasswordActivateParamsWithTimeout(timeout time.Duration) *V1PasswordActivateParams { + var () + return &V1PasswordActivateParams{ + + timeout: timeout, + } +} + +// NewV1PasswordActivateParamsWithContext creates a new V1PasswordActivateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1PasswordActivateParamsWithContext(ctx context.Context) *V1PasswordActivateParams { + var () + return &V1PasswordActivateParams{ + + Context: ctx, + } +} + +// NewV1PasswordActivateParamsWithHTTPClient creates a new V1PasswordActivateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1PasswordActivateParamsWithHTTPClient(client *http.Client) *V1PasswordActivateParams { + var () + return &V1PasswordActivateParams{ + HTTPClient: client, + } +} + +/* +V1PasswordActivateParams contains all the parameters to send to the API endpoint +for the v1 password activate operation typically these are written to a http.Request +*/ +type V1PasswordActivateParams struct { + + /*Body*/ + Body V1PasswordActivateBody + /*PasswordToken + Describes the expirable password token for the user to be used for authentication of user + + */ + PasswordToken string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 password activate params +func (o *V1PasswordActivateParams) WithTimeout(timeout time.Duration) *V1PasswordActivateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 password activate params +func (o *V1PasswordActivateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 password activate params +func (o *V1PasswordActivateParams) WithContext(ctx context.Context) *V1PasswordActivateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 password activate params +func (o *V1PasswordActivateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 password activate params +func (o *V1PasswordActivateParams) WithHTTPClient(client *http.Client) *V1PasswordActivateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 password activate params +func (o *V1PasswordActivateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 password activate params +func (o *V1PasswordActivateParams) WithBody(body V1PasswordActivateBody) *V1PasswordActivateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 password activate params +func (o *V1PasswordActivateParams) SetBody(body V1PasswordActivateBody) { + o.Body = body +} + +// WithPasswordToken adds the passwordToken to the v1 password activate params +func (o *V1PasswordActivateParams) WithPasswordToken(passwordToken string) *V1PasswordActivateParams { + o.SetPasswordToken(passwordToken) + return o +} + +// SetPasswordToken adds the passwordToken to the v1 password activate params +func (o *V1PasswordActivateParams) SetPasswordToken(passwordToken string) { + o.PasswordToken = passwordToken +} + +// WriteToRequest writes these params to a swagger request +func (o *V1PasswordActivateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + + // path param passwordToken + if err := r.SetPathParam("passwordToken", o.PasswordToken); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_password_activate_responses.go b/api/client/v1/v1_password_activate_responses.go new file mode 100644 index 00000000..538fa296 --- /dev/null +++ b/api/client/v1/v1_password_activate_responses.go @@ -0,0 +1,115 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1PasswordActivateReader is a Reader for the V1PasswordActivate structure. +type V1PasswordActivateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1PasswordActivateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1PasswordActivateNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1PasswordActivateNoContent creates a V1PasswordActivateNoContent with default headers values +func NewV1PasswordActivateNoContent() *V1PasswordActivateNoContent { + return &V1PasswordActivateNoContent{} +} + +/* +V1PasswordActivateNoContent handles this case with default header values. + +The resource was updated successfully +*/ +type V1PasswordActivateNoContent struct { +} + +func (o *V1PasswordActivateNoContent) Error() string { + return fmt.Sprintf("[PATCH /v1/auth/password/{passwordToken}/activate][%d] v1PasswordActivateNoContent ", 204) +} + +func (o *V1PasswordActivateNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} + +/* +V1PasswordActivateBody v1 password activate body +swagger:model V1PasswordActivateBody +*/ +type V1PasswordActivateBody struct { + + // Describes the new password for the user + // Required: true + // Format: password + Password *strfmt.Password `json:"password"` +} + +// Validate validates this v1 password activate body +func (o *V1PasswordActivateBody) Validate(formats strfmt.Registry) error { + var res []error + + if err := o.validatePassword(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (o *V1PasswordActivateBody) validatePassword(formats strfmt.Registry) error { + + if err := validate.Required("body"+"."+"password", "body", o.Password); err != nil { + return err + } + + if err := validate.FormatOf("body"+"."+"password", "body", "password", o.Password.String(), formats); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (o *V1PasswordActivateBody) MarshalBinary() ([]byte, error) { + if o == nil { + return nil, nil + } + return swag.WriteJSON(o) +} + +// UnmarshalBinary interface implementation +func (o *V1PasswordActivateBody) UnmarshalBinary(b []byte) error { + var res V1PasswordActivateBody + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *o = res + return nil +} diff --git a/api/client/v1/v1_password_reset_parameters.go b/api/client/v1/v1_password_reset_parameters.go new file mode 100644 index 00000000..6e409f82 --- /dev/null +++ b/api/client/v1/v1_password_reset_parameters.go @@ -0,0 +1,153 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1PasswordResetParams creates a new V1PasswordResetParams object +// with the default values initialized. +func NewV1PasswordResetParams() *V1PasswordResetParams { + var () + return &V1PasswordResetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1PasswordResetParamsWithTimeout creates a new V1PasswordResetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1PasswordResetParamsWithTimeout(timeout time.Duration) *V1PasswordResetParams { + var () + return &V1PasswordResetParams{ + + timeout: timeout, + } +} + +// NewV1PasswordResetParamsWithContext creates a new V1PasswordResetParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1PasswordResetParamsWithContext(ctx context.Context) *V1PasswordResetParams { + var () + return &V1PasswordResetParams{ + + Context: ctx, + } +} + +// NewV1PasswordResetParamsWithHTTPClient creates a new V1PasswordResetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1PasswordResetParamsWithHTTPClient(client *http.Client) *V1PasswordResetParams { + var () + return &V1PasswordResetParams{ + HTTPClient: client, + } +} + +/* +V1PasswordResetParams contains all the parameters to send to the API endpoint +for the v1 password reset operation typically these are written to a http.Request +*/ +type V1PasswordResetParams struct { + + /*Body*/ + Body V1PasswordResetBody + /*PasswordToken + Describes the expirable password token for the user to be used for authentication of user + + */ + PasswordToken string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 password reset params +func (o *V1PasswordResetParams) WithTimeout(timeout time.Duration) *V1PasswordResetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 password reset params +func (o *V1PasswordResetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 password reset params +func (o *V1PasswordResetParams) WithContext(ctx context.Context) *V1PasswordResetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 password reset params +func (o *V1PasswordResetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 password reset params +func (o *V1PasswordResetParams) WithHTTPClient(client *http.Client) *V1PasswordResetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 password reset params +func (o *V1PasswordResetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 password reset params +func (o *V1PasswordResetParams) WithBody(body V1PasswordResetBody) *V1PasswordResetParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 password reset params +func (o *V1PasswordResetParams) SetBody(body V1PasswordResetBody) { + o.Body = body +} + +// WithPasswordToken adds the passwordToken to the v1 password reset params +func (o *V1PasswordResetParams) WithPasswordToken(passwordToken string) *V1PasswordResetParams { + o.SetPasswordToken(passwordToken) + return o +} + +// SetPasswordToken adds the passwordToken to the v1 password reset params +func (o *V1PasswordResetParams) SetPasswordToken(passwordToken string) { + o.PasswordToken = passwordToken +} + +// WriteToRequest writes these params to a swagger request +func (o *V1PasswordResetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + + // path param passwordToken + if err := r.SetPathParam("passwordToken", o.PasswordToken); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_password_reset_request_parameters.go b/api/client/v1/v1_password_reset_request_parameters.go new file mode 100644 index 00000000..acfee72b --- /dev/null +++ b/api/client/v1/v1_password_reset_request_parameters.go @@ -0,0 +1,132 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1PasswordResetRequestParams creates a new V1PasswordResetRequestParams object +// with the default values initialized. +func NewV1PasswordResetRequestParams() *V1PasswordResetRequestParams { + var () + return &V1PasswordResetRequestParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1PasswordResetRequestParamsWithTimeout creates a new V1PasswordResetRequestParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1PasswordResetRequestParamsWithTimeout(timeout time.Duration) *V1PasswordResetRequestParams { + var () + return &V1PasswordResetRequestParams{ + + timeout: timeout, + } +} + +// NewV1PasswordResetRequestParamsWithContext creates a new V1PasswordResetRequestParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1PasswordResetRequestParamsWithContext(ctx context.Context) *V1PasswordResetRequestParams { + var () + return &V1PasswordResetRequestParams{ + + Context: ctx, + } +} + +// NewV1PasswordResetRequestParamsWithHTTPClient creates a new V1PasswordResetRequestParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1PasswordResetRequestParamsWithHTTPClient(client *http.Client) *V1PasswordResetRequestParams { + var () + return &V1PasswordResetRequestParams{ + HTTPClient: client, + } +} + +/* +V1PasswordResetRequestParams contains all the parameters to send to the API endpoint +for the v1 password reset request operation typically these are written to a http.Request +*/ +type V1PasswordResetRequestParams struct { + + /*Body*/ + Body V1PasswordResetRequestBody + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 password reset request params +func (o *V1PasswordResetRequestParams) WithTimeout(timeout time.Duration) *V1PasswordResetRequestParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 password reset request params +func (o *V1PasswordResetRequestParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 password reset request params +func (o *V1PasswordResetRequestParams) WithContext(ctx context.Context) *V1PasswordResetRequestParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 password reset request params +func (o *V1PasswordResetRequestParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 password reset request params +func (o *V1PasswordResetRequestParams) WithHTTPClient(client *http.Client) *V1PasswordResetRequestParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 password reset request params +func (o *V1PasswordResetRequestParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 password reset request params +func (o *V1PasswordResetRequestParams) WithBody(body V1PasswordResetRequestBody) *V1PasswordResetRequestParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 password reset request params +func (o *V1PasswordResetRequestParams) SetBody(body V1PasswordResetRequestBody) { + o.Body = body +} + +// WriteToRequest writes these params to a swagger request +func (o *V1PasswordResetRequestParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_password_reset_request_responses.go b/api/client/v1/v1_password_reset_request_responses.go new file mode 100644 index 00000000..85a8b974 --- /dev/null +++ b/api/client/v1/v1_password_reset_request_responses.go @@ -0,0 +1,116 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1PasswordResetRequestReader is a Reader for the V1PasswordResetRequest structure. +type V1PasswordResetRequestReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1PasswordResetRequestReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1PasswordResetRequestNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1PasswordResetRequestNoContent creates a V1PasswordResetRequestNoContent with default headers values +func NewV1PasswordResetRequestNoContent() *V1PasswordResetRequestNoContent { + return &V1PasswordResetRequestNoContent{} +} + +/* +V1PasswordResetRequestNoContent handles this case with default header values. + +Ok response without content +*/ +type V1PasswordResetRequestNoContent struct { + /*Audit uid for the request + */ + AuditUID string +} + +func (o *V1PasswordResetRequestNoContent) Error() string { + return fmt.Sprintf("[POST /v1/auth/user/password/reset][%d] v1PasswordResetRequestNoContent ", 204) +} + +func (o *V1PasswordResetRequestNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header AuditUid + o.AuditUID = response.GetHeader("AuditUid") + + return nil +} + +/* +V1PasswordResetRequestBody v1 password reset request body +swagger:model V1PasswordResetRequestBody +*/ +type V1PasswordResetRequestBody struct { + + // Describes email if for which password reset email has to be sent + // Required: true + EmailID *string `json:"emailId"` +} + +// Validate validates this v1 password reset request body +func (o *V1PasswordResetRequestBody) Validate(formats strfmt.Registry) error { + var res []error + + if err := o.validateEmailID(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (o *V1PasswordResetRequestBody) validateEmailID(formats strfmt.Registry) error { + + if err := validate.Required("body"+"."+"emailId", "body", o.EmailID); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (o *V1PasswordResetRequestBody) MarshalBinary() ([]byte, error) { + if o == nil { + return nil, nil + } + return swag.WriteJSON(o) +} + +// UnmarshalBinary interface implementation +func (o *V1PasswordResetRequestBody) UnmarshalBinary(b []byte) error { + var res V1PasswordResetRequestBody + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *o = res + return nil +} diff --git a/api/client/v1/v1_password_reset_responses.go b/api/client/v1/v1_password_reset_responses.go new file mode 100644 index 00000000..312c13dd --- /dev/null +++ b/api/client/v1/v1_password_reset_responses.go @@ -0,0 +1,115 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1PasswordResetReader is a Reader for the V1PasswordReset structure. +type V1PasswordResetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1PasswordResetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1PasswordResetNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1PasswordResetNoContent creates a V1PasswordResetNoContent with default headers values +func NewV1PasswordResetNoContent() *V1PasswordResetNoContent { + return &V1PasswordResetNoContent{} +} + +/* +V1PasswordResetNoContent handles this case with default header values. + +The resource was updated successfully +*/ +type V1PasswordResetNoContent struct { +} + +func (o *V1PasswordResetNoContent) Error() string { + return fmt.Sprintf("[PATCH /v1/auth/password/{passwordToken}/reset][%d] v1PasswordResetNoContent ", 204) +} + +func (o *V1PasswordResetNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} + +/* +V1PasswordResetBody v1 password reset body +swagger:model V1PasswordResetBody +*/ +type V1PasswordResetBody struct { + + // Describes the new password for the user + // Required: true + // Format: password + Password *strfmt.Password `json:"password"` +} + +// Validate validates this v1 password reset body +func (o *V1PasswordResetBody) Validate(formats strfmt.Registry) error { + var res []error + + if err := o.validatePassword(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (o *V1PasswordResetBody) validatePassword(formats strfmt.Registry) error { + + if err := validate.Required("body"+"."+"password", "body", o.Password); err != nil { + return err + } + + if err := validate.FormatOf("body"+"."+"password", "body", "password", o.Password.String(), formats); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (o *V1PasswordResetBody) MarshalBinary() ([]byte, error) { + if o == nil { + return nil, nil + } + return swag.WriteJSON(o) +} + +// UnmarshalBinary interface implementation +func (o *V1PasswordResetBody) UnmarshalBinary(b []byte) error { + var res V1PasswordResetBody + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *o = res + return nil +} diff --git a/api/client/v1/v1_passwords_block_list_delete_parameters.go b/api/client/v1/v1_passwords_block_list_delete_parameters.go new file mode 100644 index 00000000..3ee154e6 --- /dev/null +++ b/api/client/v1/v1_passwords_block_list_delete_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1PasswordsBlockListDeleteParams creates a new V1PasswordsBlockListDeleteParams object +// with the default values initialized. +func NewV1PasswordsBlockListDeleteParams() *V1PasswordsBlockListDeleteParams { + var () + return &V1PasswordsBlockListDeleteParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1PasswordsBlockListDeleteParamsWithTimeout creates a new V1PasswordsBlockListDeleteParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1PasswordsBlockListDeleteParamsWithTimeout(timeout time.Duration) *V1PasswordsBlockListDeleteParams { + var () + return &V1PasswordsBlockListDeleteParams{ + + timeout: timeout, + } +} + +// NewV1PasswordsBlockListDeleteParamsWithContext creates a new V1PasswordsBlockListDeleteParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1PasswordsBlockListDeleteParamsWithContext(ctx context.Context) *V1PasswordsBlockListDeleteParams { + var () + return &V1PasswordsBlockListDeleteParams{ + + Context: ctx, + } +} + +// NewV1PasswordsBlockListDeleteParamsWithHTTPClient creates a new V1PasswordsBlockListDeleteParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1PasswordsBlockListDeleteParamsWithHTTPClient(client *http.Client) *V1PasswordsBlockListDeleteParams { + var () + return &V1PasswordsBlockListDeleteParams{ + HTTPClient: client, + } +} + +/* +V1PasswordsBlockListDeleteParams contains all the parameters to send to the API endpoint +for the v1 passwords block list delete operation typically these are written to a http.Request +*/ +type V1PasswordsBlockListDeleteParams struct { + + /*Body*/ + Body *models.V1PasswordsBlockList + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 passwords block list delete params +func (o *V1PasswordsBlockListDeleteParams) WithTimeout(timeout time.Duration) *V1PasswordsBlockListDeleteParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 passwords block list delete params +func (o *V1PasswordsBlockListDeleteParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 passwords block list delete params +func (o *V1PasswordsBlockListDeleteParams) WithContext(ctx context.Context) *V1PasswordsBlockListDeleteParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 passwords block list delete params +func (o *V1PasswordsBlockListDeleteParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 passwords block list delete params +func (o *V1PasswordsBlockListDeleteParams) WithHTTPClient(client *http.Client) *V1PasswordsBlockListDeleteParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 passwords block list delete params +func (o *V1PasswordsBlockListDeleteParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 passwords block list delete params +func (o *V1PasswordsBlockListDeleteParams) WithBody(body *models.V1PasswordsBlockList) *V1PasswordsBlockListDeleteParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 passwords block list delete params +func (o *V1PasswordsBlockListDeleteParams) SetBody(body *models.V1PasswordsBlockList) { + o.Body = body +} + +// WriteToRequest writes these params to a swagger request +func (o *V1PasswordsBlockListDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_passwords_block_list_delete_responses.go b/api/client/v1/v1_passwords_block_list_delete_responses.go new file mode 100644 index 00000000..d36fcde9 --- /dev/null +++ b/api/client/v1/v1_passwords_block_list_delete_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1PasswordsBlockListDeleteReader is a Reader for the V1PasswordsBlockListDelete structure. +type V1PasswordsBlockListDeleteReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1PasswordsBlockListDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1PasswordsBlockListDeleteNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1PasswordsBlockListDeleteNoContent creates a V1PasswordsBlockListDeleteNoContent with default headers values +func NewV1PasswordsBlockListDeleteNoContent() *V1PasswordsBlockListDeleteNoContent { + return &V1PasswordsBlockListDeleteNoContent{} +} + +/* +V1PasswordsBlockListDeleteNoContent handles this case with default header values. + +The resource was deleted successfully +*/ +type V1PasswordsBlockListDeleteNoContent struct { +} + +func (o *V1PasswordsBlockListDeleteNoContent) Error() string { + return fmt.Sprintf("[DELETE /v1/system/passwords/blocklist][%d] v1PasswordsBlockListDeleteNoContent ", 204) +} + +func (o *V1PasswordsBlockListDeleteNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_passwords_block_list_update_parameters.go b/api/client/v1/v1_passwords_block_list_update_parameters.go new file mode 100644 index 00000000..4a754182 --- /dev/null +++ b/api/client/v1/v1_passwords_block_list_update_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1PasswordsBlockListUpdateParams creates a new V1PasswordsBlockListUpdateParams object +// with the default values initialized. +func NewV1PasswordsBlockListUpdateParams() *V1PasswordsBlockListUpdateParams { + var () + return &V1PasswordsBlockListUpdateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1PasswordsBlockListUpdateParamsWithTimeout creates a new V1PasswordsBlockListUpdateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1PasswordsBlockListUpdateParamsWithTimeout(timeout time.Duration) *V1PasswordsBlockListUpdateParams { + var () + return &V1PasswordsBlockListUpdateParams{ + + timeout: timeout, + } +} + +// NewV1PasswordsBlockListUpdateParamsWithContext creates a new V1PasswordsBlockListUpdateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1PasswordsBlockListUpdateParamsWithContext(ctx context.Context) *V1PasswordsBlockListUpdateParams { + var () + return &V1PasswordsBlockListUpdateParams{ + + Context: ctx, + } +} + +// NewV1PasswordsBlockListUpdateParamsWithHTTPClient creates a new V1PasswordsBlockListUpdateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1PasswordsBlockListUpdateParamsWithHTTPClient(client *http.Client) *V1PasswordsBlockListUpdateParams { + var () + return &V1PasswordsBlockListUpdateParams{ + HTTPClient: client, + } +} + +/* +V1PasswordsBlockListUpdateParams contains all the parameters to send to the API endpoint +for the v1 passwords block list update operation typically these are written to a http.Request +*/ +type V1PasswordsBlockListUpdateParams struct { + + /*Body*/ + Body *models.V1PasswordsBlockList + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 passwords block list update params +func (o *V1PasswordsBlockListUpdateParams) WithTimeout(timeout time.Duration) *V1PasswordsBlockListUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 passwords block list update params +func (o *V1PasswordsBlockListUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 passwords block list update params +func (o *V1PasswordsBlockListUpdateParams) WithContext(ctx context.Context) *V1PasswordsBlockListUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 passwords block list update params +func (o *V1PasswordsBlockListUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 passwords block list update params +func (o *V1PasswordsBlockListUpdateParams) WithHTTPClient(client *http.Client) *V1PasswordsBlockListUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 passwords block list update params +func (o *V1PasswordsBlockListUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 passwords block list update params +func (o *V1PasswordsBlockListUpdateParams) WithBody(body *models.V1PasswordsBlockList) *V1PasswordsBlockListUpdateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 passwords block list update params +func (o *V1PasswordsBlockListUpdateParams) SetBody(body *models.V1PasswordsBlockList) { + o.Body = body +} + +// WriteToRequest writes these params to a swagger request +func (o *V1PasswordsBlockListUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_passwords_block_list_update_responses.go b/api/client/v1/v1_passwords_block_list_update_responses.go new file mode 100644 index 00000000..3e8568ac --- /dev/null +++ b/api/client/v1/v1_passwords_block_list_update_responses.go @@ -0,0 +1,68 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1PasswordsBlockListUpdateReader is a Reader for the V1PasswordsBlockListUpdate structure. +type V1PasswordsBlockListUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1PasswordsBlockListUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1PasswordsBlockListUpdateNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1PasswordsBlockListUpdateNoContent creates a V1PasswordsBlockListUpdateNoContent with default headers values +func NewV1PasswordsBlockListUpdateNoContent() *V1PasswordsBlockListUpdateNoContent { + return &V1PasswordsBlockListUpdateNoContent{} +} + +/* +V1PasswordsBlockListUpdateNoContent handles this case with default header values. + +(empty) +*/ +type V1PasswordsBlockListUpdateNoContent struct { + Payload models.V1Updated +} + +func (o *V1PasswordsBlockListUpdateNoContent) Error() string { + return fmt.Sprintf("[PATCH /v1/system/passwords/blocklist][%d] v1PasswordsBlockListUpdateNoContent %+v", 204, o.Payload) +} + +func (o *V1PasswordsBlockListUpdateNoContent) GetPayload() models.V1Updated { + return o.Payload +} + +func (o *V1PasswordsBlockListUpdateNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_patch_tenant_address_parameters.go b/api/client/v1/v1_patch_tenant_address_parameters.go new file mode 100644 index 00000000..566fc5cb --- /dev/null +++ b/api/client/v1/v1_patch_tenant_address_parameters.go @@ -0,0 +1,154 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1PatchTenantAddressParams creates a new V1PatchTenantAddressParams object +// with the default values initialized. +func NewV1PatchTenantAddressParams() *V1PatchTenantAddressParams { + var () + return &V1PatchTenantAddressParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1PatchTenantAddressParamsWithTimeout creates a new V1PatchTenantAddressParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1PatchTenantAddressParamsWithTimeout(timeout time.Duration) *V1PatchTenantAddressParams { + var () + return &V1PatchTenantAddressParams{ + + timeout: timeout, + } +} + +// NewV1PatchTenantAddressParamsWithContext creates a new V1PatchTenantAddressParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1PatchTenantAddressParamsWithContext(ctx context.Context) *V1PatchTenantAddressParams { + var () + return &V1PatchTenantAddressParams{ + + Context: ctx, + } +} + +// NewV1PatchTenantAddressParamsWithHTTPClient creates a new V1PatchTenantAddressParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1PatchTenantAddressParamsWithHTTPClient(client *http.Client) *V1PatchTenantAddressParams { + var () + return &V1PatchTenantAddressParams{ + HTTPClient: client, + } +} + +/* +V1PatchTenantAddressParams contains all the parameters to send to the API endpoint +for the v1 patch tenant address operation typically these are written to a http.Request +*/ +type V1PatchTenantAddressParams struct { + + /*Body*/ + Body *models.V1TenantAddressPatch + /*TenantUID*/ + TenantUID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 patch tenant address params +func (o *V1PatchTenantAddressParams) WithTimeout(timeout time.Duration) *V1PatchTenantAddressParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 patch tenant address params +func (o *V1PatchTenantAddressParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 patch tenant address params +func (o *V1PatchTenantAddressParams) WithContext(ctx context.Context) *V1PatchTenantAddressParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 patch tenant address params +func (o *V1PatchTenantAddressParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 patch tenant address params +func (o *V1PatchTenantAddressParams) WithHTTPClient(client *http.Client) *V1PatchTenantAddressParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 patch tenant address params +func (o *V1PatchTenantAddressParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 patch tenant address params +func (o *V1PatchTenantAddressParams) WithBody(body *models.V1TenantAddressPatch) *V1PatchTenantAddressParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 patch tenant address params +func (o *V1PatchTenantAddressParams) SetBody(body *models.V1TenantAddressPatch) { + o.Body = body +} + +// WithTenantUID adds the tenantUID to the v1 patch tenant address params +func (o *V1PatchTenantAddressParams) WithTenantUID(tenantUID string) *V1PatchTenantAddressParams { + o.SetTenantUID(tenantUID) + return o +} + +// SetTenantUID adds the tenantUid to the v1 patch tenant address params +func (o *V1PatchTenantAddressParams) SetTenantUID(tenantUID string) { + o.TenantUID = tenantUID +} + +// WriteToRequest writes these params to a swagger request +func (o *V1PatchTenantAddressParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param tenantUid + if err := r.SetPathParam("tenantUid", o.TenantUID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_patch_tenant_address_responses.go b/api/client/v1/v1_patch_tenant_address_responses.go new file mode 100644 index 00000000..349ec7f2 --- /dev/null +++ b/api/client/v1/v1_patch_tenant_address_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1PatchTenantAddressReader is a Reader for the V1PatchTenantAddress structure. +type V1PatchTenantAddressReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1PatchTenantAddressReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1PatchTenantAddressNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1PatchTenantAddressNoContent creates a V1PatchTenantAddressNoContent with default headers values +func NewV1PatchTenantAddressNoContent() *V1PatchTenantAddressNoContent { + return &V1PatchTenantAddressNoContent{} +} + +/* +V1PatchTenantAddressNoContent handles this case with default header values. + +The resource was updated successfully +*/ +type V1PatchTenantAddressNoContent struct { +} + +func (o *V1PatchTenantAddressNoContent) Error() string { + return fmt.Sprintf("[PATCH /v1/tenants/{tenantUid}/address][%d] v1PatchTenantAddressNoContent ", 204) +} + +func (o *V1PatchTenantAddressNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_patch_tenant_email_id_parameters.go b/api/client/v1/v1_patch_tenant_email_id_parameters.go new file mode 100644 index 00000000..a45e3d63 --- /dev/null +++ b/api/client/v1/v1_patch_tenant_email_id_parameters.go @@ -0,0 +1,154 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1PatchTenantEmailIDParams creates a new V1PatchTenantEmailIDParams object +// with the default values initialized. +func NewV1PatchTenantEmailIDParams() *V1PatchTenantEmailIDParams { + var () + return &V1PatchTenantEmailIDParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1PatchTenantEmailIDParamsWithTimeout creates a new V1PatchTenantEmailIDParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1PatchTenantEmailIDParamsWithTimeout(timeout time.Duration) *V1PatchTenantEmailIDParams { + var () + return &V1PatchTenantEmailIDParams{ + + timeout: timeout, + } +} + +// NewV1PatchTenantEmailIDParamsWithContext creates a new V1PatchTenantEmailIDParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1PatchTenantEmailIDParamsWithContext(ctx context.Context) *V1PatchTenantEmailIDParams { + var () + return &V1PatchTenantEmailIDParams{ + + Context: ctx, + } +} + +// NewV1PatchTenantEmailIDParamsWithHTTPClient creates a new V1PatchTenantEmailIDParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1PatchTenantEmailIDParamsWithHTTPClient(client *http.Client) *V1PatchTenantEmailIDParams { + var () + return &V1PatchTenantEmailIDParams{ + HTTPClient: client, + } +} + +/* +V1PatchTenantEmailIDParams contains all the parameters to send to the API endpoint +for the v1 patch tenant email Id operation typically these are written to a http.Request +*/ +type V1PatchTenantEmailIDParams struct { + + /*Body*/ + Body *models.V1TenantEmailPatch + /*TenantUID*/ + TenantUID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 patch tenant email Id params +func (o *V1PatchTenantEmailIDParams) WithTimeout(timeout time.Duration) *V1PatchTenantEmailIDParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 patch tenant email Id params +func (o *V1PatchTenantEmailIDParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 patch tenant email Id params +func (o *V1PatchTenantEmailIDParams) WithContext(ctx context.Context) *V1PatchTenantEmailIDParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 patch tenant email Id params +func (o *V1PatchTenantEmailIDParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 patch tenant email Id params +func (o *V1PatchTenantEmailIDParams) WithHTTPClient(client *http.Client) *V1PatchTenantEmailIDParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 patch tenant email Id params +func (o *V1PatchTenantEmailIDParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 patch tenant email Id params +func (o *V1PatchTenantEmailIDParams) WithBody(body *models.V1TenantEmailPatch) *V1PatchTenantEmailIDParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 patch tenant email Id params +func (o *V1PatchTenantEmailIDParams) SetBody(body *models.V1TenantEmailPatch) { + o.Body = body +} + +// WithTenantUID adds the tenantUID to the v1 patch tenant email Id params +func (o *V1PatchTenantEmailIDParams) WithTenantUID(tenantUID string) *V1PatchTenantEmailIDParams { + o.SetTenantUID(tenantUID) + return o +} + +// SetTenantUID adds the tenantUid to the v1 patch tenant email Id params +func (o *V1PatchTenantEmailIDParams) SetTenantUID(tenantUID string) { + o.TenantUID = tenantUID +} + +// WriteToRequest writes these params to a swagger request +func (o *V1PatchTenantEmailIDParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param tenantUid + if err := r.SetPathParam("tenantUid", o.TenantUID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_patch_tenant_email_id_responses.go b/api/client/v1/v1_patch_tenant_email_id_responses.go new file mode 100644 index 00000000..6154a00b --- /dev/null +++ b/api/client/v1/v1_patch_tenant_email_id_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1PatchTenantEmailIDReader is a Reader for the V1PatchTenantEmailID structure. +type V1PatchTenantEmailIDReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1PatchTenantEmailIDReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1PatchTenantEmailIDNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1PatchTenantEmailIDNoContent creates a V1PatchTenantEmailIDNoContent with default headers values +func NewV1PatchTenantEmailIDNoContent() *V1PatchTenantEmailIDNoContent { + return &V1PatchTenantEmailIDNoContent{} +} + +/* +V1PatchTenantEmailIDNoContent handles this case with default header values. + +The resource was updated successfully +*/ +type V1PatchTenantEmailIDNoContent struct { +} + +func (o *V1PatchTenantEmailIDNoContent) Error() string { + return fmt.Sprintf("[PATCH /v1/tenants/{tenantUid}/emailId][%d] v1PatchTenantEmailIdNoContent ", 204) +} + +func (o *V1PatchTenantEmailIDNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_pcg_self_hosted_parameters.go b/api/client/v1/v1_pcg_self_hosted_parameters.go new file mode 100644 index 00000000..5a8bc8b5 --- /dev/null +++ b/api/client/v1/v1_pcg_self_hosted_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1PcgSelfHostedParams creates a new V1PcgSelfHostedParams object +// with the default values initialized. +func NewV1PcgSelfHostedParams() *V1PcgSelfHostedParams { + var () + return &V1PcgSelfHostedParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1PcgSelfHostedParamsWithTimeout creates a new V1PcgSelfHostedParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1PcgSelfHostedParamsWithTimeout(timeout time.Duration) *V1PcgSelfHostedParams { + var () + return &V1PcgSelfHostedParams{ + + timeout: timeout, + } +} + +// NewV1PcgSelfHostedParamsWithContext creates a new V1PcgSelfHostedParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1PcgSelfHostedParamsWithContext(ctx context.Context) *V1PcgSelfHostedParams { + var () + return &V1PcgSelfHostedParams{ + + Context: ctx, + } +} + +// NewV1PcgSelfHostedParamsWithHTTPClient creates a new V1PcgSelfHostedParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1PcgSelfHostedParamsWithHTTPClient(client *http.Client) *V1PcgSelfHostedParams { + var () + return &V1PcgSelfHostedParams{ + HTTPClient: client, + } +} + +/* +V1PcgSelfHostedParams contains all the parameters to send to the API endpoint +for the v1 pcg self hosted operation typically these are written to a http.Request +*/ +type V1PcgSelfHostedParams struct { + + /*Body*/ + Body *models.V1PcgSelfHostedParams + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 pcg self hosted params +func (o *V1PcgSelfHostedParams) WithTimeout(timeout time.Duration) *V1PcgSelfHostedParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 pcg self hosted params +func (o *V1PcgSelfHostedParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 pcg self hosted params +func (o *V1PcgSelfHostedParams) WithContext(ctx context.Context) *V1PcgSelfHostedParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 pcg self hosted params +func (o *V1PcgSelfHostedParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 pcg self hosted params +func (o *V1PcgSelfHostedParams) WithHTTPClient(client *http.Client) *V1PcgSelfHostedParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 pcg self hosted params +func (o *V1PcgSelfHostedParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 pcg self hosted params +func (o *V1PcgSelfHostedParams) WithBody(body *models.V1PcgSelfHostedParams) *V1PcgSelfHostedParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 pcg self hosted params +func (o *V1PcgSelfHostedParams) SetBody(body *models.V1PcgSelfHostedParams) { + o.Body = body +} + +// WriteToRequest writes these params to a swagger request +func (o *V1PcgSelfHostedParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_pcg_self_hosted_responses.go b/api/client/v1/v1_pcg_self_hosted_responses.go new file mode 100644 index 00000000..0fa8593e --- /dev/null +++ b/api/client/v1/v1_pcg_self_hosted_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1PcgSelfHostedReader is a Reader for the V1PcgSelfHosted structure. +type V1PcgSelfHostedReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1PcgSelfHostedReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1PcgSelfHostedOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1PcgSelfHostedOK creates a V1PcgSelfHostedOK with default headers values +func NewV1PcgSelfHostedOK() *V1PcgSelfHostedOK { + return &V1PcgSelfHostedOK{} +} + +/* +V1PcgSelfHostedOK handles this case with default header values. + +(empty) +*/ +type V1PcgSelfHostedOK struct { + Payload *models.V1PcgServiceKubectlCommands +} + +func (o *V1PcgSelfHostedOK) Error() string { + return fmt.Sprintf("[POST /v1/pcg/selfHosted][%d] v1PcgSelfHostedOK %+v", 200, o.Payload) +} + +func (o *V1PcgSelfHostedOK) GetPayload() *models.V1PcgServiceKubectlCommands { + return o.Payload +} + +func (o *V1PcgSelfHostedOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1PcgServiceKubectlCommands) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_pcg_uid_ally_manifest_get_parameters.go b/api/client/v1/v1_pcg_uid_ally_manifest_get_parameters.go new file mode 100644 index 00000000..576b005d --- /dev/null +++ b/api/client/v1/v1_pcg_uid_ally_manifest_get_parameters.go @@ -0,0 +1,133 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1PcgUIDAllyManifestGetParams creates a new V1PcgUIDAllyManifestGetParams object +// with the default values initialized. +func NewV1PcgUIDAllyManifestGetParams() *V1PcgUIDAllyManifestGetParams { + var () + return &V1PcgUIDAllyManifestGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1PcgUIDAllyManifestGetParamsWithTimeout creates a new V1PcgUIDAllyManifestGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1PcgUIDAllyManifestGetParamsWithTimeout(timeout time.Duration) *V1PcgUIDAllyManifestGetParams { + var () + return &V1PcgUIDAllyManifestGetParams{ + + timeout: timeout, + } +} + +// NewV1PcgUIDAllyManifestGetParamsWithContext creates a new V1PcgUIDAllyManifestGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1PcgUIDAllyManifestGetParamsWithContext(ctx context.Context) *V1PcgUIDAllyManifestGetParams { + var () + return &V1PcgUIDAllyManifestGetParams{ + + Context: ctx, + } +} + +// NewV1PcgUIDAllyManifestGetParamsWithHTTPClient creates a new V1PcgUIDAllyManifestGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1PcgUIDAllyManifestGetParamsWithHTTPClient(client *http.Client) *V1PcgUIDAllyManifestGetParams { + var () + return &V1PcgUIDAllyManifestGetParams{ + HTTPClient: client, + } +} + +/* +V1PcgUIDAllyManifestGetParams contains all the parameters to send to the API endpoint +for the v1 pcg Uid ally manifest get operation typically these are written to a http.Request +*/ +type V1PcgUIDAllyManifestGetParams struct { + + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 pcg Uid ally manifest get params +func (o *V1PcgUIDAllyManifestGetParams) WithTimeout(timeout time.Duration) *V1PcgUIDAllyManifestGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 pcg Uid ally manifest get params +func (o *V1PcgUIDAllyManifestGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 pcg Uid ally manifest get params +func (o *V1PcgUIDAllyManifestGetParams) WithContext(ctx context.Context) *V1PcgUIDAllyManifestGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 pcg Uid ally manifest get params +func (o *V1PcgUIDAllyManifestGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 pcg Uid ally manifest get params +func (o *V1PcgUIDAllyManifestGetParams) WithHTTPClient(client *http.Client) *V1PcgUIDAllyManifestGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 pcg Uid ally manifest get params +func (o *V1PcgUIDAllyManifestGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithUID adds the uid to the v1 pcg Uid ally manifest get params +func (o *V1PcgUIDAllyManifestGetParams) WithUID(uid string) *V1PcgUIDAllyManifestGetParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 pcg Uid ally manifest get params +func (o *V1PcgUIDAllyManifestGetParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1PcgUIDAllyManifestGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_pcg_uid_ally_manifest_get_responses.go b/api/client/v1/v1_pcg_uid_ally_manifest_get_responses.go new file mode 100644 index 00000000..2631b2f2 --- /dev/null +++ b/api/client/v1/v1_pcg_uid_ally_manifest_get_responses.go @@ -0,0 +1,74 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1PcgUIDAllyManifestGetReader is a Reader for the V1PcgUIDAllyManifestGet structure. +type V1PcgUIDAllyManifestGetReader struct { + formats strfmt.Registry + writer io.Writer +} + +// ReadResponse reads a server response into the received o. +func (o *V1PcgUIDAllyManifestGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1PcgUIDAllyManifestGetOK(o.writer) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1PcgUIDAllyManifestGetOK creates a V1PcgUIDAllyManifestGetOK with default headers values +func NewV1PcgUIDAllyManifestGetOK(writer io.Writer) *V1PcgUIDAllyManifestGetOK { + return &V1PcgUIDAllyManifestGetOK{ + Payload: writer, + } +} + +/* +V1PcgUIDAllyManifestGetOK handles this case with default header values. + +download file +*/ +type V1PcgUIDAllyManifestGetOK struct { + ContentDisposition string + + Payload io.Writer +} + +func (o *V1PcgUIDAllyManifestGetOK) Error() string { + return fmt.Sprintf("[GET /v1/pcg/{uid}/services/ally/manifest][%d] v1PcgUidAllyManifestGetOK %+v", 200, o.Payload) +} + +func (o *V1PcgUIDAllyManifestGetOK) GetPayload() io.Writer { + return o.Payload +} + +func (o *V1PcgUIDAllyManifestGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Content-Disposition + o.ContentDisposition = response.GetHeader("Content-Disposition") + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_pcg_uid_jet_manifest_get_parameters.go b/api/client/v1/v1_pcg_uid_jet_manifest_get_parameters.go new file mode 100644 index 00000000..c5ebe2ed --- /dev/null +++ b/api/client/v1/v1_pcg_uid_jet_manifest_get_parameters.go @@ -0,0 +1,133 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1PcgUIDJetManifestGetParams creates a new V1PcgUIDJetManifestGetParams object +// with the default values initialized. +func NewV1PcgUIDJetManifestGetParams() *V1PcgUIDJetManifestGetParams { + var () + return &V1PcgUIDJetManifestGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1PcgUIDJetManifestGetParamsWithTimeout creates a new V1PcgUIDJetManifestGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1PcgUIDJetManifestGetParamsWithTimeout(timeout time.Duration) *V1PcgUIDJetManifestGetParams { + var () + return &V1PcgUIDJetManifestGetParams{ + + timeout: timeout, + } +} + +// NewV1PcgUIDJetManifestGetParamsWithContext creates a new V1PcgUIDJetManifestGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1PcgUIDJetManifestGetParamsWithContext(ctx context.Context) *V1PcgUIDJetManifestGetParams { + var () + return &V1PcgUIDJetManifestGetParams{ + + Context: ctx, + } +} + +// NewV1PcgUIDJetManifestGetParamsWithHTTPClient creates a new V1PcgUIDJetManifestGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1PcgUIDJetManifestGetParamsWithHTTPClient(client *http.Client) *V1PcgUIDJetManifestGetParams { + var () + return &V1PcgUIDJetManifestGetParams{ + HTTPClient: client, + } +} + +/* +V1PcgUIDJetManifestGetParams contains all the parameters to send to the API endpoint +for the v1 pcg Uid jet manifest get operation typically these are written to a http.Request +*/ +type V1PcgUIDJetManifestGetParams struct { + + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 pcg Uid jet manifest get params +func (o *V1PcgUIDJetManifestGetParams) WithTimeout(timeout time.Duration) *V1PcgUIDJetManifestGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 pcg Uid jet manifest get params +func (o *V1PcgUIDJetManifestGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 pcg Uid jet manifest get params +func (o *V1PcgUIDJetManifestGetParams) WithContext(ctx context.Context) *V1PcgUIDJetManifestGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 pcg Uid jet manifest get params +func (o *V1PcgUIDJetManifestGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 pcg Uid jet manifest get params +func (o *V1PcgUIDJetManifestGetParams) WithHTTPClient(client *http.Client) *V1PcgUIDJetManifestGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 pcg Uid jet manifest get params +func (o *V1PcgUIDJetManifestGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithUID adds the uid to the v1 pcg Uid jet manifest get params +func (o *V1PcgUIDJetManifestGetParams) WithUID(uid string) *V1PcgUIDJetManifestGetParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 pcg Uid jet manifest get params +func (o *V1PcgUIDJetManifestGetParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1PcgUIDJetManifestGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_pcg_uid_jet_manifest_get_responses.go b/api/client/v1/v1_pcg_uid_jet_manifest_get_responses.go new file mode 100644 index 00000000..a5922ac8 --- /dev/null +++ b/api/client/v1/v1_pcg_uid_jet_manifest_get_responses.go @@ -0,0 +1,74 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1PcgUIDJetManifestGetReader is a Reader for the V1PcgUIDJetManifestGet structure. +type V1PcgUIDJetManifestGetReader struct { + formats strfmt.Registry + writer io.Writer +} + +// ReadResponse reads a server response into the received o. +func (o *V1PcgUIDJetManifestGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1PcgUIDJetManifestGetOK(o.writer) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1PcgUIDJetManifestGetOK creates a V1PcgUIDJetManifestGetOK with default headers values +func NewV1PcgUIDJetManifestGetOK(writer io.Writer) *V1PcgUIDJetManifestGetOK { + return &V1PcgUIDJetManifestGetOK{ + Payload: writer, + } +} + +/* +V1PcgUIDJetManifestGetOK handles this case with default header values. + +download file +*/ +type V1PcgUIDJetManifestGetOK struct { + ContentDisposition string + + Payload io.Writer +} + +func (o *V1PcgUIDJetManifestGetOK) Error() string { + return fmt.Sprintf("[GET /v1/pcg/{uid}/services/jet/manifest][%d] v1PcgUidJetManifestGetOK %+v", 200, o.Payload) +} + +func (o *V1PcgUIDJetManifestGetOK) GetPayload() io.Writer { + return o.Payload +} + +func (o *V1PcgUIDJetManifestGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Content-Disposition + o.ContentDisposition = response.GetHeader("Content-Disposition") + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_pcg_uid_register_parameters.go b/api/client/v1/v1_pcg_uid_register_parameters.go new file mode 100644 index 00000000..bcac1e17 --- /dev/null +++ b/api/client/v1/v1_pcg_uid_register_parameters.go @@ -0,0 +1,154 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1PcgUIDRegisterParams creates a new V1PcgUIDRegisterParams object +// with the default values initialized. +func NewV1PcgUIDRegisterParams() *V1PcgUIDRegisterParams { + var () + return &V1PcgUIDRegisterParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1PcgUIDRegisterParamsWithTimeout creates a new V1PcgUIDRegisterParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1PcgUIDRegisterParamsWithTimeout(timeout time.Duration) *V1PcgUIDRegisterParams { + var () + return &V1PcgUIDRegisterParams{ + + timeout: timeout, + } +} + +// NewV1PcgUIDRegisterParamsWithContext creates a new V1PcgUIDRegisterParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1PcgUIDRegisterParamsWithContext(ctx context.Context) *V1PcgUIDRegisterParams { + var () + return &V1PcgUIDRegisterParams{ + + Context: ctx, + } +} + +// NewV1PcgUIDRegisterParamsWithHTTPClient creates a new V1PcgUIDRegisterParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1PcgUIDRegisterParamsWithHTTPClient(client *http.Client) *V1PcgUIDRegisterParams { + var () + return &V1PcgUIDRegisterParams{ + HTTPClient: client, + } +} + +/* +V1PcgUIDRegisterParams contains all the parameters to send to the API endpoint +for the v1 pcg Uid register operation typically these are written to a http.Request +*/ +type V1PcgUIDRegisterParams struct { + + /*PairingCode*/ + PairingCode *models.V1PairingCode + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 pcg Uid register params +func (o *V1PcgUIDRegisterParams) WithTimeout(timeout time.Duration) *V1PcgUIDRegisterParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 pcg Uid register params +func (o *V1PcgUIDRegisterParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 pcg Uid register params +func (o *V1PcgUIDRegisterParams) WithContext(ctx context.Context) *V1PcgUIDRegisterParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 pcg Uid register params +func (o *V1PcgUIDRegisterParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 pcg Uid register params +func (o *V1PcgUIDRegisterParams) WithHTTPClient(client *http.Client) *V1PcgUIDRegisterParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 pcg Uid register params +func (o *V1PcgUIDRegisterParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithPairingCode adds the pairingCode to the v1 pcg Uid register params +func (o *V1PcgUIDRegisterParams) WithPairingCode(pairingCode *models.V1PairingCode) *V1PcgUIDRegisterParams { + o.SetPairingCode(pairingCode) + return o +} + +// SetPairingCode adds the pairingCode to the v1 pcg Uid register params +func (o *V1PcgUIDRegisterParams) SetPairingCode(pairingCode *models.V1PairingCode) { + o.PairingCode = pairingCode +} + +// WithUID adds the uid to the v1 pcg Uid register params +func (o *V1PcgUIDRegisterParams) WithUID(uid string) *V1PcgUIDRegisterParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 pcg Uid register params +func (o *V1PcgUIDRegisterParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1PcgUIDRegisterParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.PairingCode != nil { + if err := r.SetBodyParam(o.PairingCode); err != nil { + return err + } + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_pcg_uid_register_responses.go b/api/client/v1/v1_pcg_uid_register_responses.go new file mode 100644 index 00000000..e6527126 --- /dev/null +++ b/api/client/v1/v1_pcg_uid_register_responses.go @@ -0,0 +1,61 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1PcgUIDRegisterReader is a Reader for the V1PcgUIDRegister structure. +type V1PcgUIDRegisterReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1PcgUIDRegisterReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1PcgUIDRegisterNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1PcgUIDRegisterNoContent creates a V1PcgUIDRegisterNoContent with default headers values +func NewV1PcgUIDRegisterNoContent() *V1PcgUIDRegisterNoContent { + return &V1PcgUIDRegisterNoContent{} +} + +/* +V1PcgUIDRegisterNoContent handles this case with default header values. + +Ok response without content +*/ +type V1PcgUIDRegisterNoContent struct { + /*Audit uid for the request + */ + AuditUID string +} + +func (o *V1PcgUIDRegisterNoContent) Error() string { + return fmt.Sprintf("[POST /v1/pcg/{uid}/register][%d] v1PcgUidRegisterNoContent ", 204) +} + +func (o *V1PcgUIDRegisterNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header AuditUid + o.AuditUID = response.GetHeader("AuditUid") + + return nil +} diff --git a/api/client/v1/v1_permissions_list_parameters.go b/api/client/v1/v1_permissions_list_parameters.go new file mode 100644 index 00000000..ffca8b27 --- /dev/null +++ b/api/client/v1/v1_permissions_list_parameters.go @@ -0,0 +1,144 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1PermissionsListParams creates a new V1PermissionsListParams object +// with the default values initialized. +func NewV1PermissionsListParams() *V1PermissionsListParams { + var () + return &V1PermissionsListParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1PermissionsListParamsWithTimeout creates a new V1PermissionsListParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1PermissionsListParamsWithTimeout(timeout time.Duration) *V1PermissionsListParams { + var () + return &V1PermissionsListParams{ + + timeout: timeout, + } +} + +// NewV1PermissionsListParamsWithContext creates a new V1PermissionsListParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1PermissionsListParamsWithContext(ctx context.Context) *V1PermissionsListParams { + var () + return &V1PermissionsListParams{ + + Context: ctx, + } +} + +// NewV1PermissionsListParamsWithHTTPClient creates a new V1PermissionsListParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1PermissionsListParamsWithHTTPClient(client *http.Client) *V1PermissionsListParams { + var () + return &V1PermissionsListParams{ + HTTPClient: client, + } +} + +/* +V1PermissionsListParams contains all the parameters to send to the API endpoint +for the v1 permissions list operation typically these are written to a http.Request +*/ +type V1PermissionsListParams struct { + + /*Scope*/ + Scope *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 permissions list params +func (o *V1PermissionsListParams) WithTimeout(timeout time.Duration) *V1PermissionsListParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 permissions list params +func (o *V1PermissionsListParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 permissions list params +func (o *V1PermissionsListParams) WithContext(ctx context.Context) *V1PermissionsListParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 permissions list params +func (o *V1PermissionsListParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 permissions list params +func (o *V1PermissionsListParams) WithHTTPClient(client *http.Client) *V1PermissionsListParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 permissions list params +func (o *V1PermissionsListParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithScope adds the scope to the v1 permissions list params +func (o *V1PermissionsListParams) WithScope(scope *string) *V1PermissionsListParams { + o.SetScope(scope) + return o +} + +// SetScope adds the scope to the v1 permissions list params +func (o *V1PermissionsListParams) SetScope(scope *string) { + o.Scope = scope +} + +// WriteToRequest writes these params to a swagger request +func (o *V1PermissionsListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Scope != nil { + + // query param scope + var qrScope string + if o.Scope != nil { + qrScope = *o.Scope + } + qScope := qrScope + if qScope != "" { + if err := r.SetQueryParam("scope", qScope); err != nil { + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_permissions_list_responses.go b/api/client/v1/v1_permissions_list_responses.go new file mode 100644 index 00000000..c36926e9 --- /dev/null +++ b/api/client/v1/v1_permissions_list_responses.go @@ -0,0 +1,68 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1PermissionsListReader is a Reader for the V1PermissionsList structure. +type V1PermissionsListReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1PermissionsListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1PermissionsListOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1PermissionsListOK creates a V1PermissionsListOK with default headers values +func NewV1PermissionsListOK() *V1PermissionsListOK { + return &V1PermissionsListOK{} +} + +/* +V1PermissionsListOK handles this case with default header values. + +An array of permissions +*/ +type V1PermissionsListOK struct { + Payload models.V1Permissions +} + +func (o *V1PermissionsListOK) Error() string { + return fmt.Sprintf("[GET /v1/permissions][%d] v1PermissionsListOK %+v", 200, o.Payload) +} + +func (o *V1PermissionsListOK) GetPayload() models.V1Permissions { + return o.Payload +} + +func (o *V1PermissionsListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_project_cluster_settings_get_parameters.go b/api/client/v1/v1_project_cluster_settings_get_parameters.go new file mode 100644 index 00000000..1c7d97dd --- /dev/null +++ b/api/client/v1/v1_project_cluster_settings_get_parameters.go @@ -0,0 +1,133 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1ProjectClusterSettingsGetParams creates a new V1ProjectClusterSettingsGetParams object +// with the default values initialized. +func NewV1ProjectClusterSettingsGetParams() *V1ProjectClusterSettingsGetParams { + var () + return &V1ProjectClusterSettingsGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1ProjectClusterSettingsGetParamsWithTimeout creates a new V1ProjectClusterSettingsGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1ProjectClusterSettingsGetParamsWithTimeout(timeout time.Duration) *V1ProjectClusterSettingsGetParams { + var () + return &V1ProjectClusterSettingsGetParams{ + + timeout: timeout, + } +} + +// NewV1ProjectClusterSettingsGetParamsWithContext creates a new V1ProjectClusterSettingsGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1ProjectClusterSettingsGetParamsWithContext(ctx context.Context) *V1ProjectClusterSettingsGetParams { + var () + return &V1ProjectClusterSettingsGetParams{ + + Context: ctx, + } +} + +// NewV1ProjectClusterSettingsGetParamsWithHTTPClient creates a new V1ProjectClusterSettingsGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1ProjectClusterSettingsGetParamsWithHTTPClient(client *http.Client) *V1ProjectClusterSettingsGetParams { + var () + return &V1ProjectClusterSettingsGetParams{ + HTTPClient: client, + } +} + +/* +V1ProjectClusterSettingsGetParams contains all the parameters to send to the API endpoint +for the v1 project cluster settings get operation typically these are written to a http.Request +*/ +type V1ProjectClusterSettingsGetParams struct { + + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 project cluster settings get params +func (o *V1ProjectClusterSettingsGetParams) WithTimeout(timeout time.Duration) *V1ProjectClusterSettingsGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 project cluster settings get params +func (o *V1ProjectClusterSettingsGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 project cluster settings get params +func (o *V1ProjectClusterSettingsGetParams) WithContext(ctx context.Context) *V1ProjectClusterSettingsGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 project cluster settings get params +func (o *V1ProjectClusterSettingsGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 project cluster settings get params +func (o *V1ProjectClusterSettingsGetParams) WithHTTPClient(client *http.Client) *V1ProjectClusterSettingsGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 project cluster settings get params +func (o *V1ProjectClusterSettingsGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithUID adds the uid to the v1 project cluster settings get params +func (o *V1ProjectClusterSettingsGetParams) WithUID(uid string) *V1ProjectClusterSettingsGetParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 project cluster settings get params +func (o *V1ProjectClusterSettingsGetParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1ProjectClusterSettingsGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_project_cluster_settings_get_responses.go b/api/client/v1/v1_project_cluster_settings_get_responses.go new file mode 100644 index 00000000..94e89e43 --- /dev/null +++ b/api/client/v1/v1_project_cluster_settings_get_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1ProjectClusterSettingsGetReader is a Reader for the V1ProjectClusterSettingsGet structure. +type V1ProjectClusterSettingsGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1ProjectClusterSettingsGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1ProjectClusterSettingsGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1ProjectClusterSettingsGetOK creates a V1ProjectClusterSettingsGetOK with default headers values +func NewV1ProjectClusterSettingsGetOK() *V1ProjectClusterSettingsGetOK { + return &V1ProjectClusterSettingsGetOK{} +} + +/* +V1ProjectClusterSettingsGetOK handles this case with default header values. + +(empty) +*/ +type V1ProjectClusterSettingsGetOK struct { + Payload *models.V1ProjectClusterSettings +} + +func (o *V1ProjectClusterSettingsGetOK) Error() string { + return fmt.Sprintf("[GET /v1/projects/{uid}/preferences/clusterSettings][%d] v1ProjectClusterSettingsGetOK %+v", 200, o.Payload) +} + +func (o *V1ProjectClusterSettingsGetOK) GetPayload() *models.V1ProjectClusterSettings { + return o.Payload +} + +func (o *V1ProjectClusterSettingsGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1ProjectClusterSettings) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_project_clusters_nodes_auto_remediation_setting_update_parameters.go b/api/client/v1/v1_project_clusters_nodes_auto_remediation_setting_update_parameters.go new file mode 100644 index 00000000..7bbb8a4b --- /dev/null +++ b/api/client/v1/v1_project_clusters_nodes_auto_remediation_setting_update_parameters.go @@ -0,0 +1,154 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1ProjectClustersNodesAutoRemediationSettingUpdateParams creates a new V1ProjectClustersNodesAutoRemediationSettingUpdateParams object +// with the default values initialized. +func NewV1ProjectClustersNodesAutoRemediationSettingUpdateParams() *V1ProjectClustersNodesAutoRemediationSettingUpdateParams { + var () + return &V1ProjectClustersNodesAutoRemediationSettingUpdateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1ProjectClustersNodesAutoRemediationSettingUpdateParamsWithTimeout creates a new V1ProjectClustersNodesAutoRemediationSettingUpdateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1ProjectClustersNodesAutoRemediationSettingUpdateParamsWithTimeout(timeout time.Duration) *V1ProjectClustersNodesAutoRemediationSettingUpdateParams { + var () + return &V1ProjectClustersNodesAutoRemediationSettingUpdateParams{ + + timeout: timeout, + } +} + +// NewV1ProjectClustersNodesAutoRemediationSettingUpdateParamsWithContext creates a new V1ProjectClustersNodesAutoRemediationSettingUpdateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1ProjectClustersNodesAutoRemediationSettingUpdateParamsWithContext(ctx context.Context) *V1ProjectClustersNodesAutoRemediationSettingUpdateParams { + var () + return &V1ProjectClustersNodesAutoRemediationSettingUpdateParams{ + + Context: ctx, + } +} + +// NewV1ProjectClustersNodesAutoRemediationSettingUpdateParamsWithHTTPClient creates a new V1ProjectClustersNodesAutoRemediationSettingUpdateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1ProjectClustersNodesAutoRemediationSettingUpdateParamsWithHTTPClient(client *http.Client) *V1ProjectClustersNodesAutoRemediationSettingUpdateParams { + var () + return &V1ProjectClustersNodesAutoRemediationSettingUpdateParams{ + HTTPClient: client, + } +} + +/* +V1ProjectClustersNodesAutoRemediationSettingUpdateParams contains all the parameters to send to the API endpoint +for the v1 project clusters nodes auto remediation setting update operation typically these are written to a http.Request +*/ +type V1ProjectClustersNodesAutoRemediationSettingUpdateParams struct { + + /*Body*/ + Body *models.V1NodesAutoRemediationSettings + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 project clusters nodes auto remediation setting update params +func (o *V1ProjectClustersNodesAutoRemediationSettingUpdateParams) WithTimeout(timeout time.Duration) *V1ProjectClustersNodesAutoRemediationSettingUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 project clusters nodes auto remediation setting update params +func (o *V1ProjectClustersNodesAutoRemediationSettingUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 project clusters nodes auto remediation setting update params +func (o *V1ProjectClustersNodesAutoRemediationSettingUpdateParams) WithContext(ctx context.Context) *V1ProjectClustersNodesAutoRemediationSettingUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 project clusters nodes auto remediation setting update params +func (o *V1ProjectClustersNodesAutoRemediationSettingUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 project clusters nodes auto remediation setting update params +func (o *V1ProjectClustersNodesAutoRemediationSettingUpdateParams) WithHTTPClient(client *http.Client) *V1ProjectClustersNodesAutoRemediationSettingUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 project clusters nodes auto remediation setting update params +func (o *V1ProjectClustersNodesAutoRemediationSettingUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 project clusters nodes auto remediation setting update params +func (o *V1ProjectClustersNodesAutoRemediationSettingUpdateParams) WithBody(body *models.V1NodesAutoRemediationSettings) *V1ProjectClustersNodesAutoRemediationSettingUpdateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 project clusters nodes auto remediation setting update params +func (o *V1ProjectClustersNodesAutoRemediationSettingUpdateParams) SetBody(body *models.V1NodesAutoRemediationSettings) { + o.Body = body +} + +// WithUID adds the uid to the v1 project clusters nodes auto remediation setting update params +func (o *V1ProjectClustersNodesAutoRemediationSettingUpdateParams) WithUID(uid string) *V1ProjectClustersNodesAutoRemediationSettingUpdateParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 project clusters nodes auto remediation setting update params +func (o *V1ProjectClustersNodesAutoRemediationSettingUpdateParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1ProjectClustersNodesAutoRemediationSettingUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_project_clusters_nodes_auto_remediation_setting_update_responses.go b/api/client/v1/v1_project_clusters_nodes_auto_remediation_setting_update_responses.go new file mode 100644 index 00000000..1e360c70 --- /dev/null +++ b/api/client/v1/v1_project_clusters_nodes_auto_remediation_setting_update_responses.go @@ -0,0 +1,61 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1ProjectClustersNodesAutoRemediationSettingUpdateReader is a Reader for the V1ProjectClustersNodesAutoRemediationSettingUpdate structure. +type V1ProjectClustersNodesAutoRemediationSettingUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1ProjectClustersNodesAutoRemediationSettingUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1ProjectClustersNodesAutoRemediationSettingUpdateNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1ProjectClustersNodesAutoRemediationSettingUpdateNoContent creates a V1ProjectClustersNodesAutoRemediationSettingUpdateNoContent with default headers values +func NewV1ProjectClustersNodesAutoRemediationSettingUpdateNoContent() *V1ProjectClustersNodesAutoRemediationSettingUpdateNoContent { + return &V1ProjectClustersNodesAutoRemediationSettingUpdateNoContent{} +} + +/* +V1ProjectClustersNodesAutoRemediationSettingUpdateNoContent handles this case with default header values. + +Ok response without content +*/ +type V1ProjectClustersNodesAutoRemediationSettingUpdateNoContent struct { + /*Audit uid for the request + */ + AuditUID string +} + +func (o *V1ProjectClustersNodesAutoRemediationSettingUpdateNoContent) Error() string { + return fmt.Sprintf("[PUT /v1/projects/{uid}/preferences/clusterSettings/nodesAutoRemediationSetting][%d] v1ProjectClustersNodesAutoRemediationSettingUpdateNoContent ", 204) +} + +func (o *V1ProjectClustersNodesAutoRemediationSettingUpdateNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header AuditUid + o.AuditUID = response.GetHeader("AuditUid") + + return nil +} diff --git a/api/client/v1/v1_projects_alerts_parameters.go b/api/client/v1/v1_projects_alerts_parameters.go new file mode 100644 index 00000000..de030b7c --- /dev/null +++ b/api/client/v1/v1_projects_alerts_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1ProjectsAlertsParams creates a new V1ProjectsAlertsParams object +// with the default values initialized. +func NewV1ProjectsAlertsParams() *V1ProjectsAlertsParams { + + return &V1ProjectsAlertsParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1ProjectsAlertsParamsWithTimeout creates a new V1ProjectsAlertsParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1ProjectsAlertsParamsWithTimeout(timeout time.Duration) *V1ProjectsAlertsParams { + + return &V1ProjectsAlertsParams{ + + timeout: timeout, + } +} + +// NewV1ProjectsAlertsParamsWithContext creates a new V1ProjectsAlertsParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1ProjectsAlertsParamsWithContext(ctx context.Context) *V1ProjectsAlertsParams { + + return &V1ProjectsAlertsParams{ + + Context: ctx, + } +} + +// NewV1ProjectsAlertsParamsWithHTTPClient creates a new V1ProjectsAlertsParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1ProjectsAlertsParamsWithHTTPClient(client *http.Client) *V1ProjectsAlertsParams { + + return &V1ProjectsAlertsParams{ + HTTPClient: client, + } +} + +/* +V1ProjectsAlertsParams contains all the parameters to send to the API endpoint +for the v1 projects alerts operation typically these are written to a http.Request +*/ +type V1ProjectsAlertsParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 projects alerts params +func (o *V1ProjectsAlertsParams) WithTimeout(timeout time.Duration) *V1ProjectsAlertsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 projects alerts params +func (o *V1ProjectsAlertsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 projects alerts params +func (o *V1ProjectsAlertsParams) WithContext(ctx context.Context) *V1ProjectsAlertsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 projects alerts params +func (o *V1ProjectsAlertsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 projects alerts params +func (o *V1ProjectsAlertsParams) WithHTTPClient(client *http.Client) *V1ProjectsAlertsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 projects alerts params +func (o *V1ProjectsAlertsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *V1ProjectsAlertsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_projects_alerts_responses.go b/api/client/v1/v1_projects_alerts_responses.go new file mode 100644 index 00000000..69fb2580 --- /dev/null +++ b/api/client/v1/v1_projects_alerts_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1ProjectsAlertsReader is a Reader for the V1ProjectsAlerts structure. +type V1ProjectsAlertsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1ProjectsAlertsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1ProjectsAlertsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1ProjectsAlertsOK creates a V1ProjectsAlertsOK with default headers values +func NewV1ProjectsAlertsOK() *V1ProjectsAlertsOK { + return &V1ProjectsAlertsOK{} +} + +/* +V1ProjectsAlertsOK handles this case with default header values. + +An array of alert components +*/ +type V1ProjectsAlertsOK struct { + Payload *models.V1ProjectAlertComponents +} + +func (o *V1ProjectsAlertsOK) Error() string { + return fmt.Sprintf("[GET /v1/projects/alerts][%d] v1ProjectsAlertsOK %+v", 200, o.Payload) +} + +func (o *V1ProjectsAlertsOK) GetPayload() *models.V1ProjectAlertComponents { + return o.Payload +} + +func (o *V1ProjectsAlertsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1ProjectAlertComponents) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_projects_create_parameters.go b/api/client/v1/v1_projects_create_parameters.go new file mode 100644 index 00000000..c3bcb6a7 --- /dev/null +++ b/api/client/v1/v1_projects_create_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1ProjectsCreateParams creates a new V1ProjectsCreateParams object +// with the default values initialized. +func NewV1ProjectsCreateParams() *V1ProjectsCreateParams { + var () + return &V1ProjectsCreateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1ProjectsCreateParamsWithTimeout creates a new V1ProjectsCreateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1ProjectsCreateParamsWithTimeout(timeout time.Duration) *V1ProjectsCreateParams { + var () + return &V1ProjectsCreateParams{ + + timeout: timeout, + } +} + +// NewV1ProjectsCreateParamsWithContext creates a new V1ProjectsCreateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1ProjectsCreateParamsWithContext(ctx context.Context) *V1ProjectsCreateParams { + var () + return &V1ProjectsCreateParams{ + + Context: ctx, + } +} + +// NewV1ProjectsCreateParamsWithHTTPClient creates a new V1ProjectsCreateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1ProjectsCreateParamsWithHTTPClient(client *http.Client) *V1ProjectsCreateParams { + var () + return &V1ProjectsCreateParams{ + HTTPClient: client, + } +} + +/* +V1ProjectsCreateParams contains all the parameters to send to the API endpoint +for the v1 projects create operation typically these are written to a http.Request +*/ +type V1ProjectsCreateParams struct { + + /*Body*/ + Body *models.V1ProjectEntity + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 projects create params +func (o *V1ProjectsCreateParams) WithTimeout(timeout time.Duration) *V1ProjectsCreateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 projects create params +func (o *V1ProjectsCreateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 projects create params +func (o *V1ProjectsCreateParams) WithContext(ctx context.Context) *V1ProjectsCreateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 projects create params +func (o *V1ProjectsCreateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 projects create params +func (o *V1ProjectsCreateParams) WithHTTPClient(client *http.Client) *V1ProjectsCreateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 projects create params +func (o *V1ProjectsCreateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 projects create params +func (o *V1ProjectsCreateParams) WithBody(body *models.V1ProjectEntity) *V1ProjectsCreateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 projects create params +func (o *V1ProjectsCreateParams) SetBody(body *models.V1ProjectEntity) { + o.Body = body +} + +// WriteToRequest writes these params to a swagger request +func (o *V1ProjectsCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_projects_create_responses.go b/api/client/v1/v1_projects_create_responses.go new file mode 100644 index 00000000..183a2b84 --- /dev/null +++ b/api/client/v1/v1_projects_create_responses.go @@ -0,0 +1,77 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1ProjectsCreateReader is a Reader for the V1ProjectsCreate structure. +type V1ProjectsCreateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1ProjectsCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 201: + result := NewV1ProjectsCreateCreated() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1ProjectsCreateCreated creates a V1ProjectsCreateCreated with default headers values +func NewV1ProjectsCreateCreated() *V1ProjectsCreateCreated { + return &V1ProjectsCreateCreated{} +} + +/* +V1ProjectsCreateCreated handles this case with default header values. + +Created successfully +*/ +type V1ProjectsCreateCreated struct { + /*Audit uid for the request + */ + AuditUID string + + Payload *models.V1UID +} + +func (o *V1ProjectsCreateCreated) Error() string { + return fmt.Sprintf("[POST /v1/projects][%d] v1ProjectsCreateCreated %+v", 201, o.Payload) +} + +func (o *V1ProjectsCreateCreated) GetPayload() *models.V1UID { + return o.Payload +} + +func (o *V1ProjectsCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header AuditUid + o.AuditUID = response.GetHeader("AuditUid") + + o.Payload = new(models.V1UID) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_projects_filter_summary_parameters.go b/api/client/v1/v1_projects_filter_summary_parameters.go new file mode 100644 index 00000000..ac085ef2 --- /dev/null +++ b/api/client/v1/v1_projects_filter_summary_parameters.go @@ -0,0 +1,246 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1ProjectsFilterSummaryParams creates a new V1ProjectsFilterSummaryParams object +// with the default values initialized. +func NewV1ProjectsFilterSummaryParams() *V1ProjectsFilterSummaryParams { + var ( + limitDefault = int64(50) + ) + return &V1ProjectsFilterSummaryParams{ + Limit: &limitDefault, + + timeout: cr.DefaultTimeout, + } +} + +// NewV1ProjectsFilterSummaryParamsWithTimeout creates a new V1ProjectsFilterSummaryParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1ProjectsFilterSummaryParamsWithTimeout(timeout time.Duration) *V1ProjectsFilterSummaryParams { + var ( + limitDefault = int64(50) + ) + return &V1ProjectsFilterSummaryParams{ + Limit: &limitDefault, + + timeout: timeout, + } +} + +// NewV1ProjectsFilterSummaryParamsWithContext creates a new V1ProjectsFilterSummaryParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1ProjectsFilterSummaryParamsWithContext(ctx context.Context) *V1ProjectsFilterSummaryParams { + var ( + limitDefault = int64(50) + ) + return &V1ProjectsFilterSummaryParams{ + Limit: &limitDefault, + + Context: ctx, + } +} + +// NewV1ProjectsFilterSummaryParamsWithHTTPClient creates a new V1ProjectsFilterSummaryParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1ProjectsFilterSummaryParamsWithHTTPClient(client *http.Client) *V1ProjectsFilterSummaryParams { + var ( + limitDefault = int64(50) + ) + return &V1ProjectsFilterSummaryParams{ + Limit: &limitDefault, + HTTPClient: client, + } +} + +/* +V1ProjectsFilterSummaryParams contains all the parameters to send to the API endpoint +for the v1 projects filter summary operation typically these are written to a http.Request +*/ +type V1ProjectsFilterSummaryParams struct { + + /*Body*/ + Body *models.V1ProjectsFilterSpec + /*Continue + continue token to paginate the subsequent data items + + */ + Continue *string + /*Limit + limit is a maximum number of responses to return for a list call. Default and maximum value of the limit is 50. + If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. + + */ + Limit *int64 + /*Offset + offset is the next index number from which the response will start. The response offset value can be used along with continue token for the pagination. + + */ + Offset *int64 + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 projects filter summary params +func (o *V1ProjectsFilterSummaryParams) WithTimeout(timeout time.Duration) *V1ProjectsFilterSummaryParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 projects filter summary params +func (o *V1ProjectsFilterSummaryParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 projects filter summary params +func (o *V1ProjectsFilterSummaryParams) WithContext(ctx context.Context) *V1ProjectsFilterSummaryParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 projects filter summary params +func (o *V1ProjectsFilterSummaryParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 projects filter summary params +func (o *V1ProjectsFilterSummaryParams) WithHTTPClient(client *http.Client) *V1ProjectsFilterSummaryParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 projects filter summary params +func (o *V1ProjectsFilterSummaryParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 projects filter summary params +func (o *V1ProjectsFilterSummaryParams) WithBody(body *models.V1ProjectsFilterSpec) *V1ProjectsFilterSummaryParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 projects filter summary params +func (o *V1ProjectsFilterSummaryParams) SetBody(body *models.V1ProjectsFilterSpec) { + o.Body = body +} + +// WithContinue adds the continueVar to the v1 projects filter summary params +func (o *V1ProjectsFilterSummaryParams) WithContinue(continueVar *string) *V1ProjectsFilterSummaryParams { + o.SetContinue(continueVar) + return o +} + +// SetContinue adds the continue to the v1 projects filter summary params +func (o *V1ProjectsFilterSummaryParams) SetContinue(continueVar *string) { + o.Continue = continueVar +} + +// WithLimit adds the limit to the v1 projects filter summary params +func (o *V1ProjectsFilterSummaryParams) WithLimit(limit *int64) *V1ProjectsFilterSummaryParams { + o.SetLimit(limit) + return o +} + +// SetLimit adds the limit to the v1 projects filter summary params +func (o *V1ProjectsFilterSummaryParams) SetLimit(limit *int64) { + o.Limit = limit +} + +// WithOffset adds the offset to the v1 projects filter summary params +func (o *V1ProjectsFilterSummaryParams) WithOffset(offset *int64) *V1ProjectsFilterSummaryParams { + o.SetOffset(offset) + return o +} + +// SetOffset adds the offset to the v1 projects filter summary params +func (o *V1ProjectsFilterSummaryParams) SetOffset(offset *int64) { + o.Offset = offset +} + +// WriteToRequest writes these params to a swagger request +func (o *V1ProjectsFilterSummaryParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + if o.Continue != nil { + + // query param continue + var qrContinue string + if o.Continue != nil { + qrContinue = *o.Continue + } + qContinue := qrContinue + if qContinue != "" { + if err := r.SetQueryParam("continue", qContinue); err != nil { + return err + } + } + + } + + if o.Limit != nil { + + // query param limit + var qrLimit int64 + if o.Limit != nil { + qrLimit = *o.Limit + } + qLimit := swag.FormatInt64(qrLimit) + if qLimit != "" { + if err := r.SetQueryParam("limit", qLimit); err != nil { + return err + } + } + + } + + if o.Offset != nil { + + // query param offset + var qrOffset int64 + if o.Offset != nil { + qrOffset = *o.Offset + } + qOffset := swag.FormatInt64(qrOffset) + if qOffset != "" { + if err := r.SetQueryParam("offset", qOffset); err != nil { + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_projects_filter_summary_responses.go b/api/client/v1/v1_projects_filter_summary_responses.go new file mode 100644 index 00000000..30335ca1 --- /dev/null +++ b/api/client/v1/v1_projects_filter_summary_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1ProjectsFilterSummaryReader is a Reader for the V1ProjectsFilterSummary structure. +type V1ProjectsFilterSummaryReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1ProjectsFilterSummaryReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1ProjectsFilterSummaryOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1ProjectsFilterSummaryOK creates a V1ProjectsFilterSummaryOK with default headers values +func NewV1ProjectsFilterSummaryOK() *V1ProjectsFilterSummaryOK { + return &V1ProjectsFilterSummaryOK{} +} + +/* +V1ProjectsFilterSummaryOK handles this case with default header values. + +An array of project filter summary items +*/ +type V1ProjectsFilterSummaryOK struct { + Payload *models.V1ProjectsSummary +} + +func (o *V1ProjectsFilterSummaryOK) Error() string { + return fmt.Sprintf("[POST /v1/dashboard/projects][%d] v1ProjectsFilterSummaryOK %+v", 200, o.Payload) +} + +func (o *V1ProjectsFilterSummaryOK) GetPayload() *models.V1ProjectsSummary { + return o.Payload +} + +func (o *V1ProjectsFilterSummaryOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1ProjectsSummary) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_projects_metadata_parameters.go b/api/client/v1/v1_projects_metadata_parameters.go new file mode 100644 index 00000000..df263a81 --- /dev/null +++ b/api/client/v1/v1_projects_metadata_parameters.go @@ -0,0 +1,147 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1ProjectsMetadataParams creates a new V1ProjectsMetadataParams object +// with the default values initialized. +func NewV1ProjectsMetadataParams() *V1ProjectsMetadataParams { + var () + return &V1ProjectsMetadataParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1ProjectsMetadataParamsWithTimeout creates a new V1ProjectsMetadataParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1ProjectsMetadataParamsWithTimeout(timeout time.Duration) *V1ProjectsMetadataParams { + var () + return &V1ProjectsMetadataParams{ + + timeout: timeout, + } +} + +// NewV1ProjectsMetadataParamsWithContext creates a new V1ProjectsMetadataParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1ProjectsMetadataParamsWithContext(ctx context.Context) *V1ProjectsMetadataParams { + var () + return &V1ProjectsMetadataParams{ + + Context: ctx, + } +} + +// NewV1ProjectsMetadataParamsWithHTTPClient creates a new V1ProjectsMetadataParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1ProjectsMetadataParamsWithHTTPClient(client *http.Client) *V1ProjectsMetadataParams { + var () + return &V1ProjectsMetadataParams{ + HTTPClient: client, + } +} + +/* +V1ProjectsMetadataParams contains all the parameters to send to the API endpoint +for the v1 projects metadata operation typically these are written to a http.Request +*/ +type V1ProjectsMetadataParams struct { + + /*Name + Name of the project + + */ + Name *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 projects metadata params +func (o *V1ProjectsMetadataParams) WithTimeout(timeout time.Duration) *V1ProjectsMetadataParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 projects metadata params +func (o *V1ProjectsMetadataParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 projects metadata params +func (o *V1ProjectsMetadataParams) WithContext(ctx context.Context) *V1ProjectsMetadataParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 projects metadata params +func (o *V1ProjectsMetadataParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 projects metadata params +func (o *V1ProjectsMetadataParams) WithHTTPClient(client *http.Client) *V1ProjectsMetadataParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 projects metadata params +func (o *V1ProjectsMetadataParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithName adds the name to the v1 projects metadata params +func (o *V1ProjectsMetadataParams) WithName(name *string) *V1ProjectsMetadataParams { + o.SetName(name) + return o +} + +// SetName adds the name to the v1 projects metadata params +func (o *V1ProjectsMetadataParams) SetName(name *string) { + o.Name = name +} + +// WriteToRequest writes these params to a swagger request +func (o *V1ProjectsMetadataParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Name != nil { + + // query param name + var qrName string + if o.Name != nil { + qrName = *o.Name + } + qName := qrName + if qName != "" { + if err := r.SetQueryParam("name", qName); err != nil { + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_projects_metadata_responses.go b/api/client/v1/v1_projects_metadata_responses.go new file mode 100644 index 00000000..885d7013 --- /dev/null +++ b/api/client/v1/v1_projects_metadata_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1ProjectsMetadataReader is a Reader for the V1ProjectsMetadata structure. +type V1ProjectsMetadataReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1ProjectsMetadataReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1ProjectsMetadataOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1ProjectsMetadataOK creates a V1ProjectsMetadataOK with default headers values +func NewV1ProjectsMetadataOK() *V1ProjectsMetadataOK { + return &V1ProjectsMetadataOK{} +} + +/* +V1ProjectsMetadataOK handles this case with default header values. + +An array of project metadata items +*/ +type V1ProjectsMetadataOK struct { + Payload *models.V1ProjectsMetadata +} + +func (o *V1ProjectsMetadataOK) Error() string { + return fmt.Sprintf("[GET /v1/dashboard/projects/metadata][%d] v1ProjectsMetadataOK %+v", 200, o.Payload) +} + +func (o *V1ProjectsMetadataOK) GetPayload() *models.V1ProjectsMetadata { + return o.Payload +} + +func (o *V1ProjectsMetadataOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1ProjectsMetadata) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_projects_uid_alert_create_parameters.go b/api/client/v1/v1_projects_uid_alert_create_parameters.go new file mode 100644 index 00000000..446cf418 --- /dev/null +++ b/api/client/v1/v1_projects_uid_alert_create_parameters.go @@ -0,0 +1,172 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1ProjectsUIDAlertCreateParams creates a new V1ProjectsUIDAlertCreateParams object +// with the default values initialized. +func NewV1ProjectsUIDAlertCreateParams() *V1ProjectsUIDAlertCreateParams { + var () + return &V1ProjectsUIDAlertCreateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1ProjectsUIDAlertCreateParamsWithTimeout creates a new V1ProjectsUIDAlertCreateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1ProjectsUIDAlertCreateParamsWithTimeout(timeout time.Duration) *V1ProjectsUIDAlertCreateParams { + var () + return &V1ProjectsUIDAlertCreateParams{ + + timeout: timeout, + } +} + +// NewV1ProjectsUIDAlertCreateParamsWithContext creates a new V1ProjectsUIDAlertCreateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1ProjectsUIDAlertCreateParamsWithContext(ctx context.Context) *V1ProjectsUIDAlertCreateParams { + var () + return &V1ProjectsUIDAlertCreateParams{ + + Context: ctx, + } +} + +// NewV1ProjectsUIDAlertCreateParamsWithHTTPClient creates a new V1ProjectsUIDAlertCreateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1ProjectsUIDAlertCreateParamsWithHTTPClient(client *http.Client) *V1ProjectsUIDAlertCreateParams { + var () + return &V1ProjectsUIDAlertCreateParams{ + HTTPClient: client, + } +} + +/* +V1ProjectsUIDAlertCreateParams contains all the parameters to send to the API endpoint +for the v1 projects Uid alert create operation typically these are written to a http.Request +*/ +type V1ProjectsUIDAlertCreateParams struct { + + /*Body*/ + Body *models.V1Channel + /*Component*/ + Component string + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 projects Uid alert create params +func (o *V1ProjectsUIDAlertCreateParams) WithTimeout(timeout time.Duration) *V1ProjectsUIDAlertCreateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 projects Uid alert create params +func (o *V1ProjectsUIDAlertCreateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 projects Uid alert create params +func (o *V1ProjectsUIDAlertCreateParams) WithContext(ctx context.Context) *V1ProjectsUIDAlertCreateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 projects Uid alert create params +func (o *V1ProjectsUIDAlertCreateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 projects Uid alert create params +func (o *V1ProjectsUIDAlertCreateParams) WithHTTPClient(client *http.Client) *V1ProjectsUIDAlertCreateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 projects Uid alert create params +func (o *V1ProjectsUIDAlertCreateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 projects Uid alert create params +func (o *V1ProjectsUIDAlertCreateParams) WithBody(body *models.V1Channel) *V1ProjectsUIDAlertCreateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 projects Uid alert create params +func (o *V1ProjectsUIDAlertCreateParams) SetBody(body *models.V1Channel) { + o.Body = body +} + +// WithComponent adds the component to the v1 projects Uid alert create params +func (o *V1ProjectsUIDAlertCreateParams) WithComponent(component string) *V1ProjectsUIDAlertCreateParams { + o.SetComponent(component) + return o +} + +// SetComponent adds the component to the v1 projects Uid alert create params +func (o *V1ProjectsUIDAlertCreateParams) SetComponent(component string) { + o.Component = component +} + +// WithUID adds the uid to the v1 projects Uid alert create params +func (o *V1ProjectsUIDAlertCreateParams) WithUID(uid string) *V1ProjectsUIDAlertCreateParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 projects Uid alert create params +func (o *V1ProjectsUIDAlertCreateParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1ProjectsUIDAlertCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param component + if err := r.SetPathParam("component", o.Component); err != nil { + return err + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_projects_uid_alert_create_responses.go b/api/client/v1/v1_projects_uid_alert_create_responses.go new file mode 100644 index 00000000..874f714c --- /dev/null +++ b/api/client/v1/v1_projects_uid_alert_create_responses.go @@ -0,0 +1,77 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1ProjectsUIDAlertCreateReader is a Reader for the V1ProjectsUIDAlertCreate structure. +type V1ProjectsUIDAlertCreateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1ProjectsUIDAlertCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 201: + result := NewV1ProjectsUIDAlertCreateCreated() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1ProjectsUIDAlertCreateCreated creates a V1ProjectsUIDAlertCreateCreated with default headers values +func NewV1ProjectsUIDAlertCreateCreated() *V1ProjectsUIDAlertCreateCreated { + return &V1ProjectsUIDAlertCreateCreated{} +} + +/* +V1ProjectsUIDAlertCreateCreated handles this case with default header values. + +Created successfully +*/ +type V1ProjectsUIDAlertCreateCreated struct { + /*Audit uid for the request + */ + AuditUID string + + Payload *models.V1UID +} + +func (o *V1ProjectsUIDAlertCreateCreated) Error() string { + return fmt.Sprintf("[POST /v1/projects/{uid}/alerts/{component}][%d] v1ProjectsUidAlertCreateCreated %+v", 201, o.Payload) +} + +func (o *V1ProjectsUIDAlertCreateCreated) GetPayload() *models.V1UID { + return o.Payload +} + +func (o *V1ProjectsUIDAlertCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header AuditUid + o.AuditUID = response.GetHeader("AuditUid") + + o.Payload = new(models.V1UID) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_projects_uid_alert_delete_parameters.go b/api/client/v1/v1_projects_uid_alert_delete_parameters.go new file mode 100644 index 00000000..55cf4fb1 --- /dev/null +++ b/api/client/v1/v1_projects_uid_alert_delete_parameters.go @@ -0,0 +1,151 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1ProjectsUIDAlertDeleteParams creates a new V1ProjectsUIDAlertDeleteParams object +// with the default values initialized. +func NewV1ProjectsUIDAlertDeleteParams() *V1ProjectsUIDAlertDeleteParams { + var () + return &V1ProjectsUIDAlertDeleteParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1ProjectsUIDAlertDeleteParamsWithTimeout creates a new V1ProjectsUIDAlertDeleteParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1ProjectsUIDAlertDeleteParamsWithTimeout(timeout time.Duration) *V1ProjectsUIDAlertDeleteParams { + var () + return &V1ProjectsUIDAlertDeleteParams{ + + timeout: timeout, + } +} + +// NewV1ProjectsUIDAlertDeleteParamsWithContext creates a new V1ProjectsUIDAlertDeleteParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1ProjectsUIDAlertDeleteParamsWithContext(ctx context.Context) *V1ProjectsUIDAlertDeleteParams { + var () + return &V1ProjectsUIDAlertDeleteParams{ + + Context: ctx, + } +} + +// NewV1ProjectsUIDAlertDeleteParamsWithHTTPClient creates a new V1ProjectsUIDAlertDeleteParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1ProjectsUIDAlertDeleteParamsWithHTTPClient(client *http.Client) *V1ProjectsUIDAlertDeleteParams { + var () + return &V1ProjectsUIDAlertDeleteParams{ + HTTPClient: client, + } +} + +/* +V1ProjectsUIDAlertDeleteParams contains all the parameters to send to the API endpoint +for the v1 projects Uid alert delete operation typically these are written to a http.Request +*/ +type V1ProjectsUIDAlertDeleteParams struct { + + /*Component*/ + Component string + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 projects Uid alert delete params +func (o *V1ProjectsUIDAlertDeleteParams) WithTimeout(timeout time.Duration) *V1ProjectsUIDAlertDeleteParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 projects Uid alert delete params +func (o *V1ProjectsUIDAlertDeleteParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 projects Uid alert delete params +func (o *V1ProjectsUIDAlertDeleteParams) WithContext(ctx context.Context) *V1ProjectsUIDAlertDeleteParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 projects Uid alert delete params +func (o *V1ProjectsUIDAlertDeleteParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 projects Uid alert delete params +func (o *V1ProjectsUIDAlertDeleteParams) WithHTTPClient(client *http.Client) *V1ProjectsUIDAlertDeleteParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 projects Uid alert delete params +func (o *V1ProjectsUIDAlertDeleteParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithComponent adds the component to the v1 projects Uid alert delete params +func (o *V1ProjectsUIDAlertDeleteParams) WithComponent(component string) *V1ProjectsUIDAlertDeleteParams { + o.SetComponent(component) + return o +} + +// SetComponent adds the component to the v1 projects Uid alert delete params +func (o *V1ProjectsUIDAlertDeleteParams) SetComponent(component string) { + o.Component = component +} + +// WithUID adds the uid to the v1 projects Uid alert delete params +func (o *V1ProjectsUIDAlertDeleteParams) WithUID(uid string) *V1ProjectsUIDAlertDeleteParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 projects Uid alert delete params +func (o *V1ProjectsUIDAlertDeleteParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1ProjectsUIDAlertDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param component + if err := r.SetPathParam("component", o.Component); err != nil { + return err + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_projects_uid_alert_delete_responses.go b/api/client/v1/v1_projects_uid_alert_delete_responses.go new file mode 100644 index 00000000..b1931c86 --- /dev/null +++ b/api/client/v1/v1_projects_uid_alert_delete_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1ProjectsUIDAlertDeleteReader is a Reader for the V1ProjectsUIDAlertDelete structure. +type V1ProjectsUIDAlertDeleteReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1ProjectsUIDAlertDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1ProjectsUIDAlertDeleteNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1ProjectsUIDAlertDeleteNoContent creates a V1ProjectsUIDAlertDeleteNoContent with default headers values +func NewV1ProjectsUIDAlertDeleteNoContent() *V1ProjectsUIDAlertDeleteNoContent { + return &V1ProjectsUIDAlertDeleteNoContent{} +} + +/* +V1ProjectsUIDAlertDeleteNoContent handles this case with default header values. + +The resource was deleted successfully +*/ +type V1ProjectsUIDAlertDeleteNoContent struct { +} + +func (o *V1ProjectsUIDAlertDeleteNoContent) Error() string { + return fmt.Sprintf("[DELETE /v1/projects/{uid}/alerts/{component}][%d] v1ProjectsUidAlertDeleteNoContent ", 204) +} + +func (o *V1ProjectsUIDAlertDeleteNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_projects_uid_alert_update_parameters.go b/api/client/v1/v1_projects_uid_alert_update_parameters.go new file mode 100644 index 00000000..95a42991 --- /dev/null +++ b/api/client/v1/v1_projects_uid_alert_update_parameters.go @@ -0,0 +1,172 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1ProjectsUIDAlertUpdateParams creates a new V1ProjectsUIDAlertUpdateParams object +// with the default values initialized. +func NewV1ProjectsUIDAlertUpdateParams() *V1ProjectsUIDAlertUpdateParams { + var () + return &V1ProjectsUIDAlertUpdateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1ProjectsUIDAlertUpdateParamsWithTimeout creates a new V1ProjectsUIDAlertUpdateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1ProjectsUIDAlertUpdateParamsWithTimeout(timeout time.Duration) *V1ProjectsUIDAlertUpdateParams { + var () + return &V1ProjectsUIDAlertUpdateParams{ + + timeout: timeout, + } +} + +// NewV1ProjectsUIDAlertUpdateParamsWithContext creates a new V1ProjectsUIDAlertUpdateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1ProjectsUIDAlertUpdateParamsWithContext(ctx context.Context) *V1ProjectsUIDAlertUpdateParams { + var () + return &V1ProjectsUIDAlertUpdateParams{ + + Context: ctx, + } +} + +// NewV1ProjectsUIDAlertUpdateParamsWithHTTPClient creates a new V1ProjectsUIDAlertUpdateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1ProjectsUIDAlertUpdateParamsWithHTTPClient(client *http.Client) *V1ProjectsUIDAlertUpdateParams { + var () + return &V1ProjectsUIDAlertUpdateParams{ + HTTPClient: client, + } +} + +/* +V1ProjectsUIDAlertUpdateParams contains all the parameters to send to the API endpoint +for the v1 projects Uid alert update operation typically these are written to a http.Request +*/ +type V1ProjectsUIDAlertUpdateParams struct { + + /*Body*/ + Body *models.V1AlertEntity + /*Component*/ + Component string + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 projects Uid alert update params +func (o *V1ProjectsUIDAlertUpdateParams) WithTimeout(timeout time.Duration) *V1ProjectsUIDAlertUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 projects Uid alert update params +func (o *V1ProjectsUIDAlertUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 projects Uid alert update params +func (o *V1ProjectsUIDAlertUpdateParams) WithContext(ctx context.Context) *V1ProjectsUIDAlertUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 projects Uid alert update params +func (o *V1ProjectsUIDAlertUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 projects Uid alert update params +func (o *V1ProjectsUIDAlertUpdateParams) WithHTTPClient(client *http.Client) *V1ProjectsUIDAlertUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 projects Uid alert update params +func (o *V1ProjectsUIDAlertUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 projects Uid alert update params +func (o *V1ProjectsUIDAlertUpdateParams) WithBody(body *models.V1AlertEntity) *V1ProjectsUIDAlertUpdateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 projects Uid alert update params +func (o *V1ProjectsUIDAlertUpdateParams) SetBody(body *models.V1AlertEntity) { + o.Body = body +} + +// WithComponent adds the component to the v1 projects Uid alert update params +func (o *V1ProjectsUIDAlertUpdateParams) WithComponent(component string) *V1ProjectsUIDAlertUpdateParams { + o.SetComponent(component) + return o +} + +// SetComponent adds the component to the v1 projects Uid alert update params +func (o *V1ProjectsUIDAlertUpdateParams) SetComponent(component string) { + o.Component = component +} + +// WithUID adds the uid to the v1 projects Uid alert update params +func (o *V1ProjectsUIDAlertUpdateParams) WithUID(uid string) *V1ProjectsUIDAlertUpdateParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 projects Uid alert update params +func (o *V1ProjectsUIDAlertUpdateParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1ProjectsUIDAlertUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param component + if err := r.SetPathParam("component", o.Component); err != nil { + return err + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_projects_uid_alert_update_responses.go b/api/client/v1/v1_projects_uid_alert_update_responses.go new file mode 100644 index 00000000..711804ab --- /dev/null +++ b/api/client/v1/v1_projects_uid_alert_update_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1ProjectsUIDAlertUpdateReader is a Reader for the V1ProjectsUIDAlertUpdate structure. +type V1ProjectsUIDAlertUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1ProjectsUIDAlertUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1ProjectsUIDAlertUpdateNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1ProjectsUIDAlertUpdateNoContent creates a V1ProjectsUIDAlertUpdateNoContent with default headers values +func NewV1ProjectsUIDAlertUpdateNoContent() *V1ProjectsUIDAlertUpdateNoContent { + return &V1ProjectsUIDAlertUpdateNoContent{} +} + +/* +V1ProjectsUIDAlertUpdateNoContent handles this case with default header values. + +The resource was updated successfully +*/ +type V1ProjectsUIDAlertUpdateNoContent struct { +} + +func (o *V1ProjectsUIDAlertUpdateNoContent) Error() string { + return fmt.Sprintf("[PUT /v1/projects/{uid}/alerts/{component}][%d] v1ProjectsUidAlertUpdateNoContent ", 204) +} + +func (o *V1ProjectsUIDAlertUpdateNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_projects_uid_alerts_uid_delete_parameters.go b/api/client/v1/v1_projects_uid_alerts_uid_delete_parameters.go new file mode 100644 index 00000000..224a598f --- /dev/null +++ b/api/client/v1/v1_projects_uid_alerts_uid_delete_parameters.go @@ -0,0 +1,169 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1ProjectsUIDAlertsUIDDeleteParams creates a new V1ProjectsUIDAlertsUIDDeleteParams object +// with the default values initialized. +func NewV1ProjectsUIDAlertsUIDDeleteParams() *V1ProjectsUIDAlertsUIDDeleteParams { + var () + return &V1ProjectsUIDAlertsUIDDeleteParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1ProjectsUIDAlertsUIDDeleteParamsWithTimeout creates a new V1ProjectsUIDAlertsUIDDeleteParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1ProjectsUIDAlertsUIDDeleteParamsWithTimeout(timeout time.Duration) *V1ProjectsUIDAlertsUIDDeleteParams { + var () + return &V1ProjectsUIDAlertsUIDDeleteParams{ + + timeout: timeout, + } +} + +// NewV1ProjectsUIDAlertsUIDDeleteParamsWithContext creates a new V1ProjectsUIDAlertsUIDDeleteParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1ProjectsUIDAlertsUIDDeleteParamsWithContext(ctx context.Context) *V1ProjectsUIDAlertsUIDDeleteParams { + var () + return &V1ProjectsUIDAlertsUIDDeleteParams{ + + Context: ctx, + } +} + +// NewV1ProjectsUIDAlertsUIDDeleteParamsWithHTTPClient creates a new V1ProjectsUIDAlertsUIDDeleteParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1ProjectsUIDAlertsUIDDeleteParamsWithHTTPClient(client *http.Client) *V1ProjectsUIDAlertsUIDDeleteParams { + var () + return &V1ProjectsUIDAlertsUIDDeleteParams{ + HTTPClient: client, + } +} + +/* +V1ProjectsUIDAlertsUIDDeleteParams contains all the parameters to send to the API endpoint +for the v1 projects Uid alerts Uid delete operation typically these are written to a http.Request +*/ +type V1ProjectsUIDAlertsUIDDeleteParams struct { + + /*AlertUID*/ + AlertUID string + /*Component*/ + Component string + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 projects Uid alerts Uid delete params +func (o *V1ProjectsUIDAlertsUIDDeleteParams) WithTimeout(timeout time.Duration) *V1ProjectsUIDAlertsUIDDeleteParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 projects Uid alerts Uid delete params +func (o *V1ProjectsUIDAlertsUIDDeleteParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 projects Uid alerts Uid delete params +func (o *V1ProjectsUIDAlertsUIDDeleteParams) WithContext(ctx context.Context) *V1ProjectsUIDAlertsUIDDeleteParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 projects Uid alerts Uid delete params +func (o *V1ProjectsUIDAlertsUIDDeleteParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 projects Uid alerts Uid delete params +func (o *V1ProjectsUIDAlertsUIDDeleteParams) WithHTTPClient(client *http.Client) *V1ProjectsUIDAlertsUIDDeleteParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 projects Uid alerts Uid delete params +func (o *V1ProjectsUIDAlertsUIDDeleteParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithAlertUID adds the alertUID to the v1 projects Uid alerts Uid delete params +func (o *V1ProjectsUIDAlertsUIDDeleteParams) WithAlertUID(alertUID string) *V1ProjectsUIDAlertsUIDDeleteParams { + o.SetAlertUID(alertUID) + return o +} + +// SetAlertUID adds the alertUid to the v1 projects Uid alerts Uid delete params +func (o *V1ProjectsUIDAlertsUIDDeleteParams) SetAlertUID(alertUID string) { + o.AlertUID = alertUID +} + +// WithComponent adds the component to the v1 projects Uid alerts Uid delete params +func (o *V1ProjectsUIDAlertsUIDDeleteParams) WithComponent(component string) *V1ProjectsUIDAlertsUIDDeleteParams { + o.SetComponent(component) + return o +} + +// SetComponent adds the component to the v1 projects Uid alerts Uid delete params +func (o *V1ProjectsUIDAlertsUIDDeleteParams) SetComponent(component string) { + o.Component = component +} + +// WithUID adds the uid to the v1 projects Uid alerts Uid delete params +func (o *V1ProjectsUIDAlertsUIDDeleteParams) WithUID(uid string) *V1ProjectsUIDAlertsUIDDeleteParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 projects Uid alerts Uid delete params +func (o *V1ProjectsUIDAlertsUIDDeleteParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1ProjectsUIDAlertsUIDDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param alertUid + if err := r.SetPathParam("alertUid", o.AlertUID); err != nil { + return err + } + + // path param component + if err := r.SetPathParam("component", o.Component); err != nil { + return err + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_projects_uid_alerts_uid_delete_responses.go b/api/client/v1/v1_projects_uid_alerts_uid_delete_responses.go new file mode 100644 index 00000000..05261ef8 --- /dev/null +++ b/api/client/v1/v1_projects_uid_alerts_uid_delete_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1ProjectsUIDAlertsUIDDeleteReader is a Reader for the V1ProjectsUIDAlertsUIDDelete structure. +type V1ProjectsUIDAlertsUIDDeleteReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1ProjectsUIDAlertsUIDDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1ProjectsUIDAlertsUIDDeleteNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1ProjectsUIDAlertsUIDDeleteNoContent creates a V1ProjectsUIDAlertsUIDDeleteNoContent with default headers values +func NewV1ProjectsUIDAlertsUIDDeleteNoContent() *V1ProjectsUIDAlertsUIDDeleteNoContent { + return &V1ProjectsUIDAlertsUIDDeleteNoContent{} +} + +/* +V1ProjectsUIDAlertsUIDDeleteNoContent handles this case with default header values. + +The resource was deleted successfully +*/ +type V1ProjectsUIDAlertsUIDDeleteNoContent struct { +} + +func (o *V1ProjectsUIDAlertsUIDDeleteNoContent) Error() string { + return fmt.Sprintf("[DELETE /v1/projects/{uid}/alerts/{component}/{alertUid}][%d] v1ProjectsUidAlertsUidDeleteNoContent ", 204) +} + +func (o *V1ProjectsUIDAlertsUIDDeleteNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_projects_uid_alerts_uid_get_parameters.go b/api/client/v1/v1_projects_uid_alerts_uid_get_parameters.go new file mode 100644 index 00000000..48b46deb --- /dev/null +++ b/api/client/v1/v1_projects_uid_alerts_uid_get_parameters.go @@ -0,0 +1,169 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1ProjectsUIDAlertsUIDGetParams creates a new V1ProjectsUIDAlertsUIDGetParams object +// with the default values initialized. +func NewV1ProjectsUIDAlertsUIDGetParams() *V1ProjectsUIDAlertsUIDGetParams { + var () + return &V1ProjectsUIDAlertsUIDGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1ProjectsUIDAlertsUIDGetParamsWithTimeout creates a new V1ProjectsUIDAlertsUIDGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1ProjectsUIDAlertsUIDGetParamsWithTimeout(timeout time.Duration) *V1ProjectsUIDAlertsUIDGetParams { + var () + return &V1ProjectsUIDAlertsUIDGetParams{ + + timeout: timeout, + } +} + +// NewV1ProjectsUIDAlertsUIDGetParamsWithContext creates a new V1ProjectsUIDAlertsUIDGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1ProjectsUIDAlertsUIDGetParamsWithContext(ctx context.Context) *V1ProjectsUIDAlertsUIDGetParams { + var () + return &V1ProjectsUIDAlertsUIDGetParams{ + + Context: ctx, + } +} + +// NewV1ProjectsUIDAlertsUIDGetParamsWithHTTPClient creates a new V1ProjectsUIDAlertsUIDGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1ProjectsUIDAlertsUIDGetParamsWithHTTPClient(client *http.Client) *V1ProjectsUIDAlertsUIDGetParams { + var () + return &V1ProjectsUIDAlertsUIDGetParams{ + HTTPClient: client, + } +} + +/* +V1ProjectsUIDAlertsUIDGetParams contains all the parameters to send to the API endpoint +for the v1 projects Uid alerts Uid get operation typically these are written to a http.Request +*/ +type V1ProjectsUIDAlertsUIDGetParams struct { + + /*AlertUID*/ + AlertUID string + /*Component*/ + Component string + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 projects Uid alerts Uid get params +func (o *V1ProjectsUIDAlertsUIDGetParams) WithTimeout(timeout time.Duration) *V1ProjectsUIDAlertsUIDGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 projects Uid alerts Uid get params +func (o *V1ProjectsUIDAlertsUIDGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 projects Uid alerts Uid get params +func (o *V1ProjectsUIDAlertsUIDGetParams) WithContext(ctx context.Context) *V1ProjectsUIDAlertsUIDGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 projects Uid alerts Uid get params +func (o *V1ProjectsUIDAlertsUIDGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 projects Uid alerts Uid get params +func (o *V1ProjectsUIDAlertsUIDGetParams) WithHTTPClient(client *http.Client) *V1ProjectsUIDAlertsUIDGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 projects Uid alerts Uid get params +func (o *V1ProjectsUIDAlertsUIDGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithAlertUID adds the alertUID to the v1 projects Uid alerts Uid get params +func (o *V1ProjectsUIDAlertsUIDGetParams) WithAlertUID(alertUID string) *V1ProjectsUIDAlertsUIDGetParams { + o.SetAlertUID(alertUID) + return o +} + +// SetAlertUID adds the alertUid to the v1 projects Uid alerts Uid get params +func (o *V1ProjectsUIDAlertsUIDGetParams) SetAlertUID(alertUID string) { + o.AlertUID = alertUID +} + +// WithComponent adds the component to the v1 projects Uid alerts Uid get params +func (o *V1ProjectsUIDAlertsUIDGetParams) WithComponent(component string) *V1ProjectsUIDAlertsUIDGetParams { + o.SetComponent(component) + return o +} + +// SetComponent adds the component to the v1 projects Uid alerts Uid get params +func (o *V1ProjectsUIDAlertsUIDGetParams) SetComponent(component string) { + o.Component = component +} + +// WithUID adds the uid to the v1 projects Uid alerts Uid get params +func (o *V1ProjectsUIDAlertsUIDGetParams) WithUID(uid string) *V1ProjectsUIDAlertsUIDGetParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 projects Uid alerts Uid get params +func (o *V1ProjectsUIDAlertsUIDGetParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1ProjectsUIDAlertsUIDGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param alertUid + if err := r.SetPathParam("alertUid", o.AlertUID); err != nil { + return err + } + + // path param component + if err := r.SetPathParam("component", o.Component); err != nil { + return err + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_projects_uid_alerts_uid_get_responses.go b/api/client/v1/v1_projects_uid_alerts_uid_get_responses.go new file mode 100644 index 00000000..dc590bb6 --- /dev/null +++ b/api/client/v1/v1_projects_uid_alerts_uid_get_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1ProjectsUIDAlertsUIDGetReader is a Reader for the V1ProjectsUIDAlertsUIDGet structure. +type V1ProjectsUIDAlertsUIDGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1ProjectsUIDAlertsUIDGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1ProjectsUIDAlertsUIDGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1ProjectsUIDAlertsUIDGetOK creates a V1ProjectsUIDAlertsUIDGetOK with default headers values +func NewV1ProjectsUIDAlertsUIDGetOK() *V1ProjectsUIDAlertsUIDGetOK { + return &V1ProjectsUIDAlertsUIDGetOK{} +} + +/* +V1ProjectsUIDAlertsUIDGetOK handles this case with default header values. + +OK +*/ +type V1ProjectsUIDAlertsUIDGetOK struct { + Payload *models.V1Channel +} + +func (o *V1ProjectsUIDAlertsUIDGetOK) Error() string { + return fmt.Sprintf("[GET /v1/projects/{uid}/alerts/{component}/{alertUid}][%d] v1ProjectsUidAlertsUidGetOK %+v", 200, o.Payload) +} + +func (o *V1ProjectsUIDAlertsUIDGetOK) GetPayload() *models.V1Channel { + return o.Payload +} + +func (o *V1ProjectsUIDAlertsUIDGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1Channel) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_projects_uid_alerts_uid_update_parameters.go b/api/client/v1/v1_projects_uid_alerts_uid_update_parameters.go new file mode 100644 index 00000000..189ad9db --- /dev/null +++ b/api/client/v1/v1_projects_uid_alerts_uid_update_parameters.go @@ -0,0 +1,190 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1ProjectsUIDAlertsUIDUpdateParams creates a new V1ProjectsUIDAlertsUIDUpdateParams object +// with the default values initialized. +func NewV1ProjectsUIDAlertsUIDUpdateParams() *V1ProjectsUIDAlertsUIDUpdateParams { + var () + return &V1ProjectsUIDAlertsUIDUpdateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1ProjectsUIDAlertsUIDUpdateParamsWithTimeout creates a new V1ProjectsUIDAlertsUIDUpdateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1ProjectsUIDAlertsUIDUpdateParamsWithTimeout(timeout time.Duration) *V1ProjectsUIDAlertsUIDUpdateParams { + var () + return &V1ProjectsUIDAlertsUIDUpdateParams{ + + timeout: timeout, + } +} + +// NewV1ProjectsUIDAlertsUIDUpdateParamsWithContext creates a new V1ProjectsUIDAlertsUIDUpdateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1ProjectsUIDAlertsUIDUpdateParamsWithContext(ctx context.Context) *V1ProjectsUIDAlertsUIDUpdateParams { + var () + return &V1ProjectsUIDAlertsUIDUpdateParams{ + + Context: ctx, + } +} + +// NewV1ProjectsUIDAlertsUIDUpdateParamsWithHTTPClient creates a new V1ProjectsUIDAlertsUIDUpdateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1ProjectsUIDAlertsUIDUpdateParamsWithHTTPClient(client *http.Client) *V1ProjectsUIDAlertsUIDUpdateParams { + var () + return &V1ProjectsUIDAlertsUIDUpdateParams{ + HTTPClient: client, + } +} + +/* +V1ProjectsUIDAlertsUIDUpdateParams contains all the parameters to send to the API endpoint +for the v1 projects Uid alerts Uid update operation typically these are written to a http.Request +*/ +type V1ProjectsUIDAlertsUIDUpdateParams struct { + + /*AlertUID*/ + AlertUID string + /*Body*/ + Body *models.V1Channel + /*Component*/ + Component string + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 projects Uid alerts Uid update params +func (o *V1ProjectsUIDAlertsUIDUpdateParams) WithTimeout(timeout time.Duration) *V1ProjectsUIDAlertsUIDUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 projects Uid alerts Uid update params +func (o *V1ProjectsUIDAlertsUIDUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 projects Uid alerts Uid update params +func (o *V1ProjectsUIDAlertsUIDUpdateParams) WithContext(ctx context.Context) *V1ProjectsUIDAlertsUIDUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 projects Uid alerts Uid update params +func (o *V1ProjectsUIDAlertsUIDUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 projects Uid alerts Uid update params +func (o *V1ProjectsUIDAlertsUIDUpdateParams) WithHTTPClient(client *http.Client) *V1ProjectsUIDAlertsUIDUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 projects Uid alerts Uid update params +func (o *V1ProjectsUIDAlertsUIDUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithAlertUID adds the alertUID to the v1 projects Uid alerts Uid update params +func (o *V1ProjectsUIDAlertsUIDUpdateParams) WithAlertUID(alertUID string) *V1ProjectsUIDAlertsUIDUpdateParams { + o.SetAlertUID(alertUID) + return o +} + +// SetAlertUID adds the alertUid to the v1 projects Uid alerts Uid update params +func (o *V1ProjectsUIDAlertsUIDUpdateParams) SetAlertUID(alertUID string) { + o.AlertUID = alertUID +} + +// WithBody adds the body to the v1 projects Uid alerts Uid update params +func (o *V1ProjectsUIDAlertsUIDUpdateParams) WithBody(body *models.V1Channel) *V1ProjectsUIDAlertsUIDUpdateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 projects Uid alerts Uid update params +func (o *V1ProjectsUIDAlertsUIDUpdateParams) SetBody(body *models.V1Channel) { + o.Body = body +} + +// WithComponent adds the component to the v1 projects Uid alerts Uid update params +func (o *V1ProjectsUIDAlertsUIDUpdateParams) WithComponent(component string) *V1ProjectsUIDAlertsUIDUpdateParams { + o.SetComponent(component) + return o +} + +// SetComponent adds the component to the v1 projects Uid alerts Uid update params +func (o *V1ProjectsUIDAlertsUIDUpdateParams) SetComponent(component string) { + o.Component = component +} + +// WithUID adds the uid to the v1 projects Uid alerts Uid update params +func (o *V1ProjectsUIDAlertsUIDUpdateParams) WithUID(uid string) *V1ProjectsUIDAlertsUIDUpdateParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 projects Uid alerts Uid update params +func (o *V1ProjectsUIDAlertsUIDUpdateParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1ProjectsUIDAlertsUIDUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param alertUid + if err := r.SetPathParam("alertUid", o.AlertUID); err != nil { + return err + } + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param component + if err := r.SetPathParam("component", o.Component); err != nil { + return err + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_projects_uid_alerts_uid_update_responses.go b/api/client/v1/v1_projects_uid_alerts_uid_update_responses.go new file mode 100644 index 00000000..8f8a4158 --- /dev/null +++ b/api/client/v1/v1_projects_uid_alerts_uid_update_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1ProjectsUIDAlertsUIDUpdateReader is a Reader for the V1ProjectsUIDAlertsUIDUpdate structure. +type V1ProjectsUIDAlertsUIDUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1ProjectsUIDAlertsUIDUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1ProjectsUIDAlertsUIDUpdateNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1ProjectsUIDAlertsUIDUpdateNoContent creates a V1ProjectsUIDAlertsUIDUpdateNoContent with default headers values +func NewV1ProjectsUIDAlertsUIDUpdateNoContent() *V1ProjectsUIDAlertsUIDUpdateNoContent { + return &V1ProjectsUIDAlertsUIDUpdateNoContent{} +} + +/* +V1ProjectsUIDAlertsUIDUpdateNoContent handles this case with default header values. + +The resource was updated successfully +*/ +type V1ProjectsUIDAlertsUIDUpdateNoContent struct { +} + +func (o *V1ProjectsUIDAlertsUIDUpdateNoContent) Error() string { + return fmt.Sprintf("[PUT /v1/projects/{uid}/alerts/{component}/{alertUid}][%d] v1ProjectsUidAlertsUidUpdateNoContent ", 204) +} + +func (o *V1ProjectsUIDAlertsUIDUpdateNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_projects_uid_delete_parameters.go b/api/client/v1/v1_projects_uid_delete_parameters.go new file mode 100644 index 00000000..2b63702d --- /dev/null +++ b/api/client/v1/v1_projects_uid_delete_parameters.go @@ -0,0 +1,184 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1ProjectsUIDDeleteParams creates a new V1ProjectsUIDDeleteParams object +// with the default values initialized. +func NewV1ProjectsUIDDeleteParams() *V1ProjectsUIDDeleteParams { + var () + return &V1ProjectsUIDDeleteParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1ProjectsUIDDeleteParamsWithTimeout creates a new V1ProjectsUIDDeleteParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1ProjectsUIDDeleteParamsWithTimeout(timeout time.Duration) *V1ProjectsUIDDeleteParams { + var () + return &V1ProjectsUIDDeleteParams{ + + timeout: timeout, + } +} + +// NewV1ProjectsUIDDeleteParamsWithContext creates a new V1ProjectsUIDDeleteParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1ProjectsUIDDeleteParamsWithContext(ctx context.Context) *V1ProjectsUIDDeleteParams { + var () + return &V1ProjectsUIDDeleteParams{ + + Context: ctx, + } +} + +// NewV1ProjectsUIDDeleteParamsWithHTTPClient creates a new V1ProjectsUIDDeleteParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1ProjectsUIDDeleteParamsWithHTTPClient(client *http.Client) *V1ProjectsUIDDeleteParams { + var () + return &V1ProjectsUIDDeleteParams{ + HTTPClient: client, + } +} + +/* +V1ProjectsUIDDeleteParams contains all the parameters to send to the API endpoint +for the v1 projects Uid delete operation typically these are written to a http.Request +*/ +type V1ProjectsUIDDeleteParams struct { + + /*Body*/ + Body *models.V1ProjectCleanup + /*CleanupProjectResources*/ + CleanupProjectResources *bool + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 projects Uid delete params +func (o *V1ProjectsUIDDeleteParams) WithTimeout(timeout time.Duration) *V1ProjectsUIDDeleteParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 projects Uid delete params +func (o *V1ProjectsUIDDeleteParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 projects Uid delete params +func (o *V1ProjectsUIDDeleteParams) WithContext(ctx context.Context) *V1ProjectsUIDDeleteParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 projects Uid delete params +func (o *V1ProjectsUIDDeleteParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 projects Uid delete params +func (o *V1ProjectsUIDDeleteParams) WithHTTPClient(client *http.Client) *V1ProjectsUIDDeleteParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 projects Uid delete params +func (o *V1ProjectsUIDDeleteParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 projects Uid delete params +func (o *V1ProjectsUIDDeleteParams) WithBody(body *models.V1ProjectCleanup) *V1ProjectsUIDDeleteParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 projects Uid delete params +func (o *V1ProjectsUIDDeleteParams) SetBody(body *models.V1ProjectCleanup) { + o.Body = body +} + +// WithCleanupProjectResources adds the cleanupProjectResources to the v1 projects Uid delete params +func (o *V1ProjectsUIDDeleteParams) WithCleanupProjectResources(cleanupProjectResources *bool) *V1ProjectsUIDDeleteParams { + o.SetCleanupProjectResources(cleanupProjectResources) + return o +} + +// SetCleanupProjectResources adds the cleanupProjectResources to the v1 projects Uid delete params +func (o *V1ProjectsUIDDeleteParams) SetCleanupProjectResources(cleanupProjectResources *bool) { + o.CleanupProjectResources = cleanupProjectResources +} + +// WithUID adds the uid to the v1 projects Uid delete params +func (o *V1ProjectsUIDDeleteParams) WithUID(uid string) *V1ProjectsUIDDeleteParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 projects Uid delete params +func (o *V1ProjectsUIDDeleteParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1ProjectsUIDDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + if o.CleanupProjectResources != nil { + + // query param cleanupProjectResources + var qrCleanupProjectResources bool + if o.CleanupProjectResources != nil { + qrCleanupProjectResources = *o.CleanupProjectResources + } + qCleanupProjectResources := swag.FormatBool(qrCleanupProjectResources) + if qCleanupProjectResources != "" { + if err := r.SetQueryParam("cleanupProjectResources", qCleanupProjectResources); err != nil { + return err + } + } + + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_projects_uid_delete_responses.go b/api/client/v1/v1_projects_uid_delete_responses.go new file mode 100644 index 00000000..93e4e56a --- /dev/null +++ b/api/client/v1/v1_projects_uid_delete_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1ProjectsUIDDeleteReader is a Reader for the V1ProjectsUIDDelete structure. +type V1ProjectsUIDDeleteReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1ProjectsUIDDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1ProjectsUIDDeleteNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1ProjectsUIDDeleteNoContent creates a V1ProjectsUIDDeleteNoContent with default headers values +func NewV1ProjectsUIDDeleteNoContent() *V1ProjectsUIDDeleteNoContent { + return &V1ProjectsUIDDeleteNoContent{} +} + +/* +V1ProjectsUIDDeleteNoContent handles this case with default header values. + +The resource was deleted successfully +*/ +type V1ProjectsUIDDeleteNoContent struct { +} + +func (o *V1ProjectsUIDDeleteNoContent) Error() string { + return fmt.Sprintf("[DELETE /v1/projects/{uid}][%d] v1ProjectsUidDeleteNoContent ", 204) +} + +func (o *V1ProjectsUIDDeleteNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_projects_uid_get_parameters.go b/api/client/v1/v1_projects_uid_get_parameters.go new file mode 100644 index 00000000..8380a577 --- /dev/null +++ b/api/client/v1/v1_projects_uid_get_parameters.go @@ -0,0 +1,133 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1ProjectsUIDGetParams creates a new V1ProjectsUIDGetParams object +// with the default values initialized. +func NewV1ProjectsUIDGetParams() *V1ProjectsUIDGetParams { + var () + return &V1ProjectsUIDGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1ProjectsUIDGetParamsWithTimeout creates a new V1ProjectsUIDGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1ProjectsUIDGetParamsWithTimeout(timeout time.Duration) *V1ProjectsUIDGetParams { + var () + return &V1ProjectsUIDGetParams{ + + timeout: timeout, + } +} + +// NewV1ProjectsUIDGetParamsWithContext creates a new V1ProjectsUIDGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1ProjectsUIDGetParamsWithContext(ctx context.Context) *V1ProjectsUIDGetParams { + var () + return &V1ProjectsUIDGetParams{ + + Context: ctx, + } +} + +// NewV1ProjectsUIDGetParamsWithHTTPClient creates a new V1ProjectsUIDGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1ProjectsUIDGetParamsWithHTTPClient(client *http.Client) *V1ProjectsUIDGetParams { + var () + return &V1ProjectsUIDGetParams{ + HTTPClient: client, + } +} + +/* +V1ProjectsUIDGetParams contains all the parameters to send to the API endpoint +for the v1 projects Uid get operation typically these are written to a http.Request +*/ +type V1ProjectsUIDGetParams struct { + + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 projects Uid get params +func (o *V1ProjectsUIDGetParams) WithTimeout(timeout time.Duration) *V1ProjectsUIDGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 projects Uid get params +func (o *V1ProjectsUIDGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 projects Uid get params +func (o *V1ProjectsUIDGetParams) WithContext(ctx context.Context) *V1ProjectsUIDGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 projects Uid get params +func (o *V1ProjectsUIDGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 projects Uid get params +func (o *V1ProjectsUIDGetParams) WithHTTPClient(client *http.Client) *V1ProjectsUIDGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 projects Uid get params +func (o *V1ProjectsUIDGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithUID adds the uid to the v1 projects Uid get params +func (o *V1ProjectsUIDGetParams) WithUID(uid string) *V1ProjectsUIDGetParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 projects Uid get params +func (o *V1ProjectsUIDGetParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1ProjectsUIDGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_projects_uid_get_responses.go b/api/client/v1/v1_projects_uid_get_responses.go new file mode 100644 index 00000000..a37d8c2d --- /dev/null +++ b/api/client/v1/v1_projects_uid_get_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1ProjectsUIDGetReader is a Reader for the V1ProjectsUIDGet structure. +type V1ProjectsUIDGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1ProjectsUIDGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1ProjectsUIDGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1ProjectsUIDGetOK creates a V1ProjectsUIDGetOK with default headers values +func NewV1ProjectsUIDGetOK() *V1ProjectsUIDGetOK { + return &V1ProjectsUIDGetOK{} +} + +/* +V1ProjectsUIDGetOK handles this case with default header values. + +OK +*/ +type V1ProjectsUIDGetOK struct { + Payload *models.V1Project +} + +func (o *V1ProjectsUIDGetOK) Error() string { + return fmt.Sprintf("[GET /v1/projects/{uid}][%d] v1ProjectsUidGetOK %+v", 200, o.Payload) +} + +func (o *V1ProjectsUIDGetOK) GetPayload() *models.V1Project { + return o.Payload +} + +func (o *V1ProjectsUIDGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1Project) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_projects_uid_macros_create_parameters.go b/api/client/v1/v1_projects_uid_macros_create_parameters.go new file mode 100644 index 00000000..cdb57f96 --- /dev/null +++ b/api/client/v1/v1_projects_uid_macros_create_parameters.go @@ -0,0 +1,154 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1ProjectsUIDMacrosCreateParams creates a new V1ProjectsUIDMacrosCreateParams object +// with the default values initialized. +func NewV1ProjectsUIDMacrosCreateParams() *V1ProjectsUIDMacrosCreateParams { + var () + return &V1ProjectsUIDMacrosCreateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1ProjectsUIDMacrosCreateParamsWithTimeout creates a new V1ProjectsUIDMacrosCreateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1ProjectsUIDMacrosCreateParamsWithTimeout(timeout time.Duration) *V1ProjectsUIDMacrosCreateParams { + var () + return &V1ProjectsUIDMacrosCreateParams{ + + timeout: timeout, + } +} + +// NewV1ProjectsUIDMacrosCreateParamsWithContext creates a new V1ProjectsUIDMacrosCreateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1ProjectsUIDMacrosCreateParamsWithContext(ctx context.Context) *V1ProjectsUIDMacrosCreateParams { + var () + return &V1ProjectsUIDMacrosCreateParams{ + + Context: ctx, + } +} + +// NewV1ProjectsUIDMacrosCreateParamsWithHTTPClient creates a new V1ProjectsUIDMacrosCreateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1ProjectsUIDMacrosCreateParamsWithHTTPClient(client *http.Client) *V1ProjectsUIDMacrosCreateParams { + var () + return &V1ProjectsUIDMacrosCreateParams{ + HTTPClient: client, + } +} + +/* +V1ProjectsUIDMacrosCreateParams contains all the parameters to send to the API endpoint +for the v1 projects Uid macros create operation typically these are written to a http.Request +*/ +type V1ProjectsUIDMacrosCreateParams struct { + + /*Body*/ + Body *models.V1Macros + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 projects Uid macros create params +func (o *V1ProjectsUIDMacrosCreateParams) WithTimeout(timeout time.Duration) *V1ProjectsUIDMacrosCreateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 projects Uid macros create params +func (o *V1ProjectsUIDMacrosCreateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 projects Uid macros create params +func (o *V1ProjectsUIDMacrosCreateParams) WithContext(ctx context.Context) *V1ProjectsUIDMacrosCreateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 projects Uid macros create params +func (o *V1ProjectsUIDMacrosCreateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 projects Uid macros create params +func (o *V1ProjectsUIDMacrosCreateParams) WithHTTPClient(client *http.Client) *V1ProjectsUIDMacrosCreateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 projects Uid macros create params +func (o *V1ProjectsUIDMacrosCreateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 projects Uid macros create params +func (o *V1ProjectsUIDMacrosCreateParams) WithBody(body *models.V1Macros) *V1ProjectsUIDMacrosCreateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 projects Uid macros create params +func (o *V1ProjectsUIDMacrosCreateParams) SetBody(body *models.V1Macros) { + o.Body = body +} + +// WithUID adds the uid to the v1 projects Uid macros create params +func (o *V1ProjectsUIDMacrosCreateParams) WithUID(uid string) *V1ProjectsUIDMacrosCreateParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 projects Uid macros create params +func (o *V1ProjectsUIDMacrosCreateParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1ProjectsUIDMacrosCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_projects_uid_macros_create_responses.go b/api/client/v1/v1_projects_uid_macros_create_responses.go new file mode 100644 index 00000000..fa02daf9 --- /dev/null +++ b/api/client/v1/v1_projects_uid_macros_create_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1ProjectsUIDMacrosCreateReader is a Reader for the V1ProjectsUIDMacrosCreate structure. +type V1ProjectsUIDMacrosCreateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1ProjectsUIDMacrosCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1ProjectsUIDMacrosCreateNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1ProjectsUIDMacrosCreateNoContent creates a V1ProjectsUIDMacrosCreateNoContent with default headers values +func NewV1ProjectsUIDMacrosCreateNoContent() *V1ProjectsUIDMacrosCreateNoContent { + return &V1ProjectsUIDMacrosCreateNoContent{} +} + +/* +V1ProjectsUIDMacrosCreateNoContent handles this case with default header values. + +The resource was updated successfully +*/ +type V1ProjectsUIDMacrosCreateNoContent struct { +} + +func (o *V1ProjectsUIDMacrosCreateNoContent) Error() string { + return fmt.Sprintf("[POST /v1/projects/{uid}/macros][%d] v1ProjectsUidMacrosCreateNoContent ", 204) +} + +func (o *V1ProjectsUIDMacrosCreateNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_projects_uid_macros_delete_by_macro_name_parameters.go b/api/client/v1/v1_projects_uid_macros_delete_by_macro_name_parameters.go new file mode 100644 index 00000000..fe806ba3 --- /dev/null +++ b/api/client/v1/v1_projects_uid_macros_delete_by_macro_name_parameters.go @@ -0,0 +1,154 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1ProjectsUIDMacrosDeleteByMacroNameParams creates a new V1ProjectsUIDMacrosDeleteByMacroNameParams object +// with the default values initialized. +func NewV1ProjectsUIDMacrosDeleteByMacroNameParams() *V1ProjectsUIDMacrosDeleteByMacroNameParams { + var () + return &V1ProjectsUIDMacrosDeleteByMacroNameParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1ProjectsUIDMacrosDeleteByMacroNameParamsWithTimeout creates a new V1ProjectsUIDMacrosDeleteByMacroNameParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1ProjectsUIDMacrosDeleteByMacroNameParamsWithTimeout(timeout time.Duration) *V1ProjectsUIDMacrosDeleteByMacroNameParams { + var () + return &V1ProjectsUIDMacrosDeleteByMacroNameParams{ + + timeout: timeout, + } +} + +// NewV1ProjectsUIDMacrosDeleteByMacroNameParamsWithContext creates a new V1ProjectsUIDMacrosDeleteByMacroNameParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1ProjectsUIDMacrosDeleteByMacroNameParamsWithContext(ctx context.Context) *V1ProjectsUIDMacrosDeleteByMacroNameParams { + var () + return &V1ProjectsUIDMacrosDeleteByMacroNameParams{ + + Context: ctx, + } +} + +// NewV1ProjectsUIDMacrosDeleteByMacroNameParamsWithHTTPClient creates a new V1ProjectsUIDMacrosDeleteByMacroNameParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1ProjectsUIDMacrosDeleteByMacroNameParamsWithHTTPClient(client *http.Client) *V1ProjectsUIDMacrosDeleteByMacroNameParams { + var () + return &V1ProjectsUIDMacrosDeleteByMacroNameParams{ + HTTPClient: client, + } +} + +/* +V1ProjectsUIDMacrosDeleteByMacroNameParams contains all the parameters to send to the API endpoint +for the v1 projects Uid macros delete by macro name operation typically these are written to a http.Request +*/ +type V1ProjectsUIDMacrosDeleteByMacroNameParams struct { + + /*Body*/ + Body *models.V1Macros + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 projects Uid macros delete by macro name params +func (o *V1ProjectsUIDMacrosDeleteByMacroNameParams) WithTimeout(timeout time.Duration) *V1ProjectsUIDMacrosDeleteByMacroNameParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 projects Uid macros delete by macro name params +func (o *V1ProjectsUIDMacrosDeleteByMacroNameParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 projects Uid macros delete by macro name params +func (o *V1ProjectsUIDMacrosDeleteByMacroNameParams) WithContext(ctx context.Context) *V1ProjectsUIDMacrosDeleteByMacroNameParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 projects Uid macros delete by macro name params +func (o *V1ProjectsUIDMacrosDeleteByMacroNameParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 projects Uid macros delete by macro name params +func (o *V1ProjectsUIDMacrosDeleteByMacroNameParams) WithHTTPClient(client *http.Client) *V1ProjectsUIDMacrosDeleteByMacroNameParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 projects Uid macros delete by macro name params +func (o *V1ProjectsUIDMacrosDeleteByMacroNameParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 projects Uid macros delete by macro name params +func (o *V1ProjectsUIDMacrosDeleteByMacroNameParams) WithBody(body *models.V1Macros) *V1ProjectsUIDMacrosDeleteByMacroNameParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 projects Uid macros delete by macro name params +func (o *V1ProjectsUIDMacrosDeleteByMacroNameParams) SetBody(body *models.V1Macros) { + o.Body = body +} + +// WithUID adds the uid to the v1 projects Uid macros delete by macro name params +func (o *V1ProjectsUIDMacrosDeleteByMacroNameParams) WithUID(uid string) *V1ProjectsUIDMacrosDeleteByMacroNameParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 projects Uid macros delete by macro name params +func (o *V1ProjectsUIDMacrosDeleteByMacroNameParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1ProjectsUIDMacrosDeleteByMacroNameParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_projects_uid_macros_delete_by_macro_name_responses.go b/api/client/v1/v1_projects_uid_macros_delete_by_macro_name_responses.go new file mode 100644 index 00000000..bad7f641 --- /dev/null +++ b/api/client/v1/v1_projects_uid_macros_delete_by_macro_name_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1ProjectsUIDMacrosDeleteByMacroNameReader is a Reader for the V1ProjectsUIDMacrosDeleteByMacroName structure. +type V1ProjectsUIDMacrosDeleteByMacroNameReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1ProjectsUIDMacrosDeleteByMacroNameReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1ProjectsUIDMacrosDeleteByMacroNameNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1ProjectsUIDMacrosDeleteByMacroNameNoContent creates a V1ProjectsUIDMacrosDeleteByMacroNameNoContent with default headers values +func NewV1ProjectsUIDMacrosDeleteByMacroNameNoContent() *V1ProjectsUIDMacrosDeleteByMacroNameNoContent { + return &V1ProjectsUIDMacrosDeleteByMacroNameNoContent{} +} + +/* +V1ProjectsUIDMacrosDeleteByMacroNameNoContent handles this case with default header values. + +The resource was updated successfully +*/ +type V1ProjectsUIDMacrosDeleteByMacroNameNoContent struct { +} + +func (o *V1ProjectsUIDMacrosDeleteByMacroNameNoContent) Error() string { + return fmt.Sprintf("[DELETE /v1/projects/{uid}/macros][%d] v1ProjectsUidMacrosDeleteByMacroNameNoContent ", 204) +} + +func (o *V1ProjectsUIDMacrosDeleteByMacroNameNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_projects_uid_macros_list_parameters.go b/api/client/v1/v1_projects_uid_macros_list_parameters.go new file mode 100644 index 00000000..28e86218 --- /dev/null +++ b/api/client/v1/v1_projects_uid_macros_list_parameters.go @@ -0,0 +1,133 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1ProjectsUIDMacrosListParams creates a new V1ProjectsUIDMacrosListParams object +// with the default values initialized. +func NewV1ProjectsUIDMacrosListParams() *V1ProjectsUIDMacrosListParams { + var () + return &V1ProjectsUIDMacrosListParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1ProjectsUIDMacrosListParamsWithTimeout creates a new V1ProjectsUIDMacrosListParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1ProjectsUIDMacrosListParamsWithTimeout(timeout time.Duration) *V1ProjectsUIDMacrosListParams { + var () + return &V1ProjectsUIDMacrosListParams{ + + timeout: timeout, + } +} + +// NewV1ProjectsUIDMacrosListParamsWithContext creates a new V1ProjectsUIDMacrosListParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1ProjectsUIDMacrosListParamsWithContext(ctx context.Context) *V1ProjectsUIDMacrosListParams { + var () + return &V1ProjectsUIDMacrosListParams{ + + Context: ctx, + } +} + +// NewV1ProjectsUIDMacrosListParamsWithHTTPClient creates a new V1ProjectsUIDMacrosListParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1ProjectsUIDMacrosListParamsWithHTTPClient(client *http.Client) *V1ProjectsUIDMacrosListParams { + var () + return &V1ProjectsUIDMacrosListParams{ + HTTPClient: client, + } +} + +/* +V1ProjectsUIDMacrosListParams contains all the parameters to send to the API endpoint +for the v1 projects Uid macros list operation typically these are written to a http.Request +*/ +type V1ProjectsUIDMacrosListParams struct { + + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 projects Uid macros list params +func (o *V1ProjectsUIDMacrosListParams) WithTimeout(timeout time.Duration) *V1ProjectsUIDMacrosListParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 projects Uid macros list params +func (o *V1ProjectsUIDMacrosListParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 projects Uid macros list params +func (o *V1ProjectsUIDMacrosListParams) WithContext(ctx context.Context) *V1ProjectsUIDMacrosListParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 projects Uid macros list params +func (o *V1ProjectsUIDMacrosListParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 projects Uid macros list params +func (o *V1ProjectsUIDMacrosListParams) WithHTTPClient(client *http.Client) *V1ProjectsUIDMacrosListParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 projects Uid macros list params +func (o *V1ProjectsUIDMacrosListParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithUID adds the uid to the v1 projects Uid macros list params +func (o *V1ProjectsUIDMacrosListParams) WithUID(uid string) *V1ProjectsUIDMacrosListParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 projects Uid macros list params +func (o *V1ProjectsUIDMacrosListParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1ProjectsUIDMacrosListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_projects_uid_macros_list_responses.go b/api/client/v1/v1_projects_uid_macros_list_responses.go new file mode 100644 index 00000000..64b7e9e0 --- /dev/null +++ b/api/client/v1/v1_projects_uid_macros_list_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1ProjectsUIDMacrosListReader is a Reader for the V1ProjectsUIDMacrosList structure. +type V1ProjectsUIDMacrosListReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1ProjectsUIDMacrosListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1ProjectsUIDMacrosListOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1ProjectsUIDMacrosListOK creates a V1ProjectsUIDMacrosListOK with default headers values +func NewV1ProjectsUIDMacrosListOK() *V1ProjectsUIDMacrosListOK { + return &V1ProjectsUIDMacrosListOK{} +} + +/* +V1ProjectsUIDMacrosListOK handles this case with default header values. + +OK +*/ +type V1ProjectsUIDMacrosListOK struct { + Payload *models.V1Macros +} + +func (o *V1ProjectsUIDMacrosListOK) Error() string { + return fmt.Sprintf("[GET /v1/projects/{uid}/macros][%d] v1ProjectsUidMacrosListOK %+v", 200, o.Payload) +} + +func (o *V1ProjectsUIDMacrosListOK) GetPayload() *models.V1Macros { + return o.Payload +} + +func (o *V1ProjectsUIDMacrosListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1Macros) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_projects_uid_macros_update_by_macro_name_parameters.go b/api/client/v1/v1_projects_uid_macros_update_by_macro_name_parameters.go new file mode 100644 index 00000000..23d6f4c1 --- /dev/null +++ b/api/client/v1/v1_projects_uid_macros_update_by_macro_name_parameters.go @@ -0,0 +1,154 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1ProjectsUIDMacrosUpdateByMacroNameParams creates a new V1ProjectsUIDMacrosUpdateByMacroNameParams object +// with the default values initialized. +func NewV1ProjectsUIDMacrosUpdateByMacroNameParams() *V1ProjectsUIDMacrosUpdateByMacroNameParams { + var () + return &V1ProjectsUIDMacrosUpdateByMacroNameParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1ProjectsUIDMacrosUpdateByMacroNameParamsWithTimeout creates a new V1ProjectsUIDMacrosUpdateByMacroNameParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1ProjectsUIDMacrosUpdateByMacroNameParamsWithTimeout(timeout time.Duration) *V1ProjectsUIDMacrosUpdateByMacroNameParams { + var () + return &V1ProjectsUIDMacrosUpdateByMacroNameParams{ + + timeout: timeout, + } +} + +// NewV1ProjectsUIDMacrosUpdateByMacroNameParamsWithContext creates a new V1ProjectsUIDMacrosUpdateByMacroNameParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1ProjectsUIDMacrosUpdateByMacroNameParamsWithContext(ctx context.Context) *V1ProjectsUIDMacrosUpdateByMacroNameParams { + var () + return &V1ProjectsUIDMacrosUpdateByMacroNameParams{ + + Context: ctx, + } +} + +// NewV1ProjectsUIDMacrosUpdateByMacroNameParamsWithHTTPClient creates a new V1ProjectsUIDMacrosUpdateByMacroNameParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1ProjectsUIDMacrosUpdateByMacroNameParamsWithHTTPClient(client *http.Client) *V1ProjectsUIDMacrosUpdateByMacroNameParams { + var () + return &V1ProjectsUIDMacrosUpdateByMacroNameParams{ + HTTPClient: client, + } +} + +/* +V1ProjectsUIDMacrosUpdateByMacroNameParams contains all the parameters to send to the API endpoint +for the v1 projects Uid macros update by macro name operation typically these are written to a http.Request +*/ +type V1ProjectsUIDMacrosUpdateByMacroNameParams struct { + + /*Body*/ + Body *models.V1Macros + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 projects Uid macros update by macro name params +func (o *V1ProjectsUIDMacrosUpdateByMacroNameParams) WithTimeout(timeout time.Duration) *V1ProjectsUIDMacrosUpdateByMacroNameParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 projects Uid macros update by macro name params +func (o *V1ProjectsUIDMacrosUpdateByMacroNameParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 projects Uid macros update by macro name params +func (o *V1ProjectsUIDMacrosUpdateByMacroNameParams) WithContext(ctx context.Context) *V1ProjectsUIDMacrosUpdateByMacroNameParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 projects Uid macros update by macro name params +func (o *V1ProjectsUIDMacrosUpdateByMacroNameParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 projects Uid macros update by macro name params +func (o *V1ProjectsUIDMacrosUpdateByMacroNameParams) WithHTTPClient(client *http.Client) *V1ProjectsUIDMacrosUpdateByMacroNameParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 projects Uid macros update by macro name params +func (o *V1ProjectsUIDMacrosUpdateByMacroNameParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 projects Uid macros update by macro name params +func (o *V1ProjectsUIDMacrosUpdateByMacroNameParams) WithBody(body *models.V1Macros) *V1ProjectsUIDMacrosUpdateByMacroNameParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 projects Uid macros update by macro name params +func (o *V1ProjectsUIDMacrosUpdateByMacroNameParams) SetBody(body *models.V1Macros) { + o.Body = body +} + +// WithUID adds the uid to the v1 projects Uid macros update by macro name params +func (o *V1ProjectsUIDMacrosUpdateByMacroNameParams) WithUID(uid string) *V1ProjectsUIDMacrosUpdateByMacroNameParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 projects Uid macros update by macro name params +func (o *V1ProjectsUIDMacrosUpdateByMacroNameParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1ProjectsUIDMacrosUpdateByMacroNameParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_projects_uid_macros_update_by_macro_name_responses.go b/api/client/v1/v1_projects_uid_macros_update_by_macro_name_responses.go new file mode 100644 index 00000000..4a70bcb1 --- /dev/null +++ b/api/client/v1/v1_projects_uid_macros_update_by_macro_name_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1ProjectsUIDMacrosUpdateByMacroNameReader is a Reader for the V1ProjectsUIDMacrosUpdateByMacroName structure. +type V1ProjectsUIDMacrosUpdateByMacroNameReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1ProjectsUIDMacrosUpdateByMacroNameReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1ProjectsUIDMacrosUpdateByMacroNameNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1ProjectsUIDMacrosUpdateByMacroNameNoContent creates a V1ProjectsUIDMacrosUpdateByMacroNameNoContent with default headers values +func NewV1ProjectsUIDMacrosUpdateByMacroNameNoContent() *V1ProjectsUIDMacrosUpdateByMacroNameNoContent { + return &V1ProjectsUIDMacrosUpdateByMacroNameNoContent{} +} + +/* +V1ProjectsUIDMacrosUpdateByMacroNameNoContent handles this case with default header values. + +The resource was updated successfully +*/ +type V1ProjectsUIDMacrosUpdateByMacroNameNoContent struct { +} + +func (o *V1ProjectsUIDMacrosUpdateByMacroNameNoContent) Error() string { + return fmt.Sprintf("[PATCH /v1/projects/{uid}/macros][%d] v1ProjectsUidMacrosUpdateByMacroNameNoContent ", 204) +} + +func (o *V1ProjectsUIDMacrosUpdateByMacroNameNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_projects_uid_macros_update_parameters.go b/api/client/v1/v1_projects_uid_macros_update_parameters.go new file mode 100644 index 00000000..23b3da20 --- /dev/null +++ b/api/client/v1/v1_projects_uid_macros_update_parameters.go @@ -0,0 +1,154 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1ProjectsUIDMacrosUpdateParams creates a new V1ProjectsUIDMacrosUpdateParams object +// with the default values initialized. +func NewV1ProjectsUIDMacrosUpdateParams() *V1ProjectsUIDMacrosUpdateParams { + var () + return &V1ProjectsUIDMacrosUpdateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1ProjectsUIDMacrosUpdateParamsWithTimeout creates a new V1ProjectsUIDMacrosUpdateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1ProjectsUIDMacrosUpdateParamsWithTimeout(timeout time.Duration) *V1ProjectsUIDMacrosUpdateParams { + var () + return &V1ProjectsUIDMacrosUpdateParams{ + + timeout: timeout, + } +} + +// NewV1ProjectsUIDMacrosUpdateParamsWithContext creates a new V1ProjectsUIDMacrosUpdateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1ProjectsUIDMacrosUpdateParamsWithContext(ctx context.Context) *V1ProjectsUIDMacrosUpdateParams { + var () + return &V1ProjectsUIDMacrosUpdateParams{ + + Context: ctx, + } +} + +// NewV1ProjectsUIDMacrosUpdateParamsWithHTTPClient creates a new V1ProjectsUIDMacrosUpdateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1ProjectsUIDMacrosUpdateParamsWithHTTPClient(client *http.Client) *V1ProjectsUIDMacrosUpdateParams { + var () + return &V1ProjectsUIDMacrosUpdateParams{ + HTTPClient: client, + } +} + +/* +V1ProjectsUIDMacrosUpdateParams contains all the parameters to send to the API endpoint +for the v1 projects Uid macros update operation typically these are written to a http.Request +*/ +type V1ProjectsUIDMacrosUpdateParams struct { + + /*Body*/ + Body *models.V1Macros + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 projects Uid macros update params +func (o *V1ProjectsUIDMacrosUpdateParams) WithTimeout(timeout time.Duration) *V1ProjectsUIDMacrosUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 projects Uid macros update params +func (o *V1ProjectsUIDMacrosUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 projects Uid macros update params +func (o *V1ProjectsUIDMacrosUpdateParams) WithContext(ctx context.Context) *V1ProjectsUIDMacrosUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 projects Uid macros update params +func (o *V1ProjectsUIDMacrosUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 projects Uid macros update params +func (o *V1ProjectsUIDMacrosUpdateParams) WithHTTPClient(client *http.Client) *V1ProjectsUIDMacrosUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 projects Uid macros update params +func (o *V1ProjectsUIDMacrosUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 projects Uid macros update params +func (o *V1ProjectsUIDMacrosUpdateParams) WithBody(body *models.V1Macros) *V1ProjectsUIDMacrosUpdateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 projects Uid macros update params +func (o *V1ProjectsUIDMacrosUpdateParams) SetBody(body *models.V1Macros) { + o.Body = body +} + +// WithUID adds the uid to the v1 projects Uid macros update params +func (o *V1ProjectsUIDMacrosUpdateParams) WithUID(uid string) *V1ProjectsUIDMacrosUpdateParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 projects Uid macros update params +func (o *V1ProjectsUIDMacrosUpdateParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1ProjectsUIDMacrosUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_projects_uid_macros_update_responses.go b/api/client/v1/v1_projects_uid_macros_update_responses.go new file mode 100644 index 00000000..8da2541d --- /dev/null +++ b/api/client/v1/v1_projects_uid_macros_update_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1ProjectsUIDMacrosUpdateReader is a Reader for the V1ProjectsUIDMacrosUpdate structure. +type V1ProjectsUIDMacrosUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1ProjectsUIDMacrosUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1ProjectsUIDMacrosUpdateNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1ProjectsUIDMacrosUpdateNoContent creates a V1ProjectsUIDMacrosUpdateNoContent with default headers values +func NewV1ProjectsUIDMacrosUpdateNoContent() *V1ProjectsUIDMacrosUpdateNoContent { + return &V1ProjectsUIDMacrosUpdateNoContent{} +} + +/* +V1ProjectsUIDMacrosUpdateNoContent handles this case with default header values. + +The resource was updated successfully +*/ +type V1ProjectsUIDMacrosUpdateNoContent struct { +} + +func (o *V1ProjectsUIDMacrosUpdateNoContent) Error() string { + return fmt.Sprintf("[PUT /v1/projects/{uid}/macros][%d] v1ProjectsUidMacrosUpdateNoContent ", 204) +} + +func (o *V1ProjectsUIDMacrosUpdateNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_projects_uid_meta_update_parameters.go b/api/client/v1/v1_projects_uid_meta_update_parameters.go new file mode 100644 index 00000000..bde19500 --- /dev/null +++ b/api/client/v1/v1_projects_uid_meta_update_parameters.go @@ -0,0 +1,154 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1ProjectsUIDMetaUpdateParams creates a new V1ProjectsUIDMetaUpdateParams object +// with the default values initialized. +func NewV1ProjectsUIDMetaUpdateParams() *V1ProjectsUIDMetaUpdateParams { + var () + return &V1ProjectsUIDMetaUpdateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1ProjectsUIDMetaUpdateParamsWithTimeout creates a new V1ProjectsUIDMetaUpdateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1ProjectsUIDMetaUpdateParamsWithTimeout(timeout time.Duration) *V1ProjectsUIDMetaUpdateParams { + var () + return &V1ProjectsUIDMetaUpdateParams{ + + timeout: timeout, + } +} + +// NewV1ProjectsUIDMetaUpdateParamsWithContext creates a new V1ProjectsUIDMetaUpdateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1ProjectsUIDMetaUpdateParamsWithContext(ctx context.Context) *V1ProjectsUIDMetaUpdateParams { + var () + return &V1ProjectsUIDMetaUpdateParams{ + + Context: ctx, + } +} + +// NewV1ProjectsUIDMetaUpdateParamsWithHTTPClient creates a new V1ProjectsUIDMetaUpdateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1ProjectsUIDMetaUpdateParamsWithHTTPClient(client *http.Client) *V1ProjectsUIDMetaUpdateParams { + var () + return &V1ProjectsUIDMetaUpdateParams{ + HTTPClient: client, + } +} + +/* +V1ProjectsUIDMetaUpdateParams contains all the parameters to send to the API endpoint +for the v1 projects Uid meta update operation typically these are written to a http.Request +*/ +type V1ProjectsUIDMetaUpdateParams struct { + + /*Body*/ + Body *models.V1ObjectMeta + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 projects Uid meta update params +func (o *V1ProjectsUIDMetaUpdateParams) WithTimeout(timeout time.Duration) *V1ProjectsUIDMetaUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 projects Uid meta update params +func (o *V1ProjectsUIDMetaUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 projects Uid meta update params +func (o *V1ProjectsUIDMetaUpdateParams) WithContext(ctx context.Context) *V1ProjectsUIDMetaUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 projects Uid meta update params +func (o *V1ProjectsUIDMetaUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 projects Uid meta update params +func (o *V1ProjectsUIDMetaUpdateParams) WithHTTPClient(client *http.Client) *V1ProjectsUIDMetaUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 projects Uid meta update params +func (o *V1ProjectsUIDMetaUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 projects Uid meta update params +func (o *V1ProjectsUIDMetaUpdateParams) WithBody(body *models.V1ObjectMeta) *V1ProjectsUIDMetaUpdateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 projects Uid meta update params +func (o *V1ProjectsUIDMetaUpdateParams) SetBody(body *models.V1ObjectMeta) { + o.Body = body +} + +// WithUID adds the uid to the v1 projects Uid meta update params +func (o *V1ProjectsUIDMetaUpdateParams) WithUID(uid string) *V1ProjectsUIDMetaUpdateParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 projects Uid meta update params +func (o *V1ProjectsUIDMetaUpdateParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1ProjectsUIDMetaUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_projects_uid_meta_update_responses.go b/api/client/v1/v1_projects_uid_meta_update_responses.go new file mode 100644 index 00000000..ac5e8c7d --- /dev/null +++ b/api/client/v1/v1_projects_uid_meta_update_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1ProjectsUIDMetaUpdateReader is a Reader for the V1ProjectsUIDMetaUpdate structure. +type V1ProjectsUIDMetaUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1ProjectsUIDMetaUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1ProjectsUIDMetaUpdateNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1ProjectsUIDMetaUpdateNoContent creates a V1ProjectsUIDMetaUpdateNoContent with default headers values +func NewV1ProjectsUIDMetaUpdateNoContent() *V1ProjectsUIDMetaUpdateNoContent { + return &V1ProjectsUIDMetaUpdateNoContent{} +} + +/* +V1ProjectsUIDMetaUpdateNoContent handles this case with default header values. + +The resource was updated successfully +*/ +type V1ProjectsUIDMetaUpdateNoContent struct { +} + +func (o *V1ProjectsUIDMetaUpdateNoContent) Error() string { + return fmt.Sprintf("[PUT /v1/projects/{uid}/meta][%d] v1ProjectsUidMetaUpdateNoContent ", 204) +} + +func (o *V1ProjectsUIDMetaUpdateNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_projects_uid_teams_update_parameters.go b/api/client/v1/v1_projects_uid_teams_update_parameters.go new file mode 100644 index 00000000..0bc96bd1 --- /dev/null +++ b/api/client/v1/v1_projects_uid_teams_update_parameters.go @@ -0,0 +1,154 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1ProjectsUIDTeamsUpdateParams creates a new V1ProjectsUIDTeamsUpdateParams object +// with the default values initialized. +func NewV1ProjectsUIDTeamsUpdateParams() *V1ProjectsUIDTeamsUpdateParams { + var () + return &V1ProjectsUIDTeamsUpdateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1ProjectsUIDTeamsUpdateParamsWithTimeout creates a new V1ProjectsUIDTeamsUpdateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1ProjectsUIDTeamsUpdateParamsWithTimeout(timeout time.Duration) *V1ProjectsUIDTeamsUpdateParams { + var () + return &V1ProjectsUIDTeamsUpdateParams{ + + timeout: timeout, + } +} + +// NewV1ProjectsUIDTeamsUpdateParamsWithContext creates a new V1ProjectsUIDTeamsUpdateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1ProjectsUIDTeamsUpdateParamsWithContext(ctx context.Context) *V1ProjectsUIDTeamsUpdateParams { + var () + return &V1ProjectsUIDTeamsUpdateParams{ + + Context: ctx, + } +} + +// NewV1ProjectsUIDTeamsUpdateParamsWithHTTPClient creates a new V1ProjectsUIDTeamsUpdateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1ProjectsUIDTeamsUpdateParamsWithHTTPClient(client *http.Client) *V1ProjectsUIDTeamsUpdateParams { + var () + return &V1ProjectsUIDTeamsUpdateParams{ + HTTPClient: client, + } +} + +/* +V1ProjectsUIDTeamsUpdateParams contains all the parameters to send to the API endpoint +for the v1 projects Uid teams update operation typically these are written to a http.Request +*/ +type V1ProjectsUIDTeamsUpdateParams struct { + + /*Body*/ + Body *models.V1ProjectTeamsEntity + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 projects Uid teams update params +func (o *V1ProjectsUIDTeamsUpdateParams) WithTimeout(timeout time.Duration) *V1ProjectsUIDTeamsUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 projects Uid teams update params +func (o *V1ProjectsUIDTeamsUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 projects Uid teams update params +func (o *V1ProjectsUIDTeamsUpdateParams) WithContext(ctx context.Context) *V1ProjectsUIDTeamsUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 projects Uid teams update params +func (o *V1ProjectsUIDTeamsUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 projects Uid teams update params +func (o *V1ProjectsUIDTeamsUpdateParams) WithHTTPClient(client *http.Client) *V1ProjectsUIDTeamsUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 projects Uid teams update params +func (o *V1ProjectsUIDTeamsUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 projects Uid teams update params +func (o *V1ProjectsUIDTeamsUpdateParams) WithBody(body *models.V1ProjectTeamsEntity) *V1ProjectsUIDTeamsUpdateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 projects Uid teams update params +func (o *V1ProjectsUIDTeamsUpdateParams) SetBody(body *models.V1ProjectTeamsEntity) { + o.Body = body +} + +// WithUID adds the uid to the v1 projects Uid teams update params +func (o *V1ProjectsUIDTeamsUpdateParams) WithUID(uid string) *V1ProjectsUIDTeamsUpdateParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 projects Uid teams update params +func (o *V1ProjectsUIDTeamsUpdateParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1ProjectsUIDTeamsUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_projects_uid_teams_update_responses.go b/api/client/v1/v1_projects_uid_teams_update_responses.go new file mode 100644 index 00000000..22fb410d --- /dev/null +++ b/api/client/v1/v1_projects_uid_teams_update_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1ProjectsUIDTeamsUpdateReader is a Reader for the V1ProjectsUIDTeamsUpdate structure. +type V1ProjectsUIDTeamsUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1ProjectsUIDTeamsUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1ProjectsUIDTeamsUpdateNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1ProjectsUIDTeamsUpdateNoContent creates a V1ProjectsUIDTeamsUpdateNoContent with default headers values +func NewV1ProjectsUIDTeamsUpdateNoContent() *V1ProjectsUIDTeamsUpdateNoContent { + return &V1ProjectsUIDTeamsUpdateNoContent{} +} + +/* +V1ProjectsUIDTeamsUpdateNoContent handles this case with default header values. + +The resource was updated successfully +*/ +type V1ProjectsUIDTeamsUpdateNoContent struct { +} + +func (o *V1ProjectsUIDTeamsUpdateNoContent) Error() string { + return fmt.Sprintf("[PUT /v1/projects/{uid}/teams][%d] v1ProjectsUidTeamsUpdateNoContent ", 204) +} + +func (o *V1ProjectsUIDTeamsUpdateNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_projects_uid_update_parameters.go b/api/client/v1/v1_projects_uid_update_parameters.go new file mode 100644 index 00000000..8bb89632 --- /dev/null +++ b/api/client/v1/v1_projects_uid_update_parameters.go @@ -0,0 +1,154 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1ProjectsUIDUpdateParams creates a new V1ProjectsUIDUpdateParams object +// with the default values initialized. +func NewV1ProjectsUIDUpdateParams() *V1ProjectsUIDUpdateParams { + var () + return &V1ProjectsUIDUpdateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1ProjectsUIDUpdateParamsWithTimeout creates a new V1ProjectsUIDUpdateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1ProjectsUIDUpdateParamsWithTimeout(timeout time.Duration) *V1ProjectsUIDUpdateParams { + var () + return &V1ProjectsUIDUpdateParams{ + + timeout: timeout, + } +} + +// NewV1ProjectsUIDUpdateParamsWithContext creates a new V1ProjectsUIDUpdateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1ProjectsUIDUpdateParamsWithContext(ctx context.Context) *V1ProjectsUIDUpdateParams { + var () + return &V1ProjectsUIDUpdateParams{ + + Context: ctx, + } +} + +// NewV1ProjectsUIDUpdateParamsWithHTTPClient creates a new V1ProjectsUIDUpdateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1ProjectsUIDUpdateParamsWithHTTPClient(client *http.Client) *V1ProjectsUIDUpdateParams { + var () + return &V1ProjectsUIDUpdateParams{ + HTTPClient: client, + } +} + +/* +V1ProjectsUIDUpdateParams contains all the parameters to send to the API endpoint +for the v1 projects Uid update operation typically these are written to a http.Request +*/ +type V1ProjectsUIDUpdateParams struct { + + /*Body*/ + Body *models.V1ProjectEntity + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 projects Uid update params +func (o *V1ProjectsUIDUpdateParams) WithTimeout(timeout time.Duration) *V1ProjectsUIDUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 projects Uid update params +func (o *V1ProjectsUIDUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 projects Uid update params +func (o *V1ProjectsUIDUpdateParams) WithContext(ctx context.Context) *V1ProjectsUIDUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 projects Uid update params +func (o *V1ProjectsUIDUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 projects Uid update params +func (o *V1ProjectsUIDUpdateParams) WithHTTPClient(client *http.Client) *V1ProjectsUIDUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 projects Uid update params +func (o *V1ProjectsUIDUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 projects Uid update params +func (o *V1ProjectsUIDUpdateParams) WithBody(body *models.V1ProjectEntity) *V1ProjectsUIDUpdateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 projects Uid update params +func (o *V1ProjectsUIDUpdateParams) SetBody(body *models.V1ProjectEntity) { + o.Body = body +} + +// WithUID adds the uid to the v1 projects Uid update params +func (o *V1ProjectsUIDUpdateParams) WithUID(uid string) *V1ProjectsUIDUpdateParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 projects Uid update params +func (o *V1ProjectsUIDUpdateParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1ProjectsUIDUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_projects_uid_update_responses.go b/api/client/v1/v1_projects_uid_update_responses.go new file mode 100644 index 00000000..50424804 --- /dev/null +++ b/api/client/v1/v1_projects_uid_update_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1ProjectsUIDUpdateReader is a Reader for the V1ProjectsUIDUpdate structure. +type V1ProjectsUIDUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1ProjectsUIDUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1ProjectsUIDUpdateNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1ProjectsUIDUpdateNoContent creates a V1ProjectsUIDUpdateNoContent with default headers values +func NewV1ProjectsUIDUpdateNoContent() *V1ProjectsUIDUpdateNoContent { + return &V1ProjectsUIDUpdateNoContent{} +} + +/* +V1ProjectsUIDUpdateNoContent handles this case with default header values. + +The resource was updated successfully +*/ +type V1ProjectsUIDUpdateNoContent struct { +} + +func (o *V1ProjectsUIDUpdateNoContent) Error() string { + return fmt.Sprintf("[PUT /v1/projects/{uid}][%d] v1ProjectsUidUpdateNoContent ", 204) +} + +func (o *V1ProjectsUIDUpdateNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_projects_uid_users_update_parameters.go b/api/client/v1/v1_projects_uid_users_update_parameters.go new file mode 100644 index 00000000..db00d62b --- /dev/null +++ b/api/client/v1/v1_projects_uid_users_update_parameters.go @@ -0,0 +1,154 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1ProjectsUIDUsersUpdateParams creates a new V1ProjectsUIDUsersUpdateParams object +// with the default values initialized. +func NewV1ProjectsUIDUsersUpdateParams() *V1ProjectsUIDUsersUpdateParams { + var () + return &V1ProjectsUIDUsersUpdateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1ProjectsUIDUsersUpdateParamsWithTimeout creates a new V1ProjectsUIDUsersUpdateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1ProjectsUIDUsersUpdateParamsWithTimeout(timeout time.Duration) *V1ProjectsUIDUsersUpdateParams { + var () + return &V1ProjectsUIDUsersUpdateParams{ + + timeout: timeout, + } +} + +// NewV1ProjectsUIDUsersUpdateParamsWithContext creates a new V1ProjectsUIDUsersUpdateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1ProjectsUIDUsersUpdateParamsWithContext(ctx context.Context) *V1ProjectsUIDUsersUpdateParams { + var () + return &V1ProjectsUIDUsersUpdateParams{ + + Context: ctx, + } +} + +// NewV1ProjectsUIDUsersUpdateParamsWithHTTPClient creates a new V1ProjectsUIDUsersUpdateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1ProjectsUIDUsersUpdateParamsWithHTTPClient(client *http.Client) *V1ProjectsUIDUsersUpdateParams { + var () + return &V1ProjectsUIDUsersUpdateParams{ + HTTPClient: client, + } +} + +/* +V1ProjectsUIDUsersUpdateParams contains all the parameters to send to the API endpoint +for the v1 projects Uid users update operation typically these are written to a http.Request +*/ +type V1ProjectsUIDUsersUpdateParams struct { + + /*Body*/ + Body *models.V1ProjectUsersEntity + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 projects Uid users update params +func (o *V1ProjectsUIDUsersUpdateParams) WithTimeout(timeout time.Duration) *V1ProjectsUIDUsersUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 projects Uid users update params +func (o *V1ProjectsUIDUsersUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 projects Uid users update params +func (o *V1ProjectsUIDUsersUpdateParams) WithContext(ctx context.Context) *V1ProjectsUIDUsersUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 projects Uid users update params +func (o *V1ProjectsUIDUsersUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 projects Uid users update params +func (o *V1ProjectsUIDUsersUpdateParams) WithHTTPClient(client *http.Client) *V1ProjectsUIDUsersUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 projects Uid users update params +func (o *V1ProjectsUIDUsersUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 projects Uid users update params +func (o *V1ProjectsUIDUsersUpdateParams) WithBody(body *models.V1ProjectUsersEntity) *V1ProjectsUIDUsersUpdateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 projects Uid users update params +func (o *V1ProjectsUIDUsersUpdateParams) SetBody(body *models.V1ProjectUsersEntity) { + o.Body = body +} + +// WithUID adds the uid to the v1 projects Uid users update params +func (o *V1ProjectsUIDUsersUpdateParams) WithUID(uid string) *V1ProjectsUIDUsersUpdateParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 projects Uid users update params +func (o *V1ProjectsUIDUsersUpdateParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1ProjectsUIDUsersUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_projects_uid_users_update_responses.go b/api/client/v1/v1_projects_uid_users_update_responses.go new file mode 100644 index 00000000..29f474e8 --- /dev/null +++ b/api/client/v1/v1_projects_uid_users_update_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1ProjectsUIDUsersUpdateReader is a Reader for the V1ProjectsUIDUsersUpdate structure. +type V1ProjectsUIDUsersUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1ProjectsUIDUsersUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1ProjectsUIDUsersUpdateNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1ProjectsUIDUsersUpdateNoContent creates a V1ProjectsUIDUsersUpdateNoContent with default headers values +func NewV1ProjectsUIDUsersUpdateNoContent() *V1ProjectsUIDUsersUpdateNoContent { + return &V1ProjectsUIDUsersUpdateNoContent{} +} + +/* +V1ProjectsUIDUsersUpdateNoContent handles this case with default header values. + +The resource was updated successfully +*/ +type V1ProjectsUIDUsersUpdateNoContent struct { +} + +func (o *V1ProjectsUIDUsersUpdateNoContent) Error() string { + return fmt.Sprintf("[PUT /v1/projects/{uid}/users][%d] v1ProjectsUidUsersUpdateNoContent ", 204) +} + +func (o *V1ProjectsUIDUsersUpdateNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_projects_uid_validate_parameters.go b/api/client/v1/v1_projects_uid_validate_parameters.go new file mode 100644 index 00000000..91a93586 --- /dev/null +++ b/api/client/v1/v1_projects_uid_validate_parameters.go @@ -0,0 +1,133 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1ProjectsUIDValidateParams creates a new V1ProjectsUIDValidateParams object +// with the default values initialized. +func NewV1ProjectsUIDValidateParams() *V1ProjectsUIDValidateParams { + var () + return &V1ProjectsUIDValidateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1ProjectsUIDValidateParamsWithTimeout creates a new V1ProjectsUIDValidateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1ProjectsUIDValidateParamsWithTimeout(timeout time.Duration) *V1ProjectsUIDValidateParams { + var () + return &V1ProjectsUIDValidateParams{ + + timeout: timeout, + } +} + +// NewV1ProjectsUIDValidateParamsWithContext creates a new V1ProjectsUIDValidateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1ProjectsUIDValidateParamsWithContext(ctx context.Context) *V1ProjectsUIDValidateParams { + var () + return &V1ProjectsUIDValidateParams{ + + Context: ctx, + } +} + +// NewV1ProjectsUIDValidateParamsWithHTTPClient creates a new V1ProjectsUIDValidateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1ProjectsUIDValidateParamsWithHTTPClient(client *http.Client) *V1ProjectsUIDValidateParams { + var () + return &V1ProjectsUIDValidateParams{ + HTTPClient: client, + } +} + +/* +V1ProjectsUIDValidateParams contains all the parameters to send to the API endpoint +for the v1 projects Uid validate operation typically these are written to a http.Request +*/ +type V1ProjectsUIDValidateParams struct { + + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 projects Uid validate params +func (o *V1ProjectsUIDValidateParams) WithTimeout(timeout time.Duration) *V1ProjectsUIDValidateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 projects Uid validate params +func (o *V1ProjectsUIDValidateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 projects Uid validate params +func (o *V1ProjectsUIDValidateParams) WithContext(ctx context.Context) *V1ProjectsUIDValidateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 projects Uid validate params +func (o *V1ProjectsUIDValidateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 projects Uid validate params +func (o *V1ProjectsUIDValidateParams) WithHTTPClient(client *http.Client) *V1ProjectsUIDValidateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 projects Uid validate params +func (o *V1ProjectsUIDValidateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithUID adds the uid to the v1 projects Uid validate params +func (o *V1ProjectsUIDValidateParams) WithUID(uid string) *V1ProjectsUIDValidateParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 projects Uid validate params +func (o *V1ProjectsUIDValidateParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1ProjectsUIDValidateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_projects_uid_validate_responses.go b/api/client/v1/v1_projects_uid_validate_responses.go new file mode 100644 index 00000000..c8e59bc4 --- /dev/null +++ b/api/client/v1/v1_projects_uid_validate_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1ProjectsUIDValidateReader is a Reader for the V1ProjectsUIDValidate structure. +type V1ProjectsUIDValidateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1ProjectsUIDValidateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1ProjectsUIDValidateOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1ProjectsUIDValidateOK creates a V1ProjectsUIDValidateOK with default headers values +func NewV1ProjectsUIDValidateOK() *V1ProjectsUIDValidateOK { + return &V1ProjectsUIDValidateOK{} +} + +/* +V1ProjectsUIDValidateOK handles this case with default header values. + +(empty) +*/ +type V1ProjectsUIDValidateOK struct { + Payload *models.V1ProjectActiveResources +} + +func (o *V1ProjectsUIDValidateOK) Error() string { + return fmt.Sprintf("[DELETE /v1/projects/{uid}/validate][%d] v1ProjectsUidValidateOK %+v", 200, o.Payload) +} + +func (o *V1ProjectsUIDValidateOK) GetPayload() *models.V1ProjectActiveResources { + return o.Payload +} + +func (o *V1ProjectsUIDValidateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1ProjectActiveResources) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_rate_config_get_parameters.go b/api/client/v1/v1_rate_config_get_parameters.go new file mode 100644 index 00000000..a40a1fda --- /dev/null +++ b/api/client/v1/v1_rate_config_get_parameters.go @@ -0,0 +1,133 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1RateConfigGetParams creates a new V1RateConfigGetParams object +// with the default values initialized. +func NewV1RateConfigGetParams() *V1RateConfigGetParams { + var () + return &V1RateConfigGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1RateConfigGetParamsWithTimeout creates a new V1RateConfigGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1RateConfigGetParamsWithTimeout(timeout time.Duration) *V1RateConfigGetParams { + var () + return &V1RateConfigGetParams{ + + timeout: timeout, + } +} + +// NewV1RateConfigGetParamsWithContext creates a new V1RateConfigGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1RateConfigGetParamsWithContext(ctx context.Context) *V1RateConfigGetParams { + var () + return &V1RateConfigGetParams{ + + Context: ctx, + } +} + +// NewV1RateConfigGetParamsWithHTTPClient creates a new V1RateConfigGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1RateConfigGetParamsWithHTTPClient(client *http.Client) *V1RateConfigGetParams { + var () + return &V1RateConfigGetParams{ + HTTPClient: client, + } +} + +/* +V1RateConfigGetParams contains all the parameters to send to the API endpoint +for the v1 rate config get operation typically these are written to a http.Request +*/ +type V1RateConfigGetParams struct { + + /*TenantUID*/ + TenantUID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 rate config get params +func (o *V1RateConfigGetParams) WithTimeout(timeout time.Duration) *V1RateConfigGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 rate config get params +func (o *V1RateConfigGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 rate config get params +func (o *V1RateConfigGetParams) WithContext(ctx context.Context) *V1RateConfigGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 rate config get params +func (o *V1RateConfigGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 rate config get params +func (o *V1RateConfigGetParams) WithHTTPClient(client *http.Client) *V1RateConfigGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 rate config get params +func (o *V1RateConfigGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithTenantUID adds the tenantUID to the v1 rate config get params +func (o *V1RateConfigGetParams) WithTenantUID(tenantUID string) *V1RateConfigGetParams { + o.SetTenantUID(tenantUID) + return o +} + +// SetTenantUID adds the tenantUid to the v1 rate config get params +func (o *V1RateConfigGetParams) SetTenantUID(tenantUID string) { + o.TenantUID = tenantUID +} + +// WriteToRequest writes these params to a swagger request +func (o *V1RateConfigGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param tenantUid + if err := r.SetPathParam("tenantUid", o.TenantUID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_rate_config_get_responses.go b/api/client/v1/v1_rate_config_get_responses.go new file mode 100644 index 00000000..137ad110 --- /dev/null +++ b/api/client/v1/v1_rate_config_get_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1RateConfigGetReader is a Reader for the V1RateConfigGet structure. +type V1RateConfigGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1RateConfigGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1RateConfigGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1RateConfigGetOK creates a V1RateConfigGetOK with default headers values +func NewV1RateConfigGetOK() *V1RateConfigGetOK { + return &V1RateConfigGetOK{} +} + +/* +V1RateConfigGetOK handles this case with default header values. + +OK +*/ +type V1RateConfigGetOK struct { + Payload *models.V1RateConfig +} + +func (o *V1RateConfigGetOK) Error() string { + return fmt.Sprintf("[GET /v1/tenants/{tenantUid}/rateConfig][%d] v1RateConfigGetOK %+v", 200, o.Payload) +} + +func (o *V1RateConfigGetOK) GetPayload() *models.V1RateConfig { + return o.Payload +} + +func (o *V1RateConfigGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1RateConfig) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_rate_config_update_parameters.go b/api/client/v1/v1_rate_config_update_parameters.go new file mode 100644 index 00000000..4c4e6084 --- /dev/null +++ b/api/client/v1/v1_rate_config_update_parameters.go @@ -0,0 +1,154 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1RateConfigUpdateParams creates a new V1RateConfigUpdateParams object +// with the default values initialized. +func NewV1RateConfigUpdateParams() *V1RateConfigUpdateParams { + var () + return &V1RateConfigUpdateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1RateConfigUpdateParamsWithTimeout creates a new V1RateConfigUpdateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1RateConfigUpdateParamsWithTimeout(timeout time.Duration) *V1RateConfigUpdateParams { + var () + return &V1RateConfigUpdateParams{ + + timeout: timeout, + } +} + +// NewV1RateConfigUpdateParamsWithContext creates a new V1RateConfigUpdateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1RateConfigUpdateParamsWithContext(ctx context.Context) *V1RateConfigUpdateParams { + var () + return &V1RateConfigUpdateParams{ + + Context: ctx, + } +} + +// NewV1RateConfigUpdateParamsWithHTTPClient creates a new V1RateConfigUpdateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1RateConfigUpdateParamsWithHTTPClient(client *http.Client) *V1RateConfigUpdateParams { + var () + return &V1RateConfigUpdateParams{ + HTTPClient: client, + } +} + +/* +V1RateConfigUpdateParams contains all the parameters to send to the API endpoint +for the v1 rate config update operation typically these are written to a http.Request +*/ +type V1RateConfigUpdateParams struct { + + /*Body*/ + Body *models.V1RateConfig + /*TenantUID*/ + TenantUID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 rate config update params +func (o *V1RateConfigUpdateParams) WithTimeout(timeout time.Duration) *V1RateConfigUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 rate config update params +func (o *V1RateConfigUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 rate config update params +func (o *V1RateConfigUpdateParams) WithContext(ctx context.Context) *V1RateConfigUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 rate config update params +func (o *V1RateConfigUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 rate config update params +func (o *V1RateConfigUpdateParams) WithHTTPClient(client *http.Client) *V1RateConfigUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 rate config update params +func (o *V1RateConfigUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 rate config update params +func (o *V1RateConfigUpdateParams) WithBody(body *models.V1RateConfig) *V1RateConfigUpdateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 rate config update params +func (o *V1RateConfigUpdateParams) SetBody(body *models.V1RateConfig) { + o.Body = body +} + +// WithTenantUID adds the tenantUID to the v1 rate config update params +func (o *V1RateConfigUpdateParams) WithTenantUID(tenantUID string) *V1RateConfigUpdateParams { + o.SetTenantUID(tenantUID) + return o +} + +// SetTenantUID adds the tenantUid to the v1 rate config update params +func (o *V1RateConfigUpdateParams) SetTenantUID(tenantUID string) { + o.TenantUID = tenantUID +} + +// WriteToRequest writes these params to a swagger request +func (o *V1RateConfigUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param tenantUid + if err := r.SetPathParam("tenantUid", o.TenantUID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_rate_config_update_responses.go b/api/client/v1/v1_rate_config_update_responses.go new file mode 100644 index 00000000..f7e50f70 --- /dev/null +++ b/api/client/v1/v1_rate_config_update_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1RateConfigUpdateReader is a Reader for the V1RateConfigUpdate structure. +type V1RateConfigUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1RateConfigUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1RateConfigUpdateNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1RateConfigUpdateNoContent creates a V1RateConfigUpdateNoContent with default headers values +func NewV1RateConfigUpdateNoContent() *V1RateConfigUpdateNoContent { + return &V1RateConfigUpdateNoContent{} +} + +/* +V1RateConfigUpdateNoContent handles this case with default header values. + +The resource was updated successfully +*/ +type V1RateConfigUpdateNoContent struct { +} + +func (o *V1RateConfigUpdateNoContent) Error() string { + return fmt.Sprintf("[PUT /v1/tenants/{tenantUid}/rateConfig][%d] v1RateConfigUpdateNoContent ", 204) +} + +func (o *V1RateConfigUpdateNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_registries_helm_create_parameters.go b/api/client/v1/v1_registries_helm_create_parameters.go new file mode 100644 index 00000000..94fdf727 --- /dev/null +++ b/api/client/v1/v1_registries_helm_create_parameters.go @@ -0,0 +1,177 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1RegistriesHelmCreateParams creates a new V1RegistriesHelmCreateParams object +// with the default values initialized. +func NewV1RegistriesHelmCreateParams() *V1RegistriesHelmCreateParams { + var ( + scopeDefault = string("all") + ) + return &V1RegistriesHelmCreateParams{ + Scope: &scopeDefault, + + timeout: cr.DefaultTimeout, + } +} + +// NewV1RegistriesHelmCreateParamsWithTimeout creates a new V1RegistriesHelmCreateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1RegistriesHelmCreateParamsWithTimeout(timeout time.Duration) *V1RegistriesHelmCreateParams { + var ( + scopeDefault = string("all") + ) + return &V1RegistriesHelmCreateParams{ + Scope: &scopeDefault, + + timeout: timeout, + } +} + +// NewV1RegistriesHelmCreateParamsWithContext creates a new V1RegistriesHelmCreateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1RegistriesHelmCreateParamsWithContext(ctx context.Context) *V1RegistriesHelmCreateParams { + var ( + scopeDefault = string("all") + ) + return &V1RegistriesHelmCreateParams{ + Scope: &scopeDefault, + + Context: ctx, + } +} + +// NewV1RegistriesHelmCreateParamsWithHTTPClient creates a new V1RegistriesHelmCreateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1RegistriesHelmCreateParamsWithHTTPClient(client *http.Client) *V1RegistriesHelmCreateParams { + var ( + scopeDefault = string("all") + ) + return &V1RegistriesHelmCreateParams{ + Scope: &scopeDefault, + HTTPClient: client, + } +} + +/* +V1RegistriesHelmCreateParams contains all the parameters to send to the API endpoint +for the v1 registries helm create operation typically these are written to a http.Request +*/ +type V1RegistriesHelmCreateParams struct { + + /*Body*/ + Body *models.V1HelmRegistryEntity + /*Scope*/ + Scope *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 registries helm create params +func (o *V1RegistriesHelmCreateParams) WithTimeout(timeout time.Duration) *V1RegistriesHelmCreateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 registries helm create params +func (o *V1RegistriesHelmCreateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 registries helm create params +func (o *V1RegistriesHelmCreateParams) WithContext(ctx context.Context) *V1RegistriesHelmCreateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 registries helm create params +func (o *V1RegistriesHelmCreateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 registries helm create params +func (o *V1RegistriesHelmCreateParams) WithHTTPClient(client *http.Client) *V1RegistriesHelmCreateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 registries helm create params +func (o *V1RegistriesHelmCreateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 registries helm create params +func (o *V1RegistriesHelmCreateParams) WithBody(body *models.V1HelmRegistryEntity) *V1RegistriesHelmCreateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 registries helm create params +func (o *V1RegistriesHelmCreateParams) SetBody(body *models.V1HelmRegistryEntity) { + o.Body = body +} + +// WithScope adds the scope to the v1 registries helm create params +func (o *V1RegistriesHelmCreateParams) WithScope(scope *string) *V1RegistriesHelmCreateParams { + o.SetScope(scope) + return o +} + +// SetScope adds the scope to the v1 registries helm create params +func (o *V1RegistriesHelmCreateParams) SetScope(scope *string) { + o.Scope = scope +} + +// WriteToRequest writes these params to a swagger request +func (o *V1RegistriesHelmCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + if o.Scope != nil { + + // query param scope + var qrScope string + if o.Scope != nil { + qrScope = *o.Scope + } + qScope := qrScope + if qScope != "" { + if err := r.SetQueryParam("scope", qScope); err != nil { + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_registries_helm_create_responses.go b/api/client/v1/v1_registries_helm_create_responses.go new file mode 100644 index 00000000..9d11fdea --- /dev/null +++ b/api/client/v1/v1_registries_helm_create_responses.go @@ -0,0 +1,77 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1RegistriesHelmCreateReader is a Reader for the V1RegistriesHelmCreate structure. +type V1RegistriesHelmCreateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1RegistriesHelmCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 201: + result := NewV1RegistriesHelmCreateCreated() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1RegistriesHelmCreateCreated creates a V1RegistriesHelmCreateCreated with default headers values +func NewV1RegistriesHelmCreateCreated() *V1RegistriesHelmCreateCreated { + return &V1RegistriesHelmCreateCreated{} +} + +/* +V1RegistriesHelmCreateCreated handles this case with default header values. + +Created successfully +*/ +type V1RegistriesHelmCreateCreated struct { + /*Audit uid for the request + */ + AuditUID string + + Payload *models.V1UID +} + +func (o *V1RegistriesHelmCreateCreated) Error() string { + return fmt.Sprintf("[POST /v1/registries/helm][%d] v1RegistriesHelmCreateCreated %+v", 201, o.Payload) +} + +func (o *V1RegistriesHelmCreateCreated) GetPayload() *models.V1UID { + return o.Payload +} + +func (o *V1RegistriesHelmCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header AuditUid + o.AuditUID = response.GetHeader("AuditUid") + + o.Payload = new(models.V1UID) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_registries_helm_list_parameters.go b/api/client/v1/v1_registries_helm_list_parameters.go new file mode 100644 index 00000000..cd535bd7 --- /dev/null +++ b/api/client/v1/v1_registries_helm_list_parameters.go @@ -0,0 +1,360 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// NewV1RegistriesHelmListParams creates a new V1RegistriesHelmListParams object +// with the default values initialized. +func NewV1RegistriesHelmListParams() *V1RegistriesHelmListParams { + var ( + limitDefault = int64(50) + scopeDefault = string("all") + ) + return &V1RegistriesHelmListParams{ + Limit: &limitDefault, + Scope: &scopeDefault, + + timeout: cr.DefaultTimeout, + } +} + +// NewV1RegistriesHelmListParamsWithTimeout creates a new V1RegistriesHelmListParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1RegistriesHelmListParamsWithTimeout(timeout time.Duration) *V1RegistriesHelmListParams { + var ( + limitDefault = int64(50) + scopeDefault = string("all") + ) + return &V1RegistriesHelmListParams{ + Limit: &limitDefault, + Scope: &scopeDefault, + + timeout: timeout, + } +} + +// NewV1RegistriesHelmListParamsWithContext creates a new V1RegistriesHelmListParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1RegistriesHelmListParamsWithContext(ctx context.Context) *V1RegistriesHelmListParams { + var ( + limitDefault = int64(50) + scopeDefault = string("all") + ) + return &V1RegistriesHelmListParams{ + Limit: &limitDefault, + Scope: &scopeDefault, + + Context: ctx, + } +} + +// NewV1RegistriesHelmListParamsWithHTTPClient creates a new V1RegistriesHelmListParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1RegistriesHelmListParamsWithHTTPClient(client *http.Client) *V1RegistriesHelmListParams { + var ( + limitDefault = int64(50) + scopeDefault = string("all") + ) + return &V1RegistriesHelmListParams{ + Limit: &limitDefault, + Scope: &scopeDefault, + HTTPClient: client, + } +} + +/* +V1RegistriesHelmListParams contains all the parameters to send to the API endpoint +for the v1 registries helm list operation typically these are written to a http.Request +*/ +type V1RegistriesHelmListParams struct { + + /*Continue + continue token to paginate the subsequent data items + + */ + Continue *string + /*Fields + Set of fields to be presented in the response with values. The fields are comma separated. Eg: metadata.uid,metadata.name + + */ + Fields *string + /*Filters + Filters can be combined with AND, OR operators with field path name. Eg: metadata.name=TestServiceANDspec.cloudType=aws + + Server will be restricted to certain fields based on the indexed data for each resource. + + */ + Filters *string + /*Limit + limit is a maximum number of responses to return for a list call. Default and maximum value of the limit is 50. + If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. + + */ + Limit *int64 + /*Offset + offset is the next index number from which the response will start. The response offset value can be used along with continue token for the pagination. + + */ + Offset *int64 + /*OrderBy + Specify the fields with sort order. 1 indicates ascending and -1 for descending. Eg: orderBy=metadata.name=1,metadata.uid=-1 + + */ + OrderBy *string + /*Scope*/ + Scope *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 registries helm list params +func (o *V1RegistriesHelmListParams) WithTimeout(timeout time.Duration) *V1RegistriesHelmListParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 registries helm list params +func (o *V1RegistriesHelmListParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 registries helm list params +func (o *V1RegistriesHelmListParams) WithContext(ctx context.Context) *V1RegistriesHelmListParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 registries helm list params +func (o *V1RegistriesHelmListParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 registries helm list params +func (o *V1RegistriesHelmListParams) WithHTTPClient(client *http.Client) *V1RegistriesHelmListParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 registries helm list params +func (o *V1RegistriesHelmListParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithContinue adds the continueVar to the v1 registries helm list params +func (o *V1RegistriesHelmListParams) WithContinue(continueVar *string) *V1RegistriesHelmListParams { + o.SetContinue(continueVar) + return o +} + +// SetContinue adds the continue to the v1 registries helm list params +func (o *V1RegistriesHelmListParams) SetContinue(continueVar *string) { + o.Continue = continueVar +} + +// WithFields adds the fields to the v1 registries helm list params +func (o *V1RegistriesHelmListParams) WithFields(fields *string) *V1RegistriesHelmListParams { + o.SetFields(fields) + return o +} + +// SetFields adds the fields to the v1 registries helm list params +func (o *V1RegistriesHelmListParams) SetFields(fields *string) { + o.Fields = fields +} + +// WithFilters adds the filters to the v1 registries helm list params +func (o *V1RegistriesHelmListParams) WithFilters(filters *string) *V1RegistriesHelmListParams { + o.SetFilters(filters) + return o +} + +// SetFilters adds the filters to the v1 registries helm list params +func (o *V1RegistriesHelmListParams) SetFilters(filters *string) { + o.Filters = filters +} + +// WithLimit adds the limit to the v1 registries helm list params +func (o *V1RegistriesHelmListParams) WithLimit(limit *int64) *V1RegistriesHelmListParams { + o.SetLimit(limit) + return o +} + +// SetLimit adds the limit to the v1 registries helm list params +func (o *V1RegistriesHelmListParams) SetLimit(limit *int64) { + o.Limit = limit +} + +// WithOffset adds the offset to the v1 registries helm list params +func (o *V1RegistriesHelmListParams) WithOffset(offset *int64) *V1RegistriesHelmListParams { + o.SetOffset(offset) + return o +} + +// SetOffset adds the offset to the v1 registries helm list params +func (o *V1RegistriesHelmListParams) SetOffset(offset *int64) { + o.Offset = offset +} + +// WithOrderBy adds the orderBy to the v1 registries helm list params +func (o *V1RegistriesHelmListParams) WithOrderBy(orderBy *string) *V1RegistriesHelmListParams { + o.SetOrderBy(orderBy) + return o +} + +// SetOrderBy adds the orderBy to the v1 registries helm list params +func (o *V1RegistriesHelmListParams) SetOrderBy(orderBy *string) { + o.OrderBy = orderBy +} + +// WithScope adds the scope to the v1 registries helm list params +func (o *V1RegistriesHelmListParams) WithScope(scope *string) *V1RegistriesHelmListParams { + o.SetScope(scope) + return o +} + +// SetScope adds the scope to the v1 registries helm list params +func (o *V1RegistriesHelmListParams) SetScope(scope *string) { + o.Scope = scope +} + +// WriteToRequest writes these params to a swagger request +func (o *V1RegistriesHelmListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Continue != nil { + + // query param continue + var qrContinue string + if o.Continue != nil { + qrContinue = *o.Continue + } + qContinue := qrContinue + if qContinue != "" { + if err := r.SetQueryParam("continue", qContinue); err != nil { + return err + } + } + + } + + if o.Fields != nil { + + // query param fields + var qrFields string + if o.Fields != nil { + qrFields = *o.Fields + } + qFields := qrFields + if qFields != "" { + if err := r.SetQueryParam("fields", qFields); err != nil { + return err + } + } + + } + + if o.Filters != nil { + + // query param filters + var qrFilters string + if o.Filters != nil { + qrFilters = *o.Filters + } + qFilters := qrFilters + if qFilters != "" { + if err := r.SetQueryParam("filters", qFilters); err != nil { + return err + } + } + + } + + if o.Limit != nil { + + // query param limit + var qrLimit int64 + if o.Limit != nil { + qrLimit = *o.Limit + } + qLimit := swag.FormatInt64(qrLimit) + if qLimit != "" { + if err := r.SetQueryParam("limit", qLimit); err != nil { + return err + } + } + + } + + if o.Offset != nil { + + // query param offset + var qrOffset int64 + if o.Offset != nil { + qrOffset = *o.Offset + } + qOffset := swag.FormatInt64(qrOffset) + if qOffset != "" { + if err := r.SetQueryParam("offset", qOffset); err != nil { + return err + } + } + + } + + if o.OrderBy != nil { + + // query param orderBy + var qrOrderBy string + if o.OrderBy != nil { + qrOrderBy = *o.OrderBy + } + qOrderBy := qrOrderBy + if qOrderBy != "" { + if err := r.SetQueryParam("orderBy", qOrderBy); err != nil { + return err + } + } + + } + + if o.Scope != nil { + + // query param scope + var qrScope string + if o.Scope != nil { + qrScope = *o.Scope + } + qScope := qrScope + if qScope != "" { + if err := r.SetQueryParam("scope", qScope); err != nil { + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_registries_helm_list_responses.go b/api/client/v1/v1_registries_helm_list_responses.go new file mode 100644 index 00000000..b6b6029e --- /dev/null +++ b/api/client/v1/v1_registries_helm_list_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1RegistriesHelmListReader is a Reader for the V1RegistriesHelmList structure. +type V1RegistriesHelmListReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1RegistriesHelmListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1RegistriesHelmListOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1RegistriesHelmListOK creates a V1RegistriesHelmListOK with default headers values +func NewV1RegistriesHelmListOK() *V1RegistriesHelmListOK { + return &V1RegistriesHelmListOK{} +} + +/* +V1RegistriesHelmListOK handles this case with default header values. + +An array of registry items +*/ +type V1RegistriesHelmListOK struct { + Payload *models.V1HelmRegistries +} + +func (o *V1RegistriesHelmListOK) Error() string { + return fmt.Sprintf("[GET /v1/registries/helm][%d] v1RegistriesHelmListOK %+v", 200, o.Payload) +} + +func (o *V1RegistriesHelmListOK) GetPayload() *models.V1HelmRegistries { + return o.Payload +} + +func (o *V1RegistriesHelmListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1HelmRegistries) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_registries_helm_summary_list_parameters.go b/api/client/v1/v1_registries_helm_summary_list_parameters.go new file mode 100644 index 00000000..bde17a41 --- /dev/null +++ b/api/client/v1/v1_registries_helm_summary_list_parameters.go @@ -0,0 +1,360 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// NewV1RegistriesHelmSummaryListParams creates a new V1RegistriesHelmSummaryListParams object +// with the default values initialized. +func NewV1RegistriesHelmSummaryListParams() *V1RegistriesHelmSummaryListParams { + var ( + limitDefault = int64(50) + scopeDefault = string("all") + ) + return &V1RegistriesHelmSummaryListParams{ + Limit: &limitDefault, + Scope: &scopeDefault, + + timeout: cr.DefaultTimeout, + } +} + +// NewV1RegistriesHelmSummaryListParamsWithTimeout creates a new V1RegistriesHelmSummaryListParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1RegistriesHelmSummaryListParamsWithTimeout(timeout time.Duration) *V1RegistriesHelmSummaryListParams { + var ( + limitDefault = int64(50) + scopeDefault = string("all") + ) + return &V1RegistriesHelmSummaryListParams{ + Limit: &limitDefault, + Scope: &scopeDefault, + + timeout: timeout, + } +} + +// NewV1RegistriesHelmSummaryListParamsWithContext creates a new V1RegistriesHelmSummaryListParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1RegistriesHelmSummaryListParamsWithContext(ctx context.Context) *V1RegistriesHelmSummaryListParams { + var ( + limitDefault = int64(50) + scopeDefault = string("all") + ) + return &V1RegistriesHelmSummaryListParams{ + Limit: &limitDefault, + Scope: &scopeDefault, + + Context: ctx, + } +} + +// NewV1RegistriesHelmSummaryListParamsWithHTTPClient creates a new V1RegistriesHelmSummaryListParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1RegistriesHelmSummaryListParamsWithHTTPClient(client *http.Client) *V1RegistriesHelmSummaryListParams { + var ( + limitDefault = int64(50) + scopeDefault = string("all") + ) + return &V1RegistriesHelmSummaryListParams{ + Limit: &limitDefault, + Scope: &scopeDefault, + HTTPClient: client, + } +} + +/* +V1RegistriesHelmSummaryListParams contains all the parameters to send to the API endpoint +for the v1 registries helm summary list operation typically these are written to a http.Request +*/ +type V1RegistriesHelmSummaryListParams struct { + + /*Continue + continue token to paginate the subsequent data items + + */ + Continue *string + /*Fields + Set of fields to be presented in the response with values. The fields are comma separated. Eg: metadata.uid,metadata.name + + */ + Fields *string + /*Filters + Filters can be combined with AND, OR operators with field path name. Eg: metadata.name=TestServiceANDspec.cloudType=aws + + Server will be restricted to certain fields based on the indexed data for each resource. + + */ + Filters *string + /*Limit + limit is a maximum number of responses to return for a list call. Default and maximum value of the limit is 50. + If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. + + */ + Limit *int64 + /*Offset + offset is the next index number from which the response will start. The response offset value can be used along with continue token for the pagination. + + */ + Offset *int64 + /*OrderBy + Specify the fields with sort order. 1 indicates ascending and -1 for descending. Eg: orderBy=metadata.name=1,metadata.uid=-1 + + */ + OrderBy *string + /*Scope*/ + Scope *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 registries helm summary list params +func (o *V1RegistriesHelmSummaryListParams) WithTimeout(timeout time.Duration) *V1RegistriesHelmSummaryListParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 registries helm summary list params +func (o *V1RegistriesHelmSummaryListParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 registries helm summary list params +func (o *V1RegistriesHelmSummaryListParams) WithContext(ctx context.Context) *V1RegistriesHelmSummaryListParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 registries helm summary list params +func (o *V1RegistriesHelmSummaryListParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 registries helm summary list params +func (o *V1RegistriesHelmSummaryListParams) WithHTTPClient(client *http.Client) *V1RegistriesHelmSummaryListParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 registries helm summary list params +func (o *V1RegistriesHelmSummaryListParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithContinue adds the continueVar to the v1 registries helm summary list params +func (o *V1RegistriesHelmSummaryListParams) WithContinue(continueVar *string) *V1RegistriesHelmSummaryListParams { + o.SetContinue(continueVar) + return o +} + +// SetContinue adds the continue to the v1 registries helm summary list params +func (o *V1RegistriesHelmSummaryListParams) SetContinue(continueVar *string) { + o.Continue = continueVar +} + +// WithFields adds the fields to the v1 registries helm summary list params +func (o *V1RegistriesHelmSummaryListParams) WithFields(fields *string) *V1RegistriesHelmSummaryListParams { + o.SetFields(fields) + return o +} + +// SetFields adds the fields to the v1 registries helm summary list params +func (o *V1RegistriesHelmSummaryListParams) SetFields(fields *string) { + o.Fields = fields +} + +// WithFilters adds the filters to the v1 registries helm summary list params +func (o *V1RegistriesHelmSummaryListParams) WithFilters(filters *string) *V1RegistriesHelmSummaryListParams { + o.SetFilters(filters) + return o +} + +// SetFilters adds the filters to the v1 registries helm summary list params +func (o *V1RegistriesHelmSummaryListParams) SetFilters(filters *string) { + o.Filters = filters +} + +// WithLimit adds the limit to the v1 registries helm summary list params +func (o *V1RegistriesHelmSummaryListParams) WithLimit(limit *int64) *V1RegistriesHelmSummaryListParams { + o.SetLimit(limit) + return o +} + +// SetLimit adds the limit to the v1 registries helm summary list params +func (o *V1RegistriesHelmSummaryListParams) SetLimit(limit *int64) { + o.Limit = limit +} + +// WithOffset adds the offset to the v1 registries helm summary list params +func (o *V1RegistriesHelmSummaryListParams) WithOffset(offset *int64) *V1RegistriesHelmSummaryListParams { + o.SetOffset(offset) + return o +} + +// SetOffset adds the offset to the v1 registries helm summary list params +func (o *V1RegistriesHelmSummaryListParams) SetOffset(offset *int64) { + o.Offset = offset +} + +// WithOrderBy adds the orderBy to the v1 registries helm summary list params +func (o *V1RegistriesHelmSummaryListParams) WithOrderBy(orderBy *string) *V1RegistriesHelmSummaryListParams { + o.SetOrderBy(orderBy) + return o +} + +// SetOrderBy adds the orderBy to the v1 registries helm summary list params +func (o *V1RegistriesHelmSummaryListParams) SetOrderBy(orderBy *string) { + o.OrderBy = orderBy +} + +// WithScope adds the scope to the v1 registries helm summary list params +func (o *V1RegistriesHelmSummaryListParams) WithScope(scope *string) *V1RegistriesHelmSummaryListParams { + o.SetScope(scope) + return o +} + +// SetScope adds the scope to the v1 registries helm summary list params +func (o *V1RegistriesHelmSummaryListParams) SetScope(scope *string) { + o.Scope = scope +} + +// WriteToRequest writes these params to a swagger request +func (o *V1RegistriesHelmSummaryListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Continue != nil { + + // query param continue + var qrContinue string + if o.Continue != nil { + qrContinue = *o.Continue + } + qContinue := qrContinue + if qContinue != "" { + if err := r.SetQueryParam("continue", qContinue); err != nil { + return err + } + } + + } + + if o.Fields != nil { + + // query param fields + var qrFields string + if o.Fields != nil { + qrFields = *o.Fields + } + qFields := qrFields + if qFields != "" { + if err := r.SetQueryParam("fields", qFields); err != nil { + return err + } + } + + } + + if o.Filters != nil { + + // query param filters + var qrFilters string + if o.Filters != nil { + qrFilters = *o.Filters + } + qFilters := qrFilters + if qFilters != "" { + if err := r.SetQueryParam("filters", qFilters); err != nil { + return err + } + } + + } + + if o.Limit != nil { + + // query param limit + var qrLimit int64 + if o.Limit != nil { + qrLimit = *o.Limit + } + qLimit := swag.FormatInt64(qrLimit) + if qLimit != "" { + if err := r.SetQueryParam("limit", qLimit); err != nil { + return err + } + } + + } + + if o.Offset != nil { + + // query param offset + var qrOffset int64 + if o.Offset != nil { + qrOffset = *o.Offset + } + qOffset := swag.FormatInt64(qrOffset) + if qOffset != "" { + if err := r.SetQueryParam("offset", qOffset); err != nil { + return err + } + } + + } + + if o.OrderBy != nil { + + // query param orderBy + var qrOrderBy string + if o.OrderBy != nil { + qrOrderBy = *o.OrderBy + } + qOrderBy := qrOrderBy + if qOrderBy != "" { + if err := r.SetQueryParam("orderBy", qOrderBy); err != nil { + return err + } + } + + } + + if o.Scope != nil { + + // query param scope + var qrScope string + if o.Scope != nil { + qrScope = *o.Scope + } + qScope := qrScope + if qScope != "" { + if err := r.SetQueryParam("scope", qScope); err != nil { + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_registries_helm_summary_list_responses.go b/api/client/v1/v1_registries_helm_summary_list_responses.go new file mode 100644 index 00000000..ad25b062 --- /dev/null +++ b/api/client/v1/v1_registries_helm_summary_list_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1RegistriesHelmSummaryListReader is a Reader for the V1RegistriesHelmSummaryList structure. +type V1RegistriesHelmSummaryListReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1RegistriesHelmSummaryListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1RegistriesHelmSummaryListOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1RegistriesHelmSummaryListOK creates a V1RegistriesHelmSummaryListOK with default headers values +func NewV1RegistriesHelmSummaryListOK() *V1RegistriesHelmSummaryListOK { + return &V1RegistriesHelmSummaryListOK{} +} + +/* +V1RegistriesHelmSummaryListOK handles this case with default header values. + +An array of registry items +*/ +type V1RegistriesHelmSummaryListOK struct { + Payload *models.V1HelmRegistriesSummary +} + +func (o *V1RegistriesHelmSummaryListOK) Error() string { + return fmt.Sprintf("[GET /v1/registries/helm/summary][%d] v1RegistriesHelmSummaryListOK %+v", 200, o.Payload) +} + +func (o *V1RegistriesHelmSummaryListOK) GetPayload() *models.V1HelmRegistriesSummary { + return o.Payload +} + +func (o *V1RegistriesHelmSummaryListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1HelmRegistriesSummary) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_registries_helm_uid_delete_parameters.go b/api/client/v1/v1_registries_helm_uid_delete_parameters.go new file mode 100644 index 00000000..5c6295e5 --- /dev/null +++ b/api/client/v1/v1_registries_helm_uid_delete_parameters.go @@ -0,0 +1,133 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1RegistriesHelmUIDDeleteParams creates a new V1RegistriesHelmUIDDeleteParams object +// with the default values initialized. +func NewV1RegistriesHelmUIDDeleteParams() *V1RegistriesHelmUIDDeleteParams { + var () + return &V1RegistriesHelmUIDDeleteParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1RegistriesHelmUIDDeleteParamsWithTimeout creates a new V1RegistriesHelmUIDDeleteParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1RegistriesHelmUIDDeleteParamsWithTimeout(timeout time.Duration) *V1RegistriesHelmUIDDeleteParams { + var () + return &V1RegistriesHelmUIDDeleteParams{ + + timeout: timeout, + } +} + +// NewV1RegistriesHelmUIDDeleteParamsWithContext creates a new V1RegistriesHelmUIDDeleteParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1RegistriesHelmUIDDeleteParamsWithContext(ctx context.Context) *V1RegistriesHelmUIDDeleteParams { + var () + return &V1RegistriesHelmUIDDeleteParams{ + + Context: ctx, + } +} + +// NewV1RegistriesHelmUIDDeleteParamsWithHTTPClient creates a new V1RegistriesHelmUIDDeleteParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1RegistriesHelmUIDDeleteParamsWithHTTPClient(client *http.Client) *V1RegistriesHelmUIDDeleteParams { + var () + return &V1RegistriesHelmUIDDeleteParams{ + HTTPClient: client, + } +} + +/* +V1RegistriesHelmUIDDeleteParams contains all the parameters to send to the API endpoint +for the v1 registries helm Uid delete operation typically these are written to a http.Request +*/ +type V1RegistriesHelmUIDDeleteParams struct { + + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 registries helm Uid delete params +func (o *V1RegistriesHelmUIDDeleteParams) WithTimeout(timeout time.Duration) *V1RegistriesHelmUIDDeleteParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 registries helm Uid delete params +func (o *V1RegistriesHelmUIDDeleteParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 registries helm Uid delete params +func (o *V1RegistriesHelmUIDDeleteParams) WithContext(ctx context.Context) *V1RegistriesHelmUIDDeleteParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 registries helm Uid delete params +func (o *V1RegistriesHelmUIDDeleteParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 registries helm Uid delete params +func (o *V1RegistriesHelmUIDDeleteParams) WithHTTPClient(client *http.Client) *V1RegistriesHelmUIDDeleteParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 registries helm Uid delete params +func (o *V1RegistriesHelmUIDDeleteParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithUID adds the uid to the v1 registries helm Uid delete params +func (o *V1RegistriesHelmUIDDeleteParams) WithUID(uid string) *V1RegistriesHelmUIDDeleteParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 registries helm Uid delete params +func (o *V1RegistriesHelmUIDDeleteParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1RegistriesHelmUIDDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_registries_helm_uid_delete_responses.go b/api/client/v1/v1_registries_helm_uid_delete_responses.go new file mode 100644 index 00000000..b8b35b85 --- /dev/null +++ b/api/client/v1/v1_registries_helm_uid_delete_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1RegistriesHelmUIDDeleteReader is a Reader for the V1RegistriesHelmUIDDelete structure. +type V1RegistriesHelmUIDDeleteReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1RegistriesHelmUIDDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1RegistriesHelmUIDDeleteNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1RegistriesHelmUIDDeleteNoContent creates a V1RegistriesHelmUIDDeleteNoContent with default headers values +func NewV1RegistriesHelmUIDDeleteNoContent() *V1RegistriesHelmUIDDeleteNoContent { + return &V1RegistriesHelmUIDDeleteNoContent{} +} + +/* +V1RegistriesHelmUIDDeleteNoContent handles this case with default header values. + +The resource was deleted successfully +*/ +type V1RegistriesHelmUIDDeleteNoContent struct { +} + +func (o *V1RegistriesHelmUIDDeleteNoContent) Error() string { + return fmt.Sprintf("[DELETE /v1/registries/helm/{uid}][%d] v1RegistriesHelmUidDeleteNoContent ", 204) +} + +func (o *V1RegistriesHelmUIDDeleteNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_registries_helm_uid_get_parameters.go b/api/client/v1/v1_registries_helm_uid_get_parameters.go new file mode 100644 index 00000000..471ac5eb --- /dev/null +++ b/api/client/v1/v1_registries_helm_uid_get_parameters.go @@ -0,0 +1,133 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1RegistriesHelmUIDGetParams creates a new V1RegistriesHelmUIDGetParams object +// with the default values initialized. +func NewV1RegistriesHelmUIDGetParams() *V1RegistriesHelmUIDGetParams { + var () + return &V1RegistriesHelmUIDGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1RegistriesHelmUIDGetParamsWithTimeout creates a new V1RegistriesHelmUIDGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1RegistriesHelmUIDGetParamsWithTimeout(timeout time.Duration) *V1RegistriesHelmUIDGetParams { + var () + return &V1RegistriesHelmUIDGetParams{ + + timeout: timeout, + } +} + +// NewV1RegistriesHelmUIDGetParamsWithContext creates a new V1RegistriesHelmUIDGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1RegistriesHelmUIDGetParamsWithContext(ctx context.Context) *V1RegistriesHelmUIDGetParams { + var () + return &V1RegistriesHelmUIDGetParams{ + + Context: ctx, + } +} + +// NewV1RegistriesHelmUIDGetParamsWithHTTPClient creates a new V1RegistriesHelmUIDGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1RegistriesHelmUIDGetParamsWithHTTPClient(client *http.Client) *V1RegistriesHelmUIDGetParams { + var () + return &V1RegistriesHelmUIDGetParams{ + HTTPClient: client, + } +} + +/* +V1RegistriesHelmUIDGetParams contains all the parameters to send to the API endpoint +for the v1 registries helm Uid get operation typically these are written to a http.Request +*/ +type V1RegistriesHelmUIDGetParams struct { + + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 registries helm Uid get params +func (o *V1RegistriesHelmUIDGetParams) WithTimeout(timeout time.Duration) *V1RegistriesHelmUIDGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 registries helm Uid get params +func (o *V1RegistriesHelmUIDGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 registries helm Uid get params +func (o *V1RegistriesHelmUIDGetParams) WithContext(ctx context.Context) *V1RegistriesHelmUIDGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 registries helm Uid get params +func (o *V1RegistriesHelmUIDGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 registries helm Uid get params +func (o *V1RegistriesHelmUIDGetParams) WithHTTPClient(client *http.Client) *V1RegistriesHelmUIDGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 registries helm Uid get params +func (o *V1RegistriesHelmUIDGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithUID adds the uid to the v1 registries helm Uid get params +func (o *V1RegistriesHelmUIDGetParams) WithUID(uid string) *V1RegistriesHelmUIDGetParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 registries helm Uid get params +func (o *V1RegistriesHelmUIDGetParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1RegistriesHelmUIDGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_registries_helm_uid_get_responses.go b/api/client/v1/v1_registries_helm_uid_get_responses.go new file mode 100644 index 00000000..1536be86 --- /dev/null +++ b/api/client/v1/v1_registries_helm_uid_get_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1RegistriesHelmUIDGetReader is a Reader for the V1RegistriesHelmUIDGet structure. +type V1RegistriesHelmUIDGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1RegistriesHelmUIDGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1RegistriesHelmUIDGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1RegistriesHelmUIDGetOK creates a V1RegistriesHelmUIDGetOK with default headers values +func NewV1RegistriesHelmUIDGetOK() *V1RegistriesHelmUIDGetOK { + return &V1RegistriesHelmUIDGetOK{} +} + +/* +V1RegistriesHelmUIDGetOK handles this case with default header values. + +OK +*/ +type V1RegistriesHelmUIDGetOK struct { + Payload *models.V1HelmRegistry +} + +func (o *V1RegistriesHelmUIDGetOK) Error() string { + return fmt.Sprintf("[GET /v1/registries/helm/{uid}][%d] v1RegistriesHelmUidGetOK %+v", 200, o.Payload) +} + +func (o *V1RegistriesHelmUIDGetOK) GetPayload() *models.V1HelmRegistry { + return o.Payload +} + +func (o *V1RegistriesHelmUIDGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1HelmRegistry) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_registries_helm_uid_sync_parameters.go b/api/client/v1/v1_registries_helm_uid_sync_parameters.go new file mode 100644 index 00000000..af340a4c --- /dev/null +++ b/api/client/v1/v1_registries_helm_uid_sync_parameters.go @@ -0,0 +1,175 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// NewV1RegistriesHelmUIDSyncParams creates a new V1RegistriesHelmUIDSyncParams object +// with the default values initialized. +func NewV1RegistriesHelmUIDSyncParams() *V1RegistriesHelmUIDSyncParams { + var ( + forceSyncDefault = bool(false) + ) + return &V1RegistriesHelmUIDSyncParams{ + ForceSync: &forceSyncDefault, + + timeout: cr.DefaultTimeout, + } +} + +// NewV1RegistriesHelmUIDSyncParamsWithTimeout creates a new V1RegistriesHelmUIDSyncParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1RegistriesHelmUIDSyncParamsWithTimeout(timeout time.Duration) *V1RegistriesHelmUIDSyncParams { + var ( + forceSyncDefault = bool(false) + ) + return &V1RegistriesHelmUIDSyncParams{ + ForceSync: &forceSyncDefault, + + timeout: timeout, + } +} + +// NewV1RegistriesHelmUIDSyncParamsWithContext creates a new V1RegistriesHelmUIDSyncParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1RegistriesHelmUIDSyncParamsWithContext(ctx context.Context) *V1RegistriesHelmUIDSyncParams { + var ( + forceSyncDefault = bool(false) + ) + return &V1RegistriesHelmUIDSyncParams{ + ForceSync: &forceSyncDefault, + + Context: ctx, + } +} + +// NewV1RegistriesHelmUIDSyncParamsWithHTTPClient creates a new V1RegistriesHelmUIDSyncParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1RegistriesHelmUIDSyncParamsWithHTTPClient(client *http.Client) *V1RegistriesHelmUIDSyncParams { + var ( + forceSyncDefault = bool(false) + ) + return &V1RegistriesHelmUIDSyncParams{ + ForceSync: &forceSyncDefault, + HTTPClient: client, + } +} + +/* +V1RegistriesHelmUIDSyncParams contains all the parameters to send to the API endpoint +for the v1 registries helm Uid sync operation typically these are written to a http.Request +*/ +type V1RegistriesHelmUIDSyncParams struct { + + /*ForceSync*/ + ForceSync *bool + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 registries helm Uid sync params +func (o *V1RegistriesHelmUIDSyncParams) WithTimeout(timeout time.Duration) *V1RegistriesHelmUIDSyncParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 registries helm Uid sync params +func (o *V1RegistriesHelmUIDSyncParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 registries helm Uid sync params +func (o *V1RegistriesHelmUIDSyncParams) WithContext(ctx context.Context) *V1RegistriesHelmUIDSyncParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 registries helm Uid sync params +func (o *V1RegistriesHelmUIDSyncParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 registries helm Uid sync params +func (o *V1RegistriesHelmUIDSyncParams) WithHTTPClient(client *http.Client) *V1RegistriesHelmUIDSyncParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 registries helm Uid sync params +func (o *V1RegistriesHelmUIDSyncParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithForceSync adds the forceSync to the v1 registries helm Uid sync params +func (o *V1RegistriesHelmUIDSyncParams) WithForceSync(forceSync *bool) *V1RegistriesHelmUIDSyncParams { + o.SetForceSync(forceSync) + return o +} + +// SetForceSync adds the forceSync to the v1 registries helm Uid sync params +func (o *V1RegistriesHelmUIDSyncParams) SetForceSync(forceSync *bool) { + o.ForceSync = forceSync +} + +// WithUID adds the uid to the v1 registries helm Uid sync params +func (o *V1RegistriesHelmUIDSyncParams) WithUID(uid string) *V1RegistriesHelmUIDSyncParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 registries helm Uid sync params +func (o *V1RegistriesHelmUIDSyncParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1RegistriesHelmUIDSyncParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.ForceSync != nil { + + // query param forceSync + var qrForceSync bool + if o.ForceSync != nil { + qrForceSync = *o.ForceSync + } + qForceSync := swag.FormatBool(qrForceSync) + if qForceSync != "" { + if err := r.SetQueryParam("forceSync", qForceSync); err != nil { + return err + } + } + + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_registries_helm_uid_sync_responses.go b/api/client/v1/v1_registries_helm_uid_sync_responses.go new file mode 100644 index 00000000..4bd8989f --- /dev/null +++ b/api/client/v1/v1_registries_helm_uid_sync_responses.go @@ -0,0 +1,61 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1RegistriesHelmUIDSyncReader is a Reader for the V1RegistriesHelmUIDSync structure. +type V1RegistriesHelmUIDSyncReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1RegistriesHelmUIDSyncReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 202: + result := NewV1RegistriesHelmUIDSyncAccepted() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1RegistriesHelmUIDSyncAccepted creates a V1RegistriesHelmUIDSyncAccepted with default headers values +func NewV1RegistriesHelmUIDSyncAccepted() *V1RegistriesHelmUIDSyncAccepted { + return &V1RegistriesHelmUIDSyncAccepted{} +} + +/* +V1RegistriesHelmUIDSyncAccepted handles this case with default header values. + +Ok response without content +*/ +type V1RegistriesHelmUIDSyncAccepted struct { + /*Audit uid for the request + */ + AuditUID string +} + +func (o *V1RegistriesHelmUIDSyncAccepted) Error() string { + return fmt.Sprintf("[POST /v1/registries/helm/{uid}/sync][%d] v1RegistriesHelmUidSyncAccepted ", 202) +} + +func (o *V1RegistriesHelmUIDSyncAccepted) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header AuditUid + o.AuditUID = response.GetHeader("AuditUid") + + return nil +} diff --git a/api/client/v1/v1_registries_helm_uid_sync_status_parameters.go b/api/client/v1/v1_registries_helm_uid_sync_status_parameters.go new file mode 100644 index 00000000..0b694d24 --- /dev/null +++ b/api/client/v1/v1_registries_helm_uid_sync_status_parameters.go @@ -0,0 +1,133 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1RegistriesHelmUIDSyncStatusParams creates a new V1RegistriesHelmUIDSyncStatusParams object +// with the default values initialized. +func NewV1RegistriesHelmUIDSyncStatusParams() *V1RegistriesHelmUIDSyncStatusParams { + var () + return &V1RegistriesHelmUIDSyncStatusParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1RegistriesHelmUIDSyncStatusParamsWithTimeout creates a new V1RegistriesHelmUIDSyncStatusParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1RegistriesHelmUIDSyncStatusParamsWithTimeout(timeout time.Duration) *V1RegistriesHelmUIDSyncStatusParams { + var () + return &V1RegistriesHelmUIDSyncStatusParams{ + + timeout: timeout, + } +} + +// NewV1RegistriesHelmUIDSyncStatusParamsWithContext creates a new V1RegistriesHelmUIDSyncStatusParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1RegistriesHelmUIDSyncStatusParamsWithContext(ctx context.Context) *V1RegistriesHelmUIDSyncStatusParams { + var () + return &V1RegistriesHelmUIDSyncStatusParams{ + + Context: ctx, + } +} + +// NewV1RegistriesHelmUIDSyncStatusParamsWithHTTPClient creates a new V1RegistriesHelmUIDSyncStatusParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1RegistriesHelmUIDSyncStatusParamsWithHTTPClient(client *http.Client) *V1RegistriesHelmUIDSyncStatusParams { + var () + return &V1RegistriesHelmUIDSyncStatusParams{ + HTTPClient: client, + } +} + +/* +V1RegistriesHelmUIDSyncStatusParams contains all the parameters to send to the API endpoint +for the v1 registries helm Uid sync status operation typically these are written to a http.Request +*/ +type V1RegistriesHelmUIDSyncStatusParams struct { + + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 registries helm Uid sync status params +func (o *V1RegistriesHelmUIDSyncStatusParams) WithTimeout(timeout time.Duration) *V1RegistriesHelmUIDSyncStatusParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 registries helm Uid sync status params +func (o *V1RegistriesHelmUIDSyncStatusParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 registries helm Uid sync status params +func (o *V1RegistriesHelmUIDSyncStatusParams) WithContext(ctx context.Context) *V1RegistriesHelmUIDSyncStatusParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 registries helm Uid sync status params +func (o *V1RegistriesHelmUIDSyncStatusParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 registries helm Uid sync status params +func (o *V1RegistriesHelmUIDSyncStatusParams) WithHTTPClient(client *http.Client) *V1RegistriesHelmUIDSyncStatusParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 registries helm Uid sync status params +func (o *V1RegistriesHelmUIDSyncStatusParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithUID adds the uid to the v1 registries helm Uid sync status params +func (o *V1RegistriesHelmUIDSyncStatusParams) WithUID(uid string) *V1RegistriesHelmUIDSyncStatusParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 registries helm Uid sync status params +func (o *V1RegistriesHelmUIDSyncStatusParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1RegistriesHelmUIDSyncStatusParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_registries_helm_uid_sync_status_responses.go b/api/client/v1/v1_registries_helm_uid_sync_status_responses.go new file mode 100644 index 00000000..4b6aadb1 --- /dev/null +++ b/api/client/v1/v1_registries_helm_uid_sync_status_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1RegistriesHelmUIDSyncStatusReader is a Reader for the V1RegistriesHelmUIDSyncStatus structure. +type V1RegistriesHelmUIDSyncStatusReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1RegistriesHelmUIDSyncStatusReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1RegistriesHelmUIDSyncStatusOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1RegistriesHelmUIDSyncStatusOK creates a V1RegistriesHelmUIDSyncStatusOK with default headers values +func NewV1RegistriesHelmUIDSyncStatusOK() *V1RegistriesHelmUIDSyncStatusOK { + return &V1RegistriesHelmUIDSyncStatusOK{} +} + +/* +V1RegistriesHelmUIDSyncStatusOK handles this case with default header values. + +Helm registry sync status +*/ +type V1RegistriesHelmUIDSyncStatusOK struct { + Payload *models.V1RegistrySyncStatus +} + +func (o *V1RegistriesHelmUIDSyncStatusOK) Error() string { + return fmt.Sprintf("[GET /v1/registries/helm/{uid}/sync/status][%d] v1RegistriesHelmUidSyncStatusOK %+v", 200, o.Payload) +} + +func (o *V1RegistriesHelmUIDSyncStatusOK) GetPayload() *models.V1RegistrySyncStatus { + return o.Payload +} + +func (o *V1RegistriesHelmUIDSyncStatusOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1RegistrySyncStatus) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_registries_helm_uid_update_parameters.go b/api/client/v1/v1_registries_helm_uid_update_parameters.go new file mode 100644 index 00000000..0e7e6f30 --- /dev/null +++ b/api/client/v1/v1_registries_helm_uid_update_parameters.go @@ -0,0 +1,154 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1RegistriesHelmUIDUpdateParams creates a new V1RegistriesHelmUIDUpdateParams object +// with the default values initialized. +func NewV1RegistriesHelmUIDUpdateParams() *V1RegistriesHelmUIDUpdateParams { + var () + return &V1RegistriesHelmUIDUpdateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1RegistriesHelmUIDUpdateParamsWithTimeout creates a new V1RegistriesHelmUIDUpdateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1RegistriesHelmUIDUpdateParamsWithTimeout(timeout time.Duration) *V1RegistriesHelmUIDUpdateParams { + var () + return &V1RegistriesHelmUIDUpdateParams{ + + timeout: timeout, + } +} + +// NewV1RegistriesHelmUIDUpdateParamsWithContext creates a new V1RegistriesHelmUIDUpdateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1RegistriesHelmUIDUpdateParamsWithContext(ctx context.Context) *V1RegistriesHelmUIDUpdateParams { + var () + return &V1RegistriesHelmUIDUpdateParams{ + + Context: ctx, + } +} + +// NewV1RegistriesHelmUIDUpdateParamsWithHTTPClient creates a new V1RegistriesHelmUIDUpdateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1RegistriesHelmUIDUpdateParamsWithHTTPClient(client *http.Client) *V1RegistriesHelmUIDUpdateParams { + var () + return &V1RegistriesHelmUIDUpdateParams{ + HTTPClient: client, + } +} + +/* +V1RegistriesHelmUIDUpdateParams contains all the parameters to send to the API endpoint +for the v1 registries helm Uid update operation typically these are written to a http.Request +*/ +type V1RegistriesHelmUIDUpdateParams struct { + + /*Body*/ + Body *models.V1HelmRegistry + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 registries helm Uid update params +func (o *V1RegistriesHelmUIDUpdateParams) WithTimeout(timeout time.Duration) *V1RegistriesHelmUIDUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 registries helm Uid update params +func (o *V1RegistriesHelmUIDUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 registries helm Uid update params +func (o *V1RegistriesHelmUIDUpdateParams) WithContext(ctx context.Context) *V1RegistriesHelmUIDUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 registries helm Uid update params +func (o *V1RegistriesHelmUIDUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 registries helm Uid update params +func (o *V1RegistriesHelmUIDUpdateParams) WithHTTPClient(client *http.Client) *V1RegistriesHelmUIDUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 registries helm Uid update params +func (o *V1RegistriesHelmUIDUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 registries helm Uid update params +func (o *V1RegistriesHelmUIDUpdateParams) WithBody(body *models.V1HelmRegistry) *V1RegistriesHelmUIDUpdateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 registries helm Uid update params +func (o *V1RegistriesHelmUIDUpdateParams) SetBody(body *models.V1HelmRegistry) { + o.Body = body +} + +// WithUID adds the uid to the v1 registries helm Uid update params +func (o *V1RegistriesHelmUIDUpdateParams) WithUID(uid string) *V1RegistriesHelmUIDUpdateParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 registries helm Uid update params +func (o *V1RegistriesHelmUIDUpdateParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1RegistriesHelmUIDUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_registries_helm_uid_update_responses.go b/api/client/v1/v1_registries_helm_uid_update_responses.go new file mode 100644 index 00000000..8de94867 --- /dev/null +++ b/api/client/v1/v1_registries_helm_uid_update_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1RegistriesHelmUIDUpdateReader is a Reader for the V1RegistriesHelmUIDUpdate structure. +type V1RegistriesHelmUIDUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1RegistriesHelmUIDUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1RegistriesHelmUIDUpdateNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1RegistriesHelmUIDUpdateNoContent creates a V1RegistriesHelmUIDUpdateNoContent with default headers values +func NewV1RegistriesHelmUIDUpdateNoContent() *V1RegistriesHelmUIDUpdateNoContent { + return &V1RegistriesHelmUIDUpdateNoContent{} +} + +/* +V1RegistriesHelmUIDUpdateNoContent handles this case with default header values. + +The resource was updated successfully +*/ +type V1RegistriesHelmUIDUpdateNoContent struct { +} + +func (o *V1RegistriesHelmUIDUpdateNoContent) Error() string { + return fmt.Sprintf("[PUT /v1/registries/helm/{uid}][%d] v1RegistriesHelmUidUpdateNoContent ", 204) +} + +func (o *V1RegistriesHelmUIDUpdateNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_registries_helm_validate_parameters.go b/api/client/v1/v1_registries_helm_validate_parameters.go new file mode 100644 index 00000000..6b3ffa8b --- /dev/null +++ b/api/client/v1/v1_registries_helm_validate_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1RegistriesHelmValidateParams creates a new V1RegistriesHelmValidateParams object +// with the default values initialized. +func NewV1RegistriesHelmValidateParams() *V1RegistriesHelmValidateParams { + var () + return &V1RegistriesHelmValidateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1RegistriesHelmValidateParamsWithTimeout creates a new V1RegistriesHelmValidateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1RegistriesHelmValidateParamsWithTimeout(timeout time.Duration) *V1RegistriesHelmValidateParams { + var () + return &V1RegistriesHelmValidateParams{ + + timeout: timeout, + } +} + +// NewV1RegistriesHelmValidateParamsWithContext creates a new V1RegistriesHelmValidateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1RegistriesHelmValidateParamsWithContext(ctx context.Context) *V1RegistriesHelmValidateParams { + var () + return &V1RegistriesHelmValidateParams{ + + Context: ctx, + } +} + +// NewV1RegistriesHelmValidateParamsWithHTTPClient creates a new V1RegistriesHelmValidateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1RegistriesHelmValidateParamsWithHTTPClient(client *http.Client) *V1RegistriesHelmValidateParams { + var () + return &V1RegistriesHelmValidateParams{ + HTTPClient: client, + } +} + +/* +V1RegistriesHelmValidateParams contains all the parameters to send to the API endpoint +for the v1 registries helm validate operation typically these are written to a http.Request +*/ +type V1RegistriesHelmValidateParams struct { + + /*Body*/ + Body *models.V1HelmRegistrySpec + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 registries helm validate params +func (o *V1RegistriesHelmValidateParams) WithTimeout(timeout time.Duration) *V1RegistriesHelmValidateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 registries helm validate params +func (o *V1RegistriesHelmValidateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 registries helm validate params +func (o *V1RegistriesHelmValidateParams) WithContext(ctx context.Context) *V1RegistriesHelmValidateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 registries helm validate params +func (o *V1RegistriesHelmValidateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 registries helm validate params +func (o *V1RegistriesHelmValidateParams) WithHTTPClient(client *http.Client) *V1RegistriesHelmValidateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 registries helm validate params +func (o *V1RegistriesHelmValidateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 registries helm validate params +func (o *V1RegistriesHelmValidateParams) WithBody(body *models.V1HelmRegistrySpec) *V1RegistriesHelmValidateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 registries helm validate params +func (o *V1RegistriesHelmValidateParams) SetBody(body *models.V1HelmRegistrySpec) { + o.Body = body +} + +// WriteToRequest writes these params to a swagger request +func (o *V1RegistriesHelmValidateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_registries_helm_validate_responses.go b/api/client/v1/v1_registries_helm_validate_responses.go new file mode 100644 index 00000000..525e46cd --- /dev/null +++ b/api/client/v1/v1_registries_helm_validate_responses.go @@ -0,0 +1,61 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1RegistriesHelmValidateReader is a Reader for the V1RegistriesHelmValidate structure. +type V1RegistriesHelmValidateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1RegistriesHelmValidateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1RegistriesHelmValidateNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1RegistriesHelmValidateNoContent creates a V1RegistriesHelmValidateNoContent with default headers values +func NewV1RegistriesHelmValidateNoContent() *V1RegistriesHelmValidateNoContent { + return &V1RegistriesHelmValidateNoContent{} +} + +/* +V1RegistriesHelmValidateNoContent handles this case with default header values. + +Ok response without content +*/ +type V1RegistriesHelmValidateNoContent struct { + /*Audit uid for the request + */ + AuditUID string +} + +func (o *V1RegistriesHelmValidateNoContent) Error() string { + return fmt.Sprintf("[POST /v1/registries/helm/validate][%d] v1RegistriesHelmValidateNoContent ", 204) +} + +func (o *V1RegistriesHelmValidateNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header AuditUid + o.AuditUID = response.GetHeader("AuditUid") + + return nil +} diff --git a/api/client/v1/v1_registries_metadata_parameters.go b/api/client/v1/v1_registries_metadata_parameters.go new file mode 100644 index 00000000..ad2c4274 --- /dev/null +++ b/api/client/v1/v1_registries_metadata_parameters.go @@ -0,0 +1,156 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1RegistriesMetadataParams creates a new V1RegistriesMetadataParams object +// with the default values initialized. +func NewV1RegistriesMetadataParams() *V1RegistriesMetadataParams { + var ( + scopeDefault = string("all") + ) + return &V1RegistriesMetadataParams{ + Scope: &scopeDefault, + + timeout: cr.DefaultTimeout, + } +} + +// NewV1RegistriesMetadataParamsWithTimeout creates a new V1RegistriesMetadataParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1RegistriesMetadataParamsWithTimeout(timeout time.Duration) *V1RegistriesMetadataParams { + var ( + scopeDefault = string("all") + ) + return &V1RegistriesMetadataParams{ + Scope: &scopeDefault, + + timeout: timeout, + } +} + +// NewV1RegistriesMetadataParamsWithContext creates a new V1RegistriesMetadataParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1RegistriesMetadataParamsWithContext(ctx context.Context) *V1RegistriesMetadataParams { + var ( + scopeDefault = string("all") + ) + return &V1RegistriesMetadataParams{ + Scope: &scopeDefault, + + Context: ctx, + } +} + +// NewV1RegistriesMetadataParamsWithHTTPClient creates a new V1RegistriesMetadataParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1RegistriesMetadataParamsWithHTTPClient(client *http.Client) *V1RegistriesMetadataParams { + var ( + scopeDefault = string("all") + ) + return &V1RegistriesMetadataParams{ + Scope: &scopeDefault, + HTTPClient: client, + } +} + +/* +V1RegistriesMetadataParams contains all the parameters to send to the API endpoint +for the v1 registries metadata operation typically these are written to a http.Request +*/ +type V1RegistriesMetadataParams struct { + + /*Scope*/ + Scope *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 registries metadata params +func (o *V1RegistriesMetadataParams) WithTimeout(timeout time.Duration) *V1RegistriesMetadataParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 registries metadata params +func (o *V1RegistriesMetadataParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 registries metadata params +func (o *V1RegistriesMetadataParams) WithContext(ctx context.Context) *V1RegistriesMetadataParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 registries metadata params +func (o *V1RegistriesMetadataParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 registries metadata params +func (o *V1RegistriesMetadataParams) WithHTTPClient(client *http.Client) *V1RegistriesMetadataParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 registries metadata params +func (o *V1RegistriesMetadataParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithScope adds the scope to the v1 registries metadata params +func (o *V1RegistriesMetadataParams) WithScope(scope *string) *V1RegistriesMetadataParams { + o.SetScope(scope) + return o +} + +// SetScope adds the scope to the v1 registries metadata params +func (o *V1RegistriesMetadataParams) SetScope(scope *string) { + o.Scope = scope +} + +// WriteToRequest writes these params to a swagger request +func (o *V1RegistriesMetadataParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Scope != nil { + + // query param scope + var qrScope string + if o.Scope != nil { + qrScope = *o.Scope + } + qScope := qrScope + if qScope != "" { + if err := r.SetQueryParam("scope", qScope); err != nil { + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_registries_metadata_responses.go b/api/client/v1/v1_registries_metadata_responses.go new file mode 100644 index 00000000..9d06a8e6 --- /dev/null +++ b/api/client/v1/v1_registries_metadata_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1RegistriesMetadataReader is a Reader for the V1RegistriesMetadata structure. +type V1RegistriesMetadataReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1RegistriesMetadataReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1RegistriesMetadataOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1RegistriesMetadataOK creates a V1RegistriesMetadataOK with default headers values +func NewV1RegistriesMetadataOK() *V1RegistriesMetadataOK { + return &V1RegistriesMetadataOK{} +} + +/* +V1RegistriesMetadataOK handles this case with default header values. + +An array of registry metadata items +*/ +type V1RegistriesMetadataOK struct { + Payload *models.V1RegistriesMetadata +} + +func (o *V1RegistriesMetadataOK) Error() string { + return fmt.Sprintf("[GET /v1/registries/metadata][%d] v1RegistriesMetadataOK %+v", 200, o.Payload) +} + +func (o *V1RegistriesMetadataOK) GetPayload() *models.V1RegistriesMetadata { + return o.Payload +} + +func (o *V1RegistriesMetadataOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1RegistriesMetadata) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_registries_name_config_get_parameters.go b/api/client/v1/v1_registries_name_config_get_parameters.go new file mode 100644 index 00000000..f94478ec --- /dev/null +++ b/api/client/v1/v1_registries_name_config_get_parameters.go @@ -0,0 +1,133 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1RegistriesNameConfigGetParams creates a new V1RegistriesNameConfigGetParams object +// with the default values initialized. +func NewV1RegistriesNameConfigGetParams() *V1RegistriesNameConfigGetParams { + var () + return &V1RegistriesNameConfigGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1RegistriesNameConfigGetParamsWithTimeout creates a new V1RegistriesNameConfigGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1RegistriesNameConfigGetParamsWithTimeout(timeout time.Duration) *V1RegistriesNameConfigGetParams { + var () + return &V1RegistriesNameConfigGetParams{ + + timeout: timeout, + } +} + +// NewV1RegistriesNameConfigGetParamsWithContext creates a new V1RegistriesNameConfigGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1RegistriesNameConfigGetParamsWithContext(ctx context.Context) *V1RegistriesNameConfigGetParams { + var () + return &V1RegistriesNameConfigGetParams{ + + Context: ctx, + } +} + +// NewV1RegistriesNameConfigGetParamsWithHTTPClient creates a new V1RegistriesNameConfigGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1RegistriesNameConfigGetParamsWithHTTPClient(client *http.Client) *V1RegistriesNameConfigGetParams { + var () + return &V1RegistriesNameConfigGetParams{ + HTTPClient: client, + } +} + +/* +V1RegistriesNameConfigGetParams contains all the parameters to send to the API endpoint +for the v1 registries name config get operation typically these are written to a http.Request +*/ +type V1RegistriesNameConfigGetParams struct { + + /*RegistryName*/ + RegistryName string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 registries name config get params +func (o *V1RegistriesNameConfigGetParams) WithTimeout(timeout time.Duration) *V1RegistriesNameConfigGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 registries name config get params +func (o *V1RegistriesNameConfigGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 registries name config get params +func (o *V1RegistriesNameConfigGetParams) WithContext(ctx context.Context) *V1RegistriesNameConfigGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 registries name config get params +func (o *V1RegistriesNameConfigGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 registries name config get params +func (o *V1RegistriesNameConfigGetParams) WithHTTPClient(client *http.Client) *V1RegistriesNameConfigGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 registries name config get params +func (o *V1RegistriesNameConfigGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithRegistryName adds the registryName to the v1 registries name config get params +func (o *V1RegistriesNameConfigGetParams) WithRegistryName(registryName string) *V1RegistriesNameConfigGetParams { + o.SetRegistryName(registryName) + return o +} + +// SetRegistryName adds the registryName to the v1 registries name config get params +func (o *V1RegistriesNameConfigGetParams) SetRegistryName(registryName string) { + o.RegistryName = registryName +} + +// WriteToRequest writes these params to a swagger request +func (o *V1RegistriesNameConfigGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param registryName + if err := r.SetPathParam("registryName", o.RegistryName); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_registries_name_config_get_responses.go b/api/client/v1/v1_registries_name_config_get_responses.go new file mode 100644 index 00000000..f2ee32de --- /dev/null +++ b/api/client/v1/v1_registries_name_config_get_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1RegistriesNameConfigGetReader is a Reader for the V1RegistriesNameConfigGet structure. +type V1RegistriesNameConfigGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1RegistriesNameConfigGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1RegistriesNameConfigGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1RegistriesNameConfigGetOK creates a V1RegistriesNameConfigGetOK with default headers values +func NewV1RegistriesNameConfigGetOK() *V1RegistriesNameConfigGetOK { + return &V1RegistriesNameConfigGetOK{} +} + +/* +V1RegistriesNameConfigGetOK handles this case with default header values. + +OK +*/ +type V1RegistriesNameConfigGetOK struct { + Payload *models.V1RegistryConfigEntity +} + +func (o *V1RegistriesNameConfigGetOK) Error() string { + return fmt.Sprintf("[GET /v1/registries/{registryName}/config][%d] v1RegistriesNameConfigGetOK %+v", 200, o.Payload) +} + +func (o *V1RegistriesNameConfigGetOK) GetPayload() *models.V1RegistryConfigEntity { + return o.Payload +} + +func (o *V1RegistriesNameConfigGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1RegistryConfigEntity) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_registries_pack_create_parameters.go b/api/client/v1/v1_registries_pack_create_parameters.go new file mode 100644 index 00000000..823da5fb --- /dev/null +++ b/api/client/v1/v1_registries_pack_create_parameters.go @@ -0,0 +1,215 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1RegistriesPackCreateParams creates a new V1RegistriesPackCreateParams object +// with the default values initialized. +func NewV1RegistriesPackCreateParams() *V1RegistriesPackCreateParams { + var ( + scopeDefault = string("all") + skipPackSyncDefault = bool(false) + ) + return &V1RegistriesPackCreateParams{ + Scope: &scopeDefault, + SkipPackSync: &skipPackSyncDefault, + + timeout: cr.DefaultTimeout, + } +} + +// NewV1RegistriesPackCreateParamsWithTimeout creates a new V1RegistriesPackCreateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1RegistriesPackCreateParamsWithTimeout(timeout time.Duration) *V1RegistriesPackCreateParams { + var ( + scopeDefault = string("all") + skipPackSyncDefault = bool(false) + ) + return &V1RegistriesPackCreateParams{ + Scope: &scopeDefault, + SkipPackSync: &skipPackSyncDefault, + + timeout: timeout, + } +} + +// NewV1RegistriesPackCreateParamsWithContext creates a new V1RegistriesPackCreateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1RegistriesPackCreateParamsWithContext(ctx context.Context) *V1RegistriesPackCreateParams { + var ( + scopeDefault = string("all") + skipPackSyncDefault = bool(false) + ) + return &V1RegistriesPackCreateParams{ + Scope: &scopeDefault, + SkipPackSync: &skipPackSyncDefault, + + Context: ctx, + } +} + +// NewV1RegistriesPackCreateParamsWithHTTPClient creates a new V1RegistriesPackCreateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1RegistriesPackCreateParamsWithHTTPClient(client *http.Client) *V1RegistriesPackCreateParams { + var ( + scopeDefault = string("all") + skipPackSyncDefault = bool(false) + ) + return &V1RegistriesPackCreateParams{ + Scope: &scopeDefault, + SkipPackSync: &skipPackSyncDefault, + HTTPClient: client, + } +} + +/* +V1RegistriesPackCreateParams contains all the parameters to send to the API endpoint +for the v1 registries pack create operation typically these are written to a http.Request +*/ +type V1RegistriesPackCreateParams struct { + + /*Body*/ + Body *models.V1PackRegistry + /*Scope*/ + Scope *string + /*SkipPackSync*/ + SkipPackSync *bool + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 registries pack create params +func (o *V1RegistriesPackCreateParams) WithTimeout(timeout time.Duration) *V1RegistriesPackCreateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 registries pack create params +func (o *V1RegistriesPackCreateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 registries pack create params +func (o *V1RegistriesPackCreateParams) WithContext(ctx context.Context) *V1RegistriesPackCreateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 registries pack create params +func (o *V1RegistriesPackCreateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 registries pack create params +func (o *V1RegistriesPackCreateParams) WithHTTPClient(client *http.Client) *V1RegistriesPackCreateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 registries pack create params +func (o *V1RegistriesPackCreateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 registries pack create params +func (o *V1RegistriesPackCreateParams) WithBody(body *models.V1PackRegistry) *V1RegistriesPackCreateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 registries pack create params +func (o *V1RegistriesPackCreateParams) SetBody(body *models.V1PackRegistry) { + o.Body = body +} + +// WithScope adds the scope to the v1 registries pack create params +func (o *V1RegistriesPackCreateParams) WithScope(scope *string) *V1RegistriesPackCreateParams { + o.SetScope(scope) + return o +} + +// SetScope adds the scope to the v1 registries pack create params +func (o *V1RegistriesPackCreateParams) SetScope(scope *string) { + o.Scope = scope +} + +// WithSkipPackSync adds the skipPackSync to the v1 registries pack create params +func (o *V1RegistriesPackCreateParams) WithSkipPackSync(skipPackSync *bool) *V1RegistriesPackCreateParams { + o.SetSkipPackSync(skipPackSync) + return o +} + +// SetSkipPackSync adds the skipPackSync to the v1 registries pack create params +func (o *V1RegistriesPackCreateParams) SetSkipPackSync(skipPackSync *bool) { + o.SkipPackSync = skipPackSync +} + +// WriteToRequest writes these params to a swagger request +func (o *V1RegistriesPackCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + if o.Scope != nil { + + // query param scope + var qrScope string + if o.Scope != nil { + qrScope = *o.Scope + } + qScope := qrScope + if qScope != "" { + if err := r.SetQueryParam("scope", qScope); err != nil { + return err + } + } + + } + + if o.SkipPackSync != nil { + + // query param skipPackSync + var qrSkipPackSync bool + if o.SkipPackSync != nil { + qrSkipPackSync = *o.SkipPackSync + } + qSkipPackSync := swag.FormatBool(qrSkipPackSync) + if qSkipPackSync != "" { + if err := r.SetQueryParam("skipPackSync", qSkipPackSync); err != nil { + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_registries_pack_create_responses.go b/api/client/v1/v1_registries_pack_create_responses.go new file mode 100644 index 00000000..915702d2 --- /dev/null +++ b/api/client/v1/v1_registries_pack_create_responses.go @@ -0,0 +1,77 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1RegistriesPackCreateReader is a Reader for the V1RegistriesPackCreate structure. +type V1RegistriesPackCreateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1RegistriesPackCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 201: + result := NewV1RegistriesPackCreateCreated() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1RegistriesPackCreateCreated creates a V1RegistriesPackCreateCreated with default headers values +func NewV1RegistriesPackCreateCreated() *V1RegistriesPackCreateCreated { + return &V1RegistriesPackCreateCreated{} +} + +/* +V1RegistriesPackCreateCreated handles this case with default header values. + +Created successfully +*/ +type V1RegistriesPackCreateCreated struct { + /*Audit uid for the request + */ + AuditUID string + + Payload *models.V1UID +} + +func (o *V1RegistriesPackCreateCreated) Error() string { + return fmt.Sprintf("[POST /v1/registries/pack][%d] v1RegistriesPackCreateCreated %+v", 201, o.Payload) +} + +func (o *V1RegistriesPackCreateCreated) GetPayload() *models.V1UID { + return o.Payload +} + +func (o *V1RegistriesPackCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header AuditUid + o.AuditUID = response.GetHeader("AuditUid") + + o.Payload = new(models.V1UID) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_registries_pack_list_parameters.go b/api/client/v1/v1_registries_pack_list_parameters.go new file mode 100644 index 00000000..d15306d0 --- /dev/null +++ b/api/client/v1/v1_registries_pack_list_parameters.go @@ -0,0 +1,360 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// NewV1RegistriesPackListParams creates a new V1RegistriesPackListParams object +// with the default values initialized. +func NewV1RegistriesPackListParams() *V1RegistriesPackListParams { + var ( + limitDefault = int64(50) + scopeDefault = string("all") + ) + return &V1RegistriesPackListParams{ + Limit: &limitDefault, + Scope: &scopeDefault, + + timeout: cr.DefaultTimeout, + } +} + +// NewV1RegistriesPackListParamsWithTimeout creates a new V1RegistriesPackListParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1RegistriesPackListParamsWithTimeout(timeout time.Duration) *V1RegistriesPackListParams { + var ( + limitDefault = int64(50) + scopeDefault = string("all") + ) + return &V1RegistriesPackListParams{ + Limit: &limitDefault, + Scope: &scopeDefault, + + timeout: timeout, + } +} + +// NewV1RegistriesPackListParamsWithContext creates a new V1RegistriesPackListParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1RegistriesPackListParamsWithContext(ctx context.Context) *V1RegistriesPackListParams { + var ( + limitDefault = int64(50) + scopeDefault = string("all") + ) + return &V1RegistriesPackListParams{ + Limit: &limitDefault, + Scope: &scopeDefault, + + Context: ctx, + } +} + +// NewV1RegistriesPackListParamsWithHTTPClient creates a new V1RegistriesPackListParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1RegistriesPackListParamsWithHTTPClient(client *http.Client) *V1RegistriesPackListParams { + var ( + limitDefault = int64(50) + scopeDefault = string("all") + ) + return &V1RegistriesPackListParams{ + Limit: &limitDefault, + Scope: &scopeDefault, + HTTPClient: client, + } +} + +/* +V1RegistriesPackListParams contains all the parameters to send to the API endpoint +for the v1 registries pack list operation typically these are written to a http.Request +*/ +type V1RegistriesPackListParams struct { + + /*Continue + continue token to paginate the subsequent data items + + */ + Continue *string + /*Fields + Set of fields to be presented in the response with values. The fields are comma separated. Eg: metadata.uid,metadata.name + + */ + Fields *string + /*Filters + Filters can be combined with AND, OR operators with field path name. Eg: metadata.name=TestServiceANDspec.cloudType=aws + + Server will be restricted to certain fields based on the indexed data for each resource. + + */ + Filters *string + /*Limit + limit is a maximum number of responses to return for a list call. Default and maximum value of the limit is 50. + If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. + + */ + Limit *int64 + /*Offset + offset is the next index number from which the response will start. The response offset value can be used along with continue token for the pagination. + + */ + Offset *int64 + /*OrderBy + Specify the fields with sort order. 1 indicates ascending and -1 for descending. Eg: orderBy=metadata.name=1,metadata.uid=-1 + + */ + OrderBy *string + /*Scope*/ + Scope *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 registries pack list params +func (o *V1RegistriesPackListParams) WithTimeout(timeout time.Duration) *V1RegistriesPackListParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 registries pack list params +func (o *V1RegistriesPackListParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 registries pack list params +func (o *V1RegistriesPackListParams) WithContext(ctx context.Context) *V1RegistriesPackListParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 registries pack list params +func (o *V1RegistriesPackListParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 registries pack list params +func (o *V1RegistriesPackListParams) WithHTTPClient(client *http.Client) *V1RegistriesPackListParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 registries pack list params +func (o *V1RegistriesPackListParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithContinue adds the continueVar to the v1 registries pack list params +func (o *V1RegistriesPackListParams) WithContinue(continueVar *string) *V1RegistriesPackListParams { + o.SetContinue(continueVar) + return o +} + +// SetContinue adds the continue to the v1 registries pack list params +func (o *V1RegistriesPackListParams) SetContinue(continueVar *string) { + o.Continue = continueVar +} + +// WithFields adds the fields to the v1 registries pack list params +func (o *V1RegistriesPackListParams) WithFields(fields *string) *V1RegistriesPackListParams { + o.SetFields(fields) + return o +} + +// SetFields adds the fields to the v1 registries pack list params +func (o *V1RegistriesPackListParams) SetFields(fields *string) { + o.Fields = fields +} + +// WithFilters adds the filters to the v1 registries pack list params +func (o *V1RegistriesPackListParams) WithFilters(filters *string) *V1RegistriesPackListParams { + o.SetFilters(filters) + return o +} + +// SetFilters adds the filters to the v1 registries pack list params +func (o *V1RegistriesPackListParams) SetFilters(filters *string) { + o.Filters = filters +} + +// WithLimit adds the limit to the v1 registries pack list params +func (o *V1RegistriesPackListParams) WithLimit(limit *int64) *V1RegistriesPackListParams { + o.SetLimit(limit) + return o +} + +// SetLimit adds the limit to the v1 registries pack list params +func (o *V1RegistriesPackListParams) SetLimit(limit *int64) { + o.Limit = limit +} + +// WithOffset adds the offset to the v1 registries pack list params +func (o *V1RegistriesPackListParams) WithOffset(offset *int64) *V1RegistriesPackListParams { + o.SetOffset(offset) + return o +} + +// SetOffset adds the offset to the v1 registries pack list params +func (o *V1RegistriesPackListParams) SetOffset(offset *int64) { + o.Offset = offset +} + +// WithOrderBy adds the orderBy to the v1 registries pack list params +func (o *V1RegistriesPackListParams) WithOrderBy(orderBy *string) *V1RegistriesPackListParams { + o.SetOrderBy(orderBy) + return o +} + +// SetOrderBy adds the orderBy to the v1 registries pack list params +func (o *V1RegistriesPackListParams) SetOrderBy(orderBy *string) { + o.OrderBy = orderBy +} + +// WithScope adds the scope to the v1 registries pack list params +func (o *V1RegistriesPackListParams) WithScope(scope *string) *V1RegistriesPackListParams { + o.SetScope(scope) + return o +} + +// SetScope adds the scope to the v1 registries pack list params +func (o *V1RegistriesPackListParams) SetScope(scope *string) { + o.Scope = scope +} + +// WriteToRequest writes these params to a swagger request +func (o *V1RegistriesPackListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Continue != nil { + + // query param continue + var qrContinue string + if o.Continue != nil { + qrContinue = *o.Continue + } + qContinue := qrContinue + if qContinue != "" { + if err := r.SetQueryParam("continue", qContinue); err != nil { + return err + } + } + + } + + if o.Fields != nil { + + // query param fields + var qrFields string + if o.Fields != nil { + qrFields = *o.Fields + } + qFields := qrFields + if qFields != "" { + if err := r.SetQueryParam("fields", qFields); err != nil { + return err + } + } + + } + + if o.Filters != nil { + + // query param filters + var qrFilters string + if o.Filters != nil { + qrFilters = *o.Filters + } + qFilters := qrFilters + if qFilters != "" { + if err := r.SetQueryParam("filters", qFilters); err != nil { + return err + } + } + + } + + if o.Limit != nil { + + // query param limit + var qrLimit int64 + if o.Limit != nil { + qrLimit = *o.Limit + } + qLimit := swag.FormatInt64(qrLimit) + if qLimit != "" { + if err := r.SetQueryParam("limit", qLimit); err != nil { + return err + } + } + + } + + if o.Offset != nil { + + // query param offset + var qrOffset int64 + if o.Offset != nil { + qrOffset = *o.Offset + } + qOffset := swag.FormatInt64(qrOffset) + if qOffset != "" { + if err := r.SetQueryParam("offset", qOffset); err != nil { + return err + } + } + + } + + if o.OrderBy != nil { + + // query param orderBy + var qrOrderBy string + if o.OrderBy != nil { + qrOrderBy = *o.OrderBy + } + qOrderBy := qrOrderBy + if qOrderBy != "" { + if err := r.SetQueryParam("orderBy", qOrderBy); err != nil { + return err + } + } + + } + + if o.Scope != nil { + + // query param scope + var qrScope string + if o.Scope != nil { + qrScope = *o.Scope + } + qScope := qrScope + if qScope != "" { + if err := r.SetQueryParam("scope", qScope); err != nil { + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_registries_pack_list_responses.go b/api/client/v1/v1_registries_pack_list_responses.go new file mode 100644 index 00000000..40fe7e54 --- /dev/null +++ b/api/client/v1/v1_registries_pack_list_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1RegistriesPackListReader is a Reader for the V1RegistriesPackList structure. +type V1RegistriesPackListReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1RegistriesPackListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1RegistriesPackListOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1RegistriesPackListOK creates a V1RegistriesPackListOK with default headers values +func NewV1RegistriesPackListOK() *V1RegistriesPackListOK { + return &V1RegistriesPackListOK{} +} + +/* +V1RegistriesPackListOK handles this case with default header values. + +An array of registry items +*/ +type V1RegistriesPackListOK struct { + Payload *models.V1PackRegistries +} + +func (o *V1RegistriesPackListOK) Error() string { + return fmt.Sprintf("[GET /v1/registries/pack][%d] v1RegistriesPackListOK %+v", 200, o.Payload) +} + +func (o *V1RegistriesPackListOK) GetPayload() *models.V1PackRegistries { + return o.Payload +} + +func (o *V1RegistriesPackListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1PackRegistries) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_registries_pack_summary_list_parameters.go b/api/client/v1/v1_registries_pack_summary_list_parameters.go new file mode 100644 index 00000000..ff259f18 --- /dev/null +++ b/api/client/v1/v1_registries_pack_summary_list_parameters.go @@ -0,0 +1,360 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// NewV1RegistriesPackSummaryListParams creates a new V1RegistriesPackSummaryListParams object +// with the default values initialized. +func NewV1RegistriesPackSummaryListParams() *V1RegistriesPackSummaryListParams { + var ( + limitDefault = int64(50) + scopeDefault = string("all") + ) + return &V1RegistriesPackSummaryListParams{ + Limit: &limitDefault, + Scope: &scopeDefault, + + timeout: cr.DefaultTimeout, + } +} + +// NewV1RegistriesPackSummaryListParamsWithTimeout creates a new V1RegistriesPackSummaryListParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1RegistriesPackSummaryListParamsWithTimeout(timeout time.Duration) *V1RegistriesPackSummaryListParams { + var ( + limitDefault = int64(50) + scopeDefault = string("all") + ) + return &V1RegistriesPackSummaryListParams{ + Limit: &limitDefault, + Scope: &scopeDefault, + + timeout: timeout, + } +} + +// NewV1RegistriesPackSummaryListParamsWithContext creates a new V1RegistriesPackSummaryListParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1RegistriesPackSummaryListParamsWithContext(ctx context.Context) *V1RegistriesPackSummaryListParams { + var ( + limitDefault = int64(50) + scopeDefault = string("all") + ) + return &V1RegistriesPackSummaryListParams{ + Limit: &limitDefault, + Scope: &scopeDefault, + + Context: ctx, + } +} + +// NewV1RegistriesPackSummaryListParamsWithHTTPClient creates a new V1RegistriesPackSummaryListParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1RegistriesPackSummaryListParamsWithHTTPClient(client *http.Client) *V1RegistriesPackSummaryListParams { + var ( + limitDefault = int64(50) + scopeDefault = string("all") + ) + return &V1RegistriesPackSummaryListParams{ + Limit: &limitDefault, + Scope: &scopeDefault, + HTTPClient: client, + } +} + +/* +V1RegistriesPackSummaryListParams contains all the parameters to send to the API endpoint +for the v1 registries pack summary list operation typically these are written to a http.Request +*/ +type V1RegistriesPackSummaryListParams struct { + + /*Continue + continue token to paginate the subsequent data items + + */ + Continue *string + /*Fields + Set of fields to be presented in the response with values. The fields are comma separated. Eg: metadata.uid,metadata.name + + */ + Fields *string + /*Filters + Filters can be combined with AND, OR operators with field path name. Eg: metadata.name=TestServiceANDspec.cloudType=aws + + Server will be restricted to certain fields based on the indexed data for each resource. + + */ + Filters *string + /*Limit + limit is a maximum number of responses to return for a list call. Default and maximum value of the limit is 50. + If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. + + */ + Limit *int64 + /*Offset + offset is the next index number from which the response will start. The response offset value can be used along with continue token for the pagination. + + */ + Offset *int64 + /*OrderBy + Specify the fields with sort order. 1 indicates ascending and -1 for descending. Eg: orderBy=metadata.name=1,metadata.uid=-1 + + */ + OrderBy *string + /*Scope*/ + Scope *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 registries pack summary list params +func (o *V1RegistriesPackSummaryListParams) WithTimeout(timeout time.Duration) *V1RegistriesPackSummaryListParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 registries pack summary list params +func (o *V1RegistriesPackSummaryListParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 registries pack summary list params +func (o *V1RegistriesPackSummaryListParams) WithContext(ctx context.Context) *V1RegistriesPackSummaryListParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 registries pack summary list params +func (o *V1RegistriesPackSummaryListParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 registries pack summary list params +func (o *V1RegistriesPackSummaryListParams) WithHTTPClient(client *http.Client) *V1RegistriesPackSummaryListParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 registries pack summary list params +func (o *V1RegistriesPackSummaryListParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithContinue adds the continueVar to the v1 registries pack summary list params +func (o *V1RegistriesPackSummaryListParams) WithContinue(continueVar *string) *V1RegistriesPackSummaryListParams { + o.SetContinue(continueVar) + return o +} + +// SetContinue adds the continue to the v1 registries pack summary list params +func (o *V1RegistriesPackSummaryListParams) SetContinue(continueVar *string) { + o.Continue = continueVar +} + +// WithFields adds the fields to the v1 registries pack summary list params +func (o *V1RegistriesPackSummaryListParams) WithFields(fields *string) *V1RegistriesPackSummaryListParams { + o.SetFields(fields) + return o +} + +// SetFields adds the fields to the v1 registries pack summary list params +func (o *V1RegistriesPackSummaryListParams) SetFields(fields *string) { + o.Fields = fields +} + +// WithFilters adds the filters to the v1 registries pack summary list params +func (o *V1RegistriesPackSummaryListParams) WithFilters(filters *string) *V1RegistriesPackSummaryListParams { + o.SetFilters(filters) + return o +} + +// SetFilters adds the filters to the v1 registries pack summary list params +func (o *V1RegistriesPackSummaryListParams) SetFilters(filters *string) { + o.Filters = filters +} + +// WithLimit adds the limit to the v1 registries pack summary list params +func (o *V1RegistriesPackSummaryListParams) WithLimit(limit *int64) *V1RegistriesPackSummaryListParams { + o.SetLimit(limit) + return o +} + +// SetLimit adds the limit to the v1 registries pack summary list params +func (o *V1RegistriesPackSummaryListParams) SetLimit(limit *int64) { + o.Limit = limit +} + +// WithOffset adds the offset to the v1 registries pack summary list params +func (o *V1RegistriesPackSummaryListParams) WithOffset(offset *int64) *V1RegistriesPackSummaryListParams { + o.SetOffset(offset) + return o +} + +// SetOffset adds the offset to the v1 registries pack summary list params +func (o *V1RegistriesPackSummaryListParams) SetOffset(offset *int64) { + o.Offset = offset +} + +// WithOrderBy adds the orderBy to the v1 registries pack summary list params +func (o *V1RegistriesPackSummaryListParams) WithOrderBy(orderBy *string) *V1RegistriesPackSummaryListParams { + o.SetOrderBy(orderBy) + return o +} + +// SetOrderBy adds the orderBy to the v1 registries pack summary list params +func (o *V1RegistriesPackSummaryListParams) SetOrderBy(orderBy *string) { + o.OrderBy = orderBy +} + +// WithScope adds the scope to the v1 registries pack summary list params +func (o *V1RegistriesPackSummaryListParams) WithScope(scope *string) *V1RegistriesPackSummaryListParams { + o.SetScope(scope) + return o +} + +// SetScope adds the scope to the v1 registries pack summary list params +func (o *V1RegistriesPackSummaryListParams) SetScope(scope *string) { + o.Scope = scope +} + +// WriteToRequest writes these params to a swagger request +func (o *V1RegistriesPackSummaryListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Continue != nil { + + // query param continue + var qrContinue string + if o.Continue != nil { + qrContinue = *o.Continue + } + qContinue := qrContinue + if qContinue != "" { + if err := r.SetQueryParam("continue", qContinue); err != nil { + return err + } + } + + } + + if o.Fields != nil { + + // query param fields + var qrFields string + if o.Fields != nil { + qrFields = *o.Fields + } + qFields := qrFields + if qFields != "" { + if err := r.SetQueryParam("fields", qFields); err != nil { + return err + } + } + + } + + if o.Filters != nil { + + // query param filters + var qrFilters string + if o.Filters != nil { + qrFilters = *o.Filters + } + qFilters := qrFilters + if qFilters != "" { + if err := r.SetQueryParam("filters", qFilters); err != nil { + return err + } + } + + } + + if o.Limit != nil { + + // query param limit + var qrLimit int64 + if o.Limit != nil { + qrLimit = *o.Limit + } + qLimit := swag.FormatInt64(qrLimit) + if qLimit != "" { + if err := r.SetQueryParam("limit", qLimit); err != nil { + return err + } + } + + } + + if o.Offset != nil { + + // query param offset + var qrOffset int64 + if o.Offset != nil { + qrOffset = *o.Offset + } + qOffset := swag.FormatInt64(qrOffset) + if qOffset != "" { + if err := r.SetQueryParam("offset", qOffset); err != nil { + return err + } + } + + } + + if o.OrderBy != nil { + + // query param orderBy + var qrOrderBy string + if o.OrderBy != nil { + qrOrderBy = *o.OrderBy + } + qOrderBy := qrOrderBy + if qOrderBy != "" { + if err := r.SetQueryParam("orderBy", qOrderBy); err != nil { + return err + } + } + + } + + if o.Scope != nil { + + // query param scope + var qrScope string + if o.Scope != nil { + qrScope = *o.Scope + } + qScope := qrScope + if qScope != "" { + if err := r.SetQueryParam("scope", qScope); err != nil { + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_registries_pack_summary_list_responses.go b/api/client/v1/v1_registries_pack_summary_list_responses.go new file mode 100644 index 00000000..e1847e89 --- /dev/null +++ b/api/client/v1/v1_registries_pack_summary_list_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1RegistriesPackSummaryListReader is a Reader for the V1RegistriesPackSummaryList structure. +type V1RegistriesPackSummaryListReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1RegistriesPackSummaryListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1RegistriesPackSummaryListOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1RegistriesPackSummaryListOK creates a V1RegistriesPackSummaryListOK with default headers values +func NewV1RegistriesPackSummaryListOK() *V1RegistriesPackSummaryListOK { + return &V1RegistriesPackSummaryListOK{} +} + +/* +V1RegistriesPackSummaryListOK handles this case with default header values. + +An array of registry items +*/ +type V1RegistriesPackSummaryListOK struct { + Payload *models.V1PackRegistriesSummary +} + +func (o *V1RegistriesPackSummaryListOK) Error() string { + return fmt.Sprintf("[GET /v1/registries/pack/summary][%d] v1RegistriesPackSummaryListOK %+v", 200, o.Payload) +} + +func (o *V1RegistriesPackSummaryListOK) GetPayload() *models.V1PackRegistriesSummary { + return o.Payload +} + +func (o *V1RegistriesPackSummaryListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1PackRegistriesSummary) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_registries_pack_uid_delete_parameters.go b/api/client/v1/v1_registries_pack_uid_delete_parameters.go new file mode 100644 index 00000000..d6dbaf2a --- /dev/null +++ b/api/client/v1/v1_registries_pack_uid_delete_parameters.go @@ -0,0 +1,133 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1RegistriesPackUIDDeleteParams creates a new V1RegistriesPackUIDDeleteParams object +// with the default values initialized. +func NewV1RegistriesPackUIDDeleteParams() *V1RegistriesPackUIDDeleteParams { + var () + return &V1RegistriesPackUIDDeleteParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1RegistriesPackUIDDeleteParamsWithTimeout creates a new V1RegistriesPackUIDDeleteParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1RegistriesPackUIDDeleteParamsWithTimeout(timeout time.Duration) *V1RegistriesPackUIDDeleteParams { + var () + return &V1RegistriesPackUIDDeleteParams{ + + timeout: timeout, + } +} + +// NewV1RegistriesPackUIDDeleteParamsWithContext creates a new V1RegistriesPackUIDDeleteParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1RegistriesPackUIDDeleteParamsWithContext(ctx context.Context) *V1RegistriesPackUIDDeleteParams { + var () + return &V1RegistriesPackUIDDeleteParams{ + + Context: ctx, + } +} + +// NewV1RegistriesPackUIDDeleteParamsWithHTTPClient creates a new V1RegistriesPackUIDDeleteParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1RegistriesPackUIDDeleteParamsWithHTTPClient(client *http.Client) *V1RegistriesPackUIDDeleteParams { + var () + return &V1RegistriesPackUIDDeleteParams{ + HTTPClient: client, + } +} + +/* +V1RegistriesPackUIDDeleteParams contains all the parameters to send to the API endpoint +for the v1 registries pack Uid delete operation typically these are written to a http.Request +*/ +type V1RegistriesPackUIDDeleteParams struct { + + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 registries pack Uid delete params +func (o *V1RegistriesPackUIDDeleteParams) WithTimeout(timeout time.Duration) *V1RegistriesPackUIDDeleteParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 registries pack Uid delete params +func (o *V1RegistriesPackUIDDeleteParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 registries pack Uid delete params +func (o *V1RegistriesPackUIDDeleteParams) WithContext(ctx context.Context) *V1RegistriesPackUIDDeleteParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 registries pack Uid delete params +func (o *V1RegistriesPackUIDDeleteParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 registries pack Uid delete params +func (o *V1RegistriesPackUIDDeleteParams) WithHTTPClient(client *http.Client) *V1RegistriesPackUIDDeleteParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 registries pack Uid delete params +func (o *V1RegistriesPackUIDDeleteParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithUID adds the uid to the v1 registries pack Uid delete params +func (o *V1RegistriesPackUIDDeleteParams) WithUID(uid string) *V1RegistriesPackUIDDeleteParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 registries pack Uid delete params +func (o *V1RegistriesPackUIDDeleteParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1RegistriesPackUIDDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_registries_pack_uid_delete_responses.go b/api/client/v1/v1_registries_pack_uid_delete_responses.go new file mode 100644 index 00000000..ceb996ad --- /dev/null +++ b/api/client/v1/v1_registries_pack_uid_delete_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1RegistriesPackUIDDeleteReader is a Reader for the V1RegistriesPackUIDDelete structure. +type V1RegistriesPackUIDDeleteReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1RegistriesPackUIDDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1RegistriesPackUIDDeleteNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1RegistriesPackUIDDeleteNoContent creates a V1RegistriesPackUIDDeleteNoContent with default headers values +func NewV1RegistriesPackUIDDeleteNoContent() *V1RegistriesPackUIDDeleteNoContent { + return &V1RegistriesPackUIDDeleteNoContent{} +} + +/* +V1RegistriesPackUIDDeleteNoContent handles this case with default header values. + +The resource was deleted successfully +*/ +type V1RegistriesPackUIDDeleteNoContent struct { +} + +func (o *V1RegistriesPackUIDDeleteNoContent) Error() string { + return fmt.Sprintf("[DELETE /v1/registries/pack/{uid}][%d] v1RegistriesPackUidDeleteNoContent ", 204) +} + +func (o *V1RegistriesPackUIDDeleteNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_registries_pack_uid_get_parameters.go b/api/client/v1/v1_registries_pack_uid_get_parameters.go new file mode 100644 index 00000000..95df48cf --- /dev/null +++ b/api/client/v1/v1_registries_pack_uid_get_parameters.go @@ -0,0 +1,133 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1RegistriesPackUIDGetParams creates a new V1RegistriesPackUIDGetParams object +// with the default values initialized. +func NewV1RegistriesPackUIDGetParams() *V1RegistriesPackUIDGetParams { + var () + return &V1RegistriesPackUIDGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1RegistriesPackUIDGetParamsWithTimeout creates a new V1RegistriesPackUIDGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1RegistriesPackUIDGetParamsWithTimeout(timeout time.Duration) *V1RegistriesPackUIDGetParams { + var () + return &V1RegistriesPackUIDGetParams{ + + timeout: timeout, + } +} + +// NewV1RegistriesPackUIDGetParamsWithContext creates a new V1RegistriesPackUIDGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1RegistriesPackUIDGetParamsWithContext(ctx context.Context) *V1RegistriesPackUIDGetParams { + var () + return &V1RegistriesPackUIDGetParams{ + + Context: ctx, + } +} + +// NewV1RegistriesPackUIDGetParamsWithHTTPClient creates a new V1RegistriesPackUIDGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1RegistriesPackUIDGetParamsWithHTTPClient(client *http.Client) *V1RegistriesPackUIDGetParams { + var () + return &V1RegistriesPackUIDGetParams{ + HTTPClient: client, + } +} + +/* +V1RegistriesPackUIDGetParams contains all the parameters to send to the API endpoint +for the v1 registries pack Uid get operation typically these are written to a http.Request +*/ +type V1RegistriesPackUIDGetParams struct { + + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 registries pack Uid get params +func (o *V1RegistriesPackUIDGetParams) WithTimeout(timeout time.Duration) *V1RegistriesPackUIDGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 registries pack Uid get params +func (o *V1RegistriesPackUIDGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 registries pack Uid get params +func (o *V1RegistriesPackUIDGetParams) WithContext(ctx context.Context) *V1RegistriesPackUIDGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 registries pack Uid get params +func (o *V1RegistriesPackUIDGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 registries pack Uid get params +func (o *V1RegistriesPackUIDGetParams) WithHTTPClient(client *http.Client) *V1RegistriesPackUIDGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 registries pack Uid get params +func (o *V1RegistriesPackUIDGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithUID adds the uid to the v1 registries pack Uid get params +func (o *V1RegistriesPackUIDGetParams) WithUID(uid string) *V1RegistriesPackUIDGetParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 registries pack Uid get params +func (o *V1RegistriesPackUIDGetParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1RegistriesPackUIDGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_registries_pack_uid_get_responses.go b/api/client/v1/v1_registries_pack_uid_get_responses.go new file mode 100644 index 00000000..39eb968c --- /dev/null +++ b/api/client/v1/v1_registries_pack_uid_get_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1RegistriesPackUIDGetReader is a Reader for the V1RegistriesPackUIDGet structure. +type V1RegistriesPackUIDGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1RegistriesPackUIDGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1RegistriesPackUIDGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1RegistriesPackUIDGetOK creates a V1RegistriesPackUIDGetOK with default headers values +func NewV1RegistriesPackUIDGetOK() *V1RegistriesPackUIDGetOK { + return &V1RegistriesPackUIDGetOK{} +} + +/* +V1RegistriesPackUIDGetOK handles this case with default header values. + +OK +*/ +type V1RegistriesPackUIDGetOK struct { + Payload *models.V1PackRegistry +} + +func (o *V1RegistriesPackUIDGetOK) Error() string { + return fmt.Sprintf("[GET /v1/registries/pack/{uid}][%d] v1RegistriesPackUidGetOK %+v", 200, o.Payload) +} + +func (o *V1RegistriesPackUIDGetOK) GetPayload() *models.V1PackRegistry { + return o.Payload +} + +func (o *V1RegistriesPackUIDGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1PackRegistry) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_registries_pack_uid_sync_parameters.go b/api/client/v1/v1_registries_pack_uid_sync_parameters.go new file mode 100644 index 00000000..1c4d4c4f --- /dev/null +++ b/api/client/v1/v1_registries_pack_uid_sync_parameters.go @@ -0,0 +1,175 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// NewV1RegistriesPackUIDSyncParams creates a new V1RegistriesPackUIDSyncParams object +// with the default values initialized. +func NewV1RegistriesPackUIDSyncParams() *V1RegistriesPackUIDSyncParams { + var ( + forceSyncDefault = bool(false) + ) + return &V1RegistriesPackUIDSyncParams{ + ForceSync: &forceSyncDefault, + + timeout: cr.DefaultTimeout, + } +} + +// NewV1RegistriesPackUIDSyncParamsWithTimeout creates a new V1RegistriesPackUIDSyncParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1RegistriesPackUIDSyncParamsWithTimeout(timeout time.Duration) *V1RegistriesPackUIDSyncParams { + var ( + forceSyncDefault = bool(false) + ) + return &V1RegistriesPackUIDSyncParams{ + ForceSync: &forceSyncDefault, + + timeout: timeout, + } +} + +// NewV1RegistriesPackUIDSyncParamsWithContext creates a new V1RegistriesPackUIDSyncParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1RegistriesPackUIDSyncParamsWithContext(ctx context.Context) *V1RegistriesPackUIDSyncParams { + var ( + forceSyncDefault = bool(false) + ) + return &V1RegistriesPackUIDSyncParams{ + ForceSync: &forceSyncDefault, + + Context: ctx, + } +} + +// NewV1RegistriesPackUIDSyncParamsWithHTTPClient creates a new V1RegistriesPackUIDSyncParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1RegistriesPackUIDSyncParamsWithHTTPClient(client *http.Client) *V1RegistriesPackUIDSyncParams { + var ( + forceSyncDefault = bool(false) + ) + return &V1RegistriesPackUIDSyncParams{ + ForceSync: &forceSyncDefault, + HTTPClient: client, + } +} + +/* +V1RegistriesPackUIDSyncParams contains all the parameters to send to the API endpoint +for the v1 registries pack Uid sync operation typically these are written to a http.Request +*/ +type V1RegistriesPackUIDSyncParams struct { + + /*ForceSync*/ + ForceSync *bool + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 registries pack Uid sync params +func (o *V1RegistriesPackUIDSyncParams) WithTimeout(timeout time.Duration) *V1RegistriesPackUIDSyncParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 registries pack Uid sync params +func (o *V1RegistriesPackUIDSyncParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 registries pack Uid sync params +func (o *V1RegistriesPackUIDSyncParams) WithContext(ctx context.Context) *V1RegistriesPackUIDSyncParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 registries pack Uid sync params +func (o *V1RegistriesPackUIDSyncParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 registries pack Uid sync params +func (o *V1RegistriesPackUIDSyncParams) WithHTTPClient(client *http.Client) *V1RegistriesPackUIDSyncParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 registries pack Uid sync params +func (o *V1RegistriesPackUIDSyncParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithForceSync adds the forceSync to the v1 registries pack Uid sync params +func (o *V1RegistriesPackUIDSyncParams) WithForceSync(forceSync *bool) *V1RegistriesPackUIDSyncParams { + o.SetForceSync(forceSync) + return o +} + +// SetForceSync adds the forceSync to the v1 registries pack Uid sync params +func (o *V1RegistriesPackUIDSyncParams) SetForceSync(forceSync *bool) { + o.ForceSync = forceSync +} + +// WithUID adds the uid to the v1 registries pack Uid sync params +func (o *V1RegistriesPackUIDSyncParams) WithUID(uid string) *V1RegistriesPackUIDSyncParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 registries pack Uid sync params +func (o *V1RegistriesPackUIDSyncParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1RegistriesPackUIDSyncParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.ForceSync != nil { + + // query param forceSync + var qrForceSync bool + if o.ForceSync != nil { + qrForceSync = *o.ForceSync + } + qForceSync := swag.FormatBool(qrForceSync) + if qForceSync != "" { + if err := r.SetQueryParam("forceSync", qForceSync); err != nil { + return err + } + } + + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_registries_pack_uid_sync_responses.go b/api/client/v1/v1_registries_pack_uid_sync_responses.go new file mode 100644 index 00000000..8cf9894a --- /dev/null +++ b/api/client/v1/v1_registries_pack_uid_sync_responses.go @@ -0,0 +1,61 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1RegistriesPackUIDSyncReader is a Reader for the V1RegistriesPackUIDSync structure. +type V1RegistriesPackUIDSyncReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1RegistriesPackUIDSyncReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 202: + result := NewV1RegistriesPackUIDSyncAccepted() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1RegistriesPackUIDSyncAccepted creates a V1RegistriesPackUIDSyncAccepted with default headers values +func NewV1RegistriesPackUIDSyncAccepted() *V1RegistriesPackUIDSyncAccepted { + return &V1RegistriesPackUIDSyncAccepted{} +} + +/* +V1RegistriesPackUIDSyncAccepted handles this case with default header values. + +Ok response without content +*/ +type V1RegistriesPackUIDSyncAccepted struct { + /*Audit uid for the request + */ + AuditUID string +} + +func (o *V1RegistriesPackUIDSyncAccepted) Error() string { + return fmt.Sprintf("[POST /v1/registries/pack/{uid}/sync][%d] v1RegistriesPackUidSyncAccepted ", 202) +} + +func (o *V1RegistriesPackUIDSyncAccepted) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header AuditUid + o.AuditUID = response.GetHeader("AuditUid") + + return nil +} diff --git a/api/client/v1/v1_registries_pack_uid_sync_status_parameters.go b/api/client/v1/v1_registries_pack_uid_sync_status_parameters.go new file mode 100644 index 00000000..843b5d9c --- /dev/null +++ b/api/client/v1/v1_registries_pack_uid_sync_status_parameters.go @@ -0,0 +1,133 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1RegistriesPackUIDSyncStatusParams creates a new V1RegistriesPackUIDSyncStatusParams object +// with the default values initialized. +func NewV1RegistriesPackUIDSyncStatusParams() *V1RegistriesPackUIDSyncStatusParams { + var () + return &V1RegistriesPackUIDSyncStatusParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1RegistriesPackUIDSyncStatusParamsWithTimeout creates a new V1RegistriesPackUIDSyncStatusParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1RegistriesPackUIDSyncStatusParamsWithTimeout(timeout time.Duration) *V1RegistriesPackUIDSyncStatusParams { + var () + return &V1RegistriesPackUIDSyncStatusParams{ + + timeout: timeout, + } +} + +// NewV1RegistriesPackUIDSyncStatusParamsWithContext creates a new V1RegistriesPackUIDSyncStatusParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1RegistriesPackUIDSyncStatusParamsWithContext(ctx context.Context) *V1RegistriesPackUIDSyncStatusParams { + var () + return &V1RegistriesPackUIDSyncStatusParams{ + + Context: ctx, + } +} + +// NewV1RegistriesPackUIDSyncStatusParamsWithHTTPClient creates a new V1RegistriesPackUIDSyncStatusParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1RegistriesPackUIDSyncStatusParamsWithHTTPClient(client *http.Client) *V1RegistriesPackUIDSyncStatusParams { + var () + return &V1RegistriesPackUIDSyncStatusParams{ + HTTPClient: client, + } +} + +/* +V1RegistriesPackUIDSyncStatusParams contains all the parameters to send to the API endpoint +for the v1 registries pack Uid sync status operation typically these are written to a http.Request +*/ +type V1RegistriesPackUIDSyncStatusParams struct { + + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 registries pack Uid sync status params +func (o *V1RegistriesPackUIDSyncStatusParams) WithTimeout(timeout time.Duration) *V1RegistriesPackUIDSyncStatusParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 registries pack Uid sync status params +func (o *V1RegistriesPackUIDSyncStatusParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 registries pack Uid sync status params +func (o *V1RegistriesPackUIDSyncStatusParams) WithContext(ctx context.Context) *V1RegistriesPackUIDSyncStatusParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 registries pack Uid sync status params +func (o *V1RegistriesPackUIDSyncStatusParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 registries pack Uid sync status params +func (o *V1RegistriesPackUIDSyncStatusParams) WithHTTPClient(client *http.Client) *V1RegistriesPackUIDSyncStatusParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 registries pack Uid sync status params +func (o *V1RegistriesPackUIDSyncStatusParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithUID adds the uid to the v1 registries pack Uid sync status params +func (o *V1RegistriesPackUIDSyncStatusParams) WithUID(uid string) *V1RegistriesPackUIDSyncStatusParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 registries pack Uid sync status params +func (o *V1RegistriesPackUIDSyncStatusParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1RegistriesPackUIDSyncStatusParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_registries_pack_uid_sync_status_responses.go b/api/client/v1/v1_registries_pack_uid_sync_status_responses.go new file mode 100644 index 00000000..93e50c82 --- /dev/null +++ b/api/client/v1/v1_registries_pack_uid_sync_status_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1RegistriesPackUIDSyncStatusReader is a Reader for the V1RegistriesPackUIDSyncStatus structure. +type V1RegistriesPackUIDSyncStatusReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1RegistriesPackUIDSyncStatusReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1RegistriesPackUIDSyncStatusOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1RegistriesPackUIDSyncStatusOK creates a V1RegistriesPackUIDSyncStatusOK with default headers values +func NewV1RegistriesPackUIDSyncStatusOK() *V1RegistriesPackUIDSyncStatusOK { + return &V1RegistriesPackUIDSyncStatusOK{} +} + +/* +V1RegistriesPackUIDSyncStatusOK handles this case with default header values. + +Pack registry sync status +*/ +type V1RegistriesPackUIDSyncStatusOK struct { + Payload *models.V1RegistrySyncStatus +} + +func (o *V1RegistriesPackUIDSyncStatusOK) Error() string { + return fmt.Sprintf("[GET /v1/registries/pack/{uid}/sync/status][%d] v1RegistriesPackUidSyncStatusOK %+v", 200, o.Payload) +} + +func (o *V1RegistriesPackUIDSyncStatusOK) GetPayload() *models.V1RegistrySyncStatus { + return o.Payload +} + +func (o *V1RegistriesPackUIDSyncStatusOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1RegistrySyncStatus) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_registries_pack_uid_update_parameters.go b/api/client/v1/v1_registries_pack_uid_update_parameters.go new file mode 100644 index 00000000..d09488af --- /dev/null +++ b/api/client/v1/v1_registries_pack_uid_update_parameters.go @@ -0,0 +1,154 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1RegistriesPackUIDUpdateParams creates a new V1RegistriesPackUIDUpdateParams object +// with the default values initialized. +func NewV1RegistriesPackUIDUpdateParams() *V1RegistriesPackUIDUpdateParams { + var () + return &V1RegistriesPackUIDUpdateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1RegistriesPackUIDUpdateParamsWithTimeout creates a new V1RegistriesPackUIDUpdateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1RegistriesPackUIDUpdateParamsWithTimeout(timeout time.Duration) *V1RegistriesPackUIDUpdateParams { + var () + return &V1RegistriesPackUIDUpdateParams{ + + timeout: timeout, + } +} + +// NewV1RegistriesPackUIDUpdateParamsWithContext creates a new V1RegistriesPackUIDUpdateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1RegistriesPackUIDUpdateParamsWithContext(ctx context.Context) *V1RegistriesPackUIDUpdateParams { + var () + return &V1RegistriesPackUIDUpdateParams{ + + Context: ctx, + } +} + +// NewV1RegistriesPackUIDUpdateParamsWithHTTPClient creates a new V1RegistriesPackUIDUpdateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1RegistriesPackUIDUpdateParamsWithHTTPClient(client *http.Client) *V1RegistriesPackUIDUpdateParams { + var () + return &V1RegistriesPackUIDUpdateParams{ + HTTPClient: client, + } +} + +/* +V1RegistriesPackUIDUpdateParams contains all the parameters to send to the API endpoint +for the v1 registries pack Uid update operation typically these are written to a http.Request +*/ +type V1RegistriesPackUIDUpdateParams struct { + + /*Body*/ + Body *models.V1PackRegistry + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 registries pack Uid update params +func (o *V1RegistriesPackUIDUpdateParams) WithTimeout(timeout time.Duration) *V1RegistriesPackUIDUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 registries pack Uid update params +func (o *V1RegistriesPackUIDUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 registries pack Uid update params +func (o *V1RegistriesPackUIDUpdateParams) WithContext(ctx context.Context) *V1RegistriesPackUIDUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 registries pack Uid update params +func (o *V1RegistriesPackUIDUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 registries pack Uid update params +func (o *V1RegistriesPackUIDUpdateParams) WithHTTPClient(client *http.Client) *V1RegistriesPackUIDUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 registries pack Uid update params +func (o *V1RegistriesPackUIDUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 registries pack Uid update params +func (o *V1RegistriesPackUIDUpdateParams) WithBody(body *models.V1PackRegistry) *V1RegistriesPackUIDUpdateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 registries pack Uid update params +func (o *V1RegistriesPackUIDUpdateParams) SetBody(body *models.V1PackRegistry) { + o.Body = body +} + +// WithUID adds the uid to the v1 registries pack Uid update params +func (o *V1RegistriesPackUIDUpdateParams) WithUID(uid string) *V1RegistriesPackUIDUpdateParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 registries pack Uid update params +func (o *V1RegistriesPackUIDUpdateParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1RegistriesPackUIDUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_registries_pack_uid_update_responses.go b/api/client/v1/v1_registries_pack_uid_update_responses.go new file mode 100644 index 00000000..2de231e7 --- /dev/null +++ b/api/client/v1/v1_registries_pack_uid_update_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1RegistriesPackUIDUpdateReader is a Reader for the V1RegistriesPackUIDUpdate structure. +type V1RegistriesPackUIDUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1RegistriesPackUIDUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1RegistriesPackUIDUpdateNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1RegistriesPackUIDUpdateNoContent creates a V1RegistriesPackUIDUpdateNoContent with default headers values +func NewV1RegistriesPackUIDUpdateNoContent() *V1RegistriesPackUIDUpdateNoContent { + return &V1RegistriesPackUIDUpdateNoContent{} +} + +/* +V1RegistriesPackUIDUpdateNoContent handles this case with default header values. + +The resource was updated successfully +*/ +type V1RegistriesPackUIDUpdateNoContent struct { +} + +func (o *V1RegistriesPackUIDUpdateNoContent) Error() string { + return fmt.Sprintf("[PUT /v1/registries/pack/{uid}][%d] v1RegistriesPackUidUpdateNoContent ", 204) +} + +func (o *V1RegistriesPackUIDUpdateNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_registries_pack_validate_parameters.go b/api/client/v1/v1_registries_pack_validate_parameters.go new file mode 100644 index 00000000..e0d1a1cd --- /dev/null +++ b/api/client/v1/v1_registries_pack_validate_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1RegistriesPackValidateParams creates a new V1RegistriesPackValidateParams object +// with the default values initialized. +func NewV1RegistriesPackValidateParams() *V1RegistriesPackValidateParams { + var () + return &V1RegistriesPackValidateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1RegistriesPackValidateParamsWithTimeout creates a new V1RegistriesPackValidateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1RegistriesPackValidateParamsWithTimeout(timeout time.Duration) *V1RegistriesPackValidateParams { + var () + return &V1RegistriesPackValidateParams{ + + timeout: timeout, + } +} + +// NewV1RegistriesPackValidateParamsWithContext creates a new V1RegistriesPackValidateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1RegistriesPackValidateParamsWithContext(ctx context.Context) *V1RegistriesPackValidateParams { + var () + return &V1RegistriesPackValidateParams{ + + Context: ctx, + } +} + +// NewV1RegistriesPackValidateParamsWithHTTPClient creates a new V1RegistriesPackValidateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1RegistriesPackValidateParamsWithHTTPClient(client *http.Client) *V1RegistriesPackValidateParams { + var () + return &V1RegistriesPackValidateParams{ + HTTPClient: client, + } +} + +/* +V1RegistriesPackValidateParams contains all the parameters to send to the API endpoint +for the v1 registries pack validate operation typically these are written to a http.Request +*/ +type V1RegistriesPackValidateParams struct { + + /*Body*/ + Body *models.V1PackRegistrySpec + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 registries pack validate params +func (o *V1RegistriesPackValidateParams) WithTimeout(timeout time.Duration) *V1RegistriesPackValidateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 registries pack validate params +func (o *V1RegistriesPackValidateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 registries pack validate params +func (o *V1RegistriesPackValidateParams) WithContext(ctx context.Context) *V1RegistriesPackValidateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 registries pack validate params +func (o *V1RegistriesPackValidateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 registries pack validate params +func (o *V1RegistriesPackValidateParams) WithHTTPClient(client *http.Client) *V1RegistriesPackValidateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 registries pack validate params +func (o *V1RegistriesPackValidateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 registries pack validate params +func (o *V1RegistriesPackValidateParams) WithBody(body *models.V1PackRegistrySpec) *V1RegistriesPackValidateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 registries pack validate params +func (o *V1RegistriesPackValidateParams) SetBody(body *models.V1PackRegistrySpec) { + o.Body = body +} + +// WriteToRequest writes these params to a swagger request +func (o *V1RegistriesPackValidateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_registries_pack_validate_responses.go b/api/client/v1/v1_registries_pack_validate_responses.go new file mode 100644 index 00000000..0afca5e0 --- /dev/null +++ b/api/client/v1/v1_registries_pack_validate_responses.go @@ -0,0 +1,61 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1RegistriesPackValidateReader is a Reader for the V1RegistriesPackValidate structure. +type V1RegistriesPackValidateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1RegistriesPackValidateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1RegistriesPackValidateNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1RegistriesPackValidateNoContent creates a V1RegistriesPackValidateNoContent with default headers values +func NewV1RegistriesPackValidateNoContent() *V1RegistriesPackValidateNoContent { + return &V1RegistriesPackValidateNoContent{} +} + +/* +V1RegistriesPackValidateNoContent handles this case with default header values. + +Ok response without content +*/ +type V1RegistriesPackValidateNoContent struct { + /*Audit uid for the request + */ + AuditUID string +} + +func (o *V1RegistriesPackValidateNoContent) Error() string { + return fmt.Sprintf("[POST /v1/registries/pack/validate][%d] v1RegistriesPackValidateNoContent ", 204) +} + +func (o *V1RegistriesPackValidateNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header AuditUid + o.AuditUID = response.GetHeader("AuditUid") + + return nil +} diff --git a/api/client/v1/v1_registries_uid_delete_parameters.go b/api/client/v1/v1_registries_uid_delete_parameters.go new file mode 100644 index 00000000..064e3fb0 --- /dev/null +++ b/api/client/v1/v1_registries_uid_delete_parameters.go @@ -0,0 +1,133 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1RegistriesUIDDeleteParams creates a new V1RegistriesUIDDeleteParams object +// with the default values initialized. +func NewV1RegistriesUIDDeleteParams() *V1RegistriesUIDDeleteParams { + var () + return &V1RegistriesUIDDeleteParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1RegistriesUIDDeleteParamsWithTimeout creates a new V1RegistriesUIDDeleteParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1RegistriesUIDDeleteParamsWithTimeout(timeout time.Duration) *V1RegistriesUIDDeleteParams { + var () + return &V1RegistriesUIDDeleteParams{ + + timeout: timeout, + } +} + +// NewV1RegistriesUIDDeleteParamsWithContext creates a new V1RegistriesUIDDeleteParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1RegistriesUIDDeleteParamsWithContext(ctx context.Context) *V1RegistriesUIDDeleteParams { + var () + return &V1RegistriesUIDDeleteParams{ + + Context: ctx, + } +} + +// NewV1RegistriesUIDDeleteParamsWithHTTPClient creates a new V1RegistriesUIDDeleteParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1RegistriesUIDDeleteParamsWithHTTPClient(client *http.Client) *V1RegistriesUIDDeleteParams { + var () + return &V1RegistriesUIDDeleteParams{ + HTTPClient: client, + } +} + +/* +V1RegistriesUIDDeleteParams contains all the parameters to send to the API endpoint +for the v1 registries Uid delete operation typically these are written to a http.Request +*/ +type V1RegistriesUIDDeleteParams struct { + + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 registries Uid delete params +func (o *V1RegistriesUIDDeleteParams) WithTimeout(timeout time.Duration) *V1RegistriesUIDDeleteParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 registries Uid delete params +func (o *V1RegistriesUIDDeleteParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 registries Uid delete params +func (o *V1RegistriesUIDDeleteParams) WithContext(ctx context.Context) *V1RegistriesUIDDeleteParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 registries Uid delete params +func (o *V1RegistriesUIDDeleteParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 registries Uid delete params +func (o *V1RegistriesUIDDeleteParams) WithHTTPClient(client *http.Client) *V1RegistriesUIDDeleteParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 registries Uid delete params +func (o *V1RegistriesUIDDeleteParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithUID adds the uid to the v1 registries Uid delete params +func (o *V1RegistriesUIDDeleteParams) WithUID(uid string) *V1RegistriesUIDDeleteParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 registries Uid delete params +func (o *V1RegistriesUIDDeleteParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1RegistriesUIDDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_registries_uid_delete_responses.go b/api/client/v1/v1_registries_uid_delete_responses.go new file mode 100644 index 00000000..42789b43 --- /dev/null +++ b/api/client/v1/v1_registries_uid_delete_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1RegistriesUIDDeleteReader is a Reader for the V1RegistriesUIDDelete structure. +type V1RegistriesUIDDeleteReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1RegistriesUIDDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1RegistriesUIDDeleteNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1RegistriesUIDDeleteNoContent creates a V1RegistriesUIDDeleteNoContent with default headers values +func NewV1RegistriesUIDDeleteNoContent() *V1RegistriesUIDDeleteNoContent { + return &V1RegistriesUIDDeleteNoContent{} +} + +/* +V1RegistriesUIDDeleteNoContent handles this case with default header values. + +The resource was deleted successfully +*/ +type V1RegistriesUIDDeleteNoContent struct { +} + +func (o *V1RegistriesUIDDeleteNoContent) Error() string { + return fmt.Sprintf("[DELETE /v1/registries/{uid}][%d] v1RegistriesUidDeleteNoContent ", 204) +} + +func (o *V1RegistriesUIDDeleteNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_roles_clone_parameters.go b/api/client/v1/v1_roles_clone_parameters.go new file mode 100644 index 00000000..2ff6fe08 --- /dev/null +++ b/api/client/v1/v1_roles_clone_parameters.go @@ -0,0 +1,154 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1RolesCloneParams creates a new V1RolesCloneParams object +// with the default values initialized. +func NewV1RolesCloneParams() *V1RolesCloneParams { + var () + return &V1RolesCloneParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1RolesCloneParamsWithTimeout creates a new V1RolesCloneParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1RolesCloneParamsWithTimeout(timeout time.Duration) *V1RolesCloneParams { + var () + return &V1RolesCloneParams{ + + timeout: timeout, + } +} + +// NewV1RolesCloneParamsWithContext creates a new V1RolesCloneParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1RolesCloneParamsWithContext(ctx context.Context) *V1RolesCloneParams { + var () + return &V1RolesCloneParams{ + + Context: ctx, + } +} + +// NewV1RolesCloneParamsWithHTTPClient creates a new V1RolesCloneParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1RolesCloneParamsWithHTTPClient(client *http.Client) *V1RolesCloneParams { + var () + return &V1RolesCloneParams{ + HTTPClient: client, + } +} + +/* +V1RolesCloneParams contains all the parameters to send to the API endpoint +for the v1 roles clone operation typically these are written to a http.Request +*/ +type V1RolesCloneParams struct { + + /*Body*/ + Body *models.V1RoleClone + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 roles clone params +func (o *V1RolesCloneParams) WithTimeout(timeout time.Duration) *V1RolesCloneParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 roles clone params +func (o *V1RolesCloneParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 roles clone params +func (o *V1RolesCloneParams) WithContext(ctx context.Context) *V1RolesCloneParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 roles clone params +func (o *V1RolesCloneParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 roles clone params +func (o *V1RolesCloneParams) WithHTTPClient(client *http.Client) *V1RolesCloneParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 roles clone params +func (o *V1RolesCloneParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 roles clone params +func (o *V1RolesCloneParams) WithBody(body *models.V1RoleClone) *V1RolesCloneParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 roles clone params +func (o *V1RolesCloneParams) SetBody(body *models.V1RoleClone) { + o.Body = body +} + +// WithUID adds the uid to the v1 roles clone params +func (o *V1RolesCloneParams) WithUID(uid string) *V1RolesCloneParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 roles clone params +func (o *V1RolesCloneParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1RolesCloneParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_roles_clone_responses.go b/api/client/v1/v1_roles_clone_responses.go new file mode 100644 index 00000000..feaf0ca4 --- /dev/null +++ b/api/client/v1/v1_roles_clone_responses.go @@ -0,0 +1,77 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1RolesCloneReader is a Reader for the V1RolesClone structure. +type V1RolesCloneReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1RolesCloneReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 201: + result := NewV1RolesCloneCreated() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1RolesCloneCreated creates a V1RolesCloneCreated with default headers values +func NewV1RolesCloneCreated() *V1RolesCloneCreated { + return &V1RolesCloneCreated{} +} + +/* +V1RolesCloneCreated handles this case with default header values. + +Created successfully +*/ +type V1RolesCloneCreated struct { + /*Audit uid for the request + */ + AuditUID string + + Payload *models.V1UID +} + +func (o *V1RolesCloneCreated) Error() string { + return fmt.Sprintf("[POST /v1/roles/{uid}/clone][%d] v1RolesCloneCreated %+v", 201, o.Payload) +} + +func (o *V1RolesCloneCreated) GetPayload() *models.V1UID { + return o.Payload +} + +func (o *V1RolesCloneCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header AuditUid + o.AuditUID = response.GetHeader("AuditUid") + + o.Payload = new(models.V1UID) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_roles_create_parameters.go b/api/client/v1/v1_roles_create_parameters.go new file mode 100644 index 00000000..e5433f09 --- /dev/null +++ b/api/client/v1/v1_roles_create_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1RolesCreateParams creates a new V1RolesCreateParams object +// with the default values initialized. +func NewV1RolesCreateParams() *V1RolesCreateParams { + var () + return &V1RolesCreateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1RolesCreateParamsWithTimeout creates a new V1RolesCreateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1RolesCreateParamsWithTimeout(timeout time.Duration) *V1RolesCreateParams { + var () + return &V1RolesCreateParams{ + + timeout: timeout, + } +} + +// NewV1RolesCreateParamsWithContext creates a new V1RolesCreateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1RolesCreateParamsWithContext(ctx context.Context) *V1RolesCreateParams { + var () + return &V1RolesCreateParams{ + + Context: ctx, + } +} + +// NewV1RolesCreateParamsWithHTTPClient creates a new V1RolesCreateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1RolesCreateParamsWithHTTPClient(client *http.Client) *V1RolesCreateParams { + var () + return &V1RolesCreateParams{ + HTTPClient: client, + } +} + +/* +V1RolesCreateParams contains all the parameters to send to the API endpoint +for the v1 roles create operation typically these are written to a http.Request +*/ +type V1RolesCreateParams struct { + + /*Body*/ + Body *models.V1Role + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 roles create params +func (o *V1RolesCreateParams) WithTimeout(timeout time.Duration) *V1RolesCreateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 roles create params +func (o *V1RolesCreateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 roles create params +func (o *V1RolesCreateParams) WithContext(ctx context.Context) *V1RolesCreateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 roles create params +func (o *V1RolesCreateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 roles create params +func (o *V1RolesCreateParams) WithHTTPClient(client *http.Client) *V1RolesCreateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 roles create params +func (o *V1RolesCreateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 roles create params +func (o *V1RolesCreateParams) WithBody(body *models.V1Role) *V1RolesCreateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 roles create params +func (o *V1RolesCreateParams) SetBody(body *models.V1Role) { + o.Body = body +} + +// WriteToRequest writes these params to a swagger request +func (o *V1RolesCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_roles_create_responses.go b/api/client/v1/v1_roles_create_responses.go new file mode 100644 index 00000000..ffc52497 --- /dev/null +++ b/api/client/v1/v1_roles_create_responses.go @@ -0,0 +1,77 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1RolesCreateReader is a Reader for the V1RolesCreate structure. +type V1RolesCreateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1RolesCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 201: + result := NewV1RolesCreateCreated() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1RolesCreateCreated creates a V1RolesCreateCreated with default headers values +func NewV1RolesCreateCreated() *V1RolesCreateCreated { + return &V1RolesCreateCreated{} +} + +/* +V1RolesCreateCreated handles this case with default header values. + +Created successfully +*/ +type V1RolesCreateCreated struct { + /*Audit uid for the request + */ + AuditUID string + + Payload *models.V1UID +} + +func (o *V1RolesCreateCreated) Error() string { + return fmt.Sprintf("[POST /v1/roles][%d] v1RolesCreateCreated %+v", 201, o.Payload) +} + +func (o *V1RolesCreateCreated) GetPayload() *models.V1UID { + return o.Payload +} + +func (o *V1RolesCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header AuditUid + o.AuditUID = response.GetHeader("AuditUid") + + o.Payload = new(models.V1UID) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_roles_list_parameters.go b/api/client/v1/v1_roles_list_parameters.go new file mode 100644 index 00000000..fc6a2523 --- /dev/null +++ b/api/client/v1/v1_roles_list_parameters.go @@ -0,0 +1,323 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// NewV1RolesListParams creates a new V1RolesListParams object +// with the default values initialized. +func NewV1RolesListParams() *V1RolesListParams { + var ( + limitDefault = int64(50) + ) + return &V1RolesListParams{ + Limit: &limitDefault, + + timeout: cr.DefaultTimeout, + } +} + +// NewV1RolesListParamsWithTimeout creates a new V1RolesListParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1RolesListParamsWithTimeout(timeout time.Duration) *V1RolesListParams { + var ( + limitDefault = int64(50) + ) + return &V1RolesListParams{ + Limit: &limitDefault, + + timeout: timeout, + } +} + +// NewV1RolesListParamsWithContext creates a new V1RolesListParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1RolesListParamsWithContext(ctx context.Context) *V1RolesListParams { + var ( + limitDefault = int64(50) + ) + return &V1RolesListParams{ + Limit: &limitDefault, + + Context: ctx, + } +} + +// NewV1RolesListParamsWithHTTPClient creates a new V1RolesListParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1RolesListParamsWithHTTPClient(client *http.Client) *V1RolesListParams { + var ( + limitDefault = int64(50) + ) + return &V1RolesListParams{ + Limit: &limitDefault, + HTTPClient: client, + } +} + +/* +V1RolesListParams contains all the parameters to send to the API endpoint +for the v1 roles list operation typically these are written to a http.Request +*/ +type V1RolesListParams struct { + + /*Continue + continue token to paginate the subsequent data items + + */ + Continue *string + /*Fields + Set of fields to be presented in the response with values. The fields are comma separated. Eg: metadata.uid,metadata.name + + */ + Fields *string + /*Filters + Filters can be combined with AND, OR operators with field path name. Eg: metadata.name=TestServiceANDspec.cloudType=aws + + Server will be restricted to certain fields based on the indexed data for each resource. + + */ + Filters *string + /*Limit + limit is a maximum number of responses to return for a list call. Default and maximum value of the limit is 50. + If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. + + */ + Limit *int64 + /*Offset + offset is the next index number from which the response will start. The response offset value can be used along with continue token for the pagination. + + */ + Offset *int64 + /*OrderBy + Specify the fields with sort order. 1 indicates ascending and -1 for descending. Eg: orderBy=metadata.name=1,metadata.uid=-1 + + */ + OrderBy *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 roles list params +func (o *V1RolesListParams) WithTimeout(timeout time.Duration) *V1RolesListParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 roles list params +func (o *V1RolesListParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 roles list params +func (o *V1RolesListParams) WithContext(ctx context.Context) *V1RolesListParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 roles list params +func (o *V1RolesListParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 roles list params +func (o *V1RolesListParams) WithHTTPClient(client *http.Client) *V1RolesListParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 roles list params +func (o *V1RolesListParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithContinue adds the continueVar to the v1 roles list params +func (o *V1RolesListParams) WithContinue(continueVar *string) *V1RolesListParams { + o.SetContinue(continueVar) + return o +} + +// SetContinue adds the continue to the v1 roles list params +func (o *V1RolesListParams) SetContinue(continueVar *string) { + o.Continue = continueVar +} + +// WithFields adds the fields to the v1 roles list params +func (o *V1RolesListParams) WithFields(fields *string) *V1RolesListParams { + o.SetFields(fields) + return o +} + +// SetFields adds the fields to the v1 roles list params +func (o *V1RolesListParams) SetFields(fields *string) { + o.Fields = fields +} + +// WithFilters adds the filters to the v1 roles list params +func (o *V1RolesListParams) WithFilters(filters *string) *V1RolesListParams { + o.SetFilters(filters) + return o +} + +// SetFilters adds the filters to the v1 roles list params +func (o *V1RolesListParams) SetFilters(filters *string) { + o.Filters = filters +} + +// WithLimit adds the limit to the v1 roles list params +func (o *V1RolesListParams) WithLimit(limit *int64) *V1RolesListParams { + o.SetLimit(limit) + return o +} + +// SetLimit adds the limit to the v1 roles list params +func (o *V1RolesListParams) SetLimit(limit *int64) { + o.Limit = limit +} + +// WithOffset adds the offset to the v1 roles list params +func (o *V1RolesListParams) WithOffset(offset *int64) *V1RolesListParams { + o.SetOffset(offset) + return o +} + +// SetOffset adds the offset to the v1 roles list params +func (o *V1RolesListParams) SetOffset(offset *int64) { + o.Offset = offset +} + +// WithOrderBy adds the orderBy to the v1 roles list params +func (o *V1RolesListParams) WithOrderBy(orderBy *string) *V1RolesListParams { + o.SetOrderBy(orderBy) + return o +} + +// SetOrderBy adds the orderBy to the v1 roles list params +func (o *V1RolesListParams) SetOrderBy(orderBy *string) { + o.OrderBy = orderBy +} + +// WriteToRequest writes these params to a swagger request +func (o *V1RolesListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Continue != nil { + + // query param continue + var qrContinue string + if o.Continue != nil { + qrContinue = *o.Continue + } + qContinue := qrContinue + if qContinue != "" { + if err := r.SetQueryParam("continue", qContinue); err != nil { + return err + } + } + + } + + if o.Fields != nil { + + // query param fields + var qrFields string + if o.Fields != nil { + qrFields = *o.Fields + } + qFields := qrFields + if qFields != "" { + if err := r.SetQueryParam("fields", qFields); err != nil { + return err + } + } + + } + + if o.Filters != nil { + + // query param filters + var qrFilters string + if o.Filters != nil { + qrFilters = *o.Filters + } + qFilters := qrFilters + if qFilters != "" { + if err := r.SetQueryParam("filters", qFilters); err != nil { + return err + } + } + + } + + if o.Limit != nil { + + // query param limit + var qrLimit int64 + if o.Limit != nil { + qrLimit = *o.Limit + } + qLimit := swag.FormatInt64(qrLimit) + if qLimit != "" { + if err := r.SetQueryParam("limit", qLimit); err != nil { + return err + } + } + + } + + if o.Offset != nil { + + // query param offset + var qrOffset int64 + if o.Offset != nil { + qrOffset = *o.Offset + } + qOffset := swag.FormatInt64(qrOffset) + if qOffset != "" { + if err := r.SetQueryParam("offset", qOffset); err != nil { + return err + } + } + + } + + if o.OrderBy != nil { + + // query param orderBy + var qrOrderBy string + if o.OrderBy != nil { + qrOrderBy = *o.OrderBy + } + qOrderBy := qrOrderBy + if qOrderBy != "" { + if err := r.SetQueryParam("orderBy", qOrderBy); err != nil { + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_roles_list_responses.go b/api/client/v1/v1_roles_list_responses.go new file mode 100644 index 00000000..174cfaff --- /dev/null +++ b/api/client/v1/v1_roles_list_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1RolesListReader is a Reader for the V1RolesList structure. +type V1RolesListReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1RolesListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1RolesListOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1RolesListOK creates a V1RolesListOK with default headers values +func NewV1RolesListOK() *V1RolesListOK { + return &V1RolesListOK{} +} + +/* +V1RolesListOK handles this case with default header values. + +OK +*/ +type V1RolesListOK struct { + Payload *models.V1Roles +} + +func (o *V1RolesListOK) Error() string { + return fmt.Sprintf("[GET /v1/roles][%d] v1RolesListOK %+v", 200, o.Payload) +} + +func (o *V1RolesListOK) GetPayload() *models.V1Roles { + return o.Payload +} + +func (o *V1RolesListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1Roles) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_roles_uid_delete_parameters.go b/api/client/v1/v1_roles_uid_delete_parameters.go new file mode 100644 index 00000000..67f14d1d --- /dev/null +++ b/api/client/v1/v1_roles_uid_delete_parameters.go @@ -0,0 +1,133 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1RolesUIDDeleteParams creates a new V1RolesUIDDeleteParams object +// with the default values initialized. +func NewV1RolesUIDDeleteParams() *V1RolesUIDDeleteParams { + var () + return &V1RolesUIDDeleteParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1RolesUIDDeleteParamsWithTimeout creates a new V1RolesUIDDeleteParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1RolesUIDDeleteParamsWithTimeout(timeout time.Duration) *V1RolesUIDDeleteParams { + var () + return &V1RolesUIDDeleteParams{ + + timeout: timeout, + } +} + +// NewV1RolesUIDDeleteParamsWithContext creates a new V1RolesUIDDeleteParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1RolesUIDDeleteParamsWithContext(ctx context.Context) *V1RolesUIDDeleteParams { + var () + return &V1RolesUIDDeleteParams{ + + Context: ctx, + } +} + +// NewV1RolesUIDDeleteParamsWithHTTPClient creates a new V1RolesUIDDeleteParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1RolesUIDDeleteParamsWithHTTPClient(client *http.Client) *V1RolesUIDDeleteParams { + var () + return &V1RolesUIDDeleteParams{ + HTTPClient: client, + } +} + +/* +V1RolesUIDDeleteParams contains all the parameters to send to the API endpoint +for the v1 roles Uid delete operation typically these are written to a http.Request +*/ +type V1RolesUIDDeleteParams struct { + + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 roles Uid delete params +func (o *V1RolesUIDDeleteParams) WithTimeout(timeout time.Duration) *V1RolesUIDDeleteParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 roles Uid delete params +func (o *V1RolesUIDDeleteParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 roles Uid delete params +func (o *V1RolesUIDDeleteParams) WithContext(ctx context.Context) *V1RolesUIDDeleteParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 roles Uid delete params +func (o *V1RolesUIDDeleteParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 roles Uid delete params +func (o *V1RolesUIDDeleteParams) WithHTTPClient(client *http.Client) *V1RolesUIDDeleteParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 roles Uid delete params +func (o *V1RolesUIDDeleteParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithUID adds the uid to the v1 roles Uid delete params +func (o *V1RolesUIDDeleteParams) WithUID(uid string) *V1RolesUIDDeleteParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 roles Uid delete params +func (o *V1RolesUIDDeleteParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1RolesUIDDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_roles_uid_delete_responses.go b/api/client/v1/v1_roles_uid_delete_responses.go new file mode 100644 index 00000000..101f306f --- /dev/null +++ b/api/client/v1/v1_roles_uid_delete_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1RolesUIDDeleteReader is a Reader for the V1RolesUIDDelete structure. +type V1RolesUIDDeleteReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1RolesUIDDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1RolesUIDDeleteNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1RolesUIDDeleteNoContent creates a V1RolesUIDDeleteNoContent with default headers values +func NewV1RolesUIDDeleteNoContent() *V1RolesUIDDeleteNoContent { + return &V1RolesUIDDeleteNoContent{} +} + +/* +V1RolesUIDDeleteNoContent handles this case with default header values. + +The resource was deleted successfully +*/ +type V1RolesUIDDeleteNoContent struct { +} + +func (o *V1RolesUIDDeleteNoContent) Error() string { + return fmt.Sprintf("[DELETE /v1/roles/{uid}][%d] v1RolesUidDeleteNoContent ", 204) +} + +func (o *V1RolesUIDDeleteNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_roles_uid_get_parameters.go b/api/client/v1/v1_roles_uid_get_parameters.go new file mode 100644 index 00000000..f75bfee8 --- /dev/null +++ b/api/client/v1/v1_roles_uid_get_parameters.go @@ -0,0 +1,133 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1RolesUIDGetParams creates a new V1RolesUIDGetParams object +// with the default values initialized. +func NewV1RolesUIDGetParams() *V1RolesUIDGetParams { + var () + return &V1RolesUIDGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1RolesUIDGetParamsWithTimeout creates a new V1RolesUIDGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1RolesUIDGetParamsWithTimeout(timeout time.Duration) *V1RolesUIDGetParams { + var () + return &V1RolesUIDGetParams{ + + timeout: timeout, + } +} + +// NewV1RolesUIDGetParamsWithContext creates a new V1RolesUIDGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1RolesUIDGetParamsWithContext(ctx context.Context) *V1RolesUIDGetParams { + var () + return &V1RolesUIDGetParams{ + + Context: ctx, + } +} + +// NewV1RolesUIDGetParamsWithHTTPClient creates a new V1RolesUIDGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1RolesUIDGetParamsWithHTTPClient(client *http.Client) *V1RolesUIDGetParams { + var () + return &V1RolesUIDGetParams{ + HTTPClient: client, + } +} + +/* +V1RolesUIDGetParams contains all the parameters to send to the API endpoint +for the v1 roles Uid get operation typically these are written to a http.Request +*/ +type V1RolesUIDGetParams struct { + + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 roles Uid get params +func (o *V1RolesUIDGetParams) WithTimeout(timeout time.Duration) *V1RolesUIDGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 roles Uid get params +func (o *V1RolesUIDGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 roles Uid get params +func (o *V1RolesUIDGetParams) WithContext(ctx context.Context) *V1RolesUIDGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 roles Uid get params +func (o *V1RolesUIDGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 roles Uid get params +func (o *V1RolesUIDGetParams) WithHTTPClient(client *http.Client) *V1RolesUIDGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 roles Uid get params +func (o *V1RolesUIDGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithUID adds the uid to the v1 roles Uid get params +func (o *V1RolesUIDGetParams) WithUID(uid string) *V1RolesUIDGetParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 roles Uid get params +func (o *V1RolesUIDGetParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1RolesUIDGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_roles_uid_get_responses.go b/api/client/v1/v1_roles_uid_get_responses.go new file mode 100644 index 00000000..bb7bfb5e --- /dev/null +++ b/api/client/v1/v1_roles_uid_get_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1RolesUIDGetReader is a Reader for the V1RolesUIDGet structure. +type V1RolesUIDGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1RolesUIDGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1RolesUIDGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1RolesUIDGetOK creates a V1RolesUIDGetOK with default headers values +func NewV1RolesUIDGetOK() *V1RolesUIDGetOK { + return &V1RolesUIDGetOK{} +} + +/* +V1RolesUIDGetOK handles this case with default header values. + +OK +*/ +type V1RolesUIDGetOK struct { + Payload *models.V1Role +} + +func (o *V1RolesUIDGetOK) Error() string { + return fmt.Sprintf("[GET /v1/roles/{uid}][%d] v1RolesUidGetOK %+v", 200, o.Payload) +} + +func (o *V1RolesUIDGetOK) GetPayload() *models.V1Role { + return o.Payload +} + +func (o *V1RolesUIDGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1Role) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_roles_uid_update_parameters.go b/api/client/v1/v1_roles_uid_update_parameters.go new file mode 100644 index 00000000..746fd244 --- /dev/null +++ b/api/client/v1/v1_roles_uid_update_parameters.go @@ -0,0 +1,154 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1RolesUIDUpdateParams creates a new V1RolesUIDUpdateParams object +// with the default values initialized. +func NewV1RolesUIDUpdateParams() *V1RolesUIDUpdateParams { + var () + return &V1RolesUIDUpdateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1RolesUIDUpdateParamsWithTimeout creates a new V1RolesUIDUpdateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1RolesUIDUpdateParamsWithTimeout(timeout time.Duration) *V1RolesUIDUpdateParams { + var () + return &V1RolesUIDUpdateParams{ + + timeout: timeout, + } +} + +// NewV1RolesUIDUpdateParamsWithContext creates a new V1RolesUIDUpdateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1RolesUIDUpdateParamsWithContext(ctx context.Context) *V1RolesUIDUpdateParams { + var () + return &V1RolesUIDUpdateParams{ + + Context: ctx, + } +} + +// NewV1RolesUIDUpdateParamsWithHTTPClient creates a new V1RolesUIDUpdateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1RolesUIDUpdateParamsWithHTTPClient(client *http.Client) *V1RolesUIDUpdateParams { + var () + return &V1RolesUIDUpdateParams{ + HTTPClient: client, + } +} + +/* +V1RolesUIDUpdateParams contains all the parameters to send to the API endpoint +for the v1 roles Uid update operation typically these are written to a http.Request +*/ +type V1RolesUIDUpdateParams struct { + + /*Body*/ + Body *models.V1Role + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 roles Uid update params +func (o *V1RolesUIDUpdateParams) WithTimeout(timeout time.Duration) *V1RolesUIDUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 roles Uid update params +func (o *V1RolesUIDUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 roles Uid update params +func (o *V1RolesUIDUpdateParams) WithContext(ctx context.Context) *V1RolesUIDUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 roles Uid update params +func (o *V1RolesUIDUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 roles Uid update params +func (o *V1RolesUIDUpdateParams) WithHTTPClient(client *http.Client) *V1RolesUIDUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 roles Uid update params +func (o *V1RolesUIDUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 roles Uid update params +func (o *V1RolesUIDUpdateParams) WithBody(body *models.V1Role) *V1RolesUIDUpdateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 roles Uid update params +func (o *V1RolesUIDUpdateParams) SetBody(body *models.V1Role) { + o.Body = body +} + +// WithUID adds the uid to the v1 roles Uid update params +func (o *V1RolesUIDUpdateParams) WithUID(uid string) *V1RolesUIDUpdateParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 roles Uid update params +func (o *V1RolesUIDUpdateParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1RolesUIDUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_roles_uid_update_responses.go b/api/client/v1/v1_roles_uid_update_responses.go new file mode 100644 index 00000000..69e5c74d --- /dev/null +++ b/api/client/v1/v1_roles_uid_update_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1RolesUIDUpdateReader is a Reader for the V1RolesUIDUpdate structure. +type V1RolesUIDUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1RolesUIDUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1RolesUIDUpdateNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1RolesUIDUpdateNoContent creates a V1RolesUIDUpdateNoContent with default headers values +func NewV1RolesUIDUpdateNoContent() *V1RolesUIDUpdateNoContent { + return &V1RolesUIDUpdateNoContent{} +} + +/* +V1RolesUIDUpdateNoContent handles this case with default header values. + +The resource was updated successfully +*/ +type V1RolesUIDUpdateNoContent struct { +} + +func (o *V1RolesUIDUpdateNoContent) Error() string { + return fmt.Sprintf("[PUT /v1/roles/{uid}][%d] v1RolesUidUpdateNoContent ", 204) +} + +func (o *V1RolesUIDUpdateNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_saml_callback_parameters.go b/api/client/v1/v1_saml_callback_parameters.go new file mode 100644 index 00000000..f302f22c --- /dev/null +++ b/api/client/v1/v1_saml_callback_parameters.go @@ -0,0 +1,232 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1SamlCallbackParams creates a new V1SamlCallbackParams object +// with the default values initialized. +func NewV1SamlCallbackParams() *V1SamlCallbackParams { + var () + return &V1SamlCallbackParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1SamlCallbackParamsWithTimeout creates a new V1SamlCallbackParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1SamlCallbackParamsWithTimeout(timeout time.Duration) *V1SamlCallbackParams { + var () + return &V1SamlCallbackParams{ + + timeout: timeout, + } +} + +// NewV1SamlCallbackParamsWithContext creates a new V1SamlCallbackParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1SamlCallbackParamsWithContext(ctx context.Context) *V1SamlCallbackParams { + var () + return &V1SamlCallbackParams{ + + Context: ctx, + } +} + +// NewV1SamlCallbackParamsWithHTTPClient creates a new V1SamlCallbackParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1SamlCallbackParamsWithHTTPClient(client *http.Client) *V1SamlCallbackParams { + var () + return &V1SamlCallbackParams{ + HTTPClient: client, + } +} + +/* +V1SamlCallbackParams contains all the parameters to send to the API endpoint +for the v1 saml callback operation typically these are written to a http.Request +*/ +type V1SamlCallbackParams struct { + + /*RelayState + Describes a state to validate and associate request and response + + */ + RelayState *string + /*SAMLResponse + Describe the SAML compliant response sent by IDP which will be validated by Palette + + */ + SAMLResponse *string + /*AuthToken + Deprecated. + + */ + AuthToken *string + /*Org + Organization name + + */ + Org string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 saml callback params +func (o *V1SamlCallbackParams) WithTimeout(timeout time.Duration) *V1SamlCallbackParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 saml callback params +func (o *V1SamlCallbackParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 saml callback params +func (o *V1SamlCallbackParams) WithContext(ctx context.Context) *V1SamlCallbackParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 saml callback params +func (o *V1SamlCallbackParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 saml callback params +func (o *V1SamlCallbackParams) WithHTTPClient(client *http.Client) *V1SamlCallbackParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 saml callback params +func (o *V1SamlCallbackParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithRelayState adds the relayState to the v1 saml callback params +func (o *V1SamlCallbackParams) WithRelayState(relayState *string) *V1SamlCallbackParams { + o.SetRelayState(relayState) + return o +} + +// SetRelayState adds the relayState to the v1 saml callback params +func (o *V1SamlCallbackParams) SetRelayState(relayState *string) { + o.RelayState = relayState +} + +// WithSAMLResponse adds the sAMLResponse to the v1 saml callback params +func (o *V1SamlCallbackParams) WithSAMLResponse(sAMLResponse *string) *V1SamlCallbackParams { + o.SetSAMLResponse(sAMLResponse) + return o +} + +// SetSAMLResponse adds the sAMLResponse to the v1 saml callback params +func (o *V1SamlCallbackParams) SetSAMLResponse(sAMLResponse *string) { + o.SAMLResponse = sAMLResponse +} + +// WithAuthToken adds the authToken to the v1 saml callback params +func (o *V1SamlCallbackParams) WithAuthToken(authToken *string) *V1SamlCallbackParams { + o.SetAuthToken(authToken) + return o +} + +// SetAuthToken adds the authToken to the v1 saml callback params +func (o *V1SamlCallbackParams) SetAuthToken(authToken *string) { + o.AuthToken = authToken +} + +// WithOrg adds the org to the v1 saml callback params +func (o *V1SamlCallbackParams) WithOrg(org string) *V1SamlCallbackParams { + o.SetOrg(org) + return o +} + +// SetOrg adds the org to the v1 saml callback params +func (o *V1SamlCallbackParams) SetOrg(org string) { + o.Org = org +} + +// WriteToRequest writes these params to a swagger request +func (o *V1SamlCallbackParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.RelayState != nil { + + // form param RelayState + var frRelayState string + if o.RelayState != nil { + frRelayState = *o.RelayState + } + fRelayState := frRelayState + if fRelayState != "" { + if err := r.SetFormParam("RelayState", fRelayState); err != nil { + return err + } + } + + } + + if o.SAMLResponse != nil { + + // form param SAMLResponse + var frSAMLResponse string + if o.SAMLResponse != nil { + frSAMLResponse = *o.SAMLResponse + } + fSAMLResponse := frSAMLResponse + if fSAMLResponse != "" { + if err := r.SetFormParam("SAMLResponse", fSAMLResponse); err != nil { + return err + } + } + + } + + if o.AuthToken != nil { + + // query param authToken + var qrAuthToken string + if o.AuthToken != nil { + qrAuthToken = *o.AuthToken + } + qAuthToken := qrAuthToken + if qAuthToken != "" { + if err := r.SetQueryParam("authToken", qAuthToken); err != nil { + return err + } + } + + } + + // path param org + if err := r.SetPathParam("org", o.Org); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_saml_callback_responses.go b/api/client/v1/v1_saml_callback_responses.go new file mode 100644 index 00000000..c946eb4f --- /dev/null +++ b/api/client/v1/v1_saml_callback_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1SamlCallbackReader is a Reader for the V1SamlCallback structure. +type V1SamlCallbackReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1SamlCallbackReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1SamlCallbackOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1SamlCallbackOK creates a V1SamlCallbackOK with default headers values +func NewV1SamlCallbackOK() *V1SamlCallbackOK { + return &V1SamlCallbackOK{} +} + +/* +V1SamlCallbackOK handles this case with default header values. + +OK +*/ +type V1SamlCallbackOK struct { + Payload *models.V1UserToken +} + +func (o *V1SamlCallbackOK) Error() string { + return fmt.Sprintf("[POST /v1/auth/org/{org}/saml/callback][%d] v1SamlCallbackOK %+v", 200, o.Payload) +} + +func (o *V1SamlCallbackOK) GetPayload() *models.V1UserToken { + return o.Payload +} + +func (o *V1SamlCallbackOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1UserToken) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_saml_logout_parameters.go b/api/client/v1/v1_saml_logout_parameters.go new file mode 100644 index 00000000..77fc5f7c --- /dev/null +++ b/api/client/v1/v1_saml_logout_parameters.go @@ -0,0 +1,200 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1SamlLogoutParams creates a new V1SamlLogoutParams object +// with the default values initialized. +func NewV1SamlLogoutParams() *V1SamlLogoutParams { + var () + return &V1SamlLogoutParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1SamlLogoutParamsWithTimeout creates a new V1SamlLogoutParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1SamlLogoutParamsWithTimeout(timeout time.Duration) *V1SamlLogoutParams { + var () + return &V1SamlLogoutParams{ + + timeout: timeout, + } +} + +// NewV1SamlLogoutParamsWithContext creates a new V1SamlLogoutParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1SamlLogoutParamsWithContext(ctx context.Context) *V1SamlLogoutParams { + var () + return &V1SamlLogoutParams{ + + Context: ctx, + } +} + +// NewV1SamlLogoutParamsWithHTTPClient creates a new V1SamlLogoutParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1SamlLogoutParamsWithHTTPClient(client *http.Client) *V1SamlLogoutParams { + var () + return &V1SamlLogoutParams{ + HTTPClient: client, + } +} + +/* +V1SamlLogoutParams contains all the parameters to send to the API endpoint +for the v1 saml logout operation typically these are written to a http.Request +*/ +type V1SamlLogoutParams struct { + + /*SAMLResponse + Describe the SAML compliant response sent by IDP which will be validated by Palette to perform logout. + + */ + SAMLResponse *string + /*AuthToken + Deprecated. + + */ + AuthToken *string + /*Org + Organization name + + */ + Org string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 saml logout params +func (o *V1SamlLogoutParams) WithTimeout(timeout time.Duration) *V1SamlLogoutParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 saml logout params +func (o *V1SamlLogoutParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 saml logout params +func (o *V1SamlLogoutParams) WithContext(ctx context.Context) *V1SamlLogoutParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 saml logout params +func (o *V1SamlLogoutParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 saml logout params +func (o *V1SamlLogoutParams) WithHTTPClient(client *http.Client) *V1SamlLogoutParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 saml logout params +func (o *V1SamlLogoutParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithSAMLResponse adds the sAMLResponse to the v1 saml logout params +func (o *V1SamlLogoutParams) WithSAMLResponse(sAMLResponse *string) *V1SamlLogoutParams { + o.SetSAMLResponse(sAMLResponse) + return o +} + +// SetSAMLResponse adds the sAMLResponse to the v1 saml logout params +func (o *V1SamlLogoutParams) SetSAMLResponse(sAMLResponse *string) { + o.SAMLResponse = sAMLResponse +} + +// WithAuthToken adds the authToken to the v1 saml logout params +func (o *V1SamlLogoutParams) WithAuthToken(authToken *string) *V1SamlLogoutParams { + o.SetAuthToken(authToken) + return o +} + +// SetAuthToken adds the authToken to the v1 saml logout params +func (o *V1SamlLogoutParams) SetAuthToken(authToken *string) { + o.AuthToken = authToken +} + +// WithOrg adds the org to the v1 saml logout params +func (o *V1SamlLogoutParams) WithOrg(org string) *V1SamlLogoutParams { + o.SetOrg(org) + return o +} + +// SetOrg adds the org to the v1 saml logout params +func (o *V1SamlLogoutParams) SetOrg(org string) { + o.Org = org +} + +// WriteToRequest writes these params to a swagger request +func (o *V1SamlLogoutParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.SAMLResponse != nil { + + // form param SAMLResponse + var frSAMLResponse string + if o.SAMLResponse != nil { + frSAMLResponse = *o.SAMLResponse + } + fSAMLResponse := frSAMLResponse + if fSAMLResponse != "" { + if err := r.SetFormParam("SAMLResponse", fSAMLResponse); err != nil { + return err + } + } + + } + + if o.AuthToken != nil { + + // query param authToken + var qrAuthToken string + if o.AuthToken != nil { + qrAuthToken = *o.AuthToken + } + qAuthToken := qrAuthToken + if qAuthToken != "" { + if err := r.SetQueryParam("authToken", qAuthToken); err != nil { + return err + } + } + + } + + // path param org + if err := r.SetPathParam("org", o.Org); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_saml_logout_responses.go b/api/client/v1/v1_saml_logout_responses.go new file mode 100644 index 00000000..2b23f3b4 --- /dev/null +++ b/api/client/v1/v1_saml_logout_responses.go @@ -0,0 +1,61 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1SamlLogoutReader is a Reader for the V1SamlLogout structure. +type V1SamlLogoutReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1SamlLogoutReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1SamlLogoutNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1SamlLogoutNoContent creates a V1SamlLogoutNoContent with default headers values +func NewV1SamlLogoutNoContent() *V1SamlLogoutNoContent { + return &V1SamlLogoutNoContent{} +} + +/* +V1SamlLogoutNoContent handles this case with default header values. + +Ok response without content +*/ +type V1SamlLogoutNoContent struct { + /*Audit uid for the request + */ + AuditUID string +} + +func (o *V1SamlLogoutNoContent) Error() string { + return fmt.Sprintf("[POST /v1/auth/org/{org}/saml/logout][%d] v1SamlLogoutNoContent ", 204) +} + +func (o *V1SamlLogoutNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header AuditUid + o.AuditUID = response.GetHeader("AuditUid") + + return nil +} diff --git a/api/client/v1/v1_service_manifest_get_parameters.go b/api/client/v1/v1_service_manifest_get_parameters.go new file mode 100644 index 00000000..ea883a61 --- /dev/null +++ b/api/client/v1/v1_service_manifest_get_parameters.go @@ -0,0 +1,278 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1ServiceManifestGetParams creates a new V1ServiceManifestGetParams object +// with the default values initialized. +func NewV1ServiceManifestGetParams() *V1ServiceManifestGetParams { + var () + return &V1ServiceManifestGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1ServiceManifestGetParamsWithTimeout creates a new V1ServiceManifestGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1ServiceManifestGetParamsWithTimeout(timeout time.Duration) *V1ServiceManifestGetParams { + var () + return &V1ServiceManifestGetParams{ + + timeout: timeout, + } +} + +// NewV1ServiceManifestGetParamsWithContext creates a new V1ServiceManifestGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1ServiceManifestGetParamsWithContext(ctx context.Context) *V1ServiceManifestGetParams { + var () + return &V1ServiceManifestGetParams{ + + Context: ctx, + } +} + +// NewV1ServiceManifestGetParamsWithHTTPClient creates a new V1ServiceManifestGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1ServiceManifestGetParamsWithHTTPClient(client *http.Client) *V1ServiceManifestGetParams { + var () + return &V1ServiceManifestGetParams{ + HTTPClient: client, + } +} + +/* +V1ServiceManifestGetParams contains all the parameters to send to the API endpoint +for the v1 service manifest get operation typically these are written to a http.Request +*/ +type V1ServiceManifestGetParams struct { + + /*Action + action type + + */ + Action string + /*ClusterUID + spectro cluster uid + + */ + ClusterUID *string + /*EdgeHostUID + edge host uid + + */ + EdgeHostUID *string + /*ResourceFilename + resource file name + + */ + ResourceFilename *string + /*ServiceName + service name + + */ + ServiceName string + /*Version + service version + + */ + Version string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 service manifest get params +func (o *V1ServiceManifestGetParams) WithTimeout(timeout time.Duration) *V1ServiceManifestGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 service manifest get params +func (o *V1ServiceManifestGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 service manifest get params +func (o *V1ServiceManifestGetParams) WithContext(ctx context.Context) *V1ServiceManifestGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 service manifest get params +func (o *V1ServiceManifestGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 service manifest get params +func (o *V1ServiceManifestGetParams) WithHTTPClient(client *http.Client) *V1ServiceManifestGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 service manifest get params +func (o *V1ServiceManifestGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithAction adds the action to the v1 service manifest get params +func (o *V1ServiceManifestGetParams) WithAction(action string) *V1ServiceManifestGetParams { + o.SetAction(action) + return o +} + +// SetAction adds the action to the v1 service manifest get params +func (o *V1ServiceManifestGetParams) SetAction(action string) { + o.Action = action +} + +// WithClusterUID adds the clusterUID to the v1 service manifest get params +func (o *V1ServiceManifestGetParams) WithClusterUID(clusterUID *string) *V1ServiceManifestGetParams { + o.SetClusterUID(clusterUID) + return o +} + +// SetClusterUID adds the clusterUid to the v1 service manifest get params +func (o *V1ServiceManifestGetParams) SetClusterUID(clusterUID *string) { + o.ClusterUID = clusterUID +} + +// WithEdgeHostUID adds the edgeHostUID to the v1 service manifest get params +func (o *V1ServiceManifestGetParams) WithEdgeHostUID(edgeHostUID *string) *V1ServiceManifestGetParams { + o.SetEdgeHostUID(edgeHostUID) + return o +} + +// SetEdgeHostUID adds the edgeHostUid to the v1 service manifest get params +func (o *V1ServiceManifestGetParams) SetEdgeHostUID(edgeHostUID *string) { + o.EdgeHostUID = edgeHostUID +} + +// WithResourceFilename adds the resourceFilename to the v1 service manifest get params +func (o *V1ServiceManifestGetParams) WithResourceFilename(resourceFilename *string) *V1ServiceManifestGetParams { + o.SetResourceFilename(resourceFilename) + return o +} + +// SetResourceFilename adds the resourceFilename to the v1 service manifest get params +func (o *V1ServiceManifestGetParams) SetResourceFilename(resourceFilename *string) { + o.ResourceFilename = resourceFilename +} + +// WithServiceName adds the serviceName to the v1 service manifest get params +func (o *V1ServiceManifestGetParams) WithServiceName(serviceName string) *V1ServiceManifestGetParams { + o.SetServiceName(serviceName) + return o +} + +// SetServiceName adds the serviceName to the v1 service manifest get params +func (o *V1ServiceManifestGetParams) SetServiceName(serviceName string) { + o.ServiceName = serviceName +} + +// WithVersion adds the version to the v1 service manifest get params +func (o *V1ServiceManifestGetParams) WithVersion(version string) *V1ServiceManifestGetParams { + o.SetVersion(version) + return o +} + +// SetVersion adds the version to the v1 service manifest get params +func (o *V1ServiceManifestGetParams) SetVersion(version string) { + o.Version = version +} + +// WriteToRequest writes these params to a swagger request +func (o *V1ServiceManifestGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // query param action + qrAction := o.Action + qAction := qrAction + if qAction != "" { + if err := r.SetQueryParam("action", qAction); err != nil { + return err + } + } + + if o.ClusterUID != nil { + + // query param clusterUid + var qrClusterUID string + if o.ClusterUID != nil { + qrClusterUID = *o.ClusterUID + } + qClusterUID := qrClusterUID + if qClusterUID != "" { + if err := r.SetQueryParam("clusterUid", qClusterUID); err != nil { + return err + } + } + + } + + if o.EdgeHostUID != nil { + + // query param edgeHostUid + var qrEdgeHostUID string + if o.EdgeHostUID != nil { + qrEdgeHostUID = *o.EdgeHostUID + } + qEdgeHostUID := qrEdgeHostUID + if qEdgeHostUID != "" { + if err := r.SetQueryParam("edgeHostUid", qEdgeHostUID); err != nil { + return err + } + } + + } + + if o.ResourceFilename != nil { + + // query param resourceFilename + var qrResourceFilename string + if o.ResourceFilename != nil { + qrResourceFilename = *o.ResourceFilename + } + qResourceFilename := qrResourceFilename + if qResourceFilename != "" { + if err := r.SetQueryParam("resourceFilename", qResourceFilename); err != nil { + return err + } + } + + } + + // path param serviceName + if err := r.SetPathParam("serviceName", o.ServiceName); err != nil { + return err + } + + // path param version + if err := r.SetPathParam("version", o.Version); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_service_manifest_get_responses.go b/api/client/v1/v1_service_manifest_get_responses.go new file mode 100644 index 00000000..64272e16 --- /dev/null +++ b/api/client/v1/v1_service_manifest_get_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1ServiceManifestGetReader is a Reader for the V1ServiceManifestGet structure. +type V1ServiceManifestGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1ServiceManifestGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1ServiceManifestGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1ServiceManifestGetOK creates a V1ServiceManifestGetOK with default headers values +func NewV1ServiceManifestGetOK() *V1ServiceManifestGetOK { + return &V1ServiceManifestGetOK{} +} + +/* +V1ServiceManifestGetOK handles this case with default header values. + +OK +*/ +type V1ServiceManifestGetOK struct { + Payload *models.V1ServiceManifest +} + +func (o *V1ServiceManifestGetOK) Error() string { + return fmt.Sprintf("[GET /v1/services/{serviceName}/versions/{version}/manifest][%d] v1ServiceManifestGetOK %+v", 200, o.Payload) +} + +func (o *V1ServiceManifestGetOK) GetPayload() *models.V1ServiceManifest { + return o.Payload +} + +func (o *V1ServiceManifestGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1ServiceManifest) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_service_version_get_parameters.go b/api/client/v1/v1_service_version_get_parameters.go new file mode 100644 index 00000000..513f989f --- /dev/null +++ b/api/client/v1/v1_service_version_get_parameters.go @@ -0,0 +1,200 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1ServiceVersionGetParams creates a new V1ServiceVersionGetParams object +// with the default values initialized. +func NewV1ServiceVersionGetParams() *V1ServiceVersionGetParams { + var () + return &V1ServiceVersionGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1ServiceVersionGetParamsWithTimeout creates a new V1ServiceVersionGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1ServiceVersionGetParamsWithTimeout(timeout time.Duration) *V1ServiceVersionGetParams { + var () + return &V1ServiceVersionGetParams{ + + timeout: timeout, + } +} + +// NewV1ServiceVersionGetParamsWithContext creates a new V1ServiceVersionGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1ServiceVersionGetParamsWithContext(ctx context.Context) *V1ServiceVersionGetParams { + var () + return &V1ServiceVersionGetParams{ + + Context: ctx, + } +} + +// NewV1ServiceVersionGetParamsWithHTTPClient creates a new V1ServiceVersionGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1ServiceVersionGetParamsWithHTTPClient(client *http.Client) *V1ServiceVersionGetParams { + var () + return &V1ServiceVersionGetParams{ + HTTPClient: client, + } +} + +/* +V1ServiceVersionGetParams contains all the parameters to send to the API endpoint +for the v1 service version get operation typically these are written to a http.Request +*/ +type V1ServiceVersionGetParams struct { + + /*ClusterUID + spectro cluster uid + + */ + ClusterUID *string + /*EdgeHostUID + edge host uid + + */ + EdgeHostUID *string + /*ServiceName + service name + + */ + ServiceName string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 service version get params +func (o *V1ServiceVersionGetParams) WithTimeout(timeout time.Duration) *V1ServiceVersionGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 service version get params +func (o *V1ServiceVersionGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 service version get params +func (o *V1ServiceVersionGetParams) WithContext(ctx context.Context) *V1ServiceVersionGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 service version get params +func (o *V1ServiceVersionGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 service version get params +func (o *V1ServiceVersionGetParams) WithHTTPClient(client *http.Client) *V1ServiceVersionGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 service version get params +func (o *V1ServiceVersionGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithClusterUID adds the clusterUID to the v1 service version get params +func (o *V1ServiceVersionGetParams) WithClusterUID(clusterUID *string) *V1ServiceVersionGetParams { + o.SetClusterUID(clusterUID) + return o +} + +// SetClusterUID adds the clusterUid to the v1 service version get params +func (o *V1ServiceVersionGetParams) SetClusterUID(clusterUID *string) { + o.ClusterUID = clusterUID +} + +// WithEdgeHostUID adds the edgeHostUID to the v1 service version get params +func (o *V1ServiceVersionGetParams) WithEdgeHostUID(edgeHostUID *string) *V1ServiceVersionGetParams { + o.SetEdgeHostUID(edgeHostUID) + return o +} + +// SetEdgeHostUID adds the edgeHostUid to the v1 service version get params +func (o *V1ServiceVersionGetParams) SetEdgeHostUID(edgeHostUID *string) { + o.EdgeHostUID = edgeHostUID +} + +// WithServiceName adds the serviceName to the v1 service version get params +func (o *V1ServiceVersionGetParams) WithServiceName(serviceName string) *V1ServiceVersionGetParams { + o.SetServiceName(serviceName) + return o +} + +// SetServiceName adds the serviceName to the v1 service version get params +func (o *V1ServiceVersionGetParams) SetServiceName(serviceName string) { + o.ServiceName = serviceName +} + +// WriteToRequest writes these params to a swagger request +func (o *V1ServiceVersionGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.ClusterUID != nil { + + // query param clusterUid + var qrClusterUID string + if o.ClusterUID != nil { + qrClusterUID = *o.ClusterUID + } + qClusterUID := qrClusterUID + if qClusterUID != "" { + if err := r.SetQueryParam("clusterUid", qClusterUID); err != nil { + return err + } + } + + } + + if o.EdgeHostUID != nil { + + // query param edgeHostUid + var qrEdgeHostUID string + if o.EdgeHostUID != nil { + qrEdgeHostUID = *o.EdgeHostUID + } + qEdgeHostUID := qrEdgeHostUID + if qEdgeHostUID != "" { + if err := r.SetQueryParam("edgeHostUid", qEdgeHostUID); err != nil { + return err + } + } + + } + + // path param serviceName + if err := r.SetPathParam("serviceName", o.ServiceName); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_service_version_get_responses.go b/api/client/v1/v1_service_version_get_responses.go new file mode 100644 index 00000000..9eb920e3 --- /dev/null +++ b/api/client/v1/v1_service_version_get_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1ServiceVersionGetReader is a Reader for the V1ServiceVersionGet structure. +type V1ServiceVersionGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1ServiceVersionGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1ServiceVersionGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1ServiceVersionGetOK creates a V1ServiceVersionGetOK with default headers values +func NewV1ServiceVersionGetOK() *V1ServiceVersionGetOK { + return &V1ServiceVersionGetOK{} +} + +/* +V1ServiceVersionGetOK handles this case with default header values. + +OK +*/ +type V1ServiceVersionGetOK struct { + Payload *models.V1ServiceVersion +} + +func (o *V1ServiceVersionGetOK) Error() string { + return fmt.Sprintf("[GET /v1/services/{serviceName}/version][%d] v1ServiceVersionGetOK %+v", 200, o.Payload) +} + +func (o *V1ServiceVersionGetOK) GetPayload() *models.V1ServiceVersion { + return o.Payload +} + +func (o *V1ServiceVersionGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1ServiceVersion) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_agents_notify_parameters.go b/api/client/v1/v1_spectro_clusters_agents_notify_parameters.go new file mode 100644 index 00000000..47f5bd82 --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_agents_notify_parameters.go @@ -0,0 +1,154 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1SpectroClustersAgentsNotifyParams creates a new V1SpectroClustersAgentsNotifyParams object +// with the default values initialized. +func NewV1SpectroClustersAgentsNotifyParams() *V1SpectroClustersAgentsNotifyParams { + var () + return &V1SpectroClustersAgentsNotifyParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1SpectroClustersAgentsNotifyParamsWithTimeout creates a new V1SpectroClustersAgentsNotifyParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1SpectroClustersAgentsNotifyParamsWithTimeout(timeout time.Duration) *V1SpectroClustersAgentsNotifyParams { + var () + return &V1SpectroClustersAgentsNotifyParams{ + + timeout: timeout, + } +} + +// NewV1SpectroClustersAgentsNotifyParamsWithContext creates a new V1SpectroClustersAgentsNotifyParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1SpectroClustersAgentsNotifyParamsWithContext(ctx context.Context) *V1SpectroClustersAgentsNotifyParams { + var () + return &V1SpectroClustersAgentsNotifyParams{ + + Context: ctx, + } +} + +// NewV1SpectroClustersAgentsNotifyParamsWithHTTPClient creates a new V1SpectroClustersAgentsNotifyParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1SpectroClustersAgentsNotifyParamsWithHTTPClient(client *http.Client) *V1SpectroClustersAgentsNotifyParams { + var () + return &V1SpectroClustersAgentsNotifyParams{ + HTTPClient: client, + } +} + +/* +V1SpectroClustersAgentsNotifyParams contains all the parameters to send to the API endpoint +for the v1 spectro clusters agents notify operation typically these are written to a http.Request +*/ +type V1SpectroClustersAgentsNotifyParams struct { + + /*Body*/ + Body *models.V1SpectroClustersAgentsNotifyEntity + /*MessageKey*/ + MessageKey string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 spectro clusters agents notify params +func (o *V1SpectroClustersAgentsNotifyParams) WithTimeout(timeout time.Duration) *V1SpectroClustersAgentsNotifyParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 spectro clusters agents notify params +func (o *V1SpectroClustersAgentsNotifyParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 spectro clusters agents notify params +func (o *V1SpectroClustersAgentsNotifyParams) WithContext(ctx context.Context) *V1SpectroClustersAgentsNotifyParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 spectro clusters agents notify params +func (o *V1SpectroClustersAgentsNotifyParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 spectro clusters agents notify params +func (o *V1SpectroClustersAgentsNotifyParams) WithHTTPClient(client *http.Client) *V1SpectroClustersAgentsNotifyParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 spectro clusters agents notify params +func (o *V1SpectroClustersAgentsNotifyParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 spectro clusters agents notify params +func (o *V1SpectroClustersAgentsNotifyParams) WithBody(body *models.V1SpectroClustersAgentsNotifyEntity) *V1SpectroClustersAgentsNotifyParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 spectro clusters agents notify params +func (o *V1SpectroClustersAgentsNotifyParams) SetBody(body *models.V1SpectroClustersAgentsNotifyEntity) { + o.Body = body +} + +// WithMessageKey adds the messageKey to the v1 spectro clusters agents notify params +func (o *V1SpectroClustersAgentsNotifyParams) WithMessageKey(messageKey string) *V1SpectroClustersAgentsNotifyParams { + o.SetMessageKey(messageKey) + return o +} + +// SetMessageKey adds the messageKey to the v1 spectro clusters agents notify params +func (o *V1SpectroClustersAgentsNotifyParams) SetMessageKey(messageKey string) { + o.MessageKey = messageKey +} + +// WriteToRequest writes these params to a swagger request +func (o *V1SpectroClustersAgentsNotifyParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param messageKey + if err := r.SetPathParam("messageKey", o.MessageKey); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_agents_notify_responses.go b/api/client/v1/v1_spectro_clusters_agents_notify_responses.go new file mode 100644 index 00000000..a11c77dc --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_agents_notify_responses.go @@ -0,0 +1,61 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1SpectroClustersAgentsNotifyReader is a Reader for the V1SpectroClustersAgentsNotify structure. +type V1SpectroClustersAgentsNotifyReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1SpectroClustersAgentsNotifyReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1SpectroClustersAgentsNotifyNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1SpectroClustersAgentsNotifyNoContent creates a V1SpectroClustersAgentsNotifyNoContent with default headers values +func NewV1SpectroClustersAgentsNotifyNoContent() *V1SpectroClustersAgentsNotifyNoContent { + return &V1SpectroClustersAgentsNotifyNoContent{} +} + +/* +V1SpectroClustersAgentsNotifyNoContent handles this case with default header values. + +Ok response without content +*/ +type V1SpectroClustersAgentsNotifyNoContent struct { + /*Audit uid for the request + */ + AuditUID string +} + +func (o *V1SpectroClustersAgentsNotifyNoContent) Error() string { + return fmt.Sprintf("[POST /v1/spectroclusters/agents/{messageKey}/notify][%d] v1SpectroClustersAgentsNotifyNoContent ", 204) +} + +func (o *V1SpectroClustersAgentsNotifyNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header AuditUid + o.AuditUID = response.GetHeader("AuditUid") + + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_aks_create_parameters.go b/api/client/v1/v1_spectro_clusters_aks_create_parameters.go new file mode 100644 index 00000000..5a2921d5 --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_aks_create_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1SpectroClustersAksCreateParams creates a new V1SpectroClustersAksCreateParams object +// with the default values initialized. +func NewV1SpectroClustersAksCreateParams() *V1SpectroClustersAksCreateParams { + var () + return &V1SpectroClustersAksCreateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1SpectroClustersAksCreateParamsWithTimeout creates a new V1SpectroClustersAksCreateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1SpectroClustersAksCreateParamsWithTimeout(timeout time.Duration) *V1SpectroClustersAksCreateParams { + var () + return &V1SpectroClustersAksCreateParams{ + + timeout: timeout, + } +} + +// NewV1SpectroClustersAksCreateParamsWithContext creates a new V1SpectroClustersAksCreateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1SpectroClustersAksCreateParamsWithContext(ctx context.Context) *V1SpectroClustersAksCreateParams { + var () + return &V1SpectroClustersAksCreateParams{ + + Context: ctx, + } +} + +// NewV1SpectroClustersAksCreateParamsWithHTTPClient creates a new V1SpectroClustersAksCreateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1SpectroClustersAksCreateParamsWithHTTPClient(client *http.Client) *V1SpectroClustersAksCreateParams { + var () + return &V1SpectroClustersAksCreateParams{ + HTTPClient: client, + } +} + +/* +V1SpectroClustersAksCreateParams contains all the parameters to send to the API endpoint +for the v1 spectro clusters aks create operation typically these are written to a http.Request +*/ +type V1SpectroClustersAksCreateParams struct { + + /*Body*/ + Body *models.V1SpectroAzureClusterEntity + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 spectro clusters aks create params +func (o *V1SpectroClustersAksCreateParams) WithTimeout(timeout time.Duration) *V1SpectroClustersAksCreateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 spectro clusters aks create params +func (o *V1SpectroClustersAksCreateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 spectro clusters aks create params +func (o *V1SpectroClustersAksCreateParams) WithContext(ctx context.Context) *V1SpectroClustersAksCreateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 spectro clusters aks create params +func (o *V1SpectroClustersAksCreateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 spectro clusters aks create params +func (o *V1SpectroClustersAksCreateParams) WithHTTPClient(client *http.Client) *V1SpectroClustersAksCreateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 spectro clusters aks create params +func (o *V1SpectroClustersAksCreateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 spectro clusters aks create params +func (o *V1SpectroClustersAksCreateParams) WithBody(body *models.V1SpectroAzureClusterEntity) *V1SpectroClustersAksCreateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 spectro clusters aks create params +func (o *V1SpectroClustersAksCreateParams) SetBody(body *models.V1SpectroAzureClusterEntity) { + o.Body = body +} + +// WriteToRequest writes these params to a swagger request +func (o *V1SpectroClustersAksCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_aks_create_responses.go b/api/client/v1/v1_spectro_clusters_aks_create_responses.go new file mode 100644 index 00000000..284d65dd --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_aks_create_responses.go @@ -0,0 +1,77 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1SpectroClustersAksCreateReader is a Reader for the V1SpectroClustersAksCreate structure. +type V1SpectroClustersAksCreateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1SpectroClustersAksCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 201: + result := NewV1SpectroClustersAksCreateCreated() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1SpectroClustersAksCreateCreated creates a V1SpectroClustersAksCreateCreated with default headers values +func NewV1SpectroClustersAksCreateCreated() *V1SpectroClustersAksCreateCreated { + return &V1SpectroClustersAksCreateCreated{} +} + +/* +V1SpectroClustersAksCreateCreated handles this case with default header values. + +Created successfully +*/ +type V1SpectroClustersAksCreateCreated struct { + /*Audit uid for the request + */ + AuditUID string + + Payload *models.V1UID +} + +func (o *V1SpectroClustersAksCreateCreated) Error() string { + return fmt.Sprintf("[POST /v1/spectroclusters/aks][%d] v1SpectroClustersAksCreateCreated %+v", 201, o.Payload) +} + +func (o *V1SpectroClustersAksCreateCreated) GetPayload() *models.V1UID { + return o.Payload +} + +func (o *V1SpectroClustersAksCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header AuditUid + o.AuditUID = response.GetHeader("AuditUid") + + o.Payload = new(models.V1UID) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_aks_rate_parameters.go b/api/client/v1/v1_spectro_clusters_aks_rate_parameters.go new file mode 100644 index 00000000..125dd168 --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_aks_rate_parameters.go @@ -0,0 +1,177 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1SpectroClustersAksRateParams creates a new V1SpectroClustersAksRateParams object +// with the default values initialized. +func NewV1SpectroClustersAksRateParams() *V1SpectroClustersAksRateParams { + var ( + periodTypeDefault = string("hourly") + ) + return &V1SpectroClustersAksRateParams{ + PeriodType: &periodTypeDefault, + + timeout: cr.DefaultTimeout, + } +} + +// NewV1SpectroClustersAksRateParamsWithTimeout creates a new V1SpectroClustersAksRateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1SpectroClustersAksRateParamsWithTimeout(timeout time.Duration) *V1SpectroClustersAksRateParams { + var ( + periodTypeDefault = string("hourly") + ) + return &V1SpectroClustersAksRateParams{ + PeriodType: &periodTypeDefault, + + timeout: timeout, + } +} + +// NewV1SpectroClustersAksRateParamsWithContext creates a new V1SpectroClustersAksRateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1SpectroClustersAksRateParamsWithContext(ctx context.Context) *V1SpectroClustersAksRateParams { + var ( + periodTypeDefault = string("hourly") + ) + return &V1SpectroClustersAksRateParams{ + PeriodType: &periodTypeDefault, + + Context: ctx, + } +} + +// NewV1SpectroClustersAksRateParamsWithHTTPClient creates a new V1SpectroClustersAksRateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1SpectroClustersAksRateParamsWithHTTPClient(client *http.Client) *V1SpectroClustersAksRateParams { + var ( + periodTypeDefault = string("hourly") + ) + return &V1SpectroClustersAksRateParams{ + PeriodType: &periodTypeDefault, + HTTPClient: client, + } +} + +/* +V1SpectroClustersAksRateParams contains all the parameters to send to the API endpoint +for the v1 spectro clusters aks rate operation typically these are written to a http.Request +*/ +type V1SpectroClustersAksRateParams struct { + + /*Body*/ + Body *models.V1SpectroAzureClusterRateEntity + /*PeriodType*/ + PeriodType *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 spectro clusters aks rate params +func (o *V1SpectroClustersAksRateParams) WithTimeout(timeout time.Duration) *V1SpectroClustersAksRateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 spectro clusters aks rate params +func (o *V1SpectroClustersAksRateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 spectro clusters aks rate params +func (o *V1SpectroClustersAksRateParams) WithContext(ctx context.Context) *V1SpectroClustersAksRateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 spectro clusters aks rate params +func (o *V1SpectroClustersAksRateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 spectro clusters aks rate params +func (o *V1SpectroClustersAksRateParams) WithHTTPClient(client *http.Client) *V1SpectroClustersAksRateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 spectro clusters aks rate params +func (o *V1SpectroClustersAksRateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 spectro clusters aks rate params +func (o *V1SpectroClustersAksRateParams) WithBody(body *models.V1SpectroAzureClusterRateEntity) *V1SpectroClustersAksRateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 spectro clusters aks rate params +func (o *V1SpectroClustersAksRateParams) SetBody(body *models.V1SpectroAzureClusterRateEntity) { + o.Body = body +} + +// WithPeriodType adds the periodType to the v1 spectro clusters aks rate params +func (o *V1SpectroClustersAksRateParams) WithPeriodType(periodType *string) *V1SpectroClustersAksRateParams { + o.SetPeriodType(periodType) + return o +} + +// SetPeriodType adds the periodType to the v1 spectro clusters aks rate params +func (o *V1SpectroClustersAksRateParams) SetPeriodType(periodType *string) { + o.PeriodType = periodType +} + +// WriteToRequest writes these params to a swagger request +func (o *V1SpectroClustersAksRateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + if o.PeriodType != nil { + + // query param periodType + var qrPeriodType string + if o.PeriodType != nil { + qrPeriodType = *o.PeriodType + } + qPeriodType := qrPeriodType + if qPeriodType != "" { + if err := r.SetQueryParam("periodType", qPeriodType); err != nil { + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_aks_rate_responses.go b/api/client/v1/v1_spectro_clusters_aks_rate_responses.go new file mode 100644 index 00000000..62772cfa --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_aks_rate_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1SpectroClustersAksRateReader is a Reader for the V1SpectroClustersAksRate structure. +type V1SpectroClustersAksRateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1SpectroClustersAksRateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1SpectroClustersAksRateOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1SpectroClustersAksRateOK creates a V1SpectroClustersAksRateOK with default headers values +func NewV1SpectroClustersAksRateOK() *V1SpectroClustersAksRateOK { + return &V1SpectroClustersAksRateOK{} +} + +/* +V1SpectroClustersAksRateOK handles this case with default header values. + +Aks Cluster estimated rate response +*/ +type V1SpectroClustersAksRateOK struct { + Payload *models.V1SpectroClusterRate +} + +func (o *V1SpectroClustersAksRateOK) Error() string { + return fmt.Sprintf("[POST /v1/spectroclusters/aks/rate][%d] v1SpectroClustersAksRateOK %+v", 200, o.Payload) +} + +func (o *V1SpectroClustersAksRateOK) GetPayload() *models.V1SpectroClusterRate { + return o.Payload +} + +func (o *V1SpectroClustersAksRateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1SpectroClusterRate) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_aks_validate_parameters.go b/api/client/v1/v1_spectro_clusters_aks_validate_parameters.go new file mode 100644 index 00000000..c04eb2db --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_aks_validate_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1SpectroClustersAksValidateParams creates a new V1SpectroClustersAksValidateParams object +// with the default values initialized. +func NewV1SpectroClustersAksValidateParams() *V1SpectroClustersAksValidateParams { + var () + return &V1SpectroClustersAksValidateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1SpectroClustersAksValidateParamsWithTimeout creates a new V1SpectroClustersAksValidateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1SpectroClustersAksValidateParamsWithTimeout(timeout time.Duration) *V1SpectroClustersAksValidateParams { + var () + return &V1SpectroClustersAksValidateParams{ + + timeout: timeout, + } +} + +// NewV1SpectroClustersAksValidateParamsWithContext creates a new V1SpectroClustersAksValidateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1SpectroClustersAksValidateParamsWithContext(ctx context.Context) *V1SpectroClustersAksValidateParams { + var () + return &V1SpectroClustersAksValidateParams{ + + Context: ctx, + } +} + +// NewV1SpectroClustersAksValidateParamsWithHTTPClient creates a new V1SpectroClustersAksValidateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1SpectroClustersAksValidateParamsWithHTTPClient(client *http.Client) *V1SpectroClustersAksValidateParams { + var () + return &V1SpectroClustersAksValidateParams{ + HTTPClient: client, + } +} + +/* +V1SpectroClustersAksValidateParams contains all the parameters to send to the API endpoint +for the v1 spectro clusters aks validate operation typically these are written to a http.Request +*/ +type V1SpectroClustersAksValidateParams struct { + + /*Body*/ + Body *models.V1SpectroAzureClusterEntity + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 spectro clusters aks validate params +func (o *V1SpectroClustersAksValidateParams) WithTimeout(timeout time.Duration) *V1SpectroClustersAksValidateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 spectro clusters aks validate params +func (o *V1SpectroClustersAksValidateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 spectro clusters aks validate params +func (o *V1SpectroClustersAksValidateParams) WithContext(ctx context.Context) *V1SpectroClustersAksValidateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 spectro clusters aks validate params +func (o *V1SpectroClustersAksValidateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 spectro clusters aks validate params +func (o *V1SpectroClustersAksValidateParams) WithHTTPClient(client *http.Client) *V1SpectroClustersAksValidateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 spectro clusters aks validate params +func (o *V1SpectroClustersAksValidateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 spectro clusters aks validate params +func (o *V1SpectroClustersAksValidateParams) WithBody(body *models.V1SpectroAzureClusterEntity) *V1SpectroClustersAksValidateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 spectro clusters aks validate params +func (o *V1SpectroClustersAksValidateParams) SetBody(body *models.V1SpectroAzureClusterEntity) { + o.Body = body +} + +// WriteToRequest writes these params to a swagger request +func (o *V1SpectroClustersAksValidateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_aks_validate_responses.go b/api/client/v1/v1_spectro_clusters_aks_validate_responses.go new file mode 100644 index 00000000..2cef6682 --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_aks_validate_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1SpectroClustersAksValidateReader is a Reader for the V1SpectroClustersAksValidate structure. +type V1SpectroClustersAksValidateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1SpectroClustersAksValidateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1SpectroClustersAksValidateOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1SpectroClustersAksValidateOK creates a V1SpectroClustersAksValidateOK with default headers values +func NewV1SpectroClustersAksValidateOK() *V1SpectroClustersAksValidateOK { + return &V1SpectroClustersAksValidateOK{} +} + +/* +V1SpectroClustersAksValidateOK handles this case with default header values. + +Aks Cluster validation response +*/ +type V1SpectroClustersAksValidateOK struct { + Payload *models.V1SpectroClusterValidatorResponse +} + +func (o *V1SpectroClustersAksValidateOK) Error() string { + return fmt.Sprintf("[POST /v1/spectroclusters/aks/validate][%d] v1SpectroClustersAksValidateOK %+v", 200, o.Payload) +} + +func (o *V1SpectroClustersAksValidateOK) GetPayload() *models.V1SpectroClusterValidatorResponse { + return o.Payload +} + +func (o *V1SpectroClustersAksValidateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1SpectroClusterValidatorResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_aws_create_parameters.go b/api/client/v1/v1_spectro_clusters_aws_create_parameters.go new file mode 100644 index 00000000..133ae8f7 --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_aws_create_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1SpectroClustersAwsCreateParams creates a new V1SpectroClustersAwsCreateParams object +// with the default values initialized. +func NewV1SpectroClustersAwsCreateParams() *V1SpectroClustersAwsCreateParams { + var () + return &V1SpectroClustersAwsCreateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1SpectroClustersAwsCreateParamsWithTimeout creates a new V1SpectroClustersAwsCreateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1SpectroClustersAwsCreateParamsWithTimeout(timeout time.Duration) *V1SpectroClustersAwsCreateParams { + var () + return &V1SpectroClustersAwsCreateParams{ + + timeout: timeout, + } +} + +// NewV1SpectroClustersAwsCreateParamsWithContext creates a new V1SpectroClustersAwsCreateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1SpectroClustersAwsCreateParamsWithContext(ctx context.Context) *V1SpectroClustersAwsCreateParams { + var () + return &V1SpectroClustersAwsCreateParams{ + + Context: ctx, + } +} + +// NewV1SpectroClustersAwsCreateParamsWithHTTPClient creates a new V1SpectroClustersAwsCreateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1SpectroClustersAwsCreateParamsWithHTTPClient(client *http.Client) *V1SpectroClustersAwsCreateParams { + var () + return &V1SpectroClustersAwsCreateParams{ + HTTPClient: client, + } +} + +/* +V1SpectroClustersAwsCreateParams contains all the parameters to send to the API endpoint +for the v1 spectro clusters aws create operation typically these are written to a http.Request +*/ +type V1SpectroClustersAwsCreateParams struct { + + /*Body*/ + Body *models.V1SpectroAwsClusterEntity + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 spectro clusters aws create params +func (o *V1SpectroClustersAwsCreateParams) WithTimeout(timeout time.Duration) *V1SpectroClustersAwsCreateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 spectro clusters aws create params +func (o *V1SpectroClustersAwsCreateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 spectro clusters aws create params +func (o *V1SpectroClustersAwsCreateParams) WithContext(ctx context.Context) *V1SpectroClustersAwsCreateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 spectro clusters aws create params +func (o *V1SpectroClustersAwsCreateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 spectro clusters aws create params +func (o *V1SpectroClustersAwsCreateParams) WithHTTPClient(client *http.Client) *V1SpectroClustersAwsCreateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 spectro clusters aws create params +func (o *V1SpectroClustersAwsCreateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 spectro clusters aws create params +func (o *V1SpectroClustersAwsCreateParams) WithBody(body *models.V1SpectroAwsClusterEntity) *V1SpectroClustersAwsCreateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 spectro clusters aws create params +func (o *V1SpectroClustersAwsCreateParams) SetBody(body *models.V1SpectroAwsClusterEntity) { + o.Body = body +} + +// WriteToRequest writes these params to a swagger request +func (o *V1SpectroClustersAwsCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_aws_create_responses.go b/api/client/v1/v1_spectro_clusters_aws_create_responses.go new file mode 100644 index 00000000..795bd04c --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_aws_create_responses.go @@ -0,0 +1,77 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1SpectroClustersAwsCreateReader is a Reader for the V1SpectroClustersAwsCreate structure. +type V1SpectroClustersAwsCreateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1SpectroClustersAwsCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 201: + result := NewV1SpectroClustersAwsCreateCreated() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1SpectroClustersAwsCreateCreated creates a V1SpectroClustersAwsCreateCreated with default headers values +func NewV1SpectroClustersAwsCreateCreated() *V1SpectroClustersAwsCreateCreated { + return &V1SpectroClustersAwsCreateCreated{} +} + +/* +V1SpectroClustersAwsCreateCreated handles this case with default header values. + +Created successfully +*/ +type V1SpectroClustersAwsCreateCreated struct { + /*Audit uid for the request + */ + AuditUID string + + Payload *models.V1UID +} + +func (o *V1SpectroClustersAwsCreateCreated) Error() string { + return fmt.Sprintf("[POST /v1/spectroclusters/aws][%d] v1SpectroClustersAwsCreateCreated %+v", 201, o.Payload) +} + +func (o *V1SpectroClustersAwsCreateCreated) GetPayload() *models.V1UID { + return o.Payload +} + +func (o *V1SpectroClustersAwsCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header AuditUid + o.AuditUID = response.GetHeader("AuditUid") + + o.Payload = new(models.V1UID) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_aws_import_parameters.go b/api/client/v1/v1_spectro_clusters_aws_import_parameters.go new file mode 100644 index 00000000..83b3febb --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_aws_import_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1SpectroClustersAwsImportParams creates a new V1SpectroClustersAwsImportParams object +// with the default values initialized. +func NewV1SpectroClustersAwsImportParams() *V1SpectroClustersAwsImportParams { + var () + return &V1SpectroClustersAwsImportParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1SpectroClustersAwsImportParamsWithTimeout creates a new V1SpectroClustersAwsImportParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1SpectroClustersAwsImportParamsWithTimeout(timeout time.Duration) *V1SpectroClustersAwsImportParams { + var () + return &V1SpectroClustersAwsImportParams{ + + timeout: timeout, + } +} + +// NewV1SpectroClustersAwsImportParamsWithContext creates a new V1SpectroClustersAwsImportParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1SpectroClustersAwsImportParamsWithContext(ctx context.Context) *V1SpectroClustersAwsImportParams { + var () + return &V1SpectroClustersAwsImportParams{ + + Context: ctx, + } +} + +// NewV1SpectroClustersAwsImportParamsWithHTTPClient creates a new V1SpectroClustersAwsImportParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1SpectroClustersAwsImportParamsWithHTTPClient(client *http.Client) *V1SpectroClustersAwsImportParams { + var () + return &V1SpectroClustersAwsImportParams{ + HTTPClient: client, + } +} + +/* +V1SpectroClustersAwsImportParams contains all the parameters to send to the API endpoint +for the v1 spectro clusters aws import operation typically these are written to a http.Request +*/ +type V1SpectroClustersAwsImportParams struct { + + /*Body*/ + Body *models.V1SpectroAwsClusterImportEntity + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 spectro clusters aws import params +func (o *V1SpectroClustersAwsImportParams) WithTimeout(timeout time.Duration) *V1SpectroClustersAwsImportParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 spectro clusters aws import params +func (o *V1SpectroClustersAwsImportParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 spectro clusters aws import params +func (o *V1SpectroClustersAwsImportParams) WithContext(ctx context.Context) *V1SpectroClustersAwsImportParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 spectro clusters aws import params +func (o *V1SpectroClustersAwsImportParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 spectro clusters aws import params +func (o *V1SpectroClustersAwsImportParams) WithHTTPClient(client *http.Client) *V1SpectroClustersAwsImportParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 spectro clusters aws import params +func (o *V1SpectroClustersAwsImportParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 spectro clusters aws import params +func (o *V1SpectroClustersAwsImportParams) WithBody(body *models.V1SpectroAwsClusterImportEntity) *V1SpectroClustersAwsImportParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 spectro clusters aws import params +func (o *V1SpectroClustersAwsImportParams) SetBody(body *models.V1SpectroAwsClusterImportEntity) { + o.Body = body +} + +// WriteToRequest writes these params to a swagger request +func (o *V1SpectroClustersAwsImportParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_aws_import_responses.go b/api/client/v1/v1_spectro_clusters_aws_import_responses.go new file mode 100644 index 00000000..d20546b3 --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_aws_import_responses.go @@ -0,0 +1,77 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1SpectroClustersAwsImportReader is a Reader for the V1SpectroClustersAwsImport structure. +type V1SpectroClustersAwsImportReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1SpectroClustersAwsImportReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 201: + result := NewV1SpectroClustersAwsImportCreated() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1SpectroClustersAwsImportCreated creates a V1SpectroClustersAwsImportCreated with default headers values +func NewV1SpectroClustersAwsImportCreated() *V1SpectroClustersAwsImportCreated { + return &V1SpectroClustersAwsImportCreated{} +} + +/* +V1SpectroClustersAwsImportCreated handles this case with default header values. + +Created successfully +*/ +type V1SpectroClustersAwsImportCreated struct { + /*Audit uid for the request + */ + AuditUID string + + Payload *models.V1UID +} + +func (o *V1SpectroClustersAwsImportCreated) Error() string { + return fmt.Sprintf("[POST /v1/spectroclusters/aws/import][%d] v1SpectroClustersAwsImportCreated %+v", 201, o.Payload) +} + +func (o *V1SpectroClustersAwsImportCreated) GetPayload() *models.V1UID { + return o.Payload +} + +func (o *V1SpectroClustersAwsImportCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header AuditUid + o.AuditUID = response.GetHeader("AuditUid") + + o.Payload = new(models.V1UID) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_aws_rate_parameters.go b/api/client/v1/v1_spectro_clusters_aws_rate_parameters.go new file mode 100644 index 00000000..c3d5e223 --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_aws_rate_parameters.go @@ -0,0 +1,177 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1SpectroClustersAwsRateParams creates a new V1SpectroClustersAwsRateParams object +// with the default values initialized. +func NewV1SpectroClustersAwsRateParams() *V1SpectroClustersAwsRateParams { + var ( + periodTypeDefault = string("hourly") + ) + return &V1SpectroClustersAwsRateParams{ + PeriodType: &periodTypeDefault, + + timeout: cr.DefaultTimeout, + } +} + +// NewV1SpectroClustersAwsRateParamsWithTimeout creates a new V1SpectroClustersAwsRateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1SpectroClustersAwsRateParamsWithTimeout(timeout time.Duration) *V1SpectroClustersAwsRateParams { + var ( + periodTypeDefault = string("hourly") + ) + return &V1SpectroClustersAwsRateParams{ + PeriodType: &periodTypeDefault, + + timeout: timeout, + } +} + +// NewV1SpectroClustersAwsRateParamsWithContext creates a new V1SpectroClustersAwsRateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1SpectroClustersAwsRateParamsWithContext(ctx context.Context) *V1SpectroClustersAwsRateParams { + var ( + periodTypeDefault = string("hourly") + ) + return &V1SpectroClustersAwsRateParams{ + PeriodType: &periodTypeDefault, + + Context: ctx, + } +} + +// NewV1SpectroClustersAwsRateParamsWithHTTPClient creates a new V1SpectroClustersAwsRateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1SpectroClustersAwsRateParamsWithHTTPClient(client *http.Client) *V1SpectroClustersAwsRateParams { + var ( + periodTypeDefault = string("hourly") + ) + return &V1SpectroClustersAwsRateParams{ + PeriodType: &periodTypeDefault, + HTTPClient: client, + } +} + +/* +V1SpectroClustersAwsRateParams contains all the parameters to send to the API endpoint +for the v1 spectro clusters aws rate operation typically these are written to a http.Request +*/ +type V1SpectroClustersAwsRateParams struct { + + /*Body*/ + Body *models.V1SpectroAwsClusterRateEntity + /*PeriodType*/ + PeriodType *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 spectro clusters aws rate params +func (o *V1SpectroClustersAwsRateParams) WithTimeout(timeout time.Duration) *V1SpectroClustersAwsRateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 spectro clusters aws rate params +func (o *V1SpectroClustersAwsRateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 spectro clusters aws rate params +func (o *V1SpectroClustersAwsRateParams) WithContext(ctx context.Context) *V1SpectroClustersAwsRateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 spectro clusters aws rate params +func (o *V1SpectroClustersAwsRateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 spectro clusters aws rate params +func (o *V1SpectroClustersAwsRateParams) WithHTTPClient(client *http.Client) *V1SpectroClustersAwsRateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 spectro clusters aws rate params +func (o *V1SpectroClustersAwsRateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 spectro clusters aws rate params +func (o *V1SpectroClustersAwsRateParams) WithBody(body *models.V1SpectroAwsClusterRateEntity) *V1SpectroClustersAwsRateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 spectro clusters aws rate params +func (o *V1SpectroClustersAwsRateParams) SetBody(body *models.V1SpectroAwsClusterRateEntity) { + o.Body = body +} + +// WithPeriodType adds the periodType to the v1 spectro clusters aws rate params +func (o *V1SpectroClustersAwsRateParams) WithPeriodType(periodType *string) *V1SpectroClustersAwsRateParams { + o.SetPeriodType(periodType) + return o +} + +// SetPeriodType adds the periodType to the v1 spectro clusters aws rate params +func (o *V1SpectroClustersAwsRateParams) SetPeriodType(periodType *string) { + o.PeriodType = periodType +} + +// WriteToRequest writes these params to a swagger request +func (o *V1SpectroClustersAwsRateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + if o.PeriodType != nil { + + // query param periodType + var qrPeriodType string + if o.PeriodType != nil { + qrPeriodType = *o.PeriodType + } + qPeriodType := qrPeriodType + if qPeriodType != "" { + if err := r.SetQueryParam("periodType", qPeriodType); err != nil { + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_aws_rate_responses.go b/api/client/v1/v1_spectro_clusters_aws_rate_responses.go new file mode 100644 index 00000000..a41161ef --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_aws_rate_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1SpectroClustersAwsRateReader is a Reader for the V1SpectroClustersAwsRate structure. +type V1SpectroClustersAwsRateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1SpectroClustersAwsRateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1SpectroClustersAwsRateOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1SpectroClustersAwsRateOK creates a V1SpectroClustersAwsRateOK with default headers values +func NewV1SpectroClustersAwsRateOK() *V1SpectroClustersAwsRateOK { + return &V1SpectroClustersAwsRateOK{} +} + +/* +V1SpectroClustersAwsRateOK handles this case with default header values. + +Aws Cluster estimated rate response +*/ +type V1SpectroClustersAwsRateOK struct { + Payload *models.V1SpectroClusterRate +} + +func (o *V1SpectroClustersAwsRateOK) Error() string { + return fmt.Sprintf("[POST /v1/spectroclusters/aws/rate][%d] v1SpectroClustersAwsRateOK %+v", 200, o.Payload) +} + +func (o *V1SpectroClustersAwsRateOK) GetPayload() *models.V1SpectroClusterRate { + return o.Payload +} + +func (o *V1SpectroClustersAwsRateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1SpectroClusterRate) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_aws_validate_parameters.go b/api/client/v1/v1_spectro_clusters_aws_validate_parameters.go new file mode 100644 index 00000000..5330dc8f --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_aws_validate_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1SpectroClustersAwsValidateParams creates a new V1SpectroClustersAwsValidateParams object +// with the default values initialized. +func NewV1SpectroClustersAwsValidateParams() *V1SpectroClustersAwsValidateParams { + var () + return &V1SpectroClustersAwsValidateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1SpectroClustersAwsValidateParamsWithTimeout creates a new V1SpectroClustersAwsValidateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1SpectroClustersAwsValidateParamsWithTimeout(timeout time.Duration) *V1SpectroClustersAwsValidateParams { + var () + return &V1SpectroClustersAwsValidateParams{ + + timeout: timeout, + } +} + +// NewV1SpectroClustersAwsValidateParamsWithContext creates a new V1SpectroClustersAwsValidateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1SpectroClustersAwsValidateParamsWithContext(ctx context.Context) *V1SpectroClustersAwsValidateParams { + var () + return &V1SpectroClustersAwsValidateParams{ + + Context: ctx, + } +} + +// NewV1SpectroClustersAwsValidateParamsWithHTTPClient creates a new V1SpectroClustersAwsValidateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1SpectroClustersAwsValidateParamsWithHTTPClient(client *http.Client) *V1SpectroClustersAwsValidateParams { + var () + return &V1SpectroClustersAwsValidateParams{ + HTTPClient: client, + } +} + +/* +V1SpectroClustersAwsValidateParams contains all the parameters to send to the API endpoint +for the v1 spectro clusters aws validate operation typically these are written to a http.Request +*/ +type V1SpectroClustersAwsValidateParams struct { + + /*Body*/ + Body *models.V1SpectroAwsClusterEntity + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 spectro clusters aws validate params +func (o *V1SpectroClustersAwsValidateParams) WithTimeout(timeout time.Duration) *V1SpectroClustersAwsValidateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 spectro clusters aws validate params +func (o *V1SpectroClustersAwsValidateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 spectro clusters aws validate params +func (o *V1SpectroClustersAwsValidateParams) WithContext(ctx context.Context) *V1SpectroClustersAwsValidateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 spectro clusters aws validate params +func (o *V1SpectroClustersAwsValidateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 spectro clusters aws validate params +func (o *V1SpectroClustersAwsValidateParams) WithHTTPClient(client *http.Client) *V1SpectroClustersAwsValidateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 spectro clusters aws validate params +func (o *V1SpectroClustersAwsValidateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 spectro clusters aws validate params +func (o *V1SpectroClustersAwsValidateParams) WithBody(body *models.V1SpectroAwsClusterEntity) *V1SpectroClustersAwsValidateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 spectro clusters aws validate params +func (o *V1SpectroClustersAwsValidateParams) SetBody(body *models.V1SpectroAwsClusterEntity) { + o.Body = body +} + +// WriteToRequest writes these params to a swagger request +func (o *V1SpectroClustersAwsValidateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_aws_validate_responses.go b/api/client/v1/v1_spectro_clusters_aws_validate_responses.go new file mode 100644 index 00000000..fbb6c07a --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_aws_validate_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1SpectroClustersAwsValidateReader is a Reader for the V1SpectroClustersAwsValidate structure. +type V1SpectroClustersAwsValidateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1SpectroClustersAwsValidateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1SpectroClustersAwsValidateOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1SpectroClustersAwsValidateOK creates a V1SpectroClustersAwsValidateOK with default headers values +func NewV1SpectroClustersAwsValidateOK() *V1SpectroClustersAwsValidateOK { + return &V1SpectroClustersAwsValidateOK{} +} + +/* +V1SpectroClustersAwsValidateOK handles this case with default header values. + +Aws Cluster validation response +*/ +type V1SpectroClustersAwsValidateOK struct { + Payload *models.V1SpectroClusterValidatorResponse +} + +func (o *V1SpectroClustersAwsValidateOK) Error() string { + return fmt.Sprintf("[POST /v1/spectroclusters/aws/validate][%d] v1SpectroClustersAwsValidateOK %+v", 200, o.Payload) +} + +func (o *V1SpectroClustersAwsValidateOK) GetPayload() *models.V1SpectroClusterValidatorResponse { + return o.Payload +} + +func (o *V1SpectroClustersAwsValidateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1SpectroClusterValidatorResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_azure_create_parameters.go b/api/client/v1/v1_spectro_clusters_azure_create_parameters.go new file mode 100644 index 00000000..d843fe9b --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_azure_create_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1SpectroClustersAzureCreateParams creates a new V1SpectroClustersAzureCreateParams object +// with the default values initialized. +func NewV1SpectroClustersAzureCreateParams() *V1SpectroClustersAzureCreateParams { + var () + return &V1SpectroClustersAzureCreateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1SpectroClustersAzureCreateParamsWithTimeout creates a new V1SpectroClustersAzureCreateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1SpectroClustersAzureCreateParamsWithTimeout(timeout time.Duration) *V1SpectroClustersAzureCreateParams { + var () + return &V1SpectroClustersAzureCreateParams{ + + timeout: timeout, + } +} + +// NewV1SpectroClustersAzureCreateParamsWithContext creates a new V1SpectroClustersAzureCreateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1SpectroClustersAzureCreateParamsWithContext(ctx context.Context) *V1SpectroClustersAzureCreateParams { + var () + return &V1SpectroClustersAzureCreateParams{ + + Context: ctx, + } +} + +// NewV1SpectroClustersAzureCreateParamsWithHTTPClient creates a new V1SpectroClustersAzureCreateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1SpectroClustersAzureCreateParamsWithHTTPClient(client *http.Client) *V1SpectroClustersAzureCreateParams { + var () + return &V1SpectroClustersAzureCreateParams{ + HTTPClient: client, + } +} + +/* +V1SpectroClustersAzureCreateParams contains all the parameters to send to the API endpoint +for the v1 spectro clusters azure create operation typically these are written to a http.Request +*/ +type V1SpectroClustersAzureCreateParams struct { + + /*Body*/ + Body *models.V1SpectroAzureClusterEntity + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 spectro clusters azure create params +func (o *V1SpectroClustersAzureCreateParams) WithTimeout(timeout time.Duration) *V1SpectroClustersAzureCreateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 spectro clusters azure create params +func (o *V1SpectroClustersAzureCreateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 spectro clusters azure create params +func (o *V1SpectroClustersAzureCreateParams) WithContext(ctx context.Context) *V1SpectroClustersAzureCreateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 spectro clusters azure create params +func (o *V1SpectroClustersAzureCreateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 spectro clusters azure create params +func (o *V1SpectroClustersAzureCreateParams) WithHTTPClient(client *http.Client) *V1SpectroClustersAzureCreateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 spectro clusters azure create params +func (o *V1SpectroClustersAzureCreateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 spectro clusters azure create params +func (o *V1SpectroClustersAzureCreateParams) WithBody(body *models.V1SpectroAzureClusterEntity) *V1SpectroClustersAzureCreateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 spectro clusters azure create params +func (o *V1SpectroClustersAzureCreateParams) SetBody(body *models.V1SpectroAzureClusterEntity) { + o.Body = body +} + +// WriteToRequest writes these params to a swagger request +func (o *V1SpectroClustersAzureCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_azure_create_responses.go b/api/client/v1/v1_spectro_clusters_azure_create_responses.go new file mode 100644 index 00000000..07f36aed --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_azure_create_responses.go @@ -0,0 +1,77 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1SpectroClustersAzureCreateReader is a Reader for the V1SpectroClustersAzureCreate structure. +type V1SpectroClustersAzureCreateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1SpectroClustersAzureCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 201: + result := NewV1SpectroClustersAzureCreateCreated() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1SpectroClustersAzureCreateCreated creates a V1SpectroClustersAzureCreateCreated with default headers values +func NewV1SpectroClustersAzureCreateCreated() *V1SpectroClustersAzureCreateCreated { + return &V1SpectroClustersAzureCreateCreated{} +} + +/* +V1SpectroClustersAzureCreateCreated handles this case with default header values. + +Created successfully +*/ +type V1SpectroClustersAzureCreateCreated struct { + /*Audit uid for the request + */ + AuditUID string + + Payload *models.V1UID +} + +func (o *V1SpectroClustersAzureCreateCreated) Error() string { + return fmt.Sprintf("[POST /v1/spectroclusters/azure][%d] v1SpectroClustersAzureCreateCreated %+v", 201, o.Payload) +} + +func (o *V1SpectroClustersAzureCreateCreated) GetPayload() *models.V1UID { + return o.Payload +} + +func (o *V1SpectroClustersAzureCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header AuditUid + o.AuditUID = response.GetHeader("AuditUid") + + o.Payload = new(models.V1UID) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_azure_import_parameters.go b/api/client/v1/v1_spectro_clusters_azure_import_parameters.go new file mode 100644 index 00000000..6b66555f --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_azure_import_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1SpectroClustersAzureImportParams creates a new V1SpectroClustersAzureImportParams object +// with the default values initialized. +func NewV1SpectroClustersAzureImportParams() *V1SpectroClustersAzureImportParams { + var () + return &V1SpectroClustersAzureImportParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1SpectroClustersAzureImportParamsWithTimeout creates a new V1SpectroClustersAzureImportParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1SpectroClustersAzureImportParamsWithTimeout(timeout time.Duration) *V1SpectroClustersAzureImportParams { + var () + return &V1SpectroClustersAzureImportParams{ + + timeout: timeout, + } +} + +// NewV1SpectroClustersAzureImportParamsWithContext creates a new V1SpectroClustersAzureImportParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1SpectroClustersAzureImportParamsWithContext(ctx context.Context) *V1SpectroClustersAzureImportParams { + var () + return &V1SpectroClustersAzureImportParams{ + + Context: ctx, + } +} + +// NewV1SpectroClustersAzureImportParamsWithHTTPClient creates a new V1SpectroClustersAzureImportParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1SpectroClustersAzureImportParamsWithHTTPClient(client *http.Client) *V1SpectroClustersAzureImportParams { + var () + return &V1SpectroClustersAzureImportParams{ + HTTPClient: client, + } +} + +/* +V1SpectroClustersAzureImportParams contains all the parameters to send to the API endpoint +for the v1 spectro clusters azure import operation typically these are written to a http.Request +*/ +type V1SpectroClustersAzureImportParams struct { + + /*Body*/ + Body *models.V1SpectroAzureClusterImportEntity + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 spectro clusters azure import params +func (o *V1SpectroClustersAzureImportParams) WithTimeout(timeout time.Duration) *V1SpectroClustersAzureImportParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 spectro clusters azure import params +func (o *V1SpectroClustersAzureImportParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 spectro clusters azure import params +func (o *V1SpectroClustersAzureImportParams) WithContext(ctx context.Context) *V1SpectroClustersAzureImportParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 spectro clusters azure import params +func (o *V1SpectroClustersAzureImportParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 spectro clusters azure import params +func (o *V1SpectroClustersAzureImportParams) WithHTTPClient(client *http.Client) *V1SpectroClustersAzureImportParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 spectro clusters azure import params +func (o *V1SpectroClustersAzureImportParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 spectro clusters azure import params +func (o *V1SpectroClustersAzureImportParams) WithBody(body *models.V1SpectroAzureClusterImportEntity) *V1SpectroClustersAzureImportParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 spectro clusters azure import params +func (o *V1SpectroClustersAzureImportParams) SetBody(body *models.V1SpectroAzureClusterImportEntity) { + o.Body = body +} + +// WriteToRequest writes these params to a swagger request +func (o *V1SpectroClustersAzureImportParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_azure_import_responses.go b/api/client/v1/v1_spectro_clusters_azure_import_responses.go new file mode 100644 index 00000000..ed10ecc8 --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_azure_import_responses.go @@ -0,0 +1,77 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1SpectroClustersAzureImportReader is a Reader for the V1SpectroClustersAzureImport structure. +type V1SpectroClustersAzureImportReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1SpectroClustersAzureImportReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 201: + result := NewV1SpectroClustersAzureImportCreated() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1SpectroClustersAzureImportCreated creates a V1SpectroClustersAzureImportCreated with default headers values +func NewV1SpectroClustersAzureImportCreated() *V1SpectroClustersAzureImportCreated { + return &V1SpectroClustersAzureImportCreated{} +} + +/* +V1SpectroClustersAzureImportCreated handles this case with default header values. + +Created successfully +*/ +type V1SpectroClustersAzureImportCreated struct { + /*Audit uid for the request + */ + AuditUID string + + Payload *models.V1UID +} + +func (o *V1SpectroClustersAzureImportCreated) Error() string { + return fmt.Sprintf("[POST /v1/spectroclusters/azure/import][%d] v1SpectroClustersAzureImportCreated %+v", 201, o.Payload) +} + +func (o *V1SpectroClustersAzureImportCreated) GetPayload() *models.V1UID { + return o.Payload +} + +func (o *V1SpectroClustersAzureImportCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header AuditUid + o.AuditUID = response.GetHeader("AuditUid") + + o.Payload = new(models.V1UID) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_azure_rate_parameters.go b/api/client/v1/v1_spectro_clusters_azure_rate_parameters.go new file mode 100644 index 00000000..8b1e62bd --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_azure_rate_parameters.go @@ -0,0 +1,177 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1SpectroClustersAzureRateParams creates a new V1SpectroClustersAzureRateParams object +// with the default values initialized. +func NewV1SpectroClustersAzureRateParams() *V1SpectroClustersAzureRateParams { + var ( + periodTypeDefault = string("hourly") + ) + return &V1SpectroClustersAzureRateParams{ + PeriodType: &periodTypeDefault, + + timeout: cr.DefaultTimeout, + } +} + +// NewV1SpectroClustersAzureRateParamsWithTimeout creates a new V1SpectroClustersAzureRateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1SpectroClustersAzureRateParamsWithTimeout(timeout time.Duration) *V1SpectroClustersAzureRateParams { + var ( + periodTypeDefault = string("hourly") + ) + return &V1SpectroClustersAzureRateParams{ + PeriodType: &periodTypeDefault, + + timeout: timeout, + } +} + +// NewV1SpectroClustersAzureRateParamsWithContext creates a new V1SpectroClustersAzureRateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1SpectroClustersAzureRateParamsWithContext(ctx context.Context) *V1SpectroClustersAzureRateParams { + var ( + periodTypeDefault = string("hourly") + ) + return &V1SpectroClustersAzureRateParams{ + PeriodType: &periodTypeDefault, + + Context: ctx, + } +} + +// NewV1SpectroClustersAzureRateParamsWithHTTPClient creates a new V1SpectroClustersAzureRateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1SpectroClustersAzureRateParamsWithHTTPClient(client *http.Client) *V1SpectroClustersAzureRateParams { + var ( + periodTypeDefault = string("hourly") + ) + return &V1SpectroClustersAzureRateParams{ + PeriodType: &periodTypeDefault, + HTTPClient: client, + } +} + +/* +V1SpectroClustersAzureRateParams contains all the parameters to send to the API endpoint +for the v1 spectro clusters azure rate operation typically these are written to a http.Request +*/ +type V1SpectroClustersAzureRateParams struct { + + /*Body*/ + Body *models.V1SpectroAzureClusterRateEntity + /*PeriodType*/ + PeriodType *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 spectro clusters azure rate params +func (o *V1SpectroClustersAzureRateParams) WithTimeout(timeout time.Duration) *V1SpectroClustersAzureRateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 spectro clusters azure rate params +func (o *V1SpectroClustersAzureRateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 spectro clusters azure rate params +func (o *V1SpectroClustersAzureRateParams) WithContext(ctx context.Context) *V1SpectroClustersAzureRateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 spectro clusters azure rate params +func (o *V1SpectroClustersAzureRateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 spectro clusters azure rate params +func (o *V1SpectroClustersAzureRateParams) WithHTTPClient(client *http.Client) *V1SpectroClustersAzureRateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 spectro clusters azure rate params +func (o *V1SpectroClustersAzureRateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 spectro clusters azure rate params +func (o *V1SpectroClustersAzureRateParams) WithBody(body *models.V1SpectroAzureClusterRateEntity) *V1SpectroClustersAzureRateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 spectro clusters azure rate params +func (o *V1SpectroClustersAzureRateParams) SetBody(body *models.V1SpectroAzureClusterRateEntity) { + o.Body = body +} + +// WithPeriodType adds the periodType to the v1 spectro clusters azure rate params +func (o *V1SpectroClustersAzureRateParams) WithPeriodType(periodType *string) *V1SpectroClustersAzureRateParams { + o.SetPeriodType(periodType) + return o +} + +// SetPeriodType adds the periodType to the v1 spectro clusters azure rate params +func (o *V1SpectroClustersAzureRateParams) SetPeriodType(periodType *string) { + o.PeriodType = periodType +} + +// WriteToRequest writes these params to a swagger request +func (o *V1SpectroClustersAzureRateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + if o.PeriodType != nil { + + // query param periodType + var qrPeriodType string + if o.PeriodType != nil { + qrPeriodType = *o.PeriodType + } + qPeriodType := qrPeriodType + if qPeriodType != "" { + if err := r.SetQueryParam("periodType", qPeriodType); err != nil { + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_azure_rate_responses.go b/api/client/v1/v1_spectro_clusters_azure_rate_responses.go new file mode 100644 index 00000000..0f151073 --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_azure_rate_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1SpectroClustersAzureRateReader is a Reader for the V1SpectroClustersAzureRate structure. +type V1SpectroClustersAzureRateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1SpectroClustersAzureRateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1SpectroClustersAzureRateOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1SpectroClustersAzureRateOK creates a V1SpectroClustersAzureRateOK with default headers values +func NewV1SpectroClustersAzureRateOK() *V1SpectroClustersAzureRateOK { + return &V1SpectroClustersAzureRateOK{} +} + +/* +V1SpectroClustersAzureRateOK handles this case with default header values. + +Azure Cluster estimated rate response +*/ +type V1SpectroClustersAzureRateOK struct { + Payload *models.V1SpectroClusterRate +} + +func (o *V1SpectroClustersAzureRateOK) Error() string { + return fmt.Sprintf("[POST /v1/spectroclusters/azure/rate][%d] v1SpectroClustersAzureRateOK %+v", 200, o.Payload) +} + +func (o *V1SpectroClustersAzureRateOK) GetPayload() *models.V1SpectroClusterRate { + return o.Payload +} + +func (o *V1SpectroClustersAzureRateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1SpectroClusterRate) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_azure_validate_parameters.go b/api/client/v1/v1_spectro_clusters_azure_validate_parameters.go new file mode 100644 index 00000000..0cb5ab0d --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_azure_validate_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1SpectroClustersAzureValidateParams creates a new V1SpectroClustersAzureValidateParams object +// with the default values initialized. +func NewV1SpectroClustersAzureValidateParams() *V1SpectroClustersAzureValidateParams { + var () + return &V1SpectroClustersAzureValidateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1SpectroClustersAzureValidateParamsWithTimeout creates a new V1SpectroClustersAzureValidateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1SpectroClustersAzureValidateParamsWithTimeout(timeout time.Duration) *V1SpectroClustersAzureValidateParams { + var () + return &V1SpectroClustersAzureValidateParams{ + + timeout: timeout, + } +} + +// NewV1SpectroClustersAzureValidateParamsWithContext creates a new V1SpectroClustersAzureValidateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1SpectroClustersAzureValidateParamsWithContext(ctx context.Context) *V1SpectroClustersAzureValidateParams { + var () + return &V1SpectroClustersAzureValidateParams{ + + Context: ctx, + } +} + +// NewV1SpectroClustersAzureValidateParamsWithHTTPClient creates a new V1SpectroClustersAzureValidateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1SpectroClustersAzureValidateParamsWithHTTPClient(client *http.Client) *V1SpectroClustersAzureValidateParams { + var () + return &V1SpectroClustersAzureValidateParams{ + HTTPClient: client, + } +} + +/* +V1SpectroClustersAzureValidateParams contains all the parameters to send to the API endpoint +for the v1 spectro clusters azure validate operation typically these are written to a http.Request +*/ +type V1SpectroClustersAzureValidateParams struct { + + /*Body*/ + Body *models.V1SpectroAzureClusterEntity + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 spectro clusters azure validate params +func (o *V1SpectroClustersAzureValidateParams) WithTimeout(timeout time.Duration) *V1SpectroClustersAzureValidateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 spectro clusters azure validate params +func (o *V1SpectroClustersAzureValidateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 spectro clusters azure validate params +func (o *V1SpectroClustersAzureValidateParams) WithContext(ctx context.Context) *V1SpectroClustersAzureValidateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 spectro clusters azure validate params +func (o *V1SpectroClustersAzureValidateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 spectro clusters azure validate params +func (o *V1SpectroClustersAzureValidateParams) WithHTTPClient(client *http.Client) *V1SpectroClustersAzureValidateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 spectro clusters azure validate params +func (o *V1SpectroClustersAzureValidateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 spectro clusters azure validate params +func (o *V1SpectroClustersAzureValidateParams) WithBody(body *models.V1SpectroAzureClusterEntity) *V1SpectroClustersAzureValidateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 spectro clusters azure validate params +func (o *V1SpectroClustersAzureValidateParams) SetBody(body *models.V1SpectroAzureClusterEntity) { + o.Body = body +} + +// WriteToRequest writes these params to a swagger request +func (o *V1SpectroClustersAzureValidateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_azure_validate_responses.go b/api/client/v1/v1_spectro_clusters_azure_validate_responses.go new file mode 100644 index 00000000..c5d556d1 --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_azure_validate_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1SpectroClustersAzureValidateReader is a Reader for the V1SpectroClustersAzureValidate structure. +type V1SpectroClustersAzureValidateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1SpectroClustersAzureValidateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1SpectroClustersAzureValidateOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1SpectroClustersAzureValidateOK creates a V1SpectroClustersAzureValidateOK with default headers values +func NewV1SpectroClustersAzureValidateOK() *V1SpectroClustersAzureValidateOK { + return &V1SpectroClustersAzureValidateOK{} +} + +/* +V1SpectroClustersAzureValidateOK handles this case with default header values. + +Azure Cluster validation response +*/ +type V1SpectroClustersAzureValidateOK struct { + Payload *models.V1SpectroClusterValidatorResponse +} + +func (o *V1SpectroClustersAzureValidateOK) Error() string { + return fmt.Sprintf("[POST /v1/spectroclusters/azure/validate][%d] v1SpectroClustersAzureValidateOK %+v", 200, o.Payload) +} + +func (o *V1SpectroClustersAzureValidateOK) GetPayload() *models.V1SpectroClusterValidatorResponse { + return o.Payload +} + +func (o *V1SpectroClustersAzureValidateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1SpectroClusterValidatorResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_certificates_renew_parameters.go b/api/client/v1/v1_spectro_clusters_certificates_renew_parameters.go new file mode 100644 index 00000000..f22e60b4 --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_certificates_renew_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1SpectroClustersCertificatesRenewParams creates a new V1SpectroClustersCertificatesRenewParams object +// with the default values initialized. +func NewV1SpectroClustersCertificatesRenewParams() *V1SpectroClustersCertificatesRenewParams { + var () + return &V1SpectroClustersCertificatesRenewParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1SpectroClustersCertificatesRenewParamsWithTimeout creates a new V1SpectroClustersCertificatesRenewParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1SpectroClustersCertificatesRenewParamsWithTimeout(timeout time.Duration) *V1SpectroClustersCertificatesRenewParams { + var () + return &V1SpectroClustersCertificatesRenewParams{ + + timeout: timeout, + } +} + +// NewV1SpectroClustersCertificatesRenewParamsWithContext creates a new V1SpectroClustersCertificatesRenewParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1SpectroClustersCertificatesRenewParamsWithContext(ctx context.Context) *V1SpectroClustersCertificatesRenewParams { + var () + return &V1SpectroClustersCertificatesRenewParams{ + + Context: ctx, + } +} + +// NewV1SpectroClustersCertificatesRenewParamsWithHTTPClient creates a new V1SpectroClustersCertificatesRenewParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1SpectroClustersCertificatesRenewParamsWithHTTPClient(client *http.Client) *V1SpectroClustersCertificatesRenewParams { + var () + return &V1SpectroClustersCertificatesRenewParams{ + HTTPClient: client, + } +} + +/* +V1SpectroClustersCertificatesRenewParams contains all the parameters to send to the API endpoint +for the v1 spectro clusters certificates renew operation typically these are written to a http.Request +*/ +type V1SpectroClustersCertificatesRenewParams struct { + + /*UID + Cluster uid + + */ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 spectro clusters certificates renew params +func (o *V1SpectroClustersCertificatesRenewParams) WithTimeout(timeout time.Duration) *V1SpectroClustersCertificatesRenewParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 spectro clusters certificates renew params +func (o *V1SpectroClustersCertificatesRenewParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 spectro clusters certificates renew params +func (o *V1SpectroClustersCertificatesRenewParams) WithContext(ctx context.Context) *V1SpectroClustersCertificatesRenewParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 spectro clusters certificates renew params +func (o *V1SpectroClustersCertificatesRenewParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 spectro clusters certificates renew params +func (o *V1SpectroClustersCertificatesRenewParams) WithHTTPClient(client *http.Client) *V1SpectroClustersCertificatesRenewParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 spectro clusters certificates renew params +func (o *V1SpectroClustersCertificatesRenewParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithUID adds the uid to the v1 spectro clusters certificates renew params +func (o *V1SpectroClustersCertificatesRenewParams) WithUID(uid string) *V1SpectroClustersCertificatesRenewParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 spectro clusters certificates renew params +func (o *V1SpectroClustersCertificatesRenewParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1SpectroClustersCertificatesRenewParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_certificates_renew_responses.go b/api/client/v1/v1_spectro_clusters_certificates_renew_responses.go new file mode 100644 index 00000000..164c6665 --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_certificates_renew_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1SpectroClustersCertificatesRenewReader is a Reader for the V1SpectroClustersCertificatesRenew structure. +type V1SpectroClustersCertificatesRenewReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1SpectroClustersCertificatesRenewReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1SpectroClustersCertificatesRenewNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1SpectroClustersCertificatesRenewNoContent creates a V1SpectroClustersCertificatesRenewNoContent with default headers values +func NewV1SpectroClustersCertificatesRenewNoContent() *V1SpectroClustersCertificatesRenewNoContent { + return &V1SpectroClustersCertificatesRenewNoContent{} +} + +/* +V1SpectroClustersCertificatesRenewNoContent handles this case with default header values. + +The resource was updated successfully +*/ +type V1SpectroClustersCertificatesRenewNoContent struct { +} + +func (o *V1SpectroClustersCertificatesRenewNoContent) Error() string { + return fmt.Sprintf("[PATCH /v1/spectroclusters/{uid}/k8certificates/renew][%d] v1SpectroClustersCertificatesRenewNoContent ", 204) +} + +func (o *V1SpectroClustersCertificatesRenewNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_cluster_rbac_parameters.go b/api/client/v1/v1_spectro_clusters_cluster_rbac_parameters.go new file mode 100644 index 00000000..1dab475f --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_cluster_rbac_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1SpectroClustersClusterRbacParams creates a new V1SpectroClustersClusterRbacParams object +// with the default values initialized. +func NewV1SpectroClustersClusterRbacParams() *V1SpectroClustersClusterRbacParams { + var () + return &V1SpectroClustersClusterRbacParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1SpectroClustersClusterRbacParamsWithTimeout creates a new V1SpectroClustersClusterRbacParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1SpectroClustersClusterRbacParamsWithTimeout(timeout time.Duration) *V1SpectroClustersClusterRbacParams { + var () + return &V1SpectroClustersClusterRbacParams{ + + timeout: timeout, + } +} + +// NewV1SpectroClustersClusterRbacParamsWithContext creates a new V1SpectroClustersClusterRbacParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1SpectroClustersClusterRbacParamsWithContext(ctx context.Context) *V1SpectroClustersClusterRbacParams { + var () + return &V1SpectroClustersClusterRbacParams{ + + Context: ctx, + } +} + +// NewV1SpectroClustersClusterRbacParamsWithHTTPClient creates a new V1SpectroClustersClusterRbacParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1SpectroClustersClusterRbacParamsWithHTTPClient(client *http.Client) *V1SpectroClustersClusterRbacParams { + var () + return &V1SpectroClustersClusterRbacParams{ + HTTPClient: client, + } +} + +/* +V1SpectroClustersClusterRbacParams contains all the parameters to send to the API endpoint +for the v1 spectro clusters cluster rbac operation typically these are written to a http.Request +*/ +type V1SpectroClustersClusterRbacParams struct { + + /*UID + Cluster uid + + */ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 spectro clusters cluster rbac params +func (o *V1SpectroClustersClusterRbacParams) WithTimeout(timeout time.Duration) *V1SpectroClustersClusterRbacParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 spectro clusters cluster rbac params +func (o *V1SpectroClustersClusterRbacParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 spectro clusters cluster rbac params +func (o *V1SpectroClustersClusterRbacParams) WithContext(ctx context.Context) *V1SpectroClustersClusterRbacParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 spectro clusters cluster rbac params +func (o *V1SpectroClustersClusterRbacParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 spectro clusters cluster rbac params +func (o *V1SpectroClustersClusterRbacParams) WithHTTPClient(client *http.Client) *V1SpectroClustersClusterRbacParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 spectro clusters cluster rbac params +func (o *V1SpectroClustersClusterRbacParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithUID adds the uid to the v1 spectro clusters cluster rbac params +func (o *V1SpectroClustersClusterRbacParams) WithUID(uid string) *V1SpectroClustersClusterRbacParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 spectro clusters cluster rbac params +func (o *V1SpectroClustersClusterRbacParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1SpectroClustersClusterRbacParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_cluster_rbac_responses.go b/api/client/v1/v1_spectro_clusters_cluster_rbac_responses.go new file mode 100644 index 00000000..c5c2b951 --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_cluster_rbac_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1SpectroClustersClusterRbacReader is a Reader for the V1SpectroClustersClusterRbac structure. +type V1SpectroClustersClusterRbacReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1SpectroClustersClusterRbacReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1SpectroClustersClusterRbacOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1SpectroClustersClusterRbacOK creates a V1SpectroClustersClusterRbacOK with default headers values +func NewV1SpectroClustersClusterRbacOK() *V1SpectroClustersClusterRbacOK { + return &V1SpectroClustersClusterRbacOK{} +} + +/* +V1SpectroClustersClusterRbacOK handles this case with default header values. + +(empty) +*/ +type V1SpectroClustersClusterRbacOK struct { + Payload *models.V1ClusterRbacs +} + +func (o *V1SpectroClustersClusterRbacOK) Error() string { + return fmt.Sprintf("[GET /v1/spectroclusters/{uid}/clusterrbac][%d] v1SpectroClustersClusterRbacOK %+v", 200, o.Payload) +} + +func (o *V1SpectroClustersClusterRbacOK) GetPayload() *models.V1ClusterRbacs { + return o.Payload +} + +func (o *V1SpectroClustersClusterRbacOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1ClusterRbacs) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_config_edge_installer_parameters.go b/api/client/v1/v1_spectro_clusters_config_edge_installer_parameters.go new file mode 100644 index 00000000..6d02e560 --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_config_edge_installer_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1SpectroClustersConfigEdgeInstallerParams creates a new V1SpectroClustersConfigEdgeInstallerParams object +// with the default values initialized. +func NewV1SpectroClustersConfigEdgeInstallerParams() *V1SpectroClustersConfigEdgeInstallerParams { + + return &V1SpectroClustersConfigEdgeInstallerParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1SpectroClustersConfigEdgeInstallerParamsWithTimeout creates a new V1SpectroClustersConfigEdgeInstallerParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1SpectroClustersConfigEdgeInstallerParamsWithTimeout(timeout time.Duration) *V1SpectroClustersConfigEdgeInstallerParams { + + return &V1SpectroClustersConfigEdgeInstallerParams{ + + timeout: timeout, + } +} + +// NewV1SpectroClustersConfigEdgeInstallerParamsWithContext creates a new V1SpectroClustersConfigEdgeInstallerParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1SpectroClustersConfigEdgeInstallerParamsWithContext(ctx context.Context) *V1SpectroClustersConfigEdgeInstallerParams { + + return &V1SpectroClustersConfigEdgeInstallerParams{ + + Context: ctx, + } +} + +// NewV1SpectroClustersConfigEdgeInstallerParamsWithHTTPClient creates a new V1SpectroClustersConfigEdgeInstallerParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1SpectroClustersConfigEdgeInstallerParamsWithHTTPClient(client *http.Client) *V1SpectroClustersConfigEdgeInstallerParams { + + return &V1SpectroClustersConfigEdgeInstallerParams{ + HTTPClient: client, + } +} + +/* +V1SpectroClustersConfigEdgeInstallerParams contains all the parameters to send to the API endpoint +for the v1 spectro clusters config edge installer operation typically these are written to a http.Request +*/ +type V1SpectroClustersConfigEdgeInstallerParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 spectro clusters config edge installer params +func (o *V1SpectroClustersConfigEdgeInstallerParams) WithTimeout(timeout time.Duration) *V1SpectroClustersConfigEdgeInstallerParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 spectro clusters config edge installer params +func (o *V1SpectroClustersConfigEdgeInstallerParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 spectro clusters config edge installer params +func (o *V1SpectroClustersConfigEdgeInstallerParams) WithContext(ctx context.Context) *V1SpectroClustersConfigEdgeInstallerParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 spectro clusters config edge installer params +func (o *V1SpectroClustersConfigEdgeInstallerParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 spectro clusters config edge installer params +func (o *V1SpectroClustersConfigEdgeInstallerParams) WithHTTPClient(client *http.Client) *V1SpectroClustersConfigEdgeInstallerParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 spectro clusters config edge installer params +func (o *V1SpectroClustersConfigEdgeInstallerParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *V1SpectroClustersConfigEdgeInstallerParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_config_edge_installer_responses.go b/api/client/v1/v1_spectro_clusters_config_edge_installer_responses.go new file mode 100644 index 00000000..6eaff386 --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_config_edge_installer_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1SpectroClustersConfigEdgeInstallerReader is a Reader for the V1SpectroClustersConfigEdgeInstaller structure. +type V1SpectroClustersConfigEdgeInstallerReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1SpectroClustersConfigEdgeInstallerReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1SpectroClustersConfigEdgeInstallerOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1SpectroClustersConfigEdgeInstallerOK creates a V1SpectroClustersConfigEdgeInstallerOK with default headers values +func NewV1SpectroClustersConfigEdgeInstallerOK() *V1SpectroClustersConfigEdgeInstallerOK { + return &V1SpectroClustersConfigEdgeInstallerOK{} +} + +/* +V1SpectroClustersConfigEdgeInstallerOK handles this case with default header values. + +(empty) +*/ +type V1SpectroClustersConfigEdgeInstallerOK struct { + Payload *models.V1ClusterEdgeInstallerConfig +} + +func (o *V1SpectroClustersConfigEdgeInstallerOK) Error() string { + return fmt.Sprintf("[GET /v1/spectroclusters/config/edgeInstaller][%d] v1SpectroClustersConfigEdgeInstallerOK %+v", 200, o.Payload) +} + +func (o *V1SpectroClustersConfigEdgeInstallerOK) GetPayload() *models.V1ClusterEdgeInstallerConfig { + return o.Payload +} + +func (o *V1SpectroClustersConfigEdgeInstallerOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1ClusterEdgeInstallerConfig) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_cox_edge_create_parameters.go b/api/client/v1/v1_spectro_clusters_cox_edge_create_parameters.go new file mode 100644 index 00000000..eb33e533 --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_cox_edge_create_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1SpectroClustersCoxEdgeCreateParams creates a new V1SpectroClustersCoxEdgeCreateParams object +// with the default values initialized. +func NewV1SpectroClustersCoxEdgeCreateParams() *V1SpectroClustersCoxEdgeCreateParams { + var () + return &V1SpectroClustersCoxEdgeCreateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1SpectroClustersCoxEdgeCreateParamsWithTimeout creates a new V1SpectroClustersCoxEdgeCreateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1SpectroClustersCoxEdgeCreateParamsWithTimeout(timeout time.Duration) *V1SpectroClustersCoxEdgeCreateParams { + var () + return &V1SpectroClustersCoxEdgeCreateParams{ + + timeout: timeout, + } +} + +// NewV1SpectroClustersCoxEdgeCreateParamsWithContext creates a new V1SpectroClustersCoxEdgeCreateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1SpectroClustersCoxEdgeCreateParamsWithContext(ctx context.Context) *V1SpectroClustersCoxEdgeCreateParams { + var () + return &V1SpectroClustersCoxEdgeCreateParams{ + + Context: ctx, + } +} + +// NewV1SpectroClustersCoxEdgeCreateParamsWithHTTPClient creates a new V1SpectroClustersCoxEdgeCreateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1SpectroClustersCoxEdgeCreateParamsWithHTTPClient(client *http.Client) *V1SpectroClustersCoxEdgeCreateParams { + var () + return &V1SpectroClustersCoxEdgeCreateParams{ + HTTPClient: client, + } +} + +/* +V1SpectroClustersCoxEdgeCreateParams contains all the parameters to send to the API endpoint +for the v1 spectro clusters cox edge create operation typically these are written to a http.Request +*/ +type V1SpectroClustersCoxEdgeCreateParams struct { + + /*Body*/ + Body *models.V1SpectroCoxEdgeClusterEntity + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 spectro clusters cox edge create params +func (o *V1SpectroClustersCoxEdgeCreateParams) WithTimeout(timeout time.Duration) *V1SpectroClustersCoxEdgeCreateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 spectro clusters cox edge create params +func (o *V1SpectroClustersCoxEdgeCreateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 spectro clusters cox edge create params +func (o *V1SpectroClustersCoxEdgeCreateParams) WithContext(ctx context.Context) *V1SpectroClustersCoxEdgeCreateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 spectro clusters cox edge create params +func (o *V1SpectroClustersCoxEdgeCreateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 spectro clusters cox edge create params +func (o *V1SpectroClustersCoxEdgeCreateParams) WithHTTPClient(client *http.Client) *V1SpectroClustersCoxEdgeCreateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 spectro clusters cox edge create params +func (o *V1SpectroClustersCoxEdgeCreateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 spectro clusters cox edge create params +func (o *V1SpectroClustersCoxEdgeCreateParams) WithBody(body *models.V1SpectroCoxEdgeClusterEntity) *V1SpectroClustersCoxEdgeCreateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 spectro clusters cox edge create params +func (o *V1SpectroClustersCoxEdgeCreateParams) SetBody(body *models.V1SpectroCoxEdgeClusterEntity) { + o.Body = body +} + +// WriteToRequest writes these params to a swagger request +func (o *V1SpectroClustersCoxEdgeCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_cox_edge_create_responses.go b/api/client/v1/v1_spectro_clusters_cox_edge_create_responses.go new file mode 100644 index 00000000..ae7076b9 --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_cox_edge_create_responses.go @@ -0,0 +1,77 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1SpectroClustersCoxEdgeCreateReader is a Reader for the V1SpectroClustersCoxEdgeCreate structure. +type V1SpectroClustersCoxEdgeCreateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1SpectroClustersCoxEdgeCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 201: + result := NewV1SpectroClustersCoxEdgeCreateCreated() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1SpectroClustersCoxEdgeCreateCreated creates a V1SpectroClustersCoxEdgeCreateCreated with default headers values +func NewV1SpectroClustersCoxEdgeCreateCreated() *V1SpectroClustersCoxEdgeCreateCreated { + return &V1SpectroClustersCoxEdgeCreateCreated{} +} + +/* +V1SpectroClustersCoxEdgeCreateCreated handles this case with default header values. + +Created successfully +*/ +type V1SpectroClustersCoxEdgeCreateCreated struct { + /*Audit uid for the request + */ + AuditUID string + + Payload *models.V1UID +} + +func (o *V1SpectroClustersCoxEdgeCreateCreated) Error() string { + return fmt.Sprintf("[POST /v1/spectroclusters/coxedge][%d] v1SpectroClustersCoxEdgeCreateCreated %+v", 201, o.Payload) +} + +func (o *V1SpectroClustersCoxEdgeCreateCreated) GetPayload() *models.V1UID { + return o.Payload +} + +func (o *V1SpectroClustersCoxEdgeCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header AuditUid + o.AuditUID = response.GetHeader("AuditUid") + + o.Payload = new(models.V1UID) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_cox_edge_rate_parameters.go b/api/client/v1/v1_spectro_clusters_cox_edge_rate_parameters.go new file mode 100644 index 00000000..2573bedf --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_cox_edge_rate_parameters.go @@ -0,0 +1,177 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1SpectroClustersCoxEdgeRateParams creates a new V1SpectroClustersCoxEdgeRateParams object +// with the default values initialized. +func NewV1SpectroClustersCoxEdgeRateParams() *V1SpectroClustersCoxEdgeRateParams { + var ( + periodTypeDefault = string("hourly") + ) + return &V1SpectroClustersCoxEdgeRateParams{ + PeriodType: &periodTypeDefault, + + timeout: cr.DefaultTimeout, + } +} + +// NewV1SpectroClustersCoxEdgeRateParamsWithTimeout creates a new V1SpectroClustersCoxEdgeRateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1SpectroClustersCoxEdgeRateParamsWithTimeout(timeout time.Duration) *V1SpectroClustersCoxEdgeRateParams { + var ( + periodTypeDefault = string("hourly") + ) + return &V1SpectroClustersCoxEdgeRateParams{ + PeriodType: &periodTypeDefault, + + timeout: timeout, + } +} + +// NewV1SpectroClustersCoxEdgeRateParamsWithContext creates a new V1SpectroClustersCoxEdgeRateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1SpectroClustersCoxEdgeRateParamsWithContext(ctx context.Context) *V1SpectroClustersCoxEdgeRateParams { + var ( + periodTypeDefault = string("hourly") + ) + return &V1SpectroClustersCoxEdgeRateParams{ + PeriodType: &periodTypeDefault, + + Context: ctx, + } +} + +// NewV1SpectroClustersCoxEdgeRateParamsWithHTTPClient creates a new V1SpectroClustersCoxEdgeRateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1SpectroClustersCoxEdgeRateParamsWithHTTPClient(client *http.Client) *V1SpectroClustersCoxEdgeRateParams { + var ( + periodTypeDefault = string("hourly") + ) + return &V1SpectroClustersCoxEdgeRateParams{ + PeriodType: &periodTypeDefault, + HTTPClient: client, + } +} + +/* +V1SpectroClustersCoxEdgeRateParams contains all the parameters to send to the API endpoint +for the v1 spectro clusters cox edge rate operation typically these are written to a http.Request +*/ +type V1SpectroClustersCoxEdgeRateParams struct { + + /*Body*/ + Body *models.V1SpectroCoxEdgeClusterRateEntity + /*PeriodType*/ + PeriodType *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 spectro clusters cox edge rate params +func (o *V1SpectroClustersCoxEdgeRateParams) WithTimeout(timeout time.Duration) *V1SpectroClustersCoxEdgeRateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 spectro clusters cox edge rate params +func (o *V1SpectroClustersCoxEdgeRateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 spectro clusters cox edge rate params +func (o *V1SpectroClustersCoxEdgeRateParams) WithContext(ctx context.Context) *V1SpectroClustersCoxEdgeRateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 spectro clusters cox edge rate params +func (o *V1SpectroClustersCoxEdgeRateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 spectro clusters cox edge rate params +func (o *V1SpectroClustersCoxEdgeRateParams) WithHTTPClient(client *http.Client) *V1SpectroClustersCoxEdgeRateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 spectro clusters cox edge rate params +func (o *V1SpectroClustersCoxEdgeRateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 spectro clusters cox edge rate params +func (o *V1SpectroClustersCoxEdgeRateParams) WithBody(body *models.V1SpectroCoxEdgeClusterRateEntity) *V1SpectroClustersCoxEdgeRateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 spectro clusters cox edge rate params +func (o *V1SpectroClustersCoxEdgeRateParams) SetBody(body *models.V1SpectroCoxEdgeClusterRateEntity) { + o.Body = body +} + +// WithPeriodType adds the periodType to the v1 spectro clusters cox edge rate params +func (o *V1SpectroClustersCoxEdgeRateParams) WithPeriodType(periodType *string) *V1SpectroClustersCoxEdgeRateParams { + o.SetPeriodType(periodType) + return o +} + +// SetPeriodType adds the periodType to the v1 spectro clusters cox edge rate params +func (o *V1SpectroClustersCoxEdgeRateParams) SetPeriodType(periodType *string) { + o.PeriodType = periodType +} + +// WriteToRequest writes these params to a swagger request +func (o *V1SpectroClustersCoxEdgeRateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + if o.PeriodType != nil { + + // query param periodType + var qrPeriodType string + if o.PeriodType != nil { + qrPeriodType = *o.PeriodType + } + qPeriodType := qrPeriodType + if qPeriodType != "" { + if err := r.SetQueryParam("periodType", qPeriodType); err != nil { + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_cox_edge_rate_responses.go b/api/client/v1/v1_spectro_clusters_cox_edge_rate_responses.go new file mode 100644 index 00000000..3374d0c3 --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_cox_edge_rate_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1SpectroClustersCoxEdgeRateReader is a Reader for the V1SpectroClustersCoxEdgeRate structure. +type V1SpectroClustersCoxEdgeRateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1SpectroClustersCoxEdgeRateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1SpectroClustersCoxEdgeRateOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1SpectroClustersCoxEdgeRateOK creates a V1SpectroClustersCoxEdgeRateOK with default headers values +func NewV1SpectroClustersCoxEdgeRateOK() *V1SpectroClustersCoxEdgeRateOK { + return &V1SpectroClustersCoxEdgeRateOK{} +} + +/* +V1SpectroClustersCoxEdgeRateOK handles this case with default header values. + +Azure Cluster estimated rate response +*/ +type V1SpectroClustersCoxEdgeRateOK struct { + Payload *models.V1SpectroClusterRate +} + +func (o *V1SpectroClustersCoxEdgeRateOK) Error() string { + return fmt.Sprintf("[POST /v1/spectroclusters/coxedge/rate][%d] v1SpectroClustersCoxEdgeRateOK %+v", 200, o.Payload) +} + +func (o *V1SpectroClustersCoxEdgeRateOK) GetPayload() *models.V1SpectroClusterRate { + return o.Payload +} + +func (o *V1SpectroClustersCoxEdgeRateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1SpectroClusterRate) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_cox_edge_validate_parameters.go b/api/client/v1/v1_spectro_clusters_cox_edge_validate_parameters.go new file mode 100644 index 00000000..9e207fe9 --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_cox_edge_validate_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1SpectroClustersCoxEdgeValidateParams creates a new V1SpectroClustersCoxEdgeValidateParams object +// with the default values initialized. +func NewV1SpectroClustersCoxEdgeValidateParams() *V1SpectroClustersCoxEdgeValidateParams { + var () + return &V1SpectroClustersCoxEdgeValidateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1SpectroClustersCoxEdgeValidateParamsWithTimeout creates a new V1SpectroClustersCoxEdgeValidateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1SpectroClustersCoxEdgeValidateParamsWithTimeout(timeout time.Duration) *V1SpectroClustersCoxEdgeValidateParams { + var () + return &V1SpectroClustersCoxEdgeValidateParams{ + + timeout: timeout, + } +} + +// NewV1SpectroClustersCoxEdgeValidateParamsWithContext creates a new V1SpectroClustersCoxEdgeValidateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1SpectroClustersCoxEdgeValidateParamsWithContext(ctx context.Context) *V1SpectroClustersCoxEdgeValidateParams { + var () + return &V1SpectroClustersCoxEdgeValidateParams{ + + Context: ctx, + } +} + +// NewV1SpectroClustersCoxEdgeValidateParamsWithHTTPClient creates a new V1SpectroClustersCoxEdgeValidateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1SpectroClustersCoxEdgeValidateParamsWithHTTPClient(client *http.Client) *V1SpectroClustersCoxEdgeValidateParams { + var () + return &V1SpectroClustersCoxEdgeValidateParams{ + HTTPClient: client, + } +} + +/* +V1SpectroClustersCoxEdgeValidateParams contains all the parameters to send to the API endpoint +for the v1 spectro clusters cox edge validate operation typically these are written to a http.Request +*/ +type V1SpectroClustersCoxEdgeValidateParams struct { + + /*Body*/ + Body *models.V1SpectroCoxEdgeClusterEntity + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 spectro clusters cox edge validate params +func (o *V1SpectroClustersCoxEdgeValidateParams) WithTimeout(timeout time.Duration) *V1SpectroClustersCoxEdgeValidateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 spectro clusters cox edge validate params +func (o *V1SpectroClustersCoxEdgeValidateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 spectro clusters cox edge validate params +func (o *V1SpectroClustersCoxEdgeValidateParams) WithContext(ctx context.Context) *V1SpectroClustersCoxEdgeValidateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 spectro clusters cox edge validate params +func (o *V1SpectroClustersCoxEdgeValidateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 spectro clusters cox edge validate params +func (o *V1SpectroClustersCoxEdgeValidateParams) WithHTTPClient(client *http.Client) *V1SpectroClustersCoxEdgeValidateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 spectro clusters cox edge validate params +func (o *V1SpectroClustersCoxEdgeValidateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 spectro clusters cox edge validate params +func (o *V1SpectroClustersCoxEdgeValidateParams) WithBody(body *models.V1SpectroCoxEdgeClusterEntity) *V1SpectroClustersCoxEdgeValidateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 spectro clusters cox edge validate params +func (o *V1SpectroClustersCoxEdgeValidateParams) SetBody(body *models.V1SpectroCoxEdgeClusterEntity) { + o.Body = body +} + +// WriteToRequest writes these params to a swagger request +func (o *V1SpectroClustersCoxEdgeValidateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_cox_edge_validate_responses.go b/api/client/v1/v1_spectro_clusters_cox_edge_validate_responses.go new file mode 100644 index 00000000..e6f1dcbb --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_cox_edge_validate_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1SpectroClustersCoxEdgeValidateReader is a Reader for the V1SpectroClustersCoxEdgeValidate structure. +type V1SpectroClustersCoxEdgeValidateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1SpectroClustersCoxEdgeValidateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1SpectroClustersCoxEdgeValidateOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1SpectroClustersCoxEdgeValidateOK creates a V1SpectroClustersCoxEdgeValidateOK with default headers values +func NewV1SpectroClustersCoxEdgeValidateOK() *V1SpectroClustersCoxEdgeValidateOK { + return &V1SpectroClustersCoxEdgeValidateOK{} +} + +/* +V1SpectroClustersCoxEdgeValidateOK handles this case with default header values. + +Azure Cluster validation response +*/ +type V1SpectroClustersCoxEdgeValidateOK struct { + Payload *models.V1SpectroClusterValidatorResponse +} + +func (o *V1SpectroClustersCoxEdgeValidateOK) Error() string { + return fmt.Sprintf("[POST /v1/spectroclusters/coxedge/validate][%d] v1SpectroClustersCoxEdgeValidateOK %+v", 200, o.Payload) +} + +func (o *V1SpectroClustersCoxEdgeValidateOK) GetPayload() *models.V1SpectroClusterValidatorResponse { + return o.Payload +} + +func (o *V1SpectroClustersCoxEdgeValidateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1SpectroClusterValidatorResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_custom_create_parameters.go b/api/client/v1/v1_spectro_clusters_custom_create_parameters.go new file mode 100644 index 00000000..630d9587 --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_custom_create_parameters.go @@ -0,0 +1,157 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1SpectroClustersCustomCreateParams creates a new V1SpectroClustersCustomCreateParams object +// with the default values initialized. +func NewV1SpectroClustersCustomCreateParams() *V1SpectroClustersCustomCreateParams { + var () + return &V1SpectroClustersCustomCreateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1SpectroClustersCustomCreateParamsWithTimeout creates a new V1SpectroClustersCustomCreateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1SpectroClustersCustomCreateParamsWithTimeout(timeout time.Duration) *V1SpectroClustersCustomCreateParams { + var () + return &V1SpectroClustersCustomCreateParams{ + + timeout: timeout, + } +} + +// NewV1SpectroClustersCustomCreateParamsWithContext creates a new V1SpectroClustersCustomCreateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1SpectroClustersCustomCreateParamsWithContext(ctx context.Context) *V1SpectroClustersCustomCreateParams { + var () + return &V1SpectroClustersCustomCreateParams{ + + Context: ctx, + } +} + +// NewV1SpectroClustersCustomCreateParamsWithHTTPClient creates a new V1SpectroClustersCustomCreateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1SpectroClustersCustomCreateParamsWithHTTPClient(client *http.Client) *V1SpectroClustersCustomCreateParams { + var () + return &V1SpectroClustersCustomCreateParams{ + HTTPClient: client, + } +} + +/* +V1SpectroClustersCustomCreateParams contains all the parameters to send to the API endpoint +for the v1 spectro clusters custom create operation typically these are written to a http.Request +*/ +type V1SpectroClustersCustomCreateParams struct { + + /*Body*/ + Body *models.V1SpectroCustomClusterEntity + /*CloudType + Cluster's cloud type + + */ + CloudType string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 spectro clusters custom create params +func (o *V1SpectroClustersCustomCreateParams) WithTimeout(timeout time.Duration) *V1SpectroClustersCustomCreateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 spectro clusters custom create params +func (o *V1SpectroClustersCustomCreateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 spectro clusters custom create params +func (o *V1SpectroClustersCustomCreateParams) WithContext(ctx context.Context) *V1SpectroClustersCustomCreateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 spectro clusters custom create params +func (o *V1SpectroClustersCustomCreateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 spectro clusters custom create params +func (o *V1SpectroClustersCustomCreateParams) WithHTTPClient(client *http.Client) *V1SpectroClustersCustomCreateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 spectro clusters custom create params +func (o *V1SpectroClustersCustomCreateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 spectro clusters custom create params +func (o *V1SpectroClustersCustomCreateParams) WithBody(body *models.V1SpectroCustomClusterEntity) *V1SpectroClustersCustomCreateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 spectro clusters custom create params +func (o *V1SpectroClustersCustomCreateParams) SetBody(body *models.V1SpectroCustomClusterEntity) { + o.Body = body +} + +// WithCloudType adds the cloudType to the v1 spectro clusters custom create params +func (o *V1SpectroClustersCustomCreateParams) WithCloudType(cloudType string) *V1SpectroClustersCustomCreateParams { + o.SetCloudType(cloudType) + return o +} + +// SetCloudType adds the cloudType to the v1 spectro clusters custom create params +func (o *V1SpectroClustersCustomCreateParams) SetCloudType(cloudType string) { + o.CloudType = cloudType +} + +// WriteToRequest writes these params to a swagger request +func (o *V1SpectroClustersCustomCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param cloudType + if err := r.SetPathParam("cloudType", o.CloudType); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_custom_create_responses.go b/api/client/v1/v1_spectro_clusters_custom_create_responses.go new file mode 100644 index 00000000..6d76676d --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_custom_create_responses.go @@ -0,0 +1,77 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1SpectroClustersCustomCreateReader is a Reader for the V1SpectroClustersCustomCreate structure. +type V1SpectroClustersCustomCreateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1SpectroClustersCustomCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 201: + result := NewV1SpectroClustersCustomCreateCreated() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1SpectroClustersCustomCreateCreated creates a V1SpectroClustersCustomCreateCreated with default headers values +func NewV1SpectroClustersCustomCreateCreated() *V1SpectroClustersCustomCreateCreated { + return &V1SpectroClustersCustomCreateCreated{} +} + +/* +V1SpectroClustersCustomCreateCreated handles this case with default header values. + +Created successfully +*/ +type V1SpectroClustersCustomCreateCreated struct { + /*Audit uid for the request + */ + AuditUID string + + Payload *models.V1UID +} + +func (o *V1SpectroClustersCustomCreateCreated) Error() string { + return fmt.Sprintf("[POST /v1/spectroclusters/cloudTypes/{cloudType}][%d] v1SpectroClustersCustomCreateCreated %+v", 201, o.Payload) +} + +func (o *V1SpectroClustersCustomCreateCreated) GetPayload() *models.V1UID { + return o.Payload +} + +func (o *V1SpectroClustersCustomCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header AuditUid + o.AuditUID = response.GetHeader("AuditUid") + + o.Payload = new(models.V1UID) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_custom_validate_parameters.go b/api/client/v1/v1_spectro_clusters_custom_validate_parameters.go new file mode 100644 index 00000000..bfc34e3b --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_custom_validate_parameters.go @@ -0,0 +1,157 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1SpectroClustersCustomValidateParams creates a new V1SpectroClustersCustomValidateParams object +// with the default values initialized. +func NewV1SpectroClustersCustomValidateParams() *V1SpectroClustersCustomValidateParams { + var () + return &V1SpectroClustersCustomValidateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1SpectroClustersCustomValidateParamsWithTimeout creates a new V1SpectroClustersCustomValidateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1SpectroClustersCustomValidateParamsWithTimeout(timeout time.Duration) *V1SpectroClustersCustomValidateParams { + var () + return &V1SpectroClustersCustomValidateParams{ + + timeout: timeout, + } +} + +// NewV1SpectroClustersCustomValidateParamsWithContext creates a new V1SpectroClustersCustomValidateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1SpectroClustersCustomValidateParamsWithContext(ctx context.Context) *V1SpectroClustersCustomValidateParams { + var () + return &V1SpectroClustersCustomValidateParams{ + + Context: ctx, + } +} + +// NewV1SpectroClustersCustomValidateParamsWithHTTPClient creates a new V1SpectroClustersCustomValidateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1SpectroClustersCustomValidateParamsWithHTTPClient(client *http.Client) *V1SpectroClustersCustomValidateParams { + var () + return &V1SpectroClustersCustomValidateParams{ + HTTPClient: client, + } +} + +/* +V1SpectroClustersCustomValidateParams contains all the parameters to send to the API endpoint +for the v1 spectro clusters custom validate operation typically these are written to a http.Request +*/ +type V1SpectroClustersCustomValidateParams struct { + + /*Body*/ + Body *models.V1SpectroCustomClusterEntity + /*CloudType + Cluster's cloud type + + */ + CloudType string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 spectro clusters custom validate params +func (o *V1SpectroClustersCustomValidateParams) WithTimeout(timeout time.Duration) *V1SpectroClustersCustomValidateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 spectro clusters custom validate params +func (o *V1SpectroClustersCustomValidateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 spectro clusters custom validate params +func (o *V1SpectroClustersCustomValidateParams) WithContext(ctx context.Context) *V1SpectroClustersCustomValidateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 spectro clusters custom validate params +func (o *V1SpectroClustersCustomValidateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 spectro clusters custom validate params +func (o *V1SpectroClustersCustomValidateParams) WithHTTPClient(client *http.Client) *V1SpectroClustersCustomValidateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 spectro clusters custom validate params +func (o *V1SpectroClustersCustomValidateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 spectro clusters custom validate params +func (o *V1SpectroClustersCustomValidateParams) WithBody(body *models.V1SpectroCustomClusterEntity) *V1SpectroClustersCustomValidateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 spectro clusters custom validate params +func (o *V1SpectroClustersCustomValidateParams) SetBody(body *models.V1SpectroCustomClusterEntity) { + o.Body = body +} + +// WithCloudType adds the cloudType to the v1 spectro clusters custom validate params +func (o *V1SpectroClustersCustomValidateParams) WithCloudType(cloudType string) *V1SpectroClustersCustomValidateParams { + o.SetCloudType(cloudType) + return o +} + +// SetCloudType adds the cloudType to the v1 spectro clusters custom validate params +func (o *V1SpectroClustersCustomValidateParams) SetCloudType(cloudType string) { + o.CloudType = cloudType +} + +// WriteToRequest writes these params to a swagger request +func (o *V1SpectroClustersCustomValidateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param cloudType + if err := r.SetPathParam("cloudType", o.CloudType); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_custom_validate_responses.go b/api/client/v1/v1_spectro_clusters_custom_validate_responses.go new file mode 100644 index 00000000..4b8b28aa --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_custom_validate_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1SpectroClustersCustomValidateReader is a Reader for the V1SpectroClustersCustomValidate structure. +type V1SpectroClustersCustomValidateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1SpectroClustersCustomValidateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1SpectroClustersCustomValidateOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1SpectroClustersCustomValidateOK creates a V1SpectroClustersCustomValidateOK with default headers values +func NewV1SpectroClustersCustomValidateOK() *V1SpectroClustersCustomValidateOK { + return &V1SpectroClustersCustomValidateOK{} +} + +/* +V1SpectroClustersCustomValidateOK handles this case with default header values. + +Custom Cluster validation response +*/ +type V1SpectroClustersCustomValidateOK struct { + Payload *models.V1SpectroClusterValidatorResponse +} + +func (o *V1SpectroClustersCustomValidateOK) Error() string { + return fmt.Sprintf("[POST /v1/spectroclusters/cloudTypes/{cloudType}/validate][%d] v1SpectroClustersCustomValidateOK %+v", 200, o.Payload) +} + +func (o *V1SpectroClustersCustomValidateOK) GetPayload() *models.V1SpectroClusterValidatorResponse { + return o.Payload +} + +func (o *V1SpectroClustersCustomValidateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1SpectroClusterValidatorResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_delete_parameters.go b/api/client/v1/v1_spectro_clusters_delete_parameters.go new file mode 100644 index 00000000..82b3c35d --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_delete_parameters.go @@ -0,0 +1,169 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// NewV1SpectroClustersDeleteParams creates a new V1SpectroClustersDeleteParams object +// with the default values initialized. +func NewV1SpectroClustersDeleteParams() *V1SpectroClustersDeleteParams { + var () + return &V1SpectroClustersDeleteParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1SpectroClustersDeleteParamsWithTimeout creates a new V1SpectroClustersDeleteParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1SpectroClustersDeleteParamsWithTimeout(timeout time.Duration) *V1SpectroClustersDeleteParams { + var () + return &V1SpectroClustersDeleteParams{ + + timeout: timeout, + } +} + +// NewV1SpectroClustersDeleteParamsWithContext creates a new V1SpectroClustersDeleteParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1SpectroClustersDeleteParamsWithContext(ctx context.Context) *V1SpectroClustersDeleteParams { + var () + return &V1SpectroClustersDeleteParams{ + + Context: ctx, + } +} + +// NewV1SpectroClustersDeleteParamsWithHTTPClient creates a new V1SpectroClustersDeleteParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1SpectroClustersDeleteParamsWithHTTPClient(client *http.Client) *V1SpectroClustersDeleteParams { + var () + return &V1SpectroClustersDeleteParams{ + HTTPClient: client, + } +} + +/* +V1SpectroClustersDeleteParams contains all the parameters to send to the API endpoint +for the v1 spectro clusters delete operation typically these are written to a http.Request +*/ +type V1SpectroClustersDeleteParams struct { + + /*ForceDelete + If set to true the cluster will be force deleted and user has to manually clean up the provisioned cloud resources + + */ + ForceDelete *bool + /*UID + Cluster uid + + */ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 spectro clusters delete params +func (o *V1SpectroClustersDeleteParams) WithTimeout(timeout time.Duration) *V1SpectroClustersDeleteParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 spectro clusters delete params +func (o *V1SpectroClustersDeleteParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 spectro clusters delete params +func (o *V1SpectroClustersDeleteParams) WithContext(ctx context.Context) *V1SpectroClustersDeleteParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 spectro clusters delete params +func (o *V1SpectroClustersDeleteParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 spectro clusters delete params +func (o *V1SpectroClustersDeleteParams) WithHTTPClient(client *http.Client) *V1SpectroClustersDeleteParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 spectro clusters delete params +func (o *V1SpectroClustersDeleteParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithForceDelete adds the forceDelete to the v1 spectro clusters delete params +func (o *V1SpectroClustersDeleteParams) WithForceDelete(forceDelete *bool) *V1SpectroClustersDeleteParams { + o.SetForceDelete(forceDelete) + return o +} + +// SetForceDelete adds the forceDelete to the v1 spectro clusters delete params +func (o *V1SpectroClustersDeleteParams) SetForceDelete(forceDelete *bool) { + o.ForceDelete = forceDelete +} + +// WithUID adds the uid to the v1 spectro clusters delete params +func (o *V1SpectroClustersDeleteParams) WithUID(uid string) *V1SpectroClustersDeleteParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 spectro clusters delete params +func (o *V1SpectroClustersDeleteParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1SpectroClustersDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.ForceDelete != nil { + + // query param forceDelete + var qrForceDelete bool + if o.ForceDelete != nil { + qrForceDelete = *o.ForceDelete + } + qForceDelete := swag.FormatBool(qrForceDelete) + if qForceDelete != "" { + if err := r.SetQueryParam("forceDelete", qForceDelete); err != nil { + return err + } + } + + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_delete_profiles_parameters.go b/api/client/v1/v1_spectro_clusters_delete_profiles_parameters.go new file mode 100644 index 00000000..577bfe36 --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_delete_profiles_parameters.go @@ -0,0 +1,157 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1SpectroClustersDeleteProfilesParams creates a new V1SpectroClustersDeleteProfilesParams object +// with the default values initialized. +func NewV1SpectroClustersDeleteProfilesParams() *V1SpectroClustersDeleteProfilesParams { + var () + return &V1SpectroClustersDeleteProfilesParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1SpectroClustersDeleteProfilesParamsWithTimeout creates a new V1SpectroClustersDeleteProfilesParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1SpectroClustersDeleteProfilesParamsWithTimeout(timeout time.Duration) *V1SpectroClustersDeleteProfilesParams { + var () + return &V1SpectroClustersDeleteProfilesParams{ + + timeout: timeout, + } +} + +// NewV1SpectroClustersDeleteProfilesParamsWithContext creates a new V1SpectroClustersDeleteProfilesParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1SpectroClustersDeleteProfilesParamsWithContext(ctx context.Context) *V1SpectroClustersDeleteProfilesParams { + var () + return &V1SpectroClustersDeleteProfilesParams{ + + Context: ctx, + } +} + +// NewV1SpectroClustersDeleteProfilesParamsWithHTTPClient creates a new V1SpectroClustersDeleteProfilesParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1SpectroClustersDeleteProfilesParamsWithHTTPClient(client *http.Client) *V1SpectroClustersDeleteProfilesParams { + var () + return &V1SpectroClustersDeleteProfilesParams{ + HTTPClient: client, + } +} + +/* +V1SpectroClustersDeleteProfilesParams contains all the parameters to send to the API endpoint +for the v1 spectro clusters delete profiles operation typically these are written to a http.Request +*/ +type V1SpectroClustersDeleteProfilesParams struct { + + /*Body*/ + Body *models.V1SpectroClusterProfilesDeleteEntity + /*UID + Cluster uid + + */ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 spectro clusters delete profiles params +func (o *V1SpectroClustersDeleteProfilesParams) WithTimeout(timeout time.Duration) *V1SpectroClustersDeleteProfilesParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 spectro clusters delete profiles params +func (o *V1SpectroClustersDeleteProfilesParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 spectro clusters delete profiles params +func (o *V1SpectroClustersDeleteProfilesParams) WithContext(ctx context.Context) *V1SpectroClustersDeleteProfilesParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 spectro clusters delete profiles params +func (o *V1SpectroClustersDeleteProfilesParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 spectro clusters delete profiles params +func (o *V1SpectroClustersDeleteProfilesParams) WithHTTPClient(client *http.Client) *V1SpectroClustersDeleteProfilesParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 spectro clusters delete profiles params +func (o *V1SpectroClustersDeleteProfilesParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 spectro clusters delete profiles params +func (o *V1SpectroClustersDeleteProfilesParams) WithBody(body *models.V1SpectroClusterProfilesDeleteEntity) *V1SpectroClustersDeleteProfilesParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 spectro clusters delete profiles params +func (o *V1SpectroClustersDeleteProfilesParams) SetBody(body *models.V1SpectroClusterProfilesDeleteEntity) { + o.Body = body +} + +// WithUID adds the uid to the v1 spectro clusters delete profiles params +func (o *V1SpectroClustersDeleteProfilesParams) WithUID(uid string) *V1SpectroClustersDeleteProfilesParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 spectro clusters delete profiles params +func (o *V1SpectroClustersDeleteProfilesParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1SpectroClustersDeleteProfilesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_delete_profiles_responses.go b/api/client/v1/v1_spectro_clusters_delete_profiles_responses.go new file mode 100644 index 00000000..9e5ea0a7 --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_delete_profiles_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1SpectroClustersDeleteProfilesReader is a Reader for the V1SpectroClustersDeleteProfiles structure. +type V1SpectroClustersDeleteProfilesReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1SpectroClustersDeleteProfilesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1SpectroClustersDeleteProfilesNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1SpectroClustersDeleteProfilesNoContent creates a V1SpectroClustersDeleteProfilesNoContent with default headers values +func NewV1SpectroClustersDeleteProfilesNoContent() *V1SpectroClustersDeleteProfilesNoContent { + return &V1SpectroClustersDeleteProfilesNoContent{} +} + +/* +V1SpectroClustersDeleteProfilesNoContent handles this case with default header values. + +The resource was updated successfully +*/ +type V1SpectroClustersDeleteProfilesNoContent struct { +} + +func (o *V1SpectroClustersDeleteProfilesNoContent) Error() string { + return fmt.Sprintf("[DELETE /v1/spectroclusters/{uid}/profiles][%d] v1SpectroClustersDeleteProfilesNoContent ", 204) +} + +func (o *V1SpectroClustersDeleteProfilesNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_delete_responses.go b/api/client/v1/v1_spectro_clusters_delete_responses.go new file mode 100644 index 00000000..8cc12769 --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_delete_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1SpectroClustersDeleteReader is a Reader for the V1SpectroClustersDelete structure. +type V1SpectroClustersDeleteReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1SpectroClustersDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1SpectroClustersDeleteNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1SpectroClustersDeleteNoContent creates a V1SpectroClustersDeleteNoContent with default headers values +func NewV1SpectroClustersDeleteNoContent() *V1SpectroClustersDeleteNoContent { + return &V1SpectroClustersDeleteNoContent{} +} + +/* +V1SpectroClustersDeleteNoContent handles this case with default header values. + +The resource was deleted successfully +*/ +type V1SpectroClustersDeleteNoContent struct { +} + +func (o *V1SpectroClustersDeleteNoContent) Error() string { + return fmt.Sprintf("[DELETE /v1/spectroclusters/{uid}][%d] v1SpectroClustersDeleteNoContent ", 204) +} + +func (o *V1SpectroClustersDeleteNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_edge_create_parameters.go b/api/client/v1/v1_spectro_clusters_edge_create_parameters.go new file mode 100644 index 00000000..dc0eabc4 --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_edge_create_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1SpectroClustersEdgeCreateParams creates a new V1SpectroClustersEdgeCreateParams object +// with the default values initialized. +func NewV1SpectroClustersEdgeCreateParams() *V1SpectroClustersEdgeCreateParams { + var () + return &V1SpectroClustersEdgeCreateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1SpectroClustersEdgeCreateParamsWithTimeout creates a new V1SpectroClustersEdgeCreateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1SpectroClustersEdgeCreateParamsWithTimeout(timeout time.Duration) *V1SpectroClustersEdgeCreateParams { + var () + return &V1SpectroClustersEdgeCreateParams{ + + timeout: timeout, + } +} + +// NewV1SpectroClustersEdgeCreateParamsWithContext creates a new V1SpectroClustersEdgeCreateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1SpectroClustersEdgeCreateParamsWithContext(ctx context.Context) *V1SpectroClustersEdgeCreateParams { + var () + return &V1SpectroClustersEdgeCreateParams{ + + Context: ctx, + } +} + +// NewV1SpectroClustersEdgeCreateParamsWithHTTPClient creates a new V1SpectroClustersEdgeCreateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1SpectroClustersEdgeCreateParamsWithHTTPClient(client *http.Client) *V1SpectroClustersEdgeCreateParams { + var () + return &V1SpectroClustersEdgeCreateParams{ + HTTPClient: client, + } +} + +/* +V1SpectroClustersEdgeCreateParams contains all the parameters to send to the API endpoint +for the v1 spectro clusters edge create operation typically these are written to a http.Request +*/ +type V1SpectroClustersEdgeCreateParams struct { + + /*Body*/ + Body *models.V1SpectroEdgeClusterEntity + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 spectro clusters edge create params +func (o *V1SpectroClustersEdgeCreateParams) WithTimeout(timeout time.Duration) *V1SpectroClustersEdgeCreateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 spectro clusters edge create params +func (o *V1SpectroClustersEdgeCreateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 spectro clusters edge create params +func (o *V1SpectroClustersEdgeCreateParams) WithContext(ctx context.Context) *V1SpectroClustersEdgeCreateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 spectro clusters edge create params +func (o *V1SpectroClustersEdgeCreateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 spectro clusters edge create params +func (o *V1SpectroClustersEdgeCreateParams) WithHTTPClient(client *http.Client) *V1SpectroClustersEdgeCreateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 spectro clusters edge create params +func (o *V1SpectroClustersEdgeCreateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 spectro clusters edge create params +func (o *V1SpectroClustersEdgeCreateParams) WithBody(body *models.V1SpectroEdgeClusterEntity) *V1SpectroClustersEdgeCreateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 spectro clusters edge create params +func (o *V1SpectroClustersEdgeCreateParams) SetBody(body *models.V1SpectroEdgeClusterEntity) { + o.Body = body +} + +// WriteToRequest writes these params to a swagger request +func (o *V1SpectroClustersEdgeCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_edge_create_responses.go b/api/client/v1/v1_spectro_clusters_edge_create_responses.go new file mode 100644 index 00000000..4207d51c --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_edge_create_responses.go @@ -0,0 +1,77 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1SpectroClustersEdgeCreateReader is a Reader for the V1SpectroClustersEdgeCreate structure. +type V1SpectroClustersEdgeCreateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1SpectroClustersEdgeCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 201: + result := NewV1SpectroClustersEdgeCreateCreated() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1SpectroClustersEdgeCreateCreated creates a V1SpectroClustersEdgeCreateCreated with default headers values +func NewV1SpectroClustersEdgeCreateCreated() *V1SpectroClustersEdgeCreateCreated { + return &V1SpectroClustersEdgeCreateCreated{} +} + +/* +V1SpectroClustersEdgeCreateCreated handles this case with default header values. + +Created successfully +*/ +type V1SpectroClustersEdgeCreateCreated struct { + /*Audit uid for the request + */ + AuditUID string + + Payload *models.V1UID +} + +func (o *V1SpectroClustersEdgeCreateCreated) Error() string { + return fmt.Sprintf("[POST /v1/spectroclusters/edge][%d] v1SpectroClustersEdgeCreateCreated %+v", 201, o.Payload) +} + +func (o *V1SpectroClustersEdgeCreateCreated) GetPayload() *models.V1UID { + return o.Payload +} + +func (o *V1SpectroClustersEdgeCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header AuditUid + o.AuditUID = response.GetHeader("AuditUid") + + o.Payload = new(models.V1UID) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_edge_import_parameters.go b/api/client/v1/v1_spectro_clusters_edge_import_parameters.go new file mode 100644 index 00000000..9240f774 --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_edge_import_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1SpectroClustersEdgeImportParams creates a new V1SpectroClustersEdgeImportParams object +// with the default values initialized. +func NewV1SpectroClustersEdgeImportParams() *V1SpectroClustersEdgeImportParams { + var () + return &V1SpectroClustersEdgeImportParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1SpectroClustersEdgeImportParamsWithTimeout creates a new V1SpectroClustersEdgeImportParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1SpectroClustersEdgeImportParamsWithTimeout(timeout time.Duration) *V1SpectroClustersEdgeImportParams { + var () + return &V1SpectroClustersEdgeImportParams{ + + timeout: timeout, + } +} + +// NewV1SpectroClustersEdgeImportParamsWithContext creates a new V1SpectroClustersEdgeImportParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1SpectroClustersEdgeImportParamsWithContext(ctx context.Context) *V1SpectroClustersEdgeImportParams { + var () + return &V1SpectroClustersEdgeImportParams{ + + Context: ctx, + } +} + +// NewV1SpectroClustersEdgeImportParamsWithHTTPClient creates a new V1SpectroClustersEdgeImportParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1SpectroClustersEdgeImportParamsWithHTTPClient(client *http.Client) *V1SpectroClustersEdgeImportParams { + var () + return &V1SpectroClustersEdgeImportParams{ + HTTPClient: client, + } +} + +/* +V1SpectroClustersEdgeImportParams contains all the parameters to send to the API endpoint +for the v1 spectro clusters edge import operation typically these are written to a http.Request +*/ +type V1SpectroClustersEdgeImportParams struct { + + /*Body*/ + Body *models.V1SpectroEdgeClusterImportEntity + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 spectro clusters edge import params +func (o *V1SpectroClustersEdgeImportParams) WithTimeout(timeout time.Duration) *V1SpectroClustersEdgeImportParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 spectro clusters edge import params +func (o *V1SpectroClustersEdgeImportParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 spectro clusters edge import params +func (o *V1SpectroClustersEdgeImportParams) WithContext(ctx context.Context) *V1SpectroClustersEdgeImportParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 spectro clusters edge import params +func (o *V1SpectroClustersEdgeImportParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 spectro clusters edge import params +func (o *V1SpectroClustersEdgeImportParams) WithHTTPClient(client *http.Client) *V1SpectroClustersEdgeImportParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 spectro clusters edge import params +func (o *V1SpectroClustersEdgeImportParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 spectro clusters edge import params +func (o *V1SpectroClustersEdgeImportParams) WithBody(body *models.V1SpectroEdgeClusterImportEntity) *V1SpectroClustersEdgeImportParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 spectro clusters edge import params +func (o *V1SpectroClustersEdgeImportParams) SetBody(body *models.V1SpectroEdgeClusterImportEntity) { + o.Body = body +} + +// WriteToRequest writes these params to a swagger request +func (o *V1SpectroClustersEdgeImportParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_edge_import_responses.go b/api/client/v1/v1_spectro_clusters_edge_import_responses.go new file mode 100644 index 00000000..b280798f --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_edge_import_responses.go @@ -0,0 +1,77 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1SpectroClustersEdgeImportReader is a Reader for the V1SpectroClustersEdgeImport structure. +type V1SpectroClustersEdgeImportReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1SpectroClustersEdgeImportReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 201: + result := NewV1SpectroClustersEdgeImportCreated() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1SpectroClustersEdgeImportCreated creates a V1SpectroClustersEdgeImportCreated with default headers values +func NewV1SpectroClustersEdgeImportCreated() *V1SpectroClustersEdgeImportCreated { + return &V1SpectroClustersEdgeImportCreated{} +} + +/* +V1SpectroClustersEdgeImportCreated handles this case with default header values. + +Created successfully +*/ +type V1SpectroClustersEdgeImportCreated struct { + /*Audit uid for the request + */ + AuditUID string + + Payload *models.V1UID +} + +func (o *V1SpectroClustersEdgeImportCreated) Error() string { + return fmt.Sprintf("[POST /v1/spectroclusters/edge/import][%d] v1SpectroClustersEdgeImportCreated %+v", 201, o.Payload) +} + +func (o *V1SpectroClustersEdgeImportCreated) GetPayload() *models.V1UID { + return o.Payload +} + +func (o *V1SpectroClustersEdgeImportCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header AuditUid + o.AuditUID = response.GetHeader("AuditUid") + + o.Payload = new(models.V1UID) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_edge_native_create_parameters.go b/api/client/v1/v1_spectro_clusters_edge_native_create_parameters.go new file mode 100644 index 00000000..e00b7872 --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_edge_native_create_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1SpectroClustersEdgeNativeCreateParams creates a new V1SpectroClustersEdgeNativeCreateParams object +// with the default values initialized. +func NewV1SpectroClustersEdgeNativeCreateParams() *V1SpectroClustersEdgeNativeCreateParams { + var () + return &V1SpectroClustersEdgeNativeCreateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1SpectroClustersEdgeNativeCreateParamsWithTimeout creates a new V1SpectroClustersEdgeNativeCreateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1SpectroClustersEdgeNativeCreateParamsWithTimeout(timeout time.Duration) *V1SpectroClustersEdgeNativeCreateParams { + var () + return &V1SpectroClustersEdgeNativeCreateParams{ + + timeout: timeout, + } +} + +// NewV1SpectroClustersEdgeNativeCreateParamsWithContext creates a new V1SpectroClustersEdgeNativeCreateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1SpectroClustersEdgeNativeCreateParamsWithContext(ctx context.Context) *V1SpectroClustersEdgeNativeCreateParams { + var () + return &V1SpectroClustersEdgeNativeCreateParams{ + + Context: ctx, + } +} + +// NewV1SpectroClustersEdgeNativeCreateParamsWithHTTPClient creates a new V1SpectroClustersEdgeNativeCreateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1SpectroClustersEdgeNativeCreateParamsWithHTTPClient(client *http.Client) *V1SpectroClustersEdgeNativeCreateParams { + var () + return &V1SpectroClustersEdgeNativeCreateParams{ + HTTPClient: client, + } +} + +/* +V1SpectroClustersEdgeNativeCreateParams contains all the parameters to send to the API endpoint +for the v1 spectro clusters edge native create operation typically these are written to a http.Request +*/ +type V1SpectroClustersEdgeNativeCreateParams struct { + + /*Body*/ + Body *models.V1SpectroEdgeNativeClusterEntity + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 spectro clusters edge native create params +func (o *V1SpectroClustersEdgeNativeCreateParams) WithTimeout(timeout time.Duration) *V1SpectroClustersEdgeNativeCreateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 spectro clusters edge native create params +func (o *V1SpectroClustersEdgeNativeCreateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 spectro clusters edge native create params +func (o *V1SpectroClustersEdgeNativeCreateParams) WithContext(ctx context.Context) *V1SpectroClustersEdgeNativeCreateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 spectro clusters edge native create params +func (o *V1SpectroClustersEdgeNativeCreateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 spectro clusters edge native create params +func (o *V1SpectroClustersEdgeNativeCreateParams) WithHTTPClient(client *http.Client) *V1SpectroClustersEdgeNativeCreateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 spectro clusters edge native create params +func (o *V1SpectroClustersEdgeNativeCreateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 spectro clusters edge native create params +func (o *V1SpectroClustersEdgeNativeCreateParams) WithBody(body *models.V1SpectroEdgeNativeClusterEntity) *V1SpectroClustersEdgeNativeCreateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 spectro clusters edge native create params +func (o *V1SpectroClustersEdgeNativeCreateParams) SetBody(body *models.V1SpectroEdgeNativeClusterEntity) { + o.Body = body +} + +// WriteToRequest writes these params to a swagger request +func (o *V1SpectroClustersEdgeNativeCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_edge_native_create_responses.go b/api/client/v1/v1_spectro_clusters_edge_native_create_responses.go new file mode 100644 index 00000000..c1135694 --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_edge_native_create_responses.go @@ -0,0 +1,77 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1SpectroClustersEdgeNativeCreateReader is a Reader for the V1SpectroClustersEdgeNativeCreate structure. +type V1SpectroClustersEdgeNativeCreateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1SpectroClustersEdgeNativeCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 201: + result := NewV1SpectroClustersEdgeNativeCreateCreated() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1SpectroClustersEdgeNativeCreateCreated creates a V1SpectroClustersEdgeNativeCreateCreated with default headers values +func NewV1SpectroClustersEdgeNativeCreateCreated() *V1SpectroClustersEdgeNativeCreateCreated { + return &V1SpectroClustersEdgeNativeCreateCreated{} +} + +/* +V1SpectroClustersEdgeNativeCreateCreated handles this case with default header values. + +Created successfully +*/ +type V1SpectroClustersEdgeNativeCreateCreated struct { + /*Audit uid for the request + */ + AuditUID string + + Payload *models.V1UID +} + +func (o *V1SpectroClustersEdgeNativeCreateCreated) Error() string { + return fmt.Sprintf("[POST /v1/spectroclusters/edge-native][%d] v1SpectroClustersEdgeNativeCreateCreated %+v", 201, o.Payload) +} + +func (o *V1SpectroClustersEdgeNativeCreateCreated) GetPayload() *models.V1UID { + return o.Payload +} + +func (o *V1SpectroClustersEdgeNativeCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header AuditUid + o.AuditUID = response.GetHeader("AuditUid") + + o.Payload = new(models.V1UID) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_edge_native_import_parameters.go b/api/client/v1/v1_spectro_clusters_edge_native_import_parameters.go new file mode 100644 index 00000000..209fb221 --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_edge_native_import_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1SpectroClustersEdgeNativeImportParams creates a new V1SpectroClustersEdgeNativeImportParams object +// with the default values initialized. +func NewV1SpectroClustersEdgeNativeImportParams() *V1SpectroClustersEdgeNativeImportParams { + var () + return &V1SpectroClustersEdgeNativeImportParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1SpectroClustersEdgeNativeImportParamsWithTimeout creates a new V1SpectroClustersEdgeNativeImportParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1SpectroClustersEdgeNativeImportParamsWithTimeout(timeout time.Duration) *V1SpectroClustersEdgeNativeImportParams { + var () + return &V1SpectroClustersEdgeNativeImportParams{ + + timeout: timeout, + } +} + +// NewV1SpectroClustersEdgeNativeImportParamsWithContext creates a new V1SpectroClustersEdgeNativeImportParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1SpectroClustersEdgeNativeImportParamsWithContext(ctx context.Context) *V1SpectroClustersEdgeNativeImportParams { + var () + return &V1SpectroClustersEdgeNativeImportParams{ + + Context: ctx, + } +} + +// NewV1SpectroClustersEdgeNativeImportParamsWithHTTPClient creates a new V1SpectroClustersEdgeNativeImportParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1SpectroClustersEdgeNativeImportParamsWithHTTPClient(client *http.Client) *V1SpectroClustersEdgeNativeImportParams { + var () + return &V1SpectroClustersEdgeNativeImportParams{ + HTTPClient: client, + } +} + +/* +V1SpectroClustersEdgeNativeImportParams contains all the parameters to send to the API endpoint +for the v1 spectro clusters edge native import operation typically these are written to a http.Request +*/ +type V1SpectroClustersEdgeNativeImportParams struct { + + /*Body*/ + Body *models.V1SpectroEdgeNativeClusterImportEntity + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 spectro clusters edge native import params +func (o *V1SpectroClustersEdgeNativeImportParams) WithTimeout(timeout time.Duration) *V1SpectroClustersEdgeNativeImportParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 spectro clusters edge native import params +func (o *V1SpectroClustersEdgeNativeImportParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 spectro clusters edge native import params +func (o *V1SpectroClustersEdgeNativeImportParams) WithContext(ctx context.Context) *V1SpectroClustersEdgeNativeImportParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 spectro clusters edge native import params +func (o *V1SpectroClustersEdgeNativeImportParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 spectro clusters edge native import params +func (o *V1SpectroClustersEdgeNativeImportParams) WithHTTPClient(client *http.Client) *V1SpectroClustersEdgeNativeImportParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 spectro clusters edge native import params +func (o *V1SpectroClustersEdgeNativeImportParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 spectro clusters edge native import params +func (o *V1SpectroClustersEdgeNativeImportParams) WithBody(body *models.V1SpectroEdgeNativeClusterImportEntity) *V1SpectroClustersEdgeNativeImportParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 spectro clusters edge native import params +func (o *V1SpectroClustersEdgeNativeImportParams) SetBody(body *models.V1SpectroEdgeNativeClusterImportEntity) { + o.Body = body +} + +// WriteToRequest writes these params to a swagger request +func (o *V1SpectroClustersEdgeNativeImportParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_edge_native_import_responses.go b/api/client/v1/v1_spectro_clusters_edge_native_import_responses.go new file mode 100644 index 00000000..77ba61b8 --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_edge_native_import_responses.go @@ -0,0 +1,77 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1SpectroClustersEdgeNativeImportReader is a Reader for the V1SpectroClustersEdgeNativeImport structure. +type V1SpectroClustersEdgeNativeImportReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1SpectroClustersEdgeNativeImportReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 201: + result := NewV1SpectroClustersEdgeNativeImportCreated() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1SpectroClustersEdgeNativeImportCreated creates a V1SpectroClustersEdgeNativeImportCreated with default headers values +func NewV1SpectroClustersEdgeNativeImportCreated() *V1SpectroClustersEdgeNativeImportCreated { + return &V1SpectroClustersEdgeNativeImportCreated{} +} + +/* +V1SpectroClustersEdgeNativeImportCreated handles this case with default header values. + +Created successfully +*/ +type V1SpectroClustersEdgeNativeImportCreated struct { + /*Audit uid for the request + */ + AuditUID string + + Payload *models.V1UID +} + +func (o *V1SpectroClustersEdgeNativeImportCreated) Error() string { + return fmt.Sprintf("[POST /v1/spectroclusters/edge-native/import][%d] v1SpectroClustersEdgeNativeImportCreated %+v", 201, o.Payload) +} + +func (o *V1SpectroClustersEdgeNativeImportCreated) GetPayload() *models.V1UID { + return o.Payload +} + +func (o *V1SpectroClustersEdgeNativeImportCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header AuditUid + o.AuditUID = response.GetHeader("AuditUid") + + o.Payload = new(models.V1UID) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_edge_native_rate_parameters.go b/api/client/v1/v1_spectro_clusters_edge_native_rate_parameters.go new file mode 100644 index 00000000..6d7a3584 --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_edge_native_rate_parameters.go @@ -0,0 +1,177 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1SpectroClustersEdgeNativeRateParams creates a new V1SpectroClustersEdgeNativeRateParams object +// with the default values initialized. +func NewV1SpectroClustersEdgeNativeRateParams() *V1SpectroClustersEdgeNativeRateParams { + var ( + periodTypeDefault = string("hourly") + ) + return &V1SpectroClustersEdgeNativeRateParams{ + PeriodType: &periodTypeDefault, + + timeout: cr.DefaultTimeout, + } +} + +// NewV1SpectroClustersEdgeNativeRateParamsWithTimeout creates a new V1SpectroClustersEdgeNativeRateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1SpectroClustersEdgeNativeRateParamsWithTimeout(timeout time.Duration) *V1SpectroClustersEdgeNativeRateParams { + var ( + periodTypeDefault = string("hourly") + ) + return &V1SpectroClustersEdgeNativeRateParams{ + PeriodType: &periodTypeDefault, + + timeout: timeout, + } +} + +// NewV1SpectroClustersEdgeNativeRateParamsWithContext creates a new V1SpectroClustersEdgeNativeRateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1SpectroClustersEdgeNativeRateParamsWithContext(ctx context.Context) *V1SpectroClustersEdgeNativeRateParams { + var ( + periodTypeDefault = string("hourly") + ) + return &V1SpectroClustersEdgeNativeRateParams{ + PeriodType: &periodTypeDefault, + + Context: ctx, + } +} + +// NewV1SpectroClustersEdgeNativeRateParamsWithHTTPClient creates a new V1SpectroClustersEdgeNativeRateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1SpectroClustersEdgeNativeRateParamsWithHTTPClient(client *http.Client) *V1SpectroClustersEdgeNativeRateParams { + var ( + periodTypeDefault = string("hourly") + ) + return &V1SpectroClustersEdgeNativeRateParams{ + PeriodType: &periodTypeDefault, + HTTPClient: client, + } +} + +/* +V1SpectroClustersEdgeNativeRateParams contains all the parameters to send to the API endpoint +for the v1 spectro clusters edge native rate operation typically these are written to a http.Request +*/ +type V1SpectroClustersEdgeNativeRateParams struct { + + /*Body*/ + Body *models.V1SpectroEdgeNativeClusterRateEntity + /*PeriodType*/ + PeriodType *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 spectro clusters edge native rate params +func (o *V1SpectroClustersEdgeNativeRateParams) WithTimeout(timeout time.Duration) *V1SpectroClustersEdgeNativeRateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 spectro clusters edge native rate params +func (o *V1SpectroClustersEdgeNativeRateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 spectro clusters edge native rate params +func (o *V1SpectroClustersEdgeNativeRateParams) WithContext(ctx context.Context) *V1SpectroClustersEdgeNativeRateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 spectro clusters edge native rate params +func (o *V1SpectroClustersEdgeNativeRateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 spectro clusters edge native rate params +func (o *V1SpectroClustersEdgeNativeRateParams) WithHTTPClient(client *http.Client) *V1SpectroClustersEdgeNativeRateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 spectro clusters edge native rate params +func (o *V1SpectroClustersEdgeNativeRateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 spectro clusters edge native rate params +func (o *V1SpectroClustersEdgeNativeRateParams) WithBody(body *models.V1SpectroEdgeNativeClusterRateEntity) *V1SpectroClustersEdgeNativeRateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 spectro clusters edge native rate params +func (o *V1SpectroClustersEdgeNativeRateParams) SetBody(body *models.V1SpectroEdgeNativeClusterRateEntity) { + o.Body = body +} + +// WithPeriodType adds the periodType to the v1 spectro clusters edge native rate params +func (o *V1SpectroClustersEdgeNativeRateParams) WithPeriodType(periodType *string) *V1SpectroClustersEdgeNativeRateParams { + o.SetPeriodType(periodType) + return o +} + +// SetPeriodType adds the periodType to the v1 spectro clusters edge native rate params +func (o *V1SpectroClustersEdgeNativeRateParams) SetPeriodType(periodType *string) { + o.PeriodType = periodType +} + +// WriteToRequest writes these params to a swagger request +func (o *V1SpectroClustersEdgeNativeRateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + if o.PeriodType != nil { + + // query param periodType + var qrPeriodType string + if o.PeriodType != nil { + qrPeriodType = *o.PeriodType + } + qPeriodType := qrPeriodType + if qPeriodType != "" { + if err := r.SetQueryParam("periodType", qPeriodType); err != nil { + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_edge_native_rate_responses.go b/api/client/v1/v1_spectro_clusters_edge_native_rate_responses.go new file mode 100644 index 00000000..692b5e89 --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_edge_native_rate_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1SpectroClustersEdgeNativeRateReader is a Reader for the V1SpectroClustersEdgeNativeRate structure. +type V1SpectroClustersEdgeNativeRateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1SpectroClustersEdgeNativeRateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1SpectroClustersEdgeNativeRateOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1SpectroClustersEdgeNativeRateOK creates a V1SpectroClustersEdgeNativeRateOK with default headers values +func NewV1SpectroClustersEdgeNativeRateOK() *V1SpectroClustersEdgeNativeRateOK { + return &V1SpectroClustersEdgeNativeRateOK{} +} + +/* +V1SpectroClustersEdgeNativeRateOK handles this case with default header values. + +EdgeNative Cluster estimated rate response +*/ +type V1SpectroClustersEdgeNativeRateOK struct { + Payload *models.V1SpectroClusterRate +} + +func (o *V1SpectroClustersEdgeNativeRateOK) Error() string { + return fmt.Sprintf("[POST /v1/spectroclusters/edge-native/rate][%d] v1SpectroClustersEdgeNativeRateOK %+v", 200, o.Payload) +} + +func (o *V1SpectroClustersEdgeNativeRateOK) GetPayload() *models.V1SpectroClusterRate { + return o.Payload +} + +func (o *V1SpectroClustersEdgeNativeRateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1SpectroClusterRate) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_edge_native_validate_parameters.go b/api/client/v1/v1_spectro_clusters_edge_native_validate_parameters.go new file mode 100644 index 00000000..5fdf471e --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_edge_native_validate_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1SpectroClustersEdgeNativeValidateParams creates a new V1SpectroClustersEdgeNativeValidateParams object +// with the default values initialized. +func NewV1SpectroClustersEdgeNativeValidateParams() *V1SpectroClustersEdgeNativeValidateParams { + var () + return &V1SpectroClustersEdgeNativeValidateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1SpectroClustersEdgeNativeValidateParamsWithTimeout creates a new V1SpectroClustersEdgeNativeValidateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1SpectroClustersEdgeNativeValidateParamsWithTimeout(timeout time.Duration) *V1SpectroClustersEdgeNativeValidateParams { + var () + return &V1SpectroClustersEdgeNativeValidateParams{ + + timeout: timeout, + } +} + +// NewV1SpectroClustersEdgeNativeValidateParamsWithContext creates a new V1SpectroClustersEdgeNativeValidateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1SpectroClustersEdgeNativeValidateParamsWithContext(ctx context.Context) *V1SpectroClustersEdgeNativeValidateParams { + var () + return &V1SpectroClustersEdgeNativeValidateParams{ + + Context: ctx, + } +} + +// NewV1SpectroClustersEdgeNativeValidateParamsWithHTTPClient creates a new V1SpectroClustersEdgeNativeValidateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1SpectroClustersEdgeNativeValidateParamsWithHTTPClient(client *http.Client) *V1SpectroClustersEdgeNativeValidateParams { + var () + return &V1SpectroClustersEdgeNativeValidateParams{ + HTTPClient: client, + } +} + +/* +V1SpectroClustersEdgeNativeValidateParams contains all the parameters to send to the API endpoint +for the v1 spectro clusters edge native validate operation typically these are written to a http.Request +*/ +type V1SpectroClustersEdgeNativeValidateParams struct { + + /*Body*/ + Body *models.V1SpectroEdgeNativeClusterEntity + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 spectro clusters edge native validate params +func (o *V1SpectroClustersEdgeNativeValidateParams) WithTimeout(timeout time.Duration) *V1SpectroClustersEdgeNativeValidateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 spectro clusters edge native validate params +func (o *V1SpectroClustersEdgeNativeValidateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 spectro clusters edge native validate params +func (o *V1SpectroClustersEdgeNativeValidateParams) WithContext(ctx context.Context) *V1SpectroClustersEdgeNativeValidateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 spectro clusters edge native validate params +func (o *V1SpectroClustersEdgeNativeValidateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 spectro clusters edge native validate params +func (o *V1SpectroClustersEdgeNativeValidateParams) WithHTTPClient(client *http.Client) *V1SpectroClustersEdgeNativeValidateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 spectro clusters edge native validate params +func (o *V1SpectroClustersEdgeNativeValidateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 spectro clusters edge native validate params +func (o *V1SpectroClustersEdgeNativeValidateParams) WithBody(body *models.V1SpectroEdgeNativeClusterEntity) *V1SpectroClustersEdgeNativeValidateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 spectro clusters edge native validate params +func (o *V1SpectroClustersEdgeNativeValidateParams) SetBody(body *models.V1SpectroEdgeNativeClusterEntity) { + o.Body = body +} + +// WriteToRequest writes these params to a swagger request +func (o *V1SpectroClustersEdgeNativeValidateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_edge_native_validate_responses.go b/api/client/v1/v1_spectro_clusters_edge_native_validate_responses.go new file mode 100644 index 00000000..30b9dc05 --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_edge_native_validate_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1SpectroClustersEdgeNativeValidateReader is a Reader for the V1SpectroClustersEdgeNativeValidate structure. +type V1SpectroClustersEdgeNativeValidateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1SpectroClustersEdgeNativeValidateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1SpectroClustersEdgeNativeValidateOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1SpectroClustersEdgeNativeValidateOK creates a V1SpectroClustersEdgeNativeValidateOK with default headers values +func NewV1SpectroClustersEdgeNativeValidateOK() *V1SpectroClustersEdgeNativeValidateOK { + return &V1SpectroClustersEdgeNativeValidateOK{} +} + +/* +V1SpectroClustersEdgeNativeValidateOK handles this case with default header values. + +EdgeNative Cluster validation response +*/ +type V1SpectroClustersEdgeNativeValidateOK struct { + Payload *models.V1SpectroClusterValidatorResponse +} + +func (o *V1SpectroClustersEdgeNativeValidateOK) Error() string { + return fmt.Sprintf("[POST /v1/spectroclusters/edge-native/validate][%d] v1SpectroClustersEdgeNativeValidateOK %+v", 200, o.Payload) +} + +func (o *V1SpectroClustersEdgeNativeValidateOK) GetPayload() *models.V1SpectroClusterValidatorResponse { + return o.Payload +} + +func (o *V1SpectroClustersEdgeNativeValidateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1SpectroClusterValidatorResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_edge_rate_parameters.go b/api/client/v1/v1_spectro_clusters_edge_rate_parameters.go new file mode 100644 index 00000000..5b32e19e --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_edge_rate_parameters.go @@ -0,0 +1,177 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1SpectroClustersEdgeRateParams creates a new V1SpectroClustersEdgeRateParams object +// with the default values initialized. +func NewV1SpectroClustersEdgeRateParams() *V1SpectroClustersEdgeRateParams { + var ( + periodTypeDefault = string("hourly") + ) + return &V1SpectroClustersEdgeRateParams{ + PeriodType: &periodTypeDefault, + + timeout: cr.DefaultTimeout, + } +} + +// NewV1SpectroClustersEdgeRateParamsWithTimeout creates a new V1SpectroClustersEdgeRateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1SpectroClustersEdgeRateParamsWithTimeout(timeout time.Duration) *V1SpectroClustersEdgeRateParams { + var ( + periodTypeDefault = string("hourly") + ) + return &V1SpectroClustersEdgeRateParams{ + PeriodType: &periodTypeDefault, + + timeout: timeout, + } +} + +// NewV1SpectroClustersEdgeRateParamsWithContext creates a new V1SpectroClustersEdgeRateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1SpectroClustersEdgeRateParamsWithContext(ctx context.Context) *V1SpectroClustersEdgeRateParams { + var ( + periodTypeDefault = string("hourly") + ) + return &V1SpectroClustersEdgeRateParams{ + PeriodType: &periodTypeDefault, + + Context: ctx, + } +} + +// NewV1SpectroClustersEdgeRateParamsWithHTTPClient creates a new V1SpectroClustersEdgeRateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1SpectroClustersEdgeRateParamsWithHTTPClient(client *http.Client) *V1SpectroClustersEdgeRateParams { + var ( + periodTypeDefault = string("hourly") + ) + return &V1SpectroClustersEdgeRateParams{ + PeriodType: &periodTypeDefault, + HTTPClient: client, + } +} + +/* +V1SpectroClustersEdgeRateParams contains all the parameters to send to the API endpoint +for the v1 spectro clusters edge rate operation typically these are written to a http.Request +*/ +type V1SpectroClustersEdgeRateParams struct { + + /*Body*/ + Body *models.V1SpectroEdgeClusterRateEntity + /*PeriodType*/ + PeriodType *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 spectro clusters edge rate params +func (o *V1SpectroClustersEdgeRateParams) WithTimeout(timeout time.Duration) *V1SpectroClustersEdgeRateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 spectro clusters edge rate params +func (o *V1SpectroClustersEdgeRateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 spectro clusters edge rate params +func (o *V1SpectroClustersEdgeRateParams) WithContext(ctx context.Context) *V1SpectroClustersEdgeRateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 spectro clusters edge rate params +func (o *V1SpectroClustersEdgeRateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 spectro clusters edge rate params +func (o *V1SpectroClustersEdgeRateParams) WithHTTPClient(client *http.Client) *V1SpectroClustersEdgeRateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 spectro clusters edge rate params +func (o *V1SpectroClustersEdgeRateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 spectro clusters edge rate params +func (o *V1SpectroClustersEdgeRateParams) WithBody(body *models.V1SpectroEdgeClusterRateEntity) *V1SpectroClustersEdgeRateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 spectro clusters edge rate params +func (o *V1SpectroClustersEdgeRateParams) SetBody(body *models.V1SpectroEdgeClusterRateEntity) { + o.Body = body +} + +// WithPeriodType adds the periodType to the v1 spectro clusters edge rate params +func (o *V1SpectroClustersEdgeRateParams) WithPeriodType(periodType *string) *V1SpectroClustersEdgeRateParams { + o.SetPeriodType(periodType) + return o +} + +// SetPeriodType adds the periodType to the v1 spectro clusters edge rate params +func (o *V1SpectroClustersEdgeRateParams) SetPeriodType(periodType *string) { + o.PeriodType = periodType +} + +// WriteToRequest writes these params to a swagger request +func (o *V1SpectroClustersEdgeRateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + if o.PeriodType != nil { + + // query param periodType + var qrPeriodType string + if o.PeriodType != nil { + qrPeriodType = *o.PeriodType + } + qPeriodType := qrPeriodType + if qPeriodType != "" { + if err := r.SetQueryParam("periodType", qPeriodType); err != nil { + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_edge_rate_responses.go b/api/client/v1/v1_spectro_clusters_edge_rate_responses.go new file mode 100644 index 00000000..ce5a5d01 --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_edge_rate_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1SpectroClustersEdgeRateReader is a Reader for the V1SpectroClustersEdgeRate structure. +type V1SpectroClustersEdgeRateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1SpectroClustersEdgeRateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1SpectroClustersEdgeRateOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1SpectroClustersEdgeRateOK creates a V1SpectroClustersEdgeRateOK with default headers values +func NewV1SpectroClustersEdgeRateOK() *V1SpectroClustersEdgeRateOK { + return &V1SpectroClustersEdgeRateOK{} +} + +/* +V1SpectroClustersEdgeRateOK handles this case with default header values. + +Edge Cluster estimated rate response +*/ +type V1SpectroClustersEdgeRateOK struct { + Payload *models.V1SpectroClusterRate +} + +func (o *V1SpectroClustersEdgeRateOK) Error() string { + return fmt.Sprintf("[POST /v1/spectroclusters/edge/rate][%d] v1SpectroClustersEdgeRateOK %+v", 200, o.Payload) +} + +func (o *V1SpectroClustersEdgeRateOK) GetPayload() *models.V1SpectroClusterRate { + return o.Payload +} + +func (o *V1SpectroClustersEdgeRateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1SpectroClusterRate) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_edge_validate_parameters.go b/api/client/v1/v1_spectro_clusters_edge_validate_parameters.go new file mode 100644 index 00000000..2dafd275 --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_edge_validate_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1SpectroClustersEdgeValidateParams creates a new V1SpectroClustersEdgeValidateParams object +// with the default values initialized. +func NewV1SpectroClustersEdgeValidateParams() *V1SpectroClustersEdgeValidateParams { + var () + return &V1SpectroClustersEdgeValidateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1SpectroClustersEdgeValidateParamsWithTimeout creates a new V1SpectroClustersEdgeValidateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1SpectroClustersEdgeValidateParamsWithTimeout(timeout time.Duration) *V1SpectroClustersEdgeValidateParams { + var () + return &V1SpectroClustersEdgeValidateParams{ + + timeout: timeout, + } +} + +// NewV1SpectroClustersEdgeValidateParamsWithContext creates a new V1SpectroClustersEdgeValidateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1SpectroClustersEdgeValidateParamsWithContext(ctx context.Context) *V1SpectroClustersEdgeValidateParams { + var () + return &V1SpectroClustersEdgeValidateParams{ + + Context: ctx, + } +} + +// NewV1SpectroClustersEdgeValidateParamsWithHTTPClient creates a new V1SpectroClustersEdgeValidateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1SpectroClustersEdgeValidateParamsWithHTTPClient(client *http.Client) *V1SpectroClustersEdgeValidateParams { + var () + return &V1SpectroClustersEdgeValidateParams{ + HTTPClient: client, + } +} + +/* +V1SpectroClustersEdgeValidateParams contains all the parameters to send to the API endpoint +for the v1 spectro clusters edge validate operation typically these are written to a http.Request +*/ +type V1SpectroClustersEdgeValidateParams struct { + + /*Body*/ + Body *models.V1SpectroEdgeClusterEntity + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 spectro clusters edge validate params +func (o *V1SpectroClustersEdgeValidateParams) WithTimeout(timeout time.Duration) *V1SpectroClustersEdgeValidateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 spectro clusters edge validate params +func (o *V1SpectroClustersEdgeValidateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 spectro clusters edge validate params +func (o *V1SpectroClustersEdgeValidateParams) WithContext(ctx context.Context) *V1SpectroClustersEdgeValidateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 spectro clusters edge validate params +func (o *V1SpectroClustersEdgeValidateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 spectro clusters edge validate params +func (o *V1SpectroClustersEdgeValidateParams) WithHTTPClient(client *http.Client) *V1SpectroClustersEdgeValidateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 spectro clusters edge validate params +func (o *V1SpectroClustersEdgeValidateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 spectro clusters edge validate params +func (o *V1SpectroClustersEdgeValidateParams) WithBody(body *models.V1SpectroEdgeClusterEntity) *V1SpectroClustersEdgeValidateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 spectro clusters edge validate params +func (o *V1SpectroClustersEdgeValidateParams) SetBody(body *models.V1SpectroEdgeClusterEntity) { + o.Body = body +} + +// WriteToRequest writes these params to a swagger request +func (o *V1SpectroClustersEdgeValidateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_edge_validate_responses.go b/api/client/v1/v1_spectro_clusters_edge_validate_responses.go new file mode 100644 index 00000000..3b5998d2 --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_edge_validate_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1SpectroClustersEdgeValidateReader is a Reader for the V1SpectroClustersEdgeValidate structure. +type V1SpectroClustersEdgeValidateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1SpectroClustersEdgeValidateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1SpectroClustersEdgeValidateOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1SpectroClustersEdgeValidateOK creates a V1SpectroClustersEdgeValidateOK with default headers values +func NewV1SpectroClustersEdgeValidateOK() *V1SpectroClustersEdgeValidateOK { + return &V1SpectroClustersEdgeValidateOK{} +} + +/* +V1SpectroClustersEdgeValidateOK handles this case with default header values. + +edge Cluster validation response +*/ +type V1SpectroClustersEdgeValidateOK struct { + Payload *models.V1SpectroClusterValidatorResponse +} + +func (o *V1SpectroClustersEdgeValidateOK) Error() string { + return fmt.Sprintf("[POST /v1/spectroclusters/edge/validate][%d] v1SpectroClustersEdgeValidateOK %+v", 200, o.Payload) +} + +func (o *V1SpectroClustersEdgeValidateOK) GetPayload() *models.V1SpectroClusterValidatorResponse { + return o.Payload +} + +func (o *V1SpectroClustersEdgeValidateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1SpectroClusterValidatorResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_eks_create_parameters.go b/api/client/v1/v1_spectro_clusters_eks_create_parameters.go new file mode 100644 index 00000000..43f6cf25 --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_eks_create_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1SpectroClustersEksCreateParams creates a new V1SpectroClustersEksCreateParams object +// with the default values initialized. +func NewV1SpectroClustersEksCreateParams() *V1SpectroClustersEksCreateParams { + var () + return &V1SpectroClustersEksCreateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1SpectroClustersEksCreateParamsWithTimeout creates a new V1SpectroClustersEksCreateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1SpectroClustersEksCreateParamsWithTimeout(timeout time.Duration) *V1SpectroClustersEksCreateParams { + var () + return &V1SpectroClustersEksCreateParams{ + + timeout: timeout, + } +} + +// NewV1SpectroClustersEksCreateParamsWithContext creates a new V1SpectroClustersEksCreateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1SpectroClustersEksCreateParamsWithContext(ctx context.Context) *V1SpectroClustersEksCreateParams { + var () + return &V1SpectroClustersEksCreateParams{ + + Context: ctx, + } +} + +// NewV1SpectroClustersEksCreateParamsWithHTTPClient creates a new V1SpectroClustersEksCreateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1SpectroClustersEksCreateParamsWithHTTPClient(client *http.Client) *V1SpectroClustersEksCreateParams { + var () + return &V1SpectroClustersEksCreateParams{ + HTTPClient: client, + } +} + +/* +V1SpectroClustersEksCreateParams contains all the parameters to send to the API endpoint +for the v1 spectro clusters eks create operation typically these are written to a http.Request +*/ +type V1SpectroClustersEksCreateParams struct { + + /*Body*/ + Body *models.V1SpectroEksClusterEntity + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 spectro clusters eks create params +func (o *V1SpectroClustersEksCreateParams) WithTimeout(timeout time.Duration) *V1SpectroClustersEksCreateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 spectro clusters eks create params +func (o *V1SpectroClustersEksCreateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 spectro clusters eks create params +func (o *V1SpectroClustersEksCreateParams) WithContext(ctx context.Context) *V1SpectroClustersEksCreateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 spectro clusters eks create params +func (o *V1SpectroClustersEksCreateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 spectro clusters eks create params +func (o *V1SpectroClustersEksCreateParams) WithHTTPClient(client *http.Client) *V1SpectroClustersEksCreateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 spectro clusters eks create params +func (o *V1SpectroClustersEksCreateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 spectro clusters eks create params +func (o *V1SpectroClustersEksCreateParams) WithBody(body *models.V1SpectroEksClusterEntity) *V1SpectroClustersEksCreateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 spectro clusters eks create params +func (o *V1SpectroClustersEksCreateParams) SetBody(body *models.V1SpectroEksClusterEntity) { + o.Body = body +} + +// WriteToRequest writes these params to a swagger request +func (o *V1SpectroClustersEksCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_eks_create_responses.go b/api/client/v1/v1_spectro_clusters_eks_create_responses.go new file mode 100644 index 00000000..9c20befa --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_eks_create_responses.go @@ -0,0 +1,77 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1SpectroClustersEksCreateReader is a Reader for the V1SpectroClustersEksCreate structure. +type V1SpectroClustersEksCreateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1SpectroClustersEksCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 201: + result := NewV1SpectroClustersEksCreateCreated() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1SpectroClustersEksCreateCreated creates a V1SpectroClustersEksCreateCreated with default headers values +func NewV1SpectroClustersEksCreateCreated() *V1SpectroClustersEksCreateCreated { + return &V1SpectroClustersEksCreateCreated{} +} + +/* +V1SpectroClustersEksCreateCreated handles this case with default header values. + +Created successfully +*/ +type V1SpectroClustersEksCreateCreated struct { + /*Audit uid for the request + */ + AuditUID string + + Payload *models.V1UID +} + +func (o *V1SpectroClustersEksCreateCreated) Error() string { + return fmt.Sprintf("[POST /v1/spectroclusters/eks][%d] v1SpectroClustersEksCreateCreated %+v", 201, o.Payload) +} + +func (o *V1SpectroClustersEksCreateCreated) GetPayload() *models.V1UID { + return o.Payload +} + +func (o *V1SpectroClustersEksCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header AuditUid + o.AuditUID = response.GetHeader("AuditUid") + + o.Payload = new(models.V1UID) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_eks_rate_parameters.go b/api/client/v1/v1_spectro_clusters_eks_rate_parameters.go new file mode 100644 index 00000000..7f5bbb52 --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_eks_rate_parameters.go @@ -0,0 +1,177 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1SpectroClustersEksRateParams creates a new V1SpectroClustersEksRateParams object +// with the default values initialized. +func NewV1SpectroClustersEksRateParams() *V1SpectroClustersEksRateParams { + var ( + periodTypeDefault = string("hourly") + ) + return &V1SpectroClustersEksRateParams{ + PeriodType: &periodTypeDefault, + + timeout: cr.DefaultTimeout, + } +} + +// NewV1SpectroClustersEksRateParamsWithTimeout creates a new V1SpectroClustersEksRateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1SpectroClustersEksRateParamsWithTimeout(timeout time.Duration) *V1SpectroClustersEksRateParams { + var ( + periodTypeDefault = string("hourly") + ) + return &V1SpectroClustersEksRateParams{ + PeriodType: &periodTypeDefault, + + timeout: timeout, + } +} + +// NewV1SpectroClustersEksRateParamsWithContext creates a new V1SpectroClustersEksRateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1SpectroClustersEksRateParamsWithContext(ctx context.Context) *V1SpectroClustersEksRateParams { + var ( + periodTypeDefault = string("hourly") + ) + return &V1SpectroClustersEksRateParams{ + PeriodType: &periodTypeDefault, + + Context: ctx, + } +} + +// NewV1SpectroClustersEksRateParamsWithHTTPClient creates a new V1SpectroClustersEksRateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1SpectroClustersEksRateParamsWithHTTPClient(client *http.Client) *V1SpectroClustersEksRateParams { + var ( + periodTypeDefault = string("hourly") + ) + return &V1SpectroClustersEksRateParams{ + PeriodType: &periodTypeDefault, + HTTPClient: client, + } +} + +/* +V1SpectroClustersEksRateParams contains all the parameters to send to the API endpoint +for the v1 spectro clusters eks rate operation typically these are written to a http.Request +*/ +type V1SpectroClustersEksRateParams struct { + + /*Body*/ + Body *models.V1SpectroEksClusterRateEntity + /*PeriodType*/ + PeriodType *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 spectro clusters eks rate params +func (o *V1SpectroClustersEksRateParams) WithTimeout(timeout time.Duration) *V1SpectroClustersEksRateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 spectro clusters eks rate params +func (o *V1SpectroClustersEksRateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 spectro clusters eks rate params +func (o *V1SpectroClustersEksRateParams) WithContext(ctx context.Context) *V1SpectroClustersEksRateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 spectro clusters eks rate params +func (o *V1SpectroClustersEksRateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 spectro clusters eks rate params +func (o *V1SpectroClustersEksRateParams) WithHTTPClient(client *http.Client) *V1SpectroClustersEksRateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 spectro clusters eks rate params +func (o *V1SpectroClustersEksRateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 spectro clusters eks rate params +func (o *V1SpectroClustersEksRateParams) WithBody(body *models.V1SpectroEksClusterRateEntity) *V1SpectroClustersEksRateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 spectro clusters eks rate params +func (o *V1SpectroClustersEksRateParams) SetBody(body *models.V1SpectroEksClusterRateEntity) { + o.Body = body +} + +// WithPeriodType adds the periodType to the v1 spectro clusters eks rate params +func (o *V1SpectroClustersEksRateParams) WithPeriodType(periodType *string) *V1SpectroClustersEksRateParams { + o.SetPeriodType(periodType) + return o +} + +// SetPeriodType adds the periodType to the v1 spectro clusters eks rate params +func (o *V1SpectroClustersEksRateParams) SetPeriodType(periodType *string) { + o.PeriodType = periodType +} + +// WriteToRequest writes these params to a swagger request +func (o *V1SpectroClustersEksRateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + if o.PeriodType != nil { + + // query param periodType + var qrPeriodType string + if o.PeriodType != nil { + qrPeriodType = *o.PeriodType + } + qPeriodType := qrPeriodType + if qPeriodType != "" { + if err := r.SetQueryParam("periodType", qPeriodType); err != nil { + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_eks_rate_responses.go b/api/client/v1/v1_spectro_clusters_eks_rate_responses.go new file mode 100644 index 00000000..f1f7355f --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_eks_rate_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1SpectroClustersEksRateReader is a Reader for the V1SpectroClustersEksRate structure. +type V1SpectroClustersEksRateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1SpectroClustersEksRateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1SpectroClustersEksRateOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1SpectroClustersEksRateOK creates a V1SpectroClustersEksRateOK with default headers values +func NewV1SpectroClustersEksRateOK() *V1SpectroClustersEksRateOK { + return &V1SpectroClustersEksRateOK{} +} + +/* +V1SpectroClustersEksRateOK handles this case with default header values. + +Eks Cluster estimated rate response +*/ +type V1SpectroClustersEksRateOK struct { + Payload *models.V1SpectroClusterRate +} + +func (o *V1SpectroClustersEksRateOK) Error() string { + return fmt.Sprintf("[POST /v1/spectroclusters/eks/rate][%d] v1SpectroClustersEksRateOK %+v", 200, o.Payload) +} + +func (o *V1SpectroClustersEksRateOK) GetPayload() *models.V1SpectroClusterRate { + return o.Payload +} + +func (o *V1SpectroClustersEksRateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1SpectroClusterRate) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_eks_validate_parameters.go b/api/client/v1/v1_spectro_clusters_eks_validate_parameters.go new file mode 100644 index 00000000..e37742c1 --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_eks_validate_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1SpectroClustersEksValidateParams creates a new V1SpectroClustersEksValidateParams object +// with the default values initialized. +func NewV1SpectroClustersEksValidateParams() *V1SpectroClustersEksValidateParams { + var () + return &V1SpectroClustersEksValidateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1SpectroClustersEksValidateParamsWithTimeout creates a new V1SpectroClustersEksValidateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1SpectroClustersEksValidateParamsWithTimeout(timeout time.Duration) *V1SpectroClustersEksValidateParams { + var () + return &V1SpectroClustersEksValidateParams{ + + timeout: timeout, + } +} + +// NewV1SpectroClustersEksValidateParamsWithContext creates a new V1SpectroClustersEksValidateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1SpectroClustersEksValidateParamsWithContext(ctx context.Context) *V1SpectroClustersEksValidateParams { + var () + return &V1SpectroClustersEksValidateParams{ + + Context: ctx, + } +} + +// NewV1SpectroClustersEksValidateParamsWithHTTPClient creates a new V1SpectroClustersEksValidateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1SpectroClustersEksValidateParamsWithHTTPClient(client *http.Client) *V1SpectroClustersEksValidateParams { + var () + return &V1SpectroClustersEksValidateParams{ + HTTPClient: client, + } +} + +/* +V1SpectroClustersEksValidateParams contains all the parameters to send to the API endpoint +for the v1 spectro clusters eks validate operation typically these are written to a http.Request +*/ +type V1SpectroClustersEksValidateParams struct { + + /*Body*/ + Body *models.V1SpectroEksClusterEntity + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 spectro clusters eks validate params +func (o *V1SpectroClustersEksValidateParams) WithTimeout(timeout time.Duration) *V1SpectroClustersEksValidateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 spectro clusters eks validate params +func (o *V1SpectroClustersEksValidateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 spectro clusters eks validate params +func (o *V1SpectroClustersEksValidateParams) WithContext(ctx context.Context) *V1SpectroClustersEksValidateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 spectro clusters eks validate params +func (o *V1SpectroClustersEksValidateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 spectro clusters eks validate params +func (o *V1SpectroClustersEksValidateParams) WithHTTPClient(client *http.Client) *V1SpectroClustersEksValidateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 spectro clusters eks validate params +func (o *V1SpectroClustersEksValidateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 spectro clusters eks validate params +func (o *V1SpectroClustersEksValidateParams) WithBody(body *models.V1SpectroEksClusterEntity) *V1SpectroClustersEksValidateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 spectro clusters eks validate params +func (o *V1SpectroClustersEksValidateParams) SetBody(body *models.V1SpectroEksClusterEntity) { + o.Body = body +} + +// WriteToRequest writes these params to a swagger request +func (o *V1SpectroClustersEksValidateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_eks_validate_responses.go b/api/client/v1/v1_spectro_clusters_eks_validate_responses.go new file mode 100644 index 00000000..392cb2b2 --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_eks_validate_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1SpectroClustersEksValidateReader is a Reader for the V1SpectroClustersEksValidate structure. +type V1SpectroClustersEksValidateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1SpectroClustersEksValidateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1SpectroClustersEksValidateOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1SpectroClustersEksValidateOK creates a V1SpectroClustersEksValidateOK with default headers values +func NewV1SpectroClustersEksValidateOK() *V1SpectroClustersEksValidateOK { + return &V1SpectroClustersEksValidateOK{} +} + +/* +V1SpectroClustersEksValidateOK handles this case with default header values. + +Eks Cluster validation response +*/ +type V1SpectroClustersEksValidateOK struct { + Payload *models.V1SpectroClusterValidatorResponse +} + +func (o *V1SpectroClustersEksValidateOK) Error() string { + return fmt.Sprintf("[POST /v1/spectroclusters/eks/validate][%d] v1SpectroClustersEksValidateOK %+v", 200, o.Payload) +} + +func (o *V1SpectroClustersEksValidateOK) GetPayload() *models.V1SpectroClusterValidatorResponse { + return o.Payload +} + +func (o *V1SpectroClustersEksValidateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1SpectroClusterValidatorResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_filters_workspace_parameters.go b/api/client/v1/v1_spectro_clusters_filters_workspace_parameters.go new file mode 100644 index 00000000..8f293547 --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_filters_workspace_parameters.go @@ -0,0 +1,225 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// NewV1SpectroClustersFiltersWorkspaceParams creates a new V1SpectroClustersFiltersWorkspaceParams object +// with the default values initialized. +func NewV1SpectroClustersFiltersWorkspaceParams() *V1SpectroClustersFiltersWorkspaceParams { + var ( + limitDefault = int64(50) + ) + return &V1SpectroClustersFiltersWorkspaceParams{ + Limit: &limitDefault, + + timeout: cr.DefaultTimeout, + } +} + +// NewV1SpectroClustersFiltersWorkspaceParamsWithTimeout creates a new V1SpectroClustersFiltersWorkspaceParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1SpectroClustersFiltersWorkspaceParamsWithTimeout(timeout time.Duration) *V1SpectroClustersFiltersWorkspaceParams { + var ( + limitDefault = int64(50) + ) + return &V1SpectroClustersFiltersWorkspaceParams{ + Limit: &limitDefault, + + timeout: timeout, + } +} + +// NewV1SpectroClustersFiltersWorkspaceParamsWithContext creates a new V1SpectroClustersFiltersWorkspaceParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1SpectroClustersFiltersWorkspaceParamsWithContext(ctx context.Context) *V1SpectroClustersFiltersWorkspaceParams { + var ( + limitDefault = int64(50) + ) + return &V1SpectroClustersFiltersWorkspaceParams{ + Limit: &limitDefault, + + Context: ctx, + } +} + +// NewV1SpectroClustersFiltersWorkspaceParamsWithHTTPClient creates a new V1SpectroClustersFiltersWorkspaceParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1SpectroClustersFiltersWorkspaceParamsWithHTTPClient(client *http.Client) *V1SpectroClustersFiltersWorkspaceParams { + var ( + limitDefault = int64(50) + ) + return &V1SpectroClustersFiltersWorkspaceParams{ + Limit: &limitDefault, + HTTPClient: client, + } +} + +/* +V1SpectroClustersFiltersWorkspaceParams contains all the parameters to send to the API endpoint +for the v1 spectro clusters filters workspace operation typically these are written to a http.Request +*/ +type V1SpectroClustersFiltersWorkspaceParams struct { + + /*Continue + continue token to paginate the subsequent data items + + */ + Continue *string + /*Limit + limit is a maximum number of responses to return for a list call. Default and maximum value of the limit is 50. + If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. + + */ + Limit *int64 + /*Offset + offset is the next index number from which the response will start. The response offset value can be used along with continue token for the pagination. + + */ + Offset *int64 + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 spectro clusters filters workspace params +func (o *V1SpectroClustersFiltersWorkspaceParams) WithTimeout(timeout time.Duration) *V1SpectroClustersFiltersWorkspaceParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 spectro clusters filters workspace params +func (o *V1SpectroClustersFiltersWorkspaceParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 spectro clusters filters workspace params +func (o *V1SpectroClustersFiltersWorkspaceParams) WithContext(ctx context.Context) *V1SpectroClustersFiltersWorkspaceParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 spectro clusters filters workspace params +func (o *V1SpectroClustersFiltersWorkspaceParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 spectro clusters filters workspace params +func (o *V1SpectroClustersFiltersWorkspaceParams) WithHTTPClient(client *http.Client) *V1SpectroClustersFiltersWorkspaceParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 spectro clusters filters workspace params +func (o *V1SpectroClustersFiltersWorkspaceParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithContinue adds the continueVar to the v1 spectro clusters filters workspace params +func (o *V1SpectroClustersFiltersWorkspaceParams) WithContinue(continueVar *string) *V1SpectroClustersFiltersWorkspaceParams { + o.SetContinue(continueVar) + return o +} + +// SetContinue adds the continue to the v1 spectro clusters filters workspace params +func (o *V1SpectroClustersFiltersWorkspaceParams) SetContinue(continueVar *string) { + o.Continue = continueVar +} + +// WithLimit adds the limit to the v1 spectro clusters filters workspace params +func (o *V1SpectroClustersFiltersWorkspaceParams) WithLimit(limit *int64) *V1SpectroClustersFiltersWorkspaceParams { + o.SetLimit(limit) + return o +} + +// SetLimit adds the limit to the v1 spectro clusters filters workspace params +func (o *V1SpectroClustersFiltersWorkspaceParams) SetLimit(limit *int64) { + o.Limit = limit +} + +// WithOffset adds the offset to the v1 spectro clusters filters workspace params +func (o *V1SpectroClustersFiltersWorkspaceParams) WithOffset(offset *int64) *V1SpectroClustersFiltersWorkspaceParams { + o.SetOffset(offset) + return o +} + +// SetOffset adds the offset to the v1 spectro clusters filters workspace params +func (o *V1SpectroClustersFiltersWorkspaceParams) SetOffset(offset *int64) { + o.Offset = offset +} + +// WriteToRequest writes these params to a swagger request +func (o *V1SpectroClustersFiltersWorkspaceParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Continue != nil { + + // query param continue + var qrContinue string + if o.Continue != nil { + qrContinue = *o.Continue + } + qContinue := qrContinue + if qContinue != "" { + if err := r.SetQueryParam("continue", qContinue); err != nil { + return err + } + } + + } + + if o.Limit != nil { + + // query param limit + var qrLimit int64 + if o.Limit != nil { + qrLimit = *o.Limit + } + qLimit := swag.FormatInt64(qrLimit) + if qLimit != "" { + if err := r.SetQueryParam("limit", qLimit); err != nil { + return err + } + } + + } + + if o.Offset != nil { + + // query param offset + var qrOffset int64 + if o.Offset != nil { + qrOffset = *o.Offset + } + qOffset := swag.FormatInt64(qrOffset) + if qOffset != "" { + if err := r.SetQueryParam("offset", qOffset); err != nil { + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_filters_workspace_responses.go b/api/client/v1/v1_spectro_clusters_filters_workspace_responses.go new file mode 100644 index 00000000..dbe8f781 --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_filters_workspace_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1SpectroClustersFiltersWorkspaceReader is a Reader for the V1SpectroClustersFiltersWorkspace structure. +type V1SpectroClustersFiltersWorkspaceReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1SpectroClustersFiltersWorkspaceReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1SpectroClustersFiltersWorkspaceOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1SpectroClustersFiltersWorkspaceOK creates a V1SpectroClustersFiltersWorkspaceOK with default headers values +func NewV1SpectroClustersFiltersWorkspaceOK() *V1SpectroClustersFiltersWorkspaceOK { + return &V1SpectroClustersFiltersWorkspaceOK{} +} + +/* +V1SpectroClustersFiltersWorkspaceOK handles this case with default header values. + +An array of cluster summary items +*/ +type V1SpectroClustersFiltersWorkspaceOK struct { + Payload *models.V1SpectroClustersSummary +} + +func (o *V1SpectroClustersFiltersWorkspaceOK) Error() string { + return fmt.Sprintf("[GET /v1/dashboard/spectroclusters/filters/workspace][%d] v1SpectroClustersFiltersWorkspaceOK %+v", 200, o.Payload) +} + +func (o *V1SpectroClustersFiltersWorkspaceOK) GetPayload() *models.V1SpectroClustersSummary { + return o.Payload +} + +func (o *V1SpectroClustersFiltersWorkspaceOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1SpectroClustersSummary) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_gcp_create_parameters.go b/api/client/v1/v1_spectro_clusters_gcp_create_parameters.go new file mode 100644 index 00000000..0ab219af --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_gcp_create_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1SpectroClustersGcpCreateParams creates a new V1SpectroClustersGcpCreateParams object +// with the default values initialized. +func NewV1SpectroClustersGcpCreateParams() *V1SpectroClustersGcpCreateParams { + var () + return &V1SpectroClustersGcpCreateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1SpectroClustersGcpCreateParamsWithTimeout creates a new V1SpectroClustersGcpCreateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1SpectroClustersGcpCreateParamsWithTimeout(timeout time.Duration) *V1SpectroClustersGcpCreateParams { + var () + return &V1SpectroClustersGcpCreateParams{ + + timeout: timeout, + } +} + +// NewV1SpectroClustersGcpCreateParamsWithContext creates a new V1SpectroClustersGcpCreateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1SpectroClustersGcpCreateParamsWithContext(ctx context.Context) *V1SpectroClustersGcpCreateParams { + var () + return &V1SpectroClustersGcpCreateParams{ + + Context: ctx, + } +} + +// NewV1SpectroClustersGcpCreateParamsWithHTTPClient creates a new V1SpectroClustersGcpCreateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1SpectroClustersGcpCreateParamsWithHTTPClient(client *http.Client) *V1SpectroClustersGcpCreateParams { + var () + return &V1SpectroClustersGcpCreateParams{ + HTTPClient: client, + } +} + +/* +V1SpectroClustersGcpCreateParams contains all the parameters to send to the API endpoint +for the v1 spectro clusters gcp create operation typically these are written to a http.Request +*/ +type V1SpectroClustersGcpCreateParams struct { + + /*Body*/ + Body *models.V1SpectroGcpClusterEntity + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 spectro clusters gcp create params +func (o *V1SpectroClustersGcpCreateParams) WithTimeout(timeout time.Duration) *V1SpectroClustersGcpCreateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 spectro clusters gcp create params +func (o *V1SpectroClustersGcpCreateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 spectro clusters gcp create params +func (o *V1SpectroClustersGcpCreateParams) WithContext(ctx context.Context) *V1SpectroClustersGcpCreateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 spectro clusters gcp create params +func (o *V1SpectroClustersGcpCreateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 spectro clusters gcp create params +func (o *V1SpectroClustersGcpCreateParams) WithHTTPClient(client *http.Client) *V1SpectroClustersGcpCreateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 spectro clusters gcp create params +func (o *V1SpectroClustersGcpCreateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 spectro clusters gcp create params +func (o *V1SpectroClustersGcpCreateParams) WithBody(body *models.V1SpectroGcpClusterEntity) *V1SpectroClustersGcpCreateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 spectro clusters gcp create params +func (o *V1SpectroClustersGcpCreateParams) SetBody(body *models.V1SpectroGcpClusterEntity) { + o.Body = body +} + +// WriteToRequest writes these params to a swagger request +func (o *V1SpectroClustersGcpCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_gcp_create_responses.go b/api/client/v1/v1_spectro_clusters_gcp_create_responses.go new file mode 100644 index 00000000..75ae15b6 --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_gcp_create_responses.go @@ -0,0 +1,77 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1SpectroClustersGcpCreateReader is a Reader for the V1SpectroClustersGcpCreate structure. +type V1SpectroClustersGcpCreateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1SpectroClustersGcpCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 201: + result := NewV1SpectroClustersGcpCreateCreated() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1SpectroClustersGcpCreateCreated creates a V1SpectroClustersGcpCreateCreated with default headers values +func NewV1SpectroClustersGcpCreateCreated() *V1SpectroClustersGcpCreateCreated { + return &V1SpectroClustersGcpCreateCreated{} +} + +/* +V1SpectroClustersGcpCreateCreated handles this case with default header values. + +Created successfully +*/ +type V1SpectroClustersGcpCreateCreated struct { + /*Audit uid for the request + */ + AuditUID string + + Payload *models.V1UID +} + +func (o *V1SpectroClustersGcpCreateCreated) Error() string { + return fmt.Sprintf("[POST /v1/spectroclusters/gcp][%d] v1SpectroClustersGcpCreateCreated %+v", 201, o.Payload) +} + +func (o *V1SpectroClustersGcpCreateCreated) GetPayload() *models.V1UID { + return o.Payload +} + +func (o *V1SpectroClustersGcpCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header AuditUid + o.AuditUID = response.GetHeader("AuditUid") + + o.Payload = new(models.V1UID) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_gcp_import_parameters.go b/api/client/v1/v1_spectro_clusters_gcp_import_parameters.go new file mode 100644 index 00000000..4e41c403 --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_gcp_import_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1SpectroClustersGcpImportParams creates a new V1SpectroClustersGcpImportParams object +// with the default values initialized. +func NewV1SpectroClustersGcpImportParams() *V1SpectroClustersGcpImportParams { + var () + return &V1SpectroClustersGcpImportParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1SpectroClustersGcpImportParamsWithTimeout creates a new V1SpectroClustersGcpImportParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1SpectroClustersGcpImportParamsWithTimeout(timeout time.Duration) *V1SpectroClustersGcpImportParams { + var () + return &V1SpectroClustersGcpImportParams{ + + timeout: timeout, + } +} + +// NewV1SpectroClustersGcpImportParamsWithContext creates a new V1SpectroClustersGcpImportParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1SpectroClustersGcpImportParamsWithContext(ctx context.Context) *V1SpectroClustersGcpImportParams { + var () + return &V1SpectroClustersGcpImportParams{ + + Context: ctx, + } +} + +// NewV1SpectroClustersGcpImportParamsWithHTTPClient creates a new V1SpectroClustersGcpImportParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1SpectroClustersGcpImportParamsWithHTTPClient(client *http.Client) *V1SpectroClustersGcpImportParams { + var () + return &V1SpectroClustersGcpImportParams{ + HTTPClient: client, + } +} + +/* +V1SpectroClustersGcpImportParams contains all the parameters to send to the API endpoint +for the v1 spectro clusters gcp import operation typically these are written to a http.Request +*/ +type V1SpectroClustersGcpImportParams struct { + + /*Body*/ + Body *models.V1SpectroGcpClusterImportEntity + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 spectro clusters gcp import params +func (o *V1SpectroClustersGcpImportParams) WithTimeout(timeout time.Duration) *V1SpectroClustersGcpImportParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 spectro clusters gcp import params +func (o *V1SpectroClustersGcpImportParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 spectro clusters gcp import params +func (o *V1SpectroClustersGcpImportParams) WithContext(ctx context.Context) *V1SpectroClustersGcpImportParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 spectro clusters gcp import params +func (o *V1SpectroClustersGcpImportParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 spectro clusters gcp import params +func (o *V1SpectroClustersGcpImportParams) WithHTTPClient(client *http.Client) *V1SpectroClustersGcpImportParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 spectro clusters gcp import params +func (o *V1SpectroClustersGcpImportParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 spectro clusters gcp import params +func (o *V1SpectroClustersGcpImportParams) WithBody(body *models.V1SpectroGcpClusterImportEntity) *V1SpectroClustersGcpImportParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 spectro clusters gcp import params +func (o *V1SpectroClustersGcpImportParams) SetBody(body *models.V1SpectroGcpClusterImportEntity) { + o.Body = body +} + +// WriteToRequest writes these params to a swagger request +func (o *V1SpectroClustersGcpImportParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_gcp_import_responses.go b/api/client/v1/v1_spectro_clusters_gcp_import_responses.go new file mode 100644 index 00000000..6af4cc73 --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_gcp_import_responses.go @@ -0,0 +1,77 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1SpectroClustersGcpImportReader is a Reader for the V1SpectroClustersGcpImport structure. +type V1SpectroClustersGcpImportReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1SpectroClustersGcpImportReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 201: + result := NewV1SpectroClustersGcpImportCreated() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1SpectroClustersGcpImportCreated creates a V1SpectroClustersGcpImportCreated with default headers values +func NewV1SpectroClustersGcpImportCreated() *V1SpectroClustersGcpImportCreated { + return &V1SpectroClustersGcpImportCreated{} +} + +/* +V1SpectroClustersGcpImportCreated handles this case with default header values. + +Created successfully +*/ +type V1SpectroClustersGcpImportCreated struct { + /*Audit uid for the request + */ + AuditUID string + + Payload *models.V1UID +} + +func (o *V1SpectroClustersGcpImportCreated) Error() string { + return fmt.Sprintf("[POST /v1/spectroclusters/gcp/import][%d] v1SpectroClustersGcpImportCreated %+v", 201, o.Payload) +} + +func (o *V1SpectroClustersGcpImportCreated) GetPayload() *models.V1UID { + return o.Payload +} + +func (o *V1SpectroClustersGcpImportCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header AuditUid + o.AuditUID = response.GetHeader("AuditUid") + + o.Payload = new(models.V1UID) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_gcp_rate_parameters.go b/api/client/v1/v1_spectro_clusters_gcp_rate_parameters.go new file mode 100644 index 00000000..71ad8991 --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_gcp_rate_parameters.go @@ -0,0 +1,177 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1SpectroClustersGcpRateParams creates a new V1SpectroClustersGcpRateParams object +// with the default values initialized. +func NewV1SpectroClustersGcpRateParams() *V1SpectroClustersGcpRateParams { + var ( + periodTypeDefault = string("hourly") + ) + return &V1SpectroClustersGcpRateParams{ + PeriodType: &periodTypeDefault, + + timeout: cr.DefaultTimeout, + } +} + +// NewV1SpectroClustersGcpRateParamsWithTimeout creates a new V1SpectroClustersGcpRateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1SpectroClustersGcpRateParamsWithTimeout(timeout time.Duration) *V1SpectroClustersGcpRateParams { + var ( + periodTypeDefault = string("hourly") + ) + return &V1SpectroClustersGcpRateParams{ + PeriodType: &periodTypeDefault, + + timeout: timeout, + } +} + +// NewV1SpectroClustersGcpRateParamsWithContext creates a new V1SpectroClustersGcpRateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1SpectroClustersGcpRateParamsWithContext(ctx context.Context) *V1SpectroClustersGcpRateParams { + var ( + periodTypeDefault = string("hourly") + ) + return &V1SpectroClustersGcpRateParams{ + PeriodType: &periodTypeDefault, + + Context: ctx, + } +} + +// NewV1SpectroClustersGcpRateParamsWithHTTPClient creates a new V1SpectroClustersGcpRateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1SpectroClustersGcpRateParamsWithHTTPClient(client *http.Client) *V1SpectroClustersGcpRateParams { + var ( + periodTypeDefault = string("hourly") + ) + return &V1SpectroClustersGcpRateParams{ + PeriodType: &periodTypeDefault, + HTTPClient: client, + } +} + +/* +V1SpectroClustersGcpRateParams contains all the parameters to send to the API endpoint +for the v1 spectro clusters gcp rate operation typically these are written to a http.Request +*/ +type V1SpectroClustersGcpRateParams struct { + + /*Body*/ + Body *models.V1SpectroGcpClusterRateEntity + /*PeriodType*/ + PeriodType *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 spectro clusters gcp rate params +func (o *V1SpectroClustersGcpRateParams) WithTimeout(timeout time.Duration) *V1SpectroClustersGcpRateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 spectro clusters gcp rate params +func (o *V1SpectroClustersGcpRateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 spectro clusters gcp rate params +func (o *V1SpectroClustersGcpRateParams) WithContext(ctx context.Context) *V1SpectroClustersGcpRateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 spectro clusters gcp rate params +func (o *V1SpectroClustersGcpRateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 spectro clusters gcp rate params +func (o *V1SpectroClustersGcpRateParams) WithHTTPClient(client *http.Client) *V1SpectroClustersGcpRateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 spectro clusters gcp rate params +func (o *V1SpectroClustersGcpRateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 spectro clusters gcp rate params +func (o *V1SpectroClustersGcpRateParams) WithBody(body *models.V1SpectroGcpClusterRateEntity) *V1SpectroClustersGcpRateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 spectro clusters gcp rate params +func (o *V1SpectroClustersGcpRateParams) SetBody(body *models.V1SpectroGcpClusterRateEntity) { + o.Body = body +} + +// WithPeriodType adds the periodType to the v1 spectro clusters gcp rate params +func (o *V1SpectroClustersGcpRateParams) WithPeriodType(periodType *string) *V1SpectroClustersGcpRateParams { + o.SetPeriodType(periodType) + return o +} + +// SetPeriodType adds the periodType to the v1 spectro clusters gcp rate params +func (o *V1SpectroClustersGcpRateParams) SetPeriodType(periodType *string) { + o.PeriodType = periodType +} + +// WriteToRequest writes these params to a swagger request +func (o *V1SpectroClustersGcpRateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + if o.PeriodType != nil { + + // query param periodType + var qrPeriodType string + if o.PeriodType != nil { + qrPeriodType = *o.PeriodType + } + qPeriodType := qrPeriodType + if qPeriodType != "" { + if err := r.SetQueryParam("periodType", qPeriodType); err != nil { + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_gcp_rate_responses.go b/api/client/v1/v1_spectro_clusters_gcp_rate_responses.go new file mode 100644 index 00000000..3292d0c1 --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_gcp_rate_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1SpectroClustersGcpRateReader is a Reader for the V1SpectroClustersGcpRate structure. +type V1SpectroClustersGcpRateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1SpectroClustersGcpRateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1SpectroClustersGcpRateOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1SpectroClustersGcpRateOK creates a V1SpectroClustersGcpRateOK with default headers values +func NewV1SpectroClustersGcpRateOK() *V1SpectroClustersGcpRateOK { + return &V1SpectroClustersGcpRateOK{} +} + +/* +V1SpectroClustersGcpRateOK handles this case with default header values. + +Gcp Cluster estimated rate response +*/ +type V1SpectroClustersGcpRateOK struct { + Payload *models.V1SpectroClusterRate +} + +func (o *V1SpectroClustersGcpRateOK) Error() string { + return fmt.Sprintf("[POST /v1/spectroclusters/gcp/rate][%d] v1SpectroClustersGcpRateOK %+v", 200, o.Payload) +} + +func (o *V1SpectroClustersGcpRateOK) GetPayload() *models.V1SpectroClusterRate { + return o.Payload +} + +func (o *V1SpectroClustersGcpRateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1SpectroClusterRate) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_gcp_validate_parameters.go b/api/client/v1/v1_spectro_clusters_gcp_validate_parameters.go new file mode 100644 index 00000000..367b5603 --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_gcp_validate_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1SpectroClustersGcpValidateParams creates a new V1SpectroClustersGcpValidateParams object +// with the default values initialized. +func NewV1SpectroClustersGcpValidateParams() *V1SpectroClustersGcpValidateParams { + var () + return &V1SpectroClustersGcpValidateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1SpectroClustersGcpValidateParamsWithTimeout creates a new V1SpectroClustersGcpValidateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1SpectroClustersGcpValidateParamsWithTimeout(timeout time.Duration) *V1SpectroClustersGcpValidateParams { + var () + return &V1SpectroClustersGcpValidateParams{ + + timeout: timeout, + } +} + +// NewV1SpectroClustersGcpValidateParamsWithContext creates a new V1SpectroClustersGcpValidateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1SpectroClustersGcpValidateParamsWithContext(ctx context.Context) *V1SpectroClustersGcpValidateParams { + var () + return &V1SpectroClustersGcpValidateParams{ + + Context: ctx, + } +} + +// NewV1SpectroClustersGcpValidateParamsWithHTTPClient creates a new V1SpectroClustersGcpValidateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1SpectroClustersGcpValidateParamsWithHTTPClient(client *http.Client) *V1SpectroClustersGcpValidateParams { + var () + return &V1SpectroClustersGcpValidateParams{ + HTTPClient: client, + } +} + +/* +V1SpectroClustersGcpValidateParams contains all the parameters to send to the API endpoint +for the v1 spectro clusters gcp validate operation typically these are written to a http.Request +*/ +type V1SpectroClustersGcpValidateParams struct { + + /*Body*/ + Body *models.V1SpectroGcpClusterEntity + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 spectro clusters gcp validate params +func (o *V1SpectroClustersGcpValidateParams) WithTimeout(timeout time.Duration) *V1SpectroClustersGcpValidateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 spectro clusters gcp validate params +func (o *V1SpectroClustersGcpValidateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 spectro clusters gcp validate params +func (o *V1SpectroClustersGcpValidateParams) WithContext(ctx context.Context) *V1SpectroClustersGcpValidateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 spectro clusters gcp validate params +func (o *V1SpectroClustersGcpValidateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 spectro clusters gcp validate params +func (o *V1SpectroClustersGcpValidateParams) WithHTTPClient(client *http.Client) *V1SpectroClustersGcpValidateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 spectro clusters gcp validate params +func (o *V1SpectroClustersGcpValidateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 spectro clusters gcp validate params +func (o *V1SpectroClustersGcpValidateParams) WithBody(body *models.V1SpectroGcpClusterEntity) *V1SpectroClustersGcpValidateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 spectro clusters gcp validate params +func (o *V1SpectroClustersGcpValidateParams) SetBody(body *models.V1SpectroGcpClusterEntity) { + o.Body = body +} + +// WriteToRequest writes these params to a swagger request +func (o *V1SpectroClustersGcpValidateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_gcp_validate_responses.go b/api/client/v1/v1_spectro_clusters_gcp_validate_responses.go new file mode 100644 index 00000000..dfb7e338 --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_gcp_validate_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1SpectroClustersGcpValidateReader is a Reader for the V1SpectroClustersGcpValidate structure. +type V1SpectroClustersGcpValidateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1SpectroClustersGcpValidateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1SpectroClustersGcpValidateOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1SpectroClustersGcpValidateOK creates a V1SpectroClustersGcpValidateOK with default headers values +func NewV1SpectroClustersGcpValidateOK() *V1SpectroClustersGcpValidateOK { + return &V1SpectroClustersGcpValidateOK{} +} + +/* +V1SpectroClustersGcpValidateOK handles this case with default header values. + +Gcp Cluster validation response +*/ +type V1SpectroClustersGcpValidateOK struct { + Payload *models.V1SpectroClusterValidatorResponse +} + +func (o *V1SpectroClustersGcpValidateOK) Error() string { + return fmt.Sprintf("[POST /v1/spectroclusters/gcp/validate][%d] v1SpectroClustersGcpValidateOK %+v", 200, o.Payload) +} + +func (o *V1SpectroClustersGcpValidateOK) GetPayload() *models.V1SpectroClusterValidatorResponse { + return o.Payload +} + +func (o *V1SpectroClustersGcpValidateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1SpectroClusterValidatorResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_generic_import_parameters.go b/api/client/v1/v1_spectro_clusters_generic_import_parameters.go new file mode 100644 index 00000000..f8cbd5e6 --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_generic_import_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1SpectroClustersGenericImportParams creates a new V1SpectroClustersGenericImportParams object +// with the default values initialized. +func NewV1SpectroClustersGenericImportParams() *V1SpectroClustersGenericImportParams { + var () + return &V1SpectroClustersGenericImportParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1SpectroClustersGenericImportParamsWithTimeout creates a new V1SpectroClustersGenericImportParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1SpectroClustersGenericImportParamsWithTimeout(timeout time.Duration) *V1SpectroClustersGenericImportParams { + var () + return &V1SpectroClustersGenericImportParams{ + + timeout: timeout, + } +} + +// NewV1SpectroClustersGenericImportParamsWithContext creates a new V1SpectroClustersGenericImportParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1SpectroClustersGenericImportParamsWithContext(ctx context.Context) *V1SpectroClustersGenericImportParams { + var () + return &V1SpectroClustersGenericImportParams{ + + Context: ctx, + } +} + +// NewV1SpectroClustersGenericImportParamsWithHTTPClient creates a new V1SpectroClustersGenericImportParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1SpectroClustersGenericImportParamsWithHTTPClient(client *http.Client) *V1SpectroClustersGenericImportParams { + var () + return &V1SpectroClustersGenericImportParams{ + HTTPClient: client, + } +} + +/* +V1SpectroClustersGenericImportParams contains all the parameters to send to the API endpoint +for the v1 spectro clusters generic import operation typically these are written to a http.Request +*/ +type V1SpectroClustersGenericImportParams struct { + + /*Body*/ + Body *models.V1SpectroGenericClusterImportEntity + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 spectro clusters generic import params +func (o *V1SpectroClustersGenericImportParams) WithTimeout(timeout time.Duration) *V1SpectroClustersGenericImportParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 spectro clusters generic import params +func (o *V1SpectroClustersGenericImportParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 spectro clusters generic import params +func (o *V1SpectroClustersGenericImportParams) WithContext(ctx context.Context) *V1SpectroClustersGenericImportParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 spectro clusters generic import params +func (o *V1SpectroClustersGenericImportParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 spectro clusters generic import params +func (o *V1SpectroClustersGenericImportParams) WithHTTPClient(client *http.Client) *V1SpectroClustersGenericImportParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 spectro clusters generic import params +func (o *V1SpectroClustersGenericImportParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 spectro clusters generic import params +func (o *V1SpectroClustersGenericImportParams) WithBody(body *models.V1SpectroGenericClusterImportEntity) *V1SpectroClustersGenericImportParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 spectro clusters generic import params +func (o *V1SpectroClustersGenericImportParams) SetBody(body *models.V1SpectroGenericClusterImportEntity) { + o.Body = body +} + +// WriteToRequest writes these params to a swagger request +func (o *V1SpectroClustersGenericImportParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_generic_import_responses.go b/api/client/v1/v1_spectro_clusters_generic_import_responses.go new file mode 100644 index 00000000..fb5ab6e6 --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_generic_import_responses.go @@ -0,0 +1,77 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1SpectroClustersGenericImportReader is a Reader for the V1SpectroClustersGenericImport structure. +type V1SpectroClustersGenericImportReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1SpectroClustersGenericImportReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 201: + result := NewV1SpectroClustersGenericImportCreated() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1SpectroClustersGenericImportCreated creates a V1SpectroClustersGenericImportCreated with default headers values +func NewV1SpectroClustersGenericImportCreated() *V1SpectroClustersGenericImportCreated { + return &V1SpectroClustersGenericImportCreated{} +} + +/* +V1SpectroClustersGenericImportCreated handles this case with default header values. + +Created successfully +*/ +type V1SpectroClustersGenericImportCreated struct { + /*Audit uid for the request + */ + AuditUID string + + Payload *models.V1UID +} + +func (o *V1SpectroClustersGenericImportCreated) Error() string { + return fmt.Sprintf("[POST /v1/spectroclusters/generic/import][%d] v1SpectroClustersGenericImportCreated %+v", 201, o.Payload) +} + +func (o *V1SpectroClustersGenericImportCreated) GetPayload() *models.V1UID { + return o.Payload +} + +func (o *V1SpectroClustersGenericImportCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header AuditUid + o.AuditUID = response.GetHeader("AuditUid") + + o.Payload = new(models.V1UID) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_generic_rate_parameters.go b/api/client/v1/v1_spectro_clusters_generic_rate_parameters.go new file mode 100644 index 00000000..8b0b28a3 --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_generic_rate_parameters.go @@ -0,0 +1,177 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1SpectroClustersGenericRateParams creates a new V1SpectroClustersGenericRateParams object +// with the default values initialized. +func NewV1SpectroClustersGenericRateParams() *V1SpectroClustersGenericRateParams { + var ( + periodTypeDefault = string("hourly") + ) + return &V1SpectroClustersGenericRateParams{ + PeriodType: &periodTypeDefault, + + timeout: cr.DefaultTimeout, + } +} + +// NewV1SpectroClustersGenericRateParamsWithTimeout creates a new V1SpectroClustersGenericRateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1SpectroClustersGenericRateParamsWithTimeout(timeout time.Duration) *V1SpectroClustersGenericRateParams { + var ( + periodTypeDefault = string("hourly") + ) + return &V1SpectroClustersGenericRateParams{ + PeriodType: &periodTypeDefault, + + timeout: timeout, + } +} + +// NewV1SpectroClustersGenericRateParamsWithContext creates a new V1SpectroClustersGenericRateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1SpectroClustersGenericRateParamsWithContext(ctx context.Context) *V1SpectroClustersGenericRateParams { + var ( + periodTypeDefault = string("hourly") + ) + return &V1SpectroClustersGenericRateParams{ + PeriodType: &periodTypeDefault, + + Context: ctx, + } +} + +// NewV1SpectroClustersGenericRateParamsWithHTTPClient creates a new V1SpectroClustersGenericRateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1SpectroClustersGenericRateParamsWithHTTPClient(client *http.Client) *V1SpectroClustersGenericRateParams { + var ( + periodTypeDefault = string("hourly") + ) + return &V1SpectroClustersGenericRateParams{ + PeriodType: &periodTypeDefault, + HTTPClient: client, + } +} + +/* +V1SpectroClustersGenericRateParams contains all the parameters to send to the API endpoint +for the v1 spectro clusters generic rate operation typically these are written to a http.Request +*/ +type V1SpectroClustersGenericRateParams struct { + + /*Body*/ + Body *models.V1SpectroGenericClusterRateEntity + /*PeriodType*/ + PeriodType *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 spectro clusters generic rate params +func (o *V1SpectroClustersGenericRateParams) WithTimeout(timeout time.Duration) *V1SpectroClustersGenericRateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 spectro clusters generic rate params +func (o *V1SpectroClustersGenericRateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 spectro clusters generic rate params +func (o *V1SpectroClustersGenericRateParams) WithContext(ctx context.Context) *V1SpectroClustersGenericRateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 spectro clusters generic rate params +func (o *V1SpectroClustersGenericRateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 spectro clusters generic rate params +func (o *V1SpectroClustersGenericRateParams) WithHTTPClient(client *http.Client) *V1SpectroClustersGenericRateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 spectro clusters generic rate params +func (o *V1SpectroClustersGenericRateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 spectro clusters generic rate params +func (o *V1SpectroClustersGenericRateParams) WithBody(body *models.V1SpectroGenericClusterRateEntity) *V1SpectroClustersGenericRateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 spectro clusters generic rate params +func (o *V1SpectroClustersGenericRateParams) SetBody(body *models.V1SpectroGenericClusterRateEntity) { + o.Body = body +} + +// WithPeriodType adds the periodType to the v1 spectro clusters generic rate params +func (o *V1SpectroClustersGenericRateParams) WithPeriodType(periodType *string) *V1SpectroClustersGenericRateParams { + o.SetPeriodType(periodType) + return o +} + +// SetPeriodType adds the periodType to the v1 spectro clusters generic rate params +func (o *V1SpectroClustersGenericRateParams) SetPeriodType(periodType *string) { + o.PeriodType = periodType +} + +// WriteToRequest writes these params to a swagger request +func (o *V1SpectroClustersGenericRateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + if o.PeriodType != nil { + + // query param periodType + var qrPeriodType string + if o.PeriodType != nil { + qrPeriodType = *o.PeriodType + } + qPeriodType := qrPeriodType + if qPeriodType != "" { + if err := r.SetQueryParam("periodType", qPeriodType); err != nil { + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_generic_rate_responses.go b/api/client/v1/v1_spectro_clusters_generic_rate_responses.go new file mode 100644 index 00000000..d10a98b4 --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_generic_rate_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1SpectroClustersGenericRateReader is a Reader for the V1SpectroClustersGenericRate structure. +type V1SpectroClustersGenericRateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1SpectroClustersGenericRateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1SpectroClustersGenericRateOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1SpectroClustersGenericRateOK creates a V1SpectroClustersGenericRateOK with default headers values +func NewV1SpectroClustersGenericRateOK() *V1SpectroClustersGenericRateOK { + return &V1SpectroClustersGenericRateOK{} +} + +/* +V1SpectroClustersGenericRateOK handles this case with default header values. + +Genric Cluster estimated rate response +*/ +type V1SpectroClustersGenericRateOK struct { + Payload *models.V1SpectroClusterRate +} + +func (o *V1SpectroClustersGenericRateOK) Error() string { + return fmt.Sprintf("[POST /v1/spectroclusters/generic/rate][%d] v1SpectroClustersGenericRateOK %+v", 200, o.Payload) +} + +func (o *V1SpectroClustersGenericRateOK) GetPayload() *models.V1SpectroClusterRate { + return o.Payload +} + +func (o *V1SpectroClustersGenericRateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1SpectroClusterRate) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_get_parameters.go b/api/client/v1/v1_spectro_clusters_get_parameters.go new file mode 100644 index 00000000..86597e41 --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_get_parameters.go @@ -0,0 +1,317 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// NewV1SpectroClustersGetParams creates a new V1SpectroClustersGetParams object +// with the default values initialized. +func NewV1SpectroClustersGetParams() *V1SpectroClustersGetParams { + var ( + includeNonSpectroLabelsDefault = bool(false) + resolvePackValuesDefault = bool(false) + ) + return &V1SpectroClustersGetParams{ + IncludeNonSpectroLabels: &includeNonSpectroLabelsDefault, + ResolvePackValues: &resolvePackValuesDefault, + + timeout: cr.DefaultTimeout, + } +} + +// NewV1SpectroClustersGetParamsWithTimeout creates a new V1SpectroClustersGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1SpectroClustersGetParamsWithTimeout(timeout time.Duration) *V1SpectroClustersGetParams { + var ( + includeNonSpectroLabelsDefault = bool(false) + resolvePackValuesDefault = bool(false) + ) + return &V1SpectroClustersGetParams{ + IncludeNonSpectroLabels: &includeNonSpectroLabelsDefault, + ResolvePackValues: &resolvePackValuesDefault, + + timeout: timeout, + } +} + +// NewV1SpectroClustersGetParamsWithContext creates a new V1SpectroClustersGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1SpectroClustersGetParamsWithContext(ctx context.Context) *V1SpectroClustersGetParams { + var ( + includeNonSpectroLabelsDefault = bool(false) + resolvePackValuesDefault = bool(false) + ) + return &V1SpectroClustersGetParams{ + IncludeNonSpectroLabels: &includeNonSpectroLabelsDefault, + ResolvePackValues: &resolvePackValuesDefault, + + Context: ctx, + } +} + +// NewV1SpectroClustersGetParamsWithHTTPClient creates a new V1SpectroClustersGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1SpectroClustersGetParamsWithHTTPClient(client *http.Client) *V1SpectroClustersGetParams { + var ( + includeNonSpectroLabelsDefault = bool(false) + resolvePackValuesDefault = bool(false) + ) + return &V1SpectroClustersGetParams{ + IncludeNonSpectroLabels: &includeNonSpectroLabelsDefault, + ResolvePackValues: &resolvePackValuesDefault, + HTTPClient: client, + } +} + +/* +V1SpectroClustersGetParams contains all the parameters to send to the API endpoint +for the v1 spectro clusters get operation typically these are written to a http.Request +*/ +type V1SpectroClustersGetParams struct { + + /*IncludeNonSpectroLabels + Include non spectro labels in the cluster labels if set to true + + */ + IncludeNonSpectroLabels *bool + /*IncludePackMeta + Includes pack meta such as schema, presets + + */ + IncludePackMeta *string + /*IncludeTags + Comma separated tags like system,profile + + */ + IncludeTags *string + /*ProfileType + Filter cluster profile templates by profileType + + */ + ProfileType *string + /*ResolvePackValues + Resolve pack values if set to true + + */ + ResolvePackValues *bool + /*UID + Cluster uid + + */ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 spectro clusters get params +func (o *V1SpectroClustersGetParams) WithTimeout(timeout time.Duration) *V1SpectroClustersGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 spectro clusters get params +func (o *V1SpectroClustersGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 spectro clusters get params +func (o *V1SpectroClustersGetParams) WithContext(ctx context.Context) *V1SpectroClustersGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 spectro clusters get params +func (o *V1SpectroClustersGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 spectro clusters get params +func (o *V1SpectroClustersGetParams) WithHTTPClient(client *http.Client) *V1SpectroClustersGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 spectro clusters get params +func (o *V1SpectroClustersGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithIncludeNonSpectroLabels adds the includeNonSpectroLabels to the v1 spectro clusters get params +func (o *V1SpectroClustersGetParams) WithIncludeNonSpectroLabels(includeNonSpectroLabels *bool) *V1SpectroClustersGetParams { + o.SetIncludeNonSpectroLabels(includeNonSpectroLabels) + return o +} + +// SetIncludeNonSpectroLabels adds the includeNonSpectroLabels to the v1 spectro clusters get params +func (o *V1SpectroClustersGetParams) SetIncludeNonSpectroLabels(includeNonSpectroLabels *bool) { + o.IncludeNonSpectroLabels = includeNonSpectroLabels +} + +// WithIncludePackMeta adds the includePackMeta to the v1 spectro clusters get params +func (o *V1SpectroClustersGetParams) WithIncludePackMeta(includePackMeta *string) *V1SpectroClustersGetParams { + o.SetIncludePackMeta(includePackMeta) + return o +} + +// SetIncludePackMeta adds the includePackMeta to the v1 spectro clusters get params +func (o *V1SpectroClustersGetParams) SetIncludePackMeta(includePackMeta *string) { + o.IncludePackMeta = includePackMeta +} + +// WithIncludeTags adds the includeTags to the v1 spectro clusters get params +func (o *V1SpectroClustersGetParams) WithIncludeTags(includeTags *string) *V1SpectroClustersGetParams { + o.SetIncludeTags(includeTags) + return o +} + +// SetIncludeTags adds the includeTags to the v1 spectro clusters get params +func (o *V1SpectroClustersGetParams) SetIncludeTags(includeTags *string) { + o.IncludeTags = includeTags +} + +// WithProfileType adds the profileType to the v1 spectro clusters get params +func (o *V1SpectroClustersGetParams) WithProfileType(profileType *string) *V1SpectroClustersGetParams { + o.SetProfileType(profileType) + return o +} + +// SetProfileType adds the profileType to the v1 spectro clusters get params +func (o *V1SpectroClustersGetParams) SetProfileType(profileType *string) { + o.ProfileType = profileType +} + +// WithResolvePackValues adds the resolvePackValues to the v1 spectro clusters get params +func (o *V1SpectroClustersGetParams) WithResolvePackValues(resolvePackValues *bool) *V1SpectroClustersGetParams { + o.SetResolvePackValues(resolvePackValues) + return o +} + +// SetResolvePackValues adds the resolvePackValues to the v1 spectro clusters get params +func (o *V1SpectroClustersGetParams) SetResolvePackValues(resolvePackValues *bool) { + o.ResolvePackValues = resolvePackValues +} + +// WithUID adds the uid to the v1 spectro clusters get params +func (o *V1SpectroClustersGetParams) WithUID(uid string) *V1SpectroClustersGetParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 spectro clusters get params +func (o *V1SpectroClustersGetParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1SpectroClustersGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.IncludeNonSpectroLabels != nil { + + // query param includeNonSpectroLabels + var qrIncludeNonSpectroLabels bool + if o.IncludeNonSpectroLabels != nil { + qrIncludeNonSpectroLabels = *o.IncludeNonSpectroLabels + } + qIncludeNonSpectroLabels := swag.FormatBool(qrIncludeNonSpectroLabels) + if qIncludeNonSpectroLabels != "" { + if err := r.SetQueryParam("includeNonSpectroLabels", qIncludeNonSpectroLabels); err != nil { + return err + } + } + + } + + if o.IncludePackMeta != nil { + + // query param includePackMeta + var qrIncludePackMeta string + if o.IncludePackMeta != nil { + qrIncludePackMeta = *o.IncludePackMeta + } + qIncludePackMeta := qrIncludePackMeta + if qIncludePackMeta != "" { + if err := r.SetQueryParam("includePackMeta", qIncludePackMeta); err != nil { + return err + } + } + + } + + if o.IncludeTags != nil { + + // query param includeTags + var qrIncludeTags string + if o.IncludeTags != nil { + qrIncludeTags = *o.IncludeTags + } + qIncludeTags := qrIncludeTags + if qIncludeTags != "" { + if err := r.SetQueryParam("includeTags", qIncludeTags); err != nil { + return err + } + } + + } + + if o.ProfileType != nil { + + // query param profileType + var qrProfileType string + if o.ProfileType != nil { + qrProfileType = *o.ProfileType + } + qProfileType := qrProfileType + if qProfileType != "" { + if err := r.SetQueryParam("profileType", qProfileType); err != nil { + return err + } + } + + } + + if o.ResolvePackValues != nil { + + // query param resolvePackValues + var qrResolvePackValues bool + if o.ResolvePackValues != nil { + qrResolvePackValues = *o.ResolvePackValues + } + qResolvePackValues := swag.FormatBool(qrResolvePackValues) + if qResolvePackValues != "" { + if err := r.SetQueryParam("resolvePackValues", qResolvePackValues); err != nil { + return err + } + } + + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_get_profile_updates_parameters.go b/api/client/v1/v1_spectro_clusters_get_profile_updates_parameters.go new file mode 100644 index 00000000..51d83341 --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_get_profile_updates_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1SpectroClustersGetProfileUpdatesParams creates a new V1SpectroClustersGetProfileUpdatesParams object +// with the default values initialized. +func NewV1SpectroClustersGetProfileUpdatesParams() *V1SpectroClustersGetProfileUpdatesParams { + var () + return &V1SpectroClustersGetProfileUpdatesParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1SpectroClustersGetProfileUpdatesParamsWithTimeout creates a new V1SpectroClustersGetProfileUpdatesParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1SpectroClustersGetProfileUpdatesParamsWithTimeout(timeout time.Duration) *V1SpectroClustersGetProfileUpdatesParams { + var () + return &V1SpectroClustersGetProfileUpdatesParams{ + + timeout: timeout, + } +} + +// NewV1SpectroClustersGetProfileUpdatesParamsWithContext creates a new V1SpectroClustersGetProfileUpdatesParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1SpectroClustersGetProfileUpdatesParamsWithContext(ctx context.Context) *V1SpectroClustersGetProfileUpdatesParams { + var () + return &V1SpectroClustersGetProfileUpdatesParams{ + + Context: ctx, + } +} + +// NewV1SpectroClustersGetProfileUpdatesParamsWithHTTPClient creates a new V1SpectroClustersGetProfileUpdatesParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1SpectroClustersGetProfileUpdatesParamsWithHTTPClient(client *http.Client) *V1SpectroClustersGetProfileUpdatesParams { + var () + return &V1SpectroClustersGetProfileUpdatesParams{ + HTTPClient: client, + } +} + +/* +V1SpectroClustersGetProfileUpdatesParams contains all the parameters to send to the API endpoint +for the v1 spectro clusters get profile updates operation typically these are written to a http.Request +*/ +type V1SpectroClustersGetProfileUpdatesParams struct { + + /*UID + Cluster uid + + */ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 spectro clusters get profile updates params +func (o *V1SpectroClustersGetProfileUpdatesParams) WithTimeout(timeout time.Duration) *V1SpectroClustersGetProfileUpdatesParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 spectro clusters get profile updates params +func (o *V1SpectroClustersGetProfileUpdatesParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 spectro clusters get profile updates params +func (o *V1SpectroClustersGetProfileUpdatesParams) WithContext(ctx context.Context) *V1SpectroClustersGetProfileUpdatesParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 spectro clusters get profile updates params +func (o *V1SpectroClustersGetProfileUpdatesParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 spectro clusters get profile updates params +func (o *V1SpectroClustersGetProfileUpdatesParams) WithHTTPClient(client *http.Client) *V1SpectroClustersGetProfileUpdatesParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 spectro clusters get profile updates params +func (o *V1SpectroClustersGetProfileUpdatesParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithUID adds the uid to the v1 spectro clusters get profile updates params +func (o *V1SpectroClustersGetProfileUpdatesParams) WithUID(uid string) *V1SpectroClustersGetProfileUpdatesParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 spectro clusters get profile updates params +func (o *V1SpectroClustersGetProfileUpdatesParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1SpectroClustersGetProfileUpdatesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_get_profile_updates_responses.go b/api/client/v1/v1_spectro_clusters_get_profile_updates_responses.go new file mode 100644 index 00000000..22b097aa --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_get_profile_updates_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1SpectroClustersGetProfileUpdatesReader is a Reader for the V1SpectroClustersGetProfileUpdates structure. +type V1SpectroClustersGetProfileUpdatesReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1SpectroClustersGetProfileUpdatesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1SpectroClustersGetProfileUpdatesOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1SpectroClustersGetProfileUpdatesOK creates a V1SpectroClustersGetProfileUpdatesOK with default headers values +func NewV1SpectroClustersGetProfileUpdatesOK() *V1SpectroClustersGetProfileUpdatesOK { + return &V1SpectroClustersGetProfileUpdatesOK{} +} + +/* +V1SpectroClustersGetProfileUpdatesOK handles this case with default header values. + +OK +*/ +type V1SpectroClustersGetProfileUpdatesOK struct { + Payload *models.V1SpectroClusterProfileUpdates +} + +func (o *V1SpectroClustersGetProfileUpdatesOK) Error() string { + return fmt.Sprintf("[GET /v1/spectroclusters/{uid}/profileUpdates][%d] v1SpectroClustersGetProfileUpdatesOK %+v", 200, o.Payload) +} + +func (o *V1SpectroClustersGetProfileUpdatesOK) GetPayload() *models.V1SpectroClusterProfileUpdates { + return o.Payload +} + +func (o *V1SpectroClustersGetProfileUpdatesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1SpectroClusterProfileUpdates) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_get_profiles_packs_manifests_parameters.go b/api/client/v1/v1_spectro_clusters_get_profiles_packs_manifests_parameters.go new file mode 100644 index 00000000..e0422e98 --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_get_profiles_packs_manifests_parameters.go @@ -0,0 +1,213 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// NewV1SpectroClustersGetProfilesPacksManifestsParams creates a new V1SpectroClustersGetProfilesPacksManifestsParams object +// with the default values initialized. +func NewV1SpectroClustersGetProfilesPacksManifestsParams() *V1SpectroClustersGetProfilesPacksManifestsParams { + var ( + resolveMacrosDefault = bool(false) + ) + return &V1SpectroClustersGetProfilesPacksManifestsParams{ + ResolveMacros: &resolveMacrosDefault, + + timeout: cr.DefaultTimeout, + } +} + +// NewV1SpectroClustersGetProfilesPacksManifestsParamsWithTimeout creates a new V1SpectroClustersGetProfilesPacksManifestsParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1SpectroClustersGetProfilesPacksManifestsParamsWithTimeout(timeout time.Duration) *V1SpectroClustersGetProfilesPacksManifestsParams { + var ( + resolveMacrosDefault = bool(false) + ) + return &V1SpectroClustersGetProfilesPacksManifestsParams{ + ResolveMacros: &resolveMacrosDefault, + + timeout: timeout, + } +} + +// NewV1SpectroClustersGetProfilesPacksManifestsParamsWithContext creates a new V1SpectroClustersGetProfilesPacksManifestsParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1SpectroClustersGetProfilesPacksManifestsParamsWithContext(ctx context.Context) *V1SpectroClustersGetProfilesPacksManifestsParams { + var ( + resolveMacrosDefault = bool(false) + ) + return &V1SpectroClustersGetProfilesPacksManifestsParams{ + ResolveMacros: &resolveMacrosDefault, + + Context: ctx, + } +} + +// NewV1SpectroClustersGetProfilesPacksManifestsParamsWithHTTPClient creates a new V1SpectroClustersGetProfilesPacksManifestsParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1SpectroClustersGetProfilesPacksManifestsParamsWithHTTPClient(client *http.Client) *V1SpectroClustersGetProfilesPacksManifestsParams { + var ( + resolveMacrosDefault = bool(false) + ) + return &V1SpectroClustersGetProfilesPacksManifestsParams{ + ResolveMacros: &resolveMacrosDefault, + HTTPClient: client, + } +} + +/* +V1SpectroClustersGetProfilesPacksManifestsParams contains all the parameters to send to the API endpoint +for the v1 spectro clusters get profiles packs manifests operation typically these are written to a http.Request +*/ +type V1SpectroClustersGetProfilesPacksManifestsParams struct { + + /*IncludePackMeta + Includes pack meta such as schema, presets + + */ + IncludePackMeta *string + /*ResolveMacros + Resolve pack macro variables if set to true + + */ + ResolveMacros *bool + /*UID + Cluster uid + + */ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 spectro clusters get profiles packs manifests params +func (o *V1SpectroClustersGetProfilesPacksManifestsParams) WithTimeout(timeout time.Duration) *V1SpectroClustersGetProfilesPacksManifestsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 spectro clusters get profiles packs manifests params +func (o *V1SpectroClustersGetProfilesPacksManifestsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 spectro clusters get profiles packs manifests params +func (o *V1SpectroClustersGetProfilesPacksManifestsParams) WithContext(ctx context.Context) *V1SpectroClustersGetProfilesPacksManifestsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 spectro clusters get profiles packs manifests params +func (o *V1SpectroClustersGetProfilesPacksManifestsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 spectro clusters get profiles packs manifests params +func (o *V1SpectroClustersGetProfilesPacksManifestsParams) WithHTTPClient(client *http.Client) *V1SpectroClustersGetProfilesPacksManifestsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 spectro clusters get profiles packs manifests params +func (o *V1SpectroClustersGetProfilesPacksManifestsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithIncludePackMeta adds the includePackMeta to the v1 spectro clusters get profiles packs manifests params +func (o *V1SpectroClustersGetProfilesPacksManifestsParams) WithIncludePackMeta(includePackMeta *string) *V1SpectroClustersGetProfilesPacksManifestsParams { + o.SetIncludePackMeta(includePackMeta) + return o +} + +// SetIncludePackMeta adds the includePackMeta to the v1 spectro clusters get profiles packs manifests params +func (o *V1SpectroClustersGetProfilesPacksManifestsParams) SetIncludePackMeta(includePackMeta *string) { + o.IncludePackMeta = includePackMeta +} + +// WithResolveMacros adds the resolveMacros to the v1 spectro clusters get profiles packs manifests params +func (o *V1SpectroClustersGetProfilesPacksManifestsParams) WithResolveMacros(resolveMacros *bool) *V1SpectroClustersGetProfilesPacksManifestsParams { + o.SetResolveMacros(resolveMacros) + return o +} + +// SetResolveMacros adds the resolveMacros to the v1 spectro clusters get profiles packs manifests params +func (o *V1SpectroClustersGetProfilesPacksManifestsParams) SetResolveMacros(resolveMacros *bool) { + o.ResolveMacros = resolveMacros +} + +// WithUID adds the uid to the v1 spectro clusters get profiles packs manifests params +func (o *V1SpectroClustersGetProfilesPacksManifestsParams) WithUID(uid string) *V1SpectroClustersGetProfilesPacksManifestsParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 spectro clusters get profiles packs manifests params +func (o *V1SpectroClustersGetProfilesPacksManifestsParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1SpectroClustersGetProfilesPacksManifestsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.IncludePackMeta != nil { + + // query param includePackMeta + var qrIncludePackMeta string + if o.IncludePackMeta != nil { + qrIncludePackMeta = *o.IncludePackMeta + } + qIncludePackMeta := qrIncludePackMeta + if qIncludePackMeta != "" { + if err := r.SetQueryParam("includePackMeta", qIncludePackMeta); err != nil { + return err + } + } + + } + + if o.ResolveMacros != nil { + + // query param resolveMacros + var qrResolveMacros bool + if o.ResolveMacros != nil { + qrResolveMacros = *o.ResolveMacros + } + qResolveMacros := swag.FormatBool(qrResolveMacros) + if qResolveMacros != "" { + if err := r.SetQueryParam("resolveMacros", qResolveMacros); err != nil { + return err + } + } + + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_get_profiles_packs_manifests_responses.go b/api/client/v1/v1_spectro_clusters_get_profiles_packs_manifests_responses.go new file mode 100644 index 00000000..30239afb --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_get_profiles_packs_manifests_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1SpectroClustersGetProfilesPacksManifestsReader is a Reader for the V1SpectroClustersGetProfilesPacksManifests structure. +type V1SpectroClustersGetProfilesPacksManifestsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1SpectroClustersGetProfilesPacksManifestsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1SpectroClustersGetProfilesPacksManifestsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1SpectroClustersGetProfilesPacksManifestsOK creates a V1SpectroClustersGetProfilesPacksManifestsOK with default headers values +func NewV1SpectroClustersGetProfilesPacksManifestsOK() *V1SpectroClustersGetProfilesPacksManifestsOK { + return &V1SpectroClustersGetProfilesPacksManifestsOK{} +} + +/* +V1SpectroClustersGetProfilesPacksManifestsOK handles this case with default header values. + +OK +*/ +type V1SpectroClustersGetProfilesPacksManifestsOK struct { + Payload *models.V1SpectroClusterProfilesPacksManifests +} + +func (o *V1SpectroClustersGetProfilesPacksManifestsOK) Error() string { + return fmt.Sprintf("[GET /v1/spectroclusters/{uid}/profiles/packs/manifests][%d] v1SpectroClustersGetProfilesPacksManifestsOK %+v", 200, o.Payload) +} + +func (o *V1SpectroClustersGetProfilesPacksManifestsOK) GetPayload() *models.V1SpectroClusterProfilesPacksManifests { + return o.Payload +} + +func (o *V1SpectroClustersGetProfilesPacksManifestsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1SpectroClusterProfilesPacksManifests) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_get_profiles_parameters.go b/api/client/v1/v1_spectro_clusters_get_profiles_parameters.go new file mode 100644 index 00000000..73443a87 --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_get_profiles_parameters.go @@ -0,0 +1,168 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1SpectroClustersGetProfilesParams creates a new V1SpectroClustersGetProfilesParams object +// with the default values initialized. +func NewV1SpectroClustersGetProfilesParams() *V1SpectroClustersGetProfilesParams { + var () + return &V1SpectroClustersGetProfilesParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1SpectroClustersGetProfilesParamsWithTimeout creates a new V1SpectroClustersGetProfilesParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1SpectroClustersGetProfilesParamsWithTimeout(timeout time.Duration) *V1SpectroClustersGetProfilesParams { + var () + return &V1SpectroClustersGetProfilesParams{ + + timeout: timeout, + } +} + +// NewV1SpectroClustersGetProfilesParamsWithContext creates a new V1SpectroClustersGetProfilesParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1SpectroClustersGetProfilesParamsWithContext(ctx context.Context) *V1SpectroClustersGetProfilesParams { + var () + return &V1SpectroClustersGetProfilesParams{ + + Context: ctx, + } +} + +// NewV1SpectroClustersGetProfilesParamsWithHTTPClient creates a new V1SpectroClustersGetProfilesParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1SpectroClustersGetProfilesParamsWithHTTPClient(client *http.Client) *V1SpectroClustersGetProfilesParams { + var () + return &V1SpectroClustersGetProfilesParams{ + HTTPClient: client, + } +} + +/* +V1SpectroClustersGetProfilesParams contains all the parameters to send to the API endpoint +for the v1 spectro clusters get profiles operation typically these are written to a http.Request +*/ +type V1SpectroClustersGetProfilesParams struct { + + /*IncludePackMeta + includes pack meta such as schema, presets + + */ + IncludePackMeta *string + /*UID + Cluster uid + + */ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 spectro clusters get profiles params +func (o *V1SpectroClustersGetProfilesParams) WithTimeout(timeout time.Duration) *V1SpectroClustersGetProfilesParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 spectro clusters get profiles params +func (o *V1SpectroClustersGetProfilesParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 spectro clusters get profiles params +func (o *V1SpectroClustersGetProfilesParams) WithContext(ctx context.Context) *V1SpectroClustersGetProfilesParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 spectro clusters get profiles params +func (o *V1SpectroClustersGetProfilesParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 spectro clusters get profiles params +func (o *V1SpectroClustersGetProfilesParams) WithHTTPClient(client *http.Client) *V1SpectroClustersGetProfilesParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 spectro clusters get profiles params +func (o *V1SpectroClustersGetProfilesParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithIncludePackMeta adds the includePackMeta to the v1 spectro clusters get profiles params +func (o *V1SpectroClustersGetProfilesParams) WithIncludePackMeta(includePackMeta *string) *V1SpectroClustersGetProfilesParams { + o.SetIncludePackMeta(includePackMeta) + return o +} + +// SetIncludePackMeta adds the includePackMeta to the v1 spectro clusters get profiles params +func (o *V1SpectroClustersGetProfilesParams) SetIncludePackMeta(includePackMeta *string) { + o.IncludePackMeta = includePackMeta +} + +// WithUID adds the uid to the v1 spectro clusters get profiles params +func (o *V1SpectroClustersGetProfilesParams) WithUID(uid string) *V1SpectroClustersGetProfilesParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 spectro clusters get profiles params +func (o *V1SpectroClustersGetProfilesParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1SpectroClustersGetProfilesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.IncludePackMeta != nil { + + // query param includePackMeta + var qrIncludePackMeta string + if o.IncludePackMeta != nil { + qrIncludePackMeta = *o.IncludePackMeta + } + qIncludePackMeta := qrIncludePackMeta + if qIncludePackMeta != "" { + if err := r.SetQueryParam("includePackMeta", qIncludePackMeta); err != nil { + return err + } + } + + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_get_profiles_responses.go b/api/client/v1/v1_spectro_clusters_get_profiles_responses.go new file mode 100644 index 00000000..40197904 --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_get_profiles_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1SpectroClustersGetProfilesReader is a Reader for the V1SpectroClustersGetProfiles structure. +type V1SpectroClustersGetProfilesReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1SpectroClustersGetProfilesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1SpectroClustersGetProfilesOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1SpectroClustersGetProfilesOK creates a V1SpectroClustersGetProfilesOK with default headers values +func NewV1SpectroClustersGetProfilesOK() *V1SpectroClustersGetProfilesOK { + return &V1SpectroClustersGetProfilesOK{} +} + +/* +V1SpectroClustersGetProfilesOK handles this case with default header values. + +OK +*/ +type V1SpectroClustersGetProfilesOK struct { + Payload *models.V1SpectroClusterProfileList +} + +func (o *V1SpectroClustersGetProfilesOK) Error() string { + return fmt.Sprintf("[GET /v1/spectroclusters/{uid}/profiles][%d] v1SpectroClustersGetProfilesOK %+v", 200, o.Payload) +} + +func (o *V1SpectroClustersGetProfilesOK) GetPayload() *models.V1SpectroClusterProfileList { + return o.Payload +} + +func (o *V1SpectroClustersGetProfilesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1SpectroClusterProfileList) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_get_responses.go b/api/client/v1/v1_spectro_clusters_get_responses.go new file mode 100644 index 00000000..37b38263 --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_get_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1SpectroClustersGetReader is a Reader for the V1SpectroClustersGet structure. +type V1SpectroClustersGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1SpectroClustersGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1SpectroClustersGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1SpectroClustersGetOK creates a V1SpectroClustersGetOK with default headers values +func NewV1SpectroClustersGetOK() *V1SpectroClustersGetOK { + return &V1SpectroClustersGetOK{} +} + +/* +V1SpectroClustersGetOK handles this case with default header values. + +OK +*/ +type V1SpectroClustersGetOK struct { + Payload *models.V1SpectroCluster +} + +func (o *V1SpectroClustersGetOK) Error() string { + return fmt.Sprintf("[GET /v1/spectroclusters/{uid}][%d] v1SpectroClustersGetOK %+v", 200, o.Payload) +} + +func (o *V1SpectroClustersGetOK) GetPayload() *models.V1SpectroCluster { + return o.Payload +} + +func (o *V1SpectroClustersGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1SpectroCluster) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_gke_create_parameters.go b/api/client/v1/v1_spectro_clusters_gke_create_parameters.go new file mode 100644 index 00000000..5dca638b --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_gke_create_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1SpectroClustersGkeCreateParams creates a new V1SpectroClustersGkeCreateParams object +// with the default values initialized. +func NewV1SpectroClustersGkeCreateParams() *V1SpectroClustersGkeCreateParams { + var () + return &V1SpectroClustersGkeCreateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1SpectroClustersGkeCreateParamsWithTimeout creates a new V1SpectroClustersGkeCreateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1SpectroClustersGkeCreateParamsWithTimeout(timeout time.Duration) *V1SpectroClustersGkeCreateParams { + var () + return &V1SpectroClustersGkeCreateParams{ + + timeout: timeout, + } +} + +// NewV1SpectroClustersGkeCreateParamsWithContext creates a new V1SpectroClustersGkeCreateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1SpectroClustersGkeCreateParamsWithContext(ctx context.Context) *V1SpectroClustersGkeCreateParams { + var () + return &V1SpectroClustersGkeCreateParams{ + + Context: ctx, + } +} + +// NewV1SpectroClustersGkeCreateParamsWithHTTPClient creates a new V1SpectroClustersGkeCreateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1SpectroClustersGkeCreateParamsWithHTTPClient(client *http.Client) *V1SpectroClustersGkeCreateParams { + var () + return &V1SpectroClustersGkeCreateParams{ + HTTPClient: client, + } +} + +/* +V1SpectroClustersGkeCreateParams contains all the parameters to send to the API endpoint +for the v1 spectro clusters gke create operation typically these are written to a http.Request +*/ +type V1SpectroClustersGkeCreateParams struct { + + /*Body*/ + Body *models.V1SpectroGcpClusterEntity + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 spectro clusters gke create params +func (o *V1SpectroClustersGkeCreateParams) WithTimeout(timeout time.Duration) *V1SpectroClustersGkeCreateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 spectro clusters gke create params +func (o *V1SpectroClustersGkeCreateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 spectro clusters gke create params +func (o *V1SpectroClustersGkeCreateParams) WithContext(ctx context.Context) *V1SpectroClustersGkeCreateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 spectro clusters gke create params +func (o *V1SpectroClustersGkeCreateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 spectro clusters gke create params +func (o *V1SpectroClustersGkeCreateParams) WithHTTPClient(client *http.Client) *V1SpectroClustersGkeCreateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 spectro clusters gke create params +func (o *V1SpectroClustersGkeCreateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 spectro clusters gke create params +func (o *V1SpectroClustersGkeCreateParams) WithBody(body *models.V1SpectroGcpClusterEntity) *V1SpectroClustersGkeCreateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 spectro clusters gke create params +func (o *V1SpectroClustersGkeCreateParams) SetBody(body *models.V1SpectroGcpClusterEntity) { + o.Body = body +} + +// WriteToRequest writes these params to a swagger request +func (o *V1SpectroClustersGkeCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_gke_create_responses.go b/api/client/v1/v1_spectro_clusters_gke_create_responses.go new file mode 100644 index 00000000..784085ed --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_gke_create_responses.go @@ -0,0 +1,77 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1SpectroClustersGkeCreateReader is a Reader for the V1SpectroClustersGkeCreate structure. +type V1SpectroClustersGkeCreateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1SpectroClustersGkeCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 201: + result := NewV1SpectroClustersGkeCreateCreated() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1SpectroClustersGkeCreateCreated creates a V1SpectroClustersGkeCreateCreated with default headers values +func NewV1SpectroClustersGkeCreateCreated() *V1SpectroClustersGkeCreateCreated { + return &V1SpectroClustersGkeCreateCreated{} +} + +/* +V1SpectroClustersGkeCreateCreated handles this case with default header values. + +Created successfully +*/ +type V1SpectroClustersGkeCreateCreated struct { + /*Audit uid for the request + */ + AuditUID string + + Payload *models.V1UID +} + +func (o *V1SpectroClustersGkeCreateCreated) Error() string { + return fmt.Sprintf("[POST /v1/spectroclusters/gke][%d] v1SpectroClustersGkeCreateCreated %+v", 201, o.Payload) +} + +func (o *V1SpectroClustersGkeCreateCreated) GetPayload() *models.V1UID { + return o.Payload +} + +func (o *V1SpectroClustersGkeCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header AuditUid + o.AuditUID = response.GetHeader("AuditUid") + + o.Payload = new(models.V1UID) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_gke_rate_parameters.go b/api/client/v1/v1_spectro_clusters_gke_rate_parameters.go new file mode 100644 index 00000000..f99abc77 --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_gke_rate_parameters.go @@ -0,0 +1,177 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1SpectroClustersGkeRateParams creates a new V1SpectroClustersGkeRateParams object +// with the default values initialized. +func NewV1SpectroClustersGkeRateParams() *V1SpectroClustersGkeRateParams { + var ( + periodTypeDefault = string("hourly") + ) + return &V1SpectroClustersGkeRateParams{ + PeriodType: &periodTypeDefault, + + timeout: cr.DefaultTimeout, + } +} + +// NewV1SpectroClustersGkeRateParamsWithTimeout creates a new V1SpectroClustersGkeRateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1SpectroClustersGkeRateParamsWithTimeout(timeout time.Duration) *V1SpectroClustersGkeRateParams { + var ( + periodTypeDefault = string("hourly") + ) + return &V1SpectroClustersGkeRateParams{ + PeriodType: &periodTypeDefault, + + timeout: timeout, + } +} + +// NewV1SpectroClustersGkeRateParamsWithContext creates a new V1SpectroClustersGkeRateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1SpectroClustersGkeRateParamsWithContext(ctx context.Context) *V1SpectroClustersGkeRateParams { + var ( + periodTypeDefault = string("hourly") + ) + return &V1SpectroClustersGkeRateParams{ + PeriodType: &periodTypeDefault, + + Context: ctx, + } +} + +// NewV1SpectroClustersGkeRateParamsWithHTTPClient creates a new V1SpectroClustersGkeRateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1SpectroClustersGkeRateParamsWithHTTPClient(client *http.Client) *V1SpectroClustersGkeRateParams { + var ( + periodTypeDefault = string("hourly") + ) + return &V1SpectroClustersGkeRateParams{ + PeriodType: &periodTypeDefault, + HTTPClient: client, + } +} + +/* +V1SpectroClustersGkeRateParams contains all the parameters to send to the API endpoint +for the v1 spectro clusters gke rate operation typically these are written to a http.Request +*/ +type V1SpectroClustersGkeRateParams struct { + + /*Body*/ + Body *models.V1SpectroGcpClusterRateEntity + /*PeriodType*/ + PeriodType *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 spectro clusters gke rate params +func (o *V1SpectroClustersGkeRateParams) WithTimeout(timeout time.Duration) *V1SpectroClustersGkeRateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 spectro clusters gke rate params +func (o *V1SpectroClustersGkeRateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 spectro clusters gke rate params +func (o *V1SpectroClustersGkeRateParams) WithContext(ctx context.Context) *V1SpectroClustersGkeRateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 spectro clusters gke rate params +func (o *V1SpectroClustersGkeRateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 spectro clusters gke rate params +func (o *V1SpectroClustersGkeRateParams) WithHTTPClient(client *http.Client) *V1SpectroClustersGkeRateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 spectro clusters gke rate params +func (o *V1SpectroClustersGkeRateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 spectro clusters gke rate params +func (o *V1SpectroClustersGkeRateParams) WithBody(body *models.V1SpectroGcpClusterRateEntity) *V1SpectroClustersGkeRateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 spectro clusters gke rate params +func (o *V1SpectroClustersGkeRateParams) SetBody(body *models.V1SpectroGcpClusterRateEntity) { + o.Body = body +} + +// WithPeriodType adds the periodType to the v1 spectro clusters gke rate params +func (o *V1SpectroClustersGkeRateParams) WithPeriodType(periodType *string) *V1SpectroClustersGkeRateParams { + o.SetPeriodType(periodType) + return o +} + +// SetPeriodType adds the periodType to the v1 spectro clusters gke rate params +func (o *V1SpectroClustersGkeRateParams) SetPeriodType(periodType *string) { + o.PeriodType = periodType +} + +// WriteToRequest writes these params to a swagger request +func (o *V1SpectroClustersGkeRateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + if o.PeriodType != nil { + + // query param periodType + var qrPeriodType string + if o.PeriodType != nil { + qrPeriodType = *o.PeriodType + } + qPeriodType := qrPeriodType + if qPeriodType != "" { + if err := r.SetQueryParam("periodType", qPeriodType); err != nil { + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_gke_rate_responses.go b/api/client/v1/v1_spectro_clusters_gke_rate_responses.go new file mode 100644 index 00000000..5d28f4c6 --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_gke_rate_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1SpectroClustersGkeRateReader is a Reader for the V1SpectroClustersGkeRate structure. +type V1SpectroClustersGkeRateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1SpectroClustersGkeRateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1SpectroClustersGkeRateOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1SpectroClustersGkeRateOK creates a V1SpectroClustersGkeRateOK with default headers values +func NewV1SpectroClustersGkeRateOK() *V1SpectroClustersGkeRateOK { + return &V1SpectroClustersGkeRateOK{} +} + +/* +V1SpectroClustersGkeRateOK handles this case with default header values. + +Gke Cluster estimated rate response +*/ +type V1SpectroClustersGkeRateOK struct { + Payload *models.V1SpectroClusterRate +} + +func (o *V1SpectroClustersGkeRateOK) Error() string { + return fmt.Sprintf("[POST /v1/spectroclusters/gke/rate][%d] v1SpectroClustersGkeRateOK %+v", 200, o.Payload) +} + +func (o *V1SpectroClustersGkeRateOK) GetPayload() *models.V1SpectroClusterRate { + return o.Payload +} + +func (o *V1SpectroClustersGkeRateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1SpectroClusterRate) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_gke_validate_parameters.go b/api/client/v1/v1_spectro_clusters_gke_validate_parameters.go new file mode 100644 index 00000000..838a4956 --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_gke_validate_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1SpectroClustersGkeValidateParams creates a new V1SpectroClustersGkeValidateParams object +// with the default values initialized. +func NewV1SpectroClustersGkeValidateParams() *V1SpectroClustersGkeValidateParams { + var () + return &V1SpectroClustersGkeValidateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1SpectroClustersGkeValidateParamsWithTimeout creates a new V1SpectroClustersGkeValidateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1SpectroClustersGkeValidateParamsWithTimeout(timeout time.Duration) *V1SpectroClustersGkeValidateParams { + var () + return &V1SpectroClustersGkeValidateParams{ + + timeout: timeout, + } +} + +// NewV1SpectroClustersGkeValidateParamsWithContext creates a new V1SpectroClustersGkeValidateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1SpectroClustersGkeValidateParamsWithContext(ctx context.Context) *V1SpectroClustersGkeValidateParams { + var () + return &V1SpectroClustersGkeValidateParams{ + + Context: ctx, + } +} + +// NewV1SpectroClustersGkeValidateParamsWithHTTPClient creates a new V1SpectroClustersGkeValidateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1SpectroClustersGkeValidateParamsWithHTTPClient(client *http.Client) *V1SpectroClustersGkeValidateParams { + var () + return &V1SpectroClustersGkeValidateParams{ + HTTPClient: client, + } +} + +/* +V1SpectroClustersGkeValidateParams contains all the parameters to send to the API endpoint +for the v1 spectro clusters gke validate operation typically these are written to a http.Request +*/ +type V1SpectroClustersGkeValidateParams struct { + + /*Body*/ + Body *models.V1SpectroGcpClusterEntity + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 spectro clusters gke validate params +func (o *V1SpectroClustersGkeValidateParams) WithTimeout(timeout time.Duration) *V1SpectroClustersGkeValidateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 spectro clusters gke validate params +func (o *V1SpectroClustersGkeValidateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 spectro clusters gke validate params +func (o *V1SpectroClustersGkeValidateParams) WithContext(ctx context.Context) *V1SpectroClustersGkeValidateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 spectro clusters gke validate params +func (o *V1SpectroClustersGkeValidateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 spectro clusters gke validate params +func (o *V1SpectroClustersGkeValidateParams) WithHTTPClient(client *http.Client) *V1SpectroClustersGkeValidateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 spectro clusters gke validate params +func (o *V1SpectroClustersGkeValidateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 spectro clusters gke validate params +func (o *V1SpectroClustersGkeValidateParams) WithBody(body *models.V1SpectroGcpClusterEntity) *V1SpectroClustersGkeValidateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 spectro clusters gke validate params +func (o *V1SpectroClustersGkeValidateParams) SetBody(body *models.V1SpectroGcpClusterEntity) { + o.Body = body +} + +// WriteToRequest writes these params to a swagger request +func (o *V1SpectroClustersGkeValidateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_gke_validate_responses.go b/api/client/v1/v1_spectro_clusters_gke_validate_responses.go new file mode 100644 index 00000000..2a3cba0f --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_gke_validate_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1SpectroClustersGkeValidateReader is a Reader for the V1SpectroClustersGkeValidate structure. +type V1SpectroClustersGkeValidateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1SpectroClustersGkeValidateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1SpectroClustersGkeValidateOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1SpectroClustersGkeValidateOK creates a V1SpectroClustersGkeValidateOK with default headers values +func NewV1SpectroClustersGkeValidateOK() *V1SpectroClustersGkeValidateOK { + return &V1SpectroClustersGkeValidateOK{} +} + +/* +V1SpectroClustersGkeValidateOK handles this case with default header values. + +Gke Cluster validation response +*/ +type V1SpectroClustersGkeValidateOK struct { + Payload *models.V1SpectroClusterValidatorResponse +} + +func (o *V1SpectroClustersGkeValidateOK) Error() string { + return fmt.Sprintf("[POST /v1/spectroclusters/gke/validate][%d] v1SpectroClustersGkeValidateOK %+v", 200, o.Payload) +} + +func (o *V1SpectroClustersGkeValidateOK) GetPayload() *models.V1SpectroClusterValidatorResponse { + return o.Payload +} + +func (o *V1SpectroClustersGkeValidateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1SpectroClusterValidatorResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_k8_certificate_parameters.go b/api/client/v1/v1_spectro_clusters_k8_certificate_parameters.go new file mode 100644 index 00000000..63120137 --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_k8_certificate_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1SpectroClustersK8CertificateParams creates a new V1SpectroClustersK8CertificateParams object +// with the default values initialized. +func NewV1SpectroClustersK8CertificateParams() *V1SpectroClustersK8CertificateParams { + var () + return &V1SpectroClustersK8CertificateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1SpectroClustersK8CertificateParamsWithTimeout creates a new V1SpectroClustersK8CertificateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1SpectroClustersK8CertificateParamsWithTimeout(timeout time.Duration) *V1SpectroClustersK8CertificateParams { + var () + return &V1SpectroClustersK8CertificateParams{ + + timeout: timeout, + } +} + +// NewV1SpectroClustersK8CertificateParamsWithContext creates a new V1SpectroClustersK8CertificateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1SpectroClustersK8CertificateParamsWithContext(ctx context.Context) *V1SpectroClustersK8CertificateParams { + var () + return &V1SpectroClustersK8CertificateParams{ + + Context: ctx, + } +} + +// NewV1SpectroClustersK8CertificateParamsWithHTTPClient creates a new V1SpectroClustersK8CertificateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1SpectroClustersK8CertificateParamsWithHTTPClient(client *http.Client) *V1SpectroClustersK8CertificateParams { + var () + return &V1SpectroClustersK8CertificateParams{ + HTTPClient: client, + } +} + +/* +V1SpectroClustersK8CertificateParams contains all the parameters to send to the API endpoint +for the v1 spectro clusters k8 certificate operation typically these are written to a http.Request +*/ +type V1SpectroClustersK8CertificateParams struct { + + /*UID + Cluster uid + + */ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 spectro clusters k8 certificate params +func (o *V1SpectroClustersK8CertificateParams) WithTimeout(timeout time.Duration) *V1SpectroClustersK8CertificateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 spectro clusters k8 certificate params +func (o *V1SpectroClustersK8CertificateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 spectro clusters k8 certificate params +func (o *V1SpectroClustersK8CertificateParams) WithContext(ctx context.Context) *V1SpectroClustersK8CertificateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 spectro clusters k8 certificate params +func (o *V1SpectroClustersK8CertificateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 spectro clusters k8 certificate params +func (o *V1SpectroClustersK8CertificateParams) WithHTTPClient(client *http.Client) *V1SpectroClustersK8CertificateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 spectro clusters k8 certificate params +func (o *V1SpectroClustersK8CertificateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithUID adds the uid to the v1 spectro clusters k8 certificate params +func (o *V1SpectroClustersK8CertificateParams) WithUID(uid string) *V1SpectroClustersK8CertificateParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 spectro clusters k8 certificate params +func (o *V1SpectroClustersK8CertificateParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1SpectroClustersK8CertificateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_k8_certificate_responses.go b/api/client/v1/v1_spectro_clusters_k8_certificate_responses.go new file mode 100644 index 00000000..f7aa3812 --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_k8_certificate_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1SpectroClustersK8CertificateReader is a Reader for the V1SpectroClustersK8Certificate structure. +type V1SpectroClustersK8CertificateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1SpectroClustersK8CertificateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1SpectroClustersK8CertificateOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1SpectroClustersK8CertificateOK creates a V1SpectroClustersK8CertificateOK with default headers values +func NewV1SpectroClustersK8CertificateOK() *V1SpectroClustersK8CertificateOK { + return &V1SpectroClustersK8CertificateOK{} +} + +/* +V1SpectroClustersK8CertificateOK handles this case with default header values. + +OK +*/ +type V1SpectroClustersK8CertificateOK struct { + Payload *models.V1MachineCertificates +} + +func (o *V1SpectroClustersK8CertificateOK) Error() string { + return fmt.Sprintf("[GET /v1/spectroclusters/{uid}/k8certificates][%d] v1SpectroClustersK8CertificateOK %+v", 200, o.Payload) +} + +func (o *V1SpectroClustersK8CertificateOK) GetPayload() *models.V1MachineCertificates { + return o.Payload +} + +func (o *V1SpectroClustersK8CertificateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1MachineCertificates) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_libvirt_create_parameters.go b/api/client/v1/v1_spectro_clusters_libvirt_create_parameters.go new file mode 100644 index 00000000..e274784e --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_libvirt_create_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1SpectroClustersLibvirtCreateParams creates a new V1SpectroClustersLibvirtCreateParams object +// with the default values initialized. +func NewV1SpectroClustersLibvirtCreateParams() *V1SpectroClustersLibvirtCreateParams { + var () + return &V1SpectroClustersLibvirtCreateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1SpectroClustersLibvirtCreateParamsWithTimeout creates a new V1SpectroClustersLibvirtCreateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1SpectroClustersLibvirtCreateParamsWithTimeout(timeout time.Duration) *V1SpectroClustersLibvirtCreateParams { + var () + return &V1SpectroClustersLibvirtCreateParams{ + + timeout: timeout, + } +} + +// NewV1SpectroClustersLibvirtCreateParamsWithContext creates a new V1SpectroClustersLibvirtCreateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1SpectroClustersLibvirtCreateParamsWithContext(ctx context.Context) *V1SpectroClustersLibvirtCreateParams { + var () + return &V1SpectroClustersLibvirtCreateParams{ + + Context: ctx, + } +} + +// NewV1SpectroClustersLibvirtCreateParamsWithHTTPClient creates a new V1SpectroClustersLibvirtCreateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1SpectroClustersLibvirtCreateParamsWithHTTPClient(client *http.Client) *V1SpectroClustersLibvirtCreateParams { + var () + return &V1SpectroClustersLibvirtCreateParams{ + HTTPClient: client, + } +} + +/* +V1SpectroClustersLibvirtCreateParams contains all the parameters to send to the API endpoint +for the v1 spectro clusters libvirt create operation typically these are written to a http.Request +*/ +type V1SpectroClustersLibvirtCreateParams struct { + + /*Body*/ + Body *models.V1SpectroLibvirtClusterEntity + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 spectro clusters libvirt create params +func (o *V1SpectroClustersLibvirtCreateParams) WithTimeout(timeout time.Duration) *V1SpectroClustersLibvirtCreateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 spectro clusters libvirt create params +func (o *V1SpectroClustersLibvirtCreateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 spectro clusters libvirt create params +func (o *V1SpectroClustersLibvirtCreateParams) WithContext(ctx context.Context) *V1SpectroClustersLibvirtCreateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 spectro clusters libvirt create params +func (o *V1SpectroClustersLibvirtCreateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 spectro clusters libvirt create params +func (o *V1SpectroClustersLibvirtCreateParams) WithHTTPClient(client *http.Client) *V1SpectroClustersLibvirtCreateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 spectro clusters libvirt create params +func (o *V1SpectroClustersLibvirtCreateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 spectro clusters libvirt create params +func (o *V1SpectroClustersLibvirtCreateParams) WithBody(body *models.V1SpectroLibvirtClusterEntity) *V1SpectroClustersLibvirtCreateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 spectro clusters libvirt create params +func (o *V1SpectroClustersLibvirtCreateParams) SetBody(body *models.V1SpectroLibvirtClusterEntity) { + o.Body = body +} + +// WriteToRequest writes these params to a swagger request +func (o *V1SpectroClustersLibvirtCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_libvirt_create_responses.go b/api/client/v1/v1_spectro_clusters_libvirt_create_responses.go new file mode 100644 index 00000000..d1c3daa5 --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_libvirt_create_responses.go @@ -0,0 +1,77 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1SpectroClustersLibvirtCreateReader is a Reader for the V1SpectroClustersLibvirtCreate structure. +type V1SpectroClustersLibvirtCreateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1SpectroClustersLibvirtCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 201: + result := NewV1SpectroClustersLibvirtCreateCreated() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1SpectroClustersLibvirtCreateCreated creates a V1SpectroClustersLibvirtCreateCreated with default headers values +func NewV1SpectroClustersLibvirtCreateCreated() *V1SpectroClustersLibvirtCreateCreated { + return &V1SpectroClustersLibvirtCreateCreated{} +} + +/* +V1SpectroClustersLibvirtCreateCreated handles this case with default header values. + +Created successfully +*/ +type V1SpectroClustersLibvirtCreateCreated struct { + /*Audit uid for the request + */ + AuditUID string + + Payload *models.V1UID +} + +func (o *V1SpectroClustersLibvirtCreateCreated) Error() string { + return fmt.Sprintf("[POST /v1/spectroclusters/libvirt][%d] v1SpectroClustersLibvirtCreateCreated %+v", 201, o.Payload) +} + +func (o *V1SpectroClustersLibvirtCreateCreated) GetPayload() *models.V1UID { + return o.Payload +} + +func (o *V1SpectroClustersLibvirtCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header AuditUid + o.AuditUID = response.GetHeader("AuditUid") + + o.Payload = new(models.V1UID) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_libvirt_import_parameters.go b/api/client/v1/v1_spectro_clusters_libvirt_import_parameters.go new file mode 100644 index 00000000..5cbdaaf3 --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_libvirt_import_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1SpectroClustersLibvirtImportParams creates a new V1SpectroClustersLibvirtImportParams object +// with the default values initialized. +func NewV1SpectroClustersLibvirtImportParams() *V1SpectroClustersLibvirtImportParams { + var () + return &V1SpectroClustersLibvirtImportParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1SpectroClustersLibvirtImportParamsWithTimeout creates a new V1SpectroClustersLibvirtImportParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1SpectroClustersLibvirtImportParamsWithTimeout(timeout time.Duration) *V1SpectroClustersLibvirtImportParams { + var () + return &V1SpectroClustersLibvirtImportParams{ + + timeout: timeout, + } +} + +// NewV1SpectroClustersLibvirtImportParamsWithContext creates a new V1SpectroClustersLibvirtImportParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1SpectroClustersLibvirtImportParamsWithContext(ctx context.Context) *V1SpectroClustersLibvirtImportParams { + var () + return &V1SpectroClustersLibvirtImportParams{ + + Context: ctx, + } +} + +// NewV1SpectroClustersLibvirtImportParamsWithHTTPClient creates a new V1SpectroClustersLibvirtImportParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1SpectroClustersLibvirtImportParamsWithHTTPClient(client *http.Client) *V1SpectroClustersLibvirtImportParams { + var () + return &V1SpectroClustersLibvirtImportParams{ + HTTPClient: client, + } +} + +/* +V1SpectroClustersLibvirtImportParams contains all the parameters to send to the API endpoint +for the v1 spectro clusters libvirt import operation typically these are written to a http.Request +*/ +type V1SpectroClustersLibvirtImportParams struct { + + /*Body*/ + Body *models.V1SpectroLibvirtClusterImportEntity + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 spectro clusters libvirt import params +func (o *V1SpectroClustersLibvirtImportParams) WithTimeout(timeout time.Duration) *V1SpectroClustersLibvirtImportParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 spectro clusters libvirt import params +func (o *V1SpectroClustersLibvirtImportParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 spectro clusters libvirt import params +func (o *V1SpectroClustersLibvirtImportParams) WithContext(ctx context.Context) *V1SpectroClustersLibvirtImportParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 spectro clusters libvirt import params +func (o *V1SpectroClustersLibvirtImportParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 spectro clusters libvirt import params +func (o *V1SpectroClustersLibvirtImportParams) WithHTTPClient(client *http.Client) *V1SpectroClustersLibvirtImportParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 spectro clusters libvirt import params +func (o *V1SpectroClustersLibvirtImportParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 spectro clusters libvirt import params +func (o *V1SpectroClustersLibvirtImportParams) WithBody(body *models.V1SpectroLibvirtClusterImportEntity) *V1SpectroClustersLibvirtImportParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 spectro clusters libvirt import params +func (o *V1SpectroClustersLibvirtImportParams) SetBody(body *models.V1SpectroLibvirtClusterImportEntity) { + o.Body = body +} + +// WriteToRequest writes these params to a swagger request +func (o *V1SpectroClustersLibvirtImportParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_libvirt_import_responses.go b/api/client/v1/v1_spectro_clusters_libvirt_import_responses.go new file mode 100644 index 00000000..c0d91d99 --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_libvirt_import_responses.go @@ -0,0 +1,77 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1SpectroClustersLibvirtImportReader is a Reader for the V1SpectroClustersLibvirtImport structure. +type V1SpectroClustersLibvirtImportReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1SpectroClustersLibvirtImportReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 201: + result := NewV1SpectroClustersLibvirtImportCreated() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1SpectroClustersLibvirtImportCreated creates a V1SpectroClustersLibvirtImportCreated with default headers values +func NewV1SpectroClustersLibvirtImportCreated() *V1SpectroClustersLibvirtImportCreated { + return &V1SpectroClustersLibvirtImportCreated{} +} + +/* +V1SpectroClustersLibvirtImportCreated handles this case with default header values. + +Created successfully +*/ +type V1SpectroClustersLibvirtImportCreated struct { + /*Audit uid for the request + */ + AuditUID string + + Payload *models.V1UID +} + +func (o *V1SpectroClustersLibvirtImportCreated) Error() string { + return fmt.Sprintf("[POST /v1/spectroclusters/libvirt/import][%d] v1SpectroClustersLibvirtImportCreated %+v", 201, o.Payload) +} + +func (o *V1SpectroClustersLibvirtImportCreated) GetPayload() *models.V1UID { + return o.Payload +} + +func (o *V1SpectroClustersLibvirtImportCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header AuditUid + o.AuditUID = response.GetHeader("AuditUid") + + o.Payload = new(models.V1UID) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_libvirt_rate_parameters.go b/api/client/v1/v1_spectro_clusters_libvirt_rate_parameters.go new file mode 100644 index 00000000..6c31e496 --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_libvirt_rate_parameters.go @@ -0,0 +1,177 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1SpectroClustersLibvirtRateParams creates a new V1SpectroClustersLibvirtRateParams object +// with the default values initialized. +func NewV1SpectroClustersLibvirtRateParams() *V1SpectroClustersLibvirtRateParams { + var ( + periodTypeDefault = string("hourly") + ) + return &V1SpectroClustersLibvirtRateParams{ + PeriodType: &periodTypeDefault, + + timeout: cr.DefaultTimeout, + } +} + +// NewV1SpectroClustersLibvirtRateParamsWithTimeout creates a new V1SpectroClustersLibvirtRateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1SpectroClustersLibvirtRateParamsWithTimeout(timeout time.Duration) *V1SpectroClustersLibvirtRateParams { + var ( + periodTypeDefault = string("hourly") + ) + return &V1SpectroClustersLibvirtRateParams{ + PeriodType: &periodTypeDefault, + + timeout: timeout, + } +} + +// NewV1SpectroClustersLibvirtRateParamsWithContext creates a new V1SpectroClustersLibvirtRateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1SpectroClustersLibvirtRateParamsWithContext(ctx context.Context) *V1SpectroClustersLibvirtRateParams { + var ( + periodTypeDefault = string("hourly") + ) + return &V1SpectroClustersLibvirtRateParams{ + PeriodType: &periodTypeDefault, + + Context: ctx, + } +} + +// NewV1SpectroClustersLibvirtRateParamsWithHTTPClient creates a new V1SpectroClustersLibvirtRateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1SpectroClustersLibvirtRateParamsWithHTTPClient(client *http.Client) *V1SpectroClustersLibvirtRateParams { + var ( + periodTypeDefault = string("hourly") + ) + return &V1SpectroClustersLibvirtRateParams{ + PeriodType: &periodTypeDefault, + HTTPClient: client, + } +} + +/* +V1SpectroClustersLibvirtRateParams contains all the parameters to send to the API endpoint +for the v1 spectro clusters libvirt rate operation typically these are written to a http.Request +*/ +type V1SpectroClustersLibvirtRateParams struct { + + /*Body*/ + Body *models.V1SpectroLibvirtClusterRateEntity + /*PeriodType*/ + PeriodType *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 spectro clusters libvirt rate params +func (o *V1SpectroClustersLibvirtRateParams) WithTimeout(timeout time.Duration) *V1SpectroClustersLibvirtRateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 spectro clusters libvirt rate params +func (o *V1SpectroClustersLibvirtRateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 spectro clusters libvirt rate params +func (o *V1SpectroClustersLibvirtRateParams) WithContext(ctx context.Context) *V1SpectroClustersLibvirtRateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 spectro clusters libvirt rate params +func (o *V1SpectroClustersLibvirtRateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 spectro clusters libvirt rate params +func (o *V1SpectroClustersLibvirtRateParams) WithHTTPClient(client *http.Client) *V1SpectroClustersLibvirtRateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 spectro clusters libvirt rate params +func (o *V1SpectroClustersLibvirtRateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 spectro clusters libvirt rate params +func (o *V1SpectroClustersLibvirtRateParams) WithBody(body *models.V1SpectroLibvirtClusterRateEntity) *V1SpectroClustersLibvirtRateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 spectro clusters libvirt rate params +func (o *V1SpectroClustersLibvirtRateParams) SetBody(body *models.V1SpectroLibvirtClusterRateEntity) { + o.Body = body +} + +// WithPeriodType adds the periodType to the v1 spectro clusters libvirt rate params +func (o *V1SpectroClustersLibvirtRateParams) WithPeriodType(periodType *string) *V1SpectroClustersLibvirtRateParams { + o.SetPeriodType(periodType) + return o +} + +// SetPeriodType adds the periodType to the v1 spectro clusters libvirt rate params +func (o *V1SpectroClustersLibvirtRateParams) SetPeriodType(periodType *string) { + o.PeriodType = periodType +} + +// WriteToRequest writes these params to a swagger request +func (o *V1SpectroClustersLibvirtRateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + if o.PeriodType != nil { + + // query param periodType + var qrPeriodType string + if o.PeriodType != nil { + qrPeriodType = *o.PeriodType + } + qPeriodType := qrPeriodType + if qPeriodType != "" { + if err := r.SetQueryParam("periodType", qPeriodType); err != nil { + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_libvirt_rate_responses.go b/api/client/v1/v1_spectro_clusters_libvirt_rate_responses.go new file mode 100644 index 00000000..99ed53ff --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_libvirt_rate_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1SpectroClustersLibvirtRateReader is a Reader for the V1SpectroClustersLibvirtRate structure. +type V1SpectroClustersLibvirtRateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1SpectroClustersLibvirtRateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1SpectroClustersLibvirtRateOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1SpectroClustersLibvirtRateOK creates a V1SpectroClustersLibvirtRateOK with default headers values +func NewV1SpectroClustersLibvirtRateOK() *V1SpectroClustersLibvirtRateOK { + return &V1SpectroClustersLibvirtRateOK{} +} + +/* +V1SpectroClustersLibvirtRateOK handles this case with default header values. + +Libvirt Cluster estimated rate response +*/ +type V1SpectroClustersLibvirtRateOK struct { + Payload *models.V1SpectroClusterRate +} + +func (o *V1SpectroClustersLibvirtRateOK) Error() string { + return fmt.Sprintf("[POST /v1/spectroclusters/libvirt/rate][%d] v1SpectroClustersLibvirtRateOK %+v", 200, o.Payload) +} + +func (o *V1SpectroClustersLibvirtRateOK) GetPayload() *models.V1SpectroClusterRate { + return o.Payload +} + +func (o *V1SpectroClustersLibvirtRateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1SpectroClusterRate) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_libvirt_validate_parameters.go b/api/client/v1/v1_spectro_clusters_libvirt_validate_parameters.go new file mode 100644 index 00000000..72fe6bc7 --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_libvirt_validate_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1SpectroClustersLibvirtValidateParams creates a new V1SpectroClustersLibvirtValidateParams object +// with the default values initialized. +func NewV1SpectroClustersLibvirtValidateParams() *V1SpectroClustersLibvirtValidateParams { + var () + return &V1SpectroClustersLibvirtValidateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1SpectroClustersLibvirtValidateParamsWithTimeout creates a new V1SpectroClustersLibvirtValidateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1SpectroClustersLibvirtValidateParamsWithTimeout(timeout time.Duration) *V1SpectroClustersLibvirtValidateParams { + var () + return &V1SpectroClustersLibvirtValidateParams{ + + timeout: timeout, + } +} + +// NewV1SpectroClustersLibvirtValidateParamsWithContext creates a new V1SpectroClustersLibvirtValidateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1SpectroClustersLibvirtValidateParamsWithContext(ctx context.Context) *V1SpectroClustersLibvirtValidateParams { + var () + return &V1SpectroClustersLibvirtValidateParams{ + + Context: ctx, + } +} + +// NewV1SpectroClustersLibvirtValidateParamsWithHTTPClient creates a new V1SpectroClustersLibvirtValidateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1SpectroClustersLibvirtValidateParamsWithHTTPClient(client *http.Client) *V1SpectroClustersLibvirtValidateParams { + var () + return &V1SpectroClustersLibvirtValidateParams{ + HTTPClient: client, + } +} + +/* +V1SpectroClustersLibvirtValidateParams contains all the parameters to send to the API endpoint +for the v1 spectro clusters libvirt validate operation typically these are written to a http.Request +*/ +type V1SpectroClustersLibvirtValidateParams struct { + + /*Body*/ + Body *models.V1SpectroLibvirtClusterEntity + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 spectro clusters libvirt validate params +func (o *V1SpectroClustersLibvirtValidateParams) WithTimeout(timeout time.Duration) *V1SpectroClustersLibvirtValidateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 spectro clusters libvirt validate params +func (o *V1SpectroClustersLibvirtValidateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 spectro clusters libvirt validate params +func (o *V1SpectroClustersLibvirtValidateParams) WithContext(ctx context.Context) *V1SpectroClustersLibvirtValidateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 spectro clusters libvirt validate params +func (o *V1SpectroClustersLibvirtValidateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 spectro clusters libvirt validate params +func (o *V1SpectroClustersLibvirtValidateParams) WithHTTPClient(client *http.Client) *V1SpectroClustersLibvirtValidateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 spectro clusters libvirt validate params +func (o *V1SpectroClustersLibvirtValidateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 spectro clusters libvirt validate params +func (o *V1SpectroClustersLibvirtValidateParams) WithBody(body *models.V1SpectroLibvirtClusterEntity) *V1SpectroClustersLibvirtValidateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 spectro clusters libvirt validate params +func (o *V1SpectroClustersLibvirtValidateParams) SetBody(body *models.V1SpectroLibvirtClusterEntity) { + o.Body = body +} + +// WriteToRequest writes these params to a swagger request +func (o *V1SpectroClustersLibvirtValidateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_libvirt_validate_responses.go b/api/client/v1/v1_spectro_clusters_libvirt_validate_responses.go new file mode 100644 index 00000000..11a2571a --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_libvirt_validate_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1SpectroClustersLibvirtValidateReader is a Reader for the V1SpectroClustersLibvirtValidate structure. +type V1SpectroClustersLibvirtValidateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1SpectroClustersLibvirtValidateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1SpectroClustersLibvirtValidateOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1SpectroClustersLibvirtValidateOK creates a V1SpectroClustersLibvirtValidateOK with default headers values +func NewV1SpectroClustersLibvirtValidateOK() *V1SpectroClustersLibvirtValidateOK { + return &V1SpectroClustersLibvirtValidateOK{} +} + +/* +V1SpectroClustersLibvirtValidateOK handles this case with default header values. + +Libvirt Cluster validation response +*/ +type V1SpectroClustersLibvirtValidateOK struct { + Payload *models.V1SpectroClusterValidatorResponse +} + +func (o *V1SpectroClustersLibvirtValidateOK) Error() string { + return fmt.Sprintf("[POST /v1/spectroclusters/libvirt/validate][%d] v1SpectroClustersLibvirtValidateOK %+v", 200, o.Payload) +} + +func (o *V1SpectroClustersLibvirtValidateOK) GetPayload() *models.V1SpectroClusterValidatorResponse { + return o.Payload +} + +func (o *V1SpectroClustersLibvirtValidateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1SpectroClusterValidatorResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_maas_create_parameters.go b/api/client/v1/v1_spectro_clusters_maas_create_parameters.go new file mode 100644 index 00000000..fc46ff07 --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_maas_create_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1SpectroClustersMaasCreateParams creates a new V1SpectroClustersMaasCreateParams object +// with the default values initialized. +func NewV1SpectroClustersMaasCreateParams() *V1SpectroClustersMaasCreateParams { + var () + return &V1SpectroClustersMaasCreateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1SpectroClustersMaasCreateParamsWithTimeout creates a new V1SpectroClustersMaasCreateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1SpectroClustersMaasCreateParamsWithTimeout(timeout time.Duration) *V1SpectroClustersMaasCreateParams { + var () + return &V1SpectroClustersMaasCreateParams{ + + timeout: timeout, + } +} + +// NewV1SpectroClustersMaasCreateParamsWithContext creates a new V1SpectroClustersMaasCreateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1SpectroClustersMaasCreateParamsWithContext(ctx context.Context) *V1SpectroClustersMaasCreateParams { + var () + return &V1SpectroClustersMaasCreateParams{ + + Context: ctx, + } +} + +// NewV1SpectroClustersMaasCreateParamsWithHTTPClient creates a new V1SpectroClustersMaasCreateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1SpectroClustersMaasCreateParamsWithHTTPClient(client *http.Client) *V1SpectroClustersMaasCreateParams { + var () + return &V1SpectroClustersMaasCreateParams{ + HTTPClient: client, + } +} + +/* +V1SpectroClustersMaasCreateParams contains all the parameters to send to the API endpoint +for the v1 spectro clusters maas create operation typically these are written to a http.Request +*/ +type V1SpectroClustersMaasCreateParams struct { + + /*Body*/ + Body *models.V1SpectroMaasClusterEntity + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 spectro clusters maas create params +func (o *V1SpectroClustersMaasCreateParams) WithTimeout(timeout time.Duration) *V1SpectroClustersMaasCreateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 spectro clusters maas create params +func (o *V1SpectroClustersMaasCreateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 spectro clusters maas create params +func (o *V1SpectroClustersMaasCreateParams) WithContext(ctx context.Context) *V1SpectroClustersMaasCreateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 spectro clusters maas create params +func (o *V1SpectroClustersMaasCreateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 spectro clusters maas create params +func (o *V1SpectroClustersMaasCreateParams) WithHTTPClient(client *http.Client) *V1SpectroClustersMaasCreateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 spectro clusters maas create params +func (o *V1SpectroClustersMaasCreateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 spectro clusters maas create params +func (o *V1SpectroClustersMaasCreateParams) WithBody(body *models.V1SpectroMaasClusterEntity) *V1SpectroClustersMaasCreateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 spectro clusters maas create params +func (o *V1SpectroClustersMaasCreateParams) SetBody(body *models.V1SpectroMaasClusterEntity) { + o.Body = body +} + +// WriteToRequest writes these params to a swagger request +func (o *V1SpectroClustersMaasCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_maas_create_responses.go b/api/client/v1/v1_spectro_clusters_maas_create_responses.go new file mode 100644 index 00000000..fbd51d0a --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_maas_create_responses.go @@ -0,0 +1,77 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1SpectroClustersMaasCreateReader is a Reader for the V1SpectroClustersMaasCreate structure. +type V1SpectroClustersMaasCreateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1SpectroClustersMaasCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 201: + result := NewV1SpectroClustersMaasCreateCreated() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1SpectroClustersMaasCreateCreated creates a V1SpectroClustersMaasCreateCreated with default headers values +func NewV1SpectroClustersMaasCreateCreated() *V1SpectroClustersMaasCreateCreated { + return &V1SpectroClustersMaasCreateCreated{} +} + +/* +V1SpectroClustersMaasCreateCreated handles this case with default header values. + +Created successfully +*/ +type V1SpectroClustersMaasCreateCreated struct { + /*Audit uid for the request + */ + AuditUID string + + Payload *models.V1UID +} + +func (o *V1SpectroClustersMaasCreateCreated) Error() string { + return fmt.Sprintf("[POST /v1/spectroclusters/maas][%d] v1SpectroClustersMaasCreateCreated %+v", 201, o.Payload) +} + +func (o *V1SpectroClustersMaasCreateCreated) GetPayload() *models.V1UID { + return o.Payload +} + +func (o *V1SpectroClustersMaasCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header AuditUid + o.AuditUID = response.GetHeader("AuditUid") + + o.Payload = new(models.V1UID) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_maas_import_parameters.go b/api/client/v1/v1_spectro_clusters_maas_import_parameters.go new file mode 100644 index 00000000..33f2b2dc --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_maas_import_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1SpectroClustersMaasImportParams creates a new V1SpectroClustersMaasImportParams object +// with the default values initialized. +func NewV1SpectroClustersMaasImportParams() *V1SpectroClustersMaasImportParams { + var () + return &V1SpectroClustersMaasImportParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1SpectroClustersMaasImportParamsWithTimeout creates a new V1SpectroClustersMaasImportParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1SpectroClustersMaasImportParamsWithTimeout(timeout time.Duration) *V1SpectroClustersMaasImportParams { + var () + return &V1SpectroClustersMaasImportParams{ + + timeout: timeout, + } +} + +// NewV1SpectroClustersMaasImportParamsWithContext creates a new V1SpectroClustersMaasImportParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1SpectroClustersMaasImportParamsWithContext(ctx context.Context) *V1SpectroClustersMaasImportParams { + var () + return &V1SpectroClustersMaasImportParams{ + + Context: ctx, + } +} + +// NewV1SpectroClustersMaasImportParamsWithHTTPClient creates a new V1SpectroClustersMaasImportParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1SpectroClustersMaasImportParamsWithHTTPClient(client *http.Client) *V1SpectroClustersMaasImportParams { + var () + return &V1SpectroClustersMaasImportParams{ + HTTPClient: client, + } +} + +/* +V1SpectroClustersMaasImportParams contains all the parameters to send to the API endpoint +for the v1 spectro clusters maas import operation typically these are written to a http.Request +*/ +type V1SpectroClustersMaasImportParams struct { + + /*Body*/ + Body *models.V1SpectroMaasClusterImportEntity + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 spectro clusters maas import params +func (o *V1SpectroClustersMaasImportParams) WithTimeout(timeout time.Duration) *V1SpectroClustersMaasImportParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 spectro clusters maas import params +func (o *V1SpectroClustersMaasImportParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 spectro clusters maas import params +func (o *V1SpectroClustersMaasImportParams) WithContext(ctx context.Context) *V1SpectroClustersMaasImportParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 spectro clusters maas import params +func (o *V1SpectroClustersMaasImportParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 spectro clusters maas import params +func (o *V1SpectroClustersMaasImportParams) WithHTTPClient(client *http.Client) *V1SpectroClustersMaasImportParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 spectro clusters maas import params +func (o *V1SpectroClustersMaasImportParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 spectro clusters maas import params +func (o *V1SpectroClustersMaasImportParams) WithBody(body *models.V1SpectroMaasClusterImportEntity) *V1SpectroClustersMaasImportParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 spectro clusters maas import params +func (o *V1SpectroClustersMaasImportParams) SetBody(body *models.V1SpectroMaasClusterImportEntity) { + o.Body = body +} + +// WriteToRequest writes these params to a swagger request +func (o *V1SpectroClustersMaasImportParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_maas_import_responses.go b/api/client/v1/v1_spectro_clusters_maas_import_responses.go new file mode 100644 index 00000000..7b7b249c --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_maas_import_responses.go @@ -0,0 +1,77 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1SpectroClustersMaasImportReader is a Reader for the V1SpectroClustersMaasImport structure. +type V1SpectroClustersMaasImportReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1SpectroClustersMaasImportReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 201: + result := NewV1SpectroClustersMaasImportCreated() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1SpectroClustersMaasImportCreated creates a V1SpectroClustersMaasImportCreated with default headers values +func NewV1SpectroClustersMaasImportCreated() *V1SpectroClustersMaasImportCreated { + return &V1SpectroClustersMaasImportCreated{} +} + +/* +V1SpectroClustersMaasImportCreated handles this case with default header values. + +Created successfully +*/ +type V1SpectroClustersMaasImportCreated struct { + /*Audit uid for the request + */ + AuditUID string + + Payload *models.V1UID +} + +func (o *V1SpectroClustersMaasImportCreated) Error() string { + return fmt.Sprintf("[POST /v1/spectroclusters/maas/import][%d] v1SpectroClustersMaasImportCreated %+v", 201, o.Payload) +} + +func (o *V1SpectroClustersMaasImportCreated) GetPayload() *models.V1UID { + return o.Payload +} + +func (o *V1SpectroClustersMaasImportCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header AuditUid + o.AuditUID = response.GetHeader("AuditUid") + + o.Payload = new(models.V1UID) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_maas_rate_parameters.go b/api/client/v1/v1_spectro_clusters_maas_rate_parameters.go new file mode 100644 index 00000000..1ba4072b --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_maas_rate_parameters.go @@ -0,0 +1,177 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1SpectroClustersMaasRateParams creates a new V1SpectroClustersMaasRateParams object +// with the default values initialized. +func NewV1SpectroClustersMaasRateParams() *V1SpectroClustersMaasRateParams { + var ( + periodTypeDefault = string("hourly") + ) + return &V1SpectroClustersMaasRateParams{ + PeriodType: &periodTypeDefault, + + timeout: cr.DefaultTimeout, + } +} + +// NewV1SpectroClustersMaasRateParamsWithTimeout creates a new V1SpectroClustersMaasRateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1SpectroClustersMaasRateParamsWithTimeout(timeout time.Duration) *V1SpectroClustersMaasRateParams { + var ( + periodTypeDefault = string("hourly") + ) + return &V1SpectroClustersMaasRateParams{ + PeriodType: &periodTypeDefault, + + timeout: timeout, + } +} + +// NewV1SpectroClustersMaasRateParamsWithContext creates a new V1SpectroClustersMaasRateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1SpectroClustersMaasRateParamsWithContext(ctx context.Context) *V1SpectroClustersMaasRateParams { + var ( + periodTypeDefault = string("hourly") + ) + return &V1SpectroClustersMaasRateParams{ + PeriodType: &periodTypeDefault, + + Context: ctx, + } +} + +// NewV1SpectroClustersMaasRateParamsWithHTTPClient creates a new V1SpectroClustersMaasRateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1SpectroClustersMaasRateParamsWithHTTPClient(client *http.Client) *V1SpectroClustersMaasRateParams { + var ( + periodTypeDefault = string("hourly") + ) + return &V1SpectroClustersMaasRateParams{ + PeriodType: &periodTypeDefault, + HTTPClient: client, + } +} + +/* +V1SpectroClustersMaasRateParams contains all the parameters to send to the API endpoint +for the v1 spectro clusters maas rate operation typically these are written to a http.Request +*/ +type V1SpectroClustersMaasRateParams struct { + + /*Body*/ + Body *models.V1SpectroMaasClusterRateEntity + /*PeriodType*/ + PeriodType *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 spectro clusters maas rate params +func (o *V1SpectroClustersMaasRateParams) WithTimeout(timeout time.Duration) *V1SpectroClustersMaasRateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 spectro clusters maas rate params +func (o *V1SpectroClustersMaasRateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 spectro clusters maas rate params +func (o *V1SpectroClustersMaasRateParams) WithContext(ctx context.Context) *V1SpectroClustersMaasRateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 spectro clusters maas rate params +func (o *V1SpectroClustersMaasRateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 spectro clusters maas rate params +func (o *V1SpectroClustersMaasRateParams) WithHTTPClient(client *http.Client) *V1SpectroClustersMaasRateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 spectro clusters maas rate params +func (o *V1SpectroClustersMaasRateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 spectro clusters maas rate params +func (o *V1SpectroClustersMaasRateParams) WithBody(body *models.V1SpectroMaasClusterRateEntity) *V1SpectroClustersMaasRateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 spectro clusters maas rate params +func (o *V1SpectroClustersMaasRateParams) SetBody(body *models.V1SpectroMaasClusterRateEntity) { + o.Body = body +} + +// WithPeriodType adds the periodType to the v1 spectro clusters maas rate params +func (o *V1SpectroClustersMaasRateParams) WithPeriodType(periodType *string) *V1SpectroClustersMaasRateParams { + o.SetPeriodType(periodType) + return o +} + +// SetPeriodType adds the periodType to the v1 spectro clusters maas rate params +func (o *V1SpectroClustersMaasRateParams) SetPeriodType(periodType *string) { + o.PeriodType = periodType +} + +// WriteToRequest writes these params to a swagger request +func (o *V1SpectroClustersMaasRateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + if o.PeriodType != nil { + + // query param periodType + var qrPeriodType string + if o.PeriodType != nil { + qrPeriodType = *o.PeriodType + } + qPeriodType := qrPeriodType + if qPeriodType != "" { + if err := r.SetQueryParam("periodType", qPeriodType); err != nil { + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_maas_rate_responses.go b/api/client/v1/v1_spectro_clusters_maas_rate_responses.go new file mode 100644 index 00000000..6baeb2d7 --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_maas_rate_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1SpectroClustersMaasRateReader is a Reader for the V1SpectroClustersMaasRate structure. +type V1SpectroClustersMaasRateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1SpectroClustersMaasRateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1SpectroClustersMaasRateOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1SpectroClustersMaasRateOK creates a V1SpectroClustersMaasRateOK with default headers values +func NewV1SpectroClustersMaasRateOK() *V1SpectroClustersMaasRateOK { + return &V1SpectroClustersMaasRateOK{} +} + +/* +V1SpectroClustersMaasRateOK handles this case with default header values. + +Maas Cluster estimated rate response +*/ +type V1SpectroClustersMaasRateOK struct { + Payload *models.V1SpectroClusterRate +} + +func (o *V1SpectroClustersMaasRateOK) Error() string { + return fmt.Sprintf("[POST /v1/spectroclusters/maas/rate][%d] v1SpectroClustersMaasRateOK %+v", 200, o.Payload) +} + +func (o *V1SpectroClustersMaasRateOK) GetPayload() *models.V1SpectroClusterRate { + return o.Payload +} + +func (o *V1SpectroClustersMaasRateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1SpectroClusterRate) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_maas_validate_parameters.go b/api/client/v1/v1_spectro_clusters_maas_validate_parameters.go new file mode 100644 index 00000000..5aa4ccf0 --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_maas_validate_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1SpectroClustersMaasValidateParams creates a new V1SpectroClustersMaasValidateParams object +// with the default values initialized. +func NewV1SpectroClustersMaasValidateParams() *V1SpectroClustersMaasValidateParams { + var () + return &V1SpectroClustersMaasValidateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1SpectroClustersMaasValidateParamsWithTimeout creates a new V1SpectroClustersMaasValidateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1SpectroClustersMaasValidateParamsWithTimeout(timeout time.Duration) *V1SpectroClustersMaasValidateParams { + var () + return &V1SpectroClustersMaasValidateParams{ + + timeout: timeout, + } +} + +// NewV1SpectroClustersMaasValidateParamsWithContext creates a new V1SpectroClustersMaasValidateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1SpectroClustersMaasValidateParamsWithContext(ctx context.Context) *V1SpectroClustersMaasValidateParams { + var () + return &V1SpectroClustersMaasValidateParams{ + + Context: ctx, + } +} + +// NewV1SpectroClustersMaasValidateParamsWithHTTPClient creates a new V1SpectroClustersMaasValidateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1SpectroClustersMaasValidateParamsWithHTTPClient(client *http.Client) *V1SpectroClustersMaasValidateParams { + var () + return &V1SpectroClustersMaasValidateParams{ + HTTPClient: client, + } +} + +/* +V1SpectroClustersMaasValidateParams contains all the parameters to send to the API endpoint +for the v1 spectro clusters maas validate operation typically these are written to a http.Request +*/ +type V1SpectroClustersMaasValidateParams struct { + + /*Body*/ + Body *models.V1SpectroMaasClusterEntity + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 spectro clusters maas validate params +func (o *V1SpectroClustersMaasValidateParams) WithTimeout(timeout time.Duration) *V1SpectroClustersMaasValidateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 spectro clusters maas validate params +func (o *V1SpectroClustersMaasValidateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 spectro clusters maas validate params +func (o *V1SpectroClustersMaasValidateParams) WithContext(ctx context.Context) *V1SpectroClustersMaasValidateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 spectro clusters maas validate params +func (o *V1SpectroClustersMaasValidateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 spectro clusters maas validate params +func (o *V1SpectroClustersMaasValidateParams) WithHTTPClient(client *http.Client) *V1SpectroClustersMaasValidateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 spectro clusters maas validate params +func (o *V1SpectroClustersMaasValidateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 spectro clusters maas validate params +func (o *V1SpectroClustersMaasValidateParams) WithBody(body *models.V1SpectroMaasClusterEntity) *V1SpectroClustersMaasValidateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 spectro clusters maas validate params +func (o *V1SpectroClustersMaasValidateParams) SetBody(body *models.V1SpectroMaasClusterEntity) { + o.Body = body +} + +// WriteToRequest writes these params to a swagger request +func (o *V1SpectroClustersMaasValidateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_maas_validate_responses.go b/api/client/v1/v1_spectro_clusters_maas_validate_responses.go new file mode 100644 index 00000000..79bf594b --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_maas_validate_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1SpectroClustersMaasValidateReader is a Reader for the V1SpectroClustersMaasValidate structure. +type V1SpectroClustersMaasValidateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1SpectroClustersMaasValidateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1SpectroClustersMaasValidateOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1SpectroClustersMaasValidateOK creates a V1SpectroClustersMaasValidateOK with default headers values +func NewV1SpectroClustersMaasValidateOK() *V1SpectroClustersMaasValidateOK { + return &V1SpectroClustersMaasValidateOK{} +} + +/* +V1SpectroClustersMaasValidateOK handles this case with default header values. + +Maas Cluster validation response +*/ +type V1SpectroClustersMaasValidateOK struct { + Payload *models.V1SpectroClusterValidatorResponse +} + +func (o *V1SpectroClustersMaasValidateOK) Error() string { + return fmt.Sprintf("[POST /v1/spectroclusters/maas/validate][%d] v1SpectroClustersMaasValidateOK %+v", 200, o.Payload) +} + +func (o *V1SpectroClustersMaasValidateOK) GetPayload() *models.V1SpectroClusterValidatorResponse { + return o.Payload +} + +func (o *V1SpectroClustersMaasValidateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1SpectroClusterValidatorResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_metadata_get_parameters.go b/api/client/v1/v1_spectro_clusters_metadata_get_parameters.go new file mode 100644 index 00000000..df339c70 --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_metadata_get_parameters.go @@ -0,0 +1,144 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1SpectroClustersMetadataGetParams creates a new V1SpectroClustersMetadataGetParams object +// with the default values initialized. +func NewV1SpectroClustersMetadataGetParams() *V1SpectroClustersMetadataGetParams { + var () + return &V1SpectroClustersMetadataGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1SpectroClustersMetadataGetParamsWithTimeout creates a new V1SpectroClustersMetadataGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1SpectroClustersMetadataGetParamsWithTimeout(timeout time.Duration) *V1SpectroClustersMetadataGetParams { + var () + return &V1SpectroClustersMetadataGetParams{ + + timeout: timeout, + } +} + +// NewV1SpectroClustersMetadataGetParamsWithContext creates a new V1SpectroClustersMetadataGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1SpectroClustersMetadataGetParamsWithContext(ctx context.Context) *V1SpectroClustersMetadataGetParams { + var () + return &V1SpectroClustersMetadataGetParams{ + + Context: ctx, + } +} + +// NewV1SpectroClustersMetadataGetParamsWithHTTPClient creates a new V1SpectroClustersMetadataGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1SpectroClustersMetadataGetParamsWithHTTPClient(client *http.Client) *V1SpectroClustersMetadataGetParams { + var () + return &V1SpectroClustersMetadataGetParams{ + HTTPClient: client, + } +} + +/* +V1SpectroClustersMetadataGetParams contains all the parameters to send to the API endpoint +for the v1 spectro clusters metadata get operation typically these are written to a http.Request +*/ +type V1SpectroClustersMetadataGetParams struct { + + /*QuickFilter*/ + QuickFilter *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 spectro clusters metadata get params +func (o *V1SpectroClustersMetadataGetParams) WithTimeout(timeout time.Duration) *V1SpectroClustersMetadataGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 spectro clusters metadata get params +func (o *V1SpectroClustersMetadataGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 spectro clusters metadata get params +func (o *V1SpectroClustersMetadataGetParams) WithContext(ctx context.Context) *V1SpectroClustersMetadataGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 spectro clusters metadata get params +func (o *V1SpectroClustersMetadataGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 spectro clusters metadata get params +func (o *V1SpectroClustersMetadataGetParams) WithHTTPClient(client *http.Client) *V1SpectroClustersMetadataGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 spectro clusters metadata get params +func (o *V1SpectroClustersMetadataGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithQuickFilter adds the quickFilter to the v1 spectro clusters metadata get params +func (o *V1SpectroClustersMetadataGetParams) WithQuickFilter(quickFilter *string) *V1SpectroClustersMetadataGetParams { + o.SetQuickFilter(quickFilter) + return o +} + +// SetQuickFilter adds the quickFilter to the v1 spectro clusters metadata get params +func (o *V1SpectroClustersMetadataGetParams) SetQuickFilter(quickFilter *string) { + o.QuickFilter = quickFilter +} + +// WriteToRequest writes these params to a swagger request +func (o *V1SpectroClustersMetadataGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.QuickFilter != nil { + + // query param quickFilter + var qrQuickFilter string + if o.QuickFilter != nil { + qrQuickFilter = *o.QuickFilter + } + qQuickFilter := qrQuickFilter + if qQuickFilter != "" { + if err := r.SetQueryParam("quickFilter", qQuickFilter); err != nil { + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_metadata_get_responses.go b/api/client/v1/v1_spectro_clusters_metadata_get_responses.go new file mode 100644 index 00000000..d54511db --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_metadata_get_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1SpectroClustersMetadataGetReader is a Reader for the V1SpectroClustersMetadataGet structure. +type V1SpectroClustersMetadataGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1SpectroClustersMetadataGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1SpectroClustersMetadataGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1SpectroClustersMetadataGetOK creates a V1SpectroClustersMetadataGetOK with default headers values +func NewV1SpectroClustersMetadataGetOK() *V1SpectroClustersMetadataGetOK { + return &V1SpectroClustersMetadataGetOK{} +} + +/* +V1SpectroClustersMetadataGetOK handles this case with default header values. + +An array of cluster summary items +*/ +type V1SpectroClustersMetadataGetOK struct { + Payload *models.V1SpectroClustersMetadata +} + +func (o *V1SpectroClustersMetadataGetOK) Error() string { + return fmt.Sprintf("[GET /v1/dashboard/spectroclusters/metadata][%d] v1SpectroClustersMetadataGetOK %+v", 200, o.Payload) +} + +func (o *V1SpectroClustersMetadataGetOK) GetPayload() *models.V1SpectroClustersMetadata { + return o.Payload +} + +func (o *V1SpectroClustersMetadataGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1SpectroClustersMetadata) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_metadata_parameters.go b/api/client/v1/v1_spectro_clusters_metadata_parameters.go new file mode 100644 index 00000000..5c37e03d --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_metadata_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1SpectroClustersMetadataParams creates a new V1SpectroClustersMetadataParams object +// with the default values initialized. +func NewV1SpectroClustersMetadataParams() *V1SpectroClustersMetadataParams { + var () + return &V1SpectroClustersMetadataParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1SpectroClustersMetadataParamsWithTimeout creates a new V1SpectroClustersMetadataParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1SpectroClustersMetadataParamsWithTimeout(timeout time.Duration) *V1SpectroClustersMetadataParams { + var () + return &V1SpectroClustersMetadataParams{ + + timeout: timeout, + } +} + +// NewV1SpectroClustersMetadataParamsWithContext creates a new V1SpectroClustersMetadataParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1SpectroClustersMetadataParamsWithContext(ctx context.Context) *V1SpectroClustersMetadataParams { + var () + return &V1SpectroClustersMetadataParams{ + + Context: ctx, + } +} + +// NewV1SpectroClustersMetadataParamsWithHTTPClient creates a new V1SpectroClustersMetadataParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1SpectroClustersMetadataParamsWithHTTPClient(client *http.Client) *V1SpectroClustersMetadataParams { + var () + return &V1SpectroClustersMetadataParams{ + HTTPClient: client, + } +} + +/* +V1SpectroClustersMetadataParams contains all the parameters to send to the API endpoint +for the v1 spectro clusters metadata operation typically these are written to a http.Request +*/ +type V1SpectroClustersMetadataParams struct { + + /*Body*/ + Body *models.V1SpectroClusterMetadataSpec + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 spectro clusters metadata params +func (o *V1SpectroClustersMetadataParams) WithTimeout(timeout time.Duration) *V1SpectroClustersMetadataParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 spectro clusters metadata params +func (o *V1SpectroClustersMetadataParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 spectro clusters metadata params +func (o *V1SpectroClustersMetadataParams) WithContext(ctx context.Context) *V1SpectroClustersMetadataParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 spectro clusters metadata params +func (o *V1SpectroClustersMetadataParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 spectro clusters metadata params +func (o *V1SpectroClustersMetadataParams) WithHTTPClient(client *http.Client) *V1SpectroClustersMetadataParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 spectro clusters metadata params +func (o *V1SpectroClustersMetadataParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 spectro clusters metadata params +func (o *V1SpectroClustersMetadataParams) WithBody(body *models.V1SpectroClusterMetadataSpec) *V1SpectroClustersMetadataParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 spectro clusters metadata params +func (o *V1SpectroClustersMetadataParams) SetBody(body *models.V1SpectroClusterMetadataSpec) { + o.Body = body +} + +// WriteToRequest writes these params to a swagger request +func (o *V1SpectroClustersMetadataParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_metadata_responses.go b/api/client/v1/v1_spectro_clusters_metadata_responses.go new file mode 100644 index 00000000..1e153ace --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_metadata_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1SpectroClustersMetadataReader is a Reader for the V1SpectroClustersMetadata structure. +type V1SpectroClustersMetadataReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1SpectroClustersMetadataReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1SpectroClustersMetadataOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1SpectroClustersMetadataOK creates a V1SpectroClustersMetadataOK with default headers values +func NewV1SpectroClustersMetadataOK() *V1SpectroClustersMetadataOK { + return &V1SpectroClustersMetadataOK{} +} + +/* +V1SpectroClustersMetadataOK handles this case with default header values. + +An array of cluster summary items +*/ +type V1SpectroClustersMetadataOK struct { + Payload *models.V1SpectroClustersMetadata +} + +func (o *V1SpectroClustersMetadataOK) Error() string { + return fmt.Sprintf("[POST /v1/dashboard/spectroclusters/metadata][%d] v1SpectroClustersMetadataOK %+v", 200, o.Payload) +} + +func (o *V1SpectroClustersMetadataOK) GetPayload() *models.V1SpectroClustersMetadata { + return o.Payload +} + +func (o *V1SpectroClustersMetadataOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1SpectroClustersMetadata) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_metadata_search_parameters.go b/api/client/v1/v1_spectro_clusters_metadata_search_parameters.go new file mode 100644 index 00000000..f35fae98 --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_metadata_search_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1SpectroClustersMetadataSearchParams creates a new V1SpectroClustersMetadataSearchParams object +// with the default values initialized. +func NewV1SpectroClustersMetadataSearchParams() *V1SpectroClustersMetadataSearchParams { + var () + return &V1SpectroClustersMetadataSearchParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1SpectroClustersMetadataSearchParamsWithTimeout creates a new V1SpectroClustersMetadataSearchParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1SpectroClustersMetadataSearchParamsWithTimeout(timeout time.Duration) *V1SpectroClustersMetadataSearchParams { + var () + return &V1SpectroClustersMetadataSearchParams{ + + timeout: timeout, + } +} + +// NewV1SpectroClustersMetadataSearchParamsWithContext creates a new V1SpectroClustersMetadataSearchParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1SpectroClustersMetadataSearchParamsWithContext(ctx context.Context) *V1SpectroClustersMetadataSearchParams { + var () + return &V1SpectroClustersMetadataSearchParams{ + + Context: ctx, + } +} + +// NewV1SpectroClustersMetadataSearchParamsWithHTTPClient creates a new V1SpectroClustersMetadataSearchParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1SpectroClustersMetadataSearchParamsWithHTTPClient(client *http.Client) *V1SpectroClustersMetadataSearchParams { + var () + return &V1SpectroClustersMetadataSearchParams{ + HTTPClient: client, + } +} + +/* +V1SpectroClustersMetadataSearchParams contains all the parameters to send to the API endpoint +for the v1 spectro clusters metadata search operation typically these are written to a http.Request +*/ +type V1SpectroClustersMetadataSearchParams struct { + + /*Body*/ + Body *models.V1SearchFilterSummarySpec + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 spectro clusters metadata search params +func (o *V1SpectroClustersMetadataSearchParams) WithTimeout(timeout time.Duration) *V1SpectroClustersMetadataSearchParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 spectro clusters metadata search params +func (o *V1SpectroClustersMetadataSearchParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 spectro clusters metadata search params +func (o *V1SpectroClustersMetadataSearchParams) WithContext(ctx context.Context) *V1SpectroClustersMetadataSearchParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 spectro clusters metadata search params +func (o *V1SpectroClustersMetadataSearchParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 spectro clusters metadata search params +func (o *V1SpectroClustersMetadataSearchParams) WithHTTPClient(client *http.Client) *V1SpectroClustersMetadataSearchParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 spectro clusters metadata search params +func (o *V1SpectroClustersMetadataSearchParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 spectro clusters metadata search params +func (o *V1SpectroClustersMetadataSearchParams) WithBody(body *models.V1SearchFilterSummarySpec) *V1SpectroClustersMetadataSearchParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 spectro clusters metadata search params +func (o *V1SpectroClustersMetadataSearchParams) SetBody(body *models.V1SearchFilterSummarySpec) { + o.Body = body +} + +// WriteToRequest writes these params to a swagger request +func (o *V1SpectroClustersMetadataSearchParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_metadata_search_responses.go b/api/client/v1/v1_spectro_clusters_metadata_search_responses.go new file mode 100644 index 00000000..c671c847 --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_metadata_search_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1SpectroClustersMetadataSearchReader is a Reader for the V1SpectroClustersMetadataSearch structure. +type V1SpectroClustersMetadataSearchReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1SpectroClustersMetadataSearchReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1SpectroClustersMetadataSearchOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1SpectroClustersMetadataSearchOK creates a V1SpectroClustersMetadataSearchOK with default headers values +func NewV1SpectroClustersMetadataSearchOK() *V1SpectroClustersMetadataSearchOK { + return &V1SpectroClustersMetadataSearchOK{} +} + +/* +V1SpectroClustersMetadataSearchOK handles this case with default header values. + +An array of cluster summary meta items +*/ +type V1SpectroClustersMetadataSearchOK struct { + Payload *models.V1SpectroClustersMetadataSearch +} + +func (o *V1SpectroClustersMetadataSearchOK) Error() string { + return fmt.Sprintf("[POST /v1/dashboard/spectroclusters/metadata/search][%d] v1SpectroClustersMetadataSearchOK %+v", 200, o.Payload) +} + +func (o *V1SpectroClustersMetadataSearchOK) GetPayload() *models.V1SpectroClustersMetadataSearch { + return o.Payload +} + +func (o *V1SpectroClustersMetadataSearchOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1SpectroClustersMetadataSearch) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_metadata_search_schema_parameters.go b/api/client/v1/v1_spectro_clusters_metadata_search_schema_parameters.go new file mode 100644 index 00000000..85dd11d4 --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_metadata_search_schema_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1SpectroClustersMetadataSearchSchemaParams creates a new V1SpectroClustersMetadataSearchSchemaParams object +// with the default values initialized. +func NewV1SpectroClustersMetadataSearchSchemaParams() *V1SpectroClustersMetadataSearchSchemaParams { + + return &V1SpectroClustersMetadataSearchSchemaParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1SpectroClustersMetadataSearchSchemaParamsWithTimeout creates a new V1SpectroClustersMetadataSearchSchemaParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1SpectroClustersMetadataSearchSchemaParamsWithTimeout(timeout time.Duration) *V1SpectroClustersMetadataSearchSchemaParams { + + return &V1SpectroClustersMetadataSearchSchemaParams{ + + timeout: timeout, + } +} + +// NewV1SpectroClustersMetadataSearchSchemaParamsWithContext creates a new V1SpectroClustersMetadataSearchSchemaParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1SpectroClustersMetadataSearchSchemaParamsWithContext(ctx context.Context) *V1SpectroClustersMetadataSearchSchemaParams { + + return &V1SpectroClustersMetadataSearchSchemaParams{ + + Context: ctx, + } +} + +// NewV1SpectroClustersMetadataSearchSchemaParamsWithHTTPClient creates a new V1SpectroClustersMetadataSearchSchemaParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1SpectroClustersMetadataSearchSchemaParamsWithHTTPClient(client *http.Client) *V1SpectroClustersMetadataSearchSchemaParams { + + return &V1SpectroClustersMetadataSearchSchemaParams{ + HTTPClient: client, + } +} + +/* +V1SpectroClustersMetadataSearchSchemaParams contains all the parameters to send to the API endpoint +for the v1 spectro clusters metadata search schema operation typically these are written to a http.Request +*/ +type V1SpectroClustersMetadataSearchSchemaParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 spectro clusters metadata search schema params +func (o *V1SpectroClustersMetadataSearchSchemaParams) WithTimeout(timeout time.Duration) *V1SpectroClustersMetadataSearchSchemaParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 spectro clusters metadata search schema params +func (o *V1SpectroClustersMetadataSearchSchemaParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 spectro clusters metadata search schema params +func (o *V1SpectroClustersMetadataSearchSchemaParams) WithContext(ctx context.Context) *V1SpectroClustersMetadataSearchSchemaParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 spectro clusters metadata search schema params +func (o *V1SpectroClustersMetadataSearchSchemaParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 spectro clusters metadata search schema params +func (o *V1SpectroClustersMetadataSearchSchemaParams) WithHTTPClient(client *http.Client) *V1SpectroClustersMetadataSearchSchemaParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 spectro clusters metadata search schema params +func (o *V1SpectroClustersMetadataSearchSchemaParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *V1SpectroClustersMetadataSearchSchemaParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_metadata_search_schema_responses.go b/api/client/v1/v1_spectro_clusters_metadata_search_schema_responses.go new file mode 100644 index 00000000..f9ac68ec --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_metadata_search_schema_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1SpectroClustersMetadataSearchSchemaReader is a Reader for the V1SpectroClustersMetadataSearchSchema structure. +type V1SpectroClustersMetadataSearchSchemaReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1SpectroClustersMetadataSearchSchemaReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1SpectroClustersMetadataSearchSchemaOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1SpectroClustersMetadataSearchSchemaOK creates a V1SpectroClustersMetadataSearchSchemaOK with default headers values +func NewV1SpectroClustersMetadataSearchSchemaOK() *V1SpectroClustersMetadataSearchSchemaOK { + return &V1SpectroClustersMetadataSearchSchemaOK{} +} + +/* +V1SpectroClustersMetadataSearchSchemaOK handles this case with default header values. + +An array of cluster meta schema items +*/ +type V1SpectroClustersMetadataSearchSchemaOK struct { + Payload *models.V1SearchFilterSchemaSpec +} + +func (o *V1SpectroClustersMetadataSearchSchemaOK) Error() string { + return fmt.Sprintf("[GET /v1/dashboard/spectroclusters/metadata/search/schema][%d] v1SpectroClustersMetadataSearchSchemaOK %+v", 200, o.Payload) +} + +func (o *V1SpectroClustersMetadataSearchSchemaOK) GetPayload() *models.V1SearchFilterSchemaSpec { + return o.Payload +} + +func (o *V1SpectroClustersMetadataSearchSchemaOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1SearchFilterSchemaSpec) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_open_stack_create_parameters.go b/api/client/v1/v1_spectro_clusters_open_stack_create_parameters.go new file mode 100644 index 00000000..ecbb76f9 --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_open_stack_create_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1SpectroClustersOpenStackCreateParams creates a new V1SpectroClustersOpenStackCreateParams object +// with the default values initialized. +func NewV1SpectroClustersOpenStackCreateParams() *V1SpectroClustersOpenStackCreateParams { + var () + return &V1SpectroClustersOpenStackCreateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1SpectroClustersOpenStackCreateParamsWithTimeout creates a new V1SpectroClustersOpenStackCreateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1SpectroClustersOpenStackCreateParamsWithTimeout(timeout time.Duration) *V1SpectroClustersOpenStackCreateParams { + var () + return &V1SpectroClustersOpenStackCreateParams{ + + timeout: timeout, + } +} + +// NewV1SpectroClustersOpenStackCreateParamsWithContext creates a new V1SpectroClustersOpenStackCreateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1SpectroClustersOpenStackCreateParamsWithContext(ctx context.Context) *V1SpectroClustersOpenStackCreateParams { + var () + return &V1SpectroClustersOpenStackCreateParams{ + + Context: ctx, + } +} + +// NewV1SpectroClustersOpenStackCreateParamsWithHTTPClient creates a new V1SpectroClustersOpenStackCreateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1SpectroClustersOpenStackCreateParamsWithHTTPClient(client *http.Client) *V1SpectroClustersOpenStackCreateParams { + var () + return &V1SpectroClustersOpenStackCreateParams{ + HTTPClient: client, + } +} + +/* +V1SpectroClustersOpenStackCreateParams contains all the parameters to send to the API endpoint +for the v1 spectro clusters open stack create operation typically these are written to a http.Request +*/ +type V1SpectroClustersOpenStackCreateParams struct { + + /*Body*/ + Body *models.V1SpectroOpenStackClusterEntity + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 spectro clusters open stack create params +func (o *V1SpectroClustersOpenStackCreateParams) WithTimeout(timeout time.Duration) *V1SpectroClustersOpenStackCreateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 spectro clusters open stack create params +func (o *V1SpectroClustersOpenStackCreateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 spectro clusters open stack create params +func (o *V1SpectroClustersOpenStackCreateParams) WithContext(ctx context.Context) *V1SpectroClustersOpenStackCreateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 spectro clusters open stack create params +func (o *V1SpectroClustersOpenStackCreateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 spectro clusters open stack create params +func (o *V1SpectroClustersOpenStackCreateParams) WithHTTPClient(client *http.Client) *V1SpectroClustersOpenStackCreateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 spectro clusters open stack create params +func (o *V1SpectroClustersOpenStackCreateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 spectro clusters open stack create params +func (o *V1SpectroClustersOpenStackCreateParams) WithBody(body *models.V1SpectroOpenStackClusterEntity) *V1SpectroClustersOpenStackCreateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 spectro clusters open stack create params +func (o *V1SpectroClustersOpenStackCreateParams) SetBody(body *models.V1SpectroOpenStackClusterEntity) { + o.Body = body +} + +// WriteToRequest writes these params to a swagger request +func (o *V1SpectroClustersOpenStackCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_open_stack_create_responses.go b/api/client/v1/v1_spectro_clusters_open_stack_create_responses.go new file mode 100644 index 00000000..d884f3a8 --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_open_stack_create_responses.go @@ -0,0 +1,77 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1SpectroClustersOpenStackCreateReader is a Reader for the V1SpectroClustersOpenStackCreate structure. +type V1SpectroClustersOpenStackCreateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1SpectroClustersOpenStackCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 201: + result := NewV1SpectroClustersOpenStackCreateCreated() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1SpectroClustersOpenStackCreateCreated creates a V1SpectroClustersOpenStackCreateCreated with default headers values +func NewV1SpectroClustersOpenStackCreateCreated() *V1SpectroClustersOpenStackCreateCreated { + return &V1SpectroClustersOpenStackCreateCreated{} +} + +/* +V1SpectroClustersOpenStackCreateCreated handles this case with default header values. + +Created successfully +*/ +type V1SpectroClustersOpenStackCreateCreated struct { + /*Audit uid for the request + */ + AuditUID string + + Payload *models.V1UID +} + +func (o *V1SpectroClustersOpenStackCreateCreated) Error() string { + return fmt.Sprintf("[POST /v1/spectroclusters/openstack][%d] v1SpectroClustersOpenStackCreateCreated %+v", 201, o.Payload) +} + +func (o *V1SpectroClustersOpenStackCreateCreated) GetPayload() *models.V1UID { + return o.Payload +} + +func (o *V1SpectroClustersOpenStackCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header AuditUid + o.AuditUID = response.GetHeader("AuditUid") + + o.Payload = new(models.V1UID) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_open_stack_import_parameters.go b/api/client/v1/v1_spectro_clusters_open_stack_import_parameters.go new file mode 100644 index 00000000..d55e46f5 --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_open_stack_import_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1SpectroClustersOpenStackImportParams creates a new V1SpectroClustersOpenStackImportParams object +// with the default values initialized. +func NewV1SpectroClustersOpenStackImportParams() *V1SpectroClustersOpenStackImportParams { + var () + return &V1SpectroClustersOpenStackImportParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1SpectroClustersOpenStackImportParamsWithTimeout creates a new V1SpectroClustersOpenStackImportParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1SpectroClustersOpenStackImportParamsWithTimeout(timeout time.Duration) *V1SpectroClustersOpenStackImportParams { + var () + return &V1SpectroClustersOpenStackImportParams{ + + timeout: timeout, + } +} + +// NewV1SpectroClustersOpenStackImportParamsWithContext creates a new V1SpectroClustersOpenStackImportParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1SpectroClustersOpenStackImportParamsWithContext(ctx context.Context) *V1SpectroClustersOpenStackImportParams { + var () + return &V1SpectroClustersOpenStackImportParams{ + + Context: ctx, + } +} + +// NewV1SpectroClustersOpenStackImportParamsWithHTTPClient creates a new V1SpectroClustersOpenStackImportParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1SpectroClustersOpenStackImportParamsWithHTTPClient(client *http.Client) *V1SpectroClustersOpenStackImportParams { + var () + return &V1SpectroClustersOpenStackImportParams{ + HTTPClient: client, + } +} + +/* +V1SpectroClustersOpenStackImportParams contains all the parameters to send to the API endpoint +for the v1 spectro clusters open stack import operation typically these are written to a http.Request +*/ +type V1SpectroClustersOpenStackImportParams struct { + + /*Body*/ + Body *models.V1SpectroOpenStackClusterImportEntity + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 spectro clusters open stack import params +func (o *V1SpectroClustersOpenStackImportParams) WithTimeout(timeout time.Duration) *V1SpectroClustersOpenStackImportParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 spectro clusters open stack import params +func (o *V1SpectroClustersOpenStackImportParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 spectro clusters open stack import params +func (o *V1SpectroClustersOpenStackImportParams) WithContext(ctx context.Context) *V1SpectroClustersOpenStackImportParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 spectro clusters open stack import params +func (o *V1SpectroClustersOpenStackImportParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 spectro clusters open stack import params +func (o *V1SpectroClustersOpenStackImportParams) WithHTTPClient(client *http.Client) *V1SpectroClustersOpenStackImportParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 spectro clusters open stack import params +func (o *V1SpectroClustersOpenStackImportParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 spectro clusters open stack import params +func (o *V1SpectroClustersOpenStackImportParams) WithBody(body *models.V1SpectroOpenStackClusterImportEntity) *V1SpectroClustersOpenStackImportParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 spectro clusters open stack import params +func (o *V1SpectroClustersOpenStackImportParams) SetBody(body *models.V1SpectroOpenStackClusterImportEntity) { + o.Body = body +} + +// WriteToRequest writes these params to a swagger request +func (o *V1SpectroClustersOpenStackImportParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_open_stack_import_responses.go b/api/client/v1/v1_spectro_clusters_open_stack_import_responses.go new file mode 100644 index 00000000..3e6459df --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_open_stack_import_responses.go @@ -0,0 +1,77 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1SpectroClustersOpenStackImportReader is a Reader for the V1SpectroClustersOpenStackImport structure. +type V1SpectroClustersOpenStackImportReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1SpectroClustersOpenStackImportReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 201: + result := NewV1SpectroClustersOpenStackImportCreated() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1SpectroClustersOpenStackImportCreated creates a V1SpectroClustersOpenStackImportCreated with default headers values +func NewV1SpectroClustersOpenStackImportCreated() *V1SpectroClustersOpenStackImportCreated { + return &V1SpectroClustersOpenStackImportCreated{} +} + +/* +V1SpectroClustersOpenStackImportCreated handles this case with default header values. + +Created successfully +*/ +type V1SpectroClustersOpenStackImportCreated struct { + /*Audit uid for the request + */ + AuditUID string + + Payload *models.V1UID +} + +func (o *V1SpectroClustersOpenStackImportCreated) Error() string { + return fmt.Sprintf("[POST /v1/spectroclusters/openstack/import][%d] v1SpectroClustersOpenStackImportCreated %+v", 201, o.Payload) +} + +func (o *V1SpectroClustersOpenStackImportCreated) GetPayload() *models.V1UID { + return o.Payload +} + +func (o *V1SpectroClustersOpenStackImportCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header AuditUid + o.AuditUID = response.GetHeader("AuditUid") + + o.Payload = new(models.V1UID) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_open_stack_rate_parameters.go b/api/client/v1/v1_spectro_clusters_open_stack_rate_parameters.go new file mode 100644 index 00000000..7a2c8a63 --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_open_stack_rate_parameters.go @@ -0,0 +1,177 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1SpectroClustersOpenStackRateParams creates a new V1SpectroClustersOpenStackRateParams object +// with the default values initialized. +func NewV1SpectroClustersOpenStackRateParams() *V1SpectroClustersOpenStackRateParams { + var ( + periodTypeDefault = string("hourly") + ) + return &V1SpectroClustersOpenStackRateParams{ + PeriodType: &periodTypeDefault, + + timeout: cr.DefaultTimeout, + } +} + +// NewV1SpectroClustersOpenStackRateParamsWithTimeout creates a new V1SpectroClustersOpenStackRateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1SpectroClustersOpenStackRateParamsWithTimeout(timeout time.Duration) *V1SpectroClustersOpenStackRateParams { + var ( + periodTypeDefault = string("hourly") + ) + return &V1SpectroClustersOpenStackRateParams{ + PeriodType: &periodTypeDefault, + + timeout: timeout, + } +} + +// NewV1SpectroClustersOpenStackRateParamsWithContext creates a new V1SpectroClustersOpenStackRateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1SpectroClustersOpenStackRateParamsWithContext(ctx context.Context) *V1SpectroClustersOpenStackRateParams { + var ( + periodTypeDefault = string("hourly") + ) + return &V1SpectroClustersOpenStackRateParams{ + PeriodType: &periodTypeDefault, + + Context: ctx, + } +} + +// NewV1SpectroClustersOpenStackRateParamsWithHTTPClient creates a new V1SpectroClustersOpenStackRateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1SpectroClustersOpenStackRateParamsWithHTTPClient(client *http.Client) *V1SpectroClustersOpenStackRateParams { + var ( + periodTypeDefault = string("hourly") + ) + return &V1SpectroClustersOpenStackRateParams{ + PeriodType: &periodTypeDefault, + HTTPClient: client, + } +} + +/* +V1SpectroClustersOpenStackRateParams contains all the parameters to send to the API endpoint +for the v1 spectro clusters open stack rate operation typically these are written to a http.Request +*/ +type V1SpectroClustersOpenStackRateParams struct { + + /*Body*/ + Body *models.V1SpectroOpenStackClusterRateEntity + /*PeriodType*/ + PeriodType *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 spectro clusters open stack rate params +func (o *V1SpectroClustersOpenStackRateParams) WithTimeout(timeout time.Duration) *V1SpectroClustersOpenStackRateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 spectro clusters open stack rate params +func (o *V1SpectroClustersOpenStackRateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 spectro clusters open stack rate params +func (o *V1SpectroClustersOpenStackRateParams) WithContext(ctx context.Context) *V1SpectroClustersOpenStackRateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 spectro clusters open stack rate params +func (o *V1SpectroClustersOpenStackRateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 spectro clusters open stack rate params +func (o *V1SpectroClustersOpenStackRateParams) WithHTTPClient(client *http.Client) *V1SpectroClustersOpenStackRateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 spectro clusters open stack rate params +func (o *V1SpectroClustersOpenStackRateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 spectro clusters open stack rate params +func (o *V1SpectroClustersOpenStackRateParams) WithBody(body *models.V1SpectroOpenStackClusterRateEntity) *V1SpectroClustersOpenStackRateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 spectro clusters open stack rate params +func (o *V1SpectroClustersOpenStackRateParams) SetBody(body *models.V1SpectroOpenStackClusterRateEntity) { + o.Body = body +} + +// WithPeriodType adds the periodType to the v1 spectro clusters open stack rate params +func (o *V1SpectroClustersOpenStackRateParams) WithPeriodType(periodType *string) *V1SpectroClustersOpenStackRateParams { + o.SetPeriodType(periodType) + return o +} + +// SetPeriodType adds the periodType to the v1 spectro clusters open stack rate params +func (o *V1SpectroClustersOpenStackRateParams) SetPeriodType(periodType *string) { + o.PeriodType = periodType +} + +// WriteToRequest writes these params to a swagger request +func (o *V1SpectroClustersOpenStackRateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + if o.PeriodType != nil { + + // query param periodType + var qrPeriodType string + if o.PeriodType != nil { + qrPeriodType = *o.PeriodType + } + qPeriodType := qrPeriodType + if qPeriodType != "" { + if err := r.SetQueryParam("periodType", qPeriodType); err != nil { + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_open_stack_rate_responses.go b/api/client/v1/v1_spectro_clusters_open_stack_rate_responses.go new file mode 100644 index 00000000..07a93aa4 --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_open_stack_rate_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1SpectroClustersOpenStackRateReader is a Reader for the V1SpectroClustersOpenStackRate structure. +type V1SpectroClustersOpenStackRateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1SpectroClustersOpenStackRateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1SpectroClustersOpenStackRateOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1SpectroClustersOpenStackRateOK creates a V1SpectroClustersOpenStackRateOK with default headers values +func NewV1SpectroClustersOpenStackRateOK() *V1SpectroClustersOpenStackRateOK { + return &V1SpectroClustersOpenStackRateOK{} +} + +/* +V1SpectroClustersOpenStackRateOK handles this case with default header values. + +Openstack Cluster estimated rate response +*/ +type V1SpectroClustersOpenStackRateOK struct { + Payload *models.V1SpectroClusterRate +} + +func (o *V1SpectroClustersOpenStackRateOK) Error() string { + return fmt.Sprintf("[POST /v1/spectroclusters/openstack/rate][%d] v1SpectroClustersOpenStackRateOK %+v", 200, o.Payload) +} + +func (o *V1SpectroClustersOpenStackRateOK) GetPayload() *models.V1SpectroClusterRate { + return o.Payload +} + +func (o *V1SpectroClustersOpenStackRateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1SpectroClusterRate) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_open_stack_validate_parameters.go b/api/client/v1/v1_spectro_clusters_open_stack_validate_parameters.go new file mode 100644 index 00000000..f46b3493 --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_open_stack_validate_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1SpectroClustersOpenStackValidateParams creates a new V1SpectroClustersOpenStackValidateParams object +// with the default values initialized. +func NewV1SpectroClustersOpenStackValidateParams() *V1SpectroClustersOpenStackValidateParams { + var () + return &V1SpectroClustersOpenStackValidateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1SpectroClustersOpenStackValidateParamsWithTimeout creates a new V1SpectroClustersOpenStackValidateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1SpectroClustersOpenStackValidateParamsWithTimeout(timeout time.Duration) *V1SpectroClustersOpenStackValidateParams { + var () + return &V1SpectroClustersOpenStackValidateParams{ + + timeout: timeout, + } +} + +// NewV1SpectroClustersOpenStackValidateParamsWithContext creates a new V1SpectroClustersOpenStackValidateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1SpectroClustersOpenStackValidateParamsWithContext(ctx context.Context) *V1SpectroClustersOpenStackValidateParams { + var () + return &V1SpectroClustersOpenStackValidateParams{ + + Context: ctx, + } +} + +// NewV1SpectroClustersOpenStackValidateParamsWithHTTPClient creates a new V1SpectroClustersOpenStackValidateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1SpectroClustersOpenStackValidateParamsWithHTTPClient(client *http.Client) *V1SpectroClustersOpenStackValidateParams { + var () + return &V1SpectroClustersOpenStackValidateParams{ + HTTPClient: client, + } +} + +/* +V1SpectroClustersOpenStackValidateParams contains all the parameters to send to the API endpoint +for the v1 spectro clusters open stack validate operation typically these are written to a http.Request +*/ +type V1SpectroClustersOpenStackValidateParams struct { + + /*Body*/ + Body *models.V1SpectroOpenStackClusterEntity + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 spectro clusters open stack validate params +func (o *V1SpectroClustersOpenStackValidateParams) WithTimeout(timeout time.Duration) *V1SpectroClustersOpenStackValidateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 spectro clusters open stack validate params +func (o *V1SpectroClustersOpenStackValidateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 spectro clusters open stack validate params +func (o *V1SpectroClustersOpenStackValidateParams) WithContext(ctx context.Context) *V1SpectroClustersOpenStackValidateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 spectro clusters open stack validate params +func (o *V1SpectroClustersOpenStackValidateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 spectro clusters open stack validate params +func (o *V1SpectroClustersOpenStackValidateParams) WithHTTPClient(client *http.Client) *V1SpectroClustersOpenStackValidateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 spectro clusters open stack validate params +func (o *V1SpectroClustersOpenStackValidateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 spectro clusters open stack validate params +func (o *V1SpectroClustersOpenStackValidateParams) WithBody(body *models.V1SpectroOpenStackClusterEntity) *V1SpectroClustersOpenStackValidateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 spectro clusters open stack validate params +func (o *V1SpectroClustersOpenStackValidateParams) SetBody(body *models.V1SpectroOpenStackClusterEntity) { + o.Body = body +} + +// WriteToRequest writes these params to a swagger request +func (o *V1SpectroClustersOpenStackValidateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_open_stack_validate_responses.go b/api/client/v1/v1_spectro_clusters_open_stack_validate_responses.go new file mode 100644 index 00000000..933bef75 --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_open_stack_validate_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1SpectroClustersOpenStackValidateReader is a Reader for the V1SpectroClustersOpenStackValidate structure. +type V1SpectroClustersOpenStackValidateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1SpectroClustersOpenStackValidateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1SpectroClustersOpenStackValidateOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1SpectroClustersOpenStackValidateOK creates a V1SpectroClustersOpenStackValidateOK with default headers values +func NewV1SpectroClustersOpenStackValidateOK() *V1SpectroClustersOpenStackValidateOK { + return &V1SpectroClustersOpenStackValidateOK{} +} + +/* +V1SpectroClustersOpenStackValidateOK handles this case with default header values. + +vSphere Cluster validation response +*/ +type V1SpectroClustersOpenStackValidateOK struct { + Payload *models.V1SpectroClusterValidatorResponse +} + +func (o *V1SpectroClustersOpenStackValidateOK) Error() string { + return fmt.Sprintf("[POST /v1/spectroclusters/openstack/validate][%d] v1SpectroClustersOpenStackValidateOK %+v", 200, o.Payload) +} + +func (o *V1SpectroClustersOpenStackValidateOK) GetPayload() *models.V1SpectroClusterValidatorResponse { + return o.Payload +} + +func (o *V1SpectroClustersOpenStackValidateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1SpectroClusterValidatorResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_packs_ref_update_parameters.go b/api/client/v1/v1_spectro_clusters_packs_ref_update_parameters.go new file mode 100644 index 00000000..2e3aa6fc --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_packs_ref_update_parameters.go @@ -0,0 +1,183 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1SpectroClustersPacksRefUpdateParams creates a new V1SpectroClustersPacksRefUpdateParams object +// with the default values initialized. +func NewV1SpectroClustersPacksRefUpdateParams() *V1SpectroClustersPacksRefUpdateParams { + var () + return &V1SpectroClustersPacksRefUpdateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1SpectroClustersPacksRefUpdateParamsWithTimeout creates a new V1SpectroClustersPacksRefUpdateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1SpectroClustersPacksRefUpdateParamsWithTimeout(timeout time.Duration) *V1SpectroClustersPacksRefUpdateParams { + var () + return &V1SpectroClustersPacksRefUpdateParams{ + + timeout: timeout, + } +} + +// NewV1SpectroClustersPacksRefUpdateParamsWithContext creates a new V1SpectroClustersPacksRefUpdateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1SpectroClustersPacksRefUpdateParamsWithContext(ctx context.Context) *V1SpectroClustersPacksRefUpdateParams { + var () + return &V1SpectroClustersPacksRefUpdateParams{ + + Context: ctx, + } +} + +// NewV1SpectroClustersPacksRefUpdateParamsWithHTTPClient creates a new V1SpectroClustersPacksRefUpdateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1SpectroClustersPacksRefUpdateParamsWithHTTPClient(client *http.Client) *V1SpectroClustersPacksRefUpdateParams { + var () + return &V1SpectroClustersPacksRefUpdateParams{ + HTTPClient: client, + } +} + +/* +V1SpectroClustersPacksRefUpdateParams contains all the parameters to send to the API endpoint +for the v1 spectro clusters packs ref update operation typically these are written to a http.Request +*/ +type V1SpectroClustersPacksRefUpdateParams struct { + + /*Body*/ + Body *models.V1ClusterNotificationUpdateEntity + /*Notify*/ + Notify *string + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 spectro clusters packs ref update params +func (o *V1SpectroClustersPacksRefUpdateParams) WithTimeout(timeout time.Duration) *V1SpectroClustersPacksRefUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 spectro clusters packs ref update params +func (o *V1SpectroClustersPacksRefUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 spectro clusters packs ref update params +func (o *V1SpectroClustersPacksRefUpdateParams) WithContext(ctx context.Context) *V1SpectroClustersPacksRefUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 spectro clusters packs ref update params +func (o *V1SpectroClustersPacksRefUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 spectro clusters packs ref update params +func (o *V1SpectroClustersPacksRefUpdateParams) WithHTTPClient(client *http.Client) *V1SpectroClustersPacksRefUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 spectro clusters packs ref update params +func (o *V1SpectroClustersPacksRefUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 spectro clusters packs ref update params +func (o *V1SpectroClustersPacksRefUpdateParams) WithBody(body *models.V1ClusterNotificationUpdateEntity) *V1SpectroClustersPacksRefUpdateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 spectro clusters packs ref update params +func (o *V1SpectroClustersPacksRefUpdateParams) SetBody(body *models.V1ClusterNotificationUpdateEntity) { + o.Body = body +} + +// WithNotify adds the notify to the v1 spectro clusters packs ref update params +func (o *V1SpectroClustersPacksRefUpdateParams) WithNotify(notify *string) *V1SpectroClustersPacksRefUpdateParams { + o.SetNotify(notify) + return o +} + +// SetNotify adds the notify to the v1 spectro clusters packs ref update params +func (o *V1SpectroClustersPacksRefUpdateParams) SetNotify(notify *string) { + o.Notify = notify +} + +// WithUID adds the uid to the v1 spectro clusters packs ref update params +func (o *V1SpectroClustersPacksRefUpdateParams) WithUID(uid string) *V1SpectroClustersPacksRefUpdateParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 spectro clusters packs ref update params +func (o *V1SpectroClustersPacksRefUpdateParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1SpectroClustersPacksRefUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + if o.Notify != nil { + + // query param notify + var qrNotify string + if o.Notify != nil { + qrNotify = *o.Notify + } + qNotify := qrNotify + if qNotify != "" { + if err := r.SetQueryParam("notify", qNotify); err != nil { + return err + } + } + + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_packs_ref_update_responses.go b/api/client/v1/v1_spectro_clusters_packs_ref_update_responses.go new file mode 100644 index 00000000..a1a4d1ff --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_packs_ref_update_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1SpectroClustersPacksRefUpdateReader is a Reader for the V1SpectroClustersPacksRefUpdate structure. +type V1SpectroClustersPacksRefUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1SpectroClustersPacksRefUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1SpectroClustersPacksRefUpdateNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1SpectroClustersPacksRefUpdateNoContent creates a V1SpectroClustersPacksRefUpdateNoContent with default headers values +func NewV1SpectroClustersPacksRefUpdateNoContent() *V1SpectroClustersPacksRefUpdateNoContent { + return &V1SpectroClustersPacksRefUpdateNoContent{} +} + +/* +V1SpectroClustersPacksRefUpdateNoContent handles this case with default header values. + +The resource was updated successfully +*/ +type V1SpectroClustersPacksRefUpdateNoContent struct { +} + +func (o *V1SpectroClustersPacksRefUpdateNoContent) Error() string { + return fmt.Sprintf("[PATCH /v1/spectroclusters/{uid}/packRefs][%d] v1SpectroClustersPacksRefUpdateNoContent ", 204) +} + +func (o *V1SpectroClustersPacksRefUpdateNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_patch_profile_parameters.go b/api/client/v1/v1_spectro_clusters_patch_profile_parameters.go new file mode 100644 index 00000000..e7a19671 --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_patch_profile_parameters.go @@ -0,0 +1,133 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1SpectroClustersPatchProfileParams creates a new V1SpectroClustersPatchProfileParams object +// with the default values initialized. +func NewV1SpectroClustersPatchProfileParams() *V1SpectroClustersPatchProfileParams { + var () + return &V1SpectroClustersPatchProfileParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1SpectroClustersPatchProfileParamsWithTimeout creates a new V1SpectroClustersPatchProfileParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1SpectroClustersPatchProfileParamsWithTimeout(timeout time.Duration) *V1SpectroClustersPatchProfileParams { + var () + return &V1SpectroClustersPatchProfileParams{ + + timeout: timeout, + } +} + +// NewV1SpectroClustersPatchProfileParamsWithContext creates a new V1SpectroClustersPatchProfileParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1SpectroClustersPatchProfileParamsWithContext(ctx context.Context) *V1SpectroClustersPatchProfileParams { + var () + return &V1SpectroClustersPatchProfileParams{ + + Context: ctx, + } +} + +// NewV1SpectroClustersPatchProfileParamsWithHTTPClient creates a new V1SpectroClustersPatchProfileParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1SpectroClustersPatchProfileParamsWithHTTPClient(client *http.Client) *V1SpectroClustersPatchProfileParams { + var () + return &V1SpectroClustersPatchProfileParams{ + HTTPClient: client, + } +} + +/* +V1SpectroClustersPatchProfileParams contains all the parameters to send to the API endpoint +for the v1 spectro clusters patch profile operation typically these are written to a http.Request +*/ +type V1SpectroClustersPatchProfileParams struct { + + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 spectro clusters patch profile params +func (o *V1SpectroClustersPatchProfileParams) WithTimeout(timeout time.Duration) *V1SpectroClustersPatchProfileParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 spectro clusters patch profile params +func (o *V1SpectroClustersPatchProfileParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 spectro clusters patch profile params +func (o *V1SpectroClustersPatchProfileParams) WithContext(ctx context.Context) *V1SpectroClustersPatchProfileParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 spectro clusters patch profile params +func (o *V1SpectroClustersPatchProfileParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 spectro clusters patch profile params +func (o *V1SpectroClustersPatchProfileParams) WithHTTPClient(client *http.Client) *V1SpectroClustersPatchProfileParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 spectro clusters patch profile params +func (o *V1SpectroClustersPatchProfileParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithUID adds the uid to the v1 spectro clusters patch profile params +func (o *V1SpectroClustersPatchProfileParams) WithUID(uid string) *V1SpectroClustersPatchProfileParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 spectro clusters patch profile params +func (o *V1SpectroClustersPatchProfileParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1SpectroClustersPatchProfileParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_patch_profile_responses.go b/api/client/v1/v1_spectro_clusters_patch_profile_responses.go new file mode 100644 index 00000000..d4c6a19f --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_patch_profile_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1SpectroClustersPatchProfileReader is a Reader for the V1SpectroClustersPatchProfile structure. +type V1SpectroClustersPatchProfileReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1SpectroClustersPatchProfileReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1SpectroClustersPatchProfileNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1SpectroClustersPatchProfileNoContent creates a V1SpectroClustersPatchProfileNoContent with default headers values +func NewV1SpectroClustersPatchProfileNoContent() *V1SpectroClustersPatchProfileNoContent { + return &V1SpectroClustersPatchProfileNoContent{} +} + +/* +V1SpectroClustersPatchProfileNoContent handles this case with default header values. + +The resource was updated successfully +*/ +type V1SpectroClustersPatchProfileNoContent struct { +} + +func (o *V1SpectroClustersPatchProfileNoContent) Error() string { + return fmt.Sprintf("[PATCH /v1/spectroclusters/{uid}/profile][%d] v1SpectroClustersPatchProfileNoContent ", 204) +} + +func (o *V1SpectroClustersPatchProfileNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_patch_profiles_parameters.go b/api/client/v1/v1_spectro_clusters_patch_profiles_parameters.go new file mode 100644 index 00000000..02e416ef --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_patch_profiles_parameters.go @@ -0,0 +1,202 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1SpectroClustersPatchProfilesParams creates a new V1SpectroClustersPatchProfilesParams object +// with the default values initialized. +func NewV1SpectroClustersPatchProfilesParams() *V1SpectroClustersPatchProfilesParams { + var ( + resolveNotificationDefault = bool(false) + ) + return &V1SpectroClustersPatchProfilesParams{ + ResolveNotification: &resolveNotificationDefault, + + timeout: cr.DefaultTimeout, + } +} + +// NewV1SpectroClustersPatchProfilesParamsWithTimeout creates a new V1SpectroClustersPatchProfilesParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1SpectroClustersPatchProfilesParamsWithTimeout(timeout time.Duration) *V1SpectroClustersPatchProfilesParams { + var ( + resolveNotificationDefault = bool(false) + ) + return &V1SpectroClustersPatchProfilesParams{ + ResolveNotification: &resolveNotificationDefault, + + timeout: timeout, + } +} + +// NewV1SpectroClustersPatchProfilesParamsWithContext creates a new V1SpectroClustersPatchProfilesParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1SpectroClustersPatchProfilesParamsWithContext(ctx context.Context) *V1SpectroClustersPatchProfilesParams { + var ( + resolveNotificationDefault = bool(false) + ) + return &V1SpectroClustersPatchProfilesParams{ + ResolveNotification: &resolveNotificationDefault, + + Context: ctx, + } +} + +// NewV1SpectroClustersPatchProfilesParamsWithHTTPClient creates a new V1SpectroClustersPatchProfilesParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1SpectroClustersPatchProfilesParamsWithHTTPClient(client *http.Client) *V1SpectroClustersPatchProfilesParams { + var ( + resolveNotificationDefault = bool(false) + ) + return &V1SpectroClustersPatchProfilesParams{ + ResolveNotification: &resolveNotificationDefault, + HTTPClient: client, + } +} + +/* +V1SpectroClustersPatchProfilesParams contains all the parameters to send to the API endpoint +for the v1 spectro clusters patch profiles operation typically these are written to a http.Request +*/ +type V1SpectroClustersPatchProfilesParams struct { + + /*Body*/ + Body *models.V1SpectroClusterProfiles + /*ResolveNotification + Resolve pending cluster notification if set to true + + */ + ResolveNotification *bool + /*UID + Cluster uid + + */ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 spectro clusters patch profiles params +func (o *V1SpectroClustersPatchProfilesParams) WithTimeout(timeout time.Duration) *V1SpectroClustersPatchProfilesParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 spectro clusters patch profiles params +func (o *V1SpectroClustersPatchProfilesParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 spectro clusters patch profiles params +func (o *V1SpectroClustersPatchProfilesParams) WithContext(ctx context.Context) *V1SpectroClustersPatchProfilesParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 spectro clusters patch profiles params +func (o *V1SpectroClustersPatchProfilesParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 spectro clusters patch profiles params +func (o *V1SpectroClustersPatchProfilesParams) WithHTTPClient(client *http.Client) *V1SpectroClustersPatchProfilesParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 spectro clusters patch profiles params +func (o *V1SpectroClustersPatchProfilesParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 spectro clusters patch profiles params +func (o *V1SpectroClustersPatchProfilesParams) WithBody(body *models.V1SpectroClusterProfiles) *V1SpectroClustersPatchProfilesParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 spectro clusters patch profiles params +func (o *V1SpectroClustersPatchProfilesParams) SetBody(body *models.V1SpectroClusterProfiles) { + o.Body = body +} + +// WithResolveNotification adds the resolveNotification to the v1 spectro clusters patch profiles params +func (o *V1SpectroClustersPatchProfilesParams) WithResolveNotification(resolveNotification *bool) *V1SpectroClustersPatchProfilesParams { + o.SetResolveNotification(resolveNotification) + return o +} + +// SetResolveNotification adds the resolveNotification to the v1 spectro clusters patch profiles params +func (o *V1SpectroClustersPatchProfilesParams) SetResolveNotification(resolveNotification *bool) { + o.ResolveNotification = resolveNotification +} + +// WithUID adds the uid to the v1 spectro clusters patch profiles params +func (o *V1SpectroClustersPatchProfilesParams) WithUID(uid string) *V1SpectroClustersPatchProfilesParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 spectro clusters patch profiles params +func (o *V1SpectroClustersPatchProfilesParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1SpectroClustersPatchProfilesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + if o.ResolveNotification != nil { + + // query param resolveNotification + var qrResolveNotification bool + if o.ResolveNotification != nil { + qrResolveNotification = *o.ResolveNotification + } + qResolveNotification := swag.FormatBool(qrResolveNotification) + if qResolveNotification != "" { + if err := r.SetQueryParam("resolveNotification", qResolveNotification); err != nil { + return err + } + } + + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_patch_profiles_responses.go b/api/client/v1/v1_spectro_clusters_patch_profiles_responses.go new file mode 100644 index 00000000..8662310c --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_patch_profiles_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1SpectroClustersPatchProfilesReader is a Reader for the V1SpectroClustersPatchProfiles structure. +type V1SpectroClustersPatchProfilesReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1SpectroClustersPatchProfilesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1SpectroClustersPatchProfilesNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1SpectroClustersPatchProfilesNoContent creates a V1SpectroClustersPatchProfilesNoContent with default headers values +func NewV1SpectroClustersPatchProfilesNoContent() *V1SpectroClustersPatchProfilesNoContent { + return &V1SpectroClustersPatchProfilesNoContent{} +} + +/* +V1SpectroClustersPatchProfilesNoContent handles this case with default header values. + +The resource was updated successfully +*/ +type V1SpectroClustersPatchProfilesNoContent struct { +} + +func (o *V1SpectroClustersPatchProfilesNoContent) Error() string { + return fmt.Sprintf("[PATCH /v1/spectroclusters/{uid}/profiles][%d] v1SpectroClustersPatchProfilesNoContent ", 204) +} + +func (o *V1SpectroClustersPatchProfilesNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_profiles_uid_pack_manifests_get_parameters.go b/api/client/v1/v1_spectro_clusters_profiles_uid_pack_manifests_get_parameters.go new file mode 100644 index 00000000..7c888a38 --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_profiles_uid_pack_manifests_get_parameters.go @@ -0,0 +1,178 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1SpectroClustersProfilesUIDPackManifestsGetParams creates a new V1SpectroClustersProfilesUIDPackManifestsGetParams object +// with the default values initialized. +func NewV1SpectroClustersProfilesUIDPackManifestsGetParams() *V1SpectroClustersProfilesUIDPackManifestsGetParams { + var () + return &V1SpectroClustersProfilesUIDPackManifestsGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1SpectroClustersProfilesUIDPackManifestsGetParamsWithTimeout creates a new V1SpectroClustersProfilesUIDPackManifestsGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1SpectroClustersProfilesUIDPackManifestsGetParamsWithTimeout(timeout time.Duration) *V1SpectroClustersProfilesUIDPackManifestsGetParams { + var () + return &V1SpectroClustersProfilesUIDPackManifestsGetParams{ + + timeout: timeout, + } +} + +// NewV1SpectroClustersProfilesUIDPackManifestsGetParamsWithContext creates a new V1SpectroClustersProfilesUIDPackManifestsGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1SpectroClustersProfilesUIDPackManifestsGetParamsWithContext(ctx context.Context) *V1SpectroClustersProfilesUIDPackManifestsGetParams { + var () + return &V1SpectroClustersProfilesUIDPackManifestsGetParams{ + + Context: ctx, + } +} + +// NewV1SpectroClustersProfilesUIDPackManifestsGetParamsWithHTTPClient creates a new V1SpectroClustersProfilesUIDPackManifestsGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1SpectroClustersProfilesUIDPackManifestsGetParamsWithHTTPClient(client *http.Client) *V1SpectroClustersProfilesUIDPackManifestsGetParams { + var () + return &V1SpectroClustersProfilesUIDPackManifestsGetParams{ + HTTPClient: client, + } +} + +/* +V1SpectroClustersProfilesUIDPackManifestsGetParams contains all the parameters to send to the API endpoint +for the v1 spectro clusters profiles Uid pack manifests get operation typically these are written to a http.Request +*/ +type V1SpectroClustersProfilesUIDPackManifestsGetParams struct { + + /*PackName + Name of the pack + + */ + PackName string + /*ProfileUID + Cluster profile uid + + */ + ProfileUID string + /*UID + Cluster uid + + */ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 spectro clusters profiles Uid pack manifests get params +func (o *V1SpectroClustersProfilesUIDPackManifestsGetParams) WithTimeout(timeout time.Duration) *V1SpectroClustersProfilesUIDPackManifestsGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 spectro clusters profiles Uid pack manifests get params +func (o *V1SpectroClustersProfilesUIDPackManifestsGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 spectro clusters profiles Uid pack manifests get params +func (o *V1SpectroClustersProfilesUIDPackManifestsGetParams) WithContext(ctx context.Context) *V1SpectroClustersProfilesUIDPackManifestsGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 spectro clusters profiles Uid pack manifests get params +func (o *V1SpectroClustersProfilesUIDPackManifestsGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 spectro clusters profiles Uid pack manifests get params +func (o *V1SpectroClustersProfilesUIDPackManifestsGetParams) WithHTTPClient(client *http.Client) *V1SpectroClustersProfilesUIDPackManifestsGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 spectro clusters profiles Uid pack manifests get params +func (o *V1SpectroClustersProfilesUIDPackManifestsGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithPackName adds the packName to the v1 spectro clusters profiles Uid pack manifests get params +func (o *V1SpectroClustersProfilesUIDPackManifestsGetParams) WithPackName(packName string) *V1SpectroClustersProfilesUIDPackManifestsGetParams { + o.SetPackName(packName) + return o +} + +// SetPackName adds the packName to the v1 spectro clusters profiles Uid pack manifests get params +func (o *V1SpectroClustersProfilesUIDPackManifestsGetParams) SetPackName(packName string) { + o.PackName = packName +} + +// WithProfileUID adds the profileUID to the v1 spectro clusters profiles Uid pack manifests get params +func (o *V1SpectroClustersProfilesUIDPackManifestsGetParams) WithProfileUID(profileUID string) *V1SpectroClustersProfilesUIDPackManifestsGetParams { + o.SetProfileUID(profileUID) + return o +} + +// SetProfileUID adds the profileUid to the v1 spectro clusters profiles Uid pack manifests get params +func (o *V1SpectroClustersProfilesUIDPackManifestsGetParams) SetProfileUID(profileUID string) { + o.ProfileUID = profileUID +} + +// WithUID adds the uid to the v1 spectro clusters profiles Uid pack manifests get params +func (o *V1SpectroClustersProfilesUIDPackManifestsGetParams) WithUID(uid string) *V1SpectroClustersProfilesUIDPackManifestsGetParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 spectro clusters profiles Uid pack manifests get params +func (o *V1SpectroClustersProfilesUIDPackManifestsGetParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1SpectroClustersProfilesUIDPackManifestsGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param packName + if err := r.SetPathParam("packName", o.PackName); err != nil { + return err + } + + // path param profileUid + if err := r.SetPathParam("profileUid", o.ProfileUID); err != nil { + return err + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_profiles_uid_pack_manifests_get_responses.go b/api/client/v1/v1_spectro_clusters_profiles_uid_pack_manifests_get_responses.go new file mode 100644 index 00000000..783ce6fa --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_profiles_uid_pack_manifests_get_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1SpectroClustersProfilesUIDPackManifestsGetReader is a Reader for the V1SpectroClustersProfilesUIDPackManifestsGet structure. +type V1SpectroClustersProfilesUIDPackManifestsGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1SpectroClustersProfilesUIDPackManifestsGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1SpectroClustersProfilesUIDPackManifestsGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1SpectroClustersProfilesUIDPackManifestsGetOK creates a V1SpectroClustersProfilesUIDPackManifestsGetOK with default headers values +func NewV1SpectroClustersProfilesUIDPackManifestsGetOK() *V1SpectroClustersProfilesUIDPackManifestsGetOK { + return &V1SpectroClustersProfilesUIDPackManifestsGetOK{} +} + +/* +V1SpectroClustersProfilesUIDPackManifestsGetOK handles this case with default header values. + +OK +*/ +type V1SpectroClustersProfilesUIDPackManifestsGetOK struct { + Payload *models.V1PackManifests +} + +func (o *V1SpectroClustersProfilesUIDPackManifestsGetOK) Error() string { + return fmt.Sprintf("[GET /v1/spectroclusters/{uid}/profiles/{profileUid}/packs/{packName}/manifests][%d] v1SpectroClustersProfilesUidPackManifestsGetOK %+v", 200, o.Payload) +} + +func (o *V1SpectroClustersProfilesUIDPackManifestsGetOK) GetPayload() *models.V1PackManifests { + return o.Payload +} + +func (o *V1SpectroClustersProfilesUIDPackManifestsGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1PackManifests) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_profiles_uid_pack_manifests_update_parameters.go b/api/client/v1/v1_spectro_clusters_profiles_uid_pack_manifests_update_parameters.go new file mode 100644 index 00000000..730536e7 --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_profiles_uid_pack_manifests_update_parameters.go @@ -0,0 +1,199 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1SpectroClustersProfilesUIDPackManifestsUpdateParams creates a new V1SpectroClustersProfilesUIDPackManifestsUpdateParams object +// with the default values initialized. +func NewV1SpectroClustersProfilesUIDPackManifestsUpdateParams() *V1SpectroClustersProfilesUIDPackManifestsUpdateParams { + var () + return &V1SpectroClustersProfilesUIDPackManifestsUpdateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1SpectroClustersProfilesUIDPackManifestsUpdateParamsWithTimeout creates a new V1SpectroClustersProfilesUIDPackManifestsUpdateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1SpectroClustersProfilesUIDPackManifestsUpdateParamsWithTimeout(timeout time.Duration) *V1SpectroClustersProfilesUIDPackManifestsUpdateParams { + var () + return &V1SpectroClustersProfilesUIDPackManifestsUpdateParams{ + + timeout: timeout, + } +} + +// NewV1SpectroClustersProfilesUIDPackManifestsUpdateParamsWithContext creates a new V1SpectroClustersProfilesUIDPackManifestsUpdateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1SpectroClustersProfilesUIDPackManifestsUpdateParamsWithContext(ctx context.Context) *V1SpectroClustersProfilesUIDPackManifestsUpdateParams { + var () + return &V1SpectroClustersProfilesUIDPackManifestsUpdateParams{ + + Context: ctx, + } +} + +// NewV1SpectroClustersProfilesUIDPackManifestsUpdateParamsWithHTTPClient creates a new V1SpectroClustersProfilesUIDPackManifestsUpdateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1SpectroClustersProfilesUIDPackManifestsUpdateParamsWithHTTPClient(client *http.Client) *V1SpectroClustersProfilesUIDPackManifestsUpdateParams { + var () + return &V1SpectroClustersProfilesUIDPackManifestsUpdateParams{ + HTTPClient: client, + } +} + +/* +V1SpectroClustersProfilesUIDPackManifestsUpdateParams contains all the parameters to send to the API endpoint +for the v1 spectro clusters profiles Uid pack manifests update operation typically these are written to a http.Request +*/ +type V1SpectroClustersProfilesUIDPackManifestsUpdateParams struct { + + /*Body*/ + Body *models.V1ManifestRefInputEntities + /*PackName + Name of the pack + + */ + PackName string + /*ProfileUID + Cluster profile uid + + */ + ProfileUID string + /*UID + Cluster uid + + */ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 spectro clusters profiles Uid pack manifests update params +func (o *V1SpectroClustersProfilesUIDPackManifestsUpdateParams) WithTimeout(timeout time.Duration) *V1SpectroClustersProfilesUIDPackManifestsUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 spectro clusters profiles Uid pack manifests update params +func (o *V1SpectroClustersProfilesUIDPackManifestsUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 spectro clusters profiles Uid pack manifests update params +func (o *V1SpectroClustersProfilesUIDPackManifestsUpdateParams) WithContext(ctx context.Context) *V1SpectroClustersProfilesUIDPackManifestsUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 spectro clusters profiles Uid pack manifests update params +func (o *V1SpectroClustersProfilesUIDPackManifestsUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 spectro clusters profiles Uid pack manifests update params +func (o *V1SpectroClustersProfilesUIDPackManifestsUpdateParams) WithHTTPClient(client *http.Client) *V1SpectroClustersProfilesUIDPackManifestsUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 spectro clusters profiles Uid pack manifests update params +func (o *V1SpectroClustersProfilesUIDPackManifestsUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 spectro clusters profiles Uid pack manifests update params +func (o *V1SpectroClustersProfilesUIDPackManifestsUpdateParams) WithBody(body *models.V1ManifestRefInputEntities) *V1SpectroClustersProfilesUIDPackManifestsUpdateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 spectro clusters profiles Uid pack manifests update params +func (o *V1SpectroClustersProfilesUIDPackManifestsUpdateParams) SetBody(body *models.V1ManifestRefInputEntities) { + o.Body = body +} + +// WithPackName adds the packName to the v1 spectro clusters profiles Uid pack manifests update params +func (o *V1SpectroClustersProfilesUIDPackManifestsUpdateParams) WithPackName(packName string) *V1SpectroClustersProfilesUIDPackManifestsUpdateParams { + o.SetPackName(packName) + return o +} + +// SetPackName adds the packName to the v1 spectro clusters profiles Uid pack manifests update params +func (o *V1SpectroClustersProfilesUIDPackManifestsUpdateParams) SetPackName(packName string) { + o.PackName = packName +} + +// WithProfileUID adds the profileUID to the v1 spectro clusters profiles Uid pack manifests update params +func (o *V1SpectroClustersProfilesUIDPackManifestsUpdateParams) WithProfileUID(profileUID string) *V1SpectroClustersProfilesUIDPackManifestsUpdateParams { + o.SetProfileUID(profileUID) + return o +} + +// SetProfileUID adds the profileUid to the v1 spectro clusters profiles Uid pack manifests update params +func (o *V1SpectroClustersProfilesUIDPackManifestsUpdateParams) SetProfileUID(profileUID string) { + o.ProfileUID = profileUID +} + +// WithUID adds the uid to the v1 spectro clusters profiles Uid pack manifests update params +func (o *V1SpectroClustersProfilesUIDPackManifestsUpdateParams) WithUID(uid string) *V1SpectroClustersProfilesUIDPackManifestsUpdateParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 spectro clusters profiles Uid pack manifests update params +func (o *V1SpectroClustersProfilesUIDPackManifestsUpdateParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1SpectroClustersProfilesUIDPackManifestsUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param packName + if err := r.SetPathParam("packName", o.PackName); err != nil { + return err + } + + // path param profileUid + if err := r.SetPathParam("profileUid", o.ProfileUID); err != nil { + return err + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_profiles_uid_pack_manifests_update_responses.go b/api/client/v1/v1_spectro_clusters_profiles_uid_pack_manifests_update_responses.go new file mode 100644 index 00000000..cc2432e9 --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_profiles_uid_pack_manifests_update_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1SpectroClustersProfilesUIDPackManifestsUpdateReader is a Reader for the V1SpectroClustersProfilesUIDPackManifestsUpdate structure. +type V1SpectroClustersProfilesUIDPackManifestsUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1SpectroClustersProfilesUIDPackManifestsUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1SpectroClustersProfilesUIDPackManifestsUpdateNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1SpectroClustersProfilesUIDPackManifestsUpdateNoContent creates a V1SpectroClustersProfilesUIDPackManifestsUpdateNoContent with default headers values +func NewV1SpectroClustersProfilesUIDPackManifestsUpdateNoContent() *V1SpectroClustersProfilesUIDPackManifestsUpdateNoContent { + return &V1SpectroClustersProfilesUIDPackManifestsUpdateNoContent{} +} + +/* +V1SpectroClustersProfilesUIDPackManifestsUpdateNoContent handles this case with default header values. + +The resource was updated successfully +*/ +type V1SpectroClustersProfilesUIDPackManifestsUpdateNoContent struct { +} + +func (o *V1SpectroClustersProfilesUIDPackManifestsUpdateNoContent) Error() string { + return fmt.Sprintf("[PUT /v1/spectroclusters/{uid}/profiles/{profileUid}/packs/{packName}/manifests][%d] v1SpectroClustersProfilesUidPackManifestsUpdateNoContent ", 204) +} + +func (o *V1SpectroClustersProfilesUIDPackManifestsUpdateNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_resources_consumption_parameters.go b/api/client/v1/v1_spectro_clusters_resources_consumption_parameters.go new file mode 100644 index 00000000..7bc27f5f --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_resources_consumption_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1SpectroClustersResourcesConsumptionParams creates a new V1SpectroClustersResourcesConsumptionParams object +// with the default values initialized. +func NewV1SpectroClustersResourcesConsumptionParams() *V1SpectroClustersResourcesConsumptionParams { + var () + return &V1SpectroClustersResourcesConsumptionParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1SpectroClustersResourcesConsumptionParamsWithTimeout creates a new V1SpectroClustersResourcesConsumptionParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1SpectroClustersResourcesConsumptionParamsWithTimeout(timeout time.Duration) *V1SpectroClustersResourcesConsumptionParams { + var () + return &V1SpectroClustersResourcesConsumptionParams{ + + timeout: timeout, + } +} + +// NewV1SpectroClustersResourcesConsumptionParamsWithContext creates a new V1SpectroClustersResourcesConsumptionParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1SpectroClustersResourcesConsumptionParamsWithContext(ctx context.Context) *V1SpectroClustersResourcesConsumptionParams { + var () + return &V1SpectroClustersResourcesConsumptionParams{ + + Context: ctx, + } +} + +// NewV1SpectroClustersResourcesConsumptionParamsWithHTTPClient creates a new V1SpectroClustersResourcesConsumptionParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1SpectroClustersResourcesConsumptionParamsWithHTTPClient(client *http.Client) *V1SpectroClustersResourcesConsumptionParams { + var () + return &V1SpectroClustersResourcesConsumptionParams{ + HTTPClient: client, + } +} + +/* +V1SpectroClustersResourcesConsumptionParams contains all the parameters to send to the API endpoint +for the v1 spectro clusters resources consumption operation typically these are written to a http.Request +*/ +type V1SpectroClustersResourcesConsumptionParams struct { + + /*Body*/ + Body *models.V1ResourceConsumptionSpec + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 spectro clusters resources consumption params +func (o *V1SpectroClustersResourcesConsumptionParams) WithTimeout(timeout time.Duration) *V1SpectroClustersResourcesConsumptionParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 spectro clusters resources consumption params +func (o *V1SpectroClustersResourcesConsumptionParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 spectro clusters resources consumption params +func (o *V1SpectroClustersResourcesConsumptionParams) WithContext(ctx context.Context) *V1SpectroClustersResourcesConsumptionParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 spectro clusters resources consumption params +func (o *V1SpectroClustersResourcesConsumptionParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 spectro clusters resources consumption params +func (o *V1SpectroClustersResourcesConsumptionParams) WithHTTPClient(client *http.Client) *V1SpectroClustersResourcesConsumptionParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 spectro clusters resources consumption params +func (o *V1SpectroClustersResourcesConsumptionParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 spectro clusters resources consumption params +func (o *V1SpectroClustersResourcesConsumptionParams) WithBody(body *models.V1ResourceConsumptionSpec) *V1SpectroClustersResourcesConsumptionParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 spectro clusters resources consumption params +func (o *V1SpectroClustersResourcesConsumptionParams) SetBody(body *models.V1ResourceConsumptionSpec) { + o.Body = body +} + +// WriteToRequest writes these params to a swagger request +func (o *V1SpectroClustersResourcesConsumptionParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_resources_consumption_responses.go b/api/client/v1/v1_spectro_clusters_resources_consumption_responses.go new file mode 100644 index 00000000..a3238705 --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_resources_consumption_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1SpectroClustersResourcesConsumptionReader is a Reader for the V1SpectroClustersResourcesConsumption structure. +type V1SpectroClustersResourcesConsumptionReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1SpectroClustersResourcesConsumptionReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1SpectroClustersResourcesConsumptionOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1SpectroClustersResourcesConsumptionOK creates a V1SpectroClustersResourcesConsumptionOK with default headers values +func NewV1SpectroClustersResourcesConsumptionOK() *V1SpectroClustersResourcesConsumptionOK { + return &V1SpectroClustersResourcesConsumptionOK{} +} + +/* +V1SpectroClustersResourcesConsumptionOK handles this case with default header values. + +An array of resource consumption data items +*/ +type V1SpectroClustersResourcesConsumptionOK struct { + Payload *models.V1ResourcesConsumption +} + +func (o *V1SpectroClustersResourcesConsumptionOK) Error() string { + return fmt.Sprintf("[POST /v1/dashboard/spectroclusters/resources/consumption][%d] v1SpectroClustersResourcesConsumptionOK %+v", 200, o.Payload) +} + +func (o *V1SpectroClustersResourcesConsumptionOK) GetPayload() *models.V1ResourcesConsumption { + return o.Payload +} + +func (o *V1SpectroClustersResourcesConsumptionOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1ResourcesConsumption) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_resources_cost_summary_parameters.go b/api/client/v1/v1_spectro_clusters_resources_cost_summary_parameters.go new file mode 100644 index 00000000..330a0a84 --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_resources_cost_summary_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1SpectroClustersResourcesCostSummaryParams creates a new V1SpectroClustersResourcesCostSummaryParams object +// with the default values initialized. +func NewV1SpectroClustersResourcesCostSummaryParams() *V1SpectroClustersResourcesCostSummaryParams { + var () + return &V1SpectroClustersResourcesCostSummaryParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1SpectroClustersResourcesCostSummaryParamsWithTimeout creates a new V1SpectroClustersResourcesCostSummaryParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1SpectroClustersResourcesCostSummaryParamsWithTimeout(timeout time.Duration) *V1SpectroClustersResourcesCostSummaryParams { + var () + return &V1SpectroClustersResourcesCostSummaryParams{ + + timeout: timeout, + } +} + +// NewV1SpectroClustersResourcesCostSummaryParamsWithContext creates a new V1SpectroClustersResourcesCostSummaryParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1SpectroClustersResourcesCostSummaryParamsWithContext(ctx context.Context) *V1SpectroClustersResourcesCostSummaryParams { + var () + return &V1SpectroClustersResourcesCostSummaryParams{ + + Context: ctx, + } +} + +// NewV1SpectroClustersResourcesCostSummaryParamsWithHTTPClient creates a new V1SpectroClustersResourcesCostSummaryParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1SpectroClustersResourcesCostSummaryParamsWithHTTPClient(client *http.Client) *V1SpectroClustersResourcesCostSummaryParams { + var () + return &V1SpectroClustersResourcesCostSummaryParams{ + HTTPClient: client, + } +} + +/* +V1SpectroClustersResourcesCostSummaryParams contains all the parameters to send to the API endpoint +for the v1 spectro clusters resources cost summary operation typically these are written to a http.Request +*/ +type V1SpectroClustersResourcesCostSummaryParams struct { + + /*Body*/ + Body *models.V1ResourceCostSummarySpec + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 spectro clusters resources cost summary params +func (o *V1SpectroClustersResourcesCostSummaryParams) WithTimeout(timeout time.Duration) *V1SpectroClustersResourcesCostSummaryParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 spectro clusters resources cost summary params +func (o *V1SpectroClustersResourcesCostSummaryParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 spectro clusters resources cost summary params +func (o *V1SpectroClustersResourcesCostSummaryParams) WithContext(ctx context.Context) *V1SpectroClustersResourcesCostSummaryParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 spectro clusters resources cost summary params +func (o *V1SpectroClustersResourcesCostSummaryParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 spectro clusters resources cost summary params +func (o *V1SpectroClustersResourcesCostSummaryParams) WithHTTPClient(client *http.Client) *V1SpectroClustersResourcesCostSummaryParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 spectro clusters resources cost summary params +func (o *V1SpectroClustersResourcesCostSummaryParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 spectro clusters resources cost summary params +func (o *V1SpectroClustersResourcesCostSummaryParams) WithBody(body *models.V1ResourceCostSummarySpec) *V1SpectroClustersResourcesCostSummaryParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 spectro clusters resources cost summary params +func (o *V1SpectroClustersResourcesCostSummaryParams) SetBody(body *models.V1ResourceCostSummarySpec) { + o.Body = body +} + +// WriteToRequest writes these params to a swagger request +func (o *V1SpectroClustersResourcesCostSummaryParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_resources_cost_summary_responses.go b/api/client/v1/v1_spectro_clusters_resources_cost_summary_responses.go new file mode 100644 index 00000000..c5a8400d --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_resources_cost_summary_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1SpectroClustersResourcesCostSummaryReader is a Reader for the V1SpectroClustersResourcesCostSummary structure. +type V1SpectroClustersResourcesCostSummaryReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1SpectroClustersResourcesCostSummaryReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1SpectroClustersResourcesCostSummaryOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1SpectroClustersResourcesCostSummaryOK creates a V1SpectroClustersResourcesCostSummaryOK with default headers values +func NewV1SpectroClustersResourcesCostSummaryOK() *V1SpectroClustersResourcesCostSummaryOK { + return &V1SpectroClustersResourcesCostSummaryOK{} +} + +/* +V1SpectroClustersResourcesCostSummaryOK handles this case with default header values. + +An array of resources cost summary items +*/ +type V1SpectroClustersResourcesCostSummaryOK struct { + Payload *models.V1ResourcesCostSummary +} + +func (o *V1SpectroClustersResourcesCostSummaryOK) Error() string { + return fmt.Sprintf("[POST /v1/dashboard/spectroclusters/resources/cost][%d] v1SpectroClustersResourcesCostSummaryOK %+v", 200, o.Payload) +} + +func (o *V1SpectroClustersResourcesCostSummaryOK) GetPayload() *models.V1ResourcesCostSummary { + return o.Payload +} + +func (o *V1SpectroClustersResourcesCostSummaryOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1ResourcesCostSummary) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_resources_usage_summary_parameters.go b/api/client/v1/v1_spectro_clusters_resources_usage_summary_parameters.go new file mode 100644 index 00000000..b3faeb05 --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_resources_usage_summary_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1SpectroClustersResourcesUsageSummaryParams creates a new V1SpectroClustersResourcesUsageSummaryParams object +// with the default values initialized. +func NewV1SpectroClustersResourcesUsageSummaryParams() *V1SpectroClustersResourcesUsageSummaryParams { + var () + return &V1SpectroClustersResourcesUsageSummaryParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1SpectroClustersResourcesUsageSummaryParamsWithTimeout creates a new V1SpectroClustersResourcesUsageSummaryParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1SpectroClustersResourcesUsageSummaryParamsWithTimeout(timeout time.Duration) *V1SpectroClustersResourcesUsageSummaryParams { + var () + return &V1SpectroClustersResourcesUsageSummaryParams{ + + timeout: timeout, + } +} + +// NewV1SpectroClustersResourcesUsageSummaryParamsWithContext creates a new V1SpectroClustersResourcesUsageSummaryParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1SpectroClustersResourcesUsageSummaryParamsWithContext(ctx context.Context) *V1SpectroClustersResourcesUsageSummaryParams { + var () + return &V1SpectroClustersResourcesUsageSummaryParams{ + + Context: ctx, + } +} + +// NewV1SpectroClustersResourcesUsageSummaryParamsWithHTTPClient creates a new V1SpectroClustersResourcesUsageSummaryParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1SpectroClustersResourcesUsageSummaryParamsWithHTTPClient(client *http.Client) *V1SpectroClustersResourcesUsageSummaryParams { + var () + return &V1SpectroClustersResourcesUsageSummaryParams{ + HTTPClient: client, + } +} + +/* +V1SpectroClustersResourcesUsageSummaryParams contains all the parameters to send to the API endpoint +for the v1 spectro clusters resources usage summary operation typically these are written to a http.Request +*/ +type V1SpectroClustersResourcesUsageSummaryParams struct { + + /*Body*/ + Body *models.V1ResourceUsageSummarySpec + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 spectro clusters resources usage summary params +func (o *V1SpectroClustersResourcesUsageSummaryParams) WithTimeout(timeout time.Duration) *V1SpectroClustersResourcesUsageSummaryParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 spectro clusters resources usage summary params +func (o *V1SpectroClustersResourcesUsageSummaryParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 spectro clusters resources usage summary params +func (o *V1SpectroClustersResourcesUsageSummaryParams) WithContext(ctx context.Context) *V1SpectroClustersResourcesUsageSummaryParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 spectro clusters resources usage summary params +func (o *V1SpectroClustersResourcesUsageSummaryParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 spectro clusters resources usage summary params +func (o *V1SpectroClustersResourcesUsageSummaryParams) WithHTTPClient(client *http.Client) *V1SpectroClustersResourcesUsageSummaryParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 spectro clusters resources usage summary params +func (o *V1SpectroClustersResourcesUsageSummaryParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 spectro clusters resources usage summary params +func (o *V1SpectroClustersResourcesUsageSummaryParams) WithBody(body *models.V1ResourceUsageSummarySpec) *V1SpectroClustersResourcesUsageSummaryParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 spectro clusters resources usage summary params +func (o *V1SpectroClustersResourcesUsageSummaryParams) SetBody(body *models.V1ResourceUsageSummarySpec) { + o.Body = body +} + +// WriteToRequest writes these params to a swagger request +func (o *V1SpectroClustersResourcesUsageSummaryParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_resources_usage_summary_responses.go b/api/client/v1/v1_spectro_clusters_resources_usage_summary_responses.go new file mode 100644 index 00000000..962cb26c --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_resources_usage_summary_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1SpectroClustersResourcesUsageSummaryReader is a Reader for the V1SpectroClustersResourcesUsageSummary structure. +type V1SpectroClustersResourcesUsageSummaryReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1SpectroClustersResourcesUsageSummaryReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1SpectroClustersResourcesUsageSummaryOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1SpectroClustersResourcesUsageSummaryOK creates a V1SpectroClustersResourcesUsageSummaryOK with default headers values +func NewV1SpectroClustersResourcesUsageSummaryOK() *V1SpectroClustersResourcesUsageSummaryOK { + return &V1SpectroClustersResourcesUsageSummaryOK{} +} + +/* +V1SpectroClustersResourcesUsageSummaryOK handles this case with default header values. + +An array of resources usage summary items +*/ +type V1SpectroClustersResourcesUsageSummaryOK struct { + Payload *models.V1ResourcesUsageSummary +} + +func (o *V1SpectroClustersResourcesUsageSummaryOK) Error() string { + return fmt.Sprintf("[POST /v1/dashboard/spectroclusters/resources/usage][%d] v1SpectroClustersResourcesUsageSummaryOK %+v", 200, o.Payload) +} + +func (o *V1SpectroClustersResourcesUsageSummaryOK) GetPayload() *models.V1ResourcesUsageSummary { + return o.Payload +} + +func (o *V1SpectroClustersResourcesUsageSummaryOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1ResourcesUsageSummary) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_search_filter_summary_parameters.go b/api/client/v1/v1_spectro_clusters_search_filter_summary_parameters.go new file mode 100644 index 00000000..e6f071e0 --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_search_filter_summary_parameters.go @@ -0,0 +1,234 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1SpectroClustersSearchFilterSummaryParams creates a new V1SpectroClustersSearchFilterSummaryParams object +// with the default values initialized. +func NewV1SpectroClustersSearchFilterSummaryParams() *V1SpectroClustersSearchFilterSummaryParams { + var () + return &V1SpectroClustersSearchFilterSummaryParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1SpectroClustersSearchFilterSummaryParamsWithTimeout creates a new V1SpectroClustersSearchFilterSummaryParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1SpectroClustersSearchFilterSummaryParamsWithTimeout(timeout time.Duration) *V1SpectroClustersSearchFilterSummaryParams { + var () + return &V1SpectroClustersSearchFilterSummaryParams{ + + timeout: timeout, + } +} + +// NewV1SpectroClustersSearchFilterSummaryParamsWithContext creates a new V1SpectroClustersSearchFilterSummaryParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1SpectroClustersSearchFilterSummaryParamsWithContext(ctx context.Context) *V1SpectroClustersSearchFilterSummaryParams { + var () + return &V1SpectroClustersSearchFilterSummaryParams{ + + Context: ctx, + } +} + +// NewV1SpectroClustersSearchFilterSummaryParamsWithHTTPClient creates a new V1SpectroClustersSearchFilterSummaryParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1SpectroClustersSearchFilterSummaryParamsWithHTTPClient(client *http.Client) *V1SpectroClustersSearchFilterSummaryParams { + var () + return &V1SpectroClustersSearchFilterSummaryParams{ + HTTPClient: client, + } +} + +/* +V1SpectroClustersSearchFilterSummaryParams contains all the parameters to send to the API endpoint +for the v1 spectro clusters search filter summary operation typically these are written to a http.Request +*/ +type V1SpectroClustersSearchFilterSummaryParams struct { + + /*Body*/ + Body *models.V1SearchFilterSummarySpec + /*Continue + continue token to paginate the subsequent data items + + */ + Continue *string + /*Limit + limit is a maximum number of responses to return for a list call. Maximum value of the limit is 50. + If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. + + */ + Limit *int64 + /*Offset + offset is the next index number from which the response will start. The response offset value can be used along with continue token for the pagination. + + */ + Offset *int64 + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 spectro clusters search filter summary params +func (o *V1SpectroClustersSearchFilterSummaryParams) WithTimeout(timeout time.Duration) *V1SpectroClustersSearchFilterSummaryParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 spectro clusters search filter summary params +func (o *V1SpectroClustersSearchFilterSummaryParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 spectro clusters search filter summary params +func (o *V1SpectroClustersSearchFilterSummaryParams) WithContext(ctx context.Context) *V1SpectroClustersSearchFilterSummaryParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 spectro clusters search filter summary params +func (o *V1SpectroClustersSearchFilterSummaryParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 spectro clusters search filter summary params +func (o *V1SpectroClustersSearchFilterSummaryParams) WithHTTPClient(client *http.Client) *V1SpectroClustersSearchFilterSummaryParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 spectro clusters search filter summary params +func (o *V1SpectroClustersSearchFilterSummaryParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 spectro clusters search filter summary params +func (o *V1SpectroClustersSearchFilterSummaryParams) WithBody(body *models.V1SearchFilterSummarySpec) *V1SpectroClustersSearchFilterSummaryParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 spectro clusters search filter summary params +func (o *V1SpectroClustersSearchFilterSummaryParams) SetBody(body *models.V1SearchFilterSummarySpec) { + o.Body = body +} + +// WithContinue adds the continueVar to the v1 spectro clusters search filter summary params +func (o *V1SpectroClustersSearchFilterSummaryParams) WithContinue(continueVar *string) *V1SpectroClustersSearchFilterSummaryParams { + o.SetContinue(continueVar) + return o +} + +// SetContinue adds the continue to the v1 spectro clusters search filter summary params +func (o *V1SpectroClustersSearchFilterSummaryParams) SetContinue(continueVar *string) { + o.Continue = continueVar +} + +// WithLimit adds the limit to the v1 spectro clusters search filter summary params +func (o *V1SpectroClustersSearchFilterSummaryParams) WithLimit(limit *int64) *V1SpectroClustersSearchFilterSummaryParams { + o.SetLimit(limit) + return o +} + +// SetLimit adds the limit to the v1 spectro clusters search filter summary params +func (o *V1SpectroClustersSearchFilterSummaryParams) SetLimit(limit *int64) { + o.Limit = limit +} + +// WithOffset adds the offset to the v1 spectro clusters search filter summary params +func (o *V1SpectroClustersSearchFilterSummaryParams) WithOffset(offset *int64) *V1SpectroClustersSearchFilterSummaryParams { + o.SetOffset(offset) + return o +} + +// SetOffset adds the offset to the v1 spectro clusters search filter summary params +func (o *V1SpectroClustersSearchFilterSummaryParams) SetOffset(offset *int64) { + o.Offset = offset +} + +// WriteToRequest writes these params to a swagger request +func (o *V1SpectroClustersSearchFilterSummaryParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + if o.Continue != nil { + + // query param continue + var qrContinue string + if o.Continue != nil { + qrContinue = *o.Continue + } + qContinue := qrContinue + if qContinue != "" { + if err := r.SetQueryParam("continue", qContinue); err != nil { + return err + } + } + + } + + if o.Limit != nil { + + // query param limit + var qrLimit int64 + if o.Limit != nil { + qrLimit = *o.Limit + } + qLimit := swag.FormatInt64(qrLimit) + if qLimit != "" { + if err := r.SetQueryParam("limit", qLimit); err != nil { + return err + } + } + + } + + if o.Offset != nil { + + // query param offset + var qrOffset int64 + if o.Offset != nil { + qrOffset = *o.Offset + } + qOffset := swag.FormatInt64(qrOffset) + if qOffset != "" { + if err := r.SetQueryParam("offset", qOffset); err != nil { + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_search_filter_summary_responses.go b/api/client/v1/v1_spectro_clusters_search_filter_summary_responses.go new file mode 100644 index 00000000..40f5543d --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_search_filter_summary_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1SpectroClustersSearchFilterSummaryReader is a Reader for the V1SpectroClustersSearchFilterSummary structure. +type V1SpectroClustersSearchFilterSummaryReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1SpectroClustersSearchFilterSummaryReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1SpectroClustersSearchFilterSummaryOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1SpectroClustersSearchFilterSummaryOK creates a V1SpectroClustersSearchFilterSummaryOK with default headers values +func NewV1SpectroClustersSearchFilterSummaryOK() *V1SpectroClustersSearchFilterSummaryOK { + return &V1SpectroClustersSearchFilterSummaryOK{} +} + +/* +V1SpectroClustersSearchFilterSummaryOK handles this case with default header values. + +An array of cluster summary items +*/ +type V1SpectroClustersSearchFilterSummaryOK struct { + Payload *models.V1SpectroClustersSummary +} + +func (o *V1SpectroClustersSearchFilterSummaryOK) Error() string { + return fmt.Sprintf("[POST /v1/dashboard/spectroclusters/search][%d] v1SpectroClustersSearchFilterSummaryOK %+v", 200, o.Payload) +} + +func (o *V1SpectroClustersSearchFilterSummaryOK) GetPayload() *models.V1SpectroClustersSummary { + return o.Payload +} + +func (o *V1SpectroClustersSearchFilterSummaryOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1SpectroClustersSummary) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_search_schema_parameters.go b/api/client/v1/v1_spectro_clusters_search_schema_parameters.go new file mode 100644 index 00000000..ba534f5b --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_search_schema_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1SpectroClustersSearchSchemaParams creates a new V1SpectroClustersSearchSchemaParams object +// with the default values initialized. +func NewV1SpectroClustersSearchSchemaParams() *V1SpectroClustersSearchSchemaParams { + + return &V1SpectroClustersSearchSchemaParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1SpectroClustersSearchSchemaParamsWithTimeout creates a new V1SpectroClustersSearchSchemaParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1SpectroClustersSearchSchemaParamsWithTimeout(timeout time.Duration) *V1SpectroClustersSearchSchemaParams { + + return &V1SpectroClustersSearchSchemaParams{ + + timeout: timeout, + } +} + +// NewV1SpectroClustersSearchSchemaParamsWithContext creates a new V1SpectroClustersSearchSchemaParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1SpectroClustersSearchSchemaParamsWithContext(ctx context.Context) *V1SpectroClustersSearchSchemaParams { + + return &V1SpectroClustersSearchSchemaParams{ + + Context: ctx, + } +} + +// NewV1SpectroClustersSearchSchemaParamsWithHTTPClient creates a new V1SpectroClustersSearchSchemaParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1SpectroClustersSearchSchemaParamsWithHTTPClient(client *http.Client) *V1SpectroClustersSearchSchemaParams { + + return &V1SpectroClustersSearchSchemaParams{ + HTTPClient: client, + } +} + +/* +V1SpectroClustersSearchSchemaParams contains all the parameters to send to the API endpoint +for the v1 spectro clusters search schema operation typically these are written to a http.Request +*/ +type V1SpectroClustersSearchSchemaParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 spectro clusters search schema params +func (o *V1SpectroClustersSearchSchemaParams) WithTimeout(timeout time.Duration) *V1SpectroClustersSearchSchemaParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 spectro clusters search schema params +func (o *V1SpectroClustersSearchSchemaParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 spectro clusters search schema params +func (o *V1SpectroClustersSearchSchemaParams) WithContext(ctx context.Context) *V1SpectroClustersSearchSchemaParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 spectro clusters search schema params +func (o *V1SpectroClustersSearchSchemaParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 spectro clusters search schema params +func (o *V1SpectroClustersSearchSchemaParams) WithHTTPClient(client *http.Client) *V1SpectroClustersSearchSchemaParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 spectro clusters search schema params +func (o *V1SpectroClustersSearchSchemaParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *V1SpectroClustersSearchSchemaParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_search_schema_responses.go b/api/client/v1/v1_spectro_clusters_search_schema_responses.go new file mode 100644 index 00000000..0f6bef4f --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_search_schema_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1SpectroClustersSearchSchemaReader is a Reader for the V1SpectroClustersSearchSchema structure. +type V1SpectroClustersSearchSchemaReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1SpectroClustersSearchSchemaReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1SpectroClustersSearchSchemaOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1SpectroClustersSearchSchemaOK creates a V1SpectroClustersSearchSchemaOK with default headers values +func NewV1SpectroClustersSearchSchemaOK() *V1SpectroClustersSearchSchemaOK { + return &V1SpectroClustersSearchSchemaOK{} +} + +/* +V1SpectroClustersSearchSchemaOK handles this case with default header values. + +An array of cluster filter schema items +*/ +type V1SpectroClustersSearchSchemaOK struct { + Payload *models.V1SearchFilterSchemaSpec +} + +func (o *V1SpectroClustersSearchSchemaOK) Error() string { + return fmt.Sprintf("[GET /v1/dashboard/spectroclusters/search/schema][%d] v1SpectroClustersSearchSchemaOK %+v", 200, o.Payload) +} + +func (o *V1SpectroClustersSearchSchemaOK) GetPayload() *models.V1SearchFilterSchemaSpec { + return o.Payload +} + +func (o *V1SpectroClustersSearchSchemaOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1SearchFilterSchemaSpec) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_spc_download_parameters.go b/api/client/v1/v1_spectro_clusters_spc_download_parameters.go new file mode 100644 index 00000000..018e0f57 --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_spc_download_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1SpectroClustersSpcDownloadParams creates a new V1SpectroClustersSpcDownloadParams object +// with the default values initialized. +func NewV1SpectroClustersSpcDownloadParams() *V1SpectroClustersSpcDownloadParams { + var () + return &V1SpectroClustersSpcDownloadParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1SpectroClustersSpcDownloadParamsWithTimeout creates a new V1SpectroClustersSpcDownloadParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1SpectroClustersSpcDownloadParamsWithTimeout(timeout time.Duration) *V1SpectroClustersSpcDownloadParams { + var () + return &V1SpectroClustersSpcDownloadParams{ + + timeout: timeout, + } +} + +// NewV1SpectroClustersSpcDownloadParamsWithContext creates a new V1SpectroClustersSpcDownloadParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1SpectroClustersSpcDownloadParamsWithContext(ctx context.Context) *V1SpectroClustersSpcDownloadParams { + var () + return &V1SpectroClustersSpcDownloadParams{ + + Context: ctx, + } +} + +// NewV1SpectroClustersSpcDownloadParamsWithHTTPClient creates a new V1SpectroClustersSpcDownloadParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1SpectroClustersSpcDownloadParamsWithHTTPClient(client *http.Client) *V1SpectroClustersSpcDownloadParams { + var () + return &V1SpectroClustersSpcDownloadParams{ + HTTPClient: client, + } +} + +/* +V1SpectroClustersSpcDownloadParams contains all the parameters to send to the API endpoint +for the v1 spectro clusters spc download operation typically these are written to a http.Request +*/ +type V1SpectroClustersSpcDownloadParams struct { + + /*Body*/ + Body *models.V1ClusterDefinitionEntity + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 spectro clusters spc download params +func (o *V1SpectroClustersSpcDownloadParams) WithTimeout(timeout time.Duration) *V1SpectroClustersSpcDownloadParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 spectro clusters spc download params +func (o *V1SpectroClustersSpcDownloadParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 spectro clusters spc download params +func (o *V1SpectroClustersSpcDownloadParams) WithContext(ctx context.Context) *V1SpectroClustersSpcDownloadParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 spectro clusters spc download params +func (o *V1SpectroClustersSpcDownloadParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 spectro clusters spc download params +func (o *V1SpectroClustersSpcDownloadParams) WithHTTPClient(client *http.Client) *V1SpectroClustersSpcDownloadParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 spectro clusters spc download params +func (o *V1SpectroClustersSpcDownloadParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 spectro clusters spc download params +func (o *V1SpectroClustersSpcDownloadParams) WithBody(body *models.V1ClusterDefinitionEntity) *V1SpectroClustersSpcDownloadParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 spectro clusters spc download params +func (o *V1SpectroClustersSpcDownloadParams) SetBody(body *models.V1ClusterDefinitionEntity) { + o.Body = body +} + +// WriteToRequest writes these params to a swagger request +func (o *V1SpectroClustersSpcDownloadParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_spc_download_responses.go b/api/client/v1/v1_spectro_clusters_spc_download_responses.go new file mode 100644 index 00000000..be1898e9 --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_spc_download_responses.go @@ -0,0 +1,74 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1SpectroClustersSpcDownloadReader is a Reader for the V1SpectroClustersSpcDownload structure. +type V1SpectroClustersSpcDownloadReader struct { + formats strfmt.Registry + writer io.Writer +} + +// ReadResponse reads a server response into the received o. +func (o *V1SpectroClustersSpcDownloadReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1SpectroClustersSpcDownloadOK(o.writer) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1SpectroClustersSpcDownloadOK creates a V1SpectroClustersSpcDownloadOK with default headers values +func NewV1SpectroClustersSpcDownloadOK(writer io.Writer) *V1SpectroClustersSpcDownloadOK { + return &V1SpectroClustersSpcDownloadOK{ + Payload: writer, + } +} + +/* +V1SpectroClustersSpcDownloadOK handles this case with default header values. + +Cluster definition archive file +*/ +type V1SpectroClustersSpcDownloadOK struct { + ContentDisposition string + + Payload io.Writer +} + +func (o *V1SpectroClustersSpcDownloadOK) Error() string { + return fmt.Sprintf("[POST /v1/spectroclusters/spc/download][%d] v1SpectroClustersSpcDownloadOK %+v", 200, o.Payload) +} + +func (o *V1SpectroClustersSpcDownloadOK) GetPayload() io.Writer { + return o.Payload +} + +func (o *V1SpectroClustersSpcDownloadOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Content-Disposition + o.ContentDisposition = response.GetHeader("Content-Disposition") + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_summary_uid_overview_parameters.go b/api/client/v1/v1_spectro_clusters_summary_uid_overview_parameters.go new file mode 100644 index 00000000..a44c1700 --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_summary_uid_overview_parameters.go @@ -0,0 +1,133 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1SpectroClustersSummaryUIDOverviewParams creates a new V1SpectroClustersSummaryUIDOverviewParams object +// with the default values initialized. +func NewV1SpectroClustersSummaryUIDOverviewParams() *V1SpectroClustersSummaryUIDOverviewParams { + var () + return &V1SpectroClustersSummaryUIDOverviewParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1SpectroClustersSummaryUIDOverviewParamsWithTimeout creates a new V1SpectroClustersSummaryUIDOverviewParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1SpectroClustersSummaryUIDOverviewParamsWithTimeout(timeout time.Duration) *V1SpectroClustersSummaryUIDOverviewParams { + var () + return &V1SpectroClustersSummaryUIDOverviewParams{ + + timeout: timeout, + } +} + +// NewV1SpectroClustersSummaryUIDOverviewParamsWithContext creates a new V1SpectroClustersSummaryUIDOverviewParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1SpectroClustersSummaryUIDOverviewParamsWithContext(ctx context.Context) *V1SpectroClustersSummaryUIDOverviewParams { + var () + return &V1SpectroClustersSummaryUIDOverviewParams{ + + Context: ctx, + } +} + +// NewV1SpectroClustersSummaryUIDOverviewParamsWithHTTPClient creates a new V1SpectroClustersSummaryUIDOverviewParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1SpectroClustersSummaryUIDOverviewParamsWithHTTPClient(client *http.Client) *V1SpectroClustersSummaryUIDOverviewParams { + var () + return &V1SpectroClustersSummaryUIDOverviewParams{ + HTTPClient: client, + } +} + +/* +V1SpectroClustersSummaryUIDOverviewParams contains all the parameters to send to the API endpoint +for the v1 spectro clusters summary Uid overview operation typically these are written to a http.Request +*/ +type V1SpectroClustersSummaryUIDOverviewParams struct { + + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 spectro clusters summary Uid overview params +func (o *V1SpectroClustersSummaryUIDOverviewParams) WithTimeout(timeout time.Duration) *V1SpectroClustersSummaryUIDOverviewParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 spectro clusters summary Uid overview params +func (o *V1SpectroClustersSummaryUIDOverviewParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 spectro clusters summary Uid overview params +func (o *V1SpectroClustersSummaryUIDOverviewParams) WithContext(ctx context.Context) *V1SpectroClustersSummaryUIDOverviewParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 spectro clusters summary Uid overview params +func (o *V1SpectroClustersSummaryUIDOverviewParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 spectro clusters summary Uid overview params +func (o *V1SpectroClustersSummaryUIDOverviewParams) WithHTTPClient(client *http.Client) *V1SpectroClustersSummaryUIDOverviewParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 spectro clusters summary Uid overview params +func (o *V1SpectroClustersSummaryUIDOverviewParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithUID adds the uid to the v1 spectro clusters summary Uid overview params +func (o *V1SpectroClustersSummaryUIDOverviewParams) WithUID(uid string) *V1SpectroClustersSummaryUIDOverviewParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 spectro clusters summary Uid overview params +func (o *V1SpectroClustersSummaryUIDOverviewParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1SpectroClustersSummaryUIDOverviewParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_summary_uid_overview_responses.go b/api/client/v1/v1_spectro_clusters_summary_uid_overview_responses.go new file mode 100644 index 00000000..477c4d3a --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_summary_uid_overview_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1SpectroClustersSummaryUIDOverviewReader is a Reader for the V1SpectroClustersSummaryUIDOverview structure. +type V1SpectroClustersSummaryUIDOverviewReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1SpectroClustersSummaryUIDOverviewReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1SpectroClustersSummaryUIDOverviewOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1SpectroClustersSummaryUIDOverviewOK creates a V1SpectroClustersSummaryUIDOverviewOK with default headers values +func NewV1SpectroClustersSummaryUIDOverviewOK() *V1SpectroClustersSummaryUIDOverviewOK { + return &V1SpectroClustersSummaryUIDOverviewOK{} +} + +/* +V1SpectroClustersSummaryUIDOverviewOK handles this case with default header values. + +An spectro cluster summary overview +*/ +type V1SpectroClustersSummaryUIDOverviewOK struct { + Payload *models.V1SpectroClusterUIDSummary +} + +func (o *V1SpectroClustersSummaryUIDOverviewOK) Error() string { + return fmt.Sprintf("[GET /v1/dashboard/spectroclusters/{uid}/overview][%d] v1SpectroClustersSummaryUidOverviewOK %+v", 200, o.Payload) +} + +func (o *V1SpectroClustersSummaryUIDOverviewOK) GetPayload() *models.V1SpectroClusterUIDSummary { + return o.Payload +} + +func (o *V1SpectroClustersSummaryUIDOverviewOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1SpectroClusterUIDSummary) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_summary_uid_parameters.go b/api/client/v1/v1_spectro_clusters_summary_uid_parameters.go new file mode 100644 index 00000000..8c9548a5 --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_summary_uid_parameters.go @@ -0,0 +1,133 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1SpectroClustersSummaryUIDParams creates a new V1SpectroClustersSummaryUIDParams object +// with the default values initialized. +func NewV1SpectroClustersSummaryUIDParams() *V1SpectroClustersSummaryUIDParams { + var () + return &V1SpectroClustersSummaryUIDParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1SpectroClustersSummaryUIDParamsWithTimeout creates a new V1SpectroClustersSummaryUIDParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1SpectroClustersSummaryUIDParamsWithTimeout(timeout time.Duration) *V1SpectroClustersSummaryUIDParams { + var () + return &V1SpectroClustersSummaryUIDParams{ + + timeout: timeout, + } +} + +// NewV1SpectroClustersSummaryUIDParamsWithContext creates a new V1SpectroClustersSummaryUIDParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1SpectroClustersSummaryUIDParamsWithContext(ctx context.Context) *V1SpectroClustersSummaryUIDParams { + var () + return &V1SpectroClustersSummaryUIDParams{ + + Context: ctx, + } +} + +// NewV1SpectroClustersSummaryUIDParamsWithHTTPClient creates a new V1SpectroClustersSummaryUIDParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1SpectroClustersSummaryUIDParamsWithHTTPClient(client *http.Client) *V1SpectroClustersSummaryUIDParams { + var () + return &V1SpectroClustersSummaryUIDParams{ + HTTPClient: client, + } +} + +/* +V1SpectroClustersSummaryUIDParams contains all the parameters to send to the API endpoint +for the v1 spectro clusters summary Uid operation typically these are written to a http.Request +*/ +type V1SpectroClustersSummaryUIDParams struct { + + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 spectro clusters summary Uid params +func (o *V1SpectroClustersSummaryUIDParams) WithTimeout(timeout time.Duration) *V1SpectroClustersSummaryUIDParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 spectro clusters summary Uid params +func (o *V1SpectroClustersSummaryUIDParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 spectro clusters summary Uid params +func (o *V1SpectroClustersSummaryUIDParams) WithContext(ctx context.Context) *V1SpectroClustersSummaryUIDParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 spectro clusters summary Uid params +func (o *V1SpectroClustersSummaryUIDParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 spectro clusters summary Uid params +func (o *V1SpectroClustersSummaryUIDParams) WithHTTPClient(client *http.Client) *V1SpectroClustersSummaryUIDParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 spectro clusters summary Uid params +func (o *V1SpectroClustersSummaryUIDParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithUID adds the uid to the v1 spectro clusters summary Uid params +func (o *V1SpectroClustersSummaryUIDParams) WithUID(uid string) *V1SpectroClustersSummaryUIDParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 spectro clusters summary Uid params +func (o *V1SpectroClustersSummaryUIDParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1SpectroClustersSummaryUIDParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_summary_uid_responses.go b/api/client/v1/v1_spectro_clusters_summary_uid_responses.go new file mode 100644 index 00000000..55ea7e0b --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_summary_uid_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1SpectroClustersSummaryUIDReader is a Reader for the V1SpectroClustersSummaryUID structure. +type V1SpectroClustersSummaryUIDReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1SpectroClustersSummaryUIDReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1SpectroClustersSummaryUIDOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1SpectroClustersSummaryUIDOK creates a V1SpectroClustersSummaryUIDOK with default headers values +func NewV1SpectroClustersSummaryUIDOK() *V1SpectroClustersSummaryUIDOK { + return &V1SpectroClustersSummaryUIDOK{} +} + +/* +V1SpectroClustersSummaryUIDOK handles this case with default header values. + +An spectro cluster summary +*/ +type V1SpectroClustersSummaryUIDOK struct { + Payload *models.V1SpectroClusterUIDSummary +} + +func (o *V1SpectroClustersSummaryUIDOK) Error() string { + return fmt.Sprintf("[GET /v1/dashboard/spectroclusters/{uid}][%d] v1SpectroClustersSummaryUidOK %+v", 200, o.Payload) +} + +func (o *V1SpectroClustersSummaryUIDOK) GetPayload() *models.V1SpectroClusterUIDSummary { + return o.Payload +} + +func (o *V1SpectroClustersSummaryUIDOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1SpectroClusterUIDSummary) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_tke_create_parameters.go b/api/client/v1/v1_spectro_clusters_tke_create_parameters.go new file mode 100644 index 00000000..e8c566e6 --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_tke_create_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1SpectroClustersTkeCreateParams creates a new V1SpectroClustersTkeCreateParams object +// with the default values initialized. +func NewV1SpectroClustersTkeCreateParams() *V1SpectroClustersTkeCreateParams { + var () + return &V1SpectroClustersTkeCreateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1SpectroClustersTkeCreateParamsWithTimeout creates a new V1SpectroClustersTkeCreateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1SpectroClustersTkeCreateParamsWithTimeout(timeout time.Duration) *V1SpectroClustersTkeCreateParams { + var () + return &V1SpectroClustersTkeCreateParams{ + + timeout: timeout, + } +} + +// NewV1SpectroClustersTkeCreateParamsWithContext creates a new V1SpectroClustersTkeCreateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1SpectroClustersTkeCreateParamsWithContext(ctx context.Context) *V1SpectroClustersTkeCreateParams { + var () + return &V1SpectroClustersTkeCreateParams{ + + Context: ctx, + } +} + +// NewV1SpectroClustersTkeCreateParamsWithHTTPClient creates a new V1SpectroClustersTkeCreateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1SpectroClustersTkeCreateParamsWithHTTPClient(client *http.Client) *V1SpectroClustersTkeCreateParams { + var () + return &V1SpectroClustersTkeCreateParams{ + HTTPClient: client, + } +} + +/* +V1SpectroClustersTkeCreateParams contains all the parameters to send to the API endpoint +for the v1 spectro clusters tke create operation typically these are written to a http.Request +*/ +type V1SpectroClustersTkeCreateParams struct { + + /*Body*/ + Body *models.V1SpectroTencentClusterEntity + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 spectro clusters tke create params +func (o *V1SpectroClustersTkeCreateParams) WithTimeout(timeout time.Duration) *V1SpectroClustersTkeCreateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 spectro clusters tke create params +func (o *V1SpectroClustersTkeCreateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 spectro clusters tke create params +func (o *V1SpectroClustersTkeCreateParams) WithContext(ctx context.Context) *V1SpectroClustersTkeCreateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 spectro clusters tke create params +func (o *V1SpectroClustersTkeCreateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 spectro clusters tke create params +func (o *V1SpectroClustersTkeCreateParams) WithHTTPClient(client *http.Client) *V1SpectroClustersTkeCreateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 spectro clusters tke create params +func (o *V1SpectroClustersTkeCreateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 spectro clusters tke create params +func (o *V1SpectroClustersTkeCreateParams) WithBody(body *models.V1SpectroTencentClusterEntity) *V1SpectroClustersTkeCreateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 spectro clusters tke create params +func (o *V1SpectroClustersTkeCreateParams) SetBody(body *models.V1SpectroTencentClusterEntity) { + o.Body = body +} + +// WriteToRequest writes these params to a swagger request +func (o *V1SpectroClustersTkeCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_tke_create_responses.go b/api/client/v1/v1_spectro_clusters_tke_create_responses.go new file mode 100644 index 00000000..ecf7efd0 --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_tke_create_responses.go @@ -0,0 +1,77 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1SpectroClustersTkeCreateReader is a Reader for the V1SpectroClustersTkeCreate structure. +type V1SpectroClustersTkeCreateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1SpectroClustersTkeCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 201: + result := NewV1SpectroClustersTkeCreateCreated() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1SpectroClustersTkeCreateCreated creates a V1SpectroClustersTkeCreateCreated with default headers values +func NewV1SpectroClustersTkeCreateCreated() *V1SpectroClustersTkeCreateCreated { + return &V1SpectroClustersTkeCreateCreated{} +} + +/* +V1SpectroClustersTkeCreateCreated handles this case with default header values. + +Created successfully +*/ +type V1SpectroClustersTkeCreateCreated struct { + /*Audit uid for the request + */ + AuditUID string + + Payload *models.V1UID +} + +func (o *V1SpectroClustersTkeCreateCreated) Error() string { + return fmt.Sprintf("[POST /v1/spectroclusters/tke][%d] v1SpectroClustersTkeCreateCreated %+v", 201, o.Payload) +} + +func (o *V1SpectroClustersTkeCreateCreated) GetPayload() *models.V1UID { + return o.Payload +} + +func (o *V1SpectroClustersTkeCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header AuditUid + o.AuditUID = response.GetHeader("AuditUid") + + o.Payload = new(models.V1UID) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_tke_rate_parameters.go b/api/client/v1/v1_spectro_clusters_tke_rate_parameters.go new file mode 100644 index 00000000..94f01c4e --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_tke_rate_parameters.go @@ -0,0 +1,177 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1SpectroClustersTkeRateParams creates a new V1SpectroClustersTkeRateParams object +// with the default values initialized. +func NewV1SpectroClustersTkeRateParams() *V1SpectroClustersTkeRateParams { + var ( + periodTypeDefault = string("hourly") + ) + return &V1SpectroClustersTkeRateParams{ + PeriodType: &periodTypeDefault, + + timeout: cr.DefaultTimeout, + } +} + +// NewV1SpectroClustersTkeRateParamsWithTimeout creates a new V1SpectroClustersTkeRateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1SpectroClustersTkeRateParamsWithTimeout(timeout time.Duration) *V1SpectroClustersTkeRateParams { + var ( + periodTypeDefault = string("hourly") + ) + return &V1SpectroClustersTkeRateParams{ + PeriodType: &periodTypeDefault, + + timeout: timeout, + } +} + +// NewV1SpectroClustersTkeRateParamsWithContext creates a new V1SpectroClustersTkeRateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1SpectroClustersTkeRateParamsWithContext(ctx context.Context) *V1SpectroClustersTkeRateParams { + var ( + periodTypeDefault = string("hourly") + ) + return &V1SpectroClustersTkeRateParams{ + PeriodType: &periodTypeDefault, + + Context: ctx, + } +} + +// NewV1SpectroClustersTkeRateParamsWithHTTPClient creates a new V1SpectroClustersTkeRateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1SpectroClustersTkeRateParamsWithHTTPClient(client *http.Client) *V1SpectroClustersTkeRateParams { + var ( + periodTypeDefault = string("hourly") + ) + return &V1SpectroClustersTkeRateParams{ + PeriodType: &periodTypeDefault, + HTTPClient: client, + } +} + +/* +V1SpectroClustersTkeRateParams contains all the parameters to send to the API endpoint +for the v1 spectro clusters tke rate operation typically these are written to a http.Request +*/ +type V1SpectroClustersTkeRateParams struct { + + /*Body*/ + Body *models.V1SpectroTencentClusterRateEntity + /*PeriodType*/ + PeriodType *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 spectro clusters tke rate params +func (o *V1SpectroClustersTkeRateParams) WithTimeout(timeout time.Duration) *V1SpectroClustersTkeRateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 spectro clusters tke rate params +func (o *V1SpectroClustersTkeRateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 spectro clusters tke rate params +func (o *V1SpectroClustersTkeRateParams) WithContext(ctx context.Context) *V1SpectroClustersTkeRateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 spectro clusters tke rate params +func (o *V1SpectroClustersTkeRateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 spectro clusters tke rate params +func (o *V1SpectroClustersTkeRateParams) WithHTTPClient(client *http.Client) *V1SpectroClustersTkeRateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 spectro clusters tke rate params +func (o *V1SpectroClustersTkeRateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 spectro clusters tke rate params +func (o *V1SpectroClustersTkeRateParams) WithBody(body *models.V1SpectroTencentClusterRateEntity) *V1SpectroClustersTkeRateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 spectro clusters tke rate params +func (o *V1SpectroClustersTkeRateParams) SetBody(body *models.V1SpectroTencentClusterRateEntity) { + o.Body = body +} + +// WithPeriodType adds the periodType to the v1 spectro clusters tke rate params +func (o *V1SpectroClustersTkeRateParams) WithPeriodType(periodType *string) *V1SpectroClustersTkeRateParams { + o.SetPeriodType(periodType) + return o +} + +// SetPeriodType adds the periodType to the v1 spectro clusters tke rate params +func (o *V1SpectroClustersTkeRateParams) SetPeriodType(periodType *string) { + o.PeriodType = periodType +} + +// WriteToRequest writes these params to a swagger request +func (o *V1SpectroClustersTkeRateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + if o.PeriodType != nil { + + // query param periodType + var qrPeriodType string + if o.PeriodType != nil { + qrPeriodType = *o.PeriodType + } + qPeriodType := qrPeriodType + if qPeriodType != "" { + if err := r.SetQueryParam("periodType", qPeriodType); err != nil { + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_tke_rate_responses.go b/api/client/v1/v1_spectro_clusters_tke_rate_responses.go new file mode 100644 index 00000000..b06bfc11 --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_tke_rate_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1SpectroClustersTkeRateReader is a Reader for the V1SpectroClustersTkeRate structure. +type V1SpectroClustersTkeRateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1SpectroClustersTkeRateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1SpectroClustersTkeRateOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1SpectroClustersTkeRateOK creates a V1SpectroClustersTkeRateOK with default headers values +func NewV1SpectroClustersTkeRateOK() *V1SpectroClustersTkeRateOK { + return &V1SpectroClustersTkeRateOK{} +} + +/* +V1SpectroClustersTkeRateOK handles this case with default header values. + +Tke Cluster estimated rate response +*/ +type V1SpectroClustersTkeRateOK struct { + Payload *models.V1SpectroClusterRate +} + +func (o *V1SpectroClustersTkeRateOK) Error() string { + return fmt.Sprintf("[POST /v1/spectroclusters/tke/rate][%d] v1SpectroClustersTkeRateOK %+v", 200, o.Payload) +} + +func (o *V1SpectroClustersTkeRateOK) GetPayload() *models.V1SpectroClusterRate { + return o.Payload +} + +func (o *V1SpectroClustersTkeRateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1SpectroClusterRate) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_tke_validate_parameters.go b/api/client/v1/v1_spectro_clusters_tke_validate_parameters.go new file mode 100644 index 00000000..009a72e0 --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_tke_validate_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1SpectroClustersTkeValidateParams creates a new V1SpectroClustersTkeValidateParams object +// with the default values initialized. +func NewV1SpectroClustersTkeValidateParams() *V1SpectroClustersTkeValidateParams { + var () + return &V1SpectroClustersTkeValidateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1SpectroClustersTkeValidateParamsWithTimeout creates a new V1SpectroClustersTkeValidateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1SpectroClustersTkeValidateParamsWithTimeout(timeout time.Duration) *V1SpectroClustersTkeValidateParams { + var () + return &V1SpectroClustersTkeValidateParams{ + + timeout: timeout, + } +} + +// NewV1SpectroClustersTkeValidateParamsWithContext creates a new V1SpectroClustersTkeValidateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1SpectroClustersTkeValidateParamsWithContext(ctx context.Context) *V1SpectroClustersTkeValidateParams { + var () + return &V1SpectroClustersTkeValidateParams{ + + Context: ctx, + } +} + +// NewV1SpectroClustersTkeValidateParamsWithHTTPClient creates a new V1SpectroClustersTkeValidateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1SpectroClustersTkeValidateParamsWithHTTPClient(client *http.Client) *V1SpectroClustersTkeValidateParams { + var () + return &V1SpectroClustersTkeValidateParams{ + HTTPClient: client, + } +} + +/* +V1SpectroClustersTkeValidateParams contains all the parameters to send to the API endpoint +for the v1 spectro clusters tke validate operation typically these are written to a http.Request +*/ +type V1SpectroClustersTkeValidateParams struct { + + /*Body*/ + Body *models.V1SpectroTencentClusterEntity + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 spectro clusters tke validate params +func (o *V1SpectroClustersTkeValidateParams) WithTimeout(timeout time.Duration) *V1SpectroClustersTkeValidateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 spectro clusters tke validate params +func (o *V1SpectroClustersTkeValidateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 spectro clusters tke validate params +func (o *V1SpectroClustersTkeValidateParams) WithContext(ctx context.Context) *V1SpectroClustersTkeValidateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 spectro clusters tke validate params +func (o *V1SpectroClustersTkeValidateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 spectro clusters tke validate params +func (o *V1SpectroClustersTkeValidateParams) WithHTTPClient(client *http.Client) *V1SpectroClustersTkeValidateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 spectro clusters tke validate params +func (o *V1SpectroClustersTkeValidateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 spectro clusters tke validate params +func (o *V1SpectroClustersTkeValidateParams) WithBody(body *models.V1SpectroTencentClusterEntity) *V1SpectroClustersTkeValidateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 spectro clusters tke validate params +func (o *V1SpectroClustersTkeValidateParams) SetBody(body *models.V1SpectroTencentClusterEntity) { + o.Body = body +} + +// WriteToRequest writes these params to a swagger request +func (o *V1SpectroClustersTkeValidateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_tke_validate_responses.go b/api/client/v1/v1_spectro_clusters_tke_validate_responses.go new file mode 100644 index 00000000..77e88958 --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_tke_validate_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1SpectroClustersTkeValidateReader is a Reader for the V1SpectroClustersTkeValidate structure. +type V1SpectroClustersTkeValidateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1SpectroClustersTkeValidateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1SpectroClustersTkeValidateOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1SpectroClustersTkeValidateOK creates a V1SpectroClustersTkeValidateOK with default headers values +func NewV1SpectroClustersTkeValidateOK() *V1SpectroClustersTkeValidateOK { + return &V1SpectroClustersTkeValidateOK{} +} + +/* +V1SpectroClustersTkeValidateOK handles this case with default header values. + +Tke Cluster validation response +*/ +type V1SpectroClustersTkeValidateOK struct { + Payload *models.V1SpectroClusterValidatorResponse +} + +func (o *V1SpectroClustersTkeValidateOK) Error() string { + return fmt.Sprintf("[POST /v1/spectroclusters/tke/validate][%d] v1SpectroClustersTkeValidateOK %+v", 200, o.Payload) +} + +func (o *V1SpectroClustersTkeValidateOK) GetPayload() *models.V1SpectroClusterValidatorResponse { + return o.Payload +} + +func (o *V1SpectroClustersTkeValidateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1SpectroClusterValidatorResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_uid_admin_kube_config_parameters.go b/api/client/v1/v1_spectro_clusters_uid_admin_kube_config_parameters.go new file mode 100644 index 00000000..7a513593 --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_uid_admin_kube_config_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1SpectroClustersUIDAdminKubeConfigParams creates a new V1SpectroClustersUIDAdminKubeConfigParams object +// with the default values initialized. +func NewV1SpectroClustersUIDAdminKubeConfigParams() *V1SpectroClustersUIDAdminKubeConfigParams { + var () + return &V1SpectroClustersUIDAdminKubeConfigParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1SpectroClustersUIDAdminKubeConfigParamsWithTimeout creates a new V1SpectroClustersUIDAdminKubeConfigParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1SpectroClustersUIDAdminKubeConfigParamsWithTimeout(timeout time.Duration) *V1SpectroClustersUIDAdminKubeConfigParams { + var () + return &V1SpectroClustersUIDAdminKubeConfigParams{ + + timeout: timeout, + } +} + +// NewV1SpectroClustersUIDAdminKubeConfigParamsWithContext creates a new V1SpectroClustersUIDAdminKubeConfigParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1SpectroClustersUIDAdminKubeConfigParamsWithContext(ctx context.Context) *V1SpectroClustersUIDAdminKubeConfigParams { + var () + return &V1SpectroClustersUIDAdminKubeConfigParams{ + + Context: ctx, + } +} + +// NewV1SpectroClustersUIDAdminKubeConfigParamsWithHTTPClient creates a new V1SpectroClustersUIDAdminKubeConfigParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1SpectroClustersUIDAdminKubeConfigParamsWithHTTPClient(client *http.Client) *V1SpectroClustersUIDAdminKubeConfigParams { + var () + return &V1SpectroClustersUIDAdminKubeConfigParams{ + HTTPClient: client, + } +} + +/* +V1SpectroClustersUIDAdminKubeConfigParams contains all the parameters to send to the API endpoint +for the v1 spectro clusters Uid admin kube config operation typically these are written to a http.Request +*/ +type V1SpectroClustersUIDAdminKubeConfigParams struct { + + /*UID + Cluster uid + + */ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 spectro clusters Uid admin kube config params +func (o *V1SpectroClustersUIDAdminKubeConfigParams) WithTimeout(timeout time.Duration) *V1SpectroClustersUIDAdminKubeConfigParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 spectro clusters Uid admin kube config params +func (o *V1SpectroClustersUIDAdminKubeConfigParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 spectro clusters Uid admin kube config params +func (o *V1SpectroClustersUIDAdminKubeConfigParams) WithContext(ctx context.Context) *V1SpectroClustersUIDAdminKubeConfigParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 spectro clusters Uid admin kube config params +func (o *V1SpectroClustersUIDAdminKubeConfigParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 spectro clusters Uid admin kube config params +func (o *V1SpectroClustersUIDAdminKubeConfigParams) WithHTTPClient(client *http.Client) *V1SpectroClustersUIDAdminKubeConfigParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 spectro clusters Uid admin kube config params +func (o *V1SpectroClustersUIDAdminKubeConfigParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithUID adds the uid to the v1 spectro clusters Uid admin kube config params +func (o *V1SpectroClustersUIDAdminKubeConfigParams) WithUID(uid string) *V1SpectroClustersUIDAdminKubeConfigParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 spectro clusters Uid admin kube config params +func (o *V1SpectroClustersUIDAdminKubeConfigParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1SpectroClustersUIDAdminKubeConfigParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_uid_admin_kube_config_responses.go b/api/client/v1/v1_spectro_clusters_uid_admin_kube_config_responses.go new file mode 100644 index 00000000..4b6c6135 --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_uid_admin_kube_config_responses.go @@ -0,0 +1,74 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1SpectroClustersUIDAdminKubeConfigReader is a Reader for the V1SpectroClustersUIDAdminKubeConfig structure. +type V1SpectroClustersUIDAdminKubeConfigReader struct { + formats strfmt.Registry + writer io.Writer +} + +// ReadResponse reads a server response into the received o. +func (o *V1SpectroClustersUIDAdminKubeConfigReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1SpectroClustersUIDAdminKubeConfigOK(o.writer) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1SpectroClustersUIDAdminKubeConfigOK creates a V1SpectroClustersUIDAdminKubeConfigOK with default headers values +func NewV1SpectroClustersUIDAdminKubeConfigOK(writer io.Writer) *V1SpectroClustersUIDAdminKubeConfigOK { + return &V1SpectroClustersUIDAdminKubeConfigOK{ + Payload: writer, + } +} + +/* +V1SpectroClustersUIDAdminKubeConfigOK handles this case with default header values. + +download file +*/ +type V1SpectroClustersUIDAdminKubeConfigOK struct { + ContentDisposition string + + Payload io.Writer +} + +func (o *V1SpectroClustersUIDAdminKubeConfigOK) Error() string { + return fmt.Sprintf("[GET /v1/spectroclusters/{uid}/assets/adminKubeconfig][%d] v1SpectroClustersUidAdminKubeConfigOK %+v", 200, o.Payload) +} + +func (o *V1SpectroClustersUIDAdminKubeConfigOK) GetPayload() io.Writer { + return o.Payload +} + +func (o *V1SpectroClustersUIDAdminKubeConfigOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Content-Disposition + o.ContentDisposition = response.GetHeader("Content-Disposition") + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_uid_assets_get_parameters.go b/api/client/v1/v1_spectro_clusters_uid_assets_get_parameters.go new file mode 100644 index 00000000..9c362076 --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_uid_assets_get_parameters.go @@ -0,0 +1,133 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1SpectroClustersUIDAssetsGetParams creates a new V1SpectroClustersUIDAssetsGetParams object +// with the default values initialized. +func NewV1SpectroClustersUIDAssetsGetParams() *V1SpectroClustersUIDAssetsGetParams { + var () + return &V1SpectroClustersUIDAssetsGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1SpectroClustersUIDAssetsGetParamsWithTimeout creates a new V1SpectroClustersUIDAssetsGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1SpectroClustersUIDAssetsGetParamsWithTimeout(timeout time.Duration) *V1SpectroClustersUIDAssetsGetParams { + var () + return &V1SpectroClustersUIDAssetsGetParams{ + + timeout: timeout, + } +} + +// NewV1SpectroClustersUIDAssetsGetParamsWithContext creates a new V1SpectroClustersUIDAssetsGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1SpectroClustersUIDAssetsGetParamsWithContext(ctx context.Context) *V1SpectroClustersUIDAssetsGetParams { + var () + return &V1SpectroClustersUIDAssetsGetParams{ + + Context: ctx, + } +} + +// NewV1SpectroClustersUIDAssetsGetParamsWithHTTPClient creates a new V1SpectroClustersUIDAssetsGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1SpectroClustersUIDAssetsGetParamsWithHTTPClient(client *http.Client) *V1SpectroClustersUIDAssetsGetParams { + var () + return &V1SpectroClustersUIDAssetsGetParams{ + HTTPClient: client, + } +} + +/* +V1SpectroClustersUIDAssetsGetParams contains all the parameters to send to the API endpoint +for the v1 spectro clusters Uid assets get operation typically these are written to a http.Request +*/ +type V1SpectroClustersUIDAssetsGetParams struct { + + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 spectro clusters Uid assets get params +func (o *V1SpectroClustersUIDAssetsGetParams) WithTimeout(timeout time.Duration) *V1SpectroClustersUIDAssetsGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 spectro clusters Uid assets get params +func (o *V1SpectroClustersUIDAssetsGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 spectro clusters Uid assets get params +func (o *V1SpectroClustersUIDAssetsGetParams) WithContext(ctx context.Context) *V1SpectroClustersUIDAssetsGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 spectro clusters Uid assets get params +func (o *V1SpectroClustersUIDAssetsGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 spectro clusters Uid assets get params +func (o *V1SpectroClustersUIDAssetsGetParams) WithHTTPClient(client *http.Client) *V1SpectroClustersUIDAssetsGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 spectro clusters Uid assets get params +func (o *V1SpectroClustersUIDAssetsGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithUID adds the uid to the v1 spectro clusters Uid assets get params +func (o *V1SpectroClustersUIDAssetsGetParams) WithUID(uid string) *V1SpectroClustersUIDAssetsGetParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 spectro clusters Uid assets get params +func (o *V1SpectroClustersUIDAssetsGetParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1SpectroClustersUIDAssetsGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_uid_assets_get_responses.go b/api/client/v1/v1_spectro_clusters_uid_assets_get_responses.go new file mode 100644 index 00000000..2658277f --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_uid_assets_get_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1SpectroClustersUIDAssetsGetReader is a Reader for the V1SpectroClustersUIDAssetsGet structure. +type V1SpectroClustersUIDAssetsGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1SpectroClustersUIDAssetsGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1SpectroClustersUIDAssetsGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1SpectroClustersUIDAssetsGetOK creates a V1SpectroClustersUIDAssetsGetOK with default headers values +func NewV1SpectroClustersUIDAssetsGetOK() *V1SpectroClustersUIDAssetsGetOK { + return &V1SpectroClustersUIDAssetsGetOK{} +} + +/* +V1SpectroClustersUIDAssetsGetOK handles this case with default header values. + +OK +*/ +type V1SpectroClustersUIDAssetsGetOK struct { + Payload *models.V1SpectroClusterAssetEntity +} + +func (o *V1SpectroClustersUIDAssetsGetOK) Error() string { + return fmt.Sprintf("[GET /v1/spectroclusters/{uid}/assets][%d] v1SpectroClustersUidAssetsGetOK %+v", 200, o.Payload) +} + +func (o *V1SpectroClustersUIDAssetsGetOK) GetPayload() *models.V1SpectroClusterAssetEntity { + return o.Payload +} + +func (o *V1SpectroClustersUIDAssetsGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1SpectroClusterAssetEntity) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_uid_assets_parameters.go b/api/client/v1/v1_spectro_clusters_uid_assets_parameters.go new file mode 100644 index 00000000..84deb70d --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_uid_assets_parameters.go @@ -0,0 +1,154 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1SpectroClustersUIDAssetsParams creates a new V1SpectroClustersUIDAssetsParams object +// with the default values initialized. +func NewV1SpectroClustersUIDAssetsParams() *V1SpectroClustersUIDAssetsParams { + var () + return &V1SpectroClustersUIDAssetsParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1SpectroClustersUIDAssetsParamsWithTimeout creates a new V1SpectroClustersUIDAssetsParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1SpectroClustersUIDAssetsParamsWithTimeout(timeout time.Duration) *V1SpectroClustersUIDAssetsParams { + var () + return &V1SpectroClustersUIDAssetsParams{ + + timeout: timeout, + } +} + +// NewV1SpectroClustersUIDAssetsParamsWithContext creates a new V1SpectroClustersUIDAssetsParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1SpectroClustersUIDAssetsParamsWithContext(ctx context.Context) *V1SpectroClustersUIDAssetsParams { + var () + return &V1SpectroClustersUIDAssetsParams{ + + Context: ctx, + } +} + +// NewV1SpectroClustersUIDAssetsParamsWithHTTPClient creates a new V1SpectroClustersUIDAssetsParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1SpectroClustersUIDAssetsParamsWithHTTPClient(client *http.Client) *V1SpectroClustersUIDAssetsParams { + var () + return &V1SpectroClustersUIDAssetsParams{ + HTTPClient: client, + } +} + +/* +V1SpectroClustersUIDAssetsParams contains all the parameters to send to the API endpoint +for the v1 spectro clusters Uid assets operation typically these are written to a http.Request +*/ +type V1SpectroClustersUIDAssetsParams struct { + + /*Body*/ + Body *models.V1SpectroClusterAssetEntity + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 spectro clusters Uid assets params +func (o *V1SpectroClustersUIDAssetsParams) WithTimeout(timeout time.Duration) *V1SpectroClustersUIDAssetsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 spectro clusters Uid assets params +func (o *V1SpectroClustersUIDAssetsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 spectro clusters Uid assets params +func (o *V1SpectroClustersUIDAssetsParams) WithContext(ctx context.Context) *V1SpectroClustersUIDAssetsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 spectro clusters Uid assets params +func (o *V1SpectroClustersUIDAssetsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 spectro clusters Uid assets params +func (o *V1SpectroClustersUIDAssetsParams) WithHTTPClient(client *http.Client) *V1SpectroClustersUIDAssetsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 spectro clusters Uid assets params +func (o *V1SpectroClustersUIDAssetsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 spectro clusters Uid assets params +func (o *V1SpectroClustersUIDAssetsParams) WithBody(body *models.V1SpectroClusterAssetEntity) *V1SpectroClustersUIDAssetsParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 spectro clusters Uid assets params +func (o *V1SpectroClustersUIDAssetsParams) SetBody(body *models.V1SpectroClusterAssetEntity) { + o.Body = body +} + +// WithUID adds the uid to the v1 spectro clusters Uid assets params +func (o *V1SpectroClustersUIDAssetsParams) WithUID(uid string) *V1SpectroClustersUIDAssetsParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 spectro clusters Uid assets params +func (o *V1SpectroClustersUIDAssetsParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1SpectroClustersUIDAssetsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_uid_assets_responses.go b/api/client/v1/v1_spectro_clusters_uid_assets_responses.go new file mode 100644 index 00000000..790c6a7e --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_uid_assets_responses.go @@ -0,0 +1,61 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1SpectroClustersUIDAssetsReader is a Reader for the V1SpectroClustersUIDAssets structure. +type V1SpectroClustersUIDAssetsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1SpectroClustersUIDAssetsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1SpectroClustersUIDAssetsNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1SpectroClustersUIDAssetsNoContent creates a V1SpectroClustersUIDAssetsNoContent with default headers values +func NewV1SpectroClustersUIDAssetsNoContent() *V1SpectroClustersUIDAssetsNoContent { + return &V1SpectroClustersUIDAssetsNoContent{} +} + +/* +V1SpectroClustersUIDAssetsNoContent handles this case with default header values. + +Ok response without content +*/ +type V1SpectroClustersUIDAssetsNoContent struct { + /*Audit uid for the request + */ + AuditUID string +} + +func (o *V1SpectroClustersUIDAssetsNoContent) Error() string { + return fmt.Sprintf("[POST /v1/spectroclusters/{uid}/assets][%d] v1SpectroClustersUidAssetsNoContent ", 204) +} + +func (o *V1SpectroClustersUIDAssetsNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header AuditUid + o.AuditUID = response.GetHeader("AuditUid") + + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_uid_cluster_meta_attribute_update_parameters.go b/api/client/v1/v1_spectro_clusters_uid_cluster_meta_attribute_update_parameters.go new file mode 100644 index 00000000..4b2ebc69 --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_uid_cluster_meta_attribute_update_parameters.go @@ -0,0 +1,157 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1SpectroClustersUIDClusterMetaAttributeUpdateParams creates a new V1SpectroClustersUIDClusterMetaAttributeUpdateParams object +// with the default values initialized. +func NewV1SpectroClustersUIDClusterMetaAttributeUpdateParams() *V1SpectroClustersUIDClusterMetaAttributeUpdateParams { + var () + return &V1SpectroClustersUIDClusterMetaAttributeUpdateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1SpectroClustersUIDClusterMetaAttributeUpdateParamsWithTimeout creates a new V1SpectroClustersUIDClusterMetaAttributeUpdateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1SpectroClustersUIDClusterMetaAttributeUpdateParamsWithTimeout(timeout time.Duration) *V1SpectroClustersUIDClusterMetaAttributeUpdateParams { + var () + return &V1SpectroClustersUIDClusterMetaAttributeUpdateParams{ + + timeout: timeout, + } +} + +// NewV1SpectroClustersUIDClusterMetaAttributeUpdateParamsWithContext creates a new V1SpectroClustersUIDClusterMetaAttributeUpdateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1SpectroClustersUIDClusterMetaAttributeUpdateParamsWithContext(ctx context.Context) *V1SpectroClustersUIDClusterMetaAttributeUpdateParams { + var () + return &V1SpectroClustersUIDClusterMetaAttributeUpdateParams{ + + Context: ctx, + } +} + +// NewV1SpectroClustersUIDClusterMetaAttributeUpdateParamsWithHTTPClient creates a new V1SpectroClustersUIDClusterMetaAttributeUpdateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1SpectroClustersUIDClusterMetaAttributeUpdateParamsWithHTTPClient(client *http.Client) *V1SpectroClustersUIDClusterMetaAttributeUpdateParams { + var () + return &V1SpectroClustersUIDClusterMetaAttributeUpdateParams{ + HTTPClient: client, + } +} + +/* +V1SpectroClustersUIDClusterMetaAttributeUpdateParams contains all the parameters to send to the API endpoint +for the v1 spectro clusters Uid cluster meta attribute update operation typically these are written to a http.Request +*/ +type V1SpectroClustersUIDClusterMetaAttributeUpdateParams struct { + + /*Body*/ + Body *models.V1ClusterMetaAttributeEntity + /*UID + Cluster uid + + */ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 spectro clusters Uid cluster meta attribute update params +func (o *V1SpectroClustersUIDClusterMetaAttributeUpdateParams) WithTimeout(timeout time.Duration) *V1SpectroClustersUIDClusterMetaAttributeUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 spectro clusters Uid cluster meta attribute update params +func (o *V1SpectroClustersUIDClusterMetaAttributeUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 spectro clusters Uid cluster meta attribute update params +func (o *V1SpectroClustersUIDClusterMetaAttributeUpdateParams) WithContext(ctx context.Context) *V1SpectroClustersUIDClusterMetaAttributeUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 spectro clusters Uid cluster meta attribute update params +func (o *V1SpectroClustersUIDClusterMetaAttributeUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 spectro clusters Uid cluster meta attribute update params +func (o *V1SpectroClustersUIDClusterMetaAttributeUpdateParams) WithHTTPClient(client *http.Client) *V1SpectroClustersUIDClusterMetaAttributeUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 spectro clusters Uid cluster meta attribute update params +func (o *V1SpectroClustersUIDClusterMetaAttributeUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 spectro clusters Uid cluster meta attribute update params +func (o *V1SpectroClustersUIDClusterMetaAttributeUpdateParams) WithBody(body *models.V1ClusterMetaAttributeEntity) *V1SpectroClustersUIDClusterMetaAttributeUpdateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 spectro clusters Uid cluster meta attribute update params +func (o *V1SpectroClustersUIDClusterMetaAttributeUpdateParams) SetBody(body *models.V1ClusterMetaAttributeEntity) { + o.Body = body +} + +// WithUID adds the uid to the v1 spectro clusters Uid cluster meta attribute update params +func (o *V1SpectroClustersUIDClusterMetaAttributeUpdateParams) WithUID(uid string) *V1SpectroClustersUIDClusterMetaAttributeUpdateParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 spectro clusters Uid cluster meta attribute update params +func (o *V1SpectroClustersUIDClusterMetaAttributeUpdateParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1SpectroClustersUIDClusterMetaAttributeUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_uid_cluster_meta_attribute_update_responses.go b/api/client/v1/v1_spectro_clusters_uid_cluster_meta_attribute_update_responses.go new file mode 100644 index 00000000..99ac22b2 --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_uid_cluster_meta_attribute_update_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1SpectroClustersUIDClusterMetaAttributeUpdateReader is a Reader for the V1SpectroClustersUIDClusterMetaAttributeUpdate structure. +type V1SpectroClustersUIDClusterMetaAttributeUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1SpectroClustersUIDClusterMetaAttributeUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1SpectroClustersUIDClusterMetaAttributeUpdateNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1SpectroClustersUIDClusterMetaAttributeUpdateNoContent creates a V1SpectroClustersUIDClusterMetaAttributeUpdateNoContent with default headers values +func NewV1SpectroClustersUIDClusterMetaAttributeUpdateNoContent() *V1SpectroClustersUIDClusterMetaAttributeUpdateNoContent { + return &V1SpectroClustersUIDClusterMetaAttributeUpdateNoContent{} +} + +/* +V1SpectroClustersUIDClusterMetaAttributeUpdateNoContent handles this case with default header values. + +The resource was updated successfully +*/ +type V1SpectroClustersUIDClusterMetaAttributeUpdateNoContent struct { +} + +func (o *V1SpectroClustersUIDClusterMetaAttributeUpdateNoContent) Error() string { + return fmt.Sprintf("[PATCH /v1/spectroclusters/{uid}/clusterConfig/clusterMetaAttribute][%d] v1SpectroClustersUidClusterMetaAttributeUpdateNoContent ", 204) +} + +func (o *V1SpectroClustersUIDClusterMetaAttributeUpdateNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_uid_cluster_rbac_update_parameters.go b/api/client/v1/v1_spectro_clusters_uid_cluster_rbac_update_parameters.go new file mode 100644 index 00000000..179b9156 --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_uid_cluster_rbac_update_parameters.go @@ -0,0 +1,157 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1SpectroClustersUIDClusterRbacUpdateParams creates a new V1SpectroClustersUIDClusterRbacUpdateParams object +// with the default values initialized. +func NewV1SpectroClustersUIDClusterRbacUpdateParams() *V1SpectroClustersUIDClusterRbacUpdateParams { + var () + return &V1SpectroClustersUIDClusterRbacUpdateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1SpectroClustersUIDClusterRbacUpdateParamsWithTimeout creates a new V1SpectroClustersUIDClusterRbacUpdateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1SpectroClustersUIDClusterRbacUpdateParamsWithTimeout(timeout time.Duration) *V1SpectroClustersUIDClusterRbacUpdateParams { + var () + return &V1SpectroClustersUIDClusterRbacUpdateParams{ + + timeout: timeout, + } +} + +// NewV1SpectroClustersUIDClusterRbacUpdateParamsWithContext creates a new V1SpectroClustersUIDClusterRbacUpdateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1SpectroClustersUIDClusterRbacUpdateParamsWithContext(ctx context.Context) *V1SpectroClustersUIDClusterRbacUpdateParams { + var () + return &V1SpectroClustersUIDClusterRbacUpdateParams{ + + Context: ctx, + } +} + +// NewV1SpectroClustersUIDClusterRbacUpdateParamsWithHTTPClient creates a new V1SpectroClustersUIDClusterRbacUpdateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1SpectroClustersUIDClusterRbacUpdateParamsWithHTTPClient(client *http.Client) *V1SpectroClustersUIDClusterRbacUpdateParams { + var () + return &V1SpectroClustersUIDClusterRbacUpdateParams{ + HTTPClient: client, + } +} + +/* +V1SpectroClustersUIDClusterRbacUpdateParams contains all the parameters to send to the API endpoint +for the v1 spectro clusters Uid cluster rbac update operation typically these are written to a http.Request +*/ +type V1SpectroClustersUIDClusterRbacUpdateParams struct { + + /*Body*/ + Body *models.V1ClusterRbacEntity + /*UID + Cluster uid + + */ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 spectro clusters Uid cluster rbac update params +func (o *V1SpectroClustersUIDClusterRbacUpdateParams) WithTimeout(timeout time.Duration) *V1SpectroClustersUIDClusterRbacUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 spectro clusters Uid cluster rbac update params +func (o *V1SpectroClustersUIDClusterRbacUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 spectro clusters Uid cluster rbac update params +func (o *V1SpectroClustersUIDClusterRbacUpdateParams) WithContext(ctx context.Context) *V1SpectroClustersUIDClusterRbacUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 spectro clusters Uid cluster rbac update params +func (o *V1SpectroClustersUIDClusterRbacUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 spectro clusters Uid cluster rbac update params +func (o *V1SpectroClustersUIDClusterRbacUpdateParams) WithHTTPClient(client *http.Client) *V1SpectroClustersUIDClusterRbacUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 spectro clusters Uid cluster rbac update params +func (o *V1SpectroClustersUIDClusterRbacUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 spectro clusters Uid cluster rbac update params +func (o *V1SpectroClustersUIDClusterRbacUpdateParams) WithBody(body *models.V1ClusterRbacEntity) *V1SpectroClustersUIDClusterRbacUpdateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 spectro clusters Uid cluster rbac update params +func (o *V1SpectroClustersUIDClusterRbacUpdateParams) SetBody(body *models.V1ClusterRbacEntity) { + o.Body = body +} + +// WithUID adds the uid to the v1 spectro clusters Uid cluster rbac update params +func (o *V1SpectroClustersUIDClusterRbacUpdateParams) WithUID(uid string) *V1SpectroClustersUIDClusterRbacUpdateParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 spectro clusters Uid cluster rbac update params +func (o *V1SpectroClustersUIDClusterRbacUpdateParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1SpectroClustersUIDClusterRbacUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_uid_cluster_rbac_update_responses.go b/api/client/v1/v1_spectro_clusters_uid_cluster_rbac_update_responses.go new file mode 100644 index 00000000..6b8ea115 --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_uid_cluster_rbac_update_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1SpectroClustersUIDClusterRbacUpdateReader is a Reader for the V1SpectroClustersUIDClusterRbacUpdate structure. +type V1SpectroClustersUIDClusterRbacUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1SpectroClustersUIDClusterRbacUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1SpectroClustersUIDClusterRbacUpdateNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1SpectroClustersUIDClusterRbacUpdateNoContent creates a V1SpectroClustersUIDClusterRbacUpdateNoContent with default headers values +func NewV1SpectroClustersUIDClusterRbacUpdateNoContent() *V1SpectroClustersUIDClusterRbacUpdateNoContent { + return &V1SpectroClustersUIDClusterRbacUpdateNoContent{} +} + +/* +V1SpectroClustersUIDClusterRbacUpdateNoContent handles this case with default header values. + +The resource was updated successfully +*/ +type V1SpectroClustersUIDClusterRbacUpdateNoContent struct { +} + +func (o *V1SpectroClustersUIDClusterRbacUpdateNoContent) Error() string { + return fmt.Sprintf("[PATCH /v1/spectroclusters/{uid}/clusterConfig/clusterRbac][%d] v1SpectroClustersUidClusterRbacUpdateNoContent ", 204) +} + +func (o *V1SpectroClustersUIDClusterRbacUpdateNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_uid_config_namespaces_get_parameters.go b/api/client/v1/v1_spectro_clusters_uid_config_namespaces_get_parameters.go new file mode 100644 index 00000000..7936c01b --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_uid_config_namespaces_get_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1SpectroClustersUIDConfigNamespacesGetParams creates a new V1SpectroClustersUIDConfigNamespacesGetParams object +// with the default values initialized. +func NewV1SpectroClustersUIDConfigNamespacesGetParams() *V1SpectroClustersUIDConfigNamespacesGetParams { + var () + return &V1SpectroClustersUIDConfigNamespacesGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1SpectroClustersUIDConfigNamespacesGetParamsWithTimeout creates a new V1SpectroClustersUIDConfigNamespacesGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1SpectroClustersUIDConfigNamespacesGetParamsWithTimeout(timeout time.Duration) *V1SpectroClustersUIDConfigNamespacesGetParams { + var () + return &V1SpectroClustersUIDConfigNamespacesGetParams{ + + timeout: timeout, + } +} + +// NewV1SpectroClustersUIDConfigNamespacesGetParamsWithContext creates a new V1SpectroClustersUIDConfigNamespacesGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1SpectroClustersUIDConfigNamespacesGetParamsWithContext(ctx context.Context) *V1SpectroClustersUIDConfigNamespacesGetParams { + var () + return &V1SpectroClustersUIDConfigNamespacesGetParams{ + + Context: ctx, + } +} + +// NewV1SpectroClustersUIDConfigNamespacesGetParamsWithHTTPClient creates a new V1SpectroClustersUIDConfigNamespacesGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1SpectroClustersUIDConfigNamespacesGetParamsWithHTTPClient(client *http.Client) *V1SpectroClustersUIDConfigNamespacesGetParams { + var () + return &V1SpectroClustersUIDConfigNamespacesGetParams{ + HTTPClient: client, + } +} + +/* +V1SpectroClustersUIDConfigNamespacesGetParams contains all the parameters to send to the API endpoint +for the v1 spectro clusters Uid config namespaces get operation typically these are written to a http.Request +*/ +type V1SpectroClustersUIDConfigNamespacesGetParams struct { + + /*UID + Cluster uid + + */ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 spectro clusters Uid config namespaces get params +func (o *V1SpectroClustersUIDConfigNamespacesGetParams) WithTimeout(timeout time.Duration) *V1SpectroClustersUIDConfigNamespacesGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 spectro clusters Uid config namespaces get params +func (o *V1SpectroClustersUIDConfigNamespacesGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 spectro clusters Uid config namespaces get params +func (o *V1SpectroClustersUIDConfigNamespacesGetParams) WithContext(ctx context.Context) *V1SpectroClustersUIDConfigNamespacesGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 spectro clusters Uid config namespaces get params +func (o *V1SpectroClustersUIDConfigNamespacesGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 spectro clusters Uid config namespaces get params +func (o *V1SpectroClustersUIDConfigNamespacesGetParams) WithHTTPClient(client *http.Client) *V1SpectroClustersUIDConfigNamespacesGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 spectro clusters Uid config namespaces get params +func (o *V1SpectroClustersUIDConfigNamespacesGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithUID adds the uid to the v1 spectro clusters Uid config namespaces get params +func (o *V1SpectroClustersUIDConfigNamespacesGetParams) WithUID(uid string) *V1SpectroClustersUIDConfigNamespacesGetParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 spectro clusters Uid config namespaces get params +func (o *V1SpectroClustersUIDConfigNamespacesGetParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1SpectroClustersUIDConfigNamespacesGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_uid_config_namespaces_get_responses.go b/api/client/v1/v1_spectro_clusters_uid_config_namespaces_get_responses.go new file mode 100644 index 00000000..5f156089 --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_uid_config_namespaces_get_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1SpectroClustersUIDConfigNamespacesGetReader is a Reader for the V1SpectroClustersUIDConfigNamespacesGet structure. +type V1SpectroClustersUIDConfigNamespacesGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1SpectroClustersUIDConfigNamespacesGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1SpectroClustersUIDConfigNamespacesGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1SpectroClustersUIDConfigNamespacesGetOK creates a V1SpectroClustersUIDConfigNamespacesGetOK with default headers values +func NewV1SpectroClustersUIDConfigNamespacesGetOK() *V1SpectroClustersUIDConfigNamespacesGetOK { + return &V1SpectroClustersUIDConfigNamespacesGetOK{} +} + +/* +V1SpectroClustersUIDConfigNamespacesGetOK handles this case with default header values. + +OK +*/ +type V1SpectroClustersUIDConfigNamespacesGetOK struct { + Payload *models.V1ClusterNamespaceResources +} + +func (o *V1SpectroClustersUIDConfigNamespacesGetOK) Error() string { + return fmt.Sprintf("[GET /v1/spectroclusters/{uid}/config/namespaces][%d] v1SpectroClustersUidConfigNamespacesGetOK %+v", 200, o.Payload) +} + +func (o *V1SpectroClustersUIDConfigNamespacesGetOK) GetPayload() *models.V1ClusterNamespaceResources { + return o.Payload +} + +func (o *V1SpectroClustersUIDConfigNamespacesGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1ClusterNamespaceResources) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_uid_config_namespaces_uid_get_parameters.go b/api/client/v1/v1_spectro_clusters_uid_config_namespaces_uid_get_parameters.go new file mode 100644 index 00000000..acd4f35f --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_uid_config_namespaces_uid_get_parameters.go @@ -0,0 +1,157 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1SpectroClustersUIDConfigNamespacesUIDGetParams creates a new V1SpectroClustersUIDConfigNamespacesUIDGetParams object +// with the default values initialized. +func NewV1SpectroClustersUIDConfigNamespacesUIDGetParams() *V1SpectroClustersUIDConfigNamespacesUIDGetParams { + var () + return &V1SpectroClustersUIDConfigNamespacesUIDGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1SpectroClustersUIDConfigNamespacesUIDGetParamsWithTimeout creates a new V1SpectroClustersUIDConfigNamespacesUIDGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1SpectroClustersUIDConfigNamespacesUIDGetParamsWithTimeout(timeout time.Duration) *V1SpectroClustersUIDConfigNamespacesUIDGetParams { + var () + return &V1SpectroClustersUIDConfigNamespacesUIDGetParams{ + + timeout: timeout, + } +} + +// NewV1SpectroClustersUIDConfigNamespacesUIDGetParamsWithContext creates a new V1SpectroClustersUIDConfigNamespacesUIDGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1SpectroClustersUIDConfigNamespacesUIDGetParamsWithContext(ctx context.Context) *V1SpectroClustersUIDConfigNamespacesUIDGetParams { + var () + return &V1SpectroClustersUIDConfigNamespacesUIDGetParams{ + + Context: ctx, + } +} + +// NewV1SpectroClustersUIDConfigNamespacesUIDGetParamsWithHTTPClient creates a new V1SpectroClustersUIDConfigNamespacesUIDGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1SpectroClustersUIDConfigNamespacesUIDGetParamsWithHTTPClient(client *http.Client) *V1SpectroClustersUIDConfigNamespacesUIDGetParams { + var () + return &V1SpectroClustersUIDConfigNamespacesUIDGetParams{ + HTTPClient: client, + } +} + +/* +V1SpectroClustersUIDConfigNamespacesUIDGetParams contains all the parameters to send to the API endpoint +for the v1 spectro clusters Uid config namespaces Uid get operation typically these are written to a http.Request +*/ +type V1SpectroClustersUIDConfigNamespacesUIDGetParams struct { + + /*NamespaceUID + Cluster namespace uid + + */ + NamespaceUID string + /*UID + Cluster uid + + */ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 spectro clusters Uid config namespaces Uid get params +func (o *V1SpectroClustersUIDConfigNamespacesUIDGetParams) WithTimeout(timeout time.Duration) *V1SpectroClustersUIDConfigNamespacesUIDGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 spectro clusters Uid config namespaces Uid get params +func (o *V1SpectroClustersUIDConfigNamespacesUIDGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 spectro clusters Uid config namespaces Uid get params +func (o *V1SpectroClustersUIDConfigNamespacesUIDGetParams) WithContext(ctx context.Context) *V1SpectroClustersUIDConfigNamespacesUIDGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 spectro clusters Uid config namespaces Uid get params +func (o *V1SpectroClustersUIDConfigNamespacesUIDGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 spectro clusters Uid config namespaces Uid get params +func (o *V1SpectroClustersUIDConfigNamespacesUIDGetParams) WithHTTPClient(client *http.Client) *V1SpectroClustersUIDConfigNamespacesUIDGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 spectro clusters Uid config namespaces Uid get params +func (o *V1SpectroClustersUIDConfigNamespacesUIDGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithNamespaceUID adds the namespaceUID to the v1 spectro clusters Uid config namespaces Uid get params +func (o *V1SpectroClustersUIDConfigNamespacesUIDGetParams) WithNamespaceUID(namespaceUID string) *V1SpectroClustersUIDConfigNamespacesUIDGetParams { + o.SetNamespaceUID(namespaceUID) + return o +} + +// SetNamespaceUID adds the namespaceUid to the v1 spectro clusters Uid config namespaces Uid get params +func (o *V1SpectroClustersUIDConfigNamespacesUIDGetParams) SetNamespaceUID(namespaceUID string) { + o.NamespaceUID = namespaceUID +} + +// WithUID adds the uid to the v1 spectro clusters Uid config namespaces Uid get params +func (o *V1SpectroClustersUIDConfigNamespacesUIDGetParams) WithUID(uid string) *V1SpectroClustersUIDConfigNamespacesUIDGetParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 spectro clusters Uid config namespaces Uid get params +func (o *V1SpectroClustersUIDConfigNamespacesUIDGetParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1SpectroClustersUIDConfigNamespacesUIDGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param namespaceUid + if err := r.SetPathParam("namespaceUid", o.NamespaceUID); err != nil { + return err + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_uid_config_namespaces_uid_get_responses.go b/api/client/v1/v1_spectro_clusters_uid_config_namespaces_uid_get_responses.go new file mode 100644 index 00000000..3d91aa88 --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_uid_config_namespaces_uid_get_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1SpectroClustersUIDConfigNamespacesUIDGetReader is a Reader for the V1SpectroClustersUIDConfigNamespacesUIDGet structure. +type V1SpectroClustersUIDConfigNamespacesUIDGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1SpectroClustersUIDConfigNamespacesUIDGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1SpectroClustersUIDConfigNamespacesUIDGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1SpectroClustersUIDConfigNamespacesUIDGetOK creates a V1SpectroClustersUIDConfigNamespacesUIDGetOK with default headers values +func NewV1SpectroClustersUIDConfigNamespacesUIDGetOK() *V1SpectroClustersUIDConfigNamespacesUIDGetOK { + return &V1SpectroClustersUIDConfigNamespacesUIDGetOK{} +} + +/* +V1SpectroClustersUIDConfigNamespacesUIDGetOK handles this case with default header values. + +Cluster's namespace response +*/ +type V1SpectroClustersUIDConfigNamespacesUIDGetOK struct { + Payload *models.V1ClusterNamespaceResource +} + +func (o *V1SpectroClustersUIDConfigNamespacesUIDGetOK) Error() string { + return fmt.Sprintf("[GET /v1/spectroclusters/{uid}/config/namespaces/{namespaceUid}][%d] v1SpectroClustersUidConfigNamespacesUidGetOK %+v", 200, o.Payload) +} + +func (o *V1SpectroClustersUIDConfigNamespacesUIDGetOK) GetPayload() *models.V1ClusterNamespaceResource { + return o.Payload +} + +func (o *V1SpectroClustersUIDConfigNamespacesUIDGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1ClusterNamespaceResource) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_uid_config_namespaces_uid_update_parameters.go b/api/client/v1/v1_spectro_clusters_uid_config_namespaces_uid_update_parameters.go new file mode 100644 index 00000000..4dfef81f --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_uid_config_namespaces_uid_update_parameters.go @@ -0,0 +1,178 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1SpectroClustersUIDConfigNamespacesUIDUpdateParams creates a new V1SpectroClustersUIDConfigNamespacesUIDUpdateParams object +// with the default values initialized. +func NewV1SpectroClustersUIDConfigNamespacesUIDUpdateParams() *V1SpectroClustersUIDConfigNamespacesUIDUpdateParams { + var () + return &V1SpectroClustersUIDConfigNamespacesUIDUpdateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1SpectroClustersUIDConfigNamespacesUIDUpdateParamsWithTimeout creates a new V1SpectroClustersUIDConfigNamespacesUIDUpdateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1SpectroClustersUIDConfigNamespacesUIDUpdateParamsWithTimeout(timeout time.Duration) *V1SpectroClustersUIDConfigNamespacesUIDUpdateParams { + var () + return &V1SpectroClustersUIDConfigNamespacesUIDUpdateParams{ + + timeout: timeout, + } +} + +// NewV1SpectroClustersUIDConfigNamespacesUIDUpdateParamsWithContext creates a new V1SpectroClustersUIDConfigNamespacesUIDUpdateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1SpectroClustersUIDConfigNamespacesUIDUpdateParamsWithContext(ctx context.Context) *V1SpectroClustersUIDConfigNamespacesUIDUpdateParams { + var () + return &V1SpectroClustersUIDConfigNamespacesUIDUpdateParams{ + + Context: ctx, + } +} + +// NewV1SpectroClustersUIDConfigNamespacesUIDUpdateParamsWithHTTPClient creates a new V1SpectroClustersUIDConfigNamespacesUIDUpdateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1SpectroClustersUIDConfigNamespacesUIDUpdateParamsWithHTTPClient(client *http.Client) *V1SpectroClustersUIDConfigNamespacesUIDUpdateParams { + var () + return &V1SpectroClustersUIDConfigNamespacesUIDUpdateParams{ + HTTPClient: client, + } +} + +/* +V1SpectroClustersUIDConfigNamespacesUIDUpdateParams contains all the parameters to send to the API endpoint +for the v1 spectro clusters Uid config namespaces Uid update operation typically these are written to a http.Request +*/ +type V1SpectroClustersUIDConfigNamespacesUIDUpdateParams struct { + + /*Body*/ + Body *models.V1ClusterNamespaceResourceInputEntity + /*NamespaceUID + Cluster namespace uid + + */ + NamespaceUID string + /*UID + Cluster uid + + */ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 spectro clusters Uid config namespaces Uid update params +func (o *V1SpectroClustersUIDConfigNamespacesUIDUpdateParams) WithTimeout(timeout time.Duration) *V1SpectroClustersUIDConfigNamespacesUIDUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 spectro clusters Uid config namespaces Uid update params +func (o *V1SpectroClustersUIDConfigNamespacesUIDUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 spectro clusters Uid config namespaces Uid update params +func (o *V1SpectroClustersUIDConfigNamespacesUIDUpdateParams) WithContext(ctx context.Context) *V1SpectroClustersUIDConfigNamespacesUIDUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 spectro clusters Uid config namespaces Uid update params +func (o *V1SpectroClustersUIDConfigNamespacesUIDUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 spectro clusters Uid config namespaces Uid update params +func (o *V1SpectroClustersUIDConfigNamespacesUIDUpdateParams) WithHTTPClient(client *http.Client) *V1SpectroClustersUIDConfigNamespacesUIDUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 spectro clusters Uid config namespaces Uid update params +func (o *V1SpectroClustersUIDConfigNamespacesUIDUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 spectro clusters Uid config namespaces Uid update params +func (o *V1SpectroClustersUIDConfigNamespacesUIDUpdateParams) WithBody(body *models.V1ClusterNamespaceResourceInputEntity) *V1SpectroClustersUIDConfigNamespacesUIDUpdateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 spectro clusters Uid config namespaces Uid update params +func (o *V1SpectroClustersUIDConfigNamespacesUIDUpdateParams) SetBody(body *models.V1ClusterNamespaceResourceInputEntity) { + o.Body = body +} + +// WithNamespaceUID adds the namespaceUID to the v1 spectro clusters Uid config namespaces Uid update params +func (o *V1SpectroClustersUIDConfigNamespacesUIDUpdateParams) WithNamespaceUID(namespaceUID string) *V1SpectroClustersUIDConfigNamespacesUIDUpdateParams { + o.SetNamespaceUID(namespaceUID) + return o +} + +// SetNamespaceUID adds the namespaceUid to the v1 spectro clusters Uid config namespaces Uid update params +func (o *V1SpectroClustersUIDConfigNamespacesUIDUpdateParams) SetNamespaceUID(namespaceUID string) { + o.NamespaceUID = namespaceUID +} + +// WithUID adds the uid to the v1 spectro clusters Uid config namespaces Uid update params +func (o *V1SpectroClustersUIDConfigNamespacesUIDUpdateParams) WithUID(uid string) *V1SpectroClustersUIDConfigNamespacesUIDUpdateParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 spectro clusters Uid config namespaces Uid update params +func (o *V1SpectroClustersUIDConfigNamespacesUIDUpdateParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1SpectroClustersUIDConfigNamespacesUIDUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param namespaceUid + if err := r.SetPathParam("namespaceUid", o.NamespaceUID); err != nil { + return err + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_uid_config_namespaces_uid_update_responses.go b/api/client/v1/v1_spectro_clusters_uid_config_namespaces_uid_update_responses.go new file mode 100644 index 00000000..46830d14 --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_uid_config_namespaces_uid_update_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1SpectroClustersUIDConfigNamespacesUIDUpdateReader is a Reader for the V1SpectroClustersUIDConfigNamespacesUIDUpdate structure. +type V1SpectroClustersUIDConfigNamespacesUIDUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1SpectroClustersUIDConfigNamespacesUIDUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1SpectroClustersUIDConfigNamespacesUIDUpdateNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1SpectroClustersUIDConfigNamespacesUIDUpdateNoContent creates a V1SpectroClustersUIDConfigNamespacesUIDUpdateNoContent with default headers values +func NewV1SpectroClustersUIDConfigNamespacesUIDUpdateNoContent() *V1SpectroClustersUIDConfigNamespacesUIDUpdateNoContent { + return &V1SpectroClustersUIDConfigNamespacesUIDUpdateNoContent{} +} + +/* +V1SpectroClustersUIDConfigNamespacesUIDUpdateNoContent handles this case with default header values. + +The resource was updated successfully +*/ +type V1SpectroClustersUIDConfigNamespacesUIDUpdateNoContent struct { +} + +func (o *V1SpectroClustersUIDConfigNamespacesUIDUpdateNoContent) Error() string { + return fmt.Sprintf("[PUT /v1/spectroclusters/{uid}/config/namespaces/{namespaceUid}][%d] v1SpectroClustersUidConfigNamespacesUidUpdateNoContent ", 204) +} + +func (o *V1SpectroClustersUIDConfigNamespacesUIDUpdateNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_uid_config_namespaces_update_parameters.go b/api/client/v1/v1_spectro_clusters_uid_config_namespaces_update_parameters.go new file mode 100644 index 00000000..29a2416e --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_uid_config_namespaces_update_parameters.go @@ -0,0 +1,157 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1SpectroClustersUIDConfigNamespacesUpdateParams creates a new V1SpectroClustersUIDConfigNamespacesUpdateParams object +// with the default values initialized. +func NewV1SpectroClustersUIDConfigNamespacesUpdateParams() *V1SpectroClustersUIDConfigNamespacesUpdateParams { + var () + return &V1SpectroClustersUIDConfigNamespacesUpdateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1SpectroClustersUIDConfigNamespacesUpdateParamsWithTimeout creates a new V1SpectroClustersUIDConfigNamespacesUpdateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1SpectroClustersUIDConfigNamespacesUpdateParamsWithTimeout(timeout time.Duration) *V1SpectroClustersUIDConfigNamespacesUpdateParams { + var () + return &V1SpectroClustersUIDConfigNamespacesUpdateParams{ + + timeout: timeout, + } +} + +// NewV1SpectroClustersUIDConfigNamespacesUpdateParamsWithContext creates a new V1SpectroClustersUIDConfigNamespacesUpdateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1SpectroClustersUIDConfigNamespacesUpdateParamsWithContext(ctx context.Context) *V1SpectroClustersUIDConfigNamespacesUpdateParams { + var () + return &V1SpectroClustersUIDConfigNamespacesUpdateParams{ + + Context: ctx, + } +} + +// NewV1SpectroClustersUIDConfigNamespacesUpdateParamsWithHTTPClient creates a new V1SpectroClustersUIDConfigNamespacesUpdateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1SpectroClustersUIDConfigNamespacesUpdateParamsWithHTTPClient(client *http.Client) *V1SpectroClustersUIDConfigNamespacesUpdateParams { + var () + return &V1SpectroClustersUIDConfigNamespacesUpdateParams{ + HTTPClient: client, + } +} + +/* +V1SpectroClustersUIDConfigNamespacesUpdateParams contains all the parameters to send to the API endpoint +for the v1 spectro clusters Uid config namespaces update operation typically these are written to a http.Request +*/ +type V1SpectroClustersUIDConfigNamespacesUpdateParams struct { + + /*Body*/ + Body *models.V1ClusterNamespaceResourcesUpdateEntity + /*UID + Cluster uid + + */ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 spectro clusters Uid config namespaces update params +func (o *V1SpectroClustersUIDConfigNamespacesUpdateParams) WithTimeout(timeout time.Duration) *V1SpectroClustersUIDConfigNamespacesUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 spectro clusters Uid config namespaces update params +func (o *V1SpectroClustersUIDConfigNamespacesUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 spectro clusters Uid config namespaces update params +func (o *V1SpectroClustersUIDConfigNamespacesUpdateParams) WithContext(ctx context.Context) *V1SpectroClustersUIDConfigNamespacesUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 spectro clusters Uid config namespaces update params +func (o *V1SpectroClustersUIDConfigNamespacesUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 spectro clusters Uid config namespaces update params +func (o *V1SpectroClustersUIDConfigNamespacesUpdateParams) WithHTTPClient(client *http.Client) *V1SpectroClustersUIDConfigNamespacesUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 spectro clusters Uid config namespaces update params +func (o *V1SpectroClustersUIDConfigNamespacesUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 spectro clusters Uid config namespaces update params +func (o *V1SpectroClustersUIDConfigNamespacesUpdateParams) WithBody(body *models.V1ClusterNamespaceResourcesUpdateEntity) *V1SpectroClustersUIDConfigNamespacesUpdateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 spectro clusters Uid config namespaces update params +func (o *V1SpectroClustersUIDConfigNamespacesUpdateParams) SetBody(body *models.V1ClusterNamespaceResourcesUpdateEntity) { + o.Body = body +} + +// WithUID adds the uid to the v1 spectro clusters Uid config namespaces update params +func (o *V1SpectroClustersUIDConfigNamespacesUpdateParams) WithUID(uid string) *V1SpectroClustersUIDConfigNamespacesUpdateParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 spectro clusters Uid config namespaces update params +func (o *V1SpectroClustersUIDConfigNamespacesUpdateParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1SpectroClustersUIDConfigNamespacesUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_uid_config_namespaces_update_responses.go b/api/client/v1/v1_spectro_clusters_uid_config_namespaces_update_responses.go new file mode 100644 index 00000000..dd83568c --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_uid_config_namespaces_update_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1SpectroClustersUIDConfigNamespacesUpdateReader is a Reader for the V1SpectroClustersUIDConfigNamespacesUpdate structure. +type V1SpectroClustersUIDConfigNamespacesUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1SpectroClustersUIDConfigNamespacesUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1SpectroClustersUIDConfigNamespacesUpdateNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1SpectroClustersUIDConfigNamespacesUpdateNoContent creates a V1SpectroClustersUIDConfigNamespacesUpdateNoContent with default headers values +func NewV1SpectroClustersUIDConfigNamespacesUpdateNoContent() *V1SpectroClustersUIDConfigNamespacesUpdateNoContent { + return &V1SpectroClustersUIDConfigNamespacesUpdateNoContent{} +} + +/* +V1SpectroClustersUIDConfigNamespacesUpdateNoContent handles this case with default header values. + +The resource was updated successfully +*/ +type V1SpectroClustersUIDConfigNamespacesUpdateNoContent struct { +} + +func (o *V1SpectroClustersUIDConfigNamespacesUpdateNoContent) Error() string { + return fmt.Sprintf("[PUT /v1/spectroclusters/{uid}/config/namespaces][%d] v1SpectroClustersUidConfigNamespacesUpdateNoContent ", 204) +} + +func (o *V1SpectroClustersUIDConfigNamespacesUpdateNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_uid_config_rbacs_get_parameters.go b/api/client/v1/v1_spectro_clusters_uid_config_rbacs_get_parameters.go new file mode 100644 index 00000000..bb48eac1 --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_uid_config_rbacs_get_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1SpectroClustersUIDConfigRbacsGetParams creates a new V1SpectroClustersUIDConfigRbacsGetParams object +// with the default values initialized. +func NewV1SpectroClustersUIDConfigRbacsGetParams() *V1SpectroClustersUIDConfigRbacsGetParams { + var () + return &V1SpectroClustersUIDConfigRbacsGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1SpectroClustersUIDConfigRbacsGetParamsWithTimeout creates a new V1SpectroClustersUIDConfigRbacsGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1SpectroClustersUIDConfigRbacsGetParamsWithTimeout(timeout time.Duration) *V1SpectroClustersUIDConfigRbacsGetParams { + var () + return &V1SpectroClustersUIDConfigRbacsGetParams{ + + timeout: timeout, + } +} + +// NewV1SpectroClustersUIDConfigRbacsGetParamsWithContext creates a new V1SpectroClustersUIDConfigRbacsGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1SpectroClustersUIDConfigRbacsGetParamsWithContext(ctx context.Context) *V1SpectroClustersUIDConfigRbacsGetParams { + var () + return &V1SpectroClustersUIDConfigRbacsGetParams{ + + Context: ctx, + } +} + +// NewV1SpectroClustersUIDConfigRbacsGetParamsWithHTTPClient creates a new V1SpectroClustersUIDConfigRbacsGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1SpectroClustersUIDConfigRbacsGetParamsWithHTTPClient(client *http.Client) *V1SpectroClustersUIDConfigRbacsGetParams { + var () + return &V1SpectroClustersUIDConfigRbacsGetParams{ + HTTPClient: client, + } +} + +/* +V1SpectroClustersUIDConfigRbacsGetParams contains all the parameters to send to the API endpoint +for the v1 spectro clusters Uid config rbacs get operation typically these are written to a http.Request +*/ +type V1SpectroClustersUIDConfigRbacsGetParams struct { + + /*UID + Cluster uid + + */ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 spectro clusters Uid config rbacs get params +func (o *V1SpectroClustersUIDConfigRbacsGetParams) WithTimeout(timeout time.Duration) *V1SpectroClustersUIDConfigRbacsGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 spectro clusters Uid config rbacs get params +func (o *V1SpectroClustersUIDConfigRbacsGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 spectro clusters Uid config rbacs get params +func (o *V1SpectroClustersUIDConfigRbacsGetParams) WithContext(ctx context.Context) *V1SpectroClustersUIDConfigRbacsGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 spectro clusters Uid config rbacs get params +func (o *V1SpectroClustersUIDConfigRbacsGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 spectro clusters Uid config rbacs get params +func (o *V1SpectroClustersUIDConfigRbacsGetParams) WithHTTPClient(client *http.Client) *V1SpectroClustersUIDConfigRbacsGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 spectro clusters Uid config rbacs get params +func (o *V1SpectroClustersUIDConfigRbacsGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithUID adds the uid to the v1 spectro clusters Uid config rbacs get params +func (o *V1SpectroClustersUIDConfigRbacsGetParams) WithUID(uid string) *V1SpectroClustersUIDConfigRbacsGetParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 spectro clusters Uid config rbacs get params +func (o *V1SpectroClustersUIDConfigRbacsGetParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1SpectroClustersUIDConfigRbacsGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_uid_config_rbacs_get_responses.go b/api/client/v1/v1_spectro_clusters_uid_config_rbacs_get_responses.go new file mode 100644 index 00000000..5810fc42 --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_uid_config_rbacs_get_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1SpectroClustersUIDConfigRbacsGetReader is a Reader for the V1SpectroClustersUIDConfigRbacsGet structure. +type V1SpectroClustersUIDConfigRbacsGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1SpectroClustersUIDConfigRbacsGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1SpectroClustersUIDConfigRbacsGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1SpectroClustersUIDConfigRbacsGetOK creates a V1SpectroClustersUIDConfigRbacsGetOK with default headers values +func NewV1SpectroClustersUIDConfigRbacsGetOK() *V1SpectroClustersUIDConfigRbacsGetOK { + return &V1SpectroClustersUIDConfigRbacsGetOK{} +} + +/* +V1SpectroClustersUIDConfigRbacsGetOK handles this case with default header values. + +OK +*/ +type V1SpectroClustersUIDConfigRbacsGetOK struct { + Payload *models.V1ClusterRbacs +} + +func (o *V1SpectroClustersUIDConfigRbacsGetOK) Error() string { + return fmt.Sprintf("[GET /v1/spectroclusters/{uid}/config/rbacs][%d] v1SpectroClustersUidConfigRbacsGetOK %+v", 200, o.Payload) +} + +func (o *V1SpectroClustersUIDConfigRbacsGetOK) GetPayload() *models.V1ClusterRbacs { + return o.Payload +} + +func (o *V1SpectroClustersUIDConfigRbacsGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1ClusterRbacs) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_uid_config_rbacs_uid_get_parameters.go b/api/client/v1/v1_spectro_clusters_uid_config_rbacs_uid_get_parameters.go new file mode 100644 index 00000000..c5e994c4 --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_uid_config_rbacs_uid_get_parameters.go @@ -0,0 +1,157 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1SpectroClustersUIDConfigRbacsUIDGetParams creates a new V1SpectroClustersUIDConfigRbacsUIDGetParams object +// with the default values initialized. +func NewV1SpectroClustersUIDConfigRbacsUIDGetParams() *V1SpectroClustersUIDConfigRbacsUIDGetParams { + var () + return &V1SpectroClustersUIDConfigRbacsUIDGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1SpectroClustersUIDConfigRbacsUIDGetParamsWithTimeout creates a new V1SpectroClustersUIDConfigRbacsUIDGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1SpectroClustersUIDConfigRbacsUIDGetParamsWithTimeout(timeout time.Duration) *V1SpectroClustersUIDConfigRbacsUIDGetParams { + var () + return &V1SpectroClustersUIDConfigRbacsUIDGetParams{ + + timeout: timeout, + } +} + +// NewV1SpectroClustersUIDConfigRbacsUIDGetParamsWithContext creates a new V1SpectroClustersUIDConfigRbacsUIDGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1SpectroClustersUIDConfigRbacsUIDGetParamsWithContext(ctx context.Context) *V1SpectroClustersUIDConfigRbacsUIDGetParams { + var () + return &V1SpectroClustersUIDConfigRbacsUIDGetParams{ + + Context: ctx, + } +} + +// NewV1SpectroClustersUIDConfigRbacsUIDGetParamsWithHTTPClient creates a new V1SpectroClustersUIDConfigRbacsUIDGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1SpectroClustersUIDConfigRbacsUIDGetParamsWithHTTPClient(client *http.Client) *V1SpectroClustersUIDConfigRbacsUIDGetParams { + var () + return &V1SpectroClustersUIDConfigRbacsUIDGetParams{ + HTTPClient: client, + } +} + +/* +V1SpectroClustersUIDConfigRbacsUIDGetParams contains all the parameters to send to the API endpoint +for the v1 spectro clusters Uid config rbacs Uid get operation typically these are written to a http.Request +*/ +type V1SpectroClustersUIDConfigRbacsUIDGetParams struct { + + /*RbacUID + RBAC resource uid + + */ + RbacUID string + /*UID + Cluster uid + + */ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 spectro clusters Uid config rbacs Uid get params +func (o *V1SpectroClustersUIDConfigRbacsUIDGetParams) WithTimeout(timeout time.Duration) *V1SpectroClustersUIDConfigRbacsUIDGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 spectro clusters Uid config rbacs Uid get params +func (o *V1SpectroClustersUIDConfigRbacsUIDGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 spectro clusters Uid config rbacs Uid get params +func (o *V1SpectroClustersUIDConfigRbacsUIDGetParams) WithContext(ctx context.Context) *V1SpectroClustersUIDConfigRbacsUIDGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 spectro clusters Uid config rbacs Uid get params +func (o *V1SpectroClustersUIDConfigRbacsUIDGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 spectro clusters Uid config rbacs Uid get params +func (o *V1SpectroClustersUIDConfigRbacsUIDGetParams) WithHTTPClient(client *http.Client) *V1SpectroClustersUIDConfigRbacsUIDGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 spectro clusters Uid config rbacs Uid get params +func (o *V1SpectroClustersUIDConfigRbacsUIDGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithRbacUID adds the rbacUID to the v1 spectro clusters Uid config rbacs Uid get params +func (o *V1SpectroClustersUIDConfigRbacsUIDGetParams) WithRbacUID(rbacUID string) *V1SpectroClustersUIDConfigRbacsUIDGetParams { + o.SetRbacUID(rbacUID) + return o +} + +// SetRbacUID adds the rbacUid to the v1 spectro clusters Uid config rbacs Uid get params +func (o *V1SpectroClustersUIDConfigRbacsUIDGetParams) SetRbacUID(rbacUID string) { + o.RbacUID = rbacUID +} + +// WithUID adds the uid to the v1 spectro clusters Uid config rbacs Uid get params +func (o *V1SpectroClustersUIDConfigRbacsUIDGetParams) WithUID(uid string) *V1SpectroClustersUIDConfigRbacsUIDGetParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 spectro clusters Uid config rbacs Uid get params +func (o *V1SpectroClustersUIDConfigRbacsUIDGetParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1SpectroClustersUIDConfigRbacsUIDGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param rbacUid + if err := r.SetPathParam("rbacUid", o.RbacUID); err != nil { + return err + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_uid_config_rbacs_uid_get_responses.go b/api/client/v1/v1_spectro_clusters_uid_config_rbacs_uid_get_responses.go new file mode 100644 index 00000000..9db009af --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_uid_config_rbacs_uid_get_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1SpectroClustersUIDConfigRbacsUIDGetReader is a Reader for the V1SpectroClustersUIDConfigRbacsUIDGet structure. +type V1SpectroClustersUIDConfigRbacsUIDGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1SpectroClustersUIDConfigRbacsUIDGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1SpectroClustersUIDConfigRbacsUIDGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1SpectroClustersUIDConfigRbacsUIDGetOK creates a V1SpectroClustersUIDConfigRbacsUIDGetOK with default headers values +func NewV1SpectroClustersUIDConfigRbacsUIDGetOK() *V1SpectroClustersUIDConfigRbacsUIDGetOK { + return &V1SpectroClustersUIDConfigRbacsUIDGetOK{} +} + +/* +V1SpectroClustersUIDConfigRbacsUIDGetOK handles this case with default header values. + +Cluster's RBAC response +*/ +type V1SpectroClustersUIDConfigRbacsUIDGetOK struct { + Payload *models.V1ClusterRbac +} + +func (o *V1SpectroClustersUIDConfigRbacsUIDGetOK) Error() string { + return fmt.Sprintf("[GET /v1/spectroclusters/{uid}/config/rbacs/{rbacUid}][%d] v1SpectroClustersUidConfigRbacsUidGetOK %+v", 200, o.Payload) +} + +func (o *V1SpectroClustersUIDConfigRbacsUIDGetOK) GetPayload() *models.V1ClusterRbac { + return o.Payload +} + +func (o *V1SpectroClustersUIDConfigRbacsUIDGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1ClusterRbac) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_uid_config_rbacs_uid_update_parameters.go b/api/client/v1/v1_spectro_clusters_uid_config_rbacs_uid_update_parameters.go new file mode 100644 index 00000000..8b3ab72e --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_uid_config_rbacs_uid_update_parameters.go @@ -0,0 +1,178 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1SpectroClustersUIDConfigRbacsUIDUpdateParams creates a new V1SpectroClustersUIDConfigRbacsUIDUpdateParams object +// with the default values initialized. +func NewV1SpectroClustersUIDConfigRbacsUIDUpdateParams() *V1SpectroClustersUIDConfigRbacsUIDUpdateParams { + var () + return &V1SpectroClustersUIDConfigRbacsUIDUpdateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1SpectroClustersUIDConfigRbacsUIDUpdateParamsWithTimeout creates a new V1SpectroClustersUIDConfigRbacsUIDUpdateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1SpectroClustersUIDConfigRbacsUIDUpdateParamsWithTimeout(timeout time.Duration) *V1SpectroClustersUIDConfigRbacsUIDUpdateParams { + var () + return &V1SpectroClustersUIDConfigRbacsUIDUpdateParams{ + + timeout: timeout, + } +} + +// NewV1SpectroClustersUIDConfigRbacsUIDUpdateParamsWithContext creates a new V1SpectroClustersUIDConfigRbacsUIDUpdateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1SpectroClustersUIDConfigRbacsUIDUpdateParamsWithContext(ctx context.Context) *V1SpectroClustersUIDConfigRbacsUIDUpdateParams { + var () + return &V1SpectroClustersUIDConfigRbacsUIDUpdateParams{ + + Context: ctx, + } +} + +// NewV1SpectroClustersUIDConfigRbacsUIDUpdateParamsWithHTTPClient creates a new V1SpectroClustersUIDConfigRbacsUIDUpdateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1SpectroClustersUIDConfigRbacsUIDUpdateParamsWithHTTPClient(client *http.Client) *V1SpectroClustersUIDConfigRbacsUIDUpdateParams { + var () + return &V1SpectroClustersUIDConfigRbacsUIDUpdateParams{ + HTTPClient: client, + } +} + +/* +V1SpectroClustersUIDConfigRbacsUIDUpdateParams contains all the parameters to send to the API endpoint +for the v1 spectro clusters Uid config rbacs Uid update operation typically these are written to a http.Request +*/ +type V1SpectroClustersUIDConfigRbacsUIDUpdateParams struct { + + /*Body*/ + Body *models.V1ClusterRbacInputEntity + /*RbacUID + RBAC resource uid + + */ + RbacUID string + /*UID + Cluster uid + + */ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 spectro clusters Uid config rbacs Uid update params +func (o *V1SpectroClustersUIDConfigRbacsUIDUpdateParams) WithTimeout(timeout time.Duration) *V1SpectroClustersUIDConfigRbacsUIDUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 spectro clusters Uid config rbacs Uid update params +func (o *V1SpectroClustersUIDConfigRbacsUIDUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 spectro clusters Uid config rbacs Uid update params +func (o *V1SpectroClustersUIDConfigRbacsUIDUpdateParams) WithContext(ctx context.Context) *V1SpectroClustersUIDConfigRbacsUIDUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 spectro clusters Uid config rbacs Uid update params +func (o *V1SpectroClustersUIDConfigRbacsUIDUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 spectro clusters Uid config rbacs Uid update params +func (o *V1SpectroClustersUIDConfigRbacsUIDUpdateParams) WithHTTPClient(client *http.Client) *V1SpectroClustersUIDConfigRbacsUIDUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 spectro clusters Uid config rbacs Uid update params +func (o *V1SpectroClustersUIDConfigRbacsUIDUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 spectro clusters Uid config rbacs Uid update params +func (o *V1SpectroClustersUIDConfigRbacsUIDUpdateParams) WithBody(body *models.V1ClusterRbacInputEntity) *V1SpectroClustersUIDConfigRbacsUIDUpdateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 spectro clusters Uid config rbacs Uid update params +func (o *V1SpectroClustersUIDConfigRbacsUIDUpdateParams) SetBody(body *models.V1ClusterRbacInputEntity) { + o.Body = body +} + +// WithRbacUID adds the rbacUID to the v1 spectro clusters Uid config rbacs Uid update params +func (o *V1SpectroClustersUIDConfigRbacsUIDUpdateParams) WithRbacUID(rbacUID string) *V1SpectroClustersUIDConfigRbacsUIDUpdateParams { + o.SetRbacUID(rbacUID) + return o +} + +// SetRbacUID adds the rbacUid to the v1 spectro clusters Uid config rbacs Uid update params +func (o *V1SpectroClustersUIDConfigRbacsUIDUpdateParams) SetRbacUID(rbacUID string) { + o.RbacUID = rbacUID +} + +// WithUID adds the uid to the v1 spectro clusters Uid config rbacs Uid update params +func (o *V1SpectroClustersUIDConfigRbacsUIDUpdateParams) WithUID(uid string) *V1SpectroClustersUIDConfigRbacsUIDUpdateParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 spectro clusters Uid config rbacs Uid update params +func (o *V1SpectroClustersUIDConfigRbacsUIDUpdateParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1SpectroClustersUIDConfigRbacsUIDUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param rbacUid + if err := r.SetPathParam("rbacUid", o.RbacUID); err != nil { + return err + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_uid_config_rbacs_uid_update_responses.go b/api/client/v1/v1_spectro_clusters_uid_config_rbacs_uid_update_responses.go new file mode 100644 index 00000000..1595785d --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_uid_config_rbacs_uid_update_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1SpectroClustersUIDConfigRbacsUIDUpdateReader is a Reader for the V1SpectroClustersUIDConfigRbacsUIDUpdate structure. +type V1SpectroClustersUIDConfigRbacsUIDUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1SpectroClustersUIDConfigRbacsUIDUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1SpectroClustersUIDConfigRbacsUIDUpdateNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1SpectroClustersUIDConfigRbacsUIDUpdateNoContent creates a V1SpectroClustersUIDConfigRbacsUIDUpdateNoContent with default headers values +func NewV1SpectroClustersUIDConfigRbacsUIDUpdateNoContent() *V1SpectroClustersUIDConfigRbacsUIDUpdateNoContent { + return &V1SpectroClustersUIDConfigRbacsUIDUpdateNoContent{} +} + +/* +V1SpectroClustersUIDConfigRbacsUIDUpdateNoContent handles this case with default header values. + +The resource was updated successfully +*/ +type V1SpectroClustersUIDConfigRbacsUIDUpdateNoContent struct { +} + +func (o *V1SpectroClustersUIDConfigRbacsUIDUpdateNoContent) Error() string { + return fmt.Sprintf("[PUT /v1/spectroclusters/{uid}/config/rbacs/{rbacUid}][%d] v1SpectroClustersUidConfigRbacsUidUpdateNoContent ", 204) +} + +func (o *V1SpectroClustersUIDConfigRbacsUIDUpdateNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_uid_config_rbacs_update_parameters.go b/api/client/v1/v1_spectro_clusters_uid_config_rbacs_update_parameters.go new file mode 100644 index 00000000..8b9bec5c --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_uid_config_rbacs_update_parameters.go @@ -0,0 +1,157 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1SpectroClustersUIDConfigRbacsUpdateParams creates a new V1SpectroClustersUIDConfigRbacsUpdateParams object +// with the default values initialized. +func NewV1SpectroClustersUIDConfigRbacsUpdateParams() *V1SpectroClustersUIDConfigRbacsUpdateParams { + var () + return &V1SpectroClustersUIDConfigRbacsUpdateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1SpectroClustersUIDConfigRbacsUpdateParamsWithTimeout creates a new V1SpectroClustersUIDConfigRbacsUpdateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1SpectroClustersUIDConfigRbacsUpdateParamsWithTimeout(timeout time.Duration) *V1SpectroClustersUIDConfigRbacsUpdateParams { + var () + return &V1SpectroClustersUIDConfigRbacsUpdateParams{ + + timeout: timeout, + } +} + +// NewV1SpectroClustersUIDConfigRbacsUpdateParamsWithContext creates a new V1SpectroClustersUIDConfigRbacsUpdateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1SpectroClustersUIDConfigRbacsUpdateParamsWithContext(ctx context.Context) *V1SpectroClustersUIDConfigRbacsUpdateParams { + var () + return &V1SpectroClustersUIDConfigRbacsUpdateParams{ + + Context: ctx, + } +} + +// NewV1SpectroClustersUIDConfigRbacsUpdateParamsWithHTTPClient creates a new V1SpectroClustersUIDConfigRbacsUpdateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1SpectroClustersUIDConfigRbacsUpdateParamsWithHTTPClient(client *http.Client) *V1SpectroClustersUIDConfigRbacsUpdateParams { + var () + return &V1SpectroClustersUIDConfigRbacsUpdateParams{ + HTTPClient: client, + } +} + +/* +V1SpectroClustersUIDConfigRbacsUpdateParams contains all the parameters to send to the API endpoint +for the v1 spectro clusters Uid config rbacs update operation typically these are written to a http.Request +*/ +type V1SpectroClustersUIDConfigRbacsUpdateParams struct { + + /*Body*/ + Body *models.V1ClusterRbacResourcesUpdateEntity + /*UID + Cluster uid + + */ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 spectro clusters Uid config rbacs update params +func (o *V1SpectroClustersUIDConfigRbacsUpdateParams) WithTimeout(timeout time.Duration) *V1SpectroClustersUIDConfigRbacsUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 spectro clusters Uid config rbacs update params +func (o *V1SpectroClustersUIDConfigRbacsUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 spectro clusters Uid config rbacs update params +func (o *V1SpectroClustersUIDConfigRbacsUpdateParams) WithContext(ctx context.Context) *V1SpectroClustersUIDConfigRbacsUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 spectro clusters Uid config rbacs update params +func (o *V1SpectroClustersUIDConfigRbacsUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 spectro clusters Uid config rbacs update params +func (o *V1SpectroClustersUIDConfigRbacsUpdateParams) WithHTTPClient(client *http.Client) *V1SpectroClustersUIDConfigRbacsUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 spectro clusters Uid config rbacs update params +func (o *V1SpectroClustersUIDConfigRbacsUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 spectro clusters Uid config rbacs update params +func (o *V1SpectroClustersUIDConfigRbacsUpdateParams) WithBody(body *models.V1ClusterRbacResourcesUpdateEntity) *V1SpectroClustersUIDConfigRbacsUpdateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 spectro clusters Uid config rbacs update params +func (o *V1SpectroClustersUIDConfigRbacsUpdateParams) SetBody(body *models.V1ClusterRbacResourcesUpdateEntity) { + o.Body = body +} + +// WithUID adds the uid to the v1 spectro clusters Uid config rbacs update params +func (o *V1SpectroClustersUIDConfigRbacsUpdateParams) WithUID(uid string) *V1SpectroClustersUIDConfigRbacsUpdateParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 spectro clusters Uid config rbacs update params +func (o *V1SpectroClustersUIDConfigRbacsUpdateParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1SpectroClustersUIDConfigRbacsUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_uid_config_rbacs_update_responses.go b/api/client/v1/v1_spectro_clusters_uid_config_rbacs_update_responses.go new file mode 100644 index 00000000..ebeb7d75 --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_uid_config_rbacs_update_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1SpectroClustersUIDConfigRbacsUpdateReader is a Reader for the V1SpectroClustersUIDConfigRbacsUpdate structure. +type V1SpectroClustersUIDConfigRbacsUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1SpectroClustersUIDConfigRbacsUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1SpectroClustersUIDConfigRbacsUpdateNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1SpectroClustersUIDConfigRbacsUpdateNoContent creates a V1SpectroClustersUIDConfigRbacsUpdateNoContent with default headers values +func NewV1SpectroClustersUIDConfigRbacsUpdateNoContent() *V1SpectroClustersUIDConfigRbacsUpdateNoContent { + return &V1SpectroClustersUIDConfigRbacsUpdateNoContent{} +} + +/* +V1SpectroClustersUIDConfigRbacsUpdateNoContent handles this case with default header values. + +The resource was updated successfully +*/ +type V1SpectroClustersUIDConfigRbacsUpdateNoContent struct { +} + +func (o *V1SpectroClustersUIDConfigRbacsUpdateNoContent) Error() string { + return fmt.Sprintf("[PUT /v1/spectroclusters/{uid}/config/rbacs][%d] v1SpectroClustersUidConfigRbacsUpdateNoContent ", 204) +} + +func (o *V1SpectroClustersUIDConfigRbacsUpdateNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_uid_cost_summary_parameters.go b/api/client/v1/v1_spectro_clusters_uid_cost_summary_parameters.go new file mode 100644 index 00000000..cb52ccea --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_uid_cost_summary_parameters.go @@ -0,0 +1,230 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// NewV1SpectroClustersUIDCostSummaryParams creates a new V1SpectroClustersUIDCostSummaryParams object +// with the default values initialized. +func NewV1SpectroClustersUIDCostSummaryParams() *V1SpectroClustersUIDCostSummaryParams { + var () + return &V1SpectroClustersUIDCostSummaryParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1SpectroClustersUIDCostSummaryParamsWithTimeout creates a new V1SpectroClustersUIDCostSummaryParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1SpectroClustersUIDCostSummaryParamsWithTimeout(timeout time.Duration) *V1SpectroClustersUIDCostSummaryParams { + var () + return &V1SpectroClustersUIDCostSummaryParams{ + + timeout: timeout, + } +} + +// NewV1SpectroClustersUIDCostSummaryParamsWithContext creates a new V1SpectroClustersUIDCostSummaryParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1SpectroClustersUIDCostSummaryParamsWithContext(ctx context.Context) *V1SpectroClustersUIDCostSummaryParams { + var () + return &V1SpectroClustersUIDCostSummaryParams{ + + Context: ctx, + } +} + +// NewV1SpectroClustersUIDCostSummaryParamsWithHTTPClient creates a new V1SpectroClustersUIDCostSummaryParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1SpectroClustersUIDCostSummaryParamsWithHTTPClient(client *http.Client) *V1SpectroClustersUIDCostSummaryParams { + var () + return &V1SpectroClustersUIDCostSummaryParams{ + HTTPClient: client, + } +} + +/* +V1SpectroClustersUIDCostSummaryParams contains all the parameters to send to the API endpoint +for the v1 spectro clusters Uid cost summary operation typically these are written to a http.Request +*/ +type V1SpectroClustersUIDCostSummaryParams struct { + + /*EndTime + Time is a wrapper around time.Time which supports correct marshaling to YAML and JSON. Wrappers are provided for many of the factory methods that the time package offers. + + */ + EndTime *strfmt.DateTime + /*Period + period in minutes, group the data point by the specified period + + */ + Period *int32 + /*StartTime + Time is a wrapper around time.Time which supports correct marshaling to YAML and JSON. Wrappers are provided for many of the factory methods that the time package offers. + + */ + StartTime *strfmt.DateTime + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 spectro clusters Uid cost summary params +func (o *V1SpectroClustersUIDCostSummaryParams) WithTimeout(timeout time.Duration) *V1SpectroClustersUIDCostSummaryParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 spectro clusters Uid cost summary params +func (o *V1SpectroClustersUIDCostSummaryParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 spectro clusters Uid cost summary params +func (o *V1SpectroClustersUIDCostSummaryParams) WithContext(ctx context.Context) *V1SpectroClustersUIDCostSummaryParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 spectro clusters Uid cost summary params +func (o *V1SpectroClustersUIDCostSummaryParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 spectro clusters Uid cost summary params +func (o *V1SpectroClustersUIDCostSummaryParams) WithHTTPClient(client *http.Client) *V1SpectroClustersUIDCostSummaryParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 spectro clusters Uid cost summary params +func (o *V1SpectroClustersUIDCostSummaryParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithEndTime adds the endTime to the v1 spectro clusters Uid cost summary params +func (o *V1SpectroClustersUIDCostSummaryParams) WithEndTime(endTime *strfmt.DateTime) *V1SpectroClustersUIDCostSummaryParams { + o.SetEndTime(endTime) + return o +} + +// SetEndTime adds the endTime to the v1 spectro clusters Uid cost summary params +func (o *V1SpectroClustersUIDCostSummaryParams) SetEndTime(endTime *strfmt.DateTime) { + o.EndTime = endTime +} + +// WithPeriod adds the period to the v1 spectro clusters Uid cost summary params +func (o *V1SpectroClustersUIDCostSummaryParams) WithPeriod(period *int32) *V1SpectroClustersUIDCostSummaryParams { + o.SetPeriod(period) + return o +} + +// SetPeriod adds the period to the v1 spectro clusters Uid cost summary params +func (o *V1SpectroClustersUIDCostSummaryParams) SetPeriod(period *int32) { + o.Period = period +} + +// WithStartTime adds the startTime to the v1 spectro clusters Uid cost summary params +func (o *V1SpectroClustersUIDCostSummaryParams) WithStartTime(startTime *strfmt.DateTime) *V1SpectroClustersUIDCostSummaryParams { + o.SetStartTime(startTime) + return o +} + +// SetStartTime adds the startTime to the v1 spectro clusters Uid cost summary params +func (o *V1SpectroClustersUIDCostSummaryParams) SetStartTime(startTime *strfmt.DateTime) { + o.StartTime = startTime +} + +// WithUID adds the uid to the v1 spectro clusters Uid cost summary params +func (o *V1SpectroClustersUIDCostSummaryParams) WithUID(uid string) *V1SpectroClustersUIDCostSummaryParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 spectro clusters Uid cost summary params +func (o *V1SpectroClustersUIDCostSummaryParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1SpectroClustersUIDCostSummaryParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.EndTime != nil { + + // query param endTime + var qrEndTime strfmt.DateTime + if o.EndTime != nil { + qrEndTime = *o.EndTime + } + qEndTime := qrEndTime.String() + if qEndTime != "" { + if err := r.SetQueryParam("endTime", qEndTime); err != nil { + return err + } + } + + } + + if o.Period != nil { + + // query param period + var qrPeriod int32 + if o.Period != nil { + qrPeriod = *o.Period + } + qPeriod := swag.FormatInt32(qrPeriod) + if qPeriod != "" { + if err := r.SetQueryParam("period", qPeriod); err != nil { + return err + } + } + + } + + if o.StartTime != nil { + + // query param startTime + var qrStartTime strfmt.DateTime + if o.StartTime != nil { + qrStartTime = *o.StartTime + } + qStartTime := qrStartTime.String() + if qStartTime != "" { + if err := r.SetQueryParam("startTime", qStartTime); err != nil { + return err + } + } + + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_uid_cost_summary_responses.go b/api/client/v1/v1_spectro_clusters_uid_cost_summary_responses.go new file mode 100644 index 00000000..f0633a1b --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_uid_cost_summary_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1SpectroClustersUIDCostSummaryReader is a Reader for the V1SpectroClustersUIDCostSummary structure. +type V1SpectroClustersUIDCostSummaryReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1SpectroClustersUIDCostSummaryReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1SpectroClustersUIDCostSummaryOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1SpectroClustersUIDCostSummaryOK creates a V1SpectroClustersUIDCostSummaryOK with default headers values +func NewV1SpectroClustersUIDCostSummaryOK() *V1SpectroClustersUIDCostSummaryOK { + return &V1SpectroClustersUIDCostSummaryOK{} +} + +/* +V1SpectroClustersUIDCostSummaryOK handles this case with default header values. + +An spectro cluster cost summary +*/ +type V1SpectroClustersUIDCostSummaryOK struct { + Payload *models.V1SpectroClusterCostSummary +} + +func (o *V1SpectroClustersUIDCostSummaryOK) Error() string { + return fmt.Sprintf("[GET /v1/dashboard/spectroclusters/{uid}/cost][%d] v1SpectroClustersUidCostSummaryOK %+v", 200, o.Payload) +} + +func (o *V1SpectroClustersUIDCostSummaryOK) GetPayload() *models.V1SpectroClusterCostSummary { + return o.Payload +} + +func (o *V1SpectroClustersUIDCostSummaryOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1SpectroClusterCostSummary) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_uid_download_parameters.go b/api/client/v1/v1_spectro_clusters_uid_download_parameters.go new file mode 100644 index 00000000..8da1d457 --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_uid_download_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1SpectroClustersUIDDownloadParams creates a new V1SpectroClustersUIDDownloadParams object +// with the default values initialized. +func NewV1SpectroClustersUIDDownloadParams() *V1SpectroClustersUIDDownloadParams { + var () + return &V1SpectroClustersUIDDownloadParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1SpectroClustersUIDDownloadParamsWithTimeout creates a new V1SpectroClustersUIDDownloadParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1SpectroClustersUIDDownloadParamsWithTimeout(timeout time.Duration) *V1SpectroClustersUIDDownloadParams { + var () + return &V1SpectroClustersUIDDownloadParams{ + + timeout: timeout, + } +} + +// NewV1SpectroClustersUIDDownloadParamsWithContext creates a new V1SpectroClustersUIDDownloadParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1SpectroClustersUIDDownloadParamsWithContext(ctx context.Context) *V1SpectroClustersUIDDownloadParams { + var () + return &V1SpectroClustersUIDDownloadParams{ + + Context: ctx, + } +} + +// NewV1SpectroClustersUIDDownloadParamsWithHTTPClient creates a new V1SpectroClustersUIDDownloadParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1SpectroClustersUIDDownloadParamsWithHTTPClient(client *http.Client) *V1SpectroClustersUIDDownloadParams { + var () + return &V1SpectroClustersUIDDownloadParams{ + HTTPClient: client, + } +} + +/* +V1SpectroClustersUIDDownloadParams contains all the parameters to send to the API endpoint +for the v1 spectro clusters Uid download operation typically these are written to a http.Request +*/ +type V1SpectroClustersUIDDownloadParams struct { + + /*UID + Cluster uid + + */ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 spectro clusters Uid download params +func (o *V1SpectroClustersUIDDownloadParams) WithTimeout(timeout time.Duration) *V1SpectroClustersUIDDownloadParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 spectro clusters Uid download params +func (o *V1SpectroClustersUIDDownloadParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 spectro clusters Uid download params +func (o *V1SpectroClustersUIDDownloadParams) WithContext(ctx context.Context) *V1SpectroClustersUIDDownloadParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 spectro clusters Uid download params +func (o *V1SpectroClustersUIDDownloadParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 spectro clusters Uid download params +func (o *V1SpectroClustersUIDDownloadParams) WithHTTPClient(client *http.Client) *V1SpectroClustersUIDDownloadParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 spectro clusters Uid download params +func (o *V1SpectroClustersUIDDownloadParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithUID adds the uid to the v1 spectro clusters Uid download params +func (o *V1SpectroClustersUIDDownloadParams) WithUID(uid string) *V1SpectroClustersUIDDownloadParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 spectro clusters Uid download params +func (o *V1SpectroClustersUIDDownloadParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1SpectroClustersUIDDownloadParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_uid_download_responses.go b/api/client/v1/v1_spectro_clusters_uid_download_responses.go new file mode 100644 index 00000000..776a22e8 --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_uid_download_responses.go @@ -0,0 +1,74 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1SpectroClustersUIDDownloadReader is a Reader for the V1SpectroClustersUIDDownload structure. +type V1SpectroClustersUIDDownloadReader struct { + formats strfmt.Registry + writer io.Writer +} + +// ReadResponse reads a server response into the received o. +func (o *V1SpectroClustersUIDDownloadReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1SpectroClustersUIDDownloadOK(o.writer) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1SpectroClustersUIDDownloadOK creates a V1SpectroClustersUIDDownloadOK with default headers values +func NewV1SpectroClustersUIDDownloadOK(writer io.Writer) *V1SpectroClustersUIDDownloadOK { + return &V1SpectroClustersUIDDownloadOK{ + Payload: writer, + } +} + +/* +V1SpectroClustersUIDDownloadOK handles this case with default header values. + +download cluster archive file +*/ +type V1SpectroClustersUIDDownloadOK struct { + ContentDisposition string + + Payload io.Writer +} + +func (o *V1SpectroClustersUIDDownloadOK) Error() string { + return fmt.Sprintf("[GET /v1/spectroclusters/{uid}/download][%d] v1SpectroClustersUidDownloadOK %+v", 200, o.Payload) +} + +func (o *V1SpectroClustersUIDDownloadOK) GetPayload() io.Writer { + return o.Payload +} + +func (o *V1SpectroClustersUIDDownloadOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Content-Disposition + o.ContentDisposition = response.GetHeader("Content-Disposition") + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_uid_frp_kube_config_delete_parameters.go b/api/client/v1/v1_spectro_clusters_uid_frp_kube_config_delete_parameters.go new file mode 100644 index 00000000..b8252b68 --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_uid_frp_kube_config_delete_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1SpectroClustersUIDFrpKubeConfigDeleteParams creates a new V1SpectroClustersUIDFrpKubeConfigDeleteParams object +// with the default values initialized. +func NewV1SpectroClustersUIDFrpKubeConfigDeleteParams() *V1SpectroClustersUIDFrpKubeConfigDeleteParams { + var () + return &V1SpectroClustersUIDFrpKubeConfigDeleteParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1SpectroClustersUIDFrpKubeConfigDeleteParamsWithTimeout creates a new V1SpectroClustersUIDFrpKubeConfigDeleteParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1SpectroClustersUIDFrpKubeConfigDeleteParamsWithTimeout(timeout time.Duration) *V1SpectroClustersUIDFrpKubeConfigDeleteParams { + var () + return &V1SpectroClustersUIDFrpKubeConfigDeleteParams{ + + timeout: timeout, + } +} + +// NewV1SpectroClustersUIDFrpKubeConfigDeleteParamsWithContext creates a new V1SpectroClustersUIDFrpKubeConfigDeleteParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1SpectroClustersUIDFrpKubeConfigDeleteParamsWithContext(ctx context.Context) *V1SpectroClustersUIDFrpKubeConfigDeleteParams { + var () + return &V1SpectroClustersUIDFrpKubeConfigDeleteParams{ + + Context: ctx, + } +} + +// NewV1SpectroClustersUIDFrpKubeConfigDeleteParamsWithHTTPClient creates a new V1SpectroClustersUIDFrpKubeConfigDeleteParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1SpectroClustersUIDFrpKubeConfigDeleteParamsWithHTTPClient(client *http.Client) *V1SpectroClustersUIDFrpKubeConfigDeleteParams { + var () + return &V1SpectroClustersUIDFrpKubeConfigDeleteParams{ + HTTPClient: client, + } +} + +/* +V1SpectroClustersUIDFrpKubeConfigDeleteParams contains all the parameters to send to the API endpoint +for the v1 spectro clusters Uid frp kube config delete operation typically these are written to a http.Request +*/ +type V1SpectroClustersUIDFrpKubeConfigDeleteParams struct { + + /*UID + Cluster uid + + */ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 spectro clusters Uid frp kube config delete params +func (o *V1SpectroClustersUIDFrpKubeConfigDeleteParams) WithTimeout(timeout time.Duration) *V1SpectroClustersUIDFrpKubeConfigDeleteParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 spectro clusters Uid frp kube config delete params +func (o *V1SpectroClustersUIDFrpKubeConfigDeleteParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 spectro clusters Uid frp kube config delete params +func (o *V1SpectroClustersUIDFrpKubeConfigDeleteParams) WithContext(ctx context.Context) *V1SpectroClustersUIDFrpKubeConfigDeleteParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 spectro clusters Uid frp kube config delete params +func (o *V1SpectroClustersUIDFrpKubeConfigDeleteParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 spectro clusters Uid frp kube config delete params +func (o *V1SpectroClustersUIDFrpKubeConfigDeleteParams) WithHTTPClient(client *http.Client) *V1SpectroClustersUIDFrpKubeConfigDeleteParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 spectro clusters Uid frp kube config delete params +func (o *V1SpectroClustersUIDFrpKubeConfigDeleteParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithUID adds the uid to the v1 spectro clusters Uid frp kube config delete params +func (o *V1SpectroClustersUIDFrpKubeConfigDeleteParams) WithUID(uid string) *V1SpectroClustersUIDFrpKubeConfigDeleteParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 spectro clusters Uid frp kube config delete params +func (o *V1SpectroClustersUIDFrpKubeConfigDeleteParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1SpectroClustersUIDFrpKubeConfigDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_uid_frp_kube_config_delete_responses.go b/api/client/v1/v1_spectro_clusters_uid_frp_kube_config_delete_responses.go new file mode 100644 index 00000000..2e013c76 --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_uid_frp_kube_config_delete_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1SpectroClustersUIDFrpKubeConfigDeleteReader is a Reader for the V1SpectroClustersUIDFrpKubeConfigDelete structure. +type V1SpectroClustersUIDFrpKubeConfigDeleteReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1SpectroClustersUIDFrpKubeConfigDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1SpectroClustersUIDFrpKubeConfigDeleteNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1SpectroClustersUIDFrpKubeConfigDeleteNoContent creates a V1SpectroClustersUIDFrpKubeConfigDeleteNoContent with default headers values +func NewV1SpectroClustersUIDFrpKubeConfigDeleteNoContent() *V1SpectroClustersUIDFrpKubeConfigDeleteNoContent { + return &V1SpectroClustersUIDFrpKubeConfigDeleteNoContent{} +} + +/* +V1SpectroClustersUIDFrpKubeConfigDeleteNoContent handles this case with default header values. + +The resource was deleted successfully +*/ +type V1SpectroClustersUIDFrpKubeConfigDeleteNoContent struct { +} + +func (o *V1SpectroClustersUIDFrpKubeConfigDeleteNoContent) Error() string { + return fmt.Sprintf("[DELETE /v1/spectroclusters/{uid}/assets/frpKubeconfig][%d] v1SpectroClustersUidFrpKubeConfigDeleteNoContent ", 204) +} + +func (o *V1SpectroClustersUIDFrpKubeConfigDeleteNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_uid_frp_kube_config_get_parameters.go b/api/client/v1/v1_spectro_clusters_uid_frp_kube_config_get_parameters.go new file mode 100644 index 00000000..1776a4c3 --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_uid_frp_kube_config_get_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1SpectroClustersUIDFrpKubeConfigGetParams creates a new V1SpectroClustersUIDFrpKubeConfigGetParams object +// with the default values initialized. +func NewV1SpectroClustersUIDFrpKubeConfigGetParams() *V1SpectroClustersUIDFrpKubeConfigGetParams { + var () + return &V1SpectroClustersUIDFrpKubeConfigGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1SpectroClustersUIDFrpKubeConfigGetParamsWithTimeout creates a new V1SpectroClustersUIDFrpKubeConfigGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1SpectroClustersUIDFrpKubeConfigGetParamsWithTimeout(timeout time.Duration) *V1SpectroClustersUIDFrpKubeConfigGetParams { + var () + return &V1SpectroClustersUIDFrpKubeConfigGetParams{ + + timeout: timeout, + } +} + +// NewV1SpectroClustersUIDFrpKubeConfigGetParamsWithContext creates a new V1SpectroClustersUIDFrpKubeConfigGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1SpectroClustersUIDFrpKubeConfigGetParamsWithContext(ctx context.Context) *V1SpectroClustersUIDFrpKubeConfigGetParams { + var () + return &V1SpectroClustersUIDFrpKubeConfigGetParams{ + + Context: ctx, + } +} + +// NewV1SpectroClustersUIDFrpKubeConfigGetParamsWithHTTPClient creates a new V1SpectroClustersUIDFrpKubeConfigGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1SpectroClustersUIDFrpKubeConfigGetParamsWithHTTPClient(client *http.Client) *V1SpectroClustersUIDFrpKubeConfigGetParams { + var () + return &V1SpectroClustersUIDFrpKubeConfigGetParams{ + HTTPClient: client, + } +} + +/* +V1SpectroClustersUIDFrpKubeConfigGetParams contains all the parameters to send to the API endpoint +for the v1 spectro clusters Uid frp kube config get operation typically these are written to a http.Request +*/ +type V1SpectroClustersUIDFrpKubeConfigGetParams struct { + + /*UID + Cluster uid + + */ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 spectro clusters Uid frp kube config get params +func (o *V1SpectroClustersUIDFrpKubeConfigGetParams) WithTimeout(timeout time.Duration) *V1SpectroClustersUIDFrpKubeConfigGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 spectro clusters Uid frp kube config get params +func (o *V1SpectroClustersUIDFrpKubeConfigGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 spectro clusters Uid frp kube config get params +func (o *V1SpectroClustersUIDFrpKubeConfigGetParams) WithContext(ctx context.Context) *V1SpectroClustersUIDFrpKubeConfigGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 spectro clusters Uid frp kube config get params +func (o *V1SpectroClustersUIDFrpKubeConfigGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 spectro clusters Uid frp kube config get params +func (o *V1SpectroClustersUIDFrpKubeConfigGetParams) WithHTTPClient(client *http.Client) *V1SpectroClustersUIDFrpKubeConfigGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 spectro clusters Uid frp kube config get params +func (o *V1SpectroClustersUIDFrpKubeConfigGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithUID adds the uid to the v1 spectro clusters Uid frp kube config get params +func (o *V1SpectroClustersUIDFrpKubeConfigGetParams) WithUID(uid string) *V1SpectroClustersUIDFrpKubeConfigGetParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 spectro clusters Uid frp kube config get params +func (o *V1SpectroClustersUIDFrpKubeConfigGetParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1SpectroClustersUIDFrpKubeConfigGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_uid_frp_kube_config_get_responses.go b/api/client/v1/v1_spectro_clusters_uid_frp_kube_config_get_responses.go new file mode 100644 index 00000000..15e77b41 --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_uid_frp_kube_config_get_responses.go @@ -0,0 +1,74 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1SpectroClustersUIDFrpKubeConfigGetReader is a Reader for the V1SpectroClustersUIDFrpKubeConfigGet structure. +type V1SpectroClustersUIDFrpKubeConfigGetReader struct { + formats strfmt.Registry + writer io.Writer +} + +// ReadResponse reads a server response into the received o. +func (o *V1SpectroClustersUIDFrpKubeConfigGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1SpectroClustersUIDFrpKubeConfigGetOK(o.writer) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1SpectroClustersUIDFrpKubeConfigGetOK creates a V1SpectroClustersUIDFrpKubeConfigGetOK with default headers values +func NewV1SpectroClustersUIDFrpKubeConfigGetOK(writer io.Writer) *V1SpectroClustersUIDFrpKubeConfigGetOK { + return &V1SpectroClustersUIDFrpKubeConfigGetOK{ + Payload: writer, + } +} + +/* +V1SpectroClustersUIDFrpKubeConfigGetOK handles this case with default header values. + +download file +*/ +type V1SpectroClustersUIDFrpKubeConfigGetOK struct { + ContentDisposition string + + Payload io.Writer +} + +func (o *V1SpectroClustersUIDFrpKubeConfigGetOK) Error() string { + return fmt.Sprintf("[GET /v1/spectroclusters/{uid}/assets/frpKubeconfig][%d] v1SpectroClustersUidFrpKubeConfigGetOK %+v", 200, o.Payload) +} + +func (o *V1SpectroClustersUIDFrpKubeConfigGetOK) GetPayload() io.Writer { + return o.Payload +} + +func (o *V1SpectroClustersUIDFrpKubeConfigGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Content-Disposition + o.ContentDisposition = response.GetHeader("Content-Disposition") + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_uid_frp_kube_config_update_parameters.go b/api/client/v1/v1_spectro_clusters_uid_frp_kube_config_update_parameters.go new file mode 100644 index 00000000..d9569034 --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_uid_frp_kube_config_update_parameters.go @@ -0,0 +1,157 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1SpectroClustersUIDFrpKubeConfigUpdateParams creates a new V1SpectroClustersUIDFrpKubeConfigUpdateParams object +// with the default values initialized. +func NewV1SpectroClustersUIDFrpKubeConfigUpdateParams() *V1SpectroClustersUIDFrpKubeConfigUpdateParams { + var () + return &V1SpectroClustersUIDFrpKubeConfigUpdateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1SpectroClustersUIDFrpKubeConfigUpdateParamsWithTimeout creates a new V1SpectroClustersUIDFrpKubeConfigUpdateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1SpectroClustersUIDFrpKubeConfigUpdateParamsWithTimeout(timeout time.Duration) *V1SpectroClustersUIDFrpKubeConfigUpdateParams { + var () + return &V1SpectroClustersUIDFrpKubeConfigUpdateParams{ + + timeout: timeout, + } +} + +// NewV1SpectroClustersUIDFrpKubeConfigUpdateParamsWithContext creates a new V1SpectroClustersUIDFrpKubeConfigUpdateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1SpectroClustersUIDFrpKubeConfigUpdateParamsWithContext(ctx context.Context) *V1SpectroClustersUIDFrpKubeConfigUpdateParams { + var () + return &V1SpectroClustersUIDFrpKubeConfigUpdateParams{ + + Context: ctx, + } +} + +// NewV1SpectroClustersUIDFrpKubeConfigUpdateParamsWithHTTPClient creates a new V1SpectroClustersUIDFrpKubeConfigUpdateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1SpectroClustersUIDFrpKubeConfigUpdateParamsWithHTTPClient(client *http.Client) *V1SpectroClustersUIDFrpKubeConfigUpdateParams { + var () + return &V1SpectroClustersUIDFrpKubeConfigUpdateParams{ + HTTPClient: client, + } +} + +/* +V1SpectroClustersUIDFrpKubeConfigUpdateParams contains all the parameters to send to the API endpoint +for the v1 spectro clusters Uid frp kube config update operation typically these are written to a http.Request +*/ +type V1SpectroClustersUIDFrpKubeConfigUpdateParams struct { + + /*Body*/ + Body *models.V1SpectroClusterAssetFrpKubeConfig + /*UID + Cluster uid + + */ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 spectro clusters Uid frp kube config update params +func (o *V1SpectroClustersUIDFrpKubeConfigUpdateParams) WithTimeout(timeout time.Duration) *V1SpectroClustersUIDFrpKubeConfigUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 spectro clusters Uid frp kube config update params +func (o *V1SpectroClustersUIDFrpKubeConfigUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 spectro clusters Uid frp kube config update params +func (o *V1SpectroClustersUIDFrpKubeConfigUpdateParams) WithContext(ctx context.Context) *V1SpectroClustersUIDFrpKubeConfigUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 spectro clusters Uid frp kube config update params +func (o *V1SpectroClustersUIDFrpKubeConfigUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 spectro clusters Uid frp kube config update params +func (o *V1SpectroClustersUIDFrpKubeConfigUpdateParams) WithHTTPClient(client *http.Client) *V1SpectroClustersUIDFrpKubeConfigUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 spectro clusters Uid frp kube config update params +func (o *V1SpectroClustersUIDFrpKubeConfigUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 spectro clusters Uid frp kube config update params +func (o *V1SpectroClustersUIDFrpKubeConfigUpdateParams) WithBody(body *models.V1SpectroClusterAssetFrpKubeConfig) *V1SpectroClustersUIDFrpKubeConfigUpdateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 spectro clusters Uid frp kube config update params +func (o *V1SpectroClustersUIDFrpKubeConfigUpdateParams) SetBody(body *models.V1SpectroClusterAssetFrpKubeConfig) { + o.Body = body +} + +// WithUID adds the uid to the v1 spectro clusters Uid frp kube config update params +func (o *V1SpectroClustersUIDFrpKubeConfigUpdateParams) WithUID(uid string) *V1SpectroClustersUIDFrpKubeConfigUpdateParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 spectro clusters Uid frp kube config update params +func (o *V1SpectroClustersUIDFrpKubeConfigUpdateParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1SpectroClustersUIDFrpKubeConfigUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_uid_frp_kube_config_update_responses.go b/api/client/v1/v1_spectro_clusters_uid_frp_kube_config_update_responses.go new file mode 100644 index 00000000..480efcbc --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_uid_frp_kube_config_update_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1SpectroClustersUIDFrpKubeConfigUpdateReader is a Reader for the V1SpectroClustersUIDFrpKubeConfigUpdate structure. +type V1SpectroClustersUIDFrpKubeConfigUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1SpectroClustersUIDFrpKubeConfigUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1SpectroClustersUIDFrpKubeConfigUpdateNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1SpectroClustersUIDFrpKubeConfigUpdateNoContent creates a V1SpectroClustersUIDFrpKubeConfigUpdateNoContent with default headers values +func NewV1SpectroClustersUIDFrpKubeConfigUpdateNoContent() *V1SpectroClustersUIDFrpKubeConfigUpdateNoContent { + return &V1SpectroClustersUIDFrpKubeConfigUpdateNoContent{} +} + +/* +V1SpectroClustersUIDFrpKubeConfigUpdateNoContent handles this case with default header values. + +The resource was updated successfully +*/ +type V1SpectroClustersUIDFrpKubeConfigUpdateNoContent struct { +} + +func (o *V1SpectroClustersUIDFrpKubeConfigUpdateNoContent) Error() string { + return fmt.Sprintf("[PUT /v1/spectroclusters/{uid}/assets/frpKubeconfig][%d] v1SpectroClustersUidFrpKubeConfigUpdateNoContent ", 204) +} + +func (o *V1SpectroClustersUIDFrpKubeConfigUpdateNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_uid_import_manifest_parameters.go b/api/client/v1/v1_spectro_clusters_uid_import_manifest_parameters.go new file mode 100644 index 00000000..7c67e8d9 --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_uid_import_manifest_parameters.go @@ -0,0 +1,133 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1SpectroClustersUIDImportManifestParams creates a new V1SpectroClustersUIDImportManifestParams object +// with the default values initialized. +func NewV1SpectroClustersUIDImportManifestParams() *V1SpectroClustersUIDImportManifestParams { + var () + return &V1SpectroClustersUIDImportManifestParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1SpectroClustersUIDImportManifestParamsWithTimeout creates a new V1SpectroClustersUIDImportManifestParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1SpectroClustersUIDImportManifestParamsWithTimeout(timeout time.Duration) *V1SpectroClustersUIDImportManifestParams { + var () + return &V1SpectroClustersUIDImportManifestParams{ + + timeout: timeout, + } +} + +// NewV1SpectroClustersUIDImportManifestParamsWithContext creates a new V1SpectroClustersUIDImportManifestParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1SpectroClustersUIDImportManifestParamsWithContext(ctx context.Context) *V1SpectroClustersUIDImportManifestParams { + var () + return &V1SpectroClustersUIDImportManifestParams{ + + Context: ctx, + } +} + +// NewV1SpectroClustersUIDImportManifestParamsWithHTTPClient creates a new V1SpectroClustersUIDImportManifestParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1SpectroClustersUIDImportManifestParamsWithHTTPClient(client *http.Client) *V1SpectroClustersUIDImportManifestParams { + var () + return &V1SpectroClustersUIDImportManifestParams{ + HTTPClient: client, + } +} + +/* +V1SpectroClustersUIDImportManifestParams contains all the parameters to send to the API endpoint +for the v1 spectro clusters Uid import manifest operation typically these are written to a http.Request +*/ +type V1SpectroClustersUIDImportManifestParams struct { + + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 spectro clusters Uid import manifest params +func (o *V1SpectroClustersUIDImportManifestParams) WithTimeout(timeout time.Duration) *V1SpectroClustersUIDImportManifestParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 spectro clusters Uid import manifest params +func (o *V1SpectroClustersUIDImportManifestParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 spectro clusters Uid import manifest params +func (o *V1SpectroClustersUIDImportManifestParams) WithContext(ctx context.Context) *V1SpectroClustersUIDImportManifestParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 spectro clusters Uid import manifest params +func (o *V1SpectroClustersUIDImportManifestParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 spectro clusters Uid import manifest params +func (o *V1SpectroClustersUIDImportManifestParams) WithHTTPClient(client *http.Client) *V1SpectroClustersUIDImportManifestParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 spectro clusters Uid import manifest params +func (o *V1SpectroClustersUIDImportManifestParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithUID adds the uid to the v1 spectro clusters Uid import manifest params +func (o *V1SpectroClustersUIDImportManifestParams) WithUID(uid string) *V1SpectroClustersUIDImportManifestParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 spectro clusters Uid import manifest params +func (o *V1SpectroClustersUIDImportManifestParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1SpectroClustersUIDImportManifestParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_uid_import_manifest_responses.go b/api/client/v1/v1_spectro_clusters_uid_import_manifest_responses.go new file mode 100644 index 00000000..ca323d3f --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_uid_import_manifest_responses.go @@ -0,0 +1,74 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1SpectroClustersUIDImportManifestReader is a Reader for the V1SpectroClustersUIDImportManifest structure. +type V1SpectroClustersUIDImportManifestReader struct { + formats strfmt.Registry + writer io.Writer +} + +// ReadResponse reads a server response into the received o. +func (o *V1SpectroClustersUIDImportManifestReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1SpectroClustersUIDImportManifestOK(o.writer) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1SpectroClustersUIDImportManifestOK creates a V1SpectroClustersUIDImportManifestOK with default headers values +func NewV1SpectroClustersUIDImportManifestOK(writer io.Writer) *V1SpectroClustersUIDImportManifestOK { + return &V1SpectroClustersUIDImportManifestOK{ + Payload: writer, + } +} + +/* +V1SpectroClustersUIDImportManifestOK handles this case with default header values. + +download file +*/ +type V1SpectroClustersUIDImportManifestOK struct { + ContentDisposition string + + Payload io.Writer +} + +func (o *V1SpectroClustersUIDImportManifestOK) Error() string { + return fmt.Sprintf("[GET /v1/spectroclusters/{uid}/import/manifest][%d] v1SpectroClustersUidImportManifestOK %+v", 200, o.Payload) +} + +func (o *V1SpectroClustersUIDImportManifestOK) GetPayload() io.Writer { + return o.Payload +} + +func (o *V1SpectroClustersUIDImportManifestOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Content-Disposition + o.ContentDisposition = response.GetHeader("Content-Disposition") + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_uid_import_upgrade_patch_parameters.go b/api/client/v1/v1_spectro_clusters_uid_import_upgrade_patch_parameters.go new file mode 100644 index 00000000..c9492a50 --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_uid_import_upgrade_patch_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1SpectroClustersUIDImportUpgradePatchParams creates a new V1SpectroClustersUIDImportUpgradePatchParams object +// with the default values initialized. +func NewV1SpectroClustersUIDImportUpgradePatchParams() *V1SpectroClustersUIDImportUpgradePatchParams { + var () + return &V1SpectroClustersUIDImportUpgradePatchParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1SpectroClustersUIDImportUpgradePatchParamsWithTimeout creates a new V1SpectroClustersUIDImportUpgradePatchParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1SpectroClustersUIDImportUpgradePatchParamsWithTimeout(timeout time.Duration) *V1SpectroClustersUIDImportUpgradePatchParams { + var () + return &V1SpectroClustersUIDImportUpgradePatchParams{ + + timeout: timeout, + } +} + +// NewV1SpectroClustersUIDImportUpgradePatchParamsWithContext creates a new V1SpectroClustersUIDImportUpgradePatchParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1SpectroClustersUIDImportUpgradePatchParamsWithContext(ctx context.Context) *V1SpectroClustersUIDImportUpgradePatchParams { + var () + return &V1SpectroClustersUIDImportUpgradePatchParams{ + + Context: ctx, + } +} + +// NewV1SpectroClustersUIDImportUpgradePatchParamsWithHTTPClient creates a new V1SpectroClustersUIDImportUpgradePatchParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1SpectroClustersUIDImportUpgradePatchParamsWithHTTPClient(client *http.Client) *V1SpectroClustersUIDImportUpgradePatchParams { + var () + return &V1SpectroClustersUIDImportUpgradePatchParams{ + HTTPClient: client, + } +} + +/* +V1SpectroClustersUIDImportUpgradePatchParams contains all the parameters to send to the API endpoint +for the v1 spectro clusters Uid import upgrade patch operation typically these are written to a http.Request +*/ +type V1SpectroClustersUIDImportUpgradePatchParams struct { + + /*UID + Cluster uid + + */ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 spectro clusters Uid import upgrade patch params +func (o *V1SpectroClustersUIDImportUpgradePatchParams) WithTimeout(timeout time.Duration) *V1SpectroClustersUIDImportUpgradePatchParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 spectro clusters Uid import upgrade patch params +func (o *V1SpectroClustersUIDImportUpgradePatchParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 spectro clusters Uid import upgrade patch params +func (o *V1SpectroClustersUIDImportUpgradePatchParams) WithContext(ctx context.Context) *V1SpectroClustersUIDImportUpgradePatchParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 spectro clusters Uid import upgrade patch params +func (o *V1SpectroClustersUIDImportUpgradePatchParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 spectro clusters Uid import upgrade patch params +func (o *V1SpectroClustersUIDImportUpgradePatchParams) WithHTTPClient(client *http.Client) *V1SpectroClustersUIDImportUpgradePatchParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 spectro clusters Uid import upgrade patch params +func (o *V1SpectroClustersUIDImportUpgradePatchParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithUID adds the uid to the v1 spectro clusters Uid import upgrade patch params +func (o *V1SpectroClustersUIDImportUpgradePatchParams) WithUID(uid string) *V1SpectroClustersUIDImportUpgradePatchParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 spectro clusters Uid import upgrade patch params +func (o *V1SpectroClustersUIDImportUpgradePatchParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1SpectroClustersUIDImportUpgradePatchParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_uid_import_upgrade_patch_responses.go b/api/client/v1/v1_spectro_clusters_uid_import_upgrade_patch_responses.go new file mode 100644 index 00000000..aabd6fd3 --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_uid_import_upgrade_patch_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1SpectroClustersUIDImportUpgradePatchReader is a Reader for the V1SpectroClustersUIDImportUpgradePatch structure. +type V1SpectroClustersUIDImportUpgradePatchReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1SpectroClustersUIDImportUpgradePatchReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1SpectroClustersUIDImportUpgradePatchNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1SpectroClustersUIDImportUpgradePatchNoContent creates a V1SpectroClustersUIDImportUpgradePatchNoContent with default headers values +func NewV1SpectroClustersUIDImportUpgradePatchNoContent() *V1SpectroClustersUIDImportUpgradePatchNoContent { + return &V1SpectroClustersUIDImportUpgradePatchNoContent{} +} + +/* +V1SpectroClustersUIDImportUpgradePatchNoContent handles this case with default header values. + +The resource was updated successfully +*/ +type V1SpectroClustersUIDImportUpgradePatchNoContent struct { +} + +func (o *V1SpectroClustersUIDImportUpgradePatchNoContent) Error() string { + return fmt.Sprintf("[PATCH /v1/spectroclusters/{uid}/import/upgrade][%d] v1SpectroClustersUidImportUpgradePatchNoContent ", 204) +} + +func (o *V1SpectroClustersUIDImportUpgradePatchNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_uid_kube_config_client_delete_parameters.go b/api/client/v1/v1_spectro_clusters_uid_kube_config_client_delete_parameters.go new file mode 100644 index 00000000..519f2ba0 --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_uid_kube_config_client_delete_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1SpectroClustersUIDKubeConfigClientDeleteParams creates a new V1SpectroClustersUIDKubeConfigClientDeleteParams object +// with the default values initialized. +func NewV1SpectroClustersUIDKubeConfigClientDeleteParams() *V1SpectroClustersUIDKubeConfigClientDeleteParams { + var () + return &V1SpectroClustersUIDKubeConfigClientDeleteParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1SpectroClustersUIDKubeConfigClientDeleteParamsWithTimeout creates a new V1SpectroClustersUIDKubeConfigClientDeleteParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1SpectroClustersUIDKubeConfigClientDeleteParamsWithTimeout(timeout time.Duration) *V1SpectroClustersUIDKubeConfigClientDeleteParams { + var () + return &V1SpectroClustersUIDKubeConfigClientDeleteParams{ + + timeout: timeout, + } +} + +// NewV1SpectroClustersUIDKubeConfigClientDeleteParamsWithContext creates a new V1SpectroClustersUIDKubeConfigClientDeleteParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1SpectroClustersUIDKubeConfigClientDeleteParamsWithContext(ctx context.Context) *V1SpectroClustersUIDKubeConfigClientDeleteParams { + var () + return &V1SpectroClustersUIDKubeConfigClientDeleteParams{ + + Context: ctx, + } +} + +// NewV1SpectroClustersUIDKubeConfigClientDeleteParamsWithHTTPClient creates a new V1SpectroClustersUIDKubeConfigClientDeleteParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1SpectroClustersUIDKubeConfigClientDeleteParamsWithHTTPClient(client *http.Client) *V1SpectroClustersUIDKubeConfigClientDeleteParams { + var () + return &V1SpectroClustersUIDKubeConfigClientDeleteParams{ + HTTPClient: client, + } +} + +/* +V1SpectroClustersUIDKubeConfigClientDeleteParams contains all the parameters to send to the API endpoint +for the v1 spectro clusters Uid kube config client delete operation typically these are written to a http.Request +*/ +type V1SpectroClustersUIDKubeConfigClientDeleteParams struct { + + /*UID + Cluster uid + + */ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 spectro clusters Uid kube config client delete params +func (o *V1SpectroClustersUIDKubeConfigClientDeleteParams) WithTimeout(timeout time.Duration) *V1SpectroClustersUIDKubeConfigClientDeleteParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 spectro clusters Uid kube config client delete params +func (o *V1SpectroClustersUIDKubeConfigClientDeleteParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 spectro clusters Uid kube config client delete params +func (o *V1SpectroClustersUIDKubeConfigClientDeleteParams) WithContext(ctx context.Context) *V1SpectroClustersUIDKubeConfigClientDeleteParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 spectro clusters Uid kube config client delete params +func (o *V1SpectroClustersUIDKubeConfigClientDeleteParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 spectro clusters Uid kube config client delete params +func (o *V1SpectroClustersUIDKubeConfigClientDeleteParams) WithHTTPClient(client *http.Client) *V1SpectroClustersUIDKubeConfigClientDeleteParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 spectro clusters Uid kube config client delete params +func (o *V1SpectroClustersUIDKubeConfigClientDeleteParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithUID adds the uid to the v1 spectro clusters Uid kube config client delete params +func (o *V1SpectroClustersUIDKubeConfigClientDeleteParams) WithUID(uid string) *V1SpectroClustersUIDKubeConfigClientDeleteParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 spectro clusters Uid kube config client delete params +func (o *V1SpectroClustersUIDKubeConfigClientDeleteParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1SpectroClustersUIDKubeConfigClientDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_uid_kube_config_client_delete_responses.go b/api/client/v1/v1_spectro_clusters_uid_kube_config_client_delete_responses.go new file mode 100644 index 00000000..1bdd45db --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_uid_kube_config_client_delete_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1SpectroClustersUIDKubeConfigClientDeleteReader is a Reader for the V1SpectroClustersUIDKubeConfigClientDelete structure. +type V1SpectroClustersUIDKubeConfigClientDeleteReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1SpectroClustersUIDKubeConfigClientDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1SpectroClustersUIDKubeConfigClientDeleteNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1SpectroClustersUIDKubeConfigClientDeleteNoContent creates a V1SpectroClustersUIDKubeConfigClientDeleteNoContent with default headers values +func NewV1SpectroClustersUIDKubeConfigClientDeleteNoContent() *V1SpectroClustersUIDKubeConfigClientDeleteNoContent { + return &V1SpectroClustersUIDKubeConfigClientDeleteNoContent{} +} + +/* +V1SpectroClustersUIDKubeConfigClientDeleteNoContent handles this case with default header values. + +The resource was deleted successfully +*/ +type V1SpectroClustersUIDKubeConfigClientDeleteNoContent struct { +} + +func (o *V1SpectroClustersUIDKubeConfigClientDeleteNoContent) Error() string { + return fmt.Sprintf("[DELETE /v1/spectroclusters/{uid}/assets/kubeconfigclient][%d] v1SpectroClustersUidKubeConfigClientDeleteNoContent ", 204) +} + +func (o *V1SpectroClustersUIDKubeConfigClientDeleteNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_uid_kube_config_client_get_parameters.go b/api/client/v1/v1_spectro_clusters_uid_kube_config_client_get_parameters.go new file mode 100644 index 00000000..bc368471 --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_uid_kube_config_client_get_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1SpectroClustersUIDKubeConfigClientGetParams creates a new V1SpectroClustersUIDKubeConfigClientGetParams object +// with the default values initialized. +func NewV1SpectroClustersUIDKubeConfigClientGetParams() *V1SpectroClustersUIDKubeConfigClientGetParams { + var () + return &V1SpectroClustersUIDKubeConfigClientGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1SpectroClustersUIDKubeConfigClientGetParamsWithTimeout creates a new V1SpectroClustersUIDKubeConfigClientGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1SpectroClustersUIDKubeConfigClientGetParamsWithTimeout(timeout time.Duration) *V1SpectroClustersUIDKubeConfigClientGetParams { + var () + return &V1SpectroClustersUIDKubeConfigClientGetParams{ + + timeout: timeout, + } +} + +// NewV1SpectroClustersUIDKubeConfigClientGetParamsWithContext creates a new V1SpectroClustersUIDKubeConfigClientGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1SpectroClustersUIDKubeConfigClientGetParamsWithContext(ctx context.Context) *V1SpectroClustersUIDKubeConfigClientGetParams { + var () + return &V1SpectroClustersUIDKubeConfigClientGetParams{ + + Context: ctx, + } +} + +// NewV1SpectroClustersUIDKubeConfigClientGetParamsWithHTTPClient creates a new V1SpectroClustersUIDKubeConfigClientGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1SpectroClustersUIDKubeConfigClientGetParamsWithHTTPClient(client *http.Client) *V1SpectroClustersUIDKubeConfigClientGetParams { + var () + return &V1SpectroClustersUIDKubeConfigClientGetParams{ + HTTPClient: client, + } +} + +/* +V1SpectroClustersUIDKubeConfigClientGetParams contains all the parameters to send to the API endpoint +for the v1 spectro clusters Uid kube config client get operation typically these are written to a http.Request +*/ +type V1SpectroClustersUIDKubeConfigClientGetParams struct { + + /*UID + Cluster uid + + */ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 spectro clusters Uid kube config client get params +func (o *V1SpectroClustersUIDKubeConfigClientGetParams) WithTimeout(timeout time.Duration) *V1SpectroClustersUIDKubeConfigClientGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 spectro clusters Uid kube config client get params +func (o *V1SpectroClustersUIDKubeConfigClientGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 spectro clusters Uid kube config client get params +func (o *V1SpectroClustersUIDKubeConfigClientGetParams) WithContext(ctx context.Context) *V1SpectroClustersUIDKubeConfigClientGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 spectro clusters Uid kube config client get params +func (o *V1SpectroClustersUIDKubeConfigClientGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 spectro clusters Uid kube config client get params +func (o *V1SpectroClustersUIDKubeConfigClientGetParams) WithHTTPClient(client *http.Client) *V1SpectroClustersUIDKubeConfigClientGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 spectro clusters Uid kube config client get params +func (o *V1SpectroClustersUIDKubeConfigClientGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithUID adds the uid to the v1 spectro clusters Uid kube config client get params +func (o *V1SpectroClustersUIDKubeConfigClientGetParams) WithUID(uid string) *V1SpectroClustersUIDKubeConfigClientGetParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 spectro clusters Uid kube config client get params +func (o *V1SpectroClustersUIDKubeConfigClientGetParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1SpectroClustersUIDKubeConfigClientGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_uid_kube_config_client_get_responses.go b/api/client/v1/v1_spectro_clusters_uid_kube_config_client_get_responses.go new file mode 100644 index 00000000..f2c1b014 --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_uid_kube_config_client_get_responses.go @@ -0,0 +1,74 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1SpectroClustersUIDKubeConfigClientGetReader is a Reader for the V1SpectroClustersUIDKubeConfigClientGet structure. +type V1SpectroClustersUIDKubeConfigClientGetReader struct { + formats strfmt.Registry + writer io.Writer +} + +// ReadResponse reads a server response into the received o. +func (o *V1SpectroClustersUIDKubeConfigClientGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1SpectroClustersUIDKubeConfigClientGetOK(o.writer) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1SpectroClustersUIDKubeConfigClientGetOK creates a V1SpectroClustersUIDKubeConfigClientGetOK with default headers values +func NewV1SpectroClustersUIDKubeConfigClientGetOK(writer io.Writer) *V1SpectroClustersUIDKubeConfigClientGetOK { + return &V1SpectroClustersUIDKubeConfigClientGetOK{ + Payload: writer, + } +} + +/* +V1SpectroClustersUIDKubeConfigClientGetOK handles this case with default header values. + +download file +*/ +type V1SpectroClustersUIDKubeConfigClientGetOK struct { + ContentDisposition string + + Payload io.Writer +} + +func (o *V1SpectroClustersUIDKubeConfigClientGetOK) Error() string { + return fmt.Sprintf("[GET /v1/spectroclusters/{uid}/assets/kubeconfigclient][%d] v1SpectroClustersUidKubeConfigClientGetOK %+v", 200, o.Payload) +} + +func (o *V1SpectroClustersUIDKubeConfigClientGetOK) GetPayload() io.Writer { + return o.Payload +} + +func (o *V1SpectroClustersUIDKubeConfigClientGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Content-Disposition + o.ContentDisposition = response.GetHeader("Content-Disposition") + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_uid_kube_config_client_update_parameters.go b/api/client/v1/v1_spectro_clusters_uid_kube_config_client_update_parameters.go new file mode 100644 index 00000000..afe6ddaf --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_uid_kube_config_client_update_parameters.go @@ -0,0 +1,157 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1SpectroClustersUIDKubeConfigClientUpdateParams creates a new V1SpectroClustersUIDKubeConfigClientUpdateParams object +// with the default values initialized. +func NewV1SpectroClustersUIDKubeConfigClientUpdateParams() *V1SpectroClustersUIDKubeConfigClientUpdateParams { + var () + return &V1SpectroClustersUIDKubeConfigClientUpdateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1SpectroClustersUIDKubeConfigClientUpdateParamsWithTimeout creates a new V1SpectroClustersUIDKubeConfigClientUpdateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1SpectroClustersUIDKubeConfigClientUpdateParamsWithTimeout(timeout time.Duration) *V1SpectroClustersUIDKubeConfigClientUpdateParams { + var () + return &V1SpectroClustersUIDKubeConfigClientUpdateParams{ + + timeout: timeout, + } +} + +// NewV1SpectroClustersUIDKubeConfigClientUpdateParamsWithContext creates a new V1SpectroClustersUIDKubeConfigClientUpdateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1SpectroClustersUIDKubeConfigClientUpdateParamsWithContext(ctx context.Context) *V1SpectroClustersUIDKubeConfigClientUpdateParams { + var () + return &V1SpectroClustersUIDKubeConfigClientUpdateParams{ + + Context: ctx, + } +} + +// NewV1SpectroClustersUIDKubeConfigClientUpdateParamsWithHTTPClient creates a new V1SpectroClustersUIDKubeConfigClientUpdateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1SpectroClustersUIDKubeConfigClientUpdateParamsWithHTTPClient(client *http.Client) *V1SpectroClustersUIDKubeConfigClientUpdateParams { + var () + return &V1SpectroClustersUIDKubeConfigClientUpdateParams{ + HTTPClient: client, + } +} + +/* +V1SpectroClustersUIDKubeConfigClientUpdateParams contains all the parameters to send to the API endpoint +for the v1 spectro clusters Uid kube config client update operation typically these are written to a http.Request +*/ +type V1SpectroClustersUIDKubeConfigClientUpdateParams struct { + + /*Body*/ + Body *models.V1SpectroClusterAssetKubeConfigClient + /*UID + Cluster uid + + */ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 spectro clusters Uid kube config client update params +func (o *V1SpectroClustersUIDKubeConfigClientUpdateParams) WithTimeout(timeout time.Duration) *V1SpectroClustersUIDKubeConfigClientUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 spectro clusters Uid kube config client update params +func (o *V1SpectroClustersUIDKubeConfigClientUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 spectro clusters Uid kube config client update params +func (o *V1SpectroClustersUIDKubeConfigClientUpdateParams) WithContext(ctx context.Context) *V1SpectroClustersUIDKubeConfigClientUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 spectro clusters Uid kube config client update params +func (o *V1SpectroClustersUIDKubeConfigClientUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 spectro clusters Uid kube config client update params +func (o *V1SpectroClustersUIDKubeConfigClientUpdateParams) WithHTTPClient(client *http.Client) *V1SpectroClustersUIDKubeConfigClientUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 spectro clusters Uid kube config client update params +func (o *V1SpectroClustersUIDKubeConfigClientUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 spectro clusters Uid kube config client update params +func (o *V1SpectroClustersUIDKubeConfigClientUpdateParams) WithBody(body *models.V1SpectroClusterAssetKubeConfigClient) *V1SpectroClustersUIDKubeConfigClientUpdateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 spectro clusters Uid kube config client update params +func (o *V1SpectroClustersUIDKubeConfigClientUpdateParams) SetBody(body *models.V1SpectroClusterAssetKubeConfigClient) { + o.Body = body +} + +// WithUID adds the uid to the v1 spectro clusters Uid kube config client update params +func (o *V1SpectroClustersUIDKubeConfigClientUpdateParams) WithUID(uid string) *V1SpectroClustersUIDKubeConfigClientUpdateParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 spectro clusters Uid kube config client update params +func (o *V1SpectroClustersUIDKubeConfigClientUpdateParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1SpectroClustersUIDKubeConfigClientUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_uid_kube_config_client_update_responses.go b/api/client/v1/v1_spectro_clusters_uid_kube_config_client_update_responses.go new file mode 100644 index 00000000..4977aecc --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_uid_kube_config_client_update_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1SpectroClustersUIDKubeConfigClientUpdateReader is a Reader for the V1SpectroClustersUIDKubeConfigClientUpdate structure. +type V1SpectroClustersUIDKubeConfigClientUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1SpectroClustersUIDKubeConfigClientUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1SpectroClustersUIDKubeConfigClientUpdateNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1SpectroClustersUIDKubeConfigClientUpdateNoContent creates a V1SpectroClustersUIDKubeConfigClientUpdateNoContent with default headers values +func NewV1SpectroClustersUIDKubeConfigClientUpdateNoContent() *V1SpectroClustersUIDKubeConfigClientUpdateNoContent { + return &V1SpectroClustersUIDKubeConfigClientUpdateNoContent{} +} + +/* +V1SpectroClustersUIDKubeConfigClientUpdateNoContent handles this case with default header values. + +The resource was updated successfully +*/ +type V1SpectroClustersUIDKubeConfigClientUpdateNoContent struct { +} + +func (o *V1SpectroClustersUIDKubeConfigClientUpdateNoContent) Error() string { + return fmt.Sprintf("[PUT /v1/spectroclusters/{uid}/assets/kubeconfigclient][%d] v1SpectroClustersUidKubeConfigClientUpdateNoContent ", 204) +} + +func (o *V1SpectroClustersUIDKubeConfigClientUpdateNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_uid_kube_config_parameters.go b/api/client/v1/v1_spectro_clusters_uid_kube_config_parameters.go new file mode 100644 index 00000000..cb46d8c8 --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_uid_kube_config_parameters.go @@ -0,0 +1,181 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// NewV1SpectroClustersUIDKubeConfigParams creates a new V1SpectroClustersUIDKubeConfigParams object +// with the default values initialized. +func NewV1SpectroClustersUIDKubeConfigParams() *V1SpectroClustersUIDKubeConfigParams { + var ( + frpDefault = bool(true) + ) + return &V1SpectroClustersUIDKubeConfigParams{ + Frp: &frpDefault, + + timeout: cr.DefaultTimeout, + } +} + +// NewV1SpectroClustersUIDKubeConfigParamsWithTimeout creates a new V1SpectroClustersUIDKubeConfigParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1SpectroClustersUIDKubeConfigParamsWithTimeout(timeout time.Duration) *V1SpectroClustersUIDKubeConfigParams { + var ( + frpDefault = bool(true) + ) + return &V1SpectroClustersUIDKubeConfigParams{ + Frp: &frpDefault, + + timeout: timeout, + } +} + +// NewV1SpectroClustersUIDKubeConfigParamsWithContext creates a new V1SpectroClustersUIDKubeConfigParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1SpectroClustersUIDKubeConfigParamsWithContext(ctx context.Context) *V1SpectroClustersUIDKubeConfigParams { + var ( + frpDefault = bool(true) + ) + return &V1SpectroClustersUIDKubeConfigParams{ + Frp: &frpDefault, + + Context: ctx, + } +} + +// NewV1SpectroClustersUIDKubeConfigParamsWithHTTPClient creates a new V1SpectroClustersUIDKubeConfigParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1SpectroClustersUIDKubeConfigParamsWithHTTPClient(client *http.Client) *V1SpectroClustersUIDKubeConfigParams { + var ( + frpDefault = bool(true) + ) + return &V1SpectroClustersUIDKubeConfigParams{ + Frp: &frpDefault, + HTTPClient: client, + } +} + +/* +V1SpectroClustersUIDKubeConfigParams contains all the parameters to send to the API endpoint +for the v1 spectro clusters Uid kube config operation typically these are written to a http.Request +*/ +type V1SpectroClustersUIDKubeConfigParams struct { + + /*Frp + FRP (reverse-proxy) based kube config will be returned if available + + */ + Frp *bool + /*UID + Cluster uid + + */ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 spectro clusters Uid kube config params +func (o *V1SpectroClustersUIDKubeConfigParams) WithTimeout(timeout time.Duration) *V1SpectroClustersUIDKubeConfigParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 spectro clusters Uid kube config params +func (o *V1SpectroClustersUIDKubeConfigParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 spectro clusters Uid kube config params +func (o *V1SpectroClustersUIDKubeConfigParams) WithContext(ctx context.Context) *V1SpectroClustersUIDKubeConfigParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 spectro clusters Uid kube config params +func (o *V1SpectroClustersUIDKubeConfigParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 spectro clusters Uid kube config params +func (o *V1SpectroClustersUIDKubeConfigParams) WithHTTPClient(client *http.Client) *V1SpectroClustersUIDKubeConfigParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 spectro clusters Uid kube config params +func (o *V1SpectroClustersUIDKubeConfigParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithFrp adds the frp to the v1 spectro clusters Uid kube config params +func (o *V1SpectroClustersUIDKubeConfigParams) WithFrp(frp *bool) *V1SpectroClustersUIDKubeConfigParams { + o.SetFrp(frp) + return o +} + +// SetFrp adds the frp to the v1 spectro clusters Uid kube config params +func (o *V1SpectroClustersUIDKubeConfigParams) SetFrp(frp *bool) { + o.Frp = frp +} + +// WithUID adds the uid to the v1 spectro clusters Uid kube config params +func (o *V1SpectroClustersUIDKubeConfigParams) WithUID(uid string) *V1SpectroClustersUIDKubeConfigParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 spectro clusters Uid kube config params +func (o *V1SpectroClustersUIDKubeConfigParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1SpectroClustersUIDKubeConfigParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Frp != nil { + + // query param frp + var qrFrp bool + if o.Frp != nil { + qrFrp = *o.Frp + } + qFrp := swag.FormatBool(qrFrp) + if qFrp != "" { + if err := r.SetQueryParam("frp", qFrp); err != nil { + return err + } + } + + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_uid_kube_config_responses.go b/api/client/v1/v1_spectro_clusters_uid_kube_config_responses.go new file mode 100644 index 00000000..02b02299 --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_uid_kube_config_responses.go @@ -0,0 +1,74 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1SpectroClustersUIDKubeConfigReader is a Reader for the V1SpectroClustersUIDKubeConfig structure. +type V1SpectroClustersUIDKubeConfigReader struct { + formats strfmt.Registry + writer io.Writer +} + +// ReadResponse reads a server response into the received o. +func (o *V1SpectroClustersUIDKubeConfigReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1SpectroClustersUIDKubeConfigOK(o.writer) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1SpectroClustersUIDKubeConfigOK creates a V1SpectroClustersUIDKubeConfigOK with default headers values +func NewV1SpectroClustersUIDKubeConfigOK(writer io.Writer) *V1SpectroClustersUIDKubeConfigOK { + return &V1SpectroClustersUIDKubeConfigOK{ + Payload: writer, + } +} + +/* +V1SpectroClustersUIDKubeConfigOK handles this case with default header values. + +download file +*/ +type V1SpectroClustersUIDKubeConfigOK struct { + ContentDisposition string + + Payload io.Writer +} + +func (o *V1SpectroClustersUIDKubeConfigOK) Error() string { + return fmt.Sprintf("[GET /v1/spectroclusters/{uid}/assets/kubeconfig][%d] v1SpectroClustersUidKubeConfigOK %+v", 200, o.Payload) +} + +func (o *V1SpectroClustersUIDKubeConfigOK) GetPayload() io.Writer { + return o.Payload +} + +func (o *V1SpectroClustersUIDKubeConfigOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Content-Disposition + o.ContentDisposition = response.GetHeader("Content-Disposition") + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_uid_kube_config_update_parameters.go b/api/client/v1/v1_spectro_clusters_uid_kube_config_update_parameters.go new file mode 100644 index 00000000..7dc7ae24 --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_uid_kube_config_update_parameters.go @@ -0,0 +1,157 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1SpectroClustersUIDKubeConfigUpdateParams creates a new V1SpectroClustersUIDKubeConfigUpdateParams object +// with the default values initialized. +func NewV1SpectroClustersUIDKubeConfigUpdateParams() *V1SpectroClustersUIDKubeConfigUpdateParams { + var () + return &V1SpectroClustersUIDKubeConfigUpdateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1SpectroClustersUIDKubeConfigUpdateParamsWithTimeout creates a new V1SpectroClustersUIDKubeConfigUpdateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1SpectroClustersUIDKubeConfigUpdateParamsWithTimeout(timeout time.Duration) *V1SpectroClustersUIDKubeConfigUpdateParams { + var () + return &V1SpectroClustersUIDKubeConfigUpdateParams{ + + timeout: timeout, + } +} + +// NewV1SpectroClustersUIDKubeConfigUpdateParamsWithContext creates a new V1SpectroClustersUIDKubeConfigUpdateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1SpectroClustersUIDKubeConfigUpdateParamsWithContext(ctx context.Context) *V1SpectroClustersUIDKubeConfigUpdateParams { + var () + return &V1SpectroClustersUIDKubeConfigUpdateParams{ + + Context: ctx, + } +} + +// NewV1SpectroClustersUIDKubeConfigUpdateParamsWithHTTPClient creates a new V1SpectroClustersUIDKubeConfigUpdateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1SpectroClustersUIDKubeConfigUpdateParamsWithHTTPClient(client *http.Client) *V1SpectroClustersUIDKubeConfigUpdateParams { + var () + return &V1SpectroClustersUIDKubeConfigUpdateParams{ + HTTPClient: client, + } +} + +/* +V1SpectroClustersUIDKubeConfigUpdateParams contains all the parameters to send to the API endpoint +for the v1 spectro clusters Uid kube config update operation typically these are written to a http.Request +*/ +type V1SpectroClustersUIDKubeConfigUpdateParams struct { + + /*Body*/ + Body *models.V1SpectroClusterAssetKubeConfig + /*UID + Cluster uid + + */ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 spectro clusters Uid kube config update params +func (o *V1SpectroClustersUIDKubeConfigUpdateParams) WithTimeout(timeout time.Duration) *V1SpectroClustersUIDKubeConfigUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 spectro clusters Uid kube config update params +func (o *V1SpectroClustersUIDKubeConfigUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 spectro clusters Uid kube config update params +func (o *V1SpectroClustersUIDKubeConfigUpdateParams) WithContext(ctx context.Context) *V1SpectroClustersUIDKubeConfigUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 spectro clusters Uid kube config update params +func (o *V1SpectroClustersUIDKubeConfigUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 spectro clusters Uid kube config update params +func (o *V1SpectroClustersUIDKubeConfigUpdateParams) WithHTTPClient(client *http.Client) *V1SpectroClustersUIDKubeConfigUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 spectro clusters Uid kube config update params +func (o *V1SpectroClustersUIDKubeConfigUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 spectro clusters Uid kube config update params +func (o *V1SpectroClustersUIDKubeConfigUpdateParams) WithBody(body *models.V1SpectroClusterAssetKubeConfig) *V1SpectroClustersUIDKubeConfigUpdateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 spectro clusters Uid kube config update params +func (o *V1SpectroClustersUIDKubeConfigUpdateParams) SetBody(body *models.V1SpectroClusterAssetKubeConfig) { + o.Body = body +} + +// WithUID adds the uid to the v1 spectro clusters Uid kube config update params +func (o *V1SpectroClustersUIDKubeConfigUpdateParams) WithUID(uid string) *V1SpectroClustersUIDKubeConfigUpdateParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 spectro clusters Uid kube config update params +func (o *V1SpectroClustersUIDKubeConfigUpdateParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1SpectroClustersUIDKubeConfigUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_uid_kube_config_update_responses.go b/api/client/v1/v1_spectro_clusters_uid_kube_config_update_responses.go new file mode 100644 index 00000000..fed5d1e3 --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_uid_kube_config_update_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1SpectroClustersUIDKubeConfigUpdateReader is a Reader for the V1SpectroClustersUIDKubeConfigUpdate structure. +type V1SpectroClustersUIDKubeConfigUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1SpectroClustersUIDKubeConfigUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1SpectroClustersUIDKubeConfigUpdateNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1SpectroClustersUIDKubeConfigUpdateNoContent creates a V1SpectroClustersUIDKubeConfigUpdateNoContent with default headers values +func NewV1SpectroClustersUIDKubeConfigUpdateNoContent() *V1SpectroClustersUIDKubeConfigUpdateNoContent { + return &V1SpectroClustersUIDKubeConfigUpdateNoContent{} +} + +/* +V1SpectroClustersUIDKubeConfigUpdateNoContent handles this case with default header values. + +The resource was updated successfully +*/ +type V1SpectroClustersUIDKubeConfigUpdateNoContent struct { +} + +func (o *V1SpectroClustersUIDKubeConfigUpdateNoContent) Error() string { + return fmt.Sprintf("[PUT /v1/spectroclusters/{uid}/assets/kubeconfig][%d] v1SpectroClustersUidKubeConfigUpdateNoContent ", 204) +} + +func (o *V1SpectroClustersUIDKubeConfigUpdateNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_uid_kube_ctl_redirect_parameters.go b/api/client/v1/v1_spectro_clusters_uid_kube_ctl_redirect_parameters.go new file mode 100644 index 00000000..b5b5a675 --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_uid_kube_ctl_redirect_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1SpectroClustersUIDKubeCtlRedirectParams creates a new V1SpectroClustersUIDKubeCtlRedirectParams object +// with the default values initialized. +func NewV1SpectroClustersUIDKubeCtlRedirectParams() *V1SpectroClustersUIDKubeCtlRedirectParams { + var () + return &V1SpectroClustersUIDKubeCtlRedirectParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1SpectroClustersUIDKubeCtlRedirectParamsWithTimeout creates a new V1SpectroClustersUIDKubeCtlRedirectParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1SpectroClustersUIDKubeCtlRedirectParamsWithTimeout(timeout time.Duration) *V1SpectroClustersUIDKubeCtlRedirectParams { + var () + return &V1SpectroClustersUIDKubeCtlRedirectParams{ + + timeout: timeout, + } +} + +// NewV1SpectroClustersUIDKubeCtlRedirectParamsWithContext creates a new V1SpectroClustersUIDKubeCtlRedirectParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1SpectroClustersUIDKubeCtlRedirectParamsWithContext(ctx context.Context) *V1SpectroClustersUIDKubeCtlRedirectParams { + var () + return &V1SpectroClustersUIDKubeCtlRedirectParams{ + + Context: ctx, + } +} + +// NewV1SpectroClustersUIDKubeCtlRedirectParamsWithHTTPClient creates a new V1SpectroClustersUIDKubeCtlRedirectParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1SpectroClustersUIDKubeCtlRedirectParamsWithHTTPClient(client *http.Client) *V1SpectroClustersUIDKubeCtlRedirectParams { + var () + return &V1SpectroClustersUIDKubeCtlRedirectParams{ + HTTPClient: client, + } +} + +/* +V1SpectroClustersUIDKubeCtlRedirectParams contains all the parameters to send to the API endpoint +for the v1 spectro clusters Uid kube ctl redirect operation typically these are written to a http.Request +*/ +type V1SpectroClustersUIDKubeCtlRedirectParams struct { + + /*UID + Cluster uid + + */ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 spectro clusters Uid kube ctl redirect params +func (o *V1SpectroClustersUIDKubeCtlRedirectParams) WithTimeout(timeout time.Duration) *V1SpectroClustersUIDKubeCtlRedirectParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 spectro clusters Uid kube ctl redirect params +func (o *V1SpectroClustersUIDKubeCtlRedirectParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 spectro clusters Uid kube ctl redirect params +func (o *V1SpectroClustersUIDKubeCtlRedirectParams) WithContext(ctx context.Context) *V1SpectroClustersUIDKubeCtlRedirectParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 spectro clusters Uid kube ctl redirect params +func (o *V1SpectroClustersUIDKubeCtlRedirectParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 spectro clusters Uid kube ctl redirect params +func (o *V1SpectroClustersUIDKubeCtlRedirectParams) WithHTTPClient(client *http.Client) *V1SpectroClustersUIDKubeCtlRedirectParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 spectro clusters Uid kube ctl redirect params +func (o *V1SpectroClustersUIDKubeCtlRedirectParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithUID adds the uid to the v1 spectro clusters Uid kube ctl redirect params +func (o *V1SpectroClustersUIDKubeCtlRedirectParams) WithUID(uid string) *V1SpectroClustersUIDKubeCtlRedirectParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 spectro clusters Uid kube ctl redirect params +func (o *V1SpectroClustersUIDKubeCtlRedirectParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1SpectroClustersUIDKubeCtlRedirectParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_uid_kube_ctl_redirect_responses.go b/api/client/v1/v1_spectro_clusters_uid_kube_ctl_redirect_responses.go new file mode 100644 index 00000000..333e12a7 --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_uid_kube_ctl_redirect_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1SpectroClustersUIDKubeCtlRedirectReader is a Reader for the V1SpectroClustersUIDKubeCtlRedirect structure. +type V1SpectroClustersUIDKubeCtlRedirectReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1SpectroClustersUIDKubeCtlRedirectReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1SpectroClustersUIDKubeCtlRedirectOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1SpectroClustersUIDKubeCtlRedirectOK creates a V1SpectroClustersUIDKubeCtlRedirectOK with default headers values +func NewV1SpectroClustersUIDKubeCtlRedirectOK() *V1SpectroClustersUIDKubeCtlRedirectOK { + return &V1SpectroClustersUIDKubeCtlRedirectOK{} +} + +/* +V1SpectroClustersUIDKubeCtlRedirectOK handles this case with default header values. + +(empty) +*/ +type V1SpectroClustersUIDKubeCtlRedirectOK struct { + Payload *models.V1SpectroClusterKubeCtlRedirect +} + +func (o *V1SpectroClustersUIDKubeCtlRedirectOK) Error() string { + return fmt.Sprintf("[GET /v1/spectroclusters/{uid}/kubectl/redirect][%d] v1SpectroClustersUidKubeCtlRedirectOK %+v", 200, o.Payload) +} + +func (o *V1SpectroClustersUIDKubeCtlRedirectOK) GetPayload() *models.V1SpectroClusterKubeCtlRedirect { + return o.Payload +} + +func (o *V1SpectroClustersUIDKubeCtlRedirectOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1SpectroClusterKubeCtlRedirect) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_uid_lifecycle_config_update_parameters.go b/api/client/v1/v1_spectro_clusters_uid_lifecycle_config_update_parameters.go new file mode 100644 index 00000000..6bd7cff5 --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_uid_lifecycle_config_update_parameters.go @@ -0,0 +1,157 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1SpectroClustersUIDLifecycleConfigUpdateParams creates a new V1SpectroClustersUIDLifecycleConfigUpdateParams object +// with the default values initialized. +func NewV1SpectroClustersUIDLifecycleConfigUpdateParams() *V1SpectroClustersUIDLifecycleConfigUpdateParams { + var () + return &V1SpectroClustersUIDLifecycleConfigUpdateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1SpectroClustersUIDLifecycleConfigUpdateParamsWithTimeout creates a new V1SpectroClustersUIDLifecycleConfigUpdateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1SpectroClustersUIDLifecycleConfigUpdateParamsWithTimeout(timeout time.Duration) *V1SpectroClustersUIDLifecycleConfigUpdateParams { + var () + return &V1SpectroClustersUIDLifecycleConfigUpdateParams{ + + timeout: timeout, + } +} + +// NewV1SpectroClustersUIDLifecycleConfigUpdateParamsWithContext creates a new V1SpectroClustersUIDLifecycleConfigUpdateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1SpectroClustersUIDLifecycleConfigUpdateParamsWithContext(ctx context.Context) *V1SpectroClustersUIDLifecycleConfigUpdateParams { + var () + return &V1SpectroClustersUIDLifecycleConfigUpdateParams{ + + Context: ctx, + } +} + +// NewV1SpectroClustersUIDLifecycleConfigUpdateParamsWithHTTPClient creates a new V1SpectroClustersUIDLifecycleConfigUpdateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1SpectroClustersUIDLifecycleConfigUpdateParamsWithHTTPClient(client *http.Client) *V1SpectroClustersUIDLifecycleConfigUpdateParams { + var () + return &V1SpectroClustersUIDLifecycleConfigUpdateParams{ + HTTPClient: client, + } +} + +/* +V1SpectroClustersUIDLifecycleConfigUpdateParams contains all the parameters to send to the API endpoint +for the v1 spectro clusters Uid lifecycle config update operation typically these are written to a http.Request +*/ +type V1SpectroClustersUIDLifecycleConfigUpdateParams struct { + + /*Body*/ + Body *models.V1LifecycleConfigEntity + /*UID + Cluster uid + + */ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 spectro clusters Uid lifecycle config update params +func (o *V1SpectroClustersUIDLifecycleConfigUpdateParams) WithTimeout(timeout time.Duration) *V1SpectroClustersUIDLifecycleConfigUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 spectro clusters Uid lifecycle config update params +func (o *V1SpectroClustersUIDLifecycleConfigUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 spectro clusters Uid lifecycle config update params +func (o *V1SpectroClustersUIDLifecycleConfigUpdateParams) WithContext(ctx context.Context) *V1SpectroClustersUIDLifecycleConfigUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 spectro clusters Uid lifecycle config update params +func (o *V1SpectroClustersUIDLifecycleConfigUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 spectro clusters Uid lifecycle config update params +func (o *V1SpectroClustersUIDLifecycleConfigUpdateParams) WithHTTPClient(client *http.Client) *V1SpectroClustersUIDLifecycleConfigUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 spectro clusters Uid lifecycle config update params +func (o *V1SpectroClustersUIDLifecycleConfigUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 spectro clusters Uid lifecycle config update params +func (o *V1SpectroClustersUIDLifecycleConfigUpdateParams) WithBody(body *models.V1LifecycleConfigEntity) *V1SpectroClustersUIDLifecycleConfigUpdateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 spectro clusters Uid lifecycle config update params +func (o *V1SpectroClustersUIDLifecycleConfigUpdateParams) SetBody(body *models.V1LifecycleConfigEntity) { + o.Body = body +} + +// WithUID adds the uid to the v1 spectro clusters Uid lifecycle config update params +func (o *V1SpectroClustersUIDLifecycleConfigUpdateParams) WithUID(uid string) *V1SpectroClustersUIDLifecycleConfigUpdateParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 spectro clusters Uid lifecycle config update params +func (o *V1SpectroClustersUIDLifecycleConfigUpdateParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1SpectroClustersUIDLifecycleConfigUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_uid_lifecycle_config_update_responses.go b/api/client/v1/v1_spectro_clusters_uid_lifecycle_config_update_responses.go new file mode 100644 index 00000000..d85f5dc5 --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_uid_lifecycle_config_update_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1SpectroClustersUIDLifecycleConfigUpdateReader is a Reader for the V1SpectroClustersUIDLifecycleConfigUpdate structure. +type V1SpectroClustersUIDLifecycleConfigUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1SpectroClustersUIDLifecycleConfigUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1SpectroClustersUIDLifecycleConfigUpdateNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1SpectroClustersUIDLifecycleConfigUpdateNoContent creates a V1SpectroClustersUIDLifecycleConfigUpdateNoContent with default headers values +func NewV1SpectroClustersUIDLifecycleConfigUpdateNoContent() *V1SpectroClustersUIDLifecycleConfigUpdateNoContent { + return &V1SpectroClustersUIDLifecycleConfigUpdateNoContent{} +} + +/* +V1SpectroClustersUIDLifecycleConfigUpdateNoContent handles this case with default header values. + +The resource was updated successfully +*/ +type V1SpectroClustersUIDLifecycleConfigUpdateNoContent struct { +} + +func (o *V1SpectroClustersUIDLifecycleConfigUpdateNoContent) Error() string { + return fmt.Sprintf("[PATCH /v1/spectroclusters/{uid}/clusterConfig/lifecycleConfig][%d] v1SpectroClustersUidLifecycleConfigUpdateNoContent ", 204) +} + +func (o *V1SpectroClustersUIDLifecycleConfigUpdateNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_uid_location_put_parameters.go b/api/client/v1/v1_spectro_clusters_uid_location_put_parameters.go new file mode 100644 index 00000000..da17de91 --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_uid_location_put_parameters.go @@ -0,0 +1,157 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1SpectroClustersUIDLocationPutParams creates a new V1SpectroClustersUIDLocationPutParams object +// with the default values initialized. +func NewV1SpectroClustersUIDLocationPutParams() *V1SpectroClustersUIDLocationPutParams { + var () + return &V1SpectroClustersUIDLocationPutParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1SpectroClustersUIDLocationPutParamsWithTimeout creates a new V1SpectroClustersUIDLocationPutParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1SpectroClustersUIDLocationPutParamsWithTimeout(timeout time.Duration) *V1SpectroClustersUIDLocationPutParams { + var () + return &V1SpectroClustersUIDLocationPutParams{ + + timeout: timeout, + } +} + +// NewV1SpectroClustersUIDLocationPutParamsWithContext creates a new V1SpectroClustersUIDLocationPutParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1SpectroClustersUIDLocationPutParamsWithContext(ctx context.Context) *V1SpectroClustersUIDLocationPutParams { + var () + return &V1SpectroClustersUIDLocationPutParams{ + + Context: ctx, + } +} + +// NewV1SpectroClustersUIDLocationPutParamsWithHTTPClient creates a new V1SpectroClustersUIDLocationPutParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1SpectroClustersUIDLocationPutParamsWithHTTPClient(client *http.Client) *V1SpectroClustersUIDLocationPutParams { + var () + return &V1SpectroClustersUIDLocationPutParams{ + HTTPClient: client, + } +} + +/* +V1SpectroClustersUIDLocationPutParams contains all the parameters to send to the API endpoint +for the v1 spectro clusters Uid location put operation typically these are written to a http.Request +*/ +type V1SpectroClustersUIDLocationPutParams struct { + + /*Body*/ + Body *models.V1SpectroClusterLocationInputEntity + /*UID + Cluster uid + + */ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 spectro clusters Uid location put params +func (o *V1SpectroClustersUIDLocationPutParams) WithTimeout(timeout time.Duration) *V1SpectroClustersUIDLocationPutParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 spectro clusters Uid location put params +func (o *V1SpectroClustersUIDLocationPutParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 spectro clusters Uid location put params +func (o *V1SpectroClustersUIDLocationPutParams) WithContext(ctx context.Context) *V1SpectroClustersUIDLocationPutParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 spectro clusters Uid location put params +func (o *V1SpectroClustersUIDLocationPutParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 spectro clusters Uid location put params +func (o *V1SpectroClustersUIDLocationPutParams) WithHTTPClient(client *http.Client) *V1SpectroClustersUIDLocationPutParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 spectro clusters Uid location put params +func (o *V1SpectroClustersUIDLocationPutParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 spectro clusters Uid location put params +func (o *V1SpectroClustersUIDLocationPutParams) WithBody(body *models.V1SpectroClusterLocationInputEntity) *V1SpectroClustersUIDLocationPutParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 spectro clusters Uid location put params +func (o *V1SpectroClustersUIDLocationPutParams) SetBody(body *models.V1SpectroClusterLocationInputEntity) { + o.Body = body +} + +// WithUID adds the uid to the v1 spectro clusters Uid location put params +func (o *V1SpectroClustersUIDLocationPutParams) WithUID(uid string) *V1SpectroClustersUIDLocationPutParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 spectro clusters Uid location put params +func (o *V1SpectroClustersUIDLocationPutParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1SpectroClustersUIDLocationPutParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_uid_location_put_responses.go b/api/client/v1/v1_spectro_clusters_uid_location_put_responses.go new file mode 100644 index 00000000..bc2b84cb --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_uid_location_put_responses.go @@ -0,0 +1,61 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1SpectroClustersUIDLocationPutReader is a Reader for the V1SpectroClustersUIDLocationPut structure. +type V1SpectroClustersUIDLocationPutReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1SpectroClustersUIDLocationPutReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1SpectroClustersUIDLocationPutNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1SpectroClustersUIDLocationPutNoContent creates a V1SpectroClustersUIDLocationPutNoContent with default headers values +func NewV1SpectroClustersUIDLocationPutNoContent() *V1SpectroClustersUIDLocationPutNoContent { + return &V1SpectroClustersUIDLocationPutNoContent{} +} + +/* +V1SpectroClustersUIDLocationPutNoContent handles this case with default header values. + +Ok response without content +*/ +type V1SpectroClustersUIDLocationPutNoContent struct { + /*Audit uid for the request + */ + AuditUID string +} + +func (o *V1SpectroClustersUIDLocationPutNoContent) Error() string { + return fmt.Sprintf("[PUT /v1/spectroclusters/{uid}/location][%d] v1SpectroClustersUidLocationPutNoContent ", 204) +} + +func (o *V1SpectroClustersUIDLocationPutNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header AuditUid + o.AuditUID = response.GetHeader("AuditUid") + + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_uid_manifest_get_parameters.go b/api/client/v1/v1_spectro_clusters_uid_manifest_get_parameters.go new file mode 100644 index 00000000..1a3381ae --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_uid_manifest_get_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1SpectroClustersUIDManifestGetParams creates a new V1SpectroClustersUIDManifestGetParams object +// with the default values initialized. +func NewV1SpectroClustersUIDManifestGetParams() *V1SpectroClustersUIDManifestGetParams { + var () + return &V1SpectroClustersUIDManifestGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1SpectroClustersUIDManifestGetParamsWithTimeout creates a new V1SpectroClustersUIDManifestGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1SpectroClustersUIDManifestGetParamsWithTimeout(timeout time.Duration) *V1SpectroClustersUIDManifestGetParams { + var () + return &V1SpectroClustersUIDManifestGetParams{ + + timeout: timeout, + } +} + +// NewV1SpectroClustersUIDManifestGetParamsWithContext creates a new V1SpectroClustersUIDManifestGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1SpectroClustersUIDManifestGetParamsWithContext(ctx context.Context) *V1SpectroClustersUIDManifestGetParams { + var () + return &V1SpectroClustersUIDManifestGetParams{ + + Context: ctx, + } +} + +// NewV1SpectroClustersUIDManifestGetParamsWithHTTPClient creates a new V1SpectroClustersUIDManifestGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1SpectroClustersUIDManifestGetParamsWithHTTPClient(client *http.Client) *V1SpectroClustersUIDManifestGetParams { + var () + return &V1SpectroClustersUIDManifestGetParams{ + HTTPClient: client, + } +} + +/* +V1SpectroClustersUIDManifestGetParams contains all the parameters to send to the API endpoint +for the v1 spectro clusters Uid manifest get operation typically these are written to a http.Request +*/ +type V1SpectroClustersUIDManifestGetParams struct { + + /*UID + Cluster uid + + */ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 spectro clusters Uid manifest get params +func (o *V1SpectroClustersUIDManifestGetParams) WithTimeout(timeout time.Duration) *V1SpectroClustersUIDManifestGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 spectro clusters Uid manifest get params +func (o *V1SpectroClustersUIDManifestGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 spectro clusters Uid manifest get params +func (o *V1SpectroClustersUIDManifestGetParams) WithContext(ctx context.Context) *V1SpectroClustersUIDManifestGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 spectro clusters Uid manifest get params +func (o *V1SpectroClustersUIDManifestGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 spectro clusters Uid manifest get params +func (o *V1SpectroClustersUIDManifestGetParams) WithHTTPClient(client *http.Client) *V1SpectroClustersUIDManifestGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 spectro clusters Uid manifest get params +func (o *V1SpectroClustersUIDManifestGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithUID adds the uid to the v1 spectro clusters Uid manifest get params +func (o *V1SpectroClustersUIDManifestGetParams) WithUID(uid string) *V1SpectroClustersUIDManifestGetParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 spectro clusters Uid manifest get params +func (o *V1SpectroClustersUIDManifestGetParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1SpectroClustersUIDManifestGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_uid_manifest_get_responses.go b/api/client/v1/v1_spectro_clusters_uid_manifest_get_responses.go new file mode 100644 index 00000000..3b40bdfe --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_uid_manifest_get_responses.go @@ -0,0 +1,66 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1SpectroClustersUIDManifestGetReader is a Reader for the V1SpectroClustersUIDManifestGet structure. +type V1SpectroClustersUIDManifestGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1SpectroClustersUIDManifestGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1SpectroClustersUIDManifestGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1SpectroClustersUIDManifestGetOK creates a V1SpectroClustersUIDManifestGetOK with default headers values +func NewV1SpectroClustersUIDManifestGetOK() *V1SpectroClustersUIDManifestGetOK { + return &V1SpectroClustersUIDManifestGetOK{} +} + +/* +V1SpectroClustersUIDManifestGetOK handles this case with default header values. + +OK +*/ +type V1SpectroClustersUIDManifestGetOK struct { + Payload string +} + +func (o *V1SpectroClustersUIDManifestGetOK) Error() string { + return fmt.Sprintf("[GET /v1/spectroclusters/{uid}/assets/manifest][%d] v1SpectroClustersUidManifestGetOK %+v", 200, o.Payload) +} + +func (o *V1SpectroClustersUIDManifestGetOK) GetPayload() string { + return o.Payload +} + +func (o *V1SpectroClustersUIDManifestGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_uid_manifest_update_parameters.go b/api/client/v1/v1_spectro_clusters_uid_manifest_update_parameters.go new file mode 100644 index 00000000..0507e526 --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_uid_manifest_update_parameters.go @@ -0,0 +1,157 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1SpectroClustersUIDManifestUpdateParams creates a new V1SpectroClustersUIDManifestUpdateParams object +// with the default values initialized. +func NewV1SpectroClustersUIDManifestUpdateParams() *V1SpectroClustersUIDManifestUpdateParams { + var () + return &V1SpectroClustersUIDManifestUpdateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1SpectroClustersUIDManifestUpdateParamsWithTimeout creates a new V1SpectroClustersUIDManifestUpdateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1SpectroClustersUIDManifestUpdateParamsWithTimeout(timeout time.Duration) *V1SpectroClustersUIDManifestUpdateParams { + var () + return &V1SpectroClustersUIDManifestUpdateParams{ + + timeout: timeout, + } +} + +// NewV1SpectroClustersUIDManifestUpdateParamsWithContext creates a new V1SpectroClustersUIDManifestUpdateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1SpectroClustersUIDManifestUpdateParamsWithContext(ctx context.Context) *V1SpectroClustersUIDManifestUpdateParams { + var () + return &V1SpectroClustersUIDManifestUpdateParams{ + + Context: ctx, + } +} + +// NewV1SpectroClustersUIDManifestUpdateParamsWithHTTPClient creates a new V1SpectroClustersUIDManifestUpdateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1SpectroClustersUIDManifestUpdateParamsWithHTTPClient(client *http.Client) *V1SpectroClustersUIDManifestUpdateParams { + var () + return &V1SpectroClustersUIDManifestUpdateParams{ + HTTPClient: client, + } +} + +/* +V1SpectroClustersUIDManifestUpdateParams contains all the parameters to send to the API endpoint +for the v1 spectro clusters Uid manifest update operation typically these are written to a http.Request +*/ +type V1SpectroClustersUIDManifestUpdateParams struct { + + /*Body*/ + Body *models.V1SpectroClusterAssetManifest + /*UID + Cluster uid + + */ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 spectro clusters Uid manifest update params +func (o *V1SpectroClustersUIDManifestUpdateParams) WithTimeout(timeout time.Duration) *V1SpectroClustersUIDManifestUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 spectro clusters Uid manifest update params +func (o *V1SpectroClustersUIDManifestUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 spectro clusters Uid manifest update params +func (o *V1SpectroClustersUIDManifestUpdateParams) WithContext(ctx context.Context) *V1SpectroClustersUIDManifestUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 spectro clusters Uid manifest update params +func (o *V1SpectroClustersUIDManifestUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 spectro clusters Uid manifest update params +func (o *V1SpectroClustersUIDManifestUpdateParams) WithHTTPClient(client *http.Client) *V1SpectroClustersUIDManifestUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 spectro clusters Uid manifest update params +func (o *V1SpectroClustersUIDManifestUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 spectro clusters Uid manifest update params +func (o *V1SpectroClustersUIDManifestUpdateParams) WithBody(body *models.V1SpectroClusterAssetManifest) *V1SpectroClustersUIDManifestUpdateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 spectro clusters Uid manifest update params +func (o *V1SpectroClustersUIDManifestUpdateParams) SetBody(body *models.V1SpectroClusterAssetManifest) { + o.Body = body +} + +// WithUID adds the uid to the v1 spectro clusters Uid manifest update params +func (o *V1SpectroClustersUIDManifestUpdateParams) WithUID(uid string) *V1SpectroClustersUIDManifestUpdateParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 spectro clusters Uid manifest update params +func (o *V1SpectroClustersUIDManifestUpdateParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1SpectroClustersUIDManifestUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_uid_manifest_update_responses.go b/api/client/v1/v1_spectro_clusters_uid_manifest_update_responses.go new file mode 100644 index 00000000..4b46d898 --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_uid_manifest_update_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1SpectroClustersUIDManifestUpdateReader is a Reader for the V1SpectroClustersUIDManifestUpdate structure. +type V1SpectroClustersUIDManifestUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1SpectroClustersUIDManifestUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1SpectroClustersUIDManifestUpdateNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1SpectroClustersUIDManifestUpdateNoContent creates a V1SpectroClustersUIDManifestUpdateNoContent with default headers values +func NewV1SpectroClustersUIDManifestUpdateNoContent() *V1SpectroClustersUIDManifestUpdateNoContent { + return &V1SpectroClustersUIDManifestUpdateNoContent{} +} + +/* +V1SpectroClustersUIDManifestUpdateNoContent handles this case with default header values. + +The resource was updated successfully +*/ +type V1SpectroClustersUIDManifestUpdateNoContent struct { +} + +func (o *V1SpectroClustersUIDManifestUpdateNoContent) Error() string { + return fmt.Sprintf("[PUT /v1/spectroclusters/{uid}/assets/manifest][%d] v1SpectroClustersUidManifestUpdateNoContent ", 204) +} + +func (o *V1SpectroClustersUIDManifestUpdateNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_uid_metadata_update_parameters.go b/api/client/v1/v1_spectro_clusters_uid_metadata_update_parameters.go new file mode 100644 index 00000000..3028610d --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_uid_metadata_update_parameters.go @@ -0,0 +1,157 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1SpectroClustersUIDMetadataUpdateParams creates a new V1SpectroClustersUIDMetadataUpdateParams object +// with the default values initialized. +func NewV1SpectroClustersUIDMetadataUpdateParams() *V1SpectroClustersUIDMetadataUpdateParams { + var () + return &V1SpectroClustersUIDMetadataUpdateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1SpectroClustersUIDMetadataUpdateParamsWithTimeout creates a new V1SpectroClustersUIDMetadataUpdateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1SpectroClustersUIDMetadataUpdateParamsWithTimeout(timeout time.Duration) *V1SpectroClustersUIDMetadataUpdateParams { + var () + return &V1SpectroClustersUIDMetadataUpdateParams{ + + timeout: timeout, + } +} + +// NewV1SpectroClustersUIDMetadataUpdateParamsWithContext creates a new V1SpectroClustersUIDMetadataUpdateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1SpectroClustersUIDMetadataUpdateParamsWithContext(ctx context.Context) *V1SpectroClustersUIDMetadataUpdateParams { + var () + return &V1SpectroClustersUIDMetadataUpdateParams{ + + Context: ctx, + } +} + +// NewV1SpectroClustersUIDMetadataUpdateParamsWithHTTPClient creates a new V1SpectroClustersUIDMetadataUpdateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1SpectroClustersUIDMetadataUpdateParamsWithHTTPClient(client *http.Client) *V1SpectroClustersUIDMetadataUpdateParams { + var () + return &V1SpectroClustersUIDMetadataUpdateParams{ + HTTPClient: client, + } +} + +/* +V1SpectroClustersUIDMetadataUpdateParams contains all the parameters to send to the API endpoint +for the v1 spectro clusters Uid metadata update operation typically these are written to a http.Request +*/ +type V1SpectroClustersUIDMetadataUpdateParams struct { + + /*Body*/ + Body *models.V1ObjectMetaInputEntitySchema + /*UID + Cluster uid + + */ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 spectro clusters Uid metadata update params +func (o *V1SpectroClustersUIDMetadataUpdateParams) WithTimeout(timeout time.Duration) *V1SpectroClustersUIDMetadataUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 spectro clusters Uid metadata update params +func (o *V1SpectroClustersUIDMetadataUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 spectro clusters Uid metadata update params +func (o *V1SpectroClustersUIDMetadataUpdateParams) WithContext(ctx context.Context) *V1SpectroClustersUIDMetadataUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 spectro clusters Uid metadata update params +func (o *V1SpectroClustersUIDMetadataUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 spectro clusters Uid metadata update params +func (o *V1SpectroClustersUIDMetadataUpdateParams) WithHTTPClient(client *http.Client) *V1SpectroClustersUIDMetadataUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 spectro clusters Uid metadata update params +func (o *V1SpectroClustersUIDMetadataUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 spectro clusters Uid metadata update params +func (o *V1SpectroClustersUIDMetadataUpdateParams) WithBody(body *models.V1ObjectMetaInputEntitySchema) *V1SpectroClustersUIDMetadataUpdateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 spectro clusters Uid metadata update params +func (o *V1SpectroClustersUIDMetadataUpdateParams) SetBody(body *models.V1ObjectMetaInputEntitySchema) { + o.Body = body +} + +// WithUID adds the uid to the v1 spectro clusters Uid metadata update params +func (o *V1SpectroClustersUIDMetadataUpdateParams) WithUID(uid string) *V1SpectroClustersUIDMetadataUpdateParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 spectro clusters Uid metadata update params +func (o *V1SpectroClustersUIDMetadataUpdateParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1SpectroClustersUIDMetadataUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_uid_metadata_update_responses.go b/api/client/v1/v1_spectro_clusters_uid_metadata_update_responses.go new file mode 100644 index 00000000..a6767658 --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_uid_metadata_update_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1SpectroClustersUIDMetadataUpdateReader is a Reader for the V1SpectroClustersUIDMetadataUpdate structure. +type V1SpectroClustersUIDMetadataUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1SpectroClustersUIDMetadataUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1SpectroClustersUIDMetadataUpdateNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1SpectroClustersUIDMetadataUpdateNoContent creates a V1SpectroClustersUIDMetadataUpdateNoContent with default headers values +func NewV1SpectroClustersUIDMetadataUpdateNoContent() *V1SpectroClustersUIDMetadataUpdateNoContent { + return &V1SpectroClustersUIDMetadataUpdateNoContent{} +} + +/* +V1SpectroClustersUIDMetadataUpdateNoContent handles this case with default header values. + +The resource was updated successfully +*/ +type V1SpectroClustersUIDMetadataUpdateNoContent struct { +} + +func (o *V1SpectroClustersUIDMetadataUpdateNoContent) Error() string { + return fmt.Sprintf("[PATCH /v1/spectroclusters/{uid}/metadata][%d] v1SpectroClustersUidMetadataUpdateNoContent ", 204) +} + +func (o *V1SpectroClustersUIDMetadataUpdateNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_uid_o_id_c_dashboard_url_parameters.go b/api/client/v1/v1_spectro_clusters_uid_o_id_c_dashboard_url_parameters.go new file mode 100644 index 00000000..ce576f17 --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_uid_o_id_c_dashboard_url_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1SpectroClustersUIDOIDCDashboardURLParams creates a new V1SpectroClustersUIDOIDCDashboardURLParams object +// with the default values initialized. +func NewV1SpectroClustersUIDOIDCDashboardURLParams() *V1SpectroClustersUIDOIDCDashboardURLParams { + var () + return &V1SpectroClustersUIDOIDCDashboardURLParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1SpectroClustersUIDOIDCDashboardURLParamsWithTimeout creates a new V1SpectroClustersUIDOIDCDashboardURLParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1SpectroClustersUIDOIDCDashboardURLParamsWithTimeout(timeout time.Duration) *V1SpectroClustersUIDOIDCDashboardURLParams { + var () + return &V1SpectroClustersUIDOIDCDashboardURLParams{ + + timeout: timeout, + } +} + +// NewV1SpectroClustersUIDOIDCDashboardURLParamsWithContext creates a new V1SpectroClustersUIDOIDCDashboardURLParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1SpectroClustersUIDOIDCDashboardURLParamsWithContext(ctx context.Context) *V1SpectroClustersUIDOIDCDashboardURLParams { + var () + return &V1SpectroClustersUIDOIDCDashboardURLParams{ + + Context: ctx, + } +} + +// NewV1SpectroClustersUIDOIDCDashboardURLParamsWithHTTPClient creates a new V1SpectroClustersUIDOIDCDashboardURLParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1SpectroClustersUIDOIDCDashboardURLParamsWithHTTPClient(client *http.Client) *V1SpectroClustersUIDOIDCDashboardURLParams { + var () + return &V1SpectroClustersUIDOIDCDashboardURLParams{ + HTTPClient: client, + } +} + +/* +V1SpectroClustersUIDOIDCDashboardURLParams contains all the parameters to send to the API endpoint +for the v1 spectro clusters Uid o ID c dashboard Url operation typically these are written to a http.Request +*/ +type V1SpectroClustersUIDOIDCDashboardURLParams struct { + + /*UID + spc uid + + */ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 spectro clusters Uid o ID c dashboard Url params +func (o *V1SpectroClustersUIDOIDCDashboardURLParams) WithTimeout(timeout time.Duration) *V1SpectroClustersUIDOIDCDashboardURLParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 spectro clusters Uid o ID c dashboard Url params +func (o *V1SpectroClustersUIDOIDCDashboardURLParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 spectro clusters Uid o ID c dashboard Url params +func (o *V1SpectroClustersUIDOIDCDashboardURLParams) WithContext(ctx context.Context) *V1SpectroClustersUIDOIDCDashboardURLParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 spectro clusters Uid o ID c dashboard Url params +func (o *V1SpectroClustersUIDOIDCDashboardURLParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 spectro clusters Uid o ID c dashboard Url params +func (o *V1SpectroClustersUIDOIDCDashboardURLParams) WithHTTPClient(client *http.Client) *V1SpectroClustersUIDOIDCDashboardURLParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 spectro clusters Uid o ID c dashboard Url params +func (o *V1SpectroClustersUIDOIDCDashboardURLParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithUID adds the uid to the v1 spectro clusters Uid o ID c dashboard Url params +func (o *V1SpectroClustersUIDOIDCDashboardURLParams) WithUID(uid string) *V1SpectroClustersUIDOIDCDashboardURLParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 spectro clusters Uid o ID c dashboard Url params +func (o *V1SpectroClustersUIDOIDCDashboardURLParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1SpectroClustersUIDOIDCDashboardURLParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_uid_o_id_c_dashboard_url_responses.go b/api/client/v1/v1_spectro_clusters_uid_o_id_c_dashboard_url_responses.go new file mode 100644 index 00000000..36dc34fe --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_uid_o_id_c_dashboard_url_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1SpectroClustersUIDOIDCDashboardURLReader is a Reader for the V1SpectroClustersUIDOIDCDashboardURL structure. +type V1SpectroClustersUIDOIDCDashboardURLReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1SpectroClustersUIDOIDCDashboardURLReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1SpectroClustersUIDOIDCDashboardURLOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1SpectroClustersUIDOIDCDashboardURLOK creates a V1SpectroClustersUIDOIDCDashboardURLOK with default headers values +func NewV1SpectroClustersUIDOIDCDashboardURLOK() *V1SpectroClustersUIDOIDCDashboardURLOK { + return &V1SpectroClustersUIDOIDCDashboardURLOK{} +} + +/* +V1SpectroClustersUIDOIDCDashboardURLOK handles this case with default header values. + +OK +*/ +type V1SpectroClustersUIDOIDCDashboardURLOK struct { + Payload *models.V1SectroClusterK8sDashboardURL +} + +func (o *V1SpectroClustersUIDOIDCDashboardURLOK) Error() string { + return fmt.Sprintf("[GET /v1/spectroclusters/{uid}/oidc/dashboard/url][%d] v1SpectroClustersUidOIdCDashboardUrlOK %+v", 200, o.Payload) +} + +func (o *V1SpectroClustersUIDOIDCDashboardURLOK) GetPayload() *models.V1SectroClusterK8sDashboardURL { + return o.Payload +} + +func (o *V1SpectroClustersUIDOIDCDashboardURLOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1SectroClusterK8sDashboardURL) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_uid_o_id_c_parameters.go b/api/client/v1/v1_spectro_clusters_uid_o_id_c_parameters.go new file mode 100644 index 00000000..18e0cf32 --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_uid_o_id_c_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1SpectroClustersUIDOIDCParams creates a new V1SpectroClustersUIDOIDCParams object +// with the default values initialized. +func NewV1SpectroClustersUIDOIDCParams() *V1SpectroClustersUIDOIDCParams { + var () + return &V1SpectroClustersUIDOIDCParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1SpectroClustersUIDOIDCParamsWithTimeout creates a new V1SpectroClustersUIDOIDCParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1SpectroClustersUIDOIDCParamsWithTimeout(timeout time.Duration) *V1SpectroClustersUIDOIDCParams { + var () + return &V1SpectroClustersUIDOIDCParams{ + + timeout: timeout, + } +} + +// NewV1SpectroClustersUIDOIDCParamsWithContext creates a new V1SpectroClustersUIDOIDCParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1SpectroClustersUIDOIDCParamsWithContext(ctx context.Context) *V1SpectroClustersUIDOIDCParams { + var () + return &V1SpectroClustersUIDOIDCParams{ + + Context: ctx, + } +} + +// NewV1SpectroClustersUIDOIDCParamsWithHTTPClient creates a new V1SpectroClustersUIDOIDCParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1SpectroClustersUIDOIDCParamsWithHTTPClient(client *http.Client) *V1SpectroClustersUIDOIDCParams { + var () + return &V1SpectroClustersUIDOIDCParams{ + HTTPClient: client, + } +} + +/* +V1SpectroClustersUIDOIDCParams contains all the parameters to send to the API endpoint +for the v1 spectro clusters Uid o ID c operation typically these are written to a http.Request +*/ +type V1SpectroClustersUIDOIDCParams struct { + + /*UID + spc uid + + */ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 spectro clusters Uid o ID c params +func (o *V1SpectroClustersUIDOIDCParams) WithTimeout(timeout time.Duration) *V1SpectroClustersUIDOIDCParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 spectro clusters Uid o ID c params +func (o *V1SpectroClustersUIDOIDCParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 spectro clusters Uid o ID c params +func (o *V1SpectroClustersUIDOIDCParams) WithContext(ctx context.Context) *V1SpectroClustersUIDOIDCParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 spectro clusters Uid o ID c params +func (o *V1SpectroClustersUIDOIDCParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 spectro clusters Uid o ID c params +func (o *V1SpectroClustersUIDOIDCParams) WithHTTPClient(client *http.Client) *V1SpectroClustersUIDOIDCParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 spectro clusters Uid o ID c params +func (o *V1SpectroClustersUIDOIDCParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithUID adds the uid to the v1 spectro clusters Uid o ID c params +func (o *V1SpectroClustersUIDOIDCParams) WithUID(uid string) *V1SpectroClustersUIDOIDCParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 spectro clusters Uid o ID c params +func (o *V1SpectroClustersUIDOIDCParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1SpectroClustersUIDOIDCParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_uid_o_id_c_responses.go b/api/client/v1/v1_spectro_clusters_uid_o_id_c_responses.go new file mode 100644 index 00000000..2dbee3bb --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_uid_o_id_c_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1SpectroClustersUIDOIDCReader is a Reader for the V1SpectroClustersUIDOIDC structure. +type V1SpectroClustersUIDOIDCReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1SpectroClustersUIDOIDCReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1SpectroClustersUIDOIDCOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1SpectroClustersUIDOIDCOK creates a V1SpectroClustersUIDOIDCOK with default headers values +func NewV1SpectroClustersUIDOIDCOK() *V1SpectroClustersUIDOIDCOK { + return &V1SpectroClustersUIDOIDCOK{} +} + +/* +V1SpectroClustersUIDOIDCOK handles this case with default header values. + +OK +*/ +type V1SpectroClustersUIDOIDCOK struct { + Payload *models.V1SpectroClusterOidcSpec +} + +func (o *V1SpectroClustersUIDOIDCOK) Error() string { + return fmt.Sprintf("[GET /v1/spectroclusters/{uid}/oidc][%d] v1SpectroClustersUidOIdCOK %+v", 200, o.Payload) +} + +func (o *V1SpectroClustersUIDOIDCOK) GetPayload() *models.V1SpectroClusterOidcSpec { + return o.Payload +} + +func (o *V1SpectroClustersUIDOIDCOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1SpectroClusterOidcSpec) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_uid_os_patch_update_parameters.go b/api/client/v1/v1_spectro_clusters_uid_os_patch_update_parameters.go new file mode 100644 index 00000000..71f92c81 --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_uid_os_patch_update_parameters.go @@ -0,0 +1,157 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1SpectroClustersUIDOsPatchUpdateParams creates a new V1SpectroClustersUIDOsPatchUpdateParams object +// with the default values initialized. +func NewV1SpectroClustersUIDOsPatchUpdateParams() *V1SpectroClustersUIDOsPatchUpdateParams { + var () + return &V1SpectroClustersUIDOsPatchUpdateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1SpectroClustersUIDOsPatchUpdateParamsWithTimeout creates a new V1SpectroClustersUIDOsPatchUpdateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1SpectroClustersUIDOsPatchUpdateParamsWithTimeout(timeout time.Duration) *V1SpectroClustersUIDOsPatchUpdateParams { + var () + return &V1SpectroClustersUIDOsPatchUpdateParams{ + + timeout: timeout, + } +} + +// NewV1SpectroClustersUIDOsPatchUpdateParamsWithContext creates a new V1SpectroClustersUIDOsPatchUpdateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1SpectroClustersUIDOsPatchUpdateParamsWithContext(ctx context.Context) *V1SpectroClustersUIDOsPatchUpdateParams { + var () + return &V1SpectroClustersUIDOsPatchUpdateParams{ + + Context: ctx, + } +} + +// NewV1SpectroClustersUIDOsPatchUpdateParamsWithHTTPClient creates a new V1SpectroClustersUIDOsPatchUpdateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1SpectroClustersUIDOsPatchUpdateParamsWithHTTPClient(client *http.Client) *V1SpectroClustersUIDOsPatchUpdateParams { + var () + return &V1SpectroClustersUIDOsPatchUpdateParams{ + HTTPClient: client, + } +} + +/* +V1SpectroClustersUIDOsPatchUpdateParams contains all the parameters to send to the API endpoint +for the v1 spectro clusters Uid os patch update operation typically these are written to a http.Request +*/ +type V1SpectroClustersUIDOsPatchUpdateParams struct { + + /*Body*/ + Body *models.V1OsPatchEntity + /*UID + Cluster uid + + */ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 spectro clusters Uid os patch update params +func (o *V1SpectroClustersUIDOsPatchUpdateParams) WithTimeout(timeout time.Duration) *V1SpectroClustersUIDOsPatchUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 spectro clusters Uid os patch update params +func (o *V1SpectroClustersUIDOsPatchUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 spectro clusters Uid os patch update params +func (o *V1SpectroClustersUIDOsPatchUpdateParams) WithContext(ctx context.Context) *V1SpectroClustersUIDOsPatchUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 spectro clusters Uid os patch update params +func (o *V1SpectroClustersUIDOsPatchUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 spectro clusters Uid os patch update params +func (o *V1SpectroClustersUIDOsPatchUpdateParams) WithHTTPClient(client *http.Client) *V1SpectroClustersUIDOsPatchUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 spectro clusters Uid os patch update params +func (o *V1SpectroClustersUIDOsPatchUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 spectro clusters Uid os patch update params +func (o *V1SpectroClustersUIDOsPatchUpdateParams) WithBody(body *models.V1OsPatchEntity) *V1SpectroClustersUIDOsPatchUpdateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 spectro clusters Uid os patch update params +func (o *V1SpectroClustersUIDOsPatchUpdateParams) SetBody(body *models.V1OsPatchEntity) { + o.Body = body +} + +// WithUID adds the uid to the v1 spectro clusters Uid os patch update params +func (o *V1SpectroClustersUIDOsPatchUpdateParams) WithUID(uid string) *V1SpectroClustersUIDOsPatchUpdateParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 spectro clusters Uid os patch update params +func (o *V1SpectroClustersUIDOsPatchUpdateParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1SpectroClustersUIDOsPatchUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_uid_os_patch_update_responses.go b/api/client/v1/v1_spectro_clusters_uid_os_patch_update_responses.go new file mode 100644 index 00000000..cea6a46d --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_uid_os_patch_update_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1SpectroClustersUIDOsPatchUpdateReader is a Reader for the V1SpectroClustersUIDOsPatchUpdate structure. +type V1SpectroClustersUIDOsPatchUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1SpectroClustersUIDOsPatchUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1SpectroClustersUIDOsPatchUpdateNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1SpectroClustersUIDOsPatchUpdateNoContent creates a V1SpectroClustersUIDOsPatchUpdateNoContent with default headers values +func NewV1SpectroClustersUIDOsPatchUpdateNoContent() *V1SpectroClustersUIDOsPatchUpdateNoContent { + return &V1SpectroClustersUIDOsPatchUpdateNoContent{} +} + +/* +V1SpectroClustersUIDOsPatchUpdateNoContent handles this case with default header values. + +The resource was updated successfully +*/ +type V1SpectroClustersUIDOsPatchUpdateNoContent struct { +} + +func (o *V1SpectroClustersUIDOsPatchUpdateNoContent) Error() string { + return fmt.Sprintf("[PATCH /v1/spectroclusters/{uid}/clusterConfig/osPatch][%d] v1SpectroClustersUidOsPatchUpdateNoContent ", 204) +} + +func (o *V1SpectroClustersUIDOsPatchUpdateNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_uid_pack_manifests_uid_get_parameters.go b/api/client/v1/v1_spectro_clusters_uid_pack_manifests_uid_get_parameters.go new file mode 100644 index 00000000..7f4ee3bb --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_uid_pack_manifests_uid_get_parameters.go @@ -0,0 +1,202 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// NewV1SpectroClustersUIDPackManifestsUIDGetParams creates a new V1SpectroClustersUIDPackManifestsUIDGetParams object +// with the default values initialized. +func NewV1SpectroClustersUIDPackManifestsUIDGetParams() *V1SpectroClustersUIDPackManifestsUIDGetParams { + var ( + resolveManifestValuesDefault = bool(false) + ) + return &V1SpectroClustersUIDPackManifestsUIDGetParams{ + ResolveManifestValues: &resolveManifestValuesDefault, + + timeout: cr.DefaultTimeout, + } +} + +// NewV1SpectroClustersUIDPackManifestsUIDGetParamsWithTimeout creates a new V1SpectroClustersUIDPackManifestsUIDGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1SpectroClustersUIDPackManifestsUIDGetParamsWithTimeout(timeout time.Duration) *V1SpectroClustersUIDPackManifestsUIDGetParams { + var ( + resolveManifestValuesDefault = bool(false) + ) + return &V1SpectroClustersUIDPackManifestsUIDGetParams{ + ResolveManifestValues: &resolveManifestValuesDefault, + + timeout: timeout, + } +} + +// NewV1SpectroClustersUIDPackManifestsUIDGetParamsWithContext creates a new V1SpectroClustersUIDPackManifestsUIDGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1SpectroClustersUIDPackManifestsUIDGetParamsWithContext(ctx context.Context) *V1SpectroClustersUIDPackManifestsUIDGetParams { + var ( + resolveManifestValuesDefault = bool(false) + ) + return &V1SpectroClustersUIDPackManifestsUIDGetParams{ + ResolveManifestValues: &resolveManifestValuesDefault, + + Context: ctx, + } +} + +// NewV1SpectroClustersUIDPackManifestsUIDGetParamsWithHTTPClient creates a new V1SpectroClustersUIDPackManifestsUIDGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1SpectroClustersUIDPackManifestsUIDGetParamsWithHTTPClient(client *http.Client) *V1SpectroClustersUIDPackManifestsUIDGetParams { + var ( + resolveManifestValuesDefault = bool(false) + ) + return &V1SpectroClustersUIDPackManifestsUIDGetParams{ + ResolveManifestValues: &resolveManifestValuesDefault, + HTTPClient: client, + } +} + +/* +V1SpectroClustersUIDPackManifestsUIDGetParams contains all the parameters to send to the API endpoint +for the v1 spectro clusters Uid pack manifests Uid get operation typically these are written to a http.Request +*/ +type V1SpectroClustersUIDPackManifestsUIDGetParams struct { + + /*ManifestUID + manifest uid which is part of the pack ref + + */ + ManifestUID string + /*ResolveManifestValues + resolve pack manifest values if set to true + + */ + ResolveManifestValues *bool + /*UID + cluster uid + + */ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 spectro clusters Uid pack manifests Uid get params +func (o *V1SpectroClustersUIDPackManifestsUIDGetParams) WithTimeout(timeout time.Duration) *V1SpectroClustersUIDPackManifestsUIDGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 spectro clusters Uid pack manifests Uid get params +func (o *V1SpectroClustersUIDPackManifestsUIDGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 spectro clusters Uid pack manifests Uid get params +func (o *V1SpectroClustersUIDPackManifestsUIDGetParams) WithContext(ctx context.Context) *V1SpectroClustersUIDPackManifestsUIDGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 spectro clusters Uid pack manifests Uid get params +func (o *V1SpectroClustersUIDPackManifestsUIDGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 spectro clusters Uid pack manifests Uid get params +func (o *V1SpectroClustersUIDPackManifestsUIDGetParams) WithHTTPClient(client *http.Client) *V1SpectroClustersUIDPackManifestsUIDGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 spectro clusters Uid pack manifests Uid get params +func (o *V1SpectroClustersUIDPackManifestsUIDGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithManifestUID adds the manifestUID to the v1 spectro clusters Uid pack manifests Uid get params +func (o *V1SpectroClustersUIDPackManifestsUIDGetParams) WithManifestUID(manifestUID string) *V1SpectroClustersUIDPackManifestsUIDGetParams { + o.SetManifestUID(manifestUID) + return o +} + +// SetManifestUID adds the manifestUid to the v1 spectro clusters Uid pack manifests Uid get params +func (o *V1SpectroClustersUIDPackManifestsUIDGetParams) SetManifestUID(manifestUID string) { + o.ManifestUID = manifestUID +} + +// WithResolveManifestValues adds the resolveManifestValues to the v1 spectro clusters Uid pack manifests Uid get params +func (o *V1SpectroClustersUIDPackManifestsUIDGetParams) WithResolveManifestValues(resolveManifestValues *bool) *V1SpectroClustersUIDPackManifestsUIDGetParams { + o.SetResolveManifestValues(resolveManifestValues) + return o +} + +// SetResolveManifestValues adds the resolveManifestValues to the v1 spectro clusters Uid pack manifests Uid get params +func (o *V1SpectroClustersUIDPackManifestsUIDGetParams) SetResolveManifestValues(resolveManifestValues *bool) { + o.ResolveManifestValues = resolveManifestValues +} + +// WithUID adds the uid to the v1 spectro clusters Uid pack manifests Uid get params +func (o *V1SpectroClustersUIDPackManifestsUIDGetParams) WithUID(uid string) *V1SpectroClustersUIDPackManifestsUIDGetParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 spectro clusters Uid pack manifests Uid get params +func (o *V1SpectroClustersUIDPackManifestsUIDGetParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1SpectroClustersUIDPackManifestsUIDGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param manifestUid + if err := r.SetPathParam("manifestUid", o.ManifestUID); err != nil { + return err + } + + if o.ResolveManifestValues != nil { + + // query param resolveManifestValues + var qrResolveManifestValues bool + if o.ResolveManifestValues != nil { + qrResolveManifestValues = *o.ResolveManifestValues + } + qResolveManifestValues := swag.FormatBool(qrResolveManifestValues) + if qResolveManifestValues != "" { + if err := r.SetQueryParam("resolveManifestValues", qResolveManifestValues); err != nil { + return err + } + } + + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_uid_pack_manifests_uid_get_responses.go b/api/client/v1/v1_spectro_clusters_uid_pack_manifests_uid_get_responses.go new file mode 100644 index 00000000..9d6def82 --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_uid_pack_manifests_uid_get_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1SpectroClustersUIDPackManifestsUIDGetReader is a Reader for the V1SpectroClustersUIDPackManifestsUIDGet structure. +type V1SpectroClustersUIDPackManifestsUIDGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1SpectroClustersUIDPackManifestsUIDGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1SpectroClustersUIDPackManifestsUIDGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1SpectroClustersUIDPackManifestsUIDGetOK creates a V1SpectroClustersUIDPackManifestsUIDGetOK with default headers values +func NewV1SpectroClustersUIDPackManifestsUIDGetOK() *V1SpectroClustersUIDPackManifestsUIDGetOK { + return &V1SpectroClustersUIDPackManifestsUIDGetOK{} +} + +/* +V1SpectroClustersUIDPackManifestsUIDGetOK handles this case with default header values. + +Pack manifest content +*/ +type V1SpectroClustersUIDPackManifestsUIDGetOK struct { + Payload *models.V1Manifest +} + +func (o *V1SpectroClustersUIDPackManifestsUIDGetOK) Error() string { + return fmt.Sprintf("[GET /v1/spectroclusters/{uid}/pack/manifests/{manifestUid}][%d] v1SpectroClustersUidPackManifestsUidGetOK %+v", 200, o.Payload) +} + +func (o *V1SpectroClustersUIDPackManifestsUIDGetOK) GetPayload() *models.V1Manifest { + return o.Payload +} + +func (o *V1SpectroClustersUIDPackManifestsUIDGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1Manifest) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_uid_pack_properties_parameters.go b/api/client/v1/v1_spectro_clusters_uid_pack_properties_parameters.go new file mode 100644 index 00000000..e7bf3609 --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_uid_pack_properties_parameters.go @@ -0,0 +1,263 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// NewV1SpectroClustersUIDPackPropertiesParams creates a new V1SpectroClustersUIDPackPropertiesParams object +// with the default values initialized. +func NewV1SpectroClustersUIDPackPropertiesParams() *V1SpectroClustersUIDPackPropertiesParams { + var ( + resolveMacrosDefault = bool(true) + ) + return &V1SpectroClustersUIDPackPropertiesParams{ + ResolveMacros: &resolveMacrosDefault, + + timeout: cr.DefaultTimeout, + } +} + +// NewV1SpectroClustersUIDPackPropertiesParamsWithTimeout creates a new V1SpectroClustersUIDPackPropertiesParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1SpectroClustersUIDPackPropertiesParamsWithTimeout(timeout time.Duration) *V1SpectroClustersUIDPackPropertiesParams { + var ( + resolveMacrosDefault = bool(true) + ) + return &V1SpectroClustersUIDPackPropertiesParams{ + ResolveMacros: &resolveMacrosDefault, + + timeout: timeout, + } +} + +// NewV1SpectroClustersUIDPackPropertiesParamsWithContext creates a new V1SpectroClustersUIDPackPropertiesParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1SpectroClustersUIDPackPropertiesParamsWithContext(ctx context.Context) *V1SpectroClustersUIDPackPropertiesParams { + var ( + resolveMacrosDefault = bool(true) + ) + return &V1SpectroClustersUIDPackPropertiesParams{ + ResolveMacros: &resolveMacrosDefault, + + Context: ctx, + } +} + +// NewV1SpectroClustersUIDPackPropertiesParamsWithHTTPClient creates a new V1SpectroClustersUIDPackPropertiesParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1SpectroClustersUIDPackPropertiesParamsWithHTTPClient(client *http.Client) *V1SpectroClustersUIDPackPropertiesParams { + var ( + resolveMacrosDefault = bool(true) + ) + return &V1SpectroClustersUIDPackPropertiesParams{ + ResolveMacros: &resolveMacrosDefault, + HTTPClient: client, + } +} + +/* +V1SpectroClustersUIDPackPropertiesParams contains all the parameters to send to the API endpoint +for the v1 spectro clusters Uid pack properties operation typically these are written to a http.Request +*/ +type V1SpectroClustersUIDPackPropertiesParams struct { + + /*FieldPath + Pack values yaml field path + + */ + FieldPath string + /*Layer + Pack layer + + */ + Layer string + /*Name + Pack name + + */ + Name *string + /*ResolveMacros + Is the macros need to be resolved + + */ + ResolveMacros *bool + /*UID + Cluster uid + + */ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 spectro clusters Uid pack properties params +func (o *V1SpectroClustersUIDPackPropertiesParams) WithTimeout(timeout time.Duration) *V1SpectroClustersUIDPackPropertiesParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 spectro clusters Uid pack properties params +func (o *V1SpectroClustersUIDPackPropertiesParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 spectro clusters Uid pack properties params +func (o *V1SpectroClustersUIDPackPropertiesParams) WithContext(ctx context.Context) *V1SpectroClustersUIDPackPropertiesParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 spectro clusters Uid pack properties params +func (o *V1SpectroClustersUIDPackPropertiesParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 spectro clusters Uid pack properties params +func (o *V1SpectroClustersUIDPackPropertiesParams) WithHTTPClient(client *http.Client) *V1SpectroClustersUIDPackPropertiesParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 spectro clusters Uid pack properties params +func (o *V1SpectroClustersUIDPackPropertiesParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithFieldPath adds the fieldPath to the v1 spectro clusters Uid pack properties params +func (o *V1SpectroClustersUIDPackPropertiesParams) WithFieldPath(fieldPath string) *V1SpectroClustersUIDPackPropertiesParams { + o.SetFieldPath(fieldPath) + return o +} + +// SetFieldPath adds the fieldPath to the v1 spectro clusters Uid pack properties params +func (o *V1SpectroClustersUIDPackPropertiesParams) SetFieldPath(fieldPath string) { + o.FieldPath = fieldPath +} + +// WithLayer adds the layer to the v1 spectro clusters Uid pack properties params +func (o *V1SpectroClustersUIDPackPropertiesParams) WithLayer(layer string) *V1SpectroClustersUIDPackPropertiesParams { + o.SetLayer(layer) + return o +} + +// SetLayer adds the layer to the v1 spectro clusters Uid pack properties params +func (o *V1SpectroClustersUIDPackPropertiesParams) SetLayer(layer string) { + o.Layer = layer +} + +// WithName adds the name to the v1 spectro clusters Uid pack properties params +func (o *V1SpectroClustersUIDPackPropertiesParams) WithName(name *string) *V1SpectroClustersUIDPackPropertiesParams { + o.SetName(name) + return o +} + +// SetName adds the name to the v1 spectro clusters Uid pack properties params +func (o *V1SpectroClustersUIDPackPropertiesParams) SetName(name *string) { + o.Name = name +} + +// WithResolveMacros adds the resolveMacros to the v1 spectro clusters Uid pack properties params +func (o *V1SpectroClustersUIDPackPropertiesParams) WithResolveMacros(resolveMacros *bool) *V1SpectroClustersUIDPackPropertiesParams { + o.SetResolveMacros(resolveMacros) + return o +} + +// SetResolveMacros adds the resolveMacros to the v1 spectro clusters Uid pack properties params +func (o *V1SpectroClustersUIDPackPropertiesParams) SetResolveMacros(resolveMacros *bool) { + o.ResolveMacros = resolveMacros +} + +// WithUID adds the uid to the v1 spectro clusters Uid pack properties params +func (o *V1SpectroClustersUIDPackPropertiesParams) WithUID(uid string) *V1SpectroClustersUIDPackPropertiesParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 spectro clusters Uid pack properties params +func (o *V1SpectroClustersUIDPackPropertiesParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1SpectroClustersUIDPackPropertiesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // query param fieldPath + qrFieldPath := o.FieldPath + qFieldPath := qrFieldPath + if qFieldPath != "" { + if err := r.SetQueryParam("fieldPath", qFieldPath); err != nil { + return err + } + } + + // query param layer + qrLayer := o.Layer + qLayer := qrLayer + if qLayer != "" { + if err := r.SetQueryParam("layer", qLayer); err != nil { + return err + } + } + + if o.Name != nil { + + // query param name + var qrName string + if o.Name != nil { + qrName = *o.Name + } + qName := qrName + if qName != "" { + if err := r.SetQueryParam("name", qName); err != nil { + return err + } + } + + } + + if o.ResolveMacros != nil { + + // query param resolveMacros + var qrResolveMacros bool + if o.ResolveMacros != nil { + qrResolveMacros = *o.ResolveMacros + } + qResolveMacros := swag.FormatBool(qrResolveMacros) + if qResolveMacros != "" { + if err := r.SetQueryParam("resolveMacros", qResolveMacros); err != nil { + return err + } + } + + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_uid_pack_properties_responses.go b/api/client/v1/v1_spectro_clusters_uid_pack_properties_responses.go new file mode 100644 index 00000000..ed3e08a2 --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_uid_pack_properties_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1SpectroClustersUIDPackPropertiesReader is a Reader for the V1SpectroClustersUIDPackProperties structure. +type V1SpectroClustersUIDPackPropertiesReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1SpectroClustersUIDPackPropertiesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1SpectroClustersUIDPackPropertiesOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1SpectroClustersUIDPackPropertiesOK creates a V1SpectroClustersUIDPackPropertiesOK with default headers values +func NewV1SpectroClustersUIDPackPropertiesOK() *V1SpectroClustersUIDPackPropertiesOK { + return &V1SpectroClustersUIDPackPropertiesOK{} +} + +/* +V1SpectroClustersUIDPackPropertiesOK handles this case with default header values. + +Cluster's pack properties response +*/ +type V1SpectroClustersUIDPackPropertiesOK struct { + Payload *models.V1SpectroClusterPackProperties +} + +func (o *V1SpectroClustersUIDPackPropertiesOK) Error() string { + return fmt.Sprintf("[GET /v1/spectroclusters/{uid}/pack/properties][%d] v1SpectroClustersUidPackPropertiesOK %+v", 200, o.Payload) +} + +func (o *V1SpectroClustersUIDPackPropertiesOK) GetPayload() *models.V1SpectroClusterPackProperties { + return o.Payload +} + +func (o *V1SpectroClustersUIDPackPropertiesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1SpectroClusterPackProperties) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_uid_packs_resolved_values_get_parameters.go b/api/client/v1/v1_spectro_clusters_uid_packs_resolved_values_get_parameters.go new file mode 100644 index 00000000..6e305dc5 --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_uid_packs_resolved_values_get_parameters.go @@ -0,0 +1,157 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1SpectroClustersUIDPacksResolvedValuesGetParams creates a new V1SpectroClustersUIDPacksResolvedValuesGetParams object +// with the default values initialized. +func NewV1SpectroClustersUIDPacksResolvedValuesGetParams() *V1SpectroClustersUIDPacksResolvedValuesGetParams { + var () + return &V1SpectroClustersUIDPacksResolvedValuesGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1SpectroClustersUIDPacksResolvedValuesGetParamsWithTimeout creates a new V1SpectroClustersUIDPacksResolvedValuesGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1SpectroClustersUIDPacksResolvedValuesGetParamsWithTimeout(timeout time.Duration) *V1SpectroClustersUIDPacksResolvedValuesGetParams { + var () + return &V1SpectroClustersUIDPacksResolvedValuesGetParams{ + + timeout: timeout, + } +} + +// NewV1SpectroClustersUIDPacksResolvedValuesGetParamsWithContext creates a new V1SpectroClustersUIDPacksResolvedValuesGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1SpectroClustersUIDPacksResolvedValuesGetParamsWithContext(ctx context.Context) *V1SpectroClustersUIDPacksResolvedValuesGetParams { + var () + return &V1SpectroClustersUIDPacksResolvedValuesGetParams{ + + Context: ctx, + } +} + +// NewV1SpectroClustersUIDPacksResolvedValuesGetParamsWithHTTPClient creates a new V1SpectroClustersUIDPacksResolvedValuesGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1SpectroClustersUIDPacksResolvedValuesGetParamsWithHTTPClient(client *http.Client) *V1SpectroClustersUIDPacksResolvedValuesGetParams { + var () + return &V1SpectroClustersUIDPacksResolvedValuesGetParams{ + HTTPClient: client, + } +} + +/* +V1SpectroClustersUIDPacksResolvedValuesGetParams contains all the parameters to send to the API endpoint +for the v1 spectro clusters Uid packs resolved values get operation typically these are written to a http.Request +*/ +type V1SpectroClustersUIDPacksResolvedValuesGetParams struct { + + /*Body*/ + Body *models.V1SpectroClusterProfilesParamReferenceEntity + /*UID + Cluster uid + + */ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 spectro clusters Uid packs resolved values get params +func (o *V1SpectroClustersUIDPacksResolvedValuesGetParams) WithTimeout(timeout time.Duration) *V1SpectroClustersUIDPacksResolvedValuesGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 spectro clusters Uid packs resolved values get params +func (o *V1SpectroClustersUIDPacksResolvedValuesGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 spectro clusters Uid packs resolved values get params +func (o *V1SpectroClustersUIDPacksResolvedValuesGetParams) WithContext(ctx context.Context) *V1SpectroClustersUIDPacksResolvedValuesGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 spectro clusters Uid packs resolved values get params +func (o *V1SpectroClustersUIDPacksResolvedValuesGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 spectro clusters Uid packs resolved values get params +func (o *V1SpectroClustersUIDPacksResolvedValuesGetParams) WithHTTPClient(client *http.Client) *V1SpectroClustersUIDPacksResolvedValuesGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 spectro clusters Uid packs resolved values get params +func (o *V1SpectroClustersUIDPacksResolvedValuesGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 spectro clusters Uid packs resolved values get params +func (o *V1SpectroClustersUIDPacksResolvedValuesGetParams) WithBody(body *models.V1SpectroClusterProfilesParamReferenceEntity) *V1SpectroClustersUIDPacksResolvedValuesGetParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 spectro clusters Uid packs resolved values get params +func (o *V1SpectroClustersUIDPacksResolvedValuesGetParams) SetBody(body *models.V1SpectroClusterProfilesParamReferenceEntity) { + o.Body = body +} + +// WithUID adds the uid to the v1 spectro clusters Uid packs resolved values get params +func (o *V1SpectroClustersUIDPacksResolvedValuesGetParams) WithUID(uid string) *V1SpectroClustersUIDPacksResolvedValuesGetParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 spectro clusters Uid packs resolved values get params +func (o *V1SpectroClustersUIDPacksResolvedValuesGetParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1SpectroClustersUIDPacksResolvedValuesGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_uid_packs_resolved_values_get_responses.go b/api/client/v1/v1_spectro_clusters_uid_packs_resolved_values_get_responses.go new file mode 100644 index 00000000..0fea35f9 --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_uid_packs_resolved_values_get_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1SpectroClustersUIDPacksResolvedValuesGetReader is a Reader for the V1SpectroClustersUIDPacksResolvedValuesGet structure. +type V1SpectroClustersUIDPacksResolvedValuesGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1SpectroClustersUIDPacksResolvedValuesGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1SpectroClustersUIDPacksResolvedValuesGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1SpectroClustersUIDPacksResolvedValuesGetOK creates a V1SpectroClustersUIDPacksResolvedValuesGetOK with default headers values +func NewV1SpectroClustersUIDPacksResolvedValuesGetOK() *V1SpectroClustersUIDPacksResolvedValuesGetOK { + return &V1SpectroClustersUIDPacksResolvedValuesGetOK{} +} + +/* +V1SpectroClustersUIDPacksResolvedValuesGetOK handles this case with default header values. + +OK +*/ +type V1SpectroClustersUIDPacksResolvedValuesGetOK struct { + Payload *models.V1SpectroClusterProfilesResolvedValues +} + +func (o *V1SpectroClustersUIDPacksResolvedValuesGetOK) Error() string { + return fmt.Sprintf("[GET /v1/spectroclusters/{uid}/packs/resolvedValues][%d] v1SpectroClustersUidPacksResolvedValuesGetOK %+v", 200, o.Payload) +} + +func (o *V1SpectroClustersUIDPacksResolvedValuesGetOK) GetPayload() *models.V1SpectroClusterProfilesResolvedValues { + return o.Payload +} + +func (o *V1SpectroClustersUIDPacksResolvedValuesGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1SpectroClusterProfilesResolvedValues) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_uid_packs_status_patch_parameters.go b/api/client/v1/v1_spectro_clusters_uid_packs_status_patch_parameters.go new file mode 100644 index 00000000..baacd445 --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_uid_packs_status_patch_parameters.go @@ -0,0 +1,157 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1SpectroClustersUIDPacksStatusPatchParams creates a new V1SpectroClustersUIDPacksStatusPatchParams object +// with the default values initialized. +func NewV1SpectroClustersUIDPacksStatusPatchParams() *V1SpectroClustersUIDPacksStatusPatchParams { + var () + return &V1SpectroClustersUIDPacksStatusPatchParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1SpectroClustersUIDPacksStatusPatchParamsWithTimeout creates a new V1SpectroClustersUIDPacksStatusPatchParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1SpectroClustersUIDPacksStatusPatchParamsWithTimeout(timeout time.Duration) *V1SpectroClustersUIDPacksStatusPatchParams { + var () + return &V1SpectroClustersUIDPacksStatusPatchParams{ + + timeout: timeout, + } +} + +// NewV1SpectroClustersUIDPacksStatusPatchParamsWithContext creates a new V1SpectroClustersUIDPacksStatusPatchParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1SpectroClustersUIDPacksStatusPatchParamsWithContext(ctx context.Context) *V1SpectroClustersUIDPacksStatusPatchParams { + var () + return &V1SpectroClustersUIDPacksStatusPatchParams{ + + Context: ctx, + } +} + +// NewV1SpectroClustersUIDPacksStatusPatchParamsWithHTTPClient creates a new V1SpectroClustersUIDPacksStatusPatchParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1SpectroClustersUIDPacksStatusPatchParamsWithHTTPClient(client *http.Client) *V1SpectroClustersUIDPacksStatusPatchParams { + var () + return &V1SpectroClustersUIDPacksStatusPatchParams{ + HTTPClient: client, + } +} + +/* +V1SpectroClustersUIDPacksStatusPatchParams contains all the parameters to send to the API endpoint +for the v1 spectro clusters Uid packs status patch operation typically these are written to a http.Request +*/ +type V1SpectroClustersUIDPacksStatusPatchParams struct { + + /*Body*/ + Body *models.V1SpectroClusterPacksStatusEntity + /*UID + Cluster uid + + */ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 spectro clusters Uid packs status patch params +func (o *V1SpectroClustersUIDPacksStatusPatchParams) WithTimeout(timeout time.Duration) *V1SpectroClustersUIDPacksStatusPatchParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 spectro clusters Uid packs status patch params +func (o *V1SpectroClustersUIDPacksStatusPatchParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 spectro clusters Uid packs status patch params +func (o *V1SpectroClustersUIDPacksStatusPatchParams) WithContext(ctx context.Context) *V1SpectroClustersUIDPacksStatusPatchParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 spectro clusters Uid packs status patch params +func (o *V1SpectroClustersUIDPacksStatusPatchParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 spectro clusters Uid packs status patch params +func (o *V1SpectroClustersUIDPacksStatusPatchParams) WithHTTPClient(client *http.Client) *V1SpectroClustersUIDPacksStatusPatchParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 spectro clusters Uid packs status patch params +func (o *V1SpectroClustersUIDPacksStatusPatchParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 spectro clusters Uid packs status patch params +func (o *V1SpectroClustersUIDPacksStatusPatchParams) WithBody(body *models.V1SpectroClusterPacksStatusEntity) *V1SpectroClustersUIDPacksStatusPatchParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 spectro clusters Uid packs status patch params +func (o *V1SpectroClustersUIDPacksStatusPatchParams) SetBody(body *models.V1SpectroClusterPacksStatusEntity) { + o.Body = body +} + +// WithUID adds the uid to the v1 spectro clusters Uid packs status patch params +func (o *V1SpectroClustersUIDPacksStatusPatchParams) WithUID(uid string) *V1SpectroClustersUIDPacksStatusPatchParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 spectro clusters Uid packs status patch params +func (o *V1SpectroClustersUIDPacksStatusPatchParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1SpectroClustersUIDPacksStatusPatchParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_uid_packs_status_patch_responses.go b/api/client/v1/v1_spectro_clusters_uid_packs_status_patch_responses.go new file mode 100644 index 00000000..c67278d8 --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_uid_packs_status_patch_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1SpectroClustersUIDPacksStatusPatchReader is a Reader for the V1SpectroClustersUIDPacksStatusPatch structure. +type V1SpectroClustersUIDPacksStatusPatchReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1SpectroClustersUIDPacksStatusPatchReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1SpectroClustersUIDPacksStatusPatchNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1SpectroClustersUIDPacksStatusPatchNoContent creates a V1SpectroClustersUIDPacksStatusPatchNoContent with default headers values +func NewV1SpectroClustersUIDPacksStatusPatchNoContent() *V1SpectroClustersUIDPacksStatusPatchNoContent { + return &V1SpectroClustersUIDPacksStatusPatchNoContent{} +} + +/* +V1SpectroClustersUIDPacksStatusPatchNoContent handles this case with default header values. + +The resource was updated successfully +*/ +type V1SpectroClustersUIDPacksStatusPatchNoContent struct { +} + +func (o *V1SpectroClustersUIDPacksStatusPatchNoContent) Error() string { + return fmt.Sprintf("[PATCH /v1/spectroclusters/{uid}/packs/status][%d] v1SpectroClustersUidPacksStatusPatchNoContent ", 204) +} + +func (o *V1SpectroClustersUIDPacksStatusPatchNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_uid_profiles_uid_packs_config_get_parameters.go b/api/client/v1/v1_spectro_clusters_uid_profiles_uid_packs_config_get_parameters.go new file mode 100644 index 00000000..d6e1297d --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_uid_profiles_uid_packs_config_get_parameters.go @@ -0,0 +1,178 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1SpectroClustersUIDProfilesUIDPacksConfigGetParams creates a new V1SpectroClustersUIDProfilesUIDPacksConfigGetParams object +// with the default values initialized. +func NewV1SpectroClustersUIDProfilesUIDPacksConfigGetParams() *V1SpectroClustersUIDProfilesUIDPacksConfigGetParams { + var () + return &V1SpectroClustersUIDProfilesUIDPacksConfigGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1SpectroClustersUIDProfilesUIDPacksConfigGetParamsWithTimeout creates a new V1SpectroClustersUIDProfilesUIDPacksConfigGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1SpectroClustersUIDProfilesUIDPacksConfigGetParamsWithTimeout(timeout time.Duration) *V1SpectroClustersUIDProfilesUIDPacksConfigGetParams { + var () + return &V1SpectroClustersUIDProfilesUIDPacksConfigGetParams{ + + timeout: timeout, + } +} + +// NewV1SpectroClustersUIDProfilesUIDPacksConfigGetParamsWithContext creates a new V1SpectroClustersUIDProfilesUIDPacksConfigGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1SpectroClustersUIDProfilesUIDPacksConfigGetParamsWithContext(ctx context.Context) *V1SpectroClustersUIDProfilesUIDPacksConfigGetParams { + var () + return &V1SpectroClustersUIDProfilesUIDPacksConfigGetParams{ + + Context: ctx, + } +} + +// NewV1SpectroClustersUIDProfilesUIDPacksConfigGetParamsWithHTTPClient creates a new V1SpectroClustersUIDProfilesUIDPacksConfigGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1SpectroClustersUIDProfilesUIDPacksConfigGetParamsWithHTTPClient(client *http.Client) *V1SpectroClustersUIDProfilesUIDPacksConfigGetParams { + var () + return &V1SpectroClustersUIDProfilesUIDPacksConfigGetParams{ + HTTPClient: client, + } +} + +/* +V1SpectroClustersUIDProfilesUIDPacksConfigGetParams contains all the parameters to send to the API endpoint +for the v1 spectro clusters Uid profiles Uid packs config get operation typically these are written to a http.Request +*/ +type V1SpectroClustersUIDProfilesUIDPacksConfigGetParams struct { + + /*PackName + pack name + + */ + PackName string + /*ProfileUID + profile uid + + */ + ProfileUID string + /*UID + cluster uid + + */ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 spectro clusters Uid profiles Uid packs config get params +func (o *V1SpectroClustersUIDProfilesUIDPacksConfigGetParams) WithTimeout(timeout time.Duration) *V1SpectroClustersUIDProfilesUIDPacksConfigGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 spectro clusters Uid profiles Uid packs config get params +func (o *V1SpectroClustersUIDProfilesUIDPacksConfigGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 spectro clusters Uid profiles Uid packs config get params +func (o *V1SpectroClustersUIDProfilesUIDPacksConfigGetParams) WithContext(ctx context.Context) *V1SpectroClustersUIDProfilesUIDPacksConfigGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 spectro clusters Uid profiles Uid packs config get params +func (o *V1SpectroClustersUIDProfilesUIDPacksConfigGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 spectro clusters Uid profiles Uid packs config get params +func (o *V1SpectroClustersUIDProfilesUIDPacksConfigGetParams) WithHTTPClient(client *http.Client) *V1SpectroClustersUIDProfilesUIDPacksConfigGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 spectro clusters Uid profiles Uid packs config get params +func (o *V1SpectroClustersUIDProfilesUIDPacksConfigGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithPackName adds the packName to the v1 spectro clusters Uid profiles Uid packs config get params +func (o *V1SpectroClustersUIDProfilesUIDPacksConfigGetParams) WithPackName(packName string) *V1SpectroClustersUIDProfilesUIDPacksConfigGetParams { + o.SetPackName(packName) + return o +} + +// SetPackName adds the packName to the v1 spectro clusters Uid profiles Uid packs config get params +func (o *V1SpectroClustersUIDProfilesUIDPacksConfigGetParams) SetPackName(packName string) { + o.PackName = packName +} + +// WithProfileUID adds the profileUID to the v1 spectro clusters Uid profiles Uid packs config get params +func (o *V1SpectroClustersUIDProfilesUIDPacksConfigGetParams) WithProfileUID(profileUID string) *V1SpectroClustersUIDProfilesUIDPacksConfigGetParams { + o.SetProfileUID(profileUID) + return o +} + +// SetProfileUID adds the profileUid to the v1 spectro clusters Uid profiles Uid packs config get params +func (o *V1SpectroClustersUIDProfilesUIDPacksConfigGetParams) SetProfileUID(profileUID string) { + o.ProfileUID = profileUID +} + +// WithUID adds the uid to the v1 spectro clusters Uid profiles Uid packs config get params +func (o *V1SpectroClustersUIDProfilesUIDPacksConfigGetParams) WithUID(uid string) *V1SpectroClustersUIDProfilesUIDPacksConfigGetParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 spectro clusters Uid profiles Uid packs config get params +func (o *V1SpectroClustersUIDProfilesUIDPacksConfigGetParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1SpectroClustersUIDProfilesUIDPacksConfigGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param packName + if err := r.SetPathParam("packName", o.PackName); err != nil { + return err + } + + // path param profileUid + if err := r.SetPathParam("profileUid", o.ProfileUID); err != nil { + return err + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_uid_profiles_uid_packs_config_get_responses.go b/api/client/v1/v1_spectro_clusters_uid_profiles_uid_packs_config_get_responses.go new file mode 100644 index 00000000..2eb58203 --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_uid_profiles_uid_packs_config_get_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1SpectroClustersUIDProfilesUIDPacksConfigGetReader is a Reader for the V1SpectroClustersUIDProfilesUIDPacksConfigGet structure. +type V1SpectroClustersUIDProfilesUIDPacksConfigGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1SpectroClustersUIDProfilesUIDPacksConfigGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1SpectroClustersUIDProfilesUIDPacksConfigGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1SpectroClustersUIDProfilesUIDPacksConfigGetOK creates a V1SpectroClustersUIDProfilesUIDPacksConfigGetOK with default headers values +func NewV1SpectroClustersUIDProfilesUIDPacksConfigGetOK() *V1SpectroClustersUIDProfilesUIDPacksConfigGetOK { + return &V1SpectroClustersUIDProfilesUIDPacksConfigGetOK{} +} + +/* +V1SpectroClustersUIDProfilesUIDPacksConfigGetOK handles this case with default header values. + +An array of cluster pack values +*/ +type V1SpectroClustersUIDProfilesUIDPacksConfigGetOK struct { + Payload *models.V1SpectroClusterPackConfigList +} + +func (o *V1SpectroClustersUIDProfilesUIDPacksConfigGetOK) Error() string { + return fmt.Sprintf("[GET /v1/spectroclusters/{uid}/profiles/{profileUid}/packs/{packName}/config][%d] v1SpectroClustersUidProfilesUidPacksConfigGetOK %+v", 200, o.Payload) +} + +func (o *V1SpectroClustersUIDProfilesUIDPacksConfigGetOK) GetPayload() *models.V1SpectroClusterPackConfigList { + return o.Payload +} + +func (o *V1SpectroClustersUIDProfilesUIDPacksConfigGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1SpectroClusterPackConfigList) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_uid_rate_parameters.go b/api/client/v1/v1_spectro_clusters_uid_rate_parameters.go new file mode 100644 index 00000000..0cee7874 --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_uid_rate_parameters.go @@ -0,0 +1,180 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1SpectroClustersUIDRateParams creates a new V1SpectroClustersUIDRateParams object +// with the default values initialized. +func NewV1SpectroClustersUIDRateParams() *V1SpectroClustersUIDRateParams { + var ( + periodTypeDefault = string("hourly") + ) + return &V1SpectroClustersUIDRateParams{ + PeriodType: &periodTypeDefault, + + timeout: cr.DefaultTimeout, + } +} + +// NewV1SpectroClustersUIDRateParamsWithTimeout creates a new V1SpectroClustersUIDRateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1SpectroClustersUIDRateParamsWithTimeout(timeout time.Duration) *V1SpectroClustersUIDRateParams { + var ( + periodTypeDefault = string("hourly") + ) + return &V1SpectroClustersUIDRateParams{ + PeriodType: &periodTypeDefault, + + timeout: timeout, + } +} + +// NewV1SpectroClustersUIDRateParamsWithContext creates a new V1SpectroClustersUIDRateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1SpectroClustersUIDRateParamsWithContext(ctx context.Context) *V1SpectroClustersUIDRateParams { + var ( + periodTypeDefault = string("hourly") + ) + return &V1SpectroClustersUIDRateParams{ + PeriodType: &periodTypeDefault, + + Context: ctx, + } +} + +// NewV1SpectroClustersUIDRateParamsWithHTTPClient creates a new V1SpectroClustersUIDRateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1SpectroClustersUIDRateParamsWithHTTPClient(client *http.Client) *V1SpectroClustersUIDRateParams { + var ( + periodTypeDefault = string("hourly") + ) + return &V1SpectroClustersUIDRateParams{ + PeriodType: &periodTypeDefault, + HTTPClient: client, + } +} + +/* +V1SpectroClustersUIDRateParams contains all the parameters to send to the API endpoint +for the v1 spectro clusters Uid rate operation typically these are written to a http.Request +*/ +type V1SpectroClustersUIDRateParams struct { + + /*PeriodType + Period type [hourly, monthly, yearly] + + */ + PeriodType *string + /*UID + Cluster uid + + */ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 spectro clusters Uid rate params +func (o *V1SpectroClustersUIDRateParams) WithTimeout(timeout time.Duration) *V1SpectroClustersUIDRateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 spectro clusters Uid rate params +func (o *V1SpectroClustersUIDRateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 spectro clusters Uid rate params +func (o *V1SpectroClustersUIDRateParams) WithContext(ctx context.Context) *V1SpectroClustersUIDRateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 spectro clusters Uid rate params +func (o *V1SpectroClustersUIDRateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 spectro clusters Uid rate params +func (o *V1SpectroClustersUIDRateParams) WithHTTPClient(client *http.Client) *V1SpectroClustersUIDRateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 spectro clusters Uid rate params +func (o *V1SpectroClustersUIDRateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithPeriodType adds the periodType to the v1 spectro clusters Uid rate params +func (o *V1SpectroClustersUIDRateParams) WithPeriodType(periodType *string) *V1SpectroClustersUIDRateParams { + o.SetPeriodType(periodType) + return o +} + +// SetPeriodType adds the periodType to the v1 spectro clusters Uid rate params +func (o *V1SpectroClustersUIDRateParams) SetPeriodType(periodType *string) { + o.PeriodType = periodType +} + +// WithUID adds the uid to the v1 spectro clusters Uid rate params +func (o *V1SpectroClustersUIDRateParams) WithUID(uid string) *V1SpectroClustersUIDRateParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 spectro clusters Uid rate params +func (o *V1SpectroClustersUIDRateParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1SpectroClustersUIDRateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.PeriodType != nil { + + // query param periodType + var qrPeriodType string + if o.PeriodType != nil { + qrPeriodType = *o.PeriodType + } + qPeriodType := qrPeriodType + if qPeriodType != "" { + if err := r.SetQueryParam("periodType", qPeriodType); err != nil { + return err + } + } + + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_uid_rate_responses.go b/api/client/v1/v1_spectro_clusters_uid_rate_responses.go new file mode 100644 index 00000000..5df84aaa --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_uid_rate_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1SpectroClustersUIDRateReader is a Reader for the V1SpectroClustersUIDRate structure. +type V1SpectroClustersUIDRateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1SpectroClustersUIDRateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1SpectroClustersUIDRateOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1SpectroClustersUIDRateOK creates a V1SpectroClustersUIDRateOK with default headers values +func NewV1SpectroClustersUIDRateOK() *V1SpectroClustersUIDRateOK { + return &V1SpectroClustersUIDRateOK{} +} + +/* +V1SpectroClustersUIDRateOK handles this case with default header values. + +OK +*/ +type V1SpectroClustersUIDRateOK struct { + Payload *models.V1SpectroClusterRate +} + +func (o *V1SpectroClustersUIDRateOK) Error() string { + return fmt.Sprintf("[GET /v1/spectroclusters/{uid}/rate][%d] v1SpectroClustersUidRateOK %+v", 200, o.Payload) +} + +func (o *V1SpectroClustersUIDRateOK) GetPayload() *models.V1SpectroClusterRate { + return o.Payload +} + +func (o *V1SpectroClustersUIDRateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1SpectroClusterRate) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_uid_repave_approve_update_parameters.go b/api/client/v1/v1_spectro_clusters_uid_repave_approve_update_parameters.go new file mode 100644 index 00000000..edeb56d5 --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_uid_repave_approve_update_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1SpectroClustersUIDRepaveApproveUpdateParams creates a new V1SpectroClustersUIDRepaveApproveUpdateParams object +// with the default values initialized. +func NewV1SpectroClustersUIDRepaveApproveUpdateParams() *V1SpectroClustersUIDRepaveApproveUpdateParams { + var () + return &V1SpectroClustersUIDRepaveApproveUpdateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1SpectroClustersUIDRepaveApproveUpdateParamsWithTimeout creates a new V1SpectroClustersUIDRepaveApproveUpdateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1SpectroClustersUIDRepaveApproveUpdateParamsWithTimeout(timeout time.Duration) *V1SpectroClustersUIDRepaveApproveUpdateParams { + var () + return &V1SpectroClustersUIDRepaveApproveUpdateParams{ + + timeout: timeout, + } +} + +// NewV1SpectroClustersUIDRepaveApproveUpdateParamsWithContext creates a new V1SpectroClustersUIDRepaveApproveUpdateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1SpectroClustersUIDRepaveApproveUpdateParamsWithContext(ctx context.Context) *V1SpectroClustersUIDRepaveApproveUpdateParams { + var () + return &V1SpectroClustersUIDRepaveApproveUpdateParams{ + + Context: ctx, + } +} + +// NewV1SpectroClustersUIDRepaveApproveUpdateParamsWithHTTPClient creates a new V1SpectroClustersUIDRepaveApproveUpdateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1SpectroClustersUIDRepaveApproveUpdateParamsWithHTTPClient(client *http.Client) *V1SpectroClustersUIDRepaveApproveUpdateParams { + var () + return &V1SpectroClustersUIDRepaveApproveUpdateParams{ + HTTPClient: client, + } +} + +/* +V1SpectroClustersUIDRepaveApproveUpdateParams contains all the parameters to send to the API endpoint +for the v1 spectro clusters Uid repave approve update operation typically these are written to a http.Request +*/ +type V1SpectroClustersUIDRepaveApproveUpdateParams struct { + + /*UID + cluster uid + + */ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 spectro clusters Uid repave approve update params +func (o *V1SpectroClustersUIDRepaveApproveUpdateParams) WithTimeout(timeout time.Duration) *V1SpectroClustersUIDRepaveApproveUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 spectro clusters Uid repave approve update params +func (o *V1SpectroClustersUIDRepaveApproveUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 spectro clusters Uid repave approve update params +func (o *V1SpectroClustersUIDRepaveApproveUpdateParams) WithContext(ctx context.Context) *V1SpectroClustersUIDRepaveApproveUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 spectro clusters Uid repave approve update params +func (o *V1SpectroClustersUIDRepaveApproveUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 spectro clusters Uid repave approve update params +func (o *V1SpectroClustersUIDRepaveApproveUpdateParams) WithHTTPClient(client *http.Client) *V1SpectroClustersUIDRepaveApproveUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 spectro clusters Uid repave approve update params +func (o *V1SpectroClustersUIDRepaveApproveUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithUID adds the uid to the v1 spectro clusters Uid repave approve update params +func (o *V1SpectroClustersUIDRepaveApproveUpdateParams) WithUID(uid string) *V1SpectroClustersUIDRepaveApproveUpdateParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 spectro clusters Uid repave approve update params +func (o *V1SpectroClustersUIDRepaveApproveUpdateParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1SpectroClustersUIDRepaveApproveUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_uid_repave_approve_update_responses.go b/api/client/v1/v1_spectro_clusters_uid_repave_approve_update_responses.go new file mode 100644 index 00000000..b5c0b31d --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_uid_repave_approve_update_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1SpectroClustersUIDRepaveApproveUpdateReader is a Reader for the V1SpectroClustersUIDRepaveApproveUpdate structure. +type V1SpectroClustersUIDRepaveApproveUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1SpectroClustersUIDRepaveApproveUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1SpectroClustersUIDRepaveApproveUpdateNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1SpectroClustersUIDRepaveApproveUpdateNoContent creates a V1SpectroClustersUIDRepaveApproveUpdateNoContent with default headers values +func NewV1SpectroClustersUIDRepaveApproveUpdateNoContent() *V1SpectroClustersUIDRepaveApproveUpdateNoContent { + return &V1SpectroClustersUIDRepaveApproveUpdateNoContent{} +} + +/* +V1SpectroClustersUIDRepaveApproveUpdateNoContent handles this case with default header values. + +The resource was updated successfully +*/ +type V1SpectroClustersUIDRepaveApproveUpdateNoContent struct { +} + +func (o *V1SpectroClustersUIDRepaveApproveUpdateNoContent) Error() string { + return fmt.Sprintf("[PATCH /v1/spectroclusters/{uid}/repave/approve][%d] v1SpectroClustersUidRepaveApproveUpdateNoContent ", 204) +} + +func (o *V1SpectroClustersUIDRepaveApproveUpdateNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_uid_repave_get_parameters.go b/api/client/v1/v1_spectro_clusters_uid_repave_get_parameters.go new file mode 100644 index 00000000..d01b0be9 --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_uid_repave_get_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1SpectroClustersUIDRepaveGetParams creates a new V1SpectroClustersUIDRepaveGetParams object +// with the default values initialized. +func NewV1SpectroClustersUIDRepaveGetParams() *V1SpectroClustersUIDRepaveGetParams { + var () + return &V1SpectroClustersUIDRepaveGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1SpectroClustersUIDRepaveGetParamsWithTimeout creates a new V1SpectroClustersUIDRepaveGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1SpectroClustersUIDRepaveGetParamsWithTimeout(timeout time.Duration) *V1SpectroClustersUIDRepaveGetParams { + var () + return &V1SpectroClustersUIDRepaveGetParams{ + + timeout: timeout, + } +} + +// NewV1SpectroClustersUIDRepaveGetParamsWithContext creates a new V1SpectroClustersUIDRepaveGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1SpectroClustersUIDRepaveGetParamsWithContext(ctx context.Context) *V1SpectroClustersUIDRepaveGetParams { + var () + return &V1SpectroClustersUIDRepaveGetParams{ + + Context: ctx, + } +} + +// NewV1SpectroClustersUIDRepaveGetParamsWithHTTPClient creates a new V1SpectroClustersUIDRepaveGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1SpectroClustersUIDRepaveGetParamsWithHTTPClient(client *http.Client) *V1SpectroClustersUIDRepaveGetParams { + var () + return &V1SpectroClustersUIDRepaveGetParams{ + HTTPClient: client, + } +} + +/* +V1SpectroClustersUIDRepaveGetParams contains all the parameters to send to the API endpoint +for the v1 spectro clusters Uid repave get operation typically these are written to a http.Request +*/ +type V1SpectroClustersUIDRepaveGetParams struct { + + /*UID + cluster uid + + */ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 spectro clusters Uid repave get params +func (o *V1SpectroClustersUIDRepaveGetParams) WithTimeout(timeout time.Duration) *V1SpectroClustersUIDRepaveGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 spectro clusters Uid repave get params +func (o *V1SpectroClustersUIDRepaveGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 spectro clusters Uid repave get params +func (o *V1SpectroClustersUIDRepaveGetParams) WithContext(ctx context.Context) *V1SpectroClustersUIDRepaveGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 spectro clusters Uid repave get params +func (o *V1SpectroClustersUIDRepaveGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 spectro clusters Uid repave get params +func (o *V1SpectroClustersUIDRepaveGetParams) WithHTTPClient(client *http.Client) *V1SpectroClustersUIDRepaveGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 spectro clusters Uid repave get params +func (o *V1SpectroClustersUIDRepaveGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithUID adds the uid to the v1 spectro clusters Uid repave get params +func (o *V1SpectroClustersUIDRepaveGetParams) WithUID(uid string) *V1SpectroClustersUIDRepaveGetParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 spectro clusters Uid repave get params +func (o *V1SpectroClustersUIDRepaveGetParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1SpectroClustersUIDRepaveGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_uid_repave_get_responses.go b/api/client/v1/v1_spectro_clusters_uid_repave_get_responses.go new file mode 100644 index 00000000..441fa2d8 --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_uid_repave_get_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1SpectroClustersUIDRepaveGetReader is a Reader for the V1SpectroClustersUIDRepaveGet structure. +type V1SpectroClustersUIDRepaveGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1SpectroClustersUIDRepaveGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1SpectroClustersUIDRepaveGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1SpectroClustersUIDRepaveGetOK creates a V1SpectroClustersUIDRepaveGetOK with default headers values +func NewV1SpectroClustersUIDRepaveGetOK() *V1SpectroClustersUIDRepaveGetOK { + return &V1SpectroClustersUIDRepaveGetOK{} +} + +/* +V1SpectroClustersUIDRepaveGetOK handles this case with default header values. + +Returns cluster repave status +*/ +type V1SpectroClustersUIDRepaveGetOK struct { + Payload *models.V1SpectroClusterRepave +} + +func (o *V1SpectroClustersUIDRepaveGetOK) Error() string { + return fmt.Sprintf("[GET /v1/spectroclusters/{uid}/repave/status][%d] v1SpectroClustersUidRepaveGetOK %+v", 200, o.Payload) +} + +func (o *V1SpectroClustersUIDRepaveGetOK) GetPayload() *models.V1SpectroClusterRepave { + return o.Payload +} + +func (o *V1SpectroClustersUIDRepaveGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1SpectroClusterRepave) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_uid_reset_parameters.go b/api/client/v1/v1_spectro_clusters_uid_reset_parameters.go new file mode 100644 index 00000000..cad10f79 --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_uid_reset_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1SpectroClustersUIDResetParams creates a new V1SpectroClustersUIDResetParams object +// with the default values initialized. +func NewV1SpectroClustersUIDResetParams() *V1SpectroClustersUIDResetParams { + var () + return &V1SpectroClustersUIDResetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1SpectroClustersUIDResetParamsWithTimeout creates a new V1SpectroClustersUIDResetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1SpectroClustersUIDResetParamsWithTimeout(timeout time.Duration) *V1SpectroClustersUIDResetParams { + var () + return &V1SpectroClustersUIDResetParams{ + + timeout: timeout, + } +} + +// NewV1SpectroClustersUIDResetParamsWithContext creates a new V1SpectroClustersUIDResetParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1SpectroClustersUIDResetParamsWithContext(ctx context.Context) *V1SpectroClustersUIDResetParams { + var () + return &V1SpectroClustersUIDResetParams{ + + Context: ctx, + } +} + +// NewV1SpectroClustersUIDResetParamsWithHTTPClient creates a new V1SpectroClustersUIDResetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1SpectroClustersUIDResetParamsWithHTTPClient(client *http.Client) *V1SpectroClustersUIDResetParams { + var () + return &V1SpectroClustersUIDResetParams{ + HTTPClient: client, + } +} + +/* +V1SpectroClustersUIDResetParams contains all the parameters to send to the API endpoint +for the v1 spectro clusters Uid reset operation typically these are written to a http.Request +*/ +type V1SpectroClustersUIDResetParams struct { + + /*UID + Cluster uid + + */ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 spectro clusters Uid reset params +func (o *V1SpectroClustersUIDResetParams) WithTimeout(timeout time.Duration) *V1SpectroClustersUIDResetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 spectro clusters Uid reset params +func (o *V1SpectroClustersUIDResetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 spectro clusters Uid reset params +func (o *V1SpectroClustersUIDResetParams) WithContext(ctx context.Context) *V1SpectroClustersUIDResetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 spectro clusters Uid reset params +func (o *V1SpectroClustersUIDResetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 spectro clusters Uid reset params +func (o *V1SpectroClustersUIDResetParams) WithHTTPClient(client *http.Client) *V1SpectroClustersUIDResetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 spectro clusters Uid reset params +func (o *V1SpectroClustersUIDResetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithUID adds the uid to the v1 spectro clusters Uid reset params +func (o *V1SpectroClustersUIDResetParams) WithUID(uid string) *V1SpectroClustersUIDResetParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 spectro clusters Uid reset params +func (o *V1SpectroClustersUIDResetParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1SpectroClustersUIDResetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_uid_reset_responses.go b/api/client/v1/v1_spectro_clusters_uid_reset_responses.go new file mode 100644 index 00000000..522edc87 --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_uid_reset_responses.go @@ -0,0 +1,61 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1SpectroClustersUIDResetReader is a Reader for the V1SpectroClustersUIDReset structure. +type V1SpectroClustersUIDResetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1SpectroClustersUIDResetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1SpectroClustersUIDResetNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1SpectroClustersUIDResetNoContent creates a V1SpectroClustersUIDResetNoContent with default headers values +func NewV1SpectroClustersUIDResetNoContent() *V1SpectroClustersUIDResetNoContent { + return &V1SpectroClustersUIDResetNoContent{} +} + +/* +V1SpectroClustersUIDResetNoContent handles this case with default header values. + +Ok response without content +*/ +type V1SpectroClustersUIDResetNoContent struct { + /*Audit uid for the request + */ + AuditUID string +} + +func (o *V1SpectroClustersUIDResetNoContent) Error() string { + return fmt.Sprintf("[PUT /v1/spectroclusters/{uid}/reset][%d] v1SpectroClustersUidResetNoContent ", 204) +} + +func (o *V1SpectroClustersUIDResetNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header AuditUid + o.AuditUID = response.GetHeader("AuditUid") + + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_uid_resources_consumption_parameters.go b/api/client/v1/v1_spectro_clusters_uid_resources_consumption_parameters.go new file mode 100644 index 00000000..012e2b51 --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_uid_resources_consumption_parameters.go @@ -0,0 +1,154 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1SpectroClustersUIDResourcesConsumptionParams creates a new V1SpectroClustersUIDResourcesConsumptionParams object +// with the default values initialized. +func NewV1SpectroClustersUIDResourcesConsumptionParams() *V1SpectroClustersUIDResourcesConsumptionParams { + var () + return &V1SpectroClustersUIDResourcesConsumptionParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1SpectroClustersUIDResourcesConsumptionParamsWithTimeout creates a new V1SpectroClustersUIDResourcesConsumptionParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1SpectroClustersUIDResourcesConsumptionParamsWithTimeout(timeout time.Duration) *V1SpectroClustersUIDResourcesConsumptionParams { + var () + return &V1SpectroClustersUIDResourcesConsumptionParams{ + + timeout: timeout, + } +} + +// NewV1SpectroClustersUIDResourcesConsumptionParamsWithContext creates a new V1SpectroClustersUIDResourcesConsumptionParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1SpectroClustersUIDResourcesConsumptionParamsWithContext(ctx context.Context) *V1SpectroClustersUIDResourcesConsumptionParams { + var () + return &V1SpectroClustersUIDResourcesConsumptionParams{ + + Context: ctx, + } +} + +// NewV1SpectroClustersUIDResourcesConsumptionParamsWithHTTPClient creates a new V1SpectroClustersUIDResourcesConsumptionParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1SpectroClustersUIDResourcesConsumptionParamsWithHTTPClient(client *http.Client) *V1SpectroClustersUIDResourcesConsumptionParams { + var () + return &V1SpectroClustersUIDResourcesConsumptionParams{ + HTTPClient: client, + } +} + +/* +V1SpectroClustersUIDResourcesConsumptionParams contains all the parameters to send to the API endpoint +for the v1 spectro clusters Uid resources consumption operation typically these are written to a http.Request +*/ +type V1SpectroClustersUIDResourcesConsumptionParams struct { + + /*Body*/ + Body *models.V1ResourceConsumptionSpec + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 spectro clusters Uid resources consumption params +func (o *V1SpectroClustersUIDResourcesConsumptionParams) WithTimeout(timeout time.Duration) *V1SpectroClustersUIDResourcesConsumptionParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 spectro clusters Uid resources consumption params +func (o *V1SpectroClustersUIDResourcesConsumptionParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 spectro clusters Uid resources consumption params +func (o *V1SpectroClustersUIDResourcesConsumptionParams) WithContext(ctx context.Context) *V1SpectroClustersUIDResourcesConsumptionParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 spectro clusters Uid resources consumption params +func (o *V1SpectroClustersUIDResourcesConsumptionParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 spectro clusters Uid resources consumption params +func (o *V1SpectroClustersUIDResourcesConsumptionParams) WithHTTPClient(client *http.Client) *V1SpectroClustersUIDResourcesConsumptionParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 spectro clusters Uid resources consumption params +func (o *V1SpectroClustersUIDResourcesConsumptionParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 spectro clusters Uid resources consumption params +func (o *V1SpectroClustersUIDResourcesConsumptionParams) WithBody(body *models.V1ResourceConsumptionSpec) *V1SpectroClustersUIDResourcesConsumptionParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 spectro clusters Uid resources consumption params +func (o *V1SpectroClustersUIDResourcesConsumptionParams) SetBody(body *models.V1ResourceConsumptionSpec) { + o.Body = body +} + +// WithUID adds the uid to the v1 spectro clusters Uid resources consumption params +func (o *V1SpectroClustersUIDResourcesConsumptionParams) WithUID(uid string) *V1SpectroClustersUIDResourcesConsumptionParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 spectro clusters Uid resources consumption params +func (o *V1SpectroClustersUIDResourcesConsumptionParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1SpectroClustersUIDResourcesConsumptionParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_uid_resources_consumption_responses.go b/api/client/v1/v1_spectro_clusters_uid_resources_consumption_responses.go new file mode 100644 index 00000000..facba86c --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_uid_resources_consumption_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1SpectroClustersUIDResourcesConsumptionReader is a Reader for the V1SpectroClustersUIDResourcesConsumption structure. +type V1SpectroClustersUIDResourcesConsumptionReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1SpectroClustersUIDResourcesConsumptionReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1SpectroClustersUIDResourcesConsumptionOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1SpectroClustersUIDResourcesConsumptionOK creates a V1SpectroClustersUIDResourcesConsumptionOK with default headers values +func NewV1SpectroClustersUIDResourcesConsumptionOK() *V1SpectroClustersUIDResourcesConsumptionOK { + return &V1SpectroClustersUIDResourcesConsumptionOK{} +} + +/* +V1SpectroClustersUIDResourcesConsumptionOK handles this case with default header values. + +An array of resource consumption data items +*/ +type V1SpectroClustersUIDResourcesConsumptionOK struct { + Payload *models.V1ResourcesConsumption +} + +func (o *V1SpectroClustersUIDResourcesConsumptionOK) Error() string { + return fmt.Sprintf("[POST /v1/dashboard/spectroclusters/{uid}/resources/consumption][%d] v1SpectroClustersUidResourcesConsumptionOK %+v", 200, o.Payload) +} + +func (o *V1SpectroClustersUIDResourcesConsumptionOK) GetPayload() *models.V1ResourcesConsumption { + return o.Payload +} + +func (o *V1SpectroClustersUIDResourcesConsumptionOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1ResourcesConsumption) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_uid_status_parameters.go b/api/client/v1/v1_spectro_clusters_uid_status_parameters.go new file mode 100644 index 00000000..dcb059d7 --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_uid_status_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1SpectroClustersUIDStatusParams creates a new V1SpectroClustersUIDStatusParams object +// with the default values initialized. +func NewV1SpectroClustersUIDStatusParams() *V1SpectroClustersUIDStatusParams { + var () + return &V1SpectroClustersUIDStatusParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1SpectroClustersUIDStatusParamsWithTimeout creates a new V1SpectroClustersUIDStatusParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1SpectroClustersUIDStatusParamsWithTimeout(timeout time.Duration) *V1SpectroClustersUIDStatusParams { + var () + return &V1SpectroClustersUIDStatusParams{ + + timeout: timeout, + } +} + +// NewV1SpectroClustersUIDStatusParamsWithContext creates a new V1SpectroClustersUIDStatusParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1SpectroClustersUIDStatusParamsWithContext(ctx context.Context) *V1SpectroClustersUIDStatusParams { + var () + return &V1SpectroClustersUIDStatusParams{ + + Context: ctx, + } +} + +// NewV1SpectroClustersUIDStatusParamsWithHTTPClient creates a new V1SpectroClustersUIDStatusParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1SpectroClustersUIDStatusParamsWithHTTPClient(client *http.Client) *V1SpectroClustersUIDStatusParams { + var () + return &V1SpectroClustersUIDStatusParams{ + HTTPClient: client, + } +} + +/* +V1SpectroClustersUIDStatusParams contains all the parameters to send to the API endpoint +for the v1 spectro clusters Uid status operation typically these are written to a http.Request +*/ +type V1SpectroClustersUIDStatusParams struct { + + /*UID + Cluster uid + + */ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 spectro clusters Uid status params +func (o *V1SpectroClustersUIDStatusParams) WithTimeout(timeout time.Duration) *V1SpectroClustersUIDStatusParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 spectro clusters Uid status params +func (o *V1SpectroClustersUIDStatusParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 spectro clusters Uid status params +func (o *V1SpectroClustersUIDStatusParams) WithContext(ctx context.Context) *V1SpectroClustersUIDStatusParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 spectro clusters Uid status params +func (o *V1SpectroClustersUIDStatusParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 spectro clusters Uid status params +func (o *V1SpectroClustersUIDStatusParams) WithHTTPClient(client *http.Client) *V1SpectroClustersUIDStatusParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 spectro clusters Uid status params +func (o *V1SpectroClustersUIDStatusParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithUID adds the uid to the v1 spectro clusters Uid status params +func (o *V1SpectroClustersUIDStatusParams) WithUID(uid string) *V1SpectroClustersUIDStatusParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 spectro clusters Uid status params +func (o *V1SpectroClustersUIDStatusParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1SpectroClustersUIDStatusParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_uid_status_responses.go b/api/client/v1/v1_spectro_clusters_uid_status_responses.go new file mode 100644 index 00000000..67cd2983 --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_uid_status_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1SpectroClustersUIDStatusReader is a Reader for the V1SpectroClustersUIDStatus structure. +type V1SpectroClustersUIDStatusReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1SpectroClustersUIDStatusReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1SpectroClustersUIDStatusOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1SpectroClustersUIDStatusOK creates a V1SpectroClustersUIDStatusOK with default headers values +func NewV1SpectroClustersUIDStatusOK() *V1SpectroClustersUIDStatusOK { + return &V1SpectroClustersUIDStatusOK{} +} + +/* +V1SpectroClustersUIDStatusOK handles this case with default header values. + +OK +*/ +type V1SpectroClustersUIDStatusOK struct { + Payload *models.V1SpectroClusterStatusEntity +} + +func (o *V1SpectroClustersUIDStatusOK) Error() string { + return fmt.Sprintf("[GET /v1/spectroclusters/{uid}/status][%d] v1SpectroClustersUidStatusOK %+v", 200, o.Payload) +} + +func (o *V1SpectroClustersUIDStatusOK) GetPayload() *models.V1SpectroClusterStatusEntity { + return o.Payload +} + +func (o *V1SpectroClustersUIDStatusOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1SpectroClusterStatusEntity) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_uid_status_spc_apply_get_parameters.go b/api/client/v1/v1_spectro_clusters_uid_status_spc_apply_get_parameters.go new file mode 100644 index 00000000..78da2707 --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_uid_status_spc_apply_get_parameters.go @@ -0,0 +1,133 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1SpectroClustersUIDStatusSpcApplyGetParams creates a new V1SpectroClustersUIDStatusSpcApplyGetParams object +// with the default values initialized. +func NewV1SpectroClustersUIDStatusSpcApplyGetParams() *V1SpectroClustersUIDStatusSpcApplyGetParams { + var () + return &V1SpectroClustersUIDStatusSpcApplyGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1SpectroClustersUIDStatusSpcApplyGetParamsWithTimeout creates a new V1SpectroClustersUIDStatusSpcApplyGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1SpectroClustersUIDStatusSpcApplyGetParamsWithTimeout(timeout time.Duration) *V1SpectroClustersUIDStatusSpcApplyGetParams { + var () + return &V1SpectroClustersUIDStatusSpcApplyGetParams{ + + timeout: timeout, + } +} + +// NewV1SpectroClustersUIDStatusSpcApplyGetParamsWithContext creates a new V1SpectroClustersUIDStatusSpcApplyGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1SpectroClustersUIDStatusSpcApplyGetParamsWithContext(ctx context.Context) *V1SpectroClustersUIDStatusSpcApplyGetParams { + var () + return &V1SpectroClustersUIDStatusSpcApplyGetParams{ + + Context: ctx, + } +} + +// NewV1SpectroClustersUIDStatusSpcApplyGetParamsWithHTTPClient creates a new V1SpectroClustersUIDStatusSpcApplyGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1SpectroClustersUIDStatusSpcApplyGetParamsWithHTTPClient(client *http.Client) *V1SpectroClustersUIDStatusSpcApplyGetParams { + var () + return &V1SpectroClustersUIDStatusSpcApplyGetParams{ + HTTPClient: client, + } +} + +/* +V1SpectroClustersUIDStatusSpcApplyGetParams contains all the parameters to send to the API endpoint +for the v1 spectro clusters Uid status spc apply get operation typically these are written to a http.Request +*/ +type V1SpectroClustersUIDStatusSpcApplyGetParams struct { + + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 spectro clusters Uid status spc apply get params +func (o *V1SpectroClustersUIDStatusSpcApplyGetParams) WithTimeout(timeout time.Duration) *V1SpectroClustersUIDStatusSpcApplyGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 spectro clusters Uid status spc apply get params +func (o *V1SpectroClustersUIDStatusSpcApplyGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 spectro clusters Uid status spc apply get params +func (o *V1SpectroClustersUIDStatusSpcApplyGetParams) WithContext(ctx context.Context) *V1SpectroClustersUIDStatusSpcApplyGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 spectro clusters Uid status spc apply get params +func (o *V1SpectroClustersUIDStatusSpcApplyGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 spectro clusters Uid status spc apply get params +func (o *V1SpectroClustersUIDStatusSpcApplyGetParams) WithHTTPClient(client *http.Client) *V1SpectroClustersUIDStatusSpcApplyGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 spectro clusters Uid status spc apply get params +func (o *V1SpectroClustersUIDStatusSpcApplyGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithUID adds the uid to the v1 spectro clusters Uid status spc apply get params +func (o *V1SpectroClustersUIDStatusSpcApplyGetParams) WithUID(uid string) *V1SpectroClustersUIDStatusSpcApplyGetParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 spectro clusters Uid status spc apply get params +func (o *V1SpectroClustersUIDStatusSpcApplyGetParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1SpectroClustersUIDStatusSpcApplyGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_uid_status_spc_apply_get_responses.go b/api/client/v1/v1_spectro_clusters_uid_status_spc_apply_get_responses.go new file mode 100644 index 00000000..c21f307b --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_uid_status_spc_apply_get_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1SpectroClustersUIDStatusSpcApplyGetReader is a Reader for the V1SpectroClustersUIDStatusSpcApplyGet structure. +type V1SpectroClustersUIDStatusSpcApplyGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1SpectroClustersUIDStatusSpcApplyGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1SpectroClustersUIDStatusSpcApplyGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1SpectroClustersUIDStatusSpcApplyGetOK creates a V1SpectroClustersUIDStatusSpcApplyGetOK with default headers values +func NewV1SpectroClustersUIDStatusSpcApplyGetOK() *V1SpectroClustersUIDStatusSpcApplyGetOK { + return &V1SpectroClustersUIDStatusSpcApplyGetOK{} +} + +/* +V1SpectroClustersUIDStatusSpcApplyGetOK handles this case with default header values. + +(empty) +*/ +type V1SpectroClustersUIDStatusSpcApplyGetOK struct { + Payload *models.V1SpcApply +} + +func (o *V1SpectroClustersUIDStatusSpcApplyGetOK) Error() string { + return fmt.Sprintf("[GET /v1/spectroclusters/{uid}/status/spcApply][%d] v1SpectroClustersUidStatusSpcApplyGetOK %+v", 200, o.Payload) +} + +func (o *V1SpectroClustersUIDStatusSpcApplyGetOK) GetPayload() *models.V1SpcApply { + return o.Payload +} + +func (o *V1SpectroClustersUIDStatusSpcApplyGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1SpcApply) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_uid_status_spc_apply_parameters.go b/api/client/v1/v1_spectro_clusters_uid_status_spc_apply_parameters.go new file mode 100644 index 00000000..c7668f95 --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_uid_status_spc_apply_parameters.go @@ -0,0 +1,133 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1SpectroClustersUIDStatusSpcApplyParams creates a new V1SpectroClustersUIDStatusSpcApplyParams object +// with the default values initialized. +func NewV1SpectroClustersUIDStatusSpcApplyParams() *V1SpectroClustersUIDStatusSpcApplyParams { + var () + return &V1SpectroClustersUIDStatusSpcApplyParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1SpectroClustersUIDStatusSpcApplyParamsWithTimeout creates a new V1SpectroClustersUIDStatusSpcApplyParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1SpectroClustersUIDStatusSpcApplyParamsWithTimeout(timeout time.Duration) *V1SpectroClustersUIDStatusSpcApplyParams { + var () + return &V1SpectroClustersUIDStatusSpcApplyParams{ + + timeout: timeout, + } +} + +// NewV1SpectroClustersUIDStatusSpcApplyParamsWithContext creates a new V1SpectroClustersUIDStatusSpcApplyParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1SpectroClustersUIDStatusSpcApplyParamsWithContext(ctx context.Context) *V1SpectroClustersUIDStatusSpcApplyParams { + var () + return &V1SpectroClustersUIDStatusSpcApplyParams{ + + Context: ctx, + } +} + +// NewV1SpectroClustersUIDStatusSpcApplyParamsWithHTTPClient creates a new V1SpectroClustersUIDStatusSpcApplyParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1SpectroClustersUIDStatusSpcApplyParamsWithHTTPClient(client *http.Client) *V1SpectroClustersUIDStatusSpcApplyParams { + var () + return &V1SpectroClustersUIDStatusSpcApplyParams{ + HTTPClient: client, + } +} + +/* +V1SpectroClustersUIDStatusSpcApplyParams contains all the parameters to send to the API endpoint +for the v1 spectro clusters Uid status spc apply operation typically these are written to a http.Request +*/ +type V1SpectroClustersUIDStatusSpcApplyParams struct { + + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 spectro clusters Uid status spc apply params +func (o *V1SpectroClustersUIDStatusSpcApplyParams) WithTimeout(timeout time.Duration) *V1SpectroClustersUIDStatusSpcApplyParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 spectro clusters Uid status spc apply params +func (o *V1SpectroClustersUIDStatusSpcApplyParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 spectro clusters Uid status spc apply params +func (o *V1SpectroClustersUIDStatusSpcApplyParams) WithContext(ctx context.Context) *V1SpectroClustersUIDStatusSpcApplyParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 spectro clusters Uid status spc apply params +func (o *V1SpectroClustersUIDStatusSpcApplyParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 spectro clusters Uid status spc apply params +func (o *V1SpectroClustersUIDStatusSpcApplyParams) WithHTTPClient(client *http.Client) *V1SpectroClustersUIDStatusSpcApplyParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 spectro clusters Uid status spc apply params +func (o *V1SpectroClustersUIDStatusSpcApplyParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithUID adds the uid to the v1 spectro clusters Uid status spc apply params +func (o *V1SpectroClustersUIDStatusSpcApplyParams) WithUID(uid string) *V1SpectroClustersUIDStatusSpcApplyParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 spectro clusters Uid status spc apply params +func (o *V1SpectroClustersUIDStatusSpcApplyParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1SpectroClustersUIDStatusSpcApplyParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_uid_status_spc_apply_responses.go b/api/client/v1/v1_spectro_clusters_uid_status_spc_apply_responses.go new file mode 100644 index 00000000..0fe5325d --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_uid_status_spc_apply_responses.go @@ -0,0 +1,61 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1SpectroClustersUIDStatusSpcApplyReader is a Reader for the V1SpectroClustersUIDStatusSpcApply structure. +type V1SpectroClustersUIDStatusSpcApplyReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1SpectroClustersUIDStatusSpcApplyReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 202: + result := NewV1SpectroClustersUIDStatusSpcApplyAccepted() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1SpectroClustersUIDStatusSpcApplyAccepted creates a V1SpectroClustersUIDStatusSpcApplyAccepted with default headers values +func NewV1SpectroClustersUIDStatusSpcApplyAccepted() *V1SpectroClustersUIDStatusSpcApplyAccepted { + return &V1SpectroClustersUIDStatusSpcApplyAccepted{} +} + +/* +V1SpectroClustersUIDStatusSpcApplyAccepted handles this case with default header values. + +Ok response without content +*/ +type V1SpectroClustersUIDStatusSpcApplyAccepted struct { + /*Audit uid for the request + */ + AuditUID string +} + +func (o *V1SpectroClustersUIDStatusSpcApplyAccepted) Error() string { + return fmt.Sprintf("[POST /v1/spectroclusters/{uid}/status/spcApply][%d] v1SpectroClustersUidStatusSpcApplyAccepted ", 202) +} + +func (o *V1SpectroClustersUIDStatusSpcApplyAccepted) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header AuditUid + o.AuditUID = response.GetHeader("AuditUid") + + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_uid_status_spc_patch_time_parameters.go b/api/client/v1/v1_spectro_clusters_uid_status_spc_patch_time_parameters.go new file mode 100644 index 00000000..8b09352f --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_uid_status_spc_patch_time_parameters.go @@ -0,0 +1,154 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1SpectroClustersUIDStatusSpcPatchTimeParams creates a new V1SpectroClustersUIDStatusSpcPatchTimeParams object +// with the default values initialized. +func NewV1SpectroClustersUIDStatusSpcPatchTimeParams() *V1SpectroClustersUIDStatusSpcPatchTimeParams { + var () + return &V1SpectroClustersUIDStatusSpcPatchTimeParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1SpectroClustersUIDStatusSpcPatchTimeParamsWithTimeout creates a new V1SpectroClustersUIDStatusSpcPatchTimeParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1SpectroClustersUIDStatusSpcPatchTimeParamsWithTimeout(timeout time.Duration) *V1SpectroClustersUIDStatusSpcPatchTimeParams { + var () + return &V1SpectroClustersUIDStatusSpcPatchTimeParams{ + + timeout: timeout, + } +} + +// NewV1SpectroClustersUIDStatusSpcPatchTimeParamsWithContext creates a new V1SpectroClustersUIDStatusSpcPatchTimeParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1SpectroClustersUIDStatusSpcPatchTimeParamsWithContext(ctx context.Context) *V1SpectroClustersUIDStatusSpcPatchTimeParams { + var () + return &V1SpectroClustersUIDStatusSpcPatchTimeParams{ + + Context: ctx, + } +} + +// NewV1SpectroClustersUIDStatusSpcPatchTimeParamsWithHTTPClient creates a new V1SpectroClustersUIDStatusSpcPatchTimeParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1SpectroClustersUIDStatusSpcPatchTimeParamsWithHTTPClient(client *http.Client) *V1SpectroClustersUIDStatusSpcPatchTimeParams { + var () + return &V1SpectroClustersUIDStatusSpcPatchTimeParams{ + HTTPClient: client, + } +} + +/* +V1SpectroClustersUIDStatusSpcPatchTimeParams contains all the parameters to send to the API endpoint +for the v1 spectro clusters Uid status spc patch time operation typically these are written to a http.Request +*/ +type V1SpectroClustersUIDStatusSpcPatchTimeParams struct { + + /*Body*/ + Body *models.V1SpcPatchTimeEntity + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 spectro clusters Uid status spc patch time params +func (o *V1SpectroClustersUIDStatusSpcPatchTimeParams) WithTimeout(timeout time.Duration) *V1SpectroClustersUIDStatusSpcPatchTimeParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 spectro clusters Uid status spc patch time params +func (o *V1SpectroClustersUIDStatusSpcPatchTimeParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 spectro clusters Uid status spc patch time params +func (o *V1SpectroClustersUIDStatusSpcPatchTimeParams) WithContext(ctx context.Context) *V1SpectroClustersUIDStatusSpcPatchTimeParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 spectro clusters Uid status spc patch time params +func (o *V1SpectroClustersUIDStatusSpcPatchTimeParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 spectro clusters Uid status spc patch time params +func (o *V1SpectroClustersUIDStatusSpcPatchTimeParams) WithHTTPClient(client *http.Client) *V1SpectroClustersUIDStatusSpcPatchTimeParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 spectro clusters Uid status spc patch time params +func (o *V1SpectroClustersUIDStatusSpcPatchTimeParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 spectro clusters Uid status spc patch time params +func (o *V1SpectroClustersUIDStatusSpcPatchTimeParams) WithBody(body *models.V1SpcPatchTimeEntity) *V1SpectroClustersUIDStatusSpcPatchTimeParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 spectro clusters Uid status spc patch time params +func (o *V1SpectroClustersUIDStatusSpcPatchTimeParams) SetBody(body *models.V1SpcPatchTimeEntity) { + o.Body = body +} + +// WithUID adds the uid to the v1 spectro clusters Uid status spc patch time params +func (o *V1SpectroClustersUIDStatusSpcPatchTimeParams) WithUID(uid string) *V1SpectroClustersUIDStatusSpcPatchTimeParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 spectro clusters Uid status spc patch time params +func (o *V1SpectroClustersUIDStatusSpcPatchTimeParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1SpectroClustersUIDStatusSpcPatchTimeParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_uid_status_spc_patch_time_responses.go b/api/client/v1/v1_spectro_clusters_uid_status_spc_patch_time_responses.go new file mode 100644 index 00000000..5e144c82 --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_uid_status_spc_patch_time_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1SpectroClustersUIDStatusSpcPatchTimeReader is a Reader for the V1SpectroClustersUIDStatusSpcPatchTime structure. +type V1SpectroClustersUIDStatusSpcPatchTimeReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1SpectroClustersUIDStatusSpcPatchTimeReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1SpectroClustersUIDStatusSpcPatchTimeNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1SpectroClustersUIDStatusSpcPatchTimeNoContent creates a V1SpectroClustersUIDStatusSpcPatchTimeNoContent with default headers values +func NewV1SpectroClustersUIDStatusSpcPatchTimeNoContent() *V1SpectroClustersUIDStatusSpcPatchTimeNoContent { + return &V1SpectroClustersUIDStatusSpcPatchTimeNoContent{} +} + +/* +V1SpectroClustersUIDStatusSpcPatchTimeNoContent handles this case with default header values. + +The resource was updated successfully +*/ +type V1SpectroClustersUIDStatusSpcPatchTimeNoContent struct { +} + +func (o *V1SpectroClustersUIDStatusSpcPatchTimeNoContent) Error() string { + return fmt.Sprintf("[PATCH /v1/spectroclusters/{uid}/status/spcApply/patchTime][%d] v1SpectroClustersUidStatusSpcPatchTimeNoContent ", 204) +} + +func (o *V1SpectroClustersUIDStatusSpcPatchTimeNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_uid_upgrade_settings_parameters.go b/api/client/v1/v1_spectro_clusters_uid_upgrade_settings_parameters.go new file mode 100644 index 00000000..a34c1c36 --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_uid_upgrade_settings_parameters.go @@ -0,0 +1,157 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1SpectroClustersUIDUpgradeSettingsParams creates a new V1SpectroClustersUIDUpgradeSettingsParams object +// with the default values initialized. +func NewV1SpectroClustersUIDUpgradeSettingsParams() *V1SpectroClustersUIDUpgradeSettingsParams { + var () + return &V1SpectroClustersUIDUpgradeSettingsParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1SpectroClustersUIDUpgradeSettingsParamsWithTimeout creates a new V1SpectroClustersUIDUpgradeSettingsParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1SpectroClustersUIDUpgradeSettingsParamsWithTimeout(timeout time.Duration) *V1SpectroClustersUIDUpgradeSettingsParams { + var () + return &V1SpectroClustersUIDUpgradeSettingsParams{ + + timeout: timeout, + } +} + +// NewV1SpectroClustersUIDUpgradeSettingsParamsWithContext creates a new V1SpectroClustersUIDUpgradeSettingsParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1SpectroClustersUIDUpgradeSettingsParamsWithContext(ctx context.Context) *V1SpectroClustersUIDUpgradeSettingsParams { + var () + return &V1SpectroClustersUIDUpgradeSettingsParams{ + + Context: ctx, + } +} + +// NewV1SpectroClustersUIDUpgradeSettingsParamsWithHTTPClient creates a new V1SpectroClustersUIDUpgradeSettingsParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1SpectroClustersUIDUpgradeSettingsParamsWithHTTPClient(client *http.Client) *V1SpectroClustersUIDUpgradeSettingsParams { + var () + return &V1SpectroClustersUIDUpgradeSettingsParams{ + HTTPClient: client, + } +} + +/* +V1SpectroClustersUIDUpgradeSettingsParams contains all the parameters to send to the API endpoint +for the v1 spectro clusters Uid upgrade settings operation typically these are written to a http.Request +*/ +type V1SpectroClustersUIDUpgradeSettingsParams struct { + + /*Body*/ + Body *models.V1ClusterUpgradeSettingsEntity + /*UID + Cluster uid + + */ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 spectro clusters Uid upgrade settings params +func (o *V1SpectroClustersUIDUpgradeSettingsParams) WithTimeout(timeout time.Duration) *V1SpectroClustersUIDUpgradeSettingsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 spectro clusters Uid upgrade settings params +func (o *V1SpectroClustersUIDUpgradeSettingsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 spectro clusters Uid upgrade settings params +func (o *V1SpectroClustersUIDUpgradeSettingsParams) WithContext(ctx context.Context) *V1SpectroClustersUIDUpgradeSettingsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 spectro clusters Uid upgrade settings params +func (o *V1SpectroClustersUIDUpgradeSettingsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 spectro clusters Uid upgrade settings params +func (o *V1SpectroClustersUIDUpgradeSettingsParams) WithHTTPClient(client *http.Client) *V1SpectroClustersUIDUpgradeSettingsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 spectro clusters Uid upgrade settings params +func (o *V1SpectroClustersUIDUpgradeSettingsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 spectro clusters Uid upgrade settings params +func (o *V1SpectroClustersUIDUpgradeSettingsParams) WithBody(body *models.V1ClusterUpgradeSettingsEntity) *V1SpectroClustersUIDUpgradeSettingsParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 spectro clusters Uid upgrade settings params +func (o *V1SpectroClustersUIDUpgradeSettingsParams) SetBody(body *models.V1ClusterUpgradeSettingsEntity) { + o.Body = body +} + +// WithUID adds the uid to the v1 spectro clusters Uid upgrade settings params +func (o *V1SpectroClustersUIDUpgradeSettingsParams) WithUID(uid string) *V1SpectroClustersUIDUpgradeSettingsParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 spectro clusters Uid upgrade settings params +func (o *V1SpectroClustersUIDUpgradeSettingsParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1SpectroClustersUIDUpgradeSettingsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_uid_upgrade_settings_responses.go b/api/client/v1/v1_spectro_clusters_uid_upgrade_settings_responses.go new file mode 100644 index 00000000..917a72aa --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_uid_upgrade_settings_responses.go @@ -0,0 +1,61 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1SpectroClustersUIDUpgradeSettingsReader is a Reader for the V1SpectroClustersUIDUpgradeSettings structure. +type V1SpectroClustersUIDUpgradeSettingsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1SpectroClustersUIDUpgradeSettingsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1SpectroClustersUIDUpgradeSettingsNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1SpectroClustersUIDUpgradeSettingsNoContent creates a V1SpectroClustersUIDUpgradeSettingsNoContent with default headers values +func NewV1SpectroClustersUIDUpgradeSettingsNoContent() *V1SpectroClustersUIDUpgradeSettingsNoContent { + return &V1SpectroClustersUIDUpgradeSettingsNoContent{} +} + +/* +V1SpectroClustersUIDUpgradeSettingsNoContent handles this case with default header values. + +Ok response without content +*/ +type V1SpectroClustersUIDUpgradeSettingsNoContent struct { + /*Audit uid for the request + */ + AuditUID string +} + +func (o *V1SpectroClustersUIDUpgradeSettingsNoContent) Error() string { + return fmt.Sprintf("[POST /v1/spectroclusters/{uid}/upgrade/settings][%d] v1SpectroClustersUidUpgradeSettingsNoContent ", 204) +} + +func (o *V1SpectroClustersUIDUpgradeSettingsNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header AuditUid + o.AuditUID = response.GetHeader("AuditUid") + + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_uid_upgrades_put_parameters.go b/api/client/v1/v1_spectro_clusters_uid_upgrades_put_parameters.go new file mode 100644 index 00000000..1676053d --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_uid_upgrades_put_parameters.go @@ -0,0 +1,154 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1SpectroClustersUIDUpgradesPutParams creates a new V1SpectroClustersUIDUpgradesPutParams object +// with the default values initialized. +func NewV1SpectroClustersUIDUpgradesPutParams() *V1SpectroClustersUIDUpgradesPutParams { + var () + return &V1SpectroClustersUIDUpgradesPutParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1SpectroClustersUIDUpgradesPutParamsWithTimeout creates a new V1SpectroClustersUIDUpgradesPutParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1SpectroClustersUIDUpgradesPutParamsWithTimeout(timeout time.Duration) *V1SpectroClustersUIDUpgradesPutParams { + var () + return &V1SpectroClustersUIDUpgradesPutParams{ + + timeout: timeout, + } +} + +// NewV1SpectroClustersUIDUpgradesPutParamsWithContext creates a new V1SpectroClustersUIDUpgradesPutParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1SpectroClustersUIDUpgradesPutParamsWithContext(ctx context.Context) *V1SpectroClustersUIDUpgradesPutParams { + var () + return &V1SpectroClustersUIDUpgradesPutParams{ + + Context: ctx, + } +} + +// NewV1SpectroClustersUIDUpgradesPutParamsWithHTTPClient creates a new V1SpectroClustersUIDUpgradesPutParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1SpectroClustersUIDUpgradesPutParamsWithHTTPClient(client *http.Client) *V1SpectroClustersUIDUpgradesPutParams { + var () + return &V1SpectroClustersUIDUpgradesPutParams{ + HTTPClient: client, + } +} + +/* +V1SpectroClustersUIDUpgradesPutParams contains all the parameters to send to the API endpoint +for the v1 spectro clusters Uid upgrades put operation typically these are written to a http.Request +*/ +type V1SpectroClustersUIDUpgradesPutParams struct { + + /*Body*/ + Body *models.V1SpectroClusterUIDUpgrades + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 spectro clusters Uid upgrades put params +func (o *V1SpectroClustersUIDUpgradesPutParams) WithTimeout(timeout time.Duration) *V1SpectroClustersUIDUpgradesPutParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 spectro clusters Uid upgrades put params +func (o *V1SpectroClustersUIDUpgradesPutParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 spectro clusters Uid upgrades put params +func (o *V1SpectroClustersUIDUpgradesPutParams) WithContext(ctx context.Context) *V1SpectroClustersUIDUpgradesPutParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 spectro clusters Uid upgrades put params +func (o *V1SpectroClustersUIDUpgradesPutParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 spectro clusters Uid upgrades put params +func (o *V1SpectroClustersUIDUpgradesPutParams) WithHTTPClient(client *http.Client) *V1SpectroClustersUIDUpgradesPutParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 spectro clusters Uid upgrades put params +func (o *V1SpectroClustersUIDUpgradesPutParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 spectro clusters Uid upgrades put params +func (o *V1SpectroClustersUIDUpgradesPutParams) WithBody(body *models.V1SpectroClusterUIDUpgrades) *V1SpectroClustersUIDUpgradesPutParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 spectro clusters Uid upgrades put params +func (o *V1SpectroClustersUIDUpgradesPutParams) SetBody(body *models.V1SpectroClusterUIDUpgrades) { + o.Body = body +} + +// WithUID adds the uid to the v1 spectro clusters Uid upgrades put params +func (o *V1SpectroClustersUIDUpgradesPutParams) WithUID(uid string) *V1SpectroClustersUIDUpgradesPutParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 spectro clusters Uid upgrades put params +func (o *V1SpectroClustersUIDUpgradesPutParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1SpectroClustersUIDUpgradesPutParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_uid_upgrades_put_responses.go b/api/client/v1/v1_spectro_clusters_uid_upgrades_put_responses.go new file mode 100644 index 00000000..bfcfcfde --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_uid_upgrades_put_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1SpectroClustersUIDUpgradesPutReader is a Reader for the V1SpectroClustersUIDUpgradesPut structure. +type V1SpectroClustersUIDUpgradesPutReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1SpectroClustersUIDUpgradesPutReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1SpectroClustersUIDUpgradesPutNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1SpectroClustersUIDUpgradesPutNoContent creates a V1SpectroClustersUIDUpgradesPutNoContent with default headers values +func NewV1SpectroClustersUIDUpgradesPutNoContent() *V1SpectroClustersUIDUpgradesPutNoContent { + return &V1SpectroClustersUIDUpgradesPutNoContent{} +} + +/* +V1SpectroClustersUIDUpgradesPutNoContent handles this case with default header values. + +The resource was updated successfully +*/ +type V1SpectroClustersUIDUpgradesPutNoContent struct { +} + +func (o *V1SpectroClustersUIDUpgradesPutNoContent) Error() string { + return fmt.Sprintf("[PUT /v1/spectroclusters/{uid}/status/upgrades][%d] v1SpectroClustersUidUpgradesPutNoContent ", 204) +} + +func (o *V1SpectroClustersUIDUpgradesPutNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_uid_validate_packs_parameters.go b/api/client/v1/v1_spectro_clusters_uid_validate_packs_parameters.go new file mode 100644 index 00000000..75bc2c96 --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_uid_validate_packs_parameters.go @@ -0,0 +1,157 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1SpectroClustersUIDValidatePacksParams creates a new V1SpectroClustersUIDValidatePacksParams object +// with the default values initialized. +func NewV1SpectroClustersUIDValidatePacksParams() *V1SpectroClustersUIDValidatePacksParams { + var () + return &V1SpectroClustersUIDValidatePacksParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1SpectroClustersUIDValidatePacksParamsWithTimeout creates a new V1SpectroClustersUIDValidatePacksParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1SpectroClustersUIDValidatePacksParamsWithTimeout(timeout time.Duration) *V1SpectroClustersUIDValidatePacksParams { + var () + return &V1SpectroClustersUIDValidatePacksParams{ + + timeout: timeout, + } +} + +// NewV1SpectroClustersUIDValidatePacksParamsWithContext creates a new V1SpectroClustersUIDValidatePacksParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1SpectroClustersUIDValidatePacksParamsWithContext(ctx context.Context) *V1SpectroClustersUIDValidatePacksParams { + var () + return &V1SpectroClustersUIDValidatePacksParams{ + + Context: ctx, + } +} + +// NewV1SpectroClustersUIDValidatePacksParamsWithHTTPClient creates a new V1SpectroClustersUIDValidatePacksParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1SpectroClustersUIDValidatePacksParamsWithHTTPClient(client *http.Client) *V1SpectroClustersUIDValidatePacksParams { + var () + return &V1SpectroClustersUIDValidatePacksParams{ + HTTPClient: client, + } +} + +/* +V1SpectroClustersUIDValidatePacksParams contains all the parameters to send to the API endpoint +for the v1 spectro clusters Uid validate packs operation typically these are written to a http.Request +*/ +type V1SpectroClustersUIDValidatePacksParams struct { + + /*Body*/ + Body *models.V1SpectroClusterPacksEntity + /*UID + cluster uid + + */ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 spectro clusters Uid validate packs params +func (o *V1SpectroClustersUIDValidatePacksParams) WithTimeout(timeout time.Duration) *V1SpectroClustersUIDValidatePacksParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 spectro clusters Uid validate packs params +func (o *V1SpectroClustersUIDValidatePacksParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 spectro clusters Uid validate packs params +func (o *V1SpectroClustersUIDValidatePacksParams) WithContext(ctx context.Context) *V1SpectroClustersUIDValidatePacksParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 spectro clusters Uid validate packs params +func (o *V1SpectroClustersUIDValidatePacksParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 spectro clusters Uid validate packs params +func (o *V1SpectroClustersUIDValidatePacksParams) WithHTTPClient(client *http.Client) *V1SpectroClustersUIDValidatePacksParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 spectro clusters Uid validate packs params +func (o *V1SpectroClustersUIDValidatePacksParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 spectro clusters Uid validate packs params +func (o *V1SpectroClustersUIDValidatePacksParams) WithBody(body *models.V1SpectroClusterPacksEntity) *V1SpectroClustersUIDValidatePacksParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 spectro clusters Uid validate packs params +func (o *V1SpectroClustersUIDValidatePacksParams) SetBody(body *models.V1SpectroClusterPacksEntity) { + o.Body = body +} + +// WithUID adds the uid to the v1 spectro clusters Uid validate packs params +func (o *V1SpectroClustersUIDValidatePacksParams) WithUID(uid string) *V1SpectroClustersUIDValidatePacksParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 spectro clusters Uid validate packs params +func (o *V1SpectroClustersUIDValidatePacksParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1SpectroClustersUIDValidatePacksParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_uid_validate_packs_responses.go b/api/client/v1/v1_spectro_clusters_uid_validate_packs_responses.go new file mode 100644 index 00000000..5d098a11 --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_uid_validate_packs_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1SpectroClustersUIDValidatePacksReader is a Reader for the V1SpectroClustersUIDValidatePacks structure. +type V1SpectroClustersUIDValidatePacksReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1SpectroClustersUIDValidatePacksReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1SpectroClustersUIDValidatePacksOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1SpectroClustersUIDValidatePacksOK creates a V1SpectroClustersUIDValidatePacksOK with default headers values +func NewV1SpectroClustersUIDValidatePacksOK() *V1SpectroClustersUIDValidatePacksOK { + return &V1SpectroClustersUIDValidatePacksOK{} +} + +/* +V1SpectroClustersUIDValidatePacksOK handles this case with default header values. + +Cluster packs validation response +*/ +type V1SpectroClustersUIDValidatePacksOK struct { + Payload *models.V1SpectroClusterValidatorResponse +} + +func (o *V1SpectroClustersUIDValidatePacksOK) Error() string { + return fmt.Sprintf("[POST /v1/spectroclusters/{uid}/validate/packs][%d] v1SpectroClustersUidValidatePacksOK %+v", 200, o.Payload) +} + +func (o *V1SpectroClustersUIDValidatePacksOK) GetPayload() *models.V1SpectroClusterValidatorResponse { + return o.Payload +} + +func (o *V1SpectroClustersUIDValidatePacksOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1SpectroClusterValidatorResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_uid_validate_repave_parameters.go b/api/client/v1/v1_spectro_clusters_uid_validate_repave_parameters.go new file mode 100644 index 00000000..7db5d738 --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_uid_validate_repave_parameters.go @@ -0,0 +1,157 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1SpectroClustersUIDValidateRepaveParams creates a new V1SpectroClustersUIDValidateRepaveParams object +// with the default values initialized. +func NewV1SpectroClustersUIDValidateRepaveParams() *V1SpectroClustersUIDValidateRepaveParams { + var () + return &V1SpectroClustersUIDValidateRepaveParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1SpectroClustersUIDValidateRepaveParamsWithTimeout creates a new V1SpectroClustersUIDValidateRepaveParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1SpectroClustersUIDValidateRepaveParamsWithTimeout(timeout time.Duration) *V1SpectroClustersUIDValidateRepaveParams { + var () + return &V1SpectroClustersUIDValidateRepaveParams{ + + timeout: timeout, + } +} + +// NewV1SpectroClustersUIDValidateRepaveParamsWithContext creates a new V1SpectroClustersUIDValidateRepaveParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1SpectroClustersUIDValidateRepaveParamsWithContext(ctx context.Context) *V1SpectroClustersUIDValidateRepaveParams { + var () + return &V1SpectroClustersUIDValidateRepaveParams{ + + Context: ctx, + } +} + +// NewV1SpectroClustersUIDValidateRepaveParamsWithHTTPClient creates a new V1SpectroClustersUIDValidateRepaveParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1SpectroClustersUIDValidateRepaveParamsWithHTTPClient(client *http.Client) *V1SpectroClustersUIDValidateRepaveParams { + var () + return &V1SpectroClustersUIDValidateRepaveParams{ + HTTPClient: client, + } +} + +/* +V1SpectroClustersUIDValidateRepaveParams contains all the parameters to send to the API endpoint +for the v1 spectro clusters Uid validate repave operation typically these are written to a http.Request +*/ +type V1SpectroClustersUIDValidateRepaveParams struct { + + /*Body*/ + Body *models.V1SpectroClusterPacksEntity + /*UID + cluster uid + + */ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 spectro clusters Uid validate repave params +func (o *V1SpectroClustersUIDValidateRepaveParams) WithTimeout(timeout time.Duration) *V1SpectroClustersUIDValidateRepaveParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 spectro clusters Uid validate repave params +func (o *V1SpectroClustersUIDValidateRepaveParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 spectro clusters Uid validate repave params +func (o *V1SpectroClustersUIDValidateRepaveParams) WithContext(ctx context.Context) *V1SpectroClustersUIDValidateRepaveParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 spectro clusters Uid validate repave params +func (o *V1SpectroClustersUIDValidateRepaveParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 spectro clusters Uid validate repave params +func (o *V1SpectroClustersUIDValidateRepaveParams) WithHTTPClient(client *http.Client) *V1SpectroClustersUIDValidateRepaveParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 spectro clusters Uid validate repave params +func (o *V1SpectroClustersUIDValidateRepaveParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 spectro clusters Uid validate repave params +func (o *V1SpectroClustersUIDValidateRepaveParams) WithBody(body *models.V1SpectroClusterPacksEntity) *V1SpectroClustersUIDValidateRepaveParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 spectro clusters Uid validate repave params +func (o *V1SpectroClustersUIDValidateRepaveParams) SetBody(body *models.V1SpectroClusterPacksEntity) { + o.Body = body +} + +// WithUID adds the uid to the v1 spectro clusters Uid validate repave params +func (o *V1SpectroClustersUIDValidateRepaveParams) WithUID(uid string) *V1SpectroClustersUIDValidateRepaveParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 spectro clusters Uid validate repave params +func (o *V1SpectroClustersUIDValidateRepaveParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1SpectroClustersUIDValidateRepaveParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_uid_validate_repave_responses.go b/api/client/v1/v1_spectro_clusters_uid_validate_repave_responses.go new file mode 100644 index 00000000..9b9405e5 --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_uid_validate_repave_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1SpectroClustersUIDValidateRepaveReader is a Reader for the V1SpectroClustersUIDValidateRepave structure. +type V1SpectroClustersUIDValidateRepaveReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1SpectroClustersUIDValidateRepaveReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1SpectroClustersUIDValidateRepaveOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1SpectroClustersUIDValidateRepaveOK creates a V1SpectroClustersUIDValidateRepaveOK with default headers values +func NewV1SpectroClustersUIDValidateRepaveOK() *V1SpectroClustersUIDValidateRepaveOK { + return &V1SpectroClustersUIDValidateRepaveOK{} +} + +/* +V1SpectroClustersUIDValidateRepaveOK handles this case with default header values. + +Cluster repave validation response +*/ +type V1SpectroClustersUIDValidateRepaveOK struct { + Payload *models.V1SpectroClusterRepaveValidationResponse +} + +func (o *V1SpectroClustersUIDValidateRepaveOK) Error() string { + return fmt.Sprintf("[POST /v1/spectroclusters/{uid}/validate/repave][%d] v1SpectroClustersUidValidateRepaveOK %+v", 200, o.Payload) +} + +func (o *V1SpectroClustersUIDValidateRepaveOK) GetPayload() *models.V1SpectroClusterRepaveValidationResponse { + return o.Payload +} + +func (o *V1SpectroClustersUIDValidateRepaveOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1SpectroClusterRepaveValidationResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_uid_variables_get_parameters.go b/api/client/v1/v1_spectro_clusters_uid_variables_get_parameters.go new file mode 100644 index 00000000..6b327b12 --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_uid_variables_get_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1SpectroClustersUIDVariablesGetParams creates a new V1SpectroClustersUIDVariablesGetParams object +// with the default values initialized. +func NewV1SpectroClustersUIDVariablesGetParams() *V1SpectroClustersUIDVariablesGetParams { + var () + return &V1SpectroClustersUIDVariablesGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1SpectroClustersUIDVariablesGetParamsWithTimeout creates a new V1SpectroClustersUIDVariablesGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1SpectroClustersUIDVariablesGetParamsWithTimeout(timeout time.Duration) *V1SpectroClustersUIDVariablesGetParams { + var () + return &V1SpectroClustersUIDVariablesGetParams{ + + timeout: timeout, + } +} + +// NewV1SpectroClustersUIDVariablesGetParamsWithContext creates a new V1SpectroClustersUIDVariablesGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1SpectroClustersUIDVariablesGetParamsWithContext(ctx context.Context) *V1SpectroClustersUIDVariablesGetParams { + var () + return &V1SpectroClustersUIDVariablesGetParams{ + + Context: ctx, + } +} + +// NewV1SpectroClustersUIDVariablesGetParamsWithHTTPClient creates a new V1SpectroClustersUIDVariablesGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1SpectroClustersUIDVariablesGetParamsWithHTTPClient(client *http.Client) *V1SpectroClustersUIDVariablesGetParams { + var () + return &V1SpectroClustersUIDVariablesGetParams{ + HTTPClient: client, + } +} + +/* +V1SpectroClustersUIDVariablesGetParams contains all the parameters to send to the API endpoint +for the v1 spectro clusters Uid variables get operation typically these are written to a http.Request +*/ +type V1SpectroClustersUIDVariablesGetParams struct { + + /*UID + Cluster uid for which variables need to be retrieved + + */ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 spectro clusters Uid variables get params +func (o *V1SpectroClustersUIDVariablesGetParams) WithTimeout(timeout time.Duration) *V1SpectroClustersUIDVariablesGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 spectro clusters Uid variables get params +func (o *V1SpectroClustersUIDVariablesGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 spectro clusters Uid variables get params +func (o *V1SpectroClustersUIDVariablesGetParams) WithContext(ctx context.Context) *V1SpectroClustersUIDVariablesGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 spectro clusters Uid variables get params +func (o *V1SpectroClustersUIDVariablesGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 spectro clusters Uid variables get params +func (o *V1SpectroClustersUIDVariablesGetParams) WithHTTPClient(client *http.Client) *V1SpectroClustersUIDVariablesGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 spectro clusters Uid variables get params +func (o *V1SpectroClustersUIDVariablesGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithUID adds the uid to the v1 spectro clusters Uid variables get params +func (o *V1SpectroClustersUIDVariablesGetParams) WithUID(uid string) *V1SpectroClustersUIDVariablesGetParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 spectro clusters Uid variables get params +func (o *V1SpectroClustersUIDVariablesGetParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1SpectroClustersUIDVariablesGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_uid_variables_get_responses.go b/api/client/v1/v1_spectro_clusters_uid_variables_get_responses.go new file mode 100644 index 00000000..65be8a29 --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_uid_variables_get_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1SpectroClustersUIDVariablesGetReader is a Reader for the V1SpectroClustersUIDVariablesGet structure. +type V1SpectroClustersUIDVariablesGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1SpectroClustersUIDVariablesGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1SpectroClustersUIDVariablesGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1SpectroClustersUIDVariablesGetOK creates a V1SpectroClustersUIDVariablesGetOK with default headers values +func NewV1SpectroClustersUIDVariablesGetOK() *V1SpectroClustersUIDVariablesGetOK { + return &V1SpectroClustersUIDVariablesGetOK{} +} + +/* +V1SpectroClustersUIDVariablesGetOK handles this case with default header values. + +(empty) +*/ +type V1SpectroClustersUIDVariablesGetOK struct { + Payload *models.V1Variables +} + +func (o *V1SpectroClustersUIDVariablesGetOK) Error() string { + return fmt.Sprintf("[GET /v1/spectroclusters/{uid}/variables][%d] v1SpectroClustersUidVariablesGetOK %+v", 200, o.Payload) +} + +func (o *V1SpectroClustersUIDVariablesGetOK) GetPayload() *models.V1Variables { + return o.Payload +} + +func (o *V1SpectroClustersUIDVariablesGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1Variables) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_uid_workloads_kind_sync_parameters.go b/api/client/v1/v1_spectro_clusters_uid_workloads_kind_sync_parameters.go new file mode 100644 index 00000000..4c1739ab --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_uid_workloads_kind_sync_parameters.go @@ -0,0 +1,157 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1SpectroClustersUIDWorkloadsKindSyncParams creates a new V1SpectroClustersUIDWorkloadsKindSyncParams object +// with the default values initialized. +func NewV1SpectroClustersUIDWorkloadsKindSyncParams() *V1SpectroClustersUIDWorkloadsKindSyncParams { + var () + return &V1SpectroClustersUIDWorkloadsKindSyncParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1SpectroClustersUIDWorkloadsKindSyncParamsWithTimeout creates a new V1SpectroClustersUIDWorkloadsKindSyncParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1SpectroClustersUIDWorkloadsKindSyncParamsWithTimeout(timeout time.Duration) *V1SpectroClustersUIDWorkloadsKindSyncParams { + var () + return &V1SpectroClustersUIDWorkloadsKindSyncParams{ + + timeout: timeout, + } +} + +// NewV1SpectroClustersUIDWorkloadsKindSyncParamsWithContext creates a new V1SpectroClustersUIDWorkloadsKindSyncParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1SpectroClustersUIDWorkloadsKindSyncParamsWithContext(ctx context.Context) *V1SpectroClustersUIDWorkloadsKindSyncParams { + var () + return &V1SpectroClustersUIDWorkloadsKindSyncParams{ + + Context: ctx, + } +} + +// NewV1SpectroClustersUIDWorkloadsKindSyncParamsWithHTTPClient creates a new V1SpectroClustersUIDWorkloadsKindSyncParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1SpectroClustersUIDWorkloadsKindSyncParamsWithHTTPClient(client *http.Client) *V1SpectroClustersUIDWorkloadsKindSyncParams { + var () + return &V1SpectroClustersUIDWorkloadsKindSyncParams{ + HTTPClient: client, + } +} + +/* +V1SpectroClustersUIDWorkloadsKindSyncParams contains all the parameters to send to the API endpoint +for the v1 spectro clusters Uid workloads kind sync operation typically these are written to a http.Request +*/ +type V1SpectroClustersUIDWorkloadsKindSyncParams struct { + + /*UID + Cluster uid + + */ + UID string + /*WorkloadKind + Workload kind + + */ + WorkloadKind string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 spectro clusters Uid workloads kind sync params +func (o *V1SpectroClustersUIDWorkloadsKindSyncParams) WithTimeout(timeout time.Duration) *V1SpectroClustersUIDWorkloadsKindSyncParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 spectro clusters Uid workloads kind sync params +func (o *V1SpectroClustersUIDWorkloadsKindSyncParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 spectro clusters Uid workloads kind sync params +func (o *V1SpectroClustersUIDWorkloadsKindSyncParams) WithContext(ctx context.Context) *V1SpectroClustersUIDWorkloadsKindSyncParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 spectro clusters Uid workloads kind sync params +func (o *V1SpectroClustersUIDWorkloadsKindSyncParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 spectro clusters Uid workloads kind sync params +func (o *V1SpectroClustersUIDWorkloadsKindSyncParams) WithHTTPClient(client *http.Client) *V1SpectroClustersUIDWorkloadsKindSyncParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 spectro clusters Uid workloads kind sync params +func (o *V1SpectroClustersUIDWorkloadsKindSyncParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithUID adds the uid to the v1 spectro clusters Uid workloads kind sync params +func (o *V1SpectroClustersUIDWorkloadsKindSyncParams) WithUID(uid string) *V1SpectroClustersUIDWorkloadsKindSyncParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 spectro clusters Uid workloads kind sync params +func (o *V1SpectroClustersUIDWorkloadsKindSyncParams) SetUID(uid string) { + o.UID = uid +} + +// WithWorkloadKind adds the workloadKind to the v1 spectro clusters Uid workloads kind sync params +func (o *V1SpectroClustersUIDWorkloadsKindSyncParams) WithWorkloadKind(workloadKind string) *V1SpectroClustersUIDWorkloadsKindSyncParams { + o.SetWorkloadKind(workloadKind) + return o +} + +// SetWorkloadKind adds the workloadKind to the v1 spectro clusters Uid workloads kind sync params +func (o *V1SpectroClustersUIDWorkloadsKindSyncParams) SetWorkloadKind(workloadKind string) { + o.WorkloadKind = workloadKind +} + +// WriteToRequest writes these params to a swagger request +func (o *V1SpectroClustersUIDWorkloadsKindSyncParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + // path param workloadKind + if err := r.SetPathParam("workloadKind", o.WorkloadKind); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_uid_workloads_kind_sync_responses.go b/api/client/v1/v1_spectro_clusters_uid_workloads_kind_sync_responses.go new file mode 100644 index 00000000..5aeace43 --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_uid_workloads_kind_sync_responses.go @@ -0,0 +1,61 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1SpectroClustersUIDWorkloadsKindSyncReader is a Reader for the V1SpectroClustersUIDWorkloadsKindSync structure. +type V1SpectroClustersUIDWorkloadsKindSyncReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1SpectroClustersUIDWorkloadsKindSyncReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 202: + result := NewV1SpectroClustersUIDWorkloadsKindSyncAccepted() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1SpectroClustersUIDWorkloadsKindSyncAccepted creates a V1SpectroClustersUIDWorkloadsKindSyncAccepted with default headers values +func NewV1SpectroClustersUIDWorkloadsKindSyncAccepted() *V1SpectroClustersUIDWorkloadsKindSyncAccepted { + return &V1SpectroClustersUIDWorkloadsKindSyncAccepted{} +} + +/* +V1SpectroClustersUIDWorkloadsKindSyncAccepted handles this case with default header values. + +Ok response without content +*/ +type V1SpectroClustersUIDWorkloadsKindSyncAccepted struct { + /*Audit uid for the request + */ + AuditUID string +} + +func (o *V1SpectroClustersUIDWorkloadsKindSyncAccepted) Error() string { + return fmt.Sprintf("[POST /v1/spectroclusters/{uid}/workloads/{workloadKind}/sync][%d] v1SpectroClustersUidWorkloadsKindSyncAccepted ", 202) +} + +func (o *V1SpectroClustersUIDWorkloadsKindSyncAccepted) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header AuditUid + o.AuditUID = response.GetHeader("AuditUid") + + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_uid_workloads_sync_parameters.go b/api/client/v1/v1_spectro_clusters_uid_workloads_sync_parameters.go new file mode 100644 index 00000000..b79c3078 --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_uid_workloads_sync_parameters.go @@ -0,0 +1,133 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1SpectroClustersUIDWorkloadsSyncParams creates a new V1SpectroClustersUIDWorkloadsSyncParams object +// with the default values initialized. +func NewV1SpectroClustersUIDWorkloadsSyncParams() *V1SpectroClustersUIDWorkloadsSyncParams { + var () + return &V1SpectroClustersUIDWorkloadsSyncParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1SpectroClustersUIDWorkloadsSyncParamsWithTimeout creates a new V1SpectroClustersUIDWorkloadsSyncParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1SpectroClustersUIDWorkloadsSyncParamsWithTimeout(timeout time.Duration) *V1SpectroClustersUIDWorkloadsSyncParams { + var () + return &V1SpectroClustersUIDWorkloadsSyncParams{ + + timeout: timeout, + } +} + +// NewV1SpectroClustersUIDWorkloadsSyncParamsWithContext creates a new V1SpectroClustersUIDWorkloadsSyncParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1SpectroClustersUIDWorkloadsSyncParamsWithContext(ctx context.Context) *V1SpectroClustersUIDWorkloadsSyncParams { + var () + return &V1SpectroClustersUIDWorkloadsSyncParams{ + + Context: ctx, + } +} + +// NewV1SpectroClustersUIDWorkloadsSyncParamsWithHTTPClient creates a new V1SpectroClustersUIDWorkloadsSyncParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1SpectroClustersUIDWorkloadsSyncParamsWithHTTPClient(client *http.Client) *V1SpectroClustersUIDWorkloadsSyncParams { + var () + return &V1SpectroClustersUIDWorkloadsSyncParams{ + HTTPClient: client, + } +} + +/* +V1SpectroClustersUIDWorkloadsSyncParams contains all the parameters to send to the API endpoint +for the v1 spectro clusters Uid workloads sync operation typically these are written to a http.Request +*/ +type V1SpectroClustersUIDWorkloadsSyncParams struct { + + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 spectro clusters Uid workloads sync params +func (o *V1SpectroClustersUIDWorkloadsSyncParams) WithTimeout(timeout time.Duration) *V1SpectroClustersUIDWorkloadsSyncParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 spectro clusters Uid workloads sync params +func (o *V1SpectroClustersUIDWorkloadsSyncParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 spectro clusters Uid workloads sync params +func (o *V1SpectroClustersUIDWorkloadsSyncParams) WithContext(ctx context.Context) *V1SpectroClustersUIDWorkloadsSyncParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 spectro clusters Uid workloads sync params +func (o *V1SpectroClustersUIDWorkloadsSyncParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 spectro clusters Uid workloads sync params +func (o *V1SpectroClustersUIDWorkloadsSyncParams) WithHTTPClient(client *http.Client) *V1SpectroClustersUIDWorkloadsSyncParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 spectro clusters Uid workloads sync params +func (o *V1SpectroClustersUIDWorkloadsSyncParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithUID adds the uid to the v1 spectro clusters Uid workloads sync params +func (o *V1SpectroClustersUIDWorkloadsSyncParams) WithUID(uid string) *V1SpectroClustersUIDWorkloadsSyncParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 spectro clusters Uid workloads sync params +func (o *V1SpectroClustersUIDWorkloadsSyncParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1SpectroClustersUIDWorkloadsSyncParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_uid_workloads_sync_responses.go b/api/client/v1/v1_spectro_clusters_uid_workloads_sync_responses.go new file mode 100644 index 00000000..d2cef17a --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_uid_workloads_sync_responses.go @@ -0,0 +1,61 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1SpectroClustersUIDWorkloadsSyncReader is a Reader for the V1SpectroClustersUIDWorkloadsSync structure. +type V1SpectroClustersUIDWorkloadsSyncReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1SpectroClustersUIDWorkloadsSyncReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 202: + result := NewV1SpectroClustersUIDWorkloadsSyncAccepted() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1SpectroClustersUIDWorkloadsSyncAccepted creates a V1SpectroClustersUIDWorkloadsSyncAccepted with default headers values +func NewV1SpectroClustersUIDWorkloadsSyncAccepted() *V1SpectroClustersUIDWorkloadsSyncAccepted { + return &V1SpectroClustersUIDWorkloadsSyncAccepted{} +} + +/* +V1SpectroClustersUIDWorkloadsSyncAccepted handles this case with default header values. + +Ok response without content +*/ +type V1SpectroClustersUIDWorkloadsSyncAccepted struct { + /*Audit uid for the request + */ + AuditUID string +} + +func (o *V1SpectroClustersUIDWorkloadsSyncAccepted) Error() string { + return fmt.Sprintf("[POST /v1/spectroclusters/{uid}/workloads/sync][%d] v1SpectroClustersUidWorkloadsSyncAccepted ", 202) +} + +func (o *V1SpectroClustersUIDWorkloadsSyncAccepted) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header AuditUid + o.AuditUID = response.GetHeader("AuditUid") + + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_update_profiles_parameters.go b/api/client/v1/v1_spectro_clusters_update_profiles_parameters.go new file mode 100644 index 00000000..c3efa77c --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_update_profiles_parameters.go @@ -0,0 +1,202 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1SpectroClustersUpdateProfilesParams creates a new V1SpectroClustersUpdateProfilesParams object +// with the default values initialized. +func NewV1SpectroClustersUpdateProfilesParams() *V1SpectroClustersUpdateProfilesParams { + var ( + resolveNotificationDefault = bool(false) + ) + return &V1SpectroClustersUpdateProfilesParams{ + ResolveNotification: &resolveNotificationDefault, + + timeout: cr.DefaultTimeout, + } +} + +// NewV1SpectroClustersUpdateProfilesParamsWithTimeout creates a new V1SpectroClustersUpdateProfilesParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1SpectroClustersUpdateProfilesParamsWithTimeout(timeout time.Duration) *V1SpectroClustersUpdateProfilesParams { + var ( + resolveNotificationDefault = bool(false) + ) + return &V1SpectroClustersUpdateProfilesParams{ + ResolveNotification: &resolveNotificationDefault, + + timeout: timeout, + } +} + +// NewV1SpectroClustersUpdateProfilesParamsWithContext creates a new V1SpectroClustersUpdateProfilesParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1SpectroClustersUpdateProfilesParamsWithContext(ctx context.Context) *V1SpectroClustersUpdateProfilesParams { + var ( + resolveNotificationDefault = bool(false) + ) + return &V1SpectroClustersUpdateProfilesParams{ + ResolveNotification: &resolveNotificationDefault, + + Context: ctx, + } +} + +// NewV1SpectroClustersUpdateProfilesParamsWithHTTPClient creates a new V1SpectroClustersUpdateProfilesParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1SpectroClustersUpdateProfilesParamsWithHTTPClient(client *http.Client) *V1SpectroClustersUpdateProfilesParams { + var ( + resolveNotificationDefault = bool(false) + ) + return &V1SpectroClustersUpdateProfilesParams{ + ResolveNotification: &resolveNotificationDefault, + HTTPClient: client, + } +} + +/* +V1SpectroClustersUpdateProfilesParams contains all the parameters to send to the API endpoint +for the v1 spectro clusters update profiles operation typically these are written to a http.Request +*/ +type V1SpectroClustersUpdateProfilesParams struct { + + /*Body*/ + Body *models.V1SpectroClusterProfiles + /*ResolveNotification + Resolve pending cluster notification if set to true + + */ + ResolveNotification *bool + /*UID + Cluster uid + + */ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 spectro clusters update profiles params +func (o *V1SpectroClustersUpdateProfilesParams) WithTimeout(timeout time.Duration) *V1SpectroClustersUpdateProfilesParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 spectro clusters update profiles params +func (o *V1SpectroClustersUpdateProfilesParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 spectro clusters update profiles params +func (o *V1SpectroClustersUpdateProfilesParams) WithContext(ctx context.Context) *V1SpectroClustersUpdateProfilesParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 spectro clusters update profiles params +func (o *V1SpectroClustersUpdateProfilesParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 spectro clusters update profiles params +func (o *V1SpectroClustersUpdateProfilesParams) WithHTTPClient(client *http.Client) *V1SpectroClustersUpdateProfilesParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 spectro clusters update profiles params +func (o *V1SpectroClustersUpdateProfilesParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 spectro clusters update profiles params +func (o *V1SpectroClustersUpdateProfilesParams) WithBody(body *models.V1SpectroClusterProfiles) *V1SpectroClustersUpdateProfilesParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 spectro clusters update profiles params +func (o *V1SpectroClustersUpdateProfilesParams) SetBody(body *models.V1SpectroClusterProfiles) { + o.Body = body +} + +// WithResolveNotification adds the resolveNotification to the v1 spectro clusters update profiles params +func (o *V1SpectroClustersUpdateProfilesParams) WithResolveNotification(resolveNotification *bool) *V1SpectroClustersUpdateProfilesParams { + o.SetResolveNotification(resolveNotification) + return o +} + +// SetResolveNotification adds the resolveNotification to the v1 spectro clusters update profiles params +func (o *V1SpectroClustersUpdateProfilesParams) SetResolveNotification(resolveNotification *bool) { + o.ResolveNotification = resolveNotification +} + +// WithUID adds the uid to the v1 spectro clusters update profiles params +func (o *V1SpectroClustersUpdateProfilesParams) WithUID(uid string) *V1SpectroClustersUpdateProfilesParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 spectro clusters update profiles params +func (o *V1SpectroClustersUpdateProfilesParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1SpectroClustersUpdateProfilesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + if o.ResolveNotification != nil { + + // query param resolveNotification + var qrResolveNotification bool + if o.ResolveNotification != nil { + qrResolveNotification = *o.ResolveNotification + } + qResolveNotification := swag.FormatBool(qrResolveNotification) + if qResolveNotification != "" { + if err := r.SetQueryParam("resolveNotification", qResolveNotification); err != nil { + return err + } + } + + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_update_profiles_responses.go b/api/client/v1/v1_spectro_clusters_update_profiles_responses.go new file mode 100644 index 00000000..c8b0664e --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_update_profiles_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1SpectroClustersUpdateProfilesReader is a Reader for the V1SpectroClustersUpdateProfiles structure. +type V1SpectroClustersUpdateProfilesReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1SpectroClustersUpdateProfilesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1SpectroClustersUpdateProfilesNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1SpectroClustersUpdateProfilesNoContent creates a V1SpectroClustersUpdateProfilesNoContent with default headers values +func NewV1SpectroClustersUpdateProfilesNoContent() *V1SpectroClustersUpdateProfilesNoContent { + return &V1SpectroClustersUpdateProfilesNoContent{} +} + +/* +V1SpectroClustersUpdateProfilesNoContent handles this case with default header values. + +The resource was updated successfully +*/ +type V1SpectroClustersUpdateProfilesNoContent struct { +} + +func (o *V1SpectroClustersUpdateProfilesNoContent) Error() string { + return fmt.Sprintf("[PUT /v1/spectroclusters/{uid}/profiles][%d] v1SpectroClustersUpdateProfilesNoContent ", 204) +} + +func (o *V1SpectroClustersUpdateProfilesNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_update_status_condition_parameters.go b/api/client/v1/v1_spectro_clusters_update_status_condition_parameters.go new file mode 100644 index 00000000..77a573ed --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_update_status_condition_parameters.go @@ -0,0 +1,154 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1SpectroClustersUpdateStatusConditionParams creates a new V1SpectroClustersUpdateStatusConditionParams object +// with the default values initialized. +func NewV1SpectroClustersUpdateStatusConditionParams() *V1SpectroClustersUpdateStatusConditionParams { + var () + return &V1SpectroClustersUpdateStatusConditionParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1SpectroClustersUpdateStatusConditionParamsWithTimeout creates a new V1SpectroClustersUpdateStatusConditionParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1SpectroClustersUpdateStatusConditionParamsWithTimeout(timeout time.Duration) *V1SpectroClustersUpdateStatusConditionParams { + var () + return &V1SpectroClustersUpdateStatusConditionParams{ + + timeout: timeout, + } +} + +// NewV1SpectroClustersUpdateStatusConditionParamsWithContext creates a new V1SpectroClustersUpdateStatusConditionParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1SpectroClustersUpdateStatusConditionParamsWithContext(ctx context.Context) *V1SpectroClustersUpdateStatusConditionParams { + var () + return &V1SpectroClustersUpdateStatusConditionParams{ + + Context: ctx, + } +} + +// NewV1SpectroClustersUpdateStatusConditionParamsWithHTTPClient creates a new V1SpectroClustersUpdateStatusConditionParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1SpectroClustersUpdateStatusConditionParamsWithHTTPClient(client *http.Client) *V1SpectroClustersUpdateStatusConditionParams { + var () + return &V1SpectroClustersUpdateStatusConditionParams{ + HTTPClient: client, + } +} + +/* +V1SpectroClustersUpdateStatusConditionParams contains all the parameters to send to the API endpoint +for the v1 spectro clusters update status condition operation typically these are written to a http.Request +*/ +type V1SpectroClustersUpdateStatusConditionParams struct { + + /*Body*/ + Body *models.V1ClusterCondition + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 spectro clusters update status condition params +func (o *V1SpectroClustersUpdateStatusConditionParams) WithTimeout(timeout time.Duration) *V1SpectroClustersUpdateStatusConditionParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 spectro clusters update status condition params +func (o *V1SpectroClustersUpdateStatusConditionParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 spectro clusters update status condition params +func (o *V1SpectroClustersUpdateStatusConditionParams) WithContext(ctx context.Context) *V1SpectroClustersUpdateStatusConditionParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 spectro clusters update status condition params +func (o *V1SpectroClustersUpdateStatusConditionParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 spectro clusters update status condition params +func (o *V1SpectroClustersUpdateStatusConditionParams) WithHTTPClient(client *http.Client) *V1SpectroClustersUpdateStatusConditionParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 spectro clusters update status condition params +func (o *V1SpectroClustersUpdateStatusConditionParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 spectro clusters update status condition params +func (o *V1SpectroClustersUpdateStatusConditionParams) WithBody(body *models.V1ClusterCondition) *V1SpectroClustersUpdateStatusConditionParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 spectro clusters update status condition params +func (o *V1SpectroClustersUpdateStatusConditionParams) SetBody(body *models.V1ClusterCondition) { + o.Body = body +} + +// WithUID adds the uid to the v1 spectro clusters update status condition params +func (o *V1SpectroClustersUpdateStatusConditionParams) WithUID(uid string) *V1SpectroClustersUpdateStatusConditionParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 spectro clusters update status condition params +func (o *V1SpectroClustersUpdateStatusConditionParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1SpectroClustersUpdateStatusConditionParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_update_status_condition_responses.go b/api/client/v1/v1_spectro_clusters_update_status_condition_responses.go new file mode 100644 index 00000000..114201de --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_update_status_condition_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1SpectroClustersUpdateStatusConditionReader is a Reader for the V1SpectroClustersUpdateStatusCondition structure. +type V1SpectroClustersUpdateStatusConditionReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1SpectroClustersUpdateStatusConditionReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1SpectroClustersUpdateStatusConditionNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1SpectroClustersUpdateStatusConditionNoContent creates a V1SpectroClustersUpdateStatusConditionNoContent with default headers values +func NewV1SpectroClustersUpdateStatusConditionNoContent() *V1SpectroClustersUpdateStatusConditionNoContent { + return &V1SpectroClustersUpdateStatusConditionNoContent{} +} + +/* +V1SpectroClustersUpdateStatusConditionNoContent handles this case with default header values. + +The resource was updated successfully +*/ +type V1SpectroClustersUpdateStatusConditionNoContent struct { +} + +func (o *V1SpectroClustersUpdateStatusConditionNoContent) Error() string { + return fmt.Sprintf("[PUT /v1/spectroclusters/{uid}/status/condition][%d] v1SpectroClustersUpdateStatusConditionNoContent ", 204) +} + +func (o *V1SpectroClustersUpdateStatusConditionNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_update_status_conditions_parameters.go b/api/client/v1/v1_spectro_clusters_update_status_conditions_parameters.go new file mode 100644 index 00000000..c212e5d6 --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_update_status_conditions_parameters.go @@ -0,0 +1,154 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1SpectroClustersUpdateStatusConditionsParams creates a new V1SpectroClustersUpdateStatusConditionsParams object +// with the default values initialized. +func NewV1SpectroClustersUpdateStatusConditionsParams() *V1SpectroClustersUpdateStatusConditionsParams { + var () + return &V1SpectroClustersUpdateStatusConditionsParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1SpectroClustersUpdateStatusConditionsParamsWithTimeout creates a new V1SpectroClustersUpdateStatusConditionsParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1SpectroClustersUpdateStatusConditionsParamsWithTimeout(timeout time.Duration) *V1SpectroClustersUpdateStatusConditionsParams { + var () + return &V1SpectroClustersUpdateStatusConditionsParams{ + + timeout: timeout, + } +} + +// NewV1SpectroClustersUpdateStatusConditionsParamsWithContext creates a new V1SpectroClustersUpdateStatusConditionsParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1SpectroClustersUpdateStatusConditionsParamsWithContext(ctx context.Context) *V1SpectroClustersUpdateStatusConditionsParams { + var () + return &V1SpectroClustersUpdateStatusConditionsParams{ + + Context: ctx, + } +} + +// NewV1SpectroClustersUpdateStatusConditionsParamsWithHTTPClient creates a new V1SpectroClustersUpdateStatusConditionsParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1SpectroClustersUpdateStatusConditionsParamsWithHTTPClient(client *http.Client) *V1SpectroClustersUpdateStatusConditionsParams { + var () + return &V1SpectroClustersUpdateStatusConditionsParams{ + HTTPClient: client, + } +} + +/* +V1SpectroClustersUpdateStatusConditionsParams contains all the parameters to send to the API endpoint +for the v1 spectro clusters update status conditions operation typically these are written to a http.Request +*/ +type V1SpectroClustersUpdateStatusConditionsParams struct { + + /*Body*/ + Body []*models.V1ClusterCondition + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 spectro clusters update status conditions params +func (o *V1SpectroClustersUpdateStatusConditionsParams) WithTimeout(timeout time.Duration) *V1SpectroClustersUpdateStatusConditionsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 spectro clusters update status conditions params +func (o *V1SpectroClustersUpdateStatusConditionsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 spectro clusters update status conditions params +func (o *V1SpectroClustersUpdateStatusConditionsParams) WithContext(ctx context.Context) *V1SpectroClustersUpdateStatusConditionsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 spectro clusters update status conditions params +func (o *V1SpectroClustersUpdateStatusConditionsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 spectro clusters update status conditions params +func (o *V1SpectroClustersUpdateStatusConditionsParams) WithHTTPClient(client *http.Client) *V1SpectroClustersUpdateStatusConditionsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 spectro clusters update status conditions params +func (o *V1SpectroClustersUpdateStatusConditionsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 spectro clusters update status conditions params +func (o *V1SpectroClustersUpdateStatusConditionsParams) WithBody(body []*models.V1ClusterCondition) *V1SpectroClustersUpdateStatusConditionsParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 spectro clusters update status conditions params +func (o *V1SpectroClustersUpdateStatusConditionsParams) SetBody(body []*models.V1ClusterCondition) { + o.Body = body +} + +// WithUID adds the uid to the v1 spectro clusters update status conditions params +func (o *V1SpectroClustersUpdateStatusConditionsParams) WithUID(uid string) *V1SpectroClustersUpdateStatusConditionsParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 spectro clusters update status conditions params +func (o *V1SpectroClustersUpdateStatusConditionsParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1SpectroClustersUpdateStatusConditionsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_update_status_conditions_responses.go b/api/client/v1/v1_spectro_clusters_update_status_conditions_responses.go new file mode 100644 index 00000000..9bdd1c81 --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_update_status_conditions_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1SpectroClustersUpdateStatusConditionsReader is a Reader for the V1SpectroClustersUpdateStatusConditions structure. +type V1SpectroClustersUpdateStatusConditionsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1SpectroClustersUpdateStatusConditionsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1SpectroClustersUpdateStatusConditionsNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1SpectroClustersUpdateStatusConditionsNoContent creates a V1SpectroClustersUpdateStatusConditionsNoContent with default headers values +func NewV1SpectroClustersUpdateStatusConditionsNoContent() *V1SpectroClustersUpdateStatusConditionsNoContent { + return &V1SpectroClustersUpdateStatusConditionsNoContent{} +} + +/* +V1SpectroClustersUpdateStatusConditionsNoContent handles this case with default header values. + +The resource was updated successfully +*/ +type V1SpectroClustersUpdateStatusConditionsNoContent struct { +} + +func (o *V1SpectroClustersUpdateStatusConditionsNoContent) Error() string { + return fmt.Sprintf("[PATCH /v1/spectroclusters/{uid}/status/conditions][%d] v1SpectroClustersUpdateStatusConditionsNoContent ", 204) +} + +func (o *V1SpectroClustersUpdateStatusConditionsNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_update_status_endpoints_parameters.go b/api/client/v1/v1_spectro_clusters_update_status_endpoints_parameters.go new file mode 100644 index 00000000..49f7e3e8 --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_update_status_endpoints_parameters.go @@ -0,0 +1,154 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1SpectroClustersUpdateStatusEndpointsParams creates a new V1SpectroClustersUpdateStatusEndpointsParams object +// with the default values initialized. +func NewV1SpectroClustersUpdateStatusEndpointsParams() *V1SpectroClustersUpdateStatusEndpointsParams { + var () + return &V1SpectroClustersUpdateStatusEndpointsParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1SpectroClustersUpdateStatusEndpointsParamsWithTimeout creates a new V1SpectroClustersUpdateStatusEndpointsParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1SpectroClustersUpdateStatusEndpointsParamsWithTimeout(timeout time.Duration) *V1SpectroClustersUpdateStatusEndpointsParams { + var () + return &V1SpectroClustersUpdateStatusEndpointsParams{ + + timeout: timeout, + } +} + +// NewV1SpectroClustersUpdateStatusEndpointsParamsWithContext creates a new V1SpectroClustersUpdateStatusEndpointsParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1SpectroClustersUpdateStatusEndpointsParamsWithContext(ctx context.Context) *V1SpectroClustersUpdateStatusEndpointsParams { + var () + return &V1SpectroClustersUpdateStatusEndpointsParams{ + + Context: ctx, + } +} + +// NewV1SpectroClustersUpdateStatusEndpointsParamsWithHTTPClient creates a new V1SpectroClustersUpdateStatusEndpointsParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1SpectroClustersUpdateStatusEndpointsParamsWithHTTPClient(client *http.Client) *V1SpectroClustersUpdateStatusEndpointsParams { + var () + return &V1SpectroClustersUpdateStatusEndpointsParams{ + HTTPClient: client, + } +} + +/* +V1SpectroClustersUpdateStatusEndpointsParams contains all the parameters to send to the API endpoint +for the v1 spectro clusters update status endpoints operation typically these are written to a http.Request +*/ +type V1SpectroClustersUpdateStatusEndpointsParams struct { + + /*Body*/ + Body []*models.V1APIEndpoint + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 spectro clusters update status endpoints params +func (o *V1SpectroClustersUpdateStatusEndpointsParams) WithTimeout(timeout time.Duration) *V1SpectroClustersUpdateStatusEndpointsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 spectro clusters update status endpoints params +func (o *V1SpectroClustersUpdateStatusEndpointsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 spectro clusters update status endpoints params +func (o *V1SpectroClustersUpdateStatusEndpointsParams) WithContext(ctx context.Context) *V1SpectroClustersUpdateStatusEndpointsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 spectro clusters update status endpoints params +func (o *V1SpectroClustersUpdateStatusEndpointsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 spectro clusters update status endpoints params +func (o *V1SpectroClustersUpdateStatusEndpointsParams) WithHTTPClient(client *http.Client) *V1SpectroClustersUpdateStatusEndpointsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 spectro clusters update status endpoints params +func (o *V1SpectroClustersUpdateStatusEndpointsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 spectro clusters update status endpoints params +func (o *V1SpectroClustersUpdateStatusEndpointsParams) WithBody(body []*models.V1APIEndpoint) *V1SpectroClustersUpdateStatusEndpointsParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 spectro clusters update status endpoints params +func (o *V1SpectroClustersUpdateStatusEndpointsParams) SetBody(body []*models.V1APIEndpoint) { + o.Body = body +} + +// WithUID adds the uid to the v1 spectro clusters update status endpoints params +func (o *V1SpectroClustersUpdateStatusEndpointsParams) WithUID(uid string) *V1SpectroClustersUpdateStatusEndpointsParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 spectro clusters update status endpoints params +func (o *V1SpectroClustersUpdateStatusEndpointsParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1SpectroClustersUpdateStatusEndpointsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_update_status_endpoints_responses.go b/api/client/v1/v1_spectro_clusters_update_status_endpoints_responses.go new file mode 100644 index 00000000..ddab801d --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_update_status_endpoints_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1SpectroClustersUpdateStatusEndpointsReader is a Reader for the V1SpectroClustersUpdateStatusEndpoints structure. +type V1SpectroClustersUpdateStatusEndpointsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1SpectroClustersUpdateStatusEndpointsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1SpectroClustersUpdateStatusEndpointsNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1SpectroClustersUpdateStatusEndpointsNoContent creates a V1SpectroClustersUpdateStatusEndpointsNoContent with default headers values +func NewV1SpectroClustersUpdateStatusEndpointsNoContent() *V1SpectroClustersUpdateStatusEndpointsNoContent { + return &V1SpectroClustersUpdateStatusEndpointsNoContent{} +} + +/* +V1SpectroClustersUpdateStatusEndpointsNoContent handles this case with default header values. + +The resource was updated successfully +*/ +type V1SpectroClustersUpdateStatusEndpointsNoContent struct { +} + +func (o *V1SpectroClustersUpdateStatusEndpointsNoContent) Error() string { + return fmt.Sprintf("[PUT /v1/spectroclusters/{uid}/status/endpoints][%d] v1SpectroClustersUpdateStatusEndpointsNoContent ", 204) +} + +func (o *V1SpectroClustersUpdateStatusEndpointsNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_update_status_imported_parameters.go b/api/client/v1/v1_spectro_clusters_update_status_imported_parameters.go new file mode 100644 index 00000000..1e2b119c --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_update_status_imported_parameters.go @@ -0,0 +1,133 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1SpectroClustersUpdateStatusImportedParams creates a new V1SpectroClustersUpdateStatusImportedParams object +// with the default values initialized. +func NewV1SpectroClustersUpdateStatusImportedParams() *V1SpectroClustersUpdateStatusImportedParams { + var () + return &V1SpectroClustersUpdateStatusImportedParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1SpectroClustersUpdateStatusImportedParamsWithTimeout creates a new V1SpectroClustersUpdateStatusImportedParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1SpectroClustersUpdateStatusImportedParamsWithTimeout(timeout time.Duration) *V1SpectroClustersUpdateStatusImportedParams { + var () + return &V1SpectroClustersUpdateStatusImportedParams{ + + timeout: timeout, + } +} + +// NewV1SpectroClustersUpdateStatusImportedParamsWithContext creates a new V1SpectroClustersUpdateStatusImportedParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1SpectroClustersUpdateStatusImportedParamsWithContext(ctx context.Context) *V1SpectroClustersUpdateStatusImportedParams { + var () + return &V1SpectroClustersUpdateStatusImportedParams{ + + Context: ctx, + } +} + +// NewV1SpectroClustersUpdateStatusImportedParamsWithHTTPClient creates a new V1SpectroClustersUpdateStatusImportedParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1SpectroClustersUpdateStatusImportedParamsWithHTTPClient(client *http.Client) *V1SpectroClustersUpdateStatusImportedParams { + var () + return &V1SpectroClustersUpdateStatusImportedParams{ + HTTPClient: client, + } +} + +/* +V1SpectroClustersUpdateStatusImportedParams contains all the parameters to send to the API endpoint +for the v1 spectro clusters update status imported operation typically these are written to a http.Request +*/ +type V1SpectroClustersUpdateStatusImportedParams struct { + + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 spectro clusters update status imported params +func (o *V1SpectroClustersUpdateStatusImportedParams) WithTimeout(timeout time.Duration) *V1SpectroClustersUpdateStatusImportedParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 spectro clusters update status imported params +func (o *V1SpectroClustersUpdateStatusImportedParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 spectro clusters update status imported params +func (o *V1SpectroClustersUpdateStatusImportedParams) WithContext(ctx context.Context) *V1SpectroClustersUpdateStatusImportedParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 spectro clusters update status imported params +func (o *V1SpectroClustersUpdateStatusImportedParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 spectro clusters update status imported params +func (o *V1SpectroClustersUpdateStatusImportedParams) WithHTTPClient(client *http.Client) *V1SpectroClustersUpdateStatusImportedParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 spectro clusters update status imported params +func (o *V1SpectroClustersUpdateStatusImportedParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithUID adds the uid to the v1 spectro clusters update status imported params +func (o *V1SpectroClustersUpdateStatusImportedParams) WithUID(uid string) *V1SpectroClustersUpdateStatusImportedParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 spectro clusters update status imported params +func (o *V1SpectroClustersUpdateStatusImportedParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1SpectroClustersUpdateStatusImportedParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_update_status_imported_responses.go b/api/client/v1/v1_spectro_clusters_update_status_imported_responses.go new file mode 100644 index 00000000..76b08c70 --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_update_status_imported_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1SpectroClustersUpdateStatusImportedReader is a Reader for the V1SpectroClustersUpdateStatusImported structure. +type V1SpectroClustersUpdateStatusImportedReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1SpectroClustersUpdateStatusImportedReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1SpectroClustersUpdateStatusImportedNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1SpectroClustersUpdateStatusImportedNoContent creates a V1SpectroClustersUpdateStatusImportedNoContent with default headers values +func NewV1SpectroClustersUpdateStatusImportedNoContent() *V1SpectroClustersUpdateStatusImportedNoContent { + return &V1SpectroClustersUpdateStatusImportedNoContent{} +} + +/* +V1SpectroClustersUpdateStatusImportedNoContent handles this case with default header values. + +The resource was updated successfully +*/ +type V1SpectroClustersUpdateStatusImportedNoContent struct { +} + +func (o *V1SpectroClustersUpdateStatusImportedNoContent) Error() string { + return fmt.Sprintf("[PATCH /v1/spectroclusters/{uid}/status/imported][%d] v1SpectroClustersUpdateStatusImportedNoContent ", 204) +} + +func (o *V1SpectroClustersUpdateStatusImportedNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_update_status_services_parameters.go b/api/client/v1/v1_spectro_clusters_update_status_services_parameters.go new file mode 100644 index 00000000..032013c8 --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_update_status_services_parameters.go @@ -0,0 +1,154 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1SpectroClustersUpdateStatusServicesParams creates a new V1SpectroClustersUpdateStatusServicesParams object +// with the default values initialized. +func NewV1SpectroClustersUpdateStatusServicesParams() *V1SpectroClustersUpdateStatusServicesParams { + var () + return &V1SpectroClustersUpdateStatusServicesParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1SpectroClustersUpdateStatusServicesParamsWithTimeout creates a new V1SpectroClustersUpdateStatusServicesParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1SpectroClustersUpdateStatusServicesParamsWithTimeout(timeout time.Duration) *V1SpectroClustersUpdateStatusServicesParams { + var () + return &V1SpectroClustersUpdateStatusServicesParams{ + + timeout: timeout, + } +} + +// NewV1SpectroClustersUpdateStatusServicesParamsWithContext creates a new V1SpectroClustersUpdateStatusServicesParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1SpectroClustersUpdateStatusServicesParamsWithContext(ctx context.Context) *V1SpectroClustersUpdateStatusServicesParams { + var () + return &V1SpectroClustersUpdateStatusServicesParams{ + + Context: ctx, + } +} + +// NewV1SpectroClustersUpdateStatusServicesParamsWithHTTPClient creates a new V1SpectroClustersUpdateStatusServicesParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1SpectroClustersUpdateStatusServicesParamsWithHTTPClient(client *http.Client) *V1SpectroClustersUpdateStatusServicesParams { + var () + return &V1SpectroClustersUpdateStatusServicesParams{ + HTTPClient: client, + } +} + +/* +V1SpectroClustersUpdateStatusServicesParams contains all the parameters to send to the API endpoint +for the v1 spectro clusters update status services operation typically these are written to a http.Request +*/ +type V1SpectroClustersUpdateStatusServicesParams struct { + + /*Body*/ + Body []*models.V1LoadBalancerService + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 spectro clusters update status services params +func (o *V1SpectroClustersUpdateStatusServicesParams) WithTimeout(timeout time.Duration) *V1SpectroClustersUpdateStatusServicesParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 spectro clusters update status services params +func (o *V1SpectroClustersUpdateStatusServicesParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 spectro clusters update status services params +func (o *V1SpectroClustersUpdateStatusServicesParams) WithContext(ctx context.Context) *V1SpectroClustersUpdateStatusServicesParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 spectro clusters update status services params +func (o *V1SpectroClustersUpdateStatusServicesParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 spectro clusters update status services params +func (o *V1SpectroClustersUpdateStatusServicesParams) WithHTTPClient(client *http.Client) *V1SpectroClustersUpdateStatusServicesParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 spectro clusters update status services params +func (o *V1SpectroClustersUpdateStatusServicesParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 spectro clusters update status services params +func (o *V1SpectroClustersUpdateStatusServicesParams) WithBody(body []*models.V1LoadBalancerService) *V1SpectroClustersUpdateStatusServicesParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 spectro clusters update status services params +func (o *V1SpectroClustersUpdateStatusServicesParams) SetBody(body []*models.V1LoadBalancerService) { + o.Body = body +} + +// WithUID adds the uid to the v1 spectro clusters update status services params +func (o *V1SpectroClustersUpdateStatusServicesParams) WithUID(uid string) *V1SpectroClustersUpdateStatusServicesParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 spectro clusters update status services params +func (o *V1SpectroClustersUpdateStatusServicesParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1SpectroClustersUpdateStatusServicesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_update_status_services_responses.go b/api/client/v1/v1_spectro_clusters_update_status_services_responses.go new file mode 100644 index 00000000..dd2b8712 --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_update_status_services_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1SpectroClustersUpdateStatusServicesReader is a Reader for the V1SpectroClustersUpdateStatusServices structure. +type V1SpectroClustersUpdateStatusServicesReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1SpectroClustersUpdateStatusServicesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1SpectroClustersUpdateStatusServicesNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1SpectroClustersUpdateStatusServicesNoContent creates a V1SpectroClustersUpdateStatusServicesNoContent with default headers values +func NewV1SpectroClustersUpdateStatusServicesNoContent() *V1SpectroClustersUpdateStatusServicesNoContent { + return &V1SpectroClustersUpdateStatusServicesNoContent{} +} + +/* +V1SpectroClustersUpdateStatusServicesNoContent handles this case with default header values. + +The resource was updated successfully +*/ +type V1SpectroClustersUpdateStatusServicesNoContent struct { +} + +func (o *V1SpectroClustersUpdateStatusServicesNoContent) Error() string { + return fmt.Sprintf("[PUT /v1/spectroclusters/{uid}/status/services][%d] v1SpectroClustersUpdateStatusServicesNoContent ", 204) +} + +func (o *V1SpectroClustersUpdateStatusServicesNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_upgrade_settings_get_parameters.go b/api/client/v1/v1_spectro_clusters_upgrade_settings_get_parameters.go new file mode 100644 index 00000000..dadc6288 --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_upgrade_settings_get_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1SpectroClustersUpgradeSettingsGetParams creates a new V1SpectroClustersUpgradeSettingsGetParams object +// with the default values initialized. +func NewV1SpectroClustersUpgradeSettingsGetParams() *V1SpectroClustersUpgradeSettingsGetParams { + + return &V1SpectroClustersUpgradeSettingsGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1SpectroClustersUpgradeSettingsGetParamsWithTimeout creates a new V1SpectroClustersUpgradeSettingsGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1SpectroClustersUpgradeSettingsGetParamsWithTimeout(timeout time.Duration) *V1SpectroClustersUpgradeSettingsGetParams { + + return &V1SpectroClustersUpgradeSettingsGetParams{ + + timeout: timeout, + } +} + +// NewV1SpectroClustersUpgradeSettingsGetParamsWithContext creates a new V1SpectroClustersUpgradeSettingsGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1SpectroClustersUpgradeSettingsGetParamsWithContext(ctx context.Context) *V1SpectroClustersUpgradeSettingsGetParams { + + return &V1SpectroClustersUpgradeSettingsGetParams{ + + Context: ctx, + } +} + +// NewV1SpectroClustersUpgradeSettingsGetParamsWithHTTPClient creates a new V1SpectroClustersUpgradeSettingsGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1SpectroClustersUpgradeSettingsGetParamsWithHTTPClient(client *http.Client) *V1SpectroClustersUpgradeSettingsGetParams { + + return &V1SpectroClustersUpgradeSettingsGetParams{ + HTTPClient: client, + } +} + +/* +V1SpectroClustersUpgradeSettingsGetParams contains all the parameters to send to the API endpoint +for the v1 spectro clusters upgrade settings get operation typically these are written to a http.Request +*/ +type V1SpectroClustersUpgradeSettingsGetParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 spectro clusters upgrade settings get params +func (o *V1SpectroClustersUpgradeSettingsGetParams) WithTimeout(timeout time.Duration) *V1SpectroClustersUpgradeSettingsGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 spectro clusters upgrade settings get params +func (o *V1SpectroClustersUpgradeSettingsGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 spectro clusters upgrade settings get params +func (o *V1SpectroClustersUpgradeSettingsGetParams) WithContext(ctx context.Context) *V1SpectroClustersUpgradeSettingsGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 spectro clusters upgrade settings get params +func (o *V1SpectroClustersUpgradeSettingsGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 spectro clusters upgrade settings get params +func (o *V1SpectroClustersUpgradeSettingsGetParams) WithHTTPClient(client *http.Client) *V1SpectroClustersUpgradeSettingsGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 spectro clusters upgrade settings get params +func (o *V1SpectroClustersUpgradeSettingsGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *V1SpectroClustersUpgradeSettingsGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_upgrade_settings_get_responses.go b/api/client/v1/v1_spectro_clusters_upgrade_settings_get_responses.go new file mode 100644 index 00000000..73636fde --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_upgrade_settings_get_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1SpectroClustersUpgradeSettingsGetReader is a Reader for the V1SpectroClustersUpgradeSettingsGet structure. +type V1SpectroClustersUpgradeSettingsGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1SpectroClustersUpgradeSettingsGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1SpectroClustersUpgradeSettingsGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1SpectroClustersUpgradeSettingsGetOK creates a V1SpectroClustersUpgradeSettingsGetOK with default headers values +func NewV1SpectroClustersUpgradeSettingsGetOK() *V1SpectroClustersUpgradeSettingsGetOK { + return &V1SpectroClustersUpgradeSettingsGetOK{} +} + +/* +V1SpectroClustersUpgradeSettingsGetOK handles this case with default header values. + +(empty) +*/ +type V1SpectroClustersUpgradeSettingsGetOK struct { + Payload *models.V1ClusterUpgradeSettingsEntity +} + +func (o *V1SpectroClustersUpgradeSettingsGetOK) Error() string { + return fmt.Sprintf("[GET /v1/spectroclusters/upgrade/settings][%d] v1SpectroClustersUpgradeSettingsGetOK %+v", 200, o.Payload) +} + +func (o *V1SpectroClustersUpgradeSettingsGetOK) GetPayload() *models.V1ClusterUpgradeSettingsEntity { + return o.Payload +} + +func (o *V1SpectroClustersUpgradeSettingsGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1ClusterUpgradeSettingsEntity) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_upgrade_settings_parameters.go b/api/client/v1/v1_spectro_clusters_upgrade_settings_parameters.go new file mode 100644 index 00000000..7dc149b5 --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_upgrade_settings_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1SpectroClustersUpgradeSettingsParams creates a new V1SpectroClustersUpgradeSettingsParams object +// with the default values initialized. +func NewV1SpectroClustersUpgradeSettingsParams() *V1SpectroClustersUpgradeSettingsParams { + var () + return &V1SpectroClustersUpgradeSettingsParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1SpectroClustersUpgradeSettingsParamsWithTimeout creates a new V1SpectroClustersUpgradeSettingsParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1SpectroClustersUpgradeSettingsParamsWithTimeout(timeout time.Duration) *V1SpectroClustersUpgradeSettingsParams { + var () + return &V1SpectroClustersUpgradeSettingsParams{ + + timeout: timeout, + } +} + +// NewV1SpectroClustersUpgradeSettingsParamsWithContext creates a new V1SpectroClustersUpgradeSettingsParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1SpectroClustersUpgradeSettingsParamsWithContext(ctx context.Context) *V1SpectroClustersUpgradeSettingsParams { + var () + return &V1SpectroClustersUpgradeSettingsParams{ + + Context: ctx, + } +} + +// NewV1SpectroClustersUpgradeSettingsParamsWithHTTPClient creates a new V1SpectroClustersUpgradeSettingsParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1SpectroClustersUpgradeSettingsParamsWithHTTPClient(client *http.Client) *V1SpectroClustersUpgradeSettingsParams { + var () + return &V1SpectroClustersUpgradeSettingsParams{ + HTTPClient: client, + } +} + +/* +V1SpectroClustersUpgradeSettingsParams contains all the parameters to send to the API endpoint +for the v1 spectro clusters upgrade settings operation typically these are written to a http.Request +*/ +type V1SpectroClustersUpgradeSettingsParams struct { + + /*Body*/ + Body *models.V1ClusterUpgradeSettingsEntity + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 spectro clusters upgrade settings params +func (o *V1SpectroClustersUpgradeSettingsParams) WithTimeout(timeout time.Duration) *V1SpectroClustersUpgradeSettingsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 spectro clusters upgrade settings params +func (o *V1SpectroClustersUpgradeSettingsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 spectro clusters upgrade settings params +func (o *V1SpectroClustersUpgradeSettingsParams) WithContext(ctx context.Context) *V1SpectroClustersUpgradeSettingsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 spectro clusters upgrade settings params +func (o *V1SpectroClustersUpgradeSettingsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 spectro clusters upgrade settings params +func (o *V1SpectroClustersUpgradeSettingsParams) WithHTTPClient(client *http.Client) *V1SpectroClustersUpgradeSettingsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 spectro clusters upgrade settings params +func (o *V1SpectroClustersUpgradeSettingsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 spectro clusters upgrade settings params +func (o *V1SpectroClustersUpgradeSettingsParams) WithBody(body *models.V1ClusterUpgradeSettingsEntity) *V1SpectroClustersUpgradeSettingsParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 spectro clusters upgrade settings params +func (o *V1SpectroClustersUpgradeSettingsParams) SetBody(body *models.V1ClusterUpgradeSettingsEntity) { + o.Body = body +} + +// WriteToRequest writes these params to a swagger request +func (o *V1SpectroClustersUpgradeSettingsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_upgrade_settings_responses.go b/api/client/v1/v1_spectro_clusters_upgrade_settings_responses.go new file mode 100644 index 00000000..57f51f5b --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_upgrade_settings_responses.go @@ -0,0 +1,61 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1SpectroClustersUpgradeSettingsReader is a Reader for the V1SpectroClustersUpgradeSettings structure. +type V1SpectroClustersUpgradeSettingsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1SpectroClustersUpgradeSettingsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1SpectroClustersUpgradeSettingsNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1SpectroClustersUpgradeSettingsNoContent creates a V1SpectroClustersUpgradeSettingsNoContent with default headers values +func NewV1SpectroClustersUpgradeSettingsNoContent() *V1SpectroClustersUpgradeSettingsNoContent { + return &V1SpectroClustersUpgradeSettingsNoContent{} +} + +/* +V1SpectroClustersUpgradeSettingsNoContent handles this case with default header values. + +Ok response without content +*/ +type V1SpectroClustersUpgradeSettingsNoContent struct { + /*Audit uid for the request + */ + AuditUID string +} + +func (o *V1SpectroClustersUpgradeSettingsNoContent) Error() string { + return fmt.Sprintf("[POST /v1/spectroclusters/upgrade/settings][%d] v1SpectroClustersUpgradeSettingsNoContent ", 204) +} + +func (o *V1SpectroClustersUpgradeSettingsNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header AuditUid + o.AuditUID = response.GetHeader("AuditUid") + + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_validate_name_parameters.go b/api/client/v1/v1_spectro_clusters_validate_name_parameters.go new file mode 100644 index 00000000..2f739faa --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_validate_name_parameters.go @@ -0,0 +1,147 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1SpectroClustersValidateNameParams creates a new V1SpectroClustersValidateNameParams object +// with the default values initialized. +func NewV1SpectroClustersValidateNameParams() *V1SpectroClustersValidateNameParams { + var () + return &V1SpectroClustersValidateNameParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1SpectroClustersValidateNameParamsWithTimeout creates a new V1SpectroClustersValidateNameParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1SpectroClustersValidateNameParamsWithTimeout(timeout time.Duration) *V1SpectroClustersValidateNameParams { + var () + return &V1SpectroClustersValidateNameParams{ + + timeout: timeout, + } +} + +// NewV1SpectroClustersValidateNameParamsWithContext creates a new V1SpectroClustersValidateNameParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1SpectroClustersValidateNameParamsWithContext(ctx context.Context) *V1SpectroClustersValidateNameParams { + var () + return &V1SpectroClustersValidateNameParams{ + + Context: ctx, + } +} + +// NewV1SpectroClustersValidateNameParamsWithHTTPClient creates a new V1SpectroClustersValidateNameParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1SpectroClustersValidateNameParamsWithHTTPClient(client *http.Client) *V1SpectroClustersValidateNameParams { + var () + return &V1SpectroClustersValidateNameParams{ + HTTPClient: client, + } +} + +/* +V1SpectroClustersValidateNameParams contains all the parameters to send to the API endpoint +for the v1 spectro clusters validate name operation typically these are written to a http.Request +*/ +type V1SpectroClustersValidateNameParams struct { + + /*Name + Cluster name + + */ + Name *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 spectro clusters validate name params +func (o *V1SpectroClustersValidateNameParams) WithTimeout(timeout time.Duration) *V1SpectroClustersValidateNameParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 spectro clusters validate name params +func (o *V1SpectroClustersValidateNameParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 spectro clusters validate name params +func (o *V1SpectroClustersValidateNameParams) WithContext(ctx context.Context) *V1SpectroClustersValidateNameParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 spectro clusters validate name params +func (o *V1SpectroClustersValidateNameParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 spectro clusters validate name params +func (o *V1SpectroClustersValidateNameParams) WithHTTPClient(client *http.Client) *V1SpectroClustersValidateNameParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 spectro clusters validate name params +func (o *V1SpectroClustersValidateNameParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithName adds the name to the v1 spectro clusters validate name params +func (o *V1SpectroClustersValidateNameParams) WithName(name *string) *V1SpectroClustersValidateNameParams { + o.SetName(name) + return o +} + +// SetName adds the name to the v1 spectro clusters validate name params +func (o *V1SpectroClustersValidateNameParams) SetName(name *string) { + o.Name = name +} + +// WriteToRequest writes these params to a swagger request +func (o *V1SpectroClustersValidateNameParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Name != nil { + + // query param name + var qrName string + if o.Name != nil { + qrName = *o.Name + } + qName := qrName + if qName != "" { + if err := r.SetQueryParam("name", qName); err != nil { + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_validate_name_responses.go b/api/client/v1/v1_spectro_clusters_validate_name_responses.go new file mode 100644 index 00000000..467f5efa --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_validate_name_responses.go @@ -0,0 +1,61 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1SpectroClustersValidateNameReader is a Reader for the V1SpectroClustersValidateName structure. +type V1SpectroClustersValidateNameReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1SpectroClustersValidateNameReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1SpectroClustersValidateNameNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1SpectroClustersValidateNameNoContent creates a V1SpectroClustersValidateNameNoContent with default headers values +func NewV1SpectroClustersValidateNameNoContent() *V1SpectroClustersValidateNameNoContent { + return &V1SpectroClustersValidateNameNoContent{} +} + +/* +V1SpectroClustersValidateNameNoContent handles this case with default header values. + +Ok response without content +*/ +type V1SpectroClustersValidateNameNoContent struct { + /*Audit uid for the request + */ + AuditUID string +} + +func (o *V1SpectroClustersValidateNameNoContent) Error() string { + return fmt.Sprintf("[GET /v1/spectroclusters/validate/name][%d] v1SpectroClustersValidateNameNoContent ", 204) +} + +func (o *V1SpectroClustersValidateNameNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header AuditUid + o.AuditUID = response.GetHeader("AuditUid") + + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_validate_packs_parameters.go b/api/client/v1/v1_spectro_clusters_validate_packs_parameters.go new file mode 100644 index 00000000..a98b17c2 --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_validate_packs_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1SpectroClustersValidatePacksParams creates a new V1SpectroClustersValidatePacksParams object +// with the default values initialized. +func NewV1SpectroClustersValidatePacksParams() *V1SpectroClustersValidatePacksParams { + var () + return &V1SpectroClustersValidatePacksParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1SpectroClustersValidatePacksParamsWithTimeout creates a new V1SpectroClustersValidatePacksParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1SpectroClustersValidatePacksParamsWithTimeout(timeout time.Duration) *V1SpectroClustersValidatePacksParams { + var () + return &V1SpectroClustersValidatePacksParams{ + + timeout: timeout, + } +} + +// NewV1SpectroClustersValidatePacksParamsWithContext creates a new V1SpectroClustersValidatePacksParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1SpectroClustersValidatePacksParamsWithContext(ctx context.Context) *V1SpectroClustersValidatePacksParams { + var () + return &V1SpectroClustersValidatePacksParams{ + + Context: ctx, + } +} + +// NewV1SpectroClustersValidatePacksParamsWithHTTPClient creates a new V1SpectroClustersValidatePacksParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1SpectroClustersValidatePacksParamsWithHTTPClient(client *http.Client) *V1SpectroClustersValidatePacksParams { + var () + return &V1SpectroClustersValidatePacksParams{ + HTTPClient: client, + } +} + +/* +V1SpectroClustersValidatePacksParams contains all the parameters to send to the API endpoint +for the v1 spectro clusters validate packs operation typically these are written to a http.Request +*/ +type V1SpectroClustersValidatePacksParams struct { + + /*Body*/ + Body *models.V1SpectroClusterPacksEntity + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 spectro clusters validate packs params +func (o *V1SpectroClustersValidatePacksParams) WithTimeout(timeout time.Duration) *V1SpectroClustersValidatePacksParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 spectro clusters validate packs params +func (o *V1SpectroClustersValidatePacksParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 spectro clusters validate packs params +func (o *V1SpectroClustersValidatePacksParams) WithContext(ctx context.Context) *V1SpectroClustersValidatePacksParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 spectro clusters validate packs params +func (o *V1SpectroClustersValidatePacksParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 spectro clusters validate packs params +func (o *V1SpectroClustersValidatePacksParams) WithHTTPClient(client *http.Client) *V1SpectroClustersValidatePacksParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 spectro clusters validate packs params +func (o *V1SpectroClustersValidatePacksParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 spectro clusters validate packs params +func (o *V1SpectroClustersValidatePacksParams) WithBody(body *models.V1SpectroClusterPacksEntity) *V1SpectroClustersValidatePacksParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 spectro clusters validate packs params +func (o *V1SpectroClustersValidatePacksParams) SetBody(body *models.V1SpectroClusterPacksEntity) { + o.Body = body +} + +// WriteToRequest writes these params to a swagger request +func (o *V1SpectroClustersValidatePacksParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_validate_packs_responses.go b/api/client/v1/v1_spectro_clusters_validate_packs_responses.go new file mode 100644 index 00000000..a8989c6d --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_validate_packs_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1SpectroClustersValidatePacksReader is a Reader for the V1SpectroClustersValidatePacks structure. +type V1SpectroClustersValidatePacksReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1SpectroClustersValidatePacksReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1SpectroClustersValidatePacksOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1SpectroClustersValidatePacksOK creates a V1SpectroClustersValidatePacksOK with default headers values +func NewV1SpectroClustersValidatePacksOK() *V1SpectroClustersValidatePacksOK { + return &V1SpectroClustersValidatePacksOK{} +} + +/* +V1SpectroClustersValidatePacksOK handles this case with default header values. + +Cluster packs validation response +*/ +type V1SpectroClustersValidatePacksOK struct { + Payload *models.V1SpectroClusterValidatorResponse +} + +func (o *V1SpectroClustersValidatePacksOK) Error() string { + return fmt.Sprintf("[POST /v1/spectroclusters/validate/packs][%d] v1SpectroClustersValidatePacksOK %+v", 200, o.Payload) +} + +func (o *V1SpectroClustersValidatePacksOK) GetPayload() *models.V1SpectroClusterValidatorResponse { + return o.Payload +} + +func (o *V1SpectroClustersValidatePacksOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1SpectroClusterValidatorResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_virtual_create_parameters.go b/api/client/v1/v1_spectro_clusters_virtual_create_parameters.go new file mode 100644 index 00000000..6778b041 --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_virtual_create_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1SpectroClustersVirtualCreateParams creates a new V1SpectroClustersVirtualCreateParams object +// with the default values initialized. +func NewV1SpectroClustersVirtualCreateParams() *V1SpectroClustersVirtualCreateParams { + var () + return &V1SpectroClustersVirtualCreateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1SpectroClustersVirtualCreateParamsWithTimeout creates a new V1SpectroClustersVirtualCreateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1SpectroClustersVirtualCreateParamsWithTimeout(timeout time.Duration) *V1SpectroClustersVirtualCreateParams { + var () + return &V1SpectroClustersVirtualCreateParams{ + + timeout: timeout, + } +} + +// NewV1SpectroClustersVirtualCreateParamsWithContext creates a new V1SpectroClustersVirtualCreateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1SpectroClustersVirtualCreateParamsWithContext(ctx context.Context) *V1SpectroClustersVirtualCreateParams { + var () + return &V1SpectroClustersVirtualCreateParams{ + + Context: ctx, + } +} + +// NewV1SpectroClustersVirtualCreateParamsWithHTTPClient creates a new V1SpectroClustersVirtualCreateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1SpectroClustersVirtualCreateParamsWithHTTPClient(client *http.Client) *V1SpectroClustersVirtualCreateParams { + var () + return &V1SpectroClustersVirtualCreateParams{ + HTTPClient: client, + } +} + +/* +V1SpectroClustersVirtualCreateParams contains all the parameters to send to the API endpoint +for the v1 spectro clusters virtual create operation typically these are written to a http.Request +*/ +type V1SpectroClustersVirtualCreateParams struct { + + /*Body*/ + Body *models.V1SpectroVirtualClusterEntity + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 spectro clusters virtual create params +func (o *V1SpectroClustersVirtualCreateParams) WithTimeout(timeout time.Duration) *V1SpectroClustersVirtualCreateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 spectro clusters virtual create params +func (o *V1SpectroClustersVirtualCreateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 spectro clusters virtual create params +func (o *V1SpectroClustersVirtualCreateParams) WithContext(ctx context.Context) *V1SpectroClustersVirtualCreateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 spectro clusters virtual create params +func (o *V1SpectroClustersVirtualCreateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 spectro clusters virtual create params +func (o *V1SpectroClustersVirtualCreateParams) WithHTTPClient(client *http.Client) *V1SpectroClustersVirtualCreateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 spectro clusters virtual create params +func (o *V1SpectroClustersVirtualCreateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 spectro clusters virtual create params +func (o *V1SpectroClustersVirtualCreateParams) WithBody(body *models.V1SpectroVirtualClusterEntity) *V1SpectroClustersVirtualCreateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 spectro clusters virtual create params +func (o *V1SpectroClustersVirtualCreateParams) SetBody(body *models.V1SpectroVirtualClusterEntity) { + o.Body = body +} + +// WriteToRequest writes these params to a swagger request +func (o *V1SpectroClustersVirtualCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_virtual_create_responses.go b/api/client/v1/v1_spectro_clusters_virtual_create_responses.go new file mode 100644 index 00000000..1a33e2f9 --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_virtual_create_responses.go @@ -0,0 +1,77 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1SpectroClustersVirtualCreateReader is a Reader for the V1SpectroClustersVirtualCreate structure. +type V1SpectroClustersVirtualCreateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1SpectroClustersVirtualCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 201: + result := NewV1SpectroClustersVirtualCreateCreated() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1SpectroClustersVirtualCreateCreated creates a V1SpectroClustersVirtualCreateCreated with default headers values +func NewV1SpectroClustersVirtualCreateCreated() *V1SpectroClustersVirtualCreateCreated { + return &V1SpectroClustersVirtualCreateCreated{} +} + +/* +V1SpectroClustersVirtualCreateCreated handles this case with default header values. + +Created successfully +*/ +type V1SpectroClustersVirtualCreateCreated struct { + /*Audit uid for the request + */ + AuditUID string + + Payload *models.V1UID +} + +func (o *V1SpectroClustersVirtualCreateCreated) Error() string { + return fmt.Sprintf("[POST /v1/spectroclusters/virtual][%d] v1SpectroClustersVirtualCreateCreated %+v", 201, o.Payload) +} + +func (o *V1SpectroClustersVirtualCreateCreated) GetPayload() *models.V1UID { + return o.Payload +} + +func (o *V1SpectroClustersVirtualCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header AuditUid + o.AuditUID = response.GetHeader("AuditUid") + + o.Payload = new(models.V1UID) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_virtual_validate_parameters.go b/api/client/v1/v1_spectro_clusters_virtual_validate_parameters.go new file mode 100644 index 00000000..d79b7fd3 --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_virtual_validate_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1SpectroClustersVirtualValidateParams creates a new V1SpectroClustersVirtualValidateParams object +// with the default values initialized. +func NewV1SpectroClustersVirtualValidateParams() *V1SpectroClustersVirtualValidateParams { + var () + return &V1SpectroClustersVirtualValidateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1SpectroClustersVirtualValidateParamsWithTimeout creates a new V1SpectroClustersVirtualValidateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1SpectroClustersVirtualValidateParamsWithTimeout(timeout time.Duration) *V1SpectroClustersVirtualValidateParams { + var () + return &V1SpectroClustersVirtualValidateParams{ + + timeout: timeout, + } +} + +// NewV1SpectroClustersVirtualValidateParamsWithContext creates a new V1SpectroClustersVirtualValidateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1SpectroClustersVirtualValidateParamsWithContext(ctx context.Context) *V1SpectroClustersVirtualValidateParams { + var () + return &V1SpectroClustersVirtualValidateParams{ + + Context: ctx, + } +} + +// NewV1SpectroClustersVirtualValidateParamsWithHTTPClient creates a new V1SpectroClustersVirtualValidateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1SpectroClustersVirtualValidateParamsWithHTTPClient(client *http.Client) *V1SpectroClustersVirtualValidateParams { + var () + return &V1SpectroClustersVirtualValidateParams{ + HTTPClient: client, + } +} + +/* +V1SpectroClustersVirtualValidateParams contains all the parameters to send to the API endpoint +for the v1 spectro clusters virtual validate operation typically these are written to a http.Request +*/ +type V1SpectroClustersVirtualValidateParams struct { + + /*Body*/ + Body *models.V1SpectroVirtualClusterEntity + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 spectro clusters virtual validate params +func (o *V1SpectroClustersVirtualValidateParams) WithTimeout(timeout time.Duration) *V1SpectroClustersVirtualValidateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 spectro clusters virtual validate params +func (o *V1SpectroClustersVirtualValidateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 spectro clusters virtual validate params +func (o *V1SpectroClustersVirtualValidateParams) WithContext(ctx context.Context) *V1SpectroClustersVirtualValidateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 spectro clusters virtual validate params +func (o *V1SpectroClustersVirtualValidateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 spectro clusters virtual validate params +func (o *V1SpectroClustersVirtualValidateParams) WithHTTPClient(client *http.Client) *V1SpectroClustersVirtualValidateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 spectro clusters virtual validate params +func (o *V1SpectroClustersVirtualValidateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 spectro clusters virtual validate params +func (o *V1SpectroClustersVirtualValidateParams) WithBody(body *models.V1SpectroVirtualClusterEntity) *V1SpectroClustersVirtualValidateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 spectro clusters virtual validate params +func (o *V1SpectroClustersVirtualValidateParams) SetBody(body *models.V1SpectroVirtualClusterEntity) { + o.Body = body +} + +// WriteToRequest writes these params to a swagger request +func (o *V1SpectroClustersVirtualValidateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_virtual_validate_responses.go b/api/client/v1/v1_spectro_clusters_virtual_validate_responses.go new file mode 100644 index 00000000..a1f9f367 --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_virtual_validate_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1SpectroClustersVirtualValidateReader is a Reader for the V1SpectroClustersVirtualValidate structure. +type V1SpectroClustersVirtualValidateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1SpectroClustersVirtualValidateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1SpectroClustersVirtualValidateOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1SpectroClustersVirtualValidateOK creates a V1SpectroClustersVirtualValidateOK with default headers values +func NewV1SpectroClustersVirtualValidateOK() *V1SpectroClustersVirtualValidateOK { + return &V1SpectroClustersVirtualValidateOK{} +} + +/* +V1SpectroClustersVirtualValidateOK handles this case with default header values. + +Virtual Cluster validation response +*/ +type V1SpectroClustersVirtualValidateOK struct { + Payload *models.V1SpectroClusterValidatorResponse +} + +func (o *V1SpectroClustersVirtualValidateOK) Error() string { + return fmt.Sprintf("[POST /v1/spectroclusters/virtual/validate][%d] v1SpectroClustersVirtualValidateOK %+v", 200, o.Payload) +} + +func (o *V1SpectroClustersVirtualValidateOK) GetPayload() *models.V1SpectroClusterValidatorResponse { + return o.Payload +} + +func (o *V1SpectroClustersVirtualValidateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1SpectroClusterValidatorResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_virtual_values_parameters.go b/api/client/v1/v1_spectro_clusters_virtual_values_parameters.go new file mode 100644 index 00000000..035015a8 --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_virtual_values_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1SpectroClustersVirtualValuesParams creates a new V1SpectroClustersVirtualValuesParams object +// with the default values initialized. +func NewV1SpectroClustersVirtualValuesParams() *V1SpectroClustersVirtualValuesParams { + + return &V1SpectroClustersVirtualValuesParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1SpectroClustersVirtualValuesParamsWithTimeout creates a new V1SpectroClustersVirtualValuesParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1SpectroClustersVirtualValuesParamsWithTimeout(timeout time.Duration) *V1SpectroClustersVirtualValuesParams { + + return &V1SpectroClustersVirtualValuesParams{ + + timeout: timeout, + } +} + +// NewV1SpectroClustersVirtualValuesParamsWithContext creates a new V1SpectroClustersVirtualValuesParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1SpectroClustersVirtualValuesParamsWithContext(ctx context.Context) *V1SpectroClustersVirtualValuesParams { + + return &V1SpectroClustersVirtualValuesParams{ + + Context: ctx, + } +} + +// NewV1SpectroClustersVirtualValuesParamsWithHTTPClient creates a new V1SpectroClustersVirtualValuesParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1SpectroClustersVirtualValuesParamsWithHTTPClient(client *http.Client) *V1SpectroClustersVirtualValuesParams { + + return &V1SpectroClustersVirtualValuesParams{ + HTTPClient: client, + } +} + +/* +V1SpectroClustersVirtualValuesParams contains all the parameters to send to the API endpoint +for the v1 spectro clusters virtual values operation typically these are written to a http.Request +*/ +type V1SpectroClustersVirtualValuesParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 spectro clusters virtual values params +func (o *V1SpectroClustersVirtualValuesParams) WithTimeout(timeout time.Duration) *V1SpectroClustersVirtualValuesParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 spectro clusters virtual values params +func (o *V1SpectroClustersVirtualValuesParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 spectro clusters virtual values params +func (o *V1SpectroClustersVirtualValuesParams) WithContext(ctx context.Context) *V1SpectroClustersVirtualValuesParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 spectro clusters virtual values params +func (o *V1SpectroClustersVirtualValuesParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 spectro clusters virtual values params +func (o *V1SpectroClustersVirtualValuesParams) WithHTTPClient(client *http.Client) *V1SpectroClustersVirtualValuesParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 spectro clusters virtual values params +func (o *V1SpectroClustersVirtualValuesParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *V1SpectroClustersVirtualValuesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_virtual_values_responses.go b/api/client/v1/v1_spectro_clusters_virtual_values_responses.go new file mode 100644 index 00000000..245d1df8 --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_virtual_values_responses.go @@ -0,0 +1,66 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1SpectroClustersVirtualValuesReader is a Reader for the V1SpectroClustersVirtualValues structure. +type V1SpectroClustersVirtualValuesReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1SpectroClustersVirtualValuesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1SpectroClustersVirtualValuesOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1SpectroClustersVirtualValuesOK creates a V1SpectroClustersVirtualValuesOK with default headers values +func NewV1SpectroClustersVirtualValuesOK() *V1SpectroClustersVirtualValuesOK { + return &V1SpectroClustersVirtualValuesOK{} +} + +/* +V1SpectroClustersVirtualValuesOK handles this case with default header values. + +OK +*/ +type V1SpectroClustersVirtualValuesOK struct { + Payload string +} + +func (o *V1SpectroClustersVirtualValuesOK) Error() string { + return fmt.Sprintf("[GET /v1/spectroclusters/virtual/values][%d] v1SpectroClustersVirtualValuesOK %+v", 200, o.Payload) +} + +func (o *V1SpectroClustersVirtualValuesOK) GetPayload() string { + return o.Payload +} + +func (o *V1SpectroClustersVirtualValuesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_vm_add_volume_parameters.go b/api/client/v1/v1_spectro_clusters_vm_add_volume_parameters.go new file mode 100644 index 00000000..7da5c3db --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_vm_add_volume_parameters.go @@ -0,0 +1,203 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1SpectroClustersVMAddVolumeParams creates a new V1SpectroClustersVMAddVolumeParams object +// with the default values initialized. +func NewV1SpectroClustersVMAddVolumeParams() *V1SpectroClustersVMAddVolumeParams { + var () + return &V1SpectroClustersVMAddVolumeParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1SpectroClustersVMAddVolumeParamsWithTimeout creates a new V1SpectroClustersVMAddVolumeParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1SpectroClustersVMAddVolumeParamsWithTimeout(timeout time.Duration) *V1SpectroClustersVMAddVolumeParams { + var () + return &V1SpectroClustersVMAddVolumeParams{ + + timeout: timeout, + } +} + +// NewV1SpectroClustersVMAddVolumeParamsWithContext creates a new V1SpectroClustersVMAddVolumeParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1SpectroClustersVMAddVolumeParamsWithContext(ctx context.Context) *V1SpectroClustersVMAddVolumeParams { + var () + return &V1SpectroClustersVMAddVolumeParams{ + + Context: ctx, + } +} + +// NewV1SpectroClustersVMAddVolumeParamsWithHTTPClient creates a new V1SpectroClustersVMAddVolumeParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1SpectroClustersVMAddVolumeParamsWithHTTPClient(client *http.Client) *V1SpectroClustersVMAddVolumeParams { + var () + return &V1SpectroClustersVMAddVolumeParams{ + HTTPClient: client, + } +} + +/* +V1SpectroClustersVMAddVolumeParams contains all the parameters to send to the API endpoint +for the v1 spectro clusters VM add volume operation typically these are written to a http.Request +*/ +type V1SpectroClustersVMAddVolumeParams struct { + + /*Body*/ + Body *models.V1VMAddVolumeEntity + /*Namespace + Namespace name + + */ + Namespace string + /*UID + Cluster uid + + */ + UID string + /*VMName + Virtual Machine name + + */ + VMName string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 spectro clusters VM add volume params +func (o *V1SpectroClustersVMAddVolumeParams) WithTimeout(timeout time.Duration) *V1SpectroClustersVMAddVolumeParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 spectro clusters VM add volume params +func (o *V1SpectroClustersVMAddVolumeParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 spectro clusters VM add volume params +func (o *V1SpectroClustersVMAddVolumeParams) WithContext(ctx context.Context) *V1SpectroClustersVMAddVolumeParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 spectro clusters VM add volume params +func (o *V1SpectroClustersVMAddVolumeParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 spectro clusters VM add volume params +func (o *V1SpectroClustersVMAddVolumeParams) WithHTTPClient(client *http.Client) *V1SpectroClustersVMAddVolumeParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 spectro clusters VM add volume params +func (o *V1SpectroClustersVMAddVolumeParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 spectro clusters VM add volume params +func (o *V1SpectroClustersVMAddVolumeParams) WithBody(body *models.V1VMAddVolumeEntity) *V1SpectroClustersVMAddVolumeParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 spectro clusters VM add volume params +func (o *V1SpectroClustersVMAddVolumeParams) SetBody(body *models.V1VMAddVolumeEntity) { + o.Body = body +} + +// WithNamespace adds the namespace to the v1 spectro clusters VM add volume params +func (o *V1SpectroClustersVMAddVolumeParams) WithNamespace(namespace string) *V1SpectroClustersVMAddVolumeParams { + o.SetNamespace(namespace) + return o +} + +// SetNamespace adds the namespace to the v1 spectro clusters VM add volume params +func (o *V1SpectroClustersVMAddVolumeParams) SetNamespace(namespace string) { + o.Namespace = namespace +} + +// WithUID adds the uid to the v1 spectro clusters VM add volume params +func (o *V1SpectroClustersVMAddVolumeParams) WithUID(uid string) *V1SpectroClustersVMAddVolumeParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 spectro clusters VM add volume params +func (o *V1SpectroClustersVMAddVolumeParams) SetUID(uid string) { + o.UID = uid +} + +// WithVMName adds the vMName to the v1 spectro clusters VM add volume params +func (o *V1SpectroClustersVMAddVolumeParams) WithVMName(vMName string) *V1SpectroClustersVMAddVolumeParams { + o.SetVMName(vMName) + return o +} + +// SetVMName adds the vmName to the v1 spectro clusters VM add volume params +func (o *V1SpectroClustersVMAddVolumeParams) SetVMName(vMName string) { + o.VMName = vMName +} + +// WriteToRequest writes these params to a swagger request +func (o *V1SpectroClustersVMAddVolumeParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // query param namespace + qrNamespace := o.Namespace + qNamespace := qrNamespace + if qNamespace != "" { + if err := r.SetQueryParam("namespace", qNamespace); err != nil { + return err + } + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + // path param vmName + if err := r.SetPathParam("vmName", o.VMName); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_vm_add_volume_responses.go b/api/client/v1/v1_spectro_clusters_vm_add_volume_responses.go new file mode 100644 index 00000000..c8b641ef --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_vm_add_volume_responses.go @@ -0,0 +1,61 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1SpectroClustersVMAddVolumeReader is a Reader for the V1SpectroClustersVMAddVolume structure. +type V1SpectroClustersVMAddVolumeReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1SpectroClustersVMAddVolumeReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1SpectroClustersVMAddVolumeNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1SpectroClustersVMAddVolumeNoContent creates a V1SpectroClustersVMAddVolumeNoContent with default headers values +func NewV1SpectroClustersVMAddVolumeNoContent() *V1SpectroClustersVMAddVolumeNoContent { + return &V1SpectroClustersVMAddVolumeNoContent{} +} + +/* +V1SpectroClustersVMAddVolumeNoContent handles this case with default header values. + +Ok response without content +*/ +type V1SpectroClustersVMAddVolumeNoContent struct { + /*Audit uid for the request + */ + AuditUID string +} + +func (o *V1SpectroClustersVMAddVolumeNoContent) Error() string { + return fmt.Sprintf("[PUT /v1/spectroclusters/{uid}/vms/{vmName}/addVolume][%d] v1SpectroClustersVmAddVolumeNoContent ", 204) +} + +func (o *V1SpectroClustersVMAddVolumeNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header AuditUid + o.AuditUID = response.GetHeader("AuditUid") + + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_vm_clone_parameters.go b/api/client/v1/v1_spectro_clusters_vm_clone_parameters.go new file mode 100644 index 00000000..c47f1e39 --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_vm_clone_parameters.go @@ -0,0 +1,203 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1SpectroClustersVMCloneParams creates a new V1SpectroClustersVMCloneParams object +// with the default values initialized. +func NewV1SpectroClustersVMCloneParams() *V1SpectroClustersVMCloneParams { + var () + return &V1SpectroClustersVMCloneParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1SpectroClustersVMCloneParamsWithTimeout creates a new V1SpectroClustersVMCloneParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1SpectroClustersVMCloneParamsWithTimeout(timeout time.Duration) *V1SpectroClustersVMCloneParams { + var () + return &V1SpectroClustersVMCloneParams{ + + timeout: timeout, + } +} + +// NewV1SpectroClustersVMCloneParamsWithContext creates a new V1SpectroClustersVMCloneParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1SpectroClustersVMCloneParamsWithContext(ctx context.Context) *V1SpectroClustersVMCloneParams { + var () + return &V1SpectroClustersVMCloneParams{ + + Context: ctx, + } +} + +// NewV1SpectroClustersVMCloneParamsWithHTTPClient creates a new V1SpectroClustersVMCloneParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1SpectroClustersVMCloneParamsWithHTTPClient(client *http.Client) *V1SpectroClustersVMCloneParams { + var () + return &V1SpectroClustersVMCloneParams{ + HTTPClient: client, + } +} + +/* +V1SpectroClustersVMCloneParams contains all the parameters to send to the API endpoint +for the v1 spectro clusters VM clone operation typically these are written to a http.Request +*/ +type V1SpectroClustersVMCloneParams struct { + + /*Body*/ + Body *models.V1SpectroClusterVMCloneEntity + /*Namespace + Namespace name + + */ + Namespace string + /*UID + Cluster uid + + */ + UID string + /*VMName + Virtual Machine name + + */ + VMName string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 spectro clusters VM clone params +func (o *V1SpectroClustersVMCloneParams) WithTimeout(timeout time.Duration) *V1SpectroClustersVMCloneParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 spectro clusters VM clone params +func (o *V1SpectroClustersVMCloneParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 spectro clusters VM clone params +func (o *V1SpectroClustersVMCloneParams) WithContext(ctx context.Context) *V1SpectroClustersVMCloneParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 spectro clusters VM clone params +func (o *V1SpectroClustersVMCloneParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 spectro clusters VM clone params +func (o *V1SpectroClustersVMCloneParams) WithHTTPClient(client *http.Client) *V1SpectroClustersVMCloneParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 spectro clusters VM clone params +func (o *V1SpectroClustersVMCloneParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 spectro clusters VM clone params +func (o *V1SpectroClustersVMCloneParams) WithBody(body *models.V1SpectroClusterVMCloneEntity) *V1SpectroClustersVMCloneParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 spectro clusters VM clone params +func (o *V1SpectroClustersVMCloneParams) SetBody(body *models.V1SpectroClusterVMCloneEntity) { + o.Body = body +} + +// WithNamespace adds the namespace to the v1 spectro clusters VM clone params +func (o *V1SpectroClustersVMCloneParams) WithNamespace(namespace string) *V1SpectroClustersVMCloneParams { + o.SetNamespace(namespace) + return o +} + +// SetNamespace adds the namespace to the v1 spectro clusters VM clone params +func (o *V1SpectroClustersVMCloneParams) SetNamespace(namespace string) { + o.Namespace = namespace +} + +// WithUID adds the uid to the v1 spectro clusters VM clone params +func (o *V1SpectroClustersVMCloneParams) WithUID(uid string) *V1SpectroClustersVMCloneParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 spectro clusters VM clone params +func (o *V1SpectroClustersVMCloneParams) SetUID(uid string) { + o.UID = uid +} + +// WithVMName adds the vMName to the v1 spectro clusters VM clone params +func (o *V1SpectroClustersVMCloneParams) WithVMName(vMName string) *V1SpectroClustersVMCloneParams { + o.SetVMName(vMName) + return o +} + +// SetVMName adds the vmName to the v1 spectro clusters VM clone params +func (o *V1SpectroClustersVMCloneParams) SetVMName(vMName string) { + o.VMName = vMName +} + +// WriteToRequest writes these params to a swagger request +func (o *V1SpectroClustersVMCloneParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // query param namespace + qrNamespace := o.Namespace + qNamespace := qrNamespace + if qNamespace != "" { + if err := r.SetQueryParam("namespace", qNamespace); err != nil { + return err + } + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + // path param vmName + if err := r.SetPathParam("vmName", o.VMName); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_vm_clone_responses.go b/api/client/v1/v1_spectro_clusters_vm_clone_responses.go new file mode 100644 index 00000000..ed444ff4 --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_vm_clone_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1SpectroClustersVMCloneReader is a Reader for the V1SpectroClustersVMClone structure. +type V1SpectroClustersVMCloneReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1SpectroClustersVMCloneReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1SpectroClustersVMCloneOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1SpectroClustersVMCloneOK creates a V1SpectroClustersVMCloneOK with default headers values +func NewV1SpectroClustersVMCloneOK() *V1SpectroClustersVMCloneOK { + return &V1SpectroClustersVMCloneOK{} +} + +/* +V1SpectroClustersVMCloneOK handles this case with default header values. + +(empty) +*/ +type V1SpectroClustersVMCloneOK struct { + Payload *models.V1ClusterVirtualMachine +} + +func (o *V1SpectroClustersVMCloneOK) Error() string { + return fmt.Sprintf("[POST /v1/spectroclusters/{uid}/vms/{vmName}/clone][%d] v1SpectroClustersVmCloneOK %+v", 200, o.Payload) +} + +func (o *V1SpectroClustersVMCloneOK) GetPayload() *models.V1ClusterVirtualMachine { + return o.Payload +} + +func (o *V1SpectroClustersVMCloneOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1ClusterVirtualMachine) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_vm_create_parameters.go b/api/client/v1/v1_spectro_clusters_vm_create_parameters.go new file mode 100644 index 00000000..21443cc8 --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_vm_create_parameters.go @@ -0,0 +1,182 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1SpectroClustersVMCreateParams creates a new V1SpectroClustersVMCreateParams object +// with the default values initialized. +func NewV1SpectroClustersVMCreateParams() *V1SpectroClustersVMCreateParams { + var () + return &V1SpectroClustersVMCreateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1SpectroClustersVMCreateParamsWithTimeout creates a new V1SpectroClustersVMCreateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1SpectroClustersVMCreateParamsWithTimeout(timeout time.Duration) *V1SpectroClustersVMCreateParams { + var () + return &V1SpectroClustersVMCreateParams{ + + timeout: timeout, + } +} + +// NewV1SpectroClustersVMCreateParamsWithContext creates a new V1SpectroClustersVMCreateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1SpectroClustersVMCreateParamsWithContext(ctx context.Context) *V1SpectroClustersVMCreateParams { + var () + return &V1SpectroClustersVMCreateParams{ + + Context: ctx, + } +} + +// NewV1SpectroClustersVMCreateParamsWithHTTPClient creates a new V1SpectroClustersVMCreateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1SpectroClustersVMCreateParamsWithHTTPClient(client *http.Client) *V1SpectroClustersVMCreateParams { + var () + return &V1SpectroClustersVMCreateParams{ + HTTPClient: client, + } +} + +/* +V1SpectroClustersVMCreateParams contains all the parameters to send to the API endpoint +for the v1 spectro clusters VM create operation typically these are written to a http.Request +*/ +type V1SpectroClustersVMCreateParams struct { + + /*Body*/ + Body *models.V1ClusterVirtualMachine + /*Namespace + Namespace name + + */ + Namespace string + /*UID + Cluster uid + + */ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 spectro clusters VM create params +func (o *V1SpectroClustersVMCreateParams) WithTimeout(timeout time.Duration) *V1SpectroClustersVMCreateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 spectro clusters VM create params +func (o *V1SpectroClustersVMCreateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 spectro clusters VM create params +func (o *V1SpectroClustersVMCreateParams) WithContext(ctx context.Context) *V1SpectroClustersVMCreateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 spectro clusters VM create params +func (o *V1SpectroClustersVMCreateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 spectro clusters VM create params +func (o *V1SpectroClustersVMCreateParams) WithHTTPClient(client *http.Client) *V1SpectroClustersVMCreateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 spectro clusters VM create params +func (o *V1SpectroClustersVMCreateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 spectro clusters VM create params +func (o *V1SpectroClustersVMCreateParams) WithBody(body *models.V1ClusterVirtualMachine) *V1SpectroClustersVMCreateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 spectro clusters VM create params +func (o *V1SpectroClustersVMCreateParams) SetBody(body *models.V1ClusterVirtualMachine) { + o.Body = body +} + +// WithNamespace adds the namespace to the v1 spectro clusters VM create params +func (o *V1SpectroClustersVMCreateParams) WithNamespace(namespace string) *V1SpectroClustersVMCreateParams { + o.SetNamespace(namespace) + return o +} + +// SetNamespace adds the namespace to the v1 spectro clusters VM create params +func (o *V1SpectroClustersVMCreateParams) SetNamespace(namespace string) { + o.Namespace = namespace +} + +// WithUID adds the uid to the v1 spectro clusters VM create params +func (o *V1SpectroClustersVMCreateParams) WithUID(uid string) *V1SpectroClustersVMCreateParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 spectro clusters VM create params +func (o *V1SpectroClustersVMCreateParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1SpectroClustersVMCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // query param namespace + qrNamespace := o.Namespace + qNamespace := qrNamespace + if qNamespace != "" { + if err := r.SetQueryParam("namespace", qNamespace); err != nil { + return err + } + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_vm_create_responses.go b/api/client/v1/v1_spectro_clusters_vm_create_responses.go new file mode 100644 index 00000000..9d949388 --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_vm_create_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1SpectroClustersVMCreateReader is a Reader for the V1SpectroClustersVMCreate structure. +type V1SpectroClustersVMCreateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1SpectroClustersVMCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1SpectroClustersVMCreateOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1SpectroClustersVMCreateOK creates a V1SpectroClustersVMCreateOK with default headers values +func NewV1SpectroClustersVMCreateOK() *V1SpectroClustersVMCreateOK { + return &V1SpectroClustersVMCreateOK{} +} + +/* +V1SpectroClustersVMCreateOK handles this case with default header values. + +(empty) +*/ +type V1SpectroClustersVMCreateOK struct { + Payload *models.V1ClusterVirtualMachine +} + +func (o *V1SpectroClustersVMCreateOK) Error() string { + return fmt.Sprintf("[POST /v1/spectroclusters/{uid}/vms][%d] v1SpectroClustersVmCreateOK %+v", 200, o.Payload) +} + +func (o *V1SpectroClustersVMCreateOK) GetPayload() *models.V1ClusterVirtualMachine { + return o.Payload +} + +func (o *V1SpectroClustersVMCreateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1ClusterVirtualMachine) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_vm_delete_parameters.go b/api/client/v1/v1_spectro_clusters_vm_delete_parameters.go new file mode 100644 index 00000000..edec0dfa --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_vm_delete_parameters.go @@ -0,0 +1,182 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1SpectroClustersVMDeleteParams creates a new V1SpectroClustersVMDeleteParams object +// with the default values initialized. +func NewV1SpectroClustersVMDeleteParams() *V1SpectroClustersVMDeleteParams { + var () + return &V1SpectroClustersVMDeleteParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1SpectroClustersVMDeleteParamsWithTimeout creates a new V1SpectroClustersVMDeleteParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1SpectroClustersVMDeleteParamsWithTimeout(timeout time.Duration) *V1SpectroClustersVMDeleteParams { + var () + return &V1SpectroClustersVMDeleteParams{ + + timeout: timeout, + } +} + +// NewV1SpectroClustersVMDeleteParamsWithContext creates a new V1SpectroClustersVMDeleteParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1SpectroClustersVMDeleteParamsWithContext(ctx context.Context) *V1SpectroClustersVMDeleteParams { + var () + return &V1SpectroClustersVMDeleteParams{ + + Context: ctx, + } +} + +// NewV1SpectroClustersVMDeleteParamsWithHTTPClient creates a new V1SpectroClustersVMDeleteParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1SpectroClustersVMDeleteParamsWithHTTPClient(client *http.Client) *V1SpectroClustersVMDeleteParams { + var () + return &V1SpectroClustersVMDeleteParams{ + HTTPClient: client, + } +} + +/* +V1SpectroClustersVMDeleteParams contains all the parameters to send to the API endpoint +for the v1 spectro clusters VM delete operation typically these are written to a http.Request +*/ +type V1SpectroClustersVMDeleteParams struct { + + /*Namespace + Namespace name + + */ + Namespace string + /*UID + Cluster uid + + */ + UID string + /*VMName + Virtual Machine name + + */ + VMName string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 spectro clusters VM delete params +func (o *V1SpectroClustersVMDeleteParams) WithTimeout(timeout time.Duration) *V1SpectroClustersVMDeleteParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 spectro clusters VM delete params +func (o *V1SpectroClustersVMDeleteParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 spectro clusters VM delete params +func (o *V1SpectroClustersVMDeleteParams) WithContext(ctx context.Context) *V1SpectroClustersVMDeleteParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 spectro clusters VM delete params +func (o *V1SpectroClustersVMDeleteParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 spectro clusters VM delete params +func (o *V1SpectroClustersVMDeleteParams) WithHTTPClient(client *http.Client) *V1SpectroClustersVMDeleteParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 spectro clusters VM delete params +func (o *V1SpectroClustersVMDeleteParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithNamespace adds the namespace to the v1 spectro clusters VM delete params +func (o *V1SpectroClustersVMDeleteParams) WithNamespace(namespace string) *V1SpectroClustersVMDeleteParams { + o.SetNamespace(namespace) + return o +} + +// SetNamespace adds the namespace to the v1 spectro clusters VM delete params +func (o *V1SpectroClustersVMDeleteParams) SetNamespace(namespace string) { + o.Namespace = namespace +} + +// WithUID adds the uid to the v1 spectro clusters VM delete params +func (o *V1SpectroClustersVMDeleteParams) WithUID(uid string) *V1SpectroClustersVMDeleteParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 spectro clusters VM delete params +func (o *V1SpectroClustersVMDeleteParams) SetUID(uid string) { + o.UID = uid +} + +// WithVMName adds the vMName to the v1 spectro clusters VM delete params +func (o *V1SpectroClustersVMDeleteParams) WithVMName(vMName string) *V1SpectroClustersVMDeleteParams { + o.SetVMName(vMName) + return o +} + +// SetVMName adds the vmName to the v1 spectro clusters VM delete params +func (o *V1SpectroClustersVMDeleteParams) SetVMName(vMName string) { + o.VMName = vMName +} + +// WriteToRequest writes these params to a swagger request +func (o *V1SpectroClustersVMDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // query param namespace + qrNamespace := o.Namespace + qNamespace := qrNamespace + if qNamespace != "" { + if err := r.SetQueryParam("namespace", qNamespace); err != nil { + return err + } + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + // path param vmName + if err := r.SetPathParam("vmName", o.VMName); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_vm_delete_responses.go b/api/client/v1/v1_spectro_clusters_vm_delete_responses.go new file mode 100644 index 00000000..33487383 --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_vm_delete_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1SpectroClustersVMDeleteReader is a Reader for the V1SpectroClustersVMDelete structure. +type V1SpectroClustersVMDeleteReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1SpectroClustersVMDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1SpectroClustersVMDeleteNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1SpectroClustersVMDeleteNoContent creates a V1SpectroClustersVMDeleteNoContent with default headers values +func NewV1SpectroClustersVMDeleteNoContent() *V1SpectroClustersVMDeleteNoContent { + return &V1SpectroClustersVMDeleteNoContent{} +} + +/* +V1SpectroClustersVMDeleteNoContent handles this case with default header values. + +The resource was deleted successfully +*/ +type V1SpectroClustersVMDeleteNoContent struct { +} + +func (o *V1SpectroClustersVMDeleteNoContent) Error() string { + return fmt.Sprintf("[DELETE /v1/spectroclusters/{uid}/vms/{vmName}][%d] v1SpectroClustersVmDeleteNoContent ", 204) +} + +func (o *V1SpectroClustersVMDeleteNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_vm_get_parameters.go b/api/client/v1/v1_spectro_clusters_vm_get_parameters.go new file mode 100644 index 00000000..230a2b31 --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_vm_get_parameters.go @@ -0,0 +1,182 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1SpectroClustersVMGetParams creates a new V1SpectroClustersVMGetParams object +// with the default values initialized. +func NewV1SpectroClustersVMGetParams() *V1SpectroClustersVMGetParams { + var () + return &V1SpectroClustersVMGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1SpectroClustersVMGetParamsWithTimeout creates a new V1SpectroClustersVMGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1SpectroClustersVMGetParamsWithTimeout(timeout time.Duration) *V1SpectroClustersVMGetParams { + var () + return &V1SpectroClustersVMGetParams{ + + timeout: timeout, + } +} + +// NewV1SpectroClustersVMGetParamsWithContext creates a new V1SpectroClustersVMGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1SpectroClustersVMGetParamsWithContext(ctx context.Context) *V1SpectroClustersVMGetParams { + var () + return &V1SpectroClustersVMGetParams{ + + Context: ctx, + } +} + +// NewV1SpectroClustersVMGetParamsWithHTTPClient creates a new V1SpectroClustersVMGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1SpectroClustersVMGetParamsWithHTTPClient(client *http.Client) *V1SpectroClustersVMGetParams { + var () + return &V1SpectroClustersVMGetParams{ + HTTPClient: client, + } +} + +/* +V1SpectroClustersVMGetParams contains all the parameters to send to the API endpoint +for the v1 spectro clusters VM get operation typically these are written to a http.Request +*/ +type V1SpectroClustersVMGetParams struct { + + /*Namespace + Namespace name + + */ + Namespace string + /*UID + Cluster uid + + */ + UID string + /*VMName + Virtual Machine name + + */ + VMName string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 spectro clusters VM get params +func (o *V1SpectroClustersVMGetParams) WithTimeout(timeout time.Duration) *V1SpectroClustersVMGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 spectro clusters VM get params +func (o *V1SpectroClustersVMGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 spectro clusters VM get params +func (o *V1SpectroClustersVMGetParams) WithContext(ctx context.Context) *V1SpectroClustersVMGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 spectro clusters VM get params +func (o *V1SpectroClustersVMGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 spectro clusters VM get params +func (o *V1SpectroClustersVMGetParams) WithHTTPClient(client *http.Client) *V1SpectroClustersVMGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 spectro clusters VM get params +func (o *V1SpectroClustersVMGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithNamespace adds the namespace to the v1 spectro clusters VM get params +func (o *V1SpectroClustersVMGetParams) WithNamespace(namespace string) *V1SpectroClustersVMGetParams { + o.SetNamespace(namespace) + return o +} + +// SetNamespace adds the namespace to the v1 spectro clusters VM get params +func (o *V1SpectroClustersVMGetParams) SetNamespace(namespace string) { + o.Namespace = namespace +} + +// WithUID adds the uid to the v1 spectro clusters VM get params +func (o *V1SpectroClustersVMGetParams) WithUID(uid string) *V1SpectroClustersVMGetParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 spectro clusters VM get params +func (o *V1SpectroClustersVMGetParams) SetUID(uid string) { + o.UID = uid +} + +// WithVMName adds the vMName to the v1 spectro clusters VM get params +func (o *V1SpectroClustersVMGetParams) WithVMName(vMName string) *V1SpectroClustersVMGetParams { + o.SetVMName(vMName) + return o +} + +// SetVMName adds the vmName to the v1 spectro clusters VM get params +func (o *V1SpectroClustersVMGetParams) SetVMName(vMName string) { + o.VMName = vMName +} + +// WriteToRequest writes these params to a swagger request +func (o *V1SpectroClustersVMGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // query param namespace + qrNamespace := o.Namespace + qNamespace := qrNamespace + if qNamespace != "" { + if err := r.SetQueryParam("namespace", qNamespace); err != nil { + return err + } + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + // path param vmName + if err := r.SetPathParam("vmName", o.VMName); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_vm_get_responses.go b/api/client/v1/v1_spectro_clusters_vm_get_responses.go new file mode 100644 index 00000000..89943fa9 --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_vm_get_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1SpectroClustersVMGetReader is a Reader for the V1SpectroClustersVMGet structure. +type V1SpectroClustersVMGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1SpectroClustersVMGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1SpectroClustersVMGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1SpectroClustersVMGetOK creates a V1SpectroClustersVMGetOK with default headers values +func NewV1SpectroClustersVMGetOK() *V1SpectroClustersVMGetOK { + return &V1SpectroClustersVMGetOK{} +} + +/* +V1SpectroClustersVMGetOK handles this case with default header values. + +(empty) +*/ +type V1SpectroClustersVMGetOK struct { + Payload *models.V1ClusterVirtualMachine +} + +func (o *V1SpectroClustersVMGetOK) Error() string { + return fmt.Sprintf("[GET /v1/spectroclusters/{uid}/vms/{vmName}][%d] v1SpectroClustersVmGetOK %+v", 200, o.Payload) +} + +func (o *V1SpectroClustersVMGetOK) GetPayload() *models.V1ClusterVirtualMachine { + return o.Payload +} + +func (o *V1SpectroClustersVMGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1ClusterVirtualMachine) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_vm_list_parameters.go b/api/client/v1/v1_spectro_clusters_vm_list_parameters.go new file mode 100644 index 00000000..91699ea1 --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_vm_list_parameters.go @@ -0,0 +1,238 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// NewV1SpectroClustersVMListParams creates a new V1SpectroClustersVMListParams object +// with the default values initialized. +func NewV1SpectroClustersVMListParams() *V1SpectroClustersVMListParams { + var ( + limitDefault = int64(50) + ) + return &V1SpectroClustersVMListParams{ + Limit: &limitDefault, + + timeout: cr.DefaultTimeout, + } +} + +// NewV1SpectroClustersVMListParamsWithTimeout creates a new V1SpectroClustersVMListParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1SpectroClustersVMListParamsWithTimeout(timeout time.Duration) *V1SpectroClustersVMListParams { + var ( + limitDefault = int64(50) + ) + return &V1SpectroClustersVMListParams{ + Limit: &limitDefault, + + timeout: timeout, + } +} + +// NewV1SpectroClustersVMListParamsWithContext creates a new V1SpectroClustersVMListParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1SpectroClustersVMListParamsWithContext(ctx context.Context) *V1SpectroClustersVMListParams { + var ( + limitDefault = int64(50) + ) + return &V1SpectroClustersVMListParams{ + Limit: &limitDefault, + + Context: ctx, + } +} + +// NewV1SpectroClustersVMListParamsWithHTTPClient creates a new V1SpectroClustersVMListParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1SpectroClustersVMListParamsWithHTTPClient(client *http.Client) *V1SpectroClustersVMListParams { + var ( + limitDefault = int64(50) + ) + return &V1SpectroClustersVMListParams{ + Limit: &limitDefault, + HTTPClient: client, + } +} + +/* +V1SpectroClustersVMListParams contains all the parameters to send to the API endpoint +for the v1 spectro clusters VM list operation typically these are written to a http.Request +*/ +type V1SpectroClustersVMListParams struct { + + /*Continue + continue token to paginate the subsequent data items + + */ + Continue *string + /*Limit + limit is a maximum number of responses to return for a list call. Default and maximum value of the limit is 50. + If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. + + */ + Limit *int64 + /*Namespace + Namespace names, comma separated value (ex: dev,test). If namespace is empty it returns the specific resource under all namespace + + */ + Namespace []string + /*UID + Cluster uid + + */ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 spectro clusters VM list params +func (o *V1SpectroClustersVMListParams) WithTimeout(timeout time.Duration) *V1SpectroClustersVMListParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 spectro clusters VM list params +func (o *V1SpectroClustersVMListParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 spectro clusters VM list params +func (o *V1SpectroClustersVMListParams) WithContext(ctx context.Context) *V1SpectroClustersVMListParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 spectro clusters VM list params +func (o *V1SpectroClustersVMListParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 spectro clusters VM list params +func (o *V1SpectroClustersVMListParams) WithHTTPClient(client *http.Client) *V1SpectroClustersVMListParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 spectro clusters VM list params +func (o *V1SpectroClustersVMListParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithContinue adds the continueVar to the v1 spectro clusters VM list params +func (o *V1SpectroClustersVMListParams) WithContinue(continueVar *string) *V1SpectroClustersVMListParams { + o.SetContinue(continueVar) + return o +} + +// SetContinue adds the continue to the v1 spectro clusters VM list params +func (o *V1SpectroClustersVMListParams) SetContinue(continueVar *string) { + o.Continue = continueVar +} + +// WithLimit adds the limit to the v1 spectro clusters VM list params +func (o *V1SpectroClustersVMListParams) WithLimit(limit *int64) *V1SpectroClustersVMListParams { + o.SetLimit(limit) + return o +} + +// SetLimit adds the limit to the v1 spectro clusters VM list params +func (o *V1SpectroClustersVMListParams) SetLimit(limit *int64) { + o.Limit = limit +} + +// WithNamespace adds the namespace to the v1 spectro clusters VM list params +func (o *V1SpectroClustersVMListParams) WithNamespace(namespace []string) *V1SpectroClustersVMListParams { + o.SetNamespace(namespace) + return o +} + +// SetNamespace adds the namespace to the v1 spectro clusters VM list params +func (o *V1SpectroClustersVMListParams) SetNamespace(namespace []string) { + o.Namespace = namespace +} + +// WithUID adds the uid to the v1 spectro clusters VM list params +func (o *V1SpectroClustersVMListParams) WithUID(uid string) *V1SpectroClustersVMListParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 spectro clusters VM list params +func (o *V1SpectroClustersVMListParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1SpectroClustersVMListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Continue != nil { + + // query param continue + var qrContinue string + if o.Continue != nil { + qrContinue = *o.Continue + } + qContinue := qrContinue + if qContinue != "" { + if err := r.SetQueryParam("continue", qContinue); err != nil { + return err + } + } + + } + + if o.Limit != nil { + + // query param limit + var qrLimit int64 + if o.Limit != nil { + qrLimit = *o.Limit + } + qLimit := swag.FormatInt64(qrLimit) + if qLimit != "" { + if err := r.SetQueryParam("limit", qLimit); err != nil { + return err + } + } + + } + + valuesNamespace := o.Namespace + + joinedNamespace := swag.JoinByFormat(valuesNamespace, "csv") + // query array param namespace + if err := r.SetQueryParam("namespace", joinedNamespace...); err != nil { + return err + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_vm_list_responses.go b/api/client/v1/v1_spectro_clusters_vm_list_responses.go new file mode 100644 index 00000000..a40cec67 --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_vm_list_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1SpectroClustersVMListReader is a Reader for the V1SpectroClustersVMList structure. +type V1SpectroClustersVMListReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1SpectroClustersVMListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1SpectroClustersVMListOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1SpectroClustersVMListOK creates a V1SpectroClustersVMListOK with default headers values +func NewV1SpectroClustersVMListOK() *V1SpectroClustersVMListOK { + return &V1SpectroClustersVMListOK{} +} + +/* +V1SpectroClustersVMListOK handles this case with default header values. + +OK +*/ +type V1SpectroClustersVMListOK struct { + Payload *models.V1ClusterVirtualMachineList +} + +func (o *V1SpectroClustersVMListOK) Error() string { + return fmt.Sprintf("[GET /v1/spectroclusters/{uid}/vms][%d] v1SpectroClustersVmListOK %+v", 200, o.Payload) +} + +func (o *V1SpectroClustersVMListOK) GetPayload() *models.V1ClusterVirtualMachineList { + return o.Payload +} + +func (o *V1SpectroClustersVMListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1ClusterVirtualMachineList) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_vm_migrate_parameters.go b/api/client/v1/v1_spectro_clusters_vm_migrate_parameters.go new file mode 100644 index 00000000..28d6dbfc --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_vm_migrate_parameters.go @@ -0,0 +1,182 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1SpectroClustersVMMigrateParams creates a new V1SpectroClustersVMMigrateParams object +// with the default values initialized. +func NewV1SpectroClustersVMMigrateParams() *V1SpectroClustersVMMigrateParams { + var () + return &V1SpectroClustersVMMigrateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1SpectroClustersVMMigrateParamsWithTimeout creates a new V1SpectroClustersVMMigrateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1SpectroClustersVMMigrateParamsWithTimeout(timeout time.Duration) *V1SpectroClustersVMMigrateParams { + var () + return &V1SpectroClustersVMMigrateParams{ + + timeout: timeout, + } +} + +// NewV1SpectroClustersVMMigrateParamsWithContext creates a new V1SpectroClustersVMMigrateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1SpectroClustersVMMigrateParamsWithContext(ctx context.Context) *V1SpectroClustersVMMigrateParams { + var () + return &V1SpectroClustersVMMigrateParams{ + + Context: ctx, + } +} + +// NewV1SpectroClustersVMMigrateParamsWithHTTPClient creates a new V1SpectroClustersVMMigrateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1SpectroClustersVMMigrateParamsWithHTTPClient(client *http.Client) *V1SpectroClustersVMMigrateParams { + var () + return &V1SpectroClustersVMMigrateParams{ + HTTPClient: client, + } +} + +/* +V1SpectroClustersVMMigrateParams contains all the parameters to send to the API endpoint +for the v1 spectro clusters VM migrate operation typically these are written to a http.Request +*/ +type V1SpectroClustersVMMigrateParams struct { + + /*Namespace + Namespace name + + */ + Namespace string + /*UID + Cluster uid + + */ + UID string + /*VMName + Virtual Machine name + + */ + VMName string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 spectro clusters VM migrate params +func (o *V1SpectroClustersVMMigrateParams) WithTimeout(timeout time.Duration) *V1SpectroClustersVMMigrateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 spectro clusters VM migrate params +func (o *V1SpectroClustersVMMigrateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 spectro clusters VM migrate params +func (o *V1SpectroClustersVMMigrateParams) WithContext(ctx context.Context) *V1SpectroClustersVMMigrateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 spectro clusters VM migrate params +func (o *V1SpectroClustersVMMigrateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 spectro clusters VM migrate params +func (o *V1SpectroClustersVMMigrateParams) WithHTTPClient(client *http.Client) *V1SpectroClustersVMMigrateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 spectro clusters VM migrate params +func (o *V1SpectroClustersVMMigrateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithNamespace adds the namespace to the v1 spectro clusters VM migrate params +func (o *V1SpectroClustersVMMigrateParams) WithNamespace(namespace string) *V1SpectroClustersVMMigrateParams { + o.SetNamespace(namespace) + return o +} + +// SetNamespace adds the namespace to the v1 spectro clusters VM migrate params +func (o *V1SpectroClustersVMMigrateParams) SetNamespace(namespace string) { + o.Namespace = namespace +} + +// WithUID adds the uid to the v1 spectro clusters VM migrate params +func (o *V1SpectroClustersVMMigrateParams) WithUID(uid string) *V1SpectroClustersVMMigrateParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 spectro clusters VM migrate params +func (o *V1SpectroClustersVMMigrateParams) SetUID(uid string) { + o.UID = uid +} + +// WithVMName adds the vMName to the v1 spectro clusters VM migrate params +func (o *V1SpectroClustersVMMigrateParams) WithVMName(vMName string) *V1SpectroClustersVMMigrateParams { + o.SetVMName(vMName) + return o +} + +// SetVMName adds the vmName to the v1 spectro clusters VM migrate params +func (o *V1SpectroClustersVMMigrateParams) SetVMName(vMName string) { + o.VMName = vMName +} + +// WriteToRequest writes these params to a swagger request +func (o *V1SpectroClustersVMMigrateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // query param namespace + qrNamespace := o.Namespace + qNamespace := qrNamespace + if qNamespace != "" { + if err := r.SetQueryParam("namespace", qNamespace); err != nil { + return err + } + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + // path param vmName + if err := r.SetPathParam("vmName", o.VMName); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_vm_migrate_responses.go b/api/client/v1/v1_spectro_clusters_vm_migrate_responses.go new file mode 100644 index 00000000..0e618bee --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_vm_migrate_responses.go @@ -0,0 +1,61 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1SpectroClustersVMMigrateReader is a Reader for the V1SpectroClustersVMMigrate structure. +type V1SpectroClustersVMMigrateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1SpectroClustersVMMigrateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1SpectroClustersVMMigrateNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1SpectroClustersVMMigrateNoContent creates a V1SpectroClustersVMMigrateNoContent with default headers values +func NewV1SpectroClustersVMMigrateNoContent() *V1SpectroClustersVMMigrateNoContent { + return &V1SpectroClustersVMMigrateNoContent{} +} + +/* +V1SpectroClustersVMMigrateNoContent handles this case with default header values. + +Ok response without content +*/ +type V1SpectroClustersVMMigrateNoContent struct { + /*Audit uid for the request + */ + AuditUID string +} + +func (o *V1SpectroClustersVMMigrateNoContent) Error() string { + return fmt.Sprintf("[PUT /v1/spectroclusters/{uid}/vms/{vmName}/migrate][%d] v1SpectroClustersVmMigrateNoContent ", 204) +} + +func (o *V1SpectroClustersVMMigrateNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header AuditUid + o.AuditUID = response.GetHeader("AuditUid") + + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_vm_pause_parameters.go b/api/client/v1/v1_spectro_clusters_vm_pause_parameters.go new file mode 100644 index 00000000..d8d3fe9f --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_vm_pause_parameters.go @@ -0,0 +1,182 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1SpectroClustersVMPauseParams creates a new V1SpectroClustersVMPauseParams object +// with the default values initialized. +func NewV1SpectroClustersVMPauseParams() *V1SpectroClustersVMPauseParams { + var () + return &V1SpectroClustersVMPauseParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1SpectroClustersVMPauseParamsWithTimeout creates a new V1SpectroClustersVMPauseParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1SpectroClustersVMPauseParamsWithTimeout(timeout time.Duration) *V1SpectroClustersVMPauseParams { + var () + return &V1SpectroClustersVMPauseParams{ + + timeout: timeout, + } +} + +// NewV1SpectroClustersVMPauseParamsWithContext creates a new V1SpectroClustersVMPauseParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1SpectroClustersVMPauseParamsWithContext(ctx context.Context) *V1SpectroClustersVMPauseParams { + var () + return &V1SpectroClustersVMPauseParams{ + + Context: ctx, + } +} + +// NewV1SpectroClustersVMPauseParamsWithHTTPClient creates a new V1SpectroClustersVMPauseParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1SpectroClustersVMPauseParamsWithHTTPClient(client *http.Client) *V1SpectroClustersVMPauseParams { + var () + return &V1SpectroClustersVMPauseParams{ + HTTPClient: client, + } +} + +/* +V1SpectroClustersVMPauseParams contains all the parameters to send to the API endpoint +for the v1 spectro clusters VM pause operation typically these are written to a http.Request +*/ +type V1SpectroClustersVMPauseParams struct { + + /*Namespace + Namespace name + + */ + Namespace string + /*UID + Cluster uid + + */ + UID string + /*VMName + Virtual Machine name + + */ + VMName string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 spectro clusters VM pause params +func (o *V1SpectroClustersVMPauseParams) WithTimeout(timeout time.Duration) *V1SpectroClustersVMPauseParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 spectro clusters VM pause params +func (o *V1SpectroClustersVMPauseParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 spectro clusters VM pause params +func (o *V1SpectroClustersVMPauseParams) WithContext(ctx context.Context) *V1SpectroClustersVMPauseParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 spectro clusters VM pause params +func (o *V1SpectroClustersVMPauseParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 spectro clusters VM pause params +func (o *V1SpectroClustersVMPauseParams) WithHTTPClient(client *http.Client) *V1SpectroClustersVMPauseParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 spectro clusters VM pause params +func (o *V1SpectroClustersVMPauseParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithNamespace adds the namespace to the v1 spectro clusters VM pause params +func (o *V1SpectroClustersVMPauseParams) WithNamespace(namespace string) *V1SpectroClustersVMPauseParams { + o.SetNamespace(namespace) + return o +} + +// SetNamespace adds the namespace to the v1 spectro clusters VM pause params +func (o *V1SpectroClustersVMPauseParams) SetNamespace(namespace string) { + o.Namespace = namespace +} + +// WithUID adds the uid to the v1 spectro clusters VM pause params +func (o *V1SpectroClustersVMPauseParams) WithUID(uid string) *V1SpectroClustersVMPauseParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 spectro clusters VM pause params +func (o *V1SpectroClustersVMPauseParams) SetUID(uid string) { + o.UID = uid +} + +// WithVMName adds the vMName to the v1 spectro clusters VM pause params +func (o *V1SpectroClustersVMPauseParams) WithVMName(vMName string) *V1SpectroClustersVMPauseParams { + o.SetVMName(vMName) + return o +} + +// SetVMName adds the vmName to the v1 spectro clusters VM pause params +func (o *V1SpectroClustersVMPauseParams) SetVMName(vMName string) { + o.VMName = vMName +} + +// WriteToRequest writes these params to a swagger request +func (o *V1SpectroClustersVMPauseParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // query param namespace + qrNamespace := o.Namespace + qNamespace := qrNamespace + if qNamespace != "" { + if err := r.SetQueryParam("namespace", qNamespace); err != nil { + return err + } + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + // path param vmName + if err := r.SetPathParam("vmName", o.VMName); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_vm_pause_responses.go b/api/client/v1/v1_spectro_clusters_vm_pause_responses.go new file mode 100644 index 00000000..d27d1385 --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_vm_pause_responses.go @@ -0,0 +1,61 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1SpectroClustersVMPauseReader is a Reader for the V1SpectroClustersVMPause structure. +type V1SpectroClustersVMPauseReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1SpectroClustersVMPauseReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1SpectroClustersVMPauseNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1SpectroClustersVMPauseNoContent creates a V1SpectroClustersVMPauseNoContent with default headers values +func NewV1SpectroClustersVMPauseNoContent() *V1SpectroClustersVMPauseNoContent { + return &V1SpectroClustersVMPauseNoContent{} +} + +/* +V1SpectroClustersVMPauseNoContent handles this case with default header values. + +Ok response without content +*/ +type V1SpectroClustersVMPauseNoContent struct { + /*Audit uid for the request + */ + AuditUID string +} + +func (o *V1SpectroClustersVMPauseNoContent) Error() string { + return fmt.Sprintf("[PUT /v1/spectroclusters/{uid}/vms/{vmName}/pause][%d] v1SpectroClustersVmPauseNoContent ", 204) +} + +func (o *V1SpectroClustersVMPauseNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header AuditUid + o.AuditUID = response.GetHeader("AuditUid") + + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_vm_remove_volume_parameters.go b/api/client/v1/v1_spectro_clusters_vm_remove_volume_parameters.go new file mode 100644 index 00000000..037f0301 --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_vm_remove_volume_parameters.go @@ -0,0 +1,203 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1SpectroClustersVMRemoveVolumeParams creates a new V1SpectroClustersVMRemoveVolumeParams object +// with the default values initialized. +func NewV1SpectroClustersVMRemoveVolumeParams() *V1SpectroClustersVMRemoveVolumeParams { + var () + return &V1SpectroClustersVMRemoveVolumeParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1SpectroClustersVMRemoveVolumeParamsWithTimeout creates a new V1SpectroClustersVMRemoveVolumeParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1SpectroClustersVMRemoveVolumeParamsWithTimeout(timeout time.Duration) *V1SpectroClustersVMRemoveVolumeParams { + var () + return &V1SpectroClustersVMRemoveVolumeParams{ + + timeout: timeout, + } +} + +// NewV1SpectroClustersVMRemoveVolumeParamsWithContext creates a new V1SpectroClustersVMRemoveVolumeParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1SpectroClustersVMRemoveVolumeParamsWithContext(ctx context.Context) *V1SpectroClustersVMRemoveVolumeParams { + var () + return &V1SpectroClustersVMRemoveVolumeParams{ + + Context: ctx, + } +} + +// NewV1SpectroClustersVMRemoveVolumeParamsWithHTTPClient creates a new V1SpectroClustersVMRemoveVolumeParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1SpectroClustersVMRemoveVolumeParamsWithHTTPClient(client *http.Client) *V1SpectroClustersVMRemoveVolumeParams { + var () + return &V1SpectroClustersVMRemoveVolumeParams{ + HTTPClient: client, + } +} + +/* +V1SpectroClustersVMRemoveVolumeParams contains all the parameters to send to the API endpoint +for the v1 spectro clusters VM remove volume operation typically these are written to a http.Request +*/ +type V1SpectroClustersVMRemoveVolumeParams struct { + + /*Body*/ + Body *models.V1VMRemoveVolumeEntity + /*Namespace + Namespace name + + */ + Namespace string + /*UID + Cluster uid + + */ + UID string + /*VMName + Virtual Machine name + + */ + VMName string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 spectro clusters VM remove volume params +func (o *V1SpectroClustersVMRemoveVolumeParams) WithTimeout(timeout time.Duration) *V1SpectroClustersVMRemoveVolumeParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 spectro clusters VM remove volume params +func (o *V1SpectroClustersVMRemoveVolumeParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 spectro clusters VM remove volume params +func (o *V1SpectroClustersVMRemoveVolumeParams) WithContext(ctx context.Context) *V1SpectroClustersVMRemoveVolumeParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 spectro clusters VM remove volume params +func (o *V1SpectroClustersVMRemoveVolumeParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 spectro clusters VM remove volume params +func (o *V1SpectroClustersVMRemoveVolumeParams) WithHTTPClient(client *http.Client) *V1SpectroClustersVMRemoveVolumeParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 spectro clusters VM remove volume params +func (o *V1SpectroClustersVMRemoveVolumeParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 spectro clusters VM remove volume params +func (o *V1SpectroClustersVMRemoveVolumeParams) WithBody(body *models.V1VMRemoveVolumeEntity) *V1SpectroClustersVMRemoveVolumeParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 spectro clusters VM remove volume params +func (o *V1SpectroClustersVMRemoveVolumeParams) SetBody(body *models.V1VMRemoveVolumeEntity) { + o.Body = body +} + +// WithNamespace adds the namespace to the v1 spectro clusters VM remove volume params +func (o *V1SpectroClustersVMRemoveVolumeParams) WithNamespace(namespace string) *V1SpectroClustersVMRemoveVolumeParams { + o.SetNamespace(namespace) + return o +} + +// SetNamespace adds the namespace to the v1 spectro clusters VM remove volume params +func (o *V1SpectroClustersVMRemoveVolumeParams) SetNamespace(namespace string) { + o.Namespace = namespace +} + +// WithUID adds the uid to the v1 spectro clusters VM remove volume params +func (o *V1SpectroClustersVMRemoveVolumeParams) WithUID(uid string) *V1SpectroClustersVMRemoveVolumeParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 spectro clusters VM remove volume params +func (o *V1SpectroClustersVMRemoveVolumeParams) SetUID(uid string) { + o.UID = uid +} + +// WithVMName adds the vMName to the v1 spectro clusters VM remove volume params +func (o *V1SpectroClustersVMRemoveVolumeParams) WithVMName(vMName string) *V1SpectroClustersVMRemoveVolumeParams { + o.SetVMName(vMName) + return o +} + +// SetVMName adds the vmName to the v1 spectro clusters VM remove volume params +func (o *V1SpectroClustersVMRemoveVolumeParams) SetVMName(vMName string) { + o.VMName = vMName +} + +// WriteToRequest writes these params to a swagger request +func (o *V1SpectroClustersVMRemoveVolumeParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // query param namespace + qrNamespace := o.Namespace + qNamespace := qrNamespace + if qNamespace != "" { + if err := r.SetQueryParam("namespace", qNamespace); err != nil { + return err + } + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + // path param vmName + if err := r.SetPathParam("vmName", o.VMName); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_vm_remove_volume_responses.go b/api/client/v1/v1_spectro_clusters_vm_remove_volume_responses.go new file mode 100644 index 00000000..98e013f7 --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_vm_remove_volume_responses.go @@ -0,0 +1,61 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1SpectroClustersVMRemoveVolumeReader is a Reader for the V1SpectroClustersVMRemoveVolume structure. +type V1SpectroClustersVMRemoveVolumeReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1SpectroClustersVMRemoveVolumeReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1SpectroClustersVMRemoveVolumeNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1SpectroClustersVMRemoveVolumeNoContent creates a V1SpectroClustersVMRemoveVolumeNoContent with default headers values +func NewV1SpectroClustersVMRemoveVolumeNoContent() *V1SpectroClustersVMRemoveVolumeNoContent { + return &V1SpectroClustersVMRemoveVolumeNoContent{} +} + +/* +V1SpectroClustersVMRemoveVolumeNoContent handles this case with default header values. + +Ok response without content +*/ +type V1SpectroClustersVMRemoveVolumeNoContent struct { + /*Audit uid for the request + */ + AuditUID string +} + +func (o *V1SpectroClustersVMRemoveVolumeNoContent) Error() string { + return fmt.Sprintf("[PUT /v1/spectroclusters/{uid}/vms/{vmName}/removeVolume][%d] v1SpectroClustersVmRemoveVolumeNoContent ", 204) +} + +func (o *V1SpectroClustersVMRemoveVolumeNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header AuditUid + o.AuditUID = response.GetHeader("AuditUid") + + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_vm_restart_parameters.go b/api/client/v1/v1_spectro_clusters_vm_restart_parameters.go new file mode 100644 index 00000000..29a9348b --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_vm_restart_parameters.go @@ -0,0 +1,182 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1SpectroClustersVMRestartParams creates a new V1SpectroClustersVMRestartParams object +// with the default values initialized. +func NewV1SpectroClustersVMRestartParams() *V1SpectroClustersVMRestartParams { + var () + return &V1SpectroClustersVMRestartParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1SpectroClustersVMRestartParamsWithTimeout creates a new V1SpectroClustersVMRestartParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1SpectroClustersVMRestartParamsWithTimeout(timeout time.Duration) *V1SpectroClustersVMRestartParams { + var () + return &V1SpectroClustersVMRestartParams{ + + timeout: timeout, + } +} + +// NewV1SpectroClustersVMRestartParamsWithContext creates a new V1SpectroClustersVMRestartParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1SpectroClustersVMRestartParamsWithContext(ctx context.Context) *V1SpectroClustersVMRestartParams { + var () + return &V1SpectroClustersVMRestartParams{ + + Context: ctx, + } +} + +// NewV1SpectroClustersVMRestartParamsWithHTTPClient creates a new V1SpectroClustersVMRestartParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1SpectroClustersVMRestartParamsWithHTTPClient(client *http.Client) *V1SpectroClustersVMRestartParams { + var () + return &V1SpectroClustersVMRestartParams{ + HTTPClient: client, + } +} + +/* +V1SpectroClustersVMRestartParams contains all the parameters to send to the API endpoint +for the v1 spectro clusters VM restart operation typically these are written to a http.Request +*/ +type V1SpectroClustersVMRestartParams struct { + + /*Namespace + Namespace name + + */ + Namespace string + /*UID + Cluster uid + + */ + UID string + /*VMName + Virtual Machine name + + */ + VMName string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 spectro clusters VM restart params +func (o *V1SpectroClustersVMRestartParams) WithTimeout(timeout time.Duration) *V1SpectroClustersVMRestartParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 spectro clusters VM restart params +func (o *V1SpectroClustersVMRestartParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 spectro clusters VM restart params +func (o *V1SpectroClustersVMRestartParams) WithContext(ctx context.Context) *V1SpectroClustersVMRestartParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 spectro clusters VM restart params +func (o *V1SpectroClustersVMRestartParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 spectro clusters VM restart params +func (o *V1SpectroClustersVMRestartParams) WithHTTPClient(client *http.Client) *V1SpectroClustersVMRestartParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 spectro clusters VM restart params +func (o *V1SpectroClustersVMRestartParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithNamespace adds the namespace to the v1 spectro clusters VM restart params +func (o *V1SpectroClustersVMRestartParams) WithNamespace(namespace string) *V1SpectroClustersVMRestartParams { + o.SetNamespace(namespace) + return o +} + +// SetNamespace adds the namespace to the v1 spectro clusters VM restart params +func (o *V1SpectroClustersVMRestartParams) SetNamespace(namespace string) { + o.Namespace = namespace +} + +// WithUID adds the uid to the v1 spectro clusters VM restart params +func (o *V1SpectroClustersVMRestartParams) WithUID(uid string) *V1SpectroClustersVMRestartParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 spectro clusters VM restart params +func (o *V1SpectroClustersVMRestartParams) SetUID(uid string) { + o.UID = uid +} + +// WithVMName adds the vMName to the v1 spectro clusters VM restart params +func (o *V1SpectroClustersVMRestartParams) WithVMName(vMName string) *V1SpectroClustersVMRestartParams { + o.SetVMName(vMName) + return o +} + +// SetVMName adds the vmName to the v1 spectro clusters VM restart params +func (o *V1SpectroClustersVMRestartParams) SetVMName(vMName string) { + o.VMName = vMName +} + +// WriteToRequest writes these params to a swagger request +func (o *V1SpectroClustersVMRestartParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // query param namespace + qrNamespace := o.Namespace + qNamespace := qrNamespace + if qNamespace != "" { + if err := r.SetQueryParam("namespace", qNamespace); err != nil { + return err + } + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + // path param vmName + if err := r.SetPathParam("vmName", o.VMName); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_vm_restart_responses.go b/api/client/v1/v1_spectro_clusters_vm_restart_responses.go new file mode 100644 index 00000000..02368e46 --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_vm_restart_responses.go @@ -0,0 +1,61 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1SpectroClustersVMRestartReader is a Reader for the V1SpectroClustersVMRestart structure. +type V1SpectroClustersVMRestartReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1SpectroClustersVMRestartReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1SpectroClustersVMRestartNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1SpectroClustersVMRestartNoContent creates a V1SpectroClustersVMRestartNoContent with default headers values +func NewV1SpectroClustersVMRestartNoContent() *V1SpectroClustersVMRestartNoContent { + return &V1SpectroClustersVMRestartNoContent{} +} + +/* +V1SpectroClustersVMRestartNoContent handles this case with default header values. + +Ok response without content +*/ +type V1SpectroClustersVMRestartNoContent struct { + /*Audit uid for the request + */ + AuditUID string +} + +func (o *V1SpectroClustersVMRestartNoContent) Error() string { + return fmt.Sprintf("[PUT /v1/spectroclusters/{uid}/vms/{vmName}/restart][%d] v1SpectroClustersVmRestartNoContent ", 204) +} + +func (o *V1SpectroClustersVMRestartNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header AuditUid + o.AuditUID = response.GetHeader("AuditUid") + + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_vm_resume_parameters.go b/api/client/v1/v1_spectro_clusters_vm_resume_parameters.go new file mode 100644 index 00000000..acbb6bad --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_vm_resume_parameters.go @@ -0,0 +1,182 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1SpectroClustersVMResumeParams creates a new V1SpectroClustersVMResumeParams object +// with the default values initialized. +func NewV1SpectroClustersVMResumeParams() *V1SpectroClustersVMResumeParams { + var () + return &V1SpectroClustersVMResumeParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1SpectroClustersVMResumeParamsWithTimeout creates a new V1SpectroClustersVMResumeParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1SpectroClustersVMResumeParamsWithTimeout(timeout time.Duration) *V1SpectroClustersVMResumeParams { + var () + return &V1SpectroClustersVMResumeParams{ + + timeout: timeout, + } +} + +// NewV1SpectroClustersVMResumeParamsWithContext creates a new V1SpectroClustersVMResumeParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1SpectroClustersVMResumeParamsWithContext(ctx context.Context) *V1SpectroClustersVMResumeParams { + var () + return &V1SpectroClustersVMResumeParams{ + + Context: ctx, + } +} + +// NewV1SpectroClustersVMResumeParamsWithHTTPClient creates a new V1SpectroClustersVMResumeParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1SpectroClustersVMResumeParamsWithHTTPClient(client *http.Client) *V1SpectroClustersVMResumeParams { + var () + return &V1SpectroClustersVMResumeParams{ + HTTPClient: client, + } +} + +/* +V1SpectroClustersVMResumeParams contains all the parameters to send to the API endpoint +for the v1 spectro clusters VM resume operation typically these are written to a http.Request +*/ +type V1SpectroClustersVMResumeParams struct { + + /*Namespace + Namespace name + + */ + Namespace string + /*UID + Cluster uid + + */ + UID string + /*VMName + Virtual Machine name + + */ + VMName string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 spectro clusters VM resume params +func (o *V1SpectroClustersVMResumeParams) WithTimeout(timeout time.Duration) *V1SpectroClustersVMResumeParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 spectro clusters VM resume params +func (o *V1SpectroClustersVMResumeParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 spectro clusters VM resume params +func (o *V1SpectroClustersVMResumeParams) WithContext(ctx context.Context) *V1SpectroClustersVMResumeParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 spectro clusters VM resume params +func (o *V1SpectroClustersVMResumeParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 spectro clusters VM resume params +func (o *V1SpectroClustersVMResumeParams) WithHTTPClient(client *http.Client) *V1SpectroClustersVMResumeParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 spectro clusters VM resume params +func (o *V1SpectroClustersVMResumeParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithNamespace adds the namespace to the v1 spectro clusters VM resume params +func (o *V1SpectroClustersVMResumeParams) WithNamespace(namespace string) *V1SpectroClustersVMResumeParams { + o.SetNamespace(namespace) + return o +} + +// SetNamespace adds the namespace to the v1 spectro clusters VM resume params +func (o *V1SpectroClustersVMResumeParams) SetNamespace(namespace string) { + o.Namespace = namespace +} + +// WithUID adds the uid to the v1 spectro clusters VM resume params +func (o *V1SpectroClustersVMResumeParams) WithUID(uid string) *V1SpectroClustersVMResumeParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 spectro clusters VM resume params +func (o *V1SpectroClustersVMResumeParams) SetUID(uid string) { + o.UID = uid +} + +// WithVMName adds the vMName to the v1 spectro clusters VM resume params +func (o *V1SpectroClustersVMResumeParams) WithVMName(vMName string) *V1SpectroClustersVMResumeParams { + o.SetVMName(vMName) + return o +} + +// SetVMName adds the vmName to the v1 spectro clusters VM resume params +func (o *V1SpectroClustersVMResumeParams) SetVMName(vMName string) { + o.VMName = vMName +} + +// WriteToRequest writes these params to a swagger request +func (o *V1SpectroClustersVMResumeParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // query param namespace + qrNamespace := o.Namespace + qNamespace := qrNamespace + if qNamespace != "" { + if err := r.SetQueryParam("namespace", qNamespace); err != nil { + return err + } + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + // path param vmName + if err := r.SetPathParam("vmName", o.VMName); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_vm_resume_responses.go b/api/client/v1/v1_spectro_clusters_vm_resume_responses.go new file mode 100644 index 00000000..37e7e9e8 --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_vm_resume_responses.go @@ -0,0 +1,61 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1SpectroClustersVMResumeReader is a Reader for the V1SpectroClustersVMResume structure. +type V1SpectroClustersVMResumeReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1SpectroClustersVMResumeReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1SpectroClustersVMResumeNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1SpectroClustersVMResumeNoContent creates a V1SpectroClustersVMResumeNoContent with default headers values +func NewV1SpectroClustersVMResumeNoContent() *V1SpectroClustersVMResumeNoContent { + return &V1SpectroClustersVMResumeNoContent{} +} + +/* +V1SpectroClustersVMResumeNoContent handles this case with default header values. + +Ok response without content +*/ +type V1SpectroClustersVMResumeNoContent struct { + /*Audit uid for the request + */ + AuditUID string +} + +func (o *V1SpectroClustersVMResumeNoContent) Error() string { + return fmt.Sprintf("[PUT /v1/spectroclusters/{uid}/vms/{vmName}/resume][%d] v1SpectroClustersVmResumeNoContent ", 204) +} + +func (o *V1SpectroClustersVMResumeNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header AuditUid + o.AuditUID = response.GetHeader("AuditUid") + + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_vm_start_parameters.go b/api/client/v1/v1_spectro_clusters_vm_start_parameters.go new file mode 100644 index 00000000..c517fcff --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_vm_start_parameters.go @@ -0,0 +1,182 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1SpectroClustersVMStartParams creates a new V1SpectroClustersVMStartParams object +// with the default values initialized. +func NewV1SpectroClustersVMStartParams() *V1SpectroClustersVMStartParams { + var () + return &V1SpectroClustersVMStartParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1SpectroClustersVMStartParamsWithTimeout creates a new V1SpectroClustersVMStartParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1SpectroClustersVMStartParamsWithTimeout(timeout time.Duration) *V1SpectroClustersVMStartParams { + var () + return &V1SpectroClustersVMStartParams{ + + timeout: timeout, + } +} + +// NewV1SpectroClustersVMStartParamsWithContext creates a new V1SpectroClustersVMStartParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1SpectroClustersVMStartParamsWithContext(ctx context.Context) *V1SpectroClustersVMStartParams { + var () + return &V1SpectroClustersVMStartParams{ + + Context: ctx, + } +} + +// NewV1SpectroClustersVMStartParamsWithHTTPClient creates a new V1SpectroClustersVMStartParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1SpectroClustersVMStartParamsWithHTTPClient(client *http.Client) *V1SpectroClustersVMStartParams { + var () + return &V1SpectroClustersVMStartParams{ + HTTPClient: client, + } +} + +/* +V1SpectroClustersVMStartParams contains all the parameters to send to the API endpoint +for the v1 spectro clusters VM start operation typically these are written to a http.Request +*/ +type V1SpectroClustersVMStartParams struct { + + /*Namespace + Namespace name + + */ + Namespace string + /*UID + Cluster uid + + */ + UID string + /*VMName + Virtual Machine name + + */ + VMName string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 spectro clusters VM start params +func (o *V1SpectroClustersVMStartParams) WithTimeout(timeout time.Duration) *V1SpectroClustersVMStartParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 spectro clusters VM start params +func (o *V1SpectroClustersVMStartParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 spectro clusters VM start params +func (o *V1SpectroClustersVMStartParams) WithContext(ctx context.Context) *V1SpectroClustersVMStartParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 spectro clusters VM start params +func (o *V1SpectroClustersVMStartParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 spectro clusters VM start params +func (o *V1SpectroClustersVMStartParams) WithHTTPClient(client *http.Client) *V1SpectroClustersVMStartParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 spectro clusters VM start params +func (o *V1SpectroClustersVMStartParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithNamespace adds the namespace to the v1 spectro clusters VM start params +func (o *V1SpectroClustersVMStartParams) WithNamespace(namespace string) *V1SpectroClustersVMStartParams { + o.SetNamespace(namespace) + return o +} + +// SetNamespace adds the namespace to the v1 spectro clusters VM start params +func (o *V1SpectroClustersVMStartParams) SetNamespace(namespace string) { + o.Namespace = namespace +} + +// WithUID adds the uid to the v1 spectro clusters VM start params +func (o *V1SpectroClustersVMStartParams) WithUID(uid string) *V1SpectroClustersVMStartParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 spectro clusters VM start params +func (o *V1SpectroClustersVMStartParams) SetUID(uid string) { + o.UID = uid +} + +// WithVMName adds the vMName to the v1 spectro clusters VM start params +func (o *V1SpectroClustersVMStartParams) WithVMName(vMName string) *V1SpectroClustersVMStartParams { + o.SetVMName(vMName) + return o +} + +// SetVMName adds the vmName to the v1 spectro clusters VM start params +func (o *V1SpectroClustersVMStartParams) SetVMName(vMName string) { + o.VMName = vMName +} + +// WriteToRequest writes these params to a swagger request +func (o *V1SpectroClustersVMStartParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // query param namespace + qrNamespace := o.Namespace + qNamespace := qrNamespace + if qNamespace != "" { + if err := r.SetQueryParam("namespace", qNamespace); err != nil { + return err + } + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + // path param vmName + if err := r.SetPathParam("vmName", o.VMName); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_vm_start_responses.go b/api/client/v1/v1_spectro_clusters_vm_start_responses.go new file mode 100644 index 00000000..d0c95262 --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_vm_start_responses.go @@ -0,0 +1,61 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1SpectroClustersVMStartReader is a Reader for the V1SpectroClustersVMStart structure. +type V1SpectroClustersVMStartReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1SpectroClustersVMStartReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1SpectroClustersVMStartNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1SpectroClustersVMStartNoContent creates a V1SpectroClustersVMStartNoContent with default headers values +func NewV1SpectroClustersVMStartNoContent() *V1SpectroClustersVMStartNoContent { + return &V1SpectroClustersVMStartNoContent{} +} + +/* +V1SpectroClustersVMStartNoContent handles this case with default header values. + +Ok response without content +*/ +type V1SpectroClustersVMStartNoContent struct { + /*Audit uid for the request + */ + AuditUID string +} + +func (o *V1SpectroClustersVMStartNoContent) Error() string { + return fmt.Sprintf("[PUT /v1/spectroclusters/{uid}/vms/{vmName}/start][%d] v1SpectroClustersVmStartNoContent ", 204) +} + +func (o *V1SpectroClustersVMStartNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header AuditUid + o.AuditUID = response.GetHeader("AuditUid") + + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_vm_stop_parameters.go b/api/client/v1/v1_spectro_clusters_vm_stop_parameters.go new file mode 100644 index 00000000..28f28b52 --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_vm_stop_parameters.go @@ -0,0 +1,182 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1SpectroClustersVMStopParams creates a new V1SpectroClustersVMStopParams object +// with the default values initialized. +func NewV1SpectroClustersVMStopParams() *V1SpectroClustersVMStopParams { + var () + return &V1SpectroClustersVMStopParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1SpectroClustersVMStopParamsWithTimeout creates a new V1SpectroClustersVMStopParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1SpectroClustersVMStopParamsWithTimeout(timeout time.Duration) *V1SpectroClustersVMStopParams { + var () + return &V1SpectroClustersVMStopParams{ + + timeout: timeout, + } +} + +// NewV1SpectroClustersVMStopParamsWithContext creates a new V1SpectroClustersVMStopParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1SpectroClustersVMStopParamsWithContext(ctx context.Context) *V1SpectroClustersVMStopParams { + var () + return &V1SpectroClustersVMStopParams{ + + Context: ctx, + } +} + +// NewV1SpectroClustersVMStopParamsWithHTTPClient creates a new V1SpectroClustersVMStopParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1SpectroClustersVMStopParamsWithHTTPClient(client *http.Client) *V1SpectroClustersVMStopParams { + var () + return &V1SpectroClustersVMStopParams{ + HTTPClient: client, + } +} + +/* +V1SpectroClustersVMStopParams contains all the parameters to send to the API endpoint +for the v1 spectro clusters VM stop operation typically these are written to a http.Request +*/ +type V1SpectroClustersVMStopParams struct { + + /*Namespace + Namespace name + + */ + Namespace string + /*UID + Cluster uid + + */ + UID string + /*VMName + Virtual Machine name + + */ + VMName string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 spectro clusters VM stop params +func (o *V1SpectroClustersVMStopParams) WithTimeout(timeout time.Duration) *V1SpectroClustersVMStopParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 spectro clusters VM stop params +func (o *V1SpectroClustersVMStopParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 spectro clusters VM stop params +func (o *V1SpectroClustersVMStopParams) WithContext(ctx context.Context) *V1SpectroClustersVMStopParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 spectro clusters VM stop params +func (o *V1SpectroClustersVMStopParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 spectro clusters VM stop params +func (o *V1SpectroClustersVMStopParams) WithHTTPClient(client *http.Client) *V1SpectroClustersVMStopParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 spectro clusters VM stop params +func (o *V1SpectroClustersVMStopParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithNamespace adds the namespace to the v1 spectro clusters VM stop params +func (o *V1SpectroClustersVMStopParams) WithNamespace(namespace string) *V1SpectroClustersVMStopParams { + o.SetNamespace(namespace) + return o +} + +// SetNamespace adds the namespace to the v1 spectro clusters VM stop params +func (o *V1SpectroClustersVMStopParams) SetNamespace(namespace string) { + o.Namespace = namespace +} + +// WithUID adds the uid to the v1 spectro clusters VM stop params +func (o *V1SpectroClustersVMStopParams) WithUID(uid string) *V1SpectroClustersVMStopParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 spectro clusters VM stop params +func (o *V1SpectroClustersVMStopParams) SetUID(uid string) { + o.UID = uid +} + +// WithVMName adds the vMName to the v1 spectro clusters VM stop params +func (o *V1SpectroClustersVMStopParams) WithVMName(vMName string) *V1SpectroClustersVMStopParams { + o.SetVMName(vMName) + return o +} + +// SetVMName adds the vmName to the v1 spectro clusters VM stop params +func (o *V1SpectroClustersVMStopParams) SetVMName(vMName string) { + o.VMName = vMName +} + +// WriteToRequest writes these params to a swagger request +func (o *V1SpectroClustersVMStopParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // query param namespace + qrNamespace := o.Namespace + qNamespace := qrNamespace + if qNamespace != "" { + if err := r.SetQueryParam("namespace", qNamespace); err != nil { + return err + } + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + // path param vmName + if err := r.SetPathParam("vmName", o.VMName); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_vm_stop_responses.go b/api/client/v1/v1_spectro_clusters_vm_stop_responses.go new file mode 100644 index 00000000..caae3203 --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_vm_stop_responses.go @@ -0,0 +1,61 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1SpectroClustersVMStopReader is a Reader for the V1SpectroClustersVMStop structure. +type V1SpectroClustersVMStopReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1SpectroClustersVMStopReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1SpectroClustersVMStopNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1SpectroClustersVMStopNoContent creates a V1SpectroClustersVMStopNoContent with default headers values +func NewV1SpectroClustersVMStopNoContent() *V1SpectroClustersVMStopNoContent { + return &V1SpectroClustersVMStopNoContent{} +} + +/* +V1SpectroClustersVMStopNoContent handles this case with default header values. + +Ok response without content +*/ +type V1SpectroClustersVMStopNoContent struct { + /*Audit uid for the request + */ + AuditUID string +} + +func (o *V1SpectroClustersVMStopNoContent) Error() string { + return fmt.Sprintf("[PUT /v1/spectroclusters/{uid}/vms/{vmName}/stop][%d] v1SpectroClustersVmStopNoContent ", 204) +} + +func (o *V1SpectroClustersVMStopNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header AuditUid + o.AuditUID = response.GetHeader("AuditUid") + + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_vm_update_parameters.go b/api/client/v1/v1_spectro_clusters_vm_update_parameters.go new file mode 100644 index 00000000..a62198c5 --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_vm_update_parameters.go @@ -0,0 +1,203 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1SpectroClustersVMUpdateParams creates a new V1SpectroClustersVMUpdateParams object +// with the default values initialized. +func NewV1SpectroClustersVMUpdateParams() *V1SpectroClustersVMUpdateParams { + var () + return &V1SpectroClustersVMUpdateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1SpectroClustersVMUpdateParamsWithTimeout creates a new V1SpectroClustersVMUpdateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1SpectroClustersVMUpdateParamsWithTimeout(timeout time.Duration) *V1SpectroClustersVMUpdateParams { + var () + return &V1SpectroClustersVMUpdateParams{ + + timeout: timeout, + } +} + +// NewV1SpectroClustersVMUpdateParamsWithContext creates a new V1SpectroClustersVMUpdateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1SpectroClustersVMUpdateParamsWithContext(ctx context.Context) *V1SpectroClustersVMUpdateParams { + var () + return &V1SpectroClustersVMUpdateParams{ + + Context: ctx, + } +} + +// NewV1SpectroClustersVMUpdateParamsWithHTTPClient creates a new V1SpectroClustersVMUpdateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1SpectroClustersVMUpdateParamsWithHTTPClient(client *http.Client) *V1SpectroClustersVMUpdateParams { + var () + return &V1SpectroClustersVMUpdateParams{ + HTTPClient: client, + } +} + +/* +V1SpectroClustersVMUpdateParams contains all the parameters to send to the API endpoint +for the v1 spectro clusters VM update operation typically these are written to a http.Request +*/ +type V1SpectroClustersVMUpdateParams struct { + + /*Body*/ + Body *models.V1ClusterVirtualMachine + /*Namespace + Namespace name + + */ + Namespace string + /*UID + Cluster uid + + */ + UID string + /*VMName + Virtual Machine name + + */ + VMName string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 spectro clusters VM update params +func (o *V1SpectroClustersVMUpdateParams) WithTimeout(timeout time.Duration) *V1SpectroClustersVMUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 spectro clusters VM update params +func (o *V1SpectroClustersVMUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 spectro clusters VM update params +func (o *V1SpectroClustersVMUpdateParams) WithContext(ctx context.Context) *V1SpectroClustersVMUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 spectro clusters VM update params +func (o *V1SpectroClustersVMUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 spectro clusters VM update params +func (o *V1SpectroClustersVMUpdateParams) WithHTTPClient(client *http.Client) *V1SpectroClustersVMUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 spectro clusters VM update params +func (o *V1SpectroClustersVMUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 spectro clusters VM update params +func (o *V1SpectroClustersVMUpdateParams) WithBody(body *models.V1ClusterVirtualMachine) *V1SpectroClustersVMUpdateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 spectro clusters VM update params +func (o *V1SpectroClustersVMUpdateParams) SetBody(body *models.V1ClusterVirtualMachine) { + o.Body = body +} + +// WithNamespace adds the namespace to the v1 spectro clusters VM update params +func (o *V1SpectroClustersVMUpdateParams) WithNamespace(namespace string) *V1SpectroClustersVMUpdateParams { + o.SetNamespace(namespace) + return o +} + +// SetNamespace adds the namespace to the v1 spectro clusters VM update params +func (o *V1SpectroClustersVMUpdateParams) SetNamespace(namespace string) { + o.Namespace = namespace +} + +// WithUID adds the uid to the v1 spectro clusters VM update params +func (o *V1SpectroClustersVMUpdateParams) WithUID(uid string) *V1SpectroClustersVMUpdateParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 spectro clusters VM update params +func (o *V1SpectroClustersVMUpdateParams) SetUID(uid string) { + o.UID = uid +} + +// WithVMName adds the vMName to the v1 spectro clusters VM update params +func (o *V1SpectroClustersVMUpdateParams) WithVMName(vMName string) *V1SpectroClustersVMUpdateParams { + o.SetVMName(vMName) + return o +} + +// SetVMName adds the vmName to the v1 spectro clusters VM update params +func (o *V1SpectroClustersVMUpdateParams) SetVMName(vMName string) { + o.VMName = vMName +} + +// WriteToRequest writes these params to a swagger request +func (o *V1SpectroClustersVMUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // query param namespace + qrNamespace := o.Namespace + qNamespace := qrNamespace + if qNamespace != "" { + if err := r.SetQueryParam("namespace", qNamespace); err != nil { + return err + } + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + // path param vmName + if err := r.SetPathParam("vmName", o.VMName); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_vm_update_responses.go b/api/client/v1/v1_spectro_clusters_vm_update_responses.go new file mode 100644 index 00000000..8fe85eb2 --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_vm_update_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1SpectroClustersVMUpdateReader is a Reader for the V1SpectroClustersVMUpdate structure. +type V1SpectroClustersVMUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1SpectroClustersVMUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1SpectroClustersVMUpdateOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1SpectroClustersVMUpdateOK creates a V1SpectroClustersVMUpdateOK with default headers values +func NewV1SpectroClustersVMUpdateOK() *V1SpectroClustersVMUpdateOK { + return &V1SpectroClustersVMUpdateOK{} +} + +/* +V1SpectroClustersVMUpdateOK handles this case with default header values. + +(empty) +*/ +type V1SpectroClustersVMUpdateOK struct { + Payload *models.V1ClusterVirtualMachine +} + +func (o *V1SpectroClustersVMUpdateOK) Error() string { + return fmt.Sprintf("[PUT /v1/spectroclusters/{uid}/vms/{vmName}][%d] v1SpectroClustersVmUpdateOK %+v", 200, o.Payload) +} + +func (o *V1SpectroClustersVMUpdateOK) GetPayload() *models.V1ClusterVirtualMachine { + return o.Payload +} + +func (o *V1SpectroClustersVMUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1ClusterVirtualMachine) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_vsphere_create_parameters.go b/api/client/v1/v1_spectro_clusters_vsphere_create_parameters.go new file mode 100644 index 00000000..c9a28feb --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_vsphere_create_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1SpectroClustersVsphereCreateParams creates a new V1SpectroClustersVsphereCreateParams object +// with the default values initialized. +func NewV1SpectroClustersVsphereCreateParams() *V1SpectroClustersVsphereCreateParams { + var () + return &V1SpectroClustersVsphereCreateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1SpectroClustersVsphereCreateParamsWithTimeout creates a new V1SpectroClustersVsphereCreateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1SpectroClustersVsphereCreateParamsWithTimeout(timeout time.Duration) *V1SpectroClustersVsphereCreateParams { + var () + return &V1SpectroClustersVsphereCreateParams{ + + timeout: timeout, + } +} + +// NewV1SpectroClustersVsphereCreateParamsWithContext creates a new V1SpectroClustersVsphereCreateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1SpectroClustersVsphereCreateParamsWithContext(ctx context.Context) *V1SpectroClustersVsphereCreateParams { + var () + return &V1SpectroClustersVsphereCreateParams{ + + Context: ctx, + } +} + +// NewV1SpectroClustersVsphereCreateParamsWithHTTPClient creates a new V1SpectroClustersVsphereCreateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1SpectroClustersVsphereCreateParamsWithHTTPClient(client *http.Client) *V1SpectroClustersVsphereCreateParams { + var () + return &V1SpectroClustersVsphereCreateParams{ + HTTPClient: client, + } +} + +/* +V1SpectroClustersVsphereCreateParams contains all the parameters to send to the API endpoint +for the v1 spectro clusters vsphere create operation typically these are written to a http.Request +*/ +type V1SpectroClustersVsphereCreateParams struct { + + /*Body*/ + Body *models.V1SpectroVsphereClusterEntity + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 spectro clusters vsphere create params +func (o *V1SpectroClustersVsphereCreateParams) WithTimeout(timeout time.Duration) *V1SpectroClustersVsphereCreateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 spectro clusters vsphere create params +func (o *V1SpectroClustersVsphereCreateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 spectro clusters vsphere create params +func (o *V1SpectroClustersVsphereCreateParams) WithContext(ctx context.Context) *V1SpectroClustersVsphereCreateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 spectro clusters vsphere create params +func (o *V1SpectroClustersVsphereCreateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 spectro clusters vsphere create params +func (o *V1SpectroClustersVsphereCreateParams) WithHTTPClient(client *http.Client) *V1SpectroClustersVsphereCreateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 spectro clusters vsphere create params +func (o *V1SpectroClustersVsphereCreateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 spectro clusters vsphere create params +func (o *V1SpectroClustersVsphereCreateParams) WithBody(body *models.V1SpectroVsphereClusterEntity) *V1SpectroClustersVsphereCreateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 spectro clusters vsphere create params +func (o *V1SpectroClustersVsphereCreateParams) SetBody(body *models.V1SpectroVsphereClusterEntity) { + o.Body = body +} + +// WriteToRequest writes these params to a swagger request +func (o *V1SpectroClustersVsphereCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_vsphere_create_responses.go b/api/client/v1/v1_spectro_clusters_vsphere_create_responses.go new file mode 100644 index 00000000..53051ef8 --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_vsphere_create_responses.go @@ -0,0 +1,77 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1SpectroClustersVsphereCreateReader is a Reader for the V1SpectroClustersVsphereCreate structure. +type V1SpectroClustersVsphereCreateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1SpectroClustersVsphereCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 201: + result := NewV1SpectroClustersVsphereCreateCreated() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1SpectroClustersVsphereCreateCreated creates a V1SpectroClustersVsphereCreateCreated with default headers values +func NewV1SpectroClustersVsphereCreateCreated() *V1SpectroClustersVsphereCreateCreated { + return &V1SpectroClustersVsphereCreateCreated{} +} + +/* +V1SpectroClustersVsphereCreateCreated handles this case with default header values. + +Created successfully +*/ +type V1SpectroClustersVsphereCreateCreated struct { + /*Audit uid for the request + */ + AuditUID string + + Payload *models.V1UID +} + +func (o *V1SpectroClustersVsphereCreateCreated) Error() string { + return fmt.Sprintf("[POST /v1/spectroclusters/vsphere][%d] v1SpectroClustersVsphereCreateCreated %+v", 201, o.Payload) +} + +func (o *V1SpectroClustersVsphereCreateCreated) GetPayload() *models.V1UID { + return o.Payload +} + +func (o *V1SpectroClustersVsphereCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header AuditUid + o.AuditUID = response.GetHeader("AuditUid") + + o.Payload = new(models.V1UID) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_vsphere_import_parameters.go b/api/client/v1/v1_spectro_clusters_vsphere_import_parameters.go new file mode 100644 index 00000000..09f1ee8d --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_vsphere_import_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1SpectroClustersVsphereImportParams creates a new V1SpectroClustersVsphereImportParams object +// with the default values initialized. +func NewV1SpectroClustersVsphereImportParams() *V1SpectroClustersVsphereImportParams { + var () + return &V1SpectroClustersVsphereImportParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1SpectroClustersVsphereImportParamsWithTimeout creates a new V1SpectroClustersVsphereImportParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1SpectroClustersVsphereImportParamsWithTimeout(timeout time.Duration) *V1SpectroClustersVsphereImportParams { + var () + return &V1SpectroClustersVsphereImportParams{ + + timeout: timeout, + } +} + +// NewV1SpectroClustersVsphereImportParamsWithContext creates a new V1SpectroClustersVsphereImportParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1SpectroClustersVsphereImportParamsWithContext(ctx context.Context) *V1SpectroClustersVsphereImportParams { + var () + return &V1SpectroClustersVsphereImportParams{ + + Context: ctx, + } +} + +// NewV1SpectroClustersVsphereImportParamsWithHTTPClient creates a new V1SpectroClustersVsphereImportParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1SpectroClustersVsphereImportParamsWithHTTPClient(client *http.Client) *V1SpectroClustersVsphereImportParams { + var () + return &V1SpectroClustersVsphereImportParams{ + HTTPClient: client, + } +} + +/* +V1SpectroClustersVsphereImportParams contains all the parameters to send to the API endpoint +for the v1 spectro clusters vsphere import operation typically these are written to a http.Request +*/ +type V1SpectroClustersVsphereImportParams struct { + + /*Body*/ + Body *models.V1SpectroVsphereClusterImportEntity + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 spectro clusters vsphere import params +func (o *V1SpectroClustersVsphereImportParams) WithTimeout(timeout time.Duration) *V1SpectroClustersVsphereImportParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 spectro clusters vsphere import params +func (o *V1SpectroClustersVsphereImportParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 spectro clusters vsphere import params +func (o *V1SpectroClustersVsphereImportParams) WithContext(ctx context.Context) *V1SpectroClustersVsphereImportParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 spectro clusters vsphere import params +func (o *V1SpectroClustersVsphereImportParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 spectro clusters vsphere import params +func (o *V1SpectroClustersVsphereImportParams) WithHTTPClient(client *http.Client) *V1SpectroClustersVsphereImportParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 spectro clusters vsphere import params +func (o *V1SpectroClustersVsphereImportParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 spectro clusters vsphere import params +func (o *V1SpectroClustersVsphereImportParams) WithBody(body *models.V1SpectroVsphereClusterImportEntity) *V1SpectroClustersVsphereImportParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 spectro clusters vsphere import params +func (o *V1SpectroClustersVsphereImportParams) SetBody(body *models.V1SpectroVsphereClusterImportEntity) { + o.Body = body +} + +// WriteToRequest writes these params to a swagger request +func (o *V1SpectroClustersVsphereImportParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_vsphere_import_responses.go b/api/client/v1/v1_spectro_clusters_vsphere_import_responses.go new file mode 100644 index 00000000..e763b11e --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_vsphere_import_responses.go @@ -0,0 +1,77 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1SpectroClustersVsphereImportReader is a Reader for the V1SpectroClustersVsphereImport structure. +type V1SpectroClustersVsphereImportReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1SpectroClustersVsphereImportReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 201: + result := NewV1SpectroClustersVsphereImportCreated() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1SpectroClustersVsphereImportCreated creates a V1SpectroClustersVsphereImportCreated with default headers values +func NewV1SpectroClustersVsphereImportCreated() *V1SpectroClustersVsphereImportCreated { + return &V1SpectroClustersVsphereImportCreated{} +} + +/* +V1SpectroClustersVsphereImportCreated handles this case with default header values. + +Created successfully +*/ +type V1SpectroClustersVsphereImportCreated struct { + /*Audit uid for the request + */ + AuditUID string + + Payload *models.V1UID +} + +func (o *V1SpectroClustersVsphereImportCreated) Error() string { + return fmt.Sprintf("[POST /v1/spectroclusters/vsphere/import][%d] v1SpectroClustersVsphereImportCreated %+v", 201, o.Payload) +} + +func (o *V1SpectroClustersVsphereImportCreated) GetPayload() *models.V1UID { + return o.Payload +} + +func (o *V1SpectroClustersVsphereImportCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header AuditUid + o.AuditUID = response.GetHeader("AuditUid") + + o.Payload = new(models.V1UID) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_vsphere_rate_parameters.go b/api/client/v1/v1_spectro_clusters_vsphere_rate_parameters.go new file mode 100644 index 00000000..18317db7 --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_vsphere_rate_parameters.go @@ -0,0 +1,177 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1SpectroClustersVsphereRateParams creates a new V1SpectroClustersVsphereRateParams object +// with the default values initialized. +func NewV1SpectroClustersVsphereRateParams() *V1SpectroClustersVsphereRateParams { + var ( + periodTypeDefault = string("hourly") + ) + return &V1SpectroClustersVsphereRateParams{ + PeriodType: &periodTypeDefault, + + timeout: cr.DefaultTimeout, + } +} + +// NewV1SpectroClustersVsphereRateParamsWithTimeout creates a new V1SpectroClustersVsphereRateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1SpectroClustersVsphereRateParamsWithTimeout(timeout time.Duration) *V1SpectroClustersVsphereRateParams { + var ( + periodTypeDefault = string("hourly") + ) + return &V1SpectroClustersVsphereRateParams{ + PeriodType: &periodTypeDefault, + + timeout: timeout, + } +} + +// NewV1SpectroClustersVsphereRateParamsWithContext creates a new V1SpectroClustersVsphereRateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1SpectroClustersVsphereRateParamsWithContext(ctx context.Context) *V1SpectroClustersVsphereRateParams { + var ( + periodTypeDefault = string("hourly") + ) + return &V1SpectroClustersVsphereRateParams{ + PeriodType: &periodTypeDefault, + + Context: ctx, + } +} + +// NewV1SpectroClustersVsphereRateParamsWithHTTPClient creates a new V1SpectroClustersVsphereRateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1SpectroClustersVsphereRateParamsWithHTTPClient(client *http.Client) *V1SpectroClustersVsphereRateParams { + var ( + periodTypeDefault = string("hourly") + ) + return &V1SpectroClustersVsphereRateParams{ + PeriodType: &periodTypeDefault, + HTTPClient: client, + } +} + +/* +V1SpectroClustersVsphereRateParams contains all the parameters to send to the API endpoint +for the v1 spectro clusters vsphere rate operation typically these are written to a http.Request +*/ +type V1SpectroClustersVsphereRateParams struct { + + /*Body*/ + Body *models.V1SpectroVsphereClusterRateEntity + /*PeriodType*/ + PeriodType *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 spectro clusters vsphere rate params +func (o *V1SpectroClustersVsphereRateParams) WithTimeout(timeout time.Duration) *V1SpectroClustersVsphereRateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 spectro clusters vsphere rate params +func (o *V1SpectroClustersVsphereRateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 spectro clusters vsphere rate params +func (o *V1SpectroClustersVsphereRateParams) WithContext(ctx context.Context) *V1SpectroClustersVsphereRateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 spectro clusters vsphere rate params +func (o *V1SpectroClustersVsphereRateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 spectro clusters vsphere rate params +func (o *V1SpectroClustersVsphereRateParams) WithHTTPClient(client *http.Client) *V1SpectroClustersVsphereRateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 spectro clusters vsphere rate params +func (o *V1SpectroClustersVsphereRateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 spectro clusters vsphere rate params +func (o *V1SpectroClustersVsphereRateParams) WithBody(body *models.V1SpectroVsphereClusterRateEntity) *V1SpectroClustersVsphereRateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 spectro clusters vsphere rate params +func (o *V1SpectroClustersVsphereRateParams) SetBody(body *models.V1SpectroVsphereClusterRateEntity) { + o.Body = body +} + +// WithPeriodType adds the periodType to the v1 spectro clusters vsphere rate params +func (o *V1SpectroClustersVsphereRateParams) WithPeriodType(periodType *string) *V1SpectroClustersVsphereRateParams { + o.SetPeriodType(periodType) + return o +} + +// SetPeriodType adds the periodType to the v1 spectro clusters vsphere rate params +func (o *V1SpectroClustersVsphereRateParams) SetPeriodType(periodType *string) { + o.PeriodType = periodType +} + +// WriteToRequest writes these params to a swagger request +func (o *V1SpectroClustersVsphereRateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + if o.PeriodType != nil { + + // query param periodType + var qrPeriodType string + if o.PeriodType != nil { + qrPeriodType = *o.PeriodType + } + qPeriodType := qrPeriodType + if qPeriodType != "" { + if err := r.SetQueryParam("periodType", qPeriodType); err != nil { + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_vsphere_rate_responses.go b/api/client/v1/v1_spectro_clusters_vsphere_rate_responses.go new file mode 100644 index 00000000..1c754a70 --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_vsphere_rate_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1SpectroClustersVsphereRateReader is a Reader for the V1SpectroClustersVsphereRate structure. +type V1SpectroClustersVsphereRateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1SpectroClustersVsphereRateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1SpectroClustersVsphereRateOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1SpectroClustersVsphereRateOK creates a V1SpectroClustersVsphereRateOK with default headers values +func NewV1SpectroClustersVsphereRateOK() *V1SpectroClustersVsphereRateOK { + return &V1SpectroClustersVsphereRateOK{} +} + +/* +V1SpectroClustersVsphereRateOK handles this case with default header values. + +Vsphere Cluster estimated rate response +*/ +type V1SpectroClustersVsphereRateOK struct { + Payload *models.V1SpectroClusterRate +} + +func (o *V1SpectroClustersVsphereRateOK) Error() string { + return fmt.Sprintf("[POST /v1/spectroclusters/vsphere/rate][%d] v1SpectroClustersVsphereRateOK %+v", 200, o.Payload) +} + +func (o *V1SpectroClustersVsphereRateOK) GetPayload() *models.V1SpectroClusterRate { + return o.Payload +} + +func (o *V1SpectroClustersVsphereRateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1SpectroClusterRate) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_vsphere_validate_parameters.go b/api/client/v1/v1_spectro_clusters_vsphere_validate_parameters.go new file mode 100644 index 00000000..ce89976f --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_vsphere_validate_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1SpectroClustersVsphereValidateParams creates a new V1SpectroClustersVsphereValidateParams object +// with the default values initialized. +func NewV1SpectroClustersVsphereValidateParams() *V1SpectroClustersVsphereValidateParams { + var () + return &V1SpectroClustersVsphereValidateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1SpectroClustersVsphereValidateParamsWithTimeout creates a new V1SpectroClustersVsphereValidateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1SpectroClustersVsphereValidateParamsWithTimeout(timeout time.Duration) *V1SpectroClustersVsphereValidateParams { + var () + return &V1SpectroClustersVsphereValidateParams{ + + timeout: timeout, + } +} + +// NewV1SpectroClustersVsphereValidateParamsWithContext creates a new V1SpectroClustersVsphereValidateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1SpectroClustersVsphereValidateParamsWithContext(ctx context.Context) *V1SpectroClustersVsphereValidateParams { + var () + return &V1SpectroClustersVsphereValidateParams{ + + Context: ctx, + } +} + +// NewV1SpectroClustersVsphereValidateParamsWithHTTPClient creates a new V1SpectroClustersVsphereValidateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1SpectroClustersVsphereValidateParamsWithHTTPClient(client *http.Client) *V1SpectroClustersVsphereValidateParams { + var () + return &V1SpectroClustersVsphereValidateParams{ + HTTPClient: client, + } +} + +/* +V1SpectroClustersVsphereValidateParams contains all the parameters to send to the API endpoint +for the v1 spectro clusters vsphere validate operation typically these are written to a http.Request +*/ +type V1SpectroClustersVsphereValidateParams struct { + + /*Body*/ + Body *models.V1SpectroVsphereClusterEntity + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 spectro clusters vsphere validate params +func (o *V1SpectroClustersVsphereValidateParams) WithTimeout(timeout time.Duration) *V1SpectroClustersVsphereValidateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 spectro clusters vsphere validate params +func (o *V1SpectroClustersVsphereValidateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 spectro clusters vsphere validate params +func (o *V1SpectroClustersVsphereValidateParams) WithContext(ctx context.Context) *V1SpectroClustersVsphereValidateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 spectro clusters vsphere validate params +func (o *V1SpectroClustersVsphereValidateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 spectro clusters vsphere validate params +func (o *V1SpectroClustersVsphereValidateParams) WithHTTPClient(client *http.Client) *V1SpectroClustersVsphereValidateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 spectro clusters vsphere validate params +func (o *V1SpectroClustersVsphereValidateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 spectro clusters vsphere validate params +func (o *V1SpectroClustersVsphereValidateParams) WithBody(body *models.V1SpectroVsphereClusterEntity) *V1SpectroClustersVsphereValidateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 spectro clusters vsphere validate params +func (o *V1SpectroClustersVsphereValidateParams) SetBody(body *models.V1SpectroVsphereClusterEntity) { + o.Body = body +} + +// WriteToRequest writes these params to a swagger request +func (o *V1SpectroClustersVsphereValidateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_spectro_clusters_vsphere_validate_responses.go b/api/client/v1/v1_spectro_clusters_vsphere_validate_responses.go new file mode 100644 index 00000000..0b194c9b --- /dev/null +++ b/api/client/v1/v1_spectro_clusters_vsphere_validate_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1SpectroClustersVsphereValidateReader is a Reader for the V1SpectroClustersVsphereValidate structure. +type V1SpectroClustersVsphereValidateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1SpectroClustersVsphereValidateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1SpectroClustersVsphereValidateOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1SpectroClustersVsphereValidateOK creates a V1SpectroClustersVsphereValidateOK with default headers values +func NewV1SpectroClustersVsphereValidateOK() *V1SpectroClustersVsphereValidateOK { + return &V1SpectroClustersVsphereValidateOK{} +} + +/* +V1SpectroClustersVsphereValidateOK handles this case with default header values. + +vSphere Cluster validation response +*/ +type V1SpectroClustersVsphereValidateOK struct { + Payload *models.V1SpectroClusterValidatorResponse +} + +func (o *V1SpectroClustersVsphereValidateOK) Error() string { + return fmt.Sprintf("[POST /v1/spectroclusters/vsphere/validate][%d] v1SpectroClustersVsphereValidateOK %+v", 200, o.Payload) +} + +func (o *V1SpectroClustersVsphereValidateOK) GetPayload() *models.V1SpectroClusterValidatorResponse { + return o.Payload +} + +func (o *V1SpectroClustersVsphereValidateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1SpectroClusterValidatorResponse) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_sso_callback_parameters.go b/api/client/v1/v1_sso_callback_parameters.go new file mode 100644 index 00000000..08b74927 --- /dev/null +++ b/api/client/v1/v1_sso_callback_parameters.go @@ -0,0 +1,264 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1SsoCallbackParams creates a new V1SsoCallbackParams object +// with the default values initialized. +func NewV1SsoCallbackParams() *V1SsoCallbackParams { + var () + return &V1SsoCallbackParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1SsoCallbackParamsWithTimeout creates a new V1SsoCallbackParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1SsoCallbackParamsWithTimeout(timeout time.Duration) *V1SsoCallbackParams { + var () + return &V1SsoCallbackParams{ + + timeout: timeout, + } +} + +// NewV1SsoCallbackParamsWithContext creates a new V1SsoCallbackParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1SsoCallbackParamsWithContext(ctx context.Context) *V1SsoCallbackParams { + var () + return &V1SsoCallbackParams{ + + Context: ctx, + } +} + +// NewV1SsoCallbackParamsWithHTTPClient creates a new V1SsoCallbackParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1SsoCallbackParamsWithHTTPClient(client *http.Client) *V1SsoCallbackParams { + var () + return &V1SsoCallbackParams{ + HTTPClient: client, + } +} + +/* +V1SsoCallbackParams contains all the parameters to send to the API endpoint +for the v1 sso callback operation typically these are written to a http.Request +*/ +type V1SsoCallbackParams struct { + + /*Code + Describes temporary and very short lived code sent by IDP to validate the token + + */ + Code *string + /*Error + Describes a error code in case the IDP is not able to validate and authenticates the user + + */ + Error *string + /*ErrorDescription + Describes a error in case the IDP is not able to validate and authenticates the user + + */ + ErrorDescription *string + /*SsoApp + Describes the sso app use to login into the system + + */ + SsoApp string + /*State + Describes a state to validate and associate request and response + + */ + State *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 sso callback params +func (o *V1SsoCallbackParams) WithTimeout(timeout time.Duration) *V1SsoCallbackParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 sso callback params +func (o *V1SsoCallbackParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 sso callback params +func (o *V1SsoCallbackParams) WithContext(ctx context.Context) *V1SsoCallbackParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 sso callback params +func (o *V1SsoCallbackParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 sso callback params +func (o *V1SsoCallbackParams) WithHTTPClient(client *http.Client) *V1SsoCallbackParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 sso callback params +func (o *V1SsoCallbackParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithCode adds the code to the v1 sso callback params +func (o *V1SsoCallbackParams) WithCode(code *string) *V1SsoCallbackParams { + o.SetCode(code) + return o +} + +// SetCode adds the code to the v1 sso callback params +func (o *V1SsoCallbackParams) SetCode(code *string) { + o.Code = code +} + +// WithError adds the error to the v1 sso callback params +func (o *V1SsoCallbackParams) WithError(error *string) *V1SsoCallbackParams { + o.SetError(error) + return o +} + +// SetError adds the error to the v1 sso callback params +func (o *V1SsoCallbackParams) SetError(error *string) { + o.Error = error +} + +// WithErrorDescription adds the errorDescription to the v1 sso callback params +func (o *V1SsoCallbackParams) WithErrorDescription(errorDescription *string) *V1SsoCallbackParams { + o.SetErrorDescription(errorDescription) + return o +} + +// SetErrorDescription adds the errorDescription to the v1 sso callback params +func (o *V1SsoCallbackParams) SetErrorDescription(errorDescription *string) { + o.ErrorDescription = errorDescription +} + +// WithSsoApp adds the ssoApp to the v1 sso callback params +func (o *V1SsoCallbackParams) WithSsoApp(ssoApp string) *V1SsoCallbackParams { + o.SetSsoApp(ssoApp) + return o +} + +// SetSsoApp adds the ssoApp to the v1 sso callback params +func (o *V1SsoCallbackParams) SetSsoApp(ssoApp string) { + o.SsoApp = ssoApp +} + +// WithState adds the state to the v1 sso callback params +func (o *V1SsoCallbackParams) WithState(state *string) *V1SsoCallbackParams { + o.SetState(state) + return o +} + +// SetState adds the state to the v1 sso callback params +func (o *V1SsoCallbackParams) SetState(state *string) { + o.State = state +} + +// WriteToRequest writes these params to a swagger request +func (o *V1SsoCallbackParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Code != nil { + + // query param code + var qrCode string + if o.Code != nil { + qrCode = *o.Code + } + qCode := qrCode + if qCode != "" { + if err := r.SetQueryParam("code", qCode); err != nil { + return err + } + } + + } + + if o.Error != nil { + + // query param error + var qrError string + if o.Error != nil { + qrError = *o.Error + } + qError := qrError + if qError != "" { + if err := r.SetQueryParam("error", qError); err != nil { + return err + } + } + + } + + if o.ErrorDescription != nil { + + // query param error_description + var qrErrorDescription string + if o.ErrorDescription != nil { + qrErrorDescription = *o.ErrorDescription + } + qErrorDescription := qrErrorDescription + if qErrorDescription != "" { + if err := r.SetQueryParam("error_description", qErrorDescription); err != nil { + return err + } + } + + } + + // path param ssoApp + if err := r.SetPathParam("ssoApp", o.SsoApp); err != nil { + return err + } + + if o.State != nil { + + // query param state + var qrState string + if o.State != nil { + qrState = *o.State + } + qState := qrState + if qState != "" { + if err := r.SetQueryParam("state", qState); err != nil { + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_sso_callback_responses.go b/api/client/v1/v1_sso_callback_responses.go new file mode 100644 index 00000000..0222d47d --- /dev/null +++ b/api/client/v1/v1_sso_callback_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1SsoCallbackReader is a Reader for the V1SsoCallback structure. +type V1SsoCallbackReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1SsoCallbackReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1SsoCallbackOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1SsoCallbackOK creates a V1SsoCallbackOK with default headers values +func NewV1SsoCallbackOK() *V1SsoCallbackOK { + return &V1SsoCallbackOK{} +} + +/* +V1SsoCallbackOK handles this case with default header values. + +OK +*/ +type V1SsoCallbackOK struct { + Payload *models.V1UserToken +} + +func (o *V1SsoCallbackOK) Error() string { + return fmt.Sprintf("[GET /v1/auth/sso/{ssoApp}/callback][%d] v1SsoCallbackOK %+v", 200, o.Payload) +} + +func (o *V1SsoCallbackOK) GetPayload() *models.V1UserToken { + return o.Payload +} + +func (o *V1SsoCallbackOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1UserToken) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_sso_idps_parameters.go b/api/client/v1/v1_sso_idps_parameters.go new file mode 100644 index 00000000..66f0d624 --- /dev/null +++ b/api/client/v1/v1_sso_idps_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1SsoIdpsParams creates a new V1SsoIdpsParams object +// with the default values initialized. +func NewV1SsoIdpsParams() *V1SsoIdpsParams { + + return &V1SsoIdpsParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1SsoIdpsParamsWithTimeout creates a new V1SsoIdpsParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1SsoIdpsParamsWithTimeout(timeout time.Duration) *V1SsoIdpsParams { + + return &V1SsoIdpsParams{ + + timeout: timeout, + } +} + +// NewV1SsoIdpsParamsWithContext creates a new V1SsoIdpsParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1SsoIdpsParamsWithContext(ctx context.Context) *V1SsoIdpsParams { + + return &V1SsoIdpsParams{ + + Context: ctx, + } +} + +// NewV1SsoIdpsParamsWithHTTPClient creates a new V1SsoIdpsParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1SsoIdpsParamsWithHTTPClient(client *http.Client) *V1SsoIdpsParams { + + return &V1SsoIdpsParams{ + HTTPClient: client, + } +} + +/* +V1SsoIdpsParams contains all the parameters to send to the API endpoint +for the v1 sso idps operation typically these are written to a http.Request +*/ +type V1SsoIdpsParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 sso idps params +func (o *V1SsoIdpsParams) WithTimeout(timeout time.Duration) *V1SsoIdpsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 sso idps params +func (o *V1SsoIdpsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 sso idps params +func (o *V1SsoIdpsParams) WithContext(ctx context.Context) *V1SsoIdpsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 sso idps params +func (o *V1SsoIdpsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 sso idps params +func (o *V1SsoIdpsParams) WithHTTPClient(client *http.Client) *V1SsoIdpsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 sso idps params +func (o *V1SsoIdpsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *V1SsoIdpsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_sso_idps_responses.go b/api/client/v1/v1_sso_idps_responses.go new file mode 100644 index 00000000..99dfa5ea --- /dev/null +++ b/api/client/v1/v1_sso_idps_responses.go @@ -0,0 +1,68 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1SsoIdpsReader is a Reader for the V1SsoIdps structure. +type V1SsoIdpsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1SsoIdpsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1SsoIdpsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1SsoIdpsOK creates a V1SsoIdpsOK with default headers values +func NewV1SsoIdpsOK() *V1SsoIdpsOK { + return &V1SsoIdpsOK{} +} + +/* +V1SsoIdpsOK handles this case with default header values. + +(empty) +*/ +type V1SsoIdpsOK struct { + Payload models.V1IdentityProviders +} + +func (o *V1SsoIdpsOK) Error() string { + return fmt.Sprintf("[GET /v1/auth/sso/idps][%d] v1SsoIdpsOK %+v", 200, o.Payload) +} + +func (o *V1SsoIdpsOK) GetPayload() models.V1IdentityProviders { + return o.Payload +} + +func (o *V1SsoIdpsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_sso_logins_parameters.go b/api/client/v1/v1_sso_logins_parameters.go new file mode 100644 index 00000000..b4e39b55 --- /dev/null +++ b/api/client/v1/v1_sso_logins_parameters.go @@ -0,0 +1,144 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1SsoLoginsParams creates a new V1SsoLoginsParams object +// with the default values initialized. +func NewV1SsoLoginsParams() *V1SsoLoginsParams { + var () + return &V1SsoLoginsParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1SsoLoginsParamsWithTimeout creates a new V1SsoLoginsParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1SsoLoginsParamsWithTimeout(timeout time.Duration) *V1SsoLoginsParams { + var () + return &V1SsoLoginsParams{ + + timeout: timeout, + } +} + +// NewV1SsoLoginsParamsWithContext creates a new V1SsoLoginsParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1SsoLoginsParamsWithContext(ctx context.Context) *V1SsoLoginsParams { + var () + return &V1SsoLoginsParams{ + + Context: ctx, + } +} + +// NewV1SsoLoginsParamsWithHTTPClient creates a new V1SsoLoginsParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1SsoLoginsParamsWithHTTPClient(client *http.Client) *V1SsoLoginsParams { + var () + return &V1SsoLoginsParams{ + HTTPClient: client, + } +} + +/* +V1SsoLoginsParams contains all the parameters to send to the API endpoint +for the v1 sso logins operation typically these are written to a http.Request +*/ +type V1SsoLoginsParams struct { + + /*Org*/ + Org *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 sso logins params +func (o *V1SsoLoginsParams) WithTimeout(timeout time.Duration) *V1SsoLoginsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 sso logins params +func (o *V1SsoLoginsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 sso logins params +func (o *V1SsoLoginsParams) WithContext(ctx context.Context) *V1SsoLoginsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 sso logins params +func (o *V1SsoLoginsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 sso logins params +func (o *V1SsoLoginsParams) WithHTTPClient(client *http.Client) *V1SsoLoginsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 sso logins params +func (o *V1SsoLoginsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithOrg adds the org to the v1 sso logins params +func (o *V1SsoLoginsParams) WithOrg(org *string) *V1SsoLoginsParams { + o.SetOrg(org) + return o +} + +// SetOrg adds the org to the v1 sso logins params +func (o *V1SsoLoginsParams) SetOrg(org *string) { + o.Org = org +} + +// WriteToRequest writes these params to a swagger request +func (o *V1SsoLoginsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Org != nil { + + // query param org + var qrOrg string + if o.Org != nil { + qrOrg = *o.Org + } + qOrg := qrOrg + if qOrg != "" { + if err := r.SetQueryParam("org", qOrg); err != nil { + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_sso_logins_responses.go b/api/client/v1/v1_sso_logins_responses.go new file mode 100644 index 00000000..d98e8a1f --- /dev/null +++ b/api/client/v1/v1_sso_logins_responses.go @@ -0,0 +1,68 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1SsoLoginsReader is a Reader for the V1SsoLogins structure. +type V1SsoLoginsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1SsoLoginsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1SsoLoginsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1SsoLoginsOK creates a V1SsoLoginsOK with default headers values +func NewV1SsoLoginsOK() *V1SsoLoginsOK { + return &V1SsoLoginsOK{} +} + +/* +V1SsoLoginsOK handles this case with default header values. + +(empty) +*/ +type V1SsoLoginsOK struct { + Payload models.V1SsoLogins +} + +func (o *V1SsoLoginsOK) Error() string { + return fmt.Sprintf("[GET /v1/auth/sso/logins][%d] v1SsoLoginsOK %+v", 200, o.Payload) +} + +func (o *V1SsoLoginsOK) GetPayload() models.V1SsoLogins { + return o.Payload +} + +func (o *V1SsoLoginsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_syft_scan_log_image_s_b_o_m_get_parameters.go b/api/client/v1/v1_syft_scan_log_image_s_b_o_m_get_parameters.go new file mode 100644 index 00000000..20d43fd2 --- /dev/null +++ b/api/client/v1/v1_syft_scan_log_image_s_b_o_m_get_parameters.go @@ -0,0 +1,173 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1SyftScanLogImageSBOMGetParams creates a new V1SyftScanLogImageSBOMGetParams object +// with the default values initialized. +func NewV1SyftScanLogImageSBOMGetParams() *V1SyftScanLogImageSBOMGetParams { + var () + return &V1SyftScanLogImageSBOMGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1SyftScanLogImageSBOMGetParamsWithTimeout creates a new V1SyftScanLogImageSBOMGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1SyftScanLogImageSBOMGetParamsWithTimeout(timeout time.Duration) *V1SyftScanLogImageSBOMGetParams { + var () + return &V1SyftScanLogImageSBOMGetParams{ + + timeout: timeout, + } +} + +// NewV1SyftScanLogImageSBOMGetParamsWithContext creates a new V1SyftScanLogImageSBOMGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1SyftScanLogImageSBOMGetParamsWithContext(ctx context.Context) *V1SyftScanLogImageSBOMGetParams { + var () + return &V1SyftScanLogImageSBOMGetParams{ + + Context: ctx, + } +} + +// NewV1SyftScanLogImageSBOMGetParamsWithHTTPClient creates a new V1SyftScanLogImageSBOMGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1SyftScanLogImageSBOMGetParamsWithHTTPClient(client *http.Client) *V1SyftScanLogImageSBOMGetParams { + var () + return &V1SyftScanLogImageSBOMGetParams{ + HTTPClient: client, + } +} + +/* +V1SyftScanLogImageSBOMGetParams contains all the parameters to send to the API endpoint +for the v1 syft scan log image s b o m get operation typically these are written to a http.Request +*/ +type V1SyftScanLogImageSBOMGetParams struct { + + /*Image*/ + Image string + /*LogUID*/ + LogUID string + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 syft scan log image s b o m get params +func (o *V1SyftScanLogImageSBOMGetParams) WithTimeout(timeout time.Duration) *V1SyftScanLogImageSBOMGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 syft scan log image s b o m get params +func (o *V1SyftScanLogImageSBOMGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 syft scan log image s b o m get params +func (o *V1SyftScanLogImageSBOMGetParams) WithContext(ctx context.Context) *V1SyftScanLogImageSBOMGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 syft scan log image s b o m get params +func (o *V1SyftScanLogImageSBOMGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 syft scan log image s b o m get params +func (o *V1SyftScanLogImageSBOMGetParams) WithHTTPClient(client *http.Client) *V1SyftScanLogImageSBOMGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 syft scan log image s b o m get params +func (o *V1SyftScanLogImageSBOMGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithImage adds the image to the v1 syft scan log image s b o m get params +func (o *V1SyftScanLogImageSBOMGetParams) WithImage(image string) *V1SyftScanLogImageSBOMGetParams { + o.SetImage(image) + return o +} + +// SetImage adds the image to the v1 syft scan log image s b o m get params +func (o *V1SyftScanLogImageSBOMGetParams) SetImage(image string) { + o.Image = image +} + +// WithLogUID adds the logUID to the v1 syft scan log image s b o m get params +func (o *V1SyftScanLogImageSBOMGetParams) WithLogUID(logUID string) *V1SyftScanLogImageSBOMGetParams { + o.SetLogUID(logUID) + return o +} + +// SetLogUID adds the logUid to the v1 syft scan log image s b o m get params +func (o *V1SyftScanLogImageSBOMGetParams) SetLogUID(logUID string) { + o.LogUID = logUID +} + +// WithUID adds the uid to the v1 syft scan log image s b o m get params +func (o *V1SyftScanLogImageSBOMGetParams) WithUID(uid string) *V1SyftScanLogImageSBOMGetParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 syft scan log image s b o m get params +func (o *V1SyftScanLogImageSBOMGetParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1SyftScanLogImageSBOMGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // query param image + qrImage := o.Image + qImage := qrImage + if qImage != "" { + if err := r.SetQueryParam("image", qImage); err != nil { + return err + } + } + + // path param logUid + if err := r.SetPathParam("logUid", o.LogUID); err != nil { + return err + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_syft_scan_log_image_s_b_o_m_get_responses.go b/api/client/v1/v1_syft_scan_log_image_s_b_o_m_get_responses.go new file mode 100644 index 00000000..1565004f --- /dev/null +++ b/api/client/v1/v1_syft_scan_log_image_s_b_o_m_get_responses.go @@ -0,0 +1,74 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1SyftScanLogImageSBOMGetReader is a Reader for the V1SyftScanLogImageSBOMGet structure. +type V1SyftScanLogImageSBOMGetReader struct { + formats strfmt.Registry + writer io.Writer +} + +// ReadResponse reads a server response into the received o. +func (o *V1SyftScanLogImageSBOMGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1SyftScanLogImageSBOMGetOK(o.writer) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1SyftScanLogImageSBOMGetOK creates a V1SyftScanLogImageSBOMGetOK with default headers values +func NewV1SyftScanLogImageSBOMGetOK(writer io.Writer) *V1SyftScanLogImageSBOMGetOK { + return &V1SyftScanLogImageSBOMGetOK{ + Payload: writer, + } +} + +/* +V1SyftScanLogImageSBOMGetOK handles this case with default header values. + +download file +*/ +type V1SyftScanLogImageSBOMGetOK struct { + ContentDisposition string + + Payload io.Writer +} + +func (o *V1SyftScanLogImageSBOMGetOK) Error() string { + return fmt.Sprintf("[GET /v1/spectroclusters/{uid}/features/complianceScan/logs/{logUid}/drivers/syft/sbom][%d] v1SyftScanLogImageSBOMGetOK %+v", 200, o.Payload) +} + +func (o *V1SyftScanLogImageSBOMGetOK) GetPayload() io.Writer { + return o.Payload +} + +func (o *V1SyftScanLogImageSBOMGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header Content-Disposition + o.ContentDisposition = response.GetHeader("Content-Disposition") + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_system_config_reverse_proxy_get_parameters.go b/api/client/v1/v1_system_config_reverse_proxy_get_parameters.go new file mode 100644 index 00000000..8423527e --- /dev/null +++ b/api/client/v1/v1_system_config_reverse_proxy_get_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1SystemConfigReverseProxyGetParams creates a new V1SystemConfigReverseProxyGetParams object +// with the default values initialized. +func NewV1SystemConfigReverseProxyGetParams() *V1SystemConfigReverseProxyGetParams { + + return &V1SystemConfigReverseProxyGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1SystemConfigReverseProxyGetParamsWithTimeout creates a new V1SystemConfigReverseProxyGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1SystemConfigReverseProxyGetParamsWithTimeout(timeout time.Duration) *V1SystemConfigReverseProxyGetParams { + + return &V1SystemConfigReverseProxyGetParams{ + + timeout: timeout, + } +} + +// NewV1SystemConfigReverseProxyGetParamsWithContext creates a new V1SystemConfigReverseProxyGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1SystemConfigReverseProxyGetParamsWithContext(ctx context.Context) *V1SystemConfigReverseProxyGetParams { + + return &V1SystemConfigReverseProxyGetParams{ + + Context: ctx, + } +} + +// NewV1SystemConfigReverseProxyGetParamsWithHTTPClient creates a new V1SystemConfigReverseProxyGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1SystemConfigReverseProxyGetParamsWithHTTPClient(client *http.Client) *V1SystemConfigReverseProxyGetParams { + + return &V1SystemConfigReverseProxyGetParams{ + HTTPClient: client, + } +} + +/* +V1SystemConfigReverseProxyGetParams contains all the parameters to send to the API endpoint +for the v1 system config reverse proxy get operation typically these are written to a http.Request +*/ +type V1SystemConfigReverseProxyGetParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 system config reverse proxy get params +func (o *V1SystemConfigReverseProxyGetParams) WithTimeout(timeout time.Duration) *V1SystemConfigReverseProxyGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 system config reverse proxy get params +func (o *V1SystemConfigReverseProxyGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 system config reverse proxy get params +func (o *V1SystemConfigReverseProxyGetParams) WithContext(ctx context.Context) *V1SystemConfigReverseProxyGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 system config reverse proxy get params +func (o *V1SystemConfigReverseProxyGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 system config reverse proxy get params +func (o *V1SystemConfigReverseProxyGetParams) WithHTTPClient(client *http.Client) *V1SystemConfigReverseProxyGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 system config reverse proxy get params +func (o *V1SystemConfigReverseProxyGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *V1SystemConfigReverseProxyGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_system_config_reverse_proxy_get_responses.go b/api/client/v1/v1_system_config_reverse_proxy_get_responses.go new file mode 100644 index 00000000..a328de9d --- /dev/null +++ b/api/client/v1/v1_system_config_reverse_proxy_get_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1SystemConfigReverseProxyGetReader is a Reader for the V1SystemConfigReverseProxyGet structure. +type V1SystemConfigReverseProxyGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1SystemConfigReverseProxyGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1SystemConfigReverseProxyGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1SystemConfigReverseProxyGetOK creates a V1SystemConfigReverseProxyGetOK with default headers values +func NewV1SystemConfigReverseProxyGetOK() *V1SystemConfigReverseProxyGetOK { + return &V1SystemConfigReverseProxyGetOK{} +} + +/* +V1SystemConfigReverseProxyGetOK handles this case with default header values. + +(empty) +*/ +type V1SystemConfigReverseProxyGetOK struct { + Payload *models.V1SystemReverseProxy +} + +func (o *V1SystemConfigReverseProxyGetOK) Error() string { + return fmt.Sprintf("[GET /v1/system/config/reverseproxy][%d] v1SystemConfigReverseProxyGetOK %+v", 200, o.Payload) +} + +func (o *V1SystemConfigReverseProxyGetOK) GetPayload() *models.V1SystemReverseProxy { + return o.Payload +} + +func (o *V1SystemConfigReverseProxyGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1SystemReverseProxy) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_system_config_reverse_proxy_update_parameters.go b/api/client/v1/v1_system_config_reverse_proxy_update_parameters.go new file mode 100644 index 00000000..03ad96c7 --- /dev/null +++ b/api/client/v1/v1_system_config_reverse_proxy_update_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1SystemConfigReverseProxyUpdateParams creates a new V1SystemConfigReverseProxyUpdateParams object +// with the default values initialized. +func NewV1SystemConfigReverseProxyUpdateParams() *V1SystemConfigReverseProxyUpdateParams { + var () + return &V1SystemConfigReverseProxyUpdateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1SystemConfigReverseProxyUpdateParamsWithTimeout creates a new V1SystemConfigReverseProxyUpdateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1SystemConfigReverseProxyUpdateParamsWithTimeout(timeout time.Duration) *V1SystemConfigReverseProxyUpdateParams { + var () + return &V1SystemConfigReverseProxyUpdateParams{ + + timeout: timeout, + } +} + +// NewV1SystemConfigReverseProxyUpdateParamsWithContext creates a new V1SystemConfigReverseProxyUpdateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1SystemConfigReverseProxyUpdateParamsWithContext(ctx context.Context) *V1SystemConfigReverseProxyUpdateParams { + var () + return &V1SystemConfigReverseProxyUpdateParams{ + + Context: ctx, + } +} + +// NewV1SystemConfigReverseProxyUpdateParamsWithHTTPClient creates a new V1SystemConfigReverseProxyUpdateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1SystemConfigReverseProxyUpdateParamsWithHTTPClient(client *http.Client) *V1SystemConfigReverseProxyUpdateParams { + var () + return &V1SystemConfigReverseProxyUpdateParams{ + HTTPClient: client, + } +} + +/* +V1SystemConfigReverseProxyUpdateParams contains all the parameters to send to the API endpoint +for the v1 system config reverse proxy update operation typically these are written to a http.Request +*/ +type V1SystemConfigReverseProxyUpdateParams struct { + + /*Body*/ + Body *models.V1SystemReverseProxy + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 system config reverse proxy update params +func (o *V1SystemConfigReverseProxyUpdateParams) WithTimeout(timeout time.Duration) *V1SystemConfigReverseProxyUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 system config reverse proxy update params +func (o *V1SystemConfigReverseProxyUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 system config reverse proxy update params +func (o *V1SystemConfigReverseProxyUpdateParams) WithContext(ctx context.Context) *V1SystemConfigReverseProxyUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 system config reverse proxy update params +func (o *V1SystemConfigReverseProxyUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 system config reverse proxy update params +func (o *V1SystemConfigReverseProxyUpdateParams) WithHTTPClient(client *http.Client) *V1SystemConfigReverseProxyUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 system config reverse proxy update params +func (o *V1SystemConfigReverseProxyUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 system config reverse proxy update params +func (o *V1SystemConfigReverseProxyUpdateParams) WithBody(body *models.V1SystemReverseProxy) *V1SystemConfigReverseProxyUpdateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 system config reverse proxy update params +func (o *V1SystemConfigReverseProxyUpdateParams) SetBody(body *models.V1SystemReverseProxy) { + o.Body = body +} + +// WriteToRequest writes these params to a swagger request +func (o *V1SystemConfigReverseProxyUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_system_config_reverse_proxy_update_responses.go b/api/client/v1/v1_system_config_reverse_proxy_update_responses.go new file mode 100644 index 00000000..3f34c993 --- /dev/null +++ b/api/client/v1/v1_system_config_reverse_proxy_update_responses.go @@ -0,0 +1,68 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1SystemConfigReverseProxyUpdateReader is a Reader for the V1SystemConfigReverseProxyUpdate structure. +type V1SystemConfigReverseProxyUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1SystemConfigReverseProxyUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1SystemConfigReverseProxyUpdateNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1SystemConfigReverseProxyUpdateNoContent creates a V1SystemConfigReverseProxyUpdateNoContent with default headers values +func NewV1SystemConfigReverseProxyUpdateNoContent() *V1SystemConfigReverseProxyUpdateNoContent { + return &V1SystemConfigReverseProxyUpdateNoContent{} +} + +/* +V1SystemConfigReverseProxyUpdateNoContent handles this case with default header values. + +(empty) +*/ +type V1SystemConfigReverseProxyUpdateNoContent struct { + Payload models.V1Updated +} + +func (o *V1SystemConfigReverseProxyUpdateNoContent) Error() string { + return fmt.Sprintf("[PUT /v1/system/config/reverseproxy][%d] v1SystemConfigReverseProxyUpdateNoContent %+v", 204, o.Payload) +} + +func (o *V1SystemConfigReverseProxyUpdateNoContent) GetPayload() models.V1Updated { + return o.Payload +} + +func (o *V1SystemConfigReverseProxyUpdateNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_system_users_email_verify_parameters.go b/api/client/v1/v1_system_users_email_verify_parameters.go new file mode 100644 index 00000000..ef2d3390 --- /dev/null +++ b/api/client/v1/v1_system_users_email_verify_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1SystemUsersEmailVerifyParams creates a new V1SystemUsersEmailVerifyParams object +// with the default values initialized. +func NewV1SystemUsersEmailVerifyParams() *V1SystemUsersEmailVerifyParams { + var () + return &V1SystemUsersEmailVerifyParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1SystemUsersEmailVerifyParamsWithTimeout creates a new V1SystemUsersEmailVerifyParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1SystemUsersEmailVerifyParamsWithTimeout(timeout time.Duration) *V1SystemUsersEmailVerifyParams { + var () + return &V1SystemUsersEmailVerifyParams{ + + timeout: timeout, + } +} + +// NewV1SystemUsersEmailVerifyParamsWithContext creates a new V1SystemUsersEmailVerifyParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1SystemUsersEmailVerifyParamsWithContext(ctx context.Context) *V1SystemUsersEmailVerifyParams { + var () + return &V1SystemUsersEmailVerifyParams{ + + Context: ctx, + } +} + +// NewV1SystemUsersEmailVerifyParamsWithHTTPClient creates a new V1SystemUsersEmailVerifyParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1SystemUsersEmailVerifyParamsWithHTTPClient(client *http.Client) *V1SystemUsersEmailVerifyParams { + var () + return &V1SystemUsersEmailVerifyParams{ + HTTPClient: client, + } +} + +/* +V1SystemUsersEmailVerifyParams contains all the parameters to send to the API endpoint +for the v1 system users email verify operation typically these are written to a http.Request +*/ +type V1SystemUsersEmailVerifyParams struct { + + /*EmailToken + Describes the expirable email token for the system user to be used for verification of email + + */ + EmailToken string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 system users email verify params +func (o *V1SystemUsersEmailVerifyParams) WithTimeout(timeout time.Duration) *V1SystemUsersEmailVerifyParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 system users email verify params +func (o *V1SystemUsersEmailVerifyParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 system users email verify params +func (o *V1SystemUsersEmailVerifyParams) WithContext(ctx context.Context) *V1SystemUsersEmailVerifyParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 system users email verify params +func (o *V1SystemUsersEmailVerifyParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 system users email verify params +func (o *V1SystemUsersEmailVerifyParams) WithHTTPClient(client *http.Client) *V1SystemUsersEmailVerifyParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 system users email verify params +func (o *V1SystemUsersEmailVerifyParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithEmailToken adds the emailToken to the v1 system users email verify params +func (o *V1SystemUsersEmailVerifyParams) WithEmailToken(emailToken string) *V1SystemUsersEmailVerifyParams { + o.SetEmailToken(emailToken) + return o +} + +// SetEmailToken adds the emailToken to the v1 system users email verify params +func (o *V1SystemUsersEmailVerifyParams) SetEmailToken(emailToken string) { + o.EmailToken = emailToken +} + +// WriteToRequest writes these params to a swagger request +func (o *V1SystemUsersEmailVerifyParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param emailToken + if err := r.SetPathParam("emailToken", o.EmailToken); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_system_users_email_verify_re_send_parameters.go b/api/client/v1/v1_system_users_email_verify_re_send_parameters.go new file mode 100644 index 00000000..4ad8f0a1 --- /dev/null +++ b/api/client/v1/v1_system_users_email_verify_re_send_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1SystemUsersEmailVerifyReSendParams creates a new V1SystemUsersEmailVerifyReSendParams object +// with the default values initialized. +func NewV1SystemUsersEmailVerifyReSendParams() *V1SystemUsersEmailVerifyReSendParams { + + return &V1SystemUsersEmailVerifyReSendParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1SystemUsersEmailVerifyReSendParamsWithTimeout creates a new V1SystemUsersEmailVerifyReSendParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1SystemUsersEmailVerifyReSendParamsWithTimeout(timeout time.Duration) *V1SystemUsersEmailVerifyReSendParams { + + return &V1SystemUsersEmailVerifyReSendParams{ + + timeout: timeout, + } +} + +// NewV1SystemUsersEmailVerifyReSendParamsWithContext creates a new V1SystemUsersEmailVerifyReSendParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1SystemUsersEmailVerifyReSendParamsWithContext(ctx context.Context) *V1SystemUsersEmailVerifyReSendParams { + + return &V1SystemUsersEmailVerifyReSendParams{ + + Context: ctx, + } +} + +// NewV1SystemUsersEmailVerifyReSendParamsWithHTTPClient creates a new V1SystemUsersEmailVerifyReSendParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1SystemUsersEmailVerifyReSendParamsWithHTTPClient(client *http.Client) *V1SystemUsersEmailVerifyReSendParams { + + return &V1SystemUsersEmailVerifyReSendParams{ + HTTPClient: client, + } +} + +/* +V1SystemUsersEmailVerifyReSendParams contains all the parameters to send to the API endpoint +for the v1 system users email verify re send operation typically these are written to a http.Request +*/ +type V1SystemUsersEmailVerifyReSendParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 system users email verify re send params +func (o *V1SystemUsersEmailVerifyReSendParams) WithTimeout(timeout time.Duration) *V1SystemUsersEmailVerifyReSendParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 system users email verify re send params +func (o *V1SystemUsersEmailVerifyReSendParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 system users email verify re send params +func (o *V1SystemUsersEmailVerifyReSendParams) WithContext(ctx context.Context) *V1SystemUsersEmailVerifyReSendParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 system users email verify re send params +func (o *V1SystemUsersEmailVerifyReSendParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 system users email verify re send params +func (o *V1SystemUsersEmailVerifyReSendParams) WithHTTPClient(client *http.Client) *V1SystemUsersEmailVerifyReSendParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 system users email verify re send params +func (o *V1SystemUsersEmailVerifyReSendParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *V1SystemUsersEmailVerifyReSendParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_system_users_email_verify_re_send_responses.go b/api/client/v1/v1_system_users_email_verify_re_send_responses.go new file mode 100644 index 00000000..6cd014fd --- /dev/null +++ b/api/client/v1/v1_system_users_email_verify_re_send_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1SystemUsersEmailVerifyReSendReader is a Reader for the V1SystemUsersEmailVerifyReSend structure. +type V1SystemUsersEmailVerifyReSendReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1SystemUsersEmailVerifyReSendReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1SystemUsersEmailVerifyReSendNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1SystemUsersEmailVerifyReSendNoContent creates a V1SystemUsersEmailVerifyReSendNoContent with default headers values +func NewV1SystemUsersEmailVerifyReSendNoContent() *V1SystemUsersEmailVerifyReSendNoContent { + return &V1SystemUsersEmailVerifyReSendNoContent{} +} + +/* +V1SystemUsersEmailVerifyReSendNoContent handles this case with default header values. + +The resource was updated successfully +*/ +type V1SystemUsersEmailVerifyReSendNoContent struct { +} + +func (o *V1SystemUsersEmailVerifyReSendNoContent) Error() string { + return fmt.Sprintf("[PATCH /v1/system/users/email/verify/resend][%d] v1SystemUsersEmailVerifyReSendNoContent ", 204) +} + +func (o *V1SystemUsersEmailVerifyReSendNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_system_users_email_verify_responses.go b/api/client/v1/v1_system_users_email_verify_responses.go new file mode 100644 index 00000000..6b07668c --- /dev/null +++ b/api/client/v1/v1_system_users_email_verify_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1SystemUsersEmailVerifyReader is a Reader for the V1SystemUsersEmailVerify structure. +type V1SystemUsersEmailVerifyReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1SystemUsersEmailVerifyReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1SystemUsersEmailVerifyNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1SystemUsersEmailVerifyNoContent creates a V1SystemUsersEmailVerifyNoContent with default headers values +func NewV1SystemUsersEmailVerifyNoContent() *V1SystemUsersEmailVerifyNoContent { + return &V1SystemUsersEmailVerifyNoContent{} +} + +/* +V1SystemUsersEmailVerifyNoContent handles this case with default header values. + +The resource was updated successfully +*/ +type V1SystemUsersEmailVerifyNoContent struct { +} + +func (o *V1SystemUsersEmailVerifyNoContent) Error() string { + return fmt.Sprintf("[GET /v1/system/users/email/{emailToken}/verify][%d] v1SystemUsersEmailVerifyNoContent ", 204) +} + +func (o *V1SystemUsersEmailVerifyNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_system_users_me_parameters.go b/api/client/v1/v1_system_users_me_parameters.go new file mode 100644 index 00000000..e700a795 --- /dev/null +++ b/api/client/v1/v1_system_users_me_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1SystemUsersMeParams creates a new V1SystemUsersMeParams object +// with the default values initialized. +func NewV1SystemUsersMeParams() *V1SystemUsersMeParams { + + return &V1SystemUsersMeParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1SystemUsersMeParamsWithTimeout creates a new V1SystemUsersMeParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1SystemUsersMeParamsWithTimeout(timeout time.Duration) *V1SystemUsersMeParams { + + return &V1SystemUsersMeParams{ + + timeout: timeout, + } +} + +// NewV1SystemUsersMeParamsWithContext creates a new V1SystemUsersMeParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1SystemUsersMeParamsWithContext(ctx context.Context) *V1SystemUsersMeParams { + + return &V1SystemUsersMeParams{ + + Context: ctx, + } +} + +// NewV1SystemUsersMeParamsWithHTTPClient creates a new V1SystemUsersMeParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1SystemUsersMeParamsWithHTTPClient(client *http.Client) *V1SystemUsersMeParams { + + return &V1SystemUsersMeParams{ + HTTPClient: client, + } +} + +/* +V1SystemUsersMeParams contains all the parameters to send to the API endpoint +for the v1 system users me operation typically these are written to a http.Request +*/ +type V1SystemUsersMeParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 system users me params +func (o *V1SystemUsersMeParams) WithTimeout(timeout time.Duration) *V1SystemUsersMeParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 system users me params +func (o *V1SystemUsersMeParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 system users me params +func (o *V1SystemUsersMeParams) WithContext(ctx context.Context) *V1SystemUsersMeParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 system users me params +func (o *V1SystemUsersMeParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 system users me params +func (o *V1SystemUsersMeParams) WithHTTPClient(client *http.Client) *V1SystemUsersMeParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 system users me params +func (o *V1SystemUsersMeParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *V1SystemUsersMeParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_system_users_me_responses.go b/api/client/v1/v1_system_users_me_responses.go new file mode 100644 index 00000000..588deeff --- /dev/null +++ b/api/client/v1/v1_system_users_me_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1SystemUsersMeReader is a Reader for the V1SystemUsersMe structure. +type V1SystemUsersMeReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1SystemUsersMeReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1SystemUsersMeOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1SystemUsersMeOK creates a V1SystemUsersMeOK with default headers values +func NewV1SystemUsersMeOK() *V1SystemUsersMeOK { + return &V1SystemUsersMeOK{} +} + +/* +V1SystemUsersMeOK handles this case with default header values. + +(empty) +*/ +type V1SystemUsersMeOK struct { + Payload *models.V1SystemUserMe +} + +func (o *V1SystemUsersMeOK) Error() string { + return fmt.Sprintf("[GET /v1/system/users/me][%d] v1SystemUsersMeOK %+v", 200, o.Payload) +} + +func (o *V1SystemUsersMeOK) GetPayload() *models.V1SystemUserMe { + return o.Payload +} + +func (o *V1SystemUsersMeOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1SystemUserMe) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_system_users_password_reset_parameters.go b/api/client/v1/v1_system_users_password_reset_parameters.go new file mode 100644 index 00000000..a2ea2d08 --- /dev/null +++ b/api/client/v1/v1_system_users_password_reset_parameters.go @@ -0,0 +1,153 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1SystemUsersPasswordResetParams creates a new V1SystemUsersPasswordResetParams object +// with the default values initialized. +func NewV1SystemUsersPasswordResetParams() *V1SystemUsersPasswordResetParams { + var () + return &V1SystemUsersPasswordResetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1SystemUsersPasswordResetParamsWithTimeout creates a new V1SystemUsersPasswordResetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1SystemUsersPasswordResetParamsWithTimeout(timeout time.Duration) *V1SystemUsersPasswordResetParams { + var () + return &V1SystemUsersPasswordResetParams{ + + timeout: timeout, + } +} + +// NewV1SystemUsersPasswordResetParamsWithContext creates a new V1SystemUsersPasswordResetParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1SystemUsersPasswordResetParamsWithContext(ctx context.Context) *V1SystemUsersPasswordResetParams { + var () + return &V1SystemUsersPasswordResetParams{ + + Context: ctx, + } +} + +// NewV1SystemUsersPasswordResetParamsWithHTTPClient creates a new V1SystemUsersPasswordResetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1SystemUsersPasswordResetParamsWithHTTPClient(client *http.Client) *V1SystemUsersPasswordResetParams { + var () + return &V1SystemUsersPasswordResetParams{ + HTTPClient: client, + } +} + +/* +V1SystemUsersPasswordResetParams contains all the parameters to send to the API endpoint +for the v1 system users password reset operation typically these are written to a http.Request +*/ +type V1SystemUsersPasswordResetParams struct { + + /*Body*/ + Body V1SystemUsersPasswordResetBody + /*PasswordToken + Describes the expirable password token for the system user to be used for authentication of user + + */ + PasswordToken string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 system users password reset params +func (o *V1SystemUsersPasswordResetParams) WithTimeout(timeout time.Duration) *V1SystemUsersPasswordResetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 system users password reset params +func (o *V1SystemUsersPasswordResetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 system users password reset params +func (o *V1SystemUsersPasswordResetParams) WithContext(ctx context.Context) *V1SystemUsersPasswordResetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 system users password reset params +func (o *V1SystemUsersPasswordResetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 system users password reset params +func (o *V1SystemUsersPasswordResetParams) WithHTTPClient(client *http.Client) *V1SystemUsersPasswordResetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 system users password reset params +func (o *V1SystemUsersPasswordResetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 system users password reset params +func (o *V1SystemUsersPasswordResetParams) WithBody(body V1SystemUsersPasswordResetBody) *V1SystemUsersPasswordResetParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 system users password reset params +func (o *V1SystemUsersPasswordResetParams) SetBody(body V1SystemUsersPasswordResetBody) { + o.Body = body +} + +// WithPasswordToken adds the passwordToken to the v1 system users password reset params +func (o *V1SystemUsersPasswordResetParams) WithPasswordToken(passwordToken string) *V1SystemUsersPasswordResetParams { + o.SetPasswordToken(passwordToken) + return o +} + +// SetPasswordToken adds the passwordToken to the v1 system users password reset params +func (o *V1SystemUsersPasswordResetParams) SetPasswordToken(passwordToken string) { + o.PasswordToken = passwordToken +} + +// WriteToRequest writes these params to a swagger request +func (o *V1SystemUsersPasswordResetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + + // path param passwordToken + if err := r.SetPathParam("passwordToken", o.PasswordToken); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_system_users_password_reset_request_parameters.go b/api/client/v1/v1_system_users_password_reset_request_parameters.go new file mode 100644 index 00000000..e009c8c5 --- /dev/null +++ b/api/client/v1/v1_system_users_password_reset_request_parameters.go @@ -0,0 +1,132 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1SystemUsersPasswordResetRequestParams creates a new V1SystemUsersPasswordResetRequestParams object +// with the default values initialized. +func NewV1SystemUsersPasswordResetRequestParams() *V1SystemUsersPasswordResetRequestParams { + var () + return &V1SystemUsersPasswordResetRequestParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1SystemUsersPasswordResetRequestParamsWithTimeout creates a new V1SystemUsersPasswordResetRequestParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1SystemUsersPasswordResetRequestParamsWithTimeout(timeout time.Duration) *V1SystemUsersPasswordResetRequestParams { + var () + return &V1SystemUsersPasswordResetRequestParams{ + + timeout: timeout, + } +} + +// NewV1SystemUsersPasswordResetRequestParamsWithContext creates a new V1SystemUsersPasswordResetRequestParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1SystemUsersPasswordResetRequestParamsWithContext(ctx context.Context) *V1SystemUsersPasswordResetRequestParams { + var () + return &V1SystemUsersPasswordResetRequestParams{ + + Context: ctx, + } +} + +// NewV1SystemUsersPasswordResetRequestParamsWithHTTPClient creates a new V1SystemUsersPasswordResetRequestParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1SystemUsersPasswordResetRequestParamsWithHTTPClient(client *http.Client) *V1SystemUsersPasswordResetRequestParams { + var () + return &V1SystemUsersPasswordResetRequestParams{ + HTTPClient: client, + } +} + +/* +V1SystemUsersPasswordResetRequestParams contains all the parameters to send to the API endpoint +for the v1 system users password reset request operation typically these are written to a http.Request +*/ +type V1SystemUsersPasswordResetRequestParams struct { + + /*Body*/ + Body V1SystemUsersPasswordResetRequestBody + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 system users password reset request params +func (o *V1SystemUsersPasswordResetRequestParams) WithTimeout(timeout time.Duration) *V1SystemUsersPasswordResetRequestParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 system users password reset request params +func (o *V1SystemUsersPasswordResetRequestParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 system users password reset request params +func (o *V1SystemUsersPasswordResetRequestParams) WithContext(ctx context.Context) *V1SystemUsersPasswordResetRequestParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 system users password reset request params +func (o *V1SystemUsersPasswordResetRequestParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 system users password reset request params +func (o *V1SystemUsersPasswordResetRequestParams) WithHTTPClient(client *http.Client) *V1SystemUsersPasswordResetRequestParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 system users password reset request params +func (o *V1SystemUsersPasswordResetRequestParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 system users password reset request params +func (o *V1SystemUsersPasswordResetRequestParams) WithBody(body V1SystemUsersPasswordResetRequestBody) *V1SystemUsersPasswordResetRequestParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 system users password reset request params +func (o *V1SystemUsersPasswordResetRequestParams) SetBody(body V1SystemUsersPasswordResetRequestBody) { + o.Body = body +} + +// WriteToRequest writes these params to a swagger request +func (o *V1SystemUsersPasswordResetRequestParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_system_users_password_reset_request_responses.go b/api/client/v1/v1_system_users_password_reset_request_responses.go new file mode 100644 index 00000000..d96fdae8 --- /dev/null +++ b/api/client/v1/v1_system_users_password_reset_request_responses.go @@ -0,0 +1,116 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1SystemUsersPasswordResetRequestReader is a Reader for the V1SystemUsersPasswordResetRequest structure. +type V1SystemUsersPasswordResetRequestReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1SystemUsersPasswordResetRequestReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1SystemUsersPasswordResetRequestNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1SystemUsersPasswordResetRequestNoContent creates a V1SystemUsersPasswordResetRequestNoContent with default headers values +func NewV1SystemUsersPasswordResetRequestNoContent() *V1SystemUsersPasswordResetRequestNoContent { + return &V1SystemUsersPasswordResetRequestNoContent{} +} + +/* +V1SystemUsersPasswordResetRequestNoContent handles this case with default header values. + +Ok response without content +*/ +type V1SystemUsersPasswordResetRequestNoContent struct { + /*Audit uid for the request + */ + AuditUID string +} + +func (o *V1SystemUsersPasswordResetRequestNoContent) Error() string { + return fmt.Sprintf("[POST /v1/system/users/password/reset][%d] v1SystemUsersPasswordResetRequestNoContent ", 204) +} + +func (o *V1SystemUsersPasswordResetRequestNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header AuditUid + o.AuditUID = response.GetHeader("AuditUid") + + return nil +} + +/* +V1SystemUsersPasswordResetRequestBody v1 system users password reset request body +swagger:model V1SystemUsersPasswordResetRequestBody +*/ +type V1SystemUsersPasswordResetRequestBody struct { + + // Describes email if for which password reset email has to be sent + // Required: true + EmailID *string `json:"emailId"` +} + +// Validate validates this v1 system users password reset request body +func (o *V1SystemUsersPasswordResetRequestBody) Validate(formats strfmt.Registry) error { + var res []error + + if err := o.validateEmailID(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (o *V1SystemUsersPasswordResetRequestBody) validateEmailID(formats strfmt.Registry) error { + + if err := validate.Required("body"+"."+"emailId", "body", o.EmailID); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (o *V1SystemUsersPasswordResetRequestBody) MarshalBinary() ([]byte, error) { + if o == nil { + return nil, nil + } + return swag.WriteJSON(o) +} + +// UnmarshalBinary interface implementation +func (o *V1SystemUsersPasswordResetRequestBody) UnmarshalBinary(b []byte) error { + var res V1SystemUsersPasswordResetRequestBody + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *o = res + return nil +} diff --git a/api/client/v1/v1_system_users_password_reset_responses.go b/api/client/v1/v1_system_users_password_reset_responses.go new file mode 100644 index 00000000..d3508c17 --- /dev/null +++ b/api/client/v1/v1_system_users_password_reset_responses.go @@ -0,0 +1,115 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1SystemUsersPasswordResetReader is a Reader for the V1SystemUsersPasswordReset structure. +type V1SystemUsersPasswordResetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1SystemUsersPasswordResetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1SystemUsersPasswordResetNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1SystemUsersPasswordResetNoContent creates a V1SystemUsersPasswordResetNoContent with default headers values +func NewV1SystemUsersPasswordResetNoContent() *V1SystemUsersPasswordResetNoContent { + return &V1SystemUsersPasswordResetNoContent{} +} + +/* +V1SystemUsersPasswordResetNoContent handles this case with default header values. + +The resource was updated successfully +*/ +type V1SystemUsersPasswordResetNoContent struct { +} + +func (o *V1SystemUsersPasswordResetNoContent) Error() string { + return fmt.Sprintf("[PATCH /v1/system/users/password/{passwordToken}/reset][%d] v1SystemUsersPasswordResetNoContent ", 204) +} + +func (o *V1SystemUsersPasswordResetNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} + +/* +V1SystemUsersPasswordResetBody v1 system users password reset body +swagger:model V1SystemUsersPasswordResetBody +*/ +type V1SystemUsersPasswordResetBody struct { + + // Describes the new password for the system user + // Required: true + // Format: password + Password *strfmt.Password `json:"password"` +} + +// Validate validates this v1 system users password reset body +func (o *V1SystemUsersPasswordResetBody) Validate(formats strfmt.Registry) error { + var res []error + + if err := o.validatePassword(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (o *V1SystemUsersPasswordResetBody) validatePassword(formats strfmt.Registry) error { + + if err := validate.Required("body"+"."+"password", "body", o.Password); err != nil { + return err + } + + if err := validate.FormatOf("body"+"."+"password", "body", "password", o.Password.String(), formats); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (o *V1SystemUsersPasswordResetBody) MarshalBinary() ([]byte, error) { + if o == nil { + return nil, nil + } + return swag.WriteJSON(o) +} + +// UnmarshalBinary interface implementation +func (o *V1SystemUsersPasswordResetBody) UnmarshalBinary(b []byte) error { + var res V1SystemUsersPasswordResetBody + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *o = res + return nil +} diff --git a/api/client/v1/v1_tag_filter_uid_delete_parameters.go b/api/client/v1/v1_tag_filter_uid_delete_parameters.go new file mode 100644 index 00000000..c268ec5c --- /dev/null +++ b/api/client/v1/v1_tag_filter_uid_delete_parameters.go @@ -0,0 +1,133 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1TagFilterUIDDeleteParams creates a new V1TagFilterUIDDeleteParams object +// with the default values initialized. +func NewV1TagFilterUIDDeleteParams() *V1TagFilterUIDDeleteParams { + var () + return &V1TagFilterUIDDeleteParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1TagFilterUIDDeleteParamsWithTimeout creates a new V1TagFilterUIDDeleteParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1TagFilterUIDDeleteParamsWithTimeout(timeout time.Duration) *V1TagFilterUIDDeleteParams { + var () + return &V1TagFilterUIDDeleteParams{ + + timeout: timeout, + } +} + +// NewV1TagFilterUIDDeleteParamsWithContext creates a new V1TagFilterUIDDeleteParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1TagFilterUIDDeleteParamsWithContext(ctx context.Context) *V1TagFilterUIDDeleteParams { + var () + return &V1TagFilterUIDDeleteParams{ + + Context: ctx, + } +} + +// NewV1TagFilterUIDDeleteParamsWithHTTPClient creates a new V1TagFilterUIDDeleteParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1TagFilterUIDDeleteParamsWithHTTPClient(client *http.Client) *V1TagFilterUIDDeleteParams { + var () + return &V1TagFilterUIDDeleteParams{ + HTTPClient: client, + } +} + +/* +V1TagFilterUIDDeleteParams contains all the parameters to send to the API endpoint +for the v1 tag filter Uid delete operation typically these are written to a http.Request +*/ +type V1TagFilterUIDDeleteParams struct { + + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 tag filter Uid delete params +func (o *V1TagFilterUIDDeleteParams) WithTimeout(timeout time.Duration) *V1TagFilterUIDDeleteParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 tag filter Uid delete params +func (o *V1TagFilterUIDDeleteParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 tag filter Uid delete params +func (o *V1TagFilterUIDDeleteParams) WithContext(ctx context.Context) *V1TagFilterUIDDeleteParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 tag filter Uid delete params +func (o *V1TagFilterUIDDeleteParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 tag filter Uid delete params +func (o *V1TagFilterUIDDeleteParams) WithHTTPClient(client *http.Client) *V1TagFilterUIDDeleteParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 tag filter Uid delete params +func (o *V1TagFilterUIDDeleteParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithUID adds the uid to the v1 tag filter Uid delete params +func (o *V1TagFilterUIDDeleteParams) WithUID(uid string) *V1TagFilterUIDDeleteParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 tag filter Uid delete params +func (o *V1TagFilterUIDDeleteParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1TagFilterUIDDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_tag_filter_uid_delete_responses.go b/api/client/v1/v1_tag_filter_uid_delete_responses.go new file mode 100644 index 00000000..b240a12c --- /dev/null +++ b/api/client/v1/v1_tag_filter_uid_delete_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1TagFilterUIDDeleteReader is a Reader for the V1TagFilterUIDDelete structure. +type V1TagFilterUIDDeleteReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1TagFilterUIDDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1TagFilterUIDDeleteNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1TagFilterUIDDeleteNoContent creates a V1TagFilterUIDDeleteNoContent with default headers values +func NewV1TagFilterUIDDeleteNoContent() *V1TagFilterUIDDeleteNoContent { + return &V1TagFilterUIDDeleteNoContent{} +} + +/* +V1TagFilterUIDDeleteNoContent handles this case with default header values. + +The resource was deleted successfully +*/ +type V1TagFilterUIDDeleteNoContent struct { +} + +func (o *V1TagFilterUIDDeleteNoContent) Error() string { + return fmt.Sprintf("[DELETE /v1/filters/tag/{uid}][%d] v1TagFilterUidDeleteNoContent ", 204) +} + +func (o *V1TagFilterUIDDeleteNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_tag_filter_uid_get_parameters.go b/api/client/v1/v1_tag_filter_uid_get_parameters.go new file mode 100644 index 00000000..dccd5cf5 --- /dev/null +++ b/api/client/v1/v1_tag_filter_uid_get_parameters.go @@ -0,0 +1,133 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1TagFilterUIDGetParams creates a new V1TagFilterUIDGetParams object +// with the default values initialized. +func NewV1TagFilterUIDGetParams() *V1TagFilterUIDGetParams { + var () + return &V1TagFilterUIDGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1TagFilterUIDGetParamsWithTimeout creates a new V1TagFilterUIDGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1TagFilterUIDGetParamsWithTimeout(timeout time.Duration) *V1TagFilterUIDGetParams { + var () + return &V1TagFilterUIDGetParams{ + + timeout: timeout, + } +} + +// NewV1TagFilterUIDGetParamsWithContext creates a new V1TagFilterUIDGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1TagFilterUIDGetParamsWithContext(ctx context.Context) *V1TagFilterUIDGetParams { + var () + return &V1TagFilterUIDGetParams{ + + Context: ctx, + } +} + +// NewV1TagFilterUIDGetParamsWithHTTPClient creates a new V1TagFilterUIDGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1TagFilterUIDGetParamsWithHTTPClient(client *http.Client) *V1TagFilterUIDGetParams { + var () + return &V1TagFilterUIDGetParams{ + HTTPClient: client, + } +} + +/* +V1TagFilterUIDGetParams contains all the parameters to send to the API endpoint +for the v1 tag filter Uid get operation typically these are written to a http.Request +*/ +type V1TagFilterUIDGetParams struct { + + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 tag filter Uid get params +func (o *V1TagFilterUIDGetParams) WithTimeout(timeout time.Duration) *V1TagFilterUIDGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 tag filter Uid get params +func (o *V1TagFilterUIDGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 tag filter Uid get params +func (o *V1TagFilterUIDGetParams) WithContext(ctx context.Context) *V1TagFilterUIDGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 tag filter Uid get params +func (o *V1TagFilterUIDGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 tag filter Uid get params +func (o *V1TagFilterUIDGetParams) WithHTTPClient(client *http.Client) *V1TagFilterUIDGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 tag filter Uid get params +func (o *V1TagFilterUIDGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithUID adds the uid to the v1 tag filter Uid get params +func (o *V1TagFilterUIDGetParams) WithUID(uid string) *V1TagFilterUIDGetParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 tag filter Uid get params +func (o *V1TagFilterUIDGetParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1TagFilterUIDGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_tag_filter_uid_get_responses.go b/api/client/v1/v1_tag_filter_uid_get_responses.go new file mode 100644 index 00000000..74d25278 --- /dev/null +++ b/api/client/v1/v1_tag_filter_uid_get_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1TagFilterUIDGetReader is a Reader for the V1TagFilterUIDGet structure. +type V1TagFilterUIDGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1TagFilterUIDGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1TagFilterUIDGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1TagFilterUIDGetOK creates a V1TagFilterUIDGetOK with default headers values +func NewV1TagFilterUIDGetOK() *V1TagFilterUIDGetOK { + return &V1TagFilterUIDGetOK{} +} + +/* +V1TagFilterUIDGetOK handles this case with default header values. + +A Filter object +*/ +type V1TagFilterUIDGetOK struct { + Payload *models.V1TagFilterSummary +} + +func (o *V1TagFilterUIDGetOK) Error() string { + return fmt.Sprintf("[GET /v1/filters/tag/{uid}][%d] v1TagFilterUidGetOK %+v", 200, o.Payload) +} + +func (o *V1TagFilterUIDGetOK) GetPayload() *models.V1TagFilterSummary { + return o.Payload +} + +func (o *V1TagFilterUIDGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1TagFilterSummary) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_tag_filter_uid_update_parameters.go b/api/client/v1/v1_tag_filter_uid_update_parameters.go new file mode 100644 index 00000000..14987497 --- /dev/null +++ b/api/client/v1/v1_tag_filter_uid_update_parameters.go @@ -0,0 +1,154 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1TagFilterUIDUpdateParams creates a new V1TagFilterUIDUpdateParams object +// with the default values initialized. +func NewV1TagFilterUIDUpdateParams() *V1TagFilterUIDUpdateParams { + var () + return &V1TagFilterUIDUpdateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1TagFilterUIDUpdateParamsWithTimeout creates a new V1TagFilterUIDUpdateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1TagFilterUIDUpdateParamsWithTimeout(timeout time.Duration) *V1TagFilterUIDUpdateParams { + var () + return &V1TagFilterUIDUpdateParams{ + + timeout: timeout, + } +} + +// NewV1TagFilterUIDUpdateParamsWithContext creates a new V1TagFilterUIDUpdateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1TagFilterUIDUpdateParamsWithContext(ctx context.Context) *V1TagFilterUIDUpdateParams { + var () + return &V1TagFilterUIDUpdateParams{ + + Context: ctx, + } +} + +// NewV1TagFilterUIDUpdateParamsWithHTTPClient creates a new V1TagFilterUIDUpdateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1TagFilterUIDUpdateParamsWithHTTPClient(client *http.Client) *V1TagFilterUIDUpdateParams { + var () + return &V1TagFilterUIDUpdateParams{ + HTTPClient: client, + } +} + +/* +V1TagFilterUIDUpdateParams contains all the parameters to send to the API endpoint +for the v1 tag filter Uid update operation typically these are written to a http.Request +*/ +type V1TagFilterUIDUpdateParams struct { + + /*Body*/ + Body *models.V1TagFilter + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 tag filter Uid update params +func (o *V1TagFilterUIDUpdateParams) WithTimeout(timeout time.Duration) *V1TagFilterUIDUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 tag filter Uid update params +func (o *V1TagFilterUIDUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 tag filter Uid update params +func (o *V1TagFilterUIDUpdateParams) WithContext(ctx context.Context) *V1TagFilterUIDUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 tag filter Uid update params +func (o *V1TagFilterUIDUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 tag filter Uid update params +func (o *V1TagFilterUIDUpdateParams) WithHTTPClient(client *http.Client) *V1TagFilterUIDUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 tag filter Uid update params +func (o *V1TagFilterUIDUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 tag filter Uid update params +func (o *V1TagFilterUIDUpdateParams) WithBody(body *models.V1TagFilter) *V1TagFilterUIDUpdateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 tag filter Uid update params +func (o *V1TagFilterUIDUpdateParams) SetBody(body *models.V1TagFilter) { + o.Body = body +} + +// WithUID adds the uid to the v1 tag filter Uid update params +func (o *V1TagFilterUIDUpdateParams) WithUID(uid string) *V1TagFilterUIDUpdateParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 tag filter Uid update params +func (o *V1TagFilterUIDUpdateParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1TagFilterUIDUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_tag_filter_uid_update_responses.go b/api/client/v1/v1_tag_filter_uid_update_responses.go new file mode 100644 index 00000000..22373f85 --- /dev/null +++ b/api/client/v1/v1_tag_filter_uid_update_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1TagFilterUIDUpdateReader is a Reader for the V1TagFilterUIDUpdate structure. +type V1TagFilterUIDUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1TagFilterUIDUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1TagFilterUIDUpdateNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1TagFilterUIDUpdateNoContent creates a V1TagFilterUIDUpdateNoContent with default headers values +func NewV1TagFilterUIDUpdateNoContent() *V1TagFilterUIDUpdateNoContent { + return &V1TagFilterUIDUpdateNoContent{} +} + +/* +V1TagFilterUIDUpdateNoContent handles this case with default header values. + +The resource was updated successfully +*/ +type V1TagFilterUIDUpdateNoContent struct { +} + +func (o *V1TagFilterUIDUpdateNoContent) Error() string { + return fmt.Sprintf("[PUT /v1/filters/tag/{uid}][%d] v1TagFilterUidUpdateNoContent ", 204) +} + +func (o *V1TagFilterUIDUpdateNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_tag_filters_create_parameters.go b/api/client/v1/v1_tag_filters_create_parameters.go new file mode 100644 index 00000000..da8e8745 --- /dev/null +++ b/api/client/v1/v1_tag_filters_create_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1TagFiltersCreateParams creates a new V1TagFiltersCreateParams object +// with the default values initialized. +func NewV1TagFiltersCreateParams() *V1TagFiltersCreateParams { + var () + return &V1TagFiltersCreateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1TagFiltersCreateParamsWithTimeout creates a new V1TagFiltersCreateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1TagFiltersCreateParamsWithTimeout(timeout time.Duration) *V1TagFiltersCreateParams { + var () + return &V1TagFiltersCreateParams{ + + timeout: timeout, + } +} + +// NewV1TagFiltersCreateParamsWithContext creates a new V1TagFiltersCreateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1TagFiltersCreateParamsWithContext(ctx context.Context) *V1TagFiltersCreateParams { + var () + return &V1TagFiltersCreateParams{ + + Context: ctx, + } +} + +// NewV1TagFiltersCreateParamsWithHTTPClient creates a new V1TagFiltersCreateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1TagFiltersCreateParamsWithHTTPClient(client *http.Client) *V1TagFiltersCreateParams { + var () + return &V1TagFiltersCreateParams{ + HTTPClient: client, + } +} + +/* +V1TagFiltersCreateParams contains all the parameters to send to the API endpoint +for the v1 tag filters create operation typically these are written to a http.Request +*/ +type V1TagFiltersCreateParams struct { + + /*Body*/ + Body *models.V1TagFilter + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 tag filters create params +func (o *V1TagFiltersCreateParams) WithTimeout(timeout time.Duration) *V1TagFiltersCreateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 tag filters create params +func (o *V1TagFiltersCreateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 tag filters create params +func (o *V1TagFiltersCreateParams) WithContext(ctx context.Context) *V1TagFiltersCreateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 tag filters create params +func (o *V1TagFiltersCreateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 tag filters create params +func (o *V1TagFiltersCreateParams) WithHTTPClient(client *http.Client) *V1TagFiltersCreateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 tag filters create params +func (o *V1TagFiltersCreateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 tag filters create params +func (o *V1TagFiltersCreateParams) WithBody(body *models.V1TagFilter) *V1TagFiltersCreateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 tag filters create params +func (o *V1TagFiltersCreateParams) SetBody(body *models.V1TagFilter) { + o.Body = body +} + +// WriteToRequest writes these params to a swagger request +func (o *V1TagFiltersCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_tag_filters_create_responses.go b/api/client/v1/v1_tag_filters_create_responses.go new file mode 100644 index 00000000..4ae53e14 --- /dev/null +++ b/api/client/v1/v1_tag_filters_create_responses.go @@ -0,0 +1,77 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1TagFiltersCreateReader is a Reader for the V1TagFiltersCreate structure. +type V1TagFiltersCreateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1TagFiltersCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 201: + result := NewV1TagFiltersCreateCreated() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1TagFiltersCreateCreated creates a V1TagFiltersCreateCreated with default headers values +func NewV1TagFiltersCreateCreated() *V1TagFiltersCreateCreated { + return &V1TagFiltersCreateCreated{} +} + +/* +V1TagFiltersCreateCreated handles this case with default header values. + +Created successfully +*/ +type V1TagFiltersCreateCreated struct { + /*Audit uid for the request + */ + AuditUID string + + Payload *models.V1UID +} + +func (o *V1TagFiltersCreateCreated) Error() string { + return fmt.Sprintf("[POST /v1/filters/tag][%d] v1TagFiltersCreateCreated %+v", 201, o.Payload) +} + +func (o *V1TagFiltersCreateCreated) GetPayload() *models.V1UID { + return o.Payload +} + +func (o *V1TagFiltersCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header AuditUid + o.AuditUID = response.GetHeader("AuditUid") + + o.Payload = new(models.V1UID) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_teams_create_parameters.go b/api/client/v1/v1_teams_create_parameters.go new file mode 100644 index 00000000..91c1e014 --- /dev/null +++ b/api/client/v1/v1_teams_create_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1TeamsCreateParams creates a new V1TeamsCreateParams object +// with the default values initialized. +func NewV1TeamsCreateParams() *V1TeamsCreateParams { + var () + return &V1TeamsCreateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1TeamsCreateParamsWithTimeout creates a new V1TeamsCreateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1TeamsCreateParamsWithTimeout(timeout time.Duration) *V1TeamsCreateParams { + var () + return &V1TeamsCreateParams{ + + timeout: timeout, + } +} + +// NewV1TeamsCreateParamsWithContext creates a new V1TeamsCreateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1TeamsCreateParamsWithContext(ctx context.Context) *V1TeamsCreateParams { + var () + return &V1TeamsCreateParams{ + + Context: ctx, + } +} + +// NewV1TeamsCreateParamsWithHTTPClient creates a new V1TeamsCreateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1TeamsCreateParamsWithHTTPClient(client *http.Client) *V1TeamsCreateParams { + var () + return &V1TeamsCreateParams{ + HTTPClient: client, + } +} + +/* +V1TeamsCreateParams contains all the parameters to send to the API endpoint +for the v1 teams create operation typically these are written to a http.Request +*/ +type V1TeamsCreateParams struct { + + /*Body*/ + Body *models.V1Team + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 teams create params +func (o *V1TeamsCreateParams) WithTimeout(timeout time.Duration) *V1TeamsCreateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 teams create params +func (o *V1TeamsCreateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 teams create params +func (o *V1TeamsCreateParams) WithContext(ctx context.Context) *V1TeamsCreateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 teams create params +func (o *V1TeamsCreateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 teams create params +func (o *V1TeamsCreateParams) WithHTTPClient(client *http.Client) *V1TeamsCreateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 teams create params +func (o *V1TeamsCreateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 teams create params +func (o *V1TeamsCreateParams) WithBody(body *models.V1Team) *V1TeamsCreateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 teams create params +func (o *V1TeamsCreateParams) SetBody(body *models.V1Team) { + o.Body = body +} + +// WriteToRequest writes these params to a swagger request +func (o *V1TeamsCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_teams_create_responses.go b/api/client/v1/v1_teams_create_responses.go new file mode 100644 index 00000000..98376418 --- /dev/null +++ b/api/client/v1/v1_teams_create_responses.go @@ -0,0 +1,77 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1TeamsCreateReader is a Reader for the V1TeamsCreate structure. +type V1TeamsCreateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1TeamsCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 201: + result := NewV1TeamsCreateCreated() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1TeamsCreateCreated creates a V1TeamsCreateCreated with default headers values +func NewV1TeamsCreateCreated() *V1TeamsCreateCreated { + return &V1TeamsCreateCreated{} +} + +/* +V1TeamsCreateCreated handles this case with default header values. + +Created successfully +*/ +type V1TeamsCreateCreated struct { + /*Audit uid for the request + */ + AuditUID string + + Payload *models.V1UID +} + +func (o *V1TeamsCreateCreated) Error() string { + return fmt.Sprintf("[POST /v1/teams][%d] v1TeamsCreateCreated %+v", 201, o.Payload) +} + +func (o *V1TeamsCreateCreated) GetPayload() *models.V1UID { + return o.Payload +} + +func (o *V1TeamsCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header AuditUid + o.AuditUID = response.GetHeader("AuditUid") + + o.Payload = new(models.V1UID) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_teams_list_parameters.go b/api/client/v1/v1_teams_list_parameters.go new file mode 100644 index 00000000..42e512a5 --- /dev/null +++ b/api/client/v1/v1_teams_list_parameters.go @@ -0,0 +1,323 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// NewV1TeamsListParams creates a new V1TeamsListParams object +// with the default values initialized. +func NewV1TeamsListParams() *V1TeamsListParams { + var ( + limitDefault = int64(50) + ) + return &V1TeamsListParams{ + Limit: &limitDefault, + + timeout: cr.DefaultTimeout, + } +} + +// NewV1TeamsListParamsWithTimeout creates a new V1TeamsListParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1TeamsListParamsWithTimeout(timeout time.Duration) *V1TeamsListParams { + var ( + limitDefault = int64(50) + ) + return &V1TeamsListParams{ + Limit: &limitDefault, + + timeout: timeout, + } +} + +// NewV1TeamsListParamsWithContext creates a new V1TeamsListParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1TeamsListParamsWithContext(ctx context.Context) *V1TeamsListParams { + var ( + limitDefault = int64(50) + ) + return &V1TeamsListParams{ + Limit: &limitDefault, + + Context: ctx, + } +} + +// NewV1TeamsListParamsWithHTTPClient creates a new V1TeamsListParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1TeamsListParamsWithHTTPClient(client *http.Client) *V1TeamsListParams { + var ( + limitDefault = int64(50) + ) + return &V1TeamsListParams{ + Limit: &limitDefault, + HTTPClient: client, + } +} + +/* +V1TeamsListParams contains all the parameters to send to the API endpoint +for the v1 teams list operation typically these are written to a http.Request +*/ +type V1TeamsListParams struct { + + /*Continue + continue token to paginate the subsequent data items + + */ + Continue *string + /*Fields + Set of fields to be presented in the response with values. The fields are comma separated. Eg: metadata.uid,metadata.name + + */ + Fields *string + /*Filters + Filters can be combined with AND, OR operators with field path name. Eg: metadata.name=TestServiceANDspec.cloudType=aws + + Server will be restricted to certain fields based on the indexed data for each resource. + + */ + Filters *string + /*Limit + limit is a maximum number of responses to return for a list call. Default and maximum value of the limit is 50. + If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. + + */ + Limit *int64 + /*Offset + offset is the next index number from which the response will start. The response offset value can be used along with continue token for the pagination. + + */ + Offset *int64 + /*OrderBy + Specify the fields with sort order. 1 indicates ascending and -1 for descending. Eg: orderBy=metadata.name=1,metadata.uid=-1 + + */ + OrderBy *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 teams list params +func (o *V1TeamsListParams) WithTimeout(timeout time.Duration) *V1TeamsListParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 teams list params +func (o *V1TeamsListParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 teams list params +func (o *V1TeamsListParams) WithContext(ctx context.Context) *V1TeamsListParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 teams list params +func (o *V1TeamsListParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 teams list params +func (o *V1TeamsListParams) WithHTTPClient(client *http.Client) *V1TeamsListParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 teams list params +func (o *V1TeamsListParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithContinue adds the continueVar to the v1 teams list params +func (o *V1TeamsListParams) WithContinue(continueVar *string) *V1TeamsListParams { + o.SetContinue(continueVar) + return o +} + +// SetContinue adds the continue to the v1 teams list params +func (o *V1TeamsListParams) SetContinue(continueVar *string) { + o.Continue = continueVar +} + +// WithFields adds the fields to the v1 teams list params +func (o *V1TeamsListParams) WithFields(fields *string) *V1TeamsListParams { + o.SetFields(fields) + return o +} + +// SetFields adds the fields to the v1 teams list params +func (o *V1TeamsListParams) SetFields(fields *string) { + o.Fields = fields +} + +// WithFilters adds the filters to the v1 teams list params +func (o *V1TeamsListParams) WithFilters(filters *string) *V1TeamsListParams { + o.SetFilters(filters) + return o +} + +// SetFilters adds the filters to the v1 teams list params +func (o *V1TeamsListParams) SetFilters(filters *string) { + o.Filters = filters +} + +// WithLimit adds the limit to the v1 teams list params +func (o *V1TeamsListParams) WithLimit(limit *int64) *V1TeamsListParams { + o.SetLimit(limit) + return o +} + +// SetLimit adds the limit to the v1 teams list params +func (o *V1TeamsListParams) SetLimit(limit *int64) { + o.Limit = limit +} + +// WithOffset adds the offset to the v1 teams list params +func (o *V1TeamsListParams) WithOffset(offset *int64) *V1TeamsListParams { + o.SetOffset(offset) + return o +} + +// SetOffset adds the offset to the v1 teams list params +func (o *V1TeamsListParams) SetOffset(offset *int64) { + o.Offset = offset +} + +// WithOrderBy adds the orderBy to the v1 teams list params +func (o *V1TeamsListParams) WithOrderBy(orderBy *string) *V1TeamsListParams { + o.SetOrderBy(orderBy) + return o +} + +// SetOrderBy adds the orderBy to the v1 teams list params +func (o *V1TeamsListParams) SetOrderBy(orderBy *string) { + o.OrderBy = orderBy +} + +// WriteToRequest writes these params to a swagger request +func (o *V1TeamsListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Continue != nil { + + // query param continue + var qrContinue string + if o.Continue != nil { + qrContinue = *o.Continue + } + qContinue := qrContinue + if qContinue != "" { + if err := r.SetQueryParam("continue", qContinue); err != nil { + return err + } + } + + } + + if o.Fields != nil { + + // query param fields + var qrFields string + if o.Fields != nil { + qrFields = *o.Fields + } + qFields := qrFields + if qFields != "" { + if err := r.SetQueryParam("fields", qFields); err != nil { + return err + } + } + + } + + if o.Filters != nil { + + // query param filters + var qrFilters string + if o.Filters != nil { + qrFilters = *o.Filters + } + qFilters := qrFilters + if qFilters != "" { + if err := r.SetQueryParam("filters", qFilters); err != nil { + return err + } + } + + } + + if o.Limit != nil { + + // query param limit + var qrLimit int64 + if o.Limit != nil { + qrLimit = *o.Limit + } + qLimit := swag.FormatInt64(qrLimit) + if qLimit != "" { + if err := r.SetQueryParam("limit", qLimit); err != nil { + return err + } + } + + } + + if o.Offset != nil { + + // query param offset + var qrOffset int64 + if o.Offset != nil { + qrOffset = *o.Offset + } + qOffset := swag.FormatInt64(qrOffset) + if qOffset != "" { + if err := r.SetQueryParam("offset", qOffset); err != nil { + return err + } + } + + } + + if o.OrderBy != nil { + + // query param orderBy + var qrOrderBy string + if o.OrderBy != nil { + qrOrderBy = *o.OrderBy + } + qOrderBy := qrOrderBy + if qOrderBy != "" { + if err := r.SetQueryParam("orderBy", qOrderBy); err != nil { + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_teams_list_responses.go b/api/client/v1/v1_teams_list_responses.go new file mode 100644 index 00000000..c21c768a --- /dev/null +++ b/api/client/v1/v1_teams_list_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1TeamsListReader is a Reader for the V1TeamsList structure. +type V1TeamsListReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1TeamsListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1TeamsListOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1TeamsListOK creates a V1TeamsListOK with default headers values +func NewV1TeamsListOK() *V1TeamsListOK { + return &V1TeamsListOK{} +} + +/* +V1TeamsListOK handles this case with default header values. + +An array of teams +*/ +type V1TeamsListOK struct { + Payload *models.V1Teams +} + +func (o *V1TeamsListOK) Error() string { + return fmt.Sprintf("[GET /v1/teams][%d] v1TeamsListOK %+v", 200, o.Payload) +} + +func (o *V1TeamsListOK) GetPayload() *models.V1Teams { + return o.Payload +} + +func (o *V1TeamsListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1Teams) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_teams_project_roles_parameters.go b/api/client/v1/v1_teams_project_roles_parameters.go new file mode 100644 index 00000000..5253ee70 --- /dev/null +++ b/api/client/v1/v1_teams_project_roles_parameters.go @@ -0,0 +1,133 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1TeamsProjectRolesParams creates a new V1TeamsProjectRolesParams object +// with the default values initialized. +func NewV1TeamsProjectRolesParams() *V1TeamsProjectRolesParams { + var () + return &V1TeamsProjectRolesParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1TeamsProjectRolesParamsWithTimeout creates a new V1TeamsProjectRolesParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1TeamsProjectRolesParamsWithTimeout(timeout time.Duration) *V1TeamsProjectRolesParams { + var () + return &V1TeamsProjectRolesParams{ + + timeout: timeout, + } +} + +// NewV1TeamsProjectRolesParamsWithContext creates a new V1TeamsProjectRolesParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1TeamsProjectRolesParamsWithContext(ctx context.Context) *V1TeamsProjectRolesParams { + var () + return &V1TeamsProjectRolesParams{ + + Context: ctx, + } +} + +// NewV1TeamsProjectRolesParamsWithHTTPClient creates a new V1TeamsProjectRolesParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1TeamsProjectRolesParamsWithHTTPClient(client *http.Client) *V1TeamsProjectRolesParams { + var () + return &V1TeamsProjectRolesParams{ + HTTPClient: client, + } +} + +/* +V1TeamsProjectRolesParams contains all the parameters to send to the API endpoint +for the v1 teams project roles operation typically these are written to a http.Request +*/ +type V1TeamsProjectRolesParams struct { + + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 teams project roles params +func (o *V1TeamsProjectRolesParams) WithTimeout(timeout time.Duration) *V1TeamsProjectRolesParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 teams project roles params +func (o *V1TeamsProjectRolesParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 teams project roles params +func (o *V1TeamsProjectRolesParams) WithContext(ctx context.Context) *V1TeamsProjectRolesParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 teams project roles params +func (o *V1TeamsProjectRolesParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 teams project roles params +func (o *V1TeamsProjectRolesParams) WithHTTPClient(client *http.Client) *V1TeamsProjectRolesParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 teams project roles params +func (o *V1TeamsProjectRolesParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithUID adds the uid to the v1 teams project roles params +func (o *V1TeamsProjectRolesParams) WithUID(uid string) *V1TeamsProjectRolesParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 teams project roles params +func (o *V1TeamsProjectRolesParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1TeamsProjectRolesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_teams_project_roles_put_parameters.go b/api/client/v1/v1_teams_project_roles_put_parameters.go new file mode 100644 index 00000000..527fa9df --- /dev/null +++ b/api/client/v1/v1_teams_project_roles_put_parameters.go @@ -0,0 +1,154 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1TeamsProjectRolesPutParams creates a new V1TeamsProjectRolesPutParams object +// with the default values initialized. +func NewV1TeamsProjectRolesPutParams() *V1TeamsProjectRolesPutParams { + var () + return &V1TeamsProjectRolesPutParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1TeamsProjectRolesPutParamsWithTimeout creates a new V1TeamsProjectRolesPutParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1TeamsProjectRolesPutParamsWithTimeout(timeout time.Duration) *V1TeamsProjectRolesPutParams { + var () + return &V1TeamsProjectRolesPutParams{ + + timeout: timeout, + } +} + +// NewV1TeamsProjectRolesPutParamsWithContext creates a new V1TeamsProjectRolesPutParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1TeamsProjectRolesPutParamsWithContext(ctx context.Context) *V1TeamsProjectRolesPutParams { + var () + return &V1TeamsProjectRolesPutParams{ + + Context: ctx, + } +} + +// NewV1TeamsProjectRolesPutParamsWithHTTPClient creates a new V1TeamsProjectRolesPutParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1TeamsProjectRolesPutParamsWithHTTPClient(client *http.Client) *V1TeamsProjectRolesPutParams { + var () + return &V1TeamsProjectRolesPutParams{ + HTTPClient: client, + } +} + +/* +V1TeamsProjectRolesPutParams contains all the parameters to send to the API endpoint +for the v1 teams project roles put operation typically these are written to a http.Request +*/ +type V1TeamsProjectRolesPutParams struct { + + /*Body*/ + Body *models.V1ProjectRolesPatch + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 teams project roles put params +func (o *V1TeamsProjectRolesPutParams) WithTimeout(timeout time.Duration) *V1TeamsProjectRolesPutParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 teams project roles put params +func (o *V1TeamsProjectRolesPutParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 teams project roles put params +func (o *V1TeamsProjectRolesPutParams) WithContext(ctx context.Context) *V1TeamsProjectRolesPutParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 teams project roles put params +func (o *V1TeamsProjectRolesPutParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 teams project roles put params +func (o *V1TeamsProjectRolesPutParams) WithHTTPClient(client *http.Client) *V1TeamsProjectRolesPutParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 teams project roles put params +func (o *V1TeamsProjectRolesPutParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 teams project roles put params +func (o *V1TeamsProjectRolesPutParams) WithBody(body *models.V1ProjectRolesPatch) *V1TeamsProjectRolesPutParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 teams project roles put params +func (o *V1TeamsProjectRolesPutParams) SetBody(body *models.V1ProjectRolesPatch) { + o.Body = body +} + +// WithUID adds the uid to the v1 teams project roles put params +func (o *V1TeamsProjectRolesPutParams) WithUID(uid string) *V1TeamsProjectRolesPutParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 teams project roles put params +func (o *V1TeamsProjectRolesPutParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1TeamsProjectRolesPutParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_teams_project_roles_put_responses.go b/api/client/v1/v1_teams_project_roles_put_responses.go new file mode 100644 index 00000000..4a006d28 --- /dev/null +++ b/api/client/v1/v1_teams_project_roles_put_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1TeamsProjectRolesPutReader is a Reader for the V1TeamsProjectRolesPut structure. +type V1TeamsProjectRolesPutReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1TeamsProjectRolesPutReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1TeamsProjectRolesPutNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1TeamsProjectRolesPutNoContent creates a V1TeamsProjectRolesPutNoContent with default headers values +func NewV1TeamsProjectRolesPutNoContent() *V1TeamsProjectRolesPutNoContent { + return &V1TeamsProjectRolesPutNoContent{} +} + +/* +V1TeamsProjectRolesPutNoContent handles this case with default header values. + +The resource was updated successfully +*/ +type V1TeamsProjectRolesPutNoContent struct { +} + +func (o *V1TeamsProjectRolesPutNoContent) Error() string { + return fmt.Sprintf("[PUT /v1/teams/{uid}/projects][%d] v1TeamsProjectRolesPutNoContent ", 204) +} + +func (o *V1TeamsProjectRolesPutNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_teams_project_roles_responses.go b/api/client/v1/v1_teams_project_roles_responses.go new file mode 100644 index 00000000..4c378fca --- /dev/null +++ b/api/client/v1/v1_teams_project_roles_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1TeamsProjectRolesReader is a Reader for the V1TeamsProjectRoles structure. +type V1TeamsProjectRolesReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1TeamsProjectRolesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1TeamsProjectRolesOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1TeamsProjectRolesOK creates a V1TeamsProjectRolesOK with default headers values +func NewV1TeamsProjectRolesOK() *V1TeamsProjectRolesOK { + return &V1TeamsProjectRolesOK{} +} + +/* +V1TeamsProjectRolesOK handles this case with default header values. + +OK +*/ +type V1TeamsProjectRolesOK struct { + Payload *models.V1ProjectRolesEntity +} + +func (o *V1TeamsProjectRolesOK) Error() string { + return fmt.Sprintf("[GET /v1/teams/{uid}/projects][%d] v1TeamsProjectRolesOK %+v", 200, o.Payload) +} + +func (o *V1TeamsProjectRolesOK) GetPayload() *models.V1ProjectRolesEntity { + return o.Payload +} + +func (o *V1TeamsProjectRolesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1ProjectRolesEntity) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_teams_resource_roles_uid_update_parameters.go b/api/client/v1/v1_teams_resource_roles_uid_update_parameters.go new file mode 100644 index 00000000..b6d273ab --- /dev/null +++ b/api/client/v1/v1_teams_resource_roles_uid_update_parameters.go @@ -0,0 +1,172 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1TeamsResourceRolesUIDUpdateParams creates a new V1TeamsResourceRolesUIDUpdateParams object +// with the default values initialized. +func NewV1TeamsResourceRolesUIDUpdateParams() *V1TeamsResourceRolesUIDUpdateParams { + var () + return &V1TeamsResourceRolesUIDUpdateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1TeamsResourceRolesUIDUpdateParamsWithTimeout creates a new V1TeamsResourceRolesUIDUpdateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1TeamsResourceRolesUIDUpdateParamsWithTimeout(timeout time.Duration) *V1TeamsResourceRolesUIDUpdateParams { + var () + return &V1TeamsResourceRolesUIDUpdateParams{ + + timeout: timeout, + } +} + +// NewV1TeamsResourceRolesUIDUpdateParamsWithContext creates a new V1TeamsResourceRolesUIDUpdateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1TeamsResourceRolesUIDUpdateParamsWithContext(ctx context.Context) *V1TeamsResourceRolesUIDUpdateParams { + var () + return &V1TeamsResourceRolesUIDUpdateParams{ + + Context: ctx, + } +} + +// NewV1TeamsResourceRolesUIDUpdateParamsWithHTTPClient creates a new V1TeamsResourceRolesUIDUpdateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1TeamsResourceRolesUIDUpdateParamsWithHTTPClient(client *http.Client) *V1TeamsResourceRolesUIDUpdateParams { + var () + return &V1TeamsResourceRolesUIDUpdateParams{ + HTTPClient: client, + } +} + +/* +V1TeamsResourceRolesUIDUpdateParams contains all the parameters to send to the API endpoint +for the v1 teams resource roles Uid update operation typically these are written to a http.Request +*/ +type V1TeamsResourceRolesUIDUpdateParams struct { + + /*Body*/ + Body *models.V1ResourceRolesUpdateEntity + /*ResourceRoleUID*/ + ResourceRoleUID string + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 teams resource roles Uid update params +func (o *V1TeamsResourceRolesUIDUpdateParams) WithTimeout(timeout time.Duration) *V1TeamsResourceRolesUIDUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 teams resource roles Uid update params +func (o *V1TeamsResourceRolesUIDUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 teams resource roles Uid update params +func (o *V1TeamsResourceRolesUIDUpdateParams) WithContext(ctx context.Context) *V1TeamsResourceRolesUIDUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 teams resource roles Uid update params +func (o *V1TeamsResourceRolesUIDUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 teams resource roles Uid update params +func (o *V1TeamsResourceRolesUIDUpdateParams) WithHTTPClient(client *http.Client) *V1TeamsResourceRolesUIDUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 teams resource roles Uid update params +func (o *V1TeamsResourceRolesUIDUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 teams resource roles Uid update params +func (o *V1TeamsResourceRolesUIDUpdateParams) WithBody(body *models.V1ResourceRolesUpdateEntity) *V1TeamsResourceRolesUIDUpdateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 teams resource roles Uid update params +func (o *V1TeamsResourceRolesUIDUpdateParams) SetBody(body *models.V1ResourceRolesUpdateEntity) { + o.Body = body +} + +// WithResourceRoleUID adds the resourceRoleUID to the v1 teams resource roles Uid update params +func (o *V1TeamsResourceRolesUIDUpdateParams) WithResourceRoleUID(resourceRoleUID string) *V1TeamsResourceRolesUIDUpdateParams { + o.SetResourceRoleUID(resourceRoleUID) + return o +} + +// SetResourceRoleUID adds the resourceRoleUid to the v1 teams resource roles Uid update params +func (o *V1TeamsResourceRolesUIDUpdateParams) SetResourceRoleUID(resourceRoleUID string) { + o.ResourceRoleUID = resourceRoleUID +} + +// WithUID adds the uid to the v1 teams resource roles Uid update params +func (o *V1TeamsResourceRolesUIDUpdateParams) WithUID(uid string) *V1TeamsResourceRolesUIDUpdateParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 teams resource roles Uid update params +func (o *V1TeamsResourceRolesUIDUpdateParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1TeamsResourceRolesUIDUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param resourceRoleUid + if err := r.SetPathParam("resourceRoleUid", o.ResourceRoleUID); err != nil { + return err + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_teams_resource_roles_uid_update_responses.go b/api/client/v1/v1_teams_resource_roles_uid_update_responses.go new file mode 100644 index 00000000..7a6d0c99 --- /dev/null +++ b/api/client/v1/v1_teams_resource_roles_uid_update_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1TeamsResourceRolesUIDUpdateReader is a Reader for the V1TeamsResourceRolesUIDUpdate structure. +type V1TeamsResourceRolesUIDUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1TeamsResourceRolesUIDUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1TeamsResourceRolesUIDUpdateNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1TeamsResourceRolesUIDUpdateNoContent creates a V1TeamsResourceRolesUIDUpdateNoContent with default headers values +func NewV1TeamsResourceRolesUIDUpdateNoContent() *V1TeamsResourceRolesUIDUpdateNoContent { + return &V1TeamsResourceRolesUIDUpdateNoContent{} +} + +/* +V1TeamsResourceRolesUIDUpdateNoContent handles this case with default header values. + +The resource was updated successfully +*/ +type V1TeamsResourceRolesUIDUpdateNoContent struct { +} + +func (o *V1TeamsResourceRolesUIDUpdateNoContent) Error() string { + return fmt.Sprintf("[PATCH /v1/teams/{uid}/resourceRoles/{resourceRoleUid}][%d] v1TeamsResourceRolesUidUpdateNoContent ", 204) +} + +func (o *V1TeamsResourceRolesUIDUpdateNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_teams_summary_get_parameters.go b/api/client/v1/v1_teams_summary_get_parameters.go new file mode 100644 index 00000000..1c0e352c --- /dev/null +++ b/api/client/v1/v1_teams_summary_get_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1TeamsSummaryGetParams creates a new V1TeamsSummaryGetParams object +// with the default values initialized. +func NewV1TeamsSummaryGetParams() *V1TeamsSummaryGetParams { + var () + return &V1TeamsSummaryGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1TeamsSummaryGetParamsWithTimeout creates a new V1TeamsSummaryGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1TeamsSummaryGetParamsWithTimeout(timeout time.Duration) *V1TeamsSummaryGetParams { + var () + return &V1TeamsSummaryGetParams{ + + timeout: timeout, + } +} + +// NewV1TeamsSummaryGetParamsWithContext creates a new V1TeamsSummaryGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1TeamsSummaryGetParamsWithContext(ctx context.Context) *V1TeamsSummaryGetParams { + var () + return &V1TeamsSummaryGetParams{ + + Context: ctx, + } +} + +// NewV1TeamsSummaryGetParamsWithHTTPClient creates a new V1TeamsSummaryGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1TeamsSummaryGetParamsWithHTTPClient(client *http.Client) *V1TeamsSummaryGetParams { + var () + return &V1TeamsSummaryGetParams{ + HTTPClient: client, + } +} + +/* +V1TeamsSummaryGetParams contains all the parameters to send to the API endpoint +for the v1 teams summary get operation typically these are written to a http.Request +*/ +type V1TeamsSummaryGetParams struct { + + /*Body*/ + Body *models.V1TeamsSummarySpec + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 teams summary get params +func (o *V1TeamsSummaryGetParams) WithTimeout(timeout time.Duration) *V1TeamsSummaryGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 teams summary get params +func (o *V1TeamsSummaryGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 teams summary get params +func (o *V1TeamsSummaryGetParams) WithContext(ctx context.Context) *V1TeamsSummaryGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 teams summary get params +func (o *V1TeamsSummaryGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 teams summary get params +func (o *V1TeamsSummaryGetParams) WithHTTPClient(client *http.Client) *V1TeamsSummaryGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 teams summary get params +func (o *V1TeamsSummaryGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 teams summary get params +func (o *V1TeamsSummaryGetParams) WithBody(body *models.V1TeamsSummarySpec) *V1TeamsSummaryGetParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 teams summary get params +func (o *V1TeamsSummaryGetParams) SetBody(body *models.V1TeamsSummarySpec) { + o.Body = body +} + +// WriteToRequest writes these params to a swagger request +func (o *V1TeamsSummaryGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_teams_summary_get_responses.go b/api/client/v1/v1_teams_summary_get_responses.go new file mode 100644 index 00000000..ccd3ae9e --- /dev/null +++ b/api/client/v1/v1_teams_summary_get_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1TeamsSummaryGetReader is a Reader for the V1TeamsSummaryGet structure. +type V1TeamsSummaryGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1TeamsSummaryGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1TeamsSummaryGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1TeamsSummaryGetOK creates a V1TeamsSummaryGetOK with default headers values +func NewV1TeamsSummaryGetOK() *V1TeamsSummaryGetOK { + return &V1TeamsSummaryGetOK{} +} + +/* +V1TeamsSummaryGetOK handles this case with default header values. + +An array of teams summary items +*/ +type V1TeamsSummaryGetOK struct { + Payload *models.V1TeamsSummaryList +} + +func (o *V1TeamsSummaryGetOK) Error() string { + return fmt.Sprintf("[POST /v1/teams/summary][%d] v1TeamsSummaryGetOK %+v", 200, o.Payload) +} + +func (o *V1TeamsSummaryGetOK) GetPayload() *models.V1TeamsSummaryList { + return o.Payload +} + +func (o *V1TeamsSummaryGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1TeamsSummaryList) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_teams_uid_delete_parameters.go b/api/client/v1/v1_teams_uid_delete_parameters.go new file mode 100644 index 00000000..b2e022d5 --- /dev/null +++ b/api/client/v1/v1_teams_uid_delete_parameters.go @@ -0,0 +1,133 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1TeamsUIDDeleteParams creates a new V1TeamsUIDDeleteParams object +// with the default values initialized. +func NewV1TeamsUIDDeleteParams() *V1TeamsUIDDeleteParams { + var () + return &V1TeamsUIDDeleteParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1TeamsUIDDeleteParamsWithTimeout creates a new V1TeamsUIDDeleteParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1TeamsUIDDeleteParamsWithTimeout(timeout time.Duration) *V1TeamsUIDDeleteParams { + var () + return &V1TeamsUIDDeleteParams{ + + timeout: timeout, + } +} + +// NewV1TeamsUIDDeleteParamsWithContext creates a new V1TeamsUIDDeleteParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1TeamsUIDDeleteParamsWithContext(ctx context.Context) *V1TeamsUIDDeleteParams { + var () + return &V1TeamsUIDDeleteParams{ + + Context: ctx, + } +} + +// NewV1TeamsUIDDeleteParamsWithHTTPClient creates a new V1TeamsUIDDeleteParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1TeamsUIDDeleteParamsWithHTTPClient(client *http.Client) *V1TeamsUIDDeleteParams { + var () + return &V1TeamsUIDDeleteParams{ + HTTPClient: client, + } +} + +/* +V1TeamsUIDDeleteParams contains all the parameters to send to the API endpoint +for the v1 teams Uid delete operation typically these are written to a http.Request +*/ +type V1TeamsUIDDeleteParams struct { + + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 teams Uid delete params +func (o *V1TeamsUIDDeleteParams) WithTimeout(timeout time.Duration) *V1TeamsUIDDeleteParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 teams Uid delete params +func (o *V1TeamsUIDDeleteParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 teams Uid delete params +func (o *V1TeamsUIDDeleteParams) WithContext(ctx context.Context) *V1TeamsUIDDeleteParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 teams Uid delete params +func (o *V1TeamsUIDDeleteParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 teams Uid delete params +func (o *V1TeamsUIDDeleteParams) WithHTTPClient(client *http.Client) *V1TeamsUIDDeleteParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 teams Uid delete params +func (o *V1TeamsUIDDeleteParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithUID adds the uid to the v1 teams Uid delete params +func (o *V1TeamsUIDDeleteParams) WithUID(uid string) *V1TeamsUIDDeleteParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 teams Uid delete params +func (o *V1TeamsUIDDeleteParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1TeamsUIDDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_teams_uid_delete_responses.go b/api/client/v1/v1_teams_uid_delete_responses.go new file mode 100644 index 00000000..1604641f --- /dev/null +++ b/api/client/v1/v1_teams_uid_delete_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1TeamsUIDDeleteReader is a Reader for the V1TeamsUIDDelete structure. +type V1TeamsUIDDeleteReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1TeamsUIDDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1TeamsUIDDeleteNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1TeamsUIDDeleteNoContent creates a V1TeamsUIDDeleteNoContent with default headers values +func NewV1TeamsUIDDeleteNoContent() *V1TeamsUIDDeleteNoContent { + return &V1TeamsUIDDeleteNoContent{} +} + +/* +V1TeamsUIDDeleteNoContent handles this case with default header values. + +The resource was deleted successfully +*/ +type V1TeamsUIDDeleteNoContent struct { +} + +func (o *V1TeamsUIDDeleteNoContent) Error() string { + return fmt.Sprintf("[DELETE /v1/teams/{uid}][%d] v1TeamsUidDeleteNoContent ", 204) +} + +func (o *V1TeamsUIDDeleteNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_teams_uid_get_parameters.go b/api/client/v1/v1_teams_uid_get_parameters.go new file mode 100644 index 00000000..9d1983f5 --- /dev/null +++ b/api/client/v1/v1_teams_uid_get_parameters.go @@ -0,0 +1,133 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1TeamsUIDGetParams creates a new V1TeamsUIDGetParams object +// with the default values initialized. +func NewV1TeamsUIDGetParams() *V1TeamsUIDGetParams { + var () + return &V1TeamsUIDGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1TeamsUIDGetParamsWithTimeout creates a new V1TeamsUIDGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1TeamsUIDGetParamsWithTimeout(timeout time.Duration) *V1TeamsUIDGetParams { + var () + return &V1TeamsUIDGetParams{ + + timeout: timeout, + } +} + +// NewV1TeamsUIDGetParamsWithContext creates a new V1TeamsUIDGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1TeamsUIDGetParamsWithContext(ctx context.Context) *V1TeamsUIDGetParams { + var () + return &V1TeamsUIDGetParams{ + + Context: ctx, + } +} + +// NewV1TeamsUIDGetParamsWithHTTPClient creates a new V1TeamsUIDGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1TeamsUIDGetParamsWithHTTPClient(client *http.Client) *V1TeamsUIDGetParams { + var () + return &V1TeamsUIDGetParams{ + HTTPClient: client, + } +} + +/* +V1TeamsUIDGetParams contains all the parameters to send to the API endpoint +for the v1 teams Uid get operation typically these are written to a http.Request +*/ +type V1TeamsUIDGetParams struct { + + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 teams Uid get params +func (o *V1TeamsUIDGetParams) WithTimeout(timeout time.Duration) *V1TeamsUIDGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 teams Uid get params +func (o *V1TeamsUIDGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 teams Uid get params +func (o *V1TeamsUIDGetParams) WithContext(ctx context.Context) *V1TeamsUIDGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 teams Uid get params +func (o *V1TeamsUIDGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 teams Uid get params +func (o *V1TeamsUIDGetParams) WithHTTPClient(client *http.Client) *V1TeamsUIDGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 teams Uid get params +func (o *V1TeamsUIDGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithUID adds the uid to the v1 teams Uid get params +func (o *V1TeamsUIDGetParams) WithUID(uid string) *V1TeamsUIDGetParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 teams Uid get params +func (o *V1TeamsUIDGetParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1TeamsUIDGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_teams_uid_get_responses.go b/api/client/v1/v1_teams_uid_get_responses.go new file mode 100644 index 00000000..04106e85 --- /dev/null +++ b/api/client/v1/v1_teams_uid_get_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1TeamsUIDGetReader is a Reader for the V1TeamsUIDGet structure. +type V1TeamsUIDGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1TeamsUIDGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1TeamsUIDGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1TeamsUIDGetOK creates a V1TeamsUIDGetOK with default headers values +func NewV1TeamsUIDGetOK() *V1TeamsUIDGetOK { + return &V1TeamsUIDGetOK{} +} + +/* +V1TeamsUIDGetOK handles this case with default header values. + +OK +*/ +type V1TeamsUIDGetOK struct { + Payload *models.V1Team +} + +func (o *V1TeamsUIDGetOK) Error() string { + return fmt.Sprintf("[GET /v1/teams/{uid}][%d] v1TeamsUidGetOK %+v", 200, o.Payload) +} + +func (o *V1TeamsUIDGetOK) GetPayload() *models.V1Team { + return o.Payload +} + +func (o *V1TeamsUIDGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1Team) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_teams_uid_patch_parameters.go b/api/client/v1/v1_teams_uid_patch_parameters.go new file mode 100644 index 00000000..0f823276 --- /dev/null +++ b/api/client/v1/v1_teams_uid_patch_parameters.go @@ -0,0 +1,154 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1TeamsUIDPatchParams creates a new V1TeamsUIDPatchParams object +// with the default values initialized. +func NewV1TeamsUIDPatchParams() *V1TeamsUIDPatchParams { + var () + return &V1TeamsUIDPatchParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1TeamsUIDPatchParamsWithTimeout creates a new V1TeamsUIDPatchParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1TeamsUIDPatchParamsWithTimeout(timeout time.Duration) *V1TeamsUIDPatchParams { + var () + return &V1TeamsUIDPatchParams{ + + timeout: timeout, + } +} + +// NewV1TeamsUIDPatchParamsWithContext creates a new V1TeamsUIDPatchParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1TeamsUIDPatchParamsWithContext(ctx context.Context) *V1TeamsUIDPatchParams { + var () + return &V1TeamsUIDPatchParams{ + + Context: ctx, + } +} + +// NewV1TeamsUIDPatchParamsWithHTTPClient creates a new V1TeamsUIDPatchParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1TeamsUIDPatchParamsWithHTTPClient(client *http.Client) *V1TeamsUIDPatchParams { + var () + return &V1TeamsUIDPatchParams{ + HTTPClient: client, + } +} + +/* +V1TeamsUIDPatchParams contains all the parameters to send to the API endpoint +for the v1 teams Uid patch operation typically these are written to a http.Request +*/ +type V1TeamsUIDPatchParams struct { + + /*Body*/ + Body models.V1TeamPatch + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 teams Uid patch params +func (o *V1TeamsUIDPatchParams) WithTimeout(timeout time.Duration) *V1TeamsUIDPatchParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 teams Uid patch params +func (o *V1TeamsUIDPatchParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 teams Uid patch params +func (o *V1TeamsUIDPatchParams) WithContext(ctx context.Context) *V1TeamsUIDPatchParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 teams Uid patch params +func (o *V1TeamsUIDPatchParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 teams Uid patch params +func (o *V1TeamsUIDPatchParams) WithHTTPClient(client *http.Client) *V1TeamsUIDPatchParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 teams Uid patch params +func (o *V1TeamsUIDPatchParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 teams Uid patch params +func (o *V1TeamsUIDPatchParams) WithBody(body models.V1TeamPatch) *V1TeamsUIDPatchParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 teams Uid patch params +func (o *V1TeamsUIDPatchParams) SetBody(body models.V1TeamPatch) { + o.Body = body +} + +// WithUID adds the uid to the v1 teams Uid patch params +func (o *V1TeamsUIDPatchParams) WithUID(uid string) *V1TeamsUIDPatchParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 teams Uid patch params +func (o *V1TeamsUIDPatchParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1TeamsUIDPatchParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_teams_uid_patch_responses.go b/api/client/v1/v1_teams_uid_patch_responses.go new file mode 100644 index 00000000..159f4d67 --- /dev/null +++ b/api/client/v1/v1_teams_uid_patch_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1TeamsUIDPatchReader is a Reader for the V1TeamsUIDPatch structure. +type V1TeamsUIDPatchReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1TeamsUIDPatchReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1TeamsUIDPatchNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1TeamsUIDPatchNoContent creates a V1TeamsUIDPatchNoContent with default headers values +func NewV1TeamsUIDPatchNoContent() *V1TeamsUIDPatchNoContent { + return &V1TeamsUIDPatchNoContent{} +} + +/* +V1TeamsUIDPatchNoContent handles this case with default header values. + +The resource was updated successfully +*/ +type V1TeamsUIDPatchNoContent struct { +} + +func (o *V1TeamsUIDPatchNoContent) Error() string { + return fmt.Sprintf("[PATCH /v1/teams/{uid}][%d] v1TeamsUidPatchNoContent ", 204) +} + +func (o *V1TeamsUIDPatchNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_teams_uid_resource_roles_create_parameters.go b/api/client/v1/v1_teams_uid_resource_roles_create_parameters.go new file mode 100644 index 00000000..4859f6b6 --- /dev/null +++ b/api/client/v1/v1_teams_uid_resource_roles_create_parameters.go @@ -0,0 +1,154 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1TeamsUIDResourceRolesCreateParams creates a new V1TeamsUIDResourceRolesCreateParams object +// with the default values initialized. +func NewV1TeamsUIDResourceRolesCreateParams() *V1TeamsUIDResourceRolesCreateParams { + var () + return &V1TeamsUIDResourceRolesCreateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1TeamsUIDResourceRolesCreateParamsWithTimeout creates a new V1TeamsUIDResourceRolesCreateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1TeamsUIDResourceRolesCreateParamsWithTimeout(timeout time.Duration) *V1TeamsUIDResourceRolesCreateParams { + var () + return &V1TeamsUIDResourceRolesCreateParams{ + + timeout: timeout, + } +} + +// NewV1TeamsUIDResourceRolesCreateParamsWithContext creates a new V1TeamsUIDResourceRolesCreateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1TeamsUIDResourceRolesCreateParamsWithContext(ctx context.Context) *V1TeamsUIDResourceRolesCreateParams { + var () + return &V1TeamsUIDResourceRolesCreateParams{ + + Context: ctx, + } +} + +// NewV1TeamsUIDResourceRolesCreateParamsWithHTTPClient creates a new V1TeamsUIDResourceRolesCreateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1TeamsUIDResourceRolesCreateParamsWithHTTPClient(client *http.Client) *V1TeamsUIDResourceRolesCreateParams { + var () + return &V1TeamsUIDResourceRolesCreateParams{ + HTTPClient: client, + } +} + +/* +V1TeamsUIDResourceRolesCreateParams contains all the parameters to send to the API endpoint +for the v1 teams Uid resource roles create operation typically these are written to a http.Request +*/ +type V1TeamsUIDResourceRolesCreateParams struct { + + /*Body*/ + Body *models.V1ResourceRolesUpdateEntity + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 teams Uid resource roles create params +func (o *V1TeamsUIDResourceRolesCreateParams) WithTimeout(timeout time.Duration) *V1TeamsUIDResourceRolesCreateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 teams Uid resource roles create params +func (o *V1TeamsUIDResourceRolesCreateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 teams Uid resource roles create params +func (o *V1TeamsUIDResourceRolesCreateParams) WithContext(ctx context.Context) *V1TeamsUIDResourceRolesCreateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 teams Uid resource roles create params +func (o *V1TeamsUIDResourceRolesCreateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 teams Uid resource roles create params +func (o *V1TeamsUIDResourceRolesCreateParams) WithHTTPClient(client *http.Client) *V1TeamsUIDResourceRolesCreateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 teams Uid resource roles create params +func (o *V1TeamsUIDResourceRolesCreateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 teams Uid resource roles create params +func (o *V1TeamsUIDResourceRolesCreateParams) WithBody(body *models.V1ResourceRolesUpdateEntity) *V1TeamsUIDResourceRolesCreateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 teams Uid resource roles create params +func (o *V1TeamsUIDResourceRolesCreateParams) SetBody(body *models.V1ResourceRolesUpdateEntity) { + o.Body = body +} + +// WithUID adds the uid to the v1 teams Uid resource roles create params +func (o *V1TeamsUIDResourceRolesCreateParams) WithUID(uid string) *V1TeamsUIDResourceRolesCreateParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 teams Uid resource roles create params +func (o *V1TeamsUIDResourceRolesCreateParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1TeamsUIDResourceRolesCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_teams_uid_resource_roles_create_responses.go b/api/client/v1/v1_teams_uid_resource_roles_create_responses.go new file mode 100644 index 00000000..86c496c8 --- /dev/null +++ b/api/client/v1/v1_teams_uid_resource_roles_create_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1TeamsUIDResourceRolesCreateReader is a Reader for the V1TeamsUIDResourceRolesCreate structure. +type V1TeamsUIDResourceRolesCreateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1TeamsUIDResourceRolesCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1TeamsUIDResourceRolesCreateNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1TeamsUIDResourceRolesCreateNoContent creates a V1TeamsUIDResourceRolesCreateNoContent with default headers values +func NewV1TeamsUIDResourceRolesCreateNoContent() *V1TeamsUIDResourceRolesCreateNoContent { + return &V1TeamsUIDResourceRolesCreateNoContent{} +} + +/* +V1TeamsUIDResourceRolesCreateNoContent handles this case with default header values. + +The resource was updated successfully +*/ +type V1TeamsUIDResourceRolesCreateNoContent struct { +} + +func (o *V1TeamsUIDResourceRolesCreateNoContent) Error() string { + return fmt.Sprintf("[POST /v1/teams/{uid}/resourceRoles][%d] v1TeamsUidResourceRolesCreateNoContent ", 204) +} + +func (o *V1TeamsUIDResourceRolesCreateNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_teams_uid_resource_roles_parameters.go b/api/client/v1/v1_teams_uid_resource_roles_parameters.go new file mode 100644 index 00000000..780be014 --- /dev/null +++ b/api/client/v1/v1_teams_uid_resource_roles_parameters.go @@ -0,0 +1,133 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1TeamsUIDResourceRolesParams creates a new V1TeamsUIDResourceRolesParams object +// with the default values initialized. +func NewV1TeamsUIDResourceRolesParams() *V1TeamsUIDResourceRolesParams { + var () + return &V1TeamsUIDResourceRolesParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1TeamsUIDResourceRolesParamsWithTimeout creates a new V1TeamsUIDResourceRolesParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1TeamsUIDResourceRolesParamsWithTimeout(timeout time.Duration) *V1TeamsUIDResourceRolesParams { + var () + return &V1TeamsUIDResourceRolesParams{ + + timeout: timeout, + } +} + +// NewV1TeamsUIDResourceRolesParamsWithContext creates a new V1TeamsUIDResourceRolesParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1TeamsUIDResourceRolesParamsWithContext(ctx context.Context) *V1TeamsUIDResourceRolesParams { + var () + return &V1TeamsUIDResourceRolesParams{ + + Context: ctx, + } +} + +// NewV1TeamsUIDResourceRolesParamsWithHTTPClient creates a new V1TeamsUIDResourceRolesParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1TeamsUIDResourceRolesParamsWithHTTPClient(client *http.Client) *V1TeamsUIDResourceRolesParams { + var () + return &V1TeamsUIDResourceRolesParams{ + HTTPClient: client, + } +} + +/* +V1TeamsUIDResourceRolesParams contains all the parameters to send to the API endpoint +for the v1 teams Uid resource roles operation typically these are written to a http.Request +*/ +type V1TeamsUIDResourceRolesParams struct { + + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 teams Uid resource roles params +func (o *V1TeamsUIDResourceRolesParams) WithTimeout(timeout time.Duration) *V1TeamsUIDResourceRolesParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 teams Uid resource roles params +func (o *V1TeamsUIDResourceRolesParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 teams Uid resource roles params +func (o *V1TeamsUIDResourceRolesParams) WithContext(ctx context.Context) *V1TeamsUIDResourceRolesParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 teams Uid resource roles params +func (o *V1TeamsUIDResourceRolesParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 teams Uid resource roles params +func (o *V1TeamsUIDResourceRolesParams) WithHTTPClient(client *http.Client) *V1TeamsUIDResourceRolesParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 teams Uid resource roles params +func (o *V1TeamsUIDResourceRolesParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithUID adds the uid to the v1 teams Uid resource roles params +func (o *V1TeamsUIDResourceRolesParams) WithUID(uid string) *V1TeamsUIDResourceRolesParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 teams Uid resource roles params +func (o *V1TeamsUIDResourceRolesParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1TeamsUIDResourceRolesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_teams_uid_resource_roles_responses.go b/api/client/v1/v1_teams_uid_resource_roles_responses.go new file mode 100644 index 00000000..be5b2a31 --- /dev/null +++ b/api/client/v1/v1_teams_uid_resource_roles_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1TeamsUIDResourceRolesReader is a Reader for the V1TeamsUIDResourceRoles structure. +type V1TeamsUIDResourceRolesReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1TeamsUIDResourceRolesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1TeamsUIDResourceRolesOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1TeamsUIDResourceRolesOK creates a V1TeamsUIDResourceRolesOK with default headers values +func NewV1TeamsUIDResourceRolesOK() *V1TeamsUIDResourceRolesOK { + return &V1TeamsUIDResourceRolesOK{} +} + +/* +V1TeamsUIDResourceRolesOK handles this case with default header values. + +OK +*/ +type V1TeamsUIDResourceRolesOK struct { + Payload *models.V1ResourceRoles +} + +func (o *V1TeamsUIDResourceRolesOK) Error() string { + return fmt.Sprintf("[GET /v1/teams/{uid}/resourceRoles][%d] v1TeamsUidResourceRolesOK %+v", 200, o.Payload) +} + +func (o *V1TeamsUIDResourceRolesOK) GetPayload() *models.V1ResourceRoles { + return o.Payload +} + +func (o *V1TeamsUIDResourceRolesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1ResourceRoles) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_teams_uid_resource_roles_uid_delete_parameters.go b/api/client/v1/v1_teams_uid_resource_roles_uid_delete_parameters.go new file mode 100644 index 00000000..7cc320a6 --- /dev/null +++ b/api/client/v1/v1_teams_uid_resource_roles_uid_delete_parameters.go @@ -0,0 +1,151 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1TeamsUIDResourceRolesUIDDeleteParams creates a new V1TeamsUIDResourceRolesUIDDeleteParams object +// with the default values initialized. +func NewV1TeamsUIDResourceRolesUIDDeleteParams() *V1TeamsUIDResourceRolesUIDDeleteParams { + var () + return &V1TeamsUIDResourceRolesUIDDeleteParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1TeamsUIDResourceRolesUIDDeleteParamsWithTimeout creates a new V1TeamsUIDResourceRolesUIDDeleteParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1TeamsUIDResourceRolesUIDDeleteParamsWithTimeout(timeout time.Duration) *V1TeamsUIDResourceRolesUIDDeleteParams { + var () + return &V1TeamsUIDResourceRolesUIDDeleteParams{ + + timeout: timeout, + } +} + +// NewV1TeamsUIDResourceRolesUIDDeleteParamsWithContext creates a new V1TeamsUIDResourceRolesUIDDeleteParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1TeamsUIDResourceRolesUIDDeleteParamsWithContext(ctx context.Context) *V1TeamsUIDResourceRolesUIDDeleteParams { + var () + return &V1TeamsUIDResourceRolesUIDDeleteParams{ + + Context: ctx, + } +} + +// NewV1TeamsUIDResourceRolesUIDDeleteParamsWithHTTPClient creates a new V1TeamsUIDResourceRolesUIDDeleteParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1TeamsUIDResourceRolesUIDDeleteParamsWithHTTPClient(client *http.Client) *V1TeamsUIDResourceRolesUIDDeleteParams { + var () + return &V1TeamsUIDResourceRolesUIDDeleteParams{ + HTTPClient: client, + } +} + +/* +V1TeamsUIDResourceRolesUIDDeleteParams contains all the parameters to send to the API endpoint +for the v1 teams Uid resource roles Uid delete operation typically these are written to a http.Request +*/ +type V1TeamsUIDResourceRolesUIDDeleteParams struct { + + /*ResourceRoleUID*/ + ResourceRoleUID string + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 teams Uid resource roles Uid delete params +func (o *V1TeamsUIDResourceRolesUIDDeleteParams) WithTimeout(timeout time.Duration) *V1TeamsUIDResourceRolesUIDDeleteParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 teams Uid resource roles Uid delete params +func (o *V1TeamsUIDResourceRolesUIDDeleteParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 teams Uid resource roles Uid delete params +func (o *V1TeamsUIDResourceRolesUIDDeleteParams) WithContext(ctx context.Context) *V1TeamsUIDResourceRolesUIDDeleteParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 teams Uid resource roles Uid delete params +func (o *V1TeamsUIDResourceRolesUIDDeleteParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 teams Uid resource roles Uid delete params +func (o *V1TeamsUIDResourceRolesUIDDeleteParams) WithHTTPClient(client *http.Client) *V1TeamsUIDResourceRolesUIDDeleteParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 teams Uid resource roles Uid delete params +func (o *V1TeamsUIDResourceRolesUIDDeleteParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithResourceRoleUID adds the resourceRoleUID to the v1 teams Uid resource roles Uid delete params +func (o *V1TeamsUIDResourceRolesUIDDeleteParams) WithResourceRoleUID(resourceRoleUID string) *V1TeamsUIDResourceRolesUIDDeleteParams { + o.SetResourceRoleUID(resourceRoleUID) + return o +} + +// SetResourceRoleUID adds the resourceRoleUid to the v1 teams Uid resource roles Uid delete params +func (o *V1TeamsUIDResourceRolesUIDDeleteParams) SetResourceRoleUID(resourceRoleUID string) { + o.ResourceRoleUID = resourceRoleUID +} + +// WithUID adds the uid to the v1 teams Uid resource roles Uid delete params +func (o *V1TeamsUIDResourceRolesUIDDeleteParams) WithUID(uid string) *V1TeamsUIDResourceRolesUIDDeleteParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 teams Uid resource roles Uid delete params +func (o *V1TeamsUIDResourceRolesUIDDeleteParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1TeamsUIDResourceRolesUIDDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param resourceRoleUid + if err := r.SetPathParam("resourceRoleUid", o.ResourceRoleUID); err != nil { + return err + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_teams_uid_resource_roles_uid_delete_responses.go b/api/client/v1/v1_teams_uid_resource_roles_uid_delete_responses.go new file mode 100644 index 00000000..2a06e032 --- /dev/null +++ b/api/client/v1/v1_teams_uid_resource_roles_uid_delete_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1TeamsUIDResourceRolesUIDDeleteReader is a Reader for the V1TeamsUIDResourceRolesUIDDelete structure. +type V1TeamsUIDResourceRolesUIDDeleteReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1TeamsUIDResourceRolesUIDDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1TeamsUIDResourceRolesUIDDeleteNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1TeamsUIDResourceRolesUIDDeleteNoContent creates a V1TeamsUIDResourceRolesUIDDeleteNoContent with default headers values +func NewV1TeamsUIDResourceRolesUIDDeleteNoContent() *V1TeamsUIDResourceRolesUIDDeleteNoContent { + return &V1TeamsUIDResourceRolesUIDDeleteNoContent{} +} + +/* +V1TeamsUIDResourceRolesUIDDeleteNoContent handles this case with default header values. + +The resource was deleted successfully +*/ +type V1TeamsUIDResourceRolesUIDDeleteNoContent struct { +} + +func (o *V1TeamsUIDResourceRolesUIDDeleteNoContent) Error() string { + return fmt.Sprintf("[DELETE /v1/teams/{uid}/resourceRoles/{resourceRoleUid}][%d] v1TeamsUidResourceRolesUidDeleteNoContent ", 204) +} + +func (o *V1TeamsUIDResourceRolesUIDDeleteNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_teams_uid_tenant_roles_get_parameters.go b/api/client/v1/v1_teams_uid_tenant_roles_get_parameters.go new file mode 100644 index 00000000..8461d534 --- /dev/null +++ b/api/client/v1/v1_teams_uid_tenant_roles_get_parameters.go @@ -0,0 +1,133 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1TeamsUIDTenantRolesGetParams creates a new V1TeamsUIDTenantRolesGetParams object +// with the default values initialized. +func NewV1TeamsUIDTenantRolesGetParams() *V1TeamsUIDTenantRolesGetParams { + var () + return &V1TeamsUIDTenantRolesGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1TeamsUIDTenantRolesGetParamsWithTimeout creates a new V1TeamsUIDTenantRolesGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1TeamsUIDTenantRolesGetParamsWithTimeout(timeout time.Duration) *V1TeamsUIDTenantRolesGetParams { + var () + return &V1TeamsUIDTenantRolesGetParams{ + + timeout: timeout, + } +} + +// NewV1TeamsUIDTenantRolesGetParamsWithContext creates a new V1TeamsUIDTenantRolesGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1TeamsUIDTenantRolesGetParamsWithContext(ctx context.Context) *V1TeamsUIDTenantRolesGetParams { + var () + return &V1TeamsUIDTenantRolesGetParams{ + + Context: ctx, + } +} + +// NewV1TeamsUIDTenantRolesGetParamsWithHTTPClient creates a new V1TeamsUIDTenantRolesGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1TeamsUIDTenantRolesGetParamsWithHTTPClient(client *http.Client) *V1TeamsUIDTenantRolesGetParams { + var () + return &V1TeamsUIDTenantRolesGetParams{ + HTTPClient: client, + } +} + +/* +V1TeamsUIDTenantRolesGetParams contains all the parameters to send to the API endpoint +for the v1 teams Uid tenant roles get operation typically these are written to a http.Request +*/ +type V1TeamsUIDTenantRolesGetParams struct { + + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 teams Uid tenant roles get params +func (o *V1TeamsUIDTenantRolesGetParams) WithTimeout(timeout time.Duration) *V1TeamsUIDTenantRolesGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 teams Uid tenant roles get params +func (o *V1TeamsUIDTenantRolesGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 teams Uid tenant roles get params +func (o *V1TeamsUIDTenantRolesGetParams) WithContext(ctx context.Context) *V1TeamsUIDTenantRolesGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 teams Uid tenant roles get params +func (o *V1TeamsUIDTenantRolesGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 teams Uid tenant roles get params +func (o *V1TeamsUIDTenantRolesGetParams) WithHTTPClient(client *http.Client) *V1TeamsUIDTenantRolesGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 teams Uid tenant roles get params +func (o *V1TeamsUIDTenantRolesGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithUID adds the uid to the v1 teams Uid tenant roles get params +func (o *V1TeamsUIDTenantRolesGetParams) WithUID(uid string) *V1TeamsUIDTenantRolesGetParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 teams Uid tenant roles get params +func (o *V1TeamsUIDTenantRolesGetParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1TeamsUIDTenantRolesGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_teams_uid_tenant_roles_get_responses.go b/api/client/v1/v1_teams_uid_tenant_roles_get_responses.go new file mode 100644 index 00000000..21886bc9 --- /dev/null +++ b/api/client/v1/v1_teams_uid_tenant_roles_get_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1TeamsUIDTenantRolesGetReader is a Reader for the V1TeamsUIDTenantRolesGet structure. +type V1TeamsUIDTenantRolesGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1TeamsUIDTenantRolesGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1TeamsUIDTenantRolesGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1TeamsUIDTenantRolesGetOK creates a V1TeamsUIDTenantRolesGetOK with default headers values +func NewV1TeamsUIDTenantRolesGetOK() *V1TeamsUIDTenantRolesGetOK { + return &V1TeamsUIDTenantRolesGetOK{} +} + +/* +V1TeamsUIDTenantRolesGetOK handles this case with default header values. + +OK +*/ +type V1TeamsUIDTenantRolesGetOK struct { + Payload *models.V1TeamTenantRolesEntity +} + +func (o *V1TeamsUIDTenantRolesGetOK) Error() string { + return fmt.Sprintf("[GET /v1/teams/{uid}/roles][%d] v1TeamsUidTenantRolesGetOK %+v", 200, o.Payload) +} + +func (o *V1TeamsUIDTenantRolesGetOK) GetPayload() *models.V1TeamTenantRolesEntity { + return o.Payload +} + +func (o *V1TeamsUIDTenantRolesGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1TeamTenantRolesEntity) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_teams_uid_tenant_roles_update_parameters.go b/api/client/v1/v1_teams_uid_tenant_roles_update_parameters.go new file mode 100644 index 00000000..b4091fe1 --- /dev/null +++ b/api/client/v1/v1_teams_uid_tenant_roles_update_parameters.go @@ -0,0 +1,154 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1TeamsUIDTenantRolesUpdateParams creates a new V1TeamsUIDTenantRolesUpdateParams object +// with the default values initialized. +func NewV1TeamsUIDTenantRolesUpdateParams() *V1TeamsUIDTenantRolesUpdateParams { + var () + return &V1TeamsUIDTenantRolesUpdateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1TeamsUIDTenantRolesUpdateParamsWithTimeout creates a new V1TeamsUIDTenantRolesUpdateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1TeamsUIDTenantRolesUpdateParamsWithTimeout(timeout time.Duration) *V1TeamsUIDTenantRolesUpdateParams { + var () + return &V1TeamsUIDTenantRolesUpdateParams{ + + timeout: timeout, + } +} + +// NewV1TeamsUIDTenantRolesUpdateParamsWithContext creates a new V1TeamsUIDTenantRolesUpdateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1TeamsUIDTenantRolesUpdateParamsWithContext(ctx context.Context) *V1TeamsUIDTenantRolesUpdateParams { + var () + return &V1TeamsUIDTenantRolesUpdateParams{ + + Context: ctx, + } +} + +// NewV1TeamsUIDTenantRolesUpdateParamsWithHTTPClient creates a new V1TeamsUIDTenantRolesUpdateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1TeamsUIDTenantRolesUpdateParamsWithHTTPClient(client *http.Client) *V1TeamsUIDTenantRolesUpdateParams { + var () + return &V1TeamsUIDTenantRolesUpdateParams{ + HTTPClient: client, + } +} + +/* +V1TeamsUIDTenantRolesUpdateParams contains all the parameters to send to the API endpoint +for the v1 teams Uid tenant roles update operation typically these are written to a http.Request +*/ +type V1TeamsUIDTenantRolesUpdateParams struct { + + /*Body*/ + Body *models.V1TeamTenantRolesUpdate + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 teams Uid tenant roles update params +func (o *V1TeamsUIDTenantRolesUpdateParams) WithTimeout(timeout time.Duration) *V1TeamsUIDTenantRolesUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 teams Uid tenant roles update params +func (o *V1TeamsUIDTenantRolesUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 teams Uid tenant roles update params +func (o *V1TeamsUIDTenantRolesUpdateParams) WithContext(ctx context.Context) *V1TeamsUIDTenantRolesUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 teams Uid tenant roles update params +func (o *V1TeamsUIDTenantRolesUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 teams Uid tenant roles update params +func (o *V1TeamsUIDTenantRolesUpdateParams) WithHTTPClient(client *http.Client) *V1TeamsUIDTenantRolesUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 teams Uid tenant roles update params +func (o *V1TeamsUIDTenantRolesUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 teams Uid tenant roles update params +func (o *V1TeamsUIDTenantRolesUpdateParams) WithBody(body *models.V1TeamTenantRolesUpdate) *V1TeamsUIDTenantRolesUpdateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 teams Uid tenant roles update params +func (o *V1TeamsUIDTenantRolesUpdateParams) SetBody(body *models.V1TeamTenantRolesUpdate) { + o.Body = body +} + +// WithUID adds the uid to the v1 teams Uid tenant roles update params +func (o *V1TeamsUIDTenantRolesUpdateParams) WithUID(uid string) *V1TeamsUIDTenantRolesUpdateParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 teams Uid tenant roles update params +func (o *V1TeamsUIDTenantRolesUpdateParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1TeamsUIDTenantRolesUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_teams_uid_tenant_roles_update_responses.go b/api/client/v1/v1_teams_uid_tenant_roles_update_responses.go new file mode 100644 index 00000000..2c8400f4 --- /dev/null +++ b/api/client/v1/v1_teams_uid_tenant_roles_update_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1TeamsUIDTenantRolesUpdateReader is a Reader for the V1TeamsUIDTenantRolesUpdate structure. +type V1TeamsUIDTenantRolesUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1TeamsUIDTenantRolesUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1TeamsUIDTenantRolesUpdateNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1TeamsUIDTenantRolesUpdateNoContent creates a V1TeamsUIDTenantRolesUpdateNoContent with default headers values +func NewV1TeamsUIDTenantRolesUpdateNoContent() *V1TeamsUIDTenantRolesUpdateNoContent { + return &V1TeamsUIDTenantRolesUpdateNoContent{} +} + +/* +V1TeamsUIDTenantRolesUpdateNoContent handles this case with default header values. + +The resource was updated successfully +*/ +type V1TeamsUIDTenantRolesUpdateNoContent struct { +} + +func (o *V1TeamsUIDTenantRolesUpdateNoContent) Error() string { + return fmt.Sprintf("[PUT /v1/teams/{uid}/roles][%d] v1TeamsUidTenantRolesUpdateNoContent ", 204) +} + +func (o *V1TeamsUIDTenantRolesUpdateNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_teams_uid_update_parameters.go b/api/client/v1/v1_teams_uid_update_parameters.go new file mode 100644 index 00000000..e7a344eb --- /dev/null +++ b/api/client/v1/v1_teams_uid_update_parameters.go @@ -0,0 +1,154 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1TeamsUIDUpdateParams creates a new V1TeamsUIDUpdateParams object +// with the default values initialized. +func NewV1TeamsUIDUpdateParams() *V1TeamsUIDUpdateParams { + var () + return &V1TeamsUIDUpdateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1TeamsUIDUpdateParamsWithTimeout creates a new V1TeamsUIDUpdateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1TeamsUIDUpdateParamsWithTimeout(timeout time.Duration) *V1TeamsUIDUpdateParams { + var () + return &V1TeamsUIDUpdateParams{ + + timeout: timeout, + } +} + +// NewV1TeamsUIDUpdateParamsWithContext creates a new V1TeamsUIDUpdateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1TeamsUIDUpdateParamsWithContext(ctx context.Context) *V1TeamsUIDUpdateParams { + var () + return &V1TeamsUIDUpdateParams{ + + Context: ctx, + } +} + +// NewV1TeamsUIDUpdateParamsWithHTTPClient creates a new V1TeamsUIDUpdateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1TeamsUIDUpdateParamsWithHTTPClient(client *http.Client) *V1TeamsUIDUpdateParams { + var () + return &V1TeamsUIDUpdateParams{ + HTTPClient: client, + } +} + +/* +V1TeamsUIDUpdateParams contains all the parameters to send to the API endpoint +for the v1 teams Uid update operation typically these are written to a http.Request +*/ +type V1TeamsUIDUpdateParams struct { + + /*Body*/ + Body *models.V1Team + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 teams Uid update params +func (o *V1TeamsUIDUpdateParams) WithTimeout(timeout time.Duration) *V1TeamsUIDUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 teams Uid update params +func (o *V1TeamsUIDUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 teams Uid update params +func (o *V1TeamsUIDUpdateParams) WithContext(ctx context.Context) *V1TeamsUIDUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 teams Uid update params +func (o *V1TeamsUIDUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 teams Uid update params +func (o *V1TeamsUIDUpdateParams) WithHTTPClient(client *http.Client) *V1TeamsUIDUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 teams Uid update params +func (o *V1TeamsUIDUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 teams Uid update params +func (o *V1TeamsUIDUpdateParams) WithBody(body *models.V1Team) *V1TeamsUIDUpdateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 teams Uid update params +func (o *V1TeamsUIDUpdateParams) SetBody(body *models.V1Team) { + o.Body = body +} + +// WithUID adds the uid to the v1 teams Uid update params +func (o *V1TeamsUIDUpdateParams) WithUID(uid string) *V1TeamsUIDUpdateParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 teams Uid update params +func (o *V1TeamsUIDUpdateParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1TeamsUIDUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_teams_uid_update_responses.go b/api/client/v1/v1_teams_uid_update_responses.go new file mode 100644 index 00000000..d23003c8 --- /dev/null +++ b/api/client/v1/v1_teams_uid_update_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1TeamsUIDUpdateReader is a Reader for the V1TeamsUIDUpdate structure. +type V1TeamsUIDUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1TeamsUIDUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1TeamsUIDUpdateNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1TeamsUIDUpdateNoContent creates a V1TeamsUIDUpdateNoContent with default headers values +func NewV1TeamsUIDUpdateNoContent() *V1TeamsUIDUpdateNoContent { + return &V1TeamsUIDUpdateNoContent{} +} + +/* +V1TeamsUIDUpdateNoContent handles this case with default header values. + +The resource was updated successfully +*/ +type V1TeamsUIDUpdateNoContent struct { +} + +func (o *V1TeamsUIDUpdateNoContent) Error() string { + return fmt.Sprintf("[PUT /v1/teams/{uid}][%d] v1TeamsUidUpdateNoContent ", 204) +} + +func (o *V1TeamsUIDUpdateNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_teams_workspace_get_roles_parameters.go b/api/client/v1/v1_teams_workspace_get_roles_parameters.go new file mode 100644 index 00000000..3deab196 --- /dev/null +++ b/api/client/v1/v1_teams_workspace_get_roles_parameters.go @@ -0,0 +1,133 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1TeamsWorkspaceGetRolesParams creates a new V1TeamsWorkspaceGetRolesParams object +// with the default values initialized. +func NewV1TeamsWorkspaceGetRolesParams() *V1TeamsWorkspaceGetRolesParams { + var () + return &V1TeamsWorkspaceGetRolesParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1TeamsWorkspaceGetRolesParamsWithTimeout creates a new V1TeamsWorkspaceGetRolesParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1TeamsWorkspaceGetRolesParamsWithTimeout(timeout time.Duration) *V1TeamsWorkspaceGetRolesParams { + var () + return &V1TeamsWorkspaceGetRolesParams{ + + timeout: timeout, + } +} + +// NewV1TeamsWorkspaceGetRolesParamsWithContext creates a new V1TeamsWorkspaceGetRolesParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1TeamsWorkspaceGetRolesParamsWithContext(ctx context.Context) *V1TeamsWorkspaceGetRolesParams { + var () + return &V1TeamsWorkspaceGetRolesParams{ + + Context: ctx, + } +} + +// NewV1TeamsWorkspaceGetRolesParamsWithHTTPClient creates a new V1TeamsWorkspaceGetRolesParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1TeamsWorkspaceGetRolesParamsWithHTTPClient(client *http.Client) *V1TeamsWorkspaceGetRolesParams { + var () + return &V1TeamsWorkspaceGetRolesParams{ + HTTPClient: client, + } +} + +/* +V1TeamsWorkspaceGetRolesParams contains all the parameters to send to the API endpoint +for the v1 teams workspace get roles operation typically these are written to a http.Request +*/ +type V1TeamsWorkspaceGetRolesParams struct { + + /*TeamUID*/ + TeamUID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 teams workspace get roles params +func (o *V1TeamsWorkspaceGetRolesParams) WithTimeout(timeout time.Duration) *V1TeamsWorkspaceGetRolesParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 teams workspace get roles params +func (o *V1TeamsWorkspaceGetRolesParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 teams workspace get roles params +func (o *V1TeamsWorkspaceGetRolesParams) WithContext(ctx context.Context) *V1TeamsWorkspaceGetRolesParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 teams workspace get roles params +func (o *V1TeamsWorkspaceGetRolesParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 teams workspace get roles params +func (o *V1TeamsWorkspaceGetRolesParams) WithHTTPClient(client *http.Client) *V1TeamsWorkspaceGetRolesParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 teams workspace get roles params +func (o *V1TeamsWorkspaceGetRolesParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithTeamUID adds the teamUID to the v1 teams workspace get roles params +func (o *V1TeamsWorkspaceGetRolesParams) WithTeamUID(teamUID string) *V1TeamsWorkspaceGetRolesParams { + o.SetTeamUID(teamUID) + return o +} + +// SetTeamUID adds the teamUid to the v1 teams workspace get roles params +func (o *V1TeamsWorkspaceGetRolesParams) SetTeamUID(teamUID string) { + o.TeamUID = teamUID +} + +// WriteToRequest writes these params to a swagger request +func (o *V1TeamsWorkspaceGetRolesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param teamUid + if err := r.SetPathParam("teamUid", o.TeamUID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_teams_workspace_get_roles_responses.go b/api/client/v1/v1_teams_workspace_get_roles_responses.go new file mode 100644 index 00000000..d748c194 --- /dev/null +++ b/api/client/v1/v1_teams_workspace_get_roles_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1TeamsWorkspaceGetRolesReader is a Reader for the V1TeamsWorkspaceGetRoles structure. +type V1TeamsWorkspaceGetRolesReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1TeamsWorkspaceGetRolesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1TeamsWorkspaceGetRolesOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1TeamsWorkspaceGetRolesOK creates a V1TeamsWorkspaceGetRolesOK with default headers values +func NewV1TeamsWorkspaceGetRolesOK() *V1TeamsWorkspaceGetRolesOK { + return &V1TeamsWorkspaceGetRolesOK{} +} + +/* +V1TeamsWorkspaceGetRolesOK handles this case with default header values. + +OK +*/ +type V1TeamsWorkspaceGetRolesOK struct { + Payload *models.V1WorkspaceScopeRoles +} + +func (o *V1TeamsWorkspaceGetRolesOK) Error() string { + return fmt.Sprintf("[GET /v1/workspaces/teams/{teamUid}/roles][%d] v1TeamsWorkspaceGetRolesOK %+v", 200, o.Payload) +} + +func (o *V1TeamsWorkspaceGetRolesOK) GetPayload() *models.V1WorkspaceScopeRoles { + return o.Payload +} + +func (o *V1TeamsWorkspaceGetRolesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1WorkspaceScopeRoles) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_teams_workspace_roles_put_parameters.go b/api/client/v1/v1_teams_workspace_roles_put_parameters.go new file mode 100644 index 00000000..1067364d --- /dev/null +++ b/api/client/v1/v1_teams_workspace_roles_put_parameters.go @@ -0,0 +1,154 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1TeamsWorkspaceRolesPutParams creates a new V1TeamsWorkspaceRolesPutParams object +// with the default values initialized. +func NewV1TeamsWorkspaceRolesPutParams() *V1TeamsWorkspaceRolesPutParams { + var () + return &V1TeamsWorkspaceRolesPutParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1TeamsWorkspaceRolesPutParamsWithTimeout creates a new V1TeamsWorkspaceRolesPutParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1TeamsWorkspaceRolesPutParamsWithTimeout(timeout time.Duration) *V1TeamsWorkspaceRolesPutParams { + var () + return &V1TeamsWorkspaceRolesPutParams{ + + timeout: timeout, + } +} + +// NewV1TeamsWorkspaceRolesPutParamsWithContext creates a new V1TeamsWorkspaceRolesPutParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1TeamsWorkspaceRolesPutParamsWithContext(ctx context.Context) *V1TeamsWorkspaceRolesPutParams { + var () + return &V1TeamsWorkspaceRolesPutParams{ + + Context: ctx, + } +} + +// NewV1TeamsWorkspaceRolesPutParamsWithHTTPClient creates a new V1TeamsWorkspaceRolesPutParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1TeamsWorkspaceRolesPutParamsWithHTTPClient(client *http.Client) *V1TeamsWorkspaceRolesPutParams { + var () + return &V1TeamsWorkspaceRolesPutParams{ + HTTPClient: client, + } +} + +/* +V1TeamsWorkspaceRolesPutParams contains all the parameters to send to the API endpoint +for the v1 teams workspace roles put operation typically these are written to a http.Request +*/ +type V1TeamsWorkspaceRolesPutParams struct { + + /*Body*/ + Body *models.V1WorkspacesRolesPatch + /*TeamUID*/ + TeamUID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 teams workspace roles put params +func (o *V1TeamsWorkspaceRolesPutParams) WithTimeout(timeout time.Duration) *V1TeamsWorkspaceRolesPutParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 teams workspace roles put params +func (o *V1TeamsWorkspaceRolesPutParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 teams workspace roles put params +func (o *V1TeamsWorkspaceRolesPutParams) WithContext(ctx context.Context) *V1TeamsWorkspaceRolesPutParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 teams workspace roles put params +func (o *V1TeamsWorkspaceRolesPutParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 teams workspace roles put params +func (o *V1TeamsWorkspaceRolesPutParams) WithHTTPClient(client *http.Client) *V1TeamsWorkspaceRolesPutParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 teams workspace roles put params +func (o *V1TeamsWorkspaceRolesPutParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 teams workspace roles put params +func (o *V1TeamsWorkspaceRolesPutParams) WithBody(body *models.V1WorkspacesRolesPatch) *V1TeamsWorkspaceRolesPutParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 teams workspace roles put params +func (o *V1TeamsWorkspaceRolesPutParams) SetBody(body *models.V1WorkspacesRolesPatch) { + o.Body = body +} + +// WithTeamUID adds the teamUID to the v1 teams workspace roles put params +func (o *V1TeamsWorkspaceRolesPutParams) WithTeamUID(teamUID string) *V1TeamsWorkspaceRolesPutParams { + o.SetTeamUID(teamUID) + return o +} + +// SetTeamUID adds the teamUid to the v1 teams workspace roles put params +func (o *V1TeamsWorkspaceRolesPutParams) SetTeamUID(teamUID string) { + o.TeamUID = teamUID +} + +// WriteToRequest writes these params to a swagger request +func (o *V1TeamsWorkspaceRolesPutParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param teamUid + if err := r.SetPathParam("teamUid", o.TeamUID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_teams_workspace_roles_put_responses.go b/api/client/v1/v1_teams_workspace_roles_put_responses.go new file mode 100644 index 00000000..57c02b08 --- /dev/null +++ b/api/client/v1/v1_teams_workspace_roles_put_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1TeamsWorkspaceRolesPutReader is a Reader for the V1TeamsWorkspaceRolesPut structure. +type V1TeamsWorkspaceRolesPutReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1TeamsWorkspaceRolesPutReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1TeamsWorkspaceRolesPutNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1TeamsWorkspaceRolesPutNoContent creates a V1TeamsWorkspaceRolesPutNoContent with default headers values +func NewV1TeamsWorkspaceRolesPutNoContent() *V1TeamsWorkspaceRolesPutNoContent { + return &V1TeamsWorkspaceRolesPutNoContent{} +} + +/* +V1TeamsWorkspaceRolesPutNoContent handles this case with default header values. + +The resource was updated successfully +*/ +type V1TeamsWorkspaceRolesPutNoContent struct { +} + +func (o *V1TeamsWorkspaceRolesPutNoContent) Error() string { + return fmt.Sprintf("[PUT /v1/workspaces/teams/{teamUid}/roles][%d] v1TeamsWorkspaceRolesPutNoContent ", 204) +} + +func (o *V1TeamsWorkspaceRolesPutNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_tenant_cluster_settings_get_parameters.go b/api/client/v1/v1_tenant_cluster_settings_get_parameters.go new file mode 100644 index 00000000..de734119 --- /dev/null +++ b/api/client/v1/v1_tenant_cluster_settings_get_parameters.go @@ -0,0 +1,133 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1TenantClusterSettingsGetParams creates a new V1TenantClusterSettingsGetParams object +// with the default values initialized. +func NewV1TenantClusterSettingsGetParams() *V1TenantClusterSettingsGetParams { + var () + return &V1TenantClusterSettingsGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1TenantClusterSettingsGetParamsWithTimeout creates a new V1TenantClusterSettingsGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1TenantClusterSettingsGetParamsWithTimeout(timeout time.Duration) *V1TenantClusterSettingsGetParams { + var () + return &V1TenantClusterSettingsGetParams{ + + timeout: timeout, + } +} + +// NewV1TenantClusterSettingsGetParamsWithContext creates a new V1TenantClusterSettingsGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1TenantClusterSettingsGetParamsWithContext(ctx context.Context) *V1TenantClusterSettingsGetParams { + var () + return &V1TenantClusterSettingsGetParams{ + + Context: ctx, + } +} + +// NewV1TenantClusterSettingsGetParamsWithHTTPClient creates a new V1TenantClusterSettingsGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1TenantClusterSettingsGetParamsWithHTTPClient(client *http.Client) *V1TenantClusterSettingsGetParams { + var () + return &V1TenantClusterSettingsGetParams{ + HTTPClient: client, + } +} + +/* +V1TenantClusterSettingsGetParams contains all the parameters to send to the API endpoint +for the v1 tenant cluster settings get operation typically these are written to a http.Request +*/ +type V1TenantClusterSettingsGetParams struct { + + /*TenantUID*/ + TenantUID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 tenant cluster settings get params +func (o *V1TenantClusterSettingsGetParams) WithTimeout(timeout time.Duration) *V1TenantClusterSettingsGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 tenant cluster settings get params +func (o *V1TenantClusterSettingsGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 tenant cluster settings get params +func (o *V1TenantClusterSettingsGetParams) WithContext(ctx context.Context) *V1TenantClusterSettingsGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 tenant cluster settings get params +func (o *V1TenantClusterSettingsGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 tenant cluster settings get params +func (o *V1TenantClusterSettingsGetParams) WithHTTPClient(client *http.Client) *V1TenantClusterSettingsGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 tenant cluster settings get params +func (o *V1TenantClusterSettingsGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithTenantUID adds the tenantUID to the v1 tenant cluster settings get params +func (o *V1TenantClusterSettingsGetParams) WithTenantUID(tenantUID string) *V1TenantClusterSettingsGetParams { + o.SetTenantUID(tenantUID) + return o +} + +// SetTenantUID adds the tenantUid to the v1 tenant cluster settings get params +func (o *V1TenantClusterSettingsGetParams) SetTenantUID(tenantUID string) { + o.TenantUID = tenantUID +} + +// WriteToRequest writes these params to a swagger request +func (o *V1TenantClusterSettingsGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param tenantUid + if err := r.SetPathParam("tenantUid", o.TenantUID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_tenant_cluster_settings_get_responses.go b/api/client/v1/v1_tenant_cluster_settings_get_responses.go new file mode 100644 index 00000000..25982d15 --- /dev/null +++ b/api/client/v1/v1_tenant_cluster_settings_get_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1TenantClusterSettingsGetReader is a Reader for the V1TenantClusterSettingsGet structure. +type V1TenantClusterSettingsGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1TenantClusterSettingsGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1TenantClusterSettingsGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1TenantClusterSettingsGetOK creates a V1TenantClusterSettingsGetOK with default headers values +func NewV1TenantClusterSettingsGetOK() *V1TenantClusterSettingsGetOK { + return &V1TenantClusterSettingsGetOK{} +} + +/* +V1TenantClusterSettingsGetOK handles this case with default header values. + +(empty) +*/ +type V1TenantClusterSettingsGetOK struct { + Payload *models.V1TenantClusterSettings +} + +func (o *V1TenantClusterSettingsGetOK) Error() string { + return fmt.Sprintf("[GET /v1/tenants/{tenantUid}/preferences/clusterSettings][%d] v1TenantClusterSettingsGetOK %+v", 200, o.Payload) +} + +func (o *V1TenantClusterSettingsGetOK) GetPayload() *models.V1TenantClusterSettings { + return o.Payload +} + +func (o *V1TenantClusterSettingsGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1TenantClusterSettings) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_tenant_clusters_nodes_auto_remediation_setting_update_parameters.go b/api/client/v1/v1_tenant_clusters_nodes_auto_remediation_setting_update_parameters.go new file mode 100644 index 00000000..633cad63 --- /dev/null +++ b/api/client/v1/v1_tenant_clusters_nodes_auto_remediation_setting_update_parameters.go @@ -0,0 +1,154 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1TenantClustersNodesAutoRemediationSettingUpdateParams creates a new V1TenantClustersNodesAutoRemediationSettingUpdateParams object +// with the default values initialized. +func NewV1TenantClustersNodesAutoRemediationSettingUpdateParams() *V1TenantClustersNodesAutoRemediationSettingUpdateParams { + var () + return &V1TenantClustersNodesAutoRemediationSettingUpdateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1TenantClustersNodesAutoRemediationSettingUpdateParamsWithTimeout creates a new V1TenantClustersNodesAutoRemediationSettingUpdateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1TenantClustersNodesAutoRemediationSettingUpdateParamsWithTimeout(timeout time.Duration) *V1TenantClustersNodesAutoRemediationSettingUpdateParams { + var () + return &V1TenantClustersNodesAutoRemediationSettingUpdateParams{ + + timeout: timeout, + } +} + +// NewV1TenantClustersNodesAutoRemediationSettingUpdateParamsWithContext creates a new V1TenantClustersNodesAutoRemediationSettingUpdateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1TenantClustersNodesAutoRemediationSettingUpdateParamsWithContext(ctx context.Context) *V1TenantClustersNodesAutoRemediationSettingUpdateParams { + var () + return &V1TenantClustersNodesAutoRemediationSettingUpdateParams{ + + Context: ctx, + } +} + +// NewV1TenantClustersNodesAutoRemediationSettingUpdateParamsWithHTTPClient creates a new V1TenantClustersNodesAutoRemediationSettingUpdateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1TenantClustersNodesAutoRemediationSettingUpdateParamsWithHTTPClient(client *http.Client) *V1TenantClustersNodesAutoRemediationSettingUpdateParams { + var () + return &V1TenantClustersNodesAutoRemediationSettingUpdateParams{ + HTTPClient: client, + } +} + +/* +V1TenantClustersNodesAutoRemediationSettingUpdateParams contains all the parameters to send to the API endpoint +for the v1 tenant clusters nodes auto remediation setting update operation typically these are written to a http.Request +*/ +type V1TenantClustersNodesAutoRemediationSettingUpdateParams struct { + + /*Body*/ + Body *models.V1NodesAutoRemediationSettings + /*TenantUID*/ + TenantUID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 tenant clusters nodes auto remediation setting update params +func (o *V1TenantClustersNodesAutoRemediationSettingUpdateParams) WithTimeout(timeout time.Duration) *V1TenantClustersNodesAutoRemediationSettingUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 tenant clusters nodes auto remediation setting update params +func (o *V1TenantClustersNodesAutoRemediationSettingUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 tenant clusters nodes auto remediation setting update params +func (o *V1TenantClustersNodesAutoRemediationSettingUpdateParams) WithContext(ctx context.Context) *V1TenantClustersNodesAutoRemediationSettingUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 tenant clusters nodes auto remediation setting update params +func (o *V1TenantClustersNodesAutoRemediationSettingUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 tenant clusters nodes auto remediation setting update params +func (o *V1TenantClustersNodesAutoRemediationSettingUpdateParams) WithHTTPClient(client *http.Client) *V1TenantClustersNodesAutoRemediationSettingUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 tenant clusters nodes auto remediation setting update params +func (o *V1TenantClustersNodesAutoRemediationSettingUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 tenant clusters nodes auto remediation setting update params +func (o *V1TenantClustersNodesAutoRemediationSettingUpdateParams) WithBody(body *models.V1NodesAutoRemediationSettings) *V1TenantClustersNodesAutoRemediationSettingUpdateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 tenant clusters nodes auto remediation setting update params +func (o *V1TenantClustersNodesAutoRemediationSettingUpdateParams) SetBody(body *models.V1NodesAutoRemediationSettings) { + o.Body = body +} + +// WithTenantUID adds the tenantUID to the v1 tenant clusters nodes auto remediation setting update params +func (o *V1TenantClustersNodesAutoRemediationSettingUpdateParams) WithTenantUID(tenantUID string) *V1TenantClustersNodesAutoRemediationSettingUpdateParams { + o.SetTenantUID(tenantUID) + return o +} + +// SetTenantUID adds the tenantUid to the v1 tenant clusters nodes auto remediation setting update params +func (o *V1TenantClustersNodesAutoRemediationSettingUpdateParams) SetTenantUID(tenantUID string) { + o.TenantUID = tenantUID +} + +// WriteToRequest writes these params to a swagger request +func (o *V1TenantClustersNodesAutoRemediationSettingUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param tenantUid + if err := r.SetPathParam("tenantUid", o.TenantUID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_tenant_clusters_nodes_auto_remediation_setting_update_responses.go b/api/client/v1/v1_tenant_clusters_nodes_auto_remediation_setting_update_responses.go new file mode 100644 index 00000000..d447cc38 --- /dev/null +++ b/api/client/v1/v1_tenant_clusters_nodes_auto_remediation_setting_update_responses.go @@ -0,0 +1,61 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1TenantClustersNodesAutoRemediationSettingUpdateReader is a Reader for the V1TenantClustersNodesAutoRemediationSettingUpdate structure. +type V1TenantClustersNodesAutoRemediationSettingUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1TenantClustersNodesAutoRemediationSettingUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1TenantClustersNodesAutoRemediationSettingUpdateNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1TenantClustersNodesAutoRemediationSettingUpdateNoContent creates a V1TenantClustersNodesAutoRemediationSettingUpdateNoContent with default headers values +func NewV1TenantClustersNodesAutoRemediationSettingUpdateNoContent() *V1TenantClustersNodesAutoRemediationSettingUpdateNoContent { + return &V1TenantClustersNodesAutoRemediationSettingUpdateNoContent{} +} + +/* +V1TenantClustersNodesAutoRemediationSettingUpdateNoContent handles this case with default header values. + +Ok response without content +*/ +type V1TenantClustersNodesAutoRemediationSettingUpdateNoContent struct { + /*Audit uid for the request + */ + AuditUID string +} + +func (o *V1TenantClustersNodesAutoRemediationSettingUpdateNoContent) Error() string { + return fmt.Sprintf("[PUT /v1/tenants/{tenantUid}/preferences/clusterSettings/nodesAutoRemediationSetting][%d] v1TenantClustersNodesAutoRemediationSettingUpdateNoContent ", 204) +} + +func (o *V1TenantClustersNodesAutoRemediationSettingUpdateNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header AuditUid + o.AuditUID = response.GetHeader("AuditUid") + + return nil +} diff --git a/api/client/v1/v1_tenant_developer_credit_get_parameters.go b/api/client/v1/v1_tenant_developer_credit_get_parameters.go new file mode 100644 index 00000000..26b41571 --- /dev/null +++ b/api/client/v1/v1_tenant_developer_credit_get_parameters.go @@ -0,0 +1,133 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1TenantDeveloperCreditGetParams creates a new V1TenantDeveloperCreditGetParams object +// with the default values initialized. +func NewV1TenantDeveloperCreditGetParams() *V1TenantDeveloperCreditGetParams { + var () + return &V1TenantDeveloperCreditGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1TenantDeveloperCreditGetParamsWithTimeout creates a new V1TenantDeveloperCreditGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1TenantDeveloperCreditGetParamsWithTimeout(timeout time.Duration) *V1TenantDeveloperCreditGetParams { + var () + return &V1TenantDeveloperCreditGetParams{ + + timeout: timeout, + } +} + +// NewV1TenantDeveloperCreditGetParamsWithContext creates a new V1TenantDeveloperCreditGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1TenantDeveloperCreditGetParamsWithContext(ctx context.Context) *V1TenantDeveloperCreditGetParams { + var () + return &V1TenantDeveloperCreditGetParams{ + + Context: ctx, + } +} + +// NewV1TenantDeveloperCreditGetParamsWithHTTPClient creates a new V1TenantDeveloperCreditGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1TenantDeveloperCreditGetParamsWithHTTPClient(client *http.Client) *V1TenantDeveloperCreditGetParams { + var () + return &V1TenantDeveloperCreditGetParams{ + HTTPClient: client, + } +} + +/* +V1TenantDeveloperCreditGetParams contains all the parameters to send to the API endpoint +for the v1 tenant developer credit get operation typically these are written to a http.Request +*/ +type V1TenantDeveloperCreditGetParams struct { + + /*TenantUID*/ + TenantUID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 tenant developer credit get params +func (o *V1TenantDeveloperCreditGetParams) WithTimeout(timeout time.Duration) *V1TenantDeveloperCreditGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 tenant developer credit get params +func (o *V1TenantDeveloperCreditGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 tenant developer credit get params +func (o *V1TenantDeveloperCreditGetParams) WithContext(ctx context.Context) *V1TenantDeveloperCreditGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 tenant developer credit get params +func (o *V1TenantDeveloperCreditGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 tenant developer credit get params +func (o *V1TenantDeveloperCreditGetParams) WithHTTPClient(client *http.Client) *V1TenantDeveloperCreditGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 tenant developer credit get params +func (o *V1TenantDeveloperCreditGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithTenantUID adds the tenantUID to the v1 tenant developer credit get params +func (o *V1TenantDeveloperCreditGetParams) WithTenantUID(tenantUID string) *V1TenantDeveloperCreditGetParams { + o.SetTenantUID(tenantUID) + return o +} + +// SetTenantUID adds the tenantUid to the v1 tenant developer credit get params +func (o *V1TenantDeveloperCreditGetParams) SetTenantUID(tenantUID string) { + o.TenantUID = tenantUID +} + +// WriteToRequest writes these params to a swagger request +func (o *V1TenantDeveloperCreditGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param tenantUid + if err := r.SetPathParam("tenantUid", o.TenantUID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_tenant_developer_credit_get_responses.go b/api/client/v1/v1_tenant_developer_credit_get_responses.go new file mode 100644 index 00000000..db773ac0 --- /dev/null +++ b/api/client/v1/v1_tenant_developer_credit_get_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1TenantDeveloperCreditGetReader is a Reader for the V1TenantDeveloperCreditGet structure. +type V1TenantDeveloperCreditGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1TenantDeveloperCreditGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1TenantDeveloperCreditGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1TenantDeveloperCreditGetOK creates a V1TenantDeveloperCreditGetOK with default headers values +func NewV1TenantDeveloperCreditGetOK() *V1TenantDeveloperCreditGetOK { + return &V1TenantDeveloperCreditGetOK{} +} + +/* +V1TenantDeveloperCreditGetOK handles this case with default header values. + +(empty) +*/ +type V1TenantDeveloperCreditGetOK struct { + Payload *models.V1DeveloperCredit +} + +func (o *V1TenantDeveloperCreditGetOK) Error() string { + return fmt.Sprintf("[GET /v1/tenants/{tenantUid}/preferences/developerCredit][%d] v1TenantDeveloperCreditGetOK %+v", 200, o.Payload) +} + +func (o *V1TenantDeveloperCreditGetOK) GetPayload() *models.V1DeveloperCredit { + return o.Payload +} + +func (o *V1TenantDeveloperCreditGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1DeveloperCredit) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_tenant_developer_credit_update_parameters.go b/api/client/v1/v1_tenant_developer_credit_update_parameters.go new file mode 100644 index 00000000..15f10caf --- /dev/null +++ b/api/client/v1/v1_tenant_developer_credit_update_parameters.go @@ -0,0 +1,154 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1TenantDeveloperCreditUpdateParams creates a new V1TenantDeveloperCreditUpdateParams object +// with the default values initialized. +func NewV1TenantDeveloperCreditUpdateParams() *V1TenantDeveloperCreditUpdateParams { + var () + return &V1TenantDeveloperCreditUpdateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1TenantDeveloperCreditUpdateParamsWithTimeout creates a new V1TenantDeveloperCreditUpdateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1TenantDeveloperCreditUpdateParamsWithTimeout(timeout time.Duration) *V1TenantDeveloperCreditUpdateParams { + var () + return &V1TenantDeveloperCreditUpdateParams{ + + timeout: timeout, + } +} + +// NewV1TenantDeveloperCreditUpdateParamsWithContext creates a new V1TenantDeveloperCreditUpdateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1TenantDeveloperCreditUpdateParamsWithContext(ctx context.Context) *V1TenantDeveloperCreditUpdateParams { + var () + return &V1TenantDeveloperCreditUpdateParams{ + + Context: ctx, + } +} + +// NewV1TenantDeveloperCreditUpdateParamsWithHTTPClient creates a new V1TenantDeveloperCreditUpdateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1TenantDeveloperCreditUpdateParamsWithHTTPClient(client *http.Client) *V1TenantDeveloperCreditUpdateParams { + var () + return &V1TenantDeveloperCreditUpdateParams{ + HTTPClient: client, + } +} + +/* +V1TenantDeveloperCreditUpdateParams contains all the parameters to send to the API endpoint +for the v1 tenant developer credit update operation typically these are written to a http.Request +*/ +type V1TenantDeveloperCreditUpdateParams struct { + + /*Body*/ + Body *models.V1DeveloperCredit + /*TenantUID*/ + TenantUID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 tenant developer credit update params +func (o *V1TenantDeveloperCreditUpdateParams) WithTimeout(timeout time.Duration) *V1TenantDeveloperCreditUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 tenant developer credit update params +func (o *V1TenantDeveloperCreditUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 tenant developer credit update params +func (o *V1TenantDeveloperCreditUpdateParams) WithContext(ctx context.Context) *V1TenantDeveloperCreditUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 tenant developer credit update params +func (o *V1TenantDeveloperCreditUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 tenant developer credit update params +func (o *V1TenantDeveloperCreditUpdateParams) WithHTTPClient(client *http.Client) *V1TenantDeveloperCreditUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 tenant developer credit update params +func (o *V1TenantDeveloperCreditUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 tenant developer credit update params +func (o *V1TenantDeveloperCreditUpdateParams) WithBody(body *models.V1DeveloperCredit) *V1TenantDeveloperCreditUpdateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 tenant developer credit update params +func (o *V1TenantDeveloperCreditUpdateParams) SetBody(body *models.V1DeveloperCredit) { + o.Body = body +} + +// WithTenantUID adds the tenantUID to the v1 tenant developer credit update params +func (o *V1TenantDeveloperCreditUpdateParams) WithTenantUID(tenantUID string) *V1TenantDeveloperCreditUpdateParams { + o.SetTenantUID(tenantUID) + return o +} + +// SetTenantUID adds the tenantUid to the v1 tenant developer credit update params +func (o *V1TenantDeveloperCreditUpdateParams) SetTenantUID(tenantUID string) { + o.TenantUID = tenantUID +} + +// WriteToRequest writes these params to a swagger request +func (o *V1TenantDeveloperCreditUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param tenantUid + if err := r.SetPathParam("tenantUid", o.TenantUID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_tenant_developer_credit_update_responses.go b/api/client/v1/v1_tenant_developer_credit_update_responses.go new file mode 100644 index 00000000..764b876f --- /dev/null +++ b/api/client/v1/v1_tenant_developer_credit_update_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1TenantDeveloperCreditUpdateReader is a Reader for the V1TenantDeveloperCreditUpdate structure. +type V1TenantDeveloperCreditUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1TenantDeveloperCreditUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1TenantDeveloperCreditUpdateNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1TenantDeveloperCreditUpdateNoContent creates a V1TenantDeveloperCreditUpdateNoContent with default headers values +func NewV1TenantDeveloperCreditUpdateNoContent() *V1TenantDeveloperCreditUpdateNoContent { + return &V1TenantDeveloperCreditUpdateNoContent{} +} + +/* +V1TenantDeveloperCreditUpdateNoContent handles this case with default header values. + +The resource was updated successfully +*/ +type V1TenantDeveloperCreditUpdateNoContent struct { +} + +func (o *V1TenantDeveloperCreditUpdateNoContent) Error() string { + return fmt.Sprintf("[PUT /v1/tenants/{tenantUid}/preferences/developerCredit][%d] v1TenantDeveloperCreditUpdateNoContent ", 204) +} + +func (o *V1TenantDeveloperCreditUpdateNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_tenant_fips_settings_get_parameters.go b/api/client/v1/v1_tenant_fips_settings_get_parameters.go new file mode 100644 index 00000000..98436527 --- /dev/null +++ b/api/client/v1/v1_tenant_fips_settings_get_parameters.go @@ -0,0 +1,133 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1TenantFipsSettingsGetParams creates a new V1TenantFipsSettingsGetParams object +// with the default values initialized. +func NewV1TenantFipsSettingsGetParams() *V1TenantFipsSettingsGetParams { + var () + return &V1TenantFipsSettingsGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1TenantFipsSettingsGetParamsWithTimeout creates a new V1TenantFipsSettingsGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1TenantFipsSettingsGetParamsWithTimeout(timeout time.Duration) *V1TenantFipsSettingsGetParams { + var () + return &V1TenantFipsSettingsGetParams{ + + timeout: timeout, + } +} + +// NewV1TenantFipsSettingsGetParamsWithContext creates a new V1TenantFipsSettingsGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1TenantFipsSettingsGetParamsWithContext(ctx context.Context) *V1TenantFipsSettingsGetParams { + var () + return &V1TenantFipsSettingsGetParams{ + + Context: ctx, + } +} + +// NewV1TenantFipsSettingsGetParamsWithHTTPClient creates a new V1TenantFipsSettingsGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1TenantFipsSettingsGetParamsWithHTTPClient(client *http.Client) *V1TenantFipsSettingsGetParams { + var () + return &V1TenantFipsSettingsGetParams{ + HTTPClient: client, + } +} + +/* +V1TenantFipsSettingsGetParams contains all the parameters to send to the API endpoint +for the v1 tenant fips settings get operation typically these are written to a http.Request +*/ +type V1TenantFipsSettingsGetParams struct { + + /*TenantUID*/ + TenantUID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 tenant fips settings get params +func (o *V1TenantFipsSettingsGetParams) WithTimeout(timeout time.Duration) *V1TenantFipsSettingsGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 tenant fips settings get params +func (o *V1TenantFipsSettingsGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 tenant fips settings get params +func (o *V1TenantFipsSettingsGetParams) WithContext(ctx context.Context) *V1TenantFipsSettingsGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 tenant fips settings get params +func (o *V1TenantFipsSettingsGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 tenant fips settings get params +func (o *V1TenantFipsSettingsGetParams) WithHTTPClient(client *http.Client) *V1TenantFipsSettingsGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 tenant fips settings get params +func (o *V1TenantFipsSettingsGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithTenantUID adds the tenantUID to the v1 tenant fips settings get params +func (o *V1TenantFipsSettingsGetParams) WithTenantUID(tenantUID string) *V1TenantFipsSettingsGetParams { + o.SetTenantUID(tenantUID) + return o +} + +// SetTenantUID adds the tenantUid to the v1 tenant fips settings get params +func (o *V1TenantFipsSettingsGetParams) SetTenantUID(tenantUID string) { + o.TenantUID = tenantUID +} + +// WriteToRequest writes these params to a swagger request +func (o *V1TenantFipsSettingsGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param tenantUid + if err := r.SetPathParam("tenantUid", o.TenantUID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_tenant_fips_settings_get_responses.go b/api/client/v1/v1_tenant_fips_settings_get_responses.go new file mode 100644 index 00000000..707de484 --- /dev/null +++ b/api/client/v1/v1_tenant_fips_settings_get_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1TenantFipsSettingsGetReader is a Reader for the V1TenantFipsSettingsGet structure. +type V1TenantFipsSettingsGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1TenantFipsSettingsGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1TenantFipsSettingsGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1TenantFipsSettingsGetOK creates a V1TenantFipsSettingsGetOK with default headers values +func NewV1TenantFipsSettingsGetOK() *V1TenantFipsSettingsGetOK { + return &V1TenantFipsSettingsGetOK{} +} + +/* +V1TenantFipsSettingsGetOK handles this case with default header values. + +(empty) +*/ +type V1TenantFipsSettingsGetOK struct { + Payload *models.V1FipsSettings +} + +func (o *V1TenantFipsSettingsGetOK) Error() string { + return fmt.Sprintf("[GET /v1/tenants/{tenantUid}/preferences/fips][%d] v1TenantFipsSettingsGetOK %+v", 200, o.Payload) +} + +func (o *V1TenantFipsSettingsGetOK) GetPayload() *models.V1FipsSettings { + return o.Payload +} + +func (o *V1TenantFipsSettingsGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1FipsSettings) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_tenant_fips_settings_update_parameters.go b/api/client/v1/v1_tenant_fips_settings_update_parameters.go new file mode 100644 index 00000000..909523a0 --- /dev/null +++ b/api/client/v1/v1_tenant_fips_settings_update_parameters.go @@ -0,0 +1,154 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1TenantFipsSettingsUpdateParams creates a new V1TenantFipsSettingsUpdateParams object +// with the default values initialized. +func NewV1TenantFipsSettingsUpdateParams() *V1TenantFipsSettingsUpdateParams { + var () + return &V1TenantFipsSettingsUpdateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1TenantFipsSettingsUpdateParamsWithTimeout creates a new V1TenantFipsSettingsUpdateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1TenantFipsSettingsUpdateParamsWithTimeout(timeout time.Duration) *V1TenantFipsSettingsUpdateParams { + var () + return &V1TenantFipsSettingsUpdateParams{ + + timeout: timeout, + } +} + +// NewV1TenantFipsSettingsUpdateParamsWithContext creates a new V1TenantFipsSettingsUpdateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1TenantFipsSettingsUpdateParamsWithContext(ctx context.Context) *V1TenantFipsSettingsUpdateParams { + var () + return &V1TenantFipsSettingsUpdateParams{ + + Context: ctx, + } +} + +// NewV1TenantFipsSettingsUpdateParamsWithHTTPClient creates a new V1TenantFipsSettingsUpdateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1TenantFipsSettingsUpdateParamsWithHTTPClient(client *http.Client) *V1TenantFipsSettingsUpdateParams { + var () + return &V1TenantFipsSettingsUpdateParams{ + HTTPClient: client, + } +} + +/* +V1TenantFipsSettingsUpdateParams contains all the parameters to send to the API endpoint +for the v1 tenant fips settings update operation typically these are written to a http.Request +*/ +type V1TenantFipsSettingsUpdateParams struct { + + /*Body*/ + Body *models.V1FipsSettings + /*TenantUID*/ + TenantUID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 tenant fips settings update params +func (o *V1TenantFipsSettingsUpdateParams) WithTimeout(timeout time.Duration) *V1TenantFipsSettingsUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 tenant fips settings update params +func (o *V1TenantFipsSettingsUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 tenant fips settings update params +func (o *V1TenantFipsSettingsUpdateParams) WithContext(ctx context.Context) *V1TenantFipsSettingsUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 tenant fips settings update params +func (o *V1TenantFipsSettingsUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 tenant fips settings update params +func (o *V1TenantFipsSettingsUpdateParams) WithHTTPClient(client *http.Client) *V1TenantFipsSettingsUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 tenant fips settings update params +func (o *V1TenantFipsSettingsUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 tenant fips settings update params +func (o *V1TenantFipsSettingsUpdateParams) WithBody(body *models.V1FipsSettings) *V1TenantFipsSettingsUpdateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 tenant fips settings update params +func (o *V1TenantFipsSettingsUpdateParams) SetBody(body *models.V1FipsSettings) { + o.Body = body +} + +// WithTenantUID adds the tenantUID to the v1 tenant fips settings update params +func (o *V1TenantFipsSettingsUpdateParams) WithTenantUID(tenantUID string) *V1TenantFipsSettingsUpdateParams { + o.SetTenantUID(tenantUID) + return o +} + +// SetTenantUID adds the tenantUid to the v1 tenant fips settings update params +func (o *V1TenantFipsSettingsUpdateParams) SetTenantUID(tenantUID string) { + o.TenantUID = tenantUID +} + +// WriteToRequest writes these params to a swagger request +func (o *V1TenantFipsSettingsUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param tenantUid + if err := r.SetPathParam("tenantUid", o.TenantUID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_tenant_fips_settings_update_responses.go b/api/client/v1/v1_tenant_fips_settings_update_responses.go new file mode 100644 index 00000000..3e7ffd9d --- /dev/null +++ b/api/client/v1/v1_tenant_fips_settings_update_responses.go @@ -0,0 +1,61 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1TenantFipsSettingsUpdateReader is a Reader for the V1TenantFipsSettingsUpdate structure. +type V1TenantFipsSettingsUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1TenantFipsSettingsUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1TenantFipsSettingsUpdateNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1TenantFipsSettingsUpdateNoContent creates a V1TenantFipsSettingsUpdateNoContent with default headers values +func NewV1TenantFipsSettingsUpdateNoContent() *V1TenantFipsSettingsUpdateNoContent { + return &V1TenantFipsSettingsUpdateNoContent{} +} + +/* +V1TenantFipsSettingsUpdateNoContent handles this case with default header values. + +Ok response without content +*/ +type V1TenantFipsSettingsUpdateNoContent struct { + /*Audit uid for the request + */ + AuditUID string +} + +func (o *V1TenantFipsSettingsUpdateNoContent) Error() string { + return fmt.Sprintf("[PUT /v1/tenants/{tenantUid}/preferences/fips][%d] v1TenantFipsSettingsUpdateNoContent ", 204) +} + +func (o *V1TenantFipsSettingsUpdateNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header AuditUid + o.AuditUID = response.GetHeader("AuditUid") + + return nil +} diff --git a/api/client/v1/v1_tenant_freemium_get_parameters.go b/api/client/v1/v1_tenant_freemium_get_parameters.go new file mode 100644 index 00000000..fedc025f --- /dev/null +++ b/api/client/v1/v1_tenant_freemium_get_parameters.go @@ -0,0 +1,133 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1TenantFreemiumGetParams creates a new V1TenantFreemiumGetParams object +// with the default values initialized. +func NewV1TenantFreemiumGetParams() *V1TenantFreemiumGetParams { + var () + return &V1TenantFreemiumGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1TenantFreemiumGetParamsWithTimeout creates a new V1TenantFreemiumGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1TenantFreemiumGetParamsWithTimeout(timeout time.Duration) *V1TenantFreemiumGetParams { + var () + return &V1TenantFreemiumGetParams{ + + timeout: timeout, + } +} + +// NewV1TenantFreemiumGetParamsWithContext creates a new V1TenantFreemiumGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1TenantFreemiumGetParamsWithContext(ctx context.Context) *V1TenantFreemiumGetParams { + var () + return &V1TenantFreemiumGetParams{ + + Context: ctx, + } +} + +// NewV1TenantFreemiumGetParamsWithHTTPClient creates a new V1TenantFreemiumGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1TenantFreemiumGetParamsWithHTTPClient(client *http.Client) *V1TenantFreemiumGetParams { + var () + return &V1TenantFreemiumGetParams{ + HTTPClient: client, + } +} + +/* +V1TenantFreemiumGetParams contains all the parameters to send to the API endpoint +for the v1 tenant freemium get operation typically these are written to a http.Request +*/ +type V1TenantFreemiumGetParams struct { + + /*TenantUID*/ + TenantUID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 tenant freemium get params +func (o *V1TenantFreemiumGetParams) WithTimeout(timeout time.Duration) *V1TenantFreemiumGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 tenant freemium get params +func (o *V1TenantFreemiumGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 tenant freemium get params +func (o *V1TenantFreemiumGetParams) WithContext(ctx context.Context) *V1TenantFreemiumGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 tenant freemium get params +func (o *V1TenantFreemiumGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 tenant freemium get params +func (o *V1TenantFreemiumGetParams) WithHTTPClient(client *http.Client) *V1TenantFreemiumGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 tenant freemium get params +func (o *V1TenantFreemiumGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithTenantUID adds the tenantUID to the v1 tenant freemium get params +func (o *V1TenantFreemiumGetParams) WithTenantUID(tenantUID string) *V1TenantFreemiumGetParams { + o.SetTenantUID(tenantUID) + return o +} + +// SetTenantUID adds the tenantUid to the v1 tenant freemium get params +func (o *V1TenantFreemiumGetParams) SetTenantUID(tenantUID string) { + o.TenantUID = tenantUID +} + +// WriteToRequest writes these params to a swagger request +func (o *V1TenantFreemiumGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param tenantUid + if err := r.SetPathParam("tenantUid", o.TenantUID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_tenant_freemium_get_responses.go b/api/client/v1/v1_tenant_freemium_get_responses.go new file mode 100644 index 00000000..493b74fa --- /dev/null +++ b/api/client/v1/v1_tenant_freemium_get_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1TenantFreemiumGetReader is a Reader for the V1TenantFreemiumGet structure. +type V1TenantFreemiumGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1TenantFreemiumGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1TenantFreemiumGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1TenantFreemiumGetOK creates a V1TenantFreemiumGetOK with default headers values +func NewV1TenantFreemiumGetOK() *V1TenantFreemiumGetOK { + return &V1TenantFreemiumGetOK{} +} + +/* +V1TenantFreemiumGetOK handles this case with default header values. + +(empty) +*/ +type V1TenantFreemiumGetOK struct { + Payload *models.V1TenantFreemium +} + +func (o *V1TenantFreemiumGetOK) Error() string { + return fmt.Sprintf("[GET /v1/tenants/{tenantUid}/freemium][%d] v1TenantFreemiumGetOK %+v", 200, o.Payload) +} + +func (o *V1TenantFreemiumGetOK) GetPayload() *models.V1TenantFreemium { + return o.Payload +} + +func (o *V1TenantFreemiumGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1TenantFreemium) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_tenant_freemium_update_parameters.go b/api/client/v1/v1_tenant_freemium_update_parameters.go new file mode 100644 index 00000000..6a61f3c1 --- /dev/null +++ b/api/client/v1/v1_tenant_freemium_update_parameters.go @@ -0,0 +1,154 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1TenantFreemiumUpdateParams creates a new V1TenantFreemiumUpdateParams object +// with the default values initialized. +func NewV1TenantFreemiumUpdateParams() *V1TenantFreemiumUpdateParams { + var () + return &V1TenantFreemiumUpdateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1TenantFreemiumUpdateParamsWithTimeout creates a new V1TenantFreemiumUpdateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1TenantFreemiumUpdateParamsWithTimeout(timeout time.Duration) *V1TenantFreemiumUpdateParams { + var () + return &V1TenantFreemiumUpdateParams{ + + timeout: timeout, + } +} + +// NewV1TenantFreemiumUpdateParamsWithContext creates a new V1TenantFreemiumUpdateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1TenantFreemiumUpdateParamsWithContext(ctx context.Context) *V1TenantFreemiumUpdateParams { + var () + return &V1TenantFreemiumUpdateParams{ + + Context: ctx, + } +} + +// NewV1TenantFreemiumUpdateParamsWithHTTPClient creates a new V1TenantFreemiumUpdateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1TenantFreemiumUpdateParamsWithHTTPClient(client *http.Client) *V1TenantFreemiumUpdateParams { + var () + return &V1TenantFreemiumUpdateParams{ + HTTPClient: client, + } +} + +/* +V1TenantFreemiumUpdateParams contains all the parameters to send to the API endpoint +for the v1 tenant freemium update operation typically these are written to a http.Request +*/ +type V1TenantFreemiumUpdateParams struct { + + /*Body*/ + Body *models.V1TenantFreemium + /*TenantUID*/ + TenantUID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 tenant freemium update params +func (o *V1TenantFreemiumUpdateParams) WithTimeout(timeout time.Duration) *V1TenantFreemiumUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 tenant freemium update params +func (o *V1TenantFreemiumUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 tenant freemium update params +func (o *V1TenantFreemiumUpdateParams) WithContext(ctx context.Context) *V1TenantFreemiumUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 tenant freemium update params +func (o *V1TenantFreemiumUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 tenant freemium update params +func (o *V1TenantFreemiumUpdateParams) WithHTTPClient(client *http.Client) *V1TenantFreemiumUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 tenant freemium update params +func (o *V1TenantFreemiumUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 tenant freemium update params +func (o *V1TenantFreemiumUpdateParams) WithBody(body *models.V1TenantFreemium) *V1TenantFreemiumUpdateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 tenant freemium update params +func (o *V1TenantFreemiumUpdateParams) SetBody(body *models.V1TenantFreemium) { + o.Body = body +} + +// WithTenantUID adds the tenantUID to the v1 tenant freemium update params +func (o *V1TenantFreemiumUpdateParams) WithTenantUID(tenantUID string) *V1TenantFreemiumUpdateParams { + o.SetTenantUID(tenantUID) + return o +} + +// SetTenantUID adds the tenantUid to the v1 tenant freemium update params +func (o *V1TenantFreemiumUpdateParams) SetTenantUID(tenantUID string) { + o.TenantUID = tenantUID +} + +// WriteToRequest writes these params to a swagger request +func (o *V1TenantFreemiumUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param tenantUid + if err := r.SetPathParam("tenantUid", o.TenantUID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_tenant_freemium_update_responses.go b/api/client/v1/v1_tenant_freemium_update_responses.go new file mode 100644 index 00000000..5004766d --- /dev/null +++ b/api/client/v1/v1_tenant_freemium_update_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1TenantFreemiumUpdateReader is a Reader for the V1TenantFreemiumUpdate structure. +type V1TenantFreemiumUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1TenantFreemiumUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1TenantFreemiumUpdateNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1TenantFreemiumUpdateNoContent creates a V1TenantFreemiumUpdateNoContent with default headers values +func NewV1TenantFreemiumUpdateNoContent() *V1TenantFreemiumUpdateNoContent { + return &V1TenantFreemiumUpdateNoContent{} +} + +/* +V1TenantFreemiumUpdateNoContent handles this case with default header values. + +The resource was updated successfully +*/ +type V1TenantFreemiumUpdateNoContent struct { +} + +func (o *V1TenantFreemiumUpdateNoContent) Error() string { + return fmt.Sprintf("[PUT /v1/tenants/{tenantUid}/freemium][%d] v1TenantFreemiumUpdateNoContent ", 204) +} + +func (o *V1TenantFreemiumUpdateNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_tenant_freemium_usage_get_parameters.go b/api/client/v1/v1_tenant_freemium_usage_get_parameters.go new file mode 100644 index 00000000..1c220c77 --- /dev/null +++ b/api/client/v1/v1_tenant_freemium_usage_get_parameters.go @@ -0,0 +1,133 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1TenantFreemiumUsageGetParams creates a new V1TenantFreemiumUsageGetParams object +// with the default values initialized. +func NewV1TenantFreemiumUsageGetParams() *V1TenantFreemiumUsageGetParams { + var () + return &V1TenantFreemiumUsageGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1TenantFreemiumUsageGetParamsWithTimeout creates a new V1TenantFreemiumUsageGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1TenantFreemiumUsageGetParamsWithTimeout(timeout time.Duration) *V1TenantFreemiumUsageGetParams { + var () + return &V1TenantFreemiumUsageGetParams{ + + timeout: timeout, + } +} + +// NewV1TenantFreemiumUsageGetParamsWithContext creates a new V1TenantFreemiumUsageGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1TenantFreemiumUsageGetParamsWithContext(ctx context.Context) *V1TenantFreemiumUsageGetParams { + var () + return &V1TenantFreemiumUsageGetParams{ + + Context: ctx, + } +} + +// NewV1TenantFreemiumUsageGetParamsWithHTTPClient creates a new V1TenantFreemiumUsageGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1TenantFreemiumUsageGetParamsWithHTTPClient(client *http.Client) *V1TenantFreemiumUsageGetParams { + var () + return &V1TenantFreemiumUsageGetParams{ + HTTPClient: client, + } +} + +/* +V1TenantFreemiumUsageGetParams contains all the parameters to send to the API endpoint +for the v1 tenant freemium usage get operation typically these are written to a http.Request +*/ +type V1TenantFreemiumUsageGetParams struct { + + /*TenantUID*/ + TenantUID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 tenant freemium usage get params +func (o *V1TenantFreemiumUsageGetParams) WithTimeout(timeout time.Duration) *V1TenantFreemiumUsageGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 tenant freemium usage get params +func (o *V1TenantFreemiumUsageGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 tenant freemium usage get params +func (o *V1TenantFreemiumUsageGetParams) WithContext(ctx context.Context) *V1TenantFreemiumUsageGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 tenant freemium usage get params +func (o *V1TenantFreemiumUsageGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 tenant freemium usage get params +func (o *V1TenantFreemiumUsageGetParams) WithHTTPClient(client *http.Client) *V1TenantFreemiumUsageGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 tenant freemium usage get params +func (o *V1TenantFreemiumUsageGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithTenantUID adds the tenantUID to the v1 tenant freemium usage get params +func (o *V1TenantFreemiumUsageGetParams) WithTenantUID(tenantUID string) *V1TenantFreemiumUsageGetParams { + o.SetTenantUID(tenantUID) + return o +} + +// SetTenantUID adds the tenantUid to the v1 tenant freemium usage get params +func (o *V1TenantFreemiumUsageGetParams) SetTenantUID(tenantUID string) { + o.TenantUID = tenantUID +} + +// WriteToRequest writes these params to a swagger request +func (o *V1TenantFreemiumUsageGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param tenantUid + if err := r.SetPathParam("tenantUid", o.TenantUID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_tenant_freemium_usage_get_responses.go b/api/client/v1/v1_tenant_freemium_usage_get_responses.go new file mode 100644 index 00000000..6fe92d2a --- /dev/null +++ b/api/client/v1/v1_tenant_freemium_usage_get_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1TenantFreemiumUsageGetReader is a Reader for the V1TenantFreemiumUsageGet structure. +type V1TenantFreemiumUsageGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1TenantFreemiumUsageGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1TenantFreemiumUsageGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1TenantFreemiumUsageGetOK creates a V1TenantFreemiumUsageGetOK with default headers values +func NewV1TenantFreemiumUsageGetOK() *V1TenantFreemiumUsageGetOK { + return &V1TenantFreemiumUsageGetOK{} +} + +/* +V1TenantFreemiumUsageGetOK handles this case with default header values. + +OK +*/ +type V1TenantFreemiumUsageGetOK struct { + Payload *models.V1TenantFreemiumUsage +} + +func (o *V1TenantFreemiumUsageGetOK) Error() string { + return fmt.Sprintf("[GET /v1/tenants/{tenantUid}/freemiumUsage][%d] v1TenantFreemiumUsageGetOK %+v", 200, o.Payload) +} + +func (o *V1TenantFreemiumUsageGetOK) GetPayload() *models.V1TenantFreemiumUsage { + return o.Payload +} + +func (o *V1TenantFreemiumUsageGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1TenantFreemiumUsage) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_tenant_pref_cluster_group_get_parameters.go b/api/client/v1/v1_tenant_pref_cluster_group_get_parameters.go new file mode 100644 index 00000000..984fdb93 --- /dev/null +++ b/api/client/v1/v1_tenant_pref_cluster_group_get_parameters.go @@ -0,0 +1,133 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1TenantPrefClusterGroupGetParams creates a new V1TenantPrefClusterGroupGetParams object +// with the default values initialized. +func NewV1TenantPrefClusterGroupGetParams() *V1TenantPrefClusterGroupGetParams { + var () + return &V1TenantPrefClusterGroupGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1TenantPrefClusterGroupGetParamsWithTimeout creates a new V1TenantPrefClusterGroupGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1TenantPrefClusterGroupGetParamsWithTimeout(timeout time.Duration) *V1TenantPrefClusterGroupGetParams { + var () + return &V1TenantPrefClusterGroupGetParams{ + + timeout: timeout, + } +} + +// NewV1TenantPrefClusterGroupGetParamsWithContext creates a new V1TenantPrefClusterGroupGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1TenantPrefClusterGroupGetParamsWithContext(ctx context.Context) *V1TenantPrefClusterGroupGetParams { + var () + return &V1TenantPrefClusterGroupGetParams{ + + Context: ctx, + } +} + +// NewV1TenantPrefClusterGroupGetParamsWithHTTPClient creates a new V1TenantPrefClusterGroupGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1TenantPrefClusterGroupGetParamsWithHTTPClient(client *http.Client) *V1TenantPrefClusterGroupGetParams { + var () + return &V1TenantPrefClusterGroupGetParams{ + HTTPClient: client, + } +} + +/* +V1TenantPrefClusterGroupGetParams contains all the parameters to send to the API endpoint +for the v1 tenant pref cluster group get operation typically these are written to a http.Request +*/ +type V1TenantPrefClusterGroupGetParams struct { + + /*TenantUID*/ + TenantUID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 tenant pref cluster group get params +func (o *V1TenantPrefClusterGroupGetParams) WithTimeout(timeout time.Duration) *V1TenantPrefClusterGroupGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 tenant pref cluster group get params +func (o *V1TenantPrefClusterGroupGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 tenant pref cluster group get params +func (o *V1TenantPrefClusterGroupGetParams) WithContext(ctx context.Context) *V1TenantPrefClusterGroupGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 tenant pref cluster group get params +func (o *V1TenantPrefClusterGroupGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 tenant pref cluster group get params +func (o *V1TenantPrefClusterGroupGetParams) WithHTTPClient(client *http.Client) *V1TenantPrefClusterGroupGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 tenant pref cluster group get params +func (o *V1TenantPrefClusterGroupGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithTenantUID adds the tenantUID to the v1 tenant pref cluster group get params +func (o *V1TenantPrefClusterGroupGetParams) WithTenantUID(tenantUID string) *V1TenantPrefClusterGroupGetParams { + o.SetTenantUID(tenantUID) + return o +} + +// SetTenantUID adds the tenantUid to the v1 tenant pref cluster group get params +func (o *V1TenantPrefClusterGroupGetParams) SetTenantUID(tenantUID string) { + o.TenantUID = tenantUID +} + +// WriteToRequest writes these params to a swagger request +func (o *V1TenantPrefClusterGroupGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param tenantUid + if err := r.SetPathParam("tenantUid", o.TenantUID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_tenant_pref_cluster_group_get_responses.go b/api/client/v1/v1_tenant_pref_cluster_group_get_responses.go new file mode 100644 index 00000000..333b4d32 --- /dev/null +++ b/api/client/v1/v1_tenant_pref_cluster_group_get_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1TenantPrefClusterGroupGetReader is a Reader for the V1TenantPrefClusterGroupGet structure. +type V1TenantPrefClusterGroupGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1TenantPrefClusterGroupGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1TenantPrefClusterGroupGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1TenantPrefClusterGroupGetOK creates a V1TenantPrefClusterGroupGetOK with default headers values +func NewV1TenantPrefClusterGroupGetOK() *V1TenantPrefClusterGroupGetOK { + return &V1TenantPrefClusterGroupGetOK{} +} + +/* +V1TenantPrefClusterGroupGetOK handles this case with default header values. + +(empty) +*/ +type V1TenantPrefClusterGroupGetOK struct { + Payload *models.V1TenantEnableClusterGroup +} + +func (o *V1TenantPrefClusterGroupGetOK) Error() string { + return fmt.Sprintf("[GET /v1/tenants/{tenantUid}/preferences/clusterGroup][%d] v1TenantPrefClusterGroupGetOK %+v", 200, o.Payload) +} + +func (o *V1TenantPrefClusterGroupGetOK) GetPayload() *models.V1TenantEnableClusterGroup { + return o.Payload +} + +func (o *V1TenantPrefClusterGroupGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1TenantEnableClusterGroup) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_tenant_pref_cluster_group_update_parameters.go b/api/client/v1/v1_tenant_pref_cluster_group_update_parameters.go new file mode 100644 index 00000000..2aba84d2 --- /dev/null +++ b/api/client/v1/v1_tenant_pref_cluster_group_update_parameters.go @@ -0,0 +1,154 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1TenantPrefClusterGroupUpdateParams creates a new V1TenantPrefClusterGroupUpdateParams object +// with the default values initialized. +func NewV1TenantPrefClusterGroupUpdateParams() *V1TenantPrefClusterGroupUpdateParams { + var () + return &V1TenantPrefClusterGroupUpdateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1TenantPrefClusterGroupUpdateParamsWithTimeout creates a new V1TenantPrefClusterGroupUpdateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1TenantPrefClusterGroupUpdateParamsWithTimeout(timeout time.Duration) *V1TenantPrefClusterGroupUpdateParams { + var () + return &V1TenantPrefClusterGroupUpdateParams{ + + timeout: timeout, + } +} + +// NewV1TenantPrefClusterGroupUpdateParamsWithContext creates a new V1TenantPrefClusterGroupUpdateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1TenantPrefClusterGroupUpdateParamsWithContext(ctx context.Context) *V1TenantPrefClusterGroupUpdateParams { + var () + return &V1TenantPrefClusterGroupUpdateParams{ + + Context: ctx, + } +} + +// NewV1TenantPrefClusterGroupUpdateParamsWithHTTPClient creates a new V1TenantPrefClusterGroupUpdateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1TenantPrefClusterGroupUpdateParamsWithHTTPClient(client *http.Client) *V1TenantPrefClusterGroupUpdateParams { + var () + return &V1TenantPrefClusterGroupUpdateParams{ + HTTPClient: client, + } +} + +/* +V1TenantPrefClusterGroupUpdateParams contains all the parameters to send to the API endpoint +for the v1 tenant pref cluster group update operation typically these are written to a http.Request +*/ +type V1TenantPrefClusterGroupUpdateParams struct { + + /*Body*/ + Body *models.V1TenantEnableClusterGroup + /*TenantUID*/ + TenantUID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 tenant pref cluster group update params +func (o *V1TenantPrefClusterGroupUpdateParams) WithTimeout(timeout time.Duration) *V1TenantPrefClusterGroupUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 tenant pref cluster group update params +func (o *V1TenantPrefClusterGroupUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 tenant pref cluster group update params +func (o *V1TenantPrefClusterGroupUpdateParams) WithContext(ctx context.Context) *V1TenantPrefClusterGroupUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 tenant pref cluster group update params +func (o *V1TenantPrefClusterGroupUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 tenant pref cluster group update params +func (o *V1TenantPrefClusterGroupUpdateParams) WithHTTPClient(client *http.Client) *V1TenantPrefClusterGroupUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 tenant pref cluster group update params +func (o *V1TenantPrefClusterGroupUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 tenant pref cluster group update params +func (o *V1TenantPrefClusterGroupUpdateParams) WithBody(body *models.V1TenantEnableClusterGroup) *V1TenantPrefClusterGroupUpdateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 tenant pref cluster group update params +func (o *V1TenantPrefClusterGroupUpdateParams) SetBody(body *models.V1TenantEnableClusterGroup) { + o.Body = body +} + +// WithTenantUID adds the tenantUID to the v1 tenant pref cluster group update params +func (o *V1TenantPrefClusterGroupUpdateParams) WithTenantUID(tenantUID string) *V1TenantPrefClusterGroupUpdateParams { + o.SetTenantUID(tenantUID) + return o +} + +// SetTenantUID adds the tenantUid to the v1 tenant pref cluster group update params +func (o *V1TenantPrefClusterGroupUpdateParams) SetTenantUID(tenantUID string) { + o.TenantUID = tenantUID +} + +// WriteToRequest writes these params to a swagger request +func (o *V1TenantPrefClusterGroupUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param tenantUid + if err := r.SetPathParam("tenantUid", o.TenantUID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_tenant_pref_cluster_group_update_responses.go b/api/client/v1/v1_tenant_pref_cluster_group_update_responses.go new file mode 100644 index 00000000..bc490881 --- /dev/null +++ b/api/client/v1/v1_tenant_pref_cluster_group_update_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1TenantPrefClusterGroupUpdateReader is a Reader for the V1TenantPrefClusterGroupUpdate structure. +type V1TenantPrefClusterGroupUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1TenantPrefClusterGroupUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1TenantPrefClusterGroupUpdateNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1TenantPrefClusterGroupUpdateNoContent creates a V1TenantPrefClusterGroupUpdateNoContent with default headers values +func NewV1TenantPrefClusterGroupUpdateNoContent() *V1TenantPrefClusterGroupUpdateNoContent { + return &V1TenantPrefClusterGroupUpdateNoContent{} +} + +/* +V1TenantPrefClusterGroupUpdateNoContent handles this case with default header values. + +The resource was updated successfully +*/ +type V1TenantPrefClusterGroupUpdateNoContent struct { +} + +func (o *V1TenantPrefClusterGroupUpdateNoContent) Error() string { + return fmt.Sprintf("[PUT /v1/tenants/{tenantUid}/preferences/clusterGroup][%d] v1TenantPrefClusterGroupUpdateNoContent ", 204) +} + +func (o *V1TenantPrefClusterGroupUpdateNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_tenant_resource_limits_get_parameters.go b/api/client/v1/v1_tenant_resource_limits_get_parameters.go new file mode 100644 index 00000000..25380813 --- /dev/null +++ b/api/client/v1/v1_tenant_resource_limits_get_parameters.go @@ -0,0 +1,133 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1TenantResourceLimitsGetParams creates a new V1TenantResourceLimitsGetParams object +// with the default values initialized. +func NewV1TenantResourceLimitsGetParams() *V1TenantResourceLimitsGetParams { + var () + return &V1TenantResourceLimitsGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1TenantResourceLimitsGetParamsWithTimeout creates a new V1TenantResourceLimitsGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1TenantResourceLimitsGetParamsWithTimeout(timeout time.Duration) *V1TenantResourceLimitsGetParams { + var () + return &V1TenantResourceLimitsGetParams{ + + timeout: timeout, + } +} + +// NewV1TenantResourceLimitsGetParamsWithContext creates a new V1TenantResourceLimitsGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1TenantResourceLimitsGetParamsWithContext(ctx context.Context) *V1TenantResourceLimitsGetParams { + var () + return &V1TenantResourceLimitsGetParams{ + + Context: ctx, + } +} + +// NewV1TenantResourceLimitsGetParamsWithHTTPClient creates a new V1TenantResourceLimitsGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1TenantResourceLimitsGetParamsWithHTTPClient(client *http.Client) *V1TenantResourceLimitsGetParams { + var () + return &V1TenantResourceLimitsGetParams{ + HTTPClient: client, + } +} + +/* +V1TenantResourceLimitsGetParams contains all the parameters to send to the API endpoint +for the v1 tenant resource limits get operation typically these are written to a http.Request +*/ +type V1TenantResourceLimitsGetParams struct { + + /*TenantUID*/ + TenantUID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 tenant resource limits get params +func (o *V1TenantResourceLimitsGetParams) WithTimeout(timeout time.Duration) *V1TenantResourceLimitsGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 tenant resource limits get params +func (o *V1TenantResourceLimitsGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 tenant resource limits get params +func (o *V1TenantResourceLimitsGetParams) WithContext(ctx context.Context) *V1TenantResourceLimitsGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 tenant resource limits get params +func (o *V1TenantResourceLimitsGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 tenant resource limits get params +func (o *V1TenantResourceLimitsGetParams) WithHTTPClient(client *http.Client) *V1TenantResourceLimitsGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 tenant resource limits get params +func (o *V1TenantResourceLimitsGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithTenantUID adds the tenantUID to the v1 tenant resource limits get params +func (o *V1TenantResourceLimitsGetParams) WithTenantUID(tenantUID string) *V1TenantResourceLimitsGetParams { + o.SetTenantUID(tenantUID) + return o +} + +// SetTenantUID adds the tenantUid to the v1 tenant resource limits get params +func (o *V1TenantResourceLimitsGetParams) SetTenantUID(tenantUID string) { + o.TenantUID = tenantUID +} + +// WriteToRequest writes these params to a swagger request +func (o *V1TenantResourceLimitsGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param tenantUid + if err := r.SetPathParam("tenantUid", o.TenantUID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_tenant_resource_limits_get_responses.go b/api/client/v1/v1_tenant_resource_limits_get_responses.go new file mode 100644 index 00000000..ec8ac9ef --- /dev/null +++ b/api/client/v1/v1_tenant_resource_limits_get_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1TenantResourceLimitsGetReader is a Reader for the V1TenantResourceLimitsGet structure. +type V1TenantResourceLimitsGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1TenantResourceLimitsGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1TenantResourceLimitsGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1TenantResourceLimitsGetOK creates a V1TenantResourceLimitsGetOK with default headers values +func NewV1TenantResourceLimitsGetOK() *V1TenantResourceLimitsGetOK { + return &V1TenantResourceLimitsGetOK{} +} + +/* +V1TenantResourceLimitsGetOK handles this case with default header values. + +(empty) +*/ +type V1TenantResourceLimitsGetOK struct { + Payload *models.V1TenantResourceLimits +} + +func (o *V1TenantResourceLimitsGetOK) Error() string { + return fmt.Sprintf("[GET /v1/tenants/{tenantUid}/resourceLimits][%d] v1TenantResourceLimitsGetOK %+v", 200, o.Payload) +} + +func (o *V1TenantResourceLimitsGetOK) GetPayload() *models.V1TenantResourceLimits { + return o.Payload +} + +func (o *V1TenantResourceLimitsGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1TenantResourceLimits) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_tenant_resource_limits_update_parameters.go b/api/client/v1/v1_tenant_resource_limits_update_parameters.go new file mode 100644 index 00000000..41042321 --- /dev/null +++ b/api/client/v1/v1_tenant_resource_limits_update_parameters.go @@ -0,0 +1,154 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1TenantResourceLimitsUpdateParams creates a new V1TenantResourceLimitsUpdateParams object +// with the default values initialized. +func NewV1TenantResourceLimitsUpdateParams() *V1TenantResourceLimitsUpdateParams { + var () + return &V1TenantResourceLimitsUpdateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1TenantResourceLimitsUpdateParamsWithTimeout creates a new V1TenantResourceLimitsUpdateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1TenantResourceLimitsUpdateParamsWithTimeout(timeout time.Duration) *V1TenantResourceLimitsUpdateParams { + var () + return &V1TenantResourceLimitsUpdateParams{ + + timeout: timeout, + } +} + +// NewV1TenantResourceLimitsUpdateParamsWithContext creates a new V1TenantResourceLimitsUpdateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1TenantResourceLimitsUpdateParamsWithContext(ctx context.Context) *V1TenantResourceLimitsUpdateParams { + var () + return &V1TenantResourceLimitsUpdateParams{ + + Context: ctx, + } +} + +// NewV1TenantResourceLimitsUpdateParamsWithHTTPClient creates a new V1TenantResourceLimitsUpdateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1TenantResourceLimitsUpdateParamsWithHTTPClient(client *http.Client) *V1TenantResourceLimitsUpdateParams { + var () + return &V1TenantResourceLimitsUpdateParams{ + HTTPClient: client, + } +} + +/* +V1TenantResourceLimitsUpdateParams contains all the parameters to send to the API endpoint +for the v1 tenant resource limits update operation typically these are written to a http.Request +*/ +type V1TenantResourceLimitsUpdateParams struct { + + /*Body*/ + Body *models.V1TenantResourceLimitsEntity + /*TenantUID*/ + TenantUID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 tenant resource limits update params +func (o *V1TenantResourceLimitsUpdateParams) WithTimeout(timeout time.Duration) *V1TenantResourceLimitsUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 tenant resource limits update params +func (o *V1TenantResourceLimitsUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 tenant resource limits update params +func (o *V1TenantResourceLimitsUpdateParams) WithContext(ctx context.Context) *V1TenantResourceLimitsUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 tenant resource limits update params +func (o *V1TenantResourceLimitsUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 tenant resource limits update params +func (o *V1TenantResourceLimitsUpdateParams) WithHTTPClient(client *http.Client) *V1TenantResourceLimitsUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 tenant resource limits update params +func (o *V1TenantResourceLimitsUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 tenant resource limits update params +func (o *V1TenantResourceLimitsUpdateParams) WithBody(body *models.V1TenantResourceLimitsEntity) *V1TenantResourceLimitsUpdateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 tenant resource limits update params +func (o *V1TenantResourceLimitsUpdateParams) SetBody(body *models.V1TenantResourceLimitsEntity) { + o.Body = body +} + +// WithTenantUID adds the tenantUID to the v1 tenant resource limits update params +func (o *V1TenantResourceLimitsUpdateParams) WithTenantUID(tenantUID string) *V1TenantResourceLimitsUpdateParams { + o.SetTenantUID(tenantUID) + return o +} + +// SetTenantUID adds the tenantUid to the v1 tenant resource limits update params +func (o *V1TenantResourceLimitsUpdateParams) SetTenantUID(tenantUID string) { + o.TenantUID = tenantUID +} + +// WriteToRequest writes these params to a swagger request +func (o *V1TenantResourceLimitsUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param tenantUid + if err := r.SetPathParam("tenantUid", o.TenantUID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_tenant_resource_limits_update_responses.go b/api/client/v1/v1_tenant_resource_limits_update_responses.go new file mode 100644 index 00000000..f6a9b586 --- /dev/null +++ b/api/client/v1/v1_tenant_resource_limits_update_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1TenantResourceLimitsUpdateReader is a Reader for the V1TenantResourceLimitsUpdate structure. +type V1TenantResourceLimitsUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1TenantResourceLimitsUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1TenantResourceLimitsUpdateNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1TenantResourceLimitsUpdateNoContent creates a V1TenantResourceLimitsUpdateNoContent with default headers values +func NewV1TenantResourceLimitsUpdateNoContent() *V1TenantResourceLimitsUpdateNoContent { + return &V1TenantResourceLimitsUpdateNoContent{} +} + +/* +V1TenantResourceLimitsUpdateNoContent handles this case with default header values. + +The resource was updated successfully +*/ +type V1TenantResourceLimitsUpdateNoContent struct { +} + +func (o *V1TenantResourceLimitsUpdateNoContent) Error() string { + return fmt.Sprintf("[PATCH /v1/tenants/{tenantUid}/resourceLimits][%d] v1TenantResourceLimitsUpdateNoContent ", 204) +} + +func (o *V1TenantResourceLimitsUpdateNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_tenant_uid_assets_certs_create_parameters.go b/api/client/v1/v1_tenant_uid_assets_certs_create_parameters.go new file mode 100644 index 00000000..41913f99 --- /dev/null +++ b/api/client/v1/v1_tenant_uid_assets_certs_create_parameters.go @@ -0,0 +1,154 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1TenantUIDAssetsCertsCreateParams creates a new V1TenantUIDAssetsCertsCreateParams object +// with the default values initialized. +func NewV1TenantUIDAssetsCertsCreateParams() *V1TenantUIDAssetsCertsCreateParams { + var () + return &V1TenantUIDAssetsCertsCreateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1TenantUIDAssetsCertsCreateParamsWithTimeout creates a new V1TenantUIDAssetsCertsCreateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1TenantUIDAssetsCertsCreateParamsWithTimeout(timeout time.Duration) *V1TenantUIDAssetsCertsCreateParams { + var () + return &V1TenantUIDAssetsCertsCreateParams{ + + timeout: timeout, + } +} + +// NewV1TenantUIDAssetsCertsCreateParamsWithContext creates a new V1TenantUIDAssetsCertsCreateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1TenantUIDAssetsCertsCreateParamsWithContext(ctx context.Context) *V1TenantUIDAssetsCertsCreateParams { + var () + return &V1TenantUIDAssetsCertsCreateParams{ + + Context: ctx, + } +} + +// NewV1TenantUIDAssetsCertsCreateParamsWithHTTPClient creates a new V1TenantUIDAssetsCertsCreateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1TenantUIDAssetsCertsCreateParamsWithHTTPClient(client *http.Client) *V1TenantUIDAssetsCertsCreateParams { + var () + return &V1TenantUIDAssetsCertsCreateParams{ + HTTPClient: client, + } +} + +/* +V1TenantUIDAssetsCertsCreateParams contains all the parameters to send to the API endpoint +for the v1 tenant Uid assets certs create operation typically these are written to a http.Request +*/ +type V1TenantUIDAssetsCertsCreateParams struct { + + /*Body*/ + Body *models.V1TenantAssetCert + /*TenantUID*/ + TenantUID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 tenant Uid assets certs create params +func (o *V1TenantUIDAssetsCertsCreateParams) WithTimeout(timeout time.Duration) *V1TenantUIDAssetsCertsCreateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 tenant Uid assets certs create params +func (o *V1TenantUIDAssetsCertsCreateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 tenant Uid assets certs create params +func (o *V1TenantUIDAssetsCertsCreateParams) WithContext(ctx context.Context) *V1TenantUIDAssetsCertsCreateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 tenant Uid assets certs create params +func (o *V1TenantUIDAssetsCertsCreateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 tenant Uid assets certs create params +func (o *V1TenantUIDAssetsCertsCreateParams) WithHTTPClient(client *http.Client) *V1TenantUIDAssetsCertsCreateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 tenant Uid assets certs create params +func (o *V1TenantUIDAssetsCertsCreateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 tenant Uid assets certs create params +func (o *V1TenantUIDAssetsCertsCreateParams) WithBody(body *models.V1TenantAssetCert) *V1TenantUIDAssetsCertsCreateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 tenant Uid assets certs create params +func (o *V1TenantUIDAssetsCertsCreateParams) SetBody(body *models.V1TenantAssetCert) { + o.Body = body +} + +// WithTenantUID adds the tenantUID to the v1 tenant Uid assets certs create params +func (o *V1TenantUIDAssetsCertsCreateParams) WithTenantUID(tenantUID string) *V1TenantUIDAssetsCertsCreateParams { + o.SetTenantUID(tenantUID) + return o +} + +// SetTenantUID adds the tenantUid to the v1 tenant Uid assets certs create params +func (o *V1TenantUIDAssetsCertsCreateParams) SetTenantUID(tenantUID string) { + o.TenantUID = tenantUID +} + +// WriteToRequest writes these params to a swagger request +func (o *V1TenantUIDAssetsCertsCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param tenantUid + if err := r.SetPathParam("tenantUid", o.TenantUID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_tenant_uid_assets_certs_create_responses.go b/api/client/v1/v1_tenant_uid_assets_certs_create_responses.go new file mode 100644 index 00000000..b40c159c --- /dev/null +++ b/api/client/v1/v1_tenant_uid_assets_certs_create_responses.go @@ -0,0 +1,77 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1TenantUIDAssetsCertsCreateReader is a Reader for the V1TenantUIDAssetsCertsCreate structure. +type V1TenantUIDAssetsCertsCreateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1TenantUIDAssetsCertsCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 201: + result := NewV1TenantUIDAssetsCertsCreateCreated() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1TenantUIDAssetsCertsCreateCreated creates a V1TenantUIDAssetsCertsCreateCreated with default headers values +func NewV1TenantUIDAssetsCertsCreateCreated() *V1TenantUIDAssetsCertsCreateCreated { + return &V1TenantUIDAssetsCertsCreateCreated{} +} + +/* +V1TenantUIDAssetsCertsCreateCreated handles this case with default header values. + +Created successfully +*/ +type V1TenantUIDAssetsCertsCreateCreated struct { + /*Audit uid for the request + */ + AuditUID string + + Payload *models.V1UID +} + +func (o *V1TenantUIDAssetsCertsCreateCreated) Error() string { + return fmt.Sprintf("[POST /v1/tenants/{tenantUid}/assets/certs][%d] v1TenantUidAssetsCertsCreateCreated %+v", 201, o.Payload) +} + +func (o *V1TenantUIDAssetsCertsCreateCreated) GetPayload() *models.V1UID { + return o.Payload +} + +func (o *V1TenantUIDAssetsCertsCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header AuditUid + o.AuditUID = response.GetHeader("AuditUid") + + o.Payload = new(models.V1UID) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_tenant_uid_assets_certs_list_parameters.go b/api/client/v1/v1_tenant_uid_assets_certs_list_parameters.go new file mode 100644 index 00000000..21304fac --- /dev/null +++ b/api/client/v1/v1_tenant_uid_assets_certs_list_parameters.go @@ -0,0 +1,133 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1TenantUIDAssetsCertsListParams creates a new V1TenantUIDAssetsCertsListParams object +// with the default values initialized. +func NewV1TenantUIDAssetsCertsListParams() *V1TenantUIDAssetsCertsListParams { + var () + return &V1TenantUIDAssetsCertsListParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1TenantUIDAssetsCertsListParamsWithTimeout creates a new V1TenantUIDAssetsCertsListParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1TenantUIDAssetsCertsListParamsWithTimeout(timeout time.Duration) *V1TenantUIDAssetsCertsListParams { + var () + return &V1TenantUIDAssetsCertsListParams{ + + timeout: timeout, + } +} + +// NewV1TenantUIDAssetsCertsListParamsWithContext creates a new V1TenantUIDAssetsCertsListParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1TenantUIDAssetsCertsListParamsWithContext(ctx context.Context) *V1TenantUIDAssetsCertsListParams { + var () + return &V1TenantUIDAssetsCertsListParams{ + + Context: ctx, + } +} + +// NewV1TenantUIDAssetsCertsListParamsWithHTTPClient creates a new V1TenantUIDAssetsCertsListParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1TenantUIDAssetsCertsListParamsWithHTTPClient(client *http.Client) *V1TenantUIDAssetsCertsListParams { + var () + return &V1TenantUIDAssetsCertsListParams{ + HTTPClient: client, + } +} + +/* +V1TenantUIDAssetsCertsListParams contains all the parameters to send to the API endpoint +for the v1 tenant u Id assets certs list operation typically these are written to a http.Request +*/ +type V1TenantUIDAssetsCertsListParams struct { + + /*TenantUID*/ + TenantUID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 tenant u Id assets certs list params +func (o *V1TenantUIDAssetsCertsListParams) WithTimeout(timeout time.Duration) *V1TenantUIDAssetsCertsListParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 tenant u Id assets certs list params +func (o *V1TenantUIDAssetsCertsListParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 tenant u Id assets certs list params +func (o *V1TenantUIDAssetsCertsListParams) WithContext(ctx context.Context) *V1TenantUIDAssetsCertsListParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 tenant u Id assets certs list params +func (o *V1TenantUIDAssetsCertsListParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 tenant u Id assets certs list params +func (o *V1TenantUIDAssetsCertsListParams) WithHTTPClient(client *http.Client) *V1TenantUIDAssetsCertsListParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 tenant u Id assets certs list params +func (o *V1TenantUIDAssetsCertsListParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithTenantUID adds the tenantUID to the v1 tenant u Id assets certs list params +func (o *V1TenantUIDAssetsCertsListParams) WithTenantUID(tenantUID string) *V1TenantUIDAssetsCertsListParams { + o.SetTenantUID(tenantUID) + return o +} + +// SetTenantUID adds the tenantUid to the v1 tenant u Id assets certs list params +func (o *V1TenantUIDAssetsCertsListParams) SetTenantUID(tenantUID string) { + o.TenantUID = tenantUID +} + +// WriteToRequest writes these params to a swagger request +func (o *V1TenantUIDAssetsCertsListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param tenantUid + if err := r.SetPathParam("tenantUid", o.TenantUID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_tenant_uid_assets_certs_list_responses.go b/api/client/v1/v1_tenant_uid_assets_certs_list_responses.go new file mode 100644 index 00000000..3d7b10fe --- /dev/null +++ b/api/client/v1/v1_tenant_uid_assets_certs_list_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1TenantUIDAssetsCertsListReader is a Reader for the V1TenantUIDAssetsCertsList structure. +type V1TenantUIDAssetsCertsListReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1TenantUIDAssetsCertsListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1TenantUIDAssetsCertsListOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1TenantUIDAssetsCertsListOK creates a V1TenantUIDAssetsCertsListOK with default headers values +func NewV1TenantUIDAssetsCertsListOK() *V1TenantUIDAssetsCertsListOK { + return &V1TenantUIDAssetsCertsListOK{} +} + +/* +V1TenantUIDAssetsCertsListOK handles this case with default header values. + +OK +*/ +type V1TenantUIDAssetsCertsListOK struct { + Payload *models.V1TenantAssetCerts +} + +func (o *V1TenantUIDAssetsCertsListOK) Error() string { + return fmt.Sprintf("[GET /v1/tenants/{tenantUid}/assets/certs][%d] v1TenantUIdAssetsCertsListOK %+v", 200, o.Payload) +} + +func (o *V1TenantUIDAssetsCertsListOK) GetPayload() *models.V1TenantAssetCerts { + return o.Payload +} + +func (o *V1TenantUIDAssetsCertsListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1TenantAssetCerts) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_tenant_uid_assets_certs_uid_delete_parameters.go b/api/client/v1/v1_tenant_uid_assets_certs_uid_delete_parameters.go new file mode 100644 index 00000000..53ca4b0a --- /dev/null +++ b/api/client/v1/v1_tenant_uid_assets_certs_uid_delete_parameters.go @@ -0,0 +1,151 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1TenantUIDAssetsCertsUIDDeleteParams creates a new V1TenantUIDAssetsCertsUIDDeleteParams object +// with the default values initialized. +func NewV1TenantUIDAssetsCertsUIDDeleteParams() *V1TenantUIDAssetsCertsUIDDeleteParams { + var () + return &V1TenantUIDAssetsCertsUIDDeleteParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1TenantUIDAssetsCertsUIDDeleteParamsWithTimeout creates a new V1TenantUIDAssetsCertsUIDDeleteParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1TenantUIDAssetsCertsUIDDeleteParamsWithTimeout(timeout time.Duration) *V1TenantUIDAssetsCertsUIDDeleteParams { + var () + return &V1TenantUIDAssetsCertsUIDDeleteParams{ + + timeout: timeout, + } +} + +// NewV1TenantUIDAssetsCertsUIDDeleteParamsWithContext creates a new V1TenantUIDAssetsCertsUIDDeleteParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1TenantUIDAssetsCertsUIDDeleteParamsWithContext(ctx context.Context) *V1TenantUIDAssetsCertsUIDDeleteParams { + var () + return &V1TenantUIDAssetsCertsUIDDeleteParams{ + + Context: ctx, + } +} + +// NewV1TenantUIDAssetsCertsUIDDeleteParamsWithHTTPClient creates a new V1TenantUIDAssetsCertsUIDDeleteParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1TenantUIDAssetsCertsUIDDeleteParamsWithHTTPClient(client *http.Client) *V1TenantUIDAssetsCertsUIDDeleteParams { + var () + return &V1TenantUIDAssetsCertsUIDDeleteParams{ + HTTPClient: client, + } +} + +/* +V1TenantUIDAssetsCertsUIDDeleteParams contains all the parameters to send to the API endpoint +for the v1 tenant Uid assets certs Uid delete operation typically these are written to a http.Request +*/ +type V1TenantUIDAssetsCertsUIDDeleteParams struct { + + /*CertificateUID*/ + CertificateUID string + /*TenantUID*/ + TenantUID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 tenant Uid assets certs Uid delete params +func (o *V1TenantUIDAssetsCertsUIDDeleteParams) WithTimeout(timeout time.Duration) *V1TenantUIDAssetsCertsUIDDeleteParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 tenant Uid assets certs Uid delete params +func (o *V1TenantUIDAssetsCertsUIDDeleteParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 tenant Uid assets certs Uid delete params +func (o *V1TenantUIDAssetsCertsUIDDeleteParams) WithContext(ctx context.Context) *V1TenantUIDAssetsCertsUIDDeleteParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 tenant Uid assets certs Uid delete params +func (o *V1TenantUIDAssetsCertsUIDDeleteParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 tenant Uid assets certs Uid delete params +func (o *V1TenantUIDAssetsCertsUIDDeleteParams) WithHTTPClient(client *http.Client) *V1TenantUIDAssetsCertsUIDDeleteParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 tenant Uid assets certs Uid delete params +func (o *V1TenantUIDAssetsCertsUIDDeleteParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithCertificateUID adds the certificateUID to the v1 tenant Uid assets certs Uid delete params +func (o *V1TenantUIDAssetsCertsUIDDeleteParams) WithCertificateUID(certificateUID string) *V1TenantUIDAssetsCertsUIDDeleteParams { + o.SetCertificateUID(certificateUID) + return o +} + +// SetCertificateUID adds the certificateUid to the v1 tenant Uid assets certs Uid delete params +func (o *V1TenantUIDAssetsCertsUIDDeleteParams) SetCertificateUID(certificateUID string) { + o.CertificateUID = certificateUID +} + +// WithTenantUID adds the tenantUID to the v1 tenant Uid assets certs Uid delete params +func (o *V1TenantUIDAssetsCertsUIDDeleteParams) WithTenantUID(tenantUID string) *V1TenantUIDAssetsCertsUIDDeleteParams { + o.SetTenantUID(tenantUID) + return o +} + +// SetTenantUID adds the tenantUid to the v1 tenant Uid assets certs Uid delete params +func (o *V1TenantUIDAssetsCertsUIDDeleteParams) SetTenantUID(tenantUID string) { + o.TenantUID = tenantUID +} + +// WriteToRequest writes these params to a swagger request +func (o *V1TenantUIDAssetsCertsUIDDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param certificateUid + if err := r.SetPathParam("certificateUid", o.CertificateUID); err != nil { + return err + } + + // path param tenantUid + if err := r.SetPathParam("tenantUid", o.TenantUID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_tenant_uid_assets_certs_uid_delete_responses.go b/api/client/v1/v1_tenant_uid_assets_certs_uid_delete_responses.go new file mode 100644 index 00000000..55d5278a --- /dev/null +++ b/api/client/v1/v1_tenant_uid_assets_certs_uid_delete_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1TenantUIDAssetsCertsUIDDeleteReader is a Reader for the V1TenantUIDAssetsCertsUIDDelete structure. +type V1TenantUIDAssetsCertsUIDDeleteReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1TenantUIDAssetsCertsUIDDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1TenantUIDAssetsCertsUIDDeleteNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1TenantUIDAssetsCertsUIDDeleteNoContent creates a V1TenantUIDAssetsCertsUIDDeleteNoContent with default headers values +func NewV1TenantUIDAssetsCertsUIDDeleteNoContent() *V1TenantUIDAssetsCertsUIDDeleteNoContent { + return &V1TenantUIDAssetsCertsUIDDeleteNoContent{} +} + +/* +V1TenantUIDAssetsCertsUIDDeleteNoContent handles this case with default header values. + +The resource was deleted successfully +*/ +type V1TenantUIDAssetsCertsUIDDeleteNoContent struct { +} + +func (o *V1TenantUIDAssetsCertsUIDDeleteNoContent) Error() string { + return fmt.Sprintf("[DELETE /v1/tenants/{tenantUid}/assets/certs/{certificateUid}][%d] v1TenantUidAssetsCertsUidDeleteNoContent ", 204) +} + +func (o *V1TenantUIDAssetsCertsUIDDeleteNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_tenant_uid_assets_certs_uid_get_parameters.go b/api/client/v1/v1_tenant_uid_assets_certs_uid_get_parameters.go new file mode 100644 index 00000000..d3563a4e --- /dev/null +++ b/api/client/v1/v1_tenant_uid_assets_certs_uid_get_parameters.go @@ -0,0 +1,151 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1TenantUIDAssetsCertsUIDGetParams creates a new V1TenantUIDAssetsCertsUIDGetParams object +// with the default values initialized. +func NewV1TenantUIDAssetsCertsUIDGetParams() *V1TenantUIDAssetsCertsUIDGetParams { + var () + return &V1TenantUIDAssetsCertsUIDGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1TenantUIDAssetsCertsUIDGetParamsWithTimeout creates a new V1TenantUIDAssetsCertsUIDGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1TenantUIDAssetsCertsUIDGetParamsWithTimeout(timeout time.Duration) *V1TenantUIDAssetsCertsUIDGetParams { + var () + return &V1TenantUIDAssetsCertsUIDGetParams{ + + timeout: timeout, + } +} + +// NewV1TenantUIDAssetsCertsUIDGetParamsWithContext creates a new V1TenantUIDAssetsCertsUIDGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1TenantUIDAssetsCertsUIDGetParamsWithContext(ctx context.Context) *V1TenantUIDAssetsCertsUIDGetParams { + var () + return &V1TenantUIDAssetsCertsUIDGetParams{ + + Context: ctx, + } +} + +// NewV1TenantUIDAssetsCertsUIDGetParamsWithHTTPClient creates a new V1TenantUIDAssetsCertsUIDGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1TenantUIDAssetsCertsUIDGetParamsWithHTTPClient(client *http.Client) *V1TenantUIDAssetsCertsUIDGetParams { + var () + return &V1TenantUIDAssetsCertsUIDGetParams{ + HTTPClient: client, + } +} + +/* +V1TenantUIDAssetsCertsUIDGetParams contains all the parameters to send to the API endpoint +for the v1 tenant Uid assets certs Uid get operation typically these are written to a http.Request +*/ +type V1TenantUIDAssetsCertsUIDGetParams struct { + + /*CertificateUID*/ + CertificateUID string + /*TenantUID*/ + TenantUID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 tenant Uid assets certs Uid get params +func (o *V1TenantUIDAssetsCertsUIDGetParams) WithTimeout(timeout time.Duration) *V1TenantUIDAssetsCertsUIDGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 tenant Uid assets certs Uid get params +func (o *V1TenantUIDAssetsCertsUIDGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 tenant Uid assets certs Uid get params +func (o *V1TenantUIDAssetsCertsUIDGetParams) WithContext(ctx context.Context) *V1TenantUIDAssetsCertsUIDGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 tenant Uid assets certs Uid get params +func (o *V1TenantUIDAssetsCertsUIDGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 tenant Uid assets certs Uid get params +func (o *V1TenantUIDAssetsCertsUIDGetParams) WithHTTPClient(client *http.Client) *V1TenantUIDAssetsCertsUIDGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 tenant Uid assets certs Uid get params +func (o *V1TenantUIDAssetsCertsUIDGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithCertificateUID adds the certificateUID to the v1 tenant Uid assets certs Uid get params +func (o *V1TenantUIDAssetsCertsUIDGetParams) WithCertificateUID(certificateUID string) *V1TenantUIDAssetsCertsUIDGetParams { + o.SetCertificateUID(certificateUID) + return o +} + +// SetCertificateUID adds the certificateUid to the v1 tenant Uid assets certs Uid get params +func (o *V1TenantUIDAssetsCertsUIDGetParams) SetCertificateUID(certificateUID string) { + o.CertificateUID = certificateUID +} + +// WithTenantUID adds the tenantUID to the v1 tenant Uid assets certs Uid get params +func (o *V1TenantUIDAssetsCertsUIDGetParams) WithTenantUID(tenantUID string) *V1TenantUIDAssetsCertsUIDGetParams { + o.SetTenantUID(tenantUID) + return o +} + +// SetTenantUID adds the tenantUid to the v1 tenant Uid assets certs Uid get params +func (o *V1TenantUIDAssetsCertsUIDGetParams) SetTenantUID(tenantUID string) { + o.TenantUID = tenantUID +} + +// WriteToRequest writes these params to a swagger request +func (o *V1TenantUIDAssetsCertsUIDGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param certificateUid + if err := r.SetPathParam("certificateUid", o.CertificateUID); err != nil { + return err + } + + // path param tenantUid + if err := r.SetPathParam("tenantUid", o.TenantUID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_tenant_uid_assets_certs_uid_get_responses.go b/api/client/v1/v1_tenant_uid_assets_certs_uid_get_responses.go new file mode 100644 index 00000000..48a25492 --- /dev/null +++ b/api/client/v1/v1_tenant_uid_assets_certs_uid_get_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1TenantUIDAssetsCertsUIDGetReader is a Reader for the V1TenantUIDAssetsCertsUIDGet structure. +type V1TenantUIDAssetsCertsUIDGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1TenantUIDAssetsCertsUIDGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1TenantUIDAssetsCertsUIDGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1TenantUIDAssetsCertsUIDGetOK creates a V1TenantUIDAssetsCertsUIDGetOK with default headers values +func NewV1TenantUIDAssetsCertsUIDGetOK() *V1TenantUIDAssetsCertsUIDGetOK { + return &V1TenantUIDAssetsCertsUIDGetOK{} +} + +/* +V1TenantUIDAssetsCertsUIDGetOK handles this case with default header values. + +OK +*/ +type V1TenantUIDAssetsCertsUIDGetOK struct { + Payload *models.V1TenantAssetCert +} + +func (o *V1TenantUIDAssetsCertsUIDGetOK) Error() string { + return fmt.Sprintf("[GET /v1/tenants/{tenantUid}/assets/certs/{certificateUid}][%d] v1TenantUidAssetsCertsUidGetOK %+v", 200, o.Payload) +} + +func (o *V1TenantUIDAssetsCertsUIDGetOK) GetPayload() *models.V1TenantAssetCert { + return o.Payload +} + +func (o *V1TenantUIDAssetsCertsUIDGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1TenantAssetCert) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_tenant_uid_assets_certs_uid_update_parameters.go b/api/client/v1/v1_tenant_uid_assets_certs_uid_update_parameters.go new file mode 100644 index 00000000..ae253157 --- /dev/null +++ b/api/client/v1/v1_tenant_uid_assets_certs_uid_update_parameters.go @@ -0,0 +1,172 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1TenantUIDAssetsCertsUIDUpdateParams creates a new V1TenantUIDAssetsCertsUIDUpdateParams object +// with the default values initialized. +func NewV1TenantUIDAssetsCertsUIDUpdateParams() *V1TenantUIDAssetsCertsUIDUpdateParams { + var () + return &V1TenantUIDAssetsCertsUIDUpdateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1TenantUIDAssetsCertsUIDUpdateParamsWithTimeout creates a new V1TenantUIDAssetsCertsUIDUpdateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1TenantUIDAssetsCertsUIDUpdateParamsWithTimeout(timeout time.Duration) *V1TenantUIDAssetsCertsUIDUpdateParams { + var () + return &V1TenantUIDAssetsCertsUIDUpdateParams{ + + timeout: timeout, + } +} + +// NewV1TenantUIDAssetsCertsUIDUpdateParamsWithContext creates a new V1TenantUIDAssetsCertsUIDUpdateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1TenantUIDAssetsCertsUIDUpdateParamsWithContext(ctx context.Context) *V1TenantUIDAssetsCertsUIDUpdateParams { + var () + return &V1TenantUIDAssetsCertsUIDUpdateParams{ + + Context: ctx, + } +} + +// NewV1TenantUIDAssetsCertsUIDUpdateParamsWithHTTPClient creates a new V1TenantUIDAssetsCertsUIDUpdateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1TenantUIDAssetsCertsUIDUpdateParamsWithHTTPClient(client *http.Client) *V1TenantUIDAssetsCertsUIDUpdateParams { + var () + return &V1TenantUIDAssetsCertsUIDUpdateParams{ + HTTPClient: client, + } +} + +/* +V1TenantUIDAssetsCertsUIDUpdateParams contains all the parameters to send to the API endpoint +for the v1 tenant Uid assets certs Uid update operation typically these are written to a http.Request +*/ +type V1TenantUIDAssetsCertsUIDUpdateParams struct { + + /*Body*/ + Body *models.V1TenantAssetCert + /*CertificateUID*/ + CertificateUID string + /*TenantUID*/ + TenantUID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 tenant Uid assets certs Uid update params +func (o *V1TenantUIDAssetsCertsUIDUpdateParams) WithTimeout(timeout time.Duration) *V1TenantUIDAssetsCertsUIDUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 tenant Uid assets certs Uid update params +func (o *V1TenantUIDAssetsCertsUIDUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 tenant Uid assets certs Uid update params +func (o *V1TenantUIDAssetsCertsUIDUpdateParams) WithContext(ctx context.Context) *V1TenantUIDAssetsCertsUIDUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 tenant Uid assets certs Uid update params +func (o *V1TenantUIDAssetsCertsUIDUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 tenant Uid assets certs Uid update params +func (o *V1TenantUIDAssetsCertsUIDUpdateParams) WithHTTPClient(client *http.Client) *V1TenantUIDAssetsCertsUIDUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 tenant Uid assets certs Uid update params +func (o *V1TenantUIDAssetsCertsUIDUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 tenant Uid assets certs Uid update params +func (o *V1TenantUIDAssetsCertsUIDUpdateParams) WithBody(body *models.V1TenantAssetCert) *V1TenantUIDAssetsCertsUIDUpdateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 tenant Uid assets certs Uid update params +func (o *V1TenantUIDAssetsCertsUIDUpdateParams) SetBody(body *models.V1TenantAssetCert) { + o.Body = body +} + +// WithCertificateUID adds the certificateUID to the v1 tenant Uid assets certs Uid update params +func (o *V1TenantUIDAssetsCertsUIDUpdateParams) WithCertificateUID(certificateUID string) *V1TenantUIDAssetsCertsUIDUpdateParams { + o.SetCertificateUID(certificateUID) + return o +} + +// SetCertificateUID adds the certificateUid to the v1 tenant Uid assets certs Uid update params +func (o *V1TenantUIDAssetsCertsUIDUpdateParams) SetCertificateUID(certificateUID string) { + o.CertificateUID = certificateUID +} + +// WithTenantUID adds the tenantUID to the v1 tenant Uid assets certs Uid update params +func (o *V1TenantUIDAssetsCertsUIDUpdateParams) WithTenantUID(tenantUID string) *V1TenantUIDAssetsCertsUIDUpdateParams { + o.SetTenantUID(tenantUID) + return o +} + +// SetTenantUID adds the tenantUid to the v1 tenant Uid assets certs Uid update params +func (o *V1TenantUIDAssetsCertsUIDUpdateParams) SetTenantUID(tenantUID string) { + o.TenantUID = tenantUID +} + +// WriteToRequest writes these params to a swagger request +func (o *V1TenantUIDAssetsCertsUIDUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param certificateUid + if err := r.SetPathParam("certificateUid", o.CertificateUID); err != nil { + return err + } + + // path param tenantUid + if err := r.SetPathParam("tenantUid", o.TenantUID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_tenant_uid_assets_certs_uid_update_responses.go b/api/client/v1/v1_tenant_uid_assets_certs_uid_update_responses.go new file mode 100644 index 00000000..956520bd --- /dev/null +++ b/api/client/v1/v1_tenant_uid_assets_certs_uid_update_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1TenantUIDAssetsCertsUIDUpdateReader is a Reader for the V1TenantUIDAssetsCertsUIDUpdate structure. +type V1TenantUIDAssetsCertsUIDUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1TenantUIDAssetsCertsUIDUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1TenantUIDAssetsCertsUIDUpdateNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1TenantUIDAssetsCertsUIDUpdateNoContent creates a V1TenantUIDAssetsCertsUIDUpdateNoContent with default headers values +func NewV1TenantUIDAssetsCertsUIDUpdateNoContent() *V1TenantUIDAssetsCertsUIDUpdateNoContent { + return &V1TenantUIDAssetsCertsUIDUpdateNoContent{} +} + +/* +V1TenantUIDAssetsCertsUIDUpdateNoContent handles this case with default header values. + +The resource was updated successfully +*/ +type V1TenantUIDAssetsCertsUIDUpdateNoContent struct { +} + +func (o *V1TenantUIDAssetsCertsUIDUpdateNoContent) Error() string { + return fmt.Sprintf("[PUT /v1/tenants/{tenantUid}/assets/certs/{certificateUid}][%d] v1TenantUidAssetsCertsUidUpdateNoContent ", 204) +} + +func (o *V1TenantUIDAssetsCertsUIDUpdateNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_tenant_uid_assets_data_sinks_create_parameters.go b/api/client/v1/v1_tenant_uid_assets_data_sinks_create_parameters.go new file mode 100644 index 00000000..27426a2f --- /dev/null +++ b/api/client/v1/v1_tenant_uid_assets_data_sinks_create_parameters.go @@ -0,0 +1,154 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1TenantUIDAssetsDataSinksCreateParams creates a new V1TenantUIDAssetsDataSinksCreateParams object +// with the default values initialized. +func NewV1TenantUIDAssetsDataSinksCreateParams() *V1TenantUIDAssetsDataSinksCreateParams { + var () + return &V1TenantUIDAssetsDataSinksCreateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1TenantUIDAssetsDataSinksCreateParamsWithTimeout creates a new V1TenantUIDAssetsDataSinksCreateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1TenantUIDAssetsDataSinksCreateParamsWithTimeout(timeout time.Duration) *V1TenantUIDAssetsDataSinksCreateParams { + var () + return &V1TenantUIDAssetsDataSinksCreateParams{ + + timeout: timeout, + } +} + +// NewV1TenantUIDAssetsDataSinksCreateParamsWithContext creates a new V1TenantUIDAssetsDataSinksCreateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1TenantUIDAssetsDataSinksCreateParamsWithContext(ctx context.Context) *V1TenantUIDAssetsDataSinksCreateParams { + var () + return &V1TenantUIDAssetsDataSinksCreateParams{ + + Context: ctx, + } +} + +// NewV1TenantUIDAssetsDataSinksCreateParamsWithHTTPClient creates a new V1TenantUIDAssetsDataSinksCreateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1TenantUIDAssetsDataSinksCreateParamsWithHTTPClient(client *http.Client) *V1TenantUIDAssetsDataSinksCreateParams { + var () + return &V1TenantUIDAssetsDataSinksCreateParams{ + HTTPClient: client, + } +} + +/* +V1TenantUIDAssetsDataSinksCreateParams contains all the parameters to send to the API endpoint +for the v1 tenant Uid assets data sinks create operation typically these are written to a http.Request +*/ +type V1TenantUIDAssetsDataSinksCreateParams struct { + + /*Body*/ + Body *models.V1DataSinkConfig + /*TenantUID*/ + TenantUID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 tenant Uid assets data sinks create params +func (o *V1TenantUIDAssetsDataSinksCreateParams) WithTimeout(timeout time.Duration) *V1TenantUIDAssetsDataSinksCreateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 tenant Uid assets data sinks create params +func (o *V1TenantUIDAssetsDataSinksCreateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 tenant Uid assets data sinks create params +func (o *V1TenantUIDAssetsDataSinksCreateParams) WithContext(ctx context.Context) *V1TenantUIDAssetsDataSinksCreateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 tenant Uid assets data sinks create params +func (o *V1TenantUIDAssetsDataSinksCreateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 tenant Uid assets data sinks create params +func (o *V1TenantUIDAssetsDataSinksCreateParams) WithHTTPClient(client *http.Client) *V1TenantUIDAssetsDataSinksCreateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 tenant Uid assets data sinks create params +func (o *V1TenantUIDAssetsDataSinksCreateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 tenant Uid assets data sinks create params +func (o *V1TenantUIDAssetsDataSinksCreateParams) WithBody(body *models.V1DataSinkConfig) *V1TenantUIDAssetsDataSinksCreateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 tenant Uid assets data sinks create params +func (o *V1TenantUIDAssetsDataSinksCreateParams) SetBody(body *models.V1DataSinkConfig) { + o.Body = body +} + +// WithTenantUID adds the tenantUID to the v1 tenant Uid assets data sinks create params +func (o *V1TenantUIDAssetsDataSinksCreateParams) WithTenantUID(tenantUID string) *V1TenantUIDAssetsDataSinksCreateParams { + o.SetTenantUID(tenantUID) + return o +} + +// SetTenantUID adds the tenantUid to the v1 tenant Uid assets data sinks create params +func (o *V1TenantUIDAssetsDataSinksCreateParams) SetTenantUID(tenantUID string) { + o.TenantUID = tenantUID +} + +// WriteToRequest writes these params to a swagger request +func (o *V1TenantUIDAssetsDataSinksCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param tenantUid + if err := r.SetPathParam("tenantUid", o.TenantUID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_tenant_uid_assets_data_sinks_create_responses.go b/api/client/v1/v1_tenant_uid_assets_data_sinks_create_responses.go new file mode 100644 index 00000000..a69635f2 --- /dev/null +++ b/api/client/v1/v1_tenant_uid_assets_data_sinks_create_responses.go @@ -0,0 +1,77 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1TenantUIDAssetsDataSinksCreateReader is a Reader for the V1TenantUIDAssetsDataSinksCreate structure. +type V1TenantUIDAssetsDataSinksCreateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1TenantUIDAssetsDataSinksCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 201: + result := NewV1TenantUIDAssetsDataSinksCreateCreated() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1TenantUIDAssetsDataSinksCreateCreated creates a V1TenantUIDAssetsDataSinksCreateCreated with default headers values +func NewV1TenantUIDAssetsDataSinksCreateCreated() *V1TenantUIDAssetsDataSinksCreateCreated { + return &V1TenantUIDAssetsDataSinksCreateCreated{} +} + +/* +V1TenantUIDAssetsDataSinksCreateCreated handles this case with default header values. + +Created successfully +*/ +type V1TenantUIDAssetsDataSinksCreateCreated struct { + /*Audit uid for the request + */ + AuditUID string + + Payload *models.V1UID +} + +func (o *V1TenantUIDAssetsDataSinksCreateCreated) Error() string { + return fmt.Sprintf("[POST /v1/tenants/{tenantUid}/assets/dataSinks][%d] v1TenantUidAssetsDataSinksCreateCreated %+v", 201, o.Payload) +} + +func (o *V1TenantUIDAssetsDataSinksCreateCreated) GetPayload() *models.V1UID { + return o.Payload +} + +func (o *V1TenantUIDAssetsDataSinksCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header AuditUid + o.AuditUID = response.GetHeader("AuditUid") + + o.Payload = new(models.V1UID) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_tenant_uid_assets_data_sinks_delete_parameters.go b/api/client/v1/v1_tenant_uid_assets_data_sinks_delete_parameters.go new file mode 100644 index 00000000..7216303a --- /dev/null +++ b/api/client/v1/v1_tenant_uid_assets_data_sinks_delete_parameters.go @@ -0,0 +1,133 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1TenantUIDAssetsDataSinksDeleteParams creates a new V1TenantUIDAssetsDataSinksDeleteParams object +// with the default values initialized. +func NewV1TenantUIDAssetsDataSinksDeleteParams() *V1TenantUIDAssetsDataSinksDeleteParams { + var () + return &V1TenantUIDAssetsDataSinksDeleteParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1TenantUIDAssetsDataSinksDeleteParamsWithTimeout creates a new V1TenantUIDAssetsDataSinksDeleteParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1TenantUIDAssetsDataSinksDeleteParamsWithTimeout(timeout time.Duration) *V1TenantUIDAssetsDataSinksDeleteParams { + var () + return &V1TenantUIDAssetsDataSinksDeleteParams{ + + timeout: timeout, + } +} + +// NewV1TenantUIDAssetsDataSinksDeleteParamsWithContext creates a new V1TenantUIDAssetsDataSinksDeleteParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1TenantUIDAssetsDataSinksDeleteParamsWithContext(ctx context.Context) *V1TenantUIDAssetsDataSinksDeleteParams { + var () + return &V1TenantUIDAssetsDataSinksDeleteParams{ + + Context: ctx, + } +} + +// NewV1TenantUIDAssetsDataSinksDeleteParamsWithHTTPClient creates a new V1TenantUIDAssetsDataSinksDeleteParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1TenantUIDAssetsDataSinksDeleteParamsWithHTTPClient(client *http.Client) *V1TenantUIDAssetsDataSinksDeleteParams { + var () + return &V1TenantUIDAssetsDataSinksDeleteParams{ + HTTPClient: client, + } +} + +/* +V1TenantUIDAssetsDataSinksDeleteParams contains all the parameters to send to the API endpoint +for the v1 tenant Uid assets data sinks delete operation typically these are written to a http.Request +*/ +type V1TenantUIDAssetsDataSinksDeleteParams struct { + + /*TenantUID*/ + TenantUID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 tenant Uid assets data sinks delete params +func (o *V1TenantUIDAssetsDataSinksDeleteParams) WithTimeout(timeout time.Duration) *V1TenantUIDAssetsDataSinksDeleteParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 tenant Uid assets data sinks delete params +func (o *V1TenantUIDAssetsDataSinksDeleteParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 tenant Uid assets data sinks delete params +func (o *V1TenantUIDAssetsDataSinksDeleteParams) WithContext(ctx context.Context) *V1TenantUIDAssetsDataSinksDeleteParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 tenant Uid assets data sinks delete params +func (o *V1TenantUIDAssetsDataSinksDeleteParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 tenant Uid assets data sinks delete params +func (o *V1TenantUIDAssetsDataSinksDeleteParams) WithHTTPClient(client *http.Client) *V1TenantUIDAssetsDataSinksDeleteParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 tenant Uid assets data sinks delete params +func (o *V1TenantUIDAssetsDataSinksDeleteParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithTenantUID adds the tenantUID to the v1 tenant Uid assets data sinks delete params +func (o *V1TenantUIDAssetsDataSinksDeleteParams) WithTenantUID(tenantUID string) *V1TenantUIDAssetsDataSinksDeleteParams { + o.SetTenantUID(tenantUID) + return o +} + +// SetTenantUID adds the tenantUid to the v1 tenant Uid assets data sinks delete params +func (o *V1TenantUIDAssetsDataSinksDeleteParams) SetTenantUID(tenantUID string) { + o.TenantUID = tenantUID +} + +// WriteToRequest writes these params to a swagger request +func (o *V1TenantUIDAssetsDataSinksDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param tenantUid + if err := r.SetPathParam("tenantUid", o.TenantUID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_tenant_uid_assets_data_sinks_delete_responses.go b/api/client/v1/v1_tenant_uid_assets_data_sinks_delete_responses.go new file mode 100644 index 00000000..030a0680 --- /dev/null +++ b/api/client/v1/v1_tenant_uid_assets_data_sinks_delete_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1TenantUIDAssetsDataSinksDeleteReader is a Reader for the V1TenantUIDAssetsDataSinksDelete structure. +type V1TenantUIDAssetsDataSinksDeleteReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1TenantUIDAssetsDataSinksDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1TenantUIDAssetsDataSinksDeleteNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1TenantUIDAssetsDataSinksDeleteNoContent creates a V1TenantUIDAssetsDataSinksDeleteNoContent with default headers values +func NewV1TenantUIDAssetsDataSinksDeleteNoContent() *V1TenantUIDAssetsDataSinksDeleteNoContent { + return &V1TenantUIDAssetsDataSinksDeleteNoContent{} +} + +/* +V1TenantUIDAssetsDataSinksDeleteNoContent handles this case with default header values. + +The resource was deleted successfully +*/ +type V1TenantUIDAssetsDataSinksDeleteNoContent struct { +} + +func (o *V1TenantUIDAssetsDataSinksDeleteNoContent) Error() string { + return fmt.Sprintf("[DELETE /v1/tenants/{tenantUid}/assets/dataSinks][%d] v1TenantUidAssetsDataSinksDeleteNoContent ", 204) +} + +func (o *V1TenantUIDAssetsDataSinksDeleteNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_tenant_uid_assets_data_sinks_get_parameters.go b/api/client/v1/v1_tenant_uid_assets_data_sinks_get_parameters.go new file mode 100644 index 00000000..dacb2507 --- /dev/null +++ b/api/client/v1/v1_tenant_uid_assets_data_sinks_get_parameters.go @@ -0,0 +1,133 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1TenantUIDAssetsDataSinksGetParams creates a new V1TenantUIDAssetsDataSinksGetParams object +// with the default values initialized. +func NewV1TenantUIDAssetsDataSinksGetParams() *V1TenantUIDAssetsDataSinksGetParams { + var () + return &V1TenantUIDAssetsDataSinksGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1TenantUIDAssetsDataSinksGetParamsWithTimeout creates a new V1TenantUIDAssetsDataSinksGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1TenantUIDAssetsDataSinksGetParamsWithTimeout(timeout time.Duration) *V1TenantUIDAssetsDataSinksGetParams { + var () + return &V1TenantUIDAssetsDataSinksGetParams{ + + timeout: timeout, + } +} + +// NewV1TenantUIDAssetsDataSinksGetParamsWithContext creates a new V1TenantUIDAssetsDataSinksGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1TenantUIDAssetsDataSinksGetParamsWithContext(ctx context.Context) *V1TenantUIDAssetsDataSinksGetParams { + var () + return &V1TenantUIDAssetsDataSinksGetParams{ + + Context: ctx, + } +} + +// NewV1TenantUIDAssetsDataSinksGetParamsWithHTTPClient creates a new V1TenantUIDAssetsDataSinksGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1TenantUIDAssetsDataSinksGetParamsWithHTTPClient(client *http.Client) *V1TenantUIDAssetsDataSinksGetParams { + var () + return &V1TenantUIDAssetsDataSinksGetParams{ + HTTPClient: client, + } +} + +/* +V1TenantUIDAssetsDataSinksGetParams contains all the parameters to send to the API endpoint +for the v1 tenant Uid assets data sinks get operation typically these are written to a http.Request +*/ +type V1TenantUIDAssetsDataSinksGetParams struct { + + /*TenantUID*/ + TenantUID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 tenant Uid assets data sinks get params +func (o *V1TenantUIDAssetsDataSinksGetParams) WithTimeout(timeout time.Duration) *V1TenantUIDAssetsDataSinksGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 tenant Uid assets data sinks get params +func (o *V1TenantUIDAssetsDataSinksGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 tenant Uid assets data sinks get params +func (o *V1TenantUIDAssetsDataSinksGetParams) WithContext(ctx context.Context) *V1TenantUIDAssetsDataSinksGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 tenant Uid assets data sinks get params +func (o *V1TenantUIDAssetsDataSinksGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 tenant Uid assets data sinks get params +func (o *V1TenantUIDAssetsDataSinksGetParams) WithHTTPClient(client *http.Client) *V1TenantUIDAssetsDataSinksGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 tenant Uid assets data sinks get params +func (o *V1TenantUIDAssetsDataSinksGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithTenantUID adds the tenantUID to the v1 tenant Uid assets data sinks get params +func (o *V1TenantUIDAssetsDataSinksGetParams) WithTenantUID(tenantUID string) *V1TenantUIDAssetsDataSinksGetParams { + o.SetTenantUID(tenantUID) + return o +} + +// SetTenantUID adds the tenantUid to the v1 tenant Uid assets data sinks get params +func (o *V1TenantUIDAssetsDataSinksGetParams) SetTenantUID(tenantUID string) { + o.TenantUID = tenantUID +} + +// WriteToRequest writes these params to a swagger request +func (o *V1TenantUIDAssetsDataSinksGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param tenantUid + if err := r.SetPathParam("tenantUid", o.TenantUID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_tenant_uid_assets_data_sinks_get_responses.go b/api/client/v1/v1_tenant_uid_assets_data_sinks_get_responses.go new file mode 100644 index 00000000..8deb9627 --- /dev/null +++ b/api/client/v1/v1_tenant_uid_assets_data_sinks_get_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1TenantUIDAssetsDataSinksGetReader is a Reader for the V1TenantUIDAssetsDataSinksGet structure. +type V1TenantUIDAssetsDataSinksGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1TenantUIDAssetsDataSinksGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1TenantUIDAssetsDataSinksGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1TenantUIDAssetsDataSinksGetOK creates a V1TenantUIDAssetsDataSinksGetOK with default headers values +func NewV1TenantUIDAssetsDataSinksGetOK() *V1TenantUIDAssetsDataSinksGetOK { + return &V1TenantUIDAssetsDataSinksGetOK{} +} + +/* +V1TenantUIDAssetsDataSinksGetOK handles this case with default header values. + +OK +*/ +type V1TenantUIDAssetsDataSinksGetOK struct { + Payload *models.V1DataSinkConfig +} + +func (o *V1TenantUIDAssetsDataSinksGetOK) Error() string { + return fmt.Sprintf("[GET /v1/tenants/{tenantUid}/assets/dataSinks][%d] v1TenantUidAssetsDataSinksGetOK %+v", 200, o.Payload) +} + +func (o *V1TenantUIDAssetsDataSinksGetOK) GetPayload() *models.V1DataSinkConfig { + return o.Payload +} + +func (o *V1TenantUIDAssetsDataSinksGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1DataSinkConfig) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_tenant_uid_assets_data_sinks_update_parameters.go b/api/client/v1/v1_tenant_uid_assets_data_sinks_update_parameters.go new file mode 100644 index 00000000..a3916822 --- /dev/null +++ b/api/client/v1/v1_tenant_uid_assets_data_sinks_update_parameters.go @@ -0,0 +1,154 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1TenantUIDAssetsDataSinksUpdateParams creates a new V1TenantUIDAssetsDataSinksUpdateParams object +// with the default values initialized. +func NewV1TenantUIDAssetsDataSinksUpdateParams() *V1TenantUIDAssetsDataSinksUpdateParams { + var () + return &V1TenantUIDAssetsDataSinksUpdateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1TenantUIDAssetsDataSinksUpdateParamsWithTimeout creates a new V1TenantUIDAssetsDataSinksUpdateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1TenantUIDAssetsDataSinksUpdateParamsWithTimeout(timeout time.Duration) *V1TenantUIDAssetsDataSinksUpdateParams { + var () + return &V1TenantUIDAssetsDataSinksUpdateParams{ + + timeout: timeout, + } +} + +// NewV1TenantUIDAssetsDataSinksUpdateParamsWithContext creates a new V1TenantUIDAssetsDataSinksUpdateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1TenantUIDAssetsDataSinksUpdateParamsWithContext(ctx context.Context) *V1TenantUIDAssetsDataSinksUpdateParams { + var () + return &V1TenantUIDAssetsDataSinksUpdateParams{ + + Context: ctx, + } +} + +// NewV1TenantUIDAssetsDataSinksUpdateParamsWithHTTPClient creates a new V1TenantUIDAssetsDataSinksUpdateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1TenantUIDAssetsDataSinksUpdateParamsWithHTTPClient(client *http.Client) *V1TenantUIDAssetsDataSinksUpdateParams { + var () + return &V1TenantUIDAssetsDataSinksUpdateParams{ + HTTPClient: client, + } +} + +/* +V1TenantUIDAssetsDataSinksUpdateParams contains all the parameters to send to the API endpoint +for the v1 tenant Uid assets data sinks update operation typically these are written to a http.Request +*/ +type V1TenantUIDAssetsDataSinksUpdateParams struct { + + /*Body*/ + Body *models.V1DataSinkConfig + /*TenantUID*/ + TenantUID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 tenant Uid assets data sinks update params +func (o *V1TenantUIDAssetsDataSinksUpdateParams) WithTimeout(timeout time.Duration) *V1TenantUIDAssetsDataSinksUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 tenant Uid assets data sinks update params +func (o *V1TenantUIDAssetsDataSinksUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 tenant Uid assets data sinks update params +func (o *V1TenantUIDAssetsDataSinksUpdateParams) WithContext(ctx context.Context) *V1TenantUIDAssetsDataSinksUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 tenant Uid assets data sinks update params +func (o *V1TenantUIDAssetsDataSinksUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 tenant Uid assets data sinks update params +func (o *V1TenantUIDAssetsDataSinksUpdateParams) WithHTTPClient(client *http.Client) *V1TenantUIDAssetsDataSinksUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 tenant Uid assets data sinks update params +func (o *V1TenantUIDAssetsDataSinksUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 tenant Uid assets data sinks update params +func (o *V1TenantUIDAssetsDataSinksUpdateParams) WithBody(body *models.V1DataSinkConfig) *V1TenantUIDAssetsDataSinksUpdateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 tenant Uid assets data sinks update params +func (o *V1TenantUIDAssetsDataSinksUpdateParams) SetBody(body *models.V1DataSinkConfig) { + o.Body = body +} + +// WithTenantUID adds the tenantUID to the v1 tenant Uid assets data sinks update params +func (o *V1TenantUIDAssetsDataSinksUpdateParams) WithTenantUID(tenantUID string) *V1TenantUIDAssetsDataSinksUpdateParams { + o.SetTenantUID(tenantUID) + return o +} + +// SetTenantUID adds the tenantUid to the v1 tenant Uid assets data sinks update params +func (o *V1TenantUIDAssetsDataSinksUpdateParams) SetTenantUID(tenantUID string) { + o.TenantUID = tenantUID +} + +// WriteToRequest writes these params to a swagger request +func (o *V1TenantUIDAssetsDataSinksUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param tenantUid + if err := r.SetPathParam("tenantUid", o.TenantUID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_tenant_uid_assets_data_sinks_update_responses.go b/api/client/v1/v1_tenant_uid_assets_data_sinks_update_responses.go new file mode 100644 index 00000000..6b36ae94 --- /dev/null +++ b/api/client/v1/v1_tenant_uid_assets_data_sinks_update_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1TenantUIDAssetsDataSinksUpdateReader is a Reader for the V1TenantUIDAssetsDataSinksUpdate structure. +type V1TenantUIDAssetsDataSinksUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1TenantUIDAssetsDataSinksUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1TenantUIDAssetsDataSinksUpdateNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1TenantUIDAssetsDataSinksUpdateNoContent creates a V1TenantUIDAssetsDataSinksUpdateNoContent with default headers values +func NewV1TenantUIDAssetsDataSinksUpdateNoContent() *V1TenantUIDAssetsDataSinksUpdateNoContent { + return &V1TenantUIDAssetsDataSinksUpdateNoContent{} +} + +/* +V1TenantUIDAssetsDataSinksUpdateNoContent handles this case with default header values. + +The resource was updated successfully +*/ +type V1TenantUIDAssetsDataSinksUpdateNoContent struct { +} + +func (o *V1TenantUIDAssetsDataSinksUpdateNoContent) Error() string { + return fmt.Sprintf("[PUT /v1/tenants/{tenantUid}/assets/dataSinks][%d] v1TenantUidAssetsDataSinksUpdateNoContent ", 204) +} + +func (o *V1TenantUIDAssetsDataSinksUpdateNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_tenant_uid_auth_token_settings_get_parameters.go b/api/client/v1/v1_tenant_uid_auth_token_settings_get_parameters.go new file mode 100644 index 00000000..12311411 --- /dev/null +++ b/api/client/v1/v1_tenant_uid_auth_token_settings_get_parameters.go @@ -0,0 +1,133 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1TenantUIDAuthTokenSettingsGetParams creates a new V1TenantUIDAuthTokenSettingsGetParams object +// with the default values initialized. +func NewV1TenantUIDAuthTokenSettingsGetParams() *V1TenantUIDAuthTokenSettingsGetParams { + var () + return &V1TenantUIDAuthTokenSettingsGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1TenantUIDAuthTokenSettingsGetParamsWithTimeout creates a new V1TenantUIDAuthTokenSettingsGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1TenantUIDAuthTokenSettingsGetParamsWithTimeout(timeout time.Duration) *V1TenantUIDAuthTokenSettingsGetParams { + var () + return &V1TenantUIDAuthTokenSettingsGetParams{ + + timeout: timeout, + } +} + +// NewV1TenantUIDAuthTokenSettingsGetParamsWithContext creates a new V1TenantUIDAuthTokenSettingsGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1TenantUIDAuthTokenSettingsGetParamsWithContext(ctx context.Context) *V1TenantUIDAuthTokenSettingsGetParams { + var () + return &V1TenantUIDAuthTokenSettingsGetParams{ + + Context: ctx, + } +} + +// NewV1TenantUIDAuthTokenSettingsGetParamsWithHTTPClient creates a new V1TenantUIDAuthTokenSettingsGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1TenantUIDAuthTokenSettingsGetParamsWithHTTPClient(client *http.Client) *V1TenantUIDAuthTokenSettingsGetParams { + var () + return &V1TenantUIDAuthTokenSettingsGetParams{ + HTTPClient: client, + } +} + +/* +V1TenantUIDAuthTokenSettingsGetParams contains all the parameters to send to the API endpoint +for the v1 tenant Uid auth token settings get operation typically these are written to a http.Request +*/ +type V1TenantUIDAuthTokenSettingsGetParams struct { + + /*TenantUID*/ + TenantUID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 tenant Uid auth token settings get params +func (o *V1TenantUIDAuthTokenSettingsGetParams) WithTimeout(timeout time.Duration) *V1TenantUIDAuthTokenSettingsGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 tenant Uid auth token settings get params +func (o *V1TenantUIDAuthTokenSettingsGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 tenant Uid auth token settings get params +func (o *V1TenantUIDAuthTokenSettingsGetParams) WithContext(ctx context.Context) *V1TenantUIDAuthTokenSettingsGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 tenant Uid auth token settings get params +func (o *V1TenantUIDAuthTokenSettingsGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 tenant Uid auth token settings get params +func (o *V1TenantUIDAuthTokenSettingsGetParams) WithHTTPClient(client *http.Client) *V1TenantUIDAuthTokenSettingsGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 tenant Uid auth token settings get params +func (o *V1TenantUIDAuthTokenSettingsGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithTenantUID adds the tenantUID to the v1 tenant Uid auth token settings get params +func (o *V1TenantUIDAuthTokenSettingsGetParams) WithTenantUID(tenantUID string) *V1TenantUIDAuthTokenSettingsGetParams { + o.SetTenantUID(tenantUID) + return o +} + +// SetTenantUID adds the tenantUid to the v1 tenant Uid auth token settings get params +func (o *V1TenantUIDAuthTokenSettingsGetParams) SetTenantUID(tenantUID string) { + o.TenantUID = tenantUID +} + +// WriteToRequest writes these params to a swagger request +func (o *V1TenantUIDAuthTokenSettingsGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param tenantUid + if err := r.SetPathParam("tenantUid", o.TenantUID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_tenant_uid_auth_token_settings_get_responses.go b/api/client/v1/v1_tenant_uid_auth_token_settings_get_responses.go new file mode 100644 index 00000000..6fdf04b8 --- /dev/null +++ b/api/client/v1/v1_tenant_uid_auth_token_settings_get_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1TenantUIDAuthTokenSettingsGetReader is a Reader for the V1TenantUIDAuthTokenSettingsGet structure. +type V1TenantUIDAuthTokenSettingsGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1TenantUIDAuthTokenSettingsGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1TenantUIDAuthTokenSettingsGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1TenantUIDAuthTokenSettingsGetOK creates a V1TenantUIDAuthTokenSettingsGetOK with default headers values +func NewV1TenantUIDAuthTokenSettingsGetOK() *V1TenantUIDAuthTokenSettingsGetOK { + return &V1TenantUIDAuthTokenSettingsGetOK{} +} + +/* +V1TenantUIDAuthTokenSettingsGetOK handles this case with default header values. + +OK +*/ +type V1TenantUIDAuthTokenSettingsGetOK struct { + Payload *models.V1AuthTokenSettings +} + +func (o *V1TenantUIDAuthTokenSettingsGetOK) Error() string { + return fmt.Sprintf("[GET /v1/tenants/{tenantUid}/authTokenSettings][%d] v1TenantUidAuthTokenSettingsGetOK %+v", 200, o.Payload) +} + +func (o *V1TenantUIDAuthTokenSettingsGetOK) GetPayload() *models.V1AuthTokenSettings { + return o.Payload +} + +func (o *V1TenantUIDAuthTokenSettingsGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1AuthTokenSettings) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_tenant_uid_auth_token_settings_update_parameters.go b/api/client/v1/v1_tenant_uid_auth_token_settings_update_parameters.go new file mode 100644 index 00000000..fa61173c --- /dev/null +++ b/api/client/v1/v1_tenant_uid_auth_token_settings_update_parameters.go @@ -0,0 +1,154 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1TenantUIDAuthTokenSettingsUpdateParams creates a new V1TenantUIDAuthTokenSettingsUpdateParams object +// with the default values initialized. +func NewV1TenantUIDAuthTokenSettingsUpdateParams() *V1TenantUIDAuthTokenSettingsUpdateParams { + var () + return &V1TenantUIDAuthTokenSettingsUpdateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1TenantUIDAuthTokenSettingsUpdateParamsWithTimeout creates a new V1TenantUIDAuthTokenSettingsUpdateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1TenantUIDAuthTokenSettingsUpdateParamsWithTimeout(timeout time.Duration) *V1TenantUIDAuthTokenSettingsUpdateParams { + var () + return &V1TenantUIDAuthTokenSettingsUpdateParams{ + + timeout: timeout, + } +} + +// NewV1TenantUIDAuthTokenSettingsUpdateParamsWithContext creates a new V1TenantUIDAuthTokenSettingsUpdateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1TenantUIDAuthTokenSettingsUpdateParamsWithContext(ctx context.Context) *V1TenantUIDAuthTokenSettingsUpdateParams { + var () + return &V1TenantUIDAuthTokenSettingsUpdateParams{ + + Context: ctx, + } +} + +// NewV1TenantUIDAuthTokenSettingsUpdateParamsWithHTTPClient creates a new V1TenantUIDAuthTokenSettingsUpdateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1TenantUIDAuthTokenSettingsUpdateParamsWithHTTPClient(client *http.Client) *V1TenantUIDAuthTokenSettingsUpdateParams { + var () + return &V1TenantUIDAuthTokenSettingsUpdateParams{ + HTTPClient: client, + } +} + +/* +V1TenantUIDAuthTokenSettingsUpdateParams contains all the parameters to send to the API endpoint +for the v1 tenant Uid auth token settings update operation typically these are written to a http.Request +*/ +type V1TenantUIDAuthTokenSettingsUpdateParams struct { + + /*Body*/ + Body *models.V1AuthTokenSettings + /*TenantUID*/ + TenantUID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 tenant Uid auth token settings update params +func (o *V1TenantUIDAuthTokenSettingsUpdateParams) WithTimeout(timeout time.Duration) *V1TenantUIDAuthTokenSettingsUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 tenant Uid auth token settings update params +func (o *V1TenantUIDAuthTokenSettingsUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 tenant Uid auth token settings update params +func (o *V1TenantUIDAuthTokenSettingsUpdateParams) WithContext(ctx context.Context) *V1TenantUIDAuthTokenSettingsUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 tenant Uid auth token settings update params +func (o *V1TenantUIDAuthTokenSettingsUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 tenant Uid auth token settings update params +func (o *V1TenantUIDAuthTokenSettingsUpdateParams) WithHTTPClient(client *http.Client) *V1TenantUIDAuthTokenSettingsUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 tenant Uid auth token settings update params +func (o *V1TenantUIDAuthTokenSettingsUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 tenant Uid auth token settings update params +func (o *V1TenantUIDAuthTokenSettingsUpdateParams) WithBody(body *models.V1AuthTokenSettings) *V1TenantUIDAuthTokenSettingsUpdateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 tenant Uid auth token settings update params +func (o *V1TenantUIDAuthTokenSettingsUpdateParams) SetBody(body *models.V1AuthTokenSettings) { + o.Body = body +} + +// WithTenantUID adds the tenantUID to the v1 tenant Uid auth token settings update params +func (o *V1TenantUIDAuthTokenSettingsUpdateParams) WithTenantUID(tenantUID string) *V1TenantUIDAuthTokenSettingsUpdateParams { + o.SetTenantUID(tenantUID) + return o +} + +// SetTenantUID adds the tenantUid to the v1 tenant Uid auth token settings update params +func (o *V1TenantUIDAuthTokenSettingsUpdateParams) SetTenantUID(tenantUID string) { + o.TenantUID = tenantUID +} + +// WriteToRequest writes these params to a swagger request +func (o *V1TenantUIDAuthTokenSettingsUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param tenantUid + if err := r.SetPathParam("tenantUid", o.TenantUID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_tenant_uid_auth_token_settings_update_responses.go b/api/client/v1/v1_tenant_uid_auth_token_settings_update_responses.go new file mode 100644 index 00000000..92d11f3b --- /dev/null +++ b/api/client/v1/v1_tenant_uid_auth_token_settings_update_responses.go @@ -0,0 +1,61 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1TenantUIDAuthTokenSettingsUpdateReader is a Reader for the V1TenantUIDAuthTokenSettingsUpdate structure. +type V1TenantUIDAuthTokenSettingsUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1TenantUIDAuthTokenSettingsUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1TenantUIDAuthTokenSettingsUpdateNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1TenantUIDAuthTokenSettingsUpdateNoContent creates a V1TenantUIDAuthTokenSettingsUpdateNoContent with default headers values +func NewV1TenantUIDAuthTokenSettingsUpdateNoContent() *V1TenantUIDAuthTokenSettingsUpdateNoContent { + return &V1TenantUIDAuthTokenSettingsUpdateNoContent{} +} + +/* +V1TenantUIDAuthTokenSettingsUpdateNoContent handles this case with default header values. + +Ok response without content +*/ +type V1TenantUIDAuthTokenSettingsUpdateNoContent struct { + /*Audit uid for the request + */ + AuditUID string +} + +func (o *V1TenantUIDAuthTokenSettingsUpdateNoContent) Error() string { + return fmt.Sprintf("[PUT /v1/tenants/{tenantUid}/authTokenSettings][%d] v1TenantUidAuthTokenSettingsUpdateNoContent ", 204) +} + +func (o *V1TenantUIDAuthTokenSettingsUpdateNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header AuditUid + o.AuditUID = response.GetHeader("AuditUid") + + return nil +} diff --git a/api/client/v1/v1_tenant_uid_domains_get_parameters.go b/api/client/v1/v1_tenant_uid_domains_get_parameters.go new file mode 100644 index 00000000..3b8d718e --- /dev/null +++ b/api/client/v1/v1_tenant_uid_domains_get_parameters.go @@ -0,0 +1,133 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1TenantUIDDomainsGetParams creates a new V1TenantUIDDomainsGetParams object +// with the default values initialized. +func NewV1TenantUIDDomainsGetParams() *V1TenantUIDDomainsGetParams { + var () + return &V1TenantUIDDomainsGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1TenantUIDDomainsGetParamsWithTimeout creates a new V1TenantUIDDomainsGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1TenantUIDDomainsGetParamsWithTimeout(timeout time.Duration) *V1TenantUIDDomainsGetParams { + var () + return &V1TenantUIDDomainsGetParams{ + + timeout: timeout, + } +} + +// NewV1TenantUIDDomainsGetParamsWithContext creates a new V1TenantUIDDomainsGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1TenantUIDDomainsGetParamsWithContext(ctx context.Context) *V1TenantUIDDomainsGetParams { + var () + return &V1TenantUIDDomainsGetParams{ + + Context: ctx, + } +} + +// NewV1TenantUIDDomainsGetParamsWithHTTPClient creates a new V1TenantUIDDomainsGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1TenantUIDDomainsGetParamsWithHTTPClient(client *http.Client) *V1TenantUIDDomainsGetParams { + var () + return &V1TenantUIDDomainsGetParams{ + HTTPClient: client, + } +} + +/* +V1TenantUIDDomainsGetParams contains all the parameters to send to the API endpoint +for the v1 tenant Uid domains get operation typically these are written to a http.Request +*/ +type V1TenantUIDDomainsGetParams struct { + + /*TenantUID*/ + TenantUID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 tenant Uid domains get params +func (o *V1TenantUIDDomainsGetParams) WithTimeout(timeout time.Duration) *V1TenantUIDDomainsGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 tenant Uid domains get params +func (o *V1TenantUIDDomainsGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 tenant Uid domains get params +func (o *V1TenantUIDDomainsGetParams) WithContext(ctx context.Context) *V1TenantUIDDomainsGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 tenant Uid domains get params +func (o *V1TenantUIDDomainsGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 tenant Uid domains get params +func (o *V1TenantUIDDomainsGetParams) WithHTTPClient(client *http.Client) *V1TenantUIDDomainsGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 tenant Uid domains get params +func (o *V1TenantUIDDomainsGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithTenantUID adds the tenantUID to the v1 tenant Uid domains get params +func (o *V1TenantUIDDomainsGetParams) WithTenantUID(tenantUID string) *V1TenantUIDDomainsGetParams { + o.SetTenantUID(tenantUID) + return o +} + +// SetTenantUID adds the tenantUid to the v1 tenant Uid domains get params +func (o *V1TenantUIDDomainsGetParams) SetTenantUID(tenantUID string) { + o.TenantUID = tenantUID +} + +// WriteToRequest writes these params to a swagger request +func (o *V1TenantUIDDomainsGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param tenantUid + if err := r.SetPathParam("tenantUid", o.TenantUID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_tenant_uid_domains_get_responses.go b/api/client/v1/v1_tenant_uid_domains_get_responses.go new file mode 100644 index 00000000..33229eb6 --- /dev/null +++ b/api/client/v1/v1_tenant_uid_domains_get_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1TenantUIDDomainsGetReader is a Reader for the V1TenantUIDDomainsGet structure. +type V1TenantUIDDomainsGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1TenantUIDDomainsGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1TenantUIDDomainsGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1TenantUIDDomainsGetOK creates a V1TenantUIDDomainsGetOK with default headers values +func NewV1TenantUIDDomainsGetOK() *V1TenantUIDDomainsGetOK { + return &V1TenantUIDDomainsGetOK{} +} + +/* +V1TenantUIDDomainsGetOK handles this case with default header values. + +(empty) +*/ +type V1TenantUIDDomainsGetOK struct { + Payload *models.V1TenantDomains +} + +func (o *V1TenantUIDDomainsGetOK) Error() string { + return fmt.Sprintf("[GET /v1/tenants/{tenantUid}/domains][%d] v1TenantUidDomainsGetOK %+v", 200, o.Payload) +} + +func (o *V1TenantUIDDomainsGetOK) GetPayload() *models.V1TenantDomains { + return o.Payload +} + +func (o *V1TenantUIDDomainsGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1TenantDomains) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_tenant_uid_domains_update_parameters.go b/api/client/v1/v1_tenant_uid_domains_update_parameters.go new file mode 100644 index 00000000..ad7079b4 --- /dev/null +++ b/api/client/v1/v1_tenant_uid_domains_update_parameters.go @@ -0,0 +1,154 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1TenantUIDDomainsUpdateParams creates a new V1TenantUIDDomainsUpdateParams object +// with the default values initialized. +func NewV1TenantUIDDomainsUpdateParams() *V1TenantUIDDomainsUpdateParams { + var () + return &V1TenantUIDDomainsUpdateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1TenantUIDDomainsUpdateParamsWithTimeout creates a new V1TenantUIDDomainsUpdateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1TenantUIDDomainsUpdateParamsWithTimeout(timeout time.Duration) *V1TenantUIDDomainsUpdateParams { + var () + return &V1TenantUIDDomainsUpdateParams{ + + timeout: timeout, + } +} + +// NewV1TenantUIDDomainsUpdateParamsWithContext creates a new V1TenantUIDDomainsUpdateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1TenantUIDDomainsUpdateParamsWithContext(ctx context.Context) *V1TenantUIDDomainsUpdateParams { + var () + return &V1TenantUIDDomainsUpdateParams{ + + Context: ctx, + } +} + +// NewV1TenantUIDDomainsUpdateParamsWithHTTPClient creates a new V1TenantUIDDomainsUpdateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1TenantUIDDomainsUpdateParamsWithHTTPClient(client *http.Client) *V1TenantUIDDomainsUpdateParams { + var () + return &V1TenantUIDDomainsUpdateParams{ + HTTPClient: client, + } +} + +/* +V1TenantUIDDomainsUpdateParams contains all the parameters to send to the API endpoint +for the v1 tenant Uid domains update operation typically these are written to a http.Request +*/ +type V1TenantUIDDomainsUpdateParams struct { + + /*Body*/ + Body *models.V1TenantDomains + /*TenantUID*/ + TenantUID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 tenant Uid domains update params +func (o *V1TenantUIDDomainsUpdateParams) WithTimeout(timeout time.Duration) *V1TenantUIDDomainsUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 tenant Uid domains update params +func (o *V1TenantUIDDomainsUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 tenant Uid domains update params +func (o *V1TenantUIDDomainsUpdateParams) WithContext(ctx context.Context) *V1TenantUIDDomainsUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 tenant Uid domains update params +func (o *V1TenantUIDDomainsUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 tenant Uid domains update params +func (o *V1TenantUIDDomainsUpdateParams) WithHTTPClient(client *http.Client) *V1TenantUIDDomainsUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 tenant Uid domains update params +func (o *V1TenantUIDDomainsUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 tenant Uid domains update params +func (o *V1TenantUIDDomainsUpdateParams) WithBody(body *models.V1TenantDomains) *V1TenantUIDDomainsUpdateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 tenant Uid domains update params +func (o *V1TenantUIDDomainsUpdateParams) SetBody(body *models.V1TenantDomains) { + o.Body = body +} + +// WithTenantUID adds the tenantUID to the v1 tenant Uid domains update params +func (o *V1TenantUIDDomainsUpdateParams) WithTenantUID(tenantUID string) *V1TenantUIDDomainsUpdateParams { + o.SetTenantUID(tenantUID) + return o +} + +// SetTenantUID adds the tenantUid to the v1 tenant Uid domains update params +func (o *V1TenantUIDDomainsUpdateParams) SetTenantUID(tenantUID string) { + o.TenantUID = tenantUID +} + +// WriteToRequest writes these params to a swagger request +func (o *V1TenantUIDDomainsUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param tenantUid + if err := r.SetPathParam("tenantUid", o.TenantUID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_tenant_uid_domains_update_responses.go b/api/client/v1/v1_tenant_uid_domains_update_responses.go new file mode 100644 index 00000000..9d119e66 --- /dev/null +++ b/api/client/v1/v1_tenant_uid_domains_update_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1TenantUIDDomainsUpdateReader is a Reader for the V1TenantUIDDomainsUpdate structure. +type V1TenantUIDDomainsUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1TenantUIDDomainsUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1TenantUIDDomainsUpdateNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1TenantUIDDomainsUpdateNoContent creates a V1TenantUIDDomainsUpdateNoContent with default headers values +func NewV1TenantUIDDomainsUpdateNoContent() *V1TenantUIDDomainsUpdateNoContent { + return &V1TenantUIDDomainsUpdateNoContent{} +} + +/* +V1TenantUIDDomainsUpdateNoContent handles this case with default header values. + +The resource was updated successfully +*/ +type V1TenantUIDDomainsUpdateNoContent struct { +} + +func (o *V1TenantUIDDomainsUpdateNoContent) Error() string { + return fmt.Sprintf("[POST /v1/tenants/{tenantUid}/domains][%d] v1TenantUidDomainsUpdateNoContent ", 204) +} + +func (o *V1TenantUIDDomainsUpdateNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_tenant_uid_login_banner_get_parameters.go b/api/client/v1/v1_tenant_uid_login_banner_get_parameters.go new file mode 100644 index 00000000..aacd5481 --- /dev/null +++ b/api/client/v1/v1_tenant_uid_login_banner_get_parameters.go @@ -0,0 +1,133 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1TenantUIDLoginBannerGetParams creates a new V1TenantUIDLoginBannerGetParams object +// with the default values initialized. +func NewV1TenantUIDLoginBannerGetParams() *V1TenantUIDLoginBannerGetParams { + var () + return &V1TenantUIDLoginBannerGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1TenantUIDLoginBannerGetParamsWithTimeout creates a new V1TenantUIDLoginBannerGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1TenantUIDLoginBannerGetParamsWithTimeout(timeout time.Duration) *V1TenantUIDLoginBannerGetParams { + var () + return &V1TenantUIDLoginBannerGetParams{ + + timeout: timeout, + } +} + +// NewV1TenantUIDLoginBannerGetParamsWithContext creates a new V1TenantUIDLoginBannerGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1TenantUIDLoginBannerGetParamsWithContext(ctx context.Context) *V1TenantUIDLoginBannerGetParams { + var () + return &V1TenantUIDLoginBannerGetParams{ + + Context: ctx, + } +} + +// NewV1TenantUIDLoginBannerGetParamsWithHTTPClient creates a new V1TenantUIDLoginBannerGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1TenantUIDLoginBannerGetParamsWithHTTPClient(client *http.Client) *V1TenantUIDLoginBannerGetParams { + var () + return &V1TenantUIDLoginBannerGetParams{ + HTTPClient: client, + } +} + +/* +V1TenantUIDLoginBannerGetParams contains all the parameters to send to the API endpoint +for the v1 tenant Uid login banner get operation typically these are written to a http.Request +*/ +type V1TenantUIDLoginBannerGetParams struct { + + /*TenantUID*/ + TenantUID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 tenant Uid login banner get params +func (o *V1TenantUIDLoginBannerGetParams) WithTimeout(timeout time.Duration) *V1TenantUIDLoginBannerGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 tenant Uid login banner get params +func (o *V1TenantUIDLoginBannerGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 tenant Uid login banner get params +func (o *V1TenantUIDLoginBannerGetParams) WithContext(ctx context.Context) *V1TenantUIDLoginBannerGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 tenant Uid login banner get params +func (o *V1TenantUIDLoginBannerGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 tenant Uid login banner get params +func (o *V1TenantUIDLoginBannerGetParams) WithHTTPClient(client *http.Client) *V1TenantUIDLoginBannerGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 tenant Uid login banner get params +func (o *V1TenantUIDLoginBannerGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithTenantUID adds the tenantUID to the v1 tenant Uid login banner get params +func (o *V1TenantUIDLoginBannerGetParams) WithTenantUID(tenantUID string) *V1TenantUIDLoginBannerGetParams { + o.SetTenantUID(tenantUID) + return o +} + +// SetTenantUID adds the tenantUid to the v1 tenant Uid login banner get params +func (o *V1TenantUIDLoginBannerGetParams) SetTenantUID(tenantUID string) { + o.TenantUID = tenantUID +} + +// WriteToRequest writes these params to a swagger request +func (o *V1TenantUIDLoginBannerGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param tenantUid + if err := r.SetPathParam("tenantUid", o.TenantUID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_tenant_uid_login_banner_get_responses.go b/api/client/v1/v1_tenant_uid_login_banner_get_responses.go new file mode 100644 index 00000000..290de975 --- /dev/null +++ b/api/client/v1/v1_tenant_uid_login_banner_get_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1TenantUIDLoginBannerGetReader is a Reader for the V1TenantUIDLoginBannerGet structure. +type V1TenantUIDLoginBannerGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1TenantUIDLoginBannerGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1TenantUIDLoginBannerGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1TenantUIDLoginBannerGetOK creates a V1TenantUIDLoginBannerGetOK with default headers values +func NewV1TenantUIDLoginBannerGetOK() *V1TenantUIDLoginBannerGetOK { + return &V1TenantUIDLoginBannerGetOK{} +} + +/* +V1TenantUIDLoginBannerGetOK handles this case with default header values. + +OK +*/ +type V1TenantUIDLoginBannerGetOK struct { + Payload *models.V1LoginBannerSettings +} + +func (o *V1TenantUIDLoginBannerGetOK) Error() string { + return fmt.Sprintf("[GET /v1/tenants/{tenantUid}/loginBanner][%d] v1TenantUidLoginBannerGetOK %+v", 200, o.Payload) +} + +func (o *V1TenantUIDLoginBannerGetOK) GetPayload() *models.V1LoginBannerSettings { + return o.Payload +} + +func (o *V1TenantUIDLoginBannerGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1LoginBannerSettings) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_tenant_uid_login_banner_update_parameters.go b/api/client/v1/v1_tenant_uid_login_banner_update_parameters.go new file mode 100644 index 00000000..6a986c8d --- /dev/null +++ b/api/client/v1/v1_tenant_uid_login_banner_update_parameters.go @@ -0,0 +1,154 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1TenantUIDLoginBannerUpdateParams creates a new V1TenantUIDLoginBannerUpdateParams object +// with the default values initialized. +func NewV1TenantUIDLoginBannerUpdateParams() *V1TenantUIDLoginBannerUpdateParams { + var () + return &V1TenantUIDLoginBannerUpdateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1TenantUIDLoginBannerUpdateParamsWithTimeout creates a new V1TenantUIDLoginBannerUpdateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1TenantUIDLoginBannerUpdateParamsWithTimeout(timeout time.Duration) *V1TenantUIDLoginBannerUpdateParams { + var () + return &V1TenantUIDLoginBannerUpdateParams{ + + timeout: timeout, + } +} + +// NewV1TenantUIDLoginBannerUpdateParamsWithContext creates a new V1TenantUIDLoginBannerUpdateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1TenantUIDLoginBannerUpdateParamsWithContext(ctx context.Context) *V1TenantUIDLoginBannerUpdateParams { + var () + return &V1TenantUIDLoginBannerUpdateParams{ + + Context: ctx, + } +} + +// NewV1TenantUIDLoginBannerUpdateParamsWithHTTPClient creates a new V1TenantUIDLoginBannerUpdateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1TenantUIDLoginBannerUpdateParamsWithHTTPClient(client *http.Client) *V1TenantUIDLoginBannerUpdateParams { + var () + return &V1TenantUIDLoginBannerUpdateParams{ + HTTPClient: client, + } +} + +/* +V1TenantUIDLoginBannerUpdateParams contains all the parameters to send to the API endpoint +for the v1 tenant Uid login banner update operation typically these are written to a http.Request +*/ +type V1TenantUIDLoginBannerUpdateParams struct { + + /*Body*/ + Body *models.V1LoginBannerSettings + /*TenantUID*/ + TenantUID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 tenant Uid login banner update params +func (o *V1TenantUIDLoginBannerUpdateParams) WithTimeout(timeout time.Duration) *V1TenantUIDLoginBannerUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 tenant Uid login banner update params +func (o *V1TenantUIDLoginBannerUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 tenant Uid login banner update params +func (o *V1TenantUIDLoginBannerUpdateParams) WithContext(ctx context.Context) *V1TenantUIDLoginBannerUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 tenant Uid login banner update params +func (o *V1TenantUIDLoginBannerUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 tenant Uid login banner update params +func (o *V1TenantUIDLoginBannerUpdateParams) WithHTTPClient(client *http.Client) *V1TenantUIDLoginBannerUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 tenant Uid login banner update params +func (o *V1TenantUIDLoginBannerUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 tenant Uid login banner update params +func (o *V1TenantUIDLoginBannerUpdateParams) WithBody(body *models.V1LoginBannerSettings) *V1TenantUIDLoginBannerUpdateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 tenant Uid login banner update params +func (o *V1TenantUIDLoginBannerUpdateParams) SetBody(body *models.V1LoginBannerSettings) { + o.Body = body +} + +// WithTenantUID adds the tenantUID to the v1 tenant Uid login banner update params +func (o *V1TenantUIDLoginBannerUpdateParams) WithTenantUID(tenantUID string) *V1TenantUIDLoginBannerUpdateParams { + o.SetTenantUID(tenantUID) + return o +} + +// SetTenantUID adds the tenantUid to the v1 tenant Uid login banner update params +func (o *V1TenantUIDLoginBannerUpdateParams) SetTenantUID(tenantUID string) { + o.TenantUID = tenantUID +} + +// WriteToRequest writes these params to a swagger request +func (o *V1TenantUIDLoginBannerUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param tenantUid + if err := r.SetPathParam("tenantUid", o.TenantUID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_tenant_uid_login_banner_update_responses.go b/api/client/v1/v1_tenant_uid_login_banner_update_responses.go new file mode 100644 index 00000000..a5681b1f --- /dev/null +++ b/api/client/v1/v1_tenant_uid_login_banner_update_responses.go @@ -0,0 +1,61 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1TenantUIDLoginBannerUpdateReader is a Reader for the V1TenantUIDLoginBannerUpdate structure. +type V1TenantUIDLoginBannerUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1TenantUIDLoginBannerUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1TenantUIDLoginBannerUpdateNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1TenantUIDLoginBannerUpdateNoContent creates a V1TenantUIDLoginBannerUpdateNoContent with default headers values +func NewV1TenantUIDLoginBannerUpdateNoContent() *V1TenantUIDLoginBannerUpdateNoContent { + return &V1TenantUIDLoginBannerUpdateNoContent{} +} + +/* +V1TenantUIDLoginBannerUpdateNoContent handles this case with default header values. + +Ok response without content +*/ +type V1TenantUIDLoginBannerUpdateNoContent struct { + /*Audit uid for the request + */ + AuditUID string +} + +func (o *V1TenantUIDLoginBannerUpdateNoContent) Error() string { + return fmt.Sprintf("[PUT /v1/tenants/{tenantUid}/loginBanner][%d] v1TenantUidLoginBannerUpdateNoContent ", 204) +} + +func (o *V1TenantUIDLoginBannerUpdateNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header AuditUid + o.AuditUID = response.GetHeader("AuditUid") + + return nil +} diff --git a/api/client/v1/v1_tenant_uid_oidc_config_get_parameters.go b/api/client/v1/v1_tenant_uid_oidc_config_get_parameters.go new file mode 100644 index 00000000..d1540b31 --- /dev/null +++ b/api/client/v1/v1_tenant_uid_oidc_config_get_parameters.go @@ -0,0 +1,133 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1TenantUIDOidcConfigGetParams creates a new V1TenantUIDOidcConfigGetParams object +// with the default values initialized. +func NewV1TenantUIDOidcConfigGetParams() *V1TenantUIDOidcConfigGetParams { + var () + return &V1TenantUIDOidcConfigGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1TenantUIDOidcConfigGetParamsWithTimeout creates a new V1TenantUIDOidcConfigGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1TenantUIDOidcConfigGetParamsWithTimeout(timeout time.Duration) *V1TenantUIDOidcConfigGetParams { + var () + return &V1TenantUIDOidcConfigGetParams{ + + timeout: timeout, + } +} + +// NewV1TenantUIDOidcConfigGetParamsWithContext creates a new V1TenantUIDOidcConfigGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1TenantUIDOidcConfigGetParamsWithContext(ctx context.Context) *V1TenantUIDOidcConfigGetParams { + var () + return &V1TenantUIDOidcConfigGetParams{ + + Context: ctx, + } +} + +// NewV1TenantUIDOidcConfigGetParamsWithHTTPClient creates a new V1TenantUIDOidcConfigGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1TenantUIDOidcConfigGetParamsWithHTTPClient(client *http.Client) *V1TenantUIDOidcConfigGetParams { + var () + return &V1TenantUIDOidcConfigGetParams{ + HTTPClient: client, + } +} + +/* +V1TenantUIDOidcConfigGetParams contains all the parameters to send to the API endpoint +for the v1 tenant Uid oidc config get operation typically these are written to a http.Request +*/ +type V1TenantUIDOidcConfigGetParams struct { + + /*TenantUID*/ + TenantUID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 tenant Uid oidc config get params +func (o *V1TenantUIDOidcConfigGetParams) WithTimeout(timeout time.Duration) *V1TenantUIDOidcConfigGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 tenant Uid oidc config get params +func (o *V1TenantUIDOidcConfigGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 tenant Uid oidc config get params +func (o *V1TenantUIDOidcConfigGetParams) WithContext(ctx context.Context) *V1TenantUIDOidcConfigGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 tenant Uid oidc config get params +func (o *V1TenantUIDOidcConfigGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 tenant Uid oidc config get params +func (o *V1TenantUIDOidcConfigGetParams) WithHTTPClient(client *http.Client) *V1TenantUIDOidcConfigGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 tenant Uid oidc config get params +func (o *V1TenantUIDOidcConfigGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithTenantUID adds the tenantUID to the v1 tenant Uid oidc config get params +func (o *V1TenantUIDOidcConfigGetParams) WithTenantUID(tenantUID string) *V1TenantUIDOidcConfigGetParams { + o.SetTenantUID(tenantUID) + return o +} + +// SetTenantUID adds the tenantUid to the v1 tenant Uid oidc config get params +func (o *V1TenantUIDOidcConfigGetParams) SetTenantUID(tenantUID string) { + o.TenantUID = tenantUID +} + +// WriteToRequest writes these params to a swagger request +func (o *V1TenantUIDOidcConfigGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param tenantUid + if err := r.SetPathParam("tenantUid", o.TenantUID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_tenant_uid_oidc_config_get_responses.go b/api/client/v1/v1_tenant_uid_oidc_config_get_responses.go new file mode 100644 index 00000000..254ed0ea --- /dev/null +++ b/api/client/v1/v1_tenant_uid_oidc_config_get_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1TenantUIDOidcConfigGetReader is a Reader for the V1TenantUIDOidcConfigGet structure. +type V1TenantUIDOidcConfigGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1TenantUIDOidcConfigGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1TenantUIDOidcConfigGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1TenantUIDOidcConfigGetOK creates a V1TenantUIDOidcConfigGetOK with default headers values +func NewV1TenantUIDOidcConfigGetOK() *V1TenantUIDOidcConfigGetOK { + return &V1TenantUIDOidcConfigGetOK{} +} + +/* +V1TenantUIDOidcConfigGetOK handles this case with default header values. + +OK +*/ +type V1TenantUIDOidcConfigGetOK struct { + Payload *models.V1TenantOidcClientSpec +} + +func (o *V1TenantUIDOidcConfigGetOK) Error() string { + return fmt.Sprintf("[GET /v1/tenants/{tenantUid}/oidc/config][%d] v1TenantUidOidcConfigGetOK %+v", 200, o.Payload) +} + +func (o *V1TenantUIDOidcConfigGetOK) GetPayload() *models.V1TenantOidcClientSpec { + return o.Payload +} + +func (o *V1TenantUIDOidcConfigGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1TenantOidcClientSpec) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_tenant_uid_oidc_config_update_parameters.go b/api/client/v1/v1_tenant_uid_oidc_config_update_parameters.go new file mode 100644 index 00000000..1f183905 --- /dev/null +++ b/api/client/v1/v1_tenant_uid_oidc_config_update_parameters.go @@ -0,0 +1,154 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1TenantUIDOidcConfigUpdateParams creates a new V1TenantUIDOidcConfigUpdateParams object +// with the default values initialized. +func NewV1TenantUIDOidcConfigUpdateParams() *V1TenantUIDOidcConfigUpdateParams { + var () + return &V1TenantUIDOidcConfigUpdateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1TenantUIDOidcConfigUpdateParamsWithTimeout creates a new V1TenantUIDOidcConfigUpdateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1TenantUIDOidcConfigUpdateParamsWithTimeout(timeout time.Duration) *V1TenantUIDOidcConfigUpdateParams { + var () + return &V1TenantUIDOidcConfigUpdateParams{ + + timeout: timeout, + } +} + +// NewV1TenantUIDOidcConfigUpdateParamsWithContext creates a new V1TenantUIDOidcConfigUpdateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1TenantUIDOidcConfigUpdateParamsWithContext(ctx context.Context) *V1TenantUIDOidcConfigUpdateParams { + var () + return &V1TenantUIDOidcConfigUpdateParams{ + + Context: ctx, + } +} + +// NewV1TenantUIDOidcConfigUpdateParamsWithHTTPClient creates a new V1TenantUIDOidcConfigUpdateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1TenantUIDOidcConfigUpdateParamsWithHTTPClient(client *http.Client) *V1TenantUIDOidcConfigUpdateParams { + var () + return &V1TenantUIDOidcConfigUpdateParams{ + HTTPClient: client, + } +} + +/* +V1TenantUIDOidcConfigUpdateParams contains all the parameters to send to the API endpoint +for the v1 tenant Uid oidc config update operation typically these are written to a http.Request +*/ +type V1TenantUIDOidcConfigUpdateParams struct { + + /*Body*/ + Body *models.V1TenantOidcClientSpec + /*TenantUID*/ + TenantUID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 tenant Uid oidc config update params +func (o *V1TenantUIDOidcConfigUpdateParams) WithTimeout(timeout time.Duration) *V1TenantUIDOidcConfigUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 tenant Uid oidc config update params +func (o *V1TenantUIDOidcConfigUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 tenant Uid oidc config update params +func (o *V1TenantUIDOidcConfigUpdateParams) WithContext(ctx context.Context) *V1TenantUIDOidcConfigUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 tenant Uid oidc config update params +func (o *V1TenantUIDOidcConfigUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 tenant Uid oidc config update params +func (o *V1TenantUIDOidcConfigUpdateParams) WithHTTPClient(client *http.Client) *V1TenantUIDOidcConfigUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 tenant Uid oidc config update params +func (o *V1TenantUIDOidcConfigUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 tenant Uid oidc config update params +func (o *V1TenantUIDOidcConfigUpdateParams) WithBody(body *models.V1TenantOidcClientSpec) *V1TenantUIDOidcConfigUpdateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 tenant Uid oidc config update params +func (o *V1TenantUIDOidcConfigUpdateParams) SetBody(body *models.V1TenantOidcClientSpec) { + o.Body = body +} + +// WithTenantUID adds the tenantUID to the v1 tenant Uid oidc config update params +func (o *V1TenantUIDOidcConfigUpdateParams) WithTenantUID(tenantUID string) *V1TenantUIDOidcConfigUpdateParams { + o.SetTenantUID(tenantUID) + return o +} + +// SetTenantUID adds the tenantUid to the v1 tenant Uid oidc config update params +func (o *V1TenantUIDOidcConfigUpdateParams) SetTenantUID(tenantUID string) { + o.TenantUID = tenantUID +} + +// WriteToRequest writes these params to a swagger request +func (o *V1TenantUIDOidcConfigUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param tenantUid + if err := r.SetPathParam("tenantUid", o.TenantUID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_tenant_uid_oidc_config_update_responses.go b/api/client/v1/v1_tenant_uid_oidc_config_update_responses.go new file mode 100644 index 00000000..701c3d04 --- /dev/null +++ b/api/client/v1/v1_tenant_uid_oidc_config_update_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1TenantUIDOidcConfigUpdateReader is a Reader for the V1TenantUIDOidcConfigUpdate structure. +type V1TenantUIDOidcConfigUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1TenantUIDOidcConfigUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1TenantUIDOidcConfigUpdateNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1TenantUIDOidcConfigUpdateNoContent creates a V1TenantUIDOidcConfigUpdateNoContent with default headers values +func NewV1TenantUIDOidcConfigUpdateNoContent() *V1TenantUIDOidcConfigUpdateNoContent { + return &V1TenantUIDOidcConfigUpdateNoContent{} +} + +/* +V1TenantUIDOidcConfigUpdateNoContent handles this case with default header values. + +The resource was updated successfully +*/ +type V1TenantUIDOidcConfigUpdateNoContent struct { +} + +func (o *V1TenantUIDOidcConfigUpdateNoContent) Error() string { + return fmt.Sprintf("[POST /v1/tenants/{tenantUid}/oidc/config][%d] v1TenantUidOidcConfigUpdateNoContent ", 204) +} + +func (o *V1TenantUIDOidcConfigUpdateNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_tenant_uid_password_policy_update_parameters.go b/api/client/v1/v1_tenant_uid_password_policy_update_parameters.go new file mode 100644 index 00000000..082666b5 --- /dev/null +++ b/api/client/v1/v1_tenant_uid_password_policy_update_parameters.go @@ -0,0 +1,154 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1TenantUIDPasswordPolicyUpdateParams creates a new V1TenantUIDPasswordPolicyUpdateParams object +// with the default values initialized. +func NewV1TenantUIDPasswordPolicyUpdateParams() *V1TenantUIDPasswordPolicyUpdateParams { + var () + return &V1TenantUIDPasswordPolicyUpdateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1TenantUIDPasswordPolicyUpdateParamsWithTimeout creates a new V1TenantUIDPasswordPolicyUpdateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1TenantUIDPasswordPolicyUpdateParamsWithTimeout(timeout time.Duration) *V1TenantUIDPasswordPolicyUpdateParams { + var () + return &V1TenantUIDPasswordPolicyUpdateParams{ + + timeout: timeout, + } +} + +// NewV1TenantUIDPasswordPolicyUpdateParamsWithContext creates a new V1TenantUIDPasswordPolicyUpdateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1TenantUIDPasswordPolicyUpdateParamsWithContext(ctx context.Context) *V1TenantUIDPasswordPolicyUpdateParams { + var () + return &V1TenantUIDPasswordPolicyUpdateParams{ + + Context: ctx, + } +} + +// NewV1TenantUIDPasswordPolicyUpdateParamsWithHTTPClient creates a new V1TenantUIDPasswordPolicyUpdateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1TenantUIDPasswordPolicyUpdateParamsWithHTTPClient(client *http.Client) *V1TenantUIDPasswordPolicyUpdateParams { + var () + return &V1TenantUIDPasswordPolicyUpdateParams{ + HTTPClient: client, + } +} + +/* +V1TenantUIDPasswordPolicyUpdateParams contains all the parameters to send to the API endpoint +for the v1 tenant Uid password policy update operation typically these are written to a http.Request +*/ +type V1TenantUIDPasswordPolicyUpdateParams struct { + + /*Body*/ + Body *models.V1TenantPasswordPolicyEntity + /*TenantUID*/ + TenantUID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 tenant Uid password policy update params +func (o *V1TenantUIDPasswordPolicyUpdateParams) WithTimeout(timeout time.Duration) *V1TenantUIDPasswordPolicyUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 tenant Uid password policy update params +func (o *V1TenantUIDPasswordPolicyUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 tenant Uid password policy update params +func (o *V1TenantUIDPasswordPolicyUpdateParams) WithContext(ctx context.Context) *V1TenantUIDPasswordPolicyUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 tenant Uid password policy update params +func (o *V1TenantUIDPasswordPolicyUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 tenant Uid password policy update params +func (o *V1TenantUIDPasswordPolicyUpdateParams) WithHTTPClient(client *http.Client) *V1TenantUIDPasswordPolicyUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 tenant Uid password policy update params +func (o *V1TenantUIDPasswordPolicyUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 tenant Uid password policy update params +func (o *V1TenantUIDPasswordPolicyUpdateParams) WithBody(body *models.V1TenantPasswordPolicyEntity) *V1TenantUIDPasswordPolicyUpdateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 tenant Uid password policy update params +func (o *V1TenantUIDPasswordPolicyUpdateParams) SetBody(body *models.V1TenantPasswordPolicyEntity) { + o.Body = body +} + +// WithTenantUID adds the tenantUID to the v1 tenant Uid password policy update params +func (o *V1TenantUIDPasswordPolicyUpdateParams) WithTenantUID(tenantUID string) *V1TenantUIDPasswordPolicyUpdateParams { + o.SetTenantUID(tenantUID) + return o +} + +// SetTenantUID adds the tenantUid to the v1 tenant Uid password policy update params +func (o *V1TenantUIDPasswordPolicyUpdateParams) SetTenantUID(tenantUID string) { + o.TenantUID = tenantUID +} + +// WriteToRequest writes these params to a swagger request +func (o *V1TenantUIDPasswordPolicyUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param tenantUid + if err := r.SetPathParam("tenantUid", o.TenantUID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_tenant_uid_password_policy_update_responses.go b/api/client/v1/v1_tenant_uid_password_policy_update_responses.go new file mode 100644 index 00000000..aa0e932f --- /dev/null +++ b/api/client/v1/v1_tenant_uid_password_policy_update_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1TenantUIDPasswordPolicyUpdateReader is a Reader for the V1TenantUIDPasswordPolicyUpdate structure. +type V1TenantUIDPasswordPolicyUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1TenantUIDPasswordPolicyUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1TenantUIDPasswordPolicyUpdateNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1TenantUIDPasswordPolicyUpdateNoContent creates a V1TenantUIDPasswordPolicyUpdateNoContent with default headers values +func NewV1TenantUIDPasswordPolicyUpdateNoContent() *V1TenantUIDPasswordPolicyUpdateNoContent { + return &V1TenantUIDPasswordPolicyUpdateNoContent{} +} + +/* +V1TenantUIDPasswordPolicyUpdateNoContent handles this case with default header values. + +The resource was updated successfully +*/ +type V1TenantUIDPasswordPolicyUpdateNoContent struct { +} + +func (o *V1TenantUIDPasswordPolicyUpdateNoContent) Error() string { + return fmt.Sprintf("[POST /v1/tenants/{tenantUid}/password/policy][%d] v1TenantUidPasswordPolicyUpdateNoContent ", 204) +} + +func (o *V1TenantUIDPasswordPolicyUpdateNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_tenant_uid_saml_config_spec_get_parameters.go b/api/client/v1/v1_tenant_uid_saml_config_spec_get_parameters.go new file mode 100644 index 00000000..3c98ead4 --- /dev/null +++ b/api/client/v1/v1_tenant_uid_saml_config_spec_get_parameters.go @@ -0,0 +1,133 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1TenantUIDSamlConfigSpecGetParams creates a new V1TenantUIDSamlConfigSpecGetParams object +// with the default values initialized. +func NewV1TenantUIDSamlConfigSpecGetParams() *V1TenantUIDSamlConfigSpecGetParams { + var () + return &V1TenantUIDSamlConfigSpecGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1TenantUIDSamlConfigSpecGetParamsWithTimeout creates a new V1TenantUIDSamlConfigSpecGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1TenantUIDSamlConfigSpecGetParamsWithTimeout(timeout time.Duration) *V1TenantUIDSamlConfigSpecGetParams { + var () + return &V1TenantUIDSamlConfigSpecGetParams{ + + timeout: timeout, + } +} + +// NewV1TenantUIDSamlConfigSpecGetParamsWithContext creates a new V1TenantUIDSamlConfigSpecGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1TenantUIDSamlConfigSpecGetParamsWithContext(ctx context.Context) *V1TenantUIDSamlConfigSpecGetParams { + var () + return &V1TenantUIDSamlConfigSpecGetParams{ + + Context: ctx, + } +} + +// NewV1TenantUIDSamlConfigSpecGetParamsWithHTTPClient creates a new V1TenantUIDSamlConfigSpecGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1TenantUIDSamlConfigSpecGetParamsWithHTTPClient(client *http.Client) *V1TenantUIDSamlConfigSpecGetParams { + var () + return &V1TenantUIDSamlConfigSpecGetParams{ + HTTPClient: client, + } +} + +/* +V1TenantUIDSamlConfigSpecGetParams contains all the parameters to send to the API endpoint +for the v1 tenant Uid saml config spec get operation typically these are written to a http.Request +*/ +type V1TenantUIDSamlConfigSpecGetParams struct { + + /*TenantUID*/ + TenantUID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 tenant Uid saml config spec get params +func (o *V1TenantUIDSamlConfigSpecGetParams) WithTimeout(timeout time.Duration) *V1TenantUIDSamlConfigSpecGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 tenant Uid saml config spec get params +func (o *V1TenantUIDSamlConfigSpecGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 tenant Uid saml config spec get params +func (o *V1TenantUIDSamlConfigSpecGetParams) WithContext(ctx context.Context) *V1TenantUIDSamlConfigSpecGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 tenant Uid saml config spec get params +func (o *V1TenantUIDSamlConfigSpecGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 tenant Uid saml config spec get params +func (o *V1TenantUIDSamlConfigSpecGetParams) WithHTTPClient(client *http.Client) *V1TenantUIDSamlConfigSpecGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 tenant Uid saml config spec get params +func (o *V1TenantUIDSamlConfigSpecGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithTenantUID adds the tenantUID to the v1 tenant Uid saml config spec get params +func (o *V1TenantUIDSamlConfigSpecGetParams) WithTenantUID(tenantUID string) *V1TenantUIDSamlConfigSpecGetParams { + o.SetTenantUID(tenantUID) + return o +} + +// SetTenantUID adds the tenantUid to the v1 tenant Uid saml config spec get params +func (o *V1TenantUIDSamlConfigSpecGetParams) SetTenantUID(tenantUID string) { + o.TenantUID = tenantUID +} + +// WriteToRequest writes these params to a swagger request +func (o *V1TenantUIDSamlConfigSpecGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param tenantUid + if err := r.SetPathParam("tenantUid", o.TenantUID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_tenant_uid_saml_config_spec_get_responses.go b/api/client/v1/v1_tenant_uid_saml_config_spec_get_responses.go new file mode 100644 index 00000000..c14bd728 --- /dev/null +++ b/api/client/v1/v1_tenant_uid_saml_config_spec_get_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1TenantUIDSamlConfigSpecGetReader is a Reader for the V1TenantUIDSamlConfigSpecGet structure. +type V1TenantUIDSamlConfigSpecGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1TenantUIDSamlConfigSpecGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1TenantUIDSamlConfigSpecGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1TenantUIDSamlConfigSpecGetOK creates a V1TenantUIDSamlConfigSpecGetOK with default headers values +func NewV1TenantUIDSamlConfigSpecGetOK() *V1TenantUIDSamlConfigSpecGetOK { + return &V1TenantUIDSamlConfigSpecGetOK{} +} + +/* +V1TenantUIDSamlConfigSpecGetOK handles this case with default header values. + +OK +*/ +type V1TenantUIDSamlConfigSpecGetOK struct { + Payload *models.V1TenantSamlSpec +} + +func (o *V1TenantUIDSamlConfigSpecGetOK) Error() string { + return fmt.Sprintf("[GET /v1/tenants/{tenantUid}/saml/config][%d] v1TenantUidSamlConfigSpecGetOK %+v", 200, o.Payload) +} + +func (o *V1TenantUIDSamlConfigSpecGetOK) GetPayload() *models.V1TenantSamlSpec { + return o.Payload +} + +func (o *V1TenantUIDSamlConfigSpecGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1TenantSamlSpec) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_tenant_uid_saml_config_update_parameters.go b/api/client/v1/v1_tenant_uid_saml_config_update_parameters.go new file mode 100644 index 00000000..861adf62 --- /dev/null +++ b/api/client/v1/v1_tenant_uid_saml_config_update_parameters.go @@ -0,0 +1,154 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1TenantUIDSamlConfigUpdateParams creates a new V1TenantUIDSamlConfigUpdateParams object +// with the default values initialized. +func NewV1TenantUIDSamlConfigUpdateParams() *V1TenantUIDSamlConfigUpdateParams { + var () + return &V1TenantUIDSamlConfigUpdateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1TenantUIDSamlConfigUpdateParamsWithTimeout creates a new V1TenantUIDSamlConfigUpdateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1TenantUIDSamlConfigUpdateParamsWithTimeout(timeout time.Duration) *V1TenantUIDSamlConfigUpdateParams { + var () + return &V1TenantUIDSamlConfigUpdateParams{ + + timeout: timeout, + } +} + +// NewV1TenantUIDSamlConfigUpdateParamsWithContext creates a new V1TenantUIDSamlConfigUpdateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1TenantUIDSamlConfigUpdateParamsWithContext(ctx context.Context) *V1TenantUIDSamlConfigUpdateParams { + var () + return &V1TenantUIDSamlConfigUpdateParams{ + + Context: ctx, + } +} + +// NewV1TenantUIDSamlConfigUpdateParamsWithHTTPClient creates a new V1TenantUIDSamlConfigUpdateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1TenantUIDSamlConfigUpdateParamsWithHTTPClient(client *http.Client) *V1TenantUIDSamlConfigUpdateParams { + var () + return &V1TenantUIDSamlConfigUpdateParams{ + HTTPClient: client, + } +} + +/* +V1TenantUIDSamlConfigUpdateParams contains all the parameters to send to the API endpoint +for the v1 tenant Uid saml config update operation typically these are written to a http.Request +*/ +type V1TenantUIDSamlConfigUpdateParams struct { + + /*Body*/ + Body *models.V1TenantSamlRequestSpec + /*TenantUID*/ + TenantUID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 tenant Uid saml config update params +func (o *V1TenantUIDSamlConfigUpdateParams) WithTimeout(timeout time.Duration) *V1TenantUIDSamlConfigUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 tenant Uid saml config update params +func (o *V1TenantUIDSamlConfigUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 tenant Uid saml config update params +func (o *V1TenantUIDSamlConfigUpdateParams) WithContext(ctx context.Context) *V1TenantUIDSamlConfigUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 tenant Uid saml config update params +func (o *V1TenantUIDSamlConfigUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 tenant Uid saml config update params +func (o *V1TenantUIDSamlConfigUpdateParams) WithHTTPClient(client *http.Client) *V1TenantUIDSamlConfigUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 tenant Uid saml config update params +func (o *V1TenantUIDSamlConfigUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 tenant Uid saml config update params +func (o *V1TenantUIDSamlConfigUpdateParams) WithBody(body *models.V1TenantSamlRequestSpec) *V1TenantUIDSamlConfigUpdateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 tenant Uid saml config update params +func (o *V1TenantUIDSamlConfigUpdateParams) SetBody(body *models.V1TenantSamlRequestSpec) { + o.Body = body +} + +// WithTenantUID adds the tenantUID to the v1 tenant Uid saml config update params +func (o *V1TenantUIDSamlConfigUpdateParams) WithTenantUID(tenantUID string) *V1TenantUIDSamlConfigUpdateParams { + o.SetTenantUID(tenantUID) + return o +} + +// SetTenantUID adds the tenantUid to the v1 tenant Uid saml config update params +func (o *V1TenantUIDSamlConfigUpdateParams) SetTenantUID(tenantUID string) { + o.TenantUID = tenantUID +} + +// WriteToRequest writes these params to a swagger request +func (o *V1TenantUIDSamlConfigUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param tenantUid + if err := r.SetPathParam("tenantUid", o.TenantUID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_tenant_uid_saml_config_update_responses.go b/api/client/v1/v1_tenant_uid_saml_config_update_responses.go new file mode 100644 index 00000000..c9799d19 --- /dev/null +++ b/api/client/v1/v1_tenant_uid_saml_config_update_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1TenantUIDSamlConfigUpdateReader is a Reader for the V1TenantUIDSamlConfigUpdate structure. +type V1TenantUIDSamlConfigUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1TenantUIDSamlConfigUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1TenantUIDSamlConfigUpdateNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1TenantUIDSamlConfigUpdateNoContent creates a V1TenantUIDSamlConfigUpdateNoContent with default headers values +func NewV1TenantUIDSamlConfigUpdateNoContent() *V1TenantUIDSamlConfigUpdateNoContent { + return &V1TenantUIDSamlConfigUpdateNoContent{} +} + +/* +V1TenantUIDSamlConfigUpdateNoContent handles this case with default header values. + +The resource was updated successfully +*/ +type V1TenantUIDSamlConfigUpdateNoContent struct { +} + +func (o *V1TenantUIDSamlConfigUpdateNoContent) Error() string { + return fmt.Sprintf("[POST /v1/tenants/{tenantUid}/saml/config][%d] v1TenantUidSamlConfigUpdateNoContent ", 204) +} + +func (o *V1TenantUIDSamlConfigUpdateNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_tenant_uid_sso_auth_providers_get_parameters.go b/api/client/v1/v1_tenant_uid_sso_auth_providers_get_parameters.go new file mode 100644 index 00000000..1707a7e1 --- /dev/null +++ b/api/client/v1/v1_tenant_uid_sso_auth_providers_get_parameters.go @@ -0,0 +1,133 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1TenantUIDSsoAuthProvidersGetParams creates a new V1TenantUIDSsoAuthProvidersGetParams object +// with the default values initialized. +func NewV1TenantUIDSsoAuthProvidersGetParams() *V1TenantUIDSsoAuthProvidersGetParams { + var () + return &V1TenantUIDSsoAuthProvidersGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1TenantUIDSsoAuthProvidersGetParamsWithTimeout creates a new V1TenantUIDSsoAuthProvidersGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1TenantUIDSsoAuthProvidersGetParamsWithTimeout(timeout time.Duration) *V1TenantUIDSsoAuthProvidersGetParams { + var () + return &V1TenantUIDSsoAuthProvidersGetParams{ + + timeout: timeout, + } +} + +// NewV1TenantUIDSsoAuthProvidersGetParamsWithContext creates a new V1TenantUIDSsoAuthProvidersGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1TenantUIDSsoAuthProvidersGetParamsWithContext(ctx context.Context) *V1TenantUIDSsoAuthProvidersGetParams { + var () + return &V1TenantUIDSsoAuthProvidersGetParams{ + + Context: ctx, + } +} + +// NewV1TenantUIDSsoAuthProvidersGetParamsWithHTTPClient creates a new V1TenantUIDSsoAuthProvidersGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1TenantUIDSsoAuthProvidersGetParamsWithHTTPClient(client *http.Client) *V1TenantUIDSsoAuthProvidersGetParams { + var () + return &V1TenantUIDSsoAuthProvidersGetParams{ + HTTPClient: client, + } +} + +/* +V1TenantUIDSsoAuthProvidersGetParams contains all the parameters to send to the API endpoint +for the v1 tenant Uid sso auth providers get operation typically these are written to a http.Request +*/ +type V1TenantUIDSsoAuthProvidersGetParams struct { + + /*TenantUID*/ + TenantUID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 tenant Uid sso auth providers get params +func (o *V1TenantUIDSsoAuthProvidersGetParams) WithTimeout(timeout time.Duration) *V1TenantUIDSsoAuthProvidersGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 tenant Uid sso auth providers get params +func (o *V1TenantUIDSsoAuthProvidersGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 tenant Uid sso auth providers get params +func (o *V1TenantUIDSsoAuthProvidersGetParams) WithContext(ctx context.Context) *V1TenantUIDSsoAuthProvidersGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 tenant Uid sso auth providers get params +func (o *V1TenantUIDSsoAuthProvidersGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 tenant Uid sso auth providers get params +func (o *V1TenantUIDSsoAuthProvidersGetParams) WithHTTPClient(client *http.Client) *V1TenantUIDSsoAuthProvidersGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 tenant Uid sso auth providers get params +func (o *V1TenantUIDSsoAuthProvidersGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithTenantUID adds the tenantUID to the v1 tenant Uid sso auth providers get params +func (o *V1TenantUIDSsoAuthProvidersGetParams) WithTenantUID(tenantUID string) *V1TenantUIDSsoAuthProvidersGetParams { + o.SetTenantUID(tenantUID) + return o +} + +// SetTenantUID adds the tenantUid to the v1 tenant Uid sso auth providers get params +func (o *V1TenantUIDSsoAuthProvidersGetParams) SetTenantUID(tenantUID string) { + o.TenantUID = tenantUID +} + +// WriteToRequest writes these params to a swagger request +func (o *V1TenantUIDSsoAuthProvidersGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param tenantUid + if err := r.SetPathParam("tenantUid", o.TenantUID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_tenant_uid_sso_auth_providers_get_responses.go b/api/client/v1/v1_tenant_uid_sso_auth_providers_get_responses.go new file mode 100644 index 00000000..7ecf2eb7 --- /dev/null +++ b/api/client/v1/v1_tenant_uid_sso_auth_providers_get_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1TenantUIDSsoAuthProvidersGetReader is a Reader for the V1TenantUIDSsoAuthProvidersGet structure. +type V1TenantUIDSsoAuthProvidersGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1TenantUIDSsoAuthProvidersGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1TenantUIDSsoAuthProvidersGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1TenantUIDSsoAuthProvidersGetOK creates a V1TenantUIDSsoAuthProvidersGetOK with default headers values +func NewV1TenantUIDSsoAuthProvidersGetOK() *V1TenantUIDSsoAuthProvidersGetOK { + return &V1TenantUIDSsoAuthProvidersGetOK{} +} + +/* +V1TenantUIDSsoAuthProvidersGetOK handles this case with default header values. + +OK +*/ +type V1TenantUIDSsoAuthProvidersGetOK struct { + Payload *models.V1TenantSsoAuthProvidersEntity +} + +func (o *V1TenantUIDSsoAuthProvidersGetOK) Error() string { + return fmt.Sprintf("[GET /v1/tenants/{tenantUid}/sso/auth/providers][%d] v1TenantUidSsoAuthProvidersGetOK %+v", 200, o.Payload) +} + +func (o *V1TenantUIDSsoAuthProvidersGetOK) GetPayload() *models.V1TenantSsoAuthProvidersEntity { + return o.Payload +} + +func (o *V1TenantUIDSsoAuthProvidersGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1TenantSsoAuthProvidersEntity) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_tenant_uid_sso_auth_providers_update_parameters.go b/api/client/v1/v1_tenant_uid_sso_auth_providers_update_parameters.go new file mode 100644 index 00000000..68213623 --- /dev/null +++ b/api/client/v1/v1_tenant_uid_sso_auth_providers_update_parameters.go @@ -0,0 +1,154 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1TenantUIDSsoAuthProvidersUpdateParams creates a new V1TenantUIDSsoAuthProvidersUpdateParams object +// with the default values initialized. +func NewV1TenantUIDSsoAuthProvidersUpdateParams() *V1TenantUIDSsoAuthProvidersUpdateParams { + var () + return &V1TenantUIDSsoAuthProvidersUpdateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1TenantUIDSsoAuthProvidersUpdateParamsWithTimeout creates a new V1TenantUIDSsoAuthProvidersUpdateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1TenantUIDSsoAuthProvidersUpdateParamsWithTimeout(timeout time.Duration) *V1TenantUIDSsoAuthProvidersUpdateParams { + var () + return &V1TenantUIDSsoAuthProvidersUpdateParams{ + + timeout: timeout, + } +} + +// NewV1TenantUIDSsoAuthProvidersUpdateParamsWithContext creates a new V1TenantUIDSsoAuthProvidersUpdateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1TenantUIDSsoAuthProvidersUpdateParamsWithContext(ctx context.Context) *V1TenantUIDSsoAuthProvidersUpdateParams { + var () + return &V1TenantUIDSsoAuthProvidersUpdateParams{ + + Context: ctx, + } +} + +// NewV1TenantUIDSsoAuthProvidersUpdateParamsWithHTTPClient creates a new V1TenantUIDSsoAuthProvidersUpdateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1TenantUIDSsoAuthProvidersUpdateParamsWithHTTPClient(client *http.Client) *V1TenantUIDSsoAuthProvidersUpdateParams { + var () + return &V1TenantUIDSsoAuthProvidersUpdateParams{ + HTTPClient: client, + } +} + +/* +V1TenantUIDSsoAuthProvidersUpdateParams contains all the parameters to send to the API endpoint +for the v1 tenant Uid sso auth providers update operation typically these are written to a http.Request +*/ +type V1TenantUIDSsoAuthProvidersUpdateParams struct { + + /*Body*/ + Body *models.V1TenantSsoAuthProvidersEntity + /*TenantUID*/ + TenantUID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 tenant Uid sso auth providers update params +func (o *V1TenantUIDSsoAuthProvidersUpdateParams) WithTimeout(timeout time.Duration) *V1TenantUIDSsoAuthProvidersUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 tenant Uid sso auth providers update params +func (o *V1TenantUIDSsoAuthProvidersUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 tenant Uid sso auth providers update params +func (o *V1TenantUIDSsoAuthProvidersUpdateParams) WithContext(ctx context.Context) *V1TenantUIDSsoAuthProvidersUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 tenant Uid sso auth providers update params +func (o *V1TenantUIDSsoAuthProvidersUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 tenant Uid sso auth providers update params +func (o *V1TenantUIDSsoAuthProvidersUpdateParams) WithHTTPClient(client *http.Client) *V1TenantUIDSsoAuthProvidersUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 tenant Uid sso auth providers update params +func (o *V1TenantUIDSsoAuthProvidersUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 tenant Uid sso auth providers update params +func (o *V1TenantUIDSsoAuthProvidersUpdateParams) WithBody(body *models.V1TenantSsoAuthProvidersEntity) *V1TenantUIDSsoAuthProvidersUpdateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 tenant Uid sso auth providers update params +func (o *V1TenantUIDSsoAuthProvidersUpdateParams) SetBody(body *models.V1TenantSsoAuthProvidersEntity) { + o.Body = body +} + +// WithTenantUID adds the tenantUID to the v1 tenant Uid sso auth providers update params +func (o *V1TenantUIDSsoAuthProvidersUpdateParams) WithTenantUID(tenantUID string) *V1TenantUIDSsoAuthProvidersUpdateParams { + o.SetTenantUID(tenantUID) + return o +} + +// SetTenantUID adds the tenantUid to the v1 tenant Uid sso auth providers update params +func (o *V1TenantUIDSsoAuthProvidersUpdateParams) SetTenantUID(tenantUID string) { + o.TenantUID = tenantUID +} + +// WriteToRequest writes these params to a swagger request +func (o *V1TenantUIDSsoAuthProvidersUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param tenantUid + if err := r.SetPathParam("tenantUid", o.TenantUID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_tenant_uid_sso_auth_providers_update_responses.go b/api/client/v1/v1_tenant_uid_sso_auth_providers_update_responses.go new file mode 100644 index 00000000..9e5e193d --- /dev/null +++ b/api/client/v1/v1_tenant_uid_sso_auth_providers_update_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1TenantUIDSsoAuthProvidersUpdateReader is a Reader for the V1TenantUIDSsoAuthProvidersUpdate structure. +type V1TenantUIDSsoAuthProvidersUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1TenantUIDSsoAuthProvidersUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1TenantUIDSsoAuthProvidersUpdateNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1TenantUIDSsoAuthProvidersUpdateNoContent creates a V1TenantUIDSsoAuthProvidersUpdateNoContent with default headers values +func NewV1TenantUIDSsoAuthProvidersUpdateNoContent() *V1TenantUIDSsoAuthProvidersUpdateNoContent { + return &V1TenantUIDSsoAuthProvidersUpdateNoContent{} +} + +/* +V1TenantUIDSsoAuthProvidersUpdateNoContent handles this case with default header values. + +The resource was updated successfully +*/ +type V1TenantUIDSsoAuthProvidersUpdateNoContent struct { +} + +func (o *V1TenantUIDSsoAuthProvidersUpdateNoContent) Error() string { + return fmt.Sprintf("[POST /v1/tenants/{tenantUid}/sso/auth/providers][%d] v1TenantUidSsoAuthProvidersUpdateNoContent ", 204) +} + +func (o *V1TenantUIDSsoAuthProvidersUpdateNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_tenants_credit_account_delete_parameters.go b/api/client/v1/v1_tenants_credit_account_delete_parameters.go new file mode 100644 index 00000000..968c6dda --- /dev/null +++ b/api/client/v1/v1_tenants_credit_account_delete_parameters.go @@ -0,0 +1,175 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// NewV1TenantsCreditAccountDeleteParams creates a new V1TenantsCreditAccountDeleteParams object +// with the default values initialized. +func NewV1TenantsCreditAccountDeleteParams() *V1TenantsCreditAccountDeleteParams { + var ( + forceDeleteDefault = bool(false) + ) + return &V1TenantsCreditAccountDeleteParams{ + ForceDelete: &forceDeleteDefault, + + timeout: cr.DefaultTimeout, + } +} + +// NewV1TenantsCreditAccountDeleteParamsWithTimeout creates a new V1TenantsCreditAccountDeleteParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1TenantsCreditAccountDeleteParamsWithTimeout(timeout time.Duration) *V1TenantsCreditAccountDeleteParams { + var ( + forceDeleteDefault = bool(false) + ) + return &V1TenantsCreditAccountDeleteParams{ + ForceDelete: &forceDeleteDefault, + + timeout: timeout, + } +} + +// NewV1TenantsCreditAccountDeleteParamsWithContext creates a new V1TenantsCreditAccountDeleteParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1TenantsCreditAccountDeleteParamsWithContext(ctx context.Context) *V1TenantsCreditAccountDeleteParams { + var ( + forceDeleteDefault = bool(false) + ) + return &V1TenantsCreditAccountDeleteParams{ + ForceDelete: &forceDeleteDefault, + + Context: ctx, + } +} + +// NewV1TenantsCreditAccountDeleteParamsWithHTTPClient creates a new V1TenantsCreditAccountDeleteParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1TenantsCreditAccountDeleteParamsWithHTTPClient(client *http.Client) *V1TenantsCreditAccountDeleteParams { + var ( + forceDeleteDefault = bool(false) + ) + return &V1TenantsCreditAccountDeleteParams{ + ForceDelete: &forceDeleteDefault, + HTTPClient: client, + } +} + +/* +V1TenantsCreditAccountDeleteParams contains all the parameters to send to the API endpoint +for the v1 tenants credit account delete operation typically these are written to a http.Request +*/ +type V1TenantsCreditAccountDeleteParams struct { + + /*ForceDelete*/ + ForceDelete *bool + /*TenantUID*/ + TenantUID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 tenants credit account delete params +func (o *V1TenantsCreditAccountDeleteParams) WithTimeout(timeout time.Duration) *V1TenantsCreditAccountDeleteParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 tenants credit account delete params +func (o *V1TenantsCreditAccountDeleteParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 tenants credit account delete params +func (o *V1TenantsCreditAccountDeleteParams) WithContext(ctx context.Context) *V1TenantsCreditAccountDeleteParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 tenants credit account delete params +func (o *V1TenantsCreditAccountDeleteParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 tenants credit account delete params +func (o *V1TenantsCreditAccountDeleteParams) WithHTTPClient(client *http.Client) *V1TenantsCreditAccountDeleteParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 tenants credit account delete params +func (o *V1TenantsCreditAccountDeleteParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithForceDelete adds the forceDelete to the v1 tenants credit account delete params +func (o *V1TenantsCreditAccountDeleteParams) WithForceDelete(forceDelete *bool) *V1TenantsCreditAccountDeleteParams { + o.SetForceDelete(forceDelete) + return o +} + +// SetForceDelete adds the forceDelete to the v1 tenants credit account delete params +func (o *V1TenantsCreditAccountDeleteParams) SetForceDelete(forceDelete *bool) { + o.ForceDelete = forceDelete +} + +// WithTenantUID adds the tenantUID to the v1 tenants credit account delete params +func (o *V1TenantsCreditAccountDeleteParams) WithTenantUID(tenantUID string) *V1TenantsCreditAccountDeleteParams { + o.SetTenantUID(tenantUID) + return o +} + +// SetTenantUID adds the tenantUid to the v1 tenants credit account delete params +func (o *V1TenantsCreditAccountDeleteParams) SetTenantUID(tenantUID string) { + o.TenantUID = tenantUID +} + +// WriteToRequest writes these params to a swagger request +func (o *V1TenantsCreditAccountDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.ForceDelete != nil { + + // query param forceDelete + var qrForceDelete bool + if o.ForceDelete != nil { + qrForceDelete = *o.ForceDelete + } + qForceDelete := swag.FormatBool(qrForceDelete) + if qForceDelete != "" { + if err := r.SetQueryParam("forceDelete", qForceDelete); err != nil { + return err + } + } + + } + + // path param tenantUid + if err := r.SetPathParam("tenantUid", o.TenantUID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_tenants_credit_account_delete_responses.go b/api/client/v1/v1_tenants_credit_account_delete_responses.go new file mode 100644 index 00000000..de3a8aa1 --- /dev/null +++ b/api/client/v1/v1_tenants_credit_account_delete_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1TenantsCreditAccountDeleteReader is a Reader for the V1TenantsCreditAccountDelete structure. +type V1TenantsCreditAccountDeleteReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1TenantsCreditAccountDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1TenantsCreditAccountDeleteNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1TenantsCreditAccountDeleteNoContent creates a V1TenantsCreditAccountDeleteNoContent with default headers values +func NewV1TenantsCreditAccountDeleteNoContent() *V1TenantsCreditAccountDeleteNoContent { + return &V1TenantsCreditAccountDeleteNoContent{} +} + +/* +V1TenantsCreditAccountDeleteNoContent handles this case with default header values. + +The resource was deleted successfully +*/ +type V1TenantsCreditAccountDeleteNoContent struct { +} + +func (o *V1TenantsCreditAccountDeleteNoContent) Error() string { + return fmt.Sprintf("[DELETE /v1/tenants/{tenantUid}/creditAccount/aws][%d] v1TenantsCreditAccountDeleteNoContent ", 204) +} + +func (o *V1TenantsCreditAccountDeleteNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_tenants_credit_account_get_parameters.go b/api/client/v1/v1_tenants_credit_account_get_parameters.go new file mode 100644 index 00000000..d7490368 --- /dev/null +++ b/api/client/v1/v1_tenants_credit_account_get_parameters.go @@ -0,0 +1,133 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1TenantsCreditAccountGetParams creates a new V1TenantsCreditAccountGetParams object +// with the default values initialized. +func NewV1TenantsCreditAccountGetParams() *V1TenantsCreditAccountGetParams { + var () + return &V1TenantsCreditAccountGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1TenantsCreditAccountGetParamsWithTimeout creates a new V1TenantsCreditAccountGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1TenantsCreditAccountGetParamsWithTimeout(timeout time.Duration) *V1TenantsCreditAccountGetParams { + var () + return &V1TenantsCreditAccountGetParams{ + + timeout: timeout, + } +} + +// NewV1TenantsCreditAccountGetParamsWithContext creates a new V1TenantsCreditAccountGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1TenantsCreditAccountGetParamsWithContext(ctx context.Context) *V1TenantsCreditAccountGetParams { + var () + return &V1TenantsCreditAccountGetParams{ + + Context: ctx, + } +} + +// NewV1TenantsCreditAccountGetParamsWithHTTPClient creates a new V1TenantsCreditAccountGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1TenantsCreditAccountGetParamsWithHTTPClient(client *http.Client) *V1TenantsCreditAccountGetParams { + var () + return &V1TenantsCreditAccountGetParams{ + HTTPClient: client, + } +} + +/* +V1TenantsCreditAccountGetParams contains all the parameters to send to the API endpoint +for the v1 tenants credit account get operation typically these are written to a http.Request +*/ +type V1TenantsCreditAccountGetParams struct { + + /*TenantUID*/ + TenantUID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 tenants credit account get params +func (o *V1TenantsCreditAccountGetParams) WithTimeout(timeout time.Duration) *V1TenantsCreditAccountGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 tenants credit account get params +func (o *V1TenantsCreditAccountGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 tenants credit account get params +func (o *V1TenantsCreditAccountGetParams) WithContext(ctx context.Context) *V1TenantsCreditAccountGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 tenants credit account get params +func (o *V1TenantsCreditAccountGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 tenants credit account get params +func (o *V1TenantsCreditAccountGetParams) WithHTTPClient(client *http.Client) *V1TenantsCreditAccountGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 tenants credit account get params +func (o *V1TenantsCreditAccountGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithTenantUID adds the tenantUID to the v1 tenants credit account get params +func (o *V1TenantsCreditAccountGetParams) WithTenantUID(tenantUID string) *V1TenantsCreditAccountGetParams { + o.SetTenantUID(tenantUID) + return o +} + +// SetTenantUID adds the tenantUid to the v1 tenants credit account get params +func (o *V1TenantsCreditAccountGetParams) SetTenantUID(tenantUID string) { + o.TenantUID = tenantUID +} + +// WriteToRequest writes these params to a swagger request +func (o *V1TenantsCreditAccountGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param tenantUid + if err := r.SetPathParam("tenantUid", o.TenantUID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_tenants_credit_account_get_responses.go b/api/client/v1/v1_tenants_credit_account_get_responses.go new file mode 100644 index 00000000..c7c7c299 --- /dev/null +++ b/api/client/v1/v1_tenants_credit_account_get_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1TenantsCreditAccountGetReader is a Reader for the V1TenantsCreditAccountGet structure. +type V1TenantsCreditAccountGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1TenantsCreditAccountGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1TenantsCreditAccountGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1TenantsCreditAccountGetOK creates a V1TenantsCreditAccountGetOK with default headers values +func NewV1TenantsCreditAccountGetOK() *V1TenantsCreditAccountGetOK { + return &V1TenantsCreditAccountGetOK{} +} + +/* +V1TenantsCreditAccountGetOK handles this case with default header values. + +OK +*/ +type V1TenantsCreditAccountGetOK struct { + Payload *models.V1AwsCreditAccountEntity +} + +func (o *V1TenantsCreditAccountGetOK) Error() string { + return fmt.Sprintf("[GET /v1/tenants/{tenantUid}/creditAccount/aws][%d] v1TenantsCreditAccountGetOK %+v", 200, o.Payload) +} + +func (o *V1TenantsCreditAccountGetOK) GetPayload() *models.V1AwsCreditAccountEntity { + return o.Payload +} + +func (o *V1TenantsCreditAccountGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1AwsCreditAccountEntity) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_tenants_uid_contract_accept_parameters.go b/api/client/v1/v1_tenants_uid_contract_accept_parameters.go new file mode 100644 index 00000000..cff8af80 --- /dev/null +++ b/api/client/v1/v1_tenants_uid_contract_accept_parameters.go @@ -0,0 +1,133 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1TenantsUIDContractAcceptParams creates a new V1TenantsUIDContractAcceptParams object +// with the default values initialized. +func NewV1TenantsUIDContractAcceptParams() *V1TenantsUIDContractAcceptParams { + var () + return &V1TenantsUIDContractAcceptParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1TenantsUIDContractAcceptParamsWithTimeout creates a new V1TenantsUIDContractAcceptParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1TenantsUIDContractAcceptParamsWithTimeout(timeout time.Duration) *V1TenantsUIDContractAcceptParams { + var () + return &V1TenantsUIDContractAcceptParams{ + + timeout: timeout, + } +} + +// NewV1TenantsUIDContractAcceptParamsWithContext creates a new V1TenantsUIDContractAcceptParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1TenantsUIDContractAcceptParamsWithContext(ctx context.Context) *V1TenantsUIDContractAcceptParams { + var () + return &V1TenantsUIDContractAcceptParams{ + + Context: ctx, + } +} + +// NewV1TenantsUIDContractAcceptParamsWithHTTPClient creates a new V1TenantsUIDContractAcceptParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1TenantsUIDContractAcceptParamsWithHTTPClient(client *http.Client) *V1TenantsUIDContractAcceptParams { + var () + return &V1TenantsUIDContractAcceptParams{ + HTTPClient: client, + } +} + +/* +V1TenantsUIDContractAcceptParams contains all the parameters to send to the API endpoint +for the v1 tenants Uid contract accept operation typically these are written to a http.Request +*/ +type V1TenantsUIDContractAcceptParams struct { + + /*TenantUID*/ + TenantUID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 tenants Uid contract accept params +func (o *V1TenantsUIDContractAcceptParams) WithTimeout(timeout time.Duration) *V1TenantsUIDContractAcceptParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 tenants Uid contract accept params +func (o *V1TenantsUIDContractAcceptParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 tenants Uid contract accept params +func (o *V1TenantsUIDContractAcceptParams) WithContext(ctx context.Context) *V1TenantsUIDContractAcceptParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 tenants Uid contract accept params +func (o *V1TenantsUIDContractAcceptParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 tenants Uid contract accept params +func (o *V1TenantsUIDContractAcceptParams) WithHTTPClient(client *http.Client) *V1TenantsUIDContractAcceptParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 tenants Uid contract accept params +func (o *V1TenantsUIDContractAcceptParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithTenantUID adds the tenantUID to the v1 tenants Uid contract accept params +func (o *V1TenantsUIDContractAcceptParams) WithTenantUID(tenantUID string) *V1TenantsUIDContractAcceptParams { + o.SetTenantUID(tenantUID) + return o +} + +// SetTenantUID adds the tenantUid to the v1 tenants Uid contract accept params +func (o *V1TenantsUIDContractAcceptParams) SetTenantUID(tenantUID string) { + o.TenantUID = tenantUID +} + +// WriteToRequest writes these params to a swagger request +func (o *V1TenantsUIDContractAcceptParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param tenantUid + if err := r.SetPathParam("tenantUid", o.TenantUID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_tenants_uid_contract_accept_responses.go b/api/client/v1/v1_tenants_uid_contract_accept_responses.go new file mode 100644 index 00000000..58d67b87 --- /dev/null +++ b/api/client/v1/v1_tenants_uid_contract_accept_responses.go @@ -0,0 +1,61 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1TenantsUIDContractAcceptReader is a Reader for the V1TenantsUIDContractAccept structure. +type V1TenantsUIDContractAcceptReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1TenantsUIDContractAcceptReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1TenantsUIDContractAcceptNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1TenantsUIDContractAcceptNoContent creates a V1TenantsUIDContractAcceptNoContent with default headers values +func NewV1TenantsUIDContractAcceptNoContent() *V1TenantsUIDContractAcceptNoContent { + return &V1TenantsUIDContractAcceptNoContent{} +} + +/* +V1TenantsUIDContractAcceptNoContent handles this case with default header values. + +Ok response without content +*/ +type V1TenantsUIDContractAcceptNoContent struct { + /*Audit uid for the request + */ + AuditUID string +} + +func (o *V1TenantsUIDContractAcceptNoContent) Error() string { + return fmt.Sprintf("[PATCH /v1/tenants/{tenantUid}/contract/accept][%d] v1TenantsUidContractAcceptNoContent ", 204) +} + +func (o *V1TenantsUIDContractAcceptNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header AuditUid + o.AuditUID = response.GetHeader("AuditUid") + + return nil +} diff --git a/api/client/v1/v1_tenants_uid_macros_create_parameters.go b/api/client/v1/v1_tenants_uid_macros_create_parameters.go new file mode 100644 index 00000000..2b956f9c --- /dev/null +++ b/api/client/v1/v1_tenants_uid_macros_create_parameters.go @@ -0,0 +1,154 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1TenantsUIDMacrosCreateParams creates a new V1TenantsUIDMacrosCreateParams object +// with the default values initialized. +func NewV1TenantsUIDMacrosCreateParams() *V1TenantsUIDMacrosCreateParams { + var () + return &V1TenantsUIDMacrosCreateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1TenantsUIDMacrosCreateParamsWithTimeout creates a new V1TenantsUIDMacrosCreateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1TenantsUIDMacrosCreateParamsWithTimeout(timeout time.Duration) *V1TenantsUIDMacrosCreateParams { + var () + return &V1TenantsUIDMacrosCreateParams{ + + timeout: timeout, + } +} + +// NewV1TenantsUIDMacrosCreateParamsWithContext creates a new V1TenantsUIDMacrosCreateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1TenantsUIDMacrosCreateParamsWithContext(ctx context.Context) *V1TenantsUIDMacrosCreateParams { + var () + return &V1TenantsUIDMacrosCreateParams{ + + Context: ctx, + } +} + +// NewV1TenantsUIDMacrosCreateParamsWithHTTPClient creates a new V1TenantsUIDMacrosCreateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1TenantsUIDMacrosCreateParamsWithHTTPClient(client *http.Client) *V1TenantsUIDMacrosCreateParams { + var () + return &V1TenantsUIDMacrosCreateParams{ + HTTPClient: client, + } +} + +/* +V1TenantsUIDMacrosCreateParams contains all the parameters to send to the API endpoint +for the v1 tenants Uid macros create operation typically these are written to a http.Request +*/ +type V1TenantsUIDMacrosCreateParams struct { + + /*Body*/ + Body *models.V1Macros + /*TenantUID*/ + TenantUID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 tenants Uid macros create params +func (o *V1TenantsUIDMacrosCreateParams) WithTimeout(timeout time.Duration) *V1TenantsUIDMacrosCreateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 tenants Uid macros create params +func (o *V1TenantsUIDMacrosCreateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 tenants Uid macros create params +func (o *V1TenantsUIDMacrosCreateParams) WithContext(ctx context.Context) *V1TenantsUIDMacrosCreateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 tenants Uid macros create params +func (o *V1TenantsUIDMacrosCreateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 tenants Uid macros create params +func (o *V1TenantsUIDMacrosCreateParams) WithHTTPClient(client *http.Client) *V1TenantsUIDMacrosCreateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 tenants Uid macros create params +func (o *V1TenantsUIDMacrosCreateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 tenants Uid macros create params +func (o *V1TenantsUIDMacrosCreateParams) WithBody(body *models.V1Macros) *V1TenantsUIDMacrosCreateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 tenants Uid macros create params +func (o *V1TenantsUIDMacrosCreateParams) SetBody(body *models.V1Macros) { + o.Body = body +} + +// WithTenantUID adds the tenantUID to the v1 tenants Uid macros create params +func (o *V1TenantsUIDMacrosCreateParams) WithTenantUID(tenantUID string) *V1TenantsUIDMacrosCreateParams { + o.SetTenantUID(tenantUID) + return o +} + +// SetTenantUID adds the tenantUid to the v1 tenants Uid macros create params +func (o *V1TenantsUIDMacrosCreateParams) SetTenantUID(tenantUID string) { + o.TenantUID = tenantUID +} + +// WriteToRequest writes these params to a swagger request +func (o *V1TenantsUIDMacrosCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param tenantUid + if err := r.SetPathParam("tenantUid", o.TenantUID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_tenants_uid_macros_create_responses.go b/api/client/v1/v1_tenants_uid_macros_create_responses.go new file mode 100644 index 00000000..e0d9098b --- /dev/null +++ b/api/client/v1/v1_tenants_uid_macros_create_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1TenantsUIDMacrosCreateReader is a Reader for the V1TenantsUIDMacrosCreate structure. +type V1TenantsUIDMacrosCreateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1TenantsUIDMacrosCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1TenantsUIDMacrosCreateNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1TenantsUIDMacrosCreateNoContent creates a V1TenantsUIDMacrosCreateNoContent with default headers values +func NewV1TenantsUIDMacrosCreateNoContent() *V1TenantsUIDMacrosCreateNoContent { + return &V1TenantsUIDMacrosCreateNoContent{} +} + +/* +V1TenantsUIDMacrosCreateNoContent handles this case with default header values. + +The resource was updated successfully +*/ +type V1TenantsUIDMacrosCreateNoContent struct { +} + +func (o *V1TenantsUIDMacrosCreateNoContent) Error() string { + return fmt.Sprintf("[POST /v1/tenants/{tenantUid}/macros][%d] v1TenantsUidMacrosCreateNoContent ", 204) +} + +func (o *V1TenantsUIDMacrosCreateNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_tenants_uid_macros_delete_by_macro_name_parameters.go b/api/client/v1/v1_tenants_uid_macros_delete_by_macro_name_parameters.go new file mode 100644 index 00000000..68b0ac1b --- /dev/null +++ b/api/client/v1/v1_tenants_uid_macros_delete_by_macro_name_parameters.go @@ -0,0 +1,154 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1TenantsUIDMacrosDeleteByMacroNameParams creates a new V1TenantsUIDMacrosDeleteByMacroNameParams object +// with the default values initialized. +func NewV1TenantsUIDMacrosDeleteByMacroNameParams() *V1TenantsUIDMacrosDeleteByMacroNameParams { + var () + return &V1TenantsUIDMacrosDeleteByMacroNameParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1TenantsUIDMacrosDeleteByMacroNameParamsWithTimeout creates a new V1TenantsUIDMacrosDeleteByMacroNameParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1TenantsUIDMacrosDeleteByMacroNameParamsWithTimeout(timeout time.Duration) *V1TenantsUIDMacrosDeleteByMacroNameParams { + var () + return &V1TenantsUIDMacrosDeleteByMacroNameParams{ + + timeout: timeout, + } +} + +// NewV1TenantsUIDMacrosDeleteByMacroNameParamsWithContext creates a new V1TenantsUIDMacrosDeleteByMacroNameParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1TenantsUIDMacrosDeleteByMacroNameParamsWithContext(ctx context.Context) *V1TenantsUIDMacrosDeleteByMacroNameParams { + var () + return &V1TenantsUIDMacrosDeleteByMacroNameParams{ + + Context: ctx, + } +} + +// NewV1TenantsUIDMacrosDeleteByMacroNameParamsWithHTTPClient creates a new V1TenantsUIDMacrosDeleteByMacroNameParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1TenantsUIDMacrosDeleteByMacroNameParamsWithHTTPClient(client *http.Client) *V1TenantsUIDMacrosDeleteByMacroNameParams { + var () + return &V1TenantsUIDMacrosDeleteByMacroNameParams{ + HTTPClient: client, + } +} + +/* +V1TenantsUIDMacrosDeleteByMacroNameParams contains all the parameters to send to the API endpoint +for the v1 tenants Uid macros delete by macro name operation typically these are written to a http.Request +*/ +type V1TenantsUIDMacrosDeleteByMacroNameParams struct { + + /*Body*/ + Body *models.V1Macros + /*TenantUID*/ + TenantUID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 tenants Uid macros delete by macro name params +func (o *V1TenantsUIDMacrosDeleteByMacroNameParams) WithTimeout(timeout time.Duration) *V1TenantsUIDMacrosDeleteByMacroNameParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 tenants Uid macros delete by macro name params +func (o *V1TenantsUIDMacrosDeleteByMacroNameParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 tenants Uid macros delete by macro name params +func (o *V1TenantsUIDMacrosDeleteByMacroNameParams) WithContext(ctx context.Context) *V1TenantsUIDMacrosDeleteByMacroNameParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 tenants Uid macros delete by macro name params +func (o *V1TenantsUIDMacrosDeleteByMacroNameParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 tenants Uid macros delete by macro name params +func (o *V1TenantsUIDMacrosDeleteByMacroNameParams) WithHTTPClient(client *http.Client) *V1TenantsUIDMacrosDeleteByMacroNameParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 tenants Uid macros delete by macro name params +func (o *V1TenantsUIDMacrosDeleteByMacroNameParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 tenants Uid macros delete by macro name params +func (o *V1TenantsUIDMacrosDeleteByMacroNameParams) WithBody(body *models.V1Macros) *V1TenantsUIDMacrosDeleteByMacroNameParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 tenants Uid macros delete by macro name params +func (o *V1TenantsUIDMacrosDeleteByMacroNameParams) SetBody(body *models.V1Macros) { + o.Body = body +} + +// WithTenantUID adds the tenantUID to the v1 tenants Uid macros delete by macro name params +func (o *V1TenantsUIDMacrosDeleteByMacroNameParams) WithTenantUID(tenantUID string) *V1TenantsUIDMacrosDeleteByMacroNameParams { + o.SetTenantUID(tenantUID) + return o +} + +// SetTenantUID adds the tenantUid to the v1 tenants Uid macros delete by macro name params +func (o *V1TenantsUIDMacrosDeleteByMacroNameParams) SetTenantUID(tenantUID string) { + o.TenantUID = tenantUID +} + +// WriteToRequest writes these params to a swagger request +func (o *V1TenantsUIDMacrosDeleteByMacroNameParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param tenantUid + if err := r.SetPathParam("tenantUid", o.TenantUID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_tenants_uid_macros_delete_by_macro_name_responses.go b/api/client/v1/v1_tenants_uid_macros_delete_by_macro_name_responses.go new file mode 100644 index 00000000..fe1b342d --- /dev/null +++ b/api/client/v1/v1_tenants_uid_macros_delete_by_macro_name_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1TenantsUIDMacrosDeleteByMacroNameReader is a Reader for the V1TenantsUIDMacrosDeleteByMacroName structure. +type V1TenantsUIDMacrosDeleteByMacroNameReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1TenantsUIDMacrosDeleteByMacroNameReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1TenantsUIDMacrosDeleteByMacroNameNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1TenantsUIDMacrosDeleteByMacroNameNoContent creates a V1TenantsUIDMacrosDeleteByMacroNameNoContent with default headers values +func NewV1TenantsUIDMacrosDeleteByMacroNameNoContent() *V1TenantsUIDMacrosDeleteByMacroNameNoContent { + return &V1TenantsUIDMacrosDeleteByMacroNameNoContent{} +} + +/* +V1TenantsUIDMacrosDeleteByMacroNameNoContent handles this case with default header values. + +The resource was updated successfully +*/ +type V1TenantsUIDMacrosDeleteByMacroNameNoContent struct { +} + +func (o *V1TenantsUIDMacrosDeleteByMacroNameNoContent) Error() string { + return fmt.Sprintf("[DELETE /v1/tenants/{tenantUid}/macros][%d] v1TenantsUidMacrosDeleteByMacroNameNoContent ", 204) +} + +func (o *V1TenantsUIDMacrosDeleteByMacroNameNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_tenants_uid_macros_list_parameters.go b/api/client/v1/v1_tenants_uid_macros_list_parameters.go new file mode 100644 index 00000000..2dbebea1 --- /dev/null +++ b/api/client/v1/v1_tenants_uid_macros_list_parameters.go @@ -0,0 +1,133 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1TenantsUIDMacrosListParams creates a new V1TenantsUIDMacrosListParams object +// with the default values initialized. +func NewV1TenantsUIDMacrosListParams() *V1TenantsUIDMacrosListParams { + var () + return &V1TenantsUIDMacrosListParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1TenantsUIDMacrosListParamsWithTimeout creates a new V1TenantsUIDMacrosListParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1TenantsUIDMacrosListParamsWithTimeout(timeout time.Duration) *V1TenantsUIDMacrosListParams { + var () + return &V1TenantsUIDMacrosListParams{ + + timeout: timeout, + } +} + +// NewV1TenantsUIDMacrosListParamsWithContext creates a new V1TenantsUIDMacrosListParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1TenantsUIDMacrosListParamsWithContext(ctx context.Context) *V1TenantsUIDMacrosListParams { + var () + return &V1TenantsUIDMacrosListParams{ + + Context: ctx, + } +} + +// NewV1TenantsUIDMacrosListParamsWithHTTPClient creates a new V1TenantsUIDMacrosListParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1TenantsUIDMacrosListParamsWithHTTPClient(client *http.Client) *V1TenantsUIDMacrosListParams { + var () + return &V1TenantsUIDMacrosListParams{ + HTTPClient: client, + } +} + +/* +V1TenantsUIDMacrosListParams contains all the parameters to send to the API endpoint +for the v1 tenants Uid macros list operation typically these are written to a http.Request +*/ +type V1TenantsUIDMacrosListParams struct { + + /*TenantUID*/ + TenantUID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 tenants Uid macros list params +func (o *V1TenantsUIDMacrosListParams) WithTimeout(timeout time.Duration) *V1TenantsUIDMacrosListParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 tenants Uid macros list params +func (o *V1TenantsUIDMacrosListParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 tenants Uid macros list params +func (o *V1TenantsUIDMacrosListParams) WithContext(ctx context.Context) *V1TenantsUIDMacrosListParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 tenants Uid macros list params +func (o *V1TenantsUIDMacrosListParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 tenants Uid macros list params +func (o *V1TenantsUIDMacrosListParams) WithHTTPClient(client *http.Client) *V1TenantsUIDMacrosListParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 tenants Uid macros list params +func (o *V1TenantsUIDMacrosListParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithTenantUID adds the tenantUID to the v1 tenants Uid macros list params +func (o *V1TenantsUIDMacrosListParams) WithTenantUID(tenantUID string) *V1TenantsUIDMacrosListParams { + o.SetTenantUID(tenantUID) + return o +} + +// SetTenantUID adds the tenantUid to the v1 tenants Uid macros list params +func (o *V1TenantsUIDMacrosListParams) SetTenantUID(tenantUID string) { + o.TenantUID = tenantUID +} + +// WriteToRequest writes these params to a swagger request +func (o *V1TenantsUIDMacrosListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param tenantUid + if err := r.SetPathParam("tenantUid", o.TenantUID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_tenants_uid_macros_list_responses.go b/api/client/v1/v1_tenants_uid_macros_list_responses.go new file mode 100644 index 00000000..afc1ccbf --- /dev/null +++ b/api/client/v1/v1_tenants_uid_macros_list_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1TenantsUIDMacrosListReader is a Reader for the V1TenantsUIDMacrosList structure. +type V1TenantsUIDMacrosListReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1TenantsUIDMacrosListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1TenantsUIDMacrosListOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1TenantsUIDMacrosListOK creates a V1TenantsUIDMacrosListOK with default headers values +func NewV1TenantsUIDMacrosListOK() *V1TenantsUIDMacrosListOK { + return &V1TenantsUIDMacrosListOK{} +} + +/* +V1TenantsUIDMacrosListOK handles this case with default header values. + +OK +*/ +type V1TenantsUIDMacrosListOK struct { + Payload *models.V1Macros +} + +func (o *V1TenantsUIDMacrosListOK) Error() string { + return fmt.Sprintf("[GET /v1/tenants/{tenantUid}/macros][%d] v1TenantsUidMacrosListOK %+v", 200, o.Payload) +} + +func (o *V1TenantsUIDMacrosListOK) GetPayload() *models.V1Macros { + return o.Payload +} + +func (o *V1TenantsUIDMacrosListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1Macros) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_tenants_uid_macros_update_by_macro_name_parameters.go b/api/client/v1/v1_tenants_uid_macros_update_by_macro_name_parameters.go new file mode 100644 index 00000000..e4423e07 --- /dev/null +++ b/api/client/v1/v1_tenants_uid_macros_update_by_macro_name_parameters.go @@ -0,0 +1,154 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1TenantsUIDMacrosUpdateByMacroNameParams creates a new V1TenantsUIDMacrosUpdateByMacroNameParams object +// with the default values initialized. +func NewV1TenantsUIDMacrosUpdateByMacroNameParams() *V1TenantsUIDMacrosUpdateByMacroNameParams { + var () + return &V1TenantsUIDMacrosUpdateByMacroNameParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1TenantsUIDMacrosUpdateByMacroNameParamsWithTimeout creates a new V1TenantsUIDMacrosUpdateByMacroNameParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1TenantsUIDMacrosUpdateByMacroNameParamsWithTimeout(timeout time.Duration) *V1TenantsUIDMacrosUpdateByMacroNameParams { + var () + return &V1TenantsUIDMacrosUpdateByMacroNameParams{ + + timeout: timeout, + } +} + +// NewV1TenantsUIDMacrosUpdateByMacroNameParamsWithContext creates a new V1TenantsUIDMacrosUpdateByMacroNameParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1TenantsUIDMacrosUpdateByMacroNameParamsWithContext(ctx context.Context) *V1TenantsUIDMacrosUpdateByMacroNameParams { + var () + return &V1TenantsUIDMacrosUpdateByMacroNameParams{ + + Context: ctx, + } +} + +// NewV1TenantsUIDMacrosUpdateByMacroNameParamsWithHTTPClient creates a new V1TenantsUIDMacrosUpdateByMacroNameParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1TenantsUIDMacrosUpdateByMacroNameParamsWithHTTPClient(client *http.Client) *V1TenantsUIDMacrosUpdateByMacroNameParams { + var () + return &V1TenantsUIDMacrosUpdateByMacroNameParams{ + HTTPClient: client, + } +} + +/* +V1TenantsUIDMacrosUpdateByMacroNameParams contains all the parameters to send to the API endpoint +for the v1 tenants Uid macros update by macro name operation typically these are written to a http.Request +*/ +type V1TenantsUIDMacrosUpdateByMacroNameParams struct { + + /*Body*/ + Body *models.V1Macros + /*TenantUID*/ + TenantUID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 tenants Uid macros update by macro name params +func (o *V1TenantsUIDMacrosUpdateByMacroNameParams) WithTimeout(timeout time.Duration) *V1TenantsUIDMacrosUpdateByMacroNameParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 tenants Uid macros update by macro name params +func (o *V1TenantsUIDMacrosUpdateByMacroNameParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 tenants Uid macros update by macro name params +func (o *V1TenantsUIDMacrosUpdateByMacroNameParams) WithContext(ctx context.Context) *V1TenantsUIDMacrosUpdateByMacroNameParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 tenants Uid macros update by macro name params +func (o *V1TenantsUIDMacrosUpdateByMacroNameParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 tenants Uid macros update by macro name params +func (o *V1TenantsUIDMacrosUpdateByMacroNameParams) WithHTTPClient(client *http.Client) *V1TenantsUIDMacrosUpdateByMacroNameParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 tenants Uid macros update by macro name params +func (o *V1TenantsUIDMacrosUpdateByMacroNameParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 tenants Uid macros update by macro name params +func (o *V1TenantsUIDMacrosUpdateByMacroNameParams) WithBody(body *models.V1Macros) *V1TenantsUIDMacrosUpdateByMacroNameParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 tenants Uid macros update by macro name params +func (o *V1TenantsUIDMacrosUpdateByMacroNameParams) SetBody(body *models.V1Macros) { + o.Body = body +} + +// WithTenantUID adds the tenantUID to the v1 tenants Uid macros update by macro name params +func (o *V1TenantsUIDMacrosUpdateByMacroNameParams) WithTenantUID(tenantUID string) *V1TenantsUIDMacrosUpdateByMacroNameParams { + o.SetTenantUID(tenantUID) + return o +} + +// SetTenantUID adds the tenantUid to the v1 tenants Uid macros update by macro name params +func (o *V1TenantsUIDMacrosUpdateByMacroNameParams) SetTenantUID(tenantUID string) { + o.TenantUID = tenantUID +} + +// WriteToRequest writes these params to a swagger request +func (o *V1TenantsUIDMacrosUpdateByMacroNameParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param tenantUid + if err := r.SetPathParam("tenantUid", o.TenantUID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_tenants_uid_macros_update_by_macro_name_responses.go b/api/client/v1/v1_tenants_uid_macros_update_by_macro_name_responses.go new file mode 100644 index 00000000..a292e838 --- /dev/null +++ b/api/client/v1/v1_tenants_uid_macros_update_by_macro_name_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1TenantsUIDMacrosUpdateByMacroNameReader is a Reader for the V1TenantsUIDMacrosUpdateByMacroName structure. +type V1TenantsUIDMacrosUpdateByMacroNameReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1TenantsUIDMacrosUpdateByMacroNameReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1TenantsUIDMacrosUpdateByMacroNameNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1TenantsUIDMacrosUpdateByMacroNameNoContent creates a V1TenantsUIDMacrosUpdateByMacroNameNoContent with default headers values +func NewV1TenantsUIDMacrosUpdateByMacroNameNoContent() *V1TenantsUIDMacrosUpdateByMacroNameNoContent { + return &V1TenantsUIDMacrosUpdateByMacroNameNoContent{} +} + +/* +V1TenantsUIDMacrosUpdateByMacroNameNoContent handles this case with default header values. + +The resource was updated successfully +*/ +type V1TenantsUIDMacrosUpdateByMacroNameNoContent struct { +} + +func (o *V1TenantsUIDMacrosUpdateByMacroNameNoContent) Error() string { + return fmt.Sprintf("[PATCH /v1/tenants/{tenantUid}/macros][%d] v1TenantsUidMacrosUpdateByMacroNameNoContent ", 204) +} + +func (o *V1TenantsUIDMacrosUpdateByMacroNameNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_tenants_uid_macros_update_parameters.go b/api/client/v1/v1_tenants_uid_macros_update_parameters.go new file mode 100644 index 00000000..33fe64b1 --- /dev/null +++ b/api/client/v1/v1_tenants_uid_macros_update_parameters.go @@ -0,0 +1,154 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1TenantsUIDMacrosUpdateParams creates a new V1TenantsUIDMacrosUpdateParams object +// with the default values initialized. +func NewV1TenantsUIDMacrosUpdateParams() *V1TenantsUIDMacrosUpdateParams { + var () + return &V1TenantsUIDMacrosUpdateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1TenantsUIDMacrosUpdateParamsWithTimeout creates a new V1TenantsUIDMacrosUpdateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1TenantsUIDMacrosUpdateParamsWithTimeout(timeout time.Duration) *V1TenantsUIDMacrosUpdateParams { + var () + return &V1TenantsUIDMacrosUpdateParams{ + + timeout: timeout, + } +} + +// NewV1TenantsUIDMacrosUpdateParamsWithContext creates a new V1TenantsUIDMacrosUpdateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1TenantsUIDMacrosUpdateParamsWithContext(ctx context.Context) *V1TenantsUIDMacrosUpdateParams { + var () + return &V1TenantsUIDMacrosUpdateParams{ + + Context: ctx, + } +} + +// NewV1TenantsUIDMacrosUpdateParamsWithHTTPClient creates a new V1TenantsUIDMacrosUpdateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1TenantsUIDMacrosUpdateParamsWithHTTPClient(client *http.Client) *V1TenantsUIDMacrosUpdateParams { + var () + return &V1TenantsUIDMacrosUpdateParams{ + HTTPClient: client, + } +} + +/* +V1TenantsUIDMacrosUpdateParams contains all the parameters to send to the API endpoint +for the v1 tenants Uid macros update operation typically these are written to a http.Request +*/ +type V1TenantsUIDMacrosUpdateParams struct { + + /*Body*/ + Body *models.V1Macros + /*TenantUID*/ + TenantUID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 tenants Uid macros update params +func (o *V1TenantsUIDMacrosUpdateParams) WithTimeout(timeout time.Duration) *V1TenantsUIDMacrosUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 tenants Uid macros update params +func (o *V1TenantsUIDMacrosUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 tenants Uid macros update params +func (o *V1TenantsUIDMacrosUpdateParams) WithContext(ctx context.Context) *V1TenantsUIDMacrosUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 tenants Uid macros update params +func (o *V1TenantsUIDMacrosUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 tenants Uid macros update params +func (o *V1TenantsUIDMacrosUpdateParams) WithHTTPClient(client *http.Client) *V1TenantsUIDMacrosUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 tenants Uid macros update params +func (o *V1TenantsUIDMacrosUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 tenants Uid macros update params +func (o *V1TenantsUIDMacrosUpdateParams) WithBody(body *models.V1Macros) *V1TenantsUIDMacrosUpdateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 tenants Uid macros update params +func (o *V1TenantsUIDMacrosUpdateParams) SetBody(body *models.V1Macros) { + o.Body = body +} + +// WithTenantUID adds the tenantUID to the v1 tenants Uid macros update params +func (o *V1TenantsUIDMacrosUpdateParams) WithTenantUID(tenantUID string) *V1TenantsUIDMacrosUpdateParams { + o.SetTenantUID(tenantUID) + return o +} + +// SetTenantUID adds the tenantUid to the v1 tenants Uid macros update params +func (o *V1TenantsUIDMacrosUpdateParams) SetTenantUID(tenantUID string) { + o.TenantUID = tenantUID +} + +// WriteToRequest writes these params to a swagger request +func (o *V1TenantsUIDMacrosUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param tenantUid + if err := r.SetPathParam("tenantUid", o.TenantUID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_tenants_uid_macros_update_responses.go b/api/client/v1/v1_tenants_uid_macros_update_responses.go new file mode 100644 index 00000000..3f240709 --- /dev/null +++ b/api/client/v1/v1_tenants_uid_macros_update_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1TenantsUIDMacrosUpdateReader is a Reader for the V1TenantsUIDMacrosUpdate structure. +type V1TenantsUIDMacrosUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1TenantsUIDMacrosUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1TenantsUIDMacrosUpdateNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1TenantsUIDMacrosUpdateNoContent creates a V1TenantsUIDMacrosUpdateNoContent with default headers values +func NewV1TenantsUIDMacrosUpdateNoContent() *V1TenantsUIDMacrosUpdateNoContent { + return &V1TenantsUIDMacrosUpdateNoContent{} +} + +/* +V1TenantsUIDMacrosUpdateNoContent handles this case with default header values. + +The resource was updated successfully +*/ +type V1TenantsUIDMacrosUpdateNoContent struct { +} + +func (o *V1TenantsUIDMacrosUpdateNoContent) Error() string { + return fmt.Sprintf("[PUT /v1/tenants/{tenantUid}/macros][%d] v1TenantsUidMacrosUpdateNoContent ", 204) +} + +func (o *V1TenantsUIDMacrosUpdateNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_tencent_account_validate_parameters.go b/api/client/v1/v1_tencent_account_validate_parameters.go new file mode 100644 index 00000000..bd21505b --- /dev/null +++ b/api/client/v1/v1_tencent_account_validate_parameters.go @@ -0,0 +1,139 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1TencentAccountValidateParams creates a new V1TencentAccountValidateParams object +// with the default values initialized. +func NewV1TencentAccountValidateParams() *V1TencentAccountValidateParams { + var () + return &V1TencentAccountValidateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1TencentAccountValidateParamsWithTimeout creates a new V1TencentAccountValidateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1TencentAccountValidateParamsWithTimeout(timeout time.Duration) *V1TencentAccountValidateParams { + var () + return &V1TencentAccountValidateParams{ + + timeout: timeout, + } +} + +// NewV1TencentAccountValidateParamsWithContext creates a new V1TencentAccountValidateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1TencentAccountValidateParamsWithContext(ctx context.Context) *V1TencentAccountValidateParams { + var () + return &V1TencentAccountValidateParams{ + + Context: ctx, + } +} + +// NewV1TencentAccountValidateParamsWithHTTPClient creates a new V1TencentAccountValidateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1TencentAccountValidateParamsWithHTTPClient(client *http.Client) *V1TencentAccountValidateParams { + var () + return &V1TencentAccountValidateParams{ + HTTPClient: client, + } +} + +/* +V1TencentAccountValidateParams contains all the parameters to send to the API endpoint +for the v1 tencent account validate operation typically these are written to a http.Request +*/ +type V1TencentAccountValidateParams struct { + + /*Account + Request payload to validate tencent cloud account + + */ + Account *models.V1TencentCloudAccount + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 tencent account validate params +func (o *V1TencentAccountValidateParams) WithTimeout(timeout time.Duration) *V1TencentAccountValidateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 tencent account validate params +func (o *V1TencentAccountValidateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 tencent account validate params +func (o *V1TencentAccountValidateParams) WithContext(ctx context.Context) *V1TencentAccountValidateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 tencent account validate params +func (o *V1TencentAccountValidateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 tencent account validate params +func (o *V1TencentAccountValidateParams) WithHTTPClient(client *http.Client) *V1TencentAccountValidateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 tencent account validate params +func (o *V1TencentAccountValidateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithAccount adds the account to the v1 tencent account validate params +func (o *V1TencentAccountValidateParams) WithAccount(account *models.V1TencentCloudAccount) *V1TencentAccountValidateParams { + o.SetAccount(account) + return o +} + +// SetAccount adds the account to the v1 tencent account validate params +func (o *V1TencentAccountValidateParams) SetAccount(account *models.V1TencentCloudAccount) { + o.Account = account +} + +// WriteToRequest writes these params to a swagger request +func (o *V1TencentAccountValidateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Account != nil { + if err := r.SetBodyParam(o.Account); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_tencent_account_validate_responses.go b/api/client/v1/v1_tencent_account_validate_responses.go new file mode 100644 index 00000000..6cc52065 --- /dev/null +++ b/api/client/v1/v1_tencent_account_validate_responses.go @@ -0,0 +1,61 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1TencentAccountValidateReader is a Reader for the V1TencentAccountValidate structure. +type V1TencentAccountValidateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1TencentAccountValidateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1TencentAccountValidateNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1TencentAccountValidateNoContent creates a V1TencentAccountValidateNoContent with default headers values +func NewV1TencentAccountValidateNoContent() *V1TencentAccountValidateNoContent { + return &V1TencentAccountValidateNoContent{} +} + +/* +V1TencentAccountValidateNoContent handles this case with default header values. + +Ok response without content +*/ +type V1TencentAccountValidateNoContent struct { + /*Audit uid for the request + */ + AuditUID string +} + +func (o *V1TencentAccountValidateNoContent) Error() string { + return fmt.Sprintf("[POST /v1/clouds/tencent/account/validate][%d] v1TencentAccountValidateNoContent ", 204) +} + +func (o *V1TencentAccountValidateNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header AuditUid + o.AuditUID = response.GetHeader("AuditUid") + + return nil +} diff --git a/api/client/v1/v1_tencent_instance_types_parameters.go b/api/client/v1/v1_tencent_instance_types_parameters.go new file mode 100644 index 00000000..cbeb53ed --- /dev/null +++ b/api/client/v1/v1_tencent_instance_types_parameters.go @@ -0,0 +1,258 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// NewV1TencentInstanceTypesParams creates a new V1TencentInstanceTypesParams object +// with the default values initialized. +func NewV1TencentInstanceTypesParams() *V1TencentInstanceTypesParams { + var () + return &V1TencentInstanceTypesParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1TencentInstanceTypesParamsWithTimeout creates a new V1TencentInstanceTypesParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1TencentInstanceTypesParamsWithTimeout(timeout time.Duration) *V1TencentInstanceTypesParams { + var () + return &V1TencentInstanceTypesParams{ + + timeout: timeout, + } +} + +// NewV1TencentInstanceTypesParamsWithContext creates a new V1TencentInstanceTypesParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1TencentInstanceTypesParamsWithContext(ctx context.Context) *V1TencentInstanceTypesParams { + var () + return &V1TencentInstanceTypesParams{ + + Context: ctx, + } +} + +// NewV1TencentInstanceTypesParamsWithHTTPClient creates a new V1TencentInstanceTypesParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1TencentInstanceTypesParamsWithHTTPClient(client *http.Client) *V1TencentInstanceTypesParams { + var () + return &V1TencentInstanceTypesParams{ + HTTPClient: client, + } +} + +/* +V1TencentInstanceTypesParams contains all the parameters to send to the API endpoint +for the v1 tencent instance types operation typically these are written to a http.Request +*/ +type V1TencentInstanceTypesParams struct { + + /*CloudAccountUID + Uid for the specific tencent cloud account + + */ + CloudAccountUID string + /*CPUGtEq + Filter for instances having cpu greater than or equal + + */ + CPUGtEq *float64 + /*GpuGtEq + Filter for instances having gpu greater than or equal + + */ + GpuGtEq *float64 + /*MemoryGtEq + Filter for instances having memory greater than or equal + + */ + MemoryGtEq *float64 + /*Region + Region for which tencent instances are listed + + */ + Region string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 tencent instance types params +func (o *V1TencentInstanceTypesParams) WithTimeout(timeout time.Duration) *V1TencentInstanceTypesParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 tencent instance types params +func (o *V1TencentInstanceTypesParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 tencent instance types params +func (o *V1TencentInstanceTypesParams) WithContext(ctx context.Context) *V1TencentInstanceTypesParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 tencent instance types params +func (o *V1TencentInstanceTypesParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 tencent instance types params +func (o *V1TencentInstanceTypesParams) WithHTTPClient(client *http.Client) *V1TencentInstanceTypesParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 tencent instance types params +func (o *V1TencentInstanceTypesParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithCloudAccountUID adds the cloudAccountUID to the v1 tencent instance types params +func (o *V1TencentInstanceTypesParams) WithCloudAccountUID(cloudAccountUID string) *V1TencentInstanceTypesParams { + o.SetCloudAccountUID(cloudAccountUID) + return o +} + +// SetCloudAccountUID adds the cloudAccountUid to the v1 tencent instance types params +func (o *V1TencentInstanceTypesParams) SetCloudAccountUID(cloudAccountUID string) { + o.CloudAccountUID = cloudAccountUID +} + +// WithCPUGtEq adds the cPUGtEq to the v1 tencent instance types params +func (o *V1TencentInstanceTypesParams) WithCPUGtEq(cPUGtEq *float64) *V1TencentInstanceTypesParams { + o.SetCPUGtEq(cPUGtEq) + return o +} + +// SetCPUGtEq adds the cpuGtEq to the v1 tencent instance types params +func (o *V1TencentInstanceTypesParams) SetCPUGtEq(cPUGtEq *float64) { + o.CPUGtEq = cPUGtEq +} + +// WithGpuGtEq adds the gpuGtEq to the v1 tencent instance types params +func (o *V1TencentInstanceTypesParams) WithGpuGtEq(gpuGtEq *float64) *V1TencentInstanceTypesParams { + o.SetGpuGtEq(gpuGtEq) + return o +} + +// SetGpuGtEq adds the gpuGtEq to the v1 tencent instance types params +func (o *V1TencentInstanceTypesParams) SetGpuGtEq(gpuGtEq *float64) { + o.GpuGtEq = gpuGtEq +} + +// WithMemoryGtEq adds the memoryGtEq to the v1 tencent instance types params +func (o *V1TencentInstanceTypesParams) WithMemoryGtEq(memoryGtEq *float64) *V1TencentInstanceTypesParams { + o.SetMemoryGtEq(memoryGtEq) + return o +} + +// SetMemoryGtEq adds the memoryGtEq to the v1 tencent instance types params +func (o *V1TencentInstanceTypesParams) SetMemoryGtEq(memoryGtEq *float64) { + o.MemoryGtEq = memoryGtEq +} + +// WithRegion adds the region to the v1 tencent instance types params +func (o *V1TencentInstanceTypesParams) WithRegion(region string) *V1TencentInstanceTypesParams { + o.SetRegion(region) + return o +} + +// SetRegion adds the region to the v1 tencent instance types params +func (o *V1TencentInstanceTypesParams) SetRegion(region string) { + o.Region = region +} + +// WriteToRequest writes these params to a swagger request +func (o *V1TencentInstanceTypesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // query param cloudAccountUid + qrCloudAccountUID := o.CloudAccountUID + qCloudAccountUID := qrCloudAccountUID + if qCloudAccountUID != "" { + if err := r.SetQueryParam("cloudAccountUid", qCloudAccountUID); err != nil { + return err + } + } + + if o.CPUGtEq != nil { + + // query param cpuGtEq + var qrCPUGtEq float64 + if o.CPUGtEq != nil { + qrCPUGtEq = *o.CPUGtEq + } + qCPUGtEq := swag.FormatFloat64(qrCPUGtEq) + if qCPUGtEq != "" { + if err := r.SetQueryParam("cpuGtEq", qCPUGtEq); err != nil { + return err + } + } + + } + + if o.GpuGtEq != nil { + + // query param gpuGtEq + var qrGpuGtEq float64 + if o.GpuGtEq != nil { + qrGpuGtEq = *o.GpuGtEq + } + qGpuGtEq := swag.FormatFloat64(qrGpuGtEq) + if qGpuGtEq != "" { + if err := r.SetQueryParam("gpuGtEq", qGpuGtEq); err != nil { + return err + } + } + + } + + if o.MemoryGtEq != nil { + + // query param memoryGtEq + var qrMemoryGtEq float64 + if o.MemoryGtEq != nil { + qrMemoryGtEq = *o.MemoryGtEq + } + qMemoryGtEq := swag.FormatFloat64(qrMemoryGtEq) + if qMemoryGtEq != "" { + if err := r.SetQueryParam("memoryGtEq", qMemoryGtEq); err != nil { + return err + } + } + + } + + // path param region + if err := r.SetPathParam("region", o.Region); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_tencent_instance_types_responses.go b/api/client/v1/v1_tencent_instance_types_responses.go new file mode 100644 index 00000000..9293f9df --- /dev/null +++ b/api/client/v1/v1_tencent_instance_types_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1TencentInstanceTypesReader is a Reader for the V1TencentInstanceTypes structure. +type V1TencentInstanceTypesReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1TencentInstanceTypesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1TencentInstanceTypesOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1TencentInstanceTypesOK creates a V1TencentInstanceTypesOK with default headers values +func NewV1TencentInstanceTypesOK() *V1TencentInstanceTypesOK { + return &V1TencentInstanceTypesOK{} +} + +/* +V1TencentInstanceTypesOK handles this case with default header values. + +(empty) +*/ +type V1TencentInstanceTypesOK struct { + Payload *models.V1TencentInstanceTypes +} + +func (o *V1TencentInstanceTypesOK) Error() string { + return fmt.Sprintf("[GET /v1/clouds/tencent/regions/{region}/instancetypes][%d] v1TencentInstanceTypesOK %+v", 200, o.Payload) +} + +func (o *V1TencentInstanceTypesOK) GetPayload() *models.V1TencentInstanceTypes { + return o.Payload +} + +func (o *V1TencentInstanceTypesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1TencentInstanceTypes) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_tencent_keypairs_parameters.go b/api/client/v1/v1_tencent_keypairs_parameters.go new file mode 100644 index 00000000..17cd1363 --- /dev/null +++ b/api/client/v1/v1_tencent_keypairs_parameters.go @@ -0,0 +1,161 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1TencentKeypairsParams creates a new V1TencentKeypairsParams object +// with the default values initialized. +func NewV1TencentKeypairsParams() *V1TencentKeypairsParams { + var () + return &V1TencentKeypairsParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1TencentKeypairsParamsWithTimeout creates a new V1TencentKeypairsParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1TencentKeypairsParamsWithTimeout(timeout time.Duration) *V1TencentKeypairsParams { + var () + return &V1TencentKeypairsParams{ + + timeout: timeout, + } +} + +// NewV1TencentKeypairsParamsWithContext creates a new V1TencentKeypairsParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1TencentKeypairsParamsWithContext(ctx context.Context) *V1TencentKeypairsParams { + var () + return &V1TencentKeypairsParams{ + + Context: ctx, + } +} + +// NewV1TencentKeypairsParamsWithHTTPClient creates a new V1TencentKeypairsParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1TencentKeypairsParamsWithHTTPClient(client *http.Client) *V1TencentKeypairsParams { + var () + return &V1TencentKeypairsParams{ + HTTPClient: client, + } +} + +/* +V1TencentKeypairsParams contains all the parameters to send to the API endpoint +for the v1 tencent keypairs operation typically these are written to a http.Request +*/ +type V1TencentKeypairsParams struct { + + /*CloudAccountUID + Uid for the specific Tencent cloud account + + */ + CloudAccountUID string + /*Region + Region for which keypairs are requested + + */ + Region string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 tencent keypairs params +func (o *V1TencentKeypairsParams) WithTimeout(timeout time.Duration) *V1TencentKeypairsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 tencent keypairs params +func (o *V1TencentKeypairsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 tencent keypairs params +func (o *V1TencentKeypairsParams) WithContext(ctx context.Context) *V1TencentKeypairsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 tencent keypairs params +func (o *V1TencentKeypairsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 tencent keypairs params +func (o *V1TencentKeypairsParams) WithHTTPClient(client *http.Client) *V1TencentKeypairsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 tencent keypairs params +func (o *V1TencentKeypairsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithCloudAccountUID adds the cloudAccountUID to the v1 tencent keypairs params +func (o *V1TencentKeypairsParams) WithCloudAccountUID(cloudAccountUID string) *V1TencentKeypairsParams { + o.SetCloudAccountUID(cloudAccountUID) + return o +} + +// SetCloudAccountUID adds the cloudAccountUid to the v1 tencent keypairs params +func (o *V1TencentKeypairsParams) SetCloudAccountUID(cloudAccountUID string) { + o.CloudAccountUID = cloudAccountUID +} + +// WithRegion adds the region to the v1 tencent keypairs params +func (o *V1TencentKeypairsParams) WithRegion(region string) *V1TencentKeypairsParams { + o.SetRegion(region) + return o +} + +// SetRegion adds the region to the v1 tencent keypairs params +func (o *V1TencentKeypairsParams) SetRegion(region string) { + o.Region = region +} + +// WriteToRequest writes these params to a swagger request +func (o *V1TencentKeypairsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // query param cloudAccountUid + qrCloudAccountUID := o.CloudAccountUID + qCloudAccountUID := qrCloudAccountUID + if qCloudAccountUID != "" { + if err := r.SetQueryParam("cloudAccountUid", qCloudAccountUID); err != nil { + return err + } + } + + // path param region + if err := r.SetPathParam("region", o.Region); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_tencent_keypairs_responses.go b/api/client/v1/v1_tencent_keypairs_responses.go new file mode 100644 index 00000000..da964195 --- /dev/null +++ b/api/client/v1/v1_tencent_keypairs_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1TencentKeypairsReader is a Reader for the V1TencentKeypairs structure. +type V1TencentKeypairsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1TencentKeypairsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1TencentKeypairsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1TencentKeypairsOK creates a V1TencentKeypairsOK with default headers values +func NewV1TencentKeypairsOK() *V1TencentKeypairsOK { + return &V1TencentKeypairsOK{} +} + +/* +V1TencentKeypairsOK handles this case with default header values. + +(empty) +*/ +type V1TencentKeypairsOK struct { + Payload *models.V1TencentKeypairs +} + +func (o *V1TencentKeypairsOK) Error() string { + return fmt.Sprintf("[GET /v1/clouds/tencent/regions/{region}/keypairs][%d] v1TencentKeypairsOK %+v", 200, o.Payload) +} + +func (o *V1TencentKeypairsOK) GetPayload() *models.V1TencentKeypairs { + return o.Payload +} + +func (o *V1TencentKeypairsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1TencentKeypairs) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_tencent_regions_parameters.go b/api/client/v1/v1_tencent_regions_parameters.go new file mode 100644 index 00000000..926361ca --- /dev/null +++ b/api/client/v1/v1_tencent_regions_parameters.go @@ -0,0 +1,140 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1TencentRegionsParams creates a new V1TencentRegionsParams object +// with the default values initialized. +func NewV1TencentRegionsParams() *V1TencentRegionsParams { + var () + return &V1TencentRegionsParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1TencentRegionsParamsWithTimeout creates a new V1TencentRegionsParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1TencentRegionsParamsWithTimeout(timeout time.Duration) *V1TencentRegionsParams { + var () + return &V1TencentRegionsParams{ + + timeout: timeout, + } +} + +// NewV1TencentRegionsParamsWithContext creates a new V1TencentRegionsParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1TencentRegionsParamsWithContext(ctx context.Context) *V1TencentRegionsParams { + var () + return &V1TencentRegionsParams{ + + Context: ctx, + } +} + +// NewV1TencentRegionsParamsWithHTTPClient creates a new V1TencentRegionsParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1TencentRegionsParamsWithHTTPClient(client *http.Client) *V1TencentRegionsParams { + var () + return &V1TencentRegionsParams{ + HTTPClient: client, + } +} + +/* +V1TencentRegionsParams contains all the parameters to send to the API endpoint +for the v1 tencent regions operation typically these are written to a http.Request +*/ +type V1TencentRegionsParams struct { + + /*CloudAccountUID + Uid for the specific Tencent cloud account + + */ + CloudAccountUID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 tencent regions params +func (o *V1TencentRegionsParams) WithTimeout(timeout time.Duration) *V1TencentRegionsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 tencent regions params +func (o *V1TencentRegionsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 tencent regions params +func (o *V1TencentRegionsParams) WithContext(ctx context.Context) *V1TencentRegionsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 tencent regions params +func (o *V1TencentRegionsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 tencent regions params +func (o *V1TencentRegionsParams) WithHTTPClient(client *http.Client) *V1TencentRegionsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 tencent regions params +func (o *V1TencentRegionsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithCloudAccountUID adds the cloudAccountUID to the v1 tencent regions params +func (o *V1TencentRegionsParams) WithCloudAccountUID(cloudAccountUID string) *V1TencentRegionsParams { + o.SetCloudAccountUID(cloudAccountUID) + return o +} + +// SetCloudAccountUID adds the cloudAccountUid to the v1 tencent regions params +func (o *V1TencentRegionsParams) SetCloudAccountUID(cloudAccountUID string) { + o.CloudAccountUID = cloudAccountUID +} + +// WriteToRequest writes these params to a swagger request +func (o *V1TencentRegionsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // query param cloudAccountUid + qrCloudAccountUID := o.CloudAccountUID + qCloudAccountUID := qrCloudAccountUID + if qCloudAccountUID != "" { + if err := r.SetQueryParam("cloudAccountUid", qCloudAccountUID); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_tencent_regions_responses.go b/api/client/v1/v1_tencent_regions_responses.go new file mode 100644 index 00000000..21b67dba --- /dev/null +++ b/api/client/v1/v1_tencent_regions_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1TencentRegionsReader is a Reader for the V1TencentRegions structure. +type V1TencentRegionsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1TencentRegionsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1TencentRegionsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1TencentRegionsOK creates a V1TencentRegionsOK with default headers values +func NewV1TencentRegionsOK() *V1TencentRegionsOK { + return &V1TencentRegionsOK{} +} + +/* +V1TencentRegionsOK handles this case with default header values. + +(empty) +*/ +type V1TencentRegionsOK struct { + Payload *models.V1TencentRegions +} + +func (o *V1TencentRegionsOK) Error() string { + return fmt.Sprintf("[GET /v1/clouds/tencent/regions][%d] v1TencentRegionsOK %+v", 200, o.Payload) +} + +func (o *V1TencentRegionsOK) GetPayload() *models.V1TencentRegions { + return o.Payload +} + +func (o *V1TencentRegionsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1TencentRegions) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_tencent_security_groups_parameters.go b/api/client/v1/v1_tencent_security_groups_parameters.go new file mode 100644 index 00000000..4b57bacf --- /dev/null +++ b/api/client/v1/v1_tencent_security_groups_parameters.go @@ -0,0 +1,161 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1TencentSecurityGroupsParams creates a new V1TencentSecurityGroupsParams object +// with the default values initialized. +func NewV1TencentSecurityGroupsParams() *V1TencentSecurityGroupsParams { + var () + return &V1TencentSecurityGroupsParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1TencentSecurityGroupsParamsWithTimeout creates a new V1TencentSecurityGroupsParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1TencentSecurityGroupsParamsWithTimeout(timeout time.Duration) *V1TencentSecurityGroupsParams { + var () + return &V1TencentSecurityGroupsParams{ + + timeout: timeout, + } +} + +// NewV1TencentSecurityGroupsParamsWithContext creates a new V1TencentSecurityGroupsParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1TencentSecurityGroupsParamsWithContext(ctx context.Context) *V1TencentSecurityGroupsParams { + var () + return &V1TencentSecurityGroupsParams{ + + Context: ctx, + } +} + +// NewV1TencentSecurityGroupsParamsWithHTTPClient creates a new V1TencentSecurityGroupsParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1TencentSecurityGroupsParamsWithHTTPClient(client *http.Client) *V1TencentSecurityGroupsParams { + var () + return &V1TencentSecurityGroupsParams{ + HTTPClient: client, + } +} + +/* +V1TencentSecurityGroupsParams contains all the parameters to send to the API endpoint +for the v1 tencent security groups operation typically these are written to a http.Request +*/ +type V1TencentSecurityGroupsParams struct { + + /*CloudAccountUID + Uid for the specific Tencent cloud account + + */ + CloudAccountUID string + /*Region + Region for which security groups are requested + + */ + Region string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 tencent security groups params +func (o *V1TencentSecurityGroupsParams) WithTimeout(timeout time.Duration) *V1TencentSecurityGroupsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 tencent security groups params +func (o *V1TencentSecurityGroupsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 tencent security groups params +func (o *V1TencentSecurityGroupsParams) WithContext(ctx context.Context) *V1TencentSecurityGroupsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 tencent security groups params +func (o *V1TencentSecurityGroupsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 tencent security groups params +func (o *V1TencentSecurityGroupsParams) WithHTTPClient(client *http.Client) *V1TencentSecurityGroupsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 tencent security groups params +func (o *V1TencentSecurityGroupsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithCloudAccountUID adds the cloudAccountUID to the v1 tencent security groups params +func (o *V1TencentSecurityGroupsParams) WithCloudAccountUID(cloudAccountUID string) *V1TencentSecurityGroupsParams { + o.SetCloudAccountUID(cloudAccountUID) + return o +} + +// SetCloudAccountUID adds the cloudAccountUid to the v1 tencent security groups params +func (o *V1TencentSecurityGroupsParams) SetCloudAccountUID(cloudAccountUID string) { + o.CloudAccountUID = cloudAccountUID +} + +// WithRegion adds the region to the v1 tencent security groups params +func (o *V1TencentSecurityGroupsParams) WithRegion(region string) *V1TencentSecurityGroupsParams { + o.SetRegion(region) + return o +} + +// SetRegion adds the region to the v1 tencent security groups params +func (o *V1TencentSecurityGroupsParams) SetRegion(region string) { + o.Region = region +} + +// WriteToRequest writes these params to a swagger request +func (o *V1TencentSecurityGroupsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // query param cloudAccountUid + qrCloudAccountUID := o.CloudAccountUID + qCloudAccountUID := qrCloudAccountUID + if qCloudAccountUID != "" { + if err := r.SetQueryParam("cloudAccountUid", qCloudAccountUID); err != nil { + return err + } + } + + // path param region + if err := r.SetPathParam("region", o.Region); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_tencent_security_groups_responses.go b/api/client/v1/v1_tencent_security_groups_responses.go new file mode 100644 index 00000000..100886f6 --- /dev/null +++ b/api/client/v1/v1_tencent_security_groups_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1TencentSecurityGroupsReader is a Reader for the V1TencentSecurityGroups structure. +type V1TencentSecurityGroupsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1TencentSecurityGroupsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1TencentSecurityGroupsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1TencentSecurityGroupsOK creates a V1TencentSecurityGroupsOK with default headers values +func NewV1TencentSecurityGroupsOK() *V1TencentSecurityGroupsOK { + return &V1TencentSecurityGroupsOK{} +} + +/* +V1TencentSecurityGroupsOK handles this case with default header values. + +(empty) +*/ +type V1TencentSecurityGroupsOK struct { + Payload *models.V1TencentSecurityGroups +} + +func (o *V1TencentSecurityGroupsOK) Error() string { + return fmt.Sprintf("[GET /v1/clouds/tencent/regions/{region}/securitygroups][%d] v1TencentSecurityGroupsOK %+v", 200, o.Payload) +} + +func (o *V1TencentSecurityGroupsOK) GetPayload() *models.V1TencentSecurityGroups { + return o.Payload +} + +func (o *V1TencentSecurityGroupsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1TencentSecurityGroups) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_tencent_storage_types_parameters.go b/api/client/v1/v1_tencent_storage_types_parameters.go new file mode 100644 index 00000000..6c043878 --- /dev/null +++ b/api/client/v1/v1_tencent_storage_types_parameters.go @@ -0,0 +1,186 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1TencentStorageTypesParams creates a new V1TencentStorageTypesParams object +// with the default values initialized. +func NewV1TencentStorageTypesParams() *V1TencentStorageTypesParams { + var () + return &V1TencentStorageTypesParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1TencentStorageTypesParamsWithTimeout creates a new V1TencentStorageTypesParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1TencentStorageTypesParamsWithTimeout(timeout time.Duration) *V1TencentStorageTypesParams { + var () + return &V1TencentStorageTypesParams{ + + timeout: timeout, + } +} + +// NewV1TencentStorageTypesParamsWithContext creates a new V1TencentStorageTypesParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1TencentStorageTypesParamsWithContext(ctx context.Context) *V1TencentStorageTypesParams { + var () + return &V1TencentStorageTypesParams{ + + Context: ctx, + } +} + +// NewV1TencentStorageTypesParamsWithHTTPClient creates a new V1TencentStorageTypesParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1TencentStorageTypesParamsWithHTTPClient(client *http.Client) *V1TencentStorageTypesParams { + var () + return &V1TencentStorageTypesParams{ + HTTPClient: client, + } +} + +/* +V1TencentStorageTypesParams contains all the parameters to send to the API endpoint +for the v1 tencent storage types operation typically these are written to a http.Request +*/ +type V1TencentStorageTypesParams struct { + + /*CloudAccountUID + Uid for the specific tencent cloud account + + */ + CloudAccountUID string + /*Region + Region for which tencent storages are listed + + */ + Region string + /*Zone + Zone for which tencent storages are listed + + */ + Zone string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 tencent storage types params +func (o *V1TencentStorageTypesParams) WithTimeout(timeout time.Duration) *V1TencentStorageTypesParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 tencent storage types params +func (o *V1TencentStorageTypesParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 tencent storage types params +func (o *V1TencentStorageTypesParams) WithContext(ctx context.Context) *V1TencentStorageTypesParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 tencent storage types params +func (o *V1TencentStorageTypesParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 tencent storage types params +func (o *V1TencentStorageTypesParams) WithHTTPClient(client *http.Client) *V1TencentStorageTypesParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 tencent storage types params +func (o *V1TencentStorageTypesParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithCloudAccountUID adds the cloudAccountUID to the v1 tencent storage types params +func (o *V1TencentStorageTypesParams) WithCloudAccountUID(cloudAccountUID string) *V1TencentStorageTypesParams { + o.SetCloudAccountUID(cloudAccountUID) + return o +} + +// SetCloudAccountUID adds the cloudAccountUid to the v1 tencent storage types params +func (o *V1TencentStorageTypesParams) SetCloudAccountUID(cloudAccountUID string) { + o.CloudAccountUID = cloudAccountUID +} + +// WithRegion adds the region to the v1 tencent storage types params +func (o *V1TencentStorageTypesParams) WithRegion(region string) *V1TencentStorageTypesParams { + o.SetRegion(region) + return o +} + +// SetRegion adds the region to the v1 tencent storage types params +func (o *V1TencentStorageTypesParams) SetRegion(region string) { + o.Region = region +} + +// WithZone adds the zone to the v1 tencent storage types params +func (o *V1TencentStorageTypesParams) WithZone(zone string) *V1TencentStorageTypesParams { + o.SetZone(zone) + return o +} + +// SetZone adds the zone to the v1 tencent storage types params +func (o *V1TencentStorageTypesParams) SetZone(zone string) { + o.Zone = zone +} + +// WriteToRequest writes these params to a swagger request +func (o *V1TencentStorageTypesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // query param cloudAccountUid + qrCloudAccountUID := o.CloudAccountUID + qCloudAccountUID := qrCloudAccountUID + if qCloudAccountUID != "" { + if err := r.SetQueryParam("cloudAccountUid", qCloudAccountUID); err != nil { + return err + } + } + + // path param region + if err := r.SetPathParam("region", o.Region); err != nil { + return err + } + + // query param zone + qrZone := o.Zone + qZone := qrZone + if qZone != "" { + if err := r.SetQueryParam("zone", qZone); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_tencent_storage_types_responses.go b/api/client/v1/v1_tencent_storage_types_responses.go new file mode 100644 index 00000000..47aa082f --- /dev/null +++ b/api/client/v1/v1_tencent_storage_types_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1TencentStorageTypesReader is a Reader for the V1TencentStorageTypes structure. +type V1TencentStorageTypesReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1TencentStorageTypesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1TencentStorageTypesOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1TencentStorageTypesOK creates a V1TencentStorageTypesOK with default headers values +func NewV1TencentStorageTypesOK() *V1TencentStorageTypesOK { + return &V1TencentStorageTypesOK{} +} + +/* +V1TencentStorageTypesOK handles this case with default header values. + +(empty) +*/ +type V1TencentStorageTypesOK struct { + Payload *models.V1TencentStorageTypes +} + +func (o *V1TencentStorageTypesOK) Error() string { + return fmt.Sprintf("[GET /v1/clouds/tencent/regions/{region}/storagetypes][%d] v1TencentStorageTypesOK %+v", 200, o.Payload) +} + +func (o *V1TencentStorageTypesOK) GetPayload() *models.V1TencentStorageTypes { + return o.Payload +} + +func (o *V1TencentStorageTypesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1TencentStorageTypes) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_tencent_vpcs_parameters.go b/api/client/v1/v1_tencent_vpcs_parameters.go new file mode 100644 index 00000000..d5b144a5 --- /dev/null +++ b/api/client/v1/v1_tencent_vpcs_parameters.go @@ -0,0 +1,161 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1TencentVpcsParams creates a new V1TencentVpcsParams object +// with the default values initialized. +func NewV1TencentVpcsParams() *V1TencentVpcsParams { + var () + return &V1TencentVpcsParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1TencentVpcsParamsWithTimeout creates a new V1TencentVpcsParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1TencentVpcsParamsWithTimeout(timeout time.Duration) *V1TencentVpcsParams { + var () + return &V1TencentVpcsParams{ + + timeout: timeout, + } +} + +// NewV1TencentVpcsParamsWithContext creates a new V1TencentVpcsParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1TencentVpcsParamsWithContext(ctx context.Context) *V1TencentVpcsParams { + var () + return &V1TencentVpcsParams{ + + Context: ctx, + } +} + +// NewV1TencentVpcsParamsWithHTTPClient creates a new V1TencentVpcsParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1TencentVpcsParamsWithHTTPClient(client *http.Client) *V1TencentVpcsParams { + var () + return &V1TencentVpcsParams{ + HTTPClient: client, + } +} + +/* +V1TencentVpcsParams contains all the parameters to send to the API endpoint +for the v1 tencent vpcs operation typically these are written to a http.Request +*/ +type V1TencentVpcsParams struct { + + /*CloudAccountUID + Uid for the specific Tencent cloud account + + */ + CloudAccountUID string + /*Region + Region for which VPCs are requested + + */ + Region string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 tencent vpcs params +func (o *V1TencentVpcsParams) WithTimeout(timeout time.Duration) *V1TencentVpcsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 tencent vpcs params +func (o *V1TencentVpcsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 tencent vpcs params +func (o *V1TencentVpcsParams) WithContext(ctx context.Context) *V1TencentVpcsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 tencent vpcs params +func (o *V1TencentVpcsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 tencent vpcs params +func (o *V1TencentVpcsParams) WithHTTPClient(client *http.Client) *V1TencentVpcsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 tencent vpcs params +func (o *V1TencentVpcsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithCloudAccountUID adds the cloudAccountUID to the v1 tencent vpcs params +func (o *V1TencentVpcsParams) WithCloudAccountUID(cloudAccountUID string) *V1TencentVpcsParams { + o.SetCloudAccountUID(cloudAccountUID) + return o +} + +// SetCloudAccountUID adds the cloudAccountUid to the v1 tencent vpcs params +func (o *V1TencentVpcsParams) SetCloudAccountUID(cloudAccountUID string) { + o.CloudAccountUID = cloudAccountUID +} + +// WithRegion adds the region to the v1 tencent vpcs params +func (o *V1TencentVpcsParams) WithRegion(region string) *V1TencentVpcsParams { + o.SetRegion(region) + return o +} + +// SetRegion adds the region to the v1 tencent vpcs params +func (o *V1TencentVpcsParams) SetRegion(region string) { + o.Region = region +} + +// WriteToRequest writes these params to a swagger request +func (o *V1TencentVpcsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // query param cloudAccountUid + qrCloudAccountUID := o.CloudAccountUID + qCloudAccountUID := qrCloudAccountUID + if qCloudAccountUID != "" { + if err := r.SetQueryParam("cloudAccountUid", qCloudAccountUID); err != nil { + return err + } + } + + // path param region + if err := r.SetPathParam("region", o.Region); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_tencent_vpcs_responses.go b/api/client/v1/v1_tencent_vpcs_responses.go new file mode 100644 index 00000000..6d0f9e74 --- /dev/null +++ b/api/client/v1/v1_tencent_vpcs_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1TencentVpcsReader is a Reader for the V1TencentVpcs structure. +type V1TencentVpcsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1TencentVpcsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1TencentVpcsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1TencentVpcsOK creates a V1TencentVpcsOK with default headers values +func NewV1TencentVpcsOK() *V1TencentVpcsOK { + return &V1TencentVpcsOK{} +} + +/* +V1TencentVpcsOK handles this case with default header values. + +(empty) +*/ +type V1TencentVpcsOK struct { + Payload *models.V1TencentVpcs +} + +func (o *V1TencentVpcsOK) Error() string { + return fmt.Sprintf("[GET /v1/clouds/tencent/regions/{region}/vpcs][%d] v1TencentVpcsOK %+v", 200, o.Payload) +} + +func (o *V1TencentVpcsOK) GetPayload() *models.V1TencentVpcs { + return o.Payload +} + +func (o *V1TencentVpcsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1TencentVpcs) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_tencent_zones_parameters.go b/api/client/v1/v1_tencent_zones_parameters.go new file mode 100644 index 00000000..0c8bf618 --- /dev/null +++ b/api/client/v1/v1_tencent_zones_parameters.go @@ -0,0 +1,161 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1TencentZonesParams creates a new V1TencentZonesParams object +// with the default values initialized. +func NewV1TencentZonesParams() *V1TencentZonesParams { + var () + return &V1TencentZonesParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1TencentZonesParamsWithTimeout creates a new V1TencentZonesParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1TencentZonesParamsWithTimeout(timeout time.Duration) *V1TencentZonesParams { + var () + return &V1TencentZonesParams{ + + timeout: timeout, + } +} + +// NewV1TencentZonesParamsWithContext creates a new V1TencentZonesParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1TencentZonesParamsWithContext(ctx context.Context) *V1TencentZonesParams { + var () + return &V1TencentZonesParams{ + + Context: ctx, + } +} + +// NewV1TencentZonesParamsWithHTTPClient creates a new V1TencentZonesParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1TencentZonesParamsWithHTTPClient(client *http.Client) *V1TencentZonesParams { + var () + return &V1TencentZonesParams{ + HTTPClient: client, + } +} + +/* +V1TencentZonesParams contains all the parameters to send to the API endpoint +for the v1 tencent zones operation typically these are written to a http.Request +*/ +type V1TencentZonesParams struct { + + /*CloudAccountUID + Uid for the specific Tencent cloud account + + */ + CloudAccountUID string + /*Region + Region for which zones are requested + + */ + Region string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 tencent zones params +func (o *V1TencentZonesParams) WithTimeout(timeout time.Duration) *V1TencentZonesParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 tencent zones params +func (o *V1TencentZonesParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 tencent zones params +func (o *V1TencentZonesParams) WithContext(ctx context.Context) *V1TencentZonesParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 tencent zones params +func (o *V1TencentZonesParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 tencent zones params +func (o *V1TencentZonesParams) WithHTTPClient(client *http.Client) *V1TencentZonesParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 tencent zones params +func (o *V1TencentZonesParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithCloudAccountUID adds the cloudAccountUID to the v1 tencent zones params +func (o *V1TencentZonesParams) WithCloudAccountUID(cloudAccountUID string) *V1TencentZonesParams { + o.SetCloudAccountUID(cloudAccountUID) + return o +} + +// SetCloudAccountUID adds the cloudAccountUid to the v1 tencent zones params +func (o *V1TencentZonesParams) SetCloudAccountUID(cloudAccountUID string) { + o.CloudAccountUID = cloudAccountUID +} + +// WithRegion adds the region to the v1 tencent zones params +func (o *V1TencentZonesParams) WithRegion(region string) *V1TencentZonesParams { + o.SetRegion(region) + return o +} + +// SetRegion adds the region to the v1 tencent zones params +func (o *V1TencentZonesParams) SetRegion(region string) { + o.Region = region +} + +// WriteToRequest writes these params to a swagger request +func (o *V1TencentZonesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // query param cloudAccountUid + qrCloudAccountUID := o.CloudAccountUID + qCloudAccountUID := qrCloudAccountUID + if qCloudAccountUID != "" { + if err := r.SetQueryParam("cloudAccountUid", qCloudAccountUID); err != nil { + return err + } + } + + // path param region + if err := r.SetPathParam("region", o.Region); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_tencent_zones_responses.go b/api/client/v1/v1_tencent_zones_responses.go new file mode 100644 index 00000000..18200f69 --- /dev/null +++ b/api/client/v1/v1_tencent_zones_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1TencentZonesReader is a Reader for the V1TencentZones structure. +type V1TencentZonesReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1TencentZonesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1TencentZonesOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1TencentZonesOK creates a V1TencentZonesOK with default headers values +func NewV1TencentZonesOK() *V1TencentZonesOK { + return &V1TencentZonesOK{} +} + +/* +V1TencentZonesOK handles this case with default header values. + +(empty) +*/ +type V1TencentZonesOK struct { + Payload *models.V1TencentAvailabilityZones +} + +func (o *V1TencentZonesOK) Error() string { + return fmt.Sprintf("[GET /v1/clouds/tencent/regions/{region}/zones][%d] v1TencentZonesOK %+v", 200, o.Payload) +} + +func (o *V1TencentZonesOK) GetPayload() *models.V1TencentAvailabilityZones { + return o.Payload +} + +func (o *V1TencentZonesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1TencentAvailabilityZones) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_user_assets_ssh_create_parameters.go b/api/client/v1/v1_user_assets_ssh_create_parameters.go new file mode 100644 index 00000000..24f395f3 --- /dev/null +++ b/api/client/v1/v1_user_assets_ssh_create_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1UserAssetsSSHCreateParams creates a new V1UserAssetsSSHCreateParams object +// with the default values initialized. +func NewV1UserAssetsSSHCreateParams() *V1UserAssetsSSHCreateParams { + var () + return &V1UserAssetsSSHCreateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1UserAssetsSSHCreateParamsWithTimeout creates a new V1UserAssetsSSHCreateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1UserAssetsSSHCreateParamsWithTimeout(timeout time.Duration) *V1UserAssetsSSHCreateParams { + var () + return &V1UserAssetsSSHCreateParams{ + + timeout: timeout, + } +} + +// NewV1UserAssetsSSHCreateParamsWithContext creates a new V1UserAssetsSSHCreateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1UserAssetsSSHCreateParamsWithContext(ctx context.Context) *V1UserAssetsSSHCreateParams { + var () + return &V1UserAssetsSSHCreateParams{ + + Context: ctx, + } +} + +// NewV1UserAssetsSSHCreateParamsWithHTTPClient creates a new V1UserAssetsSSHCreateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1UserAssetsSSHCreateParamsWithHTTPClient(client *http.Client) *V1UserAssetsSSHCreateParams { + var () + return &V1UserAssetsSSHCreateParams{ + HTTPClient: client, + } +} + +/* +V1UserAssetsSSHCreateParams contains all the parameters to send to the API endpoint +for the v1 user assets Ssh create operation typically these are written to a http.Request +*/ +type V1UserAssetsSSHCreateParams struct { + + /*Body*/ + Body *models.V1UserAssetSSHEntity + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 user assets Ssh create params +func (o *V1UserAssetsSSHCreateParams) WithTimeout(timeout time.Duration) *V1UserAssetsSSHCreateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 user assets Ssh create params +func (o *V1UserAssetsSSHCreateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 user assets Ssh create params +func (o *V1UserAssetsSSHCreateParams) WithContext(ctx context.Context) *V1UserAssetsSSHCreateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 user assets Ssh create params +func (o *V1UserAssetsSSHCreateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 user assets Ssh create params +func (o *V1UserAssetsSSHCreateParams) WithHTTPClient(client *http.Client) *V1UserAssetsSSHCreateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 user assets Ssh create params +func (o *V1UserAssetsSSHCreateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 user assets Ssh create params +func (o *V1UserAssetsSSHCreateParams) WithBody(body *models.V1UserAssetSSHEntity) *V1UserAssetsSSHCreateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 user assets Ssh create params +func (o *V1UserAssetsSSHCreateParams) SetBody(body *models.V1UserAssetSSHEntity) { + o.Body = body +} + +// WriteToRequest writes these params to a swagger request +func (o *V1UserAssetsSSHCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_user_assets_ssh_create_responses.go b/api/client/v1/v1_user_assets_ssh_create_responses.go new file mode 100644 index 00000000..93eacb79 --- /dev/null +++ b/api/client/v1/v1_user_assets_ssh_create_responses.go @@ -0,0 +1,77 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1UserAssetsSSHCreateReader is a Reader for the V1UserAssetsSSHCreate structure. +type V1UserAssetsSSHCreateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1UserAssetsSSHCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 201: + result := NewV1UserAssetsSSHCreateCreated() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1UserAssetsSSHCreateCreated creates a V1UserAssetsSSHCreateCreated with default headers values +func NewV1UserAssetsSSHCreateCreated() *V1UserAssetsSSHCreateCreated { + return &V1UserAssetsSSHCreateCreated{} +} + +/* +V1UserAssetsSSHCreateCreated handles this case with default header values. + +Created successfully +*/ +type V1UserAssetsSSHCreateCreated struct { + /*Audit uid for the request + */ + AuditUID string + + Payload *models.V1UID +} + +func (o *V1UserAssetsSSHCreateCreated) Error() string { + return fmt.Sprintf("[POST /v1/users/assets/sshkeys][%d] v1UserAssetsSshCreateCreated %+v", 201, o.Payload) +} + +func (o *V1UserAssetsSSHCreateCreated) GetPayload() *models.V1UID { + return o.Payload +} + +func (o *V1UserAssetsSSHCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header AuditUid + o.AuditUID = response.GetHeader("AuditUid") + + o.Payload = new(models.V1UID) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_users_asset_ssh_delete_parameters.go b/api/client/v1/v1_users_asset_ssh_delete_parameters.go new file mode 100644 index 00000000..24bbcb02 --- /dev/null +++ b/api/client/v1/v1_users_asset_ssh_delete_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1UsersAssetSSHDeleteParams creates a new V1UsersAssetSSHDeleteParams object +// with the default values initialized. +func NewV1UsersAssetSSHDeleteParams() *V1UsersAssetSSHDeleteParams { + var () + return &V1UsersAssetSSHDeleteParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1UsersAssetSSHDeleteParamsWithTimeout creates a new V1UsersAssetSSHDeleteParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1UsersAssetSSHDeleteParamsWithTimeout(timeout time.Duration) *V1UsersAssetSSHDeleteParams { + var () + return &V1UsersAssetSSHDeleteParams{ + + timeout: timeout, + } +} + +// NewV1UsersAssetSSHDeleteParamsWithContext creates a new V1UsersAssetSSHDeleteParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1UsersAssetSSHDeleteParamsWithContext(ctx context.Context) *V1UsersAssetSSHDeleteParams { + var () + return &V1UsersAssetSSHDeleteParams{ + + Context: ctx, + } +} + +// NewV1UsersAssetSSHDeleteParamsWithHTTPClient creates a new V1UsersAssetSSHDeleteParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1UsersAssetSSHDeleteParamsWithHTTPClient(client *http.Client) *V1UsersAssetSSHDeleteParams { + var () + return &V1UsersAssetSSHDeleteParams{ + HTTPClient: client, + } +} + +/* +V1UsersAssetSSHDeleteParams contains all the parameters to send to the API endpoint +for the v1 users asset Ssh delete operation typically these are written to a http.Request +*/ +type V1UsersAssetSSHDeleteParams struct { + + /*UID + Specify the SSH key uid + + */ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 users asset Ssh delete params +func (o *V1UsersAssetSSHDeleteParams) WithTimeout(timeout time.Duration) *V1UsersAssetSSHDeleteParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 users asset Ssh delete params +func (o *V1UsersAssetSSHDeleteParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 users asset Ssh delete params +func (o *V1UsersAssetSSHDeleteParams) WithContext(ctx context.Context) *V1UsersAssetSSHDeleteParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 users asset Ssh delete params +func (o *V1UsersAssetSSHDeleteParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 users asset Ssh delete params +func (o *V1UsersAssetSSHDeleteParams) WithHTTPClient(client *http.Client) *V1UsersAssetSSHDeleteParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 users asset Ssh delete params +func (o *V1UsersAssetSSHDeleteParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithUID adds the uid to the v1 users asset Ssh delete params +func (o *V1UsersAssetSSHDeleteParams) WithUID(uid string) *V1UsersAssetSSHDeleteParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 users asset Ssh delete params +func (o *V1UsersAssetSSHDeleteParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1UsersAssetSSHDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_users_asset_ssh_delete_responses.go b/api/client/v1/v1_users_asset_ssh_delete_responses.go new file mode 100644 index 00000000..90941e88 --- /dev/null +++ b/api/client/v1/v1_users_asset_ssh_delete_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1UsersAssetSSHDeleteReader is a Reader for the V1UsersAssetSSHDelete structure. +type V1UsersAssetSSHDeleteReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1UsersAssetSSHDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1UsersAssetSSHDeleteNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1UsersAssetSSHDeleteNoContent creates a V1UsersAssetSSHDeleteNoContent with default headers values +func NewV1UsersAssetSSHDeleteNoContent() *V1UsersAssetSSHDeleteNoContent { + return &V1UsersAssetSSHDeleteNoContent{} +} + +/* +V1UsersAssetSSHDeleteNoContent handles this case with default header values. + +The resource was deleted successfully +*/ +type V1UsersAssetSSHDeleteNoContent struct { +} + +func (o *V1UsersAssetSSHDeleteNoContent) Error() string { + return fmt.Sprintf("[DELETE /v1/users/assets/sshkeys/{uid}][%d] v1UsersAssetSshDeleteNoContent ", 204) +} + +func (o *V1UsersAssetSSHDeleteNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_users_asset_ssh_get_uid_parameters.go b/api/client/v1/v1_users_asset_ssh_get_uid_parameters.go new file mode 100644 index 00000000..3cf04c63 --- /dev/null +++ b/api/client/v1/v1_users_asset_ssh_get_uid_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1UsersAssetSSHGetUIDParams creates a new V1UsersAssetSSHGetUIDParams object +// with the default values initialized. +func NewV1UsersAssetSSHGetUIDParams() *V1UsersAssetSSHGetUIDParams { + var () + return &V1UsersAssetSSHGetUIDParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1UsersAssetSSHGetUIDParamsWithTimeout creates a new V1UsersAssetSSHGetUIDParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1UsersAssetSSHGetUIDParamsWithTimeout(timeout time.Duration) *V1UsersAssetSSHGetUIDParams { + var () + return &V1UsersAssetSSHGetUIDParams{ + + timeout: timeout, + } +} + +// NewV1UsersAssetSSHGetUIDParamsWithContext creates a new V1UsersAssetSSHGetUIDParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1UsersAssetSSHGetUIDParamsWithContext(ctx context.Context) *V1UsersAssetSSHGetUIDParams { + var () + return &V1UsersAssetSSHGetUIDParams{ + + Context: ctx, + } +} + +// NewV1UsersAssetSSHGetUIDParamsWithHTTPClient creates a new V1UsersAssetSSHGetUIDParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1UsersAssetSSHGetUIDParamsWithHTTPClient(client *http.Client) *V1UsersAssetSSHGetUIDParams { + var () + return &V1UsersAssetSSHGetUIDParams{ + HTTPClient: client, + } +} + +/* +V1UsersAssetSSHGetUIDParams contains all the parameters to send to the API endpoint +for the v1 users asset Ssh get Uid operation typically these are written to a http.Request +*/ +type V1UsersAssetSSHGetUIDParams struct { + + /*UID + Specify the SSH key uid + + */ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 users asset Ssh get Uid params +func (o *V1UsersAssetSSHGetUIDParams) WithTimeout(timeout time.Duration) *V1UsersAssetSSHGetUIDParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 users asset Ssh get Uid params +func (o *V1UsersAssetSSHGetUIDParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 users asset Ssh get Uid params +func (o *V1UsersAssetSSHGetUIDParams) WithContext(ctx context.Context) *V1UsersAssetSSHGetUIDParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 users asset Ssh get Uid params +func (o *V1UsersAssetSSHGetUIDParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 users asset Ssh get Uid params +func (o *V1UsersAssetSSHGetUIDParams) WithHTTPClient(client *http.Client) *V1UsersAssetSSHGetUIDParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 users asset Ssh get Uid params +func (o *V1UsersAssetSSHGetUIDParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithUID adds the uid to the v1 users asset Ssh get Uid params +func (o *V1UsersAssetSSHGetUIDParams) WithUID(uid string) *V1UsersAssetSSHGetUIDParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 users asset Ssh get Uid params +func (o *V1UsersAssetSSHGetUIDParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1UsersAssetSSHGetUIDParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_users_asset_ssh_get_uid_responses.go b/api/client/v1/v1_users_asset_ssh_get_uid_responses.go new file mode 100644 index 00000000..7040d321 --- /dev/null +++ b/api/client/v1/v1_users_asset_ssh_get_uid_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1UsersAssetSSHGetUIDReader is a Reader for the V1UsersAssetSSHGetUID structure. +type V1UsersAssetSSHGetUIDReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1UsersAssetSSHGetUIDReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1UsersAssetSSHGetUIDOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1UsersAssetSSHGetUIDOK creates a V1UsersAssetSSHGetUIDOK with default headers values +func NewV1UsersAssetSSHGetUIDOK() *V1UsersAssetSSHGetUIDOK { + return &V1UsersAssetSSHGetUIDOK{} +} + +/* +V1UsersAssetSSHGetUIDOK handles this case with default header values. + +(empty) +*/ +type V1UsersAssetSSHGetUIDOK struct { + Payload *models.V1UserAssetSSH +} + +func (o *V1UsersAssetSSHGetUIDOK) Error() string { + return fmt.Sprintf("[GET /v1/users/assets/sshkeys/{uid}][%d] v1UsersAssetSshGetUidOK %+v", 200, o.Payload) +} + +func (o *V1UsersAssetSSHGetUIDOK) GetPayload() *models.V1UserAssetSSH { + return o.Payload +} + +func (o *V1UsersAssetSSHGetUIDOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1UserAssetSSH) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_users_asset_ssh_update_parameters.go b/api/client/v1/v1_users_asset_ssh_update_parameters.go new file mode 100644 index 00000000..92895d0c --- /dev/null +++ b/api/client/v1/v1_users_asset_ssh_update_parameters.go @@ -0,0 +1,157 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1UsersAssetSSHUpdateParams creates a new V1UsersAssetSSHUpdateParams object +// with the default values initialized. +func NewV1UsersAssetSSHUpdateParams() *V1UsersAssetSSHUpdateParams { + var () + return &V1UsersAssetSSHUpdateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1UsersAssetSSHUpdateParamsWithTimeout creates a new V1UsersAssetSSHUpdateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1UsersAssetSSHUpdateParamsWithTimeout(timeout time.Duration) *V1UsersAssetSSHUpdateParams { + var () + return &V1UsersAssetSSHUpdateParams{ + + timeout: timeout, + } +} + +// NewV1UsersAssetSSHUpdateParamsWithContext creates a new V1UsersAssetSSHUpdateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1UsersAssetSSHUpdateParamsWithContext(ctx context.Context) *V1UsersAssetSSHUpdateParams { + var () + return &V1UsersAssetSSHUpdateParams{ + + Context: ctx, + } +} + +// NewV1UsersAssetSSHUpdateParamsWithHTTPClient creates a new V1UsersAssetSSHUpdateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1UsersAssetSSHUpdateParamsWithHTTPClient(client *http.Client) *V1UsersAssetSSHUpdateParams { + var () + return &V1UsersAssetSSHUpdateParams{ + HTTPClient: client, + } +} + +/* +V1UsersAssetSSHUpdateParams contains all the parameters to send to the API endpoint +for the v1 users asset Ssh update operation typically these are written to a http.Request +*/ +type V1UsersAssetSSHUpdateParams struct { + + /*Body*/ + Body *models.V1UserAssetSSH + /*UID + Specify the SSH key uid + + */ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 users asset Ssh update params +func (o *V1UsersAssetSSHUpdateParams) WithTimeout(timeout time.Duration) *V1UsersAssetSSHUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 users asset Ssh update params +func (o *V1UsersAssetSSHUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 users asset Ssh update params +func (o *V1UsersAssetSSHUpdateParams) WithContext(ctx context.Context) *V1UsersAssetSSHUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 users asset Ssh update params +func (o *V1UsersAssetSSHUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 users asset Ssh update params +func (o *V1UsersAssetSSHUpdateParams) WithHTTPClient(client *http.Client) *V1UsersAssetSSHUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 users asset Ssh update params +func (o *V1UsersAssetSSHUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 users asset Ssh update params +func (o *V1UsersAssetSSHUpdateParams) WithBody(body *models.V1UserAssetSSH) *V1UsersAssetSSHUpdateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 users asset Ssh update params +func (o *V1UsersAssetSSHUpdateParams) SetBody(body *models.V1UserAssetSSH) { + o.Body = body +} + +// WithUID adds the uid to the v1 users asset Ssh update params +func (o *V1UsersAssetSSHUpdateParams) WithUID(uid string) *V1UsersAssetSSHUpdateParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 users asset Ssh update params +func (o *V1UsersAssetSSHUpdateParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1UsersAssetSSHUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_users_asset_ssh_update_responses.go b/api/client/v1/v1_users_asset_ssh_update_responses.go new file mode 100644 index 00000000..aa837273 --- /dev/null +++ b/api/client/v1/v1_users_asset_ssh_update_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1UsersAssetSSHUpdateReader is a Reader for the V1UsersAssetSSHUpdate structure. +type V1UsersAssetSSHUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1UsersAssetSSHUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1UsersAssetSSHUpdateNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1UsersAssetSSHUpdateNoContent creates a V1UsersAssetSSHUpdateNoContent with default headers values +func NewV1UsersAssetSSHUpdateNoContent() *V1UsersAssetSSHUpdateNoContent { + return &V1UsersAssetSSHUpdateNoContent{} +} + +/* +V1UsersAssetSSHUpdateNoContent handles this case with default header values. + +The resource was updated successfully +*/ +type V1UsersAssetSSHUpdateNoContent struct { +} + +func (o *V1UsersAssetSSHUpdateNoContent) Error() string { + return fmt.Sprintf("[PUT /v1/users/assets/sshkeys/{uid}][%d] v1UsersAssetSshUpdateNoContent ", 204) +} + +func (o *V1UsersAssetSSHUpdateNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_users_assets_location_azure_create_parameters.go b/api/client/v1/v1_users_assets_location_azure_create_parameters.go new file mode 100644 index 00000000..f7ed437c --- /dev/null +++ b/api/client/v1/v1_users_assets_location_azure_create_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1UsersAssetsLocationAzureCreateParams creates a new V1UsersAssetsLocationAzureCreateParams object +// with the default values initialized. +func NewV1UsersAssetsLocationAzureCreateParams() *V1UsersAssetsLocationAzureCreateParams { + var () + return &V1UsersAssetsLocationAzureCreateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1UsersAssetsLocationAzureCreateParamsWithTimeout creates a new V1UsersAssetsLocationAzureCreateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1UsersAssetsLocationAzureCreateParamsWithTimeout(timeout time.Duration) *V1UsersAssetsLocationAzureCreateParams { + var () + return &V1UsersAssetsLocationAzureCreateParams{ + + timeout: timeout, + } +} + +// NewV1UsersAssetsLocationAzureCreateParamsWithContext creates a new V1UsersAssetsLocationAzureCreateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1UsersAssetsLocationAzureCreateParamsWithContext(ctx context.Context) *V1UsersAssetsLocationAzureCreateParams { + var () + return &V1UsersAssetsLocationAzureCreateParams{ + + Context: ctx, + } +} + +// NewV1UsersAssetsLocationAzureCreateParamsWithHTTPClient creates a new V1UsersAssetsLocationAzureCreateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1UsersAssetsLocationAzureCreateParamsWithHTTPClient(client *http.Client) *V1UsersAssetsLocationAzureCreateParams { + var () + return &V1UsersAssetsLocationAzureCreateParams{ + HTTPClient: client, + } +} + +/* +V1UsersAssetsLocationAzureCreateParams contains all the parameters to send to the API endpoint +for the v1 users assets location azure create operation typically these are written to a http.Request +*/ +type V1UsersAssetsLocationAzureCreateParams struct { + + /*Body*/ + Body *models.V1UserAssetsLocationAzure + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 users assets location azure create params +func (o *V1UsersAssetsLocationAzureCreateParams) WithTimeout(timeout time.Duration) *V1UsersAssetsLocationAzureCreateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 users assets location azure create params +func (o *V1UsersAssetsLocationAzureCreateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 users assets location azure create params +func (o *V1UsersAssetsLocationAzureCreateParams) WithContext(ctx context.Context) *V1UsersAssetsLocationAzureCreateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 users assets location azure create params +func (o *V1UsersAssetsLocationAzureCreateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 users assets location azure create params +func (o *V1UsersAssetsLocationAzureCreateParams) WithHTTPClient(client *http.Client) *V1UsersAssetsLocationAzureCreateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 users assets location azure create params +func (o *V1UsersAssetsLocationAzureCreateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 users assets location azure create params +func (o *V1UsersAssetsLocationAzureCreateParams) WithBody(body *models.V1UserAssetsLocationAzure) *V1UsersAssetsLocationAzureCreateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 users assets location azure create params +func (o *V1UsersAssetsLocationAzureCreateParams) SetBody(body *models.V1UserAssetsLocationAzure) { + o.Body = body +} + +// WriteToRequest writes these params to a swagger request +func (o *V1UsersAssetsLocationAzureCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_users_assets_location_azure_create_responses.go b/api/client/v1/v1_users_assets_location_azure_create_responses.go new file mode 100644 index 00000000..f5410d54 --- /dev/null +++ b/api/client/v1/v1_users_assets_location_azure_create_responses.go @@ -0,0 +1,77 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1UsersAssetsLocationAzureCreateReader is a Reader for the V1UsersAssetsLocationAzureCreate structure. +type V1UsersAssetsLocationAzureCreateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1UsersAssetsLocationAzureCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 201: + result := NewV1UsersAssetsLocationAzureCreateCreated() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1UsersAssetsLocationAzureCreateCreated creates a V1UsersAssetsLocationAzureCreateCreated with default headers values +func NewV1UsersAssetsLocationAzureCreateCreated() *V1UsersAssetsLocationAzureCreateCreated { + return &V1UsersAssetsLocationAzureCreateCreated{} +} + +/* +V1UsersAssetsLocationAzureCreateCreated handles this case with default header values. + +Created successfully +*/ +type V1UsersAssetsLocationAzureCreateCreated struct { + /*Audit uid for the request + */ + AuditUID string + + Payload *models.V1UID +} + +func (o *V1UsersAssetsLocationAzureCreateCreated) Error() string { + return fmt.Sprintf("[POST /v1/users/assets/locations/azure][%d] v1UsersAssetsLocationAzureCreateCreated %+v", 201, o.Payload) +} + +func (o *V1UsersAssetsLocationAzureCreateCreated) GetPayload() *models.V1UID { + return o.Payload +} + +func (o *V1UsersAssetsLocationAzureCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header AuditUid + o.AuditUID = response.GetHeader("AuditUid") + + o.Payload = new(models.V1UID) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_users_assets_location_azure_get_parameters.go b/api/client/v1/v1_users_assets_location_azure_get_parameters.go new file mode 100644 index 00000000..dfb99d0d --- /dev/null +++ b/api/client/v1/v1_users_assets_location_azure_get_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1UsersAssetsLocationAzureGetParams creates a new V1UsersAssetsLocationAzureGetParams object +// with the default values initialized. +func NewV1UsersAssetsLocationAzureGetParams() *V1UsersAssetsLocationAzureGetParams { + var () + return &V1UsersAssetsLocationAzureGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1UsersAssetsLocationAzureGetParamsWithTimeout creates a new V1UsersAssetsLocationAzureGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1UsersAssetsLocationAzureGetParamsWithTimeout(timeout time.Duration) *V1UsersAssetsLocationAzureGetParams { + var () + return &V1UsersAssetsLocationAzureGetParams{ + + timeout: timeout, + } +} + +// NewV1UsersAssetsLocationAzureGetParamsWithContext creates a new V1UsersAssetsLocationAzureGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1UsersAssetsLocationAzureGetParamsWithContext(ctx context.Context) *V1UsersAssetsLocationAzureGetParams { + var () + return &V1UsersAssetsLocationAzureGetParams{ + + Context: ctx, + } +} + +// NewV1UsersAssetsLocationAzureGetParamsWithHTTPClient creates a new V1UsersAssetsLocationAzureGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1UsersAssetsLocationAzureGetParamsWithHTTPClient(client *http.Client) *V1UsersAssetsLocationAzureGetParams { + var () + return &V1UsersAssetsLocationAzureGetParams{ + HTTPClient: client, + } +} + +/* +V1UsersAssetsLocationAzureGetParams contains all the parameters to send to the API endpoint +for the v1 users assets location azure get operation typically these are written to a http.Request +*/ +type V1UsersAssetsLocationAzureGetParams struct { + + /*UID + Specify the Azure location uid + + */ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 users assets location azure get params +func (o *V1UsersAssetsLocationAzureGetParams) WithTimeout(timeout time.Duration) *V1UsersAssetsLocationAzureGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 users assets location azure get params +func (o *V1UsersAssetsLocationAzureGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 users assets location azure get params +func (o *V1UsersAssetsLocationAzureGetParams) WithContext(ctx context.Context) *V1UsersAssetsLocationAzureGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 users assets location azure get params +func (o *V1UsersAssetsLocationAzureGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 users assets location azure get params +func (o *V1UsersAssetsLocationAzureGetParams) WithHTTPClient(client *http.Client) *V1UsersAssetsLocationAzureGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 users assets location azure get params +func (o *V1UsersAssetsLocationAzureGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithUID adds the uid to the v1 users assets location azure get params +func (o *V1UsersAssetsLocationAzureGetParams) WithUID(uid string) *V1UsersAssetsLocationAzureGetParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 users assets location azure get params +func (o *V1UsersAssetsLocationAzureGetParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1UsersAssetsLocationAzureGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_users_assets_location_azure_get_responses.go b/api/client/v1/v1_users_assets_location_azure_get_responses.go new file mode 100644 index 00000000..47b99440 --- /dev/null +++ b/api/client/v1/v1_users_assets_location_azure_get_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1UsersAssetsLocationAzureGetReader is a Reader for the V1UsersAssetsLocationAzureGet structure. +type V1UsersAssetsLocationAzureGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1UsersAssetsLocationAzureGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1UsersAssetsLocationAzureGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1UsersAssetsLocationAzureGetOK creates a V1UsersAssetsLocationAzureGetOK with default headers values +func NewV1UsersAssetsLocationAzureGetOK() *V1UsersAssetsLocationAzureGetOK { + return &V1UsersAssetsLocationAzureGetOK{} +} + +/* +V1UsersAssetsLocationAzureGetOK handles this case with default header values. + +(empty) +*/ +type V1UsersAssetsLocationAzureGetOK struct { + Payload *models.V1UserAssetsLocationAzure +} + +func (o *V1UsersAssetsLocationAzureGetOK) Error() string { + return fmt.Sprintf("[GET /v1/users/assets/locations/azure/{uid}][%d] v1UsersAssetsLocationAzureGetOK %+v", 200, o.Payload) +} + +func (o *V1UsersAssetsLocationAzureGetOK) GetPayload() *models.V1UserAssetsLocationAzure { + return o.Payload +} + +func (o *V1UsersAssetsLocationAzureGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1UserAssetsLocationAzure) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_users_assets_location_azure_update_parameters.go b/api/client/v1/v1_users_assets_location_azure_update_parameters.go new file mode 100644 index 00000000..1136cd2d --- /dev/null +++ b/api/client/v1/v1_users_assets_location_azure_update_parameters.go @@ -0,0 +1,157 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1UsersAssetsLocationAzureUpdateParams creates a new V1UsersAssetsLocationAzureUpdateParams object +// with the default values initialized. +func NewV1UsersAssetsLocationAzureUpdateParams() *V1UsersAssetsLocationAzureUpdateParams { + var () + return &V1UsersAssetsLocationAzureUpdateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1UsersAssetsLocationAzureUpdateParamsWithTimeout creates a new V1UsersAssetsLocationAzureUpdateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1UsersAssetsLocationAzureUpdateParamsWithTimeout(timeout time.Duration) *V1UsersAssetsLocationAzureUpdateParams { + var () + return &V1UsersAssetsLocationAzureUpdateParams{ + + timeout: timeout, + } +} + +// NewV1UsersAssetsLocationAzureUpdateParamsWithContext creates a new V1UsersAssetsLocationAzureUpdateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1UsersAssetsLocationAzureUpdateParamsWithContext(ctx context.Context) *V1UsersAssetsLocationAzureUpdateParams { + var () + return &V1UsersAssetsLocationAzureUpdateParams{ + + Context: ctx, + } +} + +// NewV1UsersAssetsLocationAzureUpdateParamsWithHTTPClient creates a new V1UsersAssetsLocationAzureUpdateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1UsersAssetsLocationAzureUpdateParamsWithHTTPClient(client *http.Client) *V1UsersAssetsLocationAzureUpdateParams { + var () + return &V1UsersAssetsLocationAzureUpdateParams{ + HTTPClient: client, + } +} + +/* +V1UsersAssetsLocationAzureUpdateParams contains all the parameters to send to the API endpoint +for the v1 users assets location azure update operation typically these are written to a http.Request +*/ +type V1UsersAssetsLocationAzureUpdateParams struct { + + /*Body*/ + Body *models.V1UserAssetsLocationAzure + /*UID + Specify the Azure location uid + + */ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 users assets location azure update params +func (o *V1UsersAssetsLocationAzureUpdateParams) WithTimeout(timeout time.Duration) *V1UsersAssetsLocationAzureUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 users assets location azure update params +func (o *V1UsersAssetsLocationAzureUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 users assets location azure update params +func (o *V1UsersAssetsLocationAzureUpdateParams) WithContext(ctx context.Context) *V1UsersAssetsLocationAzureUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 users assets location azure update params +func (o *V1UsersAssetsLocationAzureUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 users assets location azure update params +func (o *V1UsersAssetsLocationAzureUpdateParams) WithHTTPClient(client *http.Client) *V1UsersAssetsLocationAzureUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 users assets location azure update params +func (o *V1UsersAssetsLocationAzureUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 users assets location azure update params +func (o *V1UsersAssetsLocationAzureUpdateParams) WithBody(body *models.V1UserAssetsLocationAzure) *V1UsersAssetsLocationAzureUpdateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 users assets location azure update params +func (o *V1UsersAssetsLocationAzureUpdateParams) SetBody(body *models.V1UserAssetsLocationAzure) { + o.Body = body +} + +// WithUID adds the uid to the v1 users assets location azure update params +func (o *V1UsersAssetsLocationAzureUpdateParams) WithUID(uid string) *V1UsersAssetsLocationAzureUpdateParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 users assets location azure update params +func (o *V1UsersAssetsLocationAzureUpdateParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1UsersAssetsLocationAzureUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_users_assets_location_azure_update_responses.go b/api/client/v1/v1_users_assets_location_azure_update_responses.go new file mode 100644 index 00000000..f25fa29e --- /dev/null +++ b/api/client/v1/v1_users_assets_location_azure_update_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1UsersAssetsLocationAzureUpdateReader is a Reader for the V1UsersAssetsLocationAzureUpdate structure. +type V1UsersAssetsLocationAzureUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1UsersAssetsLocationAzureUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1UsersAssetsLocationAzureUpdateNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1UsersAssetsLocationAzureUpdateNoContent creates a V1UsersAssetsLocationAzureUpdateNoContent with default headers values +func NewV1UsersAssetsLocationAzureUpdateNoContent() *V1UsersAssetsLocationAzureUpdateNoContent { + return &V1UsersAssetsLocationAzureUpdateNoContent{} +} + +/* +V1UsersAssetsLocationAzureUpdateNoContent handles this case with default header values. + +The resource was updated successfully +*/ +type V1UsersAssetsLocationAzureUpdateNoContent struct { +} + +func (o *V1UsersAssetsLocationAzureUpdateNoContent) Error() string { + return fmt.Sprintf("[PUT /v1/users/assets/locations/azure/{uid}][%d] v1UsersAssetsLocationAzureUpdateNoContent ", 204) +} + +func (o *V1UsersAssetsLocationAzureUpdateNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_users_assets_location_default_update_parameters.go b/api/client/v1/v1_users_assets_location_default_update_parameters.go new file mode 100644 index 00000000..7357521e --- /dev/null +++ b/api/client/v1/v1_users_assets_location_default_update_parameters.go @@ -0,0 +1,157 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1UsersAssetsLocationDefaultUpdateParams creates a new V1UsersAssetsLocationDefaultUpdateParams object +// with the default values initialized. +func NewV1UsersAssetsLocationDefaultUpdateParams() *V1UsersAssetsLocationDefaultUpdateParams { + var () + return &V1UsersAssetsLocationDefaultUpdateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1UsersAssetsLocationDefaultUpdateParamsWithTimeout creates a new V1UsersAssetsLocationDefaultUpdateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1UsersAssetsLocationDefaultUpdateParamsWithTimeout(timeout time.Duration) *V1UsersAssetsLocationDefaultUpdateParams { + var () + return &V1UsersAssetsLocationDefaultUpdateParams{ + + timeout: timeout, + } +} + +// NewV1UsersAssetsLocationDefaultUpdateParamsWithContext creates a new V1UsersAssetsLocationDefaultUpdateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1UsersAssetsLocationDefaultUpdateParamsWithContext(ctx context.Context) *V1UsersAssetsLocationDefaultUpdateParams { + var () + return &V1UsersAssetsLocationDefaultUpdateParams{ + + Context: ctx, + } +} + +// NewV1UsersAssetsLocationDefaultUpdateParamsWithHTTPClient creates a new V1UsersAssetsLocationDefaultUpdateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1UsersAssetsLocationDefaultUpdateParamsWithHTTPClient(client *http.Client) *V1UsersAssetsLocationDefaultUpdateParams { + var () + return &V1UsersAssetsLocationDefaultUpdateParams{ + HTTPClient: client, + } +} + +/* +V1UsersAssetsLocationDefaultUpdateParams contains all the parameters to send to the API endpoint +for the v1 users assets location default update operation typically these are written to a http.Request +*/ +type V1UsersAssetsLocationDefaultUpdateParams struct { + + /*Type + Specify the location type [aws/azure/gcp/minio/s3] + + */ + Type string + /*UID + Specify the location uid + + */ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 users assets location default update params +func (o *V1UsersAssetsLocationDefaultUpdateParams) WithTimeout(timeout time.Duration) *V1UsersAssetsLocationDefaultUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 users assets location default update params +func (o *V1UsersAssetsLocationDefaultUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 users assets location default update params +func (o *V1UsersAssetsLocationDefaultUpdateParams) WithContext(ctx context.Context) *V1UsersAssetsLocationDefaultUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 users assets location default update params +func (o *V1UsersAssetsLocationDefaultUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 users assets location default update params +func (o *V1UsersAssetsLocationDefaultUpdateParams) WithHTTPClient(client *http.Client) *V1UsersAssetsLocationDefaultUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 users assets location default update params +func (o *V1UsersAssetsLocationDefaultUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithType adds the typeVar to the v1 users assets location default update params +func (o *V1UsersAssetsLocationDefaultUpdateParams) WithType(typeVar string) *V1UsersAssetsLocationDefaultUpdateParams { + o.SetType(typeVar) + return o +} + +// SetType adds the type to the v1 users assets location default update params +func (o *V1UsersAssetsLocationDefaultUpdateParams) SetType(typeVar string) { + o.Type = typeVar +} + +// WithUID adds the uid to the v1 users assets location default update params +func (o *V1UsersAssetsLocationDefaultUpdateParams) WithUID(uid string) *V1UsersAssetsLocationDefaultUpdateParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 users assets location default update params +func (o *V1UsersAssetsLocationDefaultUpdateParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1UsersAssetsLocationDefaultUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param type + if err := r.SetPathParam("type", o.Type); err != nil { + return err + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_users_assets_location_default_update_responses.go b/api/client/v1/v1_users_assets_location_default_update_responses.go new file mode 100644 index 00000000..a9479ca0 --- /dev/null +++ b/api/client/v1/v1_users_assets_location_default_update_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1UsersAssetsLocationDefaultUpdateReader is a Reader for the V1UsersAssetsLocationDefaultUpdate structure. +type V1UsersAssetsLocationDefaultUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1UsersAssetsLocationDefaultUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1UsersAssetsLocationDefaultUpdateNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1UsersAssetsLocationDefaultUpdateNoContent creates a V1UsersAssetsLocationDefaultUpdateNoContent with default headers values +func NewV1UsersAssetsLocationDefaultUpdateNoContent() *V1UsersAssetsLocationDefaultUpdateNoContent { + return &V1UsersAssetsLocationDefaultUpdateNoContent{} +} + +/* +V1UsersAssetsLocationDefaultUpdateNoContent handles this case with default header values. + +The resource was updated successfully +*/ +type V1UsersAssetsLocationDefaultUpdateNoContent struct { +} + +func (o *V1UsersAssetsLocationDefaultUpdateNoContent) Error() string { + return fmt.Sprintf("[PATCH /v1/users/assets/locations/{type}/{uid}/default][%d] v1UsersAssetsLocationDefaultUpdateNoContent ", 204) +} + +func (o *V1UsersAssetsLocationDefaultUpdateNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_users_assets_location_delete_parameters.go b/api/client/v1/v1_users_assets_location_delete_parameters.go new file mode 100644 index 00000000..bca0891e --- /dev/null +++ b/api/client/v1/v1_users_assets_location_delete_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1UsersAssetsLocationDeleteParams creates a new V1UsersAssetsLocationDeleteParams object +// with the default values initialized. +func NewV1UsersAssetsLocationDeleteParams() *V1UsersAssetsLocationDeleteParams { + var () + return &V1UsersAssetsLocationDeleteParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1UsersAssetsLocationDeleteParamsWithTimeout creates a new V1UsersAssetsLocationDeleteParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1UsersAssetsLocationDeleteParamsWithTimeout(timeout time.Duration) *V1UsersAssetsLocationDeleteParams { + var () + return &V1UsersAssetsLocationDeleteParams{ + + timeout: timeout, + } +} + +// NewV1UsersAssetsLocationDeleteParamsWithContext creates a new V1UsersAssetsLocationDeleteParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1UsersAssetsLocationDeleteParamsWithContext(ctx context.Context) *V1UsersAssetsLocationDeleteParams { + var () + return &V1UsersAssetsLocationDeleteParams{ + + Context: ctx, + } +} + +// NewV1UsersAssetsLocationDeleteParamsWithHTTPClient creates a new V1UsersAssetsLocationDeleteParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1UsersAssetsLocationDeleteParamsWithHTTPClient(client *http.Client) *V1UsersAssetsLocationDeleteParams { + var () + return &V1UsersAssetsLocationDeleteParams{ + HTTPClient: client, + } +} + +/* +V1UsersAssetsLocationDeleteParams contains all the parameters to send to the API endpoint +for the v1 users assets location delete operation typically these are written to a http.Request +*/ +type V1UsersAssetsLocationDeleteParams struct { + + /*UID + Specify the location uid + + */ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 users assets location delete params +func (o *V1UsersAssetsLocationDeleteParams) WithTimeout(timeout time.Duration) *V1UsersAssetsLocationDeleteParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 users assets location delete params +func (o *V1UsersAssetsLocationDeleteParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 users assets location delete params +func (o *V1UsersAssetsLocationDeleteParams) WithContext(ctx context.Context) *V1UsersAssetsLocationDeleteParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 users assets location delete params +func (o *V1UsersAssetsLocationDeleteParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 users assets location delete params +func (o *V1UsersAssetsLocationDeleteParams) WithHTTPClient(client *http.Client) *V1UsersAssetsLocationDeleteParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 users assets location delete params +func (o *V1UsersAssetsLocationDeleteParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithUID adds the uid to the v1 users assets location delete params +func (o *V1UsersAssetsLocationDeleteParams) WithUID(uid string) *V1UsersAssetsLocationDeleteParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 users assets location delete params +func (o *V1UsersAssetsLocationDeleteParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1UsersAssetsLocationDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_users_assets_location_delete_responses.go b/api/client/v1/v1_users_assets_location_delete_responses.go new file mode 100644 index 00000000..86cb923d --- /dev/null +++ b/api/client/v1/v1_users_assets_location_delete_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1UsersAssetsLocationDeleteReader is a Reader for the V1UsersAssetsLocationDelete structure. +type V1UsersAssetsLocationDeleteReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1UsersAssetsLocationDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1UsersAssetsLocationDeleteNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1UsersAssetsLocationDeleteNoContent creates a V1UsersAssetsLocationDeleteNoContent with default headers values +func NewV1UsersAssetsLocationDeleteNoContent() *V1UsersAssetsLocationDeleteNoContent { + return &V1UsersAssetsLocationDeleteNoContent{} +} + +/* +V1UsersAssetsLocationDeleteNoContent handles this case with default header values. + +The resource was deleted successfully +*/ +type V1UsersAssetsLocationDeleteNoContent struct { +} + +func (o *V1UsersAssetsLocationDeleteNoContent) Error() string { + return fmt.Sprintf("[DELETE /v1/users/assets/locations/{uid}][%d] v1UsersAssetsLocationDeleteNoContent ", 204) +} + +func (o *V1UsersAssetsLocationDeleteNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_users_assets_location_gcp_create_parameters.go b/api/client/v1/v1_users_assets_location_gcp_create_parameters.go new file mode 100644 index 00000000..53ece238 --- /dev/null +++ b/api/client/v1/v1_users_assets_location_gcp_create_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1UsersAssetsLocationGcpCreateParams creates a new V1UsersAssetsLocationGcpCreateParams object +// with the default values initialized. +func NewV1UsersAssetsLocationGcpCreateParams() *V1UsersAssetsLocationGcpCreateParams { + var () + return &V1UsersAssetsLocationGcpCreateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1UsersAssetsLocationGcpCreateParamsWithTimeout creates a new V1UsersAssetsLocationGcpCreateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1UsersAssetsLocationGcpCreateParamsWithTimeout(timeout time.Duration) *V1UsersAssetsLocationGcpCreateParams { + var () + return &V1UsersAssetsLocationGcpCreateParams{ + + timeout: timeout, + } +} + +// NewV1UsersAssetsLocationGcpCreateParamsWithContext creates a new V1UsersAssetsLocationGcpCreateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1UsersAssetsLocationGcpCreateParamsWithContext(ctx context.Context) *V1UsersAssetsLocationGcpCreateParams { + var () + return &V1UsersAssetsLocationGcpCreateParams{ + + Context: ctx, + } +} + +// NewV1UsersAssetsLocationGcpCreateParamsWithHTTPClient creates a new V1UsersAssetsLocationGcpCreateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1UsersAssetsLocationGcpCreateParamsWithHTTPClient(client *http.Client) *V1UsersAssetsLocationGcpCreateParams { + var () + return &V1UsersAssetsLocationGcpCreateParams{ + HTTPClient: client, + } +} + +/* +V1UsersAssetsLocationGcpCreateParams contains all the parameters to send to the API endpoint +for the v1 users assets location gcp create operation typically these are written to a http.Request +*/ +type V1UsersAssetsLocationGcpCreateParams struct { + + /*Body*/ + Body *models.V1UserAssetsLocationGcp + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 users assets location gcp create params +func (o *V1UsersAssetsLocationGcpCreateParams) WithTimeout(timeout time.Duration) *V1UsersAssetsLocationGcpCreateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 users assets location gcp create params +func (o *V1UsersAssetsLocationGcpCreateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 users assets location gcp create params +func (o *V1UsersAssetsLocationGcpCreateParams) WithContext(ctx context.Context) *V1UsersAssetsLocationGcpCreateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 users assets location gcp create params +func (o *V1UsersAssetsLocationGcpCreateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 users assets location gcp create params +func (o *V1UsersAssetsLocationGcpCreateParams) WithHTTPClient(client *http.Client) *V1UsersAssetsLocationGcpCreateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 users assets location gcp create params +func (o *V1UsersAssetsLocationGcpCreateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 users assets location gcp create params +func (o *V1UsersAssetsLocationGcpCreateParams) WithBody(body *models.V1UserAssetsLocationGcp) *V1UsersAssetsLocationGcpCreateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 users assets location gcp create params +func (o *V1UsersAssetsLocationGcpCreateParams) SetBody(body *models.V1UserAssetsLocationGcp) { + o.Body = body +} + +// WriteToRequest writes these params to a swagger request +func (o *V1UsersAssetsLocationGcpCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_users_assets_location_gcp_create_responses.go b/api/client/v1/v1_users_assets_location_gcp_create_responses.go new file mode 100644 index 00000000..adba9c4a --- /dev/null +++ b/api/client/v1/v1_users_assets_location_gcp_create_responses.go @@ -0,0 +1,77 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1UsersAssetsLocationGcpCreateReader is a Reader for the V1UsersAssetsLocationGcpCreate structure. +type V1UsersAssetsLocationGcpCreateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1UsersAssetsLocationGcpCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 201: + result := NewV1UsersAssetsLocationGcpCreateCreated() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1UsersAssetsLocationGcpCreateCreated creates a V1UsersAssetsLocationGcpCreateCreated with default headers values +func NewV1UsersAssetsLocationGcpCreateCreated() *V1UsersAssetsLocationGcpCreateCreated { + return &V1UsersAssetsLocationGcpCreateCreated{} +} + +/* +V1UsersAssetsLocationGcpCreateCreated handles this case with default header values. + +Created successfully +*/ +type V1UsersAssetsLocationGcpCreateCreated struct { + /*Audit uid for the request + */ + AuditUID string + + Payload *models.V1UID +} + +func (o *V1UsersAssetsLocationGcpCreateCreated) Error() string { + return fmt.Sprintf("[POST /v1/users/assets/locations/gcp][%d] v1UsersAssetsLocationGcpCreateCreated %+v", 201, o.Payload) +} + +func (o *V1UsersAssetsLocationGcpCreateCreated) GetPayload() *models.V1UID { + return o.Payload +} + +func (o *V1UsersAssetsLocationGcpCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header AuditUid + o.AuditUID = response.GetHeader("AuditUid") + + o.Payload = new(models.V1UID) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_users_assets_location_gcp_get_parameters.go b/api/client/v1/v1_users_assets_location_gcp_get_parameters.go new file mode 100644 index 00000000..848cc2bf --- /dev/null +++ b/api/client/v1/v1_users_assets_location_gcp_get_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1UsersAssetsLocationGcpGetParams creates a new V1UsersAssetsLocationGcpGetParams object +// with the default values initialized. +func NewV1UsersAssetsLocationGcpGetParams() *V1UsersAssetsLocationGcpGetParams { + var () + return &V1UsersAssetsLocationGcpGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1UsersAssetsLocationGcpGetParamsWithTimeout creates a new V1UsersAssetsLocationGcpGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1UsersAssetsLocationGcpGetParamsWithTimeout(timeout time.Duration) *V1UsersAssetsLocationGcpGetParams { + var () + return &V1UsersAssetsLocationGcpGetParams{ + + timeout: timeout, + } +} + +// NewV1UsersAssetsLocationGcpGetParamsWithContext creates a new V1UsersAssetsLocationGcpGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1UsersAssetsLocationGcpGetParamsWithContext(ctx context.Context) *V1UsersAssetsLocationGcpGetParams { + var () + return &V1UsersAssetsLocationGcpGetParams{ + + Context: ctx, + } +} + +// NewV1UsersAssetsLocationGcpGetParamsWithHTTPClient creates a new V1UsersAssetsLocationGcpGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1UsersAssetsLocationGcpGetParamsWithHTTPClient(client *http.Client) *V1UsersAssetsLocationGcpGetParams { + var () + return &V1UsersAssetsLocationGcpGetParams{ + HTTPClient: client, + } +} + +/* +V1UsersAssetsLocationGcpGetParams contains all the parameters to send to the API endpoint +for the v1 users assets location gcp get operation typically these are written to a http.Request +*/ +type V1UsersAssetsLocationGcpGetParams struct { + + /*UID + Specify the GCP location uid + + */ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 users assets location gcp get params +func (o *V1UsersAssetsLocationGcpGetParams) WithTimeout(timeout time.Duration) *V1UsersAssetsLocationGcpGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 users assets location gcp get params +func (o *V1UsersAssetsLocationGcpGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 users assets location gcp get params +func (o *V1UsersAssetsLocationGcpGetParams) WithContext(ctx context.Context) *V1UsersAssetsLocationGcpGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 users assets location gcp get params +func (o *V1UsersAssetsLocationGcpGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 users assets location gcp get params +func (o *V1UsersAssetsLocationGcpGetParams) WithHTTPClient(client *http.Client) *V1UsersAssetsLocationGcpGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 users assets location gcp get params +func (o *V1UsersAssetsLocationGcpGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithUID adds the uid to the v1 users assets location gcp get params +func (o *V1UsersAssetsLocationGcpGetParams) WithUID(uid string) *V1UsersAssetsLocationGcpGetParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 users assets location gcp get params +func (o *V1UsersAssetsLocationGcpGetParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1UsersAssetsLocationGcpGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_users_assets_location_gcp_get_responses.go b/api/client/v1/v1_users_assets_location_gcp_get_responses.go new file mode 100644 index 00000000..24f8964d --- /dev/null +++ b/api/client/v1/v1_users_assets_location_gcp_get_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1UsersAssetsLocationGcpGetReader is a Reader for the V1UsersAssetsLocationGcpGet structure. +type V1UsersAssetsLocationGcpGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1UsersAssetsLocationGcpGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1UsersAssetsLocationGcpGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1UsersAssetsLocationGcpGetOK creates a V1UsersAssetsLocationGcpGetOK with default headers values +func NewV1UsersAssetsLocationGcpGetOK() *V1UsersAssetsLocationGcpGetOK { + return &V1UsersAssetsLocationGcpGetOK{} +} + +/* +V1UsersAssetsLocationGcpGetOK handles this case with default header values. + +(empty) +*/ +type V1UsersAssetsLocationGcpGetOK struct { + Payload *models.V1UserAssetsLocationGcp +} + +func (o *V1UsersAssetsLocationGcpGetOK) Error() string { + return fmt.Sprintf("[GET /v1/users/assets/locations/gcp/{uid}][%d] v1UsersAssetsLocationGcpGetOK %+v", 200, o.Payload) +} + +func (o *V1UsersAssetsLocationGcpGetOK) GetPayload() *models.V1UserAssetsLocationGcp { + return o.Payload +} + +func (o *V1UsersAssetsLocationGcpGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1UserAssetsLocationGcp) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_users_assets_location_gcp_update_parameters.go b/api/client/v1/v1_users_assets_location_gcp_update_parameters.go new file mode 100644 index 00000000..9ee3e3b1 --- /dev/null +++ b/api/client/v1/v1_users_assets_location_gcp_update_parameters.go @@ -0,0 +1,157 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1UsersAssetsLocationGcpUpdateParams creates a new V1UsersAssetsLocationGcpUpdateParams object +// with the default values initialized. +func NewV1UsersAssetsLocationGcpUpdateParams() *V1UsersAssetsLocationGcpUpdateParams { + var () + return &V1UsersAssetsLocationGcpUpdateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1UsersAssetsLocationGcpUpdateParamsWithTimeout creates a new V1UsersAssetsLocationGcpUpdateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1UsersAssetsLocationGcpUpdateParamsWithTimeout(timeout time.Duration) *V1UsersAssetsLocationGcpUpdateParams { + var () + return &V1UsersAssetsLocationGcpUpdateParams{ + + timeout: timeout, + } +} + +// NewV1UsersAssetsLocationGcpUpdateParamsWithContext creates a new V1UsersAssetsLocationGcpUpdateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1UsersAssetsLocationGcpUpdateParamsWithContext(ctx context.Context) *V1UsersAssetsLocationGcpUpdateParams { + var () + return &V1UsersAssetsLocationGcpUpdateParams{ + + Context: ctx, + } +} + +// NewV1UsersAssetsLocationGcpUpdateParamsWithHTTPClient creates a new V1UsersAssetsLocationGcpUpdateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1UsersAssetsLocationGcpUpdateParamsWithHTTPClient(client *http.Client) *V1UsersAssetsLocationGcpUpdateParams { + var () + return &V1UsersAssetsLocationGcpUpdateParams{ + HTTPClient: client, + } +} + +/* +V1UsersAssetsLocationGcpUpdateParams contains all the parameters to send to the API endpoint +for the v1 users assets location gcp update operation typically these are written to a http.Request +*/ +type V1UsersAssetsLocationGcpUpdateParams struct { + + /*Body*/ + Body *models.V1UserAssetsLocationGcp + /*UID + Specify the GCP location uid + + */ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 users assets location gcp update params +func (o *V1UsersAssetsLocationGcpUpdateParams) WithTimeout(timeout time.Duration) *V1UsersAssetsLocationGcpUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 users assets location gcp update params +func (o *V1UsersAssetsLocationGcpUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 users assets location gcp update params +func (o *V1UsersAssetsLocationGcpUpdateParams) WithContext(ctx context.Context) *V1UsersAssetsLocationGcpUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 users assets location gcp update params +func (o *V1UsersAssetsLocationGcpUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 users assets location gcp update params +func (o *V1UsersAssetsLocationGcpUpdateParams) WithHTTPClient(client *http.Client) *V1UsersAssetsLocationGcpUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 users assets location gcp update params +func (o *V1UsersAssetsLocationGcpUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 users assets location gcp update params +func (o *V1UsersAssetsLocationGcpUpdateParams) WithBody(body *models.V1UserAssetsLocationGcp) *V1UsersAssetsLocationGcpUpdateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 users assets location gcp update params +func (o *V1UsersAssetsLocationGcpUpdateParams) SetBody(body *models.V1UserAssetsLocationGcp) { + o.Body = body +} + +// WithUID adds the uid to the v1 users assets location gcp update params +func (o *V1UsersAssetsLocationGcpUpdateParams) WithUID(uid string) *V1UsersAssetsLocationGcpUpdateParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 users assets location gcp update params +func (o *V1UsersAssetsLocationGcpUpdateParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1UsersAssetsLocationGcpUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_users_assets_location_gcp_update_responses.go b/api/client/v1/v1_users_assets_location_gcp_update_responses.go new file mode 100644 index 00000000..e99af0e1 --- /dev/null +++ b/api/client/v1/v1_users_assets_location_gcp_update_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1UsersAssetsLocationGcpUpdateReader is a Reader for the V1UsersAssetsLocationGcpUpdate structure. +type V1UsersAssetsLocationGcpUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1UsersAssetsLocationGcpUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1UsersAssetsLocationGcpUpdateNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1UsersAssetsLocationGcpUpdateNoContent creates a V1UsersAssetsLocationGcpUpdateNoContent with default headers values +func NewV1UsersAssetsLocationGcpUpdateNoContent() *V1UsersAssetsLocationGcpUpdateNoContent { + return &V1UsersAssetsLocationGcpUpdateNoContent{} +} + +/* +V1UsersAssetsLocationGcpUpdateNoContent handles this case with default header values. + +The resource was updated successfully +*/ +type V1UsersAssetsLocationGcpUpdateNoContent struct { +} + +func (o *V1UsersAssetsLocationGcpUpdateNoContent) Error() string { + return fmt.Sprintf("[PUT /v1/users/assets/locations/gcp/{uid}][%d] v1UsersAssetsLocationGcpUpdateNoContent ", 204) +} + +func (o *V1UsersAssetsLocationGcpUpdateNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_users_assets_location_get_parameters.go b/api/client/v1/v1_users_assets_location_get_parameters.go new file mode 100644 index 00000000..910912cc --- /dev/null +++ b/api/client/v1/v1_users_assets_location_get_parameters.go @@ -0,0 +1,181 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1UsersAssetsLocationGetParams creates a new V1UsersAssetsLocationGetParams object +// with the default values initialized. +func NewV1UsersAssetsLocationGetParams() *V1UsersAssetsLocationGetParams { + var () + return &V1UsersAssetsLocationGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1UsersAssetsLocationGetParamsWithTimeout creates a new V1UsersAssetsLocationGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1UsersAssetsLocationGetParamsWithTimeout(timeout time.Duration) *V1UsersAssetsLocationGetParams { + var () + return &V1UsersAssetsLocationGetParams{ + + timeout: timeout, + } +} + +// NewV1UsersAssetsLocationGetParamsWithContext creates a new V1UsersAssetsLocationGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1UsersAssetsLocationGetParamsWithContext(ctx context.Context) *V1UsersAssetsLocationGetParams { + var () + return &V1UsersAssetsLocationGetParams{ + + Context: ctx, + } +} + +// NewV1UsersAssetsLocationGetParamsWithHTTPClient creates a new V1UsersAssetsLocationGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1UsersAssetsLocationGetParamsWithHTTPClient(client *http.Client) *V1UsersAssetsLocationGetParams { + var () + return &V1UsersAssetsLocationGetParams{ + HTTPClient: client, + } +} + +/* +V1UsersAssetsLocationGetParams contains all the parameters to send to the API endpoint +for the v1 users assets location get operation typically these are written to a http.Request +*/ +type V1UsersAssetsLocationGetParams struct { + + /*Filters + Filters can be combined with AND, OR operators with field path name. Eg: metadata.name=TestServiceANDspec.cloudType=aws + + Server will be restricted to certain fields based on the indexed data for each resource. + + */ + Filters *string + /*OrderBy + Specify the fields with sort order. 1 indicates ascending and -1 for descending. Eg: orderBy=metadata.name=1,metadata.uid=-1 + + */ + OrderBy *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 users assets location get params +func (o *V1UsersAssetsLocationGetParams) WithTimeout(timeout time.Duration) *V1UsersAssetsLocationGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 users assets location get params +func (o *V1UsersAssetsLocationGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 users assets location get params +func (o *V1UsersAssetsLocationGetParams) WithContext(ctx context.Context) *V1UsersAssetsLocationGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 users assets location get params +func (o *V1UsersAssetsLocationGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 users assets location get params +func (o *V1UsersAssetsLocationGetParams) WithHTTPClient(client *http.Client) *V1UsersAssetsLocationGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 users assets location get params +func (o *V1UsersAssetsLocationGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithFilters adds the filters to the v1 users assets location get params +func (o *V1UsersAssetsLocationGetParams) WithFilters(filters *string) *V1UsersAssetsLocationGetParams { + o.SetFilters(filters) + return o +} + +// SetFilters adds the filters to the v1 users assets location get params +func (o *V1UsersAssetsLocationGetParams) SetFilters(filters *string) { + o.Filters = filters +} + +// WithOrderBy adds the orderBy to the v1 users assets location get params +func (o *V1UsersAssetsLocationGetParams) WithOrderBy(orderBy *string) *V1UsersAssetsLocationGetParams { + o.SetOrderBy(orderBy) + return o +} + +// SetOrderBy adds the orderBy to the v1 users assets location get params +func (o *V1UsersAssetsLocationGetParams) SetOrderBy(orderBy *string) { + o.OrderBy = orderBy +} + +// WriteToRequest writes these params to a swagger request +func (o *V1UsersAssetsLocationGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Filters != nil { + + // query param filters + var qrFilters string + if o.Filters != nil { + qrFilters = *o.Filters + } + qFilters := qrFilters + if qFilters != "" { + if err := r.SetQueryParam("filters", qFilters); err != nil { + return err + } + } + + } + + if o.OrderBy != nil { + + // query param orderBy + var qrOrderBy string + if o.OrderBy != nil { + qrOrderBy = *o.OrderBy + } + qOrderBy := qrOrderBy + if qOrderBy != "" { + if err := r.SetQueryParam("orderBy", qOrderBy); err != nil { + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_users_assets_location_get_responses.go b/api/client/v1/v1_users_assets_location_get_responses.go new file mode 100644 index 00000000..a04ad299 --- /dev/null +++ b/api/client/v1/v1_users_assets_location_get_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1UsersAssetsLocationGetReader is a Reader for the V1UsersAssetsLocationGet structure. +type V1UsersAssetsLocationGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1UsersAssetsLocationGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1UsersAssetsLocationGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1UsersAssetsLocationGetOK creates a V1UsersAssetsLocationGetOK with default headers values +func NewV1UsersAssetsLocationGetOK() *V1UsersAssetsLocationGetOK { + return &V1UsersAssetsLocationGetOK{} +} + +/* +V1UsersAssetsLocationGetOK handles this case with default header values. + +OK +*/ +type V1UsersAssetsLocationGetOK struct { + Payload *models.V1UserAssetsLocations +} + +func (o *V1UsersAssetsLocationGetOK) Error() string { + return fmt.Sprintf("[GET /v1/users/assets/locations][%d] v1UsersAssetsLocationGetOK %+v", 200, o.Payload) +} + +func (o *V1UsersAssetsLocationGetOK) GetPayload() *models.V1UserAssetsLocations { + return o.Payload +} + +func (o *V1UsersAssetsLocationGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1UserAssetsLocations) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_users_assets_location_minio_create_parameters.go b/api/client/v1/v1_users_assets_location_minio_create_parameters.go new file mode 100644 index 00000000..65c8e1cc --- /dev/null +++ b/api/client/v1/v1_users_assets_location_minio_create_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1UsersAssetsLocationMinioCreateParams creates a new V1UsersAssetsLocationMinioCreateParams object +// with the default values initialized. +func NewV1UsersAssetsLocationMinioCreateParams() *V1UsersAssetsLocationMinioCreateParams { + var () + return &V1UsersAssetsLocationMinioCreateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1UsersAssetsLocationMinioCreateParamsWithTimeout creates a new V1UsersAssetsLocationMinioCreateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1UsersAssetsLocationMinioCreateParamsWithTimeout(timeout time.Duration) *V1UsersAssetsLocationMinioCreateParams { + var () + return &V1UsersAssetsLocationMinioCreateParams{ + + timeout: timeout, + } +} + +// NewV1UsersAssetsLocationMinioCreateParamsWithContext creates a new V1UsersAssetsLocationMinioCreateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1UsersAssetsLocationMinioCreateParamsWithContext(ctx context.Context) *V1UsersAssetsLocationMinioCreateParams { + var () + return &V1UsersAssetsLocationMinioCreateParams{ + + Context: ctx, + } +} + +// NewV1UsersAssetsLocationMinioCreateParamsWithHTTPClient creates a new V1UsersAssetsLocationMinioCreateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1UsersAssetsLocationMinioCreateParamsWithHTTPClient(client *http.Client) *V1UsersAssetsLocationMinioCreateParams { + var () + return &V1UsersAssetsLocationMinioCreateParams{ + HTTPClient: client, + } +} + +/* +V1UsersAssetsLocationMinioCreateParams contains all the parameters to send to the API endpoint +for the v1 users assets location minio create operation typically these are written to a http.Request +*/ +type V1UsersAssetsLocationMinioCreateParams struct { + + /*Body*/ + Body *models.V1UserAssetsLocationS3 + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 users assets location minio create params +func (o *V1UsersAssetsLocationMinioCreateParams) WithTimeout(timeout time.Duration) *V1UsersAssetsLocationMinioCreateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 users assets location minio create params +func (o *V1UsersAssetsLocationMinioCreateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 users assets location minio create params +func (o *V1UsersAssetsLocationMinioCreateParams) WithContext(ctx context.Context) *V1UsersAssetsLocationMinioCreateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 users assets location minio create params +func (o *V1UsersAssetsLocationMinioCreateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 users assets location minio create params +func (o *V1UsersAssetsLocationMinioCreateParams) WithHTTPClient(client *http.Client) *V1UsersAssetsLocationMinioCreateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 users assets location minio create params +func (o *V1UsersAssetsLocationMinioCreateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 users assets location minio create params +func (o *V1UsersAssetsLocationMinioCreateParams) WithBody(body *models.V1UserAssetsLocationS3) *V1UsersAssetsLocationMinioCreateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 users assets location minio create params +func (o *V1UsersAssetsLocationMinioCreateParams) SetBody(body *models.V1UserAssetsLocationS3) { + o.Body = body +} + +// WriteToRequest writes these params to a swagger request +func (o *V1UsersAssetsLocationMinioCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_users_assets_location_minio_create_responses.go b/api/client/v1/v1_users_assets_location_minio_create_responses.go new file mode 100644 index 00000000..be5eaacb --- /dev/null +++ b/api/client/v1/v1_users_assets_location_minio_create_responses.go @@ -0,0 +1,77 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1UsersAssetsLocationMinioCreateReader is a Reader for the V1UsersAssetsLocationMinioCreate structure. +type V1UsersAssetsLocationMinioCreateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1UsersAssetsLocationMinioCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 201: + result := NewV1UsersAssetsLocationMinioCreateCreated() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1UsersAssetsLocationMinioCreateCreated creates a V1UsersAssetsLocationMinioCreateCreated with default headers values +func NewV1UsersAssetsLocationMinioCreateCreated() *V1UsersAssetsLocationMinioCreateCreated { + return &V1UsersAssetsLocationMinioCreateCreated{} +} + +/* +V1UsersAssetsLocationMinioCreateCreated handles this case with default header values. + +Created successfully +*/ +type V1UsersAssetsLocationMinioCreateCreated struct { + /*Audit uid for the request + */ + AuditUID string + + Payload *models.V1UID +} + +func (o *V1UsersAssetsLocationMinioCreateCreated) Error() string { + return fmt.Sprintf("[POST /v1/users/assets/locations/minio][%d] v1UsersAssetsLocationMinioCreateCreated %+v", 201, o.Payload) +} + +func (o *V1UsersAssetsLocationMinioCreateCreated) GetPayload() *models.V1UID { + return o.Payload +} + +func (o *V1UsersAssetsLocationMinioCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header AuditUid + o.AuditUID = response.GetHeader("AuditUid") + + o.Payload = new(models.V1UID) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_users_assets_location_minio_get_parameters.go b/api/client/v1/v1_users_assets_location_minio_get_parameters.go new file mode 100644 index 00000000..246e11d4 --- /dev/null +++ b/api/client/v1/v1_users_assets_location_minio_get_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1UsersAssetsLocationMinioGetParams creates a new V1UsersAssetsLocationMinioGetParams object +// with the default values initialized. +func NewV1UsersAssetsLocationMinioGetParams() *V1UsersAssetsLocationMinioGetParams { + var () + return &V1UsersAssetsLocationMinioGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1UsersAssetsLocationMinioGetParamsWithTimeout creates a new V1UsersAssetsLocationMinioGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1UsersAssetsLocationMinioGetParamsWithTimeout(timeout time.Duration) *V1UsersAssetsLocationMinioGetParams { + var () + return &V1UsersAssetsLocationMinioGetParams{ + + timeout: timeout, + } +} + +// NewV1UsersAssetsLocationMinioGetParamsWithContext creates a new V1UsersAssetsLocationMinioGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1UsersAssetsLocationMinioGetParamsWithContext(ctx context.Context) *V1UsersAssetsLocationMinioGetParams { + var () + return &V1UsersAssetsLocationMinioGetParams{ + + Context: ctx, + } +} + +// NewV1UsersAssetsLocationMinioGetParamsWithHTTPClient creates a new V1UsersAssetsLocationMinioGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1UsersAssetsLocationMinioGetParamsWithHTTPClient(client *http.Client) *V1UsersAssetsLocationMinioGetParams { + var () + return &V1UsersAssetsLocationMinioGetParams{ + HTTPClient: client, + } +} + +/* +V1UsersAssetsLocationMinioGetParams contains all the parameters to send to the API endpoint +for the v1 users assets location minio get operation typically these are written to a http.Request +*/ +type V1UsersAssetsLocationMinioGetParams struct { + + /*UID + Specify the MinIO location uid + + */ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 users assets location minio get params +func (o *V1UsersAssetsLocationMinioGetParams) WithTimeout(timeout time.Duration) *V1UsersAssetsLocationMinioGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 users assets location minio get params +func (o *V1UsersAssetsLocationMinioGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 users assets location minio get params +func (o *V1UsersAssetsLocationMinioGetParams) WithContext(ctx context.Context) *V1UsersAssetsLocationMinioGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 users assets location minio get params +func (o *V1UsersAssetsLocationMinioGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 users assets location minio get params +func (o *V1UsersAssetsLocationMinioGetParams) WithHTTPClient(client *http.Client) *V1UsersAssetsLocationMinioGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 users assets location minio get params +func (o *V1UsersAssetsLocationMinioGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithUID adds the uid to the v1 users assets location minio get params +func (o *V1UsersAssetsLocationMinioGetParams) WithUID(uid string) *V1UsersAssetsLocationMinioGetParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 users assets location minio get params +func (o *V1UsersAssetsLocationMinioGetParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1UsersAssetsLocationMinioGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_users_assets_location_minio_get_responses.go b/api/client/v1/v1_users_assets_location_minio_get_responses.go new file mode 100644 index 00000000..d9fab6a6 --- /dev/null +++ b/api/client/v1/v1_users_assets_location_minio_get_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1UsersAssetsLocationMinioGetReader is a Reader for the V1UsersAssetsLocationMinioGet structure. +type V1UsersAssetsLocationMinioGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1UsersAssetsLocationMinioGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1UsersAssetsLocationMinioGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1UsersAssetsLocationMinioGetOK creates a V1UsersAssetsLocationMinioGetOK with default headers values +func NewV1UsersAssetsLocationMinioGetOK() *V1UsersAssetsLocationMinioGetOK { + return &V1UsersAssetsLocationMinioGetOK{} +} + +/* +V1UsersAssetsLocationMinioGetOK handles this case with default header values. + +(empty) +*/ +type V1UsersAssetsLocationMinioGetOK struct { + Payload *models.V1UserAssetsLocationS3 +} + +func (o *V1UsersAssetsLocationMinioGetOK) Error() string { + return fmt.Sprintf("[GET /v1/users/assets/locations/minio/{uid}][%d] v1UsersAssetsLocationMinioGetOK %+v", 200, o.Payload) +} + +func (o *V1UsersAssetsLocationMinioGetOK) GetPayload() *models.V1UserAssetsLocationS3 { + return o.Payload +} + +func (o *V1UsersAssetsLocationMinioGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1UserAssetsLocationS3) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_users_assets_location_minio_update_parameters.go b/api/client/v1/v1_users_assets_location_minio_update_parameters.go new file mode 100644 index 00000000..b335b531 --- /dev/null +++ b/api/client/v1/v1_users_assets_location_minio_update_parameters.go @@ -0,0 +1,157 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1UsersAssetsLocationMinioUpdateParams creates a new V1UsersAssetsLocationMinioUpdateParams object +// with the default values initialized. +func NewV1UsersAssetsLocationMinioUpdateParams() *V1UsersAssetsLocationMinioUpdateParams { + var () + return &V1UsersAssetsLocationMinioUpdateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1UsersAssetsLocationMinioUpdateParamsWithTimeout creates a new V1UsersAssetsLocationMinioUpdateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1UsersAssetsLocationMinioUpdateParamsWithTimeout(timeout time.Duration) *V1UsersAssetsLocationMinioUpdateParams { + var () + return &V1UsersAssetsLocationMinioUpdateParams{ + + timeout: timeout, + } +} + +// NewV1UsersAssetsLocationMinioUpdateParamsWithContext creates a new V1UsersAssetsLocationMinioUpdateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1UsersAssetsLocationMinioUpdateParamsWithContext(ctx context.Context) *V1UsersAssetsLocationMinioUpdateParams { + var () + return &V1UsersAssetsLocationMinioUpdateParams{ + + Context: ctx, + } +} + +// NewV1UsersAssetsLocationMinioUpdateParamsWithHTTPClient creates a new V1UsersAssetsLocationMinioUpdateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1UsersAssetsLocationMinioUpdateParamsWithHTTPClient(client *http.Client) *V1UsersAssetsLocationMinioUpdateParams { + var () + return &V1UsersAssetsLocationMinioUpdateParams{ + HTTPClient: client, + } +} + +/* +V1UsersAssetsLocationMinioUpdateParams contains all the parameters to send to the API endpoint +for the v1 users assets location minio update operation typically these are written to a http.Request +*/ +type V1UsersAssetsLocationMinioUpdateParams struct { + + /*Body*/ + Body *models.V1UserAssetsLocationS3 + /*UID + Specify the MinIO location uid + + */ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 users assets location minio update params +func (o *V1UsersAssetsLocationMinioUpdateParams) WithTimeout(timeout time.Duration) *V1UsersAssetsLocationMinioUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 users assets location minio update params +func (o *V1UsersAssetsLocationMinioUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 users assets location minio update params +func (o *V1UsersAssetsLocationMinioUpdateParams) WithContext(ctx context.Context) *V1UsersAssetsLocationMinioUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 users assets location minio update params +func (o *V1UsersAssetsLocationMinioUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 users assets location minio update params +func (o *V1UsersAssetsLocationMinioUpdateParams) WithHTTPClient(client *http.Client) *V1UsersAssetsLocationMinioUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 users assets location minio update params +func (o *V1UsersAssetsLocationMinioUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 users assets location minio update params +func (o *V1UsersAssetsLocationMinioUpdateParams) WithBody(body *models.V1UserAssetsLocationS3) *V1UsersAssetsLocationMinioUpdateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 users assets location minio update params +func (o *V1UsersAssetsLocationMinioUpdateParams) SetBody(body *models.V1UserAssetsLocationS3) { + o.Body = body +} + +// WithUID adds the uid to the v1 users assets location minio update params +func (o *V1UsersAssetsLocationMinioUpdateParams) WithUID(uid string) *V1UsersAssetsLocationMinioUpdateParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 users assets location minio update params +func (o *V1UsersAssetsLocationMinioUpdateParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1UsersAssetsLocationMinioUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_users_assets_location_minio_update_responses.go b/api/client/v1/v1_users_assets_location_minio_update_responses.go new file mode 100644 index 00000000..e9395a0f --- /dev/null +++ b/api/client/v1/v1_users_assets_location_minio_update_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1UsersAssetsLocationMinioUpdateReader is a Reader for the V1UsersAssetsLocationMinioUpdate structure. +type V1UsersAssetsLocationMinioUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1UsersAssetsLocationMinioUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1UsersAssetsLocationMinioUpdateNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1UsersAssetsLocationMinioUpdateNoContent creates a V1UsersAssetsLocationMinioUpdateNoContent with default headers values +func NewV1UsersAssetsLocationMinioUpdateNoContent() *V1UsersAssetsLocationMinioUpdateNoContent { + return &V1UsersAssetsLocationMinioUpdateNoContent{} +} + +/* +V1UsersAssetsLocationMinioUpdateNoContent handles this case with default header values. + +The resource was updated successfully +*/ +type V1UsersAssetsLocationMinioUpdateNoContent struct { +} + +func (o *V1UsersAssetsLocationMinioUpdateNoContent) Error() string { + return fmt.Sprintf("[PUT /v1/users/assets/locations/minio/{uid}][%d] v1UsersAssetsLocationMinioUpdateNoContent ", 204) +} + +func (o *V1UsersAssetsLocationMinioUpdateNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_users_assets_location_s3_create_parameters.go b/api/client/v1/v1_users_assets_location_s3_create_parameters.go new file mode 100644 index 00000000..8496b985 --- /dev/null +++ b/api/client/v1/v1_users_assets_location_s3_create_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1UsersAssetsLocationS3CreateParams creates a new V1UsersAssetsLocationS3CreateParams object +// with the default values initialized. +func NewV1UsersAssetsLocationS3CreateParams() *V1UsersAssetsLocationS3CreateParams { + var () + return &V1UsersAssetsLocationS3CreateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1UsersAssetsLocationS3CreateParamsWithTimeout creates a new V1UsersAssetsLocationS3CreateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1UsersAssetsLocationS3CreateParamsWithTimeout(timeout time.Duration) *V1UsersAssetsLocationS3CreateParams { + var () + return &V1UsersAssetsLocationS3CreateParams{ + + timeout: timeout, + } +} + +// NewV1UsersAssetsLocationS3CreateParamsWithContext creates a new V1UsersAssetsLocationS3CreateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1UsersAssetsLocationS3CreateParamsWithContext(ctx context.Context) *V1UsersAssetsLocationS3CreateParams { + var () + return &V1UsersAssetsLocationS3CreateParams{ + + Context: ctx, + } +} + +// NewV1UsersAssetsLocationS3CreateParamsWithHTTPClient creates a new V1UsersAssetsLocationS3CreateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1UsersAssetsLocationS3CreateParamsWithHTTPClient(client *http.Client) *V1UsersAssetsLocationS3CreateParams { + var () + return &V1UsersAssetsLocationS3CreateParams{ + HTTPClient: client, + } +} + +/* +V1UsersAssetsLocationS3CreateParams contains all the parameters to send to the API endpoint +for the v1 users assets location s3 create operation typically these are written to a http.Request +*/ +type V1UsersAssetsLocationS3CreateParams struct { + + /*Body*/ + Body *models.V1UserAssetsLocationS3 + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 users assets location s3 create params +func (o *V1UsersAssetsLocationS3CreateParams) WithTimeout(timeout time.Duration) *V1UsersAssetsLocationS3CreateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 users assets location s3 create params +func (o *V1UsersAssetsLocationS3CreateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 users assets location s3 create params +func (o *V1UsersAssetsLocationS3CreateParams) WithContext(ctx context.Context) *V1UsersAssetsLocationS3CreateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 users assets location s3 create params +func (o *V1UsersAssetsLocationS3CreateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 users assets location s3 create params +func (o *V1UsersAssetsLocationS3CreateParams) WithHTTPClient(client *http.Client) *V1UsersAssetsLocationS3CreateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 users assets location s3 create params +func (o *V1UsersAssetsLocationS3CreateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 users assets location s3 create params +func (o *V1UsersAssetsLocationS3CreateParams) WithBody(body *models.V1UserAssetsLocationS3) *V1UsersAssetsLocationS3CreateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 users assets location s3 create params +func (o *V1UsersAssetsLocationS3CreateParams) SetBody(body *models.V1UserAssetsLocationS3) { + o.Body = body +} + +// WriteToRequest writes these params to a swagger request +func (o *V1UsersAssetsLocationS3CreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_users_assets_location_s3_create_responses.go b/api/client/v1/v1_users_assets_location_s3_create_responses.go new file mode 100644 index 00000000..9b11a300 --- /dev/null +++ b/api/client/v1/v1_users_assets_location_s3_create_responses.go @@ -0,0 +1,77 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1UsersAssetsLocationS3CreateReader is a Reader for the V1UsersAssetsLocationS3Create structure. +type V1UsersAssetsLocationS3CreateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1UsersAssetsLocationS3CreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 201: + result := NewV1UsersAssetsLocationS3CreateCreated() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1UsersAssetsLocationS3CreateCreated creates a V1UsersAssetsLocationS3CreateCreated with default headers values +func NewV1UsersAssetsLocationS3CreateCreated() *V1UsersAssetsLocationS3CreateCreated { + return &V1UsersAssetsLocationS3CreateCreated{} +} + +/* +V1UsersAssetsLocationS3CreateCreated handles this case with default header values. + +Created successfully +*/ +type V1UsersAssetsLocationS3CreateCreated struct { + /*Audit uid for the request + */ + AuditUID string + + Payload *models.V1UID +} + +func (o *V1UsersAssetsLocationS3CreateCreated) Error() string { + return fmt.Sprintf("[POST /v1/users/assets/locations/s3][%d] v1UsersAssetsLocationS3CreateCreated %+v", 201, o.Payload) +} + +func (o *V1UsersAssetsLocationS3CreateCreated) GetPayload() *models.V1UID { + return o.Payload +} + +func (o *V1UsersAssetsLocationS3CreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header AuditUid + o.AuditUID = response.GetHeader("AuditUid") + + o.Payload = new(models.V1UID) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_users_assets_location_s3_delete_parameters.go b/api/client/v1/v1_users_assets_location_s3_delete_parameters.go new file mode 100644 index 00000000..d4c3fef2 --- /dev/null +++ b/api/client/v1/v1_users_assets_location_s3_delete_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1UsersAssetsLocationS3DeleteParams creates a new V1UsersAssetsLocationS3DeleteParams object +// with the default values initialized. +func NewV1UsersAssetsLocationS3DeleteParams() *V1UsersAssetsLocationS3DeleteParams { + var () + return &V1UsersAssetsLocationS3DeleteParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1UsersAssetsLocationS3DeleteParamsWithTimeout creates a new V1UsersAssetsLocationS3DeleteParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1UsersAssetsLocationS3DeleteParamsWithTimeout(timeout time.Duration) *V1UsersAssetsLocationS3DeleteParams { + var () + return &V1UsersAssetsLocationS3DeleteParams{ + + timeout: timeout, + } +} + +// NewV1UsersAssetsLocationS3DeleteParamsWithContext creates a new V1UsersAssetsLocationS3DeleteParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1UsersAssetsLocationS3DeleteParamsWithContext(ctx context.Context) *V1UsersAssetsLocationS3DeleteParams { + var () + return &V1UsersAssetsLocationS3DeleteParams{ + + Context: ctx, + } +} + +// NewV1UsersAssetsLocationS3DeleteParamsWithHTTPClient creates a new V1UsersAssetsLocationS3DeleteParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1UsersAssetsLocationS3DeleteParamsWithHTTPClient(client *http.Client) *V1UsersAssetsLocationS3DeleteParams { + var () + return &V1UsersAssetsLocationS3DeleteParams{ + HTTPClient: client, + } +} + +/* +V1UsersAssetsLocationS3DeleteParams contains all the parameters to send to the API endpoint +for the v1 users assets location s3 delete operation typically these are written to a http.Request +*/ +type V1UsersAssetsLocationS3DeleteParams struct { + + /*UID + Specify the S3 location uid + + */ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 users assets location s3 delete params +func (o *V1UsersAssetsLocationS3DeleteParams) WithTimeout(timeout time.Duration) *V1UsersAssetsLocationS3DeleteParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 users assets location s3 delete params +func (o *V1UsersAssetsLocationS3DeleteParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 users assets location s3 delete params +func (o *V1UsersAssetsLocationS3DeleteParams) WithContext(ctx context.Context) *V1UsersAssetsLocationS3DeleteParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 users assets location s3 delete params +func (o *V1UsersAssetsLocationS3DeleteParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 users assets location s3 delete params +func (o *V1UsersAssetsLocationS3DeleteParams) WithHTTPClient(client *http.Client) *V1UsersAssetsLocationS3DeleteParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 users assets location s3 delete params +func (o *V1UsersAssetsLocationS3DeleteParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithUID adds the uid to the v1 users assets location s3 delete params +func (o *V1UsersAssetsLocationS3DeleteParams) WithUID(uid string) *V1UsersAssetsLocationS3DeleteParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 users assets location s3 delete params +func (o *V1UsersAssetsLocationS3DeleteParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1UsersAssetsLocationS3DeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_users_assets_location_s3_delete_responses.go b/api/client/v1/v1_users_assets_location_s3_delete_responses.go new file mode 100644 index 00000000..43caffdf --- /dev/null +++ b/api/client/v1/v1_users_assets_location_s3_delete_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1UsersAssetsLocationS3DeleteReader is a Reader for the V1UsersAssetsLocationS3Delete structure. +type V1UsersAssetsLocationS3DeleteReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1UsersAssetsLocationS3DeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1UsersAssetsLocationS3DeleteNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1UsersAssetsLocationS3DeleteNoContent creates a V1UsersAssetsLocationS3DeleteNoContent with default headers values +func NewV1UsersAssetsLocationS3DeleteNoContent() *V1UsersAssetsLocationS3DeleteNoContent { + return &V1UsersAssetsLocationS3DeleteNoContent{} +} + +/* +V1UsersAssetsLocationS3DeleteNoContent handles this case with default header values. + +The resource was deleted successfully +*/ +type V1UsersAssetsLocationS3DeleteNoContent struct { +} + +func (o *V1UsersAssetsLocationS3DeleteNoContent) Error() string { + return fmt.Sprintf("[DELETE /v1/users/assets/locations/s3/{uid}][%d] v1UsersAssetsLocationS3DeleteNoContent ", 204) +} + +func (o *V1UsersAssetsLocationS3DeleteNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_users_assets_location_s3_get_parameters.go b/api/client/v1/v1_users_assets_location_s3_get_parameters.go new file mode 100644 index 00000000..44f635d3 --- /dev/null +++ b/api/client/v1/v1_users_assets_location_s3_get_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1UsersAssetsLocationS3GetParams creates a new V1UsersAssetsLocationS3GetParams object +// with the default values initialized. +func NewV1UsersAssetsLocationS3GetParams() *V1UsersAssetsLocationS3GetParams { + var () + return &V1UsersAssetsLocationS3GetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1UsersAssetsLocationS3GetParamsWithTimeout creates a new V1UsersAssetsLocationS3GetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1UsersAssetsLocationS3GetParamsWithTimeout(timeout time.Duration) *V1UsersAssetsLocationS3GetParams { + var () + return &V1UsersAssetsLocationS3GetParams{ + + timeout: timeout, + } +} + +// NewV1UsersAssetsLocationS3GetParamsWithContext creates a new V1UsersAssetsLocationS3GetParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1UsersAssetsLocationS3GetParamsWithContext(ctx context.Context) *V1UsersAssetsLocationS3GetParams { + var () + return &V1UsersAssetsLocationS3GetParams{ + + Context: ctx, + } +} + +// NewV1UsersAssetsLocationS3GetParamsWithHTTPClient creates a new V1UsersAssetsLocationS3GetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1UsersAssetsLocationS3GetParamsWithHTTPClient(client *http.Client) *V1UsersAssetsLocationS3GetParams { + var () + return &V1UsersAssetsLocationS3GetParams{ + HTTPClient: client, + } +} + +/* +V1UsersAssetsLocationS3GetParams contains all the parameters to send to the API endpoint +for the v1 users assets location s3 get operation typically these are written to a http.Request +*/ +type V1UsersAssetsLocationS3GetParams struct { + + /*UID + Specify the S3 location uid + + */ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 users assets location s3 get params +func (o *V1UsersAssetsLocationS3GetParams) WithTimeout(timeout time.Duration) *V1UsersAssetsLocationS3GetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 users assets location s3 get params +func (o *V1UsersAssetsLocationS3GetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 users assets location s3 get params +func (o *V1UsersAssetsLocationS3GetParams) WithContext(ctx context.Context) *V1UsersAssetsLocationS3GetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 users assets location s3 get params +func (o *V1UsersAssetsLocationS3GetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 users assets location s3 get params +func (o *V1UsersAssetsLocationS3GetParams) WithHTTPClient(client *http.Client) *V1UsersAssetsLocationS3GetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 users assets location s3 get params +func (o *V1UsersAssetsLocationS3GetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithUID adds the uid to the v1 users assets location s3 get params +func (o *V1UsersAssetsLocationS3GetParams) WithUID(uid string) *V1UsersAssetsLocationS3GetParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 users assets location s3 get params +func (o *V1UsersAssetsLocationS3GetParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1UsersAssetsLocationS3GetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_users_assets_location_s3_get_responses.go b/api/client/v1/v1_users_assets_location_s3_get_responses.go new file mode 100644 index 00000000..24eca076 --- /dev/null +++ b/api/client/v1/v1_users_assets_location_s3_get_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1UsersAssetsLocationS3GetReader is a Reader for the V1UsersAssetsLocationS3Get structure. +type V1UsersAssetsLocationS3GetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1UsersAssetsLocationS3GetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1UsersAssetsLocationS3GetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1UsersAssetsLocationS3GetOK creates a V1UsersAssetsLocationS3GetOK with default headers values +func NewV1UsersAssetsLocationS3GetOK() *V1UsersAssetsLocationS3GetOK { + return &V1UsersAssetsLocationS3GetOK{} +} + +/* +V1UsersAssetsLocationS3GetOK handles this case with default header values. + +(empty) +*/ +type V1UsersAssetsLocationS3GetOK struct { + Payload *models.V1UserAssetsLocationS3 +} + +func (o *V1UsersAssetsLocationS3GetOK) Error() string { + return fmt.Sprintf("[GET /v1/users/assets/locations/s3/{uid}][%d] v1UsersAssetsLocationS3GetOK %+v", 200, o.Payload) +} + +func (o *V1UsersAssetsLocationS3GetOK) GetPayload() *models.V1UserAssetsLocationS3 { + return o.Payload +} + +func (o *V1UsersAssetsLocationS3GetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1UserAssetsLocationS3) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_users_assets_location_s3_update_parameters.go b/api/client/v1/v1_users_assets_location_s3_update_parameters.go new file mode 100644 index 00000000..416d60a7 --- /dev/null +++ b/api/client/v1/v1_users_assets_location_s3_update_parameters.go @@ -0,0 +1,157 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1UsersAssetsLocationS3UpdateParams creates a new V1UsersAssetsLocationS3UpdateParams object +// with the default values initialized. +func NewV1UsersAssetsLocationS3UpdateParams() *V1UsersAssetsLocationS3UpdateParams { + var () + return &V1UsersAssetsLocationS3UpdateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1UsersAssetsLocationS3UpdateParamsWithTimeout creates a new V1UsersAssetsLocationS3UpdateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1UsersAssetsLocationS3UpdateParamsWithTimeout(timeout time.Duration) *V1UsersAssetsLocationS3UpdateParams { + var () + return &V1UsersAssetsLocationS3UpdateParams{ + + timeout: timeout, + } +} + +// NewV1UsersAssetsLocationS3UpdateParamsWithContext creates a new V1UsersAssetsLocationS3UpdateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1UsersAssetsLocationS3UpdateParamsWithContext(ctx context.Context) *V1UsersAssetsLocationS3UpdateParams { + var () + return &V1UsersAssetsLocationS3UpdateParams{ + + Context: ctx, + } +} + +// NewV1UsersAssetsLocationS3UpdateParamsWithHTTPClient creates a new V1UsersAssetsLocationS3UpdateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1UsersAssetsLocationS3UpdateParamsWithHTTPClient(client *http.Client) *V1UsersAssetsLocationS3UpdateParams { + var () + return &V1UsersAssetsLocationS3UpdateParams{ + HTTPClient: client, + } +} + +/* +V1UsersAssetsLocationS3UpdateParams contains all the parameters to send to the API endpoint +for the v1 users assets location s3 update operation typically these are written to a http.Request +*/ +type V1UsersAssetsLocationS3UpdateParams struct { + + /*Body*/ + Body *models.V1UserAssetsLocationS3 + /*UID + Specify the S3 location uid + + */ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 users assets location s3 update params +func (o *V1UsersAssetsLocationS3UpdateParams) WithTimeout(timeout time.Duration) *V1UsersAssetsLocationS3UpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 users assets location s3 update params +func (o *V1UsersAssetsLocationS3UpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 users assets location s3 update params +func (o *V1UsersAssetsLocationS3UpdateParams) WithContext(ctx context.Context) *V1UsersAssetsLocationS3UpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 users assets location s3 update params +func (o *V1UsersAssetsLocationS3UpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 users assets location s3 update params +func (o *V1UsersAssetsLocationS3UpdateParams) WithHTTPClient(client *http.Client) *V1UsersAssetsLocationS3UpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 users assets location s3 update params +func (o *V1UsersAssetsLocationS3UpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 users assets location s3 update params +func (o *V1UsersAssetsLocationS3UpdateParams) WithBody(body *models.V1UserAssetsLocationS3) *V1UsersAssetsLocationS3UpdateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 users assets location s3 update params +func (o *V1UsersAssetsLocationS3UpdateParams) SetBody(body *models.V1UserAssetsLocationS3) { + o.Body = body +} + +// WithUID adds the uid to the v1 users assets location s3 update params +func (o *V1UsersAssetsLocationS3UpdateParams) WithUID(uid string) *V1UsersAssetsLocationS3UpdateParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 users assets location s3 update params +func (o *V1UsersAssetsLocationS3UpdateParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1UsersAssetsLocationS3UpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_users_assets_location_s3_update_responses.go b/api/client/v1/v1_users_assets_location_s3_update_responses.go new file mode 100644 index 00000000..535fcb80 --- /dev/null +++ b/api/client/v1/v1_users_assets_location_s3_update_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1UsersAssetsLocationS3UpdateReader is a Reader for the V1UsersAssetsLocationS3Update structure. +type V1UsersAssetsLocationS3UpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1UsersAssetsLocationS3UpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1UsersAssetsLocationS3UpdateNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1UsersAssetsLocationS3UpdateNoContent creates a V1UsersAssetsLocationS3UpdateNoContent with default headers values +func NewV1UsersAssetsLocationS3UpdateNoContent() *V1UsersAssetsLocationS3UpdateNoContent { + return &V1UsersAssetsLocationS3UpdateNoContent{} +} + +/* +V1UsersAssetsLocationS3UpdateNoContent handles this case with default header values. + +The resource was updated successfully +*/ +type V1UsersAssetsLocationS3UpdateNoContent struct { +} + +func (o *V1UsersAssetsLocationS3UpdateNoContent) Error() string { + return fmt.Sprintf("[PUT /v1/users/assets/locations/s3/{uid}][%d] v1UsersAssetsLocationS3UpdateNoContent ", 204) +} + +func (o *V1UsersAssetsLocationS3UpdateNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_users_assets_ssh_get_parameters.go b/api/client/v1/v1_users_assets_ssh_get_parameters.go new file mode 100644 index 00000000..4156a004 --- /dev/null +++ b/api/client/v1/v1_users_assets_ssh_get_parameters.go @@ -0,0 +1,181 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1UsersAssetsSSHGetParams creates a new V1UsersAssetsSSHGetParams object +// with the default values initialized. +func NewV1UsersAssetsSSHGetParams() *V1UsersAssetsSSHGetParams { + var () + return &V1UsersAssetsSSHGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1UsersAssetsSSHGetParamsWithTimeout creates a new V1UsersAssetsSSHGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1UsersAssetsSSHGetParamsWithTimeout(timeout time.Duration) *V1UsersAssetsSSHGetParams { + var () + return &V1UsersAssetsSSHGetParams{ + + timeout: timeout, + } +} + +// NewV1UsersAssetsSSHGetParamsWithContext creates a new V1UsersAssetsSSHGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1UsersAssetsSSHGetParamsWithContext(ctx context.Context) *V1UsersAssetsSSHGetParams { + var () + return &V1UsersAssetsSSHGetParams{ + + Context: ctx, + } +} + +// NewV1UsersAssetsSSHGetParamsWithHTTPClient creates a new V1UsersAssetsSSHGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1UsersAssetsSSHGetParamsWithHTTPClient(client *http.Client) *V1UsersAssetsSSHGetParams { + var () + return &V1UsersAssetsSSHGetParams{ + HTTPClient: client, + } +} + +/* +V1UsersAssetsSSHGetParams contains all the parameters to send to the API endpoint +for the v1 users assets Ssh get operation typically these are written to a http.Request +*/ +type V1UsersAssetsSSHGetParams struct { + + /*Filters + Filters can be combined with AND, OR operators with field path name. Eg: metadata.name=TestServiceANDspec.cloudType=aws + + Server will be restricted to certain fields based on the indexed data for each resource. + + */ + Filters *string + /*OrderBy + Specify the fields with sort order. 1 indicates ascending and -1 for descending. Eg: orderBy=metadata.name=1,metadata.uid=-1 + + */ + OrderBy *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 users assets Ssh get params +func (o *V1UsersAssetsSSHGetParams) WithTimeout(timeout time.Duration) *V1UsersAssetsSSHGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 users assets Ssh get params +func (o *V1UsersAssetsSSHGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 users assets Ssh get params +func (o *V1UsersAssetsSSHGetParams) WithContext(ctx context.Context) *V1UsersAssetsSSHGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 users assets Ssh get params +func (o *V1UsersAssetsSSHGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 users assets Ssh get params +func (o *V1UsersAssetsSSHGetParams) WithHTTPClient(client *http.Client) *V1UsersAssetsSSHGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 users assets Ssh get params +func (o *V1UsersAssetsSSHGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithFilters adds the filters to the v1 users assets Ssh get params +func (o *V1UsersAssetsSSHGetParams) WithFilters(filters *string) *V1UsersAssetsSSHGetParams { + o.SetFilters(filters) + return o +} + +// SetFilters adds the filters to the v1 users assets Ssh get params +func (o *V1UsersAssetsSSHGetParams) SetFilters(filters *string) { + o.Filters = filters +} + +// WithOrderBy adds the orderBy to the v1 users assets Ssh get params +func (o *V1UsersAssetsSSHGetParams) WithOrderBy(orderBy *string) *V1UsersAssetsSSHGetParams { + o.SetOrderBy(orderBy) + return o +} + +// SetOrderBy adds the orderBy to the v1 users assets Ssh get params +func (o *V1UsersAssetsSSHGetParams) SetOrderBy(orderBy *string) { + o.OrderBy = orderBy +} + +// WriteToRequest writes these params to a swagger request +func (o *V1UsersAssetsSSHGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Filters != nil { + + // query param filters + var qrFilters string + if o.Filters != nil { + qrFilters = *o.Filters + } + qFilters := qrFilters + if qFilters != "" { + if err := r.SetQueryParam("filters", qFilters); err != nil { + return err + } + } + + } + + if o.OrderBy != nil { + + // query param orderBy + var qrOrderBy string + if o.OrderBy != nil { + qrOrderBy = *o.OrderBy + } + qOrderBy := qrOrderBy + if qOrderBy != "" { + if err := r.SetQueryParam("orderBy", qOrderBy); err != nil { + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_users_assets_ssh_get_responses.go b/api/client/v1/v1_users_assets_ssh_get_responses.go new file mode 100644 index 00000000..73e870c5 --- /dev/null +++ b/api/client/v1/v1_users_assets_ssh_get_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1UsersAssetsSSHGetReader is a Reader for the V1UsersAssetsSSHGet structure. +type V1UsersAssetsSSHGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1UsersAssetsSSHGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1UsersAssetsSSHGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1UsersAssetsSSHGetOK creates a V1UsersAssetsSSHGetOK with default headers values +func NewV1UsersAssetsSSHGetOK() *V1UsersAssetsSSHGetOK { + return &V1UsersAssetsSSHGetOK{} +} + +/* +V1UsersAssetsSSHGetOK handles this case with default header values. + +(empty) +*/ +type V1UsersAssetsSSHGetOK struct { + Payload *models.V1UserAssetsSSH +} + +func (o *V1UsersAssetsSSHGetOK) Error() string { + return fmt.Sprintf("[GET /v1/users/assets/sshkeys][%d] v1UsersAssetsSshGetOK %+v", 200, o.Payload) +} + +func (o *V1UsersAssetsSSHGetOK) GetPayload() *models.V1UserAssetsSSH { + return o.Payload +} + +func (o *V1UsersAssetsSSHGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1UserAssetsSSH) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_users_auth_tokens_revoke_parameters.go b/api/client/v1/v1_users_auth_tokens_revoke_parameters.go new file mode 100644 index 00000000..0eaa209d --- /dev/null +++ b/api/client/v1/v1_users_auth_tokens_revoke_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1UsersAuthTokensRevokeParams creates a new V1UsersAuthTokensRevokeParams object +// with the default values initialized. +func NewV1UsersAuthTokensRevokeParams() *V1UsersAuthTokensRevokeParams { + var () + return &V1UsersAuthTokensRevokeParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1UsersAuthTokensRevokeParamsWithTimeout creates a new V1UsersAuthTokensRevokeParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1UsersAuthTokensRevokeParamsWithTimeout(timeout time.Duration) *V1UsersAuthTokensRevokeParams { + var () + return &V1UsersAuthTokensRevokeParams{ + + timeout: timeout, + } +} + +// NewV1UsersAuthTokensRevokeParamsWithContext creates a new V1UsersAuthTokensRevokeParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1UsersAuthTokensRevokeParamsWithContext(ctx context.Context) *V1UsersAuthTokensRevokeParams { + var () + return &V1UsersAuthTokensRevokeParams{ + + Context: ctx, + } +} + +// NewV1UsersAuthTokensRevokeParamsWithHTTPClient creates a new V1UsersAuthTokensRevokeParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1UsersAuthTokensRevokeParamsWithHTTPClient(client *http.Client) *V1UsersAuthTokensRevokeParams { + var () + return &V1UsersAuthTokensRevokeParams{ + HTTPClient: client, + } +} + +/* +V1UsersAuthTokensRevokeParams contains all the parameters to send to the API endpoint +for the v1 users auth tokens revoke operation typically these are written to a http.Request +*/ +type V1UsersAuthTokensRevokeParams struct { + + /*Body*/ + Body *models.V1AuthTokenRevoke + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 users auth tokens revoke params +func (o *V1UsersAuthTokensRevokeParams) WithTimeout(timeout time.Duration) *V1UsersAuthTokensRevokeParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 users auth tokens revoke params +func (o *V1UsersAuthTokensRevokeParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 users auth tokens revoke params +func (o *V1UsersAuthTokensRevokeParams) WithContext(ctx context.Context) *V1UsersAuthTokensRevokeParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 users auth tokens revoke params +func (o *V1UsersAuthTokensRevokeParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 users auth tokens revoke params +func (o *V1UsersAuthTokensRevokeParams) WithHTTPClient(client *http.Client) *V1UsersAuthTokensRevokeParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 users auth tokens revoke params +func (o *V1UsersAuthTokensRevokeParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 users auth tokens revoke params +func (o *V1UsersAuthTokensRevokeParams) WithBody(body *models.V1AuthTokenRevoke) *V1UsersAuthTokensRevokeParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 users auth tokens revoke params +func (o *V1UsersAuthTokensRevokeParams) SetBody(body *models.V1AuthTokenRevoke) { + o.Body = body +} + +// WriteToRequest writes these params to a swagger request +func (o *V1UsersAuthTokensRevokeParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_users_auth_tokens_revoke_responses.go b/api/client/v1/v1_users_auth_tokens_revoke_responses.go new file mode 100644 index 00000000..6621c4a4 --- /dev/null +++ b/api/client/v1/v1_users_auth_tokens_revoke_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1UsersAuthTokensRevokeReader is a Reader for the V1UsersAuthTokensRevoke structure. +type V1UsersAuthTokensRevokeReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1UsersAuthTokensRevokeReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1UsersAuthTokensRevokeNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1UsersAuthTokensRevokeNoContent creates a V1UsersAuthTokensRevokeNoContent with default headers values +func NewV1UsersAuthTokensRevokeNoContent() *V1UsersAuthTokensRevokeNoContent { + return &V1UsersAuthTokensRevokeNoContent{} +} + +/* +V1UsersAuthTokensRevokeNoContent handles this case with default header values. + +The resource was updated successfully +*/ +type V1UsersAuthTokensRevokeNoContent struct { +} + +func (o *V1UsersAuthTokensRevokeNoContent) Error() string { + return fmt.Sprintf("[POST /v1/users/auth/tokens/revoke][%d] v1UsersAuthTokensRevokeNoContent ", 204) +} + +func (o *V1UsersAuthTokensRevokeNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_users_config_scar_get_parameters.go b/api/client/v1/v1_users_config_scar_get_parameters.go new file mode 100644 index 00000000..85f79c17 --- /dev/null +++ b/api/client/v1/v1_users_config_scar_get_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1UsersConfigScarGetParams creates a new V1UsersConfigScarGetParams object +// with the default values initialized. +func NewV1UsersConfigScarGetParams() *V1UsersConfigScarGetParams { + + return &V1UsersConfigScarGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1UsersConfigScarGetParamsWithTimeout creates a new V1UsersConfigScarGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1UsersConfigScarGetParamsWithTimeout(timeout time.Duration) *V1UsersConfigScarGetParams { + + return &V1UsersConfigScarGetParams{ + + timeout: timeout, + } +} + +// NewV1UsersConfigScarGetParamsWithContext creates a new V1UsersConfigScarGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1UsersConfigScarGetParamsWithContext(ctx context.Context) *V1UsersConfigScarGetParams { + + return &V1UsersConfigScarGetParams{ + + Context: ctx, + } +} + +// NewV1UsersConfigScarGetParamsWithHTTPClient creates a new V1UsersConfigScarGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1UsersConfigScarGetParamsWithHTTPClient(client *http.Client) *V1UsersConfigScarGetParams { + + return &V1UsersConfigScarGetParams{ + HTTPClient: client, + } +} + +/* +V1UsersConfigScarGetParams contains all the parameters to send to the API endpoint +for the v1 users config scar get operation typically these are written to a http.Request +*/ +type V1UsersConfigScarGetParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 users config scar get params +func (o *V1UsersConfigScarGetParams) WithTimeout(timeout time.Duration) *V1UsersConfigScarGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 users config scar get params +func (o *V1UsersConfigScarGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 users config scar get params +func (o *V1UsersConfigScarGetParams) WithContext(ctx context.Context) *V1UsersConfigScarGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 users config scar get params +func (o *V1UsersConfigScarGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 users config scar get params +func (o *V1UsersConfigScarGetParams) WithHTTPClient(client *http.Client) *V1UsersConfigScarGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 users config scar get params +func (o *V1UsersConfigScarGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *V1UsersConfigScarGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_users_config_scar_get_responses.go b/api/client/v1/v1_users_config_scar_get_responses.go new file mode 100644 index 00000000..fd1c28d1 --- /dev/null +++ b/api/client/v1/v1_users_config_scar_get_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1UsersConfigScarGetReader is a Reader for the V1UsersConfigScarGet structure. +type V1UsersConfigScarGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1UsersConfigScarGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1UsersConfigScarGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1UsersConfigScarGetOK creates a V1UsersConfigScarGetOK with default headers values +func NewV1UsersConfigScarGetOK() *V1UsersConfigScarGetOK { + return &V1UsersConfigScarGetOK{} +} + +/* +V1UsersConfigScarGetOK handles this case with default header values. + +(empty) +*/ +type V1UsersConfigScarGetOK struct { + Payload *models.V1SystemScarSpec +} + +func (o *V1UsersConfigScarGetOK) Error() string { + return fmt.Sprintf("[GET /v1/users/config/scar][%d] v1UsersConfigScarGetOK %+v", 200, o.Payload) +} + +func (o *V1UsersConfigScarGetOK) GetPayload() *models.V1SystemScarSpec { + return o.Payload +} + +func (o *V1UsersConfigScarGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1SystemScarSpec) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_users_create_parameters.go b/api/client/v1/v1_users_create_parameters.go new file mode 100644 index 00000000..0191494f --- /dev/null +++ b/api/client/v1/v1_users_create_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1UsersCreateParams creates a new V1UsersCreateParams object +// with the default values initialized. +func NewV1UsersCreateParams() *V1UsersCreateParams { + var () + return &V1UsersCreateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1UsersCreateParamsWithTimeout creates a new V1UsersCreateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1UsersCreateParamsWithTimeout(timeout time.Duration) *V1UsersCreateParams { + var () + return &V1UsersCreateParams{ + + timeout: timeout, + } +} + +// NewV1UsersCreateParamsWithContext creates a new V1UsersCreateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1UsersCreateParamsWithContext(ctx context.Context) *V1UsersCreateParams { + var () + return &V1UsersCreateParams{ + + Context: ctx, + } +} + +// NewV1UsersCreateParamsWithHTTPClient creates a new V1UsersCreateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1UsersCreateParamsWithHTTPClient(client *http.Client) *V1UsersCreateParams { + var () + return &V1UsersCreateParams{ + HTTPClient: client, + } +} + +/* +V1UsersCreateParams contains all the parameters to send to the API endpoint +for the v1 users create operation typically these are written to a http.Request +*/ +type V1UsersCreateParams struct { + + /*Body*/ + Body *models.V1UserEntity + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 users create params +func (o *V1UsersCreateParams) WithTimeout(timeout time.Duration) *V1UsersCreateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 users create params +func (o *V1UsersCreateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 users create params +func (o *V1UsersCreateParams) WithContext(ctx context.Context) *V1UsersCreateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 users create params +func (o *V1UsersCreateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 users create params +func (o *V1UsersCreateParams) WithHTTPClient(client *http.Client) *V1UsersCreateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 users create params +func (o *V1UsersCreateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 users create params +func (o *V1UsersCreateParams) WithBody(body *models.V1UserEntity) *V1UsersCreateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 users create params +func (o *V1UsersCreateParams) SetBody(body *models.V1UserEntity) { + o.Body = body +} + +// WriteToRequest writes these params to a swagger request +func (o *V1UsersCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_users_create_responses.go b/api/client/v1/v1_users_create_responses.go new file mode 100644 index 00000000..9eaf43f9 --- /dev/null +++ b/api/client/v1/v1_users_create_responses.go @@ -0,0 +1,77 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1UsersCreateReader is a Reader for the V1UsersCreate structure. +type V1UsersCreateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1UsersCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 201: + result := NewV1UsersCreateCreated() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1UsersCreateCreated creates a V1UsersCreateCreated with default headers values +func NewV1UsersCreateCreated() *V1UsersCreateCreated { + return &V1UsersCreateCreated{} +} + +/* +V1UsersCreateCreated handles this case with default header values. + +Created successfully +*/ +type V1UsersCreateCreated struct { + /*Audit uid for the request + */ + AuditUID string + + Payload *models.V1UID +} + +func (o *V1UsersCreateCreated) Error() string { + return fmt.Sprintf("[POST /v1/users][%d] v1UsersCreateCreated %+v", 201, o.Payload) +} + +func (o *V1UsersCreateCreated) GetPayload() *models.V1UID { + return o.Payload +} + +func (o *V1UsersCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header AuditUid + o.AuditUID = response.GetHeader("AuditUid") + + o.Payload = new(models.V1UID) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_users_email_password_reset_parameters.go b/api/client/v1/v1_users_email_password_reset_parameters.go new file mode 100644 index 00000000..c1b0de83 --- /dev/null +++ b/api/client/v1/v1_users_email_password_reset_parameters.go @@ -0,0 +1,132 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1UsersEmailPasswordResetParams creates a new V1UsersEmailPasswordResetParams object +// with the default values initialized. +func NewV1UsersEmailPasswordResetParams() *V1UsersEmailPasswordResetParams { + var () + return &V1UsersEmailPasswordResetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1UsersEmailPasswordResetParamsWithTimeout creates a new V1UsersEmailPasswordResetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1UsersEmailPasswordResetParamsWithTimeout(timeout time.Duration) *V1UsersEmailPasswordResetParams { + var () + return &V1UsersEmailPasswordResetParams{ + + timeout: timeout, + } +} + +// NewV1UsersEmailPasswordResetParamsWithContext creates a new V1UsersEmailPasswordResetParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1UsersEmailPasswordResetParamsWithContext(ctx context.Context) *V1UsersEmailPasswordResetParams { + var () + return &V1UsersEmailPasswordResetParams{ + + Context: ctx, + } +} + +// NewV1UsersEmailPasswordResetParamsWithHTTPClient creates a new V1UsersEmailPasswordResetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1UsersEmailPasswordResetParamsWithHTTPClient(client *http.Client) *V1UsersEmailPasswordResetParams { + var () + return &V1UsersEmailPasswordResetParams{ + HTTPClient: client, + } +} + +/* +V1UsersEmailPasswordResetParams contains all the parameters to send to the API endpoint +for the v1 users email password reset operation typically these are written to a http.Request +*/ +type V1UsersEmailPasswordResetParams struct { + + /*Body*/ + Body V1UsersEmailPasswordResetBody + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 users email password reset params +func (o *V1UsersEmailPasswordResetParams) WithTimeout(timeout time.Duration) *V1UsersEmailPasswordResetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 users email password reset params +func (o *V1UsersEmailPasswordResetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 users email password reset params +func (o *V1UsersEmailPasswordResetParams) WithContext(ctx context.Context) *V1UsersEmailPasswordResetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 users email password reset params +func (o *V1UsersEmailPasswordResetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 users email password reset params +func (o *V1UsersEmailPasswordResetParams) WithHTTPClient(client *http.Client) *V1UsersEmailPasswordResetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 users email password reset params +func (o *V1UsersEmailPasswordResetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 users email password reset params +func (o *V1UsersEmailPasswordResetParams) WithBody(body V1UsersEmailPasswordResetBody) *V1UsersEmailPasswordResetParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 users email password reset params +func (o *V1UsersEmailPasswordResetParams) SetBody(body V1UsersEmailPasswordResetBody) { + o.Body = body +} + +// WriteToRequest writes these params to a swagger request +func (o *V1UsersEmailPasswordResetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_users_email_password_reset_responses.go b/api/client/v1/v1_users_email_password_reset_responses.go new file mode 100644 index 00000000..02ff2e76 --- /dev/null +++ b/api/client/v1/v1_users_email_password_reset_responses.go @@ -0,0 +1,116 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1UsersEmailPasswordResetReader is a Reader for the V1UsersEmailPasswordReset structure. +type V1UsersEmailPasswordResetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1UsersEmailPasswordResetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1UsersEmailPasswordResetNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1UsersEmailPasswordResetNoContent creates a V1UsersEmailPasswordResetNoContent with default headers values +func NewV1UsersEmailPasswordResetNoContent() *V1UsersEmailPasswordResetNoContent { + return &V1UsersEmailPasswordResetNoContent{} +} + +/* +V1UsersEmailPasswordResetNoContent handles this case with default header values. + +Ok response without content +*/ +type V1UsersEmailPasswordResetNoContent struct { + /*Audit uid for the request + */ + AuditUID string +} + +func (o *V1UsersEmailPasswordResetNoContent) Error() string { + return fmt.Sprintf("[PATCH /v1/users/password/reset][%d] v1UsersEmailPasswordResetNoContent ", 204) +} + +func (o *V1UsersEmailPasswordResetNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header AuditUid + o.AuditUID = response.GetHeader("AuditUid") + + return nil +} + +/* +V1UsersEmailPasswordResetBody v1 users email password reset body +swagger:model V1UsersEmailPasswordResetBody +*/ +type V1UsersEmailPasswordResetBody struct { + + // email Id + // Required: true + EmailID *string `json:"emailId"` +} + +// Validate validates this v1 users email password reset body +func (o *V1UsersEmailPasswordResetBody) Validate(formats strfmt.Registry) error { + var res []error + + if err := o.validateEmailID(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (o *V1UsersEmailPasswordResetBody) validateEmailID(formats strfmt.Registry) error { + + if err := validate.Required("body"+"."+"emailId", "body", o.EmailID); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (o *V1UsersEmailPasswordResetBody) MarshalBinary() ([]byte, error) { + if o == nil { + return nil, nil + } + return swag.WriteJSON(o) +} + +// UnmarshalBinary interface implementation +func (o *V1UsersEmailPasswordResetBody) UnmarshalBinary(b []byte) error { + var res V1UsersEmailPasswordResetBody + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *o = res + return nil +} diff --git a/api/client/v1/v1_users_info_get_parameters.go b/api/client/v1/v1_users_info_get_parameters.go new file mode 100644 index 00000000..cfc9fe1c --- /dev/null +++ b/api/client/v1/v1_users_info_get_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1UsersInfoGetParams creates a new V1UsersInfoGetParams object +// with the default values initialized. +func NewV1UsersInfoGetParams() *V1UsersInfoGetParams { + + return &V1UsersInfoGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1UsersInfoGetParamsWithTimeout creates a new V1UsersInfoGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1UsersInfoGetParamsWithTimeout(timeout time.Duration) *V1UsersInfoGetParams { + + return &V1UsersInfoGetParams{ + + timeout: timeout, + } +} + +// NewV1UsersInfoGetParamsWithContext creates a new V1UsersInfoGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1UsersInfoGetParamsWithContext(ctx context.Context) *V1UsersInfoGetParams { + + return &V1UsersInfoGetParams{ + + Context: ctx, + } +} + +// NewV1UsersInfoGetParamsWithHTTPClient creates a new V1UsersInfoGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1UsersInfoGetParamsWithHTTPClient(client *http.Client) *V1UsersInfoGetParams { + + return &V1UsersInfoGetParams{ + HTTPClient: client, + } +} + +/* +V1UsersInfoGetParams contains all the parameters to send to the API endpoint +for the v1 users info get operation typically these are written to a http.Request +*/ +type V1UsersInfoGetParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 users info get params +func (o *V1UsersInfoGetParams) WithTimeout(timeout time.Duration) *V1UsersInfoGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 users info get params +func (o *V1UsersInfoGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 users info get params +func (o *V1UsersInfoGetParams) WithContext(ctx context.Context) *V1UsersInfoGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 users info get params +func (o *V1UsersInfoGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 users info get params +func (o *V1UsersInfoGetParams) WithHTTPClient(client *http.Client) *V1UsersInfoGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 users info get params +func (o *V1UsersInfoGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *V1UsersInfoGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_users_info_get_responses.go b/api/client/v1/v1_users_info_get_responses.go new file mode 100644 index 00000000..5d114a0c --- /dev/null +++ b/api/client/v1/v1_users_info_get_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1UsersInfoGetReader is a Reader for the V1UsersInfoGet structure. +type V1UsersInfoGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1UsersInfoGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1UsersInfoGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1UsersInfoGetOK creates a V1UsersInfoGetOK with default headers values +func NewV1UsersInfoGetOK() *V1UsersInfoGetOK { + return &V1UsersInfoGetOK{} +} + +/* +V1UsersInfoGetOK handles this case with default header values. + +OK +*/ +type V1UsersInfoGetOK struct { + Payload *models.V1UserInfo +} + +func (o *V1UsersInfoGetOK) Error() string { + return fmt.Sprintf("[GET /v1/users/info][%d] v1UsersInfoGetOK %+v", 200, o.Payload) +} + +func (o *V1UsersInfoGetOK) GetPayload() *models.V1UserInfo { + return o.Payload +} + +func (o *V1UsersInfoGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1UserInfo) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_users_kubectl_session_uid_parameters.go b/api/client/v1/v1_users_kubectl_session_uid_parameters.go new file mode 100644 index 00000000..9e3568c8 --- /dev/null +++ b/api/client/v1/v1_users_kubectl_session_uid_parameters.go @@ -0,0 +1,133 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1UsersKubectlSessionUIDParams creates a new V1UsersKubectlSessionUIDParams object +// with the default values initialized. +func NewV1UsersKubectlSessionUIDParams() *V1UsersKubectlSessionUIDParams { + var () + return &V1UsersKubectlSessionUIDParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1UsersKubectlSessionUIDParamsWithTimeout creates a new V1UsersKubectlSessionUIDParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1UsersKubectlSessionUIDParamsWithTimeout(timeout time.Duration) *V1UsersKubectlSessionUIDParams { + var () + return &V1UsersKubectlSessionUIDParams{ + + timeout: timeout, + } +} + +// NewV1UsersKubectlSessionUIDParamsWithContext creates a new V1UsersKubectlSessionUIDParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1UsersKubectlSessionUIDParamsWithContext(ctx context.Context) *V1UsersKubectlSessionUIDParams { + var () + return &V1UsersKubectlSessionUIDParams{ + + Context: ctx, + } +} + +// NewV1UsersKubectlSessionUIDParamsWithHTTPClient creates a new V1UsersKubectlSessionUIDParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1UsersKubectlSessionUIDParamsWithHTTPClient(client *http.Client) *V1UsersKubectlSessionUIDParams { + var () + return &V1UsersKubectlSessionUIDParams{ + HTTPClient: client, + } +} + +/* +V1UsersKubectlSessionUIDParams contains all the parameters to send to the API endpoint +for the v1 users kubectl session Uid operation typically these are written to a http.Request +*/ +type V1UsersKubectlSessionUIDParams struct { + + /*SessionUID*/ + SessionUID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 users kubectl session Uid params +func (o *V1UsersKubectlSessionUIDParams) WithTimeout(timeout time.Duration) *V1UsersKubectlSessionUIDParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 users kubectl session Uid params +func (o *V1UsersKubectlSessionUIDParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 users kubectl session Uid params +func (o *V1UsersKubectlSessionUIDParams) WithContext(ctx context.Context) *V1UsersKubectlSessionUIDParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 users kubectl session Uid params +func (o *V1UsersKubectlSessionUIDParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 users kubectl session Uid params +func (o *V1UsersKubectlSessionUIDParams) WithHTTPClient(client *http.Client) *V1UsersKubectlSessionUIDParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 users kubectl session Uid params +func (o *V1UsersKubectlSessionUIDParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithSessionUID adds the sessionUID to the v1 users kubectl session Uid params +func (o *V1UsersKubectlSessionUIDParams) WithSessionUID(sessionUID string) *V1UsersKubectlSessionUIDParams { + o.SetSessionUID(sessionUID) + return o +} + +// SetSessionUID adds the sessionUid to the v1 users kubectl session Uid params +func (o *V1UsersKubectlSessionUIDParams) SetSessionUID(sessionUID string) { + o.SessionUID = sessionUID +} + +// WriteToRequest writes these params to a swagger request +func (o *V1UsersKubectlSessionUIDParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param sessionUid + if err := r.SetPathParam("sessionUid", o.SessionUID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_users_kubectl_session_uid_responses.go b/api/client/v1/v1_users_kubectl_session_uid_responses.go new file mode 100644 index 00000000..c441d0b5 --- /dev/null +++ b/api/client/v1/v1_users_kubectl_session_uid_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1UsersKubectlSessionUIDReader is a Reader for the V1UsersKubectlSessionUID structure. +type V1UsersKubectlSessionUIDReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1UsersKubectlSessionUIDReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1UsersKubectlSessionUIDOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1UsersKubectlSessionUIDOK creates a V1UsersKubectlSessionUIDOK with default headers values +func NewV1UsersKubectlSessionUIDOK() *V1UsersKubectlSessionUIDOK { + return &V1UsersKubectlSessionUIDOK{} +} + +/* +V1UsersKubectlSessionUIDOK handles this case with default header values. + +OK +*/ +type V1UsersKubectlSessionUIDOK struct { + Payload *models.V1UserKubectlSession +} + +func (o *V1UsersKubectlSessionUIDOK) Error() string { + return fmt.Sprintf("[GET /v1/users/kubectl/session/{sessionUid}][%d] v1UsersKubectlSessionUidOK %+v", 200, o.Payload) +} + +func (o *V1UsersKubectlSessionUIDOK) GetPayload() *models.V1UserKubectlSession { + return o.Payload +} + +func (o *V1UsersKubectlSessionUIDOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1UserKubectlSession) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_users_list_parameters.go b/api/client/v1/v1_users_list_parameters.go new file mode 100644 index 00000000..1e9ae15d --- /dev/null +++ b/api/client/v1/v1_users_list_parameters.go @@ -0,0 +1,323 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// NewV1UsersListParams creates a new V1UsersListParams object +// with the default values initialized. +func NewV1UsersListParams() *V1UsersListParams { + var ( + limitDefault = int64(50) + ) + return &V1UsersListParams{ + Limit: &limitDefault, + + timeout: cr.DefaultTimeout, + } +} + +// NewV1UsersListParamsWithTimeout creates a new V1UsersListParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1UsersListParamsWithTimeout(timeout time.Duration) *V1UsersListParams { + var ( + limitDefault = int64(50) + ) + return &V1UsersListParams{ + Limit: &limitDefault, + + timeout: timeout, + } +} + +// NewV1UsersListParamsWithContext creates a new V1UsersListParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1UsersListParamsWithContext(ctx context.Context) *V1UsersListParams { + var ( + limitDefault = int64(50) + ) + return &V1UsersListParams{ + Limit: &limitDefault, + + Context: ctx, + } +} + +// NewV1UsersListParamsWithHTTPClient creates a new V1UsersListParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1UsersListParamsWithHTTPClient(client *http.Client) *V1UsersListParams { + var ( + limitDefault = int64(50) + ) + return &V1UsersListParams{ + Limit: &limitDefault, + HTTPClient: client, + } +} + +/* +V1UsersListParams contains all the parameters to send to the API endpoint +for the v1 users list operation typically these are written to a http.Request +*/ +type V1UsersListParams struct { + + /*Continue + continue token to paginate the subsequent data items + + */ + Continue *string + /*Fields + Set of fields to be presented in the response with values. The fields are comma separated. Eg: metadata.uid,metadata.name + + */ + Fields *string + /*Filters + Filters can be combined with AND, OR operators with field path name. Eg: metadata.name=TestServiceANDspec.cloudType=aws + + Server will be restricted to certain fields based on the indexed data for each resource. + + */ + Filters *string + /*Limit + limit is a maximum number of responses to return for a list call. Default and maximum value of the limit is 50. + If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. + + */ + Limit *int64 + /*Offset + offset is the next index number from which the response will start. The response offset value can be used along with continue token for the pagination. + + */ + Offset *int64 + /*OrderBy + Specify the fields with sort order. 1 indicates ascending and -1 for descending. Eg: orderBy=metadata.name=1,metadata.uid=-1 + + */ + OrderBy *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 users list params +func (o *V1UsersListParams) WithTimeout(timeout time.Duration) *V1UsersListParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 users list params +func (o *V1UsersListParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 users list params +func (o *V1UsersListParams) WithContext(ctx context.Context) *V1UsersListParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 users list params +func (o *V1UsersListParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 users list params +func (o *V1UsersListParams) WithHTTPClient(client *http.Client) *V1UsersListParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 users list params +func (o *V1UsersListParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithContinue adds the continueVar to the v1 users list params +func (o *V1UsersListParams) WithContinue(continueVar *string) *V1UsersListParams { + o.SetContinue(continueVar) + return o +} + +// SetContinue adds the continue to the v1 users list params +func (o *V1UsersListParams) SetContinue(continueVar *string) { + o.Continue = continueVar +} + +// WithFields adds the fields to the v1 users list params +func (o *V1UsersListParams) WithFields(fields *string) *V1UsersListParams { + o.SetFields(fields) + return o +} + +// SetFields adds the fields to the v1 users list params +func (o *V1UsersListParams) SetFields(fields *string) { + o.Fields = fields +} + +// WithFilters adds the filters to the v1 users list params +func (o *V1UsersListParams) WithFilters(filters *string) *V1UsersListParams { + o.SetFilters(filters) + return o +} + +// SetFilters adds the filters to the v1 users list params +func (o *V1UsersListParams) SetFilters(filters *string) { + o.Filters = filters +} + +// WithLimit adds the limit to the v1 users list params +func (o *V1UsersListParams) WithLimit(limit *int64) *V1UsersListParams { + o.SetLimit(limit) + return o +} + +// SetLimit adds the limit to the v1 users list params +func (o *V1UsersListParams) SetLimit(limit *int64) { + o.Limit = limit +} + +// WithOffset adds the offset to the v1 users list params +func (o *V1UsersListParams) WithOffset(offset *int64) *V1UsersListParams { + o.SetOffset(offset) + return o +} + +// SetOffset adds the offset to the v1 users list params +func (o *V1UsersListParams) SetOffset(offset *int64) { + o.Offset = offset +} + +// WithOrderBy adds the orderBy to the v1 users list params +func (o *V1UsersListParams) WithOrderBy(orderBy *string) *V1UsersListParams { + o.SetOrderBy(orderBy) + return o +} + +// SetOrderBy adds the orderBy to the v1 users list params +func (o *V1UsersListParams) SetOrderBy(orderBy *string) { + o.OrderBy = orderBy +} + +// WriteToRequest writes these params to a swagger request +func (o *V1UsersListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Continue != nil { + + // query param continue + var qrContinue string + if o.Continue != nil { + qrContinue = *o.Continue + } + qContinue := qrContinue + if qContinue != "" { + if err := r.SetQueryParam("continue", qContinue); err != nil { + return err + } + } + + } + + if o.Fields != nil { + + // query param fields + var qrFields string + if o.Fields != nil { + qrFields = *o.Fields + } + qFields := qrFields + if qFields != "" { + if err := r.SetQueryParam("fields", qFields); err != nil { + return err + } + } + + } + + if o.Filters != nil { + + // query param filters + var qrFilters string + if o.Filters != nil { + qrFilters = *o.Filters + } + qFilters := qrFilters + if qFilters != "" { + if err := r.SetQueryParam("filters", qFilters); err != nil { + return err + } + } + + } + + if o.Limit != nil { + + // query param limit + var qrLimit int64 + if o.Limit != nil { + qrLimit = *o.Limit + } + qLimit := swag.FormatInt64(qrLimit) + if qLimit != "" { + if err := r.SetQueryParam("limit", qLimit); err != nil { + return err + } + } + + } + + if o.Offset != nil { + + // query param offset + var qrOffset int64 + if o.Offset != nil { + qrOffset = *o.Offset + } + qOffset := swag.FormatInt64(qrOffset) + if qOffset != "" { + if err := r.SetQueryParam("offset", qOffset); err != nil { + return err + } + } + + } + + if o.OrderBy != nil { + + // query param orderBy + var qrOrderBy string + if o.OrderBy != nil { + qrOrderBy = *o.OrderBy + } + qOrderBy := qrOrderBy + if qOrderBy != "" { + if err := r.SetQueryParam("orderBy", qOrderBy); err != nil { + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_users_list_responses.go b/api/client/v1/v1_users_list_responses.go new file mode 100644 index 00000000..086d00fa --- /dev/null +++ b/api/client/v1/v1_users_list_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1UsersListReader is a Reader for the V1UsersList structure. +type V1UsersListReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1UsersListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1UsersListOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1UsersListOK creates a V1UsersListOK with default headers values +func NewV1UsersListOK() *V1UsersListOK { + return &V1UsersListOK{} +} + +/* +V1UsersListOK handles this case with default header values. + +OK +*/ +type V1UsersListOK struct { + Payload *models.V1Users +} + +func (o *V1UsersListOK) Error() string { + return fmt.Sprintf("[GET /v1/users][%d] v1UsersListOK %+v", 200, o.Payload) +} + +func (o *V1UsersListOK) GetPayload() *models.V1Users { + return o.Payload +} + +func (o *V1UsersListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1Users) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_users_me_get_parameters.go b/api/client/v1/v1_users_me_get_parameters.go new file mode 100644 index 00000000..4b8f9370 --- /dev/null +++ b/api/client/v1/v1_users_me_get_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1UsersMeGetParams creates a new V1UsersMeGetParams object +// with the default values initialized. +func NewV1UsersMeGetParams() *V1UsersMeGetParams { + + return &V1UsersMeGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1UsersMeGetParamsWithTimeout creates a new V1UsersMeGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1UsersMeGetParamsWithTimeout(timeout time.Duration) *V1UsersMeGetParams { + + return &V1UsersMeGetParams{ + + timeout: timeout, + } +} + +// NewV1UsersMeGetParamsWithContext creates a new V1UsersMeGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1UsersMeGetParamsWithContext(ctx context.Context) *V1UsersMeGetParams { + + return &V1UsersMeGetParams{ + + Context: ctx, + } +} + +// NewV1UsersMeGetParamsWithHTTPClient creates a new V1UsersMeGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1UsersMeGetParamsWithHTTPClient(client *http.Client) *V1UsersMeGetParams { + + return &V1UsersMeGetParams{ + HTTPClient: client, + } +} + +/* +V1UsersMeGetParams contains all the parameters to send to the API endpoint +for the v1 users me get operation typically these are written to a http.Request +*/ +type V1UsersMeGetParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 users me get params +func (o *V1UsersMeGetParams) WithTimeout(timeout time.Duration) *V1UsersMeGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 users me get params +func (o *V1UsersMeGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 users me get params +func (o *V1UsersMeGetParams) WithContext(ctx context.Context) *V1UsersMeGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 users me get params +func (o *V1UsersMeGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 users me get params +func (o *V1UsersMeGetParams) WithHTTPClient(client *http.Client) *V1UsersMeGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 users me get params +func (o *V1UsersMeGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *V1UsersMeGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_users_me_get_responses.go b/api/client/v1/v1_users_me_get_responses.go new file mode 100644 index 00000000..9711932f --- /dev/null +++ b/api/client/v1/v1_users_me_get_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1UsersMeGetReader is a Reader for the V1UsersMeGet structure. +type V1UsersMeGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1UsersMeGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1UsersMeGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1UsersMeGetOK creates a V1UsersMeGetOK with default headers values +func NewV1UsersMeGetOK() *V1UsersMeGetOK { + return &V1UsersMeGetOK{} +} + +/* +V1UsersMeGetOK handles this case with default header values. + +OK +*/ +type V1UsersMeGetOK struct { + Payload *models.V1UserMe +} + +func (o *V1UsersMeGetOK) Error() string { + return fmt.Sprintf("[GET /v1/users/me][%d] v1UsersMeGetOK %+v", 200, o.Payload) +} + +func (o *V1UsersMeGetOK) GetPayload() *models.V1UserMe { + return o.Payload +} + +func (o *V1UsersMeGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1UserMe) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_users_metadata_parameters.go b/api/client/v1/v1_users_metadata_parameters.go new file mode 100644 index 00000000..1306b26b --- /dev/null +++ b/api/client/v1/v1_users_metadata_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1UsersMetadataParams creates a new V1UsersMetadataParams object +// with the default values initialized. +func NewV1UsersMetadataParams() *V1UsersMetadataParams { + + return &V1UsersMetadataParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1UsersMetadataParamsWithTimeout creates a new V1UsersMetadataParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1UsersMetadataParamsWithTimeout(timeout time.Duration) *V1UsersMetadataParams { + + return &V1UsersMetadataParams{ + + timeout: timeout, + } +} + +// NewV1UsersMetadataParamsWithContext creates a new V1UsersMetadataParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1UsersMetadataParamsWithContext(ctx context.Context) *V1UsersMetadataParams { + + return &V1UsersMetadataParams{ + + Context: ctx, + } +} + +// NewV1UsersMetadataParamsWithHTTPClient creates a new V1UsersMetadataParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1UsersMetadataParamsWithHTTPClient(client *http.Client) *V1UsersMetadataParams { + + return &V1UsersMetadataParams{ + HTTPClient: client, + } +} + +/* +V1UsersMetadataParams contains all the parameters to send to the API endpoint +for the v1 users metadata operation typically these are written to a http.Request +*/ +type V1UsersMetadataParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 users metadata params +func (o *V1UsersMetadataParams) WithTimeout(timeout time.Duration) *V1UsersMetadataParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 users metadata params +func (o *V1UsersMetadataParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 users metadata params +func (o *V1UsersMetadataParams) WithContext(ctx context.Context) *V1UsersMetadataParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 users metadata params +func (o *V1UsersMetadataParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 users metadata params +func (o *V1UsersMetadataParams) WithHTTPClient(client *http.Client) *V1UsersMetadataParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 users metadata params +func (o *V1UsersMetadataParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *V1UsersMetadataParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_users_metadata_responses.go b/api/client/v1/v1_users_metadata_responses.go new file mode 100644 index 00000000..4bb9f996 --- /dev/null +++ b/api/client/v1/v1_users_metadata_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1UsersMetadataReader is a Reader for the V1UsersMetadata structure. +type V1UsersMetadataReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1UsersMetadataReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1UsersMetadataOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1UsersMetadataOK creates a V1UsersMetadataOK with default headers values +func NewV1UsersMetadataOK() *V1UsersMetadataOK { + return &V1UsersMetadataOK{} +} + +/* +V1UsersMetadataOK handles this case with default header values. + +An array of users metadata items +*/ +type V1UsersMetadataOK struct { + Payload *models.V1UsersMetadata +} + +func (o *V1UsersMetadataOK) Error() string { + return fmt.Sprintf("[GET /v1/users/meta][%d] v1UsersMetadataOK %+v", 200, o.Payload) +} + +func (o *V1UsersMetadataOK) GetPayload() *models.V1UsersMetadata { + return o.Payload +} + +func (o *V1UsersMetadataOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1UsersMetadata) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_users_password_change_parameters.go b/api/client/v1/v1_users_password_change_parameters.go new file mode 100644 index 00000000..bee1556b --- /dev/null +++ b/api/client/v1/v1_users_password_change_parameters.go @@ -0,0 +1,132 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1UsersPasswordChangeParams creates a new V1UsersPasswordChangeParams object +// with the default values initialized. +func NewV1UsersPasswordChangeParams() *V1UsersPasswordChangeParams { + var () + return &V1UsersPasswordChangeParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1UsersPasswordChangeParamsWithTimeout creates a new V1UsersPasswordChangeParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1UsersPasswordChangeParamsWithTimeout(timeout time.Duration) *V1UsersPasswordChangeParams { + var () + return &V1UsersPasswordChangeParams{ + + timeout: timeout, + } +} + +// NewV1UsersPasswordChangeParamsWithContext creates a new V1UsersPasswordChangeParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1UsersPasswordChangeParamsWithContext(ctx context.Context) *V1UsersPasswordChangeParams { + var () + return &V1UsersPasswordChangeParams{ + + Context: ctx, + } +} + +// NewV1UsersPasswordChangeParamsWithHTTPClient creates a new V1UsersPasswordChangeParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1UsersPasswordChangeParamsWithHTTPClient(client *http.Client) *V1UsersPasswordChangeParams { + var () + return &V1UsersPasswordChangeParams{ + HTTPClient: client, + } +} + +/* +V1UsersPasswordChangeParams contains all the parameters to send to the API endpoint +for the v1 users password change operation typically these are written to a http.Request +*/ +type V1UsersPasswordChangeParams struct { + + /*Body*/ + Body V1UsersPasswordChangeBody + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 users password change params +func (o *V1UsersPasswordChangeParams) WithTimeout(timeout time.Duration) *V1UsersPasswordChangeParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 users password change params +func (o *V1UsersPasswordChangeParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 users password change params +func (o *V1UsersPasswordChangeParams) WithContext(ctx context.Context) *V1UsersPasswordChangeParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 users password change params +func (o *V1UsersPasswordChangeParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 users password change params +func (o *V1UsersPasswordChangeParams) WithHTTPClient(client *http.Client) *V1UsersPasswordChangeParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 users password change params +func (o *V1UsersPasswordChangeParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 users password change params +func (o *V1UsersPasswordChangeParams) WithBody(body V1UsersPasswordChangeBody) *V1UsersPasswordChangeParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 users password change params +func (o *V1UsersPasswordChangeParams) SetBody(body V1UsersPasswordChangeBody) { + o.Body = body +} + +// WriteToRequest writes these params to a swagger request +func (o *V1UsersPasswordChangeParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_users_password_change_responses.go b/api/client/v1/v1_users_password_change_responses.go new file mode 100644 index 00000000..d827fd20 --- /dev/null +++ b/api/client/v1/v1_users_password_change_responses.go @@ -0,0 +1,150 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1UsersPasswordChangeReader is a Reader for the V1UsersPasswordChange structure. +type V1UsersPasswordChangeReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1UsersPasswordChangeReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1UsersPasswordChangeNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1UsersPasswordChangeNoContent creates a V1UsersPasswordChangeNoContent with default headers values +func NewV1UsersPasswordChangeNoContent() *V1UsersPasswordChangeNoContent { + return &V1UsersPasswordChangeNoContent{} +} + +/* +V1UsersPasswordChangeNoContent handles this case with default header values. + +Ok response without content +*/ +type V1UsersPasswordChangeNoContent struct { + /*Audit uid for the request + */ + AuditUID string +} + +func (o *V1UsersPasswordChangeNoContent) Error() string { + return fmt.Sprintf("[PATCH /v1/users/password/change][%d] v1UsersPasswordChangeNoContent ", 204) +} + +func (o *V1UsersPasswordChangeNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header AuditUid + o.AuditUID = response.GetHeader("AuditUid") + + return nil +} + +/* +V1UsersPasswordChangeBody v1 users password change body +swagger:model V1UsersPasswordChangeBody +*/ +type V1UsersPasswordChangeBody struct { + + // current password + // Required: true + CurrentPassword *string `json:"currentPassword"` + + // email Id + // Required: true + EmailID *string `json:"emailId"` + + // new password + // Required: true + NewPassword *string `json:"newPassword"` +} + +// Validate validates this v1 users password change body +func (o *V1UsersPasswordChangeBody) Validate(formats strfmt.Registry) error { + var res []error + + if err := o.validateCurrentPassword(formats); err != nil { + res = append(res, err) + } + + if err := o.validateEmailID(formats); err != nil { + res = append(res, err) + } + + if err := o.validateNewPassword(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (o *V1UsersPasswordChangeBody) validateCurrentPassword(formats strfmt.Registry) error { + + if err := validate.Required("body"+"."+"currentPassword", "body", o.CurrentPassword); err != nil { + return err + } + + return nil +} + +func (o *V1UsersPasswordChangeBody) validateEmailID(formats strfmt.Registry) error { + + if err := validate.Required("body"+"."+"emailId", "body", o.EmailID); err != nil { + return err + } + + return nil +} + +func (o *V1UsersPasswordChangeBody) validateNewPassword(formats strfmt.Registry) error { + + if err := validate.Required("body"+"."+"newPassword", "body", o.NewPassword); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (o *V1UsersPasswordChangeBody) MarshalBinary() ([]byte, error) { + if o == nil { + return nil, nil + } + return swag.WriteJSON(o) +} + +// UnmarshalBinary interface implementation +func (o *V1UsersPasswordChangeBody) UnmarshalBinary(b []byte) error { + var res V1UsersPasswordChangeBody + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *o = res + return nil +} diff --git a/api/client/v1/v1_users_project_roles_parameters.go b/api/client/v1/v1_users_project_roles_parameters.go new file mode 100644 index 00000000..ce0f62cf --- /dev/null +++ b/api/client/v1/v1_users_project_roles_parameters.go @@ -0,0 +1,133 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1UsersProjectRolesParams creates a new V1UsersProjectRolesParams object +// with the default values initialized. +func NewV1UsersProjectRolesParams() *V1UsersProjectRolesParams { + var () + return &V1UsersProjectRolesParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1UsersProjectRolesParamsWithTimeout creates a new V1UsersProjectRolesParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1UsersProjectRolesParamsWithTimeout(timeout time.Duration) *V1UsersProjectRolesParams { + var () + return &V1UsersProjectRolesParams{ + + timeout: timeout, + } +} + +// NewV1UsersProjectRolesParamsWithContext creates a new V1UsersProjectRolesParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1UsersProjectRolesParamsWithContext(ctx context.Context) *V1UsersProjectRolesParams { + var () + return &V1UsersProjectRolesParams{ + + Context: ctx, + } +} + +// NewV1UsersProjectRolesParamsWithHTTPClient creates a new V1UsersProjectRolesParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1UsersProjectRolesParamsWithHTTPClient(client *http.Client) *V1UsersProjectRolesParams { + var () + return &V1UsersProjectRolesParams{ + HTTPClient: client, + } +} + +/* +V1UsersProjectRolesParams contains all the parameters to send to the API endpoint +for the v1 users project roles operation typically these are written to a http.Request +*/ +type V1UsersProjectRolesParams struct { + + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 users project roles params +func (o *V1UsersProjectRolesParams) WithTimeout(timeout time.Duration) *V1UsersProjectRolesParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 users project roles params +func (o *V1UsersProjectRolesParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 users project roles params +func (o *V1UsersProjectRolesParams) WithContext(ctx context.Context) *V1UsersProjectRolesParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 users project roles params +func (o *V1UsersProjectRolesParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 users project roles params +func (o *V1UsersProjectRolesParams) WithHTTPClient(client *http.Client) *V1UsersProjectRolesParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 users project roles params +func (o *V1UsersProjectRolesParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithUID adds the uid to the v1 users project roles params +func (o *V1UsersProjectRolesParams) WithUID(uid string) *V1UsersProjectRolesParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 users project roles params +func (o *V1UsersProjectRolesParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1UsersProjectRolesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_users_project_roles_put_parameters.go b/api/client/v1/v1_users_project_roles_put_parameters.go new file mode 100644 index 00000000..ed72bc53 --- /dev/null +++ b/api/client/v1/v1_users_project_roles_put_parameters.go @@ -0,0 +1,154 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1UsersProjectRolesPutParams creates a new V1UsersProjectRolesPutParams object +// with the default values initialized. +func NewV1UsersProjectRolesPutParams() *V1UsersProjectRolesPutParams { + var () + return &V1UsersProjectRolesPutParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1UsersProjectRolesPutParamsWithTimeout creates a new V1UsersProjectRolesPutParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1UsersProjectRolesPutParamsWithTimeout(timeout time.Duration) *V1UsersProjectRolesPutParams { + var () + return &V1UsersProjectRolesPutParams{ + + timeout: timeout, + } +} + +// NewV1UsersProjectRolesPutParamsWithContext creates a new V1UsersProjectRolesPutParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1UsersProjectRolesPutParamsWithContext(ctx context.Context) *V1UsersProjectRolesPutParams { + var () + return &V1UsersProjectRolesPutParams{ + + Context: ctx, + } +} + +// NewV1UsersProjectRolesPutParamsWithHTTPClient creates a new V1UsersProjectRolesPutParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1UsersProjectRolesPutParamsWithHTTPClient(client *http.Client) *V1UsersProjectRolesPutParams { + var () + return &V1UsersProjectRolesPutParams{ + HTTPClient: client, + } +} + +/* +V1UsersProjectRolesPutParams contains all the parameters to send to the API endpoint +for the v1 users project roles put operation typically these are written to a http.Request +*/ +type V1UsersProjectRolesPutParams struct { + + /*Body*/ + Body *models.V1ProjectRolesPatch + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 users project roles put params +func (o *V1UsersProjectRolesPutParams) WithTimeout(timeout time.Duration) *V1UsersProjectRolesPutParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 users project roles put params +func (o *V1UsersProjectRolesPutParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 users project roles put params +func (o *V1UsersProjectRolesPutParams) WithContext(ctx context.Context) *V1UsersProjectRolesPutParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 users project roles put params +func (o *V1UsersProjectRolesPutParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 users project roles put params +func (o *V1UsersProjectRolesPutParams) WithHTTPClient(client *http.Client) *V1UsersProjectRolesPutParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 users project roles put params +func (o *V1UsersProjectRolesPutParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 users project roles put params +func (o *V1UsersProjectRolesPutParams) WithBody(body *models.V1ProjectRolesPatch) *V1UsersProjectRolesPutParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 users project roles put params +func (o *V1UsersProjectRolesPutParams) SetBody(body *models.V1ProjectRolesPatch) { + o.Body = body +} + +// WithUID adds the uid to the v1 users project roles put params +func (o *V1UsersProjectRolesPutParams) WithUID(uid string) *V1UsersProjectRolesPutParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 users project roles put params +func (o *V1UsersProjectRolesPutParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1UsersProjectRolesPutParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_users_project_roles_put_responses.go b/api/client/v1/v1_users_project_roles_put_responses.go new file mode 100644 index 00000000..ea92117b --- /dev/null +++ b/api/client/v1/v1_users_project_roles_put_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1UsersProjectRolesPutReader is a Reader for the V1UsersProjectRolesPut structure. +type V1UsersProjectRolesPutReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1UsersProjectRolesPutReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1UsersProjectRolesPutNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1UsersProjectRolesPutNoContent creates a V1UsersProjectRolesPutNoContent with default headers values +func NewV1UsersProjectRolesPutNoContent() *V1UsersProjectRolesPutNoContent { + return &V1UsersProjectRolesPutNoContent{} +} + +/* +V1UsersProjectRolesPutNoContent handles this case with default header values. + +The resource was updated successfully +*/ +type V1UsersProjectRolesPutNoContent struct { +} + +func (o *V1UsersProjectRolesPutNoContent) Error() string { + return fmt.Sprintf("[PUT /v1/users/{uid}/projects][%d] v1UsersProjectRolesPutNoContent ", 204) +} + +func (o *V1UsersProjectRolesPutNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_users_project_roles_responses.go b/api/client/v1/v1_users_project_roles_responses.go new file mode 100644 index 00000000..f85e34e5 --- /dev/null +++ b/api/client/v1/v1_users_project_roles_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1UsersProjectRolesReader is a Reader for the V1UsersProjectRoles structure. +type V1UsersProjectRolesReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1UsersProjectRolesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1UsersProjectRolesOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1UsersProjectRolesOK creates a V1UsersProjectRolesOK with default headers values +func NewV1UsersProjectRolesOK() *V1UsersProjectRolesOK { + return &V1UsersProjectRolesOK{} +} + +/* +V1UsersProjectRolesOK handles this case with default header values. + +OK +*/ +type V1UsersProjectRolesOK struct { + Payload *models.V1ProjectRolesEntity +} + +func (o *V1UsersProjectRolesOK) Error() string { + return fmt.Sprintf("[GET /v1/users/{uid}/projects][%d] v1UsersProjectRolesOK %+v", 200, o.Payload) +} + +func (o *V1UsersProjectRolesOK) GetPayload() *models.V1ProjectRolesEntity { + return o.Payload +} + +func (o *V1UsersProjectRolesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1ProjectRolesEntity) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_users_resource_roles_uid_update_parameters.go b/api/client/v1/v1_users_resource_roles_uid_update_parameters.go new file mode 100644 index 00000000..05d8a138 --- /dev/null +++ b/api/client/v1/v1_users_resource_roles_uid_update_parameters.go @@ -0,0 +1,172 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1UsersResourceRolesUIDUpdateParams creates a new V1UsersResourceRolesUIDUpdateParams object +// with the default values initialized. +func NewV1UsersResourceRolesUIDUpdateParams() *V1UsersResourceRolesUIDUpdateParams { + var () + return &V1UsersResourceRolesUIDUpdateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1UsersResourceRolesUIDUpdateParamsWithTimeout creates a new V1UsersResourceRolesUIDUpdateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1UsersResourceRolesUIDUpdateParamsWithTimeout(timeout time.Duration) *V1UsersResourceRolesUIDUpdateParams { + var () + return &V1UsersResourceRolesUIDUpdateParams{ + + timeout: timeout, + } +} + +// NewV1UsersResourceRolesUIDUpdateParamsWithContext creates a new V1UsersResourceRolesUIDUpdateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1UsersResourceRolesUIDUpdateParamsWithContext(ctx context.Context) *V1UsersResourceRolesUIDUpdateParams { + var () + return &V1UsersResourceRolesUIDUpdateParams{ + + Context: ctx, + } +} + +// NewV1UsersResourceRolesUIDUpdateParamsWithHTTPClient creates a new V1UsersResourceRolesUIDUpdateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1UsersResourceRolesUIDUpdateParamsWithHTTPClient(client *http.Client) *V1UsersResourceRolesUIDUpdateParams { + var () + return &V1UsersResourceRolesUIDUpdateParams{ + HTTPClient: client, + } +} + +/* +V1UsersResourceRolesUIDUpdateParams contains all the parameters to send to the API endpoint +for the v1 users resource roles Uid update operation typically these are written to a http.Request +*/ +type V1UsersResourceRolesUIDUpdateParams struct { + + /*Body*/ + Body *models.V1ResourceRolesUpdateEntity + /*ResourceRoleUID*/ + ResourceRoleUID string + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 users resource roles Uid update params +func (o *V1UsersResourceRolesUIDUpdateParams) WithTimeout(timeout time.Duration) *V1UsersResourceRolesUIDUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 users resource roles Uid update params +func (o *V1UsersResourceRolesUIDUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 users resource roles Uid update params +func (o *V1UsersResourceRolesUIDUpdateParams) WithContext(ctx context.Context) *V1UsersResourceRolesUIDUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 users resource roles Uid update params +func (o *V1UsersResourceRolesUIDUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 users resource roles Uid update params +func (o *V1UsersResourceRolesUIDUpdateParams) WithHTTPClient(client *http.Client) *V1UsersResourceRolesUIDUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 users resource roles Uid update params +func (o *V1UsersResourceRolesUIDUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 users resource roles Uid update params +func (o *V1UsersResourceRolesUIDUpdateParams) WithBody(body *models.V1ResourceRolesUpdateEntity) *V1UsersResourceRolesUIDUpdateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 users resource roles Uid update params +func (o *V1UsersResourceRolesUIDUpdateParams) SetBody(body *models.V1ResourceRolesUpdateEntity) { + o.Body = body +} + +// WithResourceRoleUID adds the resourceRoleUID to the v1 users resource roles Uid update params +func (o *V1UsersResourceRolesUIDUpdateParams) WithResourceRoleUID(resourceRoleUID string) *V1UsersResourceRolesUIDUpdateParams { + o.SetResourceRoleUID(resourceRoleUID) + return o +} + +// SetResourceRoleUID adds the resourceRoleUid to the v1 users resource roles Uid update params +func (o *V1UsersResourceRolesUIDUpdateParams) SetResourceRoleUID(resourceRoleUID string) { + o.ResourceRoleUID = resourceRoleUID +} + +// WithUID adds the uid to the v1 users resource roles Uid update params +func (o *V1UsersResourceRolesUIDUpdateParams) WithUID(uid string) *V1UsersResourceRolesUIDUpdateParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 users resource roles Uid update params +func (o *V1UsersResourceRolesUIDUpdateParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1UsersResourceRolesUIDUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param resourceRoleUid + if err := r.SetPathParam("resourceRoleUid", o.ResourceRoleUID); err != nil { + return err + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_users_resource_roles_uid_update_responses.go b/api/client/v1/v1_users_resource_roles_uid_update_responses.go new file mode 100644 index 00000000..2e7051f1 --- /dev/null +++ b/api/client/v1/v1_users_resource_roles_uid_update_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1UsersResourceRolesUIDUpdateReader is a Reader for the V1UsersResourceRolesUIDUpdate structure. +type V1UsersResourceRolesUIDUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1UsersResourceRolesUIDUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1UsersResourceRolesUIDUpdateNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1UsersResourceRolesUIDUpdateNoContent creates a V1UsersResourceRolesUIDUpdateNoContent with default headers values +func NewV1UsersResourceRolesUIDUpdateNoContent() *V1UsersResourceRolesUIDUpdateNoContent { + return &V1UsersResourceRolesUIDUpdateNoContent{} +} + +/* +V1UsersResourceRolesUIDUpdateNoContent handles this case with default header values. + +The resource was updated successfully +*/ +type V1UsersResourceRolesUIDUpdateNoContent struct { +} + +func (o *V1UsersResourceRolesUIDUpdateNoContent) Error() string { + return fmt.Sprintf("[PATCH /v1/users/{uid}/resourceRoles/{resourceRoleUid}][%d] v1UsersResourceRolesUidUpdateNoContent ", 204) +} + +func (o *V1UsersResourceRolesUIDUpdateNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_users_status_login_mode_parameters.go b/api/client/v1/v1_users_status_login_mode_parameters.go new file mode 100644 index 00000000..dfbae8d8 --- /dev/null +++ b/api/client/v1/v1_users_status_login_mode_parameters.go @@ -0,0 +1,154 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1UsersStatusLoginModeParams creates a new V1UsersStatusLoginModeParams object +// with the default values initialized. +func NewV1UsersStatusLoginModeParams() *V1UsersStatusLoginModeParams { + var () + return &V1UsersStatusLoginModeParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1UsersStatusLoginModeParamsWithTimeout creates a new V1UsersStatusLoginModeParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1UsersStatusLoginModeParamsWithTimeout(timeout time.Duration) *V1UsersStatusLoginModeParams { + var () + return &V1UsersStatusLoginModeParams{ + + timeout: timeout, + } +} + +// NewV1UsersStatusLoginModeParamsWithContext creates a new V1UsersStatusLoginModeParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1UsersStatusLoginModeParamsWithContext(ctx context.Context) *V1UsersStatusLoginModeParams { + var () + return &V1UsersStatusLoginModeParams{ + + Context: ctx, + } +} + +// NewV1UsersStatusLoginModeParamsWithHTTPClient creates a new V1UsersStatusLoginModeParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1UsersStatusLoginModeParamsWithHTTPClient(client *http.Client) *V1UsersStatusLoginModeParams { + var () + return &V1UsersStatusLoginModeParams{ + HTTPClient: client, + } +} + +/* +V1UsersStatusLoginModeParams contains all the parameters to send to the API endpoint +for the v1 users status login mode operation typically these are written to a http.Request +*/ +type V1UsersStatusLoginModeParams struct { + + /*Body*/ + Body *models.V1UserStatusLoginMode + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 users status login mode params +func (o *V1UsersStatusLoginModeParams) WithTimeout(timeout time.Duration) *V1UsersStatusLoginModeParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 users status login mode params +func (o *V1UsersStatusLoginModeParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 users status login mode params +func (o *V1UsersStatusLoginModeParams) WithContext(ctx context.Context) *V1UsersStatusLoginModeParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 users status login mode params +func (o *V1UsersStatusLoginModeParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 users status login mode params +func (o *V1UsersStatusLoginModeParams) WithHTTPClient(client *http.Client) *V1UsersStatusLoginModeParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 users status login mode params +func (o *V1UsersStatusLoginModeParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 users status login mode params +func (o *V1UsersStatusLoginModeParams) WithBody(body *models.V1UserStatusLoginMode) *V1UsersStatusLoginModeParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 users status login mode params +func (o *V1UsersStatusLoginModeParams) SetBody(body *models.V1UserStatusLoginMode) { + o.Body = body +} + +// WithUID adds the uid to the v1 users status login mode params +func (o *V1UsersStatusLoginModeParams) WithUID(uid string) *V1UsersStatusLoginModeParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 users status login mode params +func (o *V1UsersStatusLoginModeParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1UsersStatusLoginModeParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_users_status_login_mode_responses.go b/api/client/v1/v1_users_status_login_mode_responses.go new file mode 100644 index 00000000..3b8dc4e3 --- /dev/null +++ b/api/client/v1/v1_users_status_login_mode_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1UsersStatusLoginModeReader is a Reader for the V1UsersStatusLoginMode structure. +type V1UsersStatusLoginModeReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1UsersStatusLoginModeReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1UsersStatusLoginModeNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1UsersStatusLoginModeNoContent creates a V1UsersStatusLoginModeNoContent with default headers values +func NewV1UsersStatusLoginModeNoContent() *V1UsersStatusLoginModeNoContent { + return &V1UsersStatusLoginModeNoContent{} +} + +/* +V1UsersStatusLoginModeNoContent handles this case with default header values. + +The resource was updated successfully +*/ +type V1UsersStatusLoginModeNoContent struct { +} + +func (o *V1UsersStatusLoginModeNoContent) Error() string { + return fmt.Sprintf("[PATCH /v1/users/{uid}/status/loginMode][%d] v1UsersStatusLoginModeNoContent ", 204) +} + +func (o *V1UsersStatusLoginModeNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_users_summary_get_parameters.go b/api/client/v1/v1_users_summary_get_parameters.go new file mode 100644 index 00000000..8c081a7e --- /dev/null +++ b/api/client/v1/v1_users_summary_get_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1UsersSummaryGetParams creates a new V1UsersSummaryGetParams object +// with the default values initialized. +func NewV1UsersSummaryGetParams() *V1UsersSummaryGetParams { + var () + return &V1UsersSummaryGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1UsersSummaryGetParamsWithTimeout creates a new V1UsersSummaryGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1UsersSummaryGetParamsWithTimeout(timeout time.Duration) *V1UsersSummaryGetParams { + var () + return &V1UsersSummaryGetParams{ + + timeout: timeout, + } +} + +// NewV1UsersSummaryGetParamsWithContext creates a new V1UsersSummaryGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1UsersSummaryGetParamsWithContext(ctx context.Context) *V1UsersSummaryGetParams { + var () + return &V1UsersSummaryGetParams{ + + Context: ctx, + } +} + +// NewV1UsersSummaryGetParamsWithHTTPClient creates a new V1UsersSummaryGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1UsersSummaryGetParamsWithHTTPClient(client *http.Client) *V1UsersSummaryGetParams { + var () + return &V1UsersSummaryGetParams{ + HTTPClient: client, + } +} + +/* +V1UsersSummaryGetParams contains all the parameters to send to the API endpoint +for the v1 users summary get operation typically these are written to a http.Request +*/ +type V1UsersSummaryGetParams struct { + + /*Body*/ + Body *models.V1UsersSummarySpec + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 users summary get params +func (o *V1UsersSummaryGetParams) WithTimeout(timeout time.Duration) *V1UsersSummaryGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 users summary get params +func (o *V1UsersSummaryGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 users summary get params +func (o *V1UsersSummaryGetParams) WithContext(ctx context.Context) *V1UsersSummaryGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 users summary get params +func (o *V1UsersSummaryGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 users summary get params +func (o *V1UsersSummaryGetParams) WithHTTPClient(client *http.Client) *V1UsersSummaryGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 users summary get params +func (o *V1UsersSummaryGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 users summary get params +func (o *V1UsersSummaryGetParams) WithBody(body *models.V1UsersSummarySpec) *V1UsersSummaryGetParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 users summary get params +func (o *V1UsersSummaryGetParams) SetBody(body *models.V1UsersSummarySpec) { + o.Body = body +} + +// WriteToRequest writes these params to a swagger request +func (o *V1UsersSummaryGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_users_summary_get_responses.go b/api/client/v1/v1_users_summary_get_responses.go new file mode 100644 index 00000000..862f29ed --- /dev/null +++ b/api/client/v1/v1_users_summary_get_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1UsersSummaryGetReader is a Reader for the V1UsersSummaryGet structure. +type V1UsersSummaryGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1UsersSummaryGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1UsersSummaryGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1UsersSummaryGetOK creates a V1UsersSummaryGetOK with default headers values +func NewV1UsersSummaryGetOK() *V1UsersSummaryGetOK { + return &V1UsersSummaryGetOK{} +} + +/* +V1UsersSummaryGetOK handles this case with default header values. + +An array of users summary items +*/ +type V1UsersSummaryGetOK struct { + Payload *models.V1UsersSummaryList +} + +func (o *V1UsersSummaryGetOK) Error() string { + return fmt.Sprintf("[POST /v1/users/summary][%d] v1UsersSummaryGetOK %+v", 200, o.Payload) +} + +func (o *V1UsersSummaryGetOK) GetPayload() *models.V1UsersSummaryList { + return o.Payload +} + +func (o *V1UsersSummaryGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1UsersSummaryList) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_users_system_feature_parameters.go b/api/client/v1/v1_users_system_feature_parameters.go new file mode 100644 index 00000000..6742e4ec --- /dev/null +++ b/api/client/v1/v1_users_system_feature_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1UsersSystemFeatureParams creates a new V1UsersSystemFeatureParams object +// with the default values initialized. +func NewV1UsersSystemFeatureParams() *V1UsersSystemFeatureParams { + + return &V1UsersSystemFeatureParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1UsersSystemFeatureParamsWithTimeout creates a new V1UsersSystemFeatureParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1UsersSystemFeatureParamsWithTimeout(timeout time.Duration) *V1UsersSystemFeatureParams { + + return &V1UsersSystemFeatureParams{ + + timeout: timeout, + } +} + +// NewV1UsersSystemFeatureParamsWithContext creates a new V1UsersSystemFeatureParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1UsersSystemFeatureParamsWithContext(ctx context.Context) *V1UsersSystemFeatureParams { + + return &V1UsersSystemFeatureParams{ + + Context: ctx, + } +} + +// NewV1UsersSystemFeatureParamsWithHTTPClient creates a new V1UsersSystemFeatureParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1UsersSystemFeatureParamsWithHTTPClient(client *http.Client) *V1UsersSystemFeatureParams { + + return &V1UsersSystemFeatureParams{ + HTTPClient: client, + } +} + +/* +V1UsersSystemFeatureParams contains all the parameters to send to the API endpoint +for the v1 users system feature operation typically these are written to a http.Request +*/ +type V1UsersSystemFeatureParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 users system feature params +func (o *V1UsersSystemFeatureParams) WithTimeout(timeout time.Duration) *V1UsersSystemFeatureParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 users system feature params +func (o *V1UsersSystemFeatureParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 users system feature params +func (o *V1UsersSystemFeatureParams) WithContext(ctx context.Context) *V1UsersSystemFeatureParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 users system feature params +func (o *V1UsersSystemFeatureParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 users system feature params +func (o *V1UsersSystemFeatureParams) WithHTTPClient(client *http.Client) *V1UsersSystemFeatureParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 users system feature params +func (o *V1UsersSystemFeatureParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *V1UsersSystemFeatureParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_users_system_feature_responses.go b/api/client/v1/v1_users_system_feature_responses.go new file mode 100644 index 00000000..50286bce --- /dev/null +++ b/api/client/v1/v1_users_system_feature_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1UsersSystemFeatureReader is a Reader for the V1UsersSystemFeature structure. +type V1UsersSystemFeatureReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1UsersSystemFeatureReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1UsersSystemFeatureOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1UsersSystemFeatureOK creates a V1UsersSystemFeatureOK with default headers values +func NewV1UsersSystemFeatureOK() *V1UsersSystemFeatureOK { + return &V1UsersSystemFeatureOK{} +} + +/* +V1UsersSystemFeatureOK handles this case with default header values. + +OK +*/ +type V1UsersSystemFeatureOK struct { + Payload *models.V1SystemFeatures +} + +func (o *V1UsersSystemFeatureOK) Error() string { + return fmt.Sprintf("[GET /v1/users/system/features][%d] v1UsersSystemFeatureOK %+v", 200, o.Payload) +} + +func (o *V1UsersSystemFeatureOK) GetPayload() *models.V1SystemFeatures { + return o.Payload +} + +func (o *V1UsersSystemFeatureOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1SystemFeatures) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_users_system_macros_create_parameters.go b/api/client/v1/v1_users_system_macros_create_parameters.go new file mode 100644 index 00000000..614623ed --- /dev/null +++ b/api/client/v1/v1_users_system_macros_create_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1UsersSystemMacrosCreateParams creates a new V1UsersSystemMacrosCreateParams object +// with the default values initialized. +func NewV1UsersSystemMacrosCreateParams() *V1UsersSystemMacrosCreateParams { + var () + return &V1UsersSystemMacrosCreateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1UsersSystemMacrosCreateParamsWithTimeout creates a new V1UsersSystemMacrosCreateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1UsersSystemMacrosCreateParamsWithTimeout(timeout time.Duration) *V1UsersSystemMacrosCreateParams { + var () + return &V1UsersSystemMacrosCreateParams{ + + timeout: timeout, + } +} + +// NewV1UsersSystemMacrosCreateParamsWithContext creates a new V1UsersSystemMacrosCreateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1UsersSystemMacrosCreateParamsWithContext(ctx context.Context) *V1UsersSystemMacrosCreateParams { + var () + return &V1UsersSystemMacrosCreateParams{ + + Context: ctx, + } +} + +// NewV1UsersSystemMacrosCreateParamsWithHTTPClient creates a new V1UsersSystemMacrosCreateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1UsersSystemMacrosCreateParamsWithHTTPClient(client *http.Client) *V1UsersSystemMacrosCreateParams { + var () + return &V1UsersSystemMacrosCreateParams{ + HTTPClient: client, + } +} + +/* +V1UsersSystemMacrosCreateParams contains all the parameters to send to the API endpoint +for the v1 users system macros create operation typically these are written to a http.Request +*/ +type V1UsersSystemMacrosCreateParams struct { + + /*Body*/ + Body *models.V1Macros + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 users system macros create params +func (o *V1UsersSystemMacrosCreateParams) WithTimeout(timeout time.Duration) *V1UsersSystemMacrosCreateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 users system macros create params +func (o *V1UsersSystemMacrosCreateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 users system macros create params +func (o *V1UsersSystemMacrosCreateParams) WithContext(ctx context.Context) *V1UsersSystemMacrosCreateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 users system macros create params +func (o *V1UsersSystemMacrosCreateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 users system macros create params +func (o *V1UsersSystemMacrosCreateParams) WithHTTPClient(client *http.Client) *V1UsersSystemMacrosCreateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 users system macros create params +func (o *V1UsersSystemMacrosCreateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 users system macros create params +func (o *V1UsersSystemMacrosCreateParams) WithBody(body *models.V1Macros) *V1UsersSystemMacrosCreateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 users system macros create params +func (o *V1UsersSystemMacrosCreateParams) SetBody(body *models.V1Macros) { + o.Body = body +} + +// WriteToRequest writes these params to a swagger request +func (o *V1UsersSystemMacrosCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_users_system_macros_create_responses.go b/api/client/v1/v1_users_system_macros_create_responses.go new file mode 100644 index 00000000..edc8b7bd --- /dev/null +++ b/api/client/v1/v1_users_system_macros_create_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1UsersSystemMacrosCreateReader is a Reader for the V1UsersSystemMacrosCreate structure. +type V1UsersSystemMacrosCreateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1UsersSystemMacrosCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1UsersSystemMacrosCreateNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1UsersSystemMacrosCreateNoContent creates a V1UsersSystemMacrosCreateNoContent with default headers values +func NewV1UsersSystemMacrosCreateNoContent() *V1UsersSystemMacrosCreateNoContent { + return &V1UsersSystemMacrosCreateNoContent{} +} + +/* +V1UsersSystemMacrosCreateNoContent handles this case with default header values. + +The resource was updated successfully +*/ +type V1UsersSystemMacrosCreateNoContent struct { +} + +func (o *V1UsersSystemMacrosCreateNoContent) Error() string { + return fmt.Sprintf("[POST /v1/users/system/macros][%d] v1UsersSystemMacrosCreateNoContent ", 204) +} + +func (o *V1UsersSystemMacrosCreateNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_users_system_macros_delete_by_macro_name_parameters.go b/api/client/v1/v1_users_system_macros_delete_by_macro_name_parameters.go new file mode 100644 index 00000000..bf907730 --- /dev/null +++ b/api/client/v1/v1_users_system_macros_delete_by_macro_name_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1UsersSystemMacrosDeleteByMacroNameParams creates a new V1UsersSystemMacrosDeleteByMacroNameParams object +// with the default values initialized. +func NewV1UsersSystemMacrosDeleteByMacroNameParams() *V1UsersSystemMacrosDeleteByMacroNameParams { + var () + return &V1UsersSystemMacrosDeleteByMacroNameParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1UsersSystemMacrosDeleteByMacroNameParamsWithTimeout creates a new V1UsersSystemMacrosDeleteByMacroNameParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1UsersSystemMacrosDeleteByMacroNameParamsWithTimeout(timeout time.Duration) *V1UsersSystemMacrosDeleteByMacroNameParams { + var () + return &V1UsersSystemMacrosDeleteByMacroNameParams{ + + timeout: timeout, + } +} + +// NewV1UsersSystemMacrosDeleteByMacroNameParamsWithContext creates a new V1UsersSystemMacrosDeleteByMacroNameParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1UsersSystemMacrosDeleteByMacroNameParamsWithContext(ctx context.Context) *V1UsersSystemMacrosDeleteByMacroNameParams { + var () + return &V1UsersSystemMacrosDeleteByMacroNameParams{ + + Context: ctx, + } +} + +// NewV1UsersSystemMacrosDeleteByMacroNameParamsWithHTTPClient creates a new V1UsersSystemMacrosDeleteByMacroNameParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1UsersSystemMacrosDeleteByMacroNameParamsWithHTTPClient(client *http.Client) *V1UsersSystemMacrosDeleteByMacroNameParams { + var () + return &V1UsersSystemMacrosDeleteByMacroNameParams{ + HTTPClient: client, + } +} + +/* +V1UsersSystemMacrosDeleteByMacroNameParams contains all the parameters to send to the API endpoint +for the v1 users system macros delete by macro name operation typically these are written to a http.Request +*/ +type V1UsersSystemMacrosDeleteByMacroNameParams struct { + + /*Body*/ + Body *models.V1Macros + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 users system macros delete by macro name params +func (o *V1UsersSystemMacrosDeleteByMacroNameParams) WithTimeout(timeout time.Duration) *V1UsersSystemMacrosDeleteByMacroNameParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 users system macros delete by macro name params +func (o *V1UsersSystemMacrosDeleteByMacroNameParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 users system macros delete by macro name params +func (o *V1UsersSystemMacrosDeleteByMacroNameParams) WithContext(ctx context.Context) *V1UsersSystemMacrosDeleteByMacroNameParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 users system macros delete by macro name params +func (o *V1UsersSystemMacrosDeleteByMacroNameParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 users system macros delete by macro name params +func (o *V1UsersSystemMacrosDeleteByMacroNameParams) WithHTTPClient(client *http.Client) *V1UsersSystemMacrosDeleteByMacroNameParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 users system macros delete by macro name params +func (o *V1UsersSystemMacrosDeleteByMacroNameParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 users system macros delete by macro name params +func (o *V1UsersSystemMacrosDeleteByMacroNameParams) WithBody(body *models.V1Macros) *V1UsersSystemMacrosDeleteByMacroNameParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 users system macros delete by macro name params +func (o *V1UsersSystemMacrosDeleteByMacroNameParams) SetBody(body *models.V1Macros) { + o.Body = body +} + +// WriteToRequest writes these params to a swagger request +func (o *V1UsersSystemMacrosDeleteByMacroNameParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_users_system_macros_delete_by_macro_name_responses.go b/api/client/v1/v1_users_system_macros_delete_by_macro_name_responses.go new file mode 100644 index 00000000..03ccbdac --- /dev/null +++ b/api/client/v1/v1_users_system_macros_delete_by_macro_name_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1UsersSystemMacrosDeleteByMacroNameReader is a Reader for the V1UsersSystemMacrosDeleteByMacroName structure. +type V1UsersSystemMacrosDeleteByMacroNameReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1UsersSystemMacrosDeleteByMacroNameReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1UsersSystemMacrosDeleteByMacroNameNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1UsersSystemMacrosDeleteByMacroNameNoContent creates a V1UsersSystemMacrosDeleteByMacroNameNoContent with default headers values +func NewV1UsersSystemMacrosDeleteByMacroNameNoContent() *V1UsersSystemMacrosDeleteByMacroNameNoContent { + return &V1UsersSystemMacrosDeleteByMacroNameNoContent{} +} + +/* +V1UsersSystemMacrosDeleteByMacroNameNoContent handles this case with default header values. + +The resource was updated successfully +*/ +type V1UsersSystemMacrosDeleteByMacroNameNoContent struct { +} + +func (o *V1UsersSystemMacrosDeleteByMacroNameNoContent) Error() string { + return fmt.Sprintf("[DELETE /v1/users/system/macros][%d] v1UsersSystemMacrosDeleteByMacroNameNoContent ", 204) +} + +func (o *V1UsersSystemMacrosDeleteByMacroNameNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_users_system_macros_list_parameters.go b/api/client/v1/v1_users_system_macros_list_parameters.go new file mode 100644 index 00000000..2fb024d2 --- /dev/null +++ b/api/client/v1/v1_users_system_macros_list_parameters.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1UsersSystemMacrosListParams creates a new V1UsersSystemMacrosListParams object +// with the default values initialized. +func NewV1UsersSystemMacrosListParams() *V1UsersSystemMacrosListParams { + + return &V1UsersSystemMacrosListParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1UsersSystemMacrosListParamsWithTimeout creates a new V1UsersSystemMacrosListParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1UsersSystemMacrosListParamsWithTimeout(timeout time.Duration) *V1UsersSystemMacrosListParams { + + return &V1UsersSystemMacrosListParams{ + + timeout: timeout, + } +} + +// NewV1UsersSystemMacrosListParamsWithContext creates a new V1UsersSystemMacrosListParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1UsersSystemMacrosListParamsWithContext(ctx context.Context) *V1UsersSystemMacrosListParams { + + return &V1UsersSystemMacrosListParams{ + + Context: ctx, + } +} + +// NewV1UsersSystemMacrosListParamsWithHTTPClient creates a new V1UsersSystemMacrosListParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1UsersSystemMacrosListParamsWithHTTPClient(client *http.Client) *V1UsersSystemMacrosListParams { + + return &V1UsersSystemMacrosListParams{ + HTTPClient: client, + } +} + +/* +V1UsersSystemMacrosListParams contains all the parameters to send to the API endpoint +for the v1 users system macros list operation typically these are written to a http.Request +*/ +type V1UsersSystemMacrosListParams struct { + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 users system macros list params +func (o *V1UsersSystemMacrosListParams) WithTimeout(timeout time.Duration) *V1UsersSystemMacrosListParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 users system macros list params +func (o *V1UsersSystemMacrosListParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 users system macros list params +func (o *V1UsersSystemMacrosListParams) WithContext(ctx context.Context) *V1UsersSystemMacrosListParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 users system macros list params +func (o *V1UsersSystemMacrosListParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 users system macros list params +func (o *V1UsersSystemMacrosListParams) WithHTTPClient(client *http.Client) *V1UsersSystemMacrosListParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 users system macros list params +func (o *V1UsersSystemMacrosListParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WriteToRequest writes these params to a swagger request +func (o *V1UsersSystemMacrosListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_users_system_macros_list_responses.go b/api/client/v1/v1_users_system_macros_list_responses.go new file mode 100644 index 00000000..906c8748 --- /dev/null +++ b/api/client/v1/v1_users_system_macros_list_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1UsersSystemMacrosListReader is a Reader for the V1UsersSystemMacrosList structure. +type V1UsersSystemMacrosListReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1UsersSystemMacrosListReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1UsersSystemMacrosListOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1UsersSystemMacrosListOK creates a V1UsersSystemMacrosListOK with default headers values +func NewV1UsersSystemMacrosListOK() *V1UsersSystemMacrosListOK { + return &V1UsersSystemMacrosListOK{} +} + +/* +V1UsersSystemMacrosListOK handles this case with default header values. + +OK +*/ +type V1UsersSystemMacrosListOK struct { + Payload *models.V1Macros +} + +func (o *V1UsersSystemMacrosListOK) Error() string { + return fmt.Sprintf("[GET /v1/users/system/macros][%d] v1UsersSystemMacrosListOK %+v", 200, o.Payload) +} + +func (o *V1UsersSystemMacrosListOK) GetPayload() *models.V1Macros { + return o.Payload +} + +func (o *V1UsersSystemMacrosListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1Macros) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_users_system_macros_update_by_macro_name_parameters.go b/api/client/v1/v1_users_system_macros_update_by_macro_name_parameters.go new file mode 100644 index 00000000..dffa0422 --- /dev/null +++ b/api/client/v1/v1_users_system_macros_update_by_macro_name_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1UsersSystemMacrosUpdateByMacroNameParams creates a new V1UsersSystemMacrosUpdateByMacroNameParams object +// with the default values initialized. +func NewV1UsersSystemMacrosUpdateByMacroNameParams() *V1UsersSystemMacrosUpdateByMacroNameParams { + var () + return &V1UsersSystemMacrosUpdateByMacroNameParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1UsersSystemMacrosUpdateByMacroNameParamsWithTimeout creates a new V1UsersSystemMacrosUpdateByMacroNameParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1UsersSystemMacrosUpdateByMacroNameParamsWithTimeout(timeout time.Duration) *V1UsersSystemMacrosUpdateByMacroNameParams { + var () + return &V1UsersSystemMacrosUpdateByMacroNameParams{ + + timeout: timeout, + } +} + +// NewV1UsersSystemMacrosUpdateByMacroNameParamsWithContext creates a new V1UsersSystemMacrosUpdateByMacroNameParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1UsersSystemMacrosUpdateByMacroNameParamsWithContext(ctx context.Context) *V1UsersSystemMacrosUpdateByMacroNameParams { + var () + return &V1UsersSystemMacrosUpdateByMacroNameParams{ + + Context: ctx, + } +} + +// NewV1UsersSystemMacrosUpdateByMacroNameParamsWithHTTPClient creates a new V1UsersSystemMacrosUpdateByMacroNameParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1UsersSystemMacrosUpdateByMacroNameParamsWithHTTPClient(client *http.Client) *V1UsersSystemMacrosUpdateByMacroNameParams { + var () + return &V1UsersSystemMacrosUpdateByMacroNameParams{ + HTTPClient: client, + } +} + +/* +V1UsersSystemMacrosUpdateByMacroNameParams contains all the parameters to send to the API endpoint +for the v1 users system macros update by macro name operation typically these are written to a http.Request +*/ +type V1UsersSystemMacrosUpdateByMacroNameParams struct { + + /*Body*/ + Body *models.V1Macros + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 users system macros update by macro name params +func (o *V1UsersSystemMacrosUpdateByMacroNameParams) WithTimeout(timeout time.Duration) *V1UsersSystemMacrosUpdateByMacroNameParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 users system macros update by macro name params +func (o *V1UsersSystemMacrosUpdateByMacroNameParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 users system macros update by macro name params +func (o *V1UsersSystemMacrosUpdateByMacroNameParams) WithContext(ctx context.Context) *V1UsersSystemMacrosUpdateByMacroNameParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 users system macros update by macro name params +func (o *V1UsersSystemMacrosUpdateByMacroNameParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 users system macros update by macro name params +func (o *V1UsersSystemMacrosUpdateByMacroNameParams) WithHTTPClient(client *http.Client) *V1UsersSystemMacrosUpdateByMacroNameParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 users system macros update by macro name params +func (o *V1UsersSystemMacrosUpdateByMacroNameParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 users system macros update by macro name params +func (o *V1UsersSystemMacrosUpdateByMacroNameParams) WithBody(body *models.V1Macros) *V1UsersSystemMacrosUpdateByMacroNameParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 users system macros update by macro name params +func (o *V1UsersSystemMacrosUpdateByMacroNameParams) SetBody(body *models.V1Macros) { + o.Body = body +} + +// WriteToRequest writes these params to a swagger request +func (o *V1UsersSystemMacrosUpdateByMacroNameParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_users_system_macros_update_by_macro_name_responses.go b/api/client/v1/v1_users_system_macros_update_by_macro_name_responses.go new file mode 100644 index 00000000..137cc77c --- /dev/null +++ b/api/client/v1/v1_users_system_macros_update_by_macro_name_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1UsersSystemMacrosUpdateByMacroNameReader is a Reader for the V1UsersSystemMacrosUpdateByMacroName structure. +type V1UsersSystemMacrosUpdateByMacroNameReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1UsersSystemMacrosUpdateByMacroNameReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1UsersSystemMacrosUpdateByMacroNameNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1UsersSystemMacrosUpdateByMacroNameNoContent creates a V1UsersSystemMacrosUpdateByMacroNameNoContent with default headers values +func NewV1UsersSystemMacrosUpdateByMacroNameNoContent() *V1UsersSystemMacrosUpdateByMacroNameNoContent { + return &V1UsersSystemMacrosUpdateByMacroNameNoContent{} +} + +/* +V1UsersSystemMacrosUpdateByMacroNameNoContent handles this case with default header values. + +The resource was updated successfully +*/ +type V1UsersSystemMacrosUpdateByMacroNameNoContent struct { +} + +func (o *V1UsersSystemMacrosUpdateByMacroNameNoContent) Error() string { + return fmt.Sprintf("[PATCH /v1/users/system/macros][%d] v1UsersSystemMacrosUpdateByMacroNameNoContent ", 204) +} + +func (o *V1UsersSystemMacrosUpdateByMacroNameNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_users_system_macros_update_parameters.go b/api/client/v1/v1_users_system_macros_update_parameters.go new file mode 100644 index 00000000..c5eb456a --- /dev/null +++ b/api/client/v1/v1_users_system_macros_update_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1UsersSystemMacrosUpdateParams creates a new V1UsersSystemMacrosUpdateParams object +// with the default values initialized. +func NewV1UsersSystemMacrosUpdateParams() *V1UsersSystemMacrosUpdateParams { + var () + return &V1UsersSystemMacrosUpdateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1UsersSystemMacrosUpdateParamsWithTimeout creates a new V1UsersSystemMacrosUpdateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1UsersSystemMacrosUpdateParamsWithTimeout(timeout time.Duration) *V1UsersSystemMacrosUpdateParams { + var () + return &V1UsersSystemMacrosUpdateParams{ + + timeout: timeout, + } +} + +// NewV1UsersSystemMacrosUpdateParamsWithContext creates a new V1UsersSystemMacrosUpdateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1UsersSystemMacrosUpdateParamsWithContext(ctx context.Context) *V1UsersSystemMacrosUpdateParams { + var () + return &V1UsersSystemMacrosUpdateParams{ + + Context: ctx, + } +} + +// NewV1UsersSystemMacrosUpdateParamsWithHTTPClient creates a new V1UsersSystemMacrosUpdateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1UsersSystemMacrosUpdateParamsWithHTTPClient(client *http.Client) *V1UsersSystemMacrosUpdateParams { + var () + return &V1UsersSystemMacrosUpdateParams{ + HTTPClient: client, + } +} + +/* +V1UsersSystemMacrosUpdateParams contains all the parameters to send to the API endpoint +for the v1 users system macros update operation typically these are written to a http.Request +*/ +type V1UsersSystemMacrosUpdateParams struct { + + /*Body*/ + Body *models.V1Macros + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 users system macros update params +func (o *V1UsersSystemMacrosUpdateParams) WithTimeout(timeout time.Duration) *V1UsersSystemMacrosUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 users system macros update params +func (o *V1UsersSystemMacrosUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 users system macros update params +func (o *V1UsersSystemMacrosUpdateParams) WithContext(ctx context.Context) *V1UsersSystemMacrosUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 users system macros update params +func (o *V1UsersSystemMacrosUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 users system macros update params +func (o *V1UsersSystemMacrosUpdateParams) WithHTTPClient(client *http.Client) *V1UsersSystemMacrosUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 users system macros update params +func (o *V1UsersSystemMacrosUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 users system macros update params +func (o *V1UsersSystemMacrosUpdateParams) WithBody(body *models.V1Macros) *V1UsersSystemMacrosUpdateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 users system macros update params +func (o *V1UsersSystemMacrosUpdateParams) SetBody(body *models.V1Macros) { + o.Body = body +} + +// WriteToRequest writes these params to a swagger request +func (o *V1UsersSystemMacrosUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_users_system_macros_update_responses.go b/api/client/v1/v1_users_system_macros_update_responses.go new file mode 100644 index 00000000..d8a40f45 --- /dev/null +++ b/api/client/v1/v1_users_system_macros_update_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1UsersSystemMacrosUpdateReader is a Reader for the V1UsersSystemMacrosUpdate structure. +type V1UsersSystemMacrosUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1UsersSystemMacrosUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1UsersSystemMacrosUpdateNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1UsersSystemMacrosUpdateNoContent creates a V1UsersSystemMacrosUpdateNoContent with default headers values +func NewV1UsersSystemMacrosUpdateNoContent() *V1UsersSystemMacrosUpdateNoContent { + return &V1UsersSystemMacrosUpdateNoContent{} +} + +/* +V1UsersSystemMacrosUpdateNoContent handles this case with default header values. + +The resource was updated successfully +*/ +type V1UsersSystemMacrosUpdateNoContent struct { +} + +func (o *V1UsersSystemMacrosUpdateNoContent) Error() string { + return fmt.Sprintf("[PUT /v1/users/system/macros][%d] v1UsersSystemMacrosUpdateNoContent ", 204) +} + +func (o *V1UsersSystemMacrosUpdateNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_users_uid_delete_parameters.go b/api/client/v1/v1_users_uid_delete_parameters.go new file mode 100644 index 00000000..d096a53b --- /dev/null +++ b/api/client/v1/v1_users_uid_delete_parameters.go @@ -0,0 +1,133 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1UsersUIDDeleteParams creates a new V1UsersUIDDeleteParams object +// with the default values initialized. +func NewV1UsersUIDDeleteParams() *V1UsersUIDDeleteParams { + var () + return &V1UsersUIDDeleteParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1UsersUIDDeleteParamsWithTimeout creates a new V1UsersUIDDeleteParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1UsersUIDDeleteParamsWithTimeout(timeout time.Duration) *V1UsersUIDDeleteParams { + var () + return &V1UsersUIDDeleteParams{ + + timeout: timeout, + } +} + +// NewV1UsersUIDDeleteParamsWithContext creates a new V1UsersUIDDeleteParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1UsersUIDDeleteParamsWithContext(ctx context.Context) *V1UsersUIDDeleteParams { + var () + return &V1UsersUIDDeleteParams{ + + Context: ctx, + } +} + +// NewV1UsersUIDDeleteParamsWithHTTPClient creates a new V1UsersUIDDeleteParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1UsersUIDDeleteParamsWithHTTPClient(client *http.Client) *V1UsersUIDDeleteParams { + var () + return &V1UsersUIDDeleteParams{ + HTTPClient: client, + } +} + +/* +V1UsersUIDDeleteParams contains all the parameters to send to the API endpoint +for the v1 users Uid delete operation typically these are written to a http.Request +*/ +type V1UsersUIDDeleteParams struct { + + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 users Uid delete params +func (o *V1UsersUIDDeleteParams) WithTimeout(timeout time.Duration) *V1UsersUIDDeleteParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 users Uid delete params +func (o *V1UsersUIDDeleteParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 users Uid delete params +func (o *V1UsersUIDDeleteParams) WithContext(ctx context.Context) *V1UsersUIDDeleteParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 users Uid delete params +func (o *V1UsersUIDDeleteParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 users Uid delete params +func (o *V1UsersUIDDeleteParams) WithHTTPClient(client *http.Client) *V1UsersUIDDeleteParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 users Uid delete params +func (o *V1UsersUIDDeleteParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithUID adds the uid to the v1 users Uid delete params +func (o *V1UsersUIDDeleteParams) WithUID(uid string) *V1UsersUIDDeleteParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 users Uid delete params +func (o *V1UsersUIDDeleteParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1UsersUIDDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_users_uid_delete_responses.go b/api/client/v1/v1_users_uid_delete_responses.go new file mode 100644 index 00000000..accacf16 --- /dev/null +++ b/api/client/v1/v1_users_uid_delete_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1UsersUIDDeleteReader is a Reader for the V1UsersUIDDelete structure. +type V1UsersUIDDeleteReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1UsersUIDDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1UsersUIDDeleteNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1UsersUIDDeleteNoContent creates a V1UsersUIDDeleteNoContent with default headers values +func NewV1UsersUIDDeleteNoContent() *V1UsersUIDDeleteNoContent { + return &V1UsersUIDDeleteNoContent{} +} + +/* +V1UsersUIDDeleteNoContent handles this case with default header values. + +The resource was deleted successfully +*/ +type V1UsersUIDDeleteNoContent struct { +} + +func (o *V1UsersUIDDeleteNoContent) Error() string { + return fmt.Sprintf("[DELETE /v1/users/{uid}][%d] v1UsersUidDeleteNoContent ", 204) +} + +func (o *V1UsersUIDDeleteNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_users_uid_get_parameters.go b/api/client/v1/v1_users_uid_get_parameters.go new file mode 100644 index 00000000..eba03e8f --- /dev/null +++ b/api/client/v1/v1_users_uid_get_parameters.go @@ -0,0 +1,133 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1UsersUIDGetParams creates a new V1UsersUIDGetParams object +// with the default values initialized. +func NewV1UsersUIDGetParams() *V1UsersUIDGetParams { + var () + return &V1UsersUIDGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1UsersUIDGetParamsWithTimeout creates a new V1UsersUIDGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1UsersUIDGetParamsWithTimeout(timeout time.Duration) *V1UsersUIDGetParams { + var () + return &V1UsersUIDGetParams{ + + timeout: timeout, + } +} + +// NewV1UsersUIDGetParamsWithContext creates a new V1UsersUIDGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1UsersUIDGetParamsWithContext(ctx context.Context) *V1UsersUIDGetParams { + var () + return &V1UsersUIDGetParams{ + + Context: ctx, + } +} + +// NewV1UsersUIDGetParamsWithHTTPClient creates a new V1UsersUIDGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1UsersUIDGetParamsWithHTTPClient(client *http.Client) *V1UsersUIDGetParams { + var () + return &V1UsersUIDGetParams{ + HTTPClient: client, + } +} + +/* +V1UsersUIDGetParams contains all the parameters to send to the API endpoint +for the v1 users Uid get operation typically these are written to a http.Request +*/ +type V1UsersUIDGetParams struct { + + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 users Uid get params +func (o *V1UsersUIDGetParams) WithTimeout(timeout time.Duration) *V1UsersUIDGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 users Uid get params +func (o *V1UsersUIDGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 users Uid get params +func (o *V1UsersUIDGetParams) WithContext(ctx context.Context) *V1UsersUIDGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 users Uid get params +func (o *V1UsersUIDGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 users Uid get params +func (o *V1UsersUIDGetParams) WithHTTPClient(client *http.Client) *V1UsersUIDGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 users Uid get params +func (o *V1UsersUIDGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithUID adds the uid to the v1 users Uid get params +func (o *V1UsersUIDGetParams) WithUID(uid string) *V1UsersUIDGetParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 users Uid get params +func (o *V1UsersUIDGetParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1UsersUIDGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_users_uid_get_responses.go b/api/client/v1/v1_users_uid_get_responses.go new file mode 100644 index 00000000..c09a0c0b --- /dev/null +++ b/api/client/v1/v1_users_uid_get_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1UsersUIDGetReader is a Reader for the V1UsersUIDGet structure. +type V1UsersUIDGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1UsersUIDGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1UsersUIDGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1UsersUIDGetOK creates a V1UsersUIDGetOK with default headers values +func NewV1UsersUIDGetOK() *V1UsersUIDGetOK { + return &V1UsersUIDGetOK{} +} + +/* +V1UsersUIDGetOK handles this case with default header values. + +OK +*/ +type V1UsersUIDGetOK struct { + Payload *models.V1User +} + +func (o *V1UsersUIDGetOK) Error() string { + return fmt.Sprintf("[GET /v1/users/{uid}][%d] v1UsersUidGetOK %+v", 200, o.Payload) +} + +func (o *V1UsersUIDGetOK) GetPayload() *models.V1User { + return o.Payload +} + +func (o *V1UsersUIDGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1User) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_users_uid_password_change_parameters.go b/api/client/v1/v1_users_uid_password_change_parameters.go new file mode 100644 index 00000000..9532d73f --- /dev/null +++ b/api/client/v1/v1_users_uid_password_change_parameters.go @@ -0,0 +1,150 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1UsersUIDPasswordChangeParams creates a new V1UsersUIDPasswordChangeParams object +// with the default values initialized. +func NewV1UsersUIDPasswordChangeParams() *V1UsersUIDPasswordChangeParams { + var () + return &V1UsersUIDPasswordChangeParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1UsersUIDPasswordChangeParamsWithTimeout creates a new V1UsersUIDPasswordChangeParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1UsersUIDPasswordChangeParamsWithTimeout(timeout time.Duration) *V1UsersUIDPasswordChangeParams { + var () + return &V1UsersUIDPasswordChangeParams{ + + timeout: timeout, + } +} + +// NewV1UsersUIDPasswordChangeParamsWithContext creates a new V1UsersUIDPasswordChangeParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1UsersUIDPasswordChangeParamsWithContext(ctx context.Context) *V1UsersUIDPasswordChangeParams { + var () + return &V1UsersUIDPasswordChangeParams{ + + Context: ctx, + } +} + +// NewV1UsersUIDPasswordChangeParamsWithHTTPClient creates a new V1UsersUIDPasswordChangeParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1UsersUIDPasswordChangeParamsWithHTTPClient(client *http.Client) *V1UsersUIDPasswordChangeParams { + var () + return &V1UsersUIDPasswordChangeParams{ + HTTPClient: client, + } +} + +/* +V1UsersUIDPasswordChangeParams contains all the parameters to send to the API endpoint +for the v1 users Uid password change operation typically these are written to a http.Request +*/ +type V1UsersUIDPasswordChangeParams struct { + + /*Body*/ + Body V1UsersUIDPasswordChangeBody + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 users Uid password change params +func (o *V1UsersUIDPasswordChangeParams) WithTimeout(timeout time.Duration) *V1UsersUIDPasswordChangeParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 users Uid password change params +func (o *V1UsersUIDPasswordChangeParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 users Uid password change params +func (o *V1UsersUIDPasswordChangeParams) WithContext(ctx context.Context) *V1UsersUIDPasswordChangeParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 users Uid password change params +func (o *V1UsersUIDPasswordChangeParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 users Uid password change params +func (o *V1UsersUIDPasswordChangeParams) WithHTTPClient(client *http.Client) *V1UsersUIDPasswordChangeParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 users Uid password change params +func (o *V1UsersUIDPasswordChangeParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 users Uid password change params +func (o *V1UsersUIDPasswordChangeParams) WithBody(body V1UsersUIDPasswordChangeBody) *V1UsersUIDPasswordChangeParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 users Uid password change params +func (o *V1UsersUIDPasswordChangeParams) SetBody(body V1UsersUIDPasswordChangeBody) { + o.Body = body +} + +// WithUID adds the uid to the v1 users Uid password change params +func (o *V1UsersUIDPasswordChangeParams) WithUID(uid string) *V1UsersUIDPasswordChangeParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 users Uid password change params +func (o *V1UsersUIDPasswordChangeParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1UsersUIDPasswordChangeParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_users_uid_password_change_responses.go b/api/client/v1/v1_users_uid_password_change_responses.go new file mode 100644 index 00000000..bfff2e78 --- /dev/null +++ b/api/client/v1/v1_users_uid_password_change_responses.go @@ -0,0 +1,119 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1UsersUIDPasswordChangeReader is a Reader for the V1UsersUIDPasswordChange structure. +type V1UsersUIDPasswordChangeReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1UsersUIDPasswordChangeReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1UsersUIDPasswordChangeNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1UsersUIDPasswordChangeNoContent creates a V1UsersUIDPasswordChangeNoContent with default headers values +func NewV1UsersUIDPasswordChangeNoContent() *V1UsersUIDPasswordChangeNoContent { + return &V1UsersUIDPasswordChangeNoContent{} +} + +/* +V1UsersUIDPasswordChangeNoContent handles this case with default header values. + +Ok response without content +*/ +type V1UsersUIDPasswordChangeNoContent struct { + /*Audit uid for the request + */ + AuditUID string +} + +func (o *V1UsersUIDPasswordChangeNoContent) Error() string { + return fmt.Sprintf("[PATCH /v1/users/{uid}/password/change][%d] v1UsersUidPasswordChangeNoContent ", 204) +} + +func (o *V1UsersUIDPasswordChangeNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header AuditUid + o.AuditUID = response.GetHeader("AuditUid") + + return nil +} + +/* +V1UsersUIDPasswordChangeBody v1 users UID password change body +swagger:model V1UsersUIDPasswordChangeBody +*/ +type V1UsersUIDPasswordChangeBody struct { + + // current password + CurrentPassword string `json:"currentPassword,omitempty"` + + // new password + // Required: true + NewPassword *string `json:"newPassword"` +} + +// Validate validates this v1 users UID password change body +func (o *V1UsersUIDPasswordChangeBody) Validate(formats strfmt.Registry) error { + var res []error + + if err := o.validateNewPassword(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (o *V1UsersUIDPasswordChangeBody) validateNewPassword(formats strfmt.Registry) error { + + if err := validate.Required("body"+"."+"newPassword", "body", o.NewPassword); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (o *V1UsersUIDPasswordChangeBody) MarshalBinary() ([]byte, error) { + if o == nil { + return nil, nil + } + return swag.WriteJSON(o) +} + +// UnmarshalBinary interface implementation +func (o *V1UsersUIDPasswordChangeBody) UnmarshalBinary(b []byte) error { + var res V1UsersUIDPasswordChangeBody + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *o = res + return nil +} diff --git a/api/client/v1/v1_users_uid_password_reset_parameters.go b/api/client/v1/v1_users_uid_password_reset_parameters.go new file mode 100644 index 00000000..94d379e7 --- /dev/null +++ b/api/client/v1/v1_users_uid_password_reset_parameters.go @@ -0,0 +1,133 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1UsersUIDPasswordResetParams creates a new V1UsersUIDPasswordResetParams object +// with the default values initialized. +func NewV1UsersUIDPasswordResetParams() *V1UsersUIDPasswordResetParams { + var () + return &V1UsersUIDPasswordResetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1UsersUIDPasswordResetParamsWithTimeout creates a new V1UsersUIDPasswordResetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1UsersUIDPasswordResetParamsWithTimeout(timeout time.Duration) *V1UsersUIDPasswordResetParams { + var () + return &V1UsersUIDPasswordResetParams{ + + timeout: timeout, + } +} + +// NewV1UsersUIDPasswordResetParamsWithContext creates a new V1UsersUIDPasswordResetParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1UsersUIDPasswordResetParamsWithContext(ctx context.Context) *V1UsersUIDPasswordResetParams { + var () + return &V1UsersUIDPasswordResetParams{ + + Context: ctx, + } +} + +// NewV1UsersUIDPasswordResetParamsWithHTTPClient creates a new V1UsersUIDPasswordResetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1UsersUIDPasswordResetParamsWithHTTPClient(client *http.Client) *V1UsersUIDPasswordResetParams { + var () + return &V1UsersUIDPasswordResetParams{ + HTTPClient: client, + } +} + +/* +V1UsersUIDPasswordResetParams contains all the parameters to send to the API endpoint +for the v1 users Uid password reset operation typically these are written to a http.Request +*/ +type V1UsersUIDPasswordResetParams struct { + + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 users Uid password reset params +func (o *V1UsersUIDPasswordResetParams) WithTimeout(timeout time.Duration) *V1UsersUIDPasswordResetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 users Uid password reset params +func (o *V1UsersUIDPasswordResetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 users Uid password reset params +func (o *V1UsersUIDPasswordResetParams) WithContext(ctx context.Context) *V1UsersUIDPasswordResetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 users Uid password reset params +func (o *V1UsersUIDPasswordResetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 users Uid password reset params +func (o *V1UsersUIDPasswordResetParams) WithHTTPClient(client *http.Client) *V1UsersUIDPasswordResetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 users Uid password reset params +func (o *V1UsersUIDPasswordResetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithUID adds the uid to the v1 users Uid password reset params +func (o *V1UsersUIDPasswordResetParams) WithUID(uid string) *V1UsersUIDPasswordResetParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 users Uid password reset params +func (o *V1UsersUIDPasswordResetParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1UsersUIDPasswordResetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_users_uid_password_reset_responses.go b/api/client/v1/v1_users_uid_password_reset_responses.go new file mode 100644 index 00000000..0501f9bb --- /dev/null +++ b/api/client/v1/v1_users_uid_password_reset_responses.go @@ -0,0 +1,61 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1UsersUIDPasswordResetReader is a Reader for the V1UsersUIDPasswordReset structure. +type V1UsersUIDPasswordResetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1UsersUIDPasswordResetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1UsersUIDPasswordResetNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1UsersUIDPasswordResetNoContent creates a V1UsersUIDPasswordResetNoContent with default headers values +func NewV1UsersUIDPasswordResetNoContent() *V1UsersUIDPasswordResetNoContent { + return &V1UsersUIDPasswordResetNoContent{} +} + +/* +V1UsersUIDPasswordResetNoContent handles this case with default header values. + +Ok response without content +*/ +type V1UsersUIDPasswordResetNoContent struct { + /*Audit uid for the request + */ + AuditUID string +} + +func (o *V1UsersUIDPasswordResetNoContent) Error() string { + return fmt.Sprintf("[PATCH /v1/users/{uid}/password/reset][%d] v1UsersUidPasswordResetNoContent ", 204) +} + +func (o *V1UsersUIDPasswordResetNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header AuditUid + o.AuditUID = response.GetHeader("AuditUid") + + return nil +} diff --git a/api/client/v1/v1_users_uid_patch_parameters.go b/api/client/v1/v1_users_uid_patch_parameters.go new file mode 100644 index 00000000..9e1170ac --- /dev/null +++ b/api/client/v1/v1_users_uid_patch_parameters.go @@ -0,0 +1,154 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1UsersUIDPatchParams creates a new V1UsersUIDPatchParams object +// with the default values initialized. +func NewV1UsersUIDPatchParams() *V1UsersUIDPatchParams { + var () + return &V1UsersUIDPatchParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1UsersUIDPatchParamsWithTimeout creates a new V1UsersUIDPatchParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1UsersUIDPatchParamsWithTimeout(timeout time.Duration) *V1UsersUIDPatchParams { + var () + return &V1UsersUIDPatchParams{ + + timeout: timeout, + } +} + +// NewV1UsersUIDPatchParamsWithContext creates a new V1UsersUIDPatchParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1UsersUIDPatchParamsWithContext(ctx context.Context) *V1UsersUIDPatchParams { + var () + return &V1UsersUIDPatchParams{ + + Context: ctx, + } +} + +// NewV1UsersUIDPatchParamsWithHTTPClient creates a new V1UsersUIDPatchParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1UsersUIDPatchParamsWithHTTPClient(client *http.Client) *V1UsersUIDPatchParams { + var () + return &V1UsersUIDPatchParams{ + HTTPClient: client, + } +} + +/* +V1UsersUIDPatchParams contains all the parameters to send to the API endpoint +for the v1 users Uid patch operation typically these are written to a http.Request +*/ +type V1UsersUIDPatchParams struct { + + /*Body*/ + Body models.V1UserPatch + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 users Uid patch params +func (o *V1UsersUIDPatchParams) WithTimeout(timeout time.Duration) *V1UsersUIDPatchParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 users Uid patch params +func (o *V1UsersUIDPatchParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 users Uid patch params +func (o *V1UsersUIDPatchParams) WithContext(ctx context.Context) *V1UsersUIDPatchParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 users Uid patch params +func (o *V1UsersUIDPatchParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 users Uid patch params +func (o *V1UsersUIDPatchParams) WithHTTPClient(client *http.Client) *V1UsersUIDPatchParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 users Uid patch params +func (o *V1UsersUIDPatchParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 users Uid patch params +func (o *V1UsersUIDPatchParams) WithBody(body models.V1UserPatch) *V1UsersUIDPatchParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 users Uid patch params +func (o *V1UsersUIDPatchParams) SetBody(body models.V1UserPatch) { + o.Body = body +} + +// WithUID adds the uid to the v1 users Uid patch params +func (o *V1UsersUIDPatchParams) WithUID(uid string) *V1UsersUIDPatchParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 users Uid patch params +func (o *V1UsersUIDPatchParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1UsersUIDPatchParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_users_uid_patch_responses.go b/api/client/v1/v1_users_uid_patch_responses.go new file mode 100644 index 00000000..d5ed33b7 --- /dev/null +++ b/api/client/v1/v1_users_uid_patch_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1UsersUIDPatchReader is a Reader for the V1UsersUIDPatch structure. +type V1UsersUIDPatchReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1UsersUIDPatchReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1UsersUIDPatchNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1UsersUIDPatchNoContent creates a V1UsersUIDPatchNoContent with default headers values +func NewV1UsersUIDPatchNoContent() *V1UsersUIDPatchNoContent { + return &V1UsersUIDPatchNoContent{} +} + +/* +V1UsersUIDPatchNoContent handles this case with default header values. + +The resource was updated successfully +*/ +type V1UsersUIDPatchNoContent struct { +} + +func (o *V1UsersUIDPatchNoContent) Error() string { + return fmt.Sprintf("[PATCH /v1/users/{uid}][%d] v1UsersUidPatchNoContent ", 204) +} + +func (o *V1UsersUIDPatchNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_users_uid_resource_roles_create_parameters.go b/api/client/v1/v1_users_uid_resource_roles_create_parameters.go new file mode 100644 index 00000000..e03b5d64 --- /dev/null +++ b/api/client/v1/v1_users_uid_resource_roles_create_parameters.go @@ -0,0 +1,154 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1UsersUIDResourceRolesCreateParams creates a new V1UsersUIDResourceRolesCreateParams object +// with the default values initialized. +func NewV1UsersUIDResourceRolesCreateParams() *V1UsersUIDResourceRolesCreateParams { + var () + return &V1UsersUIDResourceRolesCreateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1UsersUIDResourceRolesCreateParamsWithTimeout creates a new V1UsersUIDResourceRolesCreateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1UsersUIDResourceRolesCreateParamsWithTimeout(timeout time.Duration) *V1UsersUIDResourceRolesCreateParams { + var () + return &V1UsersUIDResourceRolesCreateParams{ + + timeout: timeout, + } +} + +// NewV1UsersUIDResourceRolesCreateParamsWithContext creates a new V1UsersUIDResourceRolesCreateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1UsersUIDResourceRolesCreateParamsWithContext(ctx context.Context) *V1UsersUIDResourceRolesCreateParams { + var () + return &V1UsersUIDResourceRolesCreateParams{ + + Context: ctx, + } +} + +// NewV1UsersUIDResourceRolesCreateParamsWithHTTPClient creates a new V1UsersUIDResourceRolesCreateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1UsersUIDResourceRolesCreateParamsWithHTTPClient(client *http.Client) *V1UsersUIDResourceRolesCreateParams { + var () + return &V1UsersUIDResourceRolesCreateParams{ + HTTPClient: client, + } +} + +/* +V1UsersUIDResourceRolesCreateParams contains all the parameters to send to the API endpoint +for the v1 users Uid resource roles create operation typically these are written to a http.Request +*/ +type V1UsersUIDResourceRolesCreateParams struct { + + /*Body*/ + Body *models.V1ResourceRolesUpdateEntity + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 users Uid resource roles create params +func (o *V1UsersUIDResourceRolesCreateParams) WithTimeout(timeout time.Duration) *V1UsersUIDResourceRolesCreateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 users Uid resource roles create params +func (o *V1UsersUIDResourceRolesCreateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 users Uid resource roles create params +func (o *V1UsersUIDResourceRolesCreateParams) WithContext(ctx context.Context) *V1UsersUIDResourceRolesCreateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 users Uid resource roles create params +func (o *V1UsersUIDResourceRolesCreateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 users Uid resource roles create params +func (o *V1UsersUIDResourceRolesCreateParams) WithHTTPClient(client *http.Client) *V1UsersUIDResourceRolesCreateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 users Uid resource roles create params +func (o *V1UsersUIDResourceRolesCreateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 users Uid resource roles create params +func (o *V1UsersUIDResourceRolesCreateParams) WithBody(body *models.V1ResourceRolesUpdateEntity) *V1UsersUIDResourceRolesCreateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 users Uid resource roles create params +func (o *V1UsersUIDResourceRolesCreateParams) SetBody(body *models.V1ResourceRolesUpdateEntity) { + o.Body = body +} + +// WithUID adds the uid to the v1 users Uid resource roles create params +func (o *V1UsersUIDResourceRolesCreateParams) WithUID(uid string) *V1UsersUIDResourceRolesCreateParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 users Uid resource roles create params +func (o *V1UsersUIDResourceRolesCreateParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1UsersUIDResourceRolesCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_users_uid_resource_roles_create_responses.go b/api/client/v1/v1_users_uid_resource_roles_create_responses.go new file mode 100644 index 00000000..a71afde0 --- /dev/null +++ b/api/client/v1/v1_users_uid_resource_roles_create_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1UsersUIDResourceRolesCreateReader is a Reader for the V1UsersUIDResourceRolesCreate structure. +type V1UsersUIDResourceRolesCreateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1UsersUIDResourceRolesCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1UsersUIDResourceRolesCreateNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1UsersUIDResourceRolesCreateNoContent creates a V1UsersUIDResourceRolesCreateNoContent with default headers values +func NewV1UsersUIDResourceRolesCreateNoContent() *V1UsersUIDResourceRolesCreateNoContent { + return &V1UsersUIDResourceRolesCreateNoContent{} +} + +/* +V1UsersUIDResourceRolesCreateNoContent handles this case with default header values. + +The resource was updated successfully +*/ +type V1UsersUIDResourceRolesCreateNoContent struct { +} + +func (o *V1UsersUIDResourceRolesCreateNoContent) Error() string { + return fmt.Sprintf("[POST /v1/users/{uid}/resourceRoles][%d] v1UsersUidResourceRolesCreateNoContent ", 204) +} + +func (o *V1UsersUIDResourceRolesCreateNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_users_uid_resource_roles_parameters.go b/api/client/v1/v1_users_uid_resource_roles_parameters.go new file mode 100644 index 00000000..a701be02 --- /dev/null +++ b/api/client/v1/v1_users_uid_resource_roles_parameters.go @@ -0,0 +1,133 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1UsersUIDResourceRolesParams creates a new V1UsersUIDResourceRolesParams object +// with the default values initialized. +func NewV1UsersUIDResourceRolesParams() *V1UsersUIDResourceRolesParams { + var () + return &V1UsersUIDResourceRolesParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1UsersUIDResourceRolesParamsWithTimeout creates a new V1UsersUIDResourceRolesParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1UsersUIDResourceRolesParamsWithTimeout(timeout time.Duration) *V1UsersUIDResourceRolesParams { + var () + return &V1UsersUIDResourceRolesParams{ + + timeout: timeout, + } +} + +// NewV1UsersUIDResourceRolesParamsWithContext creates a new V1UsersUIDResourceRolesParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1UsersUIDResourceRolesParamsWithContext(ctx context.Context) *V1UsersUIDResourceRolesParams { + var () + return &V1UsersUIDResourceRolesParams{ + + Context: ctx, + } +} + +// NewV1UsersUIDResourceRolesParamsWithHTTPClient creates a new V1UsersUIDResourceRolesParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1UsersUIDResourceRolesParamsWithHTTPClient(client *http.Client) *V1UsersUIDResourceRolesParams { + var () + return &V1UsersUIDResourceRolesParams{ + HTTPClient: client, + } +} + +/* +V1UsersUIDResourceRolesParams contains all the parameters to send to the API endpoint +for the v1 users Uid resource roles operation typically these are written to a http.Request +*/ +type V1UsersUIDResourceRolesParams struct { + + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 users Uid resource roles params +func (o *V1UsersUIDResourceRolesParams) WithTimeout(timeout time.Duration) *V1UsersUIDResourceRolesParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 users Uid resource roles params +func (o *V1UsersUIDResourceRolesParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 users Uid resource roles params +func (o *V1UsersUIDResourceRolesParams) WithContext(ctx context.Context) *V1UsersUIDResourceRolesParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 users Uid resource roles params +func (o *V1UsersUIDResourceRolesParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 users Uid resource roles params +func (o *V1UsersUIDResourceRolesParams) WithHTTPClient(client *http.Client) *V1UsersUIDResourceRolesParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 users Uid resource roles params +func (o *V1UsersUIDResourceRolesParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithUID adds the uid to the v1 users Uid resource roles params +func (o *V1UsersUIDResourceRolesParams) WithUID(uid string) *V1UsersUIDResourceRolesParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 users Uid resource roles params +func (o *V1UsersUIDResourceRolesParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1UsersUIDResourceRolesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_users_uid_resource_roles_responses.go b/api/client/v1/v1_users_uid_resource_roles_responses.go new file mode 100644 index 00000000..1551aafc --- /dev/null +++ b/api/client/v1/v1_users_uid_resource_roles_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1UsersUIDResourceRolesReader is a Reader for the V1UsersUIDResourceRoles structure. +type V1UsersUIDResourceRolesReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1UsersUIDResourceRolesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1UsersUIDResourceRolesOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1UsersUIDResourceRolesOK creates a V1UsersUIDResourceRolesOK with default headers values +func NewV1UsersUIDResourceRolesOK() *V1UsersUIDResourceRolesOK { + return &V1UsersUIDResourceRolesOK{} +} + +/* +V1UsersUIDResourceRolesOK handles this case with default header values. + +OK +*/ +type V1UsersUIDResourceRolesOK struct { + Payload *models.V1ResourceRoles +} + +func (o *V1UsersUIDResourceRolesOK) Error() string { + return fmt.Sprintf("[GET /v1/users/{uid}/resourceRoles][%d] v1UsersUidResourceRolesOK %+v", 200, o.Payload) +} + +func (o *V1UsersUIDResourceRolesOK) GetPayload() *models.V1ResourceRoles { + return o.Payload +} + +func (o *V1UsersUIDResourceRolesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1ResourceRoles) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_users_uid_resource_roles_uid_delete_parameters.go b/api/client/v1/v1_users_uid_resource_roles_uid_delete_parameters.go new file mode 100644 index 00000000..29426b47 --- /dev/null +++ b/api/client/v1/v1_users_uid_resource_roles_uid_delete_parameters.go @@ -0,0 +1,151 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1UsersUIDResourceRolesUIDDeleteParams creates a new V1UsersUIDResourceRolesUIDDeleteParams object +// with the default values initialized. +func NewV1UsersUIDResourceRolesUIDDeleteParams() *V1UsersUIDResourceRolesUIDDeleteParams { + var () + return &V1UsersUIDResourceRolesUIDDeleteParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1UsersUIDResourceRolesUIDDeleteParamsWithTimeout creates a new V1UsersUIDResourceRolesUIDDeleteParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1UsersUIDResourceRolesUIDDeleteParamsWithTimeout(timeout time.Duration) *V1UsersUIDResourceRolesUIDDeleteParams { + var () + return &V1UsersUIDResourceRolesUIDDeleteParams{ + + timeout: timeout, + } +} + +// NewV1UsersUIDResourceRolesUIDDeleteParamsWithContext creates a new V1UsersUIDResourceRolesUIDDeleteParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1UsersUIDResourceRolesUIDDeleteParamsWithContext(ctx context.Context) *V1UsersUIDResourceRolesUIDDeleteParams { + var () + return &V1UsersUIDResourceRolesUIDDeleteParams{ + + Context: ctx, + } +} + +// NewV1UsersUIDResourceRolesUIDDeleteParamsWithHTTPClient creates a new V1UsersUIDResourceRolesUIDDeleteParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1UsersUIDResourceRolesUIDDeleteParamsWithHTTPClient(client *http.Client) *V1UsersUIDResourceRolesUIDDeleteParams { + var () + return &V1UsersUIDResourceRolesUIDDeleteParams{ + HTTPClient: client, + } +} + +/* +V1UsersUIDResourceRolesUIDDeleteParams contains all the parameters to send to the API endpoint +for the v1 users Uid resource roles Uid delete operation typically these are written to a http.Request +*/ +type V1UsersUIDResourceRolesUIDDeleteParams struct { + + /*ResourceRoleUID*/ + ResourceRoleUID string + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 users Uid resource roles Uid delete params +func (o *V1UsersUIDResourceRolesUIDDeleteParams) WithTimeout(timeout time.Duration) *V1UsersUIDResourceRolesUIDDeleteParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 users Uid resource roles Uid delete params +func (o *V1UsersUIDResourceRolesUIDDeleteParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 users Uid resource roles Uid delete params +func (o *V1UsersUIDResourceRolesUIDDeleteParams) WithContext(ctx context.Context) *V1UsersUIDResourceRolesUIDDeleteParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 users Uid resource roles Uid delete params +func (o *V1UsersUIDResourceRolesUIDDeleteParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 users Uid resource roles Uid delete params +func (o *V1UsersUIDResourceRolesUIDDeleteParams) WithHTTPClient(client *http.Client) *V1UsersUIDResourceRolesUIDDeleteParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 users Uid resource roles Uid delete params +func (o *V1UsersUIDResourceRolesUIDDeleteParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithResourceRoleUID adds the resourceRoleUID to the v1 users Uid resource roles Uid delete params +func (o *V1UsersUIDResourceRolesUIDDeleteParams) WithResourceRoleUID(resourceRoleUID string) *V1UsersUIDResourceRolesUIDDeleteParams { + o.SetResourceRoleUID(resourceRoleUID) + return o +} + +// SetResourceRoleUID adds the resourceRoleUid to the v1 users Uid resource roles Uid delete params +func (o *V1UsersUIDResourceRolesUIDDeleteParams) SetResourceRoleUID(resourceRoleUID string) { + o.ResourceRoleUID = resourceRoleUID +} + +// WithUID adds the uid to the v1 users Uid resource roles Uid delete params +func (o *V1UsersUIDResourceRolesUIDDeleteParams) WithUID(uid string) *V1UsersUIDResourceRolesUIDDeleteParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 users Uid resource roles Uid delete params +func (o *V1UsersUIDResourceRolesUIDDeleteParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1UsersUIDResourceRolesUIDDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param resourceRoleUid + if err := r.SetPathParam("resourceRoleUid", o.ResourceRoleUID); err != nil { + return err + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_users_uid_resource_roles_uid_delete_responses.go b/api/client/v1/v1_users_uid_resource_roles_uid_delete_responses.go new file mode 100644 index 00000000..6fd886ab --- /dev/null +++ b/api/client/v1/v1_users_uid_resource_roles_uid_delete_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1UsersUIDResourceRolesUIDDeleteReader is a Reader for the V1UsersUIDResourceRolesUIDDelete structure. +type V1UsersUIDResourceRolesUIDDeleteReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1UsersUIDResourceRolesUIDDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1UsersUIDResourceRolesUIDDeleteNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1UsersUIDResourceRolesUIDDeleteNoContent creates a V1UsersUIDResourceRolesUIDDeleteNoContent with default headers values +func NewV1UsersUIDResourceRolesUIDDeleteNoContent() *V1UsersUIDResourceRolesUIDDeleteNoContent { + return &V1UsersUIDResourceRolesUIDDeleteNoContent{} +} + +/* +V1UsersUIDResourceRolesUIDDeleteNoContent handles this case with default header values. + +The resource was deleted successfully +*/ +type V1UsersUIDResourceRolesUIDDeleteNoContent struct { +} + +func (o *V1UsersUIDResourceRolesUIDDeleteNoContent) Error() string { + return fmt.Sprintf("[DELETE /v1/users/{uid}/resourceRoles/{resourceRoleUid}][%d] v1UsersUidResourceRolesUidDeleteNoContent ", 204) +} + +func (o *V1UsersUIDResourceRolesUIDDeleteNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_users_uid_roles_parameters.go b/api/client/v1/v1_users_uid_roles_parameters.go new file mode 100644 index 00000000..154c7066 --- /dev/null +++ b/api/client/v1/v1_users_uid_roles_parameters.go @@ -0,0 +1,133 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1UsersUIDRolesParams creates a new V1UsersUIDRolesParams object +// with the default values initialized. +func NewV1UsersUIDRolesParams() *V1UsersUIDRolesParams { + var () + return &V1UsersUIDRolesParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1UsersUIDRolesParamsWithTimeout creates a new V1UsersUIDRolesParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1UsersUIDRolesParamsWithTimeout(timeout time.Duration) *V1UsersUIDRolesParams { + var () + return &V1UsersUIDRolesParams{ + + timeout: timeout, + } +} + +// NewV1UsersUIDRolesParamsWithContext creates a new V1UsersUIDRolesParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1UsersUIDRolesParamsWithContext(ctx context.Context) *V1UsersUIDRolesParams { + var () + return &V1UsersUIDRolesParams{ + + Context: ctx, + } +} + +// NewV1UsersUIDRolesParamsWithHTTPClient creates a new V1UsersUIDRolesParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1UsersUIDRolesParamsWithHTTPClient(client *http.Client) *V1UsersUIDRolesParams { + var () + return &V1UsersUIDRolesParams{ + HTTPClient: client, + } +} + +/* +V1UsersUIDRolesParams contains all the parameters to send to the API endpoint +for the v1 users Uid roles operation typically these are written to a http.Request +*/ +type V1UsersUIDRolesParams struct { + + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 users Uid roles params +func (o *V1UsersUIDRolesParams) WithTimeout(timeout time.Duration) *V1UsersUIDRolesParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 users Uid roles params +func (o *V1UsersUIDRolesParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 users Uid roles params +func (o *V1UsersUIDRolesParams) WithContext(ctx context.Context) *V1UsersUIDRolesParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 users Uid roles params +func (o *V1UsersUIDRolesParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 users Uid roles params +func (o *V1UsersUIDRolesParams) WithHTTPClient(client *http.Client) *V1UsersUIDRolesParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 users Uid roles params +func (o *V1UsersUIDRolesParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithUID adds the uid to the v1 users Uid roles params +func (o *V1UsersUIDRolesParams) WithUID(uid string) *V1UsersUIDRolesParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 users Uid roles params +func (o *V1UsersUIDRolesParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1UsersUIDRolesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_users_uid_roles_responses.go b/api/client/v1/v1_users_uid_roles_responses.go new file mode 100644 index 00000000..861075d8 --- /dev/null +++ b/api/client/v1/v1_users_uid_roles_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1UsersUIDRolesReader is a Reader for the V1UsersUIDRoles structure. +type V1UsersUIDRolesReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1UsersUIDRolesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1UsersUIDRolesOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1UsersUIDRolesOK creates a V1UsersUIDRolesOK with default headers values +func NewV1UsersUIDRolesOK() *V1UsersUIDRolesOK { + return &V1UsersUIDRolesOK{} +} + +/* +V1UsersUIDRolesOK handles this case with default header values. + +OK +*/ +type V1UsersUIDRolesOK struct { + Payload *models.V1UserRolesEntity +} + +func (o *V1UsersUIDRolesOK) Error() string { + return fmt.Sprintf("[GET /v1/users/{uid}/roles][%d] v1UsersUidRolesOK %+v", 200, o.Payload) +} + +func (o *V1UsersUIDRolesOK) GetPayload() *models.V1UserRolesEntity { + return o.Payload +} + +func (o *V1UsersUIDRolesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1UserRolesEntity) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_users_uid_roles_update_parameters.go b/api/client/v1/v1_users_uid_roles_update_parameters.go new file mode 100644 index 00000000..8bd03a3a --- /dev/null +++ b/api/client/v1/v1_users_uid_roles_update_parameters.go @@ -0,0 +1,154 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1UsersUIDRolesUpdateParams creates a new V1UsersUIDRolesUpdateParams object +// with the default values initialized. +func NewV1UsersUIDRolesUpdateParams() *V1UsersUIDRolesUpdateParams { + var () + return &V1UsersUIDRolesUpdateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1UsersUIDRolesUpdateParamsWithTimeout creates a new V1UsersUIDRolesUpdateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1UsersUIDRolesUpdateParamsWithTimeout(timeout time.Duration) *V1UsersUIDRolesUpdateParams { + var () + return &V1UsersUIDRolesUpdateParams{ + + timeout: timeout, + } +} + +// NewV1UsersUIDRolesUpdateParamsWithContext creates a new V1UsersUIDRolesUpdateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1UsersUIDRolesUpdateParamsWithContext(ctx context.Context) *V1UsersUIDRolesUpdateParams { + var () + return &V1UsersUIDRolesUpdateParams{ + + Context: ctx, + } +} + +// NewV1UsersUIDRolesUpdateParamsWithHTTPClient creates a new V1UsersUIDRolesUpdateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1UsersUIDRolesUpdateParamsWithHTTPClient(client *http.Client) *V1UsersUIDRolesUpdateParams { + var () + return &V1UsersUIDRolesUpdateParams{ + HTTPClient: client, + } +} + +/* +V1UsersUIDRolesUpdateParams contains all the parameters to send to the API endpoint +for the v1 users Uid roles update operation typically these are written to a http.Request +*/ +type V1UsersUIDRolesUpdateParams struct { + + /*Body*/ + Body *models.V1UserRoleUIDs + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 users Uid roles update params +func (o *V1UsersUIDRolesUpdateParams) WithTimeout(timeout time.Duration) *V1UsersUIDRolesUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 users Uid roles update params +func (o *V1UsersUIDRolesUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 users Uid roles update params +func (o *V1UsersUIDRolesUpdateParams) WithContext(ctx context.Context) *V1UsersUIDRolesUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 users Uid roles update params +func (o *V1UsersUIDRolesUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 users Uid roles update params +func (o *V1UsersUIDRolesUpdateParams) WithHTTPClient(client *http.Client) *V1UsersUIDRolesUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 users Uid roles update params +func (o *V1UsersUIDRolesUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 users Uid roles update params +func (o *V1UsersUIDRolesUpdateParams) WithBody(body *models.V1UserRoleUIDs) *V1UsersUIDRolesUpdateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 users Uid roles update params +func (o *V1UsersUIDRolesUpdateParams) SetBody(body *models.V1UserRoleUIDs) { + o.Body = body +} + +// WithUID adds the uid to the v1 users Uid roles update params +func (o *V1UsersUIDRolesUpdateParams) WithUID(uid string) *V1UsersUIDRolesUpdateParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 users Uid roles update params +func (o *V1UsersUIDRolesUpdateParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1UsersUIDRolesUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_users_uid_roles_update_responses.go b/api/client/v1/v1_users_uid_roles_update_responses.go new file mode 100644 index 00000000..f09c3866 --- /dev/null +++ b/api/client/v1/v1_users_uid_roles_update_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1UsersUIDRolesUpdateReader is a Reader for the V1UsersUIDRolesUpdate structure. +type V1UsersUIDRolesUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1UsersUIDRolesUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1UsersUIDRolesUpdateNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1UsersUIDRolesUpdateNoContent creates a V1UsersUIDRolesUpdateNoContent with default headers values +func NewV1UsersUIDRolesUpdateNoContent() *V1UsersUIDRolesUpdateNoContent { + return &V1UsersUIDRolesUpdateNoContent{} +} + +/* +V1UsersUIDRolesUpdateNoContent handles this case with default header values. + +The resource was updated successfully +*/ +type V1UsersUIDRolesUpdateNoContent struct { +} + +func (o *V1UsersUIDRolesUpdateNoContent) Error() string { + return fmt.Sprintf("[PUT /v1/users/{uid}/roles][%d] v1UsersUidRolesUpdateNoContent ", 204) +} + +func (o *V1UsersUIDRolesUpdateNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_users_uid_update_parameters.go b/api/client/v1/v1_users_uid_update_parameters.go new file mode 100644 index 00000000..02d5fda2 --- /dev/null +++ b/api/client/v1/v1_users_uid_update_parameters.go @@ -0,0 +1,154 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1UsersUIDUpdateParams creates a new V1UsersUIDUpdateParams object +// with the default values initialized. +func NewV1UsersUIDUpdateParams() *V1UsersUIDUpdateParams { + var () + return &V1UsersUIDUpdateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1UsersUIDUpdateParamsWithTimeout creates a new V1UsersUIDUpdateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1UsersUIDUpdateParamsWithTimeout(timeout time.Duration) *V1UsersUIDUpdateParams { + var () + return &V1UsersUIDUpdateParams{ + + timeout: timeout, + } +} + +// NewV1UsersUIDUpdateParamsWithContext creates a new V1UsersUIDUpdateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1UsersUIDUpdateParamsWithContext(ctx context.Context) *V1UsersUIDUpdateParams { + var () + return &V1UsersUIDUpdateParams{ + + Context: ctx, + } +} + +// NewV1UsersUIDUpdateParamsWithHTTPClient creates a new V1UsersUIDUpdateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1UsersUIDUpdateParamsWithHTTPClient(client *http.Client) *V1UsersUIDUpdateParams { + var () + return &V1UsersUIDUpdateParams{ + HTTPClient: client, + } +} + +/* +V1UsersUIDUpdateParams contains all the parameters to send to the API endpoint +for the v1 users Uid update operation typically these are written to a http.Request +*/ +type V1UsersUIDUpdateParams struct { + + /*Body*/ + Body *models.V1UserUpdateEntity + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 users Uid update params +func (o *V1UsersUIDUpdateParams) WithTimeout(timeout time.Duration) *V1UsersUIDUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 users Uid update params +func (o *V1UsersUIDUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 users Uid update params +func (o *V1UsersUIDUpdateParams) WithContext(ctx context.Context) *V1UsersUIDUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 users Uid update params +func (o *V1UsersUIDUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 users Uid update params +func (o *V1UsersUIDUpdateParams) WithHTTPClient(client *http.Client) *V1UsersUIDUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 users Uid update params +func (o *V1UsersUIDUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 users Uid update params +func (o *V1UsersUIDUpdateParams) WithBody(body *models.V1UserUpdateEntity) *V1UsersUIDUpdateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 users Uid update params +func (o *V1UsersUIDUpdateParams) SetBody(body *models.V1UserUpdateEntity) { + o.Body = body +} + +// WithUID adds the uid to the v1 users Uid update params +func (o *V1UsersUIDUpdateParams) WithUID(uid string) *V1UsersUIDUpdateParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 users Uid update params +func (o *V1UsersUIDUpdateParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1UsersUIDUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_users_uid_update_responses.go b/api/client/v1/v1_users_uid_update_responses.go new file mode 100644 index 00000000..ce2cf098 --- /dev/null +++ b/api/client/v1/v1_users_uid_update_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1UsersUIDUpdateReader is a Reader for the V1UsersUIDUpdate structure. +type V1UsersUIDUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1UsersUIDUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1UsersUIDUpdateNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1UsersUIDUpdateNoContent creates a V1UsersUIDUpdateNoContent with default headers values +func NewV1UsersUIDUpdateNoContent() *V1UsersUIDUpdateNoContent { + return &V1UsersUIDUpdateNoContent{} +} + +/* +V1UsersUIDUpdateNoContent handles this case with default header values. + +The resource was updated successfully +*/ +type V1UsersUIDUpdateNoContent struct { +} + +func (o *V1UsersUIDUpdateNoContent) Error() string { + return fmt.Sprintf("[PUT /v1/users/{uid}][%d] v1UsersUidUpdateNoContent ", 204) +} + +func (o *V1UsersUIDUpdateNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_users_workspace_get_roles_parameters.go b/api/client/v1/v1_users_workspace_get_roles_parameters.go new file mode 100644 index 00000000..a982d95c --- /dev/null +++ b/api/client/v1/v1_users_workspace_get_roles_parameters.go @@ -0,0 +1,133 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1UsersWorkspaceGetRolesParams creates a new V1UsersWorkspaceGetRolesParams object +// with the default values initialized. +func NewV1UsersWorkspaceGetRolesParams() *V1UsersWorkspaceGetRolesParams { + var () + return &V1UsersWorkspaceGetRolesParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1UsersWorkspaceGetRolesParamsWithTimeout creates a new V1UsersWorkspaceGetRolesParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1UsersWorkspaceGetRolesParamsWithTimeout(timeout time.Duration) *V1UsersWorkspaceGetRolesParams { + var () + return &V1UsersWorkspaceGetRolesParams{ + + timeout: timeout, + } +} + +// NewV1UsersWorkspaceGetRolesParamsWithContext creates a new V1UsersWorkspaceGetRolesParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1UsersWorkspaceGetRolesParamsWithContext(ctx context.Context) *V1UsersWorkspaceGetRolesParams { + var () + return &V1UsersWorkspaceGetRolesParams{ + + Context: ctx, + } +} + +// NewV1UsersWorkspaceGetRolesParamsWithHTTPClient creates a new V1UsersWorkspaceGetRolesParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1UsersWorkspaceGetRolesParamsWithHTTPClient(client *http.Client) *V1UsersWorkspaceGetRolesParams { + var () + return &V1UsersWorkspaceGetRolesParams{ + HTTPClient: client, + } +} + +/* +V1UsersWorkspaceGetRolesParams contains all the parameters to send to the API endpoint +for the v1 users workspace get roles operation typically these are written to a http.Request +*/ +type V1UsersWorkspaceGetRolesParams struct { + + /*UserUID*/ + UserUID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 users workspace get roles params +func (o *V1UsersWorkspaceGetRolesParams) WithTimeout(timeout time.Duration) *V1UsersWorkspaceGetRolesParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 users workspace get roles params +func (o *V1UsersWorkspaceGetRolesParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 users workspace get roles params +func (o *V1UsersWorkspaceGetRolesParams) WithContext(ctx context.Context) *V1UsersWorkspaceGetRolesParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 users workspace get roles params +func (o *V1UsersWorkspaceGetRolesParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 users workspace get roles params +func (o *V1UsersWorkspaceGetRolesParams) WithHTTPClient(client *http.Client) *V1UsersWorkspaceGetRolesParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 users workspace get roles params +func (o *V1UsersWorkspaceGetRolesParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithUserUID adds the userUID to the v1 users workspace get roles params +func (o *V1UsersWorkspaceGetRolesParams) WithUserUID(userUID string) *V1UsersWorkspaceGetRolesParams { + o.SetUserUID(userUID) + return o +} + +// SetUserUID adds the userUid to the v1 users workspace get roles params +func (o *V1UsersWorkspaceGetRolesParams) SetUserUID(userUID string) { + o.UserUID = userUID +} + +// WriteToRequest writes these params to a swagger request +func (o *V1UsersWorkspaceGetRolesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param userUid + if err := r.SetPathParam("userUid", o.UserUID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_users_workspace_get_roles_responses.go b/api/client/v1/v1_users_workspace_get_roles_responses.go new file mode 100644 index 00000000..a23e11e3 --- /dev/null +++ b/api/client/v1/v1_users_workspace_get_roles_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1UsersWorkspaceGetRolesReader is a Reader for the V1UsersWorkspaceGetRoles structure. +type V1UsersWorkspaceGetRolesReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1UsersWorkspaceGetRolesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1UsersWorkspaceGetRolesOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1UsersWorkspaceGetRolesOK creates a V1UsersWorkspaceGetRolesOK with default headers values +func NewV1UsersWorkspaceGetRolesOK() *V1UsersWorkspaceGetRolesOK { + return &V1UsersWorkspaceGetRolesOK{} +} + +/* +V1UsersWorkspaceGetRolesOK handles this case with default header values. + +OK +*/ +type V1UsersWorkspaceGetRolesOK struct { + Payload *models.V1WorkspaceScopeRoles +} + +func (o *V1UsersWorkspaceGetRolesOK) Error() string { + return fmt.Sprintf("[GET /v1/workspaces/users/{userUid}/roles][%d] v1UsersWorkspaceGetRolesOK %+v", 200, o.Payload) +} + +func (o *V1UsersWorkspaceGetRolesOK) GetPayload() *models.V1WorkspaceScopeRoles { + return o.Payload +} + +func (o *V1UsersWorkspaceGetRolesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1WorkspaceScopeRoles) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_users_workspace_roles_put_parameters.go b/api/client/v1/v1_users_workspace_roles_put_parameters.go new file mode 100644 index 00000000..5e6527c2 --- /dev/null +++ b/api/client/v1/v1_users_workspace_roles_put_parameters.go @@ -0,0 +1,154 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1UsersWorkspaceRolesPutParams creates a new V1UsersWorkspaceRolesPutParams object +// with the default values initialized. +func NewV1UsersWorkspaceRolesPutParams() *V1UsersWorkspaceRolesPutParams { + var () + return &V1UsersWorkspaceRolesPutParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1UsersWorkspaceRolesPutParamsWithTimeout creates a new V1UsersWorkspaceRolesPutParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1UsersWorkspaceRolesPutParamsWithTimeout(timeout time.Duration) *V1UsersWorkspaceRolesPutParams { + var () + return &V1UsersWorkspaceRolesPutParams{ + + timeout: timeout, + } +} + +// NewV1UsersWorkspaceRolesPutParamsWithContext creates a new V1UsersWorkspaceRolesPutParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1UsersWorkspaceRolesPutParamsWithContext(ctx context.Context) *V1UsersWorkspaceRolesPutParams { + var () + return &V1UsersWorkspaceRolesPutParams{ + + Context: ctx, + } +} + +// NewV1UsersWorkspaceRolesPutParamsWithHTTPClient creates a new V1UsersWorkspaceRolesPutParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1UsersWorkspaceRolesPutParamsWithHTTPClient(client *http.Client) *V1UsersWorkspaceRolesPutParams { + var () + return &V1UsersWorkspaceRolesPutParams{ + HTTPClient: client, + } +} + +/* +V1UsersWorkspaceRolesPutParams contains all the parameters to send to the API endpoint +for the v1 users workspace roles put operation typically these are written to a http.Request +*/ +type V1UsersWorkspaceRolesPutParams struct { + + /*Body*/ + Body *models.V1WorkspacesRolesPatch + /*UserUID*/ + UserUID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 users workspace roles put params +func (o *V1UsersWorkspaceRolesPutParams) WithTimeout(timeout time.Duration) *V1UsersWorkspaceRolesPutParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 users workspace roles put params +func (o *V1UsersWorkspaceRolesPutParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 users workspace roles put params +func (o *V1UsersWorkspaceRolesPutParams) WithContext(ctx context.Context) *V1UsersWorkspaceRolesPutParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 users workspace roles put params +func (o *V1UsersWorkspaceRolesPutParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 users workspace roles put params +func (o *V1UsersWorkspaceRolesPutParams) WithHTTPClient(client *http.Client) *V1UsersWorkspaceRolesPutParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 users workspace roles put params +func (o *V1UsersWorkspaceRolesPutParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 users workspace roles put params +func (o *V1UsersWorkspaceRolesPutParams) WithBody(body *models.V1WorkspacesRolesPatch) *V1UsersWorkspaceRolesPutParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 users workspace roles put params +func (o *V1UsersWorkspaceRolesPutParams) SetBody(body *models.V1WorkspacesRolesPatch) { + o.Body = body +} + +// WithUserUID adds the userUID to the v1 users workspace roles put params +func (o *V1UsersWorkspaceRolesPutParams) WithUserUID(userUID string) *V1UsersWorkspaceRolesPutParams { + o.SetUserUID(userUID) + return o +} + +// SetUserUID adds the userUid to the v1 users workspace roles put params +func (o *V1UsersWorkspaceRolesPutParams) SetUserUID(userUID string) { + o.UserUID = userUID +} + +// WriteToRequest writes these params to a swagger request +func (o *V1UsersWorkspaceRolesPutParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param userUid + if err := r.SetPathParam("userUid", o.UserUID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_users_workspace_roles_put_responses.go b/api/client/v1/v1_users_workspace_roles_put_responses.go new file mode 100644 index 00000000..c42c19e4 --- /dev/null +++ b/api/client/v1/v1_users_workspace_roles_put_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1UsersWorkspaceRolesPutReader is a Reader for the V1UsersWorkspaceRolesPut structure. +type V1UsersWorkspaceRolesPutReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1UsersWorkspaceRolesPutReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1UsersWorkspaceRolesPutNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1UsersWorkspaceRolesPutNoContent creates a V1UsersWorkspaceRolesPutNoContent with default headers values +func NewV1UsersWorkspaceRolesPutNoContent() *V1UsersWorkspaceRolesPutNoContent { + return &V1UsersWorkspaceRolesPutNoContent{} +} + +/* +V1UsersWorkspaceRolesPutNoContent handles this case with default header values. + +The resource was updated successfully +*/ +type V1UsersWorkspaceRolesPutNoContent struct { +} + +func (o *V1UsersWorkspaceRolesPutNoContent) Error() string { + return fmt.Sprintf("[PUT /v1/workspaces/users/{userUid}/roles][%d] v1UsersWorkspaceRolesPutNoContent ", 204) +} + +func (o *V1UsersWorkspaceRolesPutNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_virtual_clusters_packs_values_parameters.go b/api/client/v1/v1_virtual_clusters_packs_values_parameters.go new file mode 100644 index 00000000..5ce8ffae --- /dev/null +++ b/api/client/v1/v1_virtual_clusters_packs_values_parameters.go @@ -0,0 +1,159 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1VirtualClustersPacksValuesParams creates a new V1VirtualClustersPacksValuesParams object +// with the default values initialized. +func NewV1VirtualClustersPacksValuesParams() *V1VirtualClustersPacksValuesParams { + var ( + kubernetesDistroTypeDefault = string("k3s") + ) + return &V1VirtualClustersPacksValuesParams{ + KubernetesDistroType: &kubernetesDistroTypeDefault, + + timeout: cr.DefaultTimeout, + } +} + +// NewV1VirtualClustersPacksValuesParamsWithTimeout creates a new V1VirtualClustersPacksValuesParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1VirtualClustersPacksValuesParamsWithTimeout(timeout time.Duration) *V1VirtualClustersPacksValuesParams { + var ( + kubernetesDistroTypeDefault = string("k3s") + ) + return &V1VirtualClustersPacksValuesParams{ + KubernetesDistroType: &kubernetesDistroTypeDefault, + + timeout: timeout, + } +} + +// NewV1VirtualClustersPacksValuesParamsWithContext creates a new V1VirtualClustersPacksValuesParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1VirtualClustersPacksValuesParamsWithContext(ctx context.Context) *V1VirtualClustersPacksValuesParams { + var ( + kubernetesDistroTypeDefault = string("k3s") + ) + return &V1VirtualClustersPacksValuesParams{ + KubernetesDistroType: &kubernetesDistroTypeDefault, + + Context: ctx, + } +} + +// NewV1VirtualClustersPacksValuesParamsWithHTTPClient creates a new V1VirtualClustersPacksValuesParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1VirtualClustersPacksValuesParamsWithHTTPClient(client *http.Client) *V1VirtualClustersPacksValuesParams { + var ( + kubernetesDistroTypeDefault = string("k3s") + ) + return &V1VirtualClustersPacksValuesParams{ + KubernetesDistroType: &kubernetesDistroTypeDefault, + HTTPClient: client, + } +} + +/* +V1VirtualClustersPacksValuesParams contains all the parameters to send to the API endpoint +for the v1 virtual clusters packs values operation typically these are written to a http.Request +*/ +type V1VirtualClustersPacksValuesParams struct { + + /*KubernetesDistroType + Kubernetes distribution type + + */ + KubernetesDistroType *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 virtual clusters packs values params +func (o *V1VirtualClustersPacksValuesParams) WithTimeout(timeout time.Duration) *V1VirtualClustersPacksValuesParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 virtual clusters packs values params +func (o *V1VirtualClustersPacksValuesParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 virtual clusters packs values params +func (o *V1VirtualClustersPacksValuesParams) WithContext(ctx context.Context) *V1VirtualClustersPacksValuesParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 virtual clusters packs values params +func (o *V1VirtualClustersPacksValuesParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 virtual clusters packs values params +func (o *V1VirtualClustersPacksValuesParams) WithHTTPClient(client *http.Client) *V1VirtualClustersPacksValuesParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 virtual clusters packs values params +func (o *V1VirtualClustersPacksValuesParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithKubernetesDistroType adds the kubernetesDistroType to the v1 virtual clusters packs values params +func (o *V1VirtualClustersPacksValuesParams) WithKubernetesDistroType(kubernetesDistroType *string) *V1VirtualClustersPacksValuesParams { + o.SetKubernetesDistroType(kubernetesDistroType) + return o +} + +// SetKubernetesDistroType adds the kubernetesDistroType to the v1 virtual clusters packs values params +func (o *V1VirtualClustersPacksValuesParams) SetKubernetesDistroType(kubernetesDistroType *string) { + o.KubernetesDistroType = kubernetesDistroType +} + +// WriteToRequest writes these params to a swagger request +func (o *V1VirtualClustersPacksValuesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.KubernetesDistroType != nil { + + // query param kubernetesDistroType + var qrKubernetesDistroType string + if o.KubernetesDistroType != nil { + qrKubernetesDistroType = *o.KubernetesDistroType + } + qKubernetesDistroType := qrKubernetesDistroType + if qKubernetesDistroType != "" { + if err := r.SetQueryParam("kubernetesDistroType", qKubernetesDistroType); err != nil { + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_virtual_clusters_packs_values_responses.go b/api/client/v1/v1_virtual_clusters_packs_values_responses.go new file mode 100644 index 00000000..c7b88e7a --- /dev/null +++ b/api/client/v1/v1_virtual_clusters_packs_values_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1VirtualClustersPacksValuesReader is a Reader for the V1VirtualClustersPacksValues structure. +type V1VirtualClustersPacksValuesReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1VirtualClustersPacksValuesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1VirtualClustersPacksValuesOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1VirtualClustersPacksValuesOK creates a V1VirtualClustersPacksValuesOK with default headers values +func NewV1VirtualClustersPacksValuesOK() *V1VirtualClustersPacksValuesOK { + return &V1VirtualClustersPacksValuesOK{} +} + +/* +V1VirtualClustersPacksValuesOK handles this case with default header values. + +Successful response +*/ +type V1VirtualClustersPacksValuesOK struct { + Payload *models.V1ClusterVirtualPacksValues +} + +func (o *V1VirtualClustersPacksValuesOK) Error() string { + return fmt.Sprintf("[GET /v1/spectroclusters/virtual/packs/values][%d] v1VirtualClustersPacksValuesOK %+v", 200, o.Payload) +} + +func (o *V1VirtualClustersPacksValuesOK) GetPayload() *models.V1ClusterVirtualPacksValues { + return o.Payload +} + +func (o *V1VirtualClustersPacksValuesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1ClusterVirtualPacksValues) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_vm_snapshot_create_parameters.go b/api/client/v1/v1_vm_snapshot_create_parameters.go new file mode 100644 index 00000000..5c12b195 --- /dev/null +++ b/api/client/v1/v1_vm_snapshot_create_parameters.go @@ -0,0 +1,203 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1VMSnapshotCreateParams creates a new V1VMSnapshotCreateParams object +// with the default values initialized. +func NewV1VMSnapshotCreateParams() *V1VMSnapshotCreateParams { + var () + return &V1VMSnapshotCreateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1VMSnapshotCreateParamsWithTimeout creates a new V1VMSnapshotCreateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1VMSnapshotCreateParamsWithTimeout(timeout time.Duration) *V1VMSnapshotCreateParams { + var () + return &V1VMSnapshotCreateParams{ + + timeout: timeout, + } +} + +// NewV1VMSnapshotCreateParamsWithContext creates a new V1VMSnapshotCreateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1VMSnapshotCreateParamsWithContext(ctx context.Context) *V1VMSnapshotCreateParams { + var () + return &V1VMSnapshotCreateParams{ + + Context: ctx, + } +} + +// NewV1VMSnapshotCreateParamsWithHTTPClient creates a new V1VMSnapshotCreateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1VMSnapshotCreateParamsWithHTTPClient(client *http.Client) *V1VMSnapshotCreateParams { + var () + return &V1VMSnapshotCreateParams{ + HTTPClient: client, + } +} + +/* +V1VMSnapshotCreateParams contains all the parameters to send to the API endpoint +for the v1 VM snapshot create operation typically these are written to a http.Request +*/ +type V1VMSnapshotCreateParams struct { + + /*Body*/ + Body *models.V1VirtualMachineSnapshot + /*Namespace + Namespace name of virtual machine + + */ + Namespace string + /*UID + Cluster uid + + */ + UID string + /*VMName + Virtual Machine name + + */ + VMName string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 VM snapshot create params +func (o *V1VMSnapshotCreateParams) WithTimeout(timeout time.Duration) *V1VMSnapshotCreateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 VM snapshot create params +func (o *V1VMSnapshotCreateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 VM snapshot create params +func (o *V1VMSnapshotCreateParams) WithContext(ctx context.Context) *V1VMSnapshotCreateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 VM snapshot create params +func (o *V1VMSnapshotCreateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 VM snapshot create params +func (o *V1VMSnapshotCreateParams) WithHTTPClient(client *http.Client) *V1VMSnapshotCreateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 VM snapshot create params +func (o *V1VMSnapshotCreateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 VM snapshot create params +func (o *V1VMSnapshotCreateParams) WithBody(body *models.V1VirtualMachineSnapshot) *V1VMSnapshotCreateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 VM snapshot create params +func (o *V1VMSnapshotCreateParams) SetBody(body *models.V1VirtualMachineSnapshot) { + o.Body = body +} + +// WithNamespace adds the namespace to the v1 VM snapshot create params +func (o *V1VMSnapshotCreateParams) WithNamespace(namespace string) *V1VMSnapshotCreateParams { + o.SetNamespace(namespace) + return o +} + +// SetNamespace adds the namespace to the v1 VM snapshot create params +func (o *V1VMSnapshotCreateParams) SetNamespace(namespace string) { + o.Namespace = namespace +} + +// WithUID adds the uid to the v1 VM snapshot create params +func (o *V1VMSnapshotCreateParams) WithUID(uid string) *V1VMSnapshotCreateParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 VM snapshot create params +func (o *V1VMSnapshotCreateParams) SetUID(uid string) { + o.UID = uid +} + +// WithVMName adds the vMName to the v1 VM snapshot create params +func (o *V1VMSnapshotCreateParams) WithVMName(vMName string) *V1VMSnapshotCreateParams { + o.SetVMName(vMName) + return o +} + +// SetVMName adds the vmName to the v1 VM snapshot create params +func (o *V1VMSnapshotCreateParams) SetVMName(vMName string) { + o.VMName = vMName +} + +// WriteToRequest writes these params to a swagger request +func (o *V1VMSnapshotCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // query param namespace + qrNamespace := o.Namespace + qNamespace := qrNamespace + if qNamespace != "" { + if err := r.SetQueryParam("namespace", qNamespace); err != nil { + return err + } + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + // path param vmName + if err := r.SetPathParam("vmName", o.VMName); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_vm_snapshot_create_responses.go b/api/client/v1/v1_vm_snapshot_create_responses.go new file mode 100644 index 00000000..d7578193 --- /dev/null +++ b/api/client/v1/v1_vm_snapshot_create_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1VMSnapshotCreateReader is a Reader for the V1VMSnapshotCreate structure. +type V1VMSnapshotCreateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1VMSnapshotCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1VMSnapshotCreateOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1VMSnapshotCreateOK creates a V1VMSnapshotCreateOK with default headers values +func NewV1VMSnapshotCreateOK() *V1VMSnapshotCreateOK { + return &V1VMSnapshotCreateOK{} +} + +/* +V1VMSnapshotCreateOK handles this case with default header values. + +(empty) +*/ +type V1VMSnapshotCreateOK struct { + Payload *models.V1VirtualMachineSnapshot +} + +func (o *V1VMSnapshotCreateOK) Error() string { + return fmt.Sprintf("[POST /v1/spectroclusters/{uid}/vms/{vmName}/snapshot][%d] v1VmSnapshotCreateOK %+v", 200, o.Payload) +} + +func (o *V1VMSnapshotCreateOK) GetPayload() *models.V1VirtualMachineSnapshot { + return o.Payload +} + +func (o *V1VMSnapshotCreateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1VirtualMachineSnapshot) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_vm_snapshot_delete_parameters.go b/api/client/v1/v1_vm_snapshot_delete_parameters.go new file mode 100644 index 00000000..cd628fac --- /dev/null +++ b/api/client/v1/v1_vm_snapshot_delete_parameters.go @@ -0,0 +1,203 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1VMSnapshotDeleteParams creates a new V1VMSnapshotDeleteParams object +// with the default values initialized. +func NewV1VMSnapshotDeleteParams() *V1VMSnapshotDeleteParams { + var () + return &V1VMSnapshotDeleteParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1VMSnapshotDeleteParamsWithTimeout creates a new V1VMSnapshotDeleteParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1VMSnapshotDeleteParamsWithTimeout(timeout time.Duration) *V1VMSnapshotDeleteParams { + var () + return &V1VMSnapshotDeleteParams{ + + timeout: timeout, + } +} + +// NewV1VMSnapshotDeleteParamsWithContext creates a new V1VMSnapshotDeleteParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1VMSnapshotDeleteParamsWithContext(ctx context.Context) *V1VMSnapshotDeleteParams { + var () + return &V1VMSnapshotDeleteParams{ + + Context: ctx, + } +} + +// NewV1VMSnapshotDeleteParamsWithHTTPClient creates a new V1VMSnapshotDeleteParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1VMSnapshotDeleteParamsWithHTTPClient(client *http.Client) *V1VMSnapshotDeleteParams { + var () + return &V1VMSnapshotDeleteParams{ + HTTPClient: client, + } +} + +/* +V1VMSnapshotDeleteParams contains all the parameters to send to the API endpoint +for the v1 VM snapshot delete operation typically these are written to a http.Request +*/ +type V1VMSnapshotDeleteParams struct { + + /*Namespace + Namespace name + + */ + Namespace string + /*SnapshotName + Snapshot name + + */ + SnapshotName string + /*UID + Cluster uid + + */ + UID string + /*VMName + Virtual Machine name + + */ + VMName string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 VM snapshot delete params +func (o *V1VMSnapshotDeleteParams) WithTimeout(timeout time.Duration) *V1VMSnapshotDeleteParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 VM snapshot delete params +func (o *V1VMSnapshotDeleteParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 VM snapshot delete params +func (o *V1VMSnapshotDeleteParams) WithContext(ctx context.Context) *V1VMSnapshotDeleteParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 VM snapshot delete params +func (o *V1VMSnapshotDeleteParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 VM snapshot delete params +func (o *V1VMSnapshotDeleteParams) WithHTTPClient(client *http.Client) *V1VMSnapshotDeleteParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 VM snapshot delete params +func (o *V1VMSnapshotDeleteParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithNamespace adds the namespace to the v1 VM snapshot delete params +func (o *V1VMSnapshotDeleteParams) WithNamespace(namespace string) *V1VMSnapshotDeleteParams { + o.SetNamespace(namespace) + return o +} + +// SetNamespace adds the namespace to the v1 VM snapshot delete params +func (o *V1VMSnapshotDeleteParams) SetNamespace(namespace string) { + o.Namespace = namespace +} + +// WithSnapshotName adds the snapshotName to the v1 VM snapshot delete params +func (o *V1VMSnapshotDeleteParams) WithSnapshotName(snapshotName string) *V1VMSnapshotDeleteParams { + o.SetSnapshotName(snapshotName) + return o +} + +// SetSnapshotName adds the snapshotName to the v1 VM snapshot delete params +func (o *V1VMSnapshotDeleteParams) SetSnapshotName(snapshotName string) { + o.SnapshotName = snapshotName +} + +// WithUID adds the uid to the v1 VM snapshot delete params +func (o *V1VMSnapshotDeleteParams) WithUID(uid string) *V1VMSnapshotDeleteParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 VM snapshot delete params +func (o *V1VMSnapshotDeleteParams) SetUID(uid string) { + o.UID = uid +} + +// WithVMName adds the vMName to the v1 VM snapshot delete params +func (o *V1VMSnapshotDeleteParams) WithVMName(vMName string) *V1VMSnapshotDeleteParams { + o.SetVMName(vMName) + return o +} + +// SetVMName adds the vmName to the v1 VM snapshot delete params +func (o *V1VMSnapshotDeleteParams) SetVMName(vMName string) { + o.VMName = vMName +} + +// WriteToRequest writes these params to a swagger request +func (o *V1VMSnapshotDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // query param namespace + qrNamespace := o.Namespace + qNamespace := qrNamespace + if qNamespace != "" { + if err := r.SetQueryParam("namespace", qNamespace); err != nil { + return err + } + } + + // path param snapshotName + if err := r.SetPathParam("snapshotName", o.SnapshotName); err != nil { + return err + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + // path param vmName + if err := r.SetPathParam("vmName", o.VMName); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_vm_snapshot_delete_responses.go b/api/client/v1/v1_vm_snapshot_delete_responses.go new file mode 100644 index 00000000..f9dfee6d --- /dev/null +++ b/api/client/v1/v1_vm_snapshot_delete_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1VMSnapshotDeleteReader is a Reader for the V1VMSnapshotDelete structure. +type V1VMSnapshotDeleteReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1VMSnapshotDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1VMSnapshotDeleteNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1VMSnapshotDeleteNoContent creates a V1VMSnapshotDeleteNoContent with default headers values +func NewV1VMSnapshotDeleteNoContent() *V1VMSnapshotDeleteNoContent { + return &V1VMSnapshotDeleteNoContent{} +} + +/* +V1VMSnapshotDeleteNoContent handles this case with default header values. + +The resource was deleted successfully +*/ +type V1VMSnapshotDeleteNoContent struct { +} + +func (o *V1VMSnapshotDeleteNoContent) Error() string { + return fmt.Sprintf("[DELETE /v1/spectroclusters/{uid}/vms/{vmName}/snapshot/{snapshotName}][%d] v1VmSnapshotDeleteNoContent ", 204) +} + +func (o *V1VMSnapshotDeleteNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_vm_snapshot_get_parameters.go b/api/client/v1/v1_vm_snapshot_get_parameters.go new file mode 100644 index 00000000..39073472 --- /dev/null +++ b/api/client/v1/v1_vm_snapshot_get_parameters.go @@ -0,0 +1,203 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1VMSnapshotGetParams creates a new V1VMSnapshotGetParams object +// with the default values initialized. +func NewV1VMSnapshotGetParams() *V1VMSnapshotGetParams { + var () + return &V1VMSnapshotGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1VMSnapshotGetParamsWithTimeout creates a new V1VMSnapshotGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1VMSnapshotGetParamsWithTimeout(timeout time.Duration) *V1VMSnapshotGetParams { + var () + return &V1VMSnapshotGetParams{ + + timeout: timeout, + } +} + +// NewV1VMSnapshotGetParamsWithContext creates a new V1VMSnapshotGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1VMSnapshotGetParamsWithContext(ctx context.Context) *V1VMSnapshotGetParams { + var () + return &V1VMSnapshotGetParams{ + + Context: ctx, + } +} + +// NewV1VMSnapshotGetParamsWithHTTPClient creates a new V1VMSnapshotGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1VMSnapshotGetParamsWithHTTPClient(client *http.Client) *V1VMSnapshotGetParams { + var () + return &V1VMSnapshotGetParams{ + HTTPClient: client, + } +} + +/* +V1VMSnapshotGetParams contains all the parameters to send to the API endpoint +for the v1 VM snapshot get operation typically these are written to a http.Request +*/ +type V1VMSnapshotGetParams struct { + + /*Namespace + Namespace name + + */ + Namespace string + /*SnapshotName + Snapshot name + + */ + SnapshotName string + /*UID + Cluster uid + + */ + UID string + /*VMName + Virtual Machine name + + */ + VMName string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 VM snapshot get params +func (o *V1VMSnapshotGetParams) WithTimeout(timeout time.Duration) *V1VMSnapshotGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 VM snapshot get params +func (o *V1VMSnapshotGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 VM snapshot get params +func (o *V1VMSnapshotGetParams) WithContext(ctx context.Context) *V1VMSnapshotGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 VM snapshot get params +func (o *V1VMSnapshotGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 VM snapshot get params +func (o *V1VMSnapshotGetParams) WithHTTPClient(client *http.Client) *V1VMSnapshotGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 VM snapshot get params +func (o *V1VMSnapshotGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithNamespace adds the namespace to the v1 VM snapshot get params +func (o *V1VMSnapshotGetParams) WithNamespace(namespace string) *V1VMSnapshotGetParams { + o.SetNamespace(namespace) + return o +} + +// SetNamespace adds the namespace to the v1 VM snapshot get params +func (o *V1VMSnapshotGetParams) SetNamespace(namespace string) { + o.Namespace = namespace +} + +// WithSnapshotName adds the snapshotName to the v1 VM snapshot get params +func (o *V1VMSnapshotGetParams) WithSnapshotName(snapshotName string) *V1VMSnapshotGetParams { + o.SetSnapshotName(snapshotName) + return o +} + +// SetSnapshotName adds the snapshotName to the v1 VM snapshot get params +func (o *V1VMSnapshotGetParams) SetSnapshotName(snapshotName string) { + o.SnapshotName = snapshotName +} + +// WithUID adds the uid to the v1 VM snapshot get params +func (o *V1VMSnapshotGetParams) WithUID(uid string) *V1VMSnapshotGetParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 VM snapshot get params +func (o *V1VMSnapshotGetParams) SetUID(uid string) { + o.UID = uid +} + +// WithVMName adds the vMName to the v1 VM snapshot get params +func (o *V1VMSnapshotGetParams) WithVMName(vMName string) *V1VMSnapshotGetParams { + o.SetVMName(vMName) + return o +} + +// SetVMName adds the vmName to the v1 VM snapshot get params +func (o *V1VMSnapshotGetParams) SetVMName(vMName string) { + o.VMName = vMName +} + +// WriteToRequest writes these params to a swagger request +func (o *V1VMSnapshotGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // query param namespace + qrNamespace := o.Namespace + qNamespace := qrNamespace + if qNamespace != "" { + if err := r.SetQueryParam("namespace", qNamespace); err != nil { + return err + } + } + + // path param snapshotName + if err := r.SetPathParam("snapshotName", o.SnapshotName); err != nil { + return err + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + // path param vmName + if err := r.SetPathParam("vmName", o.VMName); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_vm_snapshot_get_responses.go b/api/client/v1/v1_vm_snapshot_get_responses.go new file mode 100644 index 00000000..ff596275 --- /dev/null +++ b/api/client/v1/v1_vm_snapshot_get_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1VMSnapshotGetReader is a Reader for the V1VMSnapshotGet structure. +type V1VMSnapshotGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1VMSnapshotGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1VMSnapshotGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1VMSnapshotGetOK creates a V1VMSnapshotGetOK with default headers values +func NewV1VMSnapshotGetOK() *V1VMSnapshotGetOK { + return &V1VMSnapshotGetOK{} +} + +/* +V1VMSnapshotGetOK handles this case with default header values. + +(empty) +*/ +type V1VMSnapshotGetOK struct { + Payload *models.V1VirtualMachineSnapshot +} + +func (o *V1VMSnapshotGetOK) Error() string { + return fmt.Sprintf("[GET /v1/spectroclusters/{uid}/vms/{vmName}/snapshot/{snapshotName}][%d] v1VmSnapshotGetOK %+v", 200, o.Payload) +} + +func (o *V1VMSnapshotGetOK) GetPayload() *models.V1VirtualMachineSnapshot { + return o.Payload +} + +func (o *V1VMSnapshotGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1VirtualMachineSnapshot) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_vm_snapshot_update_parameters.go b/api/client/v1/v1_vm_snapshot_update_parameters.go new file mode 100644 index 00000000..6d9dd281 --- /dev/null +++ b/api/client/v1/v1_vm_snapshot_update_parameters.go @@ -0,0 +1,224 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1VMSnapshotUpdateParams creates a new V1VMSnapshotUpdateParams object +// with the default values initialized. +func NewV1VMSnapshotUpdateParams() *V1VMSnapshotUpdateParams { + var () + return &V1VMSnapshotUpdateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1VMSnapshotUpdateParamsWithTimeout creates a new V1VMSnapshotUpdateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1VMSnapshotUpdateParamsWithTimeout(timeout time.Duration) *V1VMSnapshotUpdateParams { + var () + return &V1VMSnapshotUpdateParams{ + + timeout: timeout, + } +} + +// NewV1VMSnapshotUpdateParamsWithContext creates a new V1VMSnapshotUpdateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1VMSnapshotUpdateParamsWithContext(ctx context.Context) *V1VMSnapshotUpdateParams { + var () + return &V1VMSnapshotUpdateParams{ + + Context: ctx, + } +} + +// NewV1VMSnapshotUpdateParamsWithHTTPClient creates a new V1VMSnapshotUpdateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1VMSnapshotUpdateParamsWithHTTPClient(client *http.Client) *V1VMSnapshotUpdateParams { + var () + return &V1VMSnapshotUpdateParams{ + HTTPClient: client, + } +} + +/* +V1VMSnapshotUpdateParams contains all the parameters to send to the API endpoint +for the v1 VM snapshot update operation typically these are written to a http.Request +*/ +type V1VMSnapshotUpdateParams struct { + + /*Body*/ + Body *models.V1VirtualMachineSnapshot + /*Namespace + Namespace name + + */ + Namespace string + /*SnapshotName + Snapshot name + + */ + SnapshotName string + /*UID + Cluster uid + + */ + UID string + /*VMName + Virtual Machine name + + */ + VMName string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 VM snapshot update params +func (o *V1VMSnapshotUpdateParams) WithTimeout(timeout time.Duration) *V1VMSnapshotUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 VM snapshot update params +func (o *V1VMSnapshotUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 VM snapshot update params +func (o *V1VMSnapshotUpdateParams) WithContext(ctx context.Context) *V1VMSnapshotUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 VM snapshot update params +func (o *V1VMSnapshotUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 VM snapshot update params +func (o *V1VMSnapshotUpdateParams) WithHTTPClient(client *http.Client) *V1VMSnapshotUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 VM snapshot update params +func (o *V1VMSnapshotUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 VM snapshot update params +func (o *V1VMSnapshotUpdateParams) WithBody(body *models.V1VirtualMachineSnapshot) *V1VMSnapshotUpdateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 VM snapshot update params +func (o *V1VMSnapshotUpdateParams) SetBody(body *models.V1VirtualMachineSnapshot) { + o.Body = body +} + +// WithNamespace adds the namespace to the v1 VM snapshot update params +func (o *V1VMSnapshotUpdateParams) WithNamespace(namespace string) *V1VMSnapshotUpdateParams { + o.SetNamespace(namespace) + return o +} + +// SetNamespace adds the namespace to the v1 VM snapshot update params +func (o *V1VMSnapshotUpdateParams) SetNamespace(namespace string) { + o.Namespace = namespace +} + +// WithSnapshotName adds the snapshotName to the v1 VM snapshot update params +func (o *V1VMSnapshotUpdateParams) WithSnapshotName(snapshotName string) *V1VMSnapshotUpdateParams { + o.SetSnapshotName(snapshotName) + return o +} + +// SetSnapshotName adds the snapshotName to the v1 VM snapshot update params +func (o *V1VMSnapshotUpdateParams) SetSnapshotName(snapshotName string) { + o.SnapshotName = snapshotName +} + +// WithUID adds the uid to the v1 VM snapshot update params +func (o *V1VMSnapshotUpdateParams) WithUID(uid string) *V1VMSnapshotUpdateParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 VM snapshot update params +func (o *V1VMSnapshotUpdateParams) SetUID(uid string) { + o.UID = uid +} + +// WithVMName adds the vMName to the v1 VM snapshot update params +func (o *V1VMSnapshotUpdateParams) WithVMName(vMName string) *V1VMSnapshotUpdateParams { + o.SetVMName(vMName) + return o +} + +// SetVMName adds the vmName to the v1 VM snapshot update params +func (o *V1VMSnapshotUpdateParams) SetVMName(vMName string) { + o.VMName = vMName +} + +// WriteToRequest writes these params to a swagger request +func (o *V1VMSnapshotUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // query param namespace + qrNamespace := o.Namespace + qNamespace := qrNamespace + if qNamespace != "" { + if err := r.SetQueryParam("namespace", qNamespace); err != nil { + return err + } + } + + // path param snapshotName + if err := r.SetPathParam("snapshotName", o.SnapshotName); err != nil { + return err + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + // path param vmName + if err := r.SetPathParam("vmName", o.VMName); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_vm_snapshot_update_responses.go b/api/client/v1/v1_vm_snapshot_update_responses.go new file mode 100644 index 00000000..33ebdbd6 --- /dev/null +++ b/api/client/v1/v1_vm_snapshot_update_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1VMSnapshotUpdateReader is a Reader for the V1VMSnapshotUpdate structure. +type V1VMSnapshotUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1VMSnapshotUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1VMSnapshotUpdateOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1VMSnapshotUpdateOK creates a V1VMSnapshotUpdateOK with default headers values +func NewV1VMSnapshotUpdateOK() *V1VMSnapshotUpdateOK { + return &V1VMSnapshotUpdateOK{} +} + +/* +V1VMSnapshotUpdateOK handles this case with default header values. + +(empty) +*/ +type V1VMSnapshotUpdateOK struct { + Payload *models.V1VirtualMachineSnapshot +} + +func (o *V1VMSnapshotUpdateOK) Error() string { + return fmt.Sprintf("[PUT /v1/spectroclusters/{uid}/vms/{vmName}/snapshot/{snapshotName}][%d] v1VmSnapshotUpdateOK %+v", 200, o.Payload) +} + +func (o *V1VMSnapshotUpdateOK) GetPayload() *models.V1VirtualMachineSnapshot { + return o.Payload +} + +func (o *V1VMSnapshotUpdateOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1VirtualMachineSnapshot) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_vsphere_account_validate_parameters.go b/api/client/v1/v1_vsphere_account_validate_parameters.go new file mode 100644 index 00000000..aee51f56 --- /dev/null +++ b/api/client/v1/v1_vsphere_account_validate_parameters.go @@ -0,0 +1,139 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1VsphereAccountValidateParams creates a new V1VsphereAccountValidateParams object +// with the default values initialized. +func NewV1VsphereAccountValidateParams() *V1VsphereAccountValidateParams { + var () + return &V1VsphereAccountValidateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1VsphereAccountValidateParamsWithTimeout creates a new V1VsphereAccountValidateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1VsphereAccountValidateParamsWithTimeout(timeout time.Duration) *V1VsphereAccountValidateParams { + var () + return &V1VsphereAccountValidateParams{ + + timeout: timeout, + } +} + +// NewV1VsphereAccountValidateParamsWithContext creates a new V1VsphereAccountValidateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1VsphereAccountValidateParamsWithContext(ctx context.Context) *V1VsphereAccountValidateParams { + var () + return &V1VsphereAccountValidateParams{ + + Context: ctx, + } +} + +// NewV1VsphereAccountValidateParamsWithHTTPClient creates a new V1VsphereAccountValidateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1VsphereAccountValidateParamsWithHTTPClient(client *http.Client) *V1VsphereAccountValidateParams { + var () + return &V1VsphereAccountValidateParams{ + HTTPClient: client, + } +} + +/* +V1VsphereAccountValidateParams contains all the parameters to send to the API endpoint +for the v1 vsphere account validate operation typically these are written to a http.Request +*/ +type V1VsphereAccountValidateParams struct { + + /*VsphereCloudAccount + Request payload for VSphere cloud account + + */ + VsphereCloudAccount *models.V1VsphereCloudAccount + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 vsphere account validate params +func (o *V1VsphereAccountValidateParams) WithTimeout(timeout time.Duration) *V1VsphereAccountValidateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 vsphere account validate params +func (o *V1VsphereAccountValidateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 vsphere account validate params +func (o *V1VsphereAccountValidateParams) WithContext(ctx context.Context) *V1VsphereAccountValidateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 vsphere account validate params +func (o *V1VsphereAccountValidateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 vsphere account validate params +func (o *V1VsphereAccountValidateParams) WithHTTPClient(client *http.Client) *V1VsphereAccountValidateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 vsphere account validate params +func (o *V1VsphereAccountValidateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithVsphereCloudAccount adds the vsphereCloudAccount to the v1 vsphere account validate params +func (o *V1VsphereAccountValidateParams) WithVsphereCloudAccount(vsphereCloudAccount *models.V1VsphereCloudAccount) *V1VsphereAccountValidateParams { + o.SetVsphereCloudAccount(vsphereCloudAccount) + return o +} + +// SetVsphereCloudAccount adds the vsphereCloudAccount to the v1 vsphere account validate params +func (o *V1VsphereAccountValidateParams) SetVsphereCloudAccount(vsphereCloudAccount *models.V1VsphereCloudAccount) { + o.VsphereCloudAccount = vsphereCloudAccount +} + +// WriteToRequest writes these params to a swagger request +func (o *V1VsphereAccountValidateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.VsphereCloudAccount != nil { + if err := r.SetBodyParam(o.VsphereCloudAccount); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_vsphere_account_validate_responses.go b/api/client/v1/v1_vsphere_account_validate_responses.go new file mode 100644 index 00000000..c73351b8 --- /dev/null +++ b/api/client/v1/v1_vsphere_account_validate_responses.go @@ -0,0 +1,61 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1VsphereAccountValidateReader is a Reader for the V1VsphereAccountValidate structure. +type V1VsphereAccountValidateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1VsphereAccountValidateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1VsphereAccountValidateNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1VsphereAccountValidateNoContent creates a V1VsphereAccountValidateNoContent with default headers values +func NewV1VsphereAccountValidateNoContent() *V1VsphereAccountValidateNoContent { + return &V1VsphereAccountValidateNoContent{} +} + +/* +V1VsphereAccountValidateNoContent handles this case with default header values. + +Ok response without content +*/ +type V1VsphereAccountValidateNoContent struct { + /*Audit uid for the request + */ + AuditUID string +} + +func (o *V1VsphereAccountValidateNoContent) Error() string { + return fmt.Sprintf("[POST /v1/clouds/vsphere/account/validate][%d] v1VsphereAccountValidateNoContent ", 204) +} + +func (o *V1VsphereAccountValidateNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header AuditUid + o.AuditUID = response.GetHeader("AuditUid") + + return nil +} diff --git a/api/client/v1/v1_vsphere_accounts_uid_cluster_res_parameters.go b/api/client/v1/v1_vsphere_accounts_uid_cluster_res_parameters.go new file mode 100644 index 00000000..31a9736b --- /dev/null +++ b/api/client/v1/v1_vsphere_accounts_uid_cluster_res_parameters.go @@ -0,0 +1,207 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// NewV1VsphereAccountsUIDClusterResParams creates a new V1VsphereAccountsUIDClusterResParams object +// with the default values initialized. +func NewV1VsphereAccountsUIDClusterResParams() *V1VsphereAccountsUIDClusterResParams { + var () + return &V1VsphereAccountsUIDClusterResParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1VsphereAccountsUIDClusterResParamsWithTimeout creates a new V1VsphereAccountsUIDClusterResParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1VsphereAccountsUIDClusterResParamsWithTimeout(timeout time.Duration) *V1VsphereAccountsUIDClusterResParams { + var () + return &V1VsphereAccountsUIDClusterResParams{ + + timeout: timeout, + } +} + +// NewV1VsphereAccountsUIDClusterResParamsWithContext creates a new V1VsphereAccountsUIDClusterResParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1VsphereAccountsUIDClusterResParamsWithContext(ctx context.Context) *V1VsphereAccountsUIDClusterResParams { + var () + return &V1VsphereAccountsUIDClusterResParams{ + + Context: ctx, + } +} + +// NewV1VsphereAccountsUIDClusterResParamsWithHTTPClient creates a new V1VsphereAccountsUIDClusterResParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1VsphereAccountsUIDClusterResParamsWithHTTPClient(client *http.Client) *V1VsphereAccountsUIDClusterResParams { + var () + return &V1VsphereAccountsUIDClusterResParams{ + HTTPClient: client, + } +} + +/* +V1VsphereAccountsUIDClusterResParams contains all the parameters to send to the API endpoint +for the v1 vsphere accounts Uid cluster res operation typically these are written to a http.Request +*/ +type V1VsphereAccountsUIDClusterResParams struct { + + /*Computecluster*/ + Computecluster string + /*Datacenter*/ + Datacenter string + /*UID*/ + UID string + /*UseQualifiedNetworkName*/ + UseQualifiedNetworkName *bool + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 vsphere accounts Uid cluster res params +func (o *V1VsphereAccountsUIDClusterResParams) WithTimeout(timeout time.Duration) *V1VsphereAccountsUIDClusterResParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 vsphere accounts Uid cluster res params +func (o *V1VsphereAccountsUIDClusterResParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 vsphere accounts Uid cluster res params +func (o *V1VsphereAccountsUIDClusterResParams) WithContext(ctx context.Context) *V1VsphereAccountsUIDClusterResParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 vsphere accounts Uid cluster res params +func (o *V1VsphereAccountsUIDClusterResParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 vsphere accounts Uid cluster res params +func (o *V1VsphereAccountsUIDClusterResParams) WithHTTPClient(client *http.Client) *V1VsphereAccountsUIDClusterResParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 vsphere accounts Uid cluster res params +func (o *V1VsphereAccountsUIDClusterResParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithComputecluster adds the computecluster to the v1 vsphere accounts Uid cluster res params +func (o *V1VsphereAccountsUIDClusterResParams) WithComputecluster(computecluster string) *V1VsphereAccountsUIDClusterResParams { + o.SetComputecluster(computecluster) + return o +} + +// SetComputecluster adds the computecluster to the v1 vsphere accounts Uid cluster res params +func (o *V1VsphereAccountsUIDClusterResParams) SetComputecluster(computecluster string) { + o.Computecluster = computecluster +} + +// WithDatacenter adds the datacenter to the v1 vsphere accounts Uid cluster res params +func (o *V1VsphereAccountsUIDClusterResParams) WithDatacenter(datacenter string) *V1VsphereAccountsUIDClusterResParams { + o.SetDatacenter(datacenter) + return o +} + +// SetDatacenter adds the datacenter to the v1 vsphere accounts Uid cluster res params +func (o *V1VsphereAccountsUIDClusterResParams) SetDatacenter(datacenter string) { + o.Datacenter = datacenter +} + +// WithUID adds the uid to the v1 vsphere accounts Uid cluster res params +func (o *V1VsphereAccountsUIDClusterResParams) WithUID(uid string) *V1VsphereAccountsUIDClusterResParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 vsphere accounts Uid cluster res params +func (o *V1VsphereAccountsUIDClusterResParams) SetUID(uid string) { + o.UID = uid +} + +// WithUseQualifiedNetworkName adds the useQualifiedNetworkName to the v1 vsphere accounts Uid cluster res params +func (o *V1VsphereAccountsUIDClusterResParams) WithUseQualifiedNetworkName(useQualifiedNetworkName *bool) *V1VsphereAccountsUIDClusterResParams { + o.SetUseQualifiedNetworkName(useQualifiedNetworkName) + return o +} + +// SetUseQualifiedNetworkName adds the useQualifiedNetworkName to the v1 vsphere accounts Uid cluster res params +func (o *V1VsphereAccountsUIDClusterResParams) SetUseQualifiedNetworkName(useQualifiedNetworkName *bool) { + o.UseQualifiedNetworkName = useQualifiedNetworkName +} + +// WriteToRequest writes these params to a swagger request +func (o *V1VsphereAccountsUIDClusterResParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // query param computecluster + qrComputecluster := o.Computecluster + qComputecluster := qrComputecluster + if qComputecluster != "" { + if err := r.SetQueryParam("computecluster", qComputecluster); err != nil { + return err + } + } + + // query param datacenter + qrDatacenter := o.Datacenter + qDatacenter := qrDatacenter + if qDatacenter != "" { + if err := r.SetQueryParam("datacenter", qDatacenter); err != nil { + return err + } + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if o.UseQualifiedNetworkName != nil { + + // query param useQualifiedNetworkName + var qrUseQualifiedNetworkName bool + if o.UseQualifiedNetworkName != nil { + qrUseQualifiedNetworkName = *o.UseQualifiedNetworkName + } + qUseQualifiedNetworkName := swag.FormatBool(qrUseQualifiedNetworkName) + if qUseQualifiedNetworkName != "" { + if err := r.SetQueryParam("useQualifiedNetworkName", qUseQualifiedNetworkName); err != nil { + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_vsphere_accounts_uid_cluster_res_responses.go b/api/client/v1/v1_vsphere_accounts_uid_cluster_res_responses.go new file mode 100644 index 00000000..b518b232 --- /dev/null +++ b/api/client/v1/v1_vsphere_accounts_uid_cluster_res_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1VsphereAccountsUIDClusterResReader is a Reader for the V1VsphereAccountsUIDClusterRes structure. +type V1VsphereAccountsUIDClusterResReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1VsphereAccountsUIDClusterResReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1VsphereAccountsUIDClusterResOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1VsphereAccountsUIDClusterResOK creates a V1VsphereAccountsUIDClusterResOK with default headers values +func NewV1VsphereAccountsUIDClusterResOK() *V1VsphereAccountsUIDClusterResOK { + return &V1VsphereAccountsUIDClusterResOK{} +} + +/* +V1VsphereAccountsUIDClusterResOK handles this case with default header values. + +(empty) +*/ +type V1VsphereAccountsUIDClusterResOK struct { + Payload *models.V1VsphereComputeClusterResources +} + +func (o *V1VsphereAccountsUIDClusterResOK) Error() string { + return fmt.Sprintf("[GET /v1/cloudaccounts/vsphere/{uid}/properties/computecluster/resources][%d] v1VsphereAccountsUidClusterResOK %+v", 200, o.Payload) +} + +func (o *V1VsphereAccountsUIDClusterResOK) GetPayload() *models.V1VsphereComputeClusterResources { + return o.Payload +} + +func (o *V1VsphereAccountsUIDClusterResOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1VsphereComputeClusterResources) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_vsphere_accounts_uid_datacenters_parameters.go b/api/client/v1/v1_vsphere_accounts_uid_datacenters_parameters.go new file mode 100644 index 00000000..4e147b3d --- /dev/null +++ b/api/client/v1/v1_vsphere_accounts_uid_datacenters_parameters.go @@ -0,0 +1,133 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1VsphereAccountsUIDDatacentersParams creates a new V1VsphereAccountsUIDDatacentersParams object +// with the default values initialized. +func NewV1VsphereAccountsUIDDatacentersParams() *V1VsphereAccountsUIDDatacentersParams { + var () + return &V1VsphereAccountsUIDDatacentersParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1VsphereAccountsUIDDatacentersParamsWithTimeout creates a new V1VsphereAccountsUIDDatacentersParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1VsphereAccountsUIDDatacentersParamsWithTimeout(timeout time.Duration) *V1VsphereAccountsUIDDatacentersParams { + var () + return &V1VsphereAccountsUIDDatacentersParams{ + + timeout: timeout, + } +} + +// NewV1VsphereAccountsUIDDatacentersParamsWithContext creates a new V1VsphereAccountsUIDDatacentersParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1VsphereAccountsUIDDatacentersParamsWithContext(ctx context.Context) *V1VsphereAccountsUIDDatacentersParams { + var () + return &V1VsphereAccountsUIDDatacentersParams{ + + Context: ctx, + } +} + +// NewV1VsphereAccountsUIDDatacentersParamsWithHTTPClient creates a new V1VsphereAccountsUIDDatacentersParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1VsphereAccountsUIDDatacentersParamsWithHTTPClient(client *http.Client) *V1VsphereAccountsUIDDatacentersParams { + var () + return &V1VsphereAccountsUIDDatacentersParams{ + HTTPClient: client, + } +} + +/* +V1VsphereAccountsUIDDatacentersParams contains all the parameters to send to the API endpoint +for the v1 vsphere accounts Uid datacenters operation typically these are written to a http.Request +*/ +type V1VsphereAccountsUIDDatacentersParams struct { + + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 vsphere accounts Uid datacenters params +func (o *V1VsphereAccountsUIDDatacentersParams) WithTimeout(timeout time.Duration) *V1VsphereAccountsUIDDatacentersParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 vsphere accounts Uid datacenters params +func (o *V1VsphereAccountsUIDDatacentersParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 vsphere accounts Uid datacenters params +func (o *V1VsphereAccountsUIDDatacentersParams) WithContext(ctx context.Context) *V1VsphereAccountsUIDDatacentersParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 vsphere accounts Uid datacenters params +func (o *V1VsphereAccountsUIDDatacentersParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 vsphere accounts Uid datacenters params +func (o *V1VsphereAccountsUIDDatacentersParams) WithHTTPClient(client *http.Client) *V1VsphereAccountsUIDDatacentersParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 vsphere accounts Uid datacenters params +func (o *V1VsphereAccountsUIDDatacentersParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithUID adds the uid to the v1 vsphere accounts Uid datacenters params +func (o *V1VsphereAccountsUIDDatacentersParams) WithUID(uid string) *V1VsphereAccountsUIDDatacentersParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 vsphere accounts Uid datacenters params +func (o *V1VsphereAccountsUIDDatacentersParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1VsphereAccountsUIDDatacentersParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_vsphere_accounts_uid_datacenters_responses.go b/api/client/v1/v1_vsphere_accounts_uid_datacenters_responses.go new file mode 100644 index 00000000..7bd513ab --- /dev/null +++ b/api/client/v1/v1_vsphere_accounts_uid_datacenters_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1VsphereAccountsUIDDatacentersReader is a Reader for the V1VsphereAccountsUIDDatacenters structure. +type V1VsphereAccountsUIDDatacentersReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1VsphereAccountsUIDDatacentersReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1VsphereAccountsUIDDatacentersOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1VsphereAccountsUIDDatacentersOK creates a V1VsphereAccountsUIDDatacentersOK with default headers values +func NewV1VsphereAccountsUIDDatacentersOK() *V1VsphereAccountsUIDDatacentersOK { + return &V1VsphereAccountsUIDDatacentersOK{} +} + +/* +V1VsphereAccountsUIDDatacentersOK handles this case with default header values. + +(empty) +*/ +type V1VsphereAccountsUIDDatacentersOK struct { + Payload *models.V1VsphereDatacenters +} + +func (o *V1VsphereAccountsUIDDatacentersOK) Error() string { + return fmt.Sprintf("[GET /v1/cloudaccounts/vsphere/{uid}/properties/datacenters][%d] v1VsphereAccountsUidDatacentersOK %+v", 200, o.Payload) +} + +func (o *V1VsphereAccountsUIDDatacentersOK) GetPayload() *models.V1VsphereDatacenters { + return o.Payload +} + +func (o *V1VsphereAccountsUIDDatacentersOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1VsphereDatacenters) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_vsphere_compute_cluster_resources_parameters.go b/api/client/v1/v1_vsphere_compute_cluster_resources_parameters.go new file mode 100644 index 00000000..d1e77f49 --- /dev/null +++ b/api/client/v1/v1_vsphere_compute_cluster_resources_parameters.go @@ -0,0 +1,182 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1VsphereComputeClusterResourcesParams creates a new V1VsphereComputeClusterResourcesParams object +// with the default values initialized. +func NewV1VsphereComputeClusterResourcesParams() *V1VsphereComputeClusterResourcesParams { + var () + return &V1VsphereComputeClusterResourcesParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1VsphereComputeClusterResourcesParamsWithTimeout creates a new V1VsphereComputeClusterResourcesParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1VsphereComputeClusterResourcesParamsWithTimeout(timeout time.Duration) *V1VsphereComputeClusterResourcesParams { + var () + return &V1VsphereComputeClusterResourcesParams{ + + timeout: timeout, + } +} + +// NewV1VsphereComputeClusterResourcesParamsWithContext creates a new V1VsphereComputeClusterResourcesParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1VsphereComputeClusterResourcesParamsWithContext(ctx context.Context) *V1VsphereComputeClusterResourcesParams { + var () + return &V1VsphereComputeClusterResourcesParams{ + + Context: ctx, + } +} + +// NewV1VsphereComputeClusterResourcesParamsWithHTTPClient creates a new V1VsphereComputeClusterResourcesParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1VsphereComputeClusterResourcesParamsWithHTTPClient(client *http.Client) *V1VsphereComputeClusterResourcesParams { + var () + return &V1VsphereComputeClusterResourcesParams{ + HTTPClient: client, + } +} + +/* +V1VsphereComputeClusterResourcesParams contains all the parameters to send to the API endpoint +for the v1 vsphere compute cluster resources operation typically these are written to a http.Request +*/ +type V1VsphereComputeClusterResourcesParams struct { + + /*CloudAccountUID + Uid for the specific VSphere cloud account + + */ + CloudAccountUID string + /*Computecluster + computecluster for which resources is requested + + */ + Computecluster string + /*UID + VSphere datacenter uid for which resources is requested + + */ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 vsphere compute cluster resources params +func (o *V1VsphereComputeClusterResourcesParams) WithTimeout(timeout time.Duration) *V1VsphereComputeClusterResourcesParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 vsphere compute cluster resources params +func (o *V1VsphereComputeClusterResourcesParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 vsphere compute cluster resources params +func (o *V1VsphereComputeClusterResourcesParams) WithContext(ctx context.Context) *V1VsphereComputeClusterResourcesParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 vsphere compute cluster resources params +func (o *V1VsphereComputeClusterResourcesParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 vsphere compute cluster resources params +func (o *V1VsphereComputeClusterResourcesParams) WithHTTPClient(client *http.Client) *V1VsphereComputeClusterResourcesParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 vsphere compute cluster resources params +func (o *V1VsphereComputeClusterResourcesParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithCloudAccountUID adds the cloudAccountUID to the v1 vsphere compute cluster resources params +func (o *V1VsphereComputeClusterResourcesParams) WithCloudAccountUID(cloudAccountUID string) *V1VsphereComputeClusterResourcesParams { + o.SetCloudAccountUID(cloudAccountUID) + return o +} + +// SetCloudAccountUID adds the cloudAccountUid to the v1 vsphere compute cluster resources params +func (o *V1VsphereComputeClusterResourcesParams) SetCloudAccountUID(cloudAccountUID string) { + o.CloudAccountUID = cloudAccountUID +} + +// WithComputecluster adds the computecluster to the v1 vsphere compute cluster resources params +func (o *V1VsphereComputeClusterResourcesParams) WithComputecluster(computecluster string) *V1VsphereComputeClusterResourcesParams { + o.SetComputecluster(computecluster) + return o +} + +// SetComputecluster adds the computecluster to the v1 vsphere compute cluster resources params +func (o *V1VsphereComputeClusterResourcesParams) SetComputecluster(computecluster string) { + o.Computecluster = computecluster +} + +// WithUID adds the uid to the v1 vsphere compute cluster resources params +func (o *V1VsphereComputeClusterResourcesParams) WithUID(uid string) *V1VsphereComputeClusterResourcesParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 vsphere compute cluster resources params +func (o *V1VsphereComputeClusterResourcesParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1VsphereComputeClusterResourcesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // query param cloudAccountUid + qrCloudAccountUID := o.CloudAccountUID + qCloudAccountUID := qrCloudAccountUID + if qCloudAccountUID != "" { + if err := r.SetQueryParam("cloudAccountUid", qCloudAccountUID); err != nil { + return err + } + } + + // path param computecluster + if err := r.SetPathParam("computecluster", o.Computecluster); err != nil { + return err + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_vsphere_compute_cluster_resources_responses.go b/api/client/v1/v1_vsphere_compute_cluster_resources_responses.go new file mode 100644 index 00000000..6a7815a9 --- /dev/null +++ b/api/client/v1/v1_vsphere_compute_cluster_resources_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1VsphereComputeClusterResourcesReader is a Reader for the V1VsphereComputeClusterResources structure. +type V1VsphereComputeClusterResourcesReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1VsphereComputeClusterResourcesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1VsphereComputeClusterResourcesOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1VsphereComputeClusterResourcesOK creates a V1VsphereComputeClusterResourcesOK with default headers values +func NewV1VsphereComputeClusterResourcesOK() *V1VsphereComputeClusterResourcesOK { + return &V1VsphereComputeClusterResourcesOK{} +} + +/* +V1VsphereComputeClusterResourcesOK handles this case with default header values. + +(empty) +*/ +type V1VsphereComputeClusterResourcesOK struct { + Payload *models.V1VsphereComputeClusterResources +} + +func (o *V1VsphereComputeClusterResourcesOK) Error() string { + return fmt.Sprintf("[GET /v1/clouds/vsphere/datacenters/{uid}/computeclusters/{computecluster}][%d] v1VsphereComputeClusterResourcesOK %+v", 200, o.Payload) +} + +func (o *V1VsphereComputeClusterResourcesOK) GetPayload() *models.V1VsphereComputeClusterResources { + return o.Payload +} + +func (o *V1VsphereComputeClusterResourcesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1VsphereComputeClusterResources) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_vsphere_datacenters_parameters.go b/api/client/v1/v1_vsphere_datacenters_parameters.go new file mode 100644 index 00000000..d1b0921d --- /dev/null +++ b/api/client/v1/v1_vsphere_datacenters_parameters.go @@ -0,0 +1,147 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1VsphereDatacentersParams creates a new V1VsphereDatacentersParams object +// with the default values initialized. +func NewV1VsphereDatacentersParams() *V1VsphereDatacentersParams { + var () + return &V1VsphereDatacentersParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1VsphereDatacentersParamsWithTimeout creates a new V1VsphereDatacentersParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1VsphereDatacentersParamsWithTimeout(timeout time.Duration) *V1VsphereDatacentersParams { + var () + return &V1VsphereDatacentersParams{ + + timeout: timeout, + } +} + +// NewV1VsphereDatacentersParamsWithContext creates a new V1VsphereDatacentersParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1VsphereDatacentersParamsWithContext(ctx context.Context) *V1VsphereDatacentersParams { + var () + return &V1VsphereDatacentersParams{ + + Context: ctx, + } +} + +// NewV1VsphereDatacentersParamsWithHTTPClient creates a new V1VsphereDatacentersParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1VsphereDatacentersParamsWithHTTPClient(client *http.Client) *V1VsphereDatacentersParams { + var () + return &V1VsphereDatacentersParams{ + HTTPClient: client, + } +} + +/* +V1VsphereDatacentersParams contains all the parameters to send to the API endpoint +for the v1 vsphere datacenters operation typically these are written to a http.Request +*/ +type V1VsphereDatacentersParams struct { + + /*CloudAccountUID + Uid for the specific OpenStack cloud account + + */ + CloudAccountUID *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 vsphere datacenters params +func (o *V1VsphereDatacentersParams) WithTimeout(timeout time.Duration) *V1VsphereDatacentersParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 vsphere datacenters params +func (o *V1VsphereDatacentersParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 vsphere datacenters params +func (o *V1VsphereDatacentersParams) WithContext(ctx context.Context) *V1VsphereDatacentersParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 vsphere datacenters params +func (o *V1VsphereDatacentersParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 vsphere datacenters params +func (o *V1VsphereDatacentersParams) WithHTTPClient(client *http.Client) *V1VsphereDatacentersParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 vsphere datacenters params +func (o *V1VsphereDatacentersParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithCloudAccountUID adds the cloudAccountUID to the v1 vsphere datacenters params +func (o *V1VsphereDatacentersParams) WithCloudAccountUID(cloudAccountUID *string) *V1VsphereDatacentersParams { + o.SetCloudAccountUID(cloudAccountUID) + return o +} + +// SetCloudAccountUID adds the cloudAccountUid to the v1 vsphere datacenters params +func (o *V1VsphereDatacentersParams) SetCloudAccountUID(cloudAccountUID *string) { + o.CloudAccountUID = cloudAccountUID +} + +// WriteToRequest writes these params to a swagger request +func (o *V1VsphereDatacentersParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.CloudAccountUID != nil { + + // query param cloudAccountUid + var qrCloudAccountUID string + if o.CloudAccountUID != nil { + qrCloudAccountUID = *o.CloudAccountUID + } + qCloudAccountUID := qrCloudAccountUID + if qCloudAccountUID != "" { + if err := r.SetQueryParam("cloudAccountUid", qCloudAccountUID); err != nil { + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_vsphere_datacenters_responses.go b/api/client/v1/v1_vsphere_datacenters_responses.go new file mode 100644 index 00000000..36df67f1 --- /dev/null +++ b/api/client/v1/v1_vsphere_datacenters_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1VsphereDatacentersReader is a Reader for the V1VsphereDatacenters structure. +type V1VsphereDatacentersReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1VsphereDatacentersReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1VsphereDatacentersOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1VsphereDatacentersOK creates a V1VsphereDatacentersOK with default headers values +func NewV1VsphereDatacentersOK() *V1VsphereDatacentersOK { + return &V1VsphereDatacentersOK{} +} + +/* +V1VsphereDatacentersOK handles this case with default header values. + +(empty) +*/ +type V1VsphereDatacentersOK struct { + Payload *models.V1VsphereDatacenters +} + +func (o *V1VsphereDatacentersOK) Error() string { + return fmt.Sprintf("[GET /v1/clouds/vsphere/datacenters][%d] v1VsphereDatacentersOK %+v", 200, o.Payload) +} + +func (o *V1VsphereDatacentersOK) GetPayload() *models.V1VsphereDatacenters { + return o.Payload +} + +func (o *V1VsphereDatacentersOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1VsphereDatacenters) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_vsphere_dns_mapping_create_parameters.go b/api/client/v1/v1_vsphere_dns_mapping_create_parameters.go new file mode 100644 index 00000000..f5b92bcc --- /dev/null +++ b/api/client/v1/v1_vsphere_dns_mapping_create_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1VsphereDNSMappingCreateParams creates a new V1VsphereDNSMappingCreateParams object +// with the default values initialized. +func NewV1VsphereDNSMappingCreateParams() *V1VsphereDNSMappingCreateParams { + var () + return &V1VsphereDNSMappingCreateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1VsphereDNSMappingCreateParamsWithTimeout creates a new V1VsphereDNSMappingCreateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1VsphereDNSMappingCreateParamsWithTimeout(timeout time.Duration) *V1VsphereDNSMappingCreateParams { + var () + return &V1VsphereDNSMappingCreateParams{ + + timeout: timeout, + } +} + +// NewV1VsphereDNSMappingCreateParamsWithContext creates a new V1VsphereDNSMappingCreateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1VsphereDNSMappingCreateParamsWithContext(ctx context.Context) *V1VsphereDNSMappingCreateParams { + var () + return &V1VsphereDNSMappingCreateParams{ + + Context: ctx, + } +} + +// NewV1VsphereDNSMappingCreateParamsWithHTTPClient creates a new V1VsphereDNSMappingCreateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1VsphereDNSMappingCreateParamsWithHTTPClient(client *http.Client) *V1VsphereDNSMappingCreateParams { + var () + return &V1VsphereDNSMappingCreateParams{ + HTTPClient: client, + } +} + +/* +V1VsphereDNSMappingCreateParams contains all the parameters to send to the API endpoint +for the v1 vsphere Dns mapping create operation typically these are written to a http.Request +*/ +type V1VsphereDNSMappingCreateParams struct { + + /*Body*/ + Body *models.V1VsphereDNSMapping + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 vsphere Dns mapping create params +func (o *V1VsphereDNSMappingCreateParams) WithTimeout(timeout time.Duration) *V1VsphereDNSMappingCreateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 vsphere Dns mapping create params +func (o *V1VsphereDNSMappingCreateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 vsphere Dns mapping create params +func (o *V1VsphereDNSMappingCreateParams) WithContext(ctx context.Context) *V1VsphereDNSMappingCreateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 vsphere Dns mapping create params +func (o *V1VsphereDNSMappingCreateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 vsphere Dns mapping create params +func (o *V1VsphereDNSMappingCreateParams) WithHTTPClient(client *http.Client) *V1VsphereDNSMappingCreateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 vsphere Dns mapping create params +func (o *V1VsphereDNSMappingCreateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 vsphere Dns mapping create params +func (o *V1VsphereDNSMappingCreateParams) WithBody(body *models.V1VsphereDNSMapping) *V1VsphereDNSMappingCreateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 vsphere Dns mapping create params +func (o *V1VsphereDNSMappingCreateParams) SetBody(body *models.V1VsphereDNSMapping) { + o.Body = body +} + +// WriteToRequest writes these params to a swagger request +func (o *V1VsphereDNSMappingCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_vsphere_dns_mapping_create_responses.go b/api/client/v1/v1_vsphere_dns_mapping_create_responses.go new file mode 100644 index 00000000..eb639ec3 --- /dev/null +++ b/api/client/v1/v1_vsphere_dns_mapping_create_responses.go @@ -0,0 +1,77 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1VsphereDNSMappingCreateReader is a Reader for the V1VsphereDNSMappingCreate structure. +type V1VsphereDNSMappingCreateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1VsphereDNSMappingCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 201: + result := NewV1VsphereDNSMappingCreateCreated() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1VsphereDNSMappingCreateCreated creates a V1VsphereDNSMappingCreateCreated with default headers values +func NewV1VsphereDNSMappingCreateCreated() *V1VsphereDNSMappingCreateCreated { + return &V1VsphereDNSMappingCreateCreated{} +} + +/* +V1VsphereDNSMappingCreateCreated handles this case with default header values. + +Created successfully +*/ +type V1VsphereDNSMappingCreateCreated struct { + /*Audit uid for the request + */ + AuditUID string + + Payload *models.V1UID +} + +func (o *V1VsphereDNSMappingCreateCreated) Error() string { + return fmt.Sprintf("[POST /v1/users/assets/vsphere/dnsMappings][%d] v1VsphereDnsMappingCreateCreated %+v", 201, o.Payload) +} + +func (o *V1VsphereDNSMappingCreateCreated) GetPayload() *models.V1UID { + return o.Payload +} + +func (o *V1VsphereDNSMappingCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header AuditUid + o.AuditUID = response.GetHeader("AuditUid") + + o.Payload = new(models.V1UID) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_vsphere_dns_mapping_delete_parameters.go b/api/client/v1/v1_vsphere_dns_mapping_delete_parameters.go new file mode 100644 index 00000000..348eea7b --- /dev/null +++ b/api/client/v1/v1_vsphere_dns_mapping_delete_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1VsphereDNSMappingDeleteParams creates a new V1VsphereDNSMappingDeleteParams object +// with the default values initialized. +func NewV1VsphereDNSMappingDeleteParams() *V1VsphereDNSMappingDeleteParams { + var () + return &V1VsphereDNSMappingDeleteParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1VsphereDNSMappingDeleteParamsWithTimeout creates a new V1VsphereDNSMappingDeleteParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1VsphereDNSMappingDeleteParamsWithTimeout(timeout time.Duration) *V1VsphereDNSMappingDeleteParams { + var () + return &V1VsphereDNSMappingDeleteParams{ + + timeout: timeout, + } +} + +// NewV1VsphereDNSMappingDeleteParamsWithContext creates a new V1VsphereDNSMappingDeleteParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1VsphereDNSMappingDeleteParamsWithContext(ctx context.Context) *V1VsphereDNSMappingDeleteParams { + var () + return &V1VsphereDNSMappingDeleteParams{ + + Context: ctx, + } +} + +// NewV1VsphereDNSMappingDeleteParamsWithHTTPClient creates a new V1VsphereDNSMappingDeleteParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1VsphereDNSMappingDeleteParamsWithHTTPClient(client *http.Client) *V1VsphereDNSMappingDeleteParams { + var () + return &V1VsphereDNSMappingDeleteParams{ + HTTPClient: client, + } +} + +/* +V1VsphereDNSMappingDeleteParams contains all the parameters to send to the API endpoint +for the v1 vsphere Dns mapping delete operation typically these are written to a http.Request +*/ +type V1VsphereDNSMappingDeleteParams struct { + + /*UID + Specify the vSphere DNS mapping uid + + */ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 vsphere Dns mapping delete params +func (o *V1VsphereDNSMappingDeleteParams) WithTimeout(timeout time.Duration) *V1VsphereDNSMappingDeleteParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 vsphere Dns mapping delete params +func (o *V1VsphereDNSMappingDeleteParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 vsphere Dns mapping delete params +func (o *V1VsphereDNSMappingDeleteParams) WithContext(ctx context.Context) *V1VsphereDNSMappingDeleteParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 vsphere Dns mapping delete params +func (o *V1VsphereDNSMappingDeleteParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 vsphere Dns mapping delete params +func (o *V1VsphereDNSMappingDeleteParams) WithHTTPClient(client *http.Client) *V1VsphereDNSMappingDeleteParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 vsphere Dns mapping delete params +func (o *V1VsphereDNSMappingDeleteParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithUID adds the uid to the v1 vsphere Dns mapping delete params +func (o *V1VsphereDNSMappingDeleteParams) WithUID(uid string) *V1VsphereDNSMappingDeleteParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 vsphere Dns mapping delete params +func (o *V1VsphereDNSMappingDeleteParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1VsphereDNSMappingDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_vsphere_dns_mapping_delete_responses.go b/api/client/v1/v1_vsphere_dns_mapping_delete_responses.go new file mode 100644 index 00000000..ce8818c3 --- /dev/null +++ b/api/client/v1/v1_vsphere_dns_mapping_delete_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1VsphereDNSMappingDeleteReader is a Reader for the V1VsphereDNSMappingDelete structure. +type V1VsphereDNSMappingDeleteReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1VsphereDNSMappingDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1VsphereDNSMappingDeleteNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1VsphereDNSMappingDeleteNoContent creates a V1VsphereDNSMappingDeleteNoContent with default headers values +func NewV1VsphereDNSMappingDeleteNoContent() *V1VsphereDNSMappingDeleteNoContent { + return &V1VsphereDNSMappingDeleteNoContent{} +} + +/* +V1VsphereDNSMappingDeleteNoContent handles this case with default header values. + +The resource was deleted successfully +*/ +type V1VsphereDNSMappingDeleteNoContent struct { +} + +func (o *V1VsphereDNSMappingDeleteNoContent) Error() string { + return fmt.Sprintf("[DELETE /v1/users/assets/vsphere/dnsMappings/{uid}][%d] v1VsphereDnsMappingDeleteNoContent ", 204) +} + +func (o *V1VsphereDNSMappingDeleteNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_vsphere_dns_mapping_get_parameters.go b/api/client/v1/v1_vsphere_dns_mapping_get_parameters.go new file mode 100644 index 00000000..57d986d4 --- /dev/null +++ b/api/client/v1/v1_vsphere_dns_mapping_get_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1VsphereDNSMappingGetParams creates a new V1VsphereDNSMappingGetParams object +// with the default values initialized. +func NewV1VsphereDNSMappingGetParams() *V1VsphereDNSMappingGetParams { + var () + return &V1VsphereDNSMappingGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1VsphereDNSMappingGetParamsWithTimeout creates a new V1VsphereDNSMappingGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1VsphereDNSMappingGetParamsWithTimeout(timeout time.Duration) *V1VsphereDNSMappingGetParams { + var () + return &V1VsphereDNSMappingGetParams{ + + timeout: timeout, + } +} + +// NewV1VsphereDNSMappingGetParamsWithContext creates a new V1VsphereDNSMappingGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1VsphereDNSMappingGetParamsWithContext(ctx context.Context) *V1VsphereDNSMappingGetParams { + var () + return &V1VsphereDNSMappingGetParams{ + + Context: ctx, + } +} + +// NewV1VsphereDNSMappingGetParamsWithHTTPClient creates a new V1VsphereDNSMappingGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1VsphereDNSMappingGetParamsWithHTTPClient(client *http.Client) *V1VsphereDNSMappingGetParams { + var () + return &V1VsphereDNSMappingGetParams{ + HTTPClient: client, + } +} + +/* +V1VsphereDNSMappingGetParams contains all the parameters to send to the API endpoint +for the v1 vsphere Dns mapping get operation typically these are written to a http.Request +*/ +type V1VsphereDNSMappingGetParams struct { + + /*UID + Specify the vSphere DNS mapping uid + + */ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 vsphere Dns mapping get params +func (o *V1VsphereDNSMappingGetParams) WithTimeout(timeout time.Duration) *V1VsphereDNSMappingGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 vsphere Dns mapping get params +func (o *V1VsphereDNSMappingGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 vsphere Dns mapping get params +func (o *V1VsphereDNSMappingGetParams) WithContext(ctx context.Context) *V1VsphereDNSMappingGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 vsphere Dns mapping get params +func (o *V1VsphereDNSMappingGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 vsphere Dns mapping get params +func (o *V1VsphereDNSMappingGetParams) WithHTTPClient(client *http.Client) *V1VsphereDNSMappingGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 vsphere Dns mapping get params +func (o *V1VsphereDNSMappingGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithUID adds the uid to the v1 vsphere Dns mapping get params +func (o *V1VsphereDNSMappingGetParams) WithUID(uid string) *V1VsphereDNSMappingGetParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 vsphere Dns mapping get params +func (o *V1VsphereDNSMappingGetParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1VsphereDNSMappingGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_vsphere_dns_mapping_get_responses.go b/api/client/v1/v1_vsphere_dns_mapping_get_responses.go new file mode 100644 index 00000000..8cfced50 --- /dev/null +++ b/api/client/v1/v1_vsphere_dns_mapping_get_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1VsphereDNSMappingGetReader is a Reader for the V1VsphereDNSMappingGet structure. +type V1VsphereDNSMappingGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1VsphereDNSMappingGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1VsphereDNSMappingGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1VsphereDNSMappingGetOK creates a V1VsphereDNSMappingGetOK with default headers values +func NewV1VsphereDNSMappingGetOK() *V1VsphereDNSMappingGetOK { + return &V1VsphereDNSMappingGetOK{} +} + +/* +V1VsphereDNSMappingGetOK handles this case with default header values. + +(empty) +*/ +type V1VsphereDNSMappingGetOK struct { + Payload *models.V1VsphereDNSMapping +} + +func (o *V1VsphereDNSMappingGetOK) Error() string { + return fmt.Sprintf("[GET /v1/users/assets/vsphere/dnsMappings/{uid}][%d] v1VsphereDnsMappingGetOK %+v", 200, o.Payload) +} + +func (o *V1VsphereDNSMappingGetOK) GetPayload() *models.V1VsphereDNSMapping { + return o.Payload +} + +func (o *V1VsphereDNSMappingGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1VsphereDNSMapping) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_vsphere_dns_mapping_update_parameters.go b/api/client/v1/v1_vsphere_dns_mapping_update_parameters.go new file mode 100644 index 00000000..0780018a --- /dev/null +++ b/api/client/v1/v1_vsphere_dns_mapping_update_parameters.go @@ -0,0 +1,157 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1VsphereDNSMappingUpdateParams creates a new V1VsphereDNSMappingUpdateParams object +// with the default values initialized. +func NewV1VsphereDNSMappingUpdateParams() *V1VsphereDNSMappingUpdateParams { + var () + return &V1VsphereDNSMappingUpdateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1VsphereDNSMappingUpdateParamsWithTimeout creates a new V1VsphereDNSMappingUpdateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1VsphereDNSMappingUpdateParamsWithTimeout(timeout time.Duration) *V1VsphereDNSMappingUpdateParams { + var () + return &V1VsphereDNSMappingUpdateParams{ + + timeout: timeout, + } +} + +// NewV1VsphereDNSMappingUpdateParamsWithContext creates a new V1VsphereDNSMappingUpdateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1VsphereDNSMappingUpdateParamsWithContext(ctx context.Context) *V1VsphereDNSMappingUpdateParams { + var () + return &V1VsphereDNSMappingUpdateParams{ + + Context: ctx, + } +} + +// NewV1VsphereDNSMappingUpdateParamsWithHTTPClient creates a new V1VsphereDNSMappingUpdateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1VsphereDNSMappingUpdateParamsWithHTTPClient(client *http.Client) *V1VsphereDNSMappingUpdateParams { + var () + return &V1VsphereDNSMappingUpdateParams{ + HTTPClient: client, + } +} + +/* +V1VsphereDNSMappingUpdateParams contains all the parameters to send to the API endpoint +for the v1 vsphere Dns mapping update operation typically these are written to a http.Request +*/ +type V1VsphereDNSMappingUpdateParams struct { + + /*Body*/ + Body *models.V1VsphereDNSMapping + /*UID + Specify the vSphere DNS mapping uid + + */ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 vsphere Dns mapping update params +func (o *V1VsphereDNSMappingUpdateParams) WithTimeout(timeout time.Duration) *V1VsphereDNSMappingUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 vsphere Dns mapping update params +func (o *V1VsphereDNSMappingUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 vsphere Dns mapping update params +func (o *V1VsphereDNSMappingUpdateParams) WithContext(ctx context.Context) *V1VsphereDNSMappingUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 vsphere Dns mapping update params +func (o *V1VsphereDNSMappingUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 vsphere Dns mapping update params +func (o *V1VsphereDNSMappingUpdateParams) WithHTTPClient(client *http.Client) *V1VsphereDNSMappingUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 vsphere Dns mapping update params +func (o *V1VsphereDNSMappingUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 vsphere Dns mapping update params +func (o *V1VsphereDNSMappingUpdateParams) WithBody(body *models.V1VsphereDNSMapping) *V1VsphereDNSMappingUpdateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 vsphere Dns mapping update params +func (o *V1VsphereDNSMappingUpdateParams) SetBody(body *models.V1VsphereDNSMapping) { + o.Body = body +} + +// WithUID adds the uid to the v1 vsphere Dns mapping update params +func (o *V1VsphereDNSMappingUpdateParams) WithUID(uid string) *V1VsphereDNSMappingUpdateParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 vsphere Dns mapping update params +func (o *V1VsphereDNSMappingUpdateParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1VsphereDNSMappingUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_vsphere_dns_mapping_update_responses.go b/api/client/v1/v1_vsphere_dns_mapping_update_responses.go new file mode 100644 index 00000000..8e0fb9c4 --- /dev/null +++ b/api/client/v1/v1_vsphere_dns_mapping_update_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1VsphereDNSMappingUpdateReader is a Reader for the V1VsphereDNSMappingUpdate structure. +type V1VsphereDNSMappingUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1VsphereDNSMappingUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1VsphereDNSMappingUpdateNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1VsphereDNSMappingUpdateNoContent creates a V1VsphereDNSMappingUpdateNoContent with default headers values +func NewV1VsphereDNSMappingUpdateNoContent() *V1VsphereDNSMappingUpdateNoContent { + return &V1VsphereDNSMappingUpdateNoContent{} +} + +/* +V1VsphereDNSMappingUpdateNoContent handles this case with default header values. + +The resource was updated successfully +*/ +type V1VsphereDNSMappingUpdateNoContent struct { +} + +func (o *V1VsphereDNSMappingUpdateNoContent) Error() string { + return fmt.Sprintf("[PUT /v1/users/assets/vsphere/dnsMappings/{uid}][%d] v1VsphereDnsMappingUpdateNoContent ", 204) +} + +func (o *V1VsphereDNSMappingUpdateNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_vsphere_dns_mappings_get_parameters.go b/api/client/v1/v1_vsphere_dns_mappings_get_parameters.go new file mode 100644 index 00000000..6884801e --- /dev/null +++ b/api/client/v1/v1_vsphere_dns_mappings_get_parameters.go @@ -0,0 +1,181 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1VsphereDNSMappingsGetParams creates a new V1VsphereDNSMappingsGetParams object +// with the default values initialized. +func NewV1VsphereDNSMappingsGetParams() *V1VsphereDNSMappingsGetParams { + var () + return &V1VsphereDNSMappingsGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1VsphereDNSMappingsGetParamsWithTimeout creates a new V1VsphereDNSMappingsGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1VsphereDNSMappingsGetParamsWithTimeout(timeout time.Duration) *V1VsphereDNSMappingsGetParams { + var () + return &V1VsphereDNSMappingsGetParams{ + + timeout: timeout, + } +} + +// NewV1VsphereDNSMappingsGetParamsWithContext creates a new V1VsphereDNSMappingsGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1VsphereDNSMappingsGetParamsWithContext(ctx context.Context) *V1VsphereDNSMappingsGetParams { + var () + return &V1VsphereDNSMappingsGetParams{ + + Context: ctx, + } +} + +// NewV1VsphereDNSMappingsGetParamsWithHTTPClient creates a new V1VsphereDNSMappingsGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1VsphereDNSMappingsGetParamsWithHTTPClient(client *http.Client) *V1VsphereDNSMappingsGetParams { + var () + return &V1VsphereDNSMappingsGetParams{ + HTTPClient: client, + } +} + +/* +V1VsphereDNSMappingsGetParams contains all the parameters to send to the API endpoint +for the v1 vsphere Dns mappings get operation typically these are written to a http.Request +*/ +type V1VsphereDNSMappingsGetParams struct { + + /*Filters + Filters can be combined with AND, OR operators with field path name. Eg: metadata.name=TestServiceANDspec.cloudType=aws + + Server will be restricted to certain fields based on the indexed data for each resource. + + */ + Filters *string + /*OrderBy + Specify the fields with sort order. 1 indicates ascending and -1 for descending. Eg: orderBy=metadata.name=1,metadata.uid=-1 + + */ + OrderBy *string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 vsphere Dns mappings get params +func (o *V1VsphereDNSMappingsGetParams) WithTimeout(timeout time.Duration) *V1VsphereDNSMappingsGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 vsphere Dns mappings get params +func (o *V1VsphereDNSMappingsGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 vsphere Dns mappings get params +func (o *V1VsphereDNSMappingsGetParams) WithContext(ctx context.Context) *V1VsphereDNSMappingsGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 vsphere Dns mappings get params +func (o *V1VsphereDNSMappingsGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 vsphere Dns mappings get params +func (o *V1VsphereDNSMappingsGetParams) WithHTTPClient(client *http.Client) *V1VsphereDNSMappingsGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 vsphere Dns mappings get params +func (o *V1VsphereDNSMappingsGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithFilters adds the filters to the v1 vsphere Dns mappings get params +func (o *V1VsphereDNSMappingsGetParams) WithFilters(filters *string) *V1VsphereDNSMappingsGetParams { + o.SetFilters(filters) + return o +} + +// SetFilters adds the filters to the v1 vsphere Dns mappings get params +func (o *V1VsphereDNSMappingsGetParams) SetFilters(filters *string) { + o.Filters = filters +} + +// WithOrderBy adds the orderBy to the v1 vsphere Dns mappings get params +func (o *V1VsphereDNSMappingsGetParams) WithOrderBy(orderBy *string) *V1VsphereDNSMappingsGetParams { + o.SetOrderBy(orderBy) + return o +} + +// SetOrderBy adds the orderBy to the v1 vsphere Dns mappings get params +func (o *V1VsphereDNSMappingsGetParams) SetOrderBy(orderBy *string) { + o.OrderBy = orderBy +} + +// WriteToRequest writes these params to a swagger request +func (o *V1VsphereDNSMappingsGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Filters != nil { + + // query param filters + var qrFilters string + if o.Filters != nil { + qrFilters = *o.Filters + } + qFilters := qrFilters + if qFilters != "" { + if err := r.SetQueryParam("filters", qFilters); err != nil { + return err + } + } + + } + + if o.OrderBy != nil { + + // query param orderBy + var qrOrderBy string + if o.OrderBy != nil { + qrOrderBy = *o.OrderBy + } + qOrderBy := qrOrderBy + if qOrderBy != "" { + if err := r.SetQueryParam("orderBy", qOrderBy); err != nil { + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_vsphere_dns_mappings_get_responses.go b/api/client/v1/v1_vsphere_dns_mappings_get_responses.go new file mode 100644 index 00000000..833aa3f5 --- /dev/null +++ b/api/client/v1/v1_vsphere_dns_mappings_get_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1VsphereDNSMappingsGetReader is a Reader for the V1VsphereDNSMappingsGet structure. +type V1VsphereDNSMappingsGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1VsphereDNSMappingsGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1VsphereDNSMappingsGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1VsphereDNSMappingsGetOK creates a V1VsphereDNSMappingsGetOK with default headers values +func NewV1VsphereDNSMappingsGetOK() *V1VsphereDNSMappingsGetOK { + return &V1VsphereDNSMappingsGetOK{} +} + +/* +V1VsphereDNSMappingsGetOK handles this case with default header values. + +(empty) +*/ +type V1VsphereDNSMappingsGetOK struct { + Payload *models.V1VsphereDNSMappings +} + +func (o *V1VsphereDNSMappingsGetOK) Error() string { + return fmt.Sprintf("[GET /v1/users/assets/vsphere/dnsMappings][%d] v1VsphereDnsMappingsGetOK %+v", 200, o.Payload) +} + +func (o *V1VsphereDNSMappingsGetOK) GetPayload() *models.V1VsphereDNSMappings { + return o.Payload +} + +func (o *V1VsphereDNSMappingsGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1VsphereDNSMappings) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_vsphere_env_parameters.go b/api/client/v1/v1_vsphere_env_parameters.go new file mode 100644 index 00000000..0189ddd6 --- /dev/null +++ b/api/client/v1/v1_vsphere_env_parameters.go @@ -0,0 +1,139 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1VsphereEnvParams creates a new V1VsphereEnvParams object +// with the default values initialized. +func NewV1VsphereEnvParams() *V1VsphereEnvParams { + var () + return &V1VsphereEnvParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1VsphereEnvParamsWithTimeout creates a new V1VsphereEnvParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1VsphereEnvParamsWithTimeout(timeout time.Duration) *V1VsphereEnvParams { + var () + return &V1VsphereEnvParams{ + + timeout: timeout, + } +} + +// NewV1VsphereEnvParamsWithContext creates a new V1VsphereEnvParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1VsphereEnvParamsWithContext(ctx context.Context) *V1VsphereEnvParams { + var () + return &V1VsphereEnvParams{ + + Context: ctx, + } +} + +// NewV1VsphereEnvParamsWithHTTPClient creates a new V1VsphereEnvParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1VsphereEnvParamsWithHTTPClient(client *http.Client) *V1VsphereEnvParams { + var () + return &V1VsphereEnvParams{ + HTTPClient: client, + } +} + +/* +V1VsphereEnvParams contains all the parameters to send to the API endpoint +for the v1 vsphere env operation typically these are written to a http.Request +*/ +type V1VsphereEnvParams struct { + + /*VsphereCloudAccount + Request payload for VSphere cloud account + + */ + VsphereCloudAccount *models.V1VsphereCloudAccount + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 vsphere env params +func (o *V1VsphereEnvParams) WithTimeout(timeout time.Duration) *V1VsphereEnvParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 vsphere env params +func (o *V1VsphereEnvParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 vsphere env params +func (o *V1VsphereEnvParams) WithContext(ctx context.Context) *V1VsphereEnvParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 vsphere env params +func (o *V1VsphereEnvParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 vsphere env params +func (o *V1VsphereEnvParams) WithHTTPClient(client *http.Client) *V1VsphereEnvParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 vsphere env params +func (o *V1VsphereEnvParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithVsphereCloudAccount adds the vsphereCloudAccount to the v1 vsphere env params +func (o *V1VsphereEnvParams) WithVsphereCloudAccount(vsphereCloudAccount *models.V1VsphereCloudAccount) *V1VsphereEnvParams { + o.SetVsphereCloudAccount(vsphereCloudAccount) + return o +} + +// SetVsphereCloudAccount adds the vsphereCloudAccount to the v1 vsphere env params +func (o *V1VsphereEnvParams) SetVsphereCloudAccount(vsphereCloudAccount *models.V1VsphereCloudAccount) { + o.VsphereCloudAccount = vsphereCloudAccount +} + +// WriteToRequest writes these params to a swagger request +func (o *V1VsphereEnvParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.VsphereCloudAccount != nil { + if err := r.SetBodyParam(o.VsphereCloudAccount); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_vsphere_env_responses.go b/api/client/v1/v1_vsphere_env_responses.go new file mode 100644 index 00000000..95ef5d47 --- /dev/null +++ b/api/client/v1/v1_vsphere_env_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1VsphereEnvReader is a Reader for the V1VsphereEnv structure. +type V1VsphereEnvReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1VsphereEnvReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1VsphereEnvOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1VsphereEnvOK creates a V1VsphereEnvOK with default headers values +func NewV1VsphereEnvOK() *V1VsphereEnvOK { + return &V1VsphereEnvOK{} +} + +/* +V1VsphereEnvOK handles this case with default header values. + +(empty) +*/ +type V1VsphereEnvOK struct { + Payload *models.V1VsphereEnv +} + +func (o *V1VsphereEnvOK) Error() string { + return fmt.Sprintf("[GET /v1/clouds/vsphere/env][%d] v1VsphereEnvOK %+v", 200, o.Payload) +} + +func (o *V1VsphereEnvOK) GetPayload() *models.V1VsphereEnv { + return o.Payload +} + +func (o *V1VsphereEnvOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1VsphereEnv) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_vsphere_mapping_get_parameters.go b/api/client/v1/v1_vsphere_mapping_get_parameters.go new file mode 100644 index 00000000..99518862 --- /dev/null +++ b/api/client/v1/v1_vsphere_mapping_get_parameters.go @@ -0,0 +1,190 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1VsphereMappingGetParams creates a new V1VsphereMappingGetParams object +// with the default values initialized. +func NewV1VsphereMappingGetParams() *V1VsphereMappingGetParams { + var () + return &V1VsphereMappingGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1VsphereMappingGetParamsWithTimeout creates a new V1VsphereMappingGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1VsphereMappingGetParamsWithTimeout(timeout time.Duration) *V1VsphereMappingGetParams { + var () + return &V1VsphereMappingGetParams{ + + timeout: timeout, + } +} + +// NewV1VsphereMappingGetParamsWithContext creates a new V1VsphereMappingGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1VsphereMappingGetParamsWithContext(ctx context.Context) *V1VsphereMappingGetParams { + var () + return &V1VsphereMappingGetParams{ + + Context: ctx, + } +} + +// NewV1VsphereMappingGetParamsWithHTTPClient creates a new V1VsphereMappingGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1VsphereMappingGetParamsWithHTTPClient(client *http.Client) *V1VsphereMappingGetParams { + var () + return &V1VsphereMappingGetParams{ + HTTPClient: client, + } +} + +/* +V1VsphereMappingGetParams contains all the parameters to send to the API endpoint +for the v1 vsphere mapping get operation typically these are written to a http.Request +*/ +type V1VsphereMappingGetParams struct { + + /*Datacenter + Specify the vSphere datacenter name + + */ + Datacenter string + /*GatewayUID + Specify the vSphere gateway uid + + */ + GatewayUID string + /*Network + Specify the vSphere network name + + */ + Network string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 vsphere mapping get params +func (o *V1VsphereMappingGetParams) WithTimeout(timeout time.Duration) *V1VsphereMappingGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 vsphere mapping get params +func (o *V1VsphereMappingGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 vsphere mapping get params +func (o *V1VsphereMappingGetParams) WithContext(ctx context.Context) *V1VsphereMappingGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 vsphere mapping get params +func (o *V1VsphereMappingGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 vsphere mapping get params +func (o *V1VsphereMappingGetParams) WithHTTPClient(client *http.Client) *V1VsphereMappingGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 vsphere mapping get params +func (o *V1VsphereMappingGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithDatacenter adds the datacenter to the v1 vsphere mapping get params +func (o *V1VsphereMappingGetParams) WithDatacenter(datacenter string) *V1VsphereMappingGetParams { + o.SetDatacenter(datacenter) + return o +} + +// SetDatacenter adds the datacenter to the v1 vsphere mapping get params +func (o *V1VsphereMappingGetParams) SetDatacenter(datacenter string) { + o.Datacenter = datacenter +} + +// WithGatewayUID adds the gatewayUID to the v1 vsphere mapping get params +func (o *V1VsphereMappingGetParams) WithGatewayUID(gatewayUID string) *V1VsphereMappingGetParams { + o.SetGatewayUID(gatewayUID) + return o +} + +// SetGatewayUID adds the gatewayUid to the v1 vsphere mapping get params +func (o *V1VsphereMappingGetParams) SetGatewayUID(gatewayUID string) { + o.GatewayUID = gatewayUID +} + +// WithNetwork adds the network to the v1 vsphere mapping get params +func (o *V1VsphereMappingGetParams) WithNetwork(network string) *V1VsphereMappingGetParams { + o.SetNetwork(network) + return o +} + +// SetNetwork adds the network to the v1 vsphere mapping get params +func (o *V1VsphereMappingGetParams) SetNetwork(network string) { + o.Network = network +} + +// WriteToRequest writes these params to a swagger request +func (o *V1VsphereMappingGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // query param datacenter + qrDatacenter := o.Datacenter + qDatacenter := qrDatacenter + if qDatacenter != "" { + if err := r.SetQueryParam("datacenter", qDatacenter); err != nil { + return err + } + } + + // query param gatewayUid + qrGatewayUID := o.GatewayUID + qGatewayUID := qrGatewayUID + if qGatewayUID != "" { + if err := r.SetQueryParam("gatewayUid", qGatewayUID); err != nil { + return err + } + } + + // query param network + qrNetwork := o.Network + qNetwork := qrNetwork + if qNetwork != "" { + if err := r.SetQueryParam("network", qNetwork); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_vsphere_mapping_get_responses.go b/api/client/v1/v1_vsphere_mapping_get_responses.go new file mode 100644 index 00000000..63916363 --- /dev/null +++ b/api/client/v1/v1_vsphere_mapping_get_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1VsphereMappingGetReader is a Reader for the V1VsphereMappingGet structure. +type V1VsphereMappingGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1VsphereMappingGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1VsphereMappingGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1VsphereMappingGetOK creates a V1VsphereMappingGetOK with default headers values +func NewV1VsphereMappingGetOK() *V1VsphereMappingGetOK { + return &V1VsphereMappingGetOK{} +} + +/* +V1VsphereMappingGetOK handles this case with default header values. + +(empty) +*/ +type V1VsphereMappingGetOK struct { + Payload *models.V1VsphereDNSMapping +} + +func (o *V1VsphereMappingGetOK) Error() string { + return fmt.Sprintf("[GET /v1/users/assets/vsphere/dnsMapping][%d] v1VsphereMappingGetOK %+v", 200, o.Payload) +} + +func (o *V1VsphereMappingGetOK) GetPayload() *models.V1VsphereDNSMapping { + return o.Payload +} + +func (o *V1VsphereMappingGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1VsphereDNSMapping) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_workspace_ops_backup_create_parameters.go b/api/client/v1/v1_workspace_ops_backup_create_parameters.go new file mode 100644 index 00000000..988195e3 --- /dev/null +++ b/api/client/v1/v1_workspace_ops_backup_create_parameters.go @@ -0,0 +1,154 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1WorkspaceOpsBackupCreateParams creates a new V1WorkspaceOpsBackupCreateParams object +// with the default values initialized. +func NewV1WorkspaceOpsBackupCreateParams() *V1WorkspaceOpsBackupCreateParams { + var () + return &V1WorkspaceOpsBackupCreateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1WorkspaceOpsBackupCreateParamsWithTimeout creates a new V1WorkspaceOpsBackupCreateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1WorkspaceOpsBackupCreateParamsWithTimeout(timeout time.Duration) *V1WorkspaceOpsBackupCreateParams { + var () + return &V1WorkspaceOpsBackupCreateParams{ + + timeout: timeout, + } +} + +// NewV1WorkspaceOpsBackupCreateParamsWithContext creates a new V1WorkspaceOpsBackupCreateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1WorkspaceOpsBackupCreateParamsWithContext(ctx context.Context) *V1WorkspaceOpsBackupCreateParams { + var () + return &V1WorkspaceOpsBackupCreateParams{ + + Context: ctx, + } +} + +// NewV1WorkspaceOpsBackupCreateParamsWithHTTPClient creates a new V1WorkspaceOpsBackupCreateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1WorkspaceOpsBackupCreateParamsWithHTTPClient(client *http.Client) *V1WorkspaceOpsBackupCreateParams { + var () + return &V1WorkspaceOpsBackupCreateParams{ + HTTPClient: client, + } +} + +/* +V1WorkspaceOpsBackupCreateParams contains all the parameters to send to the API endpoint +for the v1 workspace ops backup create operation typically these are written to a http.Request +*/ +type V1WorkspaceOpsBackupCreateParams struct { + + /*Body*/ + Body *models.V1WorkspaceBackupConfigEntity + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 workspace ops backup create params +func (o *V1WorkspaceOpsBackupCreateParams) WithTimeout(timeout time.Duration) *V1WorkspaceOpsBackupCreateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 workspace ops backup create params +func (o *V1WorkspaceOpsBackupCreateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 workspace ops backup create params +func (o *V1WorkspaceOpsBackupCreateParams) WithContext(ctx context.Context) *V1WorkspaceOpsBackupCreateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 workspace ops backup create params +func (o *V1WorkspaceOpsBackupCreateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 workspace ops backup create params +func (o *V1WorkspaceOpsBackupCreateParams) WithHTTPClient(client *http.Client) *V1WorkspaceOpsBackupCreateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 workspace ops backup create params +func (o *V1WorkspaceOpsBackupCreateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 workspace ops backup create params +func (o *V1WorkspaceOpsBackupCreateParams) WithBody(body *models.V1WorkspaceBackupConfigEntity) *V1WorkspaceOpsBackupCreateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 workspace ops backup create params +func (o *V1WorkspaceOpsBackupCreateParams) SetBody(body *models.V1WorkspaceBackupConfigEntity) { + o.Body = body +} + +// WithUID adds the uid to the v1 workspace ops backup create params +func (o *V1WorkspaceOpsBackupCreateParams) WithUID(uid string) *V1WorkspaceOpsBackupCreateParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 workspace ops backup create params +func (o *V1WorkspaceOpsBackupCreateParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1WorkspaceOpsBackupCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_workspace_ops_backup_create_responses.go b/api/client/v1/v1_workspace_ops_backup_create_responses.go new file mode 100644 index 00000000..fc74ff08 --- /dev/null +++ b/api/client/v1/v1_workspace_ops_backup_create_responses.go @@ -0,0 +1,77 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1WorkspaceOpsBackupCreateReader is a Reader for the V1WorkspaceOpsBackupCreate structure. +type V1WorkspaceOpsBackupCreateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1WorkspaceOpsBackupCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 201: + result := NewV1WorkspaceOpsBackupCreateCreated() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1WorkspaceOpsBackupCreateCreated creates a V1WorkspaceOpsBackupCreateCreated with default headers values +func NewV1WorkspaceOpsBackupCreateCreated() *V1WorkspaceOpsBackupCreateCreated { + return &V1WorkspaceOpsBackupCreateCreated{} +} + +/* +V1WorkspaceOpsBackupCreateCreated handles this case with default header values. + +Created successfully +*/ +type V1WorkspaceOpsBackupCreateCreated struct { + /*Audit uid for the request + */ + AuditUID string + + Payload *models.V1UID +} + +func (o *V1WorkspaceOpsBackupCreateCreated) Error() string { + return fmt.Sprintf("[POST /v1/workspaces/{uid}/backup][%d] v1WorkspaceOpsBackupCreateCreated %+v", 201, o.Payload) +} + +func (o *V1WorkspaceOpsBackupCreateCreated) GetPayload() *models.V1UID { + return o.Payload +} + +func (o *V1WorkspaceOpsBackupCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header AuditUid + o.AuditUID = response.GetHeader("AuditUid") + + o.Payload = new(models.V1UID) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_workspace_ops_backup_delete_parameters.go b/api/client/v1/v1_workspace_ops_backup_delete_parameters.go new file mode 100644 index 00000000..9d837361 --- /dev/null +++ b/api/client/v1/v1_workspace_ops_backup_delete_parameters.go @@ -0,0 +1,154 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1WorkspaceOpsBackupDeleteParams creates a new V1WorkspaceOpsBackupDeleteParams object +// with the default values initialized. +func NewV1WorkspaceOpsBackupDeleteParams() *V1WorkspaceOpsBackupDeleteParams { + var () + return &V1WorkspaceOpsBackupDeleteParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1WorkspaceOpsBackupDeleteParamsWithTimeout creates a new V1WorkspaceOpsBackupDeleteParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1WorkspaceOpsBackupDeleteParamsWithTimeout(timeout time.Duration) *V1WorkspaceOpsBackupDeleteParams { + var () + return &V1WorkspaceOpsBackupDeleteParams{ + + timeout: timeout, + } +} + +// NewV1WorkspaceOpsBackupDeleteParamsWithContext creates a new V1WorkspaceOpsBackupDeleteParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1WorkspaceOpsBackupDeleteParamsWithContext(ctx context.Context) *V1WorkspaceOpsBackupDeleteParams { + var () + return &V1WorkspaceOpsBackupDeleteParams{ + + Context: ctx, + } +} + +// NewV1WorkspaceOpsBackupDeleteParamsWithHTTPClient creates a new V1WorkspaceOpsBackupDeleteParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1WorkspaceOpsBackupDeleteParamsWithHTTPClient(client *http.Client) *V1WorkspaceOpsBackupDeleteParams { + var () + return &V1WorkspaceOpsBackupDeleteParams{ + HTTPClient: client, + } +} + +/* +V1WorkspaceOpsBackupDeleteParams contains all the parameters to send to the API endpoint +for the v1 workspace ops backup delete operation typically these are written to a http.Request +*/ +type V1WorkspaceOpsBackupDeleteParams struct { + + /*Body*/ + Body *models.V1WorkspaceBackupDeleteEntity + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 workspace ops backup delete params +func (o *V1WorkspaceOpsBackupDeleteParams) WithTimeout(timeout time.Duration) *V1WorkspaceOpsBackupDeleteParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 workspace ops backup delete params +func (o *V1WorkspaceOpsBackupDeleteParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 workspace ops backup delete params +func (o *V1WorkspaceOpsBackupDeleteParams) WithContext(ctx context.Context) *V1WorkspaceOpsBackupDeleteParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 workspace ops backup delete params +func (o *V1WorkspaceOpsBackupDeleteParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 workspace ops backup delete params +func (o *V1WorkspaceOpsBackupDeleteParams) WithHTTPClient(client *http.Client) *V1WorkspaceOpsBackupDeleteParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 workspace ops backup delete params +func (o *V1WorkspaceOpsBackupDeleteParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 workspace ops backup delete params +func (o *V1WorkspaceOpsBackupDeleteParams) WithBody(body *models.V1WorkspaceBackupDeleteEntity) *V1WorkspaceOpsBackupDeleteParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 workspace ops backup delete params +func (o *V1WorkspaceOpsBackupDeleteParams) SetBody(body *models.V1WorkspaceBackupDeleteEntity) { + o.Body = body +} + +// WithUID adds the uid to the v1 workspace ops backup delete params +func (o *V1WorkspaceOpsBackupDeleteParams) WithUID(uid string) *V1WorkspaceOpsBackupDeleteParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 workspace ops backup delete params +func (o *V1WorkspaceOpsBackupDeleteParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1WorkspaceOpsBackupDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_workspace_ops_backup_delete_responses.go b/api/client/v1/v1_workspace_ops_backup_delete_responses.go new file mode 100644 index 00000000..04945441 --- /dev/null +++ b/api/client/v1/v1_workspace_ops_backup_delete_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1WorkspaceOpsBackupDeleteReader is a Reader for the V1WorkspaceOpsBackupDelete structure. +type V1WorkspaceOpsBackupDeleteReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1WorkspaceOpsBackupDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1WorkspaceOpsBackupDeleteNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1WorkspaceOpsBackupDeleteNoContent creates a V1WorkspaceOpsBackupDeleteNoContent with default headers values +func NewV1WorkspaceOpsBackupDeleteNoContent() *V1WorkspaceOpsBackupDeleteNoContent { + return &V1WorkspaceOpsBackupDeleteNoContent{} +} + +/* +V1WorkspaceOpsBackupDeleteNoContent handles this case with default header values. + +The resource was deleted successfully +*/ +type V1WorkspaceOpsBackupDeleteNoContent struct { +} + +func (o *V1WorkspaceOpsBackupDeleteNoContent) Error() string { + return fmt.Sprintf("[DELETE /v1/workspaces/{uid}/backup][%d] v1WorkspaceOpsBackupDeleteNoContent ", 204) +} + +func (o *V1WorkspaceOpsBackupDeleteNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_workspace_ops_backup_get_parameters.go b/api/client/v1/v1_workspace_ops_backup_get_parameters.go new file mode 100644 index 00000000..d941606c --- /dev/null +++ b/api/client/v1/v1_workspace_ops_backup_get_parameters.go @@ -0,0 +1,162 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1WorkspaceOpsBackupGetParams creates a new V1WorkspaceOpsBackupGetParams object +// with the default values initialized. +func NewV1WorkspaceOpsBackupGetParams() *V1WorkspaceOpsBackupGetParams { + var () + return &V1WorkspaceOpsBackupGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1WorkspaceOpsBackupGetParamsWithTimeout creates a new V1WorkspaceOpsBackupGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1WorkspaceOpsBackupGetParamsWithTimeout(timeout time.Duration) *V1WorkspaceOpsBackupGetParams { + var () + return &V1WorkspaceOpsBackupGetParams{ + + timeout: timeout, + } +} + +// NewV1WorkspaceOpsBackupGetParamsWithContext creates a new V1WorkspaceOpsBackupGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1WorkspaceOpsBackupGetParamsWithContext(ctx context.Context) *V1WorkspaceOpsBackupGetParams { + var () + return &V1WorkspaceOpsBackupGetParams{ + + Context: ctx, + } +} + +// NewV1WorkspaceOpsBackupGetParamsWithHTTPClient creates a new V1WorkspaceOpsBackupGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1WorkspaceOpsBackupGetParamsWithHTTPClient(client *http.Client) *V1WorkspaceOpsBackupGetParams { + var () + return &V1WorkspaceOpsBackupGetParams{ + HTTPClient: client, + } +} + +/* +V1WorkspaceOpsBackupGetParams contains all the parameters to send to the API endpoint +for the v1 workspace ops backup get operation typically these are written to a http.Request +*/ +type V1WorkspaceOpsBackupGetParams struct { + + /*BackupRequestUID*/ + BackupRequestUID *string + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 workspace ops backup get params +func (o *V1WorkspaceOpsBackupGetParams) WithTimeout(timeout time.Duration) *V1WorkspaceOpsBackupGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 workspace ops backup get params +func (o *V1WorkspaceOpsBackupGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 workspace ops backup get params +func (o *V1WorkspaceOpsBackupGetParams) WithContext(ctx context.Context) *V1WorkspaceOpsBackupGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 workspace ops backup get params +func (o *V1WorkspaceOpsBackupGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 workspace ops backup get params +func (o *V1WorkspaceOpsBackupGetParams) WithHTTPClient(client *http.Client) *V1WorkspaceOpsBackupGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 workspace ops backup get params +func (o *V1WorkspaceOpsBackupGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBackupRequestUID adds the backupRequestUID to the v1 workspace ops backup get params +func (o *V1WorkspaceOpsBackupGetParams) WithBackupRequestUID(backupRequestUID *string) *V1WorkspaceOpsBackupGetParams { + o.SetBackupRequestUID(backupRequestUID) + return o +} + +// SetBackupRequestUID adds the backupRequestUid to the v1 workspace ops backup get params +func (o *V1WorkspaceOpsBackupGetParams) SetBackupRequestUID(backupRequestUID *string) { + o.BackupRequestUID = backupRequestUID +} + +// WithUID adds the uid to the v1 workspace ops backup get params +func (o *V1WorkspaceOpsBackupGetParams) WithUID(uid string) *V1WorkspaceOpsBackupGetParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 workspace ops backup get params +func (o *V1WorkspaceOpsBackupGetParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1WorkspaceOpsBackupGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.BackupRequestUID != nil { + + // query param backupRequestUid + var qrBackupRequestUID string + if o.BackupRequestUID != nil { + qrBackupRequestUID = *o.BackupRequestUID + } + qBackupRequestUID := qrBackupRequestUID + if qBackupRequestUID != "" { + if err := r.SetQueryParam("backupRequestUid", qBackupRequestUID); err != nil { + return err + } + } + + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_workspace_ops_backup_get_responses.go b/api/client/v1/v1_workspace_ops_backup_get_responses.go new file mode 100644 index 00000000..d0ad5ff3 --- /dev/null +++ b/api/client/v1/v1_workspace_ops_backup_get_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1WorkspaceOpsBackupGetReader is a Reader for the V1WorkspaceOpsBackupGet structure. +type V1WorkspaceOpsBackupGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1WorkspaceOpsBackupGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1WorkspaceOpsBackupGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1WorkspaceOpsBackupGetOK creates a V1WorkspaceOpsBackupGetOK with default headers values +func NewV1WorkspaceOpsBackupGetOK() *V1WorkspaceOpsBackupGetOK { + return &V1WorkspaceOpsBackupGetOK{} +} + +/* +V1WorkspaceOpsBackupGetOK handles this case with default header values. + +OK +*/ +type V1WorkspaceOpsBackupGetOK struct { + Payload *models.V1WorkspaceBackup +} + +func (o *V1WorkspaceOpsBackupGetOK) Error() string { + return fmt.Sprintf("[GET /v1/workspaces/{uid}/backup][%d] v1WorkspaceOpsBackupGetOK %+v", 200, o.Payload) +} + +func (o *V1WorkspaceOpsBackupGetOK) GetPayload() *models.V1WorkspaceBackup { + return o.Payload +} + +func (o *V1WorkspaceOpsBackupGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1WorkspaceBackup) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_workspace_ops_backup_on_demand_create_parameters.go b/api/client/v1/v1_workspace_ops_backup_on_demand_create_parameters.go new file mode 100644 index 00000000..f03d547b --- /dev/null +++ b/api/client/v1/v1_workspace_ops_backup_on_demand_create_parameters.go @@ -0,0 +1,154 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1WorkspaceOpsBackupOnDemandCreateParams creates a new V1WorkspaceOpsBackupOnDemandCreateParams object +// with the default values initialized. +func NewV1WorkspaceOpsBackupOnDemandCreateParams() *V1WorkspaceOpsBackupOnDemandCreateParams { + var () + return &V1WorkspaceOpsBackupOnDemandCreateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1WorkspaceOpsBackupOnDemandCreateParamsWithTimeout creates a new V1WorkspaceOpsBackupOnDemandCreateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1WorkspaceOpsBackupOnDemandCreateParamsWithTimeout(timeout time.Duration) *V1WorkspaceOpsBackupOnDemandCreateParams { + var () + return &V1WorkspaceOpsBackupOnDemandCreateParams{ + + timeout: timeout, + } +} + +// NewV1WorkspaceOpsBackupOnDemandCreateParamsWithContext creates a new V1WorkspaceOpsBackupOnDemandCreateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1WorkspaceOpsBackupOnDemandCreateParamsWithContext(ctx context.Context) *V1WorkspaceOpsBackupOnDemandCreateParams { + var () + return &V1WorkspaceOpsBackupOnDemandCreateParams{ + + Context: ctx, + } +} + +// NewV1WorkspaceOpsBackupOnDemandCreateParamsWithHTTPClient creates a new V1WorkspaceOpsBackupOnDemandCreateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1WorkspaceOpsBackupOnDemandCreateParamsWithHTTPClient(client *http.Client) *V1WorkspaceOpsBackupOnDemandCreateParams { + var () + return &V1WorkspaceOpsBackupOnDemandCreateParams{ + HTTPClient: client, + } +} + +/* +V1WorkspaceOpsBackupOnDemandCreateParams contains all the parameters to send to the API endpoint +for the v1 workspace ops backup on demand create operation typically these are written to a http.Request +*/ +type V1WorkspaceOpsBackupOnDemandCreateParams struct { + + /*Body*/ + Body *models.V1WorkspaceBackupConfigEntity + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 workspace ops backup on demand create params +func (o *V1WorkspaceOpsBackupOnDemandCreateParams) WithTimeout(timeout time.Duration) *V1WorkspaceOpsBackupOnDemandCreateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 workspace ops backup on demand create params +func (o *V1WorkspaceOpsBackupOnDemandCreateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 workspace ops backup on demand create params +func (o *V1WorkspaceOpsBackupOnDemandCreateParams) WithContext(ctx context.Context) *V1WorkspaceOpsBackupOnDemandCreateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 workspace ops backup on demand create params +func (o *V1WorkspaceOpsBackupOnDemandCreateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 workspace ops backup on demand create params +func (o *V1WorkspaceOpsBackupOnDemandCreateParams) WithHTTPClient(client *http.Client) *V1WorkspaceOpsBackupOnDemandCreateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 workspace ops backup on demand create params +func (o *V1WorkspaceOpsBackupOnDemandCreateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 workspace ops backup on demand create params +func (o *V1WorkspaceOpsBackupOnDemandCreateParams) WithBody(body *models.V1WorkspaceBackupConfigEntity) *V1WorkspaceOpsBackupOnDemandCreateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 workspace ops backup on demand create params +func (o *V1WorkspaceOpsBackupOnDemandCreateParams) SetBody(body *models.V1WorkspaceBackupConfigEntity) { + o.Body = body +} + +// WithUID adds the uid to the v1 workspace ops backup on demand create params +func (o *V1WorkspaceOpsBackupOnDemandCreateParams) WithUID(uid string) *V1WorkspaceOpsBackupOnDemandCreateParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 workspace ops backup on demand create params +func (o *V1WorkspaceOpsBackupOnDemandCreateParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1WorkspaceOpsBackupOnDemandCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_workspace_ops_backup_on_demand_create_responses.go b/api/client/v1/v1_workspace_ops_backup_on_demand_create_responses.go new file mode 100644 index 00000000..5ec08753 --- /dev/null +++ b/api/client/v1/v1_workspace_ops_backup_on_demand_create_responses.go @@ -0,0 +1,77 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1WorkspaceOpsBackupOnDemandCreateReader is a Reader for the V1WorkspaceOpsBackupOnDemandCreate structure. +type V1WorkspaceOpsBackupOnDemandCreateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1WorkspaceOpsBackupOnDemandCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 201: + result := NewV1WorkspaceOpsBackupOnDemandCreateCreated() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1WorkspaceOpsBackupOnDemandCreateCreated creates a V1WorkspaceOpsBackupOnDemandCreateCreated with default headers values +func NewV1WorkspaceOpsBackupOnDemandCreateCreated() *V1WorkspaceOpsBackupOnDemandCreateCreated { + return &V1WorkspaceOpsBackupOnDemandCreateCreated{} +} + +/* +V1WorkspaceOpsBackupOnDemandCreateCreated handles this case with default header values. + +Created successfully +*/ +type V1WorkspaceOpsBackupOnDemandCreateCreated struct { + /*Audit uid for the request + */ + AuditUID string + + Payload *models.V1UID +} + +func (o *V1WorkspaceOpsBackupOnDemandCreateCreated) Error() string { + return fmt.Sprintf("[POST /v1/workspaces/{uid}/backup/onDemand][%d] v1WorkspaceOpsBackupOnDemandCreateCreated %+v", 201, o.Payload) +} + +func (o *V1WorkspaceOpsBackupOnDemandCreateCreated) GetPayload() *models.V1UID { + return o.Payload +} + +func (o *V1WorkspaceOpsBackupOnDemandCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header AuditUid + o.AuditUID = response.GetHeader("AuditUid") + + o.Payload = new(models.V1UID) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_workspace_ops_backup_update_parameters.go b/api/client/v1/v1_workspace_ops_backup_update_parameters.go new file mode 100644 index 00000000..ba0f1931 --- /dev/null +++ b/api/client/v1/v1_workspace_ops_backup_update_parameters.go @@ -0,0 +1,154 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1WorkspaceOpsBackupUpdateParams creates a new V1WorkspaceOpsBackupUpdateParams object +// with the default values initialized. +func NewV1WorkspaceOpsBackupUpdateParams() *V1WorkspaceOpsBackupUpdateParams { + var () + return &V1WorkspaceOpsBackupUpdateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1WorkspaceOpsBackupUpdateParamsWithTimeout creates a new V1WorkspaceOpsBackupUpdateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1WorkspaceOpsBackupUpdateParamsWithTimeout(timeout time.Duration) *V1WorkspaceOpsBackupUpdateParams { + var () + return &V1WorkspaceOpsBackupUpdateParams{ + + timeout: timeout, + } +} + +// NewV1WorkspaceOpsBackupUpdateParamsWithContext creates a new V1WorkspaceOpsBackupUpdateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1WorkspaceOpsBackupUpdateParamsWithContext(ctx context.Context) *V1WorkspaceOpsBackupUpdateParams { + var () + return &V1WorkspaceOpsBackupUpdateParams{ + + Context: ctx, + } +} + +// NewV1WorkspaceOpsBackupUpdateParamsWithHTTPClient creates a new V1WorkspaceOpsBackupUpdateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1WorkspaceOpsBackupUpdateParamsWithHTTPClient(client *http.Client) *V1WorkspaceOpsBackupUpdateParams { + var () + return &V1WorkspaceOpsBackupUpdateParams{ + HTTPClient: client, + } +} + +/* +V1WorkspaceOpsBackupUpdateParams contains all the parameters to send to the API endpoint +for the v1 workspace ops backup update operation typically these are written to a http.Request +*/ +type V1WorkspaceOpsBackupUpdateParams struct { + + /*Body*/ + Body *models.V1WorkspaceBackupConfigEntity + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 workspace ops backup update params +func (o *V1WorkspaceOpsBackupUpdateParams) WithTimeout(timeout time.Duration) *V1WorkspaceOpsBackupUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 workspace ops backup update params +func (o *V1WorkspaceOpsBackupUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 workspace ops backup update params +func (o *V1WorkspaceOpsBackupUpdateParams) WithContext(ctx context.Context) *V1WorkspaceOpsBackupUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 workspace ops backup update params +func (o *V1WorkspaceOpsBackupUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 workspace ops backup update params +func (o *V1WorkspaceOpsBackupUpdateParams) WithHTTPClient(client *http.Client) *V1WorkspaceOpsBackupUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 workspace ops backup update params +func (o *V1WorkspaceOpsBackupUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 workspace ops backup update params +func (o *V1WorkspaceOpsBackupUpdateParams) WithBody(body *models.V1WorkspaceBackupConfigEntity) *V1WorkspaceOpsBackupUpdateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 workspace ops backup update params +func (o *V1WorkspaceOpsBackupUpdateParams) SetBody(body *models.V1WorkspaceBackupConfigEntity) { + o.Body = body +} + +// WithUID adds the uid to the v1 workspace ops backup update params +func (o *V1WorkspaceOpsBackupUpdateParams) WithUID(uid string) *V1WorkspaceOpsBackupUpdateParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 workspace ops backup update params +func (o *V1WorkspaceOpsBackupUpdateParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1WorkspaceOpsBackupUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_workspace_ops_backup_update_responses.go b/api/client/v1/v1_workspace_ops_backup_update_responses.go new file mode 100644 index 00000000..e586f95f --- /dev/null +++ b/api/client/v1/v1_workspace_ops_backup_update_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1WorkspaceOpsBackupUpdateReader is a Reader for the V1WorkspaceOpsBackupUpdate structure. +type V1WorkspaceOpsBackupUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1WorkspaceOpsBackupUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1WorkspaceOpsBackupUpdateNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1WorkspaceOpsBackupUpdateNoContent creates a V1WorkspaceOpsBackupUpdateNoContent with default headers values +func NewV1WorkspaceOpsBackupUpdateNoContent() *V1WorkspaceOpsBackupUpdateNoContent { + return &V1WorkspaceOpsBackupUpdateNoContent{} +} + +/* +V1WorkspaceOpsBackupUpdateNoContent handles this case with default header values. + +The resource was updated successfully +*/ +type V1WorkspaceOpsBackupUpdateNoContent struct { +} + +func (o *V1WorkspaceOpsBackupUpdateNoContent) Error() string { + return fmt.Sprintf("[PUT /v1/workspaces/{uid}/backup][%d] v1WorkspaceOpsBackupUpdateNoContent ", 204) +} + +func (o *V1WorkspaceOpsBackupUpdateNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_workspace_ops_restore_get_parameters.go b/api/client/v1/v1_workspace_ops_restore_get_parameters.go new file mode 100644 index 00000000..8c663099 --- /dev/null +++ b/api/client/v1/v1_workspace_ops_restore_get_parameters.go @@ -0,0 +1,162 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1WorkspaceOpsRestoreGetParams creates a new V1WorkspaceOpsRestoreGetParams object +// with the default values initialized. +func NewV1WorkspaceOpsRestoreGetParams() *V1WorkspaceOpsRestoreGetParams { + var () + return &V1WorkspaceOpsRestoreGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1WorkspaceOpsRestoreGetParamsWithTimeout creates a new V1WorkspaceOpsRestoreGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1WorkspaceOpsRestoreGetParamsWithTimeout(timeout time.Duration) *V1WorkspaceOpsRestoreGetParams { + var () + return &V1WorkspaceOpsRestoreGetParams{ + + timeout: timeout, + } +} + +// NewV1WorkspaceOpsRestoreGetParamsWithContext creates a new V1WorkspaceOpsRestoreGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1WorkspaceOpsRestoreGetParamsWithContext(ctx context.Context) *V1WorkspaceOpsRestoreGetParams { + var () + return &V1WorkspaceOpsRestoreGetParams{ + + Context: ctx, + } +} + +// NewV1WorkspaceOpsRestoreGetParamsWithHTTPClient creates a new V1WorkspaceOpsRestoreGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1WorkspaceOpsRestoreGetParamsWithHTTPClient(client *http.Client) *V1WorkspaceOpsRestoreGetParams { + var () + return &V1WorkspaceOpsRestoreGetParams{ + HTTPClient: client, + } +} + +/* +V1WorkspaceOpsRestoreGetParams contains all the parameters to send to the API endpoint +for the v1 workspace ops restore get operation typically these are written to a http.Request +*/ +type V1WorkspaceOpsRestoreGetParams struct { + + /*RestoreRequestUID*/ + RestoreRequestUID *string + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 workspace ops restore get params +func (o *V1WorkspaceOpsRestoreGetParams) WithTimeout(timeout time.Duration) *V1WorkspaceOpsRestoreGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 workspace ops restore get params +func (o *V1WorkspaceOpsRestoreGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 workspace ops restore get params +func (o *V1WorkspaceOpsRestoreGetParams) WithContext(ctx context.Context) *V1WorkspaceOpsRestoreGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 workspace ops restore get params +func (o *V1WorkspaceOpsRestoreGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 workspace ops restore get params +func (o *V1WorkspaceOpsRestoreGetParams) WithHTTPClient(client *http.Client) *V1WorkspaceOpsRestoreGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 workspace ops restore get params +func (o *V1WorkspaceOpsRestoreGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithRestoreRequestUID adds the restoreRequestUID to the v1 workspace ops restore get params +func (o *V1WorkspaceOpsRestoreGetParams) WithRestoreRequestUID(restoreRequestUID *string) *V1WorkspaceOpsRestoreGetParams { + o.SetRestoreRequestUID(restoreRequestUID) + return o +} + +// SetRestoreRequestUID adds the restoreRequestUid to the v1 workspace ops restore get params +func (o *V1WorkspaceOpsRestoreGetParams) SetRestoreRequestUID(restoreRequestUID *string) { + o.RestoreRequestUID = restoreRequestUID +} + +// WithUID adds the uid to the v1 workspace ops restore get params +func (o *V1WorkspaceOpsRestoreGetParams) WithUID(uid string) *V1WorkspaceOpsRestoreGetParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 workspace ops restore get params +func (o *V1WorkspaceOpsRestoreGetParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1WorkspaceOpsRestoreGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.RestoreRequestUID != nil { + + // query param restoreRequestUid + var qrRestoreRequestUID string + if o.RestoreRequestUID != nil { + qrRestoreRequestUID = *o.RestoreRequestUID + } + qRestoreRequestUID := qrRestoreRequestUID + if qRestoreRequestUID != "" { + if err := r.SetQueryParam("restoreRequestUid", qRestoreRequestUID); err != nil { + return err + } + } + + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_workspace_ops_restore_get_responses.go b/api/client/v1/v1_workspace_ops_restore_get_responses.go new file mode 100644 index 00000000..ac6cd61e --- /dev/null +++ b/api/client/v1/v1_workspace_ops_restore_get_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1WorkspaceOpsRestoreGetReader is a Reader for the V1WorkspaceOpsRestoreGet structure. +type V1WorkspaceOpsRestoreGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1WorkspaceOpsRestoreGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1WorkspaceOpsRestoreGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1WorkspaceOpsRestoreGetOK creates a V1WorkspaceOpsRestoreGetOK with default headers values +func NewV1WorkspaceOpsRestoreGetOK() *V1WorkspaceOpsRestoreGetOK { + return &V1WorkspaceOpsRestoreGetOK{} +} + +/* +V1WorkspaceOpsRestoreGetOK handles this case with default header values. + +OK +*/ +type V1WorkspaceOpsRestoreGetOK struct { + Payload *models.V1WorkspaceRestore +} + +func (o *V1WorkspaceOpsRestoreGetOK) Error() string { + return fmt.Sprintf("[GET /v1/workspaces/{uid}/restore][%d] v1WorkspaceOpsRestoreGetOK %+v", 200, o.Payload) +} + +func (o *V1WorkspaceOpsRestoreGetOK) GetPayload() *models.V1WorkspaceRestore { + return o.Payload +} + +func (o *V1WorkspaceOpsRestoreGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1WorkspaceRestore) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_workspace_ops_restore_on_demand_create_parameters.go b/api/client/v1/v1_workspace_ops_restore_on_demand_create_parameters.go new file mode 100644 index 00000000..4fb6125a --- /dev/null +++ b/api/client/v1/v1_workspace_ops_restore_on_demand_create_parameters.go @@ -0,0 +1,154 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1WorkspaceOpsRestoreOnDemandCreateParams creates a new V1WorkspaceOpsRestoreOnDemandCreateParams object +// with the default values initialized. +func NewV1WorkspaceOpsRestoreOnDemandCreateParams() *V1WorkspaceOpsRestoreOnDemandCreateParams { + var () + return &V1WorkspaceOpsRestoreOnDemandCreateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1WorkspaceOpsRestoreOnDemandCreateParamsWithTimeout creates a new V1WorkspaceOpsRestoreOnDemandCreateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1WorkspaceOpsRestoreOnDemandCreateParamsWithTimeout(timeout time.Duration) *V1WorkspaceOpsRestoreOnDemandCreateParams { + var () + return &V1WorkspaceOpsRestoreOnDemandCreateParams{ + + timeout: timeout, + } +} + +// NewV1WorkspaceOpsRestoreOnDemandCreateParamsWithContext creates a new V1WorkspaceOpsRestoreOnDemandCreateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1WorkspaceOpsRestoreOnDemandCreateParamsWithContext(ctx context.Context) *V1WorkspaceOpsRestoreOnDemandCreateParams { + var () + return &V1WorkspaceOpsRestoreOnDemandCreateParams{ + + Context: ctx, + } +} + +// NewV1WorkspaceOpsRestoreOnDemandCreateParamsWithHTTPClient creates a new V1WorkspaceOpsRestoreOnDemandCreateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1WorkspaceOpsRestoreOnDemandCreateParamsWithHTTPClient(client *http.Client) *V1WorkspaceOpsRestoreOnDemandCreateParams { + var () + return &V1WorkspaceOpsRestoreOnDemandCreateParams{ + HTTPClient: client, + } +} + +/* +V1WorkspaceOpsRestoreOnDemandCreateParams contains all the parameters to send to the API endpoint +for the v1 workspace ops restore on demand create operation typically these are written to a http.Request +*/ +type V1WorkspaceOpsRestoreOnDemandCreateParams struct { + + /*Body*/ + Body *models.V1WorkspaceRestoreConfigEntity + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 workspace ops restore on demand create params +func (o *V1WorkspaceOpsRestoreOnDemandCreateParams) WithTimeout(timeout time.Duration) *V1WorkspaceOpsRestoreOnDemandCreateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 workspace ops restore on demand create params +func (o *V1WorkspaceOpsRestoreOnDemandCreateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 workspace ops restore on demand create params +func (o *V1WorkspaceOpsRestoreOnDemandCreateParams) WithContext(ctx context.Context) *V1WorkspaceOpsRestoreOnDemandCreateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 workspace ops restore on demand create params +func (o *V1WorkspaceOpsRestoreOnDemandCreateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 workspace ops restore on demand create params +func (o *V1WorkspaceOpsRestoreOnDemandCreateParams) WithHTTPClient(client *http.Client) *V1WorkspaceOpsRestoreOnDemandCreateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 workspace ops restore on demand create params +func (o *V1WorkspaceOpsRestoreOnDemandCreateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 workspace ops restore on demand create params +func (o *V1WorkspaceOpsRestoreOnDemandCreateParams) WithBody(body *models.V1WorkspaceRestoreConfigEntity) *V1WorkspaceOpsRestoreOnDemandCreateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 workspace ops restore on demand create params +func (o *V1WorkspaceOpsRestoreOnDemandCreateParams) SetBody(body *models.V1WorkspaceRestoreConfigEntity) { + o.Body = body +} + +// WithUID adds the uid to the v1 workspace ops restore on demand create params +func (o *V1WorkspaceOpsRestoreOnDemandCreateParams) WithUID(uid string) *V1WorkspaceOpsRestoreOnDemandCreateParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 workspace ops restore on demand create params +func (o *V1WorkspaceOpsRestoreOnDemandCreateParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1WorkspaceOpsRestoreOnDemandCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_workspace_ops_restore_on_demand_create_responses.go b/api/client/v1/v1_workspace_ops_restore_on_demand_create_responses.go new file mode 100644 index 00000000..894c957c --- /dev/null +++ b/api/client/v1/v1_workspace_ops_restore_on_demand_create_responses.go @@ -0,0 +1,77 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1WorkspaceOpsRestoreOnDemandCreateReader is a Reader for the V1WorkspaceOpsRestoreOnDemandCreate structure. +type V1WorkspaceOpsRestoreOnDemandCreateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1WorkspaceOpsRestoreOnDemandCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 201: + result := NewV1WorkspaceOpsRestoreOnDemandCreateCreated() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1WorkspaceOpsRestoreOnDemandCreateCreated creates a V1WorkspaceOpsRestoreOnDemandCreateCreated with default headers values +func NewV1WorkspaceOpsRestoreOnDemandCreateCreated() *V1WorkspaceOpsRestoreOnDemandCreateCreated { + return &V1WorkspaceOpsRestoreOnDemandCreateCreated{} +} + +/* +V1WorkspaceOpsRestoreOnDemandCreateCreated handles this case with default header values. + +Created successfully +*/ +type V1WorkspaceOpsRestoreOnDemandCreateCreated struct { + /*Audit uid for the request + */ + AuditUID string + + Payload *models.V1UID +} + +func (o *V1WorkspaceOpsRestoreOnDemandCreateCreated) Error() string { + return fmt.Sprintf("[POST /v1/workspaces/{uid}/restore/onDemand][%d] v1WorkspaceOpsRestoreOnDemandCreateCreated %+v", 201, o.Payload) +} + +func (o *V1WorkspaceOpsRestoreOnDemandCreateCreated) GetPayload() *models.V1UID { + return o.Payload +} + +func (o *V1WorkspaceOpsRestoreOnDemandCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header AuditUid + o.AuditUID = response.GetHeader("AuditUid") + + o.Payload = new(models.V1UID) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_workspaces_cluster_rbac_create_parameters.go b/api/client/v1/v1_workspaces_cluster_rbac_create_parameters.go new file mode 100644 index 00000000..c2f61072 --- /dev/null +++ b/api/client/v1/v1_workspaces_cluster_rbac_create_parameters.go @@ -0,0 +1,154 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1WorkspacesClusterRbacCreateParams creates a new V1WorkspacesClusterRbacCreateParams object +// with the default values initialized. +func NewV1WorkspacesClusterRbacCreateParams() *V1WorkspacesClusterRbacCreateParams { + var () + return &V1WorkspacesClusterRbacCreateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1WorkspacesClusterRbacCreateParamsWithTimeout creates a new V1WorkspacesClusterRbacCreateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1WorkspacesClusterRbacCreateParamsWithTimeout(timeout time.Duration) *V1WorkspacesClusterRbacCreateParams { + var () + return &V1WorkspacesClusterRbacCreateParams{ + + timeout: timeout, + } +} + +// NewV1WorkspacesClusterRbacCreateParamsWithContext creates a new V1WorkspacesClusterRbacCreateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1WorkspacesClusterRbacCreateParamsWithContext(ctx context.Context) *V1WorkspacesClusterRbacCreateParams { + var () + return &V1WorkspacesClusterRbacCreateParams{ + + Context: ctx, + } +} + +// NewV1WorkspacesClusterRbacCreateParamsWithHTTPClient creates a new V1WorkspacesClusterRbacCreateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1WorkspacesClusterRbacCreateParamsWithHTTPClient(client *http.Client) *V1WorkspacesClusterRbacCreateParams { + var () + return &V1WorkspacesClusterRbacCreateParams{ + HTTPClient: client, + } +} + +/* +V1WorkspacesClusterRbacCreateParams contains all the parameters to send to the API endpoint +for the v1 workspaces cluster rbac create operation typically these are written to a http.Request +*/ +type V1WorkspacesClusterRbacCreateParams struct { + + /*Body*/ + Body *models.V1ClusterRbac + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 workspaces cluster rbac create params +func (o *V1WorkspacesClusterRbacCreateParams) WithTimeout(timeout time.Duration) *V1WorkspacesClusterRbacCreateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 workspaces cluster rbac create params +func (o *V1WorkspacesClusterRbacCreateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 workspaces cluster rbac create params +func (o *V1WorkspacesClusterRbacCreateParams) WithContext(ctx context.Context) *V1WorkspacesClusterRbacCreateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 workspaces cluster rbac create params +func (o *V1WorkspacesClusterRbacCreateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 workspaces cluster rbac create params +func (o *V1WorkspacesClusterRbacCreateParams) WithHTTPClient(client *http.Client) *V1WorkspacesClusterRbacCreateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 workspaces cluster rbac create params +func (o *V1WorkspacesClusterRbacCreateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 workspaces cluster rbac create params +func (o *V1WorkspacesClusterRbacCreateParams) WithBody(body *models.V1ClusterRbac) *V1WorkspacesClusterRbacCreateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 workspaces cluster rbac create params +func (o *V1WorkspacesClusterRbacCreateParams) SetBody(body *models.V1ClusterRbac) { + o.Body = body +} + +// WithUID adds the uid to the v1 workspaces cluster rbac create params +func (o *V1WorkspacesClusterRbacCreateParams) WithUID(uid string) *V1WorkspacesClusterRbacCreateParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 workspaces cluster rbac create params +func (o *V1WorkspacesClusterRbacCreateParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1WorkspacesClusterRbacCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_workspaces_cluster_rbac_create_responses.go b/api/client/v1/v1_workspaces_cluster_rbac_create_responses.go new file mode 100644 index 00000000..bd5602f2 --- /dev/null +++ b/api/client/v1/v1_workspaces_cluster_rbac_create_responses.go @@ -0,0 +1,77 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1WorkspacesClusterRbacCreateReader is a Reader for the V1WorkspacesClusterRbacCreate structure. +type V1WorkspacesClusterRbacCreateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1WorkspacesClusterRbacCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 201: + result := NewV1WorkspacesClusterRbacCreateCreated() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1WorkspacesClusterRbacCreateCreated creates a V1WorkspacesClusterRbacCreateCreated with default headers values +func NewV1WorkspacesClusterRbacCreateCreated() *V1WorkspacesClusterRbacCreateCreated { + return &V1WorkspacesClusterRbacCreateCreated{} +} + +/* +V1WorkspacesClusterRbacCreateCreated handles this case with default header values. + +Created successfully +*/ +type V1WorkspacesClusterRbacCreateCreated struct { + /*Audit uid for the request + */ + AuditUID string + + Payload *models.V1UID +} + +func (o *V1WorkspacesClusterRbacCreateCreated) Error() string { + return fmt.Sprintf("[POST /v1/workspaces/{uid}/clusterRbacs][%d] v1WorkspacesClusterRbacCreateCreated %+v", 201, o.Payload) +} + +func (o *V1WorkspacesClusterRbacCreateCreated) GetPayload() *models.V1UID { + return o.Payload +} + +func (o *V1WorkspacesClusterRbacCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header AuditUid + o.AuditUID = response.GetHeader("AuditUid") + + o.Payload = new(models.V1UID) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_workspaces_create_parameters.go b/api/client/v1/v1_workspaces_create_parameters.go new file mode 100644 index 00000000..107e2612 --- /dev/null +++ b/api/client/v1/v1_workspaces_create_parameters.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1WorkspacesCreateParams creates a new V1WorkspacesCreateParams object +// with the default values initialized. +func NewV1WorkspacesCreateParams() *V1WorkspacesCreateParams { + var () + return &V1WorkspacesCreateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1WorkspacesCreateParamsWithTimeout creates a new V1WorkspacesCreateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1WorkspacesCreateParamsWithTimeout(timeout time.Duration) *V1WorkspacesCreateParams { + var () + return &V1WorkspacesCreateParams{ + + timeout: timeout, + } +} + +// NewV1WorkspacesCreateParamsWithContext creates a new V1WorkspacesCreateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1WorkspacesCreateParamsWithContext(ctx context.Context) *V1WorkspacesCreateParams { + var () + return &V1WorkspacesCreateParams{ + + Context: ctx, + } +} + +// NewV1WorkspacesCreateParamsWithHTTPClient creates a new V1WorkspacesCreateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1WorkspacesCreateParamsWithHTTPClient(client *http.Client) *V1WorkspacesCreateParams { + var () + return &V1WorkspacesCreateParams{ + HTTPClient: client, + } +} + +/* +V1WorkspacesCreateParams contains all the parameters to send to the API endpoint +for the v1 workspaces create operation typically these are written to a http.Request +*/ +type V1WorkspacesCreateParams struct { + + /*Body*/ + Body *models.V1WorkspaceEntity + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 workspaces create params +func (o *V1WorkspacesCreateParams) WithTimeout(timeout time.Duration) *V1WorkspacesCreateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 workspaces create params +func (o *V1WorkspacesCreateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 workspaces create params +func (o *V1WorkspacesCreateParams) WithContext(ctx context.Context) *V1WorkspacesCreateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 workspaces create params +func (o *V1WorkspacesCreateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 workspaces create params +func (o *V1WorkspacesCreateParams) WithHTTPClient(client *http.Client) *V1WorkspacesCreateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 workspaces create params +func (o *V1WorkspacesCreateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 workspaces create params +func (o *V1WorkspacesCreateParams) WithBody(body *models.V1WorkspaceEntity) *V1WorkspacesCreateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 workspaces create params +func (o *V1WorkspacesCreateParams) SetBody(body *models.V1WorkspaceEntity) { + o.Body = body +} + +// WriteToRequest writes these params to a swagger request +func (o *V1WorkspacesCreateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_workspaces_create_responses.go b/api/client/v1/v1_workspaces_create_responses.go new file mode 100644 index 00000000..3a546780 --- /dev/null +++ b/api/client/v1/v1_workspaces_create_responses.go @@ -0,0 +1,77 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1WorkspacesCreateReader is a Reader for the V1WorkspacesCreate structure. +type V1WorkspacesCreateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1WorkspacesCreateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 201: + result := NewV1WorkspacesCreateCreated() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1WorkspacesCreateCreated creates a V1WorkspacesCreateCreated with default headers values +func NewV1WorkspacesCreateCreated() *V1WorkspacesCreateCreated { + return &V1WorkspacesCreateCreated{} +} + +/* +V1WorkspacesCreateCreated handles this case with default header values. + +Created successfully +*/ +type V1WorkspacesCreateCreated struct { + /*Audit uid for the request + */ + AuditUID string + + Payload *models.V1UID +} + +func (o *V1WorkspacesCreateCreated) Error() string { + return fmt.Sprintf("[POST /v1/workspaces][%d] v1WorkspacesCreateCreated %+v", 201, o.Payload) +} + +func (o *V1WorkspacesCreateCreated) GetPayload() *models.V1UID { + return o.Payload +} + +func (o *V1WorkspacesCreateCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header AuditUid + o.AuditUID = response.GetHeader("AuditUid") + + o.Payload = new(models.V1UID) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_workspaces_uid_cluster_namespaces_update_parameters.go b/api/client/v1/v1_workspaces_uid_cluster_namespaces_update_parameters.go new file mode 100644 index 00000000..15614ff9 --- /dev/null +++ b/api/client/v1/v1_workspaces_uid_cluster_namespaces_update_parameters.go @@ -0,0 +1,154 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1WorkspacesUIDClusterNamespacesUpdateParams creates a new V1WorkspacesUIDClusterNamespacesUpdateParams object +// with the default values initialized. +func NewV1WorkspacesUIDClusterNamespacesUpdateParams() *V1WorkspacesUIDClusterNamespacesUpdateParams { + var () + return &V1WorkspacesUIDClusterNamespacesUpdateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1WorkspacesUIDClusterNamespacesUpdateParamsWithTimeout creates a new V1WorkspacesUIDClusterNamespacesUpdateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1WorkspacesUIDClusterNamespacesUpdateParamsWithTimeout(timeout time.Duration) *V1WorkspacesUIDClusterNamespacesUpdateParams { + var () + return &V1WorkspacesUIDClusterNamespacesUpdateParams{ + + timeout: timeout, + } +} + +// NewV1WorkspacesUIDClusterNamespacesUpdateParamsWithContext creates a new V1WorkspacesUIDClusterNamespacesUpdateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1WorkspacesUIDClusterNamespacesUpdateParamsWithContext(ctx context.Context) *V1WorkspacesUIDClusterNamespacesUpdateParams { + var () + return &V1WorkspacesUIDClusterNamespacesUpdateParams{ + + Context: ctx, + } +} + +// NewV1WorkspacesUIDClusterNamespacesUpdateParamsWithHTTPClient creates a new V1WorkspacesUIDClusterNamespacesUpdateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1WorkspacesUIDClusterNamespacesUpdateParamsWithHTTPClient(client *http.Client) *V1WorkspacesUIDClusterNamespacesUpdateParams { + var () + return &V1WorkspacesUIDClusterNamespacesUpdateParams{ + HTTPClient: client, + } +} + +/* +V1WorkspacesUIDClusterNamespacesUpdateParams contains all the parameters to send to the API endpoint +for the v1 workspaces Uid cluster namespaces update operation typically these are written to a http.Request +*/ +type V1WorkspacesUIDClusterNamespacesUpdateParams struct { + + /*Body*/ + Body *models.V1WorkspaceClusterNamespacesEntity + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 workspaces Uid cluster namespaces update params +func (o *V1WorkspacesUIDClusterNamespacesUpdateParams) WithTimeout(timeout time.Duration) *V1WorkspacesUIDClusterNamespacesUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 workspaces Uid cluster namespaces update params +func (o *V1WorkspacesUIDClusterNamespacesUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 workspaces Uid cluster namespaces update params +func (o *V1WorkspacesUIDClusterNamespacesUpdateParams) WithContext(ctx context.Context) *V1WorkspacesUIDClusterNamespacesUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 workspaces Uid cluster namespaces update params +func (o *V1WorkspacesUIDClusterNamespacesUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 workspaces Uid cluster namespaces update params +func (o *V1WorkspacesUIDClusterNamespacesUpdateParams) WithHTTPClient(client *http.Client) *V1WorkspacesUIDClusterNamespacesUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 workspaces Uid cluster namespaces update params +func (o *V1WorkspacesUIDClusterNamespacesUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 workspaces Uid cluster namespaces update params +func (o *V1WorkspacesUIDClusterNamespacesUpdateParams) WithBody(body *models.V1WorkspaceClusterNamespacesEntity) *V1WorkspacesUIDClusterNamespacesUpdateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 workspaces Uid cluster namespaces update params +func (o *V1WorkspacesUIDClusterNamespacesUpdateParams) SetBody(body *models.V1WorkspaceClusterNamespacesEntity) { + o.Body = body +} + +// WithUID adds the uid to the v1 workspaces Uid cluster namespaces update params +func (o *V1WorkspacesUIDClusterNamespacesUpdateParams) WithUID(uid string) *V1WorkspacesUIDClusterNamespacesUpdateParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 workspaces Uid cluster namespaces update params +func (o *V1WorkspacesUIDClusterNamespacesUpdateParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1WorkspacesUIDClusterNamespacesUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_workspaces_uid_cluster_namespaces_update_responses.go b/api/client/v1/v1_workspaces_uid_cluster_namespaces_update_responses.go new file mode 100644 index 00000000..b357f5c3 --- /dev/null +++ b/api/client/v1/v1_workspaces_uid_cluster_namespaces_update_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1WorkspacesUIDClusterNamespacesUpdateReader is a Reader for the V1WorkspacesUIDClusterNamespacesUpdate structure. +type V1WorkspacesUIDClusterNamespacesUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1WorkspacesUIDClusterNamespacesUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1WorkspacesUIDClusterNamespacesUpdateNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1WorkspacesUIDClusterNamespacesUpdateNoContent creates a V1WorkspacesUIDClusterNamespacesUpdateNoContent with default headers values +func NewV1WorkspacesUIDClusterNamespacesUpdateNoContent() *V1WorkspacesUIDClusterNamespacesUpdateNoContent { + return &V1WorkspacesUIDClusterNamespacesUpdateNoContent{} +} + +/* +V1WorkspacesUIDClusterNamespacesUpdateNoContent handles this case with default header values. + +The resource was updated successfully +*/ +type V1WorkspacesUIDClusterNamespacesUpdateNoContent struct { +} + +func (o *V1WorkspacesUIDClusterNamespacesUpdateNoContent) Error() string { + return fmt.Sprintf("[PUT /v1/workspaces/{uid}/clusterNamespaces][%d] v1WorkspacesUidClusterNamespacesUpdateNoContent ", 204) +} + +func (o *V1WorkspacesUIDClusterNamespacesUpdateNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_workspaces_uid_cluster_rbac_delete_parameters.go b/api/client/v1/v1_workspaces_uid_cluster_rbac_delete_parameters.go new file mode 100644 index 00000000..e3ed3d70 --- /dev/null +++ b/api/client/v1/v1_workspaces_uid_cluster_rbac_delete_parameters.go @@ -0,0 +1,151 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1WorkspacesUIDClusterRbacDeleteParams creates a new V1WorkspacesUIDClusterRbacDeleteParams object +// with the default values initialized. +func NewV1WorkspacesUIDClusterRbacDeleteParams() *V1WorkspacesUIDClusterRbacDeleteParams { + var () + return &V1WorkspacesUIDClusterRbacDeleteParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1WorkspacesUIDClusterRbacDeleteParamsWithTimeout creates a new V1WorkspacesUIDClusterRbacDeleteParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1WorkspacesUIDClusterRbacDeleteParamsWithTimeout(timeout time.Duration) *V1WorkspacesUIDClusterRbacDeleteParams { + var () + return &V1WorkspacesUIDClusterRbacDeleteParams{ + + timeout: timeout, + } +} + +// NewV1WorkspacesUIDClusterRbacDeleteParamsWithContext creates a new V1WorkspacesUIDClusterRbacDeleteParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1WorkspacesUIDClusterRbacDeleteParamsWithContext(ctx context.Context) *V1WorkspacesUIDClusterRbacDeleteParams { + var () + return &V1WorkspacesUIDClusterRbacDeleteParams{ + + Context: ctx, + } +} + +// NewV1WorkspacesUIDClusterRbacDeleteParamsWithHTTPClient creates a new V1WorkspacesUIDClusterRbacDeleteParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1WorkspacesUIDClusterRbacDeleteParamsWithHTTPClient(client *http.Client) *V1WorkspacesUIDClusterRbacDeleteParams { + var () + return &V1WorkspacesUIDClusterRbacDeleteParams{ + HTTPClient: client, + } +} + +/* +V1WorkspacesUIDClusterRbacDeleteParams contains all the parameters to send to the API endpoint +for the v1 workspaces Uid cluster rbac delete operation typically these are written to a http.Request +*/ +type V1WorkspacesUIDClusterRbacDeleteParams struct { + + /*ClusterRbacUID*/ + ClusterRbacUID string + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 workspaces Uid cluster rbac delete params +func (o *V1WorkspacesUIDClusterRbacDeleteParams) WithTimeout(timeout time.Duration) *V1WorkspacesUIDClusterRbacDeleteParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 workspaces Uid cluster rbac delete params +func (o *V1WorkspacesUIDClusterRbacDeleteParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 workspaces Uid cluster rbac delete params +func (o *V1WorkspacesUIDClusterRbacDeleteParams) WithContext(ctx context.Context) *V1WorkspacesUIDClusterRbacDeleteParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 workspaces Uid cluster rbac delete params +func (o *V1WorkspacesUIDClusterRbacDeleteParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 workspaces Uid cluster rbac delete params +func (o *V1WorkspacesUIDClusterRbacDeleteParams) WithHTTPClient(client *http.Client) *V1WorkspacesUIDClusterRbacDeleteParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 workspaces Uid cluster rbac delete params +func (o *V1WorkspacesUIDClusterRbacDeleteParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithClusterRbacUID adds the clusterRbacUID to the v1 workspaces Uid cluster rbac delete params +func (o *V1WorkspacesUIDClusterRbacDeleteParams) WithClusterRbacUID(clusterRbacUID string) *V1WorkspacesUIDClusterRbacDeleteParams { + o.SetClusterRbacUID(clusterRbacUID) + return o +} + +// SetClusterRbacUID adds the clusterRbacUid to the v1 workspaces Uid cluster rbac delete params +func (o *V1WorkspacesUIDClusterRbacDeleteParams) SetClusterRbacUID(clusterRbacUID string) { + o.ClusterRbacUID = clusterRbacUID +} + +// WithUID adds the uid to the v1 workspaces Uid cluster rbac delete params +func (o *V1WorkspacesUIDClusterRbacDeleteParams) WithUID(uid string) *V1WorkspacesUIDClusterRbacDeleteParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 workspaces Uid cluster rbac delete params +func (o *V1WorkspacesUIDClusterRbacDeleteParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1WorkspacesUIDClusterRbacDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param clusterRbacUid + if err := r.SetPathParam("clusterRbacUid", o.ClusterRbacUID); err != nil { + return err + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_workspaces_uid_cluster_rbac_delete_responses.go b/api/client/v1/v1_workspaces_uid_cluster_rbac_delete_responses.go new file mode 100644 index 00000000..d9ac7321 --- /dev/null +++ b/api/client/v1/v1_workspaces_uid_cluster_rbac_delete_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1WorkspacesUIDClusterRbacDeleteReader is a Reader for the V1WorkspacesUIDClusterRbacDelete structure. +type V1WorkspacesUIDClusterRbacDeleteReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1WorkspacesUIDClusterRbacDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1WorkspacesUIDClusterRbacDeleteNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1WorkspacesUIDClusterRbacDeleteNoContent creates a V1WorkspacesUIDClusterRbacDeleteNoContent with default headers values +func NewV1WorkspacesUIDClusterRbacDeleteNoContent() *V1WorkspacesUIDClusterRbacDeleteNoContent { + return &V1WorkspacesUIDClusterRbacDeleteNoContent{} +} + +/* +V1WorkspacesUIDClusterRbacDeleteNoContent handles this case with default header values. + +The resource was deleted successfully +*/ +type V1WorkspacesUIDClusterRbacDeleteNoContent struct { +} + +func (o *V1WorkspacesUIDClusterRbacDeleteNoContent) Error() string { + return fmt.Sprintf("[DELETE /v1/workspaces/{uid}/clusterRbacs/{clusterRbacUid}][%d] v1WorkspacesUidClusterRbacDeleteNoContent ", 204) +} + +func (o *V1WorkspacesUIDClusterRbacDeleteNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_workspaces_uid_cluster_rbac_update_parameters.go b/api/client/v1/v1_workspaces_uid_cluster_rbac_update_parameters.go new file mode 100644 index 00000000..735603d9 --- /dev/null +++ b/api/client/v1/v1_workspaces_uid_cluster_rbac_update_parameters.go @@ -0,0 +1,172 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1WorkspacesUIDClusterRbacUpdateParams creates a new V1WorkspacesUIDClusterRbacUpdateParams object +// with the default values initialized. +func NewV1WorkspacesUIDClusterRbacUpdateParams() *V1WorkspacesUIDClusterRbacUpdateParams { + var () + return &V1WorkspacesUIDClusterRbacUpdateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1WorkspacesUIDClusterRbacUpdateParamsWithTimeout creates a new V1WorkspacesUIDClusterRbacUpdateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1WorkspacesUIDClusterRbacUpdateParamsWithTimeout(timeout time.Duration) *V1WorkspacesUIDClusterRbacUpdateParams { + var () + return &V1WorkspacesUIDClusterRbacUpdateParams{ + + timeout: timeout, + } +} + +// NewV1WorkspacesUIDClusterRbacUpdateParamsWithContext creates a new V1WorkspacesUIDClusterRbacUpdateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1WorkspacesUIDClusterRbacUpdateParamsWithContext(ctx context.Context) *V1WorkspacesUIDClusterRbacUpdateParams { + var () + return &V1WorkspacesUIDClusterRbacUpdateParams{ + + Context: ctx, + } +} + +// NewV1WorkspacesUIDClusterRbacUpdateParamsWithHTTPClient creates a new V1WorkspacesUIDClusterRbacUpdateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1WorkspacesUIDClusterRbacUpdateParamsWithHTTPClient(client *http.Client) *V1WorkspacesUIDClusterRbacUpdateParams { + var () + return &V1WorkspacesUIDClusterRbacUpdateParams{ + HTTPClient: client, + } +} + +/* +V1WorkspacesUIDClusterRbacUpdateParams contains all the parameters to send to the API endpoint +for the v1 workspaces Uid cluster rbac update operation typically these are written to a http.Request +*/ +type V1WorkspacesUIDClusterRbacUpdateParams struct { + + /*Body*/ + Body *models.V1ClusterRbac + /*ClusterRbacUID*/ + ClusterRbacUID string + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 workspaces Uid cluster rbac update params +func (o *V1WorkspacesUIDClusterRbacUpdateParams) WithTimeout(timeout time.Duration) *V1WorkspacesUIDClusterRbacUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 workspaces Uid cluster rbac update params +func (o *V1WorkspacesUIDClusterRbacUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 workspaces Uid cluster rbac update params +func (o *V1WorkspacesUIDClusterRbacUpdateParams) WithContext(ctx context.Context) *V1WorkspacesUIDClusterRbacUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 workspaces Uid cluster rbac update params +func (o *V1WorkspacesUIDClusterRbacUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 workspaces Uid cluster rbac update params +func (o *V1WorkspacesUIDClusterRbacUpdateParams) WithHTTPClient(client *http.Client) *V1WorkspacesUIDClusterRbacUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 workspaces Uid cluster rbac update params +func (o *V1WorkspacesUIDClusterRbacUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 workspaces Uid cluster rbac update params +func (o *V1WorkspacesUIDClusterRbacUpdateParams) WithBody(body *models.V1ClusterRbac) *V1WorkspacesUIDClusterRbacUpdateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 workspaces Uid cluster rbac update params +func (o *V1WorkspacesUIDClusterRbacUpdateParams) SetBody(body *models.V1ClusterRbac) { + o.Body = body +} + +// WithClusterRbacUID adds the clusterRbacUID to the v1 workspaces Uid cluster rbac update params +func (o *V1WorkspacesUIDClusterRbacUpdateParams) WithClusterRbacUID(clusterRbacUID string) *V1WorkspacesUIDClusterRbacUpdateParams { + o.SetClusterRbacUID(clusterRbacUID) + return o +} + +// SetClusterRbacUID adds the clusterRbacUid to the v1 workspaces Uid cluster rbac update params +func (o *V1WorkspacesUIDClusterRbacUpdateParams) SetClusterRbacUID(clusterRbacUID string) { + o.ClusterRbacUID = clusterRbacUID +} + +// WithUID adds the uid to the v1 workspaces Uid cluster rbac update params +func (o *V1WorkspacesUIDClusterRbacUpdateParams) WithUID(uid string) *V1WorkspacesUIDClusterRbacUpdateParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 workspaces Uid cluster rbac update params +func (o *V1WorkspacesUIDClusterRbacUpdateParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1WorkspacesUIDClusterRbacUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param clusterRbacUid + if err := r.SetPathParam("clusterRbacUid", o.ClusterRbacUID); err != nil { + return err + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_workspaces_uid_cluster_rbac_update_responses.go b/api/client/v1/v1_workspaces_uid_cluster_rbac_update_responses.go new file mode 100644 index 00000000..17ce2187 --- /dev/null +++ b/api/client/v1/v1_workspaces_uid_cluster_rbac_update_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1WorkspacesUIDClusterRbacUpdateReader is a Reader for the V1WorkspacesUIDClusterRbacUpdate structure. +type V1WorkspacesUIDClusterRbacUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1WorkspacesUIDClusterRbacUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1WorkspacesUIDClusterRbacUpdateNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1WorkspacesUIDClusterRbacUpdateNoContent creates a V1WorkspacesUIDClusterRbacUpdateNoContent with default headers values +func NewV1WorkspacesUIDClusterRbacUpdateNoContent() *V1WorkspacesUIDClusterRbacUpdateNoContent { + return &V1WorkspacesUIDClusterRbacUpdateNoContent{} +} + +/* +V1WorkspacesUIDClusterRbacUpdateNoContent handles this case with default header values. + +The resource was updated successfully +*/ +type V1WorkspacesUIDClusterRbacUpdateNoContent struct { +} + +func (o *V1WorkspacesUIDClusterRbacUpdateNoContent) Error() string { + return fmt.Sprintf("[PUT /v1/workspaces/{uid}/clusterRbacs/{clusterRbacUid}][%d] v1WorkspacesUidClusterRbacUpdateNoContent ", 204) +} + +func (o *V1WorkspacesUIDClusterRbacUpdateNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_workspaces_uid_delete_parameters.go b/api/client/v1/v1_workspaces_uid_delete_parameters.go new file mode 100644 index 00000000..881fdcba --- /dev/null +++ b/api/client/v1/v1_workspaces_uid_delete_parameters.go @@ -0,0 +1,133 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1WorkspacesUIDDeleteParams creates a new V1WorkspacesUIDDeleteParams object +// with the default values initialized. +func NewV1WorkspacesUIDDeleteParams() *V1WorkspacesUIDDeleteParams { + var () + return &V1WorkspacesUIDDeleteParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1WorkspacesUIDDeleteParamsWithTimeout creates a new V1WorkspacesUIDDeleteParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1WorkspacesUIDDeleteParamsWithTimeout(timeout time.Duration) *V1WorkspacesUIDDeleteParams { + var () + return &V1WorkspacesUIDDeleteParams{ + + timeout: timeout, + } +} + +// NewV1WorkspacesUIDDeleteParamsWithContext creates a new V1WorkspacesUIDDeleteParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1WorkspacesUIDDeleteParamsWithContext(ctx context.Context) *V1WorkspacesUIDDeleteParams { + var () + return &V1WorkspacesUIDDeleteParams{ + + Context: ctx, + } +} + +// NewV1WorkspacesUIDDeleteParamsWithHTTPClient creates a new V1WorkspacesUIDDeleteParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1WorkspacesUIDDeleteParamsWithHTTPClient(client *http.Client) *V1WorkspacesUIDDeleteParams { + var () + return &V1WorkspacesUIDDeleteParams{ + HTTPClient: client, + } +} + +/* +V1WorkspacesUIDDeleteParams contains all the parameters to send to the API endpoint +for the v1 workspaces Uid delete operation typically these are written to a http.Request +*/ +type V1WorkspacesUIDDeleteParams struct { + + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 workspaces Uid delete params +func (o *V1WorkspacesUIDDeleteParams) WithTimeout(timeout time.Duration) *V1WorkspacesUIDDeleteParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 workspaces Uid delete params +func (o *V1WorkspacesUIDDeleteParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 workspaces Uid delete params +func (o *V1WorkspacesUIDDeleteParams) WithContext(ctx context.Context) *V1WorkspacesUIDDeleteParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 workspaces Uid delete params +func (o *V1WorkspacesUIDDeleteParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 workspaces Uid delete params +func (o *V1WorkspacesUIDDeleteParams) WithHTTPClient(client *http.Client) *V1WorkspacesUIDDeleteParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 workspaces Uid delete params +func (o *V1WorkspacesUIDDeleteParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithUID adds the uid to the v1 workspaces Uid delete params +func (o *V1WorkspacesUIDDeleteParams) WithUID(uid string) *V1WorkspacesUIDDeleteParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 workspaces Uid delete params +func (o *V1WorkspacesUIDDeleteParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1WorkspacesUIDDeleteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_workspaces_uid_delete_responses.go b/api/client/v1/v1_workspaces_uid_delete_responses.go new file mode 100644 index 00000000..fd85b99b --- /dev/null +++ b/api/client/v1/v1_workspaces_uid_delete_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1WorkspacesUIDDeleteReader is a Reader for the V1WorkspacesUIDDelete structure. +type V1WorkspacesUIDDeleteReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1WorkspacesUIDDeleteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1WorkspacesUIDDeleteNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1WorkspacesUIDDeleteNoContent creates a V1WorkspacesUIDDeleteNoContent with default headers values +func NewV1WorkspacesUIDDeleteNoContent() *V1WorkspacesUIDDeleteNoContent { + return &V1WorkspacesUIDDeleteNoContent{} +} + +/* +V1WorkspacesUIDDeleteNoContent handles this case with default header values. + +The resource was deleted successfully +*/ +type V1WorkspacesUIDDeleteNoContent struct { +} + +func (o *V1WorkspacesUIDDeleteNoContent) Error() string { + return fmt.Sprintf("[DELETE /v1/workspaces/{uid}][%d] v1WorkspacesUidDeleteNoContent ", 204) +} + +func (o *V1WorkspacesUIDDeleteNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_workspaces_uid_get_parameters.go b/api/client/v1/v1_workspaces_uid_get_parameters.go new file mode 100644 index 00000000..b2d5b44a --- /dev/null +++ b/api/client/v1/v1_workspaces_uid_get_parameters.go @@ -0,0 +1,133 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1WorkspacesUIDGetParams creates a new V1WorkspacesUIDGetParams object +// with the default values initialized. +func NewV1WorkspacesUIDGetParams() *V1WorkspacesUIDGetParams { + var () + return &V1WorkspacesUIDGetParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1WorkspacesUIDGetParamsWithTimeout creates a new V1WorkspacesUIDGetParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1WorkspacesUIDGetParamsWithTimeout(timeout time.Duration) *V1WorkspacesUIDGetParams { + var () + return &V1WorkspacesUIDGetParams{ + + timeout: timeout, + } +} + +// NewV1WorkspacesUIDGetParamsWithContext creates a new V1WorkspacesUIDGetParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1WorkspacesUIDGetParamsWithContext(ctx context.Context) *V1WorkspacesUIDGetParams { + var () + return &V1WorkspacesUIDGetParams{ + + Context: ctx, + } +} + +// NewV1WorkspacesUIDGetParamsWithHTTPClient creates a new V1WorkspacesUIDGetParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1WorkspacesUIDGetParamsWithHTTPClient(client *http.Client) *V1WorkspacesUIDGetParams { + var () + return &V1WorkspacesUIDGetParams{ + HTTPClient: client, + } +} + +/* +V1WorkspacesUIDGetParams contains all the parameters to send to the API endpoint +for the v1 workspaces Uid get operation typically these are written to a http.Request +*/ +type V1WorkspacesUIDGetParams struct { + + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 workspaces Uid get params +func (o *V1WorkspacesUIDGetParams) WithTimeout(timeout time.Duration) *V1WorkspacesUIDGetParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 workspaces Uid get params +func (o *V1WorkspacesUIDGetParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 workspaces Uid get params +func (o *V1WorkspacesUIDGetParams) WithContext(ctx context.Context) *V1WorkspacesUIDGetParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 workspaces Uid get params +func (o *V1WorkspacesUIDGetParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 workspaces Uid get params +func (o *V1WorkspacesUIDGetParams) WithHTTPClient(client *http.Client) *V1WorkspacesUIDGetParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 workspaces Uid get params +func (o *V1WorkspacesUIDGetParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithUID adds the uid to the v1 workspaces Uid get params +func (o *V1WorkspacesUIDGetParams) WithUID(uid string) *V1WorkspacesUIDGetParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 workspaces Uid get params +func (o *V1WorkspacesUIDGetParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1WorkspacesUIDGetParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_workspaces_uid_get_responses.go b/api/client/v1/v1_workspaces_uid_get_responses.go new file mode 100644 index 00000000..924348de --- /dev/null +++ b/api/client/v1/v1_workspaces_uid_get_responses.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// V1WorkspacesUIDGetReader is a Reader for the V1WorkspacesUIDGet structure. +type V1WorkspacesUIDGetReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1WorkspacesUIDGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewV1WorkspacesUIDGetOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1WorkspacesUIDGetOK creates a V1WorkspacesUIDGetOK with default headers values +func NewV1WorkspacesUIDGetOK() *V1WorkspacesUIDGetOK { + return &V1WorkspacesUIDGetOK{} +} + +/* +V1WorkspacesUIDGetOK handles this case with default header values. + +OK +*/ +type V1WorkspacesUIDGetOK struct { + Payload *models.V1Workspace +} + +func (o *V1WorkspacesUIDGetOK) Error() string { + return fmt.Sprintf("[GET /v1/workspaces/{uid}][%d] v1WorkspacesUidGetOK %+v", 200, o.Payload) +} + +func (o *V1WorkspacesUIDGetOK) GetPayload() *models.V1Workspace { + return o.Payload +} + +func (o *V1WorkspacesUIDGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.V1Workspace) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/api/client/v1/v1_workspaces_uid_meta_update_parameters.go b/api/client/v1/v1_workspaces_uid_meta_update_parameters.go new file mode 100644 index 00000000..ac887032 --- /dev/null +++ b/api/client/v1/v1_workspaces_uid_meta_update_parameters.go @@ -0,0 +1,154 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + + "github.com/spectrocloud/palette-sdk-go/api/models" +) + +// NewV1WorkspacesUIDMetaUpdateParams creates a new V1WorkspacesUIDMetaUpdateParams object +// with the default values initialized. +func NewV1WorkspacesUIDMetaUpdateParams() *V1WorkspacesUIDMetaUpdateParams { + var () + return &V1WorkspacesUIDMetaUpdateParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1WorkspacesUIDMetaUpdateParamsWithTimeout creates a new V1WorkspacesUIDMetaUpdateParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1WorkspacesUIDMetaUpdateParamsWithTimeout(timeout time.Duration) *V1WorkspacesUIDMetaUpdateParams { + var () + return &V1WorkspacesUIDMetaUpdateParams{ + + timeout: timeout, + } +} + +// NewV1WorkspacesUIDMetaUpdateParamsWithContext creates a new V1WorkspacesUIDMetaUpdateParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1WorkspacesUIDMetaUpdateParamsWithContext(ctx context.Context) *V1WorkspacesUIDMetaUpdateParams { + var () + return &V1WorkspacesUIDMetaUpdateParams{ + + Context: ctx, + } +} + +// NewV1WorkspacesUIDMetaUpdateParamsWithHTTPClient creates a new V1WorkspacesUIDMetaUpdateParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1WorkspacesUIDMetaUpdateParamsWithHTTPClient(client *http.Client) *V1WorkspacesUIDMetaUpdateParams { + var () + return &V1WorkspacesUIDMetaUpdateParams{ + HTTPClient: client, + } +} + +/* +V1WorkspacesUIDMetaUpdateParams contains all the parameters to send to the API endpoint +for the v1 workspaces Uid meta update operation typically these are written to a http.Request +*/ +type V1WorkspacesUIDMetaUpdateParams struct { + + /*Body*/ + Body *models.V1ObjectMeta + /*UID*/ + UID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 workspaces Uid meta update params +func (o *V1WorkspacesUIDMetaUpdateParams) WithTimeout(timeout time.Duration) *V1WorkspacesUIDMetaUpdateParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 workspaces Uid meta update params +func (o *V1WorkspacesUIDMetaUpdateParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 workspaces Uid meta update params +func (o *V1WorkspacesUIDMetaUpdateParams) WithContext(ctx context.Context) *V1WorkspacesUIDMetaUpdateParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 workspaces Uid meta update params +func (o *V1WorkspacesUIDMetaUpdateParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 workspaces Uid meta update params +func (o *V1WorkspacesUIDMetaUpdateParams) WithHTTPClient(client *http.Client) *V1WorkspacesUIDMetaUpdateParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 workspaces Uid meta update params +func (o *V1WorkspacesUIDMetaUpdateParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the v1 workspaces Uid meta update params +func (o *V1WorkspacesUIDMetaUpdateParams) WithBody(body *models.V1ObjectMeta) *V1WorkspacesUIDMetaUpdateParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the v1 workspaces Uid meta update params +func (o *V1WorkspacesUIDMetaUpdateParams) SetBody(body *models.V1ObjectMeta) { + o.Body = body +} + +// WithUID adds the uid to the v1 workspaces Uid meta update params +func (o *V1WorkspacesUIDMetaUpdateParams) WithUID(uid string) *V1WorkspacesUIDMetaUpdateParams { + o.SetUID(uid) + return o +} + +// SetUID adds the uid to the v1 workspaces Uid meta update params +func (o *V1WorkspacesUIDMetaUpdateParams) SetUID(uid string) { + o.UID = uid +} + +// WriteToRequest writes these params to a swagger request +func (o *V1WorkspacesUIDMetaUpdateParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.Body != nil { + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + } + + // path param uid + if err := r.SetPathParam("uid", o.UID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_workspaces_uid_meta_update_responses.go b/api/client/v1/v1_workspaces_uid_meta_update_responses.go new file mode 100644 index 00000000..ac4df52c --- /dev/null +++ b/api/client/v1/v1_workspaces_uid_meta_update_responses.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1WorkspacesUIDMetaUpdateReader is a Reader for the V1WorkspacesUIDMetaUpdate structure. +type V1WorkspacesUIDMetaUpdateReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1WorkspacesUIDMetaUpdateReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1WorkspacesUIDMetaUpdateNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1WorkspacesUIDMetaUpdateNoContent creates a V1WorkspacesUIDMetaUpdateNoContent with default headers values +func NewV1WorkspacesUIDMetaUpdateNoContent() *V1WorkspacesUIDMetaUpdateNoContent { + return &V1WorkspacesUIDMetaUpdateNoContent{} +} + +/* +V1WorkspacesUIDMetaUpdateNoContent handles this case with default header values. + +The resource was updated successfully +*/ +type V1WorkspacesUIDMetaUpdateNoContent struct { +} + +func (o *V1WorkspacesUIDMetaUpdateNoContent) Error() string { + return fmt.Sprintf("[PUT /v1/workspaces/{uid}/meta][%d] v1WorkspacesUidMetaUpdateNoContent ", 204) +} + +func (o *V1WorkspacesUIDMetaUpdateNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/api/client/v1/v1_workspaces_validate_name_parameters.go b/api/client/v1/v1_workspaces_validate_name_parameters.go new file mode 100644 index 00000000..e8d79c26 --- /dev/null +++ b/api/client/v1/v1_workspaces_validate_name_parameters.go @@ -0,0 +1,137 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewV1WorkspacesValidateNameParams creates a new V1WorkspacesValidateNameParams object +// with the default values initialized. +func NewV1WorkspacesValidateNameParams() *V1WorkspacesValidateNameParams { + var () + return &V1WorkspacesValidateNameParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewV1WorkspacesValidateNameParamsWithTimeout creates a new V1WorkspacesValidateNameParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewV1WorkspacesValidateNameParamsWithTimeout(timeout time.Duration) *V1WorkspacesValidateNameParams { + var () + return &V1WorkspacesValidateNameParams{ + + timeout: timeout, + } +} + +// NewV1WorkspacesValidateNameParamsWithContext creates a new V1WorkspacesValidateNameParams object +// with the default values initialized, and the ability to set a context for a request +func NewV1WorkspacesValidateNameParamsWithContext(ctx context.Context) *V1WorkspacesValidateNameParams { + var () + return &V1WorkspacesValidateNameParams{ + + Context: ctx, + } +} + +// NewV1WorkspacesValidateNameParamsWithHTTPClient creates a new V1WorkspacesValidateNameParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewV1WorkspacesValidateNameParamsWithHTTPClient(client *http.Client) *V1WorkspacesValidateNameParams { + var () + return &V1WorkspacesValidateNameParams{ + HTTPClient: client, + } +} + +/* +V1WorkspacesValidateNameParams contains all the parameters to send to the API endpoint +for the v1 workspaces validate name operation typically these are written to a http.Request +*/ +type V1WorkspacesValidateNameParams struct { + + /*Name*/ + Name string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the v1 workspaces validate name params +func (o *V1WorkspacesValidateNameParams) WithTimeout(timeout time.Duration) *V1WorkspacesValidateNameParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the v1 workspaces validate name params +func (o *V1WorkspacesValidateNameParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the v1 workspaces validate name params +func (o *V1WorkspacesValidateNameParams) WithContext(ctx context.Context) *V1WorkspacesValidateNameParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the v1 workspaces validate name params +func (o *V1WorkspacesValidateNameParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the v1 workspaces validate name params +func (o *V1WorkspacesValidateNameParams) WithHTTPClient(client *http.Client) *V1WorkspacesValidateNameParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the v1 workspaces validate name params +func (o *V1WorkspacesValidateNameParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithName adds the name to the v1 workspaces validate name params +func (o *V1WorkspacesValidateNameParams) WithName(name string) *V1WorkspacesValidateNameParams { + o.SetName(name) + return o +} + +// SetName adds the name to the v1 workspaces validate name params +func (o *V1WorkspacesValidateNameParams) SetName(name string) { + o.Name = name +} + +// WriteToRequest writes these params to a swagger request +func (o *V1WorkspacesValidateNameParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + // query param name + qrName := o.Name + qName := qrName + if qName != "" { + if err := r.SetQueryParam("name", qName); err != nil { + return err + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/client/v1/v1_workspaces_validate_name_responses.go b/api/client/v1/v1_workspaces_validate_name_responses.go new file mode 100644 index 00000000..6477f5db --- /dev/null +++ b/api/client/v1/v1_workspaces_validate_name_responses.go @@ -0,0 +1,61 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package v1 + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// V1WorkspacesValidateNameReader is a Reader for the V1WorkspacesValidateName structure. +type V1WorkspacesValidateNameReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *V1WorkspacesValidateNameReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 204: + result := NewV1WorkspacesValidateNameNoContent() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewV1WorkspacesValidateNameNoContent creates a V1WorkspacesValidateNameNoContent with default headers values +func NewV1WorkspacesValidateNameNoContent() *V1WorkspacesValidateNameNoContent { + return &V1WorkspacesValidateNameNoContent{} +} + +/* +V1WorkspacesValidateNameNoContent handles this case with default header values. + +Ok response without content +*/ +type V1WorkspacesValidateNameNoContent struct { + /*Audit uid for the request + */ + AuditUID string +} + +func (o *V1WorkspacesValidateNameNoContent) Error() string { + return fmt.Sprintf("[GET /v1/workspaces/validate/name][%d] v1WorkspacesValidateNameNoContent ", 204) +} + +func (o *V1WorkspacesValidateNameNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response header AuditUid + o.AuditUID = response.GetHeader("AuditUid") + + return nil +} diff --git a/api/generate.sh b/api/generate.sh new file mode 100755 index 00000000..8002c3ce --- /dev/null +++ b/api/generate.sh @@ -0,0 +1,40 @@ +#!/bin/bash + +set -e + +if [ -z "$1" ]; then + echo "Usage: generate.sh " + exit +fi + +currentDir=$1 +service="palette-api" +serviceDir="${currentDir}" +apiDir="${serviceDir}" +commonDir="${apiDir}/common" +templateDir="${apiDir}swagger/templates" + +# Fetch the latest hapi spec +rm -rf hapi && git clone https://github.com/spectrocloud/hapi +( + cd hapi + bash generate_hubble_spec.sh + go run api/main.go + cp gen/docs-spec/palette-apis-spec.json ../spec/ + rm -rf hapi +) + +# Flatten it +for i in {1..10}; do + swagger flatten spec/palette-apis-spec.json --with-flatten=remove-unused --format=json -o spec/palette-apis-spec.json +done + +# Generate swagger client & models +swagger mixin spec/palette-apis-spec.json spec/error_v1.json -o spec/palette.json +swagger generate model -t $apiDir -f spec/palette.json +swagger generate client \ + --skip-models \ + --existing-models=github.com/spectrocloud/palette-sdk-go/api/models \ + --template-dir="$templateDir" \ + -A "$service" -t "$serviceDir" \ + -f spec/palette.json diff --git a/api/models/v1_a_a_d_profile.go b/api/models/v1_a_a_d_profile.go new file mode 100644 index 00000000..f4505bb6 --- /dev/null +++ b/api/models/v1_a_a_d_profile.go @@ -0,0 +1,81 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1AADProfile AADProfile - AAD integration is managed by AKS. +// +// swagger:model v1AADProfile +type V1AADProfile struct { + + // AdminGroupObjectIDs - AAD group object IDs that will have admin role of the cluster. + // Required: true + AdminGroupObjectIDs []string `json:"adminGroupObjectIDs"` + + // Managed - Whether to enable managed AAD. + // Required: true + Managed *bool `json:"managed"` +} + +// Validate validates this v1 a a d profile +func (m *V1AADProfile) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateAdminGroupObjectIDs(formats); err != nil { + res = append(res, err) + } + + if err := m.validateManaged(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1AADProfile) validateAdminGroupObjectIDs(formats strfmt.Registry) error { + + if err := validate.Required("adminGroupObjectIDs", "body", m.AdminGroupObjectIDs); err != nil { + return err + } + + return nil +} + +func (m *V1AADProfile) validateManaged(formats strfmt.Registry) error { + + if err := validate.Required("managed", "body", m.Managed); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1AADProfile) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1AADProfile) UnmarshalBinary(b []byte) error { + var res V1AADProfile + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_a_w_s_volume_types.go b/api/models/v1_a_w_s_volume_types.go new file mode 100644 index 00000000..2ec3c404 --- /dev/null +++ b/api/models/v1_a_w_s_volume_types.go @@ -0,0 +1,80 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1AWSVolumeTypes AWS Volume Types +// +// swagger:model v1AWSVolumeTypes +type V1AWSVolumeTypes struct { + + // volume types + VolumeTypes []*V1AwsVolumeType `json:"volumeTypes"` +} + +// Validate validates this v1 a w s volume types +func (m *V1AWSVolumeTypes) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateVolumeTypes(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1AWSVolumeTypes) validateVolumeTypes(formats strfmt.Registry) error { + + if swag.IsZero(m.VolumeTypes) { // not required + return nil + } + + for i := 0; i < len(m.VolumeTypes); i++ { + if swag.IsZero(m.VolumeTypes[i]) { // not required + continue + } + + if m.VolumeTypes[i] != nil { + if err := m.VolumeTypes[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("volumeTypes" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1AWSVolumeTypes) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1AWSVolumeTypes) UnmarshalBinary(b []byte) error { + var res V1AWSVolumeTypes + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_acl_meta.go b/api/models/v1_acl_meta.go new file mode 100644 index 00000000..759b3445 --- /dev/null +++ b/api/models/v1_acl_meta.go @@ -0,0 +1,49 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ACLMeta Resource access control information (Read-only response data) +// +// swagger:model v1AclMeta +type V1ACLMeta struct { + + // User or service uid which created the resource + OwnerUID string `json:"ownerUid,omitempty"` + + // Project's uid if the resource is under a project + ProjectUID string `json:"projectUid,omitempty"` + + // Tenant's uid + TenantUID string `json:"tenantUid,omitempty"` +} + +// Validate validates this v1 Acl meta +func (m *V1ACLMeta) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1ACLMeta) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ACLMeta) UnmarshalBinary(b []byte) error { + var res V1ACLMeta + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_address.go b/api/models/v1_address.go new file mode 100644 index 00000000..526b73d6 --- /dev/null +++ b/api/models/v1_address.go @@ -0,0 +1,58 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1Address Tenant Address +// +// swagger:model v1Address +type V1Address struct { + + // address line1 + AddressLine1 string `json:"addressLine1,omitempty"` + + // address line2 + AddressLine2 string `json:"addressLine2,omitempty"` + + // city + City string `json:"city,omitempty"` + + // country + Country string `json:"country,omitempty"` + + // pincode + Pincode string `json:"pincode,omitempty"` + + // state + State string `json:"state,omitempty"` +} + +// Validate validates this v1 address +func (m *V1Address) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1Address) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1Address) UnmarshalBinary(b []byte) error { + var res V1Address + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_alert.go b/api/models/v1_alert.go new file mode 100644 index 00000000..9adbb927 --- /dev/null +++ b/api/models/v1_alert.go @@ -0,0 +1,83 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1Alert v1 alert +// +// swagger:model v1Alert +type V1Alert struct { + + // channels + Channels []*V1Channel `json:"channels"` + + // component + Component string `json:"component,omitempty"` +} + +// Validate validates this v1 alert +func (m *V1Alert) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateChannels(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1Alert) validateChannels(formats strfmt.Registry) error { + + if swag.IsZero(m.Channels) { // not required + return nil + } + + for i := 0; i < len(m.Channels); i++ { + if swag.IsZero(m.Channels[i]) { // not required + continue + } + + if m.Channels[i] != nil { + if err := m.Channels[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("channels" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1Alert) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1Alert) UnmarshalBinary(b []byte) error { + var res V1Alert + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_alert_entity.go b/api/models/v1_alert_entity.go new file mode 100644 index 00000000..288653e8 --- /dev/null +++ b/api/models/v1_alert_entity.go @@ -0,0 +1,80 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1AlertEntity v1 alert entity +// +// swagger:model v1AlertEntity +type V1AlertEntity struct { + + // channels + Channels []*V1Channel `json:"channels"` +} + +// Validate validates this v1 alert entity +func (m *V1AlertEntity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateChannels(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1AlertEntity) validateChannels(formats strfmt.Registry) error { + + if swag.IsZero(m.Channels) { // not required + return nil + } + + for i := 0; i < len(m.Channels); i++ { + if swag.IsZero(m.Channels[i]) { // not required + continue + } + + if m.Channels[i] != nil { + if err := m.Channels[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("channels" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1AlertEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1AlertEntity) UnmarshalBinary(b []byte) error { + var res V1AlertEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_alert_notification_status.go b/api/models/v1_alert_notification_status.go new file mode 100644 index 00000000..a08b008c --- /dev/null +++ b/api/models/v1_alert_notification_status.go @@ -0,0 +1,76 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1AlertNotificationStatus v1 alert notification status +// +// swagger:model v1AlertNotificationStatus +type V1AlertNotificationStatus struct { + + // is succeeded + IsSucceeded bool `json:"isSucceeded"` + + // message + Message string `json:"message,omitempty"` + + // time + // Format: date-time + Time V1Time `json:"time,omitempty"` +} + +// Validate validates this v1 alert notification status +func (m *V1AlertNotificationStatus) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateTime(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1AlertNotificationStatus) validateTime(formats strfmt.Registry) error { + + if swag.IsZero(m.Time) { // not required + return nil + } + + if err := m.Time.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("time") + } + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1AlertNotificationStatus) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1AlertNotificationStatus) UnmarshalBinary(b []byte) error { + var res V1AlertNotificationStatus + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_api_endpoint.go b/api/models/v1_api_endpoint.go new file mode 100644 index 00000000..d81c99c9 --- /dev/null +++ b/api/models/v1_api_endpoint.go @@ -0,0 +1,81 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1APIEndpoint APIEndpoint represents a reachable Kubernetes API endpoint. +// +// swagger:model v1ApiEndpoint +type V1APIEndpoint struct { + + // The hostname on which the API server is serving. + // Required: true + Host *string `json:"host"` + + // The port on which the API server is serving. + // Required: true + Port *int32 `json:"port"` +} + +// Validate validates this v1 Api endpoint +func (m *V1APIEndpoint) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateHost(formats); err != nil { + res = append(res, err) + } + + if err := m.validatePort(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1APIEndpoint) validateHost(formats strfmt.Registry) error { + + if err := validate.Required("host", "body", m.Host); err != nil { + return err + } + + return nil +} + +func (m *V1APIEndpoint) validatePort(formats strfmt.Registry) error { + + if err := validate.Required("port", "body", m.Port); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1APIEndpoint) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1APIEndpoint) UnmarshalBinary(b []byte) error { + var res V1APIEndpoint + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_api_key.go b/api/models/v1_api_key.go new file mode 100644 index 00000000..15dcd2ba --- /dev/null +++ b/api/models/v1_api_key.go @@ -0,0 +1,121 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1APIKey API key information +// +// swagger:model v1ApiKey +type V1APIKey struct { + + // metadata + Metadata *V1ObjectMeta `json:"metadata,omitempty"` + + // spec + Spec *V1APIKeySpec `json:"spec,omitempty"` + + // status + Status *V1APIKeyStatus `json:"status,omitempty"` +} + +// Validate validates this v1 Api key +func (m *V1APIKey) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSpec(formats); err != nil { + res = append(res, err) + } + + if err := m.validateStatus(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1APIKey) validateMetadata(formats strfmt.Registry) error { + + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } + return err + } + } + + return nil +} + +func (m *V1APIKey) validateSpec(formats strfmt.Registry) error { + + if swag.IsZero(m.Spec) { // not required + return nil + } + + if m.Spec != nil { + if err := m.Spec.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec") + } + return err + } + } + + return nil +} + +func (m *V1APIKey) validateStatus(formats strfmt.Registry) error { + + if swag.IsZero(m.Status) { // not required + return nil + } + + if m.Status != nil { + if err := m.Status.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("status") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1APIKey) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1APIKey) UnmarshalBinary(b []byte) error { + var res V1APIKey + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_api_key_active_state.go b/api/models/v1_api_key_active_state.go new file mode 100644 index 00000000..45919e9f --- /dev/null +++ b/api/models/v1_api_key_active_state.go @@ -0,0 +1,43 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1APIKeyActiveState v1 Api key active state +// +// swagger:model v1ApiKeyActiveState +type V1APIKeyActiveState struct { + + // API key active state + IsActive bool `json:"isActive,omitempty"` +} + +// Validate validates this v1 Api key active state +func (m *V1APIKeyActiveState) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1APIKeyActiveState) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1APIKeyActiveState) UnmarshalBinary(b []byte) error { + var res V1APIKeyActiveState + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_api_key_create_response.go b/api/models/v1_api_key_create_response.go new file mode 100644 index 00000000..21a8ae22 --- /dev/null +++ b/api/models/v1_api_key_create_response.go @@ -0,0 +1,46 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1APIKeyCreateResponse Response of create API key +// +// swagger:model v1ApiKeyCreateResponse +type V1APIKeyCreateResponse struct { + + // Api key is used for authentication + APIKey string `json:"apiKey,omitempty"` + + // User uid + UID string `json:"uid,omitempty"` +} + +// Validate validates this v1 Api key create response +func (m *V1APIKeyCreateResponse) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1APIKeyCreateResponse) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1APIKeyCreateResponse) UnmarshalBinary(b []byte) error { + var res V1APIKeyCreateResponse + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_api_key_entity.go b/api/models/v1_api_key_entity.go new file mode 100644 index 00000000..eefcef92 --- /dev/null +++ b/api/models/v1_api_key_entity.go @@ -0,0 +1,96 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1APIKeyEntity API key request payload +// +// swagger:model v1ApiKeyEntity +type V1APIKeyEntity struct { + + // metadata + Metadata *V1ObjectMeta `json:"metadata,omitempty"` + + // spec + Spec *V1APIKeySpecEntity `json:"spec,omitempty"` +} + +// Validate validates this v1 Api key entity +func (m *V1APIKeyEntity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSpec(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1APIKeyEntity) validateMetadata(formats strfmt.Registry) error { + + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } + return err + } + } + + return nil +} + +func (m *V1APIKeyEntity) validateSpec(formats strfmt.Registry) error { + + if swag.IsZero(m.Spec) { // not required + return nil + } + + if m.Spec != nil { + if err := m.Spec.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1APIKeyEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1APIKeyEntity) UnmarshalBinary(b []byte) error { + var res V1APIKeyEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_api_key_spec.go b/api/models/v1_api_key_spec.go new file mode 100644 index 00000000..14581cb4 --- /dev/null +++ b/api/models/v1_api_key_spec.go @@ -0,0 +1,98 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1APIKeySpec API key specification +// +// swagger:model v1ApiKeySpec +type V1APIKeySpec struct { + + // API key expiry date + // Format: date-time + Expiry V1Time `json:"expiry,omitempty"` + + // Deprecated: API key field will be no longer available + Key string `json:"key,omitempty"` + + // User to whom the API key is created + User *V1APIKeyUser `json:"user,omitempty"` +} + +// Validate validates this v1 Api key spec +func (m *V1APIKeySpec) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateExpiry(formats); err != nil { + res = append(res, err) + } + + if err := m.validateUser(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1APIKeySpec) validateExpiry(formats strfmt.Registry) error { + + if swag.IsZero(m.Expiry) { // not required + return nil + } + + if err := m.Expiry.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("expiry") + } + return err + } + + return nil +} + +func (m *V1APIKeySpec) validateUser(formats strfmt.Registry) error { + + if swag.IsZero(m.User) { // not required + return nil + } + + if m.User != nil { + if err := m.User.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("user") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1APIKeySpec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1APIKeySpec) UnmarshalBinary(b []byte) error { + var res V1APIKeySpec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_api_key_spec_entity.go b/api/models/v1_api_key_spec_entity.go new file mode 100644 index 00000000..f2c0b2c3 --- /dev/null +++ b/api/models/v1_api_key_spec_entity.go @@ -0,0 +1,73 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1APIKeySpecEntity API key specification +// +// swagger:model v1ApiKeySpecEntity +type V1APIKeySpecEntity struct { + + // API key expiry date + // Format: date-time + Expiry V1Time `json:"expiry,omitempty"` + + // User to whom the API key has to be created + UserUID string `json:"userUid,omitempty"` +} + +// Validate validates this v1 Api key spec entity +func (m *V1APIKeySpecEntity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateExpiry(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1APIKeySpecEntity) validateExpiry(formats strfmt.Registry) error { + + if swag.IsZero(m.Expiry) { // not required + return nil + } + + if err := m.Expiry.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("expiry") + } + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1APIKeySpecEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1APIKeySpecEntity) UnmarshalBinary(b []byte) error { + var res V1APIKeySpecEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_api_key_spec_update.go b/api/models/v1_api_key_spec_update.go new file mode 100644 index 00000000..e2058c63 --- /dev/null +++ b/api/models/v1_api_key_spec_update.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1APIKeySpecUpdate API key update request specification +// +// swagger:model v1ApiKeySpecUpdate +type V1APIKeySpecUpdate struct { + + // API key expiry date + // Format: date-time + Expiry V1Time `json:"expiry,omitempty"` +} + +// Validate validates this v1 Api key spec update +func (m *V1APIKeySpecUpdate) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateExpiry(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1APIKeySpecUpdate) validateExpiry(formats strfmt.Registry) error { + + if swag.IsZero(m.Expiry) { // not required + return nil + } + + if err := m.Expiry.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("expiry") + } + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1APIKeySpecUpdate) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1APIKeySpecUpdate) UnmarshalBinary(b []byte) error { + var res V1APIKeySpecUpdate + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_api_key_status.go b/api/models/v1_api_key_status.go new file mode 100644 index 00000000..3671f610 --- /dev/null +++ b/api/models/v1_api_key_status.go @@ -0,0 +1,43 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1APIKeyStatus API key status +// +// swagger:model v1ApiKeyStatus +type V1APIKeyStatus struct { + + // API key active state + IsActive bool `json:"isActive,omitempty"` +} + +// Validate validates this v1 Api key status +func (m *V1APIKeyStatus) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1APIKeyStatus) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1APIKeyStatus) UnmarshalBinary(b []byte) error { + var res V1APIKeyStatus + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_api_key_update.go b/api/models/v1_api_key_update.go new file mode 100644 index 00000000..4694e6f8 --- /dev/null +++ b/api/models/v1_api_key_update.go @@ -0,0 +1,96 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1APIKeyUpdate API key update request payload +// +// swagger:model v1ApiKeyUpdate +type V1APIKeyUpdate struct { + + // metadata + Metadata *V1ObjectMeta `json:"metadata,omitempty"` + + // spec + Spec *V1APIKeySpecUpdate `json:"spec,omitempty"` +} + +// Validate validates this v1 Api key update +func (m *V1APIKeyUpdate) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSpec(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1APIKeyUpdate) validateMetadata(formats strfmt.Registry) error { + + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } + return err + } + } + + return nil +} + +func (m *V1APIKeyUpdate) validateSpec(formats strfmt.Registry) error { + + if swag.IsZero(m.Spec) { // not required + return nil + } + + if m.Spec != nil { + if err := m.Spec.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1APIKeyUpdate) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1APIKeyUpdate) UnmarshalBinary(b []byte) error { + var res V1APIKeyUpdate + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_api_key_user.go b/api/models/v1_api_key_user.go new file mode 100644 index 00000000..fcb55770 --- /dev/null +++ b/api/models/v1_api_key_user.go @@ -0,0 +1,49 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1APIKeyUser API key user information +// +// swagger:model v1ApiKeyUser +type V1APIKeyUser struct { + + // First name of user + FirstName string `json:"firstName,omitempty"` + + // Last name of user + LastName string `json:"lastName,omitempty"` + + // User uid + UID string `json:"uid,omitempty"` +} + +// Validate validates this v1 Api key user +func (m *V1APIKeyUser) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1APIKeyUser) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1APIKeyUser) UnmarshalBinary(b []byte) error { + var res V1APIKeyUser + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_api_keys.go b/api/models/v1_api_keys.go new file mode 100644 index 00000000..3b2a3df1 --- /dev/null +++ b/api/models/v1_api_keys.go @@ -0,0 +1,87 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1APIKeys v1 Api keys +// +// swagger:model v1ApiKeys +type V1APIKeys struct { + + // List of API keys + // Required: true + // Unique: true + Items []*V1APIKey `json:"items"` +} + +// Validate validates this v1 Api keys +func (m *V1APIKeys) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateItems(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1APIKeys) validateItems(formats strfmt.Registry) error { + + if err := validate.Required("items", "body", m.Items); err != nil { + return err + } + + if err := validate.UniqueItems("items", "body", m.Items); err != nil { + return err + } + + for i := 0; i < len(m.Items); i++ { + if swag.IsZero(m.Items[i]) { // not required + continue + } + + if m.Items[i] != nil { + if err := m.Items[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("items" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1APIKeys) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1APIKeys) UnmarshalBinary(b []byte) error { + var res V1APIKeys + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_api_server_access_profile.go b/api/models/v1_api_server_access_profile.go new file mode 100644 index 00000000..cee1739c --- /dev/null +++ b/api/models/v1_api_server_access_profile.go @@ -0,0 +1,52 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1APIServerAccessProfile APIServerAccessProfile - access profile for AKS API server. +// +// swagger:model v1APIServerAccessProfile +type V1APIServerAccessProfile struct { + + // AuthorizedIPRanges - Authorized IP Ranges to kubernetes API server. + AuthorizedIPRanges []string `json:"authorizedIPRanges"` + + // EnablePrivateCluster - Whether to create the cluster as a private cluster or not. + EnablePrivateCluster bool `json:"enablePrivateCluster,omitempty"` + + // EnablePrivateClusterPublicFQDN - Whether to create additional public FQDN for private cluster or not. + EnablePrivateClusterPublicFQDN bool `json:"enablePrivateClusterPublicFQDN,omitempty"` + + // PrivateDNSZone - Private dns zone mode for private cluster. + PrivateDNSZone string `json:"privateDNSZone,omitempty"` +} + +// Validate validates this v1 API server access profile +func (m *V1APIServerAccessProfile) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1APIServerAccessProfile) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1APIServerAccessProfile) UnmarshalBinary(b []byte) error { + var res V1APIServerAccessProfile + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_app_deployment.go b/api/models/v1_app_deployment.go new file mode 100644 index 00000000..f66706cf --- /dev/null +++ b/api/models/v1_app_deployment.go @@ -0,0 +1,121 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1AppDeployment Application deployment response +// +// swagger:model v1AppDeployment +type V1AppDeployment struct { + + // metadata + Metadata *V1ObjectMeta `json:"metadata,omitempty"` + + // spec + Spec *V1AppDeploymentSpec `json:"spec,omitempty"` + + // status + Status *V1AppDeploymentStatus `json:"status,omitempty"` +} + +// Validate validates this v1 app deployment +func (m *V1AppDeployment) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSpec(formats); err != nil { + res = append(res, err) + } + + if err := m.validateStatus(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1AppDeployment) validateMetadata(formats strfmt.Registry) error { + + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } + return err + } + } + + return nil +} + +func (m *V1AppDeployment) validateSpec(formats strfmt.Registry) error { + + if swag.IsZero(m.Spec) { // not required + return nil + } + + if m.Spec != nil { + if err := m.Spec.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec") + } + return err + } + } + + return nil +} + +func (m *V1AppDeployment) validateStatus(formats strfmt.Registry) error { + + if swag.IsZero(m.Status) { // not required + return nil + } + + if m.Status != nil { + if err := m.Status.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("status") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1AppDeployment) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1AppDeployment) UnmarshalBinary(b []byte) error { + var res V1AppDeployment + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_app_deployment_cluster_group_config_entity.go b/api/models/v1_app_deployment_cluster_group_config_entity.go new file mode 100644 index 00000000..17885a23 --- /dev/null +++ b/api/models/v1_app_deployment_cluster_group_config_entity.go @@ -0,0 +1,71 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1AppDeploymentClusterGroupConfigEntity Application deployment cluster group config +// +// swagger:model v1AppDeploymentClusterGroupConfigEntity +type V1AppDeploymentClusterGroupConfigEntity struct { + + // target spec + TargetSpec *V1AppDeploymentClusterGroupTargetSpec `json:"targetSpec,omitempty"` +} + +// Validate validates this v1 app deployment cluster group config entity +func (m *V1AppDeploymentClusterGroupConfigEntity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateTargetSpec(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1AppDeploymentClusterGroupConfigEntity) validateTargetSpec(formats strfmt.Registry) error { + + if swag.IsZero(m.TargetSpec) { // not required + return nil + } + + if m.TargetSpec != nil { + if err := m.TargetSpec.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("targetSpec") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1AppDeploymentClusterGroupConfigEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1AppDeploymentClusterGroupConfigEntity) UnmarshalBinary(b []byte) error { + var res V1AppDeploymentClusterGroupConfigEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_app_deployment_cluster_group_entity.go b/api/models/v1_app_deployment_cluster_group_entity.go new file mode 100644 index 00000000..4ee3704c --- /dev/null +++ b/api/models/v1_app_deployment_cluster_group_entity.go @@ -0,0 +1,96 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1AppDeploymentClusterGroupEntity Application deployment cluster group request payload +// +// swagger:model v1AppDeploymentClusterGroupEntity +type V1AppDeploymentClusterGroupEntity struct { + + // metadata + Metadata *V1ObjectMetaInputEntity `json:"metadata,omitempty"` + + // spec + Spec *V1AppDeploymentClusterGroupSpec `json:"spec,omitempty"` +} + +// Validate validates this v1 app deployment cluster group entity +func (m *V1AppDeploymentClusterGroupEntity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSpec(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1AppDeploymentClusterGroupEntity) validateMetadata(formats strfmt.Registry) error { + + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } + return err + } + } + + return nil +} + +func (m *V1AppDeploymentClusterGroupEntity) validateSpec(formats strfmt.Registry) error { + + if swag.IsZero(m.Spec) { // not required + return nil + } + + if m.Spec != nil { + if err := m.Spec.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1AppDeploymentClusterGroupEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1AppDeploymentClusterGroupEntity) UnmarshalBinary(b []byte) error { + var res V1AppDeploymentClusterGroupEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_app_deployment_cluster_group_spec.go b/api/models/v1_app_deployment_cluster_group_spec.go new file mode 100644 index 00000000..8edbc0d7 --- /dev/null +++ b/api/models/v1_app_deployment_cluster_group_spec.go @@ -0,0 +1,96 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1AppDeploymentClusterGroupSpec Application deployment cluster group spec +// +// swagger:model v1AppDeploymentClusterGroupSpec +type V1AppDeploymentClusterGroupSpec struct { + + // config + Config *V1AppDeploymentClusterGroupConfigEntity `json:"config,omitempty"` + + // profile + Profile *V1AppDeploymentProfileEntity `json:"profile,omitempty"` +} + +// Validate validates this v1 app deployment cluster group spec +func (m *V1AppDeploymentClusterGroupSpec) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateConfig(formats); err != nil { + res = append(res, err) + } + + if err := m.validateProfile(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1AppDeploymentClusterGroupSpec) validateConfig(formats strfmt.Registry) error { + + if swag.IsZero(m.Config) { // not required + return nil + } + + if m.Config != nil { + if err := m.Config.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("config") + } + return err + } + } + + return nil +} + +func (m *V1AppDeploymentClusterGroupSpec) validateProfile(formats strfmt.Registry) error { + + if swag.IsZero(m.Profile) { // not required + return nil + } + + if m.Profile != nil { + if err := m.Profile.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("profile") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1AppDeploymentClusterGroupSpec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1AppDeploymentClusterGroupSpec) UnmarshalBinary(b []byte) error { + var res V1AppDeploymentClusterGroupSpec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_app_deployment_cluster_group_target_spec.go b/api/models/v1_app_deployment_cluster_group_target_spec.go new file mode 100644 index 00000000..e7fd3458 --- /dev/null +++ b/api/models/v1_app_deployment_cluster_group_target_spec.go @@ -0,0 +1,106 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1AppDeploymentClusterGroupTargetSpec Application deployment cluster group target spec +// +// swagger:model v1AppDeploymentClusterGroupTargetSpec +type V1AppDeploymentClusterGroupTargetSpec struct { + + // Application deployment cluster group uid + // Required: true + ClusterGroupUID *string `json:"clusterGroupUid"` + + // cluster limits + ClusterLimits *V1AppDeploymentTargetClusterLimits `json:"clusterLimits,omitempty"` + + // Application deployment virtual cluster name + // Required: true + ClusterName *string `json:"clusterName"` +} + +// Validate validates this v1 app deployment cluster group target spec +func (m *V1AppDeploymentClusterGroupTargetSpec) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateClusterGroupUID(formats); err != nil { + res = append(res, err) + } + + if err := m.validateClusterLimits(formats); err != nil { + res = append(res, err) + } + + if err := m.validateClusterName(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1AppDeploymentClusterGroupTargetSpec) validateClusterGroupUID(formats strfmt.Registry) error { + + if err := validate.Required("clusterGroupUid", "body", m.ClusterGroupUID); err != nil { + return err + } + + return nil +} + +func (m *V1AppDeploymentClusterGroupTargetSpec) validateClusterLimits(formats strfmt.Registry) error { + + if swag.IsZero(m.ClusterLimits) { // not required + return nil + } + + if m.ClusterLimits != nil { + if err := m.ClusterLimits.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("clusterLimits") + } + return err + } + } + + return nil +} + +func (m *V1AppDeploymentClusterGroupTargetSpec) validateClusterName(formats strfmt.Registry) error { + + if err := validate.Required("clusterName", "body", m.ClusterName); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1AppDeploymentClusterGroupTargetSpec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1AppDeploymentClusterGroupTargetSpec) UnmarshalBinary(b []byte) error { + var res V1AppDeploymentClusterGroupTargetSpec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_app_deployment_cluster_health.go b/api/models/v1_app_deployment_cluster_health.go new file mode 100644 index 00000000..978f8507 --- /dev/null +++ b/api/models/v1_app_deployment_cluster_health.go @@ -0,0 +1,43 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1AppDeploymentClusterHealth Application deployment cluster health status +// +// swagger:model v1AppDeploymentClusterHealth +type V1AppDeploymentClusterHealth struct { + + // state + State string `json:"state,omitempty"` +} + +// Validate validates this v1 app deployment cluster health +func (m *V1AppDeploymentClusterHealth) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1AppDeploymentClusterHealth) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1AppDeploymentClusterHealth) UnmarshalBinary(b []byte) error { + var res V1AppDeploymentClusterHealth + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_app_deployment_cluster_ref.go b/api/models/v1_app_deployment_cluster_ref.go new file mode 100644 index 00000000..992c69cd --- /dev/null +++ b/api/models/v1_app_deployment_cluster_ref.go @@ -0,0 +1,106 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "encoding/json" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1AppDeploymentClusterRef Application deployment cluster reference +// +// swagger:model v1AppDeploymentClusterRef +type V1AppDeploymentClusterRef struct { + + // Application deployment source cluster type[ "virtualCluster", "hostCluster" ] + // Enum: [virtual host] + DeploymentClusterType string `json:"deploymentClusterType,omitempty"` + + // Application deployment cluster name + Name string `json:"name,omitempty"` + + // Application deployment cluster uid + UID string `json:"uid,omitempty"` +} + +// Validate validates this v1 app deployment cluster ref +func (m *V1AppDeploymentClusterRef) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateDeploymentClusterType(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +var v1AppDeploymentClusterRefTypeDeploymentClusterTypePropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["virtual","host"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + v1AppDeploymentClusterRefTypeDeploymentClusterTypePropEnum = append(v1AppDeploymentClusterRefTypeDeploymentClusterTypePropEnum, v) + } +} + +const ( + + // V1AppDeploymentClusterRefDeploymentClusterTypeVirtual captures enum value "virtual" + V1AppDeploymentClusterRefDeploymentClusterTypeVirtual string = "virtual" + + // V1AppDeploymentClusterRefDeploymentClusterTypeHost captures enum value "host" + V1AppDeploymentClusterRefDeploymentClusterTypeHost string = "host" +) + +// prop value enum +func (m *V1AppDeploymentClusterRef) validateDeploymentClusterTypeEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, v1AppDeploymentClusterRefTypeDeploymentClusterTypePropEnum, true); err != nil { + return err + } + return nil +} + +func (m *V1AppDeploymentClusterRef) validateDeploymentClusterType(formats strfmt.Registry) error { + + if swag.IsZero(m.DeploymentClusterType) { // not required + return nil + } + + // value enum + if err := m.validateDeploymentClusterTypeEnum("deploymentClusterType", "body", m.DeploymentClusterType); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1AppDeploymentClusterRef) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1AppDeploymentClusterRef) UnmarshalBinary(b []byte) error { + var res V1AppDeploymentClusterRef + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_app_deployment_cluster_ref_summary.go b/api/models/v1_app_deployment_cluster_ref_summary.go new file mode 100644 index 00000000..336bb896 --- /dev/null +++ b/api/models/v1_app_deployment_cluster_ref_summary.go @@ -0,0 +1,106 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "encoding/json" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1AppDeploymentClusterRefSummary Application deployment cluster reference +// +// swagger:model v1AppDeploymentClusterRefSummary +type V1AppDeploymentClusterRefSummary struct { + + // Application deployment source cluster type[ "virtualCluster", "hostCluster" ] + // Enum: [virtual host] + DeploymentClusterType string `json:"deploymentClusterType,omitempty"` + + // Application deployment source cluster name + Name string `json:"name,omitempty"` + + // Application deployment source cluster uid + UID string `json:"uid,omitempty"` +} + +// Validate validates this v1 app deployment cluster ref summary +func (m *V1AppDeploymentClusterRefSummary) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateDeploymentClusterType(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +var v1AppDeploymentClusterRefSummaryTypeDeploymentClusterTypePropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["virtual","host"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + v1AppDeploymentClusterRefSummaryTypeDeploymentClusterTypePropEnum = append(v1AppDeploymentClusterRefSummaryTypeDeploymentClusterTypePropEnum, v) + } +} + +const ( + + // V1AppDeploymentClusterRefSummaryDeploymentClusterTypeVirtual captures enum value "virtual" + V1AppDeploymentClusterRefSummaryDeploymentClusterTypeVirtual string = "virtual" + + // V1AppDeploymentClusterRefSummaryDeploymentClusterTypeHost captures enum value "host" + V1AppDeploymentClusterRefSummaryDeploymentClusterTypeHost string = "host" +) + +// prop value enum +func (m *V1AppDeploymentClusterRefSummary) validateDeploymentClusterTypeEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, v1AppDeploymentClusterRefSummaryTypeDeploymentClusterTypePropEnum, true); err != nil { + return err + } + return nil +} + +func (m *V1AppDeploymentClusterRefSummary) validateDeploymentClusterType(formats strfmt.Registry) error { + + if swag.IsZero(m.DeploymentClusterType) { // not required + return nil + } + + // value enum + if err := m.validateDeploymentClusterTypeEnum("deploymentClusterType", "body", m.DeploymentClusterType); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1AppDeploymentClusterRefSummary) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1AppDeploymentClusterRefSummary) UnmarshalBinary(b []byte) error { + var res V1AppDeploymentClusterRefSummary + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_app_deployment_cluster_status.go b/api/models/v1_app_deployment_cluster_status.go new file mode 100644 index 00000000..fe3f3aa6 --- /dev/null +++ b/api/models/v1_app_deployment_cluster_status.go @@ -0,0 +1,74 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1AppDeploymentClusterStatus Application deployment cluster status +// +// swagger:model v1AppDeploymentClusterStatus +type V1AppDeploymentClusterStatus struct { + + // health + Health *V1AppDeploymentClusterHealth `json:"health,omitempty"` + + // state + State string `json:"state,omitempty"` +} + +// Validate validates this v1 app deployment cluster status +func (m *V1AppDeploymentClusterStatus) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateHealth(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1AppDeploymentClusterStatus) validateHealth(formats strfmt.Registry) error { + + if swag.IsZero(m.Health) { // not required + return nil + } + + if m.Health != nil { + if err := m.Health.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("health") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1AppDeploymentClusterStatus) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1AppDeploymentClusterStatus) UnmarshalBinary(b []byte) error { + var res V1AppDeploymentClusterStatus + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_app_deployment_config.go b/api/models/v1_app_deployment_config.go new file mode 100644 index 00000000..c894de8d --- /dev/null +++ b/api/models/v1_app_deployment_config.go @@ -0,0 +1,71 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1AppDeploymentConfig Application deployment config response +// +// swagger:model v1AppDeploymentConfig +type V1AppDeploymentConfig struct { + + // target + Target *V1AppDeploymentTargetConfig `json:"target,omitempty"` +} + +// Validate validates this v1 app deployment config +func (m *V1AppDeploymentConfig) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateTarget(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1AppDeploymentConfig) validateTarget(formats strfmt.Registry) error { + + if swag.IsZero(m.Target) { // not required + return nil + } + + if m.Target != nil { + if err := m.Target.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("target") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1AppDeploymentConfig) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1AppDeploymentConfig) UnmarshalBinary(b []byte) error { + var res V1AppDeploymentConfig + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_app_deployment_config_summary.go b/api/models/v1_app_deployment_config_summary.go new file mode 100644 index 00000000..4e560b5c --- /dev/null +++ b/api/models/v1_app_deployment_config_summary.go @@ -0,0 +1,71 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1AppDeploymentConfigSummary Application deployment config summary +// +// swagger:model v1AppDeploymentConfigSummary +type V1AppDeploymentConfigSummary struct { + + // target + Target *V1AppDeploymentTargetConfigSummary `json:"target,omitempty"` +} + +// Validate validates this v1 app deployment config summary +func (m *V1AppDeploymentConfigSummary) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateTarget(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1AppDeploymentConfigSummary) validateTarget(formats strfmt.Registry) error { + + if swag.IsZero(m.Target) { // not required + return nil + } + + if m.Target != nil { + if err := m.Target.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("target") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1AppDeploymentConfigSummary) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1AppDeploymentConfigSummary) UnmarshalBinary(b []byte) error { + var res V1AppDeploymentConfigSummary + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_app_deployment_filter_spec.go b/api/models/v1_app_deployment_filter_spec.go new file mode 100644 index 00000000..3278fd96 --- /dev/null +++ b/api/models/v1_app_deployment_filter_spec.go @@ -0,0 +1,121 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1AppDeploymentFilterSpec Application deployment filter spec +// +// swagger:model v1AppDeploymentFilterSpec +type V1AppDeploymentFilterSpec struct { + + // app deployment name + AppDeploymentName *V1FilterString `json:"appDeploymentName,omitempty"` + + // cluster uids + ClusterUids *V1FilterArray `json:"clusterUids,omitempty"` + + // tags + Tags *V1FilterArray `json:"tags,omitempty"` +} + +// Validate validates this v1 app deployment filter spec +func (m *V1AppDeploymentFilterSpec) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateAppDeploymentName(formats); err != nil { + res = append(res, err) + } + + if err := m.validateClusterUids(formats); err != nil { + res = append(res, err) + } + + if err := m.validateTags(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1AppDeploymentFilterSpec) validateAppDeploymentName(formats strfmt.Registry) error { + + if swag.IsZero(m.AppDeploymentName) { // not required + return nil + } + + if m.AppDeploymentName != nil { + if err := m.AppDeploymentName.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("appDeploymentName") + } + return err + } + } + + return nil +} + +func (m *V1AppDeploymentFilterSpec) validateClusterUids(formats strfmt.Registry) error { + + if swag.IsZero(m.ClusterUids) { // not required + return nil + } + + if m.ClusterUids != nil { + if err := m.ClusterUids.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("clusterUids") + } + return err + } + } + + return nil +} + +func (m *V1AppDeploymentFilterSpec) validateTags(formats strfmt.Registry) error { + + if swag.IsZero(m.Tags) { // not required + return nil + } + + if m.Tags != nil { + if err := m.Tags.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("tags") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1AppDeploymentFilterSpec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1AppDeploymentFilterSpec) UnmarshalBinary(b []byte) error { + var res V1AppDeploymentFilterSpec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_app_deployment_notifications.go b/api/models/v1_app_deployment_notifications.go new file mode 100644 index 00000000..9558db49 --- /dev/null +++ b/api/models/v1_app_deployment_notifications.go @@ -0,0 +1,43 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1AppDeploymentNotifications Application deployment notifications +// +// swagger:model v1AppDeploymentNotifications +type V1AppDeploymentNotifications struct { + + // is available + IsAvailable bool `json:"isAvailable"` +} + +// Validate validates this v1 app deployment notifications +func (m *V1AppDeploymentNotifications) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1AppDeploymentNotifications) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1AppDeploymentNotifications) UnmarshalBinary(b []byte) error { + var res V1AppDeploymentNotifications + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_app_deployment_profile.go b/api/models/v1_app_deployment_profile.go new file mode 100644 index 00000000..3aa6ac35 --- /dev/null +++ b/api/models/v1_app_deployment_profile.go @@ -0,0 +1,96 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1AppDeploymentProfile Application deployment profile +// +// swagger:model v1AppDeploymentProfile +type V1AppDeploymentProfile struct { + + // metadata + Metadata *V1AppDeploymentProfileMeta `json:"metadata,omitempty"` + + // template + Template *V1AppProfileTemplate `json:"template,omitempty"` +} + +// Validate validates this v1 app deployment profile +func (m *V1AppDeploymentProfile) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if err := m.validateTemplate(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1AppDeploymentProfile) validateMetadata(formats strfmt.Registry) error { + + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } + return err + } + } + + return nil +} + +func (m *V1AppDeploymentProfile) validateTemplate(formats strfmt.Registry) error { + + if swag.IsZero(m.Template) { // not required + return nil + } + + if m.Template != nil { + if err := m.Template.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("template") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1AppDeploymentProfile) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1AppDeploymentProfile) UnmarshalBinary(b []byte) error { + var res V1AppDeploymentProfile + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_app_deployment_profile_entity.go b/api/models/v1_app_deployment_profile_entity.go new file mode 100644 index 00000000..c8f8d609 --- /dev/null +++ b/api/models/v1_app_deployment_profile_entity.go @@ -0,0 +1,64 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1AppDeploymentProfileEntity Application deployment profile request payload +// +// swagger:model v1AppDeploymentProfileEntity +type V1AppDeploymentProfileEntity struct { + + // Application deployment profile uid + // Required: true + AppProfileUID *string `json:"appProfileUid"` +} + +// Validate validates this v1 app deployment profile entity +func (m *V1AppDeploymentProfileEntity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateAppProfileUID(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1AppDeploymentProfileEntity) validateAppProfileUID(formats strfmt.Registry) error { + + if err := validate.Required("appProfileUid", "body", m.AppProfileUID); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1AppDeploymentProfileEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1AppDeploymentProfileEntity) UnmarshalBinary(b []byte) error { + var res V1AppDeploymentProfileEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_app_deployment_profile_meta.go b/api/models/v1_app_deployment_profile_meta.go new file mode 100644 index 00000000..3959d3cb --- /dev/null +++ b/api/models/v1_app_deployment_profile_meta.go @@ -0,0 +1,49 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1AppDeploymentProfileMeta Application deployment profile metadata +// +// swagger:model v1AppDeploymentProfileMeta +type V1AppDeploymentProfileMeta struct { + + // Application deployment profile name + Name string `json:"name,omitempty"` + + // Application deployment profile uid + UID string `json:"uid,omitempty"` + + // Application deployment profile version + Version string `json:"version,omitempty"` +} + +// Validate validates this v1 app deployment profile meta +func (m *V1AppDeploymentProfileMeta) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1AppDeploymentProfileMeta) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1AppDeploymentProfileMeta) UnmarshalBinary(b []byte) error { + var res V1AppDeploymentProfileMeta + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_app_deployment_profile_metadata_summary.go b/api/models/v1_app_deployment_profile_metadata_summary.go new file mode 100644 index 00000000..d55b87a4 --- /dev/null +++ b/api/models/v1_app_deployment_profile_metadata_summary.go @@ -0,0 +1,49 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1AppDeploymentProfileMetadataSummary Application deployment profile metadata summary +// +// swagger:model v1AppDeploymentProfileMetadataSummary +type V1AppDeploymentProfileMetadataSummary struct { + + // name + Name string `json:"name,omitempty"` + + // uid + UID string `json:"uid,omitempty"` + + // version + Version string `json:"version,omitempty"` +} + +// Validate validates this v1 app deployment profile metadata summary +func (m *V1AppDeploymentProfileMetadataSummary) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1AppDeploymentProfileMetadataSummary) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1AppDeploymentProfileMetadataSummary) UnmarshalBinary(b []byte) error { + var res V1AppDeploymentProfileMetadataSummary + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_app_deployment_profile_spec.go b/api/models/v1_app_deployment_profile_spec.go new file mode 100644 index 00000000..694b521c --- /dev/null +++ b/api/models/v1_app_deployment_profile_spec.go @@ -0,0 +1,96 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1AppDeploymentProfileSpec Application deployment profile spec +// +// swagger:model v1AppDeploymentProfileSpec +type V1AppDeploymentProfileSpec struct { + + // metadata + Metadata *V1AppDeploymentProfileMeta `json:"metadata,omitempty"` + + // template + Template *V1AppProfileTemplateSpec `json:"template,omitempty"` +} + +// Validate validates this v1 app deployment profile spec +func (m *V1AppDeploymentProfileSpec) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if err := m.validateTemplate(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1AppDeploymentProfileSpec) validateMetadata(formats strfmt.Registry) error { + + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } + return err + } + } + + return nil +} + +func (m *V1AppDeploymentProfileSpec) validateTemplate(formats strfmt.Registry) error { + + if swag.IsZero(m.Template) { // not required + return nil + } + + if m.Template != nil { + if err := m.Template.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("template") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1AppDeploymentProfileSpec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1AppDeploymentProfileSpec) UnmarshalBinary(b []byte) error { + var res V1AppDeploymentProfileSpec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_app_deployment_profile_summary.go b/api/models/v1_app_deployment_profile_summary.go new file mode 100644 index 00000000..2c029e67 --- /dev/null +++ b/api/models/v1_app_deployment_profile_summary.go @@ -0,0 +1,96 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1AppDeploymentProfileSummary Application deployment profile summary +// +// swagger:model v1AppDeploymentProfileSummary +type V1AppDeploymentProfileSummary struct { + + // metadata + Metadata *V1AppDeploymentProfileMetadataSummary `json:"metadata,omitempty"` + + // template + Template *V1AppProfileTemplateSummary `json:"template,omitempty"` +} + +// Validate validates this v1 app deployment profile summary +func (m *V1AppDeploymentProfileSummary) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if err := m.validateTemplate(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1AppDeploymentProfileSummary) validateMetadata(formats strfmt.Registry) error { + + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } + return err + } + } + + return nil +} + +func (m *V1AppDeploymentProfileSummary) validateTemplate(formats strfmt.Registry) error { + + if swag.IsZero(m.Template) { // not required + return nil + } + + if m.Template != nil { + if err := m.Template.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("template") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1AppDeploymentProfileSummary) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1AppDeploymentProfileSummary) UnmarshalBinary(b []byte) error { + var res V1AppDeploymentProfileSummary + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_app_deployment_profile_version.go b/api/models/v1_app_deployment_profile_version.go new file mode 100644 index 00000000..3a5605a8 --- /dev/null +++ b/api/models/v1_app_deployment_profile_version.go @@ -0,0 +1,46 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1AppDeploymentProfileVersion Application deployment profile version +// +// swagger:model v1AppDeploymentProfileVersion +type V1AppDeploymentProfileVersion struct { + + // Application deployment profile uid + UID string `json:"uid,omitempty"` + + // Application deployment profile version + Version string `json:"version,omitempty"` +} + +// Validate validates this v1 app deployment profile version +func (m *V1AppDeploymentProfileVersion) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1AppDeploymentProfileVersion) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1AppDeploymentProfileVersion) UnmarshalBinary(b []byte) error { + var res V1AppDeploymentProfileVersion + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_app_deployment_profile_versions.go b/api/models/v1_app_deployment_profile_versions.go new file mode 100644 index 00000000..880a6f6d --- /dev/null +++ b/api/models/v1_app_deployment_profile_versions.go @@ -0,0 +1,137 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1AppDeploymentProfileVersions Application deployment profile versions +// +// swagger:model v1AppDeploymentProfileVersions +type V1AppDeploymentProfileVersions struct { + + // Application deployment profile available versions + AvailableVersions []*V1AppDeploymentProfileVersion `json:"availableVersions"` + + // Application deployment profile latest versions + LatestVersions []*V1AppDeploymentProfileVersion `json:"latestVersions"` + + // metadata + Metadata *V1AppDeploymentProfileMeta `json:"metadata,omitempty"` +} + +// Validate validates this v1 app deployment profile versions +func (m *V1AppDeploymentProfileVersions) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateAvailableVersions(formats); err != nil { + res = append(res, err) + } + + if err := m.validateLatestVersions(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1AppDeploymentProfileVersions) validateAvailableVersions(formats strfmt.Registry) error { + + if swag.IsZero(m.AvailableVersions) { // not required + return nil + } + + for i := 0; i < len(m.AvailableVersions); i++ { + if swag.IsZero(m.AvailableVersions[i]) { // not required + continue + } + + if m.AvailableVersions[i] != nil { + if err := m.AvailableVersions[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("availableVersions" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1AppDeploymentProfileVersions) validateLatestVersions(formats strfmt.Registry) error { + + if swag.IsZero(m.LatestVersions) { // not required + return nil + } + + for i := 0; i < len(m.LatestVersions); i++ { + if swag.IsZero(m.LatestVersions[i]) { // not required + continue + } + + if m.LatestVersions[i] != nil { + if err := m.LatestVersions[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("latestVersions" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1AppDeploymentProfileVersions) validateMetadata(formats strfmt.Registry) error { + + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1AppDeploymentProfileVersions) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1AppDeploymentProfileVersions) UnmarshalBinary(b []byte) error { + var res V1AppDeploymentProfileVersions + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_app_deployment_sort_fields.go b/api/models/v1_app_deployment_sort_fields.go new file mode 100644 index 00000000..f47b64b2 --- /dev/null +++ b/api/models/v1_app_deployment_sort_fields.go @@ -0,0 +1,66 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "encoding/json" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" +) + +// V1AppDeploymentSortFields v1 app deployment sort fields +// +// swagger:model v1AppDeploymentSortFields +type V1AppDeploymentSortFields string + +const ( + + // V1AppDeploymentSortFieldsAppDeploymentName captures enum value "appDeploymentName" + V1AppDeploymentSortFieldsAppDeploymentName V1AppDeploymentSortFields = "appDeploymentName" + + // V1AppDeploymentSortFieldsCreationTimestamp captures enum value "creationTimestamp" + V1AppDeploymentSortFieldsCreationTimestamp V1AppDeploymentSortFields = "creationTimestamp" + + // V1AppDeploymentSortFieldsLastModifiedTimestamp captures enum value "lastModifiedTimestamp" + V1AppDeploymentSortFieldsLastModifiedTimestamp V1AppDeploymentSortFields = "lastModifiedTimestamp" +) + +// for schema +var v1AppDeploymentSortFieldsEnum []interface{} + +func init() { + var res []V1AppDeploymentSortFields + if err := json.Unmarshal([]byte(`["appDeploymentName","creationTimestamp","lastModifiedTimestamp"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + v1AppDeploymentSortFieldsEnum = append(v1AppDeploymentSortFieldsEnum, v) + } +} + +func (m V1AppDeploymentSortFields) validateV1AppDeploymentSortFieldsEnum(path, location string, value V1AppDeploymentSortFields) error { + if err := validate.EnumCase(path, location, value, v1AppDeploymentSortFieldsEnum, true); err != nil { + return err + } + return nil +} + +// Validate validates this v1 app deployment sort fields +func (m V1AppDeploymentSortFields) Validate(formats strfmt.Registry) error { + var res []error + + // value enum + if err := m.validateV1AppDeploymentSortFieldsEnum("", "body", m); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/models/v1_app_deployment_sort_spec.go b/api/models/v1_app_deployment_sort_spec.go new file mode 100644 index 00000000..c39ae48f --- /dev/null +++ b/api/models/v1_app_deployment_sort_spec.go @@ -0,0 +1,94 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1AppDeploymentSortSpec v1 app deployment sort spec +// +// swagger:model v1AppDeploymentSortSpec +type V1AppDeploymentSortSpec struct { + + // field + Field *V1AppDeploymentSortFields `json:"field,omitempty"` + + // order + Order V1SortOrder `json:"order,omitempty"` +} + +// Validate validates this v1 app deployment sort spec +func (m *V1AppDeploymentSortSpec) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateField(formats); err != nil { + res = append(res, err) + } + + if err := m.validateOrder(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1AppDeploymentSortSpec) validateField(formats strfmt.Registry) error { + + if swag.IsZero(m.Field) { // not required + return nil + } + + if m.Field != nil { + if err := m.Field.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("field") + } + return err + } + } + + return nil +} + +func (m *V1AppDeploymentSortSpec) validateOrder(formats strfmt.Registry) error { + + if swag.IsZero(m.Order) { // not required + return nil + } + + if err := m.Order.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("order") + } + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1AppDeploymentSortSpec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1AppDeploymentSortSpec) UnmarshalBinary(b []byte) error { + var res V1AppDeploymentSortSpec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_app_deployment_spec.go b/api/models/v1_app_deployment_spec.go new file mode 100644 index 00000000..f6b9c122 --- /dev/null +++ b/api/models/v1_app_deployment_spec.go @@ -0,0 +1,96 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1AppDeploymentSpec Application deployment spec +// +// swagger:model v1AppDeploymentSpec +type V1AppDeploymentSpec struct { + + // config + Config *V1AppDeploymentConfig `json:"config,omitempty"` + + // profile + Profile *V1AppDeploymentProfile `json:"profile,omitempty"` +} + +// Validate validates this v1 app deployment spec +func (m *V1AppDeploymentSpec) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateConfig(formats); err != nil { + res = append(res, err) + } + + if err := m.validateProfile(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1AppDeploymentSpec) validateConfig(formats strfmt.Registry) error { + + if swag.IsZero(m.Config) { // not required + return nil + } + + if m.Config != nil { + if err := m.Config.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("config") + } + return err + } + } + + return nil +} + +func (m *V1AppDeploymentSpec) validateProfile(formats strfmt.Registry) error { + + if swag.IsZero(m.Profile) { // not required + return nil + } + + if m.Profile != nil { + if err := m.Profile.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("profile") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1AppDeploymentSpec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1AppDeploymentSpec) UnmarshalBinary(b []byte) error { + var res V1AppDeploymentSpec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_app_deployment_status.go b/api/models/v1_app_deployment_status.go new file mode 100644 index 00000000..02623e4d --- /dev/null +++ b/api/models/v1_app_deployment_status.go @@ -0,0 +1,108 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1AppDeploymentStatus Application deployment status +// +// swagger:model v1AppDeploymentStatus +type V1AppDeploymentStatus struct { + + // Application deployment tiers + AppTiers []*V1ClusterPackStatus `json:"appTiers"` + + // lifecycle status + LifecycleStatus *V1LifecycleStatus `json:"lifecycleStatus,omitempty"` + + // Application deployment state [ "Pending", "Deploying", "Deployed", "Updating" ] + State string `json:"state,omitempty"` +} + +// Validate validates this v1 app deployment status +func (m *V1AppDeploymentStatus) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateAppTiers(formats); err != nil { + res = append(res, err) + } + + if err := m.validateLifecycleStatus(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1AppDeploymentStatus) validateAppTiers(formats strfmt.Registry) error { + + if swag.IsZero(m.AppTiers) { // not required + return nil + } + + for i := 0; i < len(m.AppTiers); i++ { + if swag.IsZero(m.AppTiers[i]) { // not required + continue + } + + if m.AppTiers[i] != nil { + if err := m.AppTiers[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("appTiers" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1AppDeploymentStatus) validateLifecycleStatus(formats strfmt.Registry) error { + + if swag.IsZero(m.LifecycleStatus) { // not required + return nil + } + + if m.LifecycleStatus != nil { + if err := m.LifecycleStatus.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("lifecycleStatus") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1AppDeploymentStatus) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1AppDeploymentStatus) UnmarshalBinary(b []byte) error { + var res V1AppDeploymentStatus + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_app_deployment_status_summary.go b/api/models/v1_app_deployment_status_summary.go new file mode 100644 index 00000000..e56f44fe --- /dev/null +++ b/api/models/v1_app_deployment_status_summary.go @@ -0,0 +1,99 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1AppDeploymentStatusSummary Application deployment status summary +// +// swagger:model v1AppDeploymentStatusSummary +type V1AppDeploymentStatusSummary struct { + + // cluster + Cluster *V1AppDeploymentClusterStatus `json:"cluster,omitempty"` + + // notifications + Notifications *V1AppDeploymentNotifications `json:"notifications,omitempty"` + + // state + State string `json:"state,omitempty"` +} + +// Validate validates this v1 app deployment status summary +func (m *V1AppDeploymentStatusSummary) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateCluster(formats); err != nil { + res = append(res, err) + } + + if err := m.validateNotifications(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1AppDeploymentStatusSummary) validateCluster(formats strfmt.Registry) error { + + if swag.IsZero(m.Cluster) { // not required + return nil + } + + if m.Cluster != nil { + if err := m.Cluster.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("cluster") + } + return err + } + } + + return nil +} + +func (m *V1AppDeploymentStatusSummary) validateNotifications(formats strfmt.Registry) error { + + if swag.IsZero(m.Notifications) { // not required + return nil + } + + if m.Notifications != nil { + if err := m.Notifications.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("notifications") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1AppDeploymentStatusSummary) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1AppDeploymentStatusSummary) UnmarshalBinary(b []byte) error { + var res V1AppDeploymentStatusSummary + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_app_deployment_summary.go b/api/models/v1_app_deployment_summary.go new file mode 100644 index 00000000..41b2167e --- /dev/null +++ b/api/models/v1_app_deployment_summary.go @@ -0,0 +1,205 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1AppDeploymentSummary Application deployment summary +// +// swagger:model v1AppDeploymentSummary +type V1AppDeploymentSummary struct { + + // metadata + Metadata *V1ObjectMeta `json:"metadata,omitempty"` + + // spec + Spec *V1AppDeploymentSummarySpec `json:"spec,omitempty"` + + // status + Status *V1AppDeploymentStatusSummary `json:"status,omitempty"` +} + +// Validate validates this v1 app deployment summary +func (m *V1AppDeploymentSummary) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSpec(formats); err != nil { + res = append(res, err) + } + + if err := m.validateStatus(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1AppDeploymentSummary) validateMetadata(formats strfmt.Registry) error { + + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } + return err + } + } + + return nil +} + +func (m *V1AppDeploymentSummary) validateSpec(formats strfmt.Registry) error { + + if swag.IsZero(m.Spec) { // not required + return nil + } + + if m.Spec != nil { + if err := m.Spec.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec") + } + return err + } + } + + return nil +} + +func (m *V1AppDeploymentSummary) validateStatus(formats strfmt.Registry) error { + + if swag.IsZero(m.Status) { // not required + return nil + } + + if m.Status != nil { + if err := m.Status.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("status") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1AppDeploymentSummary) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1AppDeploymentSummary) UnmarshalBinary(b []byte) error { + var res V1AppDeploymentSummary + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} + +// V1AppDeploymentSummarySpec Application deployment spec summary +// +// swagger:model V1AppDeploymentSummarySpec +type V1AppDeploymentSummarySpec struct { + + // config + Config *V1AppDeploymentConfigSummary `json:"config,omitempty"` + + // profile + Profile *V1AppDeploymentProfileSummary `json:"profile,omitempty"` +} + +// Validate validates this v1 app deployment summary spec +func (m *V1AppDeploymentSummarySpec) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateConfig(formats); err != nil { + res = append(res, err) + } + + if err := m.validateProfile(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1AppDeploymentSummarySpec) validateConfig(formats strfmt.Registry) error { + + if swag.IsZero(m.Config) { // not required + return nil + } + + if m.Config != nil { + if err := m.Config.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec" + "." + "config") + } + return err + } + } + + return nil +} + +func (m *V1AppDeploymentSummarySpec) validateProfile(formats strfmt.Registry) error { + + if swag.IsZero(m.Profile) { // not required + return nil + } + + if m.Profile != nil { + if err := m.Profile.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec" + "." + "profile") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1AppDeploymentSummarySpec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1AppDeploymentSummarySpec) UnmarshalBinary(b []byte) error { + var res V1AppDeploymentSummarySpec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_app_deployment_target_cluster_limits.go b/api/models/v1_app_deployment_target_cluster_limits.go new file mode 100644 index 00000000..914d3cbe --- /dev/null +++ b/api/models/v1_app_deployment_target_cluster_limits.go @@ -0,0 +1,49 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1AppDeploymentTargetClusterLimits Application deployment target cluster limits +// +// swagger:model v1AppDeploymentTargetClusterLimits +type V1AppDeploymentTargetClusterLimits struct { + + // CPU cores + CPU int32 `json:"cpu,omitempty"` + + // Memory in MiB + MemoryMiB int32 `json:"memoryMiB,omitempty"` + + // Storage in GiB + StorageGiB int32 `json:"storageGiB,omitempty"` +} + +// Validate validates this v1 app deployment target cluster limits +func (m *V1AppDeploymentTargetClusterLimits) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1AppDeploymentTargetClusterLimits) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1AppDeploymentTargetClusterLimits) UnmarshalBinary(b []byte) error { + var res V1AppDeploymentTargetClusterLimits + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_app_deployment_target_config.go b/api/models/v1_app_deployment_target_config.go new file mode 100644 index 00000000..0e4329e9 --- /dev/null +++ b/api/models/v1_app_deployment_target_config.go @@ -0,0 +1,96 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1AppDeploymentTargetConfig Application deployment target config response +// +// swagger:model v1AppDeploymentTargetConfig +type V1AppDeploymentTargetConfig struct { + + // cluster ref + ClusterRef *V1AppDeploymentClusterRef `json:"clusterRef,omitempty"` + + // env ref + EnvRef *V1AppDeploymentTargetEnvironmentRef `json:"envRef,omitempty"` +} + +// Validate validates this v1 app deployment target config +func (m *V1AppDeploymentTargetConfig) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateClusterRef(formats); err != nil { + res = append(res, err) + } + + if err := m.validateEnvRef(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1AppDeploymentTargetConfig) validateClusterRef(formats strfmt.Registry) error { + + if swag.IsZero(m.ClusterRef) { // not required + return nil + } + + if m.ClusterRef != nil { + if err := m.ClusterRef.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("clusterRef") + } + return err + } + } + + return nil +} + +func (m *V1AppDeploymentTargetConfig) validateEnvRef(formats strfmt.Registry) error { + + if swag.IsZero(m.EnvRef) { // not required + return nil + } + + if m.EnvRef != nil { + if err := m.EnvRef.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("envRef") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1AppDeploymentTargetConfig) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1AppDeploymentTargetConfig) UnmarshalBinary(b []byte) error { + var res V1AppDeploymentTargetConfig + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_app_deployment_target_config_summary.go b/api/models/v1_app_deployment_target_config_summary.go new file mode 100644 index 00000000..51fd0f35 --- /dev/null +++ b/api/models/v1_app_deployment_target_config_summary.go @@ -0,0 +1,71 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1AppDeploymentTargetConfigSummary Application deployment target config summary +// +// swagger:model v1AppDeploymentTargetConfigSummary +type V1AppDeploymentTargetConfigSummary struct { + + // cluster ref + ClusterRef *V1AppDeploymentClusterRefSummary `json:"clusterRef,omitempty"` +} + +// Validate validates this v1 app deployment target config summary +func (m *V1AppDeploymentTargetConfigSummary) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateClusterRef(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1AppDeploymentTargetConfigSummary) validateClusterRef(formats strfmt.Registry) error { + + if swag.IsZero(m.ClusterRef) { // not required + return nil + } + + if m.ClusterRef != nil { + if err := m.ClusterRef.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("clusterRef") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1AppDeploymentTargetConfigSummary) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1AppDeploymentTargetConfigSummary) UnmarshalBinary(b []byte) error { + var res V1AppDeploymentTargetConfigSummary + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_app_deployment_target_environment_ref.go b/api/models/v1_app_deployment_target_environment_ref.go new file mode 100644 index 00000000..6f0030f9 --- /dev/null +++ b/api/models/v1_app_deployment_target_environment_ref.go @@ -0,0 +1,49 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1AppDeploymentTargetEnvironmentRef Application deployment target environment reference +// +// swagger:model v1AppDeploymentTargetEnvironmentRef +type V1AppDeploymentTargetEnvironmentRef struct { + + // Application deployment target resource name + Name string `json:"name,omitempty"` + + // Application deployment target resource type [ "nestedCluster", "clusterGroup" ] + Type string `json:"type,omitempty"` + + // Application deployment target resource uid + UID string `json:"uid,omitempty"` +} + +// Validate validates this v1 app deployment target environment ref +func (m *V1AppDeploymentTargetEnvironmentRef) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1AppDeploymentTargetEnvironmentRef) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1AppDeploymentTargetEnvironmentRef) UnmarshalBinary(b []byte) error { + var res V1AppDeploymentTargetEnvironmentRef + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_app_deployment_virtual_cluster_config_entity.go b/api/models/v1_app_deployment_virtual_cluster_config_entity.go new file mode 100644 index 00000000..49e5da8f --- /dev/null +++ b/api/models/v1_app_deployment_virtual_cluster_config_entity.go @@ -0,0 +1,71 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1AppDeploymentVirtualClusterConfigEntity Application deployment virtual cluster config +// +// swagger:model v1AppDeploymentVirtualClusterConfigEntity +type V1AppDeploymentVirtualClusterConfigEntity struct { + + // target spec + TargetSpec *V1AppDeploymentVirtualClusterTargetSpec `json:"targetSpec,omitempty"` +} + +// Validate validates this v1 app deployment virtual cluster config entity +func (m *V1AppDeploymentVirtualClusterConfigEntity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateTargetSpec(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1AppDeploymentVirtualClusterConfigEntity) validateTargetSpec(formats strfmt.Registry) error { + + if swag.IsZero(m.TargetSpec) { // not required + return nil + } + + if m.TargetSpec != nil { + if err := m.TargetSpec.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("targetSpec") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1AppDeploymentVirtualClusterConfigEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1AppDeploymentVirtualClusterConfigEntity) UnmarshalBinary(b []byte) error { + var res V1AppDeploymentVirtualClusterConfigEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_app_deployment_virtual_cluster_entity.go b/api/models/v1_app_deployment_virtual_cluster_entity.go new file mode 100644 index 00000000..e986c729 --- /dev/null +++ b/api/models/v1_app_deployment_virtual_cluster_entity.go @@ -0,0 +1,96 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1AppDeploymentVirtualClusterEntity Application deployment virtual cluster request payload +// +// swagger:model v1AppDeploymentVirtualClusterEntity +type V1AppDeploymentVirtualClusterEntity struct { + + // metadata + Metadata *V1ObjectMetaInputEntity `json:"metadata,omitempty"` + + // spec + Spec *V1AppDeploymentVirtualClusterSpec `json:"spec,omitempty"` +} + +// Validate validates this v1 app deployment virtual cluster entity +func (m *V1AppDeploymentVirtualClusterEntity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSpec(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1AppDeploymentVirtualClusterEntity) validateMetadata(formats strfmt.Registry) error { + + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } + return err + } + } + + return nil +} + +func (m *V1AppDeploymentVirtualClusterEntity) validateSpec(formats strfmt.Registry) error { + + if swag.IsZero(m.Spec) { // not required + return nil + } + + if m.Spec != nil { + if err := m.Spec.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1AppDeploymentVirtualClusterEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1AppDeploymentVirtualClusterEntity) UnmarshalBinary(b []byte) error { + var res V1AppDeploymentVirtualClusterEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_app_deployment_virtual_cluster_spec.go b/api/models/v1_app_deployment_virtual_cluster_spec.go new file mode 100644 index 00000000..4c4d6489 --- /dev/null +++ b/api/models/v1_app_deployment_virtual_cluster_spec.go @@ -0,0 +1,96 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1AppDeploymentVirtualClusterSpec Application deployment virtual cluster spec +// +// swagger:model v1AppDeploymentVirtualClusterSpec +type V1AppDeploymentVirtualClusterSpec struct { + + // config + Config *V1AppDeploymentVirtualClusterConfigEntity `json:"config,omitempty"` + + // profile + Profile *V1AppDeploymentProfileEntity `json:"profile,omitempty"` +} + +// Validate validates this v1 app deployment virtual cluster spec +func (m *V1AppDeploymentVirtualClusterSpec) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateConfig(formats); err != nil { + res = append(res, err) + } + + if err := m.validateProfile(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1AppDeploymentVirtualClusterSpec) validateConfig(formats strfmt.Registry) error { + + if swag.IsZero(m.Config) { // not required + return nil + } + + if m.Config != nil { + if err := m.Config.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("config") + } + return err + } + } + + return nil +} + +func (m *V1AppDeploymentVirtualClusterSpec) validateProfile(formats strfmt.Registry) error { + + if swag.IsZero(m.Profile) { // not required + return nil + } + + if m.Profile != nil { + if err := m.Profile.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("profile") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1AppDeploymentVirtualClusterSpec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1AppDeploymentVirtualClusterSpec) UnmarshalBinary(b []byte) error { + var res V1AppDeploymentVirtualClusterSpec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_app_deployment_virtual_cluster_target_spec.go b/api/models/v1_app_deployment_virtual_cluster_target_spec.go new file mode 100644 index 00000000..6b1887d4 --- /dev/null +++ b/api/models/v1_app_deployment_virtual_cluster_target_spec.go @@ -0,0 +1,64 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1AppDeploymentVirtualClusterTargetSpec Application deployment virtual cluster target spec +// +// swagger:model v1AppDeploymentVirtualClusterTargetSpec +type V1AppDeploymentVirtualClusterTargetSpec struct { + + // Application deployment virtual cluster uid + // Required: true + ClusterUID *string `json:"clusterUid"` +} + +// Validate validates this v1 app deployment virtual cluster target spec +func (m *V1AppDeploymentVirtualClusterTargetSpec) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateClusterUID(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1AppDeploymentVirtualClusterTargetSpec) validateClusterUID(formats strfmt.Registry) error { + + if err := validate.Required("clusterUid", "body", m.ClusterUID); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1AppDeploymentVirtualClusterTargetSpec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1AppDeploymentVirtualClusterTargetSpec) UnmarshalBinary(b []byte) error { + var res V1AppDeploymentVirtualClusterTargetSpec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_app_deployments_filter_spec.go b/api/models/v1_app_deployments_filter_spec.go new file mode 100644 index 00000000..f02518ae --- /dev/null +++ b/api/models/v1_app_deployments_filter_spec.go @@ -0,0 +1,111 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1AppDeploymentsFilterSpec Application deployment filter summary spec +// +// swagger:model v1AppDeploymentsFilterSpec +type V1AppDeploymentsFilterSpec struct { + + // filter + Filter *V1AppDeploymentFilterSpec `json:"filter,omitempty"` + + // sort + // Unique: true + Sort []*V1AppDeploymentSortSpec `json:"sort"` +} + +// Validate validates this v1 app deployments filter spec +func (m *V1AppDeploymentsFilterSpec) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateFilter(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSort(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1AppDeploymentsFilterSpec) validateFilter(formats strfmt.Registry) error { + + if swag.IsZero(m.Filter) { // not required + return nil + } + + if m.Filter != nil { + if err := m.Filter.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("filter") + } + return err + } + } + + return nil +} + +func (m *V1AppDeploymentsFilterSpec) validateSort(formats strfmt.Registry) error { + + if swag.IsZero(m.Sort) { // not required + return nil + } + + if err := validate.UniqueItems("sort", "body", m.Sort); err != nil { + return err + } + + for i := 0; i < len(m.Sort); i++ { + if swag.IsZero(m.Sort[i]) { // not required + continue + } + + if m.Sort[i] != nil { + if err := m.Sort[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("sort" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1AppDeploymentsFilterSpec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1AppDeploymentsFilterSpec) UnmarshalBinary(b []byte) error { + var res V1AppDeploymentsFilterSpec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_app_deployments_summary.go b/api/models/v1_app_deployments_summary.go new file mode 100644 index 00000000..a29d3625 --- /dev/null +++ b/api/models/v1_app_deployments_summary.go @@ -0,0 +1,111 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1AppDeploymentsSummary v1 app deployments summary +// +// swagger:model v1AppDeploymentsSummary +type V1AppDeploymentsSummary struct { + + // app deployments + // Unique: true + AppDeployments []*V1AppDeploymentSummary `json:"appDeployments"` + + // listmeta + Listmeta *V1ListMetaData `json:"listmeta,omitempty"` +} + +// Validate validates this v1 app deployments summary +func (m *V1AppDeploymentsSummary) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateAppDeployments(formats); err != nil { + res = append(res, err) + } + + if err := m.validateListmeta(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1AppDeploymentsSummary) validateAppDeployments(formats strfmt.Registry) error { + + if swag.IsZero(m.AppDeployments) { // not required + return nil + } + + if err := validate.UniqueItems("appDeployments", "body", m.AppDeployments); err != nil { + return err + } + + for i := 0; i < len(m.AppDeployments); i++ { + if swag.IsZero(m.AppDeployments[i]) { // not required + continue + } + + if m.AppDeployments[i] != nil { + if err := m.AppDeployments[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("appDeployments" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1AppDeploymentsSummary) validateListmeta(formats strfmt.Registry) error { + + if swag.IsZero(m.Listmeta) { // not required + return nil + } + + if m.Listmeta != nil { + if err := m.Listmeta.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("listmeta") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1AppDeploymentsSummary) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1AppDeploymentsSummary) UnmarshalBinary(b []byte) error { + var res V1AppDeploymentsSummary + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_app_profile.go b/api/models/v1_app_profile.go new file mode 100644 index 00000000..eb4b673b --- /dev/null +++ b/api/models/v1_app_profile.go @@ -0,0 +1,286 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1AppProfile Application profile response +// +// swagger:model v1AppProfile +type V1AppProfile struct { + + // metadata + Metadata *V1ObjectMeta `json:"metadata,omitempty"` + + // spec + Spec *V1AppProfileSpec `json:"spec,omitempty"` + + // status + Status *V1AppProfileStatus `json:"status,omitempty"` +} + +// Validate validates this v1 app profile +func (m *V1AppProfile) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSpec(formats); err != nil { + res = append(res, err) + } + + if err := m.validateStatus(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1AppProfile) validateMetadata(formats strfmt.Registry) error { + + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } + return err + } + } + + return nil +} + +func (m *V1AppProfile) validateSpec(formats strfmt.Registry) error { + + if swag.IsZero(m.Spec) { // not required + return nil + } + + if m.Spec != nil { + if err := m.Spec.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec") + } + return err + } + } + + return nil +} + +func (m *V1AppProfile) validateStatus(formats strfmt.Registry) error { + + if swag.IsZero(m.Status) { // not required + return nil + } + + if m.Status != nil { + if err := m.Status.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("status") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1AppProfile) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1AppProfile) UnmarshalBinary(b []byte) error { + var res V1AppProfile + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} + +// V1AppProfileSpec v1 app profile spec +// +// swagger:model V1AppProfileSpec +type V1AppProfileSpec struct { + + // Application profile parent profile uid + ParentUID string `json:"parentUid,omitempty"` + + // template + Template *V1AppProfileTemplate `json:"template,omitempty"` + + // Application profile version + Version string `json:"version,omitempty"` + + // Application profile versions list + Versions []*V1AppProfileVersion `json:"versions"` +} + +// Validate validates this v1 app profile spec +func (m *V1AppProfileSpec) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateTemplate(formats); err != nil { + res = append(res, err) + } + + if err := m.validateVersions(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1AppProfileSpec) validateTemplate(formats strfmt.Registry) error { + + if swag.IsZero(m.Template) { // not required + return nil + } + + if m.Template != nil { + if err := m.Template.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec" + "." + "template") + } + return err + } + } + + return nil +} + +func (m *V1AppProfileSpec) validateVersions(formats strfmt.Registry) error { + + if swag.IsZero(m.Versions) { // not required + return nil + } + + for i := 0; i < len(m.Versions); i++ { + if swag.IsZero(m.Versions[i]) { // not required + continue + } + + if m.Versions[i] != nil { + if err := m.Versions[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec" + "." + "versions" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1AppProfileSpec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1AppProfileSpec) UnmarshalBinary(b []byte) error { + var res V1AppProfileSpec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} + +// V1AppProfileStatus Application profile status +// +// swagger:model V1AppProfileStatus +type V1AppProfileStatus struct { + + // Application profile apps array + InUseApps []*V1ObjectResReference `json:"inUseApps"` +} + +// Validate validates this v1 app profile status +func (m *V1AppProfileStatus) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateInUseApps(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1AppProfileStatus) validateInUseApps(formats strfmt.Registry) error { + + if swag.IsZero(m.InUseApps) { // not required + return nil + } + + for i := 0; i < len(m.InUseApps); i++ { + if swag.IsZero(m.InUseApps[i]) { // not required + continue + } + + if m.InUseApps[i] != nil { + if err := m.InUseApps[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("status" + "." + "inUseApps" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1AppProfileStatus) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1AppProfileStatus) UnmarshalBinary(b []byte) error { + var res V1AppProfileStatus + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_app_profile_clone_entity.go b/api/models/v1_app_profile_clone_entity.go new file mode 100644 index 00000000..f2743066 --- /dev/null +++ b/api/models/v1_app_profile_clone_entity.go @@ -0,0 +1,71 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1AppProfileCloneEntity Application profile clone request payload +// +// swagger:model v1AppProfileCloneEntity +type V1AppProfileCloneEntity struct { + + // metadata + Metadata *V1AppProfileCloneMetaInputEntity `json:"metadata,omitempty"` +} + +// Validate validates this v1 app profile clone entity +func (m *V1AppProfileCloneEntity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1AppProfileCloneEntity) validateMetadata(formats strfmt.Registry) error { + + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1AppProfileCloneEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1AppProfileCloneEntity) UnmarshalBinary(b []byte) error { + var res V1AppProfileCloneEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_app_profile_clone_meta_input_entity.go b/api/models/v1_app_profile_clone_meta_input_entity.go new file mode 100644 index 00000000..d4c082b0 --- /dev/null +++ b/api/models/v1_app_profile_clone_meta_input_entity.go @@ -0,0 +1,92 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1AppProfileCloneMetaInputEntity Application profile clone metadata +// +// swagger:model v1AppProfileCloneMetaInputEntity +type V1AppProfileCloneMetaInputEntity struct { + + // Application profile name + // Required: true + Name *string `json:"name"` + + // target + Target *V1AppProfileCloneTarget `json:"target,omitempty"` + + // Application profile version + Version string `json:"version,omitempty"` +} + +// Validate validates this v1 app profile clone meta input entity +func (m *V1AppProfileCloneMetaInputEntity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateName(formats); err != nil { + res = append(res, err) + } + + if err := m.validateTarget(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1AppProfileCloneMetaInputEntity) validateName(formats strfmt.Registry) error { + + if err := validate.Required("name", "body", m.Name); err != nil { + return err + } + + return nil +} + +func (m *V1AppProfileCloneMetaInputEntity) validateTarget(formats strfmt.Registry) error { + + if swag.IsZero(m.Target) { // not required + return nil + } + + if m.Target != nil { + if err := m.Target.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("target") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1AppProfileCloneMetaInputEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1AppProfileCloneMetaInputEntity) UnmarshalBinary(b []byte) error { + var res V1AppProfileCloneMetaInputEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_app_profile_clone_target.go b/api/models/v1_app_profile_clone_target.go new file mode 100644 index 00000000..47fc753e --- /dev/null +++ b/api/models/v1_app_profile_clone_target.go @@ -0,0 +1,43 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1AppProfileCloneTarget Application profile clone target +// +// swagger:model v1AppProfileCloneTarget +type V1AppProfileCloneTarget struct { + + // Application profile clone target project uid + ProjectUID string `json:"projectUid,omitempty"` +} + +// Validate validates this v1 app profile clone target +func (m *V1AppProfileCloneTarget) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1AppProfileCloneTarget) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1AppProfileCloneTarget) UnmarshalBinary(b []byte) error { + var res V1AppProfileCloneTarget + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_app_profile_entity.go b/api/models/v1_app_profile_entity.go new file mode 100644 index 00000000..fc406f24 --- /dev/null +++ b/api/models/v1_app_profile_entity.go @@ -0,0 +1,158 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1AppProfileEntity Application profile request payload +// +// swagger:model v1AppProfileEntity +type V1AppProfileEntity struct { + + // metadata + Metadata *V1ObjectMetaInputEntity `json:"metadata,omitempty"` + + // spec + Spec *V1AppProfileEntitySpec `json:"spec,omitempty"` +} + +// Validate validates this v1 app profile entity +func (m *V1AppProfileEntity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSpec(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1AppProfileEntity) validateMetadata(formats strfmt.Registry) error { + + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } + return err + } + } + + return nil +} + +func (m *V1AppProfileEntity) validateSpec(formats strfmt.Registry) error { + + if swag.IsZero(m.Spec) { // not required + return nil + } + + if m.Spec != nil { + if err := m.Spec.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1AppProfileEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1AppProfileEntity) UnmarshalBinary(b []byte) error { + var res V1AppProfileEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} + +// V1AppProfileEntitySpec Application profile spec +// +// swagger:model V1AppProfileEntitySpec +type V1AppProfileEntitySpec struct { + + // template + Template *V1AppProfileTemplateEntity `json:"template,omitempty"` + + // Application profile version + Version string `json:"version,omitempty"` +} + +// Validate validates this v1 app profile entity spec +func (m *V1AppProfileEntitySpec) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateTemplate(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1AppProfileEntitySpec) validateTemplate(formats strfmt.Registry) error { + + if swag.IsZero(m.Template) { // not required + return nil + } + + if m.Template != nil { + if err := m.Template.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec" + "." + "template") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1AppProfileEntitySpec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1AppProfileEntitySpec) UnmarshalBinary(b []byte) error { + var res V1AppProfileEntitySpec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_app_profile_filter_spec.go b/api/models/v1_app_profile_filter_spec.go new file mode 100644 index 00000000..e870929c --- /dev/null +++ b/api/models/v1_app_profile_filter_spec.go @@ -0,0 +1,121 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1AppProfileFilterSpec Application profile filter spec +// +// swagger:model v1AppProfileFilterSpec +type V1AppProfileFilterSpec struct { + + // profile name + ProfileName *V1FilterString `json:"profileName,omitempty"` + + // tags + Tags *V1FilterArray `json:"tags,omitempty"` + + // version + Version *V1FilterVersionString `json:"version,omitempty"` +} + +// Validate validates this v1 app profile filter spec +func (m *V1AppProfileFilterSpec) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateProfileName(formats); err != nil { + res = append(res, err) + } + + if err := m.validateTags(formats); err != nil { + res = append(res, err) + } + + if err := m.validateVersion(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1AppProfileFilterSpec) validateProfileName(formats strfmt.Registry) error { + + if swag.IsZero(m.ProfileName) { // not required + return nil + } + + if m.ProfileName != nil { + if err := m.ProfileName.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("profileName") + } + return err + } + } + + return nil +} + +func (m *V1AppProfileFilterSpec) validateTags(formats strfmt.Registry) error { + + if swag.IsZero(m.Tags) { // not required + return nil + } + + if m.Tags != nil { + if err := m.Tags.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("tags") + } + return err + } + } + + return nil +} + +func (m *V1AppProfileFilterSpec) validateVersion(formats strfmt.Registry) error { + + if swag.IsZero(m.Version) { // not required + return nil + } + + if m.Version != nil { + if err := m.Version.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("version") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1AppProfileFilterSpec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1AppProfileFilterSpec) UnmarshalBinary(b []byte) error { + var res V1AppProfileFilterSpec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_app_profile_meta_entity.go b/api/models/v1_app_profile_meta_entity.go new file mode 100644 index 00000000..0b8d16ac --- /dev/null +++ b/api/models/v1_app_profile_meta_entity.go @@ -0,0 +1,76 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1AppProfileMetaEntity Application profile metadata request payload +// +// swagger:model v1AppProfileMetaEntity +type V1AppProfileMetaEntity struct { + + // metadata + // Required: true + Metadata *V1AppProfileMetaUpdateEntity `json:"metadata"` + + // Application profile version + Version string `json:"version,omitempty"` +} + +// Validate validates this v1 app profile meta entity +func (m *V1AppProfileMetaEntity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1AppProfileMetaEntity) validateMetadata(formats strfmt.Registry) error { + + if err := validate.Required("metadata", "body", m.Metadata); err != nil { + return err + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1AppProfileMetaEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1AppProfileMetaEntity) UnmarshalBinary(b []byte) error { + var res V1AppProfileMetaEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_app_profile_meta_update_entity.go b/api/models/v1_app_profile_meta_update_entity.go new file mode 100644 index 00000000..4b29d2a7 --- /dev/null +++ b/api/models/v1_app_profile_meta_update_entity.go @@ -0,0 +1,46 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1AppProfileMetaUpdateEntity Application profile metadata update request payload +// +// swagger:model v1AppProfileMetaUpdateEntity +type V1AppProfileMetaUpdateEntity struct { + + // Application profile annotations + Annotations map[string]string `json:"annotations,omitempty"` + + // Application profile labels + Labels map[string]string `json:"labels,omitempty"` +} + +// Validate validates this v1 app profile meta update entity +func (m *V1AppProfileMetaUpdateEntity) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1AppProfileMetaUpdateEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1AppProfileMetaUpdateEntity) UnmarshalBinary(b []byte) error { + var res V1AppProfileMetaUpdateEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_app_profile_metadata.go b/api/models/v1_app_profile_metadata.go new file mode 100644 index 00000000..314132e3 --- /dev/null +++ b/api/models/v1_app_profile_metadata.go @@ -0,0 +1,128 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1AppProfileMetadata Application profile metadata summary +// +// swagger:model v1AppProfileMetadata +type V1AppProfileMetadata struct { + + // metadata + Metadata *V1ObjectEntity `json:"metadata,omitempty"` + + // spec + Spec *V1AppProfileMetadataSpec `json:"spec,omitempty"` +} + +// Validate validates this v1 app profile metadata +func (m *V1AppProfileMetadata) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSpec(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1AppProfileMetadata) validateMetadata(formats strfmt.Registry) error { + + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } + return err + } + } + + return nil +} + +func (m *V1AppProfileMetadata) validateSpec(formats strfmt.Registry) error { + + if swag.IsZero(m.Spec) { // not required + return nil + } + + if m.Spec != nil { + if err := m.Spec.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1AppProfileMetadata) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1AppProfileMetadata) UnmarshalBinary(b []byte) error { + var res V1AppProfileMetadata + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} + +// V1AppProfileMetadataSpec v1 app profile metadata spec +// +// swagger:model V1AppProfileMetadataSpec +type V1AppProfileMetadataSpec struct { + + // version + Version string `json:"version,omitempty"` +} + +// Validate validates this v1 app profile metadata spec +func (m *V1AppProfileMetadataSpec) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1AppProfileMetadataSpec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1AppProfileMetadataSpec) UnmarshalBinary(b []byte) error { + var res V1AppProfileMetadataSpec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_app_profile_sort_fields.go b/api/models/v1_app_profile_sort_fields.go new file mode 100644 index 00000000..86e4b574 --- /dev/null +++ b/api/models/v1_app_profile_sort_fields.go @@ -0,0 +1,66 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "encoding/json" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" +) + +// V1AppProfileSortFields v1 app profile sort fields +// +// swagger:model v1AppProfileSortFields +type V1AppProfileSortFields string + +const ( + + // V1AppProfileSortFieldsProfileName captures enum value "profileName" + V1AppProfileSortFieldsProfileName V1AppProfileSortFields = "profileName" + + // V1AppProfileSortFieldsCreationTimestamp captures enum value "creationTimestamp" + V1AppProfileSortFieldsCreationTimestamp V1AppProfileSortFields = "creationTimestamp" + + // V1AppProfileSortFieldsLastModifiedTimestamp captures enum value "lastModifiedTimestamp" + V1AppProfileSortFieldsLastModifiedTimestamp V1AppProfileSortFields = "lastModifiedTimestamp" +) + +// for schema +var v1AppProfileSortFieldsEnum []interface{} + +func init() { + var res []V1AppProfileSortFields + if err := json.Unmarshal([]byte(`["profileName","creationTimestamp","lastModifiedTimestamp"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + v1AppProfileSortFieldsEnum = append(v1AppProfileSortFieldsEnum, v) + } +} + +func (m V1AppProfileSortFields) validateV1AppProfileSortFieldsEnum(path, location string, value V1AppProfileSortFields) error { + if err := validate.EnumCase(path, location, value, v1AppProfileSortFieldsEnum, true); err != nil { + return err + } + return nil +} + +// Validate validates this v1 app profile sort fields +func (m V1AppProfileSortFields) Validate(formats strfmt.Registry) error { + var res []error + + // value enum + if err := m.validateV1AppProfileSortFieldsEnum("", "body", m); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/models/v1_app_profile_sort_spec.go b/api/models/v1_app_profile_sort_spec.go new file mode 100644 index 00000000..060214a4 --- /dev/null +++ b/api/models/v1_app_profile_sort_spec.go @@ -0,0 +1,94 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1AppProfileSortSpec v1 app profile sort spec +// +// swagger:model v1AppProfileSortSpec +type V1AppProfileSortSpec struct { + + // field + Field *V1AppProfileSortFields `json:"field,omitempty"` + + // order + Order V1SortOrder `json:"order,omitempty"` +} + +// Validate validates this v1 app profile sort spec +func (m *V1AppProfileSortSpec) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateField(formats); err != nil { + res = append(res, err) + } + + if err := m.validateOrder(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1AppProfileSortSpec) validateField(formats strfmt.Registry) error { + + if swag.IsZero(m.Field) { // not required + return nil + } + + if m.Field != nil { + if err := m.Field.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("field") + } + return err + } + } + + return nil +} + +func (m *V1AppProfileSortSpec) validateOrder(formats strfmt.Registry) error { + + if swag.IsZero(m.Order) { // not required + return nil + } + + if err := m.Order.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("order") + } + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1AppProfileSortSpec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1AppProfileSortSpec) UnmarshalBinary(b []byte) error { + var res V1AppProfileSortSpec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_app_profile_summary.go b/api/models/v1_app_profile_summary.go new file mode 100644 index 00000000..e1b0aa77 --- /dev/null +++ b/api/models/v1_app_profile_summary.go @@ -0,0 +1,195 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1AppProfileSummary Application profile summary +// +// swagger:model v1AppProfileSummary +type V1AppProfileSummary struct { + + // metadata + Metadata *V1ObjectMeta `json:"metadata,omitempty"` + + // spec + Spec *V1AppProfileSummarySpec `json:"spec,omitempty"` +} + +// Validate validates this v1 app profile summary +func (m *V1AppProfileSummary) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSpec(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1AppProfileSummary) validateMetadata(formats strfmt.Registry) error { + + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } + return err + } + } + + return nil +} + +func (m *V1AppProfileSummary) validateSpec(formats strfmt.Registry) error { + + if swag.IsZero(m.Spec) { // not required + return nil + } + + if m.Spec != nil { + if err := m.Spec.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1AppProfileSummary) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1AppProfileSummary) UnmarshalBinary(b []byte) error { + var res V1AppProfileSummary + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} + +// V1AppProfileSummarySpec Application profile spec summary +// +// swagger:model V1AppProfileSummarySpec +type V1AppProfileSummarySpec struct { + + // parent Uid + ParentUID string `json:"parentUid,omitempty"` + + // template + Template *V1AppProfileTemplateSummary `json:"template,omitempty"` + + // version + Version string `json:"version,omitempty"` + + // Application profile's list of all the versions + Versions []*V1AppProfileVersion `json:"versions"` +} + +// Validate validates this v1 app profile summary spec +func (m *V1AppProfileSummarySpec) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateTemplate(formats); err != nil { + res = append(res, err) + } + + if err := m.validateVersions(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1AppProfileSummarySpec) validateTemplate(formats strfmt.Registry) error { + + if swag.IsZero(m.Template) { // not required + return nil + } + + if m.Template != nil { + if err := m.Template.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec" + "." + "template") + } + return err + } + } + + return nil +} + +func (m *V1AppProfileSummarySpec) validateVersions(formats strfmt.Registry) error { + + if swag.IsZero(m.Versions) { // not required + return nil + } + + for i := 0; i < len(m.Versions); i++ { + if swag.IsZero(m.Versions[i]) { // not required + continue + } + + if m.Versions[i] != nil { + if err := m.Versions[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec" + "." + "versions" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1AppProfileSummarySpec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1AppProfileSummarySpec) UnmarshalBinary(b []byte) error { + var res V1AppProfileSummarySpec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_app_profile_template.go b/api/models/v1_app_profile_template.go new file mode 100644 index 00000000..a79af0ca --- /dev/null +++ b/api/models/v1_app_profile_template.go @@ -0,0 +1,118 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1AppProfileTemplate Application profile template information +// +// swagger:model v1AppProfileTemplate +type V1AppProfileTemplate struct { + + // Application profile tiers + // Unique: true + AppTiers []*V1AppTierRef `json:"appTiers"` + + // Application profile registries reference + RegistryRefs []*V1ObjectReference `json:"registryRefs"` +} + +// Validate validates this v1 app profile template +func (m *V1AppProfileTemplate) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateAppTiers(formats); err != nil { + res = append(res, err) + } + + if err := m.validateRegistryRefs(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1AppProfileTemplate) validateAppTiers(formats strfmt.Registry) error { + + if swag.IsZero(m.AppTiers) { // not required + return nil + } + + if err := validate.UniqueItems("appTiers", "body", m.AppTiers); err != nil { + return err + } + + for i := 0; i < len(m.AppTiers); i++ { + if swag.IsZero(m.AppTiers[i]) { // not required + continue + } + + if m.AppTiers[i] != nil { + if err := m.AppTiers[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("appTiers" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1AppProfileTemplate) validateRegistryRefs(formats strfmt.Registry) error { + + if swag.IsZero(m.RegistryRefs) { // not required + return nil + } + + for i := 0; i < len(m.RegistryRefs); i++ { + if swag.IsZero(m.RegistryRefs[i]) { // not required + continue + } + + if m.RegistryRefs[i] != nil { + if err := m.RegistryRefs[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("registryRefs" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1AppProfileTemplate) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1AppProfileTemplate) UnmarshalBinary(b []byte) error { + var res V1AppProfileTemplate + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_app_profile_template_entity.go b/api/models/v1_app_profile_template_entity.go new file mode 100644 index 00000000..7109fd8c --- /dev/null +++ b/api/models/v1_app_profile_template_entity.go @@ -0,0 +1,86 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1AppProfileTemplateEntity Application profile template spec +// +// swagger:model v1AppProfileTemplateEntity +type V1AppProfileTemplateEntity struct { + + // Application profile tiers + // Unique: true + AppTiers []*V1AppTierEntity `json:"appTiers"` +} + +// Validate validates this v1 app profile template entity +func (m *V1AppProfileTemplateEntity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateAppTiers(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1AppProfileTemplateEntity) validateAppTiers(formats strfmt.Registry) error { + + if swag.IsZero(m.AppTiers) { // not required + return nil + } + + if err := validate.UniqueItems("appTiers", "body", m.AppTiers); err != nil { + return err + } + + for i := 0; i < len(m.AppTiers); i++ { + if swag.IsZero(m.AppTiers[i]) { // not required + continue + } + + if m.AppTiers[i] != nil { + if err := m.AppTiers[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("appTiers" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1AppProfileTemplateEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1AppProfileTemplateEntity) UnmarshalBinary(b []byte) error { + var res V1AppProfileTemplateEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_app_profile_template_spec.go b/api/models/v1_app_profile_template_spec.go new file mode 100644 index 00000000..860217a1 --- /dev/null +++ b/api/models/v1_app_profile_template_spec.go @@ -0,0 +1,118 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1AppProfileTemplateSpec Application profile template specs +// +// swagger:model v1AppProfileTemplateSpec +type V1AppProfileTemplateSpec struct { + + // Application profile tiers + // Unique: true + AppTiers []*V1AppTier `json:"appTiers"` + + // Application profile registries reference + RegistryRefs []*V1ObjectReference `json:"registryRefs"` +} + +// Validate validates this v1 app profile template spec +func (m *V1AppProfileTemplateSpec) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateAppTiers(formats); err != nil { + res = append(res, err) + } + + if err := m.validateRegistryRefs(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1AppProfileTemplateSpec) validateAppTiers(formats strfmt.Registry) error { + + if swag.IsZero(m.AppTiers) { // not required + return nil + } + + if err := validate.UniqueItems("appTiers", "body", m.AppTiers); err != nil { + return err + } + + for i := 0; i < len(m.AppTiers); i++ { + if swag.IsZero(m.AppTiers[i]) { // not required + continue + } + + if m.AppTiers[i] != nil { + if err := m.AppTiers[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("appTiers" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1AppProfileTemplateSpec) validateRegistryRefs(formats strfmt.Registry) error { + + if swag.IsZero(m.RegistryRefs) { // not required + return nil + } + + for i := 0; i < len(m.RegistryRefs); i++ { + if swag.IsZero(m.RegistryRefs[i]) { // not required + continue + } + + if m.RegistryRefs[i] != nil { + if err := m.RegistryRefs[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("registryRefs" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1AppProfileTemplateSpec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1AppProfileTemplateSpec) UnmarshalBinary(b []byte) error { + var res V1AppProfileTemplateSpec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_app_profile_template_summary.go b/api/models/v1_app_profile_template_summary.go new file mode 100644 index 00000000..dee7af2b --- /dev/null +++ b/api/models/v1_app_profile_template_summary.go @@ -0,0 +1,80 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1AppProfileTemplateSummary Application profile template summary +// +// swagger:model v1AppProfileTemplateSummary +type V1AppProfileTemplateSummary struct { + + // app tiers + AppTiers []*V1AppTierSummary `json:"appTiers"` +} + +// Validate validates this v1 app profile template summary +func (m *V1AppProfileTemplateSummary) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateAppTiers(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1AppProfileTemplateSummary) validateAppTiers(formats strfmt.Registry) error { + + if swag.IsZero(m.AppTiers) { // not required + return nil + } + + for i := 0; i < len(m.AppTiers); i++ { + if swag.IsZero(m.AppTiers[i]) { // not required + continue + } + + if m.AppTiers[i] != nil { + if err := m.AppTiers[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("appTiers" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1AppProfileTemplateSummary) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1AppProfileTemplateSummary) UnmarshalBinary(b []byte) error { + var res V1AppProfileTemplateSummary + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_app_profile_tiers.go b/api/models/v1_app_profile_tiers.go new file mode 100644 index 00000000..0961e5ab --- /dev/null +++ b/api/models/v1_app_profile_tiers.go @@ -0,0 +1,96 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1AppProfileTiers Application profile tiers information +// +// swagger:model v1AppProfileTiers +type V1AppProfileTiers struct { + + // metadata + Metadata *V1ObjectMeta `json:"metadata,omitempty"` + + // spec + Spec *V1AppProfileTiersSpec `json:"spec,omitempty"` +} + +// Validate validates this v1 app profile tiers +func (m *V1AppProfileTiers) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSpec(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1AppProfileTiers) validateMetadata(formats strfmt.Registry) error { + + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } + return err + } + } + + return nil +} + +func (m *V1AppProfileTiers) validateSpec(formats strfmt.Registry) error { + + if swag.IsZero(m.Spec) { // not required + return nil + } + + if m.Spec != nil { + if err := m.Spec.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1AppProfileTiers) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1AppProfileTiers) UnmarshalBinary(b []byte) error { + var res V1AppProfileTiers + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_app_profile_tiers_spec.go b/api/models/v1_app_profile_tiers_spec.go new file mode 100644 index 00000000..08abdfb6 --- /dev/null +++ b/api/models/v1_app_profile_tiers_spec.go @@ -0,0 +1,86 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1AppProfileTiersSpec Application profile tiers information +// +// swagger:model v1AppProfileTiersSpec +type V1AppProfileTiersSpec struct { + + // Application profile tiers + // Unique: true + AppTiers []*V1AppTier `json:"appTiers"` +} + +// Validate validates this v1 app profile tiers spec +func (m *V1AppProfileTiersSpec) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateAppTiers(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1AppProfileTiersSpec) validateAppTiers(formats strfmt.Registry) error { + + if swag.IsZero(m.AppTiers) { // not required + return nil + } + + if err := validate.UniqueItems("appTiers", "body", m.AppTiers); err != nil { + return err + } + + for i := 0; i < len(m.AppTiers); i++ { + if swag.IsZero(m.AppTiers[i]) { // not required + continue + } + + if m.AppTiers[i] != nil { + if err := m.AppTiers[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("appTiers" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1AppProfileTiersSpec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1AppProfileTiersSpec) UnmarshalBinary(b []byte) error { + var res V1AppProfileTiersSpec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_app_profile_version.go b/api/models/v1_app_profile_version.go new file mode 100644 index 00000000..df19524f --- /dev/null +++ b/api/models/v1_app_profile_version.go @@ -0,0 +1,46 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1AppProfileVersion Application profile version +// +// swagger:model v1AppProfileVersion +type V1AppProfileVersion struct { + + // uid + UID string `json:"uid,omitempty"` + + // version + Version string `json:"version,omitempty"` +} + +// Validate validates this v1 app profile version +func (m *V1AppProfileVersion) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1AppProfileVersion) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1AppProfileVersion) UnmarshalBinary(b []byte) error { + var res V1AppProfileVersion + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_app_profiles_filter_spec.go b/api/models/v1_app_profiles_filter_spec.go new file mode 100644 index 00000000..f7fc6399 --- /dev/null +++ b/api/models/v1_app_profiles_filter_spec.go @@ -0,0 +1,111 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1AppProfilesFilterSpec Application profile filter summary spec +// +// swagger:model v1AppProfilesFilterSpec +type V1AppProfilesFilterSpec struct { + + // filter + Filter *V1AppProfileFilterSpec `json:"filter,omitempty"` + + // sort + // Unique: true + Sort []*V1AppProfileSortSpec `json:"sort"` +} + +// Validate validates this v1 app profiles filter spec +func (m *V1AppProfilesFilterSpec) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateFilter(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSort(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1AppProfilesFilterSpec) validateFilter(formats strfmt.Registry) error { + + if swag.IsZero(m.Filter) { // not required + return nil + } + + if m.Filter != nil { + if err := m.Filter.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("filter") + } + return err + } + } + + return nil +} + +func (m *V1AppProfilesFilterSpec) validateSort(formats strfmt.Registry) error { + + if swag.IsZero(m.Sort) { // not required + return nil + } + + if err := validate.UniqueItems("sort", "body", m.Sort); err != nil { + return err + } + + for i := 0; i < len(m.Sort); i++ { + if swag.IsZero(m.Sort[i]) { // not required + continue + } + + if m.Sort[i] != nil { + if err := m.Sort[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("sort" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1AppProfilesFilterSpec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1AppProfilesFilterSpec) UnmarshalBinary(b []byte) error { + var res V1AppProfilesFilterSpec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_app_profiles_metadata.go b/api/models/v1_app_profiles_metadata.go new file mode 100644 index 00000000..6ea74c6c --- /dev/null +++ b/api/models/v1_app_profiles_metadata.go @@ -0,0 +1,86 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1AppProfilesMetadata v1 app profiles metadata +// +// swagger:model v1AppProfilesMetadata +type V1AppProfilesMetadata struct { + + // app profiles + // Unique: true + AppProfiles []*V1AppProfileMetadata `json:"appProfiles"` +} + +// Validate validates this v1 app profiles metadata +func (m *V1AppProfilesMetadata) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateAppProfiles(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1AppProfilesMetadata) validateAppProfiles(formats strfmt.Registry) error { + + if swag.IsZero(m.AppProfiles) { // not required + return nil + } + + if err := validate.UniqueItems("appProfiles", "body", m.AppProfiles); err != nil { + return err + } + + for i := 0; i < len(m.AppProfiles); i++ { + if swag.IsZero(m.AppProfiles[i]) { // not required + continue + } + + if m.AppProfiles[i] != nil { + if err := m.AppProfiles[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("appProfiles" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1AppProfilesMetadata) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1AppProfilesMetadata) UnmarshalBinary(b []byte) error { + var res V1AppProfilesMetadata + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_app_profiles_summary.go b/api/models/v1_app_profiles_summary.go new file mode 100644 index 00000000..b71cd86c --- /dev/null +++ b/api/models/v1_app_profiles_summary.go @@ -0,0 +1,111 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1AppProfilesSummary v1 app profiles summary +// +// swagger:model v1AppProfilesSummary +type V1AppProfilesSummary struct { + + // app profiles + // Unique: true + AppProfiles []*V1AppProfileSummary `json:"appProfiles"` + + // listmeta + Listmeta *V1ListMetaData `json:"listmeta,omitempty"` +} + +// Validate validates this v1 app profiles summary +func (m *V1AppProfilesSummary) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateAppProfiles(formats); err != nil { + res = append(res, err) + } + + if err := m.validateListmeta(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1AppProfilesSummary) validateAppProfiles(formats strfmt.Registry) error { + + if swag.IsZero(m.AppProfiles) { // not required + return nil + } + + if err := validate.UniqueItems("appProfiles", "body", m.AppProfiles); err != nil { + return err + } + + for i := 0; i < len(m.AppProfiles); i++ { + if swag.IsZero(m.AppProfiles[i]) { // not required + continue + } + + if m.AppProfiles[i] != nil { + if err := m.AppProfiles[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("appProfiles" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1AppProfilesSummary) validateListmeta(formats strfmt.Registry) error { + + if swag.IsZero(m.Listmeta) { // not required + return nil + } + + if m.Listmeta != nil { + if err := m.Listmeta.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("listmeta") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1AppProfilesSummary) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1AppProfilesSummary) UnmarshalBinary(b []byte) error { + var res V1AppProfilesSummary + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_app_tier.go b/api/models/v1_app_tier.go new file mode 100644 index 00000000..c23a1eba --- /dev/null +++ b/api/models/v1_app_tier.go @@ -0,0 +1,96 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1AppTier v1 app tier +// +// swagger:model v1AppTier +type V1AppTier struct { + + // metadata + Metadata *V1ObjectMeta `json:"metadata,omitempty"` + + // spec + Spec *V1AppTierSpec `json:"spec,omitempty"` +} + +// Validate validates this v1 app tier +func (m *V1AppTier) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSpec(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1AppTier) validateMetadata(formats strfmt.Registry) error { + + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } + return err + } + } + + return nil +} + +func (m *V1AppTier) validateSpec(formats strfmt.Registry) error { + + if swag.IsZero(m.Spec) { // not required + return nil + } + + if m.Spec != nil { + if err := m.Spec.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1AppTier) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1AppTier) UnmarshalBinary(b []byte) error { + var res V1AppTier + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_app_tier_entity.go b/api/models/v1_app_tier_entity.go new file mode 100644 index 00000000..0690d501 --- /dev/null +++ b/api/models/v1_app_tier_entity.go @@ -0,0 +1,171 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1AppTierEntity Application tier request payload +// +// swagger:model v1AppTierEntity +type V1AppTierEntity struct { + + // Application tier container registry uid + ContainerRegistryUID string `json:"containerRegistryUid,omitempty"` + + // Application tier installation order + InstallOrder int32 `json:"installOrder,omitempty"` + + // Application tier manifests + Manifests []*V1ManifestInputEntity `json:"manifests"` + + // Application tier name + // Required: true + Name *string `json:"name"` + + // Application tier properties + Properties []*V1AppTierPropertyEntity `json:"properties"` + + // Application tier registry uid + RegistryUID string `json:"registryUid,omitempty"` + + // Application tier source pack uid + SourceAppTierUID string `json:"sourceAppTierUid,omitempty"` + + // type + Type V1AppTierType `json:"type,omitempty"` + + // Application tier configuration values in yaml format + Values string `json:"values,omitempty"` + + // Application tier version + Version string `json:"version,omitempty"` +} + +// Validate validates this v1 app tier entity +func (m *V1AppTierEntity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateManifests(formats); err != nil { + res = append(res, err) + } + + if err := m.validateName(formats); err != nil { + res = append(res, err) + } + + if err := m.validateProperties(formats); err != nil { + res = append(res, err) + } + + if err := m.validateType(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1AppTierEntity) validateManifests(formats strfmt.Registry) error { + + if swag.IsZero(m.Manifests) { // not required + return nil + } + + for i := 0; i < len(m.Manifests); i++ { + if swag.IsZero(m.Manifests[i]) { // not required + continue + } + + if m.Manifests[i] != nil { + if err := m.Manifests[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("manifests" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1AppTierEntity) validateName(formats strfmt.Registry) error { + + if err := validate.Required("name", "body", m.Name); err != nil { + return err + } + + return nil +} + +func (m *V1AppTierEntity) validateProperties(formats strfmt.Registry) error { + + if swag.IsZero(m.Properties) { // not required + return nil + } + + for i := 0; i < len(m.Properties); i++ { + if swag.IsZero(m.Properties[i]) { // not required + continue + } + + if m.Properties[i] != nil { + if err := m.Properties[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("properties" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1AppTierEntity) validateType(formats strfmt.Registry) error { + + if swag.IsZero(m.Type) { // not required + return nil + } + + if err := m.Type.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("type") + } + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1AppTierEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1AppTierEntity) UnmarshalBinary(b []byte) error { + var res V1AppTierEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_app_tier_manifests.go b/api/models/v1_app_tier_manifests.go new file mode 100644 index 00000000..dfcf8edf --- /dev/null +++ b/api/models/v1_app_tier_manifests.go @@ -0,0 +1,80 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1AppTierManifests Application tier manifests data +// +// swagger:model v1AppTierManifests +type V1AppTierManifests struct { + + // Application tier manifests array + Manifests []*V1Manifest `json:"manifests"` +} + +// Validate validates this v1 app tier manifests +func (m *V1AppTierManifests) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateManifests(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1AppTierManifests) validateManifests(formats strfmt.Registry) error { + + if swag.IsZero(m.Manifests) { // not required + return nil + } + + for i := 0; i < len(m.Manifests); i++ { + if swag.IsZero(m.Manifests[i]) { // not required + continue + } + + if m.Manifests[i] != nil { + if err := m.Manifests[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("manifests" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1AppTierManifests) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1AppTierManifests) UnmarshalBinary(b []byte) error { + var res V1AppTierManifests + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_app_tier_patch_entity.go b/api/models/v1_app_tier_patch_entity.go new file mode 100644 index 00000000..586aa51f --- /dev/null +++ b/api/models/v1_app_tier_patch_entity.go @@ -0,0 +1,74 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1AppTierPatchEntity Application tier patch request payload +// +// swagger:model v1AppTierPatchEntity +type V1AppTierPatchEntity struct { + + // app tier + AppTier *V1AppTierEntity `json:"appTier,omitempty"` + + // Application tier UID to be replaced with new tier + ReplaceWithAppTier string `json:"replaceWithAppTier,omitempty"` +} + +// Validate validates this v1 app tier patch entity +func (m *V1AppTierPatchEntity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateAppTier(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1AppTierPatchEntity) validateAppTier(formats strfmt.Registry) error { + + if swag.IsZero(m.AppTier) { // not required + return nil + } + + if m.AppTier != nil { + if err := m.AppTier.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("appTier") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1AppTierPatchEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1AppTierPatchEntity) UnmarshalBinary(b []byte) error { + var res V1AppTierPatchEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_app_tier_property.go b/api/models/v1_app_tier_property.go new file mode 100644 index 00000000..56acb8db --- /dev/null +++ b/api/models/v1_app_tier_property.go @@ -0,0 +1,52 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1AppTierProperty Application tier property object +// +// swagger:model v1AppTierProperty +type V1AppTierProperty struct { + + // Application tier property format + Format string `json:"format,omitempty"` + + // Application tier property name + Name string `json:"name,omitempty"` + + // Application tier property data type + Type string `json:"type,omitempty"` + + // Application tier property value + Value string `json:"value,omitempty"` +} + +// Validate validates this v1 app tier property +func (m *V1AppTierProperty) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1AppTierProperty) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1AppTierProperty) UnmarshalBinary(b []byte) error { + var res V1AppTierProperty + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_app_tier_property_entity.go b/api/models/v1_app_tier_property_entity.go new file mode 100644 index 00000000..ffa5cd27 --- /dev/null +++ b/api/models/v1_app_tier_property_entity.go @@ -0,0 +1,46 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1AppTierPropertyEntity Application tier property object +// +// swagger:model v1AppTierPropertyEntity +type V1AppTierPropertyEntity struct { + + // Application tier property name + Name string `json:"name,omitempty"` + + // Application tier property value + Value string `json:"value,omitempty"` +} + +// Validate validates this v1 app tier property entity +func (m *V1AppTierPropertyEntity) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1AppTierPropertyEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1AppTierPropertyEntity) UnmarshalBinary(b []byte) error { + var res V1AppTierPropertyEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_app_tier_ref.go b/api/models/v1_app_tier_ref.go new file mode 100644 index 00000000..848a5be1 --- /dev/null +++ b/api/models/v1_app_tier_ref.go @@ -0,0 +1,78 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1AppTierRef Application tier reference +// +// swagger:model v1AppTierRef +type V1AppTierRef struct { + + // Application tier name + Name string `json:"name,omitempty"` + + // type + Type V1AppTierType `json:"type,omitempty"` + + // Application tier uid to uniquely identify the tier + UID string `json:"uid,omitempty"` + + // Application tier version + Version string `json:"version,omitempty"` +} + +// Validate validates this v1 app tier ref +func (m *V1AppTierRef) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateType(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1AppTierRef) validateType(formats strfmt.Registry) error { + + if swag.IsZero(m.Type) { // not required + return nil + } + + if err := m.Type.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("type") + } + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1AppTierRef) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1AppTierRef) UnmarshalBinary(b []byte) error { + var res V1AppTierRef + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_app_tier_resolved_values.go b/api/models/v1_app_tier_resolved_values.go new file mode 100644 index 00000000..c04c78eb --- /dev/null +++ b/api/models/v1_app_tier_resolved_values.go @@ -0,0 +1,43 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1AppTierResolvedValues Application tier resolved macro values +// +// swagger:model v1AppTierResolvedValues +type V1AppTierResolvedValues struct { + + // Application tier resolved macro values map + Resolved map[string]string `json:"resolved,omitempty"` +} + +// Validate validates this v1 app tier resolved values +func (m *V1AppTierResolvedValues) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1AppTierResolvedValues) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1AppTierResolvedValues) UnmarshalBinary(b []byte) error { + var res V1AppTierResolvedValues + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_app_tier_source_summary.go b/api/models/v1_app_tier_source_summary.go new file mode 100644 index 00000000..0da73f22 --- /dev/null +++ b/api/models/v1_app_tier_source_summary.go @@ -0,0 +1,58 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1AppTierSourceSummary Application profile's tier source information +// +// swagger:model v1AppTierSourceSummary +type V1AppTierSourceSummary struct { + + // addon sub type + AddonSubType string `json:"addonSubType,omitempty"` + + // addon type + AddonType string `json:"addonType,omitempty"` + + // logo Url + LogoURL string `json:"logoUrl,omitempty"` + + // name + Name string `json:"name,omitempty"` + + // type + Type string `json:"type,omitempty"` + + // uid + UID string `json:"uid,omitempty"` +} + +// Validate validates this v1 app tier source summary +func (m *V1AppTierSourceSummary) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1AppTierSourceSummary) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1AppTierSourceSummary) UnmarshalBinary(b []byte) error { + var res V1AppTierSourceSummary + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_app_tier_spec.go b/api/models/v1_app_tier_spec.go new file mode 100644 index 00000000..725e6714 --- /dev/null +++ b/api/models/v1_app_tier_spec.go @@ -0,0 +1,153 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1AppTierSpec Application tier specs +// +// swagger:model v1AppTierSpec +type V1AppTierSpec struct { + + // Application tier container registry uid + ContainerRegistryUID string `json:"containerRegistryUid,omitempty"` + + // Application tier installation order + InstallOrder int32 `json:"installOrder,omitempty"` + + // Application tier attached manifest content in yaml format + Manifests []*V1ObjectReference `json:"manifests"` + + // Application tier properties + Properties []*V1AppTierProperty `json:"properties"` + + // Registry uid + RegistryUID string `json:"registryUid,omitempty"` + + // Application tier source pack uid + SourceAppTierUID string `json:"sourceAppTierUid,omitempty"` + + // Application tier type + Type V1AppTierType `json:"type,omitempty"` + + // Application tier configuration values in yaml format + Values string `json:"values,omitempty"` + + // Application tier version + Version string `json:"version,omitempty"` +} + +// Validate validates this v1 app tier spec +func (m *V1AppTierSpec) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateManifests(formats); err != nil { + res = append(res, err) + } + + if err := m.validateProperties(formats); err != nil { + res = append(res, err) + } + + if err := m.validateType(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1AppTierSpec) validateManifests(formats strfmt.Registry) error { + + if swag.IsZero(m.Manifests) { // not required + return nil + } + + for i := 0; i < len(m.Manifests); i++ { + if swag.IsZero(m.Manifests[i]) { // not required + continue + } + + if m.Manifests[i] != nil { + if err := m.Manifests[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("manifests" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1AppTierSpec) validateProperties(formats strfmt.Registry) error { + + if swag.IsZero(m.Properties) { // not required + return nil + } + + for i := 0; i < len(m.Properties); i++ { + if swag.IsZero(m.Properties[i]) { // not required + continue + } + + if m.Properties[i] != nil { + if err := m.Properties[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("properties" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1AppTierSpec) validateType(formats strfmt.Registry) error { + + if swag.IsZero(m.Type) { // not required + return nil + } + + if err := m.Type.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("type") + } + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1AppTierSpec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1AppTierSpec) UnmarshalBinary(b []byte) error { + var res V1AppTierSpec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_app_tier_summary.go b/api/models/v1_app_tier_summary.go new file mode 100644 index 00000000..d7a79f3f --- /dev/null +++ b/api/models/v1_app_tier_summary.go @@ -0,0 +1,83 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1AppTierSummary Application profile's tier summary +// +// swagger:model v1AppTierSummary +type V1AppTierSummary struct { + + // name + Name string `json:"name,omitempty"` + + // source + Source *V1AppTierSourceSummary `json:"source,omitempty"` + + // type + Type string `json:"type,omitempty"` + + // uid + UID string `json:"uid,omitempty"` + + // version + Version string `json:"version,omitempty"` +} + +// Validate validates this v1 app tier summary +func (m *V1AppTierSummary) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateSource(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1AppTierSummary) validateSource(formats strfmt.Registry) error { + + if swag.IsZero(m.Source) { // not required + return nil + } + + if m.Source != nil { + if err := m.Source.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("source") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1AppTierSummary) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1AppTierSummary) UnmarshalBinary(b []byte) error { + var res V1AppTierSummary + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_app_tier_type.go b/api/models/v1_app_tier_type.go new file mode 100644 index 00000000..5f96d031 --- /dev/null +++ b/api/models/v1_app_tier_type.go @@ -0,0 +1,69 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "encoding/json" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" +) + +// V1AppTierType v1 app tier type +// +// swagger:model v1AppTierType +type V1AppTierType string + +const ( + + // V1AppTierTypeManifest captures enum value "manifest" + V1AppTierTypeManifest V1AppTierType = "manifest" + + // V1AppTierTypeHelm captures enum value "helm" + V1AppTierTypeHelm V1AppTierType = "helm" + + // V1AppTierTypeOperatorInstance captures enum value "operator-instance" + V1AppTierTypeOperatorInstance V1AppTierType = "operator-instance" + + // V1AppTierTypeContainer captures enum value "container" + V1AppTierTypeContainer V1AppTierType = "container" +) + +// for schema +var v1AppTierTypeEnum []interface{} + +func init() { + var res []V1AppTierType + if err := json.Unmarshal([]byte(`["manifest","helm","operator-instance","container"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + v1AppTierTypeEnum = append(v1AppTierTypeEnum, v) + } +} + +func (m V1AppTierType) validateV1AppTierTypeEnum(path, location string, value V1AppTierType) error { + if err := validate.EnumCase(path, location, value, v1AppTierTypeEnum, true); err != nil { + return err + } + return nil +} + +// Validate validates this v1 app tier type +func (m V1AppTierType) Validate(formats strfmt.Registry) error { + var res []error + + // value enum + if err := m.validateV1AppTierTypeEnum("", "body", m); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/models/v1_app_tier_update_entity.go b/api/models/v1_app_tier_update_entity.go new file mode 100644 index 00000000..787f6367 --- /dev/null +++ b/api/models/v1_app_tier_update_entity.go @@ -0,0 +1,127 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1AppTierUpdateEntity Application tier update request payload +// +// swagger:model v1AppTierUpdateEntity +type V1AppTierUpdateEntity struct { + + // Application tier container registry uid + ContainerRegistryUID string `json:"containerRegistryUid,omitempty"` + + // Application tier installation order + InstallOrder int32 `json:"installOrder,omitempty"` + + // Application tier manifests + Manifests []*V1ManifestRefUpdateEntity `json:"manifests"` + + // Application tier name + Name string `json:"name,omitempty"` + + // Application tier properties + Properties []*V1AppTierPropertyEntity `json:"properties"` + + // Application tier configuration values in yaml format + Values string `json:"values,omitempty"` + + // Application tier version + Version string `json:"version,omitempty"` +} + +// Validate validates this v1 app tier update entity +func (m *V1AppTierUpdateEntity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateManifests(formats); err != nil { + res = append(res, err) + } + + if err := m.validateProperties(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1AppTierUpdateEntity) validateManifests(formats strfmt.Registry) error { + + if swag.IsZero(m.Manifests) { // not required + return nil + } + + for i := 0; i < len(m.Manifests); i++ { + if swag.IsZero(m.Manifests[i]) { // not required + continue + } + + if m.Manifests[i] != nil { + if err := m.Manifests[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("manifests" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1AppTierUpdateEntity) validateProperties(formats strfmt.Registry) error { + + if swag.IsZero(m.Properties) { // not required + return nil + } + + for i := 0; i < len(m.Properties); i++ { + if swag.IsZero(m.Properties[i]) { // not required + continue + } + + if m.Properties[i] != nil { + if err := m.Properties[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("properties" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1AppTierUpdateEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1AppTierUpdateEntity) UnmarshalBinary(b []byte) error { + var res V1AppTierUpdateEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_arch_type.go b/api/models/v1_arch_type.go new file mode 100644 index 00000000..280cb901 --- /dev/null +++ b/api/models/v1_arch_type.go @@ -0,0 +1,63 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "encoding/json" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" +) + +// V1ArchType v1 arch type +// +// swagger:model v1ArchType +type V1ArchType string + +const ( + + // V1ArchTypeAmd64 captures enum value "amd64" + V1ArchTypeAmd64 V1ArchType = "amd64" + + // V1ArchTypeArm64 captures enum value "arm64" + V1ArchTypeArm64 V1ArchType = "arm64" +) + +// for schema +var v1ArchTypeEnum []interface{} + +func init() { + var res []V1ArchType + if err := json.Unmarshal([]byte(`["amd64","arm64"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + v1ArchTypeEnum = append(v1ArchTypeEnum, v) + } +} + +func (m V1ArchType) validateV1ArchTypeEnum(path, location string, value V1ArchType) error { + if err := validate.EnumCase(path, location, value, v1ArchTypeEnum, true); err != nil { + return err + } + return nil +} + +// Validate validates this v1 arch type +func (m V1ArchType) Validate(formats strfmt.Registry) error { + var res []error + + // value enum + if err := m.validateV1ArchTypeEnum("", "body", m); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/models/v1_async_operation_id_entity.go b/api/models/v1_async_operation_id_entity.go new file mode 100644 index 00000000..4896fbf0 --- /dev/null +++ b/api/models/v1_async_operation_id_entity.go @@ -0,0 +1,43 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1AsyncOperationIDEntity Async operation id +// +// swagger:model v1AsyncOperationIdEntity +type V1AsyncOperationIDEntity struct { + + // OperationId for a particular sync operation id + OperationID string `json:"operationId,omitempty"` +} + +// Validate validates this v1 async operation Id entity +func (m *V1AsyncOperationIDEntity) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1AsyncOperationIDEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1AsyncOperationIDEntity) UnmarshalBinary(b []byte) error { + var res V1AsyncOperationIDEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_audit.go b/api/models/v1_audit.go new file mode 100644 index 00000000..a3a6a154 --- /dev/null +++ b/api/models/v1_audit.go @@ -0,0 +1,96 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1Audit Audit response payload +// +// swagger:model v1Audit +type V1Audit struct { + + // metadata + Metadata *V1ObjectMeta `json:"metadata,omitempty"` + + // spec + Spec *V1AuditSpec `json:"spec,omitempty"` +} + +// Validate validates this v1 audit +func (m *V1Audit) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSpec(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1Audit) validateMetadata(formats strfmt.Registry) error { + + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } + return err + } + } + + return nil +} + +func (m *V1Audit) validateSpec(formats strfmt.Registry) error { + + if swag.IsZero(m.Spec) { // not required + return nil + } + + if m.Spec != nil { + if err := m.Spec.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1Audit) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1Audit) UnmarshalBinary(b []byte) error { + var res V1Audit + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_audit_actor.go b/api/models/v1_audit_actor.go new file mode 100644 index 00000000..a5cf35ef --- /dev/null +++ b/api/models/v1_audit_actor.go @@ -0,0 +1,156 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "encoding/json" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1AuditActor Audit actor object +// +// swagger:model v1AuditActor +type V1AuditActor struct { + + // actor type + // Enum: [user system service] + ActorType string `json:"actorType,omitempty"` + + // project + Project *V1ProjectMeta `json:"project,omitempty"` + + // service name + ServiceName string `json:"serviceName,omitempty"` + + // user + User *V1UserMeta `json:"user,omitempty"` +} + +// Validate validates this v1 audit actor +func (m *V1AuditActor) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateActorType(formats); err != nil { + res = append(res, err) + } + + if err := m.validateProject(formats); err != nil { + res = append(res, err) + } + + if err := m.validateUser(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +var v1AuditActorTypeActorTypePropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["user","system","service"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + v1AuditActorTypeActorTypePropEnum = append(v1AuditActorTypeActorTypePropEnum, v) + } +} + +const ( + + // V1AuditActorActorTypeUser captures enum value "user" + V1AuditActorActorTypeUser string = "user" + + // V1AuditActorActorTypeSystem captures enum value "system" + V1AuditActorActorTypeSystem string = "system" + + // V1AuditActorActorTypeService captures enum value "service" + V1AuditActorActorTypeService string = "service" +) + +// prop value enum +func (m *V1AuditActor) validateActorTypeEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, v1AuditActorTypeActorTypePropEnum, true); err != nil { + return err + } + return nil +} + +func (m *V1AuditActor) validateActorType(formats strfmt.Registry) error { + + if swag.IsZero(m.ActorType) { // not required + return nil + } + + // value enum + if err := m.validateActorTypeEnum("actorType", "body", m.ActorType); err != nil { + return err + } + + return nil +} + +func (m *V1AuditActor) validateProject(formats strfmt.Registry) error { + + if swag.IsZero(m.Project) { // not required + return nil + } + + if m.Project != nil { + if err := m.Project.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("project") + } + return err + } + } + + return nil +} + +func (m *V1AuditActor) validateUser(formats strfmt.Registry) error { + + if swag.IsZero(m.User) { // not required + return nil + } + + if m.User != nil { + if err := m.User.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("user") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1AuditActor) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1AuditActor) UnmarshalBinary(b []byte) error { + var res V1AuditActor + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_audit_msg_update.go b/api/models/v1_audit_msg_update.go new file mode 100644 index 00000000..d6aa30cb --- /dev/null +++ b/api/models/v1_audit_msg_update.go @@ -0,0 +1,73 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1AuditMsgUpdate Audit user message update request payload +// +// swagger:model v1AuditMsgUpdate +type V1AuditMsgUpdate struct { + + // User message + // Max Length: 255 + // Min Length: 3 + UserMsg string `json:"userMsg,omitempty"` +} + +// Validate validates this v1 audit msg update +func (m *V1AuditMsgUpdate) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateUserMsg(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1AuditMsgUpdate) validateUserMsg(formats strfmt.Registry) error { + + if swag.IsZero(m.UserMsg) { // not required + return nil + } + + if err := validate.MinLength("userMsg", "body", string(m.UserMsg), 3); err != nil { + return err + } + + if err := validate.MaxLength("userMsg", "body", string(m.UserMsg), 255); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1AuditMsgUpdate) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1AuditMsgUpdate) UnmarshalBinary(b []byte) error { + var res V1AuditMsgUpdate + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_audit_resource_reference.go b/api/models/v1_audit_resource_reference.go new file mode 100644 index 00000000..b177f329 --- /dev/null +++ b/api/models/v1_audit_resource_reference.go @@ -0,0 +1,73 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1AuditResourceReference Audit resource reference object +// +// swagger:model v1AuditResourceReference +type V1AuditResourceReference struct { + + // Audit resource type + Kind string `json:"kind,omitempty"` + + // Audit resource label + Label string `json:"label,omitempty"` + + // Audit resource name + Name string `json:"name,omitempty"` + + // Audit resource uid + // Required: true + UID *string `json:"uid"` +} + +// Validate validates this v1 audit resource reference +func (m *V1AuditResourceReference) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateUID(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1AuditResourceReference) validateUID(formats strfmt.Registry) error { + + if err := validate.Required("uid", "body", m.UID); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1AuditResourceReference) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1AuditResourceReference) UnmarshalBinary(b []byte) error { + var res V1AuditResourceReference + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_audit_spec.go b/api/models/v1_audit_spec.go new file mode 100644 index 00000000..c5bda485 --- /dev/null +++ b/api/models/v1_audit_spec.go @@ -0,0 +1,168 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "encoding/json" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1AuditSpec Audit specifications +// +// swagger:model v1AuditSpec +type V1AuditSpec struct { + + // Audit action message + ActionMsg string `json:"actionMsg,omitempty"` + + // action type + // Enum: [create update delete publish deploy] + ActionType string `json:"actionType,omitempty"` + + // actor + Actor *V1AuditActor `json:"actor,omitempty"` + + // Audit content message + ContentMsg string `json:"contentMsg,omitempty"` + + // resource + Resource *V1AuditResourceReference `json:"resource,omitempty"` + + // Audit user message + UserMsg string `json:"userMsg,omitempty"` +} + +// Validate validates this v1 audit spec +func (m *V1AuditSpec) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateActionType(formats); err != nil { + res = append(res, err) + } + + if err := m.validateActor(formats); err != nil { + res = append(res, err) + } + + if err := m.validateResource(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +var v1AuditSpecTypeActionTypePropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["create","update","delete","publish","deploy"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + v1AuditSpecTypeActionTypePropEnum = append(v1AuditSpecTypeActionTypePropEnum, v) + } +} + +const ( + + // V1AuditSpecActionTypeCreate captures enum value "create" + V1AuditSpecActionTypeCreate string = "create" + + // V1AuditSpecActionTypeUpdate captures enum value "update" + V1AuditSpecActionTypeUpdate string = "update" + + // V1AuditSpecActionTypeDelete captures enum value "delete" + V1AuditSpecActionTypeDelete string = "delete" + + // V1AuditSpecActionTypePublish captures enum value "publish" + V1AuditSpecActionTypePublish string = "publish" + + // V1AuditSpecActionTypeDeploy captures enum value "deploy" + V1AuditSpecActionTypeDeploy string = "deploy" +) + +// prop value enum +func (m *V1AuditSpec) validateActionTypeEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, v1AuditSpecTypeActionTypePropEnum, true); err != nil { + return err + } + return nil +} + +func (m *V1AuditSpec) validateActionType(formats strfmt.Registry) error { + + if swag.IsZero(m.ActionType) { // not required + return nil + } + + // value enum + if err := m.validateActionTypeEnum("actionType", "body", m.ActionType); err != nil { + return err + } + + return nil +} + +func (m *V1AuditSpec) validateActor(formats strfmt.Registry) error { + + if swag.IsZero(m.Actor) { // not required + return nil + } + + if m.Actor != nil { + if err := m.Actor.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("actor") + } + return err + } + } + + return nil +} + +func (m *V1AuditSpec) validateResource(formats strfmt.Registry) error { + + if swag.IsZero(m.Resource) { // not required + return nil + } + + if m.Resource != nil { + if err := m.Resource.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("resource") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1AuditSpec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1AuditSpec) UnmarshalBinary(b []byte) error { + var res V1AuditSpec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_audit_sys_msg.go b/api/models/v1_audit_sys_msg.go new file mode 100644 index 00000000..26c1627c --- /dev/null +++ b/api/models/v1_audit_sys_msg.go @@ -0,0 +1,46 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1AuditSysMsg Audit system message +// +// swagger:model v1AuditSysMsg +type V1AuditSysMsg struct { + + // Audit resource action message + ActionMsg string `json:"actionMsg,omitempty"` + + // Audit resource content message + ContentMsg string `json:"contentMsg,omitempty"` +} + +// Validate validates this v1 audit sys msg +func (m *V1AuditSysMsg) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1AuditSysMsg) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1AuditSysMsg) UnmarshalBinary(b []byte) error { + var res V1AuditSysMsg + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_audits.go b/api/models/v1_audits.go new file mode 100644 index 00000000..ca3e45f4 --- /dev/null +++ b/api/models/v1_audits.go @@ -0,0 +1,112 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1Audits v1 audits +// +// swagger:model v1Audits +type V1Audits struct { + + // List of audit message + // Required: true + // Unique: true + Items []*V1Audit `json:"items"` + + // listmeta + Listmeta *V1ListMetaData `json:"listmeta,omitempty"` +} + +// Validate validates this v1 audits +func (m *V1Audits) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateItems(formats); err != nil { + res = append(res, err) + } + + if err := m.validateListmeta(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1Audits) validateItems(formats strfmt.Registry) error { + + if err := validate.Required("items", "body", m.Items); err != nil { + return err + } + + if err := validate.UniqueItems("items", "body", m.Items); err != nil { + return err + } + + for i := 0; i < len(m.Items); i++ { + if swag.IsZero(m.Items[i]) { // not required + continue + } + + if m.Items[i] != nil { + if err := m.Items[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("items" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1Audits) validateListmeta(formats strfmt.Registry) error { + + if swag.IsZero(m.Listmeta) { // not required + return nil + } + + if m.Listmeta != nil { + if err := m.Listmeta.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("listmeta") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1Audits) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1Audits) UnmarshalBinary(b []byte) error { + var res V1Audits + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_auth_login.go b/api/models/v1_auth_login.go new file mode 100644 index 00000000..1bebb0ac --- /dev/null +++ b/api/models/v1_auth_login.go @@ -0,0 +1,74 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1AuthLogin Describes the credential details required for authentication +// +// swagger:model v1AuthLogin +type V1AuthLogin struct { + + // Describes the email id required for the user to authenticate + EmailID string `json:"emailId,omitempty"` + + // Describes the user's organization name to login + Org string `json:"org,omitempty"` + + // Describes the password required for the user to authenticate + // Format: password + Password strfmt.Password `json:"password,omitempty"` +} + +// Validate validates this v1 auth login +func (m *V1AuthLogin) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validatePassword(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1AuthLogin) validatePassword(formats strfmt.Registry) error { + + if swag.IsZero(m.Password) { // not required + return nil + } + + if err := validate.FormatOf("password", "body", "password", m.Password.String(), formats); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1AuthLogin) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1AuthLogin) UnmarshalBinary(b []byte) error { + var res V1AuthLogin + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_auth_token_revoke.go b/api/models/v1_auth_token_revoke.go new file mode 100644 index 00000000..b4942d2a --- /dev/null +++ b/api/models/v1_auth_token_revoke.go @@ -0,0 +1,68 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1AuthTokenRevoke v1 auth token revoke +// +// swagger:model v1AuthTokenRevoke +type V1AuthTokenRevoke struct { + + // tokens + // Unique: true + Tokens []string `json:"tokens"` +} + +// Validate validates this v1 auth token revoke +func (m *V1AuthTokenRevoke) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateTokens(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1AuthTokenRevoke) validateTokens(formats strfmt.Registry) error { + + if swag.IsZero(m.Tokens) { // not required + return nil + } + + if err := validate.UniqueItems("tokens", "body", m.Tokens); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1AuthTokenRevoke) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1AuthTokenRevoke) UnmarshalBinary(b []byte) error { + var res V1AuthTokenRevoke + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_auth_token_settings.go b/api/models/v1_auth_token_settings.go new file mode 100644 index 00000000..6e85ddea --- /dev/null +++ b/api/models/v1_auth_token_settings.go @@ -0,0 +1,73 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1AuthTokenSettings System auth token settings +// +// swagger:model v1AuthTokenSettings +type V1AuthTokenSettings struct { + + // Auth token expiry time in minutes + // Maximum: 1440 + // Minimum: 15 + ExpiryTimeMinutes int32 `json:"expiryTimeMinutes"` +} + +// Validate validates this v1 auth token settings +func (m *V1AuthTokenSettings) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateExpiryTimeMinutes(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1AuthTokenSettings) validateExpiryTimeMinutes(formats strfmt.Registry) error { + + if swag.IsZero(m.ExpiryTimeMinutes) { // not required + return nil + } + + if err := validate.MinimumInt("expiryTimeMinutes", "body", int64(m.ExpiryTimeMinutes), 15, false); err != nil { + return err + } + + if err := validate.MaximumInt("expiryTimeMinutes", "body", int64(m.ExpiryTimeMinutes), 1440, false); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1AuthTokenSettings) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1AuthTokenSettings) UnmarshalBinary(b []byte) error { + var res V1AuthTokenSettings + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_aws_a_m_i.go b/api/models/v1_aws_a_m_i.go new file mode 100644 index 00000000..e4a8dcbd --- /dev/null +++ b/api/models/v1_aws_a_m_i.go @@ -0,0 +1,52 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1AwsAMI v1 aws a m i +// +// swagger:model v1AwsAMI +type V1AwsAMI struct { + + // id + ID string `json:"id,omitempty"` + + // os + Os string `json:"os,omitempty"` + + // region + Region string `json:"region,omitempty"` + + // state + State string `json:"state,omitempty"` +} + +// Validate validates this v1 aws a m i +func (m *V1AwsAMI) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1AwsAMI) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1AwsAMI) UnmarshalBinary(b []byte) error { + var res V1AwsAMI + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_aws_account.go b/api/models/v1_aws_account.go new file mode 100644 index 00000000..e371bb70 --- /dev/null +++ b/api/models/v1_aws_account.go @@ -0,0 +1,127 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1AwsAccount Aws cloud account information +// +// swagger:model v1AwsAccount +type V1AwsAccount struct { + + // api version + APIVersion string `json:"apiVersion,omitempty"` + + // kind + Kind string `json:"kind,omitempty"` + + // metadata + Metadata *V1ObjectMeta `json:"metadata,omitempty"` + + // spec + Spec *V1AwsCloudAccount `json:"spec,omitempty"` + + // status + Status *V1CloudAccountStatus `json:"status,omitempty"` +} + +// Validate validates this v1 aws account +func (m *V1AwsAccount) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSpec(formats); err != nil { + res = append(res, err) + } + + if err := m.validateStatus(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1AwsAccount) validateMetadata(formats strfmt.Registry) error { + + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } + return err + } + } + + return nil +} + +func (m *V1AwsAccount) validateSpec(formats strfmt.Registry) error { + + if swag.IsZero(m.Spec) { // not required + return nil + } + + if m.Spec != nil { + if err := m.Spec.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec") + } + return err + } + } + + return nil +} + +func (m *V1AwsAccount) validateStatus(formats strfmt.Registry) error { + + if swag.IsZero(m.Status) { // not required + return nil + } + + if m.Status != nil { + if err := m.Status.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("status") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1AwsAccount) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1AwsAccount) UnmarshalBinary(b []byte) error { + var res V1AwsAccount + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_aws_account_sts.go b/api/models/v1_aws_account_sts.go new file mode 100644 index 00000000..b3810a07 --- /dev/null +++ b/api/models/v1_aws_account_sts.go @@ -0,0 +1,75 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1AwsAccountSts AWS cloud account sts +// +// swagger:model V1AwsAccountSts +type V1AwsAccountSts struct { + + // A 12-digit number, such as 123456789012, that uniquely identifies an AWS account + AccountID string `json:"accountId,omitempty"` + + // It can be passed to the AssumeRole API of the STS. It can be used in the condition element in a role's trust policy, allowing the role to be assumed only when a certain value is present in the external ID + ExternalID string `json:"externalId,omitempty"` + + // partition + Partition V1AwsPartition `json:"partition,omitempty"` +} + +// Validate validates this v1 aws account sts +func (m *V1AwsAccountSts) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validatePartition(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1AwsAccountSts) validatePartition(formats strfmt.Registry) error { + + if swag.IsZero(m.Partition) { // not required + return nil + } + + if err := m.Partition.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("partition") + } + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1AwsAccountSts) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1AwsAccountSts) UnmarshalBinary(b []byte) error { + var res V1AwsAccountSts + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_aws_accounts.go b/api/models/v1_aws_accounts.go new file mode 100644 index 00000000..16b0b476 --- /dev/null +++ b/api/models/v1_aws_accounts.go @@ -0,0 +1,112 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1AwsAccounts List of AWS accounts +// +// swagger:model v1AwsAccounts +type V1AwsAccounts struct { + + // items + // Required: true + // Unique: true + Items []*V1AwsAccount `json:"items"` + + // listmeta + Listmeta *V1ListMetaData `json:"listmeta,omitempty"` +} + +// Validate validates this v1 aws accounts +func (m *V1AwsAccounts) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateItems(formats); err != nil { + res = append(res, err) + } + + if err := m.validateListmeta(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1AwsAccounts) validateItems(formats strfmt.Registry) error { + + if err := validate.Required("items", "body", m.Items); err != nil { + return err + } + + if err := validate.UniqueItems("items", "body", m.Items); err != nil { + return err + } + + for i := 0; i < len(m.Items); i++ { + if swag.IsZero(m.Items[i]) { // not required + continue + } + + if m.Items[i] != nil { + if err := m.Items[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("items" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1AwsAccounts) validateListmeta(formats strfmt.Registry) error { + + if swag.IsZero(m.Listmeta) { // not required + return nil + } + + if m.Listmeta != nil { + if err := m.Listmeta.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("listmeta") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1AwsAccounts) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1AwsAccounts) UnmarshalBinary(b []byte) error { + var res V1AwsAccounts + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_aws_ami_reference.go b/api/models/v1_aws_ami_reference.go new file mode 100644 index 00000000..fae7122a --- /dev/null +++ b/api/models/v1_aws_ami_reference.go @@ -0,0 +1,103 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "encoding/json" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1AwsAmiReference AMI is the reference to the AMI from which to create the machine instance +// +// swagger:model v1AwsAmiReference +type V1AwsAmiReference struct { + + // EKSOptimizedLookupType If specified, will look up an EKS Optimized image in SSM Parameter store + // Enum: [AmazonLinux AmazonLinuxGPU] + EksOptimizedLookupType string `json:"eksOptimizedLookupType,omitempty"` + + // ID of resource + ID string `json:"id,omitempty"` +} + +// Validate validates this v1 aws ami reference +func (m *V1AwsAmiReference) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateEksOptimizedLookupType(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +var v1AwsAmiReferenceTypeEksOptimizedLookupTypePropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["AmazonLinux","AmazonLinuxGPU"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + v1AwsAmiReferenceTypeEksOptimizedLookupTypePropEnum = append(v1AwsAmiReferenceTypeEksOptimizedLookupTypePropEnum, v) + } +} + +const ( + + // V1AwsAmiReferenceEksOptimizedLookupTypeAmazonLinux captures enum value "AmazonLinux" + V1AwsAmiReferenceEksOptimizedLookupTypeAmazonLinux string = "AmazonLinux" + + // V1AwsAmiReferenceEksOptimizedLookupTypeAmazonLinuxGPU captures enum value "AmazonLinuxGPU" + V1AwsAmiReferenceEksOptimizedLookupTypeAmazonLinuxGPU string = "AmazonLinuxGPU" +) + +// prop value enum +func (m *V1AwsAmiReference) validateEksOptimizedLookupTypeEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, v1AwsAmiReferenceTypeEksOptimizedLookupTypePropEnum, true); err != nil { + return err + } + return nil +} + +func (m *V1AwsAmiReference) validateEksOptimizedLookupType(formats strfmt.Registry) error { + + if swag.IsZero(m.EksOptimizedLookupType) { // not required + return nil + } + + // value enum + if err := m.validateEksOptimizedLookupTypeEnum("eksOptimizedLookupType", "body", m.EksOptimizedLookupType); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1AwsAmiReference) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1AwsAmiReference) UnmarshalBinary(b []byte) error { + var res V1AwsAmiReference + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_aws_availability_zone.go b/api/models/v1_aws_availability_zone.go new file mode 100644 index 00000000..7dabf398 --- /dev/null +++ b/api/models/v1_aws_availability_zone.go @@ -0,0 +1,49 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1AwsAvailabilityZone Distinct locations within an AWS Region that are engineered to be isolated from failures in other Zones +// +// swagger:model v1AwsAvailabilityZone +type V1AwsAvailabilityZone struct { + + // AWS availability zone name + Name string `json:"name,omitempty"` + + // AWS availability zone state + State string `json:"state,omitempty"` + + // AWS availability zone id + ZoneID string `json:"zoneId,omitempty"` +} + +// Validate validates this v1 aws availability zone +func (m *V1AwsAvailabilityZone) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1AwsAvailabilityZone) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1AwsAvailabilityZone) UnmarshalBinary(b []byte) error { + var res V1AwsAvailabilityZone + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_aws_availability_zones.go b/api/models/v1_aws_availability_zones.go new file mode 100644 index 00000000..193b0233 --- /dev/null +++ b/api/models/v1_aws_availability_zones.go @@ -0,0 +1,82 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1AwsAvailabilityZones v1 aws availability zones +// +// swagger:model v1AwsAvailabilityZones +type V1AwsAvailabilityZones struct { + + // List of AWS Zones + // Required: true + Zones []*V1AwsAvailabilityZone `json:"zones"` +} + +// Validate validates this v1 aws availability zones +func (m *V1AwsAvailabilityZones) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateZones(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1AwsAvailabilityZones) validateZones(formats strfmt.Registry) error { + + if err := validate.Required("zones", "body", m.Zones); err != nil { + return err + } + + for i := 0; i < len(m.Zones); i++ { + if swag.IsZero(m.Zones[i]) { // not required + continue + } + + if m.Zones[i] != nil { + if err := m.Zones[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("zones" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1AwsAvailabilityZones) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1AwsAvailabilityZones) UnmarshalBinary(b []byte) error { + var res V1AwsAvailabilityZones + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_aws_cloud_account.go b/api/models/v1_aws_cloud_account.go new file mode 100644 index 00000000..37642c3d --- /dev/null +++ b/api/models/v1_aws_cloud_account.go @@ -0,0 +1,157 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "encoding/json" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1AwsCloudAccount AWS cloud account which includes access key and secret key in case of 'secret' credentials type. It includes policyARNS, ARN and externalId in case of sts. Partition is a group of AWS Region and Service objects +// +// swagger:model v1AwsCloudAccount +type V1AwsCloudAccount struct { + + // AWS account access key + AccessKey string `json:"accessKey,omitempty"` + + // credential type + CredentialType V1AwsCloudAccountCredentialType `json:"credentialType,omitempty"` + + // AWS accounts are scoped to a single partition. Allowed values [aws, aws-us-gov], Default values + // Enum: [aws aws-us-gov] + Partition *string `json:"partition,omitempty"` + + // List of policy ARNs required in case of credentialType sts. + PolicyARNs []string `json:"policyARNs"` + + // AWS account secret key + SecretKey string `json:"secretKey,omitempty"` + + // AWS STS credentials in case of credentialType sts, will be empty in case of credential type secret + Sts *V1AwsStsCredentials `json:"sts,omitempty"` +} + +// Validate validates this v1 aws cloud account +func (m *V1AwsCloudAccount) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateCredentialType(formats); err != nil { + res = append(res, err) + } + + if err := m.validatePartition(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSts(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1AwsCloudAccount) validateCredentialType(formats strfmt.Registry) error { + + if swag.IsZero(m.CredentialType) { // not required + return nil + } + + if err := m.CredentialType.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("credentialType") + } + return err + } + + return nil +} + +var v1AwsCloudAccountTypePartitionPropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["aws","aws-us-gov"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + v1AwsCloudAccountTypePartitionPropEnum = append(v1AwsCloudAccountTypePartitionPropEnum, v) + } +} + +const ( + + // V1AwsCloudAccountPartitionAws captures enum value "aws" + V1AwsCloudAccountPartitionAws string = "aws" + + // V1AwsCloudAccountPartitionAwsUsGov captures enum value "aws-us-gov" + V1AwsCloudAccountPartitionAwsUsGov string = "aws-us-gov" +) + +// prop value enum +func (m *V1AwsCloudAccount) validatePartitionEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, v1AwsCloudAccountTypePartitionPropEnum, true); err != nil { + return err + } + return nil +} + +func (m *V1AwsCloudAccount) validatePartition(formats strfmt.Registry) error { + + if swag.IsZero(m.Partition) { // not required + return nil + } + + // value enum + if err := m.validatePartitionEnum("partition", "body", *m.Partition); err != nil { + return err + } + + return nil +} + +func (m *V1AwsCloudAccount) validateSts(formats strfmt.Registry) error { + + if swag.IsZero(m.Sts) { // not required + return nil + } + + if m.Sts != nil { + if err := m.Sts.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("sts") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1AwsCloudAccount) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1AwsCloudAccount) UnmarshalBinary(b []byte) error { + var res V1AwsCloudAccount + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_aws_cloud_account_credential_type.go b/api/models/v1_aws_cloud_account_credential_type.go new file mode 100644 index 00000000..daacb6de --- /dev/null +++ b/api/models/v1_aws_cloud_account_credential_type.go @@ -0,0 +1,63 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "encoding/json" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" +) + +// V1AwsCloudAccountCredentialType Allowed Values [secret, sts]. STS type will be used for role assumption for sts type, accessKey/secretKey contains the source account, Arn is the target account. +// +// swagger:model v1AwsCloudAccountCredentialType +type V1AwsCloudAccountCredentialType string + +const ( + + // V1AwsCloudAccountCredentialTypeSecret captures enum value "secret" + V1AwsCloudAccountCredentialTypeSecret V1AwsCloudAccountCredentialType = "secret" + + // V1AwsCloudAccountCredentialTypeSts captures enum value "sts" + V1AwsCloudAccountCredentialTypeSts V1AwsCloudAccountCredentialType = "sts" +) + +// for schema +var v1AwsCloudAccountCredentialTypeEnum []interface{} + +func init() { + var res []V1AwsCloudAccountCredentialType + if err := json.Unmarshal([]byte(`["secret","sts"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + v1AwsCloudAccountCredentialTypeEnum = append(v1AwsCloudAccountCredentialTypeEnum, v) + } +} + +func (m V1AwsCloudAccountCredentialType) validateV1AwsCloudAccountCredentialTypeEnum(path, location string, value V1AwsCloudAccountCredentialType) error { + if err := validate.EnumCase(path, location, value, v1AwsCloudAccountCredentialTypeEnum, true); err != nil { + return err + } + return nil +} + +// Validate validates this v1 aws cloud account credential type +func (m V1AwsCloudAccountCredentialType) Validate(formats strfmt.Registry) error { + var res []error + + // value enum + if err := m.validateV1AwsCloudAccountCredentialTypeEnum("", "body", m); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/models/v1_aws_cloud_cluster_config_entity.go b/api/models/v1_aws_cloud_cluster_config_entity.go new file mode 100644 index 00000000..0d7e9dbe --- /dev/null +++ b/api/models/v1_aws_cloud_cluster_config_entity.go @@ -0,0 +1,71 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1AwsCloudClusterConfigEntity AWS cloud cluster config entity +// +// swagger:model v1AwsCloudClusterConfigEntity +type V1AwsCloudClusterConfigEntity struct { + + // cluster config + ClusterConfig *V1AwsClusterConfig `json:"clusterConfig,omitempty"` +} + +// Validate validates this v1 aws cloud cluster config entity +func (m *V1AwsCloudClusterConfigEntity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateClusterConfig(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1AwsCloudClusterConfigEntity) validateClusterConfig(formats strfmt.Registry) error { + + if swag.IsZero(m.ClusterConfig) { // not required + return nil + } + + if m.ClusterConfig != nil { + if err := m.ClusterConfig.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("clusterConfig") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1AwsCloudClusterConfigEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1AwsCloudClusterConfigEntity) UnmarshalBinary(b []byte) error { + var res V1AwsCloudClusterConfigEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_aws_cloud_config.go b/api/models/v1_aws_cloud_config.go new file mode 100644 index 00000000..233eab2b --- /dev/null +++ b/api/models/v1_aws_cloud_config.go @@ -0,0 +1,127 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1AwsCloudConfig AwsCloudConfig is the Schema for the awscloudconfigs API +// +// swagger:model v1AwsCloudConfig +type V1AwsCloudConfig struct { + + // APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + APIVersion string `json:"apiVersion,omitempty"` + + // Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + Kind string `json:"kind,omitempty"` + + // metadata + Metadata *V1ObjectMeta `json:"metadata,omitempty"` + + // spec + Spec *V1AwsCloudConfigSpec `json:"spec,omitempty"` + + // status + Status *V1AwsCloudConfigStatus `json:"status,omitempty"` +} + +// Validate validates this v1 aws cloud config +func (m *V1AwsCloudConfig) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSpec(formats); err != nil { + res = append(res, err) + } + + if err := m.validateStatus(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1AwsCloudConfig) validateMetadata(formats strfmt.Registry) error { + + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } + return err + } + } + + return nil +} + +func (m *V1AwsCloudConfig) validateSpec(formats strfmt.Registry) error { + + if swag.IsZero(m.Spec) { // not required + return nil + } + + if m.Spec != nil { + if err := m.Spec.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec") + } + return err + } + } + + return nil +} + +func (m *V1AwsCloudConfig) validateStatus(formats strfmt.Registry) error { + + if swag.IsZero(m.Status) { // not required + return nil + } + + if m.Status != nil { + if err := m.Status.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("status") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1AwsCloudConfig) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1AwsCloudConfig) UnmarshalBinary(b []byte) error { + var res V1AwsCloudConfig + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_aws_cloud_config_spec.go b/api/models/v1_aws_cloud_config_spec.go new file mode 100644 index 00000000..d01f9606 --- /dev/null +++ b/api/models/v1_aws_cloud_config_spec.go @@ -0,0 +1,130 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1AwsCloudConfigSpec AwsCloudConfigSpec defines the cloud configuration input by user This will translate to clusterspec/machinespec for cluster-api +// +// swagger:model v1AwsCloudConfigSpec +type V1AwsCloudConfigSpec struct { + + // cloudAccountRef should point to the secret which contains AwsCloudAccount + CloudAccountRef *V1ObjectReference `json:"cloudAccountRef,omitempty"` + + // cluster config + ClusterConfig *V1AwsClusterConfig `json:"clusterConfig,omitempty"` + + // machine pool config + MachinePoolConfig []*V1AwsMachinePoolConfig `json:"machinePoolConfig"` +} + +// Validate validates this v1 aws cloud config spec +func (m *V1AwsCloudConfigSpec) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateCloudAccountRef(formats); err != nil { + res = append(res, err) + } + + if err := m.validateClusterConfig(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMachinePoolConfig(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1AwsCloudConfigSpec) validateCloudAccountRef(formats strfmt.Registry) error { + + if swag.IsZero(m.CloudAccountRef) { // not required + return nil + } + + if m.CloudAccountRef != nil { + if err := m.CloudAccountRef.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("cloudAccountRef") + } + return err + } + } + + return nil +} + +func (m *V1AwsCloudConfigSpec) validateClusterConfig(formats strfmt.Registry) error { + + if swag.IsZero(m.ClusterConfig) { // not required + return nil + } + + if m.ClusterConfig != nil { + if err := m.ClusterConfig.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("clusterConfig") + } + return err + } + } + + return nil +} + +func (m *V1AwsCloudConfigSpec) validateMachinePoolConfig(formats strfmt.Registry) error { + + if swag.IsZero(m.MachinePoolConfig) { // not required + return nil + } + + for i := 0; i < len(m.MachinePoolConfig); i++ { + if swag.IsZero(m.MachinePoolConfig[i]) { // not required + continue + } + + if m.MachinePoolConfig[i] != nil { + if err := m.MachinePoolConfig[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("machinePoolConfig" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1AwsCloudConfigSpec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1AwsCloudConfigSpec) UnmarshalBinary(b []byte) error { + var res V1AwsCloudConfigSpec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_aws_cloud_config_status.go b/api/models/v1_aws_cloud_config_status.go new file mode 100644 index 00000000..049f8bb3 --- /dev/null +++ b/api/models/v1_aws_cloud_config_status.go @@ -0,0 +1,127 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1AwsCloudConfigStatus AwsCloudConfigStatus defines the observed state of AwsCloudConfig The cloudimage info built by Mold is stored here image should be mapped to a specific machinepool +// +// swagger:model v1AwsCloudConfigStatus +type V1AwsCloudConfigStatus struct { + + // For mold controller to identify if is there any changes in Pack + AnsibleRoleDigest string `json:"ansibleRoleDigest,omitempty"` + + // conditions + Conditions []*V1ClusterCondition `json:"conditions"` + + // Images array items should be 1-to-1 mapping to Spec.MachinePoolConfig + Images []*V1AwsAMI `json:"images"` + + // addon layers present in spc + IsAddonLayer bool `json:"isAddonLayer,omitempty"` + + // this map will be for ansible roles present in eack pack + RoleDigest map[string]string `json:"roleDigest,omitempty"` + + // sourceImageId, it can be from packref's annotations or from pack.json + SourceImageID string `json:"sourceImageId,omitempty"` + + // PackerVariableDigest string `json:"packerDigest,omitempty"` If no ansible roles found in Packs then Mold should tell Drive to use capi image and not create custom image, because there is nothing to add + UseCapiImage bool `json:"useCapiImage,omitempty"` +} + +// Validate validates this v1 aws cloud config status +func (m *V1AwsCloudConfigStatus) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateConditions(formats); err != nil { + res = append(res, err) + } + + if err := m.validateImages(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1AwsCloudConfigStatus) validateConditions(formats strfmt.Registry) error { + + if swag.IsZero(m.Conditions) { // not required + return nil + } + + for i := 0; i < len(m.Conditions); i++ { + if swag.IsZero(m.Conditions[i]) { // not required + continue + } + + if m.Conditions[i] != nil { + if err := m.Conditions[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("conditions" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1AwsCloudConfigStatus) validateImages(formats strfmt.Registry) error { + + if swag.IsZero(m.Images) { // not required + return nil + } + + for i := 0; i < len(m.Images); i++ { + if swag.IsZero(m.Images[i]) { // not required + continue + } + + if m.Images[i] != nil { + if err := m.Images[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("images" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1AwsCloudConfigStatus) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1AwsCloudConfigStatus) UnmarshalBinary(b []byte) error { + var res V1AwsCloudConfigStatus + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_aws_cloud_cost_spec.go b/api/models/v1_aws_cloud_cost_spec.go new file mode 100644 index 00000000..a473bd24 --- /dev/null +++ b/api/models/v1_aws_cloud_cost_spec.go @@ -0,0 +1,101 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1AwsCloudCostSpec Aws cloud account usage cost payload spec +// +// swagger:model v1AwsCloudCostSpec +type V1AwsCloudCostSpec struct { + + // AccountId of AWS cloud cost + AccountID string `json:"accountId,omitempty"` + + // credentials + // Required: true + Credentials *V1AwsCloudAccount `json:"credentials"` + + // filter + Filter *V1AwsCloudCostSpecFilter `json:"filter,omitempty"` +} + +// Validate validates this v1 aws cloud cost spec +func (m *V1AwsCloudCostSpec) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateCredentials(formats); err != nil { + res = append(res, err) + } + + if err := m.validateFilter(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1AwsCloudCostSpec) validateCredentials(formats strfmt.Registry) error { + + if err := validate.Required("credentials", "body", m.Credentials); err != nil { + return err + } + + if m.Credentials != nil { + if err := m.Credentials.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("credentials") + } + return err + } + } + + return nil +} + +func (m *V1AwsCloudCostSpec) validateFilter(formats strfmt.Registry) error { + + if swag.IsZero(m.Filter) { // not required + return nil + } + + if m.Filter != nil { + if err := m.Filter.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("filter") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1AwsCloudCostSpec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1AwsCloudCostSpec) UnmarshalBinary(b []byte) error { + var res V1AwsCloudCostSpec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_aws_cloud_cost_spec_filter.go b/api/models/v1_aws_cloud_cost_spec_filter.go new file mode 100644 index 00000000..277cbb19 --- /dev/null +++ b/api/models/v1_aws_cloud_cost_spec_filter.go @@ -0,0 +1,94 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1AwsCloudCostSpecFilter Aws cloud account usage cost payload filter. startTime and endTime should be within 12 months range from now. +// +// swagger:model v1AwsCloudCostSpecFilter +type V1AwsCloudCostSpecFilter struct { + + // end time + // Format: date-time + EndTime V1Time `json:"endTime,omitempty"` + + // IAM UserId of AWS account + IamUserID string `json:"iamUserId,omitempty"` + + // start time + // Required: true + // Format: date-time + StartTime V1Time `json:"startTime"` +} + +// Validate validates this v1 aws cloud cost spec filter +func (m *V1AwsCloudCostSpecFilter) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateEndTime(formats); err != nil { + res = append(res, err) + } + + if err := m.validateStartTime(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1AwsCloudCostSpecFilter) validateEndTime(formats strfmt.Registry) error { + + if swag.IsZero(m.EndTime) { // not required + return nil + } + + if err := m.EndTime.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("endTime") + } + return err + } + + return nil +} + +func (m *V1AwsCloudCostSpecFilter) validateStartTime(formats strfmt.Registry) error { + + if err := m.StartTime.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("startTime") + } + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1AwsCloudCostSpecFilter) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1AwsCloudCostSpecFilter) UnmarshalBinary(b []byte) error { + var res V1AwsCloudCostSpecFilter + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_aws_cloud_cost_summary.go b/api/models/v1_aws_cloud_cost_summary.go new file mode 100644 index 00000000..4f59fd06 --- /dev/null +++ b/api/models/v1_aws_cloud_cost_summary.go @@ -0,0 +1,71 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1AwsCloudCostSummary AWS cloud account usage cost summary response data +// +// swagger:model v1AwsCloudCostSummary +type V1AwsCloudCostSummary struct { + + // cost + Cost *V1AwsCloudCostSummaryCloudCost `json:"cost,omitempty"` +} + +// Validate validates this v1 aws cloud cost summary +func (m *V1AwsCloudCostSummary) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateCost(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1AwsCloudCostSummary) validateCost(formats strfmt.Registry) error { + + if swag.IsZero(m.Cost) { // not required + return nil + } + + if m.Cost != nil { + if err := m.Cost.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("cost") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1AwsCloudCostSummary) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1AwsCloudCostSummary) UnmarshalBinary(b []byte) error { + var res V1AwsCloudCostSummary + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_aws_cloud_cost_summary_cloud_cost.go b/api/models/v1_aws_cloud_cost_summary_cloud_cost.go new file mode 100644 index 00000000..ce4052b4 --- /dev/null +++ b/api/models/v1_aws_cloud_cost_summary_cloud_cost.go @@ -0,0 +1,83 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1AwsCloudCostSummaryCloudCost AWS cloud account usage cost summary of monthlyCosts and totalCost +// +// swagger:model v1AwsCloudCostSummaryCloudCost +type V1AwsCloudCostSummaryCloudCost struct { + + // Monthly cost of AWS cost + MonthlyCosts []*V1AwsCloudCostSummaryMonthlyCost `json:"monthlyCosts"` + + // Total cost of AWS cost + Total float64 `json:"total"` +} + +// Validate validates this v1 aws cloud cost summary cloud cost +func (m *V1AwsCloudCostSummaryCloudCost) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMonthlyCosts(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1AwsCloudCostSummaryCloudCost) validateMonthlyCosts(formats strfmt.Registry) error { + + if swag.IsZero(m.MonthlyCosts) { // not required + return nil + } + + for i := 0; i < len(m.MonthlyCosts); i++ { + if swag.IsZero(m.MonthlyCosts[i]) { // not required + continue + } + + if m.MonthlyCosts[i] != nil { + if err := m.MonthlyCosts[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("monthlyCosts" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1AwsCloudCostSummaryCloudCost) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1AwsCloudCostSummaryCloudCost) UnmarshalBinary(b []byte) error { + var res V1AwsCloudCostSummaryCloudCost + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_aws_cloud_cost_summary_monthly_cost.go b/api/models/v1_aws_cloud_cost_summary_monthly_cost.go new file mode 100644 index 00000000..42a48a54 --- /dev/null +++ b/api/models/v1_aws_cloud_cost_summary_monthly_cost.go @@ -0,0 +1,46 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1AwsCloudCostSummaryMonthlyCost v1 aws cloud cost summary monthly cost +// +// swagger:model v1AwsCloudCostSummaryMonthlyCost +type V1AwsCloudCostSummaryMonthlyCost struct { + + // Amount for aws cloud cost + Amount float64 `json:"amount"` + + // Time duration for aws cloud cost + Timestamp int64 `json:"timestamp,omitempty"` +} + +// Validate validates this v1 aws cloud cost summary monthly cost +func (m *V1AwsCloudCostSummaryMonthlyCost) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1AwsCloudCostSummaryMonthlyCost) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1AwsCloudCostSummaryMonthlyCost) UnmarshalBinary(b []byte) error { + var res V1AwsCloudCostSummaryMonthlyCost + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_aws_cluster_config.go b/api/models/v1_aws_cluster_config.go new file mode 100644 index 00000000..11093657 --- /dev/null +++ b/api/models/v1_aws_cluster_config.go @@ -0,0 +1,76 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1AwsClusterConfig Cluster level configuration for aws cloud and applicable for all the machine pools +// +// swagger:model v1AwsClusterConfig +type V1AwsClusterConfig struct { + + // Create bastion node option we have earlier supported creation of bastion by default capa seems to favour session manager against bastion node https://github.com/kubernetes-sigs/cluster-api-provider-aws/issues/947 + BastionDisabled bool `json:"bastionDisabled,omitempty"` + + // ControlPlaneLoadBalancer specifies how API server elb will be configured, this field is optional, not provided, "", default => "Internet-facing" "Internet-facing" => "Internet-facing" "internal" => "internal" For spectro saas setup we require to talk to the apiserver from our cluster so ControlPlaneLoadBalancer should be "", not provided or "Internet-facing" + ControlPlaneLoadBalancer string `json:"controlPlaneLoadBalancer,omitempty"` + + // region + // Required: true + Region *string `json:"region"` + + // ssh key name + SSHKeyName string `json:"sshKeyName,omitempty"` + + // VPC Id to deploy cluster into should have one public and one private subnet for the the cluster creation, this field is optional, If VPC Id is not provided a fully managed VPC will be created + VpcID string `json:"vpcId,omitempty"` +} + +// Validate validates this v1 aws cluster config +func (m *V1AwsClusterConfig) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateRegion(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1AwsClusterConfig) validateRegion(formats strfmt.Registry) error { + + if err := validate.Required("region", "body", m.Region); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1AwsClusterConfig) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1AwsClusterConfig) UnmarshalBinary(b []byte) error { + var res V1AwsClusterConfig + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_aws_credit_account_entity.go b/api/models/v1_aws_credit_account_entity.go new file mode 100644 index 00000000..bc9ebdc4 --- /dev/null +++ b/api/models/v1_aws_credit_account_entity.go @@ -0,0 +1,102 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1AwsCreditAccountEntity v1 aws credit account entity +// +// swagger:model v1AwsCreditAccountEntity +type V1AwsCreditAccountEntity struct { + + // credit limit in dollars + CreditLimitInDollars float64 `json:"creditLimitInDollars"` + + // credit used in dollars + CreditUsedInDollars float64 `json:"creditUsedInDollars"` + + // login credentials + LoginCredentials *V1AwsLoginCredentials `json:"loginCredentials,omitempty"` + + // user cloud account + UserCloudAccount *V1AwsUserCloudAccount `json:"userCloudAccount,omitempty"` +} + +// Validate validates this v1 aws credit account entity +func (m *V1AwsCreditAccountEntity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateLoginCredentials(formats); err != nil { + res = append(res, err) + } + + if err := m.validateUserCloudAccount(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1AwsCreditAccountEntity) validateLoginCredentials(formats strfmt.Registry) error { + + if swag.IsZero(m.LoginCredentials) { // not required + return nil + } + + if m.LoginCredentials != nil { + if err := m.LoginCredentials.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("loginCredentials") + } + return err + } + } + + return nil +} + +func (m *V1AwsCreditAccountEntity) validateUserCloudAccount(formats strfmt.Registry) error { + + if swag.IsZero(m.UserCloudAccount) { // not required + return nil + } + + if m.UserCloudAccount != nil { + if err := m.UserCloudAccount.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("userCloudAccount") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1AwsCreditAccountEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1AwsCreditAccountEntity) UnmarshalBinary(b []byte) error { + var res V1AwsCreditAccountEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_aws_find_image_request.go b/api/models/v1_aws_find_image_request.go new file mode 100644 index 00000000..ae991a15 --- /dev/null +++ b/api/models/v1_aws_find_image_request.go @@ -0,0 +1,74 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1AwsFindImageRequest AWS image name and credentials +// +// swagger:model v1AwsFindImageRequest +type V1AwsFindImageRequest struct { + + // AWS image ami name + AmiName string `json:"amiName,omitempty"` + + // aws account + AwsAccount *V1AwsCloudAccount `json:"awsAccount,omitempty"` +} + +// Validate validates this v1 aws find image request +func (m *V1AwsFindImageRequest) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateAwsAccount(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1AwsFindImageRequest) validateAwsAccount(formats strfmt.Registry) error { + + if swag.IsZero(m.AwsAccount) { // not required + return nil + } + + if m.AwsAccount != nil { + if err := m.AwsAccount.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("awsAccount") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1AwsFindImageRequest) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1AwsFindImageRequest) UnmarshalBinary(b []byte) error { + var res V1AwsFindImageRequest + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_aws_iam_policy.go b/api/models/v1_aws_iam_policy.go new file mode 100644 index 00000000..d495ff7d --- /dev/null +++ b/api/models/v1_aws_iam_policy.go @@ -0,0 +1,49 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1AwsIamPolicy Aws policy +// +// swagger:model v1AwsIamPolicy +type V1AwsIamPolicy struct { + + // arn + Arn string `json:"arn,omitempty"` + + // policy Id + PolicyID string `json:"policyId,omitempty"` + + // policy name + PolicyName string `json:"policyName,omitempty"` +} + +// Validate validates this v1 aws iam policy +func (m *V1AwsIamPolicy) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1AwsIamPolicy) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1AwsIamPolicy) UnmarshalBinary(b []byte) error { + var res V1AwsIamPolicy + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_aws_image.go b/api/models/v1_aws_image.go new file mode 100644 index 00000000..3405ef52 --- /dev/null +++ b/api/models/v1_aws_image.go @@ -0,0 +1,49 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1AwsImage AWS image name and ami +// +// swagger:model v1AwsImage +type V1AwsImage struct { + + // AWS image id + ID string `json:"id,omitempty"` + + // AWS image name + Name string `json:"name,omitempty"` + + // AWS image owner id + Owner string `json:"owner,omitempty"` +} + +// Validate validates this v1 aws image +func (m *V1AwsImage) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1AwsImage) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1AwsImage) UnmarshalBinary(b []byte) error { + var res V1AwsImage + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_aws_instance_types.go b/api/models/v1_aws_instance_types.go new file mode 100644 index 00000000..2fabf36f --- /dev/null +++ b/api/models/v1_aws_instance_types.go @@ -0,0 +1,80 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1AwsInstanceTypes List of AWS instance types +// +// swagger:model v1AwsInstanceTypes +type V1AwsInstanceTypes struct { + + // instance types + InstanceTypes []*V1InstanceType `json:"instanceTypes"` +} + +// Validate validates this v1 aws instance types +func (m *V1AwsInstanceTypes) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateInstanceTypes(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1AwsInstanceTypes) validateInstanceTypes(formats strfmt.Registry) error { + + if swag.IsZero(m.InstanceTypes) { // not required + return nil + } + + for i := 0; i < len(m.InstanceTypes); i++ { + if swag.IsZero(m.InstanceTypes[i]) { // not required + continue + } + + if m.InstanceTypes[i] != nil { + if err := m.InstanceTypes[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("instanceTypes" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1AwsInstanceTypes) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1AwsInstanceTypes) UnmarshalBinary(b []byte) error { + var res V1AwsInstanceTypes + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_aws_key_pairs.go b/api/models/v1_aws_key_pairs.go new file mode 100644 index 00000000..a23fc11f --- /dev/null +++ b/api/models/v1_aws_key_pairs.go @@ -0,0 +1,43 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1AwsKeyPairs List of AWS keypairs +// +// swagger:model v1AwsKeyPairs +type V1AwsKeyPairs struct { + + // Array of Aws Keypair names + KeyNames []string `json:"keyNames"` +} + +// Validate validates this v1 aws key pairs +func (m *V1AwsKeyPairs) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1AwsKeyPairs) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1AwsKeyPairs) UnmarshalBinary(b []byte) error { + var res V1AwsKeyPairs + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_aws_kms_key.go b/api/models/v1_aws_kms_key.go new file mode 100644 index 00000000..71066464 --- /dev/null +++ b/api/models/v1_aws_kms_key.go @@ -0,0 +1,84 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1AwsKmsKey AWS KMS Key - gives you centralized control over the cryptographic keys used to protect your data. +// +// swagger:model v1AwsKmsKey +type V1AwsKmsKey struct { + + // AWS KMS alias + KeyAlias string `json:"keyAlias,omitempty"` + + // AWS KMS arn + // Required: true + KeyArn *string `json:"keyArn"` + + // AWS KMS keyid + // Required: true + KeyID *string `json:"keyId"` +} + +// Validate validates this v1 aws kms key +func (m *V1AwsKmsKey) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateKeyArn(formats); err != nil { + res = append(res, err) + } + + if err := m.validateKeyID(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1AwsKmsKey) validateKeyArn(formats strfmt.Registry) error { + + if err := validate.Required("keyArn", "body", m.KeyArn); err != nil { + return err + } + + return nil +} + +func (m *V1AwsKmsKey) validateKeyID(formats strfmt.Registry) error { + + if err := validate.Required("keyId", "body", m.KeyID); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1AwsKmsKey) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1AwsKmsKey) UnmarshalBinary(b []byte) error { + var res V1AwsKmsKey + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_aws_kms_key_entity.go b/api/models/v1_aws_kms_key_entity.go new file mode 100644 index 00000000..cc10c6e3 --- /dev/null +++ b/api/models/v1_aws_kms_key_entity.go @@ -0,0 +1,49 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1AwsKmsKeyEntity List of AWS Keys +// +// swagger:model v1AwsKmsKeyEntity +type V1AwsKmsKeyEntity struct { + + // The twelve-digit account ID of the Amazon Web Services account that owns the KMS key + AwsAccountID string `json:"awsAccountId,omitempty"` + + // Specifies whether the KMS key is enabled. + Enabled bool `json:"enabled,omitempty"` + + // The globally unique identifier for the KMS key + KeyID string `json:"keyId,omitempty"` +} + +// Validate validates this v1 aws kms key entity +func (m *V1AwsKmsKeyEntity) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1AwsKmsKeyEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1AwsKmsKeyEntity) UnmarshalBinary(b []byte) error { + var res V1AwsKmsKeyEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_aws_kms_keys.go b/api/models/v1_aws_kms_keys.go new file mode 100644 index 00000000..657ffbbe --- /dev/null +++ b/api/models/v1_aws_kms_keys.go @@ -0,0 +1,82 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1AwsKmsKeys List of AWS Keys +// +// swagger:model v1AwsKmsKeys +type V1AwsKmsKeys struct { + + // kms keys + // Required: true + KmsKeys []*V1AwsKmsKey `json:"kmsKeys"` +} + +// Validate validates this v1 aws kms keys +func (m *V1AwsKmsKeys) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateKmsKeys(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1AwsKmsKeys) validateKmsKeys(formats strfmt.Registry) error { + + if err := validate.Required("kmsKeys", "body", m.KmsKeys); err != nil { + return err + } + + for i := 0; i < len(m.KmsKeys); i++ { + if swag.IsZero(m.KmsKeys[i]) { // not required + continue + } + + if m.KmsKeys[i] != nil { + if err := m.KmsKeys[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("kmsKeys" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1AwsKmsKeys) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1AwsKmsKeys) UnmarshalBinary(b []byte) error { + var res V1AwsKmsKeys + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_aws_launch_template.go b/api/models/v1_aws_launch_template.go new file mode 100644 index 00000000..c1f5938d --- /dev/null +++ b/api/models/v1_aws_launch_template.go @@ -0,0 +1,145 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1AwsLaunchTemplate AWSLaunchTemplate specifies the launch template to use to create the managed node group +// +// swagger:model v1AwsLaunchTemplate +type V1AwsLaunchTemplate struct { + + // AdditionalSecurityGroups is an array of references to security groups that should be applied to the instances + // Unique: true + AdditionalSecurityGroups []*V1AwsResourceReference `json:"additionalSecurityGroups"` + + // ami + Ami *V1AwsAmiReference `json:"ami,omitempty"` + + // ImageLookupBaseOS is the name of the base operating system to use for image lookup the AMI is not set + ImageLookupBaseOS string `json:"imageLookupBaseOS,omitempty"` + + // ImageLookupFormat is the AMI naming format to look up the image + ImageLookupFormat string `json:"imageLookupFormat,omitempty"` + + // ImageLookupOrg is the AWS Organization ID to use for image lookup if AMI is not set + ImageLookupOrg string `json:"imageLookupOrg,omitempty"` + + // root volume + RootVolume *V1AwsRootVolume `json:"rootVolume,omitempty"` +} + +// Validate validates this v1 aws launch template +func (m *V1AwsLaunchTemplate) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateAdditionalSecurityGroups(formats); err != nil { + res = append(res, err) + } + + if err := m.validateAmi(formats); err != nil { + res = append(res, err) + } + + if err := m.validateRootVolume(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1AwsLaunchTemplate) validateAdditionalSecurityGroups(formats strfmt.Registry) error { + + if swag.IsZero(m.AdditionalSecurityGroups) { // not required + return nil + } + + if err := validate.UniqueItems("additionalSecurityGroups", "body", m.AdditionalSecurityGroups); err != nil { + return err + } + + for i := 0; i < len(m.AdditionalSecurityGroups); i++ { + if swag.IsZero(m.AdditionalSecurityGroups[i]) { // not required + continue + } + + if m.AdditionalSecurityGroups[i] != nil { + if err := m.AdditionalSecurityGroups[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("additionalSecurityGroups" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1AwsLaunchTemplate) validateAmi(formats strfmt.Registry) error { + + if swag.IsZero(m.Ami) { // not required + return nil + } + + if m.Ami != nil { + if err := m.Ami.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("ami") + } + return err + } + } + + return nil +} + +func (m *V1AwsLaunchTemplate) validateRootVolume(formats strfmt.Registry) error { + + if swag.IsZero(m.RootVolume) { // not required + return nil + } + + if m.RootVolume != nil { + if err := m.RootVolume.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("rootVolume") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1AwsLaunchTemplate) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1AwsLaunchTemplate) UnmarshalBinary(b []byte) error { + var res V1AwsLaunchTemplate + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_aws_login_credentials.go b/api/models/v1_aws_login_credentials.go new file mode 100644 index 00000000..5d733c09 --- /dev/null +++ b/api/models/v1_aws_login_credentials.go @@ -0,0 +1,71 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1AwsLoginCredentials v1 aws login credentials +// +// swagger:model v1AwsLoginCredentials +type V1AwsLoginCredentials struct { + + // iam user + IamUser string `json:"iamUser,omitempty"` + + // password + // Format: password + Password strfmt.Password `json:"password,omitempty"` +} + +// Validate validates this v1 aws login credentials +func (m *V1AwsLoginCredentials) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validatePassword(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1AwsLoginCredentials) validatePassword(formats strfmt.Registry) error { + + if swag.IsZero(m.Password) { // not required + return nil + } + + if err := validate.FormatOf("password", "body", "password", m.Password.String(), formats); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1AwsLoginCredentials) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1AwsLoginCredentials) UnmarshalBinary(b []byte) error { + var res V1AwsLoginCredentials + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_aws_machine.go b/api/models/v1_aws_machine.go new file mode 100644 index 00000000..18258ded --- /dev/null +++ b/api/models/v1_aws_machine.go @@ -0,0 +1,127 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1AwsMachine AWS cloud VM definition +// +// swagger:model v1AwsMachine +type V1AwsMachine struct { + + // api version + APIVersion string `json:"apiVersion,omitempty"` + + // kind + Kind string `json:"kind,omitempty"` + + // metadata + Metadata *V1ObjectMeta `json:"metadata,omitempty"` + + // spec + Spec *V1AwsMachineSpec `json:"spec,omitempty"` + + // status + Status *V1CloudMachineStatus `json:"status,omitempty"` +} + +// Validate validates this v1 aws machine +func (m *V1AwsMachine) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSpec(formats); err != nil { + res = append(res, err) + } + + if err := m.validateStatus(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1AwsMachine) validateMetadata(formats strfmt.Registry) error { + + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } + return err + } + } + + return nil +} + +func (m *V1AwsMachine) validateSpec(formats strfmt.Registry) error { + + if swag.IsZero(m.Spec) { // not required + return nil + } + + if m.Spec != nil { + if err := m.Spec.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec") + } + return err + } + } + + return nil +} + +func (m *V1AwsMachine) validateStatus(formats strfmt.Registry) error { + + if swag.IsZero(m.Status) { // not required + return nil + } + + if m.Status != nil { + if err := m.Status.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("status") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1AwsMachine) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1AwsMachine) UnmarshalBinary(b []byte) error { + var res V1AwsMachine + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_aws_machine_pool_cloud_config_entity.go b/api/models/v1_aws_machine_pool_cloud_config_entity.go new file mode 100644 index 00000000..89fcc984 --- /dev/null +++ b/api/models/v1_aws_machine_pool_cloud_config_entity.go @@ -0,0 +1,236 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "encoding/json" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1AwsMachinePoolCloudConfigEntity v1 aws machine pool cloud config entity +// +// swagger:model v1AwsMachinePoolCloudConfigEntity +type V1AwsMachinePoolCloudConfigEntity struct { + + // Additional Security groups + AdditionalSecurityGroups []*V1AwsResourceReference `json:"additionalSecurityGroups"` + + // azs + Azs []string `json:"azs"` + + // EC2 instance capacity type + // Enum: [on-demand spot] + CapacityType *string `json:"capacityType,omitempty"` + + // instance type + // Required: true + InstanceType *string `json:"instanceType"` + + // rootDeviceSize in GBs + // Maximum: 2000 + // Minimum: 1 + RootDeviceSize int64 `json:"rootDeviceSize,omitempty"` + + // SpotMarketOptions allows users to configure instances to be run using AWS Spot instances. + SpotMarketOptions *V1SpotMarketOptions `json:"spotMarketOptions,omitempty"` + + // subnets + Subnets []*V1AwsSubnetEntity `json:"subnets"` +} + +// Validate validates this v1 aws machine pool cloud config entity +func (m *V1AwsMachinePoolCloudConfigEntity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateAdditionalSecurityGroups(formats); err != nil { + res = append(res, err) + } + + if err := m.validateCapacityType(formats); err != nil { + res = append(res, err) + } + + if err := m.validateInstanceType(formats); err != nil { + res = append(res, err) + } + + if err := m.validateRootDeviceSize(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSpotMarketOptions(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSubnets(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1AwsMachinePoolCloudConfigEntity) validateAdditionalSecurityGroups(formats strfmt.Registry) error { + + if swag.IsZero(m.AdditionalSecurityGroups) { // not required + return nil + } + + for i := 0; i < len(m.AdditionalSecurityGroups); i++ { + if swag.IsZero(m.AdditionalSecurityGroups[i]) { // not required + continue + } + + if m.AdditionalSecurityGroups[i] != nil { + if err := m.AdditionalSecurityGroups[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("additionalSecurityGroups" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +var v1AwsMachinePoolCloudConfigEntityTypeCapacityTypePropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["on-demand","spot"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + v1AwsMachinePoolCloudConfigEntityTypeCapacityTypePropEnum = append(v1AwsMachinePoolCloudConfigEntityTypeCapacityTypePropEnum, v) + } +} + +const ( + + // V1AwsMachinePoolCloudConfigEntityCapacityTypeOnDemand captures enum value "on-demand" + V1AwsMachinePoolCloudConfigEntityCapacityTypeOnDemand string = "on-demand" + + // V1AwsMachinePoolCloudConfigEntityCapacityTypeSpot captures enum value "spot" + V1AwsMachinePoolCloudConfigEntityCapacityTypeSpot string = "spot" +) + +// prop value enum +func (m *V1AwsMachinePoolCloudConfigEntity) validateCapacityTypeEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, v1AwsMachinePoolCloudConfigEntityTypeCapacityTypePropEnum, true); err != nil { + return err + } + return nil +} + +func (m *V1AwsMachinePoolCloudConfigEntity) validateCapacityType(formats strfmt.Registry) error { + + if swag.IsZero(m.CapacityType) { // not required + return nil + } + + // value enum + if err := m.validateCapacityTypeEnum("capacityType", "body", *m.CapacityType); err != nil { + return err + } + + return nil +} + +func (m *V1AwsMachinePoolCloudConfigEntity) validateInstanceType(formats strfmt.Registry) error { + + if err := validate.Required("instanceType", "body", m.InstanceType); err != nil { + return err + } + + return nil +} + +func (m *V1AwsMachinePoolCloudConfigEntity) validateRootDeviceSize(formats strfmt.Registry) error { + + if swag.IsZero(m.RootDeviceSize) { // not required + return nil + } + + if err := validate.MinimumInt("rootDeviceSize", "body", int64(m.RootDeviceSize), 1, false); err != nil { + return err + } + + if err := validate.MaximumInt("rootDeviceSize", "body", int64(m.RootDeviceSize), 2000, false); err != nil { + return err + } + + return nil +} + +func (m *V1AwsMachinePoolCloudConfigEntity) validateSpotMarketOptions(formats strfmt.Registry) error { + + if swag.IsZero(m.SpotMarketOptions) { // not required + return nil + } + + if m.SpotMarketOptions != nil { + if err := m.SpotMarketOptions.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spotMarketOptions") + } + return err + } + } + + return nil +} + +func (m *V1AwsMachinePoolCloudConfigEntity) validateSubnets(formats strfmt.Registry) error { + + if swag.IsZero(m.Subnets) { // not required + return nil + } + + for i := 0; i < len(m.Subnets); i++ { + if swag.IsZero(m.Subnets[i]) { // not required + continue + } + + if m.Subnets[i] != nil { + if err := m.Subnets[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("subnets" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1AwsMachinePoolCloudConfigEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1AwsMachinePoolCloudConfigEntity) UnmarshalBinary(b []byte) error { + var res V1AwsMachinePoolCloudConfigEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_aws_machine_pool_config.go b/api/models/v1_aws_machine_pool_config.go new file mode 100644 index 00000000..ecd56a4f --- /dev/null +++ b/api/models/v1_aws_machine_pool_config.go @@ -0,0 +1,326 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "encoding/json" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1AwsMachinePoolConfig v1 aws machine pool config +// +// swagger:model v1AwsMachinePoolConfig +type V1AwsMachinePoolConfig struct { + + // additionalLabels + AdditionalLabels map[string]string `json:"additionalLabels,omitempty"` + + // Additional Security groups + AdditionalSecurityGroups []*V1AwsResourceReference `json:"additionalSecurityGroups"` + + // AdditionalTags is an optional set of tags to add to resources managed by the provider, in addition to the ones added by default. For eg., tags for EKS nodeGroup or EKS NodegroupIAMRole + AdditionalTags map[string]string `json:"additionalTags,omitempty"` + + // AZs is only used for dynamic placement + Azs []string `json:"azs"` + + // EC2 instance capacity type + // Enum: [on-demand spot] + CapacityType *string `json:"capacityType,omitempty"` + + // instance config + InstanceConfig *V1InstanceConfig `json:"instanceConfig,omitempty"` + + // instance type + InstanceType string `json:"instanceType,omitempty"` + + // whether this pool is for control plane + // Required: true + IsControlPlane *bool `json:"isControlPlane"` + + // labels for this pool, example: control-plane/worker, gpu, windows + Labels []string `json:"labels"` + + // machine pool properties + MachinePoolProperties *V1MachinePoolProperties `json:"machinePoolProperties,omitempty"` + + // max size of the pool, for scaling + MaxSize int32 `json:"maxSize,omitempty"` + + // min size of the pool, for scaling + MinSize int32 `json:"minSize,omitempty"` + + // name + Name string `json:"name,omitempty"` + + // Minimum number of seconds a node should be Ready, before the next node is selected for repave. Applicable only for workerpools in infrastructure cluster + NodeRepaveInterval int32 `json:"nodeRepaveInterval,omitempty"` + + // rootDeviceSize in GBs + RootDeviceSize int64 `json:"rootDeviceSize,omitempty"` + + // size of the pool, number of machines + Size int32 `json:"size,omitempty"` + + // SpotMarketOptions allows users to configure instances to be run using AWS Spot instances. + SpotMarketOptions *V1SpotMarketOptions `json:"spotMarketOptions,omitempty"` + + // AZ to subnet mapping filled by ally from hubble SubnetIDs ["us-west-2d"] = "subnet-079b6061" This field is optional If we don't provide a subnetId then by default the first private subnet from the AZ will be picked up for deployment + SubnetIds map[string]string `json:"subnetIds,omitempty"` + + // control plane or worker taints + // Unique: true + Taints []*V1Taint `json:"taints"` + + // rolling update strategy for this machinepool if not specified, will use ScaleOut + UpdateStrategy *V1UpdateStrategy `json:"updateStrategy,omitempty"` + + // if IsControlPlane==true && useControlPlaneAsWorker==true, then will remove control plane taint this will not be used for worker pools + UseControlPlaneAsWorker bool `json:"useControlPlaneAsWorker"` +} + +// Validate validates this v1 aws machine pool config +func (m *V1AwsMachinePoolConfig) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateAdditionalSecurityGroups(formats); err != nil { + res = append(res, err) + } + + if err := m.validateCapacityType(formats); err != nil { + res = append(res, err) + } + + if err := m.validateInstanceConfig(formats); err != nil { + res = append(res, err) + } + + if err := m.validateIsControlPlane(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMachinePoolProperties(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSpotMarketOptions(formats); err != nil { + res = append(res, err) + } + + if err := m.validateTaints(formats); err != nil { + res = append(res, err) + } + + if err := m.validateUpdateStrategy(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1AwsMachinePoolConfig) validateAdditionalSecurityGroups(formats strfmt.Registry) error { + + if swag.IsZero(m.AdditionalSecurityGroups) { // not required + return nil + } + + for i := 0; i < len(m.AdditionalSecurityGroups); i++ { + if swag.IsZero(m.AdditionalSecurityGroups[i]) { // not required + continue + } + + if m.AdditionalSecurityGroups[i] != nil { + if err := m.AdditionalSecurityGroups[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("additionalSecurityGroups" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +var v1AwsMachinePoolConfigTypeCapacityTypePropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["on-demand","spot"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + v1AwsMachinePoolConfigTypeCapacityTypePropEnum = append(v1AwsMachinePoolConfigTypeCapacityTypePropEnum, v) + } +} + +const ( + + // V1AwsMachinePoolConfigCapacityTypeOnDemand captures enum value "on-demand" + V1AwsMachinePoolConfigCapacityTypeOnDemand string = "on-demand" + + // V1AwsMachinePoolConfigCapacityTypeSpot captures enum value "spot" + V1AwsMachinePoolConfigCapacityTypeSpot string = "spot" +) + +// prop value enum +func (m *V1AwsMachinePoolConfig) validateCapacityTypeEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, v1AwsMachinePoolConfigTypeCapacityTypePropEnum, true); err != nil { + return err + } + return nil +} + +func (m *V1AwsMachinePoolConfig) validateCapacityType(formats strfmt.Registry) error { + + if swag.IsZero(m.CapacityType) { // not required + return nil + } + + // value enum + if err := m.validateCapacityTypeEnum("capacityType", "body", *m.CapacityType); err != nil { + return err + } + + return nil +} + +func (m *V1AwsMachinePoolConfig) validateInstanceConfig(formats strfmt.Registry) error { + + if swag.IsZero(m.InstanceConfig) { // not required + return nil + } + + if m.InstanceConfig != nil { + if err := m.InstanceConfig.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("instanceConfig") + } + return err + } + } + + return nil +} + +func (m *V1AwsMachinePoolConfig) validateIsControlPlane(formats strfmt.Registry) error { + + if err := validate.Required("isControlPlane", "body", m.IsControlPlane); err != nil { + return err + } + + return nil +} + +func (m *V1AwsMachinePoolConfig) validateMachinePoolProperties(formats strfmt.Registry) error { + + if swag.IsZero(m.MachinePoolProperties) { // not required + return nil + } + + if m.MachinePoolProperties != nil { + if err := m.MachinePoolProperties.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("machinePoolProperties") + } + return err + } + } + + return nil +} + +func (m *V1AwsMachinePoolConfig) validateSpotMarketOptions(formats strfmt.Registry) error { + + if swag.IsZero(m.SpotMarketOptions) { // not required + return nil + } + + if m.SpotMarketOptions != nil { + if err := m.SpotMarketOptions.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spotMarketOptions") + } + return err + } + } + + return nil +} + +func (m *V1AwsMachinePoolConfig) validateTaints(formats strfmt.Registry) error { + + if swag.IsZero(m.Taints) { // not required + return nil + } + + if err := validate.UniqueItems("taints", "body", m.Taints); err != nil { + return err + } + + for i := 0; i < len(m.Taints); i++ { + if swag.IsZero(m.Taints[i]) { // not required + continue + } + + if m.Taints[i] != nil { + if err := m.Taints[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("taints" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1AwsMachinePoolConfig) validateUpdateStrategy(formats strfmt.Registry) error { + + if swag.IsZero(m.UpdateStrategy) { // not required + return nil + } + + if m.UpdateStrategy != nil { + if err := m.UpdateStrategy.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("updateStrategy") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1AwsMachinePoolConfig) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1AwsMachinePoolConfig) UnmarshalBinary(b []byte) error { + var res V1AwsMachinePoolConfig + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_aws_machine_pool_config_entity.go b/api/models/v1_aws_machine_pool_config_entity.go new file mode 100644 index 00000000..05293b7a --- /dev/null +++ b/api/models/v1_aws_machine_pool_config_entity.go @@ -0,0 +1,98 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1AwsMachinePoolConfigEntity v1 aws machine pool config entity +// +// swagger:model v1AwsMachinePoolConfigEntity +type V1AwsMachinePoolConfigEntity struct { + + // cloud config + // Required: true + CloudConfig *V1AwsMachinePoolCloudConfigEntity `json:"cloudConfig"` + + // pool config + PoolConfig *V1MachinePoolConfigEntity `json:"poolConfig,omitempty"` +} + +// Validate validates this v1 aws machine pool config entity +func (m *V1AwsMachinePoolConfigEntity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateCloudConfig(formats); err != nil { + res = append(res, err) + } + + if err := m.validatePoolConfig(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1AwsMachinePoolConfigEntity) validateCloudConfig(formats strfmt.Registry) error { + + if err := validate.Required("cloudConfig", "body", m.CloudConfig); err != nil { + return err + } + + if m.CloudConfig != nil { + if err := m.CloudConfig.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("cloudConfig") + } + return err + } + } + + return nil +} + +func (m *V1AwsMachinePoolConfigEntity) validatePoolConfig(formats strfmt.Registry) error { + + if swag.IsZero(m.PoolConfig) { // not required + return nil + } + + if m.PoolConfig != nil { + if err := m.PoolConfig.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("poolConfig") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1AwsMachinePoolConfigEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1AwsMachinePoolConfigEntity) UnmarshalBinary(b []byte) error { + var res V1AwsMachinePoolConfigEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_aws_machine_spec.go b/api/models/v1_aws_machine_spec.go new file mode 100644 index 00000000..823357f2 --- /dev/null +++ b/api/models/v1_aws_machine_spec.go @@ -0,0 +1,185 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1AwsMachineSpec AWS cloud VM definition spec +// +// swagger:model v1AwsMachineSpec +type V1AwsMachineSpec struct { + + // Additional Security groups + AdditionalSecurityGroups []*V1AwsResourceReference `json:"additionalSecurityGroups"` + + // ami + // Required: true + Ami *string `json:"ami"` + + // az + Az string `json:"az,omitempty"` + + // dns name + DNSName string `json:"dnsName,omitempty"` + + // iam profile + IamProfile string `json:"iamProfile,omitempty"` + + // instance type + // Required: true + InstanceType *string `json:"instanceType"` + + // nics + Nics []*V1AwsNic `json:"nics"` + + // phase + Phase string `json:"phase,omitempty"` + + // ssh key name + SSHKeyName string `json:"sshKeyName,omitempty"` + + // subnet Id + SubnetID string `json:"subnetId,omitempty"` + + // type + Type string `json:"type,omitempty"` + + // vpc Id + // Required: true + VpcID *string `json:"vpcId"` +} + +// Validate validates this v1 aws machine spec +func (m *V1AwsMachineSpec) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateAdditionalSecurityGroups(formats); err != nil { + res = append(res, err) + } + + if err := m.validateAmi(formats); err != nil { + res = append(res, err) + } + + if err := m.validateInstanceType(formats); err != nil { + res = append(res, err) + } + + if err := m.validateNics(formats); err != nil { + res = append(res, err) + } + + if err := m.validateVpcID(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1AwsMachineSpec) validateAdditionalSecurityGroups(formats strfmt.Registry) error { + + if swag.IsZero(m.AdditionalSecurityGroups) { // not required + return nil + } + + for i := 0; i < len(m.AdditionalSecurityGroups); i++ { + if swag.IsZero(m.AdditionalSecurityGroups[i]) { // not required + continue + } + + if m.AdditionalSecurityGroups[i] != nil { + if err := m.AdditionalSecurityGroups[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("additionalSecurityGroups" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1AwsMachineSpec) validateAmi(formats strfmt.Registry) error { + + if err := validate.Required("ami", "body", m.Ami); err != nil { + return err + } + + return nil +} + +func (m *V1AwsMachineSpec) validateInstanceType(formats strfmt.Registry) error { + + if err := validate.Required("instanceType", "body", m.InstanceType); err != nil { + return err + } + + return nil +} + +func (m *V1AwsMachineSpec) validateNics(formats strfmt.Registry) error { + + if swag.IsZero(m.Nics) { // not required + return nil + } + + for i := 0; i < len(m.Nics); i++ { + if swag.IsZero(m.Nics[i]) { // not required + continue + } + + if m.Nics[i] != nil { + if err := m.Nics[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("nics" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1AwsMachineSpec) validateVpcID(formats strfmt.Registry) error { + + if err := validate.Required("vpcId", "body", m.VpcID); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1AwsMachineSpec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1AwsMachineSpec) UnmarshalBinary(b []byte) error { + var res V1AwsMachineSpec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_aws_machines.go b/api/models/v1_aws_machines.go new file mode 100644 index 00000000..34e51341 --- /dev/null +++ b/api/models/v1_aws_machines.go @@ -0,0 +1,112 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1AwsMachines AWS machine list +// +// swagger:model v1AwsMachines +type V1AwsMachines struct { + + // items + // Required: true + // Unique: true + Items []*V1AwsMachine `json:"items"` + + // listmeta + Listmeta *V1ListMetaData `json:"listmeta,omitempty"` +} + +// Validate validates this v1 aws machines +func (m *V1AwsMachines) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateItems(formats); err != nil { + res = append(res, err) + } + + if err := m.validateListmeta(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1AwsMachines) validateItems(formats strfmt.Registry) error { + + if err := validate.Required("items", "body", m.Items); err != nil { + return err + } + + if err := validate.UniqueItems("items", "body", m.Items); err != nil { + return err + } + + for i := 0; i < len(m.Items); i++ { + if swag.IsZero(m.Items[i]) { // not required + continue + } + + if m.Items[i] != nil { + if err := m.Items[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("items" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1AwsMachines) validateListmeta(formats strfmt.Registry) error { + + if swag.IsZero(m.Listmeta) { // not required + return nil + } + + if m.Listmeta != nil { + if err := m.Listmeta.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("listmeta") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1AwsMachines) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1AwsMachines) UnmarshalBinary(b []byte) error { + var res V1AwsMachines + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_aws_nic.go b/api/models/v1_aws_nic.go new file mode 100644 index 00000000..f4a207fd --- /dev/null +++ b/api/models/v1_aws_nic.go @@ -0,0 +1,49 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1AwsNic AWS network interface +// +// swagger:model v1AwsNic +type V1AwsNic struct { + + // index + Index int8 `json:"index,omitempty"` + + // private i ps + PrivateIPs []string `json:"privateIPs"` + + // public Ip + PublicIP string `json:"publicIp,omitempty"` +} + +// Validate validates this v1 aws nic +func (m *V1AwsNic) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1AwsNic) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1AwsNic) UnmarshalBinary(b []byte) error { + var res V1AwsNic + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_aws_partition.go b/api/models/v1_aws_partition.go new file mode 100644 index 00000000..9ec2db87 --- /dev/null +++ b/api/models/v1_aws_partition.go @@ -0,0 +1,63 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "encoding/json" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" +) + +// V1AwsPartition AWS accounts are scoped to a single partition. Allowed values [aws, aws-us-gov], Default values +// +// swagger:model v1AwsPartition +type V1AwsPartition string + +const ( + + // V1AwsPartitionAws captures enum value "aws" + V1AwsPartitionAws V1AwsPartition = "aws" + + // V1AwsPartitionAwsUsGov captures enum value "aws-us-gov" + V1AwsPartitionAwsUsGov V1AwsPartition = "aws-us-gov" +) + +// for schema +var v1AwsPartitionEnum []interface{} + +func init() { + var res []V1AwsPartition + if err := json.Unmarshal([]byte(`["aws","aws-us-gov"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + v1AwsPartitionEnum = append(v1AwsPartitionEnum, v) + } +} + +func (m V1AwsPartition) validateV1AwsPartitionEnum(path, location string, value V1AwsPartition) error { + if err := validate.EnumCase(path, location, value, v1AwsPartitionEnum, true); err != nil { + return err + } + return nil +} + +// Validate validates this v1 aws partition +func (m V1AwsPartition) Validate(formats strfmt.Registry) error { + var res []error + + // value enum + if err := m.validateV1AwsPartitionEnum("", "body", m); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/models/v1_aws_policies.go b/api/models/v1_aws_policies.go new file mode 100644 index 00000000..f2f3ebfd --- /dev/null +++ b/api/models/v1_aws_policies.go @@ -0,0 +1,82 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1AwsPolicies v1 aws policies +// +// swagger:model v1AwsPolicies +type V1AwsPolicies struct { + + // policies + // Required: true + Policies []*V1AwsIamPolicy `json:"policies"` +} + +// Validate validates this v1 aws policies +func (m *V1AwsPolicies) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validatePolicies(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1AwsPolicies) validatePolicies(formats strfmt.Registry) error { + + if err := validate.Required("policies", "body", m.Policies); err != nil { + return err + } + + for i := 0; i < len(m.Policies); i++ { + if swag.IsZero(m.Policies[i]) { // not required + continue + } + + if m.Policies[i] != nil { + if err := m.Policies[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("policies" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1AwsPolicies) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1AwsPolicies) UnmarshalBinary(b []byte) error { + var res V1AwsPolicies + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_aws_policy_arns_spec.go b/api/models/v1_aws_policy_arns_spec.go new file mode 100644 index 00000000..a9f509b7 --- /dev/null +++ b/api/models/v1_aws_policy_arns_spec.go @@ -0,0 +1,90 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1AwsPolicyArnsSpec Aws policy ARNs spec +// +// swagger:model v1AwsPolicyArnsSpec +type V1AwsPolicyArnsSpec struct { + + // account + // Required: true + Account *V1AwsCloudAccount `json:"account"` + + // policy arns + // Required: true + PolicyArns []string `json:"policyArns"` +} + +// Validate validates this v1 aws policy arns spec +func (m *V1AwsPolicyArnsSpec) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateAccount(formats); err != nil { + res = append(res, err) + } + + if err := m.validatePolicyArns(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1AwsPolicyArnsSpec) validateAccount(formats strfmt.Registry) error { + + if err := validate.Required("account", "body", m.Account); err != nil { + return err + } + + if m.Account != nil { + if err := m.Account.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("account") + } + return err + } + } + + return nil +} + +func (m *V1AwsPolicyArnsSpec) validatePolicyArns(formats strfmt.Registry) error { + + if err := validate.Required("policyArns", "body", m.PolicyArns); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1AwsPolicyArnsSpec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1AwsPolicyArnsSpec) UnmarshalBinary(b []byte) error { + var res V1AwsPolicyArnsSpec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_aws_properties_validate_spec.go b/api/models/v1_aws_properties_validate_spec.go new file mode 100644 index 00000000..abd65476 --- /dev/null +++ b/api/models/v1_aws_properties_validate_spec.go @@ -0,0 +1,46 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1AwsPropertiesValidateSpec AWS properties validate spec +// +// swagger:model V1AwsPropertiesValidateSpec +type V1AwsPropertiesValidateSpec struct { + + // region + Region string `json:"region,omitempty"` + + // ssh key name + SSHKeyName string `json:"sshKeyName,omitempty"` +} + +// Validate validates this v1 aws properties validate spec +func (m *V1AwsPropertiesValidateSpec) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1AwsPropertiesValidateSpec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1AwsPropertiesValidateSpec) UnmarshalBinary(b []byte) error { + var res V1AwsPropertiesValidateSpec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_aws_region.go b/api/models/v1_aws_region.go new file mode 100644 index 00000000..0208cf6a --- /dev/null +++ b/api/models/v1_aws_region.go @@ -0,0 +1,49 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1AwsRegion AWS region which represents separate geographic area. +// +// swagger:model v1AwsRegion +type V1AwsRegion struct { + + // AWS offer a regional endpoint that can used to make requests + Endpoint string `json:"endpoint,omitempty"` + + // Name of the AWS region + Name string `json:"name,omitempty"` + + // Enable your account to operate in the particular regions + OptInStatus string `json:"optInStatus,omitempty"` +} + +// Validate validates this v1 aws region +func (m *V1AwsRegion) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1AwsRegion) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1AwsRegion) UnmarshalBinary(b []byte) error { + var res V1AwsRegion + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_aws_regions.go b/api/models/v1_aws_regions.go new file mode 100644 index 00000000..00d38f98 --- /dev/null +++ b/api/models/v1_aws_regions.go @@ -0,0 +1,82 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1AwsRegions v1 aws regions +// +// swagger:model v1AwsRegions +type V1AwsRegions struct { + + // List of AWS regions + // Required: true + Regions []*V1AwsRegion `json:"regions"` +} + +// Validate validates this v1 aws regions +func (m *V1AwsRegions) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateRegions(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1AwsRegions) validateRegions(formats strfmt.Registry) error { + + if err := validate.Required("regions", "body", m.Regions); err != nil { + return err + } + + for i := 0; i < len(m.Regions); i++ { + if swag.IsZero(m.Regions[i]) { // not required + continue + } + + if m.Regions[i] != nil { + if err := m.Regions[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("regions" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1AwsRegions) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1AwsRegions) UnmarshalBinary(b []byte) error { + var res V1AwsRegions + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_aws_resource_filter.go b/api/models/v1_aws_resource_filter.go new file mode 100644 index 00000000..8f9b19a8 --- /dev/null +++ b/api/models/v1_aws_resource_filter.go @@ -0,0 +1,71 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1AwsResourceFilter Filter is a filter used to identify an AWS resource +// +// swagger:model v1AwsResourceFilter +type V1AwsResourceFilter struct { + + // Name of the filter. Filter names are case-sensitive + Name string `json:"name,omitempty"` + + // Values includes one or more filter values. Filter values are case-sensitive + // Unique: true + Values []string `json:"values"` +} + +// Validate validates this v1 aws resource filter +func (m *V1AwsResourceFilter) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateValues(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1AwsResourceFilter) validateValues(formats strfmt.Registry) error { + + if swag.IsZero(m.Values) { // not required + return nil + } + + if err := validate.UniqueItems("values", "body", m.Values); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1AwsResourceFilter) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1AwsResourceFilter) UnmarshalBinary(b []byte) error { + var res V1AwsResourceFilter + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_aws_resource_reference.go b/api/models/v1_aws_resource_reference.go new file mode 100644 index 00000000..753b0db5 --- /dev/null +++ b/api/models/v1_aws_resource_reference.go @@ -0,0 +1,92 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1AwsResourceReference AWSResourceReference is a reference to a specific AWS resource by ID or filters +// +// swagger:model v1AwsResourceReference +type V1AwsResourceReference struct { + + // ARN of resource + Arn string `json:"arn,omitempty"` + + // Filters is a set of key/value pairs used to identify a resource + // Unique: true + Filters []*V1AwsResourceFilter `json:"filters"` + + // ID of resource + ID string `json:"id,omitempty"` +} + +// Validate validates this v1 aws resource reference +func (m *V1AwsResourceReference) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateFilters(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1AwsResourceReference) validateFilters(formats strfmt.Registry) error { + + if swag.IsZero(m.Filters) { // not required + return nil + } + + if err := validate.UniqueItems("filters", "body", m.Filters); err != nil { + return err + } + + for i := 0; i < len(m.Filters); i++ { + if swag.IsZero(m.Filters[i]) { // not required + continue + } + + if m.Filters[i] != nil { + if err := m.Filters[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("filters" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1AwsResourceReference) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1AwsResourceReference) UnmarshalBinary(b []byte) error { + var res V1AwsResourceReference + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_aws_root_volume.go b/api/models/v1_aws_root_volume.go new file mode 100644 index 00000000..f20ce5c6 --- /dev/null +++ b/api/models/v1_aws_root_volume.go @@ -0,0 +1,58 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1AwsRootVolume Volume encapsulates the configuration options for the storage device. +// +// swagger:model v1AwsRootVolume +type V1AwsRootVolume struct { + + // Device name + DeviceName string `json:"deviceName,omitempty"` + + // EncryptionKey is the KMS key to use to encrypt the volume. Can be either a KMS key ID or ARN + Encrypted bool `json:"encrypted,omitempty"` + + // EncryptionKey is the KMS key to use to encrypt the volume. Can be either a KMS key ID or ARN + EncryptionKey string `json:"encryptionKey,omitempty"` + + // IOPS is the number of IOPS requested for the disk. Not applicable to all types + Iops int64 `json:"iops,omitempty"` + + // Throughput to provision in MiB/s supported for the volume type. Not applicable to all types. + Throughput int64 `json:"throughput,omitempty"` + + // Type is the type of the volume (e.g. gp2, io1, etc...) + Type string `json:"type,omitempty"` +} + +// Validate validates this v1 aws root volume +func (m *V1AwsRootVolume) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1AwsRootVolume) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1AwsRootVolume) UnmarshalBinary(b []byte) error { + var res V1AwsRootVolume + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_aws_s3_bucket_credentials.go b/api/models/v1_aws_s3_bucket_credentials.go new file mode 100644 index 00000000..72b33727 --- /dev/null +++ b/api/models/v1_aws_s3_bucket_credentials.go @@ -0,0 +1,110 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1AwsS3BucketCredentials AWS S3 Bucket credentials +// +// swagger:model v1AwsS3BucketCredentials +type V1AwsS3BucketCredentials struct { + + // Name of AWS S3 bucket + // Required: true + Bucket *string `json:"bucket"` + + // credentials + // Required: true + Credentials *V1AwsCloudAccount `json:"credentials"` + + // Name of the folder in the specified AWS S3 bucket. + Folder string `json:"folder,omitempty"` + + // Name of the available AWS region. + // Required: true + Region *string `json:"region"` +} + +// Validate validates this v1 aws s3 bucket credentials +func (m *V1AwsS3BucketCredentials) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateBucket(formats); err != nil { + res = append(res, err) + } + + if err := m.validateCredentials(formats); err != nil { + res = append(res, err) + } + + if err := m.validateRegion(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1AwsS3BucketCredentials) validateBucket(formats strfmt.Registry) error { + + if err := validate.Required("bucket", "body", m.Bucket); err != nil { + return err + } + + return nil +} + +func (m *V1AwsS3BucketCredentials) validateCredentials(formats strfmt.Registry) error { + + if err := validate.Required("credentials", "body", m.Credentials); err != nil { + return err + } + + if m.Credentials != nil { + if err := m.Credentials.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("credentials") + } + return err + } + } + + return nil +} + +func (m *V1AwsS3BucketCredentials) validateRegion(formats strfmt.Registry) error { + + if err := validate.Required("region", "body", m.Region); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1AwsS3BucketCredentials) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1AwsS3BucketCredentials) UnmarshalBinary(b []byte) error { + var res V1AwsS3BucketCredentials + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_aws_security_groups.go b/api/models/v1_aws_security_groups.go new file mode 100644 index 00000000..fda3b206 --- /dev/null +++ b/api/models/v1_aws_security_groups.go @@ -0,0 +1,82 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1AwsSecurityGroups v1 aws security groups +// +// swagger:model v1AwsSecurityGroups +type V1AwsSecurityGroups struct { + + // groups + // Required: true + Groups []*V1AwsSecuritygroup `json:"groups"` +} + +// Validate validates this v1 aws security groups +func (m *V1AwsSecurityGroups) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateGroups(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1AwsSecurityGroups) validateGroups(formats strfmt.Registry) error { + + if err := validate.Required("groups", "body", m.Groups); err != nil { + return err + } + + for i := 0; i < len(m.Groups); i++ { + if swag.IsZero(m.Groups[i]) { // not required + continue + } + + if m.Groups[i] != nil { + if err := m.Groups[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("groups" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1AwsSecurityGroups) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1AwsSecurityGroups) UnmarshalBinary(b []byte) error { + var res V1AwsSecurityGroups + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_aws_securitygroup.go b/api/models/v1_aws_securitygroup.go new file mode 100644 index 00000000..3306a186 --- /dev/null +++ b/api/models/v1_aws_securitygroup.go @@ -0,0 +1,49 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1AwsSecuritygroup Aws security group +// +// swagger:model v1AwsSecuritygroup +type V1AwsSecuritygroup struct { + + // group Id + GroupID string `json:"groupId,omitempty"` + + // group name + GroupName string `json:"groupName,omitempty"` + + // owner Id + OwnerID string `json:"ownerId,omitempty"` +} + +// Validate validates this v1 aws securitygroup +func (m *V1AwsSecuritygroup) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1AwsSecuritygroup) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1AwsSecuritygroup) UnmarshalBinary(b []byte) error { + var res V1AwsSecuritygroup + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_aws_storage_types.go b/api/models/v1_aws_storage_types.go new file mode 100644 index 00000000..5b57e182 --- /dev/null +++ b/api/models/v1_aws_storage_types.go @@ -0,0 +1,80 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1AwsStorageTypes v1 aws storage types +// +// swagger:model v1AwsStorageTypes +type V1AwsStorageTypes struct { + + // List of AWS storage types + StorageTypes []*V1StorageType `json:"storageTypes"` +} + +// Validate validates this v1 aws storage types +func (m *V1AwsStorageTypes) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateStorageTypes(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1AwsStorageTypes) validateStorageTypes(formats strfmt.Registry) error { + + if swag.IsZero(m.StorageTypes) { // not required + return nil + } + + for i := 0; i < len(m.StorageTypes); i++ { + if swag.IsZero(m.StorageTypes[i]) { // not required + continue + } + + if m.StorageTypes[i] != nil { + if err := m.StorageTypes[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("storageTypes" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1AwsStorageTypes) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1AwsStorageTypes) UnmarshalBinary(b []byte) error { + var res V1AwsStorageTypes + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_aws_sts_credentials.go b/api/models/v1_aws_sts_credentials.go new file mode 100644 index 00000000..f63bf224 --- /dev/null +++ b/api/models/v1_aws_sts_credentials.go @@ -0,0 +1,46 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1AwsStsCredentials Aws sts credentials +// +// swagger:model v1AwsStsCredentials +type V1AwsStsCredentials struct { + + // Arn for the aws sts credentials in cloud account + Arn string `json:"arn,omitempty"` + + // ExternalId for the aws sts credentials in cloud account + ExternalID string `json:"externalId,omitempty"` +} + +// Validate validates this v1 aws sts credentials +func (m *V1AwsStsCredentials) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1AwsStsCredentials) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1AwsStsCredentials) UnmarshalBinary(b []byte) error { + var res V1AwsStsCredentials + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_aws_subnet.go b/api/models/v1_aws_subnet.go new file mode 100644 index 00000000..5e5af6eb --- /dev/null +++ b/api/models/v1_aws_subnet.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1AwsSubnet A subnet is a range of IP addresses in a AWS VPC +// +// swagger:model v1AwsSubnet +type V1AwsSubnet struct { + + // Every subnet can only be associated with only one Availability Zone + Az string `json:"az,omitempty"` + + // Is this subnet private + IsPrivate bool `json:"isPrivate,omitempty"` + + // Indicates whether instances launched in this subnet receive a public IPv4 address. + MapPublicIPOnLaunch bool `json:"mapPublicIpOnLaunch"` + + // Name of the subnet + Name string `json:"name,omitempty"` + + // Id of the subnet + SubnetID string `json:"subnetId,omitempty"` +} + +// Validate validates this v1 aws subnet +func (m *V1AwsSubnet) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1AwsSubnet) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1AwsSubnet) UnmarshalBinary(b []byte) error { + var res V1AwsSubnet + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_aws_subnet_entity.go b/api/models/v1_aws_subnet_entity.go new file mode 100644 index 00000000..11df4439 --- /dev/null +++ b/api/models/v1_aws_subnet_entity.go @@ -0,0 +1,46 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1AwsSubnetEntity v1 aws subnet entity +// +// swagger:model v1AwsSubnetEntity +type V1AwsSubnetEntity struct { + + // az + Az string `json:"az,omitempty"` + + // id + ID string `json:"id,omitempty"` +} + +// Validate validates this v1 aws subnet entity +func (m *V1AwsSubnetEntity) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1AwsSubnetEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1AwsSubnetEntity) UnmarshalBinary(b []byte) error { + var res V1AwsSubnetEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_aws_user_cloud_account.go b/api/models/v1_aws_user_cloud_account.go new file mode 100644 index 00000000..ae3b0ad5 --- /dev/null +++ b/api/models/v1_aws_user_cloud_account.go @@ -0,0 +1,74 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1AwsUserCloudAccount v1 aws user cloud account +// +// swagger:model v1AwsUserCloudAccount +type V1AwsUserCloudAccount struct { + + // account Id + AccountID string `json:"accountId,omitempty"` + + // cloud account + CloudAccount *V1AwsCloudAccount `json:"cloudAccount,omitempty"` +} + +// Validate validates this v1 aws user cloud account +func (m *V1AwsUserCloudAccount) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateCloudAccount(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1AwsUserCloudAccount) validateCloudAccount(formats strfmt.Registry) error { + + if swag.IsZero(m.CloudAccount) { // not required + return nil + } + + if m.CloudAccount != nil { + if err := m.CloudAccount.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("cloudAccount") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1AwsUserCloudAccount) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1AwsUserCloudAccount) UnmarshalBinary(b []byte) error { + var res V1AwsUserCloudAccount + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_aws_volume_size.go b/api/models/v1_aws_volume_size.go new file mode 100644 index 00000000..0f8b8ed3 --- /dev/null +++ b/api/models/v1_aws_volume_size.go @@ -0,0 +1,43 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1AwsVolumeSize AWS Volume Size entity +// +// swagger:model v1AwsVolumeSize +type V1AwsVolumeSize struct { + + // AWS volume size + SizeGB int64 `json:"sizeGB,omitempty"` +} + +// Validate validates this v1 aws volume size +func (m *V1AwsVolumeSize) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1AwsVolumeSize) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1AwsVolumeSize) UnmarshalBinary(b []byte) error { + var res V1AwsVolumeSize + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_aws_volume_type.go b/api/models/v1_aws_volume_type.go new file mode 100644 index 00000000..f5b16743 --- /dev/null +++ b/api/models/v1_aws_volume_type.go @@ -0,0 +1,52 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1AwsVolumeType AWS Volume Type entity +// +// swagger:model v1AwsVolumeType +type V1AwsVolumeType struct { + + // AWS volume type id + ID string `json:"id,omitempty"` + + // Iops through put of volume type + MaxIops string `json:"maxIops,omitempty"` + + // Max through put of volume type + MaxThroughPut string `json:"maxThroughPut,omitempty"` + + // AWS Volume Type Name + Name string `json:"name,omitempty"` +} + +// Validate validates this v1 aws volume type +func (m *V1AwsVolumeType) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1AwsVolumeType) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1AwsVolumeType) UnmarshalBinary(b []byte) error { + var res V1AwsVolumeType + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_aws_vpc.go b/api/models/v1_aws_vpc.go new file mode 100644 index 00000000..278d24f4 --- /dev/null +++ b/api/models/v1_aws_vpc.go @@ -0,0 +1,104 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1AwsVpc A virtual network dedicated to a AWS account +// +// swagger:model v1AwsVpc +type V1AwsVpc struct { + + // cidr block + CidrBlock string `json:"cidrBlock,omitempty"` + + // Name of the virtual network + Name string `json:"name,omitempty"` + + // List of subnets associated to a AWS VPC + Subnets []*V1AwsSubnet `json:"subnets"` + + // Id of the virtual network + // Required: true + VpcID *string `json:"vpcId"` +} + +// Validate validates this v1 aws vpc +func (m *V1AwsVpc) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateSubnets(formats); err != nil { + res = append(res, err) + } + + if err := m.validateVpcID(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1AwsVpc) validateSubnets(formats strfmt.Registry) error { + + if swag.IsZero(m.Subnets) { // not required + return nil + } + + for i := 0; i < len(m.Subnets); i++ { + if swag.IsZero(m.Subnets[i]) { // not required + continue + } + + if m.Subnets[i] != nil { + if err := m.Subnets[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("subnets" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1AwsVpc) validateVpcID(formats strfmt.Registry) error { + + if err := validate.Required("vpcId", "body", m.VpcID); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1AwsVpc) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1AwsVpc) UnmarshalBinary(b []byte) error { + var res V1AwsVpc + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_aws_vpcs.go b/api/models/v1_aws_vpcs.go new file mode 100644 index 00000000..6b635294 --- /dev/null +++ b/api/models/v1_aws_vpcs.go @@ -0,0 +1,82 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1AwsVpcs List of AWS VPCs +// +// swagger:model v1AwsVpcs +type V1AwsVpcs struct { + + // vpcs + // Required: true + Vpcs []*V1AwsVpc `json:"vpcs"` +} + +// Validate validates this v1 aws vpcs +func (m *V1AwsVpcs) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateVpcs(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1AwsVpcs) validateVpcs(formats strfmt.Registry) error { + + if err := validate.Required("vpcs", "body", m.Vpcs); err != nil { + return err + } + + for i := 0; i < len(m.Vpcs); i++ { + if swag.IsZero(m.Vpcs[i]) { // not required + continue + } + + if m.Vpcs[i] != nil { + if err := m.Vpcs[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("vpcs" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1AwsVpcs) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1AwsVpcs) UnmarshalBinary(b []byte) error { + var res V1AwsVpcs + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_az_validate_entity.go b/api/models/v1_az_validate_entity.go new file mode 100644 index 00000000..a27ced84 --- /dev/null +++ b/api/models/v1_az_validate_entity.go @@ -0,0 +1,52 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1AzValidateEntity Az validate entity +// +// swagger:model v1AzValidateEntity +type V1AzValidateEntity struct { + + // Gcp Azs + Azs []string `json:"azs"` + + // Gcp project + Project string `json:"project,omitempty"` + + // Gcp region + Region string `json:"region,omitempty"` + + // Cloud account uid + UID string `json:"uid,omitempty"` +} + +// Validate validates this v1 az validate entity +func (m *V1AzValidateEntity) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1AzValidateEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1AzValidateEntity) UnmarshalBinary(b []byte) error { + var res V1AzValidateEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_azure_account.go b/api/models/v1_azure_account.go new file mode 100644 index 00000000..5881b4f8 --- /dev/null +++ b/api/models/v1_azure_account.go @@ -0,0 +1,127 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1AzureAccount Azure account information +// +// swagger:model v1AzureAccount +type V1AzureAccount struct { + + // Cloud account api version + APIVersion string `json:"apiVersion,omitempty"` + + // Cloud account kind + Kind string `json:"kind,omitempty"` + + // metadata + Metadata *V1ObjectMeta `json:"metadata,omitempty"` + + // spec + Spec *V1AzureCloudAccount `json:"spec,omitempty"` + + // status + Status *V1CloudAccountStatus `json:"status,omitempty"` +} + +// Validate validates this v1 azure account +func (m *V1AzureAccount) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSpec(formats); err != nil { + res = append(res, err) + } + + if err := m.validateStatus(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1AzureAccount) validateMetadata(formats strfmt.Registry) error { + + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } + return err + } + } + + return nil +} + +func (m *V1AzureAccount) validateSpec(formats strfmt.Registry) error { + + if swag.IsZero(m.Spec) { // not required + return nil + } + + if m.Spec != nil { + if err := m.Spec.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec") + } + return err + } + } + + return nil +} + +func (m *V1AzureAccount) validateStatus(formats strfmt.Registry) error { + + if swag.IsZero(m.Status) { // not required + return nil + } + + if m.Status != nil { + if err := m.Status.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("status") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1AzureAccount) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1AzureAccount) UnmarshalBinary(b []byte) error { + var res V1AzureAccount + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_azure_account_entity_spec.go b/api/models/v1_azure_account_entity_spec.go new file mode 100644 index 00000000..a2d9bbca --- /dev/null +++ b/api/models/v1_azure_account_entity_spec.go @@ -0,0 +1,115 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "encoding/json" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1AzureAccountEntitySpec v1 azure account entity spec +// +// swagger:model v1.AzureAccountEntitySpec +type V1AzureAccountEntitySpec struct { + + // Contains configuration for Azure cloud + // Enum: [azure-china azure-government public] + ClientCloud *string `json:"clientCloud,omitempty"` + + // client Id + ClientID string `json:"clientId,omitempty"` + + // client secret + ClientSecret string `json:"clientSecret,omitempty"` + + // subscription Id + SubscriptionID string `json:"subscriptionId,omitempty"` + + // tenant Id + TenantID string `json:"tenantId,omitempty"` +} + +// Validate validates this v1 azure account entity spec +func (m *V1AzureAccountEntitySpec) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateClientCloud(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +var v1AzureAccountEntitySpecTypeClientCloudPropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["azure-china","azure-government","public"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + v1AzureAccountEntitySpecTypeClientCloudPropEnum = append(v1AzureAccountEntitySpecTypeClientCloudPropEnum, v) + } +} + +const ( + + // V1AzureAccountEntitySpecClientCloudAzureChina captures enum value "azure-china" + V1AzureAccountEntitySpecClientCloudAzureChina string = "azure-china" + + // V1AzureAccountEntitySpecClientCloudAzureGovernment captures enum value "azure-government" + V1AzureAccountEntitySpecClientCloudAzureGovernment string = "azure-government" + + // V1AzureAccountEntitySpecClientCloudPublic captures enum value "public" + V1AzureAccountEntitySpecClientCloudPublic string = "public" +) + +// prop value enum +func (m *V1AzureAccountEntitySpec) validateClientCloudEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, v1AzureAccountEntitySpecTypeClientCloudPropEnum, true); err != nil { + return err + } + return nil +} + +func (m *V1AzureAccountEntitySpec) validateClientCloud(formats strfmt.Registry) error { + + if swag.IsZero(m.ClientCloud) { // not required + return nil + } + + // value enum + if err := m.validateClientCloudEnum("clientCloud", "body", *m.ClientCloud); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1AzureAccountEntitySpec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1AzureAccountEntitySpec) UnmarshalBinary(b []byte) error { + var res V1AzureAccountEntitySpec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_azure_accounts.go b/api/models/v1_azure_accounts.go new file mode 100644 index 00000000..16d0abb5 --- /dev/null +++ b/api/models/v1_azure_accounts.go @@ -0,0 +1,112 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1AzureAccounts v1 azure accounts +// +// swagger:model v1AzureAccounts +type V1AzureAccounts struct { + + // items + // Required: true + // Unique: true + Items []*V1AzureAccount `json:"items"` + + // listmeta + Listmeta *V1ListMetaData `json:"listmeta,omitempty"` +} + +// Validate validates this v1 azure accounts +func (m *V1AzureAccounts) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateItems(formats); err != nil { + res = append(res, err) + } + + if err := m.validateListmeta(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1AzureAccounts) validateItems(formats strfmt.Registry) error { + + if err := validate.Required("items", "body", m.Items); err != nil { + return err + } + + if err := validate.UniqueItems("items", "body", m.Items); err != nil { + return err + } + + for i := 0; i < len(m.Items); i++ { + if swag.IsZero(m.Items[i]) { // not required + continue + } + + if m.Items[i] != nil { + if err := m.Items[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("items" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1AzureAccounts) validateListmeta(formats strfmt.Registry) error { + + if swag.IsZero(m.Listmeta) { // not required + return nil + } + + if m.Listmeta != nil { + if err := m.Listmeta.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("listmeta") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1AzureAccounts) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1AzureAccounts) UnmarshalBinary(b []byte) error { + var res V1AzureAccounts + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_azure_availability_zone.go b/api/models/v1_azure_availability_zone.go new file mode 100644 index 00000000..54f34928 --- /dev/null +++ b/api/models/v1_azure_availability_zone.go @@ -0,0 +1,43 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1AzureAvailabilityZone Azure availability zone +// +// swagger:model v1AzureAvailabilityZone +type V1AzureAvailabilityZone struct { + + // Azure availability zone name + Name string `json:"name,omitempty"` +} + +// Validate validates this v1 azure availability zone +func (m *V1AzureAvailabilityZone) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1AzureAvailabilityZone) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1AzureAvailabilityZone) UnmarshalBinary(b []byte) error { + var res V1AzureAvailabilityZone + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_azure_cloud_account.go b/api/models/v1_azure_cloud_account.go new file mode 100644 index 00000000..3167bfe7 --- /dev/null +++ b/api/models/v1_azure_cloud_account.go @@ -0,0 +1,185 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "encoding/json" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1AzureCloudAccount v1 azure cloud account +// +// swagger:model v1AzureCloudAccount +type V1AzureCloudAccount struct { + + // Contains configuration for Azure cloud + // Enum: [AzureChinaCloud AzurePublicCloud AzureUSGovernment AzureUSGovernmentCloud] + AzureEnvironment *string `json:"azureEnvironment,omitempty"` + + // Client ID(Directory ID) is a unique identifier generated by Azure AD that is tied to an application + // Required: true + ClientID *string `json:"clientId"` + + // ClientSecret is the secret associated with Client + // Required: true + ClientSecret *string `json:"clientSecret"` + + // Palette internal cloud settings + Settings *V1CloudAccountSettings `json:"settings,omitempty"` + + // Tenant ID is the ID for the Azure AD tenant that the user belongs to. + // Required: true + TenantID *string `json:"tenantId"` + + // Tenant ID is the ID for the Azure AD tenant that the user belongs to. + TenantName string `json:"tenantName,omitempty"` +} + +// Validate validates this v1 azure cloud account +func (m *V1AzureCloudAccount) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateAzureEnvironment(formats); err != nil { + res = append(res, err) + } + + if err := m.validateClientID(formats); err != nil { + res = append(res, err) + } + + if err := m.validateClientSecret(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSettings(formats); err != nil { + res = append(res, err) + } + + if err := m.validateTenantID(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +var v1AzureCloudAccountTypeAzureEnvironmentPropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["AzureChinaCloud","AzurePublicCloud","AzureUSGovernment","AzureUSGovernmentCloud"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + v1AzureCloudAccountTypeAzureEnvironmentPropEnum = append(v1AzureCloudAccountTypeAzureEnvironmentPropEnum, v) + } +} + +const ( + + // V1AzureCloudAccountAzureEnvironmentAzureChinaCloud captures enum value "AzureChinaCloud" + V1AzureCloudAccountAzureEnvironmentAzureChinaCloud string = "AzureChinaCloud" + + // V1AzureCloudAccountAzureEnvironmentAzurePublicCloud captures enum value "AzurePublicCloud" + V1AzureCloudAccountAzureEnvironmentAzurePublicCloud string = "AzurePublicCloud" + + // V1AzureCloudAccountAzureEnvironmentAzureUSGovernment captures enum value "AzureUSGovernment" + V1AzureCloudAccountAzureEnvironmentAzureUSGovernment string = "AzureUSGovernment" + + // V1AzureCloudAccountAzureEnvironmentAzureUSGovernmentCloud captures enum value "AzureUSGovernmentCloud" + V1AzureCloudAccountAzureEnvironmentAzureUSGovernmentCloud string = "AzureUSGovernmentCloud" +) + +// prop value enum +func (m *V1AzureCloudAccount) validateAzureEnvironmentEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, v1AzureCloudAccountTypeAzureEnvironmentPropEnum, true); err != nil { + return err + } + return nil +} + +func (m *V1AzureCloudAccount) validateAzureEnvironment(formats strfmt.Registry) error { + + if swag.IsZero(m.AzureEnvironment) { // not required + return nil + } + + // value enum + if err := m.validateAzureEnvironmentEnum("azureEnvironment", "body", *m.AzureEnvironment); err != nil { + return err + } + + return nil +} + +func (m *V1AzureCloudAccount) validateClientID(formats strfmt.Registry) error { + + if err := validate.Required("clientId", "body", m.ClientID); err != nil { + return err + } + + return nil +} + +func (m *V1AzureCloudAccount) validateClientSecret(formats strfmt.Registry) error { + + if err := validate.Required("clientSecret", "body", m.ClientSecret); err != nil { + return err + } + + return nil +} + +func (m *V1AzureCloudAccount) validateSettings(formats strfmt.Registry) error { + + if swag.IsZero(m.Settings) { // not required + return nil + } + + if m.Settings != nil { + if err := m.Settings.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("settings") + } + return err + } + } + + return nil +} + +func (m *V1AzureCloudAccount) validateTenantID(formats strfmt.Registry) error { + + if err := validate.Required("tenantId", "body", m.TenantID); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1AzureCloudAccount) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1AzureCloudAccount) UnmarshalBinary(b []byte) error { + var res V1AzureCloudAccount + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_azure_cloud_cluster_config_entity.go b/api/models/v1_azure_cloud_cluster_config_entity.go new file mode 100644 index 00000000..2700975d --- /dev/null +++ b/api/models/v1_azure_cloud_cluster_config_entity.go @@ -0,0 +1,71 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1AzureCloudClusterConfigEntity Azure cloud cluster config entity +// +// swagger:model v1AzureCloudClusterConfigEntity +type V1AzureCloudClusterConfigEntity struct { + + // cluster config + ClusterConfig *V1AzureClusterConfig `json:"clusterConfig,omitempty"` +} + +// Validate validates this v1 azure cloud cluster config entity +func (m *V1AzureCloudClusterConfigEntity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateClusterConfig(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1AzureCloudClusterConfigEntity) validateClusterConfig(formats strfmt.Registry) error { + + if swag.IsZero(m.ClusterConfig) { // not required + return nil + } + + if m.ClusterConfig != nil { + if err := m.ClusterConfig.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("clusterConfig") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1AzureCloudClusterConfigEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1AzureCloudClusterConfigEntity) UnmarshalBinary(b []byte) error { + var res V1AzureCloudClusterConfigEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_azure_cloud_config.go b/api/models/v1_azure_cloud_config.go new file mode 100644 index 00000000..5a6535d9 --- /dev/null +++ b/api/models/v1_azure_cloud_config.go @@ -0,0 +1,127 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1AzureCloudConfig AzureCloudConfig is the Schema for the azurecloudconfigs API +// +// swagger:model v1AzureCloudConfig +type V1AzureCloudConfig struct { + + // APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + APIVersion string `json:"apiVersion,omitempty"` + + // Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + Kind string `json:"kind,omitempty"` + + // metadata + Metadata *V1ObjectMeta `json:"metadata,omitempty"` + + // spec + Spec *V1AzureCloudConfigSpec `json:"spec,omitempty"` + + // status + Status *V1AzureCloudConfigStatus `json:"status,omitempty"` +} + +// Validate validates this v1 azure cloud config +func (m *V1AzureCloudConfig) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSpec(formats); err != nil { + res = append(res, err) + } + + if err := m.validateStatus(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1AzureCloudConfig) validateMetadata(formats strfmt.Registry) error { + + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } + return err + } + } + + return nil +} + +func (m *V1AzureCloudConfig) validateSpec(formats strfmt.Registry) error { + + if swag.IsZero(m.Spec) { // not required + return nil + } + + if m.Spec != nil { + if err := m.Spec.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec") + } + return err + } + } + + return nil +} + +func (m *V1AzureCloudConfig) validateStatus(formats strfmt.Registry) error { + + if swag.IsZero(m.Status) { // not required + return nil + } + + if m.Status != nil { + if err := m.Status.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("status") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1AzureCloudConfig) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1AzureCloudConfig) UnmarshalBinary(b []byte) error { + var res V1AzureCloudConfig + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_azure_cloud_config_spec.go b/api/models/v1_azure_cloud_config_spec.go new file mode 100644 index 00000000..50c5f789 --- /dev/null +++ b/api/models/v1_azure_cloud_config_spec.go @@ -0,0 +1,130 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1AzureCloudConfigSpec AzureCloudConfigSpec defines the cloud configuration input by user This will translate to clusterspec/machinespec for cluster-api +// +// swagger:model v1AzureCloudConfigSpec +type V1AzureCloudConfigSpec struct { + + // cloudAccountRef should point to the secret which contains AzureCloudAccount + CloudAccountRef *V1ObjectReference `json:"cloudAccountRef,omitempty"` + + // cluster config + ClusterConfig *V1AzureClusterConfig `json:"clusterConfig,omitempty"` + + // machine pool config + MachinePoolConfig []*V1AzureMachinePoolConfig `json:"machinePoolConfig"` +} + +// Validate validates this v1 azure cloud config spec +func (m *V1AzureCloudConfigSpec) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateCloudAccountRef(formats); err != nil { + res = append(res, err) + } + + if err := m.validateClusterConfig(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMachinePoolConfig(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1AzureCloudConfigSpec) validateCloudAccountRef(formats strfmt.Registry) error { + + if swag.IsZero(m.CloudAccountRef) { // not required + return nil + } + + if m.CloudAccountRef != nil { + if err := m.CloudAccountRef.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("cloudAccountRef") + } + return err + } + } + + return nil +} + +func (m *V1AzureCloudConfigSpec) validateClusterConfig(formats strfmt.Registry) error { + + if swag.IsZero(m.ClusterConfig) { // not required + return nil + } + + if m.ClusterConfig != nil { + if err := m.ClusterConfig.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("clusterConfig") + } + return err + } + } + + return nil +} + +func (m *V1AzureCloudConfigSpec) validateMachinePoolConfig(formats strfmt.Registry) error { + + if swag.IsZero(m.MachinePoolConfig) { // not required + return nil + } + + for i := 0; i < len(m.MachinePoolConfig); i++ { + if swag.IsZero(m.MachinePoolConfig[i]) { // not required + continue + } + + if m.MachinePoolConfig[i] != nil { + if err := m.MachinePoolConfig[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("machinePoolConfig" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1AzureCloudConfigSpec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1AzureCloudConfigSpec) UnmarshalBinary(b []byte) error { + var res V1AzureCloudConfigSpec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_azure_cloud_config_status.go b/api/models/v1_azure_cloud_config_status.go new file mode 100644 index 00000000..b48eb39a --- /dev/null +++ b/api/models/v1_azure_cloud_config_status.go @@ -0,0 +1,145 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1AzureCloudConfigStatus AzureCloudConfigStatus defines the observed state of AzureCloudConfig The cloudimage info built by Mold is stored here image should be mapped to a specific machinepool +// +// swagger:model v1AzureCloudConfigStatus +type V1AzureCloudConfigStatus struct { + + // For mold controller to identify if is there any changes in Pack + AnsibleRoleDigest string `json:"ansibleRoleDigest,omitempty"` + + // spectroAnsibleProvisioner: should be added only once, subsequent recocile will use the same provisioner SpectroAnsiblePacker bool `json:"spectroAnsiblePacker,omitempty"` + Conditions []*V1ClusterCondition `json:"conditions"` + + // Images array items should be 1-to-1 mapping to Spec.MachinePoolConfig + Images *V1AzureImage `json:"images,omitempty"` + + // addon layers present in spc + IsAddonLayer bool `json:"isAddonLayer,omitempty"` + + // this map will be for ansible roles present in eack pack + RoleDigest map[string]string `json:"roleDigest,omitempty"` + + // sourceImageId, it can be from packref's annotations or from pack.json + SourceImageID string `json:"sourceImageId,omitempty"` + + // PackerVariableDigest string `json:"packerDigest,omitempty"` If no ansible roles found in Packs then Mold should tell Drive to use capi image and not create custom image, because there is nothing to add + UseCapiImage bool `json:"useCapiImage,omitempty"` + + // vhd image + VhdImage *V1AzureVHDImage `json:"vhdImage,omitempty"` +} + +// Validate validates this v1 azure cloud config status +func (m *V1AzureCloudConfigStatus) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateConditions(formats); err != nil { + res = append(res, err) + } + + if err := m.validateImages(formats); err != nil { + res = append(res, err) + } + + if err := m.validateVhdImage(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1AzureCloudConfigStatus) validateConditions(formats strfmt.Registry) error { + + if swag.IsZero(m.Conditions) { // not required + return nil + } + + for i := 0; i < len(m.Conditions); i++ { + if swag.IsZero(m.Conditions[i]) { // not required + continue + } + + if m.Conditions[i] != nil { + if err := m.Conditions[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("conditions" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1AzureCloudConfigStatus) validateImages(formats strfmt.Registry) error { + + if swag.IsZero(m.Images) { // not required + return nil + } + + if m.Images != nil { + if err := m.Images.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("images") + } + return err + } + } + + return nil +} + +func (m *V1AzureCloudConfigStatus) validateVhdImage(formats strfmt.Registry) error { + + if swag.IsZero(m.VhdImage) { // not required + return nil + } + + if m.VhdImage != nil { + if err := m.VhdImage.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("vhdImage") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1AzureCloudConfigStatus) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1AzureCloudConfigStatus) UnmarshalBinary(b []byte) error { + var res V1AzureCloudConfigStatus + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_azure_cluster_config.go b/api/models/v1_azure_cluster_config.go new file mode 100644 index 00000000..916970cc --- /dev/null +++ b/api/models/v1_azure_cluster_config.go @@ -0,0 +1,244 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1AzureClusterConfig Cluster level configuration for Azure cloud and applicable for all the machine pools +// +// swagger:model v1AzureClusterConfig +type V1AzureClusterConfig struct { + + // AadProfile is Azure Active Directory configuration to integrate with AKS for aad authentication. + AadProfile *V1AADProfile `json:"aadProfile,omitempty"` + + // APIServerAccessProfile is the access profile for AKS API server. + APIServerAccessProfile *V1APIServerAccessProfile `json:"apiServerAccessProfile,omitempty"` + + // container name + ContainerName string `json:"containerName,omitempty"` + + // Subnet for Kubernetes control-plane node + ControlPlaneSubnet *V1Subnet `json:"controlPlaneSubnet,omitempty"` + + // Deprecated. use apiServerAccessProfile.enablePrivateCluster + EnablePrivateCluster bool `json:"enablePrivateCluster,omitempty"` + + // APIServerLB is the configuration for the control-plane load balancer. + InfraLBConfig *V1InfraLBConfig `json:"infraLBConfig,omitempty"` + + // Location is the Azure datacenter location + // Required: true + Location *string `json:"location"` + + // resource group + ResourceGroup string `json:"resourceGroup,omitempty"` + + // ssh key + // Required: true + SSHKey *string `json:"sshKey"` + + // storage account name + StorageAccountName string `json:"storageAccountName,omitempty"` + + // Subscription ID is unique identifier for the subscription used to access Azure services + // Required: true + SubscriptionID *string `json:"subscriptionId"` + + // vnet cidr block + VnetCidrBlock string `json:"vnetCidrBlock,omitempty"` + + // VNETName is the virtual network in which the cluster is to be provisioned. + VnetName string `json:"vnetName,omitempty"` + + // vnet resource group + VnetResourceGroup string `json:"vnetResourceGroup,omitempty"` + + // Subnet for Kubernetes worker node + WorkerSubnet *V1Subnet `json:"workerSubnet,omitempty"` +} + +// Validate validates this v1 azure cluster config +func (m *V1AzureClusterConfig) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateAadProfile(formats); err != nil { + res = append(res, err) + } + + if err := m.validateAPIServerAccessProfile(formats); err != nil { + res = append(res, err) + } + + if err := m.validateControlPlaneSubnet(formats); err != nil { + res = append(res, err) + } + + if err := m.validateInfraLBConfig(formats); err != nil { + res = append(res, err) + } + + if err := m.validateLocation(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSSHKey(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSubscriptionID(formats); err != nil { + res = append(res, err) + } + + if err := m.validateWorkerSubnet(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1AzureClusterConfig) validateAadProfile(formats strfmt.Registry) error { + + if swag.IsZero(m.AadProfile) { // not required + return nil + } + + if m.AadProfile != nil { + if err := m.AadProfile.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("aadProfile") + } + return err + } + } + + return nil +} + +func (m *V1AzureClusterConfig) validateAPIServerAccessProfile(formats strfmt.Registry) error { + + if swag.IsZero(m.APIServerAccessProfile) { // not required + return nil + } + + if m.APIServerAccessProfile != nil { + if err := m.APIServerAccessProfile.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("apiServerAccessProfile") + } + return err + } + } + + return nil +} + +func (m *V1AzureClusterConfig) validateControlPlaneSubnet(formats strfmt.Registry) error { + + if swag.IsZero(m.ControlPlaneSubnet) { // not required + return nil + } + + if m.ControlPlaneSubnet != nil { + if err := m.ControlPlaneSubnet.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("controlPlaneSubnet") + } + return err + } + } + + return nil +} + +func (m *V1AzureClusterConfig) validateInfraLBConfig(formats strfmt.Registry) error { + + if swag.IsZero(m.InfraLBConfig) { // not required + return nil + } + + if m.InfraLBConfig != nil { + if err := m.InfraLBConfig.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("infraLBConfig") + } + return err + } + } + + return nil +} + +func (m *V1AzureClusterConfig) validateLocation(formats strfmt.Registry) error { + + if err := validate.Required("location", "body", m.Location); err != nil { + return err + } + + return nil +} + +func (m *V1AzureClusterConfig) validateSSHKey(formats strfmt.Registry) error { + + if err := validate.Required("sshKey", "body", m.SSHKey); err != nil { + return err + } + + return nil +} + +func (m *V1AzureClusterConfig) validateSubscriptionID(formats strfmt.Registry) error { + + if err := validate.Required("subscriptionId", "body", m.SubscriptionID); err != nil { + return err + } + + return nil +} + +func (m *V1AzureClusterConfig) validateWorkerSubnet(formats strfmt.Registry) error { + + if swag.IsZero(m.WorkerSubnet) { // not required + return nil + } + + if m.WorkerSubnet != nil { + if err := m.WorkerSubnet.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("workerSubnet") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1AzureClusterConfig) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1AzureClusterConfig) UnmarshalBinary(b []byte) error { + var res V1AzureClusterConfig + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_azure_group.go b/api/models/v1_azure_group.go new file mode 100644 index 00000000..083328ad --- /dev/null +++ b/api/models/v1_azure_group.go @@ -0,0 +1,46 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1AzureGroup Azure group entity +// +// swagger:model v1AzureGroup +type V1AzureGroup struct { + + // Azure group id + ID string `json:"id,omitempty"` + + // Azure group name + Name string `json:"name,omitempty"` +} + +// Validate validates this v1 azure group +func (m *V1AzureGroup) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1AzureGroup) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1AzureGroup) UnmarshalBinary(b []byte) error { + var res V1AzureGroup + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_azure_groups.go b/api/models/v1_azure_groups.go new file mode 100644 index 00000000..84759b64 --- /dev/null +++ b/api/models/v1_azure_groups.go @@ -0,0 +1,82 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1AzureGroups List of Azure groups +// +// swagger:model v1AzureGroups +type V1AzureGroups struct { + + // groups + // Required: true + Groups []*V1AzureGroup `json:"groups"` +} + +// Validate validates this v1 azure groups +func (m *V1AzureGroups) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateGroups(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1AzureGroups) validateGroups(formats strfmt.Registry) error { + + if err := validate.Required("groups", "body", m.Groups); err != nil { + return err + } + + for i := 0; i < len(m.Groups); i++ { + if swag.IsZero(m.Groups[i]) { // not required + continue + } + + if m.Groups[i] != nil { + if err := m.Groups[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("groups" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1AzureGroups) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1AzureGroups) UnmarshalBinary(b []byte) error { + var res V1AzureGroups + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_azure_image.go b/api/models/v1_azure_image.go new file mode 100644 index 00000000..cd15ec4c --- /dev/null +++ b/api/models/v1_azure_image.go @@ -0,0 +1,58 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1AzureImage Refers to Azure Shared Gallery image +// +// swagger:model v1AzureImage +type V1AzureImage struct { + + // gallery + Gallery string `json:"gallery,omitempty"` + + // name + Name string `json:"name,omitempty"` + + // resource group + ResourceGroup string `json:"resourceGroup,omitempty"` + + // state + State string `json:"state,omitempty"` + + // subscription ID + SubscriptionID string `json:"subscriptionID,omitempty"` + + // version + Version string `json:"version,omitempty"` +} + +// Validate validates this v1 azure image +func (m *V1AzureImage) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1AzureImage) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1AzureImage) UnmarshalBinary(b []byte) error { + var res V1AzureImage + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_azure_instance_types.go b/api/models/v1_azure_instance_types.go new file mode 100644 index 00000000..8d54cb0f --- /dev/null +++ b/api/models/v1_azure_instance_types.go @@ -0,0 +1,80 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1AzureInstanceTypes List of Azure instance types +// +// swagger:model v1AzureInstanceTypes +type V1AzureInstanceTypes struct { + + // instance types + InstanceTypes []*V1InstanceType `json:"instanceTypes"` +} + +// Validate validates this v1 azure instance types +func (m *V1AzureInstanceTypes) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateInstanceTypes(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1AzureInstanceTypes) validateInstanceTypes(formats strfmt.Registry) error { + + if swag.IsZero(m.InstanceTypes) { // not required + return nil + } + + for i := 0; i < len(m.InstanceTypes); i++ { + if swag.IsZero(m.InstanceTypes[i]) { // not required + continue + } + + if m.InstanceTypes[i] != nil { + if err := m.InstanceTypes[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("instanceTypes" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1AzureInstanceTypes) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1AzureInstanceTypes) UnmarshalBinary(b []byte) error { + var res V1AzureInstanceTypes + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_azure_machine.go b/api/models/v1_azure_machine.go new file mode 100644 index 00000000..a3430bf4 --- /dev/null +++ b/api/models/v1_azure_machine.go @@ -0,0 +1,127 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1AzureMachine Azure cloud VM definition +// +// swagger:model v1AzureMachine +type V1AzureMachine struct { + + // api version + APIVersion string `json:"apiVersion,omitempty"` + + // kind + Kind string `json:"kind,omitempty"` + + // metadata + Metadata *V1ObjectMeta `json:"metadata,omitempty"` + + // spec + Spec *V1AzureMachineSpec `json:"spec,omitempty"` + + // status + Status *V1CloudMachineStatus `json:"status,omitempty"` +} + +// Validate validates this v1 azure machine +func (m *V1AzureMachine) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSpec(formats); err != nil { + res = append(res, err) + } + + if err := m.validateStatus(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1AzureMachine) validateMetadata(formats strfmt.Registry) error { + + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } + return err + } + } + + return nil +} + +func (m *V1AzureMachine) validateSpec(formats strfmt.Registry) error { + + if swag.IsZero(m.Spec) { // not required + return nil + } + + if m.Spec != nil { + if err := m.Spec.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec") + } + return err + } + } + + return nil +} + +func (m *V1AzureMachine) validateStatus(formats strfmt.Registry) error { + + if swag.IsZero(m.Status) { // not required + return nil + } + + if m.Status != nil { + if err := m.Status.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("status") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1AzureMachine) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1AzureMachine) UnmarshalBinary(b []byte) error { + var res V1AzureMachine + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_azure_machine_pool_cloud_config_entity.go b/api/models/v1_azure_machine_pool_cloud_config_entity.go new file mode 100644 index 00000000..d5064b26 --- /dev/null +++ b/api/models/v1_azure_machine_pool_cloud_config_entity.go @@ -0,0 +1,80 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1AzureMachinePoolCloudConfigEntity v1 azure machine pool cloud config entity +// +// swagger:model v1AzureMachinePoolCloudConfigEntity +type V1AzureMachinePoolCloudConfigEntity struct { + + // azs + Azs []string `json:"azs"` + + // Instance type stands for VMSize in Azure + InstanceType string `json:"instanceType,omitempty"` + + // whether this pool is for system node Pool + IsSystemNodePool bool `json:"isSystemNodePool,omitempty"` + + // os disk + OsDisk *V1AzureOSDisk `json:"osDisk,omitempty"` +} + +// Validate validates this v1 azure machine pool cloud config entity +func (m *V1AzureMachinePoolCloudConfigEntity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateOsDisk(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1AzureMachinePoolCloudConfigEntity) validateOsDisk(formats strfmt.Registry) error { + + if swag.IsZero(m.OsDisk) { // not required + return nil + } + + if m.OsDisk != nil { + if err := m.OsDisk.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("osDisk") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1AzureMachinePoolCloudConfigEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1AzureMachinePoolCloudConfigEntity) UnmarshalBinary(b []byte) error { + var res V1AzureMachinePoolCloudConfigEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_azure_machine_pool_config.go b/api/models/v1_azure_machine_pool_config.go new file mode 100644 index 00000000..897524aa --- /dev/null +++ b/api/models/v1_azure_machine_pool_config.go @@ -0,0 +1,287 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1AzureMachinePoolConfig v1 azure machine pool config +// +// swagger:model v1AzureMachinePoolConfig +type V1AzureMachinePoolConfig struct { + + // additionalLabels + AdditionalLabels map[string]string `json:"additionalLabels,omitempty"` + + // AdditionalTags is an optional set of tags to add to resources managed by the provider, in addition to the ones added by default. For eg., tags for EKS nodeGroup or EKS NodegroupIAMRole + AdditionalTags map[string]string `json:"additionalTags,omitempty"` + + // azs + Azs []string `json:"azs"` + + // instance config + InstanceConfig *V1InstanceConfig `json:"instanceConfig,omitempty"` + + // Instance type stands for VMSize in Azure + InstanceType string `json:"instanceType,omitempty"` + + // whether this pool is for control plane + // Required: true + IsControlPlane *bool `json:"isControlPlane"` + + // whether this pool is for system node Pool + IsSystemNodePool bool `json:"isSystemNodePool"` + + // labels for this pool, example: control-plane/worker, gpu, windows + Labels []string `json:"labels"` + + // machine pool properties + MachinePoolProperties *V1MachinePoolProperties `json:"machinePoolProperties,omitempty"` + + // max size of the pool, for scaling + MaxSize int32 `json:"maxSize,omitempty"` + + // min size of the pool, for scaling + MinSize int32 `json:"minSize,omitempty"` + + // name + Name string `json:"name,omitempty"` + + // Minimum number of seconds a node should be Ready, before the next node is selected for repave. Applicable only for workerpools in infrastructure cluster + NodeRepaveInterval int32 `json:"nodeRepaveInterval,omitempty"` + + // os disk + OsDisk *V1AzureOSDisk `json:"osDisk,omitempty"` + + // os type + OsType V1OsType `json:"osType,omitempty"` + + // size of the pool, number of machines + Size int32 `json:"size,omitempty"` + + // SpotVMOptions allows the ability to specify the Machine should use a Spot VM + SpotVMOptions *V1SpotVMOptions `json:"spotVMOptions,omitempty"` + + // control plane or worker taints + // Unique: true + Taints []*V1Taint `json:"taints"` + + // rolling update strategy for this machinepool if not specified, will use ScaleOut + UpdateStrategy *V1UpdateStrategy `json:"updateStrategy,omitempty"` + + // if IsControlPlane==true && useControlPlaneAsWorker==true, then will remove control plane taint this will not be used for worker pools + UseControlPlaneAsWorker bool `json:"useControlPlaneAsWorker"` +} + +// Validate validates this v1 azure machine pool config +func (m *V1AzureMachinePoolConfig) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateInstanceConfig(formats); err != nil { + res = append(res, err) + } + + if err := m.validateIsControlPlane(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMachinePoolProperties(formats); err != nil { + res = append(res, err) + } + + if err := m.validateOsDisk(formats); err != nil { + res = append(res, err) + } + + if err := m.validateOsType(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSpotVMOptions(formats); err != nil { + res = append(res, err) + } + + if err := m.validateTaints(formats); err != nil { + res = append(res, err) + } + + if err := m.validateUpdateStrategy(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1AzureMachinePoolConfig) validateInstanceConfig(formats strfmt.Registry) error { + + if swag.IsZero(m.InstanceConfig) { // not required + return nil + } + + if m.InstanceConfig != nil { + if err := m.InstanceConfig.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("instanceConfig") + } + return err + } + } + + return nil +} + +func (m *V1AzureMachinePoolConfig) validateIsControlPlane(formats strfmt.Registry) error { + + if err := validate.Required("isControlPlane", "body", m.IsControlPlane); err != nil { + return err + } + + return nil +} + +func (m *V1AzureMachinePoolConfig) validateMachinePoolProperties(formats strfmt.Registry) error { + + if swag.IsZero(m.MachinePoolProperties) { // not required + return nil + } + + if m.MachinePoolProperties != nil { + if err := m.MachinePoolProperties.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("machinePoolProperties") + } + return err + } + } + + return nil +} + +func (m *V1AzureMachinePoolConfig) validateOsDisk(formats strfmt.Registry) error { + + if swag.IsZero(m.OsDisk) { // not required + return nil + } + + if m.OsDisk != nil { + if err := m.OsDisk.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("osDisk") + } + return err + } + } + + return nil +} + +func (m *V1AzureMachinePoolConfig) validateOsType(formats strfmt.Registry) error { + + if swag.IsZero(m.OsType) { // not required + return nil + } + + if err := m.OsType.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("osType") + } + return err + } + + return nil +} + +func (m *V1AzureMachinePoolConfig) validateSpotVMOptions(formats strfmt.Registry) error { + + if swag.IsZero(m.SpotVMOptions) { // not required + return nil + } + + if m.SpotVMOptions != nil { + if err := m.SpotVMOptions.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spotVMOptions") + } + return err + } + } + + return nil +} + +func (m *V1AzureMachinePoolConfig) validateTaints(formats strfmt.Registry) error { + + if swag.IsZero(m.Taints) { // not required + return nil + } + + if err := validate.UniqueItems("taints", "body", m.Taints); err != nil { + return err + } + + for i := 0; i < len(m.Taints); i++ { + if swag.IsZero(m.Taints[i]) { // not required + continue + } + + if m.Taints[i] != nil { + if err := m.Taints[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("taints" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1AzureMachinePoolConfig) validateUpdateStrategy(formats strfmt.Registry) error { + + if swag.IsZero(m.UpdateStrategy) { // not required + return nil + } + + if m.UpdateStrategy != nil { + if err := m.UpdateStrategy.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("updateStrategy") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1AzureMachinePoolConfig) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1AzureMachinePoolConfig) UnmarshalBinary(b []byte) error { + var res V1AzureMachinePoolConfig + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_azure_machine_pool_config_entity.go b/api/models/v1_azure_machine_pool_config_entity.go new file mode 100644 index 00000000..ce495027 --- /dev/null +++ b/api/models/v1_azure_machine_pool_config_entity.go @@ -0,0 +1,123 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1AzureMachinePoolConfigEntity v1 azure machine pool config entity +// +// swagger:model v1AzureMachinePoolConfigEntity +type V1AzureMachinePoolConfigEntity struct { + + // cloud config + // Required: true + CloudConfig *V1AzureMachinePoolCloudConfigEntity `json:"cloudConfig"` + + // managed pool config + ManagedPoolConfig *V1AzureManagedMachinePoolConfig `json:"managedPoolConfig,omitempty"` + + // pool config + PoolConfig *V1MachinePoolConfigEntity `json:"poolConfig,omitempty"` +} + +// Validate validates this v1 azure machine pool config entity +func (m *V1AzureMachinePoolConfigEntity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateCloudConfig(formats); err != nil { + res = append(res, err) + } + + if err := m.validateManagedPoolConfig(formats); err != nil { + res = append(res, err) + } + + if err := m.validatePoolConfig(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1AzureMachinePoolConfigEntity) validateCloudConfig(formats strfmt.Registry) error { + + if err := validate.Required("cloudConfig", "body", m.CloudConfig); err != nil { + return err + } + + if m.CloudConfig != nil { + if err := m.CloudConfig.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("cloudConfig") + } + return err + } + } + + return nil +} + +func (m *V1AzureMachinePoolConfigEntity) validateManagedPoolConfig(formats strfmt.Registry) error { + + if swag.IsZero(m.ManagedPoolConfig) { // not required + return nil + } + + if m.ManagedPoolConfig != nil { + if err := m.ManagedPoolConfig.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("managedPoolConfig") + } + return err + } + } + + return nil +} + +func (m *V1AzureMachinePoolConfigEntity) validatePoolConfig(formats strfmt.Registry) error { + + if swag.IsZero(m.PoolConfig) { // not required + return nil + } + + if m.PoolConfig != nil { + if err := m.PoolConfig.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("poolConfig") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1AzureMachinePoolConfigEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1AzureMachinePoolConfigEntity) UnmarshalBinary(b []byte) error { + var res V1AzureMachinePoolConfigEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_azure_machine_spec.go b/api/models/v1_azure_machine_spec.go new file mode 100644 index 00000000..9ba847cb --- /dev/null +++ b/api/models/v1_azure_machine_spec.go @@ -0,0 +1,200 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1AzureMachineSpec Azure cloud VM definition spec +// +// swagger:model v1AzureMachineSpec +type V1AzureMachineSpec struct { + + // additional tags + AdditionalTags map[string]string `json:"additionalTags,omitempty"` + + // allocate public IP + AllocatePublicIP bool `json:"allocatePublicIP,omitempty"` + + // availability zone + AvailabilityZone *V1AzureMachineSpecAvailabilityZone `json:"availabilityZone,omitempty"` + + // image + Image *V1AzureMachineSpecImage `json:"image,omitempty"` + + // instance type + // Required: true + InstanceType *string `json:"instanceType"` + + // location + // Required: true + Location *string `json:"location"` + + // nics + Nics []*V1AzureNic `json:"nics"` + + // os disk + // Required: true + OsDisk *V1AzureOSDisk `json:"osDisk"` + + // ssh public key + SSHPublicKey string `json:"sshPublicKey,omitempty"` +} + +// Validate validates this v1 azure machine spec +func (m *V1AzureMachineSpec) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateAvailabilityZone(formats); err != nil { + res = append(res, err) + } + + if err := m.validateImage(formats); err != nil { + res = append(res, err) + } + + if err := m.validateInstanceType(formats); err != nil { + res = append(res, err) + } + + if err := m.validateLocation(formats); err != nil { + res = append(res, err) + } + + if err := m.validateNics(formats); err != nil { + res = append(res, err) + } + + if err := m.validateOsDisk(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1AzureMachineSpec) validateAvailabilityZone(formats strfmt.Registry) error { + + if swag.IsZero(m.AvailabilityZone) { // not required + return nil + } + + if m.AvailabilityZone != nil { + if err := m.AvailabilityZone.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("availabilityZone") + } + return err + } + } + + return nil +} + +func (m *V1AzureMachineSpec) validateImage(formats strfmt.Registry) error { + + if swag.IsZero(m.Image) { // not required + return nil + } + + if m.Image != nil { + if err := m.Image.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("image") + } + return err + } + } + + return nil +} + +func (m *V1AzureMachineSpec) validateInstanceType(formats strfmt.Registry) error { + + if err := validate.Required("instanceType", "body", m.InstanceType); err != nil { + return err + } + + return nil +} + +func (m *V1AzureMachineSpec) validateLocation(formats strfmt.Registry) error { + + if err := validate.Required("location", "body", m.Location); err != nil { + return err + } + + return nil +} + +func (m *V1AzureMachineSpec) validateNics(formats strfmt.Registry) error { + + if swag.IsZero(m.Nics) { // not required + return nil + } + + for i := 0; i < len(m.Nics); i++ { + if swag.IsZero(m.Nics[i]) { // not required + continue + } + + if m.Nics[i] != nil { + if err := m.Nics[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("nics" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1AzureMachineSpec) validateOsDisk(formats strfmt.Registry) error { + + if err := validate.Required("osDisk", "body", m.OsDisk); err != nil { + return err + } + + if m.OsDisk != nil { + if err := m.OsDisk.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("osDisk") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1AzureMachineSpec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1AzureMachineSpec) UnmarshalBinary(b []byte) error { + var res V1AzureMachineSpec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_azure_machine_spec_availability_zone.go b/api/models/v1_azure_machine_spec_availability_zone.go new file mode 100644 index 00000000..9d8073e7 --- /dev/null +++ b/api/models/v1_azure_machine_spec_availability_zone.go @@ -0,0 +1,46 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1AzureMachineSpecAvailabilityZone Azure Machine Spec Availability zone +// +// swagger:model v1AzureMachineSpecAvailabilityZone +type V1AzureMachineSpecAvailabilityZone struct { + + // enabled + Enabled bool `json:"enabled,omitempty"` + + // id + ID string `json:"id,omitempty"` +} + +// Validate validates this v1 azure machine spec availability zone +func (m *V1AzureMachineSpecAvailabilityZone) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1AzureMachineSpecAvailabilityZone) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1AzureMachineSpecAvailabilityZone) UnmarshalBinary(b []byte) error { + var res V1AzureMachineSpecAvailabilityZone + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_azure_machine_spec_image.go b/api/models/v1_azure_machine_spec_image.go new file mode 100644 index 00000000..f6a9ceb6 --- /dev/null +++ b/api/models/v1_azure_machine_spec_image.go @@ -0,0 +1,67 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1AzureMachineSpecImage Azure Machine Spec Image +// +// swagger:model v1AzureMachineSpecImage +type V1AzureMachineSpecImage struct { + + // gallery + Gallery string `json:"gallery,omitempty"` + + // id + ID string `json:"id,omitempty"` + + // name + Name string `json:"name,omitempty"` + + // offer + Offer string `json:"offer,omitempty"` + + // publisher + Publisher string `json:"publisher,omitempty"` + + // resource group + ResourceGroup string `json:"resourceGroup,omitempty"` + + // sku + Sku string `json:"sku,omitempty"` + + // subscription Id + SubscriptionID string `json:"subscriptionId,omitempty"` + + // version + Version string `json:"version,omitempty"` +} + +// Validate validates this v1 azure machine spec image +func (m *V1AzureMachineSpecImage) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1AzureMachineSpecImage) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1AzureMachineSpecImage) UnmarshalBinary(b []byte) error { + var res V1AzureMachineSpecImage + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_azure_machines.go b/api/models/v1_azure_machines.go new file mode 100644 index 00000000..9c527a91 --- /dev/null +++ b/api/models/v1_azure_machines.go @@ -0,0 +1,112 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1AzureMachines Azure machine list +// +// swagger:model v1AzureMachines +type V1AzureMachines struct { + + // items + // Required: true + // Unique: true + Items []*V1AzureMachine `json:"items"` + + // listmeta + Listmeta *V1ListMetaData `json:"listmeta,omitempty"` +} + +// Validate validates this v1 azure machines +func (m *V1AzureMachines) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateItems(formats); err != nil { + res = append(res, err) + } + + if err := m.validateListmeta(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1AzureMachines) validateItems(formats strfmt.Registry) error { + + if err := validate.Required("items", "body", m.Items); err != nil { + return err + } + + if err := validate.UniqueItems("items", "body", m.Items); err != nil { + return err + } + + for i := 0; i < len(m.Items); i++ { + if swag.IsZero(m.Items[i]) { // not required + continue + } + + if m.Items[i] != nil { + if err := m.Items[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("items" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1AzureMachines) validateListmeta(formats strfmt.Registry) error { + + if swag.IsZero(m.Listmeta) { // not required + return nil + } + + if m.Listmeta != nil { + if err := m.Listmeta.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("listmeta") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1AzureMachines) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1AzureMachines) UnmarshalBinary(b []byte) error { + var res V1AzureMachines + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_azure_managed_machine_pool_config.go b/api/models/v1_azure_managed_machine_pool_config.go new file mode 100644 index 00000000..24defcee --- /dev/null +++ b/api/models/v1_azure_managed_machine_pool_config.go @@ -0,0 +1,72 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1AzureManagedMachinePoolConfig v1 azure managed machine pool config +// +// swagger:model v1AzureManagedMachinePoolConfig +type V1AzureManagedMachinePoolConfig struct { + + // whether this pool is for system node Pool + IsSystemNodePool bool `json:"isSystemNodePool"` + + // os type + OsType V1OsType `json:"osType,omitempty"` +} + +// Validate validates this v1 azure managed machine pool config +func (m *V1AzureManagedMachinePoolConfig) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateOsType(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1AzureManagedMachinePoolConfig) validateOsType(formats strfmt.Registry) error { + + if swag.IsZero(m.OsType) { // not required + return nil + } + + if err := m.OsType.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("osType") + } + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1AzureManagedMachinePoolConfig) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1AzureManagedMachinePoolConfig) UnmarshalBinary(b []byte) error { + var res V1AzureManagedMachinePoolConfig + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_azure_nic.go b/api/models/v1_azure_nic.go new file mode 100644 index 00000000..80c8a0f8 --- /dev/null +++ b/api/models/v1_azure_nic.go @@ -0,0 +1,49 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1AzureNic AWS network interface +// +// swagger:model v1AzureNic +type V1AzureNic struct { + + // index + Index int8 `json:"index,omitempty"` + + // private i ps + PrivateIPs []string `json:"privateIPs"` + + // public Ip + PublicIP string `json:"publicIp,omitempty"` +} + +// Validate validates this v1 azure nic +func (m *V1AzureNic) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1AzureNic) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1AzureNic) UnmarshalBinary(b []byte) error { + var res V1AzureNic + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_azure_o_s_disk.go b/api/models/v1_azure_o_s_disk.go new file mode 100644 index 00000000..1577712f --- /dev/null +++ b/api/models/v1_azure_o_s_disk.go @@ -0,0 +1,97 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1AzureOSDisk v1 azure o s disk +// +// swagger:model v1AzureOSDisk +type V1AzureOSDisk struct { + + // disk size g b + DiskSizeGB int32 `json:"diskSizeGB,omitempty"` + + // managed disk + ManagedDisk *V1ManagedDisk `json:"managedDisk,omitempty"` + + // os type + OsType V1OsType `json:"osType,omitempty"` +} + +// Validate validates this v1 azure o s disk +func (m *V1AzureOSDisk) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateManagedDisk(formats); err != nil { + res = append(res, err) + } + + if err := m.validateOsType(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1AzureOSDisk) validateManagedDisk(formats strfmt.Registry) error { + + if swag.IsZero(m.ManagedDisk) { // not required + return nil + } + + if m.ManagedDisk != nil { + if err := m.ManagedDisk.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("managedDisk") + } + return err + } + } + + return nil +} + +func (m *V1AzureOSDisk) validateOsType(formats strfmt.Registry) error { + + if swag.IsZero(m.OsType) { // not required + return nil + } + + if err := m.OsType.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("osType") + } + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1AzureOSDisk) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1AzureOSDisk) UnmarshalBinary(b []byte) error { + var res V1AzureOSDisk + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_azure_private_dns_zone.go b/api/models/v1_azure_private_dns_zone.go new file mode 100644 index 00000000..f0bcdf31 --- /dev/null +++ b/api/models/v1_azure_private_dns_zone.go @@ -0,0 +1,49 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1AzurePrivateDNSZone Azure Private DNS zone entity +// +// swagger:model v1AzurePrivateDnsZone +type V1AzurePrivateDNSZone struct { + + // Fully qualified resource Id for the resource + ID string `json:"id,omitempty"` + + // The Azure Region where the resource lives + Location string `json:"location,omitempty"` + + // The name of the resource + Name string `json:"name,omitempty"` +} + +// Validate validates this v1 azure private Dns zone +func (m *V1AzurePrivateDNSZone) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1AzurePrivateDNSZone) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1AzurePrivateDNSZone) UnmarshalBinary(b []byte) error { + var res V1AzurePrivateDNSZone + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_azure_private_dns_zones.go b/api/models/v1_azure_private_dns_zones.go new file mode 100644 index 00000000..c80ac5a9 --- /dev/null +++ b/api/models/v1_azure_private_dns_zones.go @@ -0,0 +1,80 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1AzurePrivateDNSZones List of Azure storage accounts +// +// swagger:model v1AzurePrivateDnsZones +type V1AzurePrivateDNSZones struct { + + // private Dns zones + PrivateDNSZones []*V1AzurePrivateDNSZone `json:"privateDnsZones"` +} + +// Validate validates this v1 azure private Dns zones +func (m *V1AzurePrivateDNSZones) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validatePrivateDNSZones(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1AzurePrivateDNSZones) validatePrivateDNSZones(formats strfmt.Registry) error { + + if swag.IsZero(m.PrivateDNSZones) { // not required + return nil + } + + for i := 0; i < len(m.PrivateDNSZones); i++ { + if swag.IsZero(m.PrivateDNSZones[i]) { // not required + continue + } + + if m.PrivateDNSZones[i] != nil { + if err := m.PrivateDNSZones[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("privateDnsZones" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1AzurePrivateDNSZones) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1AzurePrivateDNSZones) UnmarshalBinary(b []byte) error { + var res V1AzurePrivateDNSZones + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_azure_region.go b/api/models/v1_azure_region.go new file mode 100644 index 00000000..58355c54 --- /dev/null +++ b/api/models/v1_azure_region.go @@ -0,0 +1,86 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1AzureRegion Azure region entity +// +// swagger:model v1AzureRegion +type V1AzureRegion struct { + + // Azure region displayname + DisplayName string `json:"displayName,omitempty"` + + // Azure region name + Name string `json:"name,omitempty"` + + // List of zones associated to a particular Azure region + Zones []*V1AzureAvailabilityZone `json:"zones"` +} + +// Validate validates this v1 azure region +func (m *V1AzureRegion) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateZones(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1AzureRegion) validateZones(formats strfmt.Registry) error { + + if swag.IsZero(m.Zones) { // not required + return nil + } + + for i := 0; i < len(m.Zones); i++ { + if swag.IsZero(m.Zones[i]) { // not required + continue + } + + if m.Zones[i] != nil { + if err := m.Zones[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("zones" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1AzureRegion) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1AzureRegion) UnmarshalBinary(b []byte) error { + var res V1AzureRegion + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_azure_regions.go b/api/models/v1_azure_regions.go new file mode 100644 index 00000000..75547fb9 --- /dev/null +++ b/api/models/v1_azure_regions.go @@ -0,0 +1,82 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1AzureRegions List of Azure regions +// +// swagger:model v1AzureRegions +type V1AzureRegions struct { + + // regions + // Required: true + Regions []*V1AzureRegion `json:"regions"` +} + +// Validate validates this v1 azure regions +func (m *V1AzureRegions) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateRegions(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1AzureRegions) validateRegions(formats strfmt.Registry) error { + + if err := validate.Required("regions", "body", m.Regions); err != nil { + return err + } + + for i := 0; i < len(m.Regions); i++ { + if swag.IsZero(m.Regions[i]) { // not required + continue + } + + if m.Regions[i] != nil { + if err := m.Regions[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("regions" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1AzureRegions) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1AzureRegions) UnmarshalBinary(b []byte) error { + var res V1AzureRegions + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_azure_resource_group_list.go b/api/models/v1_azure_resource_group_list.go new file mode 100644 index 00000000..3a8b8661 --- /dev/null +++ b/api/models/v1_azure_resource_group_list.go @@ -0,0 +1,80 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1AzureResourceGroupList List of Azure resource group +// +// swagger:model v1AzureResourceGroupList +type V1AzureResourceGroupList struct { + + // resource group list + ResourceGroupList []*V1ResourceGroup `json:"resourceGroupList"` +} + +// Validate validates this v1 azure resource group list +func (m *V1AzureResourceGroupList) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateResourceGroupList(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1AzureResourceGroupList) validateResourceGroupList(formats strfmt.Registry) error { + + if swag.IsZero(m.ResourceGroupList) { // not required + return nil + } + + for i := 0; i < len(m.ResourceGroupList); i++ { + if swag.IsZero(m.ResourceGroupList[i]) { // not required + continue + } + + if m.ResourceGroupList[i] != nil { + if err := m.ResourceGroupList[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("resourceGroupList" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1AzureResourceGroupList) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1AzureResourceGroupList) UnmarshalBinary(b []byte) error { + var res V1AzureResourceGroupList + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_azure_storage_account_entity.go b/api/models/v1_azure_storage_account_entity.go new file mode 100644 index 00000000..a2ef3bb9 --- /dev/null +++ b/api/models/v1_azure_storage_account_entity.go @@ -0,0 +1,80 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1AzureStorageAccountEntity Azure Storage Account Entity +// +// swagger:model v1AzureStorageAccountEntity +type V1AzureStorageAccountEntity struct { + + // storage account types + StorageAccountTypes []*V1StorageAccountEntity `json:"storageAccountTypes"` +} + +// Validate validates this v1 azure storage account entity +func (m *V1AzureStorageAccountEntity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateStorageAccountTypes(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1AzureStorageAccountEntity) validateStorageAccountTypes(formats strfmt.Registry) error { + + if swag.IsZero(m.StorageAccountTypes) { // not required + return nil + } + + for i := 0; i < len(m.StorageAccountTypes); i++ { + if swag.IsZero(m.StorageAccountTypes[i]) { // not required + continue + } + + if m.StorageAccountTypes[i] != nil { + if err := m.StorageAccountTypes[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("storageAccountTypes" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1AzureStorageAccountEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1AzureStorageAccountEntity) UnmarshalBinary(b []byte) error { + var res V1AzureStorageAccountEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_azure_storage_accounts.go b/api/models/v1_azure_storage_accounts.go new file mode 100644 index 00000000..7b7b7af8 --- /dev/null +++ b/api/models/v1_azure_storage_accounts.go @@ -0,0 +1,80 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1AzureStorageAccounts List of Azure storage accounts +// +// swagger:model v1AzureStorageAccounts +type V1AzureStorageAccounts struct { + + // accounts + Accounts []*V1StorageAccount `json:"accounts"` +} + +// Validate validates this v1 azure storage accounts +func (m *V1AzureStorageAccounts) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateAccounts(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1AzureStorageAccounts) validateAccounts(formats strfmt.Registry) error { + + if swag.IsZero(m.Accounts) { // not required + return nil + } + + for i := 0; i < len(m.Accounts); i++ { + if swag.IsZero(m.Accounts[i]) { // not required + continue + } + + if m.Accounts[i] != nil { + if err := m.Accounts[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("accounts" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1AzureStorageAccounts) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1AzureStorageAccounts) UnmarshalBinary(b []byte) error { + var res V1AzureStorageAccounts + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_azure_storage_config.go b/api/models/v1_azure_storage_config.go new file mode 100644 index 00000000..4851eba0 --- /dev/null +++ b/api/models/v1_azure_storage_config.go @@ -0,0 +1,127 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1AzureStorageConfig Azure storage config object +// +// swagger:model v1AzureStorageConfig +type V1AzureStorageConfig struct { + + // Azure container name + // Required: true + ContainerName *string `json:"containerName"` + + // Azure cloud account credentials + // Required: true + Credentials *V1AzureAccountEntitySpec `json:"credentials"` + + // Azure resource group name, to which the storage account is mapped + // Required: true + ResourceGroup *string `json:"resourceGroup"` + + // Azure sku + Sku string `json:"sku,omitempty"` + + // Azure storage name + // Required: true + StorageName *string `json:"storageName"` +} + +// Validate validates this v1 azure storage config +func (m *V1AzureStorageConfig) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateContainerName(formats); err != nil { + res = append(res, err) + } + + if err := m.validateCredentials(formats); err != nil { + res = append(res, err) + } + + if err := m.validateResourceGroup(formats); err != nil { + res = append(res, err) + } + + if err := m.validateStorageName(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1AzureStorageConfig) validateContainerName(formats strfmt.Registry) error { + + if err := validate.Required("containerName", "body", m.ContainerName); err != nil { + return err + } + + return nil +} + +func (m *V1AzureStorageConfig) validateCredentials(formats strfmt.Registry) error { + + if err := validate.Required("credentials", "body", m.Credentials); err != nil { + return err + } + + if m.Credentials != nil { + if err := m.Credentials.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("credentials") + } + return err + } + } + + return nil +} + +func (m *V1AzureStorageConfig) validateResourceGroup(formats strfmt.Registry) error { + + if err := validate.Required("resourceGroup", "body", m.ResourceGroup); err != nil { + return err + } + + return nil +} + +func (m *V1AzureStorageConfig) validateStorageName(formats strfmt.Registry) error { + + if err := validate.Required("storageName", "body", m.StorageName); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1AzureStorageConfig) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1AzureStorageConfig) UnmarshalBinary(b []byte) error { + var res V1AzureStorageConfig + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_azure_storage_containers.go b/api/models/v1_azure_storage_containers.go new file mode 100644 index 00000000..d1f82595 --- /dev/null +++ b/api/models/v1_azure_storage_containers.go @@ -0,0 +1,80 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1AzureStorageContainers List of Azure storage containers +// +// swagger:model v1AzureStorageContainers +type V1AzureStorageContainers struct { + + // containers + Containers []*V1StorageContainer `json:"containers"` +} + +// Validate validates this v1 azure storage containers +func (m *V1AzureStorageContainers) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateContainers(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1AzureStorageContainers) validateContainers(formats strfmt.Registry) error { + + if swag.IsZero(m.Containers) { // not required + return nil + } + + for i := 0; i < len(m.Containers); i++ { + if swag.IsZero(m.Containers[i]) { // not required + continue + } + + if m.Containers[i] != nil { + if err := m.Containers[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("containers" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1AzureStorageContainers) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1AzureStorageContainers) UnmarshalBinary(b []byte) error { + var res V1AzureStorageContainers + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_azure_storage_types.go b/api/models/v1_azure_storage_types.go new file mode 100644 index 00000000..7d3fbbb6 --- /dev/null +++ b/api/models/v1_azure_storage_types.go @@ -0,0 +1,80 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1AzureStorageTypes List of Azure storage types +// +// swagger:model v1AzureStorageTypes +type V1AzureStorageTypes struct { + + // storage types + StorageTypes []*V1StorageType `json:"storageTypes"` +} + +// Validate validates this v1 azure storage types +func (m *V1AzureStorageTypes) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateStorageTypes(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1AzureStorageTypes) validateStorageTypes(formats strfmt.Registry) error { + + if swag.IsZero(m.StorageTypes) { // not required + return nil + } + + for i := 0; i < len(m.StorageTypes); i++ { + if swag.IsZero(m.StorageTypes[i]) { // not required + continue + } + + if m.StorageTypes[i] != nil { + if err := m.StorageTypes[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("storageTypes" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1AzureStorageTypes) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1AzureStorageTypes) UnmarshalBinary(b []byte) error { + var res V1AzureStorageTypes + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_azure_subscription_list.go b/api/models/v1_azure_subscription_list.go new file mode 100644 index 00000000..06e25af3 --- /dev/null +++ b/api/models/v1_azure_subscription_list.go @@ -0,0 +1,80 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1AzureSubscriptionList List of Azure subscription +// +// swagger:model v1AzureSubscriptionList +type V1AzureSubscriptionList struct { + + // subscription list + SubscriptionList []*V1Subscription `json:"subscriptionList"` +} + +// Validate validates this v1 azure subscription list +func (m *V1AzureSubscriptionList) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateSubscriptionList(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1AzureSubscriptionList) validateSubscriptionList(formats strfmt.Registry) error { + + if swag.IsZero(m.SubscriptionList) { // not required + return nil + } + + for i := 0; i < len(m.SubscriptionList); i++ { + if swag.IsZero(m.SubscriptionList[i]) { // not required + continue + } + + if m.SubscriptionList[i] != nil { + if err := m.SubscriptionList[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("subscriptionList" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1AzureSubscriptionList) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1AzureSubscriptionList) UnmarshalBinary(b []byte) error { + var res V1AzureSubscriptionList + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_azure_v_h_d_image.go b/api/models/v1_azure_v_h_d_image.go new file mode 100644 index 00000000..51002b0b --- /dev/null +++ b/api/models/v1_azure_v_h_d_image.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1AzureVHDImage Mold always create VHD image for custom image, and this can be use as golden images +// +// swagger:model v1AzureVHDImage +type V1AzureVHDImage struct { + + // id + ID string `json:"id,omitempty"` + + // name + Name string `json:"name,omitempty"` + + // os + Os string `json:"os,omitempty"` + + // region + Region string `json:"region,omitempty"` + + // state + State string `json:"state,omitempty"` +} + +// Validate validates this v1 azure v h d image +func (m *V1AzureVHDImage) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1AzureVHDImage) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1AzureVHDImage) UnmarshalBinary(b []byte) error { + var res V1AzureVHDImage + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_azure_vhd_url_entity.go b/api/models/v1_azure_vhd_url_entity.go new file mode 100644 index 00000000..fef9ae68 --- /dev/null +++ b/api/models/v1_azure_vhd_url_entity.go @@ -0,0 +1,46 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1AzureVhdURLEntity Azure vhd url entity +// +// swagger:model v1AzureVhdUrlEntity +type V1AzureVhdURLEntity struct { + + // The name of the resource + Name string `json:"name,omitempty"` + + // The url of the Azure Vhd + URL string `json:"url,omitempty"` +} + +// Validate validates this v1 azure vhd Url entity +func (m *V1AzureVhdURLEntity) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1AzureVhdURLEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1AzureVhdURLEntity) UnmarshalBinary(b []byte) error { + var res V1AzureVhdURLEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_azure_virtual_network_list.go b/api/models/v1_azure_virtual_network_list.go new file mode 100644 index 00000000..c3af26ac --- /dev/null +++ b/api/models/v1_azure_virtual_network_list.go @@ -0,0 +1,80 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1AzureVirtualNetworkList List of Azure virtual network +// +// swagger:model v1AzureVirtualNetworkList +type V1AzureVirtualNetworkList struct { + + // virtual network list + VirtualNetworkList []*V1VirtualNetwork `json:"virtualNetworkList"` +} + +// Validate validates this v1 azure virtual network list +func (m *V1AzureVirtualNetworkList) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateVirtualNetworkList(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1AzureVirtualNetworkList) validateVirtualNetworkList(formats strfmt.Registry) error { + + if swag.IsZero(m.VirtualNetworkList) { // not required + return nil + } + + for i := 0; i < len(m.VirtualNetworkList); i++ { + if swag.IsZero(m.VirtualNetworkList[i]) { // not required + continue + } + + if m.VirtualNetworkList[i] != nil { + if err := m.VirtualNetworkList[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("virtualNetworkList" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1AzureVirtualNetworkList) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1AzureVirtualNetworkList) UnmarshalBinary(b []byte) error { + var res V1AzureVirtualNetworkList + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_azure_zone_entity.go b/api/models/v1_azure_zone_entity.go new file mode 100644 index 00000000..7eb31009 --- /dev/null +++ b/api/models/v1_azure_zone_entity.go @@ -0,0 +1,80 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1AzureZoneEntity List of Azure zone +// +// swagger:model v1AzureZoneEntity +type V1AzureZoneEntity struct { + + // zone list + ZoneList []*V1ZoneEntity `json:"zoneList"` +} + +// Validate validates this v1 azure zone entity +func (m *V1AzureZoneEntity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateZoneList(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1AzureZoneEntity) validateZoneList(formats strfmt.Registry) error { + + if swag.IsZero(m.ZoneList) { // not required + return nil + } + + for i := 0; i < len(m.ZoneList); i++ { + if swag.IsZero(m.ZoneList[i]) { // not required + continue + } + + if m.ZoneList[i] != nil { + if err := m.ZoneList[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("zoneList" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1AzureZoneEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1AzureZoneEntity) UnmarshalBinary(b []byte) error { + var res V1AzureZoneEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_backup_location_config.go b/api/models/v1_backup_location_config.go new file mode 100644 index 00000000..e0d143b3 --- /dev/null +++ b/api/models/v1_backup_location_config.go @@ -0,0 +1,49 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1BackupLocationConfig Backup location configuration +// +// swagger:model v1BackupLocationConfig +type V1BackupLocationConfig struct { + + // name + Name string `json:"name,omitempty"` + + // type + Type string `json:"type,omitempty"` + + // uid + UID string `json:"uid,omitempty"` +} + +// Validate validates this v1 backup location config +func (m *V1BackupLocationConfig) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1BackupLocationConfig) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1BackupLocationConfig) UnmarshalBinary(b []byte) error { + var res V1BackupLocationConfig + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_backup_restore_status_meta.go b/api/models/v1_backup_restore_status_meta.go new file mode 100644 index 00000000..06e00926 --- /dev/null +++ b/api/models/v1_backup_restore_status_meta.go @@ -0,0 +1,77 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1BackupRestoreStatusMeta Backup restored status +// +// swagger:model v1BackupRestoreStatusMeta +type V1BackupRestoreStatusMeta struct { + + // backup name + BackupName string `json:"backupName,omitempty"` + + // destination cluster ref + DestinationClusterRef *V1ResourceReference `json:"destinationClusterRef,omitempty"` + + // restore state + RestoreState string `json:"restoreState,omitempty"` +} + +// Validate validates this v1 backup restore status meta +func (m *V1BackupRestoreStatusMeta) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateDestinationClusterRef(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1BackupRestoreStatusMeta) validateDestinationClusterRef(formats strfmt.Registry) error { + + if swag.IsZero(m.DestinationClusterRef) { // not required + return nil + } + + if m.DestinationClusterRef != nil { + if err := m.DestinationClusterRef.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("destinationClusterRef") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1BackupRestoreStatusMeta) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1BackupRestoreStatusMeta) UnmarshalBinary(b []byte) error { + var res V1BackupRestoreStatusMeta + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_backup_state.go b/api/models/v1_backup_state.go new file mode 100644 index 00000000..d6402831 --- /dev/null +++ b/api/models/v1_backup_state.go @@ -0,0 +1,79 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1BackupState Backup state +// +// swagger:model v1BackupState +type V1BackupState struct { + + // backup time + // Format: date-time + BackupTime V1Time `json:"backupTime,omitempty"` + + // delete state + DeleteState string `json:"deleteState,omitempty"` + + // msg + Msg string `json:"msg,omitempty"` + + // state + State string `json:"state,omitempty"` +} + +// Validate validates this v1 backup state +func (m *V1BackupState) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateBackupTime(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1BackupState) validateBackupTime(formats strfmt.Registry) error { + + if swag.IsZero(m.BackupTime) { // not required + return nil + } + + if err := m.BackupTime.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("backupTime") + } + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1BackupState) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1BackupState) UnmarshalBinary(b []byte) error { + var res V1BackupState + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_backup_status_config.go b/api/models/v1_backup_status_config.go new file mode 100644 index 00000000..bcf1518b --- /dev/null +++ b/api/models/v1_backup_status_config.go @@ -0,0 +1,74 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1BackupStatusConfig Backup config +// +// swagger:model v1BackupStatusConfig +type V1BackupStatusConfig struct { + + // include all disks + IncludeAllDisks bool `json:"includeAllDisks,omitempty"` + + // include cluster resources + IncludeClusterResources bool `json:"includeClusterResources,omitempty"` + + // namespaces + // Unique: true + Namespaces []string `json:"namespaces"` +} + +// Validate validates this v1 backup status config +func (m *V1BackupStatusConfig) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateNamespaces(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1BackupStatusConfig) validateNamespaces(formats strfmt.Registry) error { + + if swag.IsZero(m.Namespaces) { // not required + return nil + } + + if err := validate.UniqueItems("namespaces", "body", m.Namespaces); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1BackupStatusConfig) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1BackupStatusConfig) UnmarshalBinary(b []byte) error { + var res V1BackupStatusConfig + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_backup_status_meta.go b/api/models/v1_backup_status_meta.go new file mode 100644 index 00000000..9436b860 --- /dev/null +++ b/api/models/v1_backup_status_meta.go @@ -0,0 +1,120 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1BackupStatusMeta Backup status meta +// +// swagger:model v1BackupStatusMeta +type V1BackupStatusMeta struct { + + // backup name + BackupName string `json:"backupName,omitempty"` + + // backup state + BackupState *V1BackupState `json:"backupState,omitempty"` + + // backuped namespaces + // Unique: true + BackupedNamespaces []string `json:"backupedNamespaces"` + + // expiry date + // Format: date-time + ExpiryDate V1Time `json:"expiryDate,omitempty"` +} + +// Validate validates this v1 backup status meta +func (m *V1BackupStatusMeta) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateBackupState(formats); err != nil { + res = append(res, err) + } + + if err := m.validateBackupedNamespaces(formats); err != nil { + res = append(res, err) + } + + if err := m.validateExpiryDate(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1BackupStatusMeta) validateBackupState(formats strfmt.Registry) error { + + if swag.IsZero(m.BackupState) { // not required + return nil + } + + if m.BackupState != nil { + if err := m.BackupState.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("backupState") + } + return err + } + } + + return nil +} + +func (m *V1BackupStatusMeta) validateBackupedNamespaces(formats strfmt.Registry) error { + + if swag.IsZero(m.BackupedNamespaces) { // not required + return nil + } + + if err := validate.UniqueItems("backupedNamespaces", "body", m.BackupedNamespaces); err != nil { + return err + } + + return nil +} + +func (m *V1BackupStatusMeta) validateExpiryDate(formats strfmt.Registry) error { + + if swag.IsZero(m.ExpiryDate) { // not required + return nil + } + + if err := m.ExpiryDate.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("expiryDate") + } + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1BackupStatusMeta) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1BackupStatusMeta) UnmarshalBinary(b []byte) error { + var res V1BackupStatusMeta + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_basic_oci_registry.go b/api/models/v1_basic_oci_registry.go new file mode 100644 index 00000000..68ad5f4f --- /dev/null +++ b/api/models/v1_basic_oci_registry.go @@ -0,0 +1,99 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1BasicOciRegistry Basic oci registry information +// +// swagger:model v1BasicOciRegistry +type V1BasicOciRegistry struct { + + // kind + Kind string `json:"kind,omitempty"` + + // metadata + Metadata *V1ObjectMeta `json:"metadata,omitempty"` + + // spec + Spec *V1BasicOciRegistrySpec `json:"spec,omitempty"` +} + +// Validate validates this v1 basic oci registry +func (m *V1BasicOciRegistry) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSpec(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1BasicOciRegistry) validateMetadata(formats strfmt.Registry) error { + + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } + return err + } + } + + return nil +} + +func (m *V1BasicOciRegistry) validateSpec(formats strfmt.Registry) error { + + if swag.IsZero(m.Spec) { // not required + return nil + } + + if m.Spec != nil { + if err := m.Spec.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1BasicOciRegistry) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1BasicOciRegistry) UnmarshalBinary(b []byte) error { + var res V1BasicOciRegistry + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_basic_oci_registry_spec.go b/api/models/v1_basic_oci_registry_spec.go new file mode 100644 index 00000000..a6c8b073 --- /dev/null +++ b/api/models/v1_basic_oci_registry_spec.go @@ -0,0 +1,158 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "encoding/json" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1BasicOciRegistrySpec Basic oci registry spec +// +// swagger:model v1BasicOciRegistrySpec +type V1BasicOciRegistrySpec struct { + + // auth + // Required: true + Auth *V1RegistryAuth `json:"auth"` + + // OCI registry content base path + BaseContentPath string `json:"baseContentPath,omitempty"` + + // OCI registry api base path + BasePath string `json:"basePath,omitempty"` + + // OCI registry endpoint + // Required: true + Endpoint *string `json:"endpoint"` + + // provider type + // Enum: [helm zarf pack] + ProviderType *string `json:"providerType,omitempty"` + + // Basic oci registry uid + RegistryUID string `json:"registryUid,omitempty"` + + // scope + Scope string `json:"scope,omitempty"` +} + +// Validate validates this v1 basic oci registry spec +func (m *V1BasicOciRegistrySpec) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateAuth(formats); err != nil { + res = append(res, err) + } + + if err := m.validateEndpoint(formats); err != nil { + res = append(res, err) + } + + if err := m.validateProviderType(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1BasicOciRegistrySpec) validateAuth(formats strfmt.Registry) error { + + if err := validate.Required("auth", "body", m.Auth); err != nil { + return err + } + + if m.Auth != nil { + if err := m.Auth.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("auth") + } + return err + } + } + + return nil +} + +func (m *V1BasicOciRegistrySpec) validateEndpoint(formats strfmt.Registry) error { + + if err := validate.Required("endpoint", "body", m.Endpoint); err != nil { + return err + } + + return nil +} + +var v1BasicOciRegistrySpecTypeProviderTypePropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["helm","zarf","pack"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + v1BasicOciRegistrySpecTypeProviderTypePropEnum = append(v1BasicOciRegistrySpecTypeProviderTypePropEnum, v) + } +} + +const ( + + // V1BasicOciRegistrySpecProviderTypeHelm captures enum value "helm" + V1BasicOciRegistrySpecProviderTypeHelm string = "helm" + + // V1BasicOciRegistrySpecProviderTypeZarf captures enum value "zarf" + V1BasicOciRegistrySpecProviderTypeZarf string = "zarf" + + // V1BasicOciRegistrySpecProviderTypePack captures enum value "pack" + V1BasicOciRegistrySpecProviderTypePack string = "pack" +) + +// prop value enum +func (m *V1BasicOciRegistrySpec) validateProviderTypeEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, v1BasicOciRegistrySpecTypeProviderTypePropEnum, true); err != nil { + return err + } + return nil +} + +func (m *V1BasicOciRegistrySpec) validateProviderType(formats strfmt.Registry) error { + + if swag.IsZero(m.ProviderType) { // not required + return nil + } + + // value enum + if err := m.validateProviderTypeEnum("providerType", "body", *m.ProviderType); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1BasicOciRegistrySpec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1BasicOciRegistrySpec) UnmarshalBinary(b []byte) error { + var res V1BasicOciRegistrySpec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_bulk_delete_failure.go b/api/models/v1_bulk_delete_failure.go new file mode 100644 index 00000000..034aa2b5 --- /dev/null +++ b/api/models/v1_bulk_delete_failure.go @@ -0,0 +1,49 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1BulkDeleteFailure v1 bulk delete failure +// +// swagger:model v1BulkDeleteFailure +type V1BulkDeleteFailure struct { + + // err msg + ErrMsg string `json:"errMsg,omitempty"` + + // name + Name string `json:"name,omitempty"` + + // uid + UID string `json:"uid,omitempty"` +} + +// Validate validates this v1 bulk delete failure +func (m *V1BulkDeleteFailure) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1BulkDeleteFailure) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1BulkDeleteFailure) UnmarshalBinary(b []byte) error { + var res V1BulkDeleteFailure + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_bulk_delete_request.go b/api/models/v1_bulk_delete_request.go new file mode 100644 index 00000000..7793dcb2 --- /dev/null +++ b/api/models/v1_bulk_delete_request.go @@ -0,0 +1,69 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1BulkDeleteRequest v1 bulk delete request +// +// swagger:model v1BulkDeleteRequest +type V1BulkDeleteRequest struct { + + // uids + // Required: true + // Unique: true + Uids []string `json:"uids"` +} + +// Validate validates this v1 bulk delete request +func (m *V1BulkDeleteRequest) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateUids(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1BulkDeleteRequest) validateUids(formats strfmt.Registry) error { + + if err := validate.Required("uids", "body", m.Uids); err != nil { + return err + } + + if err := validate.UniqueItems("uids", "body", m.Uids); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1BulkDeleteRequest) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1BulkDeleteRequest) UnmarshalBinary(b []byte) error { + var res V1BulkDeleteRequest + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_bulk_delete_response.go b/api/models/v1_bulk_delete_response.go new file mode 100644 index 00000000..4b33f41e --- /dev/null +++ b/api/models/v1_bulk_delete_response.go @@ -0,0 +1,95 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1BulkDeleteResponse v1 bulk delete response +// +// swagger:model v1BulkDeleteResponse +type V1BulkDeleteResponse struct { + + // deleted count + DeletedCount int64 `json:"deletedCount"` + + // failures + // Unique: true + Failures []*V1BulkDeleteFailure `json:"failures"` + + // is succeeded + IsSucceeded bool `json:"isSucceeded"` + + // message + Message string `json:"message"` +} + +// Validate validates this v1 bulk delete response +func (m *V1BulkDeleteResponse) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateFailures(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1BulkDeleteResponse) validateFailures(formats strfmt.Registry) error { + + if swag.IsZero(m.Failures) { // not required + return nil + } + + if err := validate.UniqueItems("failures", "body", m.Failures); err != nil { + return err + } + + for i := 0; i < len(m.Failures); i++ { + if swag.IsZero(m.Failures[i]) { // not required + continue + } + + if m.Failures[i] != nil { + if err := m.Failures[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("failures" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1BulkDeleteResponse) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1BulkDeleteResponse) UnmarshalBinary(b []byte) error { + var res V1BulkDeleteResponse + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_bulk_events.go b/api/models/v1_bulk_events.go new file mode 100644 index 00000000..70ec0353 --- /dev/null +++ b/api/models/v1_bulk_events.go @@ -0,0 +1,50 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1BulkEvents Describes a list component events' details +// +// swagger:model v1BulkEvents +type V1BulkEvents []*V1Event + +// Validate validates this v1 bulk events +func (m V1BulkEvents) Validate(formats strfmt.Registry) error { + var res []error + + if err := validate.UniqueItems("", "body", m); err != nil { + return err + } + + for i := 0; i < len(m); i++ { + if swag.IsZero(m[i]) { // not required + continue + } + + if m[i] != nil { + if err := m[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName(strconv.Itoa(i)) + } + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/models/v1_cert.go b/api/models/v1_cert.go new file mode 100644 index 00000000..a249b956 --- /dev/null +++ b/api/models/v1_cert.go @@ -0,0 +1,49 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1Cert v1 cert +// +// swagger:model v1Cert +type V1Cert struct { + + // certificate + Certificate string `json:"certificate"` + + // is c a + IsCA bool `json:"isCA"` + + // key + Key string `json:"key"` +} + +// Validate validates this v1 cert +func (m *V1Cert) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1Cert) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1Cert) UnmarshalBinary(b []byte) error { + var res V1Cert + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_certificate.go b/api/models/v1_certificate.go new file mode 100644 index 00000000..bf634536 --- /dev/null +++ b/api/models/v1_certificate.go @@ -0,0 +1,73 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1Certificate Certificate details +// +// swagger:model v1Certificate +type V1Certificate struct { + + // Certificate expiry time + // Format: date-time + Expiry V1Time `json:"expiry,omitempty"` + + // name + Name string `json:"name,omitempty"` +} + +// Validate validates this v1 certificate +func (m *V1Certificate) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateExpiry(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1Certificate) validateExpiry(formats strfmt.Registry) error { + + if swag.IsZero(m.Expiry) { // not required + return nil + } + + if err := m.Expiry.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("expiry") + } + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1Certificate) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1Certificate) UnmarshalBinary(b []byte) error { + var res V1Certificate + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_certificate_authority.go b/api/models/v1_certificate_authority.go new file mode 100644 index 00000000..ad8b98e8 --- /dev/null +++ b/api/models/v1_certificate_authority.go @@ -0,0 +1,107 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1CertificateAuthority Certificate Authority +// +// swagger:model v1CertificateAuthority +type V1CertificateAuthority struct { + + // certificates + Certificates []*V1Certificate `json:"certificates"` + + // Certificate expiry time + // Format: date-time + Expiry V1Time `json:"expiry,omitempty"` + + // name + Name string `json:"name,omitempty"` +} + +// Validate validates this v1 certificate authority +func (m *V1CertificateAuthority) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateCertificates(formats); err != nil { + res = append(res, err) + } + + if err := m.validateExpiry(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1CertificateAuthority) validateCertificates(formats strfmt.Registry) error { + + if swag.IsZero(m.Certificates) { // not required + return nil + } + + for i := 0; i < len(m.Certificates); i++ { + if swag.IsZero(m.Certificates[i]) { // not required + continue + } + + if m.Certificates[i] != nil { + if err := m.Certificates[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("certificates" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1CertificateAuthority) validateExpiry(formats strfmt.Registry) error { + + if swag.IsZero(m.Expiry) { // not required + return nil + } + + if err := m.Expiry.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("expiry") + } + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1CertificateAuthority) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1CertificateAuthority) UnmarshalBinary(b []byte) error { + var res V1CertificateAuthority + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_channel.go b/api/models/v1_channel.go new file mode 100644 index 00000000..6589d0e7 --- /dev/null +++ b/api/models/v1_channel.go @@ -0,0 +1,227 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "encoding/json" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1Channel v1 channel +// +// swagger:model v1Channel +type V1Channel struct { + + // alert all users + AlertAllUsers bool `json:"alertAllUsers"` + + // created by + CreatedBy string `json:"createdBy,omitempty"` + + // http + HTTP *V1ChannelHTTP `json:"http,omitempty"` + + // identifiers + // Unique: true + Identifiers []string `json:"identifiers"` + + // is active + IsActive bool `json:"isActive"` + + // status + Status *V1AlertNotificationStatus `json:"status,omitempty"` + + // type + // Enum: [email app http] + Type string `json:"type,omitempty"` + + // uid + UID string `json:"uid,omitempty"` +} + +// Validate validates this v1 channel +func (m *V1Channel) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateHTTP(formats); err != nil { + res = append(res, err) + } + + if err := m.validateIdentifiers(formats); err != nil { + res = append(res, err) + } + + if err := m.validateStatus(formats); err != nil { + res = append(res, err) + } + + if err := m.validateType(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1Channel) validateHTTP(formats strfmt.Registry) error { + + if swag.IsZero(m.HTTP) { // not required + return nil + } + + if m.HTTP != nil { + if err := m.HTTP.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("http") + } + return err + } + } + + return nil +} + +func (m *V1Channel) validateIdentifiers(formats strfmt.Registry) error { + + if swag.IsZero(m.Identifiers) { // not required + return nil + } + + if err := validate.UniqueItems("identifiers", "body", m.Identifiers); err != nil { + return err + } + + return nil +} + +func (m *V1Channel) validateStatus(formats strfmt.Registry) error { + + if swag.IsZero(m.Status) { // not required + return nil + } + + if m.Status != nil { + if err := m.Status.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("status") + } + return err + } + } + + return nil +} + +var v1ChannelTypeTypePropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["email","app","http"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + v1ChannelTypeTypePropEnum = append(v1ChannelTypeTypePropEnum, v) + } +} + +const ( + + // V1ChannelTypeEmail captures enum value "email" + V1ChannelTypeEmail string = "email" + + // V1ChannelTypeApp captures enum value "app" + V1ChannelTypeApp string = "app" + + // V1ChannelTypeHTTP captures enum value "http" + V1ChannelTypeHTTP string = "http" +) + +// prop value enum +func (m *V1Channel) validateTypeEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, v1ChannelTypeTypePropEnum, true); err != nil { + return err + } + return nil +} + +func (m *V1Channel) validateType(formats strfmt.Registry) error { + + if swag.IsZero(m.Type) { // not required + return nil + } + + // value enum + if err := m.validateTypeEnum("type", "body", m.Type); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1Channel) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1Channel) UnmarshalBinary(b []byte) error { + var res V1Channel + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} + +// V1ChannelHTTP v1 channel HTTP +// +// swagger:model V1ChannelHTTP +type V1ChannelHTTP struct { + + // body + Body string `json:"body,omitempty"` + + // headers + Headers map[string]string `json:"headers,omitempty"` + + // method + Method string `json:"method,omitempty"` + + // url + URL string `json:"url,omitempty"` +} + +// Validate validates this v1 channel HTTP +func (m *V1ChannelHTTP) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1ChannelHTTP) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ChannelHTTP) UnmarshalBinary(b []byte) error { + var res V1ChannelHTTP + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cloud_account_meta.go b/api/models/v1_cloud_account_meta.go new file mode 100644 index 00000000..decd2fa2 --- /dev/null +++ b/api/models/v1_cloud_account_meta.go @@ -0,0 +1,46 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1CloudAccountMeta Cloud account meta information +// +// swagger:model v1CloudAccountMeta +type V1CloudAccountMeta struct { + + // name + Name string `json:"name,omitempty"` + + // uid + UID string `json:"uid,omitempty"` +} + +// Validate validates this v1 cloud account meta +func (m *V1CloudAccountMeta) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1CloudAccountMeta) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1CloudAccountMeta) UnmarshalBinary(b []byte) error { + var res V1CloudAccountMeta + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cloud_account_metadata.go b/api/models/v1_cloud_account_metadata.go new file mode 100644 index 00000000..ed3b3d1c --- /dev/null +++ b/api/models/v1_cloud_account_metadata.go @@ -0,0 +1,74 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1CloudAccountMetadata Cloud account metadata summary +// +// swagger:model v1CloudAccountMetadata +type V1CloudAccountMetadata struct { + + // kind + Kind string `json:"kind,omitempty"` + + // metadata + Metadata *V1ObjectMeta `json:"metadata,omitempty"` +} + +// Validate validates this v1 cloud account metadata +func (m *V1CloudAccountMetadata) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1CloudAccountMetadata) validateMetadata(formats strfmt.Registry) error { + + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1CloudAccountMetadata) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1CloudAccountMetadata) UnmarshalBinary(b []byte) error { + var res V1CloudAccountMetadata + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cloud_account_settings.go b/api/models/v1_cloud_account_settings.go new file mode 100644 index 00000000..01ebc999 --- /dev/null +++ b/api/models/v1_cloud_account_settings.go @@ -0,0 +1,43 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1CloudAccountSettings Cloud account settings +// +// swagger:model v1CloudAccountSettings +type V1CloudAccountSettings struct { + + // Will disable certain properties request to cloud and the input is collected directly from the user + DisablePropertiesRequest bool `json:"disablePropertiesRequest"` +} + +// Validate validates this v1 cloud account settings +func (m *V1CloudAccountSettings) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1CloudAccountSettings) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1CloudAccountSettings) UnmarshalBinary(b []byte) error { + var res V1CloudAccountSettings + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cloud_account_status.go b/api/models/v1_cloud_account_status.go new file mode 100644 index 00000000..f145478b --- /dev/null +++ b/api/models/v1_cloud_account_status.go @@ -0,0 +1,43 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1CloudAccountStatus Status of the account +// +// swagger:model v1CloudAccountStatus +type V1CloudAccountStatus struct { + + // Cloud account status + State string `json:"state,omitempty"` +} + +// Validate validates this v1 cloud account status +func (m *V1CloudAccountStatus) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1CloudAccountStatus) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1CloudAccountStatus) UnmarshalBinary(b []byte) error { + var res V1CloudAccountStatus + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cloud_account_summary.go b/api/models/v1_cloud_account_summary.go new file mode 100644 index 00000000..d3780790 --- /dev/null +++ b/api/models/v1_cloud_account_summary.go @@ -0,0 +1,156 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1CloudAccountSummary Cloud account summary +// +// swagger:model v1CloudAccountSummary +type V1CloudAccountSummary struct { + + // kind + Kind string `json:"kind,omitempty"` + + // metadata + Metadata *V1ObjectMeta `json:"metadata,omitempty"` + + // spec summary + SpecSummary *V1CloudAccountSummarySpecSummary `json:"specSummary,omitempty"` + + // status + Status *V1CloudAccountStatus `json:"status,omitempty"` +} + +// Validate validates this v1 cloud account summary +func (m *V1CloudAccountSummary) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSpecSummary(formats); err != nil { + res = append(res, err) + } + + if err := m.validateStatus(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1CloudAccountSummary) validateMetadata(formats strfmt.Registry) error { + + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } + return err + } + } + + return nil +} + +func (m *V1CloudAccountSummary) validateSpecSummary(formats strfmt.Registry) error { + + if swag.IsZero(m.SpecSummary) { // not required + return nil + } + + if m.SpecSummary != nil { + if err := m.SpecSummary.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("specSummary") + } + return err + } + } + + return nil +} + +func (m *V1CloudAccountSummary) validateStatus(formats strfmt.Registry) error { + + if swag.IsZero(m.Status) { // not required + return nil + } + + if m.Status != nil { + if err := m.Status.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("status") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1CloudAccountSummary) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1CloudAccountSummary) UnmarshalBinary(b []byte) error { + var res V1CloudAccountSummary + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} + +// V1CloudAccountSummarySpecSummary Cloud account spec summary +// +// swagger:model V1CloudAccountSummarySpecSummary +type V1CloudAccountSummarySpecSummary struct { + + // account Id + AccountID string `json:"accountId,omitempty"` +} + +// Validate validates this v1 cloud account summary spec summary +func (m *V1CloudAccountSummarySpecSummary) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1CloudAccountSummarySpecSummary) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1CloudAccountSummarySpecSummary) UnmarshalBinary(b []byte) error { + var res V1CloudAccountSummarySpecSummary + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cloud_account_uid_entity.go b/api/models/v1_cloud_account_uid_entity.go new file mode 100644 index 00000000..e67deace --- /dev/null +++ b/api/models/v1_cloud_account_uid_entity.go @@ -0,0 +1,43 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1CloudAccountUIDEntity Cloud account uid entity +// +// swagger:model v1CloudAccountUidEntity +type V1CloudAccountUIDEntity struct { + + // Cloud account uid + UID string `json:"uid,omitempty"` +} + +// Validate validates this v1 cloud account Uid entity +func (m *V1CloudAccountUIDEntity) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1CloudAccountUIDEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1CloudAccountUIDEntity) UnmarshalBinary(b []byte) error { + var res V1CloudAccountUIDEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cloud_accounts_metadata.go b/api/models/v1_cloud_accounts_metadata.go new file mode 100644 index 00000000..a09d2ff1 --- /dev/null +++ b/api/models/v1_cloud_accounts_metadata.go @@ -0,0 +1,87 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1CloudAccountsMetadata v1 cloud accounts metadata +// +// swagger:model v1CloudAccountsMetadata +type V1CloudAccountsMetadata struct { + + // items + // Required: true + // Unique: true + Items []*V1CloudAccountMetadata `json:"items"` +} + +// Validate validates this v1 cloud accounts metadata +func (m *V1CloudAccountsMetadata) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateItems(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1CloudAccountsMetadata) validateItems(formats strfmt.Registry) error { + + if err := validate.Required("items", "body", m.Items); err != nil { + return err + } + + if err := validate.UniqueItems("items", "body", m.Items); err != nil { + return err + } + + for i := 0; i < len(m.Items); i++ { + if swag.IsZero(m.Items[i]) { // not required + continue + } + + if m.Items[i] != nil { + if err := m.Items[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("items" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1CloudAccountsMetadata) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1CloudAccountsMetadata) UnmarshalBinary(b []byte) error { + var res V1CloudAccountsMetadata + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cloud_accounts_patch.go b/api/models/v1_cloud_accounts_patch.go new file mode 100644 index 00000000..6151f275 --- /dev/null +++ b/api/models/v1_cloud_accounts_patch.go @@ -0,0 +1,45 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1CloudAccountsPatch v1 cloud accounts patch +// +// swagger:model v1CloudAccountsPatch +type V1CloudAccountsPatch []*V1HTTPPatch + +// Validate validates this v1 cloud accounts patch +func (m V1CloudAccountsPatch) Validate(formats strfmt.Registry) error { + var res []error + + for i := 0; i < len(m); i++ { + if swag.IsZero(m[i]) { // not required + continue + } + + if m[i] != nil { + if err := m[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName(strconv.Itoa(i)) + } + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/models/v1_cloud_accounts_summary.go b/api/models/v1_cloud_accounts_summary.go new file mode 100644 index 00000000..ecb91fcc --- /dev/null +++ b/api/models/v1_cloud_accounts_summary.go @@ -0,0 +1,112 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1CloudAccountsSummary v1 cloud accounts summary +// +// swagger:model v1CloudAccountsSummary +type V1CloudAccountsSummary struct { + + // items + // Required: true + // Unique: true + Items []*V1CloudAccountSummary `json:"items"` + + // listmeta + Listmeta *V1ListMetaData `json:"listmeta,omitempty"` +} + +// Validate validates this v1 cloud accounts summary +func (m *V1CloudAccountsSummary) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateItems(formats); err != nil { + res = append(res, err) + } + + if err := m.validateListmeta(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1CloudAccountsSummary) validateItems(formats strfmt.Registry) error { + + if err := validate.Required("items", "body", m.Items); err != nil { + return err + } + + if err := validate.UniqueItems("items", "body", m.Items); err != nil { + return err + } + + for i := 0; i < len(m.Items); i++ { + if swag.IsZero(m.Items[i]) { // not required + continue + } + + if m.Items[i] != nil { + if err := m.Items[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("items" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1CloudAccountsSummary) validateListmeta(formats strfmt.Registry) error { + + if swag.IsZero(m.Listmeta) { // not required + return nil + } + + if m.Listmeta != nil { + if err := m.Listmeta.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("listmeta") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1CloudAccountsSummary) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1CloudAccountsSummary) UnmarshalBinary(b []byte) error { + var res V1CloudAccountsSummary + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cloud_category.go b/api/models/v1_cloud_category.go new file mode 100644 index 00000000..56a6b7d3 --- /dev/null +++ b/api/models/v1_cloud_category.go @@ -0,0 +1,66 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "encoding/json" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" +) + +// V1CloudCategory Cloud category description +// +// swagger:model v1CloudCategory +type V1CloudCategory string + +const ( + + // V1CloudCategoryDatacenter captures enum value "datacenter" + V1CloudCategoryDatacenter V1CloudCategory = "datacenter" + + // V1CloudCategoryCloud captures enum value "cloud" + V1CloudCategoryCloud V1CloudCategory = "cloud" + + // V1CloudCategoryEdge captures enum value "edge" + V1CloudCategoryEdge V1CloudCategory = "edge" +) + +// for schema +var v1CloudCategoryEnum []interface{} + +func init() { + var res []V1CloudCategory + if err := json.Unmarshal([]byte(`["datacenter","cloud","edge"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + v1CloudCategoryEnum = append(v1CloudCategoryEnum, v) + } +} + +func (m V1CloudCategory) validateV1CloudCategoryEnum(path, location string, value V1CloudCategory) error { + if err := validate.EnumCase(path, location, value, v1CloudCategoryEnum, true); err != nil { + return err + } + return nil +} + +// Validate validates this v1 cloud category +func (m V1CloudCategory) Validate(formats strfmt.Registry) error { + var res []error + + // value enum + if err := m.validateV1CloudCategoryEnum("", "body", m); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/models/v1_cloud_config_meta.go b/api/models/v1_cloud_config_meta.go new file mode 100644 index 00000000..c2e1c086 --- /dev/null +++ b/api/models/v1_cloud_config_meta.go @@ -0,0 +1,86 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1CloudConfigMeta v1 cloud config meta +// +// swagger:model v1CloudConfigMeta +type V1CloudConfigMeta struct { + + // cloud type + CloudType string `json:"cloudType,omitempty"` + + // Machine pool meta information + MachinePools []*V1MachinePoolMeta `json:"machinePools"` + + // Cluster's cloud config uid + UID string `json:"uid,omitempty"` +} + +// Validate validates this v1 cloud config meta +func (m *V1CloudConfigMeta) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMachinePools(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1CloudConfigMeta) validateMachinePools(formats strfmt.Registry) error { + + if swag.IsZero(m.MachinePools) { // not required + return nil + } + + for i := 0; i < len(m.MachinePools); i++ { + if swag.IsZero(m.MachinePools[i]) { // not required + continue + } + + if m.MachinePools[i] != nil { + if err := m.MachinePools[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("machinePools" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1CloudConfigMeta) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1CloudConfigMeta) UnmarshalBinary(b []byte) error { + var res V1CloudConfigMeta + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cloud_cost.go b/api/models/v1_cloud_cost.go new file mode 100644 index 00000000..e08d0729 --- /dev/null +++ b/api/models/v1_cloud_cost.go @@ -0,0 +1,49 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1CloudCost Cloud cost information +// +// swagger:model v1CloudCost +type V1CloudCost struct { + + // compute + Compute float64 `json:"compute"` + + // storage + Storage float64 `json:"storage"` + + // total + Total float64 `json:"total"` +} + +// Validate validates this v1 cloud cost +func (m *V1CloudCost) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1CloudCost) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1CloudCost) UnmarshalBinary(b []byte) error { + var res V1CloudCost + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cloud_cost_data_point.go b/api/models/v1_cloud_cost_data_point.go new file mode 100644 index 00000000..8bf5f3a3 --- /dev/null +++ b/api/models/v1_cloud_cost_data_point.go @@ -0,0 +1,52 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1CloudCostDataPoint Cloud cost data point information +// +// swagger:model v1CloudCostDataPoint +type V1CloudCostDataPoint struct { + + // compute + Compute float64 `json:"compute"` + + // storage + Storage float64 `json:"storage"` + + // timestamp + Timestamp int64 `json:"timestamp,omitempty"` + + // total + Total float64 `json:"total"` +} + +// Validate validates this v1 cloud cost data point +func (m *V1CloudCostDataPoint) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1CloudCostDataPoint) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1CloudCostDataPoint) UnmarshalBinary(b []byte) error { + var res V1CloudCostDataPoint + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cloud_instance_rate_config.go b/api/models/v1_cloud_instance_rate_config.go new file mode 100644 index 00000000..76788cd8 --- /dev/null +++ b/api/models/v1_cloud_instance_rate_config.go @@ -0,0 +1,46 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1CloudInstanceRateConfig Cloud instance rate config +// +// swagger:model v1CloudInstanceRateConfig +type V1CloudInstanceRateConfig struct { + + // compute rate proportion + ComputeRateProportion float32 `json:"computeRateProportion,omitempty"` + + // memory rate proportion + MemoryRateProportion float32 `json:"memoryRateProportion,omitempty"` +} + +// Validate validates this v1 cloud instance rate config +func (m *V1CloudInstanceRateConfig) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1CloudInstanceRateConfig) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1CloudInstanceRateConfig) UnmarshalBinary(b []byte) error { + var res V1CloudInstanceRateConfig + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cloud_machine_status.go b/api/models/v1_cloud_machine_status.go new file mode 100644 index 00000000..108d07db --- /dev/null +++ b/api/models/v1_cloud_machine_status.go @@ -0,0 +1,168 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "encoding/json" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1CloudMachineStatus cloud machine status +// +// swagger:model v1CloudMachineStatus +type V1CloudMachineStatus struct { + + // health + Health *V1MachineHealth `json:"health,omitempty"` + + // instance state + // Enum: [Pending Provisioning Provisioned Running Deleting Deleted Failed Unknown] + InstanceState string `json:"instanceState,omitempty"` + + // maintenance status + MaintenanceStatus *V1MachineMaintenanceStatus `json:"maintenanceStatus,omitempty"` +} + +// Validate validates this v1 cloud machine status +func (m *V1CloudMachineStatus) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateHealth(formats); err != nil { + res = append(res, err) + } + + if err := m.validateInstanceState(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMaintenanceStatus(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1CloudMachineStatus) validateHealth(formats strfmt.Registry) error { + + if swag.IsZero(m.Health) { // not required + return nil + } + + if m.Health != nil { + if err := m.Health.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("health") + } + return err + } + } + + return nil +} + +var v1CloudMachineStatusTypeInstanceStatePropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["Pending","Provisioning","Provisioned","Running","Deleting","Deleted","Failed","Unknown"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + v1CloudMachineStatusTypeInstanceStatePropEnum = append(v1CloudMachineStatusTypeInstanceStatePropEnum, v) + } +} + +const ( + + // V1CloudMachineStatusInstanceStatePending captures enum value "Pending" + V1CloudMachineStatusInstanceStatePending string = "Pending" + + // V1CloudMachineStatusInstanceStateProvisioning captures enum value "Provisioning" + V1CloudMachineStatusInstanceStateProvisioning string = "Provisioning" + + // V1CloudMachineStatusInstanceStateProvisioned captures enum value "Provisioned" + V1CloudMachineStatusInstanceStateProvisioned string = "Provisioned" + + // V1CloudMachineStatusInstanceStateRunning captures enum value "Running" + V1CloudMachineStatusInstanceStateRunning string = "Running" + + // V1CloudMachineStatusInstanceStateDeleting captures enum value "Deleting" + V1CloudMachineStatusInstanceStateDeleting string = "Deleting" + + // V1CloudMachineStatusInstanceStateDeleted captures enum value "Deleted" + V1CloudMachineStatusInstanceStateDeleted string = "Deleted" + + // V1CloudMachineStatusInstanceStateFailed captures enum value "Failed" + V1CloudMachineStatusInstanceStateFailed string = "Failed" + + // V1CloudMachineStatusInstanceStateUnknown captures enum value "Unknown" + V1CloudMachineStatusInstanceStateUnknown string = "Unknown" +) + +// prop value enum +func (m *V1CloudMachineStatus) validateInstanceStateEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, v1CloudMachineStatusTypeInstanceStatePropEnum, true); err != nil { + return err + } + return nil +} + +func (m *V1CloudMachineStatus) validateInstanceState(formats strfmt.Registry) error { + + if swag.IsZero(m.InstanceState) { // not required + return nil + } + + // value enum + if err := m.validateInstanceStateEnum("instanceState", "body", m.InstanceState); err != nil { + return err + } + + return nil +} + +func (m *V1CloudMachineStatus) validateMaintenanceStatus(formats strfmt.Registry) error { + + if swag.IsZero(m.MaintenanceStatus) { // not required + return nil + } + + if m.MaintenanceStatus != nil { + if err := m.MaintenanceStatus.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("maintenanceStatus") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1CloudMachineStatus) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1CloudMachineStatus) UnmarshalBinary(b []byte) error { + var res V1CloudMachineStatus + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cloud_rate.go b/api/models/v1_cloud_rate.go new file mode 100644 index 00000000..5fedd055 --- /dev/null +++ b/api/models/v1_cloud_rate.go @@ -0,0 +1,108 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1CloudRate Cloud estimated rate information +// +// swagger:model v1CloudRate +type V1CloudRate struct { + + // compute + Compute *V1ComputeRate `json:"compute,omitempty"` + + // storage + Storage []*V1StorageRate `json:"storage"` + + // total + Total float64 `json:"total"` +} + +// Validate validates this v1 cloud rate +func (m *V1CloudRate) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateCompute(formats); err != nil { + res = append(res, err) + } + + if err := m.validateStorage(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1CloudRate) validateCompute(formats strfmt.Registry) error { + + if swag.IsZero(m.Compute) { // not required + return nil + } + + if m.Compute != nil { + if err := m.Compute.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("compute") + } + return err + } + } + + return nil +} + +func (m *V1CloudRate) validateStorage(formats strfmt.Registry) error { + + if swag.IsZero(m.Storage) { // not required + return nil + } + + for i := 0; i < len(m.Storage); i++ { + if swag.IsZero(m.Storage[i]) { // not required + continue + } + + if m.Storage[i] != nil { + if err := m.Storage[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("storage" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1CloudRate) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1CloudRate) UnmarshalBinary(b []byte) error { + var res V1CloudRate + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cloud_resource_metadata.go b/api/models/v1_cloud_resource_metadata.go new file mode 100644 index 00000000..57f2faae --- /dev/null +++ b/api/models/v1_cloud_resource_metadata.go @@ -0,0 +1,105 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1CloudResourceMetadata Cloud resource metadata +// +// swagger:model v1CloudResourceMetadata +type V1CloudResourceMetadata struct { + + // instance types + InstanceTypes map[string]V1InstanceType `json:"instanceTypes,omitempty"` + + // storage types + StorageTypes map[string]V1StorageType `json:"storageTypes,omitempty"` +} + +// Validate validates this v1 cloud resource metadata +func (m *V1CloudResourceMetadata) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateInstanceTypes(formats); err != nil { + res = append(res, err) + } + + if err := m.validateStorageTypes(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1CloudResourceMetadata) validateInstanceTypes(formats strfmt.Registry) error { + + if swag.IsZero(m.InstanceTypes) { // not required + return nil + } + + for k := range m.InstanceTypes { + + if err := validate.Required("instanceTypes"+"."+k, "body", m.InstanceTypes[k]); err != nil { + return err + } + if val, ok := m.InstanceTypes[k]; ok { + if err := val.Validate(formats); err != nil { + return err + } + } + + } + + return nil +} + +func (m *V1CloudResourceMetadata) validateStorageTypes(formats strfmt.Registry) error { + + if swag.IsZero(m.StorageTypes) { // not required + return nil + } + + for k := range m.StorageTypes { + + if err := validate.Required("storageTypes"+"."+k, "body", m.StorageTypes[k]); err != nil { + return err + } + if val, ok := m.StorageTypes[k]; ok { + if err := val.Validate(formats); err != nil { + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1CloudResourceMetadata) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1CloudResourceMetadata) UnmarshalBinary(b []byte) error { + var res V1CloudResourceMetadata + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cloud_spot_price.go b/api/models/v1_cloud_spot_price.go new file mode 100644 index 00000000..a68a034f --- /dev/null +++ b/api/models/v1_cloud_spot_price.go @@ -0,0 +1,43 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1CloudSpotPrice Spot price entity of a particular cloud type +// +// swagger:model v1CloudSpotPrice +type V1CloudSpotPrice struct { + + // Spot price of a resource for a particular cloud + SpotPrice float64 `json:"spotPrice"` +} + +// Validate validates this v1 cloud spot price +func (m *V1CloudSpotPrice) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1CloudSpotPrice) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1CloudSpotPrice) UnmarshalBinary(b []byte) error { + var res V1CloudSpotPrice + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cloud_type.go b/api/models/v1_cloud_type.go new file mode 100644 index 00000000..bc16d400 --- /dev/null +++ b/api/models/v1_cloud_type.go @@ -0,0 +1,129 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "encoding/json" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" +) + +// V1CloudType v1 cloud type +// +// swagger:model v1CloudType +type V1CloudType string + +func NewV1CloudType(value V1CloudType) *V1CloudType { + return &value +} + +// Pointer returns a pointer to a freshly-allocated V1CloudType. +func (m V1CloudType) Pointer() *V1CloudType { + return &m +} + +const ( + + // V1CloudTypeAll captures enum value "all" + V1CloudTypeAll V1CloudType = "all" + + // V1CloudTypeAws captures enum value "aws" + V1CloudTypeAws V1CloudType = "aws" + + // V1CloudTypeAzure captures enum value "azure" + V1CloudTypeAzure V1CloudType = "azure" + + // V1CloudTypeGcp captures enum value "gcp" + V1CloudTypeGcp V1CloudType = "gcp" + + // V1CloudTypeVsphere captures enum value "vsphere" + V1CloudTypeVsphere V1CloudType = "vsphere" + + // V1CloudTypeOpenstack captures enum value "openstack" + V1CloudTypeOpenstack V1CloudType = "openstack" + + // V1CloudTypeMaas captures enum value "maas" + V1CloudTypeMaas V1CloudType = "maas" + + // V1CloudTypeNested captures enum value "nested" + V1CloudTypeNested V1CloudType = "nested" + + // V1CloudTypeBaremetal captures enum value "baremetal" + V1CloudTypeBaremetal V1CloudType = "baremetal" + + // V1CloudTypeEks captures enum value "eks" + V1CloudTypeEks V1CloudType = "eks" + + // V1CloudTypeAks captures enum value "aks" + V1CloudTypeAks V1CloudType = "aks" + + // V1CloudTypeEdge captures enum value "edge" + V1CloudTypeEdge V1CloudType = "edge" + + // V1CloudTypeEdgeDashNative captures enum value "edge-native" + V1CloudTypeEdgeDashNative V1CloudType = "edge-native" + + // V1CloudTypeLibvirt captures enum value "libvirt" + V1CloudTypeLibvirt V1CloudType = "libvirt" + + // V1CloudTypeTencent captures enum value "tencent" + V1CloudTypeTencent V1CloudType = "tencent" + + // V1CloudTypeTke captures enum value "tke" + V1CloudTypeTke V1CloudType = "tke" + + // V1CloudTypeCoxedge captures enum value "coxedge" + V1CloudTypeCoxedge V1CloudType = "coxedge" + + // V1CloudTypeGeneric captures enum value "generic" + V1CloudTypeGeneric V1CloudType = "generic" + + // V1CloudTypeGke captures enum value "gke" + V1CloudTypeGke V1CloudType = "gke" +) + +// for schema +var v1CloudTypeEnum []interface{} + +func init() { + var res []V1CloudType + if err := json.Unmarshal([]byte(`["all","aws","azure","gcp","vsphere","openstack","maas","nested","baremetal","eks","aks","edge","edge-native","libvirt","tencent","tke","coxedge","generic","gke"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + v1CloudTypeEnum = append(v1CloudTypeEnum, v) + } +} + +func (m V1CloudType) validateV1CloudTypeEnum(path, location string, value V1CloudType) error { + if err := validate.EnumCase(path, location, value, v1CloudTypeEnum, true); err != nil { + return err + } + return nil +} + +// Validate validates this v1 cloud type +func (m V1CloudType) Validate(formats strfmt.Registry) error { + var res []error + + // value enum + if err := m.validateV1CloudTypeEnum("", "body", m); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +// ContextValidate validates this v1 cloud type based on context it is used +func (m V1CloudType) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} diff --git a/api/models/v1_cloud_watch.go b/api/models/v1_cloud_watch.go new file mode 100644 index 00000000..17e1a453 --- /dev/null +++ b/api/models/v1_cloud_watch.go @@ -0,0 +1,80 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1CloudWatch v1 cloud watch +// +// swagger:model v1CloudWatch +type V1CloudWatch struct { + + // credentials + Credentials *V1AwsCloudAccount `json:"credentials,omitempty"` + + // group + Group string `json:"group,omitempty"` + + // region + Region string `json:"region,omitempty"` + + // stream + Stream string `json:"stream,omitempty"` +} + +// Validate validates this v1 cloud watch +func (m *V1CloudWatch) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateCredentials(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1CloudWatch) validateCredentials(formats strfmt.Registry) error { + + if swag.IsZero(m.Credentials) { // not required + return nil + } + + if m.Credentials != nil { + if err := m.Credentials.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("credentials") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1CloudWatch) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1CloudWatch) UnmarshalBinary(b []byte) error { + var res V1CloudWatch + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cloud_watch_config.go b/api/models/v1_cloud_watch_config.go new file mode 100644 index 00000000..581d2d4b --- /dev/null +++ b/api/models/v1_cloud_watch_config.go @@ -0,0 +1,80 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1CloudWatchConfig Cloud watch config entity +// +// swagger:model v1.CloudWatchConfig +type V1CloudWatchConfig struct { + + // credentials + Credentials *V1AwsCloudAccount `json:"credentials,omitempty"` + + // Name of the group + Group string `json:"group,omitempty"` + + // Name of the region + Region string `json:"region,omitempty"` + + // Name of the stream + Stream string `json:"stream,omitempty"` +} + +// Validate validates this v1 cloud watch config +func (m *V1CloudWatchConfig) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateCredentials(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1CloudWatchConfig) validateCredentials(formats strfmt.Registry) error { + + if swag.IsZero(m.Credentials) { // not required + return nil + } + + if m.Credentials != nil { + if err := m.Credentials.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("credentials") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1CloudWatchConfig) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1CloudWatchConfig) UnmarshalBinary(b []byte) error { + var res V1CloudWatchConfig + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cluster_backup.go b/api/models/v1_cluster_backup.go new file mode 100644 index 00000000..91167576 --- /dev/null +++ b/api/models/v1_cluster_backup.go @@ -0,0 +1,121 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ClusterBackup Cluster Backup +// +// swagger:model v1ClusterBackup +type V1ClusterBackup struct { + + // metadata + Metadata *V1ObjectMeta `json:"metadata,omitempty"` + + // spec + Spec *V1ClusterBackupSpec `json:"spec,omitempty"` + + // status + Status *V1ClusterBackupStatus `json:"status,omitempty"` +} + +// Validate validates this v1 cluster backup +func (m *V1ClusterBackup) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSpec(formats); err != nil { + res = append(res, err) + } + + if err := m.validateStatus(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ClusterBackup) validateMetadata(formats strfmt.Registry) error { + + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } + return err + } + } + + return nil +} + +func (m *V1ClusterBackup) validateSpec(formats strfmt.Registry) error { + + if swag.IsZero(m.Spec) { // not required + return nil + } + + if m.Spec != nil { + if err := m.Spec.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec") + } + return err + } + } + + return nil +} + +func (m *V1ClusterBackup) validateStatus(formats strfmt.Registry) error { + + if swag.IsZero(m.Status) { // not required + return nil + } + + if m.Status != nil { + if err := m.Status.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("status") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ClusterBackup) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ClusterBackup) UnmarshalBinary(b []byte) error { + var res V1ClusterBackup + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cluster_backup_config.go b/api/models/v1_cluster_backup_config.go new file mode 100644 index 00000000..82e42d5e --- /dev/null +++ b/api/models/v1_cluster_backup_config.go @@ -0,0 +1,117 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1ClusterBackupConfig Cluster backup config +// +// swagger:model v1ClusterBackupConfig +type V1ClusterBackupConfig struct { + + // backup location name + BackupLocationName string `json:"backupLocationName,omitempty"` + + // backup location Uid + BackupLocationUID string `json:"backupLocationUid,omitempty"` + + // backup name + BackupName string `json:"backupName,omitempty"` + + // backup prefix + BackupPrefix string `json:"backupPrefix,omitempty"` + + // duration in hours + DurationInHours int64 `json:"durationInHours,omitempty"` + + // include all disks + IncludeAllDisks bool `json:"includeAllDisks,omitempty"` + + // include cluster resources + IncludeClusterResources bool `json:"includeClusterResources,omitempty"` + + // location type + LocationType string `json:"locationType,omitempty"` + + // namespaces + // Unique: true + Namespaces []string `json:"namespaces"` + + // schedule + Schedule *V1ClusterFeatureSchedule `json:"schedule,omitempty"` +} + +// Validate validates this v1 cluster backup config +func (m *V1ClusterBackupConfig) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateNamespaces(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSchedule(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ClusterBackupConfig) validateNamespaces(formats strfmt.Registry) error { + + if swag.IsZero(m.Namespaces) { // not required + return nil + } + + if err := validate.UniqueItems("namespaces", "body", m.Namespaces); err != nil { + return err + } + + return nil +} + +func (m *V1ClusterBackupConfig) validateSchedule(formats strfmt.Registry) error { + + if swag.IsZero(m.Schedule) { // not required + return nil + } + + if m.Schedule != nil { + if err := m.Schedule.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("schedule") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ClusterBackupConfig) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ClusterBackupConfig) UnmarshalBinary(b []byte) error { + var res V1ClusterBackupConfig + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cluster_backup_location_type.go b/api/models/v1_cluster_backup_location_type.go new file mode 100644 index 00000000..af04db96 --- /dev/null +++ b/api/models/v1_cluster_backup_location_type.go @@ -0,0 +1,64 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1ClusterBackupLocationType Cluster backup location type +// +// swagger:model v1ClusterBackupLocationType +type V1ClusterBackupLocationType struct { + + // location type + // Required: true + LocationType *string `json:"locationType"` +} + +// Validate validates this v1 cluster backup location type +func (m *V1ClusterBackupLocationType) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateLocationType(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ClusterBackupLocationType) validateLocationType(formats strfmt.Registry) error { + + if err := validate.Required("locationType", "body", m.LocationType); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ClusterBackupLocationType) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ClusterBackupLocationType) UnmarshalBinary(b []byte) error { + var res V1ClusterBackupLocationType + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cluster_backup_spec.go b/api/models/v1_cluster_backup_spec.go new file mode 100644 index 00000000..88dbd245 --- /dev/null +++ b/api/models/v1_cluster_backup_spec.go @@ -0,0 +1,74 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ClusterBackupSpec Cluster Backup Spec +// +// swagger:model v1ClusterBackupSpec +type V1ClusterBackupSpec struct { + + // cluster Uid + ClusterUID string `json:"clusterUid,omitempty"` + + // config + Config *V1ClusterBackupConfig `json:"config,omitempty"` +} + +// Validate validates this v1 cluster backup spec +func (m *V1ClusterBackupSpec) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateConfig(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ClusterBackupSpec) validateConfig(formats strfmt.Registry) error { + + if swag.IsZero(m.Config) { // not required + return nil + } + + if m.Config != nil { + if err := m.Config.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("config") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ClusterBackupSpec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ClusterBackupSpec) UnmarshalBinary(b []byte) error { + var res V1ClusterBackupSpec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cluster_backup_status.go b/api/models/v1_cluster_backup_status.go new file mode 100644 index 00000000..d0a3f004 --- /dev/null +++ b/api/models/v1_cluster_backup_status.go @@ -0,0 +1,80 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ClusterBackupStatus Cluster Backup Status +// +// swagger:model v1ClusterBackupStatus +type V1ClusterBackupStatus struct { + + // cluster backup statuses + ClusterBackupStatuses []*V1ClusterBackupStatusMeta `json:"clusterBackupStatuses"` +} + +// Validate validates this v1 cluster backup status +func (m *V1ClusterBackupStatus) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateClusterBackupStatuses(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ClusterBackupStatus) validateClusterBackupStatuses(formats strfmt.Registry) error { + + if swag.IsZero(m.ClusterBackupStatuses) { // not required + return nil + } + + for i := 0; i < len(m.ClusterBackupStatuses); i++ { + if swag.IsZero(m.ClusterBackupStatuses[i]) { // not required + continue + } + + if m.ClusterBackupStatuses[i] != nil { + if err := m.ClusterBackupStatuses[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("clusterBackupStatuses" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ClusterBackupStatus) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ClusterBackupStatus) UnmarshalBinary(b []byte) error { + var res V1ClusterBackupStatus + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cluster_backup_status_meta.go b/api/models/v1_cluster_backup_status_meta.go new file mode 100644 index 00000000..73e9163c --- /dev/null +++ b/api/models/v1_cluster_backup_status_meta.go @@ -0,0 +1,193 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ClusterBackupStatusMeta Cluster Backup Status Meta +// +// swagger:model v1ClusterBackupStatusMeta +type V1ClusterBackupStatusMeta struct { + + // actor + Actor *V1ClusterFeatureActor `json:"actor,omitempty"` + + // backup config + BackupConfig *V1BackupStatusConfig `json:"backupConfig,omitempty"` + + // backup location config + BackupLocationConfig *V1BackupLocationConfig `json:"backupLocationConfig,omitempty"` + + // backup request Uid + BackupRequestUID string `json:"backupRequestUid,omitempty"` + + // backup status meta + BackupStatusMeta []*V1BackupStatusMeta `json:"backupStatusMeta"` + + // restore status meta + RestoreStatusMeta []*V1BackupRestoreStatusMeta `json:"restoreStatusMeta"` + + // state + State string `json:"state,omitempty"` +} + +// Validate validates this v1 cluster backup status meta +func (m *V1ClusterBackupStatusMeta) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateActor(formats); err != nil { + res = append(res, err) + } + + if err := m.validateBackupConfig(formats); err != nil { + res = append(res, err) + } + + if err := m.validateBackupLocationConfig(formats); err != nil { + res = append(res, err) + } + + if err := m.validateBackupStatusMeta(formats); err != nil { + res = append(res, err) + } + + if err := m.validateRestoreStatusMeta(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ClusterBackupStatusMeta) validateActor(formats strfmt.Registry) error { + + if swag.IsZero(m.Actor) { // not required + return nil + } + + if m.Actor != nil { + if err := m.Actor.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("actor") + } + return err + } + } + + return nil +} + +func (m *V1ClusterBackupStatusMeta) validateBackupConfig(formats strfmt.Registry) error { + + if swag.IsZero(m.BackupConfig) { // not required + return nil + } + + if m.BackupConfig != nil { + if err := m.BackupConfig.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("backupConfig") + } + return err + } + } + + return nil +} + +func (m *V1ClusterBackupStatusMeta) validateBackupLocationConfig(formats strfmt.Registry) error { + + if swag.IsZero(m.BackupLocationConfig) { // not required + return nil + } + + if m.BackupLocationConfig != nil { + if err := m.BackupLocationConfig.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("backupLocationConfig") + } + return err + } + } + + return nil +} + +func (m *V1ClusterBackupStatusMeta) validateBackupStatusMeta(formats strfmt.Registry) error { + + if swag.IsZero(m.BackupStatusMeta) { // not required + return nil + } + + for i := 0; i < len(m.BackupStatusMeta); i++ { + if swag.IsZero(m.BackupStatusMeta[i]) { // not required + continue + } + + if m.BackupStatusMeta[i] != nil { + if err := m.BackupStatusMeta[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("backupStatusMeta" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1ClusterBackupStatusMeta) validateRestoreStatusMeta(formats strfmt.Registry) error { + + if swag.IsZero(m.RestoreStatusMeta) { // not required + return nil + } + + for i := 0; i < len(m.RestoreStatusMeta); i++ { + if swag.IsZero(m.RestoreStatusMeta[i]) { // not required + continue + } + + if m.RestoreStatusMeta[i] != nil { + if err := m.RestoreStatusMeta[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("restoreStatusMeta" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ClusterBackupStatusMeta) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ClusterBackupStatusMeta) UnmarshalBinary(b []byte) error { + var res V1ClusterBackupStatusMeta + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cluster_compliance_on_demand_config.go b/api/models/v1_cluster_compliance_on_demand_config.go new file mode 100644 index 00000000..f1fc4910 --- /dev/null +++ b/api/models/v1_cluster_compliance_on_demand_config.go @@ -0,0 +1,146 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ClusterComplianceOnDemandConfig Cluster compliance scan on demand configuration +// +// swagger:model v1ClusterComplianceOnDemandConfig +type V1ClusterComplianceOnDemandConfig struct { + + // kube bench + KubeBench *V1ClusterComplianceScanKubeBenchConfig `json:"kubeBench,omitempty"` + + // kube hunter + KubeHunter *V1ClusterComplianceScanKubeHunterConfig `json:"kubeHunter,omitempty"` + + // sonobuoy + Sonobuoy *V1ClusterComplianceScanSonobuoyConfig `json:"sonobuoy,omitempty"` + + // syft + Syft *V1ClusterComplianceScanSyftConfig `json:"syft,omitempty"` +} + +// Validate validates this v1 cluster compliance on demand config +func (m *V1ClusterComplianceOnDemandConfig) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateKubeBench(formats); err != nil { + res = append(res, err) + } + + if err := m.validateKubeHunter(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSonobuoy(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSyft(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ClusterComplianceOnDemandConfig) validateKubeBench(formats strfmt.Registry) error { + + if swag.IsZero(m.KubeBench) { // not required + return nil + } + + if m.KubeBench != nil { + if err := m.KubeBench.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("kubeBench") + } + return err + } + } + + return nil +} + +func (m *V1ClusterComplianceOnDemandConfig) validateKubeHunter(formats strfmt.Registry) error { + + if swag.IsZero(m.KubeHunter) { // not required + return nil + } + + if m.KubeHunter != nil { + if err := m.KubeHunter.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("kubeHunter") + } + return err + } + } + + return nil +} + +func (m *V1ClusterComplianceOnDemandConfig) validateSonobuoy(formats strfmt.Registry) error { + + if swag.IsZero(m.Sonobuoy) { // not required + return nil + } + + if m.Sonobuoy != nil { + if err := m.Sonobuoy.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("sonobuoy") + } + return err + } + } + + return nil +} + +func (m *V1ClusterComplianceOnDemandConfig) validateSyft(formats strfmt.Registry) error { + + if swag.IsZero(m.Syft) { // not required + return nil + } + + if m.Syft != nil { + if err := m.Syft.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("syft") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ClusterComplianceOnDemandConfig) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ClusterComplianceOnDemandConfig) UnmarshalBinary(b []byte) error { + var res V1ClusterComplianceOnDemandConfig + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cluster_compliance_scan.go b/api/models/v1_cluster_compliance_scan.go new file mode 100644 index 00000000..029b8c67 --- /dev/null +++ b/api/models/v1_cluster_compliance_scan.go @@ -0,0 +1,96 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ClusterComplianceScan Cluster Compliance Scan +// +// swagger:model v1ClusterComplianceScan +type V1ClusterComplianceScan struct { + + // metadata + Metadata *V1ObjectMeta `json:"metadata,omitempty"` + + // spec + Spec *V1ClusterComplianceScanSpec `json:"spec,omitempty"` +} + +// Validate validates this v1 cluster compliance scan +func (m *V1ClusterComplianceScan) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSpec(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ClusterComplianceScan) validateMetadata(formats strfmt.Registry) error { + + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } + return err + } + } + + return nil +} + +func (m *V1ClusterComplianceScan) validateSpec(formats strfmt.Registry) error { + + if swag.IsZero(m.Spec) { // not required + return nil + } + + if m.Spec != nil { + if err := m.Spec.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ClusterComplianceScan) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ClusterComplianceScan) UnmarshalBinary(b []byte) error { + var res V1ClusterComplianceScan + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cluster_compliance_scan_kube_bench_config.go b/api/models/v1_cluster_compliance_scan_kube_bench_config.go new file mode 100644 index 00000000..1d2e3c32 --- /dev/null +++ b/api/models/v1_cluster_compliance_scan_kube_bench_config.go @@ -0,0 +1,43 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ClusterComplianceScanKubeBenchConfig Cluster compliance scan config for kube bench driver +// +// swagger:model v1ClusterComplianceScanKubeBenchConfig +type V1ClusterComplianceScanKubeBenchConfig struct { + + // run scan + RunScan bool `json:"runScan,omitempty"` +} + +// Validate validates this v1 cluster compliance scan kube bench config +func (m *V1ClusterComplianceScanKubeBenchConfig) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1ClusterComplianceScanKubeBenchConfig) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ClusterComplianceScanKubeBenchConfig) UnmarshalBinary(b []byte) error { + var res V1ClusterComplianceScanKubeBenchConfig + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cluster_compliance_scan_kube_bench_schedule_config.go b/api/models/v1_cluster_compliance_scan_kube_bench_schedule_config.go new file mode 100644 index 00000000..80f23f52 --- /dev/null +++ b/api/models/v1_cluster_compliance_scan_kube_bench_schedule_config.go @@ -0,0 +1,71 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ClusterComplianceScanKubeBenchScheduleConfig Cluster compliance scan schedule config for kube bench driver +// +// swagger:model v1ClusterComplianceScanKubeBenchScheduleConfig +type V1ClusterComplianceScanKubeBenchScheduleConfig struct { + + // schedule + Schedule *V1ClusterFeatureSchedule `json:"schedule,omitempty"` +} + +// Validate validates this v1 cluster compliance scan kube bench schedule config +func (m *V1ClusterComplianceScanKubeBenchScheduleConfig) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateSchedule(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ClusterComplianceScanKubeBenchScheduleConfig) validateSchedule(formats strfmt.Registry) error { + + if swag.IsZero(m.Schedule) { // not required + return nil + } + + if m.Schedule != nil { + if err := m.Schedule.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("schedule") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ClusterComplianceScanKubeBenchScheduleConfig) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ClusterComplianceScanKubeBenchScheduleConfig) UnmarshalBinary(b []byte) error { + var res V1ClusterComplianceScanKubeBenchScheduleConfig + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cluster_compliance_scan_kube_hunter_config.go b/api/models/v1_cluster_compliance_scan_kube_hunter_config.go new file mode 100644 index 00000000..d1b8e940 --- /dev/null +++ b/api/models/v1_cluster_compliance_scan_kube_hunter_config.go @@ -0,0 +1,43 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ClusterComplianceScanKubeHunterConfig Cluster compliance scan config for kube hunter driver +// +// swagger:model v1ClusterComplianceScanKubeHunterConfig +type V1ClusterComplianceScanKubeHunterConfig struct { + + // run scan + RunScan bool `json:"runScan,omitempty"` +} + +// Validate validates this v1 cluster compliance scan kube hunter config +func (m *V1ClusterComplianceScanKubeHunterConfig) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1ClusterComplianceScanKubeHunterConfig) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ClusterComplianceScanKubeHunterConfig) UnmarshalBinary(b []byte) error { + var res V1ClusterComplianceScanKubeHunterConfig + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cluster_compliance_scan_kube_hunter_schedule_config.go b/api/models/v1_cluster_compliance_scan_kube_hunter_schedule_config.go new file mode 100644 index 00000000..5591fb37 --- /dev/null +++ b/api/models/v1_cluster_compliance_scan_kube_hunter_schedule_config.go @@ -0,0 +1,71 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ClusterComplianceScanKubeHunterScheduleConfig Cluster compliance scan schedule config for kube hunter driver +// +// swagger:model v1ClusterComplianceScanKubeHunterScheduleConfig +type V1ClusterComplianceScanKubeHunterScheduleConfig struct { + + // schedule + Schedule *V1ClusterFeatureSchedule `json:"schedule,omitempty"` +} + +// Validate validates this v1 cluster compliance scan kube hunter schedule config +func (m *V1ClusterComplianceScanKubeHunterScheduleConfig) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateSchedule(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ClusterComplianceScanKubeHunterScheduleConfig) validateSchedule(formats strfmt.Registry) error { + + if swag.IsZero(m.Schedule) { // not required + return nil + } + + if m.Schedule != nil { + if err := m.Schedule.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("schedule") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ClusterComplianceScanKubeHunterScheduleConfig) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ClusterComplianceScanKubeHunterScheduleConfig) UnmarshalBinary(b []byte) error { + var res V1ClusterComplianceScanKubeHunterScheduleConfig + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cluster_compliance_scan_log_spec.go b/api/models/v1_cluster_compliance_scan_log_spec.go new file mode 100644 index 00000000..ed01f97d --- /dev/null +++ b/api/models/v1_cluster_compliance_scan_log_spec.go @@ -0,0 +1,46 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ClusterComplianceScanLogSpec Cluster compliance scan logs spec +// +// swagger:model v1ClusterComplianceScanLogSpec +type V1ClusterComplianceScanLogSpec struct { + + // cluster Uid + ClusterUID string `json:"clusterUid,omitempty"` + + // driver type + DriverType string `json:"driverType,omitempty"` +} + +// Validate validates this v1 cluster compliance scan log spec +func (m *V1ClusterComplianceScanLogSpec) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1ClusterComplianceScanLogSpec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ClusterComplianceScanLogSpec) UnmarshalBinary(b []byte) error { + var res V1ClusterComplianceScanLogSpec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cluster_compliance_scan_logs.go b/api/models/v1_cluster_compliance_scan_logs.go new file mode 100644 index 00000000..e8b7a025 --- /dev/null +++ b/api/models/v1_cluster_compliance_scan_logs.go @@ -0,0 +1,176 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ClusterComplianceScanLogs Cluster compliance scan Logs +// +// swagger:model v1ClusterComplianceScanLogs +type V1ClusterComplianceScanLogs struct { + + // kube bench logs + KubeBenchLogs []*V1ClusterScanLogKubeBench `json:"kubeBenchLogs"` + + // kube hunter logs + KubeHunterLogs []*V1ClusterScanLogKubeHunter `json:"kubeHunterLogs"` + + // sonobuoy logs + SonobuoyLogs []*V1ClusterScanLogSonobuoy `json:"sonobuoyLogs"` + + // syft logs + SyftLogs []*V1ClusterScanLogSyft `json:"syftLogs"` +} + +// Validate validates this v1 cluster compliance scan logs +func (m *V1ClusterComplianceScanLogs) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateKubeBenchLogs(formats); err != nil { + res = append(res, err) + } + + if err := m.validateKubeHunterLogs(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSonobuoyLogs(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSyftLogs(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ClusterComplianceScanLogs) validateKubeBenchLogs(formats strfmt.Registry) error { + + if swag.IsZero(m.KubeBenchLogs) { // not required + return nil + } + + for i := 0; i < len(m.KubeBenchLogs); i++ { + if swag.IsZero(m.KubeBenchLogs[i]) { // not required + continue + } + + if m.KubeBenchLogs[i] != nil { + if err := m.KubeBenchLogs[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("kubeBenchLogs" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1ClusterComplianceScanLogs) validateKubeHunterLogs(formats strfmt.Registry) error { + + if swag.IsZero(m.KubeHunterLogs) { // not required + return nil + } + + for i := 0; i < len(m.KubeHunterLogs); i++ { + if swag.IsZero(m.KubeHunterLogs[i]) { // not required + continue + } + + if m.KubeHunterLogs[i] != nil { + if err := m.KubeHunterLogs[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("kubeHunterLogs" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1ClusterComplianceScanLogs) validateSonobuoyLogs(formats strfmt.Registry) error { + + if swag.IsZero(m.SonobuoyLogs) { // not required + return nil + } + + for i := 0; i < len(m.SonobuoyLogs); i++ { + if swag.IsZero(m.SonobuoyLogs[i]) { // not required + continue + } + + if m.SonobuoyLogs[i] != nil { + if err := m.SonobuoyLogs[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("sonobuoyLogs" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1ClusterComplianceScanLogs) validateSyftLogs(formats strfmt.Registry) error { + + if swag.IsZero(m.SyftLogs) { // not required + return nil + } + + for i := 0; i < len(m.SyftLogs); i++ { + if swag.IsZero(m.SyftLogs[i]) { // not required + continue + } + + if m.SyftLogs[i] != nil { + if err := m.SyftLogs[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("syftLogs" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ClusterComplianceScanLogs) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ClusterComplianceScanLogs) UnmarshalBinary(b []byte) error { + var res V1ClusterComplianceScanLogs + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cluster_compliance_scan_sonobuoy_config.go b/api/models/v1_cluster_compliance_scan_sonobuoy_config.go new file mode 100644 index 00000000..aeb0c828 --- /dev/null +++ b/api/models/v1_cluster_compliance_scan_sonobuoy_config.go @@ -0,0 +1,43 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ClusterComplianceScanSonobuoyConfig Cluster compliance scan config for sonobuoy driver +// +// swagger:model v1ClusterComplianceScanSonobuoyConfig +type V1ClusterComplianceScanSonobuoyConfig struct { + + // run scan + RunScan bool `json:"runScan,omitempty"` +} + +// Validate validates this v1 cluster compliance scan sonobuoy config +func (m *V1ClusterComplianceScanSonobuoyConfig) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1ClusterComplianceScanSonobuoyConfig) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ClusterComplianceScanSonobuoyConfig) UnmarshalBinary(b []byte) error { + var res V1ClusterComplianceScanSonobuoyConfig + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cluster_compliance_scan_sonobuoy_schedule_config.go b/api/models/v1_cluster_compliance_scan_sonobuoy_schedule_config.go new file mode 100644 index 00000000..f78df141 --- /dev/null +++ b/api/models/v1_cluster_compliance_scan_sonobuoy_schedule_config.go @@ -0,0 +1,71 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ClusterComplianceScanSonobuoyScheduleConfig Cluster compliance scan schedule config for sonobuoy driver +// +// swagger:model v1ClusterComplianceScanSonobuoyScheduleConfig +type V1ClusterComplianceScanSonobuoyScheduleConfig struct { + + // schedule + Schedule *V1ClusterFeatureSchedule `json:"schedule,omitempty"` +} + +// Validate validates this v1 cluster compliance scan sonobuoy schedule config +func (m *V1ClusterComplianceScanSonobuoyScheduleConfig) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateSchedule(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ClusterComplianceScanSonobuoyScheduleConfig) validateSchedule(formats strfmt.Registry) error { + + if swag.IsZero(m.Schedule) { // not required + return nil + } + + if m.Schedule != nil { + if err := m.Schedule.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("schedule") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ClusterComplianceScanSonobuoyScheduleConfig) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ClusterComplianceScanSonobuoyScheduleConfig) UnmarshalBinary(b []byte) error { + var res V1ClusterComplianceScanSonobuoyScheduleConfig + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cluster_compliance_scan_spec.go b/api/models/v1_cluster_compliance_scan_spec.go new file mode 100644 index 00000000..77790cd1 --- /dev/null +++ b/api/models/v1_cluster_compliance_scan_spec.go @@ -0,0 +1,79 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1ClusterComplianceScanSpec Cluster compliance scan Spec +// +// swagger:model v1ClusterComplianceScanSpec +type V1ClusterComplianceScanSpec struct { + + // cluster Uid + ClusterUID string `json:"clusterUid,omitempty"` + + // driver spec + DriverSpec map[string]V1ComplianceScanDriverSpec `json:"driverSpec,omitempty"` +} + +// Validate validates this v1 cluster compliance scan spec +func (m *V1ClusterComplianceScanSpec) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateDriverSpec(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ClusterComplianceScanSpec) validateDriverSpec(formats strfmt.Registry) error { + + if swag.IsZero(m.DriverSpec) { // not required + return nil + } + + for k := range m.DriverSpec { + + if err := validate.Required("driverSpec"+"."+k, "body", m.DriverSpec[k]); err != nil { + return err + } + if val, ok := m.DriverSpec[k]; ok { + if err := val.Validate(formats); err != nil { + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ClusterComplianceScanSpec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ClusterComplianceScanSpec) UnmarshalBinary(b []byte) error { + var res V1ClusterComplianceScanSpec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cluster_compliance_scan_syft_config.go b/api/models/v1_cluster_compliance_scan_syft_config.go new file mode 100644 index 00000000..f972eb13 --- /dev/null +++ b/api/models/v1_cluster_compliance_scan_syft_config.go @@ -0,0 +1,74 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ClusterComplianceScanSyftConfig Cluster compliance scan config for syft driver +// +// swagger:model v1ClusterComplianceScanSyftConfig +type V1ClusterComplianceScanSyftConfig struct { + + // config + Config *V1ClusterComplianceScanSyftDriverConfig `json:"config,omitempty"` + + // run scan + RunScan bool `json:"runScan,omitempty"` +} + +// Validate validates this v1 cluster compliance scan syft config +func (m *V1ClusterComplianceScanSyftConfig) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateConfig(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ClusterComplianceScanSyftConfig) validateConfig(formats strfmt.Registry) error { + + if swag.IsZero(m.Config) { // not required + return nil + } + + if m.Config != nil { + if err := m.Config.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("config") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ClusterComplianceScanSyftConfig) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ClusterComplianceScanSyftConfig) UnmarshalBinary(b []byte) error { + var res V1ClusterComplianceScanSyftConfig + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cluster_compliance_scan_syft_driver_config.go b/api/models/v1_cluster_compliance_scan_syft_driver_config.go new file mode 100644 index 00000000..8f4195ac --- /dev/null +++ b/api/models/v1_cluster_compliance_scan_syft_driver_config.go @@ -0,0 +1,197 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "encoding/json" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1ClusterComplianceScanSyftDriverConfig Cluster compliance scan specification +// +// swagger:model v1ClusterComplianceScanSyftDriverConfig +type V1ClusterComplianceScanSyftDriverConfig struct { + + // format + // Enum: [cyclonedx-json github-json spdx-json syft-json] + Format string `json:"format,omitempty"` + + // label selector + LabelSelector string `json:"labelSelector,omitempty"` + + // location + Location *V1ObjectEntity `json:"location,omitempty"` + + // namespace + Namespace string `json:"namespace,omitempty"` + + // pod name + PodName string `json:"podName,omitempty"` + + // scope + // Enum: [cluster namespace label-selector pod] + Scope string `json:"scope,omitempty"` +} + +// Validate validates this v1 cluster compliance scan syft driver config +func (m *V1ClusterComplianceScanSyftDriverConfig) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateFormat(formats); err != nil { + res = append(res, err) + } + + if err := m.validateLocation(formats); err != nil { + res = append(res, err) + } + + if err := m.validateScope(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +var v1ClusterComplianceScanSyftDriverConfigTypeFormatPropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["cyclonedx-json","github-json","spdx-json","syft-json"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + v1ClusterComplianceScanSyftDriverConfigTypeFormatPropEnum = append(v1ClusterComplianceScanSyftDriverConfigTypeFormatPropEnum, v) + } +} + +const ( + + // V1ClusterComplianceScanSyftDriverConfigFormatCyclonedxJSON captures enum value "cyclonedx-json" + V1ClusterComplianceScanSyftDriverConfigFormatCyclonedxJSON string = "cyclonedx-json" + + // V1ClusterComplianceScanSyftDriverConfigFormatGithubJSON captures enum value "github-json" + V1ClusterComplianceScanSyftDriverConfigFormatGithubJSON string = "github-json" + + // V1ClusterComplianceScanSyftDriverConfigFormatSpdxJSON captures enum value "spdx-json" + V1ClusterComplianceScanSyftDriverConfigFormatSpdxJSON string = "spdx-json" + + // V1ClusterComplianceScanSyftDriverConfigFormatSyftJSON captures enum value "syft-json" + V1ClusterComplianceScanSyftDriverConfigFormatSyftJSON string = "syft-json" +) + +// prop value enum +func (m *V1ClusterComplianceScanSyftDriverConfig) validateFormatEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, v1ClusterComplianceScanSyftDriverConfigTypeFormatPropEnum, true); err != nil { + return err + } + return nil +} + +func (m *V1ClusterComplianceScanSyftDriverConfig) validateFormat(formats strfmt.Registry) error { + + if swag.IsZero(m.Format) { // not required + return nil + } + + // value enum + if err := m.validateFormatEnum("format", "body", m.Format); err != nil { + return err + } + + return nil +} + +func (m *V1ClusterComplianceScanSyftDriverConfig) validateLocation(formats strfmt.Registry) error { + + if swag.IsZero(m.Location) { // not required + return nil + } + + if m.Location != nil { + if err := m.Location.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("location") + } + return err + } + } + + return nil +} + +var v1ClusterComplianceScanSyftDriverConfigTypeScopePropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["cluster","namespace","label-selector","pod"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + v1ClusterComplianceScanSyftDriverConfigTypeScopePropEnum = append(v1ClusterComplianceScanSyftDriverConfigTypeScopePropEnum, v) + } +} + +const ( + + // V1ClusterComplianceScanSyftDriverConfigScopeCluster captures enum value "cluster" + V1ClusterComplianceScanSyftDriverConfigScopeCluster string = "cluster" + + // V1ClusterComplianceScanSyftDriverConfigScopeNamespace captures enum value "namespace" + V1ClusterComplianceScanSyftDriverConfigScopeNamespace string = "namespace" + + // V1ClusterComplianceScanSyftDriverConfigScopeLabelSelector captures enum value "label-selector" + V1ClusterComplianceScanSyftDriverConfigScopeLabelSelector string = "label-selector" + + // V1ClusterComplianceScanSyftDriverConfigScopePod captures enum value "pod" + V1ClusterComplianceScanSyftDriverConfigScopePod string = "pod" +) + +// prop value enum +func (m *V1ClusterComplianceScanSyftDriverConfig) validateScopeEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, v1ClusterComplianceScanSyftDriverConfigTypeScopePropEnum, true); err != nil { + return err + } + return nil +} + +func (m *V1ClusterComplianceScanSyftDriverConfig) validateScope(formats strfmt.Registry) error { + + if swag.IsZero(m.Scope) { // not required + return nil + } + + // value enum + if err := m.validateScopeEnum("scope", "body", m.Scope); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ClusterComplianceScanSyftDriverConfig) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ClusterComplianceScanSyftDriverConfig) UnmarshalBinary(b []byte) error { + var res V1ClusterComplianceScanSyftDriverConfig + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cluster_compliance_schedule_config.go b/api/models/v1_cluster_compliance_schedule_config.go new file mode 100644 index 00000000..3ae64258 --- /dev/null +++ b/api/models/v1_cluster_compliance_schedule_config.go @@ -0,0 +1,121 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ClusterComplianceScheduleConfig Cluster compliance scan schedule configuration +// +// swagger:model v1ClusterComplianceScheduleConfig +type V1ClusterComplianceScheduleConfig struct { + + // kube bench + KubeBench *V1ClusterComplianceScanKubeBenchScheduleConfig `json:"kubeBench,omitempty"` + + // kube hunter + KubeHunter *V1ClusterComplianceScanKubeHunterScheduleConfig `json:"kubeHunter,omitempty"` + + // sonobuoy + Sonobuoy *V1ClusterComplianceScanSonobuoyScheduleConfig `json:"sonobuoy,omitempty"` +} + +// Validate validates this v1 cluster compliance schedule config +func (m *V1ClusterComplianceScheduleConfig) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateKubeBench(formats); err != nil { + res = append(res, err) + } + + if err := m.validateKubeHunter(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSonobuoy(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ClusterComplianceScheduleConfig) validateKubeBench(formats strfmt.Registry) error { + + if swag.IsZero(m.KubeBench) { // not required + return nil + } + + if m.KubeBench != nil { + if err := m.KubeBench.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("kubeBench") + } + return err + } + } + + return nil +} + +func (m *V1ClusterComplianceScheduleConfig) validateKubeHunter(formats strfmt.Registry) error { + + if swag.IsZero(m.KubeHunter) { // not required + return nil + } + + if m.KubeHunter != nil { + if err := m.KubeHunter.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("kubeHunter") + } + return err + } + } + + return nil +} + +func (m *V1ClusterComplianceScheduleConfig) validateSonobuoy(formats strfmt.Registry) error { + + if swag.IsZero(m.Sonobuoy) { // not required + return nil + } + + if m.Sonobuoy != nil { + if err := m.Sonobuoy.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("sonobuoy") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ClusterComplianceScheduleConfig) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ClusterComplianceScheduleConfig) UnmarshalBinary(b []byte) error { + var res V1ClusterComplianceScheduleConfig + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cluster_condition.go b/api/models/v1_cluster_condition.go new file mode 100644 index 00000000..ee24b4d3 --- /dev/null +++ b/api/models/v1_cluster_condition.go @@ -0,0 +1,135 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1ClusterCondition v1 cluster condition +// +// swagger:model v1ClusterCondition +type V1ClusterCondition struct { + + // last probe time + // Format: date-time + LastProbeTime V1Time `json:"lastProbeTime,omitempty"` + + // last transition time + // Format: date-time + LastTransitionTime V1Time `json:"lastTransitionTime,omitempty"` + + // Human-readable message indicating details about last transition. + Message string `json:"message,omitempty"` + + // Unique, one-word, CamelCase reason for the condition's last transition. + Reason string `json:"reason,omitempty"` + + // status + // Required: true + Status *string `json:"status"` + + // type + // Required: true + Type *string `json:"type"` +} + +// Validate validates this v1 cluster condition +func (m *V1ClusterCondition) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateLastProbeTime(formats); err != nil { + res = append(res, err) + } + + if err := m.validateLastTransitionTime(formats); err != nil { + res = append(res, err) + } + + if err := m.validateStatus(formats); err != nil { + res = append(res, err) + } + + if err := m.validateType(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ClusterCondition) validateLastProbeTime(formats strfmt.Registry) error { + + if swag.IsZero(m.LastProbeTime) { // not required + return nil + } + + if err := m.LastProbeTime.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("lastProbeTime") + } + return err + } + + return nil +} + +func (m *V1ClusterCondition) validateLastTransitionTime(formats strfmt.Registry) error { + + if swag.IsZero(m.LastTransitionTime) { // not required + return nil + } + + if err := m.LastTransitionTime.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("lastTransitionTime") + } + return err + } + + return nil +} + +func (m *V1ClusterCondition) validateStatus(formats strfmt.Registry) error { + + if err := validate.Required("status", "body", m.Status); err != nil { + return err + } + + return nil +} + +func (m *V1ClusterCondition) validateType(formats strfmt.Registry) error { + + if err := validate.Required("type", "body", m.Type); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ClusterCondition) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ClusterCondition) UnmarshalBinary(b []byte) error { + var res V1ClusterCondition + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cluster_config.go b/api/models/v1_cluster_config.go new file mode 100644 index 00000000..3cf5b7b1 --- /dev/null +++ b/api/models/v1_cluster_config.go @@ -0,0 +1,214 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ClusterConfig v1 cluster config +// +// swagger:model v1ClusterConfig +type V1ClusterConfig struct { + + // ClusterMetaAttribute contains additional cluster metadata information. + ClusterMetaAttribute string `json:"clusterMetaAttribute,omitempty"` + + // Deprecated. Use clusterResources + ClusterRbac []*V1ResourceReference `json:"clusterRbac"` + + // ClusterResources defines the managment of namespace resource allocations, role bindings. + ClusterResources *V1ClusterResources `json:"clusterResources,omitempty"` + + // ControlPlaneHealthCheckTimeout is the timeout to check for ready state of the control plane nodes. If the node is not ready within the time out set, the node will be deleted and a new node will be launched. + ControlPlaneHealthCheckTimeout string `json:"controlPlaneHealthCheckTimeout,omitempty"` + + // HostClusterConfiguration defines the configuration of host clusters, where virtual clusters be deployed + HostClusterConfig *V1HostClusterConfig `json:"hostClusterConfig,omitempty"` + + // lifecycle config + LifecycleConfig *V1LifecycleConfig `json:"lifecycleConfig,omitempty"` + + // MachineHealthCheckConfig defines the healthcheck timeouts for the node. The timeouts are configured by the user to overide the default healthchecks. + MachineHealthConfig *V1MachineHealthCheckConfig `json:"machineHealthConfig,omitempty"` + + // MachineManagementConfig defines the management configurations for the node. Patching OS security updates etc can be configured by user. + MachineManagementConfig *V1MachineManagementConfig `json:"machineManagementConfig,omitempty"` + + // UpdateWorkerPoolsInParallel is used to decide if the update of workerpools happen in parallel. When this flag is false, the workerpools are updated sequentially. + UpdateWorkerPoolsInParallel bool `json:"updateWorkerPoolsInParallel,omitempty"` +} + +// Validate validates this v1 cluster config +func (m *V1ClusterConfig) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateClusterRbac(formats); err != nil { + res = append(res, err) + } + + if err := m.validateClusterResources(formats); err != nil { + res = append(res, err) + } + + if err := m.validateHostClusterConfig(formats); err != nil { + res = append(res, err) + } + + if err := m.validateLifecycleConfig(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMachineHealthConfig(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMachineManagementConfig(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ClusterConfig) validateClusterRbac(formats strfmt.Registry) error { + + if swag.IsZero(m.ClusterRbac) { // not required + return nil + } + + for i := 0; i < len(m.ClusterRbac); i++ { + if swag.IsZero(m.ClusterRbac[i]) { // not required + continue + } + + if m.ClusterRbac[i] != nil { + if err := m.ClusterRbac[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("clusterRbac" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1ClusterConfig) validateClusterResources(formats strfmt.Registry) error { + + if swag.IsZero(m.ClusterResources) { // not required + return nil + } + + if m.ClusterResources != nil { + if err := m.ClusterResources.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("clusterResources") + } + return err + } + } + + return nil +} + +func (m *V1ClusterConfig) validateHostClusterConfig(formats strfmt.Registry) error { + + if swag.IsZero(m.HostClusterConfig) { // not required + return nil + } + + if m.HostClusterConfig != nil { + if err := m.HostClusterConfig.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("hostClusterConfig") + } + return err + } + } + + return nil +} + +func (m *V1ClusterConfig) validateLifecycleConfig(formats strfmt.Registry) error { + + if swag.IsZero(m.LifecycleConfig) { // not required + return nil + } + + if m.LifecycleConfig != nil { + if err := m.LifecycleConfig.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("lifecycleConfig") + } + return err + } + } + + return nil +} + +func (m *V1ClusterConfig) validateMachineHealthConfig(formats strfmt.Registry) error { + + if swag.IsZero(m.MachineHealthConfig) { // not required + return nil + } + + if m.MachineHealthConfig != nil { + if err := m.MachineHealthConfig.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("machineHealthConfig") + } + return err + } + } + + return nil +} + +func (m *V1ClusterConfig) validateMachineManagementConfig(formats strfmt.Registry) error { + + if swag.IsZero(m.MachineManagementConfig) { // not required + return nil + } + + if m.MachineManagementConfig != nil { + if err := m.MachineManagementConfig.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("machineManagementConfig") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ClusterConfig) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ClusterConfig) UnmarshalBinary(b []byte) error { + var res V1ClusterConfig + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cluster_config_entity.go b/api/models/v1_cluster_config_entity.go new file mode 100644 index 00000000..7f1f36fb --- /dev/null +++ b/api/models/v1_cluster_config_entity.go @@ -0,0 +1,180 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ClusterConfigEntity v1 cluster config entity +// +// swagger:model v1ClusterConfigEntity +type V1ClusterConfigEntity struct { + + // ClusterMetaAttribute can be used to set additional cluster metadata information. + ClusterMetaAttribute string `json:"clusterMetaAttribute,omitempty"` + + // control plane health check timeout + ControlPlaneHealthCheckTimeout string `json:"controlPlaneHealthCheckTimeout,omitempty"` + + // host cluster config + HostClusterConfig *V1HostClusterConfig `json:"hostClusterConfig,omitempty"` + + // lifecycle config + LifecycleConfig *V1LifecycleConfig `json:"lifecycleConfig,omitempty"` + + // location + Location *V1ClusterLocation `json:"location,omitempty"` + + // machine management config + MachineManagementConfig *V1MachineManagementConfig `json:"machineManagementConfig,omitempty"` + + // resources + Resources *V1ClusterResourcesEntity `json:"resources,omitempty"` + + // update worker pools in parallel + UpdateWorkerPoolsInParallel bool `json:"updateWorkerPoolsInParallel,omitempty"` +} + +// Validate validates this v1 cluster config entity +func (m *V1ClusterConfigEntity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateHostClusterConfig(formats); err != nil { + res = append(res, err) + } + + if err := m.validateLifecycleConfig(formats); err != nil { + res = append(res, err) + } + + if err := m.validateLocation(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMachineManagementConfig(formats); err != nil { + res = append(res, err) + } + + if err := m.validateResources(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ClusterConfigEntity) validateHostClusterConfig(formats strfmt.Registry) error { + + if swag.IsZero(m.HostClusterConfig) { // not required + return nil + } + + if m.HostClusterConfig != nil { + if err := m.HostClusterConfig.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("hostClusterConfig") + } + return err + } + } + + return nil +} + +func (m *V1ClusterConfigEntity) validateLifecycleConfig(formats strfmt.Registry) error { + + if swag.IsZero(m.LifecycleConfig) { // not required + return nil + } + + if m.LifecycleConfig != nil { + if err := m.LifecycleConfig.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("lifecycleConfig") + } + return err + } + } + + return nil +} + +func (m *V1ClusterConfigEntity) validateLocation(formats strfmt.Registry) error { + + if swag.IsZero(m.Location) { // not required + return nil + } + + if m.Location != nil { + if err := m.Location.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("location") + } + return err + } + } + + return nil +} + +func (m *V1ClusterConfigEntity) validateMachineManagementConfig(formats strfmt.Registry) error { + + if swag.IsZero(m.MachineManagementConfig) { // not required + return nil + } + + if m.MachineManagementConfig != nil { + if err := m.MachineManagementConfig.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("machineManagementConfig") + } + return err + } + } + + return nil +} + +func (m *V1ClusterConfigEntity) validateResources(formats strfmt.Registry) error { + + if swag.IsZero(m.Resources) { // not required + return nil + } + + if m.Resources != nil { + if err := m.Resources.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("resources") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ClusterConfigEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ClusterConfigEntity) UnmarshalBinary(b []byte) error { + var res V1ClusterConfigEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cluster_config_response.go b/api/models/v1_cluster_config_response.go new file mode 100644 index 00000000..d81e5ceb --- /dev/null +++ b/api/models/v1_cluster_config_response.go @@ -0,0 +1,71 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ClusterConfigResponse v1 cluster config response +// +// swagger:model v1ClusterConfigResponse +type V1ClusterConfigResponse struct { + + // HostClusterConfig defines the configuration entity of host clusters config entity + HostClusterConfig *V1HostClusterConfigResponse `json:"hostClusterConfig,omitempty"` +} + +// Validate validates this v1 cluster config response +func (m *V1ClusterConfigResponse) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateHostClusterConfig(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ClusterConfigResponse) validateHostClusterConfig(formats strfmt.Registry) error { + + if swag.IsZero(m.HostClusterConfig) { // not required + return nil + } + + if m.HostClusterConfig != nil { + if err := m.HostClusterConfig.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("hostClusterConfig") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ClusterConfigResponse) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ClusterConfigResponse) UnmarshalBinary(b []byte) error { + var res V1ClusterConfigResponse + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cluster_definition_entity.go b/api/models/v1_cluster_definition_entity.go new file mode 100644 index 00000000..016a5eee --- /dev/null +++ b/api/models/v1_cluster_definition_entity.go @@ -0,0 +1,96 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ClusterDefinitionEntity Cluster definition entity +// +// swagger:model v1ClusterDefinitionEntity +type V1ClusterDefinitionEntity struct { + + // metadata + Metadata *V1ObjectMetaInputEntity `json:"metadata,omitempty"` + + // spec + Spec *V1ClusterDefinitionSpecEntity `json:"spec,omitempty"` +} + +// Validate validates this v1 cluster definition entity +func (m *V1ClusterDefinitionEntity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSpec(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ClusterDefinitionEntity) validateMetadata(formats strfmt.Registry) error { + + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } + return err + } + } + + return nil +} + +func (m *V1ClusterDefinitionEntity) validateSpec(formats strfmt.Registry) error { + + if swag.IsZero(m.Spec) { // not required + return nil + } + + if m.Spec != nil { + if err := m.Spec.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ClusterDefinitionEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ClusterDefinitionEntity) UnmarshalBinary(b []byte) error { + var res V1ClusterDefinitionEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cluster_definition_profile_entity.go b/api/models/v1_cluster_definition_profile_entity.go new file mode 100644 index 00000000..ddfb5cba --- /dev/null +++ b/api/models/v1_cluster_definition_profile_entity.go @@ -0,0 +1,103 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1ClusterDefinitionProfileEntity Cluster definition profile entity +// +// swagger:model v1ClusterDefinitionProfileEntity +type V1ClusterDefinitionProfileEntity struct { + + // Cluster profile packs array + // Unique: true + Packs []*V1PackValuesEntity `json:"packs"` + + // Cluster profile uid + // Required: true + UID *string `json:"uid"` +} + +// Validate validates this v1 cluster definition profile entity +func (m *V1ClusterDefinitionProfileEntity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validatePacks(formats); err != nil { + res = append(res, err) + } + + if err := m.validateUID(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ClusterDefinitionProfileEntity) validatePacks(formats strfmt.Registry) error { + + if swag.IsZero(m.Packs) { // not required + return nil + } + + if err := validate.UniqueItems("packs", "body", m.Packs); err != nil { + return err + } + + for i := 0; i < len(m.Packs); i++ { + if swag.IsZero(m.Packs[i]) { // not required + continue + } + + if m.Packs[i] != nil { + if err := m.Packs[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("packs" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1ClusterDefinitionProfileEntity) validateUID(formats strfmt.Registry) error { + + if err := validate.Required("uid", "body", m.UID); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ClusterDefinitionProfileEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ClusterDefinitionProfileEntity) UnmarshalBinary(b []byte) error { + var res V1ClusterDefinitionProfileEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cluster_definition_spec_entity.go b/api/models/v1_cluster_definition_spec_entity.go new file mode 100644 index 00000000..e26f3eca --- /dev/null +++ b/api/models/v1_cluster_definition_spec_entity.go @@ -0,0 +1,104 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1ClusterDefinitionSpecEntity Cluster definition spec entity +// +// swagger:model v1ClusterDefinitionSpecEntity +type V1ClusterDefinitionSpecEntity struct { + + // cloud type + // Required: true + CloudType *string `json:"cloudType"` + + // Cluster definition profiles + // Required: true + // Unique: true + Profiles []*V1ClusterDefinitionProfileEntity `json:"profiles"` +} + +// Validate validates this v1 cluster definition spec entity +func (m *V1ClusterDefinitionSpecEntity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateCloudType(formats); err != nil { + res = append(res, err) + } + + if err := m.validateProfiles(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ClusterDefinitionSpecEntity) validateCloudType(formats strfmt.Registry) error { + + if err := validate.Required("cloudType", "body", m.CloudType); err != nil { + return err + } + + return nil +} + +func (m *V1ClusterDefinitionSpecEntity) validateProfiles(formats strfmt.Registry) error { + + if err := validate.Required("profiles", "body", m.Profiles); err != nil { + return err + } + + if err := validate.UniqueItems("profiles", "body", m.Profiles); err != nil { + return err + } + + for i := 0; i < len(m.Profiles); i++ { + if swag.IsZero(m.Profiles[i]) { // not required + continue + } + + if m.Profiles[i] != nil { + if err := m.Profiles[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("profiles" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ClusterDefinitionSpecEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ClusterDefinitionSpecEntity) UnmarshalBinary(b []byte) error { + var res V1ClusterDefinitionSpecEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cluster_edge_installer_config.go b/api/models/v1_cluster_edge_installer_config.go new file mode 100644 index 00000000..59139b17 --- /dev/null +++ b/api/models/v1_cluster_edge_installer_config.go @@ -0,0 +1,43 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ClusterEdgeInstallerConfig v1 cluster edge installer config +// +// swagger:model v1ClusterEdgeInstallerConfig +type V1ClusterEdgeInstallerConfig struct { + + // installer download links + InstallerDownloadLinks map[string]string `json:"installerDownloadLinks,omitempty"` +} + +// Validate validates this v1 cluster edge installer config +func (m *V1ClusterEdgeInstallerConfig) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1ClusterEdgeInstallerConfig) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ClusterEdgeInstallerConfig) UnmarshalBinary(b []byte) error { + var res V1ClusterEdgeInstallerConfig + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cluster_feature_actor.go b/api/models/v1_cluster_feature_actor.go new file mode 100644 index 00000000..ed04d77d --- /dev/null +++ b/api/models/v1_cluster_feature_actor.go @@ -0,0 +1,46 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ClusterFeatureActor Compliance Scan actor +// +// swagger:model v1ClusterFeatureActor +type V1ClusterFeatureActor struct { + + // actor type + ActorType string `json:"actorType,omitempty"` + + // uid + UID string `json:"uid,omitempty"` +} + +// Validate validates this v1 cluster feature actor +func (m *V1ClusterFeatureActor) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1ClusterFeatureActor) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ClusterFeatureActor) UnmarshalBinary(b []byte) error { + var res V1ClusterFeatureActor + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cluster_feature_schedule.go b/api/models/v1_cluster_feature_schedule.go new file mode 100644 index 00000000..5eef867a --- /dev/null +++ b/api/models/v1_cluster_feature_schedule.go @@ -0,0 +1,43 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ClusterFeatureSchedule Cluster feature schedule +// +// swagger:model v1ClusterFeatureSchedule +type V1ClusterFeatureSchedule struct { + + // scheduled run time + ScheduledRunTime string `json:"scheduledRunTime,omitempty"` +} + +// Validate validates this v1 cluster feature schedule +func (m *V1ClusterFeatureSchedule) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1ClusterFeatureSchedule) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ClusterFeatureSchedule) UnmarshalBinary(b []byte) error { + var res V1ClusterFeatureSchedule + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cluster_fips.go b/api/models/v1_cluster_fips.go new file mode 100644 index 00000000..f3e225d1 --- /dev/null +++ b/api/models/v1_cluster_fips.go @@ -0,0 +1,69 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ClusterFips v1 cluster fips +// +// swagger:model v1ClusterFips +type V1ClusterFips struct { + + // mode + Mode V1ClusterFipsMode `json:"mode,omitempty"` +} + +// Validate validates this v1 cluster fips +func (m *V1ClusterFips) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMode(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ClusterFips) validateMode(formats strfmt.Registry) error { + + if swag.IsZero(m.Mode) { // not required + return nil + } + + if err := m.Mode.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("mode") + } + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ClusterFips) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ClusterFips) UnmarshalBinary(b []byte) error { + var res V1ClusterFips + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cluster_fips_mode.go b/api/models/v1_cluster_fips_mode.go new file mode 100644 index 00000000..7bb973ea --- /dev/null +++ b/api/models/v1_cluster_fips_mode.go @@ -0,0 +1,69 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "encoding/json" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" +) + +// V1ClusterFipsMode v1 cluster fips mode +// +// swagger:model v1ClusterFipsMode +type V1ClusterFipsMode string + +const ( + + // V1ClusterFipsModeFull captures enum value "full" + V1ClusterFipsModeFull V1ClusterFipsMode = "full" + + // V1ClusterFipsModeNone captures enum value "none" + V1ClusterFipsModeNone V1ClusterFipsMode = "none" + + // V1ClusterFipsModePartial captures enum value "partial" + V1ClusterFipsModePartial V1ClusterFipsMode = "partial" + + // V1ClusterFipsModeUnknown captures enum value "unknown" + V1ClusterFipsModeUnknown V1ClusterFipsMode = "unknown" +) + +// for schema +var v1ClusterFipsModeEnum []interface{} + +func init() { + var res []V1ClusterFipsMode + if err := json.Unmarshal([]byte(`["full","none","partial","unknown"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + v1ClusterFipsModeEnum = append(v1ClusterFipsModeEnum, v) + } +} + +func (m V1ClusterFipsMode) validateV1ClusterFipsModeEnum(path, location string, value V1ClusterFipsMode) error { + if err := validate.EnumCase(path, location, value, v1ClusterFipsModeEnum, true); err != nil { + return err + } + return nil +} + +// Validate validates this v1 cluster fips mode +func (m V1ClusterFipsMode) Validate(formats strfmt.Registry) error { + var res []error + + // value enum + if err := m.validateV1ClusterFipsModeEnum("", "body", m); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/models/v1_cluster_group.go b/api/models/v1_cluster_group.go new file mode 100644 index 00000000..f71b9a56 --- /dev/null +++ b/api/models/v1_cluster_group.go @@ -0,0 +1,121 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ClusterGroup Cluster group information +// +// swagger:model v1ClusterGroup +type V1ClusterGroup struct { + + // metadata + Metadata *V1ObjectMeta `json:"metadata,omitempty"` + + // spec + Spec *V1ClusterGroupSpec `json:"spec,omitempty"` + + // status + Status *V1ClusterGroupStatus `json:"status,omitempty"` +} + +// Validate validates this v1 cluster group +func (m *V1ClusterGroup) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSpec(formats); err != nil { + res = append(res, err) + } + + if err := m.validateStatus(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ClusterGroup) validateMetadata(formats strfmt.Registry) error { + + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } + return err + } + } + + return nil +} + +func (m *V1ClusterGroup) validateSpec(formats strfmt.Registry) error { + + if swag.IsZero(m.Spec) { // not required + return nil + } + + if m.Spec != nil { + if err := m.Spec.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec") + } + return err + } + } + + return nil +} + +func (m *V1ClusterGroup) validateStatus(formats strfmt.Registry) error { + + if swag.IsZero(m.Status) { // not required + return nil + } + + if m.Status != nil { + if err := m.Status.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("status") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ClusterGroup) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ClusterGroup) UnmarshalBinary(b []byte) error { + var res V1ClusterGroup + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cluster_group_cluster_ref.go b/api/models/v1_cluster_group_cluster_ref.go new file mode 100644 index 00000000..71c2edd5 --- /dev/null +++ b/api/models/v1_cluster_group_cluster_ref.go @@ -0,0 +1,46 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ClusterGroupClusterRef Cluster group cluster reference +// +// swagger:model v1ClusterGroupClusterRef +type V1ClusterGroupClusterRef struct { + + // cluster name + ClusterName string `json:"clusterName,omitempty"` + + // cluster Uid + ClusterUID string `json:"clusterUid,omitempty"` +} + +// Validate validates this v1 cluster group cluster ref +func (m *V1ClusterGroupClusterRef) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1ClusterGroupClusterRef) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ClusterGroupClusterRef) UnmarshalBinary(b []byte) error { + var res V1ClusterGroupClusterRef + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cluster_group_clusters_config.go b/api/models/v1_cluster_group_clusters_config.go new file mode 100644 index 00000000..bef7a20a --- /dev/null +++ b/api/models/v1_cluster_group_clusters_config.go @@ -0,0 +1,189 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "encoding/json" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1ClusterGroupClustersConfig Clusters config of cluster group +// +// swagger:model v1ClusterGroupClustersConfig +type V1ClusterGroupClustersConfig struct { + + // Host cluster endpoint type + // Enum: [Ingress LoadBalancer] + EndpointType string `json:"endpointType,omitempty"` + + // host clusters config + // Unique: true + HostClustersConfig []*V1ClusterGroupHostClusterConfig `json:"hostClustersConfig"` + + // kubernetes distro type + KubernetesDistroType V1ClusterKubernetesDistroType `json:"kubernetesDistroType,omitempty"` + + // limit config + LimitConfig *V1ClusterGroupLimitConfig `json:"limitConfig,omitempty"` + + // values + Values string `json:"values,omitempty"` +} + +// Validate validates this v1 cluster group clusters config +func (m *V1ClusterGroupClustersConfig) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateEndpointType(formats); err != nil { + res = append(res, err) + } + + if err := m.validateHostClustersConfig(formats); err != nil { + res = append(res, err) + } + + if err := m.validateKubernetesDistroType(formats); err != nil { + res = append(res, err) + } + + if err := m.validateLimitConfig(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +var v1ClusterGroupClustersConfigTypeEndpointTypePropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["Ingress","LoadBalancer"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + v1ClusterGroupClustersConfigTypeEndpointTypePropEnum = append(v1ClusterGroupClustersConfigTypeEndpointTypePropEnum, v) + } +} + +const ( + + // V1ClusterGroupClustersConfigEndpointTypeIngress captures enum value "Ingress" + V1ClusterGroupClustersConfigEndpointTypeIngress string = "Ingress" + + // V1ClusterGroupClustersConfigEndpointTypeLoadBalancer captures enum value "LoadBalancer" + V1ClusterGroupClustersConfigEndpointTypeLoadBalancer string = "LoadBalancer" +) + +// prop value enum +func (m *V1ClusterGroupClustersConfig) validateEndpointTypeEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, v1ClusterGroupClustersConfigTypeEndpointTypePropEnum, true); err != nil { + return err + } + return nil +} + +func (m *V1ClusterGroupClustersConfig) validateEndpointType(formats strfmt.Registry) error { + + if swag.IsZero(m.EndpointType) { // not required + return nil + } + + // value enum + if err := m.validateEndpointTypeEnum("endpointType", "body", m.EndpointType); err != nil { + return err + } + + return nil +} + +func (m *V1ClusterGroupClustersConfig) validateHostClustersConfig(formats strfmt.Registry) error { + + if swag.IsZero(m.HostClustersConfig) { // not required + return nil + } + + if err := validate.UniqueItems("hostClustersConfig", "body", m.HostClustersConfig); err != nil { + return err + } + + for i := 0; i < len(m.HostClustersConfig); i++ { + if swag.IsZero(m.HostClustersConfig[i]) { // not required + continue + } + + if m.HostClustersConfig[i] != nil { + if err := m.HostClustersConfig[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("hostClustersConfig" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1ClusterGroupClustersConfig) validateKubernetesDistroType(formats strfmt.Registry) error { + + if swag.IsZero(m.KubernetesDistroType) { // not required + return nil + } + + if err := m.KubernetesDistroType.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("kubernetesDistroType") + } + return err + } + + return nil +} + +func (m *V1ClusterGroupClustersConfig) validateLimitConfig(formats strfmt.Registry) error { + + if swag.IsZero(m.LimitConfig) { // not required + return nil + } + + if m.LimitConfig != nil { + if err := m.LimitConfig.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("limitConfig") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ClusterGroupClustersConfig) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ClusterGroupClustersConfig) UnmarshalBinary(b []byte) error { + var res V1ClusterGroupClustersConfig + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cluster_group_entity.go b/api/models/v1_cluster_group_entity.go new file mode 100644 index 00000000..f59a985f --- /dev/null +++ b/api/models/v1_cluster_group_entity.go @@ -0,0 +1,96 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ClusterGroupEntity Cluster group information +// +// swagger:model v1ClusterGroupEntity +type V1ClusterGroupEntity struct { + + // metadata + Metadata *V1ObjectMeta `json:"metadata,omitempty"` + + // spec + Spec *V1ClusterGroupSpecEntity `json:"spec,omitempty"` +} + +// Validate validates this v1 cluster group entity +func (m *V1ClusterGroupEntity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSpec(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ClusterGroupEntity) validateMetadata(formats strfmt.Registry) error { + + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } + return err + } + } + + return nil +} + +func (m *V1ClusterGroupEntity) validateSpec(formats strfmt.Registry) error { + + if swag.IsZero(m.Spec) { // not required + return nil + } + + if m.Spec != nil { + if err := m.Spec.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ClusterGroupEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ClusterGroupEntity) UnmarshalBinary(b []byte) error { + var res V1ClusterGroupEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cluster_group_host_cluster_config.go b/api/models/v1_cluster_group_host_cluster_config.go new file mode 100644 index 00000000..5d52eaa7 --- /dev/null +++ b/api/models/v1_cluster_group_host_cluster_config.go @@ -0,0 +1,74 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ClusterGroupHostClusterConfig v1 cluster group host cluster config +// +// swagger:model v1ClusterGroupHostClusterConfig +type V1ClusterGroupHostClusterConfig struct { + + // cluster Uid + ClusterUID string `json:"clusterUid,omitempty"` + + // host cluster endpoint configuration + EndpointConfig *V1HostClusterEndpointConfig `json:"endpointConfig,omitempty"` +} + +// Validate validates this v1 cluster group host cluster config +func (m *V1ClusterGroupHostClusterConfig) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateEndpointConfig(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ClusterGroupHostClusterConfig) validateEndpointConfig(formats strfmt.Registry) error { + + if swag.IsZero(m.EndpointConfig) { // not required + return nil + } + + if m.EndpointConfig != nil { + if err := m.EndpointConfig.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("endpointConfig") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ClusterGroupHostClusterConfig) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ClusterGroupHostClusterConfig) UnmarshalBinary(b []byte) error { + var res V1ClusterGroupHostClusterConfig + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cluster_group_host_cluster_entity.go b/api/models/v1_cluster_group_host_cluster_entity.go new file mode 100644 index 00000000..7c0abfdc --- /dev/null +++ b/api/models/v1_cluster_group_host_cluster_entity.go @@ -0,0 +1,111 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1ClusterGroupHostClusterEntity Clusters and clusters config of cluster group +// +// swagger:model v1ClusterGroupHostClusterEntity +type V1ClusterGroupHostClusterEntity struct { + + // cluster refs + // Unique: true + ClusterRefs []*V1ClusterGroupClusterRef `json:"clusterRefs"` + + // clusters config + ClustersConfig *V1ClusterGroupClustersConfig `json:"clustersConfig,omitempty"` +} + +// Validate validates this v1 cluster group host cluster entity +func (m *V1ClusterGroupHostClusterEntity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateClusterRefs(formats); err != nil { + res = append(res, err) + } + + if err := m.validateClustersConfig(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ClusterGroupHostClusterEntity) validateClusterRefs(formats strfmt.Registry) error { + + if swag.IsZero(m.ClusterRefs) { // not required + return nil + } + + if err := validate.UniqueItems("clusterRefs", "body", m.ClusterRefs); err != nil { + return err + } + + for i := 0; i < len(m.ClusterRefs); i++ { + if swag.IsZero(m.ClusterRefs[i]) { // not required + continue + } + + if m.ClusterRefs[i] != nil { + if err := m.ClusterRefs[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("clusterRefs" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1ClusterGroupHostClusterEntity) validateClustersConfig(formats strfmt.Registry) error { + + if swag.IsZero(m.ClustersConfig) { // not required + return nil + } + + if m.ClustersConfig != nil { + if err := m.ClustersConfig.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("clustersConfig") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ClusterGroupHostClusterEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ClusterGroupHostClusterEntity) UnmarshalBinary(b []byte) error { + var res V1ClusterGroupHostClusterEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cluster_group_limit_config.go b/api/models/v1_cluster_group_limit_config.go new file mode 100644 index 00000000..00d63e98 --- /dev/null +++ b/api/models/v1_cluster_group_limit_config.go @@ -0,0 +1,58 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ClusterGroupLimitConfig Cluster group limit config +// +// swagger:model v1ClusterGroupLimitConfig +type V1ClusterGroupLimitConfig struct { + + // Deprecated. Use field cpuMilliCore + CPU int32 `json:"cpu,omitempty"` + + // CPU in milli cores + CPUMilliCore int32 `json:"cpuMilliCore,omitempty"` + + // Deprecated. Use field memoryMiB + Memory int32 `json:"memory,omitempty"` + + // Memory in MiB + MemoryMiB int32 `json:"memoryMiB,omitempty"` + + // Over subscription percentage + OverSubscription int32 `json:"overSubscription,omitempty"` + + // Storage in GiB + StorageGiB int32 `json:"storageGiB,omitempty"` +} + +// Validate validates this v1 cluster group limit config +func (m *V1ClusterGroupLimitConfig) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1ClusterGroupLimitConfig) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ClusterGroupLimitConfig) UnmarshalBinary(b []byte) error { + var res V1ClusterGroupLimitConfig + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cluster_group_resource.go b/api/models/v1_cluster_group_resource.go new file mode 100644 index 00000000..f4c2f0cc --- /dev/null +++ b/api/models/v1_cluster_group_resource.go @@ -0,0 +1,46 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ClusterGroupResource Cluster group resource allocated and usage information +// +// swagger:model v1ClusterGroupResource +type V1ClusterGroupResource struct { + + // allocated + Allocated float64 `json:"allocated"` + + // used + Used float64 `json:"used"` +} + +// Validate validates this v1 cluster group resource +func (m *V1ClusterGroupResource) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1ClusterGroupResource) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ClusterGroupResource) UnmarshalBinary(b []byte) error { + var res V1ClusterGroupResource + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cluster_group_spec.go b/api/models/v1_cluster_group_spec.go new file mode 100644 index 00000000..29e19036 --- /dev/null +++ b/api/models/v1_cluster_group_spec.go @@ -0,0 +1,192 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "encoding/json" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1ClusterGroupSpec Cluster group specifications +// +// swagger:model v1ClusterGroupSpec +type V1ClusterGroupSpec struct { + + // ClusterProfileTemplate is a copy of the draft version or latest published version of the clusterprofileSpec. It consists of list of add on profiles at a cluster group level which will be enforced on all virtual cluster. ClusterProfileTemplate will be updated from the clusterprofile pointed by ClusterProfileRef + ClusterProfileTemplates []*V1ClusterProfileTemplate `json:"clusterProfileTemplates"` + + // cluster refs + // Unique: true + ClusterRefs []*V1ClusterGroupClusterRef `json:"clusterRefs"` + + // clusters config + ClustersConfig *V1ClusterGroupClustersConfig `json:"clustersConfig,omitempty"` + + // type + // Enum: [hostCluster] + Type string `json:"type,omitempty"` +} + +// Validate validates this v1 cluster group spec +func (m *V1ClusterGroupSpec) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateClusterProfileTemplates(formats); err != nil { + res = append(res, err) + } + + if err := m.validateClusterRefs(formats); err != nil { + res = append(res, err) + } + + if err := m.validateClustersConfig(formats); err != nil { + res = append(res, err) + } + + if err := m.validateType(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ClusterGroupSpec) validateClusterProfileTemplates(formats strfmt.Registry) error { + + if swag.IsZero(m.ClusterProfileTemplates) { // not required + return nil + } + + for i := 0; i < len(m.ClusterProfileTemplates); i++ { + if swag.IsZero(m.ClusterProfileTemplates[i]) { // not required + continue + } + + if m.ClusterProfileTemplates[i] != nil { + if err := m.ClusterProfileTemplates[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("clusterProfileTemplates" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1ClusterGroupSpec) validateClusterRefs(formats strfmt.Registry) error { + + if swag.IsZero(m.ClusterRefs) { // not required + return nil + } + + if err := validate.UniqueItems("clusterRefs", "body", m.ClusterRefs); err != nil { + return err + } + + for i := 0; i < len(m.ClusterRefs); i++ { + if swag.IsZero(m.ClusterRefs[i]) { // not required + continue + } + + if m.ClusterRefs[i] != nil { + if err := m.ClusterRefs[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("clusterRefs" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1ClusterGroupSpec) validateClustersConfig(formats strfmt.Registry) error { + + if swag.IsZero(m.ClustersConfig) { // not required + return nil + } + + if m.ClustersConfig != nil { + if err := m.ClustersConfig.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("clustersConfig") + } + return err + } + } + + return nil +} + +var v1ClusterGroupSpecTypeTypePropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["hostCluster"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + v1ClusterGroupSpecTypeTypePropEnum = append(v1ClusterGroupSpecTypeTypePropEnum, v) + } +} + +const ( + + // V1ClusterGroupSpecTypeHostCluster captures enum value "hostCluster" + V1ClusterGroupSpecTypeHostCluster string = "hostCluster" +) + +// prop value enum +func (m *V1ClusterGroupSpec) validateTypeEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, v1ClusterGroupSpecTypeTypePropEnum, true); err != nil { + return err + } + return nil +} + +func (m *V1ClusterGroupSpec) validateType(formats strfmt.Registry) error { + + if swag.IsZero(m.Type) { // not required + return nil + } + + // value enum + if err := m.validateTypeEnum("type", "body", m.Type); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ClusterGroupSpec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ClusterGroupSpec) UnmarshalBinary(b []byte) error { + var res V1ClusterGroupSpec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cluster_group_spec_entity.go b/api/models/v1_cluster_group_spec_entity.go new file mode 100644 index 00000000..1e4b9557 --- /dev/null +++ b/api/models/v1_cluster_group_spec_entity.go @@ -0,0 +1,192 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "encoding/json" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1ClusterGroupSpecEntity Cluster group specifications request entity +// +// swagger:model v1ClusterGroupSpecEntity +type V1ClusterGroupSpecEntity struct { + + // cluster refs + // Unique: true + ClusterRefs []*V1ClusterGroupClusterRef `json:"clusterRefs"` + + // clusters config + ClustersConfig *V1ClusterGroupClustersConfig `json:"clustersConfig,omitempty"` + + // profiles + Profiles []*V1SpectroClusterProfileEntity `json:"profiles"` + + // type + // Enum: [hostCluster] + Type string `json:"type,omitempty"` +} + +// Validate validates this v1 cluster group spec entity +func (m *V1ClusterGroupSpecEntity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateClusterRefs(formats); err != nil { + res = append(res, err) + } + + if err := m.validateClustersConfig(formats); err != nil { + res = append(res, err) + } + + if err := m.validateProfiles(formats); err != nil { + res = append(res, err) + } + + if err := m.validateType(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ClusterGroupSpecEntity) validateClusterRefs(formats strfmt.Registry) error { + + if swag.IsZero(m.ClusterRefs) { // not required + return nil + } + + if err := validate.UniqueItems("clusterRefs", "body", m.ClusterRefs); err != nil { + return err + } + + for i := 0; i < len(m.ClusterRefs); i++ { + if swag.IsZero(m.ClusterRefs[i]) { // not required + continue + } + + if m.ClusterRefs[i] != nil { + if err := m.ClusterRefs[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("clusterRefs" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1ClusterGroupSpecEntity) validateClustersConfig(formats strfmt.Registry) error { + + if swag.IsZero(m.ClustersConfig) { // not required + return nil + } + + if m.ClustersConfig != nil { + if err := m.ClustersConfig.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("clustersConfig") + } + return err + } + } + + return nil +} + +func (m *V1ClusterGroupSpecEntity) validateProfiles(formats strfmt.Registry) error { + + if swag.IsZero(m.Profiles) { // not required + return nil + } + + for i := 0; i < len(m.Profiles); i++ { + if swag.IsZero(m.Profiles[i]) { // not required + continue + } + + if m.Profiles[i] != nil { + if err := m.Profiles[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("profiles" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +var v1ClusterGroupSpecEntityTypeTypePropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["hostCluster"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + v1ClusterGroupSpecEntityTypeTypePropEnum = append(v1ClusterGroupSpecEntityTypeTypePropEnum, v) + } +} + +const ( + + // V1ClusterGroupSpecEntityTypeHostCluster captures enum value "hostCluster" + V1ClusterGroupSpecEntityTypeHostCluster string = "hostCluster" +) + +// prop value enum +func (m *V1ClusterGroupSpecEntity) validateTypeEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, v1ClusterGroupSpecEntityTypeTypePropEnum, true); err != nil { + return err + } + return nil +} + +func (m *V1ClusterGroupSpecEntity) validateType(formats strfmt.Registry) error { + + if swag.IsZero(m.Type) { // not required + return nil + } + + // value enum + if err := m.validateTypeEnum("type", "body", m.Type); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ClusterGroupSpecEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ClusterGroupSpecEntity) UnmarshalBinary(b []byte) error { + var res V1ClusterGroupSpecEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cluster_group_status.go b/api/models/v1_cluster_group_status.go new file mode 100644 index 00000000..24009464 --- /dev/null +++ b/api/models/v1_cluster_group_status.go @@ -0,0 +1,43 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ClusterGroupStatus Cluster group status +// +// swagger:model v1ClusterGroupStatus +type V1ClusterGroupStatus struct { + + // is active + IsActive bool `json:"isActive"` +} + +// Validate validates this v1 cluster group status +func (m *V1ClusterGroupStatus) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1ClusterGroupStatus) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ClusterGroupStatus) UnmarshalBinary(b []byte) error { + var res V1ClusterGroupStatus + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cluster_group_summary.go b/api/models/v1_cluster_group_summary.go new file mode 100644 index 00000000..43ab270b --- /dev/null +++ b/api/models/v1_cluster_group_summary.go @@ -0,0 +1,96 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ClusterGroupSummary Cluster group summay +// +// swagger:model v1ClusterGroupSummary +type V1ClusterGroupSummary struct { + + // metadata + Metadata *V1ObjectMeta `json:"metadata,omitempty"` + + // spec + Spec *V1ClusterGroupSummarySpec `json:"spec,omitempty"` +} + +// Validate validates this v1 cluster group summary +func (m *V1ClusterGroupSummary) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSpec(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ClusterGroupSummary) validateMetadata(formats strfmt.Registry) error { + + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } + return err + } + } + + return nil +} + +func (m *V1ClusterGroupSummary) validateSpec(formats strfmt.Registry) error { + + if swag.IsZero(m.Spec) { // not required + return nil + } + + if m.Spec != nil { + if err := m.Spec.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ClusterGroupSummary) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ClusterGroupSummary) UnmarshalBinary(b []byte) error { + var res V1ClusterGroupSummary + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cluster_group_summary_spec.go b/api/models/v1_cluster_group_summary_spec.go new file mode 100644 index 00000000..ce9f1b52 --- /dev/null +++ b/api/models/v1_cluster_group_summary_spec.go @@ -0,0 +1,229 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "encoding/json" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1ClusterGroupSummarySpec Cluster group summay spec +// +// swagger:model v1ClusterGroupSummarySpec +type V1ClusterGroupSummarySpec struct { + + // cluster profile templates + ClusterProfileTemplates []*V1ClusterProfileTemplateMeta `json:"clusterProfileTemplates"` + + // Deprecated + CPU *V1ClusterGroupResource `json:"cpu,omitempty"` + + // endpoint type + // Enum: [Ingress LoadBalancer] + EndpointType string `json:"endpointType,omitempty"` + + // host clusters + // Unique: true + HostClusters []*V1ObjectResReference `json:"hostClusters"` + + // host clusters count + HostClustersCount int64 `json:"hostClustersCount"` + + // Deprecated + Memory *V1ClusterGroupResource `json:"memory,omitempty"` + + // scope + Scope string `json:"scope,omitempty"` + + // virtual clusters count + VirtualClustersCount int64 `json:"virtualClustersCount"` +} + +// Validate validates this v1 cluster group summary spec +func (m *V1ClusterGroupSummarySpec) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateClusterProfileTemplates(formats); err != nil { + res = append(res, err) + } + + if err := m.validateCPU(formats); err != nil { + res = append(res, err) + } + + if err := m.validateEndpointType(formats); err != nil { + res = append(res, err) + } + + if err := m.validateHostClusters(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMemory(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ClusterGroupSummarySpec) validateClusterProfileTemplates(formats strfmt.Registry) error { + + if swag.IsZero(m.ClusterProfileTemplates) { // not required + return nil + } + + for i := 0; i < len(m.ClusterProfileTemplates); i++ { + if swag.IsZero(m.ClusterProfileTemplates[i]) { // not required + continue + } + + if m.ClusterProfileTemplates[i] != nil { + if err := m.ClusterProfileTemplates[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("clusterProfileTemplates" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1ClusterGroupSummarySpec) validateCPU(formats strfmt.Registry) error { + + if swag.IsZero(m.CPU) { // not required + return nil + } + + if m.CPU != nil { + if err := m.CPU.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("cpu") + } + return err + } + } + + return nil +} + +var v1ClusterGroupSummarySpecTypeEndpointTypePropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["Ingress","LoadBalancer"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + v1ClusterGroupSummarySpecTypeEndpointTypePropEnum = append(v1ClusterGroupSummarySpecTypeEndpointTypePropEnum, v) + } +} + +const ( + + // V1ClusterGroupSummarySpecEndpointTypeIngress captures enum value "Ingress" + V1ClusterGroupSummarySpecEndpointTypeIngress string = "Ingress" + + // V1ClusterGroupSummarySpecEndpointTypeLoadBalancer captures enum value "LoadBalancer" + V1ClusterGroupSummarySpecEndpointTypeLoadBalancer string = "LoadBalancer" +) + +// prop value enum +func (m *V1ClusterGroupSummarySpec) validateEndpointTypeEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, v1ClusterGroupSummarySpecTypeEndpointTypePropEnum, true); err != nil { + return err + } + return nil +} + +func (m *V1ClusterGroupSummarySpec) validateEndpointType(formats strfmt.Registry) error { + + if swag.IsZero(m.EndpointType) { // not required + return nil + } + + // value enum + if err := m.validateEndpointTypeEnum("endpointType", "body", m.EndpointType); err != nil { + return err + } + + return nil +} + +func (m *V1ClusterGroupSummarySpec) validateHostClusters(formats strfmt.Registry) error { + + if swag.IsZero(m.HostClusters) { // not required + return nil + } + + if err := validate.UniqueItems("hostClusters", "body", m.HostClusters); err != nil { + return err + } + + for i := 0; i < len(m.HostClusters); i++ { + if swag.IsZero(m.HostClusters[i]) { // not required + continue + } + + if m.HostClusters[i] != nil { + if err := m.HostClusters[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("hostClusters" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1ClusterGroupSummarySpec) validateMemory(formats strfmt.Registry) error { + + if swag.IsZero(m.Memory) { // not required + return nil + } + + if m.Memory != nil { + if err := m.Memory.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("memory") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ClusterGroupSummarySpec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ClusterGroupSummarySpec) UnmarshalBinary(b []byte) error { + var res V1ClusterGroupSummarySpec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cluster_groups_developer_credit_usage.go b/api/models/v1_cluster_groups_developer_credit_usage.go new file mode 100644 index 00000000..dc25f9f4 --- /dev/null +++ b/api/models/v1_cluster_groups_developer_credit_usage.go @@ -0,0 +1,96 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ClusterGroupsDeveloperCreditUsage Cluster group resource allocated and usage information +// +// swagger:model v1ClusterGroupsDeveloperCreditUsage +type V1ClusterGroupsDeveloperCreditUsage struct { + + // allocated credit + AllocatedCredit *V1DeveloperCredit `json:"allocatedCredit,omitempty"` + + // used credit + UsedCredit *V1DeveloperCredit `json:"usedCredit,omitempty"` +} + +// Validate validates this v1 cluster groups developer credit usage +func (m *V1ClusterGroupsDeveloperCreditUsage) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateAllocatedCredit(formats); err != nil { + res = append(res, err) + } + + if err := m.validateUsedCredit(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ClusterGroupsDeveloperCreditUsage) validateAllocatedCredit(formats strfmt.Registry) error { + + if swag.IsZero(m.AllocatedCredit) { // not required + return nil + } + + if m.AllocatedCredit != nil { + if err := m.AllocatedCredit.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("allocatedCredit") + } + return err + } + } + + return nil +} + +func (m *V1ClusterGroupsDeveloperCreditUsage) validateUsedCredit(formats strfmt.Registry) error { + + if swag.IsZero(m.UsedCredit) { // not required + return nil + } + + if m.UsedCredit != nil { + if err := m.UsedCredit.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("usedCredit") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ClusterGroupsDeveloperCreditUsage) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ClusterGroupsDeveloperCreditUsage) UnmarshalBinary(b []byte) error { + var res V1ClusterGroupsDeveloperCreditUsage + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cluster_groups_host_cluster_metadata.go b/api/models/v1_cluster_groups_host_cluster_metadata.go new file mode 100644 index 00000000..011e710b --- /dev/null +++ b/api/models/v1_cluster_groups_host_cluster_metadata.go @@ -0,0 +1,87 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1ClusterGroupsHostClusterMetadata v1 cluster groups host cluster metadata +// +// swagger:model v1ClusterGroupsHostClusterMetadata +type V1ClusterGroupsHostClusterMetadata struct { + + // items + // Required: true + // Unique: true + Items []*V1ObjectScopeEntity `json:"items"` +} + +// Validate validates this v1 cluster groups host cluster metadata +func (m *V1ClusterGroupsHostClusterMetadata) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateItems(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ClusterGroupsHostClusterMetadata) validateItems(formats strfmt.Registry) error { + + if err := validate.Required("items", "body", m.Items); err != nil { + return err + } + + if err := validate.UniqueItems("items", "body", m.Items); err != nil { + return err + } + + for i := 0; i < len(m.Items); i++ { + if swag.IsZero(m.Items[i]) { // not required + continue + } + + if m.Items[i] != nil { + if err := m.Items[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("items" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ClusterGroupsHostClusterMetadata) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ClusterGroupsHostClusterMetadata) UnmarshalBinary(b []byte) error { + var res V1ClusterGroupsHostClusterMetadata + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cluster_groups_host_cluster_summary.go b/api/models/v1_cluster_groups_host_cluster_summary.go new file mode 100644 index 00000000..d3ce0f58 --- /dev/null +++ b/api/models/v1_cluster_groups_host_cluster_summary.go @@ -0,0 +1,87 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1ClusterGroupsHostClusterSummary v1 cluster groups host cluster summary +// +// swagger:model v1ClusterGroupsHostClusterSummary +type V1ClusterGroupsHostClusterSummary struct { + + // summaries + // Required: true + // Unique: true + Summaries []*V1ClusterGroupSummary `json:"summaries"` +} + +// Validate validates this v1 cluster groups host cluster summary +func (m *V1ClusterGroupsHostClusterSummary) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateSummaries(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ClusterGroupsHostClusterSummary) validateSummaries(formats strfmt.Registry) error { + + if err := validate.Required("summaries", "body", m.Summaries); err != nil { + return err + } + + if err := validate.UniqueItems("summaries", "body", m.Summaries); err != nil { + return err + } + + for i := 0; i < len(m.Summaries); i++ { + if swag.IsZero(m.Summaries[i]) { // not required + continue + } + + if m.Summaries[i] != nil { + if err := m.Summaries[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("summaries" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ClusterGroupsHostClusterSummary) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ClusterGroupsHostClusterSummary) UnmarshalBinary(b []byte) error { + var res V1ClusterGroupsHostClusterSummary + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cluster_helm_chart.go b/api/models/v1_cluster_helm_chart.go new file mode 100644 index 00000000..93694e4b --- /dev/null +++ b/api/models/v1_cluster_helm_chart.go @@ -0,0 +1,98 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1ClusterHelmChart Cluster helm chart metadata +// +// swagger:model v1ClusterHelmChart +type V1ClusterHelmChart struct { + + // local name + LocalName string `json:"localName,omitempty"` + + // matched registries + // Unique: true + MatchedRegistries []*V1ClusterHelmRegistry `json:"matchedRegistries"` + + // name + Name string `json:"name,omitempty"` + + // values + Values string `json:"values,omitempty"` + + // version + Version string `json:"version,omitempty"` +} + +// Validate validates this v1 cluster helm chart +func (m *V1ClusterHelmChart) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMatchedRegistries(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ClusterHelmChart) validateMatchedRegistries(formats strfmt.Registry) error { + + if swag.IsZero(m.MatchedRegistries) { // not required + return nil + } + + if err := validate.UniqueItems("matchedRegistries", "body", m.MatchedRegistries); err != nil { + return err + } + + for i := 0; i < len(m.MatchedRegistries); i++ { + if swag.IsZero(m.MatchedRegistries[i]) { // not required + continue + } + + if m.MatchedRegistries[i] != nil { + if err := m.MatchedRegistries[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("matchedRegistries" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ClusterHelmChart) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ClusterHelmChart) UnmarshalBinary(b []byte) error { + var res V1ClusterHelmChart + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cluster_helm_charts.go b/api/models/v1_cluster_helm_charts.go new file mode 100644 index 00000000..51f80a9a --- /dev/null +++ b/api/models/v1_cluster_helm_charts.go @@ -0,0 +1,86 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1ClusterHelmCharts Cluster helm charts metadata +// +// swagger:model v1ClusterHelmCharts +type V1ClusterHelmCharts struct { + + // charts + // Unique: true + Charts []*V1ClusterHelmChart `json:"charts"` +} + +// Validate validates this v1 cluster helm charts +func (m *V1ClusterHelmCharts) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateCharts(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ClusterHelmCharts) validateCharts(formats strfmt.Registry) error { + + if swag.IsZero(m.Charts) { // not required + return nil + } + + if err := validate.UniqueItems("charts", "body", m.Charts); err != nil { + return err + } + + for i := 0; i < len(m.Charts); i++ { + if swag.IsZero(m.Charts[i]) { // not required + continue + } + + if m.Charts[i] != nil { + if err := m.Charts[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("charts" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ClusterHelmCharts) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ClusterHelmCharts) UnmarshalBinary(b []byte) error { + var res V1ClusterHelmCharts + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cluster_helm_registry.go b/api/models/v1_cluster_helm_registry.go new file mode 100644 index 00000000..c5bb45a0 --- /dev/null +++ b/api/models/v1_cluster_helm_registry.go @@ -0,0 +1,46 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ClusterHelmRegistry Cluster helm registry information +// +// swagger:model v1ClusterHelmRegistry +type V1ClusterHelmRegistry struct { + + // name + Name string `json:"name,omitempty"` + + // uid + UID string `json:"uid,omitempty"` +} + +// Validate validates this v1 cluster helm registry +func (m *V1ClusterHelmRegistry) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1ClusterHelmRegistry) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ClusterHelmRegistry) UnmarshalBinary(b []byte) error { + var res V1ClusterHelmRegistry + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cluster_import.go b/api/models/v1_cluster_import.go new file mode 100644 index 00000000..463301e5 --- /dev/null +++ b/api/models/v1_cluster_import.go @@ -0,0 +1,49 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ClusterImport v1 cluster import +// +// swagger:model v1ClusterImport +type V1ClusterImport struct { + + // import link to download and install ally-lite, palette-lite + ImportLink string `json:"importLink,omitempty"` + + // Deprecated. Use the 'spec.clusterType' + IsBrownfield bool `json:"isBrownfield"` + + // cluster import status + State string `json:"state,omitempty"` +} + +// Validate validates this v1 cluster import +func (m *V1ClusterImport) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1ClusterImport) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ClusterImport) UnmarshalBinary(b []byte) error { + var res V1ClusterImport + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cluster_kube_bench_log_status.go b/api/models/v1_cluster_kube_bench_log_status.go new file mode 100644 index 00000000..56e76df1 --- /dev/null +++ b/api/models/v1_cluster_kube_bench_log_status.go @@ -0,0 +1,135 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1ClusterKubeBenchLogStatus Cluster compliance scan KubeBench Log Status +// +// swagger:model v1ClusterKubeBenchLogStatus +type V1ClusterKubeBenchLogStatus struct { + + // actor + Actor *V1ClusterFeatureActor `json:"actor,omitempty"` + + // message + Message string `json:"message,omitempty"` + + // reports + Reports map[string]V1KubeBenchReport `json:"reports,omitempty"` + + // request Uid + RequestUID string `json:"requestUid,omitempty"` + + // scan time + ScanTime *V1ClusterScanTime `json:"scanTime,omitempty"` + + // state + State string `json:"state,omitempty"` +} + +// Validate validates this v1 cluster kube bench log status +func (m *V1ClusterKubeBenchLogStatus) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateActor(formats); err != nil { + res = append(res, err) + } + + if err := m.validateReports(formats); err != nil { + res = append(res, err) + } + + if err := m.validateScanTime(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ClusterKubeBenchLogStatus) validateActor(formats strfmt.Registry) error { + + if swag.IsZero(m.Actor) { // not required + return nil + } + + if m.Actor != nil { + if err := m.Actor.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("actor") + } + return err + } + } + + return nil +} + +func (m *V1ClusterKubeBenchLogStatus) validateReports(formats strfmt.Registry) error { + + if swag.IsZero(m.Reports) { // not required + return nil + } + + for k := range m.Reports { + + if err := validate.Required("reports"+"."+k, "body", m.Reports[k]); err != nil { + return err + } + if val, ok := m.Reports[k]; ok { + if err := val.Validate(formats); err != nil { + return err + } + } + + } + + return nil +} + +func (m *V1ClusterKubeBenchLogStatus) validateScanTime(formats strfmt.Registry) error { + + if swag.IsZero(m.ScanTime) { // not required + return nil + } + + if m.ScanTime != nil { + if err := m.ScanTime.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("scanTime") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ClusterKubeBenchLogStatus) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ClusterKubeBenchLogStatus) UnmarshalBinary(b []byte) error { + var res V1ClusterKubeBenchLogStatus + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cluster_kube_hunter_log_status.go b/api/models/v1_cluster_kube_hunter_log_status.go new file mode 100644 index 00000000..3748e89b --- /dev/null +++ b/api/models/v1_cluster_kube_hunter_log_status.go @@ -0,0 +1,135 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1ClusterKubeHunterLogStatus Cluster compliance scan KubeHunter Log Status +// +// swagger:model v1ClusterKubeHunterLogStatus +type V1ClusterKubeHunterLogStatus struct { + + // actor + Actor *V1ClusterFeatureActor `json:"actor,omitempty"` + + // message + Message string `json:"message,omitempty"` + + // reports + Reports map[string]V1KubeHunterReport `json:"reports,omitempty"` + + // request Uid + RequestUID string `json:"requestUid,omitempty"` + + // scan time + ScanTime *V1ClusterScanTime `json:"scanTime,omitempty"` + + // state + State string `json:"state,omitempty"` +} + +// Validate validates this v1 cluster kube hunter log status +func (m *V1ClusterKubeHunterLogStatus) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateActor(formats); err != nil { + res = append(res, err) + } + + if err := m.validateReports(formats); err != nil { + res = append(res, err) + } + + if err := m.validateScanTime(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ClusterKubeHunterLogStatus) validateActor(formats strfmt.Registry) error { + + if swag.IsZero(m.Actor) { // not required + return nil + } + + if m.Actor != nil { + if err := m.Actor.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("actor") + } + return err + } + } + + return nil +} + +func (m *V1ClusterKubeHunterLogStatus) validateReports(formats strfmt.Registry) error { + + if swag.IsZero(m.Reports) { // not required + return nil + } + + for k := range m.Reports { + + if err := validate.Required("reports"+"."+k, "body", m.Reports[k]); err != nil { + return err + } + if val, ok := m.Reports[k]; ok { + if err := val.Validate(formats); err != nil { + return err + } + } + + } + + return nil +} + +func (m *V1ClusterKubeHunterLogStatus) validateScanTime(formats strfmt.Registry) error { + + if swag.IsZero(m.ScanTime) { // not required + return nil + } + + if m.ScanTime != nil { + if err := m.ScanTime.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("scanTime") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ClusterKubeHunterLogStatus) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ClusterKubeHunterLogStatus) UnmarshalBinary(b []byte) error { + var res V1ClusterKubeHunterLogStatus + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cluster_kubernetes_distro_type.go b/api/models/v1_cluster_kubernetes_distro_type.go new file mode 100644 index 00000000..6fd48b82 --- /dev/null +++ b/api/models/v1_cluster_kubernetes_distro_type.go @@ -0,0 +1,63 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "encoding/json" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" +) + +// V1ClusterKubernetesDistroType v1 cluster kubernetes distro type +// +// swagger:model v1ClusterKubernetesDistroType +type V1ClusterKubernetesDistroType string + +const ( + + // V1ClusterKubernetesDistroTypeK3s captures enum value "k3s" + V1ClusterKubernetesDistroTypeK3s V1ClusterKubernetesDistroType = "k3s" + + // V1ClusterKubernetesDistroTypeCncfK8s captures enum value "cncf_k8s" + V1ClusterKubernetesDistroTypeCncfK8s V1ClusterKubernetesDistroType = "cncf_k8s" +) + +// for schema +var v1ClusterKubernetesDistroTypeEnum []interface{} + +func init() { + var res []V1ClusterKubernetesDistroType + if err := json.Unmarshal([]byte(`["k3s","cncf_k8s"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + v1ClusterKubernetesDistroTypeEnum = append(v1ClusterKubernetesDistroTypeEnum, v) + } +} + +func (m V1ClusterKubernetesDistroType) validateV1ClusterKubernetesDistroTypeEnum(path, location string, value V1ClusterKubernetesDistroType) error { + if err := validate.EnumCase(path, location, value, v1ClusterKubernetesDistroTypeEnum, true); err != nil { + return err + } + return nil +} + +// Validate validates this v1 cluster kubernetes distro type +func (m V1ClusterKubernetesDistroType) Validate(formats strfmt.Registry) error { + var res []error + + // value enum + if err := m.validateV1ClusterKubernetesDistroTypeEnum("", "body", m); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/models/v1_cluster_location.go b/api/models/v1_cluster_location.go new file mode 100644 index 00000000..08888989 --- /dev/null +++ b/api/models/v1_cluster_location.go @@ -0,0 +1,83 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ClusterLocation Cluster location information +// +// swagger:model v1ClusterLocation +type V1ClusterLocation struct { + + // country code for cluster location + CountryCode string `json:"countryCode,omitempty"` + + // country name for cluster location + CountryName string `json:"countryName,omitempty"` + + // geo loc + GeoLoc *V1GeolocationLatlong `json:"geoLoc,omitempty"` + + // region code for cluster location + RegionCode string `json:"regionCode,omitempty"` + + // region name for cluster location + RegionName string `json:"regionName,omitempty"` +} + +// Validate validates this v1 cluster location +func (m *V1ClusterLocation) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateGeoLoc(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ClusterLocation) validateGeoLoc(formats strfmt.Registry) error { + + if swag.IsZero(m.GeoLoc) { // not required + return nil + } + + if m.GeoLoc != nil { + if err := m.GeoLoc.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("geoLoc") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ClusterLocation) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ClusterLocation) UnmarshalBinary(b []byte) error { + var res V1ClusterLocation + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cluster_log_fetcher.go b/api/models/v1_cluster_log_fetcher.go new file mode 100644 index 00000000..9a9f1b85 --- /dev/null +++ b/api/models/v1_cluster_log_fetcher.go @@ -0,0 +1,121 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ClusterLogFetcher Cluster Log Fetcher +// +// swagger:model v1ClusterLogFetcher +type V1ClusterLogFetcher struct { + + // metadata + Metadata *V1ObjectMeta `json:"metadata,omitempty"` + + // spec + Spec *V1ClusterLogFetcherSpec `json:"spec,omitempty"` + + // status + Status *V1ClusterLogFetcherStatus `json:"status,omitempty"` +} + +// Validate validates this v1 cluster log fetcher +func (m *V1ClusterLogFetcher) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSpec(formats); err != nil { + res = append(res, err) + } + + if err := m.validateStatus(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ClusterLogFetcher) validateMetadata(formats strfmt.Registry) error { + + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } + return err + } + } + + return nil +} + +func (m *V1ClusterLogFetcher) validateSpec(formats strfmt.Registry) error { + + if swag.IsZero(m.Spec) { // not required + return nil + } + + if m.Spec != nil { + if err := m.Spec.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec") + } + return err + } + } + + return nil +} + +func (m *V1ClusterLogFetcher) validateStatus(formats strfmt.Registry) error { + + if swag.IsZero(m.Status) { // not required + return nil + } + + if m.Status != nil { + if err := m.Status.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("status") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ClusterLogFetcher) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ClusterLogFetcher) UnmarshalBinary(b []byte) error { + var res V1ClusterLogFetcher + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cluster_log_fetcher_k8s_request.go b/api/models/v1_cluster_log_fetcher_k8s_request.go new file mode 100644 index 00000000..06280eb5 --- /dev/null +++ b/api/models/v1_cluster_log_fetcher_k8s_request.go @@ -0,0 +1,89 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1ClusterLogFetcherK8sRequest Cluster Log Fetcher K8s +// +// swagger:model v1ClusterLogFetcherK8sRequest +type V1ClusterLogFetcherK8sRequest struct { + + // label selector + // Unique: true + LabelSelector []string `json:"labelSelector"` + + // namespaces + // Unique: true + Namespaces []string `json:"namespaces"` +} + +// Validate validates this v1 cluster log fetcher k8s request +func (m *V1ClusterLogFetcherK8sRequest) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateLabelSelector(formats); err != nil { + res = append(res, err) + } + + if err := m.validateNamespaces(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ClusterLogFetcherK8sRequest) validateLabelSelector(formats strfmt.Registry) error { + + if swag.IsZero(m.LabelSelector) { // not required + return nil + } + + if err := validate.UniqueItems("labelSelector", "body", m.LabelSelector); err != nil { + return err + } + + return nil +} + +func (m *V1ClusterLogFetcherK8sRequest) validateNamespaces(formats strfmt.Registry) error { + + if swag.IsZero(m.Namespaces) { // not required + return nil + } + + if err := validate.UniqueItems("namespaces", "body", m.Namespaces); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ClusterLogFetcherK8sRequest) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ClusterLogFetcherK8sRequest) UnmarshalBinary(b []byte) error { + var res V1ClusterLogFetcherK8sRequest + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cluster_log_fetcher_node_request.go b/api/models/v1_cluster_log_fetcher_node_request.go new file mode 100644 index 00000000..26d956d3 --- /dev/null +++ b/api/models/v1_cluster_log_fetcher_node_request.go @@ -0,0 +1,68 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1ClusterLogFetcherNodeRequest Cluster Log Fetcher Node Request +// +// swagger:model v1ClusterLogFetcherNodeRequest +type V1ClusterLogFetcherNodeRequest struct { + + // Array of logs + // Unique: true + Logs []string `json:"logs"` +} + +// Validate validates this v1 cluster log fetcher node request +func (m *V1ClusterLogFetcherNodeRequest) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateLogs(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ClusterLogFetcherNodeRequest) validateLogs(formats strfmt.Registry) error { + + if swag.IsZero(m.Logs) { // not required + return nil + } + + if err := validate.UniqueItems("logs", "body", m.Logs); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ClusterLogFetcherNodeRequest) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ClusterLogFetcherNodeRequest) UnmarshalBinary(b []byte) error { + var res V1ClusterLogFetcherNodeRequest + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cluster_log_fetcher_request.go b/api/models/v1_cluster_log_fetcher_request.go new file mode 100644 index 00000000..2662cbb8 --- /dev/null +++ b/api/models/v1_cluster_log_fetcher_request.go @@ -0,0 +1,156 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "encoding/json" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1ClusterLogFetcherRequest Cluster Log Fetcher Request +// +// swagger:model v1ClusterLogFetcherRequest +type V1ClusterLogFetcherRequest struct { + + // Duration for which log is requested + Duration *int64 `json:"duration,omitempty"` + + // k8s + K8s *V1ClusterLogFetcherK8sRequest `json:"k8s,omitempty"` + + // Accepted Values - ["cluster", "app"]. if "app" then logs will be fetched from the virtual cluster + // Enum: [cluster app] + Mode *string `json:"mode,omitempty"` + + // No of lines of logs requested + NoOfLines *int64 `json:"noOfLines,omitempty"` + + // node + Node *V1ClusterLogFetcherNodeRequest `json:"node,omitempty"` +} + +// Validate validates this v1 cluster log fetcher request +func (m *V1ClusterLogFetcherRequest) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateK8s(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMode(formats); err != nil { + res = append(res, err) + } + + if err := m.validateNode(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ClusterLogFetcherRequest) validateK8s(formats strfmt.Registry) error { + + if swag.IsZero(m.K8s) { // not required + return nil + } + + if m.K8s != nil { + if err := m.K8s.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("k8s") + } + return err + } + } + + return nil +} + +var v1ClusterLogFetcherRequestTypeModePropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["cluster","app"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + v1ClusterLogFetcherRequestTypeModePropEnum = append(v1ClusterLogFetcherRequestTypeModePropEnum, v) + } +} + +const ( + + // V1ClusterLogFetcherRequestModeCluster captures enum value "cluster" + V1ClusterLogFetcherRequestModeCluster string = "cluster" + + // V1ClusterLogFetcherRequestModeApp captures enum value "app" + V1ClusterLogFetcherRequestModeApp string = "app" +) + +// prop value enum +func (m *V1ClusterLogFetcherRequest) validateModeEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, v1ClusterLogFetcherRequestTypeModePropEnum, true); err != nil { + return err + } + return nil +} + +func (m *V1ClusterLogFetcherRequest) validateMode(formats strfmt.Registry) error { + + if swag.IsZero(m.Mode) { // not required + return nil + } + + // value enum + if err := m.validateModeEnum("mode", "body", *m.Mode); err != nil { + return err + } + + return nil +} + +func (m *V1ClusterLogFetcherRequest) validateNode(formats strfmt.Registry) error { + + if swag.IsZero(m.Node) { // not required + return nil + } + + if m.Node != nil { + if err := m.Node.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("node") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ClusterLogFetcherRequest) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ClusterLogFetcherRequest) UnmarshalBinary(b []byte) error { + var res V1ClusterLogFetcherRequest + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cluster_log_fetcher_spec.go b/api/models/v1_cluster_log_fetcher_spec.go new file mode 100644 index 00000000..b95e1538 --- /dev/null +++ b/api/models/v1_cluster_log_fetcher_spec.go @@ -0,0 +1,46 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ClusterLogFetcherSpec Cluster Log Fetcher Spec +// +// swagger:model v1ClusterLogFetcherSpec +type V1ClusterLogFetcherSpec struct { + + // cluster Uid + ClusterUID string `json:"clusterUid,omitempty"` + + // log + Log string `json:"log,omitempty"` +} + +// Validate validates this v1 cluster log fetcher spec +func (m *V1ClusterLogFetcherSpec) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1ClusterLogFetcherSpec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ClusterLogFetcherSpec) UnmarshalBinary(b []byte) error { + var res V1ClusterLogFetcherSpec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cluster_log_fetcher_status.go b/api/models/v1_cluster_log_fetcher_status.go new file mode 100644 index 00000000..bd4b09d4 --- /dev/null +++ b/api/models/v1_cluster_log_fetcher_status.go @@ -0,0 +1,43 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ClusterLogFetcherStatus Cluster Log Fetcher Status +// +// swagger:model v1ClusterLogFetcherStatus +type V1ClusterLogFetcherStatus struct { + + // state + State string `json:"state,omitempty"` +} + +// Validate validates this v1 cluster log fetcher status +func (m *V1ClusterLogFetcherStatus) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1ClusterLogFetcherStatus) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ClusterLogFetcherStatus) UnmarshalBinary(b []byte) error { + var res V1ClusterLogFetcherStatus + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cluster_manifest.go b/api/models/v1_cluster_manifest.go new file mode 100644 index 00000000..32f72340 --- /dev/null +++ b/api/models/v1_cluster_manifest.go @@ -0,0 +1,52 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ClusterManifest Cluster manifest information +// +// swagger:model v1ClusterManifest +type V1ClusterManifest struct { + + // content + Content string `json:"content,omitempty"` + + // name + Name string `json:"name,omitempty"` + + // namespace + Namespace string `json:"namespace,omitempty"` + + // type + Type string `json:"type,omitempty"` +} + +// Validate validates this v1 cluster manifest +func (m *V1ClusterManifest) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1ClusterManifest) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ClusterManifest) UnmarshalBinary(b []byte) error { + var res V1ClusterManifest + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cluster_manifests.go b/api/models/v1_cluster_manifests.go new file mode 100644 index 00000000..5cdf1002 --- /dev/null +++ b/api/models/v1_cluster_manifests.go @@ -0,0 +1,86 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1ClusterManifests Cluster manifests information +// +// swagger:model v1ClusterManifests +type V1ClusterManifests struct { + + // manifests + // Unique: true + Manifests []*V1ClusterManifest `json:"manifests"` +} + +// Validate validates this v1 cluster manifests +func (m *V1ClusterManifests) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateManifests(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ClusterManifests) validateManifests(formats strfmt.Registry) error { + + if swag.IsZero(m.Manifests) { // not required + return nil + } + + if err := validate.UniqueItems("manifests", "body", m.Manifests); err != nil { + return err + } + + for i := 0; i < len(m.Manifests); i++ { + if swag.IsZero(m.Manifests[i]) { // not required + continue + } + + if m.Manifests[i] != nil { + if err := m.Manifests[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("manifests" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ClusterManifests) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ClusterManifests) UnmarshalBinary(b []byte) error { + var res V1ClusterManifests + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cluster_meta_attribute_entity.go b/api/models/v1_cluster_meta_attribute_entity.go new file mode 100644 index 00000000..f12c2c66 --- /dev/null +++ b/api/models/v1_cluster_meta_attribute_entity.go @@ -0,0 +1,43 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ClusterMetaAttributeEntity Cluster additional metadata entity +// +// swagger:model v1ClusterMetaAttributeEntity +type V1ClusterMetaAttributeEntity struct { + + // cluster meta attribute + ClusterMetaAttribute string `json:"clusterMetaAttribute,omitempty"` +} + +// Validate validates this v1 cluster meta attribute entity +func (m *V1ClusterMetaAttributeEntity) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1ClusterMetaAttributeEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ClusterMetaAttributeEntity) UnmarshalBinary(b []byte) error { + var res V1ClusterMetaAttributeEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cluster_meta_spec_location.go b/api/models/v1_cluster_meta_spec_location.go new file mode 100644 index 00000000..d6be2080 --- /dev/null +++ b/api/models/v1_cluster_meta_spec_location.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ClusterMetaSpecLocation Cluster location information +// +// swagger:model v1ClusterMetaSpecLocation +type V1ClusterMetaSpecLocation struct { + + // coordinates + Coordinates []float64 `json:"coordinates"` + + // country code + CountryCode string `json:"countryCode,omitempty"` + + // country name + CountryName string `json:"countryName,omitempty"` + + // region code + RegionCode string `json:"regionCode,omitempty"` + + // region name + RegionName string `json:"regionName,omitempty"` +} + +// Validate validates this v1 cluster meta spec location +func (m *V1ClusterMetaSpecLocation) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1ClusterMetaSpecLocation) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ClusterMetaSpecLocation) UnmarshalBinary(b []byte) error { + var res V1ClusterMetaSpecLocation + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cluster_meta_status_cost.go b/api/models/v1_cluster_meta_status_cost.go new file mode 100644 index 00000000..6c8b8247 --- /dev/null +++ b/api/models/v1_cluster_meta_status_cost.go @@ -0,0 +1,43 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ClusterMetaStatusCost Cluster meta Cost information +// +// swagger:model v1ClusterMetaStatusCost +type V1ClusterMetaStatusCost struct { + + // total + Total float64 `json:"total"` +} + +// Validate validates this v1 cluster meta status cost +func (m *V1ClusterMetaStatusCost) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1ClusterMetaStatusCost) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ClusterMetaStatusCost) UnmarshalBinary(b []byte) error { + var res V1ClusterMetaStatusCost + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cluster_meta_status_health.go b/api/models/v1_cluster_meta_status_health.go new file mode 100644 index 00000000..02ebfe01 --- /dev/null +++ b/api/models/v1_cluster_meta_status_health.go @@ -0,0 +1,46 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ClusterMetaStatusHealth Cluster meta health information +// +// swagger:model v1ClusterMetaStatusHealth +type V1ClusterMetaStatusHealth struct { + + // is heart beat failed + IsHeartBeatFailed bool `json:"isHeartBeatFailed"` + + // state + State string `json:"state,omitempty"` +} + +// Validate validates this v1 cluster meta status health +func (m *V1ClusterMetaStatusHealth) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1ClusterMetaStatusHealth) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ClusterMetaStatusHealth) UnmarshalBinary(b []byte) error { + var res V1ClusterMetaStatusHealth + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cluster_meta_status_updates.go b/api/models/v1_cluster_meta_status_updates.go new file mode 100644 index 00000000..890420c8 --- /dev/null +++ b/api/models/v1_cluster_meta_status_updates.go @@ -0,0 +1,43 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ClusterMetaStatusUpdates Cluster meta updates information +// +// swagger:model v1ClusterMetaStatusUpdates +type V1ClusterMetaStatusUpdates struct { + + // is updates pending + IsUpdatesPending bool `json:"isUpdatesPending"` +} + +// Validate validates this v1 cluster meta status updates +func (m *V1ClusterMetaStatusUpdates) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1ClusterMetaStatusUpdates) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ClusterMetaStatusUpdates) UnmarshalBinary(b []byte) error { + var res V1ClusterMetaStatusUpdates + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cluster_namespace.go b/api/models/v1_cluster_namespace.go new file mode 100644 index 00000000..04cc897b --- /dev/null +++ b/api/models/v1_cluster_namespace.go @@ -0,0 +1,46 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ClusterNamespace Cluster's namespace +// +// swagger:model v1ClusterNamespace +type V1ClusterNamespace struct { + + // namespace + Namespace string `json:"namespace,omitempty"` + + // pvc count + PvcCount int32 `json:"pvcCount,omitempty"` +} + +// Validate validates this v1 cluster namespace +func (m *V1ClusterNamespace) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1ClusterNamespace) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ClusterNamespace) UnmarshalBinary(b []byte) error { + var res V1ClusterNamespace + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cluster_namespace_resource.go b/api/models/v1_cluster_namespace_resource.go new file mode 100644 index 00000000..ce87c2f8 --- /dev/null +++ b/api/models/v1_cluster_namespace_resource.go @@ -0,0 +1,121 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ClusterNamespaceResource Cluster Namespace resource defintion +// +// swagger:model v1ClusterNamespaceResource +type V1ClusterNamespaceResource struct { + + // metadata + Metadata *V1ObjectMeta `json:"metadata,omitempty"` + + // spec + Spec *V1ClusterNamespaceSpec `json:"spec,omitempty"` + + // status + Status *V1ClusterNamespaceStatus `json:"status,omitempty"` +} + +// Validate validates this v1 cluster namespace resource +func (m *V1ClusterNamespaceResource) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSpec(formats); err != nil { + res = append(res, err) + } + + if err := m.validateStatus(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ClusterNamespaceResource) validateMetadata(formats strfmt.Registry) error { + + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } + return err + } + } + + return nil +} + +func (m *V1ClusterNamespaceResource) validateSpec(formats strfmt.Registry) error { + + if swag.IsZero(m.Spec) { // not required + return nil + } + + if m.Spec != nil { + if err := m.Spec.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec") + } + return err + } + } + + return nil +} + +func (m *V1ClusterNamespaceResource) validateStatus(formats strfmt.Registry) error { + + if swag.IsZero(m.Status) { // not required + return nil + } + + if m.Status != nil { + if err := m.Status.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("status") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ClusterNamespaceResource) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ClusterNamespaceResource) UnmarshalBinary(b []byte) error { + var res V1ClusterNamespaceResource + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cluster_namespace_resource_allocation.go b/api/models/v1_cluster_namespace_resource_allocation.go new file mode 100644 index 00000000..aca925b0 --- /dev/null +++ b/api/models/v1_cluster_namespace_resource_allocation.go @@ -0,0 +1,89 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1ClusterNamespaceResourceAllocation Cluster namespace resource allocation +// +// swagger:model v1ClusterNamespaceResourceAllocation +type V1ClusterNamespaceResourceAllocation struct { + + // cpu cores + // Minimum: > 0 + CPUCores float64 `json:"cpuCores,omitempty"` + + // memory mi b + // Minimum: > 0 + MemoryMiB float64 `json:"memoryMiB,omitempty"` +} + +// Validate validates this v1 cluster namespace resource allocation +func (m *V1ClusterNamespaceResourceAllocation) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateCPUCores(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMemoryMiB(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ClusterNamespaceResourceAllocation) validateCPUCores(formats strfmt.Registry) error { + + if swag.IsZero(m.CPUCores) { // not required + return nil + } + + if err := validate.Minimum("cpuCores", "body", float64(m.CPUCores), 0, true); err != nil { + return err + } + + return nil +} + +func (m *V1ClusterNamespaceResourceAllocation) validateMemoryMiB(formats strfmt.Registry) error { + + if swag.IsZero(m.MemoryMiB) { // not required + return nil + } + + if err := validate.Minimum("memoryMiB", "body", float64(m.MemoryMiB), 0, true); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ClusterNamespaceResourceAllocation) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ClusterNamespaceResourceAllocation) UnmarshalBinary(b []byte) error { + var res V1ClusterNamespaceResourceAllocation + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cluster_namespace_resource_input_entity.go b/api/models/v1_cluster_namespace_resource_input_entity.go new file mode 100644 index 00000000..2fa57347 --- /dev/null +++ b/api/models/v1_cluster_namespace_resource_input_entity.go @@ -0,0 +1,96 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ClusterNamespaceResourceInputEntity Cluster Namespace resource defintion +// +// swagger:model v1ClusterNamespaceResourceInputEntity +type V1ClusterNamespaceResourceInputEntity struct { + + // metadata + Metadata *V1ObjectMetaUpdateEntity `json:"metadata,omitempty"` + + // spec + Spec *V1ClusterNamespaceSpec `json:"spec,omitempty"` +} + +// Validate validates this v1 cluster namespace resource input entity +func (m *V1ClusterNamespaceResourceInputEntity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSpec(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ClusterNamespaceResourceInputEntity) validateMetadata(formats strfmt.Registry) error { + + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } + return err + } + } + + return nil +} + +func (m *V1ClusterNamespaceResourceInputEntity) validateSpec(formats strfmt.Registry) error { + + if swag.IsZero(m.Spec) { // not required + return nil + } + + if m.Spec != nil { + if err := m.Spec.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ClusterNamespaceResourceInputEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ClusterNamespaceResourceInputEntity) UnmarshalBinary(b []byte) error { + var res V1ClusterNamespaceResourceInputEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cluster_namespace_resources.go b/api/models/v1_cluster_namespace_resources.go new file mode 100644 index 00000000..99f852cb --- /dev/null +++ b/api/models/v1_cluster_namespace_resources.go @@ -0,0 +1,87 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1ClusterNamespaceResources v1 cluster namespace resources +// +// swagger:model v1ClusterNamespaceResources +type V1ClusterNamespaceResources struct { + + // items + // Required: true + // Unique: true + Items []*V1ClusterNamespaceResource `json:"items"` +} + +// Validate validates this v1 cluster namespace resources +func (m *V1ClusterNamespaceResources) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateItems(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ClusterNamespaceResources) validateItems(formats strfmt.Registry) error { + + if err := validate.Required("items", "body", m.Items); err != nil { + return err + } + + if err := validate.UniqueItems("items", "body", m.Items); err != nil { + return err + } + + for i := 0; i < len(m.Items); i++ { + if swag.IsZero(m.Items[i]) { // not required + continue + } + + if m.Items[i] != nil { + if err := m.Items[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("items" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ClusterNamespaceResources) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ClusterNamespaceResources) UnmarshalBinary(b []byte) error { + var res V1ClusterNamespaceResources + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cluster_namespace_resources_update_entity.go b/api/models/v1_cluster_namespace_resources_update_entity.go new file mode 100644 index 00000000..49af3ad8 --- /dev/null +++ b/api/models/v1_cluster_namespace_resources_update_entity.go @@ -0,0 +1,86 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1ClusterNamespaceResourcesUpdateEntity v1 cluster namespace resources update entity +// +// swagger:model v1ClusterNamespaceResourcesUpdateEntity +type V1ClusterNamespaceResourcesUpdateEntity struct { + + // namespaces + // Unique: true + Namespaces []*V1ClusterNamespaceResourceInputEntity `json:"namespaces"` +} + +// Validate validates this v1 cluster namespace resources update entity +func (m *V1ClusterNamespaceResourcesUpdateEntity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateNamespaces(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ClusterNamespaceResourcesUpdateEntity) validateNamespaces(formats strfmt.Registry) error { + + if swag.IsZero(m.Namespaces) { // not required + return nil + } + + if err := validate.UniqueItems("namespaces", "body", m.Namespaces); err != nil { + return err + } + + for i := 0; i < len(m.Namespaces); i++ { + if swag.IsZero(m.Namespaces[i]) { // not required + continue + } + + if m.Namespaces[i] != nil { + if err := m.Namespaces[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("namespaces" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ClusterNamespaceResourcesUpdateEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ClusterNamespaceResourcesUpdateEntity) UnmarshalBinary(b []byte) error { + var res V1ClusterNamespaceResourcesUpdateEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cluster_namespace_spec.go b/api/models/v1_cluster_namespace_spec.go new file mode 100644 index 00000000..df87041a --- /dev/null +++ b/api/models/v1_cluster_namespace_spec.go @@ -0,0 +1,99 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ClusterNamespaceSpec Cluster namespace spec +// +// swagger:model v1ClusterNamespaceSpec +type V1ClusterNamespaceSpec struct { + + // is regex + IsRegex bool `json:"isRegex"` + + // related object + RelatedObject *V1RelatedObject `json:"relatedObject,omitempty"` + + // resource allocation + ResourceAllocation *V1ClusterNamespaceResourceAllocation `json:"resourceAllocation,omitempty"` +} + +// Validate validates this v1 cluster namespace spec +func (m *V1ClusterNamespaceSpec) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateRelatedObject(formats); err != nil { + res = append(res, err) + } + + if err := m.validateResourceAllocation(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ClusterNamespaceSpec) validateRelatedObject(formats strfmt.Registry) error { + + if swag.IsZero(m.RelatedObject) { // not required + return nil + } + + if m.RelatedObject != nil { + if err := m.RelatedObject.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("relatedObject") + } + return err + } + } + + return nil +} + +func (m *V1ClusterNamespaceSpec) validateResourceAllocation(formats strfmt.Registry) error { + + if swag.IsZero(m.ResourceAllocation) { // not required + return nil + } + + if m.ResourceAllocation != nil { + if err := m.ResourceAllocation.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("resourceAllocation") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ClusterNamespaceSpec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ClusterNamespaceSpec) UnmarshalBinary(b []byte) error { + var res V1ClusterNamespaceSpec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cluster_namespace_status.go b/api/models/v1_cluster_namespace_status.go new file mode 100644 index 00000000..4cfde3c0 --- /dev/null +++ b/api/models/v1_cluster_namespace_status.go @@ -0,0 +1,86 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1ClusterNamespaceStatus Cluster namespace status +// +// swagger:model v1ClusterNamespaceStatus +type V1ClusterNamespaceStatus struct { + + // errors + // Unique: true + Errors []*V1ClusterResourceError `json:"errors"` +} + +// Validate validates this v1 cluster namespace status +func (m *V1ClusterNamespaceStatus) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateErrors(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ClusterNamespaceStatus) validateErrors(formats strfmt.Registry) error { + + if swag.IsZero(m.Errors) { // not required + return nil + } + + if err := validate.UniqueItems("errors", "body", m.Errors); err != nil { + return err + } + + for i := 0; i < len(m.Errors); i++ { + if swag.IsZero(m.Errors[i]) { // not required + continue + } + + if m.Errors[i] != nil { + if err := m.Errors[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("errors" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ClusterNamespaceStatus) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ClusterNamespaceStatus) UnmarshalBinary(b []byte) error { + var res V1ClusterNamespaceStatus + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cluster_namespaces.go b/api/models/v1_cluster_namespaces.go new file mode 100644 index 00000000..970d75e2 --- /dev/null +++ b/api/models/v1_cluster_namespaces.go @@ -0,0 +1,80 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ClusterNamespaces Cluster's available namespaces +// +// swagger:model v1ClusterNamespaces +type V1ClusterNamespaces struct { + + // namespaces + Namespaces []*V1ClusterNamespace `json:"namespaces"` +} + +// Validate validates this v1 cluster namespaces +func (m *V1ClusterNamespaces) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateNamespaces(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ClusterNamespaces) validateNamespaces(formats strfmt.Registry) error { + + if swag.IsZero(m.Namespaces) { // not required + return nil + } + + for i := 0; i < len(m.Namespaces); i++ { + if swag.IsZero(m.Namespaces[i]) { // not required + continue + } + + if m.Namespaces[i] != nil { + if err := m.Namespaces[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("namespaces" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ClusterNamespaces) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ClusterNamespaces) UnmarshalBinary(b []byte) error { + var res V1ClusterNamespaces + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cluster_notification_status.go b/api/models/v1_cluster_notification_status.go new file mode 100644 index 00000000..54c98778 --- /dev/null +++ b/api/models/v1_cluster_notification_status.go @@ -0,0 +1,43 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ClusterNotificationStatus Cluster notifications status +// +// swagger:model v1ClusterNotificationStatus +type V1ClusterNotificationStatus struct { + + // is available + IsAvailable bool `json:"isAvailable"` +} + +// Validate validates this v1 cluster notification status +func (m *V1ClusterNotificationStatus) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1ClusterNotificationStatus) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ClusterNotificationStatus) UnmarshalBinary(b []byte) error { + var res V1ClusterNotificationStatus + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cluster_notification_update_entity.go b/api/models/v1_cluster_notification_update_entity.go new file mode 100644 index 00000000..96f50a53 --- /dev/null +++ b/api/models/v1_cluster_notification_update_entity.go @@ -0,0 +1,111 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1ClusterNotificationUpdateEntity Cluster input for notification update +// +// swagger:model v1ClusterNotificationUpdateEntity +type V1ClusterNotificationUpdateEntity struct { + + // profiles + // Unique: true + Profiles []*V1ClusterProfileNotificationUpdateEntity `json:"profiles"` + + // spc apply settings + SpcApplySettings *V1SpcApplySettings `json:"spcApplySettings,omitempty"` +} + +// Validate validates this v1 cluster notification update entity +func (m *V1ClusterNotificationUpdateEntity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateProfiles(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSpcApplySettings(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ClusterNotificationUpdateEntity) validateProfiles(formats strfmt.Registry) error { + + if swag.IsZero(m.Profiles) { // not required + return nil + } + + if err := validate.UniqueItems("profiles", "body", m.Profiles); err != nil { + return err + } + + for i := 0; i < len(m.Profiles); i++ { + if swag.IsZero(m.Profiles[i]) { // not required + continue + } + + if m.Profiles[i] != nil { + if err := m.Profiles[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("profiles" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1ClusterNotificationUpdateEntity) validateSpcApplySettings(formats strfmt.Registry) error { + + if swag.IsZero(m.SpcApplySettings) { // not required + return nil + } + + if m.SpcApplySettings != nil { + if err := m.SpcApplySettings.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spcApplySettings") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ClusterNotificationUpdateEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ClusterNotificationUpdateEntity) UnmarshalBinary(b []byte) error { + var res V1ClusterNotificationUpdateEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cluster_pack_manifest_status.go b/api/models/v1_cluster_pack_manifest_status.go new file mode 100644 index 00000000..4040e05f --- /dev/null +++ b/api/models/v1_cluster_pack_manifest_status.go @@ -0,0 +1,77 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ClusterPackManifestStatus v1 cluster pack manifest status +// +// swagger:model v1ClusterPackManifestStatus +type V1ClusterPackManifestStatus struct { + + // condition + Condition *V1ClusterCondition `json:"condition,omitempty"` + + // name + Name string `json:"name,omitempty"` + + // uid + UID string `json:"uid,omitempty"` +} + +// Validate validates this v1 cluster pack manifest status +func (m *V1ClusterPackManifestStatus) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateCondition(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ClusterPackManifestStatus) validateCondition(formats strfmt.Registry) error { + + if swag.IsZero(m.Condition) { // not required + return nil + } + + if m.Condition != nil { + if err := m.Condition.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("condition") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ClusterPackManifestStatus) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ClusterPackManifestStatus) UnmarshalBinary(b []byte) error { + var res V1ClusterPackManifestStatus + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cluster_pack_status.go b/api/models/v1_cluster_pack_status.go new file mode 100644 index 00000000..d1373cf5 --- /dev/null +++ b/api/models/v1_cluster_pack_status.go @@ -0,0 +1,197 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ClusterPackStatus v1 cluster pack status +// +// swagger:model v1ClusterPackStatus +type V1ClusterPackStatus struct { + + // condition + Condition *V1ClusterCondition `json:"condition,omitempty"` + + // end time + // Format: date-time + EndTime V1Time `json:"endTime,omitempty"` + + // manifests + Manifests []*V1ClusterPackManifestStatus `json:"manifests"` + + // name + Name string `json:"name,omitempty"` + + // profile Uid + ProfileUID string `json:"profileUid,omitempty"` + + // services + Services []*V1LoadBalancerService `json:"services"` + + // start time + // Format: date-time + StartTime V1Time `json:"startTime,omitempty"` + + // type + Type string `json:"type,omitempty"` + + // version + Version string `json:"version,omitempty"` +} + +// Validate validates this v1 cluster pack status +func (m *V1ClusterPackStatus) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateCondition(formats); err != nil { + res = append(res, err) + } + + if err := m.validateEndTime(formats); err != nil { + res = append(res, err) + } + + if err := m.validateManifests(formats); err != nil { + res = append(res, err) + } + + if err := m.validateServices(formats); err != nil { + res = append(res, err) + } + + if err := m.validateStartTime(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ClusterPackStatus) validateCondition(formats strfmt.Registry) error { + + if swag.IsZero(m.Condition) { // not required + return nil + } + + if m.Condition != nil { + if err := m.Condition.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("condition") + } + return err + } + } + + return nil +} + +func (m *V1ClusterPackStatus) validateEndTime(formats strfmt.Registry) error { + + if swag.IsZero(m.EndTime) { // not required + return nil + } + + if err := m.EndTime.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("endTime") + } + return err + } + + return nil +} + +func (m *V1ClusterPackStatus) validateManifests(formats strfmt.Registry) error { + + if swag.IsZero(m.Manifests) { // not required + return nil + } + + for i := 0; i < len(m.Manifests); i++ { + if swag.IsZero(m.Manifests[i]) { // not required + continue + } + + if m.Manifests[i] != nil { + if err := m.Manifests[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("manifests" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1ClusterPackStatus) validateServices(formats strfmt.Registry) error { + + if swag.IsZero(m.Services) { // not required + return nil + } + + for i := 0; i < len(m.Services); i++ { + if swag.IsZero(m.Services[i]) { // not required + continue + } + + if m.Services[i] != nil { + if err := m.Services[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("services" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1ClusterPackStatus) validateStartTime(formats strfmt.Registry) error { + + if swag.IsZero(m.StartTime) { // not required + return nil + } + + if err := m.StartTime.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("startTime") + } + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ClusterPackStatus) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ClusterPackStatus) UnmarshalBinary(b []byte) error { + var res V1ClusterPackStatus + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cluster_profile.go b/api/models/v1_cluster_profile.go new file mode 100644 index 00000000..0f82d9de --- /dev/null +++ b/api/models/v1_cluster_profile.go @@ -0,0 +1,127 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ClusterProfile ClusterProfile is the Schema for the clusterprofiles API +// +// swagger:model v1ClusterProfile +type V1ClusterProfile struct { + + // APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + APIVersion string `json:"apiVersion,omitempty"` + + // Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + Kind string `json:"kind,omitempty"` + + // metadata + Metadata *V1ObjectMeta `json:"metadata,omitempty"` + + // spec + Spec *V1ClusterProfileSpec `json:"spec,omitempty"` + + // status + Status *V1ClusterProfileStatus `json:"status,omitempty"` +} + +// Validate validates this v1 cluster profile +func (m *V1ClusterProfile) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSpec(formats); err != nil { + res = append(res, err) + } + + if err := m.validateStatus(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ClusterProfile) validateMetadata(formats strfmt.Registry) error { + + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } + return err + } + } + + return nil +} + +func (m *V1ClusterProfile) validateSpec(formats strfmt.Registry) error { + + if swag.IsZero(m.Spec) { // not required + return nil + } + + if m.Spec != nil { + if err := m.Spec.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec") + } + return err + } + } + + return nil +} + +func (m *V1ClusterProfile) validateStatus(formats strfmt.Registry) error { + + if swag.IsZero(m.Status) { // not required + return nil + } + + if m.Status != nil { + if err := m.Status.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("status") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ClusterProfile) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ClusterProfile) UnmarshalBinary(b []byte) error { + var res V1ClusterProfile + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cluster_profile_clone_entity.go b/api/models/v1_cluster_profile_clone_entity.go new file mode 100644 index 00000000..6face090 --- /dev/null +++ b/api/models/v1_cluster_profile_clone_entity.go @@ -0,0 +1,71 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ClusterProfileCloneEntity Cluster profile clone request payload +// +// swagger:model v1ClusterProfileCloneEntity +type V1ClusterProfileCloneEntity struct { + + // metadata + Metadata *V1ClusterProfileCloneMetaInputEntity `json:"metadata,omitempty"` +} + +// Validate validates this v1 cluster profile clone entity +func (m *V1ClusterProfileCloneEntity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ClusterProfileCloneEntity) validateMetadata(formats strfmt.Registry) error { + + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ClusterProfileCloneEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ClusterProfileCloneEntity) UnmarshalBinary(b []byte) error { + var res V1ClusterProfileCloneEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cluster_profile_clone_meta_input_entity.go b/api/models/v1_cluster_profile_clone_meta_input_entity.go new file mode 100644 index 00000000..dbc0b61d --- /dev/null +++ b/api/models/v1_cluster_profile_clone_meta_input_entity.go @@ -0,0 +1,92 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1ClusterProfileCloneMetaInputEntity Cluster profile clone metadata +// +// swagger:model v1ClusterProfileCloneMetaInputEntity +type V1ClusterProfileCloneMetaInputEntity struct { + + // Cloned cluster profile name + // Required: true + Name *string `json:"name"` + + // target + Target *V1ClusterProfileCloneTarget `json:"target,omitempty"` + + // Cloned cluster profile version + Version string `json:"version,omitempty"` +} + +// Validate validates this v1 cluster profile clone meta input entity +func (m *V1ClusterProfileCloneMetaInputEntity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateName(formats); err != nil { + res = append(res, err) + } + + if err := m.validateTarget(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ClusterProfileCloneMetaInputEntity) validateName(formats strfmt.Registry) error { + + if err := validate.Required("name", "body", m.Name); err != nil { + return err + } + + return nil +} + +func (m *V1ClusterProfileCloneMetaInputEntity) validateTarget(formats strfmt.Registry) error { + + if swag.IsZero(m.Target) { // not required + return nil + } + + if m.Target != nil { + if err := m.Target.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("target") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ClusterProfileCloneMetaInputEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ClusterProfileCloneMetaInputEntity) UnmarshalBinary(b []byte) error { + var res V1ClusterProfileCloneMetaInputEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cluster_profile_clone_target.go b/api/models/v1_cluster_profile_clone_target.go new file mode 100644 index 00000000..7e8ddb74 --- /dev/null +++ b/api/models/v1_cluster_profile_clone_target.go @@ -0,0 +1,69 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ClusterProfileCloneTarget Cluster profile clone meta input entity +// +// swagger:model v1ClusterProfileCloneTarget +type V1ClusterProfileCloneTarget struct { + + // Cloned cluster profile project uid + ProjectUID string `json:"projectUid,omitempty"` + + // scope + // Required: true + Scope V1Scope `json:"scope"` +} + +// Validate validates this v1 cluster profile clone target +func (m *V1ClusterProfileCloneTarget) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateScope(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ClusterProfileCloneTarget) validateScope(formats strfmt.Registry) error { + + if err := m.Scope.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("scope") + } + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ClusterProfileCloneTarget) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ClusterProfileCloneTarget) UnmarshalBinary(b []byte) error { + var res V1ClusterProfileCloneTarget + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cluster_profile_entity.go b/api/models/v1_cluster_profile_entity.go new file mode 100644 index 00000000..05f025bd --- /dev/null +++ b/api/models/v1_cluster_profile_entity.go @@ -0,0 +1,198 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1ClusterProfileEntity Cluster profile request payload +// +// swagger:model v1ClusterProfileEntity +type V1ClusterProfileEntity struct { + + // metadata + Metadata *V1ObjectMeta `json:"metadata,omitempty"` + + // spec + Spec *V1ClusterProfileEntitySpec `json:"spec,omitempty"` +} + +// Validate validates this v1 cluster profile entity +func (m *V1ClusterProfileEntity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSpec(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ClusterProfileEntity) validateMetadata(formats strfmt.Registry) error { + + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } + return err + } + } + + return nil +} + +func (m *V1ClusterProfileEntity) validateSpec(formats strfmt.Registry) error { + + if swag.IsZero(m.Spec) { // not required + return nil + } + + if m.Spec != nil { + if err := m.Spec.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ClusterProfileEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ClusterProfileEntity) UnmarshalBinary(b []byte) error { + var res V1ClusterProfileEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} + +// V1ClusterProfileEntitySpec v1 cluster profile entity spec +// +// swagger:model V1ClusterProfileEntitySpec +type V1ClusterProfileEntitySpec struct { + + // template + Template *V1ClusterProfileTemplateDraft `json:"template,omitempty"` + + // List of unique variable fields defined for a cluster profile with schema constraints + // Unique: true + Variables []*V1Variable `json:"variables"` + + // Cluster profile version + Version string `json:"version,omitempty"` +} + +// Validate validates this v1 cluster profile entity spec +func (m *V1ClusterProfileEntitySpec) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateTemplate(formats); err != nil { + res = append(res, err) + } + + if err := m.validateVariables(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ClusterProfileEntitySpec) validateTemplate(formats strfmt.Registry) error { + + if swag.IsZero(m.Template) { // not required + return nil + } + + if m.Template != nil { + if err := m.Template.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec" + "." + "template") + } + return err + } + } + + return nil +} + +func (m *V1ClusterProfileEntitySpec) validateVariables(formats strfmt.Registry) error { + + if swag.IsZero(m.Variables) { // not required + return nil + } + + if err := validate.UniqueItems("spec"+"."+"variables", "body", m.Variables); err != nil { + return err + } + + for i := 0; i < len(m.Variables); i++ { + if swag.IsZero(m.Variables[i]) { // not required + continue + } + + if m.Variables[i] != nil { + if err := m.Variables[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec" + "." + "variables" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ClusterProfileEntitySpec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ClusterProfileEntitySpec) UnmarshalBinary(b []byte) error { + var res V1ClusterProfileEntitySpec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cluster_profile_filter_spec.go b/api/models/v1_cluster_profile_filter_spec.go new file mode 100644 index 00000000..ccdbd95f --- /dev/null +++ b/api/models/v1_cluster_profile_filter_spec.go @@ -0,0 +1,223 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1ClusterProfileFilterSpec Cluster profile filter spec +// +// swagger:model v1ClusterProfileFilterSpec +type V1ClusterProfileFilterSpec struct { + + // environment + // Unique: true + Environment []string `json:"environment"` + + // fips + Fips V1ClusterFipsMode `json:"fips,omitempty"` + + // profile name + ProfileName *V1FilterString `json:"profileName,omitempty"` + + // profile type + // Unique: true + ProfileType []V1ProfileType `json:"profileType"` + + // scope + Scope V1ClusterProfileScope `json:"scope,omitempty"` + + // tags + Tags *V1FilterArray `json:"tags,omitempty"` + + // version + Version *V1FilterVersionString `json:"version,omitempty"` +} + +// Validate validates this v1 cluster profile filter spec +func (m *V1ClusterProfileFilterSpec) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateEnvironment(formats); err != nil { + res = append(res, err) + } + + if err := m.validateFips(formats); err != nil { + res = append(res, err) + } + + if err := m.validateProfileName(formats); err != nil { + res = append(res, err) + } + + if err := m.validateProfileType(formats); err != nil { + res = append(res, err) + } + + if err := m.validateScope(formats); err != nil { + res = append(res, err) + } + + if err := m.validateTags(formats); err != nil { + res = append(res, err) + } + + if err := m.validateVersion(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ClusterProfileFilterSpec) validateEnvironment(formats strfmt.Registry) error { + + if swag.IsZero(m.Environment) { // not required + return nil + } + + if err := validate.UniqueItems("environment", "body", m.Environment); err != nil { + return err + } + + return nil +} + +func (m *V1ClusterProfileFilterSpec) validateFips(formats strfmt.Registry) error { + + if swag.IsZero(m.Fips) { // not required + return nil + } + + if err := m.Fips.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("fips") + } + return err + } + + return nil +} + +func (m *V1ClusterProfileFilterSpec) validateProfileName(formats strfmt.Registry) error { + + if swag.IsZero(m.ProfileName) { // not required + return nil + } + + if m.ProfileName != nil { + if err := m.ProfileName.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("profileName") + } + return err + } + } + + return nil +} + +func (m *V1ClusterProfileFilterSpec) validateProfileType(formats strfmt.Registry) error { + + if swag.IsZero(m.ProfileType) { // not required + return nil + } + + if err := validate.UniqueItems("profileType", "body", m.ProfileType); err != nil { + return err + } + + for i := 0; i < len(m.ProfileType); i++ { + + if err := m.ProfileType[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("profileType" + "." + strconv.Itoa(i)) + } + return err + } + + } + + return nil +} + +func (m *V1ClusterProfileFilterSpec) validateScope(formats strfmt.Registry) error { + + if swag.IsZero(m.Scope) { // not required + return nil + } + + if err := m.Scope.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("scope") + } + return err + } + + return nil +} + +func (m *V1ClusterProfileFilterSpec) validateTags(formats strfmt.Registry) error { + + if swag.IsZero(m.Tags) { // not required + return nil + } + + if m.Tags != nil { + if err := m.Tags.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("tags") + } + return err + } + } + + return nil +} + +func (m *V1ClusterProfileFilterSpec) validateVersion(formats strfmt.Registry) error { + + if swag.IsZero(m.Version) { // not required + return nil + } + + if m.Version != nil { + if err := m.Version.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("version") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ClusterProfileFilterSpec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ClusterProfileFilterSpec) UnmarshalBinary(b []byte) error { + var res V1ClusterProfileFilterSpec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cluster_profile_fips.go b/api/models/v1_cluster_profile_fips.go new file mode 100644 index 00000000..dc7a41a3 --- /dev/null +++ b/api/models/v1_cluster_profile_fips.go @@ -0,0 +1,69 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ClusterProfileFips Cluster profile fips compliance status +// +// swagger:model v1ClusterProfileFips +type V1ClusterProfileFips struct { + + // mode + Mode V1ClusterFipsMode `json:"mode,omitempty"` +} + +// Validate validates this v1 cluster profile fips +func (m *V1ClusterProfileFips) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMode(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ClusterProfileFips) validateMode(formats strfmt.Registry) error { + + if swag.IsZero(m.Mode) { // not required + return nil + } + + if err := m.Mode.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("mode") + } + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ClusterProfileFips) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ClusterProfileFips) UnmarshalBinary(b []byte) error { + var res V1ClusterProfileFips + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cluster_profile_import_entity.go b/api/models/v1_cluster_profile_import_entity.go new file mode 100644 index 00000000..a476122a --- /dev/null +++ b/api/models/v1_cluster_profile_import_entity.go @@ -0,0 +1,96 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ClusterProfileImportEntity Cluster profile import request payload +// +// swagger:model v1ClusterProfileImportEntity +type V1ClusterProfileImportEntity struct { + + // metadata + Metadata *V1ClusterProfileMetadataImportEntity `json:"metadata,omitempty"` + + // spec + Spec *V1ClusterProfileSpecImportEntity `json:"spec,omitempty"` +} + +// Validate validates this v1 cluster profile import entity +func (m *V1ClusterProfileImportEntity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSpec(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ClusterProfileImportEntity) validateMetadata(formats strfmt.Registry) error { + + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } + return err + } + } + + return nil +} + +func (m *V1ClusterProfileImportEntity) validateSpec(formats strfmt.Registry) error { + + if swag.IsZero(m.Spec) { // not required + return nil + } + + if m.Spec != nil { + if err := m.Spec.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ClusterProfileImportEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ClusterProfileImportEntity) UnmarshalBinary(b []byte) error { + var res V1ClusterProfileImportEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cluster_profile_metadata.go b/api/models/v1_cluster_profile_metadata.go new file mode 100644 index 00000000..00489faa --- /dev/null +++ b/api/models/v1_cluster_profile_metadata.go @@ -0,0 +1,131 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ClusterProfileMetadata Cluster profile filter spec +// +// swagger:model v1ClusterProfileMetadata +type V1ClusterProfileMetadata struct { + + // metadata + Metadata *V1ObjectEntity `json:"metadata,omitempty"` + + // spec + Spec *V1ClusterProfileMetadataSpec `json:"spec,omitempty"` +} + +// Validate validates this v1 cluster profile metadata +func (m *V1ClusterProfileMetadata) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSpec(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ClusterProfileMetadata) validateMetadata(formats strfmt.Registry) error { + + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } + return err + } + } + + return nil +} + +func (m *V1ClusterProfileMetadata) validateSpec(formats strfmt.Registry) error { + + if swag.IsZero(m.Spec) { // not required + return nil + } + + if m.Spec != nil { + if err := m.Spec.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ClusterProfileMetadata) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ClusterProfileMetadata) UnmarshalBinary(b []byte) error { + var res V1ClusterProfileMetadata + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} + +// V1ClusterProfileMetadataSpec v1 cluster profile metadata spec +// +// swagger:model V1ClusterProfileMetadataSpec +type V1ClusterProfileMetadataSpec struct { + + // cloud type + CloudType string `json:"cloudType,omitempty"` + + // version + Version string `json:"version,omitempty"` +} + +// Validate validates this v1 cluster profile metadata spec +func (m *V1ClusterProfileMetadataSpec) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1ClusterProfileMetadataSpec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ClusterProfileMetadataSpec) UnmarshalBinary(b []byte) error { + var res V1ClusterProfileMetadataSpec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cluster_profile_metadata_import_entity.go b/api/models/v1_cluster_profile_metadata_import_entity.go new file mode 100644 index 00000000..793b9365 --- /dev/null +++ b/api/models/v1_cluster_profile_metadata_import_entity.go @@ -0,0 +1,49 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ClusterProfileMetadataImportEntity Cluster profile import metadata +// +// swagger:model v1ClusterProfileMetadataImportEntity +type V1ClusterProfileMetadataImportEntity struct { + + // Cluster profile description + Description string `json:"description,omitempty"` + + // Cluster profile labels + Labels map[string]string `json:"labels,omitempty"` + + // Cluster profile name + Name string `json:"name,omitempty"` +} + +// Validate validates this v1 cluster profile metadata import entity +func (m *V1ClusterProfileMetadataImportEntity) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1ClusterProfileMetadataImportEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ClusterProfileMetadataImportEntity) UnmarshalBinary(b []byte) error { + var res V1ClusterProfileMetadataImportEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cluster_profile_notification_update_entity.go b/api/models/v1_cluster_profile_notification_update_entity.go new file mode 100644 index 00000000..3387d130 --- /dev/null +++ b/api/models/v1_cluster_profile_notification_update_entity.go @@ -0,0 +1,89 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1ClusterProfileNotificationUpdateEntity Cluster profile notification update request payload +// +// swagger:model v1ClusterProfileNotificationUpdateEntity +type V1ClusterProfileNotificationUpdateEntity struct { + + // Cluster profile packs array + // Unique: true + Packs []*V1PackManifestUpdateEntity `json:"packs"` + + // Cluster profile uid + UID string `json:"uid,omitempty"` +} + +// Validate validates this v1 cluster profile notification update entity +func (m *V1ClusterProfileNotificationUpdateEntity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validatePacks(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ClusterProfileNotificationUpdateEntity) validatePacks(formats strfmt.Registry) error { + + if swag.IsZero(m.Packs) { // not required + return nil + } + + if err := validate.UniqueItems("packs", "body", m.Packs); err != nil { + return err + } + + for i := 0; i < len(m.Packs); i++ { + if swag.IsZero(m.Packs[i]) { // not required + continue + } + + if m.Packs[i] != nil { + if err := m.Packs[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("packs" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ClusterProfileNotificationUpdateEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ClusterProfileNotificationUpdateEntity) UnmarshalBinary(b []byte) error { + var res V1ClusterProfileNotificationUpdateEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cluster_profile_pack_config_list.go b/api/models/v1_cluster_profile_pack_config_list.go new file mode 100644 index 00000000..189f470e --- /dev/null +++ b/api/models/v1_cluster_profile_pack_config_list.go @@ -0,0 +1,87 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1ClusterProfilePackConfigList v1 cluster profile pack config list +// +// swagger:model v1ClusterProfilePackConfigList +type V1ClusterProfilePackConfigList struct { + + // Cluster profile packs array + // Required: true + // Unique: true + Items []*V1PackConfig `json:"items"` +} + +// Validate validates this v1 cluster profile pack config list +func (m *V1ClusterProfilePackConfigList) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateItems(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ClusterProfilePackConfigList) validateItems(formats strfmt.Registry) error { + + if err := validate.Required("items", "body", m.Items); err != nil { + return err + } + + if err := validate.UniqueItems("items", "body", m.Items); err != nil { + return err + } + + for i := 0; i < len(m.Items); i++ { + if swag.IsZero(m.Items[i]) { // not required + continue + } + + if m.Items[i] != nil { + if err := m.Items[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("items" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ClusterProfilePackConfigList) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ClusterProfilePackConfigList) UnmarshalBinary(b []byte) error { + var res V1ClusterProfilePackConfigList + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cluster_profile_pack_manifests.go b/api/models/v1_cluster_profile_pack_manifests.go new file mode 100644 index 00000000..0bfd09dc --- /dev/null +++ b/api/models/v1_cluster_profile_pack_manifests.go @@ -0,0 +1,99 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ClusterProfilePackManifests Cluster profile pack manifests +// +// swagger:model v1ClusterProfilePackManifests +type V1ClusterProfilePackManifests struct { + + // metadata + Metadata *V1ObjectMeta `json:"metadata,omitempty"` + + // spec + Spec *V1PackManifestsSpec `json:"spec,omitempty"` + + // status + Status V1PackSummaryStatus `json:"status,omitempty"` +} + +// Validate validates this v1 cluster profile pack manifests +func (m *V1ClusterProfilePackManifests) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSpec(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ClusterProfilePackManifests) validateMetadata(formats strfmt.Registry) error { + + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } + return err + } + } + + return nil +} + +func (m *V1ClusterProfilePackManifests) validateSpec(formats strfmt.Registry) error { + + if swag.IsZero(m.Spec) { // not required + return nil + } + + if m.Spec != nil { + if err := m.Spec.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ClusterProfilePackManifests) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ClusterProfilePackManifests) UnmarshalBinary(b []byte) error { + var res V1ClusterProfilePackManifests + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cluster_profile_pack_summary.go b/api/models/v1_cluster_profile_pack_summary.go new file mode 100644 index 00000000..7a2d4b3c --- /dev/null +++ b/api/models/v1_cluster_profile_pack_summary.go @@ -0,0 +1,49 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ClusterProfilePackSummary Cluster profile packs summary about the deprecated, disabled, deleted packs count +// +// swagger:model v1ClusterProfilePackSummary +type V1ClusterProfilePackSummary struct { + + // Total count of deleted packs in a cluster profile + Deleted float64 `json:"deleted"` + + // Total count of deprecated packs in a cluster profile + Deprecated float64 `json:"deprecated"` + + // Total count of disabled packs in a cluster profile + Disabled float64 `json:"disabled"` +} + +// Validate validates this v1 cluster profile pack summary +func (m *V1ClusterProfilePackSummary) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1ClusterProfilePackSummary) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ClusterProfilePackSummary) UnmarshalBinary(b []byte) error { + var res V1ClusterProfilePackSummary + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cluster_profile_packs_entities.go b/api/models/v1_cluster_profile_packs_entities.go new file mode 100644 index 00000000..3aea8196 --- /dev/null +++ b/api/models/v1_cluster_profile_packs_entities.go @@ -0,0 +1,87 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1ClusterProfilePacksEntities List of cluster profile packs +// +// swagger:model v1ClusterProfilePacksEntities +type V1ClusterProfilePacksEntities struct { + + // Cluster profile packs array + // Required: true + // Unique: true + Items []*V1ClusterProfilePacksEntity `json:"items"` +} + +// Validate validates this v1 cluster profile packs entities +func (m *V1ClusterProfilePacksEntities) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateItems(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ClusterProfilePacksEntities) validateItems(formats strfmt.Registry) error { + + if err := validate.Required("items", "body", m.Items); err != nil { + return err + } + + if err := validate.UniqueItems("items", "body", m.Items); err != nil { + return err + } + + for i := 0; i < len(m.Items); i++ { + if swag.IsZero(m.Items[i]) { // not required + continue + } + + if m.Items[i] != nil { + if err := m.Items[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("items" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ClusterProfilePacksEntities) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ClusterProfilePacksEntities) UnmarshalBinary(b []byte) error { + var res V1ClusterProfilePacksEntities + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cluster_profile_packs_entity.go b/api/models/v1_cluster_profile_packs_entity.go new file mode 100644 index 00000000..b12a3b13 --- /dev/null +++ b/api/models/v1_cluster_profile_packs_entity.go @@ -0,0 +1,99 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ClusterProfilePacksEntity Cluster profile packs object +// +// swagger:model v1ClusterProfilePacksEntity +type V1ClusterProfilePacksEntity struct { + + // metadata + Metadata *V1ObjectMeta `json:"metadata,omitempty"` + + // spec + Spec *V1PackSummarySpec `json:"spec,omitempty"` + + // status + Status V1PackSummaryStatus `json:"status,omitempty"` +} + +// Validate validates this v1 cluster profile packs entity +func (m *V1ClusterProfilePacksEntity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSpec(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ClusterProfilePacksEntity) validateMetadata(formats strfmt.Registry) error { + + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } + return err + } + } + + return nil +} + +func (m *V1ClusterProfilePacksEntity) validateSpec(formats strfmt.Registry) error { + + if swag.IsZero(m.Spec) { // not required + return nil + } + + if m.Spec != nil { + if err := m.Spec.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ClusterProfilePacksEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ClusterProfilePacksEntity) UnmarshalBinary(b []byte) error { + var res V1ClusterProfilePacksEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cluster_profile_packs_manifests.go b/api/models/v1_cluster_profile_packs_manifests.go new file mode 100644 index 00000000..acd67020 --- /dev/null +++ b/api/models/v1_cluster_profile_packs_manifests.go @@ -0,0 +1,170 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1ClusterProfilePacksManifests Cluster profile pack manifests +// +// swagger:model v1ClusterProfilePacksManifests +type V1ClusterProfilePacksManifests struct { + + // metadata + Metadata *V1ObjectMeta `json:"metadata,omitempty"` + + // spec + Spec *V1ClusterProfilePacksManifestsSpec `json:"spec,omitempty"` +} + +// Validate validates this v1 cluster profile packs manifests +func (m *V1ClusterProfilePacksManifests) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSpec(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ClusterProfilePacksManifests) validateMetadata(formats strfmt.Registry) error { + + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } + return err + } + } + + return nil +} + +func (m *V1ClusterProfilePacksManifests) validateSpec(formats strfmt.Registry) error { + + if swag.IsZero(m.Spec) { // not required + return nil + } + + if m.Spec != nil { + if err := m.Spec.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ClusterProfilePacksManifests) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ClusterProfilePacksManifests) UnmarshalBinary(b []byte) error { + var res V1ClusterProfilePacksManifests + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} + +// V1ClusterProfilePacksManifestsSpec v1 cluster profile packs manifests spec +// +// swagger:model V1ClusterProfilePacksManifestsSpec +type V1ClusterProfilePacksManifestsSpec struct { + + // Cluster profile packs array + // Unique: true + Packs []*V1ClusterProfilePackManifests `json:"packs"` +} + +// Validate validates this v1 cluster profile packs manifests spec +func (m *V1ClusterProfilePacksManifestsSpec) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validatePacks(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ClusterProfilePacksManifestsSpec) validatePacks(formats strfmt.Registry) error { + + if swag.IsZero(m.Packs) { // not required + return nil + } + + if err := validate.UniqueItems("spec"+"."+"packs", "body", m.Packs); err != nil { + return err + } + + for i := 0; i < len(m.Packs); i++ { + if swag.IsZero(m.Packs[i]) { // not required + continue + } + + if m.Packs[i] != nil { + if err := m.Packs[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec" + "." + "packs" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ClusterProfilePacksManifestsSpec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ClusterProfilePacksManifestsSpec) UnmarshalBinary(b []byte) error { + var res V1ClusterProfilePacksManifestsSpec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cluster_profile_scope.go b/api/models/v1_cluster_profile_scope.go new file mode 100644 index 00000000..55cd1799 --- /dev/null +++ b/api/models/v1_cluster_profile_scope.go @@ -0,0 +1,66 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "encoding/json" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" +) + +// V1ClusterProfileScope v1 cluster profile scope +// +// swagger:model v1ClusterProfileScope +type V1ClusterProfileScope string + +const ( + + // V1ClusterProfileScopeSystem captures enum value "system" + V1ClusterProfileScopeSystem V1ClusterProfileScope = "system" + + // V1ClusterProfileScopeTenant captures enum value "tenant" + V1ClusterProfileScopeTenant V1ClusterProfileScope = "tenant" + + // V1ClusterProfileScopeProject captures enum value "project" + V1ClusterProfileScopeProject V1ClusterProfileScope = "project" +) + +// for schema +var v1ClusterProfileScopeEnum []interface{} + +func init() { + var res []V1ClusterProfileScope + if err := json.Unmarshal([]byte(`["system","tenant","project"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + v1ClusterProfileScopeEnum = append(v1ClusterProfileScopeEnum, v) + } +} + +func (m V1ClusterProfileScope) validateV1ClusterProfileScopeEnum(path, location string, value V1ClusterProfileScope) error { + if err := validate.EnumCase(path, location, value, v1ClusterProfileScopeEnum, true); err != nil { + return err + } + return nil +} + +// Validate validates this v1 cluster profile scope +func (m V1ClusterProfileScope) Validate(formats strfmt.Registry) error { + var res []error + + // value enum + if err := m.validateV1ClusterProfileScopeEnum("", "body", m); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/models/v1_cluster_profile_sort_fields.go b/api/models/v1_cluster_profile_sort_fields.go new file mode 100644 index 00000000..04b143e2 --- /dev/null +++ b/api/models/v1_cluster_profile_sort_fields.go @@ -0,0 +1,72 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "encoding/json" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" +) + +// V1ClusterProfileSortFields v1 cluster profile sort fields +// +// swagger:model v1ClusterProfileSortFields +type V1ClusterProfileSortFields string + +const ( + + // V1ClusterProfileSortFieldsProfileName captures enum value "profileName" + V1ClusterProfileSortFieldsProfileName V1ClusterProfileSortFields = "profileName" + + // V1ClusterProfileSortFieldsEnvironment captures enum value "environment" + V1ClusterProfileSortFieldsEnvironment V1ClusterProfileSortFields = "environment" + + // V1ClusterProfileSortFieldsProfileType captures enum value "profileType" + V1ClusterProfileSortFieldsProfileType V1ClusterProfileSortFields = "profileType" + + // V1ClusterProfileSortFieldsCreationTimestamp captures enum value "creationTimestamp" + V1ClusterProfileSortFieldsCreationTimestamp V1ClusterProfileSortFields = "creationTimestamp" + + // V1ClusterProfileSortFieldsLastModifiedTimestamp captures enum value "lastModifiedTimestamp" + V1ClusterProfileSortFieldsLastModifiedTimestamp V1ClusterProfileSortFields = "lastModifiedTimestamp" +) + +// for schema +var v1ClusterProfileSortFieldsEnum []interface{} + +func init() { + var res []V1ClusterProfileSortFields + if err := json.Unmarshal([]byte(`["profileName","environment","profileType","creationTimestamp","lastModifiedTimestamp"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + v1ClusterProfileSortFieldsEnum = append(v1ClusterProfileSortFieldsEnum, v) + } +} + +func (m V1ClusterProfileSortFields) validateV1ClusterProfileSortFieldsEnum(path, location string, value V1ClusterProfileSortFields) error { + if err := validate.EnumCase(path, location, value, v1ClusterProfileSortFieldsEnum, true); err != nil { + return err + } + return nil +} + +// Validate validates this v1 cluster profile sort fields +func (m V1ClusterProfileSortFields) Validate(formats strfmt.Registry) error { + var res []error + + // value enum + if err := m.validateV1ClusterProfileSortFieldsEnum("", "body", m); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/models/v1_cluster_profile_sort_spec.go b/api/models/v1_cluster_profile_sort_spec.go new file mode 100644 index 00000000..f4dd84a5 --- /dev/null +++ b/api/models/v1_cluster_profile_sort_spec.go @@ -0,0 +1,94 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ClusterProfileSortSpec v1 cluster profile sort spec +// +// swagger:model v1ClusterProfileSortSpec +type V1ClusterProfileSortSpec struct { + + // field + Field *V1ClusterProfileSortFields `json:"field,omitempty"` + + // order + Order V1SortOrder `json:"order,omitempty"` +} + +// Validate validates this v1 cluster profile sort spec +func (m *V1ClusterProfileSortSpec) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateField(formats); err != nil { + res = append(res, err) + } + + if err := m.validateOrder(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ClusterProfileSortSpec) validateField(formats strfmt.Registry) error { + + if swag.IsZero(m.Field) { // not required + return nil + } + + if m.Field != nil { + if err := m.Field.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("field") + } + return err + } + } + + return nil +} + +func (m *V1ClusterProfileSortSpec) validateOrder(formats strfmt.Registry) error { + + if swag.IsZero(m.Order) { // not required + return nil + } + + if err := m.Order.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("order") + } + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ClusterProfileSortSpec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ClusterProfileSortSpec) UnmarshalBinary(b []byte) error { + var res V1ClusterProfileSortSpec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cluster_profile_spec.go b/api/models/v1_cluster_profile_spec.go new file mode 100644 index 00000000..2a26b3ae --- /dev/null +++ b/api/models/v1_cluster_profile_spec.go @@ -0,0 +1,133 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ClusterProfileSpec ClusterProfileTemplate can be in draft mode, or published mode User only see the latest published template, and (or) the draft template User can apply either the draft version or the latest published version to a cluster when user create a draft version, just copy the Published template, increment the version, and keep changing the draft template without increment the draft version when user publish a draft, the version is fixed, and won't be able to make any modification on published template For each clusterprofile that has a published version, there will be a ClusterProfileArchive automatically created when user publish a draft, the published version will also be copied over to the corresponding ClusterProfileArchive it is just in case in the future for whatever reason we may want to expose earlier versions +// +// swagger:model v1ClusterProfileSpec +type V1ClusterProfileSpec struct { + + // draft + Draft *V1ClusterProfileTemplate `json:"draft,omitempty"` + + // published + Published *V1ClusterProfileTemplate `json:"published,omitempty"` + + // version + Version string `json:"version,omitempty"` + + // Cluster profile's list of all the versions + Versions []*V1ClusterProfileVersion `json:"versions"` +} + +// Validate validates this v1 cluster profile spec +func (m *V1ClusterProfileSpec) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateDraft(formats); err != nil { + res = append(res, err) + } + + if err := m.validatePublished(formats); err != nil { + res = append(res, err) + } + + if err := m.validateVersions(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ClusterProfileSpec) validateDraft(formats strfmt.Registry) error { + + if swag.IsZero(m.Draft) { // not required + return nil + } + + if m.Draft != nil { + if err := m.Draft.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("draft") + } + return err + } + } + + return nil +} + +func (m *V1ClusterProfileSpec) validatePublished(formats strfmt.Registry) error { + + if swag.IsZero(m.Published) { // not required + return nil + } + + if m.Published != nil { + if err := m.Published.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("published") + } + return err + } + } + + return nil +} + +func (m *V1ClusterProfileSpec) validateVersions(formats strfmt.Registry) error { + + if swag.IsZero(m.Versions) { // not required + return nil + } + + for i := 0; i < len(m.Versions); i++ { + if swag.IsZero(m.Versions[i]) { // not required + continue + } + + if m.Versions[i] != nil { + if err := m.Versions[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("versions" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ClusterProfileSpec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ClusterProfileSpec) UnmarshalBinary(b []byte) error { + var res V1ClusterProfileSpec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cluster_profile_spec_entity.go b/api/models/v1_cluster_profile_spec_entity.go new file mode 100644 index 00000000..7940e30b --- /dev/null +++ b/api/models/v1_cluster_profile_spec_entity.go @@ -0,0 +1,43 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ClusterProfileSpecEntity Cluster profile update spec +// +// swagger:model v1ClusterProfileSpecEntity +type V1ClusterProfileSpecEntity struct { + + // Cluster profile version + Version string `json:"version,omitempty"` +} + +// Validate validates this v1 cluster profile spec entity +func (m *V1ClusterProfileSpecEntity) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1ClusterProfileSpecEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ClusterProfileSpecEntity) UnmarshalBinary(b []byte) error { + var res V1ClusterProfileSpecEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cluster_profile_spec_import_entity.go b/api/models/v1_cluster_profile_spec_import_entity.go new file mode 100644 index 00000000..ed32d895 --- /dev/null +++ b/api/models/v1_cluster_profile_spec_import_entity.go @@ -0,0 +1,114 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1ClusterProfileSpecImportEntity Cluster profile import spec +// +// swagger:model v1ClusterProfileSpecImportEntity +type V1ClusterProfileSpecImportEntity struct { + + // template + Template *V1ClusterProfileTemplateImportEntity `json:"template,omitempty"` + + // List of unique variable fields defined for a cluster profile with schema constraints + // Unique: true + Variables []*V1Variable `json:"variables"` + + // Cluster profile version + Version string `json:"version,omitempty"` +} + +// Validate validates this v1 cluster profile spec import entity +func (m *V1ClusterProfileSpecImportEntity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateTemplate(formats); err != nil { + res = append(res, err) + } + + if err := m.validateVariables(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ClusterProfileSpecImportEntity) validateTemplate(formats strfmt.Registry) error { + + if swag.IsZero(m.Template) { // not required + return nil + } + + if m.Template != nil { + if err := m.Template.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("template") + } + return err + } + } + + return nil +} + +func (m *V1ClusterProfileSpecImportEntity) validateVariables(formats strfmt.Registry) error { + + if swag.IsZero(m.Variables) { // not required + return nil + } + + if err := validate.UniqueItems("variables", "body", m.Variables); err != nil { + return err + } + + for i := 0; i < len(m.Variables); i++ { + if swag.IsZero(m.Variables[i]) { // not required + continue + } + + if m.Variables[i] != nil { + if err := m.Variables[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("variables" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ClusterProfileSpecImportEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ClusterProfileSpecImportEntity) UnmarshalBinary(b []byte) error { + var res V1ClusterProfileSpecImportEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cluster_profile_status.go b/api/models/v1_cluster_profile_status.go new file mode 100644 index 00000000..065b796e --- /dev/null +++ b/api/models/v1_cluster_profile_status.go @@ -0,0 +1,89 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ClusterProfileStatus ClusterProfileStatus defines the observed state of ClusterProfile +// +// swagger:model v1ClusterProfileStatus +type V1ClusterProfileStatus struct { + + // If it is true then profile pack values has a reference to user defined macros + HasUserMacros bool `json:"hasUserMacros"` + + // Deprecated. Use inUseClusters + InUseClusterUids []string `json:"inUseClusterUids"` + + // in use clusters + InUseClusters []*V1ObjectResReference `json:"inUseClusters"` + + // is published + IsPublished bool `json:"isPublished"` +} + +// Validate validates this v1 cluster profile status +func (m *V1ClusterProfileStatus) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateInUseClusters(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ClusterProfileStatus) validateInUseClusters(formats strfmt.Registry) error { + + if swag.IsZero(m.InUseClusters) { // not required + return nil + } + + for i := 0; i < len(m.InUseClusters); i++ { + if swag.IsZero(m.InUseClusters[i]) { // not required + continue + } + + if m.InUseClusters[i] != nil { + if err := m.InUseClusters[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("inUseClusters" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ClusterProfileStatus) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ClusterProfileStatus) UnmarshalBinary(b []byte) error { + var res V1ClusterProfileStatus + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cluster_profile_status_summary.go b/api/models/v1_cluster_profile_status_summary.go new file mode 100644 index 00000000..7ab2cd2b --- /dev/null +++ b/api/models/v1_cluster_profile_status_summary.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ClusterProfileStatusSummary ClusterProfileStatusSummary defines the observed state of ClusterProfile +// +// swagger:model v1ClusterProfileStatusSummary +type V1ClusterProfileStatusSummary struct { + + // fips + Fips *V1ClusterProfileFips `json:"fips,omitempty"` + + // Deprecated. Use inUseClusters + InUseClusterUids []string `json:"inUseClusterUids"` + + // in use clusters + InUseClusters []*V1ObjectEntity `json:"inUseClusters"` + + // is published + IsPublished bool `json:"isPublished"` + + // pack + Pack *V1ClusterProfilePackSummary `json:"pack,omitempty"` +} + +// Validate validates this v1 cluster profile status summary +func (m *V1ClusterProfileStatusSummary) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateFips(formats); err != nil { + res = append(res, err) + } + + if err := m.validateInUseClusters(formats); err != nil { + res = append(res, err) + } + + if err := m.validatePack(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ClusterProfileStatusSummary) validateFips(formats strfmt.Registry) error { + + if swag.IsZero(m.Fips) { // not required + return nil + } + + if m.Fips != nil { + if err := m.Fips.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("fips") + } + return err + } + } + + return nil +} + +func (m *V1ClusterProfileStatusSummary) validateInUseClusters(formats strfmt.Registry) error { + + if swag.IsZero(m.InUseClusters) { // not required + return nil + } + + for i := 0; i < len(m.InUseClusters); i++ { + if swag.IsZero(m.InUseClusters[i]) { // not required + continue + } + + if m.InUseClusters[i] != nil { + if err := m.InUseClusters[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("inUseClusters" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1ClusterProfileStatusSummary) validatePack(formats strfmt.Registry) error { + + if swag.IsZero(m.Pack) { // not required + return nil + } + + if m.Pack != nil { + if err := m.Pack.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("pack") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ClusterProfileStatusSummary) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ClusterProfileStatusSummary) UnmarshalBinary(b []byte) error { + var res V1ClusterProfileStatusSummary + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cluster_profile_summary.go b/api/models/v1_cluster_profile_summary.go new file mode 100644 index 00000000..40e10f4a --- /dev/null +++ b/api/models/v1_cluster_profile_summary.go @@ -0,0 +1,242 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ClusterProfileSummary Cluster profile summary +// +// swagger:model v1ClusterProfileSummary +type V1ClusterProfileSummary struct { + + // metadata + Metadata *V1ObjectMeta `json:"metadata,omitempty"` + + // spec summary + SpecSummary *V1ClusterProfileSummarySpecSummary `json:"specSummary,omitempty"` + + // status + Status *V1ClusterProfileStatusSummary `json:"status,omitempty"` +} + +// Validate validates this v1 cluster profile summary +func (m *V1ClusterProfileSummary) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSpecSummary(formats); err != nil { + res = append(res, err) + } + + if err := m.validateStatus(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ClusterProfileSummary) validateMetadata(formats strfmt.Registry) error { + + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } + return err + } + } + + return nil +} + +func (m *V1ClusterProfileSummary) validateSpecSummary(formats strfmt.Registry) error { + + if swag.IsZero(m.SpecSummary) { // not required + return nil + } + + if m.SpecSummary != nil { + if err := m.SpecSummary.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("specSummary") + } + return err + } + } + + return nil +} + +func (m *V1ClusterProfileSummary) validateStatus(formats strfmt.Registry) error { + + if swag.IsZero(m.Status) { // not required + return nil + } + + if m.Status != nil { + if err := m.Status.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("status") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ClusterProfileSummary) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ClusterProfileSummary) UnmarshalBinary(b []byte) error { + var res V1ClusterProfileSummary + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} + +// V1ClusterProfileSummarySpecSummary Cluster profile spec summary +// +// swagger:model V1ClusterProfileSummarySpecSummary +type V1ClusterProfileSummarySpecSummary struct { + + // draft + Draft *V1ClusterProfileTemplateSummary `json:"draft,omitempty"` + + // published + Published *V1ClusterProfileTemplateSummary `json:"published,omitempty"` + + // Cluster profile's latest version + Version string `json:"version,omitempty"` + + // Cluster profile's list of all the versions + Versions []*V1ClusterProfileVersion `json:"versions"` +} + +// Validate validates this v1 cluster profile summary spec summary +func (m *V1ClusterProfileSummarySpecSummary) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateDraft(formats); err != nil { + res = append(res, err) + } + + if err := m.validatePublished(formats); err != nil { + res = append(res, err) + } + + if err := m.validateVersions(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ClusterProfileSummarySpecSummary) validateDraft(formats strfmt.Registry) error { + + if swag.IsZero(m.Draft) { // not required + return nil + } + + if m.Draft != nil { + if err := m.Draft.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("specSummary" + "." + "draft") + } + return err + } + } + + return nil +} + +func (m *V1ClusterProfileSummarySpecSummary) validatePublished(formats strfmt.Registry) error { + + if swag.IsZero(m.Published) { // not required + return nil + } + + if m.Published != nil { + if err := m.Published.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("specSummary" + "." + "published") + } + return err + } + } + + return nil +} + +func (m *V1ClusterProfileSummarySpecSummary) validateVersions(formats strfmt.Registry) error { + + if swag.IsZero(m.Versions) { // not required + return nil + } + + for i := 0; i < len(m.Versions); i++ { + if swag.IsZero(m.Versions[i]) { // not required + continue + } + + if m.Versions[i] != nil { + if err := m.Versions[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("specSummary" + "." + "versions" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ClusterProfileSummarySpecSummary) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ClusterProfileSummarySpecSummary) UnmarshalBinary(b []byte) error { + var res V1ClusterProfileSummarySpecSummary + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cluster_profile_template.go b/api/models/v1_cluster_profile_template.go new file mode 100644 index 00000000..ae0ad787 --- /dev/null +++ b/api/models/v1_cluster_profile_template.go @@ -0,0 +1,158 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ClusterProfileTemplate ClusterProfileTemplate contains details of a clusterprofile definition +// +// swagger:model v1ClusterProfileTemplate +type V1ClusterProfileTemplate struct { + + // cloud type + CloudType string `json:"cloudType,omitempty"` + + // name + Name string `json:"name,omitempty"` + + // PackServerRefs is only used on Hubble side it is reference to pack registry servers which PackRef belongs to in hubble, pack server is a top level object, so use a reference to point to it packs within a clusterprofile can come from different pack servers, so this is an array + PackServerRefs []*V1ObjectReference `json:"packServerRefs"` + + // This secret is used only on Palette side use case is similar to k8s image pull secret this single secret internally should contains all the pack servers in PackServerRefs if empty, means no credential is needed to access the pack server For spectro saas, Ally will set this field before pass to palette + PackServerSecret string `json:"packServerSecret,omitempty"` + + // Packs definitions here are final definitions. If ClonedFrom and ParamsOverwrite is present, then Packs are the final merge result of ClonedFrom and ParamsOverwrite So orchestration engine will just take the Packs and do the work, no need to worry about parameters merge + Packs []*V1PackRef `json:"packs"` + + // version start from 1.0.0, matching the index of ClusterProfileSpec.Versions[] will be used by clusterSpec to identify which version is applied to the cluster + ProfileVersion string `json:"profileVersion,omitempty"` + + // RelatedObject refers to the type of object(clustergroup, cluster or edgeHost) the cluster profile is associated with + RelatedObject *V1ObjectReference `json:"relatedObject,omitempty"` + + // type + Type string `json:"type,omitempty"` + + // uid + UID string `json:"uid,omitempty"` + + // Deprecated. Use profileVersion + Version int32 `json:"version,omitempty"` +} + +// Validate validates this v1 cluster profile template +func (m *V1ClusterProfileTemplate) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validatePackServerRefs(formats); err != nil { + res = append(res, err) + } + + if err := m.validatePacks(formats); err != nil { + res = append(res, err) + } + + if err := m.validateRelatedObject(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ClusterProfileTemplate) validatePackServerRefs(formats strfmt.Registry) error { + + if swag.IsZero(m.PackServerRefs) { // not required + return nil + } + + for i := 0; i < len(m.PackServerRefs); i++ { + if swag.IsZero(m.PackServerRefs[i]) { // not required + continue + } + + if m.PackServerRefs[i] != nil { + if err := m.PackServerRefs[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("packServerRefs" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1ClusterProfileTemplate) validatePacks(formats strfmt.Registry) error { + + if swag.IsZero(m.Packs) { // not required + return nil + } + + for i := 0; i < len(m.Packs); i++ { + if swag.IsZero(m.Packs[i]) { // not required + continue + } + + if m.Packs[i] != nil { + if err := m.Packs[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("packs" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1ClusterProfileTemplate) validateRelatedObject(formats strfmt.Registry) error { + + if swag.IsZero(m.RelatedObject) { // not required + return nil + } + + if m.RelatedObject != nil { + if err := m.RelatedObject.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("relatedObject") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ClusterProfileTemplate) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ClusterProfileTemplate) UnmarshalBinary(b []byte) error { + var res V1ClusterProfileTemplate + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cluster_profile_template_draft.go b/api/models/v1_cluster_profile_template_draft.go new file mode 100644 index 00000000..a588f19d --- /dev/null +++ b/api/models/v1_cluster_profile_template_draft.go @@ -0,0 +1,112 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1ClusterProfileTemplateDraft Cluster profile template spec +// +// swagger:model v1ClusterProfileTemplateDraft +type V1ClusterProfileTemplateDraft struct { + + // cloud type + CloudType string `json:"cloudType,omitempty"` + + // Cluster profile packs array + // Unique: true + Packs []*V1PackManifestEntity `json:"packs"` + + // type + Type V1ProfileType `json:"type,omitempty"` +} + +// Validate validates this v1 cluster profile template draft +func (m *V1ClusterProfileTemplateDraft) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validatePacks(formats); err != nil { + res = append(res, err) + } + + if err := m.validateType(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ClusterProfileTemplateDraft) validatePacks(formats strfmt.Registry) error { + + if swag.IsZero(m.Packs) { // not required + return nil + } + + if err := validate.UniqueItems("packs", "body", m.Packs); err != nil { + return err + } + + for i := 0; i < len(m.Packs); i++ { + if swag.IsZero(m.Packs[i]) { // not required + continue + } + + if m.Packs[i] != nil { + if err := m.Packs[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("packs" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1ClusterProfileTemplateDraft) validateType(formats strfmt.Registry) error { + + if swag.IsZero(m.Type) { // not required + return nil + } + + if err := m.Type.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("type") + } + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ClusterProfileTemplateDraft) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ClusterProfileTemplateDraft) UnmarshalBinary(b []byte) error { + var res V1ClusterProfileTemplateDraft + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cluster_profile_template_import_entity.go b/api/models/v1_cluster_profile_template_import_entity.go new file mode 100644 index 00000000..ce22b0c5 --- /dev/null +++ b/api/models/v1_cluster_profile_template_import_entity.go @@ -0,0 +1,92 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1ClusterProfileTemplateImportEntity Cluster profile import template +// +// swagger:model v1ClusterProfileTemplateImportEntity +type V1ClusterProfileTemplateImportEntity struct { + + // Cluster profile cloud type + CloudType string `json:"cloudType,omitempty"` + + // Cluster profile packs array + // Unique: true + Packs []*V1PackImportEntity `json:"packs"` + + // Cluster profile type [ "cluster", "infra", "add-on", "system" ] + Type string `json:"type,omitempty"` +} + +// Validate validates this v1 cluster profile template import entity +func (m *V1ClusterProfileTemplateImportEntity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validatePacks(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ClusterProfileTemplateImportEntity) validatePacks(formats strfmt.Registry) error { + + if swag.IsZero(m.Packs) { // not required + return nil + } + + if err := validate.UniqueItems("packs", "body", m.Packs); err != nil { + return err + } + + for i := 0; i < len(m.Packs); i++ { + if swag.IsZero(m.Packs[i]) { // not required + continue + } + + if m.Packs[i] != nil { + if err := m.Packs[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("packs" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ClusterProfileTemplateImportEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ClusterProfileTemplateImportEntity) UnmarshalBinary(b []byte) error { + var res V1ClusterProfileTemplateImportEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cluster_profile_template_meta.go b/api/models/v1_cluster_profile_template_meta.go new file mode 100644 index 00000000..6f4e901a --- /dev/null +++ b/api/models/v1_cluster_profile_template_meta.go @@ -0,0 +1,98 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ClusterProfileTemplateMeta Cluster profile template meta information +// +// swagger:model v1ClusterProfileTemplateMeta +type V1ClusterProfileTemplateMeta struct { + + // cloud type + CloudType string `json:"cloudType,omitempty"` + + // Cluster profile name + Name string `json:"name,omitempty"` + + // Cluster profile packs array + Packs []*V1PackRef `json:"packs"` + + // scope or context(system, tenant or project) + Scope string `json:"scope,omitempty"` + + // Cluster profile type [ "cluster", "infra", "add-on", "system" ] + Type string `json:"type,omitempty"` + + // Cluster profile uid + UID string `json:"uid,omitempty"` + + // version + Version int32 `json:"version,omitempty"` +} + +// Validate validates this v1 cluster profile template meta +func (m *V1ClusterProfileTemplateMeta) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validatePacks(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ClusterProfileTemplateMeta) validatePacks(formats strfmt.Registry) error { + + if swag.IsZero(m.Packs) { // not required + return nil + } + + for i := 0; i < len(m.Packs); i++ { + if swag.IsZero(m.Packs[i]) { // not required + continue + } + + if m.Packs[i] != nil { + if err := m.Packs[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("packs" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ClusterProfileTemplateMeta) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ClusterProfileTemplateMeta) UnmarshalBinary(b []byte) error { + var res V1ClusterProfileTemplateMeta + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cluster_profile_template_summary.go b/api/models/v1_cluster_profile_template_summary.go new file mode 100644 index 00000000..75dbfe01 --- /dev/null +++ b/api/models/v1_cluster_profile_template_summary.go @@ -0,0 +1,86 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ClusterProfileTemplateSummary Cluster profile template summary +// +// swagger:model v1ClusterProfileTemplateSummary +type V1ClusterProfileTemplateSummary struct { + + // cloud type + CloudType string `json:"cloudType,omitempty"` + + // packs + Packs []*V1PackRefSummary `json:"packs"` + + // type + Type string `json:"type,omitempty"` +} + +// Validate validates this v1 cluster profile template summary +func (m *V1ClusterProfileTemplateSummary) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validatePacks(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ClusterProfileTemplateSummary) validatePacks(formats strfmt.Registry) error { + + if swag.IsZero(m.Packs) { // not required + return nil + } + + for i := 0; i < len(m.Packs); i++ { + if swag.IsZero(m.Packs[i]) { // not required + continue + } + + if m.Packs[i] != nil { + if err := m.Packs[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("packs" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ClusterProfileTemplateSummary) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ClusterProfileTemplateSummary) UnmarshalBinary(b []byte) error { + var res V1ClusterProfileTemplateSummary + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cluster_profile_template_update.go b/api/models/v1_cluster_profile_template_update.go new file mode 100644 index 00000000..84f274f8 --- /dev/null +++ b/api/models/v1_cluster_profile_template_update.go @@ -0,0 +1,109 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1ClusterProfileTemplateUpdate Cluster profile template update spec +// +// swagger:model v1ClusterProfileTemplateUpdate +type V1ClusterProfileTemplateUpdate struct { + + // Cluster profile packs array + // Unique: true + Packs []*V1PackManifestUpdateEntity `json:"packs"` + + // type + Type V1ProfileType `json:"type,omitempty"` +} + +// Validate validates this v1 cluster profile template update +func (m *V1ClusterProfileTemplateUpdate) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validatePacks(formats); err != nil { + res = append(res, err) + } + + if err := m.validateType(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ClusterProfileTemplateUpdate) validatePacks(formats strfmt.Registry) error { + + if swag.IsZero(m.Packs) { // not required + return nil + } + + if err := validate.UniqueItems("packs", "body", m.Packs); err != nil { + return err + } + + for i := 0; i < len(m.Packs); i++ { + if swag.IsZero(m.Packs[i]) { // not required + continue + } + + if m.Packs[i] != nil { + if err := m.Packs[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("packs" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1ClusterProfileTemplateUpdate) validateType(formats strfmt.Registry) error { + + if swag.IsZero(m.Type) { // not required + return nil + } + + if err := m.Type.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("type") + } + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ClusterProfileTemplateUpdate) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ClusterProfileTemplateUpdate) UnmarshalBinary(b []byte) error { + var res V1ClusterProfileTemplateUpdate + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cluster_profile_update_entity.go b/api/models/v1_cluster_profile_update_entity.go new file mode 100644 index 00000000..bfc79138 --- /dev/null +++ b/api/models/v1_cluster_profile_update_entity.go @@ -0,0 +1,158 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ClusterProfileUpdateEntity Cluster profile update request payload +// +// swagger:model v1ClusterProfileUpdateEntity +type V1ClusterProfileUpdateEntity struct { + + // metadata + Metadata *V1ObjectMeta `json:"metadata,omitempty"` + + // spec + Spec *V1ClusterProfileUpdateEntitySpec `json:"spec,omitempty"` +} + +// Validate validates this v1 cluster profile update entity +func (m *V1ClusterProfileUpdateEntity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSpec(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ClusterProfileUpdateEntity) validateMetadata(formats strfmt.Registry) error { + + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } + return err + } + } + + return nil +} + +func (m *V1ClusterProfileUpdateEntity) validateSpec(formats strfmt.Registry) error { + + if swag.IsZero(m.Spec) { // not required + return nil + } + + if m.Spec != nil { + if err := m.Spec.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ClusterProfileUpdateEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ClusterProfileUpdateEntity) UnmarshalBinary(b []byte) error { + var res V1ClusterProfileUpdateEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} + +// V1ClusterProfileUpdateEntitySpec Cluster profile update spec +// +// swagger:model V1ClusterProfileUpdateEntitySpec +type V1ClusterProfileUpdateEntitySpec struct { + + // template + Template *V1ClusterProfileTemplateUpdate `json:"template,omitempty"` + + // Cluster profile version + Version string `json:"version,omitempty"` +} + +// Validate validates this v1 cluster profile update entity spec +func (m *V1ClusterProfileUpdateEntitySpec) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateTemplate(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ClusterProfileUpdateEntitySpec) validateTemplate(formats strfmt.Registry) error { + + if swag.IsZero(m.Template) { // not required + return nil + } + + if m.Template != nil { + if err := m.Template.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec" + "." + "template") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ClusterProfileUpdateEntitySpec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ClusterProfileUpdateEntitySpec) UnmarshalBinary(b []byte) error { + var res V1ClusterProfileUpdateEntitySpec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cluster_profile_validator_response.go b/api/models/v1_cluster_profile_validator_response.go new file mode 100644 index 00000000..f03be9cb --- /dev/null +++ b/api/models/v1_cluster_profile_validator_response.go @@ -0,0 +1,71 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ClusterProfileValidatorResponse Cluster profile validator response +// +// swagger:model v1ClusterProfileValidatorResponse +type V1ClusterProfileValidatorResponse struct { + + // packs + Packs *V1ConstraintValidatorResponse `json:"packs,omitempty"` +} + +// Validate validates this v1 cluster profile validator response +func (m *V1ClusterProfileValidatorResponse) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validatePacks(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ClusterProfileValidatorResponse) validatePacks(formats strfmt.Registry) error { + + if swag.IsZero(m.Packs) { // not required + return nil + } + + if m.Packs != nil { + if err := m.Packs.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("packs") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ClusterProfileValidatorResponse) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ClusterProfileValidatorResponse) UnmarshalBinary(b []byte) error { + var res V1ClusterProfileValidatorResponse + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cluster_profile_version.go b/api/models/v1_cluster_profile_version.go new file mode 100644 index 00000000..626261f9 --- /dev/null +++ b/api/models/v1_cluster_profile_version.go @@ -0,0 +1,46 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ClusterProfileVersion Cluster profile with version +// +// swagger:model v1ClusterProfileVersion +type V1ClusterProfileVersion struct { + + // uid + UID string `json:"uid,omitempty"` + + // version + Version string `json:"version,omitempty"` +} + +// Validate validates this v1 cluster profile version +func (m *V1ClusterProfileVersion) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1ClusterProfileVersion) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ClusterProfileVersion) UnmarshalBinary(b []byte) error { + var res V1ClusterProfileVersion + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cluster_profiles_filter_spec.go b/api/models/v1_cluster_profiles_filter_spec.go new file mode 100644 index 00000000..d1e06e91 --- /dev/null +++ b/api/models/v1_cluster_profiles_filter_spec.go @@ -0,0 +1,111 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1ClusterProfilesFilterSpec Spectro cluster filter summary spec +// +// swagger:model v1ClusterProfilesFilterSpec +type V1ClusterProfilesFilterSpec struct { + + // filter + Filter *V1ClusterProfileFilterSpec `json:"filter,omitempty"` + + // sort + // Unique: true + Sort []*V1ClusterProfileSortSpec `json:"sort"` +} + +// Validate validates this v1 cluster profiles filter spec +func (m *V1ClusterProfilesFilterSpec) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateFilter(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSort(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ClusterProfilesFilterSpec) validateFilter(formats strfmt.Registry) error { + + if swag.IsZero(m.Filter) { // not required + return nil + } + + if m.Filter != nil { + if err := m.Filter.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("filter") + } + return err + } + } + + return nil +} + +func (m *V1ClusterProfilesFilterSpec) validateSort(formats strfmt.Registry) error { + + if swag.IsZero(m.Sort) { // not required + return nil + } + + if err := validate.UniqueItems("sort", "body", m.Sort); err != nil { + return err + } + + for i := 0; i < len(m.Sort); i++ { + if swag.IsZero(m.Sort[i]) { // not required + continue + } + + if m.Sort[i] != nil { + if err := m.Sort[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("sort" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ClusterProfilesFilterSpec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ClusterProfilesFilterSpec) UnmarshalBinary(b []byte) error { + var res V1ClusterProfilesFilterSpec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cluster_profiles_metadata.go b/api/models/v1_cluster_profiles_metadata.go new file mode 100644 index 00000000..c12a03ba --- /dev/null +++ b/api/models/v1_cluster_profiles_metadata.go @@ -0,0 +1,87 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1ClusterProfilesMetadata v1 cluster profiles metadata +// +// swagger:model v1ClusterProfilesMetadata +type V1ClusterProfilesMetadata struct { + + // items + // Required: true + // Unique: true + Items []*V1ClusterProfileMetadata `json:"items"` +} + +// Validate validates this v1 cluster profiles metadata +func (m *V1ClusterProfilesMetadata) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateItems(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ClusterProfilesMetadata) validateItems(formats strfmt.Registry) error { + + if err := validate.Required("items", "body", m.Items); err != nil { + return err + } + + if err := validate.UniqueItems("items", "body", m.Items); err != nil { + return err + } + + for i := 0; i < len(m.Items); i++ { + if swag.IsZero(m.Items[i]) { // not required + continue + } + + if m.Items[i] != nil { + if err := m.Items[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("items" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ClusterProfilesMetadata) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ClusterProfilesMetadata) UnmarshalBinary(b []byte) error { + var res V1ClusterProfilesMetadata + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cluster_profiles_summary.go b/api/models/v1_cluster_profiles_summary.go new file mode 100644 index 00000000..2b1bcc7d --- /dev/null +++ b/api/models/v1_cluster_profiles_summary.go @@ -0,0 +1,112 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1ClusterProfilesSummary v1 cluster profiles summary +// +// swagger:model v1ClusterProfilesSummary +type V1ClusterProfilesSummary struct { + + // items + // Required: true + // Unique: true + Items []*V1ClusterProfileSummary `json:"items"` + + // listmeta + Listmeta *V1ListMetaData `json:"listmeta,omitempty"` +} + +// Validate validates this v1 cluster profiles summary +func (m *V1ClusterProfilesSummary) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateItems(formats); err != nil { + res = append(res, err) + } + + if err := m.validateListmeta(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ClusterProfilesSummary) validateItems(formats strfmt.Registry) error { + + if err := validate.Required("items", "body", m.Items); err != nil { + return err + } + + if err := validate.UniqueItems("items", "body", m.Items); err != nil { + return err + } + + for i := 0; i < len(m.Items); i++ { + if swag.IsZero(m.Items[i]) { // not required + continue + } + + if m.Items[i] != nil { + if err := m.Items[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("items" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1ClusterProfilesSummary) validateListmeta(formats strfmt.Registry) error { + + if swag.IsZero(m.Listmeta) { // not required + return nil + } + + if m.Listmeta != nil { + if err := m.Listmeta.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("listmeta") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ClusterProfilesSummary) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ClusterProfilesSummary) UnmarshalBinary(b []byte) error { + var res V1ClusterProfilesSummary + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cluster_proxy_spec.go b/api/models/v1_cluster_proxy_spec.go new file mode 100644 index 00000000..8dcd9130 --- /dev/null +++ b/api/models/v1_cluster_proxy_spec.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ClusterProxySpec cluster proxy config spec +// +// swagger:model v1ClusterProxySpec +type V1ClusterProxySpec struct { + + // Location to mount Proxy CA cert inside container + CaContainerMountPath string `json:"caContainerMountPath,omitempty"` + + // Location for Proxy CA cert on host nodes + CaHostPath string `json:"caHostPath,omitempty"` + + // URL for HTTP requests unless overridden by NoProxy + HTTPProxy string `json:"httpProxy,omitempty"` + + // HTTPS requests unless overridden by NoProxy + HTTPSProxy string `json:"httpsProxy,omitempty"` + + // NoProxy represents the NO_PROXY or no_proxy environment + NoProxy string `json:"noProxy,omitempty"` +} + +// Validate validates this v1 cluster proxy spec +func (m *V1ClusterProxySpec) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1ClusterProxySpec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ClusterProxySpec) UnmarshalBinary(b []byte) error { + var res V1ClusterProxySpec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cluster_rbac.go b/api/models/v1_cluster_rbac.go new file mode 100644 index 00000000..9fd74d37 --- /dev/null +++ b/api/models/v1_cluster_rbac.go @@ -0,0 +1,121 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ClusterRbac Cluster RBAC role binding defintion +// +// swagger:model v1ClusterRbac +type V1ClusterRbac struct { + + // metadata + Metadata *V1ObjectMeta `json:"metadata,omitempty"` + + // spec + Spec *V1ClusterRbacSpec `json:"spec,omitempty"` + + // status + Status *V1ClusterRbacStatus `json:"status,omitempty"` +} + +// Validate validates this v1 cluster rbac +func (m *V1ClusterRbac) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSpec(formats); err != nil { + res = append(res, err) + } + + if err := m.validateStatus(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ClusterRbac) validateMetadata(formats strfmt.Registry) error { + + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } + return err + } + } + + return nil +} + +func (m *V1ClusterRbac) validateSpec(formats strfmt.Registry) error { + + if swag.IsZero(m.Spec) { // not required + return nil + } + + if m.Spec != nil { + if err := m.Spec.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec") + } + return err + } + } + + return nil +} + +func (m *V1ClusterRbac) validateStatus(formats strfmt.Registry) error { + + if swag.IsZero(m.Status) { // not required + return nil + } + + if m.Status != nil { + if err := m.Status.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("status") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ClusterRbac) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ClusterRbac) UnmarshalBinary(b []byte) error { + var res V1ClusterRbac + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cluster_rbac_binding.go b/api/models/v1_cluster_rbac_binding.go new file mode 100644 index 00000000..1e05e8b1 --- /dev/null +++ b/api/models/v1_cluster_rbac_binding.go @@ -0,0 +1,166 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "encoding/json" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1ClusterRbacBinding Cluster RBAC binding +// +// swagger:model v1ClusterRbacBinding +type V1ClusterRbacBinding struct { + + // namespace + Namespace string `json:"namespace,omitempty"` + + // role + Role *V1ClusterRoleRef `json:"role,omitempty"` + + // subjects + // Unique: true + Subjects []*V1ClusterRbacSubjects `json:"subjects"` + + // type + // Enum: [RoleBinding ClusterRoleBinding] + Type string `json:"type,omitempty"` +} + +// Validate validates this v1 cluster rbac binding +func (m *V1ClusterRbacBinding) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateRole(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSubjects(formats); err != nil { + res = append(res, err) + } + + if err := m.validateType(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ClusterRbacBinding) validateRole(formats strfmt.Registry) error { + + if swag.IsZero(m.Role) { // not required + return nil + } + + if m.Role != nil { + if err := m.Role.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("role") + } + return err + } + } + + return nil +} + +func (m *V1ClusterRbacBinding) validateSubjects(formats strfmt.Registry) error { + + if swag.IsZero(m.Subjects) { // not required + return nil + } + + if err := validate.UniqueItems("subjects", "body", m.Subjects); err != nil { + return err + } + + for i := 0; i < len(m.Subjects); i++ { + if swag.IsZero(m.Subjects[i]) { // not required + continue + } + + if m.Subjects[i] != nil { + if err := m.Subjects[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("subjects" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +var v1ClusterRbacBindingTypeTypePropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["RoleBinding","ClusterRoleBinding"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + v1ClusterRbacBindingTypeTypePropEnum = append(v1ClusterRbacBindingTypeTypePropEnum, v) + } +} + +const ( + + // V1ClusterRbacBindingTypeRoleBinding captures enum value "RoleBinding" + V1ClusterRbacBindingTypeRoleBinding string = "RoleBinding" + + // V1ClusterRbacBindingTypeClusterRoleBinding captures enum value "ClusterRoleBinding" + V1ClusterRbacBindingTypeClusterRoleBinding string = "ClusterRoleBinding" +) + +// prop value enum +func (m *V1ClusterRbacBinding) validateTypeEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, v1ClusterRbacBindingTypeTypePropEnum, true); err != nil { + return err + } + return nil +} + +func (m *V1ClusterRbacBinding) validateType(formats strfmt.Registry) error { + + if swag.IsZero(m.Type) { // not required + return nil + } + + // value enum + if err := m.validateTypeEnum("type", "body", m.Type); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ClusterRbacBinding) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ClusterRbacBinding) UnmarshalBinary(b []byte) error { + var res V1ClusterRbacBinding + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cluster_rbac_entity.go b/api/models/v1_cluster_rbac_entity.go new file mode 100644 index 00000000..54fcd37a --- /dev/null +++ b/api/models/v1_cluster_rbac_entity.go @@ -0,0 +1,80 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ClusterRbacEntity v1 cluster rbac entity +// +// swagger:model v1ClusterRbacEntity +type V1ClusterRbacEntity struct { + + // Cluster RBAC role bindings + ClusterRbac []*V1ResourceReference `json:"clusterRbac"` +} + +// Validate validates this v1 cluster rbac entity +func (m *V1ClusterRbacEntity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateClusterRbac(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ClusterRbacEntity) validateClusterRbac(formats strfmt.Registry) error { + + if swag.IsZero(m.ClusterRbac) { // not required + return nil + } + + for i := 0; i < len(m.ClusterRbac); i++ { + if swag.IsZero(m.ClusterRbac[i]) { // not required + continue + } + + if m.ClusterRbac[i] != nil { + if err := m.ClusterRbac[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("clusterRbac" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ClusterRbacEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ClusterRbacEntity) UnmarshalBinary(b []byte) error { + var res V1ClusterRbacEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cluster_rbac_input_entity.go b/api/models/v1_cluster_rbac_input_entity.go new file mode 100644 index 00000000..62271a44 --- /dev/null +++ b/api/models/v1_cluster_rbac_input_entity.go @@ -0,0 +1,96 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ClusterRbacInputEntity Cluster RBAC role binding defintion +// +// swagger:model v1ClusterRbacInputEntity +type V1ClusterRbacInputEntity struct { + + // metadata + Metadata *V1ObjectMetaUpdateEntity `json:"metadata,omitempty"` + + // spec + Spec *V1ClusterRbacSpec `json:"spec,omitempty"` +} + +// Validate validates this v1 cluster rbac input entity +func (m *V1ClusterRbacInputEntity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSpec(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ClusterRbacInputEntity) validateMetadata(formats strfmt.Registry) error { + + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } + return err + } + } + + return nil +} + +func (m *V1ClusterRbacInputEntity) validateSpec(formats strfmt.Registry) error { + + if swag.IsZero(m.Spec) { // not required + return nil + } + + if m.Spec != nil { + if err := m.Spec.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ClusterRbacInputEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ClusterRbacInputEntity) UnmarshalBinary(b []byte) error { + var res V1ClusterRbacInputEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cluster_rbac_resources_update_entity.go b/api/models/v1_cluster_rbac_resources_update_entity.go new file mode 100644 index 00000000..e961d1c4 --- /dev/null +++ b/api/models/v1_cluster_rbac_resources_update_entity.go @@ -0,0 +1,86 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1ClusterRbacResourcesUpdateEntity v1 cluster rbac resources update entity +// +// swagger:model v1ClusterRbacResourcesUpdateEntity +type V1ClusterRbacResourcesUpdateEntity struct { + + // rbacs + // Unique: true + Rbacs []*V1ClusterRbacInputEntity `json:"rbacs"` +} + +// Validate validates this v1 cluster rbac resources update entity +func (m *V1ClusterRbacResourcesUpdateEntity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateRbacs(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ClusterRbacResourcesUpdateEntity) validateRbacs(formats strfmt.Registry) error { + + if swag.IsZero(m.Rbacs) { // not required + return nil + } + + if err := validate.UniqueItems("rbacs", "body", m.Rbacs); err != nil { + return err + } + + for i := 0; i < len(m.Rbacs); i++ { + if swag.IsZero(m.Rbacs[i]) { // not required + continue + } + + if m.Rbacs[i] != nil { + if err := m.Rbacs[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("rbacs" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ClusterRbacResourcesUpdateEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ClusterRbacResourcesUpdateEntity) UnmarshalBinary(b []byte) error { + var res V1ClusterRbacResourcesUpdateEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cluster_rbac_spec.go b/api/models/v1_cluster_rbac_spec.go new file mode 100644 index 00000000..aaa6b2bc --- /dev/null +++ b/api/models/v1_cluster_rbac_spec.go @@ -0,0 +1,111 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1ClusterRbacSpec Cluster RBAC spec +// +// swagger:model v1ClusterRbacSpec +type V1ClusterRbacSpec struct { + + // bindings + // Unique: true + Bindings []*V1ClusterRbacBinding `json:"bindings"` + + // related object + RelatedObject *V1RelatedObject `json:"relatedObject,omitempty"` +} + +// Validate validates this v1 cluster rbac spec +func (m *V1ClusterRbacSpec) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateBindings(formats); err != nil { + res = append(res, err) + } + + if err := m.validateRelatedObject(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ClusterRbacSpec) validateBindings(formats strfmt.Registry) error { + + if swag.IsZero(m.Bindings) { // not required + return nil + } + + if err := validate.UniqueItems("bindings", "body", m.Bindings); err != nil { + return err + } + + for i := 0; i < len(m.Bindings); i++ { + if swag.IsZero(m.Bindings[i]) { // not required + continue + } + + if m.Bindings[i] != nil { + if err := m.Bindings[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("bindings" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1ClusterRbacSpec) validateRelatedObject(formats strfmt.Registry) error { + + if swag.IsZero(m.RelatedObject) { // not required + return nil + } + + if m.RelatedObject != nil { + if err := m.RelatedObject.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("relatedObject") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ClusterRbacSpec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ClusterRbacSpec) UnmarshalBinary(b []byte) error { + var res V1ClusterRbacSpec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cluster_rbac_status.go b/api/models/v1_cluster_rbac_status.go new file mode 100644 index 00000000..49fc2370 --- /dev/null +++ b/api/models/v1_cluster_rbac_status.go @@ -0,0 +1,86 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1ClusterRbacStatus Cluster rbac status +// +// swagger:model v1ClusterRbacStatus +type V1ClusterRbacStatus struct { + + // errors + // Unique: true + Errors []*V1ClusterResourceError `json:"errors"` +} + +// Validate validates this v1 cluster rbac status +func (m *V1ClusterRbacStatus) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateErrors(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ClusterRbacStatus) validateErrors(formats strfmt.Registry) error { + + if swag.IsZero(m.Errors) { // not required + return nil + } + + if err := validate.UniqueItems("errors", "body", m.Errors); err != nil { + return err + } + + for i := 0; i < len(m.Errors); i++ { + if swag.IsZero(m.Errors[i]) { // not required + continue + } + + if m.Errors[i] != nil { + if err := m.Errors[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("errors" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ClusterRbacStatus) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ClusterRbacStatus) UnmarshalBinary(b []byte) error { + var res V1ClusterRbacStatus + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cluster_rbac_subjects.go b/api/models/v1_cluster_rbac_subjects.go new file mode 100644 index 00000000..a672107c --- /dev/null +++ b/api/models/v1_cluster_rbac_subjects.go @@ -0,0 +1,109 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "encoding/json" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1ClusterRbacSubjects Cluster role ref +// +// swagger:model v1ClusterRbacSubjects +type V1ClusterRbacSubjects struct { + + // name + Name string `json:"name,omitempty"` + + // namespace + Namespace string `json:"namespace,omitempty"` + + // type + // Enum: [User Group ServiceAccount] + Type string `json:"type,omitempty"` +} + +// Validate validates this v1 cluster rbac subjects +func (m *V1ClusterRbacSubjects) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateType(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +var v1ClusterRbacSubjectsTypeTypePropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["User","Group","ServiceAccount"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + v1ClusterRbacSubjectsTypeTypePropEnum = append(v1ClusterRbacSubjectsTypeTypePropEnum, v) + } +} + +const ( + + // V1ClusterRbacSubjectsTypeUser captures enum value "User" + V1ClusterRbacSubjectsTypeUser string = "User" + + // V1ClusterRbacSubjectsTypeGroup captures enum value "Group" + V1ClusterRbacSubjectsTypeGroup string = "Group" + + // V1ClusterRbacSubjectsTypeServiceAccount captures enum value "ServiceAccount" + V1ClusterRbacSubjectsTypeServiceAccount string = "ServiceAccount" +) + +// prop value enum +func (m *V1ClusterRbacSubjects) validateTypeEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, v1ClusterRbacSubjectsTypeTypePropEnum, true); err != nil { + return err + } + return nil +} + +func (m *V1ClusterRbacSubjects) validateType(formats strfmt.Registry) error { + + if swag.IsZero(m.Type) { // not required + return nil + } + + // value enum + if err := m.validateTypeEnum("type", "body", m.Type); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ClusterRbacSubjects) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ClusterRbacSubjects) UnmarshalBinary(b []byte) error { + var res V1ClusterRbacSubjects + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cluster_rbacs.go b/api/models/v1_cluster_rbacs.go new file mode 100644 index 00000000..754f6271 --- /dev/null +++ b/api/models/v1_cluster_rbacs.go @@ -0,0 +1,87 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1ClusterRbacs v1 cluster rbacs +// +// swagger:model v1ClusterRbacs +type V1ClusterRbacs struct { + + // items + // Required: true + // Unique: true + Items []*V1ClusterRbac `json:"items"` +} + +// Validate validates this v1 cluster rbacs +func (m *V1ClusterRbacs) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateItems(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ClusterRbacs) validateItems(formats strfmt.Registry) error { + + if err := validate.Required("items", "body", m.Items); err != nil { + return err + } + + if err := validate.UniqueItems("items", "body", m.Items); err != nil { + return err + } + + for i := 0; i < len(m.Items); i++ { + if swag.IsZero(m.Items[i]) { // not required + continue + } + + if m.Items[i] != nil { + if err := m.Items[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("items" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ClusterRbacs) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ClusterRbacs) UnmarshalBinary(b []byte) error { + var res V1ClusterRbacs + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cluster_refs.go b/api/models/v1_cluster_refs.go new file mode 100644 index 00000000..cb3131a0 --- /dev/null +++ b/api/models/v1_cluster_refs.go @@ -0,0 +1,80 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ClusterRefs Cluster Object References +// +// swagger:model v1ClusterRefs +type V1ClusterRefs struct { + + // clusters + Clusters []*V1ObjectReference `json:"clusters"` +} + +// Validate validates this v1 cluster refs +func (m *V1ClusterRefs) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateClusters(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ClusterRefs) validateClusters(formats strfmt.Registry) error { + + if swag.IsZero(m.Clusters) { // not required + return nil + } + + for i := 0; i < len(m.Clusters); i++ { + if swag.IsZero(m.Clusters[i]) { // not required + continue + } + + if m.Clusters[i] != nil { + if err := m.Clusters[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("clusters" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ClusterRefs) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ClusterRefs) UnmarshalBinary(b []byte) error { + var res V1ClusterRefs + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cluster_repave_source.go b/api/models/v1_cluster_repave_source.go new file mode 100644 index 00000000..d3d7247e --- /dev/null +++ b/api/models/v1_cluster_repave_source.go @@ -0,0 +1,69 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "encoding/json" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" +) + +// V1ClusterRepaveSource v1 cluster repave source +// +// swagger:model v1ClusterRepaveSource +type V1ClusterRepaveSource string + +const ( + + // V1ClusterRepaveSourceUser captures enum value "user" + V1ClusterRepaveSourceUser V1ClusterRepaveSource = "user" + + // V1ClusterRepaveSourceHubble captures enum value "hubble" + V1ClusterRepaveSourceHubble V1ClusterRepaveSource = "hubble" + + // V1ClusterRepaveSourcePalette captures enum value "palette" + V1ClusterRepaveSourcePalette V1ClusterRepaveSource = "palette" + + // V1ClusterRepaveSourceStylus captures enum value "stylus" + V1ClusterRepaveSourceStylus V1ClusterRepaveSource = "stylus" +) + +// for schema +var v1ClusterRepaveSourceEnum []interface{} + +func init() { + var res []V1ClusterRepaveSource + if err := json.Unmarshal([]byte(`["user","hubble","palette","stylus"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + v1ClusterRepaveSourceEnum = append(v1ClusterRepaveSourceEnum, v) + } +} + +func (m V1ClusterRepaveSource) validateV1ClusterRepaveSourceEnum(path, location string, value V1ClusterRepaveSource) error { + if err := validate.EnumCase(path, location, value, v1ClusterRepaveSourceEnum, true); err != nil { + return err + } + return nil +} + +// Validate validates this v1 cluster repave source +func (m V1ClusterRepaveSource) Validate(formats strfmt.Registry) error { + var res []error + + // value enum + if err := m.validateV1ClusterRepaveSourceEnum("", "body", m); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/models/v1_cluster_repave_state.go b/api/models/v1_cluster_repave_state.go new file mode 100644 index 00000000..cc27e644 --- /dev/null +++ b/api/models/v1_cluster_repave_state.go @@ -0,0 +1,66 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "encoding/json" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" +) + +// V1ClusterRepaveState v1 cluster repave state +// +// swagger:model v1ClusterRepaveState +type V1ClusterRepaveState string + +const ( + + // V1ClusterRepaveStatePending captures enum value "Pending" + V1ClusterRepaveStatePending V1ClusterRepaveState = "Pending" + + // V1ClusterRepaveStateApproved captures enum value "Approved" + V1ClusterRepaveStateApproved V1ClusterRepaveState = "Approved" + + // V1ClusterRepaveStateReverted captures enum value "Reverted" + V1ClusterRepaveStateReverted V1ClusterRepaveState = "Reverted" +) + +// for schema +var v1ClusterRepaveStateEnum []interface{} + +func init() { + var res []V1ClusterRepaveState + if err := json.Unmarshal([]byte(`["Pending","Approved","Reverted"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + v1ClusterRepaveStateEnum = append(v1ClusterRepaveStateEnum, v) + } +} + +func (m V1ClusterRepaveState) validateV1ClusterRepaveStateEnum(path, location string, value V1ClusterRepaveState) error { + if err := validate.EnumCase(path, location, value, v1ClusterRepaveStateEnum, true); err != nil { + return err + } + return nil +} + +// Validate validates this v1 cluster repave state +func (m V1ClusterRepaveState) Validate(formats strfmt.Registry) error { + var res []error + + // value enum + if err := m.validateV1ClusterRepaveStateEnum("", "body", m); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/models/v1_cluster_repave_status.go b/api/models/v1_cluster_repave_status.go new file mode 100644 index 00000000..ab39a1d4 --- /dev/null +++ b/api/models/v1_cluster_repave_status.go @@ -0,0 +1,69 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ClusterRepaveStatus Cluster repave status +// +// swagger:model v1ClusterRepaveStatus +type V1ClusterRepaveStatus struct { + + // state + State V1ClusterRepaveState `json:"state,omitempty"` +} + +// Validate validates this v1 cluster repave status +func (m *V1ClusterRepaveStatus) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateState(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ClusterRepaveStatus) validateState(formats strfmt.Registry) error { + + if swag.IsZero(m.State) { // not required + return nil + } + + if err := m.State.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("state") + } + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ClusterRepaveStatus) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ClusterRepaveStatus) UnmarshalBinary(b []byte) error { + var res V1ClusterRepaveStatus + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cluster_resource_allocation.go b/api/models/v1_cluster_resource_allocation.go new file mode 100644 index 00000000..35bab2f8 --- /dev/null +++ b/api/models/v1_cluster_resource_allocation.go @@ -0,0 +1,74 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ClusterResourceAllocation Workspace resource allocation +// +// swagger:model v1ClusterResourceAllocation +type V1ClusterResourceAllocation struct { + + // cluster Uid + ClusterUID string `json:"clusterUid,omitempty"` + + // resource allocation + ResourceAllocation *V1WorkspaceResourceAllocation `json:"resourceAllocation,omitempty"` +} + +// Validate validates this v1 cluster resource allocation +func (m *V1ClusterResourceAllocation) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateResourceAllocation(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ClusterResourceAllocation) validateResourceAllocation(formats strfmt.Registry) error { + + if swag.IsZero(m.ResourceAllocation) { // not required + return nil + } + + if m.ResourceAllocation != nil { + if err := m.ResourceAllocation.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("resourceAllocation") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ClusterResourceAllocation) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ClusterResourceAllocation) UnmarshalBinary(b []byte) error { + var res V1ClusterResourceAllocation + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cluster_resource_error.go b/api/models/v1_cluster_resource_error.go new file mode 100644 index 00000000..70a315d0 --- /dev/null +++ b/api/models/v1_cluster_resource_error.go @@ -0,0 +1,49 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ClusterResourceError Cluster resource error +// +// swagger:model v1ClusterResourceError +type V1ClusterResourceError struct { + + // msg + Msg string `json:"msg,omitempty"` + + // name + Name string `json:"name,omitempty"` + + // resource type + ResourceType string `json:"resourceType,omitempty"` +} + +// Validate validates this v1 cluster resource error +func (m *V1ClusterResourceError) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1ClusterResourceError) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ClusterResourceError) UnmarshalBinary(b []byte) error { + var res V1ClusterResourceError + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cluster_resources.go b/api/models/v1_cluster_resources.go new file mode 100644 index 00000000..02f5db6d --- /dev/null +++ b/api/models/v1_cluster_resources.go @@ -0,0 +1,112 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ClusterResources v1 cluster resources +// +// swagger:model v1ClusterResources +type V1ClusterResources struct { + + // Cluster namespaces + Namespaces []*V1ResourceReference `json:"namespaces"` + + // Cluster RBAC role bindings + Rbacs []*V1ResourceReference `json:"rbacs"` +} + +// Validate validates this v1 cluster resources +func (m *V1ClusterResources) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateNamespaces(formats); err != nil { + res = append(res, err) + } + + if err := m.validateRbacs(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ClusterResources) validateNamespaces(formats strfmt.Registry) error { + + if swag.IsZero(m.Namespaces) { // not required + return nil + } + + for i := 0; i < len(m.Namespaces); i++ { + if swag.IsZero(m.Namespaces[i]) { // not required + continue + } + + if m.Namespaces[i] != nil { + if err := m.Namespaces[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("namespaces" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1ClusterResources) validateRbacs(formats strfmt.Registry) error { + + if swag.IsZero(m.Rbacs) { // not required + return nil + } + + for i := 0; i < len(m.Rbacs); i++ { + if swag.IsZero(m.Rbacs[i]) { // not required + continue + } + + if m.Rbacs[i] != nil { + if err := m.Rbacs[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("rbacs" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ClusterResources) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ClusterResources) UnmarshalBinary(b []byte) error { + var res V1ClusterResources + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cluster_resources_entity.go b/api/models/v1_cluster_resources_entity.go new file mode 100644 index 00000000..2f94b02c --- /dev/null +++ b/api/models/v1_cluster_resources_entity.go @@ -0,0 +1,123 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1ClusterResourcesEntity v1 cluster resources entity +// +// swagger:model v1ClusterResourcesEntity +type V1ClusterResourcesEntity struct { + + // namespaces + // Unique: true + Namespaces []*V1ClusterNamespaceResourceInputEntity `json:"namespaces"` + + // rbacs + // Unique: true + Rbacs []*V1ClusterRbacInputEntity `json:"rbacs"` +} + +// Validate validates this v1 cluster resources entity +func (m *V1ClusterResourcesEntity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateNamespaces(formats); err != nil { + res = append(res, err) + } + + if err := m.validateRbacs(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ClusterResourcesEntity) validateNamespaces(formats strfmt.Registry) error { + + if swag.IsZero(m.Namespaces) { // not required + return nil + } + + if err := validate.UniqueItems("namespaces", "body", m.Namespaces); err != nil { + return err + } + + for i := 0; i < len(m.Namespaces); i++ { + if swag.IsZero(m.Namespaces[i]) { // not required + continue + } + + if m.Namespaces[i] != nil { + if err := m.Namespaces[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("namespaces" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1ClusterResourcesEntity) validateRbacs(formats strfmt.Registry) error { + + if swag.IsZero(m.Rbacs) { // not required + return nil + } + + if err := validate.UniqueItems("rbacs", "body", m.Rbacs); err != nil { + return err + } + + for i := 0; i < len(m.Rbacs); i++ { + if swag.IsZero(m.Rbacs[i]) { // not required + continue + } + + if m.Rbacs[i] != nil { + if err := m.Rbacs[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("rbacs" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ClusterResourcesEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ClusterResourcesEntity) UnmarshalBinary(b []byte) error { + var res V1ClusterResourcesEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cluster_restore.go b/api/models/v1_cluster_restore.go new file mode 100644 index 00000000..0b7862b6 --- /dev/null +++ b/api/models/v1_cluster_restore.go @@ -0,0 +1,121 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ClusterRestore Cluster Restore +// +// swagger:model v1ClusterRestore +type V1ClusterRestore struct { + + // metadata + Metadata *V1ObjectMeta `json:"metadata,omitempty"` + + // spec + Spec *V1ClusterRestoreSpec `json:"spec,omitempty"` + + // status + Status *V1ClusterRestoreStatus `json:"status,omitempty"` +} + +// Validate validates this v1 cluster restore +func (m *V1ClusterRestore) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSpec(formats); err != nil { + res = append(res, err) + } + + if err := m.validateStatus(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ClusterRestore) validateMetadata(formats strfmt.Registry) error { + + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } + return err + } + } + + return nil +} + +func (m *V1ClusterRestore) validateSpec(formats strfmt.Registry) error { + + if swag.IsZero(m.Spec) { // not required + return nil + } + + if m.Spec != nil { + if err := m.Spec.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec") + } + return err + } + } + + return nil +} + +func (m *V1ClusterRestore) validateStatus(formats strfmt.Registry) error { + + if swag.IsZero(m.Status) { // not required + return nil + } + + if m.Status != nil { + if err := m.Status.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("status") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ClusterRestore) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ClusterRestore) UnmarshalBinary(b []byte) error { + var res V1ClusterRestore + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cluster_restore_config.go b/api/models/v1_cluster_restore_config.go new file mode 100644 index 00000000..818522d9 --- /dev/null +++ b/api/models/v1_cluster_restore_config.go @@ -0,0 +1,128 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1ClusterRestoreConfig Cluster restore config +// +// swagger:model v1ClusterRestoreConfig +type V1ClusterRestoreConfig struct { + + // backup name + // Required: true + BackupName *string `json:"backupName"` + + // backup request Uid + // Required: true + BackupRequestUID *string `json:"backupRequestUid"` + + // destination cluster Uid + // Required: true + DestinationClusterUID *string `json:"destinationClusterUid"` + + // include cluster resources + IncludeClusterResources bool `json:"includeClusterResources,omitempty"` + + // include namespaces + // Unique: true + IncludeNamespaces []string `json:"includeNamespaces"` + + // preserve node ports + PreserveNodePorts bool `json:"preserveNodePorts,omitempty"` + + // restore p vs + RestorePVs bool `json:"restorePVs,omitempty"` +} + +// Validate validates this v1 cluster restore config +func (m *V1ClusterRestoreConfig) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateBackupName(formats); err != nil { + res = append(res, err) + } + + if err := m.validateBackupRequestUID(formats); err != nil { + res = append(res, err) + } + + if err := m.validateDestinationClusterUID(formats); err != nil { + res = append(res, err) + } + + if err := m.validateIncludeNamespaces(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ClusterRestoreConfig) validateBackupName(formats strfmt.Registry) error { + + if err := validate.Required("backupName", "body", m.BackupName); err != nil { + return err + } + + return nil +} + +func (m *V1ClusterRestoreConfig) validateBackupRequestUID(formats strfmt.Registry) error { + + if err := validate.Required("backupRequestUid", "body", m.BackupRequestUID); err != nil { + return err + } + + return nil +} + +func (m *V1ClusterRestoreConfig) validateDestinationClusterUID(formats strfmt.Registry) error { + + if err := validate.Required("destinationClusterUid", "body", m.DestinationClusterUID); err != nil { + return err + } + + return nil +} + +func (m *V1ClusterRestoreConfig) validateIncludeNamespaces(formats strfmt.Registry) error { + + if swag.IsZero(m.IncludeNamespaces) { // not required + return nil + } + + if err := validate.UniqueItems("includeNamespaces", "body", m.IncludeNamespaces); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ClusterRestoreConfig) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ClusterRestoreConfig) UnmarshalBinary(b []byte) error { + var res V1ClusterRestoreConfig + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cluster_restore_spec.go b/api/models/v1_cluster_restore_spec.go new file mode 100644 index 00000000..d83efe03 --- /dev/null +++ b/api/models/v1_cluster_restore_spec.go @@ -0,0 +1,43 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ClusterRestoreSpec Cluster Restore Spec +// +// swagger:model v1ClusterRestoreSpec +type V1ClusterRestoreSpec struct { + + // cluster Uid + ClusterUID string `json:"clusterUid,omitempty"` +} + +// Validate validates this v1 cluster restore spec +func (m *V1ClusterRestoreSpec) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1ClusterRestoreSpec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ClusterRestoreSpec) UnmarshalBinary(b []byte) error { + var res V1ClusterRestoreSpec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cluster_restore_status.go b/api/models/v1_cluster_restore_status.go new file mode 100644 index 00000000..8f7f6e28 --- /dev/null +++ b/api/models/v1_cluster_restore_status.go @@ -0,0 +1,80 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ClusterRestoreStatus Cluster Restore Status +// +// swagger:model v1ClusterRestoreStatus +type V1ClusterRestoreStatus struct { + + // cluster restore statuses + ClusterRestoreStatuses []*V1ClusterRestoreStatusMeta `json:"clusterRestoreStatuses"` +} + +// Validate validates this v1 cluster restore status +func (m *V1ClusterRestoreStatus) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateClusterRestoreStatuses(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ClusterRestoreStatus) validateClusterRestoreStatuses(formats strfmt.Registry) error { + + if swag.IsZero(m.ClusterRestoreStatuses) { // not required + return nil + } + + for i := 0; i < len(m.ClusterRestoreStatuses); i++ { + if swag.IsZero(m.ClusterRestoreStatuses[i]) { // not required + continue + } + + if m.ClusterRestoreStatuses[i] != nil { + if err := m.ClusterRestoreStatuses[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("clusterRestoreStatuses" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ClusterRestoreStatus) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ClusterRestoreStatus) UnmarshalBinary(b []byte) error { + var res V1ClusterRestoreStatus + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cluster_restore_status_meta.go b/api/models/v1_cluster_restore_status_meta.go new file mode 100644 index 00000000..1c700c94 --- /dev/null +++ b/api/models/v1_cluster_restore_status_meta.go @@ -0,0 +1,133 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ClusterRestoreStatusMeta Cluster Restore Status Meta +// +// swagger:model v1ClusterRestoreStatusMeta +type V1ClusterRestoreStatusMeta struct { + + // actor + Actor *V1ClusterFeatureActor `json:"actor,omitempty"` + + // backup name + BackupName string `json:"backupName,omitempty"` + + // backup request Uid + BackupRequestUID string `json:"backupRequestUid,omitempty"` + + // restore request Uid + RestoreRequestUID string `json:"restoreRequestUid,omitempty"` + + // restore status meta + RestoreStatusMeta *V1RestoreStatusMeta `json:"restoreStatusMeta,omitempty"` + + // source cluster ref + SourceClusterRef *V1ResourceReference `json:"sourceClusterRef,omitempty"` + + // state + State string `json:"state,omitempty"` +} + +// Validate validates this v1 cluster restore status meta +func (m *V1ClusterRestoreStatusMeta) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateActor(formats); err != nil { + res = append(res, err) + } + + if err := m.validateRestoreStatusMeta(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSourceClusterRef(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ClusterRestoreStatusMeta) validateActor(formats strfmt.Registry) error { + + if swag.IsZero(m.Actor) { // not required + return nil + } + + if m.Actor != nil { + if err := m.Actor.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("actor") + } + return err + } + } + + return nil +} + +func (m *V1ClusterRestoreStatusMeta) validateRestoreStatusMeta(formats strfmt.Registry) error { + + if swag.IsZero(m.RestoreStatusMeta) { // not required + return nil + } + + if m.RestoreStatusMeta != nil { + if err := m.RestoreStatusMeta.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("restoreStatusMeta") + } + return err + } + } + + return nil +} + +func (m *V1ClusterRestoreStatusMeta) validateSourceClusterRef(formats strfmt.Registry) error { + + if swag.IsZero(m.SourceClusterRef) { // not required + return nil + } + + if m.SourceClusterRef != nil { + if err := m.SourceClusterRef.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("sourceClusterRef") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ClusterRestoreStatusMeta) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ClusterRestoreStatusMeta) UnmarshalBinary(b []byte) error { + var res V1ClusterRestoreStatusMeta + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cluster_role_ref.go b/api/models/v1_cluster_role_ref.go new file mode 100644 index 00000000..da9a3867 --- /dev/null +++ b/api/models/v1_cluster_role_ref.go @@ -0,0 +1,103 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "encoding/json" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1ClusterRoleRef Cluster role ref +// +// swagger:model v1ClusterRoleRef +type V1ClusterRoleRef struct { + + // kind + // Enum: [Role ClusterRole] + Kind string `json:"kind,omitempty"` + + // name + Name string `json:"name,omitempty"` +} + +// Validate validates this v1 cluster role ref +func (m *V1ClusterRoleRef) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateKind(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +var v1ClusterRoleRefTypeKindPropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["Role","ClusterRole"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + v1ClusterRoleRefTypeKindPropEnum = append(v1ClusterRoleRefTypeKindPropEnum, v) + } +} + +const ( + + // V1ClusterRoleRefKindRole captures enum value "Role" + V1ClusterRoleRefKindRole string = "Role" + + // V1ClusterRoleRefKindClusterRole captures enum value "ClusterRole" + V1ClusterRoleRefKindClusterRole string = "ClusterRole" +) + +// prop value enum +func (m *V1ClusterRoleRef) validateKindEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, v1ClusterRoleRefTypeKindPropEnum, true); err != nil { + return err + } + return nil +} + +func (m *V1ClusterRoleRef) validateKind(formats strfmt.Registry) error { + + if swag.IsZero(m.Kind) { // not required + return nil + } + + // value enum + if err := m.validateKindEnum("kind", "body", m.Kind); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ClusterRoleRef) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ClusterRoleRef) UnmarshalBinary(b []byte) error { + var res V1ClusterRoleRef + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cluster_scan_log_kube_bench.go b/api/models/v1_cluster_scan_log_kube_bench.go new file mode 100644 index 00000000..6728b166 --- /dev/null +++ b/api/models/v1_cluster_scan_log_kube_bench.go @@ -0,0 +1,121 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ClusterScanLogKubeBench Cluster compliance scan KubeBench Log +// +// swagger:model v1ClusterScanLogKubeBench +type V1ClusterScanLogKubeBench struct { + + // metadata + Metadata *V1ObjectMeta `json:"metadata,omitempty"` + + // spec + Spec *V1ClusterComplianceScanLogSpec `json:"spec,omitempty"` + + // status + Status *V1ClusterKubeBenchLogStatus `json:"status,omitempty"` +} + +// Validate validates this v1 cluster scan log kube bench +func (m *V1ClusterScanLogKubeBench) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSpec(formats); err != nil { + res = append(res, err) + } + + if err := m.validateStatus(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ClusterScanLogKubeBench) validateMetadata(formats strfmt.Registry) error { + + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } + return err + } + } + + return nil +} + +func (m *V1ClusterScanLogKubeBench) validateSpec(formats strfmt.Registry) error { + + if swag.IsZero(m.Spec) { // not required + return nil + } + + if m.Spec != nil { + if err := m.Spec.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec") + } + return err + } + } + + return nil +} + +func (m *V1ClusterScanLogKubeBench) validateStatus(formats strfmt.Registry) error { + + if swag.IsZero(m.Status) { // not required + return nil + } + + if m.Status != nil { + if err := m.Status.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("status") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ClusterScanLogKubeBench) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ClusterScanLogKubeBench) UnmarshalBinary(b []byte) error { + var res V1ClusterScanLogKubeBench + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cluster_scan_log_kube_hunter.go b/api/models/v1_cluster_scan_log_kube_hunter.go new file mode 100644 index 00000000..f548b93f --- /dev/null +++ b/api/models/v1_cluster_scan_log_kube_hunter.go @@ -0,0 +1,121 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ClusterScanLogKubeHunter Cluster compliance scan KubeHunter Log +// +// swagger:model v1ClusterScanLogKubeHunter +type V1ClusterScanLogKubeHunter struct { + + // metadata + Metadata *V1ObjectMeta `json:"metadata,omitempty"` + + // spec + Spec *V1ClusterComplianceScanLogSpec `json:"spec,omitempty"` + + // status + Status *V1ClusterKubeHunterLogStatus `json:"status,omitempty"` +} + +// Validate validates this v1 cluster scan log kube hunter +func (m *V1ClusterScanLogKubeHunter) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSpec(formats); err != nil { + res = append(res, err) + } + + if err := m.validateStatus(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ClusterScanLogKubeHunter) validateMetadata(formats strfmt.Registry) error { + + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } + return err + } + } + + return nil +} + +func (m *V1ClusterScanLogKubeHunter) validateSpec(formats strfmt.Registry) error { + + if swag.IsZero(m.Spec) { // not required + return nil + } + + if m.Spec != nil { + if err := m.Spec.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec") + } + return err + } + } + + return nil +} + +func (m *V1ClusterScanLogKubeHunter) validateStatus(formats strfmt.Registry) error { + + if swag.IsZero(m.Status) { // not required + return nil + } + + if m.Status != nil { + if err := m.Status.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("status") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ClusterScanLogKubeHunter) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ClusterScanLogKubeHunter) UnmarshalBinary(b []byte) error { + var res V1ClusterScanLogKubeHunter + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cluster_scan_log_sonobuoy.go b/api/models/v1_cluster_scan_log_sonobuoy.go new file mode 100644 index 00000000..0167a3b4 --- /dev/null +++ b/api/models/v1_cluster_scan_log_sonobuoy.go @@ -0,0 +1,121 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ClusterScanLogSonobuoy Cluster compliance scan Sonobuoy Log +// +// swagger:model v1ClusterScanLogSonobuoy +type V1ClusterScanLogSonobuoy struct { + + // metadata + Metadata *V1ObjectMeta `json:"metadata,omitempty"` + + // spec + Spec *V1ClusterComplianceScanLogSpec `json:"spec,omitempty"` + + // status + Status *V1ClusterSonobuoyLogStatus `json:"status,omitempty"` +} + +// Validate validates this v1 cluster scan log sonobuoy +func (m *V1ClusterScanLogSonobuoy) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSpec(formats); err != nil { + res = append(res, err) + } + + if err := m.validateStatus(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ClusterScanLogSonobuoy) validateMetadata(formats strfmt.Registry) error { + + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } + return err + } + } + + return nil +} + +func (m *V1ClusterScanLogSonobuoy) validateSpec(formats strfmt.Registry) error { + + if swag.IsZero(m.Spec) { // not required + return nil + } + + if m.Spec != nil { + if err := m.Spec.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec") + } + return err + } + } + + return nil +} + +func (m *V1ClusterScanLogSonobuoy) validateStatus(formats strfmt.Registry) error { + + if swag.IsZero(m.Status) { // not required + return nil + } + + if m.Status != nil { + if err := m.Status.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("status") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ClusterScanLogSonobuoy) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ClusterScanLogSonobuoy) UnmarshalBinary(b []byte) error { + var res V1ClusterScanLogSonobuoy + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cluster_scan_log_syft.go b/api/models/v1_cluster_scan_log_syft.go new file mode 100644 index 00000000..2822c30e --- /dev/null +++ b/api/models/v1_cluster_scan_log_syft.go @@ -0,0 +1,121 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ClusterScanLogSyft Cluster Compliance Scan Syft Log +// +// swagger:model v1ClusterScanLogSyft +type V1ClusterScanLogSyft struct { + + // metadata + Metadata *V1ObjectMeta `json:"metadata,omitempty"` + + // spec + Spec *V1ClusterComplianceScanLogSpec `json:"spec,omitempty"` + + // status + Status *V1ClusterSyftLogStatus `json:"status,omitempty"` +} + +// Validate validates this v1 cluster scan log syft +func (m *V1ClusterScanLogSyft) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSpec(formats); err != nil { + res = append(res, err) + } + + if err := m.validateStatus(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ClusterScanLogSyft) validateMetadata(formats strfmt.Registry) error { + + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } + return err + } + } + + return nil +} + +func (m *V1ClusterScanLogSyft) validateSpec(formats strfmt.Registry) error { + + if swag.IsZero(m.Spec) { // not required + return nil + } + + if m.Spec != nil { + if err := m.Spec.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec") + } + return err + } + } + + return nil +} + +func (m *V1ClusterScanLogSyft) validateStatus(formats strfmt.Registry) error { + + if swag.IsZero(m.Status) { // not required + return nil + } + + if m.Status != nil { + if err := m.Status.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("status") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ClusterScanLogSyft) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ClusterScanLogSyft) UnmarshalBinary(b []byte) error { + var res V1ClusterScanLogSyft + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cluster_scan_time.go b/api/models/v1_cluster_scan_time.go new file mode 100644 index 00000000..91893c48 --- /dev/null +++ b/api/models/v1_cluster_scan_time.go @@ -0,0 +1,94 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ClusterScanTime Cluster compliance scan Time +// +// swagger:model v1ClusterScanTime +type V1ClusterScanTime struct { + + // end time + // Format: date-time + EndTime V1Time `json:"endTime,omitempty"` + + // start time + // Format: date-time + StartTime V1Time `json:"startTime,omitempty"` +} + +// Validate validates this v1 cluster scan time +func (m *V1ClusterScanTime) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateEndTime(formats); err != nil { + res = append(res, err) + } + + if err := m.validateStartTime(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ClusterScanTime) validateEndTime(formats strfmt.Registry) error { + + if swag.IsZero(m.EndTime) { // not required + return nil + } + + if err := m.EndTime.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("endTime") + } + return err + } + + return nil +} + +func (m *V1ClusterScanTime) validateStartTime(formats strfmt.Registry) error { + + if swag.IsZero(m.StartTime) { // not required + return nil + } + + if err := m.StartTime.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("startTime") + } + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ClusterScanTime) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ClusterScanTime) UnmarshalBinary(b []byte) error { + var res V1ClusterScanTime + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cluster_search_input_spec.go b/api/models/v1_cluster_search_input_spec.go new file mode 100644 index 00000000..14673c42 --- /dev/null +++ b/api/models/v1_cluster_search_input_spec.go @@ -0,0 +1,76 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1ClusterSearchInputSpec v1 cluster search input spec +// +// swagger:model v1ClusterSearchInputSpec +type V1ClusterSearchInputSpec struct { + + // inputs + Inputs map[string]V1ClusterSearchInputSpecProperty `json:"inputs,omitempty"` +} + +// Validate validates this v1 cluster search input spec +func (m *V1ClusterSearchInputSpec) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateInputs(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ClusterSearchInputSpec) validateInputs(formats strfmt.Registry) error { + + if swag.IsZero(m.Inputs) { // not required + return nil + } + + for k := range m.Inputs { + + if err := validate.Required("inputs"+"."+k, "body", m.Inputs[k]); err != nil { + return err + } + if val, ok := m.Inputs[k]; ok { + if err := val.Validate(formats); err != nil { + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ClusterSearchInputSpec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ClusterSearchInputSpec) UnmarshalBinary(b []byte) error { + var res V1ClusterSearchInputSpec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cluster_search_input_spec_property.go b/api/models/v1_cluster_search_input_spec_property.go new file mode 100644 index 00000000..5f405fc6 --- /dev/null +++ b/api/models/v1_cluster_search_input_spec_property.go @@ -0,0 +1,80 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ClusterSearchInputSpecProperty v1 cluster search input spec property +// +// swagger:model v1ClusterSearchInputSpecProperty +type V1ClusterSearchInputSpecProperty struct { + + // values + Values []*V1ObjectEntity `json:"values,omitempty"` +} + +// Validate validates this v1 cluster search input spec property +func (m *V1ClusterSearchInputSpecProperty) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateValues(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ClusterSearchInputSpecProperty) validateValues(formats strfmt.Registry) error { + + if swag.IsZero(m.Values) { // not required + return nil + } + + for i := 0; i < len(m.Values); i++ { + if swag.IsZero(m.Values[i]) { // not required + continue + } + + if m.Values[i] != nil { + if err := m.Values[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("values" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ClusterSearchInputSpecProperty) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ClusterSearchInputSpecProperty) UnmarshalBinary(b []byte) error { + var res V1ClusterSearchInputSpecProperty + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cluster_sonobuoy_log_status.go b/api/models/v1_cluster_sonobuoy_log_status.go new file mode 100644 index 00000000..faf2eaa4 --- /dev/null +++ b/api/models/v1_cluster_sonobuoy_log_status.go @@ -0,0 +1,135 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1ClusterSonobuoyLogStatus Cluster compliance scan Sonobuoy Log Status +// +// swagger:model v1ClusterSonobuoyLogStatus +type V1ClusterSonobuoyLogStatus struct { + + // actor + Actor *V1ClusterFeatureActor `json:"actor,omitempty"` + + // message + Message string `json:"message,omitempty"` + + // reports + Reports map[string]V1SonobuoyReport `json:"reports,omitempty"` + + // request Uid + RequestUID string `json:"requestUid,omitempty"` + + // scan time + ScanTime *V1ClusterScanTime `json:"scanTime,omitempty"` + + // state + State string `json:"state,omitempty"` +} + +// Validate validates this v1 cluster sonobuoy log status +func (m *V1ClusterSonobuoyLogStatus) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateActor(formats); err != nil { + res = append(res, err) + } + + if err := m.validateReports(formats); err != nil { + res = append(res, err) + } + + if err := m.validateScanTime(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ClusterSonobuoyLogStatus) validateActor(formats strfmt.Registry) error { + + if swag.IsZero(m.Actor) { // not required + return nil + } + + if m.Actor != nil { + if err := m.Actor.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("actor") + } + return err + } + } + + return nil +} + +func (m *V1ClusterSonobuoyLogStatus) validateReports(formats strfmt.Registry) error { + + if swag.IsZero(m.Reports) { // not required + return nil + } + + for k := range m.Reports { + + if err := validate.Required("reports"+"."+k, "body", m.Reports[k]); err != nil { + return err + } + if val, ok := m.Reports[k]; ok { + if err := val.Validate(formats); err != nil { + return err + } + } + + } + + return nil +} + +func (m *V1ClusterSonobuoyLogStatus) validateScanTime(formats strfmt.Registry) error { + + if swag.IsZero(m.ScanTime) { // not required + return nil + } + + if m.ScanTime != nil { + if err := m.ScanTime.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("scanTime") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ClusterSonobuoyLogStatus) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ClusterSonobuoyLogStatus) UnmarshalBinary(b []byte) error { + var res V1ClusterSonobuoyLogStatus + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cluster_syft_log_status.go b/api/models/v1_cluster_syft_log_status.go new file mode 100644 index 00000000..3b8e7806 --- /dev/null +++ b/api/models/v1_cluster_syft_log_status.go @@ -0,0 +1,189 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ClusterSyftLogStatus Cluster compliance scan Syft Log Status +// +// swagger:model v1ClusterSyftLogStatus +type V1ClusterSyftLogStatus struct { + + // actor + Actor *V1ClusterFeatureActor `json:"actor,omitempty"` + + // location + Location *V1ObjectEntity `json:"location,omitempty"` + + // message + Message string `json:"message,omitempty"` + + // reports + Reports []*V1SyftReport `json:"reports"` + + // request Uid + RequestUID string `json:"requestUid,omitempty"` + + // scan context + ScanContext *V1SyftScanContext `json:"scanContext,omitempty"` + + // scan time + ScanTime *V1ClusterScanTime `json:"scanTime,omitempty"` + + // state + State string `json:"state,omitempty"` +} + +// Validate validates this v1 cluster syft log status +func (m *V1ClusterSyftLogStatus) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateActor(formats); err != nil { + res = append(res, err) + } + + if err := m.validateLocation(formats); err != nil { + res = append(res, err) + } + + if err := m.validateReports(formats); err != nil { + res = append(res, err) + } + + if err := m.validateScanContext(formats); err != nil { + res = append(res, err) + } + + if err := m.validateScanTime(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ClusterSyftLogStatus) validateActor(formats strfmt.Registry) error { + + if swag.IsZero(m.Actor) { // not required + return nil + } + + if m.Actor != nil { + if err := m.Actor.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("actor") + } + return err + } + } + + return nil +} + +func (m *V1ClusterSyftLogStatus) validateLocation(formats strfmt.Registry) error { + + if swag.IsZero(m.Location) { // not required + return nil + } + + if m.Location != nil { + if err := m.Location.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("location") + } + return err + } + } + + return nil +} + +func (m *V1ClusterSyftLogStatus) validateReports(formats strfmt.Registry) error { + + if swag.IsZero(m.Reports) { // not required + return nil + } + + for i := 0; i < len(m.Reports); i++ { + if swag.IsZero(m.Reports[i]) { // not required + continue + } + + if m.Reports[i] != nil { + if err := m.Reports[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("reports" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1ClusterSyftLogStatus) validateScanContext(formats strfmt.Registry) error { + + if swag.IsZero(m.ScanContext) { // not required + return nil + } + + if m.ScanContext != nil { + if err := m.ScanContext.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("scanContext") + } + return err + } + } + + return nil +} + +func (m *V1ClusterSyftLogStatus) validateScanTime(formats strfmt.Registry) error { + + if swag.IsZero(m.ScanTime) { // not required + return nil + } + + if m.ScanTime != nil { + if err := m.ScanTime.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("scanTime") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ClusterSyftLogStatus) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ClusterSyftLogStatus) UnmarshalBinary(b []byte) error { + var res V1ClusterSyftLogStatus + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cluster_type.go b/api/models/v1_cluster_type.go new file mode 100644 index 00000000..0f791fb3 --- /dev/null +++ b/api/models/v1_cluster_type.go @@ -0,0 +1,63 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "encoding/json" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" +) + +// V1ClusterType v1 cluster type +// +// swagger:model v1ClusterType +type V1ClusterType string + +const ( + + // V1ClusterTypePureManage captures enum value "PureManage" + V1ClusterTypePureManage V1ClusterType = "PureManage" + + // V1ClusterTypePureAttach captures enum value "PureAttach" + V1ClusterTypePureAttach V1ClusterType = "PureAttach" +) + +// for schema +var v1ClusterTypeEnum []interface{} + +func init() { + var res []V1ClusterType + if err := json.Unmarshal([]byte(`["PureManage","PureAttach"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + v1ClusterTypeEnum = append(v1ClusterTypeEnum, v) + } +} + +func (m V1ClusterType) validateV1ClusterTypeEnum(path, location string, value V1ClusterType) error { + if err := validate.EnumCase(path, location, value, v1ClusterTypeEnum, true); err != nil { + return err + } + return nil +} + +// Validate validates this v1 cluster type +func (m V1ClusterType) Validate(formats strfmt.Registry) error { + var res []error + + // value enum + if err := m.validateV1ClusterTypeEnum("", "body", m); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/models/v1_cluster_upgrade_settings_entity.go b/api/models/v1_cluster_upgrade_settings_entity.go new file mode 100644 index 00000000..cf7d1644 --- /dev/null +++ b/api/models/v1_cluster_upgrade_settings_entity.go @@ -0,0 +1,100 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "encoding/json" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1ClusterUpgradeSettingsEntity v1 cluster upgrade settings entity +// +// swagger:model v1ClusterUpgradeSettingsEntity +type V1ClusterUpgradeSettingsEntity struct { + + // spectro components + // Enum: [lock unlock] + SpectroComponents string `json:"spectroComponents,omitempty"` +} + +// Validate validates this v1 cluster upgrade settings entity +func (m *V1ClusterUpgradeSettingsEntity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateSpectroComponents(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +var v1ClusterUpgradeSettingsEntityTypeSpectroComponentsPropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["lock","unlock"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + v1ClusterUpgradeSettingsEntityTypeSpectroComponentsPropEnum = append(v1ClusterUpgradeSettingsEntityTypeSpectroComponentsPropEnum, v) + } +} + +const ( + + // V1ClusterUpgradeSettingsEntitySpectroComponentsLock captures enum value "lock" + V1ClusterUpgradeSettingsEntitySpectroComponentsLock string = "lock" + + // V1ClusterUpgradeSettingsEntitySpectroComponentsUnlock captures enum value "unlock" + V1ClusterUpgradeSettingsEntitySpectroComponentsUnlock string = "unlock" +) + +// prop value enum +func (m *V1ClusterUpgradeSettingsEntity) validateSpectroComponentsEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, v1ClusterUpgradeSettingsEntityTypeSpectroComponentsPropEnum, true); err != nil { + return err + } + return nil +} + +func (m *V1ClusterUpgradeSettingsEntity) validateSpectroComponents(formats strfmt.Registry) error { + + if swag.IsZero(m.SpectroComponents) { // not required + return nil + } + + // value enum + if err := m.validateSpectroComponentsEnum("spectroComponents", "body", m.SpectroComponents); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ClusterUpgradeSettingsEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ClusterUpgradeSettingsEntity) UnmarshalBinary(b []byte) error { + var res V1ClusterUpgradeSettingsEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cluster_usage_summary.go b/api/models/v1_cluster_usage_summary.go new file mode 100644 index 00000000..caf034a5 --- /dev/null +++ b/api/models/v1_cluster_usage_summary.go @@ -0,0 +1,52 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ClusterUsageSummary Cluster usage summary +// +// swagger:model v1ClusterUsageSummary +type V1ClusterUsageSummary struct { + + // cpu cores + CPUCores float64 `json:"cpuCores"` + + // is alloy + IsAlloy bool `json:"isAlloy"` + + // name + Name string `json:"name,omitempty"` + + // uid + UID string `json:"uid,omitempty"` +} + +// Validate validates this v1 cluster usage summary +func (m *V1ClusterUsageSummary) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1ClusterUsageSummary) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ClusterUsageSummary) UnmarshalBinary(b []byte) error { + var res V1ClusterUsageSummary + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cluster_virtual_machine.go b/api/models/v1_cluster_virtual_machine.go new file mode 100644 index 00000000..289030d1 --- /dev/null +++ b/api/models/v1_cluster_virtual_machine.go @@ -0,0 +1,133 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1ClusterVirtualMachine VirtualMachine handles the VirtualMachines that are not running +// or are in a stopped state +// The VirtualMachine contains the template to create the +// VirtualMachineInstance. It also mirrors the running state of the created +// VirtualMachineInstance in its status. +// +// swagger:model v1ClusterVirtualMachine +type V1ClusterVirtualMachine struct { + + // APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. + APIVersion string `json:"apiVersion,omitempty"` + + // Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. + Kind string `json:"kind,omitempty"` + + // metadata + Metadata *V1VMObjectMeta `json:"metadata,omitempty"` + + // spec + // Required: true + Spec *V1ClusterVirtualMachineSpec `json:"spec"` + + // status + Status *V1ClusterVirtualMachineStatus `json:"status,omitempty"` +} + +// Validate validates this v1 cluster virtual machine +func (m *V1ClusterVirtualMachine) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSpec(formats); err != nil { + res = append(res, err) + } + + if err := m.validateStatus(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ClusterVirtualMachine) validateMetadata(formats strfmt.Registry) error { + + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } + return err + } + } + + return nil +} + +func (m *V1ClusterVirtualMachine) validateSpec(formats strfmt.Registry) error { + + if err := validate.Required("spec", "body", m.Spec); err != nil { + return err + } + + if m.Spec != nil { + if err := m.Spec.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec") + } + return err + } + } + + return nil +} + +func (m *V1ClusterVirtualMachine) validateStatus(formats strfmt.Registry) error { + + if swag.IsZero(m.Status) { // not required + return nil + } + + if m.Status != nil { + if err := m.Status.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("status") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ClusterVirtualMachine) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ClusterVirtualMachine) UnmarshalBinary(b []byte) error { + var res V1ClusterVirtualMachine + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cluster_virtual_machine_list.go b/api/models/v1_cluster_virtual_machine_list.go new file mode 100644 index 00000000..dc2b6440 --- /dev/null +++ b/api/models/v1_cluster_virtual_machine_list.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1ClusterVirtualMachineList VirtualMachineList is a list of virtual machines +// +// swagger:model v1ClusterVirtualMachineList +type V1ClusterVirtualMachineList struct { + + // APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. + APIVersion string `json:"apiVersion,omitempty"` + + // items + // Required: true + Items []*V1ClusterVirtualMachine `json:"items"` + + // Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + Kind string `json:"kind,omitempty"` + + // metadata + Metadata *V1VMListMeta `json:"metadata,omitempty"` +} + +// Validate validates this v1 cluster virtual machine list +func (m *V1ClusterVirtualMachineList) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateItems(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ClusterVirtualMachineList) validateItems(formats strfmt.Registry) error { + + if err := validate.Required("items", "body", m.Items); err != nil { + return err + } + + for i := 0; i < len(m.Items); i++ { + if swag.IsZero(m.Items[i]) { // not required + continue + } + + if m.Items[i] != nil { + if err := m.Items[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("items" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1ClusterVirtualMachineList) validateMetadata(formats strfmt.Registry) error { + + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ClusterVirtualMachineList) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ClusterVirtualMachineList) UnmarshalBinary(b []byte) error { + var res V1ClusterVirtualMachineList + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cluster_virtual_machine_spec.go b/api/models/v1_cluster_virtual_machine_spec.go new file mode 100644 index 00000000..844e6a83 --- /dev/null +++ b/api/models/v1_cluster_virtual_machine_spec.go @@ -0,0 +1,163 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1ClusterVirtualMachineSpec VirtualMachineSpec describes how the proper VirtualMachine should look like +// +// swagger:model v1ClusterVirtualMachineSpec +type V1ClusterVirtualMachineSpec struct { + + // dataVolumeTemplates is a list of dataVolumes that the VirtualMachineInstance template can reference. DataVolumes in this list are dynamically created for the VirtualMachine and are tied to the VirtualMachine's life-cycle. + DataVolumeTemplates []*V1VMDataVolumeTemplateSpec `json:"dataVolumeTemplates"` + + // instancetype + Instancetype *V1VMInstancetypeMatcher `json:"instancetype,omitempty"` + + // preference + Preference *V1VMPreferenceMatcher `json:"preference,omitempty"` + + // Running state indicates the requested running state of the VirtualMachineInstance mutually exclusive with Running + RunStrategy string `json:"runStrategy,omitempty"` + + // Running controls whether the associatied VirtualMachineInstance is created or not Mutually exclusive with RunStrategy + Running bool `json:"running,omitempty"` + + // template + // Required: true + Template *V1VMVirtualMachineInstanceTemplateSpec `json:"template"` +} + +// Validate validates this v1 cluster virtual machine spec +func (m *V1ClusterVirtualMachineSpec) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateDataVolumeTemplates(formats); err != nil { + res = append(res, err) + } + + if err := m.validateInstancetype(formats); err != nil { + res = append(res, err) + } + + if err := m.validatePreference(formats); err != nil { + res = append(res, err) + } + + if err := m.validateTemplate(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ClusterVirtualMachineSpec) validateDataVolumeTemplates(formats strfmt.Registry) error { + + if swag.IsZero(m.DataVolumeTemplates) { // not required + return nil + } + + for i := 0; i < len(m.DataVolumeTemplates); i++ { + if swag.IsZero(m.DataVolumeTemplates[i]) { // not required + continue + } + + if m.DataVolumeTemplates[i] != nil { + if err := m.DataVolumeTemplates[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("dataVolumeTemplates" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1ClusterVirtualMachineSpec) validateInstancetype(formats strfmt.Registry) error { + + if swag.IsZero(m.Instancetype) { // not required + return nil + } + + if m.Instancetype != nil { + if err := m.Instancetype.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("instancetype") + } + return err + } + } + + return nil +} + +func (m *V1ClusterVirtualMachineSpec) validatePreference(formats strfmt.Registry) error { + + if swag.IsZero(m.Preference) { // not required + return nil + } + + if m.Preference != nil { + if err := m.Preference.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("preference") + } + return err + } + } + + return nil +} + +func (m *V1ClusterVirtualMachineSpec) validateTemplate(formats strfmt.Registry) error { + + if err := validate.Required("template", "body", m.Template); err != nil { + return err + } + + if m.Template != nil { + if err := m.Template.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("template") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ClusterVirtualMachineSpec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ClusterVirtualMachineSpec) UnmarshalBinary(b []byte) error { + var res V1ClusterVirtualMachineSpec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cluster_virtual_machine_status.go b/api/models/v1_cluster_virtual_machine_status.go new file mode 100644 index 00000000..01b63e7b --- /dev/null +++ b/api/models/v1_cluster_virtual_machine_status.go @@ -0,0 +1,241 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ClusterVirtualMachineStatus VirtualMachineStatus represents the status returned by the controller to describe how the VirtualMachine is doing +// +// swagger:model v1ClusterVirtualMachineStatus +type V1ClusterVirtualMachineStatus struct { + + // Hold the state information of the VirtualMachine and its VirtualMachineInstance + Conditions []*V1VMVirtualMachineCondition `json:"conditions"` + + // Created indicates if the virtual machine is created in the cluster + Created bool `json:"created,omitempty"` + + // memory dump request + MemoryDumpRequest *V1VMVirtualMachineMemoryDumpRequest `json:"memoryDumpRequest,omitempty"` + + // PrintableStatus is a human readable, high-level representation of the status of the virtual machine + PrintableStatus string `json:"printableStatus,omitempty"` + + // Ready indicates if the virtual machine is running and ready + Ready bool `json:"ready,omitempty"` + + // RestoreInProgress is the name of the VirtualMachineRestore currently executing + RestoreInProgress string `json:"restoreInProgress,omitempty"` + + // SnapshotInProgress is the name of the VirtualMachineSnapshot currently executing + SnapshotInProgress string `json:"snapshotInProgress,omitempty"` + + // start failure + StartFailure *V1VMVirtualMachineStartFailure `json:"startFailure,omitempty"` + + // StateChangeRequests indicates a list of actions that should be taken on a VMI e.g. stop a specific VMI then start a new one. + StateChangeRequests []*V1VMVirtualMachineStateChangeRequest `json:"stateChangeRequests"` + + // VolumeRequests indicates a list of volumes add or remove from the VMI template and hotplug on an active running VMI. + VolumeRequests []*V1VMVirtualMachineVolumeRequest `json:"volumeRequests"` + + // VolumeSnapshotStatuses indicates a list of statuses whether snapshotting is supported by each volume. + VolumeSnapshotStatuses []*V1VMVolumeSnapshotStatus `json:"volumeSnapshotStatuses"` +} + +// Validate validates this v1 cluster virtual machine status +func (m *V1ClusterVirtualMachineStatus) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateConditions(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMemoryDumpRequest(formats); err != nil { + res = append(res, err) + } + + if err := m.validateStartFailure(formats); err != nil { + res = append(res, err) + } + + if err := m.validateStateChangeRequests(formats); err != nil { + res = append(res, err) + } + + if err := m.validateVolumeRequests(formats); err != nil { + res = append(res, err) + } + + if err := m.validateVolumeSnapshotStatuses(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ClusterVirtualMachineStatus) validateConditions(formats strfmt.Registry) error { + + if swag.IsZero(m.Conditions) { // not required + return nil + } + + for i := 0; i < len(m.Conditions); i++ { + if swag.IsZero(m.Conditions[i]) { // not required + continue + } + + if m.Conditions[i] != nil { + if err := m.Conditions[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("conditions" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1ClusterVirtualMachineStatus) validateMemoryDumpRequest(formats strfmt.Registry) error { + + if swag.IsZero(m.MemoryDumpRequest) { // not required + return nil + } + + if m.MemoryDumpRequest != nil { + if err := m.MemoryDumpRequest.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("memoryDumpRequest") + } + return err + } + } + + return nil +} + +func (m *V1ClusterVirtualMachineStatus) validateStartFailure(formats strfmt.Registry) error { + + if swag.IsZero(m.StartFailure) { // not required + return nil + } + + if m.StartFailure != nil { + if err := m.StartFailure.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("startFailure") + } + return err + } + } + + return nil +} + +func (m *V1ClusterVirtualMachineStatus) validateStateChangeRequests(formats strfmt.Registry) error { + + if swag.IsZero(m.StateChangeRequests) { // not required + return nil + } + + for i := 0; i < len(m.StateChangeRequests); i++ { + if swag.IsZero(m.StateChangeRequests[i]) { // not required + continue + } + + if m.StateChangeRequests[i] != nil { + if err := m.StateChangeRequests[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("stateChangeRequests" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1ClusterVirtualMachineStatus) validateVolumeRequests(formats strfmt.Registry) error { + + if swag.IsZero(m.VolumeRequests) { // not required + return nil + } + + for i := 0; i < len(m.VolumeRequests); i++ { + if swag.IsZero(m.VolumeRequests[i]) { // not required + continue + } + + if m.VolumeRequests[i] != nil { + if err := m.VolumeRequests[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("volumeRequests" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1ClusterVirtualMachineStatus) validateVolumeSnapshotStatuses(formats strfmt.Registry) error { + + if swag.IsZero(m.VolumeSnapshotStatuses) { // not required + return nil + } + + for i := 0; i < len(m.VolumeSnapshotStatuses); i++ { + if swag.IsZero(m.VolumeSnapshotStatuses[i]) { // not required + continue + } + + if m.VolumeSnapshotStatuses[i] != nil { + if err := m.VolumeSnapshotStatuses[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("volumeSnapshotStatuses" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ClusterVirtualMachineStatus) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ClusterVirtualMachineStatus) UnmarshalBinary(b []byte) error { + var res V1ClusterVirtualMachineStatus + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cluster_virtual_packs_value.go b/api/models/v1_cluster_virtual_packs_value.go new file mode 100644 index 00000000..448f0fc0 --- /dev/null +++ b/api/models/v1_cluster_virtual_packs_value.go @@ -0,0 +1,49 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ClusterVirtualPacksValue Virtual cluster packs value +// +// swagger:model v1ClusterVirtualPacksValue +type V1ClusterVirtualPacksValue struct { + + // distro type + DistroType string `json:"distroType,omitempty"` + + // layer + Layer string `json:"layer,omitempty"` + + // values + Values string `json:"values,omitempty"` +} + +// Validate validates this v1 cluster virtual packs value +func (m *V1ClusterVirtualPacksValue) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1ClusterVirtualPacksValue) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ClusterVirtualPacksValue) UnmarshalBinary(b []byte) error { + var res V1ClusterVirtualPacksValue + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cluster_virtual_packs_values.go b/api/models/v1_cluster_virtual_packs_values.go new file mode 100644 index 00000000..a8673e4b --- /dev/null +++ b/api/models/v1_cluster_virtual_packs_values.go @@ -0,0 +1,80 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ClusterVirtualPacksValues Virtual cluster packs values +// +// swagger:model v1ClusterVirtualPacksValues +type V1ClusterVirtualPacksValues struct { + + // packs + Packs []*V1ClusterVirtualPacksValue `json:"packs"` +} + +// Validate validates this v1 cluster virtual packs values +func (m *V1ClusterVirtualPacksValues) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validatePacks(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ClusterVirtualPacksValues) validatePacks(formats strfmt.Registry) error { + + if swag.IsZero(m.Packs) { // not required + return nil + } + + for i := 0; i < len(m.Packs); i++ { + if swag.IsZero(m.Packs[i]) { // not required + continue + } + + if m.Packs[i] != nil { + if err := m.Packs[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("packs" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ClusterVirtualPacksValues) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ClusterVirtualPacksValues) UnmarshalBinary(b []byte) error { + var res V1ClusterVirtualPacksValues + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cluster_workload.go b/api/models/v1_cluster_workload.go new file mode 100644 index 00000000..408e6370 --- /dev/null +++ b/api/models/v1_cluster_workload.go @@ -0,0 +1,96 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ClusterWorkload Cluster workload summary +// +// swagger:model v1ClusterWorkload +type V1ClusterWorkload struct { + + // metadata + Metadata *V1ObjectMetaInputEntity `json:"metadata,omitempty"` + + // spec + Spec *V1ClusterWorkloadSpec `json:"spec,omitempty"` +} + +// Validate validates this v1 cluster workload +func (m *V1ClusterWorkload) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSpec(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ClusterWorkload) validateMetadata(formats strfmt.Registry) error { + + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } + return err + } + } + + return nil +} + +func (m *V1ClusterWorkload) validateSpec(formats strfmt.Registry) error { + + if swag.IsZero(m.Spec) { // not required + return nil + } + + if m.Spec != nil { + if err := m.Spec.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ClusterWorkload) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ClusterWorkload) UnmarshalBinary(b []byte) error { + var res V1ClusterWorkload + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cluster_workload_condition.go b/api/models/v1_cluster_workload_condition.go new file mode 100644 index 00000000..7744e629 --- /dev/null +++ b/api/models/v1_cluster_workload_condition.go @@ -0,0 +1,106 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ClusterWorkloadCondition Cluster workload condition +// +// swagger:model v1ClusterWorkloadCondition +type V1ClusterWorkloadCondition struct { + + // last transition time + // Format: date-time + LastTransitionTime V1Time `json:"lastTransitionTime,omitempty"` + + // last update time + // Format: date-time + LastUpdateTime V1Time `json:"lastUpdateTime,omitempty"` + + // message + Message string `json:"message,omitempty"` + + // reason + Reason string `json:"reason,omitempty"` + + // status + Status string `json:"status,omitempty"` + + // type + Type string `json:"type,omitempty"` +} + +// Validate validates this v1 cluster workload condition +func (m *V1ClusterWorkloadCondition) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateLastTransitionTime(formats); err != nil { + res = append(res, err) + } + + if err := m.validateLastUpdateTime(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ClusterWorkloadCondition) validateLastTransitionTime(formats strfmt.Registry) error { + + if swag.IsZero(m.LastTransitionTime) { // not required + return nil + } + + if err := m.LastTransitionTime.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("lastTransitionTime") + } + return err + } + + return nil +} + +func (m *V1ClusterWorkloadCondition) validateLastUpdateTime(formats strfmt.Registry) error { + + if swag.IsZero(m.LastUpdateTime) { // not required + return nil + } + + if err := m.LastUpdateTime.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("lastUpdateTime") + } + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ClusterWorkloadCondition) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ClusterWorkloadCondition) UnmarshalBinary(b []byte) error { + var res V1ClusterWorkloadCondition + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cluster_workload_cron_job.go b/api/models/v1_cluster_workload_cron_job.go new file mode 100644 index 00000000..8a5a1309 --- /dev/null +++ b/api/models/v1_cluster_workload_cron_job.go @@ -0,0 +1,121 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ClusterWorkloadCronJob Cluster workload cronjob summary +// +// swagger:model v1ClusterWorkloadCronJob +type V1ClusterWorkloadCronJob struct { + + // metadata + Metadata *V1ClusterWorkloadMetadata `json:"metadata,omitempty"` + + // spec + Spec *V1ClusterWorkloadCronJobSpec `json:"spec,omitempty"` + + // status + Status *V1ClusterWorkloadCronJobStatus `json:"status,omitempty"` +} + +// Validate validates this v1 cluster workload cron job +func (m *V1ClusterWorkloadCronJob) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSpec(formats); err != nil { + res = append(res, err) + } + + if err := m.validateStatus(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ClusterWorkloadCronJob) validateMetadata(formats strfmt.Registry) error { + + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } + return err + } + } + + return nil +} + +func (m *V1ClusterWorkloadCronJob) validateSpec(formats strfmt.Registry) error { + + if swag.IsZero(m.Spec) { // not required + return nil + } + + if m.Spec != nil { + if err := m.Spec.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec") + } + return err + } + } + + return nil +} + +func (m *V1ClusterWorkloadCronJob) validateStatus(formats strfmt.Registry) error { + + if swag.IsZero(m.Status) { // not required + return nil + } + + if m.Status != nil { + if err := m.Status.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("status") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ClusterWorkloadCronJob) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ClusterWorkloadCronJob) UnmarshalBinary(b []byte) error { + var res V1ClusterWorkloadCronJob + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cluster_workload_cron_job_spec.go b/api/models/v1_cluster_workload_cron_job_spec.go new file mode 100644 index 00000000..5492ad74 --- /dev/null +++ b/api/models/v1_cluster_workload_cron_job_spec.go @@ -0,0 +1,43 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ClusterWorkloadCronJobSpec Cluster workload cronjob spec +// +// swagger:model v1ClusterWorkloadCronJobSpec +type V1ClusterWorkloadCronJobSpec struct { + + // schedule + Schedule string `json:"schedule,omitempty"` +} + +// Validate validates this v1 cluster workload cron job spec +func (m *V1ClusterWorkloadCronJobSpec) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1ClusterWorkloadCronJobSpec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ClusterWorkloadCronJobSpec) UnmarshalBinary(b []byte) error { + var res V1ClusterWorkloadCronJobSpec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cluster_workload_cron_job_status.go b/api/models/v1_cluster_workload_cron_job_status.go new file mode 100644 index 00000000..aa4e9b10 --- /dev/null +++ b/api/models/v1_cluster_workload_cron_job_status.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ClusterWorkloadCronJobStatus Cluster workload cronjob status +// +// swagger:model v1ClusterWorkloadCronJobStatus +type V1ClusterWorkloadCronJobStatus struct { + + // last schedule time + // Format: date-time + LastScheduleTime V1Time `json:"lastScheduleTime,omitempty"` +} + +// Validate validates this v1 cluster workload cron job status +func (m *V1ClusterWorkloadCronJobStatus) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateLastScheduleTime(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ClusterWorkloadCronJobStatus) validateLastScheduleTime(formats strfmt.Registry) error { + + if swag.IsZero(m.LastScheduleTime) { // not required + return nil + } + + if err := m.LastScheduleTime.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("lastScheduleTime") + } + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ClusterWorkloadCronJobStatus) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ClusterWorkloadCronJobStatus) UnmarshalBinary(b []byte) error { + var res V1ClusterWorkloadCronJobStatus + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cluster_workload_cron_jobs.go b/api/models/v1_cluster_workload_cron_jobs.go new file mode 100644 index 00000000..10ea1c43 --- /dev/null +++ b/api/models/v1_cluster_workload_cron_jobs.go @@ -0,0 +1,80 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ClusterWorkloadCronJobs Cluster workload cronjobs summary +// +// swagger:model v1ClusterWorkloadCronJobs +type V1ClusterWorkloadCronJobs struct { + + // cron jobs + CronJobs []*V1ClusterWorkloadCronJob `json:"cronJobs"` +} + +// Validate validates this v1 cluster workload cron jobs +func (m *V1ClusterWorkloadCronJobs) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateCronJobs(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ClusterWorkloadCronJobs) validateCronJobs(formats strfmt.Registry) error { + + if swag.IsZero(m.CronJobs) { // not required + return nil + } + + for i := 0; i < len(m.CronJobs); i++ { + if swag.IsZero(m.CronJobs[i]) { // not required + continue + } + + if m.CronJobs[i] != nil { + if err := m.CronJobs[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("cronJobs" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ClusterWorkloadCronJobs) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ClusterWorkloadCronJobs) UnmarshalBinary(b []byte) error { + var res V1ClusterWorkloadCronJobs + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cluster_workload_daemon_set.go b/api/models/v1_cluster_workload_daemon_set.go new file mode 100644 index 00000000..616f97a6 --- /dev/null +++ b/api/models/v1_cluster_workload_daemon_set.go @@ -0,0 +1,96 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ClusterWorkloadDaemonSet Cluster workload daemonset summary +// +// swagger:model v1ClusterWorkloadDaemonSet +type V1ClusterWorkloadDaemonSet struct { + + // metadata + Metadata *V1ClusterWorkloadMetadata `json:"metadata,omitempty"` + + // status + Status *V1ClusterWorkloadDaemonSetStatus `json:"status,omitempty"` +} + +// Validate validates this v1 cluster workload daemon set +func (m *V1ClusterWorkloadDaemonSet) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if err := m.validateStatus(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ClusterWorkloadDaemonSet) validateMetadata(formats strfmt.Registry) error { + + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } + return err + } + } + + return nil +} + +func (m *V1ClusterWorkloadDaemonSet) validateStatus(formats strfmt.Registry) error { + + if swag.IsZero(m.Status) { // not required + return nil + } + + if m.Status != nil { + if err := m.Status.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("status") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ClusterWorkloadDaemonSet) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ClusterWorkloadDaemonSet) UnmarshalBinary(b []byte) error { + var res V1ClusterWorkloadDaemonSet + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cluster_workload_daemon_set_status.go b/api/models/v1_cluster_workload_daemon_set_status.go new file mode 100644 index 00000000..bd63a548 --- /dev/null +++ b/api/models/v1_cluster_workload_daemon_set_status.go @@ -0,0 +1,58 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ClusterWorkloadDaemonSetStatus Cluster workload daemonset status +// +// swagger:model v1ClusterWorkloadDaemonSetStatus +type V1ClusterWorkloadDaemonSetStatus struct { + + // available + Available int32 `json:"available,omitempty"` + + // current scheduled + CurrentScheduled int32 `json:"currentScheduled,omitempty"` + + // desired scheduled + DesiredScheduled int32 `json:"desiredScheduled,omitempty"` + + // mis scheduled + MisScheduled int32 `json:"misScheduled,omitempty"` + + // ready + Ready int32 `json:"ready,omitempty"` + + // updated scheduled + UpdatedScheduled int32 `json:"updatedScheduled,omitempty"` +} + +// Validate validates this v1 cluster workload daemon set status +func (m *V1ClusterWorkloadDaemonSetStatus) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1ClusterWorkloadDaemonSetStatus) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ClusterWorkloadDaemonSetStatus) UnmarshalBinary(b []byte) error { + var res V1ClusterWorkloadDaemonSetStatus + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cluster_workload_daemon_sets.go b/api/models/v1_cluster_workload_daemon_sets.go new file mode 100644 index 00000000..0d07a050 --- /dev/null +++ b/api/models/v1_cluster_workload_daemon_sets.go @@ -0,0 +1,80 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ClusterWorkloadDaemonSets Cluster workload daemonset summary +// +// swagger:model v1ClusterWorkloadDaemonSets +type V1ClusterWorkloadDaemonSets struct { + + // daemon sets + DaemonSets []*V1ClusterWorkloadDaemonSet `json:"daemonSets"` +} + +// Validate validates this v1 cluster workload daemon sets +func (m *V1ClusterWorkloadDaemonSets) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateDaemonSets(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ClusterWorkloadDaemonSets) validateDaemonSets(formats strfmt.Registry) error { + + if swag.IsZero(m.DaemonSets) { // not required + return nil + } + + for i := 0; i < len(m.DaemonSets); i++ { + if swag.IsZero(m.DaemonSets[i]) { // not required + continue + } + + if m.DaemonSets[i] != nil { + if err := m.DaemonSets[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("daemonSets" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ClusterWorkloadDaemonSets) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ClusterWorkloadDaemonSets) UnmarshalBinary(b []byte) error { + var res V1ClusterWorkloadDaemonSets + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cluster_workload_deployment.go b/api/models/v1_cluster_workload_deployment.go new file mode 100644 index 00000000..4c7a2137 --- /dev/null +++ b/api/models/v1_cluster_workload_deployment.go @@ -0,0 +1,96 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ClusterWorkloadDeployment Cluster workload deployment summary +// +// swagger:model v1ClusterWorkloadDeployment +type V1ClusterWorkloadDeployment struct { + + // metadata + Metadata *V1ClusterWorkloadMetadata `json:"metadata,omitempty"` + + // status + Status *V1ClusterWorkloadDeploymentStatus `json:"status,omitempty"` +} + +// Validate validates this v1 cluster workload deployment +func (m *V1ClusterWorkloadDeployment) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if err := m.validateStatus(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ClusterWorkloadDeployment) validateMetadata(formats strfmt.Registry) error { + + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } + return err + } + } + + return nil +} + +func (m *V1ClusterWorkloadDeployment) validateStatus(formats strfmt.Registry) error { + + if swag.IsZero(m.Status) { // not required + return nil + } + + if m.Status != nil { + if err := m.Status.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("status") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ClusterWorkloadDeployment) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ClusterWorkloadDeployment) UnmarshalBinary(b []byte) error { + var res V1ClusterWorkloadDeployment + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cluster_workload_deployment_status.go b/api/models/v1_cluster_workload_deployment_status.go new file mode 100644 index 00000000..a46c1e29 --- /dev/null +++ b/api/models/v1_cluster_workload_deployment_status.go @@ -0,0 +1,71 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ClusterWorkloadDeploymentStatus Cluster workload deployment status +// +// swagger:model v1ClusterWorkloadDeploymentStatus +type V1ClusterWorkloadDeploymentStatus struct { + + // replicas + Replicas *V1ClusterWorkloadReplicaStatus `json:"replicas,omitempty"` +} + +// Validate validates this v1 cluster workload deployment status +func (m *V1ClusterWorkloadDeploymentStatus) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateReplicas(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ClusterWorkloadDeploymentStatus) validateReplicas(formats strfmt.Registry) error { + + if swag.IsZero(m.Replicas) { // not required + return nil + } + + if m.Replicas != nil { + if err := m.Replicas.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("replicas") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ClusterWorkloadDeploymentStatus) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ClusterWorkloadDeploymentStatus) UnmarshalBinary(b []byte) error { + var res V1ClusterWorkloadDeploymentStatus + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cluster_workload_deployments.go b/api/models/v1_cluster_workload_deployments.go new file mode 100644 index 00000000..fc24a795 --- /dev/null +++ b/api/models/v1_cluster_workload_deployments.go @@ -0,0 +1,80 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ClusterWorkloadDeployments Cluster workload deployments summary +// +// swagger:model v1ClusterWorkloadDeployments +type V1ClusterWorkloadDeployments struct { + + // deployments + Deployments []*V1ClusterWorkloadDeployment `json:"deployments"` +} + +// Validate validates this v1 cluster workload deployments +func (m *V1ClusterWorkloadDeployments) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateDeployments(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ClusterWorkloadDeployments) validateDeployments(formats strfmt.Registry) error { + + if swag.IsZero(m.Deployments) { // not required + return nil + } + + for i := 0; i < len(m.Deployments); i++ { + if swag.IsZero(m.Deployments[i]) { // not required + continue + } + + if m.Deployments[i] != nil { + if err := m.Deployments[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("deployments" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ClusterWorkloadDeployments) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ClusterWorkloadDeployments) UnmarshalBinary(b []byte) error { + var res V1ClusterWorkloadDeployments + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cluster_workload_job.go b/api/models/v1_cluster_workload_job.go new file mode 100644 index 00000000..b0c65c7e --- /dev/null +++ b/api/models/v1_cluster_workload_job.go @@ -0,0 +1,96 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ClusterWorkloadJob Cluster workload job summary +// +// swagger:model v1ClusterWorkloadJob +type V1ClusterWorkloadJob struct { + + // metadata + Metadata *V1ClusterWorkloadMetadata `json:"metadata,omitempty"` + + // status + Status *V1ClusterWorkloadJobStatus `json:"status,omitempty"` +} + +// Validate validates this v1 cluster workload job +func (m *V1ClusterWorkloadJob) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if err := m.validateStatus(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ClusterWorkloadJob) validateMetadata(formats strfmt.Registry) error { + + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } + return err + } + } + + return nil +} + +func (m *V1ClusterWorkloadJob) validateStatus(formats strfmt.Registry) error { + + if swag.IsZero(m.Status) { // not required + return nil + } + + if m.Status != nil { + if err := m.Status.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("status") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ClusterWorkloadJob) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ClusterWorkloadJob) UnmarshalBinary(b []byte) error { + var res V1ClusterWorkloadJob + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cluster_workload_job_status.go b/api/models/v1_cluster_workload_job_status.go new file mode 100644 index 00000000..2b3a52e2 --- /dev/null +++ b/api/models/v1_cluster_workload_job_status.go @@ -0,0 +1,131 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ClusterWorkloadJobStatus Cluster workload job status +// +// swagger:model v1ClusterWorkloadJobStatus +type V1ClusterWorkloadJobStatus struct { + + // completion time + // Format: date-time + CompletionTime V1Time `json:"completionTime,omitempty"` + + // conditions + Conditions []*V1ClusterWorkloadCondition `json:"conditions"` + + // start time + // Format: date-time + StartTime V1Time `json:"startTime,omitempty"` + + // succeeded + Succeeded int32 `json:"succeeded,omitempty"` +} + +// Validate validates this v1 cluster workload job status +func (m *V1ClusterWorkloadJobStatus) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateCompletionTime(formats); err != nil { + res = append(res, err) + } + + if err := m.validateConditions(formats); err != nil { + res = append(res, err) + } + + if err := m.validateStartTime(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ClusterWorkloadJobStatus) validateCompletionTime(formats strfmt.Registry) error { + + if swag.IsZero(m.CompletionTime) { // not required + return nil + } + + if err := m.CompletionTime.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("completionTime") + } + return err + } + + return nil +} + +func (m *V1ClusterWorkloadJobStatus) validateConditions(formats strfmt.Registry) error { + + if swag.IsZero(m.Conditions) { // not required + return nil + } + + for i := 0; i < len(m.Conditions); i++ { + if swag.IsZero(m.Conditions[i]) { // not required + continue + } + + if m.Conditions[i] != nil { + if err := m.Conditions[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("conditions" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1ClusterWorkloadJobStatus) validateStartTime(formats strfmt.Registry) error { + + if swag.IsZero(m.StartTime) { // not required + return nil + } + + if err := m.StartTime.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("startTime") + } + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ClusterWorkloadJobStatus) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ClusterWorkloadJobStatus) UnmarshalBinary(b []byte) error { + var res V1ClusterWorkloadJobStatus + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cluster_workload_jobs.go b/api/models/v1_cluster_workload_jobs.go new file mode 100644 index 00000000..a4967681 --- /dev/null +++ b/api/models/v1_cluster_workload_jobs.go @@ -0,0 +1,80 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ClusterWorkloadJobs Cluster workload jobs summary +// +// swagger:model v1ClusterWorkloadJobs +type V1ClusterWorkloadJobs struct { + + // jobs + Jobs []*V1ClusterWorkloadJob `json:"jobs"` +} + +// Validate validates this v1 cluster workload jobs +func (m *V1ClusterWorkloadJobs) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateJobs(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ClusterWorkloadJobs) validateJobs(formats strfmt.Registry) error { + + if swag.IsZero(m.Jobs) { // not required + return nil + } + + for i := 0; i < len(m.Jobs); i++ { + if swag.IsZero(m.Jobs[i]) { // not required + continue + } + + if m.Jobs[i] != nil { + if err := m.Jobs[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("jobs" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ClusterWorkloadJobs) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ClusterWorkloadJobs) UnmarshalBinary(b []byte) error { + var res V1ClusterWorkloadJobs + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cluster_workload_metadata.go b/api/models/v1_cluster_workload_metadata.go new file mode 100644 index 00000000..2a921593 --- /dev/null +++ b/api/models/v1_cluster_workload_metadata.go @@ -0,0 +1,101 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ClusterWorkloadMetadata Cluster workload metadata +// +// swagger:model v1ClusterWorkloadMetadata +type V1ClusterWorkloadMetadata struct { + + // creation timestamp + // Format: date-time + CreationTimestamp V1Time `json:"creationTimestamp,omitempty"` + + // entity + Entity *V1ClusterWorkloadRef `json:"entity,omitempty"` + + // labels + Labels map[string]string `json:"labels,omitempty"` + + // namespace + Namespace string `json:"namespace,omitempty"` +} + +// Validate validates this v1 cluster workload metadata +func (m *V1ClusterWorkloadMetadata) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateCreationTimestamp(formats); err != nil { + res = append(res, err) + } + + if err := m.validateEntity(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ClusterWorkloadMetadata) validateCreationTimestamp(formats strfmt.Registry) error { + + if swag.IsZero(m.CreationTimestamp) { // not required + return nil + } + + if err := m.CreationTimestamp.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("creationTimestamp") + } + return err + } + + return nil +} + +func (m *V1ClusterWorkloadMetadata) validateEntity(formats strfmt.Registry) error { + + if swag.IsZero(m.Entity) { // not required + return nil + } + + if m.Entity != nil { + if err := m.Entity.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("entity") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ClusterWorkloadMetadata) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ClusterWorkloadMetadata) UnmarshalBinary(b []byte) error { + var res V1ClusterWorkloadMetadata + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cluster_workload_namespace.go b/api/models/v1_cluster_workload_namespace.go new file mode 100644 index 00000000..a3573eb0 --- /dev/null +++ b/api/models/v1_cluster_workload_namespace.go @@ -0,0 +1,96 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ClusterWorkloadNamespace Cluster workload namespace summary +// +// swagger:model v1ClusterWorkloadNamespace +type V1ClusterWorkloadNamespace struct { + + // metadata + Metadata *V1ClusterWorkloadMetadata `json:"metadata,omitempty"` + + // status + Status *V1ClusterWorkloadNamespaceStatus `json:"status,omitempty"` +} + +// Validate validates this v1 cluster workload namespace +func (m *V1ClusterWorkloadNamespace) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if err := m.validateStatus(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ClusterWorkloadNamespace) validateMetadata(formats strfmt.Registry) error { + + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } + return err + } + } + + return nil +} + +func (m *V1ClusterWorkloadNamespace) validateStatus(formats strfmt.Registry) error { + + if swag.IsZero(m.Status) { // not required + return nil + } + + if m.Status != nil { + if err := m.Status.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("status") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ClusterWorkloadNamespace) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ClusterWorkloadNamespace) UnmarshalBinary(b []byte) error { + var res V1ClusterWorkloadNamespace + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cluster_workload_namespace_status.go b/api/models/v1_cluster_workload_namespace_status.go new file mode 100644 index 00000000..63d7f50f --- /dev/null +++ b/api/models/v1_cluster_workload_namespace_status.go @@ -0,0 +1,43 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ClusterWorkloadNamespaceStatus Cluster workload namespace status +// +// swagger:model v1ClusterWorkloadNamespaceStatus +type V1ClusterWorkloadNamespaceStatus struct { + + // phase + Phase string `json:"phase,omitempty"` +} + +// Validate validates this v1 cluster workload namespace status +func (m *V1ClusterWorkloadNamespaceStatus) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1ClusterWorkloadNamespaceStatus) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ClusterWorkloadNamespaceStatus) UnmarshalBinary(b []byte) error { + var res V1ClusterWorkloadNamespaceStatus + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cluster_workload_namespaces.go b/api/models/v1_cluster_workload_namespaces.go new file mode 100644 index 00000000..76d9c8b7 --- /dev/null +++ b/api/models/v1_cluster_workload_namespaces.go @@ -0,0 +1,80 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ClusterWorkloadNamespaces Cluster workload namespaces summary +// +// swagger:model v1ClusterWorkloadNamespaces +type V1ClusterWorkloadNamespaces struct { + + // namespaces + Namespaces []*V1ClusterWorkloadNamespace `json:"namespaces"` +} + +// Validate validates this v1 cluster workload namespaces +func (m *V1ClusterWorkloadNamespaces) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateNamespaces(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ClusterWorkloadNamespaces) validateNamespaces(formats strfmt.Registry) error { + + if swag.IsZero(m.Namespaces) { // not required + return nil + } + + for i := 0; i < len(m.Namespaces); i++ { + if swag.IsZero(m.Namespaces[i]) { // not required + continue + } + + if m.Namespaces[i] != nil { + if err := m.Namespaces[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("namespaces" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ClusterWorkloadNamespaces) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ClusterWorkloadNamespaces) UnmarshalBinary(b []byte) error { + var res V1ClusterWorkloadNamespaces + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cluster_workload_pod.go b/api/models/v1_cluster_workload_pod.go new file mode 100644 index 00000000..bc02ab29 --- /dev/null +++ b/api/models/v1_cluster_workload_pod.go @@ -0,0 +1,121 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ClusterWorkloadPod Cluster workload pod summary +// +// swagger:model v1ClusterWorkloadPod +type V1ClusterWorkloadPod struct { + + // metadata + Metadata *V1ClusterWorkloadPodMetadata `json:"metadata,omitempty"` + + // spec + Spec *V1ClusterWorkloadPodSpec `json:"spec,omitempty"` + + // status + Status *V1ClusterWorkloadPodStatus `json:"status,omitempty"` +} + +// Validate validates this v1 cluster workload pod +func (m *V1ClusterWorkloadPod) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSpec(formats); err != nil { + res = append(res, err) + } + + if err := m.validateStatus(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ClusterWorkloadPod) validateMetadata(formats strfmt.Registry) error { + + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } + return err + } + } + + return nil +} + +func (m *V1ClusterWorkloadPod) validateSpec(formats strfmt.Registry) error { + + if swag.IsZero(m.Spec) { // not required + return nil + } + + if m.Spec != nil { + if err := m.Spec.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec") + } + return err + } + } + + return nil +} + +func (m *V1ClusterWorkloadPod) validateStatus(formats strfmt.Registry) error { + + if swag.IsZero(m.Status) { // not required + return nil + } + + if m.Status != nil { + if err := m.Status.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("status") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ClusterWorkloadPod) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ClusterWorkloadPod) UnmarshalBinary(b []byte) error { + var res V1ClusterWorkloadPod + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cluster_workload_pod_container.go b/api/models/v1_cluster_workload_pod_container.go new file mode 100644 index 00000000..8852d4cc --- /dev/null +++ b/api/models/v1_cluster_workload_pod_container.go @@ -0,0 +1,77 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ClusterWorkloadPodContainer Cluster workload pod container +// +// swagger:model v1ClusterWorkloadPodContainer +type V1ClusterWorkloadPodContainer struct { + + // image + Image string `json:"image,omitempty"` + + // name + Name string `json:"name,omitempty"` + + // resources + Resources *V1ClusterWorkloadPodContainerResources `json:"resources,omitempty"` +} + +// Validate validates this v1 cluster workload pod container +func (m *V1ClusterWorkloadPodContainer) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateResources(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ClusterWorkloadPodContainer) validateResources(formats strfmt.Registry) error { + + if swag.IsZero(m.Resources) { // not required + return nil + } + + if m.Resources != nil { + if err := m.Resources.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("resources") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ClusterWorkloadPodContainer) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ClusterWorkloadPodContainer) UnmarshalBinary(b []byte) error { + var res V1ClusterWorkloadPodContainer + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cluster_workload_pod_container_resource.go b/api/models/v1_cluster_workload_pod_container_resource.go new file mode 100644 index 00000000..7b22a364 --- /dev/null +++ b/api/models/v1_cluster_workload_pod_container_resource.go @@ -0,0 +1,52 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ClusterWorkloadPodContainerResource Cluster workload pod container resource +// +// swagger:model v1ClusterWorkloadPodContainerResource +type V1ClusterWorkloadPodContainerResource struct { + + // cpu + CPU int32 `json:"cpu"` + + // cpu unit + CPUUnit string `json:"cpuUnit,omitempty"` + + // memory + Memory int64 `json:"memory"` + + // memory unit + MemoryUnit string `json:"memoryUnit,omitempty"` +} + +// Validate validates this v1 cluster workload pod container resource +func (m *V1ClusterWorkloadPodContainerResource) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1ClusterWorkloadPodContainerResource) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ClusterWorkloadPodContainerResource) UnmarshalBinary(b []byte) error { + var res V1ClusterWorkloadPodContainerResource + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cluster_workload_pod_container_resources.go b/api/models/v1_cluster_workload_pod_container_resources.go new file mode 100644 index 00000000..c0162565 --- /dev/null +++ b/api/models/v1_cluster_workload_pod_container_resources.go @@ -0,0 +1,96 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ClusterWorkloadPodContainerResources Cluster workload pod container resources +// +// swagger:model v1ClusterWorkloadPodContainerResources +type V1ClusterWorkloadPodContainerResources struct { + + // limits + Limits *V1ClusterWorkloadPodContainerResource `json:"limits,omitempty"` + + // requests + Requests *V1ClusterWorkloadPodContainerResource `json:"requests,omitempty"` +} + +// Validate validates this v1 cluster workload pod container resources +func (m *V1ClusterWorkloadPodContainerResources) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateLimits(formats); err != nil { + res = append(res, err) + } + + if err := m.validateRequests(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ClusterWorkloadPodContainerResources) validateLimits(formats strfmt.Registry) error { + + if swag.IsZero(m.Limits) { // not required + return nil + } + + if m.Limits != nil { + if err := m.Limits.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("limits") + } + return err + } + } + + return nil +} + +func (m *V1ClusterWorkloadPodContainerResources) validateRequests(formats strfmt.Registry) error { + + if swag.IsZero(m.Requests) { // not required + return nil + } + + if m.Requests != nil { + if err := m.Requests.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("requests") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ClusterWorkloadPodContainerResources) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ClusterWorkloadPodContainerResources) UnmarshalBinary(b []byte) error { + var res V1ClusterWorkloadPodContainerResources + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cluster_workload_pod_container_state.go b/api/models/v1_cluster_workload_pod_container_state.go new file mode 100644 index 00000000..90793820 --- /dev/null +++ b/api/models/v1_cluster_workload_pod_container_state.go @@ -0,0 +1,103 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ClusterWorkloadPodContainerState Cluster workload pod container state +// +// swagger:model v1ClusterWorkloadPodContainerState +type V1ClusterWorkloadPodContainerState struct { + + // exit code + ExitCode int32 `json:"exitCode"` + + // finished at + // Format: date-time + FinishedAt V1Time `json:"finishedAt,omitempty"` + + // reason + Reason string `json:"reason,omitempty"` + + // started at + // Format: date-time + StartedAt V1Time `json:"startedAt,omitempty"` + + // state + State string `json:"state,omitempty"` +} + +// Validate validates this v1 cluster workload pod container state +func (m *V1ClusterWorkloadPodContainerState) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateFinishedAt(formats); err != nil { + res = append(res, err) + } + + if err := m.validateStartedAt(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ClusterWorkloadPodContainerState) validateFinishedAt(formats strfmt.Registry) error { + + if swag.IsZero(m.FinishedAt) { // not required + return nil + } + + if err := m.FinishedAt.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("finishedAt") + } + return err + } + + return nil +} + +func (m *V1ClusterWorkloadPodContainerState) validateStartedAt(formats strfmt.Registry) error { + + if swag.IsZero(m.StartedAt) { // not required + return nil + } + + if err := m.StartedAt.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("startedAt") + } + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ClusterWorkloadPodContainerState) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ClusterWorkloadPodContainerState) UnmarshalBinary(b []byte) error { + var res V1ClusterWorkloadPodContainerState + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cluster_workload_pod_container_status.go b/api/models/v1_cluster_workload_pod_container_status.go new file mode 100644 index 00000000..4c8cae7a --- /dev/null +++ b/api/models/v1_cluster_workload_pod_container_status.go @@ -0,0 +1,86 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ClusterWorkloadPodContainerStatus Cluster workload pod container status +// +// swagger:model v1ClusterWorkloadPodContainerStatus +type V1ClusterWorkloadPodContainerStatus struct { + + // image + Image string `json:"image,omitempty"` + + // name + Name string `json:"name,omitempty"` + + // ready + Ready bool `json:"ready"` + + // restart count + RestartCount int32 `json:"restartCount"` + + // started + Started bool `json:"started"` + + // state + State *V1ClusterWorkloadPodContainerState `json:"state,omitempty"` +} + +// Validate validates this v1 cluster workload pod container status +func (m *V1ClusterWorkloadPodContainerStatus) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateState(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ClusterWorkloadPodContainerStatus) validateState(formats strfmt.Registry) error { + + if swag.IsZero(m.State) { // not required + return nil + } + + if m.State != nil { + if err := m.State.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("state") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ClusterWorkloadPodContainerStatus) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ClusterWorkloadPodContainerStatus) UnmarshalBinary(b []byte) error { + var res V1ClusterWorkloadPodContainerStatus + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cluster_workload_pod_metadata.go b/api/models/v1_cluster_workload_pod_metadata.go new file mode 100644 index 00000000..2caebc91 --- /dev/null +++ b/api/models/v1_cluster_workload_pod_metadata.go @@ -0,0 +1,141 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ClusterWorkloadPodMetadata Cluster workload pod metadata +// +// swagger:model v1ClusterWorkloadPodMetadata +type V1ClusterWorkloadPodMetadata struct { + + // associated refs + AssociatedRefs []*V1ClusterWorkloadRef `json:"associatedRefs"` + + // creation timestamp + // Format: date-time + CreationTimestamp V1Time `json:"creationTimestamp,omitempty"` + + // entity + Entity *V1ClusterWorkloadRef `json:"entity,omitempty"` + + // labels + Labels map[string]string `json:"labels,omitempty"` + + // machine Uid + MachineUID string `json:"machineUid,omitempty"` + + // namespace + Namespace string `json:"namespace,omitempty"` + + // nodename + Nodename string `json:"nodename,omitempty"` +} + +// Validate validates this v1 cluster workload pod metadata +func (m *V1ClusterWorkloadPodMetadata) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateAssociatedRefs(formats); err != nil { + res = append(res, err) + } + + if err := m.validateCreationTimestamp(formats); err != nil { + res = append(res, err) + } + + if err := m.validateEntity(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ClusterWorkloadPodMetadata) validateAssociatedRefs(formats strfmt.Registry) error { + + if swag.IsZero(m.AssociatedRefs) { // not required + return nil + } + + for i := 0; i < len(m.AssociatedRefs); i++ { + if swag.IsZero(m.AssociatedRefs[i]) { // not required + continue + } + + if m.AssociatedRefs[i] != nil { + if err := m.AssociatedRefs[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("associatedRefs" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1ClusterWorkloadPodMetadata) validateCreationTimestamp(formats strfmt.Registry) error { + + if swag.IsZero(m.CreationTimestamp) { // not required + return nil + } + + if err := m.CreationTimestamp.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("creationTimestamp") + } + return err + } + + return nil +} + +func (m *V1ClusterWorkloadPodMetadata) validateEntity(formats strfmt.Registry) error { + + if swag.IsZero(m.Entity) { // not required + return nil + } + + if m.Entity != nil { + if err := m.Entity.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("entity") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ClusterWorkloadPodMetadata) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ClusterWorkloadPodMetadata) UnmarshalBinary(b []byte) error { + var res V1ClusterWorkloadPodMetadata + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cluster_workload_pod_spec.go b/api/models/v1_cluster_workload_pod_spec.go new file mode 100644 index 00000000..5977d5f4 --- /dev/null +++ b/api/models/v1_cluster_workload_pod_spec.go @@ -0,0 +1,112 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ClusterWorkloadPodSpec Cluster workload pod spec +// +// swagger:model v1ClusterWorkloadPodSpec +type V1ClusterWorkloadPodSpec struct { + + // containers + Containers []*V1ClusterWorkloadPodContainer `json:"containers"` + + // volumes + Volumes []*V1ClusterWorkloadPodVolume `json:"volumes"` +} + +// Validate validates this v1 cluster workload pod spec +func (m *V1ClusterWorkloadPodSpec) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateContainers(formats); err != nil { + res = append(res, err) + } + + if err := m.validateVolumes(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ClusterWorkloadPodSpec) validateContainers(formats strfmt.Registry) error { + + if swag.IsZero(m.Containers) { // not required + return nil + } + + for i := 0; i < len(m.Containers); i++ { + if swag.IsZero(m.Containers[i]) { // not required + continue + } + + if m.Containers[i] != nil { + if err := m.Containers[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("containers" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1ClusterWorkloadPodSpec) validateVolumes(formats strfmt.Registry) error { + + if swag.IsZero(m.Volumes) { // not required + return nil + } + + for i := 0; i < len(m.Volumes); i++ { + if swag.IsZero(m.Volumes[i]) { // not required + continue + } + + if m.Volumes[i] != nil { + if err := m.Volumes[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("volumes" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ClusterWorkloadPodSpec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ClusterWorkloadPodSpec) UnmarshalBinary(b []byte) error { + var res V1ClusterWorkloadPodSpec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cluster_workload_pod_status.go b/api/models/v1_cluster_workload_pod_status.go new file mode 100644 index 00000000..5bf2fca8 --- /dev/null +++ b/api/models/v1_cluster_workload_pod_status.go @@ -0,0 +1,89 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ClusterWorkloadPodStatus Cluster workload pod status +// +// swagger:model v1ClusterWorkloadPodStatus +type V1ClusterWorkloadPodStatus struct { + + // containers + Containers []*V1ClusterWorkloadPodContainerStatus `json:"containers"` + + // phase + Phase string `json:"phase,omitempty"` + + // pod Ip + PodIP string `json:"podIp,omitempty"` + + // qos class + QosClass string `json:"qosClass,omitempty"` +} + +// Validate validates this v1 cluster workload pod status +func (m *V1ClusterWorkloadPodStatus) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateContainers(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ClusterWorkloadPodStatus) validateContainers(formats strfmt.Registry) error { + + if swag.IsZero(m.Containers) { // not required + return nil + } + + for i := 0; i < len(m.Containers); i++ { + if swag.IsZero(m.Containers[i]) { // not required + continue + } + + if m.Containers[i] != nil { + if err := m.Containers[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("containers" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ClusterWorkloadPodStatus) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ClusterWorkloadPodStatus) UnmarshalBinary(b []byte) error { + var res V1ClusterWorkloadPodStatus + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cluster_workload_pod_volume.go b/api/models/v1_cluster_workload_pod_volume.go new file mode 100644 index 00000000..d2dc1a3f --- /dev/null +++ b/api/models/v1_cluster_workload_pod_volume.go @@ -0,0 +1,43 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ClusterWorkloadPodVolume Cluster workload pod volume +// +// swagger:model v1ClusterWorkloadPodVolume +type V1ClusterWorkloadPodVolume struct { + + // name + Name string `json:"name,omitempty"` +} + +// Validate validates this v1 cluster workload pod volume +func (m *V1ClusterWorkloadPodVolume) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1ClusterWorkloadPodVolume) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ClusterWorkloadPodVolume) UnmarshalBinary(b []byte) error { + var res V1ClusterWorkloadPodVolume + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cluster_workload_pods.go b/api/models/v1_cluster_workload_pods.go new file mode 100644 index 00000000..9c1c569b --- /dev/null +++ b/api/models/v1_cluster_workload_pods.go @@ -0,0 +1,80 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ClusterWorkloadPods Cluster workload pods summary +// +// swagger:model v1ClusterWorkloadPods +type V1ClusterWorkloadPods struct { + + // pods + Pods []*V1ClusterWorkloadPod `json:"pods"` +} + +// Validate validates this v1 cluster workload pods +func (m *V1ClusterWorkloadPods) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validatePods(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ClusterWorkloadPods) validatePods(formats strfmt.Registry) error { + + if swag.IsZero(m.Pods) { // not required + return nil + } + + for i := 0; i < len(m.Pods); i++ { + if swag.IsZero(m.Pods[i]) { // not required + continue + } + + if m.Pods[i] != nil { + if err := m.Pods[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("pods" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ClusterWorkloadPods) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ClusterWorkloadPods) UnmarshalBinary(b []byte) error { + var res V1ClusterWorkloadPods + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cluster_workload_ref.go b/api/models/v1_cluster_workload_ref.go new file mode 100644 index 00000000..4707fd94 --- /dev/null +++ b/api/models/v1_cluster_workload_ref.go @@ -0,0 +1,49 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ClusterWorkloadRef Cluster workload ref +// +// swagger:model v1ClusterWorkloadRef +type V1ClusterWorkloadRef struct { + + // kind + Kind string `json:"kind,omitempty"` + + // name + Name string `json:"name,omitempty"` + + // uid + UID string `json:"uid,omitempty"` +} + +// Validate validates this v1 cluster workload ref +func (m *V1ClusterWorkloadRef) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1ClusterWorkloadRef) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ClusterWorkloadRef) UnmarshalBinary(b []byte) error { + var res V1ClusterWorkloadRef + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cluster_workload_replica_status.go b/api/models/v1_cluster_workload_replica_status.go new file mode 100644 index 00000000..099f8f7a --- /dev/null +++ b/api/models/v1_cluster_workload_replica_status.go @@ -0,0 +1,52 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ClusterWorkloadReplicaStatus Cluster workload replica status +// +// swagger:model v1ClusterWorkloadReplicaStatus +type V1ClusterWorkloadReplicaStatus struct { + + // available + Available int32 `json:"available"` + + // ready + Ready int32 `json:"ready"` + + // total + Total int32 `json:"total"` + + // updated + Updated int32 `json:"updated"` +} + +// Validate validates this v1 cluster workload replica status +func (m *V1ClusterWorkloadReplicaStatus) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1ClusterWorkloadReplicaStatus) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ClusterWorkloadReplicaStatus) UnmarshalBinary(b []byte) error { + var res V1ClusterWorkloadReplicaStatus + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cluster_workload_role_binding.go b/api/models/v1_cluster_workload_role_binding.go new file mode 100644 index 00000000..a359727a --- /dev/null +++ b/api/models/v1_cluster_workload_role_binding.go @@ -0,0 +1,96 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ClusterWorkloadRoleBinding Cluster workload rbac binding summary +// +// swagger:model v1ClusterWorkloadRoleBinding +type V1ClusterWorkloadRoleBinding struct { + + // metadata + Metadata *V1ClusterWorkloadMetadata `json:"metadata,omitempty"` + + // spec + Spec *V1ClusterRbacBinding `json:"spec,omitempty"` +} + +// Validate validates this v1 cluster workload role binding +func (m *V1ClusterWorkloadRoleBinding) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSpec(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ClusterWorkloadRoleBinding) validateMetadata(formats strfmt.Registry) error { + + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } + return err + } + } + + return nil +} + +func (m *V1ClusterWorkloadRoleBinding) validateSpec(formats strfmt.Registry) error { + + if swag.IsZero(m.Spec) { // not required + return nil + } + + if m.Spec != nil { + if err := m.Spec.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ClusterWorkloadRoleBinding) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ClusterWorkloadRoleBinding) UnmarshalBinary(b []byte) error { + var res V1ClusterWorkloadRoleBinding + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cluster_workload_role_bindings.go b/api/models/v1_cluster_workload_role_bindings.go new file mode 100644 index 00000000..0332d663 --- /dev/null +++ b/api/models/v1_cluster_workload_role_bindings.go @@ -0,0 +1,80 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ClusterWorkloadRoleBindings Cluster workload rbac bindings summary +// +// swagger:model v1ClusterWorkloadRoleBindings +type V1ClusterWorkloadRoleBindings struct { + + // bindings + Bindings []*V1ClusterWorkloadRoleBinding `json:"bindings"` +} + +// Validate validates this v1 cluster workload role bindings +func (m *V1ClusterWorkloadRoleBindings) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateBindings(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ClusterWorkloadRoleBindings) validateBindings(formats strfmt.Registry) error { + + if swag.IsZero(m.Bindings) { // not required + return nil + } + + for i := 0; i < len(m.Bindings); i++ { + if swag.IsZero(m.Bindings[i]) { // not required + continue + } + + if m.Bindings[i] != nil { + if err := m.Bindings[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("bindings" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ClusterWorkloadRoleBindings) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ClusterWorkloadRoleBindings) UnmarshalBinary(b []byte) error { + var res V1ClusterWorkloadRoleBindings + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cluster_workload_spec.go b/api/models/v1_cluster_workload_spec.go new file mode 100644 index 00000000..04b7f226 --- /dev/null +++ b/api/models/v1_cluster_workload_spec.go @@ -0,0 +1,304 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ClusterWorkloadSpec Cluster workload spec +// +// swagger:model v1ClusterWorkloadSpec +type V1ClusterWorkloadSpec struct { + + // clusterrole bindings + ClusterroleBindings []*V1ClusterWorkloadRoleBinding `json:"clusterroleBindings"` + + // cron jobs + CronJobs []*V1ClusterWorkloadCronJob `json:"cronJobs"` + + // daemon sets + DaemonSets []*V1ClusterWorkloadDaemonSet `json:"daemonSets"` + + // deployments + Deployments []*V1ClusterWorkloadDeployment `json:"deployments"` + + // jobs + Jobs []*V1ClusterWorkloadJob `json:"jobs"` + + // pods + Pods []*V1ClusterWorkloadPod `json:"pods"` + + // role bindings + RoleBindings []*V1ClusterWorkloadRoleBinding `json:"roleBindings"` + + // stateful sets + StatefulSets []*V1ClusterWorkloadStatefulSet `json:"statefulSets"` +} + +// Validate validates this v1 cluster workload spec +func (m *V1ClusterWorkloadSpec) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateClusterroleBindings(formats); err != nil { + res = append(res, err) + } + + if err := m.validateCronJobs(formats); err != nil { + res = append(res, err) + } + + if err := m.validateDaemonSets(formats); err != nil { + res = append(res, err) + } + + if err := m.validateDeployments(formats); err != nil { + res = append(res, err) + } + + if err := m.validateJobs(formats); err != nil { + res = append(res, err) + } + + if err := m.validatePods(formats); err != nil { + res = append(res, err) + } + + if err := m.validateRoleBindings(formats); err != nil { + res = append(res, err) + } + + if err := m.validateStatefulSets(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ClusterWorkloadSpec) validateClusterroleBindings(formats strfmt.Registry) error { + + if swag.IsZero(m.ClusterroleBindings) { // not required + return nil + } + + for i := 0; i < len(m.ClusterroleBindings); i++ { + if swag.IsZero(m.ClusterroleBindings[i]) { // not required + continue + } + + if m.ClusterroleBindings[i] != nil { + if err := m.ClusterroleBindings[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("clusterroleBindings" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1ClusterWorkloadSpec) validateCronJobs(formats strfmt.Registry) error { + + if swag.IsZero(m.CronJobs) { // not required + return nil + } + + for i := 0; i < len(m.CronJobs); i++ { + if swag.IsZero(m.CronJobs[i]) { // not required + continue + } + + if m.CronJobs[i] != nil { + if err := m.CronJobs[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("cronJobs" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1ClusterWorkloadSpec) validateDaemonSets(formats strfmt.Registry) error { + + if swag.IsZero(m.DaemonSets) { // not required + return nil + } + + for i := 0; i < len(m.DaemonSets); i++ { + if swag.IsZero(m.DaemonSets[i]) { // not required + continue + } + + if m.DaemonSets[i] != nil { + if err := m.DaemonSets[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("daemonSets" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1ClusterWorkloadSpec) validateDeployments(formats strfmt.Registry) error { + + if swag.IsZero(m.Deployments) { // not required + return nil + } + + for i := 0; i < len(m.Deployments); i++ { + if swag.IsZero(m.Deployments[i]) { // not required + continue + } + + if m.Deployments[i] != nil { + if err := m.Deployments[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("deployments" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1ClusterWorkloadSpec) validateJobs(formats strfmt.Registry) error { + + if swag.IsZero(m.Jobs) { // not required + return nil + } + + for i := 0; i < len(m.Jobs); i++ { + if swag.IsZero(m.Jobs[i]) { // not required + continue + } + + if m.Jobs[i] != nil { + if err := m.Jobs[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("jobs" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1ClusterWorkloadSpec) validatePods(formats strfmt.Registry) error { + + if swag.IsZero(m.Pods) { // not required + return nil + } + + for i := 0; i < len(m.Pods); i++ { + if swag.IsZero(m.Pods[i]) { // not required + continue + } + + if m.Pods[i] != nil { + if err := m.Pods[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("pods" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1ClusterWorkloadSpec) validateRoleBindings(formats strfmt.Registry) error { + + if swag.IsZero(m.RoleBindings) { // not required + return nil + } + + for i := 0; i < len(m.RoleBindings); i++ { + if swag.IsZero(m.RoleBindings[i]) { // not required + continue + } + + if m.RoleBindings[i] != nil { + if err := m.RoleBindings[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("roleBindings" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1ClusterWorkloadSpec) validateStatefulSets(formats strfmt.Registry) error { + + if swag.IsZero(m.StatefulSets) { // not required + return nil + } + + for i := 0; i < len(m.StatefulSets); i++ { + if swag.IsZero(m.StatefulSets[i]) { // not required + continue + } + + if m.StatefulSets[i] != nil { + if err := m.StatefulSets[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("statefulSets" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ClusterWorkloadSpec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ClusterWorkloadSpec) UnmarshalBinary(b []byte) error { + var res V1ClusterWorkloadSpec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cluster_workload_stateful_set.go b/api/models/v1_cluster_workload_stateful_set.go new file mode 100644 index 00000000..7fae366e --- /dev/null +++ b/api/models/v1_cluster_workload_stateful_set.go @@ -0,0 +1,96 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ClusterWorkloadStatefulSet Cluster workload statefulset summary +// +// swagger:model v1ClusterWorkloadStatefulSet +type V1ClusterWorkloadStatefulSet struct { + + // metadata + Metadata *V1ClusterWorkloadMetadata `json:"metadata,omitempty"` + + // status + Status *V1ClusterWorkloadStatefulSetStatus `json:"status,omitempty"` +} + +// Validate validates this v1 cluster workload stateful set +func (m *V1ClusterWorkloadStatefulSet) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if err := m.validateStatus(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ClusterWorkloadStatefulSet) validateMetadata(formats strfmt.Registry) error { + + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } + return err + } + } + + return nil +} + +func (m *V1ClusterWorkloadStatefulSet) validateStatus(formats strfmt.Registry) error { + + if swag.IsZero(m.Status) { // not required + return nil + } + + if m.Status != nil { + if err := m.Status.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("status") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ClusterWorkloadStatefulSet) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ClusterWorkloadStatefulSet) UnmarshalBinary(b []byte) error { + var res V1ClusterWorkloadStatefulSet + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cluster_workload_stateful_set_status.go b/api/models/v1_cluster_workload_stateful_set_status.go new file mode 100644 index 00000000..d5369724 --- /dev/null +++ b/api/models/v1_cluster_workload_stateful_set_status.go @@ -0,0 +1,71 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ClusterWorkloadStatefulSetStatus Cluster workload statefulset status +// +// swagger:model v1ClusterWorkloadStatefulSetStatus +type V1ClusterWorkloadStatefulSetStatus struct { + + // replicas + Replicas *V1ClusterWorkloadReplicaStatus `json:"replicas,omitempty"` +} + +// Validate validates this v1 cluster workload stateful set status +func (m *V1ClusterWorkloadStatefulSetStatus) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateReplicas(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ClusterWorkloadStatefulSetStatus) validateReplicas(formats strfmt.Registry) error { + + if swag.IsZero(m.Replicas) { // not required + return nil + } + + if m.Replicas != nil { + if err := m.Replicas.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("replicas") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ClusterWorkloadStatefulSetStatus) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ClusterWorkloadStatefulSetStatus) UnmarshalBinary(b []byte) error { + var res V1ClusterWorkloadStatefulSetStatus + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cluster_workload_stateful_sets.go b/api/models/v1_cluster_workload_stateful_sets.go new file mode 100644 index 00000000..b20bd364 --- /dev/null +++ b/api/models/v1_cluster_workload_stateful_sets.go @@ -0,0 +1,80 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ClusterWorkloadStatefulSets Cluster workload statefulsets summary +// +// swagger:model v1ClusterWorkloadStatefulSets +type V1ClusterWorkloadStatefulSets struct { + + // stateful sets + StatefulSets []*V1ClusterWorkloadStatefulSet `json:"statefulSets"` +} + +// Validate validates this v1 cluster workload stateful sets +func (m *V1ClusterWorkloadStatefulSets) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateStatefulSets(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ClusterWorkloadStatefulSets) validateStatefulSets(formats strfmt.Registry) error { + + if swag.IsZero(m.StatefulSets) { // not required + return nil + } + + for i := 0; i < len(m.StatefulSets); i++ { + if swag.IsZero(m.StatefulSets[i]) { // not required + continue + } + + if m.StatefulSets[i] != nil { + if err := m.StatefulSets[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("statefulSets" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ClusterWorkloadStatefulSets) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ClusterWorkloadStatefulSets) UnmarshalBinary(b []byte) error { + var res V1ClusterWorkloadStatefulSets + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cluster_workloads_filter.go b/api/models/v1_cluster_workloads_filter.go new file mode 100644 index 00000000..0345d627 --- /dev/null +++ b/api/models/v1_cluster_workloads_filter.go @@ -0,0 +1,68 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1ClusterWorkloadsFilter Cluster workloads filter +// +// swagger:model v1ClusterWorkloadsFilter +type V1ClusterWorkloadsFilter struct { + + // namespaces + // Unique: true + Namespaces []string `json:"namespaces"` +} + +// Validate validates this v1 cluster workloads filter +func (m *V1ClusterWorkloadsFilter) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateNamespaces(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ClusterWorkloadsFilter) validateNamespaces(formats strfmt.Registry) error { + + if swag.IsZero(m.Namespaces) { // not required + return nil + } + + if err := validate.UniqueItems("namespaces", "body", m.Namespaces); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ClusterWorkloadsFilter) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ClusterWorkloadsFilter) UnmarshalBinary(b []byte) error { + var res V1ClusterWorkloadsFilter + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cluster_workloads_spec.go b/api/models/v1_cluster_workloads_spec.go new file mode 100644 index 00000000..16962a84 --- /dev/null +++ b/api/models/v1_cluster_workloads_spec.go @@ -0,0 +1,71 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ClusterWorkloadsSpec Cluster workloads spec +// +// swagger:model v1ClusterWorkloadsSpec +type V1ClusterWorkloadsSpec struct { + + // filter + Filter *V1ClusterWorkloadsFilter `json:"filter,omitempty"` +} + +// Validate validates this v1 cluster workloads spec +func (m *V1ClusterWorkloadsSpec) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateFilter(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ClusterWorkloadsSpec) validateFilter(formats strfmt.Registry) error { + + if swag.IsZero(m.Filter) { // not required + return nil + } + + if m.Filter != nil { + if err := m.Filter.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("filter") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ClusterWorkloadsSpec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ClusterWorkloadsSpec) UnmarshalBinary(b []byte) error { + var res V1ClusterWorkloadsSpec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_compliance_scan_config.go b/api/models/v1_compliance_scan_config.go new file mode 100644 index 00000000..702a715f --- /dev/null +++ b/api/models/v1_compliance_scan_config.go @@ -0,0 +1,71 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ComplianceScanConfig Compliance Scan config +// +// swagger:model v1ComplianceScanConfig +type V1ComplianceScanConfig struct { + + // schedule + Schedule *V1ClusterFeatureSchedule `json:"schedule,omitempty"` +} + +// Validate validates this v1 compliance scan config +func (m *V1ComplianceScanConfig) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateSchedule(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ComplianceScanConfig) validateSchedule(formats strfmt.Registry) error { + + if swag.IsZero(m.Schedule) { // not required + return nil + } + + if m.Schedule != nil { + if err := m.Schedule.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("schedule") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ComplianceScanConfig) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ComplianceScanConfig) UnmarshalBinary(b []byte) error { + var res V1ComplianceScanConfig + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_compliance_scan_driver_spec.go b/api/models/v1_compliance_scan_driver_spec.go new file mode 100644 index 00000000..685c7468 --- /dev/null +++ b/api/models/v1_compliance_scan_driver_spec.go @@ -0,0 +1,74 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ComplianceScanDriverSpec Compliance Scan driver spec +// +// swagger:model v1ComplianceScanDriverSpec +type V1ComplianceScanDriverSpec struct { + + // config + Config *V1ComplianceScanConfig `json:"config,omitempty"` + + // is cluster config + IsClusterConfig bool `json:"isClusterConfig,omitempty"` +} + +// Validate validates this v1 compliance scan driver spec +func (m *V1ComplianceScanDriverSpec) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateConfig(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ComplianceScanDriverSpec) validateConfig(formats strfmt.Registry) error { + + if swag.IsZero(m.Config) { // not required + return nil + } + + if m.Config != nil { + if err := m.Config.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("config") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ComplianceScanDriverSpec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ComplianceScanDriverSpec) UnmarshalBinary(b []byte) error { + var res V1ComplianceScanDriverSpec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_compute_metrics.go b/api/models/v1_compute_metrics.go new file mode 100644 index 00000000..3dbe075e --- /dev/null +++ b/api/models/v1_compute_metrics.go @@ -0,0 +1,85 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ComputeMetrics Compute metrics +// +// swagger:model v1ComputeMetrics +type V1ComputeMetrics struct { + + // last updated time + // Format: date-time + LastUpdatedTime V1Time `json:"lastUpdatedTime,omitempty"` + + // limit + Limit float64 `json:"limit"` + + // request + Request float64 `json:"request"` + + // total + Total float64 `json:"total"` + + // unit + Unit string `json:"unit,omitempty"` + + // usage + Usage float64 `json:"usage"` +} + +// Validate validates this v1 compute metrics +func (m *V1ComputeMetrics) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateLastUpdatedTime(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ComputeMetrics) validateLastUpdatedTime(formats strfmt.Registry) error { + + if swag.IsZero(m.LastUpdatedTime) { // not required + return nil + } + + if err := m.LastUpdatedTime.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("lastUpdatedTime") + } + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ComputeMetrics) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ComputeMetrics) UnmarshalBinary(b []byte) error { + var res V1ComputeMetrics + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_compute_rate.go b/api/models/v1_compute_rate.go new file mode 100644 index 00000000..be693c20 --- /dev/null +++ b/api/models/v1_compute_rate.go @@ -0,0 +1,46 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ComputeRate Compute estimated rate information +// +// swagger:model v1ComputeRate +type V1ComputeRate struct { + + // rate + Rate float64 `json:"rate"` + + // type + Type string `json:"type,omitempty"` +} + +// Validate validates this v1 compute rate +func (m *V1ComputeRate) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1ComputeRate) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ComputeRate) UnmarshalBinary(b []byte) error { + var res V1ComputeRate + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_constraint_error.go b/api/models/v1_constraint_error.go new file mode 100644 index 00000000..9cadb978 --- /dev/null +++ b/api/models/v1_constraint_error.go @@ -0,0 +1,46 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ConstraintError v1 constraint error +// +// swagger:model v1ConstraintError +type V1ConstraintError struct { + + // code + Code string `json:"code,omitempty"` + + // message + Message string `json:"message,omitempty"` +} + +// Validate validates this v1 constraint error +func (m *V1ConstraintError) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1ConstraintError) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ConstraintError) UnmarshalBinary(b []byte) error { + var res V1ConstraintError + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_constraint_validator_response.go b/api/models/v1_constraint_validator_response.go new file mode 100644 index 00000000..20ab4351 --- /dev/null +++ b/api/models/v1_constraint_validator_response.go @@ -0,0 +1,86 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1ConstraintValidatorResponse Constraint validator response +// +// swagger:model v1ConstraintValidatorResponse +type V1ConstraintValidatorResponse struct { + + // results + // Unique: true + Results []*V1ConstraintValidatorResult `json:"results"` +} + +// Validate validates this v1 constraint validator response +func (m *V1ConstraintValidatorResponse) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateResults(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ConstraintValidatorResponse) validateResults(formats strfmt.Registry) error { + + if swag.IsZero(m.Results) { // not required + return nil + } + + if err := validate.UniqueItems("results", "body", m.Results); err != nil { + return err + } + + for i := 0; i < len(m.Results); i++ { + if swag.IsZero(m.Results[i]) { // not required + continue + } + + if m.Results[i] != nil { + if err := m.Results[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("results" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ConstraintValidatorResponse) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ConstraintValidatorResponse) UnmarshalBinary(b []byte) error { + var res V1ConstraintValidatorResponse + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_constraint_validator_result.go b/api/models/v1_constraint_validator_result.go new file mode 100644 index 00000000..2ba37ed0 --- /dev/null +++ b/api/models/v1_constraint_validator_result.go @@ -0,0 +1,92 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1ConstraintValidatorResult Constraint validator result +// +// swagger:model v1ConstraintValidatorResult +type V1ConstraintValidatorResult struct { + + // display name + DisplayName string `json:"displayName,omitempty"` + + // errors + // Unique: true + Errors []*V1ConstraintError `json:"errors"` + + // name + Name string `json:"name,omitempty"` +} + +// Validate validates this v1 constraint validator result +func (m *V1ConstraintValidatorResult) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateErrors(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ConstraintValidatorResult) validateErrors(formats strfmt.Registry) error { + + if swag.IsZero(m.Errors) { // not required + return nil + } + + if err := validate.UniqueItems("errors", "body", m.Errors); err != nil { + return err + } + + for i := 0; i < len(m.Errors); i++ { + if swag.IsZero(m.Errors[i]) { // not required + continue + } + + if m.Errors[i] != nil { + if err := m.Errors[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("errors" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ConstraintValidatorResult) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ConstraintValidatorResult) UnmarshalBinary(b []byte) error { + var res V1ConstraintValidatorResult + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_control_plane_end_point.go b/api/models/v1_control_plane_end_point.go new file mode 100644 index 00000000..61fd0e0c --- /dev/null +++ b/api/models/v1_control_plane_end_point.go @@ -0,0 +1,109 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "encoding/json" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1ControlPlaneEndPoint v1 control plane end point +// +// swagger:model v1ControlPlaneEndPoint +type V1ControlPlaneEndPoint struct { + + // DDNSSearchDomain is the search domain used for resolving IP addresses when the EndpointType is DDNS. This search domain is appended to the generated Hostname to obtain the complete DNS name for the endpoint. If Host is already a DDNS FQDN, DDNSSearchDomain is not required + DdnsSearchDomain string `json:"ddnsSearchDomain,omitempty"` + + // IP or FQDN(External/DDNS) + Host string `json:"host,omitempty"` + + // VIP or External + // Enum: [VIP External DDNS] + Type string `json:"type,omitempty"` +} + +// Validate validates this v1 control plane end point +func (m *V1ControlPlaneEndPoint) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateType(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +var v1ControlPlaneEndPointTypeTypePropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["VIP","External","DDNS"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + v1ControlPlaneEndPointTypeTypePropEnum = append(v1ControlPlaneEndPointTypeTypePropEnum, v) + } +} + +const ( + + // V1ControlPlaneEndPointTypeVIP captures enum value "VIP" + V1ControlPlaneEndPointTypeVIP string = "VIP" + + // V1ControlPlaneEndPointTypeExternal captures enum value "External" + V1ControlPlaneEndPointTypeExternal string = "External" + + // V1ControlPlaneEndPointTypeDDNS captures enum value "DDNS" + V1ControlPlaneEndPointTypeDDNS string = "DDNS" +) + +// prop value enum +func (m *V1ControlPlaneEndPoint) validateTypeEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, v1ControlPlaneEndPointTypeTypePropEnum, true); err != nil { + return err + } + return nil +} + +func (m *V1ControlPlaneEndPoint) validateType(formats strfmt.Registry) error { + + if swag.IsZero(m.Type) { // not required + return nil + } + + // value enum + if err := m.validateTypeEnum("type", "body", m.Type); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ControlPlaneEndPoint) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ControlPlaneEndPoint) UnmarshalBinary(b []byte) error { + var res V1ControlPlaneEndPoint + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_control_plane_health_check_timeout_entity.go b/api/models/v1_control_plane_health_check_timeout_entity.go new file mode 100644 index 00000000..3ecd5606 --- /dev/null +++ b/api/models/v1_control_plane_health_check_timeout_entity.go @@ -0,0 +1,43 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ControlPlaneHealthCheckTimeoutEntity v1 control plane health check timeout entity +// +// swagger:model v1ControlPlaneHealthCheckTimeoutEntity +type V1ControlPlaneHealthCheckTimeoutEntity struct { + + // ControlPlaneHealthCheckTimeout is the timeout to check for ready state of the control plane nodes + ControlPlaneHealthCheckTimeout string `json:"controlPlaneHealthCheckTimeout,omitempty"` +} + +// Validate validates this v1 control plane health check timeout entity +func (m *V1ControlPlaneHealthCheckTimeoutEntity) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1ControlPlaneHealthCheckTimeoutEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ControlPlaneHealthCheckTimeoutEntity) UnmarshalBinary(b []byte) error { + var res V1ControlPlaneHealthCheckTimeoutEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cox_edge_account.go b/api/models/v1_cox_edge_account.go new file mode 100644 index 00000000..87a24405 --- /dev/null +++ b/api/models/v1_cox_edge_account.go @@ -0,0 +1,127 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1CoxEdgeAccount CoxEdge cloud account information +// +// swagger:model v1CoxEdgeAccount +type V1CoxEdgeAccount struct { + + // Cloud account api version + APIVersion string `json:"apiVersion,omitempty"` + + // Cloud account kind + Kind string `json:"kind,omitempty"` + + // metadata + Metadata *V1ObjectMeta `json:"metadata,omitempty"` + + // spec + Spec *V1CoxEdgeCloudAccount `json:"spec,omitempty"` + + // status + Status *V1CloudAccountStatus `json:"status,omitempty"` +} + +// Validate validates this v1 cox edge account +func (m *V1CoxEdgeAccount) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSpec(formats); err != nil { + res = append(res, err) + } + + if err := m.validateStatus(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1CoxEdgeAccount) validateMetadata(formats strfmt.Registry) error { + + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } + return err + } + } + + return nil +} + +func (m *V1CoxEdgeAccount) validateSpec(formats strfmt.Registry) error { + + if swag.IsZero(m.Spec) { // not required + return nil + } + + if m.Spec != nil { + if err := m.Spec.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec") + } + return err + } + } + + return nil +} + +func (m *V1CoxEdgeAccount) validateStatus(formats strfmt.Registry) error { + + if swag.IsZero(m.Status) { // not required + return nil + } + + if m.Status != nil { + if err := m.Status.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("status") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1CoxEdgeAccount) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1CoxEdgeAccount) UnmarshalBinary(b []byte) error { + var res V1CoxEdgeAccount + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cox_edge_accounts.go b/api/models/v1_cox_edge_accounts.go new file mode 100644 index 00000000..780a5b2d --- /dev/null +++ b/api/models/v1_cox_edge_accounts.go @@ -0,0 +1,112 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1CoxEdgeAccounts v1 cox edge accounts +// +// swagger:model v1CoxEdgeAccounts +type V1CoxEdgeAccounts struct { + + // items + // Required: true + // Unique: true + Items []*V1CoxEdgeAccount `json:"items"` + + // listmeta + Listmeta *V1ListMetaData `json:"listmeta,omitempty"` +} + +// Validate validates this v1 cox edge accounts +func (m *V1CoxEdgeAccounts) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateItems(formats); err != nil { + res = append(res, err) + } + + if err := m.validateListmeta(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1CoxEdgeAccounts) validateItems(formats strfmt.Registry) error { + + if err := validate.Required("items", "body", m.Items); err != nil { + return err + } + + if err := validate.UniqueItems("items", "body", m.Items); err != nil { + return err + } + + for i := 0; i < len(m.Items); i++ { + if swag.IsZero(m.Items[i]) { // not required + continue + } + + if m.Items[i] != nil { + if err := m.Items[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("items" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1CoxEdgeAccounts) validateListmeta(formats strfmt.Registry) error { + + if swag.IsZero(m.Listmeta) { // not required + return nil + } + + if m.Listmeta != nil { + if err := m.Listmeta.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("listmeta") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1CoxEdgeAccounts) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1CoxEdgeAccounts) UnmarshalBinary(b []byte) error { + var res V1CoxEdgeAccounts + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cox_edge_base_urls.go b/api/models/v1_cox_edge_base_urls.go new file mode 100644 index 00000000..278615c1 --- /dev/null +++ b/api/models/v1_cox_edge_base_urls.go @@ -0,0 +1,64 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1CoxEdgeBaseUrls List of CoxEdge base urls +// +// swagger:model v1CoxEdgeBaseUrls +type V1CoxEdgeBaseUrls struct { + + // base urls + // Required: true + BaseUrls []string `json:"baseUrls"` +} + +// Validate validates this v1 cox edge base urls +func (m *V1CoxEdgeBaseUrls) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateBaseUrls(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1CoxEdgeBaseUrls) validateBaseUrls(formats strfmt.Registry) error { + + if err := validate.Required("baseUrls", "body", m.BaseUrls); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1CoxEdgeBaseUrls) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1CoxEdgeBaseUrls) UnmarshalBinary(b []byte) error { + var res V1CoxEdgeBaseUrls + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cox_edge_cloud_account.go b/api/models/v1_cox_edge_cloud_account.go new file mode 100644 index 00000000..9020db0b --- /dev/null +++ b/api/models/v1_cox_edge_cloud_account.go @@ -0,0 +1,90 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1CoxEdgeCloudAccount CoxEdge cloud account +// +// swagger:model v1CoxEdgeCloudAccount +type V1CoxEdgeCloudAccount struct { + + // The base url - used to make api calls + // Required: true + APIBaseURL *string `json:"apiBaseUrl"` + + // CoxEdge cloud account ApiKey + // Required: true + APIKey *string `json:"apiKey"` + + // The environment belonging to the organization + Environment string `json:"environment,omitempty"` + + // The Id of organization + OrganizationID string `json:"organizationId,omitempty"` + + // The service for which the organization is allowed to provision resources + Service string `json:"service,omitempty"` +} + +// Validate validates this v1 cox edge cloud account +func (m *V1CoxEdgeCloudAccount) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateAPIBaseURL(formats); err != nil { + res = append(res, err) + } + + if err := m.validateAPIKey(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1CoxEdgeCloudAccount) validateAPIBaseURL(formats strfmt.Registry) error { + + if err := validate.Required("apiBaseUrl", "body", m.APIBaseURL); err != nil { + return err + } + + return nil +} + +func (m *V1CoxEdgeCloudAccount) validateAPIKey(formats strfmt.Registry) error { + + if err := validate.Required("apiKey", "body", m.APIKey); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1CoxEdgeCloudAccount) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1CoxEdgeCloudAccount) UnmarshalBinary(b []byte) error { + var res V1CoxEdgeCloudAccount + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cox_edge_cloud_cluster_config_entity.go b/api/models/v1_cox_edge_cloud_cluster_config_entity.go new file mode 100644 index 00000000..96890744 --- /dev/null +++ b/api/models/v1_cox_edge_cloud_cluster_config_entity.go @@ -0,0 +1,71 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1CoxEdgeCloudClusterConfigEntity CoxEdge cloud cluster config entity +// +// swagger:model v1CoxEdgeCloudClusterConfigEntity +type V1CoxEdgeCloudClusterConfigEntity struct { + + // cluster config + ClusterConfig *V1CoxEdgeClusterConfig `json:"clusterConfig,omitempty"` +} + +// Validate validates this v1 cox edge cloud cluster config entity +func (m *V1CoxEdgeCloudClusterConfigEntity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateClusterConfig(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1CoxEdgeCloudClusterConfigEntity) validateClusterConfig(formats strfmt.Registry) error { + + if swag.IsZero(m.ClusterConfig) { // not required + return nil + } + + if m.ClusterConfig != nil { + if err := m.ClusterConfig.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("clusterConfig") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1CoxEdgeCloudClusterConfigEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1CoxEdgeCloudClusterConfigEntity) UnmarshalBinary(b []byte) error { + var res V1CoxEdgeCloudClusterConfigEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cox_edge_cloud_config.go b/api/models/v1_cox_edge_cloud_config.go new file mode 100644 index 00000000..f8cd59a4 --- /dev/null +++ b/api/models/v1_cox_edge_cloud_config.go @@ -0,0 +1,127 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1CoxEdgeCloudConfig CoxEdgeCloudConfig is the Schema for the coxedgecloudconfigs API +// +// swagger:model v1CoxEdgeCloudConfig +type V1CoxEdgeCloudConfig struct { + + // APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + APIVersion string `json:"apiVersion,omitempty"` + + // Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + Kind string `json:"kind,omitempty"` + + // metadata + Metadata *V1ObjectMeta `json:"metadata,omitempty"` + + // spec + Spec *V1CoxEdgeCloudConfigSpec `json:"spec,omitempty"` + + // status + Status *V1CoxEdgeCloudConfigStatus `json:"status,omitempty"` +} + +// Validate validates this v1 cox edge cloud config +func (m *V1CoxEdgeCloudConfig) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSpec(formats); err != nil { + res = append(res, err) + } + + if err := m.validateStatus(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1CoxEdgeCloudConfig) validateMetadata(formats strfmt.Registry) error { + + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } + return err + } + } + + return nil +} + +func (m *V1CoxEdgeCloudConfig) validateSpec(formats strfmt.Registry) error { + + if swag.IsZero(m.Spec) { // not required + return nil + } + + if m.Spec != nil { + if err := m.Spec.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec") + } + return err + } + } + + return nil +} + +func (m *V1CoxEdgeCloudConfig) validateStatus(formats strfmt.Registry) error { + + if swag.IsZero(m.Status) { // not required + return nil + } + + if m.Status != nil { + if err := m.Status.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("status") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1CoxEdgeCloudConfig) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1CoxEdgeCloudConfig) UnmarshalBinary(b []byte) error { + var res V1CoxEdgeCloudConfig + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cox_edge_cloud_config_spec.go b/api/models/v1_cox_edge_cloud_config_spec.go new file mode 100644 index 00000000..c44f6168 --- /dev/null +++ b/api/models/v1_cox_edge_cloud_config_spec.go @@ -0,0 +1,130 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1CoxEdgeCloudConfigSpec CoxEdgeCloudConfigSpec defines the cloud configuration input by user This will translate to clusterspec/machinespec for cluster-api +// +// swagger:model v1CoxEdgeCloudConfigSpec +type V1CoxEdgeCloudConfigSpec struct { + + // cloudAccountRef should point to the secret which contains GcpCloudAccount + CloudAccountRef *V1ObjectReference `json:"cloudAccountRef,omitempty"` + + // cluster config + ClusterConfig *V1CoxEdgeClusterConfig `json:"clusterConfig,omitempty"` + + // machine pool config + MachinePoolConfig []*V1CoxEdgeMachinePoolConfig `json:"machinePoolConfig"` +} + +// Validate validates this v1 cox edge cloud config spec +func (m *V1CoxEdgeCloudConfigSpec) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateCloudAccountRef(formats); err != nil { + res = append(res, err) + } + + if err := m.validateClusterConfig(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMachinePoolConfig(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1CoxEdgeCloudConfigSpec) validateCloudAccountRef(formats strfmt.Registry) error { + + if swag.IsZero(m.CloudAccountRef) { // not required + return nil + } + + if m.CloudAccountRef != nil { + if err := m.CloudAccountRef.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("cloudAccountRef") + } + return err + } + } + + return nil +} + +func (m *V1CoxEdgeCloudConfigSpec) validateClusterConfig(formats strfmt.Registry) error { + + if swag.IsZero(m.ClusterConfig) { // not required + return nil + } + + if m.ClusterConfig != nil { + if err := m.ClusterConfig.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("clusterConfig") + } + return err + } + } + + return nil +} + +func (m *V1CoxEdgeCloudConfigSpec) validateMachinePoolConfig(formats strfmt.Registry) error { + + if swag.IsZero(m.MachinePoolConfig) { // not required + return nil + } + + for i := 0; i < len(m.MachinePoolConfig); i++ { + if swag.IsZero(m.MachinePoolConfig[i]) { // not required + continue + } + + if m.MachinePoolConfig[i] != nil { + if err := m.MachinePoolConfig[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("machinePoolConfig" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1CoxEdgeCloudConfigSpec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1CoxEdgeCloudConfigSpec) UnmarshalBinary(b []byte) error { + var res V1CoxEdgeCloudConfigSpec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cox_edge_cloud_config_status.go b/api/models/v1_cox_edge_cloud_config_status.go new file mode 100644 index 00000000..66c9f171 --- /dev/null +++ b/api/models/v1_cox_edge_cloud_config_status.go @@ -0,0 +1,83 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1CoxEdgeCloudConfigStatus CoxEdgeCloudConfigStatus defines the observed state of CoxEdgeCloudConfig The cloudimage info built by Mold is stored here image should be mapped to a specific machinepool +// +// swagger:model v1CoxEdgeCloudConfigStatus +type V1CoxEdgeCloudConfigStatus struct { + + // spectroAnsibleProvisioner: should be added only once, subsequent recocile will use the same provisioner SpectroAnsiblePacker bool `json:"spectroAnsiblePacker,omitempty"` + Conditions []*V1ClusterCondition `json:"conditions"` + + // For mold controller to identify if is there any changes in Pack + ImageID string `json:"imageID,omitempty"` +} + +// Validate validates this v1 cox edge cloud config status +func (m *V1CoxEdgeCloudConfigStatus) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateConditions(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1CoxEdgeCloudConfigStatus) validateConditions(formats strfmt.Registry) error { + + if swag.IsZero(m.Conditions) { // not required + return nil + } + + for i := 0; i < len(m.Conditions); i++ { + if swag.IsZero(m.Conditions[i]) { // not required + continue + } + + if m.Conditions[i] != nil { + if err := m.Conditions[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("conditions" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1CoxEdgeCloudConfigStatus) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1CoxEdgeCloudConfigStatus) UnmarshalBinary(b []byte) error { + var res V1CoxEdgeCloudConfigStatus + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cox_edge_cluster_config.go b/api/models/v1_cox_edge_cluster_config.go new file mode 100644 index 00000000..d8dcd2ff --- /dev/null +++ b/api/models/v1_cox_edge_cluster_config.go @@ -0,0 +1,121 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1CoxEdgeClusterConfig Cluster level configuration for coxedge cloud and applicable for all the machine pools +// +// swagger:model v1CoxEdgeClusterConfig +type V1CoxEdgeClusterConfig struct { + + // cox edge load balancer config + // Required: true + CoxEdgeLoadBalancerConfig *V1CoxEdgeLoadBalancerConfig `json:"coxEdgeLoadBalancerConfig"` + + // cox edge worker load balancer config + CoxEdgeWorkerLoadBalancerConfig *V1CoxEdgeLoadBalancerConfig `json:"coxEdgeWorkerLoadBalancerConfig,omitempty"` + + // environment + Environment string `json:"environment,omitempty"` + + // organization Id + OrganizationID string `json:"organizationId,omitempty"` + + // CoxEdge ssh authorized keys + // Required: true + SSHAuthorizedKeys []string `json:"sshAuthorizedKeys"` +} + +// Validate validates this v1 cox edge cluster config +func (m *V1CoxEdgeClusterConfig) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateCoxEdgeLoadBalancerConfig(formats); err != nil { + res = append(res, err) + } + + if err := m.validateCoxEdgeWorkerLoadBalancerConfig(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSSHAuthorizedKeys(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1CoxEdgeClusterConfig) validateCoxEdgeLoadBalancerConfig(formats strfmt.Registry) error { + + if err := validate.Required("coxEdgeLoadBalancerConfig", "body", m.CoxEdgeLoadBalancerConfig); err != nil { + return err + } + + if m.CoxEdgeLoadBalancerConfig != nil { + if err := m.CoxEdgeLoadBalancerConfig.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("coxEdgeLoadBalancerConfig") + } + return err + } + } + + return nil +} + +func (m *V1CoxEdgeClusterConfig) validateCoxEdgeWorkerLoadBalancerConfig(formats strfmt.Registry) error { + + if swag.IsZero(m.CoxEdgeWorkerLoadBalancerConfig) { // not required + return nil + } + + if m.CoxEdgeWorkerLoadBalancerConfig != nil { + if err := m.CoxEdgeWorkerLoadBalancerConfig.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("coxEdgeWorkerLoadBalancerConfig") + } + return err + } + } + + return nil +} + +func (m *V1CoxEdgeClusterConfig) validateSSHAuthorizedKeys(formats strfmt.Registry) error { + + if err := validate.Required("sshAuthorizedKeys", "body", m.SSHAuthorizedKeys); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1CoxEdgeClusterConfig) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1CoxEdgeClusterConfig) UnmarshalBinary(b []byte) error { + var res V1CoxEdgeClusterConfig + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cox_edge_credentials.go b/api/models/v1_cox_edge_credentials.go new file mode 100644 index 00000000..cf46cdee --- /dev/null +++ b/api/models/v1_cox_edge_credentials.go @@ -0,0 +1,46 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1CoxEdgeCredentials CoxEdge credentials to get organizations +// +// swagger:model v1CoxEdgeCredentials +type V1CoxEdgeCredentials struct { + + // CoxEdge baseUrl - for api calls + APIBaseURL string `json:"apiBaseUrl,omitempty"` + + // CoxEdge ApiKey - secret for api calls + APIKey string `json:"apiKey,omitempty"` +} + +// Validate validates this v1 cox edge credentials +func (m *V1CoxEdgeCredentials) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1CoxEdgeCredentials) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1CoxEdgeCredentials) UnmarshalBinary(b []byte) error { + var res V1CoxEdgeCredentials + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cox_edge_deployment.go b/api/models/v1_cox_edge_deployment.go new file mode 100644 index 00000000..00f38404 --- /dev/null +++ b/api/models/v1_cox_edge_deployment.go @@ -0,0 +1,61 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1CoxEdgeDeployment v1 cox edge deployment +// +// swagger:model v1CoxEdgeDeployment +type V1CoxEdgeDeployment struct { + + // cpu utilization + CPUUtilization int32 `json:"cpuUtilization,omitempty"` + + // enable auto scaling + EnableAutoScaling bool `json:"enableAutoScaling,omitempty"` + + // instances per pop + InstancesPerPop int32 `json:"instancesPerPop,omitempty"` + + // max instances per pop + MaxInstancesPerPop int32 `json:"maxInstancesPerPop,omitempty"` + + // min instances per pop + MinInstancesPerPop int32 `json:"minInstancesPerPop,omitempty"` + + // name + Name string `json:"name,omitempty"` + + // pops + Pops []string `json:"pops"` +} + +// Validate validates this v1 cox edge deployment +func (m *V1CoxEdgeDeployment) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1CoxEdgeDeployment) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1CoxEdgeDeployment) UnmarshalBinary(b []byte) error { + var res V1CoxEdgeDeployment + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cox_edge_environment.go b/api/models/v1_cox_edge_environment.go new file mode 100644 index 00000000..c817b64f --- /dev/null +++ b/api/models/v1_cox_edge_environment.go @@ -0,0 +1,49 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1CoxEdgeEnvironment CoxEdge environment entity +// +// swagger:model v1CoxEdgeEnvironment +type V1CoxEdgeEnvironment struct { + + // CoxEdge environment id + ID string `json:"id,omitempty"` + + // CoxEdge environment state + IsDeleted bool `json:"isDeleted,omitempty"` + + // CoxEdge environment name + Name string `json:"name,omitempty"` +} + +// Validate validates this v1 cox edge environment +func (m *V1CoxEdgeEnvironment) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1CoxEdgeEnvironment) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1CoxEdgeEnvironment) UnmarshalBinary(b []byte) error { + var res V1CoxEdgeEnvironment + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cox_edge_environments.go b/api/models/v1_cox_edge_environments.go new file mode 100644 index 00000000..6426e2cb --- /dev/null +++ b/api/models/v1_cox_edge_environments.go @@ -0,0 +1,82 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1CoxEdgeEnvironments List of CoxEdge environments +// +// swagger:model v1CoxEdgeEnvironments +type V1CoxEdgeEnvironments struct { + + // environments + // Required: true + Environments []*V1CoxEdgeEnvironment `json:"environments"` +} + +// Validate validates this v1 cox edge environments +func (m *V1CoxEdgeEnvironments) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateEnvironments(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1CoxEdgeEnvironments) validateEnvironments(formats strfmt.Registry) error { + + if err := validate.Required("environments", "body", m.Environments); err != nil { + return err + } + + for i := 0; i < len(m.Environments); i++ { + if swag.IsZero(m.Environments[i]) { // not required + continue + } + + if m.Environments[i] != nil { + if err := m.Environments[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("environments" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1CoxEdgeEnvironments) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1CoxEdgeEnvironments) UnmarshalBinary(b []byte) error { + var res V1CoxEdgeEnvironments + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cox_edge_environments_request.go b/api/models/v1_cox_edge_environments_request.go new file mode 100644 index 00000000..e356ffea --- /dev/null +++ b/api/models/v1_cox_edge_environments_request.go @@ -0,0 +1,74 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1CoxEdgeEnvironmentsRequest Request payload to get CoxEdge environments +// +// swagger:model v1CoxEdgeEnvironmentsRequest +type V1CoxEdgeEnvironmentsRequest struct { + + // credentials + Credentials *V1CoxEdgeCredentials `json:"credentials,omitempty"` + + // CoxEdge organizationId + OrganizationID string `json:"organizationId,omitempty"` +} + +// Validate validates this v1 cox edge environments request +func (m *V1CoxEdgeEnvironmentsRequest) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateCredentials(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1CoxEdgeEnvironmentsRequest) validateCredentials(formats strfmt.Registry) error { + + if swag.IsZero(m.Credentials) { // not required + return nil + } + + if m.Credentials != nil { + if err := m.Credentials.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("credentials") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1CoxEdgeEnvironmentsRequest) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1CoxEdgeEnvironmentsRequest) UnmarshalBinary(b []byte) error { + var res V1CoxEdgeEnvironmentsRequest + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cox_edge_instance_types.go b/api/models/v1_cox_edge_instance_types.go new file mode 100644 index 00000000..b18b8fb0 --- /dev/null +++ b/api/models/v1_cox_edge_instance_types.go @@ -0,0 +1,80 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1CoxEdgeInstanceTypes List of CoxEdge instance types +// +// swagger:model v1CoxEdgeInstanceTypes +type V1CoxEdgeInstanceTypes struct { + + // instance types + InstanceTypes []*V1InstanceType `json:"instanceTypes"` +} + +// Validate validates this v1 cox edge instance types +func (m *V1CoxEdgeInstanceTypes) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateInstanceTypes(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1CoxEdgeInstanceTypes) validateInstanceTypes(formats strfmt.Registry) error { + + if swag.IsZero(m.InstanceTypes) { // not required + return nil + } + + for i := 0; i < len(m.InstanceTypes); i++ { + if swag.IsZero(m.InstanceTypes[i]) { // not required + continue + } + + if m.InstanceTypes[i] != nil { + if err := m.InstanceTypes[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("instanceTypes" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1CoxEdgeInstanceTypes) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1CoxEdgeInstanceTypes) UnmarshalBinary(b []byte) error { + var res V1CoxEdgeInstanceTypes + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cox_edge_load_balancer_config.go b/api/models/v1_cox_edge_load_balancer_config.go new file mode 100644 index 00000000..9f76ce1d --- /dev/null +++ b/api/models/v1_cox_edge_load_balancer_config.go @@ -0,0 +1,43 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1CoxEdgeLoadBalancerConfig CoxEdge loadbalancer config +// +// swagger:model v1CoxEdgeLoadBalancerConfig +type V1CoxEdgeLoadBalancerConfig struct { + + // CoxEdge PoPs - geographical location for the loadbalancer + Pops []string `json:"pops"` +} + +// Validate validates this v1 cox edge load balancer config +func (m *V1CoxEdgeLoadBalancerConfig) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1CoxEdgeLoadBalancerConfig) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1CoxEdgeLoadBalancerConfig) UnmarshalBinary(b []byte) error { + var res V1CoxEdgeLoadBalancerConfig + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cox_edge_load_persistent_storage.go b/api/models/v1_cox_edge_load_persistent_storage.go new file mode 100644 index 00000000..56367e7c --- /dev/null +++ b/api/models/v1_cox_edge_load_persistent_storage.go @@ -0,0 +1,46 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1CoxEdgeLoadPersistentStorage CoxEdge load persistent storage +// +// swagger:model v1CoxEdgeLoadPersistentStorage +type V1CoxEdgeLoadPersistentStorage struct { + + // Coxedge load persistent storage path + Path string `json:"path,omitempty"` + + // Coxedge load persistent storage size + Size int64 `json:"size,omitempty"` +} + +// Validate validates this v1 cox edge load persistent storage +func (m *V1CoxEdgeLoadPersistentStorage) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1CoxEdgeLoadPersistentStorage) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1CoxEdgeLoadPersistentStorage) UnmarshalBinary(b []byte) error { + var res V1CoxEdgeLoadPersistentStorage + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cox_edge_machine.go b/api/models/v1_cox_edge_machine.go new file mode 100644 index 00000000..6643c40c --- /dev/null +++ b/api/models/v1_cox_edge_machine.go @@ -0,0 +1,127 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1CoxEdgeMachine CoxEdge cloud VM definition +// +// swagger:model v1CoxEdgeMachine +type V1CoxEdgeMachine struct { + + // api version + APIVersion string `json:"apiVersion,omitempty"` + + // kind + Kind string `json:"kind,omitempty"` + + // metadata + Metadata *V1ObjectMeta `json:"metadata,omitempty"` + + // spec + Spec *V1CoxEdgeMachineSpec `json:"spec,omitempty"` + + // status + Status *V1CloudMachineStatus `json:"status,omitempty"` +} + +// Validate validates this v1 cox edge machine +func (m *V1CoxEdgeMachine) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSpec(formats); err != nil { + res = append(res, err) + } + + if err := m.validateStatus(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1CoxEdgeMachine) validateMetadata(formats strfmt.Registry) error { + + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } + return err + } + } + + return nil +} + +func (m *V1CoxEdgeMachine) validateSpec(formats strfmt.Registry) error { + + if swag.IsZero(m.Spec) { // not required + return nil + } + + if m.Spec != nil { + if err := m.Spec.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec") + } + return err + } + } + + return nil +} + +func (m *V1CoxEdgeMachine) validateStatus(formats strfmt.Registry) error { + + if swag.IsZero(m.Status) { // not required + return nil + } + + if m.Status != nil { + if err := m.Status.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("status") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1CoxEdgeMachine) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1CoxEdgeMachine) UnmarshalBinary(b []byte) error { + var res V1CoxEdgeMachine + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cox_edge_machine_pool_cloud_config_entity.go b/api/models/v1_cox_edge_machine_pool_cloud_config_entity.go new file mode 100644 index 00000000..0b52bc33 --- /dev/null +++ b/api/models/v1_cox_edge_machine_pool_cloud_config_entity.go @@ -0,0 +1,153 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1CoxEdgeMachinePoolCloudConfigEntity v1 cox edge machine pool cloud config entity +// +// swagger:model v1CoxEdgeMachinePoolCloudConfigEntity +type V1CoxEdgeMachinePoolCloudConfigEntity struct { + + // deployments + Deployments []*V1CoxEdgeDeployment `json:"deployments"` + + // Array of coxedge load persistent storages + // Unique: true + PersistentStorages []*V1CoxEdgeLoadPersistentStorage `json:"persistentStorages"` + + // security group rules + SecurityGroupRules []*V1CoxEdgeSecurityGroupRule `json:"securityGroupRules"` + + // spec + Spec string `json:"spec,omitempty"` +} + +// Validate validates this v1 cox edge machine pool cloud config entity +func (m *V1CoxEdgeMachinePoolCloudConfigEntity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateDeployments(formats); err != nil { + res = append(res, err) + } + + if err := m.validatePersistentStorages(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSecurityGroupRules(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1CoxEdgeMachinePoolCloudConfigEntity) validateDeployments(formats strfmt.Registry) error { + + if swag.IsZero(m.Deployments) { // not required + return nil + } + + for i := 0; i < len(m.Deployments); i++ { + if swag.IsZero(m.Deployments[i]) { // not required + continue + } + + if m.Deployments[i] != nil { + if err := m.Deployments[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("deployments" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1CoxEdgeMachinePoolCloudConfigEntity) validatePersistentStorages(formats strfmt.Registry) error { + + if swag.IsZero(m.PersistentStorages) { // not required + return nil + } + + if err := validate.UniqueItems("persistentStorages", "body", m.PersistentStorages); err != nil { + return err + } + + for i := 0; i < len(m.PersistentStorages); i++ { + if swag.IsZero(m.PersistentStorages[i]) { // not required + continue + } + + if m.PersistentStorages[i] != nil { + if err := m.PersistentStorages[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("persistentStorages" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1CoxEdgeMachinePoolCloudConfigEntity) validateSecurityGroupRules(formats strfmt.Registry) error { + + if swag.IsZero(m.SecurityGroupRules) { // not required + return nil + } + + for i := 0; i < len(m.SecurityGroupRules); i++ { + if swag.IsZero(m.SecurityGroupRules[i]) { // not required + continue + } + + if m.SecurityGroupRules[i] != nil { + if err := m.SecurityGroupRules[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("securityGroupRules" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1CoxEdgeMachinePoolCloudConfigEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1CoxEdgeMachinePoolCloudConfigEntity) UnmarshalBinary(b []byte) error { + var res V1CoxEdgeMachinePoolCloudConfigEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cox_edge_machine_pool_config.go b/api/models/v1_cox_edge_machine_pool_config.go new file mode 100644 index 00000000..2f85e308 --- /dev/null +++ b/api/models/v1_cox_edge_machine_pool_config.go @@ -0,0 +1,309 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1CoxEdgeMachinePoolConfig v1 cox edge machine pool config +// +// swagger:model v1CoxEdgeMachinePoolConfig +type V1CoxEdgeMachinePoolConfig struct { + + // additionalLabels + AdditionalLabels map[string]string `json:"additionalLabels,omitempty"` + + // AdditionalTags is an optional set of tags to add to resources managed by the provider, in addition to the ones added by default. For eg., tags for EKS nodeGroup or EKS NodegroupIAMRole + AdditionalTags map[string]string `json:"additionalTags,omitempty"` + + // deployments + Deployments []*V1CoxEdgeDeployment `json:"deployments"` + + // instance config + InstanceConfig *V1InstanceConfig `json:"instanceConfig,omitempty"` + + // whether this pool is for control plane + // Required: true + IsControlPlane *bool `json:"isControlPlane"` + + // labels for this pool, example: control-plane/worker, gpu, windows + Labels []string `json:"labels"` + + // machine pool properties + MachinePoolProperties *V1MachinePoolProperties `json:"machinePoolProperties,omitempty"` + + // max size of the pool, for scaling + MaxSize int32 `json:"maxSize,omitempty"` + + // min size of the pool, for scaling + MinSize int32 `json:"minSize,omitempty"` + + // name + Name string `json:"name,omitempty"` + + // Minimum number of seconds a node should be Ready, before the next node is selected for repave. Applicable only for workerpools in infrastructure cluster + NodeRepaveInterval int32 `json:"nodeRepaveInterval,omitempty"` + + // Array of coxedge load persistent storages + // Unique: true + PersistentStorages []*V1CoxEdgeLoadPersistentStorage `json:"persistentStorages"` + + // security group rules + SecurityGroupRules []*V1CoxEdgeSecurityGroupRule `json:"securityGroupRules"` + + // size of the pool, number of machines + Size int32 `json:"size,omitempty"` + + // spec + Spec string `json:"spec,omitempty"` + + // control plane or worker taints + // Unique: true + Taints []*V1Taint `json:"taints"` + + // rolling update strategy for this machinepool if not specified, will use ScaleOut + UpdateStrategy *V1UpdateStrategy `json:"updateStrategy,omitempty"` + + // if IsControlPlane==true && useControlPlaneAsWorker==true, then will remove control plane taint this will not be used for worker pools + UseControlPlaneAsWorker bool `json:"useControlPlaneAsWorker,omitempty"` +} + +// Validate validates this v1 cox edge machine pool config +func (m *V1CoxEdgeMachinePoolConfig) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateDeployments(formats); err != nil { + res = append(res, err) + } + + if err := m.validateInstanceConfig(formats); err != nil { + res = append(res, err) + } + + if err := m.validateIsControlPlane(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMachinePoolProperties(formats); err != nil { + res = append(res, err) + } + + if err := m.validatePersistentStorages(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSecurityGroupRules(formats); err != nil { + res = append(res, err) + } + + if err := m.validateTaints(formats); err != nil { + res = append(res, err) + } + + if err := m.validateUpdateStrategy(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1CoxEdgeMachinePoolConfig) validateDeployments(formats strfmt.Registry) error { + + if swag.IsZero(m.Deployments) { // not required + return nil + } + + for i := 0; i < len(m.Deployments); i++ { + if swag.IsZero(m.Deployments[i]) { // not required + continue + } + + if m.Deployments[i] != nil { + if err := m.Deployments[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("deployments" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1CoxEdgeMachinePoolConfig) validateInstanceConfig(formats strfmt.Registry) error { + + if swag.IsZero(m.InstanceConfig) { // not required + return nil + } + + if m.InstanceConfig != nil { + if err := m.InstanceConfig.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("instanceConfig") + } + return err + } + } + + return nil +} + +func (m *V1CoxEdgeMachinePoolConfig) validateIsControlPlane(formats strfmt.Registry) error { + + if err := validate.Required("isControlPlane", "body", m.IsControlPlane); err != nil { + return err + } + + return nil +} + +func (m *V1CoxEdgeMachinePoolConfig) validateMachinePoolProperties(formats strfmt.Registry) error { + + if swag.IsZero(m.MachinePoolProperties) { // not required + return nil + } + + if m.MachinePoolProperties != nil { + if err := m.MachinePoolProperties.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("machinePoolProperties") + } + return err + } + } + + return nil +} + +func (m *V1CoxEdgeMachinePoolConfig) validatePersistentStorages(formats strfmt.Registry) error { + + if swag.IsZero(m.PersistentStorages) { // not required + return nil + } + + if err := validate.UniqueItems("persistentStorages", "body", m.PersistentStorages); err != nil { + return err + } + + for i := 0; i < len(m.PersistentStorages); i++ { + if swag.IsZero(m.PersistentStorages[i]) { // not required + continue + } + + if m.PersistentStorages[i] != nil { + if err := m.PersistentStorages[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("persistentStorages" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1CoxEdgeMachinePoolConfig) validateSecurityGroupRules(formats strfmt.Registry) error { + + if swag.IsZero(m.SecurityGroupRules) { // not required + return nil + } + + for i := 0; i < len(m.SecurityGroupRules); i++ { + if swag.IsZero(m.SecurityGroupRules[i]) { // not required + continue + } + + if m.SecurityGroupRules[i] != nil { + if err := m.SecurityGroupRules[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("securityGroupRules" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1CoxEdgeMachinePoolConfig) validateTaints(formats strfmt.Registry) error { + + if swag.IsZero(m.Taints) { // not required + return nil + } + + if err := validate.UniqueItems("taints", "body", m.Taints); err != nil { + return err + } + + for i := 0; i < len(m.Taints); i++ { + if swag.IsZero(m.Taints[i]) { // not required + continue + } + + if m.Taints[i] != nil { + if err := m.Taints[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("taints" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1CoxEdgeMachinePoolConfig) validateUpdateStrategy(formats strfmt.Registry) error { + + if swag.IsZero(m.UpdateStrategy) { // not required + return nil + } + + if m.UpdateStrategy != nil { + if err := m.UpdateStrategy.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("updateStrategy") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1CoxEdgeMachinePoolConfig) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1CoxEdgeMachinePoolConfig) UnmarshalBinary(b []byte) error { + var res V1CoxEdgeMachinePoolConfig + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cox_edge_machine_pool_config_entity.go b/api/models/v1_cox_edge_machine_pool_config_entity.go new file mode 100644 index 00000000..6928d24b --- /dev/null +++ b/api/models/v1_cox_edge_machine_pool_config_entity.go @@ -0,0 +1,98 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1CoxEdgeMachinePoolConfigEntity v1 cox edge machine pool config entity +// +// swagger:model v1CoxEdgeMachinePoolConfigEntity +type V1CoxEdgeMachinePoolConfigEntity struct { + + // cloud config + // Required: true + CloudConfig *V1CoxEdgeMachinePoolCloudConfigEntity `json:"cloudConfig"` + + // pool config + PoolConfig *V1MachinePoolConfigEntity `json:"poolConfig,omitempty"` +} + +// Validate validates this v1 cox edge machine pool config entity +func (m *V1CoxEdgeMachinePoolConfigEntity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateCloudConfig(formats); err != nil { + res = append(res, err) + } + + if err := m.validatePoolConfig(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1CoxEdgeMachinePoolConfigEntity) validateCloudConfig(formats strfmt.Registry) error { + + if err := validate.Required("cloudConfig", "body", m.CloudConfig); err != nil { + return err + } + + if m.CloudConfig != nil { + if err := m.CloudConfig.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("cloudConfig") + } + return err + } + } + + return nil +} + +func (m *V1CoxEdgeMachinePoolConfigEntity) validatePoolConfig(formats strfmt.Registry) error { + + if swag.IsZero(m.PoolConfig) { // not required + return nil + } + + if m.PoolConfig != nil { + if err := m.PoolConfig.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("poolConfig") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1CoxEdgeMachinePoolConfigEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1CoxEdgeMachinePoolConfigEntity) UnmarshalBinary(b []byte) error { + var res V1CoxEdgeMachinePoolConfigEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cox_edge_machine_spec.go b/api/models/v1_cox_edge_machine_spec.go new file mode 100644 index 00000000..0e0c33da --- /dev/null +++ b/api/models/v1_cox_edge_machine_spec.go @@ -0,0 +1,159 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1CoxEdgeMachineSpec CoxEdge cloud VM definition spec +// +// swagger:model v1CoxEdgeMachineSpec +type V1CoxEdgeMachineSpec struct { + + // add anycast Ip address + AddAnycastIPAddress bool `json:"addAnycastIpAddress,omitempty"` + + // deployments + Deployments []*V1CoxEdgeDeployment `json:"deployments"` + + // image + Image string `json:"image,omitempty"` + + // persistent storages + PersistentStorages []*V1CoxEdgeLoadPersistentStorage `json:"persistentStorages"` + + // ports + Ports []*V1CoxEdgePort `json:"ports"` + + // provider Id + ProviderID string `json:"providerId,omitempty"` + + // specs + Specs string `json:"specs,omitempty"` + + // ssh authorized keys + SSHAuthorizedKeys []string `json:"sshAuthorizedKeys"` +} + +// Validate validates this v1 cox edge machine spec +func (m *V1CoxEdgeMachineSpec) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateDeployments(formats); err != nil { + res = append(res, err) + } + + if err := m.validatePersistentStorages(formats); err != nil { + res = append(res, err) + } + + if err := m.validatePorts(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1CoxEdgeMachineSpec) validateDeployments(formats strfmt.Registry) error { + + if swag.IsZero(m.Deployments) { // not required + return nil + } + + for i := 0; i < len(m.Deployments); i++ { + if swag.IsZero(m.Deployments[i]) { // not required + continue + } + + if m.Deployments[i] != nil { + if err := m.Deployments[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("deployments" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1CoxEdgeMachineSpec) validatePersistentStorages(formats strfmt.Registry) error { + + if swag.IsZero(m.PersistentStorages) { // not required + return nil + } + + for i := 0; i < len(m.PersistentStorages); i++ { + if swag.IsZero(m.PersistentStorages[i]) { // not required + continue + } + + if m.PersistentStorages[i] != nil { + if err := m.PersistentStorages[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("persistentStorages" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1CoxEdgeMachineSpec) validatePorts(formats strfmt.Registry) error { + + if swag.IsZero(m.Ports) { // not required + return nil + } + + for i := 0; i < len(m.Ports); i++ { + if swag.IsZero(m.Ports[i]) { // not required + continue + } + + if m.Ports[i] != nil { + if err := m.Ports[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("ports" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1CoxEdgeMachineSpec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1CoxEdgeMachineSpec) UnmarshalBinary(b []byte) error { + var res V1CoxEdgeMachineSpec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cox_edge_machines.go b/api/models/v1_cox_edge_machines.go new file mode 100644 index 00000000..d1d66f02 --- /dev/null +++ b/api/models/v1_cox_edge_machines.go @@ -0,0 +1,112 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1CoxEdgeMachines CoxEdge machine list +// +// swagger:model v1CoxEdgeMachines +type V1CoxEdgeMachines struct { + + // items + // Required: true + // Unique: true + Items []*V1CoxEdgeMachine `json:"items"` + + // listmeta + Listmeta *V1ListMetaData `json:"listmeta,omitempty"` +} + +// Validate validates this v1 cox edge machines +func (m *V1CoxEdgeMachines) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateItems(formats); err != nil { + res = append(res, err) + } + + if err := m.validateListmeta(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1CoxEdgeMachines) validateItems(formats strfmt.Registry) error { + + if err := validate.Required("items", "body", m.Items); err != nil { + return err + } + + if err := validate.UniqueItems("items", "body", m.Items); err != nil { + return err + } + + for i := 0; i < len(m.Items); i++ { + if swag.IsZero(m.Items[i]) { // not required + continue + } + + if m.Items[i] != nil { + if err := m.Items[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("items" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1CoxEdgeMachines) validateListmeta(formats strfmt.Registry) error { + + if swag.IsZero(m.Listmeta) { // not required + return nil + } + + if m.Listmeta != nil { + if err := m.Listmeta.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("listmeta") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1CoxEdgeMachines) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1CoxEdgeMachines) UnmarshalBinary(b []byte) error { + var res V1CoxEdgeMachines + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cox_edge_organization.go b/api/models/v1_cox_edge_organization.go new file mode 100644 index 00000000..e55b9339 --- /dev/null +++ b/api/models/v1_cox_edge_organization.go @@ -0,0 +1,49 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1CoxEdgeOrganization CoxEdge Organization entity +// +// swagger:model v1CoxEdgeOrganization +type V1CoxEdgeOrganization struct { + + // CoxEdge organization id + ID string `json:"id,omitempty"` + + // CoxEdge organization state + IsDeleted bool `json:"isDeleted,omitempty"` + + // CoxEdge organization name + Name string `json:"name,omitempty"` +} + +// Validate validates this v1 cox edge organization +func (m *V1CoxEdgeOrganization) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1CoxEdgeOrganization) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1CoxEdgeOrganization) UnmarshalBinary(b []byte) error { + var res V1CoxEdgeOrganization + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cox_edge_organizations.go b/api/models/v1_cox_edge_organizations.go new file mode 100644 index 00000000..78912b0c --- /dev/null +++ b/api/models/v1_cox_edge_organizations.go @@ -0,0 +1,82 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1CoxEdgeOrganizations List of CoxEdge organizations +// +// swagger:model v1CoxEdgeOrganizations +type V1CoxEdgeOrganizations struct { + + // organizations + // Required: true + Organizations []*V1CoxEdgeOrganization `json:"organizations"` +} + +// Validate validates this v1 cox edge organizations +func (m *V1CoxEdgeOrganizations) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateOrganizations(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1CoxEdgeOrganizations) validateOrganizations(formats strfmt.Registry) error { + + if err := validate.Required("organizations", "body", m.Organizations); err != nil { + return err + } + + for i := 0; i < len(m.Organizations); i++ { + if swag.IsZero(m.Organizations[i]) { // not required + continue + } + + if m.Organizations[i] != nil { + if err := m.Organizations[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("organizations" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1CoxEdgeOrganizations) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1CoxEdgeOrganizations) UnmarshalBinary(b []byte) error { + var res V1CoxEdgeOrganizations + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cox_edge_port.go b/api/models/v1_cox_edge_port.go new file mode 100644 index 00000000..da0e7add --- /dev/null +++ b/api/models/v1_cox_edge_port.go @@ -0,0 +1,49 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1CoxEdgePort CoxEdge network port +// +// swagger:model v1CoxEdgePort +type V1CoxEdgePort struct { + + // protocol + Protocol string `json:"protocol,omitempty"` + + // public port + PublicPort string `json:"publicPort,omitempty"` + + // public port desc + PublicPortDesc string `json:"publicPortDesc,omitempty"` +} + +// Validate validates this v1 cox edge port +func (m *V1CoxEdgePort) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1CoxEdgePort) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1CoxEdgePort) UnmarshalBinary(b []byte) error { + var res V1CoxEdgePort + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cox_edge_region.go b/api/models/v1_cox_edge_region.go new file mode 100644 index 00000000..343074d4 --- /dev/null +++ b/api/models/v1_cox_edge_region.go @@ -0,0 +1,77 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1CoxEdgeRegion CoxEdge region entity +// +// swagger:model v1CoxEdgeRegion +type V1CoxEdgeRegion struct { + + // Code of the CoxEdge region + Code string `json:"code,omitempty"` + + // location + Location *V1ClusterLocation `json:"location,omitempty"` + + // Name of the CoxEdge region + Name string `json:"name,omitempty"` +} + +// Validate validates this v1 cox edge region +func (m *V1CoxEdgeRegion) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateLocation(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1CoxEdgeRegion) validateLocation(formats strfmt.Registry) error { + + if swag.IsZero(m.Location) { // not required + return nil + } + + if m.Location != nil { + if err := m.Location.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("location") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1CoxEdgeRegion) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1CoxEdgeRegion) UnmarshalBinary(b []byte) error { + var res V1CoxEdgeRegion + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cox_edge_regions.go b/api/models/v1_cox_edge_regions.go new file mode 100644 index 00000000..e0bce086 --- /dev/null +++ b/api/models/v1_cox_edge_regions.go @@ -0,0 +1,82 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1CoxEdgeRegions List of CoxEdge regions +// +// swagger:model v1CoxEdgeRegions +type V1CoxEdgeRegions struct { + + // regions + // Required: true + Regions []*V1CoxEdgeRegion `json:"regions"` +} + +// Validate validates this v1 cox edge regions +func (m *V1CoxEdgeRegions) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateRegions(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1CoxEdgeRegions) validateRegions(formats strfmt.Registry) error { + + if err := validate.Required("regions", "body", m.Regions); err != nil { + return err + } + + for i := 0; i < len(m.Regions); i++ { + if swag.IsZero(m.Regions[i]) { // not required + continue + } + + if m.Regions[i] != nil { + if err := m.Regions[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("regions" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1CoxEdgeRegions) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1CoxEdgeRegions) UnmarshalBinary(b []byte) error { + var res V1CoxEdgeRegions + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cox_edge_security_group_rule.go b/api/models/v1_cox_edge_security_group_rule.go new file mode 100644 index 00000000..972b724b --- /dev/null +++ b/api/models/v1_cox_edge_security_group_rule.go @@ -0,0 +1,178 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "encoding/json" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1CoxEdgeSecurityGroupRule v1 cox edge security group rule +// +// swagger:model v1CoxEdgeSecurityGroupRule +type V1CoxEdgeSecurityGroupRule struct { + + // action + // Enum: [block allow] + Action string `json:"action,omitempty"` + + // description + Description string `json:"description,omitempty"` + + // port range + PortRange string `json:"portRange,omitempty"` + + // protocol + // Enum: [TCP UDP TCP_UDP ESP AH ICMP GRE] + Protocol string `json:"protocol,omitempty"` + + // source + Source string `json:"source,omitempty"` + + // type + Type string `json:"type,omitempty"` +} + +// Validate validates this v1 cox edge security group rule +func (m *V1CoxEdgeSecurityGroupRule) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateAction(formats); err != nil { + res = append(res, err) + } + + if err := m.validateProtocol(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +var v1CoxEdgeSecurityGroupRuleTypeActionPropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["block","allow"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + v1CoxEdgeSecurityGroupRuleTypeActionPropEnum = append(v1CoxEdgeSecurityGroupRuleTypeActionPropEnum, v) + } +} + +const ( + + // V1CoxEdgeSecurityGroupRuleActionBlock captures enum value "block" + V1CoxEdgeSecurityGroupRuleActionBlock string = "block" + + // V1CoxEdgeSecurityGroupRuleActionAllow captures enum value "allow" + V1CoxEdgeSecurityGroupRuleActionAllow string = "allow" +) + +// prop value enum +func (m *V1CoxEdgeSecurityGroupRule) validateActionEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, v1CoxEdgeSecurityGroupRuleTypeActionPropEnum, true); err != nil { + return err + } + return nil +} + +func (m *V1CoxEdgeSecurityGroupRule) validateAction(formats strfmt.Registry) error { + + if swag.IsZero(m.Action) { // not required + return nil + } + + // value enum + if err := m.validateActionEnum("action", "body", m.Action); err != nil { + return err + } + + return nil +} + +var v1CoxEdgeSecurityGroupRuleTypeProtocolPropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["TCP","UDP","TCP_UDP","ESP","AH","ICMP","GRE"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + v1CoxEdgeSecurityGroupRuleTypeProtocolPropEnum = append(v1CoxEdgeSecurityGroupRuleTypeProtocolPropEnum, v) + } +} + +const ( + + // V1CoxEdgeSecurityGroupRuleProtocolTCP captures enum value "TCP" + V1CoxEdgeSecurityGroupRuleProtocolTCP string = "TCP" + + // V1CoxEdgeSecurityGroupRuleProtocolUDP captures enum value "UDP" + V1CoxEdgeSecurityGroupRuleProtocolUDP string = "UDP" + + // V1CoxEdgeSecurityGroupRuleProtocolTCPUDP captures enum value "TCP_UDP" + V1CoxEdgeSecurityGroupRuleProtocolTCPUDP string = "TCP_UDP" + + // V1CoxEdgeSecurityGroupRuleProtocolESP captures enum value "ESP" + V1CoxEdgeSecurityGroupRuleProtocolESP string = "ESP" + + // V1CoxEdgeSecurityGroupRuleProtocolAH captures enum value "AH" + V1CoxEdgeSecurityGroupRuleProtocolAH string = "AH" + + // V1CoxEdgeSecurityGroupRuleProtocolICMP captures enum value "ICMP" + V1CoxEdgeSecurityGroupRuleProtocolICMP string = "ICMP" + + // V1CoxEdgeSecurityGroupRuleProtocolGRE captures enum value "GRE" + V1CoxEdgeSecurityGroupRuleProtocolGRE string = "GRE" +) + +// prop value enum +func (m *V1CoxEdgeSecurityGroupRule) validateProtocolEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, v1CoxEdgeSecurityGroupRuleTypeProtocolPropEnum, true); err != nil { + return err + } + return nil +} + +func (m *V1CoxEdgeSecurityGroupRule) validateProtocol(formats strfmt.Registry) error { + + if swag.IsZero(m.Protocol) { // not required + return nil + } + + // value enum + if err := m.validateProtocolEnum("protocol", "body", m.Protocol); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1CoxEdgeSecurityGroupRule) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1CoxEdgeSecurityGroupRule) UnmarshalBinary(b []byte) error { + var res V1CoxEdgeSecurityGroupRule + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cox_edge_service.go b/api/models/v1_cox_edge_service.go new file mode 100644 index 00000000..9f71b4a8 --- /dev/null +++ b/api/models/v1_cox_edge_service.go @@ -0,0 +1,49 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1CoxEdgeService CoxEdge service entity +// +// swagger:model v1CoxEdgeService +type V1CoxEdgeService struct { + + // CoxEdge service code + Code string `json:"code,omitempty"` + + // CoxEdge service id + ID string `json:"id,omitempty"` + + // CoxEdge service name + Name string `json:"name,omitempty"` +} + +// Validate validates this v1 cox edge service +func (m *V1CoxEdgeService) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1CoxEdgeService) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1CoxEdgeService) UnmarshalBinary(b []byte) error { + var res V1CoxEdgeService + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cox_edge_services.go b/api/models/v1_cox_edge_services.go new file mode 100644 index 00000000..f1a976d6 --- /dev/null +++ b/api/models/v1_cox_edge_services.go @@ -0,0 +1,82 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1CoxEdgeServices List of CoxEdge services +// +// swagger:model v1CoxEdgeServices +type V1CoxEdgeServices struct { + + // services + // Required: true + Services []*V1CoxEdgeService `json:"services"` +} + +// Validate validates this v1 cox edge services +func (m *V1CoxEdgeServices) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateServices(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1CoxEdgeServices) validateServices(formats strfmt.Registry) error { + + if err := validate.Required("services", "body", m.Services); err != nil { + return err + } + + for i := 0; i < len(m.Services); i++ { + if swag.IsZero(m.Services[i]) { // not required + continue + } + + if m.Services[i] != nil { + if err := m.Services[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("services" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1CoxEdgeServices) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1CoxEdgeServices) UnmarshalBinary(b []byte) error { + var res V1CoxEdgeServices + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cpu.go b/api/models/v1_cpu.go new file mode 100644 index 00000000..142ceb33 --- /dev/null +++ b/api/models/v1_cpu.go @@ -0,0 +1,43 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1CPU v1 CPU +// +// swagger:model v1CPU +type V1CPU struct { + + // number of cpu cores + Cores int32 `json:"cores,omitempty"` +} + +// Validate validates this v1 CPU +func (m *V1CPU) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1CPU) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1CPU) UnmarshalBinary(b []byte) error { + var res V1CPU + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_cpu_passthrough_spec.go b/api/models/v1_cpu_passthrough_spec.go new file mode 100644 index 00000000..bea9a437 --- /dev/null +++ b/api/models/v1_cpu_passthrough_spec.go @@ -0,0 +1,46 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1CPUPassthroughSpec v1 CPU passthrough spec +// +// swagger:model v1CPUPassthroughSpec +type V1CPUPassthroughSpec struct { + + // cache passthrough + CachePassthrough bool `json:"cachePassthrough,omitempty"` + + // Enables the CPU Passthrough for the libvirt domain + IsEnabled bool `json:"isEnabled,omitempty"` +} + +// Validate validates this v1 CPU passthrough spec +func (m *V1CPUPassthroughSpec) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1CPUPassthroughSpec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1CPUPassthroughSpec) UnmarshalBinary(b []byte) error { + var res V1CPUPassthroughSpec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_custom_account.go b/api/models/v1_custom_account.go new file mode 100644 index 00000000..188668eb --- /dev/null +++ b/api/models/v1_custom_account.go @@ -0,0 +1,127 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1CustomAccount Custom account information +// +// swagger:model v1CustomAccount +type V1CustomAccount struct { + + // Cloud account api version + APIVersion string `json:"apiVersion,omitempty"` + + // Cloud account kind + Kind string `json:"kind,omitempty"` + + // metadata + Metadata *V1ObjectMeta `json:"metadata,omitempty"` + + // spec + Spec *V1CustomCloudAccount `json:"spec,omitempty"` + + // status + Status *V1CloudAccountStatus `json:"status,omitempty"` +} + +// Validate validates this v1 custom account +func (m *V1CustomAccount) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSpec(formats); err != nil { + res = append(res, err) + } + + if err := m.validateStatus(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1CustomAccount) validateMetadata(formats strfmt.Registry) error { + + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } + return err + } + } + + return nil +} + +func (m *V1CustomAccount) validateSpec(formats strfmt.Registry) error { + + if swag.IsZero(m.Spec) { // not required + return nil + } + + if m.Spec != nil { + if err := m.Spec.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec") + } + return err + } + } + + return nil +} + +func (m *V1CustomAccount) validateStatus(formats strfmt.Registry) error { + + if swag.IsZero(m.Status) { // not required + return nil + } + + if m.Status != nil { + if err := m.Status.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("status") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1CustomAccount) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1CustomAccount) UnmarshalBinary(b []byte) error { + var res V1CustomAccount + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_custom_account_entity.go b/api/models/v1_custom_account_entity.go new file mode 100644 index 00000000..fcf891d8 --- /dev/null +++ b/api/models/v1_custom_account_entity.go @@ -0,0 +1,96 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1CustomAccountEntity Custom account information +// +// swagger:model v1CustomAccountEntity +type V1CustomAccountEntity struct { + + // metadata + Metadata *V1ObjectMetaInputEntity `json:"metadata,omitempty"` + + // spec + Spec *V1CustomCloudAccount `json:"spec,omitempty"` +} + +// Validate validates this v1 custom account entity +func (m *V1CustomAccountEntity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSpec(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1CustomAccountEntity) validateMetadata(formats strfmt.Registry) error { + + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } + return err + } + } + + return nil +} + +func (m *V1CustomAccountEntity) validateSpec(formats strfmt.Registry) error { + + if swag.IsZero(m.Spec) { // not required + return nil + } + + if m.Spec != nil { + if err := m.Spec.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1CustomAccountEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1CustomAccountEntity) UnmarshalBinary(b []byte) error { + var res V1CustomAccountEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_custom_accounts.go b/api/models/v1_custom_accounts.go new file mode 100644 index 00000000..92320b5a --- /dev/null +++ b/api/models/v1_custom_accounts.go @@ -0,0 +1,112 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1CustomAccounts v1 custom accounts +// +// swagger:model v1CustomAccounts +type V1CustomAccounts struct { + + // items + // Required: true + // Unique: true + Items []*V1CustomAccount `json:"items"` + + // listmeta + Listmeta *V1ListMetaData `json:"listmeta,omitempty"` +} + +// Validate validates this v1 custom accounts +func (m *V1CustomAccounts) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateItems(formats); err != nil { + res = append(res, err) + } + + if err := m.validateListmeta(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1CustomAccounts) validateItems(formats strfmt.Registry) error { + + if err := validate.Required("items", "body", m.Items); err != nil { + return err + } + + if err := validate.UniqueItems("items", "body", m.Items); err != nil { + return err + } + + for i := 0; i < len(m.Items); i++ { + if swag.IsZero(m.Items[i]) { // not required + continue + } + + if m.Items[i] != nil { + if err := m.Items[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("items" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1CustomAccounts) validateListmeta(formats strfmt.Registry) error { + + if swag.IsZero(m.Listmeta) { // not required + return nil + } + + if m.Listmeta != nil { + if err := m.Listmeta.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("listmeta") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1CustomAccounts) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1CustomAccounts) UnmarshalBinary(b []byte) error { + var res V1CustomAccounts + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_custom_cloud_account.go b/api/models/v1_custom_cloud_account.go new file mode 100644 index 00000000..0c3d0dab --- /dev/null +++ b/api/models/v1_custom_cloud_account.go @@ -0,0 +1,59 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1CustomCloudAccount v1 custom cloud account +// +// swagger:model v1CustomCloudAccount +type V1CustomCloudAccount struct { + + // Cloud account credentials + // Required: true + Credentials map[string]string `json:"credentials"` +} + +// Validate validates this v1 custom cloud account +func (m *V1CustomCloudAccount) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateCredentials(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1CustomCloudAccount) validateCredentials(formats strfmt.Registry) error { + + return nil +} + +// MarshalBinary interface implementation +func (m *V1CustomCloudAccount) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1CustomCloudAccount) UnmarshalBinary(b []byte) error { + var res V1CustomCloudAccount + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_custom_cloud_cluster_config_entity.go b/api/models/v1_custom_cloud_cluster_config_entity.go new file mode 100644 index 00000000..5a9394c4 --- /dev/null +++ b/api/models/v1_custom_cloud_cluster_config_entity.go @@ -0,0 +1,71 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1CustomCloudClusterConfigEntity Custom cloud cluster config entity +// +// swagger:model v1CustomCloudClusterConfigEntity +type V1CustomCloudClusterConfigEntity struct { + + // cluster config + ClusterConfig *V1CustomClusterConfig `json:"clusterConfig,omitempty"` +} + +// Validate validates this v1 custom cloud cluster config entity +func (m *V1CustomCloudClusterConfigEntity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateClusterConfig(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1CustomCloudClusterConfigEntity) validateClusterConfig(formats strfmt.Registry) error { + + if swag.IsZero(m.ClusterConfig) { // not required + return nil + } + + if m.ClusterConfig != nil { + if err := m.ClusterConfig.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("clusterConfig") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1CustomCloudClusterConfigEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1CustomCloudClusterConfigEntity) UnmarshalBinary(b []byte) error { + var res V1CustomCloudClusterConfigEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_custom_cloud_config.go b/api/models/v1_custom_cloud_config.go new file mode 100644 index 00000000..6f4996e3 --- /dev/null +++ b/api/models/v1_custom_cloud_config.go @@ -0,0 +1,99 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1CustomCloudConfig CustomCloudConfig is the Schema for the custom cloudconfigs API +// +// swagger:model v1CustomCloudConfig +type V1CustomCloudConfig struct { + + // Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + Kind string `json:"kind,omitempty"` + + // metadata + Metadata *V1ObjectMeta `json:"metadata,omitempty"` + + // spec + Spec *V1CustomCloudConfigSpec `json:"spec,omitempty"` +} + +// Validate validates this v1 custom cloud config +func (m *V1CustomCloudConfig) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSpec(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1CustomCloudConfig) validateMetadata(formats strfmt.Registry) error { + + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } + return err + } + } + + return nil +} + +func (m *V1CustomCloudConfig) validateSpec(formats strfmt.Registry) error { + + if swag.IsZero(m.Spec) { // not required + return nil + } + + if m.Spec != nil { + if err := m.Spec.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1CustomCloudConfig) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1CustomCloudConfig) UnmarshalBinary(b []byte) error { + var res V1CustomCloudConfig + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_custom_cloud_config_spec.go b/api/models/v1_custom_cloud_config_spec.go new file mode 100644 index 00000000..ddd0e989 --- /dev/null +++ b/api/models/v1_custom_cloud_config_spec.go @@ -0,0 +1,130 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1CustomCloudConfigSpec CustomCloudConfigSpec defines the cloud configuration input by user This will translate to clusterspec/machinespec for cluster-api +// +// swagger:model v1CustomCloudConfigSpec +type V1CustomCloudConfigSpec struct { + + // cloudAccountRef should point to the secret which contains CustomCloudAccount + CloudAccountRef *V1ObjectReference `json:"cloudAccountRef,omitempty"` + + // cluster config + ClusterConfig *V1CustomClusterConfig `json:"clusterConfig,omitempty"` + + // machine pool config + MachinePoolConfig []*V1CustomMachinePoolConfig `json:"machinePoolConfig"` +} + +// Validate validates this v1 custom cloud config spec +func (m *V1CustomCloudConfigSpec) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateCloudAccountRef(formats); err != nil { + res = append(res, err) + } + + if err := m.validateClusterConfig(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMachinePoolConfig(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1CustomCloudConfigSpec) validateCloudAccountRef(formats strfmt.Registry) error { + + if swag.IsZero(m.CloudAccountRef) { // not required + return nil + } + + if m.CloudAccountRef != nil { + if err := m.CloudAccountRef.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("cloudAccountRef") + } + return err + } + } + + return nil +} + +func (m *V1CustomCloudConfigSpec) validateClusterConfig(formats strfmt.Registry) error { + + if swag.IsZero(m.ClusterConfig) { // not required + return nil + } + + if m.ClusterConfig != nil { + if err := m.ClusterConfig.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("clusterConfig") + } + return err + } + } + + return nil +} + +func (m *V1CustomCloudConfigSpec) validateMachinePoolConfig(formats strfmt.Registry) error { + + if swag.IsZero(m.MachinePoolConfig) { // not required + return nil + } + + for i := 0; i < len(m.MachinePoolConfig); i++ { + if swag.IsZero(m.MachinePoolConfig[i]) { // not required + continue + } + + if m.MachinePoolConfig[i] != nil { + if err := m.MachinePoolConfig[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("machinePoolConfig" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1CustomCloudConfigSpec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1CustomCloudConfigSpec) UnmarshalBinary(b []byte) error { + var res V1CustomCloudConfigSpec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_custom_cloud_meta_entity.go b/api/models/v1_custom_cloud_meta_entity.go new file mode 100644 index 00000000..4baebeac --- /dev/null +++ b/api/models/v1_custom_cloud_meta_entity.go @@ -0,0 +1,96 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1CustomCloudMetaEntity Custom cloud meta entity +// +// swagger:model v1CustomCloudMetaEntity +type V1CustomCloudMetaEntity struct { + + // Custom cloud metadata + Metadata *V1ObjectMeta `json:"metadata,omitempty"` + + // spec + Spec *V1CustomCloudMetaSpecEntity `json:"spec,omitempty"` +} + +// Validate validates this v1 custom cloud meta entity +func (m *V1CustomCloudMetaEntity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSpec(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1CustomCloudMetaEntity) validateMetadata(formats strfmt.Registry) error { + + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } + return err + } + } + + return nil +} + +func (m *V1CustomCloudMetaEntity) validateSpec(formats strfmt.Registry) error { + + if swag.IsZero(m.Spec) { // not required + return nil + } + + if m.Spec != nil { + if err := m.Spec.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1CustomCloudMetaEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1CustomCloudMetaEntity) UnmarshalBinary(b []byte) error { + var res V1CustomCloudMetaEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_custom_cloud_meta_spec_entity.go b/api/models/v1_custom_cloud_meta_spec_entity.go new file mode 100644 index 00000000..18bf8f38 --- /dev/null +++ b/api/models/v1_custom_cloud_meta_spec_entity.go @@ -0,0 +1,78 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1CustomCloudMetaSpecEntity Custom cloud spec response entity +// +// swagger:model v1CustomCloudMetaSpecEntity +type V1CustomCloudMetaSpecEntity struct { + + // cloud category + CloudCategory V1CloudCategory `json:"cloudCategory,omitempty"` + + // Custom cloud displayName + DisplayName string `json:"displayName,omitempty"` + + // If the custom cloud is a managed cluster + IsManaged bool `json:"isManaged,omitempty"` + + // Custom cloud logo + Logo string `json:"logo,omitempty"` +} + +// Validate validates this v1 custom cloud meta spec entity +func (m *V1CustomCloudMetaSpecEntity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateCloudCategory(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1CustomCloudMetaSpecEntity) validateCloudCategory(formats strfmt.Registry) error { + + if swag.IsZero(m.CloudCategory) { // not required + return nil + } + + if err := m.CloudCategory.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("cloudCategory") + } + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1CustomCloudMetaSpecEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1CustomCloudMetaSpecEntity) UnmarshalBinary(b []byte) error { + var res V1CustomCloudMetaSpecEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_custom_cloud_rate_config.go b/api/models/v1_custom_cloud_rate_config.go new file mode 100644 index 00000000..653e3392 --- /dev/null +++ b/api/models/v1_custom_cloud_rate_config.go @@ -0,0 +1,74 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1CustomCloudRateConfig Private cloud rate config +// +// swagger:model v1CustomCloudRateConfig +type V1CustomCloudRateConfig struct { + + // cloud type + CloudType string `json:"cloudType,omitempty"` + + // rate config + RateConfig *V1PrivateCloudRateConfig `json:"rateConfig,omitempty"` +} + +// Validate validates this v1 custom cloud rate config +func (m *V1CustomCloudRateConfig) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateRateConfig(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1CustomCloudRateConfig) validateRateConfig(formats strfmt.Registry) error { + + if swag.IsZero(m.RateConfig) { // not required + return nil + } + + if m.RateConfig != nil { + if err := m.RateConfig.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("rateConfig") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1CustomCloudRateConfig) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1CustomCloudRateConfig) UnmarshalBinary(b []byte) error { + var res V1CustomCloudRateConfig + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_custom_cloud_request_entity.go b/api/models/v1_custom_cloud_request_entity.go new file mode 100644 index 00000000..7e928a6d --- /dev/null +++ b/api/models/v1_custom_cloud_request_entity.go @@ -0,0 +1,96 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1CustomCloudRequestEntity Custom cloud request entity +// +// swagger:model v1CustomCloudRequestEntity +type V1CustomCloudRequestEntity struct { + + // Custom cloud metadata + Metadata *V1ObjectMetaInputEntity `json:"metadata,omitempty"` + + // spec + Spec *V1CustomCloudSpecEntity `json:"spec,omitempty"` +} + +// Validate validates this v1 custom cloud request entity +func (m *V1CustomCloudRequestEntity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSpec(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1CustomCloudRequestEntity) validateMetadata(formats strfmt.Registry) error { + + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } + return err + } + } + + return nil +} + +func (m *V1CustomCloudRequestEntity) validateSpec(formats strfmt.Registry) error { + + if swag.IsZero(m.Spec) { // not required + return nil + } + + if m.Spec != nil { + if err := m.Spec.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1CustomCloudRequestEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1CustomCloudRequestEntity) UnmarshalBinary(b []byte) error { + var res V1CustomCloudRequestEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_custom_cloud_spec_entity.go b/api/models/v1_custom_cloud_spec_entity.go new file mode 100644 index 00000000..f641d02e --- /dev/null +++ b/api/models/v1_custom_cloud_spec_entity.go @@ -0,0 +1,78 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1CustomCloudSpecEntity Custom cloud request entity spec +// +// swagger:model v1CustomCloudSpecEntity +type V1CustomCloudSpecEntity struct { + + // cloud category + CloudCategory V1CloudCategory `json:"cloudCategory,omitempty"` + + // Custom cloud displayName + DisplayName string `json:"displayName,omitempty"` + + // If the custom cloud is a managed cluster + IsControlPlaneManaged bool `json:"isControlPlaneManaged,omitempty"` + + // Custom cloud logo + Logo string `json:"logo,omitempty"` +} + +// Validate validates this v1 custom cloud spec entity +func (m *V1CustomCloudSpecEntity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateCloudCategory(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1CustomCloudSpecEntity) validateCloudCategory(formats strfmt.Registry) error { + + if swag.IsZero(m.CloudCategory) { // not required + return nil + } + + if err := m.CloudCategory.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("cloudCategory") + } + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1CustomCloudSpecEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1CustomCloudSpecEntity) UnmarshalBinary(b []byte) error { + var res V1CustomCloudSpecEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_custom_cloud_type.go b/api/models/v1_custom_cloud_type.go new file mode 100644 index 00000000..db38afc2 --- /dev/null +++ b/api/models/v1_custom_cloud_type.go @@ -0,0 +1,90 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1CustomCloudType v1 custom cloud type +// +// swagger:model v1CustomCloudType +type V1CustomCloudType struct { + + // cloud category + CloudCategory V1CloudCategory `json:"cloudCategory,omitempty"` + + // Cloud grouping as family + CloudFamily string `json:"cloudFamily,omitempty"` + + // Custom cloudtype displayName + DisplayName string `json:"displayName,omitempty"` + + // If it is a custom cloudtype + IsCustom bool `json:"isCustom"` + + // If custom cloudtype is managed + IsManaged bool `json:"isManaged"` + + // If cloud is support for Vertex env + IsVertex bool `json:"isVertex"` + + // Custom cloudtype logo + Logo string `json:"logo,omitempty"` + + // Custom cloudtype name + Name string `json:"name,omitempty"` +} + +// Validate validates this v1 custom cloud type +func (m *V1CustomCloudType) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateCloudCategory(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1CustomCloudType) validateCloudCategory(formats strfmt.Registry) error { + + if swag.IsZero(m.CloudCategory) { // not required + return nil + } + + if err := m.CloudCategory.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("cloudCategory") + } + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1CustomCloudType) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1CustomCloudType) UnmarshalBinary(b []byte) error { + var res V1CustomCloudType + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_custom_cloud_type_cloud_account_keys.go b/api/models/v1_custom_cloud_type_cloud_account_keys.go new file mode 100644 index 00000000..244a83c5 --- /dev/null +++ b/api/models/v1_custom_cloud_type_cloud_account_keys.go @@ -0,0 +1,43 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1CustomCloudTypeCloudAccountKeys Custom cloudType custom cloud account keys +// +// swagger:model v1CustomCloudTypeCloudAccountKeys +type V1CustomCloudTypeCloudAccountKeys struct { + + // Array of custom cloud type cloud account keys + Keys []string `json:"keys"` +} + +// Validate validates this v1 custom cloud type cloud account keys +func (m *V1CustomCloudTypeCloudAccountKeys) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1CustomCloudTypeCloudAccountKeys) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1CustomCloudTypeCloudAccountKeys) UnmarshalBinary(b []byte) error { + var res V1CustomCloudTypeCloudAccountKeys + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_custom_cloud_type_content_response.go b/api/models/v1_custom_cloud_type_content_response.go new file mode 100644 index 00000000..4d121e90 --- /dev/null +++ b/api/models/v1_custom_cloud_type_content_response.go @@ -0,0 +1,43 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1CustomCloudTypeContentResponse Custom cloudType content response +// +// swagger:model v1CustomCloudTypeContentResponse +type V1CustomCloudTypeContentResponse struct { + + // custom cloud type content + Yaml string `json:"yaml,omitempty"` +} + +// Validate validates this v1 custom cloud type content response +func (m *V1CustomCloudTypeContentResponse) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1CustomCloudTypeContentResponse) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1CustomCloudTypeContentResponse) UnmarshalBinary(b []byte) error { + var res V1CustomCloudTypeContentResponse + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_custom_cloud_types.go b/api/models/v1_custom_cloud_types.go new file mode 100644 index 00000000..35aaed76 --- /dev/null +++ b/api/models/v1_custom_cloud_types.go @@ -0,0 +1,80 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1CustomCloudTypes Custom cloudType content response +// +// swagger:model v1CustomCloudTypes +type V1CustomCloudTypes struct { + + // Array of custom cloud types + CloudTypes []*V1CustomCloudType `json:"cloudTypes"` +} + +// Validate validates this v1 custom cloud types +func (m *V1CustomCloudTypes) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateCloudTypes(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1CustomCloudTypes) validateCloudTypes(formats strfmt.Registry) error { + + if swag.IsZero(m.CloudTypes) { // not required + return nil + } + + for i := 0; i < len(m.CloudTypes); i++ { + if swag.IsZero(m.CloudTypes[i]) { // not required + continue + } + + if m.CloudTypes[i] != nil { + if err := m.CloudTypes[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("cloudTypes" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1CustomCloudTypes) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1CustomCloudTypes) UnmarshalBinary(b []byte) error { + var res V1CustomCloudTypes + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_custom_cluster_config.go b/api/models/v1_custom_cluster_config.go new file mode 100644 index 00000000..d9f8a028 --- /dev/null +++ b/api/models/v1_custom_cluster_config.go @@ -0,0 +1,64 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1CustomClusterConfig Cluster level configuration for Custom cloud and applicable for all the machine pools +// +// swagger:model v1CustomClusterConfig +type V1CustomClusterConfig struct { + + // YAML string for Cluster and CloudCluster + // Required: true + Values *string `json:"values"` +} + +// Validate validates this v1 custom cluster config +func (m *V1CustomClusterConfig) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateValues(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1CustomClusterConfig) validateValues(formats strfmt.Registry) error { + + if err := validate.Required("values", "body", m.Values); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1CustomClusterConfig) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1CustomClusterConfig) UnmarshalBinary(b []byte) error { + var res V1CustomClusterConfig + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_custom_cluster_config_entity.go b/api/models/v1_custom_cluster_config_entity.go new file mode 100644 index 00000000..fd16a2e8 --- /dev/null +++ b/api/models/v1_custom_cluster_config_entity.go @@ -0,0 +1,121 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1CustomClusterConfigEntity v1 custom cluster config entity +// +// swagger:model v1CustomClusterConfigEntity +type V1CustomClusterConfigEntity struct { + + // location + Location *V1ClusterLocation `json:"location,omitempty"` + + // machine management config + MachineManagementConfig *V1MachineManagementConfig `json:"machineManagementConfig,omitempty"` + + // resources + Resources *V1ClusterResourcesEntity `json:"resources,omitempty"` +} + +// Validate validates this v1 custom cluster config entity +func (m *V1CustomClusterConfigEntity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateLocation(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMachineManagementConfig(formats); err != nil { + res = append(res, err) + } + + if err := m.validateResources(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1CustomClusterConfigEntity) validateLocation(formats strfmt.Registry) error { + + if swag.IsZero(m.Location) { // not required + return nil + } + + if m.Location != nil { + if err := m.Location.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("location") + } + return err + } + } + + return nil +} + +func (m *V1CustomClusterConfigEntity) validateMachineManagementConfig(formats strfmt.Registry) error { + + if swag.IsZero(m.MachineManagementConfig) { // not required + return nil + } + + if m.MachineManagementConfig != nil { + if err := m.MachineManagementConfig.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("machineManagementConfig") + } + return err + } + } + + return nil +} + +func (m *V1CustomClusterConfigEntity) validateResources(formats strfmt.Registry) error { + + if swag.IsZero(m.Resources) { // not required + return nil + } + + if m.Resources != nil { + if err := m.Resources.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("resources") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1CustomClusterConfigEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1CustomClusterConfigEntity) UnmarshalBinary(b []byte) error { + var res V1CustomClusterConfigEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_custom_instance_type.go b/api/models/v1_custom_instance_type.go new file mode 100644 index 00000000..e7d74ce2 --- /dev/null +++ b/api/models/v1_custom_instance_type.go @@ -0,0 +1,52 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1CustomInstanceType v1 custom instance type +// +// swagger:model v1CustomInstanceType +type V1CustomInstanceType struct { + + // DiskGiB is the size of a custom machine's disk, in GiB + DiskGiB int32 `json:"diskGiB,omitempty"` + + // MemoryMiB is the size of a custom machine's memory, in MiB + MemoryMiB int64 `json:"memoryMiB,omitempty"` + + // name + Name string `json:"name,omitempty"` + + // NumCPUs is the number in a custom machine + NumCPUs int32 `json:"numCPUs,omitempty"` +} + +// Validate validates this v1 custom instance type +func (m *V1CustomInstanceType) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1CustomInstanceType) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1CustomInstanceType) UnmarshalBinary(b []byte) error { + var res V1CustomInstanceType + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_custom_machine.go b/api/models/v1_custom_machine.go new file mode 100644 index 00000000..e2084392 --- /dev/null +++ b/api/models/v1_custom_machine.go @@ -0,0 +1,127 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1CustomMachine Custom cloud VM definition +// +// swagger:model v1CustomMachine +type V1CustomMachine struct { + + // api version + APIVersion string `json:"apiVersion,omitempty"` + + // kind + Kind string `json:"kind,omitempty"` + + // metadata + Metadata *V1ObjectMeta `json:"metadata,omitempty"` + + // spec + Spec *V1CustomMachineSpec `json:"spec,omitempty"` + + // status + Status *V1CloudMachineStatus `json:"status,omitempty"` +} + +// Validate validates this v1 custom machine +func (m *V1CustomMachine) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSpec(formats); err != nil { + res = append(res, err) + } + + if err := m.validateStatus(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1CustomMachine) validateMetadata(formats strfmt.Registry) error { + + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } + return err + } + } + + return nil +} + +func (m *V1CustomMachine) validateSpec(formats strfmt.Registry) error { + + if swag.IsZero(m.Spec) { // not required + return nil + } + + if m.Spec != nil { + if err := m.Spec.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec") + } + return err + } + } + + return nil +} + +func (m *V1CustomMachine) validateStatus(formats strfmt.Registry) error { + + if swag.IsZero(m.Status) { // not required + return nil + } + + if m.Status != nil { + if err := m.Status.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("status") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1CustomMachine) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1CustomMachine) UnmarshalBinary(b []byte) error { + var res V1CustomMachine + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_custom_machine_pool_base_config_entity.go b/api/models/v1_custom_machine_pool_base_config_entity.go new file mode 100644 index 00000000..64ab3096 --- /dev/null +++ b/api/models/v1_custom_machine_pool_base_config_entity.go @@ -0,0 +1,95 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1CustomMachinePoolBaseConfigEntity Machine pool configuration for the custom cluster +// +// swagger:model v1CustomMachinePoolBaseConfigEntity +type V1CustomMachinePoolBaseConfigEntity struct { + + // Additional labels to be part of the machine pool + AdditionalLabels map[string]string `json:"additionalLabels,omitempty"` + + // Whether this pool is for control plane + IsControlPlane bool `json:"isControlPlane"` + + // control plane or worker taints + // Unique: true + Taints []*V1Taint `json:"taints"` + + // If IsControlPlane==true && useControlPlaneAsWorker==true, then will remove control plane taint this will not be used for worker pools + UseControlPlaneAsWorker bool `json:"useControlPlaneAsWorker"` +} + +// Validate validates this v1 custom machine pool base config entity +func (m *V1CustomMachinePoolBaseConfigEntity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateTaints(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1CustomMachinePoolBaseConfigEntity) validateTaints(formats strfmt.Registry) error { + + if swag.IsZero(m.Taints) { // not required + return nil + } + + if err := validate.UniqueItems("taints", "body", m.Taints); err != nil { + return err + } + + for i := 0; i < len(m.Taints); i++ { + if swag.IsZero(m.Taints[i]) { // not required + continue + } + + if m.Taints[i] != nil { + if err := m.Taints[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("taints" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1CustomMachinePoolBaseConfigEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1CustomMachinePoolBaseConfigEntity) UnmarshalBinary(b []byte) error { + var res V1CustomMachinePoolBaseConfigEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_custom_machine_pool_cloud_config_entity.go b/api/models/v1_custom_machine_pool_cloud_config_entity.go new file mode 100644 index 00000000..81ce44e7 --- /dev/null +++ b/api/models/v1_custom_machine_pool_cloud_config_entity.go @@ -0,0 +1,43 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1CustomMachinePoolCloudConfigEntity v1 custom machine pool cloud config entity +// +// swagger:model v1CustomMachinePoolCloudConfigEntity +type V1CustomMachinePoolCloudConfigEntity struct { + + // Machine pool configuration as yaml content + Values string `json:"values,omitempty"` +} + +// Validate validates this v1 custom machine pool cloud config entity +func (m *V1CustomMachinePoolCloudConfigEntity) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1CustomMachinePoolCloudConfigEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1CustomMachinePoolCloudConfigEntity) UnmarshalBinary(b []byte) error { + var res V1CustomMachinePoolCloudConfigEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_custom_machine_pool_config.go b/api/models/v1_custom_machine_pool_config.go new file mode 100644 index 00000000..660585ca --- /dev/null +++ b/api/models/v1_custom_machine_pool_config.go @@ -0,0 +1,118 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1CustomMachinePoolConfig v1 custom machine pool config +// +// swagger:model v1CustomMachinePoolConfig +type V1CustomMachinePoolConfig struct { + + // additionalLabels + AdditionalLabels map[string]string `json:"additionalLabels,omitempty"` + + // whether this pool is for control plane + // Required: true + IsControlPlane *bool `json:"isControlPlane"` + + // name + Name string `json:"name,omitempty"` + + // size of the pool, number of machines + Size int32 `json:"size,omitempty"` + + // control plane or worker taints + // Unique: true + Taints []*V1Taint `json:"taints"` + + // if IsControlPlane==true && useControlPlaneAsWorker==true, then will remove control plane taint this will not be used for worker pools + UseControlPlaneAsWorker bool `json:"useControlPlaneAsWorker"` + + // YAML string for machine + Values string `json:"values,omitempty"` +} + +// Validate validates this v1 custom machine pool config +func (m *V1CustomMachinePoolConfig) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateIsControlPlane(formats); err != nil { + res = append(res, err) + } + + if err := m.validateTaints(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1CustomMachinePoolConfig) validateIsControlPlane(formats strfmt.Registry) error { + + if err := validate.Required("isControlPlane", "body", m.IsControlPlane); err != nil { + return err + } + + return nil +} + +func (m *V1CustomMachinePoolConfig) validateTaints(formats strfmt.Registry) error { + + if swag.IsZero(m.Taints) { // not required + return nil + } + + if err := validate.UniqueItems("taints", "body", m.Taints); err != nil { + return err + } + + for i := 0; i < len(m.Taints); i++ { + if swag.IsZero(m.Taints[i]) { // not required + continue + } + + if m.Taints[i] != nil { + if err := m.Taints[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("taints" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1CustomMachinePoolConfig) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1CustomMachinePoolConfig) UnmarshalBinary(b []byte) error { + var res V1CustomMachinePoolConfig + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_custom_machine_pool_config_entity.go b/api/models/v1_custom_machine_pool_config_entity.go new file mode 100644 index 00000000..d096bf28 --- /dev/null +++ b/api/models/v1_custom_machine_pool_config_entity.go @@ -0,0 +1,98 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1CustomMachinePoolConfigEntity v1 custom machine pool config entity +// +// swagger:model v1CustomMachinePoolConfigEntity +type V1CustomMachinePoolConfigEntity struct { + + // cloud config + // Required: true + CloudConfig *V1CustomMachinePoolCloudConfigEntity `json:"cloudConfig"` + + // pool config + PoolConfig *V1CustomMachinePoolBaseConfigEntity `json:"poolConfig,omitempty"` +} + +// Validate validates this v1 custom machine pool config entity +func (m *V1CustomMachinePoolConfigEntity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateCloudConfig(formats); err != nil { + res = append(res, err) + } + + if err := m.validatePoolConfig(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1CustomMachinePoolConfigEntity) validateCloudConfig(formats strfmt.Registry) error { + + if err := validate.Required("cloudConfig", "body", m.CloudConfig); err != nil { + return err + } + + if m.CloudConfig != nil { + if err := m.CloudConfig.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("cloudConfig") + } + return err + } + } + + return nil +} + +func (m *V1CustomMachinePoolConfigEntity) validatePoolConfig(formats strfmt.Registry) error { + + if swag.IsZero(m.PoolConfig) { // not required + return nil + } + + if m.PoolConfig != nil { + if err := m.PoolConfig.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("poolConfig") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1CustomMachinePoolConfigEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1CustomMachinePoolConfigEntity) UnmarshalBinary(b []byte) error { + var res V1CustomMachinePoolConfigEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_custom_machine_spec.go b/api/models/v1_custom_machine_spec.go new file mode 100644 index 00000000..d3ee9a71 --- /dev/null +++ b/api/models/v1_custom_machine_spec.go @@ -0,0 +1,117 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1CustomMachineSpec Custom cloud VM definition spec +// +// swagger:model v1CustomMachineSpec +type V1CustomMachineSpec struct { + + // cloud type + CloudType string `json:"cloudType,omitempty"` + + // host name + HostName string `json:"hostName,omitempty"` + + // image Id + ImageID string `json:"imageId,omitempty"` + + // instance type + InstanceType *V1CustomInstanceType `json:"instanceType,omitempty"` + + // nics + Nics []*V1CustomNic `json:"nics"` + + // ssh key name + SSHKeyName string `json:"sshKeyName,omitempty"` +} + +// Validate validates this v1 custom machine spec +func (m *V1CustomMachineSpec) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateInstanceType(formats); err != nil { + res = append(res, err) + } + + if err := m.validateNics(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1CustomMachineSpec) validateInstanceType(formats strfmt.Registry) error { + + if swag.IsZero(m.InstanceType) { // not required + return nil + } + + if m.InstanceType != nil { + if err := m.InstanceType.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("instanceType") + } + return err + } + } + + return nil +} + +func (m *V1CustomMachineSpec) validateNics(formats strfmt.Registry) error { + + if swag.IsZero(m.Nics) { // not required + return nil + } + + for i := 0; i < len(m.Nics); i++ { + if swag.IsZero(m.Nics[i]) { // not required + continue + } + + if m.Nics[i] != nil { + if err := m.Nics[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("nics" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1CustomMachineSpec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1CustomMachineSpec) UnmarshalBinary(b []byte) error { + var res V1CustomMachineSpec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_custom_machines.go b/api/models/v1_custom_machines.go new file mode 100644 index 00000000..05fdd4cb --- /dev/null +++ b/api/models/v1_custom_machines.go @@ -0,0 +1,112 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1CustomMachines List of Custom machines +// +// swagger:model v1CustomMachines +type V1CustomMachines struct { + + // items + // Required: true + // Unique: true + Items []*V1CustomMachine `json:"items"` + + // listmeta + Listmeta *V1ListMetaData `json:"listmeta,omitempty"` +} + +// Validate validates this v1 custom machines +func (m *V1CustomMachines) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateItems(formats); err != nil { + res = append(res, err) + } + + if err := m.validateListmeta(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1CustomMachines) validateItems(formats strfmt.Registry) error { + + if err := validate.Required("items", "body", m.Items); err != nil { + return err + } + + if err := validate.UniqueItems("items", "body", m.Items); err != nil { + return err + } + + for i := 0; i < len(m.Items); i++ { + if swag.IsZero(m.Items[i]) { // not required + continue + } + + if m.Items[i] != nil { + if err := m.Items[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("items" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1CustomMachines) validateListmeta(formats strfmt.Registry) error { + + if swag.IsZero(m.Listmeta) { // not required + return nil + } + + if m.Listmeta != nil { + if err := m.Listmeta.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("listmeta") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1CustomMachines) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1CustomMachines) UnmarshalBinary(b []byte) error { + var res V1CustomMachines + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_custom_nic.go b/api/models/v1_custom_nic.go new file mode 100644 index 00000000..e15347fb --- /dev/null +++ b/api/models/v1_custom_nic.go @@ -0,0 +1,52 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1CustomNic Custom network interface +// +// swagger:model v1CustomNic +type V1CustomNic struct { + + // index + Index int8 `json:"index,omitempty"` + + // network name + NetworkName string `json:"networkName,omitempty"` + + // private i ps + PrivateIPs []string `json:"privateIPs"` + + // public Ip + PublicIP string `json:"publicIp,omitempty"` +} + +// Validate validates this v1 custom nic +func (m *V1CustomNic) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1CustomNic) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1CustomNic) UnmarshalBinary(b []byte) error { + var res V1CustomNic + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_dashboard_workspace.go b/api/models/v1_dashboard_workspace.go new file mode 100644 index 00000000..4ea16ada --- /dev/null +++ b/api/models/v1_dashboard_workspace.go @@ -0,0 +1,146 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1DashboardWorkspace Workspace information +// +// swagger:model v1DashboardWorkspace +type V1DashboardWorkspace struct { + + // meta + Meta *V1DashboardWorkspaceMeta `json:"meta,omitempty"` + + // metadata + Metadata *V1ObjectMeta `json:"metadata,omitempty"` + + // spec + Spec *V1DashboardWorkspaceSpec `json:"spec,omitempty"` + + // status + Status *V1DashboardWorkspaceStatus `json:"status,omitempty"` +} + +// Validate validates this v1 dashboard workspace +func (m *V1DashboardWorkspace) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMeta(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSpec(formats); err != nil { + res = append(res, err) + } + + if err := m.validateStatus(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1DashboardWorkspace) validateMeta(formats strfmt.Registry) error { + + if swag.IsZero(m.Meta) { // not required + return nil + } + + if m.Meta != nil { + if err := m.Meta.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("meta") + } + return err + } + } + + return nil +} + +func (m *V1DashboardWorkspace) validateMetadata(formats strfmt.Registry) error { + + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } + return err + } + } + + return nil +} + +func (m *V1DashboardWorkspace) validateSpec(formats strfmt.Registry) error { + + if swag.IsZero(m.Spec) { // not required + return nil + } + + if m.Spec != nil { + if err := m.Spec.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec") + } + return err + } + } + + return nil +} + +func (m *V1DashboardWorkspace) validateStatus(formats strfmt.Registry) error { + + if swag.IsZero(m.Status) { // not required + return nil + } + + if m.Status != nil { + if err := m.Status.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("status") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1DashboardWorkspace) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1DashboardWorkspace) UnmarshalBinary(b []byte) error { + var res V1DashboardWorkspace + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_dashboard_workspace_allocation.go b/api/models/v1_dashboard_workspace_allocation.go new file mode 100644 index 00000000..91239976 --- /dev/null +++ b/api/models/v1_dashboard_workspace_allocation.go @@ -0,0 +1,96 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1DashboardWorkspaceAllocation Workspace allocation +// +// swagger:model v1DashboardWorkspaceAllocation +type V1DashboardWorkspaceAllocation struct { + + // cpu + CPU *V1DashboardWorkspaceResourceAllocation `json:"cpu,omitempty"` + + // memory + Memory *V1DashboardWorkspaceResourceAllocation `json:"memory,omitempty"` +} + +// Validate validates this v1 dashboard workspace allocation +func (m *V1DashboardWorkspaceAllocation) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateCPU(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMemory(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1DashboardWorkspaceAllocation) validateCPU(formats strfmt.Registry) error { + + if swag.IsZero(m.CPU) { // not required + return nil + } + + if m.CPU != nil { + if err := m.CPU.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("cpu") + } + return err + } + } + + return nil +} + +func (m *V1DashboardWorkspaceAllocation) validateMemory(formats strfmt.Registry) error { + + if swag.IsZero(m.Memory) { // not required + return nil + } + + if m.Memory != nil { + if err := m.Memory.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("memory") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1DashboardWorkspaceAllocation) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1DashboardWorkspaceAllocation) UnmarshalBinary(b []byte) error { + var res V1DashboardWorkspaceAllocation + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_dashboard_workspace_cluster_ref.go b/api/models/v1_dashboard_workspace_cluster_ref.go new file mode 100644 index 00000000..9e418277 --- /dev/null +++ b/api/models/v1_dashboard_workspace_cluster_ref.go @@ -0,0 +1,46 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1DashboardWorkspaceClusterRef Workspace cluster reference +// +// swagger:model v1DashboardWorkspaceClusterRef +type V1DashboardWorkspaceClusterRef struct { + + // name + Name string `json:"name,omitempty"` + + // uid + UID string `json:"uid,omitempty"` +} + +// Validate validates this v1 dashboard workspace cluster ref +func (m *V1DashboardWorkspaceClusterRef) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1DashboardWorkspaceClusterRef) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1DashboardWorkspaceClusterRef) UnmarshalBinary(b []byte) error { + var res V1DashboardWorkspaceClusterRef + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_dashboard_workspace_meta.go b/api/models/v1_dashboard_workspace_meta.go new file mode 100644 index 00000000..16f08ad5 --- /dev/null +++ b/api/models/v1_dashboard_workspace_meta.go @@ -0,0 +1,158 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1DashboardWorkspaceMeta Deprecated. Workspace meta data +// +// swagger:model v1DashboardWorkspaceMeta +type V1DashboardWorkspaceMeta struct { + + // Deprecated. Use clusterRefs + // Unique: true + ClusterNames []string `json:"clusterNames"` + + // cluster refs + // Unique: true + ClusterRefs []*V1DashboardWorkspaceClusterRef `json:"clusterRefs"` + + // creation time + // Format: date-time + CreationTime V1Time `json:"creationTime,omitempty"` + + // name + Name string `json:"name,omitempty"` + + // namespaces + // Unique: true + Namespaces []string `json:"namespaces"` + + // uid + UID string `json:"uid,omitempty"` +} + +// Validate validates this v1 dashboard workspace meta +func (m *V1DashboardWorkspaceMeta) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateClusterNames(formats); err != nil { + res = append(res, err) + } + + if err := m.validateClusterRefs(formats); err != nil { + res = append(res, err) + } + + if err := m.validateCreationTime(formats); err != nil { + res = append(res, err) + } + + if err := m.validateNamespaces(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1DashboardWorkspaceMeta) validateClusterNames(formats strfmt.Registry) error { + + if swag.IsZero(m.ClusterNames) { // not required + return nil + } + + if err := validate.UniqueItems("clusterNames", "body", m.ClusterNames); err != nil { + return err + } + + return nil +} + +func (m *V1DashboardWorkspaceMeta) validateClusterRefs(formats strfmt.Registry) error { + + if swag.IsZero(m.ClusterRefs) { // not required + return nil + } + + if err := validate.UniqueItems("clusterRefs", "body", m.ClusterRefs); err != nil { + return err + } + + for i := 0; i < len(m.ClusterRefs); i++ { + if swag.IsZero(m.ClusterRefs[i]) { // not required + continue + } + + if m.ClusterRefs[i] != nil { + if err := m.ClusterRefs[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("clusterRefs" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1DashboardWorkspaceMeta) validateCreationTime(formats strfmt.Registry) error { + + if swag.IsZero(m.CreationTime) { // not required + return nil + } + + if err := m.CreationTime.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("creationTime") + } + return err + } + + return nil +} + +func (m *V1DashboardWorkspaceMeta) validateNamespaces(formats strfmt.Registry) error { + + if swag.IsZero(m.Namespaces) { // not required + return nil + } + + if err := validate.UniqueItems("namespaces", "body", m.Namespaces); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1DashboardWorkspaceMeta) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1DashboardWorkspaceMeta) UnmarshalBinary(b []byte) error { + var res V1DashboardWorkspaceMeta + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_dashboard_workspace_namespace_allocation.go b/api/models/v1_dashboard_workspace_namespace_allocation.go new file mode 100644 index 00000000..00e27625 --- /dev/null +++ b/api/models/v1_dashboard_workspace_namespace_allocation.go @@ -0,0 +1,74 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1DashboardWorkspaceNamespaceAllocation Workspace namespace allocation +// +// swagger:model v1DashboardWorkspaceNamespaceAllocation +type V1DashboardWorkspaceNamespaceAllocation struct { + + // name + Name string `json:"name,omitempty"` + + // total + Total *V1DashboardWorkspaceAllocation `json:"total,omitempty"` +} + +// Validate validates this v1 dashboard workspace namespace allocation +func (m *V1DashboardWorkspaceNamespaceAllocation) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateTotal(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1DashboardWorkspaceNamespaceAllocation) validateTotal(formats strfmt.Registry) error { + + if swag.IsZero(m.Total) { // not required + return nil + } + + if m.Total != nil { + if err := m.Total.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("total") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1DashboardWorkspaceNamespaceAllocation) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1DashboardWorkspaceNamespaceAllocation) UnmarshalBinary(b []byte) error { + var res V1DashboardWorkspaceNamespaceAllocation + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_dashboard_workspace_quota.go b/api/models/v1_dashboard_workspace_quota.go new file mode 100644 index 00000000..43f0ae1a --- /dev/null +++ b/api/models/v1_dashboard_workspace_quota.go @@ -0,0 +1,71 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1DashboardWorkspaceQuota Workspace resource quota +// +// swagger:model v1DashboardWorkspaceQuota +type V1DashboardWorkspaceQuota struct { + + // resource allocation + ResourceAllocation *V1DashboardWorkspaceQuotaResourceAllocation `json:"resourceAllocation,omitempty"` +} + +// Validate validates this v1 dashboard workspace quota +func (m *V1DashboardWorkspaceQuota) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateResourceAllocation(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1DashboardWorkspaceQuota) validateResourceAllocation(formats strfmt.Registry) error { + + if swag.IsZero(m.ResourceAllocation) { // not required + return nil + } + + if m.ResourceAllocation != nil { + if err := m.ResourceAllocation.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("resourceAllocation") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1DashboardWorkspaceQuota) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1DashboardWorkspaceQuota) UnmarshalBinary(b []byte) error { + var res V1DashboardWorkspaceQuota + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_dashboard_workspace_quota_resource_allocation.go b/api/models/v1_dashboard_workspace_quota_resource_allocation.go new file mode 100644 index 00000000..c8f4c39b --- /dev/null +++ b/api/models/v1_dashboard_workspace_quota_resource_allocation.go @@ -0,0 +1,89 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1DashboardWorkspaceQuotaResourceAllocation Workspace quota resource allocation +// +// swagger:model v1DashboardWorkspaceQuotaResourceAllocation +type V1DashboardWorkspaceQuotaResourceAllocation struct { + + // cpu + // Minimum: > 0 + CPU float64 `json:"cpu,omitempty"` + + // memory + // Minimum: > 0 + Memory float64 `json:"memory,omitempty"` +} + +// Validate validates this v1 dashboard workspace quota resource allocation +func (m *V1DashboardWorkspaceQuotaResourceAllocation) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateCPU(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMemory(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1DashboardWorkspaceQuotaResourceAllocation) validateCPU(formats strfmt.Registry) error { + + if swag.IsZero(m.CPU) { // not required + return nil + } + + if err := validate.Minimum("cpu", "body", float64(m.CPU), 0, true); err != nil { + return err + } + + return nil +} + +func (m *V1DashboardWorkspaceQuotaResourceAllocation) validateMemory(formats strfmt.Registry) error { + + if swag.IsZero(m.Memory) { // not required + return nil + } + + if err := validate.Minimum("memory", "body", float64(m.Memory), 0, true); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1DashboardWorkspaceQuotaResourceAllocation) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1DashboardWorkspaceQuotaResourceAllocation) UnmarshalBinary(b []byte) error { + var res V1DashboardWorkspaceQuotaResourceAllocation + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_dashboard_workspace_resource_allocation.go b/api/models/v1_dashboard_workspace_resource_allocation.go new file mode 100644 index 00000000..3f4f9ed1 --- /dev/null +++ b/api/models/v1_dashboard_workspace_resource_allocation.go @@ -0,0 +1,46 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1DashboardWorkspaceResourceAllocation Workspace resource allocation +// +// swagger:model v1DashboardWorkspaceResourceAllocation +type V1DashboardWorkspaceResourceAllocation struct { + + // allocated + Allocated float64 `json:"allocated"` + + // usage + Usage float64 `json:"usage"` +} + +// Validate validates this v1 dashboard workspace resource allocation +func (m *V1DashboardWorkspaceResourceAllocation) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1DashboardWorkspaceResourceAllocation) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1DashboardWorkspaceResourceAllocation) UnmarshalBinary(b []byte) error { + var res V1DashboardWorkspaceResourceAllocation + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_dashboard_workspace_spec.go b/api/models/v1_dashboard_workspace_spec.go new file mode 100644 index 00000000..3a2925c1 --- /dev/null +++ b/api/models/v1_dashboard_workspace_spec.go @@ -0,0 +1,132 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1DashboardWorkspaceSpec Workspace spec summary +// +// swagger:model v1DashboardWorkspaceSpec +type V1DashboardWorkspaceSpec struct { + + // cluster refs + // Unique: true + ClusterRefs []*V1DashboardWorkspaceClusterRef `json:"clusterRefs"` + + // namespaces + // Unique: true + Namespaces []string `json:"namespaces"` + + // quota + Quota *V1DashboardWorkspaceQuota `json:"quota,omitempty"` +} + +// Validate validates this v1 dashboard workspace spec +func (m *V1DashboardWorkspaceSpec) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateClusterRefs(formats); err != nil { + res = append(res, err) + } + + if err := m.validateNamespaces(formats); err != nil { + res = append(res, err) + } + + if err := m.validateQuota(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1DashboardWorkspaceSpec) validateClusterRefs(formats strfmt.Registry) error { + + if swag.IsZero(m.ClusterRefs) { // not required + return nil + } + + if err := validate.UniqueItems("clusterRefs", "body", m.ClusterRefs); err != nil { + return err + } + + for i := 0; i < len(m.ClusterRefs); i++ { + if swag.IsZero(m.ClusterRefs[i]) { // not required + continue + } + + if m.ClusterRefs[i] != nil { + if err := m.ClusterRefs[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("clusterRefs" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1DashboardWorkspaceSpec) validateNamespaces(formats strfmt.Registry) error { + + if swag.IsZero(m.Namespaces) { // not required + return nil + } + + if err := validate.UniqueItems("namespaces", "body", m.Namespaces); err != nil { + return err + } + + return nil +} + +func (m *V1DashboardWorkspaceSpec) validateQuota(formats strfmt.Registry) error { + + if swag.IsZero(m.Quota) { // not required + return nil + } + + if m.Quota != nil { + if err := m.Quota.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("quota") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1DashboardWorkspaceSpec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1DashboardWorkspaceSpec) UnmarshalBinary(b []byte) error { + var res V1DashboardWorkspaceSpec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_dashboard_workspace_status.go b/api/models/v1_dashboard_workspace_status.go new file mode 100644 index 00000000..6622c475 --- /dev/null +++ b/api/models/v1_dashboard_workspace_status.go @@ -0,0 +1,111 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1DashboardWorkspaceStatus Workspace status +// +// swagger:model v1DashboardWorkspaceStatus +type V1DashboardWorkspaceStatus struct { + + // namespaces + // Unique: true + Namespaces []*V1DashboardWorkspaceNamespaceAllocation `json:"namespaces"` + + // total + Total *V1DashboardWorkspaceAllocation `json:"total,omitempty"` +} + +// Validate validates this v1 dashboard workspace status +func (m *V1DashboardWorkspaceStatus) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateNamespaces(formats); err != nil { + res = append(res, err) + } + + if err := m.validateTotal(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1DashboardWorkspaceStatus) validateNamespaces(formats strfmt.Registry) error { + + if swag.IsZero(m.Namespaces) { // not required + return nil + } + + if err := validate.UniqueItems("namespaces", "body", m.Namespaces); err != nil { + return err + } + + for i := 0; i < len(m.Namespaces); i++ { + if swag.IsZero(m.Namespaces[i]) { // not required + continue + } + + if m.Namespaces[i] != nil { + if err := m.Namespaces[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("namespaces" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1DashboardWorkspaceStatus) validateTotal(formats strfmt.Registry) error { + + if swag.IsZero(m.Total) { // not required + return nil + } + + if m.Total != nil { + if err := m.Total.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("total") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1DashboardWorkspaceStatus) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1DashboardWorkspaceStatus) UnmarshalBinary(b []byte) error { + var res V1DashboardWorkspaceStatus + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_dashboard_workspaces.go b/api/models/v1_dashboard_workspaces.go new file mode 100644 index 00000000..f041ce31 --- /dev/null +++ b/api/models/v1_dashboard_workspaces.go @@ -0,0 +1,93 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1DashboardWorkspaces v1 dashboard workspaces +// +// swagger:model v1DashboardWorkspaces +type V1DashboardWorkspaces struct { + + // cpu unit + CPUUnit string `json:"cpuUnit,omitempty"` + + // items + // Required: true + // Unique: true + Items []*V1DashboardWorkspace `json:"items"` + + // memory unit + MemoryUnit string `json:"memoryUnit,omitempty"` +} + +// Validate validates this v1 dashboard workspaces +func (m *V1DashboardWorkspaces) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateItems(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1DashboardWorkspaces) validateItems(formats strfmt.Registry) error { + + if err := validate.Required("items", "body", m.Items); err != nil { + return err + } + + if err := validate.UniqueItems("items", "body", m.Items); err != nil { + return err + } + + for i := 0; i < len(m.Items); i++ { + if swag.IsZero(m.Items[i]) { // not required + continue + } + + if m.Items[i] != nil { + if err := m.Items[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("items" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1DashboardWorkspaces) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1DashboardWorkspaces) UnmarshalBinary(b []byte) error { + var res V1DashboardWorkspaces + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_data_sink_cloud_watch_config.go b/api/models/v1_data_sink_cloud_watch_config.go new file mode 100644 index 00000000..a1397369 --- /dev/null +++ b/api/models/v1_data_sink_cloud_watch_config.go @@ -0,0 +1,94 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1DataSinkCloudWatchConfig Data sink cloud watch config +// +// swagger:model v1.DataSinkCloudWatchConfig +type V1DataSinkCloudWatchConfig struct { + + // payload + Payload V1DataSinkPayloads `json:"payload,omitempty"` + + // spec + Spec *V1CloudWatchConfig `json:"spec,omitempty"` +} + +// Validate validates this v1 data sink cloud watch config +func (m *V1DataSinkCloudWatchConfig) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validatePayload(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSpec(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1DataSinkCloudWatchConfig) validatePayload(formats strfmt.Registry) error { + + if swag.IsZero(m.Payload) { // not required + return nil + } + + if err := m.Payload.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("payload") + } + return err + } + + return nil +} + +func (m *V1DataSinkCloudWatchConfig) validateSpec(formats strfmt.Registry) error { + + if swag.IsZero(m.Spec) { // not required + return nil + } + + if m.Spec != nil { + if err := m.Spec.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1DataSinkCloudWatchConfig) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1DataSinkCloudWatchConfig) UnmarshalBinary(b []byte) error { + var res V1DataSinkCloudWatchConfig + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_data_sink_config.go b/api/models/v1_data_sink_config.go new file mode 100644 index 00000000..75442d53 --- /dev/null +++ b/api/models/v1_data_sink_config.go @@ -0,0 +1,96 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1DataSinkConfig Data sink +// +// swagger:model v1DataSinkConfig +type V1DataSinkConfig struct { + + // metadata + Metadata *V1ObjectMeta `json:"metadata,omitempty"` + + // spec + Spec *V1DataSinkSpec `json:"spec,omitempty"` +} + +// Validate validates this v1 data sink config +func (m *V1DataSinkConfig) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSpec(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1DataSinkConfig) validateMetadata(formats strfmt.Registry) error { + + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } + return err + } + } + + return nil +} + +func (m *V1DataSinkConfig) validateSpec(formats strfmt.Registry) error { + + if swag.IsZero(m.Spec) { // not required + return nil + } + + if m.Spec != nil { + if err := m.Spec.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1DataSinkConfig) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1DataSinkConfig) UnmarshalBinary(b []byte) error { + var res V1DataSinkConfig + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_data_sink_payload.go b/api/models/v1_data_sink_payload.go new file mode 100644 index 00000000..b66ede53 --- /dev/null +++ b/api/models/v1_data_sink_payload.go @@ -0,0 +1,163 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "encoding/json" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1DataSinkPayload Data sink payload entity +// +// swagger:model v1.DataSinkPayload +type V1DataSinkPayload struct { + + // RefUid of the data sink payload + RefUID string `json:"refUid,omitempty"` + + // timestamp + // Format: date-time + Timestamp V1Time `json:"timestamp,omitempty"` + + // v1 data sink payload + V1DataSinkPayload map[string]interface{} `json:"-"` +} + +// UnmarshalJSON unmarshals this object with additional properties from JSON +func (m *V1DataSinkPayload) UnmarshalJSON(data []byte) error { + // stage 1, bind the properties + var stage1 struct { + + // RefUid of the data sink payload + RefUID string `json:"refUid,omitempty"` + + // timestamp + // Format: date-time + Timestamp V1Time `json:"timestamp,omitempty"` + } + if err := json.Unmarshal(data, &stage1); err != nil { + return err + } + var rcv V1DataSinkPayload + + rcv.RefUID = stage1.RefUID + rcv.Timestamp = stage1.Timestamp + *m = rcv + + // stage 2, remove properties and add to map + stage2 := make(map[string]json.RawMessage) + if err := json.Unmarshal(data, &stage2); err != nil { + return err + } + + delete(stage2, "refUid") + delete(stage2, "timestamp") + // stage 3, add additional properties values + if len(stage2) > 0 { + result := make(map[string]interface{}) + for k, v := range stage2 { + var toadd interface{} + if err := json.Unmarshal(v, &toadd); err != nil { + return err + } + result[k] = toadd + } + m.V1DataSinkPayload = result + } + + return nil +} + +// MarshalJSON marshals this object with additional properties into a JSON object +func (m V1DataSinkPayload) MarshalJSON() ([]byte, error) { + var stage1 struct { + + // RefUid of the data sink payload + RefUID string `json:"refUid,omitempty"` + + // timestamp + // Format: date-time + Timestamp V1Time `json:"timestamp,omitempty"` + } + + stage1.RefUID = m.RefUID + stage1.Timestamp = m.Timestamp + + // make JSON object for known properties + props, err := json.Marshal(stage1) + if err != nil { + return nil, err + } + + if len(m.V1DataSinkPayload) == 0 { + return props, nil + } + + // make JSON object for the additional properties + additional, err := json.Marshal(m.V1DataSinkPayload) + if err != nil { + return nil, err + } + + if len(props) < 3 { + return additional, nil + } + + // concatenate the 2 objects + props[len(props)-1] = ',' + return append(props, additional[1:]...), nil +} + +// Validate validates this v1 data sink payload +func (m *V1DataSinkPayload) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateTimestamp(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1DataSinkPayload) validateTimestamp(formats strfmt.Registry) error { + + if swag.IsZero(m.Timestamp) { // not required + return nil + } + + if err := m.Timestamp.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("timestamp") + } + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1DataSinkPayload) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1DataSinkPayload) UnmarshalBinary(b []byte) error { + var res V1DataSinkPayload + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_data_sink_payloads.go b/api/models/v1_data_sink_payloads.go new file mode 100644 index 00000000..e9f26edb --- /dev/null +++ b/api/models/v1_data_sink_payloads.go @@ -0,0 +1,50 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1DataSinkPayloads List of data sink payload entities +// +// swagger:model v1.DataSinkPayloads +type V1DataSinkPayloads []*V1DataSinkPayload + +// Validate validates this v1 data sink payloads +func (m V1DataSinkPayloads) Validate(formats strfmt.Registry) error { + var res []error + + if err := validate.UniqueItems("", "body", m); err != nil { + return err + } + + for i := 0; i < len(m); i++ { + if swag.IsZero(m[i]) { // not required + continue + } + + if m[i] != nil { + if err := m[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName(strconv.Itoa(i)) + } + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/models/v1_data_sink_spec.go b/api/models/v1_data_sink_spec.go new file mode 100644 index 00000000..f8427cc2 --- /dev/null +++ b/api/models/v1_data_sink_spec.go @@ -0,0 +1,86 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1DataSinkSpec v1 data sink spec +// +// swagger:model v1DataSinkSpec +type V1DataSinkSpec struct { + + // audit data sinks + // Unique: true + AuditDataSinks []*V1DataSinkableSpec `json:"auditDataSinks"` +} + +// Validate validates this v1 data sink spec +func (m *V1DataSinkSpec) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateAuditDataSinks(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1DataSinkSpec) validateAuditDataSinks(formats strfmt.Registry) error { + + if swag.IsZero(m.AuditDataSinks) { // not required + return nil + } + + if err := validate.UniqueItems("auditDataSinks", "body", m.AuditDataSinks); err != nil { + return err + } + + for i := 0; i < len(m.AuditDataSinks); i++ { + if swag.IsZero(m.AuditDataSinks[i]) { // not required + continue + } + + if m.AuditDataSinks[i] != nil { + if err := m.AuditDataSinks[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("auditDataSinks" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1DataSinkSpec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1DataSinkSpec) UnmarshalBinary(b []byte) error { + var res V1DataSinkSpec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_data_sinkable_spec.go b/api/models/v1_data_sinkable_spec.go new file mode 100644 index 00000000..95d9aab5 --- /dev/null +++ b/api/models/v1_data_sinkable_spec.go @@ -0,0 +1,122 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "encoding/json" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1DataSinkableSpec v1 data sinkable spec +// +// swagger:model v1DataSinkableSpec +type V1DataSinkableSpec struct { + + // cloud watch + CloudWatch *V1CloudWatch `json:"cloudWatch,omitempty"` + + // type + // Enum: [cloudwatch] + Type string `json:"type,omitempty"` +} + +// Validate validates this v1 data sinkable spec +func (m *V1DataSinkableSpec) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateCloudWatch(formats); err != nil { + res = append(res, err) + } + + if err := m.validateType(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1DataSinkableSpec) validateCloudWatch(formats strfmt.Registry) error { + + if swag.IsZero(m.CloudWatch) { // not required + return nil + } + + if m.CloudWatch != nil { + if err := m.CloudWatch.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("cloudWatch") + } + return err + } + } + + return nil +} + +var v1DataSinkableSpecTypeTypePropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["cloudwatch"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + v1DataSinkableSpecTypeTypePropEnum = append(v1DataSinkableSpecTypeTypePropEnum, v) + } +} + +const ( + + // V1DataSinkableSpecTypeCloudwatch captures enum value "cloudwatch" + V1DataSinkableSpecTypeCloudwatch string = "cloudwatch" +) + +// prop value enum +func (m *V1DataSinkableSpec) validateTypeEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, v1DataSinkableSpecTypeTypePropEnum, true); err != nil { + return err + } + return nil +} + +func (m *V1DataSinkableSpec) validateType(formats strfmt.Registry) error { + + if swag.IsZero(m.Type) { // not required + return nil + } + + // value enum + if err := m.validateTypeEnum("type", "body", m.Type); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1DataSinkableSpec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1DataSinkableSpec) UnmarshalBinary(b []byte) error { + var res V1DataSinkableSpec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_delete_meta.go b/api/models/v1_delete_meta.go new file mode 100644 index 00000000..5ed29232 --- /dev/null +++ b/api/models/v1_delete_meta.go @@ -0,0 +1,46 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1DeleteMeta Properties to send back after deletion operation +// +// swagger:model v1DeleteMeta +type V1DeleteMeta struct { + + // count + Count int64 `json:"count,omitempty"` + + // items + Items map[string]string `json:"items,omitempty"` +} + +// Validate validates this v1 delete meta +func (m *V1DeleteMeta) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1DeleteMeta) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1DeleteMeta) UnmarshalBinary(b []byte) error { + var res V1DeleteMeta + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_deleted_msg.go b/api/models/v1_deleted_msg.go new file mode 100644 index 00000000..3c32fe86 --- /dev/null +++ b/api/models/v1_deleted_msg.go @@ -0,0 +1,43 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1DeletedMsg Deleted response with message +// +// swagger:model v1DeletedMsg +type V1DeletedMsg struct { + + // msg + Msg string `json:"msg,omitempty"` +} + +// Validate validates this v1 deleted msg +func (m *V1DeletedMsg) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1DeletedMsg) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1DeletedMsg) UnmarshalBinary(b []byte) error { + var res V1DeletedMsg + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_developer_credit.go b/api/models/v1_developer_credit.go new file mode 100644 index 00000000..a94a5338 --- /dev/null +++ b/api/models/v1_developer_credit.go @@ -0,0 +1,52 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1DeveloperCredit Credits allocated for each tenant/user +// +// swagger:model v1DeveloperCredit +type V1DeveloperCredit struct { + + // cpu in cores + CPU int32 `json:"cpu"` + + // memory in GiB + MemoryGiB int32 `json:"memoryGiB"` + + // storage in GiB + StorageGiB int32 `json:"storageGiB"` + + // number of active virtual clusters + VirtualClustersLimit int32 `json:"virtualClustersLimit"` +} + +// Validate validates this v1 developer credit +func (m *V1DeveloperCredit) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1DeveloperCredit) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1DeveloperCredit) UnmarshalBinary(b []byte) error { + var res V1DeveloperCredit + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_device_spec.go b/api/models/v1_device_spec.go new file mode 100644 index 00000000..b3b7c022 --- /dev/null +++ b/api/models/v1_device_spec.go @@ -0,0 +1,272 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "encoding/json" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1DeviceSpec DeviceSpec defines the desired state of Device +// +// swagger:model v1DeviceSpec +type V1DeviceSpec struct { + + // Architecture type of the edge host + // Enum: [arm64 amd64] + ArchType *string `json:"archType,omitempty"` + + // cpu + CPU *V1CPU `json:"cpu,omitempty"` + + // disks + Disks []*V1Disk `json:"disks"` + + // gpus + Gpus []*V1GPUDeviceSpec `json:"gpus"` + + // memory + Memory *V1Memory `json:"memory,omitempty"` + + // nics + Nics []*V1Nic `json:"nics"` + + // os + Os *V1OS `json:"os,omitempty"` +} + +// Validate validates this v1 device spec +func (m *V1DeviceSpec) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateArchType(formats); err != nil { + res = append(res, err) + } + + if err := m.validateCPU(formats); err != nil { + res = append(res, err) + } + + if err := m.validateDisks(formats); err != nil { + res = append(res, err) + } + + if err := m.validateGpus(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMemory(formats); err != nil { + res = append(res, err) + } + + if err := m.validateNics(formats); err != nil { + res = append(res, err) + } + + if err := m.validateOs(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +var v1DeviceSpecTypeArchTypePropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["arm64","amd64"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + v1DeviceSpecTypeArchTypePropEnum = append(v1DeviceSpecTypeArchTypePropEnum, v) + } +} + +const ( + + // V1DeviceSpecArchTypeArm64 captures enum value "arm64" + V1DeviceSpecArchTypeArm64 string = "arm64" + + // V1DeviceSpecArchTypeAmd64 captures enum value "amd64" + V1DeviceSpecArchTypeAmd64 string = "amd64" +) + +// prop value enum +func (m *V1DeviceSpec) validateArchTypeEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, v1DeviceSpecTypeArchTypePropEnum, true); err != nil { + return err + } + return nil +} + +func (m *V1DeviceSpec) validateArchType(formats strfmt.Registry) error { + + if swag.IsZero(m.ArchType) { // not required + return nil + } + + // value enum + if err := m.validateArchTypeEnum("archType", "body", *m.ArchType); err != nil { + return err + } + + return nil +} + +func (m *V1DeviceSpec) validateCPU(formats strfmt.Registry) error { + + if swag.IsZero(m.CPU) { // not required + return nil + } + + if m.CPU != nil { + if err := m.CPU.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("cpu") + } + return err + } + } + + return nil +} + +func (m *V1DeviceSpec) validateDisks(formats strfmt.Registry) error { + + if swag.IsZero(m.Disks) { // not required + return nil + } + + for i := 0; i < len(m.Disks); i++ { + if swag.IsZero(m.Disks[i]) { // not required + continue + } + + if m.Disks[i] != nil { + if err := m.Disks[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("disks" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1DeviceSpec) validateGpus(formats strfmt.Registry) error { + + if swag.IsZero(m.Gpus) { // not required + return nil + } + + for i := 0; i < len(m.Gpus); i++ { + if swag.IsZero(m.Gpus[i]) { // not required + continue + } + + if m.Gpus[i] != nil { + if err := m.Gpus[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("gpus" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1DeviceSpec) validateMemory(formats strfmt.Registry) error { + + if swag.IsZero(m.Memory) { // not required + return nil + } + + if m.Memory != nil { + if err := m.Memory.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("memory") + } + return err + } + } + + return nil +} + +func (m *V1DeviceSpec) validateNics(formats strfmt.Registry) error { + + if swag.IsZero(m.Nics) { // not required + return nil + } + + for i := 0; i < len(m.Nics); i++ { + if swag.IsZero(m.Nics[i]) { // not required + continue + } + + if m.Nics[i] != nil { + if err := m.Nics[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("nics" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1DeviceSpec) validateOs(formats strfmt.Registry) error { + + if swag.IsZero(m.Os) { // not required + return nil + } + + if m.Os != nil { + if err := m.Os.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("os") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1DeviceSpec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1DeviceSpec) UnmarshalBinary(b []byte) error { + var res V1DeviceSpec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_disk.go b/api/models/v1_disk.go new file mode 100644 index 00000000..a08f7266 --- /dev/null +++ b/api/models/v1_disk.go @@ -0,0 +1,89 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1Disk v1 disk +// +// swagger:model v1Disk +type V1Disk struct { + + // controller + Controller string `json:"controller,omitempty"` + + // partitions + Partitions []*V1Partition `json:"partitions"` + + // Size in GB + Size int32 `json:"size,omitempty"` + + // vendor + Vendor string `json:"vendor,omitempty"` +} + +// Validate validates this v1 disk +func (m *V1Disk) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validatePartitions(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1Disk) validatePartitions(formats strfmt.Registry) error { + + if swag.IsZero(m.Partitions) { // not required + return nil + } + + for i := 0; i < len(m.Partitions); i++ { + if swag.IsZero(m.Partitions[i]) { // not required + continue + } + + if m.Partitions[i] != nil { + if err := m.Partitions[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("partitions" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1Disk) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1Disk) UnmarshalBinary(b []byte) error { + var res V1Disk + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_ecr_registry.go b/api/models/v1_ecr_registry.go new file mode 100644 index 00000000..7d7cd3d0 --- /dev/null +++ b/api/models/v1_ecr_registry.go @@ -0,0 +1,99 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1EcrRegistry Ecr registry information +// +// swagger:model v1EcrRegistry +type V1EcrRegistry struct { + + // kind + Kind string `json:"kind,omitempty"` + + // metadata + Metadata *V1ObjectMeta `json:"metadata,omitempty"` + + // spec + Spec *V1EcrRegistrySpec `json:"spec,omitempty"` +} + +// Validate validates this v1 ecr registry +func (m *V1EcrRegistry) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSpec(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1EcrRegistry) validateMetadata(formats strfmt.Registry) error { + + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } + return err + } + } + + return nil +} + +func (m *V1EcrRegistry) validateSpec(formats strfmt.Registry) error { + + if swag.IsZero(m.Spec) { // not required + return nil + } + + if m.Spec != nil { + if err := m.Spec.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1EcrRegistry) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1EcrRegistry) UnmarshalBinary(b []byte) error { + var res V1EcrRegistry + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_ecr_registry_spec.go b/api/models/v1_ecr_registry_spec.go new file mode 100644 index 00000000..da8ea925 --- /dev/null +++ b/api/models/v1_ecr_registry_spec.go @@ -0,0 +1,196 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "encoding/json" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1EcrRegistrySpec Ecr registry spec +// +// swagger:model v1EcrRegistrySpec +type V1EcrRegistrySpec struct { + + // OCI ecr registry content base path + BaseContentPath string `json:"baseContentPath,omitempty"` + + // credentials + Credentials *V1AwsCloudAccount `json:"credentials,omitempty"` + + // default region + DefaultRegion string `json:"defaultRegion,omitempty"` + + // endpoint + // Required: true + Endpoint *string `json:"endpoint"` + + // is private + // Required: true + IsPrivate *bool `json:"isPrivate"` + + // provider type + // Enum: [helm pack] + ProviderType *string `json:"providerType,omitempty"` + + // Ecr registry uid + RegistryUID string `json:"registryUid,omitempty"` + + // scope + Scope string `json:"scope,omitempty"` + + // tls + TLS *V1TLSConfiguration `json:"tls,omitempty"` +} + +// Validate validates this v1 ecr registry spec +func (m *V1EcrRegistrySpec) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateCredentials(formats); err != nil { + res = append(res, err) + } + + if err := m.validateEndpoint(formats); err != nil { + res = append(res, err) + } + + if err := m.validateIsPrivate(formats); err != nil { + res = append(res, err) + } + + if err := m.validateProviderType(formats); err != nil { + res = append(res, err) + } + + if err := m.validateTLS(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1EcrRegistrySpec) validateCredentials(formats strfmt.Registry) error { + + if swag.IsZero(m.Credentials) { // not required + return nil + } + + if m.Credentials != nil { + if err := m.Credentials.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("credentials") + } + return err + } + } + + return nil +} + +func (m *V1EcrRegistrySpec) validateEndpoint(formats strfmt.Registry) error { + + if err := validate.Required("endpoint", "body", m.Endpoint); err != nil { + return err + } + + return nil +} + +func (m *V1EcrRegistrySpec) validateIsPrivate(formats strfmt.Registry) error { + + if err := validate.Required("isPrivate", "body", m.IsPrivate); err != nil { + return err + } + + return nil +} + +var v1EcrRegistrySpecTypeProviderTypePropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["helm","pack"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + v1EcrRegistrySpecTypeProviderTypePropEnum = append(v1EcrRegistrySpecTypeProviderTypePropEnum, v) + } +} + +const ( + + // V1EcrRegistrySpecProviderTypeHelm captures enum value "helm" + V1EcrRegistrySpecProviderTypeHelm string = "helm" + + // V1EcrRegistrySpecProviderTypePack captures enum value "pack" + V1EcrRegistrySpecProviderTypePack string = "pack" +) + +// prop value enum +func (m *V1EcrRegistrySpec) validateProviderTypeEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, v1EcrRegistrySpecTypeProviderTypePropEnum, true); err != nil { + return err + } + return nil +} + +func (m *V1EcrRegistrySpec) validateProviderType(formats strfmt.Registry) error { + + if swag.IsZero(m.ProviderType) { // not required + return nil + } + + // value enum + if err := m.validateProviderTypeEnum("providerType", "body", *m.ProviderType); err != nil { + return err + } + + return nil +} + +func (m *V1EcrRegistrySpec) validateTLS(formats strfmt.Registry) error { + + if swag.IsZero(m.TLS) { // not required + return nil + } + + if m.TLS != nil { + if err := m.TLS.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("tls") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1EcrRegistrySpec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1EcrRegistrySpec) UnmarshalBinary(b []byte) error { + var res V1EcrRegistrySpec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_edge_cloud_cluster_config_entity.go b/api/models/v1_edge_cloud_cluster_config_entity.go new file mode 100644 index 00000000..f4ed2f20 --- /dev/null +++ b/api/models/v1_edge_cloud_cluster_config_entity.go @@ -0,0 +1,71 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1EdgeCloudClusterConfigEntity Edge cloud cluster config entity +// +// swagger:model v1EdgeCloudClusterConfigEntity +type V1EdgeCloudClusterConfigEntity struct { + + // cluster config + ClusterConfig *V1EdgeClusterConfig `json:"clusterConfig,omitempty"` +} + +// Validate validates this v1 edge cloud cluster config entity +func (m *V1EdgeCloudClusterConfigEntity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateClusterConfig(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1EdgeCloudClusterConfigEntity) validateClusterConfig(formats strfmt.Registry) error { + + if swag.IsZero(m.ClusterConfig) { // not required + return nil + } + + if m.ClusterConfig != nil { + if err := m.ClusterConfig.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("clusterConfig") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1EdgeCloudClusterConfigEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1EdgeCloudClusterConfigEntity) UnmarshalBinary(b []byte) error { + var res V1EdgeCloudClusterConfigEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_edge_cloud_config.go b/api/models/v1_edge_cloud_config.go new file mode 100644 index 00000000..57d64b05 --- /dev/null +++ b/api/models/v1_edge_cloud_config.go @@ -0,0 +1,127 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1EdgeCloudConfig EdgeCloudConfig is the Schema for the Edgecloudconfigs API +// +// swagger:model v1EdgeCloudConfig +type V1EdgeCloudConfig struct { + + // APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + APIVersion string `json:"apiVersion,omitempty"` + + // Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + Kind string `json:"kind,omitempty"` + + // metadata + Metadata *V1ObjectMeta `json:"metadata,omitempty"` + + // spec + Spec *V1EdgeCloudConfigSpec `json:"spec,omitempty"` + + // status + Status *V1EdgeCloudConfigStatus `json:"status,omitempty"` +} + +// Validate validates this v1 edge cloud config +func (m *V1EdgeCloudConfig) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSpec(formats); err != nil { + res = append(res, err) + } + + if err := m.validateStatus(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1EdgeCloudConfig) validateMetadata(formats strfmt.Registry) error { + + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } + return err + } + } + + return nil +} + +func (m *V1EdgeCloudConfig) validateSpec(formats strfmt.Registry) error { + + if swag.IsZero(m.Spec) { // not required + return nil + } + + if m.Spec != nil { + if err := m.Spec.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec") + } + return err + } + } + + return nil +} + +func (m *V1EdgeCloudConfig) validateStatus(formats strfmt.Registry) error { + + if swag.IsZero(m.Status) { // not required + return nil + } + + if m.Status != nil { + if err := m.Status.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("status") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1EdgeCloudConfig) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1EdgeCloudConfig) UnmarshalBinary(b []byte) error { + var res V1EdgeCloudConfig + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_edge_cloud_config_spec.go b/api/models/v1_edge_cloud_config_spec.go new file mode 100644 index 00000000..7585d96e --- /dev/null +++ b/api/models/v1_edge_cloud_config_spec.go @@ -0,0 +1,108 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1EdgeCloudConfigSpec EdgeCloudConfigSpec defines the desired state of EdgeCloudConfig +// +// swagger:model v1EdgeCloudConfigSpec +type V1EdgeCloudConfigSpec struct { + + // cluster config + // Required: true + ClusterConfig *V1EdgeClusterConfig `json:"clusterConfig"` + + // machine pool config + // Required: true + MachinePoolConfig []*V1EdgeMachinePoolConfig `json:"machinePoolConfig"` +} + +// Validate validates this v1 edge cloud config spec +func (m *V1EdgeCloudConfigSpec) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateClusterConfig(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMachinePoolConfig(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1EdgeCloudConfigSpec) validateClusterConfig(formats strfmt.Registry) error { + + if err := validate.Required("clusterConfig", "body", m.ClusterConfig); err != nil { + return err + } + + if m.ClusterConfig != nil { + if err := m.ClusterConfig.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("clusterConfig") + } + return err + } + } + + return nil +} + +func (m *V1EdgeCloudConfigSpec) validateMachinePoolConfig(formats strfmt.Registry) error { + + if err := validate.Required("machinePoolConfig", "body", m.MachinePoolConfig); err != nil { + return err + } + + for i := 0; i < len(m.MachinePoolConfig); i++ { + if swag.IsZero(m.MachinePoolConfig[i]) { // not required + continue + } + + if m.MachinePoolConfig[i] != nil { + if err := m.MachinePoolConfig[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("machinePoolConfig" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1EdgeCloudConfigSpec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1EdgeCloudConfigSpec) UnmarshalBinary(b []byte) error { + var res V1EdgeCloudConfigSpec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_edge_cloud_config_status.go b/api/models/v1_edge_cloud_config_status.go new file mode 100644 index 00000000..6bde1531 --- /dev/null +++ b/api/models/v1_edge_cloud_config_status.go @@ -0,0 +1,89 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1EdgeCloudConfigStatus v1 edge cloud config status +// +// swagger:model v1EdgeCloudConfigStatus +type V1EdgeCloudConfigStatus struct { + + // conditions + Conditions []*V1ClusterCondition `json:"conditions"` + + // node image + NodeImage string `json:"nodeImage,omitempty"` + + // SourceImageId can be from packref's annotations or from pack.json + SourceImageID string `json:"sourceImageId,omitempty"` + + // PackerVariableDigest string `json:"packerDigest,omitempty"` If no ansible roles found in Packs then Mold should tell Drive to use capi image and not create custom image, because there is nothing to add + UseCapiImage bool `json:"useCapiImage,omitempty"` +} + +// Validate validates this v1 edge cloud config status +func (m *V1EdgeCloudConfigStatus) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateConditions(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1EdgeCloudConfigStatus) validateConditions(formats strfmt.Registry) error { + + if swag.IsZero(m.Conditions) { // not required + return nil + } + + for i := 0; i < len(m.Conditions); i++ { + if swag.IsZero(m.Conditions[i]) { // not required + continue + } + + if m.Conditions[i] != nil { + if err := m.Conditions[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("conditions" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1EdgeCloudConfigStatus) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1EdgeCloudConfigStatus) UnmarshalBinary(b []byte) error { + var res V1EdgeCloudConfigStatus + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_edge_cluster_config.go b/api/models/v1_edge_cluster_config.go new file mode 100644 index 00000000..d71de004 --- /dev/null +++ b/api/models/v1_edge_cluster_config.go @@ -0,0 +1,43 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1EdgeClusterConfig EdgeClusterConfig defines Edge Cluster specific Spec +// +// swagger:model v1EdgeClusterConfig +type V1EdgeClusterConfig struct { + + // SSHKeys specifies a list of ssh authorized keys to access the vms as a 'spectro' user + SSHKeys []string `json:"sshKeys"` +} + +// Validate validates this v1 edge cluster config +func (m *V1EdgeClusterConfig) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1EdgeClusterConfig) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1EdgeClusterConfig) UnmarshalBinary(b []byte) error { + var res V1EdgeClusterConfig + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_edge_host.go b/api/models/v1_edge_host.go new file mode 100644 index 00000000..516101a1 --- /dev/null +++ b/api/models/v1_edge_host.go @@ -0,0 +1,164 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1EdgeHost EdgeHost is the underlying appliance +// +// swagger:model v1EdgeHost +type V1EdgeHost struct { + + // Set to true if auto register is disabled for the device + DisableAutoRegister bool `json:"disableAutoRegister"` + + // HostAddress is a FQDN or IP address of the Host + // Required: true + HostAddress *string `json:"hostAddress"` + + // HostAuthToken to authorize auto registration + HostAuthToken string `json:"hostAuthToken"` + + // HostChecksum is the checksum provided by the edge host, to be persisted in SaaS + HostChecksum string `json:"hostChecksum"` + + // HostIdentity is the identity to access the edge host + HostIdentity *V1EdgeHostIdentity `json:"hostIdentity,omitempty"` + + // HostPairingKey is the one-time pairing key to pair the edge host with the device registered in SaaS + // Format: password + HostPairingKey strfmt.Password `json:"hostPairingKey"` + + // HostUid is the ID of the EdgeHost + // Required: true + HostUID *string `json:"hostUid"` + + // Mac address of edgehost + MacAddress string `json:"macAddress"` + + // ProjectUid where the edgehost will be placed during auto registration + Project *V1ObjectEntity `json:"project,omitempty"` +} + +// Validate validates this v1 edge host +func (m *V1EdgeHost) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateHostAddress(formats); err != nil { + res = append(res, err) + } + + if err := m.validateHostIdentity(formats); err != nil { + res = append(res, err) + } + + if err := m.validateHostPairingKey(formats); err != nil { + res = append(res, err) + } + + if err := m.validateHostUID(formats); err != nil { + res = append(res, err) + } + + if err := m.validateProject(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1EdgeHost) validateHostAddress(formats strfmt.Registry) error { + + if err := validate.Required("hostAddress", "body", m.HostAddress); err != nil { + return err + } + + return nil +} + +func (m *V1EdgeHost) validateHostIdentity(formats strfmt.Registry) error { + + if swag.IsZero(m.HostIdentity) { // not required + return nil + } + + if m.HostIdentity != nil { + if err := m.HostIdentity.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("hostIdentity") + } + return err + } + } + + return nil +} + +func (m *V1EdgeHost) validateHostPairingKey(formats strfmt.Registry) error { + + if swag.IsZero(m.HostPairingKey) { // not required + return nil + } + + if err := validate.FormatOf("hostPairingKey", "body", "password", m.HostPairingKey.String(), formats); err != nil { + return err + } + + return nil +} + +func (m *V1EdgeHost) validateHostUID(formats strfmt.Registry) error { + + if err := validate.Required("hostUid", "body", m.HostUID); err != nil { + return err + } + + return nil +} + +func (m *V1EdgeHost) validateProject(formats strfmt.Registry) error { + + if swag.IsZero(m.Project) { // not required + return nil + } + + if m.Project != nil { + if err := m.Project.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("project") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1EdgeHost) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1EdgeHost) UnmarshalBinary(b []byte) error { + var res V1EdgeHost + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_edge_host_cloud_properties.go b/api/models/v1_edge_host_cloud_properties.go new file mode 100644 index 00000000..bb36c248 --- /dev/null +++ b/api/models/v1_edge_host_cloud_properties.go @@ -0,0 +1,71 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1EdgeHostCloudProperties Additional cloud properties of the edge host (applicable based on the cloud type) +// +// swagger:model v1EdgeHostCloudProperties +type V1EdgeHostCloudProperties struct { + + // vsphere + Vsphere *V1EdgeHostVsphereCloudProperties `json:"vsphere,omitempty"` +} + +// Validate validates this v1 edge host cloud properties +func (m *V1EdgeHostCloudProperties) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateVsphere(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1EdgeHostCloudProperties) validateVsphere(formats strfmt.Registry) error { + + if swag.IsZero(m.Vsphere) { // not required + return nil + } + + if m.Vsphere != nil { + if err := m.Vsphere.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("vsphere") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1EdgeHostCloudProperties) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1EdgeHostCloudProperties) UnmarshalBinary(b []byte) error { + var res V1EdgeHostCloudProperties + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_edge_host_cluster_entity.go b/api/models/v1_edge_host_cluster_entity.go new file mode 100644 index 00000000..562baf38 --- /dev/null +++ b/api/models/v1_edge_host_cluster_entity.go @@ -0,0 +1,43 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1EdgeHostClusterEntity v1 edge host cluster entity +// +// swagger:model v1EdgeHostClusterEntity +type V1EdgeHostClusterEntity struct { + + // cluster Uid + ClusterUID string `json:"clusterUid,omitempty"` +} + +// Validate validates this v1 edge host cluster entity +func (m *V1EdgeHostClusterEntity) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1EdgeHostClusterEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1EdgeHostClusterEntity) UnmarshalBinary(b []byte) error { + var res V1EdgeHostClusterEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_edge_host_device.go b/api/models/v1_edge_host_device.go new file mode 100644 index 00000000..0adae4a0 --- /dev/null +++ b/api/models/v1_edge_host_device.go @@ -0,0 +1,146 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1EdgeHostDevice v1 edge host device +// +// swagger:model v1EdgeHostDevice +type V1EdgeHostDevice struct { + + // aclmeta + Aclmeta *V1ACLMeta `json:"aclmeta,omitempty"` + + // metadata + Metadata *V1ObjectMeta `json:"metadata,omitempty"` + + // spec + Spec *V1EdgeHostDeviceSpec `json:"spec,omitempty"` + + // status + Status *V1EdgeHostDeviceStatus `json:"status,omitempty"` +} + +// Validate validates this v1 edge host device +func (m *V1EdgeHostDevice) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateAclmeta(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSpec(formats); err != nil { + res = append(res, err) + } + + if err := m.validateStatus(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1EdgeHostDevice) validateAclmeta(formats strfmt.Registry) error { + + if swag.IsZero(m.Aclmeta) { // not required + return nil + } + + if m.Aclmeta != nil { + if err := m.Aclmeta.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("aclmeta") + } + return err + } + } + + return nil +} + +func (m *V1EdgeHostDevice) validateMetadata(formats strfmt.Registry) error { + + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } + return err + } + } + + return nil +} + +func (m *V1EdgeHostDevice) validateSpec(formats strfmt.Registry) error { + + if swag.IsZero(m.Spec) { // not required + return nil + } + + if m.Spec != nil { + if err := m.Spec.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec") + } + return err + } + } + + return nil +} + +func (m *V1EdgeHostDevice) validateStatus(formats strfmt.Registry) error { + + if swag.IsZero(m.Status) { // not required + return nil + } + + if m.Status != nil { + if err := m.Status.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("status") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1EdgeHostDevice) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1EdgeHostDevice) UnmarshalBinary(b []byte) error { + var res V1EdgeHostDevice + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_edge_host_device_entity.go b/api/models/v1_edge_host_device_entity.go new file mode 100644 index 00000000..ef277943 --- /dev/null +++ b/api/models/v1_edge_host_device_entity.go @@ -0,0 +1,96 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1EdgeHostDeviceEntity Edge host device information +// +// swagger:model v1EdgeHostDeviceEntity +type V1EdgeHostDeviceEntity struct { + + // metadata + Metadata *V1ObjectTagsEntity `json:"metadata,omitempty"` + + // spec + Spec *V1EdgeHostDeviceSpecEntity `json:"spec,omitempty"` +} + +// Validate validates this v1 edge host device entity +func (m *V1EdgeHostDeviceEntity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSpec(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1EdgeHostDeviceEntity) validateMetadata(formats strfmt.Registry) error { + + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } + return err + } + } + + return nil +} + +func (m *V1EdgeHostDeviceEntity) validateSpec(formats strfmt.Registry) error { + + if swag.IsZero(m.Spec) { // not required + return nil + } + + if m.Spec != nil { + if err := m.Spec.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1EdgeHostDeviceEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1EdgeHostDeviceEntity) UnmarshalBinary(b []byte) error { + var res V1EdgeHostDeviceEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_edge_host_device_host_check_sum.go b/api/models/v1_edge_host_device_host_check_sum.go new file mode 100644 index 00000000..58d384a3 --- /dev/null +++ b/api/models/v1_edge_host_device_host_check_sum.go @@ -0,0 +1,43 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1EdgeHostDeviceHostCheckSum v1 edge host device host check sum +// +// swagger:model v1EdgeHostDeviceHostCheckSum +type V1EdgeHostDeviceHostCheckSum struct { + + // host check sum + HostCheckSum string `json:"hostCheckSum,omitempty"` +} + +// Validate validates this v1 edge host device host check sum +func (m *V1EdgeHostDeviceHostCheckSum) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1EdgeHostDeviceHostCheckSum) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1EdgeHostDeviceHostCheckSum) UnmarshalBinary(b []byte) error { + var res V1EdgeHostDeviceHostCheckSum + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_edge_host_device_host_pairing_key.go b/api/models/v1_edge_host_device_host_pairing_key.go new file mode 100644 index 00000000..cae82843 --- /dev/null +++ b/api/models/v1_edge_host_device_host_pairing_key.go @@ -0,0 +1,68 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1EdgeHostDeviceHostPairingKey v1 edge host device host pairing key +// +// swagger:model v1EdgeHostDeviceHostPairingKey +type V1EdgeHostDeviceHostPairingKey struct { + + // host pairing key + // Format: password + HostPairingKey strfmt.Password `json:"hostPairingKey,omitempty"` +} + +// Validate validates this v1 edge host device host pairing key +func (m *V1EdgeHostDeviceHostPairingKey) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateHostPairingKey(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1EdgeHostDeviceHostPairingKey) validateHostPairingKey(formats strfmt.Registry) error { + + if swag.IsZero(m.HostPairingKey) { // not required + return nil + } + + if err := validate.FormatOf("hostPairingKey", "body", "password", m.HostPairingKey.String(), formats); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1EdgeHostDeviceHostPairingKey) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1EdgeHostDeviceHostPairingKey) UnmarshalBinary(b []byte) error { + var res V1EdgeHostDeviceHostPairingKey + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_edge_host_device_meta_update_entity.go b/api/models/v1_edge_host_device_meta_update_entity.go new file mode 100644 index 00000000..ff2a0b2d --- /dev/null +++ b/api/models/v1_edge_host_device_meta_update_entity.go @@ -0,0 +1,71 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1EdgeHostDeviceMetaUpdateEntity Edge host device uid and name +// +// swagger:model v1EdgeHostDeviceMetaUpdateEntity +type V1EdgeHostDeviceMetaUpdateEntity struct { + + // metadata + Metadata *V1ObjectTagsEntity `json:"metadata,omitempty"` +} + +// Validate validates this v1 edge host device meta update entity +func (m *V1EdgeHostDeviceMetaUpdateEntity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1EdgeHostDeviceMetaUpdateEntity) validateMetadata(formats strfmt.Registry) error { + + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1EdgeHostDeviceMetaUpdateEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1EdgeHostDeviceMetaUpdateEntity) UnmarshalBinary(b []byte) error { + var res V1EdgeHostDeviceMetaUpdateEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_edge_host_device_spec.go b/api/models/v1_edge_host_device_spec.go new file mode 100644 index 00000000..631aaa05 --- /dev/null +++ b/api/models/v1_edge_host_device_spec.go @@ -0,0 +1,264 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "encoding/json" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1EdgeHostDeviceSpec EdgeHostDeviceSpec defines the desired state of EdgeHostDevice +// +// swagger:model v1EdgeHostDeviceSpec +type V1EdgeHostDeviceSpec struct { + + // cloud properties + CloudProperties *V1EdgeHostCloudProperties `json:"cloudProperties,omitempty"` + + // cluster profile templates + ClusterProfileTemplates []*V1ClusterProfileTemplate `json:"clusterProfileTemplates"` + + // device + Device *V1DeviceSpec `json:"device,omitempty"` + + // host + Host *V1EdgeHost `json:"host,omitempty"` + + // properties + Properties *V1EdgeHostProperties `json:"properties,omitempty"` + + // service + Service *V1ServiceSpec `json:"service,omitempty"` + + // Deprecated. Cloudtype of the provisioned edge host + // Enum: [libvirt vsphere edge-native] + Type string `json:"type,omitempty"` + + // version + Version string `json:"version,omitempty"` +} + +// Validate validates this v1 edge host device spec +func (m *V1EdgeHostDeviceSpec) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateCloudProperties(formats); err != nil { + res = append(res, err) + } + + if err := m.validateClusterProfileTemplates(formats); err != nil { + res = append(res, err) + } + + if err := m.validateDevice(formats); err != nil { + res = append(res, err) + } + + if err := m.validateHost(formats); err != nil { + res = append(res, err) + } + + if err := m.validateProperties(formats); err != nil { + res = append(res, err) + } + + if err := m.validateService(formats); err != nil { + res = append(res, err) + } + + if err := m.validateType(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1EdgeHostDeviceSpec) validateCloudProperties(formats strfmt.Registry) error { + + if swag.IsZero(m.CloudProperties) { // not required + return nil + } + + if m.CloudProperties != nil { + if err := m.CloudProperties.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("cloudProperties") + } + return err + } + } + + return nil +} + +func (m *V1EdgeHostDeviceSpec) validateClusterProfileTemplates(formats strfmt.Registry) error { + + if swag.IsZero(m.ClusterProfileTemplates) { // not required + return nil + } + + for i := 0; i < len(m.ClusterProfileTemplates); i++ { + if swag.IsZero(m.ClusterProfileTemplates[i]) { // not required + continue + } + + if m.ClusterProfileTemplates[i] != nil { + if err := m.ClusterProfileTemplates[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("clusterProfileTemplates" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1EdgeHostDeviceSpec) validateDevice(formats strfmt.Registry) error { + + if swag.IsZero(m.Device) { // not required + return nil + } + + if m.Device != nil { + if err := m.Device.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("device") + } + return err + } + } + + return nil +} + +func (m *V1EdgeHostDeviceSpec) validateHost(formats strfmt.Registry) error { + + if swag.IsZero(m.Host) { // not required + return nil + } + + if m.Host != nil { + if err := m.Host.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("host") + } + return err + } + } + + return nil +} + +func (m *V1EdgeHostDeviceSpec) validateProperties(formats strfmt.Registry) error { + + if swag.IsZero(m.Properties) { // not required + return nil + } + + if m.Properties != nil { + if err := m.Properties.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("properties") + } + return err + } + } + + return nil +} + +func (m *V1EdgeHostDeviceSpec) validateService(formats strfmt.Registry) error { + + if swag.IsZero(m.Service) { // not required + return nil + } + + if m.Service != nil { + if err := m.Service.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("service") + } + return err + } + } + + return nil +} + +var v1EdgeHostDeviceSpecTypeTypePropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["libvirt","vsphere","edge-native"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + v1EdgeHostDeviceSpecTypeTypePropEnum = append(v1EdgeHostDeviceSpecTypeTypePropEnum, v) + } +} + +const ( + + // V1EdgeHostDeviceSpecTypeLibvirt captures enum value "libvirt" + V1EdgeHostDeviceSpecTypeLibvirt string = "libvirt" + + // V1EdgeHostDeviceSpecTypeVsphere captures enum value "vsphere" + V1EdgeHostDeviceSpecTypeVsphere string = "vsphere" + + // V1EdgeHostDeviceSpecTypeEdgeNative captures enum value "edge-native" + V1EdgeHostDeviceSpecTypeEdgeNative string = "edge-native" +) + +// prop value enum +func (m *V1EdgeHostDeviceSpec) validateTypeEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, v1EdgeHostDeviceSpecTypeTypePropEnum, true); err != nil { + return err + } + return nil +} + +func (m *V1EdgeHostDeviceSpec) validateType(formats strfmt.Registry) error { + + if swag.IsZero(m.Type) { // not required + return nil + } + + // value enum + if err := m.validateTypeEnum("type", "body", m.Type); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1EdgeHostDeviceSpec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1EdgeHostDeviceSpec) UnmarshalBinary(b []byte) error { + var res V1EdgeHostDeviceSpec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_edge_host_device_spec_entity.go b/api/models/v1_edge_host_device_spec_entity.go new file mode 100644 index 00000000..79c346d5 --- /dev/null +++ b/api/models/v1_edge_host_device_spec_entity.go @@ -0,0 +1,91 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1EdgeHostDeviceSpecEntity Edge host device spec +// +// swagger:model v1EdgeHostDeviceSpecEntity +type V1EdgeHostDeviceSpecEntity struct { + + // arch type + ArchType V1ArchType `json:"archType,omitempty"` + + // host pairing key + // Format: password + HostPairingKey strfmt.Password `json:"hostPairingKey,omitempty"` +} + +// Validate validates this v1 edge host device spec entity +func (m *V1EdgeHostDeviceSpecEntity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateArchType(formats); err != nil { + res = append(res, err) + } + + if err := m.validateHostPairingKey(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1EdgeHostDeviceSpecEntity) validateArchType(formats strfmt.Registry) error { + + if swag.IsZero(m.ArchType) { // not required + return nil + } + + if err := m.ArchType.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("archType") + } + return err + } + + return nil +} + +func (m *V1EdgeHostDeviceSpecEntity) validateHostPairingKey(formats strfmt.Registry) error { + + if swag.IsZero(m.HostPairingKey) { // not required + return nil + } + + if err := validate.FormatOf("hostPairingKey", "body", "password", m.HostPairingKey.String(), formats); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1EdgeHostDeviceSpecEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1EdgeHostDeviceSpecEntity) UnmarshalBinary(b []byte) error { + var res V1EdgeHostDeviceSpecEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_edge_host_device_status.go b/api/models/v1_edge_host_device_status.go new file mode 100644 index 00000000..8ad86606 --- /dev/null +++ b/api/models/v1_edge_host_device_status.go @@ -0,0 +1,221 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "encoding/json" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1EdgeHostDeviceStatus EdgeHostDeviceStatus defines the observed state of EdgeHostDevice +// +// swagger:model v1EdgeHostDeviceStatus +type V1EdgeHostDeviceStatus struct { + + // health + Health *V1EdgeHostHealth `json:"health,omitempty"` + + // in use clusters + InUseClusters []*V1ObjectEntity `json:"inUseClusters"` + + // packs + Packs []*V1ClusterPackStatus `json:"packs"` + + // profile status + ProfileStatus *V1ProfileStatus `json:"profileStatus,omitempty"` + + // service auth token + ServiceAuthToken string `json:"serviceAuthToken,omitempty"` + + // state + // Enum: [ready unpaired in-use] + State string `json:"state,omitempty"` +} + +// Validate validates this v1 edge host device status +func (m *V1EdgeHostDeviceStatus) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateHealth(formats); err != nil { + res = append(res, err) + } + + if err := m.validateInUseClusters(formats); err != nil { + res = append(res, err) + } + + if err := m.validatePacks(formats); err != nil { + res = append(res, err) + } + + if err := m.validateProfileStatus(formats); err != nil { + res = append(res, err) + } + + if err := m.validateState(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1EdgeHostDeviceStatus) validateHealth(formats strfmt.Registry) error { + + if swag.IsZero(m.Health) { // not required + return nil + } + + if m.Health != nil { + if err := m.Health.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("health") + } + return err + } + } + + return nil +} + +func (m *V1EdgeHostDeviceStatus) validateInUseClusters(formats strfmt.Registry) error { + + if swag.IsZero(m.InUseClusters) { // not required + return nil + } + + for i := 0; i < len(m.InUseClusters); i++ { + if swag.IsZero(m.InUseClusters[i]) { // not required + continue + } + + if m.InUseClusters[i] != nil { + if err := m.InUseClusters[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("inUseClusters" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1EdgeHostDeviceStatus) validatePacks(formats strfmt.Registry) error { + + if swag.IsZero(m.Packs) { // not required + return nil + } + + for i := 0; i < len(m.Packs); i++ { + if swag.IsZero(m.Packs[i]) { // not required + continue + } + + if m.Packs[i] != nil { + if err := m.Packs[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("packs" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1EdgeHostDeviceStatus) validateProfileStatus(formats strfmt.Registry) error { + + if swag.IsZero(m.ProfileStatus) { // not required + return nil + } + + if m.ProfileStatus != nil { + if err := m.ProfileStatus.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("profileStatus") + } + return err + } + } + + return nil +} + +var v1EdgeHostDeviceStatusTypeStatePropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["ready","unpaired","in-use"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + v1EdgeHostDeviceStatusTypeStatePropEnum = append(v1EdgeHostDeviceStatusTypeStatePropEnum, v) + } +} + +const ( + + // V1EdgeHostDeviceStatusStateReady captures enum value "ready" + V1EdgeHostDeviceStatusStateReady string = "ready" + + // V1EdgeHostDeviceStatusStateUnpaired captures enum value "unpaired" + V1EdgeHostDeviceStatusStateUnpaired string = "unpaired" + + // V1EdgeHostDeviceStatusStateInUse captures enum value "in-use" + V1EdgeHostDeviceStatusStateInUse string = "in-use" +) + +// prop value enum +func (m *V1EdgeHostDeviceStatus) validateStateEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, v1EdgeHostDeviceStatusTypeStatePropEnum, true); err != nil { + return err + } + return nil +} + +func (m *V1EdgeHostDeviceStatus) validateState(formats strfmt.Registry) error { + + if swag.IsZero(m.State) { // not required + return nil + } + + // value enum + if err := m.validateStateEnum("state", "body", m.State); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1EdgeHostDeviceStatus) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1EdgeHostDeviceStatus) UnmarshalBinary(b []byte) error { + var res V1EdgeHostDeviceStatus + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_edge_host_devices.go b/api/models/v1_edge_host_devices.go new file mode 100644 index 00000000..3b3617f2 --- /dev/null +++ b/api/models/v1_edge_host_devices.go @@ -0,0 +1,112 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1EdgeHostDevices v1 edge host devices +// +// swagger:model v1EdgeHostDevices +type V1EdgeHostDevices struct { + + // items + // Required: true + // Unique: true + Items []*V1EdgeHostDevice `json:"items"` + + // listmeta + Listmeta *V1ListMetaData `json:"listmeta,omitempty"` +} + +// Validate validates this v1 edge host devices +func (m *V1EdgeHostDevices) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateItems(formats); err != nil { + res = append(res, err) + } + + if err := m.validateListmeta(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1EdgeHostDevices) validateItems(formats strfmt.Registry) error { + + if err := validate.Required("items", "body", m.Items); err != nil { + return err + } + + if err := validate.UniqueItems("items", "body", m.Items); err != nil { + return err + } + + for i := 0; i < len(m.Items); i++ { + if swag.IsZero(m.Items[i]) { // not required + continue + } + + if m.Items[i] != nil { + if err := m.Items[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("items" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1EdgeHostDevices) validateListmeta(formats strfmt.Registry) error { + + if swag.IsZero(m.Listmeta) { // not required + return nil + } + + if m.Listmeta != nil { + if err := m.Listmeta.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("listmeta") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1EdgeHostDevices) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1EdgeHostDevices) UnmarshalBinary(b []byte) error { + var res V1EdgeHostDevices + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_edge_host_health.go b/api/models/v1_edge_host_health.go new file mode 100644 index 00000000..d7b849cc --- /dev/null +++ b/api/models/v1_edge_host_health.go @@ -0,0 +1,106 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "encoding/json" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1EdgeHostHealth EdgeHostHealth defines the desired health state of EdgeHostDevice +// +// swagger:model v1EdgeHostHealth +type V1EdgeHostHealth struct { + + // agent version + AgentVersion string `json:"agentVersion,omitempty"` + + // message + Message string `json:"message,omitempty"` + + // state + // Enum: [healthy unhealthy] + State string `json:"state,omitempty"` +} + +// Validate validates this v1 edge host health +func (m *V1EdgeHostHealth) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateState(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +var v1EdgeHostHealthTypeStatePropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["healthy","unhealthy"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + v1EdgeHostHealthTypeStatePropEnum = append(v1EdgeHostHealthTypeStatePropEnum, v) + } +} + +const ( + + // V1EdgeHostHealthStateHealthy captures enum value "healthy" + V1EdgeHostHealthStateHealthy string = "healthy" + + // V1EdgeHostHealthStateUnhealthy captures enum value "unhealthy" + V1EdgeHostHealthStateUnhealthy string = "unhealthy" +) + +// prop value enum +func (m *V1EdgeHostHealth) validateStateEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, v1EdgeHostHealthTypeStatePropEnum, true); err != nil { + return err + } + return nil +} + +func (m *V1EdgeHostHealth) validateState(formats strfmt.Registry) error { + + if swag.IsZero(m.State) { // not required + return nil + } + + // value enum + if err := m.validateStateEnum("state", "body", m.State); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1EdgeHostHealth) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1EdgeHostHealth) UnmarshalBinary(b []byte) error { + var res V1EdgeHostHealth + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_edge_host_identity.go b/api/models/v1_edge_host_identity.go new file mode 100644 index 00000000..a5768ccb --- /dev/null +++ b/api/models/v1_edge_host_identity.go @@ -0,0 +1,80 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1EdgeHostIdentity v1 edge host identity +// +// swagger:model v1EdgeHostIdentity +type V1EdgeHostIdentity struct { + + // CACert is the client CA certificate + CaCert string `json:"caCert,omitempty"` + + // Mode indicates a system or session connection to the host + Mode string `json:"mode,omitempty"` + + // SocketPath is an optional path to the socket on the host, if not using defaults + SocketPath string `json:"socketPath,omitempty"` + + // SSHSecret to the secret containing ssh-username + SSHSecret *V1EdgeHostSSHSecret `json:"sshSecret,omitempty"` +} + +// Validate validates this v1 edge host identity +func (m *V1EdgeHostIdentity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateSSHSecret(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1EdgeHostIdentity) validateSSHSecret(formats strfmt.Registry) error { + + if swag.IsZero(m.SSHSecret) { // not required + return nil + } + + if m.SSHSecret != nil { + if err := m.SSHSecret.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("sshSecret") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1EdgeHostIdentity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1EdgeHostIdentity) UnmarshalBinary(b []byte) error { + var res V1EdgeHostIdentity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_edge_host_meta.go b/api/models/v1_edge_host_meta.go new file mode 100644 index 00000000..a268b3c1 --- /dev/null +++ b/api/models/v1_edge_host_meta.go @@ -0,0 +1,138 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "encoding/json" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1EdgeHostMeta v1 edge host meta +// +// swagger:model v1EdgeHostMeta +type V1EdgeHostMeta struct { + + // arch type + ArchType V1ArchType `json:"archType,omitempty"` + + // edge host type + // Enum: [libvirt edge-native vsphere] + EdgeHostType string `json:"edgeHostType,omitempty"` + + // health state + HealthState string `json:"healthState,omitempty"` + + // name + Name string `json:"name,omitempty"` + + // state + State string `json:"state,omitempty"` + + // uid + UID string `json:"uid,omitempty"` +} + +// Validate validates this v1 edge host meta +func (m *V1EdgeHostMeta) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateArchType(formats); err != nil { + res = append(res, err) + } + + if err := m.validateEdgeHostType(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1EdgeHostMeta) validateArchType(formats strfmt.Registry) error { + + if swag.IsZero(m.ArchType) { // not required + return nil + } + + if err := m.ArchType.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("archType") + } + return err + } + + return nil +} + +var v1EdgeHostMetaTypeEdgeHostTypePropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["libvirt","edge-native","vsphere"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + v1EdgeHostMetaTypeEdgeHostTypePropEnum = append(v1EdgeHostMetaTypeEdgeHostTypePropEnum, v) + } +} + +const ( + + // V1EdgeHostMetaEdgeHostTypeLibvirt captures enum value "libvirt" + V1EdgeHostMetaEdgeHostTypeLibvirt string = "libvirt" + + // V1EdgeHostMetaEdgeHostTypeEdgeNative captures enum value "edge-native" + V1EdgeHostMetaEdgeHostTypeEdgeNative string = "edge-native" + + // V1EdgeHostMetaEdgeHostTypeVsphere captures enum value "vsphere" + V1EdgeHostMetaEdgeHostTypeVsphere string = "vsphere" +) + +// prop value enum +func (m *V1EdgeHostMeta) validateEdgeHostTypeEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, v1EdgeHostMetaTypeEdgeHostTypePropEnum, true); err != nil { + return err + } + return nil +} + +func (m *V1EdgeHostMeta) validateEdgeHostType(formats strfmt.Registry) error { + + if swag.IsZero(m.EdgeHostType) { // not required + return nil + } + + // value enum + if err := m.validateEdgeHostTypeEnum("edgeHostType", "body", m.EdgeHostType); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1EdgeHostMeta) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1EdgeHostMeta) UnmarshalBinary(b []byte) error { + var res V1EdgeHostMeta + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_edge_host_network.go b/api/models/v1_edge_host_network.go new file mode 100644 index 00000000..8fe0130b --- /dev/null +++ b/api/models/v1_edge_host_network.go @@ -0,0 +1,118 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "encoding/json" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1EdgeHostNetwork Network defines the network configuration for a virtual machine +// +// swagger:model v1EdgeHostNetwork +type V1EdgeHostNetwork struct { + + // NetworkName of the network where this machine will be connected + // Required: true + NetworkName *string `json:"networkName"` + + // NetworkType specifies the type of network + // Required: true + // Enum: [default bridge] + NetworkType *string `json:"networkType"` +} + +// Validate validates this v1 edge host network +func (m *V1EdgeHostNetwork) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateNetworkName(formats); err != nil { + res = append(res, err) + } + + if err := m.validateNetworkType(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1EdgeHostNetwork) validateNetworkName(formats strfmt.Registry) error { + + if err := validate.Required("networkName", "body", m.NetworkName); err != nil { + return err + } + + return nil +} + +var v1EdgeHostNetworkTypeNetworkTypePropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["default","bridge"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + v1EdgeHostNetworkTypeNetworkTypePropEnum = append(v1EdgeHostNetworkTypeNetworkTypePropEnum, v) + } +} + +const ( + + // V1EdgeHostNetworkNetworkTypeDefault captures enum value "default" + V1EdgeHostNetworkNetworkTypeDefault string = "default" + + // V1EdgeHostNetworkNetworkTypeBridge captures enum value "bridge" + V1EdgeHostNetworkNetworkTypeBridge string = "bridge" +) + +// prop value enum +func (m *V1EdgeHostNetwork) validateNetworkTypeEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, v1EdgeHostNetworkTypeNetworkTypePropEnum, true); err != nil { + return err + } + return nil +} + +func (m *V1EdgeHostNetwork) validateNetworkType(formats strfmt.Registry) error { + + if err := validate.Required("networkType", "body", m.NetworkType); err != nil { + return err + } + + // value enum + if err := m.validateNetworkTypeEnum("networkType", "body", *m.NetworkType); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1EdgeHostNetwork) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1EdgeHostNetwork) UnmarshalBinary(b []byte) error { + var res V1EdgeHostNetwork + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_edge_host_properties.go b/api/models/v1_edge_host_properties.go new file mode 100644 index 00000000..3aa543bc --- /dev/null +++ b/api/models/v1_edge_host_properties.go @@ -0,0 +1,112 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1EdgeHostProperties Additional properties of edge host +// +// swagger:model v1EdgeHostProperties +type V1EdgeHostProperties struct { + + // networks + Networks []*V1EdgeHostNetwork `json:"networks"` + + // storage pools + StoragePools []*V1EdgeHostStoragePool `json:"storagePools"` +} + +// Validate validates this v1 edge host properties +func (m *V1EdgeHostProperties) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateNetworks(formats); err != nil { + res = append(res, err) + } + + if err := m.validateStoragePools(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1EdgeHostProperties) validateNetworks(formats strfmt.Registry) error { + + if swag.IsZero(m.Networks) { // not required + return nil + } + + for i := 0; i < len(m.Networks); i++ { + if swag.IsZero(m.Networks[i]) { // not required + continue + } + + if m.Networks[i] != nil { + if err := m.Networks[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("networks" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1EdgeHostProperties) validateStoragePools(formats strfmt.Registry) error { + + if swag.IsZero(m.StoragePools) { // not required + return nil + } + + for i := 0; i < len(m.StoragePools); i++ { + if swag.IsZero(m.StoragePools[i]) { // not required + continue + } + + if m.StoragePools[i] != nil { + if err := m.StoragePools[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("storagePools" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1EdgeHostProperties) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1EdgeHostProperties) UnmarshalBinary(b []byte) error { + var res V1EdgeHostProperties + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_edge_host_spec_host.go b/api/models/v1_edge_host_spec_host.go new file mode 100644 index 00000000..365e71e7 --- /dev/null +++ b/api/models/v1_edge_host_spec_host.go @@ -0,0 +1,46 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1EdgeHostSpecHost Host specifications +// +// swagger:model v1EdgeHostSpecHost +type V1EdgeHostSpecHost struct { + + // HostAddress is a FQDN or IP address of the Host + HostAddress string `json:"hostAddress,omitempty"` + + // mac address + MacAddress string `json:"macAddress,omitempty"` +} + +// Validate validates this v1 edge host spec host +func (m *V1EdgeHostSpecHost) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1EdgeHostSpecHost) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1EdgeHostSpecHost) UnmarshalBinary(b []byte) error { + var res V1EdgeHostSpecHost + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_edge_host_ssh_secret.go b/api/models/v1_edge_host_ssh_secret.go new file mode 100644 index 00000000..8178c47c --- /dev/null +++ b/api/models/v1_edge_host_ssh_secret.go @@ -0,0 +1,46 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1EdgeHostSSHSecret v1 edge host SSH secret +// +// swagger:model v1EdgeHostSSHSecret +type V1EdgeHostSSHSecret struct { + + // SSH secret name + Name string `json:"name,omitempty"` + + // Private Key to access the host + PrivateKey string `json:"privateKey,omitempty"` +} + +// Validate validates this v1 edge host SSH secret +func (m *V1EdgeHostSSHSecret) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1EdgeHostSSHSecret) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1EdgeHostSSHSecret) UnmarshalBinary(b []byte) error { + var res V1EdgeHostSSHSecret + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_edge_host_state.go b/api/models/v1_edge_host_state.go new file mode 100644 index 00000000..51d8b5fb --- /dev/null +++ b/api/models/v1_edge_host_state.go @@ -0,0 +1,66 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "encoding/json" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" +) + +// V1EdgeHostState v1 edge host state +// +// swagger:model v1EdgeHostState +type V1EdgeHostState string + +const ( + + // V1EdgeHostStateReady captures enum value "ready" + V1EdgeHostStateReady V1EdgeHostState = "ready" + + // V1EdgeHostStateUnpaired captures enum value "unpaired" + V1EdgeHostStateUnpaired V1EdgeHostState = "unpaired" + + // V1EdgeHostStateInUse captures enum value "in-use" + V1EdgeHostStateInUse V1EdgeHostState = "in-use" +) + +// for schema +var v1EdgeHostStateEnum []interface{} + +func init() { + var res []V1EdgeHostState + if err := json.Unmarshal([]byte(`["ready","unpaired","in-use"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + v1EdgeHostStateEnum = append(v1EdgeHostStateEnum, v) + } +} + +func (m V1EdgeHostState) validateV1EdgeHostStateEnum(path, location string, value V1EdgeHostState) error { + if err := validate.EnumCase(path, location, value, v1EdgeHostStateEnum, true); err != nil { + return err + } + return nil +} + +// Validate validates this v1 edge host state +func (m V1EdgeHostState) Validate(formats strfmt.Registry) error { + var res []error + + // value enum + if err := m.validateV1EdgeHostStateEnum("", "body", m); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/models/v1_edge_host_storage_pool.go b/api/models/v1_edge_host_storage_pool.go new file mode 100644 index 00000000..765b2884 --- /dev/null +++ b/api/models/v1_edge_host_storage_pool.go @@ -0,0 +1,43 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1EdgeHostStoragePool StoragePool is the storage pool for the vm image +// +// swagger:model v1EdgeHostStoragePool +type V1EdgeHostStoragePool struct { + + // name + Name string `json:"name,omitempty"` +} + +// Validate validates this v1 edge host storage pool +func (m *V1EdgeHostStoragePool) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1EdgeHostStoragePool) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1EdgeHostStoragePool) UnmarshalBinary(b []byte) error { + var res V1EdgeHostStoragePool + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_edge_host_vsphere_cloud_properties.go b/api/models/v1_edge_host_vsphere_cloud_properties.go new file mode 100644 index 00000000..1ab0cdce --- /dev/null +++ b/api/models/v1_edge_host_vsphere_cloud_properties.go @@ -0,0 +1,80 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1EdgeHostVsphereCloudProperties Vsphere cloud properties of edge host +// +// swagger:model v1EdgeHostVsphereCloudProperties +type V1EdgeHostVsphereCloudProperties struct { + + // datacenters + Datacenters []*V1VsphereCloudDatacenter `json:"datacenters"` +} + +// Validate validates this v1 edge host vsphere cloud properties +func (m *V1EdgeHostVsphereCloudProperties) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateDatacenters(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1EdgeHostVsphereCloudProperties) validateDatacenters(formats strfmt.Registry) error { + + if swag.IsZero(m.Datacenters) { // not required + return nil + } + + for i := 0; i < len(m.Datacenters); i++ { + if swag.IsZero(m.Datacenters[i]) { // not required + continue + } + + if m.Datacenters[i] != nil { + if err := m.Datacenters[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("datacenters" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1EdgeHostVsphereCloudProperties) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1EdgeHostVsphereCloudProperties) UnmarshalBinary(b []byte) error { + var res V1EdgeHostVsphereCloudProperties + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_edge_hosts_meta.go b/api/models/v1_edge_hosts_meta.go new file mode 100644 index 00000000..1a1ec113 --- /dev/null +++ b/api/models/v1_edge_hosts_meta.go @@ -0,0 +1,80 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1EdgeHostsMeta v1 edge hosts meta +// +// swagger:model v1EdgeHostsMeta +type V1EdgeHostsMeta struct { + + // edge hosts + EdgeHosts []*V1EdgeHostMeta `json:"edgeHosts"` +} + +// Validate validates this v1 edge hosts meta +func (m *V1EdgeHostsMeta) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateEdgeHosts(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1EdgeHostsMeta) validateEdgeHosts(formats strfmt.Registry) error { + + if swag.IsZero(m.EdgeHosts) { // not required + return nil + } + + for i := 0; i < len(m.EdgeHosts); i++ { + if swag.IsZero(m.EdgeHosts[i]) { // not required + continue + } + + if m.EdgeHosts[i] != nil { + if err := m.EdgeHosts[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("edgeHosts" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1EdgeHostsMeta) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1EdgeHostsMeta) UnmarshalBinary(b []byte) error { + var res V1EdgeHostsMeta + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_edge_hosts_metadata.go b/api/models/v1_edge_hosts_metadata.go new file mode 100644 index 00000000..76d0936b --- /dev/null +++ b/api/models/v1_edge_hosts_metadata.go @@ -0,0 +1,121 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1EdgeHostsMetadata v1 edge hosts metadata +// +// swagger:model v1EdgeHostsMetadata +type V1EdgeHostsMetadata struct { + + // metadata + Metadata *V1ObjectMeta `json:"metadata,omitempty"` + + // spec + Spec *V1EdgeHostsMetadataSpec `json:"spec,omitempty"` + + // status + Status *V1EdgeHostsMetadataStatus `json:"status,omitempty"` +} + +// Validate validates this v1 edge hosts metadata +func (m *V1EdgeHostsMetadata) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSpec(formats); err != nil { + res = append(res, err) + } + + if err := m.validateStatus(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1EdgeHostsMetadata) validateMetadata(formats strfmt.Registry) error { + + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } + return err + } + } + + return nil +} + +func (m *V1EdgeHostsMetadata) validateSpec(formats strfmt.Registry) error { + + if swag.IsZero(m.Spec) { // not required + return nil + } + + if m.Spec != nil { + if err := m.Spec.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec") + } + return err + } + } + + return nil +} + +func (m *V1EdgeHostsMetadata) validateStatus(formats strfmt.Registry) error { + + if swag.IsZero(m.Status) { // not required + return nil + } + + if m.Status != nil { + if err := m.Status.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("status") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1EdgeHostsMetadata) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1EdgeHostsMetadata) UnmarshalBinary(b []byte) error { + var res V1EdgeHostsMetadata + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_edge_hosts_metadata_filter.go b/api/models/v1_edge_hosts_metadata_filter.go new file mode 100644 index 00000000..61f7b49c --- /dev/null +++ b/api/models/v1_edge_hosts_metadata_filter.go @@ -0,0 +1,111 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1EdgeHostsMetadataFilter Edge host metadata spec +// +// swagger:model v1EdgeHostsMetadataFilter +type V1EdgeHostsMetadataFilter struct { + + // filter + Filter *V1EdgeHostsMetadataFilterSpec `json:"filter,omitempty"` + + // sort + // Unique: true + Sort []*V1EdgeHostsMetadataSortSpec `json:"sort"` +} + +// Validate validates this v1 edge hosts metadata filter +func (m *V1EdgeHostsMetadataFilter) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateFilter(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSort(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1EdgeHostsMetadataFilter) validateFilter(formats strfmt.Registry) error { + + if swag.IsZero(m.Filter) { // not required + return nil + } + + if m.Filter != nil { + if err := m.Filter.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("filter") + } + return err + } + } + + return nil +} + +func (m *V1EdgeHostsMetadataFilter) validateSort(formats strfmt.Registry) error { + + if swag.IsZero(m.Sort) { // not required + return nil + } + + if err := validate.UniqueItems("sort", "body", m.Sort); err != nil { + return err + } + + for i := 0; i < len(m.Sort); i++ { + if swag.IsZero(m.Sort[i]) { // not required + continue + } + + if m.Sort[i] != nil { + if err := m.Sort[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("sort" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1EdgeHostsMetadataFilter) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1EdgeHostsMetadataFilter) UnmarshalBinary(b []byte) error { + var res V1EdgeHostsMetadataFilter + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_edge_hosts_metadata_filter_spec.go b/api/models/v1_edge_hosts_metadata_filter_spec.go new file mode 100644 index 00000000..00972668 --- /dev/null +++ b/api/models/v1_edge_hosts_metadata_filter_spec.go @@ -0,0 +1,106 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1EdgeHostsMetadataFilterSpec Edge hosts metadata filter spec +// +// swagger:model v1EdgeHostsMetadataFilterSpec +type V1EdgeHostsMetadataFilterSpec struct { + + // name + Name *V1FilterString `json:"name,omitempty"` + + // states + // Unique: true + States []V1EdgeHostState `json:"states"` +} + +// Validate validates this v1 edge hosts metadata filter spec +func (m *V1EdgeHostsMetadataFilterSpec) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateName(formats); err != nil { + res = append(res, err) + } + + if err := m.validateStates(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1EdgeHostsMetadataFilterSpec) validateName(formats strfmt.Registry) error { + + if swag.IsZero(m.Name) { // not required + return nil + } + + if m.Name != nil { + if err := m.Name.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("name") + } + return err + } + } + + return nil +} + +func (m *V1EdgeHostsMetadataFilterSpec) validateStates(formats strfmt.Registry) error { + + if swag.IsZero(m.States) { // not required + return nil + } + + if err := validate.UniqueItems("states", "body", m.States); err != nil { + return err + } + + for i := 0; i < len(m.States); i++ { + + if err := m.States[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("states" + "." + strconv.Itoa(i)) + } + return err + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1EdgeHostsMetadataFilterSpec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1EdgeHostsMetadataFilterSpec) UnmarshalBinary(b []byte) error { + var res V1EdgeHostsMetadataFilterSpec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_edge_hosts_metadata_sort_fields.go b/api/models/v1_edge_hosts_metadata_sort_fields.go new file mode 100644 index 00000000..39a8baf7 --- /dev/null +++ b/api/models/v1_edge_hosts_metadata_sort_fields.go @@ -0,0 +1,69 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "encoding/json" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" +) + +// V1EdgeHostsMetadataSortFields v1 edge hosts metadata sort fields +// +// swagger:model v1EdgeHostsMetadataSortFields +type V1EdgeHostsMetadataSortFields string + +const ( + + // V1EdgeHostsMetadataSortFieldsName captures enum value "name" + V1EdgeHostsMetadataSortFieldsName V1EdgeHostsMetadataSortFields = "name" + + // V1EdgeHostsMetadataSortFieldsState captures enum value "state" + V1EdgeHostsMetadataSortFieldsState V1EdgeHostsMetadataSortFields = "state" + + // V1EdgeHostsMetadataSortFieldsCreationTimestamp captures enum value "creationTimestamp" + V1EdgeHostsMetadataSortFieldsCreationTimestamp V1EdgeHostsMetadataSortFields = "creationTimestamp" + + // V1EdgeHostsMetadataSortFieldsLastModifiedTimestamp captures enum value "lastModifiedTimestamp" + V1EdgeHostsMetadataSortFieldsLastModifiedTimestamp V1EdgeHostsMetadataSortFields = "lastModifiedTimestamp" +) + +// for schema +var v1EdgeHostsMetadataSortFieldsEnum []interface{} + +func init() { + var res []V1EdgeHostsMetadataSortFields + if err := json.Unmarshal([]byte(`["name","state","creationTimestamp","lastModifiedTimestamp"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + v1EdgeHostsMetadataSortFieldsEnum = append(v1EdgeHostsMetadataSortFieldsEnum, v) + } +} + +func (m V1EdgeHostsMetadataSortFields) validateV1EdgeHostsMetadataSortFieldsEnum(path, location string, value V1EdgeHostsMetadataSortFields) error { + if err := validate.EnumCase(path, location, value, v1EdgeHostsMetadataSortFieldsEnum, true); err != nil { + return err + } + return nil +} + +// Validate validates this v1 edge hosts metadata sort fields +func (m V1EdgeHostsMetadataSortFields) Validate(formats strfmt.Registry) error { + var res []error + + // value enum + if err := m.validateV1EdgeHostsMetadataSortFieldsEnum("", "body", m); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/models/v1_edge_hosts_metadata_sort_spec.go b/api/models/v1_edge_hosts_metadata_sort_spec.go new file mode 100644 index 00000000..2be913a3 --- /dev/null +++ b/api/models/v1_edge_hosts_metadata_sort_spec.go @@ -0,0 +1,94 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1EdgeHostsMetadataSortSpec v1 edge hosts metadata sort spec +// +// swagger:model v1EdgeHostsMetadataSortSpec +type V1EdgeHostsMetadataSortSpec struct { + + // field + Field *V1EdgeHostsMetadataSortFields `json:"field,omitempty"` + + // order + Order V1SortOrder `json:"order,omitempty"` +} + +// Validate validates this v1 edge hosts metadata sort spec +func (m *V1EdgeHostsMetadataSortSpec) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateField(formats); err != nil { + res = append(res, err) + } + + if err := m.validateOrder(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1EdgeHostsMetadataSortSpec) validateField(formats strfmt.Registry) error { + + if swag.IsZero(m.Field) { // not required + return nil + } + + if m.Field != nil { + if err := m.Field.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("field") + } + return err + } + } + + return nil +} + +func (m *V1EdgeHostsMetadataSortSpec) validateOrder(formats strfmt.Registry) error { + + if swag.IsZero(m.Order) { // not required + return nil + } + + if err := m.Order.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("order") + } + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1EdgeHostsMetadataSortSpec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1EdgeHostsMetadataSortSpec) UnmarshalBinary(b []byte) error { + var res V1EdgeHostsMetadataSortSpec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_edge_hosts_metadata_spec.go b/api/models/v1_edge_hosts_metadata_spec.go new file mode 100644 index 00000000..b2e1f974 --- /dev/null +++ b/api/models/v1_edge_hosts_metadata_spec.go @@ -0,0 +1,158 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1EdgeHostsMetadataSpec v1 edge hosts metadata spec +// +// swagger:model v1EdgeHostsMetadataSpec +type V1EdgeHostsMetadataSpec struct { + + // cluster profile templates + ClusterProfileTemplates []*V1ProfileTemplateSummary `json:"clusterProfileTemplates"` + + // device + Device *V1DeviceSpec `json:"device,omitempty"` + + // host + Host *V1EdgeHostSpecHost `json:"host,omitempty"` + + // project meta + ProjectMeta *V1ProjectMeta `json:"projectMeta,omitempty"` + + // type + Type string `json:"type,omitempty"` +} + +// Validate validates this v1 edge hosts metadata spec +func (m *V1EdgeHostsMetadataSpec) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateClusterProfileTemplates(formats); err != nil { + res = append(res, err) + } + + if err := m.validateDevice(formats); err != nil { + res = append(res, err) + } + + if err := m.validateHost(formats); err != nil { + res = append(res, err) + } + + if err := m.validateProjectMeta(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1EdgeHostsMetadataSpec) validateClusterProfileTemplates(formats strfmt.Registry) error { + + if swag.IsZero(m.ClusterProfileTemplates) { // not required + return nil + } + + for i := 0; i < len(m.ClusterProfileTemplates); i++ { + if swag.IsZero(m.ClusterProfileTemplates[i]) { // not required + continue + } + + if m.ClusterProfileTemplates[i] != nil { + if err := m.ClusterProfileTemplates[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("clusterProfileTemplates" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1EdgeHostsMetadataSpec) validateDevice(formats strfmt.Registry) error { + + if swag.IsZero(m.Device) { // not required + return nil + } + + if m.Device != nil { + if err := m.Device.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("device") + } + return err + } + } + + return nil +} + +func (m *V1EdgeHostsMetadataSpec) validateHost(formats strfmt.Registry) error { + + if swag.IsZero(m.Host) { // not required + return nil + } + + if m.Host != nil { + if err := m.Host.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("host") + } + return err + } + } + + return nil +} + +func (m *V1EdgeHostsMetadataSpec) validateProjectMeta(formats strfmt.Registry) error { + + if swag.IsZero(m.ProjectMeta) { // not required + return nil + } + + if m.ProjectMeta != nil { + if err := m.ProjectMeta.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("projectMeta") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1EdgeHostsMetadataSpec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1EdgeHostsMetadataSpec) UnmarshalBinary(b []byte) error { + var res V1EdgeHostsMetadataSpec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_edge_hosts_metadata_status.go b/api/models/v1_edge_hosts_metadata_status.go new file mode 100644 index 00000000..dd45331a --- /dev/null +++ b/api/models/v1_edge_hosts_metadata_status.go @@ -0,0 +1,128 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1EdgeHostsMetadataStatus v1 edge hosts metadata status +// +// swagger:model v1EdgeHostsMetadataStatus +type V1EdgeHostsMetadataStatus struct { + + // health + Health *V1EdgeHostHealth `json:"health,omitempty"` + + // in use clusters + InUseClusters []*V1ObjectEntity `json:"inUseClusters"` + + // state + State V1EdgeHostState `json:"state,omitempty"` +} + +// Validate validates this v1 edge hosts metadata status +func (m *V1EdgeHostsMetadataStatus) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateHealth(formats); err != nil { + res = append(res, err) + } + + if err := m.validateInUseClusters(formats); err != nil { + res = append(res, err) + } + + if err := m.validateState(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1EdgeHostsMetadataStatus) validateHealth(formats strfmt.Registry) error { + + if swag.IsZero(m.Health) { // not required + return nil + } + + if m.Health != nil { + if err := m.Health.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("health") + } + return err + } + } + + return nil +} + +func (m *V1EdgeHostsMetadataStatus) validateInUseClusters(formats strfmt.Registry) error { + + if swag.IsZero(m.InUseClusters) { // not required + return nil + } + + for i := 0; i < len(m.InUseClusters); i++ { + if swag.IsZero(m.InUseClusters[i]) { // not required + continue + } + + if m.InUseClusters[i] != nil { + if err := m.InUseClusters[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("inUseClusters" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1EdgeHostsMetadataStatus) validateState(formats strfmt.Registry) error { + + if swag.IsZero(m.State) { // not required + return nil + } + + if err := m.State.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("state") + } + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1EdgeHostsMetadataStatus) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1EdgeHostsMetadataStatus) UnmarshalBinary(b []byte) error { + var res V1EdgeHostsMetadataStatus + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_edge_hosts_metadata_summary.go b/api/models/v1_edge_hosts_metadata_summary.go new file mode 100644 index 00000000..ac0bdc90 --- /dev/null +++ b/api/models/v1_edge_hosts_metadata_summary.go @@ -0,0 +1,87 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1EdgeHostsMetadataSummary v1 edge hosts metadata summary +// +// swagger:model v1EdgeHostsMetadataSummary +type V1EdgeHostsMetadataSummary struct { + + // items + // Required: true + // Unique: true + Items []*V1EdgeHostsMetadata `json:"items"` +} + +// Validate validates this v1 edge hosts metadata summary +func (m *V1EdgeHostsMetadataSummary) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateItems(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1EdgeHostsMetadataSummary) validateItems(formats strfmt.Registry) error { + + if err := validate.Required("items", "body", m.Items); err != nil { + return err + } + + if err := validate.UniqueItems("items", "body", m.Items); err != nil { + return err + } + + for i := 0; i < len(m.Items); i++ { + if swag.IsZero(m.Items[i]) { // not required + continue + } + + if m.Items[i] != nil { + if err := m.Items[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("items" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1EdgeHostsMetadataSummary) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1EdgeHostsMetadataSummary) UnmarshalBinary(b []byte) error { + var res V1EdgeHostsMetadataSummary + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_edge_hosts_search_summary.go b/api/models/v1_edge_hosts_search_summary.go new file mode 100644 index 00000000..e11bf75b --- /dev/null +++ b/api/models/v1_edge_hosts_search_summary.go @@ -0,0 +1,112 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1EdgeHostsSearchSummary v1 edge hosts search summary +// +// swagger:model v1EdgeHostsSearchSummary +type V1EdgeHostsSearchSummary struct { + + // items + // Required: true + // Unique: true + Items []*V1EdgeHostsMetadata `json:"items"` + + // listmeta + Listmeta *V1ListMetaData `json:"listmeta,omitempty"` +} + +// Validate validates this v1 edge hosts search summary +func (m *V1EdgeHostsSearchSummary) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateItems(formats); err != nil { + res = append(res, err) + } + + if err := m.validateListmeta(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1EdgeHostsSearchSummary) validateItems(formats strfmt.Registry) error { + + if err := validate.Required("items", "body", m.Items); err != nil { + return err + } + + if err := validate.UniqueItems("items", "body", m.Items); err != nil { + return err + } + + for i := 0; i < len(m.Items); i++ { + if swag.IsZero(m.Items[i]) { // not required + continue + } + + if m.Items[i] != nil { + if err := m.Items[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("items" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1EdgeHostsSearchSummary) validateListmeta(formats strfmt.Registry) error { + + if swag.IsZero(m.Listmeta) { // not required + return nil + } + + if m.Listmeta != nil { + if err := m.Listmeta.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("listmeta") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1EdgeHostsSearchSummary) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1EdgeHostsSearchSummary) UnmarshalBinary(b []byte) error { + var res V1EdgeHostsSearchSummary + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_edge_hosts_tags.go b/api/models/v1_edge_hosts_tags.go new file mode 100644 index 00000000..22e90e6c --- /dev/null +++ b/api/models/v1_edge_hosts_tags.go @@ -0,0 +1,43 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1EdgeHostsTags v1 edge hosts tags +// +// swagger:model v1EdgeHostsTags +type V1EdgeHostsTags struct { + + // tags + Tags []string `json:"tags"` +} + +// Validate validates this v1 edge hosts tags +func (m *V1EdgeHostsTags) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1EdgeHostsTags) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1EdgeHostsTags) UnmarshalBinary(b []byte) error { + var res V1EdgeHostsTags + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_edge_instance_type.go b/api/models/v1_edge_instance_type.go new file mode 100644 index 00000000..0218e6cb --- /dev/null +++ b/api/models/v1_edge_instance_type.go @@ -0,0 +1,81 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1EdgeInstanceType EdgeInstanceType defines the instance configuration for a docker container node +// +// swagger:model v1EdgeInstanceType +type V1EdgeInstanceType struct { + + // MemoryinMB is the memory in megabytes + // Required: true + MemoryInMB *int32 `json:"memoryInMB"` + + // NumCPUs is the number of CPUs + // Required: true + NumCPUs *int32 `json:"numCPUs"` +} + +// Validate validates this v1 edge instance type +func (m *V1EdgeInstanceType) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMemoryInMB(formats); err != nil { + res = append(res, err) + } + + if err := m.validateNumCPUs(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1EdgeInstanceType) validateMemoryInMB(formats strfmt.Registry) error { + + if err := validate.Required("memoryInMB", "body", m.MemoryInMB); err != nil { + return err + } + + return nil +} + +func (m *V1EdgeInstanceType) validateNumCPUs(formats strfmt.Registry) error { + + if err := validate.Required("numCPUs", "body", m.NumCPUs); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1EdgeInstanceType) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1EdgeInstanceType) UnmarshalBinary(b []byte) error { + var res V1EdgeInstanceType + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_edge_machine.go b/api/models/v1_edge_machine.go new file mode 100644 index 00000000..cf286f53 --- /dev/null +++ b/api/models/v1_edge_machine.go @@ -0,0 +1,127 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1EdgeMachine Edge cloud VM definition +// +// swagger:model v1EdgeMachine +type V1EdgeMachine struct { + + // api version + APIVersion string `json:"apiVersion,omitempty"` + + // kind + Kind string `json:"kind,omitempty"` + + // metadata + Metadata *V1ObjectMeta `json:"metadata,omitempty"` + + // spec + Spec *V1EdgeMachineSpec `json:"spec,omitempty"` + + // status + Status *V1CloudMachineStatus `json:"status,omitempty"` +} + +// Validate validates this v1 edge machine +func (m *V1EdgeMachine) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSpec(formats); err != nil { + res = append(res, err) + } + + if err := m.validateStatus(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1EdgeMachine) validateMetadata(formats strfmt.Registry) error { + + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } + return err + } + } + + return nil +} + +func (m *V1EdgeMachine) validateSpec(formats strfmt.Registry) error { + + if swag.IsZero(m.Spec) { // not required + return nil + } + + if m.Spec != nil { + if err := m.Spec.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec") + } + return err + } + } + + return nil +} + +func (m *V1EdgeMachine) validateStatus(formats strfmt.Registry) error { + + if swag.IsZero(m.Status) { // not required + return nil + } + + if m.Status != nil { + if err := m.Status.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("status") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1EdgeMachine) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1EdgeMachine) UnmarshalBinary(b []byte) error { + var res V1EdgeMachine + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_edge_machine_pool_cloud_config_entity.go b/api/models/v1_edge_machine_pool_cloud_config_entity.go new file mode 100644 index 00000000..9beaa200 --- /dev/null +++ b/api/models/v1_edge_machine_pool_cloud_config_entity.go @@ -0,0 +1,87 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1EdgeMachinePoolCloudConfigEntity v1 edge machine pool cloud config entity +// +// swagger:model v1EdgeMachinePoolCloudConfigEntity +type V1EdgeMachinePoolCloudConfigEntity struct { + + // edge hosts + // Required: true + // Unique: true + EdgeHosts []*V1EdgeMachinePoolHostEntity `json:"edgeHosts"` +} + +// Validate validates this v1 edge machine pool cloud config entity +func (m *V1EdgeMachinePoolCloudConfigEntity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateEdgeHosts(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1EdgeMachinePoolCloudConfigEntity) validateEdgeHosts(formats strfmt.Registry) error { + + if err := validate.Required("edgeHosts", "body", m.EdgeHosts); err != nil { + return err + } + + if err := validate.UniqueItems("edgeHosts", "body", m.EdgeHosts); err != nil { + return err + } + + for i := 0; i < len(m.EdgeHosts); i++ { + if swag.IsZero(m.EdgeHosts[i]) { // not required + continue + } + + if m.EdgeHosts[i] != nil { + if err := m.EdgeHosts[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("edgeHosts" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1EdgeMachinePoolCloudConfigEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1EdgeMachinePoolCloudConfigEntity) UnmarshalBinary(b []byte) error { + var res V1EdgeMachinePoolCloudConfigEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_edge_machine_pool_config.go b/api/models/v1_edge_machine_pool_config.go new file mode 100644 index 00000000..5c69ab83 --- /dev/null +++ b/api/models/v1_edge_machine_pool_config.go @@ -0,0 +1,199 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1EdgeMachinePoolConfig v1 edge machine pool config +// +// swagger:model v1EdgeMachinePoolConfig +type V1EdgeMachinePoolConfig struct { + + // additionalLabels + AdditionalLabels map[string]string `json:"additionalLabels,omitempty"` + + // AdditionalTags is an optional set of tags to add to resources managed by the provider, in addition to the ones added by default. For eg., tags for EKS nodeGroup or EKS NodegroupIAMRole + AdditionalTags map[string]string `json:"additionalTags,omitempty"` + + // hosts + // Required: true + Hosts []*V1EdgeMachinePoolHost `json:"hosts"` + + // whether this pool is for control plane + IsControlPlane bool `json:"isControlPlane,omitempty"` + + // labels for this pool, example: control-plane/worker, gpu, windows + Labels []string `json:"labels"` + + // machine pool properties + MachinePoolProperties *V1MachinePoolProperties `json:"machinePoolProperties,omitempty"` + + // max size of the pool, for scaling + MaxSize int32 `json:"maxSize,omitempty"` + + // min size of the pool, for scaling + MinSize int32 `json:"minSize,omitempty"` + + // name + Name string `json:"name,omitempty"` + + // Minimum number of seconds a node should be Ready, before the next node is selected for repave. Applicable only for workerpools in infrastructure cluster + NodeRepaveInterval int32 `json:"nodeRepaveInterval,omitempty"` + + // size of the pool, number of machines + Size int32 `json:"size,omitempty"` + + // control plane or worker taints + // Unique: true + Taints []*V1Taint `json:"taints"` + + // rolling update strategy for this machinepool if not specified, will use ScaleOut + UpdateStrategy *V1UpdateStrategy `json:"updateStrategy,omitempty"` + + // if IsControlPlane==true && useControlPlaneAsWorker==true, then will remove control plane taint this will not be used for worker pools + UseControlPlaneAsWorker bool `json:"useControlPlaneAsWorker,omitempty"` +} + +// Validate validates this v1 edge machine pool config +func (m *V1EdgeMachinePoolConfig) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateHosts(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMachinePoolProperties(formats); err != nil { + res = append(res, err) + } + + if err := m.validateTaints(formats); err != nil { + res = append(res, err) + } + + if err := m.validateUpdateStrategy(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1EdgeMachinePoolConfig) validateHosts(formats strfmt.Registry) error { + + if err := validate.Required("hosts", "body", m.Hosts); err != nil { + return err + } + + for i := 0; i < len(m.Hosts); i++ { + if swag.IsZero(m.Hosts[i]) { // not required + continue + } + + if m.Hosts[i] != nil { + if err := m.Hosts[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("hosts" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1EdgeMachinePoolConfig) validateMachinePoolProperties(formats strfmt.Registry) error { + + if swag.IsZero(m.MachinePoolProperties) { // not required + return nil + } + + if m.MachinePoolProperties != nil { + if err := m.MachinePoolProperties.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("machinePoolProperties") + } + return err + } + } + + return nil +} + +func (m *V1EdgeMachinePoolConfig) validateTaints(formats strfmt.Registry) error { + + if swag.IsZero(m.Taints) { // not required + return nil + } + + if err := validate.UniqueItems("taints", "body", m.Taints); err != nil { + return err + } + + for i := 0; i < len(m.Taints); i++ { + if swag.IsZero(m.Taints[i]) { // not required + continue + } + + if m.Taints[i] != nil { + if err := m.Taints[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("taints" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1EdgeMachinePoolConfig) validateUpdateStrategy(formats strfmt.Registry) error { + + if swag.IsZero(m.UpdateStrategy) { // not required + return nil + } + + if m.UpdateStrategy != nil { + if err := m.UpdateStrategy.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("updateStrategy") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1EdgeMachinePoolConfig) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1EdgeMachinePoolConfig) UnmarshalBinary(b []byte) error { + var res V1EdgeMachinePoolConfig + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_edge_machine_pool_config_entity.go b/api/models/v1_edge_machine_pool_config_entity.go new file mode 100644 index 00000000..d9fb4a3d --- /dev/null +++ b/api/models/v1_edge_machine_pool_config_entity.go @@ -0,0 +1,96 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1EdgeMachinePoolConfigEntity v1 edge machine pool config entity +// +// swagger:model v1EdgeMachinePoolConfigEntity +type V1EdgeMachinePoolConfigEntity struct { + + // cloud config + CloudConfig *V1EdgeMachinePoolCloudConfigEntity `json:"cloudConfig,omitempty"` + + // pool config + PoolConfig *V1MachinePoolConfigEntity `json:"poolConfig,omitempty"` +} + +// Validate validates this v1 edge machine pool config entity +func (m *V1EdgeMachinePoolConfigEntity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateCloudConfig(formats); err != nil { + res = append(res, err) + } + + if err := m.validatePoolConfig(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1EdgeMachinePoolConfigEntity) validateCloudConfig(formats strfmt.Registry) error { + + if swag.IsZero(m.CloudConfig) { // not required + return nil + } + + if m.CloudConfig != nil { + if err := m.CloudConfig.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("cloudConfig") + } + return err + } + } + + return nil +} + +func (m *V1EdgeMachinePoolConfigEntity) validatePoolConfig(formats strfmt.Registry) error { + + if swag.IsZero(m.PoolConfig) { // not required + return nil + } + + if m.PoolConfig != nil { + if err := m.PoolConfig.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("poolConfig") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1EdgeMachinePoolConfigEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1EdgeMachinePoolConfigEntity) UnmarshalBinary(b []byte) error { + var res V1EdgeMachinePoolConfigEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_edge_machine_pool_host.go b/api/models/v1_edge_machine_pool_host.go new file mode 100644 index 00000000..aa12e307 --- /dev/null +++ b/api/models/v1_edge_machine_pool_host.go @@ -0,0 +1,109 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1EdgeMachinePoolHost EdgeHost of Edge clusters +// +// swagger:model v1EdgeMachinePoolHost +type V1EdgeMachinePoolHost struct { + + // HostAddress is a FQDN or IP address of the Host + // Required: true + HostAddress *string `json:"hostAddress"` + + // HostIdentity is the identity to access the edge host + HostIdentity *V1EdgeMachinePoolHostIdentity `json:"hostIdentity,omitempty"` + + // HostName is the name of the EdgeHost + HostName string `json:"hostName,omitempty"` + + // HostUid is the ID of the EdgeHost + // Required: true + HostUID *string `json:"hostUid"` +} + +// Validate validates this v1 edge machine pool host +func (m *V1EdgeMachinePoolHost) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateHostAddress(formats); err != nil { + res = append(res, err) + } + + if err := m.validateHostIdentity(formats); err != nil { + res = append(res, err) + } + + if err := m.validateHostUID(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1EdgeMachinePoolHost) validateHostAddress(formats strfmt.Registry) error { + + if err := validate.Required("hostAddress", "body", m.HostAddress); err != nil { + return err + } + + return nil +} + +func (m *V1EdgeMachinePoolHost) validateHostIdentity(formats strfmt.Registry) error { + + if swag.IsZero(m.HostIdentity) { // not required + return nil + } + + if m.HostIdentity != nil { + if err := m.HostIdentity.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("hostIdentity") + } + return err + } + } + + return nil +} + +func (m *V1EdgeMachinePoolHost) validateHostUID(formats strfmt.Registry) error { + + if err := validate.Required("hostUid", "body", m.HostUID); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1EdgeMachinePoolHost) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1EdgeMachinePoolHost) UnmarshalBinary(b []byte) error { + var res V1EdgeMachinePoolHost + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_edge_machine_pool_host_entity.go b/api/models/v1_edge_machine_pool_host_entity.go new file mode 100644 index 00000000..0a9c9ffc --- /dev/null +++ b/api/models/v1_edge_machine_pool_host_entity.go @@ -0,0 +1,64 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1EdgeMachinePoolHostEntity v1 edge machine pool host entity +// +// swagger:model v1EdgeMachinePoolHostEntity +type V1EdgeMachinePoolHostEntity struct { + + // host Uid + // Required: true + HostUID *string `json:"hostUid"` +} + +// Validate validates this v1 edge machine pool host entity +func (m *V1EdgeMachinePoolHostEntity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateHostUID(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1EdgeMachinePoolHostEntity) validateHostUID(formats strfmt.Registry) error { + + if err := validate.Required("hostUid", "body", m.HostUID); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1EdgeMachinePoolHostEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1EdgeMachinePoolHostEntity) UnmarshalBinary(b []byte) error { + var res V1EdgeMachinePoolHostEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_edge_machine_pool_host_identity.go b/api/models/v1_edge_machine_pool_host_identity.go new file mode 100644 index 00000000..e2f781bf --- /dev/null +++ b/api/models/v1_edge_machine_pool_host_identity.go @@ -0,0 +1,46 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1EdgeMachinePoolHostIdentity v1 edge machine pool host identity +// +// swagger:model v1EdgeMachinePoolHostIdentity +type V1EdgeMachinePoolHostIdentity struct { + + // CACert is the client CA certificate + CaCert string `json:"caCert,omitempty"` + + // SocketPath is an optional path to the socket on the host, if not using defaults + SocketPath string `json:"socketPath,omitempty"` +} + +// Validate validates this v1 edge machine pool host identity +func (m *V1EdgeMachinePoolHostIdentity) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1EdgeMachinePoolHostIdentity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1EdgeMachinePoolHostIdentity) UnmarshalBinary(b []byte) error { + var res V1EdgeMachinePoolHostIdentity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_edge_machine_spec.go b/api/models/v1_edge_machine_spec.go new file mode 100644 index 00000000..d32bf44b --- /dev/null +++ b/api/models/v1_edge_machine_spec.go @@ -0,0 +1,123 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1EdgeMachineSpec Edge cloud VM definition spec +// +// swagger:model v1EdgeMachineSpec +type V1EdgeMachineSpec struct { + + // bootstrapped + Bootstrapped bool `json:"bootstrapped,omitempty"` + + // custom image + CustomImage string `json:"customImage,omitempty"` + + // edge host Uid + EdgeHostUID string `json:"edgeHostUid,omitempty"` + + // instance type + InstanceType *V1EdgeInstanceType `json:"instanceType,omitempty"` + + // load balancer configured + LoadBalancerConfigured bool `json:"loadBalancerConfigured,omitempty"` + + // mounts + // Unique: true + Mounts []*V1EdgeMount `json:"mounts"` +} + +// Validate validates this v1 edge machine spec +func (m *V1EdgeMachineSpec) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateInstanceType(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMounts(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1EdgeMachineSpec) validateInstanceType(formats strfmt.Registry) error { + + if swag.IsZero(m.InstanceType) { // not required + return nil + } + + if m.InstanceType != nil { + if err := m.InstanceType.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("instanceType") + } + return err + } + } + + return nil +} + +func (m *V1EdgeMachineSpec) validateMounts(formats strfmt.Registry) error { + + if swag.IsZero(m.Mounts) { // not required + return nil + } + + if err := validate.UniqueItems("mounts", "body", m.Mounts); err != nil { + return err + } + + for i := 0; i < len(m.Mounts); i++ { + if swag.IsZero(m.Mounts[i]) { // not required + continue + } + + if m.Mounts[i] != nil { + if err := m.Mounts[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("mounts" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1EdgeMachineSpec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1EdgeMachineSpec) UnmarshalBinary(b []byte) error { + var res V1EdgeMachineSpec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_edge_machines.go b/api/models/v1_edge_machines.go new file mode 100644 index 00000000..7b42ef20 --- /dev/null +++ b/api/models/v1_edge_machines.go @@ -0,0 +1,87 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1EdgeMachines Edge machine list +// +// swagger:model v1EdgeMachines +type V1EdgeMachines struct { + + // items + // Required: true + // Unique: true + Items []*V1EdgeMachine `json:"items"` +} + +// Validate validates this v1 edge machines +func (m *V1EdgeMachines) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateItems(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1EdgeMachines) validateItems(formats strfmt.Registry) error { + + if err := validate.Required("items", "body", m.Items); err != nil { + return err + } + + if err := validate.UniqueItems("items", "body", m.Items); err != nil { + return err + } + + for i := 0; i < len(m.Items); i++ { + if swag.IsZero(m.Items[i]) { // not required + continue + } + + if m.Items[i] != nil { + if err := m.Items[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("items" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1EdgeMachines) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1EdgeMachines) UnmarshalBinary(b []byte) error { + var res V1EdgeMachines + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_edge_mount.go b/api/models/v1_edge_mount.go new file mode 100644 index 00000000..8bde927c --- /dev/null +++ b/api/models/v1_edge_mount.go @@ -0,0 +1,49 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1EdgeMount Edge mounts +// +// swagger:model v1EdgeMount +type V1EdgeMount struct { + + // container path + ContainerPath string `json:"containerPath,omitempty"` + + // host path + HostPath string `json:"hostPath,omitempty"` + + // readonly + Readonly bool `json:"readonly,omitempty"` +} + +// Validate validates this v1 edge mount +func (m *V1EdgeMount) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1EdgeMount) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1EdgeMount) UnmarshalBinary(b []byte) error { + var res V1EdgeMount + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_edge_native_cloud_cluster_config_entity.go b/api/models/v1_edge_native_cloud_cluster_config_entity.go new file mode 100644 index 00000000..fe3a51f8 --- /dev/null +++ b/api/models/v1_edge_native_cloud_cluster_config_entity.go @@ -0,0 +1,71 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1EdgeNativeCloudClusterConfigEntity EdgeNative cloud cluster config entity +// +// swagger:model v1EdgeNativeCloudClusterConfigEntity +type V1EdgeNativeCloudClusterConfigEntity struct { + + // cluster config + ClusterConfig *V1EdgeNativeClusterConfig `json:"clusterConfig,omitempty"` +} + +// Validate validates this v1 edge native cloud cluster config entity +func (m *V1EdgeNativeCloudClusterConfigEntity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateClusterConfig(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1EdgeNativeCloudClusterConfigEntity) validateClusterConfig(formats strfmt.Registry) error { + + if swag.IsZero(m.ClusterConfig) { // not required + return nil + } + + if m.ClusterConfig != nil { + if err := m.ClusterConfig.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("clusterConfig") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1EdgeNativeCloudClusterConfigEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1EdgeNativeCloudClusterConfigEntity) UnmarshalBinary(b []byte) error { + var res V1EdgeNativeCloudClusterConfigEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_edge_native_cloud_config.go b/api/models/v1_edge_native_cloud_config.go new file mode 100644 index 00000000..e8b477bf --- /dev/null +++ b/api/models/v1_edge_native_cloud_config.go @@ -0,0 +1,121 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1EdgeNativeCloudConfig EdgeNativeCloudConfig is the Schema for the edgenativecloudconfigs API +// +// swagger:model v1EdgeNativeCloudConfig +type V1EdgeNativeCloudConfig struct { + + // metadata + Metadata *V1ObjectMeta `json:"metadata,omitempty"` + + // spec + Spec *V1EdgeNativeCloudConfigSpec `json:"spec,omitempty"` + + // status + Status *V1EdgeNativeCloudConfigStatus `json:"status,omitempty"` +} + +// Validate validates this v1 edge native cloud config +func (m *V1EdgeNativeCloudConfig) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSpec(formats); err != nil { + res = append(res, err) + } + + if err := m.validateStatus(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1EdgeNativeCloudConfig) validateMetadata(formats strfmt.Registry) error { + + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } + return err + } + } + + return nil +} + +func (m *V1EdgeNativeCloudConfig) validateSpec(formats strfmt.Registry) error { + + if swag.IsZero(m.Spec) { // not required + return nil + } + + if m.Spec != nil { + if err := m.Spec.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec") + } + return err + } + } + + return nil +} + +func (m *V1EdgeNativeCloudConfig) validateStatus(formats strfmt.Registry) error { + + if swag.IsZero(m.Status) { // not required + return nil + } + + if m.Status != nil { + if err := m.Status.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("status") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1EdgeNativeCloudConfig) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1EdgeNativeCloudConfig) UnmarshalBinary(b []byte) error { + var res V1EdgeNativeCloudConfig + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_edge_native_cloud_config_spec.go b/api/models/v1_edge_native_cloud_config_spec.go new file mode 100644 index 00000000..db020cbc --- /dev/null +++ b/api/models/v1_edge_native_cloud_config_spec.go @@ -0,0 +1,108 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1EdgeNativeCloudConfigSpec EdgeNativeCloudConfigSpec defines the desired state of EdgeNativeCloudConfig +// +// swagger:model v1EdgeNativeCloudConfigSpec +type V1EdgeNativeCloudConfigSpec struct { + + // cluster config + // Required: true + ClusterConfig *V1EdgeNativeClusterConfig `json:"clusterConfig"` + + // machine pool config + // Required: true + MachinePoolConfig []*V1EdgeNativeMachinePoolConfig `json:"machinePoolConfig"` +} + +// Validate validates this v1 edge native cloud config spec +func (m *V1EdgeNativeCloudConfigSpec) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateClusterConfig(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMachinePoolConfig(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1EdgeNativeCloudConfigSpec) validateClusterConfig(formats strfmt.Registry) error { + + if err := validate.Required("clusterConfig", "body", m.ClusterConfig); err != nil { + return err + } + + if m.ClusterConfig != nil { + if err := m.ClusterConfig.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("clusterConfig") + } + return err + } + } + + return nil +} + +func (m *V1EdgeNativeCloudConfigSpec) validateMachinePoolConfig(formats strfmt.Registry) error { + + if err := validate.Required("machinePoolConfig", "body", m.MachinePoolConfig); err != nil { + return err + } + + for i := 0; i < len(m.MachinePoolConfig); i++ { + if swag.IsZero(m.MachinePoolConfig[i]) { // not required + continue + } + + if m.MachinePoolConfig[i] != nil { + if err := m.MachinePoolConfig[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("machinePoolConfig" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1EdgeNativeCloudConfigSpec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1EdgeNativeCloudConfigSpec) UnmarshalBinary(b []byte) error { + var res V1EdgeNativeCloudConfigSpec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_edge_native_cloud_config_status.go b/api/models/v1_edge_native_cloud_config_status.go new file mode 100644 index 00000000..b1fda8c7 --- /dev/null +++ b/api/models/v1_edge_native_cloud_config_status.go @@ -0,0 +1,86 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1EdgeNativeCloudConfigStatus EdgeNativeCloudConfigStatus defines the observed state of EdgeNativeCloudConfig +// +// swagger:model v1EdgeNativeCloudConfigStatus +type V1EdgeNativeCloudConfigStatus struct { + + // conditions + Conditions []*V1ClusterCondition `json:"conditions"` + + // node image + NodeImage string `json:"nodeImage,omitempty"` + + // SourceImageId can be from packref's annotations or from pack.json + SourceImageID string `json:"sourceImageId,omitempty"` +} + +// Validate validates this v1 edge native cloud config status +func (m *V1EdgeNativeCloudConfigStatus) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateConditions(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1EdgeNativeCloudConfigStatus) validateConditions(formats strfmt.Registry) error { + + if swag.IsZero(m.Conditions) { // not required + return nil + } + + for i := 0; i < len(m.Conditions); i++ { + if swag.IsZero(m.Conditions[i]) { // not required + continue + } + + if m.Conditions[i] != nil { + if err := m.Conditions[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("conditions" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1EdgeNativeCloudConfigStatus) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1EdgeNativeCloudConfigStatus) UnmarshalBinary(b []byte) error { + var res V1EdgeNativeCloudConfigStatus + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_edge_native_cluster_config.go b/api/models/v1_edge_native_cluster_config.go new file mode 100644 index 00000000..455f49cc --- /dev/null +++ b/api/models/v1_edge_native_cluster_config.go @@ -0,0 +1,105 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1EdgeNativeClusterConfig EdgeNativeClusterConfig definnes Edge Native Cluster specific Spec +// +// swagger:model v1EdgeNativeClusterConfig +type V1EdgeNativeClusterConfig struct { + + // ControlPlaneEndpoint is the control plane endpoint, which can be an IP or FQDN + ControlPlaneEndpoint *V1EdgeNativeControlPlaneEndPoint `json:"controlPlaneEndpoint,omitempty"` + + // NTPServers is a list of NTP servers to use instead of the machine image's default NTP server list + NtpServers []string `json:"ntpServers"` + + // OverlayNetworkConfiguration is the configuration for the overlay network + OverlayNetworkConfiguration *V1EdgeNativeOverlayNetworkConfiguration `json:"overlayNetworkConfiguration,omitempty"` + + // SSHKeys specifies a list of ssh authorized keys to access the vms as a 'spectro' user + SSHKeys []string `json:"sshKeys"` + + // StaticIP indicates if IP allocation type is static IP. DHCP is the default allocation type + StaticIP bool `json:"staticIp,omitempty"` +} + +// Validate validates this v1 edge native cluster config +func (m *V1EdgeNativeClusterConfig) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateControlPlaneEndpoint(formats); err != nil { + res = append(res, err) + } + + if err := m.validateOverlayNetworkConfiguration(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1EdgeNativeClusterConfig) validateControlPlaneEndpoint(formats strfmt.Registry) error { + + if swag.IsZero(m.ControlPlaneEndpoint) { // not required + return nil + } + + if m.ControlPlaneEndpoint != nil { + if err := m.ControlPlaneEndpoint.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("controlPlaneEndpoint") + } + return err + } + } + + return nil +} + +func (m *V1EdgeNativeClusterConfig) validateOverlayNetworkConfiguration(formats strfmt.Registry) error { + + if swag.IsZero(m.OverlayNetworkConfiguration) { // not required + return nil + } + + if m.OverlayNetworkConfiguration != nil { + if err := m.OverlayNetworkConfiguration.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("overlayNetworkConfiguration") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1EdgeNativeClusterConfig) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1EdgeNativeClusterConfig) UnmarshalBinary(b []byte) error { + var res V1EdgeNativeClusterConfig + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_edge_native_control_plane_end_point.go b/api/models/v1_edge_native_control_plane_end_point.go new file mode 100644 index 00000000..83d5a321 --- /dev/null +++ b/api/models/v1_edge_native_control_plane_end_point.go @@ -0,0 +1,49 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1EdgeNativeControlPlaneEndPoint v1 edge native control plane end point +// +// swagger:model v1EdgeNativeControlPlaneEndPoint +type V1EdgeNativeControlPlaneEndPoint struct { + + // DDNSSearchDomain is the search domain used for resolving IP addresses when the EndpointType is DDNS. This search domain is appended to the generated Hostname to obtain the complete DNS name for the endpoint. If Host is already a DDNS FQDN, DDNSSearchDomain is not required + DdnsSearchDomain string `json:"ddnsSearchDomain,omitempty"` + + // Host is FQDN(DDNS) or IP + Host string `json:"host,omitempty"` + + // Type indicates DDNS or VIP + Type string `json:"type,omitempty"` +} + +// Validate validates this v1 edge native control plane end point +func (m *V1EdgeNativeControlPlaneEndPoint) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1EdgeNativeControlPlaneEndPoint) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1EdgeNativeControlPlaneEndPoint) UnmarshalBinary(b []byte) error { + var res V1EdgeNativeControlPlaneEndPoint + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_edge_native_host.go b/api/models/v1_edge_native_host.go new file mode 100644 index 00000000..f9c998b3 --- /dev/null +++ b/api/models/v1_edge_native_host.go @@ -0,0 +1,174 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "encoding/json" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1EdgeNativeHost EdgeNativeHost is the underlying appliance +// +// swagger:model v1EdgeNativeHost +type V1EdgeNativeHost struct { + + // Is Edge host nominated as candidate + IsCandidateCaption *bool `json:"IsCandidateCaption"` + + // CACert for TLS connections + CaCert string `json:"caCert,omitempty"` + + // HostAddress is a FQDN or IP address of the Host + // Required: true + HostAddress *string `json:"hostAddress"` + + // Qualified name of host + HostName string `json:"hostName,omitempty"` + + // HostUid is the ID of the EdgeHost + // Required: true + HostUID *string `json:"hostUid"` + + // Edge native nic + Nic *V1Nic `json:"nic,omitempty"` + + // Deprecated. Edge host nic name + NicName string `json:"nicName,omitempty"` + + // Deprecated. Edge host static IP + StaticIP string `json:"staticIP,omitempty"` + + // Set the edgehost candidate priority as primary or secondary, if the edgehost is nominated as two node candidate + // Enum: [primary secondary] + TwoNodeCandidatePriority string `json:"twoNodeCandidatePriority,omitempty"` +} + +// Validate validates this v1 edge native host +func (m *V1EdgeNativeHost) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateHostAddress(formats); err != nil { + res = append(res, err) + } + + if err := m.validateHostUID(formats); err != nil { + res = append(res, err) + } + + if err := m.validateNic(formats); err != nil { + res = append(res, err) + } + + if err := m.validateTwoNodeCandidatePriority(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1EdgeNativeHost) validateHostAddress(formats strfmt.Registry) error { + + if err := validate.Required("hostAddress", "body", m.HostAddress); err != nil { + return err + } + + return nil +} + +func (m *V1EdgeNativeHost) validateHostUID(formats strfmt.Registry) error { + + if err := validate.Required("hostUid", "body", m.HostUID); err != nil { + return err + } + + return nil +} + +func (m *V1EdgeNativeHost) validateNic(formats strfmt.Registry) error { + + if swag.IsZero(m.Nic) { // not required + return nil + } + + if m.Nic != nil { + if err := m.Nic.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("nic") + } + return err + } + } + + return nil +} + +var v1EdgeNativeHostTypeTwoNodeCandidatePriorityPropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["primary","secondary"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + v1EdgeNativeHostTypeTwoNodeCandidatePriorityPropEnum = append(v1EdgeNativeHostTypeTwoNodeCandidatePriorityPropEnum, v) + } +} + +const ( + + // V1EdgeNativeHostTwoNodeCandidatePriorityPrimary captures enum value "primary" + V1EdgeNativeHostTwoNodeCandidatePriorityPrimary string = "primary" + + // V1EdgeNativeHostTwoNodeCandidatePrioritySecondary captures enum value "secondary" + V1EdgeNativeHostTwoNodeCandidatePrioritySecondary string = "secondary" +) + +// prop value enum +func (m *V1EdgeNativeHost) validateTwoNodeCandidatePriorityEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, v1EdgeNativeHostTypeTwoNodeCandidatePriorityPropEnum, true); err != nil { + return err + } + return nil +} + +func (m *V1EdgeNativeHost) validateTwoNodeCandidatePriority(formats strfmt.Registry) error { + + if swag.IsZero(m.TwoNodeCandidatePriority) { // not required + return nil + } + + // value enum + if err := m.validateTwoNodeCandidatePriorityEnum("twoNodeCandidatePriority", "body", m.TwoNodeCandidatePriority); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1EdgeNativeHost) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1EdgeNativeHost) UnmarshalBinary(b []byte) error { + var res V1EdgeNativeHost + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_edge_native_instance_type.go b/api/models/v1_edge_native_instance_type.go new file mode 100644 index 00000000..54a41740 --- /dev/null +++ b/api/models/v1_edge_native_instance_type.go @@ -0,0 +1,52 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1EdgeNativeInstanceType EdgeNativeInstanceType defines the instance configuration for a docker container node +// +// swagger:model v1EdgeNativeInstanceType +type V1EdgeNativeInstanceType struct { + + // DiskGiB is the size of a virtual machine's disk + DiskGiB int32 `json:"diskGiB,omitempty"` + + // MemoryMiB is the size of a virtual machine's memory, in MiB + MemoryMiB int32 `json:"memoryMiB,omitempty"` + + // Name is the instance name + Name string `json:"name,omitempty"` + + // NumCPUs is the number of CPUs + NumCPUs int32 `json:"numCPUs,omitempty"` +} + +// Validate validates this v1 edge native instance type +func (m *V1EdgeNativeInstanceType) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1EdgeNativeInstanceType) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1EdgeNativeInstanceType) UnmarshalBinary(b []byte) error { + var res V1EdgeNativeInstanceType + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_edge_native_machine.go b/api/models/v1_edge_native_machine.go new file mode 100644 index 00000000..68a55643 --- /dev/null +++ b/api/models/v1_edge_native_machine.go @@ -0,0 +1,127 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1EdgeNativeMachine EdgeNative cloud VM definition +// +// swagger:model v1EdgeNativeMachine +type V1EdgeNativeMachine struct { + + // api version + APIVersion string `json:"apiVersion,omitempty"` + + // kind + Kind string `json:"kind,omitempty"` + + // metadata + Metadata *V1ObjectMeta `json:"metadata,omitempty"` + + // spec + Spec *V1EdgeNativeMachineSpec `json:"spec,omitempty"` + + // status + Status *V1CloudMachineStatus `json:"status,omitempty"` +} + +// Validate validates this v1 edge native machine +func (m *V1EdgeNativeMachine) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSpec(formats); err != nil { + res = append(res, err) + } + + if err := m.validateStatus(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1EdgeNativeMachine) validateMetadata(formats strfmt.Registry) error { + + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } + return err + } + } + + return nil +} + +func (m *V1EdgeNativeMachine) validateSpec(formats strfmt.Registry) error { + + if swag.IsZero(m.Spec) { // not required + return nil + } + + if m.Spec != nil { + if err := m.Spec.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec") + } + return err + } + } + + return nil +} + +func (m *V1EdgeNativeMachine) validateStatus(formats strfmt.Registry) error { + + if swag.IsZero(m.Status) { // not required + return nil + } + + if m.Status != nil { + if err := m.Status.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("status") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1EdgeNativeMachine) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1EdgeNativeMachine) UnmarshalBinary(b []byte) error { + var res V1EdgeNativeMachine + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_edge_native_machine_pool_cloud_config_entity.go b/api/models/v1_edge_native_machine_pool_cloud_config_entity.go new file mode 100644 index 00000000..9eeb2a85 --- /dev/null +++ b/api/models/v1_edge_native_machine_pool_cloud_config_entity.go @@ -0,0 +1,87 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1EdgeNativeMachinePoolCloudConfigEntity v1 edge native machine pool cloud config entity +// +// swagger:model v1EdgeNativeMachinePoolCloudConfigEntity +type V1EdgeNativeMachinePoolCloudConfigEntity struct { + + // edge hosts + // Required: true + // Unique: true + EdgeHosts []*V1EdgeNativeMachinePoolHostEntity `json:"edgeHosts"` +} + +// Validate validates this v1 edge native machine pool cloud config entity +func (m *V1EdgeNativeMachinePoolCloudConfigEntity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateEdgeHosts(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1EdgeNativeMachinePoolCloudConfigEntity) validateEdgeHosts(formats strfmt.Registry) error { + + if err := validate.Required("edgeHosts", "body", m.EdgeHosts); err != nil { + return err + } + + if err := validate.UniqueItems("edgeHosts", "body", m.EdgeHosts); err != nil { + return err + } + + for i := 0; i < len(m.EdgeHosts); i++ { + if swag.IsZero(m.EdgeHosts[i]) { // not required + continue + } + + if m.EdgeHosts[i] != nil { + if err := m.EdgeHosts[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("edgeHosts" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1EdgeNativeMachinePoolCloudConfigEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1EdgeNativeMachinePoolCloudConfigEntity) UnmarshalBinary(b []byte) error { + var res V1EdgeNativeMachinePoolCloudConfigEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_edge_native_machine_pool_config.go b/api/models/v1_edge_native_machine_pool_config.go new file mode 100644 index 00000000..a0171f98 --- /dev/null +++ b/api/models/v1_edge_native_machine_pool_config.go @@ -0,0 +1,197 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1EdgeNativeMachinePoolConfig v1 edge native machine pool config +// +// swagger:model v1EdgeNativeMachinePoolConfig +type V1EdgeNativeMachinePoolConfig struct { + + // AdditionalLabels + AdditionalLabels map[string]string `json:"additionalLabels,omitempty"` + + // AdditionalTags is an optional set of tags to add to resources managed by the provider, in addition to the ones added by default. For eg., tags for EKS nodeGroup or EKS NodegroupIAMRole + AdditionalTags map[string]string `json:"additionalTags,omitempty"` + + // hosts + // Required: true + Hosts []*V1EdgeNativeHost `json:"hosts"` + + // whether this pool is for control plane + IsControlPlane bool `json:"isControlPlane,omitempty"` + + // labels for this pool, example: control-plane/worker, gpu, windows + Labels []string `json:"labels"` + + // machine pool properties + MachinePoolProperties *V1MachinePoolProperties `json:"machinePoolProperties,omitempty"` + + // max size of the pool, for scaling + MaxSize int32 `json:"maxSize,omitempty"` + + // min size of the pool, for scaling + MinSize int32 `json:"minSize,omitempty"` + + // name + Name string `json:"name,omitempty"` + + // Minimum number of seconds a node should be Ready, before the next node is selected for repave. Applicable only for workerpools in infrastructure cluster + NodeRepaveInterval int32 `json:"nodeRepaveInterval,omitempty"` + + // the os type for the pool, must be supported by the provider + OsType string `json:"osType,omitempty"` + + // size of the pool, number of machines + Size int32 `json:"size,omitempty"` + + // control plane or worker taints + Taints []*V1Taint `json:"taints"` + + // rolling update strategy for this machinepool if not specified, will use ScaleOut + UpdateStrategy *V1UpdateStrategy `json:"updateStrategy,omitempty"` + + // if IsControlPlane==true && useControlPlaneAsWorker==true, then will remove control plane taint this will not be used for worker pools + UseControlPlaneAsWorker bool `json:"useControlPlaneAsWorker,omitempty"` +} + +// Validate validates this v1 edge native machine pool config +func (m *V1EdgeNativeMachinePoolConfig) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateHosts(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMachinePoolProperties(formats); err != nil { + res = append(res, err) + } + + if err := m.validateTaints(formats); err != nil { + res = append(res, err) + } + + if err := m.validateUpdateStrategy(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1EdgeNativeMachinePoolConfig) validateHosts(formats strfmt.Registry) error { + + if err := validate.Required("hosts", "body", m.Hosts); err != nil { + return err + } + + for i := 0; i < len(m.Hosts); i++ { + if swag.IsZero(m.Hosts[i]) { // not required + continue + } + + if m.Hosts[i] != nil { + if err := m.Hosts[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("hosts" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1EdgeNativeMachinePoolConfig) validateMachinePoolProperties(formats strfmt.Registry) error { + + if swag.IsZero(m.MachinePoolProperties) { // not required + return nil + } + + if m.MachinePoolProperties != nil { + if err := m.MachinePoolProperties.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("machinePoolProperties") + } + return err + } + } + + return nil +} + +func (m *V1EdgeNativeMachinePoolConfig) validateTaints(formats strfmt.Registry) error { + + if swag.IsZero(m.Taints) { // not required + return nil + } + + for i := 0; i < len(m.Taints); i++ { + if swag.IsZero(m.Taints[i]) { // not required + continue + } + + if m.Taints[i] != nil { + if err := m.Taints[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("taints" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1EdgeNativeMachinePoolConfig) validateUpdateStrategy(formats strfmt.Registry) error { + + if swag.IsZero(m.UpdateStrategy) { // not required + return nil + } + + if m.UpdateStrategy != nil { + if err := m.UpdateStrategy.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("updateStrategy") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1EdgeNativeMachinePoolConfig) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1EdgeNativeMachinePoolConfig) UnmarshalBinary(b []byte) error { + var res V1EdgeNativeMachinePoolConfig + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_edge_native_machine_pool_config_entity.go b/api/models/v1_edge_native_machine_pool_config_entity.go new file mode 100644 index 00000000..ee8a6bdb --- /dev/null +++ b/api/models/v1_edge_native_machine_pool_config_entity.go @@ -0,0 +1,96 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1EdgeNativeMachinePoolConfigEntity v1 edge native machine pool config entity +// +// swagger:model v1EdgeNativeMachinePoolConfigEntity +type V1EdgeNativeMachinePoolConfigEntity struct { + + // cloud config + CloudConfig *V1EdgeNativeMachinePoolCloudConfigEntity `json:"cloudConfig,omitempty"` + + // pool config + PoolConfig *V1MachinePoolConfigEntity `json:"poolConfig,omitempty"` +} + +// Validate validates this v1 edge native machine pool config entity +func (m *V1EdgeNativeMachinePoolConfigEntity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateCloudConfig(formats); err != nil { + res = append(res, err) + } + + if err := m.validatePoolConfig(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1EdgeNativeMachinePoolConfigEntity) validateCloudConfig(formats strfmt.Registry) error { + + if swag.IsZero(m.CloudConfig) { // not required + return nil + } + + if m.CloudConfig != nil { + if err := m.CloudConfig.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("cloudConfig") + } + return err + } + } + + return nil +} + +func (m *V1EdgeNativeMachinePoolConfigEntity) validatePoolConfig(formats strfmt.Registry) error { + + if swag.IsZero(m.PoolConfig) { // not required + return nil + } + + if m.PoolConfig != nil { + if err := m.PoolConfig.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("poolConfig") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1EdgeNativeMachinePoolConfigEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1EdgeNativeMachinePoolConfigEntity) UnmarshalBinary(b []byte) error { + var res V1EdgeNativeMachinePoolConfigEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_edge_native_machine_pool_host_entity.go b/api/models/v1_edge_native_machine_pool_host_entity.go new file mode 100644 index 00000000..b0f01640 --- /dev/null +++ b/api/models/v1_edge_native_machine_pool_host_entity.go @@ -0,0 +1,151 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "encoding/json" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1EdgeNativeMachinePoolHostEntity v1 edge native machine pool host entity +// +// swagger:model v1EdgeNativeMachinePoolHostEntity +type V1EdgeNativeMachinePoolHostEntity struct { + + // Edge host name + HostName string `json:"hostName,omitempty"` + + // Edge host id + // Required: true + HostUID *string `json:"hostUid"` + + // Edge native nic + Nic *V1Nic `json:"nic,omitempty"` + + // Deprecated - Edge host nic name + NicName string `json:"nicName,omitempty"` + + // Deprecated - Edge host static IP + StaticIP string `json:"staticIP,omitempty"` + + // Set the edgehost candidate priority as primary or secondary, if the edgehost is nominated as two node candidate + // Enum: [primary secondary] + TwoNodeCandidatePriority string `json:"twoNodeCandidatePriority,omitempty"` +} + +// Validate validates this v1 edge native machine pool host entity +func (m *V1EdgeNativeMachinePoolHostEntity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateHostUID(formats); err != nil { + res = append(res, err) + } + + if err := m.validateNic(formats); err != nil { + res = append(res, err) + } + + if err := m.validateTwoNodeCandidatePriority(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1EdgeNativeMachinePoolHostEntity) validateHostUID(formats strfmt.Registry) error { + + if err := validate.Required("hostUid", "body", m.HostUID); err != nil { + return err + } + + return nil +} + +func (m *V1EdgeNativeMachinePoolHostEntity) validateNic(formats strfmt.Registry) error { + + if swag.IsZero(m.Nic) { // not required + return nil + } + + if m.Nic != nil { + if err := m.Nic.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("nic") + } + return err + } + } + + return nil +} + +var v1EdgeNativeMachinePoolHostEntityTypeTwoNodeCandidatePriorityPropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["primary","secondary"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + v1EdgeNativeMachinePoolHostEntityTypeTwoNodeCandidatePriorityPropEnum = append(v1EdgeNativeMachinePoolHostEntityTypeTwoNodeCandidatePriorityPropEnum, v) + } +} + +const ( + + // V1EdgeNativeMachinePoolHostEntityTwoNodeCandidatePriorityPrimary captures enum value "primary" + V1EdgeNativeMachinePoolHostEntityTwoNodeCandidatePriorityPrimary string = "primary" + + // V1EdgeNativeMachinePoolHostEntityTwoNodeCandidatePrioritySecondary captures enum value "secondary" + V1EdgeNativeMachinePoolHostEntityTwoNodeCandidatePrioritySecondary string = "secondary" +) + +// prop value enum +func (m *V1EdgeNativeMachinePoolHostEntity) validateTwoNodeCandidatePriorityEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, v1EdgeNativeMachinePoolHostEntityTypeTwoNodeCandidatePriorityPropEnum, true); err != nil { + return err + } + return nil +} + +func (m *V1EdgeNativeMachinePoolHostEntity) validateTwoNodeCandidatePriority(formats strfmt.Registry) error { + + if swag.IsZero(m.TwoNodeCandidatePriority) { // not required + return nil + } + + // value enum + if err := m.validateTwoNodeCandidatePriorityEnum("twoNodeCandidatePriority", "body", m.TwoNodeCandidatePriority); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1EdgeNativeMachinePoolHostEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1EdgeNativeMachinePoolHostEntity) UnmarshalBinary(b []byte) error { + var res V1EdgeNativeMachinePoolHostEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_edge_native_machine_spec.go b/api/models/v1_edge_native_machine_spec.go new file mode 100644 index 00000000..c3eb98ee --- /dev/null +++ b/api/models/v1_edge_native_machine_spec.go @@ -0,0 +1,114 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1EdgeNativeMachineSpec EdgeNative cloud VM definition spec +// +// swagger:model v1EdgeNativeMachineSpec +type V1EdgeNativeMachineSpec struct { + + // edge host Uid + EdgeHostUID string `json:"edgeHostUid,omitempty"` + + // instance type + InstanceType *V1EdgeNativeInstanceType `json:"instanceType,omitempty"` + + // nics + // Unique: true + Nics []*V1EdgeNativeNic `json:"nics"` +} + +// Validate validates this v1 edge native machine spec +func (m *V1EdgeNativeMachineSpec) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateInstanceType(formats); err != nil { + res = append(res, err) + } + + if err := m.validateNics(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1EdgeNativeMachineSpec) validateInstanceType(formats strfmt.Registry) error { + + if swag.IsZero(m.InstanceType) { // not required + return nil + } + + if m.InstanceType != nil { + if err := m.InstanceType.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("instanceType") + } + return err + } + } + + return nil +} + +func (m *V1EdgeNativeMachineSpec) validateNics(formats strfmt.Registry) error { + + if swag.IsZero(m.Nics) { // not required + return nil + } + + if err := validate.UniqueItems("nics", "body", m.Nics); err != nil { + return err + } + + for i := 0; i < len(m.Nics); i++ { + if swag.IsZero(m.Nics[i]) { // not required + continue + } + + if m.Nics[i] != nil { + if err := m.Nics[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("nics" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1EdgeNativeMachineSpec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1EdgeNativeMachineSpec) UnmarshalBinary(b []byte) error { + var res V1EdgeNativeMachineSpec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_edge_native_machines.go b/api/models/v1_edge_native_machines.go new file mode 100644 index 00000000..05075911 --- /dev/null +++ b/api/models/v1_edge_native_machines.go @@ -0,0 +1,87 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1EdgeNativeMachines EdgeNative machine list +// +// swagger:model v1EdgeNativeMachines +type V1EdgeNativeMachines struct { + + // items + // Required: true + // Unique: true + Items []*V1EdgeNativeMachine `json:"items"` +} + +// Validate validates this v1 edge native machines +func (m *V1EdgeNativeMachines) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateItems(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1EdgeNativeMachines) validateItems(formats strfmt.Registry) error { + + if err := validate.Required("items", "body", m.Items); err != nil { + return err + } + + if err := validate.UniqueItems("items", "body", m.Items); err != nil { + return err + } + + for i := 0; i < len(m.Items); i++ { + if swag.IsZero(m.Items[i]) { // not required + continue + } + + if m.Items[i] != nil { + if err := m.Items[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("items" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1EdgeNativeMachines) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1EdgeNativeMachines) UnmarshalBinary(b []byte) error { + var res V1EdgeNativeMachines + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_edge_native_nic.go b/api/models/v1_edge_native_nic.go new file mode 100644 index 00000000..d623afcb --- /dev/null +++ b/api/models/v1_edge_native_nic.go @@ -0,0 +1,52 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1EdgeNativeNic Generic network interface +// +// swagger:model v1EdgeNativeNic +type V1EdgeNativeNic struct { + + // index + Index int8 `json:"index,omitempty"` + + // network name + NetworkName string `json:"networkName,omitempty"` + + // private i ps + PrivateIPs []string `json:"privateIPs"` + + // public Ip + PublicIP string `json:"publicIp,omitempty"` +} + +// Validate validates this v1 edge native nic +func (m *V1EdgeNativeNic) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1EdgeNativeNic) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1EdgeNativeNic) UnmarshalBinary(b []byte) error { + var res V1EdgeNativeNic + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_edge_native_overlay_network_configuration.go b/api/models/v1_edge_native_overlay_network_configuration.go new file mode 100644 index 00000000..4d2e9f8f --- /dev/null +++ b/api/models/v1_edge_native_overlay_network_configuration.go @@ -0,0 +1,46 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1EdgeNativeOverlayNetworkConfiguration v1 edge native overlay network configuration +// +// swagger:model v1EdgeNativeOverlayNetworkConfiguration +type V1EdgeNativeOverlayNetworkConfiguration struct { + + // CIDR is the CIDR of the overlay network + Cidr string `json:"cidr,omitempty"` + + // Enable is a flag to enable overlay network + Enable bool `json:"enable"` +} + +// Validate validates this v1 edge native overlay network configuration +func (m *V1EdgeNativeOverlayNetworkConfiguration) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1EdgeNativeOverlayNetworkConfiguration) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1EdgeNativeOverlayNetworkConfiguration) UnmarshalBinary(b []byte) error { + var res V1EdgeNativeOverlayNetworkConfiguration + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_edge_token.go b/api/models/v1_edge_token.go new file mode 100644 index 00000000..627f5f06 --- /dev/null +++ b/api/models/v1_edge_token.go @@ -0,0 +1,121 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1EdgeToken Edge token information +// +// swagger:model v1EdgeToken +type V1EdgeToken struct { + + // metadata + Metadata *V1ObjectMeta `json:"metadata,omitempty"` + + // spec + Spec *V1EdgeTokenSpec `json:"spec,omitempty"` + + // status + Status *V1EdgeTokenStatus `json:"status,omitempty"` +} + +// Validate validates this v1 edge token +func (m *V1EdgeToken) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSpec(formats); err != nil { + res = append(res, err) + } + + if err := m.validateStatus(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1EdgeToken) validateMetadata(formats strfmt.Registry) error { + + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } + return err + } + } + + return nil +} + +func (m *V1EdgeToken) validateSpec(formats strfmt.Registry) error { + + if swag.IsZero(m.Spec) { // not required + return nil + } + + if m.Spec != nil { + if err := m.Spec.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec") + } + return err + } + } + + return nil +} + +func (m *V1EdgeToken) validateStatus(formats strfmt.Registry) error { + + if swag.IsZero(m.Status) { // not required + return nil + } + + if m.Status != nil { + if err := m.Status.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("status") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1EdgeToken) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1EdgeToken) UnmarshalBinary(b []byte) error { + var res V1EdgeToken + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_edge_token_active_state.go b/api/models/v1_edge_token_active_state.go new file mode 100644 index 00000000..ea783cf1 --- /dev/null +++ b/api/models/v1_edge_token_active_state.go @@ -0,0 +1,43 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1EdgeTokenActiveState Edge token active state +// +// swagger:model v1EdgeTokenActiveState +type V1EdgeTokenActiveState struct { + + // Set to 'true', if the token is active + IsActive bool `json:"isActive,omitempty"` +} + +// Validate validates this v1 edge token active state +func (m *V1EdgeTokenActiveState) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1EdgeTokenActiveState) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1EdgeTokenActiveState) UnmarshalBinary(b []byte) error { + var res V1EdgeTokenActiveState + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_edge_token_entity.go b/api/models/v1_edge_token_entity.go new file mode 100644 index 00000000..bb7600a1 --- /dev/null +++ b/api/models/v1_edge_token_entity.go @@ -0,0 +1,96 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1EdgeTokenEntity Edge token request payload +// +// swagger:model v1EdgeTokenEntity +type V1EdgeTokenEntity struct { + + // metadata + Metadata *V1ObjectMeta `json:"metadata,omitempty"` + + // spec + Spec *V1EdgeTokenSpecEntity `json:"spec,omitempty"` +} + +// Validate validates this v1 edge token entity +func (m *V1EdgeTokenEntity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSpec(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1EdgeTokenEntity) validateMetadata(formats strfmt.Registry) error { + + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } + return err + } + } + + return nil +} + +func (m *V1EdgeTokenEntity) validateSpec(formats strfmt.Registry) error { + + if swag.IsZero(m.Spec) { // not required + return nil + } + + if m.Spec != nil { + if err := m.Spec.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1EdgeTokenEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1EdgeTokenEntity) UnmarshalBinary(b []byte) error { + var res V1EdgeTokenEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_edge_token_project.go b/api/models/v1_edge_token_project.go new file mode 100644 index 00000000..06bfdd93 --- /dev/null +++ b/api/models/v1_edge_token_project.go @@ -0,0 +1,46 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1EdgeTokenProject Edge token project information +// +// swagger:model v1EdgeTokenProject +type V1EdgeTokenProject struct { + + // Project name + Name string `json:"name,omitempty"` + + // Project uid + UID string `json:"uid,omitempty"` +} + +// Validate validates this v1 edge token project +func (m *V1EdgeTokenProject) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1EdgeTokenProject) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1EdgeTokenProject) UnmarshalBinary(b []byte) error { + var res V1EdgeTokenProject + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_edge_token_spec.go b/api/models/v1_edge_token_spec.go new file mode 100644 index 00000000..bd28721d --- /dev/null +++ b/api/models/v1_edge_token_spec.go @@ -0,0 +1,98 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1EdgeTokenSpec Edge token specification +// +// swagger:model v1EdgeTokenSpec +type V1EdgeTokenSpec struct { + + // Default project where the edgehost will be placed on the token authorization + DefaultProject *V1EdgeTokenProject `json:"defaultProject,omitempty"` + + // Edge token expiry date + // Format: date-time + Expiry V1Time `json:"expiry,omitempty"` + + // Edge token + Token string `json:"token,omitempty"` +} + +// Validate validates this v1 edge token spec +func (m *V1EdgeTokenSpec) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateDefaultProject(formats); err != nil { + res = append(res, err) + } + + if err := m.validateExpiry(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1EdgeTokenSpec) validateDefaultProject(formats strfmt.Registry) error { + + if swag.IsZero(m.DefaultProject) { // not required + return nil + } + + if m.DefaultProject != nil { + if err := m.DefaultProject.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("defaultProject") + } + return err + } + } + + return nil +} + +func (m *V1EdgeTokenSpec) validateExpiry(formats strfmt.Registry) error { + + if swag.IsZero(m.Expiry) { // not required + return nil + } + + if err := m.Expiry.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("expiry") + } + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1EdgeTokenSpec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1EdgeTokenSpec) UnmarshalBinary(b []byte) error { + var res V1EdgeTokenSpec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_edge_token_spec_entity.go b/api/models/v1_edge_token_spec_entity.go new file mode 100644 index 00000000..5db16364 --- /dev/null +++ b/api/models/v1_edge_token_spec_entity.go @@ -0,0 +1,73 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1EdgeTokenSpecEntity Edge token specification +// +// swagger:model v1EdgeTokenSpecEntity +type V1EdgeTokenSpecEntity struct { + + // Default project where the edgehost will be placed on the token authorization + DefaultProjectUID string `json:"defaultProjectUid,omitempty"` + + // Edge token expiry date + // Format: date-time + Expiry V1Time `json:"expiry,omitempty"` +} + +// Validate validates this v1 edge token spec entity +func (m *V1EdgeTokenSpecEntity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateExpiry(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1EdgeTokenSpecEntity) validateExpiry(formats strfmt.Registry) error { + + if swag.IsZero(m.Expiry) { // not required + return nil + } + + if err := m.Expiry.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("expiry") + } + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1EdgeTokenSpecEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1EdgeTokenSpecEntity) UnmarshalBinary(b []byte) error { + var res V1EdgeTokenSpecEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_edge_token_spec_update.go b/api/models/v1_edge_token_spec_update.go new file mode 100644 index 00000000..e29ab4ec --- /dev/null +++ b/api/models/v1_edge_token_spec_update.go @@ -0,0 +1,73 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1EdgeTokenSpecUpdate Edge token spec to be updated +// +// swagger:model v1EdgeTokenSpecUpdate +type V1EdgeTokenSpecUpdate struct { + + // Default project where the edgehost will be placed on the token authorization + DefaultProjectUID string `json:"defaultProjectUid,omitempty"` + + // expiry + // Format: date-time + Expiry V1Time `json:"expiry,omitempty"` +} + +// Validate validates this v1 edge token spec update +func (m *V1EdgeTokenSpecUpdate) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateExpiry(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1EdgeTokenSpecUpdate) validateExpiry(formats strfmt.Registry) error { + + if swag.IsZero(m.Expiry) { // not required + return nil + } + + if err := m.Expiry.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("expiry") + } + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1EdgeTokenSpecUpdate) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1EdgeTokenSpecUpdate) UnmarshalBinary(b []byte) error { + var res V1EdgeTokenSpecUpdate + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_edge_token_status.go b/api/models/v1_edge_token_status.go new file mode 100644 index 00000000..0431730e --- /dev/null +++ b/api/models/v1_edge_token_status.go @@ -0,0 +1,43 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1EdgeTokenStatus Edge token status +// +// swagger:model v1EdgeTokenStatus +type V1EdgeTokenStatus struct { + + // Set to 'true', if the token is active + IsActive bool `json:"isActive"` +} + +// Validate validates this v1 edge token status +func (m *V1EdgeTokenStatus) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1EdgeTokenStatus) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1EdgeTokenStatus) UnmarshalBinary(b []byte) error { + var res V1EdgeTokenStatus + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_edge_token_update.go b/api/models/v1_edge_token_update.go new file mode 100644 index 00000000..63863ebc --- /dev/null +++ b/api/models/v1_edge_token_update.go @@ -0,0 +1,96 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1EdgeTokenUpdate Edge token update request payload +// +// swagger:model v1EdgeTokenUpdate +type V1EdgeTokenUpdate struct { + + // metadata + Metadata *V1ObjectMeta `json:"metadata,omitempty"` + + // spec + Spec *V1EdgeTokenSpecUpdate `json:"spec,omitempty"` +} + +// Validate validates this v1 edge token update +func (m *V1EdgeTokenUpdate) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSpec(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1EdgeTokenUpdate) validateMetadata(formats strfmt.Registry) error { + + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } + return err + } + } + + return nil +} + +func (m *V1EdgeTokenUpdate) validateSpec(formats strfmt.Registry) error { + + if swag.IsZero(m.Spec) { // not required + return nil + } + + if m.Spec != nil { + if err := m.Spec.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1EdgeTokenUpdate) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1EdgeTokenUpdate) UnmarshalBinary(b []byte) error { + var res V1EdgeTokenUpdate + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_edge_tokens.go b/api/models/v1_edge_tokens.go new file mode 100644 index 00000000..fa2b2ca6 --- /dev/null +++ b/api/models/v1_edge_tokens.go @@ -0,0 +1,87 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1EdgeTokens v1 edge tokens +// +// swagger:model v1EdgeTokens +type V1EdgeTokens struct { + + // List of edge tokens + // Required: true + // Unique: true + Items []*V1EdgeToken `json:"items"` +} + +// Validate validates this v1 edge tokens +func (m *V1EdgeTokens) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateItems(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1EdgeTokens) validateItems(formats strfmt.Registry) error { + + if err := validate.Required("items", "body", m.Items); err != nil { + return err + } + + if err := validate.UniqueItems("items", "body", m.Items); err != nil { + return err + } + + for i := 0; i < len(m.Items); i++ { + if swag.IsZero(m.Items[i]) { // not required + continue + } + + if m.Items[i] != nil { + if err := m.Items[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("items" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1EdgeTokens) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1EdgeTokens) UnmarshalBinary(b []byte) error { + var res V1EdgeTokens + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_eks_addon.go b/api/models/v1_eks_addon.go new file mode 100644 index 00000000..d27179d5 --- /dev/null +++ b/api/models/v1_eks_addon.go @@ -0,0 +1,87 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1EksAddon EksAddon represents a EKS addon +// +// swagger:model v1EksAddon +type V1EksAddon struct { + + // ConflictResolution is used to declare what should happen if there are parameter conflicts. + ConflictResolution string `json:"conflictResolution,omitempty"` + + // Name is the name of the addon + // Required: true + Name *string `json:"name"` + + // ServiceAccountRoleArn is the ARN of an IAM role to bind to the addons service account + ServiceAccountRoleARN string `json:"serviceAccountRoleARN,omitempty"` + + // Version is the version of the addon to use + // Required: true + Version *string `json:"version"` +} + +// Validate validates this v1 eks addon +func (m *V1EksAddon) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateName(formats); err != nil { + res = append(res, err) + } + + if err := m.validateVersion(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1EksAddon) validateName(formats strfmt.Registry) error { + + if err := validate.Required("name", "body", m.Name); err != nil { + return err + } + + return nil +} + +func (m *V1EksAddon) validateVersion(formats strfmt.Registry) error { + + if err := validate.Required("version", "body", m.Version); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1EksAddon) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1EksAddon) UnmarshalBinary(b []byte) error { + var res V1EksAddon + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_eks_cloud_cluster_config_entity.go b/api/models/v1_eks_cloud_cluster_config_entity.go new file mode 100644 index 00000000..2f07e757 --- /dev/null +++ b/api/models/v1_eks_cloud_cluster_config_entity.go @@ -0,0 +1,71 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1EksCloudClusterConfigEntity EKS cloud cluster config entity +// +// swagger:model v1EksCloudClusterConfigEntity +type V1EksCloudClusterConfigEntity struct { + + // cluster config + ClusterConfig *V1EksClusterConfig `json:"clusterConfig,omitempty"` +} + +// Validate validates this v1 eks cloud cluster config entity +func (m *V1EksCloudClusterConfigEntity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateClusterConfig(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1EksCloudClusterConfigEntity) validateClusterConfig(formats strfmt.Registry) error { + + if swag.IsZero(m.ClusterConfig) { // not required + return nil + } + + if m.ClusterConfig != nil { + if err := m.ClusterConfig.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("clusterConfig") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1EksCloudClusterConfigEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1EksCloudClusterConfigEntity) UnmarshalBinary(b []byte) error { + var res V1EksCloudClusterConfigEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_eks_cloud_config.go b/api/models/v1_eks_cloud_config.go new file mode 100644 index 00000000..b6b1e12f --- /dev/null +++ b/api/models/v1_eks_cloud_config.go @@ -0,0 +1,102 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1EksCloudConfig EksCloudConfig is the Schema for the ekscloudconfigs API +// +// swagger:model v1EksCloudConfig +type V1EksCloudConfig struct { + + // APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + APIVersion string `json:"apiVersion,omitempty"` + + // Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + Kind string `json:"kind,omitempty"` + + // metadata + Metadata *V1ObjectMeta `json:"metadata,omitempty"` + + // spec + Spec *V1EksCloudConfigSpec `json:"spec,omitempty"` +} + +// Validate validates this v1 eks cloud config +func (m *V1EksCloudConfig) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSpec(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1EksCloudConfig) validateMetadata(formats strfmt.Registry) error { + + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } + return err + } + } + + return nil +} + +func (m *V1EksCloudConfig) validateSpec(formats strfmt.Registry) error { + + if swag.IsZero(m.Spec) { // not required + return nil + } + + if m.Spec != nil { + if err := m.Spec.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1EksCloudConfig) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1EksCloudConfig) UnmarshalBinary(b []byte) error { + var res V1EksCloudConfig + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_eks_cloud_config_spec.go b/api/models/v1_eks_cloud_config_spec.go new file mode 100644 index 00000000..75bd9066 --- /dev/null +++ b/api/models/v1_eks_cloud_config_spec.go @@ -0,0 +1,162 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1EksCloudConfigSpec EksCloudConfigSpec defines the cloud configuration input by user +// +// swagger:model v1EksCloudConfigSpec +type V1EksCloudConfigSpec struct { + + // cloudAccountRef should point to the secret which contains EksCloudAccount + CloudAccountRef *V1ObjectReference `json:"cloudAccountRef,omitempty"` + + // cluster config + ClusterConfig *V1EksClusterConfig `json:"clusterConfig,omitempty"` + + // fargate profiles + FargateProfiles []*V1FargateProfile `json:"fargateProfiles"` + + // machine pool config + MachinePoolConfig []*V1EksMachinePoolConfig `json:"machinePoolConfig"` +} + +// Validate validates this v1 eks cloud config spec +func (m *V1EksCloudConfigSpec) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateCloudAccountRef(formats); err != nil { + res = append(res, err) + } + + if err := m.validateClusterConfig(formats); err != nil { + res = append(res, err) + } + + if err := m.validateFargateProfiles(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMachinePoolConfig(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1EksCloudConfigSpec) validateCloudAccountRef(formats strfmt.Registry) error { + + if swag.IsZero(m.CloudAccountRef) { // not required + return nil + } + + if m.CloudAccountRef != nil { + if err := m.CloudAccountRef.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("cloudAccountRef") + } + return err + } + } + + return nil +} + +func (m *V1EksCloudConfigSpec) validateClusterConfig(formats strfmt.Registry) error { + + if swag.IsZero(m.ClusterConfig) { // not required + return nil + } + + if m.ClusterConfig != nil { + if err := m.ClusterConfig.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("clusterConfig") + } + return err + } + } + + return nil +} + +func (m *V1EksCloudConfigSpec) validateFargateProfiles(formats strfmt.Registry) error { + + if swag.IsZero(m.FargateProfiles) { // not required + return nil + } + + for i := 0; i < len(m.FargateProfiles); i++ { + if swag.IsZero(m.FargateProfiles[i]) { // not required + continue + } + + if m.FargateProfiles[i] != nil { + if err := m.FargateProfiles[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("fargateProfiles" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1EksCloudConfigSpec) validateMachinePoolConfig(formats strfmt.Registry) error { + + if swag.IsZero(m.MachinePoolConfig) { // not required + return nil + } + + for i := 0; i < len(m.MachinePoolConfig); i++ { + if swag.IsZero(m.MachinePoolConfig[i]) { // not required + continue + } + + if m.MachinePoolConfig[i] != nil { + if err := m.MachinePoolConfig[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("machinePoolConfig" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1EksCloudConfigSpec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1EksCloudConfigSpec) UnmarshalBinary(b []byte) error { + var res V1EksCloudConfigSpec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_eks_cluster_config.go b/api/models/v1_eks_cluster_config.go new file mode 100644 index 00000000..0d52fb7f --- /dev/null +++ b/api/models/v1_eks_cluster_config.go @@ -0,0 +1,160 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1EksClusterConfig EksClusterConfig defines EKS specific config +// +// swagger:model v1EksClusterConfig +type V1EksClusterConfig struct { + + // Addons defines the EKS addons to enable with the EKS cluster. This may be required for brownfield clusters + Addons []*V1EksAddon `json:"addons"` + + // BastionDisabled is the option to disable bastion node + BastionDisabled bool `json:"bastionDisabled,omitempty"` + + // ControlPlaneLoadBalancer specifies how API server elb will be configured, this field is optional, not provided, "", default => "Internet-facing" "Internet-facing" => "Internet-facing" "internal" => "internal" For spectro saas setup we require to talk to the apiserver from our cluster so ControlPlaneLoadBalancer should be "", not provided or "Internet-facing" + ControlPlaneLoadBalancer string `json:"controlPlaneLoadBalancer,omitempty"` + + // EncryptionConfig specifies the encryption configuration for the cluster + EncryptionConfig *V1EncryptionConfig `json:"encryptionConfig,omitempty"` + + // Endpoints specifies access to this cluster's control plane endpoints + EndpointAccess *V1EksClusterConfigEndpointAccess `json:"endpointAccess,omitempty"` + + // The AWS Region the cluster lives in. + // Required: true + Region *string `json:"region"` + + // SSHKeyName specifies which EC2 SSH key can be used to access machines. + SSHKeyName string `json:"sshKeyName,omitempty"` + + // VPC Id to deploy cluster into should have one public and one private subnet for the the cluster creation, this field is optional, If VPC Id is not provided a fully managed VPC will be created + VpcID string `json:"vpcId,omitempty"` +} + +// Validate validates this v1 eks cluster config +func (m *V1EksClusterConfig) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateAddons(formats); err != nil { + res = append(res, err) + } + + if err := m.validateEncryptionConfig(formats); err != nil { + res = append(res, err) + } + + if err := m.validateEndpointAccess(formats); err != nil { + res = append(res, err) + } + + if err := m.validateRegion(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1EksClusterConfig) validateAddons(formats strfmt.Registry) error { + + if swag.IsZero(m.Addons) { // not required + return nil + } + + for i := 0; i < len(m.Addons); i++ { + if swag.IsZero(m.Addons[i]) { // not required + continue + } + + if m.Addons[i] != nil { + if err := m.Addons[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("addons" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1EksClusterConfig) validateEncryptionConfig(formats strfmt.Registry) error { + + if swag.IsZero(m.EncryptionConfig) { // not required + return nil + } + + if m.EncryptionConfig != nil { + if err := m.EncryptionConfig.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("encryptionConfig") + } + return err + } + } + + return nil +} + +func (m *V1EksClusterConfig) validateEndpointAccess(formats strfmt.Registry) error { + + if swag.IsZero(m.EndpointAccess) { // not required + return nil + } + + if m.EndpointAccess != nil { + if err := m.EndpointAccess.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("endpointAccess") + } + return err + } + } + + return nil +} + +func (m *V1EksClusterConfig) validateRegion(formats strfmt.Registry) error { + + if err := validate.Required("region", "body", m.Region); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1EksClusterConfig) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1EksClusterConfig) UnmarshalBinary(b []byte) error { + var res V1EksClusterConfig + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_eks_cluster_config_endpoint_access.go b/api/models/v1_eks_cluster_config_endpoint_access.go new file mode 100644 index 00000000..c8093280 --- /dev/null +++ b/api/models/v1_eks_cluster_config_endpoint_access.go @@ -0,0 +1,52 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1EksClusterConfigEndpointAccess EndpointAccess specifies how control plane endpoints are accessible +// +// swagger:model v1EksClusterConfigEndpointAccess +type V1EksClusterConfigEndpointAccess struct { + + // Private points VPC-internal control plane access to the private endpoint + Private bool `json:"private,omitempty"` + + // PrivateCIDRs specifies which blocks can access the private endpoint + PrivateCIDRs []string `json:"privateCIDRs"` + + // Public controls whether control plane endpoints are publicly accessible + Public bool `json:"public,omitempty"` + + // PublicCIDRs specifies which blocks can access the public endpoint + PublicCIDRs []string `json:"publicCIDRs"` +} + +// Validate validates this v1 eks cluster config endpoint access +func (m *V1EksClusterConfigEndpointAccess) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1EksClusterConfigEndpointAccess) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1EksClusterConfigEndpointAccess) UnmarshalBinary(b []byte) error { + var res V1EksClusterConfigEndpointAccess + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_eks_fargate_profiles.go b/api/models/v1_eks_fargate_profiles.go new file mode 100644 index 00000000..40b8b068 --- /dev/null +++ b/api/models/v1_eks_fargate_profiles.go @@ -0,0 +1,80 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1EksFargateProfiles Fargate profiles +// +// swagger:model v1EksFargateProfiles +type V1EksFargateProfiles struct { + + // fargate profiles + FargateProfiles []*V1FargateProfile `json:"fargateProfiles"` +} + +// Validate validates this v1 eks fargate profiles +func (m *V1EksFargateProfiles) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateFargateProfiles(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1EksFargateProfiles) validateFargateProfiles(formats strfmt.Registry) error { + + if swag.IsZero(m.FargateProfiles) { // not required + return nil + } + + for i := 0; i < len(m.FargateProfiles); i++ { + if swag.IsZero(m.FargateProfiles[i]) { // not required + continue + } + + if m.FargateProfiles[i] != nil { + if err := m.FargateProfiles[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("fargateProfiles" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1EksFargateProfiles) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1EksFargateProfiles) UnmarshalBinary(b []byte) error { + var res V1EksFargateProfiles + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_eks_machine_cloud_config_entity.go b/api/models/v1_eks_machine_cloud_config_entity.go new file mode 100644 index 00000000..d89c3e2e --- /dev/null +++ b/api/models/v1_eks_machine_cloud_config_entity.go @@ -0,0 +1,218 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "encoding/json" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1EksMachineCloudConfigEntity v1 eks machine cloud config entity +// +// swagger:model v1EksMachineCloudConfigEntity +type V1EksMachineCloudConfigEntity struct { + + // aws launch template + AwsLaunchTemplate *V1AwsLaunchTemplate `json:"awsLaunchTemplate,omitempty"` + + // azs + Azs []string `json:"azs"` + + // EC2 instance capacity type + // Enum: [on-demand spot] + CapacityType *string `json:"capacityType,omitempty"` + + // flag to know if aws launch template is enabled + EnableAwsLaunchTemplate bool `json:"enableAwsLaunchTemplate,omitempty"` + + // instance type + InstanceType string `json:"instanceType,omitempty"` + + // rootDeviceSize in GBs + // Maximum: 2000 + // Minimum: 1 + RootDeviceSize int64 `json:"rootDeviceSize,omitempty"` + + // SpotMarketOptions allows users to configure instances to be run using AWS Spot instances. + SpotMarketOptions *V1SpotMarketOptions `json:"spotMarketOptions,omitempty"` + + // subnets + Subnets []*V1EksSubnetEntity `json:"subnets"` +} + +// Validate validates this v1 eks machine cloud config entity +func (m *V1EksMachineCloudConfigEntity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateAwsLaunchTemplate(formats); err != nil { + res = append(res, err) + } + + if err := m.validateCapacityType(formats); err != nil { + res = append(res, err) + } + + if err := m.validateRootDeviceSize(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSpotMarketOptions(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSubnets(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1EksMachineCloudConfigEntity) validateAwsLaunchTemplate(formats strfmt.Registry) error { + + if swag.IsZero(m.AwsLaunchTemplate) { // not required + return nil + } + + if m.AwsLaunchTemplate != nil { + if err := m.AwsLaunchTemplate.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("awsLaunchTemplate") + } + return err + } + } + + return nil +} + +var v1EksMachineCloudConfigEntityTypeCapacityTypePropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["on-demand","spot"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + v1EksMachineCloudConfigEntityTypeCapacityTypePropEnum = append(v1EksMachineCloudConfigEntityTypeCapacityTypePropEnum, v) + } +} + +const ( + + // V1EksMachineCloudConfigEntityCapacityTypeOnDemand captures enum value "on-demand" + V1EksMachineCloudConfigEntityCapacityTypeOnDemand string = "on-demand" + + // V1EksMachineCloudConfigEntityCapacityTypeSpot captures enum value "spot" + V1EksMachineCloudConfigEntityCapacityTypeSpot string = "spot" +) + +// prop value enum +func (m *V1EksMachineCloudConfigEntity) validateCapacityTypeEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, v1EksMachineCloudConfigEntityTypeCapacityTypePropEnum, true); err != nil { + return err + } + return nil +} + +func (m *V1EksMachineCloudConfigEntity) validateCapacityType(formats strfmt.Registry) error { + + if swag.IsZero(m.CapacityType) { // not required + return nil + } + + // value enum + if err := m.validateCapacityTypeEnum("capacityType", "body", *m.CapacityType); err != nil { + return err + } + + return nil +} + +func (m *V1EksMachineCloudConfigEntity) validateRootDeviceSize(formats strfmt.Registry) error { + + if swag.IsZero(m.RootDeviceSize) { // not required + return nil + } + + if err := validate.MinimumInt("rootDeviceSize", "body", int64(m.RootDeviceSize), 1, false); err != nil { + return err + } + + if err := validate.MaximumInt("rootDeviceSize", "body", int64(m.RootDeviceSize), 2000, false); err != nil { + return err + } + + return nil +} + +func (m *V1EksMachineCloudConfigEntity) validateSpotMarketOptions(formats strfmt.Registry) error { + + if swag.IsZero(m.SpotMarketOptions) { // not required + return nil + } + + if m.SpotMarketOptions != nil { + if err := m.SpotMarketOptions.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spotMarketOptions") + } + return err + } + } + + return nil +} + +func (m *V1EksMachineCloudConfigEntity) validateSubnets(formats strfmt.Registry) error { + + if swag.IsZero(m.Subnets) { // not required + return nil + } + + for i := 0; i < len(m.Subnets); i++ { + if swag.IsZero(m.Subnets[i]) { // not required + continue + } + + if m.Subnets[i] != nil { + if err := m.Subnets[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("subnets" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1EksMachineCloudConfigEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1EksMachineCloudConfigEntity) UnmarshalBinary(b []byte) error { + var res V1EksMachineCloudConfigEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_eks_machine_pool_config.go b/api/models/v1_eks_machine_pool_config.go new file mode 100644 index 00000000..4f875307 --- /dev/null +++ b/api/models/v1_eks_machine_pool_config.go @@ -0,0 +1,322 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "encoding/json" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1EksMachinePoolConfig v1 eks machine pool config +// +// swagger:model v1EksMachinePoolConfig +type V1EksMachinePoolConfig struct { + + // additionalLabels + AdditionalLabels map[string]string `json:"additionalLabels,omitempty"` + + // AdditionalTags is an optional set of tags to add to resources managed by the provider, in addition to the ones added by default. For eg., tags for EKS nodeGroup or EKS NodegroupIAMRole + AdditionalTags map[string]string `json:"additionalTags,omitempty"` + + // aws launch template + AwsLaunchTemplate *V1AwsLaunchTemplate `json:"awsLaunchTemplate,omitempty"` + + // AZs is only used for dynamic placement + Azs []string `json:"azs"` + + // EC2 instance capacity type + // Enum: [on-demand spot] + CapacityType *string `json:"capacityType,omitempty"` + + // flag to know if aws launch template is enabled + EnableAwsLaunchTemplate bool `json:"enableAwsLaunchTemplate,omitempty"` + + // instance config + InstanceConfig *V1InstanceConfig `json:"instanceConfig,omitempty"` + + // instance type + InstanceType string `json:"instanceType,omitempty"` + + // whether this pool is for control plane + // Required: true + IsControlPlane *bool `json:"isControlPlane"` + + // labels for this pool, example: control-plane/worker, gpu, windows + Labels []string `json:"labels"` + + // machine pool properties + MachinePoolProperties *V1MachinePoolProperties `json:"machinePoolProperties,omitempty"` + + // max size of the pool, for scaling + MaxSize int32 `json:"maxSize,omitempty"` + + // min size of the pool, for scaling + MinSize int32 `json:"minSize,omitempty"` + + // name + Name string `json:"name,omitempty"` + + // Minimum number of seconds a node should be Ready, before the next node is selected for repave. Applicable only for workerpools in infrastructure cluster + NodeRepaveInterval int32 `json:"nodeRepaveInterval,omitempty"` + + // rootDeviceSize in GBs + RootDeviceSize int64 `json:"rootDeviceSize,omitempty"` + + // size of the pool, number of machines + Size int32 `json:"size,omitempty"` + + // SpotMarketOptions allows users to configure instances to be run using AWS Spot instances. + SpotMarketOptions *V1SpotMarketOptions `json:"spotMarketOptions,omitempty"` + + // AZ to subnet mapping filled by ally from hubble SubnetIDs ["us-west-2d"] = "subnet-079b6061" This field is optional If we don't provide a subnetId then by default the first private subnet from the AZ will be picked up for deployment + SubnetIds map[string]string `json:"subnetIds,omitempty"` + + // control plane or worker taints + // Unique: true + Taints []*V1Taint `json:"taints"` + + // rolling update strategy for this machinepool if not specified, will use ScaleOut + UpdateStrategy *V1UpdateStrategy `json:"updateStrategy,omitempty"` + + // if IsControlPlane==true && useControlPlaneAsWorker==true, then will remove control plane taint this will not be used for worker pools + UseControlPlaneAsWorker bool `json:"useControlPlaneAsWorker"` +} + +// Validate validates this v1 eks machine pool config +func (m *V1EksMachinePoolConfig) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateAwsLaunchTemplate(formats); err != nil { + res = append(res, err) + } + + if err := m.validateCapacityType(formats); err != nil { + res = append(res, err) + } + + if err := m.validateInstanceConfig(formats); err != nil { + res = append(res, err) + } + + if err := m.validateIsControlPlane(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMachinePoolProperties(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSpotMarketOptions(formats); err != nil { + res = append(res, err) + } + + if err := m.validateTaints(formats); err != nil { + res = append(res, err) + } + + if err := m.validateUpdateStrategy(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1EksMachinePoolConfig) validateAwsLaunchTemplate(formats strfmt.Registry) error { + + if swag.IsZero(m.AwsLaunchTemplate) { // not required + return nil + } + + if m.AwsLaunchTemplate != nil { + if err := m.AwsLaunchTemplate.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("awsLaunchTemplate") + } + return err + } + } + + return nil +} + +var v1EksMachinePoolConfigTypeCapacityTypePropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["on-demand","spot"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + v1EksMachinePoolConfigTypeCapacityTypePropEnum = append(v1EksMachinePoolConfigTypeCapacityTypePropEnum, v) + } +} + +const ( + + // V1EksMachinePoolConfigCapacityTypeOnDemand captures enum value "on-demand" + V1EksMachinePoolConfigCapacityTypeOnDemand string = "on-demand" + + // V1EksMachinePoolConfigCapacityTypeSpot captures enum value "spot" + V1EksMachinePoolConfigCapacityTypeSpot string = "spot" +) + +// prop value enum +func (m *V1EksMachinePoolConfig) validateCapacityTypeEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, v1EksMachinePoolConfigTypeCapacityTypePropEnum, true); err != nil { + return err + } + return nil +} + +func (m *V1EksMachinePoolConfig) validateCapacityType(formats strfmt.Registry) error { + + if swag.IsZero(m.CapacityType) { // not required + return nil + } + + // value enum + if err := m.validateCapacityTypeEnum("capacityType", "body", *m.CapacityType); err != nil { + return err + } + + return nil +} + +func (m *V1EksMachinePoolConfig) validateInstanceConfig(formats strfmt.Registry) error { + + if swag.IsZero(m.InstanceConfig) { // not required + return nil + } + + if m.InstanceConfig != nil { + if err := m.InstanceConfig.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("instanceConfig") + } + return err + } + } + + return nil +} + +func (m *V1EksMachinePoolConfig) validateIsControlPlane(formats strfmt.Registry) error { + + if err := validate.Required("isControlPlane", "body", m.IsControlPlane); err != nil { + return err + } + + return nil +} + +func (m *V1EksMachinePoolConfig) validateMachinePoolProperties(formats strfmt.Registry) error { + + if swag.IsZero(m.MachinePoolProperties) { // not required + return nil + } + + if m.MachinePoolProperties != nil { + if err := m.MachinePoolProperties.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("machinePoolProperties") + } + return err + } + } + + return nil +} + +func (m *V1EksMachinePoolConfig) validateSpotMarketOptions(formats strfmt.Registry) error { + + if swag.IsZero(m.SpotMarketOptions) { // not required + return nil + } + + if m.SpotMarketOptions != nil { + if err := m.SpotMarketOptions.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spotMarketOptions") + } + return err + } + } + + return nil +} + +func (m *V1EksMachinePoolConfig) validateTaints(formats strfmt.Registry) error { + + if swag.IsZero(m.Taints) { // not required + return nil + } + + if err := validate.UniqueItems("taints", "body", m.Taints); err != nil { + return err + } + + for i := 0; i < len(m.Taints); i++ { + if swag.IsZero(m.Taints[i]) { // not required + continue + } + + if m.Taints[i] != nil { + if err := m.Taints[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("taints" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1EksMachinePoolConfig) validateUpdateStrategy(formats strfmt.Registry) error { + + if swag.IsZero(m.UpdateStrategy) { // not required + return nil + } + + if m.UpdateStrategy != nil { + if err := m.UpdateStrategy.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("updateStrategy") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1EksMachinePoolConfig) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1EksMachinePoolConfig) UnmarshalBinary(b []byte) error { + var res V1EksMachinePoolConfig + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_eks_machine_pool_config_entity.go b/api/models/v1_eks_machine_pool_config_entity.go new file mode 100644 index 00000000..a1ed0b45 --- /dev/null +++ b/api/models/v1_eks_machine_pool_config_entity.go @@ -0,0 +1,96 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1EksMachinePoolConfigEntity v1 eks machine pool config entity +// +// swagger:model v1EksMachinePoolConfigEntity +type V1EksMachinePoolConfigEntity struct { + + // cloud config + CloudConfig *V1EksMachineCloudConfigEntity `json:"cloudConfig,omitempty"` + + // pool config + PoolConfig *V1MachinePoolConfigEntity `json:"poolConfig,omitempty"` +} + +// Validate validates this v1 eks machine pool config entity +func (m *V1EksMachinePoolConfigEntity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateCloudConfig(formats); err != nil { + res = append(res, err) + } + + if err := m.validatePoolConfig(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1EksMachinePoolConfigEntity) validateCloudConfig(formats strfmt.Registry) error { + + if swag.IsZero(m.CloudConfig) { // not required + return nil + } + + if m.CloudConfig != nil { + if err := m.CloudConfig.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("cloudConfig") + } + return err + } + } + + return nil +} + +func (m *V1EksMachinePoolConfigEntity) validatePoolConfig(formats strfmt.Registry) error { + + if swag.IsZero(m.PoolConfig) { // not required + return nil + } + + if m.PoolConfig != nil { + if err := m.PoolConfig.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("poolConfig") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1EksMachinePoolConfigEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1EksMachinePoolConfigEntity) UnmarshalBinary(b []byte) error { + var res V1EksMachinePoolConfigEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_eks_properties_validate_spec.go b/api/models/v1_eks_properties_validate_spec.go new file mode 100644 index 00000000..544bf787 --- /dev/null +++ b/api/models/v1_eks_properties_validate_spec.go @@ -0,0 +1,58 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1EksPropertiesValidateSpec Eks properties validate spec +// +// swagger:model V1EksPropertiesValidateSpec +type V1EksPropertiesValidateSpec struct { + + // cloud account Uid + CloudAccountUID string `json:"cloudAccountUid,omitempty"` + + // name + Name string `json:"name,omitempty"` + + // region + Region string `json:"region,omitempty"` + + // ssh key name + SSHKeyName string `json:"sshKeyName,omitempty"` + + // subnets + Subnets []string `json:"subnets"` + + // vpc Id + VpcID string `json:"vpcId,omitempty"` +} + +// Validate validates this v1 eks properties validate spec +func (m *V1EksPropertiesValidateSpec) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1EksPropertiesValidateSpec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1EksPropertiesValidateSpec) UnmarshalBinary(b []byte) error { + var res V1EksPropertiesValidateSpec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_eks_subnet_entity.go b/api/models/v1_eks_subnet_entity.go new file mode 100644 index 00000000..cc2d62ff --- /dev/null +++ b/api/models/v1_eks_subnet_entity.go @@ -0,0 +1,46 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1EksSubnetEntity v1 eks subnet entity +// +// swagger:model v1EksSubnetEntity +type V1EksSubnetEntity struct { + + // az + Az string `json:"az,omitempty"` + + // id + ID string `json:"id,omitempty"` +} + +// Validate validates this v1 eks subnet entity +func (m *V1EksSubnetEntity) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1EksSubnetEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1EksSubnetEntity) UnmarshalBinary(b []byte) error { + var res V1EksSubnetEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_encryption_config.go b/api/models/v1_encryption_config.go new file mode 100644 index 00000000..dbb5015e --- /dev/null +++ b/api/models/v1_encryption_config.go @@ -0,0 +1,49 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1EncryptionConfig EncryptionConfig specifies the encryption configuration for the EKS clsuter. +// +// swagger:model v1EncryptionConfig +type V1EncryptionConfig struct { + + // Is encryption configuration enabled for the cluster + IsEnabled bool `json:"isEnabled,omitempty"` + + // Provider specifies the ARN or alias of the CMK (in AWS KMS) + Provider string `json:"provider,omitempty"` + + // Resources specifies the resources to be encrypted + Resources []string `json:"resources"` +} + +// Validate validates this v1 encryption config +func (m *V1EncryptionConfig) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1EncryptionConfig) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1EncryptionConfig) UnmarshalBinary(b []byte) error { + var res V1EncryptionConfig + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_error.go b/api/models/v1_error.go new file mode 100644 index 00000000..bad7b2e4 --- /dev/null +++ b/api/models/v1_error.go @@ -0,0 +1,52 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1Error v1 error +// +// swagger:model V1Error +type V1Error struct { + + // code + Code string `json:"code,omitempty"` + + // details + Details interface{} `json:"details,omitempty"` + + // message + Message string `json:"message,omitempty"` + + // ref + Ref string `json:"ref,omitempty"` +} + +// Validate validates this v1 error +func (m *V1Error) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1Error) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1Error) UnmarshalBinary(b []byte) error { + var res V1Error + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_event.go b/api/models/v1_event.go new file mode 100644 index 00000000..6ea14b62 --- /dev/null +++ b/api/models/v1_event.go @@ -0,0 +1,155 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1Event Describes the component event details +// +// swagger:model v1Event +type V1Event struct { + + // Describes object involved in event generation + InvolvedObject *V1ObjectReference `json:"involvedObject,omitempty"` + + // Describes message associated with the event + Message string `json:"message,omitempty"` + + // metadata + Metadata *V1ObjectMeta `json:"metadata,omitempty"` + + // Describes the reason for the event + Reason string `json:"reason,omitempty"` + + // Describes object related to the event + RelatedObject *V1EventRelatedObject `json:"relatedObject,omitempty"` + + // Describes the gravitas for the event + Severity string `json:"severity,omitempty"` + + // Describes the origin for the event + Source *V1EventSource `json:"source,omitempty"` +} + +// Validate validates this v1 event +func (m *V1Event) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateInvolvedObject(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if err := m.validateRelatedObject(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSource(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1Event) validateInvolvedObject(formats strfmt.Registry) error { + + if swag.IsZero(m.InvolvedObject) { // not required + return nil + } + + if m.InvolvedObject != nil { + if err := m.InvolvedObject.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("involvedObject") + } + return err + } + } + + return nil +} + +func (m *V1Event) validateMetadata(formats strfmt.Registry) error { + + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } + return err + } + } + + return nil +} + +func (m *V1Event) validateRelatedObject(formats strfmt.Registry) error { + + if swag.IsZero(m.RelatedObject) { // not required + return nil + } + + if m.RelatedObject != nil { + if err := m.RelatedObject.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("relatedObject") + } + return err + } + } + + return nil +} + +func (m *V1Event) validateSource(formats strfmt.Registry) error { + + if swag.IsZero(m.Source) { // not required + return nil + } + + if m.Source != nil { + if err := m.Source.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("source") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1Event) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1Event) UnmarshalBinary(b []byte) error { + var res V1Event + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_event_related_object.go b/api/models/v1_event_related_object.go new file mode 100644 index 00000000..d389f735 --- /dev/null +++ b/api/models/v1_event_related_object.go @@ -0,0 +1,106 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "encoding/json" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1EventRelatedObject Object for which the event is related +// +// swagger:model v1EventRelatedObject +type V1EventRelatedObject struct { + + // kind + // Enum: [spectrocluster edgehost] + Kind string `json:"kind,omitempty"` + + // name + Name string `json:"name,omitempty"` + + // uid + UID string `json:"uid,omitempty"` +} + +// Validate validates this v1 event related object +func (m *V1EventRelatedObject) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateKind(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +var v1EventRelatedObjectTypeKindPropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["spectrocluster","edgehost"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + v1EventRelatedObjectTypeKindPropEnum = append(v1EventRelatedObjectTypeKindPropEnum, v) + } +} + +const ( + + // V1EventRelatedObjectKindSpectrocluster captures enum value "spectrocluster" + V1EventRelatedObjectKindSpectrocluster string = "spectrocluster" + + // V1EventRelatedObjectKindEdgehost captures enum value "edgehost" + V1EventRelatedObjectKindEdgehost string = "edgehost" +) + +// prop value enum +func (m *V1EventRelatedObject) validateKindEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, v1EventRelatedObjectTypeKindPropEnum, true); err != nil { + return err + } + return nil +} + +func (m *V1EventRelatedObject) validateKind(formats strfmt.Registry) error { + + if swag.IsZero(m.Kind) { // not required + return nil + } + + // value enum + if err := m.validateKindEnum("kind", "body", m.Kind); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1EventRelatedObject) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1EventRelatedObject) UnmarshalBinary(b []byte) error { + var res V1EventRelatedObject + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_event_source.go b/api/models/v1_event_source.go new file mode 100644 index 00000000..8e5426d6 --- /dev/null +++ b/api/models/v1_event_source.go @@ -0,0 +1,46 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1EventSource Describes the origin for the event +// +// swagger:model v1EventSource +type V1EventSource struct { + + // Describes the component where event originated + Component string `json:"component,omitempty"` + + // Describes the host where event originated + Host string `json:"host,omitempty"` +} + +// Validate validates this v1 event source +func (m *V1EventSource) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1EventSource) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1EventSource) UnmarshalBinary(b []byte) error { + var res V1EventSource + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_events.go b/api/models/v1_events.go new file mode 100644 index 00000000..10a07819 --- /dev/null +++ b/api/models/v1_events.go @@ -0,0 +1,112 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1Events An array of component events items +// +// swagger:model v1Events +type V1Events struct { + + // Describes a list of returned component events + // Required: true + // Unique: true + Items []*V1Event `json:"items"` + + // Describes the meta information about the component event lists + Listmeta *V1ListMetaData `json:"listmeta,omitempty"` +} + +// Validate validates this v1 events +func (m *V1Events) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateItems(formats); err != nil { + res = append(res, err) + } + + if err := m.validateListmeta(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1Events) validateItems(formats strfmt.Registry) error { + + if err := validate.Required("items", "body", m.Items); err != nil { + return err + } + + if err := validate.UniqueItems("items", "body", m.Items); err != nil { + return err + } + + for i := 0; i < len(m.Items); i++ { + if swag.IsZero(m.Items[i]) { // not required + continue + } + + if m.Items[i] != nil { + if err := m.Items[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("items" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1Events) validateListmeta(formats strfmt.Registry) error { + + if swag.IsZero(m.Listmeta) { // not required + return nil + } + + if m.Listmeta != nil { + if err := m.Listmeta.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("listmeta") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1Events) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1Events) UnmarshalBinary(b []byte) error { + var res V1Events + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_fargate_profile.go b/api/models/v1_fargate_profile.go new file mode 100644 index 00000000..090ffaa3 --- /dev/null +++ b/api/models/v1_fargate_profile.go @@ -0,0 +1,104 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1FargateProfile FargateProfile defines the desired state of FargateProfile +// +// swagger:model v1FargateProfile +type V1FargateProfile struct { + + // AdditionalTags is an optional set of tags to add to AWS resources managed by the AWS provider, in addition to the ones added by default. + AdditionalTags map[string]string `json:"additionalTags,omitempty"` + + // name specifies the profile name. + // Required: true + Name *string `json:"name"` + + // Selectors specify fargate pod selectors. + Selectors []*V1FargateSelector `json:"selectors"` + + // SubnetIDs specifies which subnets are used for the auto scaling group of this nodegroup. + SubnetIds []string `json:"subnetIds"` +} + +// Validate validates this v1 fargate profile +func (m *V1FargateProfile) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateName(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSelectors(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1FargateProfile) validateName(formats strfmt.Registry) error { + + if err := validate.Required("name", "body", m.Name); err != nil { + return err + } + + return nil +} + +func (m *V1FargateProfile) validateSelectors(formats strfmt.Registry) error { + + if swag.IsZero(m.Selectors) { // not required + return nil + } + + for i := 0; i < len(m.Selectors); i++ { + if swag.IsZero(m.Selectors[i]) { // not required + continue + } + + if m.Selectors[i] != nil { + if err := m.Selectors[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("selectors" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1FargateProfile) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1FargateProfile) UnmarshalBinary(b []byte) error { + var res V1FargateProfile + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_fargate_selector.go b/api/models/v1_fargate_selector.go new file mode 100644 index 00000000..5c43a47a --- /dev/null +++ b/api/models/v1_fargate_selector.go @@ -0,0 +1,67 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1FargateSelector FargateSelector specifies a selector for pods that should run on this fargate pool +// +// swagger:model v1FargateSelector +type V1FargateSelector struct { + + // Labels specifies which pod labels this selector should match. + Labels map[string]string `json:"labels,omitempty"` + + // Namespace specifies which namespace this selector should match. + // Required: true + Namespace *string `json:"namespace"` +} + +// Validate validates this v1 fargate selector +func (m *V1FargateSelector) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateNamespace(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1FargateSelector) validateNamespace(formats strfmt.Registry) error { + + if err := validate.Required("namespace", "body", m.Namespace); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1FargateSelector) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1FargateSelector) UnmarshalBinary(b []byte) error { + var res V1FargateSelector + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_feature.go b/api/models/v1_feature.go new file mode 100644 index 00000000..0ef777ff --- /dev/null +++ b/api/models/v1_feature.go @@ -0,0 +1,96 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1Feature Feature response +// +// swagger:model v1Feature +type V1Feature struct { + + // metadata + Metadata *V1ObjectMeta `json:"metadata,omitempty"` + + // spec + Spec *V1FeatureSpec `json:"spec,omitempty"` +} + +// Validate validates this v1 feature +func (m *V1Feature) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSpec(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1Feature) validateMetadata(formats strfmt.Registry) error { + + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } + return err + } + } + + return nil +} + +func (m *V1Feature) validateSpec(formats strfmt.Registry) error { + + if swag.IsZero(m.Spec) { // not required + return nil + } + + if m.Spec != nil { + if err := m.Spec.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1Feature) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1Feature) UnmarshalBinary(b []byte) error { + var res V1Feature + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_feature_spec.go b/api/models/v1_feature_spec.go new file mode 100644 index 00000000..a3cd5214 --- /dev/null +++ b/api/models/v1_feature_spec.go @@ -0,0 +1,49 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1FeatureSpec Feature spec +// +// swagger:model v1FeatureSpec +type V1FeatureSpec struct { + + // Feature description + Description string `json:"description,omitempty"` + + // Feature doc link + DocLink string `json:"docLink,omitempty"` + + // Feature key + Key string `json:"key,omitempty"` +} + +// Validate validates this v1 feature spec +func (m *V1FeatureSpec) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1FeatureSpec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1FeatureSpec) UnmarshalBinary(b []byte) error { + var res V1FeatureSpec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_feature_update.go b/api/models/v1_feature_update.go new file mode 100644 index 00000000..6605470a --- /dev/null +++ b/api/models/v1_feature_update.go @@ -0,0 +1,96 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1FeatureUpdate Feature update spec +// +// swagger:model v1FeatureUpdate +type V1FeatureUpdate struct { + + // metadata + Metadata *V1ObjectMetaInputEntity `json:"metadata,omitempty"` + + // spec + Spec *V1FeatureUpdateSpec `json:"spec,omitempty"` +} + +// Validate validates this v1 feature update +func (m *V1FeatureUpdate) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSpec(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1FeatureUpdate) validateMetadata(formats strfmt.Registry) error { + + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } + return err + } + } + + return nil +} + +func (m *V1FeatureUpdate) validateSpec(formats strfmt.Registry) error { + + if swag.IsZero(m.Spec) { // not required + return nil + } + + if m.Spec != nil { + if err := m.Spec.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1FeatureUpdate) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1FeatureUpdate) UnmarshalBinary(b []byte) error { + var res V1FeatureUpdate + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_feature_update_spec.go b/api/models/v1_feature_update_spec.go new file mode 100644 index 00000000..97bb5b42 --- /dev/null +++ b/api/models/v1_feature_update_spec.go @@ -0,0 +1,46 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1FeatureUpdateSpec Feature update spec +// +// swagger:model v1FeatureUpdateSpec +type V1FeatureUpdateSpec struct { + + // Feature description + Description string `json:"description,omitempty"` + + // Feature doc link + DocLink string `json:"docLink,omitempty"` +} + +// Validate validates this v1 feature update spec +func (m *V1FeatureUpdateSpec) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1FeatureUpdateSpec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1FeatureUpdateSpec) UnmarshalBinary(b []byte) error { + var res V1FeatureUpdateSpec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_features.go b/api/models/v1_features.go new file mode 100644 index 00000000..93a2e44a --- /dev/null +++ b/api/models/v1_features.go @@ -0,0 +1,87 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1Features v1 features +// +// swagger:model v1Features +type V1Features struct { + + // List of features + // Required: true + // Unique: true + Items []*V1Feature `json:"items"` +} + +// Validate validates this v1 features +func (m *V1Features) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateItems(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1Features) validateItems(formats strfmt.Registry) error { + + if err := validate.Required("items", "body", m.Items); err != nil { + return err + } + + if err := validate.UniqueItems("items", "body", m.Items); err != nil { + return err + } + + for i := 0; i < len(m.Items); i++ { + if swag.IsZero(m.Items[i]) { // not required + continue + } + + if m.Items[i] != nil { + if err := m.Items[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("items" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1Features) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1Features) UnmarshalBinary(b []byte) error { + var res V1Features + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_filter_array.go b/api/models/v1_filter_array.go new file mode 100644 index 00000000..2c520bb3 --- /dev/null +++ b/api/models/v1_filter_array.go @@ -0,0 +1,52 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1FilterArray v1 filter array +// +// swagger:model v1FilterArray +type V1FilterArray struct { + + // begins with + BeginsWith []string `json:"beginsWith"` + + // eq + Eq []string `json:"eq"` + + // ignore case + IgnoreCase *bool `json:"ignoreCase,omitempty"` + + // ne + Ne []string `json:"ne"` +} + +// Validate validates this v1 filter array +func (m *V1FilterArray) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1FilterArray) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1FilterArray) UnmarshalBinary(b []byte) error { + var res V1FilterArray + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_filter_metadata.go b/api/models/v1_filter_metadata.go new file mode 100644 index 00000000..f451ae0f --- /dev/null +++ b/api/models/v1_filter_metadata.go @@ -0,0 +1,49 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1FilterMetadata Filter metadata object +// +// swagger:model v1FilterMetadata +type V1FilterMetadata struct { + + // filter type + FilterType string `json:"filterType,omitempty"` + + // name + Name string `json:"name,omitempty"` + + // uid + UID string `json:"uid,omitempty"` +} + +// Validate validates this v1 filter metadata +func (m *V1FilterMetadata) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1FilterMetadata) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1FilterMetadata) UnmarshalBinary(b []byte) error { + var res V1FilterMetadata + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_filter_string.go b/api/models/v1_filter_string.go new file mode 100644 index 00000000..6d1a5c43 --- /dev/null +++ b/api/models/v1_filter_string.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1FilterString v1 filter string +// +// swagger:model v1FilterString +type V1FilterString struct { + + // begins with + BeginsWith *string `json:"beginsWith,omitempty"` + + // contains + Contains *string `json:"contains,omitempty"` + + // eq + Eq *string `json:"eq,omitempty"` + + // ignore case + IgnoreCase *bool `json:"ignoreCase,omitempty"` + + // ne + Ne *string `json:"ne,omitempty"` +} + +// Validate validates this v1 filter string +func (m *V1FilterString) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1FilterString) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1FilterString) UnmarshalBinary(b []byte) error { + var res V1FilterString + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_filter_summary.go b/api/models/v1_filter_summary.go new file mode 100644 index 00000000..2b2434d9 --- /dev/null +++ b/api/models/v1_filter_summary.go @@ -0,0 +1,96 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1FilterSummary Filter summary object +// +// swagger:model v1FilterSummary +type V1FilterSummary struct { + + // metadata + Metadata *V1ObjectMeta `json:"metadata,omitempty"` + + // spec + Spec *V1FilterSummarySpec `json:"spec,omitempty"` +} + +// Validate validates this v1 filter summary +func (m *V1FilterSummary) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSpec(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1FilterSummary) validateMetadata(formats strfmt.Registry) error { + + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } + return err + } + } + + return nil +} + +func (m *V1FilterSummary) validateSpec(formats strfmt.Registry) error { + + if swag.IsZero(m.Spec) { // not required + return nil + } + + if m.Spec != nil { + if err := m.Spec.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1FilterSummary) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1FilterSummary) UnmarshalBinary(b []byte) error { + var res V1FilterSummary + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_filter_summary_spec.go b/api/models/v1_filter_summary_spec.go new file mode 100644 index 00000000..e3ae8c0e --- /dev/null +++ b/api/models/v1_filter_summary_spec.go @@ -0,0 +1,43 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1FilterSummarySpec v1 filter summary spec +// +// swagger:model v1FilterSummarySpec +type V1FilterSummarySpec struct { + + // filter type + FilterType string `json:"filterType,omitempty"` +} + +// Validate validates this v1 filter summary spec +func (m *V1FilterSummarySpec) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1FilterSummarySpec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1FilterSummarySpec) UnmarshalBinary(b []byte) error { + var res V1FilterSummarySpec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_filter_version_string.go b/api/models/v1_filter_version_string.go new file mode 100644 index 00000000..5c27a0d7 --- /dev/null +++ b/api/models/v1_filter_version_string.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1FilterVersionString v1 filter version string +// +// swagger:model v1FilterVersionString +type V1FilterVersionString struct { + + // begins with + BeginsWith *string `json:"beginsWith,omitempty"` + + // eq + Eq *string `json:"eq,omitempty"` + + // gt + Gt *string `json:"gt,omitempty"` + + // lt + Lt *string `json:"lt,omitempty"` + + // ne + Ne *string `json:"ne,omitempty"` +} + +// Validate validates this v1 filter version string +func (m *V1FilterVersionString) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1FilterVersionString) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1FilterVersionString) UnmarshalBinary(b []byte) error { + var res V1FilterVersionString + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_filters_metadata.go b/api/models/v1_filters_metadata.go new file mode 100644 index 00000000..2e9be905 --- /dev/null +++ b/api/models/v1_filters_metadata.go @@ -0,0 +1,87 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1FiltersMetadata v1 filters metadata +// +// swagger:model v1FiltersMetadata +type V1FiltersMetadata struct { + + // items + // Required: true + // Unique: true + Items []*V1FilterMetadata `json:"items"` +} + +// Validate validates this v1 filters metadata +func (m *V1FiltersMetadata) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateItems(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1FiltersMetadata) validateItems(formats strfmt.Registry) error { + + if err := validate.Required("items", "body", m.Items); err != nil { + return err + } + + if err := validate.UniqueItems("items", "body", m.Items); err != nil { + return err + } + + for i := 0; i < len(m.Items); i++ { + if swag.IsZero(m.Items[i]) { // not required + continue + } + + if m.Items[i] != nil { + if err := m.Items[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("items" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1FiltersMetadata) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1FiltersMetadata) UnmarshalBinary(b []byte) error { + var res V1FiltersMetadata + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_filters_summary.go b/api/models/v1_filters_summary.go new file mode 100644 index 00000000..08635faf --- /dev/null +++ b/api/models/v1_filters_summary.go @@ -0,0 +1,112 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1FiltersSummary v1 filters summary +// +// swagger:model v1FiltersSummary +type V1FiltersSummary struct { + + // items + // Required: true + // Unique: true + Items []*V1FilterSummary `json:"items"` + + // listmeta + Listmeta *V1ListMetaData `json:"listmeta,omitempty"` +} + +// Validate validates this v1 filters summary +func (m *V1FiltersSummary) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateItems(formats); err != nil { + res = append(res, err) + } + + if err := m.validateListmeta(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1FiltersSummary) validateItems(formats strfmt.Registry) error { + + if err := validate.Required("items", "body", m.Items); err != nil { + return err + } + + if err := validate.UniqueItems("items", "body", m.Items); err != nil { + return err + } + + for i := 0; i < len(m.Items); i++ { + if swag.IsZero(m.Items[i]) { // not required + continue + } + + if m.Items[i] != nil { + if err := m.Items[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("items" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1FiltersSummary) validateListmeta(formats strfmt.Registry) error { + + if swag.IsZero(m.Listmeta) { // not required + return nil + } + + if m.Listmeta != nil { + if err := m.Listmeta.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("listmeta") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1FiltersSummary) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1FiltersSummary) UnmarshalBinary(b []byte) error { + var res V1FiltersSummary + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_fips_settings.go b/api/models/v1_fips_settings.go new file mode 100644 index 00000000..9a0e4950 --- /dev/null +++ b/api/models/v1_fips_settings.go @@ -0,0 +1,121 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1FipsSettings FIPS configuration +// +// swagger:model v1FipsSettings +type V1FipsSettings struct { + + // fips cluster feature config + FipsClusterFeatureConfig *V1NonFipsConfig `json:"fipsClusterFeatureConfig,omitempty"` + + // fips cluster import config + FipsClusterImportConfig *V1NonFipsConfig `json:"fipsClusterImportConfig,omitempty"` + + // fips pack config + FipsPackConfig *V1NonFipsConfig `json:"fipsPackConfig,omitempty"` +} + +// Validate validates this v1 fips settings +func (m *V1FipsSettings) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateFipsClusterFeatureConfig(formats); err != nil { + res = append(res, err) + } + + if err := m.validateFipsClusterImportConfig(formats); err != nil { + res = append(res, err) + } + + if err := m.validateFipsPackConfig(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1FipsSettings) validateFipsClusterFeatureConfig(formats strfmt.Registry) error { + + if swag.IsZero(m.FipsClusterFeatureConfig) { // not required + return nil + } + + if m.FipsClusterFeatureConfig != nil { + if err := m.FipsClusterFeatureConfig.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("fipsClusterFeatureConfig") + } + return err + } + } + + return nil +} + +func (m *V1FipsSettings) validateFipsClusterImportConfig(formats strfmt.Registry) error { + + if swag.IsZero(m.FipsClusterImportConfig) { // not required + return nil + } + + if m.FipsClusterImportConfig != nil { + if err := m.FipsClusterImportConfig.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("fipsClusterImportConfig") + } + return err + } + } + + return nil +} + +func (m *V1FipsSettings) validateFipsPackConfig(formats strfmt.Registry) error { + + if swag.IsZero(m.FipsPackConfig) { // not required + return nil + } + + if m.FipsPackConfig != nil { + if err := m.FipsPackConfig.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("fipsPackConfig") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1FipsSettings) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1FipsSettings) UnmarshalBinary(b []byte) error { + var res V1FipsSettings + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_freemium_usage.go b/api/models/v1_freemium_usage.go new file mode 100644 index 00000000..283edb30 --- /dev/null +++ b/api/models/v1_freemium_usage.go @@ -0,0 +1,43 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1FreemiumUsage v1 freemium usage +// +// swagger:model v1FreemiumUsage +type V1FreemiumUsage struct { + + // usage + Usage float64 `json:"usage"` +} + +// Validate validates this v1 freemium usage +func (m *V1FreemiumUsage) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1FreemiumUsage) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1FreemiumUsage) UnmarshalBinary(b []byte) error { + var res V1FreemiumUsage + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_freemium_usage_limit.go b/api/models/v1_freemium_usage_limit.go new file mode 100644 index 00000000..fd1cbacb --- /dev/null +++ b/api/models/v1_freemium_usage_limit.go @@ -0,0 +1,49 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1FreemiumUsageLimit v1 freemium usage limit +// +// swagger:model v1FreemiumUsageLimit +type V1FreemiumUsageLimit struct { + + // active clusters + ActiveClusters int64 `json:"activeClusters"` + + // overage usage + OverageUsage float64 `json:"overageUsage"` + + // usage + Usage float64 `json:"usage"` +} + +// Validate validates this v1 freemium usage limit +func (m *V1FreemiumUsageLimit) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1FreemiumUsageLimit) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1FreemiumUsageLimit) UnmarshalBinary(b []byte) error { + var res V1FreemiumUsageLimit + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_g_p_u_config.go b/api/models/v1_g_p_u_config.go new file mode 100644 index 00000000..b9a39ba4 --- /dev/null +++ b/api/models/v1_g_p_u_config.go @@ -0,0 +1,59 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1GPUConfig v1 g p u config +// +// swagger:model v1GPUConfig +type V1GPUConfig struct { + + // Addresses is a map of PCI device entry name to its addresses. + // Example entry would be "11:00.0 VGA compatible controller [0300]: NVIDIA + // Corporation Device [10de:1eb1] (rev a1)"- > 0000_11_00_0" The address is + // BDF (Bus Device Function) identifier format seperated by underscores. The + // first 4 bits are almost always 0000. In the above example 11 is Bus, 00 + // is Device,0 is function. The values of these addreses are expected in hexadecimal + // format + // + Addresses map[string]string `json:"addresses,omitempty"` + + // DeviceModel is the model of GPU, for a given vendor, for eg., TU104GL [Tesla T4] + DeviceModel string `json:"deviceModel,omitempty"` + + // NumGPUs is the number of GPUs + NumGPUs int32 `json:"numGPUs,omitempty"` + + // VendorName is the GPU vendor, for eg., NVIDIA or AMD + VendorName string `json:"vendorName,omitempty"` +} + +// Validate validates this v1 g p u config +func (m *V1GPUConfig) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1GPUConfig) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1GPUConfig) UnmarshalBinary(b []byte) error { + var res V1GPUConfig + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_g_p_u_device_spec.go b/api/models/v1_g_p_u_device_spec.go new file mode 100644 index 00000000..63781b74 --- /dev/null +++ b/api/models/v1_g_p_u_device_spec.go @@ -0,0 +1,56 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1GPUDeviceSpec v1 g p u device spec +// +// swagger:model v1GPUDeviceSpec +type V1GPUDeviceSpec struct { + + // Addresses is a map of PCI device entry name to its addresses. + // Example entry would be "11:00.0 VGA compatible controller [0300]: NVIDIA + // Corporation Device [10de:1eb1] (rev a1)"- > 0000_11_00_0" The address is + // BDF (Bus Device Function) identifier format seperated by underscores. The + // first 4 bits are almost always 0000. In the above example 11 is Bus, 00 + // is Device,0 is function. The values of these addreses are expected in hexadecimal + // format + // + Addresses map[string]string `json:"addresses,omitempty"` + + // Model is the model of GPU, for a given vendor, for eg., TU104GL [Tesla T4] + Model string `json:"model,omitempty"` + + // Vendor is the GPU vendor, for eg., NVIDIA or AMD + Vendor string `json:"vendor,omitempty"` +} + +// Validate validates this v1 g p u device spec +func (m *V1GPUDeviceSpec) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1GPUDeviceSpec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1GPUDeviceSpec) UnmarshalBinary(b []byte) error { + var res V1GPUDeviceSpec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_gcp_account.go b/api/models/v1_gcp_account.go new file mode 100644 index 00000000..8a2e5ac9 --- /dev/null +++ b/api/models/v1_gcp_account.go @@ -0,0 +1,127 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1GcpAccount GCP account information +// +// swagger:model v1GcpAccount +type V1GcpAccount struct { + + // Cloud account api version + APIVersion string `json:"apiVersion,omitempty"` + + // Cloud account kind + Kind string `json:"kind,omitempty"` + + // metadata + Metadata *V1ObjectMeta `json:"metadata,omitempty"` + + // spec + Spec *V1GcpAccountSpec `json:"spec,omitempty"` + + // status + Status *V1CloudAccountStatus `json:"status,omitempty"` +} + +// Validate validates this v1 gcp account +func (m *V1GcpAccount) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSpec(formats); err != nil { + res = append(res, err) + } + + if err := m.validateStatus(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1GcpAccount) validateMetadata(formats strfmt.Registry) error { + + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } + return err + } + } + + return nil +} + +func (m *V1GcpAccount) validateSpec(formats strfmt.Registry) error { + + if swag.IsZero(m.Spec) { // not required + return nil + } + + if m.Spec != nil { + if err := m.Spec.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec") + } + return err + } + } + + return nil +} + +func (m *V1GcpAccount) validateStatus(formats strfmt.Registry) error { + + if swag.IsZero(m.Status) { // not required + return nil + } + + if m.Status != nil { + if err := m.Status.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("status") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1GcpAccount) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1GcpAccount) UnmarshalBinary(b []byte) error { + var res V1GcpAccount + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_gcp_account_entity.go b/api/models/v1_gcp_account_entity.go new file mode 100644 index 00000000..9861b46e --- /dev/null +++ b/api/models/v1_gcp_account_entity.go @@ -0,0 +1,127 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1GcpAccountEntity GCP account information +// +// swagger:model v1GcpAccountEntity +type V1GcpAccountEntity struct { + + // Cloud account api version + APIVersion string `json:"apiVersion,omitempty"` + + // Cloud account kind + Kind string `json:"kind,omitempty"` + + // metadata + Metadata *V1ObjectMeta `json:"metadata,omitempty"` + + // spec + Spec *V1GcpAccountEntitySpec `json:"spec,omitempty"` + + // status + Status *V1CloudAccountStatus `json:"status,omitempty"` +} + +// Validate validates this v1 gcp account entity +func (m *V1GcpAccountEntity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSpec(formats); err != nil { + res = append(res, err) + } + + if err := m.validateStatus(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1GcpAccountEntity) validateMetadata(formats strfmt.Registry) error { + + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } + return err + } + } + + return nil +} + +func (m *V1GcpAccountEntity) validateSpec(formats strfmt.Registry) error { + + if swag.IsZero(m.Spec) { // not required + return nil + } + + if m.Spec != nil { + if err := m.Spec.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec") + } + return err + } + } + + return nil +} + +func (m *V1GcpAccountEntity) validateStatus(formats strfmt.Registry) error { + + if swag.IsZero(m.Status) { // not required + return nil + } + + if m.Status != nil { + if err := m.Status.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("status") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1GcpAccountEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1GcpAccountEntity) UnmarshalBinary(b []byte) error { + var res V1GcpAccountEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_gcp_account_entity_spec.go b/api/models/v1_gcp_account_entity_spec.go new file mode 100644 index 00000000..5a4c5920 --- /dev/null +++ b/api/models/v1_gcp_account_entity_spec.go @@ -0,0 +1,46 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1GcpAccountEntitySpec v1 gcp account entity spec +// +// swagger:model v1GcpAccountEntitySpec +type V1GcpAccountEntitySpec struct { + + // Gcp cloud account json credentials + JSONCredentials string `json:"jsonCredentials,omitempty"` + + // Reference of the credentials stored in the file + JSONCredentialsFileUID string `json:"jsonCredentialsFileUid,omitempty"` +} + +// Validate validates this v1 gcp account entity spec +func (m *V1GcpAccountEntitySpec) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1GcpAccountEntitySpec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1GcpAccountEntitySpec) UnmarshalBinary(b []byte) error { + var res V1GcpAccountEntitySpec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_gcp_account_name_validate_spec.go b/api/models/v1_gcp_account_name_validate_spec.go new file mode 100644 index 00000000..1763c4c1 --- /dev/null +++ b/api/models/v1_gcp_account_name_validate_spec.go @@ -0,0 +1,93 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1GcpAccountNameValidateSpec Gcp cloud account name validate spec +// +// swagger:model v1GcpAccountNameValidateSpec +type V1GcpAccountNameValidateSpec struct { + + // Bucket name in the GCP + // Required: true + BucketName *string `json:"bucketName"` + + // credentials + // Required: true + Credentials *V1GcpAccountValidateSpec `json:"credentials"` + + // ProjectId in the GCP + ProjectID string `json:"projectId,omitempty"` +} + +// Validate validates this v1 gcp account name validate spec +func (m *V1GcpAccountNameValidateSpec) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateBucketName(formats); err != nil { + res = append(res, err) + } + + if err := m.validateCredentials(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1GcpAccountNameValidateSpec) validateBucketName(formats strfmt.Registry) error { + + if err := validate.Required("bucketName", "body", m.BucketName); err != nil { + return err + } + + return nil +} + +func (m *V1GcpAccountNameValidateSpec) validateCredentials(formats strfmt.Registry) error { + + if err := validate.Required("credentials", "body", m.Credentials); err != nil { + return err + } + + if m.Credentials != nil { + if err := m.Credentials.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("credentials") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1GcpAccountNameValidateSpec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1GcpAccountNameValidateSpec) UnmarshalBinary(b []byte) error { + var res V1GcpAccountNameValidateSpec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_gcp_account_spec.go b/api/models/v1_gcp_account_spec.go new file mode 100644 index 00000000..0c5d719f --- /dev/null +++ b/api/models/v1_gcp_account_spec.go @@ -0,0 +1,46 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1GcpAccountSpec v1 gcp account spec +// +// swagger:model v1GcpAccountSpec +type V1GcpAccountSpec struct { + + // Gcp cloud account json credentials + JSONCredentials string `json:"jsonCredentials,omitempty"` + + // Reference of the credentials stored in the file + JSONCredentialsFileName string `json:"jsonCredentialsFileName,omitempty"` +} + +// Validate validates this v1 gcp account spec +func (m *V1GcpAccountSpec) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1GcpAccountSpec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1GcpAccountSpec) UnmarshalBinary(b []byte) error { + var res V1GcpAccountSpec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_gcp_account_validate_spec.go b/api/models/v1_gcp_account_validate_spec.go new file mode 100644 index 00000000..98700fb6 --- /dev/null +++ b/api/models/v1_gcp_account_validate_spec.go @@ -0,0 +1,46 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1GcpAccountValidateSpec Gcp cloud account entity which takes json credentials or reference to the file where credentials are stored +// +// swagger:model v1GcpAccountValidateSpec +type V1GcpAccountValidateSpec struct { + + // Gcp cloud account json credentials + JSONCredentials string `json:"jsonCredentials,omitempty"` + + // Reference of the credentials stored in the file + JSONCredentialsFileUID string `json:"jsonCredentialsFileUid,omitempty"` +} + +// Validate validates this v1 gcp account validate spec +func (m *V1GcpAccountValidateSpec) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1GcpAccountValidateSpec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1GcpAccountValidateSpec) UnmarshalBinary(b []byte) error { + var res V1GcpAccountValidateSpec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_gcp_accounts.go b/api/models/v1_gcp_accounts.go new file mode 100644 index 00000000..aa97946a --- /dev/null +++ b/api/models/v1_gcp_accounts.go @@ -0,0 +1,112 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1GcpAccounts v1 gcp accounts +// +// swagger:model v1GcpAccounts +type V1GcpAccounts struct { + + // items + // Required: true + // Unique: true + Items []*V1GcpAccount `json:"items"` + + // listmeta + Listmeta *V1ListMetaData `json:"listmeta,omitempty"` +} + +// Validate validates this v1 gcp accounts +func (m *V1GcpAccounts) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateItems(formats); err != nil { + res = append(res, err) + } + + if err := m.validateListmeta(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1GcpAccounts) validateItems(formats strfmt.Registry) error { + + if err := validate.Required("items", "body", m.Items); err != nil { + return err + } + + if err := validate.UniqueItems("items", "body", m.Items); err != nil { + return err + } + + for i := 0; i < len(m.Items); i++ { + if swag.IsZero(m.Items[i]) { // not required + continue + } + + if m.Items[i] != nil { + if err := m.Items[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("items" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1GcpAccounts) validateListmeta(formats strfmt.Registry) error { + + if swag.IsZero(m.Listmeta) { // not required + return nil + } + + if m.Listmeta != nil { + if err := m.Listmeta.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("listmeta") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1GcpAccounts) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1GcpAccounts) UnmarshalBinary(b []byte) error { + var res V1GcpAccounts + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_gcp_cloud_account_validate_entity.go b/api/models/v1_gcp_cloud_account_validate_entity.go new file mode 100644 index 00000000..7fc68bd4 --- /dev/null +++ b/api/models/v1_gcp_cloud_account_validate_entity.go @@ -0,0 +1,71 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1GcpCloudAccountValidateEntity Gcp cloud account spec +// +// swagger:model v1GcpCloudAccountValidateEntity +type V1GcpCloudAccountValidateEntity struct { + + // spec + Spec *V1GcpAccountValidateSpec `json:"spec,omitempty"` +} + +// Validate validates this v1 gcp cloud account validate entity +func (m *V1GcpCloudAccountValidateEntity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateSpec(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1GcpCloudAccountValidateEntity) validateSpec(formats strfmt.Registry) error { + + if swag.IsZero(m.Spec) { // not required + return nil + } + + if m.Spec != nil { + if err := m.Spec.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1GcpCloudAccountValidateEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1GcpCloudAccountValidateEntity) UnmarshalBinary(b []byte) error { + var res V1GcpCloudAccountValidateEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_gcp_cloud_cluster_config_entity.go b/api/models/v1_gcp_cloud_cluster_config_entity.go new file mode 100644 index 00000000..668d0444 --- /dev/null +++ b/api/models/v1_gcp_cloud_cluster_config_entity.go @@ -0,0 +1,71 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1GcpCloudClusterConfigEntity Gcp cloud cluster config entity +// +// swagger:model v1GcpCloudClusterConfigEntity +type V1GcpCloudClusterConfigEntity struct { + + // cluster config + ClusterConfig *V1GcpClusterConfig `json:"clusterConfig,omitempty"` +} + +// Validate validates this v1 gcp cloud cluster config entity +func (m *V1GcpCloudClusterConfigEntity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateClusterConfig(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1GcpCloudClusterConfigEntity) validateClusterConfig(formats strfmt.Registry) error { + + if swag.IsZero(m.ClusterConfig) { // not required + return nil + } + + if m.ClusterConfig != nil { + if err := m.ClusterConfig.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("clusterConfig") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1GcpCloudClusterConfigEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1GcpCloudClusterConfigEntity) UnmarshalBinary(b []byte) error { + var res V1GcpCloudClusterConfigEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_gcp_cloud_config.go b/api/models/v1_gcp_cloud_config.go new file mode 100644 index 00000000..868755d5 --- /dev/null +++ b/api/models/v1_gcp_cloud_config.go @@ -0,0 +1,127 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1GcpCloudConfig GcpCloudConfig is the Schema for the gcpcloudconfigs API +// +// swagger:model v1GcpCloudConfig +type V1GcpCloudConfig struct { + + // APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + APIVersion string `json:"apiVersion,omitempty"` + + // Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + Kind string `json:"kind,omitempty"` + + // metadata + Metadata *V1ObjectMeta `json:"metadata,omitempty"` + + // spec + Spec *V1GcpCloudConfigSpec `json:"spec,omitempty"` + + // status + Status *V1GcpCloudConfigStatus `json:"status,omitempty"` +} + +// Validate validates this v1 gcp cloud config +func (m *V1GcpCloudConfig) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSpec(formats); err != nil { + res = append(res, err) + } + + if err := m.validateStatus(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1GcpCloudConfig) validateMetadata(formats strfmt.Registry) error { + + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } + return err + } + } + + return nil +} + +func (m *V1GcpCloudConfig) validateSpec(formats strfmt.Registry) error { + + if swag.IsZero(m.Spec) { // not required + return nil + } + + if m.Spec != nil { + if err := m.Spec.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec") + } + return err + } + } + + return nil +} + +func (m *V1GcpCloudConfig) validateStatus(formats strfmt.Registry) error { + + if swag.IsZero(m.Status) { // not required + return nil + } + + if m.Status != nil { + if err := m.Status.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("status") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1GcpCloudConfig) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1GcpCloudConfig) UnmarshalBinary(b []byte) error { + var res V1GcpCloudConfig + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_gcp_cloud_config_spec.go b/api/models/v1_gcp_cloud_config_spec.go new file mode 100644 index 00000000..c05299c1 --- /dev/null +++ b/api/models/v1_gcp_cloud_config_spec.go @@ -0,0 +1,130 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1GcpCloudConfigSpec GcpCloudConfigSpec defines the cloud configuration input by user This will translate to clusterspec/machinespec for cluster-api +// +// swagger:model v1GcpCloudConfigSpec +type V1GcpCloudConfigSpec struct { + + // cloudAccountRef should point to the secret which contains GcpCloudAccount + CloudAccountRef *V1ObjectReference `json:"cloudAccountRef,omitempty"` + + // cluster config + ClusterConfig *V1GcpClusterConfig `json:"clusterConfig,omitempty"` + + // machine pool config + MachinePoolConfig []*V1GcpMachinePoolConfig `json:"machinePoolConfig"` +} + +// Validate validates this v1 gcp cloud config spec +func (m *V1GcpCloudConfigSpec) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateCloudAccountRef(formats); err != nil { + res = append(res, err) + } + + if err := m.validateClusterConfig(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMachinePoolConfig(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1GcpCloudConfigSpec) validateCloudAccountRef(formats strfmt.Registry) error { + + if swag.IsZero(m.CloudAccountRef) { // not required + return nil + } + + if m.CloudAccountRef != nil { + if err := m.CloudAccountRef.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("cloudAccountRef") + } + return err + } + } + + return nil +} + +func (m *V1GcpCloudConfigSpec) validateClusterConfig(formats strfmt.Registry) error { + + if swag.IsZero(m.ClusterConfig) { // not required + return nil + } + + if m.ClusterConfig != nil { + if err := m.ClusterConfig.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("clusterConfig") + } + return err + } + } + + return nil +} + +func (m *V1GcpCloudConfigSpec) validateMachinePoolConfig(formats strfmt.Registry) error { + + if swag.IsZero(m.MachinePoolConfig) { // not required + return nil + } + + for i := 0; i < len(m.MachinePoolConfig); i++ { + if swag.IsZero(m.MachinePoolConfig[i]) { // not required + continue + } + + if m.MachinePoolConfig[i] != nil { + if err := m.MachinePoolConfig[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("machinePoolConfig" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1GcpCloudConfigSpec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1GcpCloudConfigSpec) UnmarshalBinary(b []byte) error { + var res V1GcpCloudConfigSpec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_gcp_cloud_config_status.go b/api/models/v1_gcp_cloud_config_status.go new file mode 100644 index 00000000..86e14549 --- /dev/null +++ b/api/models/v1_gcp_cloud_config_status.go @@ -0,0 +1,120 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1GcpCloudConfigStatus GcpCloudConfigStatus defines the observed state of GcpCloudConfig The cloudimage info built by Mold is stored here image should be mapped to a specific machinepool +// +// swagger:model v1GcpCloudConfigStatus +type V1GcpCloudConfigStatus struct { + + // For mold controller to identify if is there any changes in Pack + AnsibleRoleDigest string `json:"ansibleRoleDigest,omitempty"` + + // spectroAnsibleProvisioner: should be added only once, subsequent recocile will use the same provisioner SpectroAnsiblePacker bool `json:"spectroAnsiblePacker,omitempty"` + Conditions []*V1ClusterCondition `json:"conditions"` + + // Images array items should be 1-to-1 mapping to Spec.MachinePoolConfig + Images *V1GcpImage `json:"images,omitempty"` + + // addon layers present in spc + IsAddonLayer bool `json:"isAddonLayer,omitempty"` + + // this map will be for ansible roles present in each pack + RoleDigest map[string]string `json:"roleDigest,omitempty"` + + // sourceImageId, it can be from packref's annotations or from pack.json + SourceImageID string `json:"sourceImageId,omitempty"` + + // PackerVariableDigest string `json:"packerDigest,omitempty"` If no ansible roles found in Packs then Mold should tell Drive to use capi image and not create custom image, because there is nothing to add + UseCapiImage bool `json:"useCapiImage,omitempty"` +} + +// Validate validates this v1 gcp cloud config status +func (m *V1GcpCloudConfigStatus) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateConditions(formats); err != nil { + res = append(res, err) + } + + if err := m.validateImages(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1GcpCloudConfigStatus) validateConditions(formats strfmt.Registry) error { + + if swag.IsZero(m.Conditions) { // not required + return nil + } + + for i := 0; i < len(m.Conditions); i++ { + if swag.IsZero(m.Conditions[i]) { // not required + continue + } + + if m.Conditions[i] != nil { + if err := m.Conditions[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("conditions" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1GcpCloudConfigStatus) validateImages(formats strfmt.Registry) error { + + if swag.IsZero(m.Images) { // not required + return nil + } + + if m.Images != nil { + if err := m.Images.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("images") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1GcpCloudConfigStatus) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1GcpCloudConfigStatus) UnmarshalBinary(b []byte) error { + var res V1GcpCloudConfigStatus + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_gcp_cluster_config.go b/api/models/v1_gcp_cluster_config.go new file mode 100644 index 00000000..033edba3 --- /dev/null +++ b/api/models/v1_gcp_cluster_config.go @@ -0,0 +1,109 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1GcpClusterConfig Cluster level configuration for gcp cloud and applicable for all the machine pools +// +// swagger:model v1GcpClusterConfig +type V1GcpClusterConfig struct { + + // managed cluster config + ManagedClusterConfig *V1GcpManagedClusterConfig `json:"managedClusterConfig,omitempty"` + + // NetworkName if empty would create VPC Network in auto mode. If provided, custom VPC network will be used + Network string `json:"network,omitempty"` + + // Name of the project in which cluster is to be deployed + // Required: true + Project *string `json:"project"` + + // GCP region for the cluster + // Required: true + Region *string `json:"region"` +} + +// Validate validates this v1 gcp cluster config +func (m *V1GcpClusterConfig) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateManagedClusterConfig(formats); err != nil { + res = append(res, err) + } + + if err := m.validateProject(formats); err != nil { + res = append(res, err) + } + + if err := m.validateRegion(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1GcpClusterConfig) validateManagedClusterConfig(formats strfmt.Registry) error { + + if swag.IsZero(m.ManagedClusterConfig) { // not required + return nil + } + + if m.ManagedClusterConfig != nil { + if err := m.ManagedClusterConfig.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("managedClusterConfig") + } + return err + } + } + + return nil +} + +func (m *V1GcpClusterConfig) validateProject(formats strfmt.Registry) error { + + if err := validate.Required("project", "body", m.Project); err != nil { + return err + } + + return nil +} + +func (m *V1GcpClusterConfig) validateRegion(formats strfmt.Registry) error { + + if err := validate.Required("region", "body", m.Region); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1GcpClusterConfig) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1GcpClusterConfig) UnmarshalBinary(b []byte) error { + var res V1GcpClusterConfig + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_gcp_image.go b/api/models/v1_gcp_image.go new file mode 100644 index 00000000..5cede0ad --- /dev/null +++ b/api/models/v1_gcp_image.go @@ -0,0 +1,52 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1GcpImage Refers to GCP image +// +// swagger:model v1GcpImage +type V1GcpImage struct { + + // name + Name string `json:"name,omitempty"` + + // os + Os string `json:"os,omitempty"` + + // region + Region string `json:"region,omitempty"` + + // state + State string `json:"state,omitempty"` +} + +// Validate validates this v1 gcp image +func (m *V1GcpImage) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1GcpImage) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1GcpImage) UnmarshalBinary(b []byte) error { + var res V1GcpImage + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_gcp_image_url_entity.go b/api/models/v1_gcp_image_url_entity.go new file mode 100644 index 00000000..95040381 --- /dev/null +++ b/api/models/v1_gcp_image_url_entity.go @@ -0,0 +1,49 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1GcpImageURLEntity Gcp image url entity +// +// swagger:model v1GcpImageUrlEntity +type V1GcpImageURLEntity struct { + + // The name of the image family to which this image belongs + ImageFamily string `json:"imageFamily,omitempty"` + + // Server-defined URL for the resource + ImageURL string `json:"imageUrl,omitempty"` + + // Name of the resource + Name string `json:"name,omitempty"` +} + +// Validate validates this v1 gcp image Url entity +func (m *V1GcpImageURLEntity) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1GcpImageURLEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1GcpImageURLEntity) UnmarshalBinary(b []byte) error { + var res V1GcpImageURLEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_gcp_instance_types.go b/api/models/v1_gcp_instance_types.go new file mode 100644 index 00000000..bdb2e084 --- /dev/null +++ b/api/models/v1_gcp_instance_types.go @@ -0,0 +1,80 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1GcpInstanceTypes Retrieves a list of GCP instance types +// +// swagger:model v1GcpInstanceTypes +type V1GcpInstanceTypes struct { + + // List of GCP instance types + InstanceTypes []*V1InstanceType `json:"instanceTypes"` +} + +// Validate validates this v1 gcp instance types +func (m *V1GcpInstanceTypes) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateInstanceTypes(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1GcpInstanceTypes) validateInstanceTypes(formats strfmt.Registry) error { + + if swag.IsZero(m.InstanceTypes) { // not required + return nil + } + + for i := 0; i < len(m.InstanceTypes); i++ { + if swag.IsZero(m.InstanceTypes[i]) { // not required + continue + } + + if m.InstanceTypes[i] != nil { + if err := m.InstanceTypes[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("instanceTypes" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1GcpInstanceTypes) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1GcpInstanceTypes) UnmarshalBinary(b []byte) error { + var res V1GcpInstanceTypes + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_gcp_machine.go b/api/models/v1_gcp_machine.go new file mode 100644 index 00000000..f525cc66 --- /dev/null +++ b/api/models/v1_gcp_machine.go @@ -0,0 +1,127 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1GcpMachine GCP cloud VM definition +// +// swagger:model v1GcpMachine +type V1GcpMachine struct { + + // api version + APIVersion string `json:"apiVersion,omitempty"` + + // kind + Kind string `json:"kind,omitempty"` + + // metadata + Metadata *V1ObjectMeta `json:"metadata,omitempty"` + + // spec + Spec *V1GcpMachineSpec `json:"spec,omitempty"` + + // status + Status *V1CloudMachineStatus `json:"status,omitempty"` +} + +// Validate validates this v1 gcp machine +func (m *V1GcpMachine) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSpec(formats); err != nil { + res = append(res, err) + } + + if err := m.validateStatus(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1GcpMachine) validateMetadata(formats strfmt.Registry) error { + + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } + return err + } + } + + return nil +} + +func (m *V1GcpMachine) validateSpec(formats strfmt.Registry) error { + + if swag.IsZero(m.Spec) { // not required + return nil + } + + if m.Spec != nil { + if err := m.Spec.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec") + } + return err + } + } + + return nil +} + +func (m *V1GcpMachine) validateStatus(formats strfmt.Registry) error { + + if swag.IsZero(m.Status) { // not required + return nil + } + + if m.Status != nil { + if err := m.Status.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("status") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1GcpMachine) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1GcpMachine) UnmarshalBinary(b []byte) error { + var res V1GcpMachine + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_gcp_machine_pool_cloud_config_entity.go b/api/models/v1_gcp_machine_pool_cloud_config_entity.go new file mode 100644 index 00000000..a5310d3b --- /dev/null +++ b/api/models/v1_gcp_machine_pool_cloud_config_entity.go @@ -0,0 +1,107 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1GcpMachinePoolCloudConfigEntity v1 gcp machine pool cloud config entity +// +// swagger:model v1GcpMachinePoolCloudConfigEntity +type V1GcpMachinePoolCloudConfigEntity struct { + + // azs + Azs []string `json:"azs"` + + // instance type + // Required: true + InstanceType *string `json:"instanceType"` + + // Size of root volume in GB. Default is 30GB + RootDeviceSize int64 `json:"rootDeviceSize,omitempty"` + + // Subnet specifies the subnetwork to use for given instance. If not specified, the first subnet from the cluster region and network is used + Subnet string `json:"subnet,omitempty"` + + // subnets + Subnets []*V1GcpSubnetEntity `json:"subnets"` +} + +// Validate validates this v1 gcp machine pool cloud config entity +func (m *V1GcpMachinePoolCloudConfigEntity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateInstanceType(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSubnets(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1GcpMachinePoolCloudConfigEntity) validateInstanceType(formats strfmt.Registry) error { + + if err := validate.Required("instanceType", "body", m.InstanceType); err != nil { + return err + } + + return nil +} + +func (m *V1GcpMachinePoolCloudConfigEntity) validateSubnets(formats strfmt.Registry) error { + + if swag.IsZero(m.Subnets) { // not required + return nil + } + + for i := 0; i < len(m.Subnets); i++ { + if swag.IsZero(m.Subnets[i]) { // not required + continue + } + + if m.Subnets[i] != nil { + if err := m.Subnets[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("subnets" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1GcpMachinePoolCloudConfigEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1GcpMachinePoolCloudConfigEntity) UnmarshalBinary(b []byte) error { + var res V1GcpMachinePoolCloudConfigEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_gcp_machine_pool_config.go b/api/models/v1_gcp_machine_pool_config.go new file mode 100644 index 00000000..ac04fa34 --- /dev/null +++ b/api/models/v1_gcp_machine_pool_config.go @@ -0,0 +1,234 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1GcpMachinePoolConfig v1 gcp machine pool config +// +// swagger:model v1GcpMachinePoolConfig +type V1GcpMachinePoolConfig struct { + + // additionalLabels + AdditionalLabels map[string]string `json:"additionalLabels,omitempty"` + + // AdditionalTags is an optional set of tags to add to resources managed by the provider, in addition to the ones added by default. For eg., tags for EKS nodeGroup or EKS NodegroupIAMRole + AdditionalTags map[string]string `json:"additionalTags,omitempty"` + + // azs + Azs []string `json:"azs"` + + // instance config + InstanceConfig *V1InstanceConfig `json:"instanceConfig,omitempty"` + + // instance type + // Required: true + InstanceType *string `json:"instanceType"` + + // whether this pool is for control plane + // Required: true + IsControlPlane *bool `json:"isControlPlane"` + + // labels for this pool, example: control-plane/worker, gpu, windows + Labels []string `json:"labels"` + + // machine pool properties + MachinePoolProperties *V1MachinePoolProperties `json:"machinePoolProperties,omitempty"` + + // max size of the pool, for scaling + MaxSize int32 `json:"maxSize,omitempty"` + + // min size of the pool, for scaling + MinSize int32 `json:"minSize,omitempty"` + + // name + Name string `json:"name,omitempty"` + + // Minimum number of seconds a node should be Ready, before the next node is selected for repave. Applicable only for workerpools in infrastructure cluster + NodeRepaveInterval int32 `json:"nodeRepaveInterval,omitempty"` + + // Size of root volume in GB. Default is 30GB + RootDeviceSize int64 `json:"rootDeviceSize,omitempty"` + + // size of the pool, number of machines + Size int32 `json:"size,omitempty"` + + // Subnet specifies the subnetwork to use for given instance. If not specified, the first subnet from the cluster region and network is used + Subnet string `json:"subnet,omitempty"` + + // AZ to subnet mapping filled by ally from hubble SubnetIDs ["us-west-2d"] = "subnet-079b6061" This field is optional If we don't provide a subnetId then by default the first private subnet from the AZ will be picked up for deployment + SubnetIds map[string]string `json:"subnetIds,omitempty"` + + // control plane or worker taints + // Unique: true + Taints []*V1Taint `json:"taints"` + + // rolling update strategy for this machinepool if not specified, will use ScaleOut + UpdateStrategy *V1UpdateStrategy `json:"updateStrategy,omitempty"` + + // if IsControlPlane==true && useControlPlaneAsWorker==true, then will remove control plane taint this will not be used for worker pools + UseControlPlaneAsWorker bool `json:"useControlPlaneAsWorker,omitempty"` +} + +// Validate validates this v1 gcp machine pool config +func (m *V1GcpMachinePoolConfig) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateInstanceConfig(formats); err != nil { + res = append(res, err) + } + + if err := m.validateInstanceType(formats); err != nil { + res = append(res, err) + } + + if err := m.validateIsControlPlane(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMachinePoolProperties(formats); err != nil { + res = append(res, err) + } + + if err := m.validateTaints(formats); err != nil { + res = append(res, err) + } + + if err := m.validateUpdateStrategy(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1GcpMachinePoolConfig) validateInstanceConfig(formats strfmt.Registry) error { + + if swag.IsZero(m.InstanceConfig) { // not required + return nil + } + + if m.InstanceConfig != nil { + if err := m.InstanceConfig.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("instanceConfig") + } + return err + } + } + + return nil +} + +func (m *V1GcpMachinePoolConfig) validateInstanceType(formats strfmt.Registry) error { + + if err := validate.Required("instanceType", "body", m.InstanceType); err != nil { + return err + } + + return nil +} + +func (m *V1GcpMachinePoolConfig) validateIsControlPlane(formats strfmt.Registry) error { + + if err := validate.Required("isControlPlane", "body", m.IsControlPlane); err != nil { + return err + } + + return nil +} + +func (m *V1GcpMachinePoolConfig) validateMachinePoolProperties(formats strfmt.Registry) error { + + if swag.IsZero(m.MachinePoolProperties) { // not required + return nil + } + + if m.MachinePoolProperties != nil { + if err := m.MachinePoolProperties.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("machinePoolProperties") + } + return err + } + } + + return nil +} + +func (m *V1GcpMachinePoolConfig) validateTaints(formats strfmt.Registry) error { + + if swag.IsZero(m.Taints) { // not required + return nil + } + + if err := validate.UniqueItems("taints", "body", m.Taints); err != nil { + return err + } + + for i := 0; i < len(m.Taints); i++ { + if swag.IsZero(m.Taints[i]) { // not required + continue + } + + if m.Taints[i] != nil { + if err := m.Taints[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("taints" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1GcpMachinePoolConfig) validateUpdateStrategy(formats strfmt.Registry) error { + + if swag.IsZero(m.UpdateStrategy) { // not required + return nil + } + + if m.UpdateStrategy != nil { + if err := m.UpdateStrategy.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("updateStrategy") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1GcpMachinePoolConfig) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1GcpMachinePoolConfig) UnmarshalBinary(b []byte) error { + var res V1GcpMachinePoolConfig + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_gcp_machine_pool_config_entity.go b/api/models/v1_gcp_machine_pool_config_entity.go new file mode 100644 index 00000000..6386eb25 --- /dev/null +++ b/api/models/v1_gcp_machine_pool_config_entity.go @@ -0,0 +1,98 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1GcpMachinePoolConfigEntity v1 gcp machine pool config entity +// +// swagger:model v1GcpMachinePoolConfigEntity +type V1GcpMachinePoolConfigEntity struct { + + // cloud config + // Required: true + CloudConfig *V1GcpMachinePoolCloudConfigEntity `json:"cloudConfig"` + + // pool config + PoolConfig *V1MachinePoolConfigEntity `json:"poolConfig,omitempty"` +} + +// Validate validates this v1 gcp machine pool config entity +func (m *V1GcpMachinePoolConfigEntity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateCloudConfig(formats); err != nil { + res = append(res, err) + } + + if err := m.validatePoolConfig(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1GcpMachinePoolConfigEntity) validateCloudConfig(formats strfmt.Registry) error { + + if err := validate.Required("cloudConfig", "body", m.CloudConfig); err != nil { + return err + } + + if m.CloudConfig != nil { + if err := m.CloudConfig.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("cloudConfig") + } + return err + } + } + + return nil +} + +func (m *V1GcpMachinePoolConfigEntity) validatePoolConfig(formats strfmt.Registry) error { + + if swag.IsZero(m.PoolConfig) { // not required + return nil + } + + if m.PoolConfig != nil { + if err := m.PoolConfig.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("poolConfig") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1GcpMachinePoolConfigEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1GcpMachinePoolConfigEntity) UnmarshalBinary(b []byte) error { + var res V1GcpMachinePoolConfigEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_gcp_machine_spec.go b/api/models/v1_gcp_machine_spec.go new file mode 100644 index 00000000..09e117b1 --- /dev/null +++ b/api/models/v1_gcp_machine_spec.go @@ -0,0 +1,138 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1GcpMachineSpec GCP cloud VM definition spec +// +// swagger:model v1GcpMachineSpec +type V1GcpMachineSpec struct { + + // image + Image string `json:"image,omitempty"` + + // instance config + InstanceConfig *V1InstanceConfig `json:"instanceConfig,omitempty"` + + // instance type + // Required: true + InstanceType *string `json:"instanceType"` + + // nics + Nics []*V1GcpNic `json:"nics"` + + // project + Project string `json:"project,omitempty"` + + // region + Region string `json:"region,omitempty"` + + // root device size + RootDeviceSize int64 `json:"rootDeviceSize,omitempty"` + + // zone + Zone string `json:"zone,omitempty"` +} + +// Validate validates this v1 gcp machine spec +func (m *V1GcpMachineSpec) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateInstanceConfig(formats); err != nil { + res = append(res, err) + } + + if err := m.validateInstanceType(formats); err != nil { + res = append(res, err) + } + + if err := m.validateNics(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1GcpMachineSpec) validateInstanceConfig(formats strfmt.Registry) error { + + if swag.IsZero(m.InstanceConfig) { // not required + return nil + } + + if m.InstanceConfig != nil { + if err := m.InstanceConfig.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("instanceConfig") + } + return err + } + } + + return nil +} + +func (m *V1GcpMachineSpec) validateInstanceType(formats strfmt.Registry) error { + + if err := validate.Required("instanceType", "body", m.InstanceType); err != nil { + return err + } + + return nil +} + +func (m *V1GcpMachineSpec) validateNics(formats strfmt.Registry) error { + + if swag.IsZero(m.Nics) { // not required + return nil + } + + for i := 0; i < len(m.Nics); i++ { + if swag.IsZero(m.Nics[i]) { // not required + continue + } + + if m.Nics[i] != nil { + if err := m.Nics[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("nics" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1GcpMachineSpec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1GcpMachineSpec) UnmarshalBinary(b []byte) error { + var res V1GcpMachineSpec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_gcp_machines.go b/api/models/v1_gcp_machines.go new file mode 100644 index 00000000..4bc317f1 --- /dev/null +++ b/api/models/v1_gcp_machines.go @@ -0,0 +1,112 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1GcpMachines GCP machine list +// +// swagger:model v1GcpMachines +type V1GcpMachines struct { + + // items + // Required: true + // Unique: true + Items []*V1GcpMachine `json:"items"` + + // listmeta + Listmeta *V1ListMetaData `json:"listmeta,omitempty"` +} + +// Validate validates this v1 gcp machines +func (m *V1GcpMachines) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateItems(formats); err != nil { + res = append(res, err) + } + + if err := m.validateListmeta(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1GcpMachines) validateItems(formats strfmt.Registry) error { + + if err := validate.Required("items", "body", m.Items); err != nil { + return err + } + + if err := validate.UniqueItems("items", "body", m.Items); err != nil { + return err + } + + for i := 0; i < len(m.Items); i++ { + if swag.IsZero(m.Items[i]) { // not required + continue + } + + if m.Items[i] != nil { + if err := m.Items[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("items" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1GcpMachines) validateListmeta(formats strfmt.Registry) error { + + if swag.IsZero(m.Listmeta) { // not required + return nil + } + + if m.Listmeta != nil { + if err := m.Listmeta.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("listmeta") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1GcpMachines) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1GcpMachines) UnmarshalBinary(b []byte) error { + var res V1GcpMachines + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_gcp_managed_cluster_config.go b/api/models/v1_gcp_managed_cluster_config.go new file mode 100644 index 00000000..220e1ef2 --- /dev/null +++ b/api/models/v1_gcp_managed_cluster_config.go @@ -0,0 +1,46 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1GcpManagedClusterConfig GCP managed cluster config +// +// swagger:model v1GcpManagedClusterConfig +type V1GcpManagedClusterConfig struct { + + // EnableAutopilot indicates whether to enable autopilot for this GKE cluster + EnableAutoPilot bool `json:"enableAutoPilot,omitempty"` + + // Can be Region or Zone + Location string `json:"location,omitempty"` +} + +// Validate validates this v1 gcp managed cluster config +func (m *V1GcpManagedClusterConfig) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1GcpManagedClusterConfig) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1GcpManagedClusterConfig) UnmarshalBinary(b []byte) error { + var res V1GcpManagedClusterConfig + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_gcp_network.go b/api/models/v1_gcp_network.go new file mode 100644 index 00000000..a645819a --- /dev/null +++ b/api/models/v1_gcp_network.go @@ -0,0 +1,83 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1GcpNetwork GCP network enity is a virtual version of a physical network +// +// swagger:model v1GcpNetwork +type V1GcpNetwork struct { + + // GCP network name + Name string `json:"name,omitempty"` + + // List of GCP subnet + Subnets []*V1GcpSubnet `json:"subnets"` +} + +// Validate validates this v1 gcp network +func (m *V1GcpNetwork) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateSubnets(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1GcpNetwork) validateSubnets(formats strfmt.Registry) error { + + if swag.IsZero(m.Subnets) { // not required + return nil + } + + for i := 0; i < len(m.Subnets); i++ { + if swag.IsZero(m.Subnets[i]) { // not required + continue + } + + if m.Subnets[i] != nil { + if err := m.Subnets[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("subnets" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1GcpNetwork) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1GcpNetwork) UnmarshalBinary(b []byte) error { + var res V1GcpNetwork + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_gcp_networks.go b/api/models/v1_gcp_networks.go new file mode 100644 index 00000000..d2017e04 --- /dev/null +++ b/api/models/v1_gcp_networks.go @@ -0,0 +1,80 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1GcpNetworks List of GCP networks +// +// swagger:model v1GcpNetworks +type V1GcpNetworks struct { + + // networks + Networks []*V1GcpNetwork `json:"networks"` +} + +// Validate validates this v1 gcp networks +func (m *V1GcpNetworks) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateNetworks(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1GcpNetworks) validateNetworks(formats strfmt.Registry) error { + + if swag.IsZero(m.Networks) { // not required + return nil + } + + for i := 0; i < len(m.Networks); i++ { + if swag.IsZero(m.Networks[i]) { // not required + continue + } + + if m.Networks[i] != nil { + if err := m.Networks[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("networks" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1GcpNetworks) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1GcpNetworks) UnmarshalBinary(b []byte) error { + var res V1GcpNetworks + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_gcp_nic.go b/api/models/v1_gcp_nic.go new file mode 100644 index 00000000..76a21df6 --- /dev/null +++ b/api/models/v1_gcp_nic.go @@ -0,0 +1,52 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1GcpNic GCP network interface +// +// swagger:model v1GcpNic +type V1GcpNic struct { + + // index + Index int8 `json:"index,omitempty"` + + // network name + NetworkName string `json:"networkName,omitempty"` + + // private i ps + PrivateIPs []string `json:"privateIPs"` + + // public Ip + PublicIP string `json:"publicIp,omitempty"` +} + +// Validate validates this v1 gcp nic +func (m *V1GcpNic) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1GcpNic) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1GcpNic) UnmarshalBinary(b []byte) error { + var res V1GcpNic + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_gcp_project.go b/api/models/v1_gcp_project.go new file mode 100644 index 00000000..6913698a --- /dev/null +++ b/api/models/v1_gcp_project.go @@ -0,0 +1,46 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1GcpProject GCP project organizes all Google Cloud resources +// +// swagger:model v1GcpProject +type V1GcpProject struct { + + // GCP project id + ID string `json:"id,omitempty"` + + // GCP project name + Name string `json:"name,omitempty"` +} + +// Validate validates this v1 gcp project +func (m *V1GcpProject) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1GcpProject) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1GcpProject) UnmarshalBinary(b []byte) error { + var res V1GcpProject + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_gcp_projects.go b/api/models/v1_gcp_projects.go new file mode 100644 index 00000000..97c8d402 --- /dev/null +++ b/api/models/v1_gcp_projects.go @@ -0,0 +1,80 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1GcpProjects List of GCP Projects +// +// swagger:model v1GcpProjects +type V1GcpProjects struct { + + // List of GCP Projects + Projects []*V1GcpProject `json:"projects"` +} + +// Validate validates this v1 gcp projects +func (m *V1GcpProjects) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateProjects(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1GcpProjects) validateProjects(formats strfmt.Registry) error { + + if swag.IsZero(m.Projects) { // not required + return nil + } + + for i := 0; i < len(m.Projects); i++ { + if swag.IsZero(m.Projects[i]) { // not required + continue + } + + if m.Projects[i] != nil { + if err := m.Projects[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("projects" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1GcpProjects) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1GcpProjects) UnmarshalBinary(b []byte) error { + var res V1GcpProjects + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_gcp_properties_validate_spec.go b/api/models/v1_gcp_properties_validate_spec.go new file mode 100644 index 00000000..6b542381 --- /dev/null +++ b/api/models/v1_gcp_properties_validate_spec.go @@ -0,0 +1,52 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1GcpPropertiesValidateSpec Gcp properties validate spec +// +// swagger:model V1GcpPropertiesValidateSpec +type V1GcpPropertiesValidateSpec struct { + + // azs + Azs []string `json:"azs"` + + // cloud account Uid + CloudAccountUID string `json:"cloudAccountUid,omitempty"` + + // project Id + ProjectID string `json:"projectId,omitempty"` + + // region + Region string `json:"region,omitempty"` +} + +// Validate validates this v1 gcp properties validate spec +func (m *V1GcpPropertiesValidateSpec) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1GcpPropertiesValidateSpec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1GcpPropertiesValidateSpec) UnmarshalBinary(b []byte) error { + var res V1GcpPropertiesValidateSpec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_gcp_region.go b/api/models/v1_gcp_region.go new file mode 100644 index 00000000..cda3e13c --- /dev/null +++ b/api/models/v1_gcp_region.go @@ -0,0 +1,46 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1GcpRegion Geographical region made up of zones where you can host your GCP resources +// +// swagger:model v1GcpRegion +type V1GcpRegion struct { + + // GCP region name + Name string `json:"name,omitempty"` + + // GCP region status + Status string `json:"status,omitempty"` +} + +// Validate validates this v1 gcp region +func (m *V1GcpRegion) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1GcpRegion) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1GcpRegion) UnmarshalBinary(b []byte) error { + var res V1GcpRegion + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_gcp_regions.go b/api/models/v1_gcp_regions.go new file mode 100644 index 00000000..1648dc89 --- /dev/null +++ b/api/models/v1_gcp_regions.go @@ -0,0 +1,80 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1GcpRegions List of GCP Regions +// +// swagger:model v1GcpRegions +type V1GcpRegions struct { + + // regions + Regions []*V1GcpRegion `json:"regions"` +} + +// Validate validates this v1 gcp regions +func (m *V1GcpRegions) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateRegions(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1GcpRegions) validateRegions(formats strfmt.Registry) error { + + if swag.IsZero(m.Regions) { // not required + return nil + } + + for i := 0; i < len(m.Regions); i++ { + if swag.IsZero(m.Regions[i]) { // not required + continue + } + + if m.Regions[i] != nil { + if err := m.Regions[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("regions" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1GcpRegions) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1GcpRegions) UnmarshalBinary(b []byte) error { + var res V1GcpRegions + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_gcp_storage_config.go b/api/models/v1_gcp_storage_config.go new file mode 100644 index 00000000..5f2b39f5 --- /dev/null +++ b/api/models/v1_gcp_storage_config.go @@ -0,0 +1,93 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1GcpStorageConfig GCP storage config object +// +// swagger:model v1GcpStorageConfig +type V1GcpStorageConfig struct { + + // GCP storage bucket name + // Required: true + BucketName *string `json:"bucketName"` + + // GCP cloud account credentials + // Required: true + Credentials *V1GcpAccountEntitySpec `json:"credentials"` + + // GCP project id + ProjectID string `json:"projectId,omitempty"` +} + +// Validate validates this v1 gcp storage config +func (m *V1GcpStorageConfig) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateBucketName(formats); err != nil { + res = append(res, err) + } + + if err := m.validateCredentials(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1GcpStorageConfig) validateBucketName(formats strfmt.Registry) error { + + if err := validate.Required("bucketName", "body", m.BucketName); err != nil { + return err + } + + return nil +} + +func (m *V1GcpStorageConfig) validateCredentials(formats strfmt.Registry) error { + + if err := validate.Required("credentials", "body", m.Credentials); err != nil { + return err + } + + if m.Credentials != nil { + if err := m.Credentials.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("credentials") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1GcpStorageConfig) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1GcpStorageConfig) UnmarshalBinary(b []byte) error { + var res V1GcpStorageConfig + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_gcp_storage_types.go b/api/models/v1_gcp_storage_types.go new file mode 100644 index 00000000..d787312b --- /dev/null +++ b/api/models/v1_gcp_storage_types.go @@ -0,0 +1,80 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1GcpStorageTypes List of GCP storage types +// +// swagger:model v1GcpStorageTypes +type V1GcpStorageTypes struct { + + // storage types + StorageTypes []*V1StorageType `json:"storageTypes"` +} + +// Validate validates this v1 gcp storage types +func (m *V1GcpStorageTypes) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateStorageTypes(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1GcpStorageTypes) validateStorageTypes(formats strfmt.Registry) error { + + if swag.IsZero(m.StorageTypes) { // not required + return nil + } + + for i := 0; i < len(m.StorageTypes); i++ { + if swag.IsZero(m.StorageTypes[i]) { // not required + continue + } + + if m.StorageTypes[i] != nil { + if err := m.StorageTypes[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("storageTypes" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1GcpStorageTypes) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1GcpStorageTypes) UnmarshalBinary(b []byte) error { + var res V1GcpStorageTypes + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_gcp_subnet.go b/api/models/v1_gcp_subnet.go new file mode 100644 index 00000000..5f420bdf --- /dev/null +++ b/api/models/v1_gcp_subnet.go @@ -0,0 +1,46 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1GcpSubnet Subnets are regional resources, and have IP address ranges associated with them +// +// swagger:model v1GcpSubnet +type V1GcpSubnet struct { + + // GCP subnet id + ID string `json:"id,omitempty"` + + // GCP subnet name + Name string `json:"name,omitempty"` +} + +// Validate validates this v1 gcp subnet +func (m *V1GcpSubnet) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1GcpSubnet) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1GcpSubnet) UnmarshalBinary(b []byte) error { + var res V1GcpSubnet + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_gcp_subnet_entity.go b/api/models/v1_gcp_subnet_entity.go new file mode 100644 index 00000000..23d512f1 --- /dev/null +++ b/api/models/v1_gcp_subnet_entity.go @@ -0,0 +1,46 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1GcpSubnetEntity v1 gcp subnet entity +// +// swagger:model v1GcpSubnetEntity +type V1GcpSubnetEntity struct { + + // az + Az string `json:"az,omitempty"` + + // id + ID string `json:"id,omitempty"` +} + +// Validate validates this v1 gcp subnet entity +func (m *V1GcpSubnetEntity) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1GcpSubnetEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1GcpSubnetEntity) UnmarshalBinary(b []byte) error { + var res V1GcpSubnetEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_gcp_zone.go b/api/models/v1_gcp_zone.go new file mode 100644 index 00000000..0972a7f6 --- /dev/null +++ b/api/models/v1_gcp_zone.go @@ -0,0 +1,43 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1GcpZone A zone is a deployment area for Google Cloud resources within a region +// +// swagger:model v1GcpZone +type V1GcpZone struct { + + // GCP zone name + Name string `json:"name,omitempty"` +} + +// Validate validates this v1 gcp zone +func (m *V1GcpZone) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1GcpZone) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1GcpZone) UnmarshalBinary(b []byte) error { + var res V1GcpZone + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_gcp_zones.go b/api/models/v1_gcp_zones.go new file mode 100644 index 00000000..0a85f32e --- /dev/null +++ b/api/models/v1_gcp_zones.go @@ -0,0 +1,80 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1GcpZones List of GCP zones +// +// swagger:model v1GcpZones +type V1GcpZones struct { + + // zones + Zones []*V1GcpZone `json:"zones"` +} + +// Validate validates this v1 gcp zones +func (m *V1GcpZones) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateZones(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1GcpZones) validateZones(formats strfmt.Registry) error { + + if swag.IsZero(m.Zones) { // not required + return nil + } + + for i := 0; i < len(m.Zones); i++ { + if swag.IsZero(m.Zones[i]) { // not required + continue + } + + if m.Zones[i] != nil { + if err := m.Zones[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("zones" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1GcpZones) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1GcpZones) UnmarshalBinary(b []byte) error { + var res V1GcpZones + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_generic_cloud_cluster_config_entity.go b/api/models/v1_generic_cloud_cluster_config_entity.go new file mode 100644 index 00000000..ec271323 --- /dev/null +++ b/api/models/v1_generic_cloud_cluster_config_entity.go @@ -0,0 +1,71 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1GenericCloudClusterConfigEntity Generic cloud cluster config entity +// +// swagger:model v1GenericCloudClusterConfigEntity +type V1GenericCloudClusterConfigEntity struct { + + // cluster config + ClusterConfig *V1GenericClusterConfig `json:"clusterConfig,omitempty"` +} + +// Validate validates this v1 generic cloud cluster config entity +func (m *V1GenericCloudClusterConfigEntity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateClusterConfig(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1GenericCloudClusterConfigEntity) validateClusterConfig(formats strfmt.Registry) error { + + if swag.IsZero(m.ClusterConfig) { // not required + return nil + } + + if m.ClusterConfig != nil { + if err := m.ClusterConfig.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("clusterConfig") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1GenericCloudClusterConfigEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1GenericCloudClusterConfigEntity) UnmarshalBinary(b []byte) error { + var res V1GenericCloudClusterConfigEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_generic_cloud_config.go b/api/models/v1_generic_cloud_config.go new file mode 100644 index 00000000..613d88dc --- /dev/null +++ b/api/models/v1_generic_cloud_config.go @@ -0,0 +1,99 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1GenericCloudConfig Generic CloudConfig for all cloud types +// +// swagger:model v1GenericCloudConfig +type V1GenericCloudConfig struct { + + // kind + Kind string `json:"kind,omitempty"` + + // metadata + Metadata *V1ObjectMeta `json:"metadata,omitempty"` + + // spec + Spec *V1GenericCloudConfigSpec `json:"spec,omitempty"` +} + +// Validate validates this v1 generic cloud config +func (m *V1GenericCloudConfig) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSpec(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1GenericCloudConfig) validateMetadata(formats strfmt.Registry) error { + + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } + return err + } + } + + return nil +} + +func (m *V1GenericCloudConfig) validateSpec(formats strfmt.Registry) error { + + if swag.IsZero(m.Spec) { // not required + return nil + } + + if m.Spec != nil { + if err := m.Spec.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1GenericCloudConfig) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1GenericCloudConfig) UnmarshalBinary(b []byte) error { + var res V1GenericCloudConfig + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_generic_cloud_config_spec.go b/api/models/v1_generic_cloud_config_spec.go new file mode 100644 index 00000000..2333f246 --- /dev/null +++ b/api/models/v1_generic_cloud_config_spec.go @@ -0,0 +1,162 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1GenericCloudConfigSpec Generic CloudConfig spec for all cloud types +// +// swagger:model v1GenericCloudConfigSpec +type V1GenericCloudConfigSpec struct { + + // Cloud account reference is optional and dynamically handled based on the kind + CloudAccountRef *V1ObjectReference `json:"cloudAccountRef,omitempty"` + + // cluster config + ClusterConfig *V1GenericClusterConfig `json:"clusterConfig,omitempty"` + + // Appliances (Edge Host) uids + EdgeHostRefs []*V1ObjectReference `json:"edgeHostRefs"` + + // machine pool config + MachinePoolConfig []*V1GenericMachinePoolConfig `json:"machinePoolConfig"` +} + +// Validate validates this v1 generic cloud config spec +func (m *V1GenericCloudConfigSpec) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateCloudAccountRef(formats); err != nil { + res = append(res, err) + } + + if err := m.validateClusterConfig(formats); err != nil { + res = append(res, err) + } + + if err := m.validateEdgeHostRefs(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMachinePoolConfig(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1GenericCloudConfigSpec) validateCloudAccountRef(formats strfmt.Registry) error { + + if swag.IsZero(m.CloudAccountRef) { // not required + return nil + } + + if m.CloudAccountRef != nil { + if err := m.CloudAccountRef.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("cloudAccountRef") + } + return err + } + } + + return nil +} + +func (m *V1GenericCloudConfigSpec) validateClusterConfig(formats strfmt.Registry) error { + + if swag.IsZero(m.ClusterConfig) { // not required + return nil + } + + if m.ClusterConfig != nil { + if err := m.ClusterConfig.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("clusterConfig") + } + return err + } + } + + return nil +} + +func (m *V1GenericCloudConfigSpec) validateEdgeHostRefs(formats strfmt.Registry) error { + + if swag.IsZero(m.EdgeHostRefs) { // not required + return nil + } + + for i := 0; i < len(m.EdgeHostRefs); i++ { + if swag.IsZero(m.EdgeHostRefs[i]) { // not required + continue + } + + if m.EdgeHostRefs[i] != nil { + if err := m.EdgeHostRefs[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("edgeHostRefs" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1GenericCloudConfigSpec) validateMachinePoolConfig(formats strfmt.Registry) error { + + if swag.IsZero(m.MachinePoolConfig) { // not required + return nil + } + + for i := 0; i < len(m.MachinePoolConfig); i++ { + if swag.IsZero(m.MachinePoolConfig[i]) { // not required + continue + } + + if m.MachinePoolConfig[i] != nil { + if err := m.MachinePoolConfig[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("machinePoolConfig" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1GenericCloudConfigSpec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1GenericCloudConfigSpec) UnmarshalBinary(b []byte) error { + var res V1GenericCloudConfigSpec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_generic_cluster_config.go b/api/models/v1_generic_cluster_config.go new file mode 100644 index 00000000..c7f22787 --- /dev/null +++ b/api/models/v1_generic_cluster_config.go @@ -0,0 +1,74 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1GenericClusterConfig Generic cluster config +// +// swagger:model v1GenericClusterConfig +type V1GenericClusterConfig struct { + + // instance type + InstanceType *V1GenericInstanceType `json:"instanceType,omitempty"` + + // cluster region information + Region string `json:"region,omitempty"` +} + +// Validate validates this v1 generic cluster config +func (m *V1GenericClusterConfig) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateInstanceType(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1GenericClusterConfig) validateInstanceType(formats strfmt.Registry) error { + + if swag.IsZero(m.InstanceType) { // not required + return nil + } + + if m.InstanceType != nil { + if err := m.InstanceType.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("instanceType") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1GenericClusterConfig) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1GenericClusterConfig) UnmarshalBinary(b []byte) error { + var res V1GenericClusterConfig + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_generic_instance_type.go b/api/models/v1_generic_instance_type.go new file mode 100644 index 00000000..39289e10 --- /dev/null +++ b/api/models/v1_generic_instance_type.go @@ -0,0 +1,52 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1GenericInstanceType v1 generic instance type +// +// swagger:model v1GenericInstanceType +type V1GenericInstanceType struct { + + // DiskGiB is the size of a virtual machine's disk, in GiB + DiskGiB int32 `json:"diskGiB,omitempty"` + + // MemoryMiB is the size of a virtual machine's memory, in MiB + MemoryMiB int64 `json:"memoryMiB,omitempty"` + + // name + Name string `json:"name,omitempty"` + + // NumCPUs is the number of virtual processors in a virtual machine + NumCPUs int32 `json:"numCPUs,omitempty"` +} + +// Validate validates this v1 generic instance type +func (m *V1GenericInstanceType) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1GenericInstanceType) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1GenericInstanceType) UnmarshalBinary(b []byte) error { + var res V1GenericInstanceType + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_generic_machine.go b/api/models/v1_generic_machine.go new file mode 100644 index 00000000..e7a940d6 --- /dev/null +++ b/api/models/v1_generic_machine.go @@ -0,0 +1,127 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1GenericMachine Generic cloud VM definition +// +// swagger:model v1GenericMachine +type V1GenericMachine struct { + + // api version + APIVersion string `json:"apiVersion,omitempty"` + + // kind + Kind string `json:"kind,omitempty"` + + // metadata + Metadata *V1ObjectMeta `json:"metadata,omitempty"` + + // spec + Spec *V1GenericMachineSpec `json:"spec,omitempty"` + + // status + Status *V1CloudMachineStatus `json:"status,omitempty"` +} + +// Validate validates this v1 generic machine +func (m *V1GenericMachine) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSpec(formats); err != nil { + res = append(res, err) + } + + if err := m.validateStatus(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1GenericMachine) validateMetadata(formats strfmt.Registry) error { + + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } + return err + } + } + + return nil +} + +func (m *V1GenericMachine) validateSpec(formats strfmt.Registry) error { + + if swag.IsZero(m.Spec) { // not required + return nil + } + + if m.Spec != nil { + if err := m.Spec.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec") + } + return err + } + } + + return nil +} + +func (m *V1GenericMachine) validateStatus(formats strfmt.Registry) error { + + if swag.IsZero(m.Status) { // not required + return nil + } + + if m.Status != nil { + if err := m.Status.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("status") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1GenericMachine) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1GenericMachine) UnmarshalBinary(b []byte) error { + var res V1GenericMachine + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_generic_machine_pool_config.go b/api/models/v1_generic_machine_pool_config.go new file mode 100644 index 00000000..7944853c --- /dev/null +++ b/api/models/v1_generic_machine_pool_config.go @@ -0,0 +1,82 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1GenericMachinePoolConfig v1 generic machine pool config +// +// swagger:model v1GenericMachinePoolConfig +type V1GenericMachinePoolConfig struct { + + // instance type + InstanceType string `json:"instanceType,omitempty"` + + // whether this pool is for control plane + // Required: true + IsControlPlane *bool `json:"isControlPlane"` + + // labels for this pool, example: control-plane/worker, gpu, windows + Labels []string `json:"labels"` + + // name + Name string `json:"name,omitempty"` + + // Size of root volume in GB. Default is 30GB + RootDeviceSize int64 `json:"rootDeviceSize,omitempty"` + + // size of the pool, number of machines + Size int32 `json:"size,omitempty"` + + // if IsControlPlane==true && useControlPlaneAsWorker==true, then will remove control plane taint this will not be used for worker pools + UseControlPlaneAsWorker bool `json:"useControlPlaneAsWorker,omitempty"` +} + +// Validate validates this v1 generic machine pool config +func (m *V1GenericMachinePoolConfig) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateIsControlPlane(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1GenericMachinePoolConfig) validateIsControlPlane(formats strfmt.Registry) error { + + if err := validate.Required("isControlPlane", "body", m.IsControlPlane); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1GenericMachinePoolConfig) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1GenericMachinePoolConfig) UnmarshalBinary(b []byte) error { + var res V1GenericMachinePoolConfig + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_generic_machine_pool_config_entity.go b/api/models/v1_generic_machine_pool_config_entity.go new file mode 100644 index 00000000..1d660d35 --- /dev/null +++ b/api/models/v1_generic_machine_pool_config_entity.go @@ -0,0 +1,96 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1GenericMachinePoolConfigEntity v1 generic machine pool config entity +// +// swagger:model v1GenericMachinePoolConfigEntity +type V1GenericMachinePoolConfigEntity struct { + + // cloud config + CloudConfig *V1GenericClusterConfig `json:"cloudConfig,omitempty"` + + // pool config + PoolConfig *V1MachinePoolConfigEntity `json:"poolConfig,omitempty"` +} + +// Validate validates this v1 generic machine pool config entity +func (m *V1GenericMachinePoolConfigEntity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateCloudConfig(formats); err != nil { + res = append(res, err) + } + + if err := m.validatePoolConfig(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1GenericMachinePoolConfigEntity) validateCloudConfig(formats strfmt.Registry) error { + + if swag.IsZero(m.CloudConfig) { // not required + return nil + } + + if m.CloudConfig != nil { + if err := m.CloudConfig.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("cloudConfig") + } + return err + } + } + + return nil +} + +func (m *V1GenericMachinePoolConfigEntity) validatePoolConfig(formats strfmt.Registry) error { + + if swag.IsZero(m.PoolConfig) { // not required + return nil + } + + if m.PoolConfig != nil { + if err := m.PoolConfig.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("poolConfig") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1GenericMachinePoolConfigEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1GenericMachinePoolConfigEntity) UnmarshalBinary(b []byte) error { + var res V1GenericMachinePoolConfigEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_generic_machine_spec.go b/api/models/v1_generic_machine_spec.go new file mode 100644 index 00000000..e6edf833 --- /dev/null +++ b/api/models/v1_generic_machine_spec.go @@ -0,0 +1,114 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1GenericMachineSpec Generic cloud VM definition spec +// +// swagger:model v1GenericMachineSpec +type V1GenericMachineSpec struct { + + // host name + HostName string `json:"hostName,omitempty"` + + // image Id + ImageID string `json:"imageId,omitempty"` + + // instance type + InstanceType *V1GenericInstanceType `json:"instanceType,omitempty"` + + // nics + Nics []*V1GenericNic `json:"nics"` + + // ssh key name + SSHKeyName string `json:"sshKeyName,omitempty"` +} + +// Validate validates this v1 generic machine spec +func (m *V1GenericMachineSpec) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateInstanceType(formats); err != nil { + res = append(res, err) + } + + if err := m.validateNics(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1GenericMachineSpec) validateInstanceType(formats strfmt.Registry) error { + + if swag.IsZero(m.InstanceType) { // not required + return nil + } + + if m.InstanceType != nil { + if err := m.InstanceType.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("instanceType") + } + return err + } + } + + return nil +} + +func (m *V1GenericMachineSpec) validateNics(formats strfmt.Registry) error { + + if swag.IsZero(m.Nics) { // not required + return nil + } + + for i := 0; i < len(m.Nics); i++ { + if swag.IsZero(m.Nics[i]) { // not required + continue + } + + if m.Nics[i] != nil { + if err := m.Nics[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("nics" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1GenericMachineSpec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1GenericMachineSpec) UnmarshalBinary(b []byte) error { + var res V1GenericMachineSpec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_generic_machines.go b/api/models/v1_generic_machines.go new file mode 100644 index 00000000..2aee5f5a --- /dev/null +++ b/api/models/v1_generic_machines.go @@ -0,0 +1,112 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1GenericMachines Generic machine list +// +// swagger:model v1GenericMachines +type V1GenericMachines struct { + + // items + // Required: true + // Unique: true + Items []*V1GenericMachine `json:"items"` + + // listmeta + Listmeta *V1ListMetaData `json:"listmeta,omitempty"` +} + +// Validate validates this v1 generic machines +func (m *V1GenericMachines) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateItems(formats); err != nil { + res = append(res, err) + } + + if err := m.validateListmeta(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1GenericMachines) validateItems(formats strfmt.Registry) error { + + if err := validate.Required("items", "body", m.Items); err != nil { + return err + } + + if err := validate.UniqueItems("items", "body", m.Items); err != nil { + return err + } + + for i := 0; i < len(m.Items); i++ { + if swag.IsZero(m.Items[i]) { // not required + continue + } + + if m.Items[i] != nil { + if err := m.Items[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("items" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1GenericMachines) validateListmeta(formats strfmt.Registry) error { + + if swag.IsZero(m.Listmeta) { // not required + return nil + } + + if m.Listmeta != nil { + if err := m.Listmeta.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("listmeta") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1GenericMachines) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1GenericMachines) UnmarshalBinary(b []byte) error { + var res V1GenericMachines + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_generic_nic.go b/api/models/v1_generic_nic.go new file mode 100644 index 00000000..83e2ad38 --- /dev/null +++ b/api/models/v1_generic_nic.go @@ -0,0 +1,52 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1GenericNic Generic network interface +// +// swagger:model v1GenericNic +type V1GenericNic struct { + + // index + Index int8 `json:"index,omitempty"` + + // network name + NetworkName string `json:"networkName,omitempty"` + + // private i ps + PrivateIPs []string `json:"privateIPs"` + + // public Ip + PublicIP string `json:"publicIp,omitempty"` +} + +// Validate validates this v1 generic nic +func (m *V1GenericNic) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1GenericNic) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1GenericNic) UnmarshalBinary(b []byte) error { + var res V1GenericNic + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_geolocation_latlong.go b/api/models/v1_geolocation_latlong.go new file mode 100644 index 00000000..5b06b244 --- /dev/null +++ b/api/models/v1_geolocation_latlong.go @@ -0,0 +1,46 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1GeolocationLatlong Geolocation Latlong entity +// +// swagger:model v1GeolocationLatlong +type V1GeolocationLatlong struct { + + // Latitude of a resource + Latitude float64 `json:"latitude"` + + // Longitude of a resource + Longitude float64 `json:"longitude"` +} + +// Validate validates this v1 geolocation latlong +func (m *V1GeolocationLatlong) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1GeolocationLatlong) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1GeolocationLatlong) UnmarshalBinary(b []byte) error { + var res V1GeolocationLatlong + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_git_repo_file_content.go b/api/models/v1_git_repo_file_content.go new file mode 100644 index 00000000..5ec06343 --- /dev/null +++ b/api/models/v1_git_repo_file_content.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1GitRepoFileContent v1 git repo file content +// +// swagger:model v1GitRepoFileContent +type V1GitRepoFileContent struct { + + // content + Content string `json:"content,omitempty"` + + // name + Name string `json:"name,omitempty"` + + // path + Path string `json:"path,omitempty"` + + // repo name + RepoName string `json:"repoName,omitempty"` + + // sha + Sha string `json:"sha,omitempty"` +} + +// Validate validates this v1 git repo file content +func (m *V1GitRepoFileContent) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1GitRepoFileContent) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1GitRepoFileContent) UnmarshalBinary(b []byte) error { + var res V1GitRepoFileContent + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_helm_chart_option.go b/api/models/v1_helm_chart_option.go new file mode 100644 index 00000000..0f902581 --- /dev/null +++ b/api/models/v1_helm_chart_option.go @@ -0,0 +1,46 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1HelmChartOption If chart options are provided then the specified chart is validated first and synced immediately. If the specified chart is not found in the specified registry then creation is cancelled. +// +// swagger:model v1HelmChartOption +type V1HelmChartOption struct { + + // name + Name string `json:"name,omitempty"` + + // version + Version string `json:"version,omitempty"` +} + +// Validate validates this v1 helm chart option +func (m *V1HelmChartOption) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1HelmChartOption) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1HelmChartOption) UnmarshalBinary(b []byte) error { + var res V1HelmChartOption + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_helm_registries.go b/api/models/v1_helm_registries.go new file mode 100644 index 00000000..2c5a2c08 --- /dev/null +++ b/api/models/v1_helm_registries.go @@ -0,0 +1,112 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1HelmRegistries v1 helm registries +// +// swagger:model v1HelmRegistries +type V1HelmRegistries struct { + + // items + // Required: true + // Unique: true + Items []*V1HelmRegistry `json:"items"` + + // listmeta + Listmeta *V1ListMetaData `json:"listmeta,omitempty"` +} + +// Validate validates this v1 helm registries +func (m *V1HelmRegistries) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateItems(formats); err != nil { + res = append(res, err) + } + + if err := m.validateListmeta(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1HelmRegistries) validateItems(formats strfmt.Registry) error { + + if err := validate.Required("items", "body", m.Items); err != nil { + return err + } + + if err := validate.UniqueItems("items", "body", m.Items); err != nil { + return err + } + + for i := 0; i < len(m.Items); i++ { + if swag.IsZero(m.Items[i]) { // not required + continue + } + + if m.Items[i] != nil { + if err := m.Items[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("items" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1HelmRegistries) validateListmeta(formats strfmt.Registry) error { + + if swag.IsZero(m.Listmeta) { // not required + return nil + } + + if m.Listmeta != nil { + if err := m.Listmeta.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("listmeta") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1HelmRegistries) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1HelmRegistries) UnmarshalBinary(b []byte) error { + var res V1HelmRegistries + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_helm_registries_summary.go b/api/models/v1_helm_registries_summary.go new file mode 100644 index 00000000..1f54225a --- /dev/null +++ b/api/models/v1_helm_registries_summary.go @@ -0,0 +1,112 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1HelmRegistriesSummary Helm Registries Summary +// +// swagger:model v1HelmRegistriesSummary +type V1HelmRegistriesSummary struct { + + // items + // Required: true + // Unique: true + Items []*V1HelmRegistrySummary `json:"items"` + + // listmeta + Listmeta *V1ListMetaData `json:"listmeta,omitempty"` +} + +// Validate validates this v1 helm registries summary +func (m *V1HelmRegistriesSummary) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateItems(formats); err != nil { + res = append(res, err) + } + + if err := m.validateListmeta(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1HelmRegistriesSummary) validateItems(formats strfmt.Registry) error { + + if err := validate.Required("items", "body", m.Items); err != nil { + return err + } + + if err := validate.UniqueItems("items", "body", m.Items); err != nil { + return err + } + + for i := 0; i < len(m.Items); i++ { + if swag.IsZero(m.Items[i]) { // not required + continue + } + + if m.Items[i] != nil { + if err := m.Items[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("items" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1HelmRegistriesSummary) validateListmeta(formats strfmt.Registry) error { + + if swag.IsZero(m.Listmeta) { // not required + return nil + } + + if m.Listmeta != nil { + if err := m.Listmeta.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("listmeta") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1HelmRegistriesSummary) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1HelmRegistriesSummary) UnmarshalBinary(b []byte) error { + var res V1HelmRegistriesSummary + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_helm_registry.go b/api/models/v1_helm_registry.go new file mode 100644 index 00000000..6232088a --- /dev/null +++ b/api/models/v1_helm_registry.go @@ -0,0 +1,127 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1HelmRegistry Helm registry information +// +// swagger:model v1HelmRegistry +type V1HelmRegistry struct { + + // api version + APIVersion string `json:"apiVersion,omitempty"` + + // kind + Kind string `json:"kind,omitempty"` + + // metadata + Metadata *V1ObjectMeta `json:"metadata,omitempty"` + + // spec + Spec *V1HelmRegistrySpec `json:"spec,omitempty"` + + // status + Status *V1HelmRegistryStatus `json:"status,omitempty"` +} + +// Validate validates this v1 helm registry +func (m *V1HelmRegistry) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSpec(formats); err != nil { + res = append(res, err) + } + + if err := m.validateStatus(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1HelmRegistry) validateMetadata(formats strfmt.Registry) error { + + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } + return err + } + } + + return nil +} + +func (m *V1HelmRegistry) validateSpec(formats strfmt.Registry) error { + + if swag.IsZero(m.Spec) { // not required + return nil + } + + if m.Spec != nil { + if err := m.Spec.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec") + } + return err + } + } + + return nil +} + +func (m *V1HelmRegistry) validateStatus(formats strfmt.Registry) error { + + if swag.IsZero(m.Status) { // not required + return nil + } + + if m.Status != nil { + if err := m.Status.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("status") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1HelmRegistry) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1HelmRegistry) UnmarshalBinary(b []byte) error { + var res V1HelmRegistry + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_helm_registry_create_option.go b/api/models/v1_helm_registry_create_option.go new file mode 100644 index 00000000..5081fb76 --- /dev/null +++ b/api/models/v1_helm_registry_create_option.go @@ -0,0 +1,89 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1HelmRegistryCreateOption Helm registry create options +// +// swagger:model v1HelmRegistryCreateOption +type V1HelmRegistryCreateOption struct { + + // charts + // Unique: true + Charts []*V1HelmChartOption `json:"charts"` + + // skip sync + SkipSync bool `json:"skipSync,omitempty"` +} + +// Validate validates this v1 helm registry create option +func (m *V1HelmRegistryCreateOption) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateCharts(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1HelmRegistryCreateOption) validateCharts(formats strfmt.Registry) error { + + if swag.IsZero(m.Charts) { // not required + return nil + } + + if err := validate.UniqueItems("charts", "body", m.Charts); err != nil { + return err + } + + for i := 0; i < len(m.Charts); i++ { + if swag.IsZero(m.Charts[i]) { // not required + continue + } + + if m.Charts[i] != nil { + if err := m.Charts[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("charts" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1HelmRegistryCreateOption) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1HelmRegistryCreateOption) UnmarshalBinary(b []byte) error { + var res V1HelmRegistryCreateOption + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_helm_registry_entity.go b/api/models/v1_helm_registry_entity.go new file mode 100644 index 00000000..b37ff42e --- /dev/null +++ b/api/models/v1_helm_registry_entity.go @@ -0,0 +1,96 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1HelmRegistryEntity Helm registry information +// +// swagger:model v1HelmRegistryEntity +type V1HelmRegistryEntity struct { + + // metadata + Metadata *V1ObjectMeta `json:"metadata,omitempty"` + + // spec + Spec *V1HelmRegistrySpecEntity `json:"spec,omitempty"` +} + +// Validate validates this v1 helm registry entity +func (m *V1HelmRegistryEntity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSpec(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1HelmRegistryEntity) validateMetadata(formats strfmt.Registry) error { + + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } + return err + } + } + + return nil +} + +func (m *V1HelmRegistryEntity) validateSpec(formats strfmt.Registry) error { + + if swag.IsZero(m.Spec) { // not required + return nil + } + + if m.Spec != nil { + if err := m.Spec.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1HelmRegistryEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1HelmRegistryEntity) UnmarshalBinary(b []byte) error { + var res V1HelmRegistryEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_helm_registry_spec.go b/api/models/v1_helm_registry_spec.go new file mode 100644 index 00000000..006499a2 --- /dev/null +++ b/api/models/v1_helm_registry_spec.go @@ -0,0 +1,102 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1HelmRegistrySpec Helm registry credentials spec +// +// swagger:model v1HelmRegistrySpec +type V1HelmRegistrySpec struct { + + // auth + // Required: true + Auth *V1RegistryAuth `json:"auth"` + + // endpoint + // Required: true + Endpoint *string `json:"endpoint"` + + // is private + IsPrivate bool `json:"isPrivate"` + + // name + Name string `json:"name,omitempty"` + + // Helm registry uid + RegistryUID string `json:"registryUid,omitempty"` + + // scope + Scope string `json:"scope,omitempty"` +} + +// Validate validates this v1 helm registry spec +func (m *V1HelmRegistrySpec) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateAuth(formats); err != nil { + res = append(res, err) + } + + if err := m.validateEndpoint(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1HelmRegistrySpec) validateAuth(formats strfmt.Registry) error { + + if err := validate.Required("auth", "body", m.Auth); err != nil { + return err + } + + if m.Auth != nil { + if err := m.Auth.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("auth") + } + return err + } + } + + return nil +} + +func (m *V1HelmRegistrySpec) validateEndpoint(formats strfmt.Registry) error { + + if err := validate.Required("endpoint", "body", m.Endpoint); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1HelmRegistrySpec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1HelmRegistrySpec) UnmarshalBinary(b []byte) error { + var res V1HelmRegistrySpec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_helm_registry_spec_entity.go b/api/models/v1_helm_registry_spec_entity.go new file mode 100644 index 00000000..002df77a --- /dev/null +++ b/api/models/v1_helm_registry_spec_entity.go @@ -0,0 +1,124 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1HelmRegistrySpecEntity Helm registry credentials spec +// +// swagger:model v1HelmRegistrySpecEntity +type V1HelmRegistrySpecEntity struct { + + // auth + // Required: true + Auth *V1RegistryAuth `json:"auth"` + + // create option + CreateOption *V1HelmRegistryCreateOption `json:"createOption,omitempty"` + + // endpoint + // Required: true + Endpoint *string `json:"endpoint"` + + // is private + IsPrivate bool `json:"isPrivate,omitempty"` + + // name + Name string `json:"name,omitempty"` + + // scope + Scope string `json:"scope,omitempty"` +} + +// Validate validates this v1 helm registry spec entity +func (m *V1HelmRegistrySpecEntity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateAuth(formats); err != nil { + res = append(res, err) + } + + if err := m.validateCreateOption(formats); err != nil { + res = append(res, err) + } + + if err := m.validateEndpoint(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1HelmRegistrySpecEntity) validateAuth(formats strfmt.Registry) error { + + if err := validate.Required("auth", "body", m.Auth); err != nil { + return err + } + + if m.Auth != nil { + if err := m.Auth.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("auth") + } + return err + } + } + + return nil +} + +func (m *V1HelmRegistrySpecEntity) validateCreateOption(formats strfmt.Registry) error { + + if swag.IsZero(m.CreateOption) { // not required + return nil + } + + if m.CreateOption != nil { + if err := m.CreateOption.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("createOption") + } + return err + } + } + + return nil +} + +func (m *V1HelmRegistrySpecEntity) validateEndpoint(formats strfmt.Registry) error { + + if err := validate.Required("endpoint", "body", m.Endpoint); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1HelmRegistrySpecEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1HelmRegistrySpecEntity) UnmarshalBinary(b []byte) error { + var res V1HelmRegistrySpecEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_helm_registry_spec_summary.go b/api/models/v1_helm_registry_spec_summary.go new file mode 100644 index 00000000..c4f52852 --- /dev/null +++ b/api/models/v1_helm_registry_spec_summary.go @@ -0,0 +1,49 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1HelmRegistrySpecSummary Helm Registry spec summary +// +// swagger:model v1HelmRegistrySpecSummary +type V1HelmRegistrySpecSummary struct { + + // endpoint + Endpoint string `json:"endpoint,omitempty"` + + // is private + IsPrivate bool `json:"isPrivate"` + + // scope + Scope string `json:"scope,omitempty"` +} + +// Validate validates this v1 helm registry spec summary +func (m *V1HelmRegistrySpecSummary) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1HelmRegistrySpecSummary) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1HelmRegistrySpecSummary) UnmarshalBinary(b []byte) error { + var res V1HelmRegistrySpecSummary + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_helm_registry_status.go b/api/models/v1_helm_registry_status.go new file mode 100644 index 00000000..25b83c23 --- /dev/null +++ b/api/models/v1_helm_registry_status.go @@ -0,0 +1,71 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1HelmRegistryStatus Status of the helm registry +// +// swagger:model v1HelmRegistryStatus +type V1HelmRegistryStatus struct { + + // helm sync status + HelmSyncStatus *V1RegistrySyncStatus `json:"helmSyncStatus,omitempty"` +} + +// Validate validates this v1 helm registry status +func (m *V1HelmRegistryStatus) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateHelmSyncStatus(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1HelmRegistryStatus) validateHelmSyncStatus(formats strfmt.Registry) error { + + if swag.IsZero(m.HelmSyncStatus) { // not required + return nil + } + + if m.HelmSyncStatus != nil { + if err := m.HelmSyncStatus.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("helmSyncStatus") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1HelmRegistryStatus) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1HelmRegistryStatus) UnmarshalBinary(b []byte) error { + var res V1HelmRegistryStatus + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_helm_registry_status_summary.go b/api/models/v1_helm_registry_status_summary.go new file mode 100644 index 00000000..dda0e16c --- /dev/null +++ b/api/models/v1_helm_registry_status_summary.go @@ -0,0 +1,71 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1HelmRegistryStatusSummary Helm registry status summary +// +// swagger:model v1HelmRegistryStatusSummary +type V1HelmRegistryStatusSummary struct { + + // sync + Sync *V1RegistrySyncStatus `json:"sync,omitempty"` +} + +// Validate validates this v1 helm registry status summary +func (m *V1HelmRegistryStatusSummary) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateSync(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1HelmRegistryStatusSummary) validateSync(formats strfmt.Registry) error { + + if swag.IsZero(m.Sync) { // not required + return nil + } + + if m.Sync != nil { + if err := m.Sync.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("sync") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1HelmRegistryStatusSummary) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1HelmRegistryStatusSummary) UnmarshalBinary(b []byte) error { + var res V1HelmRegistryStatusSummary + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_helm_registry_summary.go b/api/models/v1_helm_registry_summary.go new file mode 100644 index 00000000..79050916 --- /dev/null +++ b/api/models/v1_helm_registry_summary.go @@ -0,0 +1,121 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1HelmRegistrySummary Helm Registry summary +// +// swagger:model v1HelmRegistrySummary +type V1HelmRegistrySummary struct { + + // metadata + Metadata *V1ObjectMeta `json:"metadata,omitempty"` + + // spec + Spec *V1HelmRegistrySpecSummary `json:"spec,omitempty"` + + // status + Status *V1HelmRegistryStatusSummary `json:"status,omitempty"` +} + +// Validate validates this v1 helm registry summary +func (m *V1HelmRegistrySummary) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSpec(formats); err != nil { + res = append(res, err) + } + + if err := m.validateStatus(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1HelmRegistrySummary) validateMetadata(formats strfmt.Registry) error { + + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } + return err + } + } + + return nil +} + +func (m *V1HelmRegistrySummary) validateSpec(formats strfmt.Registry) error { + + if swag.IsZero(m.Spec) { // not required + return nil + } + + if m.Spec != nil { + if err := m.Spec.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec") + } + return err + } + } + + return nil +} + +func (m *V1HelmRegistrySummary) validateStatus(formats strfmt.Registry) error { + + if swag.IsZero(m.Status) { // not required + return nil + } + + if m.Status != nil { + if err := m.Status.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("status") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1HelmRegistrySummary) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1HelmRegistrySummary) UnmarshalBinary(b []byte) error { + var res V1HelmRegistrySummary + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_host_cluster_config.go b/api/models/v1_host_cluster_config.go new file mode 100644 index 00000000..5f792889 --- /dev/null +++ b/api/models/v1_host_cluster_config.go @@ -0,0 +1,124 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1HostClusterConfig v1 host cluster config +// +// swagger:model v1HostClusterConfig +type V1HostClusterConfig struct { + + // host cluster configuration + ClusterEndpoint *V1HostClusterEndpoint `json:"clusterEndpoint,omitempty"` + + // cluster group reference + ClusterGroup *V1ObjectReference `json:"clusterGroup,omitempty"` + + // host cluster reference + HostCluster *V1ObjectReference `json:"hostCluster,omitempty"` + + // is enabled as host cluster + IsHostCluster *bool `json:"isHostCluster"` +} + +// Validate validates this v1 host cluster config +func (m *V1HostClusterConfig) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateClusterEndpoint(formats); err != nil { + res = append(res, err) + } + + if err := m.validateClusterGroup(formats); err != nil { + res = append(res, err) + } + + if err := m.validateHostCluster(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1HostClusterConfig) validateClusterEndpoint(formats strfmt.Registry) error { + + if swag.IsZero(m.ClusterEndpoint) { // not required + return nil + } + + if m.ClusterEndpoint != nil { + if err := m.ClusterEndpoint.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("clusterEndpoint") + } + return err + } + } + + return nil +} + +func (m *V1HostClusterConfig) validateClusterGroup(formats strfmt.Registry) error { + + if swag.IsZero(m.ClusterGroup) { // not required + return nil + } + + if m.ClusterGroup != nil { + if err := m.ClusterGroup.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("clusterGroup") + } + return err + } + } + + return nil +} + +func (m *V1HostClusterConfig) validateHostCluster(formats strfmt.Registry) error { + + if swag.IsZero(m.HostCluster) { // not required + return nil + } + + if m.HostCluster != nil { + if err := m.HostCluster.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("hostCluster") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1HostClusterConfig) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1HostClusterConfig) UnmarshalBinary(b []byte) error { + var res V1HostClusterConfig + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_host_cluster_config_entity.go b/api/models/v1_host_cluster_config_entity.go new file mode 100644 index 00000000..34f794f6 --- /dev/null +++ b/api/models/v1_host_cluster_config_entity.go @@ -0,0 +1,71 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1HostClusterConfigEntity v1 host cluster config entity +// +// swagger:model v1HostClusterConfigEntity +type V1HostClusterConfigEntity struct { + + // host cluster config + HostClusterConfig *V1HostClusterConfig `json:"hostClusterConfig,omitempty"` +} + +// Validate validates this v1 host cluster config entity +func (m *V1HostClusterConfigEntity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateHostClusterConfig(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1HostClusterConfigEntity) validateHostClusterConfig(formats strfmt.Registry) error { + + if swag.IsZero(m.HostClusterConfig) { // not required + return nil + } + + if m.HostClusterConfig != nil { + if err := m.HostClusterConfig.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("hostClusterConfig") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1HostClusterConfigEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1HostClusterConfigEntity) UnmarshalBinary(b []byte) error { + var res V1HostClusterConfigEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_host_cluster_config_response.go b/api/models/v1_host_cluster_config_response.go new file mode 100644 index 00000000..3c540734 --- /dev/null +++ b/api/models/v1_host_cluster_config_response.go @@ -0,0 +1,71 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1HostClusterConfigResponse v1 host cluster config response +// +// swagger:model v1HostClusterConfigResponse +type V1HostClusterConfigResponse struct { + + // cluster group reference + ClusterGroup *V1ObjectReference `json:"clusterGroup,omitempty"` +} + +// Validate validates this v1 host cluster config response +func (m *V1HostClusterConfigResponse) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateClusterGroup(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1HostClusterConfigResponse) validateClusterGroup(formats strfmt.Registry) error { + + if swag.IsZero(m.ClusterGroup) { // not required + return nil + } + + if m.ClusterGroup != nil { + if err := m.ClusterGroup.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("clusterGroup") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1HostClusterConfigResponse) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1HostClusterConfigResponse) UnmarshalBinary(b []byte) error { + var res V1HostClusterConfigResponse + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_host_cluster_endpoint.go b/api/models/v1_host_cluster_endpoint.go new file mode 100644 index 00000000..7a51856f --- /dev/null +++ b/api/models/v1_host_cluster_endpoint.go @@ -0,0 +1,125 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "encoding/json" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1HostClusterEndpoint v1 host cluster endpoint +// +// swagger:model v1HostClusterEndpoint +type V1HostClusterEndpoint struct { + + // config + Config *V1HostClusterEndpointConfig `json:"config,omitempty"` + + // is enabled as host cluster + // Enum: [Ingress LoadBalancer] + Type string `json:"type,omitempty"` +} + +// Validate validates this v1 host cluster endpoint +func (m *V1HostClusterEndpoint) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateConfig(formats); err != nil { + res = append(res, err) + } + + if err := m.validateType(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1HostClusterEndpoint) validateConfig(formats strfmt.Registry) error { + + if swag.IsZero(m.Config) { // not required + return nil + } + + if m.Config != nil { + if err := m.Config.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("config") + } + return err + } + } + + return nil +} + +var v1HostClusterEndpointTypeTypePropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["Ingress","LoadBalancer"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + v1HostClusterEndpointTypeTypePropEnum = append(v1HostClusterEndpointTypeTypePropEnum, v) + } +} + +const ( + + // V1HostClusterEndpointTypeIngress captures enum value "Ingress" + V1HostClusterEndpointTypeIngress string = "Ingress" + + // V1HostClusterEndpointTypeLoadBalancer captures enum value "LoadBalancer" + V1HostClusterEndpointTypeLoadBalancer string = "LoadBalancer" +) + +// prop value enum +func (m *V1HostClusterEndpoint) validateTypeEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, v1HostClusterEndpointTypeTypePropEnum, true); err != nil { + return err + } + return nil +} + +func (m *V1HostClusterEndpoint) validateType(formats strfmt.Registry) error { + + if swag.IsZero(m.Type) { // not required + return nil + } + + // value enum + if err := m.validateTypeEnum("type", "body", m.Type); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1HostClusterEndpoint) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1HostClusterEndpoint) UnmarshalBinary(b []byte) error { + var res V1HostClusterEndpoint + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_host_cluster_endpoint_config.go b/api/models/v1_host_cluster_endpoint_config.go new file mode 100644 index 00000000..082c6468 --- /dev/null +++ b/api/models/v1_host_cluster_endpoint_config.go @@ -0,0 +1,96 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1HostClusterEndpointConfig v1 host cluster endpoint config +// +// swagger:model v1HostClusterEndpointConfig +type V1HostClusterEndpointConfig struct { + + // ingress config + IngressConfig *V1IngressConfig `json:"ingressConfig,omitempty"` + + // load balancer config + LoadBalancerConfig *V1LoadBalancerConfig `json:"loadBalancerConfig,omitempty"` +} + +// Validate validates this v1 host cluster endpoint config +func (m *V1HostClusterEndpointConfig) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateIngressConfig(formats); err != nil { + res = append(res, err) + } + + if err := m.validateLoadBalancerConfig(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1HostClusterEndpointConfig) validateIngressConfig(formats strfmt.Registry) error { + + if swag.IsZero(m.IngressConfig) { // not required + return nil + } + + if m.IngressConfig != nil { + if err := m.IngressConfig.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("ingressConfig") + } + return err + } + } + + return nil +} + +func (m *V1HostClusterEndpointConfig) validateLoadBalancerConfig(formats strfmt.Registry) error { + + if swag.IsZero(m.LoadBalancerConfig) { // not required + return nil + } + + if m.LoadBalancerConfig != nil { + if err := m.LoadBalancerConfig.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("loadBalancerConfig") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1HostClusterEndpointConfig) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1HostClusterEndpointConfig) UnmarshalBinary(b []byte) error { + var res V1HostClusterEndpointConfig + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_http_patch.go b/api/models/v1_http_patch.go new file mode 100644 index 00000000..c7872911 --- /dev/null +++ b/api/models/v1_http_patch.go @@ -0,0 +1,133 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "encoding/json" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1HTTPPatch v1 Http patch +// +// swagger:model v1HttpPatch +type V1HTTPPatch struct { + + // A path to the pointer from which reference will be taken + From string `json:"from,omitempty"` + + // The operation to be performed + // Required: true + // Enum: [add remove replace move copy] + Op *string `json:"op"` + + // A path to the pointer on which operation will be done + // Required: true + Path *string `json:"path"` + + // The value to be used within the operations. + Value interface{} `json:"value,omitempty"` +} + +// Validate validates this v1 Http patch +func (m *V1HTTPPatch) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateOp(formats); err != nil { + res = append(res, err) + } + + if err := m.validatePath(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +var v1HttpPatchTypeOpPropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["add","remove","replace","move","copy"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + v1HttpPatchTypeOpPropEnum = append(v1HttpPatchTypeOpPropEnum, v) + } +} + +const ( + + // V1HTTPPatchOpAdd captures enum value "add" + V1HTTPPatchOpAdd string = "add" + + // V1HTTPPatchOpRemove captures enum value "remove" + V1HTTPPatchOpRemove string = "remove" + + // V1HTTPPatchOpReplace captures enum value "replace" + V1HTTPPatchOpReplace string = "replace" + + // V1HTTPPatchOpMove captures enum value "move" + V1HTTPPatchOpMove string = "move" + + // V1HTTPPatchOpCopy captures enum value "copy" + V1HTTPPatchOpCopy string = "copy" +) + +// prop value enum +func (m *V1HTTPPatch) validateOpEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, v1HttpPatchTypeOpPropEnum, true); err != nil { + return err + } + return nil +} + +func (m *V1HTTPPatch) validateOp(formats strfmt.Registry) error { + + if err := validate.Required("op", "body", m.Op); err != nil { + return err + } + + // value enum + if err := m.validateOpEnum("op", "body", *m.Op); err != nil { + return err + } + + return nil +} + +func (m *V1HTTPPatch) validatePath(formats strfmt.Registry) error { + + if err := validate.Required("path", "body", m.Path); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1HTTPPatch) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1HTTPPatch) UnmarshalBinary(b []byte) error { + var res V1HTTPPatch + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_identity_provider.go b/api/models/v1_identity_provider.go new file mode 100644 index 00000000..a4a12f79 --- /dev/null +++ b/api/models/v1_identity_provider.go @@ -0,0 +1,46 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1IdentityProvider Describes a predefined Identity Provider (IDP) +// +// swagger:model v1IdentityProvider +type V1IdentityProvider struct { + + // id + ID string `json:"id,omitempty"` + + // name + Name string `json:"name,omitempty"` +} + +// Validate validates this v1 identity provider +func (m *V1IdentityProvider) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1IdentityProvider) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1IdentityProvider) UnmarshalBinary(b []byte) error { + var res V1IdentityProvider + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_identity_providers.go b/api/models/v1_identity_providers.go new file mode 100644 index 00000000..921049e1 --- /dev/null +++ b/api/models/v1_identity_providers.go @@ -0,0 +1,50 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1IdentityProviders Describes a list of predefined Identity Provider (IDP) +// +// swagger:model v1IdentityProviders +type V1IdentityProviders []*V1IdentityProvider + +// Validate validates this v1 identity providers +func (m V1IdentityProviders) Validate(formats strfmt.Registry) error { + var res []error + + if err := validate.UniqueItems("", "body", m); err != nil { + return err + } + + for i := 0; i < len(m); i++ { + if swag.IsZero(m[i]) { // not required + continue + } + + if m[i] != nil { + if err := m[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName(strconv.Itoa(i)) + } + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/models/v1_import_cluster_config.go b/api/models/v1_import_cluster_config.go new file mode 100644 index 00000000..54065ea0 --- /dev/null +++ b/api/models/v1_import_cluster_config.go @@ -0,0 +1,122 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "encoding/json" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1ImportClusterConfig v1 import cluster config +// +// swagger:model v1ImportClusterConfig +type V1ImportClusterConfig struct { + + // If the importMode is empty then cluster is imported with full permission mode. By default importMode is empty and cluster is imported in full permission mode. + // Enum: [read-only] + ImportMode string `json:"importMode,omitempty"` + + // Cluster proxy settings + Proxy *V1ClusterProxySpec `json:"proxy,omitempty"` +} + +// Validate validates this v1 import cluster config +func (m *V1ImportClusterConfig) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateImportMode(formats); err != nil { + res = append(res, err) + } + + if err := m.validateProxy(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +var v1ImportClusterConfigTypeImportModePropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["read-only"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + v1ImportClusterConfigTypeImportModePropEnum = append(v1ImportClusterConfigTypeImportModePropEnum, v) + } +} + +const ( + + // V1ImportClusterConfigImportModeReadOnly captures enum value "read-only" + V1ImportClusterConfigImportModeReadOnly string = "read-only" +) + +// prop value enum +func (m *V1ImportClusterConfig) validateImportModeEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, v1ImportClusterConfigTypeImportModePropEnum, true); err != nil { + return err + } + return nil +} + +func (m *V1ImportClusterConfig) validateImportMode(formats strfmt.Registry) error { + + if swag.IsZero(m.ImportMode) { // not required + return nil + } + + // value enum + if err := m.validateImportModeEnum("importMode", "body", m.ImportMode); err != nil { + return err + } + + return nil +} + +func (m *V1ImportClusterConfig) validateProxy(formats strfmt.Registry) error { + + if swag.IsZero(m.Proxy) { // not required + return nil + } + + if m.Proxy != nil { + if err := m.Proxy.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("proxy") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ImportClusterConfig) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ImportClusterConfig) UnmarshalBinary(b []byte) error { + var res V1ImportClusterConfig + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_import_edge_host_config.go b/api/models/v1_import_edge_host_config.go new file mode 100644 index 00000000..abf2a0b1 --- /dev/null +++ b/api/models/v1_import_edge_host_config.go @@ -0,0 +1,46 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ImportEdgeHostConfig v1 import edge host config +// +// swagger:model v1ImportEdgeHostConfig +type V1ImportEdgeHostConfig struct { + + // Deprecated. Use 'edgeHostUids' field + EdgeHostUID string `json:"edgeHostUid,omitempty"` + + // edge host uids + EdgeHostUids []string `json:"edgeHostUids"` +} + +// Validate validates this v1 import edge host config +func (m *V1ImportEdgeHostConfig) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1ImportEdgeHostConfig) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ImportEdgeHostConfig) UnmarshalBinary(b []byte) error { + var res V1ImportEdgeHostConfig + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_infra_l_b_config.go b/api/models/v1_infra_l_b_config.go new file mode 100644 index 00000000..b11b5d7d --- /dev/null +++ b/api/models/v1_infra_l_b_config.go @@ -0,0 +1,71 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1InfraLBConfig v1 infra l b config +// +// swagger:model v1InfraLBConfig +type V1InfraLBConfig struct { + + // APIServerLB is the configuration for the control-plane load balancer. + APIServerLB *V1LoadBalancerSpec `json:"apiServerLB,omitempty"` +} + +// Validate validates this v1 infra l b config +func (m *V1InfraLBConfig) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateAPIServerLB(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1InfraLBConfig) validateAPIServerLB(formats strfmt.Registry) error { + + if swag.IsZero(m.APIServerLB) { // not required + return nil + } + + if m.APIServerLB != nil { + if err := m.APIServerLB.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("apiServerLB") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1InfraLBConfig) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1InfraLBConfig) UnmarshalBinary(b []byte) error { + var res V1InfraLBConfig + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_ingress_config.go b/api/models/v1_ingress_config.go new file mode 100644 index 00000000..ef65f830 --- /dev/null +++ b/api/models/v1_ingress_config.go @@ -0,0 +1,46 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1IngressConfig Ingress configuration for exposing the virtual cluster's kube-apiserver +// +// swagger:model v1IngressConfig +type V1IngressConfig struct { + + // host + Host string `json:"host,omitempty"` + + // port + Port int64 `json:"port,omitempty"` +} + +// Validate validates this v1 ingress config +func (m *V1IngressConfig) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1IngressConfig) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1IngressConfig) UnmarshalBinary(b []byte) error { + var res V1IngressConfig + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_instance_config.go b/api/models/v1_instance_config.go new file mode 100644 index 00000000..3e113b52 --- /dev/null +++ b/api/models/v1_instance_config.go @@ -0,0 +1,58 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1InstanceConfig v1 instance config +// +// swagger:model v1InstanceConfig +type V1InstanceConfig struct { + + // category + Category string `json:"category,omitempty"` + + // cpu set + CPUSet int64 `json:"cpuSet,omitempty"` + + // disk gi b + DiskGiB int64 `json:"diskGiB,omitempty"` + + // MemoryMiB is the size of a virtual machine's memory, in MiB + MemoryMiB int64 `json:"memoryMiB,omitempty"` + + // name + Name string `json:"name,omitempty"` + + // NumCPUs is the number of virtual processors in a virtual machine + NumCPUs int32 `json:"numCPUs,omitempty"` +} + +// Validate validates this v1 instance config +func (m *V1InstanceConfig) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1InstanceConfig) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1InstanceConfig) UnmarshalBinary(b []byte) error { + var res V1InstanceConfig + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_instance_cost.go b/api/models/v1_instance_cost.go new file mode 100644 index 00000000..8600fc7a --- /dev/null +++ b/api/models/v1_instance_cost.go @@ -0,0 +1,80 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1InstanceCost Instance cost entity +// +// swagger:model v1InstanceCost +type V1InstanceCost struct { + + // Array of cloud instance price + Price []*V1InstancePrice `json:"price"` +} + +// Validate validates this v1 instance cost +func (m *V1InstanceCost) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validatePrice(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1InstanceCost) validatePrice(formats strfmt.Registry) error { + + if swag.IsZero(m.Price) { // not required + return nil + } + + for i := 0; i < len(m.Price); i++ { + if swag.IsZero(m.Price[i]) { // not required + continue + } + + if m.Price[i] != nil { + if err := m.Price[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("price" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1InstanceCost) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1InstanceCost) UnmarshalBinary(b []byte) error { + var res V1InstanceCost + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_instance_price.go b/api/models/v1_instance_price.go new file mode 100644 index 00000000..aae31ebd --- /dev/null +++ b/api/models/v1_instance_price.go @@ -0,0 +1,106 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "encoding/json" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1InstancePrice Cloud instance price +// +// swagger:model v1InstancePrice +type V1InstancePrice struct { + + // OnDemand price of instance + OnDemand float64 `json:"onDemand,omitempty"` + + // Os associated with instance price. Allowed values - [linux, windows] + // Enum: [linux windows] + Os string `json:"os,omitempty"` + + // Spot price of instance + Spot float64 `json:"spot,omitempty"` +} + +// Validate validates this v1 instance price +func (m *V1InstancePrice) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateOs(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +var v1InstancePriceTypeOsPropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["linux","windows"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + v1InstancePriceTypeOsPropEnum = append(v1InstancePriceTypeOsPropEnum, v) + } +} + +const ( + + // V1InstancePriceOsLinux captures enum value "linux" + V1InstancePriceOsLinux string = "linux" + + // V1InstancePriceOsWindows captures enum value "windows" + V1InstancePriceOsWindows string = "windows" +) + +// prop value enum +func (m *V1InstancePrice) validateOsEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, v1InstancePriceTypeOsPropEnum, true); err != nil { + return err + } + return nil +} + +func (m *V1InstancePrice) validateOs(formats strfmt.Registry) error { + + if swag.IsZero(m.Os) { // not required + return nil + } + + // value enum + if err := m.validateOsEnum("os", "body", m.Os); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1InstancePrice) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1InstancePrice) UnmarshalBinary(b []byte) error { + var res V1InstancePrice + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_instance_type.go b/api/models/v1_instance_type.go new file mode 100644 index 00000000..e34c2f77 --- /dev/null +++ b/api/models/v1_instance_type.go @@ -0,0 +1,95 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1InstanceType Cloud Instance type details +// +// swagger:model v1InstanceType +type V1InstanceType struct { + + // Category of instance type + Category string `json:"category,omitempty"` + + // Cpu of instance type + CPU float64 `json:"cpu,omitempty"` + + // Gpu of instance type + Gpu float64 `json:"gpu,omitempty"` + + // Memory of instance type + Memory float64 `json:"memory,omitempty"` + + // Price of instance type + Price float64 `json:"price,omitempty"` + + // Type of instance type + Type string `json:"type,omitempty"` + + // cost + Cost *V1InstanceCost `json:"cost,omitempty"` + + // Non supported zones of the instance in a particular region + NonSupportedZones []string `json:"nonSupportedZones"` + + // Supported architecture of the instance + SupportedArchitectures []string `json:"supportedArchitectures"` +} + +// Validate validates this v1 instance type +func (m *V1InstanceType) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateCost(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1InstanceType) validateCost(formats strfmt.Registry) error { + + if swag.IsZero(m.Cost) { // not required + return nil + } + + if m.Cost != nil { + if err := m.Cost.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("cost") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1InstanceType) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1InstanceType) UnmarshalBinary(b []byte) error { + var res V1InstanceType + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_invoice.go b/api/models/v1_invoice.go new file mode 100644 index 00000000..526faf3c --- /dev/null +++ b/api/models/v1_invoice.go @@ -0,0 +1,121 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1Invoice Invoice object +// +// swagger:model v1Invoice +type V1Invoice struct { + + // metadata + Metadata *V1ObjectMeta `json:"metadata,omitempty"` + + // spec + Spec *V1InvoiceSpec `json:"spec,omitempty"` + + // status + Status *V1InvoiceStatus `json:"status,omitempty"` +} + +// Validate validates this v1 invoice +func (m *V1Invoice) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSpec(formats); err != nil { + res = append(res, err) + } + + if err := m.validateStatus(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1Invoice) validateMetadata(formats strfmt.Registry) error { + + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } + return err + } + } + + return nil +} + +func (m *V1Invoice) validateSpec(formats strfmt.Registry) error { + + if swag.IsZero(m.Spec) { // not required + return nil + } + + if m.Spec != nil { + if err := m.Spec.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec") + } + return err + } + } + + return nil +} + +func (m *V1Invoice) validateStatus(formats strfmt.Registry) error { + + if swag.IsZero(m.Status) { // not required + return nil + } + + if m.Status != nil { + if err := m.Status.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("status") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1Invoice) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1Invoice) UnmarshalBinary(b []byte) error { + var res V1Invoice + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_invoice_billing_period.go b/api/models/v1_invoice_billing_period.go new file mode 100644 index 00000000..0be6a3de --- /dev/null +++ b/api/models/v1_invoice_billing_period.go @@ -0,0 +1,94 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1InvoiceBillingPeriod Invoice billing period object +// +// swagger:model v1InvoiceBillingPeriod +type V1InvoiceBillingPeriod struct { + + // end + // Format: date-time + End V1Time `json:"end,omitempty"` + + // start + // Format: date-time + Start V1Time `json:"start,omitempty"` +} + +// Validate validates this v1 invoice billing period +func (m *V1InvoiceBillingPeriod) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateEnd(formats); err != nil { + res = append(res, err) + } + + if err := m.validateStart(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1InvoiceBillingPeriod) validateEnd(formats strfmt.Registry) error { + + if swag.IsZero(m.End) { // not required + return nil + } + + if err := m.End.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("end") + } + return err + } + + return nil +} + +func (m *V1InvoiceBillingPeriod) validateStart(formats strfmt.Registry) error { + + if swag.IsZero(m.Start) { // not required + return nil + } + + if err := m.Start.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("start") + } + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1InvoiceBillingPeriod) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1InvoiceBillingPeriod) UnmarshalBinary(b []byte) error { + var res V1InvoiceBillingPeriod + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_invoice_credits.go b/api/models/v1_invoice_credits.go new file mode 100644 index 00000000..cdca1944 --- /dev/null +++ b/api/models/v1_invoice_credits.go @@ -0,0 +1,46 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1InvoiceCredits Invoice credits object +// +// swagger:model v1InvoiceCredits +type V1InvoiceCredits struct { + + // Credits allocated for import clusters + AlloyFreeCredits int64 `json:"alloyFreeCredits,omitempty"` + + // Credits allocated for managed clusters + PureFreeCredits int64 `json:"pureFreeCredits,omitempty"` +} + +// Validate validates this v1 invoice credits +func (m *V1InvoiceCredits) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1InvoiceCredits) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1InvoiceCredits) UnmarshalBinary(b []byte) error { + var res V1InvoiceCredits + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_invoice_plan.go b/api/models/v1_invoice_plan.go new file mode 100644 index 00000000..53adf2cd --- /dev/null +++ b/api/models/v1_invoice_plan.go @@ -0,0 +1,168 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "encoding/json" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1InvoicePlan Invoice plan object +// +// swagger:model v1InvoicePlan +type V1InvoicePlan struct { + + // List of free credits + FreeCredits []*V1InvoicePlanCredit `json:"freeCredits"` + + // plantype + // Enum: [Trial MonthlyOnDemand AnnualSubscription] + Plantype string `json:"plantype,omitempty"` + + // List of SLA credits + SLACredits []*V1InvoicePlanCredit `json:"slaCredits"` +} + +// Validate validates this v1 invoice plan +func (m *V1InvoicePlan) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateFreeCredits(formats); err != nil { + res = append(res, err) + } + + if err := m.validatePlantype(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSLACredits(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1InvoicePlan) validateFreeCredits(formats strfmt.Registry) error { + + if swag.IsZero(m.FreeCredits) { // not required + return nil + } + + for i := 0; i < len(m.FreeCredits); i++ { + if swag.IsZero(m.FreeCredits[i]) { // not required + continue + } + + if m.FreeCredits[i] != nil { + if err := m.FreeCredits[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("freeCredits" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +var v1InvoicePlanTypePlantypePropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["Trial","MonthlyOnDemand","AnnualSubscription"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + v1InvoicePlanTypePlantypePropEnum = append(v1InvoicePlanTypePlantypePropEnum, v) + } +} + +const ( + + // V1InvoicePlanPlantypeTrial captures enum value "Trial" + V1InvoicePlanPlantypeTrial string = "Trial" + + // V1InvoicePlanPlantypeMonthlyOnDemand captures enum value "MonthlyOnDemand" + V1InvoicePlanPlantypeMonthlyOnDemand string = "MonthlyOnDemand" + + // V1InvoicePlanPlantypeAnnualSubscription captures enum value "AnnualSubscription" + V1InvoicePlanPlantypeAnnualSubscription string = "AnnualSubscription" +) + +// prop value enum +func (m *V1InvoicePlan) validatePlantypeEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, v1InvoicePlanTypePlantypePropEnum, true); err != nil { + return err + } + return nil +} + +func (m *V1InvoicePlan) validatePlantype(formats strfmt.Registry) error { + + if swag.IsZero(m.Plantype) { // not required + return nil + } + + // value enum + if err := m.validatePlantypeEnum("plantype", "body", m.Plantype); err != nil { + return err + } + + return nil +} + +func (m *V1InvoicePlan) validateSLACredits(formats strfmt.Registry) error { + + if swag.IsZero(m.SLACredits) { // not required + return nil + } + + for i := 0; i < len(m.SLACredits); i++ { + if swag.IsZero(m.SLACredits[i]) { // not required + continue + } + + if m.SLACredits[i] != nil { + if err := m.SLACredits[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("slaCredits" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1InvoicePlan) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1InvoicePlan) UnmarshalBinary(b []byte) error { + var res V1InvoicePlan + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_invoice_plan_credit.go b/api/models/v1_invoice_plan_credit.go new file mode 100644 index 00000000..ce526f2e --- /dev/null +++ b/api/models/v1_invoice_plan_credit.go @@ -0,0 +1,74 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1InvoicePlanCredit Invoice plan credit object +// +// swagger:model v1InvoicePlanCredit +type V1InvoicePlanCredit struct { + + // plan credit + PlanCredit *V1PlanCredit `json:"planCredit,omitempty"` + + // Total used cpu core hours + TotalCPUCoreHours int64 `json:"totalCpuCoreHours,omitempty"` +} + +// Validate validates this v1 invoice plan credit +func (m *V1InvoicePlanCredit) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validatePlanCredit(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1InvoicePlanCredit) validatePlanCredit(formats strfmt.Registry) error { + + if swag.IsZero(m.PlanCredit) { // not required + return nil + } + + if m.PlanCredit != nil { + if err := m.PlanCredit.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("planCredit") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1InvoicePlanCredit) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1InvoicePlanCredit) UnmarshalBinary(b []byte) error { + var res V1InvoicePlanCredit + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_invoice_product.go b/api/models/v1_invoice_product.go new file mode 100644 index 00000000..86ebedfb --- /dev/null +++ b/api/models/v1_invoice_product.go @@ -0,0 +1,96 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1InvoiceProduct Product invoice object +// +// swagger:model v1InvoiceProduct +type V1InvoiceProduct struct { + + // alloy + Alloy *V1InvoiceProductData `json:"alloy,omitempty"` + + // pure + Pure *V1InvoiceProductData `json:"pure,omitempty"` +} + +// Validate validates this v1 invoice product +func (m *V1InvoiceProduct) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateAlloy(formats); err != nil { + res = append(res, err) + } + + if err := m.validatePure(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1InvoiceProduct) validateAlloy(formats strfmt.Registry) error { + + if swag.IsZero(m.Alloy) { // not required + return nil + } + + if m.Alloy != nil { + if err := m.Alloy.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("alloy") + } + return err + } + } + + return nil +} + +func (m *V1InvoiceProduct) validatePure(formats strfmt.Registry) error { + + if swag.IsZero(m.Pure) { // not required + return nil + } + + if m.Pure != nil { + if err := m.Pure.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("pure") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1InvoiceProduct) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1InvoiceProduct) UnmarshalBinary(b []byte) error { + var res V1InvoiceProduct + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_invoice_product_data.go b/api/models/v1_invoice_product_data.go new file mode 100644 index 00000000..35b8f3c8 --- /dev/null +++ b/api/models/v1_invoice_product_data.go @@ -0,0 +1,73 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1InvoiceProductData Product invoice data +// +// swagger:model v1InvoiceProductData +type V1InvoiceProductData struct { + + // Allocated credits + AllocatedCredits int64 `json:"allocatedCredits,omitempty"` + + // Total amount + Amount float64 `json:"amount,omitempty"` + + // Credits to be billed + BillableCredits float64 `json:"billableCredits,omitempty"` + + // Credits that are exceeds the allocated credits + BreachedCredits float64 `json:"breachedCredits,omitempty"` + + // Applied discount + Discount int64 `json:"discount,omitempty"` + + // Allocated free credits + FreeCredits int64 `json:"freeCredits,omitempty"` + + // Allowed overage limit in percentage + OverageLimitPercentage int8 `json:"overageLimitPercentage,omitempty"` + + // Tier name + TierName string `json:"tierName,omitempty"` + + // Tier price + TierPrice float64 `json:"tierPrice,omitempty"` + + // Total used credits + TotalUsedCredits float64 `json:"totalUsedCredits,omitempty"` + + // Used credits + UsedCredits float64 `json:"usedCredits,omitempty"` +} + +// Validate validates this v1 invoice product data +func (m *V1InvoiceProductData) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1InvoiceProductData) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1InvoiceProductData) UnmarshalBinary(b []byte) error { + var res V1InvoiceProductData + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_invoice_project.go b/api/models/v1_invoice_project.go new file mode 100644 index 00000000..63169657 --- /dev/null +++ b/api/models/v1_invoice_project.go @@ -0,0 +1,80 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1InvoiceProject Invoice project object +// +// swagger:model v1InvoiceProject +type V1InvoiceProject struct { + + // Billing amount for the project + Amount float64 `json:"amount,omitempty"` + + // Name of the project + ProjectName string `json:"projectName,omitempty"` + + // Project identifier + ProjectUID string `json:"projectUid,omitempty"` + + // Usage by the project + Usage *V1ProjectUsage `json:"usage,omitempty"` +} + +// Validate validates this v1 invoice project +func (m *V1InvoiceProject) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateUsage(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1InvoiceProject) validateUsage(formats strfmt.Registry) error { + + if swag.IsZero(m.Usage) { // not required + return nil + } + + if m.Usage != nil { + if err := m.Usage.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("usage") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1InvoiceProject) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1InvoiceProject) UnmarshalBinary(b []byte) error { + var res V1InvoiceProject + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_invoice_spec.go b/api/models/v1_invoice_spec.go new file mode 100644 index 00000000..20489908 --- /dev/null +++ b/api/models/v1_invoice_spec.go @@ -0,0 +1,224 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "encoding/json" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1InvoiceSpec Invoice specification +// +// swagger:model v1InvoiceSpec +type V1InvoiceSpec struct { + + // address + Address *V1Address `json:"address,omitempty"` + + // billing period + BillingPeriod *V1InvoiceBillingPeriod `json:"billingPeriod,omitempty"` + + // credits + Credits *V1InvoiceCredits `json:"credits,omitempty"` + + // Environment type [Trial,MonthlyOnDemand,AnnualSubscription,OnPrem] + EnvType string `json:"envType,omitempty"` + + // Month for which invoice is generated + // Format: date-time + Month V1Time `json:"month,omitempty"` + + // payment unit + // Enum: [usd] + PaymentUnit string `json:"paymentUnit,omitempty"` + + // plan + Plan *V1InvoicePlan `json:"plan,omitempty"` +} + +// Validate validates this v1 invoice spec +func (m *V1InvoiceSpec) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateAddress(formats); err != nil { + res = append(res, err) + } + + if err := m.validateBillingPeriod(formats); err != nil { + res = append(res, err) + } + + if err := m.validateCredits(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMonth(formats); err != nil { + res = append(res, err) + } + + if err := m.validatePaymentUnit(formats); err != nil { + res = append(res, err) + } + + if err := m.validatePlan(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1InvoiceSpec) validateAddress(formats strfmt.Registry) error { + + if swag.IsZero(m.Address) { // not required + return nil + } + + if m.Address != nil { + if err := m.Address.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("address") + } + return err + } + } + + return nil +} + +func (m *V1InvoiceSpec) validateBillingPeriod(formats strfmt.Registry) error { + + if swag.IsZero(m.BillingPeriod) { // not required + return nil + } + + if m.BillingPeriod != nil { + if err := m.BillingPeriod.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("billingPeriod") + } + return err + } + } + + return nil +} + +func (m *V1InvoiceSpec) validateCredits(formats strfmt.Registry) error { + + if swag.IsZero(m.Credits) { // not required + return nil + } + + if m.Credits != nil { + if err := m.Credits.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("credits") + } + return err + } + } + + return nil +} + +func (m *V1InvoiceSpec) validateMonth(formats strfmt.Registry) error { + + if swag.IsZero(m.Month) { // not required + return nil + } + + if err := m.Month.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("month") + } + return err + } + + return nil +} + +var v1InvoiceSpecTypePaymentUnitPropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["usd"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + v1InvoiceSpecTypePaymentUnitPropEnum = append(v1InvoiceSpecTypePaymentUnitPropEnum, v) + } +} + +const ( + + // V1InvoiceSpecPaymentUnitUsd captures enum value "usd" + V1InvoiceSpecPaymentUnitUsd string = "usd" +) + +// prop value enum +func (m *V1InvoiceSpec) validatePaymentUnitEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, v1InvoiceSpecTypePaymentUnitPropEnum, true); err != nil { + return err + } + return nil +} + +func (m *V1InvoiceSpec) validatePaymentUnit(formats strfmt.Registry) error { + + if swag.IsZero(m.PaymentUnit) { // not required + return nil + } + + // value enum + if err := m.validatePaymentUnitEnum("paymentUnit", "body", m.PaymentUnit); err != nil { + return err + } + + return nil +} + +func (m *V1InvoiceSpec) validatePlan(formats strfmt.Registry) error { + + if swag.IsZero(m.Plan) { // not required + return nil + } + + if m.Plan != nil { + if err := m.Plan.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("plan") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1InvoiceSpec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1InvoiceSpec) UnmarshalBinary(b []byte) error { + var res V1InvoiceSpec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_invoice_state.go b/api/models/v1_invoice_state.go new file mode 100644 index 00000000..c236afeb --- /dev/null +++ b/api/models/v1_invoice_state.go @@ -0,0 +1,133 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "encoding/json" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1InvoiceState Invoice state object +// +// swagger:model v1InvoiceState +type V1InvoiceState struct { + + // Payment status message + PaymentMsg string `json:"paymentMsg,omitempty"` + + // state + // Enum: [Paid PaymentPending PaymentInProgress PaymentFailed] + State string `json:"state,omitempty"` + + // Time on which the state has been updated + // Format: date-time + Timestamp V1Time `json:"timestamp,omitempty"` +} + +// Validate validates this v1 invoice state +func (m *V1InvoiceState) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateState(formats); err != nil { + res = append(res, err) + } + + if err := m.validateTimestamp(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +var v1InvoiceStateTypeStatePropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["Paid","PaymentPending","PaymentInProgress","PaymentFailed"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + v1InvoiceStateTypeStatePropEnum = append(v1InvoiceStateTypeStatePropEnum, v) + } +} + +const ( + + // V1InvoiceStateStatePaid captures enum value "Paid" + V1InvoiceStateStatePaid string = "Paid" + + // V1InvoiceStateStatePaymentPending captures enum value "PaymentPending" + V1InvoiceStateStatePaymentPending string = "PaymentPending" + + // V1InvoiceStateStatePaymentInProgress captures enum value "PaymentInProgress" + V1InvoiceStateStatePaymentInProgress string = "PaymentInProgress" + + // V1InvoiceStateStatePaymentFailed captures enum value "PaymentFailed" + V1InvoiceStateStatePaymentFailed string = "PaymentFailed" +) + +// prop value enum +func (m *V1InvoiceState) validateStateEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, v1InvoiceStateTypeStatePropEnum, true); err != nil { + return err + } + return nil +} + +func (m *V1InvoiceState) validateState(formats strfmt.Registry) error { + + if swag.IsZero(m.State) { // not required + return nil + } + + // value enum + if err := m.validateStateEnum("state", "body", m.State); err != nil { + return err + } + + return nil +} + +func (m *V1InvoiceState) validateTimestamp(formats strfmt.Registry) error { + + if swag.IsZero(m.Timestamp) { // not required + return nil + } + + if err := m.Timestamp.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("timestamp") + } + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1InvoiceState) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1InvoiceState) UnmarshalBinary(b []byte) error { + var res V1InvoiceState + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_invoice_status.go b/api/models/v1_invoice_status.go new file mode 100644 index 00000000..069c423e --- /dev/null +++ b/api/models/v1_invoice_status.go @@ -0,0 +1,149 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1InvoiceStatus Invoice Status +// +// swagger:model v1InvoiceStatus +type V1InvoiceStatus struct { + + // Total billable amount + BillableAmount float64 `json:"billableAmount,omitempty"` + + // product invoice + ProductInvoice *V1InvoiceProduct `json:"productInvoice,omitempty"` + + // List of project invoices + Projects []*V1InvoiceProject `json:"projects"` + + // List of invoice states + // Unique: true + States []*V1InvoiceState `json:"states"` + + // Stripe invoice uid + StripeInvoiceID string `json:"stripeInvoiceId,omitempty"` +} + +// Validate validates this v1 invoice status +func (m *V1InvoiceStatus) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateProductInvoice(formats); err != nil { + res = append(res, err) + } + + if err := m.validateProjects(formats); err != nil { + res = append(res, err) + } + + if err := m.validateStates(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1InvoiceStatus) validateProductInvoice(formats strfmt.Registry) error { + + if swag.IsZero(m.ProductInvoice) { // not required + return nil + } + + if m.ProductInvoice != nil { + if err := m.ProductInvoice.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("productInvoice") + } + return err + } + } + + return nil +} + +func (m *V1InvoiceStatus) validateProjects(formats strfmt.Registry) error { + + if swag.IsZero(m.Projects) { // not required + return nil + } + + for i := 0; i < len(m.Projects); i++ { + if swag.IsZero(m.Projects[i]) { // not required + continue + } + + if m.Projects[i] != nil { + if err := m.Projects[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("projects" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1InvoiceStatus) validateStates(formats strfmt.Registry) error { + + if swag.IsZero(m.States) { // not required + return nil + } + + if err := validate.UniqueItems("states", "body", m.States); err != nil { + return err + } + + for i := 0; i < len(m.States); i++ { + if swag.IsZero(m.States[i]) { // not required + continue + } + + if m.States[i] != nil { + if err := m.States[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("states" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1InvoiceStatus) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1InvoiceStatus) UnmarshalBinary(b []byte) error { + var res V1InvoiceStatus + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_ip_pool.go b/api/models/v1_ip_pool.go new file mode 100644 index 00000000..dd9cee07 --- /dev/null +++ b/api/models/v1_ip_pool.go @@ -0,0 +1,114 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1IPPool IPPool defines static IPs available. Gateway, Prefix, Nameserver, if defined, will be default values for all Pools +// +// swagger:model v1IPPool +type V1IPPool struct { + + // Gateway is the gateway ip address + Gateway string `json:"gateway,omitempty"` + + // Nameserver provide information for dns resolvation + Nameserver *V1Nameserver `json:"nameserver,omitempty"` + + // Pools contains the list of IP addresses pools + Pools []*V1Pool `json:"pools"` + + // Prefix is the mask of the network as integer (max 128) + Prefix int32 `json:"prefix,omitempty"` + + // UID is the UID of this IPPool, used by Hubble + UID string `json:"uid,omitempty"` +} + +// Validate validates this v1 IP pool +func (m *V1IPPool) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateNameserver(formats); err != nil { + res = append(res, err) + } + + if err := m.validatePools(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1IPPool) validateNameserver(formats strfmt.Registry) error { + + if swag.IsZero(m.Nameserver) { // not required + return nil + } + + if m.Nameserver != nil { + if err := m.Nameserver.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("nameserver") + } + return err + } + } + + return nil +} + +func (m *V1IPPool) validatePools(formats strfmt.Registry) error { + + if swag.IsZero(m.Pools) { // not required + return nil + } + + for i := 0; i < len(m.Pools); i++ { + if swag.IsZero(m.Pools[i]) { // not required + continue + } + + if m.Pools[i] != nil { + if err := m.Pools[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("pools" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1IPPool) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1IPPool) UnmarshalBinary(b []byte) error { + var res V1IPPool + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_ip_pool_entity.go b/api/models/v1_ip_pool_entity.go new file mode 100644 index 00000000..53a564ae --- /dev/null +++ b/api/models/v1_ip_pool_entity.go @@ -0,0 +1,186 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1IPPoolEntity IP Pool entity definition +// +// swagger:model v1IpPoolEntity +type V1IPPoolEntity struct { + + // metadata + Metadata *V1ObjectMeta `json:"metadata,omitempty"` + + // spec + Spec *V1IPPoolEntitySpec `json:"spec,omitempty"` + + // status + Status *V1IPPoolStatus `json:"status,omitempty"` +} + +// Validate validates this v1 Ip pool entity +func (m *V1IPPoolEntity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSpec(formats); err != nil { + res = append(res, err) + } + + if err := m.validateStatus(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1IPPoolEntity) validateMetadata(formats strfmt.Registry) error { + + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } + return err + } + } + + return nil +} + +func (m *V1IPPoolEntity) validateSpec(formats strfmt.Registry) error { + + if swag.IsZero(m.Spec) { // not required + return nil + } + + if m.Spec != nil { + if err := m.Spec.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec") + } + return err + } + } + + return nil +} + +func (m *V1IPPoolEntity) validateStatus(formats strfmt.Registry) error { + + if swag.IsZero(m.Status) { // not required + return nil + } + + if m.Status != nil { + if err := m.Status.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("status") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1IPPoolEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1IPPoolEntity) UnmarshalBinary(b []byte) error { + var res V1IPPoolEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} + +// V1IPPoolEntitySpec v1 IP pool entity spec +// +// swagger:model V1IPPoolEntitySpec +type V1IPPoolEntitySpec struct { + + // pool + Pool *V1Pool `json:"pool,omitempty"` + + // priavet gateway Uid + PriavetGatewayUID string `json:"priavetGatewayUid,omitempty"` + + // if true, restricts this IP pool to be used by single cluster at any time + RestrictToSingleCluster bool `json:"restrictToSingleCluster"` +} + +// Validate validates this v1 IP pool entity spec +func (m *V1IPPoolEntitySpec) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validatePool(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1IPPoolEntitySpec) validatePool(formats strfmt.Registry) error { + + if swag.IsZero(m.Pool) { // not required + return nil + } + + if m.Pool != nil { + if err := m.Pool.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec" + "." + "pool") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1IPPoolEntitySpec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1IPPoolEntitySpec) UnmarshalBinary(b []byte) error { + var res V1IPPoolEntitySpec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_ip_pool_input_entity.go b/api/models/v1_ip_pool_input_entity.go new file mode 100644 index 00000000..7782baf1 --- /dev/null +++ b/api/models/v1_ip_pool_input_entity.go @@ -0,0 +1,160 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1IPPoolInputEntity IP Pool input entity definition +// +// swagger:model v1IpPoolInputEntity +type V1IPPoolInputEntity struct { + + // metadata + Metadata *V1ObjectMeta `json:"metadata,omitempty"` + + // spec + Spec *V1IPPoolInputEntitySpec `json:"spec,omitempty"` +} + +// Validate validates this v1 Ip pool input entity +func (m *V1IPPoolInputEntity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSpec(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1IPPoolInputEntity) validateMetadata(formats strfmt.Registry) error { + + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } + return err + } + } + + return nil +} + +func (m *V1IPPoolInputEntity) validateSpec(formats strfmt.Registry) error { + + if swag.IsZero(m.Spec) { // not required + return nil + } + + if m.Spec != nil { + if err := m.Spec.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1IPPoolInputEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1IPPoolInputEntity) UnmarshalBinary(b []byte) error { + var res V1IPPoolInputEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} + +// V1IPPoolInputEntitySpec v1 IP pool input entity spec +// +// swagger:model V1IPPoolInputEntitySpec +type V1IPPoolInputEntitySpec struct { + + // pool + // Required: true + Pool *V1Pool `json:"pool"` + + // if true, restricts this IP pool to be used by single cluster at any time + RestrictToSingleCluster bool `json:"restrictToSingleCluster,omitempty"` +} + +// Validate validates this v1 IP pool input entity spec +func (m *V1IPPoolInputEntitySpec) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validatePool(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1IPPoolInputEntitySpec) validatePool(formats strfmt.Registry) error { + + if err := validate.Required("spec"+"."+"pool", "body", m.Pool); err != nil { + return err + } + + if m.Pool != nil { + if err := m.Pool.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec" + "." + "pool") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1IPPoolInputEntitySpec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1IPPoolInputEntitySpec) UnmarshalBinary(b []byte) error { + var res V1IPPoolInputEntitySpec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_ip_pool_status.go b/api/models/v1_ip_pool_status.go new file mode 100644 index 00000000..c99483fc --- /dev/null +++ b/api/models/v1_ip_pool_status.go @@ -0,0 +1,92 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1IPPoolStatus IP Pool status +// +// swagger:model v1IpPoolStatus +type V1IPPoolStatus struct { + + // allotted ips + // Unique: true + AllottedIps []string `json:"allottedIps"` + + // associated clusters + // Unique: true + AssociatedClusters []string `json:"associatedClusters"` + + // in use + InUse bool `json:"inUse"` +} + +// Validate validates this v1 Ip pool status +func (m *V1IPPoolStatus) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateAllottedIps(formats); err != nil { + res = append(res, err) + } + + if err := m.validateAssociatedClusters(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1IPPoolStatus) validateAllottedIps(formats strfmt.Registry) error { + + if swag.IsZero(m.AllottedIps) { // not required + return nil + } + + if err := validate.UniqueItems("allottedIps", "body", m.AllottedIps); err != nil { + return err + } + + return nil +} + +func (m *V1IPPoolStatus) validateAssociatedClusters(formats strfmt.Registry) error { + + if swag.IsZero(m.AssociatedClusters) { // not required + return nil + } + + if err := validate.UniqueItems("associatedClusters", "body", m.AssociatedClusters); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1IPPoolStatus) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1IPPoolStatus) UnmarshalBinary(b []byte) error { + var res V1IPPoolStatus + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_ip_pools.go b/api/models/v1_ip_pools.go new file mode 100644 index 00000000..f00b28ee --- /dev/null +++ b/api/models/v1_ip_pools.go @@ -0,0 +1,87 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1IPPools v1 Ip pools +// +// swagger:model v1IpPools +type V1IPPools struct { + + // items + // Required: true + // Unique: true + Items []*V1IPPoolEntity `json:"items"` +} + +// Validate validates this v1 Ip pools +func (m *V1IPPools) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateItems(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1IPPools) validateItems(formats strfmt.Registry) error { + + if err := validate.Required("items", "body", m.Items); err != nil { + return err + } + + if err := validate.UniqueItems("items", "body", m.Items); err != nil { + return err + } + + for i := 0; i < len(m.Items); i++ { + if swag.IsZero(m.Items[i]) { // not required + continue + } + + if m.Items[i] != nil { + if err := m.Items[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("items" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1IPPools) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1IPPools) UnmarshalBinary(b []byte) error { + var res V1IPPools + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_kube_bench_entity.go b/api/models/v1_kube_bench_entity.go new file mode 100644 index 00000000..50f3b5eb --- /dev/null +++ b/api/models/v1_kube_bench_entity.go @@ -0,0 +1,150 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "encoding/json" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1KubeBenchEntity KubeBench response +// +// swagger:model v1KubeBenchEntity +type V1KubeBenchEntity struct { + + // reports + // Required: true + Reports map[string]V1KubeBenchReportEntity `json:"reports"` + + // request Uid + // Required: true + RequestUID *string `json:"requestUid"` + + // status + // Required: true + // Enum: [Completed InProgress Failed Initiated] + Status *string `json:"status"` +} + +// Validate validates this v1 kube bench entity +func (m *V1KubeBenchEntity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateReports(formats); err != nil { + res = append(res, err) + } + + if err := m.validateRequestUID(formats); err != nil { + res = append(res, err) + } + + if err := m.validateStatus(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1KubeBenchEntity) validateReports(formats strfmt.Registry) error { + + for k := range m.Reports { + + if err := validate.Required("reports"+"."+k, "body", m.Reports[k]); err != nil { + return err + } + if val, ok := m.Reports[k]; ok { + if err := val.Validate(formats); err != nil { + return err + } + } + + } + + return nil +} + +func (m *V1KubeBenchEntity) validateRequestUID(formats strfmt.Registry) error { + + if err := validate.Required("requestUid", "body", m.RequestUID); err != nil { + return err + } + + return nil +} + +var v1KubeBenchEntityTypeStatusPropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["Completed","InProgress","Failed","Initiated"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + v1KubeBenchEntityTypeStatusPropEnum = append(v1KubeBenchEntityTypeStatusPropEnum, v) + } +} + +const ( + + // V1KubeBenchEntityStatusCompleted captures enum value "Completed" + V1KubeBenchEntityStatusCompleted string = "Completed" + + // V1KubeBenchEntityStatusInProgress captures enum value "InProgress" + V1KubeBenchEntityStatusInProgress string = "InProgress" + + // V1KubeBenchEntityStatusFailed captures enum value "Failed" + V1KubeBenchEntityStatusFailed string = "Failed" + + // V1KubeBenchEntityStatusInitiated captures enum value "Initiated" + V1KubeBenchEntityStatusInitiated string = "Initiated" +) + +// prop value enum +func (m *V1KubeBenchEntity) validateStatusEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, v1KubeBenchEntityTypeStatusPropEnum, true); err != nil { + return err + } + return nil +} + +func (m *V1KubeBenchEntity) validateStatus(formats strfmt.Registry) error { + + if err := validate.Required("status", "body", m.Status); err != nil { + return err + } + + // value enum + if err := m.validateStatusEnum("status", "body", *m.Status); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1KubeBenchEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1KubeBenchEntity) UnmarshalBinary(b []byte) error { + var res V1KubeBenchEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_kube_bench_log.go b/api/models/v1_kube_bench_log.go new file mode 100644 index 00000000..c0239a1e --- /dev/null +++ b/api/models/v1_kube_bench_log.go @@ -0,0 +1,58 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1KubeBenchLog Compliance Scan KubeBench Log +// +// swagger:model v1KubeBenchLog +type V1KubeBenchLog struct { + + // description + Description string `json:"description,omitempty"` + + // expected + Expected string `json:"expected,omitempty"` + + // remediation + Remediation string `json:"remediation,omitempty"` + + // state + State string `json:"state,omitempty"` + + // test Id + TestID string `json:"testId,omitempty"` + + // value + Value string `json:"value,omitempty"` +} + +// Validate validates this v1 kube bench log +func (m *V1KubeBenchLog) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1KubeBenchLog) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1KubeBenchLog) UnmarshalBinary(b []byte) error { + var res V1KubeBenchLog + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_kube_bench_log_entity.go b/api/models/v1_kube_bench_log_entity.go new file mode 100644 index 00000000..4684051d --- /dev/null +++ b/api/models/v1_kube_bench_log_entity.go @@ -0,0 +1,58 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1KubeBenchLogEntity KubeBench log +// +// swagger:model v1KubeBenchLogEntity +type V1KubeBenchLogEntity struct { + + // description + Description string `json:"description,omitempty"` + + // expected + Expected string `json:"expected,omitempty"` + + // remediation + Remediation string `json:"remediation,omitempty"` + + // state + State string `json:"state,omitempty"` + + // test Id + TestID string `json:"testId,omitempty"` + + // value + Value string `json:"value,omitempty"` +} + +// Validate validates this v1 kube bench log entity +func (m *V1KubeBenchLogEntity) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1KubeBenchLogEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1KubeBenchLogEntity) UnmarshalBinary(b []byte) error { + var res V1KubeBenchLogEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_kube_bench_report.go b/api/models/v1_kube_bench_report.go new file mode 100644 index 00000000..2d093c49 --- /dev/null +++ b/api/models/v1_kube_bench_report.go @@ -0,0 +1,122 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1KubeBenchReport Compliance Scan KubeBench Report +// +// swagger:model v1KubeBenchReport +type V1KubeBenchReport struct { + + // fail + Fail int32 `json:"fail,omitempty"` + + // info + Info int32 `json:"info,omitempty"` + + // logs + Logs []*V1KubeBenchLog `json:"logs"` + + // name + Name string `json:"name,omitempty"` + + // pass + Pass int32 `json:"pass,omitempty"` + + // time + // Format: date-time + Time V1Time `json:"time,omitempty"` + + // type + Type string `json:"type,omitempty"` + + // warn + Warn int32 `json:"warn,omitempty"` +} + +// Validate validates this v1 kube bench report +func (m *V1KubeBenchReport) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateLogs(formats); err != nil { + res = append(res, err) + } + + if err := m.validateTime(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1KubeBenchReport) validateLogs(formats strfmt.Registry) error { + + if swag.IsZero(m.Logs) { // not required + return nil + } + + for i := 0; i < len(m.Logs); i++ { + if swag.IsZero(m.Logs[i]) { // not required + continue + } + + if m.Logs[i] != nil { + if err := m.Logs[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("logs" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1KubeBenchReport) validateTime(formats strfmt.Registry) error { + + if swag.IsZero(m.Time) { // not required + return nil + } + + if err := m.Time.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("time") + } + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1KubeBenchReport) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1KubeBenchReport) UnmarshalBinary(b []byte) error { + var res V1KubeBenchReport + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_kube_bench_report_entity.go b/api/models/v1_kube_bench_report_entity.go new file mode 100644 index 00000000..4fe9abd3 --- /dev/null +++ b/api/models/v1_kube_bench_report_entity.go @@ -0,0 +1,122 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1KubeBenchReportEntity KubeBench report +// +// swagger:model v1KubeBenchReportEntity +type V1KubeBenchReportEntity struct { + + // fail + Fail int32 `json:"fail,omitempty"` + + // info + Info int32 `json:"info,omitempty"` + + // logs + Logs []*V1KubeBenchLogEntity `json:"logs"` + + // name + Name string `json:"name,omitempty"` + + // pass + Pass int32 `json:"pass,omitempty"` + + // time + // Format: date-time + Time V1Time `json:"time,omitempty"` + + // type + Type string `json:"type,omitempty"` + + // warn + Warn int32 `json:"warn,omitempty"` +} + +// Validate validates this v1 kube bench report entity +func (m *V1KubeBenchReportEntity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateLogs(formats); err != nil { + res = append(res, err) + } + + if err := m.validateTime(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1KubeBenchReportEntity) validateLogs(formats strfmt.Registry) error { + + if swag.IsZero(m.Logs) { // not required + return nil + } + + for i := 0; i < len(m.Logs); i++ { + if swag.IsZero(m.Logs[i]) { // not required + continue + } + + if m.Logs[i] != nil { + if err := m.Logs[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("logs" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1KubeBenchReportEntity) validateTime(formats strfmt.Registry) error { + + if swag.IsZero(m.Time) { // not required + return nil + } + + if err := m.Time.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("time") + } + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1KubeBenchReportEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1KubeBenchReportEntity) UnmarshalBinary(b []byte) error { + var res V1KubeBenchReportEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_kube_hunter_entity.go b/api/models/v1_kube_hunter_entity.go new file mode 100644 index 00000000..b892537f --- /dev/null +++ b/api/models/v1_kube_hunter_entity.go @@ -0,0 +1,150 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "encoding/json" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1KubeHunterEntity KubeHunter response +// +// swagger:model v1KubeHunterEntity +type V1KubeHunterEntity struct { + + // reports + // Required: true + Reports map[string]V1KubeHunterReportEntity `json:"reports"` + + // request Uid + // Required: true + RequestUID *string `json:"requestUid"` + + // status + // Required: true + // Enum: [Completed InProgress Failed Initiated] + Status *string `json:"status"` +} + +// Validate validates this v1 kube hunter entity +func (m *V1KubeHunterEntity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateReports(formats); err != nil { + res = append(res, err) + } + + if err := m.validateRequestUID(formats); err != nil { + res = append(res, err) + } + + if err := m.validateStatus(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1KubeHunterEntity) validateReports(formats strfmt.Registry) error { + + for k := range m.Reports { + + if err := validate.Required("reports"+"."+k, "body", m.Reports[k]); err != nil { + return err + } + if val, ok := m.Reports[k]; ok { + if err := val.Validate(formats); err != nil { + return err + } + } + + } + + return nil +} + +func (m *V1KubeHunterEntity) validateRequestUID(formats strfmt.Registry) error { + + if err := validate.Required("requestUid", "body", m.RequestUID); err != nil { + return err + } + + return nil +} + +var v1KubeHunterEntityTypeStatusPropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["Completed","InProgress","Failed","Initiated"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + v1KubeHunterEntityTypeStatusPropEnum = append(v1KubeHunterEntityTypeStatusPropEnum, v) + } +} + +const ( + + // V1KubeHunterEntityStatusCompleted captures enum value "Completed" + V1KubeHunterEntityStatusCompleted string = "Completed" + + // V1KubeHunterEntityStatusInProgress captures enum value "InProgress" + V1KubeHunterEntityStatusInProgress string = "InProgress" + + // V1KubeHunterEntityStatusFailed captures enum value "Failed" + V1KubeHunterEntityStatusFailed string = "Failed" + + // V1KubeHunterEntityStatusInitiated captures enum value "Initiated" + V1KubeHunterEntityStatusInitiated string = "Initiated" +) + +// prop value enum +func (m *V1KubeHunterEntity) validateStatusEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, v1KubeHunterEntityTypeStatusPropEnum, true); err != nil { + return err + } + return nil +} + +func (m *V1KubeHunterEntity) validateStatus(formats strfmt.Registry) error { + + if err := validate.Required("status", "body", m.Status); err != nil { + return err + } + + // value enum + if err := m.validateStatusEnum("status", "body", *m.Status); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1KubeHunterEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1KubeHunterEntity) UnmarshalBinary(b []byte) error { + var res V1KubeHunterEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_kube_hunter_log.go b/api/models/v1_kube_hunter_log.go new file mode 100644 index 00000000..83c07916 --- /dev/null +++ b/api/models/v1_kube_hunter_log.go @@ -0,0 +1,58 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1KubeHunterLog Compliance Scan KubeHunter Log +// +// swagger:model v1KubeHunterLog +type V1KubeHunterLog struct { + + // description + Description string `json:"description,omitempty"` + + // evidence + Evidence string `json:"evidence,omitempty"` + + // reference + Reference string `json:"reference,omitempty"` + + // severity + Severity string `json:"severity,omitempty"` + + // test Id + TestID string `json:"testId,omitempty"` + + // vulnerability + Vulnerability string `json:"vulnerability,omitempty"` +} + +// Validate validates this v1 kube hunter log +func (m *V1KubeHunterLog) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1KubeHunterLog) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1KubeHunterLog) UnmarshalBinary(b []byte) error { + var res V1KubeHunterLog + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_kube_hunter_log_entity.go b/api/models/v1_kube_hunter_log_entity.go new file mode 100644 index 00000000..8e42d593 --- /dev/null +++ b/api/models/v1_kube_hunter_log_entity.go @@ -0,0 +1,58 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1KubeHunterLogEntity KubeHunter log +// +// swagger:model v1KubeHunterLogEntity +type V1KubeHunterLogEntity struct { + + // description + Description string `json:"description,omitempty"` + + // evidence + Evidence string `json:"evidence,omitempty"` + + // reference + Reference string `json:"reference,omitempty"` + + // severity + Severity string `json:"severity,omitempty"` + + // test Id + TestID string `json:"testId,omitempty"` + + // vulnerability + Vulnerability string `json:"vulnerability,omitempty"` +} + +// Validate validates this v1 kube hunter log entity +func (m *V1KubeHunterLogEntity) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1KubeHunterLogEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1KubeHunterLogEntity) UnmarshalBinary(b []byte) error { + var res V1KubeHunterLogEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_kube_hunter_report.go b/api/models/v1_kube_hunter_report.go new file mode 100644 index 00000000..b594c641 --- /dev/null +++ b/api/models/v1_kube_hunter_report.go @@ -0,0 +1,129 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1KubeHunterReport Compliance Scan KubeHunter Report +// +// swagger:model v1KubeHunterReport +type V1KubeHunterReport struct { + + // logs + Logs []*V1KubeHunterLog `json:"logs"` + + // time + // Format: date-time + Time V1Time `json:"time,omitempty"` + + // vulnerabilites + Vulnerabilites *V1KubeHunterVulnerabilities `json:"vulnerabilites,omitempty"` +} + +// Validate validates this v1 kube hunter report +func (m *V1KubeHunterReport) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateLogs(formats); err != nil { + res = append(res, err) + } + + if err := m.validateTime(formats); err != nil { + res = append(res, err) + } + + if err := m.validateVulnerabilites(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1KubeHunterReport) validateLogs(formats strfmt.Registry) error { + + if swag.IsZero(m.Logs) { // not required + return nil + } + + for i := 0; i < len(m.Logs); i++ { + if swag.IsZero(m.Logs[i]) { // not required + continue + } + + if m.Logs[i] != nil { + if err := m.Logs[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("logs" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1KubeHunterReport) validateTime(formats strfmt.Registry) error { + + if swag.IsZero(m.Time) { // not required + return nil + } + + if err := m.Time.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("time") + } + return err + } + + return nil +} + +func (m *V1KubeHunterReport) validateVulnerabilites(formats strfmt.Registry) error { + + if swag.IsZero(m.Vulnerabilites) { // not required + return nil + } + + if m.Vulnerabilites != nil { + if err := m.Vulnerabilites.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("vulnerabilites") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1KubeHunterReport) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1KubeHunterReport) UnmarshalBinary(b []byte) error { + var res V1KubeHunterReport + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_kube_hunter_report_entity.go b/api/models/v1_kube_hunter_report_entity.go new file mode 100644 index 00000000..a9da8c55 --- /dev/null +++ b/api/models/v1_kube_hunter_report_entity.go @@ -0,0 +1,129 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1KubeHunterReportEntity KubeHunter report +// +// swagger:model v1KubeHunterReportEntity +type V1KubeHunterReportEntity struct { + + // logs + Logs []*V1KubeHunterLogEntity `json:"logs"` + + // time + // Format: date-time + Time V1Time `json:"time,omitempty"` + + // vulnerabilities + Vulnerabilities *V1KubeHunterVulnerabilityDataEntity `json:"vulnerabilities,omitempty"` +} + +// Validate validates this v1 kube hunter report entity +func (m *V1KubeHunterReportEntity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateLogs(formats); err != nil { + res = append(res, err) + } + + if err := m.validateTime(formats); err != nil { + res = append(res, err) + } + + if err := m.validateVulnerabilities(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1KubeHunterReportEntity) validateLogs(formats strfmt.Registry) error { + + if swag.IsZero(m.Logs) { // not required + return nil + } + + for i := 0; i < len(m.Logs); i++ { + if swag.IsZero(m.Logs[i]) { // not required + continue + } + + if m.Logs[i] != nil { + if err := m.Logs[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("logs" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1KubeHunterReportEntity) validateTime(formats strfmt.Registry) error { + + if swag.IsZero(m.Time) { // not required + return nil + } + + if err := m.Time.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("time") + } + return err + } + + return nil +} + +func (m *V1KubeHunterReportEntity) validateVulnerabilities(formats strfmt.Registry) error { + + if swag.IsZero(m.Vulnerabilities) { // not required + return nil + } + + if m.Vulnerabilities != nil { + if err := m.Vulnerabilities.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("vulnerabilities") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1KubeHunterReportEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1KubeHunterReportEntity) UnmarshalBinary(b []byte) error { + var res V1KubeHunterReportEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_kube_hunter_vulnerabilities.go b/api/models/v1_kube_hunter_vulnerabilities.go new file mode 100644 index 00000000..2c0fa9e8 --- /dev/null +++ b/api/models/v1_kube_hunter_vulnerabilities.go @@ -0,0 +1,49 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1KubeHunterVulnerabilities Compliance Scan KubeHunter Vulnerabilities +// +// swagger:model v1KubeHunterVulnerabilities +type V1KubeHunterVulnerabilities struct { + + // high + High int32 `json:"high,omitempty"` + + // low + Low int32 `json:"low,omitempty"` + + // medium + Medium int32 `json:"medium,omitempty"` +} + +// Validate validates this v1 kube hunter vulnerabilities +func (m *V1KubeHunterVulnerabilities) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1KubeHunterVulnerabilities) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1KubeHunterVulnerabilities) UnmarshalBinary(b []byte) error { + var res V1KubeHunterVulnerabilities + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_kube_hunter_vulnerability_data_entity.go b/api/models/v1_kube_hunter_vulnerability_data_entity.go new file mode 100644 index 00000000..9be0d8a6 --- /dev/null +++ b/api/models/v1_kube_hunter_vulnerability_data_entity.go @@ -0,0 +1,49 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1KubeHunterVulnerabilityDataEntity KubeHunter vulnerability data +// +// swagger:model v1KubeHunterVulnerabilityDataEntity +type V1KubeHunterVulnerabilityDataEntity struct { + + // high + High int32 `json:"high,omitempty"` + + // low + Low int32 `json:"low,omitempty"` + + // medium + Medium int32 `json:"medium,omitempty"` +} + +// Validate validates this v1 kube hunter vulnerability data entity +func (m *V1KubeHunterVulnerabilityDataEntity) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1KubeHunterVulnerabilityDataEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1KubeHunterVulnerabilityDataEntity) UnmarshalBinary(b []byte) error { + var res V1KubeHunterVulnerabilityDataEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_kube_meta.go b/api/models/v1_kube_meta.go new file mode 100644 index 00000000..2a6aed93 --- /dev/null +++ b/api/models/v1_kube_meta.go @@ -0,0 +1,52 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1KubeMeta Spectro cluster kube meta +// +// swagger:model v1KubeMeta +type V1KubeMeta struct { + + // has kube config + HasKubeConfig bool `json:"hasKubeConfig"` + + // has kube config client + HasKubeConfigClient bool `json:"hasKubeConfigClient"` + + // has manifest + HasManifest bool `json:"hasManifest"` + + // kubernetes version + KubernetesVersion string `json:"kubernetesVersion,omitempty"` +} + +// Validate validates this v1 kube meta +func (m *V1KubeMeta) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1KubeMeta) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1KubeMeta) UnmarshalBinary(b []byte) error { + var res V1KubeMeta + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_libvirt_cloud_cluster_config_entity.go b/api/models/v1_libvirt_cloud_cluster_config_entity.go new file mode 100644 index 00000000..884e597f --- /dev/null +++ b/api/models/v1_libvirt_cloud_cluster_config_entity.go @@ -0,0 +1,71 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1LibvirtCloudClusterConfigEntity Libvirt cloud cluster config entity +// +// swagger:model v1LibvirtCloudClusterConfigEntity +type V1LibvirtCloudClusterConfigEntity struct { + + // cluster config + ClusterConfig *V1LibvirtClusterConfig `json:"clusterConfig,omitempty"` +} + +// Validate validates this v1 libvirt cloud cluster config entity +func (m *V1LibvirtCloudClusterConfigEntity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateClusterConfig(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1LibvirtCloudClusterConfigEntity) validateClusterConfig(formats strfmt.Registry) error { + + if swag.IsZero(m.ClusterConfig) { // not required + return nil + } + + if m.ClusterConfig != nil { + if err := m.ClusterConfig.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("clusterConfig") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1LibvirtCloudClusterConfigEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1LibvirtCloudClusterConfigEntity) UnmarshalBinary(b []byte) error { + var res V1LibvirtCloudClusterConfigEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_libvirt_cloud_config.go b/api/models/v1_libvirt_cloud_config.go new file mode 100644 index 00000000..3fb764ff --- /dev/null +++ b/api/models/v1_libvirt_cloud_config.go @@ -0,0 +1,127 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1LibvirtCloudConfig LibvirtCloudConfig is the Schema for the libvirtcloudconfigs API +// +// swagger:model v1LibvirtCloudConfig +type V1LibvirtCloudConfig struct { + + // APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + APIVersion string `json:"apiVersion,omitempty"` + + // Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + Kind string `json:"kind,omitempty"` + + // metadata + Metadata *V1ObjectMeta `json:"metadata,omitempty"` + + // spec + Spec *V1LibvirtCloudConfigSpec `json:"spec,omitempty"` + + // status + Status *V1LibvirtCloudConfigStatus `json:"status,omitempty"` +} + +// Validate validates this v1 libvirt cloud config +func (m *V1LibvirtCloudConfig) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSpec(formats); err != nil { + res = append(res, err) + } + + if err := m.validateStatus(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1LibvirtCloudConfig) validateMetadata(formats strfmt.Registry) error { + + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } + return err + } + } + + return nil +} + +func (m *V1LibvirtCloudConfig) validateSpec(formats strfmt.Registry) error { + + if swag.IsZero(m.Spec) { // not required + return nil + } + + if m.Spec != nil { + if err := m.Spec.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec") + } + return err + } + } + + return nil +} + +func (m *V1LibvirtCloudConfig) validateStatus(formats strfmt.Registry) error { + + if swag.IsZero(m.Status) { // not required + return nil + } + + if m.Status != nil { + if err := m.Status.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("status") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1LibvirtCloudConfig) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1LibvirtCloudConfig) UnmarshalBinary(b []byte) error { + var res V1LibvirtCloudConfig + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_libvirt_cloud_config_spec.go b/api/models/v1_libvirt_cloud_config_spec.go new file mode 100644 index 00000000..3848b3aa --- /dev/null +++ b/api/models/v1_libvirt_cloud_config_spec.go @@ -0,0 +1,108 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1LibvirtCloudConfigSpec LibvirtCloudConfigSpec defines the desired state of LibvirtCloudConfig +// +// swagger:model v1LibvirtCloudConfigSpec +type V1LibvirtCloudConfigSpec struct { + + // cluster config + // Required: true + ClusterConfig *V1LibvirtClusterConfig `json:"clusterConfig"` + + // machine pool config + // Required: true + MachinePoolConfig []*V1LibvirtMachinePoolConfig `json:"machinePoolConfig"` +} + +// Validate validates this v1 libvirt cloud config spec +func (m *V1LibvirtCloudConfigSpec) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateClusterConfig(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMachinePoolConfig(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1LibvirtCloudConfigSpec) validateClusterConfig(formats strfmt.Registry) error { + + if err := validate.Required("clusterConfig", "body", m.ClusterConfig); err != nil { + return err + } + + if m.ClusterConfig != nil { + if err := m.ClusterConfig.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("clusterConfig") + } + return err + } + } + + return nil +} + +func (m *V1LibvirtCloudConfigSpec) validateMachinePoolConfig(formats strfmt.Registry) error { + + if err := validate.Required("machinePoolConfig", "body", m.MachinePoolConfig); err != nil { + return err + } + + for i := 0; i < len(m.MachinePoolConfig); i++ { + if swag.IsZero(m.MachinePoolConfig[i]) { // not required + continue + } + + if m.MachinePoolConfig[i] != nil { + if err := m.MachinePoolConfig[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("machinePoolConfig" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1LibvirtCloudConfigSpec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1LibvirtCloudConfigSpec) UnmarshalBinary(b []byte) error { + var res V1LibvirtCloudConfigSpec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_libvirt_cloud_config_status.go b/api/models/v1_libvirt_cloud_config_status.go new file mode 100644 index 00000000..fdd40beb --- /dev/null +++ b/api/models/v1_libvirt_cloud_config_status.go @@ -0,0 +1,115 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1LibvirtCloudConfigStatus v1 libvirt cloud config status +// +// swagger:model v1LibvirtCloudConfigStatus +type V1LibvirtCloudConfigStatus struct { + + // conditions + Conditions []*V1ClusterCondition `json:"conditions"` + + // NodeImages are the list of images generated on all the LibvirtHosts + NodeImages []*V1LibvirtImage `json:"nodeImages"` + + // SourceImageId can be from packref's annotations or from pack.json + SourceImageID string `json:"sourceImageId,omitempty"` +} + +// Validate validates this v1 libvirt cloud config status +func (m *V1LibvirtCloudConfigStatus) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateConditions(formats); err != nil { + res = append(res, err) + } + + if err := m.validateNodeImages(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1LibvirtCloudConfigStatus) validateConditions(formats strfmt.Registry) error { + + if swag.IsZero(m.Conditions) { // not required + return nil + } + + for i := 0; i < len(m.Conditions); i++ { + if swag.IsZero(m.Conditions[i]) { // not required + continue + } + + if m.Conditions[i] != nil { + if err := m.Conditions[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("conditions" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1LibvirtCloudConfigStatus) validateNodeImages(formats strfmt.Registry) error { + + if swag.IsZero(m.NodeImages) { // not required + return nil + } + + for i := 0; i < len(m.NodeImages); i++ { + if swag.IsZero(m.NodeImages[i]) { // not required + continue + } + + if m.NodeImages[i] != nil { + if err := m.NodeImages[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("nodeImages" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1LibvirtCloudConfigStatus) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1LibvirtCloudConfigStatus) UnmarshalBinary(b []byte) error { + var res V1LibvirtCloudConfigStatus + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_libvirt_cluster_config.go b/api/models/v1_libvirt_cluster_config.go new file mode 100644 index 00000000..90118f2e --- /dev/null +++ b/api/models/v1_libvirt_cluster_config.go @@ -0,0 +1,80 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1LibvirtClusterConfig v1 libvirt cluster config +// +// swagger:model v1LibvirtClusterConfig +type V1LibvirtClusterConfig struct { + + // ControlPlaneEndpoint is the control plane endpoint, which can be an IP or FQDN + ControlPlaneEndpoint *V1LibvirtControlPlaneEndPoint `json:"controlPlaneEndpoint,omitempty"` + + // NTPServers is a list of NTP servers to use instead of the machine image's default NTP server list + NtpServers []string `json:"ntpServers"` + + // SSHKeys specifies a list of ssh authorized keys to access the vms as a 'spectro' user + SSHKeys []string `json:"sshKeys"` + + // StaticIP indicates if IP allocation type is static IP. DHCP is the default allocation type + StaticIP bool `json:"staticIp,omitempty"` +} + +// Validate validates this v1 libvirt cluster config +func (m *V1LibvirtClusterConfig) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateControlPlaneEndpoint(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1LibvirtClusterConfig) validateControlPlaneEndpoint(formats strfmt.Registry) error { + + if swag.IsZero(m.ControlPlaneEndpoint) { // not required + return nil + } + + if m.ControlPlaneEndpoint != nil { + if err := m.ControlPlaneEndpoint.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("controlPlaneEndpoint") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1LibvirtClusterConfig) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1LibvirtClusterConfig) UnmarshalBinary(b []byte) error { + var res V1LibvirtClusterConfig + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_libvirt_control_plane_end_point.go b/api/models/v1_libvirt_control_plane_end_point.go new file mode 100644 index 00000000..08da82a4 --- /dev/null +++ b/api/models/v1_libvirt_control_plane_end_point.go @@ -0,0 +1,49 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1LibvirtControlPlaneEndPoint v1 libvirt control plane end point +// +// swagger:model v1LibvirtControlPlaneEndPoint +type V1LibvirtControlPlaneEndPoint struct { + + // DDNSSearchDomain is the search domain used for resolving IP addresses when the EndpointType is DDNS. This search domain is appended to the generated Hostname to obtain the complete DNS name for the endpoint. If Host is already a DDNS FQDN, DDNSSearchDomain is not required + DdnsSearchDomain string `json:"ddnsSearchDomain,omitempty"` + + // Host is FQDN(DDNS) or IP + Host string `json:"host,omitempty"` + + // Type indicates DDNS or VIP + Type string `json:"type,omitempty"` +} + +// Validate validates this v1 libvirt control plane end point +func (m *V1LibvirtControlPlaneEndPoint) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1LibvirtControlPlaneEndPoint) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1LibvirtControlPlaneEndPoint) UnmarshalBinary(b []byte) error { + var res V1LibvirtControlPlaneEndPoint + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_libvirt_disk_spec.go b/api/models/v1_libvirt_disk_spec.go new file mode 100644 index 00000000..52831fa6 --- /dev/null +++ b/api/models/v1_libvirt_disk_spec.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1LibvirtDiskSpec v1 libvirt disk spec +// +// swagger:model v1LibvirtDiskSpec +type V1LibvirtDiskSpec struct { + + // DataStoragePool is the storage pool from which additional disks are assigned + DataStoragePool string `json:"dataStoragePool,omitempty"` + + // Managed indicates if the disk is a persistent or not. By default its false indicating all disks are ephemeral. + Managed bool `json:"managed,omitempty"` + + // SizeInGB is the target size in GB of the disk to be added + // Required: true + SizeInGB *int32 `json:"sizeInGB"` +} + +// Validate validates this v1 libvirt disk spec +func (m *V1LibvirtDiskSpec) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateSizeInGB(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1LibvirtDiskSpec) validateSizeInGB(formats strfmt.Registry) error { + + if err := validate.Required("sizeInGB", "body", m.SizeInGB); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1LibvirtDiskSpec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1LibvirtDiskSpec) UnmarshalBinary(b []byte) error { + var res V1LibvirtDiskSpec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_libvirt_host_identity.go b/api/models/v1_libvirt_host_identity.go new file mode 100644 index 00000000..f250ffb2 --- /dev/null +++ b/api/models/v1_libvirt_host_identity.go @@ -0,0 +1,80 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1LibvirtHostIdentity v1 libvirt host identity +// +// swagger:model v1LibvirtHostIdentity +type V1LibvirtHostIdentity struct { + + // CACert is the client CA certificate + CaCert string `json:"caCert,omitempty"` + + // Mode indicates a system or session connection to the host + Mode string `json:"mode,omitempty"` + + // SocketPath is an optional path to the socket on the host, if not using defaults + SocketPath string `json:"socketPath,omitempty"` + + // SSHSecrets to the secret containing ssh-username + SSHSecret *V1EdgeHostSSHSecret `json:"sshSecret,omitempty"` +} + +// Validate validates this v1 libvirt host identity +func (m *V1LibvirtHostIdentity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateSSHSecret(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1LibvirtHostIdentity) validateSSHSecret(formats strfmt.Registry) error { + + if swag.IsZero(m.SSHSecret) { // not required + return nil + } + + if m.SSHSecret != nil { + if err := m.SSHSecret.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("sshSecret") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1LibvirtHostIdentity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1LibvirtHostIdentity) UnmarshalBinary(b []byte) error { + var res V1LibvirtHostIdentity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_libvirt_image.go b/api/models/v1_libvirt_image.go new file mode 100644 index 00000000..bdc89ef9 --- /dev/null +++ b/api/models/v1_libvirt_image.go @@ -0,0 +1,49 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1LibvirtImage LibvirtImage is the Image generated on the LibvirtHost +// +// swagger:model v1LibvirtImage +type V1LibvirtImage struct { + + // HostID is the ID of the LibvirtHost + HostID string `json:"hostID,omitempty"` + + // ImageName is the name of the Libvirt image + ImageName string `json:"imageName,omitempty"` + + // StoragePool is the name of the storagePool where is image is located + StoragePool string `json:"storagePool,omitempty"` +} + +// Validate validates this v1 libvirt image +func (m *V1LibvirtImage) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1LibvirtImage) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1LibvirtImage) UnmarshalBinary(b []byte) error { + var res V1LibvirtImage + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_libvirt_instance_type.go b/api/models/v1_libvirt_instance_type.go new file mode 100644 index 00000000..a46f894d --- /dev/null +++ b/api/models/v1_libvirt_instance_type.go @@ -0,0 +1,134 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1LibvirtInstanceType LibvirtInstanceType defines the instance configuration for a virtual machine +// +// swagger:model v1LibvirtInstanceType +type V1LibvirtInstanceType struct { + + // Defines CPU Passthrough Spec. A not null value enables CPU Passthrough for the libvirt domain. Further cache passthrough can be enabled with the CPU passthrough spec. + CPUPassthroughSpec *V1CPUPassthroughSpec `json:"cpuPassthroughSpec,omitempty"` + + // CPUSet defines cpuset for an instance which allows allocation specific set of cpus E.g cpuset="1-4,^3,6" See https://libvirt.org/formatdomain.html#cpu-allocation + Cpuset string `json:"cpuset,omitempty"` + + // GPU configuration + GpuConfig *V1GPUConfig `json:"gpuConfig,omitempty"` + + // MemoryinMB is the memory in megabytes + // Required: true + MemoryInMB *int32 `json:"memoryInMB"` + + // NumCPUs is the number of CPUs + // Required: true + NumCPUs *int32 `json:"numCPUs"` +} + +// Validate validates this v1 libvirt instance type +func (m *V1LibvirtInstanceType) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateCPUPassthroughSpec(formats); err != nil { + res = append(res, err) + } + + if err := m.validateGpuConfig(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMemoryInMB(formats); err != nil { + res = append(res, err) + } + + if err := m.validateNumCPUs(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1LibvirtInstanceType) validateCPUPassthroughSpec(formats strfmt.Registry) error { + + if swag.IsZero(m.CPUPassthroughSpec) { // not required + return nil + } + + if m.CPUPassthroughSpec != nil { + if err := m.CPUPassthroughSpec.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("cpuPassthroughSpec") + } + return err + } + } + + return nil +} + +func (m *V1LibvirtInstanceType) validateGpuConfig(formats strfmt.Registry) error { + + if swag.IsZero(m.GpuConfig) { // not required + return nil + } + + if m.GpuConfig != nil { + if err := m.GpuConfig.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("gpuConfig") + } + return err + } + } + + return nil +} + +func (m *V1LibvirtInstanceType) validateMemoryInMB(formats strfmt.Registry) error { + + if err := validate.Required("memoryInMB", "body", m.MemoryInMB); err != nil { + return err + } + + return nil +} + +func (m *V1LibvirtInstanceType) validateNumCPUs(formats strfmt.Registry) error { + + if err := validate.Required("numCPUs", "body", m.NumCPUs); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1LibvirtInstanceType) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1LibvirtInstanceType) UnmarshalBinary(b []byte) error { + var res V1LibvirtInstanceType + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_libvirt_machine.go b/api/models/v1_libvirt_machine.go new file mode 100644 index 00000000..02b46a01 --- /dev/null +++ b/api/models/v1_libvirt_machine.go @@ -0,0 +1,127 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1LibvirtMachine Libvirt cloud VM definition +// +// swagger:model v1LibvirtMachine +type V1LibvirtMachine struct { + + // api version + APIVersion string `json:"apiVersion,omitempty"` + + // kind + Kind string `json:"kind,omitempty"` + + // metadata + Metadata *V1ObjectMeta `json:"metadata,omitempty"` + + // spec + Spec *V1LibvirtMachineSpec `json:"spec,omitempty"` + + // status + Status *V1CloudMachineStatus `json:"status,omitempty"` +} + +// Validate validates this v1 libvirt machine +func (m *V1LibvirtMachine) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSpec(formats); err != nil { + res = append(res, err) + } + + if err := m.validateStatus(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1LibvirtMachine) validateMetadata(formats strfmt.Registry) error { + + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } + return err + } + } + + return nil +} + +func (m *V1LibvirtMachine) validateSpec(formats strfmt.Registry) error { + + if swag.IsZero(m.Spec) { // not required + return nil + } + + if m.Spec != nil { + if err := m.Spec.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec") + } + return err + } + } + + return nil +} + +func (m *V1LibvirtMachine) validateStatus(formats strfmt.Registry) error { + + if swag.IsZero(m.Status) { // not required + return nil + } + + if m.Status != nil { + if err := m.Status.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("status") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1LibvirtMachine) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1LibvirtMachine) UnmarshalBinary(b []byte) error { + var res V1LibvirtMachine + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_libvirt_machine_pool_cloud_config_entity.go b/api/models/v1_libvirt_machine_pool_cloud_config_entity.go new file mode 100644 index 00000000..aa9c4379 --- /dev/null +++ b/api/models/v1_libvirt_machine_pool_cloud_config_entity.go @@ -0,0 +1,165 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1LibvirtMachinePoolCloudConfigEntity v1 libvirt machine pool cloud config entity +// +// swagger:model v1LibvirtMachinePoolCloudConfigEntity +type V1LibvirtMachinePoolCloudConfigEntity struct { + + // instance type + // Required: true + InstanceType *V1LibvirtInstanceType `json:"instanceType"` + + // NonRootDisksInGB is the list of additional disks, if required, in GB + NonRootDisksInGB []*V1LibvirtDiskSpec `json:"nonRootDisksInGB"` + + // Placements configuration Placements If defined, will replace default values defined in VsphereClusterConfig Array means one MachinePool can span across multiple vsphere compute cluster + // Required: true + // Unique: true + Placements []*V1LibvirtPlacementEntity `json:"placements"` + + // RootDiskInGB is the size of a vm's root disk, in GiB + // Required: true + RootDiskInGB *int32 `json:"rootDiskInGB"` + + // XSLTemplate defines a base64-encoded raw xsl template which will be included in the machine definition + XslTemplate string `json:"xslTemplate,omitempty"` +} + +// Validate validates this v1 libvirt machine pool cloud config entity +func (m *V1LibvirtMachinePoolCloudConfigEntity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateInstanceType(formats); err != nil { + res = append(res, err) + } + + if err := m.validateNonRootDisksInGB(formats); err != nil { + res = append(res, err) + } + + if err := m.validatePlacements(formats); err != nil { + res = append(res, err) + } + + if err := m.validateRootDiskInGB(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1LibvirtMachinePoolCloudConfigEntity) validateInstanceType(formats strfmt.Registry) error { + + if err := validate.Required("instanceType", "body", m.InstanceType); err != nil { + return err + } + + if m.InstanceType != nil { + if err := m.InstanceType.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("instanceType") + } + return err + } + } + + return nil +} + +func (m *V1LibvirtMachinePoolCloudConfigEntity) validateNonRootDisksInGB(formats strfmt.Registry) error { + + if swag.IsZero(m.NonRootDisksInGB) { // not required + return nil + } + + for i := 0; i < len(m.NonRootDisksInGB); i++ { + if swag.IsZero(m.NonRootDisksInGB[i]) { // not required + continue + } + + if m.NonRootDisksInGB[i] != nil { + if err := m.NonRootDisksInGB[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("nonRootDisksInGB" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1LibvirtMachinePoolCloudConfigEntity) validatePlacements(formats strfmt.Registry) error { + + if err := validate.Required("placements", "body", m.Placements); err != nil { + return err + } + + if err := validate.UniqueItems("placements", "body", m.Placements); err != nil { + return err + } + + for i := 0; i < len(m.Placements); i++ { + if swag.IsZero(m.Placements[i]) { // not required + continue + } + + if m.Placements[i] != nil { + if err := m.Placements[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("placements" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1LibvirtMachinePoolCloudConfigEntity) validateRootDiskInGB(formats strfmt.Registry) error { + + if err := validate.Required("rootDiskInGB", "body", m.RootDiskInGB); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1LibvirtMachinePoolCloudConfigEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1LibvirtMachinePoolCloudConfigEntity) UnmarshalBinary(b []byte) error { + var res V1LibvirtMachinePoolCloudConfigEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_libvirt_machine_pool_config.go b/api/models/v1_libvirt_machine_pool_config.go new file mode 100644 index 00000000..3d111e2d --- /dev/null +++ b/api/models/v1_libvirt_machine_pool_config.go @@ -0,0 +1,277 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1LibvirtMachinePoolConfig v1 libvirt machine pool config +// +// swagger:model v1LibvirtMachinePoolConfig +type V1LibvirtMachinePoolConfig struct { + + // additionalLabels + AdditionalLabels map[string]string `json:"additionalLabels,omitempty"` + + // AdditionalTags is an optional set of tags to add to resources managed by the provider, in addition to the ones added by default. For eg., tags for EKS nodeGroup or EKS NodegroupIAMRole + AdditionalTags map[string]string `json:"additionalTags,omitempty"` + + // InstanceType defines the instance configuration of the vms in the machine pool + // Required: true + InstanceType *V1LibvirtInstanceType `json:"instanceType"` + + // whether this pool is for control plane + IsControlPlane bool `json:"isControlPlane,omitempty"` + + // labels for this pool, example: control-plane/worker, gpu, windows + Labels []string `json:"labels"` + + // machine pool properties + MachinePoolProperties *V1MachinePoolProperties `json:"machinePoolProperties,omitempty"` + + // max size of the pool, for scaling + MaxSize int32 `json:"maxSize,omitempty"` + + // min size of the pool, for scaling + MinSize int32 `json:"minSize,omitempty"` + + // name + Name string `json:"name,omitempty"` + + // Minimum number of seconds a node should be Ready, before the next node is selected for repave. Applicable only for workerpools in infrastructure cluster + NodeRepaveInterval int32 `json:"nodeRepaveInterval,omitempty"` + + // NonRootDisksInGB is the list of additional disks, if required, in GB + NonRootDisksInGB []*V1LibvirtDiskSpec `json:"nonRootDisksInGB"` + + // Placements defines the configurations of the failureDomains(hosts) for the machine pool + // Required: true + Placements []*V1LibvirtPlacementConfig `json:"placements"` + + // RootDiskInGB is the size of a vm's root disk, in GB + // Required: true + RootDiskInGB *int32 `json:"rootDiskInGB"` + + // size of the pool, number of machines + Size int32 `json:"size,omitempty"` + + // control plane or worker taints + // Unique: true + Taints []*V1Taint `json:"taints"` + + // rolling update strategy for this machinepool if not specified, will use ScaleOut + UpdateStrategy *V1UpdateStrategy `json:"updateStrategy,omitempty"` + + // if IsControlPlane==true && useControlPlaneAsWorker==true, then will remove control plane taint this will not be used for worker pools + UseControlPlaneAsWorker bool `json:"useControlPlaneAsWorker,omitempty"` + + // XSLTemplate defines a base64-encoded raw xsl template which will be included in the machine definition + XslTemplate string `json:"xslTemplate,omitempty"` +} + +// Validate validates this v1 libvirt machine pool config +func (m *V1LibvirtMachinePoolConfig) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateInstanceType(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMachinePoolProperties(formats); err != nil { + res = append(res, err) + } + + if err := m.validateNonRootDisksInGB(formats); err != nil { + res = append(res, err) + } + + if err := m.validatePlacements(formats); err != nil { + res = append(res, err) + } + + if err := m.validateRootDiskInGB(formats); err != nil { + res = append(res, err) + } + + if err := m.validateTaints(formats); err != nil { + res = append(res, err) + } + + if err := m.validateUpdateStrategy(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1LibvirtMachinePoolConfig) validateInstanceType(formats strfmt.Registry) error { + + if err := validate.Required("instanceType", "body", m.InstanceType); err != nil { + return err + } + + if m.InstanceType != nil { + if err := m.InstanceType.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("instanceType") + } + return err + } + } + + return nil +} + +func (m *V1LibvirtMachinePoolConfig) validateMachinePoolProperties(formats strfmt.Registry) error { + + if swag.IsZero(m.MachinePoolProperties) { // not required + return nil + } + + if m.MachinePoolProperties != nil { + if err := m.MachinePoolProperties.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("machinePoolProperties") + } + return err + } + } + + return nil +} + +func (m *V1LibvirtMachinePoolConfig) validateNonRootDisksInGB(formats strfmt.Registry) error { + + if swag.IsZero(m.NonRootDisksInGB) { // not required + return nil + } + + for i := 0; i < len(m.NonRootDisksInGB); i++ { + if swag.IsZero(m.NonRootDisksInGB[i]) { // not required + continue + } + + if m.NonRootDisksInGB[i] != nil { + if err := m.NonRootDisksInGB[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("nonRootDisksInGB" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1LibvirtMachinePoolConfig) validatePlacements(formats strfmt.Registry) error { + + if err := validate.Required("placements", "body", m.Placements); err != nil { + return err + } + + for i := 0; i < len(m.Placements); i++ { + if swag.IsZero(m.Placements[i]) { // not required + continue + } + + if m.Placements[i] != nil { + if err := m.Placements[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("placements" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1LibvirtMachinePoolConfig) validateRootDiskInGB(formats strfmt.Registry) error { + + if err := validate.Required("rootDiskInGB", "body", m.RootDiskInGB); err != nil { + return err + } + + return nil +} + +func (m *V1LibvirtMachinePoolConfig) validateTaints(formats strfmt.Registry) error { + + if swag.IsZero(m.Taints) { // not required + return nil + } + + if err := validate.UniqueItems("taints", "body", m.Taints); err != nil { + return err + } + + for i := 0; i < len(m.Taints); i++ { + if swag.IsZero(m.Taints[i]) { // not required + continue + } + + if m.Taints[i] != nil { + if err := m.Taints[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("taints" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1LibvirtMachinePoolConfig) validateUpdateStrategy(formats strfmt.Registry) error { + + if swag.IsZero(m.UpdateStrategy) { // not required + return nil + } + + if m.UpdateStrategy != nil { + if err := m.UpdateStrategy.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("updateStrategy") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1LibvirtMachinePoolConfig) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1LibvirtMachinePoolConfig) UnmarshalBinary(b []byte) error { + var res V1LibvirtMachinePoolConfig + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_libvirt_machine_pool_config_entity.go b/api/models/v1_libvirt_machine_pool_config_entity.go new file mode 100644 index 00000000..0399b9da --- /dev/null +++ b/api/models/v1_libvirt_machine_pool_config_entity.go @@ -0,0 +1,96 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1LibvirtMachinePoolConfigEntity v1 libvirt machine pool config entity +// +// swagger:model v1LibvirtMachinePoolConfigEntity +type V1LibvirtMachinePoolConfigEntity struct { + + // cloud config + CloudConfig *V1LibvirtMachinePoolCloudConfigEntity `json:"cloudConfig,omitempty"` + + // pool config + PoolConfig *V1MachinePoolConfigEntity `json:"poolConfig,omitempty"` +} + +// Validate validates this v1 libvirt machine pool config entity +func (m *V1LibvirtMachinePoolConfigEntity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateCloudConfig(formats); err != nil { + res = append(res, err) + } + + if err := m.validatePoolConfig(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1LibvirtMachinePoolConfigEntity) validateCloudConfig(formats strfmt.Registry) error { + + if swag.IsZero(m.CloudConfig) { // not required + return nil + } + + if m.CloudConfig != nil { + if err := m.CloudConfig.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("cloudConfig") + } + return err + } + } + + return nil +} + +func (m *V1LibvirtMachinePoolConfigEntity) validatePoolConfig(formats strfmt.Registry) error { + + if swag.IsZero(m.PoolConfig) { // not required + return nil + } + + if m.PoolConfig != nil { + if err := m.PoolConfig.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("poolConfig") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1LibvirtMachinePoolConfigEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1LibvirtMachinePoolConfigEntity) UnmarshalBinary(b []byte) error { + var res V1LibvirtMachinePoolConfigEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_libvirt_machine_spec.go b/api/models/v1_libvirt_machine_spec.go new file mode 100644 index 00000000..f5c72058 --- /dev/null +++ b/api/models/v1_libvirt_machine_spec.go @@ -0,0 +1,149 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1LibvirtMachineSpec libvirt cloud VM definition spec +// +// swagger:model v1LibvirtMachineSpec +type V1LibvirtMachineSpec struct { + + // disks + Disks []*V1LibvirtDiskSpec `json:"disks"` + + // edge host Uid + EdgeHostUID string `json:"edgeHostUid,omitempty"` + + // failure domain + FailureDomain string `json:"failureDomain,omitempty"` + + // image name + ImageName string `json:"imageName,omitempty"` + + // instance type + InstanceType *V1LibvirtInstanceType `json:"instanceType,omitempty"` + + // nics + Nics []*V1LibvirtNicSpec `json:"nics"` + + // target storage pool + TargetStoragePool string `json:"targetStoragePool,omitempty"` +} + +// Validate validates this v1 libvirt machine spec +func (m *V1LibvirtMachineSpec) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateDisks(formats); err != nil { + res = append(res, err) + } + + if err := m.validateInstanceType(formats); err != nil { + res = append(res, err) + } + + if err := m.validateNics(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1LibvirtMachineSpec) validateDisks(formats strfmt.Registry) error { + + if swag.IsZero(m.Disks) { // not required + return nil + } + + for i := 0; i < len(m.Disks); i++ { + if swag.IsZero(m.Disks[i]) { // not required + continue + } + + if m.Disks[i] != nil { + if err := m.Disks[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("disks" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1LibvirtMachineSpec) validateInstanceType(formats strfmt.Registry) error { + + if swag.IsZero(m.InstanceType) { // not required + return nil + } + + if m.InstanceType != nil { + if err := m.InstanceType.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("instanceType") + } + return err + } + } + + return nil +} + +func (m *V1LibvirtMachineSpec) validateNics(formats strfmt.Registry) error { + + if swag.IsZero(m.Nics) { // not required + return nil + } + + for i := 0; i < len(m.Nics); i++ { + if swag.IsZero(m.Nics[i]) { // not required + continue + } + + if m.Nics[i] != nil { + if err := m.Nics[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("nics" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1LibvirtMachineSpec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1LibvirtMachineSpec) UnmarshalBinary(b []byte) error { + var res V1LibvirtMachineSpec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_libvirt_machines.go b/api/models/v1_libvirt_machines.go new file mode 100644 index 00000000..8bfe5dd3 --- /dev/null +++ b/api/models/v1_libvirt_machines.go @@ -0,0 +1,87 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1LibvirtMachines Libvirt machine list +// +// swagger:model v1LibvirtMachines +type V1LibvirtMachines struct { + + // items + // Required: true + // Unique: true + Items []*V1LibvirtMachine `json:"items"` +} + +// Validate validates this v1 libvirt machines +func (m *V1LibvirtMachines) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateItems(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1LibvirtMachines) validateItems(formats strfmt.Registry) error { + + if err := validate.Required("items", "body", m.Items); err != nil { + return err + } + + if err := validate.UniqueItems("items", "body", m.Items); err != nil { + return err + } + + for i := 0; i < len(m.Items); i++ { + if swag.IsZero(m.Items[i]) { // not required + continue + } + + if m.Items[i] != nil { + if err := m.Items[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("items" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1LibvirtMachines) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1LibvirtMachines) UnmarshalBinary(b []byte) error { + var res V1LibvirtMachines + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_libvirt_network_spec.go b/api/models/v1_libvirt_network_spec.go new file mode 100644 index 00000000..bc8cd36d --- /dev/null +++ b/api/models/v1_libvirt_network_spec.go @@ -0,0 +1,118 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "encoding/json" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1LibvirtNetworkSpec LibvirtNetworkSpec defines the network configuration for a virtual machine +// +// swagger:model v1LibvirtNetworkSpec +type V1LibvirtNetworkSpec struct { + + // NetworkName of the libvirt network where this machine will be connected + // Required: true + NetworkName *string `json:"networkName"` + + // NetworkType specifies the type of network + // Required: true + // Enum: [default bridge] + NetworkType *string `json:"networkType"` +} + +// Validate validates this v1 libvirt network spec +func (m *V1LibvirtNetworkSpec) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateNetworkName(formats); err != nil { + res = append(res, err) + } + + if err := m.validateNetworkType(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1LibvirtNetworkSpec) validateNetworkName(formats strfmt.Registry) error { + + if err := validate.Required("networkName", "body", m.NetworkName); err != nil { + return err + } + + return nil +} + +var v1LibvirtNetworkSpecTypeNetworkTypePropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["default","bridge"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + v1LibvirtNetworkSpecTypeNetworkTypePropEnum = append(v1LibvirtNetworkSpecTypeNetworkTypePropEnum, v) + } +} + +const ( + + // V1LibvirtNetworkSpecNetworkTypeDefault captures enum value "default" + V1LibvirtNetworkSpecNetworkTypeDefault string = "default" + + // V1LibvirtNetworkSpecNetworkTypeBridge captures enum value "bridge" + V1LibvirtNetworkSpecNetworkTypeBridge string = "bridge" +) + +// prop value enum +func (m *V1LibvirtNetworkSpec) validateNetworkTypeEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, v1LibvirtNetworkSpecTypeNetworkTypePropEnum, true); err != nil { + return err + } + return nil +} + +func (m *V1LibvirtNetworkSpec) validateNetworkType(formats strfmt.Registry) error { + + if err := validate.Required("networkType", "body", m.NetworkType); err != nil { + return err + } + + // value enum + if err := m.validateNetworkTypeEnum("networkType", "body", *m.NetworkType); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1LibvirtNetworkSpec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1LibvirtNetworkSpec) UnmarshalBinary(b []byte) error { + var res V1LibvirtNetworkSpec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_libvirt_nic_spec.go b/api/models/v1_libvirt_nic_spec.go new file mode 100644 index 00000000..476671ed --- /dev/null +++ b/api/models/v1_libvirt_nic_spec.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1LibvirtNicSpec Libvirt network interface +// +// swagger:model v1LibvirtNicSpec +type V1LibvirtNicSpec struct { + + // index + Index int8 `json:"index,omitempty"` + + // mac address + // Required: true + MacAddress *string `json:"macAddress"` + + // private i ps + PrivateIPs []string `json:"privateIPs"` +} + +// Validate validates this v1 libvirt nic spec +func (m *V1LibvirtNicSpec) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMacAddress(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1LibvirtNicSpec) validateMacAddress(formats strfmt.Registry) error { + + if err := validate.Required("macAddress", "body", m.MacAddress); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1LibvirtNicSpec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1LibvirtNicSpec) UnmarshalBinary(b []byte) error { + var res V1LibvirtNicSpec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_libvirt_placement_config.go b/api/models/v1_libvirt_placement_config.go new file mode 100644 index 00000000..2c2d8d91 --- /dev/null +++ b/api/models/v1_libvirt_placement_config.go @@ -0,0 +1,196 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1LibvirtPlacementConfig v1 libvirt placement config +// +// swagger:model v1LibvirtPlacementConfig +type V1LibvirtPlacementConfig struct { + + // DataStoragePool is the storage pool from which additional disks are assigned + DataStoragePool string `json:"dataStoragePool,omitempty"` + + // GPU Devices is the list of LibvirtHost GPU devices, to be used for this placement + GpuDevices []*V1GPUDeviceSpec `json:"gpuDevices"` + + // HostAddress is a FQDN or IP address of the LibvirtHost + // Required: true + HostAddress *string `json:"hostAddress"` + + // HostIdentity is the identity to access the LibvirtHost + HostIdentity *V1LibvirtHostIdentity `json:"hostIdentity,omitempty"` + + // HostUid is the ID of the LibvirtHost + // Required: true + HostUID *string `json:"hostUid"` + + // Networks defines the network specifications of the vms in the machine pool + // Required: true + Networks []*V1LibvirtNetworkSpec `json:"networks"` + + // SourceStoragePool is the storage pool for the vm image + // Required: true + SourceStoragePool *string `json:"sourceStoragePool"` + + // TargetStoragePool is the optional storage pool from which additional disks are assigned. If not specified, the sourceStoragePool is also used as the targetStoragePool + TargetStoragePool string `json:"targetStoragePool,omitempty"` +} + +// Validate validates this v1 libvirt placement config +func (m *V1LibvirtPlacementConfig) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateGpuDevices(formats); err != nil { + res = append(res, err) + } + + if err := m.validateHostAddress(formats); err != nil { + res = append(res, err) + } + + if err := m.validateHostIdentity(formats); err != nil { + res = append(res, err) + } + + if err := m.validateHostUID(formats); err != nil { + res = append(res, err) + } + + if err := m.validateNetworks(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSourceStoragePool(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1LibvirtPlacementConfig) validateGpuDevices(formats strfmt.Registry) error { + + if swag.IsZero(m.GpuDevices) { // not required + return nil + } + + for i := 0; i < len(m.GpuDevices); i++ { + if swag.IsZero(m.GpuDevices[i]) { // not required + continue + } + + if m.GpuDevices[i] != nil { + if err := m.GpuDevices[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("gpuDevices" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1LibvirtPlacementConfig) validateHostAddress(formats strfmt.Registry) error { + + if err := validate.Required("hostAddress", "body", m.HostAddress); err != nil { + return err + } + + return nil +} + +func (m *V1LibvirtPlacementConfig) validateHostIdentity(formats strfmt.Registry) error { + + if swag.IsZero(m.HostIdentity) { // not required + return nil + } + + if m.HostIdentity != nil { + if err := m.HostIdentity.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("hostIdentity") + } + return err + } + } + + return nil +} + +func (m *V1LibvirtPlacementConfig) validateHostUID(formats strfmt.Registry) error { + + if err := validate.Required("hostUid", "body", m.HostUID); err != nil { + return err + } + + return nil +} + +func (m *V1LibvirtPlacementConfig) validateNetworks(formats strfmt.Registry) error { + + if err := validate.Required("networks", "body", m.Networks); err != nil { + return err + } + + for i := 0; i < len(m.Networks); i++ { + if swag.IsZero(m.Networks[i]) { // not required + continue + } + + if m.Networks[i] != nil { + if err := m.Networks[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("networks" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1LibvirtPlacementConfig) validateSourceStoragePool(formats strfmt.Registry) error { + + if err := validate.Required("sourceStoragePool", "body", m.SourceStoragePool); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1LibvirtPlacementConfig) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1LibvirtPlacementConfig) UnmarshalBinary(b []byte) error { + var res V1LibvirtPlacementConfig + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_libvirt_placement_entity.go b/api/models/v1_libvirt_placement_entity.go new file mode 100644 index 00000000..7978f076 --- /dev/null +++ b/api/models/v1_libvirt_placement_entity.go @@ -0,0 +1,139 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1LibvirtPlacementEntity Libvirt placement config +// +// swagger:model v1LibvirtPlacementEntity +type V1LibvirtPlacementEntity struct { + + // data storage pool + DataStoragePool string `json:"dataStoragePool,omitempty"` + + // GPUDevices defines an array of gpu device for a specific edge host. This will be overridden by edge host GPU devices if configured during registration. + GpuDevices []*V1GPUDeviceSpec `json:"gpuDevices"` + + // host Uid + // Required: true + HostUID *string `json:"hostUid"` + + // networks + Networks []*V1LibvirtNetworkSpec `json:"networks"` + + // source storage pool + SourceStoragePool string `json:"sourceStoragePool,omitempty"` + + // target storage pool + TargetStoragePool string `json:"targetStoragePool,omitempty"` +} + +// Validate validates this v1 libvirt placement entity +func (m *V1LibvirtPlacementEntity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateGpuDevices(formats); err != nil { + res = append(res, err) + } + + if err := m.validateHostUID(formats); err != nil { + res = append(res, err) + } + + if err := m.validateNetworks(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1LibvirtPlacementEntity) validateGpuDevices(formats strfmt.Registry) error { + + if swag.IsZero(m.GpuDevices) { // not required + return nil + } + + for i := 0; i < len(m.GpuDevices); i++ { + if swag.IsZero(m.GpuDevices[i]) { // not required + continue + } + + if m.GpuDevices[i] != nil { + if err := m.GpuDevices[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("gpuDevices" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1LibvirtPlacementEntity) validateHostUID(formats strfmt.Registry) error { + + if err := validate.Required("hostUid", "body", m.HostUID); err != nil { + return err + } + + return nil +} + +func (m *V1LibvirtPlacementEntity) validateNetworks(formats strfmt.Registry) error { + + if swag.IsZero(m.Networks) { // not required + return nil + } + + for i := 0; i < len(m.Networks); i++ { + if swag.IsZero(m.Networks[i]) { // not required + continue + } + + if m.Networks[i] != nil { + if err := m.Networks[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("networks" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1LibvirtPlacementEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1LibvirtPlacementEntity) UnmarshalBinary(b []byte) error { + var res V1LibvirtPlacementEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_lifecycle_config.go b/api/models/v1_lifecycle_config.go new file mode 100644 index 00000000..5e42cacf --- /dev/null +++ b/api/models/v1_lifecycle_config.go @@ -0,0 +1,43 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1LifecycleConfig v1 lifecycle config +// +// swagger:model v1LifecycleConfig +type V1LifecycleConfig struct { + + // enable pause life cycle config + Pause *bool `json:"pause"` +} + +// Validate validates this v1 lifecycle config +func (m *V1LifecycleConfig) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1LifecycleConfig) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1LifecycleConfig) UnmarshalBinary(b []byte) error { + var res V1LifecycleConfig + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_lifecycle_config_entity.go b/api/models/v1_lifecycle_config_entity.go new file mode 100644 index 00000000..d0eb340f --- /dev/null +++ b/api/models/v1_lifecycle_config_entity.go @@ -0,0 +1,71 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1LifecycleConfigEntity v1 lifecycle config entity +// +// swagger:model v1LifecycleConfigEntity +type V1LifecycleConfigEntity struct { + + // lifecycle config + LifecycleConfig *V1LifecycleConfig `json:"lifecycleConfig,omitempty"` +} + +// Validate validates this v1 lifecycle config entity +func (m *V1LifecycleConfigEntity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateLifecycleConfig(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1LifecycleConfigEntity) validateLifecycleConfig(formats strfmt.Registry) error { + + if swag.IsZero(m.LifecycleConfig) { // not required + return nil + } + + if m.LifecycleConfig != nil { + if err := m.LifecycleConfig.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("lifecycleConfig") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1LifecycleConfigEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1LifecycleConfigEntity) UnmarshalBinary(b []byte) error { + var res V1LifecycleConfigEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_lifecycle_status.go b/api/models/v1_lifecycle_status.go new file mode 100644 index 00000000..78235e7c --- /dev/null +++ b/api/models/v1_lifecycle_status.go @@ -0,0 +1,112 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "encoding/json" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1LifecycleStatus v1 lifecycle status +// +// swagger:model v1LifecycleStatus +type V1LifecycleStatus struct { + + // error or success msg of lifecycle + Msg string `json:"msg,omitempty"` + + // lifecycle status + // Enum: [Pausing Paused Resuming Running Error] + Status string `json:"status,omitempty"` +} + +// Validate validates this v1 lifecycle status +func (m *V1LifecycleStatus) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateStatus(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +var v1LifecycleStatusTypeStatusPropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["Pausing","Paused","Resuming","Running","Error"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + v1LifecycleStatusTypeStatusPropEnum = append(v1LifecycleStatusTypeStatusPropEnum, v) + } +} + +const ( + + // V1LifecycleStatusStatusPausing captures enum value "Pausing" + V1LifecycleStatusStatusPausing string = "Pausing" + + // V1LifecycleStatusStatusPaused captures enum value "Paused" + V1LifecycleStatusStatusPaused string = "Paused" + + // V1LifecycleStatusStatusResuming captures enum value "Resuming" + V1LifecycleStatusStatusResuming string = "Resuming" + + // V1LifecycleStatusStatusRunning captures enum value "Running" + V1LifecycleStatusStatusRunning string = "Running" + + // V1LifecycleStatusStatusError captures enum value "Error" + V1LifecycleStatusStatusError string = "Error" +) + +// prop value enum +func (m *V1LifecycleStatus) validateStatusEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, v1LifecycleStatusTypeStatusPropEnum, true); err != nil { + return err + } + return nil +} + +func (m *V1LifecycleStatus) validateStatus(formats strfmt.Registry) error { + + if swag.IsZero(m.Status) { // not required + return nil + } + + // value enum + if err := m.validateStatusEnum("status", "body", m.Status); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1LifecycleStatus) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1LifecycleStatus) UnmarshalBinary(b []byte) error { + var res V1LifecycleStatus + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_list_meta_data.go b/api/models/v1_list_meta_data.go new file mode 100644 index 00000000..be977a73 --- /dev/null +++ b/api/models/v1_list_meta_data.go @@ -0,0 +1,52 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ListMetaData ListMeta describes metadata for the resource listing +// +// swagger:model v1ListMetaData +type V1ListMetaData struct { + + // Next token for the pagination. Next token is equal to empty string indicates end of result set. + Continue string `json:"continue"` + + // Total count of the resources which might change during pagination based on the resources addition or deletion + Count int64 `json:"count"` + + // Number of records feteched + Limit int64 `json:"limit"` + + // The next offset for the pagination. Starting index for which next request will be placed. + Offset int64 `json:"offset"` +} + +// Validate validates this v1 list meta data +func (m *V1ListMetaData) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1ListMetaData) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ListMetaData) UnmarshalBinary(b []byte) error { + var res V1ListMetaData + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_load_balancer_config.go b/api/models/v1_load_balancer_config.go new file mode 100644 index 00000000..ff815ee9 --- /dev/null +++ b/api/models/v1_load_balancer_config.go @@ -0,0 +1,49 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1LoadBalancerConfig Load balancer configuration for exposing the virtual cluster's kube-apiserver +// +// swagger:model v1LoadBalancerConfig +type V1LoadBalancerConfig struct { + + // external i ps + ExternalIPs []string `json:"externalIPs"` + + // external traffic policy + ExternalTrafficPolicy string `json:"externalTrafficPolicy,omitempty"` + + // load balancer source ranges + LoadBalancerSourceRanges []string `json:"loadBalancerSourceRanges"` +} + +// Validate validates this v1 load balancer config +func (m *V1LoadBalancerConfig) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1LoadBalancerConfig) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1LoadBalancerConfig) UnmarshalBinary(b []byte) error { + var res V1LoadBalancerConfig + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_load_balancer_service.go b/api/models/v1_load_balancer_service.go new file mode 100644 index 00000000..b9588ce0 --- /dev/null +++ b/api/models/v1_load_balancer_service.go @@ -0,0 +1,86 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1LoadBalancerService v1 load balancer service +// +// swagger:model v1LoadBalancerService +type V1LoadBalancerService struct { + + // IP or Host from svc.Status.LoadBalancerStatus.Ingress + Host string `json:"host,omitempty"` + + // name of the loadbalancer service + Name string `json:"name,omitempty"` + + // port this service exposed + Ports []*V1ServicePort `json:"ports"` +} + +// Validate validates this v1 load balancer service +func (m *V1LoadBalancerService) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validatePorts(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1LoadBalancerService) validatePorts(formats strfmt.Registry) error { + + if swag.IsZero(m.Ports) { // not required + return nil + } + + for i := 0; i < len(m.Ports); i++ { + if swag.IsZero(m.Ports[i]) { // not required + continue + } + + if m.Ports[i] != nil { + if err := m.Ports[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("ports" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1LoadBalancerService) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1LoadBalancerService) UnmarshalBinary(b []byte) error { + var res V1LoadBalancerService + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_load_balancer_spec.go b/api/models/v1_load_balancer_spec.go new file mode 100644 index 00000000..8c51d16f --- /dev/null +++ b/api/models/v1_load_balancer_spec.go @@ -0,0 +1,157 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "encoding/json" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1LoadBalancerSpec LoadBalancerSpec defines an Azure load balancer. +// +// swagger:model v1LoadBalancerSpec +type V1LoadBalancerSpec struct { + + // api server l b static IP + APIServerLBStaticIP string `json:"apiServerLBStaticIP,omitempty"` + + // ip allocation method + // Enum: [Static Dynamic] + IPAllocationMethod *string `json:"ipAllocationMethod,omitempty"` + + // private DNS name + PrivateDNSName string `json:"privateDNSName,omitempty"` + + // Load Balancer type + // Enum: [Internal Public] + Type *string `json:"type,omitempty"` +} + +// Validate validates this v1 load balancer spec +func (m *V1LoadBalancerSpec) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateIPAllocationMethod(formats); err != nil { + res = append(res, err) + } + + if err := m.validateType(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +var v1LoadBalancerSpecTypeIPAllocationMethodPropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["Static","Dynamic"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + v1LoadBalancerSpecTypeIPAllocationMethodPropEnum = append(v1LoadBalancerSpecTypeIPAllocationMethodPropEnum, v) + } +} + +const ( + + // V1LoadBalancerSpecIPAllocationMethodStatic captures enum value "Static" + V1LoadBalancerSpecIPAllocationMethodStatic string = "Static" + + // V1LoadBalancerSpecIPAllocationMethodDynamic captures enum value "Dynamic" + V1LoadBalancerSpecIPAllocationMethodDynamic string = "Dynamic" +) + +// prop value enum +func (m *V1LoadBalancerSpec) validateIPAllocationMethodEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, v1LoadBalancerSpecTypeIPAllocationMethodPropEnum, true); err != nil { + return err + } + return nil +} + +func (m *V1LoadBalancerSpec) validateIPAllocationMethod(formats strfmt.Registry) error { + + if swag.IsZero(m.IPAllocationMethod) { // not required + return nil + } + + // value enum + if err := m.validateIPAllocationMethodEnum("ipAllocationMethod", "body", *m.IPAllocationMethod); err != nil { + return err + } + + return nil +} + +var v1LoadBalancerSpecTypeTypePropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["Internal","Public"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + v1LoadBalancerSpecTypeTypePropEnum = append(v1LoadBalancerSpecTypeTypePropEnum, v) + } +} + +const ( + + // V1LoadBalancerSpecTypeInternal captures enum value "Internal" + V1LoadBalancerSpecTypeInternal string = "Internal" + + // V1LoadBalancerSpecTypePublic captures enum value "Public" + V1LoadBalancerSpecTypePublic string = "Public" +) + +// prop value enum +func (m *V1LoadBalancerSpec) validateTypeEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, v1LoadBalancerSpecTypeTypePropEnum, true); err != nil { + return err + } + return nil +} + +func (m *V1LoadBalancerSpec) validateType(formats strfmt.Registry) error { + + if swag.IsZero(m.Type) { // not required + return nil + } + + // value enum + if err := m.validateTypeEnum("type", "body", *m.Type); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1LoadBalancerSpec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1LoadBalancerSpec) UnmarshalBinary(b []byte) error { + var res V1LoadBalancerSpec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_location_type.go b/api/models/v1_location_type.go new file mode 100644 index 00000000..87fe03de --- /dev/null +++ b/api/models/v1_location_type.go @@ -0,0 +1,66 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "encoding/json" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" +) + +// V1LocationType Location type +// +// swagger:model v1LocationType +type V1LocationType string + +const ( + + // V1LocationTypeS3 captures enum value "s3" + V1LocationTypeS3 V1LocationType = "s3" + + // V1LocationTypeGcp captures enum value "gcp" + V1LocationTypeGcp V1LocationType = "gcp" + + // V1LocationTypeMinio captures enum value "minio" + V1LocationTypeMinio V1LocationType = "minio" +) + +// for schema +var v1LocationTypeEnum []interface{} + +func init() { + var res []V1LocationType + if err := json.Unmarshal([]byte(`["s3","gcp","minio"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + v1LocationTypeEnum = append(v1LocationTypeEnum, v) + } +} + +func (m V1LocationType) validateV1LocationTypeEnum(path, location string, value V1LocationType) error { + if err := validate.EnumCase(path, location, value, v1LocationTypeEnum, true); err != nil { + return err + } + return nil +} + +// Validate validates this v1 location type +func (m V1LocationType) Validate(formats strfmt.Registry) error { + var res []error + + // value enum + if err := m.validateV1LocationTypeEnum("", "body", m); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/models/v1_login_banner_settings.go b/api/models/v1_login_banner_settings.go new file mode 100644 index 00000000..0662c139 --- /dev/null +++ b/api/models/v1_login_banner_settings.go @@ -0,0 +1,49 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1LoginBannerSettings v1 login banner settings +// +// swagger:model v1LoginBannerSettings +type V1LoginBannerSettings struct { + + // Login banner message displayed to the user + Message string `json:"Message"` + + // Set to 'true' if login banner has to be displayed for user + IsEnabled bool `json:"isEnabled"` + + // Banner title displayed to the user + Title string `json:"title"` +} + +// Validate validates this v1 login banner settings +func (m *V1LoginBannerSettings) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1LoginBannerSettings) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1LoginBannerSettings) UnmarshalBinary(b []byte) error { + var res V1LoginBannerSettings + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_login_response.go b/api/models/v1_login_response.go new file mode 100644 index 00000000..c3ba97cf --- /dev/null +++ b/api/models/v1_login_response.go @@ -0,0 +1,141 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "encoding/json" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1LoginResponse Returns the allowed login method and information with the organization details +// +// swagger:model v1LoginResponse +type V1LoginResponse struct { + + // Describes the env type. Possible values [ saas, self-hosted, quick-start, enterprise, airgap] + AppEnv string `json:"appEnv,omitempty"` + + // Describes the default mode of authentication. Possible values [password, sso] + // Enum: [password sso] + AuthType string `json:"authType,omitempty"` + + // Organization name. + OrgName string `json:"orgName,omitempty"` + + // Describes the default redirect Url for authentication. If authType is sso, it will have tenant configured saml/oidc idp url else it will be users organization url + RedirectURL string `json:"redirectUrl"` + + // Describes the domain url on which the saas is available + RootDomain string `json:"rootDomain,omitempty"` + + // Describes which security mode is enabled + SecurityMode string `json:"securityMode,omitempty"` + + // Just Inside. Describes the allowed social logins + SsoLogins V1SsoLogins `json:"ssoLogins,omitempty"` + + // Describes the total number of tenant present in the system + TotalTenants int64 `json:"totalTenants,omitempty"` +} + +// Validate validates this v1 login response +func (m *V1LoginResponse) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateAuthType(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSsoLogins(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +var v1LoginResponseTypeAuthTypePropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["password","sso"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + v1LoginResponseTypeAuthTypePropEnum = append(v1LoginResponseTypeAuthTypePropEnum, v) + } +} + +const ( + + // V1LoginResponseAuthTypePassword captures enum value "password" + V1LoginResponseAuthTypePassword string = "password" + + // V1LoginResponseAuthTypeSso captures enum value "sso" + V1LoginResponseAuthTypeSso string = "sso" +) + +// prop value enum +func (m *V1LoginResponse) validateAuthTypeEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, v1LoginResponseTypeAuthTypePropEnum, true); err != nil { + return err + } + return nil +} + +func (m *V1LoginResponse) validateAuthType(formats strfmt.Registry) error { + + if swag.IsZero(m.AuthType) { // not required + return nil + } + + // value enum + if err := m.validateAuthTypeEnum("authType", "body", m.AuthType); err != nil { + return err + } + + return nil +} + +func (m *V1LoginResponse) validateSsoLogins(formats strfmt.Registry) error { + + if swag.IsZero(m.SsoLogins) { // not required + return nil + } + + if err := m.SsoLogins.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("ssoLogins") + } + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1LoginResponse) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1LoginResponse) UnmarshalBinary(b []byte) error { + var res V1LoginResponse + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_maas_account.go b/api/models/v1_maas_account.go new file mode 100644 index 00000000..8200476e --- /dev/null +++ b/api/models/v1_maas_account.go @@ -0,0 +1,127 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1MaasAccount Maas cloud account information +// +// swagger:model v1MaasAccount +type V1MaasAccount struct { + + // api version + APIVersion string `json:"apiVersion,omitempty"` + + // kind + Kind string `json:"kind,omitempty"` + + // metadata + Metadata *V1ObjectMeta `json:"metadata,omitempty"` + + // spec + Spec *V1MaasCloudAccount `json:"spec,omitempty"` + + // status + Status *V1CloudAccountStatus `json:"status,omitempty"` +} + +// Validate validates this v1 maas account +func (m *V1MaasAccount) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSpec(formats); err != nil { + res = append(res, err) + } + + if err := m.validateStatus(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1MaasAccount) validateMetadata(formats strfmt.Registry) error { + + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } + return err + } + } + + return nil +} + +func (m *V1MaasAccount) validateSpec(formats strfmt.Registry) error { + + if swag.IsZero(m.Spec) { // not required + return nil + } + + if m.Spec != nil { + if err := m.Spec.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec") + } + return err + } + } + + return nil +} + +func (m *V1MaasAccount) validateStatus(formats strfmt.Registry) error { + + if swag.IsZero(m.Status) { // not required + return nil + } + + if m.Status != nil { + if err := m.Status.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("status") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1MaasAccount) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1MaasAccount) UnmarshalBinary(b []byte) error { + var res V1MaasAccount + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_maas_accounts.go b/api/models/v1_maas_accounts.go new file mode 100644 index 00000000..d59bb9d9 --- /dev/null +++ b/api/models/v1_maas_accounts.go @@ -0,0 +1,112 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1MaasAccounts v1 maas accounts +// +// swagger:model v1MaasAccounts +type V1MaasAccounts struct { + + // items + // Required: true + // Unique: true + Items []*V1MaasAccount `json:"items"` + + // listmeta + Listmeta *V1ListMetaData `json:"listmeta,omitempty"` +} + +// Validate validates this v1 maas accounts +func (m *V1MaasAccounts) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateItems(formats); err != nil { + res = append(res, err) + } + + if err := m.validateListmeta(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1MaasAccounts) validateItems(formats strfmt.Registry) error { + + if err := validate.Required("items", "body", m.Items); err != nil { + return err + } + + if err := validate.UniqueItems("items", "body", m.Items); err != nil { + return err + } + + for i := 0; i < len(m.Items); i++ { + if swag.IsZero(m.Items[i]) { // not required + continue + } + + if m.Items[i] != nil { + if err := m.Items[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("items" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1MaasAccounts) validateListmeta(formats strfmt.Registry) error { + + if swag.IsZero(m.Listmeta) { // not required + return nil + } + + if m.Listmeta != nil { + if err := m.Listmeta.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("listmeta") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1MaasAccounts) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1MaasAccounts) UnmarshalBinary(b []byte) error { + var res V1MaasAccounts + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_maas_cloud_account.go b/api/models/v1_maas_cloud_account.go new file mode 100644 index 00000000..d8e417c5 --- /dev/null +++ b/api/models/v1_maas_cloud_account.go @@ -0,0 +1,84 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1MaasCloudAccount v1 maas cloud account +// +// swagger:model v1MaasCloudAccount +type V1MaasCloudAccount struct { + + // api endpoint + // Required: true + APIEndpoint *string `json:"apiEndpoint"` + + // api key + // Required: true + APIKey *string `json:"apiKey"` + + // list of preferred subnets order in the list reflects order in which subnets will be selected for ip address selection in apiserver dns endpoint this way user can specify external or preferable subnet "10.11.130.0/24,10.10.10.0/24" + PreferredSubnets []string `json:"preferredSubnets"` +} + +// Validate validates this v1 maas cloud account +func (m *V1MaasCloudAccount) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateAPIEndpoint(formats); err != nil { + res = append(res, err) + } + + if err := m.validateAPIKey(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1MaasCloudAccount) validateAPIEndpoint(formats strfmt.Registry) error { + + if err := validate.Required("apiEndpoint", "body", m.APIEndpoint); err != nil { + return err + } + + return nil +} + +func (m *V1MaasCloudAccount) validateAPIKey(formats strfmt.Registry) error { + + if err := validate.Required("apiKey", "body", m.APIKey); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1MaasCloudAccount) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1MaasCloudAccount) UnmarshalBinary(b []byte) error { + var res V1MaasCloudAccount + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_maas_cloud_cluster_config_entity.go b/api/models/v1_maas_cloud_cluster_config_entity.go new file mode 100644 index 00000000..bbbe11d0 --- /dev/null +++ b/api/models/v1_maas_cloud_cluster_config_entity.go @@ -0,0 +1,71 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1MaasCloudClusterConfigEntity Maas cloud cluster config entity +// +// swagger:model v1MaasCloudClusterConfigEntity +type V1MaasCloudClusterConfigEntity struct { + + // cluster config + ClusterConfig *V1MaasClusterConfig `json:"clusterConfig,omitempty"` +} + +// Validate validates this v1 maas cloud cluster config entity +func (m *V1MaasCloudClusterConfigEntity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateClusterConfig(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1MaasCloudClusterConfigEntity) validateClusterConfig(formats strfmt.Registry) error { + + if swag.IsZero(m.ClusterConfig) { // not required + return nil + } + + if m.ClusterConfig != nil { + if err := m.ClusterConfig.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("clusterConfig") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1MaasCloudClusterConfigEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1MaasCloudClusterConfigEntity) UnmarshalBinary(b []byte) error { + var res V1MaasCloudClusterConfigEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_maas_cloud_config.go b/api/models/v1_maas_cloud_config.go new file mode 100644 index 00000000..dcd532a9 --- /dev/null +++ b/api/models/v1_maas_cloud_config.go @@ -0,0 +1,127 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1MaasCloudConfig MaasCloudConfig is the Schema for the maascloudconfigs API +// +// swagger:model v1MaasCloudConfig +type V1MaasCloudConfig struct { + + // APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + APIVersion string `json:"apiVersion,omitempty"` + + // Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + Kind string `json:"kind,omitempty"` + + // metadata + Metadata *V1ObjectMeta `json:"metadata,omitempty"` + + // spec + Spec *V1MaasCloudConfigSpec `json:"spec,omitempty"` + + // status + Status *V1MaasCloudConfigStatus `json:"status,omitempty"` +} + +// Validate validates this v1 maas cloud config +func (m *V1MaasCloudConfig) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSpec(formats); err != nil { + res = append(res, err) + } + + if err := m.validateStatus(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1MaasCloudConfig) validateMetadata(formats strfmt.Registry) error { + + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } + return err + } + } + + return nil +} + +func (m *V1MaasCloudConfig) validateSpec(formats strfmt.Registry) error { + + if swag.IsZero(m.Spec) { // not required + return nil + } + + if m.Spec != nil { + if err := m.Spec.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec") + } + return err + } + } + + return nil +} + +func (m *V1MaasCloudConfig) validateStatus(formats strfmt.Registry) error { + + if swag.IsZero(m.Status) { // not required + return nil + } + + if m.Status != nil { + if err := m.Status.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("status") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1MaasCloudConfig) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1MaasCloudConfig) UnmarshalBinary(b []byte) error { + var res V1MaasCloudConfig + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_maas_cloud_config_spec.go b/api/models/v1_maas_cloud_config_spec.go new file mode 100644 index 00000000..01fe5b39 --- /dev/null +++ b/api/models/v1_maas_cloud_config_spec.go @@ -0,0 +1,130 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1MaasCloudConfigSpec MaasCloudConfigSpec defines the cloud configuration input by user This will translate to clusterspec/machinespec for cluster-api +// +// swagger:model v1MaasCloudConfigSpec +type V1MaasCloudConfigSpec struct { + + // cloudAccountRef should point to the secret which contains MaasCloudAccount + CloudAccountRef *V1ObjectReference `json:"cloudAccountRef,omitempty"` + + // cluster config + ClusterConfig *V1MaasClusterConfig `json:"clusterConfig,omitempty"` + + // machine pool config + MachinePoolConfig []*V1MaasMachinePoolConfig `json:"machinePoolConfig"` +} + +// Validate validates this v1 maas cloud config spec +func (m *V1MaasCloudConfigSpec) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateCloudAccountRef(formats); err != nil { + res = append(res, err) + } + + if err := m.validateClusterConfig(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMachinePoolConfig(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1MaasCloudConfigSpec) validateCloudAccountRef(formats strfmt.Registry) error { + + if swag.IsZero(m.CloudAccountRef) { // not required + return nil + } + + if m.CloudAccountRef != nil { + if err := m.CloudAccountRef.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("cloudAccountRef") + } + return err + } + } + + return nil +} + +func (m *V1MaasCloudConfigSpec) validateClusterConfig(formats strfmt.Registry) error { + + if swag.IsZero(m.ClusterConfig) { // not required + return nil + } + + if m.ClusterConfig != nil { + if err := m.ClusterConfig.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("clusterConfig") + } + return err + } + } + + return nil +} + +func (m *V1MaasCloudConfigSpec) validateMachinePoolConfig(formats strfmt.Registry) error { + + if swag.IsZero(m.MachinePoolConfig) { // not required + return nil + } + + for i := 0; i < len(m.MachinePoolConfig); i++ { + if swag.IsZero(m.MachinePoolConfig[i]) { // not required + continue + } + + if m.MachinePoolConfig[i] != nil { + if err := m.MachinePoolConfig[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("machinePoolConfig" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1MaasCloudConfigSpec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1MaasCloudConfigSpec) UnmarshalBinary(b []byte) error { + var res V1MaasCloudConfigSpec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_maas_cloud_config_status.go b/api/models/v1_maas_cloud_config_status.go new file mode 100644 index 00000000..8951903e --- /dev/null +++ b/api/models/v1_maas_cloud_config_status.go @@ -0,0 +1,120 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1MaasCloudConfigStatus MaasCloudConfigStatus defines the observed state of MaasCloudConfig The cloudimage info built by Mold is stored here image should be mapped to a specific machinepool +// +// swagger:model v1MaasCloudConfigStatus +type V1MaasCloudConfigStatus struct { + + // For mold controller to identify if is there any changes in Pack + AnsibleRoleDigest string `json:"ansibleRoleDigest,omitempty"` + + // conditions + Conditions []*V1ClusterCondition `json:"conditions"` + + // addon layers present in spc + IsAddonLayer bool `json:"isAddonLayer,omitempty"` + + // node image + NodeImage *V1MaasImage `json:"nodeImage,omitempty"` + + // this map will be for ansible roles present in eack pack + RoleDigest map[string]string `json:"roleDigest,omitempty"` + + // sourceImageId, it can be from packref's annotations or from pack.json + SourceImageID string `json:"sourceImageId,omitempty"` + + // PackerVariableDigest string `json:"packerDigest,omitempty"` If no ansible roles found in Packs then Mold should tell Drive to use capi image and not create custom image, because there is nothing to add + UseCapiImage bool `json:"useCapiImage,omitempty"` +} + +// Validate validates this v1 maas cloud config status +func (m *V1MaasCloudConfigStatus) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateConditions(formats); err != nil { + res = append(res, err) + } + + if err := m.validateNodeImage(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1MaasCloudConfigStatus) validateConditions(formats strfmt.Registry) error { + + if swag.IsZero(m.Conditions) { // not required + return nil + } + + for i := 0; i < len(m.Conditions); i++ { + if swag.IsZero(m.Conditions[i]) { // not required + continue + } + + if m.Conditions[i] != nil { + if err := m.Conditions[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("conditions" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1MaasCloudConfigStatus) validateNodeImage(formats strfmt.Registry) error { + + if swag.IsZero(m.NodeImage) { // not required + return nil + } + + if m.NodeImage != nil { + if err := m.NodeImage.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("nodeImage") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1MaasCloudConfigStatus) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1MaasCloudConfigStatus) UnmarshalBinary(b []byte) error { + var res V1MaasCloudConfigStatus + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_maas_cluster_config.go b/api/models/v1_maas_cluster_config.go new file mode 100644 index 00000000..c1796ee7 --- /dev/null +++ b/api/models/v1_maas_cluster_config.go @@ -0,0 +1,67 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1MaasClusterConfig Cluster level configuration for MAAS cloud and applicable for all the machine pools +// +// swagger:model v1MaasClusterConfig +type V1MaasClusterConfig struct { + + // Domain name of the cluster to be provisioned + // Required: true + Domain *string `json:"domain"` + + // SSH keys specifies a list of ssh authorized keys for the 'spectro' user + SSHKeys []string `json:"sshKeys"` +} + +// Validate validates this v1 maas cluster config +func (m *V1MaasClusterConfig) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateDomain(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1MaasClusterConfig) validateDomain(formats strfmt.Registry) error { + + if err := validate.Required("domain", "body", m.Domain); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1MaasClusterConfig) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1MaasClusterConfig) UnmarshalBinary(b []byte) error { + var res V1MaasClusterConfig + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_maas_domain.go b/api/models/v1_maas_domain.go new file mode 100644 index 00000000..e2ed42e4 --- /dev/null +++ b/api/models/v1_maas_domain.go @@ -0,0 +1,43 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1MaasDomain Maas domain +// +// swagger:model v1MaasDomain +type V1MaasDomain struct { + + // Name of Maas domain + Name string `json:"name,omitempty"` +} + +// Validate validates this v1 maas domain +func (m *V1MaasDomain) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1MaasDomain) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1MaasDomain) UnmarshalBinary(b []byte) error { + var res V1MaasDomain + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_maas_domains.go b/api/models/v1_maas_domains.go new file mode 100644 index 00000000..ac3c5998 --- /dev/null +++ b/api/models/v1_maas_domains.go @@ -0,0 +1,87 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1MaasDomains List of Maas domains +// +// swagger:model v1MaasDomains +type V1MaasDomains struct { + + // items + // Required: true + // Unique: true + Items []*V1MaasDomain `json:"items"` +} + +// Validate validates this v1 maas domains +func (m *V1MaasDomains) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateItems(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1MaasDomains) validateItems(formats strfmt.Registry) error { + + if err := validate.Required("items", "body", m.Items); err != nil { + return err + } + + if err := validate.UniqueItems("items", "body", m.Items); err != nil { + return err + } + + for i := 0; i < len(m.Items); i++ { + if swag.IsZero(m.Items[i]) { // not required + continue + } + + if m.Items[i] != nil { + if err := m.Items[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("items" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1MaasDomains) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1MaasDomains) UnmarshalBinary(b []byte) error { + var res V1MaasDomains + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_maas_image.go b/api/models/v1_maas_image.go new file mode 100644 index 00000000..c9219668 --- /dev/null +++ b/api/models/v1_maas_image.go @@ -0,0 +1,46 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1MaasImage Name of the image +// +// swagger:model v1MaasImage +type V1MaasImage struct { + + // full path of the image template location it contains datacenter/folder/templatename etc eg: /mydc/vm/template/spectro/workerpool-1-centos + Name string `json:"name,omitempty"` + + // state + State string `json:"state,omitempty"` +} + +// Validate validates this v1 maas image +func (m *V1MaasImage) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1MaasImage) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1MaasImage) UnmarshalBinary(b []byte) error { + var res V1MaasImage + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_maas_instance_type.go b/api/models/v1_maas_instance_type.go new file mode 100644 index 00000000..f4143650 --- /dev/null +++ b/api/models/v1_maas_instance_type.go @@ -0,0 +1,46 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1MaasInstanceType v1 maas instance type +// +// swagger:model v1MaasInstanceType +type V1MaasInstanceType struct { + + // Minimum CPU cores + MinCPU int32 `json:"minCPU,omitempty"` + + // Minimum memory in MiB + MinMemInMB int32 `json:"minMemInMB,omitempty"` +} + +// Validate validates this v1 maas instance type +func (m *V1MaasInstanceType) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1MaasInstanceType) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1MaasInstanceType) UnmarshalBinary(b []byte) error { + var res V1MaasInstanceType + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_maas_machine.go b/api/models/v1_maas_machine.go new file mode 100644 index 00000000..24412a03 --- /dev/null +++ b/api/models/v1_maas_machine.go @@ -0,0 +1,127 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1MaasMachine Maas cloud VM definition +// +// swagger:model v1MaasMachine +type V1MaasMachine struct { + + // api version + APIVersion string `json:"apiVersion,omitempty"` + + // kind + Kind string `json:"kind,omitempty"` + + // metadata + Metadata *V1ObjectMeta `json:"metadata,omitempty"` + + // spec + Spec *V1MaasMachineSpec `json:"spec,omitempty"` + + // status + Status *V1CloudMachineStatus `json:"status,omitempty"` +} + +// Validate validates this v1 maas machine +func (m *V1MaasMachine) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSpec(formats); err != nil { + res = append(res, err) + } + + if err := m.validateStatus(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1MaasMachine) validateMetadata(formats strfmt.Registry) error { + + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } + return err + } + } + + return nil +} + +func (m *V1MaasMachine) validateSpec(formats strfmt.Registry) error { + + if swag.IsZero(m.Spec) { // not required + return nil + } + + if m.Spec != nil { + if err := m.Spec.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec") + } + return err + } + } + + return nil +} + +func (m *V1MaasMachine) validateStatus(formats strfmt.Registry) error { + + if swag.IsZero(m.Status) { // not required + return nil + } + + if m.Status != nil { + if err := m.Status.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("status") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1MaasMachine) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1MaasMachine) UnmarshalBinary(b []byte) error { + var res V1MaasMachine + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_maas_machine_config_entity.go b/api/models/v1_maas_machine_config_entity.go new file mode 100644 index 00000000..ff81081d --- /dev/null +++ b/api/models/v1_maas_machine_config_entity.go @@ -0,0 +1,77 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1MaasMachineConfigEntity v1 maas machine config entity +// +// swagger:model v1MaasMachineConfigEntity +type V1MaasMachineConfigEntity struct { + + // for control plane pool, this will be the failure domains for kcp + Azs []string `json:"azs"` + + // instance type + InstanceType *V1MaasInstanceType `json:"instanceType,omitempty"` + + // resource pool + ResourcePool string `json:"resourcePool,omitempty"` +} + +// Validate validates this v1 maas machine config entity +func (m *V1MaasMachineConfigEntity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateInstanceType(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1MaasMachineConfigEntity) validateInstanceType(formats strfmt.Registry) error { + + if swag.IsZero(m.InstanceType) { // not required + return nil + } + + if m.InstanceType != nil { + if err := m.InstanceType.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("instanceType") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1MaasMachineConfigEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1MaasMachineConfigEntity) UnmarshalBinary(b []byte) error { + var res V1MaasMachineConfigEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_maas_machine_pool_cloud_config_entity.go b/api/models/v1_maas_machine_pool_cloud_config_entity.go new file mode 100644 index 00000000..2c5fe72c --- /dev/null +++ b/api/models/v1_maas_machine_pool_cloud_config_entity.go @@ -0,0 +1,96 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1MaasMachinePoolCloudConfigEntity v1 maas machine pool cloud config entity +// +// swagger:model v1MaasMachinePoolCloudConfigEntity +type V1MaasMachinePoolCloudConfigEntity struct { + + // azs + Azs []string `json:"azs"` + + // instance type + // Required: true + InstanceType *V1MaasInstanceType `json:"instanceType"` + + // the resource pool + // Required: true + ResourcePool *string `json:"resourcePool"` + + // Tags in maas environment + Tags []string `json:"tags"` +} + +// Validate validates this v1 maas machine pool cloud config entity +func (m *V1MaasMachinePoolCloudConfigEntity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateInstanceType(formats); err != nil { + res = append(res, err) + } + + if err := m.validateResourcePool(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1MaasMachinePoolCloudConfigEntity) validateInstanceType(formats strfmt.Registry) error { + + if err := validate.Required("instanceType", "body", m.InstanceType); err != nil { + return err + } + + if m.InstanceType != nil { + if err := m.InstanceType.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("instanceType") + } + return err + } + } + + return nil +} + +func (m *V1MaasMachinePoolCloudConfigEntity) validateResourcePool(formats strfmt.Registry) error { + + if err := validate.Required("resourcePool", "body", m.ResourcePool); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1MaasMachinePoolCloudConfigEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1MaasMachinePoolCloudConfigEntity) UnmarshalBinary(b []byte) error { + var res V1MaasMachinePoolCloudConfigEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_maas_machine_pool_config.go b/api/models/v1_maas_machine_pool_config.go new file mode 100644 index 00000000..be3cbd09 --- /dev/null +++ b/api/models/v1_maas_machine_pool_config.go @@ -0,0 +1,201 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1MaasMachinePoolConfig v1 maas machine pool config +// +// swagger:model v1MaasMachinePoolConfig +type V1MaasMachinePoolConfig struct { + + // additionalLabels + AdditionalLabels map[string]string `json:"additionalLabels,omitempty"` + + // AdditionalTags is an optional set of tags to add to resources managed by the provider, in addition to the ones added by default. For eg., tags for EKS nodeGroup or EKS NodegroupIAMRole + AdditionalTags map[string]string `json:"additionalTags,omitempty"` + + // azs + Azs []string `json:"azs"` + + // InstanceType defines the required CPU, Memory + // Required: true + InstanceType *V1MaasInstanceType `json:"instanceType"` + + // whether this pool is for control plane + IsControlPlane bool `json:"isControlPlane,omitempty"` + + // labels for this pool, example: control-plane/worker, gpu, windows + Labels []string `json:"labels"` + + // machine pool properties + MachinePoolProperties *V1MachinePoolProperties `json:"machinePoolProperties,omitempty"` + + // max size of the pool, for scaling + MaxSize int32 `json:"maxSize,omitempty"` + + // min size of the pool, for scaling + MinSize int32 `json:"minSize,omitempty"` + + // name + Name string `json:"name,omitempty"` + + // Minimum number of seconds a node should be Ready, before the next node is selected for repave. Applicable only for workerpools in infrastructure cluster + NodeRepaveInterval int32 `json:"nodeRepaveInterval,omitempty"` + + // resource pool + ResourcePool string `json:"resourcePool,omitempty"` + + // size of the pool, number of machines + Size int32 `json:"size,omitempty"` + + // Tags in maas environment + Tags []string `json:"tags"` + + // control plane or worker taints + // Unique: true + Taints []*V1Taint `json:"taints"` + + // rolling update strategy for this machinepool if not specified, will use ScaleOut + UpdateStrategy *V1UpdateStrategy `json:"updateStrategy,omitempty"` + + // if IsControlPlane==true && useControlPlaneAsWorker==true, then will remove control plane taint this will not be used for worker pools + UseControlPlaneAsWorker bool `json:"useControlPlaneAsWorker,omitempty"` +} + +// Validate validates this v1 maas machine pool config +func (m *V1MaasMachinePoolConfig) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateInstanceType(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMachinePoolProperties(formats); err != nil { + res = append(res, err) + } + + if err := m.validateTaints(formats); err != nil { + res = append(res, err) + } + + if err := m.validateUpdateStrategy(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1MaasMachinePoolConfig) validateInstanceType(formats strfmt.Registry) error { + + if err := validate.Required("instanceType", "body", m.InstanceType); err != nil { + return err + } + + if m.InstanceType != nil { + if err := m.InstanceType.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("instanceType") + } + return err + } + } + + return nil +} + +func (m *V1MaasMachinePoolConfig) validateMachinePoolProperties(formats strfmt.Registry) error { + + if swag.IsZero(m.MachinePoolProperties) { // not required + return nil + } + + if m.MachinePoolProperties != nil { + if err := m.MachinePoolProperties.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("machinePoolProperties") + } + return err + } + } + + return nil +} + +func (m *V1MaasMachinePoolConfig) validateTaints(formats strfmt.Registry) error { + + if swag.IsZero(m.Taints) { // not required + return nil + } + + if err := validate.UniqueItems("taints", "body", m.Taints); err != nil { + return err + } + + for i := 0; i < len(m.Taints); i++ { + if swag.IsZero(m.Taints[i]) { // not required + continue + } + + if m.Taints[i] != nil { + if err := m.Taints[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("taints" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1MaasMachinePoolConfig) validateUpdateStrategy(formats strfmt.Registry) error { + + if swag.IsZero(m.UpdateStrategy) { // not required + return nil + } + + if m.UpdateStrategy != nil { + if err := m.UpdateStrategy.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("updateStrategy") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1MaasMachinePoolConfig) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1MaasMachinePoolConfig) UnmarshalBinary(b []byte) error { + var res V1MaasMachinePoolConfig + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_maas_machine_pool_config_entity.go b/api/models/v1_maas_machine_pool_config_entity.go new file mode 100644 index 00000000..f86326d0 --- /dev/null +++ b/api/models/v1_maas_machine_pool_config_entity.go @@ -0,0 +1,98 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1MaasMachinePoolConfigEntity v1 maas machine pool config entity +// +// swagger:model v1MaasMachinePoolConfigEntity +type V1MaasMachinePoolConfigEntity struct { + + // cloud config + // Required: true + CloudConfig *V1MaasMachinePoolCloudConfigEntity `json:"cloudConfig"` + + // pool config + PoolConfig *V1MachinePoolConfigEntity `json:"poolConfig,omitempty"` +} + +// Validate validates this v1 maas machine pool config entity +func (m *V1MaasMachinePoolConfigEntity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateCloudConfig(formats); err != nil { + res = append(res, err) + } + + if err := m.validatePoolConfig(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1MaasMachinePoolConfigEntity) validateCloudConfig(formats strfmt.Registry) error { + + if err := validate.Required("cloudConfig", "body", m.CloudConfig); err != nil { + return err + } + + if m.CloudConfig != nil { + if err := m.CloudConfig.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("cloudConfig") + } + return err + } + } + + return nil +} + +func (m *V1MaasMachinePoolConfigEntity) validatePoolConfig(formats strfmt.Registry) error { + + if swag.IsZero(m.PoolConfig) { // not required + return nil + } + + if m.PoolConfig != nil { + if err := m.PoolConfig.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("poolConfig") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1MaasMachinePoolConfigEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1MaasMachinePoolConfigEntity) UnmarshalBinary(b []byte) error { + var res V1MaasMachinePoolConfigEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_maas_machine_spec.go b/api/models/v1_maas_machine_spec.go new file mode 100644 index 00000000..26ee1608 --- /dev/null +++ b/api/models/v1_maas_machine_spec.go @@ -0,0 +1,86 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1MaasMachineSpec Maas cloud VM definition spec +// +// swagger:model v1MaasMachineSpec +type V1MaasMachineSpec struct { + + // az + Az string `json:"az,omitempty"` + + // hostname + Hostname string `json:"hostname,omitempty"` + + // nics + Nics []*V1MaasNic `json:"nics"` +} + +// Validate validates this v1 maas machine spec +func (m *V1MaasMachineSpec) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateNics(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1MaasMachineSpec) validateNics(formats strfmt.Registry) error { + + if swag.IsZero(m.Nics) { // not required + return nil + } + + for i := 0; i < len(m.Nics); i++ { + if swag.IsZero(m.Nics[i]) { // not required + continue + } + + if m.Nics[i] != nil { + if err := m.Nics[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("nics" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1MaasMachineSpec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1MaasMachineSpec) UnmarshalBinary(b []byte) error { + var res V1MaasMachineSpec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_maas_machines.go b/api/models/v1_maas_machines.go new file mode 100644 index 00000000..c3a91b78 --- /dev/null +++ b/api/models/v1_maas_machines.go @@ -0,0 +1,112 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1MaasMachines List of MAAS machines +// +// swagger:model v1MaasMachines +type V1MaasMachines struct { + + // items + // Required: true + // Unique: true + Items []*V1MaasMachine `json:"items"` + + // listmeta + Listmeta *V1ListMetaData `json:"listmeta,omitempty"` +} + +// Validate validates this v1 maas machines +func (m *V1MaasMachines) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateItems(formats); err != nil { + res = append(res, err) + } + + if err := m.validateListmeta(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1MaasMachines) validateItems(formats strfmt.Registry) error { + + if err := validate.Required("items", "body", m.Items); err != nil { + return err + } + + if err := validate.UniqueItems("items", "body", m.Items); err != nil { + return err + } + + for i := 0; i < len(m.Items); i++ { + if swag.IsZero(m.Items[i]) { // not required + continue + } + + if m.Items[i] != nil { + if err := m.Items[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("items" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1MaasMachines) validateListmeta(formats strfmt.Registry) error { + + if swag.IsZero(m.Listmeta) { // not required + return nil + } + + if m.Listmeta != nil { + if err := m.Listmeta.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("listmeta") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1MaasMachines) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1MaasMachines) UnmarshalBinary(b []byte) error { + var res V1MaasMachines + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_maas_nic.go b/api/models/v1_maas_nic.go new file mode 100644 index 00000000..4428e919 --- /dev/null +++ b/api/models/v1_maas_nic.go @@ -0,0 +1,49 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1MaasNic Maas network interface +// +// swagger:model v1MaasNic +type V1MaasNic struct { + + // index + Index int8 `json:"index,omitempty"` + + // private i ps + PrivateIPs []string `json:"privateIPs"` + + // public Ip + PublicIP string `json:"publicIp,omitempty"` +} + +// Validate validates this v1 maas nic +func (m *V1MaasNic) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1MaasNic) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1MaasNic) UnmarshalBinary(b []byte) error { + var res V1MaasNic + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_maas_pool.go b/api/models/v1_maas_pool.go new file mode 100644 index 00000000..2771ca7f --- /dev/null +++ b/api/models/v1_maas_pool.go @@ -0,0 +1,46 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1MaasPool Maas pool +// +// swagger:model v1MaasPool +type V1MaasPool struct { + + // Description of Maas domain + Description string `json:"description,omitempty"` + + // Name of Maas pool + Name string `json:"name,omitempty"` +} + +// Validate validates this v1 maas pool +func (m *V1MaasPool) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1MaasPool) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1MaasPool) UnmarshalBinary(b []byte) error { + var res V1MaasPool + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_maas_pools.go b/api/models/v1_maas_pools.go new file mode 100644 index 00000000..6945b80b --- /dev/null +++ b/api/models/v1_maas_pools.go @@ -0,0 +1,87 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1MaasPools List of Maas pools +// +// swagger:model v1MaasPools +type V1MaasPools struct { + + // items + // Required: true + // Unique: true + Items []*V1MaasPool `json:"items"` +} + +// Validate validates this v1 maas pools +func (m *V1MaasPools) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateItems(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1MaasPools) validateItems(formats strfmt.Registry) error { + + if err := validate.Required("items", "body", m.Items); err != nil { + return err + } + + if err := validate.UniqueItems("items", "body", m.Items); err != nil { + return err + } + + for i := 0; i < len(m.Items); i++ { + if swag.IsZero(m.Items[i]) { // not required + continue + } + + if m.Items[i] != nil { + if err := m.Items[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("items" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1MaasPools) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1MaasPools) UnmarshalBinary(b []byte) error { + var res V1MaasPools + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_maas_subnet.go b/api/models/v1_maas_subnet.go new file mode 100644 index 00000000..ae51ce82 --- /dev/null +++ b/api/models/v1_maas_subnet.go @@ -0,0 +1,80 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1MaasSubnet Maas subnet +// +// swagger:model v1MaasSubnet +type V1MaasSubnet struct { + + // Id of Maas subnet + ID int64 `json:"id,omitempty"` + + // Name of Maas subnet + Name string `json:"name,omitempty"` + + // Space associated with Maas subnet + Space string `json:"space,omitempty"` + + // vlans + Vlans *V1MaasVlan `json:"vlans,omitempty"` +} + +// Validate validates this v1 maas subnet +func (m *V1MaasSubnet) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateVlans(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1MaasSubnet) validateVlans(formats strfmt.Registry) error { + + if swag.IsZero(m.Vlans) { // not required + return nil + } + + if m.Vlans != nil { + if err := m.Vlans.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("vlans") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1MaasSubnet) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1MaasSubnet) UnmarshalBinary(b []byte) error { + var res V1MaasSubnet + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_maas_subnets.go b/api/models/v1_maas_subnets.go new file mode 100644 index 00000000..f8ffcacd --- /dev/null +++ b/api/models/v1_maas_subnets.go @@ -0,0 +1,87 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1MaasSubnets List of Maas subnets +// +// swagger:model v1MaasSubnets +type V1MaasSubnets struct { + + // items + // Required: true + // Unique: true + Items []*V1MaasSubnet `json:"items"` +} + +// Validate validates this v1 maas subnets +func (m *V1MaasSubnets) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateItems(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1MaasSubnets) validateItems(formats strfmt.Registry) error { + + if err := validate.Required("items", "body", m.Items); err != nil { + return err + } + + if err := validate.UniqueItems("items", "body", m.Items); err != nil { + return err + } + + for i := 0; i < len(m.Items); i++ { + if swag.IsZero(m.Items[i]) { // not required + continue + } + + if m.Items[i] != nil { + if err := m.Items[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("items" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1MaasSubnets) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1MaasSubnets) UnmarshalBinary(b []byte) error { + var res V1MaasSubnets + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_maas_tag.go b/api/models/v1_maas_tag.go new file mode 100644 index 00000000..3e6e3dc0 --- /dev/null +++ b/api/models/v1_maas_tag.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1MaasTag Maas tag +// +// swagger:model v1MaasTag +type V1MaasTag struct { + + // Comment on Maas tag + Comment string `json:"comment,omitempty"` + + // Definition of Maas tag + Definition string `json:"definition,omitempty"` + + // Kernel Opts on Maas tag + KernelOpts string `json:"kernelOpts,omitempty"` + + // Name of Maas tag + Name string `json:"name,omitempty"` + + // Description of Maas tag + ResourceURI string `json:"resourceUri,omitempty"` +} + +// Validate validates this v1 maas tag +func (m *V1MaasTag) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1MaasTag) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1MaasTag) UnmarshalBinary(b []byte) error { + var res V1MaasTag + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_maas_tags.go b/api/models/v1_maas_tags.go new file mode 100644 index 00000000..54351f78 --- /dev/null +++ b/api/models/v1_maas_tags.go @@ -0,0 +1,87 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1MaasTags List of Maas tags +// +// swagger:model v1MaasTags +type V1MaasTags struct { + + // items + // Required: true + // Unique: true + Items []*V1MaasTag `json:"items"` +} + +// Validate validates this v1 maas tags +func (m *V1MaasTags) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateItems(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1MaasTags) validateItems(formats strfmt.Registry) error { + + if err := validate.Required("items", "body", m.Items); err != nil { + return err + } + + if err := validate.UniqueItems("items", "body", m.Items); err != nil { + return err + } + + for i := 0; i < len(m.Items); i++ { + if swag.IsZero(m.Items[i]) { // not required + continue + } + + if m.Items[i] != nil { + if err := m.Items[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("items" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1MaasTags) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1MaasTags) UnmarshalBinary(b []byte) error { + var res V1MaasTags + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_maas_vlan.go b/api/models/v1_maas_vlan.go new file mode 100644 index 00000000..1ce89ef6 --- /dev/null +++ b/api/models/v1_maas_vlan.go @@ -0,0 +1,49 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1MaasVlan Maas vlan entity +// +// swagger:model v1MaasVlan +type V1MaasVlan struct { + + // Fabric associated with Maas Vlan + Fabric string `json:"fabric,omitempty"` + + // Id of Maas Vlan + ID int64 `json:"id,omitempty"` + + // Name of Maas Vlan + Name string `json:"name,omitempty"` +} + +// Validate validates this v1 maas vlan +func (m *V1MaasVlan) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1MaasVlan) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1MaasVlan) UnmarshalBinary(b []byte) error { + var res V1MaasVlan + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_maas_zone.go b/api/models/v1_maas_zone.go new file mode 100644 index 00000000..ac95c7d3 --- /dev/null +++ b/api/models/v1_maas_zone.go @@ -0,0 +1,46 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1MaasZone Maas zone +// +// swagger:model v1MaasZone +type V1MaasZone struct { + + // Description of Maas domain + Description string `json:"description,omitempty"` + + // Name of Maas zone + Name string `json:"name,omitempty"` +} + +// Validate validates this v1 maas zone +func (m *V1MaasZone) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1MaasZone) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1MaasZone) UnmarshalBinary(b []byte) error { + var res V1MaasZone + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_maas_zones.go b/api/models/v1_maas_zones.go new file mode 100644 index 00000000..ea57b70b --- /dev/null +++ b/api/models/v1_maas_zones.go @@ -0,0 +1,87 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1MaasZones List of Maas zones +// +// swagger:model v1MaasZones +type V1MaasZones struct { + + // items + // Required: true + // Unique: true + Items []*V1MaasZone `json:"items"` +} + +// Validate validates this v1 maas zones +func (m *V1MaasZones) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateItems(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1MaasZones) validateItems(formats strfmt.Registry) error { + + if err := validate.Required("items", "body", m.Items); err != nil { + return err + } + + if err := validate.UniqueItems("items", "body", m.Items); err != nil { + return err + } + + for i := 0; i < len(m.Items); i++ { + if swag.IsZero(m.Items[i]) { // not required + continue + } + + if m.Items[i] != nil { + if err := m.Items[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("items" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1MaasZones) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1MaasZones) UnmarshalBinary(b []byte) error { + var res V1MaasZones + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_machine_certificate.go b/api/models/v1_machine_certificate.go new file mode 100644 index 00000000..2ffceeee --- /dev/null +++ b/api/models/v1_machine_certificate.go @@ -0,0 +1,83 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1MachineCertificate K8 Certificates for control plane nodes +// +// swagger:model v1MachineCertificate +type V1MachineCertificate struct { + + // Applicable certificate authorities + CertificateAuthorities []*V1CertificateAuthority `json:"certificateAuthorities"` + + // name + Name string `json:"name,omitempty"` +} + +// Validate validates this v1 machine certificate +func (m *V1MachineCertificate) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateCertificateAuthorities(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1MachineCertificate) validateCertificateAuthorities(formats strfmt.Registry) error { + + if swag.IsZero(m.CertificateAuthorities) { // not required + return nil + } + + for i := 0; i < len(m.CertificateAuthorities); i++ { + if swag.IsZero(m.CertificateAuthorities[i]) { // not required + continue + } + + if m.CertificateAuthorities[i] != nil { + if err := m.CertificateAuthorities[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("certificateAuthorities" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1MachineCertificate) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1MachineCertificate) UnmarshalBinary(b []byte) error { + var res V1MachineCertificate + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_machine_certificates.go b/api/models/v1_machine_certificates.go new file mode 100644 index 00000000..9e7013a0 --- /dev/null +++ b/api/models/v1_machine_certificates.go @@ -0,0 +1,80 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1MachineCertificates K8 Certificates for all the cluster's control plane nodes +// +// swagger:model v1MachineCertificates +type V1MachineCertificates struct { + + // machine certificates + MachineCertificates []*V1MachineCertificate `json:"machineCertificates"` +} + +// Validate validates this v1 machine certificates +func (m *V1MachineCertificates) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMachineCertificates(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1MachineCertificates) validateMachineCertificates(formats strfmt.Registry) error { + + if swag.IsZero(m.MachineCertificates) { // not required + return nil + } + + for i := 0; i < len(m.MachineCertificates); i++ { + if swag.IsZero(m.MachineCertificates[i]) { // not required + continue + } + + if m.MachineCertificates[i] != nil { + if err := m.MachineCertificates[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("machineCertificates" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1MachineCertificates) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1MachineCertificates) UnmarshalBinary(b []byte) error { + var res V1MachineCertificates + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_machine_health.go b/api/models/v1_machine_health.go new file mode 100644 index 00000000..71a5e436 --- /dev/null +++ b/api/models/v1_machine_health.go @@ -0,0 +1,107 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1MachineHealth Machine health state +// +// swagger:model v1MachineHealth +type V1MachineHealth struct { + + // conditions + Conditions []*V1MachineHealthCondition `json:"conditions"` + + // last heart beat timestamp + // Format: date-time + LastHeartBeatTimestamp V1Time `json:"lastHeartBeatTimestamp,omitempty"` + + // state + State string `json:"state,omitempty"` +} + +// Validate validates this v1 machine health +func (m *V1MachineHealth) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateConditions(formats); err != nil { + res = append(res, err) + } + + if err := m.validateLastHeartBeatTimestamp(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1MachineHealth) validateConditions(formats strfmt.Registry) error { + + if swag.IsZero(m.Conditions) { // not required + return nil + } + + for i := 0; i < len(m.Conditions); i++ { + if swag.IsZero(m.Conditions[i]) { // not required + continue + } + + if m.Conditions[i] != nil { + if err := m.Conditions[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("conditions" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1MachineHealth) validateLastHeartBeatTimestamp(formats strfmt.Registry) error { + + if swag.IsZero(m.LastHeartBeatTimestamp) { // not required + return nil + } + + if err := m.LastHeartBeatTimestamp.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("lastHeartBeatTimestamp") + } + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1MachineHealth) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1MachineHealth) UnmarshalBinary(b []byte) error { + var res V1MachineHealth + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_machine_health_check_config.go b/api/models/v1_machine_health_check_config.go new file mode 100644 index 00000000..51d240c7 --- /dev/null +++ b/api/models/v1_machine_health_check_config.go @@ -0,0 +1,49 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1MachineHealthCheckConfig v1 machine health check config +// +// swagger:model v1MachineHealthCheckConfig +type V1MachineHealthCheckConfig struct { + + // HealthCheckMaxUnhealthy is the value above which, if current nodes are unhealthy remediation will not be triggered Can be an absolute int64 number or a percentage string Default value is 100%, i.e by default it is disabled + HealthCheckMaxUnhealthy string `json:"healthCheckMaxUnhealthy,omitempty"` + + // NetworkReadyHealthCheckDuration is the timeout to check for the network availability. If the network is not available in the given available time, beyond the timeout check a node will be killed and a new node will be created. Default time is 10m + NetworkReadyHealthCheckDuration string `json:"networkReadyHealthCheckDuration,omitempty"` + + // NodeReadyHealthCheckDuration is the timeout to check for the node ready state. If the node is not ready within the time out set, the node will be deleted and a new node will be launched. Default time is 10m + NodeReadyHealthCheckDuration string `json:"nodeReadyHealthCheckDuration,omitempty"` +} + +// Validate validates this v1 machine health check config +func (m *V1MachineHealthCheckConfig) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1MachineHealthCheckConfig) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1MachineHealthCheckConfig) UnmarshalBinary(b []byte) error { + var res V1MachineHealthCheckConfig + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_machine_health_condition.go b/api/models/v1_machine_health_condition.go new file mode 100644 index 00000000..e6fc6591 --- /dev/null +++ b/api/models/v1_machine_health_condition.go @@ -0,0 +1,52 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1MachineHealthCondition Machine health condition +// +// swagger:model v1MachineHealthCondition +type V1MachineHealthCondition struct { + + // message + Message string `json:"message,omitempty"` + + // reason + Reason string `json:"reason,omitempty"` + + // status + Status string `json:"status,omitempty"` + + // type + Type string `json:"type,omitempty"` +} + +// Validate validates this v1 machine health condition +func (m *V1MachineHealthCondition) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1MachineHealthCondition) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1MachineHealthCondition) UnmarshalBinary(b []byte) error { + var res V1MachineHealthCondition + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_machine_maintenance.go b/api/models/v1_machine_maintenance.go new file mode 100644 index 00000000..3882bffb --- /dev/null +++ b/api/models/v1_machine_maintenance.go @@ -0,0 +1,100 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "encoding/json" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1MachineMaintenance v1 machine maintenance +// +// swagger:model v1MachineMaintenance +type V1MachineMaintenance struct { + + // Machine maintenance mode action + // Enum: [cordon uncordon] + Action string `json:"action,omitempty"` +} + +// Validate validates this v1 machine maintenance +func (m *V1MachineMaintenance) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateAction(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +var v1MachineMaintenanceTypeActionPropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["cordon","uncordon"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + v1MachineMaintenanceTypeActionPropEnum = append(v1MachineMaintenanceTypeActionPropEnum, v) + } +} + +const ( + + // V1MachineMaintenanceActionCordon captures enum value "cordon" + V1MachineMaintenanceActionCordon string = "cordon" + + // V1MachineMaintenanceActionUncordon captures enum value "uncordon" + V1MachineMaintenanceActionUncordon string = "uncordon" +) + +// prop value enum +func (m *V1MachineMaintenance) validateActionEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, v1MachineMaintenanceTypeActionPropEnum, true); err != nil { + return err + } + return nil +} + +func (m *V1MachineMaintenance) validateAction(formats strfmt.Registry) error { + + if swag.IsZero(m.Action) { // not required + return nil + } + + // value enum + if err := m.validateActionEnum("action", "body", m.Action); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1MachineMaintenance) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1MachineMaintenance) UnmarshalBinary(b []byte) error { + var res V1MachineMaintenance + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_machine_maintenance_status.go b/api/models/v1_machine_maintenance_status.go new file mode 100644 index 00000000..aaa3180c --- /dev/null +++ b/api/models/v1_machine_maintenance_status.go @@ -0,0 +1,49 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1MachineMaintenanceStatus Machine maintenance status +// +// swagger:model v1MachineMaintenanceStatus +type V1MachineMaintenanceStatus struct { + + // action + Action string `json:"action,omitempty"` + + // message + Message string `json:"message,omitempty"` + + // state + State string `json:"state,omitempty"` +} + +// Validate validates this v1 machine maintenance status +func (m *V1MachineMaintenanceStatus) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1MachineMaintenanceStatus) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1MachineMaintenanceStatus) UnmarshalBinary(b []byte) error { + var res V1MachineMaintenanceStatus + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_machine_management_config.go b/api/models/v1_machine_management_config.go new file mode 100644 index 00000000..6b3603d0 --- /dev/null +++ b/api/models/v1_machine_management_config.go @@ -0,0 +1,74 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1MachineManagementConfig v1 machine management config +// +// swagger:model v1MachineManagementConfig +type V1MachineManagementConfig struct { + + // OS patch config contains properties to patch node os with latest security packages. + // If OsPatchConfig is not provided then node os will not be patched with latest security updates. + // Note: For edge based cluster (like edge-native type) the osPatchConfig is NOT applicable, the values will be ignored. + // + OsPatchConfig *V1OsPatchConfig `json:"osPatchConfig,omitempty"` +} + +// Validate validates this v1 machine management config +func (m *V1MachineManagementConfig) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateOsPatchConfig(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1MachineManagementConfig) validateOsPatchConfig(formats strfmt.Registry) error { + + if swag.IsZero(m.OsPatchConfig) { // not required + return nil + } + + if m.OsPatchConfig != nil { + if err := m.OsPatchConfig.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("osPatchConfig") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1MachineManagementConfig) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1MachineManagementConfig) UnmarshalBinary(b []byte) error { + var res V1MachineManagementConfig + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_machine_pool_config_entity.go b/api/models/v1_machine_pool_config_entity.go new file mode 100644 index 00000000..a84d2986 --- /dev/null +++ b/api/models/v1_machine_pool_config_entity.go @@ -0,0 +1,208 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1MachinePoolConfigEntity Machine pool configuration for the cluster +// +// swagger:model v1MachinePoolConfigEntity +type V1MachinePoolConfigEntity struct { + + // Additional labels to be part of the machine pool + AdditionalLabels map[string]string `json:"additionalLabels,omitempty"` + + // AdditionalTags is an optional set of tags to add to resources managed by the provider, in addition to the ones added by default. For eg., tags for EKS nodeGroup or EKS NodegroupIAMRole + AdditionalTags map[string]string `json:"additionalTags,omitempty"` + + // Whether this pool is for control plane + IsControlPlane bool `json:"isControlPlane"` + + // Labels for this machine pool, example: control-plane/worker, gpu, windows + // Required: true + Labels []string `json:"labels"` + + // machine pool properties + MachinePoolProperties *V1MachinePoolProperties `json:"machinePoolProperties,omitempty"` + + // Max size of the pool, for scaling + MaxSize int32 `json:"maxSize,omitempty"` + + // Min size of the pool, for scaling + MinSize int32 `json:"minSize,omitempty"` + + // name + // Required: true + Name *string `json:"name"` + + // Minimum number of seconds a node should be Ready, before the next node is selected for repave. Applicable only for workerpools in infrastructure cluster + NodeRepaveInterval int32 `json:"nodeRepaveInterval,omitempty"` + + // Size of the pool, number of nodes/machines + // Required: true + Size *int32 `json:"size"` + + // control plane or worker taints + // Unique: true + Taints []*V1Taint `json:"taints"` + + // Rolling update strategy for this machine pool if not specified, will use ScaleOut + UpdateStrategy *V1UpdateStrategy `json:"updateStrategy,omitempty"` + + // If IsControlPlane==true && useControlPlaneAsWorker==true, then will remove control plane taint this will not be used for worker pools + UseControlPlaneAsWorker bool `json:"useControlPlaneAsWorker"` +} + +// Validate validates this v1 machine pool config entity +func (m *V1MachinePoolConfigEntity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateLabels(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMachinePoolProperties(formats); err != nil { + res = append(res, err) + } + + if err := m.validateName(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSize(formats); err != nil { + res = append(res, err) + } + + if err := m.validateTaints(formats); err != nil { + res = append(res, err) + } + + if err := m.validateUpdateStrategy(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1MachinePoolConfigEntity) validateLabels(formats strfmt.Registry) error { + + if err := validate.Required("labels", "body", m.Labels); err != nil { + return err + } + + return nil +} + +func (m *V1MachinePoolConfigEntity) validateMachinePoolProperties(formats strfmt.Registry) error { + + if swag.IsZero(m.MachinePoolProperties) { // not required + return nil + } + + if m.MachinePoolProperties != nil { + if err := m.MachinePoolProperties.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("machinePoolProperties") + } + return err + } + } + + return nil +} + +func (m *V1MachinePoolConfigEntity) validateName(formats strfmt.Registry) error { + + if err := validate.Required("name", "body", m.Name); err != nil { + return err + } + + return nil +} + +func (m *V1MachinePoolConfigEntity) validateSize(formats strfmt.Registry) error { + + if err := validate.Required("size", "body", m.Size); err != nil { + return err + } + + return nil +} + +func (m *V1MachinePoolConfigEntity) validateTaints(formats strfmt.Registry) error { + + if swag.IsZero(m.Taints) { // not required + return nil + } + + if err := validate.UniqueItems("taints", "body", m.Taints); err != nil { + return err + } + + for i := 0; i < len(m.Taints); i++ { + if swag.IsZero(m.Taints[i]) { // not required + continue + } + + if m.Taints[i] != nil { + if err := m.Taints[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("taints" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1MachinePoolConfigEntity) validateUpdateStrategy(formats strfmt.Registry) error { + + if swag.IsZero(m.UpdateStrategy) { // not required + return nil + } + + if m.UpdateStrategy != nil { + if err := m.UpdateStrategy.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("updateStrategy") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1MachinePoolConfigEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1MachinePoolConfigEntity) UnmarshalBinary(b []byte) error { + var res V1MachinePoolConfigEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_machine_pool_meta.go b/api/models/v1_machine_pool_meta.go new file mode 100644 index 00000000..8dacb3b9 --- /dev/null +++ b/api/models/v1_machine_pool_meta.go @@ -0,0 +1,89 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1MachinePoolMeta v1 machine pool meta +// +// swagger:model v1MachinePoolMeta +type V1MachinePoolMeta struct { + + // cloud type + CloudType string `json:"cloudType,omitempty"` + + // number of healthy machines + Healthy int32 `json:"healthy"` + + // InfraClusterProfile contains OS/Kernel for this NodePool + InfraProfileTemplate *V1ClusterProfileTemplateMeta `json:"infraProfileTemplate,omitempty"` + + // whether this pool is for control plane + IsControlPlane bool `json:"isControlPlane"` + + // labels for this pool, example: control-plane/worker, gpu, windows + Labels []string `json:"labels"` + + // number of machines under maintenance + MaintenanceMode int32 `json:"maintenanceMode"` + + // size of the pool, number of machines + Size int32 `json:"size"` +} + +// Validate validates this v1 machine pool meta +func (m *V1MachinePoolMeta) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateInfraProfileTemplate(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1MachinePoolMeta) validateInfraProfileTemplate(formats strfmt.Registry) error { + + if swag.IsZero(m.InfraProfileTemplate) { // not required + return nil + } + + if m.InfraProfileTemplate != nil { + if err := m.InfraProfileTemplate.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("infraProfileTemplate") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1MachinePoolMeta) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1MachinePoolMeta) UnmarshalBinary(b []byte) error { + var res V1MachinePoolMeta + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_machine_pool_properties.go b/api/models/v1_machine_pool_properties.go new file mode 100644 index 00000000..9aed94de --- /dev/null +++ b/api/models/v1_machine_pool_properties.go @@ -0,0 +1,69 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1MachinePoolProperties Machine pool specific properties +// +// swagger:model v1MachinePoolProperties +type V1MachinePoolProperties struct { + + // Architecture type of the pool. Default value is 'amd64' + ArchType V1ArchType `json:"archType,omitempty"` +} + +// Validate validates this v1 machine pool properties +func (m *V1MachinePoolProperties) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateArchType(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1MachinePoolProperties) validateArchType(formats strfmt.Registry) error { + + if swag.IsZero(m.ArchType) { // not required + return nil + } + + if err := m.ArchType.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("archType") + } + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1MachinePoolProperties) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1MachinePoolProperties) UnmarshalBinary(b []byte) error { + var res V1MachinePoolProperties + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_machine_pool_rate.go b/api/models/v1_machine_pool_rate.go new file mode 100644 index 00000000..80dc2f4a --- /dev/null +++ b/api/models/v1_machine_pool_rate.go @@ -0,0 +1,77 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1MachinePoolRate Machine pool estimated rate information +// +// swagger:model v1MachinePoolRate +type V1MachinePoolRate struct { + + // name + Name string `json:"name,omitempty"` + + // nodes count + NodesCount int32 `json:"nodesCount,omitempty"` + + // rate + Rate *V1CloudRate `json:"rate,omitempty"` +} + +// Validate validates this v1 machine pool rate +func (m *V1MachinePoolRate) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateRate(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1MachinePoolRate) validateRate(formats strfmt.Registry) error { + + if swag.IsZero(m.Rate) { // not required + return nil + } + + if m.Rate != nil { + if err := m.Rate.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("rate") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1MachinePoolRate) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1MachinePoolRate) UnmarshalBinary(b []byte) error { + var res V1MachinePoolRate + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_machine_pools_machine_uids.go b/api/models/v1_machine_pools_machine_uids.go new file mode 100644 index 00000000..a7919857 --- /dev/null +++ b/api/models/v1_machine_pools_machine_uids.go @@ -0,0 +1,76 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1MachinePoolsMachineUids v1 machine pools machine uids +// +// swagger:model v1MachinePoolsMachineUids +type V1MachinePoolsMachineUids struct { + + // machine pools + MachinePools map[string]V1MachineUids `json:"machinePools,omitempty"` +} + +// Validate validates this v1 machine pools machine uids +func (m *V1MachinePoolsMachineUids) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMachinePools(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1MachinePoolsMachineUids) validateMachinePools(formats strfmt.Registry) error { + + if swag.IsZero(m.MachinePools) { // not required + return nil + } + + for k := range m.MachinePools { + + if err := validate.Required("machinePools"+"."+k, "body", m.MachinePools[k]); err != nil { + return err + } + if val, ok := m.MachinePools[k]; ok { + if err := val.Validate(formats); err != nil { + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1MachinePoolsMachineUids) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1MachinePoolsMachineUids) UnmarshalBinary(b []byte) error { + var res V1MachinePoolsMachineUids + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_machine_uids.go b/api/models/v1_machine_uids.go new file mode 100644 index 00000000..94f33835 --- /dev/null +++ b/api/models/v1_machine_uids.go @@ -0,0 +1,43 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1MachineUids v1 machine uids +// +// swagger:model v1MachineUids +type V1MachineUids struct { + + // machine uids + MachineUids []string `json:"machineUids"` +} + +// Validate validates this v1 machine uids +func (m *V1MachineUids) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1MachineUids) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1MachineUids) UnmarshalBinary(b []byte) error { + var res V1MachineUids + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_macro.go b/api/models/v1_macro.go new file mode 100644 index 00000000..a157beb6 --- /dev/null +++ b/api/models/v1_macro.go @@ -0,0 +1,46 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1Macro v1 macro +// +// swagger:model v1Macro +type V1Macro struct { + + // name + Name string `json:"name,omitempty"` + + // value + Value string `json:"value,omitempty"` +} + +// Validate validates this v1 macro +func (m *V1Macro) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1Macro) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1Macro) UnmarshalBinary(b []byte) error { + var res V1Macro + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_macros.go b/api/models/v1_macros.go new file mode 100644 index 00000000..c86783e1 --- /dev/null +++ b/api/models/v1_macros.go @@ -0,0 +1,86 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1Macros v1 macros +// +// swagger:model v1Macros +type V1Macros struct { + + // macros + // Unique: true + Macros []*V1Macro `json:"macros"` +} + +// Validate validates this v1 macros +func (m *V1Macros) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMacros(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1Macros) validateMacros(formats strfmt.Registry) error { + + if swag.IsZero(m.Macros) { // not required + return nil + } + + if err := validate.UniqueItems("macros", "body", m.Macros); err != nil { + return err + } + + for i := 0; i < len(m.Macros); i++ { + if swag.IsZero(m.Macros[i]) { // not required + continue + } + + if m.Macros[i] != nil { + if err := m.Macros[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("macros" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1Macros) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1Macros) UnmarshalBinary(b []byte) error { + var res V1Macros + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_managed_disk.go b/api/models/v1_managed_disk.go new file mode 100644 index 00000000..712f5357 --- /dev/null +++ b/api/models/v1_managed_disk.go @@ -0,0 +1,43 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ManagedDisk v1 managed disk +// +// swagger:model v1ManagedDisk +type V1ManagedDisk struct { + + // storage account type + StorageAccountType string `json:"storageAccountType,omitempty"` +} + +// Validate validates this v1 managed disk +func (m *V1ManagedDisk) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1ManagedDisk) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ManagedDisk) UnmarshalBinary(b []byte) error { + var res V1ManagedDisk + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_manifest.go b/api/models/v1_manifest.go new file mode 100644 index 00000000..8389007c --- /dev/null +++ b/api/models/v1_manifest.go @@ -0,0 +1,96 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1Manifest Manifest object +// +// swagger:model v1Manifest +type V1Manifest struct { + + // metadata + Metadata *V1ObjectMeta `json:"metadata,omitempty"` + + // spec + Spec *V1ManifestPublishedSpec `json:"spec,omitempty"` +} + +// Validate validates this v1 manifest +func (m *V1Manifest) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSpec(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1Manifest) validateMetadata(formats strfmt.Registry) error { + + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } + return err + } + } + + return nil +} + +func (m *V1Manifest) validateSpec(formats strfmt.Registry) error { + + if swag.IsZero(m.Spec) { // not required + return nil + } + + if m.Spec != nil { + if err := m.Spec.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1Manifest) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1Manifest) UnmarshalBinary(b []byte) error { + var res V1Manifest + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_manifest_data.go b/api/models/v1_manifest_data.go new file mode 100644 index 00000000..1b6abb28 --- /dev/null +++ b/api/models/v1_manifest_data.go @@ -0,0 +1,46 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ManifestData Published manifest object +// +// swagger:model v1ManifestData +type V1ManifestData struct { + + // Manifest content in yaml + Content string `json:"content,omitempty"` + + // Manifest digest + Digest string `json:"digest,omitempty"` +} + +// Validate validates this v1 manifest data +func (m *V1ManifestData) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1ManifestData) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ManifestData) UnmarshalBinary(b []byte) error { + var res V1ManifestData + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_manifest_entities.go b/api/models/v1_manifest_entities.go new file mode 100644 index 00000000..cb83447a --- /dev/null +++ b/api/models/v1_manifest_entities.go @@ -0,0 +1,87 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1ManifestEntities v1 manifest entities +// +// swagger:model v1ManifestEntities +type V1ManifestEntities struct { + + // Manifests array + // Required: true + // Unique: true + Items []*V1ManifestEntity `json:"items"` +} + +// Validate validates this v1 manifest entities +func (m *V1ManifestEntities) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateItems(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ManifestEntities) validateItems(formats strfmt.Registry) error { + + if err := validate.Required("items", "body", m.Items); err != nil { + return err + } + + if err := validate.UniqueItems("items", "body", m.Items); err != nil { + return err + } + + for i := 0; i < len(m.Items); i++ { + if swag.IsZero(m.Items[i]) { // not required + continue + } + + if m.Items[i] != nil { + if err := m.Items[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("items" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ManifestEntities) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ManifestEntities) UnmarshalBinary(b []byte) error { + var res V1ManifestEntities + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_manifest_entity.go b/api/models/v1_manifest_entity.go new file mode 100644 index 00000000..ad9dec51 --- /dev/null +++ b/api/models/v1_manifest_entity.go @@ -0,0 +1,96 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ManifestEntity Manifest object +// +// swagger:model v1ManifestEntity +type V1ManifestEntity struct { + + // metadata + Metadata *V1ObjectMeta `json:"metadata,omitempty"` + + // spec + Spec *V1ManifestSpec `json:"spec,omitempty"` +} + +// Validate validates this v1 manifest entity +func (m *V1ManifestEntity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSpec(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ManifestEntity) validateMetadata(formats strfmt.Registry) error { + + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } + return err + } + } + + return nil +} + +func (m *V1ManifestEntity) validateSpec(formats strfmt.Registry) error { + + if swag.IsZero(m.Spec) { // not required + return nil + } + + if m.Spec != nil { + if err := m.Spec.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ManifestEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ManifestEntity) UnmarshalBinary(b []byte) error { + var res V1ManifestEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_manifest_input_entity.go b/api/models/v1_manifest_input_entity.go new file mode 100644 index 00000000..eb164efa --- /dev/null +++ b/api/models/v1_manifest_input_entity.go @@ -0,0 +1,46 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ManifestInputEntity Manifest request payload +// +// swagger:model v1ManifestInputEntity +type V1ManifestInputEntity struct { + + // Manifest content + Content string `json:"content,omitempty"` + + // Manifest name + Name string `json:"name,omitempty"` +} + +// Validate validates this v1 manifest input entity +func (m *V1ManifestInputEntity) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1ManifestInputEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ManifestInputEntity) UnmarshalBinary(b []byte) error { + var res V1ManifestInputEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_manifest_published_spec.go b/api/models/v1_manifest_published_spec.go new file mode 100644 index 00000000..bbe674e3 --- /dev/null +++ b/api/models/v1_manifest_published_spec.go @@ -0,0 +1,71 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ManifestPublishedSpec Manifest spec +// +// swagger:model v1ManifestPublishedSpec +type V1ManifestPublishedSpec struct { + + // published + Published *V1ManifestData `json:"published,omitempty"` +} + +// Validate validates this v1 manifest published spec +func (m *V1ManifestPublishedSpec) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validatePublished(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ManifestPublishedSpec) validatePublished(formats strfmt.Registry) error { + + if swag.IsZero(m.Published) { // not required + return nil + } + + if m.Published != nil { + if err := m.Published.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("published") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ManifestPublishedSpec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ManifestPublishedSpec) UnmarshalBinary(b []byte) error { + var res V1ManifestPublishedSpec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_manifest_ref_input_entities.go b/api/models/v1_manifest_ref_input_entities.go new file mode 100644 index 00000000..49d3565c --- /dev/null +++ b/api/models/v1_manifest_ref_input_entities.go @@ -0,0 +1,86 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1ManifestRefInputEntities Pack manifests input params +// +// swagger:model v1ManifestRefInputEntities +type V1ManifestRefInputEntities struct { + + // Pack manifests array + // Unique: true + Manifests []*V1ManifestRefInputEntity `json:"manifests"` +} + +// Validate validates this v1 manifest ref input entities +func (m *V1ManifestRefInputEntities) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateManifests(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ManifestRefInputEntities) validateManifests(formats strfmt.Registry) error { + + if swag.IsZero(m.Manifests) { // not required + return nil + } + + if err := validate.UniqueItems("manifests", "body", m.Manifests); err != nil { + return err + } + + for i := 0; i < len(m.Manifests); i++ { + if swag.IsZero(m.Manifests[i]) { // not required + continue + } + + if m.Manifests[i] != nil { + if err := m.Manifests[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("manifests" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ManifestRefInputEntities) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ManifestRefInputEntities) UnmarshalBinary(b []byte) error { + var res V1ManifestRefInputEntities + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_manifest_ref_input_entity.go b/api/models/v1_manifest_ref_input_entity.go new file mode 100644 index 00000000..39a83334 --- /dev/null +++ b/api/models/v1_manifest_ref_input_entity.go @@ -0,0 +1,46 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ManifestRefInputEntity Manifest request payload +// +// swagger:model v1ManifestRefInputEntity +type V1ManifestRefInputEntity struct { + + // Manifest content in yaml + Content string `json:"content,omitempty"` + + // Manifest uid + UID string `json:"uid,omitempty"` +} + +// Validate validates this v1 manifest ref input entity +func (m *V1ManifestRefInputEntity) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1ManifestRefInputEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ManifestRefInputEntity) UnmarshalBinary(b []byte) error { + var res V1ManifestRefInputEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_manifest_ref_update_entity.go b/api/models/v1_manifest_ref_update_entity.go new file mode 100644 index 00000000..5eb00480 --- /dev/null +++ b/api/models/v1_manifest_ref_update_entity.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1ManifestRefUpdateEntity Manifest update request payload +// +// swagger:model v1ManifestRefUpdateEntity +type V1ManifestRefUpdateEntity struct { + + // Manifest content in yaml + Content string `json:"content,omitempty"` + + // Manifest name + // Required: true + Name *string `json:"name"` + + // Manifest uid + UID string `json:"uid,omitempty"` +} + +// Validate validates this v1 manifest ref update entity +func (m *V1ManifestRefUpdateEntity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateName(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ManifestRefUpdateEntity) validateName(formats strfmt.Registry) error { + + if err := validate.Required("name", "body", m.Name); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ManifestRefUpdateEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ManifestRefUpdateEntity) UnmarshalBinary(b []byte) error { + var res V1ManifestRefUpdateEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_manifest_spec.go b/api/models/v1_manifest_spec.go new file mode 100644 index 00000000..e6d301a7 --- /dev/null +++ b/api/models/v1_manifest_spec.go @@ -0,0 +1,96 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ManifestSpec Manifest spec +// +// swagger:model v1ManifestSpec +type V1ManifestSpec struct { + + // draft + Draft *V1ManifestData `json:"draft,omitempty"` + + // published + Published *V1ManifestData `json:"published,omitempty"` +} + +// Validate validates this v1 manifest spec +func (m *V1ManifestSpec) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateDraft(formats); err != nil { + res = append(res, err) + } + + if err := m.validatePublished(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ManifestSpec) validateDraft(formats strfmt.Registry) error { + + if swag.IsZero(m.Draft) { // not required + return nil + } + + if m.Draft != nil { + if err := m.Draft.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("draft") + } + return err + } + } + + return nil +} + +func (m *V1ManifestSpec) validatePublished(formats strfmt.Registry) error { + + if swag.IsZero(m.Published) { // not required + return nil + } + + if m.Published != nil { + if err := m.Published.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("published") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ManifestSpec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ManifestSpec) UnmarshalBinary(b []byte) error { + var res V1ManifestSpec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_manifest_summary.go b/api/models/v1_manifest_summary.go new file mode 100644 index 00000000..8660952b --- /dev/null +++ b/api/models/v1_manifest_summary.go @@ -0,0 +1,49 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ManifestSummary Manifest object +// +// swagger:model v1ManifestSummary +type V1ManifestSummary struct { + + // Manifest content in yaml + Content string `json:"content,omitempty"` + + // Manifest name + Name string `json:"name,omitempty"` + + // Manifest uid + UID string `json:"uid,omitempty"` +} + +// Validate validates this v1 manifest summary +func (m *V1ManifestSummary) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1ManifestSummary) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ManifestSummary) UnmarshalBinary(b []byte) error { + var res V1ManifestSummary + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_memory.go b/api/models/v1_memory.go new file mode 100644 index 00000000..3aacb385 --- /dev/null +++ b/api/models/v1_memory.go @@ -0,0 +1,43 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1Memory v1 memory +// +// swagger:model v1Memory +type V1Memory struct { + + // memory size in bytes + SizeInMB int64 `json:"sizeInMB,omitempty"` +} + +// Validate validates this v1 memory +func (m *V1Memory) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1Memory) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1Memory) UnmarshalBinary(b []byte) error { + var res V1Memory + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_metric_aggregation.go b/api/models/v1_metric_aggregation.go new file mode 100644 index 00000000..a49d840d --- /dev/null +++ b/api/models/v1_metric_aggregation.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1MetricAggregation Aggregation values +// +// swagger:model v1MetricAggregation +type V1MetricAggregation struct { + + // avg + Avg float64 `json:"avg"` + + // count + Count int64 `json:"count"` + + // max + Max float64 `json:"max"` + + // min + Min float64 `json:"min"` + + // sum + Sum float64 `json:"sum"` +} + +// Validate validates this v1 metric aggregation +func (m *V1MetricAggregation) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1MetricAggregation) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1MetricAggregation) UnmarshalBinary(b []byte) error { + var res V1MetricAggregation + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_metric_metadata.go b/api/models/v1_metric_metadata.go new file mode 100644 index 00000000..1395d065 --- /dev/null +++ b/api/models/v1_metric_metadata.go @@ -0,0 +1,46 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1MetricMetadata v1 metric metadata +// +// swagger:model v1MetricMetadata +type V1MetricMetadata struct { + + // name + Name string `json:"name,omitempty"` + + // uid + UID string `json:"uid,omitempty"` +} + +// Validate validates this v1 metric metadata +func (m *V1MetricMetadata) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1MetricMetadata) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1MetricMetadata) UnmarshalBinary(b []byte) error { + var res V1MetricMetadata + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_metric_point.go b/api/models/v1_metric_point.go new file mode 100644 index 00000000..8e26e1cb --- /dev/null +++ b/api/models/v1_metric_point.go @@ -0,0 +1,61 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1MetricPoint Metric Info +// +// swagger:model v1MetricPoint +type V1MetricPoint struct { + + // avg + Avg float64 `json:"avg,omitempty"` + + // count + Count int64 `json:"count,omitempty"` + + // max + Max float64 `json:"max,omitempty"` + + // min + Min float64 `json:"min,omitempty"` + + // sum + Sum float64 `json:"sum,omitempty"` + + // timestamp + Timestamp int64 `json:"timestamp,omitempty"` + + // value + Value float64 `json:"value"` +} + +// Validate validates this v1 metric point +func (m *V1MetricPoint) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1MetricPoint) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1MetricPoint) UnmarshalBinary(b []byte) error { + var res V1MetricPoint + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_metric_time_series.go b/api/models/v1_metric_time_series.go new file mode 100644 index 00000000..c9b1ad16 --- /dev/null +++ b/api/models/v1_metric_time_series.go @@ -0,0 +1,87 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1MetricTimeSeries v1 metric time series +// +// swagger:model v1MetricTimeSeries +type V1MetricTimeSeries struct { + + // items + // Required: true + // Unique: true + Items []*V1Metrics `json:"items"` +} + +// Validate validates this v1 metric time series +func (m *V1MetricTimeSeries) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateItems(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1MetricTimeSeries) validateItems(formats strfmt.Registry) error { + + if err := validate.Required("items", "body", m.Items); err != nil { + return err + } + + if err := validate.UniqueItems("items", "body", m.Items); err != nil { + return err + } + + for i := 0; i < len(m.Items); i++ { + if swag.IsZero(m.Items[i]) { // not required + continue + } + + if m.Items[i] != nil { + if err := m.Items[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("items" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1MetricTimeSeries) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1MetricTimeSeries) UnmarshalBinary(b []byte) error { + var res V1MetricTimeSeries + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_metric_time_series_list.go b/api/models/v1_metric_time_series_list.go new file mode 100644 index 00000000..0c3e2fa2 --- /dev/null +++ b/api/models/v1_metric_time_series_list.go @@ -0,0 +1,87 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1MetricTimeSeriesList v1 metric time series list +// +// swagger:model v1MetricTimeSeriesList +type V1MetricTimeSeriesList struct { + + // items + // Required: true + // Unique: true + Items []*V1MetricsList `json:"items"` +} + +// Validate validates this v1 metric time series list +func (m *V1MetricTimeSeriesList) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateItems(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1MetricTimeSeriesList) validateItems(formats strfmt.Registry) error { + + if err := validate.Required("items", "body", m.Items); err != nil { + return err + } + + if err := validate.UniqueItems("items", "body", m.Items); err != nil { + return err + } + + for i := 0; i < len(m.Items); i++ { + if swag.IsZero(m.Items[i]) { // not required + continue + } + + if m.Items[i] != nil { + if err := m.Items[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("items" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1MetricTimeSeriesList) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1MetricTimeSeriesList) UnmarshalBinary(b []byte) error { + var res V1MetricTimeSeriesList + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_metrics.go b/api/models/v1_metrics.go new file mode 100644 index 00000000..f79e359f --- /dev/null +++ b/api/models/v1_metrics.go @@ -0,0 +1,117 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1Metrics v1 metrics +// +// swagger:model v1Metrics +type V1Metrics struct { + + // aggregation + Aggregation *V1MetricAggregation `json:"aggregation,omitempty"` + + // kind + Kind string `json:"kind,omitempty"` + + // points + // Unique: true + Points []*V1MetricPoint `json:"points"` + + // unit + Unit string `json:"unit,omitempty"` +} + +// Validate validates this v1 metrics +func (m *V1Metrics) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateAggregation(formats); err != nil { + res = append(res, err) + } + + if err := m.validatePoints(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1Metrics) validateAggregation(formats strfmt.Registry) error { + + if swag.IsZero(m.Aggregation) { // not required + return nil + } + + if m.Aggregation != nil { + if err := m.Aggregation.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("aggregation") + } + return err + } + } + + return nil +} + +func (m *V1Metrics) validatePoints(formats strfmt.Registry) error { + + if swag.IsZero(m.Points) { // not required + return nil + } + + if err := validate.UniqueItems("points", "body", m.Points); err != nil { + return err + } + + for i := 0; i < len(m.Points); i++ { + if swag.IsZero(m.Points[i]) { // not required + continue + } + + if m.Points[i] != nil { + if err := m.Points[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("points" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1Metrics) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1Metrics) UnmarshalBinary(b []byte) error { + var res V1Metrics + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_metrics_list.go b/api/models/v1_metrics_list.go new file mode 100644 index 00000000..08c9ff9f --- /dev/null +++ b/api/models/v1_metrics_list.go @@ -0,0 +1,111 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1MetricsList v1 metrics list +// +// swagger:model v1MetricsList +type V1MetricsList struct { + + // metadata + Metadata *V1MetricMetadata `json:"metadata,omitempty"` + + // metrics + // Unique: true + Metrics []*V1Metrics `json:"metrics"` +} + +// Validate validates this v1 metrics list +func (m *V1MetricsList) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMetrics(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1MetricsList) validateMetadata(formats strfmt.Registry) error { + + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } + return err + } + } + + return nil +} + +func (m *V1MetricsList) validateMetrics(formats strfmt.Registry) error { + + if swag.IsZero(m.Metrics) { // not required + return nil + } + + if err := validate.UniqueItems("metrics", "body", m.Metrics); err != nil { + return err + } + + for i := 0; i < len(m.Metrics); i++ { + if swag.IsZero(m.Metrics[i]) { // not required + continue + } + + if m.Metrics[i] != nil { + if err := m.Metrics[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metrics" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1MetricsList) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1MetricsList) UnmarshalBinary(b []byte) error { + var res V1MetricsList + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_nameserver.go b/api/models/v1_nameserver.go new file mode 100644 index 00000000..bbac2d9d --- /dev/null +++ b/api/models/v1_nameserver.go @@ -0,0 +1,46 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1Nameserver Nameserver define search domains and nameserver addresses +// +// swagger:model v1Nameserver +type V1Nameserver struct { + + // addresses + Addresses []string `json:"addresses"` + + // search + Search []string `json:"search"` +} + +// Validate validates this v1 nameserver +func (m *V1Nameserver) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1Nameserver) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1Nameserver) UnmarshalBinary(b []byte) error { + var res V1Nameserver + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_nested_cloud_config_status.go b/api/models/v1_nested_cloud_config_status.go new file mode 100644 index 00000000..e6b18f6e --- /dev/null +++ b/api/models/v1_nested_cloud_config_status.go @@ -0,0 +1,83 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1NestedCloudConfigStatus Defines the status of virtual cloud config +// +// swagger:model v1NestedCloudConfigStatus +type V1NestedCloudConfigStatus struct { + + // conditions + Conditions []*V1ClusterCondition `json:"conditions"` + + // addon layers present in spc + IsAddonLayer bool `json:"isAddonLayer,omitempty"` +} + +// Validate validates this v1 nested cloud config status +func (m *V1NestedCloudConfigStatus) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateConditions(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1NestedCloudConfigStatus) validateConditions(formats strfmt.Registry) error { + + if swag.IsZero(m.Conditions) { // not required + return nil + } + + for i := 0; i < len(m.Conditions); i++ { + if swag.IsZero(m.Conditions[i]) { // not required + continue + } + + if m.Conditions[i] != nil { + if err := m.Conditions[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("conditions" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1NestedCloudConfigStatus) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1NestedCloudConfigStatus) UnmarshalBinary(b []byte) error { + var res V1NestedCloudConfigStatus + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_nic.go b/api/models/v1_nic.go new file mode 100644 index 00000000..016cc7f6 --- /dev/null +++ b/api/models/v1_nic.go @@ -0,0 +1,61 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1Nic v1 nic +// +// swagger:model v1Nic +type V1Nic struct { + + // dns + DNS []string `json:"dns"` + + // gateway + Gateway string `json:"gateway,omitempty"` + + // ip + IP string `json:"ip,omitempty"` + + // is default + IsDefault bool `json:"isDefault,omitempty"` + + // mac addr + MacAddr string `json:"macAddr,omitempty"` + + // nic name + NicName string `json:"nicName,omitempty"` + + // subnet + Subnet string `json:"subnet,omitempty"` +} + +// Validate validates this v1 nic +func (m *V1Nic) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1Nic) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1Nic) UnmarshalBinary(b []byte) error { + var res V1Nic + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_nodes_auto_remediation_settings.go b/api/models/v1_nodes_auto_remediation_settings.go new file mode 100644 index 00000000..f1854259 --- /dev/null +++ b/api/models/v1_nodes_auto_remediation_settings.go @@ -0,0 +1,46 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1NodesAutoRemediationSettings v1 nodes auto remediation settings +// +// swagger:model v1NodesAutoRemediationSettings +type V1NodesAutoRemediationSettings struct { + + // disable nodes auto remediation + DisableNodesAutoRemediation bool `json:"disableNodesAutoRemediation"` + + // is enabled + IsEnabled bool `json:"isEnabled"` +} + +// Validate validates this v1 nodes auto remediation settings +func (m *V1NodesAutoRemediationSettings) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1NodesAutoRemediationSettings) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1NodesAutoRemediationSettings) UnmarshalBinary(b []byte) error { + var res V1NodesAutoRemediationSettings + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_non_fips_config.go b/api/models/v1_non_fips_config.go new file mode 100644 index 00000000..b9e10ed7 --- /dev/null +++ b/api/models/v1_non_fips_config.go @@ -0,0 +1,100 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "encoding/json" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1NonFipsConfig Non-FIPS configuration +// +// swagger:model v1NonFipsConfig +type V1NonFipsConfig struct { + + // enable or disable the non FIPS complaint + // Enum: [nonFipsEnabled nonFipsDisabled] + Mode *string `json:"mode,omitempty"` +} + +// Validate validates this v1 non fips config +func (m *V1NonFipsConfig) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMode(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +var v1NonFipsConfigTypeModePropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["nonFipsEnabled","nonFipsDisabled"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + v1NonFipsConfigTypeModePropEnum = append(v1NonFipsConfigTypeModePropEnum, v) + } +} + +const ( + + // V1NonFipsConfigModeNonFipsEnabled captures enum value "nonFipsEnabled" + V1NonFipsConfigModeNonFipsEnabled string = "nonFipsEnabled" + + // V1NonFipsConfigModeNonFipsDisabled captures enum value "nonFipsDisabled" + V1NonFipsConfigModeNonFipsDisabled string = "nonFipsDisabled" +) + +// prop value enum +func (m *V1NonFipsConfig) validateModeEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, v1NonFipsConfigTypeModePropEnum, true); err != nil { + return err + } + return nil +} + +func (m *V1NonFipsConfig) validateMode(formats strfmt.Registry) error { + + if swag.IsZero(m.Mode) { // not required + return nil + } + + // value enum + if err := m.validateModeEnum("mode", "body", *m.Mode); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1NonFipsConfig) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1NonFipsConfig) UnmarshalBinary(b []byte) error { + var res V1NonFipsConfig + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_notification.go b/api/models/v1_notification.go new file mode 100644 index 00000000..66671b74 --- /dev/null +++ b/api/models/v1_notification.go @@ -0,0 +1,203 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "encoding/json" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1Notification Describes event notification and action definition +// +// swagger:model v1Notification +type V1Notification struct { + + // Describes actions for the notification + Action *V1NotificationAction `json:"action,omitempty"` + + // metadata + Metadata *V1ObjectMeta `json:"metadata,omitempty"` + + // related object + RelatedObject *V1RelatedObject `json:"relatedObject,omitempty"` + + // Describes origin info for the notification + Source *V1NotificationSource `json:"source,omitempty"` + + // Describes type of notification. Possible values [NotificationPackUpdate, NotificationPackRegistryUpdate, NotificationNone] + // Enum: [NotificationPackUpdate NotificationPackRegistryUpdate NotificationNone] + Type string `json:"type,omitempty"` +} + +// Validate validates this v1 notification +func (m *V1Notification) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateAction(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if err := m.validateRelatedObject(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSource(formats); err != nil { + res = append(res, err) + } + + if err := m.validateType(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1Notification) validateAction(formats strfmt.Registry) error { + + if swag.IsZero(m.Action) { // not required + return nil + } + + if m.Action != nil { + if err := m.Action.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("action") + } + return err + } + } + + return nil +} + +func (m *V1Notification) validateMetadata(formats strfmt.Registry) error { + + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } + return err + } + } + + return nil +} + +func (m *V1Notification) validateRelatedObject(formats strfmt.Registry) error { + + if swag.IsZero(m.RelatedObject) { // not required + return nil + } + + if m.RelatedObject != nil { + if err := m.RelatedObject.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("relatedObject") + } + return err + } + } + + return nil +} + +func (m *V1Notification) validateSource(formats strfmt.Registry) error { + + if swag.IsZero(m.Source) { // not required + return nil + } + + if m.Source != nil { + if err := m.Source.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("source") + } + return err + } + } + + return nil +} + +var v1NotificationTypeTypePropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["NotificationPackUpdate","NotificationPackRegistryUpdate","NotificationNone"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + v1NotificationTypeTypePropEnum = append(v1NotificationTypeTypePropEnum, v) + } +} + +const ( + + // V1NotificationTypeNotificationPackUpdate captures enum value "NotificationPackUpdate" + V1NotificationTypeNotificationPackUpdate string = "NotificationPackUpdate" + + // V1NotificationTypeNotificationPackRegistryUpdate captures enum value "NotificationPackRegistryUpdate" + V1NotificationTypeNotificationPackRegistryUpdate string = "NotificationPackRegistryUpdate" + + // V1NotificationTypeNotificationNone captures enum value "NotificationNone" + V1NotificationTypeNotificationNone string = "NotificationNone" +) + +// prop value enum +func (m *V1Notification) validateTypeEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, v1NotificationTypeTypePropEnum, true); err != nil { + return err + } + return nil +} + +func (m *V1Notification) validateType(formats strfmt.Registry) error { + + if swag.IsZero(m.Type) { // not required + return nil + } + + // value enum + if err := m.validateTypeEnum("type", "body", m.Type); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1Notification) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1Notification) UnmarshalBinary(b []byte) error { + var res V1Notification + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_notification_action.go b/api/models/v1_notification_action.go new file mode 100644 index 00000000..8b0ab698 --- /dev/null +++ b/api/models/v1_notification_action.go @@ -0,0 +1,127 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "encoding/json" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1NotificationAction Describes actions for the notification +// +// swagger:model v1NotificationAction +type V1NotificationAction struct { + + // Describes the acknowledgement status for the notification + Ack bool `json:"ack"` + + // Describes information related to notification action + ActionMessage string `json:"actionMessage,omitempty"` + + // Describes action type for the notification. Possible Values [NotifyActionPacksUpdate, NotifyActionClusterProfileUpdate, NotifyActionPackRegistryUpdate, NotifyActionClusterUpdate, NotifyActionNone] + // Enum: [NotifyActionPacksUpdate NotifyActionClusterProfileUpdate NotifyActionPackRegistryUpdate NotifyActionClusterUpdate NotifyActionNone] + ActionType string `json:"actionType,omitempty"` + + // Describes the events happened for the notifications + Events map[string]map[string]string `json:"events,omitempty"` + + // Describes the "Done" status for the notification + IsDone bool `json:"isDone"` + + // Describes the notification as a information + IsInfo bool `json:"isInfo"` + + // link + Link string `json:"link,omitempty"` +} + +// Validate validates this v1 notification action +func (m *V1NotificationAction) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateActionType(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +var v1NotificationActionTypeActionTypePropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["NotifyActionPacksUpdate","NotifyActionClusterProfileUpdate","NotifyActionPackRegistryUpdate","NotifyActionClusterUpdate","NotifyActionNone"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + v1NotificationActionTypeActionTypePropEnum = append(v1NotificationActionTypeActionTypePropEnum, v) + } +} + +const ( + + // V1NotificationActionActionTypeNotifyActionPacksUpdate captures enum value "NotifyActionPacksUpdate" + V1NotificationActionActionTypeNotifyActionPacksUpdate string = "NotifyActionPacksUpdate" + + // V1NotificationActionActionTypeNotifyActionClusterProfileUpdate captures enum value "NotifyActionClusterProfileUpdate" + V1NotificationActionActionTypeNotifyActionClusterProfileUpdate string = "NotifyActionClusterProfileUpdate" + + // V1NotificationActionActionTypeNotifyActionPackRegistryUpdate captures enum value "NotifyActionPackRegistryUpdate" + V1NotificationActionActionTypeNotifyActionPackRegistryUpdate string = "NotifyActionPackRegistryUpdate" + + // V1NotificationActionActionTypeNotifyActionClusterUpdate captures enum value "NotifyActionClusterUpdate" + V1NotificationActionActionTypeNotifyActionClusterUpdate string = "NotifyActionClusterUpdate" + + // V1NotificationActionActionTypeNotifyActionNone captures enum value "NotifyActionNone" + V1NotificationActionActionTypeNotifyActionNone string = "NotifyActionNone" +) + +// prop value enum +func (m *V1NotificationAction) validateActionTypeEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, v1NotificationActionTypeActionTypePropEnum, true); err != nil { + return err + } + return nil +} + +func (m *V1NotificationAction) validateActionType(formats strfmt.Registry) error { + + if swag.IsZero(m.ActionType) { // not required + return nil + } + + // value enum + if err := m.validateActionTypeEnum("actionType", "body", m.ActionType); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1NotificationAction) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1NotificationAction) UnmarshalBinary(b []byte) error { + var res V1NotificationAction + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_notification_event.go b/api/models/v1_notification_event.go new file mode 100644 index 00000000..61ca738e --- /dev/null +++ b/api/models/v1_notification_event.go @@ -0,0 +1,112 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "encoding/json" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1NotificationEvent Describes notification event details +// +// swagger:model v1NotificationEvent +type V1NotificationEvent struct { + + // Describes component of notification event + Component string `json:"component,omitempty"` + + // Describes notification event digest + Digest string `json:"digest,omitempty"` + + // Describes a information for the notification event + Message string `json:"message,omitempty"` + + // Describes a event messages with meta digest as the key + Meta map[string]string `json:"meta,omitempty"` + + // Describes notification event type + // Enum: [NotificationPackSync NotificationClusterProfileSync] + Type string `json:"type,omitempty"` +} + +// Validate validates this v1 notification event +func (m *V1NotificationEvent) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateType(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +var v1NotificationEventTypeTypePropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["NotificationPackSync","NotificationClusterProfileSync"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + v1NotificationEventTypeTypePropEnum = append(v1NotificationEventTypeTypePropEnum, v) + } +} + +const ( + + // V1NotificationEventTypeNotificationPackSync captures enum value "NotificationPackSync" + V1NotificationEventTypeNotificationPackSync string = "NotificationPackSync" + + // V1NotificationEventTypeNotificationClusterProfileSync captures enum value "NotificationClusterProfileSync" + V1NotificationEventTypeNotificationClusterProfileSync string = "NotificationClusterProfileSync" +) + +// prop value enum +func (m *V1NotificationEvent) validateTypeEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, v1NotificationEventTypeTypePropEnum, true); err != nil { + return err + } + return nil +} + +func (m *V1NotificationEvent) validateType(formats strfmt.Registry) error { + + if swag.IsZero(m.Type) { // not required + return nil + } + + // value enum + if err := m.validateTypeEnum("type", "body", m.Type); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1NotificationEvent) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1NotificationEvent) UnmarshalBinary(b []byte) error { + var res V1NotificationEvent + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_notification_source.go b/api/models/v1_notification_source.go new file mode 100644 index 00000000..3e0619aa --- /dev/null +++ b/api/models/v1_notification_source.go @@ -0,0 +1,43 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1NotificationSource Describes origin info for the notification +// +// swagger:model v1NotificationSource +type V1NotificationSource struct { + + // Describes component where notification originated + Component string `json:"component,omitempty"` +} + +// Validate validates this v1 notification source +func (m *V1NotificationSource) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1NotificationSource) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1NotificationSource) UnmarshalBinary(b []byte) error { + var res V1NotificationSource + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_notifications.go b/api/models/v1_notifications.go new file mode 100644 index 00000000..a0ea4512 --- /dev/null +++ b/api/models/v1_notifications.go @@ -0,0 +1,112 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1Notifications Describe a list of generated notifications +// +// swagger:model v1Notifications +type V1Notifications struct { + + // Describe a list of generated notifications + // Required: true + // Unique: true + Items []*V1Notification `json:"items"` + + // Describes the meta information about the notification lists + Listmeta *V1ListMetaData `json:"listmeta,omitempty"` +} + +// Validate validates this v1 notifications +func (m *V1Notifications) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateItems(formats); err != nil { + res = append(res, err) + } + + if err := m.validateListmeta(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1Notifications) validateItems(formats strfmt.Registry) error { + + if err := validate.Required("items", "body", m.Items); err != nil { + return err + } + + if err := validate.UniqueItems("items", "body", m.Items); err != nil { + return err + } + + for i := 0; i < len(m.Items); i++ { + if swag.IsZero(m.Items[i]) { // not required + continue + } + + if m.Items[i] != nil { + if err := m.Items[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("items" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1Notifications) validateListmeta(formats strfmt.Registry) error { + + if swag.IsZero(m.Listmeta) { // not required + return nil + } + + if m.Listmeta != nil { + if err := m.Listmeta.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("listmeta") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1Notifications) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1Notifications) UnmarshalBinary(b []byte) error { + var res V1Notifications + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_o_s.go b/api/models/v1_o_s.go new file mode 100644 index 00000000..0b2625ea --- /dev/null +++ b/api/models/v1_o_s.go @@ -0,0 +1,46 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1OS v1 o s +// +// swagger:model v1OS +type V1OS struct { + + // family + Family string `json:"family,omitempty"` + + // version + Version string `json:"version,omitempty"` +} + +// Validate validates this v1 o s +func (m *V1OS) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1OS) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1OS) UnmarshalBinary(b []byte) error { + var res V1OS + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_object_entity.go b/api/models/v1_object_entity.go new file mode 100644 index 00000000..c2778054 --- /dev/null +++ b/api/models/v1_object_entity.go @@ -0,0 +1,46 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ObjectEntity Object identity meta +// +// swagger:model v1ObjectEntity +type V1ObjectEntity struct { + + // name + Name string `json:"name,omitempty"` + + // uid + UID string `json:"uid,omitempty"` +} + +// Validate validates this v1 object entity +func (m *V1ObjectEntity) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1ObjectEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ObjectEntity) UnmarshalBinary(b []byte) error { + var res V1ObjectEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_object_meta.go b/api/models/v1_object_meta.go new file mode 100644 index 00000000..b9cd8f58 --- /dev/null +++ b/api/models/v1_object_meta.go @@ -0,0 +1,138 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ObjectMeta ObjectMeta is metadata that all persisted resources must have, which includes all objects users must create. +// +// swagger:model v1ObjectMeta +type V1ObjectMeta struct { + + // Annotations is an unstructured key value map stored with a resource that may be set by external tools to store and retrieve arbitrary metadata. They are not queryable and should be preserved when modifying objects. More info: http://kubernetes.io/docs/user-guide/annotations + Annotations map[string]string `json:"annotations,omitempty"` + + // CreationTimestamp is a timestamp representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations. Clients may not set this value. It is represented in RFC3339 form and is in UTC. + // + // Populated by the system. Read-only. Null for lists. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + // Format: date-time + CreationTimestamp V1Time `json:"creationTimestamp,omitempty"` + + // DeletionTimestamp is RFC 3339 date and time at which this resource will be deleted. This field is set by the server when a graceful deletion is requested by the user, and is not directly settable by a client. The resource is expected to be deleted (no longer visible from resource lists, and not reachable by name) after the time in this field, once the finalizers list is empty. As long as the finalizers list contains items, deletion is blocked. Once the deletionTimestamp is set, this value may not be unset or be set further into the future, although it may be shortened or the resource may be deleted prior to this time. For example, a user may request that a pod is deleted in 30 seconds. The Kubelet will react by sending a graceful termination signal to the containers in the pod. After that 30 seconds, the Kubelet will send a hard termination signal (SIGKILL) to the container and after cleanup, remove the pod from the API. In the presence of network partitions, this object may still exist after this timestamp, until an administrator or automated process can determine the resource is fully terminated. If not set, graceful deletion of the object has not been requested. + // + // Populated by the system when a graceful deletion is requested. Read-only. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + // Format: date-time + DeletionTimestamp V1Time `json:"deletionTimestamp,omitempty"` + + // Map of string keys and values that can be used to organize and categorize (scope and select) objects. May match selectors of replication controllers and services. More info: http://kubernetes.io/docs/user-guide/labels + Labels map[string]string `json:"labels,omitempty"` + + // LastModifiedTimestamp is a timestamp representing the server time when this object was last modified. It is not guaranteed to be set in happens-before order across separate operations. Clients may not set this value. It is represented in RFC3339 form and is in UTC. + // + // Populated by the system. Read-only. Null for lists. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata + // Format: date-time + LastModifiedTimestamp V1Time `json:"lastModifiedTimestamp,omitempty"` + + // Name must be unique within a namespace. Is required when creating resources, although some resources may allow a client to request the generation of an appropriate name automatically. Name is primarily intended for creation idempotence and configuration definition. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/identifiers#names + Name string `json:"name,omitempty"` + + // UID is the unique in time and space value for this object. It is typically generated by the server on successful creation of a resource and is not allowed to change on PUT operations. + // + // Populated by the system. Read-only. More info: http://kubernetes.io/docs/user-guide/identifiers#uids + UID string `json:"uid,omitempty"` +} + +// Validate validates this v1 object meta +func (m *V1ObjectMeta) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateCreationTimestamp(formats); err != nil { + res = append(res, err) + } + + if err := m.validateDeletionTimestamp(formats); err != nil { + res = append(res, err) + } + + if err := m.validateLastModifiedTimestamp(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ObjectMeta) validateCreationTimestamp(formats strfmt.Registry) error { + + if swag.IsZero(m.CreationTimestamp) { // not required + return nil + } + + if err := m.CreationTimestamp.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("creationTimestamp") + } + return err + } + + return nil +} + +func (m *V1ObjectMeta) validateDeletionTimestamp(formats strfmt.Registry) error { + + if swag.IsZero(m.DeletionTimestamp) { // not required + return nil + } + + if err := m.DeletionTimestamp.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("deletionTimestamp") + } + return err + } + + return nil +} + +func (m *V1ObjectMeta) validateLastModifiedTimestamp(formats strfmt.Registry) error { + + if swag.IsZero(m.LastModifiedTimestamp) { // not required + return nil + } + + if err := m.LastModifiedTimestamp.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("lastModifiedTimestamp") + } + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ObjectMeta) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ObjectMeta) UnmarshalBinary(b []byte) error { + var res V1ObjectMeta + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_object_meta_input_entity.go b/api/models/v1_object_meta_input_entity.go new file mode 100644 index 00000000..0bc283f4 --- /dev/null +++ b/api/models/v1_object_meta_input_entity.go @@ -0,0 +1,49 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ObjectMetaInputEntity ObjectMeta input entity for object creation +// +// swagger:model v1ObjectMetaInputEntity +type V1ObjectMetaInputEntity struct { + + // Annotations is an unstructured key value map stored with a resource that may be set by external tools to store and retrieve arbitrary metadata. They are not queryable and should be preserved when modifying objects. More info: http://kubernetes.io/docs/user-guide/annotations + Annotations map[string]string `json:"annotations,omitempty"` + + // Map of string keys and values that can be used to organize and categorize (scope and select) objects. May match selectors of replication controllers and services. More info: http://kubernetes.io/docs/user-guide/labels + Labels map[string]string `json:"labels,omitempty"` + + // Name must be unique within a namespace. Is required when creating resources, although some resources may allow a client to request the generation of an appropriate name automatically. Name is primarily intended for creation idempotence and configuration definition. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/identifiers#names + Name string `json:"name,omitempty"` +} + +// Validate validates this v1 object meta input entity +func (m *V1ObjectMetaInputEntity) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1ObjectMetaInputEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ObjectMetaInputEntity) UnmarshalBinary(b []byte) error { + var res V1ObjectMetaInputEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_object_meta_input_entity_schema.go b/api/models/v1_object_meta_input_entity_schema.go new file mode 100644 index 00000000..ea41ae99 --- /dev/null +++ b/api/models/v1_object_meta_input_entity_schema.go @@ -0,0 +1,73 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1ObjectMetaInputEntitySchema Resource metadata +// +// swagger:model v1ObjectMetaInputEntitySchema +type V1ObjectMetaInputEntitySchema struct { + + // metadata + // Required: true + Metadata *V1ObjectMetaInputEntity `json:"metadata"` +} + +// Validate validates this v1 object meta input entity schema +func (m *V1ObjectMetaInputEntitySchema) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ObjectMetaInputEntitySchema) validateMetadata(formats strfmt.Registry) error { + + if err := validate.Required("metadata", "body", m.Metadata); err != nil { + return err + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ObjectMetaInputEntitySchema) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ObjectMetaInputEntitySchema) UnmarshalBinary(b []byte) error { + var res V1ObjectMetaInputEntitySchema + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_object_meta_update_entity.go b/api/models/v1_object_meta_update_entity.go new file mode 100644 index 00000000..4ff20e8c --- /dev/null +++ b/api/models/v1_object_meta_update_entity.go @@ -0,0 +1,52 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ObjectMetaUpdateEntity ObjectMeta update entity with uid as input +// +// swagger:model v1ObjectMetaUpdateEntity +type V1ObjectMetaUpdateEntity struct { + + // annotations + Annotations map[string]string `json:"annotations,omitempty"` + + // labels + Labels map[string]string `json:"labels,omitempty"` + + // name + Name string `json:"name,omitempty"` + + // uid + UID string `json:"uid,omitempty"` +} + +// Validate validates this v1 object meta update entity +func (m *V1ObjectMetaUpdateEntity) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1ObjectMetaUpdateEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ObjectMetaUpdateEntity) UnmarshalBinary(b []byte) error { + var res V1ObjectMetaUpdateEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_object_reference.go b/api/models/v1_object_reference.go new file mode 100644 index 00000000..26e7e3b6 --- /dev/null +++ b/api/models/v1_object_reference.go @@ -0,0 +1,49 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ObjectReference ObjectReference contains enough information to let you inspect or modify the referred object. +// +// swagger:model v1ObjectReference +type V1ObjectReference struct { + + // Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds + Kind string `json:"kind,omitempty"` + + // Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + Name string `json:"name,omitempty"` + + // UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids + UID string `json:"uid,omitempty"` +} + +// Validate validates this v1 object reference +func (m *V1ObjectReference) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1ObjectReference) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ObjectReference) UnmarshalBinary(b []byte) error { + var res V1ObjectReference + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_object_res_reference.go b/api/models/v1_object_res_reference.go new file mode 100644 index 00000000..6a5947ea --- /dev/null +++ b/api/models/v1_object_res_reference.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ObjectResReference Object resource reference +// +// swagger:model v1ObjectResReference +type V1ObjectResReference struct { + + // kind + Kind string `json:"kind,omitempty"` + + // name + Name string `json:"name,omitempty"` + + // project Uid + ProjectUID string `json:"projectUid,omitempty"` + + // tenant Uid + TenantUID string `json:"tenantUid,omitempty"` + + // uid + UID string `json:"uid,omitempty"` +} + +// Validate validates this v1 object res reference +func (m *V1ObjectResReference) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1ObjectResReference) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ObjectResReference) UnmarshalBinary(b []byte) error { + var res V1ObjectResReference + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_object_scope_entity.go b/api/models/v1_object_scope_entity.go new file mode 100644 index 00000000..4d5ff548 --- /dev/null +++ b/api/models/v1_object_scope_entity.go @@ -0,0 +1,49 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ObjectScopeEntity Object scope identity meta +// +// swagger:model v1ObjectScopeEntity +type V1ObjectScopeEntity struct { + + // name + Name string `json:"name,omitempty"` + + // scope + Scope string `json:"scope,omitempty"` + + // uid + UID string `json:"uid,omitempty"` +} + +// Validate validates this v1 object scope entity +func (m *V1ObjectScopeEntity) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1ObjectScopeEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ObjectScopeEntity) UnmarshalBinary(b []byte) error { + var res V1ObjectScopeEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_object_tags_entity.go b/api/models/v1_object_tags_entity.go new file mode 100644 index 00000000..b56f1996 --- /dev/null +++ b/api/models/v1_object_tags_entity.go @@ -0,0 +1,49 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ObjectTagsEntity Object identity meta with tags +// +// swagger:model v1ObjectTagsEntity +type V1ObjectTagsEntity struct { + + // labels + Labels map[string]string `json:"labels,omitempty"` + + // name + Name string `json:"name,omitempty"` + + // uid + UID string `json:"uid,omitempty"` +} + +// Validate validates this v1 object tags entity +func (m *V1ObjectTagsEntity) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1ObjectTagsEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ObjectTagsEntity) UnmarshalBinary(b []byte) error { + var res V1ObjectTagsEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_oci_image_registry.go b/api/models/v1_oci_image_registry.go new file mode 100644 index 00000000..ad2e7d58 --- /dev/null +++ b/api/models/v1_oci_image_registry.go @@ -0,0 +1,64 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1OciImageRegistry Oci Image Registry +// +// swagger:model v1OciImageRegistry +type V1OciImageRegistry struct { + + // baseContentPath is the root path for the registry content + BaseContentPath string `json:"baseContentPath,omitempty"` + + // ca cert + CaCert string `json:"caCert,omitempty"` + + // endpoint + Endpoint string `json:"endpoint,omitempty"` + + // insecure skip verify + InsecureSkipVerify bool `json:"insecureSkipVerify,omitempty"` + + // mirrorRegistries contains the array of image sources like gcr.io, ghcr.io, docker.io + MirrorRegistries string `json:"mirrorRegistries,omitempty"` + + // name + Name string `json:"name,omitempty"` + + // password + Password string `json:"password,omitempty"` + + // username + Username string `json:"username,omitempty"` +} + +// Validate validates this v1 oci image registry +func (m *V1OciImageRegistry) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1OciImageRegistry) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1OciImageRegistry) UnmarshalBinary(b []byte) error { + var res V1OciImageRegistry + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_oci_registries.go b/api/models/v1_oci_registries.go new file mode 100644 index 00000000..1745c903 --- /dev/null +++ b/api/models/v1_oci_registries.go @@ -0,0 +1,87 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1OciRegistries v1 oci registries +// +// swagger:model v1OciRegistries +type V1OciRegistries struct { + + // items + // Required: true + // Unique: true + Items []*V1OciRegistry `json:"items"` +} + +// Validate validates this v1 oci registries +func (m *V1OciRegistries) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateItems(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1OciRegistries) validateItems(formats strfmt.Registry) error { + + if err := validate.Required("items", "body", m.Items); err != nil { + return err + } + + if err := validate.UniqueItems("items", "body", m.Items); err != nil { + return err + } + + for i := 0; i < len(m.Items); i++ { + if swag.IsZero(m.Items[i]) { // not required + continue + } + + if m.Items[i] != nil { + if err := m.Items[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("items" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1OciRegistries) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1OciRegistries) UnmarshalBinary(b []byte) error { + var res V1OciRegistries + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_oci_registry.go b/api/models/v1_oci_registry.go new file mode 100644 index 00000000..09b45ec1 --- /dev/null +++ b/api/models/v1_oci_registry.go @@ -0,0 +1,121 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1OciRegistry Oci registry information +// +// swagger:model v1OciRegistry +type V1OciRegistry struct { + + // metadata + Metadata *V1ObjectMeta `json:"metadata,omitempty"` + + // spec + Spec *V1OciRegistrySpec `json:"spec,omitempty"` + + // status + Status *V1OciRegistryStatusSummary `json:"status,omitempty"` +} + +// Validate validates this v1 oci registry +func (m *V1OciRegistry) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSpec(formats); err != nil { + res = append(res, err) + } + + if err := m.validateStatus(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1OciRegistry) validateMetadata(formats strfmt.Registry) error { + + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } + return err + } + } + + return nil +} + +func (m *V1OciRegistry) validateSpec(formats strfmt.Registry) error { + + if swag.IsZero(m.Spec) { // not required + return nil + } + + if m.Spec != nil { + if err := m.Spec.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec") + } + return err + } + } + + return nil +} + +func (m *V1OciRegistry) validateStatus(formats strfmt.Registry) error { + + if swag.IsZero(m.Status) { // not required + return nil + } + + if m.Status != nil { + if err := m.Status.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("status") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1OciRegistry) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1OciRegistry) UnmarshalBinary(b []byte) error { + var res V1OciRegistry + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_oci_registry_entity.go b/api/models/v1_oci_registry_entity.go new file mode 100644 index 00000000..fcd02608 --- /dev/null +++ b/api/models/v1_oci_registry_entity.go @@ -0,0 +1,86 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1OciRegistryEntity Oci registry credentials +// +// swagger:model v1OciRegistryEntity +type V1OciRegistryEntity struct { + + // auth + Auth *V1RegistryAuth `json:"auth,omitempty"` + + // default region + DefaultRegion string `json:"defaultRegion,omitempty"` + + // endpoint + Endpoint string `json:"endpoint,omitempty"` + + // provider type + ProviderType string `json:"providerType,omitempty"` + + // scope + Scope string `json:"scope,omitempty"` + + // type + Type string `json:"type,omitempty"` +} + +// Validate validates this v1 oci registry entity +func (m *V1OciRegistryEntity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateAuth(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1OciRegistryEntity) validateAuth(formats strfmt.Registry) error { + + if swag.IsZero(m.Auth) { // not required + return nil + } + + if m.Auth != nil { + if err := m.Auth.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("auth") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1OciRegistryEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1OciRegistryEntity) UnmarshalBinary(b []byte) error { + var res V1OciRegistryEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_oci_registry_spec.go b/api/models/v1_oci_registry_spec.go new file mode 100644 index 00000000..55a76ff0 --- /dev/null +++ b/api/models/v1_oci_registry_spec.go @@ -0,0 +1,58 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1OciRegistrySpec Image registry spec +// +// swagger:model v1OciRegistrySpec +type V1OciRegistrySpec struct { + + // default region + DefaultRegion string `json:"defaultRegion,omitempty"` + + // endpoint + Endpoint string `json:"endpoint,omitempty"` + + // is private + IsPrivate bool `json:"isPrivate,omitempty"` + + // provider type + ProviderType string `json:"providerType,omitempty"` + + // registry type + RegistryType string `json:"registryType,omitempty"` + + // scope + Scope string `json:"scope,omitempty"` +} + +// Validate validates this v1 oci registry spec +func (m *V1OciRegistrySpec) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1OciRegistrySpec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1OciRegistrySpec) UnmarshalBinary(b []byte) error { + var res V1OciRegistrySpec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_oci_registry_status_summary.go b/api/models/v1_oci_registry_status_summary.go new file mode 100644 index 00000000..49e53e6a --- /dev/null +++ b/api/models/v1_oci_registry_status_summary.go @@ -0,0 +1,71 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1OciRegistryStatusSummary OCI registry status summary +// +// swagger:model v1OciRegistryStatusSummary +type V1OciRegistryStatusSummary struct { + + // sync + Sync *V1RegistrySyncStatus `json:"sync,omitempty"` +} + +// Validate validates this v1 oci registry status summary +func (m *V1OciRegistryStatusSummary) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateSync(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1OciRegistryStatusSummary) validateSync(formats strfmt.Registry) error { + + if swag.IsZero(m.Sync) { // not required + return nil + } + + if m.Sync != nil { + if err := m.Sync.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("sync") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1OciRegistryStatusSummary) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1OciRegistryStatusSummary) UnmarshalBinary(b []byte) error { + var res V1OciRegistryStatusSummary + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_oidc_issuer_tls.go b/api/models/v1_oidc_issuer_tls.go new file mode 100644 index 00000000..6c950f17 --- /dev/null +++ b/api/models/v1_oidc_issuer_tls.go @@ -0,0 +1,46 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1OidcIssuerTLS v1 oidc issuer Tls +// +// swagger:model v1OidcIssuerTls +type V1OidcIssuerTLS struct { + + // ca certificate base64 + CaCertificateBase64 string `json:"caCertificateBase64"` + + // insecure skip verify + InsecureSkipVerify *bool `json:"insecureSkipVerify"` +} + +// Validate validates this v1 oidc issuer Tls +func (m *V1OidcIssuerTLS) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1OidcIssuerTLS) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1OidcIssuerTLS) UnmarshalBinary(b []byte) error { + var res V1OidcIssuerTLS + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_open_stack_account.go b/api/models/v1_open_stack_account.go new file mode 100644 index 00000000..dc4cc5cd --- /dev/null +++ b/api/models/v1_open_stack_account.go @@ -0,0 +1,127 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1OpenStackAccount OpenStack account information +// +// swagger:model v1OpenStackAccount +type V1OpenStackAccount struct { + + // Cloud account api version + APIVersion string `json:"apiVersion,omitempty"` + + // Cloud account kind + Kind string `json:"kind,omitempty"` + + // metadata + Metadata *V1ObjectMeta `json:"metadata,omitempty"` + + // spec + Spec *V1OpenStackCloudAccount `json:"spec,omitempty"` + + // status + Status *V1CloudAccountStatus `json:"status,omitempty"` +} + +// Validate validates this v1 open stack account +func (m *V1OpenStackAccount) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSpec(formats); err != nil { + res = append(res, err) + } + + if err := m.validateStatus(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1OpenStackAccount) validateMetadata(formats strfmt.Registry) error { + + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } + return err + } + } + + return nil +} + +func (m *V1OpenStackAccount) validateSpec(formats strfmt.Registry) error { + + if swag.IsZero(m.Spec) { // not required + return nil + } + + if m.Spec != nil { + if err := m.Spec.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec") + } + return err + } + } + + return nil +} + +func (m *V1OpenStackAccount) validateStatus(formats strfmt.Registry) error { + + if swag.IsZero(m.Status) { // not required + return nil + } + + if m.Status != nil { + if err := m.Status.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("status") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1OpenStackAccount) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1OpenStackAccount) UnmarshalBinary(b []byte) error { + var res V1OpenStackAccount + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_open_stack_accounts.go b/api/models/v1_open_stack_accounts.go new file mode 100644 index 00000000..c333d56f --- /dev/null +++ b/api/models/v1_open_stack_accounts.go @@ -0,0 +1,112 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1OpenStackAccounts v1 open stack accounts +// +// swagger:model v1OpenStackAccounts +type V1OpenStackAccounts struct { + + // items + // Required: true + // Unique: true + Items []*V1OpenStackAccount `json:"items"` + + // listmeta + Listmeta *V1ListMetaData `json:"listmeta,omitempty"` +} + +// Validate validates this v1 open stack accounts +func (m *V1OpenStackAccounts) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateItems(formats); err != nil { + res = append(res, err) + } + + if err := m.validateListmeta(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1OpenStackAccounts) validateItems(formats strfmt.Registry) error { + + if err := validate.Required("items", "body", m.Items); err != nil { + return err + } + + if err := validate.UniqueItems("items", "body", m.Items); err != nil { + return err + } + + for i := 0; i < len(m.Items); i++ { + if swag.IsZero(m.Items[i]) { // not required + continue + } + + if m.Items[i] != nil { + if err := m.Items[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("items" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1OpenStackAccounts) validateListmeta(formats strfmt.Registry) error { + + if swag.IsZero(m.Listmeta) { // not required + return nil + } + + if m.Listmeta != nil { + if err := m.Listmeta.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("listmeta") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1OpenStackAccounts) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1OpenStackAccounts) UnmarshalBinary(b []byte) error { + var res V1OpenStackAccounts + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_open_stack_az.go b/api/models/v1_open_stack_az.go new file mode 100644 index 00000000..6c7c38fa --- /dev/null +++ b/api/models/v1_open_stack_az.go @@ -0,0 +1,43 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1OpenStackAz OpenStack az entity +// +// swagger:model v1OpenStackAz +type V1OpenStackAz struct { + + // Name of OpenStack az + Name string `json:"name,omitempty"` +} + +// Validate validates this v1 open stack az +func (m *V1OpenStackAz) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1OpenStackAz) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1OpenStackAz) UnmarshalBinary(b []byte) error { + var res V1OpenStackAz + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_open_stack_azs.go b/api/models/v1_open_stack_azs.go new file mode 100644 index 00000000..b6ac7f6d --- /dev/null +++ b/api/models/v1_open_stack_azs.go @@ -0,0 +1,87 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1OpenStackAzs List of OpenStack azs +// +// swagger:model v1OpenStackAzs +type V1OpenStackAzs struct { + + // azs + // Required: true + // Unique: true + Azs []*V1OpenStackAz `json:"azs"` +} + +// Validate validates this v1 open stack azs +func (m *V1OpenStackAzs) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateAzs(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1OpenStackAzs) validateAzs(formats strfmt.Registry) error { + + if err := validate.Required("azs", "body", m.Azs); err != nil { + return err + } + + if err := validate.UniqueItems("azs", "body", m.Azs); err != nil { + return err + } + + for i := 0; i < len(m.Azs); i++ { + if swag.IsZero(m.Azs[i]) { // not required + continue + } + + if m.Azs[i] != nil { + if err := m.Azs[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("azs" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1OpenStackAzs) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1OpenStackAzs) UnmarshalBinary(b []byte) error { + var res V1OpenStackAzs + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_open_stack_cloud_account.go b/api/models/v1_open_stack_cloud_account.go new file mode 100644 index 00000000..8440832e --- /dev/null +++ b/api/models/v1_open_stack_cloud_account.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1OpenStackCloudAccount auth-url,project,username,password,domain,cacert etc +// +// swagger:model v1OpenStackCloudAccount +type V1OpenStackCloudAccount struct { + + // Ca cert for OpenStack + CaCert string `json:"caCert,omitempty"` + + // Default Domain name + DefaultDomain string `json:"defaultDomain,omitempty"` + + // Default Project name + DefaultProject string `json:"defaultProject,omitempty"` + + // Identity endpoint for OpenStack + // Required: true + IdentityEndpoint *string `json:"identityEndpoint"` + + // For self signed certs in IdentityEndpoint + Insecure bool `json:"insecure,omitempty"` + + // Parent region of OpenStack + ParentRegion string `json:"parentRegion,omitempty"` + + // Password of OpenStack account + // Required: true + Password *string `json:"password"` + + // Username of OpenStack account + // Required: true + Username *string `json:"username"` +} + +// Validate validates this v1 open stack cloud account +func (m *V1OpenStackCloudAccount) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateIdentityEndpoint(formats); err != nil { + res = append(res, err) + } + + if err := m.validatePassword(formats); err != nil { + res = append(res, err) + } + + if err := m.validateUsername(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1OpenStackCloudAccount) validateIdentityEndpoint(formats strfmt.Registry) error { + + if err := validate.Required("identityEndpoint", "body", m.IdentityEndpoint); err != nil { + return err + } + + return nil +} + +func (m *V1OpenStackCloudAccount) validatePassword(formats strfmt.Registry) error { + + if err := validate.Required("password", "body", m.Password); err != nil { + return err + } + + return nil +} + +func (m *V1OpenStackCloudAccount) validateUsername(formats strfmt.Registry) error { + + if err := validate.Required("username", "body", m.Username); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1OpenStackCloudAccount) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1OpenStackCloudAccount) UnmarshalBinary(b []byte) error { + var res V1OpenStackCloudAccount + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_open_stack_cloud_cluster_config_entity.go b/api/models/v1_open_stack_cloud_cluster_config_entity.go new file mode 100644 index 00000000..0849c12b --- /dev/null +++ b/api/models/v1_open_stack_cloud_cluster_config_entity.go @@ -0,0 +1,71 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1OpenStackCloudClusterConfigEntity Openstack cloud cluster config entity +// +// swagger:model v1OpenStackCloudClusterConfigEntity +type V1OpenStackCloudClusterConfigEntity struct { + + // cluster config + ClusterConfig *V1OpenStackClusterConfig `json:"clusterConfig,omitempty"` +} + +// Validate validates this v1 open stack cloud cluster config entity +func (m *V1OpenStackCloudClusterConfigEntity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateClusterConfig(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1OpenStackCloudClusterConfigEntity) validateClusterConfig(formats strfmt.Registry) error { + + if swag.IsZero(m.ClusterConfig) { // not required + return nil + } + + if m.ClusterConfig != nil { + if err := m.ClusterConfig.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("clusterConfig") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1OpenStackCloudClusterConfigEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1OpenStackCloudClusterConfigEntity) UnmarshalBinary(b []byte) error { + var res V1OpenStackCloudClusterConfigEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_open_stack_cloud_config.go b/api/models/v1_open_stack_cloud_config.go new file mode 100644 index 00000000..df498329 --- /dev/null +++ b/api/models/v1_open_stack_cloud_config.go @@ -0,0 +1,127 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1OpenStackCloudConfig OpenStackCloudConfig is the Schema for the OpenStackcloudconfigs API +// +// swagger:model v1OpenStackCloudConfig +type V1OpenStackCloudConfig struct { + + // APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + APIVersion string `json:"apiVersion,omitempty"` + + // Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + Kind string `json:"kind,omitempty"` + + // metadata + Metadata *V1ObjectMeta `json:"metadata,omitempty"` + + // spec + Spec *V1OpenStackCloudConfigSpec `json:"spec,omitempty"` + + // status + Status *V1OpenStackCloudConfigStatus `json:"status,omitempty"` +} + +// Validate validates this v1 open stack cloud config +func (m *V1OpenStackCloudConfig) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSpec(formats); err != nil { + res = append(res, err) + } + + if err := m.validateStatus(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1OpenStackCloudConfig) validateMetadata(formats strfmt.Registry) error { + + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } + return err + } + } + + return nil +} + +func (m *V1OpenStackCloudConfig) validateSpec(formats strfmt.Registry) error { + + if swag.IsZero(m.Spec) { // not required + return nil + } + + if m.Spec != nil { + if err := m.Spec.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec") + } + return err + } + } + + return nil +} + +func (m *V1OpenStackCloudConfig) validateStatus(formats strfmt.Registry) error { + + if swag.IsZero(m.Status) { // not required + return nil + } + + if m.Status != nil { + if err := m.Status.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("status") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1OpenStackCloudConfig) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1OpenStackCloudConfig) UnmarshalBinary(b []byte) error { + var res V1OpenStackCloudConfig + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_open_stack_cloud_config_spec.go b/api/models/v1_open_stack_cloud_config_spec.go new file mode 100644 index 00000000..e45a756d --- /dev/null +++ b/api/models/v1_open_stack_cloud_config_spec.go @@ -0,0 +1,130 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1OpenStackCloudConfigSpec OpenStackCloudConfigSpec defines the cloud configuration input by user This will translate to clusterspec/machinespec for cluster-api +// +// swagger:model v1OpenStackCloudConfigSpec +type V1OpenStackCloudConfigSpec struct { + + // cloudAccountRef should point to the secret which contains OpenStackCloudAccount + CloudAccountRef *V1ObjectReference `json:"cloudAccountRef,omitempty"` + + // cluster config + ClusterConfig *V1OpenStackClusterConfig `json:"clusterConfig,omitempty"` + + // machine pool config + MachinePoolConfig []*V1OpenStackMachinePoolConfig `json:"machinePoolConfig"` +} + +// Validate validates this v1 open stack cloud config spec +func (m *V1OpenStackCloudConfigSpec) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateCloudAccountRef(formats); err != nil { + res = append(res, err) + } + + if err := m.validateClusterConfig(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMachinePoolConfig(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1OpenStackCloudConfigSpec) validateCloudAccountRef(formats strfmt.Registry) error { + + if swag.IsZero(m.CloudAccountRef) { // not required + return nil + } + + if m.CloudAccountRef != nil { + if err := m.CloudAccountRef.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("cloudAccountRef") + } + return err + } + } + + return nil +} + +func (m *V1OpenStackCloudConfigSpec) validateClusterConfig(formats strfmt.Registry) error { + + if swag.IsZero(m.ClusterConfig) { // not required + return nil + } + + if m.ClusterConfig != nil { + if err := m.ClusterConfig.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("clusterConfig") + } + return err + } + } + + return nil +} + +func (m *V1OpenStackCloudConfigSpec) validateMachinePoolConfig(formats strfmt.Registry) error { + + if swag.IsZero(m.MachinePoolConfig) { // not required + return nil + } + + for i := 0; i < len(m.MachinePoolConfig); i++ { + if swag.IsZero(m.MachinePoolConfig[i]) { // not required + continue + } + + if m.MachinePoolConfig[i] != nil { + if err := m.MachinePoolConfig[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("machinePoolConfig" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1OpenStackCloudConfigSpec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1OpenStackCloudConfigSpec) UnmarshalBinary(b []byte) error { + var res V1OpenStackCloudConfigSpec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_open_stack_cloud_config_status.go b/api/models/v1_open_stack_cloud_config_status.go new file mode 100644 index 00000000..35541887 --- /dev/null +++ b/api/models/v1_open_stack_cloud_config_status.go @@ -0,0 +1,89 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1OpenStackCloudConfigStatus OpenStackCloudConfigStatus defines the observed state of OpenStackCloudConfig The cloudimage info built by Mold is stored here image should be mapped to a specific machinepool +// +// swagger:model v1OpenStackCloudConfigStatus +type V1OpenStackCloudConfigStatus struct { + + // conditions + Conditions []*V1ClusterCondition `json:"conditions"` + + // node image + NodeImage string `json:"nodeImage,omitempty"` + + // sourceImageId, it can be from packref's annotations or from pack.json + SourceImageID string `json:"sourceImageId,omitempty"` + + // use capi image + UseCapiImage bool `json:"useCapiImage,omitempty"` +} + +// Validate validates this v1 open stack cloud config status +func (m *V1OpenStackCloudConfigStatus) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateConditions(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1OpenStackCloudConfigStatus) validateConditions(formats strfmt.Registry) error { + + if swag.IsZero(m.Conditions) { // not required + return nil + } + + for i := 0; i < len(m.Conditions); i++ { + if swag.IsZero(m.Conditions[i]) { // not required + continue + } + + if m.Conditions[i] != nil { + if err := m.Conditions[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("conditions" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1OpenStackCloudConfigStatus) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1OpenStackCloudConfigStatus) UnmarshalBinary(b []byte) error { + var res V1OpenStackCloudConfigStatus + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_open_stack_cluster_config.go b/api/models/v1_open_stack_cluster_config.go new file mode 100644 index 00000000..3978bf0c --- /dev/null +++ b/api/models/v1_open_stack_cluster_config.go @@ -0,0 +1,161 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1OpenStackClusterConfig Cluster level configuration for OpenStack cloud and applicable for all the machine pools +// +// swagger:model v1OpenStackClusterConfig +type V1OpenStackClusterConfig struct { + + // Create bastion node option we have earlier supported creation of bastion by default + BastionDisabled bool `json:"bastionDisabled,omitempty"` + + // DNSNameservers is the list of nameservers for OpenStack Subnet being created. Set this value when you need create a new network/subnet while the access through DNS is required. + DNSNameservers []string `json:"dnsNameservers"` + + // domain + Domain *V1OpenStackResource `json:"domain,omitempty"` + + // For static placement + Network *V1OpenStackResource `json:"network,omitempty"` + + // For dynamic provision NodeCIDR is the OpenStack Subnet to be created. Cluster actuator will create a network, a subnet with NodeCIDR, and a router connected to this subnet. If you leave this empty, no network will be created. + NodeCidr string `json:"nodeCidr,omitempty"` + + // project + Project *V1OpenStackResource `json:"project,omitempty"` + + // region + Region string `json:"region,omitempty"` + + // ssh key name + SSHKeyName string `json:"sshKeyName,omitempty"` + + // subnet + Subnet *V1OpenStackResource `json:"subnet,omitempty"` +} + +// Validate validates this v1 open stack cluster config +func (m *V1OpenStackClusterConfig) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateDomain(formats); err != nil { + res = append(res, err) + } + + if err := m.validateNetwork(formats); err != nil { + res = append(res, err) + } + + if err := m.validateProject(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSubnet(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1OpenStackClusterConfig) validateDomain(formats strfmt.Registry) error { + + if swag.IsZero(m.Domain) { // not required + return nil + } + + if m.Domain != nil { + if err := m.Domain.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("domain") + } + return err + } + } + + return nil +} + +func (m *V1OpenStackClusterConfig) validateNetwork(formats strfmt.Registry) error { + + if swag.IsZero(m.Network) { // not required + return nil + } + + if m.Network != nil { + if err := m.Network.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("network") + } + return err + } + } + + return nil +} + +func (m *V1OpenStackClusterConfig) validateProject(formats strfmt.Registry) error { + + if swag.IsZero(m.Project) { // not required + return nil + } + + if m.Project != nil { + if err := m.Project.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("project") + } + return err + } + } + + return nil +} + +func (m *V1OpenStackClusterConfig) validateSubnet(formats strfmt.Registry) error { + + if swag.IsZero(m.Subnet) { // not required + return nil + } + + if m.Subnet != nil { + if err := m.Subnet.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("subnet") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1OpenStackClusterConfig) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1OpenStackClusterConfig) UnmarshalBinary(b []byte) error { + var res V1OpenStackClusterConfig + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_open_stack_domain.go b/api/models/v1_open_stack_domain.go new file mode 100644 index 00000000..95b223b6 --- /dev/null +++ b/api/models/v1_open_stack_domain.go @@ -0,0 +1,49 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1OpenStackDomain OpenStack domain. A Domain is a collection of projects, users, and roles +// +// swagger:model v1OpenStackDomain +type V1OpenStackDomain struct { + + // Description is the description of the Domain + Description string `json:"description,omitempty"` + + // ID is the unique ID of the domain + ID string `json:"id,omitempty"` + + // Name is the name of the domain + Name string `json:"name,omitempty"` +} + +// Validate validates this v1 open stack domain +func (m *V1OpenStackDomain) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1OpenStackDomain) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1OpenStackDomain) UnmarshalBinary(b []byte) error { + var res V1OpenStackDomain + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_open_stack_flavor.go b/api/models/v1_open_stack_flavor.go new file mode 100644 index 00000000..09d594bd --- /dev/null +++ b/api/models/v1_open_stack_flavor.go @@ -0,0 +1,58 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1OpenStackFlavor OpenStack flavor entity. Flavor represent (virtual) hardware configurations for server resources +// +// swagger:model v1OpenStackFlavor +type V1OpenStackFlavor struct { + + // Disk is the amount of root disk, measured in GB + Disk int64 `json:"disk,omitempty"` + + // Ephemeral is the amount of ephemeral disk space, measured in GB + Ephemeral int64 `json:"ephemeral,omitempty"` + + // ID is the flavor's unique ID + ID string `json:"id,omitempty"` + + // Amount of memory, measured in MB + Memory int64 `json:"memory,omitempty"` + + // Name is the name of the flavor + Name string `json:"name,omitempty"` + + // VCPUs indicates how many (virtual) CPUs are available for this flavor + Vcpus int64 `json:"vcpus,omitempty"` +} + +// Validate validates this v1 open stack flavor +func (m *V1OpenStackFlavor) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1OpenStackFlavor) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1OpenStackFlavor) UnmarshalBinary(b []byte) error { + var res V1OpenStackFlavor + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_open_stack_flavors.go b/api/models/v1_open_stack_flavors.go new file mode 100644 index 00000000..306fb4a7 --- /dev/null +++ b/api/models/v1_open_stack_flavors.go @@ -0,0 +1,87 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1OpenStackFlavors List of OpenStack flavours +// +// swagger:model v1OpenStackFlavors +type V1OpenStackFlavors struct { + + // items + // Required: true + // Unique: true + Items []*V1OpenStackFlavor `json:"items"` +} + +// Validate validates this v1 open stack flavors +func (m *V1OpenStackFlavors) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateItems(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1OpenStackFlavors) validateItems(formats strfmt.Registry) error { + + if err := validate.Required("items", "body", m.Items); err != nil { + return err + } + + if err := validate.UniqueItems("items", "body", m.Items); err != nil { + return err + } + + for i := 0; i < len(m.Items); i++ { + if swag.IsZero(m.Items[i]) { // not required + continue + } + + if m.Items[i] != nil { + if err := m.Items[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("items" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1OpenStackFlavors) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1OpenStackFlavors) UnmarshalBinary(b []byte) error { + var res V1OpenStackFlavors + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_open_stack_keypair.go b/api/models/v1_open_stack_keypair.go new file mode 100644 index 00000000..bc76cc61 --- /dev/null +++ b/api/models/v1_open_stack_keypair.go @@ -0,0 +1,46 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1OpenStackKeypair OpenStack keypair. KeyPair is an SSH key known to the OpenStack Cloud that is available to be injected into servers +// +// swagger:model v1OpenStackKeypair +type V1OpenStackKeypair struct { + + // Name is used to refer to this keypair from other services within this region + Name string `json:"name,omitempty"` + + // PublicKey is the public key from this pair, in OpenSSH format + PublicKey string `json:"publicKey,omitempty"` +} + +// Validate validates this v1 open stack keypair +func (m *V1OpenStackKeypair) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1OpenStackKeypair) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1OpenStackKeypair) UnmarshalBinary(b []byte) error { + var res V1OpenStackKeypair + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_open_stack_keypairs.go b/api/models/v1_open_stack_keypairs.go new file mode 100644 index 00000000..f3f962f1 --- /dev/null +++ b/api/models/v1_open_stack_keypairs.go @@ -0,0 +1,87 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1OpenStackKeypairs List of OpenStack keypairs +// +// swagger:model v1OpenStackKeypairs +type V1OpenStackKeypairs struct { + + // items + // Required: true + // Unique: true + Items []*V1OpenStackKeypair `json:"items"` +} + +// Validate validates this v1 open stack keypairs +func (m *V1OpenStackKeypairs) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateItems(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1OpenStackKeypairs) validateItems(formats strfmt.Registry) error { + + if err := validate.Required("items", "body", m.Items); err != nil { + return err + } + + if err := validate.UniqueItems("items", "body", m.Items); err != nil { + return err + } + + for i := 0; i < len(m.Items); i++ { + if swag.IsZero(m.Items[i]) { // not required + continue + } + + if m.Items[i] != nil { + if err := m.Items[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("items" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1OpenStackKeypairs) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1OpenStackKeypairs) UnmarshalBinary(b []byte) error { + var res V1OpenStackKeypairs + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_open_stack_machine.go b/api/models/v1_open_stack_machine.go new file mode 100644 index 00000000..44908362 --- /dev/null +++ b/api/models/v1_open_stack_machine.go @@ -0,0 +1,127 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1OpenStackMachine OpenStack cloud VM definition +// +// swagger:model v1OpenStackMachine +type V1OpenStackMachine struct { + + // api version + APIVersion string `json:"apiVersion,omitempty"` + + // kind + Kind string `json:"kind,omitempty"` + + // metadata + Metadata *V1ObjectMeta `json:"metadata,omitempty"` + + // spec + Spec *V1OpenStackMachineSpec `json:"spec,omitempty"` + + // status + Status *V1CloudMachineStatus `json:"status,omitempty"` +} + +// Validate validates this v1 open stack machine +func (m *V1OpenStackMachine) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSpec(formats); err != nil { + res = append(res, err) + } + + if err := m.validateStatus(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1OpenStackMachine) validateMetadata(formats strfmt.Registry) error { + + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } + return err + } + } + + return nil +} + +func (m *V1OpenStackMachine) validateSpec(formats strfmt.Registry) error { + + if swag.IsZero(m.Spec) { // not required + return nil + } + + if m.Spec != nil { + if err := m.Spec.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec") + } + return err + } + } + + return nil +} + +func (m *V1OpenStackMachine) validateStatus(formats strfmt.Registry) error { + + if swag.IsZero(m.Status) { // not required + return nil + } + + if m.Status != nil { + if err := m.Status.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("status") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1OpenStackMachine) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1OpenStackMachine) UnmarshalBinary(b []byte) error { + var res V1OpenStackMachine + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_open_stack_machine_config_entity.go b/api/models/v1_open_stack_machine_config_entity.go new file mode 100644 index 00000000..6bac1894 --- /dev/null +++ b/api/models/v1_open_stack_machine_config_entity.go @@ -0,0 +1,76 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1OpenStackMachineConfigEntity v1 open stack machine config entity +// +// swagger:model v1OpenStackMachineConfigEntity +type V1OpenStackMachineConfigEntity struct { + + // for control plane pool, this will be the failure domains for kcp + Azs []string `json:"azs"` + + // flavor config + // Required: true + FlavorConfig *V1OpenstackFlavorConfig `json:"flavorConfig"` +} + +// Validate validates this v1 open stack machine config entity +func (m *V1OpenStackMachineConfigEntity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateFlavorConfig(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1OpenStackMachineConfigEntity) validateFlavorConfig(formats strfmt.Registry) error { + + if err := validate.Required("flavorConfig", "body", m.FlavorConfig); err != nil { + return err + } + + if m.FlavorConfig != nil { + if err := m.FlavorConfig.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("flavorConfig") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1OpenStackMachineConfigEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1OpenStackMachineConfigEntity) UnmarshalBinary(b []byte) error { + var res V1OpenStackMachineConfigEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_open_stack_machine_pool_cloud_config_entity.go b/api/models/v1_open_stack_machine_pool_cloud_config_entity.go new file mode 100644 index 00000000..f67cc733 --- /dev/null +++ b/api/models/v1_open_stack_machine_pool_cloud_config_entity.go @@ -0,0 +1,104 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1OpenStackMachinePoolCloudConfigEntity v1 open stack machine pool cloud config entity +// +// swagger:model v1OpenStackMachinePoolCloudConfigEntity +type V1OpenStackMachinePoolCloudConfigEntity struct { + + // for control plane pool, this will be the failure domains for kcp + Azs []string `json:"azs"` + + // Root disk size + DiskGiB int32 `json:"diskGiB,omitempty"` + + // flavor config + // Required: true + FlavorConfig *V1OpenstackFlavorConfig `json:"flavorConfig"` + + // subnet + Subnet *V1OpenStackResource `json:"subnet,omitempty"` +} + +// Validate validates this v1 open stack machine pool cloud config entity +func (m *V1OpenStackMachinePoolCloudConfigEntity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateFlavorConfig(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSubnet(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1OpenStackMachinePoolCloudConfigEntity) validateFlavorConfig(formats strfmt.Registry) error { + + if err := validate.Required("flavorConfig", "body", m.FlavorConfig); err != nil { + return err + } + + if m.FlavorConfig != nil { + if err := m.FlavorConfig.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("flavorConfig") + } + return err + } + } + + return nil +} + +func (m *V1OpenStackMachinePoolCloudConfigEntity) validateSubnet(formats strfmt.Registry) error { + + if swag.IsZero(m.Subnet) { // not required + return nil + } + + if m.Subnet != nil { + if err := m.Subnet.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("subnet") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1OpenStackMachinePoolCloudConfigEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1OpenStackMachinePoolCloudConfigEntity) UnmarshalBinary(b []byte) error { + var res V1OpenStackMachinePoolCloudConfigEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_open_stack_machine_pool_config.go b/api/models/v1_open_stack_machine_pool_config.go new file mode 100644 index 00000000..6b0e1694 --- /dev/null +++ b/api/models/v1_open_stack_machine_pool_config.go @@ -0,0 +1,229 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1OpenStackMachinePoolConfig v1 open stack machine pool config +// +// swagger:model v1OpenStackMachinePoolConfig +type V1OpenStackMachinePoolConfig struct { + + // additionalLabels + AdditionalLabels map[string]string `json:"additionalLabels,omitempty"` + + // AdditionalTags is an optional set of tags to add to resources managed by the provider, in addition to the ones added by default. For eg., tags for EKS nodeGroup or EKS NodegroupIAMRole + AdditionalTags map[string]string `json:"additionalTags,omitempty"` + + // for control plane pool, this will be the failure domains for kcp + Azs []string `json:"azs"` + + // DiskGiB is used to configure rootVolume, the volume metadata to boot from + DiskGiB int32 `json:"diskGiB,omitempty"` + + // Openstack flavor name, only return argument + Flavor string `json:"flavor,omitempty"` + + // Openstack flavor configuration, input argument + // Required: true + FlavorConfig *V1OpenstackFlavorConfig `json:"flavorConfig"` + + // image + Image string `json:"image,omitempty"` + + // whether this pool is for control plane + IsControlPlane bool `json:"isControlPlane,omitempty"` + + // labels for this pool, example: control-plane/worker, gpu, windows + Labels []string `json:"labels"` + + // machine pool properties + MachinePoolProperties *V1MachinePoolProperties `json:"machinePoolProperties,omitempty"` + + // max size of the pool, for scaling + MaxSize int32 `json:"maxSize,omitempty"` + + // min size of the pool, for scaling + MinSize int32 `json:"minSize,omitempty"` + + // name + Name string `json:"name,omitempty"` + + // Minimum number of seconds a node should be Ready, before the next node is selected for repave. Applicable only for workerpools in infrastructure cluster + NodeRepaveInterval int32 `json:"nodeRepaveInterval,omitempty"` + + // size of the pool, number of machines + Size int32 `json:"size,omitempty"` + + // subnet + Subnet *V1OpenStackResource `json:"subnet,omitempty"` + + // control plane or worker taints + // Unique: true + Taints []*V1Taint `json:"taints"` + + // rolling update strategy for this machinepool if not specified, will use ScaleOut + UpdateStrategy *V1UpdateStrategy `json:"updateStrategy,omitempty"` + + // if IsControlPlane==true && useControlPlaneAsWorker==true, then will remove control plane taint this will not be used for worker pools + UseControlPlaneAsWorker bool `json:"useControlPlaneAsWorker,omitempty"` +} + +// Validate validates this v1 open stack machine pool config +func (m *V1OpenStackMachinePoolConfig) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateFlavorConfig(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMachinePoolProperties(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSubnet(formats); err != nil { + res = append(res, err) + } + + if err := m.validateTaints(formats); err != nil { + res = append(res, err) + } + + if err := m.validateUpdateStrategy(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1OpenStackMachinePoolConfig) validateFlavorConfig(formats strfmt.Registry) error { + + if err := validate.Required("flavorConfig", "body", m.FlavorConfig); err != nil { + return err + } + + if m.FlavorConfig != nil { + if err := m.FlavorConfig.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("flavorConfig") + } + return err + } + } + + return nil +} + +func (m *V1OpenStackMachinePoolConfig) validateMachinePoolProperties(formats strfmt.Registry) error { + + if swag.IsZero(m.MachinePoolProperties) { // not required + return nil + } + + if m.MachinePoolProperties != nil { + if err := m.MachinePoolProperties.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("machinePoolProperties") + } + return err + } + } + + return nil +} + +func (m *V1OpenStackMachinePoolConfig) validateSubnet(formats strfmt.Registry) error { + + if swag.IsZero(m.Subnet) { // not required + return nil + } + + if m.Subnet != nil { + if err := m.Subnet.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("subnet") + } + return err + } + } + + return nil +} + +func (m *V1OpenStackMachinePoolConfig) validateTaints(formats strfmt.Registry) error { + + if swag.IsZero(m.Taints) { // not required + return nil + } + + if err := validate.UniqueItems("taints", "body", m.Taints); err != nil { + return err + } + + for i := 0; i < len(m.Taints); i++ { + if swag.IsZero(m.Taints[i]) { // not required + continue + } + + if m.Taints[i] != nil { + if err := m.Taints[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("taints" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1OpenStackMachinePoolConfig) validateUpdateStrategy(formats strfmt.Registry) error { + + if swag.IsZero(m.UpdateStrategy) { // not required + return nil + } + + if m.UpdateStrategy != nil { + if err := m.UpdateStrategy.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("updateStrategy") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1OpenStackMachinePoolConfig) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1OpenStackMachinePoolConfig) UnmarshalBinary(b []byte) error { + var res V1OpenStackMachinePoolConfig + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_open_stack_machine_pool_config_entity.go b/api/models/v1_open_stack_machine_pool_config_entity.go new file mode 100644 index 00000000..8357bba8 --- /dev/null +++ b/api/models/v1_open_stack_machine_pool_config_entity.go @@ -0,0 +1,98 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1OpenStackMachinePoolConfigEntity v1 open stack machine pool config entity +// +// swagger:model v1OpenStackMachinePoolConfigEntity +type V1OpenStackMachinePoolConfigEntity struct { + + // cloud config + // Required: true + CloudConfig *V1OpenStackMachinePoolCloudConfigEntity `json:"cloudConfig"` + + // pool config + PoolConfig *V1MachinePoolConfigEntity `json:"poolConfig,omitempty"` +} + +// Validate validates this v1 open stack machine pool config entity +func (m *V1OpenStackMachinePoolConfigEntity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateCloudConfig(formats); err != nil { + res = append(res, err) + } + + if err := m.validatePoolConfig(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1OpenStackMachinePoolConfigEntity) validateCloudConfig(formats strfmt.Registry) error { + + if err := validate.Required("cloudConfig", "body", m.CloudConfig); err != nil { + return err + } + + if m.CloudConfig != nil { + if err := m.CloudConfig.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("cloudConfig") + } + return err + } + } + + return nil +} + +func (m *V1OpenStackMachinePoolConfigEntity) validatePoolConfig(formats strfmt.Registry) error { + + if swag.IsZero(m.PoolConfig) { // not required + return nil + } + + if m.PoolConfig != nil { + if err := m.PoolConfig.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("poolConfig") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1OpenStackMachinePoolConfigEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1OpenStackMachinePoolConfigEntity) UnmarshalBinary(b []byte) error { + var res V1OpenStackMachinePoolConfigEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_open_stack_machine_spec.go b/api/models/v1_open_stack_machine_spec.go new file mode 100644 index 00000000..c5030715 --- /dev/null +++ b/api/models/v1_open_stack_machine_spec.go @@ -0,0 +1,123 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1OpenStackMachineSpec OpenStack cloud VM definition spec +// +// swagger:model v1OpenStackMachineSpec +type V1OpenStackMachineSpec struct { + + // az + Az string `json:"az,omitempty"` + + // image + Image string `json:"image,omitempty"` + + // Instance flavor of the machine with cpu and memory info + // Required: true + InstanceType *V1GenericInstanceType `json:"instanceType"` + + // nics + // Required: true + Nics []*V1OpenStackNic `json:"nics"` + + // project Id + ProjectID string `json:"projectId,omitempty"` + + // security groups + SecurityGroups []string `json:"securityGroups"` + + // ssh key name + SSHKeyName string `json:"sshKeyName,omitempty"` +} + +// Validate validates this v1 open stack machine spec +func (m *V1OpenStackMachineSpec) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateInstanceType(formats); err != nil { + res = append(res, err) + } + + if err := m.validateNics(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1OpenStackMachineSpec) validateInstanceType(formats strfmt.Registry) error { + + if err := validate.Required("instanceType", "body", m.InstanceType); err != nil { + return err + } + + if m.InstanceType != nil { + if err := m.InstanceType.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("instanceType") + } + return err + } + } + + return nil +} + +func (m *V1OpenStackMachineSpec) validateNics(formats strfmt.Registry) error { + + if err := validate.Required("nics", "body", m.Nics); err != nil { + return err + } + + for i := 0; i < len(m.Nics); i++ { + if swag.IsZero(m.Nics[i]) { // not required + continue + } + + if m.Nics[i] != nil { + if err := m.Nics[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("nics" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1OpenStackMachineSpec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1OpenStackMachineSpec) UnmarshalBinary(b []byte) error { + var res V1OpenStackMachineSpec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_open_stack_machines.go b/api/models/v1_open_stack_machines.go new file mode 100644 index 00000000..6edb71e9 --- /dev/null +++ b/api/models/v1_open_stack_machines.go @@ -0,0 +1,87 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1OpenStackMachines OpenStack machine list +// +// swagger:model v1OpenStackMachines +type V1OpenStackMachines struct { + + // items + // Required: true + // Unique: true + Items []*V1OpenStackMachine `json:"items"` +} + +// Validate validates this v1 open stack machines +func (m *V1OpenStackMachines) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateItems(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1OpenStackMachines) validateItems(formats strfmt.Registry) error { + + if err := validate.Required("items", "body", m.Items); err != nil { + return err + } + + if err := validate.UniqueItems("items", "body", m.Items); err != nil { + return err + } + + for i := 0; i < len(m.Items); i++ { + if swag.IsZero(m.Items[i]) { // not required + continue + } + + if m.Items[i] != nil { + if err := m.Items[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("items" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1OpenStackMachines) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1OpenStackMachines) UnmarshalBinary(b []byte) error { + var res V1OpenStackMachines + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_open_stack_network.go b/api/models/v1_open_stack_network.go new file mode 100644 index 00000000..65a2fe3b --- /dev/null +++ b/api/models/v1_open_stack_network.go @@ -0,0 +1,95 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1OpenStackNetwork OpenStack network +// +// swagger:model v1OpenStackNetwork +type V1OpenStackNetwork struct { + + // Description of OpenStack network + Description string `json:"description,omitempty"` + + // Id of OpenStack network + ID string `json:"id,omitempty"` + + // Name of OpenStack network + Name string `json:"name,omitempty"` + + // Subnets associated with OpenStack network + // Unique: true + Subnets []*V1OpenStackSubnet `json:"subnets"` +} + +// Validate validates this v1 open stack network +func (m *V1OpenStackNetwork) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateSubnets(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1OpenStackNetwork) validateSubnets(formats strfmt.Registry) error { + + if swag.IsZero(m.Subnets) { // not required + return nil + } + + if err := validate.UniqueItems("subnets", "body", m.Subnets); err != nil { + return err + } + + for i := 0; i < len(m.Subnets); i++ { + if swag.IsZero(m.Subnets[i]) { // not required + continue + } + + if m.Subnets[i] != nil { + if err := m.Subnets[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("subnets" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1OpenStackNetwork) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1OpenStackNetwork) UnmarshalBinary(b []byte) error { + var res V1OpenStackNetwork + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_open_stack_networks.go b/api/models/v1_open_stack_networks.go new file mode 100644 index 00000000..3541bcd3 --- /dev/null +++ b/api/models/v1_open_stack_networks.go @@ -0,0 +1,87 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1OpenStackNetworks List of OpenStack networks +// +// swagger:model v1OpenStackNetworks +type V1OpenStackNetworks struct { + + // items + // Required: true + // Unique: true + Items []*V1OpenStackNetwork `json:"items"` +} + +// Validate validates this v1 open stack networks +func (m *V1OpenStackNetworks) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateItems(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1OpenStackNetworks) validateItems(formats strfmt.Registry) error { + + if err := validate.Required("items", "body", m.Items); err != nil { + return err + } + + if err := validate.UniqueItems("items", "body", m.Items); err != nil { + return err + } + + for i := 0; i < len(m.Items); i++ { + if swag.IsZero(m.Items[i]) { // not required + continue + } + + if m.Items[i] != nil { + if err := m.Items[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("items" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1OpenStackNetworks) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1OpenStackNetworks) UnmarshalBinary(b []byte) error { + var res V1OpenStackNetworks + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_open_stack_nic.go b/api/models/v1_open_stack_nic.go new file mode 100644 index 00000000..435e8b11 --- /dev/null +++ b/api/models/v1_open_stack_nic.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1OpenStackNic OpenStack network interface +// +// swagger:model v1OpenStackNic +type V1OpenStackNic struct { + + // index + Index int8 `json:"index,omitempty"` + + // network name + // Required: true + NetworkName *string `json:"networkName"` + + // private i ps + PrivateIPs []string `json:"privateIPs"` +} + +// Validate validates this v1 open stack nic +func (m *V1OpenStackNic) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateNetworkName(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1OpenStackNic) validateNetworkName(formats strfmt.Registry) error { + + if err := validate.Required("networkName", "body", m.NetworkName); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1OpenStackNic) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1OpenStackNic) UnmarshalBinary(b []byte) error { + var res V1OpenStackNic + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_open_stack_project.go b/api/models/v1_open_stack_project.go new file mode 100644 index 00000000..85988f77 --- /dev/null +++ b/api/models/v1_open_stack_project.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1OpenStackProject Project represents an OpenStack Identity Project +// +// swagger:model v1OpenStackProject +type V1OpenStackProject struct { + + // Description is the description of the project + Description string `json:"description,omitempty"` + + // DomainID is the domain ID the project belongs to + DomainID string `json:"domainId,omitempty"` + + // ID is the unique ID of the project + ID string `json:"id,omitempty"` + + // Name is the name of the project + Name string `json:"name,omitempty"` + + // ParentID is the parent_id of the project + ParentProjectID string `json:"parentProjectId,omitempty"` +} + +// Validate validates this v1 open stack project +func (m *V1OpenStackProject) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1OpenStackProject) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1OpenStackProject) UnmarshalBinary(b []byte) error { + var res V1OpenStackProject + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_open_stack_projects.go b/api/models/v1_open_stack_projects.go new file mode 100644 index 00000000..adece9dc --- /dev/null +++ b/api/models/v1_open_stack_projects.go @@ -0,0 +1,87 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1OpenStackProjects Array of OpenStack projects +// +// swagger:model v1OpenStackProjects +type V1OpenStackProjects struct { + + // items + // Required: true + // Unique: true + Items []*V1OpenStackProject `json:"items"` +} + +// Validate validates this v1 open stack projects +func (m *V1OpenStackProjects) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateItems(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1OpenStackProjects) validateItems(formats strfmt.Registry) error { + + if err := validate.Required("items", "body", m.Items); err != nil { + return err + } + + if err := validate.UniqueItems("items", "body", m.Items); err != nil { + return err + } + + for i := 0; i < len(m.Items); i++ { + if swag.IsZero(m.Items[i]) { // not required + continue + } + + if m.Items[i] != nil { + if err := m.Items[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("items" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1OpenStackProjects) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1OpenStackProjects) UnmarshalBinary(b []byte) error { + var res V1OpenStackProjects + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_open_stack_region.go b/api/models/v1_open_stack_region.go new file mode 100644 index 00000000..d594ec48 --- /dev/null +++ b/api/models/v1_open_stack_region.go @@ -0,0 +1,49 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1OpenStackRegion OpenStack region entity +// +// swagger:model v1OpenStackRegion +type V1OpenStackRegion struct { + + // Description of OpenStack region + Description string `json:"description,omitempty"` + + // Id of OpenStack region + ID string `json:"id,omitempty"` + + // Parent region id of OpenStack region + ParentRegionID string `json:"parentRegionId,omitempty"` +} + +// Validate validates this v1 open stack region +func (m *V1OpenStackRegion) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1OpenStackRegion) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1OpenStackRegion) UnmarshalBinary(b []byte) error { + var res V1OpenStackRegion + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_open_stack_regions.go b/api/models/v1_open_stack_regions.go new file mode 100644 index 00000000..1451c436 --- /dev/null +++ b/api/models/v1_open_stack_regions.go @@ -0,0 +1,125 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1OpenStackRegions List of OpenStack regions and domains +// +// swagger:model v1OpenStackRegions +type V1OpenStackRegions struct { + + // List of OpenStack domains + // Required: true + // Unique: true + Domains []*V1OpenStackDomain `json:"domains"` + + // List of OpenStack regions + // Required: true + // Unique: true + Regions []*V1OpenStackRegion `json:"regions"` +} + +// Validate validates this v1 open stack regions +func (m *V1OpenStackRegions) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateDomains(formats); err != nil { + res = append(res, err) + } + + if err := m.validateRegions(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1OpenStackRegions) validateDomains(formats strfmt.Registry) error { + + if err := validate.Required("domains", "body", m.Domains); err != nil { + return err + } + + if err := validate.UniqueItems("domains", "body", m.Domains); err != nil { + return err + } + + for i := 0; i < len(m.Domains); i++ { + if swag.IsZero(m.Domains[i]) { // not required + continue + } + + if m.Domains[i] != nil { + if err := m.Domains[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("domains" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1OpenStackRegions) validateRegions(formats strfmt.Registry) error { + + if err := validate.Required("regions", "body", m.Regions); err != nil { + return err + } + + if err := validate.UniqueItems("regions", "body", m.Regions); err != nil { + return err + } + + for i := 0; i < len(m.Regions); i++ { + if swag.IsZero(m.Regions[i]) { // not required + continue + } + + if m.Regions[i] != nil { + if err := m.Regions[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("regions" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1OpenStackRegions) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1OpenStackRegions) UnmarshalBinary(b []byte) error { + var res V1OpenStackRegions + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_open_stack_resource.go b/api/models/v1_open_stack_resource.go new file mode 100644 index 00000000..c50b6313 --- /dev/null +++ b/api/models/v1_open_stack_resource.go @@ -0,0 +1,46 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1OpenStackResource v1 open stack resource +// +// swagger:model v1OpenStackResource +type V1OpenStackResource struct { + + // id + ID string `json:"id,omitempty"` + + // name + Name string `json:"name,omitempty"` +} + +// Validate validates this v1 open stack resource +func (m *V1OpenStackResource) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1OpenStackResource) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1OpenStackResource) UnmarshalBinary(b []byte) error { + var res V1OpenStackResource + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_open_stack_subnet.go b/api/models/v1_open_stack_subnet.go new file mode 100644 index 00000000..32848c4d --- /dev/null +++ b/api/models/v1_open_stack_subnet.go @@ -0,0 +1,49 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1OpenStackSubnet OpenStack subnet entity +// +// swagger:model v1OpenStackSubnet +type V1OpenStackSubnet struct { + + // Description for the network + Description string `json:"description,omitempty"` + + // UUID for the network + ID string `json:"id,omitempty"` + + // Human-readable name for the network. Might not be unique + Name string `json:"name,omitempty"` +} + +// Validate validates this v1 open stack subnet +func (m *V1OpenStackSubnet) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1OpenStackSubnet) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1OpenStackSubnet) UnmarshalBinary(b []byte) error { + var res V1OpenStackSubnet + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_openstack_flavor_config.go b/api/models/v1_openstack_flavor_config.go new file mode 100644 index 00000000..bcae1514 --- /dev/null +++ b/api/models/v1_openstack_flavor_config.go @@ -0,0 +1,73 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1OpenstackFlavorConfig v1 openstack flavor config +// +// swagger:model v1OpenstackFlavorConfig +type V1OpenstackFlavorConfig struct { + + // DiskGiB is the size of a virtual machine's disk, in GiB. + DiskGiB int32 `json:"diskGiB,omitempty"` + + // MemoryMiB is the size of a virtual machine's memory, in MiB. + MemoryMiB int64 `json:"memoryMiB,omitempty"` + + // Openstack flavor name + // Required: true + Name *string `json:"name"` + + // NumCPUs is the number of virtual processors in a virtual machine. + NumCPUs int32 `json:"numCPUs,omitempty"` +} + +// Validate validates this v1 openstack flavor config +func (m *V1OpenstackFlavorConfig) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateName(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1OpenstackFlavorConfig) validateName(formats strfmt.Registry) error { + + if err := validate.Required("name", "body", m.Name); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1OpenstackFlavorConfig) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1OpenstackFlavorConfig) UnmarshalBinary(b []byte) error { + var res V1OpenstackFlavorConfig + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_organization.go b/api/models/v1_organization.go new file mode 100644 index 00000000..32027e77 --- /dev/null +++ b/api/models/v1_organization.go @@ -0,0 +1,78 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1Organization Describes user's organization details +// +// swagger:model v1Organization +type V1Organization struct { + + // Describes user's enabled authorization mode + AuthType string `json:"authType,omitempty"` + + // Describes user's organization name + Name string `json:"name,omitempty"` + + // Describes user's organization authentication url + RedirectURL string `json:"redirectUrl,omitempty"` + + // Describes a list of allowed social logins for the organization + SsoLogins V1SsoLogins `json:"ssoLogins,omitempty"` +} + +// Validate validates this v1 organization +func (m *V1Organization) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateSsoLogins(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1Organization) validateSsoLogins(formats strfmt.Registry) error { + + if swag.IsZero(m.SsoLogins) { // not required + return nil + } + + if err := m.SsoLogins.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("ssoLogins") + } + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1Organization) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1Organization) UnmarshalBinary(b []byte) error { + var res V1Organization + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_organizations.go b/api/models/v1_organizations.go new file mode 100644 index 00000000..85f516a7 --- /dev/null +++ b/api/models/v1_organizations.go @@ -0,0 +1,86 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1Organizations Returns a list of user's organizations details and login methods +// +// swagger:model v1Organizations +type V1Organizations struct { + + // Describes a list of user's organization + // Unique: true + Organizations []*V1Organization `json:"organizations"` +} + +// Validate validates this v1 organizations +func (m *V1Organizations) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateOrganizations(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1Organizations) validateOrganizations(formats strfmt.Registry) error { + + if swag.IsZero(m.Organizations) { // not required + return nil + } + + if err := validate.UniqueItems("organizations", "body", m.Organizations); err != nil { + return err + } + + for i := 0; i < len(m.Organizations); i++ { + if swag.IsZero(m.Organizations[i]) { // not required + continue + } + + if m.Organizations[i] != nil { + if err := m.Organizations[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("organizations" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1Organizations) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1Organizations) UnmarshalBinary(b []byte) error { + var res V1Organizations + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_os_patch_config.go b/api/models/v1_os_patch_config.go new file mode 100644 index 00000000..24823ad9 --- /dev/null +++ b/api/models/v1_os_patch_config.go @@ -0,0 +1,79 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1OsPatchConfig v1 os patch config +// +// swagger:model v1OsPatchConfig +type V1OsPatchConfig struct { + + // OnDemandPatchAfter is the desired time for one time on-demand patch + // Format: date-time + OnDemandPatchAfter V1Time `json:"onDemandPatchAfter,omitempty"` + + // PatchOnBoot indicates need to do patch when node first boot up, only once + PatchOnBoot bool `json:"patchOnBoot"` + + // Reboot once the OS patch is applied + RebootIfRequired bool `json:"rebootIfRequired"` + + // The schedule at which security patches will be applied to OS. Schedule should be in Cron format, see https://en.wikipedia.org/wiki/Cron for more help. + Schedule string `json:"schedule,omitempty"` +} + +// Validate validates this v1 os patch config +func (m *V1OsPatchConfig) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateOnDemandPatchAfter(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1OsPatchConfig) validateOnDemandPatchAfter(formats strfmt.Registry) error { + + if swag.IsZero(m.OnDemandPatchAfter) { // not required + return nil + } + + if err := m.OnDemandPatchAfter.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("onDemandPatchAfter") + } + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1OsPatchConfig) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1OsPatchConfig) UnmarshalBinary(b []byte) error { + var res V1OsPatchConfig + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_os_patch_entity.go b/api/models/v1_os_patch_entity.go new file mode 100644 index 00000000..5b688663 --- /dev/null +++ b/api/models/v1_os_patch_entity.go @@ -0,0 +1,71 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1OsPatchEntity v1 os patch entity +// +// swagger:model v1OsPatchEntity +type V1OsPatchEntity struct { + + // os patch config + OsPatchConfig *V1OsPatchConfig `json:"osPatchConfig,omitempty"` +} + +// Validate validates this v1 os patch entity +func (m *V1OsPatchEntity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateOsPatchConfig(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1OsPatchEntity) validateOsPatchConfig(formats strfmt.Registry) error { + + if swag.IsZero(m.OsPatchConfig) { // not required + return nil + } + + if m.OsPatchConfig != nil { + if err := m.OsPatchConfig.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("osPatchConfig") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1OsPatchEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1OsPatchEntity) UnmarshalBinary(b []byte) error { + var res V1OsPatchEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_os_type.go b/api/models/v1_os_type.go new file mode 100644 index 00000000..3b03bb2f --- /dev/null +++ b/api/models/v1_os_type.go @@ -0,0 +1,63 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "encoding/json" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" +) + +// V1OsType v1 os type +// +// swagger:model v1OsType +type V1OsType string + +const ( + + // V1OsTypeLinux captures enum value "Linux" + V1OsTypeLinux V1OsType = "Linux" + + // V1OsTypeWindows captures enum value "Windows" + V1OsTypeWindows V1OsType = "Windows" +) + +// for schema +var v1OsTypeEnum []interface{} + +func init() { + var res []V1OsType + if err := json.Unmarshal([]byte(`["Linux","Windows"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + v1OsTypeEnum = append(v1OsTypeEnum, v) + } +} + +func (m V1OsType) validateV1OsTypeEnum(path, location string, value V1OsType) error { + if err := validate.EnumCase(path, location, value, v1OsTypeEnum, true); err != nil { + return err + } + return nil +} + +// Validate validates this v1 os type +func (m V1OsType) Validate(formats strfmt.Registry) error { + var res []error + + // value enum + if err := m.validateV1OsTypeEnum("", "body", m); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/models/v1_overload_spec.go b/api/models/v1_overload_spec.go new file mode 100644 index 00000000..b26098a0 --- /dev/null +++ b/api/models/v1_overload_spec.go @@ -0,0 +1,98 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1OverloadSpec Overload spec +// +// swagger:model v1OverloadSpec +type V1OverloadSpec struct { + + // cloud account Uid + CloudAccountUID string `json:"cloudAccountUid"` + + // ip address + IPAddress string `json:"ipAddress,omitempty"` + + // ip pools + IPPools []*V1IPPoolEntity `json:"ipPools"` + + // is self hosted + IsSelfHosted bool `json:"isSelfHosted,omitempty"` + + // is system + IsSystem bool `json:"isSystem,omitempty"` + + // spectro cluster Uid + SpectroClusterUID string `json:"spectroClusterUid"` + + // tenant Uid + TenantUID string `json:"tenantUid,omitempty"` +} + +// Validate validates this v1 overload spec +func (m *V1OverloadSpec) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateIPPools(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1OverloadSpec) validateIPPools(formats strfmt.Registry) error { + + if swag.IsZero(m.IPPools) { // not required + return nil + } + + for i := 0; i < len(m.IPPools); i++ { + if swag.IsZero(m.IPPools[i]) { // not required + continue + } + + if m.IPPools[i] != nil { + if err := m.IPPools[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("ipPools" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1OverloadSpec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1OverloadSpec) UnmarshalBinary(b []byte) error { + var res V1OverloadSpec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_overload_status.go b/api/models/v1_overload_status.go new file mode 100644 index 00000000..4072d65f --- /dev/null +++ b/api/models/v1_overload_status.go @@ -0,0 +1,127 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1OverloadStatus Overload status +// +// swagger:model v1OverloadStatus +type V1OverloadStatus struct { + + // health + Health *V1SpectroClusterHealthStatus `json:"health,omitempty"` + + // is active + IsActive bool `json:"isActive"` + + // is ready + IsReady bool `json:"isReady"` + + // kubectl commands + // Unique: true + KubectlCommands []string `json:"kubectlCommands"` + + // notifications + Notifications *V1ClusterNotificationStatus `json:"notifications,omitempty"` + + // state + State string `json:"state,omitempty"` +} + +// Validate validates this v1 overload status +func (m *V1OverloadStatus) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateHealth(formats); err != nil { + res = append(res, err) + } + + if err := m.validateKubectlCommands(formats); err != nil { + res = append(res, err) + } + + if err := m.validateNotifications(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1OverloadStatus) validateHealth(formats strfmt.Registry) error { + + if swag.IsZero(m.Health) { // not required + return nil + } + + if m.Health != nil { + if err := m.Health.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("health") + } + return err + } + } + + return nil +} + +func (m *V1OverloadStatus) validateKubectlCommands(formats strfmt.Registry) error { + + if swag.IsZero(m.KubectlCommands) { // not required + return nil + } + + if err := validate.UniqueItems("kubectlCommands", "body", m.KubectlCommands); err != nil { + return err + } + + return nil +} + +func (m *V1OverloadStatus) validateNotifications(formats strfmt.Registry) error { + + if swag.IsZero(m.Notifications) { // not required + return nil + } + + if m.Notifications != nil { + if err := m.Notifications.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("notifications") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1OverloadStatus) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1OverloadStatus) UnmarshalBinary(b []byte) error { + var res V1OverloadStatus + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_overload_vsphere_ova.go b/api/models/v1_overload_vsphere_ova.go new file mode 100644 index 00000000..1e9f44ea --- /dev/null +++ b/api/models/v1_overload_vsphere_ova.go @@ -0,0 +1,43 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1OverloadVsphereOva Overload ova details +// +// swagger:model v1OverloadVsphereOva +type V1OverloadVsphereOva struct { + + // location + Location string `json:"location"` +} + +// Validate validates this v1 overload vsphere ova +func (m *V1OverloadVsphereOva) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1OverloadVsphereOva) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1OverloadVsphereOva) UnmarshalBinary(b []byte) error { + var res V1OverloadVsphereOva + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_overlord.go b/api/models/v1_overlord.go new file mode 100644 index 00000000..0afb6ee3 --- /dev/null +++ b/api/models/v1_overlord.go @@ -0,0 +1,124 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1Overlord Overlord defintiion +// +// swagger:model v1Overlord +type V1Overlord struct { + + // kind + Kind string `json:"kind,omitempty"` + + // metadata + Metadata *V1ObjectMeta `json:"metadata,omitempty"` + + // spec + Spec *V1OverloadSpec `json:"spec,omitempty"` + + // status + Status *V1OverloadStatus `json:"status,omitempty"` +} + +// Validate validates this v1 overlord +func (m *V1Overlord) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSpec(formats); err != nil { + res = append(res, err) + } + + if err := m.validateStatus(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1Overlord) validateMetadata(formats strfmt.Registry) error { + + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } + return err + } + } + + return nil +} + +func (m *V1Overlord) validateSpec(formats strfmt.Registry) error { + + if swag.IsZero(m.Spec) { // not required + return nil + } + + if m.Spec != nil { + if err := m.Spec.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec") + } + return err + } + } + + return nil +} + +func (m *V1Overlord) validateStatus(formats strfmt.Registry) error { + + if swag.IsZero(m.Status) { // not required + return nil + } + + if m.Status != nil { + if err := m.Status.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("status") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1Overlord) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1Overlord) UnmarshalBinary(b []byte) error { + var res V1Overlord + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_overlord_maas_account_create.go b/api/models/v1_overlord_maas_account_create.go new file mode 100644 index 00000000..d41d4757 --- /dev/null +++ b/api/models/v1_overlord_maas_account_create.go @@ -0,0 +1,77 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1OverlordMaasAccountCreate v1 overlord maas account create +// +// swagger:model v1OverlordMaasAccountCreate +type V1OverlordMaasAccountCreate struct { + + // account + Account *V1MaasCloudAccount `json:"account,omitempty"` + + // Name for the private gateway & cloud account + Name string `json:"name,omitempty"` + + // share with projects + ShareWithProjects bool `json:"shareWithProjects"` +} + +// Validate validates this v1 overlord maas account create +func (m *V1OverlordMaasAccountCreate) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateAccount(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1OverlordMaasAccountCreate) validateAccount(formats strfmt.Registry) error { + + if swag.IsZero(m.Account) { // not required + return nil + } + + if m.Account != nil { + if err := m.Account.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("account") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1OverlordMaasAccountCreate) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1OverlordMaasAccountCreate) UnmarshalBinary(b []byte) error { + var res V1OverlordMaasAccountCreate + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_overlord_maas_account_entity.go b/api/models/v1_overlord_maas_account_entity.go new file mode 100644 index 00000000..00a03045 --- /dev/null +++ b/api/models/v1_overlord_maas_account_entity.go @@ -0,0 +1,74 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1OverlordMaasAccountEntity v1 overlord maas account entity +// +// swagger:model v1OverlordMaasAccountEntity +type V1OverlordMaasAccountEntity struct { + + // account + Account *V1MaasCloudAccount `json:"account,omitempty"` + + // share with projects + ShareWithProjects bool `json:"shareWithProjects"` +} + +// Validate validates this v1 overlord maas account entity +func (m *V1OverlordMaasAccountEntity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateAccount(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1OverlordMaasAccountEntity) validateAccount(formats strfmt.Registry) error { + + if swag.IsZero(m.Account) { // not required + return nil + } + + if m.Account != nil { + if err := m.Account.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("account") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1OverlordMaasAccountEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1OverlordMaasAccountEntity) UnmarshalBinary(b []byte) error { + var res V1OverlordMaasAccountEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_overlord_maas_cloud_config.go b/api/models/v1_overlord_maas_cloud_config.go new file mode 100644 index 00000000..3888361a --- /dev/null +++ b/api/models/v1_overlord_maas_cloud_config.go @@ -0,0 +1,158 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1OverlordMaasCloudConfig v1 overlord maas cloud config +// +// swagger:model v1OverlordMaasCloudConfig +type V1OverlordMaasCloudConfig struct { + + // cluster config + ClusterConfig *V1MaasClusterConfig `json:"clusterConfig,omitempty"` + + // Cluster profiles pack configuration for private gateway cluster + ClusterProfiles []*V1SpectroClusterProfileEntity `json:"clusterProfiles"` + + // clusterSettings is the generic configuration related to a cluster like OS patch, Rbac, Namespace allocation + ClusterSettings *V1ClusterConfigEntity `json:"clusterSettings,omitempty"` + + // machine config + MachineConfig *V1MaasMachineConfigEntity `json:"machineConfig,omitempty"` + + // size of the pool, number of machines + Size int32 `json:"size,omitempty"` +} + +// Validate validates this v1 overlord maas cloud config +func (m *V1OverlordMaasCloudConfig) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateClusterConfig(formats); err != nil { + res = append(res, err) + } + + if err := m.validateClusterProfiles(formats); err != nil { + res = append(res, err) + } + + if err := m.validateClusterSettings(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMachineConfig(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1OverlordMaasCloudConfig) validateClusterConfig(formats strfmt.Registry) error { + + if swag.IsZero(m.ClusterConfig) { // not required + return nil + } + + if m.ClusterConfig != nil { + if err := m.ClusterConfig.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("clusterConfig") + } + return err + } + } + + return nil +} + +func (m *V1OverlordMaasCloudConfig) validateClusterProfiles(formats strfmt.Registry) error { + + if swag.IsZero(m.ClusterProfiles) { // not required + return nil + } + + for i := 0; i < len(m.ClusterProfiles); i++ { + if swag.IsZero(m.ClusterProfiles[i]) { // not required + continue + } + + if m.ClusterProfiles[i] != nil { + if err := m.ClusterProfiles[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("clusterProfiles" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1OverlordMaasCloudConfig) validateClusterSettings(formats strfmt.Registry) error { + + if swag.IsZero(m.ClusterSettings) { // not required + return nil + } + + if m.ClusterSettings != nil { + if err := m.ClusterSettings.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("clusterSettings") + } + return err + } + } + + return nil +} + +func (m *V1OverlordMaasCloudConfig) validateMachineConfig(formats strfmt.Registry) error { + + if swag.IsZero(m.MachineConfig) { // not required + return nil + } + + if m.MachineConfig != nil { + if err := m.MachineConfig.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("machineConfig") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1OverlordMaasCloudConfig) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1OverlordMaasCloudConfig) UnmarshalBinary(b []byte) error { + var res V1OverlordMaasCloudConfig + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_overlord_manifest.go b/api/models/v1_overlord_manifest.go new file mode 100644 index 00000000..23015886 --- /dev/null +++ b/api/models/v1_overlord_manifest.go @@ -0,0 +1,43 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1OverlordManifest overlord manifest +// +// swagger:model v1OverlordManifest +type V1OverlordManifest struct { + + // manifest + Manifest string `json:"manifest,omitempty"` +} + +// Validate validates this v1 overlord manifest +func (m *V1OverlordManifest) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1OverlordManifest) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1OverlordManifest) UnmarshalBinary(b []byte) error { + var res V1OverlordManifest + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_overlord_migrate_entity.go b/api/models/v1_overlord_migrate_entity.go new file mode 100644 index 00000000..a54b48ac --- /dev/null +++ b/api/models/v1_overlord_migrate_entity.go @@ -0,0 +1,46 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1OverlordMigrateEntity v1 overlord migrate entity +// +// swagger:model v1OverlordMigrateEntity +type V1OverlordMigrateEntity struct { + + // source Uid + SourceUID string `json:"sourceUid,omitempty"` + + // target Uid + TargetUID string `json:"targetUid,omitempty"` +} + +// Validate validates this v1 overlord migrate entity +func (m *V1OverlordMigrateEntity) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1OverlordMigrateEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1OverlordMigrateEntity) UnmarshalBinary(b []byte) error { + var res V1OverlordMigrateEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_overlord_open_stack_account_create.go b/api/models/v1_overlord_open_stack_account_create.go new file mode 100644 index 00000000..1fae10b2 --- /dev/null +++ b/api/models/v1_overlord_open_stack_account_create.go @@ -0,0 +1,77 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1OverlordOpenStackAccountCreate v1 overlord open stack account create +// +// swagger:model v1OverlordOpenStackAccountCreate +type V1OverlordOpenStackAccountCreate struct { + + // account + Account *V1OpenStackCloudAccount `json:"account,omitempty"` + + // Name for the private gateway & cloud account + Name string `json:"name,omitempty"` + + // share with projects + ShareWithProjects bool `json:"shareWithProjects"` +} + +// Validate validates this v1 overlord open stack account create +func (m *V1OverlordOpenStackAccountCreate) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateAccount(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1OverlordOpenStackAccountCreate) validateAccount(formats strfmt.Registry) error { + + if swag.IsZero(m.Account) { // not required + return nil + } + + if m.Account != nil { + if err := m.Account.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("account") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1OverlordOpenStackAccountCreate) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1OverlordOpenStackAccountCreate) UnmarshalBinary(b []byte) error { + var res V1OverlordOpenStackAccountCreate + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_overlord_open_stack_account_entity.go b/api/models/v1_overlord_open_stack_account_entity.go new file mode 100644 index 00000000..46a1cfd2 --- /dev/null +++ b/api/models/v1_overlord_open_stack_account_entity.go @@ -0,0 +1,74 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1OverlordOpenStackAccountEntity v1 overlord open stack account entity +// +// swagger:model v1OverlordOpenStackAccountEntity +type V1OverlordOpenStackAccountEntity struct { + + // account + Account *V1OpenStackCloudAccount `json:"account,omitempty"` + + // share with projects + ShareWithProjects bool `json:"shareWithProjects"` +} + +// Validate validates this v1 overlord open stack account entity +func (m *V1OverlordOpenStackAccountEntity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateAccount(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1OverlordOpenStackAccountEntity) validateAccount(formats strfmt.Registry) error { + + if swag.IsZero(m.Account) { // not required + return nil + } + + if m.Account != nil { + if err := m.Account.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("account") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1OverlordOpenStackAccountEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1OverlordOpenStackAccountEntity) UnmarshalBinary(b []byte) error { + var res V1OverlordOpenStackAccountEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_overlord_open_stack_cloud_config.go b/api/models/v1_overlord_open_stack_cloud_config.go new file mode 100644 index 00000000..0253ef03 --- /dev/null +++ b/api/models/v1_overlord_open_stack_cloud_config.go @@ -0,0 +1,158 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1OverlordOpenStackCloudConfig v1 overlord open stack cloud config +// +// swagger:model v1OverlordOpenStackCloudConfig +type V1OverlordOpenStackCloudConfig struct { + + // cluster config + ClusterConfig *V1OpenStackClusterConfig `json:"clusterConfig,omitempty"` + + // Cluster profiles pack configuration for private gateway cluster + ClusterProfiles []*V1SpectroClusterProfileEntity `json:"clusterProfiles"` + + // clusterSettings is the generic configuration related to a cluster like OS patch, Rbac, Namespace allocation + ClusterSettings *V1ClusterConfigEntity `json:"clusterSettings,omitempty"` + + // machine config + MachineConfig *V1OpenStackMachineConfigEntity `json:"machineConfig,omitempty"` + + // size of the pool, number of machines + Size int32 `json:"size,omitempty"` +} + +// Validate validates this v1 overlord open stack cloud config +func (m *V1OverlordOpenStackCloudConfig) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateClusterConfig(formats); err != nil { + res = append(res, err) + } + + if err := m.validateClusterProfiles(formats); err != nil { + res = append(res, err) + } + + if err := m.validateClusterSettings(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMachineConfig(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1OverlordOpenStackCloudConfig) validateClusterConfig(formats strfmt.Registry) error { + + if swag.IsZero(m.ClusterConfig) { // not required + return nil + } + + if m.ClusterConfig != nil { + if err := m.ClusterConfig.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("clusterConfig") + } + return err + } + } + + return nil +} + +func (m *V1OverlordOpenStackCloudConfig) validateClusterProfiles(formats strfmt.Registry) error { + + if swag.IsZero(m.ClusterProfiles) { // not required + return nil + } + + for i := 0; i < len(m.ClusterProfiles); i++ { + if swag.IsZero(m.ClusterProfiles[i]) { // not required + continue + } + + if m.ClusterProfiles[i] != nil { + if err := m.ClusterProfiles[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("clusterProfiles" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1OverlordOpenStackCloudConfig) validateClusterSettings(formats strfmt.Registry) error { + + if swag.IsZero(m.ClusterSettings) { // not required + return nil + } + + if m.ClusterSettings != nil { + if err := m.ClusterSettings.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("clusterSettings") + } + return err + } + } + + return nil +} + +func (m *V1OverlordOpenStackCloudConfig) validateMachineConfig(formats strfmt.Registry) error { + + if swag.IsZero(m.MachineConfig) { // not required + return nil + } + + if m.MachineConfig != nil { + if err := m.MachineConfig.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("machineConfig") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1OverlordOpenStackCloudConfig) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1OverlordOpenStackCloudConfig) UnmarshalBinary(b []byte) error { + var res V1OverlordOpenStackCloudConfig + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_overlord_vsphere_account_create.go b/api/models/v1_overlord_vsphere_account_create.go new file mode 100644 index 00000000..022aab52 --- /dev/null +++ b/api/models/v1_overlord_vsphere_account_create.go @@ -0,0 +1,77 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1OverlordVsphereAccountCreate v1 overlord vsphere account create +// +// swagger:model v1OverlordVsphereAccountCreate +type V1OverlordVsphereAccountCreate struct { + + // account + Account *V1VsphereCloudAccount `json:"account,omitempty"` + + // Name for the private gateway & cloud account + Name string `json:"name,omitempty"` + + // share with projects + ShareWithProjects bool `json:"shareWithProjects"` +} + +// Validate validates this v1 overlord vsphere account create +func (m *V1OverlordVsphereAccountCreate) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateAccount(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1OverlordVsphereAccountCreate) validateAccount(formats strfmt.Registry) error { + + if swag.IsZero(m.Account) { // not required + return nil + } + + if m.Account != nil { + if err := m.Account.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("account") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1OverlordVsphereAccountCreate) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1OverlordVsphereAccountCreate) UnmarshalBinary(b []byte) error { + var res V1OverlordVsphereAccountCreate + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_overlord_vsphere_account_entity.go b/api/models/v1_overlord_vsphere_account_entity.go new file mode 100644 index 00000000..0b40a4ea --- /dev/null +++ b/api/models/v1_overlord_vsphere_account_entity.go @@ -0,0 +1,74 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1OverlordVsphereAccountEntity v1 overlord vsphere account entity +// +// swagger:model v1OverlordVsphereAccountEntity +type V1OverlordVsphereAccountEntity struct { + + // account + Account *V1VsphereCloudAccount `json:"account,omitempty"` + + // share with projects + ShareWithProjects bool `json:"shareWithProjects"` +} + +// Validate validates this v1 overlord vsphere account entity +func (m *V1OverlordVsphereAccountEntity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateAccount(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1OverlordVsphereAccountEntity) validateAccount(formats strfmt.Registry) error { + + if swag.IsZero(m.Account) { // not required + return nil + } + + if m.Account != nil { + if err := m.Account.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("account") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1OverlordVsphereAccountEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1OverlordVsphereAccountEntity) UnmarshalBinary(b []byte) error { + var res V1OverlordVsphereAccountEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_overlord_vsphere_cloud_config.go b/api/models/v1_overlord_vsphere_cloud_config.go new file mode 100644 index 00000000..42458be9 --- /dev/null +++ b/api/models/v1_overlord_vsphere_cloud_config.go @@ -0,0 +1,133 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1OverlordVsphereCloudConfig v1 overlord vsphere cloud config +// +// swagger:model v1OverlordVsphereCloudConfig +type V1OverlordVsphereCloudConfig struct { + + // cluster config + ClusterConfig *V1VsphereOverlordClusterConfigEntity `json:"clusterConfig,omitempty"` + + // Cluster profiles pack configuration for private gateway cluster + ClusterProfiles []*V1SpectroClusterProfileEntity `json:"clusterProfiles"` + + // clusterSettings is the generic configuration related to a cluster like OS patch, Rbac, Namespace allocation + ClusterSettings *V1ClusterConfigEntity `json:"clusterSettings,omitempty"` + + // size of the pool, number of machines + Size int32 `json:"size,omitempty"` +} + +// Validate validates this v1 overlord vsphere cloud config +func (m *V1OverlordVsphereCloudConfig) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateClusterConfig(formats); err != nil { + res = append(res, err) + } + + if err := m.validateClusterProfiles(formats); err != nil { + res = append(res, err) + } + + if err := m.validateClusterSettings(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1OverlordVsphereCloudConfig) validateClusterConfig(formats strfmt.Registry) error { + + if swag.IsZero(m.ClusterConfig) { // not required + return nil + } + + if m.ClusterConfig != nil { + if err := m.ClusterConfig.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("clusterConfig") + } + return err + } + } + + return nil +} + +func (m *V1OverlordVsphereCloudConfig) validateClusterProfiles(formats strfmt.Registry) error { + + if swag.IsZero(m.ClusterProfiles) { // not required + return nil + } + + for i := 0; i < len(m.ClusterProfiles); i++ { + if swag.IsZero(m.ClusterProfiles[i]) { // not required + continue + } + + if m.ClusterProfiles[i] != nil { + if err := m.ClusterProfiles[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("clusterProfiles" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1OverlordVsphereCloudConfig) validateClusterSettings(formats strfmt.Registry) error { + + if swag.IsZero(m.ClusterSettings) { // not required + return nil + } + + if m.ClusterSettings != nil { + if err := m.ClusterSettings.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("clusterSettings") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1OverlordVsphereCloudConfig) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1OverlordVsphereCloudConfig) UnmarshalBinary(b []byte) error { + var res V1OverlordVsphereCloudConfig + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_overlords.go b/api/models/v1_overlords.go new file mode 100644 index 00000000..4b7ea0e4 --- /dev/null +++ b/api/models/v1_overlords.go @@ -0,0 +1,87 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1Overlords Array of Overlords +// +// swagger:model v1Overlords +type V1Overlords struct { + + // items + // Required: true + // Unique: true + Items []*V1Overlord `json:"items"` +} + +// Validate validates this v1 overlords +func (m *V1Overlords) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateItems(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1Overlords) validateItems(formats strfmt.Registry) error { + + if err := validate.Required("items", "body", m.Items); err != nil { + return err + } + + if err := validate.UniqueItems("items", "body", m.Items); err != nil { + return err + } + + for i := 0; i < len(m.Items); i++ { + if swag.IsZero(m.Items[i]) { // not required + continue + } + + if m.Items[i] != nil { + if err := m.Items[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("items" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1Overlords) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1Overlords) UnmarshalBinary(b []byte) error { + var res V1Overlords + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_pack_config.go b/api/models/v1_pack_config.go new file mode 100644 index 00000000..ea47fcb1 --- /dev/null +++ b/api/models/v1_pack_config.go @@ -0,0 +1,71 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1PackConfig Pack configuration +// +// swagger:model v1PackConfig +type V1PackConfig struct { + + // spec + Spec *V1PackConfigSpec `json:"spec,omitempty"` +} + +// Validate validates this v1 pack config +func (m *V1PackConfig) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateSpec(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1PackConfig) validateSpec(formats strfmt.Registry) error { + + if swag.IsZero(m.Spec) { // not required + return nil + } + + if m.Spec != nil { + if err := m.Spec.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1PackConfig) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1PackConfig) UnmarshalBinary(b []byte) error { + var res V1PackConfig + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_pack_config_spec.go b/api/models/v1_pack_config_spec.go new file mode 100644 index 00000000..303dd931 --- /dev/null +++ b/api/models/v1_pack_config_spec.go @@ -0,0 +1,107 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1PackConfigSpec v1 pack config spec +// +// swagger:model v1PackConfigSpec +type V1PackConfigSpec struct { + + // associated object + AssociatedObject string `json:"associatedObject,omitempty"` + + // is values overridden + IsValuesOverridden bool `json:"isValuesOverridden"` + + // manifests + Manifests []*V1PackManifestRef `json:"manifests"` + + // name + Name string `json:"name,omitempty"` + + // pack Uid + PackUID string `json:"packUid,omitempty"` + + // scope + Scope string `json:"scope,omitempty"` + + // tag + Tag string `json:"tag,omitempty"` + + // type + Type string `json:"type,omitempty"` + + // values + Values string `json:"values,omitempty"` + + // version + Version string `json:"version,omitempty"` +} + +// Validate validates this v1 pack config spec +func (m *V1PackConfigSpec) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateManifests(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1PackConfigSpec) validateManifests(formats strfmt.Registry) error { + + if swag.IsZero(m.Manifests) { // not required + return nil + } + + for i := 0; i < len(m.Manifests); i++ { + if swag.IsZero(m.Manifests[i]) { // not required + continue + } + + if m.Manifests[i] != nil { + if err := m.Manifests[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("manifests" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1PackConfigSpec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1PackConfigSpec) UnmarshalBinary(b []byte) error { + var res V1PackConfigSpec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_pack_dependency.go b/api/models/v1_pack_dependency.go new file mode 100644 index 00000000..e2ed72a5 --- /dev/null +++ b/api/models/v1_pack_dependency.go @@ -0,0 +1,49 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1PackDependency Pack template dependency +// +// swagger:model v1PackDependency +type V1PackDependency struct { + + // Pack template dependency pack layer + Layer string `json:"layer,omitempty"` + + // Pack template dependency pack name + Name string `json:"name,omitempty"` + + // If true then dependency pack values can't be overridden + ReadOnly bool `json:"readOnly,omitempty"` +} + +// Validate validates this v1 pack dependency +func (m *V1PackDependency) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1PackDependency) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1PackDependency) UnmarshalBinary(b []byte) error { + var res V1PackDependency + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_pack_dependency_meta.go b/api/models/v1_pack_dependency_meta.go new file mode 100644 index 00000000..a6575f74 --- /dev/null +++ b/api/models/v1_pack_dependency_meta.go @@ -0,0 +1,58 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1PackDependencyMeta Pack dependency metadata +// +// swagger:model v1PackDependencyMeta +type V1PackDependencyMeta struct { + + // Pack display name + DisplayName string `json:"displayName,omitempty"` + + // Pack logo url + LogoURL string `json:"logoUrl,omitempty"` + + // Pack name + Name string `json:"name,omitempty"` + + // Pack registry uid + RegistryUID string `json:"registryUid,omitempty"` + + // Pack uid + UID string `json:"uid,omitempty"` + + // Pack version + Version string `json:"version,omitempty"` +} + +// Validate validates this v1 pack dependency meta +func (m *V1PackDependencyMeta) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1PackDependencyMeta) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1PackDependencyMeta) UnmarshalBinary(b []byte) error { + var res V1PackDependencyMeta + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_pack_entity.go b/api/models/v1_pack_entity.go new file mode 100644 index 00000000..9e9d5703 --- /dev/null +++ b/api/models/v1_pack_entity.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1PackEntity Pack object +// +// swagger:model v1PackEntity +type V1PackEntity struct { + + // Pack layer + Layer string `json:"layer,omitempty"` + + // Pack name + // Required: true + Name *string `json:"name"` + + // Pack tag + Tag string `json:"tag,omitempty"` + + // type + Type V1PackType `json:"type,omitempty"` + + // Pack uid + // Required: true + UID *string `json:"uid"` + + // values represents the values.yaml used as input parameters either Params OR Values should be used, not both If both applied at the same time, will only use Values + Values string `json:"values,omitempty"` +} + +// Validate validates this v1 pack entity +func (m *V1PackEntity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateName(formats); err != nil { + res = append(res, err) + } + + if err := m.validateType(formats); err != nil { + res = append(res, err) + } + + if err := m.validateUID(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1PackEntity) validateName(formats strfmt.Registry) error { + + if err := validate.Required("name", "body", m.Name); err != nil { + return err + } + + return nil +} + +func (m *V1PackEntity) validateType(formats strfmt.Registry) error { + + if swag.IsZero(m.Type) { // not required + return nil + } + + if err := m.Type.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("type") + } + return err + } + + return nil +} + +func (m *V1PackEntity) validateUID(formats strfmt.Registry) error { + + if err := validate.Required("uid", "body", m.UID); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1PackEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1PackEntity) UnmarshalBinary(b []byte) error { + var res V1PackEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_pack_filter_spec.go b/api/models/v1_pack_filter_spec.go new file mode 100644 index 00000000..12dd14af --- /dev/null +++ b/api/models/v1_pack_filter_spec.go @@ -0,0 +1,292 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1PackFilterSpec Packs filter spec +// +// swagger:model v1PackFilterSpec +type V1PackFilterSpec struct { + + // Pack add-on sub type such as monitoring, db etc + // Unique: true + AddOnSubType []string `json:"addOnSubType"` + + // Pack add-on type such as logging, monitoring, security etc + // Unique: true + AddOnType []string `json:"addOnType"` + + // display name + DisplayName *V1FilterString `json:"displayName,omitempty"` + + // Pack supported cloud types + // Unique: true + Environment []string `json:"environment"` + + // isFips compliant + IsFips bool `json:"isFips,omitempty"` + + // Pack layer + // Unique: true + Layer []V1PackLayer `json:"layer"` + + // name + Name *V1FilterString `json:"name,omitempty"` + + // Pack registry uid + // Unique: true + RegistryUID []string `json:"registryUid"` + + // The source filter describes the creation origin/source of the pack. Ex. source can be "spectrocloud" or "community" + // Unique: true + Source []string `json:"source"` + + // Pack state such as deprecated or disabled + // Unique: true + State []string `json:"state"` + + // Pack type + // Unique: true + Type []V1PackType `json:"type"` +} + +// Validate validates this v1 pack filter spec +func (m *V1PackFilterSpec) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateAddOnSubType(formats); err != nil { + res = append(res, err) + } + + if err := m.validateAddOnType(formats); err != nil { + res = append(res, err) + } + + if err := m.validateDisplayName(formats); err != nil { + res = append(res, err) + } + + if err := m.validateEnvironment(formats); err != nil { + res = append(res, err) + } + + if err := m.validateLayer(formats); err != nil { + res = append(res, err) + } + + if err := m.validateName(formats); err != nil { + res = append(res, err) + } + + if err := m.validateRegistryUID(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSource(formats); err != nil { + res = append(res, err) + } + + if err := m.validateState(formats); err != nil { + res = append(res, err) + } + + if err := m.validateType(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1PackFilterSpec) validateAddOnSubType(formats strfmt.Registry) error { + + if swag.IsZero(m.AddOnSubType) { // not required + return nil + } + + if err := validate.UniqueItems("addOnSubType", "body", m.AddOnSubType); err != nil { + return err + } + + return nil +} + +func (m *V1PackFilterSpec) validateAddOnType(formats strfmt.Registry) error { + + if swag.IsZero(m.AddOnType) { // not required + return nil + } + + if err := validate.UniqueItems("addOnType", "body", m.AddOnType); err != nil { + return err + } + + return nil +} + +func (m *V1PackFilterSpec) validateDisplayName(formats strfmt.Registry) error { + + if swag.IsZero(m.DisplayName) { // not required + return nil + } + + if m.DisplayName != nil { + if err := m.DisplayName.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("displayName") + } + return err + } + } + + return nil +} + +func (m *V1PackFilterSpec) validateEnvironment(formats strfmt.Registry) error { + + if swag.IsZero(m.Environment) { // not required + return nil + } + + if err := validate.UniqueItems("environment", "body", m.Environment); err != nil { + return err + } + + return nil +} + +func (m *V1PackFilterSpec) validateLayer(formats strfmt.Registry) error { + + if swag.IsZero(m.Layer) { // not required + return nil + } + + if err := validate.UniqueItems("layer", "body", m.Layer); err != nil { + return err + } + + for i := 0; i < len(m.Layer); i++ { + + if err := m.Layer[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("layer" + "." + strconv.Itoa(i)) + } + return err + } + + } + + return nil +} + +func (m *V1PackFilterSpec) validateName(formats strfmt.Registry) error { + + if swag.IsZero(m.Name) { // not required + return nil + } + + if m.Name != nil { + if err := m.Name.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("name") + } + return err + } + } + + return nil +} + +func (m *V1PackFilterSpec) validateRegistryUID(formats strfmt.Registry) error { + + if swag.IsZero(m.RegistryUID) { // not required + return nil + } + + if err := validate.UniqueItems("registryUid", "body", m.RegistryUID); err != nil { + return err + } + + return nil +} + +func (m *V1PackFilterSpec) validateSource(formats strfmt.Registry) error { + + if swag.IsZero(m.Source) { // not required + return nil + } + + if err := validate.UniqueItems("source", "body", m.Source); err != nil { + return err + } + + return nil +} + +func (m *V1PackFilterSpec) validateState(formats strfmt.Registry) error { + + if swag.IsZero(m.State) { // not required + return nil + } + + if err := validate.UniqueItems("state", "body", m.State); err != nil { + return err + } + + return nil +} + +func (m *V1PackFilterSpec) validateType(formats strfmt.Registry) error { + + if swag.IsZero(m.Type) { // not required + return nil + } + + if err := validate.UniqueItems("type", "body", m.Type); err != nil { + return err + } + + for i := 0; i < len(m.Type); i++ { + + if err := m.Type[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("type" + "." + strconv.Itoa(i)) + } + return err + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1PackFilterSpec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1PackFilterSpec) UnmarshalBinary(b []byte) error { + var res V1PackFilterSpec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_pack_import_entity.go b/api/models/v1_pack_import_entity.go new file mode 100644 index 00000000..bf42fef0 --- /dev/null +++ b/api/models/v1_pack_import_entity.go @@ -0,0 +1,123 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1PackImportEntity Pack import request payload +// +// swagger:model v1PackImportEntity +type V1PackImportEntity struct { + + // Pack layer [ "os", "k8s", "cni", "csi", "addon" ] + Layer string `json:"layer,omitempty"` + + // Pack manifests array + Manifests []*V1PackManifestImportEntity `json:"manifests"` + + // Pack name + Name string `json:"name,omitempty"` + + // registry + Registry *V1PackRegistryImportEntity `json:"registry,omitempty"` + + // Pack version tag + Tag string `json:"tag,omitempty"` + + // Pack type [ "spectro", "helm", "manifest", "oci" ] + Type string `json:"type,omitempty"` + + // Pack values are the customizable configurations for the pack + Values string `json:"values,omitempty"` + + // Pack version + Version string `json:"version,omitempty"` +} + +// Validate validates this v1 pack import entity +func (m *V1PackImportEntity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateManifests(formats); err != nil { + res = append(res, err) + } + + if err := m.validateRegistry(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1PackImportEntity) validateManifests(formats strfmt.Registry) error { + + if swag.IsZero(m.Manifests) { // not required + return nil + } + + for i := 0; i < len(m.Manifests); i++ { + if swag.IsZero(m.Manifests[i]) { // not required + continue + } + + if m.Manifests[i] != nil { + if err := m.Manifests[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("manifests" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1PackImportEntity) validateRegistry(formats strfmt.Registry) error { + + if swag.IsZero(m.Registry) { // not required + return nil + } + + if m.Registry != nil { + if err := m.Registry.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("registry") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1PackImportEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1PackImportEntity) UnmarshalBinary(b []byte) error { + var res V1PackImportEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_pack_input_entity.go b/api/models/v1_pack_input_entity.go new file mode 100644 index 00000000..0ad508ef --- /dev/null +++ b/api/models/v1_pack_input_entity.go @@ -0,0 +1,71 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1PackInputEntity Pack request payload +// +// swagger:model v1PackInputEntity +type V1PackInputEntity struct { + + // pack + Pack *V1PackManifestEntity `json:"pack,omitempty"` +} + +// Validate validates this v1 pack input entity +func (m *V1PackInputEntity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validatePack(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1PackInputEntity) validatePack(formats strfmt.Registry) error { + + if swag.IsZero(m.Pack) { // not required + return nil + } + + if m.Pack != nil { + if err := m.Pack.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("pack") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1PackInputEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1PackInputEntity) UnmarshalBinary(b []byte) error { + var res V1PackInputEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_pack_layer.go b/api/models/v1_pack_layer.go new file mode 100644 index 00000000..0a69199f --- /dev/null +++ b/api/models/v1_pack_layer.go @@ -0,0 +1,75 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "encoding/json" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" +) + +// V1PackLayer v1 pack layer +// +// swagger:model v1PackLayer +type V1PackLayer string + +const ( + + // V1PackLayerKernel captures enum value "kernel" + V1PackLayerKernel V1PackLayer = "kernel" + + // V1PackLayerOs captures enum value "os" + V1PackLayerOs V1PackLayer = "os" + + // V1PackLayerK8s captures enum value "k8s" + V1PackLayerK8s V1PackLayer = "k8s" + + // V1PackLayerCni captures enum value "cni" + V1PackLayerCni V1PackLayer = "cni" + + // V1PackLayerCsi captures enum value "csi" + V1PackLayerCsi V1PackLayer = "csi" + + // V1PackLayerAddon captures enum value "addon" + V1PackLayerAddon V1PackLayer = "addon" +) + +// for schema +var v1PackLayerEnum []interface{} + +func init() { + var res []V1PackLayer + if err := json.Unmarshal([]byte(`["kernel","os","k8s","cni","csi","addon"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + v1PackLayerEnum = append(v1PackLayerEnum, v) + } +} + +func (m V1PackLayer) validateV1PackLayerEnum(path, location string, value V1PackLayer) error { + if err := validate.EnumCase(path, location, value, v1PackLayerEnum, true); err != nil { + return err + } + return nil +} + +// Validate validates this v1 pack layer +func (m V1PackLayer) Validate(formats strfmt.Registry) error { + var res []error + + // value enum + if err := m.validateV1PackLayerEnum("", "body", m); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/models/v1_pack_manifest_entity.go b/api/models/v1_pack_manifest_entity.go new file mode 100644 index 00000000..7a4b7e0d --- /dev/null +++ b/api/models/v1_pack_manifest_entity.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1PackManifestEntity Pack request payload +// +// swagger:model v1PackManifestEntity +type V1PackManifestEntity struct { + + // Pack layer + Layer string `json:"layer,omitempty"` + + // Pack manifests are additional content as part of the profile + Manifests []*V1ManifestInputEntity `json:"manifests"` + + // Pack name + // Required: true + Name *string `json:"name"` + + // Pack registry uid + RegistryUID string `json:"registryUid,omitempty"` + + // Pack tag + Tag string `json:"tag,omitempty"` + + // type + Type V1PackType `json:"type,omitempty"` + + // Pack uid + UID string `json:"uid,omitempty"` + + // Pack values represents the values.yaml used as input parameters either Params OR Values should be used, not both If both applied at the same time, will only use Values + Values string `json:"values,omitempty"` +} + +// Validate validates this v1 pack manifest entity +func (m *V1PackManifestEntity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateManifests(formats); err != nil { + res = append(res, err) + } + + if err := m.validateName(formats); err != nil { + res = append(res, err) + } + + if err := m.validateType(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1PackManifestEntity) validateManifests(formats strfmt.Registry) error { + + if swag.IsZero(m.Manifests) { // not required + return nil + } + + for i := 0; i < len(m.Manifests); i++ { + if swag.IsZero(m.Manifests[i]) { // not required + continue + } + + if m.Manifests[i] != nil { + if err := m.Manifests[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("manifests" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1PackManifestEntity) validateName(formats strfmt.Registry) error { + + if err := validate.Required("name", "body", m.Name); err != nil { + return err + } + + return nil +} + +func (m *V1PackManifestEntity) validateType(formats strfmt.Registry) error { + + if swag.IsZero(m.Type) { // not required + return nil + } + + if err := m.Type.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("type") + } + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1PackManifestEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1PackManifestEntity) UnmarshalBinary(b []byte) error { + var res V1PackManifestEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_pack_manifest_import_entity.go b/api/models/v1_pack_manifest_import_entity.go new file mode 100644 index 00000000..8259f30d --- /dev/null +++ b/api/models/v1_pack_manifest_import_entity.go @@ -0,0 +1,46 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1PackManifestImportEntity Pack manifest import objct +// +// swagger:model v1PackManifestImportEntity +type V1PackManifestImportEntity struct { + + // Pack manifest content in yaml + Content string `json:"content,omitempty"` + + // Pack manifest name + Name string `json:"name,omitempty"` +} + +// Validate validates this v1 pack manifest import entity +func (m *V1PackManifestImportEntity) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1PackManifestImportEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1PackManifestImportEntity) UnmarshalBinary(b []byte) error { + var res V1PackManifestImportEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_pack_manifest_ref.go b/api/models/v1_pack_manifest_ref.go new file mode 100644 index 00000000..b000a02f --- /dev/null +++ b/api/models/v1_pack_manifest_ref.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1PackManifestRef v1 pack manifest ref +// +// swagger:model v1PackManifestRef +type V1PackManifestRef struct { + + // digest + Digest string `json:"digest,omitempty"` + + // is overridden + IsOverridden bool `json:"isOverridden"` + + // name + Name string `json:"name,omitempty"` + + // parent Uid + ParentUID string `json:"parentUid,omitempty"` + + // uid + UID string `json:"uid,omitempty"` +} + +// Validate validates this v1 pack manifest ref +func (m *V1PackManifestRef) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1PackManifestRef) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1PackManifestRef) UnmarshalBinary(b []byte) error { + var res V1PackManifestRef + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_pack_manifest_update_entity.go b/api/models/v1_pack_manifest_update_entity.go new file mode 100644 index 00000000..357ec135 --- /dev/null +++ b/api/models/v1_pack_manifest_update_entity.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1PackManifestUpdateEntity Pack input entity with values to overwrite and manifests for the intial creation +// +// swagger:model v1PackManifestUpdateEntity +type V1PackManifestUpdateEntity struct { + + // Pack layer + Layer string `json:"layer,omitempty"` + + // Pack manifests are additional content as part of the profile + Manifests []*V1ManifestRefUpdateEntity `json:"manifests"` + + // Pack name + // Required: true + Name *string `json:"name"` + + // Pack registry uid + RegistryUID string `json:"registryUid,omitempty"` + + // Pack tag + Tag string `json:"tag,omitempty"` + + // type + Type V1PackType `json:"type,omitempty"` + + // Pack uid + UID string `json:"uid,omitempty"` + + // Pack values represents the values.yaml used as input parameters either Params OR Values should be used, not both If both applied at the same time, will only use Values + Values string `json:"values,omitempty"` +} + +// Validate validates this v1 pack manifest update entity +func (m *V1PackManifestUpdateEntity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateManifests(formats); err != nil { + res = append(res, err) + } + + if err := m.validateName(formats); err != nil { + res = append(res, err) + } + + if err := m.validateType(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1PackManifestUpdateEntity) validateManifests(formats strfmt.Registry) error { + + if swag.IsZero(m.Manifests) { // not required + return nil + } + + for i := 0; i < len(m.Manifests); i++ { + if swag.IsZero(m.Manifests[i]) { // not required + continue + } + + if m.Manifests[i] != nil { + if err := m.Manifests[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("manifests" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1PackManifestUpdateEntity) validateName(formats strfmt.Registry) error { + + if err := validate.Required("name", "body", m.Name); err != nil { + return err + } + + return nil +} + +func (m *V1PackManifestUpdateEntity) validateType(formats strfmt.Registry) error { + + if swag.IsZero(m.Type) { // not required + return nil + } + + if err := m.Type.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("type") + } + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1PackManifestUpdateEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1PackManifestUpdateEntity) UnmarshalBinary(b []byte) error { + var res V1PackManifestUpdateEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_pack_manifests.go b/api/models/v1_pack_manifests.go new file mode 100644 index 00000000..b968aa53 --- /dev/null +++ b/api/models/v1_pack_manifests.go @@ -0,0 +1,87 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1PackManifests v1 pack manifests +// +// swagger:model v1PackManifests +type V1PackManifests struct { + + // Manifests array + // Required: true + // Unique: true + Items []*V1Manifest `json:"items"` +} + +// Validate validates this v1 pack manifests +func (m *V1PackManifests) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateItems(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1PackManifests) validateItems(formats strfmt.Registry) error { + + if err := validate.Required("items", "body", m.Items); err != nil { + return err + } + + if err := validate.UniqueItems("items", "body", m.Items); err != nil { + return err + } + + for i := 0; i < len(m.Items); i++ { + if swag.IsZero(m.Items[i]) { // not required + continue + } + + if m.Items[i] != nil { + if err := m.Items[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("items" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1PackManifests) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1PackManifests) UnmarshalBinary(b []byte) error { + var res V1PackManifests + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_pack_manifests_spec.go b/api/models/v1_pack_manifests_spec.go new file mode 100644 index 00000000..6d04cc35 --- /dev/null +++ b/api/models/v1_pack_manifests_spec.go @@ -0,0 +1,226 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1PackManifestsSpec Pack manifests spec +// +// swagger:model v1PackManifestsSpec +type V1PackManifestsSpec struct { + + // Pack add-on type such as logging, monitoring, security etc + AddonType string `json:"addonType,omitempty"` + + // Pack annotations is used to allow pack to add more arbitrary configurations + Annotations map[string]string `json:"annotations,omitempty"` + + // Pack supported cloud types + CloudTypes []string `json:"cloudTypes"` + + // Pack digest + Digest string `json:"digest,omitempty"` + + // Pack display name + DisplayName string `json:"displayName,omitempty"` + + // Pack end of life, date format: yyyy-MM-dd + Eol string `json:"eol,omitempty"` + + // Pack group + Group string `json:"group,omitempty"` + + // layer + Layer V1PackLayer `json:"layer,omitempty"` + + // Pack logo url + LogoURL string `json:"logoUrl,omitempty"` + + // Pack manifests are additional content as part of the cluster profile + Manifests []*V1ManifestSummary `json:"manifests"` + + // Pack name + Name string `json:"name,omitempty"` + + // Pack presets are the set of configurations applied on user selection of presets + Presets []*V1PackPreset `json:"presets"` + + // Pack registry uid + RegistryUID string `json:"registryUid,omitempty"` + + // Pack schema contains constraints such as data type, format, hints for the pack values + Schema []*V1PackSchema `json:"schema"` + + // type + Type V1PackType `json:"type,omitempty"` + + // Pack values + Values string `json:"values,omitempty"` + + // Pack version + Version string `json:"version,omitempty"` +} + +// Validate validates this v1 pack manifests spec +func (m *V1PackManifestsSpec) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateLayer(formats); err != nil { + res = append(res, err) + } + + if err := m.validateManifests(formats); err != nil { + res = append(res, err) + } + + if err := m.validatePresets(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSchema(formats); err != nil { + res = append(res, err) + } + + if err := m.validateType(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1PackManifestsSpec) validateLayer(formats strfmt.Registry) error { + + if swag.IsZero(m.Layer) { // not required + return nil + } + + if err := m.Layer.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("layer") + } + return err + } + + return nil +} + +func (m *V1PackManifestsSpec) validateManifests(formats strfmt.Registry) error { + + if swag.IsZero(m.Manifests) { // not required + return nil + } + + for i := 0; i < len(m.Manifests); i++ { + if swag.IsZero(m.Manifests[i]) { // not required + continue + } + + if m.Manifests[i] != nil { + if err := m.Manifests[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("manifests" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1PackManifestsSpec) validatePresets(formats strfmt.Registry) error { + + if swag.IsZero(m.Presets) { // not required + return nil + } + + for i := 0; i < len(m.Presets); i++ { + if swag.IsZero(m.Presets[i]) { // not required + continue + } + + if m.Presets[i] != nil { + if err := m.Presets[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("presets" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1PackManifestsSpec) validateSchema(formats strfmt.Registry) error { + + if swag.IsZero(m.Schema) { // not required + return nil + } + + for i := 0; i < len(m.Schema); i++ { + if swag.IsZero(m.Schema[i]) { // not required + continue + } + + if m.Schema[i] != nil { + if err := m.Schema[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("schema" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1PackManifestsSpec) validateType(formats strfmt.Registry) error { + + if swag.IsZero(m.Type) { // not required + return nil + } + + if err := m.Type.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("type") + } + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1PackManifestsSpec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1PackManifestsSpec) UnmarshalBinary(b []byte) error { + var res V1PackManifestsSpec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_pack_metadata.go b/api/models/v1_pack_metadata.go new file mode 100644 index 00000000..181d1814 --- /dev/null +++ b/api/models/v1_pack_metadata.go @@ -0,0 +1,102 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1PackMetadata Pack metadata object +// +// swagger:model v1PackMetadata +type V1PackMetadata struct { + + // Pack api version + APIVersion string `json:"apiVersion,omitempty"` + + // Pack kind + Kind string `json:"kind,omitempty"` + + // metadata + Metadata *V1ObjectMeta `json:"metadata,omitempty"` + + // spec + Spec *V1PackMetadataSpec `json:"spec,omitempty"` +} + +// Validate validates this v1 pack metadata +func (m *V1PackMetadata) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSpec(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1PackMetadata) validateMetadata(formats strfmt.Registry) error { + + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } + return err + } + } + + return nil +} + +func (m *V1PackMetadata) validateSpec(formats strfmt.Registry) error { + + if swag.IsZero(m.Spec) { // not required + return nil + } + + if m.Spec != nil { + if err := m.Spec.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1PackMetadata) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1PackMetadata) UnmarshalBinary(b []byte) error { + var res V1PackMetadata + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_pack_metadata_list.go b/api/models/v1_pack_metadata_list.go new file mode 100644 index 00000000..479713c4 --- /dev/null +++ b/api/models/v1_pack_metadata_list.go @@ -0,0 +1,112 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1PackMetadataList List of packs metadata +// +// swagger:model v1PackMetadataList +type V1PackMetadataList struct { + + // Packs metadata array + // Required: true + // Unique: true + Items []*V1PackMetadata `json:"items"` + + // listmeta + Listmeta *V1ListMetaData `json:"listmeta,omitempty"` +} + +// Validate validates this v1 pack metadata list +func (m *V1PackMetadataList) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateItems(formats); err != nil { + res = append(res, err) + } + + if err := m.validateListmeta(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1PackMetadataList) validateItems(formats strfmt.Registry) error { + + if err := validate.Required("items", "body", m.Items); err != nil { + return err + } + + if err := validate.UniqueItems("items", "body", m.Items); err != nil { + return err + } + + for i := 0; i < len(m.Items); i++ { + if swag.IsZero(m.Items[i]) { // not required + continue + } + + if m.Items[i] != nil { + if err := m.Items[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("items" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1PackMetadataList) validateListmeta(formats strfmt.Registry) error { + + if swag.IsZero(m.Listmeta) { // not required + return nil + } + + if m.Listmeta != nil { + if err := m.Listmeta.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("listmeta") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1PackMetadataList) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1PackMetadataList) UnmarshalBinary(b []byte) error { + var res V1PackMetadataList + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_pack_metadata_spec.go b/api/models/v1_pack_metadata_spec.go new file mode 100644 index 00000000..87dd8d4d --- /dev/null +++ b/api/models/v1_pack_metadata_spec.go @@ -0,0 +1,144 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1PackMetadataSpec Pack metadata spec +// +// swagger:model v1PackMetadataSpec +type V1PackMetadataSpec struct { + + // Pack add-on sub type such as monitoring, db etc + AddonSubType string `json:"addonSubType,omitempty"` + + // Pack add-on type such as logging, monitoring, security etc + AddonType string `json:"addonType,omitempty"` + + // Pack supported cloud types + CloudTypes []string `json:"cloudTypes"` + + // Pack display name + DisplayName string `json:"displayName,omitempty"` + + // Pack group + Group string `json:"group,omitempty"` + + // layer + Layer V1PackLayer `json:"layer,omitempty"` + + // Pack name + Name string `json:"name,omitempty"` + + // Pack registries array + Registries []*V1RegistryPackMetadata `json:"registries"` + + // type + Type V1PackType `json:"type,omitempty"` +} + +// Validate validates this v1 pack metadata spec +func (m *V1PackMetadataSpec) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateLayer(formats); err != nil { + res = append(res, err) + } + + if err := m.validateRegistries(formats); err != nil { + res = append(res, err) + } + + if err := m.validateType(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1PackMetadataSpec) validateLayer(formats strfmt.Registry) error { + + if swag.IsZero(m.Layer) { // not required + return nil + } + + if err := m.Layer.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("layer") + } + return err + } + + return nil +} + +func (m *V1PackMetadataSpec) validateRegistries(formats strfmt.Registry) error { + + if swag.IsZero(m.Registries) { // not required + return nil + } + + for i := 0; i < len(m.Registries); i++ { + if swag.IsZero(m.Registries[i]) { // not required + continue + } + + if m.Registries[i] != nil { + if err := m.Registries[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("registries" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1PackMetadataSpec) validateType(formats strfmt.Registry) error { + + if swag.IsZero(m.Type) { // not required + return nil + } + + if err := m.Type.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("type") + } + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1PackMetadataSpec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1PackMetadataSpec) UnmarshalBinary(b []byte) error { + var res V1PackMetadataSpec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_pack_params_entity.go b/api/models/v1_pack_params_entity.go new file mode 100644 index 00000000..230a50ec --- /dev/null +++ b/api/models/v1_pack_params_entity.go @@ -0,0 +1,68 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1PackParamsEntity Pack params request payload +// +// swagger:model v1PackParamsEntity +type V1PackParamsEntity struct { + + // references + // Unique: true + References []string `json:"references"` +} + +// Validate validates this v1 pack params entity +func (m *V1PackParamsEntity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateReferences(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1PackParamsEntity) validateReferences(formats strfmt.Registry) error { + + if swag.IsZero(m.References) { // not required + return nil + } + + if err := validate.UniqueItems("references", "body", m.References); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1PackParamsEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1PackParamsEntity) UnmarshalBinary(b []byte) error { + var res V1PackParamsEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_pack_preset.go b/api/models/v1_pack_preset.go new file mode 100644 index 00000000..ccc722d8 --- /dev/null +++ b/api/models/v1_pack_preset.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1PackPreset PackPreset defines the preset pack values +// +// swagger:model v1PackPreset +type V1PackPreset struct { + + // add + Add string `json:"add"` + + // display name + DisplayName string `json:"displayName"` + + // group + Group string `json:"group"` + + // name + Name string `json:"name"` + + // remove + Remove []string `json:"remove"` +} + +// Validate validates this v1 pack preset +func (m *V1PackPreset) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1PackPreset) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1PackPreset) UnmarshalBinary(b []byte) error { + var res V1PackPreset + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_pack_readme.go b/api/models/v1_pack_readme.go new file mode 100644 index 00000000..05fdfbfb --- /dev/null +++ b/api/models/v1_pack_readme.go @@ -0,0 +1,43 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1PackReadme v1 pack readme +// +// swagger:model v1PackReadme +type V1PackReadme struct { + + // Readme describes the documentation of the specified pack + Readme string `json:"readme,omitempty"` +} + +// Validate validates this v1 pack readme +func (m *V1PackReadme) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1PackReadme) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1PackReadme) UnmarshalBinary(b []byte) error { + var res V1PackReadme + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_pack_ref.go b/api/models/v1_pack_ref.go new file mode 100644 index 00000000..3da6b84d --- /dev/null +++ b/api/models/v1_pack_ref.go @@ -0,0 +1,317 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "encoding/json" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1PackRef PackRef server/name:tag to point to a pack PackRef is used when construct a ClusterProfile PackSpec is used for UI to render the parameters form ClusterProfile will not know inner details of a pack ClusterProfile only contain pack name:tag, and the param values user entered for it +// +// swagger:model v1PackRef +type V1PackRef struct { + + // Annotations is used to allow packref to add more arbitrary information one example is to add git reference for values.yaml + Annotations map[string]string `json:"annotations,omitempty"` + + // digest is used to specify the version should be installed by palette when pack upgrade available, change this digest to trigger upgrade + Digest string `json:"digest,omitempty"` + + // in valid reason + InValidReason string `json:"inValidReason,omitempty"` + + // pack is invalid when the associated tag is deleted from the registry + IsInvalid bool `json:"isInvalid,omitempty"` + + // layer + // Required: true + // Enum: [kernel os k8s cni csi addon] + Layer *string `json:"layer"` + + // path to the pack logo + Logo string `json:"logo,omitempty"` + + // manifests + Manifests []*V1ObjectReference `json:"manifests"` + + // pack name + // Required: true + Name *string `json:"name"` + + // PackUID is Hubble packUID, not palette Pack.UID It is used by Hubble only. + PackUID string `json:"packUid,omitempty"` + + // params passed as env variables to be consumed at installation time + Params map[string]string `json:"params,omitempty"` + + // presets + Presets []*V1PackPreset `json:"presets"` + + // pack registry uid + RegistryUID string `json:"registryUid,omitempty"` + + // schema + Schema []*V1PackSchema `json:"schema"` + + // pack registry server or helm repo + Server string `json:"server,omitempty"` + + // pack tag + Tag string `json:"tag,omitempty"` + + // type of the pack + // Enum: [spectro helm manifest] + Type string `json:"type,omitempty"` + + // values represents the values.yaml used as input parameters either Params OR Values should be used, not both If both applied at the same time, will only use Values + Values string `json:"values,omitempty"` + + // pack version + Version string `json:"version,omitempty"` +} + +// Validate validates this v1 pack ref +func (m *V1PackRef) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateLayer(formats); err != nil { + res = append(res, err) + } + + if err := m.validateManifests(formats); err != nil { + res = append(res, err) + } + + if err := m.validateName(formats); err != nil { + res = append(res, err) + } + + if err := m.validatePresets(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSchema(formats); err != nil { + res = append(res, err) + } + + if err := m.validateType(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +var v1PackRefTypeLayerPropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["kernel","os","k8s","cni","csi","addon"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + v1PackRefTypeLayerPropEnum = append(v1PackRefTypeLayerPropEnum, v) + } +} + +const ( + + // V1PackRefLayerKernel captures enum value "kernel" + V1PackRefLayerKernel string = "kernel" + + // V1PackRefLayerOs captures enum value "os" + V1PackRefLayerOs string = "os" + + // V1PackRefLayerK8s captures enum value "k8s" + V1PackRefLayerK8s string = "k8s" + + // V1PackRefLayerCni captures enum value "cni" + V1PackRefLayerCni string = "cni" + + // V1PackRefLayerCsi captures enum value "csi" + V1PackRefLayerCsi string = "csi" + + // V1PackRefLayerAddon captures enum value "addon" + V1PackRefLayerAddon string = "addon" +) + +// prop value enum +func (m *V1PackRef) validateLayerEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, v1PackRefTypeLayerPropEnum, true); err != nil { + return err + } + return nil +} + +func (m *V1PackRef) validateLayer(formats strfmt.Registry) error { + + if err := validate.Required("layer", "body", m.Layer); err != nil { + return err + } + + // value enum + if err := m.validateLayerEnum("layer", "body", *m.Layer); err != nil { + return err + } + + return nil +} + +func (m *V1PackRef) validateManifests(formats strfmt.Registry) error { + + if swag.IsZero(m.Manifests) { // not required + return nil + } + + for i := 0; i < len(m.Manifests); i++ { + if swag.IsZero(m.Manifests[i]) { // not required + continue + } + + if m.Manifests[i] != nil { + if err := m.Manifests[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("manifests" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1PackRef) validateName(formats strfmt.Registry) error { + + if err := validate.Required("name", "body", m.Name); err != nil { + return err + } + + return nil +} + +func (m *V1PackRef) validatePresets(formats strfmt.Registry) error { + + if swag.IsZero(m.Presets) { // not required + return nil + } + + for i := 0; i < len(m.Presets); i++ { + if swag.IsZero(m.Presets[i]) { // not required + continue + } + + if m.Presets[i] != nil { + if err := m.Presets[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("presets" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1PackRef) validateSchema(formats strfmt.Registry) error { + + if swag.IsZero(m.Schema) { // not required + return nil + } + + for i := 0; i < len(m.Schema); i++ { + if swag.IsZero(m.Schema[i]) { // not required + continue + } + + if m.Schema[i] != nil { + if err := m.Schema[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("schema" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +var v1PackRefTypeTypePropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["spectro","helm","manifest"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + v1PackRefTypeTypePropEnum = append(v1PackRefTypeTypePropEnum, v) + } +} + +const ( + + // V1PackRefTypeSpectro captures enum value "spectro" + V1PackRefTypeSpectro string = "spectro" + + // V1PackRefTypeHelm captures enum value "helm" + V1PackRefTypeHelm string = "helm" + + // V1PackRefTypeManifest captures enum value "manifest" + V1PackRefTypeManifest string = "manifest" +) + +// prop value enum +func (m *V1PackRef) validateTypeEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, v1PackRefTypeTypePropEnum, true); err != nil { + return err + } + return nil +} + +func (m *V1PackRef) validateType(formats strfmt.Registry) error { + + if swag.IsZero(m.Type) { // not required + return nil + } + + // value enum + if err := m.validateTypeEnum("type", "body", m.Type); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1PackRef) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1PackRef) UnmarshalBinary(b []byte) error { + var res V1PackRef + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_pack_ref_summary.go b/api/models/v1_pack_ref_summary.go new file mode 100644 index 00000000..8e15ab02 --- /dev/null +++ b/api/models/v1_pack_ref_summary.go @@ -0,0 +1,96 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1PackRefSummary Pack ref summary +// +// swagger:model v1PackRefSummary +type V1PackRefSummary struct { + + // addon type + AddonType string `json:"addonType,omitempty"` + + // annotations + Annotations map[string]string `json:"annotations,omitempty"` + + // display name + DisplayName string `json:"displayName,omitempty"` + + // layer + Layer V1PackLayer `json:"layer,omitempty"` + + // logo Url + LogoURL string `json:"logoUrl,omitempty"` + + // name + Name string `json:"name,omitempty"` + + // pack Uid + PackUID string `json:"packUid,omitempty"` + + // tag + Tag string `json:"tag,omitempty"` + + // type + Type string `json:"type,omitempty"` + + // version + Version string `json:"version,omitempty"` +} + +// Validate validates this v1 pack ref summary +func (m *V1PackRefSummary) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateLayer(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1PackRefSummary) validateLayer(formats strfmt.Registry) error { + + if swag.IsZero(m.Layer) { // not required + return nil + } + + if err := m.Layer.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("layer") + } + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1PackRefSummary) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1PackRefSummary) UnmarshalBinary(b []byte) error { + var res V1PackRefSummary + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_pack_ref_summary_response.go b/api/models/v1_pack_ref_summary_response.go new file mode 100644 index 00000000..497e452a --- /dev/null +++ b/api/models/v1_pack_ref_summary_response.go @@ -0,0 +1,96 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1PackRefSummaryResponse Pack summary response +// +// swagger:model v1PackRefSummaryResponse +type V1PackRefSummaryResponse struct { + + // metadata + Metadata *V1ObjectMeta `json:"metadata,omitempty"` + + // spec + Spec *V1PackRefSummarySpec `json:"spec,omitempty"` +} + +// Validate validates this v1 pack ref summary response +func (m *V1PackRefSummaryResponse) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSpec(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1PackRefSummaryResponse) validateMetadata(formats strfmt.Registry) error { + + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } + return err + } + } + + return nil +} + +func (m *V1PackRefSummaryResponse) validateSpec(formats strfmt.Registry) error { + + if swag.IsZero(m.Spec) { // not required + return nil + } + + if m.Spec != nil { + if err := m.Spec.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1PackRefSummaryResponse) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1PackRefSummaryResponse) UnmarshalBinary(b []byte) error { + var res V1PackRefSummaryResponse + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_pack_ref_summary_spec.go b/api/models/v1_pack_ref_summary_spec.go new file mode 100644 index 00000000..6124aea8 --- /dev/null +++ b/api/models/v1_pack_ref_summary_spec.go @@ -0,0 +1,121 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1PackRefSummarySpec Pack summary spec +// +// swagger:model v1PackRefSummarySpec +type V1PackRefSummarySpec struct { + + // macros + Macros *V1PackResolvedValues `json:"macros,omitempty"` + + // pack + Pack *V1PackSummarySpec `json:"pack,omitempty"` + + // registry + Registry *V1RegistryMetadata `json:"registry,omitempty"` +} + +// Validate validates this v1 pack ref summary spec +func (m *V1PackRefSummarySpec) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMacros(formats); err != nil { + res = append(res, err) + } + + if err := m.validatePack(formats); err != nil { + res = append(res, err) + } + + if err := m.validateRegistry(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1PackRefSummarySpec) validateMacros(formats strfmt.Registry) error { + + if swag.IsZero(m.Macros) { // not required + return nil + } + + if m.Macros != nil { + if err := m.Macros.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("macros") + } + return err + } + } + + return nil +} + +func (m *V1PackRefSummarySpec) validatePack(formats strfmt.Registry) error { + + if swag.IsZero(m.Pack) { // not required + return nil + } + + if m.Pack != nil { + if err := m.Pack.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("pack") + } + return err + } + } + + return nil +} + +func (m *V1PackRefSummarySpec) validateRegistry(formats strfmt.Registry) error { + + if swag.IsZero(m.Registry) { // not required + return nil + } + + if m.Registry != nil { + if err := m.Registry.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("registry") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1PackRefSummarySpec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1PackRefSummarySpec) UnmarshalBinary(b []byte) error { + var res V1PackRefSummarySpec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_pack_registries.go b/api/models/v1_pack_registries.go new file mode 100644 index 00000000..c3dee433 --- /dev/null +++ b/api/models/v1_pack_registries.go @@ -0,0 +1,112 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1PackRegistries v1 pack registries +// +// swagger:model v1PackRegistries +type V1PackRegistries struct { + + // items + // Required: true + // Unique: true + Items []*V1PackRegistry `json:"items"` + + // listmeta + Listmeta *V1ListMetaData `json:"listmeta,omitempty"` +} + +// Validate validates this v1 pack registries +func (m *V1PackRegistries) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateItems(formats); err != nil { + res = append(res, err) + } + + if err := m.validateListmeta(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1PackRegistries) validateItems(formats strfmt.Registry) error { + + if err := validate.Required("items", "body", m.Items); err != nil { + return err + } + + if err := validate.UniqueItems("items", "body", m.Items); err != nil { + return err + } + + for i := 0; i < len(m.Items); i++ { + if swag.IsZero(m.Items[i]) { // not required + continue + } + + if m.Items[i] != nil { + if err := m.Items[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("items" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1PackRegistries) validateListmeta(formats strfmt.Registry) error { + + if swag.IsZero(m.Listmeta) { // not required + return nil + } + + if m.Listmeta != nil { + if err := m.Listmeta.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("listmeta") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1PackRegistries) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1PackRegistries) UnmarshalBinary(b []byte) error { + var res V1PackRegistries + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_pack_registries_summary.go b/api/models/v1_pack_registries_summary.go new file mode 100644 index 00000000..012c7705 --- /dev/null +++ b/api/models/v1_pack_registries_summary.go @@ -0,0 +1,112 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1PackRegistriesSummary Pack Registries Summary +// +// swagger:model v1PackRegistriesSummary +type V1PackRegistriesSummary struct { + + // items + // Required: true + // Unique: true + Items []*V1PackRegistrySummary `json:"items"` + + // listmeta + Listmeta *V1ListMetaData `json:"listmeta,omitempty"` +} + +// Validate validates this v1 pack registries summary +func (m *V1PackRegistriesSummary) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateItems(formats); err != nil { + res = append(res, err) + } + + if err := m.validateListmeta(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1PackRegistriesSummary) validateItems(formats strfmt.Registry) error { + + if err := validate.Required("items", "body", m.Items); err != nil { + return err + } + + if err := validate.UniqueItems("items", "body", m.Items); err != nil { + return err + } + + for i := 0; i < len(m.Items); i++ { + if swag.IsZero(m.Items[i]) { // not required + continue + } + + if m.Items[i] != nil { + if err := m.Items[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("items" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1PackRegistriesSummary) validateListmeta(formats strfmt.Registry) error { + + if swag.IsZero(m.Listmeta) { // not required + return nil + } + + if m.Listmeta != nil { + if err := m.Listmeta.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("listmeta") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1PackRegistriesSummary) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1PackRegistriesSummary) UnmarshalBinary(b []byte) error { + var res V1PackRegistriesSummary + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_pack_registry.go b/api/models/v1_pack_registry.go new file mode 100644 index 00000000..c68c409e --- /dev/null +++ b/api/models/v1_pack_registry.go @@ -0,0 +1,127 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1PackRegistry Pack registry information +// +// swagger:model v1PackRegistry +type V1PackRegistry struct { + + // api version + APIVersion string `json:"apiVersion,omitempty"` + + // kind + Kind string `json:"kind,omitempty"` + + // metadata + Metadata *V1ObjectMeta `json:"metadata,omitempty"` + + // spec + Spec *V1PackRegistrySpec `json:"spec,omitempty"` + + // status + Status *V1PackRegistryStatus `json:"status,omitempty"` +} + +// Validate validates this v1 pack registry +func (m *V1PackRegistry) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSpec(formats); err != nil { + res = append(res, err) + } + + if err := m.validateStatus(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1PackRegistry) validateMetadata(formats strfmt.Registry) error { + + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } + return err + } + } + + return nil +} + +func (m *V1PackRegistry) validateSpec(formats strfmt.Registry) error { + + if swag.IsZero(m.Spec) { // not required + return nil + } + + if m.Spec != nil { + if err := m.Spec.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec") + } + return err + } + } + + return nil +} + +func (m *V1PackRegistry) validateStatus(formats strfmt.Registry) error { + + if swag.IsZero(m.Status) { // not required + return nil + } + + if m.Status != nil { + if err := m.Status.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("status") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1PackRegistry) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1PackRegistry) UnmarshalBinary(b []byte) error { + var res V1PackRegistry + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_pack_registry_import_entity.go b/api/models/v1_pack_registry_import_entity.go new file mode 100644 index 00000000..44869de7 --- /dev/null +++ b/api/models/v1_pack_registry_import_entity.go @@ -0,0 +1,105 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1PackRegistryImportEntity Pack registry import entity +// +// swagger:model v1PackRegistryImportEntity +type V1PackRegistryImportEntity struct { + + // matching registries + MatchingRegistries []*V1PackRegistryMetadata `json:"matchingRegistries"` + + // metadata + Metadata *V1PackRegistryMetadata `json:"metadata,omitempty"` +} + +// Validate validates this v1 pack registry import entity +func (m *V1PackRegistryImportEntity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMatchingRegistries(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1PackRegistryImportEntity) validateMatchingRegistries(formats strfmt.Registry) error { + + if swag.IsZero(m.MatchingRegistries) { // not required + return nil + } + + for i := 0; i < len(m.MatchingRegistries); i++ { + if swag.IsZero(m.MatchingRegistries[i]) { // not required + continue + } + + if m.MatchingRegistries[i] != nil { + if err := m.MatchingRegistries[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("matchingRegistries" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1PackRegistryImportEntity) validateMetadata(formats strfmt.Registry) error { + + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1PackRegistryImportEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1PackRegistryImportEntity) UnmarshalBinary(b []byte) error { + var res V1PackRegistryImportEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_pack_registry_metadata.go b/api/models/v1_pack_registry_metadata.go new file mode 100644 index 00000000..d79c3668 --- /dev/null +++ b/api/models/v1_pack_registry_metadata.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1PackRegistryMetadata Pack registry metadata +// +// swagger:model v1PackRegistryMetadata +type V1PackRegistryMetadata struct { + + // If true then pack registry is private and is not accessible for the pack sync + IsPrivate bool `json:"isPrivate"` + + // Pack registry kind [ "pack", "helm", "oci" ] + Kind string `json:"kind,omitempty"` + + // Pack registry name + Name string `json:"name,omitempty"` + + // OCI registry provider type [ "helm", "pack", "zarf" ] + ProviderType string `json:"providerType,omitempty"` + + // Pack registry uid + UID string `json:"uid,omitempty"` +} + +// Validate validates this v1 pack registry metadata +func (m *V1PackRegistryMetadata) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1PackRegistryMetadata) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1PackRegistryMetadata) UnmarshalBinary(b []byte) error { + var res V1PackRegistryMetadata + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_pack_registry_spec.go b/api/models/v1_pack_registry_spec.go new file mode 100644 index 00000000..7bfde747 --- /dev/null +++ b/api/models/v1_pack_registry_spec.go @@ -0,0 +1,102 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1PackRegistrySpec Pack registry credentials spec +// +// swagger:model v1PackRegistrySpec +type V1PackRegistrySpec struct { + + // auth + // Required: true + Auth *V1RegistryAuth `json:"auth"` + + // endpoint + // Required: true + Endpoint *string `json:"endpoint"` + + // name + Name string `json:"name,omitempty"` + + // private + Private bool `json:"private"` + + // Pack registry uid + RegistryUID string `json:"registryUid,omitempty"` + + // scope + Scope string `json:"scope,omitempty"` +} + +// Validate validates this v1 pack registry spec +func (m *V1PackRegistrySpec) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateAuth(formats); err != nil { + res = append(res, err) + } + + if err := m.validateEndpoint(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1PackRegistrySpec) validateAuth(formats strfmt.Registry) error { + + if err := validate.Required("auth", "body", m.Auth); err != nil { + return err + } + + if m.Auth != nil { + if err := m.Auth.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("auth") + } + return err + } + } + + return nil +} + +func (m *V1PackRegistrySpec) validateEndpoint(formats strfmt.Registry) error { + + if err := validate.Required("endpoint", "body", m.Endpoint); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1PackRegistrySpec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1PackRegistrySpec) UnmarshalBinary(b []byte) error { + var res V1PackRegistrySpec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_pack_registry_spec_summary.go b/api/models/v1_pack_registry_spec_summary.go new file mode 100644 index 00000000..71c03c98 --- /dev/null +++ b/api/models/v1_pack_registry_spec_summary.go @@ -0,0 +1,49 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1PackRegistrySpecSummary Pack Registry spec summary +// +// swagger:model v1PackRegistrySpecSummary +type V1PackRegistrySpecSummary struct { + + // endpoint + Endpoint string `json:"endpoint,omitempty"` + + // private + Private bool `json:"private"` + + // scope + Scope string `json:"scope,omitempty"` +} + +// Validate validates this v1 pack registry spec summary +func (m *V1PackRegistrySpecSummary) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1PackRegistrySpecSummary) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1PackRegistrySpecSummary) UnmarshalBinary(b []byte) error { + var res V1PackRegistrySpecSummary + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_pack_registry_status.go b/api/models/v1_pack_registry_status.go new file mode 100644 index 00000000..0775ca73 --- /dev/null +++ b/api/models/v1_pack_registry_status.go @@ -0,0 +1,71 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1PackRegistryStatus Status of the pack registry +// +// swagger:model v1PackRegistryStatus +type V1PackRegistryStatus struct { + + // pack sync status + PackSyncStatus *V1RegistrySyncStatus `json:"packSyncStatus,omitempty"` +} + +// Validate validates this v1 pack registry status +func (m *V1PackRegistryStatus) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validatePackSyncStatus(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1PackRegistryStatus) validatePackSyncStatus(formats strfmt.Registry) error { + + if swag.IsZero(m.PackSyncStatus) { // not required + return nil + } + + if m.PackSyncStatus != nil { + if err := m.PackSyncStatus.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("packSyncStatus") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1PackRegistryStatus) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1PackRegistryStatus) UnmarshalBinary(b []byte) error { + var res V1PackRegistryStatus + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_pack_registry_status_summary.go b/api/models/v1_pack_registry_status_summary.go new file mode 100644 index 00000000..d4e5443f --- /dev/null +++ b/api/models/v1_pack_registry_status_summary.go @@ -0,0 +1,71 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1PackRegistryStatusSummary Pack registry status summary +// +// swagger:model v1PackRegistryStatusSummary +type V1PackRegistryStatusSummary struct { + + // sync + Sync *V1RegistrySyncStatus `json:"sync,omitempty"` +} + +// Validate validates this v1 pack registry status summary +func (m *V1PackRegistryStatusSummary) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateSync(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1PackRegistryStatusSummary) validateSync(formats strfmt.Registry) error { + + if swag.IsZero(m.Sync) { // not required + return nil + } + + if m.Sync != nil { + if err := m.Sync.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("sync") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1PackRegistryStatusSummary) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1PackRegistryStatusSummary) UnmarshalBinary(b []byte) error { + var res V1PackRegistryStatusSummary + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_pack_registry_summary.go b/api/models/v1_pack_registry_summary.go new file mode 100644 index 00000000..716ad12c --- /dev/null +++ b/api/models/v1_pack_registry_summary.go @@ -0,0 +1,121 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1PackRegistrySummary Pack Registry summary +// +// swagger:model v1PackRegistrySummary +type V1PackRegistrySummary struct { + + // metadata + Metadata *V1ObjectMeta `json:"metadata,omitempty"` + + // spec + Spec *V1PackRegistrySpecSummary `json:"spec,omitempty"` + + // status + Status *V1PackRegistryStatusSummary `json:"status,omitempty"` +} + +// Validate validates this v1 pack registry summary +func (m *V1PackRegistrySummary) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSpec(formats); err != nil { + res = append(res, err) + } + + if err := m.validateStatus(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1PackRegistrySummary) validateMetadata(formats strfmt.Registry) error { + + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } + return err + } + } + + return nil +} + +func (m *V1PackRegistrySummary) validateSpec(formats strfmt.Registry) error { + + if swag.IsZero(m.Spec) { // not required + return nil + } + + if m.Spec != nil { + if err := m.Spec.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec") + } + return err + } + } + + return nil +} + +func (m *V1PackRegistrySummary) validateStatus(formats strfmt.Registry) error { + + if swag.IsZero(m.Status) { // not required + return nil + } + + if m.Status != nil { + if err := m.Status.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("status") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1PackRegistrySummary) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1PackRegistrySummary) UnmarshalBinary(b []byte) error { + var res V1PackRegistrySummary + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_pack_resolved_values.go b/api/models/v1_pack_resolved_values.go new file mode 100644 index 00000000..baecad63 --- /dev/null +++ b/api/models/v1_pack_resolved_values.go @@ -0,0 +1,43 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1PackResolvedValues Pack resolved values +// +// swagger:model v1PackResolvedValues +type V1PackResolvedValues struct { + + // Pack resolved values map + Resolved map[string]string `json:"resolved,omitempty"` +} + +// Validate validates this v1 pack resolved values +func (m *V1PackResolvedValues) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1PackResolvedValues) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1PackResolvedValues) UnmarshalBinary(b []byte) error { + var res V1PackResolvedValues + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_pack_schema.go b/api/models/v1_pack_schema.go new file mode 100644 index 00000000..900b8ff7 --- /dev/null +++ b/api/models/v1_pack_schema.go @@ -0,0 +1,64 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1PackSchema PackSchema defines the schema definition, hints for the pack values +// +// swagger:model v1PackSchema +type V1PackSchema struct { + + // format + Format string `json:"format"` + + // hints + Hints []string `json:"hints"` + + // list options + ListOptions []string `json:"listOptions"` + + // name + Name string `json:"name"` + + // readonly + Readonly bool `json:"readonly"` + + // regex + Regex string `json:"regex"` + + // required + Required bool `json:"required"` + + // type + Type string `json:"type"` +} + +// Validate validates this v1 pack schema +func (m *V1PackSchema) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1PackSchema) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1PackSchema) UnmarshalBinary(b []byte) error { + var res V1PackSchema + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_pack_sort_fields.go b/api/models/v1_pack_sort_fields.go new file mode 100644 index 00000000..3bd30599 --- /dev/null +++ b/api/models/v1_pack_sort_fields.go @@ -0,0 +1,72 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "encoding/json" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" +) + +// V1PackSortFields Packs sort by fields +// +// swagger:model v1PackSortFields +type V1PackSortFields string + +const ( + + // V1PackSortFieldsName captures enum value "name" + V1PackSortFieldsName V1PackSortFields = "name" + + // V1PackSortFieldsType captures enum value "type" + V1PackSortFieldsType V1PackSortFields = "type" + + // V1PackSortFieldsLayer captures enum value "layer" + V1PackSortFieldsLayer V1PackSortFields = "layer" + + // V1PackSortFieldsAddOnType captures enum value "addOnType" + V1PackSortFieldsAddOnType V1PackSortFields = "addOnType" + + // V1PackSortFieldsDisplayName captures enum value "displayName" + V1PackSortFieldsDisplayName V1PackSortFields = "displayName" +) + +// for schema +var v1PackSortFieldsEnum []interface{} + +func init() { + var res []V1PackSortFields + if err := json.Unmarshal([]byte(`["name","type","layer","addOnType","displayName"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + v1PackSortFieldsEnum = append(v1PackSortFieldsEnum, v) + } +} + +func (m V1PackSortFields) validateV1PackSortFieldsEnum(path, location string, value V1PackSortFields) error { + if err := validate.EnumCase(path, location, value, v1PackSortFieldsEnum, true); err != nil { + return err + } + return nil +} + +// Validate validates this v1 pack sort fields +func (m V1PackSortFields) Validate(formats strfmt.Registry) error { + var res []error + + // value enum + if err := m.validateV1PackSortFieldsEnum("", "body", m); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/models/v1_pack_sort_spec.go b/api/models/v1_pack_sort_spec.go new file mode 100644 index 00000000..9c251dd7 --- /dev/null +++ b/api/models/v1_pack_sort_spec.go @@ -0,0 +1,94 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1PackSortSpec Packs sort spec +// +// swagger:model v1PackSortSpec +type V1PackSortSpec struct { + + // field + Field *V1PackSortFields `json:"field,omitempty"` + + // order + Order V1SortOrder `json:"order,omitempty"` +} + +// Validate validates this v1 pack sort spec +func (m *V1PackSortSpec) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateField(formats); err != nil { + res = append(res, err) + } + + if err := m.validateOrder(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1PackSortSpec) validateField(formats strfmt.Registry) error { + + if swag.IsZero(m.Field) { // not required + return nil + } + + if m.Field != nil { + if err := m.Field.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("field") + } + return err + } + } + + return nil +} + +func (m *V1PackSortSpec) validateOrder(formats strfmt.Registry) error { + + if swag.IsZero(m.Order) { // not required + return nil + } + + if err := m.Order.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("order") + } + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1PackSortSpec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1PackSortSpec) UnmarshalBinary(b []byte) error { + var res V1PackSortSpec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_pack_summaries.go b/api/models/v1_pack_summaries.go new file mode 100644 index 00000000..4cede678 --- /dev/null +++ b/api/models/v1_pack_summaries.go @@ -0,0 +1,112 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1PackSummaries List of packs +// +// swagger:model v1PackSummaries +type V1PackSummaries struct { + + // Packs array + // Required: true + // Unique: true + Items []*V1PackSummary `json:"items"` + + // listmeta + Listmeta *V1ListMetaData `json:"listmeta,omitempty"` +} + +// Validate validates this v1 pack summaries +func (m *V1PackSummaries) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateItems(formats); err != nil { + res = append(res, err) + } + + if err := m.validateListmeta(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1PackSummaries) validateItems(formats strfmt.Registry) error { + + if err := validate.Required("items", "body", m.Items); err != nil { + return err + } + + if err := validate.UniqueItems("items", "body", m.Items); err != nil { + return err + } + + for i := 0; i < len(m.Items); i++ { + if swag.IsZero(m.Items[i]) { // not required + continue + } + + if m.Items[i] != nil { + if err := m.Items[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("items" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1PackSummaries) validateListmeta(formats strfmt.Registry) error { + + if swag.IsZero(m.Listmeta) { // not required + return nil + } + + if m.Listmeta != nil { + if err := m.Listmeta.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("listmeta") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1PackSummaries) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1PackSummaries) UnmarshalBinary(b []byte) error { + var res V1PackSummaries + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_pack_summary.go b/api/models/v1_pack_summary.go new file mode 100644 index 00000000..aac4ba4a --- /dev/null +++ b/api/models/v1_pack_summary.go @@ -0,0 +1,105 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1PackSummary Pack summary object +// +// swagger:model v1PackSummary +type V1PackSummary struct { + + // Pack api version + APIVersion string `json:"apiVersion,omitempty"` + + // Pack kind + Kind string `json:"kind,omitempty"` + + // metadata + Metadata *V1ObjectMeta `json:"metadata,omitempty"` + + // spec + Spec *V1PackSummarySpec `json:"spec,omitempty"` + + // status + Status V1PackSummaryStatus `json:"status,omitempty"` +} + +// Validate validates this v1 pack summary +func (m *V1PackSummary) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSpec(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1PackSummary) validateMetadata(formats strfmt.Registry) error { + + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } + return err + } + } + + return nil +} + +func (m *V1PackSummary) validateSpec(formats strfmt.Registry) error { + + if swag.IsZero(m.Spec) { // not required + return nil + } + + if m.Spec != nil { + if err := m.Spec.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1PackSummary) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1PackSummary) UnmarshalBinary(b []byte) error { + var res V1PackSummary + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_pack_summary_spec.go b/api/models/v1_pack_summary_spec.go new file mode 100644 index 00000000..18480999 --- /dev/null +++ b/api/models/v1_pack_summary_spec.go @@ -0,0 +1,254 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1PackSummarySpec Pack object +// +// swagger:model v1PackSummarySpec +type V1PackSummarySpec struct { + + // Pack add-on sub type such as monitoring, db etc + AddonSubType string `json:"addonSubType,omitempty"` + + // Pack add-on type such as logging, monitoring, security etc + AddonType string `json:"addonType,omitempty"` + + // Pack annotations is used to allow pack to add more arbitrary configurations + Annotations map[string]string `json:"annotations,omitempty"` + + // Pack supported cloud types + CloudTypes []string `json:"cloudTypes"` + + // Pack digest + Digest string `json:"digest,omitempty"` + + // Pack display name + DisplayName string `json:"displayName,omitempty"` + + // Pack end of life, date format: yyyy-MM-dd + Eol string `json:"eol,omitempty"` + + // Pack group + Group string `json:"group,omitempty"` + + // layer + Layer V1PackLayer `json:"layer,omitempty"` + + // Pack logo url + LogoURL string `json:"logoUrl,omitempty"` + + // Pack manifests are additional content as part of the cluster profile + Manifests []*V1ObjectReference `json:"manifests"` + + // Pack name + Name string `json:"name,omitempty"` + + // Pack presets are the set of configurations applied on user selection of presets + Presets []*V1PackPreset `json:"presets"` + + // Pack registry uid + RegistryUID string `json:"registryUid,omitempty"` + + // Pack schema contains constraints such as data type, format, hints for the pack values + Schema []*V1PackSchema `json:"schema"` + + // template + Template *V1PackTemplate `json:"template,omitempty"` + + // type + Type V1PackType `json:"type,omitempty"` + + // Pack values + Values string `json:"values,omitempty"` + + // Pack version + Version string `json:"version,omitempty"` +} + +// Validate validates this v1 pack summary spec +func (m *V1PackSummarySpec) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateLayer(formats); err != nil { + res = append(res, err) + } + + if err := m.validateManifests(formats); err != nil { + res = append(res, err) + } + + if err := m.validatePresets(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSchema(formats); err != nil { + res = append(res, err) + } + + if err := m.validateTemplate(formats); err != nil { + res = append(res, err) + } + + if err := m.validateType(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1PackSummarySpec) validateLayer(formats strfmt.Registry) error { + + if swag.IsZero(m.Layer) { // not required + return nil + } + + if err := m.Layer.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("layer") + } + return err + } + + return nil +} + +func (m *V1PackSummarySpec) validateManifests(formats strfmt.Registry) error { + + if swag.IsZero(m.Manifests) { // not required + return nil + } + + for i := 0; i < len(m.Manifests); i++ { + if swag.IsZero(m.Manifests[i]) { // not required + continue + } + + if m.Manifests[i] != nil { + if err := m.Manifests[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("manifests" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1PackSummarySpec) validatePresets(formats strfmt.Registry) error { + + if swag.IsZero(m.Presets) { // not required + return nil + } + + for i := 0; i < len(m.Presets); i++ { + if swag.IsZero(m.Presets[i]) { // not required + continue + } + + if m.Presets[i] != nil { + if err := m.Presets[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("presets" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1PackSummarySpec) validateSchema(formats strfmt.Registry) error { + + if swag.IsZero(m.Schema) { // not required + return nil + } + + for i := 0; i < len(m.Schema); i++ { + if swag.IsZero(m.Schema[i]) { // not required + continue + } + + if m.Schema[i] != nil { + if err := m.Schema[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("schema" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1PackSummarySpec) validateTemplate(formats strfmt.Registry) error { + + if swag.IsZero(m.Template) { // not required + return nil + } + + if m.Template != nil { + if err := m.Template.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("template") + } + return err + } + } + + return nil +} + +func (m *V1PackSummarySpec) validateType(formats strfmt.Registry) error { + + if swag.IsZero(m.Type) { // not required + return nil + } + + if err := m.Type.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("type") + } + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1PackSummarySpec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1PackSummarySpec) UnmarshalBinary(b []byte) error { + var res V1PackSummarySpec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_pack_summary_status.go b/api/models/v1_pack_summary_status.go new file mode 100644 index 00000000..e2c430aa --- /dev/null +++ b/api/models/v1_pack_summary_status.go @@ -0,0 +1,11 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +// V1PackSummaryStatus Pack status +// +// swagger:model v1PackSummaryStatus +type V1PackSummaryStatus interface{} diff --git a/api/models/v1_pack_tag_entity.go b/api/models/v1_pack_tag_entity.go new file mode 100644 index 00000000..9651ce06 --- /dev/null +++ b/api/models/v1_pack_tag_entity.go @@ -0,0 +1,156 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1PackTagEntity Pack object +// +// swagger:model v1PackTagEntity +type V1PackTagEntity struct { + + // Pack add-on sub type such as monitoring, db etc + AddonSubType string `json:"addonSubType,omitempty"` + + // Pack add-on type such as logging, monitoring, security etc + AddonType string `json:"addonType,omitempty"` + + // Pack supported cloud types + CloudTypes []string `json:"cloudTypes"` + + // Pack display name + DisplayName string `json:"displayName,omitempty"` + + // layer + Layer V1PackLayer `json:"layer,omitempty"` + + // Pack logo url + LogoURL string `json:"logoUrl,omitempty"` + + // Pack name + Name string `json:"name,omitempty"` + + // Pack values array + PackValues []*V1PackUIDValues `json:"packValues"` + + // Pack registry uid + RegistryUID string `json:"registryUid,omitempty"` + + // Pack version tags array + Tags []*V1PackTags `json:"tags"` +} + +// Validate validates this v1 pack tag entity +func (m *V1PackTagEntity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateLayer(formats); err != nil { + res = append(res, err) + } + + if err := m.validatePackValues(formats); err != nil { + res = append(res, err) + } + + if err := m.validateTags(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1PackTagEntity) validateLayer(formats strfmt.Registry) error { + + if swag.IsZero(m.Layer) { // not required + return nil + } + + if err := m.Layer.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("layer") + } + return err + } + + return nil +} + +func (m *V1PackTagEntity) validatePackValues(formats strfmt.Registry) error { + + if swag.IsZero(m.PackValues) { // not required + return nil + } + + for i := 0; i < len(m.PackValues); i++ { + if swag.IsZero(m.PackValues[i]) { // not required + continue + } + + if m.PackValues[i] != nil { + if err := m.PackValues[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("packValues" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1PackTagEntity) validateTags(formats strfmt.Registry) error { + + if swag.IsZero(m.Tags) { // not required + return nil + } + + for i := 0; i < len(m.Tags); i++ { + if swag.IsZero(m.Tags[i]) { // not required + continue + } + + if m.Tags[i] != nil { + if err := m.Tags[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("tags" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1PackTagEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1PackTagEntity) UnmarshalBinary(b []byte) error { + var res V1PackTagEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_pack_tags.go b/api/models/v1_pack_tags.go new file mode 100644 index 00000000..f033abb7 --- /dev/null +++ b/api/models/v1_pack_tags.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1PackTags v1 pack tags +// +// swagger:model v1PackTags +type V1PackTags struct { + + // Pack group + Group string `json:"group,omitempty"` + + // Pack uid + PackUID string `json:"packUid,omitempty"` + + // Pack version parent tags + ParentTags []string `json:"parentTags"` + + // Pack version tag + Tag string `json:"tag,omitempty"` + + // Pack version + Version string `json:"version,omitempty"` +} + +// Validate validates this v1 pack tags +func (m *V1PackTags) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1PackTags) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1PackTags) UnmarshalBinary(b []byte) error { + var res V1PackTags + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_pack_template.go b/api/models/v1_pack_template.go new file mode 100644 index 00000000..05258d18 --- /dev/null +++ b/api/models/v1_pack_template.go @@ -0,0 +1,77 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1PackTemplate Pack template configuration +// +// swagger:model v1PackTemplate +type V1PackTemplate struct { + + // Pack template manifest content + Manifest string `json:"manifest,omitempty"` + + // parameters + Parameters *V1PackTemplateParameters `json:"parameters,omitempty"` + + // Pack template values + Values string `json:"values,omitempty"` +} + +// Validate validates this v1 pack template +func (m *V1PackTemplate) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateParameters(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1PackTemplate) validateParameters(formats strfmt.Registry) error { + + if swag.IsZero(m.Parameters) { // not required + return nil + } + + if m.Parameters != nil { + if err := m.Parameters.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("parameters") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1PackTemplate) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1PackTemplate) UnmarshalBinary(b []byte) error { + var res V1PackTemplate + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_pack_template_parameter.go b/api/models/v1_pack_template_parameter.go new file mode 100644 index 00000000..7e964ca5 --- /dev/null +++ b/api/models/v1_pack_template_parameter.go @@ -0,0 +1,112 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1PackTemplateParameter Pack template parameter +// +// swagger:model v1PackTemplateParameter +type V1PackTemplateParameter struct { + + // Pack template parameter description + Description string `json:"description,omitempty"` + + // Pack template parameter display name + DisplayName string `json:"displayName,omitempty"` + + // Pack template parameter format + Format string `json:"format,omitempty"` + + // Pack template parameter hidden flag, if true then the parameter is hidden in the UI + Hidden bool `json:"hidden,omitempty"` + + // Pack template parameter list options as string array + ListOptions []string `json:"listOptions"` + + // Pack template parameter name + Name string `json:"name,omitempty"` + + // Pack template parameter optional flag, if true then the parameter value is not mandatory + Optional bool `json:"optional,omitempty"` + + // Pack template parameter options array + Options map[string]V1PackTemplateParameterOption `json:"options,omitempty"` + + // Pack template parameter readonly flag, if true then the parameter value can't be overridden + ReadOnly bool `json:"readOnly,omitempty"` + + // Pack template parameter regex, if set then parameter value must match with specified regex + Regex string `json:"regex,omitempty"` + + // Pack template parameter target key which is mapped to the key defined in the pack values + TargetKey string `json:"targetKey,omitempty"` + + // Pack template parameter data type + Type string `json:"type,omitempty"` + + // Pack template parameter value + Value string `json:"value,omitempty"` +} + +// Validate validates this v1 pack template parameter +func (m *V1PackTemplateParameter) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateOptions(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1PackTemplateParameter) validateOptions(formats strfmt.Registry) error { + + if swag.IsZero(m.Options) { // not required + return nil + } + + for k := range m.Options { + + if err := validate.Required("options"+"."+k, "body", m.Options[k]); err != nil { + return err + } + if val, ok := m.Options[k]; ok { + if err := val.Validate(formats); err != nil { + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1PackTemplateParameter) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1PackTemplateParameter) UnmarshalBinary(b []byte) error { + var res V1PackTemplateParameter + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_pack_template_parameter_option.go b/api/models/v1_pack_template_parameter_option.go new file mode 100644 index 00000000..2fd559a1 --- /dev/null +++ b/api/models/v1_pack_template_parameter_option.go @@ -0,0 +1,86 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1PackTemplateParameterOption Pack template parameter option +// +// swagger:model v1PackTemplateParameterOption +type V1PackTemplateParameterOption struct { + + // Pack template parameter dependencies + Dependencies []*V1PackDependency `json:"dependencies"` + + // Pack template parameter description + Description string `json:"description,omitempty"` + + // Pack template parameter label + Label string `json:"label,omitempty"` +} + +// Validate validates this v1 pack template parameter option +func (m *V1PackTemplateParameterOption) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateDependencies(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1PackTemplateParameterOption) validateDependencies(formats strfmt.Registry) error { + + if swag.IsZero(m.Dependencies) { // not required + return nil + } + + for i := 0; i < len(m.Dependencies); i++ { + if swag.IsZero(m.Dependencies[i]) { // not required + continue + } + + if m.Dependencies[i] != nil { + if err := m.Dependencies[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("dependencies" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1PackTemplateParameterOption) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1PackTemplateParameterOption) UnmarshalBinary(b []byte) error { + var res V1PackTemplateParameterOption + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_pack_template_parameters.go b/api/models/v1_pack_template_parameters.go new file mode 100644 index 00000000..2579df2c --- /dev/null +++ b/api/models/v1_pack_template_parameters.go @@ -0,0 +1,112 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1PackTemplateParameters Pack template parameters +// +// swagger:model v1PackTemplateParameters +type V1PackTemplateParameters struct { + + // Pack template input parameters array + InputParameters []*V1PackTemplateParameter `json:"inputParameters"` + + // Pack template output parameters array + OutputParameters []*V1PackTemplateParameter `json:"outputParameters"` +} + +// Validate validates this v1 pack template parameters +func (m *V1PackTemplateParameters) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateInputParameters(formats); err != nil { + res = append(res, err) + } + + if err := m.validateOutputParameters(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1PackTemplateParameters) validateInputParameters(formats strfmt.Registry) error { + + if swag.IsZero(m.InputParameters) { // not required + return nil + } + + for i := 0; i < len(m.InputParameters); i++ { + if swag.IsZero(m.InputParameters[i]) { // not required + continue + } + + if m.InputParameters[i] != nil { + if err := m.InputParameters[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("inputParameters" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1PackTemplateParameters) validateOutputParameters(formats strfmt.Registry) error { + + if swag.IsZero(m.OutputParameters) { // not required + return nil + } + + for i := 0; i < len(m.OutputParameters); i++ { + if swag.IsZero(m.OutputParameters[i]) { // not required + continue + } + + if m.OutputParameters[i] != nil { + if err := m.OutputParameters[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("outputParameters" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1PackTemplateParameters) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1PackTemplateParameters) UnmarshalBinary(b []byte) error { + var res V1PackTemplateParameters + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_pack_type.go b/api/models/v1_pack_type.go new file mode 100644 index 00000000..efd26af0 --- /dev/null +++ b/api/models/v1_pack_type.go @@ -0,0 +1,69 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "encoding/json" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" +) + +// V1PackType v1 pack type +// +// swagger:model v1PackType +type V1PackType string + +const ( + + // V1PackTypeSpectro captures enum value "spectro" + V1PackTypeSpectro V1PackType = "spectro" + + // V1PackTypeHelm captures enum value "helm" + V1PackTypeHelm V1PackType = "helm" + + // V1PackTypeManifest captures enum value "manifest" + V1PackTypeManifest V1PackType = "manifest" + + // V1PackTypeOci captures enum value "oci" + V1PackTypeOci V1PackType = "oci" +) + +// for schema +var v1PackTypeEnum []interface{} + +func init() { + var res []V1PackType + if err := json.Unmarshal([]byte(`["spectro","helm","manifest","oci"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + v1PackTypeEnum = append(v1PackTypeEnum, v) + } +} + +func (m V1PackType) validateV1PackTypeEnum(path, location string, value V1PackType) error { + if err := validate.EnumCase(path, location, value, v1PackTypeEnum, true); err != nil { + return err + } + return nil +} + +// Validate validates this v1 pack type +func (m V1PackType) Validate(formats strfmt.Registry) error { + var res []error + + // value enum + if err := m.validateV1PackTypeEnum("", "body", m); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/models/v1_pack_uid_values.go b/api/models/v1_pack_uid_values.go new file mode 100644 index 00000000..7cc615f3 --- /dev/null +++ b/api/models/v1_pack_uid_values.go @@ -0,0 +1,181 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1PackUIDValues v1 pack Uid values +// +// swagger:model v1PackUidValues +type V1PackUIDValues struct { + + // Pack annotations is used to allow pack to add more arbitrary configurations + Annotations map[string]string `json:"annotations,omitempty"` + + // Pack dependencies array + Dependencies []*V1PackDependencyMeta `json:"dependencies"` + + // Pack uid + PackUID string `json:"packUid,omitempty"` + + // Pack presets are the set of configurations applied on user selection of presets + Presets []*V1PackPreset `json:"presets"` + + // Readme describes the documentation of the specified pack + Readme string `json:"readme,omitempty"` + + // Pack schema contains constraints such as data type, format, hints for the pack values + Schema []*V1PackSchema `json:"schema"` + + // template + Template *V1PackTemplate `json:"template,omitempty"` + + // Pack values represents the values.yaml used as input parameters + Values string `json:"values,omitempty"` +} + +// Validate validates this v1 pack Uid values +func (m *V1PackUIDValues) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateDependencies(formats); err != nil { + res = append(res, err) + } + + if err := m.validatePresets(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSchema(formats); err != nil { + res = append(res, err) + } + + if err := m.validateTemplate(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1PackUIDValues) validateDependencies(formats strfmt.Registry) error { + + if swag.IsZero(m.Dependencies) { // not required + return nil + } + + for i := 0; i < len(m.Dependencies); i++ { + if swag.IsZero(m.Dependencies[i]) { // not required + continue + } + + if m.Dependencies[i] != nil { + if err := m.Dependencies[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("dependencies" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1PackUIDValues) validatePresets(formats strfmt.Registry) error { + + if swag.IsZero(m.Presets) { // not required + return nil + } + + for i := 0; i < len(m.Presets); i++ { + if swag.IsZero(m.Presets[i]) { // not required + continue + } + + if m.Presets[i] != nil { + if err := m.Presets[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("presets" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1PackUIDValues) validateSchema(formats strfmt.Registry) error { + + if swag.IsZero(m.Schema) { // not required + return nil + } + + for i := 0; i < len(m.Schema); i++ { + if swag.IsZero(m.Schema[i]) { // not required + continue + } + + if m.Schema[i] != nil { + if err := m.Schema[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("schema" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1PackUIDValues) validateTemplate(formats strfmt.Registry) error { + + if swag.IsZero(m.Template) { // not required + return nil + } + + if m.Template != nil { + if err := m.Template.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("template") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1PackUIDValues) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1PackUIDValues) UnmarshalBinary(b []byte) error { + var res V1PackUIDValues + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_pack_update_entity.go b/api/models/v1_pack_update_entity.go new file mode 100644 index 00000000..d83f7b9b --- /dev/null +++ b/api/models/v1_pack_update_entity.go @@ -0,0 +1,71 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1PackUpdateEntity Pack update request payload +// +// swagger:model v1PackUpdateEntity +type V1PackUpdateEntity struct { + + // pack + Pack *V1PackEntity `json:"pack,omitempty"` +} + +// Validate validates this v1 pack update entity +func (m *V1PackUpdateEntity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validatePack(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1PackUpdateEntity) validatePack(formats strfmt.Registry) error { + + if swag.IsZero(m.Pack) { // not required + return nil + } + + if m.Pack != nil { + if err := m.Pack.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("pack") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1PackUpdateEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1PackUpdateEntity) UnmarshalBinary(b []byte) error { + var res V1PackUpdateEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_pack_values_entity.go b/api/models/v1_pack_values_entity.go new file mode 100644 index 00000000..8321e566 --- /dev/null +++ b/api/models/v1_pack_values_entity.go @@ -0,0 +1,127 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1PackValuesEntity Pack values entity to refer the existing pack for the values override +// +// swagger:model v1PackValuesEntity +type V1PackValuesEntity struct { + + // Pack manifests are additional content as part of the profile + Manifests []*V1ManifestRefUpdateEntity `json:"manifests"` + + // Pack name + // Required: true + Name *string `json:"name"` + + // Pack version tag + Tag string `json:"tag,omitempty"` + + // type + Type V1PackType `json:"type,omitempty"` + + // Pack values represents the values.yaml used as input parameters either Params OR Values should be used, not both If both applied at the same time, will only use Values + Values string `json:"values,omitempty"` +} + +// Validate validates this v1 pack values entity +func (m *V1PackValuesEntity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateManifests(formats); err != nil { + res = append(res, err) + } + + if err := m.validateName(formats); err != nil { + res = append(res, err) + } + + if err := m.validateType(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1PackValuesEntity) validateManifests(formats strfmt.Registry) error { + + if swag.IsZero(m.Manifests) { // not required + return nil + } + + for i := 0; i < len(m.Manifests); i++ { + if swag.IsZero(m.Manifests[i]) { // not required + continue + } + + if m.Manifests[i] != nil { + if err := m.Manifests[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("manifests" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1PackValuesEntity) validateName(formats strfmt.Registry) error { + + if err := validate.Required("name", "body", m.Name); err != nil { + return err + } + + return nil +} + +func (m *V1PackValuesEntity) validateType(formats strfmt.Registry) error { + + if swag.IsZero(m.Type) { // not required + return nil + } + + if err := m.Type.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("type") + } + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1PackValuesEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1PackValuesEntity) UnmarshalBinary(b []byte) error { + var res V1PackValuesEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_packs_filter_spec.go b/api/models/v1_packs_filter_spec.go new file mode 100644 index 00000000..1e9a701c --- /dev/null +++ b/api/models/v1_packs_filter_spec.go @@ -0,0 +1,111 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1PacksFilterSpec Packs filter spec +// +// swagger:model v1PacksFilterSpec +type V1PacksFilterSpec struct { + + // filter + Filter *V1PackFilterSpec `json:"filter,omitempty"` + + // sort + // Unique: true + Sort []*V1PackSortSpec `json:"sort"` +} + +// Validate validates this v1 packs filter spec +func (m *V1PacksFilterSpec) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateFilter(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSort(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1PacksFilterSpec) validateFilter(formats strfmt.Registry) error { + + if swag.IsZero(m.Filter) { // not required + return nil + } + + if m.Filter != nil { + if err := m.Filter.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("filter") + } + return err + } + } + + return nil +} + +func (m *V1PacksFilterSpec) validateSort(formats strfmt.Registry) error { + + if swag.IsZero(m.Sort) { // not required + return nil + } + + if err := validate.UniqueItems("sort", "body", m.Sort); err != nil { + return err + } + + for i := 0; i < len(m.Sort); i++ { + if swag.IsZero(m.Sort[i]) { // not required + continue + } + + if m.Sort[i] != nil { + if err := m.Sort[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("sort" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1PacksFilterSpec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1PacksFilterSpec) UnmarshalBinary(b []byte) error { + var res V1PacksFilterSpec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_pairing_code.go b/api/models/v1_pairing_code.go new file mode 100644 index 00000000..267476ac --- /dev/null +++ b/api/models/v1_pairing_code.go @@ -0,0 +1,43 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1PairingCode Pairing code response +// +// swagger:model v1PairingCode +type V1PairingCode struct { + + // pairing code + PairingCode string `json:"pairingCode,omitempty"` +} + +// Validate validates this v1 pairing code +func (m *V1PairingCode) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1PairingCode) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1PairingCode) UnmarshalBinary(b []byte) error { + var res V1PairingCode + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_partition.go b/api/models/v1_partition.go new file mode 100644 index 00000000..8a166972 --- /dev/null +++ b/api/models/v1_partition.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1Partition v1 partition +// +// swagger:model v1Partition +type V1Partition struct { + + // file system type + FileSystemType string `json:"fileSystemType,omitempty"` + + // free space + FreeSpace int32 `json:"freeSpace,omitempty"` + + // mount point + MountPoint string `json:"mountPoint,omitempty"` + + // total space + TotalSpace int32 `json:"totalSpace,omitempty"` + + // used space + UsedSpace int32 `json:"usedSpace,omitempty"` +} + +// Validate validates this v1 partition +func (m *V1Partition) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1Partition) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1Partition) UnmarshalBinary(b []byte) error { + var res V1Partition + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_passwords_block_list.go b/api/models/v1_passwords_block_list.go new file mode 100644 index 00000000..bb93969f --- /dev/null +++ b/api/models/v1_passwords_block_list.go @@ -0,0 +1,71 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1PasswordsBlockList List of blocklisted passwords +// +// swagger:model V1PasswordsBlockList +type V1PasswordsBlockList struct { + + // spec + Spec *V1PasswordsBlockListEntity `json:"spec,omitempty"` +} + +// Validate validates this v1 passwords block list +func (m *V1PasswordsBlockList) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateSpec(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1PasswordsBlockList) validateSpec(formats strfmt.Registry) error { + + if swag.IsZero(m.Spec) { // not required + return nil + } + + if m.Spec != nil { + if err := m.Spec.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1PasswordsBlockList) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1PasswordsBlockList) UnmarshalBinary(b []byte) error { + var res V1PasswordsBlockList + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_passwords_block_list_entity.go b/api/models/v1_passwords_block_list_entity.go new file mode 100644 index 00000000..4e73d764 --- /dev/null +++ b/api/models/v1_passwords_block_list_entity.go @@ -0,0 +1,43 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1PasswordsBlockListEntity List of block listed passwords +// +// swagger:model v1PasswordsBlockListEntity +type V1PasswordsBlockListEntity struct { + + // passwords + Passwords []string `json:"passwords"` +} + +// Validate validates this v1 passwords block list entity +func (m *V1PasswordsBlockListEntity) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1PasswordsBlockListEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1PasswordsBlockListEntity) UnmarshalBinary(b []byte) error { + var res V1PasswordsBlockListEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_pcg_self_hosted_params.go b/api/models/v1_pcg_self_hosted_params.go new file mode 100644 index 00000000..df3bef4b --- /dev/null +++ b/api/models/v1_pcg_self_hosted_params.go @@ -0,0 +1,46 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1PcgSelfHostedParams v1 pcg self hosted params +// +// swagger:model v1PcgSelfHostedParams +type V1PcgSelfHostedParams struct { + + // cloud type + CloudType string `json:"cloudType,omitempty"` + + // name + Name string `json:"name,omitempty"` +} + +// Validate validates this v1 pcg self hosted params +func (m *V1PcgSelfHostedParams) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1PcgSelfHostedParams) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1PcgSelfHostedParams) UnmarshalBinary(b []byte) error { + var res V1PcgSelfHostedParams + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_pcg_service_kubectl_commands.go b/api/models/v1_pcg_service_kubectl_commands.go new file mode 100644 index 00000000..f0ef8c14 --- /dev/null +++ b/api/models/v1_pcg_service_kubectl_commands.go @@ -0,0 +1,72 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1PcgServiceKubectlCommands Array of kubectl commands +// +// swagger:model v1PcgServiceKubectlCommands +type V1PcgServiceKubectlCommands struct { + + // kubectl commands + // Required: true + // Unique: true + KubectlCommands []string `json:"kubectlCommands"` + + // overlord Uid + OverlordUID string `json:"overlordUid,omitempty"` +} + +// Validate validates this v1 pcg service kubectl commands +func (m *V1PcgServiceKubectlCommands) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateKubectlCommands(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1PcgServiceKubectlCommands) validateKubectlCommands(formats strfmt.Registry) error { + + if err := validate.Required("kubectlCommands", "body", m.KubectlCommands); err != nil { + return err + } + + if err := validate.UniqueItems("kubectlCommands", "body", m.KubectlCommands); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1PcgServiceKubectlCommands) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1PcgServiceKubectlCommands) UnmarshalBinary(b []byte) error { + var res V1PcgServiceKubectlCommands + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_pcgs_summary.go b/api/models/v1_pcgs_summary.go new file mode 100644 index 00000000..6077339a --- /dev/null +++ b/api/models/v1_pcgs_summary.go @@ -0,0 +1,112 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1PcgsSummary v1 pcgs summary +// +// swagger:model v1PcgsSummary +type V1PcgsSummary struct { + + // items + // Required: true + // Unique: true + Items []*V1Overlord `json:"items"` + + // listmeta + Listmeta *V1ListMetaData `json:"listmeta,omitempty"` +} + +// Validate validates this v1 pcgs summary +func (m *V1PcgsSummary) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateItems(formats); err != nil { + res = append(res, err) + } + + if err := m.validateListmeta(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1PcgsSummary) validateItems(formats strfmt.Registry) error { + + if err := validate.Required("items", "body", m.Items); err != nil { + return err + } + + if err := validate.UniqueItems("items", "body", m.Items); err != nil { + return err + } + + for i := 0; i < len(m.Items); i++ { + if swag.IsZero(m.Items[i]) { // not required + continue + } + + if m.Items[i] != nil { + if err := m.Items[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("items" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1PcgsSummary) validateListmeta(formats strfmt.Registry) error { + + if swag.IsZero(m.Listmeta) { // not required + return nil + } + + if m.Listmeta != nil { + if err := m.Listmeta.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("listmeta") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1PcgsSummary) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1PcgsSummary) UnmarshalBinary(b []byte) error { + var res V1PcgsSummary + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_permission.go b/api/models/v1_permission.go new file mode 100644 index 00000000..7bf669c5 --- /dev/null +++ b/api/models/v1_permission.go @@ -0,0 +1,75 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1Permission Permission information +// +// swagger:model v1Permission +type V1Permission struct { + + // name + Name string `json:"name,omitempty"` + + // permissions + Permissions []string `json:"permissions"` + + // scope + Scope V1Scope `json:"scope,omitempty"` +} + +// Validate validates this v1 permission +func (m *V1Permission) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateScope(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1Permission) validateScope(formats strfmt.Registry) error { + + if swag.IsZero(m.Scope) { // not required + return nil + } + + if err := m.Scope.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("scope") + } + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1Permission) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1Permission) UnmarshalBinary(b []byte) error { + var res V1Permission + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_permissions.go b/api/models/v1_permissions.go new file mode 100644 index 00000000..f5b21ae4 --- /dev/null +++ b/api/models/v1_permissions.go @@ -0,0 +1,45 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1Permissions Array of permissions +// +// swagger:model v1Permissions +type V1Permissions []*V1Permission + +// Validate validates this v1 permissions +func (m V1Permissions) Validate(formats strfmt.Registry) error { + var res []error + + for i := 0; i < len(m); i++ { + if swag.IsZero(m[i]) { // not required + continue + } + + if m[i] != nil { + if err := m[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName(strconv.Itoa(i)) + } + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/models/v1_plan_credit.go b/api/models/v1_plan_credit.go new file mode 100644 index 00000000..559a22ea --- /dev/null +++ b/api/models/v1_plan_credit.go @@ -0,0 +1,158 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "encoding/json" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1PlanCredit Plan Credit +// +// swagger:model v1PlanCredit +type V1PlanCredit struct { + + // cpu core hours + CPUCoreHours int64 `json:"cpuCoreHours"` + + // credit Uid + CreditUID string `json:"creditUid,omitempty"` + + // credit expiry time + // Format: date-time + Expiry V1Time `json:"expiry,omitempty"` + + // name + Name string `json:"name,omitempty"` + + // credit start time + // Format: date-time + Start V1Time `json:"start,omitempty"` + + // type + // Required: true + // Enum: [Pure Alloy] + Type *string `json:"type"` +} + +// Validate validates this v1 plan credit +func (m *V1PlanCredit) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateExpiry(formats); err != nil { + res = append(res, err) + } + + if err := m.validateStart(formats); err != nil { + res = append(res, err) + } + + if err := m.validateType(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1PlanCredit) validateExpiry(formats strfmt.Registry) error { + + if swag.IsZero(m.Expiry) { // not required + return nil + } + + if err := m.Expiry.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("expiry") + } + return err + } + + return nil +} + +func (m *V1PlanCredit) validateStart(formats strfmt.Registry) error { + + if swag.IsZero(m.Start) { // not required + return nil + } + + if err := m.Start.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("start") + } + return err + } + + return nil +} + +var v1PlanCreditTypeTypePropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["Pure","Alloy"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + v1PlanCreditTypeTypePropEnum = append(v1PlanCreditTypeTypePropEnum, v) + } +} + +const ( + + // V1PlanCreditTypePure captures enum value "Pure" + V1PlanCreditTypePure string = "Pure" + + // V1PlanCreditTypeAlloy captures enum value "Alloy" + V1PlanCreditTypeAlloy string = "Alloy" +) + +// prop value enum +func (m *V1PlanCredit) validateTypeEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, v1PlanCreditTypeTypePropEnum, true); err != nil { + return err + } + return nil +} + +func (m *V1PlanCredit) validateType(formats strfmt.Registry) error { + + if err := validate.Required("type", "body", m.Type); err != nil { + return err + } + + // value enum + if err := m.validateTypeEnum("type", "body", *m.Type); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1PlanCredit) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1PlanCredit) UnmarshalBinary(b []byte) error { + var res V1PlanCredit + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_pod_anti_affinity.go b/api/models/v1_pod_anti_affinity.go new file mode 100644 index 00000000..dd174d47 --- /dev/null +++ b/api/models/v1_pod_anti_affinity.go @@ -0,0 +1,112 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1PodAntiAffinity Pod anti affinity is a group of inter pod anti affinity scheduling rules. +// +// swagger:model v1PodAntiAffinity +type V1PodAntiAffinity struct { + + // The scheduler will prefer to schedule pods to nodes that satisfy the anti-affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling anti-affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred. + PreferredDuringSchedulingIgnoredDuringExecution []*V1VMWeightedPodAffinityTerm `json:"preferredDuringSchedulingIgnoredDuringExecution"` + + // If the anti-affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the anti-affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied. + RequiredDuringSchedulingIgnoredDuringExecution []*V1VMPodAffinityTerm `json:"requiredDuringSchedulingIgnoredDuringExecution"` +} + +// Validate validates this v1 pod anti affinity +func (m *V1PodAntiAffinity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validatePreferredDuringSchedulingIgnoredDuringExecution(formats); err != nil { + res = append(res, err) + } + + if err := m.validateRequiredDuringSchedulingIgnoredDuringExecution(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1PodAntiAffinity) validatePreferredDuringSchedulingIgnoredDuringExecution(formats strfmt.Registry) error { + + if swag.IsZero(m.PreferredDuringSchedulingIgnoredDuringExecution) { // not required + return nil + } + + for i := 0; i < len(m.PreferredDuringSchedulingIgnoredDuringExecution); i++ { + if swag.IsZero(m.PreferredDuringSchedulingIgnoredDuringExecution[i]) { // not required + continue + } + + if m.PreferredDuringSchedulingIgnoredDuringExecution[i] != nil { + if err := m.PreferredDuringSchedulingIgnoredDuringExecution[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("preferredDuringSchedulingIgnoredDuringExecution" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1PodAntiAffinity) validateRequiredDuringSchedulingIgnoredDuringExecution(formats strfmt.Registry) error { + + if swag.IsZero(m.RequiredDuringSchedulingIgnoredDuringExecution) { // not required + return nil + } + + for i := 0; i < len(m.RequiredDuringSchedulingIgnoredDuringExecution); i++ { + if swag.IsZero(m.RequiredDuringSchedulingIgnoredDuringExecution[i]) { // not required + continue + } + + if m.RequiredDuringSchedulingIgnoredDuringExecution[i] != nil { + if err := m.RequiredDuringSchedulingIgnoredDuringExecution[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("requiredDuringSchedulingIgnoredDuringExecution" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1PodAntiAffinity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1PodAntiAffinity) UnmarshalBinary(b []byte) error { + var res V1PodAntiAffinity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_pool.go b/api/models/v1_pool.go new file mode 100644 index 00000000..e765d52c --- /dev/null +++ b/api/models/v1_pool.go @@ -0,0 +1,86 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1Pool Pool defines IP ranges or with CIDR for available IPs Gateway, Prefix and Nameserver if provided, will overwrite values in IPPool +// +// swagger:model v1Pool +type V1Pool struct { + + // End is the last IP address that can be rendered. It is used as a validation that the rendered IP is in bound. + End string `json:"end,omitempty"` + + // Gateway is the gateway ip address + Gateway string `json:"gateway,omitempty"` + + // Nameserver provide information for dns resolvation + Nameserver *V1Nameserver `json:"nameserver,omitempty"` + + // Prefix is the mask of the network as integer (max 128) + Prefix int32 `json:"prefix,omitempty"` + + // Start is the first ip address that can be rendered + Start string `json:"start,omitempty"` + + // Subnet is used to validate that the rendered IP is in bounds. eg: 192.168.0.0/24 If Start value is not given, start value is derived from the subnet ip incremented by 1 (start value is `192.168.0.1` for subnet `192.168.0.0/24`) + Subnet string `json:"subnet,omitempty"` +} + +// Validate validates this v1 pool +func (m *V1Pool) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateNameserver(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1Pool) validateNameserver(formats strfmt.Registry) error { + + if swag.IsZero(m.Nameserver) { // not required + return nil + } + + if m.Nameserver != nil { + if err := m.Nameserver.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("nameserver") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1Pool) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1Pool) UnmarshalBinary(b []byte) error { + var res V1Pool + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_private_cloud_rate_config.go b/api/models/v1_private_cloud_rate_config.go new file mode 100644 index 00000000..56468f1d --- /dev/null +++ b/api/models/v1_private_cloud_rate_config.go @@ -0,0 +1,52 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1PrivateCloudRateConfig Private cloud rate config +// +// swagger:model v1PrivateCloudRateConfig +type V1PrivateCloudRateConfig struct { + + // cpu unit price per hour + CPUUnitPricePerHour float64 `json:"cpuUnitPricePerHour,omitempty"` + + // gpu unit price per hour + GpuUnitPricePerHour float64 `json:"gpuUnitPricePerHour,omitempty"` + + // memory unit price gi b per hour + MemoryUnitPriceGiBPerHour float64 `json:"memoryUnitPriceGiBPerHour,omitempty"` + + // storage unit price gi b per hour + StorageUnitPriceGiBPerHour float64 `json:"storageUnitPriceGiBPerHour,omitempty"` +} + +// Validate validates this v1 private cloud rate config +func (m *V1PrivateCloudRateConfig) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1PrivateCloudRateConfig) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1PrivateCloudRateConfig) UnmarshalBinary(b []byte) error { + var res V1PrivateCloudRateConfig + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_profile_meta_entity.go b/api/models/v1_profile_meta_entity.go new file mode 100644 index 00000000..933f6cfe --- /dev/null +++ b/api/models/v1_profile_meta_entity.go @@ -0,0 +1,98 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1ProfileMetaEntity Cluster profile metadata request payload +// +// swagger:model v1ProfileMetaEntity +type V1ProfileMetaEntity struct { + + // metadata + // Required: true + Metadata *V1ObjectMetaInputEntity `json:"metadata"` + + // spec + Spec *V1ClusterProfileSpecEntity `json:"spec,omitempty"` +} + +// Validate validates this v1 profile meta entity +func (m *V1ProfileMetaEntity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSpec(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ProfileMetaEntity) validateMetadata(formats strfmt.Registry) error { + + if err := validate.Required("metadata", "body", m.Metadata); err != nil { + return err + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } + return err + } + } + + return nil +} + +func (m *V1ProfileMetaEntity) validateSpec(formats strfmt.Registry) error { + + if swag.IsZero(m.Spec) { // not required + return nil + } + + if m.Spec != nil { + if err := m.Spec.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ProfileMetaEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ProfileMetaEntity) UnmarshalBinary(b []byte) error { + var res V1ProfileMetaEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_profile_resolved_values.go b/api/models/v1_profile_resolved_values.go new file mode 100644 index 00000000..06a39913 --- /dev/null +++ b/api/models/v1_profile_resolved_values.go @@ -0,0 +1,46 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ProfileResolvedValues Cluster profile resolved pack values +// +// swagger:model v1ProfileResolvedValues +type V1ProfileResolvedValues struct { + + // Cluster profile pack resolved values + Resolved map[string]string `json:"resolved,omitempty"` + + // Cluster profile uid + UID string `json:"uid,omitempty"` +} + +// Validate validates this v1 profile resolved values +func (m *V1ProfileResolvedValues) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1ProfileResolvedValues) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ProfileResolvedValues) UnmarshalBinary(b []byte) error { + var res V1ProfileResolvedValues + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_profile_status.go b/api/models/v1_profile_status.go new file mode 100644 index 00000000..29d208d4 --- /dev/null +++ b/api/models/v1_profile_status.go @@ -0,0 +1,43 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ProfileStatus v1 profile status +// +// swagger:model v1ProfileStatus +type V1ProfileStatus struct { + + // If it is true then profile pack values has a reference to user defined macros + HasUserMacros bool `json:"hasUserMacros"` +} + +// Validate validates this v1 profile status +func (m *V1ProfileStatus) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1ProfileStatus) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ProfileStatus) UnmarshalBinary(b []byte) error { + var res V1ProfileStatus + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_profile_template_summary.go b/api/models/v1_profile_template_summary.go new file mode 100644 index 00000000..bc6f95cc --- /dev/null +++ b/api/models/v1_profile_template_summary.go @@ -0,0 +1,95 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ProfileTemplateSummary Edge host clusterprofile template summary +// +// swagger:model v1ProfileTemplateSummary +type V1ProfileTemplateSummary struct { + + // cloud type + CloudType string `json:"cloudType,omitempty"` + + // name + Name string `json:"name,omitempty"` + + // packs + Packs []*V1PackRefSummary `json:"packs"` + + // type + Type string `json:"type,omitempty"` + + // uid + UID string `json:"uid,omitempty"` + + // version + Version string `json:"version,omitempty"` +} + +// Validate validates this v1 profile template summary +func (m *V1ProfileTemplateSummary) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validatePacks(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ProfileTemplateSummary) validatePacks(formats strfmt.Registry) error { + + if swag.IsZero(m.Packs) { // not required + return nil + } + + for i := 0; i < len(m.Packs); i++ { + if swag.IsZero(m.Packs[i]) { // not required + continue + } + + if m.Packs[i] != nil { + if err := m.Packs[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("packs" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ProfileTemplateSummary) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ProfileTemplateSummary) UnmarshalBinary(b []byte) error { + var res V1ProfileTemplateSummary + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_profile_type.go b/api/models/v1_profile_type.go new file mode 100644 index 00000000..54d63b3d --- /dev/null +++ b/api/models/v1_profile_type.go @@ -0,0 +1,69 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "encoding/json" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" +) + +// V1ProfileType v1 profile type +// +// swagger:model v1ProfileType +type V1ProfileType string + +const ( + + // V1ProfileTypeCluster captures enum value "cluster" + V1ProfileTypeCluster V1ProfileType = "cluster" + + // V1ProfileTypeInfra captures enum value "infra" + V1ProfileTypeInfra V1ProfileType = "infra" + + // V1ProfileTypeAddOn captures enum value "add-on" + V1ProfileTypeAddOn V1ProfileType = "add-on" + + // V1ProfileTypeSystem captures enum value "system" + V1ProfileTypeSystem V1ProfileType = "system" +) + +// for schema +var v1ProfileTypeEnum []interface{} + +func init() { + var res []V1ProfileType + if err := json.Unmarshal([]byte(`["cluster","infra","add-on","system"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + v1ProfileTypeEnum = append(v1ProfileTypeEnum, v) + } +} + +func (m V1ProfileType) validateV1ProfileTypeEnum(path, location string, value V1ProfileType) error { + if err := validate.EnumCase(path, location, value, v1ProfileTypeEnum, true); err != nil { + return err + } + return nil +} + +// Validate validates this v1 profile type +func (m V1ProfileType) Validate(formats strfmt.Registry) error { + var res []error + + // value enum + if err := m.validateV1ProfileTypeEnum("", "body", m); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/models/v1_project.go b/api/models/v1_project.go new file mode 100644 index 00000000..4a2240ad --- /dev/null +++ b/api/models/v1_project.go @@ -0,0 +1,121 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1Project Project information +// +// swagger:model v1Project +type V1Project struct { + + // metadata + Metadata *V1ObjectMeta `json:"metadata,omitempty"` + + // spec + Spec *V1ProjectSpec `json:"spec,omitempty"` + + // status + Status *V1ProjectStatus `json:"status,omitempty"` +} + +// Validate validates this v1 project +func (m *V1Project) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSpec(formats); err != nil { + res = append(res, err) + } + + if err := m.validateStatus(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1Project) validateMetadata(formats strfmt.Registry) error { + + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } + return err + } + } + + return nil +} + +func (m *V1Project) validateSpec(formats strfmt.Registry) error { + + if swag.IsZero(m.Spec) { // not required + return nil + } + + if m.Spec != nil { + if err := m.Spec.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec") + } + return err + } + } + + return nil +} + +func (m *V1Project) validateStatus(formats strfmt.Registry) error { + + if swag.IsZero(m.Status) { // not required + return nil + } + + if m.Status != nil { + if err := m.Status.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("status") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1Project) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1Project) UnmarshalBinary(b []byte) error { + var res V1Project + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_project_active_app_deployment.go b/api/models/v1_project_active_app_deployment.go new file mode 100644 index 00000000..fe011162 --- /dev/null +++ b/api/models/v1_project_active_app_deployment.go @@ -0,0 +1,74 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ProjectActiveAppDeployment Active app deployment +// +// swagger:model v1ProjectActiveAppDeployment +type V1ProjectActiveAppDeployment struct { + + // app ref + AppRef *V1ObjectEntity `json:"appRef,omitempty"` + + // state + State string `json:"state,omitempty"` +} + +// Validate validates this v1 project active app deployment +func (m *V1ProjectActiveAppDeployment) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateAppRef(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ProjectActiveAppDeployment) validateAppRef(formats strfmt.Registry) error { + + if swag.IsZero(m.AppRef) { // not required + return nil + } + + if m.AppRef != nil { + if err := m.AppRef.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("appRef") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ProjectActiveAppDeployment) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ProjectActiveAppDeployment) UnmarshalBinary(b []byte) error { + var res V1ProjectActiveAppDeployment + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_project_active_app_deployments.go b/api/models/v1_project_active_app_deployments.go new file mode 100644 index 00000000..932698af --- /dev/null +++ b/api/models/v1_project_active_app_deployments.go @@ -0,0 +1,83 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ProjectActiveAppDeployments Active app deployment +// +// swagger:model v1ProjectActiveAppDeployments +type V1ProjectActiveAppDeployments struct { + + // apps + Apps []*V1ProjectActiveAppDeployment `json:"apps"` + + // count + Count int32 `json:"count,omitempty"` +} + +// Validate validates this v1 project active app deployments +func (m *V1ProjectActiveAppDeployments) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateApps(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ProjectActiveAppDeployments) validateApps(formats strfmt.Registry) error { + + if swag.IsZero(m.Apps) { // not required + return nil + } + + for i := 0; i < len(m.Apps); i++ { + if swag.IsZero(m.Apps[i]) { // not required + continue + } + + if m.Apps[i] != nil { + if err := m.Apps[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("apps" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ProjectActiveAppDeployments) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ProjectActiveAppDeployments) UnmarshalBinary(b []byte) error { + var res V1ProjectActiveAppDeployments + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_project_active_cluster.go b/api/models/v1_project_active_cluster.go new file mode 100644 index 00000000..3e173092 --- /dev/null +++ b/api/models/v1_project_active_cluster.go @@ -0,0 +1,74 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ProjectActiveCluster Active clusters +// +// swagger:model v1ProjectActiveCluster +type V1ProjectActiveCluster struct { + + // cluster ref + ClusterRef *V1ObjectEntity `json:"clusterRef,omitempty"` + + // state + State string `json:"state,omitempty"` +} + +// Validate validates this v1 project active cluster +func (m *V1ProjectActiveCluster) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateClusterRef(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ProjectActiveCluster) validateClusterRef(formats strfmt.Registry) error { + + if swag.IsZero(m.ClusterRef) { // not required + return nil + } + + if m.ClusterRef != nil { + if err := m.ClusterRef.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("clusterRef") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ProjectActiveCluster) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ProjectActiveCluster) UnmarshalBinary(b []byte) error { + var res V1ProjectActiveCluster + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_project_active_clusters.go b/api/models/v1_project_active_clusters.go new file mode 100644 index 00000000..f0a99cdf --- /dev/null +++ b/api/models/v1_project_active_clusters.go @@ -0,0 +1,83 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ProjectActiveClusters Active clusters +// +// swagger:model v1ProjectActiveClusters +type V1ProjectActiveClusters struct { + + // clusters + Clusters []*V1ProjectActiveCluster `json:"clusters"` + + // count + Count int32 `json:"count,omitempty"` +} + +// Validate validates this v1 project active clusters +func (m *V1ProjectActiveClusters) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateClusters(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ProjectActiveClusters) validateClusters(formats strfmt.Registry) error { + + if swag.IsZero(m.Clusters) { // not required + return nil + } + + for i := 0; i < len(m.Clusters); i++ { + if swag.IsZero(m.Clusters[i]) { // not required + continue + } + + if m.Clusters[i] != nil { + if err := m.Clusters[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("clusters" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ProjectActiveClusters) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ProjectActiveClusters) UnmarshalBinary(b []byte) error { + var res V1ProjectActiveClusters + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_project_active_resources.go b/api/models/v1_project_active_resources.go new file mode 100644 index 00000000..73bae249 --- /dev/null +++ b/api/models/v1_project_active_resources.go @@ -0,0 +1,121 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ProjectActiveResources Active project resources +// +// swagger:model v1ProjectActiveResources +type V1ProjectActiveResources struct { + + // app deployments + AppDeployments *V1ProjectActiveAppDeployments `json:"appDeployments,omitempty"` + + // clusters + Clusters *V1ProjectActiveClusters `json:"clusters,omitempty"` + + // virtual clusters + VirtualClusters *V1ProjectActiveClusters `json:"virtualClusters,omitempty"` +} + +// Validate validates this v1 project active resources +func (m *V1ProjectActiveResources) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateAppDeployments(formats); err != nil { + res = append(res, err) + } + + if err := m.validateClusters(formats); err != nil { + res = append(res, err) + } + + if err := m.validateVirtualClusters(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ProjectActiveResources) validateAppDeployments(formats strfmt.Registry) error { + + if swag.IsZero(m.AppDeployments) { // not required + return nil + } + + if m.AppDeployments != nil { + if err := m.AppDeployments.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("appDeployments") + } + return err + } + } + + return nil +} + +func (m *V1ProjectActiveResources) validateClusters(formats strfmt.Registry) error { + + if swag.IsZero(m.Clusters) { // not required + return nil + } + + if m.Clusters != nil { + if err := m.Clusters.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("clusters") + } + return err + } + } + + return nil +} + +func (m *V1ProjectActiveResources) validateVirtualClusters(formats strfmt.Registry) error { + + if swag.IsZero(m.VirtualClusters) { // not required + return nil + } + + if m.VirtualClusters != nil { + if err := m.VirtualClusters.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("virtualClusters") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ProjectActiveResources) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ProjectActiveResources) UnmarshalBinary(b []byte) error { + var res V1ProjectActiveResources + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_project_alert_component.go b/api/models/v1_project_alert_component.go new file mode 100644 index 00000000..83a5c371 --- /dev/null +++ b/api/models/v1_project_alert_component.go @@ -0,0 +1,49 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ProjectAlertComponent Project alert component +// +// swagger:model v1ProjectAlertComponent +type V1ProjectAlertComponent struct { + + // description + Description string `json:"description,omitempty"` + + // name + Name string `json:"name,omitempty"` + + // supported channels + SupportedChannels []string `json:"supportedChannels"` +} + +// Validate validates this v1 project alert component +func (m *V1ProjectAlertComponent) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1ProjectAlertComponent) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ProjectAlertComponent) UnmarshalBinary(b []byte) error { + var res V1ProjectAlertComponent + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_project_alert_components.go b/api/models/v1_project_alert_components.go new file mode 100644 index 00000000..009b978a --- /dev/null +++ b/api/models/v1_project_alert_components.go @@ -0,0 +1,80 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ProjectAlertComponents Supported project alerts component +// +// swagger:model v1ProjectAlertComponents +type V1ProjectAlertComponents struct { + + // components + Components []*V1ProjectAlertComponent `json:"components"` +} + +// Validate validates this v1 project alert components +func (m *V1ProjectAlertComponents) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateComponents(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ProjectAlertComponents) validateComponents(formats strfmt.Registry) error { + + if swag.IsZero(m.Components) { // not required + return nil + } + + for i := 0; i < len(m.Components); i++ { + if swag.IsZero(m.Components[i]) { // not required + continue + } + + if m.Components[i] != nil { + if err := m.Components[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("components" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ProjectAlertComponents) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ProjectAlertComponents) UnmarshalBinary(b []byte) error { + var res V1ProjectAlertComponents + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_project_clean_up_status.go b/api/models/v1_project_clean_up_status.go new file mode 100644 index 00000000..b8e70a8e --- /dev/null +++ b/api/models/v1_project_clean_up_status.go @@ -0,0 +1,49 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ProjectCleanUpStatus Project cleanup status +// +// swagger:model v1ProjectCleanUpStatus +type V1ProjectCleanUpStatus struct { + + // cleaned resources + CleanedResources []string `json:"cleanedResources"` + + // msg + Msg string `json:"msg,omitempty"` + + // state + State string `json:"state,omitempty"` +} + +// Validate validates this v1 project clean up status +func (m *V1ProjectCleanUpStatus) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1ProjectCleanUpStatus) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ProjectCleanUpStatus) UnmarshalBinary(b []byte) error { + var res V1ProjectCleanUpStatus + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_project_cleanup.go b/api/models/v1_project_cleanup.go new file mode 100644 index 00000000..2f0505bc --- /dev/null +++ b/api/models/v1_project_cleanup.go @@ -0,0 +1,46 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ProjectCleanup Project delete request payload +// +// swagger:model v1ProjectCleanup +type V1ProjectCleanup struct { + + // deleting cluster duration threshold in min + DeletingClusterDurationThresholdInMin int32 `json:"deletingClusterDurationThresholdInMin,omitempty"` + + // provisioning cluster duration threshold in min + ProvisioningClusterDurationThresholdInMin int32 `json:"provisioningClusterDurationThresholdInMin,omitempty"` +} + +// Validate validates this v1 project cleanup +func (m *V1ProjectCleanup) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1ProjectCleanup) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ProjectCleanup) UnmarshalBinary(b []byte) error { + var res V1ProjectCleanup + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_project_cluster_settings.go b/api/models/v1_project_cluster_settings.go new file mode 100644 index 00000000..a1c02fa7 --- /dev/null +++ b/api/models/v1_project_cluster_settings.go @@ -0,0 +1,96 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ProjectClusterSettings v1 project cluster settings +// +// swagger:model v1ProjectClusterSettings +type V1ProjectClusterSettings struct { + + // nodes auto remediation setting + NodesAutoRemediationSetting *V1NodesAutoRemediationSettings `json:"nodesAutoRemediationSetting,omitempty"` + + // tenant cluster settings + TenantClusterSettings *V1TenantClusterSettings `json:"tenantClusterSettings,omitempty"` +} + +// Validate validates this v1 project cluster settings +func (m *V1ProjectClusterSettings) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateNodesAutoRemediationSetting(formats); err != nil { + res = append(res, err) + } + + if err := m.validateTenantClusterSettings(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ProjectClusterSettings) validateNodesAutoRemediationSetting(formats strfmt.Registry) error { + + if swag.IsZero(m.NodesAutoRemediationSetting) { // not required + return nil + } + + if m.NodesAutoRemediationSetting != nil { + if err := m.NodesAutoRemediationSetting.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("nodesAutoRemediationSetting") + } + return err + } + } + + return nil +} + +func (m *V1ProjectClusterSettings) validateTenantClusterSettings(formats strfmt.Registry) error { + + if swag.IsZero(m.TenantClusterSettings) { // not required + return nil + } + + if m.TenantClusterSettings != nil { + if err := m.TenantClusterSettings.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("tenantClusterSettings") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ProjectClusterSettings) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ProjectClusterSettings) UnmarshalBinary(b []byte) error { + var res V1ProjectClusterSettings + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_project_entity.go b/api/models/v1_project_entity.go new file mode 100644 index 00000000..8fa838c3 --- /dev/null +++ b/api/models/v1_project_entity.go @@ -0,0 +1,96 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ProjectEntity Project information +// +// swagger:model v1ProjectEntity +type V1ProjectEntity struct { + + // metadata + Metadata *V1ObjectMeta `json:"metadata,omitempty"` + + // spec + Spec *V1ProjectEntitySpec `json:"spec,omitempty"` +} + +// Validate validates this v1 project entity +func (m *V1ProjectEntity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSpec(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ProjectEntity) validateMetadata(formats strfmt.Registry) error { + + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } + return err + } + } + + return nil +} + +func (m *V1ProjectEntity) validateSpec(formats strfmt.Registry) error { + + if swag.IsZero(m.Spec) { // not required + return nil + } + + if m.Spec != nil { + if err := m.Spec.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ProjectEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ProjectEntity) UnmarshalBinary(b []byte) error { + var res V1ProjectEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_project_entity_spec.go b/api/models/v1_project_entity_spec.go new file mode 100644 index 00000000..d1ccffd8 --- /dev/null +++ b/api/models/v1_project_entity_spec.go @@ -0,0 +1,126 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1ProjectEntitySpec Project specifications +// +// swagger:model v1ProjectEntitySpec +type V1ProjectEntitySpec struct { + + // logo Uid + LogoUID string `json:"logoUid,omitempty"` + + // teams + // Unique: true + Teams []*V1TeamRoleMap `json:"teams"` + + // users + // Unique: true + Users []*V1UserRoleMap `json:"users"` +} + +// Validate validates this v1 project entity spec +func (m *V1ProjectEntitySpec) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateTeams(formats); err != nil { + res = append(res, err) + } + + if err := m.validateUsers(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ProjectEntitySpec) validateTeams(formats strfmt.Registry) error { + + if swag.IsZero(m.Teams) { // not required + return nil + } + + if err := validate.UniqueItems("teams", "body", m.Teams); err != nil { + return err + } + + for i := 0; i < len(m.Teams); i++ { + if swag.IsZero(m.Teams[i]) { // not required + continue + } + + if m.Teams[i] != nil { + if err := m.Teams[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("teams" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1ProjectEntitySpec) validateUsers(formats strfmt.Registry) error { + + if swag.IsZero(m.Users) { // not required + return nil + } + + if err := validate.UniqueItems("users", "body", m.Users); err != nil { + return err + } + + for i := 0; i < len(m.Users); i++ { + if swag.IsZero(m.Users[i]) { // not required + continue + } + + if m.Users[i] != nil { + if err := m.Users[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("users" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ProjectEntitySpec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ProjectEntitySpec) UnmarshalBinary(b []byte) error { + var res V1ProjectEntitySpec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_project_filter_sort_fields.go b/api/models/v1_project_filter_sort_fields.go new file mode 100644 index 00000000..ba968641 --- /dev/null +++ b/api/models/v1_project_filter_sort_fields.go @@ -0,0 +1,66 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "encoding/json" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" +) + +// V1ProjectFilterSortFields v1 project filter sort fields +// +// swagger:model v1ProjectFilterSortFields +type V1ProjectFilterSortFields string + +const ( + + // V1ProjectFilterSortFieldsName captures enum value "name" + V1ProjectFilterSortFieldsName V1ProjectFilterSortFields = "name" + + // V1ProjectFilterSortFieldsCreationTimestamp captures enum value "creationTimestamp" + V1ProjectFilterSortFieldsCreationTimestamp V1ProjectFilterSortFields = "creationTimestamp" + + // V1ProjectFilterSortFieldsLastModifiedTimestamp captures enum value "lastModifiedTimestamp" + V1ProjectFilterSortFieldsLastModifiedTimestamp V1ProjectFilterSortFields = "lastModifiedTimestamp" +) + +// for schema +var v1ProjectFilterSortFieldsEnum []interface{} + +func init() { + var res []V1ProjectFilterSortFields + if err := json.Unmarshal([]byte(`["name","creationTimestamp","lastModifiedTimestamp"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + v1ProjectFilterSortFieldsEnum = append(v1ProjectFilterSortFieldsEnum, v) + } +} + +func (m V1ProjectFilterSortFields) validateV1ProjectFilterSortFieldsEnum(path, location string, value V1ProjectFilterSortFields) error { + if err := validate.EnumCase(path, location, value, v1ProjectFilterSortFieldsEnum, true); err != nil { + return err + } + return nil +} + +// Validate validates this v1 project filter sort fields +func (m V1ProjectFilterSortFields) Validate(formats strfmt.Registry) error { + var res []error + + // value enum + if err := m.validateV1ProjectFilterSortFieldsEnum("", "body", m); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/models/v1_project_filter_sort_spec.go b/api/models/v1_project_filter_sort_spec.go new file mode 100644 index 00000000..ad3ba723 --- /dev/null +++ b/api/models/v1_project_filter_sort_spec.go @@ -0,0 +1,94 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ProjectFilterSortSpec v1 project filter sort spec +// +// swagger:model v1ProjectFilterSortSpec +type V1ProjectFilterSortSpec struct { + + // field + Field *V1ProjectFilterSortFields `json:"field,omitempty"` + + // order + Order V1SortOrder `json:"order,omitempty"` +} + +// Validate validates this v1 project filter sort spec +func (m *V1ProjectFilterSortSpec) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateField(formats); err != nil { + res = append(res, err) + } + + if err := m.validateOrder(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ProjectFilterSortSpec) validateField(formats strfmt.Registry) error { + + if swag.IsZero(m.Field) { // not required + return nil + } + + if m.Field != nil { + if err := m.Field.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("field") + } + return err + } + } + + return nil +} + +func (m *V1ProjectFilterSortSpec) validateOrder(formats strfmt.Registry) error { + + if swag.IsZero(m.Order) { // not required + return nil + } + + if err := m.Order.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("order") + } + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ProjectFilterSortSpec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ProjectFilterSortSpec) UnmarshalBinary(b []byte) error { + var res V1ProjectFilterSortSpec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_project_filter_spec.go b/api/models/v1_project_filter_spec.go new file mode 100644 index 00000000..811b78bf --- /dev/null +++ b/api/models/v1_project_filter_spec.go @@ -0,0 +1,71 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ProjectFilterSpec Project filter spec +// +// swagger:model v1ProjectFilterSpec +type V1ProjectFilterSpec struct { + + // name + Name *V1FilterString `json:"name,omitempty"` +} + +// Validate validates this v1 project filter spec +func (m *V1ProjectFilterSpec) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateName(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ProjectFilterSpec) validateName(formats strfmt.Registry) error { + + if swag.IsZero(m.Name) { // not required + return nil + } + + if m.Name != nil { + if err := m.Name.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("name") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ProjectFilterSpec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ProjectFilterSpec) UnmarshalBinary(b []byte) error { + var res V1ProjectFilterSpec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_project_meta.go b/api/models/v1_project_meta.go new file mode 100644 index 00000000..709053f1 --- /dev/null +++ b/api/models/v1_project_meta.go @@ -0,0 +1,46 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ProjectMeta v1 project meta +// +// swagger:model v1ProjectMeta +type V1ProjectMeta struct { + + // name + Name string `json:"name,omitempty"` + + // uid + UID string `json:"uid,omitempty"` +} + +// Validate validates this v1 project meta +func (m *V1ProjectMeta) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1ProjectMeta) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ProjectMeta) UnmarshalBinary(b []byte) error { + var res V1ProjectMeta + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_project_metadata.go b/api/models/v1_project_metadata.go new file mode 100644 index 00000000..fe887914 --- /dev/null +++ b/api/models/v1_project_metadata.go @@ -0,0 +1,71 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ProjectMetadata Project metadata +// +// swagger:model v1ProjectMetadata +type V1ProjectMetadata struct { + + // metadata + Metadata *V1ObjectEntity `json:"metadata,omitempty"` +} + +// Validate validates this v1 project metadata +func (m *V1ProjectMetadata) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ProjectMetadata) validateMetadata(formats strfmt.Registry) error { + + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ProjectMetadata) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ProjectMetadata) UnmarshalBinary(b []byte) error { + var res V1ProjectMetadata + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_project_roles_entity.go b/api/models/v1_project_roles_entity.go new file mode 100644 index 00000000..78963644 --- /dev/null +++ b/api/models/v1_project_roles_entity.go @@ -0,0 +1,80 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ProjectRolesEntity v1 project roles entity +// +// swagger:model v1ProjectRolesEntity +type V1ProjectRolesEntity struct { + + // projects + Projects []*V1UIDRoleSummary `json:"projects"` +} + +// Validate validates this v1 project roles entity +func (m *V1ProjectRolesEntity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateProjects(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ProjectRolesEntity) validateProjects(formats strfmt.Registry) error { + + if swag.IsZero(m.Projects) { // not required + return nil + } + + for i := 0; i < len(m.Projects); i++ { + if swag.IsZero(m.Projects[i]) { // not required + continue + } + + if m.Projects[i] != nil { + if err := m.Projects[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("projects" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ProjectRolesEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ProjectRolesEntity) UnmarshalBinary(b []byte) error { + var res V1ProjectRolesEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_project_roles_patch.go b/api/models/v1_project_roles_patch.go new file mode 100644 index 00000000..fd03c17e --- /dev/null +++ b/api/models/v1_project_roles_patch.go @@ -0,0 +1,115 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ProjectRolesPatch v1 project roles patch +// +// swagger:model v1ProjectRolesPatch +type V1ProjectRolesPatch struct { + + // projects + Projects []*V1ProjectRolesPatchProjectsItems0 `json:"projects"` +} + +// Validate validates this v1 project roles patch +func (m *V1ProjectRolesPatch) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateProjects(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ProjectRolesPatch) validateProjects(formats strfmt.Registry) error { + + if swag.IsZero(m.Projects) { // not required + return nil + } + + for i := 0; i < len(m.Projects); i++ { + if swag.IsZero(m.Projects[i]) { // not required + continue + } + + if m.Projects[i] != nil { + if err := m.Projects[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("projects" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ProjectRolesPatch) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ProjectRolesPatch) UnmarshalBinary(b []byte) error { + var res V1ProjectRolesPatch + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} + +// V1ProjectRolesPatchProjectsItems0 v1 project roles patch projects items0 +// +// swagger:model V1ProjectRolesPatchProjectsItems0 +type V1ProjectRolesPatchProjectsItems0 struct { + + // project Uid + ProjectUID string `json:"projectUid,omitempty"` + + // roles + Roles []string `json:"roles"` +} + +// Validate validates this v1 project roles patch projects items0 +func (m *V1ProjectRolesPatchProjectsItems0) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1ProjectRolesPatchProjectsItems0) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ProjectRolesPatchProjectsItems0) UnmarshalBinary(b []byte) error { + var res V1ProjectRolesPatchProjectsItems0 + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_project_spec.go b/api/models/v1_project_spec.go new file mode 100644 index 00000000..3570e715 --- /dev/null +++ b/api/models/v1_project_spec.go @@ -0,0 +1,163 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1ProjectSpec Project specifications +// +// swagger:model v1ProjectSpec +type V1ProjectSpec struct { + + // alerts + // Unique: true + Alerts []*V1Alert `json:"alerts"` + + // logo Url + LogoURL string `json:"logoUrl,omitempty"` + + // teams + // Unique: true + Teams []*V1TeamRoleMap `json:"teams"` + + // users + // Unique: true + Users []*V1UserRoleMap `json:"users"` +} + +// Validate validates this v1 project spec +func (m *V1ProjectSpec) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateAlerts(formats); err != nil { + res = append(res, err) + } + + if err := m.validateTeams(formats); err != nil { + res = append(res, err) + } + + if err := m.validateUsers(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ProjectSpec) validateAlerts(formats strfmt.Registry) error { + + if swag.IsZero(m.Alerts) { // not required + return nil + } + + if err := validate.UniqueItems("alerts", "body", m.Alerts); err != nil { + return err + } + + for i := 0; i < len(m.Alerts); i++ { + if swag.IsZero(m.Alerts[i]) { // not required + continue + } + + if m.Alerts[i] != nil { + if err := m.Alerts[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("alerts" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1ProjectSpec) validateTeams(formats strfmt.Registry) error { + + if swag.IsZero(m.Teams) { // not required + return nil + } + + if err := validate.UniqueItems("teams", "body", m.Teams); err != nil { + return err + } + + for i := 0; i < len(m.Teams); i++ { + if swag.IsZero(m.Teams[i]) { // not required + continue + } + + if m.Teams[i] != nil { + if err := m.Teams[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("teams" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1ProjectSpec) validateUsers(formats strfmt.Registry) error { + + if swag.IsZero(m.Users) { // not required + return nil + } + + if err := validate.UniqueItems("users", "body", m.Users); err != nil { + return err + } + + for i := 0; i < len(m.Users); i++ { + if swag.IsZero(m.Users[i]) { // not required + continue + } + + if m.Users[i] != nil { + if err := m.Users[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("users" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ProjectSpec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ProjectSpec) UnmarshalBinary(b []byte) error { + var res V1ProjectSpec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_project_spec_summary.go b/api/models/v1_project_spec_summary.go new file mode 100644 index 00000000..a7dc7bc1 --- /dev/null +++ b/api/models/v1_project_spec_summary.go @@ -0,0 +1,115 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ProjectSpecSummary v1 project spec summary +// +// swagger:model v1ProjectSpecSummary +type V1ProjectSpecSummary struct { + + // logo Url + LogoURL string `json:"logoUrl,omitempty"` + + // teams + Teams []*V1UIDSummary `json:"teams"` + + // users + Users []*V1UIDSummary `json:"users"` +} + +// Validate validates this v1 project spec summary +func (m *V1ProjectSpecSummary) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateTeams(formats); err != nil { + res = append(res, err) + } + + if err := m.validateUsers(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ProjectSpecSummary) validateTeams(formats strfmt.Registry) error { + + if swag.IsZero(m.Teams) { // not required + return nil + } + + for i := 0; i < len(m.Teams); i++ { + if swag.IsZero(m.Teams[i]) { // not required + continue + } + + if m.Teams[i] != nil { + if err := m.Teams[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("teams" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1ProjectSpecSummary) validateUsers(formats strfmt.Registry) error { + + if swag.IsZero(m.Users) { // not required + return nil + } + + for i := 0; i < len(m.Users); i++ { + if swag.IsZero(m.Users[i]) { // not required + continue + } + + if m.Users[i] != nil { + if err := m.Users[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("users" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ProjectSpecSummary) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ProjectSpecSummary) UnmarshalBinary(b []byte) error { + var res V1ProjectSpecSummary + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_project_status.go b/api/models/v1_project_status.go new file mode 100644 index 00000000..03cc017a --- /dev/null +++ b/api/models/v1_project_status.go @@ -0,0 +1,74 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ProjectStatus Project status +// +// swagger:model v1ProjectStatus +type V1ProjectStatus struct { + + // clean up status + CleanUpStatus *V1ProjectCleanUpStatus `json:"cleanUpStatus,omitempty"` + + // is disabled + IsDisabled bool `json:"isDisabled,omitempty"` +} + +// Validate validates this v1 project status +func (m *V1ProjectStatus) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateCleanUpStatus(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ProjectStatus) validateCleanUpStatus(formats strfmt.Registry) error { + + if swag.IsZero(m.CleanUpStatus) { // not required + return nil + } + + if m.CleanUpStatus != nil { + if err := m.CleanUpStatus.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("cleanUpStatus") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ProjectStatus) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ProjectStatus) UnmarshalBinary(b []byte) error { + var res V1ProjectStatus + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_project_status_summary.go b/api/models/v1_project_status_summary.go new file mode 100644 index 00000000..ddc12e63 --- /dev/null +++ b/api/models/v1_project_status_summary.go @@ -0,0 +1,121 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ProjectStatusSummary Project status summary +// +// swagger:model v1ProjectStatusSummary +type V1ProjectStatusSummary struct { + + // clusters health + ClustersHealth *V1SpectroClustersHealth `json:"clustersHealth,omitempty"` + + // status + Status *V1ProjectStatus `json:"status,omitempty"` + + // usage + Usage *V1ProjectUsageSummary `json:"usage,omitempty"` +} + +// Validate validates this v1 project status summary +func (m *V1ProjectStatusSummary) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateClustersHealth(formats); err != nil { + res = append(res, err) + } + + if err := m.validateStatus(formats); err != nil { + res = append(res, err) + } + + if err := m.validateUsage(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ProjectStatusSummary) validateClustersHealth(formats strfmt.Registry) error { + + if swag.IsZero(m.ClustersHealth) { // not required + return nil + } + + if m.ClustersHealth != nil { + if err := m.ClustersHealth.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("clustersHealth") + } + return err + } + } + + return nil +} + +func (m *V1ProjectStatusSummary) validateStatus(formats strfmt.Registry) error { + + if swag.IsZero(m.Status) { // not required + return nil + } + + if m.Status != nil { + if err := m.Status.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("status") + } + return err + } + } + + return nil +} + +func (m *V1ProjectStatusSummary) validateUsage(formats strfmt.Registry) error { + + if swag.IsZero(m.Usage) { // not required + return nil + } + + if m.Usage != nil { + if err := m.Usage.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("usage") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ProjectStatusSummary) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ProjectStatusSummary) UnmarshalBinary(b []byte) error { + var res V1ProjectStatusSummary + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_project_summary.go b/api/models/v1_project_summary.go new file mode 100644 index 00000000..be3a164e --- /dev/null +++ b/api/models/v1_project_summary.go @@ -0,0 +1,121 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ProjectSummary Project summary +// +// swagger:model v1ProjectSummary +type V1ProjectSummary struct { + + // metadata + Metadata *V1ObjectMeta `json:"metadata,omitempty"` + + // Project spec summary + SpecSummary *V1ProjectSpecSummary `json:"specSummary,omitempty"` + + // Project status summary + Status *V1ProjectStatusSummary `json:"status,omitempty"` +} + +// Validate validates this v1 project summary +func (m *V1ProjectSummary) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSpecSummary(formats); err != nil { + res = append(res, err) + } + + if err := m.validateStatus(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ProjectSummary) validateMetadata(formats strfmt.Registry) error { + + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } + return err + } + } + + return nil +} + +func (m *V1ProjectSummary) validateSpecSummary(formats strfmt.Registry) error { + + if swag.IsZero(m.SpecSummary) { // not required + return nil + } + + if m.SpecSummary != nil { + if err := m.SpecSummary.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("specSummary") + } + return err + } + } + + return nil +} + +func (m *V1ProjectSummary) validateStatus(formats strfmt.Registry) error { + + if swag.IsZero(m.Status) { // not required + return nil + } + + if m.Status != nil { + if err := m.Status.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("status") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ProjectSummary) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ProjectSummary) UnmarshalBinary(b []byte) error { + var res V1ProjectSummary + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_project_teams_entity.go b/api/models/v1_project_teams_entity.go new file mode 100644 index 00000000..d63b9717 --- /dev/null +++ b/api/models/v1_project_teams_entity.go @@ -0,0 +1,86 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1ProjectTeamsEntity v1 project teams entity +// +// swagger:model v1ProjectTeamsEntity +type V1ProjectTeamsEntity struct { + + // teams + // Unique: true + Teams []*V1TeamRoleMap `json:"teams"` +} + +// Validate validates this v1 project teams entity +func (m *V1ProjectTeamsEntity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateTeams(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ProjectTeamsEntity) validateTeams(formats strfmt.Registry) error { + + if swag.IsZero(m.Teams) { // not required + return nil + } + + if err := validate.UniqueItems("teams", "body", m.Teams); err != nil { + return err + } + + for i := 0; i < len(m.Teams); i++ { + if swag.IsZero(m.Teams[i]) { // not required + continue + } + + if m.Teams[i] != nil { + if err := m.Teams[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("teams" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ProjectTeamsEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ProjectTeamsEntity) UnmarshalBinary(b []byte) error { + var res V1ProjectTeamsEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_project_usage.go b/api/models/v1_project_usage.go new file mode 100644 index 00000000..fa60f355 --- /dev/null +++ b/api/models/v1_project_usage.go @@ -0,0 +1,96 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ProjectUsage Project usage object +// +// swagger:model v1ProjectUsage +type V1ProjectUsage struct { + + // alloy + Alloy *V1ProjectUsageData `json:"alloy,omitempty"` + + // pure + Pure *V1ProjectUsageData `json:"pure,omitempty"` +} + +// Validate validates this v1 project usage +func (m *V1ProjectUsage) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateAlloy(formats); err != nil { + res = append(res, err) + } + + if err := m.validatePure(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ProjectUsage) validateAlloy(formats strfmt.Registry) error { + + if swag.IsZero(m.Alloy) { // not required + return nil + } + + if m.Alloy != nil { + if err := m.Alloy.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("alloy") + } + return err + } + } + + return nil +} + +func (m *V1ProjectUsage) validatePure(formats strfmt.Registry) error { + + if swag.IsZero(m.Pure) { // not required + return nil + } + + if m.Pure != nil { + if err := m.Pure.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("pure") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ProjectUsage) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ProjectUsage) UnmarshalBinary(b []byte) error { + var res V1ProjectUsage + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_project_usage_data.go b/api/models/v1_project_usage_data.go new file mode 100644 index 00000000..2ae773b1 --- /dev/null +++ b/api/models/v1_project_usage_data.go @@ -0,0 +1,49 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ProjectUsageData Project usage data object +// +// swagger:model v1ProjectUsageData +type V1ProjectUsageData struct { + + // Billing amount for the project + Amount float64 `json:"amount,omitempty"` + + // Tier price based on the usage + TierPrice float64 `json:"tierPrice,omitempty"` + + // Project used credits + UsedCredits float64 `json:"usedCredits,omitempty"` +} + +// Validate validates this v1 project usage data +func (m *V1ProjectUsageData) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1ProjectUsageData) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ProjectUsageData) UnmarshalBinary(b []byte) error { + var res V1ProjectUsageData + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_project_usage_summary.go b/api/models/v1_project_usage_summary.go new file mode 100644 index 00000000..594108f7 --- /dev/null +++ b/api/models/v1_project_usage_summary.go @@ -0,0 +1,86 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ProjectUsageSummary Project usage summary +// +// swagger:model v1ProjectUsageSummary +type V1ProjectUsageSummary struct { + + // alloy Cpu cores + AlloyCPUCores float64 `json:"alloyCpuCores"` + + // clusters + Clusters []*V1ClusterUsageSummary `json:"clusters"` + + // pure Cpu cores + PureCPUCores float64 `json:"pureCpuCores"` +} + +// Validate validates this v1 project usage summary +func (m *V1ProjectUsageSummary) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateClusters(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ProjectUsageSummary) validateClusters(formats strfmt.Registry) error { + + if swag.IsZero(m.Clusters) { // not required + return nil + } + + for i := 0; i < len(m.Clusters); i++ { + if swag.IsZero(m.Clusters[i]) { // not required + continue + } + + if m.Clusters[i] != nil { + if err := m.Clusters[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("clusters" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ProjectUsageSummary) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ProjectUsageSummary) UnmarshalBinary(b []byte) error { + var res V1ProjectUsageSummary + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_project_users_entity.go b/api/models/v1_project_users_entity.go new file mode 100644 index 00000000..e45c750d --- /dev/null +++ b/api/models/v1_project_users_entity.go @@ -0,0 +1,86 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1ProjectUsersEntity v1 project users entity +// +// swagger:model v1ProjectUsersEntity +type V1ProjectUsersEntity struct { + + // users + // Unique: true + Users []*V1UserRoleMap `json:"users"` +} + +// Validate validates this v1 project users entity +func (m *V1ProjectUsersEntity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateUsers(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ProjectUsersEntity) validateUsers(formats strfmt.Registry) error { + + if swag.IsZero(m.Users) { // not required + return nil + } + + if err := validate.UniqueItems("users", "body", m.Users); err != nil { + return err + } + + for i := 0; i < len(m.Users); i++ { + if swag.IsZero(m.Users[i]) { // not required + continue + } + + if m.Users[i] != nil { + if err := m.Users[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("users" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ProjectUsersEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ProjectUsersEntity) UnmarshalBinary(b []byte) error { + var res V1ProjectUsersEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_projects_filter_spec.go b/api/models/v1_projects_filter_spec.go new file mode 100644 index 00000000..0bf84d01 --- /dev/null +++ b/api/models/v1_projects_filter_spec.go @@ -0,0 +1,111 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1ProjectsFilterSpec Project filter summary spec +// +// swagger:model v1ProjectsFilterSpec +type V1ProjectsFilterSpec struct { + + // filter + Filter *V1ProjectFilterSpec `json:"filter,omitempty"` + + // sort + // Unique: true + Sort []*V1ProjectFilterSortSpec `json:"sort"` +} + +// Validate validates this v1 projects filter spec +func (m *V1ProjectsFilterSpec) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateFilter(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSort(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ProjectsFilterSpec) validateFilter(formats strfmt.Registry) error { + + if swag.IsZero(m.Filter) { // not required + return nil + } + + if m.Filter != nil { + if err := m.Filter.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("filter") + } + return err + } + } + + return nil +} + +func (m *V1ProjectsFilterSpec) validateSort(formats strfmt.Registry) error { + + if swag.IsZero(m.Sort) { // not required + return nil + } + + if err := validate.UniqueItems("sort", "body", m.Sort); err != nil { + return err + } + + for i := 0; i < len(m.Sort); i++ { + if swag.IsZero(m.Sort[i]) { // not required + continue + } + + if m.Sort[i] != nil { + if err := m.Sort[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("sort" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ProjectsFilterSpec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ProjectsFilterSpec) UnmarshalBinary(b []byte) error { + var res V1ProjectsFilterSpec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_projects_metadata.go b/api/models/v1_projects_metadata.go new file mode 100644 index 00000000..77c36a3c --- /dev/null +++ b/api/models/v1_projects_metadata.go @@ -0,0 +1,87 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1ProjectsMetadata v1 projects metadata +// +// swagger:model v1ProjectsMetadata +type V1ProjectsMetadata struct { + + // items + // Required: true + // Unique: true + Items []*V1ProjectMetadata `json:"items"` +} + +// Validate validates this v1 projects metadata +func (m *V1ProjectsMetadata) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateItems(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ProjectsMetadata) validateItems(formats strfmt.Registry) error { + + if err := validate.Required("items", "body", m.Items); err != nil { + return err + } + + if err := validate.UniqueItems("items", "body", m.Items); err != nil { + return err + } + + for i := 0; i < len(m.Items); i++ { + if swag.IsZero(m.Items[i]) { // not required + continue + } + + if m.Items[i] != nil { + if err := m.Items[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("items" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ProjectsMetadata) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ProjectsMetadata) UnmarshalBinary(b []byte) error { + var res V1ProjectsMetadata + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_projects_summary.go b/api/models/v1_projects_summary.go new file mode 100644 index 00000000..55285b7a --- /dev/null +++ b/api/models/v1_projects_summary.go @@ -0,0 +1,112 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1ProjectsSummary v1 projects summary +// +// swagger:model v1ProjectsSummary +type V1ProjectsSummary struct { + + // items + // Required: true + // Unique: true + Items []*V1ProjectSummary `json:"items"` + + // listmeta + Listmeta *V1ListMetaData `json:"listmeta,omitempty"` +} + +// Validate validates this v1 projects summary +func (m *V1ProjectsSummary) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateItems(formats); err != nil { + res = append(res, err) + } + + if err := m.validateListmeta(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ProjectsSummary) validateItems(formats strfmt.Registry) error { + + if err := validate.Required("items", "body", m.Items); err != nil { + return err + } + + if err := validate.UniqueItems("items", "body", m.Items); err != nil { + return err + } + + for i := 0; i < len(m.Items); i++ { + if swag.IsZero(m.Items[i]) { // not required + continue + } + + if m.Items[i] != nil { + if err := m.Items[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("items" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1ProjectsSummary) validateListmeta(formats strfmt.Registry) error { + + if swag.IsZero(m.Listmeta) { // not required + return nil + } + + if m.Listmeta != nil { + if err := m.Listmeta.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("listmeta") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ProjectsSummary) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ProjectsSummary) UnmarshalBinary(b []byte) error { + var res V1ProjectsSummary + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_projects_workspaces.go b/api/models/v1_projects_workspaces.go new file mode 100644 index 00000000..0cfe6ca5 --- /dev/null +++ b/api/models/v1_projects_workspaces.go @@ -0,0 +1,92 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1ProjectsWorkspaces List projects and its workspaces +// +// swagger:model v1ProjectsWorkspaces +type V1ProjectsWorkspaces struct { + + // name + Name string `json:"name,omitempty"` + + // uid + UID string `json:"uid,omitempty"` + + // workspaces + // Unique: true + Workspaces []*V1WorkspacesRoles `json:"workspaces"` +} + +// Validate validates this v1 projects workspaces +func (m *V1ProjectsWorkspaces) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateWorkspaces(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ProjectsWorkspaces) validateWorkspaces(formats strfmt.Registry) error { + + if swag.IsZero(m.Workspaces) { // not required + return nil + } + + if err := validate.UniqueItems("workspaces", "body", m.Workspaces); err != nil { + return err + } + + for i := 0; i < len(m.Workspaces); i++ { + if swag.IsZero(m.Workspaces[i]) { // not required + continue + } + + if m.Workspaces[i] != nil { + if err := m.Workspaces[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("workspaces" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ProjectsWorkspaces) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ProjectsWorkspaces) UnmarshalBinary(b []byte) error { + var res V1ProjectsWorkspaces + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_public_cloud_rate_config.go b/api/models/v1_public_cloud_rate_config.go new file mode 100644 index 00000000..ebd052c7 --- /dev/null +++ b/api/models/v1_public_cloud_rate_config.go @@ -0,0 +1,96 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1PublicCloudRateConfig Public cloud rate config +// +// swagger:model v1PublicCloudRateConfig +type V1PublicCloudRateConfig struct { + + // compute optimized + ComputeOptimized *V1CloudInstanceRateConfig `json:"computeOptimized,omitempty"` + + // memory optimized + MemoryOptimized *V1CloudInstanceRateConfig `json:"memoryOptimized,omitempty"` +} + +// Validate validates this v1 public cloud rate config +func (m *V1PublicCloudRateConfig) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateComputeOptimized(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMemoryOptimized(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1PublicCloudRateConfig) validateComputeOptimized(formats strfmt.Registry) error { + + if swag.IsZero(m.ComputeOptimized) { // not required + return nil + } + + if m.ComputeOptimized != nil { + if err := m.ComputeOptimized.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("computeOptimized") + } + return err + } + } + + return nil +} + +func (m *V1PublicCloudRateConfig) validateMemoryOptimized(formats strfmt.Registry) error { + + if swag.IsZero(m.MemoryOptimized) { // not required + return nil + } + + if m.MemoryOptimized != nil { + if err := m.MemoryOptimized.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("memoryOptimized") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1PublicCloudRateConfig) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1PublicCloudRateConfig) UnmarshalBinary(b []byte) error { + var res V1PublicCloudRateConfig + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_rate_config.go b/api/models/v1_rate_config.go new file mode 100644 index 00000000..9ffedca1 --- /dev/null +++ b/api/models/v1_rate_config.go @@ -0,0 +1,336 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1RateConfig Rate config +// +// swagger:model v1RateConfig +type V1RateConfig struct { + + // aws + Aws *V1PublicCloudRateConfig `json:"aws,omitempty"` + + // azure + Azure *V1PublicCloudRateConfig `json:"azure,omitempty"` + + // custom + // Unique: true + Custom []*V1CustomCloudRateConfig `json:"custom"` + + // edge + Edge *V1PrivateCloudRateConfig `json:"edge,omitempty"` + + // edge native + EdgeNative *V1PrivateCloudRateConfig `json:"edgeNative,omitempty"` + + // gcp + Gcp *V1PublicCloudRateConfig `json:"gcp,omitempty"` + + // generic + Generic *V1PrivateCloudRateConfig `json:"generic,omitempty"` + + // libvirt + Libvirt *V1PrivateCloudRateConfig `json:"libvirt,omitempty"` + + // maas + Maas *V1PrivateCloudRateConfig `json:"maas,omitempty"` + + // openstack + Openstack *V1PrivateCloudRateConfig `json:"openstack,omitempty"` + + // vsphere + Vsphere *V1PrivateCloudRateConfig `json:"vsphere,omitempty"` +} + +// Validate validates this v1 rate config +func (m *V1RateConfig) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateAws(formats); err != nil { + res = append(res, err) + } + + if err := m.validateAzure(formats); err != nil { + res = append(res, err) + } + + if err := m.validateCustom(formats); err != nil { + res = append(res, err) + } + + if err := m.validateEdge(formats); err != nil { + res = append(res, err) + } + + if err := m.validateEdgeNative(formats); err != nil { + res = append(res, err) + } + + if err := m.validateGcp(formats); err != nil { + res = append(res, err) + } + + if err := m.validateGeneric(formats); err != nil { + res = append(res, err) + } + + if err := m.validateLibvirt(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMaas(formats); err != nil { + res = append(res, err) + } + + if err := m.validateOpenstack(formats); err != nil { + res = append(res, err) + } + + if err := m.validateVsphere(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1RateConfig) validateAws(formats strfmt.Registry) error { + + if swag.IsZero(m.Aws) { // not required + return nil + } + + if m.Aws != nil { + if err := m.Aws.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("aws") + } + return err + } + } + + return nil +} + +func (m *V1RateConfig) validateAzure(formats strfmt.Registry) error { + + if swag.IsZero(m.Azure) { // not required + return nil + } + + if m.Azure != nil { + if err := m.Azure.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("azure") + } + return err + } + } + + return nil +} + +func (m *V1RateConfig) validateCustom(formats strfmt.Registry) error { + + if swag.IsZero(m.Custom) { // not required + return nil + } + + if err := validate.UniqueItems("custom", "body", m.Custom); err != nil { + return err + } + + for i := 0; i < len(m.Custom); i++ { + if swag.IsZero(m.Custom[i]) { // not required + continue + } + + if m.Custom[i] != nil { + if err := m.Custom[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("custom" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1RateConfig) validateEdge(formats strfmt.Registry) error { + + if swag.IsZero(m.Edge) { // not required + return nil + } + + if m.Edge != nil { + if err := m.Edge.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("edge") + } + return err + } + } + + return nil +} + +func (m *V1RateConfig) validateEdgeNative(formats strfmt.Registry) error { + + if swag.IsZero(m.EdgeNative) { // not required + return nil + } + + if m.EdgeNative != nil { + if err := m.EdgeNative.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("edgeNative") + } + return err + } + } + + return nil +} + +func (m *V1RateConfig) validateGcp(formats strfmt.Registry) error { + + if swag.IsZero(m.Gcp) { // not required + return nil + } + + if m.Gcp != nil { + if err := m.Gcp.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("gcp") + } + return err + } + } + + return nil +} + +func (m *V1RateConfig) validateGeneric(formats strfmt.Registry) error { + + if swag.IsZero(m.Generic) { // not required + return nil + } + + if m.Generic != nil { + if err := m.Generic.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("generic") + } + return err + } + } + + return nil +} + +func (m *V1RateConfig) validateLibvirt(formats strfmt.Registry) error { + + if swag.IsZero(m.Libvirt) { // not required + return nil + } + + if m.Libvirt != nil { + if err := m.Libvirt.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("libvirt") + } + return err + } + } + + return nil +} + +func (m *V1RateConfig) validateMaas(formats strfmt.Registry) error { + + if swag.IsZero(m.Maas) { // not required + return nil + } + + if m.Maas != nil { + if err := m.Maas.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("maas") + } + return err + } + } + + return nil +} + +func (m *V1RateConfig) validateOpenstack(formats strfmt.Registry) error { + + if swag.IsZero(m.Openstack) { // not required + return nil + } + + if m.Openstack != nil { + if err := m.Openstack.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("openstack") + } + return err + } + } + + return nil +} + +func (m *V1RateConfig) validateVsphere(formats strfmt.Registry) error { + + if swag.IsZero(m.Vsphere) { // not required + return nil + } + + if m.Vsphere != nil { + if err := m.Vsphere.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("vsphere") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1RateConfig) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1RateConfig) UnmarshalBinary(b []byte) error { + var res V1RateConfig + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_registries_metadata.go b/api/models/v1_registries_metadata.go new file mode 100644 index 00000000..8fabab5b --- /dev/null +++ b/api/models/v1_registries_metadata.go @@ -0,0 +1,87 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1RegistriesMetadata Pack Registries Metadata +// +// swagger:model v1RegistriesMetadata +type V1RegistriesMetadata struct { + + // items + // Required: true + // Unique: true + Items []*V1RegistryMetadata `json:"items"` +} + +// Validate validates this v1 registries metadata +func (m *V1RegistriesMetadata) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateItems(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1RegistriesMetadata) validateItems(formats strfmt.Registry) error { + + if err := validate.Required("items", "body", m.Items); err != nil { + return err + } + + if err := validate.UniqueItems("items", "body", m.Items); err != nil { + return err + } + + for i := 0; i < len(m.Items); i++ { + if swag.IsZero(m.Items[i]) { // not required + continue + } + + if m.Items[i] != nil { + if err := m.Items[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("items" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1RegistriesMetadata) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1RegistriesMetadata) UnmarshalBinary(b []byte) error { + var res V1RegistriesMetadata + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_registry_auth.go b/api/models/v1_registry_auth.go new file mode 100644 index 00000000..70168d8b --- /dev/null +++ b/api/models/v1_registry_auth.go @@ -0,0 +1,173 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "encoding/json" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1RegistryAuth Auth credentials of the registry +// +// swagger:model v1RegistryAuth +type V1RegistryAuth struct { + + // password + // Format: password + Password strfmt.Password `json:"password,omitempty"` + + // tls + TLS *V1TLSConfiguration `json:"tls,omitempty"` + + // token + // Format: password + Token strfmt.Password `json:"token,omitempty"` + + // type + // Enum: [noAuth basic token] + Type string `json:"type,omitempty"` + + // username + Username string `json:"username,omitempty"` +} + +// Validate validates this v1 registry auth +func (m *V1RegistryAuth) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validatePassword(formats); err != nil { + res = append(res, err) + } + + if err := m.validateTLS(formats); err != nil { + res = append(res, err) + } + + if err := m.validateToken(formats); err != nil { + res = append(res, err) + } + + if err := m.validateType(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1RegistryAuth) validatePassword(formats strfmt.Registry) error { + + if swag.IsZero(m.Password) { // not required + return nil + } + + if err := validate.FormatOf("password", "body", "password", m.Password.String(), formats); err != nil { + return err + } + + return nil +} + +func (m *V1RegistryAuth) validateTLS(formats strfmt.Registry) error { + + if swag.IsZero(m.TLS) { // not required + return nil + } + + if m.TLS != nil { + if err := m.TLS.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("tls") + } + return err + } + } + + return nil +} + +func (m *V1RegistryAuth) validateToken(formats strfmt.Registry) error { + + if swag.IsZero(m.Token) { // not required + return nil + } + + if err := validate.FormatOf("token", "body", "password", m.Token.String(), formats); err != nil { + return err + } + + return nil +} + +var v1RegistryAuthTypeTypePropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["noAuth","basic","token"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + v1RegistryAuthTypeTypePropEnum = append(v1RegistryAuthTypeTypePropEnum, v) + } +} + +const ( + + // V1RegistryAuthTypeNoAuth captures enum value "noAuth" + V1RegistryAuthTypeNoAuth string = "noAuth" + + // V1RegistryAuthTypeBasic captures enum value "basic" + V1RegistryAuthTypeBasic string = "basic" + + // V1RegistryAuthTypeToken captures enum value "token" + V1RegistryAuthTypeToken string = "token" +) + +// prop value enum +func (m *V1RegistryAuth) validateTypeEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, v1RegistryAuthTypeTypePropEnum, true); err != nil { + return err + } + return nil +} + +func (m *V1RegistryAuth) validateType(formats strfmt.Registry) error { + + if swag.IsZero(m.Type) { // not required + return nil + } + + // value enum + if err := m.validateTypeEnum("type", "body", m.Type); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1RegistryAuth) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1RegistryAuth) UnmarshalBinary(b []byte) error { + var res V1RegistryAuth + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_registry_config_entity.go b/api/models/v1_registry_config_entity.go new file mode 100644 index 00000000..28bf18f8 --- /dev/null +++ b/api/models/v1_registry_config_entity.go @@ -0,0 +1,71 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1RegistryConfigEntity Registry configuration entity +// +// swagger:model v1RegistryConfigEntity +type V1RegistryConfigEntity struct { + + // config + Config *V1RegistryConfiguration `json:"config,omitempty"` +} + +// Validate validates this v1 registry config entity +func (m *V1RegistryConfigEntity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateConfig(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1RegistryConfigEntity) validateConfig(formats strfmt.Registry) error { + + if swag.IsZero(m.Config) { // not required + return nil + } + + if m.Config != nil { + if err := m.Config.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("config") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1RegistryConfigEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1RegistryConfigEntity) UnmarshalBinary(b []byte) error { + var res V1RegistryConfigEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_registry_configuration.go b/api/models/v1_registry_configuration.go new file mode 100644 index 00000000..21b891f7 --- /dev/null +++ b/api/models/v1_registry_configuration.go @@ -0,0 +1,77 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1RegistryConfiguration Registry configuration +// +// swagger:model v1RegistryConfiguration +type V1RegistryConfiguration struct { + + // auth + Auth *V1RegistryAuth `json:"auth,omitempty"` + + // endpoint + Endpoint string `json:"endpoint,omitempty"` + + // name + Name string `json:"name,omitempty"` +} + +// Validate validates this v1 registry configuration +func (m *V1RegistryConfiguration) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateAuth(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1RegistryConfiguration) validateAuth(formats strfmt.Registry) error { + + if swag.IsZero(m.Auth) { // not required + return nil + } + + if m.Auth != nil { + if err := m.Auth.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("auth") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1RegistryConfiguration) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1RegistryConfiguration) UnmarshalBinary(b []byte) error { + var res V1RegistryConfiguration + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_registry_metadata.go b/api/models/v1_registry_metadata.go new file mode 100644 index 00000000..8c108b9a --- /dev/null +++ b/api/models/v1_registry_metadata.go @@ -0,0 +1,58 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1RegistryMetadata Registry meta +// +// swagger:model v1RegistryMetadata +type V1RegistryMetadata struct { + + // is default + IsDefault bool `json:"isDefault"` + + // is private + IsPrivate bool `json:"isPrivate"` + + // kind + Kind string `json:"kind,omitempty"` + + // name + Name string `json:"name,omitempty"` + + // scope + Scope string `json:"scope,omitempty"` + + // uid + UID string `json:"uid,omitempty"` +} + +// Validate validates this v1 registry metadata +func (m *V1RegistryMetadata) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1RegistryMetadata) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1RegistryMetadata) UnmarshalBinary(b []byte) error { + var res V1RegistryMetadata + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_registry_pack_metadata.go b/api/models/v1_registry_pack_metadata.go new file mode 100644 index 00000000..77aa7904 --- /dev/null +++ b/api/models/v1_registry_pack_metadata.go @@ -0,0 +1,61 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1RegistryPackMetadata Registry metadata information +// +// swagger:model v1RegistryPackMetadata +type V1RegistryPackMetadata struct { + + // Pack annotations is used to allow pack to add more arbitrary configurations + Annotations map[string]string `json:"annotations,omitempty"` + + // Latest pack uid + LatestPackUID string `json:"latestPackUid,omitempty"` + + // Pack latest version + LatestVersion string `json:"latestVersion,omitempty"` + + // Pack logo url + LogoURL string `json:"logoUrl,omitempty"` + + // Pack registry name + Name string `json:"name,omitempty"` + + // Pack registry scope + Scope string `json:"scope,omitempty"` + + // Pack registry uid + UID string `json:"uid,omitempty"` +} + +// Validate validates this v1 registry pack metadata +func (m *V1RegistryPackMetadata) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1RegistryPackMetadata) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1RegistryPackMetadata) UnmarshalBinary(b []byte) error { + var res V1RegistryPackMetadata + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_registry_sync_status.go b/api/models/v1_registry_sync_status.go new file mode 100644 index 00000000..095ff980 --- /dev/null +++ b/api/models/v1_registry_sync_status.go @@ -0,0 +1,100 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1RegistrySyncStatus Status of the registry sync +// +// swagger:model v1RegistrySyncStatus +type V1RegistrySyncStatus struct { + + // last run time + // Format: date-time + LastRunTime V1Time `json:"lastRunTime,omitempty"` + + // last synced time + // Format: date-time + LastSyncedTime V1Time `json:"lastSyncedTime,omitempty"` + + // message + Message string `json:"message,omitempty"` + + // status + Status string `json:"status,omitempty"` +} + +// Validate validates this v1 registry sync status +func (m *V1RegistrySyncStatus) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateLastRunTime(formats); err != nil { + res = append(res, err) + } + + if err := m.validateLastSyncedTime(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1RegistrySyncStatus) validateLastRunTime(formats strfmt.Registry) error { + + if swag.IsZero(m.LastRunTime) { // not required + return nil + } + + if err := m.LastRunTime.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("lastRunTime") + } + return err + } + + return nil +} + +func (m *V1RegistrySyncStatus) validateLastSyncedTime(formats strfmt.Registry) error { + + if swag.IsZero(m.LastSyncedTime) { // not required + return nil + } + + if err := m.LastSyncedTime.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("lastSyncedTime") + } + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1RegistrySyncStatus) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1RegistrySyncStatus) UnmarshalBinary(b []byte) error { + var res V1RegistrySyncStatus + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_related_object.go b/api/models/v1_related_object.go new file mode 100644 index 00000000..dd1de19f --- /dev/null +++ b/api/models/v1_related_object.go @@ -0,0 +1,124 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "encoding/json" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1RelatedObject Object for which the resource is related +// +// swagger:model v1RelatedObject +type V1RelatedObject struct { + + // kind + // Enum: [spectrocluster machine cloudconfig clusterprofile pack appprofile appdeployment edgehost] + Kind string `json:"kind,omitempty"` + + // name + Name string `json:"name,omitempty"` + + // uid + UID string `json:"uid,omitempty"` +} + +// Validate validates this v1 related object +func (m *V1RelatedObject) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateKind(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +var v1RelatedObjectTypeKindPropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["spectrocluster","machine","cloudconfig","clusterprofile","pack","appprofile","appdeployment","edgehost"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + v1RelatedObjectTypeKindPropEnum = append(v1RelatedObjectTypeKindPropEnum, v) + } +} + +const ( + + // V1RelatedObjectKindSpectrocluster captures enum value "spectrocluster" + V1RelatedObjectKindSpectrocluster string = "spectrocluster" + + // V1RelatedObjectKindMachine captures enum value "machine" + V1RelatedObjectKindMachine string = "machine" + + // V1RelatedObjectKindCloudconfig captures enum value "cloudconfig" + V1RelatedObjectKindCloudconfig string = "cloudconfig" + + // V1RelatedObjectKindClusterprofile captures enum value "clusterprofile" + V1RelatedObjectKindClusterprofile string = "clusterprofile" + + // V1RelatedObjectKindPack captures enum value "pack" + V1RelatedObjectKindPack string = "pack" + + // V1RelatedObjectKindAppprofile captures enum value "appprofile" + V1RelatedObjectKindAppprofile string = "appprofile" + + // V1RelatedObjectKindAppdeployment captures enum value "appdeployment" + V1RelatedObjectKindAppdeployment string = "appdeployment" + + // V1RelatedObjectKindEdgehost captures enum value "edgehost" + V1RelatedObjectKindEdgehost string = "edgehost" +) + +// prop value enum +func (m *V1RelatedObject) validateKindEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, v1RelatedObjectTypeKindPropEnum, true); err != nil { + return err + } + return nil +} + +func (m *V1RelatedObject) validateKind(formats strfmt.Registry) error { + + if swag.IsZero(m.Kind) { // not required + return nil + } + + // value enum + if err := m.validateKindEnum("kind", "body", m.Kind); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1RelatedObject) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1RelatedObject) UnmarshalBinary(b []byte) error { + var res V1RelatedObject + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_resource_cloud_cost_summary.go b/api/models/v1_resource_cloud_cost_summary.go new file mode 100644 index 00000000..8423828a --- /dev/null +++ b/api/models/v1_resource_cloud_cost_summary.go @@ -0,0 +1,136 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1ResourceCloudCostSummary Resource cloud cost summary information +// +// swagger:model v1ResourceCloudCostSummary +type V1ResourceCloudCostSummary struct { + + // data + // Unique: true + Data []*V1CloudCostDataPoint `json:"data"` + + // entity + Entity *V1ResourceReference `json:"entity,omitempty"` + + // total + Total *V1ResourceTotalCloudCost `json:"total,omitempty"` +} + +// Validate validates this v1 resource cloud cost summary +func (m *V1ResourceCloudCostSummary) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateData(formats); err != nil { + res = append(res, err) + } + + if err := m.validateEntity(formats); err != nil { + res = append(res, err) + } + + if err := m.validateTotal(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ResourceCloudCostSummary) validateData(formats strfmt.Registry) error { + + if swag.IsZero(m.Data) { // not required + return nil + } + + if err := validate.UniqueItems("data", "body", m.Data); err != nil { + return err + } + + for i := 0; i < len(m.Data); i++ { + if swag.IsZero(m.Data[i]) { // not required + continue + } + + if m.Data[i] != nil { + if err := m.Data[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("data" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1ResourceCloudCostSummary) validateEntity(formats strfmt.Registry) error { + + if swag.IsZero(m.Entity) { // not required + return nil + } + + if m.Entity != nil { + if err := m.Entity.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("entity") + } + return err + } + } + + return nil +} + +func (m *V1ResourceCloudCostSummary) validateTotal(formats strfmt.Registry) error { + + if swag.IsZero(m.Total) { // not required + return nil + } + + if m.Total != nil { + if err := m.Total.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("total") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ResourceCloudCostSummary) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ResourceCloudCostSummary) UnmarshalBinary(b []byte) error { + var res V1ResourceCloudCostSummary + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_resource_consumption.go b/api/models/v1_resource_consumption.go new file mode 100644 index 00000000..2c88a530 --- /dev/null +++ b/api/models/v1_resource_consumption.go @@ -0,0 +1,168 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1ResourceConsumption Resource consumption information +// +// swagger:model v1ResourceConsumption +type V1ResourceConsumption struct { + + // associated resources + AssociatedResources []*V1ResourceReference `json:"associatedResources"` + + // data + // Unique: true + Data []*V1ResourceConsumptionDataPoint `json:"data"` + + // entity + Entity *V1ResourceReference `json:"entity,omitempty"` + + // total + Total *V1ResourceTotalConsumptionData `json:"total,omitempty"` +} + +// Validate validates this v1 resource consumption +func (m *V1ResourceConsumption) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateAssociatedResources(formats); err != nil { + res = append(res, err) + } + + if err := m.validateData(formats); err != nil { + res = append(res, err) + } + + if err := m.validateEntity(formats); err != nil { + res = append(res, err) + } + + if err := m.validateTotal(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ResourceConsumption) validateAssociatedResources(formats strfmt.Registry) error { + + if swag.IsZero(m.AssociatedResources) { // not required + return nil + } + + for i := 0; i < len(m.AssociatedResources); i++ { + if swag.IsZero(m.AssociatedResources[i]) { // not required + continue + } + + if m.AssociatedResources[i] != nil { + if err := m.AssociatedResources[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("associatedResources" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1ResourceConsumption) validateData(formats strfmt.Registry) error { + + if swag.IsZero(m.Data) { // not required + return nil + } + + if err := validate.UniqueItems("data", "body", m.Data); err != nil { + return err + } + + for i := 0; i < len(m.Data); i++ { + if swag.IsZero(m.Data[i]) { // not required + continue + } + + if m.Data[i] != nil { + if err := m.Data[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("data" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1ResourceConsumption) validateEntity(formats strfmt.Registry) error { + + if swag.IsZero(m.Entity) { // not required + return nil + } + + if m.Entity != nil { + if err := m.Entity.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("entity") + } + return err + } + } + + return nil +} + +func (m *V1ResourceConsumption) validateTotal(formats strfmt.Registry) error { + + if swag.IsZero(m.Total) { // not required + return nil + } + + if m.Total != nil { + if err := m.Total.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("total") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ResourceConsumption) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ResourceConsumption) UnmarshalBinary(b []byte) error { + var res V1ResourceConsumption + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_resource_consumption_data.go b/api/models/v1_resource_consumption_data.go new file mode 100644 index 00000000..ce8d2bbe --- /dev/null +++ b/api/models/v1_resource_consumption_data.go @@ -0,0 +1,46 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ResourceConsumptionData Resource cosumption data +// +// swagger:model v1ResourceConsumptionData +type V1ResourceConsumptionData struct { + + // cpu + CPU float64 `json:"cpu"` + + // memory + Memory float64 `json:"memory"` +} + +// Validate validates this v1 resource consumption data +func (m *V1ResourceConsumptionData) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1ResourceConsumptionData) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ResourceConsumptionData) UnmarshalBinary(b []byte) error { + var res V1ResourceConsumptionData + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_resource_consumption_data_point.go b/api/models/v1_resource_consumption_data_point.go new file mode 100644 index 00000000..b2dcefdf --- /dev/null +++ b/api/models/v1_resource_consumption_data_point.go @@ -0,0 +1,99 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ResourceConsumptionDataPoint Resource cosumption data point +// +// swagger:model v1ResourceConsumptionDataPoint +type V1ResourceConsumptionDataPoint struct { + + // allotted + Allotted *V1ResourceConsumptionData `json:"allotted,omitempty"` + + // timestamp + Timestamp int64 `json:"timestamp,omitempty"` + + // usage + Usage *V1ResourceConsumptionData `json:"usage,omitempty"` +} + +// Validate validates this v1 resource consumption data point +func (m *V1ResourceConsumptionDataPoint) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateAllotted(formats); err != nil { + res = append(res, err) + } + + if err := m.validateUsage(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ResourceConsumptionDataPoint) validateAllotted(formats strfmt.Registry) error { + + if swag.IsZero(m.Allotted) { // not required + return nil + } + + if m.Allotted != nil { + if err := m.Allotted.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("allotted") + } + return err + } + } + + return nil +} + +func (m *V1ResourceConsumptionDataPoint) validateUsage(formats strfmt.Registry) error { + + if swag.IsZero(m.Usage) { // not required + return nil + } + + if m.Usage != nil { + if err := m.Usage.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("usage") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ResourceConsumptionDataPoint) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ResourceConsumptionDataPoint) UnmarshalBinary(b []byte) error { + var res V1ResourceConsumptionDataPoint + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_resource_consumption_filter.go b/api/models/v1_resource_consumption_filter.go new file mode 100644 index 00000000..c54c382e --- /dev/null +++ b/api/models/v1_resource_consumption_filter.go @@ -0,0 +1,206 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1ResourceConsumptionFilter Resource consumption filter +// +// swagger:model v1ResourceConsumptionFilter +type V1ResourceConsumptionFilter struct { + + // clouds + // Unique: true + Clouds []string `json:"clouds"` + + // clusters + // Unique: true + Clusters []string `json:"clusters"` + + // end time + // Format: date-time + EndTime V1Time `json:"endTime,omitempty"` + + // include control plane machines + IncludeControlPlaneMachines bool `json:"includeControlPlaneMachines,omitempty"` + + // Deprecated. Use includeControlPlaneMachines + IncludeMasterMachines bool `json:"includeMasterMachines,omitempty"` + + // namespaces + // Unique: true + Namespaces []string `json:"namespaces"` + + // projects + // Unique: true + Projects []string `json:"projects"` + + // start time + // Format: date-time + StartTime V1Time `json:"startTime,omitempty"` + + // workspaces + // Unique: true + Workspaces []string `json:"workspaces"` +} + +// Validate validates this v1 resource consumption filter +func (m *V1ResourceConsumptionFilter) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateClouds(formats); err != nil { + res = append(res, err) + } + + if err := m.validateClusters(formats); err != nil { + res = append(res, err) + } + + if err := m.validateEndTime(formats); err != nil { + res = append(res, err) + } + + if err := m.validateNamespaces(formats); err != nil { + res = append(res, err) + } + + if err := m.validateProjects(formats); err != nil { + res = append(res, err) + } + + if err := m.validateStartTime(formats); err != nil { + res = append(res, err) + } + + if err := m.validateWorkspaces(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ResourceConsumptionFilter) validateClouds(formats strfmt.Registry) error { + + if swag.IsZero(m.Clouds) { // not required + return nil + } + + if err := validate.UniqueItems("clouds", "body", m.Clouds); err != nil { + return err + } + + return nil +} + +func (m *V1ResourceConsumptionFilter) validateClusters(formats strfmt.Registry) error { + + if swag.IsZero(m.Clusters) { // not required + return nil + } + + if err := validate.UniqueItems("clusters", "body", m.Clusters); err != nil { + return err + } + + return nil +} + +func (m *V1ResourceConsumptionFilter) validateEndTime(formats strfmt.Registry) error { + + if swag.IsZero(m.EndTime) { // not required + return nil + } + + if err := m.EndTime.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("endTime") + } + return err + } + + return nil +} + +func (m *V1ResourceConsumptionFilter) validateNamespaces(formats strfmt.Registry) error { + + if swag.IsZero(m.Namespaces) { // not required + return nil + } + + if err := validate.UniqueItems("namespaces", "body", m.Namespaces); err != nil { + return err + } + + return nil +} + +func (m *V1ResourceConsumptionFilter) validateProjects(formats strfmt.Registry) error { + + if swag.IsZero(m.Projects) { // not required + return nil + } + + if err := validate.UniqueItems("projects", "body", m.Projects); err != nil { + return err + } + + return nil +} + +func (m *V1ResourceConsumptionFilter) validateStartTime(formats strfmt.Registry) error { + + if swag.IsZero(m.StartTime) { // not required + return nil + } + + if err := m.StartTime.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("startTime") + } + return err + } + + return nil +} + +func (m *V1ResourceConsumptionFilter) validateWorkspaces(formats strfmt.Registry) error { + + if swag.IsZero(m.Workspaces) { // not required + return nil + } + + if err := validate.UniqueItems("workspaces", "body", m.Workspaces); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ResourceConsumptionFilter) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ResourceConsumptionFilter) UnmarshalBinary(b []byte) error { + var res V1ResourceConsumptionFilter + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_resource_consumption_options.go b/api/models/v1_resource_consumption_options.go new file mode 100644 index 00000000..b2443530 --- /dev/null +++ b/api/models/v1_resource_consumption_options.go @@ -0,0 +1,118 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "encoding/json" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1ResourceConsumptionOptions Resource consumption options +// +// swagger:model v1ResourceConsumptionOptions +type V1ResourceConsumptionOptions struct { + + // enable summary view + EnableSummaryView *bool `json:"enableSummaryView,omitempty"` + + // group by + // Enum: [tenant project workspace cluster namespace cloud] + GroupBy *string `json:"groupBy,omitempty"` + + // period + Period *int32 `json:"period,omitempty"` +} + +// Validate validates this v1 resource consumption options +func (m *V1ResourceConsumptionOptions) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateGroupBy(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +var v1ResourceConsumptionOptionsTypeGroupByPropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["tenant","project","workspace","cluster","namespace","cloud"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + v1ResourceConsumptionOptionsTypeGroupByPropEnum = append(v1ResourceConsumptionOptionsTypeGroupByPropEnum, v) + } +} + +const ( + + // V1ResourceConsumptionOptionsGroupByTenant captures enum value "tenant" + V1ResourceConsumptionOptionsGroupByTenant string = "tenant" + + // V1ResourceConsumptionOptionsGroupByProject captures enum value "project" + V1ResourceConsumptionOptionsGroupByProject string = "project" + + // V1ResourceConsumptionOptionsGroupByWorkspace captures enum value "workspace" + V1ResourceConsumptionOptionsGroupByWorkspace string = "workspace" + + // V1ResourceConsumptionOptionsGroupByCluster captures enum value "cluster" + V1ResourceConsumptionOptionsGroupByCluster string = "cluster" + + // V1ResourceConsumptionOptionsGroupByNamespace captures enum value "namespace" + V1ResourceConsumptionOptionsGroupByNamespace string = "namespace" + + // V1ResourceConsumptionOptionsGroupByCloud captures enum value "cloud" + V1ResourceConsumptionOptionsGroupByCloud string = "cloud" +) + +// prop value enum +func (m *V1ResourceConsumptionOptions) validateGroupByEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, v1ResourceConsumptionOptionsTypeGroupByPropEnum, true); err != nil { + return err + } + return nil +} + +func (m *V1ResourceConsumptionOptions) validateGroupBy(formats strfmt.Registry) error { + + if swag.IsZero(m.GroupBy) { // not required + return nil + } + + // value enum + if err := m.validateGroupByEnum("groupBy", "body", *m.GroupBy); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ResourceConsumptionOptions) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ResourceConsumptionOptions) UnmarshalBinary(b []byte) error { + var res V1ResourceConsumptionOptions + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_resource_consumption_spec.go b/api/models/v1_resource_consumption_spec.go new file mode 100644 index 00000000..564f9d4d --- /dev/null +++ b/api/models/v1_resource_consumption_spec.go @@ -0,0 +1,96 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ResourceConsumptionSpec Resource consumption spec +// +// swagger:model v1ResourceConsumptionSpec +type V1ResourceConsumptionSpec struct { + + // filter + Filter *V1ResourceConsumptionFilter `json:"filter,omitempty"` + + // options + Options *V1ResourceConsumptionOptions `json:"options,omitempty"` +} + +// Validate validates this v1 resource consumption spec +func (m *V1ResourceConsumptionSpec) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateFilter(formats); err != nil { + res = append(res, err) + } + + if err := m.validateOptions(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ResourceConsumptionSpec) validateFilter(formats strfmt.Registry) error { + + if swag.IsZero(m.Filter) { // not required + return nil + } + + if m.Filter != nil { + if err := m.Filter.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("filter") + } + return err + } + } + + return nil +} + +func (m *V1ResourceConsumptionSpec) validateOptions(formats strfmt.Registry) error { + + if swag.IsZero(m.Options) { // not required + return nil + } + + if m.Options != nil { + if err := m.Options.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("options") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ResourceConsumptionSpec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ResourceConsumptionSpec) UnmarshalBinary(b []byte) error { + var res V1ResourceConsumptionSpec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_resource_cost.go b/api/models/v1_resource_cost.go new file mode 100644 index 00000000..0d416c5e --- /dev/null +++ b/api/models/v1_resource_cost.go @@ -0,0 +1,74 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ResourceCost Resource Cost information +// +// swagger:model v1ResourceCost +type V1ResourceCost struct { + + // cloud + Cloud *V1CloudCost `json:"cloud,omitempty"` + + // total + Total float64 `json:"total"` +} + +// Validate validates this v1 resource cost +func (m *V1ResourceCost) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateCloud(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ResourceCost) validateCloud(formats strfmt.Registry) error { + + if swag.IsZero(m.Cloud) { // not required + return nil + } + + if m.Cloud != nil { + if err := m.Cloud.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("cloud") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ResourceCost) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ResourceCost) UnmarshalBinary(b []byte) error { + var res V1ResourceCost + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_resource_cost_data_point.go b/api/models/v1_resource_cost_data_point.go new file mode 100644 index 00000000..f5d95bee --- /dev/null +++ b/api/models/v1_resource_cost_data_point.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ResourceCostDataPoint Resource cost data point +// +// swagger:model v1ResourceCostDataPoint +type V1ResourceCostDataPoint struct { + + // cpu + CPU float64 `json:"cpu"` + + // memory + Memory float64 `json:"memory"` + + // storage + Storage float64 `json:"storage"` + + // timestamp + Timestamp int64 `json:"timestamp,omitempty"` + + // total + Total float64 `json:"total"` +} + +// Validate validates this v1 resource cost data point +func (m *V1ResourceCostDataPoint) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1ResourceCostDataPoint) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ResourceCostDataPoint) UnmarshalBinary(b []byte) error { + var res V1ResourceCostDataPoint + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_resource_cost_summary.go b/api/models/v1_resource_cost_summary.go new file mode 100644 index 00000000..90f0e729 --- /dev/null +++ b/api/models/v1_resource_cost_summary.go @@ -0,0 +1,168 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1ResourceCostSummary Resource cost summary information +// +// swagger:model v1ResourceCostSummary +type V1ResourceCostSummary struct { + + // associated resources + AssociatedResources []*V1ResourceReference `json:"associatedResources"` + + // data + // Unique: true + Data []*V1ResourceCostDataPoint `json:"data"` + + // entity + Entity *V1ResourceReference `json:"entity,omitempty"` + + // total + Total *V1ResourceTotalCost `json:"total,omitempty"` +} + +// Validate validates this v1 resource cost summary +func (m *V1ResourceCostSummary) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateAssociatedResources(formats); err != nil { + res = append(res, err) + } + + if err := m.validateData(formats); err != nil { + res = append(res, err) + } + + if err := m.validateEntity(formats); err != nil { + res = append(res, err) + } + + if err := m.validateTotal(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ResourceCostSummary) validateAssociatedResources(formats strfmt.Registry) error { + + if swag.IsZero(m.AssociatedResources) { // not required + return nil + } + + for i := 0; i < len(m.AssociatedResources); i++ { + if swag.IsZero(m.AssociatedResources[i]) { // not required + continue + } + + if m.AssociatedResources[i] != nil { + if err := m.AssociatedResources[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("associatedResources" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1ResourceCostSummary) validateData(formats strfmt.Registry) error { + + if swag.IsZero(m.Data) { // not required + return nil + } + + if err := validate.UniqueItems("data", "body", m.Data); err != nil { + return err + } + + for i := 0; i < len(m.Data); i++ { + if swag.IsZero(m.Data[i]) { // not required + continue + } + + if m.Data[i] != nil { + if err := m.Data[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("data" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1ResourceCostSummary) validateEntity(formats strfmt.Registry) error { + + if swag.IsZero(m.Entity) { // not required + return nil + } + + if m.Entity != nil { + if err := m.Entity.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("entity") + } + return err + } + } + + return nil +} + +func (m *V1ResourceCostSummary) validateTotal(formats strfmt.Registry) error { + + if swag.IsZero(m.Total) { // not required + return nil + } + + if m.Total != nil { + if err := m.Total.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("total") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ResourceCostSummary) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ResourceCostSummary) UnmarshalBinary(b []byte) error { + var res V1ResourceCostSummary + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_resource_cost_summary_filter.go b/api/models/v1_resource_cost_summary_filter.go new file mode 100644 index 00000000..e122d017 --- /dev/null +++ b/api/models/v1_resource_cost_summary_filter.go @@ -0,0 +1,206 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1ResourceCostSummaryFilter Resource cost summary filter +// +// swagger:model v1ResourceCostSummaryFilter +type V1ResourceCostSummaryFilter struct { + + // clouds + // Unique: true + Clouds []string `json:"clouds"` + + // clusters + // Unique: true + Clusters []string `json:"clusters"` + + // end time + // Format: date-time + EndTime V1Time `json:"endTime,omitempty"` + + // include control plane machines + IncludeControlPlaneMachines bool `json:"includeControlPlaneMachines,omitempty"` + + // Deprecated. Use includeControlPlaneMachines + IncludeMasterMachines bool `json:"includeMasterMachines,omitempty"` + + // namespaces + // Unique: true + Namespaces []string `json:"namespaces"` + + // projects + // Unique: true + Projects []string `json:"projects"` + + // start time + // Format: date-time + StartTime V1Time `json:"startTime,omitempty"` + + // workspaces + // Unique: true + Workspaces []string `json:"workspaces"` +} + +// Validate validates this v1 resource cost summary filter +func (m *V1ResourceCostSummaryFilter) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateClouds(formats); err != nil { + res = append(res, err) + } + + if err := m.validateClusters(formats); err != nil { + res = append(res, err) + } + + if err := m.validateEndTime(formats); err != nil { + res = append(res, err) + } + + if err := m.validateNamespaces(formats); err != nil { + res = append(res, err) + } + + if err := m.validateProjects(formats); err != nil { + res = append(res, err) + } + + if err := m.validateStartTime(formats); err != nil { + res = append(res, err) + } + + if err := m.validateWorkspaces(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ResourceCostSummaryFilter) validateClouds(formats strfmt.Registry) error { + + if swag.IsZero(m.Clouds) { // not required + return nil + } + + if err := validate.UniqueItems("clouds", "body", m.Clouds); err != nil { + return err + } + + return nil +} + +func (m *V1ResourceCostSummaryFilter) validateClusters(formats strfmt.Registry) error { + + if swag.IsZero(m.Clusters) { // not required + return nil + } + + if err := validate.UniqueItems("clusters", "body", m.Clusters); err != nil { + return err + } + + return nil +} + +func (m *V1ResourceCostSummaryFilter) validateEndTime(formats strfmt.Registry) error { + + if swag.IsZero(m.EndTime) { // not required + return nil + } + + if err := m.EndTime.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("endTime") + } + return err + } + + return nil +} + +func (m *V1ResourceCostSummaryFilter) validateNamespaces(formats strfmt.Registry) error { + + if swag.IsZero(m.Namespaces) { // not required + return nil + } + + if err := validate.UniqueItems("namespaces", "body", m.Namespaces); err != nil { + return err + } + + return nil +} + +func (m *V1ResourceCostSummaryFilter) validateProjects(formats strfmt.Registry) error { + + if swag.IsZero(m.Projects) { // not required + return nil + } + + if err := validate.UniqueItems("projects", "body", m.Projects); err != nil { + return err + } + + return nil +} + +func (m *V1ResourceCostSummaryFilter) validateStartTime(formats strfmt.Registry) error { + + if swag.IsZero(m.StartTime) { // not required + return nil + } + + if err := m.StartTime.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("startTime") + } + return err + } + + return nil +} + +func (m *V1ResourceCostSummaryFilter) validateWorkspaces(formats strfmt.Registry) error { + + if swag.IsZero(m.Workspaces) { // not required + return nil + } + + if err := validate.UniqueItems("workspaces", "body", m.Workspaces); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ResourceCostSummaryFilter) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ResourceCostSummaryFilter) UnmarshalBinary(b []byte) error { + var res V1ResourceCostSummaryFilter + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_resource_cost_summary_options.go b/api/models/v1_resource_cost_summary_options.go new file mode 100644 index 00000000..4552fba5 --- /dev/null +++ b/api/models/v1_resource_cost_summary_options.go @@ -0,0 +1,121 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "encoding/json" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1ResourceCostSummaryOptions Resource cost summary options +// +// swagger:model v1ResourceCostSummaryOptions +type V1ResourceCostSummaryOptions struct { + + // enable summary view + EnableSummaryView *bool `json:"enableSummaryView,omitempty"` + + // group by + // Enum: [tenant project workspace cluster namespace deployment cloud] + GroupBy *string `json:"groupBy,omitempty"` + + // period + Period *int32 `json:"period,omitempty"` +} + +// Validate validates this v1 resource cost summary options +func (m *V1ResourceCostSummaryOptions) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateGroupBy(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +var v1ResourceCostSummaryOptionsTypeGroupByPropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["tenant","project","workspace","cluster","namespace","deployment","cloud"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + v1ResourceCostSummaryOptionsTypeGroupByPropEnum = append(v1ResourceCostSummaryOptionsTypeGroupByPropEnum, v) + } +} + +const ( + + // V1ResourceCostSummaryOptionsGroupByTenant captures enum value "tenant" + V1ResourceCostSummaryOptionsGroupByTenant string = "tenant" + + // V1ResourceCostSummaryOptionsGroupByProject captures enum value "project" + V1ResourceCostSummaryOptionsGroupByProject string = "project" + + // V1ResourceCostSummaryOptionsGroupByWorkspace captures enum value "workspace" + V1ResourceCostSummaryOptionsGroupByWorkspace string = "workspace" + + // V1ResourceCostSummaryOptionsGroupByCluster captures enum value "cluster" + V1ResourceCostSummaryOptionsGroupByCluster string = "cluster" + + // V1ResourceCostSummaryOptionsGroupByNamespace captures enum value "namespace" + V1ResourceCostSummaryOptionsGroupByNamespace string = "namespace" + + // V1ResourceCostSummaryOptionsGroupByDeployment captures enum value "deployment" + V1ResourceCostSummaryOptionsGroupByDeployment string = "deployment" + + // V1ResourceCostSummaryOptionsGroupByCloud captures enum value "cloud" + V1ResourceCostSummaryOptionsGroupByCloud string = "cloud" +) + +// prop value enum +func (m *V1ResourceCostSummaryOptions) validateGroupByEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, v1ResourceCostSummaryOptionsTypeGroupByPropEnum, true); err != nil { + return err + } + return nil +} + +func (m *V1ResourceCostSummaryOptions) validateGroupBy(formats strfmt.Registry) error { + + if swag.IsZero(m.GroupBy) { // not required + return nil + } + + // value enum + if err := m.validateGroupByEnum("groupBy", "body", *m.GroupBy); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ResourceCostSummaryOptions) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ResourceCostSummaryOptions) UnmarshalBinary(b []byte) error { + var res V1ResourceCostSummaryOptions + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_resource_cost_summary_spec.go b/api/models/v1_resource_cost_summary_spec.go new file mode 100644 index 00000000..330c0a22 --- /dev/null +++ b/api/models/v1_resource_cost_summary_spec.go @@ -0,0 +1,96 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ResourceCostSummarySpec Resource cost summary spec +// +// swagger:model v1ResourceCostSummarySpec +type V1ResourceCostSummarySpec struct { + + // filter + Filter *V1ResourceCostSummaryFilter `json:"filter,omitempty"` + + // options + Options *V1ResourceCostSummaryOptions `json:"options,omitempty"` +} + +// Validate validates this v1 resource cost summary spec +func (m *V1ResourceCostSummarySpec) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateFilter(formats); err != nil { + res = append(res, err) + } + + if err := m.validateOptions(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ResourceCostSummarySpec) validateFilter(formats strfmt.Registry) error { + + if swag.IsZero(m.Filter) { // not required + return nil + } + + if m.Filter != nil { + if err := m.Filter.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("filter") + } + return err + } + } + + return nil +} + +func (m *V1ResourceCostSummarySpec) validateOptions(formats strfmt.Registry) error { + + if swag.IsZero(m.Options) { // not required + return nil + } + + if m.Options != nil { + if err := m.Options.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("options") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ResourceCostSummarySpec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ResourceCostSummarySpec) UnmarshalBinary(b []byte) error { + var res V1ResourceCostSummarySpec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_resource_group.go b/api/models/v1_resource_group.go new file mode 100644 index 00000000..69fe62aa --- /dev/null +++ b/api/models/v1_resource_group.go @@ -0,0 +1,49 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ResourceGroup Azure resource Group is a container that holds related resources for an Azure solution +// +// swagger:model v1ResourceGroup +type V1ResourceGroup struct { + + // The ID of the resource group + ID string `json:"id,omitempty"` + + // The location of the resource group. It cannot be changed after the resource group has been created + Location string `json:"location,omitempty"` + + // The type of the resource group + Name string `json:"name,omitempty"` +} + +// Validate validates this v1 resource group +func (m *V1ResourceGroup) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1ResourceGroup) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ResourceGroup) UnmarshalBinary(b []byte) error { + var res V1ResourceGroup + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_resource_limit_type.go b/api/models/v1_resource_limit_type.go new file mode 100644 index 00000000..726d5da6 --- /dev/null +++ b/api/models/v1_resource_limit_type.go @@ -0,0 +1,126 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "encoding/json" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" +) + +// V1ResourceLimitType v1 resource limit type +// +// swagger:model v1ResourceLimitType +type V1ResourceLimitType string + +const ( + + // V1ResourceLimitTypeUser captures enum value "user" + V1ResourceLimitTypeUser V1ResourceLimitType = "user" + + // V1ResourceLimitTypeProject captures enum value "project" + V1ResourceLimitTypeProject V1ResourceLimitType = "project" + + // V1ResourceLimitTypeAPIKey captures enum value "apiKey" + V1ResourceLimitTypeAPIKey V1ResourceLimitType = "apiKey" + + // V1ResourceLimitTypeTeam captures enum value "team" + V1ResourceLimitTypeTeam V1ResourceLimitType = "team" + + // V1ResourceLimitTypeRole captures enum value "role" + V1ResourceLimitTypeRole V1ResourceLimitType = "role" + + // V1ResourceLimitTypeCloudaccount captures enum value "cloudaccount" + V1ResourceLimitTypeCloudaccount V1ResourceLimitType = "cloudaccount" + + // V1ResourceLimitTypeClusterprofile captures enum value "clusterprofile" + V1ResourceLimitTypeClusterprofile V1ResourceLimitType = "clusterprofile" + + // V1ResourceLimitTypeWorkspace captures enum value "workspace" + V1ResourceLimitTypeWorkspace V1ResourceLimitType = "workspace" + + // V1ResourceLimitTypeRegistry captures enum value "registry" + V1ResourceLimitTypeRegistry V1ResourceLimitType = "registry" + + // V1ResourceLimitTypePrivategateway captures enum value "privategateway" + V1ResourceLimitTypePrivategateway V1ResourceLimitType = "privategateway" + + // V1ResourceLimitTypeLocation captures enum value "location" + V1ResourceLimitTypeLocation V1ResourceLimitType = "location" + + // V1ResourceLimitTypeCertificate captures enum value "certificate" + V1ResourceLimitTypeCertificate V1ResourceLimitType = "certificate" + + // V1ResourceLimitTypeMacro captures enum value "macro" + V1ResourceLimitTypeMacro V1ResourceLimitType = "macro" + + // V1ResourceLimitTypeSshkey captures enum value "sshkey" + V1ResourceLimitTypeSshkey V1ResourceLimitType = "sshkey" + + // V1ResourceLimitTypeAlert captures enum value "alert" + V1ResourceLimitTypeAlert V1ResourceLimitType = "alert" + + // V1ResourceLimitTypeSpectrocluster captures enum value "spectrocluster" + V1ResourceLimitTypeSpectrocluster V1ResourceLimitType = "spectrocluster" + + // V1ResourceLimitTypeEdgehost captures enum value "edgehost" + V1ResourceLimitTypeEdgehost V1ResourceLimitType = "edgehost" + + // V1ResourceLimitTypeAppprofile captures enum value "appprofile" + V1ResourceLimitTypeAppprofile V1ResourceLimitType = "appprofile" + + // V1ResourceLimitTypeAppdeployment captures enum value "appdeployment" + V1ResourceLimitTypeAppdeployment V1ResourceLimitType = "appdeployment" + + // V1ResourceLimitTypeEdgetoken captures enum value "edgetoken" + V1ResourceLimitTypeEdgetoken V1ResourceLimitType = "edgetoken" + + // V1ResourceLimitTypeClustergroup captures enum value "clustergroup" + V1ResourceLimitTypeClustergroup V1ResourceLimitType = "clustergroup" + + // V1ResourceLimitTypeFilter captures enum value "filter" + V1ResourceLimitTypeFilter V1ResourceLimitType = "filter" + + // V1ResourceLimitTypeSystemadmin captures enum value "systemadmin" + V1ResourceLimitTypeSystemadmin V1ResourceLimitType = "systemadmin" +) + +// for schema +var v1ResourceLimitTypeEnum []interface{} + +func init() { + var res []V1ResourceLimitType + if err := json.Unmarshal([]byte(`["user","project","apiKey","team","role","cloudaccount","clusterprofile","workspace","registry","privategateway","location","certificate","macro","sshkey","alert","spectrocluster","edgehost","appprofile","appdeployment","edgetoken","clustergroup","filter","systemadmin"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + v1ResourceLimitTypeEnum = append(v1ResourceLimitTypeEnum, v) + } +} + +func (m V1ResourceLimitType) validateV1ResourceLimitTypeEnum(path, location string, value V1ResourceLimitType) error { + if err := validate.EnumCase(path, location, value, v1ResourceLimitTypeEnum, true); err != nil { + return err + } + return nil +} + +// Validate validates this v1 resource limit type +func (m V1ResourceLimitType) Validate(formats strfmt.Registry) error { + var res []error + + // value enum + if err := m.validateV1ResourceLimitTypeEnum("", "body", m); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/models/v1_resource_reference.go b/api/models/v1_resource_reference.go new file mode 100644 index 00000000..79d2d14e --- /dev/null +++ b/api/models/v1_resource_reference.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1ResourceReference v1 resource reference +// +// swagger:model v1ResourceReference +type V1ResourceReference struct { + + // kind + Kind string `json:"kind,omitempty"` + + // name + Name string `json:"name,omitempty"` + + // uid + // Required: true + UID *string `json:"uid"` +} + +// Validate validates this v1 resource reference +func (m *V1ResourceReference) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateUID(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ResourceReference) validateUID(formats strfmt.Registry) error { + + if err := validate.Required("uid", "body", m.UID); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ResourceReference) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ResourceReference) UnmarshalBinary(b []byte) error { + var res V1ResourceReference + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_resource_roles.go b/api/models/v1_resource_roles.go new file mode 100644 index 00000000..049d227c --- /dev/null +++ b/api/models/v1_resource_roles.go @@ -0,0 +1,80 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ResourceRoles v1 resource roles +// +// swagger:model v1ResourceRoles +type V1ResourceRoles struct { + + // resource roles + ResourceRoles []*V1ResourceRolesEntity `json:"resourceRoles"` +} + +// Validate validates this v1 resource roles +func (m *V1ResourceRoles) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateResourceRoles(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ResourceRoles) validateResourceRoles(formats strfmt.Registry) error { + + if swag.IsZero(m.ResourceRoles) { // not required + return nil + } + + for i := 0; i < len(m.ResourceRoles); i++ { + if swag.IsZero(m.ResourceRoles[i]) { // not required + continue + } + + if m.ResourceRoles[i] != nil { + if err := m.ResourceRoles[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("resourceRoles" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ResourceRoles) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ResourceRoles) UnmarshalBinary(b []byte) error { + var res V1ResourceRoles + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_resource_roles_entity.go b/api/models/v1_resource_roles_entity.go new file mode 100644 index 00000000..55061bb7 --- /dev/null +++ b/api/models/v1_resource_roles_entity.go @@ -0,0 +1,147 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ResourceRolesEntity v1 resource roles entity +// +// swagger:model v1ResourceRolesEntity +type V1ResourceRolesEntity struct { + + // filter refs + FilterRefs []*V1UIDSummary `json:"filterRefs"` + + // project uids + ProjectUids []*V1UIDSummary `json:"projectUids"` + + // roles + Roles []*V1UIDSummary `json:"roles"` + + // uid + UID string `json:"uid,omitempty"` +} + +// Validate validates this v1 resource roles entity +func (m *V1ResourceRolesEntity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateFilterRefs(formats); err != nil { + res = append(res, err) + } + + if err := m.validateProjectUids(formats); err != nil { + res = append(res, err) + } + + if err := m.validateRoles(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ResourceRolesEntity) validateFilterRefs(formats strfmt.Registry) error { + + if swag.IsZero(m.FilterRefs) { // not required + return nil + } + + for i := 0; i < len(m.FilterRefs); i++ { + if swag.IsZero(m.FilterRefs[i]) { // not required + continue + } + + if m.FilterRefs[i] != nil { + if err := m.FilterRefs[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("filterRefs" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1ResourceRolesEntity) validateProjectUids(formats strfmt.Registry) error { + + if swag.IsZero(m.ProjectUids) { // not required + return nil + } + + for i := 0; i < len(m.ProjectUids); i++ { + if swag.IsZero(m.ProjectUids[i]) { // not required + continue + } + + if m.ProjectUids[i] != nil { + if err := m.ProjectUids[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("projectUids" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1ResourceRolesEntity) validateRoles(formats strfmt.Registry) error { + + if swag.IsZero(m.Roles) { // not required + return nil + } + + for i := 0; i < len(m.Roles); i++ { + if swag.IsZero(m.Roles[i]) { // not required + continue + } + + if m.Roles[i] != nil { + if err := m.Roles[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("roles" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ResourceRolesEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ResourceRolesEntity) UnmarshalBinary(b []byte) error { + var res V1ResourceRolesEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_resource_roles_update_entity.go b/api/models/v1_resource_roles_update_entity.go new file mode 100644 index 00000000..033dca0a --- /dev/null +++ b/api/models/v1_resource_roles_update_entity.go @@ -0,0 +1,49 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ResourceRolesUpdateEntity v1 resource roles update entity +// +// swagger:model v1ResourceRolesUpdateEntity +type V1ResourceRolesUpdateEntity struct { + + // filter refs + FilterRefs []string `json:"filterRefs"` + + // project uids + ProjectUids []string `json:"projectUids"` + + // roles + Roles []string `json:"roles"` +} + +// Validate validates this v1 resource roles update entity +func (m *V1ResourceRolesUpdateEntity) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1ResourceRolesUpdateEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ResourceRolesUpdateEntity) UnmarshalBinary(b []byte) error { + var res V1ResourceRolesUpdateEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_resource_total_cloud_cost.go b/api/models/v1_resource_total_cloud_cost.go new file mode 100644 index 00000000..4f3f5dfd --- /dev/null +++ b/api/models/v1_resource_total_cloud_cost.go @@ -0,0 +1,49 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ResourceTotalCloudCost Resource total cloud cost information +// +// swagger:model v1ResourceTotalCloudCost +type V1ResourceTotalCloudCost struct { + + // compute + Compute float64 `json:"compute"` + + // storage + Storage float64 `json:"storage"` + + // total + Total float64 `json:"total"` +} + +// Validate validates this v1 resource total cloud cost +func (m *V1ResourceTotalCloudCost) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1ResourceTotalCloudCost) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ResourceTotalCloudCost) UnmarshalBinary(b []byte) error { + var res V1ResourceTotalCloudCost + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_resource_total_consumption_data.go b/api/models/v1_resource_total_consumption_data.go new file mode 100644 index 00000000..3706324d --- /dev/null +++ b/api/models/v1_resource_total_consumption_data.go @@ -0,0 +1,96 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ResourceTotalConsumptionData Resource total cosumption data +// +// swagger:model v1ResourceTotalConsumptionData +type V1ResourceTotalConsumptionData struct { + + // allotted + Allotted *V1ResourceConsumptionData `json:"allotted,omitempty"` + + // usage + Usage *V1ResourceConsumptionData `json:"usage,omitempty"` +} + +// Validate validates this v1 resource total consumption data +func (m *V1ResourceTotalConsumptionData) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateAllotted(formats); err != nil { + res = append(res, err) + } + + if err := m.validateUsage(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ResourceTotalConsumptionData) validateAllotted(formats strfmt.Registry) error { + + if swag.IsZero(m.Allotted) { // not required + return nil + } + + if m.Allotted != nil { + if err := m.Allotted.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("allotted") + } + return err + } + } + + return nil +} + +func (m *V1ResourceTotalConsumptionData) validateUsage(formats strfmt.Registry) error { + + if swag.IsZero(m.Usage) { // not required + return nil + } + + if m.Usage != nil { + if err := m.Usage.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("usage") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ResourceTotalConsumptionData) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ResourceTotalConsumptionData) UnmarshalBinary(b []byte) error { + var res V1ResourceTotalConsumptionData + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_resource_total_cost.go b/api/models/v1_resource_total_cost.go new file mode 100644 index 00000000..739e7222 --- /dev/null +++ b/api/models/v1_resource_total_cost.go @@ -0,0 +1,52 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ResourceTotalCost Resource total cost information +// +// swagger:model v1ResourceTotalCost +type V1ResourceTotalCost struct { + + // cpu + CPU float64 `json:"cpu"` + + // memory + Memory float64 `json:"memory"` + + // storage + Storage float64 `json:"storage"` + + // total + Total float64 `json:"total"` +} + +// Validate validates this v1 resource total cost +func (m *V1ResourceTotalCost) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1ResourceTotalCost) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ResourceTotalCost) UnmarshalBinary(b []byte) error { + var res V1ResourceTotalCost + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_resource_usage_data_point.go b/api/models/v1_resource_usage_data_point.go new file mode 100644 index 00000000..68110984 --- /dev/null +++ b/api/models/v1_resource_usage_data_point.go @@ -0,0 +1,105 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ResourceUsageDataPoint Resource usage data point +// +// swagger:model v1ResourceUsageDataPoint +type V1ResourceUsageDataPoint struct { + + // baremetal + Baremetal *V1ResourceUsageMeteringDataPoint `json:"baremetal,omitempty"` + + // cpu + CPU float64 `json:"cpu"` + + // edgehost + Edgehost *V1ResourceUsageMeteringDataPoint `json:"edgehost,omitempty"` + + // memory + Memory float64 `json:"memory"` + + // timestamp + Timestamp int64 `json:"timestamp,omitempty"` +} + +// Validate validates this v1 resource usage data point +func (m *V1ResourceUsageDataPoint) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateBaremetal(formats); err != nil { + res = append(res, err) + } + + if err := m.validateEdgehost(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ResourceUsageDataPoint) validateBaremetal(formats strfmt.Registry) error { + + if swag.IsZero(m.Baremetal) { // not required + return nil + } + + if m.Baremetal != nil { + if err := m.Baremetal.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("baremetal") + } + return err + } + } + + return nil +} + +func (m *V1ResourceUsageDataPoint) validateEdgehost(formats strfmt.Registry) error { + + if swag.IsZero(m.Edgehost) { // not required + return nil + } + + if m.Edgehost != nil { + if err := m.Edgehost.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("edgehost") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ResourceUsageDataPoint) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ResourceUsageDataPoint) UnmarshalBinary(b []byte) error { + var res V1ResourceUsageDataPoint + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_resource_usage_metering_data_point.go b/api/models/v1_resource_usage_metering_data_point.go new file mode 100644 index 00000000..7ccf5289 --- /dev/null +++ b/api/models/v1_resource_usage_metering_data_point.go @@ -0,0 +1,52 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ResourceUsageMeteringDataPoint min and max count for machines & edgehost for the given period +// +// swagger:model v1ResourceUsageMeteringDataPoint +type V1ResourceUsageMeteringDataPoint struct { + + // active edgehosts + ActiveEdgehosts int64 `json:"activeEdgehosts,omitempty"` + + // active machines + ActiveMachines int64 `json:"activeMachines,omitempty"` + + // max edgehosts + MaxEdgehosts int64 `json:"maxEdgehosts,omitempty"` + + // max machines + MaxMachines int64 `json:"maxMachines,omitempty"` +} + +// Validate validates this v1 resource usage metering data point +func (m *V1ResourceUsageMeteringDataPoint) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1ResourceUsageMeteringDataPoint) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ResourceUsageMeteringDataPoint) UnmarshalBinary(b []byte) error { + var res V1ResourceUsageMeteringDataPoint + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_resource_usage_summary.go b/api/models/v1_resource_usage_summary.go new file mode 100644 index 00000000..a7352df1 --- /dev/null +++ b/api/models/v1_resource_usage_summary.go @@ -0,0 +1,143 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1ResourceUsageSummary Resource usage summary information +// +// swagger:model v1ResourceUsageSummary +type V1ResourceUsageSummary struct { + + // associated resources + AssociatedResources []*V1ResourceReference `json:"associatedResources"` + + // data + // Unique: true + Data []*V1ResourceUsageDataPoint `json:"data"` + + // entity + Entity *V1ResourceReference `json:"entity,omitempty"` +} + +// Validate validates this v1 resource usage summary +func (m *V1ResourceUsageSummary) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateAssociatedResources(formats); err != nil { + res = append(res, err) + } + + if err := m.validateData(formats); err != nil { + res = append(res, err) + } + + if err := m.validateEntity(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ResourceUsageSummary) validateAssociatedResources(formats strfmt.Registry) error { + + if swag.IsZero(m.AssociatedResources) { // not required + return nil + } + + for i := 0; i < len(m.AssociatedResources); i++ { + if swag.IsZero(m.AssociatedResources[i]) { // not required + continue + } + + if m.AssociatedResources[i] != nil { + if err := m.AssociatedResources[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("associatedResources" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1ResourceUsageSummary) validateData(formats strfmt.Registry) error { + + if swag.IsZero(m.Data) { // not required + return nil + } + + if err := validate.UniqueItems("data", "body", m.Data); err != nil { + return err + } + + for i := 0; i < len(m.Data); i++ { + if swag.IsZero(m.Data[i]) { // not required + continue + } + + if m.Data[i] != nil { + if err := m.Data[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("data" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1ResourceUsageSummary) validateEntity(formats strfmt.Registry) error { + + if swag.IsZero(m.Entity) { // not required + return nil + } + + if m.Entity != nil { + if err := m.Entity.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("entity") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ResourceUsageSummary) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ResourceUsageSummary) UnmarshalBinary(b []byte) error { + var res V1ResourceUsageSummary + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_resource_usage_summary_filter.go b/api/models/v1_resource_usage_summary_filter.go new file mode 100644 index 00000000..1ffa145d --- /dev/null +++ b/api/models/v1_resource_usage_summary_filter.go @@ -0,0 +1,252 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1ResourceUsageSummaryFilter Resource usage summary filter +// +// swagger:model v1ResourceUsageSummaryFilter +type V1ResourceUsageSummaryFilter struct { + + // clouds + // Unique: true + Clouds []string `json:"clouds"` + + // clusters + // Unique: true + Clusters []string `json:"clusters"` + + // end time + // Format: date-time + EndTime V1Time `json:"endTime,omitempty"` + + // include control plane machines + IncludeControlPlaneMachines bool `json:"includeControlPlaneMachines,omitempty"` + + // Deprecated. Use includeControlPlaneMachines + IncludeMasterMachines bool `json:"includeMasterMachines,omitempty"` + + // namespaces + // Unique: true + Namespaces []string `json:"namespaces"` + + // pods + // Unique: true + Pods []string `json:"pods"` + + // projects + // Unique: true + Projects []string `json:"projects"` + + // start time + // Format: date-time + StartTime V1Time `json:"startTime,omitempty"` + + // workload + Workload *V1ResourceWorkloadFilter `json:"workload,omitempty"` + + // workspaces + // Unique: true + Workspaces []string `json:"workspaces"` +} + +// Validate validates this v1 resource usage summary filter +func (m *V1ResourceUsageSummaryFilter) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateClouds(formats); err != nil { + res = append(res, err) + } + + if err := m.validateClusters(formats); err != nil { + res = append(res, err) + } + + if err := m.validateEndTime(formats); err != nil { + res = append(res, err) + } + + if err := m.validateNamespaces(formats); err != nil { + res = append(res, err) + } + + if err := m.validatePods(formats); err != nil { + res = append(res, err) + } + + if err := m.validateProjects(formats); err != nil { + res = append(res, err) + } + + if err := m.validateStartTime(formats); err != nil { + res = append(res, err) + } + + if err := m.validateWorkload(formats); err != nil { + res = append(res, err) + } + + if err := m.validateWorkspaces(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ResourceUsageSummaryFilter) validateClouds(formats strfmt.Registry) error { + + if swag.IsZero(m.Clouds) { // not required + return nil + } + + if err := validate.UniqueItems("clouds", "body", m.Clouds); err != nil { + return err + } + + return nil +} + +func (m *V1ResourceUsageSummaryFilter) validateClusters(formats strfmt.Registry) error { + + if swag.IsZero(m.Clusters) { // not required + return nil + } + + if err := validate.UniqueItems("clusters", "body", m.Clusters); err != nil { + return err + } + + return nil +} + +func (m *V1ResourceUsageSummaryFilter) validateEndTime(formats strfmt.Registry) error { + + if swag.IsZero(m.EndTime) { // not required + return nil + } + + if err := m.EndTime.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("endTime") + } + return err + } + + return nil +} + +func (m *V1ResourceUsageSummaryFilter) validateNamespaces(formats strfmt.Registry) error { + + if swag.IsZero(m.Namespaces) { // not required + return nil + } + + if err := validate.UniqueItems("namespaces", "body", m.Namespaces); err != nil { + return err + } + + return nil +} + +func (m *V1ResourceUsageSummaryFilter) validatePods(formats strfmt.Registry) error { + + if swag.IsZero(m.Pods) { // not required + return nil + } + + if err := validate.UniqueItems("pods", "body", m.Pods); err != nil { + return err + } + + return nil +} + +func (m *V1ResourceUsageSummaryFilter) validateProjects(formats strfmt.Registry) error { + + if swag.IsZero(m.Projects) { // not required + return nil + } + + if err := validate.UniqueItems("projects", "body", m.Projects); err != nil { + return err + } + + return nil +} + +func (m *V1ResourceUsageSummaryFilter) validateStartTime(formats strfmt.Registry) error { + + if swag.IsZero(m.StartTime) { // not required + return nil + } + + if err := m.StartTime.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("startTime") + } + return err + } + + return nil +} + +func (m *V1ResourceUsageSummaryFilter) validateWorkload(formats strfmt.Registry) error { + + if swag.IsZero(m.Workload) { // not required + return nil + } + + if m.Workload != nil { + if err := m.Workload.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("workload") + } + return err + } + } + + return nil +} + +func (m *V1ResourceUsageSummaryFilter) validateWorkspaces(formats strfmt.Registry) error { + + if swag.IsZero(m.Workspaces) { // not required + return nil + } + + if err := validate.UniqueItems("workspaces", "body", m.Workspaces); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ResourceUsageSummaryFilter) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ResourceUsageSummaryFilter) UnmarshalBinary(b []byte) error { + var res V1ResourceUsageSummaryFilter + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_resource_usage_summary_options.go b/api/models/v1_resource_usage_summary_options.go new file mode 100644 index 00000000..37fed14d --- /dev/null +++ b/api/models/v1_resource_usage_summary_options.go @@ -0,0 +1,133 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "encoding/json" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1ResourceUsageSummaryOptions Resource usage summary options +// +// swagger:model v1ResourceUsageSummaryOptions +type V1ResourceUsageSummaryOptions struct { + + // enable summary view + EnableSummaryView *bool `json:"enableSummaryView,omitempty"` + + // group by + // Enum: [tenant project workspace cluster namespace deployment statefulset daemonset pod cloud] + GroupBy *string `json:"groupBy,omitempty"` + + // include metering info + IncludeMeteringInfo *bool `json:"includeMeteringInfo,omitempty"` + + // period + Period *int32 `json:"period,omitempty"` +} + +// Validate validates this v1 resource usage summary options +func (m *V1ResourceUsageSummaryOptions) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateGroupBy(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +var v1ResourceUsageSummaryOptionsTypeGroupByPropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["tenant","project","workspace","cluster","namespace","deployment","statefulset","daemonset","pod","cloud"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + v1ResourceUsageSummaryOptionsTypeGroupByPropEnum = append(v1ResourceUsageSummaryOptionsTypeGroupByPropEnum, v) + } +} + +const ( + + // V1ResourceUsageSummaryOptionsGroupByTenant captures enum value "tenant" + V1ResourceUsageSummaryOptionsGroupByTenant string = "tenant" + + // V1ResourceUsageSummaryOptionsGroupByProject captures enum value "project" + V1ResourceUsageSummaryOptionsGroupByProject string = "project" + + // V1ResourceUsageSummaryOptionsGroupByWorkspace captures enum value "workspace" + V1ResourceUsageSummaryOptionsGroupByWorkspace string = "workspace" + + // V1ResourceUsageSummaryOptionsGroupByCluster captures enum value "cluster" + V1ResourceUsageSummaryOptionsGroupByCluster string = "cluster" + + // V1ResourceUsageSummaryOptionsGroupByNamespace captures enum value "namespace" + V1ResourceUsageSummaryOptionsGroupByNamespace string = "namespace" + + // V1ResourceUsageSummaryOptionsGroupByDeployment captures enum value "deployment" + V1ResourceUsageSummaryOptionsGroupByDeployment string = "deployment" + + // V1ResourceUsageSummaryOptionsGroupByStatefulset captures enum value "statefulset" + V1ResourceUsageSummaryOptionsGroupByStatefulset string = "statefulset" + + // V1ResourceUsageSummaryOptionsGroupByDaemonset captures enum value "daemonset" + V1ResourceUsageSummaryOptionsGroupByDaemonset string = "daemonset" + + // V1ResourceUsageSummaryOptionsGroupByPod captures enum value "pod" + V1ResourceUsageSummaryOptionsGroupByPod string = "pod" + + // V1ResourceUsageSummaryOptionsGroupByCloud captures enum value "cloud" + V1ResourceUsageSummaryOptionsGroupByCloud string = "cloud" +) + +// prop value enum +func (m *V1ResourceUsageSummaryOptions) validateGroupByEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, v1ResourceUsageSummaryOptionsTypeGroupByPropEnum, true); err != nil { + return err + } + return nil +} + +func (m *V1ResourceUsageSummaryOptions) validateGroupBy(formats strfmt.Registry) error { + + if swag.IsZero(m.GroupBy) { // not required + return nil + } + + // value enum + if err := m.validateGroupByEnum("groupBy", "body", *m.GroupBy); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ResourceUsageSummaryOptions) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ResourceUsageSummaryOptions) UnmarshalBinary(b []byte) error { + var res V1ResourceUsageSummaryOptions + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_resource_usage_summary_spec.go b/api/models/v1_resource_usage_summary_spec.go new file mode 100644 index 00000000..b176efba --- /dev/null +++ b/api/models/v1_resource_usage_summary_spec.go @@ -0,0 +1,96 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ResourceUsageSummarySpec Resource usage summary spec +// +// swagger:model v1ResourceUsageSummarySpec +type V1ResourceUsageSummarySpec struct { + + // filter + Filter *V1ResourceUsageSummaryFilter `json:"filter,omitempty"` + + // options + Options *V1ResourceUsageSummaryOptions `json:"options,omitempty"` +} + +// Validate validates this v1 resource usage summary spec +func (m *V1ResourceUsageSummarySpec) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateFilter(formats); err != nil { + res = append(res, err) + } + + if err := m.validateOptions(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ResourceUsageSummarySpec) validateFilter(formats strfmt.Registry) error { + + if swag.IsZero(m.Filter) { // not required + return nil + } + + if m.Filter != nil { + if err := m.Filter.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("filter") + } + return err + } + } + + return nil +} + +func (m *V1ResourceUsageSummarySpec) validateOptions(formats strfmt.Registry) error { + + if swag.IsZero(m.Options) { // not required + return nil + } + + if m.Options != nil { + if err := m.Options.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("options") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ResourceUsageSummarySpec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ResourceUsageSummarySpec) UnmarshalBinary(b []byte) error { + var res V1ResourceUsageSummarySpec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_resource_workload_filter.go b/api/models/v1_resource_workload_filter.go new file mode 100644 index 00000000..9573b5f3 --- /dev/null +++ b/api/models/v1_resource_workload_filter.go @@ -0,0 +1,127 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "encoding/json" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1ResourceWorkloadFilter Workload resource filter +// +// swagger:model v1ResourceWorkloadFilter +type V1ResourceWorkloadFilter struct { + + // names + // Unique: true + Names []string `json:"names"` + + // type + // Enum: [deployment statefulset daemonset all] + Type *string `json:"type,omitempty"` +} + +// Validate validates this v1 resource workload filter +func (m *V1ResourceWorkloadFilter) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateNames(formats); err != nil { + res = append(res, err) + } + + if err := m.validateType(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ResourceWorkloadFilter) validateNames(formats strfmt.Registry) error { + + if swag.IsZero(m.Names) { // not required + return nil + } + + if err := validate.UniqueItems("names", "body", m.Names); err != nil { + return err + } + + return nil +} + +var v1ResourceWorkloadFilterTypeTypePropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["deployment","statefulset","daemonset","all"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + v1ResourceWorkloadFilterTypeTypePropEnum = append(v1ResourceWorkloadFilterTypeTypePropEnum, v) + } +} + +const ( + + // V1ResourceWorkloadFilterTypeDeployment captures enum value "deployment" + V1ResourceWorkloadFilterTypeDeployment string = "deployment" + + // V1ResourceWorkloadFilterTypeStatefulset captures enum value "statefulset" + V1ResourceWorkloadFilterTypeStatefulset string = "statefulset" + + // V1ResourceWorkloadFilterTypeDaemonset captures enum value "daemonset" + V1ResourceWorkloadFilterTypeDaemonset string = "daemonset" + + // V1ResourceWorkloadFilterTypeAll captures enum value "all" + V1ResourceWorkloadFilterTypeAll string = "all" +) + +// prop value enum +func (m *V1ResourceWorkloadFilter) validateTypeEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, v1ResourceWorkloadFilterTypeTypePropEnum, true); err != nil { + return err + } + return nil +} + +func (m *V1ResourceWorkloadFilter) validateType(formats strfmt.Registry) error { + + if swag.IsZero(m.Type) { // not required + return nil + } + + // value enum + if err := m.validateTypeEnum("type", "body", *m.Type); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ResourceWorkloadFilter) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ResourceWorkloadFilter) UnmarshalBinary(b []byte) error { + var res V1ResourceWorkloadFilter + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_resources_cloud_cost_summary.go b/api/models/v1_resources_cloud_cost_summary.go new file mode 100644 index 00000000..357bf090 --- /dev/null +++ b/api/models/v1_resources_cloud_cost_summary.go @@ -0,0 +1,105 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ResourcesCloudCostSummary Resources cloud cost summary information +// +// swagger:model v1ResourcesCloudCostSummary +type V1ResourcesCloudCostSummary struct { + + // resources + Resources []*V1ResourceCloudCostSummary `json:"resources"` + + // total + Total *V1ResourceTotalCloudCost `json:"total,omitempty"` +} + +// Validate validates this v1 resources cloud cost summary +func (m *V1ResourcesCloudCostSummary) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateResources(formats); err != nil { + res = append(res, err) + } + + if err := m.validateTotal(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ResourcesCloudCostSummary) validateResources(formats strfmt.Registry) error { + + if swag.IsZero(m.Resources) { // not required + return nil + } + + for i := 0; i < len(m.Resources); i++ { + if swag.IsZero(m.Resources[i]) { // not required + continue + } + + if m.Resources[i] != nil { + if err := m.Resources[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("resources" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1ResourcesCloudCostSummary) validateTotal(formats strfmt.Registry) error { + + if swag.IsZero(m.Total) { // not required + return nil + } + + if m.Total != nil { + if err := m.Total.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("total") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ResourcesCloudCostSummary) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ResourcesCloudCostSummary) UnmarshalBinary(b []byte) error { + var res V1ResourcesCloudCostSummary + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_resources_consumption.go b/api/models/v1_resources_consumption.go new file mode 100644 index 00000000..8d4dd636 --- /dev/null +++ b/api/models/v1_resources_consumption.go @@ -0,0 +1,111 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ResourcesConsumption Resources consumption information +// +// swagger:model v1ResourcesConsumption +type V1ResourcesConsumption struct { + + // cpu unit + CPUUnit string `json:"cpuUnit,omitempty"` + + // memory unit + MemoryUnit string `json:"memoryUnit,omitempty"` + + // resources + Resources []*V1ResourceConsumption `json:"resources"` + + // total + Total *V1ResourceTotalConsumptionData `json:"total,omitempty"` +} + +// Validate validates this v1 resources consumption +func (m *V1ResourcesConsumption) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateResources(formats); err != nil { + res = append(res, err) + } + + if err := m.validateTotal(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ResourcesConsumption) validateResources(formats strfmt.Registry) error { + + if swag.IsZero(m.Resources) { // not required + return nil + } + + for i := 0; i < len(m.Resources); i++ { + if swag.IsZero(m.Resources[i]) { // not required + continue + } + + if m.Resources[i] != nil { + if err := m.Resources[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("resources" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1ResourcesConsumption) validateTotal(formats strfmt.Registry) error { + + if swag.IsZero(m.Total) { // not required + return nil + } + + if m.Total != nil { + if err := m.Total.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("total") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ResourcesConsumption) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ResourcesConsumption) UnmarshalBinary(b []byte) error { + var res V1ResourcesConsumption + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_resources_cost_summary.go b/api/models/v1_resources_cost_summary.go new file mode 100644 index 00000000..9e5d8d47 --- /dev/null +++ b/api/models/v1_resources_cost_summary.go @@ -0,0 +1,105 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ResourcesCostSummary Resources cost summary information +// +// swagger:model v1ResourcesCostSummary +type V1ResourcesCostSummary struct { + + // resources + Resources []*V1ResourceCostSummary `json:"resources"` + + // total + Total *V1ResourceTotalCost `json:"total,omitempty"` +} + +// Validate validates this v1 resources cost summary +func (m *V1ResourcesCostSummary) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateResources(formats); err != nil { + res = append(res, err) + } + + if err := m.validateTotal(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ResourcesCostSummary) validateResources(formats strfmt.Registry) error { + + if swag.IsZero(m.Resources) { // not required + return nil + } + + for i := 0; i < len(m.Resources); i++ { + if swag.IsZero(m.Resources[i]) { // not required + continue + } + + if m.Resources[i] != nil { + if err := m.Resources[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("resources" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1ResourcesCostSummary) validateTotal(formats strfmt.Registry) error { + + if swag.IsZero(m.Total) { // not required + return nil + } + + if m.Total != nil { + if err := m.Total.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("total") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ResourcesCostSummary) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ResourcesCostSummary) UnmarshalBinary(b []byte) error { + var res V1ResourcesCostSummary + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_resources_usage_summary.go b/api/models/v1_resources_usage_summary.go new file mode 100644 index 00000000..829b3195 --- /dev/null +++ b/api/models/v1_resources_usage_summary.go @@ -0,0 +1,86 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ResourcesUsageSummary Resources usage summary information +// +// swagger:model v1ResourcesUsageSummary +type V1ResourcesUsageSummary struct { + + // cpu unit + CPUUnit string `json:"cpuUnit,omitempty"` + + // memory unit + MemoryUnit string `json:"memoryUnit,omitempty"` + + // resources + Resources []*V1ResourceUsageSummary `json:"resources"` +} + +// Validate validates this v1 resources usage summary +func (m *V1ResourcesUsageSummary) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateResources(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ResourcesUsageSummary) validateResources(formats strfmt.Registry) error { + + if swag.IsZero(m.Resources) { // not required + return nil + } + + for i := 0; i < len(m.Resources); i++ { + if swag.IsZero(m.Resources[i]) { // not required + continue + } + + if m.Resources[i] != nil { + if err := m.Resources[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("resources" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ResourcesUsageSummary) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ResourcesUsageSummary) UnmarshalBinary(b []byte) error { + var res V1ResourcesUsageSummary + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_restore_status_meta.go b/api/models/v1_restore_status_meta.go new file mode 100644 index 00000000..78477b5c --- /dev/null +++ b/api/models/v1_restore_status_meta.go @@ -0,0 +1,76 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1RestoreStatusMeta Restore status meta +// +// swagger:model v1RestoreStatusMeta +type V1RestoreStatusMeta struct { + + // is succeeded + IsSucceeded bool `json:"isSucceeded,omitempty"` + + // msg + Msg string `json:"msg,omitempty"` + + // restore time + // Format: date-time + RestoreTime V1Time `json:"restoreTime,omitempty"` +} + +// Validate validates this v1 restore status meta +func (m *V1RestoreStatusMeta) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateRestoreTime(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1RestoreStatusMeta) validateRestoreTime(formats strfmt.Registry) error { + + if swag.IsZero(m.RestoreTime) { // not required + return nil + } + + if err := m.RestoreTime.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("restoreTime") + } + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1RestoreStatusMeta) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1RestoreStatusMeta) UnmarshalBinary(b []byte) error { + var res V1RestoreStatusMeta + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_role.go b/api/models/v1_role.go new file mode 100644 index 00000000..0de61054 --- /dev/null +++ b/api/models/v1_role.go @@ -0,0 +1,121 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1Role Role +// +// swagger:model v1Role +type V1Role struct { + + // metadata + Metadata *V1ObjectMeta `json:"metadata,omitempty"` + + // spec + Spec *V1RoleSpec `json:"spec,omitempty"` + + // status + Status *V1RoleStatus `json:"status,omitempty"` +} + +// Validate validates this v1 role +func (m *V1Role) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSpec(formats); err != nil { + res = append(res, err) + } + + if err := m.validateStatus(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1Role) validateMetadata(formats strfmt.Registry) error { + + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } + return err + } + } + + return nil +} + +func (m *V1Role) validateSpec(formats strfmt.Registry) error { + + if swag.IsZero(m.Spec) { // not required + return nil + } + + if m.Spec != nil { + if err := m.Spec.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec") + } + return err + } + } + + return nil +} + +func (m *V1Role) validateStatus(formats strfmt.Registry) error { + + if swag.IsZero(m.Status) { // not required + return nil + } + + if m.Status != nil { + if err := m.Status.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("status") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1Role) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1Role) UnmarshalBinary(b []byte) error { + var res V1Role + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_role_clone.go b/api/models/v1_role_clone.go new file mode 100644 index 00000000..a4bca27d --- /dev/null +++ b/api/models/v1_role_clone.go @@ -0,0 +1,71 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1RoleClone Role clone specifications +// +// swagger:model v1RoleClone +type V1RoleClone struct { + + // metadata + Metadata *V1RoleCloneMetadata `json:"metadata,omitempty"` +} + +// Validate validates this v1 role clone +func (m *V1RoleClone) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1RoleClone) validateMetadata(formats strfmt.Registry) error { + + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1RoleClone) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1RoleClone) UnmarshalBinary(b []byte) error { + var res V1RoleClone + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_role_clone_metadata.go b/api/models/v1_role_clone_metadata.go new file mode 100644 index 00000000..64838956 --- /dev/null +++ b/api/models/v1_role_clone_metadata.go @@ -0,0 +1,43 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1RoleCloneMetadata Role clone metadata +// +// swagger:model v1RoleCloneMetadata +type V1RoleCloneMetadata struct { + + // name + Name string `json:"name,omitempty"` +} + +// Validate validates this v1 role clone metadata +func (m *V1RoleCloneMetadata) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1RoleCloneMetadata) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1RoleCloneMetadata) UnmarshalBinary(b []byte) error { + var res V1RoleCloneMetadata + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_role_spec.go b/api/models/v1_role_spec.go new file mode 100644 index 00000000..cdcf2a48 --- /dev/null +++ b/api/models/v1_role_spec.go @@ -0,0 +1,144 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "encoding/json" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1RoleSpec Role specifications +// +// swagger:model v1RoleSpec +type V1RoleSpec struct { + + // permissions + // Unique: true + Permissions []string `json:"permissions"` + + // scope + Scope V1Scope `json:"scope,omitempty"` + + // type + // Enum: [system user] + Type string `json:"type,omitempty"` +} + +// Validate validates this v1 role spec +func (m *V1RoleSpec) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validatePermissions(formats); err != nil { + res = append(res, err) + } + + if err := m.validateScope(formats); err != nil { + res = append(res, err) + } + + if err := m.validateType(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1RoleSpec) validatePermissions(formats strfmt.Registry) error { + + if swag.IsZero(m.Permissions) { // not required + return nil + } + + if err := validate.UniqueItems("permissions", "body", m.Permissions); err != nil { + return err + } + + return nil +} + +func (m *V1RoleSpec) validateScope(formats strfmt.Registry) error { + + if swag.IsZero(m.Scope) { // not required + return nil + } + + if err := m.Scope.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("scope") + } + return err + } + + return nil +} + +var v1RoleSpecTypeTypePropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["system","user"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + v1RoleSpecTypeTypePropEnum = append(v1RoleSpecTypeTypePropEnum, v) + } +} + +const ( + + // V1RoleSpecTypeSystem captures enum value "system" + V1RoleSpecTypeSystem string = "system" + + // V1RoleSpecTypeUser captures enum value "user" + V1RoleSpecTypeUser string = "user" +) + +// prop value enum +func (m *V1RoleSpec) validateTypeEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, v1RoleSpecTypeTypePropEnum, true); err != nil { + return err + } + return nil +} + +func (m *V1RoleSpec) validateType(formats strfmt.Registry) error { + + if swag.IsZero(m.Type) { // not required + return nil + } + + // value enum + if err := m.validateTypeEnum("type", "body", m.Type); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1RoleSpec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1RoleSpec) UnmarshalBinary(b []byte) error { + var res V1RoleSpec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_role_status.go b/api/models/v1_role_status.go new file mode 100644 index 00000000..351bfb10 --- /dev/null +++ b/api/models/v1_role_status.go @@ -0,0 +1,43 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1RoleStatus Role status +// +// swagger:model v1RoleStatus +type V1RoleStatus struct { + + // Specifies if role account is enabled/disabled + IsEnabled bool `json:"isEnabled"` +} + +// Validate validates this v1 role status +func (m *V1RoleStatus) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1RoleStatus) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1RoleStatus) UnmarshalBinary(b []byte) error { + var res V1RoleStatus + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_roles.go b/api/models/v1_roles.go new file mode 100644 index 00000000..8caefe40 --- /dev/null +++ b/api/models/v1_roles.go @@ -0,0 +1,112 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1Roles Array of Roles +// +// swagger:model v1Roles +type V1Roles struct { + + // items + // Required: true + // Unique: true + Items []*V1Role `json:"items"` + + // listmeta + Listmeta *V1ListMetaData `json:"listmeta,omitempty"` +} + +// Validate validates this v1 roles +func (m *V1Roles) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateItems(formats); err != nil { + res = append(res, err) + } + + if err := m.validateListmeta(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1Roles) validateItems(formats strfmt.Registry) error { + + if err := validate.Required("items", "body", m.Items); err != nil { + return err + } + + if err := validate.UniqueItems("items", "body", m.Items); err != nil { + return err + } + + for i := 0; i < len(m.Items); i++ { + if swag.IsZero(m.Items[i]) { // not required + continue + } + + if m.Items[i] != nil { + if err := m.Items[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("items" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1Roles) validateListmeta(formats strfmt.Registry) error { + + if swag.IsZero(m.Listmeta) { // not required + return nil + } + + if m.Listmeta != nil { + if err := m.Listmeta.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("listmeta") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1Roles) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1Roles) UnmarshalBinary(b []byte) error { + var res V1Roles + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_s3_storage_config.go b/api/models/v1_s3_storage_config.go new file mode 100644 index 00000000..6e908e4a --- /dev/null +++ b/api/models/v1_s3_storage_config.go @@ -0,0 +1,119 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1S3StorageConfig S3 storage config object +// +// swagger:model v1S3StorageConfig +type V1S3StorageConfig struct { + + // S3 storage bucket name + // Required: true + BucketName *string `json:"bucketName"` + + // CA Certificate + CaCert string `json:"caCert,omitempty"` + + // AWS cloud account credentials + // Required: true + Credentials *V1AwsCloudAccount `json:"credentials"` + + // AWS region name + // Required: true + Region *string `json:"region"` + + // s3 force path style + S3ForcePathStyle *bool `json:"s3ForcePathStyle,omitempty"` + + // Custom hosted S3 URL + S3URL string `json:"s3Url,omitempty"` + + // Set to 'true', to use Restic plugin for the backup + UseRestic *bool `json:"useRestic,omitempty"` +} + +// Validate validates this v1 s3 storage config +func (m *V1S3StorageConfig) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateBucketName(formats); err != nil { + res = append(res, err) + } + + if err := m.validateCredentials(formats); err != nil { + res = append(res, err) + } + + if err := m.validateRegion(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1S3StorageConfig) validateBucketName(formats strfmt.Registry) error { + + if err := validate.Required("bucketName", "body", m.BucketName); err != nil { + return err + } + + return nil +} + +func (m *V1S3StorageConfig) validateCredentials(formats strfmt.Registry) error { + + if err := validate.Required("credentials", "body", m.Credentials); err != nil { + return err + } + + if m.Credentials != nil { + if err := m.Credentials.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("credentials") + } + return err + } + } + + return nil +} + +func (m *V1S3StorageConfig) validateRegion(formats strfmt.Registry) error { + + if err := validate.Required("region", "body", m.Region); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1S3StorageConfig) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1S3StorageConfig) UnmarshalBinary(b []byte) error { + var res V1S3StorageConfig + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_scope.go b/api/models/v1_scope.go new file mode 100644 index 00000000..4c3cd464 --- /dev/null +++ b/api/models/v1_scope.go @@ -0,0 +1,69 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "encoding/json" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" +) + +// V1Scope v1 scope +// +// swagger:model v1Scope +type V1Scope string + +const ( + + // V1ScopeSystem captures enum value "system" + V1ScopeSystem V1Scope = "system" + + // V1ScopeTenant captures enum value "tenant" + V1ScopeTenant V1Scope = "tenant" + + // V1ScopeProject captures enum value "project" + V1ScopeProject V1Scope = "project" + + // V1ScopeResource captures enum value "resource" + V1ScopeResource V1Scope = "resource" +) + +// for schema +var v1ScopeEnum []interface{} + +func init() { + var res []V1Scope + if err := json.Unmarshal([]byte(`["system","tenant","project","resource"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + v1ScopeEnum = append(v1ScopeEnum, v) + } +} + +func (m V1Scope) validateV1ScopeEnum(path, location string, value V1Scope) error { + if err := validate.EnumCase(path, location, value, v1ScopeEnum, true); err != nil { + return err + } + return nil +} + +// Validate validates this v1 scope +func (m V1Scope) Validate(formats strfmt.Registry) error { + var res []error + + // value enum + if err := m.validateV1ScopeEnum("", "body", m); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/models/v1_search_filter_bool_condition.go b/api/models/v1_search_filter_bool_condition.go new file mode 100644 index 00000000..73a43796 --- /dev/null +++ b/api/models/v1_search_filter_bool_condition.go @@ -0,0 +1,43 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1SearchFilterBoolCondition v1 search filter bool condition +// +// swagger:model v1SearchFilterBoolCondition +type V1SearchFilterBoolCondition struct { + + // value + Value bool `json:"value,omitempty"` +} + +// Validate validates this v1 search filter bool condition +func (m *V1SearchFilterBoolCondition) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1SearchFilterBoolCondition) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1SearchFilterBoolCondition) UnmarshalBinary(b []byte) error { + var res V1SearchFilterBoolCondition + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_search_filter_condition.go b/api/models/v1_search_filter_condition.go new file mode 100644 index 00000000..cc115cdb --- /dev/null +++ b/api/models/v1_search_filter_condition.go @@ -0,0 +1,196 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1SearchFilterCondition v1 search filter condition +// +// swagger:model v1SearchFilterCondition +type V1SearchFilterCondition struct { + + // bool + Bool *V1SearchFilterBoolCondition `json:"bool,omitempty"` + + // date + Date *V1SearchFilterDateCondition `json:"date,omitempty"` + + // float + Float *V1SearchFilterFloatCondition `json:"float,omitempty"` + + // int + Int *V1SearchFilterIntegerCondition `json:"int,omitempty"` + + // key value + KeyValue *V1SearchFilterKeyValueCondition `json:"keyValue,omitempty"` + + // string + String *V1SearchFilterStringCondition `json:"string,omitempty"` +} + +// Validate validates this v1 search filter condition +func (m *V1SearchFilterCondition) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateBool(formats); err != nil { + res = append(res, err) + } + + if err := m.validateDate(formats); err != nil { + res = append(res, err) + } + + if err := m.validateFloat(formats); err != nil { + res = append(res, err) + } + + if err := m.validateInt(formats); err != nil { + res = append(res, err) + } + + if err := m.validateKeyValue(formats); err != nil { + res = append(res, err) + } + + if err := m.validateString(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1SearchFilterCondition) validateBool(formats strfmt.Registry) error { + + if swag.IsZero(m.Bool) { // not required + return nil + } + + if m.Bool != nil { + if err := m.Bool.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("bool") + } + return err + } + } + + return nil +} + +func (m *V1SearchFilterCondition) validateDate(formats strfmt.Registry) error { + + if swag.IsZero(m.Date) { // not required + return nil + } + + if m.Date != nil { + if err := m.Date.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("date") + } + return err + } + } + + return nil +} + +func (m *V1SearchFilterCondition) validateFloat(formats strfmt.Registry) error { + + if swag.IsZero(m.Float) { // not required + return nil + } + + if m.Float != nil { + if err := m.Float.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("float") + } + return err + } + } + + return nil +} + +func (m *V1SearchFilterCondition) validateInt(formats strfmt.Registry) error { + + if swag.IsZero(m.Int) { // not required + return nil + } + + if m.Int != nil { + if err := m.Int.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("int") + } + return err + } + } + + return nil +} + +func (m *V1SearchFilterCondition) validateKeyValue(formats strfmt.Registry) error { + + if swag.IsZero(m.KeyValue) { // not required + return nil + } + + if m.KeyValue != nil { + if err := m.KeyValue.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("keyValue") + } + return err + } + } + + return nil +} + +func (m *V1SearchFilterCondition) validateString(formats strfmt.Registry) error { + + if swag.IsZero(m.String) { // not required + return nil + } + + if m.String != nil { + if err := m.String.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("string") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1SearchFilterCondition) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1SearchFilterCondition) UnmarshalBinary(b []byte) error { + var res V1SearchFilterCondition + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_search_filter_conjunction_operator.go b/api/models/v1_search_filter_conjunction_operator.go new file mode 100644 index 00000000..192519d9 --- /dev/null +++ b/api/models/v1_search_filter_conjunction_operator.go @@ -0,0 +1,63 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "encoding/json" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" +) + +// V1SearchFilterConjunctionOperator v1 search filter conjunction operator +// +// swagger:model v1SearchFilterConjunctionOperator +type V1SearchFilterConjunctionOperator string + +const ( + + // V1SearchFilterConjunctionOperatorAnd captures enum value "and" + V1SearchFilterConjunctionOperatorAnd V1SearchFilterConjunctionOperator = "and" + + // V1SearchFilterConjunctionOperatorOr captures enum value "or" + V1SearchFilterConjunctionOperatorOr V1SearchFilterConjunctionOperator = "or" +) + +// for schema +var v1SearchFilterConjunctionOperatorEnum []interface{} + +func init() { + var res []V1SearchFilterConjunctionOperator + if err := json.Unmarshal([]byte(`["and","or"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + v1SearchFilterConjunctionOperatorEnum = append(v1SearchFilterConjunctionOperatorEnum, v) + } +} + +func (m V1SearchFilterConjunctionOperator) validateV1SearchFilterConjunctionOperatorEnum(path, location string, value V1SearchFilterConjunctionOperator) error { + if err := validate.EnumCase(path, location, value, v1SearchFilterConjunctionOperatorEnum, true); err != nil { + return err + } + return nil +} + +// Validate validates this v1 search filter conjunction operator +func (m V1SearchFilterConjunctionOperator) Validate(formats strfmt.Registry) error { + var res []error + + // value enum + if err := m.validateV1SearchFilterConjunctionOperatorEnum("", "body", m); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/models/v1_search_filter_date_condition.go b/api/models/v1_search_filter_date_condition.go new file mode 100644 index 00000000..77129b66 --- /dev/null +++ b/api/models/v1_search_filter_date_condition.go @@ -0,0 +1,97 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1SearchFilterDateCondition v1 search filter date condition +// +// swagger:model v1SearchFilterDateCondition +type V1SearchFilterDateCondition struct { + + // match + Match *V1SearchFilterDateConditionMatch `json:"match,omitempty"` + + // negation + Negation bool `json:"negation,omitempty"` + + // operator + Operator V1SearchFilterDateOperator `json:"operator,omitempty"` +} + +// Validate validates this v1 search filter date condition +func (m *V1SearchFilterDateCondition) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMatch(formats); err != nil { + res = append(res, err) + } + + if err := m.validateOperator(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1SearchFilterDateCondition) validateMatch(formats strfmt.Registry) error { + + if swag.IsZero(m.Match) { // not required + return nil + } + + if m.Match != nil { + if err := m.Match.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("match") + } + return err + } + } + + return nil +} + +func (m *V1SearchFilterDateCondition) validateOperator(formats strfmt.Registry) error { + + if swag.IsZero(m.Operator) { // not required + return nil + } + + if err := m.Operator.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("operator") + } + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1SearchFilterDateCondition) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1SearchFilterDateCondition) UnmarshalBinary(b []byte) error { + var res V1SearchFilterDateCondition + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_search_filter_date_condition_match.go b/api/models/v1_search_filter_date_condition_match.go new file mode 100644 index 00000000..93df8226 --- /dev/null +++ b/api/models/v1_search_filter_date_condition_match.go @@ -0,0 +1,106 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1SearchFilterDateConditionMatch v1 search filter date condition match +// +// swagger:model v1SearchFilterDateConditionMatch +type V1SearchFilterDateConditionMatch struct { + + // conjunction + Conjunction *V1SearchFilterConjunctionOperator `json:"conjunction,omitempty"` + + // values + // Unique: true + Values []V1Time `json:"values"` +} + +// Validate validates this v1 search filter date condition match +func (m *V1SearchFilterDateConditionMatch) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateConjunction(formats); err != nil { + res = append(res, err) + } + + if err := m.validateValues(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1SearchFilterDateConditionMatch) validateConjunction(formats strfmt.Registry) error { + + if swag.IsZero(m.Conjunction) { // not required + return nil + } + + if m.Conjunction != nil { + if err := m.Conjunction.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("conjunction") + } + return err + } + } + + return nil +} + +func (m *V1SearchFilterDateConditionMatch) validateValues(formats strfmt.Registry) error { + + if swag.IsZero(m.Values) { // not required + return nil + } + + if err := validate.UniqueItems("values", "body", m.Values); err != nil { + return err + } + + for i := 0; i < len(m.Values); i++ { + + if err := m.Values[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("values" + "." + strconv.Itoa(i)) + } + return err + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1SearchFilterDateConditionMatch) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1SearchFilterDateConditionMatch) UnmarshalBinary(b []byte) error { + var res V1SearchFilterDateConditionMatch + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_search_filter_date_operator.go b/api/models/v1_search_filter_date_operator.go new file mode 100644 index 00000000..a6612629 --- /dev/null +++ b/api/models/v1_search_filter_date_operator.go @@ -0,0 +1,75 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "encoding/json" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" +) + +// V1SearchFilterDateOperator v1 search filter date operator +// +// swagger:model v1SearchFilterDateOperator +type V1SearchFilterDateOperator string + +const ( + + // V1SearchFilterDateOperatorEq captures enum value "eq" + V1SearchFilterDateOperatorEq V1SearchFilterDateOperator = "eq" + + // V1SearchFilterDateOperatorGt captures enum value "gt" + V1SearchFilterDateOperatorGt V1SearchFilterDateOperator = "gt" + + // V1SearchFilterDateOperatorGte captures enum value "gte" + V1SearchFilterDateOperatorGte V1SearchFilterDateOperator = "gte" + + // V1SearchFilterDateOperatorLt captures enum value "lt" + V1SearchFilterDateOperatorLt V1SearchFilterDateOperator = "lt" + + // V1SearchFilterDateOperatorLte captures enum value "lte" + V1SearchFilterDateOperatorLte V1SearchFilterDateOperator = "lte" + + // V1SearchFilterDateOperatorRange captures enum value "range" + V1SearchFilterDateOperatorRange V1SearchFilterDateOperator = "range" +) + +// for schema +var v1SearchFilterDateOperatorEnum []interface{} + +func init() { + var res []V1SearchFilterDateOperator + if err := json.Unmarshal([]byte(`["eq","gt","gte","lt","lte","range"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + v1SearchFilterDateOperatorEnum = append(v1SearchFilterDateOperatorEnum, v) + } +} + +func (m V1SearchFilterDateOperator) validateV1SearchFilterDateOperatorEnum(path, location string, value V1SearchFilterDateOperator) error { + if err := validate.EnumCase(path, location, value, v1SearchFilterDateOperatorEnum, true); err != nil { + return err + } + return nil +} + +// Validate validates this v1 search filter date operator +func (m V1SearchFilterDateOperator) Validate(formats strfmt.Registry) error { + var res []error + + // value enum + if err := m.validateV1SearchFilterDateOperatorEnum("", "body", m); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/models/v1_search_filter_float_condition.go b/api/models/v1_search_filter_float_condition.go new file mode 100644 index 00000000..fe1136d7 --- /dev/null +++ b/api/models/v1_search_filter_float_condition.go @@ -0,0 +1,97 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1SearchFilterFloatCondition v1 search filter float condition +// +// swagger:model v1SearchFilterFloatCondition +type V1SearchFilterFloatCondition struct { + + // match + Match *V1SearchFilterFloatConditionMatch `json:"match,omitempty"` + + // negation + Negation bool `json:"negation,omitempty"` + + // operator + Operator V1SearchFilterIntegerOperator `json:"operator,omitempty"` +} + +// Validate validates this v1 search filter float condition +func (m *V1SearchFilterFloatCondition) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMatch(formats); err != nil { + res = append(res, err) + } + + if err := m.validateOperator(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1SearchFilterFloatCondition) validateMatch(formats strfmt.Registry) error { + + if swag.IsZero(m.Match) { // not required + return nil + } + + if m.Match != nil { + if err := m.Match.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("match") + } + return err + } + } + + return nil +} + +func (m *V1SearchFilterFloatCondition) validateOperator(formats strfmt.Registry) error { + + if swag.IsZero(m.Operator) { // not required + return nil + } + + if err := m.Operator.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("operator") + } + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1SearchFilterFloatCondition) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1SearchFilterFloatCondition) UnmarshalBinary(b []byte) error { + var res V1SearchFilterFloatCondition + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_search_filter_float_condition_match.go b/api/models/v1_search_filter_float_condition_match.go new file mode 100644 index 00000000..fa402cdd --- /dev/null +++ b/api/models/v1_search_filter_float_condition_match.go @@ -0,0 +1,93 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1SearchFilterFloatConditionMatch v1 search filter float condition match +// +// swagger:model v1SearchFilterFloatConditionMatch +type V1SearchFilterFloatConditionMatch struct { + + // conjunction + Conjunction *V1SearchFilterConjunctionOperator `json:"conjunction,omitempty"` + + // values + // Unique: true + Values []float64 `json:"values"` +} + +// Validate validates this v1 search filter float condition match +func (m *V1SearchFilterFloatConditionMatch) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateConjunction(formats); err != nil { + res = append(res, err) + } + + if err := m.validateValues(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1SearchFilterFloatConditionMatch) validateConjunction(formats strfmt.Registry) error { + + if swag.IsZero(m.Conjunction) { // not required + return nil + } + + if m.Conjunction != nil { + if err := m.Conjunction.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("conjunction") + } + return err + } + } + + return nil +} + +func (m *V1SearchFilterFloatConditionMatch) validateValues(formats strfmt.Registry) error { + + if swag.IsZero(m.Values) { // not required + return nil + } + + if err := validate.UniqueItems("values", "body", m.Values); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1SearchFilterFloatConditionMatch) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1SearchFilterFloatConditionMatch) UnmarshalBinary(b []byte) error { + var res V1SearchFilterFloatConditionMatch + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_search_filter_group.go b/api/models/v1_search_filter_group.go new file mode 100644 index 00000000..79ed749c --- /dev/null +++ b/api/models/v1_search_filter_group.go @@ -0,0 +1,111 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1SearchFilterGroup v1 search filter group +// +// swagger:model v1SearchFilterGroup +type V1SearchFilterGroup struct { + + // conjunction + Conjunction *V1SearchFilterConjunctionOperator `json:"conjunction,omitempty"` + + // filters + // Unique: true + Filters []*V1SearchFilterItem `json:"filters"` +} + +// Validate validates this v1 search filter group +func (m *V1SearchFilterGroup) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateConjunction(formats); err != nil { + res = append(res, err) + } + + if err := m.validateFilters(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1SearchFilterGroup) validateConjunction(formats strfmt.Registry) error { + + if swag.IsZero(m.Conjunction) { // not required + return nil + } + + if m.Conjunction != nil { + if err := m.Conjunction.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("conjunction") + } + return err + } + } + + return nil +} + +func (m *V1SearchFilterGroup) validateFilters(formats strfmt.Registry) error { + + if swag.IsZero(m.Filters) { // not required + return nil + } + + if err := validate.UniqueItems("filters", "body", m.Filters); err != nil { + return err + } + + for i := 0; i < len(m.Filters); i++ { + if swag.IsZero(m.Filters[i]) { // not required + continue + } + + if m.Filters[i] != nil { + if err := m.Filters[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("filters" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1SearchFilterGroup) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1SearchFilterGroup) UnmarshalBinary(b []byte) error { + var res V1SearchFilterGroup + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_search_filter_integer_condition.go b/api/models/v1_search_filter_integer_condition.go new file mode 100644 index 00000000..b5b45b08 --- /dev/null +++ b/api/models/v1_search_filter_integer_condition.go @@ -0,0 +1,97 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1SearchFilterIntegerCondition v1 search filter integer condition +// +// swagger:model v1SearchFilterIntegerCondition +type V1SearchFilterIntegerCondition struct { + + // match + Match *V1SearchFilterIntegerConditionMatch `json:"match,omitempty"` + + // negation + Negation bool `json:"negation,omitempty"` + + // operator + Operator V1SearchFilterIntegerOperator `json:"operator,omitempty"` +} + +// Validate validates this v1 search filter integer condition +func (m *V1SearchFilterIntegerCondition) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMatch(formats); err != nil { + res = append(res, err) + } + + if err := m.validateOperator(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1SearchFilterIntegerCondition) validateMatch(formats strfmt.Registry) error { + + if swag.IsZero(m.Match) { // not required + return nil + } + + if m.Match != nil { + if err := m.Match.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("match") + } + return err + } + } + + return nil +} + +func (m *V1SearchFilterIntegerCondition) validateOperator(formats strfmt.Registry) error { + + if swag.IsZero(m.Operator) { // not required + return nil + } + + if err := m.Operator.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("operator") + } + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1SearchFilterIntegerCondition) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1SearchFilterIntegerCondition) UnmarshalBinary(b []byte) error { + var res V1SearchFilterIntegerCondition + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_search_filter_integer_condition_match.go b/api/models/v1_search_filter_integer_condition_match.go new file mode 100644 index 00000000..3c918438 --- /dev/null +++ b/api/models/v1_search_filter_integer_condition_match.go @@ -0,0 +1,93 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1SearchFilterIntegerConditionMatch v1 search filter integer condition match +// +// swagger:model v1SearchFilterIntegerConditionMatch +type V1SearchFilterIntegerConditionMatch struct { + + // conjunction + Conjunction *V1SearchFilterConjunctionOperator `json:"conjunction,omitempty"` + + // values + // Unique: true + Values []int64 `json:"values"` +} + +// Validate validates this v1 search filter integer condition match +func (m *V1SearchFilterIntegerConditionMatch) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateConjunction(formats); err != nil { + res = append(res, err) + } + + if err := m.validateValues(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1SearchFilterIntegerConditionMatch) validateConjunction(formats strfmt.Registry) error { + + if swag.IsZero(m.Conjunction) { // not required + return nil + } + + if m.Conjunction != nil { + if err := m.Conjunction.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("conjunction") + } + return err + } + } + + return nil +} + +func (m *V1SearchFilterIntegerConditionMatch) validateValues(formats strfmt.Registry) error { + + if swag.IsZero(m.Values) { // not required + return nil + } + + if err := validate.UniqueItems("values", "body", m.Values); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1SearchFilterIntegerConditionMatch) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1SearchFilterIntegerConditionMatch) UnmarshalBinary(b []byte) error { + var res V1SearchFilterIntegerConditionMatch + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_search_filter_integer_operator.go b/api/models/v1_search_filter_integer_operator.go new file mode 100644 index 00000000..10dd762e --- /dev/null +++ b/api/models/v1_search_filter_integer_operator.go @@ -0,0 +1,72 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "encoding/json" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" +) + +// V1SearchFilterIntegerOperator v1 search filter integer operator +// +// swagger:model v1SearchFilterIntegerOperator +type V1SearchFilterIntegerOperator string + +const ( + + // V1SearchFilterIntegerOperatorEq captures enum value "eq" + V1SearchFilterIntegerOperatorEq V1SearchFilterIntegerOperator = "eq" + + // V1SearchFilterIntegerOperatorGt captures enum value "gt" + V1SearchFilterIntegerOperatorGt V1SearchFilterIntegerOperator = "gt" + + // V1SearchFilterIntegerOperatorGte captures enum value "gte" + V1SearchFilterIntegerOperatorGte V1SearchFilterIntegerOperator = "gte" + + // V1SearchFilterIntegerOperatorLt captures enum value "lt" + V1SearchFilterIntegerOperatorLt V1SearchFilterIntegerOperator = "lt" + + // V1SearchFilterIntegerOperatorLte captures enum value "lte" + V1SearchFilterIntegerOperatorLte V1SearchFilterIntegerOperator = "lte" +) + +// for schema +var v1SearchFilterIntegerOperatorEnum []interface{} + +func init() { + var res []V1SearchFilterIntegerOperator + if err := json.Unmarshal([]byte(`["eq","gt","gte","lt","lte"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + v1SearchFilterIntegerOperatorEnum = append(v1SearchFilterIntegerOperatorEnum, v) + } +} + +func (m V1SearchFilterIntegerOperator) validateV1SearchFilterIntegerOperatorEnum(path, location string, value V1SearchFilterIntegerOperator) error { + if err := validate.EnumCase(path, location, value, v1SearchFilterIntegerOperatorEnum, true); err != nil { + return err + } + return nil +} + +// Validate validates this v1 search filter integer operator +func (m V1SearchFilterIntegerOperator) Validate(formats strfmt.Registry) error { + var res []error + + // value enum + if err := m.validateV1SearchFilterIntegerOperatorEnum("", "body", m); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/models/v1_search_filter_item.go b/api/models/v1_search_filter_item.go new file mode 100644 index 00000000..78b02a18 --- /dev/null +++ b/api/models/v1_search_filter_item.go @@ -0,0 +1,97 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1SearchFilterItem v1 search filter item +// +// swagger:model v1SearchFilterItem +type V1SearchFilterItem struct { + + // condition + Condition *V1SearchFilterCondition `json:"condition,omitempty"` + + // property + Property string `json:"property,omitempty"` + + // type + Type V1SearchFilterPropertyType `json:"type,omitempty"` +} + +// Validate validates this v1 search filter item +func (m *V1SearchFilterItem) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateCondition(formats); err != nil { + res = append(res, err) + } + + if err := m.validateType(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1SearchFilterItem) validateCondition(formats strfmt.Registry) error { + + if swag.IsZero(m.Condition) { // not required + return nil + } + + if m.Condition != nil { + if err := m.Condition.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("condition") + } + return err + } + } + + return nil +} + +func (m *V1SearchFilterItem) validateType(formats strfmt.Registry) error { + + if swag.IsZero(m.Type) { // not required + return nil + } + + if err := m.Type.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("type") + } + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1SearchFilterItem) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1SearchFilterItem) UnmarshalBinary(b []byte) error { + var res V1SearchFilterItem + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_search_filter_key_value_condition.go b/api/models/v1_search_filter_key_value_condition.go new file mode 100644 index 00000000..f5a8de41 --- /dev/null +++ b/api/models/v1_search_filter_key_value_condition.go @@ -0,0 +1,103 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1SearchFilterKeyValueCondition v1 search filter key value condition +// +// swagger:model v1SearchFilterKeyValueCondition +type V1SearchFilterKeyValueCondition struct { + + // ignore case + IgnoreCase bool `json:"ignoreCase,omitempty"` + + // key + Key string `json:"key,omitempty"` + + // match + Match *V1SearchFilterKeyValueConditionMatch `json:"match,omitempty"` + + // negation + Negation bool `json:"negation,omitempty"` + + // operator + Operator V1SearchFilterStringOperator `json:"operator,omitempty"` +} + +// Validate validates this v1 search filter key value condition +func (m *V1SearchFilterKeyValueCondition) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMatch(formats); err != nil { + res = append(res, err) + } + + if err := m.validateOperator(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1SearchFilterKeyValueCondition) validateMatch(formats strfmt.Registry) error { + + if swag.IsZero(m.Match) { // not required + return nil + } + + if m.Match != nil { + if err := m.Match.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("match") + } + return err + } + } + + return nil +} + +func (m *V1SearchFilterKeyValueCondition) validateOperator(formats strfmt.Registry) error { + + if swag.IsZero(m.Operator) { // not required + return nil + } + + if err := m.Operator.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("operator") + } + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1SearchFilterKeyValueCondition) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1SearchFilterKeyValueCondition) UnmarshalBinary(b []byte) error { + var res V1SearchFilterKeyValueCondition + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_search_filter_key_value_condition_match.go b/api/models/v1_search_filter_key_value_condition_match.go new file mode 100644 index 00000000..49022655 --- /dev/null +++ b/api/models/v1_search_filter_key_value_condition_match.go @@ -0,0 +1,93 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1SearchFilterKeyValueConditionMatch v1 search filter key value condition match +// +// swagger:model v1SearchFilterKeyValueConditionMatch +type V1SearchFilterKeyValueConditionMatch struct { + + // conjunction + Conjunction *V1SearchFilterConjunctionOperator `json:"conjunction,omitempty"` + + // values + // Unique: true + Values []string `json:"values"` +} + +// Validate validates this v1 search filter key value condition match +func (m *V1SearchFilterKeyValueConditionMatch) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateConjunction(formats); err != nil { + res = append(res, err) + } + + if err := m.validateValues(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1SearchFilterKeyValueConditionMatch) validateConjunction(formats strfmt.Registry) error { + + if swag.IsZero(m.Conjunction) { // not required + return nil + } + + if m.Conjunction != nil { + if err := m.Conjunction.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("conjunction") + } + return err + } + } + + return nil +} + +func (m *V1SearchFilterKeyValueConditionMatch) validateValues(formats strfmt.Registry) error { + + if swag.IsZero(m.Values) { // not required + return nil + } + + if err := validate.UniqueItems("values", "body", m.Values); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1SearchFilterKeyValueConditionMatch) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1SearchFilterKeyValueConditionMatch) UnmarshalBinary(b []byte) error { + var res V1SearchFilterKeyValueConditionMatch + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_search_filter_key_value_operator.go b/api/models/v1_search_filter_key_value_operator.go new file mode 100644 index 00000000..2c749e6c --- /dev/null +++ b/api/models/v1_search_filter_key_value_operator.go @@ -0,0 +1,60 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "encoding/json" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" +) + +// V1SearchFilterKeyValueOperator v1 search filter key value operator +// +// swagger:model v1SearchFilterKeyValueOperator +type V1SearchFilterKeyValueOperator string + +const ( + + // V1SearchFilterKeyValueOperatorEq captures enum value "eq" + V1SearchFilterKeyValueOperatorEq V1SearchFilterKeyValueOperator = "eq" +) + +// for schema +var v1SearchFilterKeyValueOperatorEnum []interface{} + +func init() { + var res []V1SearchFilterKeyValueOperator + if err := json.Unmarshal([]byte(`["eq"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + v1SearchFilterKeyValueOperatorEnum = append(v1SearchFilterKeyValueOperatorEnum, v) + } +} + +func (m V1SearchFilterKeyValueOperator) validateV1SearchFilterKeyValueOperatorEnum(path, location string, value V1SearchFilterKeyValueOperator) error { + if err := validate.EnumCase(path, location, value, v1SearchFilterKeyValueOperatorEnum, true); err != nil { + return err + } + return nil +} + +// Validate validates this v1 search filter key value operator +func (m V1SearchFilterKeyValueOperator) Validate(formats strfmt.Registry) error { + var res []error + + // value enum + if err := m.validateV1SearchFilterKeyValueOperatorEnum("", "body", m); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/models/v1_search_filter_property_type.go b/api/models/v1_search_filter_property_type.go new file mode 100644 index 00000000..5964fe06 --- /dev/null +++ b/api/models/v1_search_filter_property_type.go @@ -0,0 +1,75 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "encoding/json" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" +) + +// V1SearchFilterPropertyType v1 search filter property type +// +// swagger:model v1SearchFilterPropertyType +type V1SearchFilterPropertyType string + +const ( + + // V1SearchFilterPropertyTypeString captures enum value "string" + V1SearchFilterPropertyTypeString V1SearchFilterPropertyType = "string" + + // V1SearchFilterPropertyTypeInt captures enum value "int" + V1SearchFilterPropertyTypeInt V1SearchFilterPropertyType = "int" + + // V1SearchFilterPropertyTypeFloat captures enum value "float" + V1SearchFilterPropertyTypeFloat V1SearchFilterPropertyType = "float" + + // V1SearchFilterPropertyTypeBool captures enum value "bool" + V1SearchFilterPropertyTypeBool V1SearchFilterPropertyType = "bool" + + // V1SearchFilterPropertyTypeDate captures enum value "date" + V1SearchFilterPropertyTypeDate V1SearchFilterPropertyType = "date" + + // V1SearchFilterPropertyTypeKeyValue captures enum value "keyValue" + V1SearchFilterPropertyTypeKeyValue V1SearchFilterPropertyType = "keyValue" +) + +// for schema +var v1SearchFilterPropertyTypeEnum []interface{} + +func init() { + var res []V1SearchFilterPropertyType + if err := json.Unmarshal([]byte(`["string","int","float","bool","date","keyValue"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + v1SearchFilterPropertyTypeEnum = append(v1SearchFilterPropertyTypeEnum, v) + } +} + +func (m V1SearchFilterPropertyType) validateV1SearchFilterPropertyTypeEnum(path, location string, value V1SearchFilterPropertyType) error { + if err := validate.EnumCase(path, location, value, v1SearchFilterPropertyTypeEnum, true); err != nil { + return err + } + return nil +} + +// Validate validates this v1 search filter property type +func (m V1SearchFilterPropertyType) Validate(formats strfmt.Registry) error { + var res []error + + // value enum + if err := m.validateV1SearchFilterPropertyTypeEnum("", "body", m); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/models/v1_search_filter_schema_spec.go b/api/models/v1_search_filter_schema_spec.go new file mode 100644 index 00000000..3c4e5166 --- /dev/null +++ b/api/models/v1_search_filter_schema_spec.go @@ -0,0 +1,71 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1SearchFilterSchemaSpec v1 search filter schema spec +// +// swagger:model v1SearchFilterSchemaSpec +type V1SearchFilterSchemaSpec struct { + + // schema + Schema *V1SearchFilterSchemaSpecProperties `json:"schema,omitempty"` +} + +// Validate validates this v1 search filter schema spec +func (m *V1SearchFilterSchemaSpec) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateSchema(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1SearchFilterSchemaSpec) validateSchema(formats strfmt.Registry) error { + + if swag.IsZero(m.Schema) { // not required + return nil + } + + if m.Schema != nil { + if err := m.Schema.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("schema") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1SearchFilterSchemaSpec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1SearchFilterSchemaSpec) UnmarshalBinary(b []byte) error { + var res V1SearchFilterSchemaSpec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_search_filter_schema_spec_enum_value.go b/api/models/v1_search_filter_schema_spec_enum_value.go new file mode 100644 index 00000000..4764f3a1 --- /dev/null +++ b/api/models/v1_search_filter_schema_spec_enum_value.go @@ -0,0 +1,46 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1SearchFilterSchemaSpecEnumValue v1 search filter schema spec enum value +// +// swagger:model v1SearchFilterSchemaSpecEnumValue +type V1SearchFilterSchemaSpecEnumValue struct { + + // display value + DisplayValue string `json:"displayValue,omitempty"` + + // value + Value string `json:"value,omitempty"` +} + +// Validate validates this v1 search filter schema spec enum value +func (m *V1SearchFilterSchemaSpecEnumValue) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1SearchFilterSchemaSpecEnumValue) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1SearchFilterSchemaSpecEnumValue) UnmarshalBinary(b []byte) error { + var res V1SearchFilterSchemaSpecEnumValue + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_search_filter_schema_spec_properties.go b/api/models/v1_search_filter_schema_spec_properties.go new file mode 100644 index 00000000..c5999981 --- /dev/null +++ b/api/models/v1_search_filter_schema_spec_properties.go @@ -0,0 +1,80 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1SearchFilterSchemaSpecProperties v1 search filter schema spec properties +// +// swagger:model v1SearchFilterSchemaSpecProperties +type V1SearchFilterSchemaSpecProperties struct { + + // properties + Properties []*V1SearchFilterSchemaSpecProperty `json:"properties"` +} + +// Validate validates this v1 search filter schema spec properties +func (m *V1SearchFilterSchemaSpecProperties) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateProperties(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1SearchFilterSchemaSpecProperties) validateProperties(formats strfmt.Registry) error { + + if swag.IsZero(m.Properties) { // not required + return nil + } + + for i := 0; i < len(m.Properties); i++ { + if swag.IsZero(m.Properties[i]) { // not required + continue + } + + if m.Properties[i] != nil { + if err := m.Properties[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("properties" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1SearchFilterSchemaSpecProperties) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1SearchFilterSchemaSpecProperties) UnmarshalBinary(b []byte) error { + var res V1SearchFilterSchemaSpecProperties + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_search_filter_schema_spec_property.go b/api/models/v1_search_filter_schema_spec_property.go new file mode 100644 index 00000000..403e81d0 --- /dev/null +++ b/api/models/v1_search_filter_schema_spec_property.go @@ -0,0 +1,110 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1SearchFilterSchemaSpecProperty v1 search filter schema spec property +// +// swagger:model v1SearchFilterSchemaSpecProperty +type V1SearchFilterSchemaSpecProperty struct { + + // name + Name string `json:"name,omitempty"` + + // hide display + HideDisplay bool `json:"hideDisplay,omitempty"` + + // display name + DisplayName string `json:"displayName,omitempty"` + + // type + Type string `json:"type,omitempty"` + + // enum + Enum []string `json:"enum,omitempty"` + + // enum values + EnumValues []*V1SearchFilterSchemaSpecEnumValue `json:"enumValues,omitempty"` + + // default + Default string `json:"default,omitempty"` + + // min int val + MinIntVal int32 `json:"minIntVal,omitempty"` + + // max int val + MaxIntVal int32 `json:"maxIntVal,omitempty"` + + // min float val + MinFloatVal float64 `json:"minFloatVal,omitempty"` + + // max float val + MaxFloatVal float64 `json:"maxFloatVal,omitempty"` +} + +// Validate validates this v1 search filter schema spec property +func (m *V1SearchFilterSchemaSpecProperty) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateEnumValues(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1SearchFilterSchemaSpecProperty) validateEnumValues(formats strfmt.Registry) error { + + if swag.IsZero(m.EnumValues) { // not required + return nil + } + + for i := 0; i < len(m.EnumValues); i++ { + if swag.IsZero(m.EnumValues[i]) { // not required + continue + } + + if m.EnumValues[i] != nil { + if err := m.EnumValues[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("enumValues" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1SearchFilterSchemaSpecProperty) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1SearchFilterSchemaSpecProperty) UnmarshalBinary(b []byte) error { + var res V1SearchFilterSchemaSpecProperty + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_search_filter_sort_spec.go b/api/models/v1_search_filter_sort_spec.go new file mode 100644 index 00000000..fcedab8b --- /dev/null +++ b/api/models/v1_search_filter_sort_spec.go @@ -0,0 +1,94 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1SearchFilterSortSpec v1 search filter sort spec +// +// swagger:model v1SearchFilterSortSpec +type V1SearchFilterSortSpec struct { + + // field + Field *V1SearchSortFields `json:"field,omitempty"` + + // order + Order V1SortOrder `json:"order,omitempty"` +} + +// Validate validates this v1 search filter sort spec +func (m *V1SearchFilterSortSpec) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateField(formats); err != nil { + res = append(res, err) + } + + if err := m.validateOrder(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1SearchFilterSortSpec) validateField(formats strfmt.Registry) error { + + if swag.IsZero(m.Field) { // not required + return nil + } + + if m.Field != nil { + if err := m.Field.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("field") + } + return err + } + } + + return nil +} + +func (m *V1SearchFilterSortSpec) validateOrder(formats strfmt.Registry) error { + + if swag.IsZero(m.Order) { // not required + return nil + } + + if err := m.Order.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("order") + } + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1SearchFilterSortSpec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1SearchFilterSortSpec) UnmarshalBinary(b []byte) error { + var res V1SearchFilterSortSpec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_search_filter_spec.go b/api/models/v1_search_filter_spec.go new file mode 100644 index 00000000..4473d908 --- /dev/null +++ b/api/models/v1_search_filter_spec.go @@ -0,0 +1,111 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1SearchFilterSpec v1 search filter spec +// +// swagger:model v1SearchFilterSpec +type V1SearchFilterSpec struct { + + // conjunction + Conjunction *V1SearchFilterConjunctionOperator `json:"conjunction,omitempty"` + + // filter groups + // Unique: true + FilterGroups []*V1SearchFilterGroup `json:"filterGroups"` +} + +// Validate validates this v1 search filter spec +func (m *V1SearchFilterSpec) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateConjunction(formats); err != nil { + res = append(res, err) + } + + if err := m.validateFilterGroups(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1SearchFilterSpec) validateConjunction(formats strfmt.Registry) error { + + if swag.IsZero(m.Conjunction) { // not required + return nil + } + + if m.Conjunction != nil { + if err := m.Conjunction.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("conjunction") + } + return err + } + } + + return nil +} + +func (m *V1SearchFilterSpec) validateFilterGroups(formats strfmt.Registry) error { + + if swag.IsZero(m.FilterGroups) { // not required + return nil + } + + if err := validate.UniqueItems("filterGroups", "body", m.FilterGroups); err != nil { + return err + } + + for i := 0; i < len(m.FilterGroups); i++ { + if swag.IsZero(m.FilterGroups[i]) { // not required + continue + } + + if m.FilterGroups[i] != nil { + if err := m.FilterGroups[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("filterGroups" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1SearchFilterSpec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1SearchFilterSpec) UnmarshalBinary(b []byte) error { + var res V1SearchFilterSpec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_search_filter_string_condition.go b/api/models/v1_search_filter_string_condition.go new file mode 100644 index 00000000..4ddb7d5d --- /dev/null +++ b/api/models/v1_search_filter_string_condition.go @@ -0,0 +1,100 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1SearchFilterStringCondition v1 search filter string condition +// +// swagger:model v1SearchFilterStringCondition +type V1SearchFilterStringCondition struct { + + // ignore case + IgnoreCase bool `json:"ignoreCase,omitempty"` + + // match + Match *V1SearchFilterStringConditionMatch `json:"match,omitempty"` + + // negation + Negation bool `json:"negation,omitempty"` + + // operator + Operator V1SearchFilterStringOperator `json:"operator,omitempty"` +} + +// Validate validates this v1 search filter string condition +func (m *V1SearchFilterStringCondition) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMatch(formats); err != nil { + res = append(res, err) + } + + if err := m.validateOperator(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1SearchFilterStringCondition) validateMatch(formats strfmt.Registry) error { + + if swag.IsZero(m.Match) { // not required + return nil + } + + if m.Match != nil { + if err := m.Match.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("match") + } + return err + } + } + + return nil +} + +func (m *V1SearchFilterStringCondition) validateOperator(formats strfmt.Registry) error { + + if swag.IsZero(m.Operator) { // not required + return nil + } + + if err := m.Operator.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("operator") + } + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1SearchFilterStringCondition) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1SearchFilterStringCondition) UnmarshalBinary(b []byte) error { + var res V1SearchFilterStringCondition + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_search_filter_string_condition_match.go b/api/models/v1_search_filter_string_condition_match.go new file mode 100644 index 00000000..1846a03b --- /dev/null +++ b/api/models/v1_search_filter_string_condition_match.go @@ -0,0 +1,93 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1SearchFilterStringConditionMatch v1 search filter string condition match +// +// swagger:model v1SearchFilterStringConditionMatch +type V1SearchFilterStringConditionMatch struct { + + // conjunction + Conjunction *V1SearchFilterConjunctionOperator `json:"conjunction,omitempty"` + + // values + // Unique: true + Values []string `json:"values"` +} + +// Validate validates this v1 search filter string condition match +func (m *V1SearchFilterStringConditionMatch) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateConjunction(formats); err != nil { + res = append(res, err) + } + + if err := m.validateValues(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1SearchFilterStringConditionMatch) validateConjunction(formats strfmt.Registry) error { + + if swag.IsZero(m.Conjunction) { // not required + return nil + } + + if m.Conjunction != nil { + if err := m.Conjunction.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("conjunction") + } + return err + } + } + + return nil +} + +func (m *V1SearchFilterStringConditionMatch) validateValues(formats strfmt.Registry) error { + + if swag.IsZero(m.Values) { // not required + return nil + } + + if err := validate.UniqueItems("values", "body", m.Values); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1SearchFilterStringConditionMatch) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1SearchFilterStringConditionMatch) UnmarshalBinary(b []byte) error { + var res V1SearchFilterStringConditionMatch + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_search_filter_string_operator.go b/api/models/v1_search_filter_string_operator.go new file mode 100644 index 00000000..fbcdf1ce --- /dev/null +++ b/api/models/v1_search_filter_string_operator.go @@ -0,0 +1,66 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "encoding/json" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" +) + +// V1SearchFilterStringOperator v1 search filter string operator +// +// swagger:model v1SearchFilterStringOperator +type V1SearchFilterStringOperator string + +const ( + + // V1SearchFilterStringOperatorEq captures enum value "eq" + V1SearchFilterStringOperatorEq V1SearchFilterStringOperator = "eq" + + // V1SearchFilterStringOperatorContains captures enum value "contains" + V1SearchFilterStringOperatorContains V1SearchFilterStringOperator = "contains" + + // V1SearchFilterStringOperatorBeginsWith captures enum value "beginsWith" + V1SearchFilterStringOperatorBeginsWith V1SearchFilterStringOperator = "beginsWith" +) + +// for schema +var v1SearchFilterStringOperatorEnum []interface{} + +func init() { + var res []V1SearchFilterStringOperator + if err := json.Unmarshal([]byte(`["eq","contains","beginsWith"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + v1SearchFilterStringOperatorEnum = append(v1SearchFilterStringOperatorEnum, v) + } +} + +func (m V1SearchFilterStringOperator) validateV1SearchFilterStringOperatorEnum(path, location string, value V1SearchFilterStringOperator) error { + if err := validate.EnumCase(path, location, value, v1SearchFilterStringOperatorEnum, true); err != nil { + return err + } + return nil +} + +// Validate validates this v1 search filter string operator +func (m V1SearchFilterStringOperator) Validate(formats strfmt.Registry) error { + var res []error + + // value enum + if err := m.validateV1SearchFilterStringOperatorEnum("", "body", m); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/models/v1_search_filter_summary_spec.go b/api/models/v1_search_filter_summary_spec.go new file mode 100644 index 00000000..b18fafd3 --- /dev/null +++ b/api/models/v1_search_filter_summary_spec.go @@ -0,0 +1,111 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1SearchFilterSummarySpec Spectro cluster search filter summary spec +// +// swagger:model v1SearchFilterSummarySpec +type V1SearchFilterSummarySpec struct { + + // filter + Filter *V1SearchFilterSpec `json:"filter,omitempty"` + + // sort + // Unique: true + Sort []*V1SearchFilterSortSpec `json:"sort"` +} + +// Validate validates this v1 search filter summary spec +func (m *V1SearchFilterSummarySpec) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateFilter(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSort(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1SearchFilterSummarySpec) validateFilter(formats strfmt.Registry) error { + + if swag.IsZero(m.Filter) { // not required + return nil + } + + if m.Filter != nil { + if err := m.Filter.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("filter") + } + return err + } + } + + return nil +} + +func (m *V1SearchFilterSummarySpec) validateSort(formats strfmt.Registry) error { + + if swag.IsZero(m.Sort) { // not required + return nil + } + + if err := validate.UniqueItems("sort", "body", m.Sort); err != nil { + return err + } + + for i := 0; i < len(m.Sort); i++ { + if swag.IsZero(m.Sort[i]) { // not required + continue + } + + if m.Sort[i] != nil { + if err := m.Sort[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("sort" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1SearchFilterSummarySpec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1SearchFilterSummarySpec) UnmarshalBinary(b []byte) error { + var res V1SearchFilterSummarySpec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_search_sort_fields.go b/api/models/v1_search_sort_fields.go new file mode 100644 index 00000000..8c64ebfc --- /dev/null +++ b/api/models/v1_search_sort_fields.go @@ -0,0 +1,75 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "encoding/json" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" +) + +// V1SearchSortFields v1 search sort fields +// +// swagger:model v1SearchSortFields +type V1SearchSortFields string + +const ( + + // V1SearchSortFieldsEnvironment captures enum value "environment" + V1SearchSortFieldsEnvironment V1SearchSortFields = "environment" + + // V1SearchSortFieldsClusterName captures enum value "clusterName" + V1SearchSortFieldsClusterName V1SearchSortFields = "clusterName" + + // V1SearchSortFieldsClusterState captures enum value "clusterState" + V1SearchSortFieldsClusterState V1SearchSortFields = "clusterState" + + // V1SearchSortFieldsHealthState captures enum value "healthState" + V1SearchSortFieldsHealthState V1SearchSortFields = "healthState" + + // V1SearchSortFieldsCreationTimestamp captures enum value "creationTimestamp" + V1SearchSortFieldsCreationTimestamp V1SearchSortFields = "creationTimestamp" + + // V1SearchSortFieldsLastModifiedTimestamp captures enum value "lastModifiedTimestamp" + V1SearchSortFieldsLastModifiedTimestamp V1SearchSortFields = "lastModifiedTimestamp" +) + +// for schema +var v1SearchSortFieldsEnum []interface{} + +func init() { + var res []V1SearchSortFields + if err := json.Unmarshal([]byte(`["environment","clusterName","clusterState","healthState","creationTimestamp","lastModifiedTimestamp"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + v1SearchSortFieldsEnum = append(v1SearchSortFieldsEnum, v) + } +} + +func (m V1SearchSortFields) validateV1SearchSortFieldsEnum(path, location string, value V1SearchSortFields) error { + if err := validate.EnumCase(path, location, value, v1SearchSortFieldsEnum, true); err != nil { + return err + } + return nil +} + +// Validate validates this v1 search sort fields +func (m V1SearchSortFields) Validate(formats strfmt.Registry) error { + var res []error + + // value enum + if err := m.validateV1SearchSortFieldsEnum("", "body", m); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/models/v1_sectro_cluster_k8s_dashboard_url.go b/api/models/v1_sectro_cluster_k8s_dashboard_url.go new file mode 100644 index 00000000..d5667692 --- /dev/null +++ b/api/models/v1_sectro_cluster_k8s_dashboard_url.go @@ -0,0 +1,43 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1SectroClusterK8sDashboardURL Service version information +// +// swagger:model v1SectroClusterK8sDashboardUrl +type V1SectroClusterK8sDashboardURL struct { + + // url + URL string `json:"url,omitempty"` +} + +// Validate validates this v1 sectro cluster k8s dashboard Url +func (m *V1SectroClusterK8sDashboardURL) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1SectroClusterK8sDashboardURL) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1SectroClusterK8sDashboardURL) UnmarshalBinary(b []byte) error { + var res V1SectroClusterK8sDashboardURL + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_service_manifest.go b/api/models/v1_service_manifest.go new file mode 100644 index 00000000..717c887d --- /dev/null +++ b/api/models/v1_service_manifest.go @@ -0,0 +1,102 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ServiceManifest Service manifest information +// +// swagger:model v1ServiceManifest +type V1ServiceManifest struct { + + // api version + APIVersion string `json:"apiVersion,omitempty"` + + // kind + Kind string `json:"kind,omitempty"` + + // metadata + Metadata *V1ObjectMeta `json:"metadata,omitempty"` + + // spec + Spec *V1ServiceManifestSpec `json:"spec,omitempty"` +} + +// Validate validates this v1 service manifest +func (m *V1ServiceManifest) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSpec(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ServiceManifest) validateMetadata(formats strfmt.Registry) error { + + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } + return err + } + } + + return nil +} + +func (m *V1ServiceManifest) validateSpec(formats strfmt.Registry) error { + + if swag.IsZero(m.Spec) { // not required + return nil + } + + if m.Spec != nil { + if err := m.Spec.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ServiceManifest) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ServiceManifest) UnmarshalBinary(b []byte) error { + var res V1ServiceManifest + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_service_manifest_spec.go b/api/models/v1_service_manifest_spec.go new file mode 100644 index 00000000..3f36e33c --- /dev/null +++ b/api/models/v1_service_manifest_spec.go @@ -0,0 +1,92 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1ServiceManifestSpec v1 service manifest spec +// +// swagger:model v1ServiceManifestSpec +type V1ServiceManifestSpec struct { + + // manifests + // Unique: true + Manifests []*V1GitRepoFileContent `json:"manifests"` + + // name + Name string `json:"name,omitempty"` + + // version + Version string `json:"version,omitempty"` +} + +// Validate validates this v1 service manifest spec +func (m *V1ServiceManifestSpec) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateManifests(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ServiceManifestSpec) validateManifests(formats strfmt.Registry) error { + + if swag.IsZero(m.Manifests) { // not required + return nil + } + + if err := validate.UniqueItems("manifests", "body", m.Manifests); err != nil { + return err + } + + for i := 0; i < len(m.Manifests); i++ { + if swag.IsZero(m.Manifests[i]) { // not required + continue + } + + if m.Manifests[i] != nil { + if err := m.Manifests[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("manifests" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ServiceManifestSpec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ServiceManifestSpec) UnmarshalBinary(b []byte) error { + var res V1ServiceManifestSpec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_service_port.go b/api/models/v1_service_port.go new file mode 100644 index 00000000..3a1b12cc --- /dev/null +++ b/api/models/v1_service_port.go @@ -0,0 +1,67 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1ServicePort v1 service port +// +// swagger:model v1ServicePort +type V1ServicePort struct { + + // The port that will be exposed by this service. + // Required: true + Port *int32 `json:"port"` + + // protocol + Protocol string `json:"protocol,omitempty"` +} + +// Validate validates this v1 service port +func (m *V1ServicePort) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validatePort(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ServicePort) validatePort(formats strfmt.Registry) error { + + if err := validate.Required("port", "body", m.Port); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ServicePort) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ServicePort) UnmarshalBinary(b []byte) error { + var res V1ServicePort + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_service_spec.go b/api/models/v1_service_spec.go new file mode 100644 index 00000000..2e91194c --- /dev/null +++ b/api/models/v1_service_spec.go @@ -0,0 +1,46 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ServiceSpec ServiceSpec defines the specification of service registering edge +// +// swagger:model v1ServiceSpec +type V1ServiceSpec struct { + + // name + Name string `json:"name,omitempty"` + + // version + Version string `json:"version,omitempty"` +} + +// Validate validates this v1 service spec +func (m *V1ServiceSpec) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1ServiceSpec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ServiceSpec) UnmarshalBinary(b []byte) error { + var res V1ServiceSpec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_service_version.go b/api/models/v1_service_version.go new file mode 100644 index 00000000..667da62a --- /dev/null +++ b/api/models/v1_service_version.go @@ -0,0 +1,102 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ServiceVersion Service version information +// +// swagger:model v1ServiceVersion +type V1ServiceVersion struct { + + // api version + APIVersion string `json:"apiVersion,omitempty"` + + // kind + Kind string `json:"kind,omitempty"` + + // metadata + Metadata *V1ObjectMeta `json:"metadata,omitempty"` + + // spec + Spec *V1ServiceVersionSpec `json:"spec,omitempty"` +} + +// Validate validates this v1 service version +func (m *V1ServiceVersion) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSpec(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ServiceVersion) validateMetadata(formats strfmt.Registry) error { + + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } + return err + } + } + + return nil +} + +func (m *V1ServiceVersion) validateSpec(formats strfmt.Registry) error { + + if swag.IsZero(m.Spec) { // not required + return nil + } + + if m.Spec != nil { + if err := m.Spec.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ServiceVersion) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ServiceVersion) UnmarshalBinary(b []byte) error { + var res V1ServiceVersion + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_service_version_spec.go b/api/models/v1_service_version_spec.go new file mode 100644 index 00000000..b7c91676 --- /dev/null +++ b/api/models/v1_service_version_spec.go @@ -0,0 +1,74 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ServiceVersionSpec v1 service version spec +// +// swagger:model v1ServiceVersionSpec +type V1ServiceVersionSpec struct { + + // latest version + LatestVersion *V1GitRepoFileContent `json:"latestVersion,omitempty"` + + // name + Name string `json:"name,omitempty"` +} + +// Validate validates this v1 service version spec +func (m *V1ServiceVersionSpec) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateLatestVersion(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1ServiceVersionSpec) validateLatestVersion(formats strfmt.Registry) error { + + if swag.IsZero(m.LatestVersion) { // not required + return nil + } + + if m.LatestVersion != nil { + if err := m.LatestVersion.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("latestVersion") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1ServiceVersionSpec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ServiceVersionSpec) UnmarshalBinary(b []byte) error { + var res V1ServiceVersionSpec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_sonobuoy_entity.go b/api/models/v1_sonobuoy_entity.go new file mode 100644 index 00000000..d18c97e6 --- /dev/null +++ b/api/models/v1_sonobuoy_entity.go @@ -0,0 +1,150 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "encoding/json" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1SonobuoyEntity Sonobuoy response +// +// swagger:model v1SonobuoyEntity +type V1SonobuoyEntity struct { + + // reports + // Required: true + Reports map[string]V1SonobuoyReportEntity `json:"reports"` + + // request Uid + // Required: true + RequestUID *string `json:"requestUid"` + + // status + // Required: true + // Enum: [Completed InProgress Failed Initiated] + Status *string `json:"status"` +} + +// Validate validates this v1 sonobuoy entity +func (m *V1SonobuoyEntity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateReports(formats); err != nil { + res = append(res, err) + } + + if err := m.validateRequestUID(formats); err != nil { + res = append(res, err) + } + + if err := m.validateStatus(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1SonobuoyEntity) validateReports(formats strfmt.Registry) error { + + for k := range m.Reports { + + if err := validate.Required("reports"+"."+k, "body", m.Reports[k]); err != nil { + return err + } + if val, ok := m.Reports[k]; ok { + if err := val.Validate(formats); err != nil { + return err + } + } + + } + + return nil +} + +func (m *V1SonobuoyEntity) validateRequestUID(formats strfmt.Registry) error { + + if err := validate.Required("requestUid", "body", m.RequestUID); err != nil { + return err + } + + return nil +} + +var v1SonobuoyEntityTypeStatusPropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["Completed","InProgress","Failed","Initiated"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + v1SonobuoyEntityTypeStatusPropEnum = append(v1SonobuoyEntityTypeStatusPropEnum, v) + } +} + +const ( + + // V1SonobuoyEntityStatusCompleted captures enum value "Completed" + V1SonobuoyEntityStatusCompleted string = "Completed" + + // V1SonobuoyEntityStatusInProgress captures enum value "InProgress" + V1SonobuoyEntityStatusInProgress string = "InProgress" + + // V1SonobuoyEntityStatusFailed captures enum value "Failed" + V1SonobuoyEntityStatusFailed string = "Failed" + + // V1SonobuoyEntityStatusInitiated captures enum value "Initiated" + V1SonobuoyEntityStatusInitiated string = "Initiated" +) + +// prop value enum +func (m *V1SonobuoyEntity) validateStatusEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, v1SonobuoyEntityTypeStatusPropEnum, true); err != nil { + return err + } + return nil +} + +func (m *V1SonobuoyEntity) validateStatus(formats strfmt.Registry) error { + + if err := validate.Required("status", "body", m.Status); err != nil { + return err + } + + // value enum + if err := m.validateStatusEnum("status", "body", *m.Status); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1SonobuoyEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1SonobuoyEntity) UnmarshalBinary(b []byte) error { + var res V1SonobuoyEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_sonobuoy_log.go b/api/models/v1_sonobuoy_log.go new file mode 100644 index 00000000..4e301cf3 --- /dev/null +++ b/api/models/v1_sonobuoy_log.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1SonobuoyLog Compliance Scan Sonobuoy Log +// +// swagger:model v1SonobuoyLog +type V1SonobuoyLog struct { + + // description + Description string `json:"description,omitempty"` + + // msg + Msg string `json:"msg,omitempty"` + + // output + Output string `json:"output,omitempty"` + + // path + Path string `json:"path,omitempty"` + + // state + State string `json:"state,omitempty"` +} + +// Validate validates this v1 sonobuoy log +func (m *V1SonobuoyLog) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1SonobuoyLog) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1SonobuoyLog) UnmarshalBinary(b []byte) error { + var res V1SonobuoyLog + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_sonobuoy_log_entity.go b/api/models/v1_sonobuoy_log_entity.go new file mode 100644 index 00000000..b620b861 --- /dev/null +++ b/api/models/v1_sonobuoy_log_entity.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1SonobuoyLogEntity Sonobuoy log +// +// swagger:model v1SonobuoyLogEntity +type V1SonobuoyLogEntity struct { + + // description + Description string `json:"description,omitempty"` + + // msg + Msg string `json:"msg,omitempty"` + + // output + Output string `json:"output,omitempty"` + + // path + Path string `json:"path,omitempty"` + + // state + State string `json:"state,omitempty"` +} + +// Validate validates this v1 sonobuoy log entity +func (m *V1SonobuoyLogEntity) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1SonobuoyLogEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1SonobuoyLogEntity) UnmarshalBinary(b []byte) error { + var res V1SonobuoyLogEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_sonobuoy_report.go b/api/models/v1_sonobuoy_report.go new file mode 100644 index 00000000..a69a8706 --- /dev/null +++ b/api/models/v1_sonobuoy_report.go @@ -0,0 +1,98 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1SonobuoyReport Compliance Scan Sonobuoy Report +// +// swagger:model v1SonobuoyReport +type V1SonobuoyReport struct { + + // fail + Fail int32 `json:"fail,omitempty"` + + // logs + Logs []*V1SonobuoyLog `json:"logs"` + + // node + Node string `json:"node,omitempty"` + + // pass + Pass int32 `json:"pass,omitempty"` + + // plugin + Plugin string `json:"plugin,omitempty"` + + // status + Status string `json:"status,omitempty"` + + // total + Total int32 `json:"total,omitempty"` +} + +// Validate validates this v1 sonobuoy report +func (m *V1SonobuoyReport) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateLogs(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1SonobuoyReport) validateLogs(formats strfmt.Registry) error { + + if swag.IsZero(m.Logs) { // not required + return nil + } + + for i := 0; i < len(m.Logs); i++ { + if swag.IsZero(m.Logs[i]) { // not required + continue + } + + if m.Logs[i] != nil { + if err := m.Logs[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("logs" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1SonobuoyReport) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1SonobuoyReport) UnmarshalBinary(b []byte) error { + var res V1SonobuoyReport + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_sonobuoy_report_entity.go b/api/models/v1_sonobuoy_report_entity.go new file mode 100644 index 00000000..f1d14292 --- /dev/null +++ b/api/models/v1_sonobuoy_report_entity.go @@ -0,0 +1,98 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1SonobuoyReportEntity Sonobuoy report +// +// swagger:model v1SonobuoyReportEntity +type V1SonobuoyReportEntity struct { + + // fail + Fail int32 `json:"fail,omitempty"` + + // logs + Logs []*V1SonobuoyLogEntity `json:"logs"` + + // node + Node string `json:"node,omitempty"` + + // pass + Pass int32 `json:"pass,omitempty"` + + // plugin + Plugin string `json:"plugin,omitempty"` + + // status + Status string `json:"status,omitempty"` + + // total + Total int32 `json:"total,omitempty"` +} + +// Validate validates this v1 sonobuoy report entity +func (m *V1SonobuoyReportEntity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateLogs(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1SonobuoyReportEntity) validateLogs(formats strfmt.Registry) error { + + if swag.IsZero(m.Logs) { // not required + return nil + } + + for i := 0; i < len(m.Logs); i++ { + if swag.IsZero(m.Logs[i]) { // not required + continue + } + + if m.Logs[i] != nil { + if err := m.Logs[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("logs" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1SonobuoyReportEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1SonobuoyReportEntity) UnmarshalBinary(b []byte) error { + var res V1SonobuoyReportEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_sort_order.go b/api/models/v1_sort_order.go new file mode 100644 index 00000000..f91560cb --- /dev/null +++ b/api/models/v1_sort_order.go @@ -0,0 +1,63 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "encoding/json" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" +) + +// V1SortOrder v1 sort order +// +// swagger:model v1SortOrder +type V1SortOrder string + +const ( + + // V1SortOrderAsc captures enum value "asc" + V1SortOrderAsc V1SortOrder = "asc" + + // V1SortOrderDesc captures enum value "desc" + V1SortOrderDesc V1SortOrder = "desc" +) + +// for schema +var v1SortOrderEnum []interface{} + +func init() { + var res []V1SortOrder + if err := json.Unmarshal([]byte(`["asc","desc"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + v1SortOrderEnum = append(v1SortOrderEnum, v) + } +} + +func (m V1SortOrder) validateV1SortOrderEnum(path, location string, value V1SortOrder) error { + if err := validate.EnumCase(path, location, value, v1SortOrderEnum, true); err != nil { + return err + } + return nil +} + +// Validate validates this v1 sort order +func (m V1SortOrder) Validate(formats strfmt.Registry) error { + var res []error + + // value enum + if err := m.validateV1SortOrderEnum("", "body", m); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/models/v1_spc_apply.go b/api/models/v1_spc_apply.go new file mode 100644 index 00000000..1f7e2bfb --- /dev/null +++ b/api/models/v1_spc_apply.go @@ -0,0 +1,160 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "encoding/json" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1SpcApply v1 spc apply +// +// swagger:model v1SpcApply +type V1SpcApply struct { + + // action type + // Enum: [DownloadAndInstall DownloadAndInstallLater] + ActionType string `json:"actionType,omitempty"` + + // If it is true then Agent can apply the changes to the palette + CanBeApplied bool `json:"canBeApplied"` + + // crd digest + CrdDigest string `json:"crdDigest,omitempty"` + + // last modified time + // Format: date-time + LastModifiedTime V1Time `json:"lastModifiedTime,omitempty"` + + // patch applied time + // Format: date-time + PatchAppliedTime V1Time `json:"patchAppliedTime,omitempty"` + + // spc hash + SpcHash string `json:"spcHash,omitempty"` + + // spc infra hash + SpcInfraHash string `json:"spcInfraHash,omitempty"` +} + +// Validate validates this v1 spc apply +func (m *V1SpcApply) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateActionType(formats); err != nil { + res = append(res, err) + } + + if err := m.validateLastModifiedTime(formats); err != nil { + res = append(res, err) + } + + if err := m.validatePatchAppliedTime(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +var v1SpcApplyTypeActionTypePropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["DownloadAndInstall","DownloadAndInstallLater"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + v1SpcApplyTypeActionTypePropEnum = append(v1SpcApplyTypeActionTypePropEnum, v) + } +} + +const ( + + // V1SpcApplyActionTypeDownloadAndInstall captures enum value "DownloadAndInstall" + V1SpcApplyActionTypeDownloadAndInstall string = "DownloadAndInstall" + + // V1SpcApplyActionTypeDownloadAndInstallLater captures enum value "DownloadAndInstallLater" + V1SpcApplyActionTypeDownloadAndInstallLater string = "DownloadAndInstallLater" +) + +// prop value enum +func (m *V1SpcApply) validateActionTypeEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, v1SpcApplyTypeActionTypePropEnum, true); err != nil { + return err + } + return nil +} + +func (m *V1SpcApply) validateActionType(formats strfmt.Registry) error { + + if swag.IsZero(m.ActionType) { // not required + return nil + } + + // value enum + if err := m.validateActionTypeEnum("actionType", "body", m.ActionType); err != nil { + return err + } + + return nil +} + +func (m *V1SpcApply) validateLastModifiedTime(formats strfmt.Registry) error { + + if swag.IsZero(m.LastModifiedTime) { // not required + return nil + } + + if err := m.LastModifiedTime.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("lastModifiedTime") + } + return err + } + + return nil +} + +func (m *V1SpcApply) validatePatchAppliedTime(formats strfmt.Registry) error { + + if swag.IsZero(m.PatchAppliedTime) { // not required + return nil + } + + if err := m.PatchAppliedTime.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("patchAppliedTime") + } + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1SpcApply) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1SpcApply) UnmarshalBinary(b []byte) error { + var res V1SpcApply + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_spc_apply_settings.go b/api/models/v1_spc_apply_settings.go new file mode 100644 index 00000000..7cf44b0d --- /dev/null +++ b/api/models/v1_spc_apply_settings.go @@ -0,0 +1,100 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "encoding/json" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1SpcApplySettings v1 spc apply settings +// +// swagger:model v1SpcApplySettings +type V1SpcApplySettings struct { + + // action type + // Enum: [DownloadAndInstall DownloadAndInstallLater] + ActionType string `json:"actionType,omitempty"` +} + +// Validate validates this v1 spc apply settings +func (m *V1SpcApplySettings) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateActionType(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +var v1SpcApplySettingsTypeActionTypePropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["DownloadAndInstall","DownloadAndInstallLater"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + v1SpcApplySettingsTypeActionTypePropEnum = append(v1SpcApplySettingsTypeActionTypePropEnum, v) + } +} + +const ( + + // V1SpcApplySettingsActionTypeDownloadAndInstall captures enum value "DownloadAndInstall" + V1SpcApplySettingsActionTypeDownloadAndInstall string = "DownloadAndInstall" + + // V1SpcApplySettingsActionTypeDownloadAndInstallLater captures enum value "DownloadAndInstallLater" + V1SpcApplySettingsActionTypeDownloadAndInstallLater string = "DownloadAndInstallLater" +) + +// prop value enum +func (m *V1SpcApplySettings) validateActionTypeEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, v1SpcApplySettingsTypeActionTypePropEnum, true); err != nil { + return err + } + return nil +} + +func (m *V1SpcApplySettings) validateActionType(formats strfmt.Registry) error { + + if swag.IsZero(m.ActionType) { // not required + return nil + } + + // value enum + if err := m.validateActionTypeEnum("actionType", "body", m.ActionType); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1SpcApplySettings) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1SpcApplySettings) UnmarshalBinary(b []byte) error { + var res V1SpcApplySettings + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_spc_patch_time_entity.go b/api/models/v1_spc_patch_time_entity.go new file mode 100644 index 00000000..d6f8597f --- /dev/null +++ b/api/models/v1_spc_patch_time_entity.go @@ -0,0 +1,73 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1SpcPatchTimeEntity v1 spc patch time entity +// +// swagger:model v1SpcPatchTimeEntity +type V1SpcPatchTimeEntity struct { + + // cluster hash + ClusterHash string `json:"clusterHash,omitempty"` + + // patch time + // Format: date-time + PatchTime V1Time `json:"patchTime,omitempty"` +} + +// Validate validates this v1 spc patch time entity +func (m *V1SpcPatchTimeEntity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validatePatchTime(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1SpcPatchTimeEntity) validatePatchTime(formats strfmt.Registry) error { + + if swag.IsZero(m.PatchTime) { // not required + return nil + } + + if err := m.PatchTime.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("patchTime") + } + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1SpcPatchTimeEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1SpcPatchTimeEntity) UnmarshalBinary(b []byte) error { + var res V1SpcPatchTimeEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_spectro_aws_cluster_entity.go b/api/models/v1_spectro_aws_cluster_entity.go new file mode 100644 index 00000000..96a5f00d --- /dev/null +++ b/api/models/v1_spectro_aws_cluster_entity.go @@ -0,0 +1,313 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1SpectroAwsClusterEntity AWS cluster request payload for create and update +// +// swagger:model v1SpectroAwsClusterEntity +type V1SpectroAwsClusterEntity struct { + + // metadata + Metadata *V1ObjectMeta `json:"metadata,omitempty"` + + // spec + Spec *V1SpectroAwsClusterEntitySpec `json:"spec,omitempty"` +} + +// Validate validates this v1 spectro aws cluster entity +func (m *V1SpectroAwsClusterEntity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSpec(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1SpectroAwsClusterEntity) validateMetadata(formats strfmt.Registry) error { + + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } + return err + } + } + + return nil +} + +func (m *V1SpectroAwsClusterEntity) validateSpec(formats strfmt.Registry) error { + + if swag.IsZero(m.Spec) { // not required + return nil + } + + if m.Spec != nil { + if err := m.Spec.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1SpectroAwsClusterEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1SpectroAwsClusterEntity) UnmarshalBinary(b []byte) error { + var res V1SpectroAwsClusterEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} + +// V1SpectroAwsClusterEntitySpec v1 spectro aws cluster entity spec +// +// swagger:model V1SpectroAwsClusterEntitySpec +type V1SpectroAwsClusterEntitySpec struct { + + // Cloud account uid to be used for cluster provisioning + // Required: true + CloudAccountUID *string `json:"cloudAccountUid"` + + // cloud config + // Required: true + CloudConfig *V1AwsClusterConfig `json:"cloudConfig"` + + // General cluster configuration like health, patching settings, namespace resource allocation, rbac + ClusterConfig *V1ClusterConfigEntity `json:"clusterConfig,omitempty"` + + // cluster type + ClusterType V1ClusterType `json:"clusterType,omitempty"` + + // machinepoolconfig + Machinepoolconfig []*V1AwsMachinePoolConfigEntity `json:"machinepoolconfig"` + + // policies + Policies *V1SpectroClusterPolicies `json:"policies,omitempty"` + + // profiles + Profiles []*V1SpectroClusterProfileEntity `json:"profiles"` +} + +// Validate validates this v1 spectro aws cluster entity spec +func (m *V1SpectroAwsClusterEntitySpec) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateCloudAccountUID(formats); err != nil { + res = append(res, err) + } + + if err := m.validateCloudConfig(formats); err != nil { + res = append(res, err) + } + + if err := m.validateClusterConfig(formats); err != nil { + res = append(res, err) + } + + if err := m.validateClusterType(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMachinepoolconfig(formats); err != nil { + res = append(res, err) + } + + if err := m.validatePolicies(formats); err != nil { + res = append(res, err) + } + + if err := m.validateProfiles(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1SpectroAwsClusterEntitySpec) validateCloudAccountUID(formats strfmt.Registry) error { + + if err := validate.Required("spec"+"."+"cloudAccountUid", "body", m.CloudAccountUID); err != nil { + return err + } + + return nil +} + +func (m *V1SpectroAwsClusterEntitySpec) validateCloudConfig(formats strfmt.Registry) error { + + if err := validate.Required("spec"+"."+"cloudConfig", "body", m.CloudConfig); err != nil { + return err + } + + if m.CloudConfig != nil { + if err := m.CloudConfig.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec" + "." + "cloudConfig") + } + return err + } + } + + return nil +} + +func (m *V1SpectroAwsClusterEntitySpec) validateClusterConfig(formats strfmt.Registry) error { + + if swag.IsZero(m.ClusterConfig) { // not required + return nil + } + + if m.ClusterConfig != nil { + if err := m.ClusterConfig.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec" + "." + "clusterConfig") + } + return err + } + } + + return nil +} + +func (m *V1SpectroAwsClusterEntitySpec) validateClusterType(formats strfmt.Registry) error { + + if swag.IsZero(m.ClusterType) { // not required + return nil + } + + if err := m.ClusterType.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec" + "." + "clusterType") + } + return err + } + + return nil +} + +func (m *V1SpectroAwsClusterEntitySpec) validateMachinepoolconfig(formats strfmt.Registry) error { + + if swag.IsZero(m.Machinepoolconfig) { // not required + return nil + } + + for i := 0; i < len(m.Machinepoolconfig); i++ { + if swag.IsZero(m.Machinepoolconfig[i]) { // not required + continue + } + + if m.Machinepoolconfig[i] != nil { + if err := m.Machinepoolconfig[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec" + "." + "machinepoolconfig" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1SpectroAwsClusterEntitySpec) validatePolicies(formats strfmt.Registry) error { + + if swag.IsZero(m.Policies) { // not required + return nil + } + + if m.Policies != nil { + if err := m.Policies.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec" + "." + "policies") + } + return err + } + } + + return nil +} + +func (m *V1SpectroAwsClusterEntitySpec) validateProfiles(formats strfmt.Registry) error { + + if swag.IsZero(m.Profiles) { // not required + return nil + } + + for i := 0; i < len(m.Profiles); i++ { + if swag.IsZero(m.Profiles[i]) { // not required + continue + } + + if m.Profiles[i] != nil { + if err := m.Profiles[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec" + "." + "profiles" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1SpectroAwsClusterEntitySpec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1SpectroAwsClusterEntitySpec) UnmarshalBinary(b []byte) error { + var res V1SpectroAwsClusterEntitySpec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_spectro_aws_cluster_import_entity.go b/api/models/v1_spectro_aws_cluster_import_entity.go new file mode 100644 index 00000000..c6c504dc --- /dev/null +++ b/api/models/v1_spectro_aws_cluster_import_entity.go @@ -0,0 +1,155 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1SpectroAwsClusterImportEntity Spectro AWS cluster import request payload +// +// swagger:model v1SpectroAwsClusterImportEntity +type V1SpectroAwsClusterImportEntity struct { + + // metadata + Metadata *V1ObjectMetaInputEntity `json:"metadata,omitempty"` + + // spec + Spec *V1SpectroAwsClusterImportEntitySpec `json:"spec,omitempty"` +} + +// Validate validates this v1 spectro aws cluster import entity +func (m *V1SpectroAwsClusterImportEntity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSpec(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1SpectroAwsClusterImportEntity) validateMetadata(formats strfmt.Registry) error { + + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } + return err + } + } + + return nil +} + +func (m *V1SpectroAwsClusterImportEntity) validateSpec(formats strfmt.Registry) error { + + if swag.IsZero(m.Spec) { // not required + return nil + } + + if m.Spec != nil { + if err := m.Spec.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1SpectroAwsClusterImportEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1SpectroAwsClusterImportEntity) UnmarshalBinary(b []byte) error { + var res V1SpectroAwsClusterImportEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} + +// V1SpectroAwsClusterImportEntitySpec v1 spectro aws cluster import entity spec +// +// swagger:model V1SpectroAwsClusterImportEntitySpec +type V1SpectroAwsClusterImportEntitySpec struct { + + // cluster config + ClusterConfig *V1ImportClusterConfig `json:"clusterConfig,omitempty"` +} + +// Validate validates this v1 spectro aws cluster import entity spec +func (m *V1SpectroAwsClusterImportEntitySpec) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateClusterConfig(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1SpectroAwsClusterImportEntitySpec) validateClusterConfig(formats strfmt.Registry) error { + + if swag.IsZero(m.ClusterConfig) { // not required + return nil + } + + if m.ClusterConfig != nil { + if err := m.ClusterConfig.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec" + "." + "clusterConfig") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1SpectroAwsClusterImportEntitySpec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1SpectroAwsClusterImportEntitySpec) UnmarshalBinary(b []byte) error { + var res V1SpectroAwsClusterImportEntitySpec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_spectro_aws_cluster_rate_entity.go b/api/models/v1_spectro_aws_cluster_rate_entity.go new file mode 100644 index 00000000..d0703a64 --- /dev/null +++ b/api/models/v1_spectro_aws_cluster_rate_entity.go @@ -0,0 +1,105 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1SpectroAwsClusterRateEntity Spectro AWS cluster request payload for estimating rate +// +// swagger:model v1SpectroAwsClusterRateEntity +type V1SpectroAwsClusterRateEntity struct { + + // cloud config + CloudConfig *V1AwsClusterConfig `json:"cloudConfig,omitempty"` + + // machinepoolconfig + Machinepoolconfig []*V1AwsMachinePoolConfigEntity `json:"machinepoolconfig"` +} + +// Validate validates this v1 spectro aws cluster rate entity +func (m *V1SpectroAwsClusterRateEntity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateCloudConfig(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMachinepoolconfig(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1SpectroAwsClusterRateEntity) validateCloudConfig(formats strfmt.Registry) error { + + if swag.IsZero(m.CloudConfig) { // not required + return nil + } + + if m.CloudConfig != nil { + if err := m.CloudConfig.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("cloudConfig") + } + return err + } + } + + return nil +} + +func (m *V1SpectroAwsClusterRateEntity) validateMachinepoolconfig(formats strfmt.Registry) error { + + if swag.IsZero(m.Machinepoolconfig) { // not required + return nil + } + + for i := 0; i < len(m.Machinepoolconfig); i++ { + if swag.IsZero(m.Machinepoolconfig[i]) { // not required + continue + } + + if m.Machinepoolconfig[i] != nil { + if err := m.Machinepoolconfig[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("machinepoolconfig" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1SpectroAwsClusterRateEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1SpectroAwsClusterRateEntity) UnmarshalBinary(b []byte) error { + var res V1SpectroAwsClusterRateEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_spectro_azure_cluster_entity.go b/api/models/v1_spectro_azure_cluster_entity.go new file mode 100644 index 00000000..929c56e4 --- /dev/null +++ b/api/models/v1_spectro_azure_cluster_entity.go @@ -0,0 +1,290 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1SpectroAzureClusterEntity Azure cluster request payload for create and update +// +// swagger:model v1SpectroAzureClusterEntity +type V1SpectroAzureClusterEntity struct { + + // metadata + Metadata *V1ObjectMeta `json:"metadata,omitempty"` + + // spec + Spec *V1SpectroAzureClusterEntitySpec `json:"spec,omitempty"` +} + +// Validate validates this v1 spectro azure cluster entity +func (m *V1SpectroAzureClusterEntity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSpec(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1SpectroAzureClusterEntity) validateMetadata(formats strfmt.Registry) error { + + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } + return err + } + } + + return nil +} + +func (m *V1SpectroAzureClusterEntity) validateSpec(formats strfmt.Registry) error { + + if swag.IsZero(m.Spec) { // not required + return nil + } + + if m.Spec != nil { + if err := m.Spec.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1SpectroAzureClusterEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1SpectroAzureClusterEntity) UnmarshalBinary(b []byte) error { + var res V1SpectroAzureClusterEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} + +// V1SpectroAzureClusterEntitySpec v1 spectro azure cluster entity spec +// +// swagger:model V1SpectroAzureClusterEntitySpec +type V1SpectroAzureClusterEntitySpec struct { + + // Cloud account uid to be used for cluster provisioning + // Required: true + CloudAccountUID *string `json:"cloudAccountUid"` + + // cloud config + // Required: true + CloudConfig *V1AzureClusterConfig `json:"cloudConfig"` + + // General cluster configuration like health, patching settings, namespace resource allocation, rbac + ClusterConfig *V1ClusterConfigEntity `json:"clusterConfig,omitempty"` + + // machinepoolconfig + Machinepoolconfig []*V1AzureMachinePoolConfigEntity `json:"machinepoolconfig"` + + // policies + Policies *V1SpectroClusterPolicies `json:"policies,omitempty"` + + // profiles + Profiles []*V1SpectroClusterProfileEntity `json:"profiles"` +} + +// Validate validates this v1 spectro azure cluster entity spec +func (m *V1SpectroAzureClusterEntitySpec) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateCloudAccountUID(formats); err != nil { + res = append(res, err) + } + + if err := m.validateCloudConfig(formats); err != nil { + res = append(res, err) + } + + if err := m.validateClusterConfig(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMachinepoolconfig(formats); err != nil { + res = append(res, err) + } + + if err := m.validatePolicies(formats); err != nil { + res = append(res, err) + } + + if err := m.validateProfiles(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1SpectroAzureClusterEntitySpec) validateCloudAccountUID(formats strfmt.Registry) error { + + if err := validate.Required("spec"+"."+"cloudAccountUid", "body", m.CloudAccountUID); err != nil { + return err + } + + return nil +} + +func (m *V1SpectroAzureClusterEntitySpec) validateCloudConfig(formats strfmt.Registry) error { + + if err := validate.Required("spec"+"."+"cloudConfig", "body", m.CloudConfig); err != nil { + return err + } + + if m.CloudConfig != nil { + if err := m.CloudConfig.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec" + "." + "cloudConfig") + } + return err + } + } + + return nil +} + +func (m *V1SpectroAzureClusterEntitySpec) validateClusterConfig(formats strfmt.Registry) error { + + if swag.IsZero(m.ClusterConfig) { // not required + return nil + } + + if m.ClusterConfig != nil { + if err := m.ClusterConfig.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec" + "." + "clusterConfig") + } + return err + } + } + + return nil +} + +func (m *V1SpectroAzureClusterEntitySpec) validateMachinepoolconfig(formats strfmt.Registry) error { + + if swag.IsZero(m.Machinepoolconfig) { // not required + return nil + } + + for i := 0; i < len(m.Machinepoolconfig); i++ { + if swag.IsZero(m.Machinepoolconfig[i]) { // not required + continue + } + + if m.Machinepoolconfig[i] != nil { + if err := m.Machinepoolconfig[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec" + "." + "machinepoolconfig" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1SpectroAzureClusterEntitySpec) validatePolicies(formats strfmt.Registry) error { + + if swag.IsZero(m.Policies) { // not required + return nil + } + + if m.Policies != nil { + if err := m.Policies.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec" + "." + "policies") + } + return err + } + } + + return nil +} + +func (m *V1SpectroAzureClusterEntitySpec) validateProfiles(formats strfmt.Registry) error { + + if swag.IsZero(m.Profiles) { // not required + return nil + } + + for i := 0; i < len(m.Profiles); i++ { + if swag.IsZero(m.Profiles[i]) { // not required + continue + } + + if m.Profiles[i] != nil { + if err := m.Profiles[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec" + "." + "profiles" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1SpectroAzureClusterEntitySpec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1SpectroAzureClusterEntitySpec) UnmarshalBinary(b []byte) error { + var res V1SpectroAzureClusterEntitySpec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_spectro_azure_cluster_import_entity.go b/api/models/v1_spectro_azure_cluster_import_entity.go new file mode 100644 index 00000000..e953024b --- /dev/null +++ b/api/models/v1_spectro_azure_cluster_import_entity.go @@ -0,0 +1,155 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1SpectroAzureClusterImportEntity Spectro Azure cluster import request payload +// +// swagger:model v1SpectroAzureClusterImportEntity +type V1SpectroAzureClusterImportEntity struct { + + // metadata + Metadata *V1ObjectMetaInputEntity `json:"metadata,omitempty"` + + // spec + Spec *V1SpectroAzureClusterImportEntitySpec `json:"spec,omitempty"` +} + +// Validate validates this v1 spectro azure cluster import entity +func (m *V1SpectroAzureClusterImportEntity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSpec(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1SpectroAzureClusterImportEntity) validateMetadata(formats strfmt.Registry) error { + + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } + return err + } + } + + return nil +} + +func (m *V1SpectroAzureClusterImportEntity) validateSpec(formats strfmt.Registry) error { + + if swag.IsZero(m.Spec) { // not required + return nil + } + + if m.Spec != nil { + if err := m.Spec.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1SpectroAzureClusterImportEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1SpectroAzureClusterImportEntity) UnmarshalBinary(b []byte) error { + var res V1SpectroAzureClusterImportEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} + +// V1SpectroAzureClusterImportEntitySpec v1 spectro azure cluster import entity spec +// +// swagger:model V1SpectroAzureClusterImportEntitySpec +type V1SpectroAzureClusterImportEntitySpec struct { + + // cluster config + ClusterConfig *V1ImportClusterConfig `json:"clusterConfig,omitempty"` +} + +// Validate validates this v1 spectro azure cluster import entity spec +func (m *V1SpectroAzureClusterImportEntitySpec) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateClusterConfig(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1SpectroAzureClusterImportEntitySpec) validateClusterConfig(formats strfmt.Registry) error { + + if swag.IsZero(m.ClusterConfig) { // not required + return nil + } + + if m.ClusterConfig != nil { + if err := m.ClusterConfig.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec" + "." + "clusterConfig") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1SpectroAzureClusterImportEntitySpec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1SpectroAzureClusterImportEntitySpec) UnmarshalBinary(b []byte) error { + var res V1SpectroAzureClusterImportEntitySpec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_spectro_azure_cluster_rate_entity.go b/api/models/v1_spectro_azure_cluster_rate_entity.go new file mode 100644 index 00000000..4a2a141a --- /dev/null +++ b/api/models/v1_spectro_azure_cluster_rate_entity.go @@ -0,0 +1,105 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1SpectroAzureClusterRateEntity Spectro Azure cluster request payload for estimating rate +// +// swagger:model v1SpectroAzureClusterRateEntity +type V1SpectroAzureClusterRateEntity struct { + + // cloud config + CloudConfig *V1AzureClusterConfig `json:"cloudConfig,omitempty"` + + // machinepoolconfig + Machinepoolconfig []*V1AzureMachinePoolConfigEntity `json:"machinepoolconfig"` +} + +// Validate validates this v1 spectro azure cluster rate entity +func (m *V1SpectroAzureClusterRateEntity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateCloudConfig(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMachinepoolconfig(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1SpectroAzureClusterRateEntity) validateCloudConfig(formats strfmt.Registry) error { + + if swag.IsZero(m.CloudConfig) { // not required + return nil + } + + if m.CloudConfig != nil { + if err := m.CloudConfig.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("cloudConfig") + } + return err + } + } + + return nil +} + +func (m *V1SpectroAzureClusterRateEntity) validateMachinepoolconfig(formats strfmt.Registry) error { + + if swag.IsZero(m.Machinepoolconfig) { // not required + return nil + } + + for i := 0; i < len(m.Machinepoolconfig); i++ { + if swag.IsZero(m.Machinepoolconfig[i]) { // not required + continue + } + + if m.Machinepoolconfig[i] != nil { + if err := m.Machinepoolconfig[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("machinepoolconfig" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1SpectroAzureClusterRateEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1SpectroAzureClusterRateEntity) UnmarshalBinary(b []byte) error { + var res V1SpectroAzureClusterRateEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_spectro_cluster.go b/api/models/v1_spectro_cluster.go new file mode 100644 index 00000000..b3a3f2ea --- /dev/null +++ b/api/models/v1_spectro_cluster.go @@ -0,0 +1,127 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1SpectroCluster SpectroCluster is the Schema for the spectroclusters API +// +// swagger:model v1SpectroCluster +type V1SpectroCluster struct { + + // APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + APIVersion string `json:"apiVersion,omitempty"` + + // Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + Kind string `json:"kind,omitempty"` + + // metadata + Metadata *V1ObjectMeta `json:"metadata,omitempty"` + + // spec + Spec *V1SpectroClusterSpec `json:"spec,omitempty"` + + // status + Status *V1SpectroClusterStatus `json:"status,omitempty"` +} + +// Validate validates this v1 spectro cluster +func (m *V1SpectroCluster) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSpec(formats); err != nil { + res = append(res, err) + } + + if err := m.validateStatus(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1SpectroCluster) validateMetadata(formats strfmt.Registry) error { + + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } + return err + } + } + + return nil +} + +func (m *V1SpectroCluster) validateSpec(formats strfmt.Registry) error { + + if swag.IsZero(m.Spec) { // not required + return nil + } + + if m.Spec != nil { + if err := m.Spec.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec") + } + return err + } + } + + return nil +} + +func (m *V1SpectroCluster) validateStatus(formats strfmt.Registry) error { + + if swag.IsZero(m.Status) { // not required + return nil + } + + if m.Status != nil { + if err := m.Status.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("status") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1SpectroCluster) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1SpectroCluster) UnmarshalBinary(b []byte) error { + var res V1SpectroCluster + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_spectro_cluster_add_on_service.go b/api/models/v1_spectro_cluster_add_on_service.go new file mode 100644 index 00000000..5ae01c8c --- /dev/null +++ b/api/models/v1_spectro_cluster_add_on_service.go @@ -0,0 +1,46 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1SpectroClusterAddOnService Spectro cluster addon service +// +// swagger:model v1SpectroClusterAddOnService +type V1SpectroClusterAddOnService struct { + + // endpoint + Endpoint string `json:"endpoint,omitempty"` + + // name + Name string `json:"name,omitempty"` +} + +// Validate validates this v1 spectro cluster add on service +func (m *V1SpectroClusterAddOnService) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1SpectroClusterAddOnService) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1SpectroClusterAddOnService) UnmarshalBinary(b []byte) error { + var res V1SpectroClusterAddOnService + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_spectro_cluster_add_on_service_summary.go b/api/models/v1_spectro_cluster_add_on_service_summary.go new file mode 100644 index 00000000..6e5d73c4 --- /dev/null +++ b/api/models/v1_spectro_cluster_add_on_service_summary.go @@ -0,0 +1,46 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1SpectroClusterAddOnServiceSummary Spectro cluster status summary +// +// swagger:model v1SpectroClusterAddOnServiceSummary +type V1SpectroClusterAddOnServiceSummary struct { + + // endpoint + Endpoint string `json:"endpoint,omitempty"` + + // name + Name string `json:"name,omitempty"` +} + +// Validate validates this v1 spectro cluster add on service summary +func (m *V1SpectroClusterAddOnServiceSummary) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1SpectroClusterAddOnServiceSummary) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1SpectroClusterAddOnServiceSummary) UnmarshalBinary(b []byte) error { + var res V1SpectroClusterAddOnServiceSummary + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_spectro_cluster_asset_entity.go b/api/models/v1_spectro_cluster_asset_entity.go new file mode 100644 index 00000000..5c267d09 --- /dev/null +++ b/api/models/v1_spectro_cluster_asset_entity.go @@ -0,0 +1,112 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1SpectroClusterAssetEntity Cluster asset +// +// swagger:model v1SpectroClusterAssetEntity +type V1SpectroClusterAssetEntity struct { + + // spec + Spec *V1SpectroClusterAssetEntitySpec `json:"spec,omitempty"` +} + +// Validate validates this v1 spectro cluster asset entity +func (m *V1SpectroClusterAssetEntity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateSpec(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1SpectroClusterAssetEntity) validateSpec(formats strfmt.Registry) error { + + if swag.IsZero(m.Spec) { // not required + return nil + } + + if m.Spec != nil { + if err := m.Spec.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1SpectroClusterAssetEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1SpectroClusterAssetEntity) UnmarshalBinary(b []byte) error { + var res V1SpectroClusterAssetEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} + +// V1SpectroClusterAssetEntitySpec v1 spectro cluster asset entity spec +// +// swagger:model V1SpectroClusterAssetEntitySpec +type V1SpectroClusterAssetEntitySpec struct { + + // frp kubeconfig + FrpKubeconfig string `json:"frpKubeconfig,omitempty"` + + // kubeconfig + Kubeconfig string `json:"kubeconfig,omitempty"` + + // kubeconfigclient + Kubeconfigclient string `json:"kubeconfigclient,omitempty"` + + // manifest + Manifest string `json:"manifest,omitempty"` +} + +// Validate validates this v1 spectro cluster asset entity spec +func (m *V1SpectroClusterAssetEntitySpec) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1SpectroClusterAssetEntitySpec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1SpectroClusterAssetEntitySpec) UnmarshalBinary(b []byte) error { + var res V1SpectroClusterAssetEntitySpec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_spectro_cluster_asset_frp_kube_config.go b/api/models/v1_spectro_cluster_asset_frp_kube_config.go new file mode 100644 index 00000000..3f503567 --- /dev/null +++ b/api/models/v1_spectro_cluster_asset_frp_kube_config.go @@ -0,0 +1,43 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1SpectroClusterAssetFrpKubeConfig Cluster asset Frp Kube Config +// +// swagger:model v1SpectroClusterAssetFrpKubeConfig +type V1SpectroClusterAssetFrpKubeConfig struct { + + // frp kubeconfig + FrpKubeconfig string `json:"frpKubeconfig,omitempty"` +} + +// Validate validates this v1 spectro cluster asset frp kube config +func (m *V1SpectroClusterAssetFrpKubeConfig) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1SpectroClusterAssetFrpKubeConfig) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1SpectroClusterAssetFrpKubeConfig) UnmarshalBinary(b []byte) error { + var res V1SpectroClusterAssetFrpKubeConfig + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_spectro_cluster_asset_kube_config.go b/api/models/v1_spectro_cluster_asset_kube_config.go new file mode 100644 index 00000000..37575105 --- /dev/null +++ b/api/models/v1_spectro_cluster_asset_kube_config.go @@ -0,0 +1,43 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1SpectroClusterAssetKubeConfig Cluster asset Kube Config +// +// swagger:model v1SpectroClusterAssetKubeConfig +type V1SpectroClusterAssetKubeConfig struct { + + // kubeconfig + Kubeconfig string `json:"kubeconfig,omitempty"` +} + +// Validate validates this v1 spectro cluster asset kube config +func (m *V1SpectroClusterAssetKubeConfig) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1SpectroClusterAssetKubeConfig) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1SpectroClusterAssetKubeConfig) UnmarshalBinary(b []byte) error { + var res V1SpectroClusterAssetKubeConfig + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_spectro_cluster_asset_kube_config_client.go b/api/models/v1_spectro_cluster_asset_kube_config_client.go new file mode 100644 index 00000000..922e53bc --- /dev/null +++ b/api/models/v1_spectro_cluster_asset_kube_config_client.go @@ -0,0 +1,43 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1SpectroClusterAssetKubeConfigClient Cluster asset Kube Config Client +// +// swagger:model v1SpectroClusterAssetKubeConfigClient +type V1SpectroClusterAssetKubeConfigClient struct { + + // kubeconfigclient + Kubeconfigclient string `json:"kubeconfigclient,omitempty"` +} + +// Validate validates this v1 spectro cluster asset kube config client +func (m *V1SpectroClusterAssetKubeConfigClient) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1SpectroClusterAssetKubeConfigClient) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1SpectroClusterAssetKubeConfigClient) UnmarshalBinary(b []byte) error { + var res V1SpectroClusterAssetKubeConfigClient + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_spectro_cluster_asset_manifest.go b/api/models/v1_spectro_cluster_asset_manifest.go new file mode 100644 index 00000000..7857e126 --- /dev/null +++ b/api/models/v1_spectro_cluster_asset_manifest.go @@ -0,0 +1,43 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1SpectroClusterAssetManifest Cluster asset +// +// swagger:model v1SpectroClusterAssetManifest +type V1SpectroClusterAssetManifest struct { + + // manifest + Manifest string `json:"manifest,omitempty"` +} + +// Validate validates this v1 spectro cluster asset manifest +func (m *V1SpectroClusterAssetManifest) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1SpectroClusterAssetManifest) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1SpectroClusterAssetManifest) UnmarshalBinary(b []byte) error { + var res V1SpectroClusterAssetManifest + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_spectro_cluster_cloud_cost.go b/api/models/v1_spectro_cluster_cloud_cost.go new file mode 100644 index 00000000..ddd92602 --- /dev/null +++ b/api/models/v1_spectro_cluster_cloud_cost.go @@ -0,0 +1,105 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1SpectroClusterCloudCost Spectro cluster cloud cost information +// +// swagger:model v1SpectroClusterCloudCost +type V1SpectroClusterCloudCost struct { + + // cost + Cost *V1ResourceCost `json:"cost,omitempty"` + + // data + Data []*V1CloudCostDataPoint `json:"data"` +} + +// Validate validates this v1 spectro cluster cloud cost +func (m *V1SpectroClusterCloudCost) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateCost(formats); err != nil { + res = append(res, err) + } + + if err := m.validateData(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1SpectroClusterCloudCost) validateCost(formats strfmt.Registry) error { + + if swag.IsZero(m.Cost) { // not required + return nil + } + + if m.Cost != nil { + if err := m.Cost.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("cost") + } + return err + } + } + + return nil +} + +func (m *V1SpectroClusterCloudCost) validateData(formats strfmt.Registry) error { + + if swag.IsZero(m.Data) { // not required + return nil + } + + for i := 0; i < len(m.Data); i++ { + if swag.IsZero(m.Data[i]) { // not required + continue + } + + if m.Data[i] != nil { + if err := m.Data[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("data" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1SpectroClusterCloudCost) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1SpectroClusterCloudCost) UnmarshalBinary(b []byte) error { + var res V1SpectroClusterCloudCost + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_spectro_cluster_cloud_cost_summary_filter.go b/api/models/v1_spectro_cluster_cloud_cost_summary_filter.go new file mode 100644 index 00000000..12fb55d1 --- /dev/null +++ b/api/models/v1_spectro_cluster_cloud_cost_summary_filter.go @@ -0,0 +1,158 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1SpectroClusterCloudCostSummaryFilter Spectro cluster cloud cost summary filter +// +// swagger:model v1SpectroClusterCloudCostSummaryFilter +type V1SpectroClusterCloudCostSummaryFilter struct { + + // clouds + // Unique: true + Clouds []string `json:"clouds"` + + // end time + // Format: date-time + EndTime V1Time `json:"endTime,omitempty"` + + // projects + // Unique: true + Projects []string `json:"projects"` + + // start time + // Format: date-time + StartTime V1Time `json:"startTime,omitempty"` + + // workspaces + // Unique: true + Workspaces []string `json:"workspaces"` +} + +// Validate validates this v1 spectro cluster cloud cost summary filter +func (m *V1SpectroClusterCloudCostSummaryFilter) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateClouds(formats); err != nil { + res = append(res, err) + } + + if err := m.validateEndTime(formats); err != nil { + res = append(res, err) + } + + if err := m.validateProjects(formats); err != nil { + res = append(res, err) + } + + if err := m.validateStartTime(formats); err != nil { + res = append(res, err) + } + + if err := m.validateWorkspaces(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1SpectroClusterCloudCostSummaryFilter) validateClouds(formats strfmt.Registry) error { + + if swag.IsZero(m.Clouds) { // not required + return nil + } + + if err := validate.UniqueItems("clouds", "body", m.Clouds); err != nil { + return err + } + + return nil +} + +func (m *V1SpectroClusterCloudCostSummaryFilter) validateEndTime(formats strfmt.Registry) error { + + if swag.IsZero(m.EndTime) { // not required + return nil + } + + if err := m.EndTime.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("endTime") + } + return err + } + + return nil +} + +func (m *V1SpectroClusterCloudCostSummaryFilter) validateProjects(formats strfmt.Registry) error { + + if swag.IsZero(m.Projects) { // not required + return nil + } + + if err := validate.UniqueItems("projects", "body", m.Projects); err != nil { + return err + } + + return nil +} + +func (m *V1SpectroClusterCloudCostSummaryFilter) validateStartTime(formats strfmt.Registry) error { + + if swag.IsZero(m.StartTime) { // not required + return nil + } + + if err := m.StartTime.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("startTime") + } + return err + } + + return nil +} + +func (m *V1SpectroClusterCloudCostSummaryFilter) validateWorkspaces(formats strfmt.Registry) error { + + if swag.IsZero(m.Workspaces) { // not required + return nil + } + + if err := validate.UniqueItems("workspaces", "body", m.Workspaces); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1SpectroClusterCloudCostSummaryFilter) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1SpectroClusterCloudCostSummaryFilter) UnmarshalBinary(b []byte) error { + var res V1SpectroClusterCloudCostSummaryFilter + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_spectro_cluster_cloud_cost_summary_options.go b/api/models/v1_spectro_cluster_cloud_cost_summary_options.go new file mode 100644 index 00000000..c0b0bef8 --- /dev/null +++ b/api/models/v1_spectro_cluster_cloud_cost_summary_options.go @@ -0,0 +1,109 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "encoding/json" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1SpectroClusterCloudCostSummaryOptions Spectro cluster cloud cost summary options +// +// swagger:model v1SpectroClusterCloudCostSummaryOptions +type V1SpectroClusterCloudCostSummaryOptions struct { + + // group by + // Enum: [tenant project cloud cluster] + GroupBy *string `json:"groupBy,omitempty"` + + // period + Period *int32 `json:"period,omitempty"` +} + +// Validate validates this v1 spectro cluster cloud cost summary options +func (m *V1SpectroClusterCloudCostSummaryOptions) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateGroupBy(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +var v1SpectroClusterCloudCostSummaryOptionsTypeGroupByPropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["tenant","project","cloud","cluster"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + v1SpectroClusterCloudCostSummaryOptionsTypeGroupByPropEnum = append(v1SpectroClusterCloudCostSummaryOptionsTypeGroupByPropEnum, v) + } +} + +const ( + + // V1SpectroClusterCloudCostSummaryOptionsGroupByTenant captures enum value "tenant" + V1SpectroClusterCloudCostSummaryOptionsGroupByTenant string = "tenant" + + // V1SpectroClusterCloudCostSummaryOptionsGroupByProject captures enum value "project" + V1SpectroClusterCloudCostSummaryOptionsGroupByProject string = "project" + + // V1SpectroClusterCloudCostSummaryOptionsGroupByCloud captures enum value "cloud" + V1SpectroClusterCloudCostSummaryOptionsGroupByCloud string = "cloud" + + // V1SpectroClusterCloudCostSummaryOptionsGroupByCluster captures enum value "cluster" + V1SpectroClusterCloudCostSummaryOptionsGroupByCluster string = "cluster" +) + +// prop value enum +func (m *V1SpectroClusterCloudCostSummaryOptions) validateGroupByEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, v1SpectroClusterCloudCostSummaryOptionsTypeGroupByPropEnum, true); err != nil { + return err + } + return nil +} + +func (m *V1SpectroClusterCloudCostSummaryOptions) validateGroupBy(formats strfmt.Registry) error { + + if swag.IsZero(m.GroupBy) { // not required + return nil + } + + // value enum + if err := m.validateGroupByEnum("groupBy", "body", *m.GroupBy); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1SpectroClusterCloudCostSummaryOptions) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1SpectroClusterCloudCostSummaryOptions) UnmarshalBinary(b []byte) error { + var res V1SpectroClusterCloudCostSummaryOptions + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_spectro_cluster_cloud_cost_summary_spec.go b/api/models/v1_spectro_cluster_cloud_cost_summary_spec.go new file mode 100644 index 00000000..85c1bee3 --- /dev/null +++ b/api/models/v1_spectro_cluster_cloud_cost_summary_spec.go @@ -0,0 +1,96 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1SpectroClusterCloudCostSummarySpec Spectro cluster cloud cost summary spec +// +// swagger:model v1SpectroClusterCloudCostSummarySpec +type V1SpectroClusterCloudCostSummarySpec struct { + + // filter + Filter *V1SpectroClusterCloudCostSummaryFilter `json:"filter,omitempty"` + + // options + Options *V1SpectroClusterCloudCostSummaryOptions `json:"options,omitempty"` +} + +// Validate validates this v1 spectro cluster cloud cost summary spec +func (m *V1SpectroClusterCloudCostSummarySpec) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateFilter(formats); err != nil { + res = append(res, err) + } + + if err := m.validateOptions(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1SpectroClusterCloudCostSummarySpec) validateFilter(formats strfmt.Registry) error { + + if swag.IsZero(m.Filter) { // not required + return nil + } + + if m.Filter != nil { + if err := m.Filter.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("filter") + } + return err + } + } + + return nil +} + +func (m *V1SpectroClusterCloudCostSummarySpec) validateOptions(formats strfmt.Registry) error { + + if swag.IsZero(m.Options) { // not required + return nil + } + + if m.Options != nil { + if err := m.Options.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("options") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1SpectroClusterCloudCostSummarySpec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1SpectroClusterCloudCostSummarySpec) UnmarshalBinary(b []byte) error { + var res V1SpectroClusterCloudCostSummarySpec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_spectro_cluster_cost.go b/api/models/v1_spectro_cluster_cost.go new file mode 100644 index 00000000..9e3ad5cb --- /dev/null +++ b/api/models/v1_spectro_cluster_cost.go @@ -0,0 +1,102 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1SpectroClusterCost Spectro cluster cost information +// +// swagger:model v1SpectroClusterCost +type V1SpectroClusterCost struct { + + // cloud + Cloud *V1SpectroClusterCloudCost `json:"cloud,omitempty"` + + // cost + Cost *V1ResourceCost `json:"cost,omitempty"` + + // name + Name string `json:"name,omitempty"` + + // uid + UID string `json:"uid,omitempty"` +} + +// Validate validates this v1 spectro cluster cost +func (m *V1SpectroClusterCost) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateCloud(formats); err != nil { + res = append(res, err) + } + + if err := m.validateCost(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1SpectroClusterCost) validateCloud(formats strfmt.Registry) error { + + if swag.IsZero(m.Cloud) { // not required + return nil + } + + if m.Cloud != nil { + if err := m.Cloud.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("cloud") + } + return err + } + } + + return nil +} + +func (m *V1SpectroClusterCost) validateCost(formats strfmt.Registry) error { + + if swag.IsZero(m.Cost) { // not required + return nil + } + + if m.Cost != nil { + if err := m.Cost.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("cost") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1SpectroClusterCost) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1SpectroClusterCost) UnmarshalBinary(b []byte) error { + var res V1SpectroClusterCost + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_spectro_cluster_cost_summary.go b/api/models/v1_spectro_cluster_cost_summary.go new file mode 100644 index 00000000..a6cc8a8a --- /dev/null +++ b/api/models/v1_spectro_cluster_cost_summary.go @@ -0,0 +1,122 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1SpectroClusterCostSummary v1 spectro cluster cost summary +// +// swagger:model v1SpectroClusterCostSummary +type V1SpectroClusterCostSummary struct { + + // cluster + Cluster *V1SpectroClusterCost `json:"cluster,omitempty"` + + // end time + // Format: date-time + EndTime V1Time `json:"endTime,omitempty"` + + // period + Period int32 `json:"period,omitempty"` + + // start time + // Format: date-time + StartTime V1Time `json:"startTime,omitempty"` +} + +// Validate validates this v1 spectro cluster cost summary +func (m *V1SpectroClusterCostSummary) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateCluster(formats); err != nil { + res = append(res, err) + } + + if err := m.validateEndTime(formats); err != nil { + res = append(res, err) + } + + if err := m.validateStartTime(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1SpectroClusterCostSummary) validateCluster(formats strfmt.Registry) error { + + if swag.IsZero(m.Cluster) { // not required + return nil + } + + if m.Cluster != nil { + if err := m.Cluster.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("cluster") + } + return err + } + } + + return nil +} + +func (m *V1SpectroClusterCostSummary) validateEndTime(formats strfmt.Registry) error { + + if swag.IsZero(m.EndTime) { // not required + return nil + } + + if err := m.EndTime.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("endTime") + } + return err + } + + return nil +} + +func (m *V1SpectroClusterCostSummary) validateStartTime(formats strfmt.Registry) error { + + if swag.IsZero(m.StartTime) { // not required + return nil + } + + if err := m.StartTime.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("startTime") + } + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1SpectroClusterCostSummary) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1SpectroClusterCostSummary) UnmarshalBinary(b []byte) error { + var res V1SpectroClusterCostSummary + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_spectro_cluster_health_condition.go b/api/models/v1_spectro_cluster_health_condition.go new file mode 100644 index 00000000..d4521352 --- /dev/null +++ b/api/models/v1_spectro_cluster_health_condition.go @@ -0,0 +1,77 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1SpectroClusterHealthCondition Spectro cluster health condition +// +// swagger:model v1SpectroClusterHealthCondition +type V1SpectroClusterHealthCondition struct { + + // message + Message string `json:"message,omitempty"` + + // related object + RelatedObject *V1RelatedObject `json:"relatedObject,omitempty"` + + // type + Type string `json:"type,omitempty"` +} + +// Validate validates this v1 spectro cluster health condition +func (m *V1SpectroClusterHealthCondition) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateRelatedObject(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1SpectroClusterHealthCondition) validateRelatedObject(formats strfmt.Registry) error { + + if swag.IsZero(m.RelatedObject) { // not required + return nil + } + + if m.RelatedObject != nil { + if err := m.RelatedObject.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("relatedObject") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1SpectroClusterHealthCondition) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1SpectroClusterHealthCondition) UnmarshalBinary(b []byte) error { + var res V1SpectroClusterHealthCondition + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_spectro_cluster_health_status.go b/api/models/v1_spectro_cluster_health_status.go new file mode 100644 index 00000000..2fabad43 --- /dev/null +++ b/api/models/v1_spectro_cluster_health_status.go @@ -0,0 +1,116 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1SpectroClusterHealthStatus Spectro cluster health status +// +// swagger:model v1SpectroClusterHealthStatus +type V1SpectroClusterHealthStatus struct { + + // agent version + AgentVersion string `json:"agentVersion,omitempty"` + + // conditions + // Unique: true + Conditions []*V1SpectroClusterHealthCondition `json:"conditions"` + + // last heart beat timestamp + // Format: date-time + LastHeartBeatTimestamp V1Time `json:"lastHeartBeatTimestamp,omitempty"` + + // state + State string `json:"state,omitempty"` +} + +// Validate validates this v1 spectro cluster health status +func (m *V1SpectroClusterHealthStatus) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateConditions(formats); err != nil { + res = append(res, err) + } + + if err := m.validateLastHeartBeatTimestamp(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1SpectroClusterHealthStatus) validateConditions(formats strfmt.Registry) error { + + if swag.IsZero(m.Conditions) { // not required + return nil + } + + if err := validate.UniqueItems("conditions", "body", m.Conditions); err != nil { + return err + } + + for i := 0; i < len(m.Conditions); i++ { + if swag.IsZero(m.Conditions[i]) { // not required + continue + } + + if m.Conditions[i] != nil { + if err := m.Conditions[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("conditions" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1SpectroClusterHealthStatus) validateLastHeartBeatTimestamp(formats strfmt.Registry) error { + + if swag.IsZero(m.LastHeartBeatTimestamp) { // not required + return nil + } + + if err := m.LastHeartBeatTimestamp.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("lastHeartBeatTimestamp") + } + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1SpectroClusterHealthStatus) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1SpectroClusterHealthStatus) UnmarshalBinary(b []byte) error { + var res V1SpectroClusterHealthStatus + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_spectro_cluster_kube_ctl_redirect.go b/api/models/v1_spectro_cluster_kube_ctl_redirect.go new file mode 100644 index 00000000..890cf78a --- /dev/null +++ b/api/models/v1_spectro_cluster_kube_ctl_redirect.go @@ -0,0 +1,43 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1SpectroClusterKubeCtlRedirect Active resources of tenant +// +// swagger:model v1SpectroClusterKubeCtlRedirect +type V1SpectroClusterKubeCtlRedirect struct { + + // redirect Uri + RedirectURI string `json:"redirectUri,omitempty"` +} + +// Validate validates this v1 spectro cluster kube ctl redirect +func (m *V1SpectroClusterKubeCtlRedirect) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1SpectroClusterKubeCtlRedirect) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1SpectroClusterKubeCtlRedirect) UnmarshalBinary(b []byte) error { + var res V1SpectroClusterKubeCtlRedirect + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_spectro_cluster_location_input_entity.go b/api/models/v1_spectro_cluster_location_input_entity.go new file mode 100644 index 00000000..9106f6ef --- /dev/null +++ b/api/models/v1_spectro_cluster_location_input_entity.go @@ -0,0 +1,71 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1SpectroClusterLocationInputEntity Cluster location +// +// swagger:model v1SpectroClusterLocationInputEntity +type V1SpectroClusterLocationInputEntity struct { + + // location + Location *V1ClusterLocation `json:"location,omitempty"` +} + +// Validate validates this v1 spectro cluster location input entity +func (m *V1SpectroClusterLocationInputEntity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateLocation(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1SpectroClusterLocationInputEntity) validateLocation(formats strfmt.Registry) error { + + if swag.IsZero(m.Location) { // not required + return nil + } + + if m.Location != nil { + if err := m.Location.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("location") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1SpectroClusterLocationInputEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1SpectroClusterLocationInputEntity) UnmarshalBinary(b []byte) error { + var res V1SpectroClusterLocationInputEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_spectro_cluster_meta_summary.go b/api/models/v1_spectro_cluster_meta_summary.go new file mode 100644 index 00000000..2b43917b --- /dev/null +++ b/api/models/v1_spectro_cluster_meta_summary.go @@ -0,0 +1,411 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "encoding/json" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1SpectroClusterMetaSummary Spectro cluster meta summary +// +// swagger:model v1SpectroClusterMetaSummary +type V1SpectroClusterMetaSummary struct { + + // metadata + Metadata *V1ObjectMeta `json:"metadata,omitempty"` + + // spec summary + SpecSummary *V1SpectroClusterMetaSummarySpecSummary `json:"specSummary,omitempty"` + + // status + Status *V1SpectroClusterMetaSummaryStatus `json:"status,omitempty"` +} + +// Validate validates this v1 spectro cluster meta summary +func (m *V1SpectroClusterMetaSummary) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSpecSummary(formats); err != nil { + res = append(res, err) + } + + if err := m.validateStatus(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1SpectroClusterMetaSummary) validateMetadata(formats strfmt.Registry) error { + + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } + return err + } + } + + return nil +} + +func (m *V1SpectroClusterMetaSummary) validateSpecSummary(formats strfmt.Registry) error { + + if swag.IsZero(m.SpecSummary) { // not required + return nil + } + + if m.SpecSummary != nil { + if err := m.SpecSummary.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("specSummary") + } + return err + } + } + + return nil +} + +func (m *V1SpectroClusterMetaSummary) validateStatus(formats strfmt.Registry) error { + + if swag.IsZero(m.Status) { // not required + return nil + } + + if m.Status != nil { + if err := m.Status.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("status") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1SpectroClusterMetaSummary) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1SpectroClusterMetaSummary) UnmarshalBinary(b []byte) error { + var res V1SpectroClusterMetaSummary + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} + +// V1SpectroClusterMetaSummarySpecSummary Spectro cluster meta summary +// +// swagger:model V1SpectroClusterMetaSummarySpecSummary +type V1SpectroClusterMetaSummarySpecSummary struct { + + // Architecture type of the cluster + ArchType []*string `json:"archType"` + + // cloud account Uid + CloudAccountUID string `json:"cloudAccountUid,omitempty"` + + // cloud region + CloudRegion string `json:"cloudRegion,omitempty"` + + // cloud type + CloudType string `json:"cloudType,omitempty"` + + // cluster type + ClusterType string `json:"clusterType,omitempty"` + + // import mode + ImportMode string `json:"importMode,omitempty"` + + // location + Location *V1ClusterMetaSpecLocation `json:"location,omitempty"` + + // project meta + ProjectMeta *V1ProjectMeta `json:"projectMeta,omitempty"` + + // tags + Tags []string `json:"tags"` +} + +// Validate validates this v1 spectro cluster meta summary spec summary +func (m *V1SpectroClusterMetaSummarySpecSummary) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateArchType(formats); err != nil { + res = append(res, err) + } + + if err := m.validateLocation(formats); err != nil { + res = append(res, err) + } + + if err := m.validateProjectMeta(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +var v1SpectroClusterMetaSummarySpecSummaryArchTypeItemsEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["arm64","amd64"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + v1SpectroClusterMetaSummarySpecSummaryArchTypeItemsEnum = append(v1SpectroClusterMetaSummarySpecSummaryArchTypeItemsEnum, v) + } +} + +func (m *V1SpectroClusterMetaSummarySpecSummary) validateArchTypeItemsEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, v1SpectroClusterMetaSummarySpecSummaryArchTypeItemsEnum, true); err != nil { + return err + } + return nil +} + +func (m *V1SpectroClusterMetaSummarySpecSummary) validateArchType(formats strfmt.Registry) error { + + if swag.IsZero(m.ArchType) { // not required + return nil + } + + for i := 0; i < len(m.ArchType); i++ { + if swag.IsZero(m.ArchType[i]) { // not required + continue + } + + // value enum + if err := m.validateArchTypeItemsEnum("specSummary"+"."+"archType"+"."+strconv.Itoa(i), "body", *m.ArchType[i]); err != nil { + return err + } + + } + + return nil +} + +func (m *V1SpectroClusterMetaSummarySpecSummary) validateLocation(formats strfmt.Registry) error { + + if swag.IsZero(m.Location) { // not required + return nil + } + + if m.Location != nil { + if err := m.Location.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("specSummary" + "." + "location") + } + return err + } + } + + return nil +} + +func (m *V1SpectroClusterMetaSummarySpecSummary) validateProjectMeta(formats strfmt.Registry) error { + + if swag.IsZero(m.ProjectMeta) { // not required + return nil + } + + if m.ProjectMeta != nil { + if err := m.ProjectMeta.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("specSummary" + "." + "projectMeta") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1SpectroClusterMetaSummarySpecSummary) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1SpectroClusterMetaSummarySpecSummary) UnmarshalBinary(b []byte) error { + var res V1SpectroClusterMetaSummarySpecSummary + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} + +// V1SpectroClusterMetaSummaryStatus Spectro cluster meta status summary +// +// swagger:model V1SpectroClusterMetaSummaryStatus +type V1SpectroClusterMetaSummaryStatus struct { + + // cost + Cost *V1ClusterMetaStatusCost `json:"cost,omitempty"` + + // fips + Fips *V1ClusterFips `json:"fips,omitempty"` + + // health + Health *V1ClusterMetaStatusHealth `json:"health,omitempty"` + + // state + State string `json:"state,omitempty"` + + // updates + Updates *V1ClusterMetaStatusUpdates `json:"updates,omitempty"` +} + +// Validate validates this v1 spectro cluster meta summary status +func (m *V1SpectroClusterMetaSummaryStatus) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateCost(formats); err != nil { + res = append(res, err) + } + + if err := m.validateFips(formats); err != nil { + res = append(res, err) + } + + if err := m.validateHealth(formats); err != nil { + res = append(res, err) + } + + if err := m.validateUpdates(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1SpectroClusterMetaSummaryStatus) validateCost(formats strfmt.Registry) error { + + if swag.IsZero(m.Cost) { // not required + return nil + } + + if m.Cost != nil { + if err := m.Cost.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("status" + "." + "cost") + } + return err + } + } + + return nil +} + +func (m *V1SpectroClusterMetaSummaryStatus) validateFips(formats strfmt.Registry) error { + + if swag.IsZero(m.Fips) { // not required + return nil + } + + if m.Fips != nil { + if err := m.Fips.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("status" + "." + "fips") + } + return err + } + } + + return nil +} + +func (m *V1SpectroClusterMetaSummaryStatus) validateHealth(formats strfmt.Registry) error { + + if swag.IsZero(m.Health) { // not required + return nil + } + + if m.Health != nil { + if err := m.Health.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("status" + "." + "health") + } + return err + } + } + + return nil +} + +func (m *V1SpectroClusterMetaSummaryStatus) validateUpdates(formats strfmt.Registry) error { + + if swag.IsZero(m.Updates) { // not required + return nil + } + + if m.Updates != nil { + if err := m.Updates.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("status" + "." + "updates") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1SpectroClusterMetaSummaryStatus) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1SpectroClusterMetaSummaryStatus) UnmarshalBinary(b []byte) error { + var res V1SpectroClusterMetaSummaryStatus + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_spectro_cluster_metadata_filter_spec.go b/api/models/v1_spectro_cluster_metadata_filter_spec.go new file mode 100644 index 00000000..1d6292e5 --- /dev/null +++ b/api/models/v1_spectro_cluster_metadata_filter_spec.go @@ -0,0 +1,89 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1SpectroClusterMetadataFilterSpec Spectro cluster filter spec +// +// swagger:model v1SpectroClusterMetadataFilterSpec +type V1SpectroClusterMetadataFilterSpec struct { + + // environment + Environment string `json:"environment,omitempty"` + + // include virtual + IncludeVirtual *bool `json:"includeVirtual,omitempty"` + + // isAlloy is renamed to isImported + IsAlloy *bool `json:"isAlloy,omitempty"` + + // is import read only + IsImportReadOnly *bool `json:"isImportReadOnly,omitempty"` + + // is imported + IsImported *bool `json:"isImported,omitempty"` + + // name + Name *V1FilterString `json:"name,omitempty"` + + // state + State string `json:"state,omitempty"` +} + +// Validate validates this v1 spectro cluster metadata filter spec +func (m *V1SpectroClusterMetadataFilterSpec) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateName(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1SpectroClusterMetadataFilterSpec) validateName(formats strfmt.Registry) error { + + if swag.IsZero(m.Name) { // not required + return nil + } + + if m.Name != nil { + if err := m.Name.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("name") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1SpectroClusterMetadataFilterSpec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1SpectroClusterMetadataFilterSpec) UnmarshalBinary(b []byte) error { + var res V1SpectroClusterMetadataFilterSpec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_spectro_cluster_metadata_spec.go b/api/models/v1_spectro_cluster_metadata_spec.go new file mode 100644 index 00000000..da06caf5 --- /dev/null +++ b/api/models/v1_spectro_cluster_metadata_spec.go @@ -0,0 +1,128 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "encoding/json" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1SpectroClusterMetadataSpec Spectro cluster metadata spec +// +// swagger:model v1SpectroClusterMetadataSpec +type V1SpectroClusterMetadataSpec struct { + + // filter + Filter *V1SpectroClusterMetadataFilterSpec `json:"filter,omitempty"` + + // sort + // Enum: [environment state name] + Sort *string `json:"sort,omitempty"` +} + +// Validate validates this v1 spectro cluster metadata spec +func (m *V1SpectroClusterMetadataSpec) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateFilter(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSort(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1SpectroClusterMetadataSpec) validateFilter(formats strfmt.Registry) error { + + if swag.IsZero(m.Filter) { // not required + return nil + } + + if m.Filter != nil { + if err := m.Filter.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("filter") + } + return err + } + } + + return nil +} + +var v1SpectroClusterMetadataSpecTypeSortPropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["environment","state","name"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + v1SpectroClusterMetadataSpecTypeSortPropEnum = append(v1SpectroClusterMetadataSpecTypeSortPropEnum, v) + } +} + +const ( + + // V1SpectroClusterMetadataSpecSortEnvironment captures enum value "environment" + V1SpectroClusterMetadataSpecSortEnvironment string = "environment" + + // V1SpectroClusterMetadataSpecSortState captures enum value "state" + V1SpectroClusterMetadataSpecSortState string = "state" + + // V1SpectroClusterMetadataSpecSortName captures enum value "name" + V1SpectroClusterMetadataSpecSortName string = "name" +) + +// prop value enum +func (m *V1SpectroClusterMetadataSpec) validateSortEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, v1SpectroClusterMetadataSpecTypeSortPropEnum, true); err != nil { + return err + } + return nil +} + +func (m *V1SpectroClusterMetadataSpec) validateSort(formats strfmt.Registry) error { + + if swag.IsZero(m.Sort) { // not required + return nil + } + + // value enum + if err := m.validateSortEnum("sort", "body", *m.Sort); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1SpectroClusterMetadataSpec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1SpectroClusterMetadataSpec) UnmarshalBinary(b []byte) error { + var res V1SpectroClusterMetadataSpec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_spectro_cluster_metrics.go b/api/models/v1_spectro_cluster_metrics.go new file mode 100644 index 00000000..ade77cc1 --- /dev/null +++ b/api/models/v1_spectro_cluster_metrics.go @@ -0,0 +1,96 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1SpectroClusterMetrics Spectro cluster metrics +// +// swagger:model v1SpectroClusterMetrics +type V1SpectroClusterMetrics struct { + + // cpu + CPU *V1ComputeMetrics `json:"cpu,omitempty"` + + // memory + Memory *V1ComputeMetrics `json:"memory,omitempty"` +} + +// Validate validates this v1 spectro cluster metrics +func (m *V1SpectroClusterMetrics) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateCPU(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMemory(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1SpectroClusterMetrics) validateCPU(formats strfmt.Registry) error { + + if swag.IsZero(m.CPU) { // not required + return nil + } + + if m.CPU != nil { + if err := m.CPU.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("cpu") + } + return err + } + } + + return nil +} + +func (m *V1SpectroClusterMetrics) validateMemory(formats strfmt.Registry) error { + + if swag.IsZero(m.Memory) { // not required + return nil + } + + if m.Memory != nil { + if err := m.Memory.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("memory") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1SpectroClusterMetrics) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1SpectroClusterMetrics) UnmarshalBinary(b []byte) error { + var res V1SpectroClusterMetrics + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_spectro_cluster_notifications.go b/api/models/v1_spectro_cluster_notifications.go new file mode 100644 index 00000000..ce72404f --- /dev/null +++ b/api/models/v1_spectro_cluster_notifications.go @@ -0,0 +1,43 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1SpectroClusterNotifications Spectro cluster notifications +// +// swagger:model v1SpectroClusterNotifications +type V1SpectroClusterNotifications struct { + + // is available + IsAvailable bool `json:"isAvailable"` +} + +// Validate validates this v1 spectro cluster notifications +func (m *V1SpectroClusterNotifications) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1SpectroClusterNotifications) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1SpectroClusterNotifications) UnmarshalBinary(b []byte) error { + var res V1SpectroClusterNotifications + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_spectro_cluster_oidc_claims.go b/api/models/v1_spectro_cluster_oidc_claims.go new file mode 100644 index 00000000..b082201e --- /dev/null +++ b/api/models/v1_spectro_cluster_oidc_claims.go @@ -0,0 +1,52 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1SpectroClusterOidcClaims v1 spectro cluster oidc claims +// +// swagger:model v1SpectroClusterOidcClaims +type V1SpectroClusterOidcClaims struct { + + // email + Email string `json:"Email"` + + // first name + FirstName string `json:"FirstName"` + + // last name + LastName string `json:"LastName"` + + // spectro team + SpectroTeam string `json:"SpectroTeam"` +} + +// Validate validates this v1 spectro cluster oidc claims +func (m *V1SpectroClusterOidcClaims) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1SpectroClusterOidcClaims) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1SpectroClusterOidcClaims) UnmarshalBinary(b []byte) error { + var res V1SpectroClusterOidcClaims + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_spectro_cluster_oidc_issuer_tls_spec.go b/api/models/v1_spectro_cluster_oidc_issuer_tls_spec.go new file mode 100644 index 00000000..042859d0 --- /dev/null +++ b/api/models/v1_spectro_cluster_oidc_issuer_tls_spec.go @@ -0,0 +1,46 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1SpectroClusterOidcIssuerTLSSpec v1 spectro cluster oidc issuer Tls spec +// +// swagger:model v1SpectroClusterOidcIssuerTlsSpec +type V1SpectroClusterOidcIssuerTLSSpec struct { + + // ca certificate base64 + CaCertificateBase64 string `json:"caCertificateBase64"` + + // insecure skip verify + InsecureSkipVerify *bool `json:"insecureSkipVerify"` +} + +// Validate validates this v1 spectro cluster oidc issuer Tls spec +func (m *V1SpectroClusterOidcIssuerTLSSpec) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1SpectroClusterOidcIssuerTLSSpec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1SpectroClusterOidcIssuerTLSSpec) UnmarshalBinary(b []byte) error { + var res V1SpectroClusterOidcIssuerTLSSpec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_spectro_cluster_oidc_spec.go b/api/models/v1_spectro_cluster_oidc_spec.go new file mode 100644 index 00000000..3a086396 --- /dev/null +++ b/api/models/v1_spectro_cluster_oidc_spec.go @@ -0,0 +1,108 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1SpectroClusterOidcSpec v1 spectro cluster oidc spec +// +// swagger:model v1SpectroClusterOidcSpec +type V1SpectroClusterOidcSpec struct { + + // client Id + ClientID string `json:"clientId"` + + // client secret + ClientSecret string `json:"clientSecret"` + + // issuer Tls + IssuerTLS *V1SpectroClusterOidcIssuerTLSSpec `json:"issuerTls,omitempty"` + + // the issuer is the URL identifier for the service + IssuerURL string `json:"issuerUrl"` + + // required claims + RequiredClaims *V1SpectroClusterOidcClaims `json:"requiredClaims,omitempty"` + + // scopes + Scopes []string `json:"scopes"` +} + +// Validate validates this v1 spectro cluster oidc spec +func (m *V1SpectroClusterOidcSpec) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateIssuerTLS(formats); err != nil { + res = append(res, err) + } + + if err := m.validateRequiredClaims(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1SpectroClusterOidcSpec) validateIssuerTLS(formats strfmt.Registry) error { + + if swag.IsZero(m.IssuerTLS) { // not required + return nil + } + + if m.IssuerTLS != nil { + if err := m.IssuerTLS.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("issuerTls") + } + return err + } + } + + return nil +} + +func (m *V1SpectroClusterOidcSpec) validateRequiredClaims(formats strfmt.Registry) error { + + if swag.IsZero(m.RequiredClaims) { // not required + return nil + } + + if m.RequiredClaims != nil { + if err := m.RequiredClaims.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("requiredClaims") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1SpectroClusterOidcSpec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1SpectroClusterOidcSpec) UnmarshalBinary(b []byte) error { + var res V1SpectroClusterOidcSpec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_spectro_cluster_pack_condition.go b/api/models/v1_spectro_cluster_pack_condition.go new file mode 100644 index 00000000..eea546a8 --- /dev/null +++ b/api/models/v1_spectro_cluster_pack_condition.go @@ -0,0 +1,121 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "encoding/json" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1SpectroClusterPackCondition v1 spectro cluster pack condition +// +// swagger:model v1SpectroClusterPackCondition +type V1SpectroClusterPackCondition struct { + + // message + Message string `json:"message,omitempty"` + + // reason + Reason string `json:"reason,omitempty"` + + // status + Status string `json:"status,omitempty"` + + // type + // Enum: [ReadyForInstall Installed Ready Error UpgradeAvailable WaitingForOtherLayers] + Type string `json:"type,omitempty"` +} + +// Validate validates this v1 spectro cluster pack condition +func (m *V1SpectroClusterPackCondition) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateType(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +var v1SpectroClusterPackConditionTypeTypePropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["ReadyForInstall","Installed","Ready","Error","UpgradeAvailable","WaitingForOtherLayers"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + v1SpectroClusterPackConditionTypeTypePropEnum = append(v1SpectroClusterPackConditionTypeTypePropEnum, v) + } +} + +const ( + + // V1SpectroClusterPackConditionTypeReadyForInstall captures enum value "ReadyForInstall" + V1SpectroClusterPackConditionTypeReadyForInstall string = "ReadyForInstall" + + // V1SpectroClusterPackConditionTypeInstalled captures enum value "Installed" + V1SpectroClusterPackConditionTypeInstalled string = "Installed" + + // V1SpectroClusterPackConditionTypeReady captures enum value "Ready" + V1SpectroClusterPackConditionTypeReady string = "Ready" + + // V1SpectroClusterPackConditionTypeError captures enum value "Error" + V1SpectroClusterPackConditionTypeError string = "Error" + + // V1SpectroClusterPackConditionTypeUpgradeAvailable captures enum value "UpgradeAvailable" + V1SpectroClusterPackConditionTypeUpgradeAvailable string = "UpgradeAvailable" + + // V1SpectroClusterPackConditionTypeWaitingForOtherLayers captures enum value "WaitingForOtherLayers" + V1SpectroClusterPackConditionTypeWaitingForOtherLayers string = "WaitingForOtherLayers" +) + +// prop value enum +func (m *V1SpectroClusterPackCondition) validateTypeEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, v1SpectroClusterPackConditionTypeTypePropEnum, true); err != nil { + return err + } + return nil +} + +func (m *V1SpectroClusterPackCondition) validateType(formats strfmt.Registry) error { + + if swag.IsZero(m.Type) { // not required + return nil + } + + // value enum + if err := m.validateTypeEnum("type", "body", m.Type); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1SpectroClusterPackCondition) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1SpectroClusterPackCondition) UnmarshalBinary(b []byte) error { + var res V1SpectroClusterPackCondition + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_spectro_cluster_pack_config_list.go b/api/models/v1_spectro_cluster_pack_config_list.go new file mode 100644 index 00000000..2e2ac693 --- /dev/null +++ b/api/models/v1_spectro_cluster_pack_config_list.go @@ -0,0 +1,87 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1SpectroClusterPackConfigList v1 spectro cluster pack config list +// +// swagger:model v1SpectroClusterPackConfigList +type V1SpectroClusterPackConfigList struct { + + // items + // Required: true + // Unique: true + Items []*V1PackConfig `json:"items"` +} + +// Validate validates this v1 spectro cluster pack config list +func (m *V1SpectroClusterPackConfigList) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateItems(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1SpectroClusterPackConfigList) validateItems(formats strfmt.Registry) error { + + if err := validate.Required("items", "body", m.Items); err != nil { + return err + } + + if err := validate.UniqueItems("items", "body", m.Items); err != nil { + return err + } + + for i := 0; i < len(m.Items); i++ { + if swag.IsZero(m.Items[i]) { // not required + continue + } + + if m.Items[i] != nil { + if err := m.Items[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("items" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1SpectroClusterPackConfigList) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1SpectroClusterPackConfigList) UnmarshalBinary(b []byte) error { + var res V1SpectroClusterPackConfigList + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_spectro_cluster_pack_diff.go b/api/models/v1_spectro_cluster_pack_diff.go new file mode 100644 index 00000000..7e30e084 --- /dev/null +++ b/api/models/v1_spectro_cluster_pack_diff.go @@ -0,0 +1,99 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1SpectroClusterPackDiff Cluster pack difference +// +// swagger:model v1SpectroClusterPackDiff +type V1SpectroClusterPackDiff struct { + + // current + Current *V1PackRef `json:"current,omitempty"` + + // diff config keys + DiffConfigKeys []string `json:"diffConfigKeys"` + + // target + Target *V1PackRef `json:"target,omitempty"` +} + +// Validate validates this v1 spectro cluster pack diff +func (m *V1SpectroClusterPackDiff) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateCurrent(formats); err != nil { + res = append(res, err) + } + + if err := m.validateTarget(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1SpectroClusterPackDiff) validateCurrent(formats strfmt.Registry) error { + + if swag.IsZero(m.Current) { // not required + return nil + } + + if m.Current != nil { + if err := m.Current.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("current") + } + return err + } + } + + return nil +} + +func (m *V1SpectroClusterPackDiff) validateTarget(formats strfmt.Registry) error { + + if swag.IsZero(m.Target) { // not required + return nil + } + + if m.Target != nil { + if err := m.Target.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("target") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1SpectroClusterPackDiff) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1SpectroClusterPackDiff) UnmarshalBinary(b []byte) error { + var res V1SpectroClusterPackDiff + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_spectro_cluster_pack_properties.go b/api/models/v1_spectro_cluster_pack_properties.go new file mode 100644 index 00000000..ecc05e8f --- /dev/null +++ b/api/models/v1_spectro_cluster_pack_properties.go @@ -0,0 +1,43 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1SpectroClusterPackProperties Cluster pack properties response +// +// swagger:model v1SpectroClusterPackProperties +type V1SpectroClusterPackProperties struct { + + // yaml + Yaml string `json:"yaml"` +} + +// Validate validates this v1 spectro cluster pack properties +func (m *V1SpectroClusterPackProperties) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1SpectroClusterPackProperties) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1SpectroClusterPackProperties) UnmarshalBinary(b []byte) error { + var res V1SpectroClusterPackProperties + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_spectro_cluster_pack_status_entity.go b/api/models/v1_spectro_cluster_pack_status_entity.go new file mode 100644 index 00000000..c840cf7d --- /dev/null +++ b/api/models/v1_spectro_cluster_pack_status_entity.go @@ -0,0 +1,151 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1SpectroClusterPackStatusEntity v1 spectro cluster pack status entity +// +// swagger:model v1SpectroClusterPackStatusEntity +type V1SpectroClusterPackStatusEntity struct { + + // Pack deployment status conditions + Condition *V1SpectroClusterPackCondition `json:"condition,omitempty"` + + // Pack deployment end time + // Format: date-time + EndTime V1Time `json:"endTime,omitempty"` + + // Pack name + Name string `json:"name,omitempty"` + + // Cluster profile uid + ProfileUID string `json:"profileUid,omitempty"` + + // Pack deployment start time + // Format: date-time + StartTime V1Time `json:"startTime,omitempty"` + + // type + Type V1PackType `json:"type,omitempty"` + + // pack version + Version string `json:"version,omitempty"` +} + +// Validate validates this v1 spectro cluster pack status entity +func (m *V1SpectroClusterPackStatusEntity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateCondition(formats); err != nil { + res = append(res, err) + } + + if err := m.validateEndTime(formats); err != nil { + res = append(res, err) + } + + if err := m.validateStartTime(formats); err != nil { + res = append(res, err) + } + + if err := m.validateType(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1SpectroClusterPackStatusEntity) validateCondition(formats strfmt.Registry) error { + + if swag.IsZero(m.Condition) { // not required + return nil + } + + if m.Condition != nil { + if err := m.Condition.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("condition") + } + return err + } + } + + return nil +} + +func (m *V1SpectroClusterPackStatusEntity) validateEndTime(formats strfmt.Registry) error { + + if swag.IsZero(m.EndTime) { // not required + return nil + } + + if err := m.EndTime.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("endTime") + } + return err + } + + return nil +} + +func (m *V1SpectroClusterPackStatusEntity) validateStartTime(formats strfmt.Registry) error { + + if swag.IsZero(m.StartTime) { // not required + return nil + } + + if err := m.StartTime.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("startTime") + } + return err + } + + return nil +} + +func (m *V1SpectroClusterPackStatusEntity) validateType(formats strfmt.Registry) error { + + if swag.IsZero(m.Type) { // not required + return nil + } + + if err := m.Type.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("type") + } + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1SpectroClusterPackStatusEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1SpectroClusterPackStatusEntity) UnmarshalBinary(b []byte) error { + var res V1SpectroClusterPackStatusEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_spectro_cluster_packs_entity.go b/api/models/v1_spectro_cluster_packs_entity.go new file mode 100644 index 00000000..022eb2f1 --- /dev/null +++ b/api/models/v1_spectro_cluster_packs_entity.go @@ -0,0 +1,80 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1SpectroClusterPacksEntity Cluster entity for pack refs validate +// +// swagger:model v1SpectroClusterPacksEntity +type V1SpectroClusterPacksEntity struct { + + // profiles + Profiles []*V1SpectroClusterProfileEntity `json:"profiles"` +} + +// Validate validates this v1 spectro cluster packs entity +func (m *V1SpectroClusterPacksEntity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateProfiles(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1SpectroClusterPacksEntity) validateProfiles(formats strfmt.Registry) error { + + if swag.IsZero(m.Profiles) { // not required + return nil + } + + for i := 0; i < len(m.Profiles); i++ { + if swag.IsZero(m.Profiles[i]) { // not required + continue + } + + if m.Profiles[i] != nil { + if err := m.Profiles[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("profiles" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1SpectroClusterPacksEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1SpectroClusterPacksEntity) UnmarshalBinary(b []byte) error { + var res V1SpectroClusterPacksEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_spectro_cluster_packs_status_entity.go b/api/models/v1_spectro_cluster_packs_status_entity.go new file mode 100644 index 00000000..1e2063bc --- /dev/null +++ b/api/models/v1_spectro_cluster_packs_status_entity.go @@ -0,0 +1,80 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1SpectroClusterPacksStatusEntity v1 spectro cluster packs status entity +// +// swagger:model v1SpectroClusterPacksStatusEntity +type V1SpectroClusterPacksStatusEntity struct { + + // packs + Packs []*V1SpectroClusterPackStatusEntity `json:"packs"` +} + +// Validate validates this v1 spectro cluster packs status entity +func (m *V1SpectroClusterPacksStatusEntity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validatePacks(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1SpectroClusterPacksStatusEntity) validatePacks(formats strfmt.Registry) error { + + if swag.IsZero(m.Packs) { // not required + return nil + } + + for i := 0; i < len(m.Packs); i++ { + if swag.IsZero(m.Packs[i]) { // not required + continue + } + + if m.Packs[i] != nil { + if err := m.Packs[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("packs" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1SpectroClusterPacksStatusEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1SpectroClusterPacksStatusEntity) UnmarshalBinary(b []byte) error { + var res V1SpectroClusterPacksStatusEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_spectro_cluster_policies.go b/api/models/v1_spectro_cluster_policies.go new file mode 100644 index 00000000..8b110913 --- /dev/null +++ b/api/models/v1_spectro_cluster_policies.go @@ -0,0 +1,96 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1SpectroClusterPolicies Cluster policies +// +// swagger:model v1SpectroClusterPolicies +type V1SpectroClusterPolicies struct { + + // backup policy + BackupPolicy *V1ClusterBackupConfig `json:"backupPolicy,omitempty"` + + // scan policy + ScanPolicy *V1ClusterComplianceScheduleConfig `json:"scanPolicy,omitempty"` +} + +// Validate validates this v1 spectro cluster policies +func (m *V1SpectroClusterPolicies) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateBackupPolicy(formats); err != nil { + res = append(res, err) + } + + if err := m.validateScanPolicy(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1SpectroClusterPolicies) validateBackupPolicy(formats strfmt.Registry) error { + + if swag.IsZero(m.BackupPolicy) { // not required + return nil + } + + if m.BackupPolicy != nil { + if err := m.BackupPolicy.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("backupPolicy") + } + return err + } + } + + return nil +} + +func (m *V1SpectroClusterPolicies) validateScanPolicy(formats strfmt.Registry) error { + + if swag.IsZero(m.ScanPolicy) { // not required + return nil + } + + if m.ScanPolicy != nil { + if err := m.ScanPolicy.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("scanPolicy") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1SpectroClusterPolicies) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1SpectroClusterPolicies) UnmarshalBinary(b []byte) error { + var res V1SpectroClusterPolicies + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_spectro_cluster_profile.go b/api/models/v1_spectro_cluster_profile.go new file mode 100644 index 00000000..f65eb5ce --- /dev/null +++ b/api/models/v1_spectro_cluster_profile.go @@ -0,0 +1,96 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1SpectroClusterProfile Cluster profile response +// +// swagger:model v1SpectroClusterProfile +type V1SpectroClusterProfile struct { + + // metadata + Metadata *V1ObjectMeta `json:"metadata,omitempty"` + + // spec + Spec *V1SpectroClusterProfileSpec `json:"spec,omitempty"` +} + +// Validate validates this v1 spectro cluster profile +func (m *V1SpectroClusterProfile) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSpec(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1SpectroClusterProfile) validateMetadata(formats strfmt.Registry) error { + + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } + return err + } + } + + return nil +} + +func (m *V1SpectroClusterProfile) validateSpec(formats strfmt.Registry) error { + + if swag.IsZero(m.Spec) { // not required + return nil + } + + if m.Spec != nil { + if err := m.Spec.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1SpectroClusterProfile) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1SpectroClusterProfile) UnmarshalBinary(b []byte) error { + var res V1SpectroClusterProfile + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_spectro_cluster_profile_entity.go b/api/models/v1_spectro_cluster_profile_entity.go new file mode 100644 index 00000000..97222365 --- /dev/null +++ b/api/models/v1_spectro_cluster_profile_entity.go @@ -0,0 +1,124 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1SpectroClusterProfileEntity Cluster profile request payload +// +// swagger:model v1SpectroClusterProfileEntity +type V1SpectroClusterProfileEntity struct { + + // Cluster profile packs array + // Unique: true + PackValues []*V1PackValuesEntity `json:"packValues"` + + // Cluster profile uid to be replaced with new profile + ReplaceWithProfile string `json:"replaceWithProfile,omitempty"` + + // Cluster profile uid + UID string `json:"uid,omitempty"` + + // variables + Variables []*V1SpectroClusterVariable `json:"variables"` +} + +// Validate validates this v1 spectro cluster profile entity +func (m *V1SpectroClusterProfileEntity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validatePackValues(formats); err != nil { + res = append(res, err) + } + + if err := m.validateVariables(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1SpectroClusterProfileEntity) validatePackValues(formats strfmt.Registry) error { + + if swag.IsZero(m.PackValues) { // not required + return nil + } + + if err := validate.UniqueItems("packValues", "body", m.PackValues); err != nil { + return err + } + + for i := 0; i < len(m.PackValues); i++ { + if swag.IsZero(m.PackValues[i]) { // not required + continue + } + + if m.PackValues[i] != nil { + if err := m.PackValues[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("packValues" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1SpectroClusterProfileEntity) validateVariables(formats strfmt.Registry) error { + + if swag.IsZero(m.Variables) { // not required + return nil + } + + for i := 0; i < len(m.Variables); i++ { + if swag.IsZero(m.Variables[i]) { // not required + continue + } + + if m.Variables[i] != nil { + if err := m.Variables[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("variables" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1SpectroClusterProfileEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1SpectroClusterProfileEntity) UnmarshalBinary(b []byte) error { + var res V1SpectroClusterProfileEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_spectro_cluster_profile_list.go b/api/models/v1_spectro_cluster_profile_list.go new file mode 100644 index 00000000..3d413982 --- /dev/null +++ b/api/models/v1_spectro_cluster_profile_list.go @@ -0,0 +1,82 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1SpectroClusterProfileList v1 spectro cluster profile list +// +// swagger:model v1SpectroClusterProfileList +type V1SpectroClusterProfileList struct { + + // profiles + // Required: true + Profiles []*V1SpectroClusterProfile `json:"profiles"` +} + +// Validate validates this v1 spectro cluster profile list +func (m *V1SpectroClusterProfileList) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateProfiles(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1SpectroClusterProfileList) validateProfiles(formats strfmt.Registry) error { + + if err := validate.Required("profiles", "body", m.Profiles); err != nil { + return err + } + + for i := 0; i < len(m.Profiles); i++ { + if swag.IsZero(m.Profiles[i]) { // not required + continue + } + + if m.Profiles[i] != nil { + if err := m.Profiles[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("profiles" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1SpectroClusterProfileList) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1SpectroClusterProfileList) UnmarshalBinary(b []byte) error { + var res V1SpectroClusterProfileList + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_spectro_cluster_profile_spec.go b/api/models/v1_spectro_cluster_profile_spec.go new file mode 100644 index 00000000..08cab1e9 --- /dev/null +++ b/api/models/v1_spectro_cluster_profile_spec.go @@ -0,0 +1,120 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1SpectroClusterProfileSpec Cluster profile spec response +// +// swagger:model v1SpectroClusterProfileSpec +type V1SpectroClusterProfileSpec struct { + + // Cluster profile cloud type + CloudType string `json:"cloudType,omitempty"` + + // Cluster profile packs array + // Unique: true + Packs []*V1ClusterProfilePacksEntity `json:"packs"` + + // RelatedObject refers to the type of object(clustergroup, cluster or edgeHost) the cluster profile is associated with + RelatedObject *V1ObjectReference `json:"relatedObject,omitempty"` + + // Cluster profile type [ "cluster", "infra", "add-on", "system" ] + Type string `json:"type,omitempty"` + + // Cluster profile version + Version int32 `json:"version,omitempty"` +} + +// Validate validates this v1 spectro cluster profile spec +func (m *V1SpectroClusterProfileSpec) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validatePacks(formats); err != nil { + res = append(res, err) + } + + if err := m.validateRelatedObject(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1SpectroClusterProfileSpec) validatePacks(formats strfmt.Registry) error { + + if swag.IsZero(m.Packs) { // not required + return nil + } + + if err := validate.UniqueItems("packs", "body", m.Packs); err != nil { + return err + } + + for i := 0; i < len(m.Packs); i++ { + if swag.IsZero(m.Packs[i]) { // not required + continue + } + + if m.Packs[i] != nil { + if err := m.Packs[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("packs" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1SpectroClusterProfileSpec) validateRelatedObject(formats strfmt.Registry) error { + + if swag.IsZero(m.RelatedObject) { // not required + return nil + } + + if m.RelatedObject != nil { + if err := m.RelatedObject.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("relatedObject") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1SpectroClusterProfileSpec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1SpectroClusterProfileSpec) UnmarshalBinary(b []byte) error { + var res V1SpectroClusterProfileSpec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_spectro_cluster_profile_updates.go b/api/models/v1_spectro_cluster_profile_updates.go new file mode 100644 index 00000000..02508824 --- /dev/null +++ b/api/models/v1_spectro_cluster_profile_updates.go @@ -0,0 +1,86 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1SpectroClusterProfileUpdates v1 spectro cluster profile updates +// +// swagger:model v1SpectroClusterProfileUpdates +type V1SpectroClusterProfileUpdates struct { + + // profiles + // Unique: true + Profiles []*V1ClusterProfileTemplate `json:"profiles"` +} + +// Validate validates this v1 spectro cluster profile updates +func (m *V1SpectroClusterProfileUpdates) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateProfiles(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1SpectroClusterProfileUpdates) validateProfiles(formats strfmt.Registry) error { + + if swag.IsZero(m.Profiles) { // not required + return nil + } + + if err := validate.UniqueItems("profiles", "body", m.Profiles); err != nil { + return err + } + + for i := 0; i < len(m.Profiles); i++ { + if swag.IsZero(m.Profiles[i]) { // not required + continue + } + + if m.Profiles[i] != nil { + if err := m.Profiles[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("profiles" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1SpectroClusterProfileUpdates) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1SpectroClusterProfileUpdates) UnmarshalBinary(b []byte) error { + var res V1SpectroClusterProfileUpdates + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_spectro_cluster_profile_validator_response.go b/api/models/v1_spectro_cluster_profile_validator_response.go new file mode 100644 index 00000000..cb59a6b7 --- /dev/null +++ b/api/models/v1_spectro_cluster_profile_validator_response.go @@ -0,0 +1,74 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1SpectroClusterProfileValidatorResponse Cluster profile validator response +// +// swagger:model v1SpectroClusterProfileValidatorResponse +type V1SpectroClusterProfileValidatorResponse struct { + + // packs + Packs *V1ConstraintValidatorResponse `json:"packs,omitempty"` + + // Cluster profile uid + UID string `json:"uid,omitempty"` +} + +// Validate validates this v1 spectro cluster profile validator response +func (m *V1SpectroClusterProfileValidatorResponse) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validatePacks(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1SpectroClusterProfileValidatorResponse) validatePacks(formats strfmt.Registry) error { + + if swag.IsZero(m.Packs) { // not required + return nil + } + + if m.Packs != nil { + if err := m.Packs.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("packs") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1SpectroClusterProfileValidatorResponse) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1SpectroClusterProfileValidatorResponse) UnmarshalBinary(b []byte) error { + var res V1SpectroClusterProfileValidatorResponse + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_spectro_cluster_profiles.go b/api/models/v1_spectro_cluster_profiles.go new file mode 100644 index 00000000..f11c65c1 --- /dev/null +++ b/api/models/v1_spectro_cluster_profiles.go @@ -0,0 +1,107 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1SpectroClusterProfiles v1 spectro cluster profiles +// +// swagger:model v1SpectroClusterProfiles +type V1SpectroClusterProfiles struct { + + // profiles + // Required: true + Profiles []*V1SpectroClusterProfileEntity `json:"profiles"` + + // spc apply settings + SpcApplySettings *V1SpcApplySettings `json:"spcApplySettings,omitempty"` +} + +// Validate validates this v1 spectro cluster profiles +func (m *V1SpectroClusterProfiles) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateProfiles(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSpcApplySettings(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1SpectroClusterProfiles) validateProfiles(formats strfmt.Registry) error { + + if err := validate.Required("profiles", "body", m.Profiles); err != nil { + return err + } + + for i := 0; i < len(m.Profiles); i++ { + if swag.IsZero(m.Profiles[i]) { // not required + continue + } + + if m.Profiles[i] != nil { + if err := m.Profiles[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("profiles" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1SpectroClusterProfiles) validateSpcApplySettings(formats strfmt.Registry) error { + + if swag.IsZero(m.SpcApplySettings) { // not required + return nil + } + + if m.SpcApplySettings != nil { + if err := m.SpcApplySettings.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spcApplySettings") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1SpectroClusterProfiles) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1SpectroClusterProfiles) UnmarshalBinary(b []byte) error { + var res V1SpectroClusterProfiles + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_spectro_cluster_profiles_delete_entity.go b/api/models/v1_spectro_cluster_profiles_delete_entity.go new file mode 100644 index 00000000..e2449484 --- /dev/null +++ b/api/models/v1_spectro_cluster_profiles_delete_entity.go @@ -0,0 +1,68 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1SpectroClusterProfilesDeleteEntity v1 spectro cluster profiles delete entity +// +// swagger:model v1SpectroClusterProfilesDeleteEntity +type V1SpectroClusterProfilesDeleteEntity struct { + + // Cluster's profile uid list + // Unique: true + ProfileUids []string `json:"profileUids"` +} + +// Validate validates this v1 spectro cluster profiles delete entity +func (m *V1SpectroClusterProfilesDeleteEntity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateProfileUids(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1SpectroClusterProfilesDeleteEntity) validateProfileUids(formats strfmt.Registry) error { + + if swag.IsZero(m.ProfileUids) { // not required + return nil + } + + if err := validate.UniqueItems("profileUids", "body", m.ProfileUids); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1SpectroClusterProfilesDeleteEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1SpectroClusterProfilesDeleteEntity) UnmarshalBinary(b []byte) error { + var res V1SpectroClusterProfilesDeleteEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_spectro_cluster_profiles_packs_manifests.go b/api/models/v1_spectro_cluster_profiles_packs_manifests.go new file mode 100644 index 00000000..198551d7 --- /dev/null +++ b/api/models/v1_spectro_cluster_profiles_packs_manifests.go @@ -0,0 +1,82 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1SpectroClusterProfilesPacksManifests v1 spectro cluster profiles packs manifests +// +// swagger:model v1SpectroClusterProfilesPacksManifests +type V1SpectroClusterProfilesPacksManifests struct { + + // profiles + // Required: true + Profiles []*V1ClusterProfilePacksManifests `json:"profiles"` +} + +// Validate validates this v1 spectro cluster profiles packs manifests +func (m *V1SpectroClusterProfilesPacksManifests) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateProfiles(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1SpectroClusterProfilesPacksManifests) validateProfiles(formats strfmt.Registry) error { + + if err := validate.Required("profiles", "body", m.Profiles); err != nil { + return err + } + + for i := 0; i < len(m.Profiles); i++ { + if swag.IsZero(m.Profiles[i]) { // not required + continue + } + + if m.Profiles[i] != nil { + if err := m.Profiles[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("profiles" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1SpectroClusterProfilesPacksManifests) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1SpectroClusterProfilesPacksManifests) UnmarshalBinary(b []byte) error { + var res V1SpectroClusterProfilesPacksManifests + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_spectro_cluster_profiles_param_reference_entity.go b/api/models/v1_spectro_cluster_profiles_param_reference_entity.go new file mode 100644 index 00000000..05b18746 --- /dev/null +++ b/api/models/v1_spectro_cluster_profiles_param_reference_entity.go @@ -0,0 +1,68 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1SpectroClusterProfilesParamReferenceEntity Cluster profiles param reference entity +// +// swagger:model v1SpectroClusterProfilesParamReferenceEntity +type V1SpectroClusterProfilesParamReferenceEntity struct { + + // references + // Unique: true + References []string `json:"references"` +} + +// Validate validates this v1 spectro cluster profiles param reference entity +func (m *V1SpectroClusterProfilesParamReferenceEntity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateReferences(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1SpectroClusterProfilesParamReferenceEntity) validateReferences(formats strfmt.Registry) error { + + if swag.IsZero(m.References) { // not required + return nil + } + + if err := validate.UniqueItems("references", "body", m.References); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1SpectroClusterProfilesParamReferenceEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1SpectroClusterProfilesParamReferenceEntity) UnmarshalBinary(b []byte) error { + var res V1SpectroClusterProfilesParamReferenceEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_spectro_cluster_profiles_resolved_values.go b/api/models/v1_spectro_cluster_profiles_resolved_values.go new file mode 100644 index 00000000..54d394cb --- /dev/null +++ b/api/models/v1_spectro_cluster_profiles_resolved_values.go @@ -0,0 +1,86 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1SpectroClusterProfilesResolvedValues Cluster profiles resolved values response +// +// swagger:model v1SpectroClusterProfilesResolvedValues +type V1SpectroClusterProfilesResolvedValues struct { + + // profiles + // Unique: true + Profiles []*V1ProfileResolvedValues `json:"profiles"` +} + +// Validate validates this v1 spectro cluster profiles resolved values +func (m *V1SpectroClusterProfilesResolvedValues) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateProfiles(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1SpectroClusterProfilesResolvedValues) validateProfiles(formats strfmt.Registry) error { + + if swag.IsZero(m.Profiles) { // not required + return nil + } + + if err := validate.UniqueItems("profiles", "body", m.Profiles); err != nil { + return err + } + + for i := 0; i < len(m.Profiles); i++ { + if swag.IsZero(m.Profiles[i]) { // not required + continue + } + + if m.Profiles[i] != nil { + if err := m.Profiles[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("profiles" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1SpectroClusterProfilesResolvedValues) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1SpectroClusterProfilesResolvedValues) UnmarshalBinary(b []byte) error { + var res V1SpectroClusterProfilesResolvedValues + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_spectro_cluster_rate.go b/api/models/v1_spectro_cluster_rate.go new file mode 100644 index 00000000..7d98e99a --- /dev/null +++ b/api/models/v1_spectro_cluster_rate.go @@ -0,0 +1,133 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1SpectroClusterRate Cluster estimated rate information +// +// swagger:model v1SpectroClusterRate +type V1SpectroClusterRate struct { + + // machine pools + MachinePools []*V1MachinePoolRate `json:"machinePools"` + + // name + Name string `json:"name,omitempty"` + + // rate + Rate *V1TotalClusterRate `json:"rate,omitempty"` + + // resource metadata + ResourceMetadata *V1CloudResourceMetadata `json:"resourceMetadata,omitempty"` +} + +// Validate validates this v1 spectro cluster rate +func (m *V1SpectroClusterRate) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMachinePools(formats); err != nil { + res = append(res, err) + } + + if err := m.validateRate(formats); err != nil { + res = append(res, err) + } + + if err := m.validateResourceMetadata(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1SpectroClusterRate) validateMachinePools(formats strfmt.Registry) error { + + if swag.IsZero(m.MachinePools) { // not required + return nil + } + + for i := 0; i < len(m.MachinePools); i++ { + if swag.IsZero(m.MachinePools[i]) { // not required + continue + } + + if m.MachinePools[i] != nil { + if err := m.MachinePools[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("machinePools" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1SpectroClusterRate) validateRate(formats strfmt.Registry) error { + + if swag.IsZero(m.Rate) { // not required + return nil + } + + if m.Rate != nil { + if err := m.Rate.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("rate") + } + return err + } + } + + return nil +} + +func (m *V1SpectroClusterRate) validateResourceMetadata(formats strfmt.Registry) error { + + if swag.IsZero(m.ResourceMetadata) { // not required + return nil + } + + if m.ResourceMetadata != nil { + if err := m.ResourceMetadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("resourceMetadata") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1SpectroClusterRate) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1SpectroClusterRate) UnmarshalBinary(b []byte) error { + var res V1SpectroClusterRate + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_spectro_cluster_repave.go b/api/models/v1_spectro_cluster_repave.go new file mode 100644 index 00000000..8f500304 --- /dev/null +++ b/api/models/v1_spectro_cluster_repave.go @@ -0,0 +1,121 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1SpectroClusterRepave Spectro cluster repave status information +// +// swagger:model v1SpectroClusterRepave +type V1SpectroClusterRepave struct { + + // metadata + Metadata *V1ObjectMeta `json:"metadata,omitempty"` + + // spec + Spec *V1SpectroClusterRepaveSpec `json:"spec,omitempty"` + + // status + Status *V1SpectroClusterRepaveStatus `json:"status,omitempty"` +} + +// Validate validates this v1 spectro cluster repave +func (m *V1SpectroClusterRepave) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSpec(formats); err != nil { + res = append(res, err) + } + + if err := m.validateStatus(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1SpectroClusterRepave) validateMetadata(formats strfmt.Registry) error { + + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } + return err + } + } + + return nil +} + +func (m *V1SpectroClusterRepave) validateSpec(formats strfmt.Registry) error { + + if swag.IsZero(m.Spec) { // not required + return nil + } + + if m.Spec != nil { + if err := m.Spec.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec") + } + return err + } + } + + return nil +} + +func (m *V1SpectroClusterRepave) validateStatus(formats strfmt.Registry) error { + + if swag.IsZero(m.Status) { // not required + return nil + } + + if m.Status != nil { + if err := m.Status.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("status") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1SpectroClusterRepave) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1SpectroClusterRepave) UnmarshalBinary(b []byte) error { + var res V1SpectroClusterRepave + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_spectro_cluster_repave_reason.go b/api/models/v1_spectro_cluster_repave_reason.go new file mode 100644 index 00000000..95959570 --- /dev/null +++ b/api/models/v1_spectro_cluster_repave_reason.go @@ -0,0 +1,77 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1SpectroClusterRepaveReason Cluster repave reason description +// +// swagger:model v1SpectroClusterRepaveReason +type V1SpectroClusterRepaveReason struct { + + // code + Code string `json:"code,omitempty"` + + // message + Message string `json:"message,omitempty"` + + // pack + Pack *V1SpectroClusterPackDiff `json:"pack,omitempty"` +} + +// Validate validates this v1 spectro cluster repave reason +func (m *V1SpectroClusterRepaveReason) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validatePack(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1SpectroClusterRepaveReason) validatePack(formats strfmt.Registry) error { + + if swag.IsZero(m.Pack) { // not required + return nil + } + + if m.Pack != nil { + if err := m.Pack.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("pack") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1SpectroClusterRepaveReason) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1SpectroClusterRepaveReason) UnmarshalBinary(b []byte) error { + var res V1SpectroClusterRepaveReason + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_spectro_cluster_repave_spec.go b/api/models/v1_spectro_cluster_repave_spec.go new file mode 100644 index 00000000..e10cdb47 --- /dev/null +++ b/api/models/v1_spectro_cluster_repave_spec.go @@ -0,0 +1,106 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1SpectroClusterRepaveSpec v1 spectro cluster repave spec +// +// swagger:model v1SpectroClusterRepaveSpec +type V1SpectroClusterRepaveSpec struct { + + // Spectro cluster repave reasons + Reasons []*V1SpectroClusterRepaveReason `json:"reasons"` + + // source + Source V1ClusterRepaveSource `json:"source,omitempty"` + + // spectro cluster Uid + SpectroClusterUID string `json:"spectroClusterUid,omitempty"` +} + +// Validate validates this v1 spectro cluster repave spec +func (m *V1SpectroClusterRepaveSpec) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateReasons(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSource(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1SpectroClusterRepaveSpec) validateReasons(formats strfmt.Registry) error { + + if swag.IsZero(m.Reasons) { // not required + return nil + } + + for i := 0; i < len(m.Reasons); i++ { + if swag.IsZero(m.Reasons[i]) { // not required + continue + } + + if m.Reasons[i] != nil { + if err := m.Reasons[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("reasons" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1SpectroClusterRepaveSpec) validateSource(formats strfmt.Registry) error { + + if swag.IsZero(m.Source) { // not required + return nil + } + + if err := m.Source.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("source") + } + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1SpectroClusterRepaveSpec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1SpectroClusterRepaveSpec) UnmarshalBinary(b []byte) error { + var res V1SpectroClusterRepaveSpec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_spectro_cluster_repave_status.go b/api/models/v1_spectro_cluster_repave_status.go new file mode 100644 index 00000000..7e79725c --- /dev/null +++ b/api/models/v1_spectro_cluster_repave_status.go @@ -0,0 +1,96 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1SpectroClusterRepaveStatus v1 spectro cluster repave status +// +// swagger:model v1SpectroClusterRepaveStatus +type V1SpectroClusterRepaveStatus struct { + + // message + Message string `json:"message,omitempty"` + + // repave transition time + // Format: date-time + RepaveTransitionTime V1Time `json:"repaveTransitionTime,omitempty"` + + // state + State V1ClusterRepaveState `json:"state,omitempty"` +} + +// Validate validates this v1 spectro cluster repave status +func (m *V1SpectroClusterRepaveStatus) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateRepaveTransitionTime(formats); err != nil { + res = append(res, err) + } + + if err := m.validateState(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1SpectroClusterRepaveStatus) validateRepaveTransitionTime(formats strfmt.Registry) error { + + if swag.IsZero(m.RepaveTransitionTime) { // not required + return nil + } + + if err := m.RepaveTransitionTime.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("repaveTransitionTime") + } + return err + } + + return nil +} + +func (m *V1SpectroClusterRepaveStatus) validateState(formats strfmt.Registry) error { + + if swag.IsZero(m.State) { // not required + return nil + } + + if err := m.State.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("state") + } + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1SpectroClusterRepaveStatus) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1SpectroClusterRepaveStatus) UnmarshalBinary(b []byte) error { + var res V1SpectroClusterRepaveStatus + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_spectro_cluster_repave_validation_response.go b/api/models/v1_spectro_cluster_repave_validation_response.go new file mode 100644 index 00000000..6054f7a8 --- /dev/null +++ b/api/models/v1_spectro_cluster_repave_validation_response.go @@ -0,0 +1,83 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1SpectroClusterRepaveValidationResponse Cluster repave validation response +// +// swagger:model v1SpectroClusterRepaveValidationResponse +type V1SpectroClusterRepaveValidationResponse struct { + + // If true then the pack changes can cause cluster repave + IsRepaveRequired bool `json:"isRepaveRequired"` + + // reasons + Reasons []*V1SpectroClusterRepaveReason `json:"reasons"` +} + +// Validate validates this v1 spectro cluster repave validation response +func (m *V1SpectroClusterRepaveValidationResponse) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateReasons(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1SpectroClusterRepaveValidationResponse) validateReasons(formats strfmt.Registry) error { + + if swag.IsZero(m.Reasons) { // not required + return nil + } + + for i := 0; i < len(m.Reasons); i++ { + if swag.IsZero(m.Reasons[i]) { // not required + continue + } + + if m.Reasons[i] != nil { + if err := m.Reasons[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("reasons" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1SpectroClusterRepaveValidationResponse) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1SpectroClusterRepaveValidationResponse) UnmarshalBinary(b []byte) error { + var res V1SpectroClusterRepaveValidationResponse + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_spectro_cluster_spec.go b/api/models/v1_spectro_cluster_spec.go new file mode 100644 index 00000000..ca47e9f6 --- /dev/null +++ b/api/models/v1_spectro_cluster_spec.go @@ -0,0 +1,192 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "encoding/json" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1SpectroClusterSpec SpectroClusterSpec defines the desired state of SpectroCluster +// +// swagger:model v1SpectroClusterSpec +type V1SpectroClusterSpec struct { + + // CloudConfigRef point to the cloud configuration for the cluster, input by user Ref types are: AwsCloudConfig/VsphereCloudConfig/BaremetalConfig/ etc this user config will be used to generate cloud specific cluster/machine spec for cluster-api For VM, it will contain information needed to launch VMs, like cloud account, instance type For BM, it will contain actual baremetal machines + CloudConfigRef *V1ObjectReference `json:"cloudConfigRef,omitempty"` + + // cloud type + CloudType string `json:"cloudType,omitempty"` + + // ClusterConfig is the configuration related to a general cluster. Configuration related to the health of the cluster. + ClusterConfig *V1ClusterConfig `json:"clusterConfig,omitempty"` + + // When a cluster created from a clusterprofile at t1, ClusterProfileTemplate is a copy of the draft version or latest published version of the clusterprofileSpec.clusterprofileTemplate then clusterprofile may evolve to v2 at t2, but before user decide to upgrade the cluster, it will stay as it is when user decide to upgrade, clusterProfileTemplate will be updated from the clusterprofile pointed by ClusterProfileRef + ClusterProfileTemplates []*V1ClusterProfileTemplate `json:"clusterProfileTemplates"` + + // cluster type + // Enum: [PureManage AlloyMonitor AlloyAssist AlloyExtend] + ClusterType string `json:"clusterType,omitempty"` +} + +// Validate validates this v1 spectro cluster spec +func (m *V1SpectroClusterSpec) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateCloudConfigRef(formats); err != nil { + res = append(res, err) + } + + if err := m.validateClusterConfig(formats); err != nil { + res = append(res, err) + } + + if err := m.validateClusterProfileTemplates(formats); err != nil { + res = append(res, err) + } + + if err := m.validateClusterType(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1SpectroClusterSpec) validateCloudConfigRef(formats strfmt.Registry) error { + + if swag.IsZero(m.CloudConfigRef) { // not required + return nil + } + + if m.CloudConfigRef != nil { + if err := m.CloudConfigRef.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("cloudConfigRef") + } + return err + } + } + + return nil +} + +func (m *V1SpectroClusterSpec) validateClusterConfig(formats strfmt.Registry) error { + + if swag.IsZero(m.ClusterConfig) { // not required + return nil + } + + if m.ClusterConfig != nil { + if err := m.ClusterConfig.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("clusterConfig") + } + return err + } + } + + return nil +} + +func (m *V1SpectroClusterSpec) validateClusterProfileTemplates(formats strfmt.Registry) error { + + if swag.IsZero(m.ClusterProfileTemplates) { // not required + return nil + } + + for i := 0; i < len(m.ClusterProfileTemplates); i++ { + if swag.IsZero(m.ClusterProfileTemplates[i]) { // not required + continue + } + + if m.ClusterProfileTemplates[i] != nil { + if err := m.ClusterProfileTemplates[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("clusterProfileTemplates" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +var v1SpectroClusterSpecTypeClusterTypePropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["PureManage","AlloyMonitor","AlloyAssist","AlloyExtend"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + v1SpectroClusterSpecTypeClusterTypePropEnum = append(v1SpectroClusterSpecTypeClusterTypePropEnum, v) + } +} + +const ( + + // V1SpectroClusterSpecClusterTypePureManage captures enum value "PureManage" + V1SpectroClusterSpecClusterTypePureManage string = "PureManage" + + // V1SpectroClusterSpecClusterTypeAlloyMonitor captures enum value "AlloyMonitor" + V1SpectroClusterSpecClusterTypeAlloyMonitor string = "AlloyMonitor" + + // V1SpectroClusterSpecClusterTypeAlloyAssist captures enum value "AlloyAssist" + V1SpectroClusterSpecClusterTypeAlloyAssist string = "AlloyAssist" + + // V1SpectroClusterSpecClusterTypeAlloyExtend captures enum value "AlloyExtend" + V1SpectroClusterSpecClusterTypeAlloyExtend string = "AlloyExtend" +) + +// prop value enum +func (m *V1SpectroClusterSpec) validateClusterTypeEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, v1SpectroClusterSpecTypeClusterTypePropEnum, true); err != nil { + return err + } + return nil +} + +func (m *V1SpectroClusterSpec) validateClusterType(formats strfmt.Registry) error { + + if swag.IsZero(m.ClusterType) { // not required + return nil + } + + // value enum + if err := m.validateClusterTypeEnum("clusterType", "body", m.ClusterType); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1SpectroClusterSpec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1SpectroClusterSpec) UnmarshalBinary(b []byte) error { + var res V1SpectroClusterSpec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_spectro_cluster_state.go b/api/models/v1_spectro_cluster_state.go new file mode 100644 index 00000000..6da2b64c --- /dev/null +++ b/api/models/v1_spectro_cluster_state.go @@ -0,0 +1,43 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1SpectroClusterState Spectrocluster state entity +// +// swagger:model v1SpectroClusterState +type V1SpectroClusterState struct { + + // Spectrocluster state + State string `json:"state,omitempty"` +} + +// Validate validates this v1 spectro cluster state +func (m *V1SpectroClusterState) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1SpectroClusterState) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1SpectroClusterState) UnmarshalBinary(b []byte) error { + var res V1SpectroClusterState + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_spectro_cluster_status.go b/api/models/v1_spectro_cluster_status.go new file mode 100644 index 00000000..b722ef65 --- /dev/null +++ b/api/models/v1_spectro_cluster_status.go @@ -0,0 +1,442 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1SpectroClusterStatus SpectroClusterStatus +// +// swagger:model v1SpectroClusterStatus +type V1SpectroClusterStatus struct { + + // abort timestamp + // Format: date-time + AbortTimestamp V1Time `json:"abortTimestamp,omitempty"` + + // add on services + AddOnServices []*V1SpectroClusterAddOnService `json:"addOnServices"` + + // api endpoints + APIEndpoints []*V1APIEndpoint `json:"apiEndpoints"` + + // cluster import + ClusterImport *V1ClusterImport `json:"clusterImport,omitempty"` + + // conditions + Conditions []*V1ClusterCondition `json:"conditions"` + + // fips + Fips *V1ClusterFips `json:"fips,omitempty"` + + // location + Location *V1ClusterLocation `json:"location,omitempty"` + + // packs + Packs []*V1ClusterPackStatus `json:"packs"` + + // profile status + ProfileStatus *V1ProfileStatus `json:"profileStatus,omitempty"` + + // repave + Repave *V1ClusterRepaveStatus `json:"repave,omitempty"` + + // services + Services []*V1LoadBalancerService `json:"services"` + + // spc apply + SpcApply *V1SpcApply `json:"spcApply,omitempty"` + + // current operational state + State string `json:"state,omitempty"` + + // upgrades + Upgrades []*V1Upgrades `json:"upgrades"` + + // virtual + Virtual *V1Virtual `json:"virtual,omitempty"` +} + +// Validate validates this v1 spectro cluster status +func (m *V1SpectroClusterStatus) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateAbortTimestamp(formats); err != nil { + res = append(res, err) + } + + if err := m.validateAddOnServices(formats); err != nil { + res = append(res, err) + } + + if err := m.validateAPIEndpoints(formats); err != nil { + res = append(res, err) + } + + if err := m.validateClusterImport(formats); err != nil { + res = append(res, err) + } + + if err := m.validateConditions(formats); err != nil { + res = append(res, err) + } + + if err := m.validateFips(formats); err != nil { + res = append(res, err) + } + + if err := m.validateLocation(formats); err != nil { + res = append(res, err) + } + + if err := m.validatePacks(formats); err != nil { + res = append(res, err) + } + + if err := m.validateProfileStatus(formats); err != nil { + res = append(res, err) + } + + if err := m.validateRepave(formats); err != nil { + res = append(res, err) + } + + if err := m.validateServices(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSpcApply(formats); err != nil { + res = append(res, err) + } + + if err := m.validateUpgrades(formats); err != nil { + res = append(res, err) + } + + if err := m.validateVirtual(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1SpectroClusterStatus) validateAbortTimestamp(formats strfmt.Registry) error { + + if swag.IsZero(m.AbortTimestamp) { // not required + return nil + } + + if err := m.AbortTimestamp.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("abortTimestamp") + } + return err + } + + return nil +} + +func (m *V1SpectroClusterStatus) validateAddOnServices(formats strfmt.Registry) error { + + if swag.IsZero(m.AddOnServices) { // not required + return nil + } + + for i := 0; i < len(m.AddOnServices); i++ { + if swag.IsZero(m.AddOnServices[i]) { // not required + continue + } + + if m.AddOnServices[i] != nil { + if err := m.AddOnServices[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("addOnServices" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1SpectroClusterStatus) validateAPIEndpoints(formats strfmt.Registry) error { + + if swag.IsZero(m.APIEndpoints) { // not required + return nil + } + + for i := 0; i < len(m.APIEndpoints); i++ { + if swag.IsZero(m.APIEndpoints[i]) { // not required + continue + } + + if m.APIEndpoints[i] != nil { + if err := m.APIEndpoints[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("apiEndpoints" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1SpectroClusterStatus) validateClusterImport(formats strfmt.Registry) error { + + if swag.IsZero(m.ClusterImport) { // not required + return nil + } + + if m.ClusterImport != nil { + if err := m.ClusterImport.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("clusterImport") + } + return err + } + } + + return nil +} + +func (m *V1SpectroClusterStatus) validateConditions(formats strfmt.Registry) error { + + if swag.IsZero(m.Conditions) { // not required + return nil + } + + for i := 0; i < len(m.Conditions); i++ { + if swag.IsZero(m.Conditions[i]) { // not required + continue + } + + if m.Conditions[i] != nil { + if err := m.Conditions[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("conditions" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1SpectroClusterStatus) validateFips(formats strfmt.Registry) error { + + if swag.IsZero(m.Fips) { // not required + return nil + } + + if m.Fips != nil { + if err := m.Fips.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("fips") + } + return err + } + } + + return nil +} + +func (m *V1SpectroClusterStatus) validateLocation(formats strfmt.Registry) error { + + if swag.IsZero(m.Location) { // not required + return nil + } + + if m.Location != nil { + if err := m.Location.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("location") + } + return err + } + } + + return nil +} + +func (m *V1SpectroClusterStatus) validatePacks(formats strfmt.Registry) error { + + if swag.IsZero(m.Packs) { // not required + return nil + } + + for i := 0; i < len(m.Packs); i++ { + if swag.IsZero(m.Packs[i]) { // not required + continue + } + + if m.Packs[i] != nil { + if err := m.Packs[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("packs" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1SpectroClusterStatus) validateProfileStatus(formats strfmt.Registry) error { + + if swag.IsZero(m.ProfileStatus) { // not required + return nil + } + + if m.ProfileStatus != nil { + if err := m.ProfileStatus.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("profileStatus") + } + return err + } + } + + return nil +} + +func (m *V1SpectroClusterStatus) validateRepave(formats strfmt.Registry) error { + + if swag.IsZero(m.Repave) { // not required + return nil + } + + if m.Repave != nil { + if err := m.Repave.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("repave") + } + return err + } + } + + return nil +} + +func (m *V1SpectroClusterStatus) validateServices(formats strfmt.Registry) error { + + if swag.IsZero(m.Services) { // not required + return nil + } + + for i := 0; i < len(m.Services); i++ { + if swag.IsZero(m.Services[i]) { // not required + continue + } + + if m.Services[i] != nil { + if err := m.Services[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("services" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1SpectroClusterStatus) validateSpcApply(formats strfmt.Registry) error { + + if swag.IsZero(m.SpcApply) { // not required + return nil + } + + if m.SpcApply != nil { + if err := m.SpcApply.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spcApply") + } + return err + } + } + + return nil +} + +func (m *V1SpectroClusterStatus) validateUpgrades(formats strfmt.Registry) error { + + if swag.IsZero(m.Upgrades) { // not required + return nil + } + + for i := 0; i < len(m.Upgrades); i++ { + if swag.IsZero(m.Upgrades[i]) { // not required + continue + } + + if m.Upgrades[i] != nil { + if err := m.Upgrades[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("upgrades" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1SpectroClusterStatus) validateVirtual(formats strfmt.Registry) error { + + if swag.IsZero(m.Virtual) { // not required + return nil + } + + if m.Virtual != nil { + if err := m.Virtual.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("virtual") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1SpectroClusterStatus) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1SpectroClusterStatus) UnmarshalBinary(b []byte) error { + var res V1SpectroClusterStatus + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_spectro_cluster_status_entity.go b/api/models/v1_spectro_cluster_status_entity.go new file mode 100644 index 00000000..eaa41332 --- /dev/null +++ b/api/models/v1_spectro_cluster_status_entity.go @@ -0,0 +1,71 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1SpectroClusterStatusEntity Spectrocluster status entity +// +// swagger:model v1SpectroClusterStatusEntity +type V1SpectroClusterStatusEntity struct { + + // status + Status *V1SpectroClusterState `json:"status,omitempty"` +} + +// Validate validates this v1 spectro cluster status entity +func (m *V1SpectroClusterStatusEntity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateStatus(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1SpectroClusterStatusEntity) validateStatus(formats strfmt.Registry) error { + + if swag.IsZero(m.Status) { // not required + return nil + } + + if m.Status != nil { + if err := m.Status.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("status") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1SpectroClusterStatusEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1SpectroClusterStatusEntity) UnmarshalBinary(b []byte) error { + var res V1SpectroClusterStatusEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_spectro_cluster_summary.go b/api/models/v1_spectro_cluster_summary.go new file mode 100644 index 00000000..d1c018bd --- /dev/null +++ b/api/models/v1_spectro_cluster_summary.go @@ -0,0 +1,628 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1SpectroClusterSummary Spectro cluster summary +// +// swagger:model v1SpectroClusterSummary +type V1SpectroClusterSummary struct { + + // metadata + Metadata *V1ObjectMeta `json:"metadata,omitempty"` + + // spec summary + SpecSummary *V1SpectroClusterSummarySpecSummary `json:"specSummary,omitempty"` + + // status + Status *V1SpectroClusterSummaryStatus `json:"status,omitempty"` +} + +// Validate validates this v1 spectro cluster summary +func (m *V1SpectroClusterSummary) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSpecSummary(formats); err != nil { + res = append(res, err) + } + + if err := m.validateStatus(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1SpectroClusterSummary) validateMetadata(formats strfmt.Registry) error { + + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } + return err + } + } + + return nil +} + +func (m *V1SpectroClusterSummary) validateSpecSummary(formats strfmt.Registry) error { + + if swag.IsZero(m.SpecSummary) { // not required + return nil + } + + if m.SpecSummary != nil { + if err := m.SpecSummary.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("specSummary") + } + return err + } + } + + return nil +} + +func (m *V1SpectroClusterSummary) validateStatus(formats strfmt.Registry) error { + + if swag.IsZero(m.Status) { // not required + return nil + } + + if m.Status != nil { + if err := m.Status.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("status") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1SpectroClusterSummary) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1SpectroClusterSummary) UnmarshalBinary(b []byte) error { + var res V1SpectroClusterSummary + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} + +// V1SpectroClusterSummarySpecSummary Spectro cluster spec summary +// +// swagger:model V1SpectroClusterSummarySpecSummary +type V1SpectroClusterSummarySpecSummary struct { + + // Architecture type of the cluster + ArchTypes []V1ArchType `json:"archTypes"` + + // cloud account meta + CloudAccountMeta *V1CloudAccountMeta `json:"cloudAccountMeta,omitempty"` + + // cloud config + CloudConfig *V1CloudConfigMeta `json:"cloudConfig,omitempty"` + + // cluster config + ClusterConfig *V1ClusterConfigResponse `json:"clusterConfig,omitempty"` + + // cluster profile template + ClusterProfileTemplate *V1ClusterProfileTemplateMeta `json:"clusterProfileTemplate,omitempty"` + + // cluster profile templates + ClusterProfileTemplates []*V1ClusterProfileTemplateMeta `json:"clusterProfileTemplates"` + + // project meta + ProjectMeta *V1ProjectMeta `json:"projectMeta,omitempty"` +} + +// Validate validates this v1 spectro cluster summary spec summary +func (m *V1SpectroClusterSummarySpecSummary) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateArchTypes(formats); err != nil { + res = append(res, err) + } + + if err := m.validateCloudAccountMeta(formats); err != nil { + res = append(res, err) + } + + if err := m.validateCloudConfig(formats); err != nil { + res = append(res, err) + } + + if err := m.validateClusterConfig(formats); err != nil { + res = append(res, err) + } + + if err := m.validateClusterProfileTemplate(formats); err != nil { + res = append(res, err) + } + + if err := m.validateClusterProfileTemplates(formats); err != nil { + res = append(res, err) + } + + if err := m.validateProjectMeta(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1SpectroClusterSummarySpecSummary) validateArchTypes(formats strfmt.Registry) error { + + if swag.IsZero(m.ArchTypes) { // not required + return nil + } + + for i := 0; i < len(m.ArchTypes); i++ { + + if err := m.ArchTypes[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("specSummary" + "." + "archTypes" + "." + strconv.Itoa(i)) + } + return err + } + + } + + return nil +} + +func (m *V1SpectroClusterSummarySpecSummary) validateCloudAccountMeta(formats strfmt.Registry) error { + + if swag.IsZero(m.CloudAccountMeta) { // not required + return nil + } + + if m.CloudAccountMeta != nil { + if err := m.CloudAccountMeta.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("specSummary" + "." + "cloudAccountMeta") + } + return err + } + } + + return nil +} + +func (m *V1SpectroClusterSummarySpecSummary) validateCloudConfig(formats strfmt.Registry) error { + + if swag.IsZero(m.CloudConfig) { // not required + return nil + } + + if m.CloudConfig != nil { + if err := m.CloudConfig.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("specSummary" + "." + "cloudConfig") + } + return err + } + } + + return nil +} + +func (m *V1SpectroClusterSummarySpecSummary) validateClusterConfig(formats strfmt.Registry) error { + + if swag.IsZero(m.ClusterConfig) { // not required + return nil + } + + if m.ClusterConfig != nil { + if err := m.ClusterConfig.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("specSummary" + "." + "clusterConfig") + } + return err + } + } + + return nil +} + +func (m *V1SpectroClusterSummarySpecSummary) validateClusterProfileTemplate(formats strfmt.Registry) error { + + if swag.IsZero(m.ClusterProfileTemplate) { // not required + return nil + } + + if m.ClusterProfileTemplate != nil { + if err := m.ClusterProfileTemplate.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("specSummary" + "." + "clusterProfileTemplate") + } + return err + } + } + + return nil +} + +func (m *V1SpectroClusterSummarySpecSummary) validateClusterProfileTemplates(formats strfmt.Registry) error { + + if swag.IsZero(m.ClusterProfileTemplates) { // not required + return nil + } + + for i := 0; i < len(m.ClusterProfileTemplates); i++ { + if swag.IsZero(m.ClusterProfileTemplates[i]) { // not required + continue + } + + if m.ClusterProfileTemplates[i] != nil { + if err := m.ClusterProfileTemplates[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("specSummary" + "." + "clusterProfileTemplates" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1SpectroClusterSummarySpecSummary) validateProjectMeta(formats strfmt.Registry) error { + + if swag.IsZero(m.ProjectMeta) { // not required + return nil + } + + if m.ProjectMeta != nil { + if err := m.ProjectMeta.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("specSummary" + "." + "projectMeta") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1SpectroClusterSummarySpecSummary) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1SpectroClusterSummarySpecSummary) UnmarshalBinary(b []byte) error { + var res V1SpectroClusterSummarySpecSummary + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} + +// V1SpectroClusterSummaryStatus Spectro cluster status summary +// +// swagger:model V1SpectroClusterSummaryStatus +type V1SpectroClusterSummaryStatus struct { + + // cluster import + ClusterImport *V1ClusterImport `json:"clusterImport,omitempty"` + + // cost + Cost *V1ResourceCost `json:"cost,omitempty"` + + // fips + Fips *V1ClusterFips `json:"fips,omitempty"` + + // health + Health *V1SpectroClusterHealthStatus `json:"health,omitempty"` + + // hourly rate + HourlyRate *V1ResourceCost `json:"hourlyRate,omitempty"` + + // location + Location *V1ClusterMetaSpecLocation `json:"location,omitempty"` + + // metrics + Metrics *V1SpectroClusterMetrics `json:"metrics,omitempty"` + + // notifications + Notifications *V1ClusterNotificationStatus `json:"notifications,omitempty"` + + // repave + Repave *V1ClusterRepaveStatus `json:"repave,omitempty"` + + // state + State string `json:"state,omitempty"` + + // virtual + Virtual *V1Virtual `json:"virtual,omitempty"` +} + +// Validate validates this v1 spectro cluster summary status +func (m *V1SpectroClusterSummaryStatus) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateClusterImport(formats); err != nil { + res = append(res, err) + } + + if err := m.validateCost(formats); err != nil { + res = append(res, err) + } + + if err := m.validateFips(formats); err != nil { + res = append(res, err) + } + + if err := m.validateHealth(formats); err != nil { + res = append(res, err) + } + + if err := m.validateHourlyRate(formats); err != nil { + res = append(res, err) + } + + if err := m.validateLocation(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMetrics(formats); err != nil { + res = append(res, err) + } + + if err := m.validateNotifications(formats); err != nil { + res = append(res, err) + } + + if err := m.validateRepave(formats); err != nil { + res = append(res, err) + } + + if err := m.validateVirtual(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1SpectroClusterSummaryStatus) validateClusterImport(formats strfmt.Registry) error { + + if swag.IsZero(m.ClusterImport) { // not required + return nil + } + + if m.ClusterImport != nil { + if err := m.ClusterImport.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("status" + "." + "clusterImport") + } + return err + } + } + + return nil +} + +func (m *V1SpectroClusterSummaryStatus) validateCost(formats strfmt.Registry) error { + + if swag.IsZero(m.Cost) { // not required + return nil + } + + if m.Cost != nil { + if err := m.Cost.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("status" + "." + "cost") + } + return err + } + } + + return nil +} + +func (m *V1SpectroClusterSummaryStatus) validateFips(formats strfmt.Registry) error { + + if swag.IsZero(m.Fips) { // not required + return nil + } + + if m.Fips != nil { + if err := m.Fips.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("status" + "." + "fips") + } + return err + } + } + + return nil +} + +func (m *V1SpectroClusterSummaryStatus) validateHealth(formats strfmt.Registry) error { + + if swag.IsZero(m.Health) { // not required + return nil + } + + if m.Health != nil { + if err := m.Health.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("status" + "." + "health") + } + return err + } + } + + return nil +} + +func (m *V1SpectroClusterSummaryStatus) validateHourlyRate(formats strfmt.Registry) error { + + if swag.IsZero(m.HourlyRate) { // not required + return nil + } + + if m.HourlyRate != nil { + if err := m.HourlyRate.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("status" + "." + "hourlyRate") + } + return err + } + } + + return nil +} + +func (m *V1SpectroClusterSummaryStatus) validateLocation(formats strfmt.Registry) error { + + if swag.IsZero(m.Location) { // not required + return nil + } + + if m.Location != nil { + if err := m.Location.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("status" + "." + "location") + } + return err + } + } + + return nil +} + +func (m *V1SpectroClusterSummaryStatus) validateMetrics(formats strfmt.Registry) error { + + if swag.IsZero(m.Metrics) { // not required + return nil + } + + if m.Metrics != nil { + if err := m.Metrics.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("status" + "." + "metrics") + } + return err + } + } + + return nil +} + +func (m *V1SpectroClusterSummaryStatus) validateNotifications(formats strfmt.Registry) error { + + if swag.IsZero(m.Notifications) { // not required + return nil + } + + if m.Notifications != nil { + if err := m.Notifications.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("status" + "." + "notifications") + } + return err + } + } + + return nil +} + +func (m *V1SpectroClusterSummaryStatus) validateRepave(formats strfmt.Registry) error { + + if swag.IsZero(m.Repave) { // not required + return nil + } + + if m.Repave != nil { + if err := m.Repave.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("status" + "." + "repave") + } + return err + } + } + + return nil +} + +func (m *V1SpectroClusterSummaryStatus) validateVirtual(formats strfmt.Registry) error { + + if swag.IsZero(m.Virtual) { // not required + return nil + } + + if m.Virtual != nil { + if err := m.Virtual.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("status" + "." + "virtual") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1SpectroClusterSummaryStatus) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1SpectroClusterSummaryStatus) UnmarshalBinary(b []byte) error { + var res V1SpectroClusterSummaryStatus + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_spectro_cluster_uid_status_summary.go b/api/models/v1_spectro_cluster_uid_status_summary.go new file mode 100644 index 00000000..2e388498 --- /dev/null +++ b/api/models/v1_spectro_cluster_uid_status_summary.go @@ -0,0 +1,574 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1SpectroClusterUIDStatusSummary Spectro cluster status summary +// +// swagger:model v1SpectroClusterUidStatusSummary +type V1SpectroClusterUIDStatusSummary struct { + + // abort timestamp + // Format: date-time + AbortTimestamp V1Time `json:"abortTimestamp,omitempty"` + + // add on services + AddOnServices []*V1SpectroClusterAddOnServiceSummary `json:"addOnServices"` + + // api endpoints + APIEndpoints []*V1APIEndpoint `json:"apiEndpoints"` + + // cluster import + ClusterImport *V1ClusterImport `json:"clusterImport,omitempty"` + + // conditions + Conditions []*V1ClusterCondition `json:"conditions"` + + // cost + Cost *V1ResourceCost `json:"cost,omitempty"` + + // fips + Fips *V1ClusterFips `json:"fips,omitempty"` + + // health + Health *V1SpectroClusterHealthStatus `json:"health,omitempty"` + + // hourly rate + HourlyRate *V1ResourceCost `json:"hourlyRate,omitempty"` + + // kube meta + KubeMeta *V1KubeMeta `json:"kubeMeta,omitempty"` + + // location + Location *V1ClusterMetaSpecLocation `json:"location,omitempty"` + + // metrics + Metrics *V1SpectroClusterMetrics `json:"metrics,omitempty"` + + // notifications + Notifications *V1ClusterNotificationStatus `json:"notifications,omitempty"` + + // packs + Packs []*V1ClusterPackStatus `json:"packs"` + + // services + Services []*V1LoadBalancerService `json:"services"` + + // spc apply + SpcApply *V1SpcApply `json:"spcApply,omitempty"` + + // current operational state + State string `json:"state,omitempty"` + + // upgrades + Upgrades []*V1Upgrades `json:"upgrades"` + + // virtual + Virtual *V1Virtual `json:"virtual,omitempty"` + + // workspaces + Workspaces []*V1ResourceReference `json:"workspaces"` +} + +// Validate validates this v1 spectro cluster Uid status summary +func (m *V1SpectroClusterUIDStatusSummary) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateAbortTimestamp(formats); err != nil { + res = append(res, err) + } + + if err := m.validateAddOnServices(formats); err != nil { + res = append(res, err) + } + + if err := m.validateAPIEndpoints(formats); err != nil { + res = append(res, err) + } + + if err := m.validateClusterImport(formats); err != nil { + res = append(res, err) + } + + if err := m.validateConditions(formats); err != nil { + res = append(res, err) + } + + if err := m.validateCost(formats); err != nil { + res = append(res, err) + } + + if err := m.validateFips(formats); err != nil { + res = append(res, err) + } + + if err := m.validateHealth(formats); err != nil { + res = append(res, err) + } + + if err := m.validateHourlyRate(formats); err != nil { + res = append(res, err) + } + + if err := m.validateKubeMeta(formats); err != nil { + res = append(res, err) + } + + if err := m.validateLocation(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMetrics(formats); err != nil { + res = append(res, err) + } + + if err := m.validateNotifications(formats); err != nil { + res = append(res, err) + } + + if err := m.validatePacks(formats); err != nil { + res = append(res, err) + } + + if err := m.validateServices(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSpcApply(formats); err != nil { + res = append(res, err) + } + + if err := m.validateUpgrades(formats); err != nil { + res = append(res, err) + } + + if err := m.validateVirtual(formats); err != nil { + res = append(res, err) + } + + if err := m.validateWorkspaces(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1SpectroClusterUIDStatusSummary) validateAbortTimestamp(formats strfmt.Registry) error { + + if swag.IsZero(m.AbortTimestamp) { // not required + return nil + } + + if err := m.AbortTimestamp.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("abortTimestamp") + } + return err + } + + return nil +} + +func (m *V1SpectroClusterUIDStatusSummary) validateAddOnServices(formats strfmt.Registry) error { + + if swag.IsZero(m.AddOnServices) { // not required + return nil + } + + for i := 0; i < len(m.AddOnServices); i++ { + if swag.IsZero(m.AddOnServices[i]) { // not required + continue + } + + if m.AddOnServices[i] != nil { + if err := m.AddOnServices[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("addOnServices" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1SpectroClusterUIDStatusSummary) validateAPIEndpoints(formats strfmt.Registry) error { + + if swag.IsZero(m.APIEndpoints) { // not required + return nil + } + + for i := 0; i < len(m.APIEndpoints); i++ { + if swag.IsZero(m.APIEndpoints[i]) { // not required + continue + } + + if m.APIEndpoints[i] != nil { + if err := m.APIEndpoints[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("apiEndpoints" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1SpectroClusterUIDStatusSummary) validateClusterImport(formats strfmt.Registry) error { + + if swag.IsZero(m.ClusterImport) { // not required + return nil + } + + if m.ClusterImport != nil { + if err := m.ClusterImport.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("clusterImport") + } + return err + } + } + + return nil +} + +func (m *V1SpectroClusterUIDStatusSummary) validateConditions(formats strfmt.Registry) error { + + if swag.IsZero(m.Conditions) { // not required + return nil + } + + for i := 0; i < len(m.Conditions); i++ { + if swag.IsZero(m.Conditions[i]) { // not required + continue + } + + if m.Conditions[i] != nil { + if err := m.Conditions[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("conditions" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1SpectroClusterUIDStatusSummary) validateCost(formats strfmt.Registry) error { + + if swag.IsZero(m.Cost) { // not required + return nil + } + + if m.Cost != nil { + if err := m.Cost.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("cost") + } + return err + } + } + + return nil +} + +func (m *V1SpectroClusterUIDStatusSummary) validateFips(formats strfmt.Registry) error { + + if swag.IsZero(m.Fips) { // not required + return nil + } + + if m.Fips != nil { + if err := m.Fips.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("fips") + } + return err + } + } + + return nil +} + +func (m *V1SpectroClusterUIDStatusSummary) validateHealth(formats strfmt.Registry) error { + + if swag.IsZero(m.Health) { // not required + return nil + } + + if m.Health != nil { + if err := m.Health.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("health") + } + return err + } + } + + return nil +} + +func (m *V1SpectroClusterUIDStatusSummary) validateHourlyRate(formats strfmt.Registry) error { + + if swag.IsZero(m.HourlyRate) { // not required + return nil + } + + if m.HourlyRate != nil { + if err := m.HourlyRate.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("hourlyRate") + } + return err + } + } + + return nil +} + +func (m *V1SpectroClusterUIDStatusSummary) validateKubeMeta(formats strfmt.Registry) error { + + if swag.IsZero(m.KubeMeta) { // not required + return nil + } + + if m.KubeMeta != nil { + if err := m.KubeMeta.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("kubeMeta") + } + return err + } + } + + return nil +} + +func (m *V1SpectroClusterUIDStatusSummary) validateLocation(formats strfmt.Registry) error { + + if swag.IsZero(m.Location) { // not required + return nil + } + + if m.Location != nil { + if err := m.Location.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("location") + } + return err + } + } + + return nil +} + +func (m *V1SpectroClusterUIDStatusSummary) validateMetrics(formats strfmt.Registry) error { + + if swag.IsZero(m.Metrics) { // not required + return nil + } + + if m.Metrics != nil { + if err := m.Metrics.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metrics") + } + return err + } + } + + return nil +} + +func (m *V1SpectroClusterUIDStatusSummary) validateNotifications(formats strfmt.Registry) error { + + if swag.IsZero(m.Notifications) { // not required + return nil + } + + if m.Notifications != nil { + if err := m.Notifications.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("notifications") + } + return err + } + } + + return nil +} + +func (m *V1SpectroClusterUIDStatusSummary) validatePacks(formats strfmt.Registry) error { + + if swag.IsZero(m.Packs) { // not required + return nil + } + + for i := 0; i < len(m.Packs); i++ { + if swag.IsZero(m.Packs[i]) { // not required + continue + } + + if m.Packs[i] != nil { + if err := m.Packs[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("packs" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1SpectroClusterUIDStatusSummary) validateServices(formats strfmt.Registry) error { + + if swag.IsZero(m.Services) { // not required + return nil + } + + for i := 0; i < len(m.Services); i++ { + if swag.IsZero(m.Services[i]) { // not required + continue + } + + if m.Services[i] != nil { + if err := m.Services[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("services" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1SpectroClusterUIDStatusSummary) validateSpcApply(formats strfmt.Registry) error { + + if swag.IsZero(m.SpcApply) { // not required + return nil + } + + if m.SpcApply != nil { + if err := m.SpcApply.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spcApply") + } + return err + } + } + + return nil +} + +func (m *V1SpectroClusterUIDStatusSummary) validateUpgrades(formats strfmt.Registry) error { + + if swag.IsZero(m.Upgrades) { // not required + return nil + } + + for i := 0; i < len(m.Upgrades); i++ { + if swag.IsZero(m.Upgrades[i]) { // not required + continue + } + + if m.Upgrades[i] != nil { + if err := m.Upgrades[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("upgrades" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1SpectroClusterUIDStatusSummary) validateVirtual(formats strfmt.Registry) error { + + if swag.IsZero(m.Virtual) { // not required + return nil + } + + if m.Virtual != nil { + if err := m.Virtual.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("virtual") + } + return err + } + } + + return nil +} + +func (m *V1SpectroClusterUIDStatusSummary) validateWorkspaces(formats strfmt.Registry) error { + + if swag.IsZero(m.Workspaces) { // not required + return nil + } + + for i := 0; i < len(m.Workspaces); i++ { + if swag.IsZero(m.Workspaces[i]) { // not required + continue + } + + if m.Workspaces[i] != nil { + if err := m.Workspaces[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("workspaces" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1SpectroClusterUIDStatusSummary) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1SpectroClusterUIDStatusSummary) UnmarshalBinary(b []byte) error { + var res V1SpectroClusterUIDStatusSummary + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_spectro_cluster_uid_summary.go b/api/models/v1_spectro_cluster_uid_summary.go new file mode 100644 index 00000000..741f5ab6 --- /dev/null +++ b/api/models/v1_spectro_cluster_uid_summary.go @@ -0,0 +1,291 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1SpectroClusterUIDSummary Spectro cluster summary +// +// swagger:model v1SpectroClusterUidSummary +type V1SpectroClusterUIDSummary struct { + + // metadata + Metadata *V1ObjectMeta `json:"metadata,omitempty"` + + // spec + Spec *V1SpectroClusterUIDSummarySpec `json:"spec,omitempty"` + + // status + Status *V1SpectroClusterUIDStatusSummary `json:"status,omitempty"` +} + +// Validate validates this v1 spectro cluster Uid summary +func (m *V1SpectroClusterUIDSummary) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSpec(formats); err != nil { + res = append(res, err) + } + + if err := m.validateStatus(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1SpectroClusterUIDSummary) validateMetadata(formats strfmt.Registry) error { + + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } + return err + } + } + + return nil +} + +func (m *V1SpectroClusterUIDSummary) validateSpec(formats strfmt.Registry) error { + + if swag.IsZero(m.Spec) { // not required + return nil + } + + if m.Spec != nil { + if err := m.Spec.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec") + } + return err + } + } + + return nil +} + +func (m *V1SpectroClusterUIDSummary) validateStatus(formats strfmt.Registry) error { + + if swag.IsZero(m.Status) { // not required + return nil + } + + if m.Status != nil { + if err := m.Status.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("status") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1SpectroClusterUIDSummary) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1SpectroClusterUIDSummary) UnmarshalBinary(b []byte) error { + var res V1SpectroClusterUIDSummary + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} + +// V1SpectroClusterUIDSummarySpec Spectro cluster spec summary +// +// swagger:model V1SpectroClusterUIDSummarySpec +type V1SpectroClusterUIDSummarySpec struct { + + // Architecture types of the cluster + ArchTypes []V1ArchType `json:"archTypes"` + + // cloud config + CloudConfig *V1CloudConfigMeta `json:"cloudConfig,omitempty"` + + // cloudaccount + Cloudaccount *V1CloudAccountMeta `json:"cloudaccount,omitempty"` + + // cluster profile template + ClusterProfileTemplate *V1ClusterProfileTemplateMeta `json:"clusterProfileTemplate,omitempty"` + + // cluster profile templates + ClusterProfileTemplates []*V1ClusterProfileTemplateMeta `json:"clusterProfileTemplates"` +} + +// Validate validates this v1 spectro cluster UID summary spec +func (m *V1SpectroClusterUIDSummarySpec) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateArchTypes(formats); err != nil { + res = append(res, err) + } + + if err := m.validateCloudConfig(formats); err != nil { + res = append(res, err) + } + + if err := m.validateCloudaccount(formats); err != nil { + res = append(res, err) + } + + if err := m.validateClusterProfileTemplate(formats); err != nil { + res = append(res, err) + } + + if err := m.validateClusterProfileTemplates(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1SpectroClusterUIDSummarySpec) validateArchTypes(formats strfmt.Registry) error { + + if swag.IsZero(m.ArchTypes) { // not required + return nil + } + + for i := 0; i < len(m.ArchTypes); i++ { + + if err := m.ArchTypes[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec" + "." + "archTypes" + "." + strconv.Itoa(i)) + } + return err + } + + } + + return nil +} + +func (m *V1SpectroClusterUIDSummarySpec) validateCloudConfig(formats strfmt.Registry) error { + + if swag.IsZero(m.CloudConfig) { // not required + return nil + } + + if m.CloudConfig != nil { + if err := m.CloudConfig.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec" + "." + "cloudConfig") + } + return err + } + } + + return nil +} + +func (m *V1SpectroClusterUIDSummarySpec) validateCloudaccount(formats strfmt.Registry) error { + + if swag.IsZero(m.Cloudaccount) { // not required + return nil + } + + if m.Cloudaccount != nil { + if err := m.Cloudaccount.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec" + "." + "cloudaccount") + } + return err + } + } + + return nil +} + +func (m *V1SpectroClusterUIDSummarySpec) validateClusterProfileTemplate(formats strfmt.Registry) error { + + if swag.IsZero(m.ClusterProfileTemplate) { // not required + return nil + } + + if m.ClusterProfileTemplate != nil { + if err := m.ClusterProfileTemplate.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec" + "." + "clusterProfileTemplate") + } + return err + } + } + + return nil +} + +func (m *V1SpectroClusterUIDSummarySpec) validateClusterProfileTemplates(formats strfmt.Registry) error { + + if swag.IsZero(m.ClusterProfileTemplates) { // not required + return nil + } + + for i := 0; i < len(m.ClusterProfileTemplates); i++ { + if swag.IsZero(m.ClusterProfileTemplates[i]) { // not required + continue + } + + if m.ClusterProfileTemplates[i] != nil { + if err := m.ClusterProfileTemplates[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec" + "." + "clusterProfileTemplates" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1SpectroClusterUIDSummarySpec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1SpectroClusterUIDSummarySpec) UnmarshalBinary(b []byte) error { + var res V1SpectroClusterUIDSummarySpec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_spectro_cluster_uid_upgrades.go b/api/models/v1_spectro_cluster_uid_upgrades.go new file mode 100644 index 00000000..4ce30404 --- /dev/null +++ b/api/models/v1_spectro_cluster_uid_upgrades.go @@ -0,0 +1,80 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1SpectroClusterUIDUpgrades Cluster status upgrades +// +// swagger:model v1SpectroClusterUidUpgrades +type V1SpectroClusterUIDUpgrades struct { + + // upgrades + Upgrades []*V1Upgrades `json:"upgrades"` +} + +// Validate validates this v1 spectro cluster Uid upgrades +func (m *V1SpectroClusterUIDUpgrades) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateUpgrades(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1SpectroClusterUIDUpgrades) validateUpgrades(formats strfmt.Registry) error { + + if swag.IsZero(m.Upgrades) { // not required + return nil + } + + for i := 0; i < len(m.Upgrades); i++ { + if swag.IsZero(m.Upgrades[i]) { // not required + continue + } + + if m.Upgrades[i] != nil { + if err := m.Upgrades[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("upgrades" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1SpectroClusterUIDUpgrades) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1SpectroClusterUIDUpgrades) UnmarshalBinary(b []byte) error { + var res V1SpectroClusterUIDUpgrades + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_spectro_cluster_validator_response.go b/api/models/v1_spectro_cluster_validator_response.go new file mode 100644 index 00000000..503cdb5e --- /dev/null +++ b/api/models/v1_spectro_cluster_validator_response.go @@ -0,0 +1,111 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1SpectroClusterValidatorResponse Cluster validator response +// +// swagger:model v1SpectroClusterValidatorResponse +type V1SpectroClusterValidatorResponse struct { + + // machine pools + MachinePools *V1ConstraintValidatorResponse `json:"machinePools,omitempty"` + + // profiles + // Unique: true + Profiles []*V1SpectroClusterProfileValidatorResponse `json:"profiles"` +} + +// Validate validates this v1 spectro cluster validator response +func (m *V1SpectroClusterValidatorResponse) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMachinePools(formats); err != nil { + res = append(res, err) + } + + if err := m.validateProfiles(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1SpectroClusterValidatorResponse) validateMachinePools(formats strfmt.Registry) error { + + if swag.IsZero(m.MachinePools) { // not required + return nil + } + + if m.MachinePools != nil { + if err := m.MachinePools.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("machinePools") + } + return err + } + } + + return nil +} + +func (m *V1SpectroClusterValidatorResponse) validateProfiles(formats strfmt.Registry) error { + + if swag.IsZero(m.Profiles) { // not required + return nil + } + + if err := validate.UniqueItems("profiles", "body", m.Profiles); err != nil { + return err + } + + for i := 0; i < len(m.Profiles); i++ { + if swag.IsZero(m.Profiles[i]) { // not required + continue + } + + if m.Profiles[i] != nil { + if err := m.Profiles[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("profiles" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1SpectroClusterValidatorResponse) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1SpectroClusterValidatorResponse) UnmarshalBinary(b []byte) error { + var res V1SpectroClusterValidatorResponse + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_spectro_cluster_variable.go b/api/models/v1_spectro_cluster_variable.go new file mode 100644 index 00000000..eb96d136 --- /dev/null +++ b/api/models/v1_spectro_cluster_variable.go @@ -0,0 +1,67 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1SpectroClusterVariable Variable with value which will be used within the packs of cluster profile +// +// swagger:model v1SpectroClusterVariable +type V1SpectroClusterVariable struct { + + // Variable name + // Required: true + Name *string `json:"name"` + + // Actual value of the variable to be used within the cluster + Value string `json:"value,omitempty"` +} + +// Validate validates this v1 spectro cluster variable +func (m *V1SpectroClusterVariable) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateName(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1SpectroClusterVariable) validateName(formats strfmt.Registry) error { + + if err := validate.Required("name", "body", m.Name); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1SpectroClusterVariable) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1SpectroClusterVariable) UnmarshalBinary(b []byte) error { + var res V1SpectroClusterVariable + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_spectro_cluster_vm_clone_entity.go b/api/models/v1_spectro_cluster_vm_clone_entity.go new file mode 100644 index 00000000..c34b5c14 --- /dev/null +++ b/api/models/v1_spectro_cluster_vm_clone_entity.go @@ -0,0 +1,76 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1SpectroClusterVMCloneEntity v1 spectro cluster VM clone entity +// +// swagger:model v1SpectroClusterVMCloneEntity +type V1SpectroClusterVMCloneEntity struct { + + // Annotation filters + AnnotationFilters []string `json:"annotationFilters"` + + // Cloning Virtual machine's name + // Required: true + CloneName *string `json:"cloneName"` + + // Label filters + LabelFilters []string `json:"labelFilters"` + + // NewMacAddresses manually sets that target interfaces' mac addresses. The key is the interface name and the value is the new mac address. If this field is not specified, a new MAC address will be generated automatically, as for any interface that is not included in this map + NewMacAddresses map[string]string `json:"newMacAddresses,omitempty"` + + // NewSMBiosSerial manually sets that target's SMbios serial. If this field is not specified, a new serial will be generated automatically. + NewSMBiosSerial string `json:"newSMBiosSerial,omitempty"` +} + +// Validate validates this v1 spectro cluster VM clone entity +func (m *V1SpectroClusterVMCloneEntity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateCloneName(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1SpectroClusterVMCloneEntity) validateCloneName(formats strfmt.Registry) error { + + if err := validate.Required("cloneName", "body", m.CloneName); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1SpectroClusterVMCloneEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1SpectroClusterVMCloneEntity) UnmarshalBinary(b []byte) error { + var res V1SpectroClusterVMCloneEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_spectro_clusters_agents_notify_entity.go b/api/models/v1_spectro_clusters_agents_notify_entity.go new file mode 100644 index 00000000..df1cb0fb --- /dev/null +++ b/api/models/v1_spectro_clusters_agents_notify_entity.go @@ -0,0 +1,46 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1SpectroClustersAgentsNotifyEntity SpectroClusters for which agents has to be notified +// +// swagger:model v1SpectroClustersAgentsNotifyEntity +type V1SpectroClustersAgentsNotifyEntity struct { + + // cluster uids + ClusterUids []string `json:"clusterUids"` + + // notify all clusters + NotifyAllClusters bool `json:"notifyAllClusters,omitempty"` +} + +// Validate validates this v1 spectro clusters agents notify entity +func (m *V1SpectroClustersAgentsNotifyEntity) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1SpectroClustersAgentsNotifyEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1SpectroClustersAgentsNotifyEntity) UnmarshalBinary(b []byte) error { + var res V1SpectroClustersAgentsNotifyEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_spectro_clusters_health.go b/api/models/v1_spectro_clusters_health.go new file mode 100644 index 00000000..5df75aaa --- /dev/null +++ b/api/models/v1_spectro_clusters_health.go @@ -0,0 +1,52 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1SpectroClustersHealth Spectro Clusters health data +// +// swagger:model v1SpectroClustersHealth +type V1SpectroClustersHealth struct { + + // errored + Errored int32 `json:"errored"` + + // healthy + Healthy int32 `json:"healthy"` + + // running + Running int32 `json:"running"` + + // unhealthy + Unhealthy int32 `json:"unhealthy"` +} + +// Validate validates this v1 spectro clusters health +func (m *V1SpectroClustersHealth) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1SpectroClustersHealth) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1SpectroClustersHealth) UnmarshalBinary(b []byte) error { + var res V1SpectroClustersHealth + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_spectro_clusters_metadata.go b/api/models/v1_spectro_clusters_metadata.go new file mode 100644 index 00000000..612d5c9b --- /dev/null +++ b/api/models/v1_spectro_clusters_metadata.go @@ -0,0 +1,87 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1SpectroClustersMetadata v1 spectro clusters metadata +// +// swagger:model v1SpectroClustersMetadata +type V1SpectroClustersMetadata struct { + + // items + // Required: true + // Unique: true + Items []*V1ObjectMeta `json:"items"` +} + +// Validate validates this v1 spectro clusters metadata +func (m *V1SpectroClustersMetadata) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateItems(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1SpectroClustersMetadata) validateItems(formats strfmt.Registry) error { + + if err := validate.Required("items", "body", m.Items); err != nil { + return err + } + + if err := validate.UniqueItems("items", "body", m.Items); err != nil { + return err + } + + for i := 0; i < len(m.Items); i++ { + if swag.IsZero(m.Items[i]) { // not required + continue + } + + if m.Items[i] != nil { + if err := m.Items[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("items" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1SpectroClustersMetadata) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1SpectroClustersMetadata) UnmarshalBinary(b []byte) error { + var res V1SpectroClustersMetadata + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_spectro_clusters_metadata_search.go b/api/models/v1_spectro_clusters_metadata_search.go new file mode 100644 index 00000000..6a60da35 --- /dev/null +++ b/api/models/v1_spectro_clusters_metadata_search.go @@ -0,0 +1,112 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1SpectroClustersMetadataSearch v1 spectro clusters metadata search +// +// swagger:model v1SpectroClustersMetadataSearch +type V1SpectroClustersMetadataSearch struct { + + // items + // Required: true + // Unique: true + Items []*V1SpectroClusterMetaSummary `json:"items"` + + // listmeta + Listmeta *V1ListMetaData `json:"listmeta,omitempty"` +} + +// Validate validates this v1 spectro clusters metadata search +func (m *V1SpectroClustersMetadataSearch) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateItems(formats); err != nil { + res = append(res, err) + } + + if err := m.validateListmeta(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1SpectroClustersMetadataSearch) validateItems(formats strfmt.Registry) error { + + if err := validate.Required("items", "body", m.Items); err != nil { + return err + } + + if err := validate.UniqueItems("items", "body", m.Items); err != nil { + return err + } + + for i := 0; i < len(m.Items); i++ { + if swag.IsZero(m.Items[i]) { // not required + continue + } + + if m.Items[i] != nil { + if err := m.Items[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("items" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1SpectroClustersMetadataSearch) validateListmeta(formats strfmt.Registry) error { + + if swag.IsZero(m.Listmeta) { // not required + return nil + } + + if m.Listmeta != nil { + if err := m.Listmeta.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("listmeta") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1SpectroClustersMetadataSearch) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1SpectroClustersMetadataSearch) UnmarshalBinary(b []byte) error { + var res V1SpectroClustersMetadataSearch + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_spectro_clusters_summary.go b/api/models/v1_spectro_clusters_summary.go new file mode 100644 index 00000000..922bce6f --- /dev/null +++ b/api/models/v1_spectro_clusters_summary.go @@ -0,0 +1,112 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1SpectroClustersSummary v1 spectro clusters summary +// +// swagger:model v1SpectroClustersSummary +type V1SpectroClustersSummary struct { + + // items + // Required: true + // Unique: true + Items []*V1SpectroClusterSummary `json:"items"` + + // listmeta + Listmeta *V1ListMetaData `json:"listmeta,omitempty"` +} + +// Validate validates this v1 spectro clusters summary +func (m *V1SpectroClustersSummary) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateItems(formats); err != nil { + res = append(res, err) + } + + if err := m.validateListmeta(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1SpectroClustersSummary) validateItems(formats strfmt.Registry) error { + + if err := validate.Required("items", "body", m.Items); err != nil { + return err + } + + if err := validate.UniqueItems("items", "body", m.Items); err != nil { + return err + } + + for i := 0; i < len(m.Items); i++ { + if swag.IsZero(m.Items[i]) { // not required + continue + } + + if m.Items[i] != nil { + if err := m.Items[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("items" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1SpectroClustersSummary) validateListmeta(formats strfmt.Registry) error { + + if swag.IsZero(m.Listmeta) { // not required + return nil + } + + if m.Listmeta != nil { + if err := m.Listmeta.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("listmeta") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1SpectroClustersSummary) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1SpectroClustersSummary) UnmarshalBinary(b []byte) error { + var res V1SpectroClustersSummary + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_spectro_cox_edge_cluster_entity.go b/api/models/v1_spectro_cox_edge_cluster_entity.go new file mode 100644 index 00000000..dc3dbc23 --- /dev/null +++ b/api/models/v1_spectro_cox_edge_cluster_entity.go @@ -0,0 +1,339 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1SpectroCoxEdgeClusterEntity CoxEdge cluster request payload for create and update +// +// swagger:model v1SpectroCoxEdgeClusterEntity +type V1SpectroCoxEdgeClusterEntity struct { + + // metadata + Metadata *V1ObjectMeta `json:"metadata,omitempty"` + + // spec + Spec *V1SpectroCoxEdgeClusterEntitySpec `json:"spec,omitempty"` +} + +// Validate validates this v1 spectro cox edge cluster entity +func (m *V1SpectroCoxEdgeClusterEntity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSpec(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1SpectroCoxEdgeClusterEntity) validateMetadata(formats strfmt.Registry) error { + + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } + return err + } + } + + return nil +} + +func (m *V1SpectroCoxEdgeClusterEntity) validateSpec(formats strfmt.Registry) error { + + if swag.IsZero(m.Spec) { // not required + return nil + } + + if m.Spec != nil { + if err := m.Spec.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1SpectroCoxEdgeClusterEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1SpectroCoxEdgeClusterEntity) UnmarshalBinary(b []byte) error { + var res V1SpectroCoxEdgeClusterEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} + +// V1SpectroCoxEdgeClusterEntitySpec v1 spectro cox edge cluster entity spec +// +// swagger:model V1SpectroCoxEdgeClusterEntitySpec +type V1SpectroCoxEdgeClusterEntitySpec struct { + + // Cloud account uid to be used for cluster provisioning + // Required: true + CloudAccountUID *string `json:"cloudAccountUid"` + + // cloud config + // Required: true + CloudConfig *V1CoxEdgeClusterConfig `json:"cloudConfig"` + + // cloud type + // Required: true + CloudType *string `json:"cloudType"` + + // General cluster configuration like health, patching settings, namespace resource allocation, rbac + ClusterConfig *V1ClusterConfigEntity `json:"clusterConfig,omitempty"` + + // machinepoolconfig + Machinepoolconfig []*V1CoxEdgeMachinePoolConfigEntity `json:"machinepoolconfig"` + + // policies + Policies *V1SpectroClusterPolicies `json:"policies,omitempty"` + + // profiles + Profiles []*V1SpectroClusterProfileEntity `json:"profiles"` + + // variables + Variables []*V1SpectroClusterVariable `json:"variables"` +} + +// Validate validates this v1 spectro cox edge cluster entity spec +func (m *V1SpectroCoxEdgeClusterEntitySpec) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateCloudAccountUID(formats); err != nil { + res = append(res, err) + } + + if err := m.validateCloudConfig(formats); err != nil { + res = append(res, err) + } + + if err := m.validateCloudType(formats); err != nil { + res = append(res, err) + } + + if err := m.validateClusterConfig(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMachinepoolconfig(formats); err != nil { + res = append(res, err) + } + + if err := m.validatePolicies(formats); err != nil { + res = append(res, err) + } + + if err := m.validateProfiles(formats); err != nil { + res = append(res, err) + } + + if err := m.validateVariables(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1SpectroCoxEdgeClusterEntitySpec) validateCloudAccountUID(formats strfmt.Registry) error { + + if err := validate.Required("spec"+"."+"cloudAccountUid", "body", m.CloudAccountUID); err != nil { + return err + } + + return nil +} + +func (m *V1SpectroCoxEdgeClusterEntitySpec) validateCloudConfig(formats strfmt.Registry) error { + + if err := validate.Required("spec"+"."+"cloudConfig", "body", m.CloudConfig); err != nil { + return err + } + + if m.CloudConfig != nil { + if err := m.CloudConfig.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec" + "." + "cloudConfig") + } + return err + } + } + + return nil +} + +func (m *V1SpectroCoxEdgeClusterEntitySpec) validateCloudType(formats strfmt.Registry) error { + + if err := validate.Required("spec"+"."+"cloudType", "body", m.CloudType); err != nil { + return err + } + + return nil +} + +func (m *V1SpectroCoxEdgeClusterEntitySpec) validateClusterConfig(formats strfmt.Registry) error { + + if swag.IsZero(m.ClusterConfig) { // not required + return nil + } + + if m.ClusterConfig != nil { + if err := m.ClusterConfig.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec" + "." + "clusterConfig") + } + return err + } + } + + return nil +} + +func (m *V1SpectroCoxEdgeClusterEntitySpec) validateMachinepoolconfig(formats strfmt.Registry) error { + + if swag.IsZero(m.Machinepoolconfig) { // not required + return nil + } + + for i := 0; i < len(m.Machinepoolconfig); i++ { + if swag.IsZero(m.Machinepoolconfig[i]) { // not required + continue + } + + if m.Machinepoolconfig[i] != nil { + if err := m.Machinepoolconfig[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec" + "." + "machinepoolconfig" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1SpectroCoxEdgeClusterEntitySpec) validatePolicies(formats strfmt.Registry) error { + + if swag.IsZero(m.Policies) { // not required + return nil + } + + if m.Policies != nil { + if err := m.Policies.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec" + "." + "policies") + } + return err + } + } + + return nil +} + +func (m *V1SpectroCoxEdgeClusterEntitySpec) validateProfiles(formats strfmt.Registry) error { + + if swag.IsZero(m.Profiles) { // not required + return nil + } + + for i := 0; i < len(m.Profiles); i++ { + if swag.IsZero(m.Profiles[i]) { // not required + continue + } + + if m.Profiles[i] != nil { + if err := m.Profiles[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec" + "." + "profiles" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1SpectroCoxEdgeClusterEntitySpec) validateVariables(formats strfmt.Registry) error { + + if swag.IsZero(m.Variables) { // not required + return nil + } + + for i := 0; i < len(m.Variables); i++ { + if swag.IsZero(m.Variables[i]) { // not required + continue + } + + if m.Variables[i] != nil { + if err := m.Variables[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec" + "." + "variables" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1SpectroCoxEdgeClusterEntitySpec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1SpectroCoxEdgeClusterEntitySpec) UnmarshalBinary(b []byte) error { + var res V1SpectroCoxEdgeClusterEntitySpec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_spectro_cox_edge_cluster_rate_entity.go b/api/models/v1_spectro_cox_edge_cluster_rate_entity.go new file mode 100644 index 00000000..987d971e --- /dev/null +++ b/api/models/v1_spectro_cox_edge_cluster_rate_entity.go @@ -0,0 +1,105 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1SpectroCoxEdgeClusterRateEntity Cox Edge cluster request payload for estimating rate +// +// swagger:model v1SpectroCoxEdgeClusterRateEntity +type V1SpectroCoxEdgeClusterRateEntity struct { + + // cloud config + CloudConfig *V1CoxEdgeClusterConfig `json:"cloudConfig,omitempty"` + + // machinepoolconfig + Machinepoolconfig []*V1CoxEdgeMachinePoolConfigEntity `json:"machinepoolconfig"` +} + +// Validate validates this v1 spectro cox edge cluster rate entity +func (m *V1SpectroCoxEdgeClusterRateEntity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateCloudConfig(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMachinepoolconfig(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1SpectroCoxEdgeClusterRateEntity) validateCloudConfig(formats strfmt.Registry) error { + + if swag.IsZero(m.CloudConfig) { // not required + return nil + } + + if m.CloudConfig != nil { + if err := m.CloudConfig.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("cloudConfig") + } + return err + } + } + + return nil +} + +func (m *V1SpectroCoxEdgeClusterRateEntity) validateMachinepoolconfig(formats strfmt.Registry) error { + + if swag.IsZero(m.Machinepoolconfig) { // not required + return nil + } + + for i := 0; i < len(m.Machinepoolconfig); i++ { + if swag.IsZero(m.Machinepoolconfig[i]) { // not required + continue + } + + if m.Machinepoolconfig[i] != nil { + if err := m.Machinepoolconfig[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("machinepoolconfig" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1SpectroCoxEdgeClusterRateEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1SpectroCoxEdgeClusterRateEntity) UnmarshalBinary(b []byte) error { + var res V1SpectroCoxEdgeClusterRateEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_spectro_custom_cluster_entity.go b/api/models/v1_spectro_custom_cluster_entity.go new file mode 100644 index 00000000..f78b5973 --- /dev/null +++ b/api/models/v1_spectro_custom_cluster_entity.go @@ -0,0 +1,288 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1SpectroCustomClusterEntity Custom cluster request payload for create and update +// +// swagger:model v1SpectroCustomClusterEntity +type V1SpectroCustomClusterEntity struct { + + // metadata + Metadata *V1ObjectMetaInputEntity `json:"metadata,omitempty"` + + // spec + Spec *V1SpectroCustomClusterEntitySpec `json:"spec,omitempty"` +} + +// Validate validates this v1 spectro custom cluster entity +func (m *V1SpectroCustomClusterEntity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSpec(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1SpectroCustomClusterEntity) validateMetadata(formats strfmt.Registry) error { + + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } + return err + } + } + + return nil +} + +func (m *V1SpectroCustomClusterEntity) validateSpec(formats strfmt.Registry) error { + + if swag.IsZero(m.Spec) { // not required + return nil + } + + if m.Spec != nil { + if err := m.Spec.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1SpectroCustomClusterEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1SpectroCustomClusterEntity) UnmarshalBinary(b []byte) error { + var res V1SpectroCustomClusterEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} + +// V1SpectroCustomClusterEntitySpec v1 spectro custom cluster entity spec +// +// swagger:model V1SpectroCustomClusterEntitySpec +type V1SpectroCustomClusterEntitySpec struct { + + // Cloud account uid to be used for cluster provisioning + // Required: true + CloudAccountUID *string `json:"cloudAccountUid"` + + // cloud config + // Required: true + CloudConfig *V1CustomClusterConfig `json:"cloudConfig"` + + // General cluster configuration like patching settings, namespace resource allocation, rbac + ClusterConfig *V1CustomClusterConfigEntity `json:"clusterConfig,omitempty"` + + // cluster type + ClusterType V1ClusterType `json:"clusterType,omitempty"` + + // machinepoolconfig + Machinepoolconfig []*V1CustomMachinePoolConfigEntity `json:"machinepoolconfig"` + + // profiles + Profiles []*V1SpectroClusterProfileEntity `json:"profiles"` +} + +// Validate validates this v1 spectro custom cluster entity spec +func (m *V1SpectroCustomClusterEntitySpec) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateCloudAccountUID(formats); err != nil { + res = append(res, err) + } + + if err := m.validateCloudConfig(formats); err != nil { + res = append(res, err) + } + + if err := m.validateClusterConfig(formats); err != nil { + res = append(res, err) + } + + if err := m.validateClusterType(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMachinepoolconfig(formats); err != nil { + res = append(res, err) + } + + if err := m.validateProfiles(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1SpectroCustomClusterEntitySpec) validateCloudAccountUID(formats strfmt.Registry) error { + + if err := validate.Required("spec"+"."+"cloudAccountUid", "body", m.CloudAccountUID); err != nil { + return err + } + + return nil +} + +func (m *V1SpectroCustomClusterEntitySpec) validateCloudConfig(formats strfmt.Registry) error { + + if err := validate.Required("spec"+"."+"cloudConfig", "body", m.CloudConfig); err != nil { + return err + } + + if m.CloudConfig != nil { + if err := m.CloudConfig.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec" + "." + "cloudConfig") + } + return err + } + } + + return nil +} + +func (m *V1SpectroCustomClusterEntitySpec) validateClusterConfig(formats strfmt.Registry) error { + + if swag.IsZero(m.ClusterConfig) { // not required + return nil + } + + if m.ClusterConfig != nil { + if err := m.ClusterConfig.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec" + "." + "clusterConfig") + } + return err + } + } + + return nil +} + +func (m *V1SpectroCustomClusterEntitySpec) validateClusterType(formats strfmt.Registry) error { + + if swag.IsZero(m.ClusterType) { // not required + return nil + } + + if err := m.ClusterType.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec" + "." + "clusterType") + } + return err + } + + return nil +} + +func (m *V1SpectroCustomClusterEntitySpec) validateMachinepoolconfig(formats strfmt.Registry) error { + + if swag.IsZero(m.Machinepoolconfig) { // not required + return nil + } + + for i := 0; i < len(m.Machinepoolconfig); i++ { + if swag.IsZero(m.Machinepoolconfig[i]) { // not required + continue + } + + if m.Machinepoolconfig[i] != nil { + if err := m.Machinepoolconfig[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec" + "." + "machinepoolconfig" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1SpectroCustomClusterEntitySpec) validateProfiles(formats strfmt.Registry) error { + + if swag.IsZero(m.Profiles) { // not required + return nil + } + + for i := 0; i < len(m.Profiles); i++ { + if swag.IsZero(m.Profiles[i]) { // not required + continue + } + + if m.Profiles[i] != nil { + if err := m.Profiles[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec" + "." + "profiles" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1SpectroCustomClusterEntitySpec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1SpectroCustomClusterEntitySpec) UnmarshalBinary(b []byte) error { + var res V1SpectroCustomClusterEntitySpec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_spectro_edge_cluster_entity.go b/api/models/v1_spectro_edge_cluster_entity.go new file mode 100644 index 00000000..e0f6b07c --- /dev/null +++ b/api/models/v1_spectro_edge_cluster_entity.go @@ -0,0 +1,303 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1SpectroEdgeClusterEntity Edge cluster request payload for create and update +// +// swagger:model v1SpectroEdgeClusterEntity +type V1SpectroEdgeClusterEntity struct { + + // metadata + Metadata *V1ObjectMeta `json:"metadata,omitempty"` + + // spec + Spec *V1SpectroEdgeClusterEntitySpec `json:"spec,omitempty"` +} + +// Validate validates this v1 spectro edge cluster entity +func (m *V1SpectroEdgeClusterEntity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSpec(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1SpectroEdgeClusterEntity) validateMetadata(formats strfmt.Registry) error { + + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } + return err + } + } + + return nil +} + +func (m *V1SpectroEdgeClusterEntity) validateSpec(formats strfmt.Registry) error { + + if swag.IsZero(m.Spec) { // not required + return nil + } + + if m.Spec != nil { + if err := m.Spec.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1SpectroEdgeClusterEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1SpectroEdgeClusterEntity) UnmarshalBinary(b []byte) error { + var res V1SpectroEdgeClusterEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} + +// V1SpectroEdgeClusterEntitySpec v1 spectro edge cluster entity spec +// +// swagger:model V1SpectroEdgeClusterEntitySpec +type V1SpectroEdgeClusterEntitySpec struct { + + // cloud config + CloudConfig *V1EdgeClusterConfig `json:"cloudConfig,omitempty"` + + // General cluster configuration like health, patching settings, namespace resource allocation, rbac + ClusterConfig *V1ClusterConfigEntity `json:"clusterConfig,omitempty"` + + // machinepoolconfig + Machinepoolconfig []*V1EdgeMachinePoolConfigEntity `json:"machinepoolconfig"` + + // policies + Policies *V1SpectroClusterPolicies `json:"policies,omitempty"` + + // profiles + Profiles []*V1SpectroClusterProfileEntity `json:"profiles"` + + // variables + Variables []*V1SpectroClusterVariable `json:"variables"` +} + +// Validate validates this v1 spectro edge cluster entity spec +func (m *V1SpectroEdgeClusterEntitySpec) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateCloudConfig(formats); err != nil { + res = append(res, err) + } + + if err := m.validateClusterConfig(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMachinepoolconfig(formats); err != nil { + res = append(res, err) + } + + if err := m.validatePolicies(formats); err != nil { + res = append(res, err) + } + + if err := m.validateProfiles(formats); err != nil { + res = append(res, err) + } + + if err := m.validateVariables(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1SpectroEdgeClusterEntitySpec) validateCloudConfig(formats strfmt.Registry) error { + + if swag.IsZero(m.CloudConfig) { // not required + return nil + } + + if m.CloudConfig != nil { + if err := m.CloudConfig.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec" + "." + "cloudConfig") + } + return err + } + } + + return nil +} + +func (m *V1SpectroEdgeClusterEntitySpec) validateClusterConfig(formats strfmt.Registry) error { + + if swag.IsZero(m.ClusterConfig) { // not required + return nil + } + + if m.ClusterConfig != nil { + if err := m.ClusterConfig.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec" + "." + "clusterConfig") + } + return err + } + } + + return nil +} + +func (m *V1SpectroEdgeClusterEntitySpec) validateMachinepoolconfig(formats strfmt.Registry) error { + + if swag.IsZero(m.Machinepoolconfig) { // not required + return nil + } + + for i := 0; i < len(m.Machinepoolconfig); i++ { + if swag.IsZero(m.Machinepoolconfig[i]) { // not required + continue + } + + if m.Machinepoolconfig[i] != nil { + if err := m.Machinepoolconfig[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec" + "." + "machinepoolconfig" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1SpectroEdgeClusterEntitySpec) validatePolicies(formats strfmt.Registry) error { + + if swag.IsZero(m.Policies) { // not required + return nil + } + + if m.Policies != nil { + if err := m.Policies.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec" + "." + "policies") + } + return err + } + } + + return nil +} + +func (m *V1SpectroEdgeClusterEntitySpec) validateProfiles(formats strfmt.Registry) error { + + if swag.IsZero(m.Profiles) { // not required + return nil + } + + for i := 0; i < len(m.Profiles); i++ { + if swag.IsZero(m.Profiles[i]) { // not required + continue + } + + if m.Profiles[i] != nil { + if err := m.Profiles[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec" + "." + "profiles" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1SpectroEdgeClusterEntitySpec) validateVariables(formats strfmt.Registry) error { + + if swag.IsZero(m.Variables) { // not required + return nil + } + + for i := 0; i < len(m.Variables); i++ { + if swag.IsZero(m.Variables[i]) { // not required + continue + } + + if m.Variables[i] != nil { + if err := m.Variables[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec" + "." + "variables" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1SpectroEdgeClusterEntitySpec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1SpectroEdgeClusterEntitySpec) UnmarshalBinary(b []byte) error { + var res V1SpectroEdgeClusterEntitySpec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_spectro_edge_cluster_import_entity.go b/api/models/v1_spectro_edge_cluster_import_entity.go new file mode 100644 index 00000000..36ee1f5c --- /dev/null +++ b/api/models/v1_spectro_edge_cluster_import_entity.go @@ -0,0 +1,155 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1SpectroEdgeClusterImportEntity Spectro Edge cluster import request payload +// +// swagger:model v1SpectroEdgeClusterImportEntity +type V1SpectroEdgeClusterImportEntity struct { + + // metadata + Metadata *V1ObjectMetaInputEntity `json:"metadata,omitempty"` + + // spec + Spec *V1SpectroEdgeClusterImportEntitySpec `json:"spec,omitempty"` +} + +// Validate validates this v1 spectro edge cluster import entity +func (m *V1SpectroEdgeClusterImportEntity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSpec(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1SpectroEdgeClusterImportEntity) validateMetadata(formats strfmt.Registry) error { + + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } + return err + } + } + + return nil +} + +func (m *V1SpectroEdgeClusterImportEntity) validateSpec(formats strfmt.Registry) error { + + if swag.IsZero(m.Spec) { // not required + return nil + } + + if m.Spec != nil { + if err := m.Spec.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1SpectroEdgeClusterImportEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1SpectroEdgeClusterImportEntity) UnmarshalBinary(b []byte) error { + var res V1SpectroEdgeClusterImportEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} + +// V1SpectroEdgeClusterImportEntitySpec v1 spectro edge cluster import entity spec +// +// swagger:model V1SpectroEdgeClusterImportEntitySpec +type V1SpectroEdgeClusterImportEntitySpec struct { + + // cluster config + ClusterConfig *V1ImportClusterConfig `json:"clusterConfig,omitempty"` +} + +// Validate validates this v1 spectro edge cluster import entity spec +func (m *V1SpectroEdgeClusterImportEntitySpec) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateClusterConfig(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1SpectroEdgeClusterImportEntitySpec) validateClusterConfig(formats strfmt.Registry) error { + + if swag.IsZero(m.ClusterConfig) { // not required + return nil + } + + if m.ClusterConfig != nil { + if err := m.ClusterConfig.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec" + "." + "clusterConfig") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1SpectroEdgeClusterImportEntitySpec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1SpectroEdgeClusterImportEntitySpec) UnmarshalBinary(b []byte) error { + var res V1SpectroEdgeClusterImportEntitySpec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_spectro_edge_cluster_rate_entity.go b/api/models/v1_spectro_edge_cluster_rate_entity.go new file mode 100644 index 00000000..79eb61bd --- /dev/null +++ b/api/models/v1_spectro_edge_cluster_rate_entity.go @@ -0,0 +1,105 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1SpectroEdgeClusterRateEntity Edge cluster request payload for estimating rate +// +// swagger:model v1SpectroEdgeClusterRateEntity +type V1SpectroEdgeClusterRateEntity struct { + + // cloud config + CloudConfig *V1EdgeClusterConfig `json:"cloudConfig,omitempty"` + + // machinepoolconfig + Machinepoolconfig []*V1EdgeMachinePoolConfigEntity `json:"machinepoolconfig"` +} + +// Validate validates this v1 spectro edge cluster rate entity +func (m *V1SpectroEdgeClusterRateEntity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateCloudConfig(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMachinepoolconfig(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1SpectroEdgeClusterRateEntity) validateCloudConfig(formats strfmt.Registry) error { + + if swag.IsZero(m.CloudConfig) { // not required + return nil + } + + if m.CloudConfig != nil { + if err := m.CloudConfig.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("cloudConfig") + } + return err + } + } + + return nil +} + +func (m *V1SpectroEdgeClusterRateEntity) validateMachinepoolconfig(formats strfmt.Registry) error { + + if swag.IsZero(m.Machinepoolconfig) { // not required + return nil + } + + for i := 0; i < len(m.Machinepoolconfig); i++ { + if swag.IsZero(m.Machinepoolconfig[i]) { // not required + continue + } + + if m.Machinepoolconfig[i] != nil { + if err := m.Machinepoolconfig[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("machinepoolconfig" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1SpectroEdgeClusterRateEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1SpectroEdgeClusterRateEntity) UnmarshalBinary(b []byte) error { + var res V1SpectroEdgeClusterRateEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_spectro_edge_native_cluster_entity.go b/api/models/v1_spectro_edge_native_cluster_entity.go new file mode 100644 index 00000000..4cb79a5b --- /dev/null +++ b/api/models/v1_spectro_edge_native_cluster_entity.go @@ -0,0 +1,271 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1SpectroEdgeNativeClusterEntity EdgeNative cluster create or update request payload +// +// swagger:model v1SpectroEdgeNativeClusterEntity +type V1SpectroEdgeNativeClusterEntity struct { + + // metadata + Metadata *V1ObjectMeta `json:"metadata,omitempty"` + + // spec + Spec *V1SpectroEdgeNativeClusterEntitySpec `json:"spec,omitempty"` +} + +// Validate validates this v1 spectro edge native cluster entity +func (m *V1SpectroEdgeNativeClusterEntity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSpec(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1SpectroEdgeNativeClusterEntity) validateMetadata(formats strfmt.Registry) error { + + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } + return err + } + } + + return nil +} + +func (m *V1SpectroEdgeNativeClusterEntity) validateSpec(formats strfmt.Registry) error { + + if swag.IsZero(m.Spec) { // not required + return nil + } + + if m.Spec != nil { + if err := m.Spec.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1SpectroEdgeNativeClusterEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1SpectroEdgeNativeClusterEntity) UnmarshalBinary(b []byte) error { + var res V1SpectroEdgeNativeClusterEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} + +// V1SpectroEdgeNativeClusterEntitySpec v1 spectro edge native cluster entity spec +// +// swagger:model V1SpectroEdgeNativeClusterEntitySpec +type V1SpectroEdgeNativeClusterEntitySpec struct { + + // cloud config + CloudConfig *V1EdgeNativeClusterConfig `json:"cloudConfig,omitempty"` + + // General cluster configuration like health, patching settings, namespace resource allocation, rbac + ClusterConfig *V1ClusterConfigEntity `json:"clusterConfig,omitempty"` + + // machinepoolconfig + Machinepoolconfig []*V1EdgeNativeMachinePoolConfigEntity `json:"machinepoolconfig"` + + // policies + Policies *V1SpectroClusterPolicies `json:"policies,omitempty"` + + // profiles + Profiles []*V1SpectroClusterProfileEntity `json:"profiles"` +} + +// Validate validates this v1 spectro edge native cluster entity spec +func (m *V1SpectroEdgeNativeClusterEntitySpec) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateCloudConfig(formats); err != nil { + res = append(res, err) + } + + if err := m.validateClusterConfig(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMachinepoolconfig(formats); err != nil { + res = append(res, err) + } + + if err := m.validatePolicies(formats); err != nil { + res = append(res, err) + } + + if err := m.validateProfiles(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1SpectroEdgeNativeClusterEntitySpec) validateCloudConfig(formats strfmt.Registry) error { + + if swag.IsZero(m.CloudConfig) { // not required + return nil + } + + if m.CloudConfig != nil { + if err := m.CloudConfig.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec" + "." + "cloudConfig") + } + return err + } + } + + return nil +} + +func (m *V1SpectroEdgeNativeClusterEntitySpec) validateClusterConfig(formats strfmt.Registry) error { + + if swag.IsZero(m.ClusterConfig) { // not required + return nil + } + + if m.ClusterConfig != nil { + if err := m.ClusterConfig.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec" + "." + "clusterConfig") + } + return err + } + } + + return nil +} + +func (m *V1SpectroEdgeNativeClusterEntitySpec) validateMachinepoolconfig(formats strfmt.Registry) error { + + if swag.IsZero(m.Machinepoolconfig) { // not required + return nil + } + + for i := 0; i < len(m.Machinepoolconfig); i++ { + if swag.IsZero(m.Machinepoolconfig[i]) { // not required + continue + } + + if m.Machinepoolconfig[i] != nil { + if err := m.Machinepoolconfig[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec" + "." + "machinepoolconfig" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1SpectroEdgeNativeClusterEntitySpec) validatePolicies(formats strfmt.Registry) error { + + if swag.IsZero(m.Policies) { // not required + return nil + } + + if m.Policies != nil { + if err := m.Policies.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec" + "." + "policies") + } + return err + } + } + + return nil +} + +func (m *V1SpectroEdgeNativeClusterEntitySpec) validateProfiles(formats strfmt.Registry) error { + + if swag.IsZero(m.Profiles) { // not required + return nil + } + + for i := 0; i < len(m.Profiles); i++ { + if swag.IsZero(m.Profiles[i]) { // not required + continue + } + + if m.Profiles[i] != nil { + if err := m.Profiles[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec" + "." + "profiles" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1SpectroEdgeNativeClusterEntitySpec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1SpectroEdgeNativeClusterEntitySpec) UnmarshalBinary(b []byte) error { + var res V1SpectroEdgeNativeClusterEntitySpec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_spectro_edge_native_cluster_import_entity.go b/api/models/v1_spectro_edge_native_cluster_import_entity.go new file mode 100644 index 00000000..cef31d39 --- /dev/null +++ b/api/models/v1_spectro_edge_native_cluster_import_entity.go @@ -0,0 +1,155 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1SpectroEdgeNativeClusterImportEntity Spectro EdgeNative cluster import request payload +// +// swagger:model v1SpectroEdgeNativeClusterImportEntity +type V1SpectroEdgeNativeClusterImportEntity struct { + + // metadata + Metadata *V1ObjectMetaInputEntity `json:"metadata,omitempty"` + + // spec + Spec *V1SpectroEdgeNativeClusterImportEntitySpec `json:"spec,omitempty"` +} + +// Validate validates this v1 spectro edge native cluster import entity +func (m *V1SpectroEdgeNativeClusterImportEntity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSpec(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1SpectroEdgeNativeClusterImportEntity) validateMetadata(formats strfmt.Registry) error { + + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } + return err + } + } + + return nil +} + +func (m *V1SpectroEdgeNativeClusterImportEntity) validateSpec(formats strfmt.Registry) error { + + if swag.IsZero(m.Spec) { // not required + return nil + } + + if m.Spec != nil { + if err := m.Spec.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1SpectroEdgeNativeClusterImportEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1SpectroEdgeNativeClusterImportEntity) UnmarshalBinary(b []byte) error { + var res V1SpectroEdgeNativeClusterImportEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} + +// V1SpectroEdgeNativeClusterImportEntitySpec v1 spectro edge native cluster import entity spec +// +// swagger:model V1SpectroEdgeNativeClusterImportEntitySpec +type V1SpectroEdgeNativeClusterImportEntitySpec struct { + + // cluster config + ClusterConfig *V1ImportClusterConfig `json:"clusterConfig,omitempty"` +} + +// Validate validates this v1 spectro edge native cluster import entity spec +func (m *V1SpectroEdgeNativeClusterImportEntitySpec) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateClusterConfig(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1SpectroEdgeNativeClusterImportEntitySpec) validateClusterConfig(formats strfmt.Registry) error { + + if swag.IsZero(m.ClusterConfig) { // not required + return nil + } + + if m.ClusterConfig != nil { + if err := m.ClusterConfig.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec" + "." + "clusterConfig") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1SpectroEdgeNativeClusterImportEntitySpec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1SpectroEdgeNativeClusterImportEntitySpec) UnmarshalBinary(b []byte) error { + var res V1SpectroEdgeNativeClusterImportEntitySpec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_spectro_edge_native_cluster_rate_entity.go b/api/models/v1_spectro_edge_native_cluster_rate_entity.go new file mode 100644 index 00000000..10a7b7fc --- /dev/null +++ b/api/models/v1_spectro_edge_native_cluster_rate_entity.go @@ -0,0 +1,105 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1SpectroEdgeNativeClusterRateEntity Edge-native cluster request payload for estimating rate +// +// swagger:model v1SpectroEdgeNativeClusterRateEntity +type V1SpectroEdgeNativeClusterRateEntity struct { + + // cloud config + CloudConfig *V1EdgeNativeClusterConfig `json:"cloudConfig,omitempty"` + + // machinepoolconfig + Machinepoolconfig []*V1EdgeNativeMachinePoolConfigEntity `json:"machinepoolconfig"` +} + +// Validate validates this v1 spectro edge native cluster rate entity +func (m *V1SpectroEdgeNativeClusterRateEntity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateCloudConfig(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMachinepoolconfig(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1SpectroEdgeNativeClusterRateEntity) validateCloudConfig(formats strfmt.Registry) error { + + if swag.IsZero(m.CloudConfig) { // not required + return nil + } + + if m.CloudConfig != nil { + if err := m.CloudConfig.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("cloudConfig") + } + return err + } + } + + return nil +} + +func (m *V1SpectroEdgeNativeClusterRateEntity) validateMachinepoolconfig(formats strfmt.Registry) error { + + if swag.IsZero(m.Machinepoolconfig) { // not required + return nil + } + + for i := 0; i < len(m.Machinepoolconfig); i++ { + if swag.IsZero(m.Machinepoolconfig[i]) { // not required + continue + } + + if m.Machinepoolconfig[i] != nil { + if err := m.Machinepoolconfig[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("machinepoolconfig" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1SpectroEdgeNativeClusterRateEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1SpectroEdgeNativeClusterRateEntity) UnmarshalBinary(b []byte) error { + var res V1SpectroEdgeNativeClusterRateEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_spectro_eks_cluster_entity.go b/api/models/v1_spectro_eks_cluster_entity.go new file mode 100644 index 00000000..cda7cb91 --- /dev/null +++ b/api/models/v1_spectro_eks_cluster_entity.go @@ -0,0 +1,322 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1SpectroEksClusterEntity Spectro EKS cluster request payload for create and update +// +// swagger:model v1SpectroEksClusterEntity +type V1SpectroEksClusterEntity struct { + + // metadata + Metadata *V1ObjectMeta `json:"metadata,omitempty"` + + // spec + Spec *V1SpectroEksClusterEntitySpec `json:"spec,omitempty"` +} + +// Validate validates this v1 spectro eks cluster entity +func (m *V1SpectroEksClusterEntity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSpec(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1SpectroEksClusterEntity) validateMetadata(formats strfmt.Registry) error { + + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } + return err + } + } + + return nil +} + +func (m *V1SpectroEksClusterEntity) validateSpec(formats strfmt.Registry) error { + + if swag.IsZero(m.Spec) { // not required + return nil + } + + if m.Spec != nil { + if err := m.Spec.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1SpectroEksClusterEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1SpectroEksClusterEntity) UnmarshalBinary(b []byte) error { + var res V1SpectroEksClusterEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} + +// V1SpectroEksClusterEntitySpec v1 spectro eks cluster entity spec +// +// swagger:model V1SpectroEksClusterEntitySpec +type V1SpectroEksClusterEntitySpec struct { + + // Cloud account uid to be used for cluster provisioning + // Required: true + CloudAccountUID *string `json:"cloudAccountUid"` + + // cloud config + // Required: true + CloudConfig *V1EksClusterConfig `json:"cloudConfig"` + + // General cluster configuration like health, patching settings, namespace resource allocation, rbac + ClusterConfig *V1ClusterConfigEntity `json:"clusterConfig,omitempty"` + + // fargate profiles + FargateProfiles []*V1FargateProfile `json:"fargateProfiles"` + + // machinepoolconfig + Machinepoolconfig []*V1EksMachinePoolConfigEntity `json:"machinepoolconfig"` + + // policies + Policies *V1SpectroClusterPolicies `json:"policies,omitempty"` + + // profiles + Profiles []*V1SpectroClusterProfileEntity `json:"profiles"` +} + +// Validate validates this v1 spectro eks cluster entity spec +func (m *V1SpectroEksClusterEntitySpec) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateCloudAccountUID(formats); err != nil { + res = append(res, err) + } + + if err := m.validateCloudConfig(formats); err != nil { + res = append(res, err) + } + + if err := m.validateClusterConfig(formats); err != nil { + res = append(res, err) + } + + if err := m.validateFargateProfiles(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMachinepoolconfig(formats); err != nil { + res = append(res, err) + } + + if err := m.validatePolicies(formats); err != nil { + res = append(res, err) + } + + if err := m.validateProfiles(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1SpectroEksClusterEntitySpec) validateCloudAccountUID(formats strfmt.Registry) error { + + if err := validate.Required("spec"+"."+"cloudAccountUid", "body", m.CloudAccountUID); err != nil { + return err + } + + return nil +} + +func (m *V1SpectroEksClusterEntitySpec) validateCloudConfig(formats strfmt.Registry) error { + + if err := validate.Required("spec"+"."+"cloudConfig", "body", m.CloudConfig); err != nil { + return err + } + + if m.CloudConfig != nil { + if err := m.CloudConfig.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec" + "." + "cloudConfig") + } + return err + } + } + + return nil +} + +func (m *V1SpectroEksClusterEntitySpec) validateClusterConfig(formats strfmt.Registry) error { + + if swag.IsZero(m.ClusterConfig) { // not required + return nil + } + + if m.ClusterConfig != nil { + if err := m.ClusterConfig.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec" + "." + "clusterConfig") + } + return err + } + } + + return nil +} + +func (m *V1SpectroEksClusterEntitySpec) validateFargateProfiles(formats strfmt.Registry) error { + + if swag.IsZero(m.FargateProfiles) { // not required + return nil + } + + for i := 0; i < len(m.FargateProfiles); i++ { + if swag.IsZero(m.FargateProfiles[i]) { // not required + continue + } + + if m.FargateProfiles[i] != nil { + if err := m.FargateProfiles[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec" + "." + "fargateProfiles" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1SpectroEksClusterEntitySpec) validateMachinepoolconfig(formats strfmt.Registry) error { + + if swag.IsZero(m.Machinepoolconfig) { // not required + return nil + } + + for i := 0; i < len(m.Machinepoolconfig); i++ { + if swag.IsZero(m.Machinepoolconfig[i]) { // not required + continue + } + + if m.Machinepoolconfig[i] != nil { + if err := m.Machinepoolconfig[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec" + "." + "machinepoolconfig" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1SpectroEksClusterEntitySpec) validatePolicies(formats strfmt.Registry) error { + + if swag.IsZero(m.Policies) { // not required + return nil + } + + if m.Policies != nil { + if err := m.Policies.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec" + "." + "policies") + } + return err + } + } + + return nil +} + +func (m *V1SpectroEksClusterEntitySpec) validateProfiles(formats strfmt.Registry) error { + + if swag.IsZero(m.Profiles) { // not required + return nil + } + + for i := 0; i < len(m.Profiles); i++ { + if swag.IsZero(m.Profiles[i]) { // not required + continue + } + + if m.Profiles[i] != nil { + if err := m.Profiles[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec" + "." + "profiles" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1SpectroEksClusterEntitySpec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1SpectroEksClusterEntitySpec) UnmarshalBinary(b []byte) error { + var res V1SpectroEksClusterEntitySpec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_spectro_eks_cluster_rate_entity.go b/api/models/v1_spectro_eks_cluster_rate_entity.go new file mode 100644 index 00000000..6e3b92d1 --- /dev/null +++ b/api/models/v1_spectro_eks_cluster_rate_entity.go @@ -0,0 +1,105 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1SpectroEksClusterRateEntity Spectro EKS cluster request payload for estimating rate +// +// swagger:model v1SpectroEksClusterRateEntity +type V1SpectroEksClusterRateEntity struct { + + // cloud config + CloudConfig *V1EksClusterConfig `json:"cloudConfig,omitempty"` + + // machinepoolconfig + Machinepoolconfig []*V1EksMachinePoolConfigEntity `json:"machinepoolconfig"` +} + +// Validate validates this v1 spectro eks cluster rate entity +func (m *V1SpectroEksClusterRateEntity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateCloudConfig(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMachinepoolconfig(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1SpectroEksClusterRateEntity) validateCloudConfig(formats strfmt.Registry) error { + + if swag.IsZero(m.CloudConfig) { // not required + return nil + } + + if m.CloudConfig != nil { + if err := m.CloudConfig.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("cloudConfig") + } + return err + } + } + + return nil +} + +func (m *V1SpectroEksClusterRateEntity) validateMachinepoolconfig(formats strfmt.Registry) error { + + if swag.IsZero(m.Machinepoolconfig) { // not required + return nil + } + + for i := 0; i < len(m.Machinepoolconfig); i++ { + if swag.IsZero(m.Machinepoolconfig[i]) { // not required + continue + } + + if m.Machinepoolconfig[i] != nil { + if err := m.Machinepoolconfig[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("machinepoolconfig" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1SpectroEksClusterRateEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1SpectroEksClusterRateEntity) UnmarshalBinary(b []byte) error { + var res V1SpectroEksClusterRateEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_spectro_gcp_cluster_entity.go b/api/models/v1_spectro_gcp_cluster_entity.go new file mode 100644 index 00000000..317baa1e --- /dev/null +++ b/api/models/v1_spectro_gcp_cluster_entity.go @@ -0,0 +1,290 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1SpectroGcpClusterEntity GCP cluster request payload for create and update +// +// swagger:model v1SpectroGcpClusterEntity +type V1SpectroGcpClusterEntity struct { + + // metadata + Metadata *V1ObjectMeta `json:"metadata,omitempty"` + + // spec + Spec *V1SpectroGcpClusterEntitySpec `json:"spec,omitempty"` +} + +// Validate validates this v1 spectro gcp cluster entity +func (m *V1SpectroGcpClusterEntity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSpec(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1SpectroGcpClusterEntity) validateMetadata(formats strfmt.Registry) error { + + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } + return err + } + } + + return nil +} + +func (m *V1SpectroGcpClusterEntity) validateSpec(formats strfmt.Registry) error { + + if swag.IsZero(m.Spec) { // not required + return nil + } + + if m.Spec != nil { + if err := m.Spec.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1SpectroGcpClusterEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1SpectroGcpClusterEntity) UnmarshalBinary(b []byte) error { + var res V1SpectroGcpClusterEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} + +// V1SpectroGcpClusterEntitySpec v1 spectro gcp cluster entity spec +// +// swagger:model V1SpectroGcpClusterEntitySpec +type V1SpectroGcpClusterEntitySpec struct { + + // Cloud account uid to be used for cluster provisioning + // Required: true + CloudAccountUID *string `json:"cloudAccountUid"` + + // cloud config + // Required: true + CloudConfig *V1GcpClusterConfig `json:"cloudConfig"` + + // General cluster configuration like health, patching settings, namespace resource allocation, rbac + ClusterConfig *V1ClusterConfigEntity `json:"clusterConfig,omitempty"` + + // machinepoolconfig + Machinepoolconfig []*V1GcpMachinePoolConfigEntity `json:"machinepoolconfig"` + + // policies + Policies *V1SpectroClusterPolicies `json:"policies,omitempty"` + + // profiles + Profiles []*V1SpectroClusterProfileEntity `json:"profiles"` +} + +// Validate validates this v1 spectro gcp cluster entity spec +func (m *V1SpectroGcpClusterEntitySpec) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateCloudAccountUID(formats); err != nil { + res = append(res, err) + } + + if err := m.validateCloudConfig(formats); err != nil { + res = append(res, err) + } + + if err := m.validateClusterConfig(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMachinepoolconfig(formats); err != nil { + res = append(res, err) + } + + if err := m.validatePolicies(formats); err != nil { + res = append(res, err) + } + + if err := m.validateProfiles(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1SpectroGcpClusterEntitySpec) validateCloudAccountUID(formats strfmt.Registry) error { + + if err := validate.Required("spec"+"."+"cloudAccountUid", "body", m.CloudAccountUID); err != nil { + return err + } + + return nil +} + +func (m *V1SpectroGcpClusterEntitySpec) validateCloudConfig(formats strfmt.Registry) error { + + if err := validate.Required("spec"+"."+"cloudConfig", "body", m.CloudConfig); err != nil { + return err + } + + if m.CloudConfig != nil { + if err := m.CloudConfig.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec" + "." + "cloudConfig") + } + return err + } + } + + return nil +} + +func (m *V1SpectroGcpClusterEntitySpec) validateClusterConfig(formats strfmt.Registry) error { + + if swag.IsZero(m.ClusterConfig) { // not required + return nil + } + + if m.ClusterConfig != nil { + if err := m.ClusterConfig.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec" + "." + "clusterConfig") + } + return err + } + } + + return nil +} + +func (m *V1SpectroGcpClusterEntitySpec) validateMachinepoolconfig(formats strfmt.Registry) error { + + if swag.IsZero(m.Machinepoolconfig) { // not required + return nil + } + + for i := 0; i < len(m.Machinepoolconfig); i++ { + if swag.IsZero(m.Machinepoolconfig[i]) { // not required + continue + } + + if m.Machinepoolconfig[i] != nil { + if err := m.Machinepoolconfig[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec" + "." + "machinepoolconfig" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1SpectroGcpClusterEntitySpec) validatePolicies(formats strfmt.Registry) error { + + if swag.IsZero(m.Policies) { // not required + return nil + } + + if m.Policies != nil { + if err := m.Policies.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec" + "." + "policies") + } + return err + } + } + + return nil +} + +func (m *V1SpectroGcpClusterEntitySpec) validateProfiles(formats strfmt.Registry) error { + + if swag.IsZero(m.Profiles) { // not required + return nil + } + + for i := 0; i < len(m.Profiles); i++ { + if swag.IsZero(m.Profiles[i]) { // not required + continue + } + + if m.Profiles[i] != nil { + if err := m.Profiles[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec" + "." + "profiles" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1SpectroGcpClusterEntitySpec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1SpectroGcpClusterEntitySpec) UnmarshalBinary(b []byte) error { + var res V1SpectroGcpClusterEntitySpec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_spectro_gcp_cluster_import_entity.go b/api/models/v1_spectro_gcp_cluster_import_entity.go new file mode 100644 index 00000000..f8844a46 --- /dev/null +++ b/api/models/v1_spectro_gcp_cluster_import_entity.go @@ -0,0 +1,155 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1SpectroGcpClusterImportEntity Spectro GCP cluster import request payload +// +// swagger:model v1SpectroGcpClusterImportEntity +type V1SpectroGcpClusterImportEntity struct { + + // metadata + Metadata *V1ObjectMetaInputEntity `json:"metadata,omitempty"` + + // spec + Spec *V1SpectroGcpClusterImportEntitySpec `json:"spec,omitempty"` +} + +// Validate validates this v1 spectro gcp cluster import entity +func (m *V1SpectroGcpClusterImportEntity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSpec(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1SpectroGcpClusterImportEntity) validateMetadata(formats strfmt.Registry) error { + + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } + return err + } + } + + return nil +} + +func (m *V1SpectroGcpClusterImportEntity) validateSpec(formats strfmt.Registry) error { + + if swag.IsZero(m.Spec) { // not required + return nil + } + + if m.Spec != nil { + if err := m.Spec.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1SpectroGcpClusterImportEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1SpectroGcpClusterImportEntity) UnmarshalBinary(b []byte) error { + var res V1SpectroGcpClusterImportEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} + +// V1SpectroGcpClusterImportEntitySpec v1 spectro gcp cluster import entity spec +// +// swagger:model V1SpectroGcpClusterImportEntitySpec +type V1SpectroGcpClusterImportEntitySpec struct { + + // cluster config + ClusterConfig *V1ImportClusterConfig `json:"clusterConfig,omitempty"` +} + +// Validate validates this v1 spectro gcp cluster import entity spec +func (m *V1SpectroGcpClusterImportEntitySpec) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateClusterConfig(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1SpectroGcpClusterImportEntitySpec) validateClusterConfig(formats strfmt.Registry) error { + + if swag.IsZero(m.ClusterConfig) { // not required + return nil + } + + if m.ClusterConfig != nil { + if err := m.ClusterConfig.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec" + "." + "clusterConfig") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1SpectroGcpClusterImportEntitySpec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1SpectroGcpClusterImportEntitySpec) UnmarshalBinary(b []byte) error { + var res V1SpectroGcpClusterImportEntitySpec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_spectro_gcp_cluster_rate_entity.go b/api/models/v1_spectro_gcp_cluster_rate_entity.go new file mode 100644 index 00000000..dfa8d854 --- /dev/null +++ b/api/models/v1_spectro_gcp_cluster_rate_entity.go @@ -0,0 +1,105 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1SpectroGcpClusterRateEntity Gcp cluster request payload for estimating rate +// +// swagger:model v1SpectroGcpClusterRateEntity +type V1SpectroGcpClusterRateEntity struct { + + // cloud config + CloudConfig *V1GcpClusterConfig `json:"cloudConfig,omitempty"` + + // machinepoolconfig + Machinepoolconfig []*V1GcpMachinePoolConfigEntity `json:"machinepoolconfig"` +} + +// Validate validates this v1 spectro gcp cluster rate entity +func (m *V1SpectroGcpClusterRateEntity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateCloudConfig(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMachinepoolconfig(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1SpectroGcpClusterRateEntity) validateCloudConfig(formats strfmt.Registry) error { + + if swag.IsZero(m.CloudConfig) { // not required + return nil + } + + if m.CloudConfig != nil { + if err := m.CloudConfig.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("cloudConfig") + } + return err + } + } + + return nil +} + +func (m *V1SpectroGcpClusterRateEntity) validateMachinepoolconfig(formats strfmt.Registry) error { + + if swag.IsZero(m.Machinepoolconfig) { // not required + return nil + } + + for i := 0; i < len(m.Machinepoolconfig); i++ { + if swag.IsZero(m.Machinepoolconfig[i]) { // not required + continue + } + + if m.Machinepoolconfig[i] != nil { + if err := m.Machinepoolconfig[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("machinepoolconfig" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1SpectroGcpClusterRateEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1SpectroGcpClusterRateEntity) UnmarshalBinary(b []byte) error { + var res V1SpectroGcpClusterRateEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_spectro_generic_cluster_import_entity.go b/api/models/v1_spectro_generic_cluster_import_entity.go new file mode 100644 index 00000000..710ea566 --- /dev/null +++ b/api/models/v1_spectro_generic_cluster_import_entity.go @@ -0,0 +1,180 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1SpectroGenericClusterImportEntity Spectro generic cluster import request payload +// +// swagger:model v1SpectroGenericClusterImportEntity +type V1SpectroGenericClusterImportEntity struct { + + // metadata + Metadata *V1ObjectMetaInputEntity `json:"metadata,omitempty"` + + // spec + Spec *V1SpectroGenericClusterImportEntitySpec `json:"spec,omitempty"` +} + +// Validate validates this v1 spectro generic cluster import entity +func (m *V1SpectroGenericClusterImportEntity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSpec(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1SpectroGenericClusterImportEntity) validateMetadata(formats strfmt.Registry) error { + + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } + return err + } + } + + return nil +} + +func (m *V1SpectroGenericClusterImportEntity) validateSpec(formats strfmt.Registry) error { + + if swag.IsZero(m.Spec) { // not required + return nil + } + + if m.Spec != nil { + if err := m.Spec.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1SpectroGenericClusterImportEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1SpectroGenericClusterImportEntity) UnmarshalBinary(b []byte) error { + var res V1SpectroGenericClusterImportEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} + +// V1SpectroGenericClusterImportEntitySpec v1 spectro generic cluster import entity spec +// +// swagger:model V1SpectroGenericClusterImportEntitySpec +type V1SpectroGenericClusterImportEntitySpec struct { + + // cluster config + ClusterConfig *V1ImportClusterConfig `json:"clusterConfig,omitempty"` + + // edge config + EdgeConfig *V1ImportEdgeHostConfig `json:"edgeConfig,omitempty"` +} + +// Validate validates this v1 spectro generic cluster import entity spec +func (m *V1SpectroGenericClusterImportEntitySpec) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateClusterConfig(formats); err != nil { + res = append(res, err) + } + + if err := m.validateEdgeConfig(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1SpectroGenericClusterImportEntitySpec) validateClusterConfig(formats strfmt.Registry) error { + + if swag.IsZero(m.ClusterConfig) { // not required + return nil + } + + if m.ClusterConfig != nil { + if err := m.ClusterConfig.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec" + "." + "clusterConfig") + } + return err + } + } + + return nil +} + +func (m *V1SpectroGenericClusterImportEntitySpec) validateEdgeConfig(formats strfmt.Registry) error { + + if swag.IsZero(m.EdgeConfig) { // not required + return nil + } + + if m.EdgeConfig != nil { + if err := m.EdgeConfig.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec" + "." + "edgeConfig") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1SpectroGenericClusterImportEntitySpec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1SpectroGenericClusterImportEntitySpec) UnmarshalBinary(b []byte) error { + var res V1SpectroGenericClusterImportEntitySpec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_spectro_generic_cluster_rate_entity.go b/api/models/v1_spectro_generic_cluster_rate_entity.go new file mode 100644 index 00000000..9e18c33f --- /dev/null +++ b/api/models/v1_spectro_generic_cluster_rate_entity.go @@ -0,0 +1,105 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1SpectroGenericClusterRateEntity Generic cluster request payload for estimating rate +// +// swagger:model v1SpectroGenericClusterRateEntity +type V1SpectroGenericClusterRateEntity struct { + + // cloud config + CloudConfig *V1GenericClusterConfig `json:"cloudConfig,omitempty"` + + // machinepoolconfig + Machinepoolconfig []*V1GenericMachinePoolConfigEntity `json:"machinepoolconfig"` +} + +// Validate validates this v1 spectro generic cluster rate entity +func (m *V1SpectroGenericClusterRateEntity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateCloudConfig(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMachinepoolconfig(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1SpectroGenericClusterRateEntity) validateCloudConfig(formats strfmt.Registry) error { + + if swag.IsZero(m.CloudConfig) { // not required + return nil + } + + if m.CloudConfig != nil { + if err := m.CloudConfig.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("cloudConfig") + } + return err + } + } + + return nil +} + +func (m *V1SpectroGenericClusterRateEntity) validateMachinepoolconfig(formats strfmt.Registry) error { + + if swag.IsZero(m.Machinepoolconfig) { // not required + return nil + } + + for i := 0; i < len(m.Machinepoolconfig); i++ { + if swag.IsZero(m.Machinepoolconfig[i]) { // not required + continue + } + + if m.Machinepoolconfig[i] != nil { + if err := m.Machinepoolconfig[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("machinepoolconfig" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1SpectroGenericClusterRateEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1SpectroGenericClusterRateEntity) UnmarshalBinary(b []byte) error { + var res V1SpectroGenericClusterRateEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_spectro_libvirt_cluster_entity.go b/api/models/v1_spectro_libvirt_cluster_entity.go new file mode 100644 index 00000000..cc6554f4 --- /dev/null +++ b/api/models/v1_spectro_libvirt_cluster_entity.go @@ -0,0 +1,271 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1SpectroLibvirtClusterEntity Libvirt cluster request payload for create and update +// +// swagger:model v1SpectroLibvirtClusterEntity +type V1SpectroLibvirtClusterEntity struct { + + // metadata + Metadata *V1ObjectMeta `json:"metadata,omitempty"` + + // spec + Spec *V1SpectroLibvirtClusterEntitySpec `json:"spec,omitempty"` +} + +// Validate validates this v1 spectro libvirt cluster entity +func (m *V1SpectroLibvirtClusterEntity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSpec(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1SpectroLibvirtClusterEntity) validateMetadata(formats strfmt.Registry) error { + + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } + return err + } + } + + return nil +} + +func (m *V1SpectroLibvirtClusterEntity) validateSpec(formats strfmt.Registry) error { + + if swag.IsZero(m.Spec) { // not required + return nil + } + + if m.Spec != nil { + if err := m.Spec.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1SpectroLibvirtClusterEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1SpectroLibvirtClusterEntity) UnmarshalBinary(b []byte) error { + var res V1SpectroLibvirtClusterEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} + +// V1SpectroLibvirtClusterEntitySpec v1 spectro libvirt cluster entity spec +// +// swagger:model V1SpectroLibvirtClusterEntitySpec +type V1SpectroLibvirtClusterEntitySpec struct { + + // cloud config + CloudConfig *V1LibvirtClusterConfig `json:"cloudConfig,omitempty"` + + // General cluster configuration like health, patching settings, namespace resource allocation, rbac + ClusterConfig *V1ClusterConfigEntity `json:"clusterConfig,omitempty"` + + // machinepoolconfig + Machinepoolconfig []*V1LibvirtMachinePoolConfigEntity `json:"machinepoolconfig"` + + // policies + Policies *V1SpectroClusterPolicies `json:"policies,omitempty"` + + // profiles + Profiles []*V1SpectroClusterProfileEntity `json:"profiles"` +} + +// Validate validates this v1 spectro libvirt cluster entity spec +func (m *V1SpectroLibvirtClusterEntitySpec) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateCloudConfig(formats); err != nil { + res = append(res, err) + } + + if err := m.validateClusterConfig(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMachinepoolconfig(formats); err != nil { + res = append(res, err) + } + + if err := m.validatePolicies(formats); err != nil { + res = append(res, err) + } + + if err := m.validateProfiles(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1SpectroLibvirtClusterEntitySpec) validateCloudConfig(formats strfmt.Registry) error { + + if swag.IsZero(m.CloudConfig) { // not required + return nil + } + + if m.CloudConfig != nil { + if err := m.CloudConfig.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec" + "." + "cloudConfig") + } + return err + } + } + + return nil +} + +func (m *V1SpectroLibvirtClusterEntitySpec) validateClusterConfig(formats strfmt.Registry) error { + + if swag.IsZero(m.ClusterConfig) { // not required + return nil + } + + if m.ClusterConfig != nil { + if err := m.ClusterConfig.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec" + "." + "clusterConfig") + } + return err + } + } + + return nil +} + +func (m *V1SpectroLibvirtClusterEntitySpec) validateMachinepoolconfig(formats strfmt.Registry) error { + + if swag.IsZero(m.Machinepoolconfig) { // not required + return nil + } + + for i := 0; i < len(m.Machinepoolconfig); i++ { + if swag.IsZero(m.Machinepoolconfig[i]) { // not required + continue + } + + if m.Machinepoolconfig[i] != nil { + if err := m.Machinepoolconfig[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec" + "." + "machinepoolconfig" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1SpectroLibvirtClusterEntitySpec) validatePolicies(formats strfmt.Registry) error { + + if swag.IsZero(m.Policies) { // not required + return nil + } + + if m.Policies != nil { + if err := m.Policies.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec" + "." + "policies") + } + return err + } + } + + return nil +} + +func (m *V1SpectroLibvirtClusterEntitySpec) validateProfiles(formats strfmt.Registry) error { + + if swag.IsZero(m.Profiles) { // not required + return nil + } + + for i := 0; i < len(m.Profiles); i++ { + if swag.IsZero(m.Profiles[i]) { // not required + continue + } + + if m.Profiles[i] != nil { + if err := m.Profiles[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec" + "." + "profiles" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1SpectroLibvirtClusterEntitySpec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1SpectroLibvirtClusterEntitySpec) UnmarshalBinary(b []byte) error { + var res V1SpectroLibvirtClusterEntitySpec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_spectro_libvirt_cluster_import_entity.go b/api/models/v1_spectro_libvirt_cluster_import_entity.go new file mode 100644 index 00000000..44b946ff --- /dev/null +++ b/api/models/v1_spectro_libvirt_cluster_import_entity.go @@ -0,0 +1,155 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1SpectroLibvirtClusterImportEntity Spectro Libvirt cluster import request payload +// +// swagger:model v1SpectroLibvirtClusterImportEntity +type V1SpectroLibvirtClusterImportEntity struct { + + // metadata + Metadata *V1ObjectMetaInputEntity `json:"metadata,omitempty"` + + // spec + Spec *V1SpectroLibvirtClusterImportEntitySpec `json:"spec,omitempty"` +} + +// Validate validates this v1 spectro libvirt cluster import entity +func (m *V1SpectroLibvirtClusterImportEntity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSpec(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1SpectroLibvirtClusterImportEntity) validateMetadata(formats strfmt.Registry) error { + + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } + return err + } + } + + return nil +} + +func (m *V1SpectroLibvirtClusterImportEntity) validateSpec(formats strfmt.Registry) error { + + if swag.IsZero(m.Spec) { // not required + return nil + } + + if m.Spec != nil { + if err := m.Spec.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1SpectroLibvirtClusterImportEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1SpectroLibvirtClusterImportEntity) UnmarshalBinary(b []byte) error { + var res V1SpectroLibvirtClusterImportEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} + +// V1SpectroLibvirtClusterImportEntitySpec v1 spectro libvirt cluster import entity spec +// +// swagger:model V1SpectroLibvirtClusterImportEntitySpec +type V1SpectroLibvirtClusterImportEntitySpec struct { + + // cluster config + ClusterConfig *V1ImportClusterConfig `json:"clusterConfig,omitempty"` +} + +// Validate validates this v1 spectro libvirt cluster import entity spec +func (m *V1SpectroLibvirtClusterImportEntitySpec) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateClusterConfig(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1SpectroLibvirtClusterImportEntitySpec) validateClusterConfig(formats strfmt.Registry) error { + + if swag.IsZero(m.ClusterConfig) { // not required + return nil + } + + if m.ClusterConfig != nil { + if err := m.ClusterConfig.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec" + "." + "clusterConfig") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1SpectroLibvirtClusterImportEntitySpec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1SpectroLibvirtClusterImportEntitySpec) UnmarshalBinary(b []byte) error { + var res V1SpectroLibvirtClusterImportEntitySpec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_spectro_libvirt_cluster_rate_entity.go b/api/models/v1_spectro_libvirt_cluster_rate_entity.go new file mode 100644 index 00000000..0979fdf7 --- /dev/null +++ b/api/models/v1_spectro_libvirt_cluster_rate_entity.go @@ -0,0 +1,105 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1SpectroLibvirtClusterRateEntity libvirt cluster request payload for estimating rate +// +// swagger:model v1SpectroLibvirtClusterRateEntity +type V1SpectroLibvirtClusterRateEntity struct { + + // cloud config + CloudConfig *V1LibvirtClusterConfig `json:"cloudConfig,omitempty"` + + // machinepoolconfig + Machinepoolconfig []*V1LibvirtMachinePoolConfigEntity `json:"machinepoolconfig"` +} + +// Validate validates this v1 spectro libvirt cluster rate entity +func (m *V1SpectroLibvirtClusterRateEntity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateCloudConfig(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMachinepoolconfig(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1SpectroLibvirtClusterRateEntity) validateCloudConfig(formats strfmt.Registry) error { + + if swag.IsZero(m.CloudConfig) { // not required + return nil + } + + if m.CloudConfig != nil { + if err := m.CloudConfig.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("cloudConfig") + } + return err + } + } + + return nil +} + +func (m *V1SpectroLibvirtClusterRateEntity) validateMachinepoolconfig(formats strfmt.Registry) error { + + if swag.IsZero(m.Machinepoolconfig) { // not required + return nil + } + + for i := 0; i < len(m.Machinepoolconfig); i++ { + if swag.IsZero(m.Machinepoolconfig[i]) { // not required + continue + } + + if m.Machinepoolconfig[i] != nil { + if err := m.Machinepoolconfig[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("machinepoolconfig" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1SpectroLibvirtClusterRateEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1SpectroLibvirtClusterRateEntity) UnmarshalBinary(b []byte) error { + var res V1SpectroLibvirtClusterRateEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_spectro_maas_cluster_entity.go b/api/models/v1_spectro_maas_cluster_entity.go new file mode 100644 index 00000000..804bd7bb --- /dev/null +++ b/api/models/v1_spectro_maas_cluster_entity.go @@ -0,0 +1,290 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1SpectroMaasClusterEntity Spectro Maas cluster request payload for create and update +// +// swagger:model v1SpectroMaasClusterEntity +type V1SpectroMaasClusterEntity struct { + + // metadata + Metadata *V1ObjectMeta `json:"metadata,omitempty"` + + // spec + Spec *V1SpectroMaasClusterEntitySpec `json:"spec,omitempty"` +} + +// Validate validates this v1 spectro maas cluster entity +func (m *V1SpectroMaasClusterEntity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSpec(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1SpectroMaasClusterEntity) validateMetadata(formats strfmt.Registry) error { + + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } + return err + } + } + + return nil +} + +func (m *V1SpectroMaasClusterEntity) validateSpec(formats strfmt.Registry) error { + + if swag.IsZero(m.Spec) { // not required + return nil + } + + if m.Spec != nil { + if err := m.Spec.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1SpectroMaasClusterEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1SpectroMaasClusterEntity) UnmarshalBinary(b []byte) error { + var res V1SpectroMaasClusterEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} + +// V1SpectroMaasClusterEntitySpec v1 spectro maas cluster entity spec +// +// swagger:model V1SpectroMaasClusterEntitySpec +type V1SpectroMaasClusterEntitySpec struct { + + // Cloud account uid to be used for cluster provisioning + // Required: true + CloudAccountUID *string `json:"cloudAccountUid"` + + // cloud config + // Required: true + CloudConfig *V1MaasClusterConfig `json:"cloudConfig"` + + // General cluster configuration like health, patching settings, namespace resource allocation, rbac + ClusterConfig *V1ClusterConfigEntity `json:"clusterConfig,omitempty"` + + // machinepoolconfig + Machinepoolconfig []*V1MaasMachinePoolConfigEntity `json:"machinepoolconfig"` + + // policies + Policies *V1SpectroClusterPolicies `json:"policies,omitempty"` + + // profiles + Profiles []*V1SpectroClusterProfileEntity `json:"profiles"` +} + +// Validate validates this v1 spectro maas cluster entity spec +func (m *V1SpectroMaasClusterEntitySpec) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateCloudAccountUID(formats); err != nil { + res = append(res, err) + } + + if err := m.validateCloudConfig(formats); err != nil { + res = append(res, err) + } + + if err := m.validateClusterConfig(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMachinepoolconfig(formats); err != nil { + res = append(res, err) + } + + if err := m.validatePolicies(formats); err != nil { + res = append(res, err) + } + + if err := m.validateProfiles(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1SpectroMaasClusterEntitySpec) validateCloudAccountUID(formats strfmt.Registry) error { + + if err := validate.Required("spec"+"."+"cloudAccountUid", "body", m.CloudAccountUID); err != nil { + return err + } + + return nil +} + +func (m *V1SpectroMaasClusterEntitySpec) validateCloudConfig(formats strfmt.Registry) error { + + if err := validate.Required("spec"+"."+"cloudConfig", "body", m.CloudConfig); err != nil { + return err + } + + if m.CloudConfig != nil { + if err := m.CloudConfig.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec" + "." + "cloudConfig") + } + return err + } + } + + return nil +} + +func (m *V1SpectroMaasClusterEntitySpec) validateClusterConfig(formats strfmt.Registry) error { + + if swag.IsZero(m.ClusterConfig) { // not required + return nil + } + + if m.ClusterConfig != nil { + if err := m.ClusterConfig.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec" + "." + "clusterConfig") + } + return err + } + } + + return nil +} + +func (m *V1SpectroMaasClusterEntitySpec) validateMachinepoolconfig(formats strfmt.Registry) error { + + if swag.IsZero(m.Machinepoolconfig) { // not required + return nil + } + + for i := 0; i < len(m.Machinepoolconfig); i++ { + if swag.IsZero(m.Machinepoolconfig[i]) { // not required + continue + } + + if m.Machinepoolconfig[i] != nil { + if err := m.Machinepoolconfig[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec" + "." + "machinepoolconfig" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1SpectroMaasClusterEntitySpec) validatePolicies(formats strfmt.Registry) error { + + if swag.IsZero(m.Policies) { // not required + return nil + } + + if m.Policies != nil { + if err := m.Policies.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec" + "." + "policies") + } + return err + } + } + + return nil +} + +func (m *V1SpectroMaasClusterEntitySpec) validateProfiles(formats strfmt.Registry) error { + + if swag.IsZero(m.Profiles) { // not required + return nil + } + + for i := 0; i < len(m.Profiles); i++ { + if swag.IsZero(m.Profiles[i]) { // not required + continue + } + + if m.Profiles[i] != nil { + if err := m.Profiles[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec" + "." + "profiles" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1SpectroMaasClusterEntitySpec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1SpectroMaasClusterEntitySpec) UnmarshalBinary(b []byte) error { + var res V1SpectroMaasClusterEntitySpec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_spectro_maas_cluster_import_entity.go b/api/models/v1_spectro_maas_cluster_import_entity.go new file mode 100644 index 00000000..8fab5fb8 --- /dev/null +++ b/api/models/v1_spectro_maas_cluster_import_entity.go @@ -0,0 +1,155 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1SpectroMaasClusterImportEntity Spectro maas cluster import request payload +// +// swagger:model v1SpectroMaasClusterImportEntity +type V1SpectroMaasClusterImportEntity struct { + + // metadata + Metadata *V1ObjectMetaInputEntity `json:"metadata,omitempty"` + + // spec + Spec *V1SpectroMaasClusterImportEntitySpec `json:"spec,omitempty"` +} + +// Validate validates this v1 spectro maas cluster import entity +func (m *V1SpectroMaasClusterImportEntity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSpec(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1SpectroMaasClusterImportEntity) validateMetadata(formats strfmt.Registry) error { + + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } + return err + } + } + + return nil +} + +func (m *V1SpectroMaasClusterImportEntity) validateSpec(formats strfmt.Registry) error { + + if swag.IsZero(m.Spec) { // not required + return nil + } + + if m.Spec != nil { + if err := m.Spec.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1SpectroMaasClusterImportEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1SpectroMaasClusterImportEntity) UnmarshalBinary(b []byte) error { + var res V1SpectroMaasClusterImportEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} + +// V1SpectroMaasClusterImportEntitySpec v1 spectro maas cluster import entity spec +// +// swagger:model V1SpectroMaasClusterImportEntitySpec +type V1SpectroMaasClusterImportEntitySpec struct { + + // cluster config + ClusterConfig *V1ImportClusterConfig `json:"clusterConfig,omitempty"` +} + +// Validate validates this v1 spectro maas cluster import entity spec +func (m *V1SpectroMaasClusterImportEntitySpec) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateClusterConfig(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1SpectroMaasClusterImportEntitySpec) validateClusterConfig(formats strfmt.Registry) error { + + if swag.IsZero(m.ClusterConfig) { // not required + return nil + } + + if m.ClusterConfig != nil { + if err := m.ClusterConfig.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec" + "." + "clusterConfig") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1SpectroMaasClusterImportEntitySpec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1SpectroMaasClusterImportEntitySpec) UnmarshalBinary(b []byte) error { + var res V1SpectroMaasClusterImportEntitySpec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_spectro_maas_cluster_rate_entity.go b/api/models/v1_spectro_maas_cluster_rate_entity.go new file mode 100644 index 00000000..4b923cb4 --- /dev/null +++ b/api/models/v1_spectro_maas_cluster_rate_entity.go @@ -0,0 +1,105 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1SpectroMaasClusterRateEntity Maas cluster request payload for estimating rate +// +// swagger:model v1SpectroMaasClusterRateEntity +type V1SpectroMaasClusterRateEntity struct { + + // cloud config + CloudConfig *V1MaasClusterConfig `json:"cloudConfig,omitempty"` + + // machinepoolconfig + Machinepoolconfig []*V1MaasMachinePoolConfigEntity `json:"machinepoolconfig"` +} + +// Validate validates this v1 spectro maas cluster rate entity +func (m *V1SpectroMaasClusterRateEntity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateCloudConfig(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMachinepoolconfig(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1SpectroMaasClusterRateEntity) validateCloudConfig(formats strfmt.Registry) error { + + if swag.IsZero(m.CloudConfig) { // not required + return nil + } + + if m.CloudConfig != nil { + if err := m.CloudConfig.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("cloudConfig") + } + return err + } + } + + return nil +} + +func (m *V1SpectroMaasClusterRateEntity) validateMachinepoolconfig(formats strfmt.Registry) error { + + if swag.IsZero(m.Machinepoolconfig) { // not required + return nil + } + + for i := 0; i < len(m.Machinepoolconfig); i++ { + if swag.IsZero(m.Machinepoolconfig[i]) { // not required + continue + } + + if m.Machinepoolconfig[i] != nil { + if err := m.Machinepoolconfig[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("machinepoolconfig" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1SpectroMaasClusterRateEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1SpectroMaasClusterRateEntity) UnmarshalBinary(b []byte) error { + var res V1SpectroMaasClusterRateEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_spectro_open_stack_cluster_entity.go b/api/models/v1_spectro_open_stack_cluster_entity.go new file mode 100644 index 00000000..ce0ddcc1 --- /dev/null +++ b/api/models/v1_spectro_open_stack_cluster_entity.go @@ -0,0 +1,290 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1SpectroOpenStackClusterEntity OpenStack cluster request payload for create and update +// +// swagger:model v1SpectroOpenStackClusterEntity +type V1SpectroOpenStackClusterEntity struct { + + // metadata + Metadata *V1ObjectMeta `json:"metadata,omitempty"` + + // spec + Spec *V1SpectroOpenStackClusterEntitySpec `json:"spec,omitempty"` +} + +// Validate validates this v1 spectro open stack cluster entity +func (m *V1SpectroOpenStackClusterEntity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSpec(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1SpectroOpenStackClusterEntity) validateMetadata(formats strfmt.Registry) error { + + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } + return err + } + } + + return nil +} + +func (m *V1SpectroOpenStackClusterEntity) validateSpec(formats strfmt.Registry) error { + + if swag.IsZero(m.Spec) { // not required + return nil + } + + if m.Spec != nil { + if err := m.Spec.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1SpectroOpenStackClusterEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1SpectroOpenStackClusterEntity) UnmarshalBinary(b []byte) error { + var res V1SpectroOpenStackClusterEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} + +// V1SpectroOpenStackClusterEntitySpec v1 spectro open stack cluster entity spec +// +// swagger:model V1SpectroOpenStackClusterEntitySpec +type V1SpectroOpenStackClusterEntitySpec struct { + + // Cloud account uid to be used for cluster provisioning + // Required: true + CloudAccountUID *string `json:"cloudAccountUid"` + + // cloud config + // Required: true + CloudConfig *V1OpenStackClusterConfig `json:"cloudConfig"` + + // General cluster configuration like health, patching settings, namespace resource allocation, rbac + ClusterConfig *V1ClusterConfigEntity `json:"clusterConfig,omitempty"` + + // machinepoolconfig + Machinepoolconfig []*V1OpenStackMachinePoolConfigEntity `json:"machinepoolconfig"` + + // policies + Policies *V1SpectroClusterPolicies `json:"policies,omitempty"` + + // profiles + Profiles []*V1SpectroClusterProfileEntity `json:"profiles"` +} + +// Validate validates this v1 spectro open stack cluster entity spec +func (m *V1SpectroOpenStackClusterEntitySpec) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateCloudAccountUID(formats); err != nil { + res = append(res, err) + } + + if err := m.validateCloudConfig(formats); err != nil { + res = append(res, err) + } + + if err := m.validateClusterConfig(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMachinepoolconfig(formats); err != nil { + res = append(res, err) + } + + if err := m.validatePolicies(formats); err != nil { + res = append(res, err) + } + + if err := m.validateProfiles(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1SpectroOpenStackClusterEntitySpec) validateCloudAccountUID(formats strfmt.Registry) error { + + if err := validate.Required("spec"+"."+"cloudAccountUid", "body", m.CloudAccountUID); err != nil { + return err + } + + return nil +} + +func (m *V1SpectroOpenStackClusterEntitySpec) validateCloudConfig(formats strfmt.Registry) error { + + if err := validate.Required("spec"+"."+"cloudConfig", "body", m.CloudConfig); err != nil { + return err + } + + if m.CloudConfig != nil { + if err := m.CloudConfig.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec" + "." + "cloudConfig") + } + return err + } + } + + return nil +} + +func (m *V1SpectroOpenStackClusterEntitySpec) validateClusterConfig(formats strfmt.Registry) error { + + if swag.IsZero(m.ClusterConfig) { // not required + return nil + } + + if m.ClusterConfig != nil { + if err := m.ClusterConfig.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec" + "." + "clusterConfig") + } + return err + } + } + + return nil +} + +func (m *V1SpectroOpenStackClusterEntitySpec) validateMachinepoolconfig(formats strfmt.Registry) error { + + if swag.IsZero(m.Machinepoolconfig) { // not required + return nil + } + + for i := 0; i < len(m.Machinepoolconfig); i++ { + if swag.IsZero(m.Machinepoolconfig[i]) { // not required + continue + } + + if m.Machinepoolconfig[i] != nil { + if err := m.Machinepoolconfig[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec" + "." + "machinepoolconfig" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1SpectroOpenStackClusterEntitySpec) validatePolicies(formats strfmt.Registry) error { + + if swag.IsZero(m.Policies) { // not required + return nil + } + + if m.Policies != nil { + if err := m.Policies.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec" + "." + "policies") + } + return err + } + } + + return nil +} + +func (m *V1SpectroOpenStackClusterEntitySpec) validateProfiles(formats strfmt.Registry) error { + + if swag.IsZero(m.Profiles) { // not required + return nil + } + + for i := 0; i < len(m.Profiles); i++ { + if swag.IsZero(m.Profiles[i]) { // not required + continue + } + + if m.Profiles[i] != nil { + if err := m.Profiles[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec" + "." + "profiles" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1SpectroOpenStackClusterEntitySpec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1SpectroOpenStackClusterEntitySpec) UnmarshalBinary(b []byte) error { + var res V1SpectroOpenStackClusterEntitySpec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_spectro_open_stack_cluster_import_entity.go b/api/models/v1_spectro_open_stack_cluster_import_entity.go new file mode 100644 index 00000000..29c5c124 --- /dev/null +++ b/api/models/v1_spectro_open_stack_cluster_import_entity.go @@ -0,0 +1,155 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1SpectroOpenStackClusterImportEntity Spectro OpenStack cluster import request payload +// +// swagger:model v1SpectroOpenStackClusterImportEntity +type V1SpectroOpenStackClusterImportEntity struct { + + // metadata + Metadata *V1ObjectMetaInputEntity `json:"metadata,omitempty"` + + // spec + Spec *V1SpectroOpenStackClusterImportEntitySpec `json:"spec,omitempty"` +} + +// Validate validates this v1 spectro open stack cluster import entity +func (m *V1SpectroOpenStackClusterImportEntity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSpec(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1SpectroOpenStackClusterImportEntity) validateMetadata(formats strfmt.Registry) error { + + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } + return err + } + } + + return nil +} + +func (m *V1SpectroOpenStackClusterImportEntity) validateSpec(formats strfmt.Registry) error { + + if swag.IsZero(m.Spec) { // not required + return nil + } + + if m.Spec != nil { + if err := m.Spec.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1SpectroOpenStackClusterImportEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1SpectroOpenStackClusterImportEntity) UnmarshalBinary(b []byte) error { + var res V1SpectroOpenStackClusterImportEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} + +// V1SpectroOpenStackClusterImportEntitySpec v1 spectro open stack cluster import entity spec +// +// swagger:model V1SpectroOpenStackClusterImportEntitySpec +type V1SpectroOpenStackClusterImportEntitySpec struct { + + // cluster config + ClusterConfig *V1ImportClusterConfig `json:"clusterConfig,omitempty"` +} + +// Validate validates this v1 spectro open stack cluster import entity spec +func (m *V1SpectroOpenStackClusterImportEntitySpec) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateClusterConfig(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1SpectroOpenStackClusterImportEntitySpec) validateClusterConfig(formats strfmt.Registry) error { + + if swag.IsZero(m.ClusterConfig) { // not required + return nil + } + + if m.ClusterConfig != nil { + if err := m.ClusterConfig.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec" + "." + "clusterConfig") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1SpectroOpenStackClusterImportEntitySpec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1SpectroOpenStackClusterImportEntitySpec) UnmarshalBinary(b []byte) error { + var res V1SpectroOpenStackClusterImportEntitySpec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_spectro_open_stack_cluster_rate_entity.go b/api/models/v1_spectro_open_stack_cluster_rate_entity.go new file mode 100644 index 00000000..2c7394dc --- /dev/null +++ b/api/models/v1_spectro_open_stack_cluster_rate_entity.go @@ -0,0 +1,105 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1SpectroOpenStackClusterRateEntity Openstack cluster request payload for estimating rate +// +// swagger:model v1SpectroOpenStackClusterRateEntity +type V1SpectroOpenStackClusterRateEntity struct { + + // cloud config + CloudConfig *V1OpenStackClusterConfig `json:"cloudConfig,omitempty"` + + // machinepoolconfig + Machinepoolconfig []*V1OpenStackMachinePoolConfigEntity `json:"machinepoolconfig"` +} + +// Validate validates this v1 spectro open stack cluster rate entity +func (m *V1SpectroOpenStackClusterRateEntity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateCloudConfig(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMachinepoolconfig(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1SpectroOpenStackClusterRateEntity) validateCloudConfig(formats strfmt.Registry) error { + + if swag.IsZero(m.CloudConfig) { // not required + return nil + } + + if m.CloudConfig != nil { + if err := m.CloudConfig.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("cloudConfig") + } + return err + } + } + + return nil +} + +func (m *V1SpectroOpenStackClusterRateEntity) validateMachinepoolconfig(formats strfmt.Registry) error { + + if swag.IsZero(m.Machinepoolconfig) { // not required + return nil + } + + for i := 0; i < len(m.Machinepoolconfig); i++ { + if swag.IsZero(m.Machinepoolconfig[i]) { // not required + continue + } + + if m.Machinepoolconfig[i] != nil { + if err := m.Machinepoolconfig[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("machinepoolconfig" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1SpectroOpenStackClusterRateEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1SpectroOpenStackClusterRateEntity) UnmarshalBinary(b []byte) error { + var res V1SpectroOpenStackClusterRateEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_spectro_tencent_cluster_entity.go b/api/models/v1_spectro_tencent_cluster_entity.go new file mode 100644 index 00000000..f7dd66ee --- /dev/null +++ b/api/models/v1_spectro_tencent_cluster_entity.go @@ -0,0 +1,290 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1SpectroTencentClusterEntity Tencent cluster request payload for create and update +// +// swagger:model v1SpectroTencentClusterEntity +type V1SpectroTencentClusterEntity struct { + + // metadata + Metadata *V1ObjectMeta `json:"metadata,omitempty"` + + // spec + Spec *V1SpectroTencentClusterEntitySpec `json:"spec,omitempty"` +} + +// Validate validates this v1 spectro tencent cluster entity +func (m *V1SpectroTencentClusterEntity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSpec(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1SpectroTencentClusterEntity) validateMetadata(formats strfmt.Registry) error { + + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } + return err + } + } + + return nil +} + +func (m *V1SpectroTencentClusterEntity) validateSpec(formats strfmt.Registry) error { + + if swag.IsZero(m.Spec) { // not required + return nil + } + + if m.Spec != nil { + if err := m.Spec.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1SpectroTencentClusterEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1SpectroTencentClusterEntity) UnmarshalBinary(b []byte) error { + var res V1SpectroTencentClusterEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} + +// V1SpectroTencentClusterEntitySpec v1 spectro tencent cluster entity spec +// +// swagger:model V1SpectroTencentClusterEntitySpec +type V1SpectroTencentClusterEntitySpec struct { + + // Cloud account uid to be used for cluster provisioning + // Required: true + CloudAccountUID *string `json:"cloudAccountUid"` + + // cloud config + // Required: true + CloudConfig *V1TencentClusterConfig `json:"cloudConfig"` + + // General cluster configuration like health, patching settings, namespace resource allocation, rbac + ClusterConfig *V1ClusterConfigEntity `json:"clusterConfig,omitempty"` + + // machinepoolconfig + Machinepoolconfig []*V1TencentMachinePoolConfigEntity `json:"machinepoolconfig"` + + // policies + Policies *V1SpectroClusterPolicies `json:"policies,omitempty"` + + // profiles + Profiles []*V1SpectroClusterProfileEntity `json:"profiles"` +} + +// Validate validates this v1 spectro tencent cluster entity spec +func (m *V1SpectroTencentClusterEntitySpec) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateCloudAccountUID(formats); err != nil { + res = append(res, err) + } + + if err := m.validateCloudConfig(formats); err != nil { + res = append(res, err) + } + + if err := m.validateClusterConfig(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMachinepoolconfig(formats); err != nil { + res = append(res, err) + } + + if err := m.validatePolicies(formats); err != nil { + res = append(res, err) + } + + if err := m.validateProfiles(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1SpectroTencentClusterEntitySpec) validateCloudAccountUID(formats strfmt.Registry) error { + + if err := validate.Required("spec"+"."+"cloudAccountUid", "body", m.CloudAccountUID); err != nil { + return err + } + + return nil +} + +func (m *V1SpectroTencentClusterEntitySpec) validateCloudConfig(formats strfmt.Registry) error { + + if err := validate.Required("spec"+"."+"cloudConfig", "body", m.CloudConfig); err != nil { + return err + } + + if m.CloudConfig != nil { + if err := m.CloudConfig.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec" + "." + "cloudConfig") + } + return err + } + } + + return nil +} + +func (m *V1SpectroTencentClusterEntitySpec) validateClusterConfig(formats strfmt.Registry) error { + + if swag.IsZero(m.ClusterConfig) { // not required + return nil + } + + if m.ClusterConfig != nil { + if err := m.ClusterConfig.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec" + "." + "clusterConfig") + } + return err + } + } + + return nil +} + +func (m *V1SpectroTencentClusterEntitySpec) validateMachinepoolconfig(formats strfmt.Registry) error { + + if swag.IsZero(m.Machinepoolconfig) { // not required + return nil + } + + for i := 0; i < len(m.Machinepoolconfig); i++ { + if swag.IsZero(m.Machinepoolconfig[i]) { // not required + continue + } + + if m.Machinepoolconfig[i] != nil { + if err := m.Machinepoolconfig[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec" + "." + "machinepoolconfig" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1SpectroTencentClusterEntitySpec) validatePolicies(formats strfmt.Registry) error { + + if swag.IsZero(m.Policies) { // not required + return nil + } + + if m.Policies != nil { + if err := m.Policies.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec" + "." + "policies") + } + return err + } + } + + return nil +} + +func (m *V1SpectroTencentClusterEntitySpec) validateProfiles(formats strfmt.Registry) error { + + if swag.IsZero(m.Profiles) { // not required + return nil + } + + for i := 0; i < len(m.Profiles); i++ { + if swag.IsZero(m.Profiles[i]) { // not required + continue + } + + if m.Profiles[i] != nil { + if err := m.Profiles[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec" + "." + "profiles" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1SpectroTencentClusterEntitySpec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1SpectroTencentClusterEntitySpec) UnmarshalBinary(b []byte) error { + var res V1SpectroTencentClusterEntitySpec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_spectro_tencent_cluster_rate_entity.go b/api/models/v1_spectro_tencent_cluster_rate_entity.go new file mode 100644 index 00000000..5c646890 --- /dev/null +++ b/api/models/v1_spectro_tencent_cluster_rate_entity.go @@ -0,0 +1,105 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1SpectroTencentClusterRateEntity Spectro Tencent cluster request payload for estimating rate +// +// swagger:model v1SpectroTencentClusterRateEntity +type V1SpectroTencentClusterRateEntity struct { + + // cloud config + CloudConfig *V1TencentClusterConfig `json:"cloudConfig,omitempty"` + + // machinepoolconfig + Machinepoolconfig []*V1TencentMachinePoolConfigEntity `json:"machinepoolconfig"` +} + +// Validate validates this v1 spectro tencent cluster rate entity +func (m *V1SpectroTencentClusterRateEntity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateCloudConfig(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMachinepoolconfig(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1SpectroTencentClusterRateEntity) validateCloudConfig(formats strfmt.Registry) error { + + if swag.IsZero(m.CloudConfig) { // not required + return nil + } + + if m.CloudConfig != nil { + if err := m.CloudConfig.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("cloudConfig") + } + return err + } + } + + return nil +} + +func (m *V1SpectroTencentClusterRateEntity) validateMachinepoolconfig(formats strfmt.Registry) error { + + if swag.IsZero(m.Machinepoolconfig) { // not required + return nil + } + + for i := 0; i < len(m.Machinepoolconfig); i++ { + if swag.IsZero(m.Machinepoolconfig[i]) { // not required + continue + } + + if m.Machinepoolconfig[i] != nil { + if err := m.Machinepoolconfig[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("machinepoolconfig" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1SpectroTencentClusterRateEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1SpectroTencentClusterRateEntity) UnmarshalBinary(b []byte) error { + var res V1SpectroTencentClusterRateEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_spectro_virtual_cluster_entity.go b/api/models/v1_spectro_virtual_cluster_entity.go new file mode 100644 index 00000000..aa9a0ddc --- /dev/null +++ b/api/models/v1_spectro_virtual_cluster_entity.go @@ -0,0 +1,273 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1SpectroVirtualClusterEntity Spectro virtual cluster request payload for create and update +// +// swagger:model v1SpectroVirtualClusterEntity +type V1SpectroVirtualClusterEntity struct { + + // metadata + Metadata *V1ObjectMeta `json:"metadata,omitempty"` + + // spec + Spec *V1SpectroVirtualClusterEntitySpec `json:"spec,omitempty"` +} + +// Validate validates this v1 spectro virtual cluster entity +func (m *V1SpectroVirtualClusterEntity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSpec(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1SpectroVirtualClusterEntity) validateMetadata(formats strfmt.Registry) error { + + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } + return err + } + } + + return nil +} + +func (m *V1SpectroVirtualClusterEntity) validateSpec(formats strfmt.Registry) error { + + if swag.IsZero(m.Spec) { // not required + return nil + } + + if m.Spec != nil { + if err := m.Spec.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1SpectroVirtualClusterEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1SpectroVirtualClusterEntity) UnmarshalBinary(b []byte) error { + var res V1SpectroVirtualClusterEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} + +// V1SpectroVirtualClusterEntitySpec v1 spectro virtual cluster entity spec +// +// swagger:model V1SpectroVirtualClusterEntitySpec +type V1SpectroVirtualClusterEntitySpec struct { + + // cloud config + CloudConfig *V1VirtualClusterConfig `json:"cloudConfig,omitempty"` + + // General cluster configuration like health, patching settings, namespace resource allocation, rbac + // Required: true + ClusterConfig *V1ClusterConfigEntity `json:"clusterConfig"` + + // machinepoolconfig + Machinepoolconfig []*V1VirtualMachinePoolConfigEntity `json:"machinepoolconfig"` + + // policies + Policies *V1SpectroClusterPolicies `json:"policies,omitempty"` + + // profiles + Profiles []*V1SpectroClusterProfileEntity `json:"profiles"` +} + +// Validate validates this v1 spectro virtual cluster entity spec +func (m *V1SpectroVirtualClusterEntitySpec) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateCloudConfig(formats); err != nil { + res = append(res, err) + } + + if err := m.validateClusterConfig(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMachinepoolconfig(formats); err != nil { + res = append(res, err) + } + + if err := m.validatePolicies(formats); err != nil { + res = append(res, err) + } + + if err := m.validateProfiles(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1SpectroVirtualClusterEntitySpec) validateCloudConfig(formats strfmt.Registry) error { + + if swag.IsZero(m.CloudConfig) { // not required + return nil + } + + if m.CloudConfig != nil { + if err := m.CloudConfig.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec" + "." + "cloudConfig") + } + return err + } + } + + return nil +} + +func (m *V1SpectroVirtualClusterEntitySpec) validateClusterConfig(formats strfmt.Registry) error { + + if err := validate.Required("spec"+"."+"clusterConfig", "body", m.ClusterConfig); err != nil { + return err + } + + if m.ClusterConfig != nil { + if err := m.ClusterConfig.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec" + "." + "clusterConfig") + } + return err + } + } + + return nil +} + +func (m *V1SpectroVirtualClusterEntitySpec) validateMachinepoolconfig(formats strfmt.Registry) error { + + if swag.IsZero(m.Machinepoolconfig) { // not required + return nil + } + + for i := 0; i < len(m.Machinepoolconfig); i++ { + if swag.IsZero(m.Machinepoolconfig[i]) { // not required + continue + } + + if m.Machinepoolconfig[i] != nil { + if err := m.Machinepoolconfig[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec" + "." + "machinepoolconfig" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1SpectroVirtualClusterEntitySpec) validatePolicies(formats strfmt.Registry) error { + + if swag.IsZero(m.Policies) { // not required + return nil + } + + if m.Policies != nil { + if err := m.Policies.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec" + "." + "policies") + } + return err + } + } + + return nil +} + +func (m *V1SpectroVirtualClusterEntitySpec) validateProfiles(formats strfmt.Registry) error { + + if swag.IsZero(m.Profiles) { // not required + return nil + } + + for i := 0; i < len(m.Profiles); i++ { + if swag.IsZero(m.Profiles[i]) { // not required + continue + } + + if m.Profiles[i] != nil { + if err := m.Profiles[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec" + "." + "profiles" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1SpectroVirtualClusterEntitySpec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1SpectroVirtualClusterEntitySpec) UnmarshalBinary(b []byte) error { + var res V1SpectroVirtualClusterEntitySpec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_spectro_vsphere_cluster_entity.go b/api/models/v1_spectro_vsphere_cluster_entity.go new file mode 100644 index 00000000..ffe905b2 --- /dev/null +++ b/api/models/v1_spectro_vsphere_cluster_entity.go @@ -0,0 +1,279 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1SpectroVsphereClusterEntity vSphere cluster request payload for create and update +// +// swagger:model v1SpectroVsphereClusterEntity +type V1SpectroVsphereClusterEntity struct { + + // metadata + Metadata *V1ObjectMeta `json:"metadata,omitempty"` + + // spec + Spec *V1SpectroVsphereClusterEntitySpec `json:"spec,omitempty"` +} + +// Validate validates this v1 spectro vsphere cluster entity +func (m *V1SpectroVsphereClusterEntity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSpec(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1SpectroVsphereClusterEntity) validateMetadata(formats strfmt.Registry) error { + + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } + return err + } + } + + return nil +} + +func (m *V1SpectroVsphereClusterEntity) validateSpec(formats strfmt.Registry) error { + + if swag.IsZero(m.Spec) { // not required + return nil + } + + if m.Spec != nil { + if err := m.Spec.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1SpectroVsphereClusterEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1SpectroVsphereClusterEntity) UnmarshalBinary(b []byte) error { + var res V1SpectroVsphereClusterEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} + +// V1SpectroVsphereClusterEntitySpec v1 spectro vsphere cluster entity spec +// +// swagger:model V1SpectroVsphereClusterEntitySpec +type V1SpectroVsphereClusterEntitySpec struct { + + // Cloud account uid to be used for cluster provisioning + CloudAccountUID string `json:"cloudAccountUid,omitempty"` + + // cloud config + // Required: true + CloudConfig *V1VsphereClusterConfigEntity `json:"cloudConfig"` + + // General cluster configuration like health, patching settings, namespace resource allocation, rbac + ClusterConfig *V1ClusterConfigEntity `json:"clusterConfig,omitempty"` + + // Appliance (Edge Host) uid for Edge env + EdgeHostUID string `json:"edgeHostUid,omitempty"` + + // machinepoolconfig + Machinepoolconfig []*V1VsphereMachinePoolConfigEntity `json:"machinepoolconfig"` + + // policies + Policies *V1SpectroClusterPolicies `json:"policies,omitempty"` + + // profiles + Profiles []*V1SpectroClusterProfileEntity `json:"profiles"` +} + +// Validate validates this v1 spectro vsphere cluster entity spec +func (m *V1SpectroVsphereClusterEntitySpec) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateCloudConfig(formats); err != nil { + res = append(res, err) + } + + if err := m.validateClusterConfig(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMachinepoolconfig(formats); err != nil { + res = append(res, err) + } + + if err := m.validatePolicies(formats); err != nil { + res = append(res, err) + } + + if err := m.validateProfiles(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1SpectroVsphereClusterEntitySpec) validateCloudConfig(formats strfmt.Registry) error { + + if err := validate.Required("spec"+"."+"cloudConfig", "body", m.CloudConfig); err != nil { + return err + } + + if m.CloudConfig != nil { + if err := m.CloudConfig.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec" + "." + "cloudConfig") + } + return err + } + } + + return nil +} + +func (m *V1SpectroVsphereClusterEntitySpec) validateClusterConfig(formats strfmt.Registry) error { + + if swag.IsZero(m.ClusterConfig) { // not required + return nil + } + + if m.ClusterConfig != nil { + if err := m.ClusterConfig.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec" + "." + "clusterConfig") + } + return err + } + } + + return nil +} + +func (m *V1SpectroVsphereClusterEntitySpec) validateMachinepoolconfig(formats strfmt.Registry) error { + + if swag.IsZero(m.Machinepoolconfig) { // not required + return nil + } + + for i := 0; i < len(m.Machinepoolconfig); i++ { + if swag.IsZero(m.Machinepoolconfig[i]) { // not required + continue + } + + if m.Machinepoolconfig[i] != nil { + if err := m.Machinepoolconfig[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec" + "." + "machinepoolconfig" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1SpectroVsphereClusterEntitySpec) validatePolicies(formats strfmt.Registry) error { + + if swag.IsZero(m.Policies) { // not required + return nil + } + + if m.Policies != nil { + if err := m.Policies.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec" + "." + "policies") + } + return err + } + } + + return nil +} + +func (m *V1SpectroVsphereClusterEntitySpec) validateProfiles(formats strfmt.Registry) error { + + if swag.IsZero(m.Profiles) { // not required + return nil + } + + for i := 0; i < len(m.Profiles); i++ { + if swag.IsZero(m.Profiles[i]) { // not required + continue + } + + if m.Profiles[i] != nil { + if err := m.Profiles[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec" + "." + "profiles" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1SpectroVsphereClusterEntitySpec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1SpectroVsphereClusterEntitySpec) UnmarshalBinary(b []byte) error { + var res V1SpectroVsphereClusterEntitySpec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_spectro_vsphere_cluster_import_entity.go b/api/models/v1_spectro_vsphere_cluster_import_entity.go new file mode 100644 index 00000000..941e5253 --- /dev/null +++ b/api/models/v1_spectro_vsphere_cluster_import_entity.go @@ -0,0 +1,155 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1SpectroVsphereClusterImportEntity Spectro Vsphere cluster import request payload +// +// swagger:model v1SpectroVsphereClusterImportEntity +type V1SpectroVsphereClusterImportEntity struct { + + // metadata + Metadata *V1ObjectMetaInputEntity `json:"metadata,omitempty"` + + // spec + Spec *V1SpectroVsphereClusterImportEntitySpec `json:"spec,omitempty"` +} + +// Validate validates this v1 spectro vsphere cluster import entity +func (m *V1SpectroVsphereClusterImportEntity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSpec(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1SpectroVsphereClusterImportEntity) validateMetadata(formats strfmt.Registry) error { + + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } + return err + } + } + + return nil +} + +func (m *V1SpectroVsphereClusterImportEntity) validateSpec(formats strfmt.Registry) error { + + if swag.IsZero(m.Spec) { // not required + return nil + } + + if m.Spec != nil { + if err := m.Spec.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1SpectroVsphereClusterImportEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1SpectroVsphereClusterImportEntity) UnmarshalBinary(b []byte) error { + var res V1SpectroVsphereClusterImportEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} + +// V1SpectroVsphereClusterImportEntitySpec v1 spectro vsphere cluster import entity spec +// +// swagger:model V1SpectroVsphereClusterImportEntitySpec +type V1SpectroVsphereClusterImportEntitySpec struct { + + // cluster config + ClusterConfig *V1ImportClusterConfig `json:"clusterConfig,omitempty"` +} + +// Validate validates this v1 spectro vsphere cluster import entity spec +func (m *V1SpectroVsphereClusterImportEntitySpec) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateClusterConfig(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1SpectroVsphereClusterImportEntitySpec) validateClusterConfig(formats strfmt.Registry) error { + + if swag.IsZero(m.ClusterConfig) { // not required + return nil + } + + if m.ClusterConfig != nil { + if err := m.ClusterConfig.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec" + "." + "clusterConfig") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1SpectroVsphereClusterImportEntitySpec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1SpectroVsphereClusterImportEntitySpec) UnmarshalBinary(b []byte) error { + var res V1SpectroVsphereClusterImportEntitySpec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_spectro_vsphere_cluster_rate_entity.go b/api/models/v1_spectro_vsphere_cluster_rate_entity.go new file mode 100644 index 00000000..c81583c5 --- /dev/null +++ b/api/models/v1_spectro_vsphere_cluster_rate_entity.go @@ -0,0 +1,105 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1SpectroVsphereClusterRateEntity Vsphere cluster request payload for estimating rate +// +// swagger:model v1SpectroVsphereClusterRateEntity +type V1SpectroVsphereClusterRateEntity struct { + + // cloud config + CloudConfig *V1VsphereClusterConfigEntity `json:"cloudConfig,omitempty"` + + // machinepoolconfig + Machinepoolconfig []*V1VsphereMachinePoolConfigEntity `json:"machinepoolconfig"` +} + +// Validate validates this v1 spectro vsphere cluster rate entity +func (m *V1SpectroVsphereClusterRateEntity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateCloudConfig(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMachinepoolconfig(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1SpectroVsphereClusterRateEntity) validateCloudConfig(formats strfmt.Registry) error { + + if swag.IsZero(m.CloudConfig) { // not required + return nil + } + + if m.CloudConfig != nil { + if err := m.CloudConfig.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("cloudConfig") + } + return err + } + } + + return nil +} + +func (m *V1SpectroVsphereClusterRateEntity) validateMachinepoolconfig(formats strfmt.Registry) error { + + if swag.IsZero(m.Machinepoolconfig) { // not required + return nil + } + + for i := 0; i < len(m.Machinepoolconfig); i++ { + if swag.IsZero(m.Machinepoolconfig[i]) { // not required + continue + } + + if m.Machinepoolconfig[i] != nil { + if err := m.Machinepoolconfig[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("machinepoolconfig" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1SpectroVsphereClusterRateEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1SpectroVsphereClusterRateEntity) UnmarshalBinary(b []byte) error { + var res V1SpectroVsphereClusterRateEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_spot_market_options.go b/api/models/v1_spot_market_options.go new file mode 100644 index 00000000..e04aa088 --- /dev/null +++ b/api/models/v1_spot_market_options.go @@ -0,0 +1,43 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1SpotMarketOptions SpotMarketOptions defines the options available to a user when configuring Machines to run on Spot instances. Most users should provide an empty struct. +// +// swagger:model v1SpotMarketOptions +type V1SpotMarketOptions struct { + + // MaxPrice defines the maximum price the user is willing to pay for Spot VM instances + MaxPrice string `json:"maxPrice,omitempty"` +} + +// Validate validates this v1 spot market options +func (m *V1SpotMarketOptions) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1SpotMarketOptions) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1SpotMarketOptions) UnmarshalBinary(b []byte) error { + var res V1SpotMarketOptions + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_spot_vm_options.go b/api/models/v1_spot_vm_options.go new file mode 100644 index 00000000..632dc717 --- /dev/null +++ b/api/models/v1_spot_vm_options.go @@ -0,0 +1,43 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1SpotVMOptions SpotVMOptions defines the options relevant to running the Machine on Spot VMs +// +// swagger:model v1SpotVMOptions +type V1SpotVMOptions struct { + + // MaxPrice defines the maximum price the user is willing to pay for Spot VM instances + MaxPrice string `json:"maxPrice,omitempty"` +} + +// Validate validates this v1 spot VM options +func (m *V1SpotVMOptions) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1SpotVMOptions) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1SpotVMOptions) UnmarshalBinary(b []byte) error { + var res V1SpotVMOptions + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_sso_login.go b/api/models/v1_sso_login.go new file mode 100644 index 00000000..083466ba --- /dev/null +++ b/api/models/v1_sso_login.go @@ -0,0 +1,52 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1SsoLogin Describes the allowed sso login details +// +// swagger:model v1SsoLogin +type V1SsoLogin struct { + + // Describes the display name for the sso login + DisplayName string `json:"displayName,omitempty"` + + // Describes the url path for the sso login + Logo string `json:"logo,omitempty"` + + // Describes the processed name for the sso login + Name string `json:"name,omitempty"` + + // Describes the sso login url for the authentication + RedirectURI string `json:"redirectUri,omitempty"` +} + +// Validate validates this v1 sso login +func (m *V1SsoLogin) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1SsoLogin) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1SsoLogin) UnmarshalBinary(b []byte) error { + var res V1SsoLogin + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_sso_logins.go b/api/models/v1_sso_logins.go new file mode 100644 index 00000000..021ed3b6 --- /dev/null +++ b/api/models/v1_sso_logins.go @@ -0,0 +1,50 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1SsoLogins Describes the allowed sso logins +// +// swagger:model v1SsoLogins +type V1SsoLogins []*V1SsoLogin + +// Validate validates this v1 sso logins +func (m V1SsoLogins) Validate(formats strfmt.Registry) error { + var res []error + + if err := validate.UniqueItems("", "body", m); err != nil { + return err + } + + for i := 0; i < len(m); i++ { + if swag.IsZero(m[i]) { // not required + continue + } + + if m[i] != nil { + if err := m[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName(strconv.Itoa(i)) + } + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/models/v1_storage_account.go b/api/models/v1_storage_account.go new file mode 100644 index 00000000..dff011ea --- /dev/null +++ b/api/models/v1_storage_account.go @@ -0,0 +1,52 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1StorageAccount Azure storage account provides a unique namespace for your Azure resources +// +// swagger:model v1StorageAccount +type V1StorageAccount struct { + + // Fully qualified resource ID for the resource + ID string `json:"id,omitempty"` + + // The kind of the resource + Kind string `json:"kind,omitempty"` + + // The geo-location where the resource lives + Location string `json:"location,omitempty"` + + // The name of the resource + Name string `json:"name,omitempty"` +} + +// Validate validates this v1 storage account +func (m *V1StorageAccount) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1StorageAccount) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1StorageAccount) UnmarshalBinary(b []byte) error { + var res V1StorageAccount + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_storage_account_entity.go b/api/models/v1_storage_account_entity.go new file mode 100644 index 00000000..4b09451e --- /dev/null +++ b/api/models/v1_storage_account_entity.go @@ -0,0 +1,46 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1StorageAccountEntity Azure storage account entity +// +// swagger:model v1StorageAccountEntity +type V1StorageAccountEntity struct { + + // Azure storage account id + ID string `json:"id,omitempty"` + + // Azure storage account name + Name string `json:"name,omitempty"` +} + +// Validate validates this v1 storage account entity +func (m *V1StorageAccountEntity) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1StorageAccountEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1StorageAccountEntity) UnmarshalBinary(b []byte) error { + var res V1StorageAccountEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_storage_container.go b/api/models/v1_storage_container.go new file mode 100644 index 00000000..b293d891 --- /dev/null +++ b/api/models/v1_storage_container.go @@ -0,0 +1,49 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1StorageContainer Azure storage container organizes a set of blobs, similar to a directory in a file system +// +// swagger:model v1StorageContainer +type V1StorageContainer struct { + + // Fully qualified resource ID for the resource. + ID string `json:"id,omitempty"` + + // The name of the resource + Name string `json:"name,omitempty"` + + // The type of the resource. E.g. "Microsoft.Compute/virtualMachines" + Type string `json:"type,omitempty"` +} + +// Validate validates this v1 storage container +func (m *V1StorageContainer) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1StorageContainer) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1StorageContainer) UnmarshalBinary(b []byte) error { + var res V1StorageContainer + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_storage_cost.go b/api/models/v1_storage_cost.go new file mode 100644 index 00000000..9ecdde0f --- /dev/null +++ b/api/models/v1_storage_cost.go @@ -0,0 +1,83 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1StorageCost Cloud storage cost +// +// swagger:model v1StorageCost +type V1StorageCost struct { + + // Cloud storage upper limit which is free. + DiscountedUsage string `json:"discountedUsage,omitempty"` + + // Array of cloud storage range prices + Price []*V1StoragePrice `json:"price"` +} + +// Validate validates this v1 storage cost +func (m *V1StorageCost) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validatePrice(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1StorageCost) validatePrice(formats strfmt.Registry) error { + + if swag.IsZero(m.Price) { // not required + return nil + } + + for i := 0; i < len(m.Price); i++ { + if swag.IsZero(m.Price[i]) { // not required + continue + } + + if m.Price[i] != nil { + if err := m.Price[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("price" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1StorageCost) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1StorageCost) UnmarshalBinary(b []byte) error { + var res V1StorageCost + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_storage_price.go b/api/models/v1_storage_price.go new file mode 100644 index 00000000..39bdbced --- /dev/null +++ b/api/models/v1_storage_price.go @@ -0,0 +1,46 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1StoragePrice Cloud storage price within an upper limit. +// +// swagger:model v1StoragePrice +type V1StoragePrice struct { + + // Upper limit of cloud storage usage + Limit string `json:"limit,omitempty"` + + // Price of cloud storage type + Price string `json:"price,omitempty"` +} + +// Validate validates this v1 storage price +func (m *V1StoragePrice) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1StoragePrice) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1StoragePrice) UnmarshalBinary(b []byte) error { + var res V1StoragePrice + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_storage_rate.go b/api/models/v1_storage_rate.go new file mode 100644 index 00000000..45dce3d8 --- /dev/null +++ b/api/models/v1_storage_rate.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1StorageRate Storage estimated rate information +// +// swagger:model v1StorageRate +type V1StorageRate struct { + + // iops + Iops float64 `json:"iops,omitempty"` + + // rate + Rate float64 `json:"rate"` + + // size g b + SizeGB float64 `json:"sizeGB,omitempty"` + + // throughput + Throughput float64 `json:"throughput,omitempty"` + + // type + Type string `json:"type,omitempty"` +} + +// Validate validates this v1 storage rate +func (m *V1StorageRate) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1StorageRate) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1StorageRate) UnmarshalBinary(b []byte) error { + var res V1StorageRate + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_storage_type.go b/api/models/v1_storage_type.go new file mode 100644 index 00000000..63d5bae8 --- /dev/null +++ b/api/models/v1_storage_type.go @@ -0,0 +1,127 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1StorageType Cloud cloud Storage type details +// +// swagger:model v1StorageType +type V1StorageType struct { + + // cost + Cost *V1StorageCost `json:"cost,omitempty"` + + // iops cost + IopsCost *V1StorageCost `json:"iopsCost,omitempty"` + + // kind of storage type + Kind string `json:"kind,omitempty"` + + // Name of the storage type + Name string `json:"name,omitempty"` + + // throughput cost + ThroughputCost *V1StorageCost `json:"throughputCost,omitempty"` +} + +// Validate validates this v1 storage type +func (m *V1StorageType) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateCost(formats); err != nil { + res = append(res, err) + } + + if err := m.validateIopsCost(formats); err != nil { + res = append(res, err) + } + + if err := m.validateThroughputCost(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1StorageType) validateCost(formats strfmt.Registry) error { + + if swag.IsZero(m.Cost) { // not required + return nil + } + + if m.Cost != nil { + if err := m.Cost.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("cost") + } + return err + } + } + + return nil +} + +func (m *V1StorageType) validateIopsCost(formats strfmt.Registry) error { + + if swag.IsZero(m.IopsCost) { // not required + return nil + } + + if m.IopsCost != nil { + if err := m.IopsCost.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("iopsCost") + } + return err + } + } + + return nil +} + +func (m *V1StorageType) validateThroughputCost(formats strfmt.Registry) error { + + if swag.IsZero(m.ThroughputCost) { // not required + return nil + } + + if m.ThroughputCost != nil { + if err := m.ThroughputCost.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("throughputCost") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1StorageType) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1StorageType) UnmarshalBinary(b []byte) error { + var res V1StorageType + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_subnet.go b/api/models/v1_subnet.go new file mode 100644 index 00000000..35f19af9 --- /dev/null +++ b/api/models/v1_subnet.go @@ -0,0 +1,49 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1Subnet v1 subnet +// +// swagger:model v1Subnet +type V1Subnet struct { + + // CidrBlock is the CIDR block to be used when the provider creates a managed Vnet. + CidrBlock string `json:"cidrBlock,omitempty"` + + // name + Name string `json:"name,omitempty"` + + // Network Security Group(NSG) to be attached to subnet. NSG for a control plane subnet, should allow inbound to port 6443, as port 6443 is used by kubeadm to bootstrap the control planes + SecurityGroupName string `json:"securityGroupName,omitempty"` +} + +// Validate validates this v1 subnet +func (m *V1Subnet) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1Subnet) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1Subnet) UnmarshalBinary(b []byte) error { + var res V1Subnet + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_subscription.go b/api/models/v1_subscription.go new file mode 100644 index 00000000..b044fbb0 --- /dev/null +++ b/api/models/v1_subscription.go @@ -0,0 +1,52 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1Subscription Azure Subscription Type +// +// swagger:model v1Subscription +type V1Subscription struct { + + // The authorization source of the request. Valid values are one or more combinations of Legacy, RoleBased, Bypassed, Direct and Management + AuthorizationSource string `json:"authorizationSource,omitempty"` + + // The subscription display name + DisplayName string `json:"displayName,omitempty"` + + // The subscription state. Possible values are Enabled, Warned, PastDue, Disabled, and Deleted. + State string `json:"state,omitempty"` + + // The subscription ID + SubscriptionID string `json:"subscriptionId,omitempty"` +} + +// Validate validates this v1 subscription +func (m *V1Subscription) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1Subscription) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1Subscription) UnmarshalBinary(b []byte) error { + var res V1Subscription + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_syft_dependency.go b/api/models/v1_syft_dependency.go new file mode 100644 index 00000000..4f1c60f0 --- /dev/null +++ b/api/models/v1_syft_dependency.go @@ -0,0 +1,49 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1SyftDependency Compliance Scan Syft Dependency +// +// swagger:model v1SyftDependency +type V1SyftDependency struct { + + // name + Name string `json:"name,omitempty"` + + // type + Type string `json:"type,omitempty"` + + // version + Version string `json:"version,omitempty"` +} + +// Validate validates this v1 syft dependency +func (m *V1SyftDependency) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1SyftDependency) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1SyftDependency) UnmarshalBinary(b []byte) error { + var res V1SyftDependency + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_syft_dependency_entity.go b/api/models/v1_syft_dependency_entity.go new file mode 100644 index 00000000..1f9b4599 --- /dev/null +++ b/api/models/v1_syft_dependency_entity.go @@ -0,0 +1,49 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1SyftDependencyEntity Syft dependency +// +// swagger:model v1SyftDependencyEntity +type V1SyftDependencyEntity struct { + + // name + Name string `json:"name,omitempty"` + + // type + Type string `json:"type,omitempty"` + + // version + Version string `json:"version,omitempty"` +} + +// Validate validates this v1 syft dependency entity +func (m *V1SyftDependencyEntity) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1SyftDependencyEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1SyftDependencyEntity) UnmarshalBinary(b []byte) error { + var res V1SyftDependencyEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_syft_entity.go b/api/models/v1_syft_entity.go new file mode 100644 index 00000000..9a3a14d5 --- /dev/null +++ b/api/models/v1_syft_entity.go @@ -0,0 +1,150 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "encoding/json" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1SyftEntity Syft response +// +// swagger:model v1SyftEntity +type V1SyftEntity struct { + + // report + // Required: true + Report *V1SyftReportEntity `json:"report"` + + // request Uid + // Required: true + RequestUID *string `json:"requestUid"` + + // status + // Required: true + // Enum: [Completed InProgress Failed Initiated] + Status *string `json:"status"` +} + +// Validate validates this v1 syft entity +func (m *V1SyftEntity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateReport(formats); err != nil { + res = append(res, err) + } + + if err := m.validateRequestUID(formats); err != nil { + res = append(res, err) + } + + if err := m.validateStatus(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1SyftEntity) validateReport(formats strfmt.Registry) error { + + if err := validate.Required("report", "body", m.Report); err != nil { + return err + } + + if m.Report != nil { + if err := m.Report.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("report") + } + return err + } + } + + return nil +} + +func (m *V1SyftEntity) validateRequestUID(formats strfmt.Registry) error { + + if err := validate.Required("requestUid", "body", m.RequestUID); err != nil { + return err + } + + return nil +} + +var v1SyftEntityTypeStatusPropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["Completed","InProgress","Failed","Initiated"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + v1SyftEntityTypeStatusPropEnum = append(v1SyftEntityTypeStatusPropEnum, v) + } +} + +const ( + + // V1SyftEntityStatusCompleted captures enum value "Completed" + V1SyftEntityStatusCompleted string = "Completed" + + // V1SyftEntityStatusInProgress captures enum value "InProgress" + V1SyftEntityStatusInProgress string = "InProgress" + + // V1SyftEntityStatusFailed captures enum value "Failed" + V1SyftEntityStatusFailed string = "Failed" + + // V1SyftEntityStatusInitiated captures enum value "Initiated" + V1SyftEntityStatusInitiated string = "Initiated" +) + +// prop value enum +func (m *V1SyftEntity) validateStatusEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, v1SyftEntityTypeStatusPropEnum, true); err != nil { + return err + } + return nil +} + +func (m *V1SyftEntity) validateStatus(formats strfmt.Registry) error { + + if err := validate.Required("status", "body", m.Status); err != nil { + return err + } + + // value enum + if err := m.validateStatusEnum("status", "body", *m.Status); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1SyftEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1SyftEntity) UnmarshalBinary(b []byte) error { + var res V1SyftEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_syft_image_context.go b/api/models/v1_syft_image_context.go new file mode 100644 index 00000000..9323a12f --- /dev/null +++ b/api/models/v1_syft_image_context.go @@ -0,0 +1,49 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1SyftImageContext Compliance Scan Syft Image Context +// +// swagger:model v1SyftImageContext +type V1SyftImageContext struct { + + // container name + ContainerName string `json:"containerName,omitempty"` + + // namespace + Namespace string `json:"namespace,omitempty"` + + // pod name + PodName string `json:"podName,omitempty"` +} + +// Validate validates this v1 syft image context +func (m *V1SyftImageContext) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1SyftImageContext) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1SyftImageContext) UnmarshalBinary(b []byte) error { + var res V1SyftImageContext + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_syft_report.go b/api/models/v1_syft_report.go new file mode 100644 index 00000000..44676bc5 --- /dev/null +++ b/api/models/v1_syft_report.go @@ -0,0 +1,202 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1SyftReport Compliance Scan Syft Report +// +// swagger:model v1SyftReport +type V1SyftReport struct { + + // dependencies + Dependencies []*V1SyftDependency `json:"dependencies"` + + // image + Image string `json:"image,omitempty"` + + // image contexts + ImageContexts []*V1SyftImageContext `json:"imageContexts"` + + // is s b o m exist + IsSBOMExist bool `json:"isSBOMExist,omitempty"` + + // state + State string `json:"state,omitempty"` + + // time + // Format: date-time + Time V1Time `json:"time,omitempty"` + + // vulnerabilities + Vulnerabilities []*V1SyftVulnerability `json:"vulnerabilities"` + + // vulnerability summary + VulnerabilitySummary *V1SyftVulnerabilitySummary `json:"vulnerabilitySummary,omitempty"` +} + +// Validate validates this v1 syft report +func (m *V1SyftReport) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateDependencies(formats); err != nil { + res = append(res, err) + } + + if err := m.validateImageContexts(formats); err != nil { + res = append(res, err) + } + + if err := m.validateTime(formats); err != nil { + res = append(res, err) + } + + if err := m.validateVulnerabilities(formats); err != nil { + res = append(res, err) + } + + if err := m.validateVulnerabilitySummary(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1SyftReport) validateDependencies(formats strfmt.Registry) error { + + if swag.IsZero(m.Dependencies) { // not required + return nil + } + + for i := 0; i < len(m.Dependencies); i++ { + if swag.IsZero(m.Dependencies[i]) { // not required + continue + } + + if m.Dependencies[i] != nil { + if err := m.Dependencies[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("dependencies" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1SyftReport) validateImageContexts(formats strfmt.Registry) error { + + if swag.IsZero(m.ImageContexts) { // not required + return nil + } + + for i := 0; i < len(m.ImageContexts); i++ { + if swag.IsZero(m.ImageContexts[i]) { // not required + continue + } + + if m.ImageContexts[i] != nil { + if err := m.ImageContexts[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("imageContexts" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1SyftReport) validateTime(formats strfmt.Registry) error { + + if swag.IsZero(m.Time) { // not required + return nil + } + + if err := m.Time.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("time") + } + return err + } + + return nil +} + +func (m *V1SyftReport) validateVulnerabilities(formats strfmt.Registry) error { + + if swag.IsZero(m.Vulnerabilities) { // not required + return nil + } + + for i := 0; i < len(m.Vulnerabilities); i++ { + if swag.IsZero(m.Vulnerabilities[i]) { // not required + continue + } + + if m.Vulnerabilities[i] != nil { + if err := m.Vulnerabilities[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("vulnerabilities" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1SyftReport) validateVulnerabilitySummary(formats strfmt.Registry) error { + + if swag.IsZero(m.VulnerabilitySummary) { // not required + return nil + } + + if m.VulnerabilitySummary != nil { + if err := m.VulnerabilitySummary.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("vulnerabilitySummary") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1SyftReport) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1SyftReport) UnmarshalBinary(b []byte) error { + var res V1SyftReport + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_syft_report_entity.go b/api/models/v1_syft_report_entity.go new file mode 100644 index 00000000..ed150813 --- /dev/null +++ b/api/models/v1_syft_report_entity.go @@ -0,0 +1,205 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1SyftReportEntity Syft report +// +// swagger:model v1SyftReportEntity +type V1SyftReportEntity struct { + + // batch no + BatchNo int32 `json:"batchNo,omitempty"` + + // batch size + BatchSize int32 `json:"batchSize,omitempty"` + + // dependencies + Dependencies []*V1SyftDependencyEntity `json:"dependencies"` + + // image + Image string `json:"image,omitempty"` + + // image contexts + ImageContexts []*V1SyftImageContext `json:"imageContexts"` + + // sbom + Sbom string `json:"sbom,omitempty"` + + // time + // Format: date-time + Time V1Time `json:"time,omitempty"` + + // vulnerabilities + Vulnerabilities []*V1SyftVulnerabilityEntity `json:"vulnerabilities"` + + // vulnerability summary + VulnerabilitySummary *V1SyftVulnerabilitySummaryEntity `json:"vulnerabilitySummary,omitempty"` +} + +// Validate validates this v1 syft report entity +func (m *V1SyftReportEntity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateDependencies(formats); err != nil { + res = append(res, err) + } + + if err := m.validateImageContexts(formats); err != nil { + res = append(res, err) + } + + if err := m.validateTime(formats); err != nil { + res = append(res, err) + } + + if err := m.validateVulnerabilities(formats); err != nil { + res = append(res, err) + } + + if err := m.validateVulnerabilitySummary(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1SyftReportEntity) validateDependencies(formats strfmt.Registry) error { + + if swag.IsZero(m.Dependencies) { // not required + return nil + } + + for i := 0; i < len(m.Dependencies); i++ { + if swag.IsZero(m.Dependencies[i]) { // not required + continue + } + + if m.Dependencies[i] != nil { + if err := m.Dependencies[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("dependencies" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1SyftReportEntity) validateImageContexts(formats strfmt.Registry) error { + + if swag.IsZero(m.ImageContexts) { // not required + return nil + } + + for i := 0; i < len(m.ImageContexts); i++ { + if swag.IsZero(m.ImageContexts[i]) { // not required + continue + } + + if m.ImageContexts[i] != nil { + if err := m.ImageContexts[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("imageContexts" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1SyftReportEntity) validateTime(formats strfmt.Registry) error { + + if swag.IsZero(m.Time) { // not required + return nil + } + + if err := m.Time.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("time") + } + return err + } + + return nil +} + +func (m *V1SyftReportEntity) validateVulnerabilities(formats strfmt.Registry) error { + + if swag.IsZero(m.Vulnerabilities) { // not required + return nil + } + + for i := 0; i < len(m.Vulnerabilities); i++ { + if swag.IsZero(m.Vulnerabilities[i]) { // not required + continue + } + + if m.Vulnerabilities[i] != nil { + if err := m.Vulnerabilities[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("vulnerabilities" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1SyftReportEntity) validateVulnerabilitySummary(formats strfmt.Registry) error { + + if swag.IsZero(m.VulnerabilitySummary) { // not required + return nil + } + + if m.VulnerabilitySummary != nil { + if err := m.VulnerabilitySummary.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("vulnerabilitySummary") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1SyftReportEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1SyftReportEntity) UnmarshalBinary(b []byte) error { + var res V1SyftReportEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_syft_scan_context.go b/api/models/v1_syft_scan_context.go new file mode 100644 index 00000000..b581304e --- /dev/null +++ b/api/models/v1_syft_scan_context.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1SyftScanContext Compliance Scan Syft Context +// +// swagger:model v1SyftScanContext +type V1SyftScanContext struct { + + // format + Format string `json:"format,omitempty"` + + // label selector + LabelSelector string `json:"labelSelector,omitempty"` + + // namespace + Namespace string `json:"namespace,omitempty"` + + // pod name + PodName string `json:"podName,omitempty"` + + // scope + Scope string `json:"scope,omitempty"` +} + +// Validate validates this v1 syft scan context +func (m *V1SyftScanContext) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1SyftScanContext) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1SyftScanContext) UnmarshalBinary(b []byte) error { + var res V1SyftScanContext + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_syft_vulnerability.go b/api/models/v1_syft_vulnerability.go new file mode 100644 index 00000000..210b74c2 --- /dev/null +++ b/api/models/v1_syft_vulnerability.go @@ -0,0 +1,58 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1SyftVulnerability Compliance Scan Syft Vulnerability +// +// swagger:model v1SyftVulnerability +type V1SyftVulnerability struct { + + // fixed in + FixedIn string `json:"fixedIn,omitempty"` + + // installed + Installed string `json:"installed,omitempty"` + + // name + Name string `json:"name,omitempty"` + + // severity + Severity string `json:"severity,omitempty"` + + // type + Type string `json:"type,omitempty"` + + // vulnerability + Vulnerability string `json:"vulnerability,omitempty"` +} + +// Validate validates this v1 syft vulnerability +func (m *V1SyftVulnerability) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1SyftVulnerability) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1SyftVulnerability) UnmarshalBinary(b []byte) error { + var res V1SyftVulnerability + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_syft_vulnerability_entity.go b/api/models/v1_syft_vulnerability_entity.go new file mode 100644 index 00000000..c006ded1 --- /dev/null +++ b/api/models/v1_syft_vulnerability_entity.go @@ -0,0 +1,58 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1SyftVulnerabilityEntity Syft vulnerability +// +// swagger:model v1SyftVulnerabilityEntity +type V1SyftVulnerabilityEntity struct { + + // fixed in + FixedIn string `json:"fixedIn,omitempty"` + + // installed + Installed string `json:"installed,omitempty"` + + // name + Name string `json:"name,omitempty"` + + // severity + Severity string `json:"severity,omitempty"` + + // type + Type string `json:"type,omitempty"` + + // vulnerability + Vulnerability string `json:"vulnerability,omitempty"` +} + +// Validate validates this v1 syft vulnerability entity +func (m *V1SyftVulnerabilityEntity) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1SyftVulnerabilityEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1SyftVulnerabilityEntity) UnmarshalBinary(b []byte) error { + var res V1SyftVulnerabilityEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_syft_vulnerability_summary.go b/api/models/v1_syft_vulnerability_summary.go new file mode 100644 index 00000000..8a8d5e32 --- /dev/null +++ b/api/models/v1_syft_vulnerability_summary.go @@ -0,0 +1,58 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1SyftVulnerabilitySummary Compliance Scan Syft Vulnerability Summary +// +// swagger:model v1SyftVulnerabilitySummary +type V1SyftVulnerabilitySummary struct { + + // critical + Critical int32 `json:"critical,omitempty"` + + // high + High int32 `json:"high,omitempty"` + + // low + Low int32 `json:"low,omitempty"` + + // medium + Medium int32 `json:"medium,omitempty"` + + // negligible + Negligible int32 `json:"negligible,omitempty"` + + // unknown + Unknown int32 `json:"unknown,omitempty"` +} + +// Validate validates this v1 syft vulnerability summary +func (m *V1SyftVulnerabilitySummary) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1SyftVulnerabilitySummary) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1SyftVulnerabilitySummary) UnmarshalBinary(b []byte) error { + var res V1SyftVulnerabilitySummary + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_syft_vulnerability_summary_entity.go b/api/models/v1_syft_vulnerability_summary_entity.go new file mode 100644 index 00000000..5ea0e2bd --- /dev/null +++ b/api/models/v1_syft_vulnerability_summary_entity.go @@ -0,0 +1,58 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1SyftVulnerabilitySummaryEntity Syft vulnerability summary +// +// swagger:model v1SyftVulnerabilitySummaryEntity +type V1SyftVulnerabilitySummaryEntity struct { + + // critical + Critical int32 `json:"critical,omitempty"` + + // high + High int32 `json:"high,omitempty"` + + // low + Low int32 `json:"low,omitempty"` + + // medium + Medium int32 `json:"medium,omitempty"` + + // negligible + Negligible int32 `json:"negligible,omitempty"` + + // unknown + Unknown int32 `json:"unknown,omitempty"` +} + +// Validate validates this v1 syft vulnerability summary entity +func (m *V1SyftVulnerabilitySummaryEntity) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1SyftVulnerabilitySummaryEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1SyftVulnerabilitySummaryEntity) UnmarshalBinary(b []byte) error { + var res V1SyftVulnerabilitySummaryEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_system_feature.go b/api/models/v1_system_feature.go new file mode 100644 index 00000000..b9df0320 --- /dev/null +++ b/api/models/v1_system_feature.go @@ -0,0 +1,96 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1SystemFeature v1 system feature +// +// swagger:model v1SystemFeature +type V1SystemFeature struct { + + // metadata + Metadata *V1ObjectMeta `json:"metadata,omitempty"` + + // spec + Spec *V1SystemFeaturesSpec `json:"spec,omitempty"` +} + +// Validate validates this v1 system feature +func (m *V1SystemFeature) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSpec(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1SystemFeature) validateMetadata(formats strfmt.Registry) error { + + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } + return err + } + } + + return nil +} + +func (m *V1SystemFeature) validateSpec(formats strfmt.Registry) error { + + if swag.IsZero(m.Spec) { // not required + return nil + } + + if m.Spec != nil { + if err := m.Spec.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1SystemFeature) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1SystemFeature) UnmarshalBinary(b []byte) error { + var res V1SystemFeature + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_system_features.go b/api/models/v1_system_features.go new file mode 100644 index 00000000..f0255956 --- /dev/null +++ b/api/models/v1_system_features.go @@ -0,0 +1,87 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1SystemFeatures v1 system features +// +// swagger:model v1SystemFeatures +type V1SystemFeatures struct { + + // List of system features + // Required: true + // Unique: true + Items []*V1SystemFeature `json:"items"` +} + +// Validate validates this v1 system features +func (m *V1SystemFeatures) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateItems(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1SystemFeatures) validateItems(formats strfmt.Registry) error { + + if err := validate.Required("items", "body", m.Items); err != nil { + return err + } + + if err := validate.UniqueItems("items", "body", m.Items); err != nil { + return err + } + + for i := 0; i < len(m.Items); i++ { + if swag.IsZero(m.Items[i]) { // not required + continue + } + + if m.Items[i] != nil { + if err := m.Items[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("items" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1SystemFeatures) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1SystemFeatures) UnmarshalBinary(b []byte) error { + var res V1SystemFeatures + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_system_features_spec.go b/api/models/v1_system_features_spec.go new file mode 100644 index 00000000..ea76736b --- /dev/null +++ b/api/models/v1_system_features_spec.go @@ -0,0 +1,52 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1SystemFeaturesSpec v1 system features spec +// +// swagger:model v1SystemFeaturesSpec +type V1SystemFeaturesSpec struct { + + // Feature description + Description string `json:"description,omitempty"` + + // Feature doc link + DocLink string `json:"docLink,omitempty"` + + // Flag which specifies if feature is allowed or not + IsAllowed bool `json:"isAllowed"` + + // Unique Feature key + Key string `json:"key,omitempty"` +} + +// Validate validates this v1 system features spec +func (m *V1SystemFeaturesSpec) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1SystemFeaturesSpec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1SystemFeaturesSpec) UnmarshalBinary(b []byte) error { + var res V1SystemFeaturesSpec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_system_git_auth_spec.go b/api/models/v1_system_git_auth_spec.go new file mode 100644 index 00000000..ebf28da7 --- /dev/null +++ b/api/models/v1_system_git_auth_spec.go @@ -0,0 +1,80 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1SystemGitAuthSpec system git auth account specifications +// +// swagger:model v1SystemGitAuthSpec +type V1SystemGitAuthSpec struct { + + // type + Type string `json:"_type,omitempty"` + + // password + Password string `json:"password,omitempty"` + + // token + Token string `json:"token,omitempty"` + + // username + Username *V1SystemGitAuthSpec `json:"username,omitempty"` +} + +// Validate validates this v1 system git auth spec +func (m *V1SystemGitAuthSpec) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateUsername(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1SystemGitAuthSpec) validateUsername(formats strfmt.Registry) error { + + if swag.IsZero(m.Username) { // not required + return nil + } + + if m.Username != nil { + if err := m.Username.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("username") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1SystemGitAuthSpec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1SystemGitAuthSpec) UnmarshalBinary(b []byte) error { + var res V1SystemGitAuthSpec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_system_reverse_proxy.go b/api/models/v1_system_reverse_proxy.go new file mode 100644 index 00000000..3e45438d --- /dev/null +++ b/api/models/v1_system_reverse_proxy.go @@ -0,0 +1,118 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "encoding/json" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1SystemReverseProxy system config reverse proxy +// +// swagger:model v1SystemReverseProxy +type V1SystemReverseProxy struct { + + // ca cert + CaCert string `json:"caCert,omitempty"` + + // client cert + ClientCert string `json:"clientCert,omitempty"` + + // client key + ClientKey string `json:"clientKey,omitempty"` + + // port + Port int64 `json:"port,omitempty"` + + // protocol + // Enum: [http https] + Protocol string `json:"protocol,omitempty"` + + // server + Server string `json:"server,omitempty"` + + // v host port + VHostPort int64 `json:"vHostPort,omitempty"` +} + +// Validate validates this v1 system reverse proxy +func (m *V1SystemReverseProxy) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateProtocol(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +var v1SystemReverseProxyTypeProtocolPropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["http","https"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + v1SystemReverseProxyTypeProtocolPropEnum = append(v1SystemReverseProxyTypeProtocolPropEnum, v) + } +} + +const ( + + // V1SystemReverseProxyProtocolHTTP captures enum value "http" + V1SystemReverseProxyProtocolHTTP string = "http" + + // V1SystemReverseProxyProtocolHTTPS captures enum value "https" + V1SystemReverseProxyProtocolHTTPS string = "https" +) + +// prop value enum +func (m *V1SystemReverseProxy) validateProtocolEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, v1SystemReverseProxyTypeProtocolPropEnum, true); err != nil { + return err + } + return nil +} + +func (m *V1SystemReverseProxy) validateProtocol(formats strfmt.Registry) error { + + if swag.IsZero(m.Protocol) { // not required + return nil + } + + // value enum + if err := m.validateProtocolEnum("protocol", "body", m.Protocol); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1SystemReverseProxy) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1SystemReverseProxy) UnmarshalBinary(b []byte) error { + var res V1SystemReverseProxy + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_system_scar_spec.go b/api/models/v1_system_scar_spec.go new file mode 100644 index 00000000..e09aa184 --- /dev/null +++ b/api/models/v1_system_scar_spec.go @@ -0,0 +1,58 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1SystemScarSpec system scar config spec +// +// swagger:model v1SystemScarSpec +type V1SystemScarSpec struct { + + // base content path + BaseContentPath string `json:"baseContentPath,omitempty"` + + // ca cert + CaCert string `json:"caCert,omitempty"` + + // endpoint + Endpoint string `json:"endpoint,omitempty"` + + // insecure verify + InsecureVerify bool `json:"insecureVerify,omitempty"` + + // password + Password string `json:"password,omitempty"` + + // username + Username string `json:"username,omitempty"` +} + +// Validate validates this v1 system scar spec +func (m *V1SystemScarSpec) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1SystemScarSpec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1SystemScarSpec) UnmarshalBinary(b []byte) error { + var res V1SystemScarSpec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_system_user_me.go b/api/models/v1_system_user_me.go new file mode 100644 index 00000000..47459ec0 --- /dev/null +++ b/api/models/v1_system_user_me.go @@ -0,0 +1,121 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1SystemUserMe User information wrt permissions +// +// swagger:model v1SystemUserMe +type V1SystemUserMe struct { + + // metadata + Metadata *V1ObjectMeta `json:"metadata,omitempty"` + + // spec + Spec *V1SystemUserSpec `json:"spec,omitempty"` + + // status + Status *V1SystemUserMeStatus `json:"status,omitempty"` +} + +// Validate validates this v1 system user me +func (m *V1SystemUserMe) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSpec(formats); err != nil { + res = append(res, err) + } + + if err := m.validateStatus(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1SystemUserMe) validateMetadata(formats strfmt.Registry) error { + + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } + return err + } + } + + return nil +} + +func (m *V1SystemUserMe) validateSpec(formats strfmt.Registry) error { + + if swag.IsZero(m.Spec) { // not required + return nil + } + + if m.Spec != nil { + if err := m.Spec.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec") + } + return err + } + } + + return nil +} + +func (m *V1SystemUserMe) validateStatus(formats strfmt.Registry) error { + + if swag.IsZero(m.Status) { // not required + return nil + } + + if m.Status != nil { + if err := m.Status.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("status") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1SystemUserMe) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1SystemUserMe) UnmarshalBinary(b []byte) error { + var res V1SystemUserMe + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_system_user_me_status.go b/api/models/v1_system_user_me_status.go new file mode 100644 index 00000000..eb4a294e --- /dev/null +++ b/api/models/v1_system_user_me_status.go @@ -0,0 +1,154 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1SystemUserMeStatus User status with permissions +// +// swagger:model v1SystemUserMeStatus +type V1SystemUserMeStatus struct { + + // is email set + IsEmailSet bool `json:"isEmailSet"` + + // is email verified + IsEmailVerified bool `json:"isEmailVerified"` + + // is mfa enabled + IsMfaEnabled bool `json:"isMfaEnabled"` + + // is password reset + IsPasswordReset bool `json:"isPasswordReset"` + + // last email update time + // Format: date-time + LastEmailUpdateTime V1Time `json:"lastEmailUpdateTime,omitempty"` + + // last email verified time + // Format: date-time + LastEmailVerifiedTime V1Time `json:"lastEmailVerifiedTime,omitempty"` + + // last login time + // Format: date-time + LastLoginTime V1Time `json:"lastLoginTime,omitempty"` + + // last password update time + // Format: date-time + LastPasswordUpdateTime V1Time `json:"lastPasswordUpdateTime,omitempty"` +} + +// Validate validates this v1 system user me status +func (m *V1SystemUserMeStatus) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateLastEmailUpdateTime(formats); err != nil { + res = append(res, err) + } + + if err := m.validateLastEmailVerifiedTime(formats); err != nil { + res = append(res, err) + } + + if err := m.validateLastLoginTime(formats); err != nil { + res = append(res, err) + } + + if err := m.validateLastPasswordUpdateTime(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1SystemUserMeStatus) validateLastEmailUpdateTime(formats strfmt.Registry) error { + + if swag.IsZero(m.LastEmailUpdateTime) { // not required + return nil + } + + if err := m.LastEmailUpdateTime.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("lastEmailUpdateTime") + } + return err + } + + return nil +} + +func (m *V1SystemUserMeStatus) validateLastEmailVerifiedTime(formats strfmt.Registry) error { + + if swag.IsZero(m.LastEmailVerifiedTime) { // not required + return nil + } + + if err := m.LastEmailVerifiedTime.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("lastEmailVerifiedTime") + } + return err + } + + return nil +} + +func (m *V1SystemUserMeStatus) validateLastLoginTime(formats strfmt.Registry) error { + + if swag.IsZero(m.LastLoginTime) { // not required + return nil + } + + if err := m.LastLoginTime.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("lastLoginTime") + } + return err + } + + return nil +} + +func (m *V1SystemUserMeStatus) validateLastPasswordUpdateTime(formats strfmt.Registry) error { + + if swag.IsZero(m.LastPasswordUpdateTime) { // not required + return nil + } + + if err := m.LastPasswordUpdateTime.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("lastPasswordUpdateTime") + } + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1SystemUserMeStatus) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1SystemUserMeStatus) UnmarshalBinary(b []byte) error { + var res V1SystemUserMeStatus + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_system_user_spec.go b/api/models/v1_system_user_spec.go new file mode 100644 index 00000000..36c3d6b4 --- /dev/null +++ b/api/models/v1_system_user_spec.go @@ -0,0 +1,46 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1SystemUserSpec User specifications +// +// swagger:model v1SystemUserSpec +type V1SystemUserSpec struct { + + // Admin type + AdminType string `json:"adminType,omitempty"` + + // System User's email id + EmailID string `json:"emailId,omitempty"` +} + +// Validate validates this v1 system user spec +func (m *V1SystemUserSpec) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1SystemUserSpec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1SystemUserSpec) UnmarshalBinary(b []byte) error { + var res V1SystemUserSpec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_tag_filter.go b/api/models/v1_tag_filter.go new file mode 100644 index 00000000..d5451f95 --- /dev/null +++ b/api/models/v1_tag_filter.go @@ -0,0 +1,96 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1TagFilter Tag Filter create spec +// +// swagger:model v1TagFilter +type V1TagFilter struct { + + // metadata + Metadata *V1ObjectMetaInputEntity `json:"metadata,omitempty"` + + // spec + Spec *V1TagFilterSpec `json:"spec,omitempty"` +} + +// Validate validates this v1 tag filter +func (m *V1TagFilter) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSpec(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1TagFilter) validateMetadata(formats strfmt.Registry) error { + + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } + return err + } + } + + return nil +} + +func (m *V1TagFilter) validateSpec(formats strfmt.Registry) error { + + if swag.IsZero(m.Spec) { // not required + return nil + } + + if m.Spec != nil { + if err := m.Spec.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1TagFilter) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1TagFilter) UnmarshalBinary(b []byte) error { + var res V1TagFilter + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_tag_filter_group.go b/api/models/v1_tag_filter_group.go new file mode 100644 index 00000000..677e5662 --- /dev/null +++ b/api/models/v1_tag_filter_group.go @@ -0,0 +1,111 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1TagFilterGroup v1 tag filter group +// +// swagger:model v1TagFilterGroup +type V1TagFilterGroup struct { + + // conjunction + Conjunction *V1SearchFilterConjunctionOperator `json:"conjunction,omitempty"` + + // filters + // Unique: true + Filters []*V1TagFilterItem `json:"filters"` +} + +// Validate validates this v1 tag filter group +func (m *V1TagFilterGroup) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateConjunction(formats); err != nil { + res = append(res, err) + } + + if err := m.validateFilters(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1TagFilterGroup) validateConjunction(formats strfmt.Registry) error { + + if swag.IsZero(m.Conjunction) { // not required + return nil + } + + if m.Conjunction != nil { + if err := m.Conjunction.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("conjunction") + } + return err + } + } + + return nil +} + +func (m *V1TagFilterGroup) validateFilters(formats strfmt.Registry) error { + + if swag.IsZero(m.Filters) { // not required + return nil + } + + if err := validate.UniqueItems("filters", "body", m.Filters); err != nil { + return err + } + + for i := 0; i < len(m.Filters); i++ { + if swag.IsZero(m.Filters[i]) { // not required + continue + } + + if m.Filters[i] != nil { + if err := m.Filters[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("filters" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1TagFilterGroup) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1TagFilterGroup) UnmarshalBinary(b []byte) error { + var res V1TagFilterGroup + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_tag_filter_item.go b/api/models/v1_tag_filter_item.go new file mode 100644 index 00000000..fa07332a --- /dev/null +++ b/api/models/v1_tag_filter_item.go @@ -0,0 +1,97 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1TagFilterItem v1 tag filter item +// +// swagger:model v1TagFilterItem +type V1TagFilterItem struct { + + // key + Key string `json:"key,omitempty"` + + // negation + Negation bool `json:"negation,omitempty"` + + // operator + Operator V1SearchFilterKeyValueOperator `json:"operator,omitempty"` + + // values + // Unique: true + Values []string `json:"values"` +} + +// Validate validates this v1 tag filter item +func (m *V1TagFilterItem) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateOperator(formats); err != nil { + res = append(res, err) + } + + if err := m.validateValues(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1TagFilterItem) validateOperator(formats strfmt.Registry) error { + + if swag.IsZero(m.Operator) { // not required + return nil + } + + if err := m.Operator.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("operator") + } + return err + } + + return nil +} + +func (m *V1TagFilterItem) validateValues(formats strfmt.Registry) error { + + if swag.IsZero(m.Values) { // not required + return nil + } + + if err := validate.UniqueItems("values", "body", m.Values); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1TagFilterItem) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1TagFilterItem) UnmarshalBinary(b []byte) error { + var res V1TagFilterItem + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_tag_filter_spec.go b/api/models/v1_tag_filter_spec.go new file mode 100644 index 00000000..56233de1 --- /dev/null +++ b/api/models/v1_tag_filter_spec.go @@ -0,0 +1,71 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1TagFilterSpec Filter create spec +// +// swagger:model v1TagFilterSpec +type V1TagFilterSpec struct { + + // filter group + FilterGroup *V1TagFilterGroup `json:"filterGroup,omitempty"` +} + +// Validate validates this v1 tag filter spec +func (m *V1TagFilterSpec) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateFilterGroup(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1TagFilterSpec) validateFilterGroup(formats strfmt.Registry) error { + + if swag.IsZero(m.FilterGroup) { // not required + return nil + } + + if m.FilterGroup != nil { + if err := m.FilterGroup.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("filterGroup") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1TagFilterSpec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1TagFilterSpec) UnmarshalBinary(b []byte) error { + var res V1TagFilterSpec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_tag_filter_summary.go b/api/models/v1_tag_filter_summary.go new file mode 100644 index 00000000..7aa607b7 --- /dev/null +++ b/api/models/v1_tag_filter_summary.go @@ -0,0 +1,96 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1TagFilterSummary Filter summary object +// +// swagger:model v1TagFilterSummary +type V1TagFilterSummary struct { + + // metadata + Metadata *V1ObjectMeta `json:"metadata,omitempty"` + + // spec + Spec *V1TagFilterSpec `json:"spec,omitempty"` +} + +// Validate validates this v1 tag filter summary +func (m *V1TagFilterSummary) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSpec(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1TagFilterSummary) validateMetadata(formats strfmt.Registry) error { + + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } + return err + } + } + + return nil +} + +func (m *V1TagFilterSummary) validateSpec(formats strfmt.Registry) error { + + if swag.IsZero(m.Spec) { // not required + return nil + } + + if m.Spec != nil { + if err := m.Spec.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1TagFilterSummary) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1TagFilterSummary) UnmarshalBinary(b []byte) error { + var res V1TagFilterSummary + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_taint.go b/api/models/v1_taint.go new file mode 100644 index 00000000..34a77708 --- /dev/null +++ b/api/models/v1_taint.go @@ -0,0 +1,133 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "encoding/json" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1Taint Taint +// +// swagger:model v1Taint +type V1Taint struct { + + // effect + // Enum: [NoSchedule PreferNoSchedule NoExecute] + Effect string `json:"effect,omitempty"` + + // The taint key to be applied to a node + Key string `json:"key,omitempty"` + + // time added + // Format: date-time + TimeAdded V1Time `json:"timeAdded,omitempty"` + + // The taint value corresponding to the taint key. + Value string `json:"value,omitempty"` +} + +// Validate validates this v1 taint +func (m *V1Taint) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateEffect(formats); err != nil { + res = append(res, err) + } + + if err := m.validateTimeAdded(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +var v1TaintTypeEffectPropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["NoSchedule","PreferNoSchedule","NoExecute"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + v1TaintTypeEffectPropEnum = append(v1TaintTypeEffectPropEnum, v) + } +} + +const ( + + // V1TaintEffectNoSchedule captures enum value "NoSchedule" + V1TaintEffectNoSchedule string = "NoSchedule" + + // V1TaintEffectPreferNoSchedule captures enum value "PreferNoSchedule" + V1TaintEffectPreferNoSchedule string = "PreferNoSchedule" + + // V1TaintEffectNoExecute captures enum value "NoExecute" + V1TaintEffectNoExecute string = "NoExecute" +) + +// prop value enum +func (m *V1Taint) validateEffectEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, v1TaintTypeEffectPropEnum, true); err != nil { + return err + } + return nil +} + +func (m *V1Taint) validateEffect(formats strfmt.Registry) error { + + if swag.IsZero(m.Effect) { // not required + return nil + } + + // value enum + if err := m.validateEffectEnum("effect", "body", m.Effect); err != nil { + return err + } + + return nil +} + +func (m *V1Taint) validateTimeAdded(formats strfmt.Registry) error { + + if swag.IsZero(m.TimeAdded) { // not required + return nil + } + + if err := m.TimeAdded.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("timeAdded") + } + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1Taint) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1Taint) UnmarshalBinary(b []byte) error { + var res V1Taint + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_team.go b/api/models/v1_team.go new file mode 100644 index 00000000..44dfa5af --- /dev/null +++ b/api/models/v1_team.go @@ -0,0 +1,99 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1Team Team information +// +// swagger:model v1Team +type V1Team struct { + + // metadata + Metadata *V1ObjectMeta `json:"metadata,omitempty"` + + // spec + Spec *V1TeamSpec `json:"spec,omitempty"` + + // status + Status V1TeamStatus `json:"status,omitempty"` +} + +// Validate validates this v1 team +func (m *V1Team) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSpec(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1Team) validateMetadata(formats strfmt.Registry) error { + + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } + return err + } + } + + return nil +} + +func (m *V1Team) validateSpec(formats strfmt.Registry) error { + + if swag.IsZero(m.Spec) { // not required + return nil + } + + if m.Spec != nil { + if err := m.Spec.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1Team) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1Team) UnmarshalBinary(b []byte) error { + var res V1Team + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_team_patch.go b/api/models/v1_team_patch.go new file mode 100644 index 00000000..518e24f9 --- /dev/null +++ b/api/models/v1_team_patch.go @@ -0,0 +1,45 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1TeamPatch v1 team patch +// +// swagger:model v1TeamPatch +type V1TeamPatch []*V1HTTPPatch + +// Validate validates this v1 team patch +func (m V1TeamPatch) Validate(formats strfmt.Registry) error { + var res []error + + for i := 0; i < len(m); i++ { + if swag.IsZero(m[i]) { // not required + continue + } + + if m[i] != nil { + if err := m[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName(strconv.Itoa(i)) + } + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/models/v1_team_role_map.go b/api/models/v1_team_role_map.go new file mode 100644 index 00000000..8a7efd88 --- /dev/null +++ b/api/models/v1_team_role_map.go @@ -0,0 +1,46 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1TeamRoleMap v1 team role map +// +// swagger:model v1TeamRoleMap +type V1TeamRoleMap struct { + + // roles + Roles []string `json:"roles"` + + // team Id + TeamID string `json:"teamId,omitempty"` +} + +// Validate validates this v1 team role map +func (m *V1TeamRoleMap) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1TeamRoleMap) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1TeamRoleMap) UnmarshalBinary(b []byte) error { + var res V1TeamRoleMap + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_team_spec.go b/api/models/v1_team_spec.go new file mode 100644 index 00000000..6a8fd196 --- /dev/null +++ b/api/models/v1_team_spec.go @@ -0,0 +1,110 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1TeamSpec Team specifications +// +// swagger:model v1TeamSpec +type V1TeamSpec struct { + + // roles + // Unique: true + Roles []string `json:"roles"` + + // sources + // Unique: true + Sources []string `json:"sources"` + + // users + // Unique: true + Users []string `json:"users"` +} + +// Validate validates this v1 team spec +func (m *V1TeamSpec) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateRoles(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSources(formats); err != nil { + res = append(res, err) + } + + if err := m.validateUsers(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1TeamSpec) validateRoles(formats strfmt.Registry) error { + + if swag.IsZero(m.Roles) { // not required + return nil + } + + if err := validate.UniqueItems("roles", "body", m.Roles); err != nil { + return err + } + + return nil +} + +func (m *V1TeamSpec) validateSources(formats strfmt.Registry) error { + + if swag.IsZero(m.Sources) { // not required + return nil + } + + if err := validate.UniqueItems("sources", "body", m.Sources); err != nil { + return err + } + + return nil +} + +func (m *V1TeamSpec) validateUsers(formats strfmt.Registry) error { + + if swag.IsZero(m.Users) { // not required + return nil + } + + if err := validate.UniqueItems("users", "body", m.Users); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1TeamSpec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1TeamSpec) UnmarshalBinary(b []byte) error { + var res V1TeamSpec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_team_spec_summary.go b/api/models/v1_team_spec_summary.go new file mode 100644 index 00000000..1ae6c9af --- /dev/null +++ b/api/models/v1_team_spec_summary.go @@ -0,0 +1,147 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1TeamSpecSummary v1 team spec summary +// +// swagger:model v1TeamSpecSummary +type V1TeamSpecSummary struct { + + // email Id + EmailID string `json:"emailId,omitempty"` + + // projects + Projects []*V1UIDSummary `json:"projects"` + + // roles + Roles []*V1UIDSummary `json:"roles"` + + // users + Users []*V1UIDSummary `json:"users"` +} + +// Validate validates this v1 team spec summary +func (m *V1TeamSpecSummary) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateProjects(formats); err != nil { + res = append(res, err) + } + + if err := m.validateRoles(formats); err != nil { + res = append(res, err) + } + + if err := m.validateUsers(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1TeamSpecSummary) validateProjects(formats strfmt.Registry) error { + + if swag.IsZero(m.Projects) { // not required + return nil + } + + for i := 0; i < len(m.Projects); i++ { + if swag.IsZero(m.Projects[i]) { // not required + continue + } + + if m.Projects[i] != nil { + if err := m.Projects[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("projects" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1TeamSpecSummary) validateRoles(formats strfmt.Registry) error { + + if swag.IsZero(m.Roles) { // not required + return nil + } + + for i := 0; i < len(m.Roles); i++ { + if swag.IsZero(m.Roles[i]) { // not required + continue + } + + if m.Roles[i] != nil { + if err := m.Roles[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("roles" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1TeamSpecSummary) validateUsers(formats strfmt.Registry) error { + + if swag.IsZero(m.Users) { // not required + return nil + } + + for i := 0; i < len(m.Users); i++ { + if swag.IsZero(m.Users[i]) { // not required + continue + } + + if m.Users[i] != nil { + if err := m.Users[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("users" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1TeamSpecSummary) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1TeamSpecSummary) UnmarshalBinary(b []byte) error { + var res V1TeamSpecSummary + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_team_status.go b/api/models/v1_team_status.go new file mode 100644 index 00000000..d9ce7723 --- /dev/null +++ b/api/models/v1_team_status.go @@ -0,0 +1,11 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +// V1TeamStatus Team status +// +// swagger:model v1TeamStatus +type V1TeamStatus interface{} diff --git a/api/models/v1_team_summary.go b/api/models/v1_team_summary.go new file mode 100644 index 00000000..63ea2178 --- /dev/null +++ b/api/models/v1_team_summary.go @@ -0,0 +1,99 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1TeamSummary Team summary +// +// swagger:model v1TeamSummary +type V1TeamSummary struct { + + // metadata + Metadata *V1ObjectMeta `json:"metadata,omitempty"` + + // spec + Spec *V1TeamSpecSummary `json:"spec,omitempty"` + + // status + Status V1TeamStatus `json:"status,omitempty"` +} + +// Validate validates this v1 team summary +func (m *V1TeamSummary) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSpec(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1TeamSummary) validateMetadata(formats strfmt.Registry) error { + + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } + return err + } + } + + return nil +} + +func (m *V1TeamSummary) validateSpec(formats strfmt.Registry) error { + + if swag.IsZero(m.Spec) { // not required + return nil + } + + if m.Spec != nil { + if err := m.Spec.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1TeamSummary) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1TeamSummary) UnmarshalBinary(b []byte) error { + var res V1TeamSummary + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_team_summary_sort_fields.go b/api/models/v1_team_summary_sort_fields.go new file mode 100644 index 00000000..705a6eec --- /dev/null +++ b/api/models/v1_team_summary_sort_fields.go @@ -0,0 +1,63 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "encoding/json" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" +) + +// V1TeamSummarySortFields v1 team summary sort fields +// +// swagger:model v1TeamSummarySortFields +type V1TeamSummarySortFields string + +const ( + + // V1TeamSummarySortFieldsName captures enum value "name" + V1TeamSummarySortFieldsName V1TeamSummarySortFields = "name" + + // V1TeamSummarySortFieldsCreationTimestamp captures enum value "creationTimestamp" + V1TeamSummarySortFieldsCreationTimestamp V1TeamSummarySortFields = "creationTimestamp" +) + +// for schema +var v1TeamSummarySortFieldsEnum []interface{} + +func init() { + var res []V1TeamSummarySortFields + if err := json.Unmarshal([]byte(`["name","creationTimestamp"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + v1TeamSummarySortFieldsEnum = append(v1TeamSummarySortFieldsEnum, v) + } +} + +func (m V1TeamSummarySortFields) validateV1TeamSummarySortFieldsEnum(path, location string, value V1TeamSummarySortFields) error { + if err := validate.EnumCase(path, location, value, v1TeamSummarySortFieldsEnum, true); err != nil { + return err + } + return nil +} + +// Validate validates this v1 team summary sort fields +func (m V1TeamSummarySortFields) Validate(formats strfmt.Registry) error { + var res []error + + // value enum + if err := m.validateV1TeamSummarySortFieldsEnum("", "body", m); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/models/v1_team_summary_sort_spec.go b/api/models/v1_team_summary_sort_spec.go new file mode 100644 index 00000000..62521d50 --- /dev/null +++ b/api/models/v1_team_summary_sort_spec.go @@ -0,0 +1,94 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1TeamSummarySortSpec v1 team summary sort spec +// +// swagger:model v1TeamSummarySortSpec +type V1TeamSummarySortSpec struct { + + // field + Field *V1TeamSummarySortFields `json:"field,omitempty"` + + // order + Order V1SortOrder `json:"order,omitempty"` +} + +// Validate validates this v1 team summary sort spec +func (m *V1TeamSummarySortSpec) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateField(formats); err != nil { + res = append(res, err) + } + + if err := m.validateOrder(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1TeamSummarySortSpec) validateField(formats strfmt.Registry) error { + + if swag.IsZero(m.Field) { // not required + return nil + } + + if m.Field != nil { + if err := m.Field.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("field") + } + return err + } + } + + return nil +} + +func (m *V1TeamSummarySortSpec) validateOrder(formats strfmt.Registry) error { + + if swag.IsZero(m.Order) { // not required + return nil + } + + if err := m.Order.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("order") + } + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1TeamSummarySortSpec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1TeamSummarySortSpec) UnmarshalBinary(b []byte) error { + var res V1TeamSummarySortSpec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_team_tenant_roles_entity.go b/api/models/v1_team_tenant_roles_entity.go new file mode 100644 index 00000000..7cb7dec1 --- /dev/null +++ b/api/models/v1_team_tenant_roles_entity.go @@ -0,0 +1,80 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1TeamTenantRolesEntity v1 team tenant roles entity +// +// swagger:model v1TeamTenantRolesEntity +type V1TeamTenantRolesEntity struct { + + // roles + Roles []*V1UIDSummary `json:"roles"` +} + +// Validate validates this v1 team tenant roles entity +func (m *V1TeamTenantRolesEntity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateRoles(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1TeamTenantRolesEntity) validateRoles(formats strfmt.Registry) error { + + if swag.IsZero(m.Roles) { // not required + return nil + } + + for i := 0; i < len(m.Roles); i++ { + if swag.IsZero(m.Roles[i]) { // not required + continue + } + + if m.Roles[i] != nil { + if err := m.Roles[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("roles" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1TeamTenantRolesEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1TeamTenantRolesEntity) UnmarshalBinary(b []byte) error { + var res V1TeamTenantRolesEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_team_tenant_roles_update.go b/api/models/v1_team_tenant_roles_update.go new file mode 100644 index 00000000..a83bedd3 --- /dev/null +++ b/api/models/v1_team_tenant_roles_update.go @@ -0,0 +1,43 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1TeamTenantRolesUpdate v1 team tenant roles update +// +// swagger:model v1TeamTenantRolesUpdate +type V1TeamTenantRolesUpdate struct { + + // roles + Roles []string `json:"roles"` +} + +// Validate validates this v1 team tenant roles update +func (m *V1TeamTenantRolesUpdate) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1TeamTenantRolesUpdate) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1TeamTenantRolesUpdate) UnmarshalBinary(b []byte) error { + var res V1TeamTenantRolesUpdate + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_teams.go b/api/models/v1_teams.go new file mode 100644 index 00000000..f4c410df --- /dev/null +++ b/api/models/v1_teams.go @@ -0,0 +1,112 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1Teams v1 teams +// +// swagger:model v1Teams +type V1Teams struct { + + // items + // Required: true + // Unique: true + Items []*V1Team `json:"items"` + + // listmeta + Listmeta *V1ListMetaData `json:"listmeta,omitempty"` +} + +// Validate validates this v1 teams +func (m *V1Teams) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateItems(formats); err != nil { + res = append(res, err) + } + + if err := m.validateListmeta(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1Teams) validateItems(formats strfmt.Registry) error { + + if err := validate.Required("items", "body", m.Items); err != nil { + return err + } + + if err := validate.UniqueItems("items", "body", m.Items); err != nil { + return err + } + + for i := 0; i < len(m.Items); i++ { + if swag.IsZero(m.Items[i]) { // not required + continue + } + + if m.Items[i] != nil { + if err := m.Items[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("items" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1Teams) validateListmeta(formats strfmt.Registry) error { + + if swag.IsZero(m.Listmeta) { // not required + return nil + } + + if m.Listmeta != nil { + if err := m.Listmeta.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("listmeta") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1Teams) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1Teams) UnmarshalBinary(b []byte) error { + var res V1Teams + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_teams_filter_spec.go b/api/models/v1_teams_filter_spec.go new file mode 100644 index 00000000..516cd765 --- /dev/null +++ b/api/models/v1_teams_filter_spec.go @@ -0,0 +1,71 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1TeamsFilterSpec Teams filter spec +// +// swagger:model v1TeamsFilterSpec +type V1TeamsFilterSpec struct { + + // name + Name *V1FilterString `json:"name,omitempty"` +} + +// Validate validates this v1 teams filter spec +func (m *V1TeamsFilterSpec) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateName(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1TeamsFilterSpec) validateName(formats strfmt.Registry) error { + + if swag.IsZero(m.Name) { // not required + return nil + } + + if m.Name != nil { + if err := m.Name.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("name") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1TeamsFilterSpec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1TeamsFilterSpec) UnmarshalBinary(b []byte) error { + var res V1TeamsFilterSpec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_teams_summary_list.go b/api/models/v1_teams_summary_list.go new file mode 100644 index 00000000..d5b239a8 --- /dev/null +++ b/api/models/v1_teams_summary_list.go @@ -0,0 +1,87 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1TeamsSummaryList Returns Team summary +// +// swagger:model v1TeamsSummaryList +type V1TeamsSummaryList struct { + + // items + // Required: true + // Unique: true + Items []*V1TeamSummary `json:"items"` +} + +// Validate validates this v1 teams summary list +func (m *V1TeamsSummaryList) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateItems(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1TeamsSummaryList) validateItems(formats strfmt.Registry) error { + + if err := validate.Required("items", "body", m.Items); err != nil { + return err + } + + if err := validate.UniqueItems("items", "body", m.Items); err != nil { + return err + } + + for i := 0; i < len(m.Items); i++ { + if swag.IsZero(m.Items[i]) { // not required + continue + } + + if m.Items[i] != nil { + if err := m.Items[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("items" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1TeamsSummaryList) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1TeamsSummaryList) UnmarshalBinary(b []byte) error { + var res V1TeamsSummaryList + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_teams_summary_spec.go b/api/models/v1_teams_summary_spec.go new file mode 100644 index 00000000..2a33df3a --- /dev/null +++ b/api/models/v1_teams_summary_spec.go @@ -0,0 +1,111 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1TeamsSummarySpec Teams filter summary spec +// +// swagger:model v1TeamsSummarySpec +type V1TeamsSummarySpec struct { + + // filter + Filter *V1TeamsFilterSpec `json:"filter,omitempty"` + + // sort + // Unique: true + Sort []*V1TeamSummarySortSpec `json:"sort"` +} + +// Validate validates this v1 teams summary spec +func (m *V1TeamsSummarySpec) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateFilter(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSort(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1TeamsSummarySpec) validateFilter(formats strfmt.Registry) error { + + if swag.IsZero(m.Filter) { // not required + return nil + } + + if m.Filter != nil { + if err := m.Filter.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("filter") + } + return err + } + } + + return nil +} + +func (m *V1TeamsSummarySpec) validateSort(formats strfmt.Registry) error { + + if swag.IsZero(m.Sort) { // not required + return nil + } + + if err := validate.UniqueItems("sort", "body", m.Sort); err != nil { + return err + } + + for i := 0; i < len(m.Sort); i++ { + if swag.IsZero(m.Sort[i]) { // not required + continue + } + + if m.Sort[i] != nil { + if err := m.Sort[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("sort" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1TeamsSummarySpec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1TeamsSummarySpec) UnmarshalBinary(b []byte) error { + var res V1TeamsSummarySpec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_tenant_address_patch.go b/api/models/v1_tenant_address_patch.go new file mode 100644 index 00000000..9f7acab1 --- /dev/null +++ b/api/models/v1_tenant_address_patch.go @@ -0,0 +1,71 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1TenantAddressPatch Tenant Address +// +// swagger:model v1TenantAddressPatch +type V1TenantAddressPatch struct { + + // address + Address *V1Address `json:"address,omitempty"` +} + +// Validate validates this v1 tenant address patch +func (m *V1TenantAddressPatch) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateAddress(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1TenantAddressPatch) validateAddress(formats strfmt.Registry) error { + + if swag.IsZero(m.Address) { // not required + return nil + } + + if m.Address != nil { + if err := m.Address.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("address") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1TenantAddressPatch) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1TenantAddressPatch) UnmarshalBinary(b []byte) error { + var res V1TenantAddressPatch + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_tenant_asset_cert.go b/api/models/v1_tenant_asset_cert.go new file mode 100644 index 00000000..ee686d50 --- /dev/null +++ b/api/models/v1_tenant_asset_cert.go @@ -0,0 +1,96 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1TenantAssetCert tenant cert +// +// swagger:model v1TenantAssetCert +type V1TenantAssetCert struct { + + // metadata + Metadata *V1ObjectMeta `json:"metadata,omitempty"` + + // spec + Spec *V1Cert `json:"spec,omitempty"` +} + +// Validate validates this v1 tenant asset cert +func (m *V1TenantAssetCert) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSpec(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1TenantAssetCert) validateMetadata(formats strfmt.Registry) error { + + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } + return err + } + } + + return nil +} + +func (m *V1TenantAssetCert) validateSpec(formats strfmt.Registry) error { + + if swag.IsZero(m.Spec) { // not required + return nil + } + + if m.Spec != nil { + if err := m.Spec.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1TenantAssetCert) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1TenantAssetCert) UnmarshalBinary(b []byte) error { + var res V1TenantAssetCert + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_tenant_asset_certs.go b/api/models/v1_tenant_asset_certs.go new file mode 100644 index 00000000..6ddac550 --- /dev/null +++ b/api/models/v1_tenant_asset_certs.go @@ -0,0 +1,87 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1TenantAssetCerts v1 tenant asset certs +// +// swagger:model v1TenantAssetCerts +type V1TenantAssetCerts struct { + + // items + // Required: true + // Unique: true + Items []*V1TenantAssetCert `json:"items"` +} + +// Validate validates this v1 tenant asset certs +func (m *V1TenantAssetCerts) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateItems(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1TenantAssetCerts) validateItems(formats strfmt.Registry) error { + + if err := validate.Required("items", "body", m.Items); err != nil { + return err + } + + if err := validate.UniqueItems("items", "body", m.Items); err != nil { + return err + } + + for i := 0; i < len(m.Items); i++ { + if swag.IsZero(m.Items[i]) { // not required + continue + } + + if m.Items[i] != nil { + if err := m.Items[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("items" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1TenantAssetCerts) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1TenantAssetCerts) UnmarshalBinary(b []byte) error { + var res V1TenantAssetCerts + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_tenant_cluster_settings.go b/api/models/v1_tenant_cluster_settings.go new file mode 100644 index 00000000..dbed6371 --- /dev/null +++ b/api/models/v1_tenant_cluster_settings.go @@ -0,0 +1,71 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1TenantClusterSettings v1 tenant cluster settings +// +// swagger:model v1TenantClusterSettings +type V1TenantClusterSettings struct { + + // nodes auto remediation setting + NodesAutoRemediationSetting *V1NodesAutoRemediationSettings `json:"nodesAutoRemediationSetting,omitempty"` +} + +// Validate validates this v1 tenant cluster settings +func (m *V1TenantClusterSettings) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateNodesAutoRemediationSetting(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1TenantClusterSettings) validateNodesAutoRemediationSetting(formats strfmt.Registry) error { + + if swag.IsZero(m.NodesAutoRemediationSetting) { // not required + return nil + } + + if m.NodesAutoRemediationSetting != nil { + if err := m.NodesAutoRemediationSetting.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("nodesAutoRemediationSetting") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1TenantClusterSettings) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1TenantClusterSettings) UnmarshalBinary(b []byte) error { + var res V1TenantClusterSettings + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_tenant_domains.go b/api/models/v1_tenant_domains.go new file mode 100644 index 00000000..94944604 --- /dev/null +++ b/api/models/v1_tenant_domains.go @@ -0,0 +1,68 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1TenantDomains Tenant domains +// +// swagger:model v1TenantDomains +type V1TenantDomains struct { + + // domains + // Unique: true + Domains []string `json:"domains"` +} + +// Validate validates this v1 tenant domains +func (m *V1TenantDomains) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateDomains(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1TenantDomains) validateDomains(formats strfmt.Registry) error { + + if swag.IsZero(m.Domains) { // not required + return nil + } + + if err := validate.UniqueItems("domains", "body", m.Domains); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1TenantDomains) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1TenantDomains) UnmarshalBinary(b []byte) error { + var res V1TenantDomains + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_tenant_email_patch.go b/api/models/v1_tenant_email_patch.go new file mode 100644 index 00000000..97acf966 --- /dev/null +++ b/api/models/v1_tenant_email_patch.go @@ -0,0 +1,43 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1TenantEmailPatch Tenant EmailId +// +// swagger:model v1TenantEmailPatch +type V1TenantEmailPatch struct { + + // email Id + EmailID string `json:"emailId,omitempty"` +} + +// Validate validates this v1 tenant email patch +func (m *V1TenantEmailPatch) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1TenantEmailPatch) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1TenantEmailPatch) UnmarshalBinary(b []byte) error { + var res V1TenantEmailPatch + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_tenant_enable_cluster_group.go b/api/models/v1_tenant_enable_cluster_group.go new file mode 100644 index 00000000..4e63c085 --- /dev/null +++ b/api/models/v1_tenant_enable_cluster_group.go @@ -0,0 +1,46 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1TenantEnableClusterGroup Enable or Disable cluster group for a tenant +// +// swagger:model v1TenantEnableClusterGroup +type V1TenantEnableClusterGroup struct { + + // hide system cluster groups + HideSystemClusterGroups bool `json:"hideSystemClusterGroups"` + + // Deprecated. Use hideSystemClusterGroups field + IsClusterGroupEnabled bool `json:"isClusterGroupEnabled"` +} + +// Validate validates this v1 tenant enable cluster group +func (m *V1TenantEnableClusterGroup) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1TenantEnableClusterGroup) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1TenantEnableClusterGroup) UnmarshalBinary(b []byte) error { + var res V1TenantEnableClusterGroup + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_tenant_freemium.go b/api/models/v1_tenant_freemium.go new file mode 100644 index 00000000..6405279b --- /dev/null +++ b/api/models/v1_tenant_freemium.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1TenantFreemium Tenant freemium configuration +// +// swagger:model v1TenantFreemium +type V1TenantFreemium struct { + + // active clusters limit + ActiveClustersLimit int64 `json:"activeClustersLimit"` + + // is freemium + IsFreemium bool `json:"isFreemium"` + + // is unlimited + IsUnlimited bool `json:"isUnlimited"` + + // overage usage limit + OverageUsageLimit float64 `json:"overageUsageLimit"` + + // total usage limit + TotalUsageLimit float64 `json:"totalUsageLimit"` +} + +// Validate validates this v1 tenant freemium +func (m *V1TenantFreemium) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1TenantFreemium) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1TenantFreemium) UnmarshalBinary(b []byte) error { + var res V1TenantFreemium + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_tenant_freemium_usage.go b/api/models/v1_tenant_freemium_usage.go new file mode 100644 index 00000000..dfc44f44 --- /dev/null +++ b/api/models/v1_tenant_freemium_usage.go @@ -0,0 +1,102 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1TenantFreemiumUsage v1 tenant freemium usage +// +// swagger:model v1TenantFreemiumUsage +type V1TenantFreemiumUsage struct { + + // is freemium + IsFreemium bool `json:"isFreemium"` + + // is unlimited + IsUnlimited bool `json:"isUnlimited"` + + // limit + Limit *V1FreemiumUsageLimit `json:"limit,omitempty"` + + // usage + Usage *V1FreemiumUsage `json:"usage,omitempty"` +} + +// Validate validates this v1 tenant freemium usage +func (m *V1TenantFreemiumUsage) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateLimit(formats); err != nil { + res = append(res, err) + } + + if err := m.validateUsage(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1TenantFreemiumUsage) validateLimit(formats strfmt.Registry) error { + + if swag.IsZero(m.Limit) { // not required + return nil + } + + if m.Limit != nil { + if err := m.Limit.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("limit") + } + return err + } + } + + return nil +} + +func (m *V1TenantFreemiumUsage) validateUsage(formats strfmt.Registry) error { + + if swag.IsZero(m.Usage) { // not required + return nil + } + + if m.Usage != nil { + if err := m.Usage.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("usage") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1TenantFreemiumUsage) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1TenantFreemiumUsage) UnmarshalBinary(b []byte) error { + var res V1TenantFreemiumUsage + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_tenant_oidc_claims.go b/api/models/v1_tenant_oidc_claims.go new file mode 100644 index 00000000..ce2cb242 --- /dev/null +++ b/api/models/v1_tenant_oidc_claims.go @@ -0,0 +1,52 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1TenantOidcClaims v1 tenant oidc claims +// +// swagger:model v1TenantOidcClaims +type V1TenantOidcClaims struct { + + // email + Email string `json:"Email"` + + // first name + FirstName string `json:"FirstName"` + + // last name + LastName string `json:"LastName"` + + // spectro team + SpectroTeam string `json:"SpectroTeam"` +} + +// Validate validates this v1 tenant oidc claims +func (m *V1TenantOidcClaims) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1TenantOidcClaims) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1TenantOidcClaims) UnmarshalBinary(b []byte) error { + var res V1TenantOidcClaims + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_tenant_oidc_client_spec.go b/api/models/v1_tenant_oidc_client_spec.go new file mode 100644 index 00000000..2bf035ce --- /dev/null +++ b/api/models/v1_tenant_oidc_client_spec.go @@ -0,0 +1,126 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1TenantOidcClientSpec Tenant +// +// swagger:model v1TenantOidcClientSpec +type V1TenantOidcClientSpec struct { + + // callback Url + CallbackURL string `json:"callbackUrl"` + + // client Id + ClientID string `json:"clientId"` + + // client secret + ClientSecret string `json:"clientSecret"` + + // default teams + DefaultTeams []string `json:"defaultTeams"` + + // is sso enabled + IsSsoEnabled bool `json:"isSsoEnabled"` + + // issuer Tls + IssuerTLS *V1OidcIssuerTLS `json:"issuerTls,omitempty"` + + // the issuer is the URL identifier for the service + IssuerURL string `json:"issuerUrl"` + + // logout Url + LogoutURL string `json:"logoutUrl"` + + // required claims + RequiredClaims *V1TenantOidcClaims `json:"requiredClaims,omitempty"` + + // scopes + Scopes []string `json:"scopes"` + + // scopes delimiter + ScopesDelimiter string `json:"scopesDelimiter"` + + // sync sso teams + SyncSsoTeams bool `json:"syncSsoTeams"` +} + +// Validate validates this v1 tenant oidc client spec +func (m *V1TenantOidcClientSpec) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateIssuerTLS(formats); err != nil { + res = append(res, err) + } + + if err := m.validateRequiredClaims(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1TenantOidcClientSpec) validateIssuerTLS(formats strfmt.Registry) error { + + if swag.IsZero(m.IssuerTLS) { // not required + return nil + } + + if m.IssuerTLS != nil { + if err := m.IssuerTLS.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("issuerTls") + } + return err + } + } + + return nil +} + +func (m *V1TenantOidcClientSpec) validateRequiredClaims(formats strfmt.Registry) error { + + if swag.IsZero(m.RequiredClaims) { // not required + return nil + } + + if m.RequiredClaims != nil { + if err := m.RequiredClaims.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("requiredClaims") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1TenantOidcClientSpec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1TenantOidcClientSpec) UnmarshalBinary(b []byte) error { + var res V1TenantOidcClientSpec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_tenant_password_policy_entity.go b/api/models/v1_tenant_password_policy_entity.go new file mode 100644 index 00000000..7e9df04b --- /dev/null +++ b/api/models/v1_tenant_password_policy_entity.go @@ -0,0 +1,121 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1TenantPasswordPolicyEntity Tenant Password Policy Entity +// +// swagger:model v1TenantPasswordPolicyEntity +type V1TenantPasswordPolicyEntity struct { + + // creation timestamp + // Format: date-time + CreationTimestamp V1Time `json:"creationTimestamp,omitempty"` + + // expiry duration in days + ExpiryDurationInDays int64 `json:"expiryDurationInDays,omitempty"` + + // first reminder in days + FirstReminderInDays int64 `json:"firstReminderInDays,omitempty"` + + // is regex + IsRegex bool `json:"isRegex,omitempty"` + + // min length + MinLength int64 `json:"minLength,omitempty"` + + // min num of block letters + MinNumOfBlockLetters int64 `json:"minNumOfBlockLetters,omitempty"` + + // min num of digits + MinNumOfDigits int64 `json:"minNumOfDigits,omitempty"` + + // min num of small letters + MinNumOfSmallLetters int64 `json:"minNumOfSmallLetters,omitempty"` + + // min num of special characters + MinNumOfSpecialCharacters int64 `json:"minNumOfSpecialCharacters,omitempty"` + + // regex + Regex string `json:"regex,omitempty"` + + // update timestamp + // Format: date-time + UpdateTimestamp V1Time `json:"updateTimestamp,omitempty"` +} + +// Validate validates this v1 tenant password policy entity +func (m *V1TenantPasswordPolicyEntity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateCreationTimestamp(formats); err != nil { + res = append(res, err) + } + + if err := m.validateUpdateTimestamp(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1TenantPasswordPolicyEntity) validateCreationTimestamp(formats strfmt.Registry) error { + + if swag.IsZero(m.CreationTimestamp) { // not required + return nil + } + + if err := m.CreationTimestamp.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("creationTimestamp") + } + return err + } + + return nil +} + +func (m *V1TenantPasswordPolicyEntity) validateUpdateTimestamp(formats strfmt.Registry) error { + + if swag.IsZero(m.UpdateTimestamp) { // not required + return nil + } + + if err := m.UpdateTimestamp.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("updateTimestamp") + } + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1TenantPasswordPolicyEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1TenantPasswordPolicyEntity) UnmarshalBinary(b []byte) error { + var res V1TenantPasswordPolicyEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_tenant_resource_limit.go b/api/models/v1_tenant_resource_limit.go new file mode 100644 index 00000000..2923537c --- /dev/null +++ b/api/models/v1_tenant_resource_limit.go @@ -0,0 +1,78 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1TenantResourceLimit v1 tenant resource limit +// +// swagger:model v1TenantResourceLimit +type V1TenantResourceLimit struct { + + // kind + Kind V1ResourceLimitType `json:"kind,omitempty"` + + // label + Label string `json:"label,omitempty"` + + // limit + Limit int64 `json:"limit"` + + // max limit + MaxLimit int64 `json:"maxLimit"` +} + +// Validate validates this v1 tenant resource limit +func (m *V1TenantResourceLimit) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateKind(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1TenantResourceLimit) validateKind(formats strfmt.Registry) error { + + if swag.IsZero(m.Kind) { // not required + return nil + } + + if err := m.Kind.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("kind") + } + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1TenantResourceLimit) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1TenantResourceLimit) UnmarshalBinary(b []byte) error { + var res V1TenantResourceLimit + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_tenant_resource_limit_entity.go b/api/models/v1_tenant_resource_limit_entity.go new file mode 100644 index 00000000..70c224ad --- /dev/null +++ b/api/models/v1_tenant_resource_limit_entity.go @@ -0,0 +1,72 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1TenantResourceLimitEntity v1 tenant resource limit entity +// +// swagger:model v1TenantResourceLimitEntity +type V1TenantResourceLimitEntity struct { + + // kind + Kind V1ResourceLimitType `json:"kind,omitempty"` + + // limit + Limit int64 `json:"limit"` +} + +// Validate validates this v1 tenant resource limit entity +func (m *V1TenantResourceLimitEntity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateKind(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1TenantResourceLimitEntity) validateKind(formats strfmt.Registry) error { + + if swag.IsZero(m.Kind) { // not required + return nil + } + + if err := m.Kind.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("kind") + } + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1TenantResourceLimitEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1TenantResourceLimitEntity) UnmarshalBinary(b []byte) error { + var res V1TenantResourceLimitEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_tenant_resource_limits.go b/api/models/v1_tenant_resource_limits.go new file mode 100644 index 00000000..31ea1cb3 --- /dev/null +++ b/api/models/v1_tenant_resource_limits.go @@ -0,0 +1,86 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1TenantResourceLimits Tenant resource limits +// +// swagger:model v1TenantResourceLimits +type V1TenantResourceLimits struct { + + // resources + // Unique: true + Resources []*V1TenantResourceLimit `json:"resources"` +} + +// Validate validates this v1 tenant resource limits +func (m *V1TenantResourceLimits) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateResources(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1TenantResourceLimits) validateResources(formats strfmt.Registry) error { + + if swag.IsZero(m.Resources) { // not required + return nil + } + + if err := validate.UniqueItems("resources", "body", m.Resources); err != nil { + return err + } + + for i := 0; i < len(m.Resources); i++ { + if swag.IsZero(m.Resources[i]) { // not required + continue + } + + if m.Resources[i] != nil { + if err := m.Resources[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("resources" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1TenantResourceLimits) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1TenantResourceLimits) UnmarshalBinary(b []byte) error { + var res V1TenantResourceLimits + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_tenant_resource_limits_entity.go b/api/models/v1_tenant_resource_limits_entity.go new file mode 100644 index 00000000..90d97eea --- /dev/null +++ b/api/models/v1_tenant_resource_limits_entity.go @@ -0,0 +1,86 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1TenantResourceLimitsEntity Tenant resource limits. Supported resources keys are 'user','project','apiKey','team','role','cloudaccount','clusterprofile','workspace','registry','privategateway','location','certificate','macro','sshkey','alert','spectrocluster','edgehost'. +// +// swagger:model v1TenantResourceLimitsEntity +type V1TenantResourceLimitsEntity struct { + + // resources + // Unique: true + Resources []*V1TenantResourceLimitEntity `json:"resources"` +} + +// Validate validates this v1 tenant resource limits entity +func (m *V1TenantResourceLimitsEntity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateResources(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1TenantResourceLimitsEntity) validateResources(formats strfmt.Registry) error { + + if swag.IsZero(m.Resources) { // not required + return nil + } + + if err := validate.UniqueItems("resources", "body", m.Resources); err != nil { + return err + } + + for i := 0; i < len(m.Resources); i++ { + if swag.IsZero(m.Resources[i]) { // not required + continue + } + + if m.Resources[i] != nil { + if err := m.Resources[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("resources" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1TenantResourceLimitsEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1TenantResourceLimitsEntity) UnmarshalBinary(b []byte) error { + var res V1TenantResourceLimitsEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_tenant_saml_request_spec.go b/api/models/v1_tenant_saml_request_spec.go new file mode 100644 index 00000000..e1cbd748 --- /dev/null +++ b/api/models/v1_tenant_saml_request_spec.go @@ -0,0 +1,101 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1TenantSamlRequestSpec Tenant +// +// swagger:model v1TenantSamlRequestSpec +type V1TenantSamlRequestSpec struct { + + // attributes + Attributes []*V1TenantSamlSpecAttribute `json:"attributes"` + + // default teams + DefaultTeams []string `json:"defaultTeams"` + + // federation metadata + FederationMetadata string `json:"federationMetadata,omitempty"` + + // identity provider + IdentityProvider string `json:"identityProvider,omitempty"` + + // is single logout enabled + IsSingleLogoutEnabled bool `json:"isSingleLogoutEnabled,omitempty"` + + // is sso enabled + IsSsoEnabled bool `json:"isSsoEnabled,omitempty"` + + // name Id format + NameIDFormat string `json:"nameIdFormat,omitempty"` + + // sync sso teams + SyncSsoTeams bool `json:"syncSsoTeams,omitempty"` +} + +// Validate validates this v1 tenant saml request spec +func (m *V1TenantSamlRequestSpec) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateAttributes(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1TenantSamlRequestSpec) validateAttributes(formats strfmt.Registry) error { + + if swag.IsZero(m.Attributes) { // not required + return nil + } + + for i := 0; i < len(m.Attributes); i++ { + if swag.IsZero(m.Attributes[i]) { // not required + continue + } + + if m.Attributes[i] != nil { + if err := m.Attributes[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("attributes" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1TenantSamlRequestSpec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1TenantSamlRequestSpec) UnmarshalBinary(b []byte) error { + var res V1TenantSamlRequestSpec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_tenant_saml_spec.go b/api/models/v1_tenant_saml_spec.go new file mode 100644 index 00000000..d8ada7c1 --- /dev/null +++ b/api/models/v1_tenant_saml_spec.go @@ -0,0 +1,122 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1TenantSamlSpec Tenant +// +// swagger:model v1TenantSamlSpec +type V1TenantSamlSpec struct { + + // acs Url + AcsURL string `json:"acsUrl,omitempty"` + + // attributes + Attributes []*V1TenantSamlSpecAttribute `json:"attributes"` + + // same as entity id + AudienceURL string `json:"audienceUrl,omitempty"` + + // certificate for slo + Certificate string `json:"certificate,omitempty"` + + // default teams + DefaultTeams []string `json:"defaultTeams"` + + // entity Id + EntityID string `json:"entityId,omitempty"` + + // federation metadata + FederationMetadata string `json:"federationMetadata,omitempty"` + + // identity provider + IdentityProvider string `json:"identityProvider,omitempty"` + + // is single logout enabled + IsSingleLogoutEnabled bool `json:"isSingleLogoutEnabled"` + + // is sso enabled + IsSsoEnabled bool `json:"isSsoEnabled"` + + // same as entity id + Issuer string `json:"issuer,omitempty"` + + // name Id format + NameIDFormat string `json:"nameIdFormat,omitempty"` + + // service provider metadata + ServiceProviderMetadata string `json:"serviceProviderMetadata,omitempty"` + + // slo url + SingleLogoutURL string `json:"singleLogoutUrl"` + + // sync sso teams + SyncSsoTeams bool `json:"syncSsoTeams"` +} + +// Validate validates this v1 tenant saml spec +func (m *V1TenantSamlSpec) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateAttributes(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1TenantSamlSpec) validateAttributes(formats strfmt.Registry) error { + + if swag.IsZero(m.Attributes) { // not required + return nil + } + + for i := 0; i < len(m.Attributes); i++ { + if swag.IsZero(m.Attributes[i]) { // not required + continue + } + + if m.Attributes[i] != nil { + if err := m.Attributes[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("attributes" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1TenantSamlSpec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1TenantSamlSpec) UnmarshalBinary(b []byte) error { + var res V1TenantSamlSpec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_tenant_saml_spec_attribute.go b/api/models/v1_tenant_saml_spec_attribute.go new file mode 100644 index 00000000..5f44eef4 --- /dev/null +++ b/api/models/v1_tenant_saml_spec_attribute.go @@ -0,0 +1,52 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1TenantSamlSpecAttribute v1 tenant saml spec attribute +// +// swagger:model v1TenantSamlSpecAttribute +type V1TenantSamlSpecAttribute struct { + + // attribute value + AttributeValue string `json:"attributeValue,omitempty"` + + // mapped attribute + MappedAttribute string `json:"mappedAttribute,omitempty"` + + // name + Name string `json:"name,omitempty"` + + // name format + NameFormat string `json:"nameFormat,omitempty"` +} + +// Validate validates this v1 tenant saml spec attribute +func (m *V1TenantSamlSpecAttribute) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1TenantSamlSpecAttribute) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1TenantSamlSpecAttribute) UnmarshalBinary(b []byte) error { + var res V1TenantSamlSpecAttribute + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_tenant_sso_auth_providers_entity.go b/api/models/v1_tenant_sso_auth_providers_entity.go new file mode 100644 index 00000000..6bced50d --- /dev/null +++ b/api/models/v1_tenant_sso_auth_providers_entity.go @@ -0,0 +1,71 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1TenantSsoAuthProvidersEntity v1 tenant sso auth providers entity +// +// swagger:model v1TenantSsoAuthProvidersEntity +type V1TenantSsoAuthProvidersEntity struct { + + // is enabled + IsEnabled bool `json:"isEnabled"` + + // sso logins + // Unique: true + SsoLogins []string `json:"ssoLogins"` +} + +// Validate validates this v1 tenant sso auth providers entity +func (m *V1TenantSsoAuthProvidersEntity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateSsoLogins(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1TenantSsoAuthProvidersEntity) validateSsoLogins(formats strfmt.Registry) error { + + if swag.IsZero(m.SsoLogins) { // not required + return nil + } + + if err := validate.UniqueItems("ssoLogins", "body", m.SsoLogins); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1TenantSsoAuthProvidersEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1TenantSsoAuthProvidersEntity) UnmarshalBinary(b []byte) error { + var res V1TenantSsoAuthProvidersEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_tencent_account.go b/api/models/v1_tencent_account.go new file mode 100644 index 00000000..83dc2cc6 --- /dev/null +++ b/api/models/v1_tencent_account.go @@ -0,0 +1,127 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1TencentAccount Tencent cloud account information +// +// swagger:model v1TencentAccount +type V1TencentAccount struct { + + // Cloud account api version + APIVersion string `json:"apiVersion,omitempty"` + + // Cloud account kind + Kind string `json:"kind,omitempty"` + + // metadata + Metadata *V1ObjectMeta `json:"metadata,omitempty"` + + // spec + Spec *V1TencentCloudAccount `json:"spec,omitempty"` + + // status + Status *V1CloudAccountStatus `json:"status,omitempty"` +} + +// Validate validates this v1 tencent account +func (m *V1TencentAccount) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSpec(formats); err != nil { + res = append(res, err) + } + + if err := m.validateStatus(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1TencentAccount) validateMetadata(formats strfmt.Registry) error { + + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } + return err + } + } + + return nil +} + +func (m *V1TencentAccount) validateSpec(formats strfmt.Registry) error { + + if swag.IsZero(m.Spec) { // not required + return nil + } + + if m.Spec != nil { + if err := m.Spec.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec") + } + return err + } + } + + return nil +} + +func (m *V1TencentAccount) validateStatus(formats strfmt.Registry) error { + + if swag.IsZero(m.Status) { // not required + return nil + } + + if m.Status != nil { + if err := m.Status.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("status") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1TencentAccount) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1TencentAccount) UnmarshalBinary(b []byte) error { + var res V1TencentAccount + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_tencent_accounts.go b/api/models/v1_tencent_accounts.go new file mode 100644 index 00000000..042fdf51 --- /dev/null +++ b/api/models/v1_tencent_accounts.go @@ -0,0 +1,112 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1TencentAccounts v1 tencent accounts +// +// swagger:model v1TencentAccounts +type V1TencentAccounts struct { + + // items + // Required: true + // Unique: true + Items []*V1TencentAccount `json:"items"` + + // listmeta + Listmeta *V1ListMetaData `json:"listmeta,omitempty"` +} + +// Validate validates this v1 tencent accounts +func (m *V1TencentAccounts) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateItems(formats); err != nil { + res = append(res, err) + } + + if err := m.validateListmeta(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1TencentAccounts) validateItems(formats strfmt.Registry) error { + + if err := validate.Required("items", "body", m.Items); err != nil { + return err + } + + if err := validate.UniqueItems("items", "body", m.Items); err != nil { + return err + } + + for i := 0; i < len(m.Items); i++ { + if swag.IsZero(m.Items[i]) { // not required + continue + } + + if m.Items[i] != nil { + if err := m.Items[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("items" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1TencentAccounts) validateListmeta(formats strfmt.Registry) error { + + if swag.IsZero(m.Listmeta) { // not required + return nil + } + + if m.Listmeta != nil { + if err := m.Listmeta.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("listmeta") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1TencentAccounts) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1TencentAccounts) UnmarshalBinary(b []byte) error { + var res V1TencentAccounts + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_tencent_availability_zone.go b/api/models/v1_tencent_availability_zone.go new file mode 100644 index 00000000..93f0e7a5 --- /dev/null +++ b/api/models/v1_tencent_availability_zone.go @@ -0,0 +1,49 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1TencentAvailabilityZone Tencent availability zone +// +// swagger:model v1TencentAvailabilityZone +type V1TencentAvailabilityZone struct { + + // Tencent availability zone name + Name string `json:"name,omitempty"` + + // Tencent availability zone state + State string `json:"state,omitempty"` + + // Tencent availability zone id + ZoneID string `json:"zoneId,omitempty"` +} + +// Validate validates this v1 tencent availability zone +func (m *V1TencentAvailabilityZone) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1TencentAvailabilityZone) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1TencentAvailabilityZone) UnmarshalBinary(b []byte) error { + var res V1TencentAvailabilityZone + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_tencent_availability_zones.go b/api/models/v1_tencent_availability_zones.go new file mode 100644 index 00000000..fe79ac37 --- /dev/null +++ b/api/models/v1_tencent_availability_zones.go @@ -0,0 +1,82 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1TencentAvailabilityZones List of Tencent Availability zones +// +// swagger:model v1TencentAvailabilityZones +type V1TencentAvailabilityZones struct { + + // zones + // Required: true + Zones []*V1TencentAvailabilityZone `json:"zones"` +} + +// Validate validates this v1 tencent availability zones +func (m *V1TencentAvailabilityZones) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateZones(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1TencentAvailabilityZones) validateZones(formats strfmt.Registry) error { + + if err := validate.Required("zones", "body", m.Zones); err != nil { + return err + } + + for i := 0; i < len(m.Zones); i++ { + if swag.IsZero(m.Zones[i]) { // not required + continue + } + + if m.Zones[i] != nil { + if err := m.Zones[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("zones" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1TencentAvailabilityZones) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1TencentAvailabilityZones) UnmarshalBinary(b []byte) error { + var res V1TencentAvailabilityZones + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_tencent_cloud_account.go b/api/models/v1_tencent_cloud_account.go new file mode 100644 index 00000000..6bc96149 --- /dev/null +++ b/api/models/v1_tencent_cloud_account.go @@ -0,0 +1,81 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1TencentCloudAccount v1 tencent cloud account +// +// swagger:model v1TencentCloudAccount +type V1TencentCloudAccount struct { + + // Tencent api secretID + // Required: true + SecretID *string `json:"secretId"` + + // Tencent api secret key + // Required: true + SecretKey *string `json:"secretKey"` +} + +// Validate validates this v1 tencent cloud account +func (m *V1TencentCloudAccount) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateSecretID(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSecretKey(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1TencentCloudAccount) validateSecretID(formats strfmt.Registry) error { + + if err := validate.Required("secretId", "body", m.SecretID); err != nil { + return err + } + + return nil +} + +func (m *V1TencentCloudAccount) validateSecretKey(formats strfmt.Registry) error { + + if err := validate.Required("secretKey", "body", m.SecretKey); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1TencentCloudAccount) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1TencentCloudAccount) UnmarshalBinary(b []byte) error { + var res V1TencentCloudAccount + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_tencent_cloud_cluster_config_entity.go b/api/models/v1_tencent_cloud_cluster_config_entity.go new file mode 100644 index 00000000..784069ad --- /dev/null +++ b/api/models/v1_tencent_cloud_cluster_config_entity.go @@ -0,0 +1,71 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1TencentCloudClusterConfigEntity Tencent cloud cluster config entity +// +// swagger:model v1TencentCloudClusterConfigEntity +type V1TencentCloudClusterConfigEntity struct { + + // cluster config + ClusterConfig *V1TencentClusterConfig `json:"clusterConfig,omitempty"` +} + +// Validate validates this v1 tencent cloud cluster config entity +func (m *V1TencentCloudClusterConfigEntity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateClusterConfig(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1TencentCloudClusterConfigEntity) validateClusterConfig(formats strfmt.Registry) error { + + if swag.IsZero(m.ClusterConfig) { // not required + return nil + } + + if m.ClusterConfig != nil { + if err := m.ClusterConfig.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("clusterConfig") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1TencentCloudClusterConfigEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1TencentCloudClusterConfigEntity) UnmarshalBinary(b []byte) error { + var res V1TencentCloudClusterConfigEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_tencent_cloud_config.go b/api/models/v1_tencent_cloud_config.go new file mode 100644 index 00000000..1a16e381 --- /dev/null +++ b/api/models/v1_tencent_cloud_config.go @@ -0,0 +1,96 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1TencentCloudConfig TencentCloudConfig is the Schema for the tencentcloudconfigs API +// +// swagger:model v1TencentCloudConfig +type V1TencentCloudConfig struct { + + // metadata + Metadata *V1ObjectMeta `json:"metadata,omitempty"` + + // spec + Spec *V1TencentCloudConfigSpec `json:"spec,omitempty"` +} + +// Validate validates this v1 tencent cloud config +func (m *V1TencentCloudConfig) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSpec(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1TencentCloudConfig) validateMetadata(formats strfmt.Registry) error { + + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } + return err + } + } + + return nil +} + +func (m *V1TencentCloudConfig) validateSpec(formats strfmt.Registry) error { + + if swag.IsZero(m.Spec) { // not required + return nil + } + + if m.Spec != nil { + if err := m.Spec.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1TencentCloudConfig) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1TencentCloudConfig) UnmarshalBinary(b []byte) error { + var res V1TencentCloudConfig + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_tencent_cloud_config_spec.go b/api/models/v1_tencent_cloud_config_spec.go new file mode 100644 index 00000000..e9165d78 --- /dev/null +++ b/api/models/v1_tencent_cloud_config_spec.go @@ -0,0 +1,130 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1TencentCloudConfigSpec TencentCloudConfigSpec defines the cloud configuration input by user This will translate to clusterspec/machinespec for cluster-api +// +// swagger:model v1TencentCloudConfigSpec +type V1TencentCloudConfigSpec struct { + + // cloudAccountRef should point to the secret which contains TencentCloudAccount + CloudAccountRef *V1ObjectReference `json:"cloudAccountRef,omitempty"` + + // cluster config + ClusterConfig *V1TencentClusterConfig `json:"clusterConfig,omitempty"` + + // machine pool config + MachinePoolConfig []*V1TencentMachinePoolConfig `json:"machinePoolConfig"` +} + +// Validate validates this v1 tencent cloud config spec +func (m *V1TencentCloudConfigSpec) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateCloudAccountRef(formats); err != nil { + res = append(res, err) + } + + if err := m.validateClusterConfig(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMachinePoolConfig(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1TencentCloudConfigSpec) validateCloudAccountRef(formats strfmt.Registry) error { + + if swag.IsZero(m.CloudAccountRef) { // not required + return nil + } + + if m.CloudAccountRef != nil { + if err := m.CloudAccountRef.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("cloudAccountRef") + } + return err + } + } + + return nil +} + +func (m *V1TencentCloudConfigSpec) validateClusterConfig(formats strfmt.Registry) error { + + if swag.IsZero(m.ClusterConfig) { // not required + return nil + } + + if m.ClusterConfig != nil { + if err := m.ClusterConfig.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("clusterConfig") + } + return err + } + } + + return nil +} + +func (m *V1TencentCloudConfigSpec) validateMachinePoolConfig(formats strfmt.Registry) error { + + if swag.IsZero(m.MachinePoolConfig) { // not required + return nil + } + + for i := 0; i < len(m.MachinePoolConfig); i++ { + if swag.IsZero(m.MachinePoolConfig[i]) { // not required + continue + } + + if m.MachinePoolConfig[i] != nil { + if err := m.MachinePoolConfig[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("machinePoolConfig" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1TencentCloudConfigSpec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1TencentCloudConfigSpec) UnmarshalBinary(b []byte) error { + var res V1TencentCloudConfigSpec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_tencent_cluster_config.go b/api/models/v1_tencent_cluster_config.go new file mode 100644 index 00000000..20b44b32 --- /dev/null +++ b/api/models/v1_tencent_cluster_config.go @@ -0,0 +1,95 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1TencentClusterConfig Cluster level configuration for tencent cloud and applicable for all the machine pools +// +// swagger:model v1TencentClusterConfig +type V1TencentClusterConfig struct { + + // Endpoints specifies access to this cluster's control plane endpoints + EndpointAccess *V1TkeEndpointAccess `json:"endpointAccess,omitempty"` + + // region + // Required: true + Region *string `json:"region"` + + // ssh key i ds + SSHKeyIDs []string `json:"sshKeyIDs"` + + // VPC Id to deploy cluster into should have one public and one private subnet for the the cluster creation, this field is optional, If VPC Id is not provided a fully managed VPC will be created + VpcID string `json:"vpcID,omitempty"` +} + +// Validate validates this v1 tencent cluster config +func (m *V1TencentClusterConfig) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateEndpointAccess(formats); err != nil { + res = append(res, err) + } + + if err := m.validateRegion(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1TencentClusterConfig) validateEndpointAccess(formats strfmt.Registry) error { + + if swag.IsZero(m.EndpointAccess) { // not required + return nil + } + + if m.EndpointAccess != nil { + if err := m.EndpointAccess.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("endpointAccess") + } + return err + } + } + + return nil +} + +func (m *V1TencentClusterConfig) validateRegion(formats strfmt.Registry) error { + + if err := validate.Required("region", "body", m.Region); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1TencentClusterConfig) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1TencentClusterConfig) UnmarshalBinary(b []byte) error { + var res V1TencentClusterConfig + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_tencent_instance_types.go b/api/models/v1_tencent_instance_types.go new file mode 100644 index 00000000..435d67db --- /dev/null +++ b/api/models/v1_tencent_instance_types.go @@ -0,0 +1,80 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1TencentInstanceTypes List of Tencent instance types +// +// swagger:model v1TencentInstanceTypes +type V1TencentInstanceTypes struct { + + // instance types + InstanceTypes []*V1InstanceType `json:"instanceTypes"` +} + +// Validate validates this v1 tencent instance types +func (m *V1TencentInstanceTypes) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateInstanceTypes(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1TencentInstanceTypes) validateInstanceTypes(formats strfmt.Registry) error { + + if swag.IsZero(m.InstanceTypes) { // not required + return nil + } + + for i := 0; i < len(m.InstanceTypes); i++ { + if swag.IsZero(m.InstanceTypes[i]) { // not required + continue + } + + if m.InstanceTypes[i] != nil { + if err := m.InstanceTypes[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("instanceTypes" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1TencentInstanceTypes) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1TencentInstanceTypes) UnmarshalBinary(b []byte) error { + var res V1TencentInstanceTypes + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_tencent_keypair.go b/api/models/v1_tencent_keypair.go new file mode 100644 index 00000000..d33cdbc9 --- /dev/null +++ b/api/models/v1_tencent_keypair.go @@ -0,0 +1,49 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1TencentKeypair Tencent Keypair entity +// +// swagger:model v1TencentKeypair +type V1TencentKeypair struct { + + // Tencent keypair id + ID string `json:"id,omitempty"` + + // Tencent keypair name + Name string `json:"name,omitempty"` + + // Tencent public key + Publickey string `json:"publickey,omitempty"` +} + +// Validate validates this v1 tencent keypair +func (m *V1TencentKeypair) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1TencentKeypair) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1TencentKeypair) UnmarshalBinary(b []byte) error { + var res V1TencentKeypair + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_tencent_keypairs.go b/api/models/v1_tencent_keypairs.go new file mode 100644 index 00000000..12d63d45 --- /dev/null +++ b/api/models/v1_tencent_keypairs.go @@ -0,0 +1,80 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1TencentKeypairs List of Tencent keypairs +// +// swagger:model v1TencentKeypairs +type V1TencentKeypairs struct { + + // keypairs + Keypairs []*V1TencentKeypair `json:"keypairs"` +} + +// Validate validates this v1 tencent keypairs +func (m *V1TencentKeypairs) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateKeypairs(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1TencentKeypairs) validateKeypairs(formats strfmt.Registry) error { + + if swag.IsZero(m.Keypairs) { // not required + return nil + } + + for i := 0; i < len(m.Keypairs); i++ { + if swag.IsZero(m.Keypairs[i]) { // not required + continue + } + + if m.Keypairs[i] != nil { + if err := m.Keypairs[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("keypairs" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1TencentKeypairs) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1TencentKeypairs) UnmarshalBinary(b []byte) error { + var res V1TencentKeypairs + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_tencent_machine.go b/api/models/v1_tencent_machine.go new file mode 100644 index 00000000..098c001b --- /dev/null +++ b/api/models/v1_tencent_machine.go @@ -0,0 +1,127 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1TencentMachine Tencent cloud VM definition +// +// swagger:model v1TencentMachine +type V1TencentMachine struct { + + // api version + APIVersion string `json:"apiVersion,omitempty"` + + // kind + Kind string `json:"kind,omitempty"` + + // metadata + Metadata *V1ObjectMeta `json:"metadata,omitempty"` + + // spec + Spec *V1TencentMachineSpec `json:"spec,omitempty"` + + // status + Status *V1CloudMachineStatus `json:"status,omitempty"` +} + +// Validate validates this v1 tencent machine +func (m *V1TencentMachine) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSpec(formats); err != nil { + res = append(res, err) + } + + if err := m.validateStatus(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1TencentMachine) validateMetadata(formats strfmt.Registry) error { + + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } + return err + } + } + + return nil +} + +func (m *V1TencentMachine) validateSpec(formats strfmt.Registry) error { + + if swag.IsZero(m.Spec) { // not required + return nil + } + + if m.Spec != nil { + if err := m.Spec.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec") + } + return err + } + } + + return nil +} + +func (m *V1TencentMachine) validateStatus(formats strfmt.Registry) error { + + if swag.IsZero(m.Status) { // not required + return nil + } + + if m.Status != nil { + if err := m.Status.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("status") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1TencentMachine) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1TencentMachine) UnmarshalBinary(b []byte) error { + var res V1TencentMachine + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_tencent_machine_pool_cloud_config_entity.go b/api/models/v1_tencent_machine_pool_cloud_config_entity.go new file mode 100644 index 00000000..4ac477c7 --- /dev/null +++ b/api/models/v1_tencent_machine_pool_cloud_config_entity.go @@ -0,0 +1,82 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1TencentMachinePoolCloudConfigEntity v1 tencent machine pool cloud config entity +// +// swagger:model v1TencentMachinePoolCloudConfigEntity +type V1TencentMachinePoolCloudConfigEntity struct { + + // azs + Azs []string `json:"azs"` + + // instance type + InstanceType string `json:"instanceType,omitempty"` + + // rootDeviceSize in GBs + // Maximum: 2000 + // Minimum: 1 + RootDeviceSize int64 `json:"rootDeviceSize,omitempty"` + + // AZ to subnet mapping filled by ally from hubble SubnetIDs ["ap-guangzhou-6"] = "subnet-079b6061" This field is optional If we don't provide a subnetId then by default the first subnet from the AZ will be picked up for deployment + SubnetIds map[string]string `json:"subnetIds,omitempty"` +} + +// Validate validates this v1 tencent machine pool cloud config entity +func (m *V1TencentMachinePoolCloudConfigEntity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateRootDeviceSize(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1TencentMachinePoolCloudConfigEntity) validateRootDeviceSize(formats strfmt.Registry) error { + + if swag.IsZero(m.RootDeviceSize) { // not required + return nil + } + + if err := validate.MinimumInt("rootDeviceSize", "body", int64(m.RootDeviceSize), 1, false); err != nil { + return err + } + + if err := validate.MaximumInt("rootDeviceSize", "body", int64(m.RootDeviceSize), 2000, false); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1TencentMachinePoolCloudConfigEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1TencentMachinePoolCloudConfigEntity) UnmarshalBinary(b []byte) error { + var res V1TencentMachinePoolCloudConfigEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_tencent_machine_pool_config.go b/api/models/v1_tencent_machine_pool_config.go new file mode 100644 index 00000000..2db07805 --- /dev/null +++ b/api/models/v1_tencent_machine_pool_config.go @@ -0,0 +1,197 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1TencentMachinePoolConfig v1 tencent machine pool config +// +// swagger:model v1TencentMachinePoolConfig +type V1TencentMachinePoolConfig struct { + + // AdditionalLabels + AdditionalLabels map[string]string `json:"additionalLabels,omitempty"` + + // AdditionalTags is an optional set of tags to add to resources managed by the provider, in addition to the ones added by default. For eg., tags for EKS nodeGroup or EKS NodegroupIAMRole + AdditionalTags map[string]string `json:"additionalTags,omitempty"` + + // AZs is only used for dynamic placement + Azs []string `json:"azs"` + + // instance config + InstanceConfig *V1InstanceConfig `json:"instanceConfig,omitempty"` + + // instance type + InstanceType string `json:"instanceType,omitempty"` + + // whether this pool is for control plane + IsControlPlane bool `json:"isControlPlane,omitempty"` + + // labels for this pool, example: control-plane/worker, gpu, windows + Labels []string `json:"labels"` + + // machine pool properties + MachinePoolProperties *V1MachinePoolProperties `json:"machinePoolProperties,omitempty"` + + // max size of the pool, for scaling + MaxSize int32 `json:"maxSize,omitempty"` + + // min size of the pool, for scaling + MinSize int32 `json:"minSize,omitempty"` + + // name + Name string `json:"name,omitempty"` + + // Minimum number of seconds a node should be Ready, before the next node is selected for repave. Applicable only for workerpools in infrastructure cluster + NodeRepaveInterval int32 `json:"nodeRepaveInterval,omitempty"` + + // rootDeviceSize in GBs + RootDeviceSize int64 `json:"rootDeviceSize,omitempty"` + + // size of the pool, number of machines + Size int32 `json:"size,omitempty"` + + // AZ to subnet mapping filled by ally from hubble SubnetIDs ["ap-guangzhou-6"] = "subnet-079b6061" This field is optional If we don't provide a subnetId then by default the first subnet from the AZ will be picked up for deployment + SubnetIds map[string]string `json:"subnetIds,omitempty"` + + // control plane or worker taints + Taints []*V1Taint `json:"taints"` + + // rolling update strategy for this machinepool if not specified, will use ScaleOut + UpdateStrategy *V1UpdateStrategy `json:"updateStrategy,omitempty"` + + // if IsControlPlane==true && useControlPlaneAsWorker==true, then will remove control plane taint this will not be used for worker pools + UseControlPlaneAsWorker bool `json:"useControlPlaneAsWorker,omitempty"` +} + +// Validate validates this v1 tencent machine pool config +func (m *V1TencentMachinePoolConfig) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateInstanceConfig(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMachinePoolProperties(formats); err != nil { + res = append(res, err) + } + + if err := m.validateTaints(formats); err != nil { + res = append(res, err) + } + + if err := m.validateUpdateStrategy(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1TencentMachinePoolConfig) validateInstanceConfig(formats strfmt.Registry) error { + + if swag.IsZero(m.InstanceConfig) { // not required + return nil + } + + if m.InstanceConfig != nil { + if err := m.InstanceConfig.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("instanceConfig") + } + return err + } + } + + return nil +} + +func (m *V1TencentMachinePoolConfig) validateMachinePoolProperties(formats strfmt.Registry) error { + + if swag.IsZero(m.MachinePoolProperties) { // not required + return nil + } + + if m.MachinePoolProperties != nil { + if err := m.MachinePoolProperties.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("machinePoolProperties") + } + return err + } + } + + return nil +} + +func (m *V1TencentMachinePoolConfig) validateTaints(formats strfmt.Registry) error { + + if swag.IsZero(m.Taints) { // not required + return nil + } + + for i := 0; i < len(m.Taints); i++ { + if swag.IsZero(m.Taints[i]) { // not required + continue + } + + if m.Taints[i] != nil { + if err := m.Taints[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("taints" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1TencentMachinePoolConfig) validateUpdateStrategy(formats strfmt.Registry) error { + + if swag.IsZero(m.UpdateStrategy) { // not required + return nil + } + + if m.UpdateStrategy != nil { + if err := m.UpdateStrategy.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("updateStrategy") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1TencentMachinePoolConfig) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1TencentMachinePoolConfig) UnmarshalBinary(b []byte) error { + var res V1TencentMachinePoolConfig + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_tencent_machine_pool_config_entity.go b/api/models/v1_tencent_machine_pool_config_entity.go new file mode 100644 index 00000000..aff57f5b --- /dev/null +++ b/api/models/v1_tencent_machine_pool_config_entity.go @@ -0,0 +1,98 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1TencentMachinePoolConfigEntity v1 tencent machine pool config entity +// +// swagger:model v1TencentMachinePoolConfigEntity +type V1TencentMachinePoolConfigEntity struct { + + // cloud config + // Required: true + CloudConfig *V1TencentMachinePoolCloudConfigEntity `json:"cloudConfig"` + + // pool config + PoolConfig *V1MachinePoolConfigEntity `json:"poolConfig,omitempty"` +} + +// Validate validates this v1 tencent machine pool config entity +func (m *V1TencentMachinePoolConfigEntity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateCloudConfig(formats); err != nil { + res = append(res, err) + } + + if err := m.validatePoolConfig(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1TencentMachinePoolConfigEntity) validateCloudConfig(formats strfmt.Registry) error { + + if err := validate.Required("cloudConfig", "body", m.CloudConfig); err != nil { + return err + } + + if m.CloudConfig != nil { + if err := m.CloudConfig.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("cloudConfig") + } + return err + } + } + + return nil +} + +func (m *V1TencentMachinePoolConfigEntity) validatePoolConfig(formats strfmt.Registry) error { + + if swag.IsZero(m.PoolConfig) { // not required + return nil + } + + if m.PoolConfig != nil { + if err := m.PoolConfig.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("poolConfig") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1TencentMachinePoolConfigEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1TencentMachinePoolConfigEntity) UnmarshalBinary(b []byte) error { + var res V1TencentMachinePoolConfigEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_tencent_machine_spec.go b/api/models/v1_tencent_machine_spec.go new file mode 100644 index 00000000..907d3a13 --- /dev/null +++ b/api/models/v1_tencent_machine_spec.go @@ -0,0 +1,134 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1TencentMachineSpec Tencent cloud VM definition spec +// +// swagger:model v1TencentMachineSpec +type V1TencentMachineSpec struct { + + // dns name + DNSName string `json:"dnsName,omitempty"` + + // image Id + // Required: true + ImageID *string `json:"imageId"` + + // instance type + // Required: true + InstanceType *string `json:"instanceType"` + + // nics + // Required: true + Nics []*V1TencentNic `json:"nics"` + + // security groups + SecurityGroups []string `json:"securityGroups"` + + // subnet Id + SubnetID string `json:"subnetId,omitempty"` + + // type + Type string `json:"type,omitempty"` + + // vpc Id + VpcID string `json:"vpcId,omitempty"` + + // zone Id + ZoneID string `json:"zoneId,omitempty"` +} + +// Validate validates this v1 tencent machine spec +func (m *V1TencentMachineSpec) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateImageID(formats); err != nil { + res = append(res, err) + } + + if err := m.validateInstanceType(formats); err != nil { + res = append(res, err) + } + + if err := m.validateNics(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1TencentMachineSpec) validateImageID(formats strfmt.Registry) error { + + if err := validate.Required("imageId", "body", m.ImageID); err != nil { + return err + } + + return nil +} + +func (m *V1TencentMachineSpec) validateInstanceType(formats strfmt.Registry) error { + + if err := validate.Required("instanceType", "body", m.InstanceType); err != nil { + return err + } + + return nil +} + +func (m *V1TencentMachineSpec) validateNics(formats strfmt.Registry) error { + + if err := validate.Required("nics", "body", m.Nics); err != nil { + return err + } + + for i := 0; i < len(m.Nics); i++ { + if swag.IsZero(m.Nics[i]) { // not required + continue + } + + if m.Nics[i] != nil { + if err := m.Nics[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("nics" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1TencentMachineSpec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1TencentMachineSpec) UnmarshalBinary(b []byte) error { + var res V1TencentMachineSpec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_tencent_machines.go b/api/models/v1_tencent_machines.go new file mode 100644 index 00000000..956f2820 --- /dev/null +++ b/api/models/v1_tencent_machines.go @@ -0,0 +1,112 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1TencentMachines Tencent machine list +// +// swagger:model v1TencentMachines +type V1TencentMachines struct { + + // items + // Required: true + // Unique: true + Items []*V1TencentMachine `json:"items"` + + // listmeta + Listmeta *V1ListMetaData `json:"listmeta,omitempty"` +} + +// Validate validates this v1 tencent machines +func (m *V1TencentMachines) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateItems(formats); err != nil { + res = append(res, err) + } + + if err := m.validateListmeta(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1TencentMachines) validateItems(formats strfmt.Registry) error { + + if err := validate.Required("items", "body", m.Items); err != nil { + return err + } + + if err := validate.UniqueItems("items", "body", m.Items); err != nil { + return err + } + + for i := 0; i < len(m.Items); i++ { + if swag.IsZero(m.Items[i]) { // not required + continue + } + + if m.Items[i] != nil { + if err := m.Items[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("items" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1TencentMachines) validateListmeta(formats strfmt.Registry) error { + + if swag.IsZero(m.Listmeta) { // not required + return nil + } + + if m.Listmeta != nil { + if err := m.Listmeta.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("listmeta") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1TencentMachines) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1TencentMachines) UnmarshalBinary(b []byte) error { + var res V1TencentMachines + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_tencent_nic.go b/api/models/v1_tencent_nic.go new file mode 100644 index 00000000..0cfa5033 --- /dev/null +++ b/api/models/v1_tencent_nic.go @@ -0,0 +1,49 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1TencentNic Tencent network interface +// +// swagger:model v1TencentNic +type V1TencentNic struct { + + // index + Index int8 `json:"index,omitempty"` + + // private i ps + PrivateIPs []string `json:"privateIPs"` + + // public Ip + PublicIP string `json:"publicIp,omitempty"` +} + +// Validate validates this v1 tencent nic +func (m *V1TencentNic) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1TencentNic) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1TencentNic) UnmarshalBinary(b []byte) error { + var res V1TencentNic + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_tencent_region.go b/api/models/v1_tencent_region.go new file mode 100644 index 00000000..b74b6f52 --- /dev/null +++ b/api/models/v1_tencent_region.go @@ -0,0 +1,46 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1TencentRegion Tencent region entity +// +// swagger:model v1TencentRegion +type V1TencentRegion struct { + + // Name of tencent region + Name string `json:"name,omitempty"` + + // State of tencent region + State string `json:"state,omitempty"` +} + +// Validate validates this v1 tencent region +func (m *V1TencentRegion) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1TencentRegion) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1TencentRegion) UnmarshalBinary(b []byte) error { + var res V1TencentRegion + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_tencent_regions.go b/api/models/v1_tencent_regions.go new file mode 100644 index 00000000..0a515f0b --- /dev/null +++ b/api/models/v1_tencent_regions.go @@ -0,0 +1,82 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1TencentRegions List of tencent regions +// +// swagger:model v1TencentRegions +type V1TencentRegions struct { + + // Tencent regions entity + // Required: true + Regions []*V1TencentRegion `json:"regions"` +} + +// Validate validates this v1 tencent regions +func (m *V1TencentRegions) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateRegions(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1TencentRegions) validateRegions(formats strfmt.Registry) error { + + if err := validate.Required("regions", "body", m.Regions); err != nil { + return err + } + + for i := 0; i < len(m.Regions); i++ { + if swag.IsZero(m.Regions[i]) { // not required + continue + } + + if m.Regions[i] != nil { + if err := m.Regions[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("regions" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1TencentRegions) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1TencentRegions) UnmarshalBinary(b []byte) error { + var res V1TencentRegions + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_tencent_security_group.go b/api/models/v1_tencent_security_group.go new file mode 100644 index 00000000..6ef2f5cf --- /dev/null +++ b/api/models/v1_tencent_security_group.go @@ -0,0 +1,52 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1TencentSecurityGroup Tencent Security Group. A security group is a virtual firewall that features stateful data packet filtering +// +// swagger:model v1TencentSecurityGroup +type V1TencentSecurityGroup struct { + + // Tencent security group id + ID string `json:"id,omitempty"` + + // Whether it is the default security group, the default security group does not support deletion. + IsDefault bool `json:"isDefault,omitempty"` + + // Tencent security group name + Name string `json:"name,omitempty"` + + // Tencent security group associated to a project + ProjectID string `json:"projectId,omitempty"` +} + +// Validate validates this v1 tencent security group +func (m *V1TencentSecurityGroup) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1TencentSecurityGroup) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1TencentSecurityGroup) UnmarshalBinary(b []byte) error { + var res V1TencentSecurityGroup + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_tencent_security_groups.go b/api/models/v1_tencent_security_groups.go new file mode 100644 index 00000000..469f274f --- /dev/null +++ b/api/models/v1_tencent_security_groups.go @@ -0,0 +1,80 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1TencentSecurityGroups List of Tencent security groups +// +// swagger:model v1TencentSecurityGroups +type V1TencentSecurityGroups struct { + + // groups + Groups []*V1TencentSecurityGroup `json:"groups"` +} + +// Validate validates this v1 tencent security groups +func (m *V1TencentSecurityGroups) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateGroups(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1TencentSecurityGroups) validateGroups(formats strfmt.Registry) error { + + if swag.IsZero(m.Groups) { // not required + return nil + } + + for i := 0; i < len(m.Groups); i++ { + if swag.IsZero(m.Groups[i]) { // not required + continue + } + + if m.Groups[i] != nil { + if err := m.Groups[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("groups" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1TencentSecurityGroups) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1TencentSecurityGroups) UnmarshalBinary(b []byte) error { + var res V1TencentSecurityGroups + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_tencent_storage_types.go b/api/models/v1_tencent_storage_types.go new file mode 100644 index 00000000..6266c6b3 --- /dev/null +++ b/api/models/v1_tencent_storage_types.go @@ -0,0 +1,80 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1TencentStorageTypes List of Tencent storage types +// +// swagger:model v1TencentStorageTypes +type V1TencentStorageTypes struct { + + // storage types + StorageTypes []*V1StorageType `json:"storageTypes"` +} + +// Validate validates this v1 tencent storage types +func (m *V1TencentStorageTypes) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateStorageTypes(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1TencentStorageTypes) validateStorageTypes(formats strfmt.Registry) error { + + if swag.IsZero(m.StorageTypes) { // not required + return nil + } + + for i := 0; i < len(m.StorageTypes); i++ { + if swag.IsZero(m.StorageTypes[i]) { // not required + continue + } + + if m.StorageTypes[i] != nil { + if err := m.StorageTypes[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("storageTypes" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1TencentStorageTypes) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1TencentStorageTypes) UnmarshalBinary(b []byte) error { + var res V1TencentStorageTypes + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_tencent_subnet.go b/api/models/v1_tencent_subnet.go new file mode 100644 index 00000000..5af83189 --- /dev/null +++ b/api/models/v1_tencent_subnet.go @@ -0,0 +1,52 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1TencentSubnet Tencent Subnet entity +// +// swagger:model v1TencentSubnet +type V1TencentSubnet struct { + + // Availability zone associated with tencent subnet + Az string `json:"az,omitempty"` + + // Tencent subnet CIDR. The CIDR notation consists of an IP address, a slash character ('/') and a decimal number from 0 to 32 + CidrBlock string `json:"cidrBlock,omitempty"` + + // Tencent subnet name + Name string `json:"name,omitempty"` + + // Tencent subnet id + SubnetID string `json:"subnetId,omitempty"` +} + +// Validate validates this v1 tencent subnet +func (m *V1TencentSubnet) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1TencentSubnet) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1TencentSubnet) UnmarshalBinary(b []byte) error { + var res V1TencentSubnet + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_tencent_vpc.go b/api/models/v1_tencent_vpc.go new file mode 100644 index 00000000..eb297596 --- /dev/null +++ b/api/models/v1_tencent_vpc.go @@ -0,0 +1,104 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1TencentVpc Tencent VPC entity +// +// swagger:model v1TencentVpc +type V1TencentVpc struct { + + // Tencent VPC CIDR. The CIDR notation consists of an IP address, a slash character ('/') and a decimal number from 0 to 32 + CidrBlock string `json:"cidrBlock,omitempty"` + + // Tencent VPC name + Name string `json:"name,omitempty"` + + // subnets + Subnets []*V1TencentSubnet `json:"subnets"` + + // Tencent VPC id + // Required: true + VpcID *string `json:"vpcId"` +} + +// Validate validates this v1 tencent vpc +func (m *V1TencentVpc) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateSubnets(formats); err != nil { + res = append(res, err) + } + + if err := m.validateVpcID(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1TencentVpc) validateSubnets(formats strfmt.Registry) error { + + if swag.IsZero(m.Subnets) { // not required + return nil + } + + for i := 0; i < len(m.Subnets); i++ { + if swag.IsZero(m.Subnets[i]) { // not required + continue + } + + if m.Subnets[i] != nil { + if err := m.Subnets[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("subnets" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1TencentVpc) validateVpcID(formats strfmt.Registry) error { + + if err := validate.Required("vpcId", "body", m.VpcID); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1TencentVpc) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1TencentVpc) UnmarshalBinary(b []byte) error { + var res V1TencentVpc + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_tencent_vpcs.go b/api/models/v1_tencent_vpcs.go new file mode 100644 index 00000000..160a0d03 --- /dev/null +++ b/api/models/v1_tencent_vpcs.go @@ -0,0 +1,82 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1TencentVpcs List of Tencent VPCs +// +// swagger:model v1TencentVpcs +type V1TencentVpcs struct { + + // vpcs + // Required: true + Vpcs []*V1TencentVpc `json:"vpcs"` +} + +// Validate validates this v1 tencent vpcs +func (m *V1TencentVpcs) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateVpcs(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1TencentVpcs) validateVpcs(formats strfmt.Registry) error { + + if err := validate.Required("vpcs", "body", m.Vpcs); err != nil { + return err + } + + for i := 0; i < len(m.Vpcs); i++ { + if swag.IsZero(m.Vpcs[i]) { // not required + continue + } + + if m.Vpcs[i] != nil { + if err := m.Vpcs[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("vpcs" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1TencentVpcs) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1TencentVpcs) UnmarshalBinary(b []byte) error { + var res V1TencentVpcs + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_time.go b/api/models/v1_time.go new file mode 100644 index 00000000..a7d08085 --- /dev/null +++ b/api/models/v1_time.go @@ -0,0 +1,60 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1Time Time is a wrapper around time.Time which supports correct marshaling to YAML and JSON. Wrappers are provided for many of the factory methods that the time package offers. +// +// swagger:model v1Time +type V1Time strfmt.DateTime + +// UnmarshalJSON sets a V1Time value from JSON input +func (m *V1Time) UnmarshalJSON(b []byte) error { + return ((*strfmt.DateTime)(m)).UnmarshalJSON(b) +} + +// MarshalJSON retrieves a V1Time value as JSON output +func (m V1Time) MarshalJSON() ([]byte, error) { + return (strfmt.DateTime(m)).MarshalJSON() +} + +// Validate validates this v1 time +func (m V1Time) Validate(formats strfmt.Registry) error { + var res []error + + if err := validate.FormatOf("", "body", "date-time", strfmt.DateTime(m).String(), formats); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +// MarshalBinary interface implementation +func (m *V1Time) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1Time) UnmarshalBinary(b []byte) error { + var res V1Time + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_tke_endpoint_access.go b/api/models/v1_tke_endpoint_access.go new file mode 100644 index 00000000..4c26f548 --- /dev/null +++ b/api/models/v1_tke_endpoint_access.go @@ -0,0 +1,61 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1TkeEndpointAccess TKEEndpointAccess specifies how control plane endpoints are accessible +// +// swagger:model v1TkeEndpointAccess +type V1TkeEndpointAccess struct { + + // IsExtranet Whether it is external network access (TRUE external network access FALSE internal network access, default value: FALSE) + IsExtranet bool `json:"IsExtranet,omitempty"` + + // Private points VPC-internal control plane access to the private endpoint + Private bool `json:"private,omitempty"` + + // Deprecated. PrivateCIDRs specifies which blocks can access the public endpoint + PrivateCIDR string `json:"privateCIDR,omitempty"` + + // Public controls whether control plane endpoints are publicly accessible + Public bool `json:"public,omitempty"` + + // Deprecated. PublicCIDRs specifies which blocks can access the public endpoint + PublicCIDRs []string `json:"publicCIDRs"` + + // Tencent security group + SecurityGroup string `json:"securityGroup,omitempty"` + + // Tencent Subnet + SubnetID string `json:"subnetId,omitempty"` +} + +// Validate validates this v1 tke endpoint access +func (m *V1TkeEndpointAccess) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1TkeEndpointAccess) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1TkeEndpointAccess) UnmarshalBinary(b []byte) error { + var res V1TkeEndpointAccess + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_tls_configuration.go b/api/models/v1_tls_configuration.go new file mode 100644 index 00000000..072bcb47 --- /dev/null +++ b/api/models/v1_tls_configuration.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1TLSConfiguration TLS configuration +// +// swagger:model v1TlsConfiguration +type V1TLSConfiguration struct { + + // ca + Ca string `json:"ca,omitempty"` + + // certificate + Certificate string `json:"certificate,omitempty"` + + // enabled + Enabled bool `json:"enabled"` + + // insecure skip verify + InsecureSkipVerify bool `json:"insecureSkipVerify"` + + // key + Key string `json:"key,omitempty"` +} + +// Validate validates this v1 Tls configuration +func (m *V1TLSConfiguration) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1TLSConfiguration) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1TLSConfiguration) UnmarshalBinary(b []byte) error { + var res V1TLSConfiguration + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_total_cluster_rate.go b/api/models/v1_total_cluster_rate.go new file mode 100644 index 00000000..86762c66 --- /dev/null +++ b/api/models/v1_total_cluster_rate.go @@ -0,0 +1,49 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1TotalClusterRate Cluster total estimated rate information +// +// swagger:model v1TotalClusterRate +type V1TotalClusterRate struct { + + // compute + Compute float64 `json:"compute"` + + // storage + Storage float64 `json:"storage"` + + // total + Total float64 `json:"total"` +} + +// Validate validates this v1 total cluster rate +func (m *V1TotalClusterRate) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1TotalClusterRate) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1TotalClusterRate) UnmarshalBinary(b []byte) error { + var res V1TotalClusterRate + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_uid.go b/api/models/v1_uid.go new file mode 100644 index 00000000..b548e286 --- /dev/null +++ b/api/models/v1_uid.go @@ -0,0 +1,64 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1UID v1 Uid +// +// swagger:model v1Uid +type V1UID struct { + + // uid + // Required: true + UID *string `json:"uid"` +} + +// Validate validates this v1 Uid +func (m *V1UID) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateUID(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1UID) validateUID(formats strfmt.Registry) error { + + if err := validate.Required("uid", "body", m.UID); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1UID) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1UID) UnmarshalBinary(b []byte) error { + var res V1UID + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_uid_role_summary.go b/api/models/v1_uid_role_summary.go new file mode 100644 index 00000000..0de831a2 --- /dev/null +++ b/api/models/v1_uid_role_summary.go @@ -0,0 +1,118 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1UIDRoleSummary v1 Uid role summary +// +// swagger:model v1UidRoleSummary +type V1UIDRoleSummary struct { + + // inherited roles + InheritedRoles []*V1UIDSummary `json:"inheritedRoles"` + + // name + Name string `json:"name,omitempty"` + + // roles + Roles []*V1UIDSummary `json:"roles"` + + // uid + UID string `json:"uid,omitempty"` +} + +// Validate validates this v1 Uid role summary +func (m *V1UIDRoleSummary) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateInheritedRoles(formats); err != nil { + res = append(res, err) + } + + if err := m.validateRoles(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1UIDRoleSummary) validateInheritedRoles(formats strfmt.Registry) error { + + if swag.IsZero(m.InheritedRoles) { // not required + return nil + } + + for i := 0; i < len(m.InheritedRoles); i++ { + if swag.IsZero(m.InheritedRoles[i]) { // not required + continue + } + + if m.InheritedRoles[i] != nil { + if err := m.InheritedRoles[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("inheritedRoles" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1UIDRoleSummary) validateRoles(formats strfmt.Registry) error { + + if swag.IsZero(m.Roles) { // not required + return nil + } + + for i := 0; i < len(m.Roles); i++ { + if swag.IsZero(m.Roles[i]) { // not required + continue + } + + if m.Roles[i] != nil { + if err := m.Roles[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("roles" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1UIDRoleSummary) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1UIDRoleSummary) UnmarshalBinary(b []byte) error { + var res V1UIDRoleSummary + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_uid_summary.go b/api/models/v1_uid_summary.go new file mode 100644 index 00000000..adcb201b --- /dev/null +++ b/api/models/v1_uid_summary.go @@ -0,0 +1,46 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1UIDSummary v1 Uid summary +// +// swagger:model v1UidSummary +type V1UIDSummary struct { + + // name + Name string `json:"name,omitempty"` + + // uid + UID string `json:"uid,omitempty"` +} + +// Validate validates this v1 Uid summary +func (m *V1UIDSummary) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1UIDSummary) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1UIDSummary) UnmarshalBinary(b []byte) error { + var res V1UIDSummary + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_uids.go b/api/models/v1_uids.go new file mode 100644 index 00000000..b09fb131 --- /dev/null +++ b/api/models/v1_uids.go @@ -0,0 +1,50 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1Uids v1 uids +// +// swagger:model v1Uids +type V1Uids []*V1UID + +// Validate validates this v1 uids +func (m V1Uids) Validate(formats strfmt.Registry) error { + var res []error + + if err := validate.UniqueItems("", "body", m); err != nil { + return err + } + + for i := 0; i < len(m); i++ { + if swag.IsZero(m[i]) { // not required + continue + } + + if m[i] != nil { + if err := m[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName(strconv.Itoa(i)) + } + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/models/v1_update_strategy.go b/api/models/v1_update_strategy.go new file mode 100644 index 00000000..520a38b9 --- /dev/null +++ b/api/models/v1_update_strategy.go @@ -0,0 +1,100 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "encoding/json" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1UpdateStrategy UpdatesStrategy will be used to translate to RollingUpdateStrategy of a MachineDeployment We'll start with default values for the translation, can expose more details later Following is details of parameters translated from the type ScaleOut => maxSurge=1, maxUnavailable=0 ScaleIn => maxSurge=0, maxUnavailable=1 +// +// swagger:model v1UpdateStrategy +type V1UpdateStrategy struct { + + // update strategy, either ScaleOut or ScaleIn if empty, will default to RollingUpdateScaleOut + // Enum: [RollingUpdateScaleOut RollingUpdateScaleIn] + Type string `json:"type,omitempty"` +} + +// Validate validates this v1 update strategy +func (m *V1UpdateStrategy) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateType(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +var v1UpdateStrategyTypeTypePropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["RollingUpdateScaleOut","RollingUpdateScaleIn"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + v1UpdateStrategyTypeTypePropEnum = append(v1UpdateStrategyTypeTypePropEnum, v) + } +} + +const ( + + // V1UpdateStrategyTypeRollingUpdateScaleOut captures enum value "RollingUpdateScaleOut" + V1UpdateStrategyTypeRollingUpdateScaleOut string = "RollingUpdateScaleOut" + + // V1UpdateStrategyTypeRollingUpdateScaleIn captures enum value "RollingUpdateScaleIn" + V1UpdateStrategyTypeRollingUpdateScaleIn string = "RollingUpdateScaleIn" +) + +// prop value enum +func (m *V1UpdateStrategy) validateTypeEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, v1UpdateStrategyTypeTypePropEnum, true); err != nil { + return err + } + return nil +} + +func (m *V1UpdateStrategy) validateType(formats strfmt.Registry) error { + + if swag.IsZero(m.Type) { // not required + return nil + } + + // value enum + if err := m.validateTypeEnum("type", "body", m.Type); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1UpdateStrategy) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1UpdateStrategy) UnmarshalBinary(b []byte) error { + var res V1UpdateStrategy + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_updated.go b/api/models/v1_updated.go new file mode 100644 index 00000000..5055d756 --- /dev/null +++ b/api/models/v1_updated.go @@ -0,0 +1,11 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +// V1Updated The resource was updated successfully +// +// swagger:model v1Updated +type V1Updated interface{} diff --git a/api/models/v1_updated_msg.go b/api/models/v1_updated_msg.go new file mode 100644 index 00000000..cbf40672 --- /dev/null +++ b/api/models/v1_updated_msg.go @@ -0,0 +1,43 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1UpdatedMsg Update response with message +// +// swagger:model v1UpdatedMsg +type V1UpdatedMsg struct { + + // msg + Msg string `json:"msg,omitempty"` +} + +// Validate validates this v1 updated msg +func (m *V1UpdatedMsg) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1UpdatedMsg) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1UpdatedMsg) UnmarshalBinary(b []byte) error { + var res V1UpdatedMsg + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_upgrades.go b/api/models/v1_upgrades.go new file mode 100644 index 00000000..5528780e --- /dev/null +++ b/api/models/v1_upgrades.go @@ -0,0 +1,73 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1Upgrades Upgrades represent the reason of the last upgrade that took place +// +// swagger:model v1Upgrades +type V1Upgrades struct { + + // reason + Reason []string `json:"reason"` + + // timestamp + // Format: date-time + Timestamp V1Time `json:"timestamp,omitempty"` +} + +// Validate validates this v1 upgrades +func (m *V1Upgrades) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateTimestamp(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1Upgrades) validateTimestamp(formats strfmt.Registry) error { + + if swag.IsZero(m.Timestamp) { // not required + return nil + } + + if err := m.Timestamp.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("timestamp") + } + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1Upgrades) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1Upgrades) UnmarshalBinary(b []byte) error { + var res V1Upgrades + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_user.go b/api/models/v1_user.go new file mode 100644 index 00000000..421cdc9a --- /dev/null +++ b/api/models/v1_user.go @@ -0,0 +1,121 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1User User +// +// swagger:model v1User +type V1User struct { + + // metadata + Metadata *V1ObjectMeta `json:"metadata,omitempty"` + + // spec + Spec *V1UserSpec `json:"spec,omitempty"` + + // status + Status *V1UserStatus `json:"status,omitempty"` +} + +// Validate validates this v1 user +func (m *V1User) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSpec(formats); err != nil { + res = append(res, err) + } + + if err := m.validateStatus(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1User) validateMetadata(formats strfmt.Registry) error { + + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } + return err + } + } + + return nil +} + +func (m *V1User) validateSpec(formats strfmt.Registry) error { + + if swag.IsZero(m.Spec) { // not required + return nil + } + + if m.Spec != nil { + if err := m.Spec.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec") + } + return err + } + } + + return nil +} + +func (m *V1User) validateStatus(formats strfmt.Registry) error { + + if swag.IsZero(m.Status) { // not required + return nil + } + + if m.Status != nil { + if err := m.Status.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("status") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1User) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1User) UnmarshalBinary(b []byte) error { + var res V1User + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_user_asset_ssh.go b/api/models/v1_user_asset_ssh.go new file mode 100644 index 00000000..94e745a6 --- /dev/null +++ b/api/models/v1_user_asset_ssh.go @@ -0,0 +1,96 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1UserAssetSSH SSH key information +// +// swagger:model v1UserAssetSsh +type V1UserAssetSSH struct { + + // metadata + Metadata *V1ObjectMeta `json:"metadata,omitempty"` + + // spec + Spec *V1UserAssetSSHSpec `json:"spec,omitempty"` +} + +// Validate validates this v1 user asset Ssh +func (m *V1UserAssetSSH) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSpec(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1UserAssetSSH) validateMetadata(formats strfmt.Registry) error { + + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } + return err + } + } + + return nil +} + +func (m *V1UserAssetSSH) validateSpec(formats strfmt.Registry) error { + + if swag.IsZero(m.Spec) { // not required + return nil + } + + if m.Spec != nil { + if err := m.Spec.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1UserAssetSSH) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1UserAssetSSH) UnmarshalBinary(b []byte) error { + var res V1UserAssetSSH + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_user_asset_ssh_entity.go b/api/models/v1_user_asset_ssh_entity.go new file mode 100644 index 00000000..e058e60f --- /dev/null +++ b/api/models/v1_user_asset_ssh_entity.go @@ -0,0 +1,96 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1UserAssetSSHEntity SSH Key request payload +// +// swagger:model v1UserAssetSshEntity +type V1UserAssetSSHEntity struct { + + // metadata + Metadata *V1ObjectMetaInputEntity `json:"metadata,omitempty"` + + // spec + Spec *V1UserAssetSSHSpec `json:"spec,omitempty"` +} + +// Validate validates this v1 user asset Ssh entity +func (m *V1UserAssetSSHEntity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSpec(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1UserAssetSSHEntity) validateMetadata(formats strfmt.Registry) error { + + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } + return err + } + } + + return nil +} + +func (m *V1UserAssetSSHEntity) validateSpec(formats strfmt.Registry) error { + + if swag.IsZero(m.Spec) { // not required + return nil + } + + if m.Spec != nil { + if err := m.Spec.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1UserAssetSSHEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1UserAssetSSHEntity) UnmarshalBinary(b []byte) error { + var res V1UserAssetSSHEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_user_asset_ssh_spec.go b/api/models/v1_user_asset_ssh_spec.go new file mode 100644 index 00000000..6f471936 --- /dev/null +++ b/api/models/v1_user_asset_ssh_spec.go @@ -0,0 +1,43 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1UserAssetSSHSpec SSH key specification +// +// swagger:model v1UserAssetSshSpec +type V1UserAssetSSHSpec struct { + + // public key + PublicKey string `json:"publicKey,omitempty"` +} + +// Validate validates this v1 user asset Ssh spec +func (m *V1UserAssetSSHSpec) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1UserAssetSSHSpec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1UserAssetSSHSpec) UnmarshalBinary(b []byte) error { + var res V1UserAssetSSHSpec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_user_assets_location.go b/api/models/v1_user_assets_location.go new file mode 100644 index 00000000..bbd0db78 --- /dev/null +++ b/api/models/v1_user_assets_location.go @@ -0,0 +1,96 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1UserAssetsLocation Location object +// +// swagger:model v1UserAssetsLocation +type V1UserAssetsLocation struct { + + // metadata + Metadata *V1ObjectMeta `json:"metadata,omitempty"` + + // spec + Spec *V1UserAssetsLocationSpec `json:"spec,omitempty"` +} + +// Validate validates this v1 user assets location +func (m *V1UserAssetsLocation) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSpec(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1UserAssetsLocation) validateMetadata(formats strfmt.Registry) error { + + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } + return err + } + } + + return nil +} + +func (m *V1UserAssetsLocation) validateSpec(formats strfmt.Registry) error { + + if swag.IsZero(m.Spec) { // not required + return nil + } + + if m.Spec != nil { + if err := m.Spec.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1UserAssetsLocation) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1UserAssetsLocation) UnmarshalBinary(b []byte) error { + var res V1UserAssetsLocation + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_user_assets_location_azure.go b/api/models/v1_user_assets_location_azure.go new file mode 100644 index 00000000..9b05622f --- /dev/null +++ b/api/models/v1_user_assets_location_azure.go @@ -0,0 +1,96 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1UserAssetsLocationAzure Azure location object +// +// swagger:model v1UserAssetsLocationAzure +type V1UserAssetsLocationAzure struct { + + // metadata + Metadata *V1ObjectMetaInputEntity `json:"metadata,omitempty"` + + // spec + Spec *V1UserAssetsLocationAzureSpec `json:"spec,omitempty"` +} + +// Validate validates this v1 user assets location azure +func (m *V1UserAssetsLocationAzure) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSpec(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1UserAssetsLocationAzure) validateMetadata(formats strfmt.Registry) error { + + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } + return err + } + } + + return nil +} + +func (m *V1UserAssetsLocationAzure) validateSpec(formats strfmt.Registry) error { + + if swag.IsZero(m.Spec) { // not required + return nil + } + + if m.Spec != nil { + if err := m.Spec.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1UserAssetsLocationAzure) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1UserAssetsLocationAzure) UnmarshalBinary(b []byte) error { + var res V1UserAssetsLocationAzure + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_user_assets_location_azure_spec.go b/api/models/v1_user_assets_location_azure_spec.go new file mode 100644 index 00000000..319b8f6b --- /dev/null +++ b/api/models/v1_user_assets_location_azure_spec.go @@ -0,0 +1,79 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1UserAssetsLocationAzureSpec Azure location specification +// +// swagger:model v1UserAssetsLocationAzureSpec +type V1UserAssetsLocationAzureSpec struct { + + // config + // Required: true + Config *V1AzureStorageConfig `json:"config"` + + // Set to 'true', if location has to be set as default + IsDefault bool `json:"isDefault,omitempty"` + + // Azure location type [azure] + Type string `json:"type,omitempty"` +} + +// Validate validates this v1 user assets location azure spec +func (m *V1UserAssetsLocationAzureSpec) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateConfig(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1UserAssetsLocationAzureSpec) validateConfig(formats strfmt.Registry) error { + + if err := validate.Required("config", "body", m.Config); err != nil { + return err + } + + if m.Config != nil { + if err := m.Config.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("config") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1UserAssetsLocationAzureSpec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1UserAssetsLocationAzureSpec) UnmarshalBinary(b []byte) error { + var res V1UserAssetsLocationAzureSpec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_user_assets_location_gcp.go b/api/models/v1_user_assets_location_gcp.go new file mode 100644 index 00000000..cb930de9 --- /dev/null +++ b/api/models/v1_user_assets_location_gcp.go @@ -0,0 +1,96 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1UserAssetsLocationGcp GCP location object +// +// swagger:model v1UserAssetsLocationGcp +type V1UserAssetsLocationGcp struct { + + // metadata + Metadata *V1ObjectMetaInputEntity `json:"metadata,omitempty"` + + // spec + Spec *V1UserAssetsLocationGcpSpec `json:"spec,omitempty"` +} + +// Validate validates this v1 user assets location gcp +func (m *V1UserAssetsLocationGcp) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSpec(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1UserAssetsLocationGcp) validateMetadata(formats strfmt.Registry) error { + + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } + return err + } + } + + return nil +} + +func (m *V1UserAssetsLocationGcp) validateSpec(formats strfmt.Registry) error { + + if swag.IsZero(m.Spec) { // not required + return nil + } + + if m.Spec != nil { + if err := m.Spec.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1UserAssetsLocationGcp) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1UserAssetsLocationGcp) UnmarshalBinary(b []byte) error { + var res V1UserAssetsLocationGcp + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_user_assets_location_gcp_spec.go b/api/models/v1_user_assets_location_gcp_spec.go new file mode 100644 index 00000000..836433c2 --- /dev/null +++ b/api/models/v1_user_assets_location_gcp_spec.go @@ -0,0 +1,79 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1UserAssetsLocationGcpSpec GCP location specification +// +// swagger:model v1UserAssetsLocationGcpSpec +type V1UserAssetsLocationGcpSpec struct { + + // config + // Required: true + Config *V1GcpStorageConfig `json:"config"` + + // Set to 'true', if location has to be set as default + IsDefault bool `json:"isDefault,omitempty"` + + // GCP location type [gcp] + Type string `json:"type,omitempty"` +} + +// Validate validates this v1 user assets location gcp spec +func (m *V1UserAssetsLocationGcpSpec) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateConfig(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1UserAssetsLocationGcpSpec) validateConfig(formats strfmt.Registry) error { + + if err := validate.Required("config", "body", m.Config); err != nil { + return err + } + + if m.Config != nil { + if err := m.Config.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("config") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1UserAssetsLocationGcpSpec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1UserAssetsLocationGcpSpec) UnmarshalBinary(b []byte) error { + var res V1UserAssetsLocationGcpSpec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_user_assets_location_s3.go b/api/models/v1_user_assets_location_s3.go new file mode 100644 index 00000000..9c3e9683 --- /dev/null +++ b/api/models/v1_user_assets_location_s3.go @@ -0,0 +1,96 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1UserAssetsLocationS3 S3 location object +// +// swagger:model v1UserAssetsLocationS3 +type V1UserAssetsLocationS3 struct { + + // metadata + Metadata *V1ObjectMetaInputEntity `json:"metadata,omitempty"` + + // spec + Spec *V1UserAssetsLocationS3Spec `json:"spec,omitempty"` +} + +// Validate validates this v1 user assets location s3 +func (m *V1UserAssetsLocationS3) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSpec(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1UserAssetsLocationS3) validateMetadata(formats strfmt.Registry) error { + + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } + return err + } + } + + return nil +} + +func (m *V1UserAssetsLocationS3) validateSpec(formats strfmt.Registry) error { + + if swag.IsZero(m.Spec) { // not required + return nil + } + + if m.Spec != nil { + if err := m.Spec.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1UserAssetsLocationS3) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1UserAssetsLocationS3) UnmarshalBinary(b []byte) error { + var res V1UserAssetsLocationS3 + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_user_assets_location_s3_spec.go b/api/models/v1_user_assets_location_s3_spec.go new file mode 100644 index 00000000..c4239b5f --- /dev/null +++ b/api/models/v1_user_assets_location_s3_spec.go @@ -0,0 +1,79 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1UserAssetsLocationS3Spec S3 location specification +// +// swagger:model v1UserAssetsLocationS3Spec +type V1UserAssetsLocationS3Spec struct { + + // config + // Required: true + Config *V1S3StorageConfig `json:"config"` + + // Set to 'true', if location has to be set as default + IsDefault bool `json:"isDefault,omitempty"` + + // S3 location type [s3/minio] + Type string `json:"type,omitempty"` +} + +// Validate validates this v1 user assets location s3 spec +func (m *V1UserAssetsLocationS3Spec) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateConfig(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1UserAssetsLocationS3Spec) validateConfig(formats strfmt.Registry) error { + + if err := validate.Required("config", "body", m.Config); err != nil { + return err + } + + if m.Config != nil { + if err := m.Config.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("config") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1UserAssetsLocationS3Spec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1UserAssetsLocationS3Spec) UnmarshalBinary(b []byte) error { + var res V1UserAssetsLocationS3Spec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_user_assets_location_spec.go b/api/models/v1_user_assets_location_spec.go new file mode 100644 index 00000000..b333aff7 --- /dev/null +++ b/api/models/v1_user_assets_location_spec.go @@ -0,0 +1,75 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1UserAssetsLocationSpec Location specification +// +// swagger:model v1UserAssetsLocationSpec +type V1UserAssetsLocationSpec struct { + + // is default + IsDefault bool `json:"isDefault,omitempty"` + + // storage + Storage V1LocationType `json:"storage,omitempty"` + + // type + Type string `json:"type,omitempty"` +} + +// Validate validates this v1 user assets location spec +func (m *V1UserAssetsLocationSpec) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateStorage(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1UserAssetsLocationSpec) validateStorage(formats strfmt.Registry) error { + + if swag.IsZero(m.Storage) { // not required + return nil + } + + if err := m.Storage.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("storage") + } + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1UserAssetsLocationSpec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1UserAssetsLocationSpec) UnmarshalBinary(b []byte) error { + var res V1UserAssetsLocationSpec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_user_assets_locations.go b/api/models/v1_user_assets_locations.go new file mode 100644 index 00000000..c1c56f62 --- /dev/null +++ b/api/models/v1_user_assets_locations.go @@ -0,0 +1,87 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1UserAssetsLocations v1 user assets locations +// +// swagger:model v1UserAssetsLocations +type V1UserAssetsLocations struct { + + // List of locations + // Required: true + // Unique: true + Items []*V1UserAssetsLocation `json:"items"` +} + +// Validate validates this v1 user assets locations +func (m *V1UserAssetsLocations) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateItems(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1UserAssetsLocations) validateItems(formats strfmt.Registry) error { + + if err := validate.Required("items", "body", m.Items); err != nil { + return err + } + + if err := validate.UniqueItems("items", "body", m.Items); err != nil { + return err + } + + for i := 0; i < len(m.Items); i++ { + if swag.IsZero(m.Items[i]) { // not required + continue + } + + if m.Items[i] != nil { + if err := m.Items[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("items" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1UserAssetsLocations) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1UserAssetsLocations) UnmarshalBinary(b []byte) error { + var res V1UserAssetsLocations + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_user_assets_ssh.go b/api/models/v1_user_assets_ssh.go new file mode 100644 index 00000000..80a2500e --- /dev/null +++ b/api/models/v1_user_assets_ssh.go @@ -0,0 +1,87 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1UserAssetsSSH v1 user assets Ssh +// +// swagger:model v1UserAssetsSsh +type V1UserAssetsSSH struct { + + // List of SSH keys + // Required: true + // Unique: true + Items []*V1UserAssetSSH `json:"items"` +} + +// Validate validates this v1 user assets Ssh +func (m *V1UserAssetsSSH) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateItems(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1UserAssetsSSH) validateItems(formats strfmt.Registry) error { + + if err := validate.Required("items", "body", m.Items); err != nil { + return err + } + + if err := validate.UniqueItems("items", "body", m.Items); err != nil { + return err + } + + for i := 0; i < len(m.Items); i++ { + if swag.IsZero(m.Items[i]) { // not required + continue + } + + if m.Items[i] != nil { + if err := m.Items[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("items" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1UserAssetsSSH) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1UserAssetsSSH) UnmarshalBinary(b []byte) error { + var res V1UserAssetsSSH + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_user_entity.go b/api/models/v1_user_entity.go new file mode 100644 index 00000000..72dc3c37 --- /dev/null +++ b/api/models/v1_user_entity.go @@ -0,0 +1,96 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1UserEntity User +// +// swagger:model v1UserEntity +type V1UserEntity struct { + + // metadata + Metadata *V1ObjectMeta `json:"metadata,omitempty"` + + // spec + Spec *V1UserSpecEntity `json:"spec,omitempty"` +} + +// Validate validates this v1 user entity +func (m *V1UserEntity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSpec(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1UserEntity) validateMetadata(formats strfmt.Registry) error { + + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } + return err + } + } + + return nil +} + +func (m *V1UserEntity) validateSpec(formats strfmt.Registry) error { + + if swag.IsZero(m.Spec) { // not required + return nil + } + + if m.Spec != nil { + if err := m.Spec.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1UserEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1UserEntity) UnmarshalBinary(b []byte) error { + var res V1UserEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_user_info.go b/api/models/v1_user_info.go new file mode 100644 index 00000000..2f156819 --- /dev/null +++ b/api/models/v1_user_info.go @@ -0,0 +1,49 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1UserInfo User basic information +// +// swagger:model v1UserInfo +type V1UserInfo struct { + + // Organization name + OrgName string `json:"orgName,omitempty"` + + // tenant Uid + TenantUID string `json:"tenantUid,omitempty"` + + // user Uid + UserUID string `json:"userUid,omitempty"` +} + +// Validate validates this v1 user info +func (m *V1UserInfo) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1UserInfo) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1UserInfo) UnmarshalBinary(b []byte) error { + var res V1UserInfo + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_user_kubectl_session.go b/api/models/v1_user_kubectl_session.go new file mode 100644 index 00000000..27d58f00 --- /dev/null +++ b/api/models/v1_user_kubectl_session.go @@ -0,0 +1,76 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1UserKubectlSession v1 user kubectl session +// +// swagger:model v1UserKubectlSession +type V1UserKubectlSession struct { + + // cluster Uid + ClusterUID string `json:"clusterUid,omitempty"` + + // creation time + CreationTime string `json:"creationTime,omitempty"` + + // is active + IsActive bool `json:"isActive,omitempty"` + + // pod Ip + PodIP string `json:"podIp,omitempty"` + + // pod name + PodName string `json:"podName,omitempty"` + + // port + Port string `json:"port,omitempty"` + + // project Uid + ProjectUID string `json:"projectUid,omitempty"` + + // session Uid + SessionUID string `json:"sessionUid,omitempty"` + + // shelly cluster + ShellyCluster string `json:"shellyCluster,omitempty"` + + // tenant cluster endpoint + TenantClusterEndpoint string `json:"tenantClusterEndpoint,omitempty"` + + // user name + UserName string `json:"userName,omitempty"` + + // user Uid + UserUID string `json:"userUid,omitempty"` +} + +// Validate validates this v1 user kubectl session +func (m *V1UserKubectlSession) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1UserKubectlSession) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1UserKubectlSession) UnmarshalBinary(b []byte) error { + var res V1UserKubectlSession + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_user_me.go b/api/models/v1_user_me.go new file mode 100644 index 00000000..7d6fc864 --- /dev/null +++ b/api/models/v1_user_me.go @@ -0,0 +1,121 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1UserMe User information wrt permissions +// +// swagger:model v1UserMe +type V1UserMe struct { + + // metadata + Metadata *V1ObjectMeta `json:"metadata,omitempty"` + + // spec + Spec *V1UserSpec `json:"spec,omitempty"` + + // status + Status *V1UserMeStatus `json:"status,omitempty"` +} + +// Validate validates this v1 user me +func (m *V1UserMe) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSpec(formats); err != nil { + res = append(res, err) + } + + if err := m.validateStatus(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1UserMe) validateMetadata(formats strfmt.Registry) error { + + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } + return err + } + } + + return nil +} + +func (m *V1UserMe) validateSpec(formats strfmt.Registry) error { + + if swag.IsZero(m.Spec) { // not required + return nil + } + + if m.Spec != nil { + if err := m.Spec.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec") + } + return err + } + } + + return nil +} + +func (m *V1UserMe) validateStatus(formats strfmt.Registry) error { + + if swag.IsZero(m.Status) { // not required + return nil + } + + if m.Status != nil { + if err := m.Status.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("status") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1UserMe) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1UserMe) UnmarshalBinary(b []byte) error { + var res V1UserMe + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_user_me_status.go b/api/models/v1_user_me_status.go new file mode 100644 index 00000000..a39bc526 --- /dev/null +++ b/api/models/v1_user_me_status.go @@ -0,0 +1,89 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1UserMeStatus User status with permissions +// +// swagger:model v1UserMeStatus +type V1UserMeStatus struct { + + // Contains activation link for the user + ActivationLink string `json:"activationLink,omitempty"` + + // Specifies if user account is active/disabled + IsActive bool `json:"isActive,omitempty"` + + // Specifies if user account has accepted the contract + IsContractAccepted bool `json:"isContractAccepted"` + + // User's login Mode + LoginMode string `json:"loginMode,omitempty"` + + // project permissions + ProjectPermissions map[string][]string `json:"projectPermissions,omitempty"` + + // users's tenant information + Tenant *V1UserMeTenant `json:"tenant,omitempty"` + + // tenant permissions + TenantPermissions map[string][]string `json:"tenantPermissions,omitempty"` +} + +// Validate validates this v1 user me status +func (m *V1UserMeStatus) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateTenant(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1UserMeStatus) validateTenant(formats strfmt.Registry) error { + + if swag.IsZero(m.Tenant) { // not required + return nil + } + + if m.Tenant != nil { + if err := m.Tenant.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("tenant") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1UserMeStatus) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1UserMeStatus) UnmarshalBinary(b []byte) error { + var res V1UserMeStatus + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_user_me_tenant.go b/api/models/v1_user_me_tenant.go new file mode 100644 index 00000000..1e56a4ec --- /dev/null +++ b/api/models/v1_user_me_tenant.go @@ -0,0 +1,46 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1UserMeTenant v1 user me tenant +// +// swagger:model v1UserMeTenant +type V1UserMeTenant struct { + + // org name + OrgName string `json:"orgName,omitempty"` + + // tenant Uid + TenantUID string `json:"tenantUid,omitempty"` +} + +// Validate validates this v1 user me tenant +func (m *V1UserMeTenant) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1UserMeTenant) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1UserMeTenant) UnmarshalBinary(b []byte) error { + var res V1UserMeTenant + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_user_meta.go b/api/models/v1_user_meta.go new file mode 100644 index 00000000..ecc94060 --- /dev/null +++ b/api/models/v1_user_meta.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1UserMeta v1 user meta +// +// swagger:model v1UserMeta +type V1UserMeta struct { + + // email Id + EmailID string `json:"emailId,omitempty"` + + // first name + FirstName string `json:"firstName,omitempty"` + + // last name + LastName string `json:"lastName,omitempty"` + + // org + Org string `json:"org,omitempty"` + + // uid + UID string `json:"uid,omitempty"` +} + +// Validate validates this v1 user meta +func (m *V1UserMeta) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1UserMeta) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1UserMeta) UnmarshalBinary(b []byte) error { + var res V1UserMeta + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_user_meta_entity.go b/api/models/v1_user_meta_entity.go new file mode 100644 index 00000000..4a3a8ab7 --- /dev/null +++ b/api/models/v1_user_meta_entity.go @@ -0,0 +1,49 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1UserMetaEntity User meta entity +// +// swagger:model v1UserMetaEntity +type V1UserMetaEntity struct { + + // email Id + EmailID string `json:"emailId,omitempty"` + + // name + Name string `json:"name,omitempty"` + + // uid + UID string `json:"uid,omitempty"` +} + +// Validate validates this v1 user meta entity +func (m *V1UserMetaEntity) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1UserMetaEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1UserMetaEntity) UnmarshalBinary(b []byte) error { + var res V1UserMetaEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_user_patch.go b/api/models/v1_user_patch.go new file mode 100644 index 00000000..344154b3 --- /dev/null +++ b/api/models/v1_user_patch.go @@ -0,0 +1,45 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1UserPatch v1 user patch +// +// swagger:model v1UserPatch +type V1UserPatch []*V1HTTPPatch + +// Validate validates this v1 user patch +func (m V1UserPatch) Validate(formats strfmt.Registry) error { + var res []error + + for i := 0; i < len(m); i++ { + if swag.IsZero(m[i]) { // not required + continue + } + + if m[i] != nil { + if err := m[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName(strconv.Itoa(i)) + } + return err + } + } + + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/models/v1_user_role_map.go b/api/models/v1_user_role_map.go new file mode 100644 index 00000000..9a1b2850 --- /dev/null +++ b/api/models/v1_user_role_map.go @@ -0,0 +1,46 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1UserRoleMap v1 user role map +// +// swagger:model v1UserRoleMap +type V1UserRoleMap struct { + + // roles + Roles []string `json:"roles"` + + // user Id + UserID string `json:"userId,omitempty"` +} + +// Validate validates this v1 user role map +func (m *V1UserRoleMap) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1UserRoleMap) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1UserRoleMap) UnmarshalBinary(b []byte) error { + var res V1UserRoleMap + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_user_role_ui_ds.go b/api/models/v1_user_role_ui_ds.go new file mode 100644 index 00000000..8e33f830 --- /dev/null +++ b/api/models/v1_user_role_ui_ds.go @@ -0,0 +1,43 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1UserRoleUIDs v1 user role UI ds +// +// swagger:model v1UserRoleUIDs +type V1UserRoleUIDs struct { + + // roles + Roles []string `json:"roles"` +} + +// Validate validates this v1 user role UI ds +func (m *V1UserRoleUIDs) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1UserRoleUIDs) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1UserRoleUIDs) UnmarshalBinary(b []byte) error { + var res V1UserRoleUIDs + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_user_roles_entity.go b/api/models/v1_user_roles_entity.go new file mode 100644 index 00000000..3b481e1c --- /dev/null +++ b/api/models/v1_user_roles_entity.go @@ -0,0 +1,112 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1UserRolesEntity v1 user roles entity +// +// swagger:model v1UserRolesEntity +type V1UserRolesEntity struct { + + // inherited roles + InheritedRoles []*V1UIDSummary `json:"inheritedRoles"` + + // roles + Roles []*V1UIDSummary `json:"roles"` +} + +// Validate validates this v1 user roles entity +func (m *V1UserRolesEntity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateInheritedRoles(formats); err != nil { + res = append(res, err) + } + + if err := m.validateRoles(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1UserRolesEntity) validateInheritedRoles(formats strfmt.Registry) error { + + if swag.IsZero(m.InheritedRoles) { // not required + return nil + } + + for i := 0; i < len(m.InheritedRoles); i++ { + if swag.IsZero(m.InheritedRoles[i]) { // not required + continue + } + + if m.InheritedRoles[i] != nil { + if err := m.InheritedRoles[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("inheritedRoles" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1UserRolesEntity) validateRoles(formats strfmt.Registry) error { + + if swag.IsZero(m.Roles) { // not required + return nil + } + + for i := 0; i < len(m.Roles); i++ { + if swag.IsZero(m.Roles[i]) { // not required + continue + } + + if m.Roles[i] != nil { + if err := m.Roles[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("roles" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1UserRolesEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1UserRolesEntity) UnmarshalBinary(b []byte) error { + var res V1UserRolesEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_user_spec.go b/api/models/v1_user_spec.go new file mode 100644 index 00000000..933a8fcd --- /dev/null +++ b/api/models/v1_user_spec.go @@ -0,0 +1,77 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1UserSpec User specifications +// +// swagger:model v1UserSpec +type V1UserSpec struct { + + // User's email id + EmailID string `json:"emailId,omitempty"` + + // first name + FirstName string `json:"firstName,omitempty"` + + // last name + LastName string `json:"lastName,omitempty"` + + // roles + // Unique: true + Roles []string `json:"roles"` +} + +// Validate validates this v1 user spec +func (m *V1UserSpec) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateRoles(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1UserSpec) validateRoles(formats strfmt.Registry) error { + + if swag.IsZero(m.Roles) { // not required + return nil + } + + if err := validate.UniqueItems("roles", "body", m.Roles); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1UserSpec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1UserSpec) UnmarshalBinary(b []byte) error { + var res V1UserSpec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_user_spec_entity.go b/api/models/v1_user_spec_entity.go new file mode 100644 index 00000000..ef78d163 --- /dev/null +++ b/api/models/v1_user_spec_entity.go @@ -0,0 +1,101 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1UserSpecEntity User Entity input +// +// swagger:model v1UserSpecEntity +type V1UserSpecEntity struct { + + // email Id + EmailID string `json:"emailId,omitempty"` + + // first name + FirstName string `json:"firstName,omitempty"` + + // last name + LastName string `json:"lastName,omitempty"` + + // login mode + LoginMode string `json:"loginMode,omitempty"` + + // roles + // Unique: true + Roles []string `json:"roles"` + + // teams + // Unique: true + Teams []string `json:"teams"` +} + +// Validate validates this v1 user spec entity +func (m *V1UserSpecEntity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateRoles(formats); err != nil { + res = append(res, err) + } + + if err := m.validateTeams(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1UserSpecEntity) validateRoles(formats strfmt.Registry) error { + + if swag.IsZero(m.Roles) { // not required + return nil + } + + if err := validate.UniqueItems("roles", "body", m.Roles); err != nil { + return err + } + + return nil +} + +func (m *V1UserSpecEntity) validateTeams(formats strfmt.Registry) error { + + if swag.IsZero(m.Teams) { // not required + return nil + } + + if err := validate.UniqueItems("teams", "body", m.Teams); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1UserSpecEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1UserSpecEntity) UnmarshalBinary(b []byte) error { + var res V1UserSpecEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_user_spec_summary.go b/api/models/v1_user_spec_summary.go new file mode 100644 index 00000000..962cde13 --- /dev/null +++ b/api/models/v1_user_spec_summary.go @@ -0,0 +1,156 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1UserSpecSummary v1 user spec summary +// +// swagger:model v1UserSpecSummary +type V1UserSpecSummary struct { + + // email Id + EmailID string `json:"emailId,omitempty"` + + // first name + FirstName string `json:"firstName,omitempty"` + + // last name + LastName string `json:"lastName,omitempty"` + + // Deprecated. + Projects []*V1UIDSummary `json:"projects"` + + // projects count + ProjectsCount int32 `json:"projectsCount"` + + // roles + Roles []*V1UIDSummary `json:"roles"` + + // teams + Teams []*V1UIDSummary `json:"teams"` +} + +// Validate validates this v1 user spec summary +func (m *V1UserSpecSummary) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateProjects(formats); err != nil { + res = append(res, err) + } + + if err := m.validateRoles(formats); err != nil { + res = append(res, err) + } + + if err := m.validateTeams(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1UserSpecSummary) validateProjects(formats strfmt.Registry) error { + + if swag.IsZero(m.Projects) { // not required + return nil + } + + for i := 0; i < len(m.Projects); i++ { + if swag.IsZero(m.Projects[i]) { // not required + continue + } + + if m.Projects[i] != nil { + if err := m.Projects[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("projects" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1UserSpecSummary) validateRoles(formats strfmt.Registry) error { + + if swag.IsZero(m.Roles) { // not required + return nil + } + + for i := 0; i < len(m.Roles); i++ { + if swag.IsZero(m.Roles[i]) { // not required + continue + } + + if m.Roles[i] != nil { + if err := m.Roles[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("roles" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1UserSpecSummary) validateTeams(formats strfmt.Registry) error { + + if swag.IsZero(m.Teams) { // not required + return nil + } + + for i := 0; i < len(m.Teams); i++ { + if swag.IsZero(m.Teams[i]) { // not required + continue + } + + if m.Teams[i] != nil { + if err := m.Teams[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("teams" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1UserSpecSummary) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1UserSpecSummary) UnmarshalBinary(b []byte) error { + var res V1UserSpecSummary + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_user_status.go b/api/models/v1_user_status.go new file mode 100644 index 00000000..2f95e6ab --- /dev/null +++ b/api/models/v1_user_status.go @@ -0,0 +1,79 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1UserStatus User status +// +// swagger:model v1UserStatus +type V1UserStatus struct { + + // provides the link to activate or reset the user password + ActivationLink string `json:"activationLink"` + + // Specifies if user account is active/disabled + IsActive bool `json:"isActive"` + + // Specifies if user in multi org requested password reset + IsPasswordResetting bool `json:"isPasswordResetting"` + + // user's last sign in time + // Format: date-time + LastSignIn V1Time `json:"lastSignIn,omitempty"` +} + +// Validate validates this v1 user status +func (m *V1UserStatus) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateLastSignIn(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1UserStatus) validateLastSignIn(formats strfmt.Registry) error { + + if swag.IsZero(m.LastSignIn) { // not required + return nil + } + + if err := m.LastSignIn.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("lastSignIn") + } + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1UserStatus) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1UserStatus) UnmarshalBinary(b []byte) error { + var res V1UserStatus + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_user_status_login_mode.go b/api/models/v1_user_status_login_mode.go new file mode 100644 index 00000000..80b3a022 --- /dev/null +++ b/api/models/v1_user_status_login_mode.go @@ -0,0 +1,100 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "encoding/json" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1UserStatusLoginMode v1 user status login mode +// +// swagger:model v1UserStatusLoginMode +type V1UserStatusLoginMode struct { + + // login mode + // Enum: [dev devops] + LoginMode string `json:"loginMode,omitempty"` +} + +// Validate validates this v1 user status login mode +func (m *V1UserStatusLoginMode) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateLoginMode(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +var v1UserStatusLoginModeTypeLoginModePropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["dev","devops"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + v1UserStatusLoginModeTypeLoginModePropEnum = append(v1UserStatusLoginModeTypeLoginModePropEnum, v) + } +} + +const ( + + // V1UserStatusLoginModeLoginModeDev captures enum value "dev" + V1UserStatusLoginModeLoginModeDev string = "dev" + + // V1UserStatusLoginModeLoginModeDevops captures enum value "devops" + V1UserStatusLoginModeLoginModeDevops string = "devops" +) + +// prop value enum +func (m *V1UserStatusLoginMode) validateLoginModeEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, v1UserStatusLoginModeTypeLoginModePropEnum, true); err != nil { + return err + } + return nil +} + +func (m *V1UserStatusLoginMode) validateLoginMode(formats strfmt.Registry) error { + + if swag.IsZero(m.LoginMode) { // not required + return nil + } + + // value enum + if err := m.validateLoginModeEnum("loginMode", "body", m.LoginMode); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1UserStatusLoginMode) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1UserStatusLoginMode) UnmarshalBinary(b []byte) error { + var res V1UserStatusLoginMode + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_user_summary.go b/api/models/v1_user_summary.go new file mode 100644 index 00000000..f1712899 --- /dev/null +++ b/api/models/v1_user_summary.go @@ -0,0 +1,121 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1UserSummary User summary +// +// swagger:model v1UserSummary +type V1UserSummary struct { + + // metadata + Metadata *V1ObjectMeta `json:"metadata,omitempty"` + + // spec + Spec *V1UserSpecSummary `json:"spec,omitempty"` + + // status + Status *V1UserStatus `json:"status,omitempty"` +} + +// Validate validates this v1 user summary +func (m *V1UserSummary) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSpec(formats); err != nil { + res = append(res, err) + } + + if err := m.validateStatus(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1UserSummary) validateMetadata(formats strfmt.Registry) error { + + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } + return err + } + } + + return nil +} + +func (m *V1UserSummary) validateSpec(formats strfmt.Registry) error { + + if swag.IsZero(m.Spec) { // not required + return nil + } + + if m.Spec != nil { + if err := m.Spec.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec") + } + return err + } + } + + return nil +} + +func (m *V1UserSummary) validateStatus(formats strfmt.Registry) error { + + if swag.IsZero(m.Status) { // not required + return nil + } + + if m.Status != nil { + if err := m.Status.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("status") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1UserSummary) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1UserSummary) UnmarshalBinary(b []byte) error { + var res V1UserSummary + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_user_summary_sort_fields.go b/api/models/v1_user_summary_sort_fields.go new file mode 100644 index 00000000..c3ca5724 --- /dev/null +++ b/api/models/v1_user_summary_sort_fields.go @@ -0,0 +1,63 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "encoding/json" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" +) + +// V1UserSummarySortFields v1 user summary sort fields +// +// swagger:model v1UserSummarySortFields +type V1UserSummarySortFields string + +const ( + + // V1UserSummarySortFieldsName captures enum value "name" + V1UserSummarySortFieldsName V1UserSummarySortFields = "name" + + // V1UserSummarySortFieldsCreationTimestamp captures enum value "creationTimestamp" + V1UserSummarySortFieldsCreationTimestamp V1UserSummarySortFields = "creationTimestamp" +) + +// for schema +var v1UserSummarySortFieldsEnum []interface{} + +func init() { + var res []V1UserSummarySortFields + if err := json.Unmarshal([]byte(`["name","creationTimestamp"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + v1UserSummarySortFieldsEnum = append(v1UserSummarySortFieldsEnum, v) + } +} + +func (m V1UserSummarySortFields) validateV1UserSummarySortFieldsEnum(path, location string, value V1UserSummarySortFields) error { + if err := validate.EnumCase(path, location, value, v1UserSummarySortFieldsEnum, true); err != nil { + return err + } + return nil +} + +// Validate validates this v1 user summary sort fields +func (m V1UserSummarySortFields) Validate(formats strfmt.Registry) error { + var res []error + + // value enum + if err := m.validateV1UserSummarySortFieldsEnum("", "body", m); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/models/v1_user_summary_sort_spec.go b/api/models/v1_user_summary_sort_spec.go new file mode 100644 index 00000000..0ba7fb1d --- /dev/null +++ b/api/models/v1_user_summary_sort_spec.go @@ -0,0 +1,94 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1UserSummarySortSpec v1 user summary sort spec +// +// swagger:model v1UserSummarySortSpec +type V1UserSummarySortSpec struct { + + // field + Field *V1UserSummarySortFields `json:"field,omitempty"` + + // order + Order V1SortOrder `json:"order,omitempty"` +} + +// Validate validates this v1 user summary sort spec +func (m *V1UserSummarySortSpec) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateField(formats); err != nil { + res = append(res, err) + } + + if err := m.validateOrder(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1UserSummarySortSpec) validateField(formats strfmt.Registry) error { + + if swag.IsZero(m.Field) { // not required + return nil + } + + if m.Field != nil { + if err := m.Field.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("field") + } + return err + } + } + + return nil +} + +func (m *V1UserSummarySortSpec) validateOrder(formats strfmt.Registry) error { + + if swag.IsZero(m.Order) { // not required + return nil + } + + if err := m.Order.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("order") + } + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1UserSummarySortSpec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1UserSummarySortSpec) UnmarshalBinary(b []byte) error { + var res V1UserSummarySortSpec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_user_token.go b/api/models/v1_user_token.go new file mode 100644 index 00000000..91c2926e --- /dev/null +++ b/api/models/v1_user_token.go @@ -0,0 +1,46 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1UserToken Returns the Authorization token. To be used for further api calls +// +// swagger:model v1UserToken +type V1UserToken struct { + + // Describes the authentication token in jwt format. + Authorization string `json:"Authorization,omitempty"` + + // Indicates the authentication flow using MFA + IsMfa bool `json:"isMfa"` +} + +// Validate validates this v1 user token +func (m *V1UserToken) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1UserToken) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1UserToken) UnmarshalBinary(b []byte) error { + var res V1UserToken + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_user_update_entity.go b/api/models/v1_user_update_entity.go new file mode 100644 index 00000000..699c8179 --- /dev/null +++ b/api/models/v1_user_update_entity.go @@ -0,0 +1,96 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1UserUpdateEntity User +// +// swagger:model v1UserUpdateEntity +type V1UserUpdateEntity struct { + + // metadata + Metadata *V1ObjectMeta `json:"metadata,omitempty"` + + // spec + Spec *V1UserUpdateSpecEntity `json:"spec,omitempty"` +} + +// Validate validates this v1 user update entity +func (m *V1UserUpdateEntity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSpec(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1UserUpdateEntity) validateMetadata(formats strfmt.Registry) error { + + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } + return err + } + } + + return nil +} + +func (m *V1UserUpdateEntity) validateSpec(formats strfmt.Registry) error { + + if swag.IsZero(m.Spec) { // not required + return nil + } + + if m.Spec != nil { + if err := m.Spec.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1UserUpdateEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1UserUpdateEntity) UnmarshalBinary(b []byte) error { + var res V1UserUpdateEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_user_update_spec_entity.go b/api/models/v1_user_update_spec_entity.go new file mode 100644 index 00000000..ad843213 --- /dev/null +++ b/api/models/v1_user_update_spec_entity.go @@ -0,0 +1,77 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1UserUpdateSpecEntity User Entity input +// +// swagger:model v1UserUpdateSpecEntity +type V1UserUpdateSpecEntity struct { + + // email Id + EmailID string `json:"emailId,omitempty"` + + // first name + FirstName string `json:"firstName,omitempty"` + + // last name + LastName string `json:"lastName,omitempty"` + + // Deprecated. Use 'v1/users/{uid}/roles' API to assign roles. + // Unique: true + Roles []string `json:"roles"` +} + +// Validate validates this v1 user update spec entity +func (m *V1UserUpdateSpecEntity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateRoles(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1UserUpdateSpecEntity) validateRoles(formats strfmt.Registry) error { + + if swag.IsZero(m.Roles) { // not required + return nil + } + + if err := validate.UniqueItems("roles", "body", m.Roles); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1UserUpdateSpecEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1UserUpdateSpecEntity) UnmarshalBinary(b []byte) error { + var res V1UserUpdateSpecEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_users.go b/api/models/v1_users.go new file mode 100644 index 00000000..dc97c157 --- /dev/null +++ b/api/models/v1_users.go @@ -0,0 +1,112 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1Users v1 users +// +// swagger:model v1Users +type V1Users struct { + + // items + // Required: true + // Unique: true + Items []*V1User `json:"items"` + + // listmeta + Listmeta *V1ListMetaData `json:"listmeta,omitempty"` +} + +// Validate validates this v1 users +func (m *V1Users) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateItems(formats); err != nil { + res = append(res, err) + } + + if err := m.validateListmeta(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1Users) validateItems(formats strfmt.Registry) error { + + if err := validate.Required("items", "body", m.Items); err != nil { + return err + } + + if err := validate.UniqueItems("items", "body", m.Items); err != nil { + return err + } + + for i := 0; i < len(m.Items); i++ { + if swag.IsZero(m.Items[i]) { // not required + continue + } + + if m.Items[i] != nil { + if err := m.Items[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("items" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1Users) validateListmeta(formats strfmt.Registry) error { + + if swag.IsZero(m.Listmeta) { // not required + return nil + } + + if m.Listmeta != nil { + if err := m.Listmeta.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("listmeta") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1Users) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1Users) UnmarshalBinary(b []byte) error { + var res V1Users + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_users_filter_spec.go b/api/models/v1_users_filter_spec.go new file mode 100644 index 00000000..3897b3fe --- /dev/null +++ b/api/models/v1_users_filter_spec.go @@ -0,0 +1,96 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1UsersFilterSpec Users filter spec +// +// swagger:model v1UsersFilterSpec +type V1UsersFilterSpec struct { + + // email Id + EmailID *V1FilterString `json:"emailId,omitempty"` + + // name + Name *V1FilterString `json:"name,omitempty"` +} + +// Validate validates this v1 users filter spec +func (m *V1UsersFilterSpec) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateEmailID(formats); err != nil { + res = append(res, err) + } + + if err := m.validateName(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1UsersFilterSpec) validateEmailID(formats strfmt.Registry) error { + + if swag.IsZero(m.EmailID) { // not required + return nil + } + + if m.EmailID != nil { + if err := m.EmailID.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("emailId") + } + return err + } + } + + return nil +} + +func (m *V1UsersFilterSpec) validateName(formats strfmt.Registry) error { + + if swag.IsZero(m.Name) { // not required + return nil + } + + if m.Name != nil { + if err := m.Name.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("name") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1UsersFilterSpec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1UsersFilterSpec) UnmarshalBinary(b []byte) error { + var res V1UsersFilterSpec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_users_metadata.go b/api/models/v1_users_metadata.go new file mode 100644 index 00000000..8a1448b8 --- /dev/null +++ b/api/models/v1_users_metadata.go @@ -0,0 +1,87 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1UsersMetadata v1 users metadata +// +// swagger:model v1UsersMetadata +type V1UsersMetadata struct { + + // items + // Required: true + // Unique: true + Items []*V1UserMetaEntity `json:"items"` +} + +// Validate validates this v1 users metadata +func (m *V1UsersMetadata) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateItems(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1UsersMetadata) validateItems(formats strfmt.Registry) error { + + if err := validate.Required("items", "body", m.Items); err != nil { + return err + } + + if err := validate.UniqueItems("items", "body", m.Items); err != nil { + return err + } + + for i := 0; i < len(m.Items); i++ { + if swag.IsZero(m.Items[i]) { // not required + continue + } + + if m.Items[i] != nil { + if err := m.Items[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("items" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1UsersMetadata) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1UsersMetadata) UnmarshalBinary(b []byte) error { + var res V1UsersMetadata + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_users_summary_list.go b/api/models/v1_users_summary_list.go new file mode 100644 index 00000000..d596e949 --- /dev/null +++ b/api/models/v1_users_summary_list.go @@ -0,0 +1,87 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1UsersSummaryList v1 users summary list +// +// swagger:model v1UsersSummaryList +type V1UsersSummaryList struct { + + // items + // Required: true + // Unique: true + Items []*V1UserSummary `json:"items"` +} + +// Validate validates this v1 users summary list +func (m *V1UsersSummaryList) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateItems(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1UsersSummaryList) validateItems(formats strfmt.Registry) error { + + if err := validate.Required("items", "body", m.Items); err != nil { + return err + } + + if err := validate.UniqueItems("items", "body", m.Items); err != nil { + return err + } + + for i := 0; i < len(m.Items); i++ { + if swag.IsZero(m.Items[i]) { // not required + continue + } + + if m.Items[i] != nil { + if err := m.Items[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("items" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1UsersSummaryList) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1UsersSummaryList) UnmarshalBinary(b []byte) error { + var res V1UsersSummaryList + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_users_summary_spec.go b/api/models/v1_users_summary_spec.go new file mode 100644 index 00000000..23a5975f --- /dev/null +++ b/api/models/v1_users_summary_spec.go @@ -0,0 +1,111 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1UsersSummarySpec Users filter summary spec +// +// swagger:model v1UsersSummarySpec +type V1UsersSummarySpec struct { + + // filter + Filter *V1UsersFilterSpec `json:"filter,omitempty"` + + // sort + // Unique: true + Sort []*V1UserSummarySortSpec `json:"sort"` +} + +// Validate validates this v1 users summary spec +func (m *V1UsersSummarySpec) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateFilter(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSort(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1UsersSummarySpec) validateFilter(formats strfmt.Registry) error { + + if swag.IsZero(m.Filter) { // not required + return nil + } + + if m.Filter != nil { + if err := m.Filter.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("filter") + } + return err + } + } + + return nil +} + +func (m *V1UsersSummarySpec) validateSort(formats strfmt.Registry) error { + + if swag.IsZero(m.Sort) { // not required + return nil + } + + if err := validate.UniqueItems("sort", "body", m.Sort); err != nil { + return err + } + + for i := 0; i < len(m.Sort); i++ { + if swag.IsZero(m.Sort[i]) { // not required + continue + } + + if m.Sort[i] != nil { + if err := m.Sort[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("sort" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1UsersSummarySpec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1UsersSummarySpec) UnmarshalBinary(b []byte) error { + var res V1UsersSummarySpec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_variable.go b/api/models/v1_variable.go new file mode 100644 index 00000000..b8803142 --- /dev/null +++ b/api/models/v1_variable.go @@ -0,0 +1,111 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1Variable Unique variable field with schema definition +// +// swagger:model v1Variable +type V1Variable struct { + + // The default value of the variable + DefaultValue string `json:"defaultValue,omitempty"` + + // Variable description + Description string `json:"description,omitempty"` + + // Unique display name of the variable + DisplayName string `json:"displayName,omitempty"` + + // format + Format V1VariableFormat `json:"format,omitempty"` + + // If true, then variable will be hidden for overriding the value. By default the hidden flag will be set to false + Hidden bool `json:"hidden"` + + // If true, then variable value can't be editable. By default the immutable flag will be set to false + Immutable bool `json:"immutable"` + + // If true, then default value will be masked. By default the isSensitive flag will be set to false + IsSensitive bool `json:"isSensitive"` + + // Variable name + // Required: true + Name *string `json:"name"` + + // Regular expression pattern which the variable value must match + Regex string `json:"regex,omitempty"` + + // Flag to specify if the variable is optional or mandatory. If it is mandatory then default value must be provided + Required bool `json:"required"` +} + +// Validate validates this v1 variable +func (m *V1Variable) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateFormat(formats); err != nil { + res = append(res, err) + } + + if err := m.validateName(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1Variable) validateFormat(formats strfmt.Registry) error { + + if swag.IsZero(m.Format) { // not required + return nil + } + + if err := m.Format.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("format") + } + return err + } + + return nil +} + +func (m *V1Variable) validateName(formats strfmt.Registry) error { + + if err := validate.Required("name", "body", m.Name); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1Variable) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1Variable) UnmarshalBinary(b []byte) error { + var res V1Variable + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_variable_format.go b/api/models/v1_variable_format.go new file mode 100644 index 00000000..567f0909 --- /dev/null +++ b/api/models/v1_variable_format.go @@ -0,0 +1,78 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "encoding/json" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" +) + +// V1VariableFormat Format type of the variable value +// +// swagger:model v1VariableFormat +type V1VariableFormat string + +const ( + + // V1VariableFormatString captures enum value "string" + V1VariableFormatString V1VariableFormat = "string" + + // V1VariableFormatNumber captures enum value "number" + V1VariableFormatNumber V1VariableFormat = "number" + + // V1VariableFormatBoolean captures enum value "boolean" + V1VariableFormatBoolean V1VariableFormat = "boolean" + + // V1VariableFormatIPV4 captures enum value "ipv4" + V1VariableFormatIPV4 V1VariableFormat = "ipv4" + + // V1VariableFormatIpv4cidr captures enum value "ipv4cidr" + V1VariableFormatIpv4cidr V1VariableFormat = "ipv4cidr" + + // V1VariableFormatIPV6 captures enum value "ipv6" + V1VariableFormatIPV6 V1VariableFormat = "ipv6" + + // V1VariableFormatVersion captures enum value "version" + V1VariableFormatVersion V1VariableFormat = "version" +) + +// for schema +var v1VariableFormatEnum []interface{} + +func init() { + var res []V1VariableFormat + if err := json.Unmarshal([]byte(`["string","number","boolean","ipv4","ipv4cidr","ipv6","version"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + v1VariableFormatEnum = append(v1VariableFormatEnum, v) + } +} + +func (m V1VariableFormat) validateV1VariableFormatEnum(path, location string, value V1VariableFormat) error { + if err := validate.EnumCase(path, location, value, v1VariableFormatEnum, true); err != nil { + return err + } + return nil +} + +// Validate validates this v1 variable format +func (m V1VariableFormat) Validate(formats strfmt.Registry) error { + var res []error + + // value enum + if err := m.validateV1VariableFormatEnum("", "body", m); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/models/v1_variable_names.go b/api/models/v1_variable_names.go new file mode 100644 index 00000000..0ff34071 --- /dev/null +++ b/api/models/v1_variable_names.go @@ -0,0 +1,69 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1VariableNames v1 variable names +// +// swagger:model v1VariableNames +type V1VariableNames struct { + + // Array of variable names + // Required: true + // Unique: true + Variables []string `json:"variables"` +} + +// Validate validates this v1 variable names +func (m *V1VariableNames) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateVariables(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1VariableNames) validateVariables(formats strfmt.Registry) error { + + if err := validate.Required("variables", "body", m.Variables); err != nil { + return err + } + + if err := validate.UniqueItems("variables", "body", m.Variables); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1VariableNames) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1VariableNames) UnmarshalBinary(b []byte) error { + var res V1VariableNames + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_variables.go b/api/models/v1_variables.go new file mode 100644 index 00000000..1d9a8a5b --- /dev/null +++ b/api/models/v1_variables.go @@ -0,0 +1,86 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1Variables v1 variables +// +// swagger:model v1Variables +type V1Variables struct { + + // List of unique variable fields with schema constraints + // Unique: true + Variables []*V1Variable `json:"variables"` +} + +// Validate validates this v1 variables +func (m *V1Variables) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateVariables(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1Variables) validateVariables(formats strfmt.Registry) error { + + if swag.IsZero(m.Variables) { // not required + return nil + } + + if err := validate.UniqueItems("variables", "body", m.Variables); err != nil { + return err + } + + for i := 0; i < len(m.Variables); i++ { + if swag.IsZero(m.Variables[i]) { // not required + continue + } + + if m.Variables[i] != nil { + if err := m.Variables[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("variables" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1Variables) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1Variables) UnmarshalBinary(b []byte) error { + var res V1Variables + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_virtual.go b/api/models/v1_virtual.go new file mode 100644 index 00000000..ac261d93 --- /dev/null +++ b/api/models/v1_virtual.go @@ -0,0 +1,190 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1Virtual v1 virtual +// +// swagger:model v1Virtual +type V1Virtual struct { + + // list of apps deployed on the virtual cluster + AppDeployments []*V1ObjectResReference `json:"appDeployments"` + + // cluster group details of virtual cluster + ClusterGroup *V1ObjectResReference `json:"clusterGroup,omitempty"` + + // host cluster reference + HostCluster *V1ObjectResReference `json:"hostCluster,omitempty"` + + // cluster life cycle status of virtual cluster + LifecycleStatus *V1LifecycleStatus `json:"lifecycleStatus,omitempty"` + + // cluster virtual host status + State string `json:"state,omitempty"` + + // list of virtual clusters deployed on the cluster + VirtualClusters []*V1ObjectResReference `json:"virtualClusters"` +} + +// Validate validates this v1 virtual +func (m *V1Virtual) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateAppDeployments(formats); err != nil { + res = append(res, err) + } + + if err := m.validateClusterGroup(formats); err != nil { + res = append(res, err) + } + + if err := m.validateHostCluster(formats); err != nil { + res = append(res, err) + } + + if err := m.validateLifecycleStatus(formats); err != nil { + res = append(res, err) + } + + if err := m.validateVirtualClusters(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1Virtual) validateAppDeployments(formats strfmt.Registry) error { + + if swag.IsZero(m.AppDeployments) { // not required + return nil + } + + for i := 0; i < len(m.AppDeployments); i++ { + if swag.IsZero(m.AppDeployments[i]) { // not required + continue + } + + if m.AppDeployments[i] != nil { + if err := m.AppDeployments[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("appDeployments" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1Virtual) validateClusterGroup(formats strfmt.Registry) error { + + if swag.IsZero(m.ClusterGroup) { // not required + return nil + } + + if m.ClusterGroup != nil { + if err := m.ClusterGroup.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("clusterGroup") + } + return err + } + } + + return nil +} + +func (m *V1Virtual) validateHostCluster(formats strfmt.Registry) error { + + if swag.IsZero(m.HostCluster) { // not required + return nil + } + + if m.HostCluster != nil { + if err := m.HostCluster.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("hostCluster") + } + return err + } + } + + return nil +} + +func (m *V1Virtual) validateLifecycleStatus(formats strfmt.Registry) error { + + if swag.IsZero(m.LifecycleStatus) { // not required + return nil + } + + if m.LifecycleStatus != nil { + if err := m.LifecycleStatus.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("lifecycleStatus") + } + return err + } + } + + return nil +} + +func (m *V1Virtual) validateVirtualClusters(formats strfmt.Registry) error { + + if swag.IsZero(m.VirtualClusters) { // not required + return nil + } + + for i := 0; i < len(m.VirtualClusters); i++ { + if swag.IsZero(m.VirtualClusters[i]) { // not required + continue + } + + if m.VirtualClusters[i] != nil { + if err := m.VirtualClusters[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("virtualClusters" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1Virtual) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1Virtual) UnmarshalBinary(b []byte) error { + var res V1Virtual + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_virtual_cloud_cluster_config_entity.go b/api/models/v1_virtual_cloud_cluster_config_entity.go new file mode 100644 index 00000000..9a49de46 --- /dev/null +++ b/api/models/v1_virtual_cloud_cluster_config_entity.go @@ -0,0 +1,71 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1VirtualCloudClusterConfigEntity Virtual cloud cluster config entity +// +// swagger:model v1VirtualCloudClusterConfigEntity +type V1VirtualCloudClusterConfigEntity struct { + + // cluster config + ClusterConfig *V1VirtualClusterConfig `json:"clusterConfig,omitempty"` +} + +// Validate validates this v1 virtual cloud cluster config entity +func (m *V1VirtualCloudClusterConfigEntity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateClusterConfig(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1VirtualCloudClusterConfigEntity) validateClusterConfig(formats strfmt.Registry) error { + + if swag.IsZero(m.ClusterConfig) { // not required + return nil + } + + if m.ClusterConfig != nil { + if err := m.ClusterConfig.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("clusterConfig") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1VirtualCloudClusterConfigEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1VirtualCloudClusterConfigEntity) UnmarshalBinary(b []byte) error { + var res V1VirtualCloudClusterConfigEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_virtual_cloud_config.go b/api/models/v1_virtual_cloud_config.go new file mode 100644 index 00000000..efb19899 --- /dev/null +++ b/api/models/v1_virtual_cloud_config.go @@ -0,0 +1,127 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1VirtualCloudConfig VirtualCloudConfig is the Schema for the virtual cloudconfigs API +// +// swagger:model v1VirtualCloudConfig +type V1VirtualCloudConfig struct { + + // APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + APIVersion string `json:"apiVersion,omitempty"` + + // Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + Kind string `json:"kind,omitempty"` + + // metadata + Metadata *V1ObjectMeta `json:"metadata,omitempty"` + + // spec + Spec *V1VirtualCloudConfigSpec `json:"spec,omitempty"` + + // status + Status *V1NestedCloudConfigStatus `json:"status,omitempty"` +} + +// Validate validates this v1 virtual cloud config +func (m *V1VirtualCloudConfig) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSpec(formats); err != nil { + res = append(res, err) + } + + if err := m.validateStatus(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1VirtualCloudConfig) validateMetadata(formats strfmt.Registry) error { + + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } + return err + } + } + + return nil +} + +func (m *V1VirtualCloudConfig) validateSpec(formats strfmt.Registry) error { + + if swag.IsZero(m.Spec) { // not required + return nil + } + + if m.Spec != nil { + if err := m.Spec.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec") + } + return err + } + } + + return nil +} + +func (m *V1VirtualCloudConfig) validateStatus(formats strfmt.Registry) error { + + if swag.IsZero(m.Status) { // not required + return nil + } + + if m.Status != nil { + if err := m.Status.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("status") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1VirtualCloudConfig) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1VirtualCloudConfig) UnmarshalBinary(b []byte) error { + var res V1VirtualCloudConfig + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_virtual_cloud_config_spec.go b/api/models/v1_virtual_cloud_config_spec.go new file mode 100644 index 00000000..3847122f --- /dev/null +++ b/api/models/v1_virtual_cloud_config_spec.go @@ -0,0 +1,125 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1VirtualCloudConfigSpec VirtualCloudConfigSpec defines the cloud configuration input by user This will translate to clusterspec for cluster-api. +// +// swagger:model v1VirtualCloudConfigSpec +type V1VirtualCloudConfigSpec struct { + + // cluster config + // Required: true + ClusterConfig *V1VirtualClusterConfig `json:"clusterConfig"` + + // host cluster Uid + // Required: true + HostClusterUID *string `json:"hostClusterUid"` + + // machine pool config + // Required: true + MachinePoolConfig []*V1VirtualMachinePoolConfig `json:"machinePoolConfig"` +} + +// Validate validates this v1 virtual cloud config spec +func (m *V1VirtualCloudConfigSpec) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateClusterConfig(formats); err != nil { + res = append(res, err) + } + + if err := m.validateHostClusterUID(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMachinePoolConfig(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1VirtualCloudConfigSpec) validateClusterConfig(formats strfmt.Registry) error { + + if err := validate.Required("clusterConfig", "body", m.ClusterConfig); err != nil { + return err + } + + if m.ClusterConfig != nil { + if err := m.ClusterConfig.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("clusterConfig") + } + return err + } + } + + return nil +} + +func (m *V1VirtualCloudConfigSpec) validateHostClusterUID(formats strfmt.Registry) error { + + if err := validate.Required("hostClusterUid", "body", m.HostClusterUID); err != nil { + return err + } + + return nil +} + +func (m *V1VirtualCloudConfigSpec) validateMachinePoolConfig(formats strfmt.Registry) error { + + if err := validate.Required("machinePoolConfig", "body", m.MachinePoolConfig); err != nil { + return err + } + + for i := 0; i < len(m.MachinePoolConfig); i++ { + if swag.IsZero(m.MachinePoolConfig[i]) { // not required + continue + } + + if m.MachinePoolConfig[i] != nil { + if err := m.MachinePoolConfig[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("machinePoolConfig" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1VirtualCloudConfigSpec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1VirtualCloudConfigSpec) UnmarshalBinary(b []byte) error { + var res V1VirtualCloudConfigSpec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_virtual_cluster_config.go b/api/models/v1_virtual_cluster_config.go new file mode 100644 index 00000000..a0416a5d --- /dev/null +++ b/api/models/v1_virtual_cluster_config.go @@ -0,0 +1,99 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1VirtualClusterConfig Cluster level configuration for virtual cluster +// +// swagger:model v1VirtualClusterConfig +type V1VirtualClusterConfig struct { + + // control plane endpoint + ControlPlaneEndpoint *V1APIEndpoint `json:"controlPlaneEndpoint,omitempty"` + + // helm release + HelmRelease *V1VirtualClusterHelmRelease `json:"helmRelease,omitempty"` + + // kubernetes version + KubernetesVersion string `json:"kubernetesVersion,omitempty"` +} + +// Validate validates this v1 virtual cluster config +func (m *V1VirtualClusterConfig) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateControlPlaneEndpoint(formats); err != nil { + res = append(res, err) + } + + if err := m.validateHelmRelease(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1VirtualClusterConfig) validateControlPlaneEndpoint(formats strfmt.Registry) error { + + if swag.IsZero(m.ControlPlaneEndpoint) { // not required + return nil + } + + if m.ControlPlaneEndpoint != nil { + if err := m.ControlPlaneEndpoint.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("controlPlaneEndpoint") + } + return err + } + } + + return nil +} + +func (m *V1VirtualClusterConfig) validateHelmRelease(formats strfmt.Registry) error { + + if swag.IsZero(m.HelmRelease) { // not required + return nil + } + + if m.HelmRelease != nil { + if err := m.HelmRelease.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("helmRelease") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1VirtualClusterConfig) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1VirtualClusterConfig) UnmarshalBinary(b []byte) error { + var res V1VirtualClusterConfig + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_virtual_cluster_helm_chart.go b/api/models/v1_virtual_cluster_helm_chart.go new file mode 100644 index 00000000..24a2d329 --- /dev/null +++ b/api/models/v1_virtual_cluster_helm_chart.go @@ -0,0 +1,49 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1VirtualClusterHelmChart v1 virtual cluster helm chart +// +// swagger:model v1VirtualClusterHelmChart +type V1VirtualClusterHelmChart struct { + + // name + Name string `json:"name,omitempty"` + + // repo + Repo string `json:"repo,omitempty"` + + // version + Version string `json:"version,omitempty"` +} + +// Validate validates this v1 virtual cluster helm chart +func (m *V1VirtualClusterHelmChart) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1VirtualClusterHelmChart) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1VirtualClusterHelmChart) UnmarshalBinary(b []byte) error { + var res V1VirtualClusterHelmChart + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_virtual_cluster_helm_release.go b/api/models/v1_virtual_cluster_helm_release.go new file mode 100644 index 00000000..06fadf27 --- /dev/null +++ b/api/models/v1_virtual_cluster_helm_release.go @@ -0,0 +1,74 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1VirtualClusterHelmRelease v1 virtual cluster helm release +// +// swagger:model v1VirtualClusterHelmRelease +type V1VirtualClusterHelmRelease struct { + + // chart + Chart *V1VirtualClusterHelmChart `json:"chart,omitempty"` + + // values + Values string `json:"values,omitempty"` +} + +// Validate validates this v1 virtual cluster helm release +func (m *V1VirtualClusterHelmRelease) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateChart(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1VirtualClusterHelmRelease) validateChart(formats strfmt.Registry) error { + + if swag.IsZero(m.Chart) { // not required + return nil + } + + if m.Chart != nil { + if err := m.Chart.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("chart") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1VirtualClusterHelmRelease) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1VirtualClusterHelmRelease) UnmarshalBinary(b []byte) error { + var res V1VirtualClusterHelmRelease + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_virtual_cluster_resize.go b/api/models/v1_virtual_cluster_resize.go new file mode 100644 index 00000000..12e585a2 --- /dev/null +++ b/api/models/v1_virtual_cluster_resize.go @@ -0,0 +1,73 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1VirtualClusterResize v1 virtual cluster resize +// +// swagger:model v1VirtualClusterResize +type V1VirtualClusterResize struct { + + // instance type + // Required: true + InstanceType *V1VirtualInstanceType `json:"instanceType"` +} + +// Validate validates this v1 virtual cluster resize +func (m *V1VirtualClusterResize) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateInstanceType(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1VirtualClusterResize) validateInstanceType(formats strfmt.Registry) error { + + if err := validate.Required("instanceType", "body", m.InstanceType); err != nil { + return err + } + + if m.InstanceType != nil { + if err := m.InstanceType.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("instanceType") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1VirtualClusterResize) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1VirtualClusterResize) UnmarshalBinary(b []byte) error { + var res V1VirtualClusterResize + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_virtual_instance_type.go b/api/models/v1_virtual_instance_type.go new file mode 100644 index 00000000..2bc6931d --- /dev/null +++ b/api/models/v1_virtual_instance_type.go @@ -0,0 +1,58 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1VirtualInstanceType v1 virtual instance type +// +// swagger:model v1VirtualInstanceType +type V1VirtualInstanceType struct { + + // Maximum CPU cores + MaxCPU int32 `json:"maxCPU,omitempty"` + + // Maximum memory in MiB + MaxMemInMiB int32 `json:"maxMemInMiB,omitempty"` + + // Maximum storage in GiB + MaxStorageGiB int32 `json:"maxStorageGiB,omitempty"` + + // Minimum CPU cores + MinCPU int32 `json:"minCPU,omitempty"` + + // Minimum memory in MiB + MinMemInMiB int32 `json:"minMemInMiB,omitempty"` + + // Minimum storage in GiB + MinStorageGiB int32 `json:"minStorageGiB,omitempty"` +} + +// Validate validates this v1 virtual instance type +func (m *V1VirtualInstanceType) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1VirtualInstanceType) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1VirtualInstanceType) UnmarshalBinary(b []byte) error { + var res V1VirtualInstanceType + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_virtual_machine.go b/api/models/v1_virtual_machine.go new file mode 100644 index 00000000..6b9fa68d --- /dev/null +++ b/api/models/v1_virtual_machine.go @@ -0,0 +1,124 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1VirtualMachine Virtual cloud machine definition +// +// swagger:model v1VirtualMachine +type V1VirtualMachine struct { + + // kind + Kind string `json:"kind,omitempty"` + + // metadata + Metadata *V1ObjectMeta `json:"metadata,omitempty"` + + // spec + Spec *V1VirtualMachineSpec `json:"spec,omitempty"` + + // status + Status *V1CloudMachineStatus `json:"status,omitempty"` +} + +// Validate validates this v1 virtual machine +func (m *V1VirtualMachine) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSpec(formats); err != nil { + res = append(res, err) + } + + if err := m.validateStatus(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1VirtualMachine) validateMetadata(formats strfmt.Registry) error { + + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } + return err + } + } + + return nil +} + +func (m *V1VirtualMachine) validateSpec(formats strfmt.Registry) error { + + if swag.IsZero(m.Spec) { // not required + return nil + } + + if m.Spec != nil { + if err := m.Spec.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec") + } + return err + } + } + + return nil +} + +func (m *V1VirtualMachine) validateStatus(formats strfmt.Registry) error { + + if swag.IsZero(m.Status) { // not required + return nil + } + + if m.Status != nil { + if err := m.Status.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("status") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1VirtualMachine) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1VirtualMachine) UnmarshalBinary(b []byte) error { + var res V1VirtualMachine + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_virtual_machine_pool_cloud_config_entity.go b/api/models/v1_virtual_machine_pool_cloud_config_entity.go new file mode 100644 index 00000000..6227ec92 --- /dev/null +++ b/api/models/v1_virtual_machine_pool_cloud_config_entity.go @@ -0,0 +1,73 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1VirtualMachinePoolCloudConfigEntity v1 virtual machine pool cloud config entity +// +// swagger:model v1VirtualMachinePoolCloudConfigEntity +type V1VirtualMachinePoolCloudConfigEntity struct { + + // instance type + // Required: true + InstanceType *V1VirtualInstanceType `json:"instanceType"` +} + +// Validate validates this v1 virtual machine pool cloud config entity +func (m *V1VirtualMachinePoolCloudConfigEntity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateInstanceType(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1VirtualMachinePoolCloudConfigEntity) validateInstanceType(formats strfmt.Registry) error { + + if err := validate.Required("instanceType", "body", m.InstanceType); err != nil { + return err + } + + if m.InstanceType != nil { + if err := m.InstanceType.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("instanceType") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1VirtualMachinePoolCloudConfigEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1VirtualMachinePoolCloudConfigEntity) UnmarshalBinary(b []byte) error { + var res V1VirtualMachinePoolCloudConfigEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_virtual_machine_pool_config.go b/api/models/v1_virtual_machine_pool_config.go new file mode 100644 index 00000000..19b1b798 --- /dev/null +++ b/api/models/v1_virtual_machine_pool_config.go @@ -0,0 +1,195 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1VirtualMachinePoolConfig v1 virtual machine pool config +// +// swagger:model v1VirtualMachinePoolConfig +type V1VirtualMachinePoolConfig struct { + + // additionalLabels + AdditionalLabels map[string]string `json:"additionalLabels,omitempty"` + + // AdditionalTags is an optional set of tags to add to resources managed by the provider, in addition to the ones added by default. For eg., tags for EKS nodeGroup or EKS NodegroupIAMRole + AdditionalTags map[string]string `json:"additionalTags,omitempty"` + + // azs + Azs []string `json:"azs"` + + // InstanceType defines the required CPU, Memory + // Required: true + InstanceType *V1VirtualInstanceType `json:"instanceType"` + + // whether this pool is for control plane + IsControlPlane bool `json:"isControlPlane,omitempty"` + + // labels for this pool, example: control-plane/worker, gpu, windows + Labels []string `json:"labels"` + + // machine pool properties + MachinePoolProperties *V1MachinePoolProperties `json:"machinePoolProperties,omitempty"` + + // max size of the pool, for scaling + MaxSize int32 `json:"maxSize,omitempty"` + + // min size of the pool, for scaling + MinSize int32 `json:"minSize,omitempty"` + + // name + Name string `json:"name,omitempty"` + + // resource pool + ResourcePool string `json:"resourcePool,omitempty"` + + // size of the pool, number of machines + Size int32 `json:"size,omitempty"` + + // control plane or worker taints + // Unique: true + Taints []*V1Taint `json:"taints"` + + // rolling update strategy for this machinepool if not specified, will use ScaleOut + UpdateStrategy *V1UpdateStrategy `json:"updateStrategy,omitempty"` + + // if IsControlPlane==true && useControlPlaneAsWorker==true, then will remove control plane taint this will not be used for worker pools + UseControlPlaneAsWorker bool `json:"useControlPlaneAsWorker,omitempty"` +} + +// Validate validates this v1 virtual machine pool config +func (m *V1VirtualMachinePoolConfig) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateInstanceType(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMachinePoolProperties(formats); err != nil { + res = append(res, err) + } + + if err := m.validateTaints(formats); err != nil { + res = append(res, err) + } + + if err := m.validateUpdateStrategy(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1VirtualMachinePoolConfig) validateInstanceType(formats strfmt.Registry) error { + + if err := validate.Required("instanceType", "body", m.InstanceType); err != nil { + return err + } + + if m.InstanceType != nil { + if err := m.InstanceType.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("instanceType") + } + return err + } + } + + return nil +} + +func (m *V1VirtualMachinePoolConfig) validateMachinePoolProperties(formats strfmt.Registry) error { + + if swag.IsZero(m.MachinePoolProperties) { // not required + return nil + } + + if m.MachinePoolProperties != nil { + if err := m.MachinePoolProperties.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("machinePoolProperties") + } + return err + } + } + + return nil +} + +func (m *V1VirtualMachinePoolConfig) validateTaints(formats strfmt.Registry) error { + + if swag.IsZero(m.Taints) { // not required + return nil + } + + if err := validate.UniqueItems("taints", "body", m.Taints); err != nil { + return err + } + + for i := 0; i < len(m.Taints); i++ { + if swag.IsZero(m.Taints[i]) { // not required + continue + } + + if m.Taints[i] != nil { + if err := m.Taints[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("taints" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1VirtualMachinePoolConfig) validateUpdateStrategy(formats strfmt.Registry) error { + + if swag.IsZero(m.UpdateStrategy) { // not required + return nil + } + + if m.UpdateStrategy != nil { + if err := m.UpdateStrategy.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("updateStrategy") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1VirtualMachinePoolConfig) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1VirtualMachinePoolConfig) UnmarshalBinary(b []byte) error { + var res V1VirtualMachinePoolConfig + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_virtual_machine_pool_config_entity.go b/api/models/v1_virtual_machine_pool_config_entity.go new file mode 100644 index 00000000..41168116 --- /dev/null +++ b/api/models/v1_virtual_machine_pool_config_entity.go @@ -0,0 +1,73 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1VirtualMachinePoolConfigEntity v1 virtual machine pool config entity +// +// swagger:model v1VirtualMachinePoolConfigEntity +type V1VirtualMachinePoolConfigEntity struct { + + // cloud config + // Required: true + CloudConfig *V1VirtualMachinePoolCloudConfigEntity `json:"cloudConfig"` +} + +// Validate validates this v1 virtual machine pool config entity +func (m *V1VirtualMachinePoolConfigEntity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateCloudConfig(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1VirtualMachinePoolConfigEntity) validateCloudConfig(formats strfmt.Registry) error { + + if err := validate.Required("cloudConfig", "body", m.CloudConfig); err != nil { + return err + } + + if m.CloudConfig != nil { + if err := m.CloudConfig.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("cloudConfig") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1VirtualMachinePoolConfigEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1VirtualMachinePoolConfigEntity) UnmarshalBinary(b []byte) error { + var res V1VirtualMachinePoolConfigEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_virtual_machine_snapshot.go b/api/models/v1_virtual_machine_snapshot.go new file mode 100644 index 00000000..f6188052 --- /dev/null +++ b/api/models/v1_virtual_machine_snapshot.go @@ -0,0 +1,129 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1VirtualMachineSnapshot VirtualMachineSnapshot defines the operation of snapshotting a VM +// +// swagger:model v1VirtualMachineSnapshot +type V1VirtualMachineSnapshot struct { + + // APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + APIVersion string `json:"apiVersion,omitempty"` + + // Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + Kind string `json:"kind,omitempty"` + + // metadata + Metadata *V1VMObjectMeta `json:"metadata,omitempty"` + + // spec + // Required: true + Spec *V1VirtualMachineSnapshotSpec `json:"spec"` + + // status + Status *V1VirtualMachineSnapshotStatus `json:"status,omitempty"` +} + +// Validate validates this v1 virtual machine snapshot +func (m *V1VirtualMachineSnapshot) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSpec(formats); err != nil { + res = append(res, err) + } + + if err := m.validateStatus(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1VirtualMachineSnapshot) validateMetadata(formats strfmt.Registry) error { + + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } + return err + } + } + + return nil +} + +func (m *V1VirtualMachineSnapshot) validateSpec(formats strfmt.Registry) error { + + if err := validate.Required("spec", "body", m.Spec); err != nil { + return err + } + + if m.Spec != nil { + if err := m.Spec.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec") + } + return err + } + } + + return nil +} + +func (m *V1VirtualMachineSnapshot) validateStatus(formats strfmt.Registry) error { + + if swag.IsZero(m.Status) { // not required + return nil + } + + if m.Status != nil { + if err := m.Status.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("status") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1VirtualMachineSnapshot) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1VirtualMachineSnapshot) UnmarshalBinary(b []byte) error { + var res V1VirtualMachineSnapshot + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_virtual_machine_snapshot_list.go b/api/models/v1_virtual_machine_snapshot_list.go new file mode 100644 index 00000000..decd827a --- /dev/null +++ b/api/models/v1_virtual_machine_snapshot_list.go @@ -0,0 +1,114 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1VirtualMachineSnapshotList VirtualMachineSnapshotList is a list of VirtualMachineSnapshot resources +// +// swagger:model v1VirtualMachineSnapshotList +type V1VirtualMachineSnapshotList struct { + + // APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + APIVersion string `json:"apiVersion,omitempty"` + + // items + // Required: true + Items []*V1VirtualMachineSnapshot `json:"items"` + + // Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + Kind string `json:"kind,omitempty"` + + // metadata + // Required: true + Metadata *V1VMListMeta `json:"metadata"` +} + +// Validate validates this v1 virtual machine snapshot list +func (m *V1VirtualMachineSnapshotList) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateItems(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1VirtualMachineSnapshotList) validateItems(formats strfmt.Registry) error { + + if err := validate.Required("items", "body", m.Items); err != nil { + return err + } + + for i := 0; i < len(m.Items); i++ { + if swag.IsZero(m.Items[i]) { // not required + continue + } + + if m.Items[i] != nil { + if err := m.Items[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("items" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1VirtualMachineSnapshotList) validateMetadata(formats strfmt.Registry) error { + + if err := validate.Required("metadata", "body", m.Metadata); err != nil { + return err + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1VirtualMachineSnapshotList) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1VirtualMachineSnapshotList) UnmarshalBinary(b []byte) error { + var res V1VirtualMachineSnapshotList + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_virtual_machine_snapshot_spec.go b/api/models/v1_virtual_machine_snapshot_spec.go new file mode 100644 index 00000000..1cc1fb3e --- /dev/null +++ b/api/models/v1_virtual_machine_snapshot_spec.go @@ -0,0 +1,99 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1VirtualMachineSnapshotSpec VirtualMachineSnapshotSpec is the spec for a VirtualMachineSnapshot resource +// +// swagger:model v1VirtualMachineSnapshotSpec +type V1VirtualMachineSnapshotSpec struct { + + // deletion policy + DeletionPolicy string `json:"deletionPolicy,omitempty"` + + // failure deadline + FailureDeadline V1VMDuration `json:"failureDeadline,omitempty"` + + // source + // Required: true + Source *V1VMTypedLocalObjectReference `json:"source"` +} + +// Validate validates this v1 virtual machine snapshot spec +func (m *V1VirtualMachineSnapshotSpec) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateFailureDeadline(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSource(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1VirtualMachineSnapshotSpec) validateFailureDeadline(formats strfmt.Registry) error { + + if swag.IsZero(m.FailureDeadline) { // not required + return nil + } + + if err := m.FailureDeadline.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("failureDeadline") + } + return err + } + + return nil +} + +func (m *V1VirtualMachineSnapshotSpec) validateSource(formats strfmt.Registry) error { + + if err := validate.Required("source", "body", m.Source); err != nil { + return err + } + + if m.Source != nil { + if err := m.Source.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("source") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1VirtualMachineSnapshotSpec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1VirtualMachineSnapshotSpec) UnmarshalBinary(b []byte) error { + var res V1VirtualMachineSnapshotSpec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_virtual_machine_snapshot_status.go b/api/models/v1_virtual_machine_snapshot_status.go new file mode 100644 index 00000000..73ff945e --- /dev/null +++ b/api/models/v1_virtual_machine_snapshot_status.go @@ -0,0 +1,169 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1VirtualMachineSnapshotStatus VirtualMachineSnapshotStatus is the status for a VirtualMachineSnapshot resource +// +// swagger:model v1VirtualMachineSnapshotStatus +type V1VirtualMachineSnapshotStatus struct { + + // conditions + Conditions []*V1VMCondition `json:"conditions"` + + // creation time + // Format: date-time + CreationTime V1Time `json:"creationTime,omitempty"` + + // error + Error *V1VMError `json:"error,omitempty"` + + // indications + Indications []string `json:"indications"` + + // phase + Phase string `json:"phase,omitempty"` + + // ready to use + ReadyToUse bool `json:"readyToUse,omitempty"` + + // snapshot volumes + SnapshotVolumes *V1VMSnapshotVolumesLists `json:"snapshotVolumes,omitempty"` + + // source UID + SourceUID string `json:"sourceUID,omitempty"` + + // virtual machine snapshot content name + VirtualMachineSnapshotContentName string `json:"virtualMachineSnapshotContentName,omitempty"` +} + +// Validate validates this v1 virtual machine snapshot status +func (m *V1VirtualMachineSnapshotStatus) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateConditions(formats); err != nil { + res = append(res, err) + } + + if err := m.validateCreationTime(formats); err != nil { + res = append(res, err) + } + + if err := m.validateError(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSnapshotVolumes(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1VirtualMachineSnapshotStatus) validateConditions(formats strfmt.Registry) error { + + if swag.IsZero(m.Conditions) { // not required + return nil + } + + for i := 0; i < len(m.Conditions); i++ { + if swag.IsZero(m.Conditions[i]) { // not required + continue + } + + if m.Conditions[i] != nil { + if err := m.Conditions[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("conditions" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1VirtualMachineSnapshotStatus) validateCreationTime(formats strfmt.Registry) error { + + if swag.IsZero(m.CreationTime) { // not required + return nil + } + + if err := m.CreationTime.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("creationTime") + } + return err + } + + return nil +} + +func (m *V1VirtualMachineSnapshotStatus) validateError(formats strfmt.Registry) error { + + if swag.IsZero(m.Error) { // not required + return nil + } + + if m.Error != nil { + if err := m.Error.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("error") + } + return err + } + } + + return nil +} + +func (m *V1VirtualMachineSnapshotStatus) validateSnapshotVolumes(formats strfmt.Registry) error { + + if swag.IsZero(m.SnapshotVolumes) { // not required + return nil + } + + if m.SnapshotVolumes != nil { + if err := m.SnapshotVolumes.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("snapshotVolumes") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1VirtualMachineSnapshotStatus) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1VirtualMachineSnapshotStatus) UnmarshalBinary(b []byte) error { + var res V1VirtualMachineSnapshotStatus + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_virtual_machine_spec.go b/api/models/v1_virtual_machine_spec.go new file mode 100644 index 00000000..1a16faf9 --- /dev/null +++ b/api/models/v1_virtual_machine_spec.go @@ -0,0 +1,43 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1VirtualMachineSpec Virtual cloud machine definition spec +// +// swagger:model v1VirtualMachineSpec +type V1VirtualMachineSpec struct { + + // hostname + Hostname string `json:"hostname,omitempty"` +} + +// Validate validates this v1 virtual machine spec +func (m *V1VirtualMachineSpec) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1VirtualMachineSpec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1VirtualMachineSpec) UnmarshalBinary(b []byte) error { + var res V1VirtualMachineSpec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_virtual_machines.go b/api/models/v1_virtual_machines.go new file mode 100644 index 00000000..d05893d8 --- /dev/null +++ b/api/models/v1_virtual_machines.go @@ -0,0 +1,112 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1VirtualMachines List of virtual machines +// +// swagger:model v1VirtualMachines +type V1VirtualMachines struct { + + // items + // Required: true + // Unique: true + Items []*V1VirtualMachine `json:"items"` + + // listmeta + Listmeta *V1ListMetaData `json:"listmeta,omitempty"` +} + +// Validate validates this v1 virtual machines +func (m *V1VirtualMachines) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateItems(formats); err != nil { + res = append(res, err) + } + + if err := m.validateListmeta(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1VirtualMachines) validateItems(formats strfmt.Registry) error { + + if err := validate.Required("items", "body", m.Items); err != nil { + return err + } + + if err := validate.UniqueItems("items", "body", m.Items); err != nil { + return err + } + + for i := 0; i < len(m.Items); i++ { + if swag.IsZero(m.Items[i]) { // not required + continue + } + + if m.Items[i] != nil { + if err := m.Items[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("items" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1VirtualMachines) validateListmeta(formats strfmt.Registry) error { + + if swag.IsZero(m.Listmeta) { // not required + return nil + } + + if m.Listmeta != nil { + if err := m.Listmeta.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("listmeta") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1VirtualMachines) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1VirtualMachines) UnmarshalBinary(b []byte) error { + var res V1VirtualMachines + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_virtual_network.go b/api/models/v1_virtual_network.go new file mode 100644 index 00000000..eabb3a48 --- /dev/null +++ b/api/models/v1_virtual_network.go @@ -0,0 +1,114 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1VirtualNetwork Azure virtual network is the fundamental building block for your private network in Azure. +// +// swagger:model v1VirtualNetwork +type V1VirtualNetwork struct { + + // Location of the virtual network + // Unique: true + AddressSpaces []string `json:"addressSpaces"` + + // The ID of the resource group + ID string `json:"id,omitempty"` + + // Location of the virtual network + Location string `json:"location,omitempty"` + + // Name of the virtual network + Name string `json:"name,omitempty"` + + // List of subnets associated with Azure VPC + Subnets []*V1Subnet `json:"subnets"` + + // Type of the virtual network + Type string `json:"type,omitempty"` +} + +// Validate validates this v1 virtual network +func (m *V1VirtualNetwork) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateAddressSpaces(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSubnets(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1VirtualNetwork) validateAddressSpaces(formats strfmt.Registry) error { + + if swag.IsZero(m.AddressSpaces) { // not required + return nil + } + + if err := validate.UniqueItems("addressSpaces", "body", m.AddressSpaces); err != nil { + return err + } + + return nil +} + +func (m *V1VirtualNetwork) validateSubnets(formats strfmt.Registry) error { + + if swag.IsZero(m.Subnets) { // not required + return nil + } + + for i := 0; i < len(m.Subnets); i++ { + if swag.IsZero(m.Subnets[i]) { // not required + continue + } + + if m.Subnets[i] != nil { + if err := m.Subnets[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("subnets" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1VirtualNetwork) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1VirtualNetwork) UnmarshalBinary(b []byte) error { + var res V1VirtualNetwork + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_vm_access_credential.go b/api/models/v1_vm_access_credential.go new file mode 100644 index 00000000..c6c75837 --- /dev/null +++ b/api/models/v1_vm_access_credential.go @@ -0,0 +1,96 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1VMAccessCredential AccessCredential represents a credential source that can be used to authorize remote access to the vm guest Only one of its members may be specified. +// +// swagger:model v1VmAccessCredential +type V1VMAccessCredential struct { + + // ssh public key + SSHPublicKey *V1VMSSHPublicKeyAccessCredential `json:"sshPublicKey,omitempty"` + + // user password + UserPassword *V1VMUserPasswordAccessCredential `json:"userPassword,omitempty"` +} + +// Validate validates this v1 Vm access credential +func (m *V1VMAccessCredential) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateSSHPublicKey(formats); err != nil { + res = append(res, err) + } + + if err := m.validateUserPassword(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1VMAccessCredential) validateSSHPublicKey(formats strfmt.Registry) error { + + if swag.IsZero(m.SSHPublicKey) { // not required + return nil + } + + if m.SSHPublicKey != nil { + if err := m.SSHPublicKey.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("sshPublicKey") + } + return err + } + } + + return nil +} + +func (m *V1VMAccessCredential) validateUserPassword(formats strfmt.Registry) error { + + if swag.IsZero(m.UserPassword) { // not required + return nil + } + + if m.UserPassword != nil { + if err := m.UserPassword.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("userPassword") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1VMAccessCredential) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1VMAccessCredential) UnmarshalBinary(b []byte) error { + var res V1VMAccessCredential + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_vm_access_credential_secret_source.go b/api/models/v1_vm_access_credential_secret_source.go new file mode 100644 index 00000000..46e22dfd --- /dev/null +++ b/api/models/v1_vm_access_credential_secret_source.go @@ -0,0 +1,64 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1VMAccessCredentialSecretSource v1 Vm access credential secret source +// +// swagger:model v1VmAccessCredentialSecretSource +type V1VMAccessCredentialSecretSource struct { + + // SecretName represents the name of the secret in the VMI's namespace + // Required: true + SecretName *string `json:"secretName"` +} + +// Validate validates this v1 Vm access credential secret source +func (m *V1VMAccessCredentialSecretSource) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateSecretName(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1VMAccessCredentialSecretSource) validateSecretName(formats strfmt.Registry) error { + + if err := validate.Required("secretName", "body", m.SecretName); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1VMAccessCredentialSecretSource) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1VMAccessCredentialSecretSource) UnmarshalBinary(b []byte) error { + var res V1VMAccessCredentialSecretSource + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_vm_add_volume_entity.go b/api/models/v1_vm_add_volume_entity.go new file mode 100644 index 00000000..00ea4ffe --- /dev/null +++ b/api/models/v1_vm_add_volume_entity.go @@ -0,0 +1,101 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1VMAddVolumeEntity v1 VM add volume entity +// +// swagger:model v1VMAddVolumeEntity +type V1VMAddVolumeEntity struct { + + // Parameters required to add volume to virtual machine/virtual machine instance + // Required: true + AddVolumeOptions *V1VMAddVolumeOptions `json:"addVolumeOptions"` + + // dataVolumeTemplates is a list of dataVolumes that the VirtualMachineInstance template can reference. DataVolumes in this list are dynamically created for the VirtualMachine and are tied to the VirtualMachine's life-cycle. + DataVolumeTemplate *V1VMDataVolumeTemplateSpec `json:"dataVolumeTemplate,omitempty"` + + // If 'true' add the disk to the Virtual Machine & Virtual Machine Instance, else add the disk to the Virtual Machine Instance only + Persist bool `json:"persist,omitempty"` +} + +// Validate validates this v1 VM add volume entity +func (m *V1VMAddVolumeEntity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateAddVolumeOptions(formats); err != nil { + res = append(res, err) + } + + if err := m.validateDataVolumeTemplate(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1VMAddVolumeEntity) validateAddVolumeOptions(formats strfmt.Registry) error { + + if err := validate.Required("addVolumeOptions", "body", m.AddVolumeOptions); err != nil { + return err + } + + if m.AddVolumeOptions != nil { + if err := m.AddVolumeOptions.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("addVolumeOptions") + } + return err + } + } + + return nil +} + +func (m *V1VMAddVolumeEntity) validateDataVolumeTemplate(formats strfmt.Registry) error { + + if swag.IsZero(m.DataVolumeTemplate) { // not required + return nil + } + + if m.DataVolumeTemplate != nil { + if err := m.DataVolumeTemplate.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("dataVolumeTemplate") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1VMAddVolumeEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1VMAddVolumeEntity) UnmarshalBinary(b []byte) error { + var res V1VMAddVolumeEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_vm_add_volume_options.go b/api/models/v1_vm_add_volume_options.go new file mode 100644 index 00000000..d1df349d --- /dev/null +++ b/api/models/v1_vm_add_volume_options.go @@ -0,0 +1,119 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1VMAddVolumeOptions AddVolumeOptions is provided when dynamically hot plugging a volume and disk +// +// swagger:model v1VmAddVolumeOptions +type V1VMAddVolumeOptions struct { + + // disk + // Required: true + Disk *V1VMDisk `json:"disk"` + + // When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + DryRun []string `json:"dryRun"` + + // Name represents the name that will be used to map the disk to the corresponding volume. This overrides any name set inside the Disk struct itself. + // Required: true + Name *string `json:"name"` + + // volume source + // Required: true + VolumeSource *V1VMHotplugVolumeSource `json:"volumeSource"` +} + +// Validate validates this v1 Vm add volume options +func (m *V1VMAddVolumeOptions) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateDisk(formats); err != nil { + res = append(res, err) + } + + if err := m.validateName(formats); err != nil { + res = append(res, err) + } + + if err := m.validateVolumeSource(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1VMAddVolumeOptions) validateDisk(formats strfmt.Registry) error { + + if err := validate.Required("disk", "body", m.Disk); err != nil { + return err + } + + if m.Disk != nil { + if err := m.Disk.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("disk") + } + return err + } + } + + return nil +} + +func (m *V1VMAddVolumeOptions) validateName(formats strfmt.Registry) error { + + if err := validate.Required("name", "body", m.Name); err != nil { + return err + } + + return nil +} + +func (m *V1VMAddVolumeOptions) validateVolumeSource(formats strfmt.Registry) error { + + if err := validate.Required("volumeSource", "body", m.VolumeSource); err != nil { + return err + } + + if m.VolumeSource != nil { + if err := m.VolumeSource.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("volumeSource") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1VMAddVolumeOptions) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1VMAddVolumeOptions) UnmarshalBinary(b []byte) error { + var res V1VMAddVolumeOptions + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_vm_affinity.go b/api/models/v1_vm_affinity.go new file mode 100644 index 00000000..6553bf44 --- /dev/null +++ b/api/models/v1_vm_affinity.go @@ -0,0 +1,121 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1VMAffinity Affinity is a group of affinity scheduling rules. +// +// swagger:model v1VmAffinity +type V1VMAffinity struct { + + // node affinity + NodeAffinity *V1VMNodeAffinity `json:"nodeAffinity,omitempty"` + + // pod affinity + PodAffinity *V1VMPodAffinity `json:"podAffinity,omitempty"` + + // pod anti affinity + PodAntiAffinity *V1PodAntiAffinity `json:"podAntiAffinity,omitempty"` +} + +// Validate validates this v1 Vm affinity +func (m *V1VMAffinity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateNodeAffinity(formats); err != nil { + res = append(res, err) + } + + if err := m.validatePodAffinity(formats); err != nil { + res = append(res, err) + } + + if err := m.validatePodAntiAffinity(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1VMAffinity) validateNodeAffinity(formats strfmt.Registry) error { + + if swag.IsZero(m.NodeAffinity) { // not required + return nil + } + + if m.NodeAffinity != nil { + if err := m.NodeAffinity.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("nodeAffinity") + } + return err + } + } + + return nil +} + +func (m *V1VMAffinity) validatePodAffinity(formats strfmt.Registry) error { + + if swag.IsZero(m.PodAffinity) { // not required + return nil + } + + if m.PodAffinity != nil { + if err := m.PodAffinity.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("podAffinity") + } + return err + } + } + + return nil +} + +func (m *V1VMAffinity) validatePodAntiAffinity(formats strfmt.Registry) error { + + if swag.IsZero(m.PodAntiAffinity) { // not required + return nil + } + + if m.PodAntiAffinity != nil { + if err := m.PodAntiAffinity.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("podAntiAffinity") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1VMAffinity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1VMAffinity) UnmarshalBinary(b []byte) error { + var res V1VMAffinity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_vm_b_i_o_s.go b/api/models/v1_vm_b_i_o_s.go new file mode 100644 index 00000000..59d9a00a --- /dev/null +++ b/api/models/v1_vm_b_i_o_s.go @@ -0,0 +1,43 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1VMBIOS If set (default), BIOS will be used. +// +// swagger:model v1VmBIOS +type V1VMBIOS struct { + + // If set, the BIOS output will be transmitted over serial + UseSerial bool `json:"useSerial,omitempty"` +} + +// Validate validates this v1 Vm b i o s +func (m *V1VMBIOS) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1VMBIOS) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1VMBIOS) UnmarshalBinary(b []byte) error { + var res V1VMBIOS + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_vm_block_size.go b/api/models/v1_vm_block_size.go new file mode 100644 index 00000000..ccc56885 --- /dev/null +++ b/api/models/v1_vm_block_size.go @@ -0,0 +1,96 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1VMBlockSize BlockSize provides the option to change the block size presented to the VM for a disk. Only one of its members may be specified. +// +// swagger:model v1VmBlockSize +type V1VMBlockSize struct { + + // custom + Custom *V1VMCustomBlockSize `json:"custom,omitempty"` + + // match volume + MatchVolume *V1VMFeatureState `json:"matchVolume,omitempty"` +} + +// Validate validates this v1 Vm block size +func (m *V1VMBlockSize) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateCustom(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMatchVolume(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1VMBlockSize) validateCustom(formats strfmt.Registry) error { + + if swag.IsZero(m.Custom) { // not required + return nil + } + + if m.Custom != nil { + if err := m.Custom.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("custom") + } + return err + } + } + + return nil +} + +func (m *V1VMBlockSize) validateMatchVolume(formats strfmt.Registry) error { + + if swag.IsZero(m.MatchVolume) { // not required + return nil + } + + if m.MatchVolume != nil { + if err := m.MatchVolume.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("matchVolume") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1VMBlockSize) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1VMBlockSize) UnmarshalBinary(b []byte) error { + var res V1VMBlockSize + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_vm_bootloader.go b/api/models/v1_vm_bootloader.go new file mode 100644 index 00000000..af2f40b5 --- /dev/null +++ b/api/models/v1_vm_bootloader.go @@ -0,0 +1,96 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1VMBootloader Represents the firmware blob used to assist in the domain creation process. Used for setting the QEMU BIOS file path for the libvirt domain. +// +// swagger:model v1VmBootloader +type V1VMBootloader struct { + + // bios + Bios *V1VMBIOS `json:"bios,omitempty"` + + // efi + Efi *V1VMEFI `json:"efi,omitempty"` +} + +// Validate validates this v1 Vm bootloader +func (m *V1VMBootloader) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateBios(formats); err != nil { + res = append(res, err) + } + + if err := m.validateEfi(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1VMBootloader) validateBios(formats strfmt.Registry) error { + + if swag.IsZero(m.Bios) { // not required + return nil + } + + if m.Bios != nil { + if err := m.Bios.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("bios") + } + return err + } + } + + return nil +} + +func (m *V1VMBootloader) validateEfi(formats strfmt.Registry) error { + + if swag.IsZero(m.Efi) { // not required + return nil + } + + if m.Efi != nil { + if err := m.Efi.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("efi") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1VMBootloader) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1VMBootloader) UnmarshalBinary(b []byte) error { + var res V1VMBootloader + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_vm_c_d_rom_target.go b/api/models/v1_vm_c_d_rom_target.go new file mode 100644 index 00000000..9b0e265f --- /dev/null +++ b/api/models/v1_vm_c_d_rom_target.go @@ -0,0 +1,49 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1VMCDRomTarget v1 Vm c d rom target +// +// swagger:model v1VmCDRomTarget +type V1VMCDRomTarget struct { + + // Bus indicates the type of disk device to emulate. supported values: virtio, sata, scsi. + Bus string `json:"bus,omitempty"` + + // ReadOnly. Defaults to true. + Readonly bool `json:"readonly,omitempty"` + + // Tray indicates if the tray of the device is open or closed. Allowed values are "open" and "closed". Defaults to closed. + Tray string `json:"tray,omitempty"` +} + +// Validate validates this v1 Vm c d rom target +func (m *V1VMCDRomTarget) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1VMCDRomTarget) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1VMCDRomTarget) UnmarshalBinary(b []byte) error { + var res V1VMCDRomTarget + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_vm_chassis.go b/api/models/v1_vm_chassis.go new file mode 100644 index 00000000..77478ea6 --- /dev/null +++ b/api/models/v1_vm_chassis.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1VMChassis Chassis specifies the chassis info passed to the domain. +// +// swagger:model v1VmChassis +type V1VMChassis struct { + + // asset + Asset string `json:"asset,omitempty"` + + // manufacturer + Manufacturer string `json:"manufacturer,omitempty"` + + // serial + Serial string `json:"serial,omitempty"` + + // sku + Sku string `json:"sku,omitempty"` + + // version + Version string `json:"version,omitempty"` +} + +// Validate validates this v1 Vm chassis +func (m *V1VMChassis) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1VMChassis) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1VMChassis) UnmarshalBinary(b []byte) error { + var res V1VMChassis + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_vm_client_passthrough_devices.go b/api/models/v1_vm_client_passthrough_devices.go new file mode 100644 index 00000000..ed43f7db --- /dev/null +++ b/api/models/v1_vm_client_passthrough_devices.go @@ -0,0 +1,13 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +// V1VMClientPassthroughDevices Represent a subset of client devices that can be accessed by VMI. At the moment only, USB devices using Usbredir's library and tooling. Another fit would be a smartcard with libcacard. +// +// The struct is currently empty as there is no immediate request for user-facing APIs. This structure simply turns on USB redirection of UsbClientPassthroughMaxNumberOf devices. +// +// swagger:model v1VmClientPassthroughDevices +type V1VMClientPassthroughDevices interface{} diff --git a/api/models/v1_vm_clock.go b/api/models/v1_vm_clock.go new file mode 100644 index 00000000..2979ce0b --- /dev/null +++ b/api/models/v1_vm_clock.go @@ -0,0 +1,99 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1VMClock Represents the clock and timers of a vmi. +// +// swagger:model v1VmClock +type V1VMClock struct { + + // timer + Timer *V1VMTimer `json:"timer,omitempty"` + + // Timezone sets the guest clock to the specified timezone. Zone name follows the TZ environment variable format (e.g. 'America/New_York'). + Timezone string `json:"timezone,omitempty"` + + // utc + Utc *V1VMClockOffsetUTC `json:"utc,omitempty"` +} + +// Validate validates this v1 Vm clock +func (m *V1VMClock) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateTimer(formats); err != nil { + res = append(res, err) + } + + if err := m.validateUtc(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1VMClock) validateTimer(formats strfmt.Registry) error { + + if swag.IsZero(m.Timer) { // not required + return nil + } + + if m.Timer != nil { + if err := m.Timer.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("timer") + } + return err + } + } + + return nil +} + +func (m *V1VMClock) validateUtc(formats strfmt.Registry) error { + + if swag.IsZero(m.Utc) { // not required + return nil + } + + if m.Utc != nil { + if err := m.Utc.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("utc") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1VMClock) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1VMClock) UnmarshalBinary(b []byte) error { + var res V1VMClock + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_vm_clock_offset_u_t_c.go b/api/models/v1_vm_clock_offset_u_t_c.go new file mode 100644 index 00000000..b3656e71 --- /dev/null +++ b/api/models/v1_vm_clock_offset_u_t_c.go @@ -0,0 +1,43 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1VMClockOffsetUTC UTC sets the guest clock to UTC on each boot. +// +// swagger:model v1VmClockOffsetUTC +type V1VMClockOffsetUTC struct { + + // OffsetSeconds specifies an offset in seconds, relative to UTC. If set, guest changes to the clock will be kept during reboots and not reset. + OffsetSeconds int32 `json:"offsetSeconds,omitempty"` +} + +// Validate validates this v1 Vm clock offset u t c +func (m *V1VMClockOffsetUTC) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1VMClockOffsetUTC) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1VMClockOffsetUTC) UnmarshalBinary(b []byte) error { + var res V1VMClockOffsetUTC + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_vm_cloud_init_config_drive_source.go b/api/models/v1_vm_cloud_init_config_drive_source.go new file mode 100644 index 00000000..c17fe5d8 --- /dev/null +++ b/api/models/v1_vm_cloud_init_config_drive_source.go @@ -0,0 +1,108 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1VMCloudInitConfigDriveSource Represents a cloud-init config drive user data source. More info: https://cloudinit.readthedocs.io/en/latest/topics/datasources/configdrive.html +// +// swagger:model v1VmCloudInitConfigDriveSource +type V1VMCloudInitConfigDriveSource struct { + + // NetworkData contains config drive inline cloud-init networkdata. + NetworkData string `json:"networkData,omitempty"` + + // NetworkDataBase64 contains config drive cloud-init networkdata as a base64 encoded string. + NetworkDataBase64 string `json:"networkDataBase64,omitempty"` + + // network data secret ref + NetworkDataSecretRef *V1VMLocalObjectReference `json:"networkDataSecretRef,omitempty"` + + // secret ref + SecretRef *V1VMLocalObjectReference `json:"secretRef,omitempty"` + + // UserData contains config drive inline cloud-init userdata. + UserData string `json:"userData,omitempty"` + + // UserDataBase64 contains config drive cloud-init userdata as a base64 encoded string. + UserDataBase64 string `json:"userDataBase64,omitempty"` +} + +// Validate validates this v1 Vm cloud init config drive source +func (m *V1VMCloudInitConfigDriveSource) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateNetworkDataSecretRef(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSecretRef(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1VMCloudInitConfigDriveSource) validateNetworkDataSecretRef(formats strfmt.Registry) error { + + if swag.IsZero(m.NetworkDataSecretRef) { // not required + return nil + } + + if m.NetworkDataSecretRef != nil { + if err := m.NetworkDataSecretRef.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("networkDataSecretRef") + } + return err + } + } + + return nil +} + +func (m *V1VMCloudInitConfigDriveSource) validateSecretRef(formats strfmt.Registry) error { + + if swag.IsZero(m.SecretRef) { // not required + return nil + } + + if m.SecretRef != nil { + if err := m.SecretRef.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("secretRef") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1VMCloudInitConfigDriveSource) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1VMCloudInitConfigDriveSource) UnmarshalBinary(b []byte) error { + var res V1VMCloudInitConfigDriveSource + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_vm_cloud_init_no_cloud_source.go b/api/models/v1_vm_cloud_init_no_cloud_source.go new file mode 100644 index 00000000..4300ad2c --- /dev/null +++ b/api/models/v1_vm_cloud_init_no_cloud_source.go @@ -0,0 +1,108 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1VMCloudInitNoCloudSource Represents a cloud-init nocloud user data source. More info: http://cloudinit.readthedocs.io/en/latest/topics/datasources/nocloud.html +// +// swagger:model v1VmCloudInitNoCloudSource +type V1VMCloudInitNoCloudSource struct { + + // NetworkData contains NoCloud inline cloud-init networkdata. + NetworkData string `json:"networkData,omitempty"` + + // NetworkDataBase64 contains NoCloud cloud-init networkdata as a base64 encoded string. + NetworkDataBase64 string `json:"networkDataBase64,omitempty"` + + // network data secret ref + NetworkDataSecretRef *V1VMLocalObjectReference `json:"networkDataSecretRef,omitempty"` + + // secret ref + SecretRef *V1VMLocalObjectReference `json:"secretRef,omitempty"` + + // UserData contains NoCloud inline cloud-init userdata. + UserData string `json:"userData,omitempty"` + + // UserDataBase64 contains NoCloud cloud-init userdata as a base64 encoded string. + UserDataBase64 string `json:"userDataBase64,omitempty"` +} + +// Validate validates this v1 Vm cloud init no cloud source +func (m *V1VMCloudInitNoCloudSource) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateNetworkDataSecretRef(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSecretRef(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1VMCloudInitNoCloudSource) validateNetworkDataSecretRef(formats strfmt.Registry) error { + + if swag.IsZero(m.NetworkDataSecretRef) { // not required + return nil + } + + if m.NetworkDataSecretRef != nil { + if err := m.NetworkDataSecretRef.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("networkDataSecretRef") + } + return err + } + } + + return nil +} + +func (m *V1VMCloudInitNoCloudSource) validateSecretRef(formats strfmt.Registry) error { + + if swag.IsZero(m.SecretRef) { // not required + return nil + } + + if m.SecretRef != nil { + if err := m.SecretRef.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("secretRef") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1VMCloudInitNoCloudSource) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1VMCloudInitNoCloudSource) UnmarshalBinary(b []byte) error { + var res V1VMCloudInitNoCloudSource + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_vm_cluster.go b/api/models/v1_vm_cluster.go new file mode 100644 index 00000000..e9d9d89f --- /dev/null +++ b/api/models/v1_vm_cluster.go @@ -0,0 +1,223 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1VMCluster VM Dashboard enabled Spectro cluster +// +// swagger:model v1VMCluster +type V1VMCluster struct { + + // metadata + Metadata *V1VMClusterMetadata `json:"metadata,omitempty"` + + // spec + Spec *V1VMClusterSpec `json:"spec,omitempty"` + + // status + Status *V1VMClusterStatus `json:"status,omitempty"` +} + +// Validate validates this v1 VM cluster +func (m *V1VMCluster) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSpec(formats); err != nil { + res = append(res, err) + } + + if err := m.validateStatus(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1VMCluster) validateMetadata(formats strfmt.Registry) error { + + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } + return err + } + } + + return nil +} + +func (m *V1VMCluster) validateSpec(formats strfmt.Registry) error { + + if swag.IsZero(m.Spec) { // not required + return nil + } + + if m.Spec != nil { + if err := m.Spec.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec") + } + return err + } + } + + return nil +} + +func (m *V1VMCluster) validateStatus(formats strfmt.Registry) error { + + if swag.IsZero(m.Status) { // not required + return nil + } + + if m.Status != nil { + if err := m.Status.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("status") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1VMCluster) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1VMCluster) UnmarshalBinary(b []byte) error { + var res V1VMCluster + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} + +// V1VMClusterMetadata v1 VM cluster metadata +// +// swagger:model V1VMClusterMetadata +type V1VMClusterMetadata struct { + + // name + Name string `json:"name,omitempty"` + + // project Uid + ProjectUID string `json:"projectUid,omitempty"` + + // uid + UID string `json:"uid,omitempty"` +} + +// Validate validates this v1 VM cluster metadata +func (m *V1VMClusterMetadata) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1VMClusterMetadata) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1VMClusterMetadata) UnmarshalBinary(b []byte) error { + var res V1VMClusterMetadata + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} + +// V1VMClusterSpec Spectro cluster spec +// +// swagger:model V1VMClusterSpec +type V1VMClusterSpec struct { + + // cloud type + CloudType string `json:"cloudType,omitempty"` +} + +// Validate validates this v1 VM cluster spec +func (m *V1VMClusterSpec) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1VMClusterSpec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1VMClusterSpec) UnmarshalBinary(b []byte) error { + var res V1VMClusterSpec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} + +// V1VMClusterStatus Spectro cluster status +// +// swagger:model V1VMClusterStatus +type V1VMClusterStatus struct { + + // cluster state + ClusterState string `json:"clusterState,omitempty"` +} + +// Validate validates this v1 VM cluster status +func (m *V1VMClusterStatus) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1VMClusterStatus) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1VMClusterStatus) UnmarshalBinary(b []byte) error { + var res V1VMClusterStatus + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_vm_clusters.go b/api/models/v1_vm_clusters.go new file mode 100644 index 00000000..34854fa1 --- /dev/null +++ b/api/models/v1_vm_clusters.go @@ -0,0 +1,87 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1VMClusters v1 VM clusters +// +// swagger:model v1VMClusters +type V1VMClusters struct { + + // items + // Required: true + // Unique: true + Items []*V1VMCluster `json:"items"` +} + +// Validate validates this v1 VM clusters +func (m *V1VMClusters) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateItems(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1VMClusters) validateItems(formats strfmt.Registry) error { + + if err := validate.Required("items", "body", m.Items); err != nil { + return err + } + + if err := validate.UniqueItems("items", "body", m.Items); err != nil { + return err + } + + for i := 0; i < len(m.Items); i++ { + if swag.IsZero(m.Items[i]) { // not required + continue + } + + if m.Items[i] != nil { + if err := m.Items[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("items" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1VMClusters) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1VMClusters) UnmarshalBinary(b []byte) error { + var res V1VMClusters + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_vm_condition.go b/api/models/v1_vm_condition.go new file mode 100644 index 00000000..1ac49886 --- /dev/null +++ b/api/models/v1_vm_condition.go @@ -0,0 +1,93 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1VMCondition Condition defines conditions +// +// swagger:model v1VmCondition +type V1VMCondition struct { + + // last probe time + LastProbeTime string `json:"lastProbeTime,omitempty"` + + // last transition time + LastTransitionTime string `json:"lastTransitionTime,omitempty"` + + // message + Message string `json:"message,omitempty"` + + // reason + Reason string `json:"reason,omitempty"` + + // status + // Required: true + Status *string `json:"status"` + + // type + // Required: true + Type *string `json:"type"` +} + +// Validate validates this v1 Vm condition +func (m *V1VMCondition) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateStatus(formats); err != nil { + res = append(res, err) + } + + if err := m.validateType(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1VMCondition) validateStatus(formats strfmt.Registry) error { + + if err := validate.Required("status", "body", m.Status); err != nil { + return err + } + + return nil +} + +func (m *V1VMCondition) validateType(formats strfmt.Registry) error { + + if err := validate.Required("type", "body", m.Type); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1VMCondition) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1VMCondition) UnmarshalBinary(b []byte) error { + var res V1VMCondition + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_vm_config_drive_ssh_public_key_access_credential_propagation.go b/api/models/v1_vm_config_drive_ssh_public_key_access_credential_propagation.go new file mode 100644 index 00000000..4464e914 --- /dev/null +++ b/api/models/v1_vm_config_drive_ssh_public_key_access_credential_propagation.go @@ -0,0 +1,11 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +// V1VMConfigDriveSSHPublicKeyAccessCredentialPropagation v1 Vm config drive Ssh public key access credential propagation +// +// swagger:model v1VmConfigDriveSshPublicKeyAccessCredentialPropagation +type V1VMConfigDriveSSHPublicKeyAccessCredentialPropagation interface{} diff --git a/api/models/v1_vm_config_map_volume_source.go b/api/models/v1_vm_config_map_volume_source.go new file mode 100644 index 00000000..4adf6d52 --- /dev/null +++ b/api/models/v1_vm_config_map_volume_source.go @@ -0,0 +1,49 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1VMConfigMapVolumeSource ConfigMapVolumeSource adapts a ConfigMap into a volume. More info: https://kubernetes.io/docs/concepts/storage/volumes/#configmap +// +// swagger:model v1VmConfigMapVolumeSource +type V1VMConfigMapVolumeSource struct { + + // Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + Name string `json:"name,omitempty"` + + // Specify whether the ConfigMap or it's keys must be defined + Optional bool `json:"optional,omitempty"` + + // The volume label of the resulting disk inside the VMI. Different bootstrapping mechanisms require different values. Typical values are "cidata" (cloud-init), "config-2" (cloud-init) or "OEMDRV" (kickstart). + VolumeLabel string `json:"volumeLabel,omitempty"` +} + +// Validate validates this v1 Vm config map volume source +func (m *V1VMConfigMapVolumeSource) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1VMConfigMapVolumeSource) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1VMConfigMapVolumeSource) UnmarshalBinary(b []byte) error { + var res V1VMConfigMapVolumeSource + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_vm_container_disk_source.go b/api/models/v1_vm_container_disk_source.go new file mode 100644 index 00000000..ed3874e4 --- /dev/null +++ b/api/models/v1_vm_container_disk_source.go @@ -0,0 +1,73 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1VMContainerDiskSource Represents a docker image with an embedded disk. +// +// swagger:model v1VmContainerDiskSource +type V1VMContainerDiskSource struct { + + // Image is the name of the image with the embedded disk. + // Required: true + Image *string `json:"image"` + + // Image pull policy. One of Always, Never, IfNotPresent. Defaults to Always if :latest tag is specified, or IfNotPresent otherwise. Cannot be updated. More info: https://kubernetes.io/docs/concepts/containers/images#updating-images + ImagePullPolicy string `json:"imagePullPolicy,omitempty"` + + // ImagePullSecret is the name of the Docker registry secret required to pull the image. The secret must already exist. + ImagePullSecret string `json:"imagePullSecret,omitempty"` + + // Path defines the path to disk file in the container + Path string `json:"path,omitempty"` +} + +// Validate validates this v1 Vm container disk source +func (m *V1VMContainerDiskSource) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateImage(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1VMContainerDiskSource) validateImage(formats strfmt.Registry) error { + + if err := validate.Required("image", "body", m.Image); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1VMContainerDiskSource) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1VMContainerDiskSource) UnmarshalBinary(b []byte) error { + var res V1VMContainerDiskSource + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_vm_core_data_volume_source.go b/api/models/v1_vm_core_data_volume_source.go new file mode 100644 index 00000000..e18e0543 --- /dev/null +++ b/api/models/v1_vm_core_data_volume_source.go @@ -0,0 +1,67 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1VMCoreDataVolumeSource v1 Vm core data volume source +// +// swagger:model v1VmCoreDataVolumeSource +type V1VMCoreDataVolumeSource struct { + + // Hotpluggable indicates whether the volume can be hotplugged and hotunplugged. + Hotpluggable bool `json:"hotpluggable,omitempty"` + + // Name of both the DataVolume and the PVC in the same namespace. After PVC population the DataVolume is garbage collected by default. + // Required: true + Name *string `json:"name"` +} + +// Validate validates this v1 Vm core data volume source +func (m *V1VMCoreDataVolumeSource) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateName(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1VMCoreDataVolumeSource) validateName(formats strfmt.Registry) error { + + if err := validate.Required("name", "body", m.Name); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1VMCoreDataVolumeSource) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1VMCoreDataVolumeSource) UnmarshalBinary(b []byte) error { + var res V1VMCoreDataVolumeSource + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_vm_core_resource_requirements.go b/api/models/v1_vm_core_resource_requirements.go new file mode 100644 index 00000000..372f2a1e --- /dev/null +++ b/api/models/v1_vm_core_resource_requirements.go @@ -0,0 +1,98 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1VMCoreResourceRequirements ResourceRequirements describes the compute resource requirements. +// +// swagger:model v1VmCoreResourceRequirements +type V1VMCoreResourceRequirements struct { + + // Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ + Limits map[string]V1VMQuantity `json:"limits,omitempty"` + + // Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ + Requests map[string]V1VMQuantity `json:"requests,omitempty"` +} + +// Validate validates this v1 Vm core resource requirements +func (m *V1VMCoreResourceRequirements) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateLimits(formats); err != nil { + res = append(res, err) + } + + if err := m.validateRequests(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1VMCoreResourceRequirements) validateLimits(formats strfmt.Registry) error { + + if swag.IsZero(m.Limits) { // not required + return nil + } + + for k := range m.Limits { + + if val, ok := m.Limits[k]; ok { + if err := val.Validate(formats); err != nil { + return err + } + } + + } + + return nil +} + +func (m *V1VMCoreResourceRequirements) validateRequests(formats strfmt.Registry) error { + + if swag.IsZero(m.Requests) { // not required + return nil + } + + for k := range m.Requests { + + if val, ok := m.Requests[k]; ok { + if err := val.Validate(formats); err != nil { + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1VMCoreResourceRequirements) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1VMCoreResourceRequirements) UnmarshalBinary(b []byte) error { + var res V1VMCoreResourceRequirements + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_vm_cpu.go b/api/models/v1_vm_cpu.go new file mode 100644 index 00000000..cdaabd6b --- /dev/null +++ b/api/models/v1_vm_cpu.go @@ -0,0 +1,148 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1VMCPU CPU allows specifying the CPU topology. +// +// swagger:model v1VmCpu +type V1VMCPU struct { + + // Cores specifies the number of cores inside the vmi. Must be a value greater or equal 1. + Cores int64 `json:"cores,omitempty"` + + // DedicatedCPUPlacement requests the scheduler to place the VirtualMachineInstance on a node with enough dedicated pCPUs and pin the vCPUs to it. + DedicatedCPUPlacement bool `json:"dedicatedCpuPlacement,omitempty"` + + // Features specifies the CPU features list inside the VMI. + Features []*V1VMCPUFeature `json:"features"` + + // IsolateEmulatorThread requests one more dedicated pCPU to be allocated for the VMI to place the emulator thread on it. + IsolateEmulatorThread bool `json:"isolateEmulatorThread,omitempty"` + + // Model specifies the CPU model inside the VMI. List of available models https://github.com/libvirt/libvirt/tree/master/src/cpu_map. It is possible to specify special cases like "host-passthrough" to get the same CPU as the node and "host-model" to get CPU closest to the node one. Defaults to host-model. + Model string `json:"model,omitempty"` + + // numa + Numa *V1VMNUMA `json:"numa,omitempty"` + + // realtime + Realtime *V1VMRealtime `json:"realtime,omitempty"` + + // Sockets specifies the number of sockets inside the vmi. Must be a value greater or equal 1. + Sockets int64 `json:"sockets,omitempty"` + + // Threads specifies the number of threads inside the vmi. Must be a value greater or equal 1. + Threads int64 `json:"threads,omitempty"` +} + +// Validate validates this v1 Vm Cpu +func (m *V1VMCPU) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateFeatures(formats); err != nil { + res = append(res, err) + } + + if err := m.validateNuma(formats); err != nil { + res = append(res, err) + } + + if err := m.validateRealtime(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1VMCPU) validateFeatures(formats strfmt.Registry) error { + + if swag.IsZero(m.Features) { // not required + return nil + } + + for i := 0; i < len(m.Features); i++ { + if swag.IsZero(m.Features[i]) { // not required + continue + } + + if m.Features[i] != nil { + if err := m.Features[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("features" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1VMCPU) validateNuma(formats strfmt.Registry) error { + + if swag.IsZero(m.Numa) { // not required + return nil + } + + if m.Numa != nil { + if err := m.Numa.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("numa") + } + return err + } + } + + return nil +} + +func (m *V1VMCPU) validateRealtime(formats strfmt.Registry) error { + + if swag.IsZero(m.Realtime) { // not required + return nil + } + + if m.Realtime != nil { + if err := m.Realtime.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("realtime") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1VMCPU) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1VMCPU) UnmarshalBinary(b []byte) error { + var res V1VMCPU + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_vm_cpu_feature.go b/api/models/v1_vm_cpu_feature.go new file mode 100644 index 00000000..0174879d --- /dev/null +++ b/api/models/v1_vm_cpu_feature.go @@ -0,0 +1,67 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1VMCPUFeature CPUFeature allows specifying a CPU feature. +// +// swagger:model v1VmCpuFeature +type V1VMCPUFeature struct { + + // Name of the CPU feature + // Required: true + Name *string `json:"name"` + + // Policy is the CPU feature attribute which can have the following attributes: force - The virtual CPU will claim the feature is supported regardless of it being supported by host CPU. require - Guest creation will fail unless the feature is supported by the host CPU or the hypervisor is able to emulate it. optional - The feature will be supported by virtual CPU if and only if it is supported by host CPU. disable - The feature will not be supported by virtual CPU. forbid - Guest creation will fail if the feature is supported by host CPU. Defaults to require + Policy string `json:"policy,omitempty"` +} + +// Validate validates this v1 Vm Cpu feature +func (m *V1VMCPUFeature) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateName(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1VMCPUFeature) validateName(formats strfmt.Registry) error { + + if err := validate.Required("name", "body", m.Name); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1VMCPUFeature) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1VMCPUFeature) UnmarshalBinary(b []byte) error { + var res V1VMCPUFeature + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_vm_custom_block_size.go b/api/models/v1_vm_custom_block_size.go new file mode 100644 index 00000000..c68db567 --- /dev/null +++ b/api/models/v1_vm_custom_block_size.go @@ -0,0 +1,81 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1VMCustomBlockSize CustomBlockSize represents the desired logical and physical block size for a VM disk. +// +// swagger:model v1VmCustomBlockSize +type V1VMCustomBlockSize struct { + + // logical + // Required: true + Logical *int32 `json:"logical"` + + // physical + // Required: true + Physical *int32 `json:"physical"` +} + +// Validate validates this v1 Vm custom block size +func (m *V1VMCustomBlockSize) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateLogical(formats); err != nil { + res = append(res, err) + } + + if err := m.validatePhysical(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1VMCustomBlockSize) validateLogical(formats strfmt.Registry) error { + + if err := validate.Required("logical", "body", m.Logical); err != nil { + return err + } + + return nil +} + +func (m *V1VMCustomBlockSize) validatePhysical(formats strfmt.Registry) error { + + if err := validate.Required("physical", "body", m.Physical); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1VMCustomBlockSize) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1VMCustomBlockSize) UnmarshalBinary(b []byte) error { + var res V1VMCustomBlockSize + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_vm_d_h_c_p_options.go b/api/models/v1_vm_d_h_c_p_options.go new file mode 100644 index 00000000..30a32c7d --- /dev/null +++ b/api/models/v1_vm_d_h_c_p_options.go @@ -0,0 +1,89 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1VMDHCPOptions Extra DHCP options to use in the interface. +// +// swagger:model v1VmDHCPOptions +type V1VMDHCPOptions struct { + + // If specified will pass option 67 to interface's DHCP server + BootFileName string `json:"bootFileName,omitempty"` + + // If specified will pass the configured NTP server to the VM via DHCP option 042. + NtpServers []string `json:"ntpServers"` + + // If specified will pass extra DHCP options for private use, range: 224-254 + PrivateOptions []*V1VMDHCPPrivateOptions `json:"privateOptions"` + + // If specified will pass option 66 to interface's DHCP server + TftpServerName string `json:"tftpServerName,omitempty"` +} + +// Validate validates this v1 Vm d h c p options +func (m *V1VMDHCPOptions) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validatePrivateOptions(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1VMDHCPOptions) validatePrivateOptions(formats strfmt.Registry) error { + + if swag.IsZero(m.PrivateOptions) { // not required + return nil + } + + for i := 0; i < len(m.PrivateOptions); i++ { + if swag.IsZero(m.PrivateOptions[i]) { // not required + continue + } + + if m.PrivateOptions[i] != nil { + if err := m.PrivateOptions[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("privateOptions" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1VMDHCPOptions) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1VMDHCPOptions) UnmarshalBinary(b []byte) error { + var res V1VMDHCPOptions + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_vm_d_h_c_p_private_options.go b/api/models/v1_vm_d_h_c_p_private_options.go new file mode 100644 index 00000000..6ad9a627 --- /dev/null +++ b/api/models/v1_vm_d_h_c_p_private_options.go @@ -0,0 +1,81 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1VMDHCPPrivateOptions DHCPExtraOptions defines Extra DHCP options for a VM. +// +// swagger:model v1VmDHCPPrivateOptions +type V1VMDHCPPrivateOptions struct { + + // Option is an Integer value from 224-254 Required. + // Required: true + Option *int32 `json:"option"` + + // Value is a String value for the Option provided Required. + // Required: true + Value *string `json:"value"` +} + +// Validate validates this v1 Vm d h c p private options +func (m *V1VMDHCPPrivateOptions) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateOption(formats); err != nil { + res = append(res, err) + } + + if err := m.validateValue(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1VMDHCPPrivateOptions) validateOption(formats strfmt.Registry) error { + + if err := validate.Required("option", "body", m.Option); err != nil { + return err + } + + return nil +} + +func (m *V1VMDHCPPrivateOptions) validateValue(formats strfmt.Registry) error { + + if err := validate.Required("value", "body", m.Value); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1VMDHCPPrivateOptions) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1VMDHCPPrivateOptions) UnmarshalBinary(b []byte) error { + var res V1VMDHCPPrivateOptions + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_vm_data_volume_blank_image.go b/api/models/v1_vm_data_volume_blank_image.go new file mode 100644 index 00000000..8b55acea --- /dev/null +++ b/api/models/v1_vm_data_volume_blank_image.go @@ -0,0 +1,11 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +// V1VMDataVolumeBlankImage DataVolumeBlankImage provides the parameters to create a new raw blank image for the PVC +// +// swagger:model v1VmDataVolumeBlankImage +type V1VMDataVolumeBlankImage interface{} diff --git a/api/models/v1_vm_data_volume_checkpoint.go b/api/models/v1_vm_data_volume_checkpoint.go new file mode 100644 index 00000000..38f090f7 --- /dev/null +++ b/api/models/v1_vm_data_volume_checkpoint.go @@ -0,0 +1,81 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1VMDataVolumeCheckpoint DataVolumeCheckpoint defines a stage in a warm migration. +// +// swagger:model v1VmDataVolumeCheckpoint +type V1VMDataVolumeCheckpoint struct { + + // Current is the identifier of the snapshot created for this checkpoint. + // Required: true + Current *string `json:"current"` + + // Previous is the identifier of the snapshot from the previous checkpoint. + // Required: true + Previous *string `json:"previous"` +} + +// Validate validates this v1 Vm data volume checkpoint +func (m *V1VMDataVolumeCheckpoint) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateCurrent(formats); err != nil { + res = append(res, err) + } + + if err := m.validatePrevious(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1VMDataVolumeCheckpoint) validateCurrent(formats strfmt.Registry) error { + + if err := validate.Required("current", "body", m.Current); err != nil { + return err + } + + return nil +} + +func (m *V1VMDataVolumeCheckpoint) validatePrevious(formats strfmt.Registry) error { + + if err := validate.Required("previous", "body", m.Previous); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1VMDataVolumeCheckpoint) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1VMDataVolumeCheckpoint) UnmarshalBinary(b []byte) error { + var res V1VMDataVolumeCheckpoint + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_vm_data_volume_source.go b/api/models/v1_vm_data_volume_source.go new file mode 100644 index 00000000..f69f3268 --- /dev/null +++ b/api/models/v1_vm_data_volume_source.go @@ -0,0 +1,202 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1VMDataVolumeSource DataVolumeSource represents the source for our Data Volume, this can be HTTP, Imageio, S3, Registry or an existing PVC +// +// swagger:model v1VmDataVolumeSource +type V1VMDataVolumeSource struct { + + // blank + Blank V1VMDataVolumeBlankImage `json:"blank,omitempty"` + + // http + HTTP *V1VMDataVolumeSourceHTTP `json:"http,omitempty"` + + // imageio + Imageio *V1VMDataVolumeSourceImageIO `json:"imageio,omitempty"` + + // pvc + Pvc *V1VMDataVolumeSourcePVC `json:"pvc,omitempty"` + + // registry + Registry *V1VMDataVolumeSourceRegistry `json:"registry,omitempty"` + + // s3 + S3 *V1VMDataVolumeSourceS3 `json:"s3,omitempty"` + + // upload + Upload V1VMDataVolumeSourceUpload `json:"upload,omitempty"` + + // vddk + Vddk *V1VMDataVolumeSourceVDDK `json:"vddk,omitempty"` +} + +// Validate validates this v1 Vm data volume source +func (m *V1VMDataVolumeSource) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateHTTP(formats); err != nil { + res = append(res, err) + } + + if err := m.validateImageio(formats); err != nil { + res = append(res, err) + } + + if err := m.validatePvc(formats); err != nil { + res = append(res, err) + } + + if err := m.validateRegistry(formats); err != nil { + res = append(res, err) + } + + if err := m.validateS3(formats); err != nil { + res = append(res, err) + } + + if err := m.validateVddk(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1VMDataVolumeSource) validateHTTP(formats strfmt.Registry) error { + + if swag.IsZero(m.HTTP) { // not required + return nil + } + + if m.HTTP != nil { + if err := m.HTTP.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("http") + } + return err + } + } + + return nil +} + +func (m *V1VMDataVolumeSource) validateImageio(formats strfmt.Registry) error { + + if swag.IsZero(m.Imageio) { // not required + return nil + } + + if m.Imageio != nil { + if err := m.Imageio.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("imageio") + } + return err + } + } + + return nil +} + +func (m *V1VMDataVolumeSource) validatePvc(formats strfmt.Registry) error { + + if swag.IsZero(m.Pvc) { // not required + return nil + } + + if m.Pvc != nil { + if err := m.Pvc.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("pvc") + } + return err + } + } + + return nil +} + +func (m *V1VMDataVolumeSource) validateRegistry(formats strfmt.Registry) error { + + if swag.IsZero(m.Registry) { // not required + return nil + } + + if m.Registry != nil { + if err := m.Registry.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("registry") + } + return err + } + } + + return nil +} + +func (m *V1VMDataVolumeSource) validateS3(formats strfmt.Registry) error { + + if swag.IsZero(m.S3) { // not required + return nil + } + + if m.S3 != nil { + if err := m.S3.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("s3") + } + return err + } + } + + return nil +} + +func (m *V1VMDataVolumeSource) validateVddk(formats strfmt.Registry) error { + + if swag.IsZero(m.Vddk) { // not required + return nil + } + + if m.Vddk != nil { + if err := m.Vddk.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("vddk") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1VMDataVolumeSource) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1VMDataVolumeSource) UnmarshalBinary(b []byte) error { + var res V1VMDataVolumeSource + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_vm_data_volume_source_http.go b/api/models/v1_vm_data_volume_source_http.go new file mode 100644 index 00000000..d0fc0fb2 --- /dev/null +++ b/api/models/v1_vm_data_volume_source_http.go @@ -0,0 +1,76 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1VMDataVolumeSourceHTTP DataVolumeSourceHTTP can be either an http or https endpoint, with an optional basic auth user name and password, and an optional configmap containing additional CAs +// +// swagger:model v1VmDataVolumeSourceHttp +type V1VMDataVolumeSourceHTTP struct { + + // CertConfigMap is a configmap reference, containing a Certificate Authority(CA) public key, and a base64 encoded pem certificate + CertConfigMap string `json:"certConfigMap,omitempty"` + + // ExtraHeaders is a list of strings containing extra headers to include with HTTP transfer requests + ExtraHeaders []string `json:"extraHeaders"` + + // SecretExtraHeaders is a list of Secret references, each containing an extra HTTP header that may include sensitive information + SecretExtraHeaders []string `json:"secretExtraHeaders"` + + // SecretRef A Secret reference, the secret should contain accessKeyId (user name) base64 encoded, and secretKey (password) also base64 encoded + SecretRef string `json:"secretRef,omitempty"` + + // URL is the URL of the http(s) endpoint + // Required: true + URL *string `json:"url"` +} + +// Validate validates this v1 Vm data volume source Http +func (m *V1VMDataVolumeSourceHTTP) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateURL(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1VMDataVolumeSourceHTTP) validateURL(formats strfmt.Registry) error { + + if err := validate.Required("url", "body", m.URL); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1VMDataVolumeSourceHTTP) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1VMDataVolumeSourceHTTP) UnmarshalBinary(b []byte) error { + var res V1VMDataVolumeSourceHTTP + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_vm_data_volume_source_image_i_o.go b/api/models/v1_vm_data_volume_source_image_i_o.go new file mode 100644 index 00000000..26dc8735 --- /dev/null +++ b/api/models/v1_vm_data_volume_source_image_i_o.go @@ -0,0 +1,87 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1VMDataVolumeSourceImageIO DataVolumeSourceImageIO provides the parameters to create a Data Volume from an imageio source +// +// swagger:model v1VmDataVolumeSourceImageIO +type V1VMDataVolumeSourceImageIO struct { + + // CertConfigMap provides a reference to the CA cert + CertConfigMap string `json:"certConfigMap,omitempty"` + + // DiskID provides id of a disk to be imported + // Required: true + DiskID *string `json:"diskId"` + + // SecretRef provides the secret reference needed to access the ovirt-engine + SecretRef string `json:"secretRef,omitempty"` + + // URL is the URL of the ovirt-engine + // Required: true + URL *string `json:"url"` +} + +// Validate validates this v1 Vm data volume source image i o +func (m *V1VMDataVolumeSourceImageIO) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateDiskID(formats); err != nil { + res = append(res, err) + } + + if err := m.validateURL(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1VMDataVolumeSourceImageIO) validateDiskID(formats strfmt.Registry) error { + + if err := validate.Required("diskId", "body", m.DiskID); err != nil { + return err + } + + return nil +} + +func (m *V1VMDataVolumeSourceImageIO) validateURL(formats strfmt.Registry) error { + + if err := validate.Required("url", "body", m.URL); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1VMDataVolumeSourceImageIO) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1VMDataVolumeSourceImageIO) UnmarshalBinary(b []byte) error { + var res V1VMDataVolumeSourceImageIO + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_vm_data_volume_source_p_v_c.go b/api/models/v1_vm_data_volume_source_p_v_c.go new file mode 100644 index 00000000..0694158a --- /dev/null +++ b/api/models/v1_vm_data_volume_source_p_v_c.go @@ -0,0 +1,81 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1VMDataVolumeSourcePVC DataVolumeSourcePVC provides the parameters to create a Data Volume from an existing PVC +// +// swagger:model v1VmDataVolumeSourcePVC +type V1VMDataVolumeSourcePVC struct { + + // The name of the source PVC + // Required: true + Name *string `json:"name"` + + // The namespace of the source PVC + // Required: true + Namespace *string `json:"namespace"` +} + +// Validate validates this v1 Vm data volume source p v c +func (m *V1VMDataVolumeSourcePVC) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateName(formats); err != nil { + res = append(res, err) + } + + if err := m.validateNamespace(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1VMDataVolumeSourcePVC) validateName(formats strfmt.Registry) error { + + if err := validate.Required("name", "body", m.Name); err != nil { + return err + } + + return nil +} + +func (m *V1VMDataVolumeSourcePVC) validateNamespace(formats strfmt.Registry) error { + + if err := validate.Required("namespace", "body", m.Namespace); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1VMDataVolumeSourcePVC) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1VMDataVolumeSourcePVC) UnmarshalBinary(b []byte) error { + var res V1VMDataVolumeSourcePVC + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_vm_data_volume_source_ref.go b/api/models/v1_vm_data_volume_source_ref.go new file mode 100644 index 00000000..60fddd31 --- /dev/null +++ b/api/models/v1_vm_data_volume_source_ref.go @@ -0,0 +1,84 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1VMDataVolumeSourceRef DataVolumeSourceRef defines an indirect reference to the source of data for the DataVolume +// +// swagger:model v1VmDataVolumeSourceRef +type V1VMDataVolumeSourceRef struct { + + // The kind of the source reference, currently only "DataSource" is supported + // Required: true + Kind *string `json:"kind"` + + // The name of the source reference + // Required: true + Name *string `json:"name"` + + // The namespace of the source reference, defaults to the DataVolume namespace + Namespace string `json:"namespace,omitempty"` +} + +// Validate validates this v1 Vm data volume source ref +func (m *V1VMDataVolumeSourceRef) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateKind(formats); err != nil { + res = append(res, err) + } + + if err := m.validateName(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1VMDataVolumeSourceRef) validateKind(formats strfmt.Registry) error { + + if err := validate.Required("kind", "body", m.Kind); err != nil { + return err + } + + return nil +} + +func (m *V1VMDataVolumeSourceRef) validateName(formats strfmt.Registry) error { + + if err := validate.Required("name", "body", m.Name); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1VMDataVolumeSourceRef) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1VMDataVolumeSourceRef) UnmarshalBinary(b []byte) error { + var res V1VMDataVolumeSourceRef + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_vm_data_volume_source_registry.go b/api/models/v1_vm_data_volume_source_registry.go new file mode 100644 index 00000000..9cb17469 --- /dev/null +++ b/api/models/v1_vm_data_volume_source_registry.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1VMDataVolumeSourceRegistry DataVolumeSourceRegistry provides the parameters to create a Data Volume from an registry source +// +// swagger:model v1VmDataVolumeSourceRegistry +type V1VMDataVolumeSourceRegistry struct { + + // CertConfigMap provides a reference to the Registry certs + CertConfigMap string `json:"certConfigMap,omitempty"` + + // ImageStream is the name of image stream for import + ImageStream string `json:"imageStream,omitempty"` + + // PullMethod can be either "pod" (default import), or "node" (node docker cache based import) + PullMethod string `json:"pullMethod,omitempty"` + + // SecretRef provides the secret reference needed to access the Registry source + SecretRef string `json:"secretRef,omitempty"` + + // URL is the url of the registry source (starting with the scheme: docker, oci-archive) + URL string `json:"url,omitempty"` +} + +// Validate validates this v1 Vm data volume source registry +func (m *V1VMDataVolumeSourceRegistry) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1VMDataVolumeSourceRegistry) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1VMDataVolumeSourceRegistry) UnmarshalBinary(b []byte) error { + var res V1VMDataVolumeSourceRegistry + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_vm_data_volume_source_s3.go b/api/models/v1_vm_data_volume_source_s3.go new file mode 100644 index 00000000..79440dfb --- /dev/null +++ b/api/models/v1_vm_data_volume_source_s3.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1VMDataVolumeSourceS3 DataVolumeSourceS3 provides the parameters to create a Data Volume from an S3 source +// +// swagger:model v1VmDataVolumeSourceS3 +type V1VMDataVolumeSourceS3 struct { + + // CertConfigMap is a configmap reference, containing a Certificate Authority(CA) public key, and a base64 encoded pem certificate + CertConfigMap string `json:"certConfigMap,omitempty"` + + // SecretRef provides the secret reference needed to access the S3 source + SecretRef string `json:"secretRef,omitempty"` + + // URL is the url of the S3 source + // Required: true + URL *string `json:"url"` +} + +// Validate validates this v1 Vm data volume source s3 +func (m *V1VMDataVolumeSourceS3) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateURL(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1VMDataVolumeSourceS3) validateURL(formats strfmt.Registry) error { + + if err := validate.Required("url", "body", m.URL); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1VMDataVolumeSourceS3) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1VMDataVolumeSourceS3) UnmarshalBinary(b []byte) error { + var res V1VMDataVolumeSourceS3 + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_vm_data_volume_source_upload.go b/api/models/v1_vm_data_volume_source_upload.go new file mode 100644 index 00000000..2c056896 --- /dev/null +++ b/api/models/v1_vm_data_volume_source_upload.go @@ -0,0 +1,11 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +// V1VMDataVolumeSourceUpload DataVolumeSourceUpload provides the parameters to create a Data Volume by uploading the source +// +// swagger:model v1VmDataVolumeSourceUpload +type V1VMDataVolumeSourceUpload interface{} diff --git a/api/models/v1_vm_data_volume_source_v_d_d_k.go b/api/models/v1_vm_data_volume_source_v_d_d_k.go new file mode 100644 index 00000000..bf542a71 --- /dev/null +++ b/api/models/v1_vm_data_volume_source_v_d_d_k.go @@ -0,0 +1,58 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1VMDataVolumeSourceVDDK DataVolumeSourceVDDK provides the parameters to create a Data Volume from a Vmware source +// +// swagger:model v1VmDataVolumeSourceVDDK +type V1VMDataVolumeSourceVDDK struct { + + // BackingFile is the path to the virtual hard disk to migrate from vCenter/ESXi + BackingFile string `json:"backingFile,omitempty"` + + // InitImageURL is an optional URL to an image containing an extracted VDDK library, overrides v2v-vmware config map + InitImageURL string `json:"initImageURL,omitempty"` + + // SecretRef provides a reference to a secret containing the username and password needed to access the vCenter or ESXi host + SecretRef string `json:"secretRef,omitempty"` + + // Thumbprint is the certificate thumbprint of the vCenter or ESXi host + Thumbprint string `json:"thumbprint,omitempty"` + + // URL is the URL of the vCenter or ESXi host with the VM to migrate + URL string `json:"url,omitempty"` + + // UUID is the UUID of the virtual machine that the backing file is attached to in vCenter/ESXi + UUID string `json:"uuid,omitempty"` +} + +// Validate validates this v1 Vm data volume source v d d k +func (m *V1VMDataVolumeSourceVDDK) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1VMDataVolumeSourceVDDK) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1VMDataVolumeSourceVDDK) UnmarshalBinary(b []byte) error { + var res V1VMDataVolumeSourceVDDK + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_vm_data_volume_spec.go b/api/models/v1_vm_data_volume_spec.go new file mode 100644 index 00000000..c9df63c9 --- /dev/null +++ b/api/models/v1_vm_data_volume_spec.go @@ -0,0 +1,192 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1VMDataVolumeSpec DataVolumeSpec defines the DataVolume type specification +// +// swagger:model v1VmDataVolumeSpec +type V1VMDataVolumeSpec struct { + + // Checkpoints is a list of DataVolumeCheckpoints, representing stages in a multistage import. + Checkpoints []*V1VMDataVolumeCheckpoint `json:"checkpoints"` + + // DataVolumeContentType options: "kubevirt", "archive" + ContentType string `json:"contentType,omitempty"` + + // FinalCheckpoint indicates whether the current DataVolumeCheckpoint is the final checkpoint. + FinalCheckpoint bool `json:"finalCheckpoint,omitempty"` + + // Preallocation controls whether storage for DataVolumes should be allocated in advance. + Preallocation bool `json:"preallocation,omitempty"` + + // PriorityClassName for Importer, Cloner and Uploader pod + PriorityClassName string `json:"priorityClassName,omitempty"` + + // pvc + Pvc *V1VMPersistentVolumeClaimSpec `json:"pvc,omitempty"` + + // source + Source *V1VMDataVolumeSource `json:"source,omitempty"` + + // source ref + SourceRef *V1VMDataVolumeSourceRef `json:"sourceRef,omitempty"` + + // storage + Storage *V1VMStorageSpec `json:"storage,omitempty"` +} + +// Validate validates this v1 Vm data volume spec +func (m *V1VMDataVolumeSpec) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateCheckpoints(formats); err != nil { + res = append(res, err) + } + + if err := m.validatePvc(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSource(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSourceRef(formats); err != nil { + res = append(res, err) + } + + if err := m.validateStorage(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1VMDataVolumeSpec) validateCheckpoints(formats strfmt.Registry) error { + + if swag.IsZero(m.Checkpoints) { // not required + return nil + } + + for i := 0; i < len(m.Checkpoints); i++ { + if swag.IsZero(m.Checkpoints[i]) { // not required + continue + } + + if m.Checkpoints[i] != nil { + if err := m.Checkpoints[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("checkpoints" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1VMDataVolumeSpec) validatePvc(formats strfmt.Registry) error { + + if swag.IsZero(m.Pvc) { // not required + return nil + } + + if m.Pvc != nil { + if err := m.Pvc.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("pvc") + } + return err + } + } + + return nil +} + +func (m *V1VMDataVolumeSpec) validateSource(formats strfmt.Registry) error { + + if swag.IsZero(m.Source) { // not required + return nil + } + + if m.Source != nil { + if err := m.Source.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("source") + } + return err + } + } + + return nil +} + +func (m *V1VMDataVolumeSpec) validateSourceRef(formats strfmt.Registry) error { + + if swag.IsZero(m.SourceRef) { // not required + return nil + } + + if m.SourceRef != nil { + if err := m.SourceRef.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("sourceRef") + } + return err + } + } + + return nil +} + +func (m *V1VMDataVolumeSpec) validateStorage(formats strfmt.Registry) error { + + if swag.IsZero(m.Storage) { // not required + return nil + } + + if m.Storage != nil { + if err := m.Storage.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("storage") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1VMDataVolumeSpec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1VMDataVolumeSpec) UnmarshalBinary(b []byte) error { + var res V1VMDataVolumeSpec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_vm_data_volume_template_spec.go b/api/models/v1_vm_data_volume_template_spec.go new file mode 100644 index 00000000..ad0222a1 --- /dev/null +++ b/api/models/v1_vm_data_volume_template_spec.go @@ -0,0 +1,104 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1VMDataVolumeTemplateSpec v1 Vm data volume template spec +// +// swagger:model v1VmDataVolumeTemplateSpec +type V1VMDataVolumeTemplateSpec struct { + + // APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. + APIVersion string `json:"apiVersion,omitempty"` + + // Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. + Kind string `json:"kind,omitempty"` + + // metadata + Metadata *V1VMObjectMeta `json:"metadata,omitempty"` + + // spec + // Required: true + Spec *V1VMDataVolumeSpec `json:"spec"` +} + +// Validate validates this v1 Vm data volume template spec +func (m *V1VMDataVolumeTemplateSpec) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSpec(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1VMDataVolumeTemplateSpec) validateMetadata(formats strfmt.Registry) error { + + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } + return err + } + } + + return nil +} + +func (m *V1VMDataVolumeTemplateSpec) validateSpec(formats strfmt.Registry) error { + + if err := validate.Required("spec", "body", m.Spec); err != nil { + return err + } + + if m.Spec != nil { + if err := m.Spec.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1VMDataVolumeTemplateSpec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1VMDataVolumeTemplateSpec) UnmarshalBinary(b []byte) error { + var res V1VMDataVolumeTemplateSpec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_vm_devices.go b/api/models/v1_vm_devices.go new file mode 100644 index 00000000..286f816b --- /dev/null +++ b/api/models/v1_vm_devices.go @@ -0,0 +1,329 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1VMDevices v1 Vm devices +// +// swagger:model v1VmDevices +type V1VMDevices struct { + + // Whether to attach the default graphics device or not. VNC will not be available if set to false. Defaults to true. + AutoattachGraphicsDevice bool `json:"autoattachGraphicsDevice,omitempty"` + + // Whether to attach an Input Device. Defaults to false. + AutoattachInputDevice bool `json:"autoattachInputDevice,omitempty"` + + // Whether to attach the Memory balloon device with default period. Period can be adjusted in virt-config. Defaults to true. + AutoattachMemBalloon bool `json:"autoattachMemBalloon,omitempty"` + + // Whether to attach a pod network interface. Defaults to true. + AutoattachPodInterface bool `json:"autoattachPodInterface,omitempty"` + + // Whether to attach the default serial console or not. Serial console access will not be available if set to false. Defaults to true. + AutoattachSerialConsole bool `json:"autoattachSerialConsole,omitempty"` + + // Whether to attach the VSOCK CID to the VM or not. VSOCK access will be available if set to true. Defaults to false. + AutoattachVSOCK bool `json:"autoattachVSOCK,omitempty"` + + // Whether or not to enable virtio multi-queue for block devices. Defaults to false. + BlockMultiQueue bool `json:"blockMultiQueue,omitempty"` + + // client passthrough + ClientPassthrough V1VMClientPassthroughDevices `json:"clientPassthrough,omitempty"` + + // DisableHotplug disabled the ability to hotplug disks. + DisableHotplug bool `json:"disableHotplug,omitempty"` + + // Disks describes disks, cdroms and luns which are connected to the vmi. + Disks []*V1VMDisk `json:"disks"` + + // Filesystems describes filesystem which is connected to the vmi. + Filesystems []*V1VMFilesystem `json:"filesystems"` + + // Whether to attach a GPU device to the vmi. + Gpus []*V1VMGPU `json:"gpus"` + + // Whether to attach a host device to the vmi. + HostDevices []*V1VMHostDevice `json:"hostDevices"` + + // Inputs describe input devices + Inputs []*V1VMInput `json:"inputs"` + + // Interfaces describe network interfaces which are added to the vmi. + Interfaces []*V1VMInterface `json:"interfaces"` + + // If specified, virtual network interfaces configured with a virtio bus will also enable the vhost multiqueue feature for network devices. The number of queues created depends on additional factors of the VirtualMachineInstance, like the number of guest CPUs. + NetworkInterfaceMultiqueue bool `json:"networkInterfaceMultiqueue,omitempty"` + + // rng + Rng V1VMRng `json:"rng,omitempty"` + + // sound + Sound *V1VMSoundDevice `json:"sound,omitempty"` + + // tpm + Tpm V1VMTPMDevice `json:"tpm,omitempty"` + + // Fall back to legacy virtio 0.9 support if virtio bus is selected on devices. This is helpful for old machines like CentOS6 or RHEL6 which do not understand virtio_non_transitional (virtio 1.0). + UseVirtioTransitional bool `json:"useVirtioTransitional,omitempty"` + + // watchdog + Watchdog *V1VMWatchdog `json:"watchdog,omitempty"` +} + +// Validate validates this v1 Vm devices +func (m *V1VMDevices) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateDisks(formats); err != nil { + res = append(res, err) + } + + if err := m.validateFilesystems(formats); err != nil { + res = append(res, err) + } + + if err := m.validateGpus(formats); err != nil { + res = append(res, err) + } + + if err := m.validateHostDevices(formats); err != nil { + res = append(res, err) + } + + if err := m.validateInputs(formats); err != nil { + res = append(res, err) + } + + if err := m.validateInterfaces(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSound(formats); err != nil { + res = append(res, err) + } + + if err := m.validateWatchdog(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1VMDevices) validateDisks(formats strfmt.Registry) error { + + if swag.IsZero(m.Disks) { // not required + return nil + } + + for i := 0; i < len(m.Disks); i++ { + if swag.IsZero(m.Disks[i]) { // not required + continue + } + + if m.Disks[i] != nil { + if err := m.Disks[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("disks" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1VMDevices) validateFilesystems(formats strfmt.Registry) error { + + if swag.IsZero(m.Filesystems) { // not required + return nil + } + + for i := 0; i < len(m.Filesystems); i++ { + if swag.IsZero(m.Filesystems[i]) { // not required + continue + } + + if m.Filesystems[i] != nil { + if err := m.Filesystems[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("filesystems" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1VMDevices) validateGpus(formats strfmt.Registry) error { + + if swag.IsZero(m.Gpus) { // not required + return nil + } + + for i := 0; i < len(m.Gpus); i++ { + if swag.IsZero(m.Gpus[i]) { // not required + continue + } + + if m.Gpus[i] != nil { + if err := m.Gpus[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("gpus" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1VMDevices) validateHostDevices(formats strfmt.Registry) error { + + if swag.IsZero(m.HostDevices) { // not required + return nil + } + + for i := 0; i < len(m.HostDevices); i++ { + if swag.IsZero(m.HostDevices[i]) { // not required + continue + } + + if m.HostDevices[i] != nil { + if err := m.HostDevices[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("hostDevices" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1VMDevices) validateInputs(formats strfmt.Registry) error { + + if swag.IsZero(m.Inputs) { // not required + return nil + } + + for i := 0; i < len(m.Inputs); i++ { + if swag.IsZero(m.Inputs[i]) { // not required + continue + } + + if m.Inputs[i] != nil { + if err := m.Inputs[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("inputs" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1VMDevices) validateInterfaces(formats strfmt.Registry) error { + + if swag.IsZero(m.Interfaces) { // not required + return nil + } + + for i := 0; i < len(m.Interfaces); i++ { + if swag.IsZero(m.Interfaces[i]) { // not required + continue + } + + if m.Interfaces[i] != nil { + if err := m.Interfaces[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("interfaces" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1VMDevices) validateSound(formats strfmt.Registry) error { + + if swag.IsZero(m.Sound) { // not required + return nil + } + + if m.Sound != nil { + if err := m.Sound.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("sound") + } + return err + } + } + + return nil +} + +func (m *V1VMDevices) validateWatchdog(formats strfmt.Registry) error { + + if swag.IsZero(m.Watchdog) { // not required + return nil + } + + if m.Watchdog != nil { + if err := m.Watchdog.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("watchdog") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1VMDevices) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1VMDevices) UnmarshalBinary(b []byte) error { + var res V1VMDevices + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_vm_disk.go b/api/models/v1_vm_disk.go new file mode 100644 index 00000000..728adaf1 --- /dev/null +++ b/api/models/v1_vm_disk.go @@ -0,0 +1,185 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1VMDisk v1 Vm disk +// +// swagger:model v1VmDisk +type V1VMDisk struct { + + // block size + BlockSize *V1VMBlockSize `json:"blockSize,omitempty"` + + // BootOrder is an integer value > 0, used to determine ordering of boot devices. Lower values take precedence. Each disk or interface that has a boot order must have a unique value. Disks without a boot order are not tried if a disk with a boot order exists. + BootOrder int32 `json:"bootOrder,omitempty"` + + // Cache specifies which kvm disk cache mode should be used. Supported values are: CacheNone, CacheWriteThrough. + Cache string `json:"cache,omitempty"` + + // cdrom + Cdrom *V1VMCDRomTarget `json:"cdrom,omitempty"` + + // dedicatedIOThread indicates this disk should have an exclusive IO Thread. Enabling this implies useIOThreads = true. Defaults to false. + DedicatedIOThread bool `json:"dedicatedIOThread,omitempty"` + + // disk + Disk *V1VMDiskTarget `json:"disk,omitempty"` + + // IO specifies which QEMU disk IO mode should be used. Supported values are: native, default, threads. + Io string `json:"io,omitempty"` + + // lun + Lun *V1VMLunTarget `json:"lun,omitempty"` + + // Name is the device name + // Required: true + Name *string `json:"name"` + + // Serial provides the ability to specify a serial number for the disk device. + Serial string `json:"serial,omitempty"` + + // If specified the disk is made sharable and multiple write from different VMs are permitted + Shareable bool `json:"shareable,omitempty"` + + // If specified, disk address and its tag will be provided to the guest via config drive metadata + Tag string `json:"tag,omitempty"` +} + +// Validate validates this v1 Vm disk +func (m *V1VMDisk) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateBlockSize(formats); err != nil { + res = append(res, err) + } + + if err := m.validateCdrom(formats); err != nil { + res = append(res, err) + } + + if err := m.validateDisk(formats); err != nil { + res = append(res, err) + } + + if err := m.validateLun(formats); err != nil { + res = append(res, err) + } + + if err := m.validateName(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1VMDisk) validateBlockSize(formats strfmt.Registry) error { + + if swag.IsZero(m.BlockSize) { // not required + return nil + } + + if m.BlockSize != nil { + if err := m.BlockSize.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("blockSize") + } + return err + } + } + + return nil +} + +func (m *V1VMDisk) validateCdrom(formats strfmt.Registry) error { + + if swag.IsZero(m.Cdrom) { // not required + return nil + } + + if m.Cdrom != nil { + if err := m.Cdrom.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("cdrom") + } + return err + } + } + + return nil +} + +func (m *V1VMDisk) validateDisk(formats strfmt.Registry) error { + + if swag.IsZero(m.Disk) { // not required + return nil + } + + if m.Disk != nil { + if err := m.Disk.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("disk") + } + return err + } + } + + return nil +} + +func (m *V1VMDisk) validateLun(formats strfmt.Registry) error { + + if swag.IsZero(m.Lun) { // not required + return nil + } + + if m.Lun != nil { + if err := m.Lun.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("lun") + } + return err + } + } + + return nil +} + +func (m *V1VMDisk) validateName(formats strfmt.Registry) error { + + if err := validate.Required("name", "body", m.Name); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1VMDisk) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1VMDisk) UnmarshalBinary(b []byte) error { + var res V1VMDisk + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_vm_disk_target.go b/api/models/v1_vm_disk_target.go new file mode 100644 index 00000000..6035478d --- /dev/null +++ b/api/models/v1_vm_disk_target.go @@ -0,0 +1,49 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1VMDiskTarget v1 Vm disk target +// +// swagger:model v1VmDiskTarget +type V1VMDiskTarget struct { + + // Bus indicates the type of disk device to emulate. supported values: virtio, sata, scsi, usb. + Bus string `json:"bus,omitempty"` + + // If specified, the virtual disk will be placed on the guests pci address with the specified PCI address. For example: 0000:81:01.10 + PciAddress string `json:"pciAddress,omitempty"` + + // ReadOnly. Defaults to false. + Readonly bool `json:"readonly,omitempty"` +} + +// Validate validates this v1 Vm disk target +func (m *V1VMDiskTarget) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1VMDiskTarget) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1VMDiskTarget) UnmarshalBinary(b []byte) error { + var res V1VMDiskTarget + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_vm_domain_spec.go b/api/models/v1_vm_domain_spec.go new file mode 100644 index 00000000..2721d7ee --- /dev/null +++ b/api/models/v1_vm_domain_spec.go @@ -0,0 +1,301 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1VMDomainSpec v1 Vm domain spec +// +// swagger:model v1VmDomainSpec +type V1VMDomainSpec struct { + + // chassis + Chassis *V1VMChassis `json:"chassis,omitempty"` + + // clock + Clock *V1VMClock `json:"clock,omitempty"` + + // cpu + CPU *V1VMCPU `json:"cpu,omitempty"` + + // devices + // Required: true + Devices *V1VMDevices `json:"devices"` + + // features + Features *V1VMFeatures `json:"features,omitempty"` + + // firmware + Firmware *V1VMFirmware `json:"firmware,omitempty"` + + // Controls whether or not disks will share IOThreads. Omitting IOThreadsPolicy disables use of IOThreads. One of: shared, auto + IoThreadsPolicy string `json:"ioThreadsPolicy,omitempty"` + + // launch security + LaunchSecurity *V1VMLaunchSecurity `json:"launchSecurity,omitempty"` + + // machine + Machine *V1VMMachine `json:"machine,omitempty"` + + // memory + Memory *V1VMMemory `json:"memory,omitempty"` + + // resources + Resources *V1VMResourceRequirements `json:"resources,omitempty"` +} + +// Validate validates this v1 Vm domain spec +func (m *V1VMDomainSpec) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateChassis(formats); err != nil { + res = append(res, err) + } + + if err := m.validateClock(formats); err != nil { + res = append(res, err) + } + + if err := m.validateCPU(formats); err != nil { + res = append(res, err) + } + + if err := m.validateDevices(formats); err != nil { + res = append(res, err) + } + + if err := m.validateFeatures(formats); err != nil { + res = append(res, err) + } + + if err := m.validateFirmware(formats); err != nil { + res = append(res, err) + } + + if err := m.validateLaunchSecurity(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMachine(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMemory(formats); err != nil { + res = append(res, err) + } + + if err := m.validateResources(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1VMDomainSpec) validateChassis(formats strfmt.Registry) error { + + if swag.IsZero(m.Chassis) { // not required + return nil + } + + if m.Chassis != nil { + if err := m.Chassis.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("chassis") + } + return err + } + } + + return nil +} + +func (m *V1VMDomainSpec) validateClock(formats strfmt.Registry) error { + + if swag.IsZero(m.Clock) { // not required + return nil + } + + if m.Clock != nil { + if err := m.Clock.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("clock") + } + return err + } + } + + return nil +} + +func (m *V1VMDomainSpec) validateCPU(formats strfmt.Registry) error { + + if swag.IsZero(m.CPU) { // not required + return nil + } + + if m.CPU != nil { + if err := m.CPU.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("cpu") + } + return err + } + } + + return nil +} + +func (m *V1VMDomainSpec) validateDevices(formats strfmt.Registry) error { + + if err := validate.Required("devices", "body", m.Devices); err != nil { + return err + } + + if m.Devices != nil { + if err := m.Devices.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("devices") + } + return err + } + } + + return nil +} + +func (m *V1VMDomainSpec) validateFeatures(formats strfmt.Registry) error { + + if swag.IsZero(m.Features) { // not required + return nil + } + + if m.Features != nil { + if err := m.Features.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("features") + } + return err + } + } + + return nil +} + +func (m *V1VMDomainSpec) validateFirmware(formats strfmt.Registry) error { + + if swag.IsZero(m.Firmware) { // not required + return nil + } + + if m.Firmware != nil { + if err := m.Firmware.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("firmware") + } + return err + } + } + + return nil +} + +func (m *V1VMDomainSpec) validateLaunchSecurity(formats strfmt.Registry) error { + + if swag.IsZero(m.LaunchSecurity) { // not required + return nil + } + + if m.LaunchSecurity != nil { + if err := m.LaunchSecurity.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("launchSecurity") + } + return err + } + } + + return nil +} + +func (m *V1VMDomainSpec) validateMachine(formats strfmt.Registry) error { + + if swag.IsZero(m.Machine) { // not required + return nil + } + + if m.Machine != nil { + if err := m.Machine.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("machine") + } + return err + } + } + + return nil +} + +func (m *V1VMDomainSpec) validateMemory(formats strfmt.Registry) error { + + if swag.IsZero(m.Memory) { // not required + return nil + } + + if m.Memory != nil { + if err := m.Memory.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("memory") + } + return err + } + } + + return nil +} + +func (m *V1VMDomainSpec) validateResources(formats strfmt.Registry) error { + + if swag.IsZero(m.Resources) { // not required + return nil + } + + if m.Resources != nil { + if err := m.Resources.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("resources") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1VMDomainSpec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1VMDomainSpec) UnmarshalBinary(b []byte) error { + var res V1VMDomainSpec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_vm_downward_api_volume_file.go b/api/models/v1_vm_downward_api_volume_file.go new file mode 100644 index 00000000..065fc34e --- /dev/null +++ b/api/models/v1_vm_downward_api_volume_file.go @@ -0,0 +1,117 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1VMDownwardAPIVolumeFile DownwardAPIVolumeFile represents information to create the file containing the pod field +// +// swagger:model v1VmDownwardApiVolumeFile +type V1VMDownwardAPIVolumeFile struct { + + // field ref + FieldRef *V1VMObjectFieldSelector `json:"fieldRef,omitempty"` + + // Optional: mode bits used to set permissions on this file, must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. If not specified, the volume defaultMode will be used. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set. + Mode int32 `json:"mode,omitempty"` + + // Required: Path is the relative path name of the file to be created. Must not be absolute or contain the '..' path. Must be utf-8 encoded. The first item of the relative path must not start with '..' + // Required: true + Path *string `json:"path"` + + // resource field ref + ResourceFieldRef *V1VMResourceFieldSelector `json:"resourceFieldRef,omitempty"` +} + +// Validate validates this v1 Vm downward Api volume file +func (m *V1VMDownwardAPIVolumeFile) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateFieldRef(formats); err != nil { + res = append(res, err) + } + + if err := m.validatePath(formats); err != nil { + res = append(res, err) + } + + if err := m.validateResourceFieldRef(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1VMDownwardAPIVolumeFile) validateFieldRef(formats strfmt.Registry) error { + + if swag.IsZero(m.FieldRef) { // not required + return nil + } + + if m.FieldRef != nil { + if err := m.FieldRef.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("fieldRef") + } + return err + } + } + + return nil +} + +func (m *V1VMDownwardAPIVolumeFile) validatePath(formats strfmt.Registry) error { + + if err := validate.Required("path", "body", m.Path); err != nil { + return err + } + + return nil +} + +func (m *V1VMDownwardAPIVolumeFile) validateResourceFieldRef(formats strfmt.Registry) error { + + if swag.IsZero(m.ResourceFieldRef) { // not required + return nil + } + + if m.ResourceFieldRef != nil { + if err := m.ResourceFieldRef.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("resourceFieldRef") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1VMDownwardAPIVolumeFile) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1VMDownwardAPIVolumeFile) UnmarshalBinary(b []byte) error { + var res V1VMDownwardAPIVolumeFile + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_vm_downward_api_volume_source.go b/api/models/v1_vm_downward_api_volume_source.go new file mode 100644 index 00000000..e04e4795 --- /dev/null +++ b/api/models/v1_vm_downward_api_volume_source.go @@ -0,0 +1,83 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1VMDownwardAPIVolumeSource DownwardAPIVolumeSource represents a volume containing downward API info. +// +// swagger:model v1VmDownwardApiVolumeSource +type V1VMDownwardAPIVolumeSource struct { + + // Fields is a list of downward API volume file + Fields []*V1VMDownwardAPIVolumeFile `json:"fields"` + + // The volume label of the resulting disk inside the VMI. Different bootstrapping mechanisms require different values. Typical values are "cidata" (cloud-init), "config-2" (cloud-init) or "OEMDRV" (kickstart). + VolumeLabel string `json:"volumeLabel,omitempty"` +} + +// Validate validates this v1 Vm downward Api volume source +func (m *V1VMDownwardAPIVolumeSource) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateFields(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1VMDownwardAPIVolumeSource) validateFields(formats strfmt.Registry) error { + + if swag.IsZero(m.Fields) { // not required + return nil + } + + for i := 0; i < len(m.Fields); i++ { + if swag.IsZero(m.Fields[i]) { // not required + continue + } + + if m.Fields[i] != nil { + if err := m.Fields[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("fields" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1VMDownwardAPIVolumeSource) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1VMDownwardAPIVolumeSource) UnmarshalBinary(b []byte) error { + var res V1VMDownwardAPIVolumeSource + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_vm_downward_metrics_volume_source.go b/api/models/v1_vm_downward_metrics_volume_source.go new file mode 100644 index 00000000..88fdfbb7 --- /dev/null +++ b/api/models/v1_vm_downward_metrics_volume_source.go @@ -0,0 +1,11 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +// V1VMDownwardMetricsVolumeSource DownwardMetricsVolumeSource adds a very small disk to VMIs which contains a limited view of host and guest metrics. The disk content is compatible with vhostmd (https://github.com/vhostmd/vhostmd) and vm-dump-metrics. +// +// swagger:model v1VmDownwardMetricsVolumeSource +type V1VMDownwardMetricsVolumeSource interface{} diff --git a/api/models/v1_vm_duration.go b/api/models/v1_vm_duration.go new file mode 100644 index 00000000..7653d376 --- /dev/null +++ b/api/models/v1_vm_duration.go @@ -0,0 +1,20 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" +) + +// V1VMDuration Duration is a wrapper around time.Duration which supports correct marshaling to YAML and JSON. In particular, it marshals into strings, which can be used as map keys in json. +// +// swagger:model v1VmDuration +type V1VMDuration string + +// Validate validates this v1 Vm duration +func (m V1VMDuration) Validate(formats strfmt.Registry) error { + return nil +} diff --git a/api/models/v1_vm_e_f_i.go b/api/models/v1_vm_e_f_i.go new file mode 100644 index 00000000..257e0ca1 --- /dev/null +++ b/api/models/v1_vm_e_f_i.go @@ -0,0 +1,43 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1VMEFI If set, EFI will be used instead of BIOS. +// +// swagger:model v1VmEFI +type V1VMEFI struct { + + // If set, SecureBoot will be enabled and the OVMF roms will be swapped for SecureBoot-enabled ones. Requires SMM to be enabled. Defaults to true + SecureBoot bool `json:"secureBoot,omitempty"` +} + +// Validate validates this v1 Vm e f i +func (m *V1VMEFI) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1VMEFI) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1VMEFI) UnmarshalBinary(b []byte) error { + var res V1VMEFI + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_vm_empty_disk_source.go b/api/models/v1_vm_empty_disk_source.go new file mode 100644 index 00000000..c638f207 --- /dev/null +++ b/api/models/v1_vm_empty_disk_source.go @@ -0,0 +1,66 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1VMEmptyDiskSource EmptyDisk represents a temporary disk which shares the vmis lifecycle. +// +// swagger:model v1VmEmptyDiskSource +type V1VMEmptyDiskSource struct { + + // capacity + // Required: true + Capacity V1VMQuantity `json:"capacity"` +} + +// Validate validates this v1 Vm empty disk source +func (m *V1VMEmptyDiskSource) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateCapacity(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1VMEmptyDiskSource) validateCapacity(formats strfmt.Registry) error { + + if err := m.Capacity.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("capacity") + } + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1VMEmptyDiskSource) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1VMEmptyDiskSource) UnmarshalBinary(b []byte) error { + var res V1VMEmptyDiskSource + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_vm_ephemeral_volume_source.go b/api/models/v1_vm_ephemeral_volume_source.go new file mode 100644 index 00000000..3a0c9217 --- /dev/null +++ b/api/models/v1_vm_ephemeral_volume_source.go @@ -0,0 +1,71 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1VMEphemeralVolumeSource v1 Vm ephemeral volume source +// +// swagger:model v1VmEphemeralVolumeSource +type V1VMEphemeralVolumeSource struct { + + // persistent volume claim + PersistentVolumeClaim *V1VMPersistentVolumeClaimVolumeSource `json:"persistentVolumeClaim,omitempty"` +} + +// Validate validates this v1 Vm ephemeral volume source +func (m *V1VMEphemeralVolumeSource) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validatePersistentVolumeClaim(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1VMEphemeralVolumeSource) validatePersistentVolumeClaim(formats strfmt.Registry) error { + + if swag.IsZero(m.PersistentVolumeClaim) { // not required + return nil + } + + if m.PersistentVolumeClaim != nil { + if err := m.PersistentVolumeClaim.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("persistentVolumeClaim") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1VMEphemeralVolumeSource) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1VMEphemeralVolumeSource) UnmarshalBinary(b []byte) error { + var res V1VMEphemeralVolumeSource + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_vm_error.go b/api/models/v1_vm_error.go new file mode 100644 index 00000000..95e27831 --- /dev/null +++ b/api/models/v1_vm_error.go @@ -0,0 +1,73 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1VMError Error is the last error encountered during the snapshot/restore +// +// swagger:model v1VmError +type V1VMError struct { + + // message + Message string `json:"message,omitempty"` + + // time + // Format: date-time + Time V1Time `json:"time,omitempty"` +} + +// Validate validates this v1 Vm error +func (m *V1VMError) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateTime(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1VMError) validateTime(formats strfmt.Registry) error { + + if swag.IsZero(m.Time) { // not required + return nil + } + + if err := m.Time.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("time") + } + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1VMError) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1VMError) UnmarshalBinary(b []byte) error { + var res V1VMError + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_vm_exec_action.go b/api/models/v1_vm_exec_action.go new file mode 100644 index 00000000..57fb57db --- /dev/null +++ b/api/models/v1_vm_exec_action.go @@ -0,0 +1,43 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1VMExecAction ExecAction describes a "run in container" action. +// +// swagger:model v1VmExecAction +type V1VMExecAction struct { + + // Command is the command line to execute inside the container, the working directory for the command is root ('/') in the container's filesystem. The command is simply exec'd, it is not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use a shell, you need to explicitly call out to that shell. Exit status of 0 is treated as live/healthy and non-zero is unhealthy. + Command []string `json:"command"` +} + +// Validate validates this v1 Vm exec action +func (m *V1VMExecAction) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1VMExecAction) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1VMExecAction) UnmarshalBinary(b []byte) error { + var res V1VMExecAction + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_vm_feature_api_c.go b/api/models/v1_vm_feature_api_c.go new file mode 100644 index 00000000..868b4647 --- /dev/null +++ b/api/models/v1_vm_feature_api_c.go @@ -0,0 +1,46 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1VMFeatureAPIC v1 Vm feature Api c +// +// swagger:model v1VmFeatureApiC +type V1VMFeatureAPIC struct { + + // Enabled determines if the feature should be enabled or disabled on the guest. Defaults to true. + Enabled bool `json:"enabled,omitempty"` + + // EndOfInterrupt enables the end of interrupt notification in the guest. Defaults to false. + EndOfInterrupt bool `json:"endOfInterrupt,omitempty"` +} + +// Validate validates this v1 Vm feature Api c +func (m *V1VMFeatureAPIC) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1VMFeatureAPIC) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1VMFeatureAPIC) UnmarshalBinary(b []byte) error { + var res V1VMFeatureAPIC + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_vm_feature_hyperv.go b/api/models/v1_vm_feature_hyperv.go new file mode 100644 index 00000000..907f9215 --- /dev/null +++ b/api/models/v1_vm_feature_hyperv.go @@ -0,0 +1,396 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1VMFeatureHyperv Hyperv specific features. +// +// swagger:model v1VmFeatureHyperv +type V1VMFeatureHyperv struct { + + // evmcs + Evmcs *V1VMFeatureState `json:"evmcs,omitempty"` + + // frequencies + Frequencies *V1VMFeatureState `json:"frequencies,omitempty"` + + // ipi + Ipi *V1VMFeatureState `json:"ipi,omitempty"` + + // reenlightenment + Reenlightenment *V1VMFeatureState `json:"reenlightenment,omitempty"` + + // relaxed + Relaxed *V1VMFeatureState `json:"relaxed,omitempty"` + + // reset + Reset *V1VMFeatureState `json:"reset,omitempty"` + + // runtime + Runtime *V1VMFeatureState `json:"runtime,omitempty"` + + // spinlocks + Spinlocks *V1VMFeatureSpinlocks `json:"spinlocks,omitempty"` + + // synic + Synic *V1VMFeatureState `json:"synic,omitempty"` + + // synictimer + Synictimer *V1VMSyNICTimer `json:"synictimer,omitempty"` + + // tlbflush + Tlbflush *V1VMFeatureState `json:"tlbflush,omitempty"` + + // vapic + Vapic *V1VMFeatureState `json:"vapic,omitempty"` + + // vendorid + Vendorid *V1VMFeatureVendorID `json:"vendorid,omitempty"` + + // vpindex + Vpindex *V1VMFeatureState `json:"vpindex,omitempty"` +} + +// Validate validates this v1 Vm feature hyperv +func (m *V1VMFeatureHyperv) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateEvmcs(formats); err != nil { + res = append(res, err) + } + + if err := m.validateFrequencies(formats); err != nil { + res = append(res, err) + } + + if err := m.validateIpi(formats); err != nil { + res = append(res, err) + } + + if err := m.validateReenlightenment(formats); err != nil { + res = append(res, err) + } + + if err := m.validateRelaxed(formats); err != nil { + res = append(res, err) + } + + if err := m.validateReset(formats); err != nil { + res = append(res, err) + } + + if err := m.validateRuntime(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSpinlocks(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSynic(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSynictimer(formats); err != nil { + res = append(res, err) + } + + if err := m.validateTlbflush(formats); err != nil { + res = append(res, err) + } + + if err := m.validateVapic(formats); err != nil { + res = append(res, err) + } + + if err := m.validateVendorid(formats); err != nil { + res = append(res, err) + } + + if err := m.validateVpindex(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1VMFeatureHyperv) validateEvmcs(formats strfmt.Registry) error { + + if swag.IsZero(m.Evmcs) { // not required + return nil + } + + if m.Evmcs != nil { + if err := m.Evmcs.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("evmcs") + } + return err + } + } + + return nil +} + +func (m *V1VMFeatureHyperv) validateFrequencies(formats strfmt.Registry) error { + + if swag.IsZero(m.Frequencies) { // not required + return nil + } + + if m.Frequencies != nil { + if err := m.Frequencies.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("frequencies") + } + return err + } + } + + return nil +} + +func (m *V1VMFeatureHyperv) validateIpi(formats strfmt.Registry) error { + + if swag.IsZero(m.Ipi) { // not required + return nil + } + + if m.Ipi != nil { + if err := m.Ipi.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("ipi") + } + return err + } + } + + return nil +} + +func (m *V1VMFeatureHyperv) validateReenlightenment(formats strfmt.Registry) error { + + if swag.IsZero(m.Reenlightenment) { // not required + return nil + } + + if m.Reenlightenment != nil { + if err := m.Reenlightenment.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("reenlightenment") + } + return err + } + } + + return nil +} + +func (m *V1VMFeatureHyperv) validateRelaxed(formats strfmt.Registry) error { + + if swag.IsZero(m.Relaxed) { // not required + return nil + } + + if m.Relaxed != nil { + if err := m.Relaxed.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("relaxed") + } + return err + } + } + + return nil +} + +func (m *V1VMFeatureHyperv) validateReset(formats strfmt.Registry) error { + + if swag.IsZero(m.Reset) { // not required + return nil + } + + if m.Reset != nil { + if err := m.Reset.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("reset") + } + return err + } + } + + return nil +} + +func (m *V1VMFeatureHyperv) validateRuntime(formats strfmt.Registry) error { + + if swag.IsZero(m.Runtime) { // not required + return nil + } + + if m.Runtime != nil { + if err := m.Runtime.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("runtime") + } + return err + } + } + + return nil +} + +func (m *V1VMFeatureHyperv) validateSpinlocks(formats strfmt.Registry) error { + + if swag.IsZero(m.Spinlocks) { // not required + return nil + } + + if m.Spinlocks != nil { + if err := m.Spinlocks.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spinlocks") + } + return err + } + } + + return nil +} + +func (m *V1VMFeatureHyperv) validateSynic(formats strfmt.Registry) error { + + if swag.IsZero(m.Synic) { // not required + return nil + } + + if m.Synic != nil { + if err := m.Synic.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("synic") + } + return err + } + } + + return nil +} + +func (m *V1VMFeatureHyperv) validateSynictimer(formats strfmt.Registry) error { + + if swag.IsZero(m.Synictimer) { // not required + return nil + } + + if m.Synictimer != nil { + if err := m.Synictimer.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("synictimer") + } + return err + } + } + + return nil +} + +func (m *V1VMFeatureHyperv) validateTlbflush(formats strfmt.Registry) error { + + if swag.IsZero(m.Tlbflush) { // not required + return nil + } + + if m.Tlbflush != nil { + if err := m.Tlbflush.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("tlbflush") + } + return err + } + } + + return nil +} + +func (m *V1VMFeatureHyperv) validateVapic(formats strfmt.Registry) error { + + if swag.IsZero(m.Vapic) { // not required + return nil + } + + if m.Vapic != nil { + if err := m.Vapic.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("vapic") + } + return err + } + } + + return nil +} + +func (m *V1VMFeatureHyperv) validateVendorid(formats strfmt.Registry) error { + + if swag.IsZero(m.Vendorid) { // not required + return nil + } + + if m.Vendorid != nil { + if err := m.Vendorid.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("vendorid") + } + return err + } + } + + return nil +} + +func (m *V1VMFeatureHyperv) validateVpindex(formats strfmt.Registry) error { + + if swag.IsZero(m.Vpindex) { // not required + return nil + } + + if m.Vpindex != nil { + if err := m.Vpindex.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("vpindex") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1VMFeatureHyperv) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1VMFeatureHyperv) UnmarshalBinary(b []byte) error { + var res V1VMFeatureHyperv + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_vm_feature_k_vm.go b/api/models/v1_vm_feature_k_vm.go new file mode 100644 index 00000000..cca2155f --- /dev/null +++ b/api/models/v1_vm_feature_k_vm.go @@ -0,0 +1,43 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1VMFeatureKVM v1 Vm feature k Vm +// +// swagger:model v1VmFeatureKVm +type V1VMFeatureKVM struct { + + // Hide the KVM hypervisor from standard MSR based discovery. Defaults to false + Hidden bool `json:"hidden,omitempty"` +} + +// Validate validates this v1 Vm feature k Vm +func (m *V1VMFeatureKVM) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1VMFeatureKVM) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1VMFeatureKVM) UnmarshalBinary(b []byte) error { + var res V1VMFeatureKVM + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_vm_feature_spinlocks.go b/api/models/v1_vm_feature_spinlocks.go new file mode 100644 index 00000000..5ecd08a4 --- /dev/null +++ b/api/models/v1_vm_feature_spinlocks.go @@ -0,0 +1,46 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1VMFeatureSpinlocks v1 Vm feature spinlocks +// +// swagger:model v1VmFeatureSpinlocks +type V1VMFeatureSpinlocks struct { + + // Enabled determines if the feature should be enabled or disabled on the guest. Defaults to true. + Enabled bool `json:"enabled,omitempty"` + + // Retries indicates the number of retries. Must be a value greater or equal 4096. Defaults to 4096. + Spinlocks int64 `json:"spinlocks,omitempty"` +} + +// Validate validates this v1 Vm feature spinlocks +func (m *V1VMFeatureSpinlocks) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1VMFeatureSpinlocks) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1VMFeatureSpinlocks) UnmarshalBinary(b []byte) error { + var res V1VMFeatureSpinlocks + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_vm_feature_state.go b/api/models/v1_vm_feature_state.go new file mode 100644 index 00000000..80164965 --- /dev/null +++ b/api/models/v1_vm_feature_state.go @@ -0,0 +1,43 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1VMFeatureState Represents if a feature is enabled or disabled. +// +// swagger:model v1VmFeatureState +type V1VMFeatureState struct { + + // Enabled determines if the feature should be enabled or disabled on the guest. Defaults to true. + Enabled bool `json:"enabled,omitempty"` +} + +// Validate validates this v1 Vm feature state +func (m *V1VMFeatureState) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1VMFeatureState) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1VMFeatureState) UnmarshalBinary(b []byte) error { + var res V1VMFeatureState + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_vm_feature_vendor_id.go b/api/models/v1_vm_feature_vendor_id.go new file mode 100644 index 00000000..d14bcd10 --- /dev/null +++ b/api/models/v1_vm_feature_vendor_id.go @@ -0,0 +1,46 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1VMFeatureVendorID v1 Vm feature vendor Id +// +// swagger:model v1VmFeatureVendorId +type V1VMFeatureVendorID struct { + + // Enabled determines if the feature should be enabled or disabled on the guest. Defaults to true. + Enabled bool `json:"enabled,omitempty"` + + // VendorID sets the hypervisor vendor id, visible to the vmi. String up to twelve characters. + Vendorid string `json:"vendorid,omitempty"` +} + +// Validate validates this v1 Vm feature vendor Id +func (m *V1VMFeatureVendorID) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1VMFeatureVendorID) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1VMFeatureVendorID) UnmarshalBinary(b []byte) error { + var res V1VMFeatureVendorID + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_vm_features.go b/api/models/v1_vm_features.go new file mode 100644 index 00000000..26ac8a53 --- /dev/null +++ b/api/models/v1_vm_features.go @@ -0,0 +1,196 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1VMFeatures v1 Vm features +// +// swagger:model v1VmFeatures +type V1VMFeatures struct { + + // acpi + Acpi *V1VMFeatureState `json:"acpi,omitempty"` + + // apic + Apic *V1VMFeatureAPIC `json:"apic,omitempty"` + + // hyperv + Hyperv *V1VMFeatureHyperv `json:"hyperv,omitempty"` + + // kvm + Kvm *V1VMFeatureKVM `json:"kvm,omitempty"` + + // pvspinlock + Pvspinlock *V1VMFeatureState `json:"pvspinlock,omitempty"` + + // smm + Smm *V1VMFeatureState `json:"smm,omitempty"` +} + +// Validate validates this v1 Vm features +func (m *V1VMFeatures) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateAcpi(formats); err != nil { + res = append(res, err) + } + + if err := m.validateApic(formats); err != nil { + res = append(res, err) + } + + if err := m.validateHyperv(formats); err != nil { + res = append(res, err) + } + + if err := m.validateKvm(formats); err != nil { + res = append(res, err) + } + + if err := m.validatePvspinlock(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSmm(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1VMFeatures) validateAcpi(formats strfmt.Registry) error { + + if swag.IsZero(m.Acpi) { // not required + return nil + } + + if m.Acpi != nil { + if err := m.Acpi.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("acpi") + } + return err + } + } + + return nil +} + +func (m *V1VMFeatures) validateApic(formats strfmt.Registry) error { + + if swag.IsZero(m.Apic) { // not required + return nil + } + + if m.Apic != nil { + if err := m.Apic.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("apic") + } + return err + } + } + + return nil +} + +func (m *V1VMFeatures) validateHyperv(formats strfmt.Registry) error { + + if swag.IsZero(m.Hyperv) { // not required + return nil + } + + if m.Hyperv != nil { + if err := m.Hyperv.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("hyperv") + } + return err + } + } + + return nil +} + +func (m *V1VMFeatures) validateKvm(formats strfmt.Registry) error { + + if swag.IsZero(m.Kvm) { // not required + return nil + } + + if m.Kvm != nil { + if err := m.Kvm.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("kvm") + } + return err + } + } + + return nil +} + +func (m *V1VMFeatures) validatePvspinlock(formats strfmt.Registry) error { + + if swag.IsZero(m.Pvspinlock) { // not required + return nil + } + + if m.Pvspinlock != nil { + if err := m.Pvspinlock.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("pvspinlock") + } + return err + } + } + + return nil +} + +func (m *V1VMFeatures) validateSmm(formats strfmt.Registry) error { + + if swag.IsZero(m.Smm) { // not required + return nil + } + + if m.Smm != nil { + if err := m.Smm.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("smm") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1VMFeatures) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1VMFeatures) UnmarshalBinary(b []byte) error { + var res V1VMFeatures + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_vm_fields_v1.go b/api/models/v1_vm_fields_v1.go new file mode 100644 index 00000000..60ed3069 --- /dev/null +++ b/api/models/v1_vm_fields_v1.go @@ -0,0 +1,47 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1VMFieldsV1 FieldsV1 stores a set of fields in a data structure like a Trie, in JSON format. +// +// Each key is either a '.' representing the field itself, and will always map to an empty set, or a string representing a sub-field or item. The string will follow one of these four formats: 'f:', where is the name of a field in a struct, or key in a map 'v:', where is the exact json formatted value of a list item 'i:\', where \ is position of a item in a list 'k:', where is a map of a list item's key fields to their unique values If a key maps to an empty Fields value, the field that key represents is part of the set. +// +// The exact format is defined in sigs.k8s.io/structured-merge-diff +// +// swagger:model v1VmFieldsV1 +type V1VMFieldsV1 struct { + + // raw + Raw []strfmt.Base64 `json:"Raw"` +} + +// Validate validates this v1 Vm fields v1 +func (m *V1VMFieldsV1) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1VMFieldsV1) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1VMFieldsV1) UnmarshalBinary(b []byte) error { + var res V1VMFieldsV1 + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_vm_filesystem.go b/api/models/v1_vm_filesystem.go new file mode 100644 index 00000000..a47d3e10 --- /dev/null +++ b/api/models/v1_vm_filesystem.go @@ -0,0 +1,81 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1VMFilesystem v1 Vm filesystem +// +// swagger:model v1VmFilesystem +type V1VMFilesystem struct { + + // Name is the device name + // Required: true + Name *string `json:"name"` + + // virtiofs + // Required: true + Virtiofs V1VMFilesystemVirtiofs `json:"virtiofs"` +} + +// Validate validates this v1 Vm filesystem +func (m *V1VMFilesystem) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateName(formats); err != nil { + res = append(res, err) + } + + if err := m.validateVirtiofs(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1VMFilesystem) validateName(formats strfmt.Registry) error { + + if err := validate.Required("name", "body", m.Name); err != nil { + return err + } + + return nil +} + +func (m *V1VMFilesystem) validateVirtiofs(formats strfmt.Registry) error { + + if err := validate.Required("virtiofs", "body", m.Virtiofs); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1VMFilesystem) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1VMFilesystem) UnmarshalBinary(b []byte) error { + var res V1VMFilesystem + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_vm_filesystem_virtiofs.go b/api/models/v1_vm_filesystem_virtiofs.go new file mode 100644 index 00000000..816560d8 --- /dev/null +++ b/api/models/v1_vm_filesystem_virtiofs.go @@ -0,0 +1,11 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +// V1VMFilesystemVirtiofs v1 Vm filesystem virtiofs +// +// swagger:model v1VmFilesystemVirtiofs +type V1VMFilesystemVirtiofs interface{} diff --git a/api/models/v1_vm_firmware.go b/api/models/v1_vm_firmware.go new file mode 100644 index 00000000..c89d1b96 --- /dev/null +++ b/api/models/v1_vm_firmware.go @@ -0,0 +1,102 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1VMFirmware v1 Vm firmware +// +// swagger:model v1VmFirmware +type V1VMFirmware struct { + + // bootloader + Bootloader *V1VMBootloader `json:"bootloader,omitempty"` + + // kernel boot + KernelBoot *V1VMKernelBoot `json:"kernelBoot,omitempty"` + + // The system-serial-number in SMBIOS + Serial string `json:"serial,omitempty"` + + // UUID reported by the vmi bios. Defaults to a random generated uid. + UUID string `json:"uuid,omitempty"` +} + +// Validate validates this v1 Vm firmware +func (m *V1VMFirmware) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateBootloader(formats); err != nil { + res = append(res, err) + } + + if err := m.validateKernelBoot(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1VMFirmware) validateBootloader(formats strfmt.Registry) error { + + if swag.IsZero(m.Bootloader) { // not required + return nil + } + + if m.Bootloader != nil { + if err := m.Bootloader.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("bootloader") + } + return err + } + } + + return nil +} + +func (m *V1VMFirmware) validateKernelBoot(formats strfmt.Registry) error { + + if swag.IsZero(m.KernelBoot) { // not required + return nil + } + + if m.KernelBoot != nil { + if err := m.KernelBoot.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("kernelBoot") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1VMFirmware) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1VMFirmware) UnmarshalBinary(b []byte) error { + var res V1VMFirmware + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_vm_g_p_u.go b/api/models/v1_vm_g_p_u.go new file mode 100644 index 00000000..f1bc7f61 --- /dev/null +++ b/api/models/v1_vm_g_p_u.go @@ -0,0 +1,109 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1VMGPU v1 Vm g p u +// +// swagger:model v1VmGPU +type V1VMGPU struct { + + // device name + // Required: true + DeviceName *string `json:"deviceName"` + + // Name of the GPU device as exposed by a device plugin + // Required: true + Name *string `json:"name"` + + // If specified, the virtual network interface address and its tag will be provided to the guest via config drive + Tag string `json:"tag,omitempty"` + + // virtual g p u options + VirtualGPUOptions *V1VMVGPUOptions `json:"virtualGPUOptions,omitempty"` +} + +// Validate validates this v1 Vm g p u +func (m *V1VMGPU) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateDeviceName(formats); err != nil { + res = append(res, err) + } + + if err := m.validateName(formats); err != nil { + res = append(res, err) + } + + if err := m.validateVirtualGPUOptions(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1VMGPU) validateDeviceName(formats strfmt.Registry) error { + + if err := validate.Required("deviceName", "body", m.DeviceName); err != nil { + return err + } + + return nil +} + +func (m *V1VMGPU) validateName(formats strfmt.Registry) error { + + if err := validate.Required("name", "body", m.Name); err != nil { + return err + } + + return nil +} + +func (m *V1VMGPU) validateVirtualGPUOptions(formats strfmt.Registry) error { + + if swag.IsZero(m.VirtualGPUOptions) { // not required + return nil + } + + if m.VirtualGPUOptions != nil { + if err := m.VirtualGPUOptions.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("virtualGPUOptions") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1VMGPU) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1VMGPU) UnmarshalBinary(b []byte) error { + var res V1VMGPU + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_vm_guest_agent_ping.go b/api/models/v1_vm_guest_agent_ping.go new file mode 100644 index 00000000..1743afba --- /dev/null +++ b/api/models/v1_vm_guest_agent_ping.go @@ -0,0 +1,11 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +// V1VMGuestAgentPing GuestAgentPing configures the guest-agent based ping probe +// +// swagger:model v1VmGuestAgentPing +type V1VMGuestAgentPing interface{} diff --git a/api/models/v1_vm_h_p_e_t_timer.go b/api/models/v1_vm_h_p_e_t_timer.go new file mode 100644 index 00000000..d2bdc6e7 --- /dev/null +++ b/api/models/v1_vm_h_p_e_t_timer.go @@ -0,0 +1,46 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1VMHPETTimer v1 Vm h p e t timer +// +// swagger:model v1VmHPETTimer +type V1VMHPETTimer struct { + + // Enabled set to false makes sure that the machine type or a preset can't add the timer. Defaults to true. + Present bool `json:"present,omitempty"` + + // TickPolicy determines what happens when QEMU misses a deadline for injecting a tick to the guest. One of "delay", "catchup", "merge", "discard". + TickPolicy string `json:"tickPolicy,omitempty"` +} + +// Validate validates this v1 Vm h p e t timer +func (m *V1VMHPETTimer) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1VMHPETTimer) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1VMHPETTimer) UnmarshalBinary(b []byte) error { + var res V1VMHPETTimer + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_vm_host_device.go b/api/models/v1_vm_host_device.go new file mode 100644 index 00000000..d35ae67b --- /dev/null +++ b/api/models/v1_vm_host_device.go @@ -0,0 +1,84 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1VMHostDevice v1 Vm host device +// +// swagger:model v1VmHostDevice +type V1VMHostDevice struct { + + // DeviceName is the resource name of the host device exposed by a device plugin + // Required: true + DeviceName *string `json:"deviceName"` + + // name + // Required: true + Name *string `json:"name"` + + // If specified, the virtual network interface address and its tag will be provided to the guest via config drive + Tag string `json:"tag,omitempty"` +} + +// Validate validates this v1 Vm host device +func (m *V1VMHostDevice) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateDeviceName(formats); err != nil { + res = append(res, err) + } + + if err := m.validateName(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1VMHostDevice) validateDeviceName(formats strfmt.Registry) error { + + if err := validate.Required("deviceName", "body", m.DeviceName); err != nil { + return err + } + + return nil +} + +func (m *V1VMHostDevice) validateName(formats strfmt.Registry) error { + + if err := validate.Required("name", "body", m.Name); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1VMHostDevice) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1VMHostDevice) UnmarshalBinary(b []byte) error { + var res V1VMHostDevice + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_vm_host_disk.go b/api/models/v1_vm_host_disk.go new file mode 100644 index 00000000..4445cecc --- /dev/null +++ b/api/models/v1_vm_host_disk.go @@ -0,0 +1,107 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1VMHostDisk Represents a disk created on the cluster level +// +// swagger:model v1VmHostDisk +type V1VMHostDisk struct { + + // capacity + Capacity V1VMQuantity `json:"capacity,omitempty"` + + // The path to HostDisk image located on the cluster + // Required: true + Path *string `json:"path"` + + // Shared indicate whether the path is shared between nodes + Shared bool `json:"shared,omitempty"` + + // Contains information if disk.img exists or should be created allowed options are 'Disk' and 'DiskOrCreate' + // Required: true + Type *string `json:"type"` +} + +// Validate validates this v1 Vm host disk +func (m *V1VMHostDisk) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateCapacity(formats); err != nil { + res = append(res, err) + } + + if err := m.validatePath(formats); err != nil { + res = append(res, err) + } + + if err := m.validateType(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1VMHostDisk) validateCapacity(formats strfmt.Registry) error { + + if swag.IsZero(m.Capacity) { // not required + return nil + } + + if err := m.Capacity.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("capacity") + } + return err + } + + return nil +} + +func (m *V1VMHostDisk) validatePath(formats strfmt.Registry) error { + + if err := validate.Required("path", "body", m.Path); err != nil { + return err + } + + return nil +} + +func (m *V1VMHostDisk) validateType(formats strfmt.Registry) error { + + if err := validate.Required("type", "body", m.Type); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1VMHostDisk) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1VMHostDisk) UnmarshalBinary(b []byte) error { + var res V1VMHostDisk + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_vm_hotplug_volume_source.go b/api/models/v1_vm_hotplug_volume_source.go new file mode 100644 index 00000000..9d510c5c --- /dev/null +++ b/api/models/v1_vm_hotplug_volume_source.go @@ -0,0 +1,96 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1VMHotplugVolumeSource HotplugVolumeSource Represents the source of a volume to mount which are capable of being hotplugged on a live running VMI. Only one of its members may be specified. +// +// swagger:model v1VmHotplugVolumeSource +type V1VMHotplugVolumeSource struct { + + // data volume + DataVolume *V1VMCoreDataVolumeSource `json:"dataVolume,omitempty"` + + // persistent volume claim + PersistentVolumeClaim *V1VMPersistentVolumeClaimVolumeSource `json:"persistentVolumeClaim,omitempty"` +} + +// Validate validates this v1 Vm hotplug volume source +func (m *V1VMHotplugVolumeSource) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateDataVolume(formats); err != nil { + res = append(res, err) + } + + if err := m.validatePersistentVolumeClaim(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1VMHotplugVolumeSource) validateDataVolume(formats strfmt.Registry) error { + + if swag.IsZero(m.DataVolume) { // not required + return nil + } + + if m.DataVolume != nil { + if err := m.DataVolume.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("dataVolume") + } + return err + } + } + + return nil +} + +func (m *V1VMHotplugVolumeSource) validatePersistentVolumeClaim(formats strfmt.Registry) error { + + if swag.IsZero(m.PersistentVolumeClaim) { // not required + return nil + } + + if m.PersistentVolumeClaim != nil { + if err := m.PersistentVolumeClaim.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("persistentVolumeClaim") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1VMHotplugVolumeSource) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1VMHotplugVolumeSource) UnmarshalBinary(b []byte) error { + var res V1VMHotplugVolumeSource + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_vm_http_get_action.go b/api/models/v1_vm_http_get_action.go new file mode 100644 index 00000000..3b6c34e0 --- /dev/null +++ b/api/models/v1_vm_http_get_action.go @@ -0,0 +1,107 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1VMHTTPGetAction HTTPGetAction describes an action based on HTTP Get requests. +// +// swagger:model v1VmHttpGetAction +type V1VMHTTPGetAction struct { + + // Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. + Host string `json:"host,omitempty"` + + // Custom headers to set in the request. HTTP allows repeated headers. + HTTPHeaders []*V1VMHTTPHeader `json:"httpHeaders"` + + // Path to access on the HTTP server. + Path string `json:"path,omitempty"` + + // Name or number of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. + // Required: true + Port *string `json:"port"` + + // Scheme to use for connecting to the host. Defaults to HTTP. + Scheme string `json:"scheme,omitempty"` +} + +// Validate validates this v1 Vm Http get action +func (m *V1VMHTTPGetAction) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateHTTPHeaders(formats); err != nil { + res = append(res, err) + } + + if err := m.validatePort(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1VMHTTPGetAction) validateHTTPHeaders(formats strfmt.Registry) error { + + if swag.IsZero(m.HTTPHeaders) { // not required + return nil + } + + for i := 0; i < len(m.HTTPHeaders); i++ { + if swag.IsZero(m.HTTPHeaders[i]) { // not required + continue + } + + if m.HTTPHeaders[i] != nil { + if err := m.HTTPHeaders[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("httpHeaders" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1VMHTTPGetAction) validatePort(formats strfmt.Registry) error { + + if err := validate.Required("port", "body", m.Port); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1VMHTTPGetAction) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1VMHTTPGetAction) UnmarshalBinary(b []byte) error { + var res V1VMHTTPGetAction + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_vm_http_header.go b/api/models/v1_vm_http_header.go new file mode 100644 index 00000000..b611967e --- /dev/null +++ b/api/models/v1_vm_http_header.go @@ -0,0 +1,81 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1VMHTTPHeader HTTPHeader describes a custom header to be used in HTTP probes +// +// swagger:model v1VmHttpHeader +type V1VMHTTPHeader struct { + + // The header field name + // Required: true + Name *string `json:"name"` + + // The header field value + // Required: true + Value *string `json:"value"` +} + +// Validate validates this v1 Vm Http header +func (m *V1VMHTTPHeader) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateName(formats); err != nil { + res = append(res, err) + } + + if err := m.validateValue(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1VMHTTPHeader) validateName(formats strfmt.Registry) error { + + if err := validate.Required("name", "body", m.Name); err != nil { + return err + } + + return nil +} + +func (m *V1VMHTTPHeader) validateValue(formats strfmt.Registry) error { + + if err := validate.Required("value", "body", m.Value); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1VMHTTPHeader) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1VMHTTPHeader) UnmarshalBinary(b []byte) error { + var res V1VMHTTPHeader + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_vm_hugepages.go b/api/models/v1_vm_hugepages.go new file mode 100644 index 00000000..af8a1965 --- /dev/null +++ b/api/models/v1_vm_hugepages.go @@ -0,0 +1,43 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1VMHugepages Hugepages allow to use hugepages for the VirtualMachineInstance instead of regular memory. +// +// swagger:model v1VmHugepages +type V1VMHugepages struct { + + // PageSize specifies the hugepage size, for x86_64 architecture valid values are 1Gi and 2Mi. + PageSize string `json:"pageSize,omitempty"` +} + +// Validate validates this v1 Vm hugepages +func (m *V1VMHugepages) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1VMHugepages) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1VMHugepages) UnmarshalBinary(b []byte) error { + var res V1VMHugepages + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_vm_hyperv_timer.go b/api/models/v1_vm_hyperv_timer.go new file mode 100644 index 00000000..8418d4fc --- /dev/null +++ b/api/models/v1_vm_hyperv_timer.go @@ -0,0 +1,43 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1VMHypervTimer v1 Vm hyperv timer +// +// swagger:model v1VmHypervTimer +type V1VMHypervTimer struct { + + // Enabled set to false makes sure that the machine type or a preset can't add the timer. Defaults to true. + Present bool `json:"present,omitempty"` +} + +// Validate validates this v1 Vm hyperv timer +func (m *V1VMHypervTimer) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1VMHypervTimer) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1VMHypervTimer) UnmarshalBinary(b []byte) error { + var res V1VMHypervTimer + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_vm_i6300_e_s_b_watchdog.go b/api/models/v1_vm_i6300_e_s_b_watchdog.go new file mode 100644 index 00000000..cb9dd23d --- /dev/null +++ b/api/models/v1_vm_i6300_e_s_b_watchdog.go @@ -0,0 +1,43 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1VMI6300ESBWatchdog i6300esb watchdog device. +// +// swagger:model v1VmI6300ESBWatchdog +type V1VMI6300ESBWatchdog struct { + + // The action to take. Valid values are poweroff, reset, shutdown. Defaults to reset. + Action string `json:"action,omitempty"` +} + +// Validate validates this v1 Vm i6300 e s b watchdog +func (m *V1VMI6300ESBWatchdog) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1VMI6300ESBWatchdog) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1VMI6300ESBWatchdog) UnmarshalBinary(b []byte) error { + var res V1VMI6300ESBWatchdog + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_vm_input.go b/api/models/v1_vm_input.go new file mode 100644 index 00000000..faaf112a --- /dev/null +++ b/api/models/v1_vm_input.go @@ -0,0 +1,84 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1VMInput v1 Vm input +// +// swagger:model v1VmInput +type V1VMInput struct { + + // Bus indicates the bus of input device to emulate. Supported values: virtio, usb. + Bus string `json:"bus,omitempty"` + + // Name is the device name + // Required: true + Name *string `json:"name"` + + // Type indicated the type of input device. Supported values: tablet. + // Required: true + Type *string `json:"type"` +} + +// Validate validates this v1 Vm input +func (m *V1VMInput) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateName(formats); err != nil { + res = append(res, err) + } + + if err := m.validateType(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1VMInput) validateName(formats strfmt.Registry) error { + + if err := validate.Required("name", "body", m.Name); err != nil { + return err + } + + return nil +} + +func (m *V1VMInput) validateType(formats strfmt.Registry) error { + + if err := validate.Required("type", "body", m.Type); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1VMInput) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1VMInput) UnmarshalBinary(b []byte) error { + var res V1VMInput + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_vm_instancetype_matcher.go b/api/models/v1_vm_instancetype_matcher.go new file mode 100644 index 00000000..9ba78728 --- /dev/null +++ b/api/models/v1_vm_instancetype_matcher.go @@ -0,0 +1,52 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1VMInstancetypeMatcher InstancetypeMatcher references a instancetype that is used to fill fields in the VMI template. +// +// swagger:model v1VmInstancetypeMatcher +type V1VMInstancetypeMatcher struct { + + // InferFromVolume lists the name of a volume that should be used to infer or discover the instancetype to be used through known annotations on the underlying resource. Once applied to the InstancetypeMatcher this field is removed. + InferFromVolume string `json:"inferFromVolume,omitempty"` + + // Kind specifies which instancetype resource is referenced. Allowed values are: "VirtualMachineInstancetype" and "VirtualMachineClusterInstancetype". If not specified, "VirtualMachineClusterInstancetype" is used by default. + Kind string `json:"kind,omitempty"` + + // Name is the name of the VirtualMachineInstancetype or VirtualMachineClusterInstancetype + Name string `json:"name,omitempty"` + + // RevisionName specifies a ControllerRevision containing a specific copy of the VirtualMachineInstancetype or VirtualMachineClusterInstancetype to be used. This is initially captured the first time the instancetype is applied to the VirtualMachineInstance. + RevisionName string `json:"revisionName,omitempty"` +} + +// Validate validates this v1 Vm instancetype matcher +func (m *V1VMInstancetypeMatcher) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1VMInstancetypeMatcher) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1VMInstancetypeMatcher) UnmarshalBinary(b []byte) error { + var res V1VMInstancetypeMatcher + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_vm_interface.go b/api/models/v1_vm_interface.go new file mode 100644 index 00000000..5ee119e7 --- /dev/null +++ b/api/models/v1_vm_interface.go @@ -0,0 +1,159 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1VMInterface v1 Vm interface +// +// swagger:model v1VmInterface +type V1VMInterface struct { + + // If specified, the ACPI index is used to provide network interface device naming, that is stable across changes in PCI addresses assigned to the device. This value is required to be unique across all devices and be between 1 and (16*1024-1). + AcpiIndex int32 `json:"acpiIndex,omitempty"` + + // BootOrder is an integer value > 0, used to determine ordering of boot devices. Lower values take precedence. Each interface or disk that has a boot order must have a unique value. Interfaces without a boot order are not tried. + BootOrder int32 `json:"bootOrder,omitempty"` + + // bridge + Bridge V1VMInterfaceBridge `json:"bridge,omitempty"` + + // dhcp options + DhcpOptions *V1VMDHCPOptions `json:"dhcpOptions,omitempty"` + + // Interface MAC address. For example: de:ad:00:00:be:af or DE-AD-00-00-BE-AF. + MacAddress string `json:"macAddress,omitempty"` + + // macvtap + Macvtap V1VMInterfaceMacvtap `json:"macvtap,omitempty"` + + // masquerade + Masquerade V1VMInterfaceMasquerade `json:"masquerade,omitempty"` + + // Interface model. One of: e1000, e1000e, ne2k_pci, pcnet, rtl8139, virtio. Defaults to virtio. + Model string `json:"model,omitempty"` + + // Logical name of the interface as well as a reference to the associated networks. Must match the Name of a Network. + // Required: true + Name *string `json:"name"` + + // passt + Passt V1VMInterfacePasst `json:"passt,omitempty"` + + // If specified, the virtual network interface will be placed on the guests pci address with the specified PCI address. For example: 0000:81:01.10 + PciAddress string `json:"pciAddress,omitempty"` + + // List of ports to be forwarded to the virtual machine. + Ports []*V1VMPort `json:"ports"` + + // slirp + Slirp V1VMInterfaceSlirp `json:"slirp,omitempty"` + + // sriov + Sriov V1VMInterfaceSRIOV `json:"sriov,omitempty"` + + // If specified, the virtual network interface address and its tag will be provided to the guest via config drive + Tag string `json:"tag,omitempty"` +} + +// Validate validates this v1 Vm interface +func (m *V1VMInterface) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateDhcpOptions(formats); err != nil { + res = append(res, err) + } + + if err := m.validateName(formats); err != nil { + res = append(res, err) + } + + if err := m.validatePorts(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1VMInterface) validateDhcpOptions(formats strfmt.Registry) error { + + if swag.IsZero(m.DhcpOptions) { // not required + return nil + } + + if m.DhcpOptions != nil { + if err := m.DhcpOptions.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("dhcpOptions") + } + return err + } + } + + return nil +} + +func (m *V1VMInterface) validateName(formats strfmt.Registry) error { + + if err := validate.Required("name", "body", m.Name); err != nil { + return err + } + + return nil +} + +func (m *V1VMInterface) validatePorts(formats strfmt.Registry) error { + + if swag.IsZero(m.Ports) { // not required + return nil + } + + for i := 0; i < len(m.Ports); i++ { + if swag.IsZero(m.Ports[i]) { // not required + continue + } + + if m.Ports[i] != nil { + if err := m.Ports[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("ports" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1VMInterface) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1VMInterface) UnmarshalBinary(b []byte) error { + var res V1VMInterface + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_vm_interface_bridge.go b/api/models/v1_vm_interface_bridge.go new file mode 100644 index 00000000..1e66757c --- /dev/null +++ b/api/models/v1_vm_interface_bridge.go @@ -0,0 +1,11 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +// V1VMInterfaceBridge InterfaceBridge connects to a given network via a linux bridge. +// +// swagger:model v1VmInterfaceBridge +type V1VMInterfaceBridge interface{} diff --git a/api/models/v1_vm_interface_macvtap.go b/api/models/v1_vm_interface_macvtap.go new file mode 100644 index 00000000..fd779c62 --- /dev/null +++ b/api/models/v1_vm_interface_macvtap.go @@ -0,0 +1,11 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +// V1VMInterfaceMacvtap InterfaceMacvtap connects to a given network by extending the Kubernetes node's L2 networks via a macvtap interface. +// +// swagger:model v1VmInterfaceMacvtap +type V1VMInterfaceMacvtap interface{} diff --git a/api/models/v1_vm_interface_masquerade.go b/api/models/v1_vm_interface_masquerade.go new file mode 100644 index 00000000..f53ce295 --- /dev/null +++ b/api/models/v1_vm_interface_masquerade.go @@ -0,0 +1,11 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +// V1VMInterfaceMasquerade InterfaceMasquerade connects to a given network using netfilter rules to nat the traffic. +// +// swagger:model v1VmInterfaceMasquerade +type V1VMInterfaceMasquerade interface{} diff --git a/api/models/v1_vm_interface_passt.go b/api/models/v1_vm_interface_passt.go new file mode 100644 index 00000000..4a1b02a9 --- /dev/null +++ b/api/models/v1_vm_interface_passt.go @@ -0,0 +1,11 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +// V1VMInterfacePasst InterfacePasst connects to a given network. +// +// swagger:model v1VmInterfacePasst +type V1VMInterfacePasst interface{} diff --git a/api/models/v1_vm_interface_s_r_i_o_v.go b/api/models/v1_vm_interface_s_r_i_o_v.go new file mode 100644 index 00000000..5bbdb928 --- /dev/null +++ b/api/models/v1_vm_interface_s_r_i_o_v.go @@ -0,0 +1,11 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +// V1VMInterfaceSRIOV InterfaceSRIOV connects to a given network by passing-through an SR-IOV PCI device via vfio. +// +// swagger:model v1VmInterfaceSRIOV +type V1VMInterfaceSRIOV interface{} diff --git a/api/models/v1_vm_interface_slirp.go b/api/models/v1_vm_interface_slirp.go new file mode 100644 index 00000000..9f50a044 --- /dev/null +++ b/api/models/v1_vm_interface_slirp.go @@ -0,0 +1,11 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +// V1VMInterfaceSlirp InterfaceSlirp connects to a given network using QEMU user networking mode. +// +// swagger:model v1VmInterfaceSlirp +type V1VMInterfaceSlirp interface{} diff --git a/api/models/v1_vm_k_vm_timer.go b/api/models/v1_vm_k_vm_timer.go new file mode 100644 index 00000000..233fbb94 --- /dev/null +++ b/api/models/v1_vm_k_vm_timer.go @@ -0,0 +1,43 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1VMKVMTimer v1 Vm k Vm timer +// +// swagger:model v1VmKVmTimer +type V1VMKVMTimer struct { + + // Enabled set to false makes sure that the machine type or a preset can't add the timer. Defaults to true. + Present bool `json:"present,omitempty"` +} + +// Validate validates this v1 Vm k Vm timer +func (m *V1VMKVMTimer) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1VMKVMTimer) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1VMKVMTimer) UnmarshalBinary(b []byte) error { + var res V1VMKVMTimer + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_vm_kernel_boot.go b/api/models/v1_vm_kernel_boot.go new file mode 100644 index 00000000..fcb4d7d8 --- /dev/null +++ b/api/models/v1_vm_kernel_boot.go @@ -0,0 +1,74 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1VMKernelBoot Represents the firmware blob used to assist in the kernel boot process. Used for setting the kernel, initrd and command line arguments +// +// swagger:model v1VmKernelBoot +type V1VMKernelBoot struct { + + // container + Container *V1VMKernelBootContainer `json:"container,omitempty"` + + // Arguments to be passed to the kernel at boot time + KernelArgs string `json:"kernelArgs,omitempty"` +} + +// Validate validates this v1 Vm kernel boot +func (m *V1VMKernelBoot) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateContainer(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1VMKernelBoot) validateContainer(formats strfmt.Registry) error { + + if swag.IsZero(m.Container) { // not required + return nil + } + + if m.Container != nil { + if err := m.Container.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("container") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1VMKernelBoot) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1VMKernelBoot) UnmarshalBinary(b []byte) error { + var res V1VMKernelBoot + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_vm_kernel_boot_container.go b/api/models/v1_vm_kernel_boot_container.go new file mode 100644 index 00000000..8648d06b --- /dev/null +++ b/api/models/v1_vm_kernel_boot_container.go @@ -0,0 +1,76 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1VMKernelBootContainer If set, the VM will be booted from the defined kernel / initrd. +// +// swagger:model v1VmKernelBootContainer +type V1VMKernelBootContainer struct { + + // Image that contains initrd / kernel files. + // Required: true + Image *string `json:"image"` + + // Image pull policy. One of Always, Never, IfNotPresent. Defaults to Always if :latest tag is specified, or IfNotPresent otherwise. Cannot be updated. More info: https://kubernetes.io/docs/concepts/containers/images#updating-images + ImagePullPolicy string `json:"imagePullPolicy,omitempty"` + + // ImagePullSecret is the name of the Docker registry secret required to pull the image. The secret must already exist. + ImagePullSecret string `json:"imagePullSecret,omitempty"` + + // the fully-qualified path to the ramdisk image in the host OS + InitrdPath string `json:"initrdPath,omitempty"` + + // The fully-qualified path to the kernel image in the host OS + KernelPath string `json:"kernelPath,omitempty"` +} + +// Validate validates this v1 Vm kernel boot container +func (m *V1VMKernelBootContainer) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateImage(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1VMKernelBootContainer) validateImage(formats strfmt.Registry) error { + + if err := validate.Required("image", "body", m.Image); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1VMKernelBootContainer) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1VMKernelBootContainer) UnmarshalBinary(b []byte) error { + var res V1VMKernelBootContainer + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_vm_label_selector.go b/api/models/v1_vm_label_selector.go new file mode 100644 index 00000000..18fe5493 --- /dev/null +++ b/api/models/v1_vm_label_selector.go @@ -0,0 +1,83 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1VMLabelSelector A label selector is a label query over a set of resources. The result of matchLabels and matchExpressions are ANDed. An empty label selector matches all objects. A null label selector matches no objects. +// +// swagger:model v1VmLabelSelector +type V1VMLabelSelector struct { + + // matchExpressions is a list of label selector requirements. The requirements are ANDed. + MatchExpressions []*V1VMLabelSelectorRequirement `json:"matchExpressions"` + + // matchLabels is a map of key-value pairs. A single key-value in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. + MatchLabels map[string]string `json:"matchLabels,omitempty"` +} + +// Validate validates this v1 Vm label selector +func (m *V1VMLabelSelector) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMatchExpressions(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1VMLabelSelector) validateMatchExpressions(formats strfmt.Registry) error { + + if swag.IsZero(m.MatchExpressions) { // not required + return nil + } + + for i := 0; i < len(m.MatchExpressions); i++ { + if swag.IsZero(m.MatchExpressions[i]) { // not required + continue + } + + if m.MatchExpressions[i] != nil { + if err := m.MatchExpressions[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("matchExpressions" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1VMLabelSelector) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1VMLabelSelector) UnmarshalBinary(b []byte) error { + var res V1VMLabelSelector + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_vm_label_selector_requirement.go b/api/models/v1_vm_label_selector_requirement.go new file mode 100644 index 00000000..d52232e9 --- /dev/null +++ b/api/models/v1_vm_label_selector_requirement.go @@ -0,0 +1,84 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1VMLabelSelectorRequirement A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. +// +// swagger:model v1VmLabelSelectorRequirement +type V1VMLabelSelectorRequirement struct { + + // key is the label key that the selector applies to. + // Required: true + Key *string `json:"key"` + + // operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist. + // Required: true + Operator *string `json:"operator"` + + // values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch. + Values []string `json:"values"` +} + +// Validate validates this v1 Vm label selector requirement +func (m *V1VMLabelSelectorRequirement) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateKey(formats); err != nil { + res = append(res, err) + } + + if err := m.validateOperator(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1VMLabelSelectorRequirement) validateKey(formats strfmt.Registry) error { + + if err := validate.Required("key", "body", m.Key); err != nil { + return err + } + + return nil +} + +func (m *V1VMLabelSelectorRequirement) validateOperator(formats strfmt.Registry) error { + + if err := validate.Required("operator", "body", m.Operator); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1VMLabelSelectorRequirement) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1VMLabelSelectorRequirement) UnmarshalBinary(b []byte) error { + var res V1VMLabelSelectorRequirement + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_vm_launch_security.go b/api/models/v1_vm_launch_security.go new file mode 100644 index 00000000..ee9d82b8 --- /dev/null +++ b/api/models/v1_vm_launch_security.go @@ -0,0 +1,43 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1VMLaunchSecurity v1 Vm launch security +// +// swagger:model v1VmLaunchSecurity +type V1VMLaunchSecurity struct { + + // sev + Sev V1VMSEV `json:"sev,omitempty"` +} + +// Validate validates this v1 Vm launch security +func (m *V1VMLaunchSecurity) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1VMLaunchSecurity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1VMLaunchSecurity) UnmarshalBinary(b []byte) error { + var res V1VMLaunchSecurity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_vm_list_meta.go b/api/models/v1_vm_list_meta.go new file mode 100644 index 00000000..112edeac --- /dev/null +++ b/api/models/v1_vm_list_meta.go @@ -0,0 +1,54 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1VMListMeta ListMeta describes metadata that synthetic resources must have, including lists and various status objects. A resource may have only one of {ObjectMeta, ListMeta}. +// +// swagger:model v1VmListMeta +type V1VMListMeta struct { + + // continue may be set if the user set a limit on the number of items returned, and indicates that the server has more data available. The value is opaque and may be used to issue another request to the endpoint that served this list to retrieve the next set of available objects. Continuing a consistent list may not be possible if the server configuration has changed or more than a few minutes have passed. The resourceVersion field returned when using this continue value will be identical to the value in the first response, unless you have received this token from an error message. + Continue string `json:"continue,omitempty"` + + // remainingItemCount is the number of subsequent items in the list which are not included in this list response. If the list request contained label or field selectors, then the number of remaining items is unknown and the field will be left unset and omitted during serialization. If the list is complete (either because it is not chunking or because this is the last chunk), then there are no more remaining items and this field will be left unset and omitted during serialization. Servers older than v1.15 do not set this field. The intended use of the remainingItemCount is *estimating* the size of a collection. Clients should not rely on the remainingItemCount to be set or to be exact. + RemainingItemCount int64 `json:"remainingItemCount,omitempty"` + + // String that identifies the server's internal version of this object that can be used by clients to determine when objects have changed. Value must be treated as opaque by clients and passed unmodified back to the server. Populated by the system. Read-only. + ResourceVersion string `json:"resourceVersion,omitempty"` + + // selfLink is a URL representing this object. Populated by the system. Read-only. + // + // DEPRECATED Kubernetes will stop propagating this field in 1.20 release and the field is planned to be removed in 1.21 release. + SelfLink string `json:"selfLink,omitempty"` +} + +// Validate validates this v1 Vm list meta +func (m *V1VMListMeta) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1VMListMeta) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1VMListMeta) UnmarshalBinary(b []byte) error { + var res V1VMListMeta + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_vm_local_object_reference.go b/api/models/v1_vm_local_object_reference.go new file mode 100644 index 00000000..1d053aa7 --- /dev/null +++ b/api/models/v1_vm_local_object_reference.go @@ -0,0 +1,43 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1VMLocalObjectReference LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace. +// +// swagger:model v1VmLocalObjectReference +type V1VMLocalObjectReference struct { + + // Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + Name string `json:"name,omitempty"` +} + +// Validate validates this v1 Vm local object reference +func (m *V1VMLocalObjectReference) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1VMLocalObjectReference) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1VMLocalObjectReference) UnmarshalBinary(b []byte) error { + var res V1VMLocalObjectReference + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_vm_lun_target.go b/api/models/v1_vm_lun_target.go new file mode 100644 index 00000000..def445e0 --- /dev/null +++ b/api/models/v1_vm_lun_target.go @@ -0,0 +1,46 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1VMLunTarget v1 Vm lun target +// +// swagger:model v1VmLunTarget +type V1VMLunTarget struct { + + // Bus indicates the type of disk device to emulate. supported values: virtio, sata, scsi. + Bus string `json:"bus,omitempty"` + + // ReadOnly. Defaults to false. + Readonly bool `json:"readonly,omitempty"` +} + +// Validate validates this v1 Vm lun target +func (m *V1VMLunTarget) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1VMLunTarget) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1VMLunTarget) UnmarshalBinary(b []byte) error { + var res V1VMLunTarget + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_vm_machine.go b/api/models/v1_vm_machine.go new file mode 100644 index 00000000..8c04f16a --- /dev/null +++ b/api/models/v1_vm_machine.go @@ -0,0 +1,43 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1VMMachine v1 Vm machine +// +// swagger:model v1VmMachine +type V1VMMachine struct { + + // QEMU machine type is the actual chipset of the VirtualMachineInstance. + Type string `json:"type,omitempty"` +} + +// Validate validates this v1 Vm machine +func (m *V1VMMachine) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1VMMachine) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1VMMachine) UnmarshalBinary(b []byte) error { + var res V1VMMachine + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_vm_managed_fields_entry.go b/api/models/v1_vm_managed_fields_entry.go new file mode 100644 index 00000000..aaaf4b17 --- /dev/null +++ b/api/models/v1_vm_managed_fields_entry.go @@ -0,0 +1,110 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1VMManagedFieldsEntry ManagedFieldsEntry is a workflow-id, a FieldSet and the group version of the resource that the fieldset applies to. +// +// swagger:model v1VmManagedFieldsEntry +type V1VMManagedFieldsEntry struct { + + // APIVersion defines the version of this resource that this field set applies to. The format is "group/version" just like the top-level APIVersion field. It is necessary to track the version of a field set because it cannot be automatically converted. + APIVersion string `json:"apiVersion,omitempty"` + + // FieldsType is the discriminator for the different fields format and version. There is currently only one possible value: "FieldsV1" + FieldsType string `json:"fieldsType,omitempty"` + + // fields v1 + FieldsV1 *V1VMFieldsV1 `json:"fieldsV1,omitempty"` + + // Manager is an identifier of the workflow managing these fields. + Manager string `json:"manager,omitempty"` + + // Operation is the type of operation which lead to this ManagedFieldsEntry being created. The only valid values for this field are 'Apply' and 'Update'. + Operation string `json:"operation,omitempty"` + + // Subresource is the name of the subresource used to update that object, or empty string if the object was updated through the main resource. The value of this field is used to distinguish between managers, even if they share the same name. For example, a status update will be distinct from a regular update using the same manager name. Note that the APIVersion field is not related to the Subresource field and it always corresponds to the version of the main resource. + Subresource string `json:"subresource,omitempty"` + + // time + // Format: date-time + Time V1Time `json:"time,omitempty"` +} + +// Validate validates this v1 Vm managed fields entry +func (m *V1VMManagedFieldsEntry) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateFieldsV1(formats); err != nil { + res = append(res, err) + } + + if err := m.validateTime(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1VMManagedFieldsEntry) validateFieldsV1(formats strfmt.Registry) error { + + if swag.IsZero(m.FieldsV1) { // not required + return nil + } + + if m.FieldsV1 != nil { + if err := m.FieldsV1.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("fieldsV1") + } + return err + } + } + + return nil +} + +func (m *V1VMManagedFieldsEntry) validateTime(formats strfmt.Registry) error { + + if swag.IsZero(m.Time) { // not required + return nil + } + + if err := m.Time.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("time") + } + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1VMManagedFieldsEntry) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1VMManagedFieldsEntry) UnmarshalBinary(b []byte) error { + var res V1VMManagedFieldsEntry + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_vm_memory.go b/api/models/v1_vm_memory.go new file mode 100644 index 00000000..94dbb090 --- /dev/null +++ b/api/models/v1_vm_memory.go @@ -0,0 +1,94 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1VMMemory Memory allows specifying the VirtualMachineInstance memory features. +// +// swagger:model v1VmMemory +type V1VMMemory struct { + + // guest + Guest V1VMQuantity `json:"guest,omitempty"` + + // hugepages + Hugepages *V1VMHugepages `json:"hugepages,omitempty"` +} + +// Validate validates this v1 Vm memory +func (m *V1VMMemory) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateGuest(formats); err != nil { + res = append(res, err) + } + + if err := m.validateHugepages(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1VMMemory) validateGuest(formats strfmt.Registry) error { + + if swag.IsZero(m.Guest) { // not required + return nil + } + + if err := m.Guest.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("guest") + } + return err + } + + return nil +} + +func (m *V1VMMemory) validateHugepages(formats strfmt.Registry) error { + + if swag.IsZero(m.Hugepages) { // not required + return nil + } + + if m.Hugepages != nil { + if err := m.Hugepages.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("hugepages") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1VMMemory) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1VMMemory) UnmarshalBinary(b []byte) error { + var res V1VMMemory + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_vm_memory_dump_volume_source.go b/api/models/v1_vm_memory_dump_volume_source.go new file mode 100644 index 00000000..4648a363 --- /dev/null +++ b/api/models/v1_vm_memory_dump_volume_source.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1VMMemoryDumpVolumeSource v1 Vm memory dump volume source +// +// swagger:model v1VmMemoryDumpVolumeSource +type V1VMMemoryDumpVolumeSource struct { + + // ClaimName is the name of a PersistentVolumeClaim in the same namespace as the pod using this volume. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims + // Required: true + ClaimName *string `json:"claimName"` + + // Hotpluggable indicates whether the volume can be hotplugged and hotunplugged. + Hotpluggable bool `json:"hotpluggable,omitempty"` + + // Will force the ReadOnly setting in VolumeMounts. Default false. + ReadOnly bool `json:"readOnly,omitempty"` +} + +// Validate validates this v1 Vm memory dump volume source +func (m *V1VMMemoryDumpVolumeSource) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateClaimName(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1VMMemoryDumpVolumeSource) validateClaimName(formats strfmt.Registry) error { + + if err := validate.Required("claimName", "body", m.ClaimName); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1VMMemoryDumpVolumeSource) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1VMMemoryDumpVolumeSource) UnmarshalBinary(b []byte) error { + var res V1VMMemoryDumpVolumeSource + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_vm_multus_network.go b/api/models/v1_vm_multus_network.go new file mode 100644 index 00000000..db98cd6a --- /dev/null +++ b/api/models/v1_vm_multus_network.go @@ -0,0 +1,67 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1VMMultusNetwork Represents the multus cni network. +// +// swagger:model v1VmMultusNetwork +type V1VMMultusNetwork struct { + + // Select the default network and add it to the multus-cni.io/default-network annotation. + Default bool `json:"default,omitempty"` + + // References to a NetworkAttachmentDefinition CRD object. Format: , /. If namespace is not specified, VMI namespace is assumed. + // Required: true + NetworkName *string `json:"networkName"` +} + +// Validate validates this v1 Vm multus network +func (m *V1VMMultusNetwork) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateNetworkName(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1VMMultusNetwork) validateNetworkName(formats strfmt.Registry) error { + + if err := validate.Required("networkName", "body", m.NetworkName); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1VMMultusNetwork) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1VMMultusNetwork) UnmarshalBinary(b []byte) error { + var res V1VMMultusNetwork + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_vm_n_u_m_a.go b/api/models/v1_vm_n_u_m_a.go new file mode 100644 index 00000000..b003a333 --- /dev/null +++ b/api/models/v1_vm_n_u_m_a.go @@ -0,0 +1,43 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1VMNUMA v1 Vm n u m a +// +// swagger:model v1VmNUMA +type V1VMNUMA struct { + + // guest mapping passthrough + GuestMappingPassthrough V1VMNUMAGuestMappingPassthrough `json:"guestMappingPassthrough,omitempty"` +} + +// Validate validates this v1 Vm n u m a +func (m *V1VMNUMA) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1VMNUMA) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1VMNUMA) UnmarshalBinary(b []byte) error { + var res V1VMNUMA + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_vm_n_u_m_a_guest_mapping_passthrough.go b/api/models/v1_vm_n_u_m_a_guest_mapping_passthrough.go new file mode 100644 index 00000000..cc1bb212 --- /dev/null +++ b/api/models/v1_vm_n_u_m_a_guest_mapping_passthrough.go @@ -0,0 +1,11 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +// V1VMNUMAGuestMappingPassthrough NUMAGuestMappingPassthrough instructs kubevirt to model numa topology which is compatible with the CPU pinning on the guest. This will result in a subset of the node numa topology being passed through, ensuring that virtual numa nodes and their memory never cross boundaries coming from the node numa mapping. +// +// swagger:model v1VmNUMAGuestMappingPassthrough +type V1VMNUMAGuestMappingPassthrough interface{} diff --git a/api/models/v1_vm_network.go b/api/models/v1_vm_network.go new file mode 100644 index 00000000..55cd3056 --- /dev/null +++ b/api/models/v1_vm_network.go @@ -0,0 +1,114 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1VMNetwork Network represents a network type and a resource that should be connected to the vm. +// +// swagger:model v1VmNetwork +type V1VMNetwork struct { + + // multus + Multus *V1VMMultusNetwork `json:"multus,omitempty"` + + // Network name. Must be a DNS_LABEL and unique within the vm. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + // Required: true + Name *string `json:"name"` + + // pod + Pod *V1VMPodNetwork `json:"pod,omitempty"` +} + +// Validate validates this v1 Vm network +func (m *V1VMNetwork) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMultus(formats); err != nil { + res = append(res, err) + } + + if err := m.validateName(formats); err != nil { + res = append(res, err) + } + + if err := m.validatePod(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1VMNetwork) validateMultus(formats strfmt.Registry) error { + + if swag.IsZero(m.Multus) { // not required + return nil + } + + if m.Multus != nil { + if err := m.Multus.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("multus") + } + return err + } + } + + return nil +} + +func (m *V1VMNetwork) validateName(formats strfmt.Registry) error { + + if err := validate.Required("name", "body", m.Name); err != nil { + return err + } + + return nil +} + +func (m *V1VMNetwork) validatePod(formats strfmt.Registry) error { + + if swag.IsZero(m.Pod) { // not required + return nil + } + + if m.Pod != nil { + if err := m.Pod.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("pod") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1VMNetwork) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1VMNetwork) UnmarshalBinary(b []byte) error { + var res V1VMNetwork + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_vm_node_affinity.go b/api/models/v1_vm_node_affinity.go new file mode 100644 index 00000000..38c707fe --- /dev/null +++ b/api/models/v1_vm_node_affinity.go @@ -0,0 +1,105 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1VMNodeAffinity Node affinity is a group of node affinity scheduling rules. +// +// swagger:model v1VmNodeAffinity +type V1VMNodeAffinity struct { + + // The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node matches the corresponding matchExpressions; the node(s) with the highest sum are the most preferred. + PreferredDuringSchedulingIgnoredDuringExecution []*V1VMPreferredSchedulingTerm `json:"preferredDuringSchedulingIgnoredDuringExecution"` + + // required during scheduling ignored during execution + RequiredDuringSchedulingIgnoredDuringExecution *V1VMNodeSelector `json:"requiredDuringSchedulingIgnoredDuringExecution,omitempty"` +} + +// Validate validates this v1 Vm node affinity +func (m *V1VMNodeAffinity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validatePreferredDuringSchedulingIgnoredDuringExecution(formats); err != nil { + res = append(res, err) + } + + if err := m.validateRequiredDuringSchedulingIgnoredDuringExecution(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1VMNodeAffinity) validatePreferredDuringSchedulingIgnoredDuringExecution(formats strfmt.Registry) error { + + if swag.IsZero(m.PreferredDuringSchedulingIgnoredDuringExecution) { // not required + return nil + } + + for i := 0; i < len(m.PreferredDuringSchedulingIgnoredDuringExecution); i++ { + if swag.IsZero(m.PreferredDuringSchedulingIgnoredDuringExecution[i]) { // not required + continue + } + + if m.PreferredDuringSchedulingIgnoredDuringExecution[i] != nil { + if err := m.PreferredDuringSchedulingIgnoredDuringExecution[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("preferredDuringSchedulingIgnoredDuringExecution" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1VMNodeAffinity) validateRequiredDuringSchedulingIgnoredDuringExecution(formats strfmt.Registry) error { + + if swag.IsZero(m.RequiredDuringSchedulingIgnoredDuringExecution) { // not required + return nil + } + + if m.RequiredDuringSchedulingIgnoredDuringExecution != nil { + if err := m.RequiredDuringSchedulingIgnoredDuringExecution.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("requiredDuringSchedulingIgnoredDuringExecution") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1VMNodeAffinity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1VMNodeAffinity) UnmarshalBinary(b []byte) error { + var res V1VMNodeAffinity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_vm_node_selector.go b/api/models/v1_vm_node_selector.go new file mode 100644 index 00000000..60e0805e --- /dev/null +++ b/api/models/v1_vm_node_selector.go @@ -0,0 +1,82 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1VMNodeSelector A node selector represents the union of the results of one or more label queries over a set of nodes; that is, it represents the OR of the selectors represented by the node selector terms. +// +// swagger:model v1VmNodeSelector +type V1VMNodeSelector struct { + + // Required. A list of node selector terms. The terms are ORed. + // Required: true + NodeSelectorTerms []*V1VMNodeSelectorTerm `json:"nodeSelectorTerms"` +} + +// Validate validates this v1 Vm node selector +func (m *V1VMNodeSelector) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateNodeSelectorTerms(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1VMNodeSelector) validateNodeSelectorTerms(formats strfmt.Registry) error { + + if err := validate.Required("nodeSelectorTerms", "body", m.NodeSelectorTerms); err != nil { + return err + } + + for i := 0; i < len(m.NodeSelectorTerms); i++ { + if swag.IsZero(m.NodeSelectorTerms[i]) { // not required + continue + } + + if m.NodeSelectorTerms[i] != nil { + if err := m.NodeSelectorTerms[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("nodeSelectorTerms" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1VMNodeSelector) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1VMNodeSelector) UnmarshalBinary(b []byte) error { + var res V1VMNodeSelector + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_vm_node_selector_requirement.go b/api/models/v1_vm_node_selector_requirement.go new file mode 100644 index 00000000..0a7e1306 --- /dev/null +++ b/api/models/v1_vm_node_selector_requirement.go @@ -0,0 +1,84 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1VMNodeSelectorRequirement A node selector requirement is a selector that contains values, a key, and an operator that relates the key and values. +// +// swagger:model v1VmNodeSelectorRequirement +type V1VMNodeSelectorRequirement struct { + + // The label key that the selector applies to. + // Required: true + Key *string `json:"key"` + + // Represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. + // Required: true + Operator *string `json:"operator"` + + // An array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. If the operator is Gt or Lt, the values array must have a single element, which will be interpreted as an integer. This array is replaced during a strategic merge patch. + Values []string `json:"values"` +} + +// Validate validates this v1 Vm node selector requirement +func (m *V1VMNodeSelectorRequirement) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateKey(formats); err != nil { + res = append(res, err) + } + + if err := m.validateOperator(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1VMNodeSelectorRequirement) validateKey(formats strfmt.Registry) error { + + if err := validate.Required("key", "body", m.Key); err != nil { + return err + } + + return nil +} + +func (m *V1VMNodeSelectorRequirement) validateOperator(formats strfmt.Registry) error { + + if err := validate.Required("operator", "body", m.Operator); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1VMNodeSelectorRequirement) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1VMNodeSelectorRequirement) UnmarshalBinary(b []byte) error { + var res V1VMNodeSelectorRequirement + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_vm_node_selector_term.go b/api/models/v1_vm_node_selector_term.go new file mode 100644 index 00000000..aaf0678c --- /dev/null +++ b/api/models/v1_vm_node_selector_term.go @@ -0,0 +1,112 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1VMNodeSelectorTerm A null or empty node selector term matches no objects. The requirements of them are ANDed. The TopologySelectorTerm type implements a subset of the NodeSelectorTerm. +// +// swagger:model v1VmNodeSelectorTerm +type V1VMNodeSelectorTerm struct { + + // A list of node selector requirements by node's labels. + MatchExpressions []*V1VMNodeSelectorRequirement `json:"matchExpressions"` + + // A list of node selector requirements by node's fields. + MatchFields []*V1VMNodeSelectorRequirement `json:"matchFields"` +} + +// Validate validates this v1 Vm node selector term +func (m *V1VMNodeSelectorTerm) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMatchExpressions(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMatchFields(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1VMNodeSelectorTerm) validateMatchExpressions(formats strfmt.Registry) error { + + if swag.IsZero(m.MatchExpressions) { // not required + return nil + } + + for i := 0; i < len(m.MatchExpressions); i++ { + if swag.IsZero(m.MatchExpressions[i]) { // not required + continue + } + + if m.MatchExpressions[i] != nil { + if err := m.MatchExpressions[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("matchExpressions" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1VMNodeSelectorTerm) validateMatchFields(formats strfmt.Registry) error { + + if swag.IsZero(m.MatchFields) { // not required + return nil + } + + for i := 0; i < len(m.MatchFields); i++ { + if swag.IsZero(m.MatchFields[i]) { // not required + continue + } + + if m.MatchFields[i] != nil { + if err := m.MatchFields[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("matchFields" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1VMNodeSelectorTerm) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1VMNodeSelectorTerm) UnmarshalBinary(b []byte) error { + var res V1VMNodeSelectorTerm + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_vm_object_field_selector.go b/api/models/v1_vm_object_field_selector.go new file mode 100644 index 00000000..7f86aac2 --- /dev/null +++ b/api/models/v1_vm_object_field_selector.go @@ -0,0 +1,67 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1VMObjectFieldSelector ObjectFieldSelector selects an APIVersioned field of an object. +// +// swagger:model v1VmObjectFieldSelector +type V1VMObjectFieldSelector struct { + + // Version of the schema the FieldPath is written in terms of, defaults to "v1". + APIVersion string `json:"apiVersion,omitempty"` + + // Path of the field to select in the specified API version. + // Required: true + FieldPath *string `json:"fieldPath"` +} + +// Validate validates this v1 Vm object field selector +func (m *V1VMObjectFieldSelector) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateFieldPath(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1VMObjectFieldSelector) validateFieldPath(formats strfmt.Registry) error { + + if err := validate.Required("fieldPath", "body", m.FieldPath); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1VMObjectFieldSelector) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1VMObjectFieldSelector) UnmarshalBinary(b []byte) error { + var res V1VMObjectFieldSelector + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_vm_object_meta.go b/api/models/v1_vm_object_meta.go new file mode 100644 index 00000000..d7733d93 --- /dev/null +++ b/api/models/v1_vm_object_meta.go @@ -0,0 +1,185 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1VMObjectMeta ObjectMeta is metadata that all persisted resources must have, which includes all objects users must create. +// +// swagger:model v1VmObjectMeta +type V1VMObjectMeta struct { + + // Annotations is an unstructured key value map stored with a resource that may be set by external tools to store and retrieve arbitrary metadata. They are not queryable and should be preserved when modifying objects. More info: http://kubernetes.io/docs/user-guide/annotations + Annotations map[string]string `json:"annotations,omitempty"` + + // The name of the cluster which the object belongs to. This is used to distinguish resources with same name and namespace in different clusters. This field is not set anywhere right now and apiserver is going to ignore it if set in create or update request. + ClusterName string `json:"clusterName,omitempty"` + + // CreationTimestamp is a timestamp representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations. Clients may not set this value. It is represented in RFC3339 form and is in UTC. + // + // Populated by the system. Read-only. Null for lists. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + CreationTimestamp string `json:"creationTimestamp,omitempty"` + + // Number of seconds allowed for this object to gracefully terminate before it will be removed from the system. Only set when deletionTimestamp is also set. May only be shortened. Read-only. + DeletionGracePeriodSeconds int64 `json:"deletionGracePeriodSeconds,omitempty"` + + // DeletionTimestamp is RFC 3339 date and time at which this resource will be deleted. This field is set by the server when a graceful deletion is requested by the user, and is not directly settable by a client. The resource is expected to be deleted (no longer visible from resource lists, and not reachable by name) after the time in this field, once the finalizers list is empty. As long as the finalizers list contains items, deletion is blocked. Once the deletionTimestamp is set, this value may not be unset or be set further into the future, although it may be shortened or the resource may be deleted prior to this time. For example, a user may request that a pod is deleted in 30 seconds. The Kubelet will react by sending a graceful termination signal to the containers in the pod. After that 30 seconds, the Kubelet will send a hard termination signal (SIGKILL) to the container and after cleanup, remove the pod from the API. In the presence of network partitions, this object may still exist after this timestamp, until an administrator or automated process can determine the resource is fully terminated. If not set, graceful deletion of the object has not been requested. + // + // Populated by the system when a graceful deletion is requested. Read-only. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + // Format: date-time + DeletionTimestamp *strfmt.DateTime `json:"deletionTimestamp,omitempty"` + + // Must be empty before the object is deleted from the registry. Each entry is an identifier for the responsible component that will remove the entry from the list. If the deletionTimestamp of the object is non-nil, entries in this list can only be removed. Finalizers may be processed and removed in any order. Order is NOT enforced because it introduces significant risk of stuck finalizers. finalizers is a shared field, any actor with permission can reorder it. If the finalizer list is processed in order, then this can lead to a situation in which the component responsible for the first finalizer in the list is waiting for a signal (field value, external system, or other) produced by a component responsible for a finalizer later in the list, resulting in a deadlock. Without enforced ordering finalizers are free to order amongst themselves and are not vulnerable to ordering changes in the list. + Finalizers []string `json:"finalizers"` + + // GenerateName is an optional prefix, used by the server, to generate a unique name ONLY IF the Name field has not been provided. If this field is used, the name returned to the client will be different than the name passed. This value will also be combined with a unique suffix. The provided value has the same validation rules as the Name field, and may be truncated by the length of the suffix required to make the value unique on the server. + // + // If this field is specified and the generated name exists, the server will NOT return a 409 - instead, it will either return 201 Created or 500 with Reason ServerTimeout indicating a unique name could not be found in the time allotted, and the client should retry (optionally after the time indicated in the Retry-After header). + // + // Applied only if Name is not specified. + GenerateName string `json:"generateName,omitempty"` + + // A sequence number representing a specific generation of the desired state. Populated by the system. Read-only. + Generation int64 `json:"generation,omitempty"` + + // Map of string keys and values that can be used to organize and categorize (scope and select) objects. May match selectors of replication controllers and services. More info: http://kubernetes.io/docs/user-guide/labels + Labels map[string]string `json:"labels,omitempty"` + + // ManagedFields maps workflow-id and version to the set of fields that are managed by that workflow. This is mostly for internal housekeeping, and users typically shouldn't need to set or understand this field. A workflow can be the user's name, a controller's name, or the name of a specific apply path like "ci-cd". The set of fields is always in the version that the workflow used when modifying the object. + ManagedFields []*V1VMManagedFieldsEntry `json:"managedFields"` + + // Name must be unique within a namespace. Is required when creating resources, although some resources may allow a client to request the generation of an appropriate name automatically. Name is primarily intended for creation idempotence and configuration definition. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/identifiers#names + Name string `json:"name,omitempty"` + + // Namespace defines the space within which each name must be unique. An empty namespace is equivalent to the "default" namespace, but "default" is the canonical representation. Not all objects are required to be scoped to a namespace - the value of this field for those objects will be empty. + // Must be a DNS_LABEL. Cannot be updated. + Namespace string `json:"namespace,omitempty"` + + // List of objects depended by this object. If ALL objects in the list have been deleted, this object will be garbage collected. If this object is managed by a controller, then an entry in this list will point to this controller, with the controller field set to true. There cannot be more than one managing controller. + OwnerReferences []*V1VMOwnerReference `json:"ownerReferences"` + + // An opaque value that represents the internal version of this object that can be used by clients to determine when objects have changed. May be used for optimistic concurrency, change detection, and the watch operation on a resource or set of resources. Clients must treat these values as opaque and passed unmodified back to the server. They may only be valid for a particular resource or set of resources. + // Populated by the system. Read-only. Value must be treated as opaque by clients. + ResourceVersion string `json:"resourceVersion,omitempty"` + + // SelfLink is a URL representing this object. Populated by the system. Read-only. + // DEPRECATED Kubernetes will stop propagating this field in 1.20 release and the field is planned to be removed in 1.21 release. + SelfLink string `json:"selfLink,omitempty"` + + // UID is the unique in time and space value for this object. It is typically generated by the server on successful creation of a resource and is not allowed to change on PUT operations. + // Populated by the system. Read-only. + UID string `json:"uid,omitempty"` +} + +// Validate validates this v1 Vm object meta +func (m *V1VMObjectMeta) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateDeletionTimestamp(formats); err != nil { + res = append(res, err) + } + + if err := m.validateManagedFields(formats); err != nil { + res = append(res, err) + } + + if err := m.validateOwnerReferences(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1VMObjectMeta) validateDeletionTimestamp(formats strfmt.Registry) error { + + if swag.IsZero(m.DeletionTimestamp) { // not required + return nil + } + + if err := validate.FormatOf("deletionTimestamp", "body", "date-time", m.DeletionTimestamp.String(), formats); err != nil { + return err + } + + return nil +} + +func (m *V1VMObjectMeta) validateManagedFields(formats strfmt.Registry) error { + + if swag.IsZero(m.ManagedFields) { // not required + return nil + } + + for i := 0; i < len(m.ManagedFields); i++ { + if swag.IsZero(m.ManagedFields[i]) { // not required + continue + } + + if m.ManagedFields[i] != nil { + if err := m.ManagedFields[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("managedFields" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1VMObjectMeta) validateOwnerReferences(formats strfmt.Registry) error { + + if swag.IsZero(m.OwnerReferences) { // not required + return nil + } + + for i := 0; i < len(m.OwnerReferences); i++ { + if swag.IsZero(m.OwnerReferences[i]) { // not required + continue + } + + if m.OwnerReferences[i] != nil { + if err := m.OwnerReferences[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("ownerReferences" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1VMObjectMeta) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1VMObjectMeta) UnmarshalBinary(b []byte) error { + var res V1VMObjectMeta + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_vm_owner_reference.go b/api/models/v1_vm_owner_reference.go new file mode 100644 index 00000000..5675403d --- /dev/null +++ b/api/models/v1_vm_owner_reference.go @@ -0,0 +1,121 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1VMOwnerReference OwnerReference contains enough information to let you identify an owning object. An owning object must be in the same namespace as the dependent, or be cluster-scoped, so there is no namespace field. +// +// swagger:model v1VmOwnerReference +type V1VMOwnerReference struct { + + // API version of the referent. + // Required: true + APIVersion *string `json:"apiVersion"` + + // If true, AND if the owner has the "foregroundDeletion" finalizer, then the owner cannot be deleted from the key-value store until this reference is removed. Defaults to false. To set this field, a user needs "delete" permission of the owner, otherwise 422 (Unprocessable Entity) will be returned. + BlockOwnerDeletion bool `json:"blockOwnerDeletion,omitempty"` + + // If true, this reference points to the managing controller. + Controller bool `json:"controller,omitempty"` + + // Kind of the referent. + // Required: true + Kind *string `json:"kind"` + + // Name of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#names + // Required: true + Name *string `json:"name"` + + // UID of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#uids + // Required: true + UID *string `json:"uid"` +} + +// Validate validates this v1 Vm owner reference +func (m *V1VMOwnerReference) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateAPIVersion(formats); err != nil { + res = append(res, err) + } + + if err := m.validateKind(formats); err != nil { + res = append(res, err) + } + + if err := m.validateName(formats); err != nil { + res = append(res, err) + } + + if err := m.validateUID(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1VMOwnerReference) validateAPIVersion(formats strfmt.Registry) error { + + if err := validate.Required("apiVersion", "body", m.APIVersion); err != nil { + return err + } + + return nil +} + +func (m *V1VMOwnerReference) validateKind(formats strfmt.Registry) error { + + if err := validate.Required("kind", "body", m.Kind); err != nil { + return err + } + + return nil +} + +func (m *V1VMOwnerReference) validateName(formats strfmt.Registry) error { + + if err := validate.Required("name", "body", m.Name); err != nil { + return err + } + + return nil +} + +func (m *V1VMOwnerReference) validateUID(formats strfmt.Registry) error { + + if err := validate.Required("uid", "body", m.UID); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1VMOwnerReference) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1VMOwnerReference) UnmarshalBinary(b []byte) error { + var res V1VMOwnerReference + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_vm_p_i_t_timer.go b/api/models/v1_vm_p_i_t_timer.go new file mode 100644 index 00000000..76115c20 --- /dev/null +++ b/api/models/v1_vm_p_i_t_timer.go @@ -0,0 +1,46 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1VMPITTimer v1 Vm p i t timer +// +// swagger:model v1VmPITTimer +type V1VMPITTimer struct { + + // Enabled set to false makes sure that the machine type or a preset can't add the timer. Defaults to true. + Present bool `json:"present,omitempty"` + + // TickPolicy determines what happens when QEMU misses a deadline for injecting a tick to the guest. One of "delay", "catchup", "discard". + TickPolicy string `json:"tickPolicy,omitempty"` +} + +// Validate validates this v1 Vm p i t timer +func (m *V1VMPITTimer) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1VMPITTimer) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1VMPITTimer) UnmarshalBinary(b []byte) error { + var res V1VMPITTimer + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_vm_persistent_volume_claim_spec.go b/api/models/v1_vm_persistent_volume_claim_spec.go new file mode 100644 index 00000000..31d0c6ad --- /dev/null +++ b/api/models/v1_vm_persistent_volume_claim_spec.go @@ -0,0 +1,158 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1VMPersistentVolumeClaimSpec PersistentVolumeClaimSpec describes the common attributes of storage devices and allows a Source for provider-specific attributes +// +// swagger:model v1VmPersistentVolumeClaimSpec +type V1VMPersistentVolumeClaimSpec struct { + + // AccessModes contains the desired access modes the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1 + AccessModes []string `json:"accessModes"` + + // data source + DataSource *V1VMTypedLocalObjectReference `json:"dataSource,omitempty"` + + // data source ref + DataSourceRef *V1VMTypedLocalObjectReference `json:"dataSourceRef,omitempty"` + + // resources + Resources *V1VMCoreResourceRequirements `json:"resources,omitempty"` + + // selector + Selector *V1VMLabelSelector `json:"selector,omitempty"` + + // Name of the StorageClass required by the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1 + StorageClassName string `json:"storageClassName,omitempty"` + + // volumeMode defines what type of volume is required by the claim. Value of Filesystem is implied when not included in claim spec. + VolumeMode string `json:"volumeMode,omitempty"` + + // VolumeName is the binding reference to the PersistentVolume backing this claim. + VolumeName string `json:"volumeName,omitempty"` +} + +// Validate validates this v1 Vm persistent volume claim spec +func (m *V1VMPersistentVolumeClaimSpec) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateDataSource(formats); err != nil { + res = append(res, err) + } + + if err := m.validateDataSourceRef(formats); err != nil { + res = append(res, err) + } + + if err := m.validateResources(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSelector(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1VMPersistentVolumeClaimSpec) validateDataSource(formats strfmt.Registry) error { + + if swag.IsZero(m.DataSource) { // not required + return nil + } + + if m.DataSource != nil { + if err := m.DataSource.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("dataSource") + } + return err + } + } + + return nil +} + +func (m *V1VMPersistentVolumeClaimSpec) validateDataSourceRef(formats strfmt.Registry) error { + + if swag.IsZero(m.DataSourceRef) { // not required + return nil + } + + if m.DataSourceRef != nil { + if err := m.DataSourceRef.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("dataSourceRef") + } + return err + } + } + + return nil +} + +func (m *V1VMPersistentVolumeClaimSpec) validateResources(formats strfmt.Registry) error { + + if swag.IsZero(m.Resources) { // not required + return nil + } + + if m.Resources != nil { + if err := m.Resources.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("resources") + } + return err + } + } + + return nil +} + +func (m *V1VMPersistentVolumeClaimSpec) validateSelector(formats strfmt.Registry) error { + + if swag.IsZero(m.Selector) { // not required + return nil + } + + if m.Selector != nil { + if err := m.Selector.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("selector") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1VMPersistentVolumeClaimSpec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1VMPersistentVolumeClaimSpec) UnmarshalBinary(b []byte) error { + var res V1VMPersistentVolumeClaimSpec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_vm_persistent_volume_claim_volume_source.go b/api/models/v1_vm_persistent_volume_claim_volume_source.go new file mode 100644 index 00000000..830b15ee --- /dev/null +++ b/api/models/v1_vm_persistent_volume_claim_volume_source.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1VMPersistentVolumeClaimVolumeSource PersistentVolumeClaimVolumeSource represents a reference to a PersistentVolumeClaim in the same namespace. Directly attached to the vmi via qemu. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims +// +// swagger:model v1VmPersistentVolumeClaimVolumeSource +type V1VMPersistentVolumeClaimVolumeSource struct { + + // ClaimName is the name of a PersistentVolumeClaim in the same namespace as the pod using this volume. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims + // Required: true + ClaimName *string `json:"claimName"` + + // Hotpluggable indicates whether the volume can be hotplugged and hotunplugged. + Hotpluggable bool `json:"hotpluggable,omitempty"` + + // Will force the ReadOnly setting in VolumeMounts. Default false. + ReadOnly bool `json:"readOnly,omitempty"` +} + +// Validate validates this v1 Vm persistent volume claim volume source +func (m *V1VMPersistentVolumeClaimVolumeSource) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateClaimName(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1VMPersistentVolumeClaimVolumeSource) validateClaimName(formats strfmt.Registry) error { + + if err := validate.Required("claimName", "body", m.ClaimName); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1VMPersistentVolumeClaimVolumeSource) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1VMPersistentVolumeClaimVolumeSource) UnmarshalBinary(b []byte) error { + var res V1VMPersistentVolumeClaimVolumeSource + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_vm_pod_affinity.go b/api/models/v1_vm_pod_affinity.go new file mode 100644 index 00000000..c64eca38 --- /dev/null +++ b/api/models/v1_vm_pod_affinity.go @@ -0,0 +1,112 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1VMPodAffinity Pod affinity is a group of inter pod affinity scheduling rules. +// +// swagger:model v1VmPodAffinity +type V1VMPodAffinity struct { + + // The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred. + PreferredDuringSchedulingIgnoredDuringExecution []*V1VMWeightedPodAffinityTerm `json:"preferredDuringSchedulingIgnoredDuringExecution"` + + // If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied. + RequiredDuringSchedulingIgnoredDuringExecution []*V1VMPodAffinityTerm `json:"requiredDuringSchedulingIgnoredDuringExecution"` +} + +// Validate validates this v1 Vm pod affinity +func (m *V1VMPodAffinity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validatePreferredDuringSchedulingIgnoredDuringExecution(formats); err != nil { + res = append(res, err) + } + + if err := m.validateRequiredDuringSchedulingIgnoredDuringExecution(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1VMPodAffinity) validatePreferredDuringSchedulingIgnoredDuringExecution(formats strfmt.Registry) error { + + if swag.IsZero(m.PreferredDuringSchedulingIgnoredDuringExecution) { // not required + return nil + } + + for i := 0; i < len(m.PreferredDuringSchedulingIgnoredDuringExecution); i++ { + if swag.IsZero(m.PreferredDuringSchedulingIgnoredDuringExecution[i]) { // not required + continue + } + + if m.PreferredDuringSchedulingIgnoredDuringExecution[i] != nil { + if err := m.PreferredDuringSchedulingIgnoredDuringExecution[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("preferredDuringSchedulingIgnoredDuringExecution" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1VMPodAffinity) validateRequiredDuringSchedulingIgnoredDuringExecution(formats strfmt.Registry) error { + + if swag.IsZero(m.RequiredDuringSchedulingIgnoredDuringExecution) { // not required + return nil + } + + for i := 0; i < len(m.RequiredDuringSchedulingIgnoredDuringExecution); i++ { + if swag.IsZero(m.RequiredDuringSchedulingIgnoredDuringExecution[i]) { // not required + continue + } + + if m.RequiredDuringSchedulingIgnoredDuringExecution[i] != nil { + if err := m.RequiredDuringSchedulingIgnoredDuringExecution[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("requiredDuringSchedulingIgnoredDuringExecution" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1VMPodAffinity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1VMPodAffinity) UnmarshalBinary(b []byte) error { + var res V1VMPodAffinity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_vm_pod_affinity_term.go b/api/models/v1_vm_pod_affinity_term.go new file mode 100644 index 00000000..35287aca --- /dev/null +++ b/api/models/v1_vm_pod_affinity_term.go @@ -0,0 +1,117 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1VMPodAffinityTerm Defines a set of pods (namely those matching the labelSelector relative to the given namespace(s)) that this pod should be co-located (affinity) or not co-located (anti-affinity) with, where co-located is defined as running on a node whose value of the label with key matches that of any node on which a pod of the set of pods is running +// +// swagger:model v1VmPodAffinityTerm +type V1VMPodAffinityTerm struct { + + // label selector + LabelSelector *V1VMLabelSelector `json:"labelSelector,omitempty"` + + // namespace selector + NamespaceSelector *V1VMLabelSelector `json:"namespaceSelector,omitempty"` + + // namespaces specifies a static list of namespace names that the term applies to. The term is applied to the union of the namespaces listed in this field and the ones selected by namespaceSelector. null or empty namespaces list and null namespaceSelector means "this pod's namespace" + Namespaces []string `json:"namespaces"` + + // This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching the labelSelector in the specified namespaces, where co-located is defined as running on a node whose value of the label with key topologyKey matches that of any node on which any of the selected pods is running. Empty topologyKey is not allowed. + // Required: true + TopologyKey *string `json:"topologyKey"` +} + +// Validate validates this v1 Vm pod affinity term +func (m *V1VMPodAffinityTerm) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateLabelSelector(formats); err != nil { + res = append(res, err) + } + + if err := m.validateNamespaceSelector(formats); err != nil { + res = append(res, err) + } + + if err := m.validateTopologyKey(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1VMPodAffinityTerm) validateLabelSelector(formats strfmt.Registry) error { + + if swag.IsZero(m.LabelSelector) { // not required + return nil + } + + if m.LabelSelector != nil { + if err := m.LabelSelector.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("labelSelector") + } + return err + } + } + + return nil +} + +func (m *V1VMPodAffinityTerm) validateNamespaceSelector(formats strfmt.Registry) error { + + if swag.IsZero(m.NamespaceSelector) { // not required + return nil + } + + if m.NamespaceSelector != nil { + if err := m.NamespaceSelector.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("namespaceSelector") + } + return err + } + } + + return nil +} + +func (m *V1VMPodAffinityTerm) validateTopologyKey(formats strfmt.Registry) error { + + if err := validate.Required("topologyKey", "body", m.TopologyKey); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1VMPodAffinityTerm) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1VMPodAffinityTerm) UnmarshalBinary(b []byte) error { + var res V1VMPodAffinityTerm + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_vm_pod_dns_config.go b/api/models/v1_vm_pod_dns_config.go new file mode 100644 index 00000000..aaa6a376 --- /dev/null +++ b/api/models/v1_vm_pod_dns_config.go @@ -0,0 +1,86 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1VMPodDNSConfig PodDNSConfig defines the DNS parameters of a pod in addition to those generated from DNSPolicy. +// +// swagger:model v1VmPodDnsConfig +type V1VMPodDNSConfig struct { + + // A list of DNS name server IP addresses. This will be appended to the base nameservers generated from DNSPolicy. Duplicated nameservers will be removed. + Nameservers []string `json:"nameservers"` + + // A list of DNS resolver options. This will be merged with the base options generated from DNSPolicy. Duplicated entries will be removed. Resolution options given in Options will override those that appear in the base DNSPolicy. + Options []*V1VMPodDNSConfigOption `json:"options"` + + // A list of DNS search domains for host-name lookup. This will be appended to the base search paths generated from DNSPolicy. Duplicated search paths will be removed. + Searches []string `json:"searches"` +} + +// Validate validates this v1 Vm pod Dns config +func (m *V1VMPodDNSConfig) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateOptions(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1VMPodDNSConfig) validateOptions(formats strfmt.Registry) error { + + if swag.IsZero(m.Options) { // not required + return nil + } + + for i := 0; i < len(m.Options); i++ { + if swag.IsZero(m.Options[i]) { // not required + continue + } + + if m.Options[i] != nil { + if err := m.Options[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("options" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1VMPodDNSConfig) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1VMPodDNSConfig) UnmarshalBinary(b []byte) error { + var res V1VMPodDNSConfig + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_vm_pod_dns_config_option.go b/api/models/v1_vm_pod_dns_config_option.go new file mode 100644 index 00000000..468ae482 --- /dev/null +++ b/api/models/v1_vm_pod_dns_config_option.go @@ -0,0 +1,46 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1VMPodDNSConfigOption PodDNSConfigOption defines DNS resolver options of a pod. +// +// swagger:model v1VmPodDnsConfigOption +type V1VMPodDNSConfigOption struct { + + // Required. + Name string `json:"name,omitempty"` + + // value + Value string `json:"value,omitempty"` +} + +// Validate validates this v1 Vm pod Dns config option +func (m *V1VMPodDNSConfigOption) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1VMPodDNSConfigOption) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1VMPodDNSConfigOption) UnmarshalBinary(b []byte) error { + var res V1VMPodDNSConfigOption + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_vm_pod_network.go b/api/models/v1_vm_pod_network.go new file mode 100644 index 00000000..f2f3e0a9 --- /dev/null +++ b/api/models/v1_vm_pod_network.go @@ -0,0 +1,46 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1VMPodNetwork Represents the stock pod network interface. +// +// swagger:model v1VmPodNetwork +type V1VMPodNetwork struct { + + // IPv6 CIDR for the vm network. Defaults to fd10:0:2::/120 if not specified. + VMIPV6NetworkCIDR string `json:"vmIPv6NetworkCIDR,omitempty"` + + // CIDR for vm network. Default 10.0.2.0/24 if not specified. + VMNetworkCIDR string `json:"vmNetworkCIDR,omitempty"` +} + +// Validate validates this v1 Vm pod network +func (m *V1VMPodNetwork) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1VMPodNetwork) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1VMPodNetwork) UnmarshalBinary(b []byte) error { + var res V1VMPodNetwork + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_vm_port.go b/api/models/v1_vm_port.go new file mode 100644 index 00000000..113e88e0 --- /dev/null +++ b/api/models/v1_vm_port.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1VMPort Port represents a port to expose from the virtual machine. Default protocol TCP. The port field is mandatory +// +// swagger:model v1VmPort +type V1VMPort struct { + + // If specified, this must be an IANA_SVC_NAME and unique within the pod. Each named port in a pod must have a unique name. Name for the port that can be referred to by services. + Name string `json:"name,omitempty"` + + // Number of port to expose for the virtual machine. This must be a valid port number, 0 < x < 65536. + // Required: true + Port *int32 `json:"port"` + + // Protocol for port. Must be UDP or TCP. Defaults to "TCP". + Protocol string `json:"protocol,omitempty"` +} + +// Validate validates this v1 Vm port +func (m *V1VMPort) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validatePort(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1VMPort) validatePort(formats strfmt.Registry) error { + + if err := validate.Required("port", "body", m.Port); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1VMPort) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1VMPort) UnmarshalBinary(b []byte) error { + var res V1VMPort + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_vm_preference_matcher.go b/api/models/v1_vm_preference_matcher.go new file mode 100644 index 00000000..508e4203 --- /dev/null +++ b/api/models/v1_vm_preference_matcher.go @@ -0,0 +1,52 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1VMPreferenceMatcher PreferenceMatcher references a set of preference that is used to fill fields in the VMI template. +// +// swagger:model v1VmPreferenceMatcher +type V1VMPreferenceMatcher struct { + + // InferFromVolume lists the name of a volume that should be used to infer or discover the preference to be used through known annotations on the underlying resource. Once applied to the PreferenceMatcher this field is removed. + InferFromVolume string `json:"inferFromVolume,omitempty"` + + // Kind specifies which preference resource is referenced. Allowed values are: "VirtualMachinePreference" and "VirtualMachineClusterPreference". If not specified, "VirtualMachineClusterPreference" is used by default. + Kind string `json:"kind,omitempty"` + + // Name is the name of the VirtualMachinePreference or VirtualMachineClusterPreference + Name string `json:"name,omitempty"` + + // RevisionName specifies a ControllerRevision containing a specific copy of the VirtualMachinePreference or VirtualMachineClusterPreference to be used. This is initially captured the first time the instancetype is applied to the VirtualMachineInstance. + RevisionName string `json:"revisionName,omitempty"` +} + +// Validate validates this v1 Vm preference matcher +func (m *V1VMPreferenceMatcher) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1VMPreferenceMatcher) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1VMPreferenceMatcher) UnmarshalBinary(b []byte) error { + var res V1VMPreferenceMatcher + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_vm_preferred_scheduling_term.go b/api/models/v1_vm_preferred_scheduling_term.go new file mode 100644 index 00000000..840389e6 --- /dev/null +++ b/api/models/v1_vm_preferred_scheduling_term.go @@ -0,0 +1,90 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1VMPreferredSchedulingTerm An empty preferred scheduling term matches all objects with implicit weight 0 (i.e. it's a no-op). A null preferred scheduling term matches no objects (i.e. is also a no-op). +// +// swagger:model v1VmPreferredSchedulingTerm +type V1VMPreferredSchedulingTerm struct { + + // preference + // Required: true + Preference *V1VMNodeSelectorTerm `json:"preference"` + + // Weight associated with matching the corresponding nodeSelectorTerm, in the range 1-100. + // Required: true + Weight *int32 `json:"weight"` +} + +// Validate validates this v1 Vm preferred scheduling term +func (m *V1VMPreferredSchedulingTerm) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validatePreference(formats); err != nil { + res = append(res, err) + } + + if err := m.validateWeight(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1VMPreferredSchedulingTerm) validatePreference(formats strfmt.Registry) error { + + if err := validate.Required("preference", "body", m.Preference); err != nil { + return err + } + + if m.Preference != nil { + if err := m.Preference.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("preference") + } + return err + } + } + + return nil +} + +func (m *V1VMPreferredSchedulingTerm) validateWeight(formats strfmt.Registry) error { + + if err := validate.Required("weight", "body", m.Weight); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1VMPreferredSchedulingTerm) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1VMPreferredSchedulingTerm) UnmarshalBinary(b []byte) error { + var res V1VMPreferredSchedulingTerm + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_vm_probe.go b/api/models/v1_vm_probe.go new file mode 100644 index 00000000..54a58f64 --- /dev/null +++ b/api/models/v1_vm_probe.go @@ -0,0 +1,139 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1VMProbe Probe describes a health check to be performed against a VirtualMachineInstance to determine whether it is alive or ready to receive traffic. +// +// swagger:model v1VmProbe +type V1VMProbe struct { + + // exec + Exec *V1VMExecAction `json:"exec,omitempty"` + + // Minimum consecutive failures for the probe to be considered failed after having succeeded. Defaults to 3. Minimum value is 1. + FailureThreshold int32 `json:"failureThreshold,omitempty"` + + // guest agent ping + GuestAgentPing V1VMGuestAgentPing `json:"guestAgentPing,omitempty"` + + // http get + HTTPGet *V1VMHTTPGetAction `json:"httpGet,omitempty"` + + // Number of seconds after the VirtualMachineInstance has started before liveness probes are initiated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + InitialDelaySeconds int32 `json:"initialDelaySeconds,omitempty"` + + // How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1. + PeriodSeconds int32 `json:"periodSeconds,omitempty"` + + // Minimum consecutive successes for the probe to be considered successful after having failed. Defaults to 1. Must be 1 for liveness. Minimum value is 1. + SuccessThreshold int32 `json:"successThreshold,omitempty"` + + // tcp socket + TCPSocket *V1VMTCPSocketAction `json:"tcpSocket,omitempty"` + + // Number of seconds after which the probe times out. For exec probes the timeout fails the probe but does not terminate the command running on the guest. This means a blocking command can result in an increasing load on the guest. A small buffer will be added to the resulting workload exec probe to compensate for delays caused by the qemu guest exec mechanism. Defaults to 1 second. Minimum value is 1. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + TimeoutSeconds int32 `json:"timeoutSeconds,omitempty"` +} + +// Validate validates this v1 Vm probe +func (m *V1VMProbe) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateExec(formats); err != nil { + res = append(res, err) + } + + if err := m.validateHTTPGet(formats); err != nil { + res = append(res, err) + } + + if err := m.validateTCPSocket(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1VMProbe) validateExec(formats strfmt.Registry) error { + + if swag.IsZero(m.Exec) { // not required + return nil + } + + if m.Exec != nil { + if err := m.Exec.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("exec") + } + return err + } + } + + return nil +} + +func (m *V1VMProbe) validateHTTPGet(formats strfmt.Registry) error { + + if swag.IsZero(m.HTTPGet) { // not required + return nil + } + + if m.HTTPGet != nil { + if err := m.HTTPGet.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("httpGet") + } + return err + } + } + + return nil +} + +func (m *V1VMProbe) validateTCPSocket(formats strfmt.Registry) error { + + if swag.IsZero(m.TCPSocket) { // not required + return nil + } + + if m.TCPSocket != nil { + if err := m.TCPSocket.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("tcpSocket") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1VMProbe) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1VMProbe) UnmarshalBinary(b []byte) error { + var res V1VMProbe + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_vm_qemu_guest_agent_ssh_public_key_access_credential_propagation.go b/api/models/v1_vm_qemu_guest_agent_ssh_public_key_access_credential_propagation.go new file mode 100644 index 00000000..e1c91141 --- /dev/null +++ b/api/models/v1_vm_qemu_guest_agent_ssh_public_key_access_credential_propagation.go @@ -0,0 +1,64 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1VMQemuGuestAgentSSHPublicKeyAccessCredentialPropagation v1 Vm qemu guest agent Ssh public key access credential propagation +// +// swagger:model v1VmQemuGuestAgentSshPublicKeyAccessCredentialPropagation +type V1VMQemuGuestAgentSSHPublicKeyAccessCredentialPropagation struct { + + // Users represents a list of guest users that should have the ssh public keys added to their authorized_keys file. + // Required: true + Users []string `json:"users"` +} + +// Validate validates this v1 Vm qemu guest agent Ssh public key access credential propagation +func (m *V1VMQemuGuestAgentSSHPublicKeyAccessCredentialPropagation) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateUsers(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1VMQemuGuestAgentSSHPublicKeyAccessCredentialPropagation) validateUsers(formats strfmt.Registry) error { + + if err := validate.Required("users", "body", m.Users); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1VMQemuGuestAgentSSHPublicKeyAccessCredentialPropagation) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1VMQemuGuestAgentSSHPublicKeyAccessCredentialPropagation) UnmarshalBinary(b []byte) error { + var res V1VMQemuGuestAgentSSHPublicKeyAccessCredentialPropagation + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_vm_qemu_guest_agent_user_password_access_credential_propagation.go b/api/models/v1_vm_qemu_guest_agent_user_password_access_credential_propagation.go new file mode 100644 index 00000000..88e10340 --- /dev/null +++ b/api/models/v1_vm_qemu_guest_agent_user_password_access_credential_propagation.go @@ -0,0 +1,11 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +// V1VMQemuGuestAgentUserPasswordAccessCredentialPropagation v1 Vm qemu guest agent user password access credential propagation +// +// swagger:model v1VmQemuGuestAgentUserPasswordAccessCredentialPropagation +type V1VMQemuGuestAgentUserPasswordAccessCredentialPropagation interface{} diff --git a/api/models/v1_vm_quantity.go b/api/models/v1_vm_quantity.go new file mode 100644 index 00000000..f782a7ec --- /dev/null +++ b/api/models/v1_vm_quantity.go @@ -0,0 +1,59 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" +) + +// V1VMQuantity Quantity is a fixed-point representation of a number. It provides convenient marshaling/unmarshaling in JSON and YAML, in addition to String() and AsInt64() accessors. +// +// The serialization format is: +// +// ::= +// +// (Note that may be empty, from the "" case in .) +// +// ::= 0 | 1 | ... | 9 ::= | ::= | . | . | . ::= "+" | "-" ::= | ::= | | ::= Ki | Mi | Gi | Ti | Pi | Ei +// +// (International System of units; See: http://physics.nist.gov/cuu/Units/binary.html) +// +// ::= m | "" | k | M | G | T | P | E +// +// (Note that 1024 = 1Ki but 1000 = 1k; I didn't choose the capitalization.) +// +// ::= "e" | "E" +// +// No matter which of the three exponent forms is used, no quantity may represent a number greater than 2^63-1 in magnitude, nor may it have more than 3 decimal places. Numbers larger or more precise will be capped or rounded up. (E.g.: 0.1m will rounded up to 1m.) This may be extended in the future if we require larger or smaller quantities. +// +// When a Quantity is parsed from a string, it will remember the type of suffix it had, and will use the same type again when it is serialized. +// +// Before serializing, Quantity will be put in "canonical form". This means that Exponent/suffix will be adjusted up or down (with a corresponding increase or decrease in Mantissa) such that: +// +// a. No precision is lost +// b. No fractional digits will be emitted +// c. The exponent (or suffix) is as large as possible. +// +// The sign will be omitted unless the number is negative. +// +// Examples: +// +// 1.5 will be serialized as "1500m" +// 1.5Gi will be serialized as "1536Mi" +// +// Note that the quantity will NEVER be internally represented by a floating point number. That is the whole point of this exercise. +// +// Non-canonical values will still parse as long as they are well formed, but will be re-emitted in their canonical form. (So always use canonical form, or don't diff.) +// +// This format is intended to make it difficult to use these numbers without writing some sort of special handling code in the hopes that that will cause implementors to also use a fixed point implementation. +// +// swagger:model v1VmQuantity +type V1VMQuantity string + +// Validate validates this v1 Vm quantity +func (m V1VMQuantity) Validate(formats strfmt.Registry) error { + return nil +} diff --git a/api/models/v1_vm_r_t_c_timer.go b/api/models/v1_vm_r_t_c_timer.go new file mode 100644 index 00000000..31ed9bf1 --- /dev/null +++ b/api/models/v1_vm_r_t_c_timer.go @@ -0,0 +1,49 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1VMRTCTimer v1 Vm r t c timer +// +// swagger:model v1VmRTCTimer +type V1VMRTCTimer struct { + + // Enabled set to false makes sure that the machine type or a preset can't add the timer. Defaults to true. + Present bool `json:"present,omitempty"` + + // TickPolicy determines what happens when QEMU misses a deadline for injecting a tick to the guest. One of "delay", "catchup". + TickPolicy string `json:"tickPolicy,omitempty"` + + // Track the guest or the wall clock. + Track string `json:"track,omitempty"` +} + +// Validate validates this v1 Vm r t c timer +func (m *V1VMRTCTimer) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1VMRTCTimer) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1VMRTCTimer) UnmarshalBinary(b []byte) error { + var res V1VMRTCTimer + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_vm_realtime.go b/api/models/v1_vm_realtime.go new file mode 100644 index 00000000..209d4b92 --- /dev/null +++ b/api/models/v1_vm_realtime.go @@ -0,0 +1,43 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1VMRealtime Realtime holds the tuning knobs specific for realtime workloads. +// +// swagger:model v1VmRealtime +type V1VMRealtime struct { + + // Mask defines the vcpu mask expression that defines which vcpus are used for realtime. Format matches libvirt's expressions. Example: "0-3,^1","0,2,3","2-3" + Mask string `json:"mask,omitempty"` +} + +// Validate validates this v1 Vm realtime +func (m *V1VMRealtime) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1VMRealtime) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1VMRealtime) UnmarshalBinary(b []byte) error { + var res V1VMRealtime + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_vm_remove_volume_entity.go b/api/models/v1_vm_remove_volume_entity.go new file mode 100644 index 00000000..ccce8421 --- /dev/null +++ b/api/models/v1_vm_remove_volume_entity.go @@ -0,0 +1,76 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1VMRemoveVolumeEntity v1 VM remove volume entity +// +// swagger:model v1VMRemoveVolumeEntity +type V1VMRemoveVolumeEntity struct { + + // If 'true' remove the disk from the Virtual Machine & Virtual Machine Instance, else remove the disk from the Virtual Machine Instance only + Persist bool `json:"persist,omitempty"` + + // Parameters required to remove volume from virtual machine/virtual machine instance + // Required: true + RemoveVolumeOptions *V1VMRemoveVolumeOptions `json:"removeVolumeOptions"` +} + +// Validate validates this v1 VM remove volume entity +func (m *V1VMRemoveVolumeEntity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateRemoveVolumeOptions(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1VMRemoveVolumeEntity) validateRemoveVolumeOptions(formats strfmt.Registry) error { + + if err := validate.Required("removeVolumeOptions", "body", m.RemoveVolumeOptions); err != nil { + return err + } + + if m.RemoveVolumeOptions != nil { + if err := m.RemoveVolumeOptions.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("removeVolumeOptions") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1VMRemoveVolumeEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1VMRemoveVolumeEntity) UnmarshalBinary(b []byte) error { + var res V1VMRemoveVolumeEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_vm_remove_volume_options.go b/api/models/v1_vm_remove_volume_options.go new file mode 100644 index 00000000..3b3142a9 --- /dev/null +++ b/api/models/v1_vm_remove_volume_options.go @@ -0,0 +1,67 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1VMRemoveVolumeOptions RemoveVolumeOptions is provided when dynamically hot unplugging volume and disk +// +// swagger:model v1VmRemoveVolumeOptions +type V1VMRemoveVolumeOptions struct { + + // When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed + DryRun []string `json:"dryRun"` + + // Name represents the name that maps to both the disk and volume that should be removed + // Required: true + Name *string `json:"name"` +} + +// Validate validates this v1 Vm remove volume options +func (m *V1VMRemoveVolumeOptions) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateName(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1VMRemoveVolumeOptions) validateName(formats strfmt.Registry) error { + + if err := validate.Required("name", "body", m.Name); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1VMRemoveVolumeOptions) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1VMRemoveVolumeOptions) UnmarshalBinary(b []byte) error { + var res V1VMRemoveVolumeOptions + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_vm_resource_field_selector.go b/api/models/v1_vm_resource_field_selector.go new file mode 100644 index 00000000..5295a9a5 --- /dev/null +++ b/api/models/v1_vm_resource_field_selector.go @@ -0,0 +1,90 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1VMResourceFieldSelector ResourceFieldSelector represents container resources (cpu, memory) and their output format +// +// swagger:model v1VmResourceFieldSelector +type V1VMResourceFieldSelector struct { + + // Container name: required for volumes, optional for env vars + ContainerName string `json:"containerName,omitempty"` + + // divisor + Divisor V1VMQuantity `json:"divisor,omitempty"` + + // Required: resource to select + // Required: true + Resource *string `json:"resource"` +} + +// Validate validates this v1 Vm resource field selector +func (m *V1VMResourceFieldSelector) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateDivisor(formats); err != nil { + res = append(res, err) + } + + if err := m.validateResource(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1VMResourceFieldSelector) validateDivisor(formats strfmt.Registry) error { + + if swag.IsZero(m.Divisor) { // not required + return nil + } + + if err := m.Divisor.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("divisor") + } + return err + } + + return nil +} + +func (m *V1VMResourceFieldSelector) validateResource(formats strfmt.Registry) error { + + if err := validate.Required("resource", "body", m.Resource); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1VMResourceFieldSelector) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1VMResourceFieldSelector) UnmarshalBinary(b []byte) error { + var res V1VMResourceFieldSelector + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_vm_resource_requirements.go b/api/models/v1_vm_resource_requirements.go new file mode 100644 index 00000000..f0a32a26 --- /dev/null +++ b/api/models/v1_vm_resource_requirements.go @@ -0,0 +1,49 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1VMResourceRequirements v1 Vm resource requirements +// +// swagger:model v1VmResourceRequirements +type V1VMResourceRequirements struct { + + // Limits describes the maximum amount of compute resources allowed. Valid resource keys are "memory" and "cpu". + Limits interface{} `json:"limits,omitempty"` + + // Don't ask the scheduler to take the guest-management overhead into account. Instead put the overhead only into the container's memory limit. This can lead to crashes if all memory is in use on a node. Defaults to false. + OvercommitGuestOverhead bool `json:"overcommitGuestOverhead,omitempty"` + + // Requests is a description of the initial vmi resources. Valid resource keys are "memory" and "cpu". + Requests interface{} `json:"requests,omitempty"` +} + +// Validate validates this v1 Vm resource requirements +func (m *V1VMResourceRequirements) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1VMResourceRequirements) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1VMResourceRequirements) UnmarshalBinary(b []byte) error { + var res V1VMResourceRequirements + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_vm_rng.go b/api/models/v1_vm_rng.go new file mode 100644 index 00000000..f8696612 --- /dev/null +++ b/api/models/v1_vm_rng.go @@ -0,0 +1,11 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +// V1VMRng Rng represents the random device passed from host +// +// swagger:model v1VmRng +type V1VMRng interface{} diff --git a/api/models/v1_vm_s_e_v.go b/api/models/v1_vm_s_e_v.go new file mode 100644 index 00000000..c7714195 --- /dev/null +++ b/api/models/v1_vm_s_e_v.go @@ -0,0 +1,11 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +// V1VMSEV v1 Vm s e v +// +// swagger:model v1VmSEV +type V1VMSEV interface{} diff --git a/api/models/v1_vm_secret_volume_source.go b/api/models/v1_vm_secret_volume_source.go new file mode 100644 index 00000000..a9e482f2 --- /dev/null +++ b/api/models/v1_vm_secret_volume_source.go @@ -0,0 +1,49 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1VMSecretVolumeSource SecretVolumeSource adapts a Secret into a volume. +// +// swagger:model v1VmSecretVolumeSource +type V1VMSecretVolumeSource struct { + + // Specify whether the Secret or it's keys must be defined + Optional bool `json:"optional,omitempty"` + + // Name of the secret in the pod's namespace to use. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret + SecretName string `json:"secretName,omitempty"` + + // The volume label of the resulting disk inside the VMI. Different bootstrapping mechanisms require different values. Typical values are "cidata" (cloud-init), "config-2" (cloud-init) or "OEMDRV" (kickstart). + VolumeLabel string `json:"volumeLabel,omitempty"` +} + +// Validate validates this v1 Vm secret volume source +func (m *V1VMSecretVolumeSource) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1VMSecretVolumeSource) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1VMSecretVolumeSource) UnmarshalBinary(b []byte) error { + var res V1VMSecretVolumeSource + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_vm_service_account_volume_source.go b/api/models/v1_vm_service_account_volume_source.go new file mode 100644 index 00000000..f49a1598 --- /dev/null +++ b/api/models/v1_vm_service_account_volume_source.go @@ -0,0 +1,43 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1VMServiceAccountVolumeSource ServiceAccountVolumeSource adapts a ServiceAccount into a volume. +// +// swagger:model v1VmServiceAccountVolumeSource +type V1VMServiceAccountVolumeSource struct { + + // Name of the service account in the pod's namespace to use. More info: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/ + ServiceAccountName string `json:"serviceAccountName,omitempty"` +} + +// Validate validates this v1 Vm service account volume source +func (m *V1VMServiceAccountVolumeSource) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1VMServiceAccountVolumeSource) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1VMServiceAccountVolumeSource) UnmarshalBinary(b []byte) error { + var res V1VMServiceAccountVolumeSource + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_vm_snapshot_volumes_lists.go b/api/models/v1_vm_snapshot_volumes_lists.go new file mode 100644 index 00000000..90d4a57b --- /dev/null +++ b/api/models/v1_vm_snapshot_volumes_lists.go @@ -0,0 +1,46 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1VMSnapshotVolumesLists SnapshotVolumesLists includes the list of volumes which were included in the snapshot and volumes which were excluded from the snapshot +// +// swagger:model v1VmSnapshotVolumesLists +type V1VMSnapshotVolumesLists struct { + + // excluded volumes + ExcludedVolumes []string `json:"excludedVolumes"` + + // included volumes + IncludedVolumes []string `json:"includedVolumes"` +} + +// Validate validates this v1 Vm snapshot volumes lists +func (m *V1VMSnapshotVolumesLists) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1VMSnapshotVolumesLists) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1VMSnapshotVolumesLists) UnmarshalBinary(b []byte) error { + var res V1VMSnapshotVolumesLists + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_vm_sound_device.go b/api/models/v1_vm_sound_device.go new file mode 100644 index 00000000..b806991c --- /dev/null +++ b/api/models/v1_vm_sound_device.go @@ -0,0 +1,67 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1VMSoundDevice Represents the user's configuration to emulate sound cards in the VMI. +// +// swagger:model v1VmSoundDevice +type V1VMSoundDevice struct { + + // We only support ich9 or ac97. If SoundDevice is not set: No sound card is emulated. If SoundDevice is set but Model is not: ich9 + Model string `json:"model,omitempty"` + + // User's defined name for this sound device + // Required: true + Name *string `json:"name"` +} + +// Validate validates this v1 Vm sound device +func (m *V1VMSoundDevice) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateName(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1VMSoundDevice) validateName(formats strfmt.Registry) error { + + if err := validate.Required("name", "body", m.Name); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1VMSoundDevice) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1VMSoundDevice) UnmarshalBinary(b []byte) error { + var res V1VMSoundDevice + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_vm_ssh_public_key_access_credential.go b/api/models/v1_vm_ssh_public_key_access_credential.go new file mode 100644 index 00000000..4d865fad --- /dev/null +++ b/api/models/v1_vm_ssh_public_key_access_credential.go @@ -0,0 +1,99 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1VMSSHPublicKeyAccessCredential SSHPublicKeyAccessCredential represents a source and propagation method for injecting ssh public keys into a vm guest +// +// swagger:model v1VmSshPublicKeyAccessCredential +type V1VMSSHPublicKeyAccessCredential struct { + + // propagation method + // Required: true + PropagationMethod *V1VMSSHPublicKeyAccessCredentialPropagationMethod `json:"propagationMethod"` + + // source + // Required: true + Source *V1VMSSHPublicKeyAccessCredentialSource `json:"source"` +} + +// Validate validates this v1 Vm Ssh public key access credential +func (m *V1VMSSHPublicKeyAccessCredential) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validatePropagationMethod(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSource(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1VMSSHPublicKeyAccessCredential) validatePropagationMethod(formats strfmt.Registry) error { + + if err := validate.Required("propagationMethod", "body", m.PropagationMethod); err != nil { + return err + } + + if m.PropagationMethod != nil { + if err := m.PropagationMethod.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("propagationMethod") + } + return err + } + } + + return nil +} + +func (m *V1VMSSHPublicKeyAccessCredential) validateSource(formats strfmt.Registry) error { + + if err := validate.Required("source", "body", m.Source); err != nil { + return err + } + + if m.Source != nil { + if err := m.Source.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("source") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1VMSSHPublicKeyAccessCredential) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1VMSSHPublicKeyAccessCredential) UnmarshalBinary(b []byte) error { + var res V1VMSSHPublicKeyAccessCredential + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_vm_ssh_public_key_access_credential_propagation_method.go b/api/models/v1_vm_ssh_public_key_access_credential_propagation_method.go new file mode 100644 index 00000000..ea7d5b78 --- /dev/null +++ b/api/models/v1_vm_ssh_public_key_access_credential_propagation_method.go @@ -0,0 +1,74 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1VMSSHPublicKeyAccessCredentialPropagationMethod SSHPublicKeyAccessCredentialPropagationMethod represents the method used to inject a ssh public key into the vm guest. Only one of its members may be specified. +// +// swagger:model v1VmSshPublicKeyAccessCredentialPropagationMethod +type V1VMSSHPublicKeyAccessCredentialPropagationMethod struct { + + // config drive + ConfigDrive V1VMConfigDriveSSHPublicKeyAccessCredentialPropagation `json:"configDrive,omitempty"` + + // qemu guest agent + QemuGuestAgent *V1VMQemuGuestAgentSSHPublicKeyAccessCredentialPropagation `json:"qemuGuestAgent,omitempty"` +} + +// Validate validates this v1 Vm Ssh public key access credential propagation method +func (m *V1VMSSHPublicKeyAccessCredentialPropagationMethod) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateQemuGuestAgent(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1VMSSHPublicKeyAccessCredentialPropagationMethod) validateQemuGuestAgent(formats strfmt.Registry) error { + + if swag.IsZero(m.QemuGuestAgent) { // not required + return nil + } + + if m.QemuGuestAgent != nil { + if err := m.QemuGuestAgent.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("qemuGuestAgent") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1VMSSHPublicKeyAccessCredentialPropagationMethod) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1VMSSHPublicKeyAccessCredentialPropagationMethod) UnmarshalBinary(b []byte) error { + var res V1VMSSHPublicKeyAccessCredentialPropagationMethod + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_vm_ssh_public_key_access_credential_source.go b/api/models/v1_vm_ssh_public_key_access_credential_source.go new file mode 100644 index 00000000..2298b0c2 --- /dev/null +++ b/api/models/v1_vm_ssh_public_key_access_credential_source.go @@ -0,0 +1,71 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1VMSSHPublicKeyAccessCredentialSource SSHPublicKeyAccessCredentialSource represents where to retrieve the ssh key credentials Only one of its members may be specified. +// +// swagger:model v1VmSshPublicKeyAccessCredentialSource +type V1VMSSHPublicKeyAccessCredentialSource struct { + + // secret + Secret *V1VMAccessCredentialSecretSource `json:"secret,omitempty"` +} + +// Validate validates this v1 Vm Ssh public key access credential source +func (m *V1VMSSHPublicKeyAccessCredentialSource) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateSecret(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1VMSSHPublicKeyAccessCredentialSource) validateSecret(formats strfmt.Registry) error { + + if swag.IsZero(m.Secret) { // not required + return nil + } + + if m.Secret != nil { + if err := m.Secret.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("secret") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1VMSSHPublicKeyAccessCredentialSource) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1VMSSHPublicKeyAccessCredentialSource) UnmarshalBinary(b []byte) error { + var res V1VMSSHPublicKeyAccessCredentialSource + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_vm_storage_spec.go b/api/models/v1_vm_storage_spec.go new file mode 100644 index 00000000..ff890b37 --- /dev/null +++ b/api/models/v1_vm_storage_spec.go @@ -0,0 +1,133 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1VMStorageSpec StorageSpec defines the Storage type specification +// +// swagger:model v1VmStorageSpec +type V1VMStorageSpec struct { + + // AccessModes contains the desired access modes the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1 + AccessModes []string `json:"accessModes"` + + // data source + DataSource *V1VMTypedLocalObjectReference `json:"dataSource,omitempty"` + + // resources + Resources *V1VMCoreResourceRequirements `json:"resources,omitempty"` + + // selector + Selector *V1VMLabelSelector `json:"selector,omitempty"` + + // Name of the StorageClass required by the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1 + StorageClassName string `json:"storageClassName,omitempty"` + + // volumeMode defines what type of volume is required by the claim. Value of Filesystem is implied when not included in claim spec. + VolumeMode string `json:"volumeMode,omitempty"` + + // VolumeName is the binding reference to the PersistentVolume backing this claim. + VolumeName string `json:"volumeName,omitempty"` +} + +// Validate validates this v1 Vm storage spec +func (m *V1VMStorageSpec) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateDataSource(formats); err != nil { + res = append(res, err) + } + + if err := m.validateResources(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSelector(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1VMStorageSpec) validateDataSource(formats strfmt.Registry) error { + + if swag.IsZero(m.DataSource) { // not required + return nil + } + + if m.DataSource != nil { + if err := m.DataSource.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("dataSource") + } + return err + } + } + + return nil +} + +func (m *V1VMStorageSpec) validateResources(formats strfmt.Registry) error { + + if swag.IsZero(m.Resources) { // not required + return nil + } + + if m.Resources != nil { + if err := m.Resources.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("resources") + } + return err + } + } + + return nil +} + +func (m *V1VMStorageSpec) validateSelector(formats strfmt.Registry) error { + + if swag.IsZero(m.Selector) { // not required + return nil + } + + if m.Selector != nil { + if err := m.Selector.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("selector") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1VMStorageSpec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1VMStorageSpec) UnmarshalBinary(b []byte) error { + var res V1VMStorageSpec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_vm_sy_n_i_c_timer.go b/api/models/v1_vm_sy_n_i_c_timer.go new file mode 100644 index 00000000..e0165ac0 --- /dev/null +++ b/api/models/v1_vm_sy_n_i_c_timer.go @@ -0,0 +1,74 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1VMSyNICTimer v1 Vm sy n i c timer +// +// swagger:model v1VmSyNICTimer +type V1VMSyNICTimer struct { + + // direct + Direct *V1VMFeatureState `json:"direct,omitempty"` + + // enabled + Enabled bool `json:"enabled,omitempty"` +} + +// Validate validates this v1 Vm sy n i c timer +func (m *V1VMSyNICTimer) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateDirect(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1VMSyNICTimer) validateDirect(formats strfmt.Registry) error { + + if swag.IsZero(m.Direct) { // not required + return nil + } + + if m.Direct != nil { + if err := m.Direct.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("direct") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1VMSyNICTimer) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1VMSyNICTimer) UnmarshalBinary(b []byte) error { + var res V1VMSyNICTimer + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_vm_sysprep_source.go b/api/models/v1_vm_sysprep_source.go new file mode 100644 index 00000000..77cc7b4a --- /dev/null +++ b/api/models/v1_vm_sysprep_source.go @@ -0,0 +1,96 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1VMSysprepSource Represents a Sysprep volume source. +// +// swagger:model v1VmSysprepSource +type V1VMSysprepSource struct { + + // config map + ConfigMap *V1VMLocalObjectReference `json:"configMap,omitempty"` + + // secret + Secret *V1VMLocalObjectReference `json:"secret,omitempty"` +} + +// Validate validates this v1 Vm sysprep source +func (m *V1VMSysprepSource) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateConfigMap(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSecret(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1VMSysprepSource) validateConfigMap(formats strfmt.Registry) error { + + if swag.IsZero(m.ConfigMap) { // not required + return nil + } + + if m.ConfigMap != nil { + if err := m.ConfigMap.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("configMap") + } + return err + } + } + + return nil +} + +func (m *V1VMSysprepSource) validateSecret(formats strfmt.Registry) error { + + if swag.IsZero(m.Secret) { // not required + return nil + } + + if m.Secret != nil { + if err := m.Secret.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("secret") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1VMSysprepSource) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1VMSysprepSource) UnmarshalBinary(b []byte) error { + var res V1VMSysprepSource + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_vm_t_p_m_device.go b/api/models/v1_vm_t_p_m_device.go new file mode 100644 index 00000000..fae7b772 --- /dev/null +++ b/api/models/v1_vm_t_p_m_device.go @@ -0,0 +1,11 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +// V1VMTPMDevice v1 Vm t p m device +// +// swagger:model v1VmTPMDevice +type V1VMTPMDevice interface{} diff --git a/api/models/v1_vm_tcp_socket_action.go b/api/models/v1_vm_tcp_socket_action.go new file mode 100644 index 00000000..aac27469 --- /dev/null +++ b/api/models/v1_vm_tcp_socket_action.go @@ -0,0 +1,67 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1VMTCPSocketAction TCPSocketAction describes an action based on opening a socket +// +// swagger:model v1VmTcpSocketAction +type V1VMTCPSocketAction struct { + + // Optional: Host name to connect to, defaults to the pod IP. + Host string `json:"host,omitempty"` + + // Number or name of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. + // Required: true + Port *string `json:"port"` +} + +// Validate validates this v1 Vm Tcp socket action +func (m *V1VMTCPSocketAction) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validatePort(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1VMTCPSocketAction) validatePort(formats strfmt.Registry) error { + + if err := validate.Required("port", "body", m.Port); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1VMTCPSocketAction) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1VMTCPSocketAction) UnmarshalBinary(b []byte) error { + var res V1VMTCPSocketAction + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_vm_timer.go b/api/models/v1_vm_timer.go new file mode 100644 index 00000000..0322f2aa --- /dev/null +++ b/api/models/v1_vm_timer.go @@ -0,0 +1,171 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1VMTimer Represents all available timers in a vmi. +// +// swagger:model v1VmTimer +type V1VMTimer struct { + + // hpet + Hpet *V1VMHPETTimer `json:"hpet,omitempty"` + + // hyperv + Hyperv *V1VMHypervTimer `json:"hyperv,omitempty"` + + // kvm + Kvm *V1VMKVMTimer `json:"kvm,omitempty"` + + // pit + Pit *V1VMPITTimer `json:"pit,omitempty"` + + // rtc + Rtc *V1VMRTCTimer `json:"rtc,omitempty"` +} + +// Validate validates this v1 Vm timer +func (m *V1VMTimer) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateHpet(formats); err != nil { + res = append(res, err) + } + + if err := m.validateHyperv(formats); err != nil { + res = append(res, err) + } + + if err := m.validateKvm(formats); err != nil { + res = append(res, err) + } + + if err := m.validatePit(formats); err != nil { + res = append(res, err) + } + + if err := m.validateRtc(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1VMTimer) validateHpet(formats strfmt.Registry) error { + + if swag.IsZero(m.Hpet) { // not required + return nil + } + + if m.Hpet != nil { + if err := m.Hpet.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("hpet") + } + return err + } + } + + return nil +} + +func (m *V1VMTimer) validateHyperv(formats strfmt.Registry) error { + + if swag.IsZero(m.Hyperv) { // not required + return nil + } + + if m.Hyperv != nil { + if err := m.Hyperv.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("hyperv") + } + return err + } + } + + return nil +} + +func (m *V1VMTimer) validateKvm(formats strfmt.Registry) error { + + if swag.IsZero(m.Kvm) { // not required + return nil + } + + if m.Kvm != nil { + if err := m.Kvm.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("kvm") + } + return err + } + } + + return nil +} + +func (m *V1VMTimer) validatePit(formats strfmt.Registry) error { + + if swag.IsZero(m.Pit) { // not required + return nil + } + + if m.Pit != nil { + if err := m.Pit.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("pit") + } + return err + } + } + + return nil +} + +func (m *V1VMTimer) validateRtc(formats strfmt.Registry) error { + + if swag.IsZero(m.Rtc) { // not required + return nil + } + + if m.Rtc != nil { + if err := m.Rtc.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("rtc") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1VMTimer) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1VMTimer) UnmarshalBinary(b []byte) error { + var res V1VMTimer + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_vm_toleration.go b/api/models/v1_vm_toleration.go new file mode 100644 index 00000000..901ed061 --- /dev/null +++ b/api/models/v1_vm_toleration.go @@ -0,0 +1,55 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1VMToleration The pod this Toleration is attached to tolerates any taint that matches the triple using the matching operator . +// +// swagger:model v1VmToleration +type V1VMToleration struct { + + // Effect indicates the taint effect to match. Empty means match all taint effects. When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute. + Effect string `json:"effect,omitempty"` + + // Key is the taint key that the toleration applies to. Empty means match all taint keys. If the key is empty, operator must be Exists; this combination means to match all values and all keys. + Key string `json:"key,omitempty"` + + // Operator represents a key's relationship to the value. Valid operators are Exists and Equal. Defaults to Equal. Exists is equivalent to wildcard for value, so that a pod can tolerate all taints of a particular category. + Operator string `json:"operator,omitempty"` + + // TolerationSeconds represents the period of time the toleration (which must be of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default, it is not set, which means tolerate the taint forever (do not evict). Zero and negative values will be treated as 0 (evict immediately) by the system. + TolerationSeconds int64 `json:"tolerationSeconds,omitempty"` + + // Value is the taint value the toleration matches to. If the operator is Exists, the value should be empty, otherwise just a regular string. + Value string `json:"value,omitempty"` +} + +// Validate validates this v1 Vm toleration +func (m *V1VMToleration) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1VMToleration) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1VMToleration) UnmarshalBinary(b []byte) error { + var res V1VMToleration + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_vm_topology_spread_constraint.go b/api/models/v1_vm_topology_spread_constraint.go new file mode 100644 index 00000000..bb774e3a --- /dev/null +++ b/api/models/v1_vm_topology_spread_constraint.go @@ -0,0 +1,126 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1VMTopologySpreadConstraint TopologySpreadConstraint specifies how to spread matching pods among the given topology. +// +// swagger:model v1VmTopologySpreadConstraint +type V1VMTopologySpreadConstraint struct { + + // label selector + LabelSelector *V1VMLabelSelector `json:"labelSelector,omitempty"` + + // MaxSkew describes the degree to which pods may be unevenly distributed. When `whenUnsatisfiable=DoNotSchedule`, it is the maximum permitted difference between the number of matching pods in the target topology and the global minimum. For example, in a 3-zone cluster, MaxSkew is set to 1, and pods with the same labelSelector spread as 1/1/0: | zone1 | zone2 | zone3 | | P | P | | - if MaxSkew is 1, incoming pod can only be scheduled to zone3 to become 1/1/1; scheduling it onto zone1(zone2) would make the ActualSkew(2-0) on zone1(zone2) violate MaxSkew(1). - if MaxSkew is 2, incoming pod can be scheduled onto any zone. When `whenUnsatisfiable=ScheduleAnyway`, it is used to give higher precedence to topologies that satisfy it. It's a required field. Default value is 1 and 0 is not allowed. + // Required: true + MaxSkew *int32 `json:"maxSkew"` + + // TopologyKey is the key of node labels. Nodes that have a label with this key and identical values are considered to be in the same topology. We consider each as a "bucket", and try to put balanced number of pods into each bucket. It's a required field. + // Required: true + TopologyKey *string `json:"topologyKey"` + + // WhenUnsatisfiable indicates how to deal with a pod if it doesn't satisfy the spread constraint. - DoNotSchedule (default) tells the scheduler not to schedule it. - ScheduleAnyway tells the scheduler to schedule the pod in any location, + // but giving higher precedence to topologies that would help reduce the + // skew. + // A constraint is considered "Unsatisfiable" for an incoming pod if and only if every possible node assignment for that pod would violate "MaxSkew" on some topology. For example, in a 3-zone cluster, MaxSkew is set to 1, and pods with the same labelSelector spread as 3/1/1: | zone1 | zone2 | zone3 | | P P P | P | P | If WhenUnsatisfiable is set to DoNotSchedule, incoming pod can only be scheduled to zone2(zone3) to become 3/2/1(3/1/2) as ActualSkew(2-1) on zone2(zone3) satisfies MaxSkew(1). In other words, the cluster can still be imbalanced, but scheduler won't make it *more* imbalanced. It's a required field. + // Required: true + WhenUnsatisfiable *string `json:"whenUnsatisfiable"` +} + +// Validate validates this v1 Vm topology spread constraint +func (m *V1VMTopologySpreadConstraint) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateLabelSelector(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMaxSkew(formats); err != nil { + res = append(res, err) + } + + if err := m.validateTopologyKey(formats); err != nil { + res = append(res, err) + } + + if err := m.validateWhenUnsatisfiable(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1VMTopologySpreadConstraint) validateLabelSelector(formats strfmt.Registry) error { + + if swag.IsZero(m.LabelSelector) { // not required + return nil + } + + if m.LabelSelector != nil { + if err := m.LabelSelector.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("labelSelector") + } + return err + } + } + + return nil +} + +func (m *V1VMTopologySpreadConstraint) validateMaxSkew(formats strfmt.Registry) error { + + if err := validate.Required("maxSkew", "body", m.MaxSkew); err != nil { + return err + } + + return nil +} + +func (m *V1VMTopologySpreadConstraint) validateTopologyKey(formats strfmt.Registry) error { + + if err := validate.Required("topologyKey", "body", m.TopologyKey); err != nil { + return err + } + + return nil +} + +func (m *V1VMTopologySpreadConstraint) validateWhenUnsatisfiable(formats strfmt.Registry) error { + + if err := validate.Required("whenUnsatisfiable", "body", m.WhenUnsatisfiable); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1VMTopologySpreadConstraint) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1VMTopologySpreadConstraint) UnmarshalBinary(b []byte) error { + var res V1VMTopologySpreadConstraint + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_vm_typed_local_object_reference.go b/api/models/v1_vm_typed_local_object_reference.go new file mode 100644 index 00000000..50fc3cc6 --- /dev/null +++ b/api/models/v1_vm_typed_local_object_reference.go @@ -0,0 +1,84 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1VMTypedLocalObjectReference TypedLocalObjectReference contains enough information to let you locate the typed referenced object inside the same namespace. +// +// swagger:model v1VmTypedLocalObjectReference +type V1VMTypedLocalObjectReference struct { + + // APIGroup is the group for the resource being referenced. If APIGroup is not specified, the specified Kind must be in the core API group. For any other third-party types, APIGroup is required. + APIGroup string `json:"apiGroup,omitempty"` + + // Kind is the type of resource being referenced + // Required: true + Kind *string `json:"kind"` + + // Name is the name of resource being referenced + // Required: true + Name *string `json:"name"` +} + +// Validate validates this v1 Vm typed local object reference +func (m *V1VMTypedLocalObjectReference) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateKind(formats); err != nil { + res = append(res, err) + } + + if err := m.validateName(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1VMTypedLocalObjectReference) validateKind(formats strfmt.Registry) error { + + if err := validate.Required("kind", "body", m.Kind); err != nil { + return err + } + + return nil +} + +func (m *V1VMTypedLocalObjectReference) validateName(formats strfmt.Registry) error { + + if err := validate.Required("name", "body", m.Name); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1VMTypedLocalObjectReference) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1VMTypedLocalObjectReference) UnmarshalBinary(b []byte) error { + var res V1VMTypedLocalObjectReference + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_vm_user_password_access_credential.go b/api/models/v1_vm_user_password_access_credential.go new file mode 100644 index 00000000..073d7ab8 --- /dev/null +++ b/api/models/v1_vm_user_password_access_credential.go @@ -0,0 +1,99 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1VMUserPasswordAccessCredential UserPasswordAccessCredential represents a source and propagation method for injecting user passwords into a vm guest Only one of its members may be specified. +// +// swagger:model v1VmUserPasswordAccessCredential +type V1VMUserPasswordAccessCredential struct { + + // propagation method + // Required: true + PropagationMethod *V1VMUserPasswordAccessCredentialPropagationMethod `json:"propagationMethod"` + + // source + // Required: true + Source *V1VMUserPasswordAccessCredentialSource `json:"source"` +} + +// Validate validates this v1 Vm user password access credential +func (m *V1VMUserPasswordAccessCredential) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validatePropagationMethod(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSource(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1VMUserPasswordAccessCredential) validatePropagationMethod(formats strfmt.Registry) error { + + if err := validate.Required("propagationMethod", "body", m.PropagationMethod); err != nil { + return err + } + + if m.PropagationMethod != nil { + if err := m.PropagationMethod.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("propagationMethod") + } + return err + } + } + + return nil +} + +func (m *V1VMUserPasswordAccessCredential) validateSource(formats strfmt.Registry) error { + + if err := validate.Required("source", "body", m.Source); err != nil { + return err + } + + if m.Source != nil { + if err := m.Source.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("source") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1VMUserPasswordAccessCredential) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1VMUserPasswordAccessCredential) UnmarshalBinary(b []byte) error { + var res V1VMUserPasswordAccessCredential + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_vm_user_password_access_credential_propagation_method.go b/api/models/v1_vm_user_password_access_credential_propagation_method.go new file mode 100644 index 00000000..b6e1aee3 --- /dev/null +++ b/api/models/v1_vm_user_password_access_credential_propagation_method.go @@ -0,0 +1,43 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1VMUserPasswordAccessCredentialPropagationMethod UserPasswordAccessCredentialPropagationMethod represents the method used to inject a user passwords into the vm guest. Only one of its members may be specified. +// +// swagger:model v1VmUserPasswordAccessCredentialPropagationMethod +type V1VMUserPasswordAccessCredentialPropagationMethod struct { + + // qemu guest agent + QemuGuestAgent V1VMQemuGuestAgentUserPasswordAccessCredentialPropagation `json:"qemuGuestAgent,omitempty"` +} + +// Validate validates this v1 Vm user password access credential propagation method +func (m *V1VMUserPasswordAccessCredentialPropagationMethod) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1VMUserPasswordAccessCredentialPropagationMethod) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1VMUserPasswordAccessCredentialPropagationMethod) UnmarshalBinary(b []byte) error { + var res V1VMUserPasswordAccessCredentialPropagationMethod + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_vm_user_password_access_credential_source.go b/api/models/v1_vm_user_password_access_credential_source.go new file mode 100644 index 00000000..78c8f1f1 --- /dev/null +++ b/api/models/v1_vm_user_password_access_credential_source.go @@ -0,0 +1,71 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1VMUserPasswordAccessCredentialSource UserPasswordAccessCredentialSource represents where to retrieve the user password credentials Only one of its members may be specified. +// +// swagger:model v1VmUserPasswordAccessCredentialSource +type V1VMUserPasswordAccessCredentialSource struct { + + // secret + Secret *V1VMAccessCredentialSecretSource `json:"secret,omitempty"` +} + +// Validate validates this v1 Vm user password access credential source +func (m *V1VMUserPasswordAccessCredentialSource) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateSecret(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1VMUserPasswordAccessCredentialSource) validateSecret(formats strfmt.Registry) error { + + if swag.IsZero(m.Secret) { // not required + return nil + } + + if m.Secret != nil { + if err := m.Secret.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("secret") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1VMUserPasswordAccessCredentialSource) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1VMUserPasswordAccessCredentialSource) UnmarshalBinary(b []byte) error { + var res V1VMUserPasswordAccessCredentialSource + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_vm_v_g_p_u_display_options.go b/api/models/v1_vm_v_g_p_u_display_options.go new file mode 100644 index 00000000..1bd8d130 --- /dev/null +++ b/api/models/v1_vm_v_g_p_u_display_options.go @@ -0,0 +1,74 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1VMVGPUDisplayOptions v1 Vm v g p u display options +// +// swagger:model v1VmVGPUDisplayOptions +type V1VMVGPUDisplayOptions struct { + + // Enabled determines if a display addapter backed by a vGPU should be enabled or disabled on the guest. Defaults to true. + Enabled bool `json:"enabled,omitempty"` + + // ram f b + RAMFB *V1VMFeatureState `json:"ramFB,omitempty"` +} + +// Validate validates this v1 Vm v g p u display options +func (m *V1VMVGPUDisplayOptions) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateRAMFB(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1VMVGPUDisplayOptions) validateRAMFB(formats strfmt.Registry) error { + + if swag.IsZero(m.RAMFB) { // not required + return nil + } + + if m.RAMFB != nil { + if err := m.RAMFB.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("ramFB") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1VMVGPUDisplayOptions) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1VMVGPUDisplayOptions) UnmarshalBinary(b []byte) error { + var res V1VMVGPUDisplayOptions + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_vm_v_g_p_u_options.go b/api/models/v1_vm_v_g_p_u_options.go new file mode 100644 index 00000000..f8a2a5c5 --- /dev/null +++ b/api/models/v1_vm_v_g_p_u_options.go @@ -0,0 +1,71 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1VMVGPUOptions v1 Vm v g p u options +// +// swagger:model v1VmVGPUOptions +type V1VMVGPUOptions struct { + + // display + Display *V1VMVGPUDisplayOptions `json:"display,omitempty"` +} + +// Validate validates this v1 Vm v g p u options +func (m *V1VMVGPUOptions) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateDisplay(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1VMVGPUOptions) validateDisplay(formats strfmt.Registry) error { + + if swag.IsZero(m.Display) { // not required + return nil + } + + if m.Display != nil { + if err := m.Display.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("display") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1VMVGPUOptions) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1VMVGPUOptions) UnmarshalBinary(b []byte) error { + var res V1VMVGPUOptions + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_vm_virtual_machine_condition.go b/api/models/v1_vm_virtual_machine_condition.go new file mode 100644 index 00000000..f43184eb --- /dev/null +++ b/api/models/v1_vm_virtual_machine_condition.go @@ -0,0 +1,93 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1VMVirtualMachineCondition VirtualMachineCondition represents the state of VirtualMachine +// +// swagger:model v1VmVirtualMachineCondition +type V1VMVirtualMachineCondition struct { + + // last probe time + LastProbeTime string `json:"lastProbeTime,omitempty"` + + // last transition time + LastTransitionTime string `json:"lastTransitionTime,omitempty"` + + // message + Message string `json:"message,omitempty"` + + // reason + Reason string `json:"reason,omitempty"` + + // status + // Required: true + Status *string `json:"status"` + + // type + // Required: true + Type *string `json:"type"` +} + +// Validate validates this v1 Vm virtual machine condition +func (m *V1VMVirtualMachineCondition) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateStatus(formats); err != nil { + res = append(res, err) + } + + if err := m.validateType(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1VMVirtualMachineCondition) validateStatus(formats strfmt.Registry) error { + + if err := validate.Required("status", "body", m.Status); err != nil { + return err + } + + return nil +} + +func (m *V1VMVirtualMachineCondition) validateType(formats strfmt.Registry) error { + + if err := validate.Required("type", "body", m.Type); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1VMVirtualMachineCondition) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1VMVirtualMachineCondition) UnmarshalBinary(b []byte) error { + var res V1VMVirtualMachineCondition + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_vm_virtual_machine_instance_spec.go b/api/models/v1_vm_virtual_machine_instance_spec.go new file mode 100644 index 00000000..2c56b4eb --- /dev/null +++ b/api/models/v1_vm_virtual_machine_instance_spec.go @@ -0,0 +1,362 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1VMVirtualMachineInstanceSpec VirtualMachineInstanceSpec is a description of a VirtualMachineInstance. +// +// swagger:model v1VmVirtualMachineInstanceSpec +type V1VMVirtualMachineInstanceSpec struct { + + // Specifies a set of public keys to inject into the vm guest + AccessCredentials []*V1VMAccessCredential `json:"accessCredentials"` + + // affinity + Affinity *V1VMAffinity `json:"affinity,omitempty"` + + // dns config + DNSConfig *V1VMPodDNSConfig `json:"dnsConfig,omitempty"` + + // Set DNS policy for the pod. Defaults to "ClusterFirst". Valid values are 'ClusterFirstWithHostNet', 'ClusterFirst', 'Default' or 'None'. DNS parameters given in DNSConfig will be merged with the policy selected with DNSPolicy. To have DNS options set along with hostNetwork, you have to specify DNS policy explicitly to 'ClusterFirstWithHostNet'. + DNSPolicy string `json:"dnsPolicy,omitempty"` + + // domain + // Required: true + Domain *V1VMDomainSpec `json:"domain"` + + // EvictionStrategy can be set to "LiveMigrate" if the VirtualMachineInstance should be migrated instead of shut-off in case of a node drain. + EvictionStrategy string `json:"evictionStrategy,omitempty"` + + // Specifies the hostname of the vmi If not specified, the hostname will be set to the name of the vmi, if dhcp or cloud-init is configured properly. + Hostname string `json:"hostname,omitempty"` + + // liveness probe + LivenessProbe *V1VMProbe `json:"livenessProbe,omitempty"` + + // List of networks that can be attached to a vm's virtual interface. + Networks []*V1VMNetwork `json:"networks"` + + // NodeSelector is a selector which must be true for the vmi to fit on a node. Selector which must match a node's labels for the vmi to be scheduled on that node. More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/ + NodeSelector map[string]string `json:"nodeSelector,omitempty"` + + // If specified, indicates the pod's priority. If not specified, the pod priority will be default or zero if there is no default. + PriorityClassName string `json:"priorityClassName,omitempty"` + + // readiness probe + ReadinessProbe *V1VMProbe `json:"readinessProbe,omitempty"` + + // If specified, the VMI will be dispatched by specified scheduler. If not specified, the VMI will be dispatched by default scheduler. + SchedulerName string `json:"schedulerName,omitempty"` + + // StartStrategy can be set to "Paused" if Virtual Machine should be started in paused state. + StartStrategy string `json:"startStrategy,omitempty"` + + // If specified, the fully qualified vmi hostname will be "...svc.". If not specified, the vmi will not have a domainname at all. The DNS entry will resolve to the vmi, no matter if the vmi itself can pick up a hostname. + Subdomain string `json:"subdomain,omitempty"` + + // Grace period observed after signalling a VirtualMachineInstance to stop after which the VirtualMachineInstance is force terminated. + TerminationGracePeriodSeconds int64 `json:"terminationGracePeriodSeconds,omitempty"` + + // If toleration is specified, obey all the toleration rules. + Tolerations []*V1VMToleration `json:"tolerations"` + + // TopologySpreadConstraints describes how a group of VMIs will be spread across a given topology domains. K8s scheduler will schedule VMI pods in a way which abides by the constraints. + TopologySpreadConstraints []*V1VMTopologySpreadConstraint `json:"topologySpreadConstraints"` + + // List of volumes that can be mounted by disks belonging to the vmi. + Volumes []*V1VMVolume `json:"volumes"` +} + +// Validate validates this v1 Vm virtual machine instance spec +func (m *V1VMVirtualMachineInstanceSpec) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateAccessCredentials(formats); err != nil { + res = append(res, err) + } + + if err := m.validateAffinity(formats); err != nil { + res = append(res, err) + } + + if err := m.validateDNSConfig(formats); err != nil { + res = append(res, err) + } + + if err := m.validateDomain(formats); err != nil { + res = append(res, err) + } + + if err := m.validateLivenessProbe(formats); err != nil { + res = append(res, err) + } + + if err := m.validateNetworks(formats); err != nil { + res = append(res, err) + } + + if err := m.validateReadinessProbe(formats); err != nil { + res = append(res, err) + } + + if err := m.validateTolerations(formats); err != nil { + res = append(res, err) + } + + if err := m.validateTopologySpreadConstraints(formats); err != nil { + res = append(res, err) + } + + if err := m.validateVolumes(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1VMVirtualMachineInstanceSpec) validateAccessCredentials(formats strfmt.Registry) error { + + if swag.IsZero(m.AccessCredentials) { // not required + return nil + } + + for i := 0; i < len(m.AccessCredentials); i++ { + if swag.IsZero(m.AccessCredentials[i]) { // not required + continue + } + + if m.AccessCredentials[i] != nil { + if err := m.AccessCredentials[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("accessCredentials" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1VMVirtualMachineInstanceSpec) validateAffinity(formats strfmt.Registry) error { + + if swag.IsZero(m.Affinity) { // not required + return nil + } + + if m.Affinity != nil { + if err := m.Affinity.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("affinity") + } + return err + } + } + + return nil +} + +func (m *V1VMVirtualMachineInstanceSpec) validateDNSConfig(formats strfmt.Registry) error { + + if swag.IsZero(m.DNSConfig) { // not required + return nil + } + + if m.DNSConfig != nil { + if err := m.DNSConfig.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("dnsConfig") + } + return err + } + } + + return nil +} + +func (m *V1VMVirtualMachineInstanceSpec) validateDomain(formats strfmt.Registry) error { + + if err := validate.Required("domain", "body", m.Domain); err != nil { + return err + } + + if m.Domain != nil { + if err := m.Domain.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("domain") + } + return err + } + } + + return nil +} + +func (m *V1VMVirtualMachineInstanceSpec) validateLivenessProbe(formats strfmt.Registry) error { + + if swag.IsZero(m.LivenessProbe) { // not required + return nil + } + + if m.LivenessProbe != nil { + if err := m.LivenessProbe.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("livenessProbe") + } + return err + } + } + + return nil +} + +func (m *V1VMVirtualMachineInstanceSpec) validateNetworks(formats strfmt.Registry) error { + + if swag.IsZero(m.Networks) { // not required + return nil + } + + for i := 0; i < len(m.Networks); i++ { + if swag.IsZero(m.Networks[i]) { // not required + continue + } + + if m.Networks[i] != nil { + if err := m.Networks[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("networks" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1VMVirtualMachineInstanceSpec) validateReadinessProbe(formats strfmt.Registry) error { + + if swag.IsZero(m.ReadinessProbe) { // not required + return nil + } + + if m.ReadinessProbe != nil { + if err := m.ReadinessProbe.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("readinessProbe") + } + return err + } + } + + return nil +} + +func (m *V1VMVirtualMachineInstanceSpec) validateTolerations(formats strfmt.Registry) error { + + if swag.IsZero(m.Tolerations) { // not required + return nil + } + + for i := 0; i < len(m.Tolerations); i++ { + if swag.IsZero(m.Tolerations[i]) { // not required + continue + } + + if m.Tolerations[i] != nil { + if err := m.Tolerations[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("tolerations" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1VMVirtualMachineInstanceSpec) validateTopologySpreadConstraints(formats strfmt.Registry) error { + + if swag.IsZero(m.TopologySpreadConstraints) { // not required + return nil + } + + for i := 0; i < len(m.TopologySpreadConstraints); i++ { + if swag.IsZero(m.TopologySpreadConstraints[i]) { // not required + continue + } + + if m.TopologySpreadConstraints[i] != nil { + if err := m.TopologySpreadConstraints[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("topologySpreadConstraints" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1VMVirtualMachineInstanceSpec) validateVolumes(formats strfmt.Registry) error { + + if swag.IsZero(m.Volumes) { // not required + return nil + } + + for i := 0; i < len(m.Volumes); i++ { + if swag.IsZero(m.Volumes[i]) { // not required + continue + } + + if m.Volumes[i] != nil { + if err := m.Volumes[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("volumes" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1VMVirtualMachineInstanceSpec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1VMVirtualMachineInstanceSpec) UnmarshalBinary(b []byte) error { + var res V1VMVirtualMachineInstanceSpec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_vm_virtual_machine_instance_template_spec.go b/api/models/v1_vm_virtual_machine_instance_template_spec.go new file mode 100644 index 00000000..02264c9c --- /dev/null +++ b/api/models/v1_vm_virtual_machine_instance_template_spec.go @@ -0,0 +1,96 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1VMVirtualMachineInstanceTemplateSpec v1 Vm virtual machine instance template spec +// +// swagger:model v1VmVirtualMachineInstanceTemplateSpec +type V1VMVirtualMachineInstanceTemplateSpec struct { + + // metadata + Metadata *V1VMObjectMeta `json:"metadata,omitempty"` + + // spec + Spec *V1VMVirtualMachineInstanceSpec `json:"spec,omitempty"` +} + +// Validate validates this v1 Vm virtual machine instance template spec +func (m *V1VMVirtualMachineInstanceTemplateSpec) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSpec(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1VMVirtualMachineInstanceTemplateSpec) validateMetadata(formats strfmt.Registry) error { + + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } + return err + } + } + + return nil +} + +func (m *V1VMVirtualMachineInstanceTemplateSpec) validateSpec(formats strfmt.Registry) error { + + if swag.IsZero(m.Spec) { // not required + return nil + } + + if m.Spec != nil { + if err := m.Spec.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1VMVirtualMachineInstanceTemplateSpec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1VMVirtualMachineInstanceTemplateSpec) UnmarshalBinary(b []byte) error { + var res V1VMVirtualMachineInstanceTemplateSpec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_vm_virtual_machine_memory_dump_request.go b/api/models/v1_vm_virtual_machine_memory_dump_request.go new file mode 100644 index 00000000..cb561ad5 --- /dev/null +++ b/api/models/v1_vm_virtual_machine_memory_dump_request.go @@ -0,0 +1,138 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1VMVirtualMachineMemoryDumpRequest VirtualMachineMemoryDumpRequest represent the memory dump request phase and info +// +// swagger:model v1VmVirtualMachineMemoryDumpRequest +type V1VMVirtualMachineMemoryDumpRequest struct { + + // ClaimName is the name of the pvc that will contain the memory dump + // Required: true + ClaimName *string `json:"claimName"` + + // end timestamp + // Format: date-time + EndTimestamp V1Time `json:"endTimestamp,omitempty"` + + // FileName represents the name of the output file + FileName string `json:"fileName,omitempty"` + + // Message is a detailed message about failure of the memory dump + Message string `json:"message,omitempty"` + + // Phase represents the memory dump phase + // Required: true + Phase *string `json:"phase"` + + // Remove represents request of dissociating the memory dump pvc + Remove bool `json:"remove,omitempty"` + + // start timestamp + // Format: date-time + StartTimestamp V1Time `json:"startTimestamp,omitempty"` +} + +// Validate validates this v1 Vm virtual machine memory dump request +func (m *V1VMVirtualMachineMemoryDumpRequest) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateClaimName(formats); err != nil { + res = append(res, err) + } + + if err := m.validateEndTimestamp(formats); err != nil { + res = append(res, err) + } + + if err := m.validatePhase(formats); err != nil { + res = append(res, err) + } + + if err := m.validateStartTimestamp(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1VMVirtualMachineMemoryDumpRequest) validateClaimName(formats strfmt.Registry) error { + + if err := validate.Required("claimName", "body", m.ClaimName); err != nil { + return err + } + + return nil +} + +func (m *V1VMVirtualMachineMemoryDumpRequest) validateEndTimestamp(formats strfmt.Registry) error { + + if swag.IsZero(m.EndTimestamp) { // not required + return nil + } + + if err := m.EndTimestamp.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("endTimestamp") + } + return err + } + + return nil +} + +func (m *V1VMVirtualMachineMemoryDumpRequest) validatePhase(formats strfmt.Registry) error { + + if err := validate.Required("phase", "body", m.Phase); err != nil { + return err + } + + return nil +} + +func (m *V1VMVirtualMachineMemoryDumpRequest) validateStartTimestamp(formats strfmt.Registry) error { + + if swag.IsZero(m.StartTimestamp) { // not required + return nil + } + + if err := m.StartTimestamp.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("startTimestamp") + } + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1VMVirtualMachineMemoryDumpRequest) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1VMVirtualMachineMemoryDumpRequest) UnmarshalBinary(b []byte) error { + var res V1VMVirtualMachineMemoryDumpRequest + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_vm_virtual_machine_start_failure.go b/api/models/v1_vm_virtual_machine_start_failure.go new file mode 100644 index 00000000..59089fcc --- /dev/null +++ b/api/models/v1_vm_virtual_machine_start_failure.go @@ -0,0 +1,76 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1VMVirtualMachineStartFailure VirtualMachineStartFailure tracks VMIs which failed to transition successfully to running using the VM status +// +// swagger:model v1VmVirtualMachineStartFailure +type V1VMVirtualMachineStartFailure struct { + + // consecutive fail count + ConsecutiveFailCount int32 `json:"consecutiveFailCount,omitempty"` + + // last failed VM i UID + LastFailedVMIUID string `json:"lastFailedVMIUID,omitempty"` + + // retry after timestamp + // Format: date-time + RetryAfterTimestamp V1Time `json:"retryAfterTimestamp,omitempty"` +} + +// Validate validates this v1 Vm virtual machine start failure +func (m *V1VMVirtualMachineStartFailure) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateRetryAfterTimestamp(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1VMVirtualMachineStartFailure) validateRetryAfterTimestamp(formats strfmt.Registry) error { + + if swag.IsZero(m.RetryAfterTimestamp) { // not required + return nil + } + + if err := m.RetryAfterTimestamp.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("retryAfterTimestamp") + } + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1VMVirtualMachineStartFailure) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1VMVirtualMachineStartFailure) UnmarshalBinary(b []byte) error { + var res V1VMVirtualMachineStartFailure + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_vm_virtual_machine_state_change_request.go b/api/models/v1_vm_virtual_machine_state_change_request.go new file mode 100644 index 00000000..0227b28b --- /dev/null +++ b/api/models/v1_vm_virtual_machine_state_change_request.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1VMVirtualMachineStateChangeRequest v1 Vm virtual machine state change request +// +// swagger:model v1VmVirtualMachineStateChangeRequest +type V1VMVirtualMachineStateChangeRequest struct { + + // Indicates the type of action that is requested. e.g. Start or Stop + // Required: true + Action *string `json:"action"` + + // Provides additional data in order to perform the Action + Data map[string]string `json:"data,omitempty"` + + // Indicates the UUID of an existing Virtual Machine Instance that this change request applies to -- if applicable + UID string `json:"uid,omitempty"` +} + +// Validate validates this v1 Vm virtual machine state change request +func (m *V1VMVirtualMachineStateChangeRequest) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateAction(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1VMVirtualMachineStateChangeRequest) validateAction(formats strfmt.Registry) error { + + if err := validate.Required("action", "body", m.Action); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1VMVirtualMachineStateChangeRequest) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1VMVirtualMachineStateChangeRequest) UnmarshalBinary(b []byte) error { + var res V1VMVirtualMachineStateChangeRequest + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_vm_virtual_machine_volume_request.go b/api/models/v1_vm_virtual_machine_volume_request.go new file mode 100644 index 00000000..b35188fa --- /dev/null +++ b/api/models/v1_vm_virtual_machine_volume_request.go @@ -0,0 +1,96 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1VMVirtualMachineVolumeRequest v1 Vm virtual machine volume request +// +// swagger:model v1VmVirtualMachineVolumeRequest +type V1VMVirtualMachineVolumeRequest struct { + + // add volume options + AddVolumeOptions *V1VMAddVolumeOptions `json:"addVolumeOptions,omitempty"` + + // remove volume options + RemoveVolumeOptions *V1VMRemoveVolumeOptions `json:"removeVolumeOptions,omitempty"` +} + +// Validate validates this v1 Vm virtual machine volume request +func (m *V1VMVirtualMachineVolumeRequest) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateAddVolumeOptions(formats); err != nil { + res = append(res, err) + } + + if err := m.validateRemoveVolumeOptions(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1VMVirtualMachineVolumeRequest) validateAddVolumeOptions(formats strfmt.Registry) error { + + if swag.IsZero(m.AddVolumeOptions) { // not required + return nil + } + + if m.AddVolumeOptions != nil { + if err := m.AddVolumeOptions.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("addVolumeOptions") + } + return err + } + } + + return nil +} + +func (m *V1VMVirtualMachineVolumeRequest) validateRemoveVolumeOptions(formats strfmt.Registry) error { + + if swag.IsZero(m.RemoveVolumeOptions) { // not required + return nil + } + + if m.RemoveVolumeOptions != nil { + if err := m.RemoveVolumeOptions.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("removeVolumeOptions") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1VMVirtualMachineVolumeRequest) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1VMVirtualMachineVolumeRequest) UnmarshalBinary(b []byte) error { + var res V1VMVirtualMachineVolumeRequest + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_vm_volume.go b/api/models/v1_vm_volume.go new file mode 100644 index 00000000..7c374e0b --- /dev/null +++ b/api/models/v1_vm_volume.go @@ -0,0 +1,417 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1VMVolume Volume represents a named volume in a vmi. +// +// swagger:model v1VmVolume +type V1VMVolume struct { + + // cloud init config drive + CloudInitConfigDrive *V1VMCloudInitConfigDriveSource `json:"cloudInitConfigDrive,omitempty"` + + // cloud init no cloud + CloudInitNoCloud *V1VMCloudInitNoCloudSource `json:"cloudInitNoCloud,omitempty"` + + // config map + ConfigMap *V1VMConfigMapVolumeSource `json:"configMap,omitempty"` + + // container disk + ContainerDisk *V1VMContainerDiskSource `json:"containerDisk,omitempty"` + + // data volume + DataVolume *V1VMCoreDataVolumeSource `json:"dataVolume,omitempty"` + + // downward API + DownwardAPI *V1VMDownwardAPIVolumeSource `json:"downwardAPI,omitempty"` + + // downward metrics + DownwardMetrics V1VMDownwardMetricsVolumeSource `json:"downwardMetrics,omitempty"` + + // empty disk + EmptyDisk *V1VMEmptyDiskSource `json:"emptyDisk,omitempty"` + + // ephemeral + Ephemeral *V1VMEphemeralVolumeSource `json:"ephemeral,omitempty"` + + // host disk + HostDisk *V1VMHostDisk `json:"hostDisk,omitempty"` + + // memory dump + MemoryDump *V1VMMemoryDumpVolumeSource `json:"memoryDump,omitempty"` + + // Volume's name. Must be a DNS_LABEL and unique within the vmi. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + // Required: true + Name *string `json:"name"` + + // persistent volume claim + PersistentVolumeClaim *V1VMPersistentVolumeClaimVolumeSource `json:"persistentVolumeClaim,omitempty"` + + // secret + Secret *V1VMSecretVolumeSource `json:"secret,omitempty"` + + // service account + ServiceAccount *V1VMServiceAccountVolumeSource `json:"serviceAccount,omitempty"` + + // sysprep + Sysprep *V1VMSysprepSource `json:"sysprep,omitempty"` +} + +// Validate validates this v1 Vm volume +func (m *V1VMVolume) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateCloudInitConfigDrive(formats); err != nil { + res = append(res, err) + } + + if err := m.validateCloudInitNoCloud(formats); err != nil { + res = append(res, err) + } + + if err := m.validateConfigMap(formats); err != nil { + res = append(res, err) + } + + if err := m.validateContainerDisk(formats); err != nil { + res = append(res, err) + } + + if err := m.validateDataVolume(formats); err != nil { + res = append(res, err) + } + + if err := m.validateDownwardAPI(formats); err != nil { + res = append(res, err) + } + + if err := m.validateEmptyDisk(formats); err != nil { + res = append(res, err) + } + + if err := m.validateEphemeral(formats); err != nil { + res = append(res, err) + } + + if err := m.validateHostDisk(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMemoryDump(formats); err != nil { + res = append(res, err) + } + + if err := m.validateName(formats); err != nil { + res = append(res, err) + } + + if err := m.validatePersistentVolumeClaim(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSecret(formats); err != nil { + res = append(res, err) + } + + if err := m.validateServiceAccount(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSysprep(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1VMVolume) validateCloudInitConfigDrive(formats strfmt.Registry) error { + + if swag.IsZero(m.CloudInitConfigDrive) { // not required + return nil + } + + if m.CloudInitConfigDrive != nil { + if err := m.CloudInitConfigDrive.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("cloudInitConfigDrive") + } + return err + } + } + + return nil +} + +func (m *V1VMVolume) validateCloudInitNoCloud(formats strfmt.Registry) error { + + if swag.IsZero(m.CloudInitNoCloud) { // not required + return nil + } + + if m.CloudInitNoCloud != nil { + if err := m.CloudInitNoCloud.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("cloudInitNoCloud") + } + return err + } + } + + return nil +} + +func (m *V1VMVolume) validateConfigMap(formats strfmt.Registry) error { + + if swag.IsZero(m.ConfigMap) { // not required + return nil + } + + if m.ConfigMap != nil { + if err := m.ConfigMap.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("configMap") + } + return err + } + } + + return nil +} + +func (m *V1VMVolume) validateContainerDisk(formats strfmt.Registry) error { + + if swag.IsZero(m.ContainerDisk) { // not required + return nil + } + + if m.ContainerDisk != nil { + if err := m.ContainerDisk.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("containerDisk") + } + return err + } + } + + return nil +} + +func (m *V1VMVolume) validateDataVolume(formats strfmt.Registry) error { + + if swag.IsZero(m.DataVolume) { // not required + return nil + } + + if m.DataVolume != nil { + if err := m.DataVolume.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("dataVolume") + } + return err + } + } + + return nil +} + +func (m *V1VMVolume) validateDownwardAPI(formats strfmt.Registry) error { + + if swag.IsZero(m.DownwardAPI) { // not required + return nil + } + + if m.DownwardAPI != nil { + if err := m.DownwardAPI.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("downwardAPI") + } + return err + } + } + + return nil +} + +func (m *V1VMVolume) validateEmptyDisk(formats strfmt.Registry) error { + + if swag.IsZero(m.EmptyDisk) { // not required + return nil + } + + if m.EmptyDisk != nil { + if err := m.EmptyDisk.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("emptyDisk") + } + return err + } + } + + return nil +} + +func (m *V1VMVolume) validateEphemeral(formats strfmt.Registry) error { + + if swag.IsZero(m.Ephemeral) { // not required + return nil + } + + if m.Ephemeral != nil { + if err := m.Ephemeral.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("ephemeral") + } + return err + } + } + + return nil +} + +func (m *V1VMVolume) validateHostDisk(formats strfmt.Registry) error { + + if swag.IsZero(m.HostDisk) { // not required + return nil + } + + if m.HostDisk != nil { + if err := m.HostDisk.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("hostDisk") + } + return err + } + } + + return nil +} + +func (m *V1VMVolume) validateMemoryDump(formats strfmt.Registry) error { + + if swag.IsZero(m.MemoryDump) { // not required + return nil + } + + if m.MemoryDump != nil { + if err := m.MemoryDump.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("memoryDump") + } + return err + } + } + + return nil +} + +func (m *V1VMVolume) validateName(formats strfmt.Registry) error { + + if err := validate.Required("name", "body", m.Name); err != nil { + return err + } + + return nil +} + +func (m *V1VMVolume) validatePersistentVolumeClaim(formats strfmt.Registry) error { + + if swag.IsZero(m.PersistentVolumeClaim) { // not required + return nil + } + + if m.PersistentVolumeClaim != nil { + if err := m.PersistentVolumeClaim.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("persistentVolumeClaim") + } + return err + } + } + + return nil +} + +func (m *V1VMVolume) validateSecret(formats strfmt.Registry) error { + + if swag.IsZero(m.Secret) { // not required + return nil + } + + if m.Secret != nil { + if err := m.Secret.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("secret") + } + return err + } + } + + return nil +} + +func (m *V1VMVolume) validateServiceAccount(formats strfmt.Registry) error { + + if swag.IsZero(m.ServiceAccount) { // not required + return nil + } + + if m.ServiceAccount != nil { + if err := m.ServiceAccount.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("serviceAccount") + } + return err + } + } + + return nil +} + +func (m *V1VMVolume) validateSysprep(formats strfmt.Registry) error { + + if swag.IsZero(m.Sysprep) { // not required + return nil + } + + if m.Sysprep != nil { + if err := m.Sysprep.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("sysprep") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1VMVolume) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1VMVolume) UnmarshalBinary(b []byte) error { + var res V1VMVolume + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_vm_volume_snapshot_status.go b/api/models/v1_vm_volume_snapshot_status.go new file mode 100644 index 00000000..08d17b1a --- /dev/null +++ b/api/models/v1_vm_volume_snapshot_status.go @@ -0,0 +1,84 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1VMVolumeSnapshotStatus v1 Vm volume snapshot status +// +// swagger:model v1VmVolumeSnapshotStatus +type V1VMVolumeSnapshotStatus struct { + + // True if the volume supports snapshotting + // Required: true + Enabled *bool `json:"enabled"` + + // Volume name + // Required: true + Name *string `json:"name"` + + // Empty if snapshotting is enabled, contains reason otherwise + Reason string `json:"reason,omitempty"` +} + +// Validate validates this v1 Vm volume snapshot status +func (m *V1VMVolumeSnapshotStatus) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateEnabled(formats); err != nil { + res = append(res, err) + } + + if err := m.validateName(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1VMVolumeSnapshotStatus) validateEnabled(formats strfmt.Registry) error { + + if err := validate.Required("enabled", "body", m.Enabled); err != nil { + return err + } + + return nil +} + +func (m *V1VMVolumeSnapshotStatus) validateName(formats strfmt.Registry) error { + + if err := validate.Required("name", "body", m.Name); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1VMVolumeSnapshotStatus) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1VMVolumeSnapshotStatus) UnmarshalBinary(b []byte) error { + var res V1VMVolumeSnapshotStatus + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_vm_watchdog.go b/api/models/v1_vm_watchdog.go new file mode 100644 index 00000000..3da6f3e0 --- /dev/null +++ b/api/models/v1_vm_watchdog.go @@ -0,0 +1,89 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1VMWatchdog Named watchdog device. +// +// swagger:model v1VmWatchdog +type V1VMWatchdog struct { + + // i6300esb + I6300esb *V1VMI6300ESBWatchdog `json:"i6300esb,omitempty"` + + // Name of the watchdog. + // Required: true + Name *string `json:"name"` +} + +// Validate validates this v1 Vm watchdog +func (m *V1VMWatchdog) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateI6300esb(formats); err != nil { + res = append(res, err) + } + + if err := m.validateName(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1VMWatchdog) validateI6300esb(formats strfmt.Registry) error { + + if swag.IsZero(m.I6300esb) { // not required + return nil + } + + if m.I6300esb != nil { + if err := m.I6300esb.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("i6300esb") + } + return err + } + } + + return nil +} + +func (m *V1VMWatchdog) validateName(formats strfmt.Registry) error { + + if err := validate.Required("name", "body", m.Name); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1VMWatchdog) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1VMWatchdog) UnmarshalBinary(b []byte) error { + var res V1VMWatchdog + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_vm_weighted_pod_affinity_term.go b/api/models/v1_vm_weighted_pod_affinity_term.go new file mode 100644 index 00000000..e35773fa --- /dev/null +++ b/api/models/v1_vm_weighted_pod_affinity_term.go @@ -0,0 +1,90 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1VMWeightedPodAffinityTerm The weights of all of the matched WeightedPodAffinityTerm fields are added per-node to find the most preferred node(s) +// +// swagger:model v1VmWeightedPodAffinityTerm +type V1VMWeightedPodAffinityTerm struct { + + // pod affinity term + // Required: true + PodAffinityTerm *V1VMPodAffinityTerm `json:"podAffinityTerm"` + + // weight associated with matching the corresponding podAffinityTerm, in the range 1-100. + // Required: true + Weight *int32 `json:"weight"` +} + +// Validate validates this v1 Vm weighted pod affinity term +func (m *V1VMWeightedPodAffinityTerm) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validatePodAffinityTerm(formats); err != nil { + res = append(res, err) + } + + if err := m.validateWeight(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1VMWeightedPodAffinityTerm) validatePodAffinityTerm(formats strfmt.Registry) error { + + if err := validate.Required("podAffinityTerm", "body", m.PodAffinityTerm); err != nil { + return err + } + + if m.PodAffinityTerm != nil { + if err := m.PodAffinityTerm.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("podAffinityTerm") + } + return err + } + } + + return nil +} + +func (m *V1VMWeightedPodAffinityTerm) validateWeight(formats strfmt.Registry) error { + + if err := validate.Required("weight", "body", m.Weight); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1VMWeightedPodAffinityTerm) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1VMWeightedPodAffinityTerm) UnmarshalBinary(b []byte) error { + var res V1VMWeightedPodAffinityTerm + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_vsphere_account.go b/api/models/v1_vsphere_account.go new file mode 100644 index 00000000..fb043097 --- /dev/null +++ b/api/models/v1_vsphere_account.go @@ -0,0 +1,127 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1VsphereAccount VSphere account information +// +// swagger:model v1VsphereAccount +type V1VsphereAccount struct { + + // Cloud account api version + APIVersion string `json:"apiVersion,omitempty"` + + // Cloud account kind + Kind string `json:"kind,omitempty"` + + // metadata + Metadata *V1ObjectMeta `json:"metadata,omitempty"` + + // spec + Spec *V1VsphereCloudAccount `json:"spec,omitempty"` + + // status + Status *V1CloudAccountStatus `json:"status,omitempty"` +} + +// Validate validates this v1 vsphere account +func (m *V1VsphereAccount) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSpec(formats); err != nil { + res = append(res, err) + } + + if err := m.validateStatus(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1VsphereAccount) validateMetadata(formats strfmt.Registry) error { + + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } + return err + } + } + + return nil +} + +func (m *V1VsphereAccount) validateSpec(formats strfmt.Registry) error { + + if swag.IsZero(m.Spec) { // not required + return nil + } + + if m.Spec != nil { + if err := m.Spec.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec") + } + return err + } + } + + return nil +} + +func (m *V1VsphereAccount) validateStatus(formats strfmt.Registry) error { + + if swag.IsZero(m.Status) { // not required + return nil + } + + if m.Status != nil { + if err := m.Status.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("status") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1VsphereAccount) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1VsphereAccount) UnmarshalBinary(b []byte) error { + var res V1VsphereAccount + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_vsphere_accounts.go b/api/models/v1_vsphere_accounts.go new file mode 100644 index 00000000..82db8637 --- /dev/null +++ b/api/models/v1_vsphere_accounts.go @@ -0,0 +1,112 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1VsphereAccounts v1 vsphere accounts +// +// swagger:model v1VsphereAccounts +type V1VsphereAccounts struct { + + // items + // Required: true + // Unique: true + Items []*V1VsphereAccount `json:"items"` + + // listmeta + Listmeta *V1ListMetaData `json:"listmeta,omitempty"` +} + +// Validate validates this v1 vsphere accounts +func (m *V1VsphereAccounts) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateItems(formats); err != nil { + res = append(res, err) + } + + if err := m.validateListmeta(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1VsphereAccounts) validateItems(formats strfmt.Registry) error { + + if err := validate.Required("items", "body", m.Items); err != nil { + return err + } + + if err := validate.UniqueItems("items", "body", m.Items); err != nil { + return err + } + + for i := 0; i < len(m.Items); i++ { + if swag.IsZero(m.Items[i]) { // not required + continue + } + + if m.Items[i] != nil { + if err := m.Items[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("items" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1VsphereAccounts) validateListmeta(formats strfmt.Registry) error { + + if swag.IsZero(m.Listmeta) { // not required + return nil + } + + if m.Listmeta != nil { + if err := m.Listmeta.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("listmeta") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1VsphereAccounts) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1VsphereAccounts) UnmarshalBinary(b []byte) error { + var res V1VsphereAccounts + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_vsphere_cloud_account.go b/api/models/v1_vsphere_cloud_account.go new file mode 100644 index 00000000..3e19b9c7 --- /dev/null +++ b/api/models/v1_vsphere_cloud_account.go @@ -0,0 +1,101 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1VsphereCloudAccount v1 vsphere cloud account +// +// swagger:model v1VsphereCloudAccount +type V1VsphereCloudAccount struct { + + // Insecure is a flag that controls whether or not to validate the vSphere server's certificate. + Insecure bool `json:"insecure"` + + // password + // Required: true + Password *string `json:"password"` + + // username + // Required: true + Username *string `json:"username"` + + // VcenterServer is the address of the vSphere endpoint + // Required: true + VcenterServer *string `json:"vcenterServer"` +} + +// Validate validates this v1 vsphere cloud account +func (m *V1VsphereCloudAccount) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validatePassword(formats); err != nil { + res = append(res, err) + } + + if err := m.validateUsername(formats); err != nil { + res = append(res, err) + } + + if err := m.validateVcenterServer(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1VsphereCloudAccount) validatePassword(formats strfmt.Registry) error { + + if err := validate.Required("password", "body", m.Password); err != nil { + return err + } + + return nil +} + +func (m *V1VsphereCloudAccount) validateUsername(formats strfmt.Registry) error { + + if err := validate.Required("username", "body", m.Username); err != nil { + return err + } + + return nil +} + +func (m *V1VsphereCloudAccount) validateVcenterServer(formats strfmt.Registry) error { + + if err := validate.Required("vcenterServer", "body", m.VcenterServer); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1VsphereCloudAccount) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1VsphereCloudAccount) UnmarshalBinary(b []byte) error { + var res V1VsphereCloudAccount + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_vsphere_cloud_cluster_config_entity.go b/api/models/v1_vsphere_cloud_cluster_config_entity.go new file mode 100644 index 00000000..7ff29647 --- /dev/null +++ b/api/models/v1_vsphere_cloud_cluster_config_entity.go @@ -0,0 +1,71 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1VsphereCloudClusterConfigEntity vSphere cloud cluster config entity +// +// swagger:model v1VsphereCloudClusterConfigEntity +type V1VsphereCloudClusterConfigEntity struct { + + // cluster config + ClusterConfig *V1VsphereClusterConfigEntity `json:"clusterConfig,omitempty"` +} + +// Validate validates this v1 vsphere cloud cluster config entity +func (m *V1VsphereCloudClusterConfigEntity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateClusterConfig(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1VsphereCloudClusterConfigEntity) validateClusterConfig(formats strfmt.Registry) error { + + if swag.IsZero(m.ClusterConfig) { // not required + return nil + } + + if m.ClusterConfig != nil { + if err := m.ClusterConfig.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("clusterConfig") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1VsphereCloudClusterConfigEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1VsphereCloudClusterConfigEntity) UnmarshalBinary(b []byte) error { + var res V1VsphereCloudClusterConfigEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_vsphere_cloud_config.go b/api/models/v1_vsphere_cloud_config.go new file mode 100644 index 00000000..a0ba1df9 --- /dev/null +++ b/api/models/v1_vsphere_cloud_config.go @@ -0,0 +1,127 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1VsphereCloudConfig VsphereCloudConfig is the Schema for the vspherecloudconfigs API +// +// swagger:model v1VsphereCloudConfig +type V1VsphereCloudConfig struct { + + // APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + APIVersion string `json:"apiVersion,omitempty"` + + // Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + Kind string `json:"kind,omitempty"` + + // metadata + Metadata *V1ObjectMeta `json:"metadata,omitempty"` + + // spec + Spec *V1VsphereCloudConfigSpec `json:"spec,omitempty"` + + // status + Status *V1VsphereCloudConfigStatus `json:"status,omitempty"` +} + +// Validate validates this v1 vsphere cloud config +func (m *V1VsphereCloudConfig) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSpec(formats); err != nil { + res = append(res, err) + } + + if err := m.validateStatus(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1VsphereCloudConfig) validateMetadata(formats strfmt.Registry) error { + + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } + return err + } + } + + return nil +} + +func (m *V1VsphereCloudConfig) validateSpec(formats strfmt.Registry) error { + + if swag.IsZero(m.Spec) { // not required + return nil + } + + if m.Spec != nil { + if err := m.Spec.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec") + } + return err + } + } + + return nil +} + +func (m *V1VsphereCloudConfig) validateStatus(formats strfmt.Registry) error { + + if swag.IsZero(m.Status) { // not required + return nil + } + + if m.Status != nil { + if err := m.Status.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("status") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1VsphereCloudConfig) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1VsphereCloudConfig) UnmarshalBinary(b []byte) error { + var res V1VsphereCloudConfig + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_vsphere_cloud_config_spec.go b/api/models/v1_vsphere_cloud_config_spec.go new file mode 100644 index 00000000..3e232055 --- /dev/null +++ b/api/models/v1_vsphere_cloud_config_spec.go @@ -0,0 +1,158 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1VsphereCloudConfigSpec VsphereCloudConfigSpec defines the desired state of VsphereCloudConfig +// +// swagger:model v1VsphereCloudConfigSpec +type V1VsphereCloudConfigSpec struct { + + // cloudAccountRef should point to the secret which contains VsphereCloudAccount + CloudAccountRef *V1ObjectReference `json:"cloudAccountRef,omitempty"` + + // cluster config + // Required: true + ClusterConfig *V1VsphereClusterConfig `json:"clusterConfig"` + + // Appliance (Edge Host) uid for Edge env + EdgeHostRef *V1ObjectReference `json:"edgeHostRef,omitempty"` + + // machine pool config + // Required: true + MachinePoolConfig []*V1VsphereMachinePoolConfig `json:"machinePoolConfig"` +} + +// Validate validates this v1 vsphere cloud config spec +func (m *V1VsphereCloudConfigSpec) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateCloudAccountRef(formats); err != nil { + res = append(res, err) + } + + if err := m.validateClusterConfig(formats); err != nil { + res = append(res, err) + } + + if err := m.validateEdgeHostRef(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMachinePoolConfig(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1VsphereCloudConfigSpec) validateCloudAccountRef(formats strfmt.Registry) error { + + if swag.IsZero(m.CloudAccountRef) { // not required + return nil + } + + if m.CloudAccountRef != nil { + if err := m.CloudAccountRef.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("cloudAccountRef") + } + return err + } + } + + return nil +} + +func (m *V1VsphereCloudConfigSpec) validateClusterConfig(formats strfmt.Registry) error { + + if err := validate.Required("clusterConfig", "body", m.ClusterConfig); err != nil { + return err + } + + if m.ClusterConfig != nil { + if err := m.ClusterConfig.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("clusterConfig") + } + return err + } + } + + return nil +} + +func (m *V1VsphereCloudConfigSpec) validateEdgeHostRef(formats strfmt.Registry) error { + + if swag.IsZero(m.EdgeHostRef) { // not required + return nil + } + + if m.EdgeHostRef != nil { + if err := m.EdgeHostRef.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("edgeHostRef") + } + return err + } + } + + return nil +} + +func (m *V1VsphereCloudConfigSpec) validateMachinePoolConfig(formats strfmt.Registry) error { + + if err := validate.Required("machinePoolConfig", "body", m.MachinePoolConfig); err != nil { + return err + } + + for i := 0; i < len(m.MachinePoolConfig); i++ { + if swag.IsZero(m.MachinePoolConfig[i]) { // not required + continue + } + + if m.MachinePoolConfig[i] != nil { + if err := m.MachinePoolConfig[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("machinePoolConfig" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1VsphereCloudConfigSpec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1VsphereCloudConfigSpec) UnmarshalBinary(b []byte) error { + var res V1VsphereCloudConfigSpec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_vsphere_cloud_config_status.go b/api/models/v1_vsphere_cloud_config_status.go new file mode 100644 index 00000000..2180d343 --- /dev/null +++ b/api/models/v1_vsphere_cloud_config_status.go @@ -0,0 +1,129 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1VsphereCloudConfigStatus VsphereCloudConfigStatus defines the observed state of VsphereCloudConfig +// +// swagger:model v1VsphereCloudConfigStatus +type V1VsphereCloudConfigStatus struct { + + // ansible digest + AnsibleDigest string `json:"ansibleDigest,omitempty"` + + // conditions + Conditions []*V1ClusterCondition `json:"conditions"` + + // addon layers present in spc + IsAddonLayer bool `json:"isAddonLayer,omitempty"` + + // last o v a created + LastOVACreated string `json:"lastOVACreated,omitempty"` + + // last VM exported + LastVMExported string `json:"lastVMExported,omitempty"` + + // node image + NodeImage *V1VsphereImage `json:"nodeImage,omitempty"` + + // this map will be for ansible roles present in eack pack + RoleDigest map[string]string `json:"roleDigest,omitempty"` + + // sourceImageId, it can be from packref's annotations or from pack.json + SourceImageID string `json:"sourceImageId,omitempty"` + + // UploadOVAS3 will hold last image name which uploaded to S3 + UploadOvaS3 string `json:"uploadOvaS3,omitempty"` + + // If no ansible roles found in Packs then Mold should tell Drive to use capi image and not create custom image, because there is nothing to add + UseCapiImage bool `json:"useCapiImage,omitempty"` +} + +// Validate validates this v1 vsphere cloud config status +func (m *V1VsphereCloudConfigStatus) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateConditions(formats); err != nil { + res = append(res, err) + } + + if err := m.validateNodeImage(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1VsphereCloudConfigStatus) validateConditions(formats strfmt.Registry) error { + + if swag.IsZero(m.Conditions) { // not required + return nil + } + + for i := 0; i < len(m.Conditions); i++ { + if swag.IsZero(m.Conditions[i]) { // not required + continue + } + + if m.Conditions[i] != nil { + if err := m.Conditions[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("conditions" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1VsphereCloudConfigStatus) validateNodeImage(formats strfmt.Registry) error { + + if swag.IsZero(m.NodeImage) { // not required + return nil + } + + if m.NodeImage != nil { + if err := m.NodeImage.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("nodeImage") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1VsphereCloudConfigStatus) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1VsphereCloudConfigStatus) UnmarshalBinary(b []byte) error { + var res V1VsphereCloudConfigStatus + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_vsphere_cloud_datacenter.go b/api/models/v1_vsphere_cloud_datacenter.go new file mode 100644 index 00000000..058a1ef9 --- /dev/null +++ b/api/models/v1_vsphere_cloud_datacenter.go @@ -0,0 +1,86 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1VsphereCloudDatacenter Vsphere datacenter +// +// swagger:model v1VsphereCloudDatacenter +type V1VsphereCloudDatacenter struct { + + // compute clusters + ComputeClusters []*V1VsphereComputeCluster `json:"computeClusters"` + + // folders + Folders []string `json:"folders"` + + // name + Name string `json:"name,omitempty"` +} + +// Validate validates this v1 vsphere cloud datacenter +func (m *V1VsphereCloudDatacenter) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateComputeClusters(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1VsphereCloudDatacenter) validateComputeClusters(formats strfmt.Registry) error { + + if swag.IsZero(m.ComputeClusters) { // not required + return nil + } + + for i := 0; i < len(m.ComputeClusters); i++ { + if swag.IsZero(m.ComputeClusters[i]) { // not required + continue + } + + if m.ComputeClusters[i] != nil { + if err := m.ComputeClusters[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("computeClusters" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1VsphereCloudDatacenter) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1VsphereCloudDatacenter) UnmarshalBinary(b []byte) error { + var res V1VsphereCloudDatacenter + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_vsphere_cluster_config.go b/api/models/v1_vsphere_cluster_config.go new file mode 100644 index 00000000..6ab28cd5 --- /dev/null +++ b/api/models/v1_vsphere_cluster_config.go @@ -0,0 +1,107 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1VsphereClusterConfig v1 vsphere cluster config +// +// swagger:model v1VsphereClusterConfig +type V1VsphereClusterConfig struct { + + // The optional control plane endpoint, which can be an IP or FQDN + ControlPlaneEndpoint *V1ControlPlaneEndPoint `json:"controlPlaneEndpoint,omitempty"` + + // NTPServers is a list of NTP servers to use instead of the machine image's default NTP server list. + NtpServers []string `json:"ntpServers"` + + // Placement configuration Placement config in ClusterConfig serve as default values for each MachinePool + // Required: true + Placement *V1VspherePlacementConfig `json:"placement"` + + // SSHKeys specifies a list of ssh authorized keys for the 'spectro' user + SSHKeys []string `json:"sshKeys"` + + // whether this cluster should use dhcp or static IP, if false, use DHCP if this is set, then all machinepools should have staticIP with provided IPPool adding this as an additional standalone flag without relating to placement.Nework main reason is to enable more validation for placement.Network.StaticIP which should come together with valid Network.IPPool and Network.Name + StaticIP bool `json:"staticIp,omitempty"` +} + +// Validate validates this v1 vsphere cluster config +func (m *V1VsphereClusterConfig) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateControlPlaneEndpoint(formats); err != nil { + res = append(res, err) + } + + if err := m.validatePlacement(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1VsphereClusterConfig) validateControlPlaneEndpoint(formats strfmt.Registry) error { + + if swag.IsZero(m.ControlPlaneEndpoint) { // not required + return nil + } + + if m.ControlPlaneEndpoint != nil { + if err := m.ControlPlaneEndpoint.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("controlPlaneEndpoint") + } + return err + } + } + + return nil +} + +func (m *V1VsphereClusterConfig) validatePlacement(formats strfmt.Registry) error { + + if err := validate.Required("placement", "body", m.Placement); err != nil { + return err + } + + if m.Placement != nil { + if err := m.Placement.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("placement") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1VsphereClusterConfig) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1VsphereClusterConfig) UnmarshalBinary(b []byte) error { + var res V1VsphereClusterConfig + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_vsphere_cluster_config_entity.go b/api/models/v1_vsphere_cluster_config_entity.go new file mode 100644 index 00000000..05961ade --- /dev/null +++ b/api/models/v1_vsphere_cluster_config_entity.go @@ -0,0 +1,107 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1VsphereClusterConfigEntity v1 vsphere cluster config entity +// +// swagger:model v1VsphereClusterConfigEntity +type V1VsphereClusterConfigEntity struct { + + // The optional control plane endpoint, which can be an IP or FQDN + ControlPlaneEndpoint *V1ControlPlaneEndPoint `json:"controlPlaneEndpoint,omitempty"` + + // NTPServers is a list of NTP servers to use instead of the machine image's default NTP server list. + NtpServers []string `json:"ntpServers"` + + // Placement configuration Placement config in ClusterConfig serve as default values for each MachinePool + // Required: true + Placement *V1VspherePlacementConfigEntity `json:"placement"` + + // SSHKeys specifies a list of ssh authorized keys for the 'spectro' user + SSHKeys []string `json:"sshKeys"` + + // whether this cluster should use dhcp or static IP, if false, use DHCP if this is set, then all machinepools should have staticIP with provided IPPool adding this as an additional standalone flag without relating to placement.Nework main reason is to enable more validation for placement.Network.StaticIP which should come together with valid Network.IPPool and Network.Name + StaticIP bool `json:"staticIp,omitempty"` +} + +// Validate validates this v1 vsphere cluster config entity +func (m *V1VsphereClusterConfigEntity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateControlPlaneEndpoint(formats); err != nil { + res = append(res, err) + } + + if err := m.validatePlacement(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1VsphereClusterConfigEntity) validateControlPlaneEndpoint(formats strfmt.Registry) error { + + if swag.IsZero(m.ControlPlaneEndpoint) { // not required + return nil + } + + if m.ControlPlaneEndpoint != nil { + if err := m.ControlPlaneEndpoint.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("controlPlaneEndpoint") + } + return err + } + } + + return nil +} + +func (m *V1VsphereClusterConfigEntity) validatePlacement(formats strfmt.Registry) error { + + if err := validate.Required("placement", "body", m.Placement); err != nil { + return err + } + + if m.Placement != nil { + if err := m.Placement.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("placement") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1VsphereClusterConfigEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1VsphereClusterConfigEntity) UnmarshalBinary(b []byte) error { + var res V1VsphereClusterConfigEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_vsphere_compute_cluster.go b/api/models/v1_vsphere_compute_cluster.go new file mode 100644 index 00000000..d751d8c6 --- /dev/null +++ b/api/models/v1_vsphere_compute_cluster.go @@ -0,0 +1,113 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1VsphereComputeCluster Vsphere compute cluster +// +// swagger:model v1VsphereComputeCluster +type V1VsphereComputeCluster struct { + + // datastores + // Unique: true + Datastores []string `json:"datastores"` + + // name + Name string `json:"name,omitempty"` + + // networks + // Unique: true + Networks []string `json:"networks"` + + // resource pools + // Unique: true + ResourcePools []string `json:"resourcePools"` +} + +// Validate validates this v1 vsphere compute cluster +func (m *V1VsphereComputeCluster) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateDatastores(formats); err != nil { + res = append(res, err) + } + + if err := m.validateNetworks(formats); err != nil { + res = append(res, err) + } + + if err := m.validateResourcePools(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1VsphereComputeCluster) validateDatastores(formats strfmt.Registry) error { + + if swag.IsZero(m.Datastores) { // not required + return nil + } + + if err := validate.UniqueItems("datastores", "body", m.Datastores); err != nil { + return err + } + + return nil +} + +func (m *V1VsphereComputeCluster) validateNetworks(formats strfmt.Registry) error { + + if swag.IsZero(m.Networks) { // not required + return nil + } + + if err := validate.UniqueItems("networks", "body", m.Networks); err != nil { + return err + } + + return nil +} + +func (m *V1VsphereComputeCluster) validateResourcePools(formats strfmt.Registry) error { + + if swag.IsZero(m.ResourcePools) { // not required + return nil + } + + if err := validate.UniqueItems("resourcePools", "body", m.ResourcePools); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1VsphereComputeCluster) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1VsphereComputeCluster) UnmarshalBinary(b []byte) error { + var res V1VsphereComputeCluster + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_vsphere_compute_cluster_resources.go b/api/models/v1_vsphere_compute_cluster_resources.go new file mode 100644 index 00000000..5e054643 --- /dev/null +++ b/api/models/v1_vsphere_compute_cluster_resources.go @@ -0,0 +1,74 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1VsphereComputeClusterResources Datacenter and its resources like datastore, resoucepool, folders +// +// swagger:model v1VsphereComputeClusterResources +type V1VsphereComputeClusterResources struct { + + // computecluster + Computecluster *V1VsphereComputeCluster `json:"computecluster,omitempty"` + + // Name of the datacenter + Datacenter string `json:"datacenter,omitempty"` +} + +// Validate validates this v1 vsphere compute cluster resources +func (m *V1VsphereComputeClusterResources) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateComputecluster(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1VsphereComputeClusterResources) validateComputecluster(formats strfmt.Registry) error { + + if swag.IsZero(m.Computecluster) { // not required + return nil + } + + if m.Computecluster != nil { + if err := m.Computecluster.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("computecluster") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1VsphereComputeClusterResources) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1VsphereComputeClusterResources) UnmarshalBinary(b []byte) error { + var res V1VsphereComputeClusterResources + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_vsphere_datacenter.go b/api/models/v1_vsphere_datacenter.go new file mode 100644 index 00000000..21a4a286 --- /dev/null +++ b/api/models/v1_vsphere_datacenter.go @@ -0,0 +1,92 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1VsphereDatacenter List of Datacenter with computeclusters +// +// swagger:model v1VsphereDatacenter +type V1VsphereDatacenter struct { + + // List of the VSphere compute clusters in datacenter + // Unique: true + Computeclusters []string `json:"computeclusters"` + + // name of the datacenter of the VSphere + Datacenter string `json:"datacenter,omitempty"` + + // List of the VSphere folders in datacenter + // Unique: true + Folders []string `json:"folders"` +} + +// Validate validates this v1 vsphere datacenter +func (m *V1VsphereDatacenter) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateComputeclusters(formats); err != nil { + res = append(res, err) + } + + if err := m.validateFolders(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1VsphereDatacenter) validateComputeclusters(formats strfmt.Registry) error { + + if swag.IsZero(m.Computeclusters) { // not required + return nil + } + + if err := validate.UniqueItems("computeclusters", "body", m.Computeclusters); err != nil { + return err + } + + return nil +} + +func (m *V1VsphereDatacenter) validateFolders(formats strfmt.Registry) error { + + if swag.IsZero(m.Folders) { // not required + return nil + } + + if err := validate.UniqueItems("folders", "body", m.Folders); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1VsphereDatacenter) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1VsphereDatacenter) UnmarshalBinary(b []byte) error { + var res V1VsphereDatacenter + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_vsphere_datacenters.go b/api/models/v1_vsphere_datacenters.go new file mode 100644 index 00000000..d24ce5bf --- /dev/null +++ b/api/models/v1_vsphere_datacenters.go @@ -0,0 +1,87 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1VsphereDatacenters List of Datacenters with computeclusters +// +// swagger:model v1VsphereDatacenters +type V1VsphereDatacenters struct { + + // List of associated datacenters + // Required: true + // Unique: true + Items []*V1VsphereDatacenter `json:"items"` +} + +// Validate validates this v1 vsphere datacenters +func (m *V1VsphereDatacenters) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateItems(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1VsphereDatacenters) validateItems(formats strfmt.Registry) error { + + if err := validate.Required("items", "body", m.Items); err != nil { + return err + } + + if err := validate.UniqueItems("items", "body", m.Items); err != nil { + return err + } + + for i := 0; i < len(m.Items); i++ { + if swag.IsZero(m.Items[i]) { // not required + continue + } + + if m.Items[i] != nil { + if err := m.Items[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("items" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1VsphereDatacenters) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1VsphereDatacenters) UnmarshalBinary(b []byte) error { + var res V1VsphereDatacenters + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_vsphere_dns_mapping.go b/api/models/v1_vsphere_dns_mapping.go new file mode 100644 index 00000000..9704b6e2 --- /dev/null +++ b/api/models/v1_vsphere_dns_mapping.go @@ -0,0 +1,96 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1VsphereDNSMapping VSphere DNS Mapping +// +// swagger:model v1VsphereDnsMapping +type V1VsphereDNSMapping struct { + + // metadata + Metadata *V1ObjectMeta `json:"metadata,omitempty"` + + // spec + Spec *V1VsphereDNSMappingSpec `json:"spec,omitempty"` +} + +// Validate validates this v1 vsphere Dns mapping +func (m *V1VsphereDNSMapping) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSpec(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1VsphereDNSMapping) validateMetadata(formats strfmt.Registry) error { + + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } + return err + } + } + + return nil +} + +func (m *V1VsphereDNSMapping) validateSpec(formats strfmt.Registry) error { + + if swag.IsZero(m.Spec) { // not required + return nil + } + + if m.Spec != nil { + if err := m.Spec.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1VsphereDNSMapping) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1VsphereDNSMapping) UnmarshalBinary(b []byte) error { + var res V1VsphereDNSMapping + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_vsphere_dns_mapping_spec.go b/api/models/v1_vsphere_dns_mapping_spec.go new file mode 100644 index 00000000..8041615e --- /dev/null +++ b/api/models/v1_vsphere_dns_mapping_spec.go @@ -0,0 +1,119 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1VsphereDNSMappingSpec VSphere DNS Mapping Spec +// +// swagger:model v1VsphereDnsMappingSpec +type V1VsphereDNSMappingSpec struct { + + // VSphere datacenter name + // Required: true + Datacenter *string `json:"datacenter"` + + // VSphere DNS name + // Required: true + DNSName *string `json:"dnsName"` + + // VSphere network name + // Required: true + Network *string `json:"network"` + + // VSphere network URL + // Read Only: true + NetworkURL string `json:"networkUrl,omitempty"` + + // VSphere private gateway uid + // Required: true + PrivateGatewayUID *string `json:"privateGatewayUid"` +} + +// Validate validates this v1 vsphere Dns mapping spec +func (m *V1VsphereDNSMappingSpec) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateDatacenter(formats); err != nil { + res = append(res, err) + } + + if err := m.validateDNSName(formats); err != nil { + res = append(res, err) + } + + if err := m.validateNetwork(formats); err != nil { + res = append(res, err) + } + + if err := m.validatePrivateGatewayUID(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1VsphereDNSMappingSpec) validateDatacenter(formats strfmt.Registry) error { + + if err := validate.Required("datacenter", "body", m.Datacenter); err != nil { + return err + } + + return nil +} + +func (m *V1VsphereDNSMappingSpec) validateDNSName(formats strfmt.Registry) error { + + if err := validate.Required("dnsName", "body", m.DNSName); err != nil { + return err + } + + return nil +} + +func (m *V1VsphereDNSMappingSpec) validateNetwork(formats strfmt.Registry) error { + + if err := validate.Required("network", "body", m.Network); err != nil { + return err + } + + return nil +} + +func (m *V1VsphereDNSMappingSpec) validatePrivateGatewayUID(formats strfmt.Registry) error { + + if err := validate.Required("privateGatewayUid", "body", m.PrivateGatewayUID); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1VsphereDNSMappingSpec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1VsphereDNSMappingSpec) UnmarshalBinary(b []byte) error { + var res V1VsphereDNSMappingSpec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_vsphere_dns_mappings.go b/api/models/v1_vsphere_dns_mappings.go new file mode 100644 index 00000000..b79496a0 --- /dev/null +++ b/api/models/v1_vsphere_dns_mappings.go @@ -0,0 +1,87 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1VsphereDNSMappings v1 vsphere Dns mappings +// +// swagger:model v1VsphereDnsMappings +type V1VsphereDNSMappings struct { + + // List of vSphere DNS mapping + // Required: true + // Unique: true + Items []*V1VsphereDNSMapping `json:"items"` +} + +// Validate validates this v1 vsphere Dns mappings +func (m *V1VsphereDNSMappings) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateItems(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1VsphereDNSMappings) validateItems(formats strfmt.Registry) error { + + if err := validate.Required("items", "body", m.Items); err != nil { + return err + } + + if err := validate.UniqueItems("items", "body", m.Items); err != nil { + return err + } + + for i := 0; i < len(m.Items); i++ { + if swag.IsZero(m.Items[i]) { // not required + continue + } + + if m.Items[i] != nil { + if err := m.Items[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("items" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1VsphereDNSMappings) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1VsphereDNSMappings) UnmarshalBinary(b []byte) error { + var res V1VsphereDNSMappings + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_vsphere_env.go b/api/models/v1_vsphere_env.go new file mode 100644 index 00000000..55b16c5a --- /dev/null +++ b/api/models/v1_vsphere_env.go @@ -0,0 +1,43 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1VsphereEnv Vsphere environment entity +// +// swagger:model v1VsphereEnv +type V1VsphereEnv struct { + + // Version of vsphere environment + Version string `json:"version,omitempty"` +} + +// Validate validates this v1 vsphere env +func (m *V1VsphereEnv) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1VsphereEnv) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1VsphereEnv) UnmarshalBinary(b []byte) error { + var res V1VsphereEnv + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_vsphere_image.go b/api/models/v1_vsphere_image.go new file mode 100644 index 00000000..e2ea2bab --- /dev/null +++ b/api/models/v1_vsphere_image.go @@ -0,0 +1,46 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1VsphereImage A generated Image should always be a template which resides inside vsphere Will not generate a OVA file out of the image OVA can be used as a base input of the os pack, that's internal to the pack +// +// swagger:model v1VsphereImage +type V1VsphereImage struct { + + // full path of the image template location it contains datacenter/folder/templatename etc eg: /mydc/vm/template/spectro/workerpool-1-centos + FullPath string `json:"fullPath,omitempty"` + + // state + State string `json:"state,omitempty"` +} + +// Validate validates this v1 vsphere image +func (m *V1VsphereImage) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1VsphereImage) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1VsphereImage) UnmarshalBinary(b []byte) error { + var res V1VsphereImage + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_vsphere_instance_type.go b/api/models/v1_vsphere_instance_type.go new file mode 100644 index 00000000..f1c0d179 --- /dev/null +++ b/api/models/v1_vsphere_instance_type.go @@ -0,0 +1,98 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1VsphereInstanceType v1 vsphere instance type +// +// swagger:model v1VsphereInstanceType +type V1VsphereInstanceType struct { + + // DiskGiB is the size of a virtual machine's disk, in GiB. Defaults to the analogue property value in the template from which this machine is cloned. + // Required: true + DiskGiB *int32 `json:"diskGiB"` + + // MemoryMiB is the size of a virtual machine's memory, in MiB. Defaults to the analogue property value in the template from which this machine is cloned. + // Required: true + MemoryMiB *int64 `json:"memoryMiB"` + + // NumCPUs is the number of virtual processors in a virtual machine. Defaults to the analogue property value in the template from which this machine is cloned. + // Required: true + NumCPUs *int32 `json:"numCPUs"` +} + +// Validate validates this v1 vsphere instance type +func (m *V1VsphereInstanceType) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateDiskGiB(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMemoryMiB(formats); err != nil { + res = append(res, err) + } + + if err := m.validateNumCPUs(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1VsphereInstanceType) validateDiskGiB(formats strfmt.Registry) error { + + if err := validate.Required("diskGiB", "body", m.DiskGiB); err != nil { + return err + } + + return nil +} + +func (m *V1VsphereInstanceType) validateMemoryMiB(formats strfmt.Registry) error { + + if err := validate.Required("memoryMiB", "body", m.MemoryMiB); err != nil { + return err + } + + return nil +} + +func (m *V1VsphereInstanceType) validateNumCPUs(formats strfmt.Registry) error { + + if err := validate.Required("numCPUs", "body", m.NumCPUs); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1VsphereInstanceType) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1VsphereInstanceType) UnmarshalBinary(b []byte) error { + var res V1VsphereInstanceType + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_vsphere_machine.go b/api/models/v1_vsphere_machine.go new file mode 100644 index 00000000..9a8f66e0 --- /dev/null +++ b/api/models/v1_vsphere_machine.go @@ -0,0 +1,127 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1VsphereMachine vSphere cloud VM definition +// +// swagger:model v1VsphereMachine +type V1VsphereMachine struct { + + // api version + APIVersion string `json:"apiVersion,omitempty"` + + // kind + Kind string `json:"kind,omitempty"` + + // metadata + Metadata *V1ObjectMeta `json:"metadata,omitempty"` + + // spec + Spec *V1VsphereMachineSpec `json:"spec,omitempty"` + + // status + Status *V1CloudMachineStatus `json:"status,omitempty"` +} + +// Validate validates this v1 vsphere machine +func (m *V1VsphereMachine) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSpec(formats); err != nil { + res = append(res, err) + } + + if err := m.validateStatus(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1VsphereMachine) validateMetadata(formats strfmt.Registry) error { + + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } + return err + } + } + + return nil +} + +func (m *V1VsphereMachine) validateSpec(formats strfmt.Registry) error { + + if swag.IsZero(m.Spec) { // not required + return nil + } + + if m.Spec != nil { + if err := m.Spec.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec") + } + return err + } + } + + return nil +} + +func (m *V1VsphereMachine) validateStatus(formats strfmt.Registry) error { + + if swag.IsZero(m.Status) { // not required + return nil + } + + if m.Status != nil { + if err := m.Status.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("status") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1VsphereMachine) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1VsphereMachine) UnmarshalBinary(b []byte) error { + var res V1VsphereMachine + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_vsphere_machine_pool_cloud_config_entity.go b/api/models/v1_vsphere_machine_pool_cloud_config_entity.go new file mode 100644 index 00000000..866ec58a --- /dev/null +++ b/api/models/v1_vsphere_machine_pool_cloud_config_entity.go @@ -0,0 +1,105 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1VsphereMachinePoolCloudConfigEntity v1 vsphere machine pool cloud config entity +// +// swagger:model v1VsphereMachinePoolCloudConfigEntity +type V1VsphereMachinePoolCloudConfigEntity struct { + + // instance type + InstanceType *V1VsphereInstanceType `json:"instanceType,omitempty"` + + // Placements configuration Placements If defined, will replace default values defined in VsphereClusterConfig Array means one MachinePool can span across multiple vsphere compute cluster + Placements []*V1VspherePlacementConfigEntity `json:"placements"` +} + +// Validate validates this v1 vsphere machine pool cloud config entity +func (m *V1VsphereMachinePoolCloudConfigEntity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateInstanceType(formats); err != nil { + res = append(res, err) + } + + if err := m.validatePlacements(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1VsphereMachinePoolCloudConfigEntity) validateInstanceType(formats strfmt.Registry) error { + + if swag.IsZero(m.InstanceType) { // not required + return nil + } + + if m.InstanceType != nil { + if err := m.InstanceType.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("instanceType") + } + return err + } + } + + return nil +} + +func (m *V1VsphereMachinePoolCloudConfigEntity) validatePlacements(formats strfmt.Registry) error { + + if swag.IsZero(m.Placements) { // not required + return nil + } + + for i := 0; i < len(m.Placements); i++ { + if swag.IsZero(m.Placements[i]) { // not required + continue + } + + if m.Placements[i] != nil { + if err := m.Placements[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("placements" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1VsphereMachinePoolCloudConfigEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1VsphereMachinePoolCloudConfigEntity) UnmarshalBinary(b []byte) error { + var res V1VsphereMachinePoolCloudConfigEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_vsphere_machine_pool_config.go b/api/models/v1_vsphere_machine_pool_config.go new file mode 100644 index 00000000..e732d9a3 --- /dev/null +++ b/api/models/v1_vsphere_machine_pool_config.go @@ -0,0 +1,238 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1VsphereMachinePoolConfig v1 vsphere machine pool config +// +// swagger:model v1VsphereMachinePoolConfig +type V1VsphereMachinePoolConfig struct { + + // additionalLabels + AdditionalLabels map[string]string `json:"additionalLabels,omitempty"` + + // AdditionalTags is an optional set of tags to add to resources managed by the provider, in addition to the ones added by default. For eg., tags for EKS nodeGroup or EKS NodegroupIAMRole + AdditionalTags map[string]string `json:"additionalTags,omitempty"` + + // InstanceType defines the required CPU, Memory, Storage + // Required: true + InstanceType *V1VsphereInstanceType `json:"instanceType"` + + // whether this pool is for control plane + // Required: true + IsControlPlane *bool `json:"isControlPlane"` + + // labels for this pool, example: control-plane/worker, gpu, windows + Labels []string `json:"labels"` + + // machine pool properties + MachinePoolProperties *V1MachinePoolProperties `json:"machinePoolProperties,omitempty"` + + // max size of the pool, for scaling + MaxSize int32 `json:"maxSize,omitempty"` + + // min size of the pool, for scaling + MinSize int32 `json:"minSize,omitempty"` + + // name + Name string `json:"name,omitempty"` + + // Minimum number of seconds a node should be Ready, before the next node is selected for repave. Applicable only for workerpools in infrastructure cluster + NodeRepaveInterval int32 `json:"nodeRepaveInterval,omitempty"` + + // Placements configuration Placements If defined, will replace default values defined in VsphereClusterConfig Array means one MachinePool can span across multiple vsphere compute cluster + Placements []*V1VspherePlacementConfig `json:"placements"` + + // size of the pool, number of machines + Size int32 `json:"size,omitempty"` + + // control plane or worker taints + // Unique: true + Taints []*V1Taint `json:"taints"` + + // rolling update strategy for this machinepool if not specified, will use ScaleOut + UpdateStrategy *V1UpdateStrategy `json:"updateStrategy,omitempty"` + + // if IsControlPlane==true && useControlPlaneAsWorker==true, then will remove control plane taint this will not be used for worker pools + UseControlPlaneAsWorker bool `json:"useControlPlaneAsWorker"` +} + +// Validate validates this v1 vsphere machine pool config +func (m *V1VsphereMachinePoolConfig) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateInstanceType(formats); err != nil { + res = append(res, err) + } + + if err := m.validateIsControlPlane(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMachinePoolProperties(formats); err != nil { + res = append(res, err) + } + + if err := m.validatePlacements(formats); err != nil { + res = append(res, err) + } + + if err := m.validateTaints(formats); err != nil { + res = append(res, err) + } + + if err := m.validateUpdateStrategy(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1VsphereMachinePoolConfig) validateInstanceType(formats strfmt.Registry) error { + + if err := validate.Required("instanceType", "body", m.InstanceType); err != nil { + return err + } + + if m.InstanceType != nil { + if err := m.InstanceType.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("instanceType") + } + return err + } + } + + return nil +} + +func (m *V1VsphereMachinePoolConfig) validateIsControlPlane(formats strfmt.Registry) error { + + if err := validate.Required("isControlPlane", "body", m.IsControlPlane); err != nil { + return err + } + + return nil +} + +func (m *V1VsphereMachinePoolConfig) validateMachinePoolProperties(formats strfmt.Registry) error { + + if swag.IsZero(m.MachinePoolProperties) { // not required + return nil + } + + if m.MachinePoolProperties != nil { + if err := m.MachinePoolProperties.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("machinePoolProperties") + } + return err + } + } + + return nil +} + +func (m *V1VsphereMachinePoolConfig) validatePlacements(formats strfmt.Registry) error { + + if swag.IsZero(m.Placements) { // not required + return nil + } + + for i := 0; i < len(m.Placements); i++ { + if swag.IsZero(m.Placements[i]) { // not required + continue + } + + if m.Placements[i] != nil { + if err := m.Placements[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("placements" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1VsphereMachinePoolConfig) validateTaints(formats strfmt.Registry) error { + + if swag.IsZero(m.Taints) { // not required + return nil + } + + if err := validate.UniqueItems("taints", "body", m.Taints); err != nil { + return err + } + + for i := 0; i < len(m.Taints); i++ { + if swag.IsZero(m.Taints[i]) { // not required + continue + } + + if m.Taints[i] != nil { + if err := m.Taints[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("taints" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1VsphereMachinePoolConfig) validateUpdateStrategy(formats strfmt.Registry) error { + + if swag.IsZero(m.UpdateStrategy) { // not required + return nil + } + + if m.UpdateStrategy != nil { + if err := m.UpdateStrategy.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("updateStrategy") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1VsphereMachinePoolConfig) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1VsphereMachinePoolConfig) UnmarshalBinary(b []byte) error { + var res V1VsphereMachinePoolConfig + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_vsphere_machine_pool_config_entity.go b/api/models/v1_vsphere_machine_pool_config_entity.go new file mode 100644 index 00000000..f28b38c2 --- /dev/null +++ b/api/models/v1_vsphere_machine_pool_config_entity.go @@ -0,0 +1,98 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1VsphereMachinePoolConfigEntity v1 vsphere machine pool config entity +// +// swagger:model v1VsphereMachinePoolConfigEntity +type V1VsphereMachinePoolConfigEntity struct { + + // cloud config + // Required: true + CloudConfig *V1VsphereMachinePoolCloudConfigEntity `json:"cloudConfig"` + + // pool config + PoolConfig *V1MachinePoolConfigEntity `json:"poolConfig,omitempty"` +} + +// Validate validates this v1 vsphere machine pool config entity +func (m *V1VsphereMachinePoolConfigEntity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateCloudConfig(formats); err != nil { + res = append(res, err) + } + + if err := m.validatePoolConfig(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1VsphereMachinePoolConfigEntity) validateCloudConfig(formats strfmt.Registry) error { + + if err := validate.Required("cloudConfig", "body", m.CloudConfig); err != nil { + return err + } + + if m.CloudConfig != nil { + if err := m.CloudConfig.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("cloudConfig") + } + return err + } + } + + return nil +} + +func (m *V1VsphereMachinePoolConfigEntity) validatePoolConfig(formats strfmt.Registry) error { + + if swag.IsZero(m.PoolConfig) { // not required + return nil + } + + if m.PoolConfig != nil { + if err := m.PoolConfig.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("poolConfig") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1VsphereMachinePoolConfigEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1VsphereMachinePoolConfigEntity) UnmarshalBinary(b []byte) error { + var res V1VsphereMachinePoolConfigEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_vsphere_machine_spec.go b/api/models/v1_vsphere_machine_spec.go new file mode 100644 index 00000000..508573c2 --- /dev/null +++ b/api/models/v1_vsphere_machine_spec.go @@ -0,0 +1,185 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1VsphereMachineSpec vSphere cloud VM definition spec +// +// swagger:model v1VsphereMachineSpec +type V1VsphereMachineSpec struct { + + // images + Images []*V1VsphereImage `json:"images"` + + // instance type + InstanceType *V1VsphereInstanceType `json:"instanceType,omitempty"` + + // nics + // Required: true + Nics []*V1VsphereNic `json:"nics"` + + // NTPServers is a list of NTP servers to use instead of the machine image's default NTP server list. + NtpServers []string `json:"ntpServers"` + + // Placement configuration + // Required: true + Placement *V1VspherePlacementConfig `json:"placement"` + + // VcenterServer is the address of the vSphere endpoint + // Required: true + VcenterServer *string `json:"vcenterServer"` +} + +// Validate validates this v1 vsphere machine spec +func (m *V1VsphereMachineSpec) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateImages(formats); err != nil { + res = append(res, err) + } + + if err := m.validateInstanceType(formats); err != nil { + res = append(res, err) + } + + if err := m.validateNics(formats); err != nil { + res = append(res, err) + } + + if err := m.validatePlacement(formats); err != nil { + res = append(res, err) + } + + if err := m.validateVcenterServer(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1VsphereMachineSpec) validateImages(formats strfmt.Registry) error { + + if swag.IsZero(m.Images) { // not required + return nil + } + + for i := 0; i < len(m.Images); i++ { + if swag.IsZero(m.Images[i]) { // not required + continue + } + + if m.Images[i] != nil { + if err := m.Images[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("images" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1VsphereMachineSpec) validateInstanceType(formats strfmt.Registry) error { + + if swag.IsZero(m.InstanceType) { // not required + return nil + } + + if m.InstanceType != nil { + if err := m.InstanceType.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("instanceType") + } + return err + } + } + + return nil +} + +func (m *V1VsphereMachineSpec) validateNics(formats strfmt.Registry) error { + + if err := validate.Required("nics", "body", m.Nics); err != nil { + return err + } + + for i := 0; i < len(m.Nics); i++ { + if swag.IsZero(m.Nics[i]) { // not required + continue + } + + if m.Nics[i] != nil { + if err := m.Nics[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("nics" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1VsphereMachineSpec) validatePlacement(formats strfmt.Registry) error { + + if err := validate.Required("placement", "body", m.Placement); err != nil { + return err + } + + if m.Placement != nil { + if err := m.Placement.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("placement") + } + return err + } + } + + return nil +} + +func (m *V1VsphereMachineSpec) validateVcenterServer(formats strfmt.Registry) error { + + if err := validate.Required("vcenterServer", "body", m.VcenterServer); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1VsphereMachineSpec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1VsphereMachineSpec) UnmarshalBinary(b []byte) error { + var res V1VsphereMachineSpec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_vsphere_machines.go b/api/models/v1_vsphere_machines.go new file mode 100644 index 00000000..81923e85 --- /dev/null +++ b/api/models/v1_vsphere_machines.go @@ -0,0 +1,112 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1VsphereMachines vSphere machine list +// +// swagger:model v1VsphereMachines +type V1VsphereMachines struct { + + // items + // Required: true + // Unique: true + Items []*V1VsphereMachine `json:"items"` + + // listmeta + Listmeta *V1ListMetaData `json:"listmeta,omitempty"` +} + +// Validate validates this v1 vsphere machines +func (m *V1VsphereMachines) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateItems(formats); err != nil { + res = append(res, err) + } + + if err := m.validateListmeta(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1VsphereMachines) validateItems(formats strfmt.Registry) error { + + if err := validate.Required("items", "body", m.Items); err != nil { + return err + } + + if err := validate.UniqueItems("items", "body", m.Items); err != nil { + return err + } + + for i := 0; i < len(m.Items); i++ { + if swag.IsZero(m.Items[i]) { // not required + continue + } + + if m.Items[i] != nil { + if err := m.Items[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("items" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1VsphereMachines) validateListmeta(formats strfmt.Registry) error { + + if swag.IsZero(m.Listmeta) { // not required + return nil + } + + if m.Listmeta != nil { + if err := m.Listmeta.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("listmeta") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1VsphereMachines) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1VsphereMachines) UnmarshalBinary(b []byte) error { + var res V1VsphereMachines + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_vsphere_network_config.go b/api/models/v1_vsphere_network_config.go new file mode 100644 index 00000000..17a65f18 --- /dev/null +++ b/api/models/v1_vsphere_network_config.go @@ -0,0 +1,117 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1VsphereNetworkConfig v1 vsphere network config +// +// swagger:model v1VsphereNetworkConfig +type V1VsphereNetworkConfig struct { + + // when staticIP=true, need to provide IPPool + IPPool *V1IPPool `json:"ipPool,omitempty"` + + // NetworkName is the name of the network in which VMs are created/located. + // Required: true + NetworkName *string `json:"networkName"` + + // ParentPoolRef reference to the ParentPool which allocates IPs for this IPPool + ParentPoolRef *V1ObjectReference `json:"parentPoolRef,omitempty"` + + // support dhcp or static IP, if false, use DHCP + StaticIP bool `json:"staticIp,omitempty"` +} + +// Validate validates this v1 vsphere network config +func (m *V1VsphereNetworkConfig) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateIPPool(formats); err != nil { + res = append(res, err) + } + + if err := m.validateNetworkName(formats); err != nil { + res = append(res, err) + } + + if err := m.validateParentPoolRef(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1VsphereNetworkConfig) validateIPPool(formats strfmt.Registry) error { + + if swag.IsZero(m.IPPool) { // not required + return nil + } + + if m.IPPool != nil { + if err := m.IPPool.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("ipPool") + } + return err + } + } + + return nil +} + +func (m *V1VsphereNetworkConfig) validateNetworkName(formats strfmt.Registry) error { + + if err := validate.Required("networkName", "body", m.NetworkName); err != nil { + return err + } + + return nil +} + +func (m *V1VsphereNetworkConfig) validateParentPoolRef(formats strfmt.Registry) error { + + if swag.IsZero(m.ParentPoolRef) { // not required + return nil + } + + if m.ParentPoolRef != nil { + if err := m.ParentPoolRef.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("parentPoolRef") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1VsphereNetworkConfig) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1VsphereNetworkConfig) UnmarshalBinary(b []byte) error { + var res V1VsphereNetworkConfig + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_vsphere_network_config_entity.go b/api/models/v1_vsphere_network_config_entity.go new file mode 100644 index 00000000..84fd82e7 --- /dev/null +++ b/api/models/v1_vsphere_network_config_entity.go @@ -0,0 +1,70 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1VsphereNetworkConfigEntity v1 vsphere network config entity +// +// swagger:model v1VsphereNetworkConfigEntity +type V1VsphereNetworkConfigEntity struct { + + // NetworkName is the name of the network in which VMs are created/located. + // Required: true + NetworkName *string `json:"networkName"` + + // ParentPoolRef Uid to the ParentPool which allocates IPs for this IPPool + ParentPoolUID string `json:"parentPoolUid,omitempty"` + + // support dhcp or static IP, if false, use DHCP + StaticIP bool `json:"staticIp,omitempty"` +} + +// Validate validates this v1 vsphere network config entity +func (m *V1VsphereNetworkConfigEntity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateNetworkName(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1VsphereNetworkConfigEntity) validateNetworkName(formats strfmt.Registry) error { + + if err := validate.Required("networkName", "body", m.NetworkName); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1VsphereNetworkConfigEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1VsphereNetworkConfigEntity) UnmarshalBinary(b []byte) error { + var res V1VsphereNetworkConfigEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_vsphere_nic.go b/api/models/v1_vsphere_nic.go new file mode 100644 index 00000000..76bab3d5 --- /dev/null +++ b/api/models/v1_vsphere_nic.go @@ -0,0 +1,73 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1VsphereNic vSphere network interface +// +// swagger:model v1VsphereNic +type V1VsphereNic struct { + + // index + Index int8 `json:"index,omitempty"` + + // mac address + MacAddress string `json:"macAddress,omitempty"` + + // network name + // Required: true + NetworkName *string `json:"networkName"` + + // private i ps + PrivateIPs []string `json:"privateIPs"` +} + +// Validate validates this v1 vsphere nic +func (m *V1VsphereNic) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateNetworkName(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1VsphereNic) validateNetworkName(formats strfmt.Registry) error { + + if err := validate.Required("networkName", "body", m.NetworkName); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1VsphereNic) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1VsphereNic) UnmarshalBinary(b []byte) error { + var res V1VsphereNic + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_vsphere_overlord_cluster_config_entity.go b/api/models/v1_vsphere_overlord_cluster_config_entity.go new file mode 100644 index 00000000..f720cb4b --- /dev/null +++ b/api/models/v1_vsphere_overlord_cluster_config_entity.go @@ -0,0 +1,114 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1VsphereOverlordClusterConfigEntity v1 vsphere overlord cluster config entity +// +// swagger:model v1VsphereOverlordClusterConfigEntity +type V1VsphereOverlordClusterConfigEntity struct { + + // The optional control plane endpoint, which can be an IP or FQDN + ControlPlaneEndpoint *V1ControlPlaneEndPoint `json:"controlPlaneEndpoint,omitempty"` + + // NTPServers is a list of NTP servers to use instead of the machine image's default NTP server list. + NtpServers []string `json:"ntpServers"` + + // Placements configuration Placements If defined, will replace default values defined in VsphereClusterConfig Array means one MachinePool can span across multiple vsphere compute cluster + Placements []*V1VspherePlacementConfigEntity `json:"placements"` + + // SSHKeys specifies a list of ssh authorized keys for the 'spectro' user + SSHKeys []string `json:"sshKeys"` + + // whether this cluster should use dhcp or static IP, if false, use DHCP if this is set, then all machinepools should have staticIP with provided IPPool adding this as an additional standalone flag without relating to placement.Nework main reason is to enable more validation for placement.Network.StaticIP which should come together with valid Network.IPPool and Network.Name + StaticIP bool `json:"staticIp,omitempty"` +} + +// Validate validates this v1 vsphere overlord cluster config entity +func (m *V1VsphereOverlordClusterConfigEntity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateControlPlaneEndpoint(formats); err != nil { + res = append(res, err) + } + + if err := m.validatePlacements(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1VsphereOverlordClusterConfigEntity) validateControlPlaneEndpoint(formats strfmt.Registry) error { + + if swag.IsZero(m.ControlPlaneEndpoint) { // not required + return nil + } + + if m.ControlPlaneEndpoint != nil { + if err := m.ControlPlaneEndpoint.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("controlPlaneEndpoint") + } + return err + } + } + + return nil +} + +func (m *V1VsphereOverlordClusterConfigEntity) validatePlacements(formats strfmt.Registry) error { + + if swag.IsZero(m.Placements) { // not required + return nil + } + + for i := 0; i < len(m.Placements); i++ { + if swag.IsZero(m.Placements[i]) { // not required + continue + } + + if m.Placements[i] != nil { + if err := m.Placements[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("placements" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1VsphereOverlordClusterConfigEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1VsphereOverlordClusterConfigEntity) UnmarshalBinary(b []byte) error { + var res V1VsphereOverlordClusterConfigEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_vsphere_placement_config.go b/api/models/v1_vsphere_placement_config.go new file mode 100644 index 00000000..0de92425 --- /dev/null +++ b/api/models/v1_vsphere_placement_config.go @@ -0,0 +1,95 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1VspherePlacementConfig Both ClusterConfig and MachinePoolConfig will have PlacementConfig MachinePoolconfig.Placements will overwrite values defined in ClusterConfig Currently the convention is: Datacenter / Folder / ImageTemplateFolder / Network should be defined at ClusterConfig Cluster / ResourcePool / Datastore / Network is defined at MachinePool ClusterConfig Network should only indicate use DHCP or not MachinePool Network should contain the actual network and IPPool +// +// swagger:model v1VspherePlacementConfig +type V1VspherePlacementConfig struct { + + // Cluster is the computecluster in vsphere + Cluster string `json:"cluster,omitempty"` + + // Datacenter is the name or inventory path of the datacenter where this machine's VM is created/located. + Datacenter string `json:"datacenter,omitempty"` + + // Datastore is the datastore in which VMs are created/located. + Datastore string `json:"datastore,omitempty"` + + // Folder is the folder in which VMs are created/located. + Folder string `json:"folder,omitempty"` + + // ImageTemplateFolder is the folder in which VMs templates are created/located. if empty will use default value spectro-templates + ImageTemplateFolder string `json:"imageTemplateFolder,omitempty"` + + // network info + Network *V1VsphereNetworkConfig `json:"network,omitempty"` + + // ResourcePool is the resource pool within the above computecluster Cluster + ResourcePool string `json:"resourcePool,omitempty"` + + // StoragePolicyName of the storage policy to use with this Virtual Machine + StoragePolicyName string `json:"storagePolicyName,omitempty"` + + // UID for this placement + UID string `json:"uid,omitempty"` +} + +// Validate validates this v1 vsphere placement config +func (m *V1VspherePlacementConfig) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateNetwork(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1VspherePlacementConfig) validateNetwork(formats strfmt.Registry) error { + + if swag.IsZero(m.Network) { // not required + return nil + } + + if m.Network != nil { + if err := m.Network.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("network") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1VspherePlacementConfig) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1VspherePlacementConfig) UnmarshalBinary(b []byte) error { + var res V1VspherePlacementConfig + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_vsphere_placement_config_entity.go b/api/models/v1_vsphere_placement_config_entity.go new file mode 100644 index 00000000..41dc0f5f --- /dev/null +++ b/api/models/v1_vsphere_placement_config_entity.go @@ -0,0 +1,95 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1VspherePlacementConfigEntity Both ClusterConfig and MachinePoolConfig will have PlacementConfig MachinePoolconfig.Placements will overwrite values defined in ClusterConfig Currently the convention is: Datacenter / Folder / ImageTemplateFolder / Network should be defined at ClusterConfig Cluster / ResourcePool / Datastore / Network is defined at MachinePool ClusterConfig Network should only indicate use DHCP or not MachinePool Network should contain the actual network and IPPool +// +// swagger:model v1VspherePlacementConfigEntity +type V1VspherePlacementConfigEntity struct { + + // Cluster is the computecluster in vsphere + Cluster string `json:"cluster,omitempty"` + + // Datacenter is the name or inventory path of the datacenter where this machine's VM is created/located. + Datacenter string `json:"datacenter,omitempty"` + + // Datastore is the datastore in which VMs are created/located. + Datastore string `json:"datastore,omitempty"` + + // Folder is the folder in which VMs are created/located. + Folder string `json:"folder,omitempty"` + + // ImageTemplateFolder is the folder in which VMs templates are created/located. if empty will use default value spectro-templates + ImageTemplateFolder string `json:"imageTemplateFolder,omitempty"` + + // network info + Network *V1VsphereNetworkConfigEntity `json:"network,omitempty"` + + // ResourcePool is the resource pool within the above computecluster Cluster + ResourcePool string `json:"resourcePool,omitempty"` + + // StoragePolicyName of the storage policy to use with this Virtual Machine + StoragePolicyName string `json:"storagePolicyName,omitempty"` + + // UID for this placement + UID string `json:"uid,omitempty"` +} + +// Validate validates this v1 vsphere placement config entity +func (m *V1VspherePlacementConfigEntity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateNetwork(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1VspherePlacementConfigEntity) validateNetwork(formats strfmt.Registry) error { + + if swag.IsZero(m.Network) { // not required + return nil + } + + if m.Network != nil { + if err := m.Network.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("network") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1VspherePlacementConfigEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1VspherePlacementConfigEntity) UnmarshalBinary(b []byte) error { + var res V1VspherePlacementConfigEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_workspace.go b/api/models/v1_workspace.go new file mode 100644 index 00000000..a13872e3 --- /dev/null +++ b/api/models/v1_workspace.go @@ -0,0 +1,121 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1Workspace Workspace information +// +// swagger:model v1Workspace +type V1Workspace struct { + + // metadata + Metadata *V1ObjectMeta `json:"metadata,omitempty"` + + // spec + Spec *V1WorkspaceSpec `json:"spec,omitempty"` + + // status + Status *V1WorkspaceStatus `json:"status,omitempty"` +} + +// Validate validates this v1 workspace +func (m *V1Workspace) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSpec(formats); err != nil { + res = append(res, err) + } + + if err := m.validateStatus(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1Workspace) validateMetadata(formats strfmt.Registry) error { + + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } + return err + } + } + + return nil +} + +func (m *V1Workspace) validateSpec(formats strfmt.Registry) error { + + if swag.IsZero(m.Spec) { // not required + return nil + } + + if m.Spec != nil { + if err := m.Spec.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec") + } + return err + } + } + + return nil +} + +func (m *V1Workspace) validateStatus(formats strfmt.Registry) error { + + if swag.IsZero(m.Status) { // not required + return nil + } + + if m.Status != nil { + if err := m.Status.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("status") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1Workspace) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1Workspace) UnmarshalBinary(b []byte) error { + var res V1Workspace + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_workspace_backup.go b/api/models/v1_workspace_backup.go new file mode 100644 index 00000000..ee2b9660 --- /dev/null +++ b/api/models/v1_workspace_backup.go @@ -0,0 +1,121 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1WorkspaceBackup Workspace backup +// +// swagger:model v1WorkspaceBackup +type V1WorkspaceBackup struct { + + // metadata + Metadata *V1ObjectMeta `json:"metadata,omitempty"` + + // spec + Spec *V1WorkspaceBackupSpec `json:"spec,omitempty"` + + // status + Status *V1WorkspaceBackupStatus `json:"status,omitempty"` +} + +// Validate validates this v1 workspace backup +func (m *V1WorkspaceBackup) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSpec(formats); err != nil { + res = append(res, err) + } + + if err := m.validateStatus(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1WorkspaceBackup) validateMetadata(formats strfmt.Registry) error { + + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } + return err + } + } + + return nil +} + +func (m *V1WorkspaceBackup) validateSpec(formats strfmt.Registry) error { + + if swag.IsZero(m.Spec) { // not required + return nil + } + + if m.Spec != nil { + if err := m.Spec.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec") + } + return err + } + } + + return nil +} + +func (m *V1WorkspaceBackup) validateStatus(formats strfmt.Registry) error { + + if swag.IsZero(m.Status) { // not required + return nil + } + + if m.Status != nil { + if err := m.Status.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("status") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1WorkspaceBackup) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1WorkspaceBackup) UnmarshalBinary(b []byte) error { + var res V1WorkspaceBackup + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_workspace_backup_cluster_ref.go b/api/models/v1_workspace_backup_cluster_ref.go new file mode 100644 index 00000000..c0de5c1c --- /dev/null +++ b/api/models/v1_workspace_backup_cluster_ref.go @@ -0,0 +1,46 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1WorkspaceBackupClusterRef Workspace backup cluster ref +// +// swagger:model v1WorkspaceBackupClusterRef +type V1WorkspaceBackupClusterRef struct { + + // backup name + BackupName string `json:"backupName,omitempty"` + + // cluster Uid + ClusterUID string `json:"clusterUid,omitempty"` +} + +// Validate validates this v1 workspace backup cluster ref +func (m *V1WorkspaceBackupClusterRef) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1WorkspaceBackupClusterRef) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1WorkspaceBackupClusterRef) UnmarshalBinary(b []byte) error { + var res V1WorkspaceBackupClusterRef + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_workspace_backup_config.go b/api/models/v1_workspace_backup_config.go new file mode 100644 index 00000000..edfca3bd --- /dev/null +++ b/api/models/v1_workspace_backup_config.go @@ -0,0 +1,96 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1WorkspaceBackupConfig Workspace backup config +// +// swagger:model v1WorkspaceBackupConfig +type V1WorkspaceBackupConfig struct { + + // backup config + BackupConfig *V1ClusterBackupConfig `json:"backupConfig,omitempty"` + + // cluster uids + // Unique: true + ClusterUids []string `json:"clusterUids"` + + // include all clusters + IncludeAllClusters bool `json:"includeAllClusters,omitempty"` +} + +// Validate validates this v1 workspace backup config +func (m *V1WorkspaceBackupConfig) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateBackupConfig(formats); err != nil { + res = append(res, err) + } + + if err := m.validateClusterUids(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1WorkspaceBackupConfig) validateBackupConfig(formats strfmt.Registry) error { + + if swag.IsZero(m.BackupConfig) { // not required + return nil + } + + if m.BackupConfig != nil { + if err := m.BackupConfig.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("backupConfig") + } + return err + } + } + + return nil +} + +func (m *V1WorkspaceBackupConfig) validateClusterUids(formats strfmt.Registry) error { + + if swag.IsZero(m.ClusterUids) { // not required + return nil + } + + if err := validate.UniqueItems("clusterUids", "body", m.ClusterUids); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1WorkspaceBackupConfig) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1WorkspaceBackupConfig) UnmarshalBinary(b []byte) error { + var res V1WorkspaceBackupConfig + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_workspace_backup_config_entity.go b/api/models/v1_workspace_backup_config_entity.go new file mode 100644 index 00000000..f698ac35 --- /dev/null +++ b/api/models/v1_workspace_backup_config_entity.go @@ -0,0 +1,96 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1WorkspaceBackupConfigEntity Cluster backup config +// +// swagger:model v1WorkspaceBackupConfigEntity +type V1WorkspaceBackupConfigEntity struct { + + // backup config + BackupConfig *V1ClusterBackupConfig `json:"backupConfig,omitempty"` + + // cluster uids + // Unique: true + ClusterUids []string `json:"clusterUids"` + + // include all clusters + IncludeAllClusters bool `json:"includeAllClusters,omitempty"` +} + +// Validate validates this v1 workspace backup config entity +func (m *V1WorkspaceBackupConfigEntity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateBackupConfig(formats); err != nil { + res = append(res, err) + } + + if err := m.validateClusterUids(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1WorkspaceBackupConfigEntity) validateBackupConfig(formats strfmt.Registry) error { + + if swag.IsZero(m.BackupConfig) { // not required + return nil + } + + if m.BackupConfig != nil { + if err := m.BackupConfig.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("backupConfig") + } + return err + } + } + + return nil +} + +func (m *V1WorkspaceBackupConfigEntity) validateClusterUids(formats strfmt.Registry) error { + + if swag.IsZero(m.ClusterUids) { // not required + return nil + } + + if err := validate.UniqueItems("clusterUids", "body", m.ClusterUids); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1WorkspaceBackupConfigEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1WorkspaceBackupConfigEntity) UnmarshalBinary(b []byte) error { + var res V1WorkspaceBackupConfigEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_workspace_backup_delete_entity.go b/api/models/v1_workspace_backup_delete_entity.go new file mode 100644 index 00000000..644fc2b2 --- /dev/null +++ b/api/models/v1_workspace_backup_delete_entity.go @@ -0,0 +1,89 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1WorkspaceBackupDeleteEntity Cluster backup delete config +// +// swagger:model v1WorkspaceBackupDeleteEntity +type V1WorkspaceBackupDeleteEntity struct { + + // cluster configs + // Unique: true + ClusterConfigs []*V1WorkspaceBackupClusterRef `json:"clusterConfigs"` + + // request Uid + RequestUID string `json:"requestUid,omitempty"` +} + +// Validate validates this v1 workspace backup delete entity +func (m *V1WorkspaceBackupDeleteEntity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateClusterConfigs(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1WorkspaceBackupDeleteEntity) validateClusterConfigs(formats strfmt.Registry) error { + + if swag.IsZero(m.ClusterConfigs) { // not required + return nil + } + + if err := validate.UniqueItems("clusterConfigs", "body", m.ClusterConfigs); err != nil { + return err + } + + for i := 0; i < len(m.ClusterConfigs); i++ { + if swag.IsZero(m.ClusterConfigs[i]) { // not required + continue + } + + if m.ClusterConfigs[i] != nil { + if err := m.ClusterConfigs[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("clusterConfigs" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1WorkspaceBackupDeleteEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1WorkspaceBackupDeleteEntity) UnmarshalBinary(b []byte) error { + var res V1WorkspaceBackupDeleteEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_workspace_backup_spec.go b/api/models/v1_workspace_backup_spec.go new file mode 100644 index 00000000..8a4c2a3c --- /dev/null +++ b/api/models/v1_workspace_backup_spec.go @@ -0,0 +1,74 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1WorkspaceBackupSpec Workspace backup spec +// +// swagger:model v1WorkspaceBackupSpec +type V1WorkspaceBackupSpec struct { + + // config + Config *V1WorkspaceBackupConfig `json:"config,omitempty"` + + // workspace Uid + WorkspaceUID string `json:"workspaceUid,omitempty"` +} + +// Validate validates this v1 workspace backup spec +func (m *V1WorkspaceBackupSpec) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateConfig(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1WorkspaceBackupSpec) validateConfig(formats strfmt.Registry) error { + + if swag.IsZero(m.Config) { // not required + return nil + } + + if m.Config != nil { + if err := m.Config.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("config") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1WorkspaceBackupSpec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1WorkspaceBackupSpec) UnmarshalBinary(b []byte) error { + var res V1WorkspaceBackupSpec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_workspace_backup_state.go b/api/models/v1_workspace_backup_state.go new file mode 100644 index 00000000..4233c985 --- /dev/null +++ b/api/models/v1_workspace_backup_state.go @@ -0,0 +1,46 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1WorkspaceBackupState Workspace backup state +// +// swagger:model v1WorkspaceBackupState +type V1WorkspaceBackupState struct { + + // delete state + DeleteState string `json:"deleteState,omitempty"` + + // state + State string `json:"state,omitempty"` +} + +// Validate validates this v1 workspace backup state +func (m *V1WorkspaceBackupState) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1WorkspaceBackupState) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1WorkspaceBackupState) UnmarshalBinary(b []byte) error { + var res V1WorkspaceBackupState + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_workspace_backup_status.go b/api/models/v1_workspace_backup_status.go new file mode 100644 index 00000000..626d0ee5 --- /dev/null +++ b/api/models/v1_workspace_backup_status.go @@ -0,0 +1,80 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1WorkspaceBackupStatus Workspace backup status +// +// swagger:model v1WorkspaceBackupStatus +type V1WorkspaceBackupStatus struct { + + // workspace backup statuses + WorkspaceBackupStatuses []*V1WorkspaceBackupStatusMeta `json:"workspaceBackupStatuses"` +} + +// Validate validates this v1 workspace backup status +func (m *V1WorkspaceBackupStatus) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateWorkspaceBackupStatuses(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1WorkspaceBackupStatus) validateWorkspaceBackupStatuses(formats strfmt.Registry) error { + + if swag.IsZero(m.WorkspaceBackupStatuses) { // not required + return nil + } + + for i := 0; i < len(m.WorkspaceBackupStatuses); i++ { + if swag.IsZero(m.WorkspaceBackupStatuses[i]) { // not required + continue + } + + if m.WorkspaceBackupStatuses[i] != nil { + if err := m.WorkspaceBackupStatuses[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("workspaceBackupStatuses" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1WorkspaceBackupStatus) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1WorkspaceBackupStatus) UnmarshalBinary(b []byte) error { + var res V1WorkspaceBackupStatus + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_workspace_backup_status_config.go b/api/models/v1_workspace_backup_status_config.go new file mode 100644 index 00000000..33245c9d --- /dev/null +++ b/api/models/v1_workspace_backup_status_config.go @@ -0,0 +1,80 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1WorkspaceBackupStatusConfig Workspace backup status config +// +// swagger:model v1WorkspaceBackupStatusConfig +type V1WorkspaceBackupStatusConfig struct { + + // backup name + BackupName string `json:"backupName,omitempty"` + + // duration in hours + DurationInHours int64 `json:"durationInHours,omitempty"` + + // include all disks + IncludeAllDisks bool `json:"includeAllDisks,omitempty"` + + // include cluster resources + IncludeClusterResources bool `json:"includeClusterResources,omitempty"` + + // namespaces + // Unique: true + Namespaces []string `json:"namespaces"` +} + +// Validate validates this v1 workspace backup status config +func (m *V1WorkspaceBackupStatusConfig) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateNamespaces(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1WorkspaceBackupStatusConfig) validateNamespaces(formats strfmt.Registry) error { + + if swag.IsZero(m.Namespaces) { // not required + return nil + } + + if err := validate.UniqueItems("namespaces", "body", m.Namespaces); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1WorkspaceBackupStatusConfig) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1WorkspaceBackupStatusConfig) UnmarshalBinary(b []byte) error { + var res V1WorkspaceBackupStatusConfig + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_workspace_backup_status_meta.go b/api/models/v1_workspace_backup_status_meta.go new file mode 100644 index 00000000..56988f3e --- /dev/null +++ b/api/models/v1_workspace_backup_status_meta.go @@ -0,0 +1,99 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1WorkspaceBackupStatusMeta Workspace backup status meta +// +// swagger:model v1WorkspaceBackupStatusMeta +type V1WorkspaceBackupStatusMeta struct { + + // actor + Actor *V1ClusterFeatureActor `json:"actor,omitempty"` + + // request Uid + RequestUID string `json:"requestUid,omitempty"` + + // workspace backup config + WorkspaceBackupConfig *V1WorkspaceClusterBackupConfig `json:"workspaceBackupConfig,omitempty"` +} + +// Validate validates this v1 workspace backup status meta +func (m *V1WorkspaceBackupStatusMeta) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateActor(formats); err != nil { + res = append(res, err) + } + + if err := m.validateWorkspaceBackupConfig(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1WorkspaceBackupStatusMeta) validateActor(formats strfmt.Registry) error { + + if swag.IsZero(m.Actor) { // not required + return nil + } + + if m.Actor != nil { + if err := m.Actor.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("actor") + } + return err + } + } + + return nil +} + +func (m *V1WorkspaceBackupStatusMeta) validateWorkspaceBackupConfig(formats strfmt.Registry) error { + + if swag.IsZero(m.WorkspaceBackupConfig) { // not required + return nil + } + + if m.WorkspaceBackupConfig != nil { + if err := m.WorkspaceBackupConfig.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("workspaceBackupConfig") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1WorkspaceBackupStatusMeta) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1WorkspaceBackupStatusMeta) UnmarshalBinary(b []byte) error { + var res V1WorkspaceBackupStatusMeta + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_workspace_cluster_backup_config.go b/api/models/v1_workspace_cluster_backup_config.go new file mode 100644 index 00000000..68be102f --- /dev/null +++ b/api/models/v1_workspace_cluster_backup_config.go @@ -0,0 +1,181 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1WorkspaceClusterBackupConfig Workspace cluster backup config +// +// swagger:model v1WorkspaceClusterBackupConfig +type V1WorkspaceClusterBackupConfig struct { + + // backup name + BackupName string `json:"backupName,omitempty"` + + // backup state + BackupState *V1WorkspaceBackupState `json:"backupState,omitempty"` + + // backup time + // Format: date-time + BackupTime V1Time `json:"backupTime,omitempty"` + + // cluster backup refs + ClusterBackupRefs []*V1WorkspaceClusterBackupResponse `json:"clusterBackupRefs"` + + // config + Config *V1WorkspaceBackupStatusConfig `json:"config,omitempty"` + + // request time + // Format: date-time + RequestTime V1Time `json:"requestTime,omitempty"` +} + +// Validate validates this v1 workspace cluster backup config +func (m *V1WorkspaceClusterBackupConfig) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateBackupState(formats); err != nil { + res = append(res, err) + } + + if err := m.validateBackupTime(formats); err != nil { + res = append(res, err) + } + + if err := m.validateClusterBackupRefs(formats); err != nil { + res = append(res, err) + } + + if err := m.validateConfig(formats); err != nil { + res = append(res, err) + } + + if err := m.validateRequestTime(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1WorkspaceClusterBackupConfig) validateBackupState(formats strfmt.Registry) error { + + if swag.IsZero(m.BackupState) { // not required + return nil + } + + if m.BackupState != nil { + if err := m.BackupState.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("backupState") + } + return err + } + } + + return nil +} + +func (m *V1WorkspaceClusterBackupConfig) validateBackupTime(formats strfmt.Registry) error { + + if swag.IsZero(m.BackupTime) { // not required + return nil + } + + if err := m.BackupTime.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("backupTime") + } + return err + } + + return nil +} + +func (m *V1WorkspaceClusterBackupConfig) validateClusterBackupRefs(formats strfmt.Registry) error { + + if swag.IsZero(m.ClusterBackupRefs) { // not required + return nil + } + + for i := 0; i < len(m.ClusterBackupRefs); i++ { + if swag.IsZero(m.ClusterBackupRefs[i]) { // not required + continue + } + + if m.ClusterBackupRefs[i] != nil { + if err := m.ClusterBackupRefs[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("clusterBackupRefs" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1WorkspaceClusterBackupConfig) validateConfig(formats strfmt.Registry) error { + + if swag.IsZero(m.Config) { // not required + return nil + } + + if m.Config != nil { + if err := m.Config.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("config") + } + return err + } + } + + return nil +} + +func (m *V1WorkspaceClusterBackupConfig) validateRequestTime(formats strfmt.Registry) error { + + if swag.IsZero(m.RequestTime) { // not required + return nil + } + + if err := m.RequestTime.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("requestTime") + } + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1WorkspaceClusterBackupConfig) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1WorkspaceClusterBackupConfig) UnmarshalBinary(b []byte) error { + var res V1WorkspaceClusterBackupConfig + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_workspace_cluster_backup_response.go b/api/models/v1_workspace_cluster_backup_response.go new file mode 100644 index 00000000..1c53bb90 --- /dev/null +++ b/api/models/v1_workspace_cluster_backup_response.go @@ -0,0 +1,80 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1WorkspaceClusterBackupResponse Workspace cluster backup response +// +// swagger:model v1WorkspaceClusterBackupResponse +type V1WorkspaceClusterBackupResponse struct { + + // backup status meta + BackupStatusMeta *V1BackupStatusMeta `json:"backupStatusMeta,omitempty"` + + // backup Uid + BackupUID string `json:"backupUid,omitempty"` + + // cluster name + ClusterName string `json:"clusterName,omitempty"` + + // cluster Uid + ClusterUID string `json:"clusterUid,omitempty"` +} + +// Validate validates this v1 workspace cluster backup response +func (m *V1WorkspaceClusterBackupResponse) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateBackupStatusMeta(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1WorkspaceClusterBackupResponse) validateBackupStatusMeta(formats strfmt.Registry) error { + + if swag.IsZero(m.BackupStatusMeta) { // not required + return nil + } + + if m.BackupStatusMeta != nil { + if err := m.BackupStatusMeta.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("backupStatusMeta") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1WorkspaceClusterBackupResponse) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1WorkspaceClusterBackupResponse) UnmarshalBinary(b []byte) error { + var res V1WorkspaceClusterBackupResponse + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_workspace_cluster_namespace.go b/api/models/v1_workspace_cluster_namespace.go new file mode 100644 index 00000000..6bbfd7f2 --- /dev/null +++ b/api/models/v1_workspace_cluster_namespace.go @@ -0,0 +1,102 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1WorkspaceClusterNamespace Workspace cluster namespace +// +// swagger:model v1WorkspaceClusterNamespace +type V1WorkspaceClusterNamespace struct { + + // image + Image *V1WorkspaceNamespaceImage `json:"image,omitempty"` + + // is regex + IsRegex bool `json:"isRegex"` + + // name + Name string `json:"name,omitempty"` + + // namespace resource allocation + NamespaceResourceAllocation *V1WorkspaceNamespaceResourceAllocation `json:"namespaceResourceAllocation,omitempty"` +} + +// Validate validates this v1 workspace cluster namespace +func (m *V1WorkspaceClusterNamespace) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateImage(formats); err != nil { + res = append(res, err) + } + + if err := m.validateNamespaceResourceAllocation(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1WorkspaceClusterNamespace) validateImage(formats strfmt.Registry) error { + + if swag.IsZero(m.Image) { // not required + return nil + } + + if m.Image != nil { + if err := m.Image.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("image") + } + return err + } + } + + return nil +} + +func (m *V1WorkspaceClusterNamespace) validateNamespaceResourceAllocation(formats strfmt.Registry) error { + + if swag.IsZero(m.NamespaceResourceAllocation) { // not required + return nil + } + + if m.NamespaceResourceAllocation != nil { + if err := m.NamespaceResourceAllocation.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("namespaceResourceAllocation") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1WorkspaceClusterNamespace) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1WorkspaceClusterNamespace) UnmarshalBinary(b []byte) error { + var res V1WorkspaceClusterNamespace + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_workspace_cluster_namespaces_entity.go b/api/models/v1_workspace_cluster_namespaces_entity.go new file mode 100644 index 00000000..74dbdd48 --- /dev/null +++ b/api/models/v1_workspace_cluster_namespaces_entity.go @@ -0,0 +1,148 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1WorkspaceClusterNamespacesEntity Workspace cluster namespaces update entity +// +// swagger:model v1WorkspaceClusterNamespacesEntity +type V1WorkspaceClusterNamespacesEntity struct { + + // cluster namespaces + // Unique: true + ClusterNamespaces []*V1WorkspaceClusterNamespace `json:"clusterNamespaces"` + + // cluster refs + // Unique: true + ClusterRefs []*V1WorkspaceClusterRef `json:"clusterRefs"` + + // quota + Quota *V1WorkspaceQuota `json:"quota,omitempty"` +} + +// Validate validates this v1 workspace cluster namespaces entity +func (m *V1WorkspaceClusterNamespacesEntity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateClusterNamespaces(formats); err != nil { + res = append(res, err) + } + + if err := m.validateClusterRefs(formats); err != nil { + res = append(res, err) + } + + if err := m.validateQuota(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1WorkspaceClusterNamespacesEntity) validateClusterNamespaces(formats strfmt.Registry) error { + + if swag.IsZero(m.ClusterNamespaces) { // not required + return nil + } + + if err := validate.UniqueItems("clusterNamespaces", "body", m.ClusterNamespaces); err != nil { + return err + } + + for i := 0; i < len(m.ClusterNamespaces); i++ { + if swag.IsZero(m.ClusterNamespaces[i]) { // not required + continue + } + + if m.ClusterNamespaces[i] != nil { + if err := m.ClusterNamespaces[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("clusterNamespaces" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1WorkspaceClusterNamespacesEntity) validateClusterRefs(formats strfmt.Registry) error { + + if swag.IsZero(m.ClusterRefs) { // not required + return nil + } + + if err := validate.UniqueItems("clusterRefs", "body", m.ClusterRefs); err != nil { + return err + } + + for i := 0; i < len(m.ClusterRefs); i++ { + if swag.IsZero(m.ClusterRefs[i]) { // not required + continue + } + + if m.ClusterRefs[i] != nil { + if err := m.ClusterRefs[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("clusterRefs" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1WorkspaceClusterNamespacesEntity) validateQuota(formats strfmt.Registry) error { + + if swag.IsZero(m.Quota) { // not required + return nil + } + + if m.Quota != nil { + if err := m.Quota.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("quota") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1WorkspaceClusterNamespacesEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1WorkspaceClusterNamespacesEntity) UnmarshalBinary(b []byte) error { + var res V1WorkspaceClusterNamespacesEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_workspace_cluster_ref.go b/api/models/v1_workspace_cluster_ref.go new file mode 100644 index 00000000..bb310eb5 --- /dev/null +++ b/api/models/v1_workspace_cluster_ref.go @@ -0,0 +1,46 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1WorkspaceClusterRef Workspace cluster reference +// +// swagger:model v1WorkspaceClusterRef +type V1WorkspaceClusterRef struct { + + // cluster name + ClusterName string `json:"clusterName,omitempty"` + + // cluster Uid + ClusterUID string `json:"clusterUid,omitempty"` +} + +// Validate validates this v1 workspace cluster ref +func (m *V1WorkspaceClusterRef) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1WorkspaceClusterRef) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1WorkspaceClusterRef) UnmarshalBinary(b []byte) error { + var res V1WorkspaceClusterRef + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_workspace_cluster_restore_config.go b/api/models/v1_workspace_cluster_restore_config.go new file mode 100644 index 00000000..db7ee7f7 --- /dev/null +++ b/api/models/v1_workspace_cluster_restore_config.go @@ -0,0 +1,132 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1WorkspaceClusterRestoreConfig Workspace cluster restore config +// +// swagger:model v1WorkspaceClusterRestoreConfig +type V1WorkspaceClusterRestoreConfig struct { + + // backup name + BackupName string `json:"backupName,omitempty"` + + // cluster restore refs + ClusterRestoreRefs []*V1WorkspaceClusterRestoreResponse `json:"clusterRestoreRefs"` + + // restore state + RestoreState *V1WorkspaceRestoreState `json:"restoreState,omitempty"` + + // restore time + // Format: date-time + RestoreTime V1Time `json:"restoreTime,omitempty"` +} + +// Validate validates this v1 workspace cluster restore config +func (m *V1WorkspaceClusterRestoreConfig) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateClusterRestoreRefs(formats); err != nil { + res = append(res, err) + } + + if err := m.validateRestoreState(formats); err != nil { + res = append(res, err) + } + + if err := m.validateRestoreTime(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1WorkspaceClusterRestoreConfig) validateClusterRestoreRefs(formats strfmt.Registry) error { + + if swag.IsZero(m.ClusterRestoreRefs) { // not required + return nil + } + + for i := 0; i < len(m.ClusterRestoreRefs); i++ { + if swag.IsZero(m.ClusterRestoreRefs[i]) { // not required + continue + } + + if m.ClusterRestoreRefs[i] != nil { + if err := m.ClusterRestoreRefs[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("clusterRestoreRefs" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1WorkspaceClusterRestoreConfig) validateRestoreState(formats strfmt.Registry) error { + + if swag.IsZero(m.RestoreState) { // not required + return nil + } + + if m.RestoreState != nil { + if err := m.RestoreState.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("restoreState") + } + return err + } + } + + return nil +} + +func (m *V1WorkspaceClusterRestoreConfig) validateRestoreTime(formats strfmt.Registry) error { + + if swag.IsZero(m.RestoreTime) { // not required + return nil + } + + if err := m.RestoreTime.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("restoreTime") + } + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1WorkspaceClusterRestoreConfig) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1WorkspaceClusterRestoreConfig) UnmarshalBinary(b []byte) error { + var res V1WorkspaceClusterRestoreConfig + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_workspace_cluster_restore_response.go b/api/models/v1_workspace_cluster_restore_response.go new file mode 100644 index 00000000..88f0eccb --- /dev/null +++ b/api/models/v1_workspace_cluster_restore_response.go @@ -0,0 +1,83 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1WorkspaceClusterRestoreResponse Workspace cluster restore response +// +// swagger:model v1WorkspaceClusterRestoreResponse +type V1WorkspaceClusterRestoreResponse struct { + + // backup name + BackupName string `json:"backupName,omitempty"` + + // cluster name + ClusterName string `json:"clusterName,omitempty"` + + // cluster Uid + ClusterUID string `json:"clusterUid,omitempty"` + + // restore status meta + RestoreStatusMeta *V1WorkspaceClusterRestoreState `json:"restoreStatusMeta,omitempty"` + + // restore Uid + RestoreUID string `json:"restoreUid,omitempty"` +} + +// Validate validates this v1 workspace cluster restore response +func (m *V1WorkspaceClusterRestoreResponse) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateRestoreStatusMeta(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1WorkspaceClusterRestoreResponse) validateRestoreStatusMeta(formats strfmt.Registry) error { + + if swag.IsZero(m.RestoreStatusMeta) { // not required + return nil + } + + if m.RestoreStatusMeta != nil { + if err := m.RestoreStatusMeta.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("restoreStatusMeta") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1WorkspaceClusterRestoreResponse) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1WorkspaceClusterRestoreResponse) UnmarshalBinary(b []byte) error { + var res V1WorkspaceClusterRestoreResponse + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_workspace_cluster_restore_state.go b/api/models/v1_workspace_cluster_restore_state.go new file mode 100644 index 00000000..098ebe66 --- /dev/null +++ b/api/models/v1_workspace_cluster_restore_state.go @@ -0,0 +1,76 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1WorkspaceClusterRestoreState Workspace cluster restore state +// +// swagger:model v1WorkspaceClusterRestoreState +type V1WorkspaceClusterRestoreState struct { + + // msg + Msg string `json:"msg,omitempty"` + + // restore time + // Format: date-time + RestoreTime V1Time `json:"restoreTime,omitempty"` + + // state + State string `json:"state,omitempty"` +} + +// Validate validates this v1 workspace cluster restore state +func (m *V1WorkspaceClusterRestoreState) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateRestoreTime(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1WorkspaceClusterRestoreState) validateRestoreTime(formats strfmt.Registry) error { + + if swag.IsZero(m.RestoreTime) { // not required + return nil + } + + if err := m.RestoreTime.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("restoreTime") + } + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1WorkspaceClusterRestoreState) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1WorkspaceClusterRestoreState) UnmarshalBinary(b []byte) error { + var res V1WorkspaceClusterRestoreState + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_workspace_cluster_workload_cron_jobs.go b/api/models/v1_workspace_cluster_workload_cron_jobs.go new file mode 100644 index 00000000..53dda313 --- /dev/null +++ b/api/models/v1_workspace_cluster_workload_cron_jobs.go @@ -0,0 +1,105 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1WorkspaceClusterWorkloadCronJobs Workspace cluster workload cronjobs summary +// +// swagger:model v1WorkspaceClusterWorkloadCronJobs +type V1WorkspaceClusterWorkloadCronJobs struct { + + // cronjobs + Cronjobs []*V1ClusterWorkloadCronJob `json:"cronjobs"` + + // metadata + Metadata *V1RelatedObject `json:"metadata,omitempty"` +} + +// Validate validates this v1 workspace cluster workload cron jobs +func (m *V1WorkspaceClusterWorkloadCronJobs) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateCronjobs(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1WorkspaceClusterWorkloadCronJobs) validateCronjobs(formats strfmt.Registry) error { + + if swag.IsZero(m.Cronjobs) { // not required + return nil + } + + for i := 0; i < len(m.Cronjobs); i++ { + if swag.IsZero(m.Cronjobs[i]) { // not required + continue + } + + if m.Cronjobs[i] != nil { + if err := m.Cronjobs[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("cronjobs" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1WorkspaceClusterWorkloadCronJobs) validateMetadata(formats strfmt.Registry) error { + + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1WorkspaceClusterWorkloadCronJobs) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1WorkspaceClusterWorkloadCronJobs) UnmarshalBinary(b []byte) error { + var res V1WorkspaceClusterWorkloadCronJobs + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_workspace_cluster_workload_daemon_sets.go b/api/models/v1_workspace_cluster_workload_daemon_sets.go new file mode 100644 index 00000000..ec1c751e --- /dev/null +++ b/api/models/v1_workspace_cluster_workload_daemon_sets.go @@ -0,0 +1,105 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1WorkspaceClusterWorkloadDaemonSets Workspace cluster workload daemonsets summary +// +// swagger:model v1WorkspaceClusterWorkloadDaemonSets +type V1WorkspaceClusterWorkloadDaemonSets struct { + + // daemon sets + DaemonSets []*V1ClusterWorkloadDaemonSet `json:"daemonSets"` + + // metadata + Metadata *V1RelatedObject `json:"metadata,omitempty"` +} + +// Validate validates this v1 workspace cluster workload daemon sets +func (m *V1WorkspaceClusterWorkloadDaemonSets) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateDaemonSets(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1WorkspaceClusterWorkloadDaemonSets) validateDaemonSets(formats strfmt.Registry) error { + + if swag.IsZero(m.DaemonSets) { // not required + return nil + } + + for i := 0; i < len(m.DaemonSets); i++ { + if swag.IsZero(m.DaemonSets[i]) { // not required + continue + } + + if m.DaemonSets[i] != nil { + if err := m.DaemonSets[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("daemonSets" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1WorkspaceClusterWorkloadDaemonSets) validateMetadata(formats strfmt.Registry) error { + + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1WorkspaceClusterWorkloadDaemonSets) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1WorkspaceClusterWorkloadDaemonSets) UnmarshalBinary(b []byte) error { + var res V1WorkspaceClusterWorkloadDaemonSets + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_workspace_cluster_workload_deployments.go b/api/models/v1_workspace_cluster_workload_deployments.go new file mode 100644 index 00000000..da151e0d --- /dev/null +++ b/api/models/v1_workspace_cluster_workload_deployments.go @@ -0,0 +1,105 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1WorkspaceClusterWorkloadDeployments Workspace cluster workload deployments summary +// +// swagger:model v1WorkspaceClusterWorkloadDeployments +type V1WorkspaceClusterWorkloadDeployments struct { + + // deployments + Deployments []*V1ClusterWorkloadDeployment `json:"deployments"` + + // metadata + Metadata *V1RelatedObject `json:"metadata,omitempty"` +} + +// Validate validates this v1 workspace cluster workload deployments +func (m *V1WorkspaceClusterWorkloadDeployments) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateDeployments(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1WorkspaceClusterWorkloadDeployments) validateDeployments(formats strfmt.Registry) error { + + if swag.IsZero(m.Deployments) { // not required + return nil + } + + for i := 0; i < len(m.Deployments); i++ { + if swag.IsZero(m.Deployments[i]) { // not required + continue + } + + if m.Deployments[i] != nil { + if err := m.Deployments[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("deployments" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1WorkspaceClusterWorkloadDeployments) validateMetadata(formats strfmt.Registry) error { + + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1WorkspaceClusterWorkloadDeployments) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1WorkspaceClusterWorkloadDeployments) UnmarshalBinary(b []byte) error { + var res V1WorkspaceClusterWorkloadDeployments + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_workspace_cluster_workload_jobs.go b/api/models/v1_workspace_cluster_workload_jobs.go new file mode 100644 index 00000000..bb114dd4 --- /dev/null +++ b/api/models/v1_workspace_cluster_workload_jobs.go @@ -0,0 +1,105 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1WorkspaceClusterWorkloadJobs Workspace cluster workload jobs summary +// +// swagger:model v1WorkspaceClusterWorkloadJobs +type V1WorkspaceClusterWorkloadJobs struct { + + // jobs + Jobs []*V1ClusterWorkloadJob `json:"jobs"` + + // metadata + Metadata *V1RelatedObject `json:"metadata,omitempty"` +} + +// Validate validates this v1 workspace cluster workload jobs +func (m *V1WorkspaceClusterWorkloadJobs) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateJobs(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1WorkspaceClusterWorkloadJobs) validateJobs(formats strfmt.Registry) error { + + if swag.IsZero(m.Jobs) { // not required + return nil + } + + for i := 0; i < len(m.Jobs); i++ { + if swag.IsZero(m.Jobs[i]) { // not required + continue + } + + if m.Jobs[i] != nil { + if err := m.Jobs[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("jobs" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1WorkspaceClusterWorkloadJobs) validateMetadata(formats strfmt.Registry) error { + + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1WorkspaceClusterWorkloadJobs) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1WorkspaceClusterWorkloadJobs) UnmarshalBinary(b []byte) error { + var res V1WorkspaceClusterWorkloadJobs + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_workspace_cluster_workload_namespaces.go b/api/models/v1_workspace_cluster_workload_namespaces.go new file mode 100644 index 00000000..7414611c --- /dev/null +++ b/api/models/v1_workspace_cluster_workload_namespaces.go @@ -0,0 +1,105 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1WorkspaceClusterWorkloadNamespaces Workspace cluster workload namespaces summary +// +// swagger:model v1WorkspaceClusterWorkloadNamespaces +type V1WorkspaceClusterWorkloadNamespaces struct { + + // metadata + Metadata *V1RelatedObject `json:"metadata,omitempty"` + + // namespaces + Namespaces []*V1ClusterWorkloadNamespace `json:"namespaces"` +} + +// Validate validates this v1 workspace cluster workload namespaces +func (m *V1WorkspaceClusterWorkloadNamespaces) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if err := m.validateNamespaces(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1WorkspaceClusterWorkloadNamespaces) validateMetadata(formats strfmt.Registry) error { + + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } + return err + } + } + + return nil +} + +func (m *V1WorkspaceClusterWorkloadNamespaces) validateNamespaces(formats strfmt.Registry) error { + + if swag.IsZero(m.Namespaces) { // not required + return nil + } + + for i := 0; i < len(m.Namespaces); i++ { + if swag.IsZero(m.Namespaces[i]) { // not required + continue + } + + if m.Namespaces[i] != nil { + if err := m.Namespaces[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("namespaces" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1WorkspaceClusterWorkloadNamespaces) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1WorkspaceClusterWorkloadNamespaces) UnmarshalBinary(b []byte) error { + var res V1WorkspaceClusterWorkloadNamespaces + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_workspace_cluster_workload_pods.go b/api/models/v1_workspace_cluster_workload_pods.go new file mode 100644 index 00000000..184c1a7d --- /dev/null +++ b/api/models/v1_workspace_cluster_workload_pods.go @@ -0,0 +1,105 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1WorkspaceClusterWorkloadPods Workspace cluster workload pods summary +// +// swagger:model v1WorkspaceClusterWorkloadPods +type V1WorkspaceClusterWorkloadPods struct { + + // metadata + Metadata *V1RelatedObject `json:"metadata,omitempty"` + + // pods + Pods []*V1ClusterWorkloadPod `json:"pods"` +} + +// Validate validates this v1 workspace cluster workload pods +func (m *V1WorkspaceClusterWorkloadPods) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if err := m.validatePods(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1WorkspaceClusterWorkloadPods) validateMetadata(formats strfmt.Registry) error { + + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } + return err + } + } + + return nil +} + +func (m *V1WorkspaceClusterWorkloadPods) validatePods(formats strfmt.Registry) error { + + if swag.IsZero(m.Pods) { // not required + return nil + } + + for i := 0; i < len(m.Pods); i++ { + if swag.IsZero(m.Pods[i]) { // not required + continue + } + + if m.Pods[i] != nil { + if err := m.Pods[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("pods" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1WorkspaceClusterWorkloadPods) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1WorkspaceClusterWorkloadPods) UnmarshalBinary(b []byte) error { + var res V1WorkspaceClusterWorkloadPods + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_workspace_cluster_workload_role_bindings.go b/api/models/v1_workspace_cluster_workload_role_bindings.go new file mode 100644 index 00000000..e5df5e89 --- /dev/null +++ b/api/models/v1_workspace_cluster_workload_role_bindings.go @@ -0,0 +1,105 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1WorkspaceClusterWorkloadRoleBindings Workspace cluster workload rbac bindings summary +// +// swagger:model v1WorkspaceClusterWorkloadRoleBindings +type V1WorkspaceClusterWorkloadRoleBindings struct { + + // bindings + Bindings []*V1ClusterWorkloadRoleBinding `json:"bindings"` + + // metadata + Metadata *V1RelatedObject `json:"metadata,omitempty"` +} + +// Validate validates this v1 workspace cluster workload role bindings +func (m *V1WorkspaceClusterWorkloadRoleBindings) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateBindings(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1WorkspaceClusterWorkloadRoleBindings) validateBindings(formats strfmt.Registry) error { + + if swag.IsZero(m.Bindings) { // not required + return nil + } + + for i := 0; i < len(m.Bindings); i++ { + if swag.IsZero(m.Bindings[i]) { // not required + continue + } + + if m.Bindings[i] != nil { + if err := m.Bindings[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("bindings" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1WorkspaceClusterWorkloadRoleBindings) validateMetadata(formats strfmt.Registry) error { + + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1WorkspaceClusterWorkloadRoleBindings) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1WorkspaceClusterWorkloadRoleBindings) UnmarshalBinary(b []byte) error { + var res V1WorkspaceClusterWorkloadRoleBindings + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_workspace_cluster_workload_stateful_sets.go b/api/models/v1_workspace_cluster_workload_stateful_sets.go new file mode 100644 index 00000000..965215d2 --- /dev/null +++ b/api/models/v1_workspace_cluster_workload_stateful_sets.go @@ -0,0 +1,105 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1WorkspaceClusterWorkloadStatefulSets Workspace cluster workload statefulsets summary +// +// swagger:model v1WorkspaceClusterWorkloadStatefulSets +type V1WorkspaceClusterWorkloadStatefulSets struct { + + // metadata + Metadata *V1RelatedObject `json:"metadata,omitempty"` + + // stateful sets + StatefulSets []*V1ClusterWorkloadStatefulSet `json:"statefulSets"` +} + +// Validate validates this v1 workspace cluster workload stateful sets +func (m *V1WorkspaceClusterWorkloadStatefulSets) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if err := m.validateStatefulSets(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1WorkspaceClusterWorkloadStatefulSets) validateMetadata(formats strfmt.Registry) error { + + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } + return err + } + } + + return nil +} + +func (m *V1WorkspaceClusterWorkloadStatefulSets) validateStatefulSets(formats strfmt.Registry) error { + + if swag.IsZero(m.StatefulSets) { // not required + return nil + } + + for i := 0; i < len(m.StatefulSets); i++ { + if swag.IsZero(m.StatefulSets[i]) { // not required + continue + } + + if m.StatefulSets[i] != nil { + if err := m.StatefulSets[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("statefulSets" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1WorkspaceClusterWorkloadStatefulSets) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1WorkspaceClusterWorkloadStatefulSets) UnmarshalBinary(b []byte) error { + var res V1WorkspaceClusterWorkloadStatefulSets + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_workspace_clusters_workload_cron_jobs.go b/api/models/v1_workspace_clusters_workload_cron_jobs.go new file mode 100644 index 00000000..5ce8640d --- /dev/null +++ b/api/models/v1_workspace_clusters_workload_cron_jobs.go @@ -0,0 +1,105 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1WorkspaceClustersWorkloadCronJobs Workspace clusters workload cronjobs summary +// +// swagger:model v1WorkspaceClustersWorkloadCronJobs +type V1WorkspaceClustersWorkloadCronJobs struct { + + // clusters + Clusters []*V1WorkspaceClusterWorkloadCronJobs `json:"clusters"` + + // metadata + Metadata *V1ObjectMetaInputEntity `json:"metadata,omitempty"` +} + +// Validate validates this v1 workspace clusters workload cron jobs +func (m *V1WorkspaceClustersWorkloadCronJobs) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateClusters(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1WorkspaceClustersWorkloadCronJobs) validateClusters(formats strfmt.Registry) error { + + if swag.IsZero(m.Clusters) { // not required + return nil + } + + for i := 0; i < len(m.Clusters); i++ { + if swag.IsZero(m.Clusters[i]) { // not required + continue + } + + if m.Clusters[i] != nil { + if err := m.Clusters[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("clusters" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1WorkspaceClustersWorkloadCronJobs) validateMetadata(formats strfmt.Registry) error { + + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1WorkspaceClustersWorkloadCronJobs) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1WorkspaceClustersWorkloadCronJobs) UnmarshalBinary(b []byte) error { + var res V1WorkspaceClustersWorkloadCronJobs + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_workspace_clusters_workload_daemon_sets.go b/api/models/v1_workspace_clusters_workload_daemon_sets.go new file mode 100644 index 00000000..2cfec176 --- /dev/null +++ b/api/models/v1_workspace_clusters_workload_daemon_sets.go @@ -0,0 +1,105 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1WorkspaceClustersWorkloadDaemonSets Workspace clusters workload statefulsets summary +// +// swagger:model v1WorkspaceClustersWorkloadDaemonSets +type V1WorkspaceClustersWorkloadDaemonSets struct { + + // clusters + Clusters []*V1WorkspaceClusterWorkloadDaemonSets `json:"clusters"` + + // metadata + Metadata *V1ObjectMetaInputEntity `json:"metadata,omitempty"` +} + +// Validate validates this v1 workspace clusters workload daemon sets +func (m *V1WorkspaceClustersWorkloadDaemonSets) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateClusters(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1WorkspaceClustersWorkloadDaemonSets) validateClusters(formats strfmt.Registry) error { + + if swag.IsZero(m.Clusters) { // not required + return nil + } + + for i := 0; i < len(m.Clusters); i++ { + if swag.IsZero(m.Clusters[i]) { // not required + continue + } + + if m.Clusters[i] != nil { + if err := m.Clusters[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("clusters" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1WorkspaceClustersWorkloadDaemonSets) validateMetadata(formats strfmt.Registry) error { + + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1WorkspaceClustersWorkloadDaemonSets) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1WorkspaceClustersWorkloadDaemonSets) UnmarshalBinary(b []byte) error { + var res V1WorkspaceClustersWorkloadDaemonSets + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_workspace_clusters_workload_deployments.go b/api/models/v1_workspace_clusters_workload_deployments.go new file mode 100644 index 00000000..c842bbe8 --- /dev/null +++ b/api/models/v1_workspace_clusters_workload_deployments.go @@ -0,0 +1,105 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1WorkspaceClustersWorkloadDeployments Workspace clusters workload deployments summary +// +// swagger:model v1WorkspaceClustersWorkloadDeployments +type V1WorkspaceClustersWorkloadDeployments struct { + + // clusters + Clusters []*V1WorkspaceClusterWorkloadDeployments `json:"clusters"` + + // metadata + Metadata *V1ObjectMetaInputEntity `json:"metadata,omitempty"` +} + +// Validate validates this v1 workspace clusters workload deployments +func (m *V1WorkspaceClustersWorkloadDeployments) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateClusters(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1WorkspaceClustersWorkloadDeployments) validateClusters(formats strfmt.Registry) error { + + if swag.IsZero(m.Clusters) { // not required + return nil + } + + for i := 0; i < len(m.Clusters); i++ { + if swag.IsZero(m.Clusters[i]) { // not required + continue + } + + if m.Clusters[i] != nil { + if err := m.Clusters[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("clusters" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1WorkspaceClustersWorkloadDeployments) validateMetadata(formats strfmt.Registry) error { + + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1WorkspaceClustersWorkloadDeployments) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1WorkspaceClustersWorkloadDeployments) UnmarshalBinary(b []byte) error { + var res V1WorkspaceClustersWorkloadDeployments + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_workspace_clusters_workload_jobs.go b/api/models/v1_workspace_clusters_workload_jobs.go new file mode 100644 index 00000000..06969db7 --- /dev/null +++ b/api/models/v1_workspace_clusters_workload_jobs.go @@ -0,0 +1,105 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1WorkspaceClustersWorkloadJobs Workspace clusters workload jobs summary +// +// swagger:model v1WorkspaceClustersWorkloadJobs +type V1WorkspaceClustersWorkloadJobs struct { + + // clusters + Clusters []*V1WorkspaceClusterWorkloadJobs `json:"clusters"` + + // metadata + Metadata *V1ObjectMetaInputEntity `json:"metadata,omitempty"` +} + +// Validate validates this v1 workspace clusters workload jobs +func (m *V1WorkspaceClustersWorkloadJobs) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateClusters(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1WorkspaceClustersWorkloadJobs) validateClusters(formats strfmt.Registry) error { + + if swag.IsZero(m.Clusters) { // not required + return nil + } + + for i := 0; i < len(m.Clusters); i++ { + if swag.IsZero(m.Clusters[i]) { // not required + continue + } + + if m.Clusters[i] != nil { + if err := m.Clusters[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("clusters" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1WorkspaceClustersWorkloadJobs) validateMetadata(formats strfmt.Registry) error { + + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1WorkspaceClustersWorkloadJobs) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1WorkspaceClustersWorkloadJobs) UnmarshalBinary(b []byte) error { + var res V1WorkspaceClustersWorkloadJobs + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_workspace_clusters_workload_namespaces.go b/api/models/v1_workspace_clusters_workload_namespaces.go new file mode 100644 index 00000000..e872df0a --- /dev/null +++ b/api/models/v1_workspace_clusters_workload_namespaces.go @@ -0,0 +1,105 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1WorkspaceClustersWorkloadNamespaces Workspace clusters workload namespaces summary +// +// swagger:model v1WorkspaceClustersWorkloadNamespaces +type V1WorkspaceClustersWorkloadNamespaces struct { + + // clusters + Clusters []*V1WorkspaceClusterWorkloadNamespaces `json:"clusters"` + + // metadata + Metadata *V1ObjectMetaInputEntity `json:"metadata,omitempty"` +} + +// Validate validates this v1 workspace clusters workload namespaces +func (m *V1WorkspaceClustersWorkloadNamespaces) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateClusters(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1WorkspaceClustersWorkloadNamespaces) validateClusters(formats strfmt.Registry) error { + + if swag.IsZero(m.Clusters) { // not required + return nil + } + + for i := 0; i < len(m.Clusters); i++ { + if swag.IsZero(m.Clusters[i]) { // not required + continue + } + + if m.Clusters[i] != nil { + if err := m.Clusters[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("clusters" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1WorkspaceClustersWorkloadNamespaces) validateMetadata(formats strfmt.Registry) error { + + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1WorkspaceClustersWorkloadNamespaces) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1WorkspaceClustersWorkloadNamespaces) UnmarshalBinary(b []byte) error { + var res V1WorkspaceClustersWorkloadNamespaces + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_workspace_clusters_workload_pods.go b/api/models/v1_workspace_clusters_workload_pods.go new file mode 100644 index 00000000..d7ef20db --- /dev/null +++ b/api/models/v1_workspace_clusters_workload_pods.go @@ -0,0 +1,105 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1WorkspaceClustersWorkloadPods Workspace clusters workload pods summary +// +// swagger:model v1WorkspaceClustersWorkloadPods +type V1WorkspaceClustersWorkloadPods struct { + + // clusters + Clusters []*V1WorkspaceClusterWorkloadPods `json:"clusters"` + + // metadata + Metadata *V1ObjectMetaInputEntity `json:"metadata,omitempty"` +} + +// Validate validates this v1 workspace clusters workload pods +func (m *V1WorkspaceClustersWorkloadPods) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateClusters(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1WorkspaceClustersWorkloadPods) validateClusters(formats strfmt.Registry) error { + + if swag.IsZero(m.Clusters) { // not required + return nil + } + + for i := 0; i < len(m.Clusters); i++ { + if swag.IsZero(m.Clusters[i]) { // not required + continue + } + + if m.Clusters[i] != nil { + if err := m.Clusters[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("clusters" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1WorkspaceClustersWorkloadPods) validateMetadata(formats strfmt.Registry) error { + + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1WorkspaceClustersWorkloadPods) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1WorkspaceClustersWorkloadPods) UnmarshalBinary(b []byte) error { + var res V1WorkspaceClustersWorkloadPods + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_workspace_clusters_workload_role_bindings.go b/api/models/v1_workspace_clusters_workload_role_bindings.go new file mode 100644 index 00000000..d1883467 --- /dev/null +++ b/api/models/v1_workspace_clusters_workload_role_bindings.go @@ -0,0 +1,105 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1WorkspaceClustersWorkloadRoleBindings Workspace clusters workload rbac bindings summary +// +// swagger:model v1WorkspaceClustersWorkloadRoleBindings +type V1WorkspaceClustersWorkloadRoleBindings struct { + + // clusters + Clusters []*V1WorkspaceClusterWorkloadRoleBindings `json:"clusters"` + + // metadata + Metadata *V1ObjectMetaInputEntity `json:"metadata,omitempty"` +} + +// Validate validates this v1 workspace clusters workload role bindings +func (m *V1WorkspaceClustersWorkloadRoleBindings) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateClusters(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1WorkspaceClustersWorkloadRoleBindings) validateClusters(formats strfmt.Registry) error { + + if swag.IsZero(m.Clusters) { // not required + return nil + } + + for i := 0; i < len(m.Clusters); i++ { + if swag.IsZero(m.Clusters[i]) { // not required + continue + } + + if m.Clusters[i] != nil { + if err := m.Clusters[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("clusters" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1WorkspaceClustersWorkloadRoleBindings) validateMetadata(formats strfmt.Registry) error { + + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1WorkspaceClustersWorkloadRoleBindings) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1WorkspaceClustersWorkloadRoleBindings) UnmarshalBinary(b []byte) error { + var res V1WorkspaceClustersWorkloadRoleBindings + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_workspace_clusters_workload_stateful_sets.go b/api/models/v1_workspace_clusters_workload_stateful_sets.go new file mode 100644 index 00000000..6ac54d1a --- /dev/null +++ b/api/models/v1_workspace_clusters_workload_stateful_sets.go @@ -0,0 +1,105 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1WorkspaceClustersWorkloadStatefulSets Workspace clusters workload statefulsets summary +// +// swagger:model v1WorkspaceClustersWorkloadStatefulSets +type V1WorkspaceClustersWorkloadStatefulSets struct { + + // clusters + Clusters []*V1WorkspaceClusterWorkloadStatefulSets `json:"clusters"` + + // metadata + Metadata *V1ObjectMetaInputEntity `json:"metadata,omitempty"` +} + +// Validate validates this v1 workspace clusters workload stateful sets +func (m *V1WorkspaceClustersWorkloadStatefulSets) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateClusters(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1WorkspaceClustersWorkloadStatefulSets) validateClusters(formats strfmt.Registry) error { + + if swag.IsZero(m.Clusters) { // not required + return nil + } + + for i := 0; i < len(m.Clusters); i++ { + if swag.IsZero(m.Clusters[i]) { // not required + continue + } + + if m.Clusters[i] != nil { + if err := m.Clusters[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("clusters" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1WorkspaceClustersWorkloadStatefulSets) validateMetadata(formats strfmt.Registry) error { + + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1WorkspaceClustersWorkloadStatefulSets) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1WorkspaceClustersWorkloadStatefulSets) UnmarshalBinary(b []byte) error { + var res V1WorkspaceClustersWorkloadStatefulSets + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_workspace_entity.go b/api/models/v1_workspace_entity.go new file mode 100644 index 00000000..6d1acba9 --- /dev/null +++ b/api/models/v1_workspace_entity.go @@ -0,0 +1,96 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1WorkspaceEntity Workspace information +// +// swagger:model v1WorkspaceEntity +type V1WorkspaceEntity struct { + + // metadata + Metadata *V1ObjectMeta `json:"metadata,omitempty"` + + // spec + Spec *V1WorkspaceSpec `json:"spec,omitempty"` +} + +// Validate validates this v1 workspace entity +func (m *V1WorkspaceEntity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSpec(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1WorkspaceEntity) validateMetadata(formats strfmt.Registry) error { + + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } + return err + } + } + + return nil +} + +func (m *V1WorkspaceEntity) validateSpec(formats strfmt.Registry) error { + + if swag.IsZero(m.Spec) { // not required + return nil + } + + if m.Spec != nil { + if err := m.Spec.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1WorkspaceEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1WorkspaceEntity) UnmarshalBinary(b []byte) error { + var res V1WorkspaceEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_workspace_error.go b/api/models/v1_workspace_error.go new file mode 100644 index 00000000..da9a19d6 --- /dev/null +++ b/api/models/v1_workspace_error.go @@ -0,0 +1,52 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1WorkspaceError Workspace error +// +// swagger:model v1WorkspaceError +type V1WorkspaceError struct { + + // cluster Uid + ClusterUID string `json:"clusterUid,omitempty"` + + // msg + Msg string `json:"msg,omitempty"` + + // name + Name string `json:"name,omitempty"` + + // resource type + ResourceType string `json:"resourceType,omitempty"` +} + +// Validate validates this v1 workspace error +func (m *V1WorkspaceError) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1WorkspaceError) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1WorkspaceError) UnmarshalBinary(b []byte) error { + var res V1WorkspaceError + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_workspace_namespace_image.go b/api/models/v1_workspace_namespace_image.go new file mode 100644 index 00000000..a9350b4f --- /dev/null +++ b/api/models/v1_workspace_namespace_image.go @@ -0,0 +1,68 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1WorkspaceNamespaceImage Workspace namespace image information +// +// swagger:model v1WorkspaceNamespaceImage +type V1WorkspaceNamespaceImage struct { + + // black listed images + // Unique: true + BlackListedImages []string `json:"blackListedImages"` +} + +// Validate validates this v1 workspace namespace image +func (m *V1WorkspaceNamespaceImage) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateBlackListedImages(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1WorkspaceNamespaceImage) validateBlackListedImages(formats strfmt.Registry) error { + + if swag.IsZero(m.BlackListedImages) { // not required + return nil + } + + if err := validate.UniqueItems("blackListedImages", "body", m.BlackListedImages); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1WorkspaceNamespaceImage) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1WorkspaceNamespaceImage) UnmarshalBinary(b []byte) error { + var res V1WorkspaceNamespaceImage + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_workspace_namespace_resource_allocation.go b/api/models/v1_workspace_namespace_resource_allocation.go new file mode 100644 index 00000000..e3b66ccb --- /dev/null +++ b/api/models/v1_workspace_namespace_resource_allocation.go @@ -0,0 +1,111 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1WorkspaceNamespaceResourceAllocation Workspace namespace resource allocation +// +// swagger:model v1WorkspaceNamespaceResourceAllocation +type V1WorkspaceNamespaceResourceAllocation struct { + + // cluster resource allocations + // Unique: true + ClusterResourceAllocations []*V1ClusterResourceAllocation `json:"clusterResourceAllocations"` + + // default resource allocation + DefaultResourceAllocation *V1WorkspaceResourceAllocation `json:"defaultResourceAllocation,omitempty"` +} + +// Validate validates this v1 workspace namespace resource allocation +func (m *V1WorkspaceNamespaceResourceAllocation) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateClusterResourceAllocations(formats); err != nil { + res = append(res, err) + } + + if err := m.validateDefaultResourceAllocation(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1WorkspaceNamespaceResourceAllocation) validateClusterResourceAllocations(formats strfmt.Registry) error { + + if swag.IsZero(m.ClusterResourceAllocations) { // not required + return nil + } + + if err := validate.UniqueItems("clusterResourceAllocations", "body", m.ClusterResourceAllocations); err != nil { + return err + } + + for i := 0; i < len(m.ClusterResourceAllocations); i++ { + if swag.IsZero(m.ClusterResourceAllocations[i]) { // not required + continue + } + + if m.ClusterResourceAllocations[i] != nil { + if err := m.ClusterResourceAllocations[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("clusterResourceAllocations" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1WorkspaceNamespaceResourceAllocation) validateDefaultResourceAllocation(formats strfmt.Registry) error { + + if swag.IsZero(m.DefaultResourceAllocation) { // not required + return nil + } + + if m.DefaultResourceAllocation != nil { + if err := m.DefaultResourceAllocation.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("defaultResourceAllocation") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1WorkspaceNamespaceResourceAllocation) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1WorkspaceNamespaceResourceAllocation) UnmarshalBinary(b []byte) error { + var res V1WorkspaceNamespaceResourceAllocation + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_workspace_policies.go b/api/models/v1_workspace_policies.go new file mode 100644 index 00000000..e1d1e679 --- /dev/null +++ b/api/models/v1_workspace_policies.go @@ -0,0 +1,71 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1WorkspacePolicies Workspace policies +// +// swagger:model v1WorkspacePolicies +type V1WorkspacePolicies struct { + + // backup policy + BackupPolicy *V1WorkspaceBackupConfigEntity `json:"backupPolicy,omitempty"` +} + +// Validate validates this v1 workspace policies +func (m *V1WorkspacePolicies) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateBackupPolicy(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1WorkspacePolicies) validateBackupPolicy(formats strfmt.Registry) error { + + if swag.IsZero(m.BackupPolicy) { // not required + return nil + } + + if m.BackupPolicy != nil { + if err := m.BackupPolicy.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("backupPolicy") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1WorkspacePolicies) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1WorkspacePolicies) UnmarshalBinary(b []byte) error { + var res V1WorkspacePolicies + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_workspace_quota.go b/api/models/v1_workspace_quota.go new file mode 100644 index 00000000..5f6194f0 --- /dev/null +++ b/api/models/v1_workspace_quota.go @@ -0,0 +1,71 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1WorkspaceQuota Workspace resource quota +// +// swagger:model v1WorkspaceQuota +type V1WorkspaceQuota struct { + + // resource allocation + ResourceAllocation *V1WorkspaceResourceAllocation `json:"resourceAllocation,omitempty"` +} + +// Validate validates this v1 workspace quota +func (m *V1WorkspaceQuota) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateResourceAllocation(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1WorkspaceQuota) validateResourceAllocation(formats strfmt.Registry) error { + + if swag.IsZero(m.ResourceAllocation) { // not required + return nil + } + + if m.ResourceAllocation != nil { + if err := m.ResourceAllocation.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("resourceAllocation") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1WorkspaceQuota) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1WorkspaceQuota) UnmarshalBinary(b []byte) error { + var res V1WorkspaceQuota + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_workspace_resource_allocation.go b/api/models/v1_workspace_resource_allocation.go new file mode 100644 index 00000000..6e88279b --- /dev/null +++ b/api/models/v1_workspace_resource_allocation.go @@ -0,0 +1,89 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1WorkspaceResourceAllocation Workspace resource allocation +// +// swagger:model v1WorkspaceResourceAllocation +type V1WorkspaceResourceAllocation struct { + + // cpu cores + // Minimum: -1 + CPUCores float64 `json:"cpuCores"` + + // memory mi b + // Minimum: -1 + MemoryMiB float64 `json:"memoryMiB"` +} + +// Validate validates this v1 workspace resource allocation +func (m *V1WorkspaceResourceAllocation) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateCPUCores(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMemoryMiB(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1WorkspaceResourceAllocation) validateCPUCores(formats strfmt.Registry) error { + + if swag.IsZero(m.CPUCores) { // not required + return nil + } + + if err := validate.Minimum("cpuCores", "body", float64(m.CPUCores), -1, false); err != nil { + return err + } + + return nil +} + +func (m *V1WorkspaceResourceAllocation) validateMemoryMiB(formats strfmt.Registry) error { + + if swag.IsZero(m.MemoryMiB) { // not required + return nil + } + + if err := validate.Minimum("memoryMiB", "body", float64(m.MemoryMiB), -1, false); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1WorkspaceResourceAllocation) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1WorkspaceResourceAllocation) UnmarshalBinary(b []byte) error { + var res V1WorkspaceResourceAllocation + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_workspace_restore.go b/api/models/v1_workspace_restore.go new file mode 100644 index 00000000..7f4602ff --- /dev/null +++ b/api/models/v1_workspace_restore.go @@ -0,0 +1,121 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1WorkspaceRestore Workspace restore +// +// swagger:model v1WorkspaceRestore +type V1WorkspaceRestore struct { + + // metadata + Metadata *V1ObjectMeta `json:"metadata,omitempty"` + + // spec + Spec *V1WorkspaceRestoreSpec `json:"spec,omitempty"` + + // status + Status *V1WorkspaceRestoreStatus `json:"status,omitempty"` +} + +// Validate validates this v1 workspace restore +func (m *V1WorkspaceRestore) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateMetadata(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSpec(formats); err != nil { + res = append(res, err) + } + + if err := m.validateStatus(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1WorkspaceRestore) validateMetadata(formats strfmt.Registry) error { + + if swag.IsZero(m.Metadata) { // not required + return nil + } + + if m.Metadata != nil { + if err := m.Metadata.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("metadata") + } + return err + } + } + + return nil +} + +func (m *V1WorkspaceRestore) validateSpec(formats strfmt.Registry) error { + + if swag.IsZero(m.Spec) { // not required + return nil + } + + if m.Spec != nil { + if err := m.Spec.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("spec") + } + return err + } + } + + return nil +} + +func (m *V1WorkspaceRestore) validateStatus(formats strfmt.Registry) error { + + if swag.IsZero(m.Status) { // not required + return nil + } + + if m.Status != nil { + if err := m.Status.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("status") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1WorkspaceRestore) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1WorkspaceRestore) UnmarshalBinary(b []byte) error { + var res V1WorkspaceRestore + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_workspace_restore_config.go b/api/models/v1_workspace_restore_config.go new file mode 100644 index 00000000..8998d1ff --- /dev/null +++ b/api/models/v1_workspace_restore_config.go @@ -0,0 +1,111 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1WorkspaceRestoreConfig Workspace cluster restore config +// +// swagger:model v1WorkspaceRestoreConfig +type V1WorkspaceRestoreConfig struct { + + // backup name + // Required: true + BackupName *string `json:"backupName"` + + // include cluster resources + IncludeClusterResources bool `json:"includeClusterResources,omitempty"` + + // include namespaces + // Unique: true + IncludeNamespaces []string `json:"includeNamespaces"` + + // preserve node ports + PreserveNodePorts bool `json:"preserveNodePorts,omitempty"` + + // restore p vs + RestorePVs bool `json:"restorePVs,omitempty"` + + // source cluster Uid + // Required: true + SourceClusterUID *string `json:"sourceClusterUid"` +} + +// Validate validates this v1 workspace restore config +func (m *V1WorkspaceRestoreConfig) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateBackupName(formats); err != nil { + res = append(res, err) + } + + if err := m.validateIncludeNamespaces(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSourceClusterUID(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1WorkspaceRestoreConfig) validateBackupName(formats strfmt.Registry) error { + + if err := validate.Required("backupName", "body", m.BackupName); err != nil { + return err + } + + return nil +} + +func (m *V1WorkspaceRestoreConfig) validateIncludeNamespaces(formats strfmt.Registry) error { + + if swag.IsZero(m.IncludeNamespaces) { // not required + return nil + } + + if err := validate.UniqueItems("includeNamespaces", "body", m.IncludeNamespaces); err != nil { + return err + } + + return nil +} + +func (m *V1WorkspaceRestoreConfig) validateSourceClusterUID(formats strfmt.Registry) error { + + if err := validate.Required("sourceClusterUid", "body", m.SourceClusterUID); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1WorkspaceRestoreConfig) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1WorkspaceRestoreConfig) UnmarshalBinary(b []byte) error { + var res V1WorkspaceRestoreConfig + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_workspace_restore_config_entity.go b/api/models/v1_workspace_restore_config_entity.go new file mode 100644 index 00000000..5eba14c7 --- /dev/null +++ b/api/models/v1_workspace_restore_config_entity.go @@ -0,0 +1,103 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1WorkspaceRestoreConfigEntity Cluster restore config +// +// swagger:model v1WorkspaceRestoreConfigEntity +type V1WorkspaceRestoreConfigEntity struct { + + // backup request Uid + // Required: true + BackupRequestUID *string `json:"backupRequestUid"` + + // restore configs + // Unique: true + RestoreConfigs []*V1WorkspaceRestoreConfig `json:"restoreConfigs"` +} + +// Validate validates this v1 workspace restore config entity +func (m *V1WorkspaceRestoreConfigEntity) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateBackupRequestUID(formats); err != nil { + res = append(res, err) + } + + if err := m.validateRestoreConfigs(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1WorkspaceRestoreConfigEntity) validateBackupRequestUID(formats strfmt.Registry) error { + + if err := validate.Required("backupRequestUid", "body", m.BackupRequestUID); err != nil { + return err + } + + return nil +} + +func (m *V1WorkspaceRestoreConfigEntity) validateRestoreConfigs(formats strfmt.Registry) error { + + if swag.IsZero(m.RestoreConfigs) { // not required + return nil + } + + if err := validate.UniqueItems("restoreConfigs", "body", m.RestoreConfigs); err != nil { + return err + } + + for i := 0; i < len(m.RestoreConfigs); i++ { + if swag.IsZero(m.RestoreConfigs[i]) { // not required + continue + } + + if m.RestoreConfigs[i] != nil { + if err := m.RestoreConfigs[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("restoreConfigs" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1WorkspaceRestoreConfigEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1WorkspaceRestoreConfigEntity) UnmarshalBinary(b []byte) error { + var res V1WorkspaceRestoreConfigEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_workspace_restore_spec.go b/api/models/v1_workspace_restore_spec.go new file mode 100644 index 00000000..043e30e6 --- /dev/null +++ b/api/models/v1_workspace_restore_spec.go @@ -0,0 +1,43 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1WorkspaceRestoreSpec Workspace restore spec +// +// swagger:model v1WorkspaceRestoreSpec +type V1WorkspaceRestoreSpec struct { + + // workspace Uid + WorkspaceUID string `json:"workspaceUid,omitempty"` +} + +// Validate validates this v1 workspace restore spec +func (m *V1WorkspaceRestoreSpec) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1WorkspaceRestoreSpec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1WorkspaceRestoreSpec) UnmarshalBinary(b []byte) error { + var res V1WorkspaceRestoreSpec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_workspace_restore_state.go b/api/models/v1_workspace_restore_state.go new file mode 100644 index 00000000..122066d8 --- /dev/null +++ b/api/models/v1_workspace_restore_state.go @@ -0,0 +1,46 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1WorkspaceRestoreState Workspace restore state +// +// swagger:model v1WorkspaceRestoreState +type V1WorkspaceRestoreState struct { + + // delete state + DeleteState string `json:"deleteState,omitempty"` + + // state + State string `json:"state,omitempty"` +} + +// Validate validates this v1 workspace restore state +func (m *V1WorkspaceRestoreState) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1WorkspaceRestoreState) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1WorkspaceRestoreState) UnmarshalBinary(b []byte) error { + var res V1WorkspaceRestoreState + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_workspace_restore_status.go b/api/models/v1_workspace_restore_status.go new file mode 100644 index 00000000..b1d6f4f2 --- /dev/null +++ b/api/models/v1_workspace_restore_status.go @@ -0,0 +1,80 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1WorkspaceRestoreStatus Workspace restore status +// +// swagger:model v1WorkspaceRestoreStatus +type V1WorkspaceRestoreStatus struct { + + // workspace restore statuses + WorkspaceRestoreStatuses []*V1WorkspaceRestoreStatusMeta `json:"workspaceRestoreStatuses"` +} + +// Validate validates this v1 workspace restore status +func (m *V1WorkspaceRestoreStatus) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateWorkspaceRestoreStatuses(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1WorkspaceRestoreStatus) validateWorkspaceRestoreStatuses(formats strfmt.Registry) error { + + if swag.IsZero(m.WorkspaceRestoreStatuses) { // not required + return nil + } + + for i := 0; i < len(m.WorkspaceRestoreStatuses); i++ { + if swag.IsZero(m.WorkspaceRestoreStatuses[i]) { // not required + continue + } + + if m.WorkspaceRestoreStatuses[i] != nil { + if err := m.WorkspaceRestoreStatuses[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("workspaceRestoreStatuses" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1WorkspaceRestoreStatus) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1WorkspaceRestoreStatus) UnmarshalBinary(b []byte) error { + var res V1WorkspaceRestoreStatus + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_workspace_restore_status_meta.go b/api/models/v1_workspace_restore_status_meta.go new file mode 100644 index 00000000..868d60c1 --- /dev/null +++ b/api/models/v1_workspace_restore_status_meta.go @@ -0,0 +1,99 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1WorkspaceRestoreStatusMeta Workspace restore status meta +// +// swagger:model v1WorkspaceRestoreStatusMeta +type V1WorkspaceRestoreStatusMeta struct { + + // actor + Actor *V1ClusterFeatureActor `json:"actor,omitempty"` + + // request Uid + RequestUID string `json:"requestUid,omitempty"` + + // workspace restore config + WorkspaceRestoreConfig *V1WorkspaceClusterRestoreConfig `json:"workspaceRestoreConfig,omitempty"` +} + +// Validate validates this v1 workspace restore status meta +func (m *V1WorkspaceRestoreStatusMeta) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateActor(formats); err != nil { + res = append(res, err) + } + + if err := m.validateWorkspaceRestoreConfig(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1WorkspaceRestoreStatusMeta) validateActor(formats strfmt.Registry) error { + + if swag.IsZero(m.Actor) { // not required + return nil + } + + if m.Actor != nil { + if err := m.Actor.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("actor") + } + return err + } + } + + return nil +} + +func (m *V1WorkspaceRestoreStatusMeta) validateWorkspaceRestoreConfig(formats strfmt.Registry) error { + + if swag.IsZero(m.WorkspaceRestoreConfig) { // not required + return nil + } + + if m.WorkspaceRestoreConfig != nil { + if err := m.WorkspaceRestoreConfig.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("workspaceRestoreConfig") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1WorkspaceRestoreStatusMeta) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1WorkspaceRestoreStatusMeta) UnmarshalBinary(b []byte) error { + var res V1WorkspaceRestoreStatusMeta + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_workspace_roles_patch.go b/api/models/v1_workspace_roles_patch.go new file mode 100644 index 00000000..c4fe344c --- /dev/null +++ b/api/models/v1_workspace_roles_patch.go @@ -0,0 +1,46 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1WorkspaceRolesPatch v1 workspace roles patch +// +// swagger:model v1WorkspaceRolesPatch +type V1WorkspaceRolesPatch struct { + + // roles + Roles []string `json:"roles"` + + // uid + UID string `json:"uid,omitempty"` +} + +// Validate validates this v1 workspace roles patch +func (m *V1WorkspaceRolesPatch) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1WorkspaceRolesPatch) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1WorkspaceRolesPatch) UnmarshalBinary(b []byte) error { + var res V1WorkspaceRolesPatch + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_workspace_roles_uid_summary.go b/api/models/v1_workspace_roles_uid_summary.go new file mode 100644 index 00000000..b6b9f124 --- /dev/null +++ b/api/models/v1_workspace_roles_uid_summary.go @@ -0,0 +1,46 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1WorkspaceRolesUIDSummary v1 workspace roles Uid summary +// +// swagger:model v1WorkspaceRolesUidSummary +type V1WorkspaceRolesUIDSummary struct { + + // name + Name string `json:"name,omitempty"` + + // uid + UID string `json:"uid,omitempty"` +} + +// Validate validates this v1 workspace roles Uid summary +func (m *V1WorkspaceRolesUIDSummary) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1WorkspaceRolesUIDSummary) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1WorkspaceRolesUIDSummary) UnmarshalBinary(b []byte) error { + var res V1WorkspaceRolesUIDSummary + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_workspace_scope_roles.go b/api/models/v1_workspace_scope_roles.go new file mode 100644 index 00000000..8adfa222 --- /dev/null +++ b/api/models/v1_workspace_scope_roles.go @@ -0,0 +1,86 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1WorkspaceScopeRoles List all workspaces with the roles assigned to the users +// +// swagger:model v1WorkspaceScopeRoles +type V1WorkspaceScopeRoles struct { + + // projects + // Unique: true + Projects []*V1ProjectsWorkspaces `json:"projects"` +} + +// Validate validates this v1 workspace scope roles +func (m *V1WorkspaceScopeRoles) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateProjects(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1WorkspaceScopeRoles) validateProjects(formats strfmt.Registry) error { + + if swag.IsZero(m.Projects) { // not required + return nil + } + + if err := validate.UniqueItems("projects", "body", m.Projects); err != nil { + return err + } + + for i := 0; i < len(m.Projects); i++ { + if swag.IsZero(m.Projects[i]) { // not required + continue + } + + if m.Projects[i] != nil { + if err := m.Projects[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("projects" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1WorkspaceScopeRoles) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1WorkspaceScopeRoles) UnmarshalBinary(b []byte) error { + var res V1WorkspaceScopeRoles + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_workspace_spec.go b/api/models/v1_workspace_spec.go new file mode 100644 index 00000000..bbc33719 --- /dev/null +++ b/api/models/v1_workspace_spec.go @@ -0,0 +1,210 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1WorkspaceSpec Workspace specifications +// +// swagger:model v1WorkspaceSpec +type V1WorkspaceSpec struct { + + // cluster namespaces + // Unique: true + ClusterNamespaces []*V1WorkspaceClusterNamespace `json:"clusterNamespaces"` + + // cluster rbacs + // Unique: true + ClusterRbacs []*V1ClusterRbac `json:"clusterRbacs"` + + // cluster refs + // Unique: true + ClusterRefs []*V1WorkspaceClusterRef `json:"clusterRefs"` + + // policies + Policies *V1WorkspacePolicies `json:"policies,omitempty"` + + // quota + Quota *V1WorkspaceQuota `json:"quota,omitempty"` +} + +// Validate validates this v1 workspace spec +func (m *V1WorkspaceSpec) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateClusterNamespaces(formats); err != nil { + res = append(res, err) + } + + if err := m.validateClusterRbacs(formats); err != nil { + res = append(res, err) + } + + if err := m.validateClusterRefs(formats); err != nil { + res = append(res, err) + } + + if err := m.validatePolicies(formats); err != nil { + res = append(res, err) + } + + if err := m.validateQuota(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1WorkspaceSpec) validateClusterNamespaces(formats strfmt.Registry) error { + + if swag.IsZero(m.ClusterNamespaces) { // not required + return nil + } + + if err := validate.UniqueItems("clusterNamespaces", "body", m.ClusterNamespaces); err != nil { + return err + } + + for i := 0; i < len(m.ClusterNamespaces); i++ { + if swag.IsZero(m.ClusterNamespaces[i]) { // not required + continue + } + + if m.ClusterNamespaces[i] != nil { + if err := m.ClusterNamespaces[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("clusterNamespaces" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1WorkspaceSpec) validateClusterRbacs(formats strfmt.Registry) error { + + if swag.IsZero(m.ClusterRbacs) { // not required + return nil + } + + if err := validate.UniqueItems("clusterRbacs", "body", m.ClusterRbacs); err != nil { + return err + } + + for i := 0; i < len(m.ClusterRbacs); i++ { + if swag.IsZero(m.ClusterRbacs[i]) { // not required + continue + } + + if m.ClusterRbacs[i] != nil { + if err := m.ClusterRbacs[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("clusterRbacs" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1WorkspaceSpec) validateClusterRefs(formats strfmt.Registry) error { + + if swag.IsZero(m.ClusterRefs) { // not required + return nil + } + + if err := validate.UniqueItems("clusterRefs", "body", m.ClusterRefs); err != nil { + return err + } + + for i := 0; i < len(m.ClusterRefs); i++ { + if swag.IsZero(m.ClusterRefs[i]) { // not required + continue + } + + if m.ClusterRefs[i] != nil { + if err := m.ClusterRefs[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("clusterRefs" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1WorkspaceSpec) validatePolicies(formats strfmt.Registry) error { + + if swag.IsZero(m.Policies) { // not required + return nil + } + + if m.Policies != nil { + if err := m.Policies.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("policies") + } + return err + } + } + + return nil +} + +func (m *V1WorkspaceSpec) validateQuota(formats strfmt.Registry) error { + + if swag.IsZero(m.Quota) { // not required + return nil + } + + if m.Quota != nil { + if err := m.Quota.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("quota") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1WorkspaceSpec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1WorkspaceSpec) UnmarshalBinary(b []byte) error { + var res V1WorkspaceSpec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_workspace_status.go b/api/models/v1_workspace_status.go new file mode 100644 index 00000000..3b421cf6 --- /dev/null +++ b/api/models/v1_workspace_status.go @@ -0,0 +1,86 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1WorkspaceStatus Workspace status +// +// swagger:model v1WorkspaceStatus +type V1WorkspaceStatus struct { + + // errors + // Unique: true + Errors []*V1WorkspaceError `json:"errors"` +} + +// Validate validates this v1 workspace status +func (m *V1WorkspaceStatus) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateErrors(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1WorkspaceStatus) validateErrors(formats strfmt.Registry) error { + + if swag.IsZero(m.Errors) { // not required + return nil + } + + if err := validate.UniqueItems("errors", "body", m.Errors); err != nil { + return err + } + + for i := 0; i < len(m.Errors); i++ { + if swag.IsZero(m.Errors[i]) { // not required + continue + } + + if m.Errors[i] != nil { + if err := m.Errors[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("errors" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1WorkspaceStatus) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1WorkspaceStatus) UnmarshalBinary(b []byte) error { + var res V1WorkspaceStatus + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_workspace_workloads_filter.go b/api/models/v1_workspace_workloads_filter.go new file mode 100644 index 00000000..29d5298a --- /dev/null +++ b/api/models/v1_workspace_workloads_filter.go @@ -0,0 +1,89 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// V1WorkspaceWorkloadsFilter Workspace workloads filter +// +// swagger:model v1WorkspaceWorkloadsFilter +type V1WorkspaceWorkloadsFilter struct { + + // clusters + // Unique: true + Clusters []string `json:"clusters"` + + // namespaces + // Unique: true + Namespaces []string `json:"namespaces"` +} + +// Validate validates this v1 workspace workloads filter +func (m *V1WorkspaceWorkloadsFilter) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateClusters(formats); err != nil { + res = append(res, err) + } + + if err := m.validateNamespaces(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1WorkspaceWorkloadsFilter) validateClusters(formats strfmt.Registry) error { + + if swag.IsZero(m.Clusters) { // not required + return nil + } + + if err := validate.UniqueItems("clusters", "body", m.Clusters); err != nil { + return err + } + + return nil +} + +func (m *V1WorkspaceWorkloadsFilter) validateNamespaces(formats strfmt.Registry) error { + + if swag.IsZero(m.Namespaces) { // not required + return nil + } + + if err := validate.UniqueItems("namespaces", "body", m.Namespaces); err != nil { + return err + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1WorkspaceWorkloadsFilter) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1WorkspaceWorkloadsFilter) UnmarshalBinary(b []byte) error { + var res V1WorkspaceWorkloadsFilter + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_workspace_workloads_spec.go b/api/models/v1_workspace_workloads_spec.go new file mode 100644 index 00000000..86cd91f4 --- /dev/null +++ b/api/models/v1_workspace_workloads_spec.go @@ -0,0 +1,71 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1WorkspaceWorkloadsSpec Workspace workloads spec +// +// swagger:model v1WorkspaceWorkloadsSpec +type V1WorkspaceWorkloadsSpec struct { + + // filter + Filter *V1WorkspaceWorkloadsFilter `json:"filter,omitempty"` +} + +// Validate validates this v1 workspace workloads spec +func (m *V1WorkspaceWorkloadsSpec) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateFilter(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1WorkspaceWorkloadsSpec) validateFilter(formats strfmt.Registry) error { + + if swag.IsZero(m.Filter) { // not required + return nil + } + + if m.Filter != nil { + if err := m.Filter.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("filter") + } + return err + } + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1WorkspaceWorkloadsSpec) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1WorkspaceWorkloadsSpec) UnmarshalBinary(b []byte) error { + var res V1WorkspaceWorkloadsSpec + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_workspaces_roles.go b/api/models/v1_workspaces_roles.go new file mode 100644 index 00000000..2246940a --- /dev/null +++ b/api/models/v1_workspaces_roles.go @@ -0,0 +1,118 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1WorkspacesRoles Workspace users and their roles +// +// swagger:model v1WorkspacesRoles +type V1WorkspacesRoles struct { + + // inherited roles + InheritedRoles []*V1WorkspaceRolesUIDSummary `json:"inheritedRoles"` + + // name + Name string `json:"name,omitempty"` + + // roles + Roles []*V1WorkspaceRolesUIDSummary `json:"roles"` + + // uid + UID string `json:"uid,omitempty"` +} + +// Validate validates this v1 workspaces roles +func (m *V1WorkspacesRoles) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateInheritedRoles(formats); err != nil { + res = append(res, err) + } + + if err := m.validateRoles(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1WorkspacesRoles) validateInheritedRoles(formats strfmt.Registry) error { + + if swag.IsZero(m.InheritedRoles) { // not required + return nil + } + + for i := 0; i < len(m.InheritedRoles); i++ { + if swag.IsZero(m.InheritedRoles[i]) { // not required + continue + } + + if m.InheritedRoles[i] != nil { + if err := m.InheritedRoles[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("inheritedRoles" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *V1WorkspacesRoles) validateRoles(formats strfmt.Registry) error { + + if swag.IsZero(m.Roles) { // not required + return nil + } + + for i := 0; i < len(m.Roles); i++ { + if swag.IsZero(m.Roles[i]) { // not required + continue + } + + if m.Roles[i] != nil { + if err := m.Roles[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("roles" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1WorkspacesRoles) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1WorkspacesRoles) UnmarshalBinary(b []byte) error { + var res V1WorkspacesRoles + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_workspaces_roles_patch.go b/api/models/v1_workspaces_roles_patch.go new file mode 100644 index 00000000..fced6543 --- /dev/null +++ b/api/models/v1_workspaces_roles_patch.go @@ -0,0 +1,80 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1WorkspacesRolesPatch v1 workspaces roles patch +// +// swagger:model v1WorkspacesRolesPatch +type V1WorkspacesRolesPatch struct { + + // workspaces + Workspaces []*V1WorkspaceRolesPatch `json:"workspaces"` +} + +// Validate validates this v1 workspaces roles patch +func (m *V1WorkspacesRolesPatch) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateWorkspaces(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *V1WorkspacesRolesPatch) validateWorkspaces(formats strfmt.Registry) error { + + if swag.IsZero(m.Workspaces) { // not required + return nil + } + + for i := 0; i < len(m.Workspaces); i++ { + if swag.IsZero(m.Workspaces[i]) { // not required + continue + } + + if m.Workspaces[i] != nil { + if err := m.Workspaces[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("workspaces" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *V1WorkspacesRolesPatch) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1WorkspacesRolesPatch) UnmarshalBinary(b []byte) error { + var res V1WorkspacesRolesPatch + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/models/v1_zone_entity.go b/api/models/v1_zone_entity.go new file mode 100644 index 00000000..04363e2b --- /dev/null +++ b/api/models/v1_zone_entity.go @@ -0,0 +1,43 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// V1ZoneEntity Azure availability zone entity +// +// swagger:model v1ZoneEntity +type V1ZoneEntity struct { + + // Azure availability zone id + ID string `json:"id,omitempty"` +} + +// Validate validates this v1 zone entity +func (m *V1ZoneEntity) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *V1ZoneEntity) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *V1ZoneEntity) UnmarshalBinary(b []byte) error { + var res V1ZoneEntity + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/api/spec/error_v1.json b/api/spec/error_v1.json new file mode 100644 index 00000000..f87e40f7 --- /dev/null +++ b/api/spec/error_v1.json @@ -0,0 +1,29 @@ +{ + "consumes": ["application/json"], + "definitions": { + "V1Error": { + "properties": { + "code": { + "type": "string" + }, + "details": { + "type": "object" + }, + "message": { + "type": "string" + }, + "ref": { + "type": "string" + } + }, + "type": "object" + } + }, + "info": { + "title": "Palette APIs - 4.0", + "version": "v1" + }, + "produces": ["application/json"], + "schemes": ["http", "https"], + "swagger": "2.0" +} diff --git a/api/spec/palette-apis-spec.json b/api/spec/palette-apis-spec.json new file mode 100644 index 00000000..19b50c10 --- /dev/null +++ b/api/spec/palette-apis-spec.json @@ -0,0 +1,60481 @@ +{ + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "schemes": [ + "http", + "https" + ], + "swagger": "2.0", + "info": { + "title": "Palette APIs - 4.4", + "version": "v1" + }, + "paths": { + "/v1/apiKeys": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves a list of API keys", + "operationId": "v1ApiKeysList", + "responses": { + "200": { + "description": "Retrieves a list of API keys", + "schema": { + "$ref": "#/definitions/v1ApiKeys" + } + } + } + }, + "post": { + "tags": [ + "v1" + ], + "summary": "Create an API key", + "operationId": "v1ApiKeysCreate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1ApiKeyEntity" + } + } + ], + "responses": { + "201": { + "description": "APIKey Created successfully", + "schema": { + "$ref": "#/definitions/v1ApiKeyCreateResponse" + } + } + } + } + }, + "/v1/apiKeys/{uid}": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the specified API key", + "operationId": "v1ApiKeysUidGet", + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1ApiKey" + } + } + } + }, + "put": { + "tags": [ + "v1" + ], + "summary": "Update the specified API key", + "operationId": "v1ApiKeysUidUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1ApiKeyUpdate" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "delete": { + "tags": [ + "v1" + ], + "summary": "Deletes the specified API key", + "operationId": "v1ApiKeysUidDelete", + "responses": { + "204": { + "description": "The resource was deleted successfully" + } + } + }, + "patch": { + "tags": [ + "v1" + ], + "summary": "Activate or de-active the specified API key", + "operationId": "v1ApiKeysUidActiveState", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1ApiKeyActiveState" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Specify API key uid", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/apiKeys/{uid}/state": { + "put": { + "tags": [ + "v1" + ], + "summary": "Revoke or re-activate the API key access", + "operationId": "v1ApiKeysUidState", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1ApiKeyActiveState" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Specify API key uid", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/appDeployments": { + "post": { + "tags": [ + "v1" + ], + "summary": "Creates a application deployment in the virtual cluster", + "operationId": "v1AppDeploymentsVirtualClusterCreate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1AppDeploymentVirtualClusterEntity" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + } + }, + "/v1/appDeployments/clusterGroup": { + "post": { + "tags": [ + "v1" + ], + "summary": "Creates a application deployment in one of virtual clusters in the cluster group", + "operationId": "v1AppDeploymentsClusterGroupCreate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1AppDeploymentClusterGroupEntity" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + } + }, + "/v1/appDeployments/{uid}": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the specified application deployment", + "operationId": "v1AppDeploymentsUidGet", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1AppDeployment" + } + } + } + }, + "delete": { + "tags": [ + "v1" + ], + "summary": "Deletes the specified application deployment", + "operationId": "v1AppDeploymentsUidDelete", + "responses": { + "204": { + "description": "The resource was deleted successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Application deployment uid", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/appDeployments/{uid}/profile": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns profile of the specified application deployment", + "operationId": "v1AppDeploymentsUidProfileGet", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1AppDeploymentProfileSpec" + } + } + } + }, + "put": { + "tags": [ + "v1" + ], + "summary": "Updates the specified application deployment profile", + "operationId": "v1AppDeploymentsUidProfileUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1AppDeploymentProfileEntity" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Application deployment uid", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/appDeployments/{uid}/profile/apply": { + "patch": { + "tags": [ + "v1" + ], + "summary": "Apply the application deployment profile updates", + "operationId": "v1AppDeploymentsUidProfileApply", + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Application deployment uid", + "name": "uid", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Application deployment notification uid", + "name": "notify", + "in": "query" + } + ] + }, + "/v1/appDeployments/{uid}/profile/tiers/{tierUid}": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the specified application deployment profile tier information", + "operationId": "v1AppDeploymentsProfileTiersUidGet", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1AppTier" + } + } + } + }, + "put": { + "tags": [ + "v1" + ], + "summary": "Updates the specified application deployment profile tier information", + "operationId": "v1AppDeploymentsProfileTiersUidUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1AppTierUpdateEntity" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Application deployment uid", + "name": "uid", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Application deployment tier uid", + "name": "tierUid", + "in": "path", + "required": true + } + ] + }, + "/v1/appDeployments/{uid}/profile/tiers/{tierUid}/manifests": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves a list of manifests of the specified application deployment profile tier", + "operationId": "v1AppDeploymentsProfileTiersUidManifestsGet", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1AppTierManifests" + } + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Application deployment uid", + "name": "uid", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Application deployment tier uid", + "name": "tierUid", + "in": "path", + "required": true + } + ] + }, + "/v1/appDeployments/{uid}/profile/tiers/{tierUid}/manifests/{manifestUid}": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the specified application deployment tier manifest information", + "operationId": "v1AppDeploymentsProfileTiersManifestsUidGet", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1Manifest" + } + } + } + }, + "put": { + "tags": [ + "v1" + ], + "summary": "Updates the specified application deployment tier manifest information", + "operationId": "v1AppDeploymentsProfileTiersManifestsUidUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1ManifestRefUpdateEntity" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Application deployment uid", + "name": "uid", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Application deployment tier uid", + "name": "tierUid", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Application deployment tier manifest uid", + "name": "manifestUid", + "in": "path", + "required": true + } + ] + }, + "/v1/appDeployments/{uid}/profile/versions": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves a list of profile versions of the specified application deployment", + "operationId": "v1AppDeploymentsUidProfileVersionsGet", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1AppDeploymentProfileVersions" + } + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Application deployment uid", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/appProfiles": { + "post": { + "tags": [ + "v1" + ], + "summary": "Creates a application profile", + "operationId": "v1AppProfilesCreate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1AppProfileEntity" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + } + }, + "/v1/appProfiles/macros": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves a list of application profile macros", + "operationId": "v1AppProfilesMacrosList", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1Macros" + } + } + } + } + }, + "/v1/appProfiles/{uid}": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the specified application profile", + "operationId": "v1AppProfilesUidGet", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1AppProfile" + } + } + } + }, + "put": { + "tags": [ + "v1" + ], + "summary": "Updates the specified application profile", + "operationId": "v1AppProfilesUidUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1AppProfileEntity" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "delete": { + "tags": [ + "v1" + ], + "summary": "Deletes the specified application profile", + "operationId": "v1AppProfilesUidDelete", + "responses": { + "204": { + "description": "The resource was deleted successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/appProfiles/{uid}/clone": { + "post": { + "tags": [ + "v1" + ], + "summary": "Clones the specified application profile", + "operationId": "v1AppProfilesUidClone", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1AppProfileCloneEntity" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Application profile uid", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/appProfiles/{uid}/clone/validate": { + "post": { + "tags": [ + "v1" + ], + "summary": "Validates the specified application profile clone", + "operationId": "v1AppProfilesUidCloneValidate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1AppProfileCloneMetaInputEntity" + } + } + ], + "responses": { + "204": { + "description": "Ok response without content", + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Application profile uid", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/appProfiles/{uid}/metadata": { + "patch": { + "tags": [ + "v1" + ], + "summary": "Updates the specified application profile metadata", + "operationId": "v1AppProfilesUidMetadataUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1AppProfileMetaEntity" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Application profile uid", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/appProfiles/{uid}/tiers": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves a list of tiers of the specified application profile", + "operationId": "v1AppProfilesUidTiersGet", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1AppProfileTiers" + } + } + } + }, + "post": { + "tags": [ + "v1" + ], + "summary": "Adds tier to the specified application profile", + "operationId": "v1AppProfilesUidTiersCreate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1AppTierEntity" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + }, + "patch": { + "tags": [ + "v1" + ], + "summary": "Updates app tier of the specified application profile", + "operationId": "v1AppProfilesUidTiersPatch", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1AppTierPatchEntity" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Application profile uid", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/appProfiles/{uid}/tiers/{tierUid}": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the specified application profile tier information", + "operationId": "v1AppProfilesUidTiersUidGet", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1AppTier" + } + } + } + }, + "put": { + "tags": [ + "v1" + ], + "summary": "Updates the specified application profile tier", + "operationId": "v1AppProfilesUidTiersUidUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1AppTierUpdateEntity" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "delete": { + "tags": [ + "v1" + ], + "summary": "Deletes the specified application profile tier", + "operationId": "v1AppProfilesUidTiersUidDelete", + "responses": { + "204": { + "description": "The resource was deleted successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Application profile uid", + "name": "uid", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Application profile tier uid", + "name": "tierUid", + "in": "path", + "required": true + } + ] + }, + "/v1/appProfiles/{uid}/tiers/{tierUid}/manifests": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves a list of manifests of the specified application profile tier", + "operationId": "v1AppProfilesUidTiersUidManifestsGet", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1AppTierManifests" + } + } + } + }, + "post": { + "tags": [ + "v1" + ], + "summary": "Adds manifest to the specified application profile tier", + "operationId": "v1AppProfilesUidTiersUidManifestsCreate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1ManifestInputEntity" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Application profile uid", + "name": "uid", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Application profile tier uid", + "name": "tierUid", + "in": "path", + "required": true + } + ] + }, + "/v1/appProfiles/{uid}/tiers/{tierUid}/manifests/{manifestUid}": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the specified application profile tier manifest information", + "operationId": "v1AppProfilesUidTiersUidManifestsUidGet", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1Manifest" + } + } + } + }, + "put": { + "tags": [ + "v1" + ], + "summary": "Updates the specified application profile tier manifest information", + "operationId": "v1AppProfilesUidTiersUidManifestsUidUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1ManifestRefUpdateEntity" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "delete": { + "tags": [ + "v1" + ], + "summary": "Deletes the specified application profile tier manifest", + "operationId": "v1AppProfilesUidTiersUidManifestsUidDelete", + "responses": { + "204": { + "description": "The resource was deleted successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Application profile uid", + "name": "uid", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Application profile tier uid", + "name": "tierUid", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Application profile tier manifest uid", + "name": "manifestUid", + "in": "path", + "required": true + } + ] + }, + "/v1/appProfiles/{uid}/tiers/{tierUid}/resolvedValues": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the specified application profile tier resolved values", + "operationId": "v1AppProfilesUidTiersUidResolvedValuesGet", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1AppTierResolvedValues" + } + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Application profile uid", + "name": "uid", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Application profile tier uid", + "name": "tierUid", + "in": "path", + "required": true + } + ] + }, + "/v1/audits": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves the list of audit logs", + "operationId": "v1AuditsList", + "parameters": [ + { + "type": "string", + "format": "date-time", + "description": "Time is a wrapper around time.Time which supports correct marshaling to YAML and JSON. Wrappers are provided for many of the factory methods that the time package offers.", + "name": "startTime", + "in": "query" + }, + { + "type": "string", + "format": "date-time", + "description": "Time is a wrapper around time.Time which supports correct marshaling to YAML and JSON. Wrappers are provided for many of the factory methods that the time package offers.", + "name": "endTime", + "in": "query" + }, + { + "type": "string", + "description": "Specify the user uid, to retrieve the specific user audit logs", + "name": "userUid", + "in": "query" + }, + { + "type": "string", + "description": "Specify the project uid, to retrieve the specific project audit logs", + "name": "projectUid", + "in": "query" + }, + { + "type": "string", + "description": "Specify the tenant uid, to retrieve the specific tenant audit logs", + "name": "tenantUid", + "in": "query" + }, + { + "type": "string", + "description": "Specify the resource name, to retrieve the specific resource audit logs", + "name": "resourceKind", + "in": "query" + }, + { + "type": "string", + "description": "Specify the resource uid, to retrieve the specific resource audit logs", + "name": "resourceUid", + "in": "query" + }, + { + "enum": [ + "create", + "update", + "delete", + "publish", + "deploy" + ], + "type": "string", + "name": "actionType", + "in": "query" + }, + { + "type": "integer", + "format": "int64", + "default": 50, + "description": "limit is a maximum number of responses to return for a list call. Default and maximum value of the limit is 50.\nIf more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results.", + "name": "limit", + "in": "query" + }, + { + "type": "integer", + "format": "int64", + "description": "offset is the next index number from which the response will start. The response offset value can be used along with continue token for the pagination.", + "name": "offset", + "in": "query" + }, + { + "type": "string", + "description": "continue token to paginate the subsequent data items", + "name": "continue", + "in": "query" + } + ], + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1Audits" + } + } + } + } + }, + "/v1/audits/{uid}": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the specified audit log", + "operationId": "v1AuditsUidGet", + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1Audit" + } + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Specify the audit uid", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/audits/{uid}/sysMsg": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the specified system audit message", + "operationId": "v1AuditsUidGetSysMsg", + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1AuditSysMsg" + } + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Specify the audit uid", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/audits/{uid}/userMsg": { + "patch": { + "tags": [ + "v1" + ], + "summary": "Updates the specified user message for the specified audit", + "operationId": "v1AuditsUidMsgUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1AuditMsgUpdate" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Specify the audit uid", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/auth/authenticate": { + "post": { + "description": "Creates a authentication request with the specified credentials", + "tags": [ + "v1" + ], + "summary": "Authenticates the user for the specified crendentials", + "operationId": "v1Authenticate", + "parameters": [ + { + "type": "boolean", + "default": true, + "description": "Describes a way to set cookie from backend.", + "name": "setCookie", + "in": "query" + }, + { + "description": "Describes the credential details required for authentication", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1AuthLogin" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1UserToken" + } + } + } + } + }, + "/v1/auth/org": { + "get": { + "description": "Returns the allowed login method and information with the organization details", + "tags": [ + "v1" + ], + "summary": "Returns the user organization details", + "operationId": "v1AuthOrg", + "parameters": [ + { + "type": "string", + "name": "orgName", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1LoginResponse" + } + } + } + } + }, + "/v1/auth/org/{org}/oidc/callback": { + "get": { + "description": "Returns the Authorization token for the palette. This is called by the IDP as a callback url after IDP authenticates the user with its server.", + "tags": [ + "v1" + ], + "summary": "Idp authorization code callback", + "operationId": "V1OidcCallback", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1UserToken" + } + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Organization name", + "name": "org", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Describes temporary and very short lived code sent by IDP to validate the token", + "name": "code", + "in": "query" + }, + { + "type": "string", + "description": "Describes a state to validate and associate request and response", + "name": "state", + "in": "query" + }, + { + "type": "string", + "description": "Describes a error code in case the IDP is not able to validate and authenticates the user", + "name": "error", + "in": "query" + }, + { + "type": "string", + "description": "Describes a error in case the IDP is not able to validate and authenticates the user", + "name": "error_description", + "in": "query" + } + ] + }, + "/v1/auth/org/{org}/oidc/logout": { + "get": { + "description": "Returns No Content. Works as a callback url after the IDP logout from their server.", + "tags": [ + "v1" + ], + "summary": "Identity provider logout url for the Oidc", + "operationId": "V1OidcLogout", + "responses": { + "204": { + "description": "Ok response without content", + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Organization name", + "name": "org", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Describes a state to validate and associate request and response", + "name": "state", + "in": "query" + } + ] + }, + "/v1/auth/org/{org}/saml/callback": { + "post": { + "description": "Returns the Authorization token for the palette. This is called by the SAML based IDP as a callback url after IDP authenticates the user with its server.", + "consumes": [ + "application/x-www-form-urlencoded" + ], + "tags": [ + "v1" + ], + "summary": "Identity provider callback url for the SMAL authentication", + "operationId": "V1SamlCallback", + "parameters": [ + { + "type": "string", + "description": "Describe the SAML compliant response sent by IDP which will be validated by Palette", + "name": "SAMLResponse", + "in": "formData" + }, + { + "type": "string", + "description": "Describes a state to validate and associate request and response", + "name": "RelayState", + "in": "formData" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1UserToken" + } + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Organization name", + "name": "org", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Deprecated.", + "name": "authToken", + "in": "query" + } + ] + }, + "/v1/auth/org/{org}/saml/logout": { + "post": { + "description": "Returns No Content. Works as a callback url after the IDP logout from their server.", + "consumes": [ + "application/x-www-form-urlencoded" + ], + "tags": [ + "v1" + ], + "summary": "Identity provider logout url for the SMAL", + "operationId": "V1SamlLogout", + "parameters": [ + { + "type": "string", + "description": "Describe the SAML compliant response sent by IDP which will be validated by Palette to perform logout.", + "name": "SAMLResponse", + "in": "formData" + } + ], + "responses": { + "204": { + "description": "Ok response without content", + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Organization name", + "name": "org", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Deprecated.", + "name": "authToken", + "in": "query" + } + ] + }, + "/v1/auth/orgs": { + "get": { + "description": "Returns a list of user's organizations details and login methods", + "tags": [ + "v1" + ], + "summary": "Returns a list of user's organizations", + "operationId": "V1AuthOrgs", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1Organizations" + } + } + } + } + }, + "/v1/auth/password/{passwordToken}/activate": { + "patch": { + "description": "Updates and Activates user password with the help of password token", + "tags": [ + "v1" + ], + "summary": "Updates and Activates the specified user password using the password token", + "operationId": "v1PasswordActivate", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "type": "object", + "required": [ + "password" + ], + "properties": { + "password": { + "description": "Describes the new password for the user", + "type": "string", + "format": "password" + } + } + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Describes the expirable password token for the user to be used for authentication of user", + "name": "passwordToken", + "in": "path", + "required": true + } + ] + }, + "/v1/auth/password/{passwordToken}/reset": { + "patch": { + "description": "Updates the new user password with the help of password token", + "tags": [ + "v1" + ], + "summary": "Resets the user password using the password token", + "operationId": "v1PasswordReset", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "type": "object", + "required": [ + "password" + ], + "properties": { + "password": { + "description": "Describes the new password for the user", + "type": "string", + "format": "password" + } + } + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Describes the expirable password token for the user to be used for authentication of user", + "name": "passwordToken", + "in": "path", + "required": true + } + ] + }, + "/v1/auth/refresh/{token}": { + "get": { + "description": "Returns a new token within refresh timeout and same session id is maintained", + "tags": [ + "v1" + ], + "summary": "Refreshes authentication token", + "operationId": "v1AuthRefresh", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1UserToken" + } + } + } + }, + "parameters": [ + { + "type": "boolean", + "default": true, + "description": "Describes a way to set cookie from backend.", + "name": "setCookie", + "in": "query" + }, + { + "type": "string", + "description": "Non expired Authorization token", + "name": "token", + "in": "path", + "required": true + } + ] + }, + "/v1/auth/sso/idps": { + "get": { + "description": "Returns a list of predefined Identity Provider (IDP)", + "tags": [ + "v1" + ], + "summary": "Returns a list of predefined Identity Provider (IDP)", + "operationId": "V1SsoIdps", + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1IdentityProviders" + } + } + } + } + }, + "/v1/auth/sso/logins": { + "get": { + "description": "Returns a list of supported sso logins and their authentication mechanism", + "tags": [ + "v1" + ], + "summary": "Returns a list of supported sso logins", + "operationId": "V1SsoLogins", + "parameters": [ + { + "type": "string", + "name": "org", + "in": "query" + } + ], + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1SsoLogins" + } + } + } + } + }, + "/v1/auth/sso/providers": { + "get": { + "description": "Returns a list of supported sso auth providers", + "tags": [ + "v1" + ], + "summary": "Returns a list of supported sso auth providers", + "operationId": "V1AuthSsoProviders", + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1SsoLogins" + } + } + } + } + }, + "/v1/auth/sso/{ssoApp}/callback": { + "get": { + "description": "Returns Authorization token. Works as a callback url for the system defined sso apps", + "tags": [ + "v1" + ], + "summary": "Returns Authorization token. Works as a callback url for the system defined sso apps", + "operationId": "V1SsoCallback", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1UserToken" + } + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Describes the sso app use to login into the system", + "name": "ssoApp", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Describes temporary and very short lived code sent by IDP to validate the token", + "name": "code", + "in": "query" + }, + { + "type": "string", + "description": "Describes a state to validate and associate request and response", + "name": "state", + "in": "query" + }, + { + "type": "string", + "description": "Describes a error code in case the IDP is not able to validate and authenticates the user", + "name": "error", + "in": "query" + }, + { + "type": "string", + "description": "Describes a error in case the IDP is not able to validate and authenticates the user", + "name": "error_description", + "in": "query" + } + ] + }, + "/v1/auth/user/org/forgot": { + "get": { + "description": "Returns No Content. Sends the user organization(s) information via email", + "tags": [ + "v1" + ], + "summary": "Returns No Content. Sends the user organization information via email", + "operationId": "V1AuthUserOrgForgot", + "parameters": [ + { + "type": "string", + "description": "Describes user's email id for sending organzation(s) details via email.", + "name": "emailId", + "in": "query", + "required": true + } + ], + "responses": { + "204": { + "description": "Ok response without content", + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + } + }, + "/v1/auth/user/password/reset": { + "post": { + "description": "Creates request to reset password via email. Password reset email will be sent to the user. Sends 204 No Content.", + "tags": [ + "v1" + ], + "summary": "Creates request to reset password via email", + "operationId": "v1PasswordResetRequest", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "type": "object", + "required": [ + "emailId" + ], + "properties": { + "emailId": { + "description": "Describes email if for which password reset email has to be sent", + "type": "string" + } + } + } + } + ], + "responses": { + "204": { + "description": "Ok response without content", + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + } + }, + "/v1/cloudaccounts/aws": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves a list of AWS cloud accounts", + "operationId": "v1CloudAccountsAwsList", + "parameters": [ + { + "type": "string", + "description": "Set of fields to be presented in the response with values. The fields are comma separated. Eg: metadata.uid,metadata.name", + "name": "fields", + "in": "query" + }, + { + "type": "string", + "description": "Filters can be combined with AND, OR operators with field path name. Eg: metadata.name=TestServiceANDspec.cloudType=aws\n\nServer will be restricted to certain fields based on the indexed data for each resource.", + "name": "filters", + "in": "query" + }, + { + "type": "string", + "description": "Specify the fields with sort order. 1 indicates ascending and -1 for descending. Eg: orderBy=metadata.name=1,metadata.uid=-1", + "name": "orderBy", + "in": "query" + }, + { + "type": "integer", + "format": "int64", + "default": 50, + "description": "limit is a maximum number of responses to return for a list call. Default and maximum value of the limit is 50.\nIf more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results.", + "name": "limit", + "in": "query" + }, + { + "type": "integer", + "format": "int64", + "description": "offset is the next index number from which the response will start. The response offset value can be used along with continue token for the pagination.", + "name": "offset", + "in": "query" + }, + { + "type": "string", + "description": "continue token to paginate the subsequent data items", + "name": "continue", + "in": "query" + } + ], + "responses": { + "200": { + "description": "An array of cloud account items", + "schema": { + "$ref": "#/definitions/v1AwsAccounts" + } + } + } + }, + "post": { + "tags": [ + "v1" + ], + "summary": "Creates an AWS cloud account", + "operationId": "v1CloudAccountsAwsCreate", + "parameters": [ + { + "description": "Request payload to validate AWS cloud account", + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1AwsAccount" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + } + }, + "/v1/cloudaccounts/aws/{uid}": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the specified AWS account", + "operationId": "v1CloudAccountsAwsGet", + "parameters": [ + { + "type": "boolean", + "default": false, + "name": "assumeCredentials", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1AwsAccount" + } + } + } + }, + "put": { + "tags": [ + "v1" + ], + "summary": "Updates the specified AWS account", + "operationId": "v1CloudAccountsAwsUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1AwsAccount" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "delete": { + "tags": [ + "v1" + ], + "summary": "Deletes the specified AWS account", + "operationId": "v1CloudAccountsAwsDelete", + "responses": { + "204": { + "description": "The resource was deleted successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "AWS cloud account uid", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/cloudaccounts/azure": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves a list of azure cloud accounts", + "operationId": "v1CloudAccountsAzureList", + "parameters": [ + { + "type": "string", + "description": "Set of fields to be presented in the response with values. The fields are comma separated. Eg: metadata.uid,metadata.name", + "name": "fields", + "in": "query" + }, + { + "type": "string", + "description": "Filters can be combined with AND, OR operators with field path name. Eg: metadata.name=TestServiceANDspec.cloudType=aws\n\nServer will be restricted to certain fields based on the indexed data for each resource.", + "name": "filters", + "in": "query" + }, + { + "type": "string", + "description": "Specify the fields with sort order. 1 indicates ascending and -1 for descending. Eg: orderBy=metadata.name=1,metadata.uid=-1", + "name": "orderBy", + "in": "query" + }, + { + "type": "integer", + "format": "int64", + "default": 50, + "description": "limit is a maximum number of responses to return for a list call. Default and maximum value of the limit is 50.\nIf more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results.", + "name": "limit", + "in": "query" + }, + { + "type": "integer", + "format": "int64", + "description": "offset is the next index number from which the response will start. The response offset value can be used along with continue token for the pagination.", + "name": "offset", + "in": "query" + }, + { + "type": "string", + "description": "continue token to paginate the subsequent data items", + "name": "continue", + "in": "query" + } + ], + "responses": { + "200": { + "description": "An array of azure cloud account items", + "schema": { + "$ref": "#/definitions/v1AzureAccounts" + } + } + } + }, + "post": { + "tags": [ + "v1" + ], + "summary": "Create azure cloud account", + "operationId": "v1CloudAccountsAzureCreate", + "parameters": [ + { + "description": "Request payload to validate Azure cloud account", + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1AzureAccount" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + } + }, + "/v1/cloudaccounts/azure/{uid}": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the specified azure cloud account", + "operationId": "v1CloudAccountsAzureGet", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1AzureAccount" + } + } + } + }, + "put": { + "tags": [ + "v1" + ], + "summary": "Updates the specified azure account", + "operationId": "v1CloudAccountsAzureUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1AzureAccount" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "delete": { + "tags": [ + "v1" + ], + "summary": "Deletes the specified azure account", + "operationId": "v1CloudAccountsAzureDelete", + "responses": { + "204": { + "description": "The resource was deleted successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Azure cloud account uid", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/cloudaccounts/cloudTypes/{cloudType}": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves a list of cloud accounts by cloud type", + "operationId": "v1CloudAccountsCustomList", + "parameters": [ + { + "type": "string", + "description": "Set of fields to be presented in the response with values. The fields are comma separated. Eg: metadata.uid,metadata.name", + "name": "fields", + "in": "query" + }, + { + "type": "string", + "description": "Filters can be combined with AND, OR operators with field path name. Eg: metadata.name=TestServiceANDspec.cloudType=aws\n\nServer will be restricted to certain fields based on the indexed data for each resource.", + "name": "filters", + "in": "query" + }, + { + "type": "string", + "description": "Specify the fields with sort order. 1 indicates ascending and -1 for descending. Eg: orderBy=metadata.name=1,metadata.uid=-1", + "name": "orderBy", + "in": "query" + }, + { + "type": "integer", + "format": "int64", + "default": 50, + "description": "limit is a maximum number of responses to return for a list call. Default and maximum value of the limit is 50.\nIf more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results.", + "name": "limit", + "in": "query" + }, + { + "type": "integer", + "format": "int64", + "description": "offset is the next index number from which the response will start. The response offset value can be used along with continue token for the pagination.", + "name": "offset", + "in": "query" + }, + { + "type": "string", + "description": "continue token to paginate the subsequent data items", + "name": "continue", + "in": "query" + } + ], + "responses": { + "200": { + "description": "An array of cloud account by specified cloud type items", + "schema": { + "$ref": "#/definitions/v1CustomAccounts" + } + } + } + }, + "post": { + "tags": [ + "v1" + ], + "summary": "Creates an cloud account of specific cloud type", + "operationId": "v1CloudAccountsCustomCreate", + "parameters": [ + { + "description": "Request payload to validate Custom cloud account", + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1CustomAccountEntity" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Custom cloud type", + "name": "cloudType", + "in": "path", + "required": true + } + ] + }, + "/v1/cloudaccounts/cloudTypes/{cloudType}/{uid}": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the specified account by cloud type", + "operationId": "v1CloudAccountsCustomGet", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1CustomAccount" + } + } + } + }, + "put": { + "tags": [ + "v1" + ], + "summary": "Updates the specified account by cloud type", + "operationId": "v1CloudAccountsCustomUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1CustomAccountEntity" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "delete": { + "tags": [ + "v1" + ], + "summary": "Deletes the specified account by cloud type", + "operationId": "v1CloudAccountsCustomDelete", + "responses": { + "204": { + "description": "The resource was deleted successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Custom cloud account uid", + "name": "uid", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Custom cloud type", + "name": "cloudType", + "in": "path", + "required": true + } + ] + }, + "/v1/cloudaccounts/gcp": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves a list of gcp cloud accounts", + "operationId": "v1CloudAccountsGcpList", + "parameters": [ + { + "type": "string", + "description": "Set of fields to be presented in the response with values. The fields are comma separated. Eg: metadata.uid,metadata.name", + "name": "fields", + "in": "query" + }, + { + "type": "string", + "description": "Filters can be combined with AND, OR operators with field path name. Eg: metadata.name=TestServiceANDspec.cloudType=aws\n\nServer will be restricted to certain fields based on the indexed data for each resource.", + "name": "filters", + "in": "query" + }, + { + "type": "string", + "description": "Specify the fields with sort order. 1 indicates ascending and -1 for descending. Eg: orderBy=metadata.name=1,metadata.uid=-1", + "name": "orderBy", + "in": "query" + }, + { + "type": "integer", + "format": "int64", + "default": 50, + "description": "limit is a maximum number of responses to return for a list call. Default and maximum value of the limit is 50.\nIf more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results.", + "name": "limit", + "in": "query" + }, + { + "type": "integer", + "format": "int64", + "description": "offset is the next index number from which the response will start. The response offset value can be used along with continue token for the pagination.", + "name": "offset", + "in": "query" + }, + { + "type": "string", + "description": "continue token to paginate the subsequent data items", + "name": "continue", + "in": "query" + } + ], + "responses": { + "200": { + "description": "An array of gcp cloud account items", + "schema": { + "$ref": "#/definitions/v1GcpAccounts" + } + } + } + }, + "post": { + "tags": [ + "v1" + ], + "summary": "Creates a GCP cloud account", + "operationId": "v1CloudAccountsGcpCreate", + "parameters": [ + { + "description": "Request payload to validate GCP cloud account", + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1GcpAccountEntity" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + } + }, + "/v1/cloudaccounts/gcp/{uid}": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the specified GCP cloud account", + "operationId": "v1CloudAccountsGcpGet", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1GcpAccount" + } + } + } + }, + "put": { + "tags": [ + "v1" + ], + "summary": "Updates the specified GCP account", + "operationId": "v1CloudAccountsGcpUpdate", + "parameters": [ + { + "description": "Request payload to validate GCP cloud account", + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1GcpAccountEntity" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "delete": { + "tags": [ + "v1" + ], + "summary": "Deletes the specified GCP account", + "operationId": "v1CloudAccountsGcpDelete", + "responses": { + "204": { + "description": "The resource was deleted successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "GCP cloud account uid", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/cloudaccounts/maas": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves a list of Maas cloud accounts", + "operationId": "v1CloudAccountsMaasList", + "parameters": [ + { + "type": "string", + "description": "Set of fields to be presented in the response with values. The fields are comma separated. Eg: metadata.uid,metadata.name", + "name": "fields", + "in": "query" + }, + { + "type": "string", + "description": "Filters can be combined with AND, OR operators with field path name. Eg: metadata.name=TestServiceANDspec.cloudType=aws\n\nServer will be restricted to certain fields based on the indexed data for each resource.", + "name": "filters", + "in": "query" + }, + { + "type": "string", + "description": "Specify the fields with sort order. 1 indicates ascending and -1 for descending. Eg: orderBy=metadata.name=1,metadata.uid=-1", + "name": "orderBy", + "in": "query" + }, + { + "type": "integer", + "format": "int64", + "default": 50, + "description": "limit is a maximum number of responses to return for a list call. Default and maximum value of the limit is 50.\nIf more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results.", + "name": "limit", + "in": "query" + }, + { + "type": "integer", + "format": "int64", + "description": "offset is the next index number from which the response will start. The response offset value can be used along with continue token for the pagination.", + "name": "offset", + "in": "query" + }, + { + "type": "string", + "description": "continue token to paginate the subsequent data items", + "name": "continue", + "in": "query" + } + ], + "responses": { + "200": { + "description": "An array of cloud account items", + "schema": { + "$ref": "#/definitions/v1MaasAccounts" + } + } + } + }, + "post": { + "tags": [ + "v1" + ], + "summary": "Creates an Maas cloud account", + "operationId": "v1CloudAccountsMaasCreate", + "parameters": [ + { + "description": "Request payload to validate Maas cloud account", + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1MaasAccount" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + } + }, + "/v1/cloudaccounts/maas/{uid}": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the specified Maas account", + "operationId": "v1CloudAccountsMaasGet", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1MaasAccount" + } + } + } + }, + "put": { + "tags": [ + "v1" + ], + "summary": "Updates the specified Maas account", + "operationId": "v1CloudAccountsMaasUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1MaasAccount" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "delete": { + "tags": [ + "v1" + ], + "summary": "Deletes the specified Maas account", + "operationId": "v1CloudAccountsMaasDelete", + "responses": { + "204": { + "description": "The resource was deleted successfully" + } + } + }, + "patch": { + "tags": [ + "v1" + ], + "summary": "Patches the specified CloudAccount Maas", + "operationId": "v1CloudAccountsMaasPatch", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1CloudAccountsPatch" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Maas cloud account uid", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/cloudaccounts/maas/{uid}/properties/azs": { + "get": { + "tags": [ + "v1" + ], + "summary": "Get the maas azs for a given account", + "operationId": "v1MaasAccountsUidAzs", + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1MaasZones" + } + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/cloudaccounts/maas/{uid}/properties/domains": { + "get": { + "tags": [ + "v1" + ], + "summary": "Get the maas domains for a given account", + "operationId": "v1MaasAccountsUidDomains", + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1MaasDomains" + } + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/cloudaccounts/maas/{uid}/properties/resourcePools": { + "get": { + "tags": [ + "v1" + ], + "summary": "Get the maas pools for a given account", + "operationId": "v1MaasAccountsUidPools", + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1MaasPools" + } + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/cloudaccounts/maas/{uid}/properties/subnets": { + "get": { + "tags": [ + "v1" + ], + "summary": "Get the maas subnets for a given account", + "operationId": "v1MaasAccountsUidSubnets", + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1MaasSubnets" + } + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/cloudaccounts/maas/{uid}/properties/tags": { + "get": { + "tags": [ + "v1" + ], + "summary": "Get the maas tags for a given account", + "operationId": "v1MaasAccountsUidTags", + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1MaasTags" + } + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/cloudaccounts/openstack": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves a list of OpenStack cloud accounts", + "operationId": "v1CloudAccountsOpenStackList", + "parameters": [ + { + "type": "string", + "description": "Set of fields to be presented in the response with values. The fields are comma separated. Eg: metadata.uid,metadata.name", + "name": "fields", + "in": "query" + }, + { + "type": "string", + "description": "Filters can be combined with AND, OR operators with field path name. Eg: metadata.name=TestServiceANDspec.cloudType=aws\n\nServer will be restricted to certain fields based on the indexed data for each resource.", + "name": "filters", + "in": "query" + }, + { + "type": "string", + "description": "Specify the fields with sort order. 1 indicates ascending and -1 for descending. Eg: orderBy=metadata.name=1,metadata.uid=-1", + "name": "orderBy", + "in": "query" + }, + { + "type": "integer", + "format": "int64", + "default": 50, + "description": "limit is a maximum number of responses to return for a list call. Default and maximum value of the limit is 50.\nIf more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results.", + "name": "limit", + "in": "query" + }, + { + "type": "integer", + "format": "int64", + "description": "offset is the next index number from which the response will start. The response offset value can be used along with continue token for the pagination.", + "name": "offset", + "in": "query" + }, + { + "type": "string", + "description": "continue token to paginate the subsequent data items", + "name": "continue", + "in": "query" + } + ], + "responses": { + "200": { + "description": "An array of cloud account items", + "schema": { + "$ref": "#/definitions/v1OpenStackAccounts" + } + } + } + }, + "post": { + "tags": [ + "v1" + ], + "summary": "Creates a OpenStack cloud account", + "operationId": "v1CloudAccountsOpenStackCreate", + "parameters": [ + { + "description": "Request payload to validate OpenStack cloud account", + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1OpenStackAccount" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + } + }, + "/v1/cloudaccounts/openstack/{uid}": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the specified OpenStack account", + "operationId": "v1CloudAccountsOpenStackGet", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1OpenStackAccount" + } + } + } + }, + "put": { + "tags": [ + "v1" + ], + "summary": "Updates the specified OpenStack account", + "operationId": "v1CloudAccountsOpenStackUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1OpenStackAccount" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "delete": { + "tags": [ + "v1" + ], + "summary": "Deletes the specified OpenStack account", + "operationId": "v1CloudAccountsOpenStackDelete", + "responses": { + "204": { + "description": "The resource was deleted successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "OpenStack cloud account uid", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/cloudaccounts/openstack/{uid}/properties/azs": { + "get": { + "tags": [ + "v1" + ], + "summary": "Get the openstack azs for a given account and region", + "operationId": "v1OpenstackAccountsUidAzs", + "parameters": [ + { + "type": "string", + "name": "region", + "in": "query" + }, + { + "type": "string", + "name": "project", + "in": "query" + }, + { + "type": "string", + "name": "domain", + "in": "query" + } + ], + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1OpenStackAzs" + } + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/cloudaccounts/openstack/{uid}/properties/flavors": { + "get": { + "tags": [ + "v1" + ], + "summary": "Get the openstack keypairs for a given account and scope", + "operationId": "v1OpenstackAccountsUidFlavors", + "parameters": [ + { + "type": "string", + "name": "project", + "in": "query" + }, + { + "type": "string", + "name": "region", + "in": "query" + }, + { + "type": "string", + "name": "domain", + "in": "query" + } + ], + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1OpenStackFlavors" + } + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/cloudaccounts/openstack/{uid}/properties/keypairs": { + "get": { + "tags": [ + "v1" + ], + "summary": "Get the openstack keypairs for a given account and scope", + "operationId": "v1OpenstackAccountsUidKeypairs", + "parameters": [ + { + "type": "string", + "name": "project", + "in": "query" + }, + { + "type": "string", + "name": "region", + "in": "query" + }, + { + "type": "string", + "name": "domain", + "in": "query" + } + ], + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1OpenStackKeypairs" + } + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/cloudaccounts/openstack/{uid}/properties/networks": { + "get": { + "tags": [ + "v1" + ], + "summary": "Get the openstack networks for a given account and scope", + "operationId": "v1OpenstackAccountsUidNetworks", + "parameters": [ + { + "type": "string", + "name": "project", + "in": "query" + }, + { + "type": "string", + "name": "region", + "in": "query" + }, + { + "type": "string", + "name": "domain", + "in": "query" + } + ], + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1OpenStackNetworks" + } + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/cloudaccounts/openstack/{uid}/properties/projects": { + "get": { + "tags": [ + "v1" + ], + "summary": "Get the openstack projects for a given account", + "operationId": "v1OpenstackAccountsUidProjects", + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1OpenStackProjects" + } + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/cloudaccounts/openstack/{uid}/properties/regions": { + "get": { + "tags": [ + "v1" + ], + "summary": "Get the openstack regions for a given account", + "operationId": "v1OpenstackAccountsUidRegions", + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1OpenStackRegions" + } + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/cloudaccounts/summary": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves a list of cloud accounts summary", + "operationId": "v1CloudAccountsListSummary", + "parameters": [ + { + "type": "string", + "description": "Filters can be combined with AND, OR operators with field path name. Eg: metadata.name=TestServiceANDspec.cloudType=aws\n\nServer will be restricted to certain fields based on the indexed data for each resource.", + "name": "filters", + "in": "query" + }, + { + "type": "string", + "description": "Specify the fields with sort order. 1 indicates ascending and -1 for descending. Eg: orderBy=metadata.name=1,metadata.uid=-1", + "name": "orderBy", + "in": "query" + }, + { + "type": "integer", + "format": "int64", + "default": 50, + "description": "limit is a maximum number of responses to return for a list call. Default and maximum value of the limit is 50.\nIf more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results.", + "name": "limit", + "in": "query" + }, + { + "type": "integer", + "format": "int64", + "description": "offset is the next index number from which the response will start. The response offset value can be used along with continue token for the pagination.", + "name": "offset", + "in": "query" + }, + { + "type": "string", + "description": "continue token to paginate the subsequent data items", + "name": "continue", + "in": "query" + } + ], + "responses": { + "200": { + "description": "An array of cloud account summary items", + "schema": { + "$ref": "#/definitions/v1CloudAccountsSummary" + } + } + } + } + }, + "/v1/cloudaccounts/tencent": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves a list of Tencent cloud accounts", + "operationId": "v1CloudAccountsTencentList", + "parameters": [ + { + "type": "string", + "description": "Set of fields to be presented in the response with values. The fields are comma separated. Eg: metadata.uid,metadata.name", + "name": "fields", + "in": "query" + }, + { + "type": "string", + "description": "Filters can be combined with AND, OR operators with field path name. Eg: metadata.name=TestServiceANDspec.cloudType=aws\n\nServer will be restricted to certain fields based on the indexed data for each resource.", + "name": "filters", + "in": "query" + }, + { + "type": "string", + "description": "Specify the fields with sort order. 1 indicates ascending and -1 for descending. Eg: orderBy=metadata.name=1,metadata.uid=-1", + "name": "orderBy", + "in": "query" + }, + { + "type": "integer", + "format": "int64", + "default": 50, + "description": "limit is a maximum number of responses to return for a list call. Default and maximum value of the limit is 50.\nIf more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results.", + "name": "limit", + "in": "query" + }, + { + "type": "integer", + "format": "int64", + "description": "offset is the next index number from which the response will start. The response offset value can be used along with continue token for the pagination.", + "name": "offset", + "in": "query" + }, + { + "type": "string", + "description": "continue token to paginate the subsequent data items", + "name": "continue", + "in": "query" + } + ], + "responses": { + "200": { + "description": "An array of cloud account items", + "schema": { + "$ref": "#/definitions/v1TencentAccounts" + } + } + } + }, + "post": { + "tags": [ + "v1" + ], + "summary": "Creates an Tencent cloud account", + "operationId": "v1CloudAccountsTencentCreate", + "parameters": [ + { + "description": "Request payload to validate Tencent cloud account", + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1TencentAccount" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + } + }, + "/v1/cloudaccounts/tencent/{uid}": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the specified Tencent account", + "operationId": "v1CloudAccountsTencentGet", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1TencentAccount" + } + } + } + }, + "put": { + "tags": [ + "v1" + ], + "summary": "Updates the specified Tencent account", + "operationId": "v1CloudAccountsTencentUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1TencentAccount" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "delete": { + "tags": [ + "v1" + ], + "summary": "Deletes the specified Tencent account", + "operationId": "v1CloudAccountsTencentDelete", + "responses": { + "204": { + "description": "The resource was deleted successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Tencent cloud account uid", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/cloudaccounts/vsphere": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves a list of vSphere cloud accounts", + "operationId": "v1CloudAccountsVsphereList", + "parameters": [ + { + "type": "string", + "description": "Set of fields to be presented in the response with values. The fields are comma separated. Eg: metadata.uid,metadata.name", + "name": "fields", + "in": "query" + }, + { + "type": "string", + "description": "Filters can be combined with AND, OR operators with field path name. Eg: metadata.name=TestServiceANDspec.cloudType=aws\n\nServer will be restricted to certain fields based on the indexed data for each resource.", + "name": "filters", + "in": "query" + }, + { + "type": "string", + "description": "Specify the fields with sort order. 1 indicates ascending and -1 for descending. Eg: orderBy=metadata.name=1,metadata.uid=-1", + "name": "orderBy", + "in": "query" + }, + { + "type": "integer", + "format": "int64", + "default": 50, + "description": "limit is a maximum number of responses to return for a list call. Default and maximum value of the limit is 50.\nIf more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results.", + "name": "limit", + "in": "query" + }, + { + "type": "integer", + "format": "int64", + "description": "offset is the next index number from which the response will start. The response offset value can be used along with continue token for the pagination.", + "name": "offset", + "in": "query" + }, + { + "type": "string", + "description": "continue token to paginate the subsequent data items", + "name": "continue", + "in": "query" + } + ], + "responses": { + "200": { + "description": "An array of cloud account items", + "schema": { + "$ref": "#/definitions/v1VsphereAccounts" + } + } + } + }, + "post": { + "tags": [ + "v1" + ], + "summary": "Creates a vSphere cloud account", + "operationId": "v1CloudAccountsVsphereCreate", + "parameters": [ + { + "description": "Request payload to validate VSphere cloud account", + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1VsphereAccount" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + } + }, + "/v1/cloudaccounts/vsphere/{uid}": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the specified vSphere account", + "operationId": "v1CloudAccountsVsphereGet", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1VsphereAccount" + } + } + } + }, + "put": { + "tags": [ + "v1" + ], + "summary": "Updates the specified VSphere account", + "operationId": "v1CloudAccountsVsphereUpdate", + "parameters": [ + { + "description": "Request payload to validate VSphere cloud account", + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1VsphereAccount" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "delete": { + "tags": [ + "v1" + ], + "summary": "Deletes the specified vSphere account", + "operationId": "v1CloudAccountsVsphereDelete", + "responses": { + "204": { + "description": "The resource was deleted successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "VSphere cloud account uid", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/cloudaccounts/vsphere/{uid}/properties/computecluster/resources": { + "get": { + "tags": [ + "v1" + ], + "summary": "Get the vSphere computecluster resources for the given overlord account", + "operationId": "v1VsphereAccountsUidClusterRes", + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1VsphereComputeClusterResources" + } + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + }, + { + "type": "string", + "name": "datacenter", + "in": "query", + "required": true + }, + { + "type": "string", + "name": "computecluster", + "in": "query", + "required": true + }, + { + "type": "boolean", + "name": "useQualifiedNetworkName", + "in": "query" + } + ] + }, + "/v1/cloudaccounts/vsphere/{uid}/properties/datacenters": { + "get": { + "tags": [ + "v1" + ], + "summary": "Get the vSphere datacenters \u0026 datacluster for the given overlord account", + "operationId": "v1VsphereAccountsUidDatacenters", + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1VsphereDatacenters" + } + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/cloudaccounts/{uid}/geoLocation": { + "patch": { + "tags": [ + "v1" + ], + "summary": "Update the geolocation annotation", + "operationId": "v1AccountsGeolocationPatch", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1GeolocationLatlong" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/cloudconfigs/aks/{configUid}": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the specified AKS cloud config", + "operationId": "v1CloudConfigsAksGet", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1AzureCloudConfig" + } + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster's cloud config uid", + "name": "configUid", + "in": "path", + "required": true + } + ] + }, + "/v1/cloudconfigs/aks/{configUid}/clusterConfig": { + "put": { + "tags": [ + "v1" + ], + "summary": "Updates the cluster configuration information", + "operationId": "v1CloudConfigsAksUidClusterConfig", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1AzureCloudClusterConfigEntity" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster's cloud config uid", + "name": "configUid", + "in": "path", + "required": true + } + ] + }, + "/v1/cloudconfigs/aks/{configUid}/machinePools": { + "post": { + "tags": [ + "v1" + ], + "summary": "Creates an AKS cloud config's machine pool", + "operationId": "v1CloudConfigsAksMachinePoolCreate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1AzureMachinePoolConfigEntity" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster's cloud config uid", + "name": "configUid", + "in": "path", + "required": true + } + ] + }, + "/v1/cloudconfigs/aks/{configUid}/machinePools/{machinePoolName}": { + "put": { + "tags": [ + "v1" + ], + "summary": "Updates the specified AKS cloud config's machine pool", + "operationId": "v1CloudConfigsAksMachinePoolUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1AzureMachinePoolConfigEntity" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "delete": { + "tags": [ + "v1" + ], + "summary": "Deletes the specified machine pool", + "operationId": "v1CloudConfigsAksMachinePoolDelete", + "responses": { + "204": { + "description": "The resource was deleted successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster's cloud config uid", + "name": "configUid", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Machine pool name", + "name": "machinePoolName", + "in": "path", + "required": true + } + ] + }, + "/v1/cloudconfigs/aks/{configUid}/machinePools/{machinePoolName}/machines": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves a list of AKS machines", + "operationId": "v1CloudConfigsAksPoolMachinesList", + "parameters": [ + { + "type": "string", + "description": "Set of fields to be presented in the response with values. The fields are comma separated. Eg: metadata.uid,metadata.name", + "name": "fields", + "in": "query" + }, + { + "type": "string", + "description": "Filters can be combined with AND, OR operators with field path name. Eg: metadata.name=TestServiceANDspec.cloudType=aws\n\nServer will be restricted to certain fields based on the indexed data for each resource.", + "name": "filters", + "in": "query" + }, + { + "type": "string", + "description": "Specify the fields with sort order. 1 indicates ascending and -1 for descending. Eg: orderBy=metadata.name=1,metadata.uid=-1", + "name": "orderBy", + "in": "query" + }, + { + "type": "integer", + "format": "int64", + "default": 50, + "description": "limit is a maximum number of responses to return for a list call. Default and maximum value of the limit is 50.\nIf more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results.", + "name": "limit", + "in": "query" + }, + { + "type": "integer", + "format": "int64", + "description": "offset is the next index number from which the response will start. The response offset value can be used along with continue token for the pagination.", + "name": "offset", + "in": "query" + }, + { + "type": "string", + "description": "continue token to paginate the subsequent data items", + "name": "continue", + "in": "query" + } + ], + "responses": { + "200": { + "description": "An array of AKS machine items", + "schema": { + "$ref": "#/definitions/v1AzureMachines" + } + } + } + }, + "post": { + "tags": [ + "v1" + ], + "summary": "Adds the machine to cloud config's machine pool", + "operationId": "v1CloudConfigsAksPoolMachinesAdd", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1AzureMachine" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster's cloud config uid", + "name": "configUid", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Machine pool name", + "name": "machinePoolName", + "in": "path", + "required": true + } + ] + }, + "/v1/cloudconfigs/aks/{configUid}/machinePools/{machinePoolName}/machines/{machineUid}": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the specified AKS machine", + "operationId": "v1CloudConfigsAksPoolMachinesUidGet", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1AzureMachine" + } + } + } + }, + "put": { + "tags": [ + "v1" + ], + "summary": "Updates the specified machine to the cloud config's machine pool", + "operationId": "v1CloudConfigsAksPoolMachinesUidUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1AzureMachine" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "delete": { + "tags": [ + "v1" + ], + "summary": "Deletes the specified Azure machine", + "operationId": "v1CloudConfigsAksPoolMachinesUidDelete", + "responses": { + "204": { + "description": "The resource was deleted successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster's cloud config uid", + "name": "configUid", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Machine pool name", + "name": "machinePoolName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Machine uid", + "name": "machineUid", + "in": "path", + "required": true + } + ] + }, + "/v1/cloudconfigs/aws/{configUid}": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the specified AWS cloud config", + "operationId": "v1CloudConfigsAwsGet", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1AwsCloudConfig" + } + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster's cloud config uid", + "name": "configUid", + "in": "path", + "required": true + } + ] + }, + "/v1/cloudconfigs/aws/{configUid}/clusterConfig": { + "put": { + "tags": [ + "v1" + ], + "summary": "Updates the cluster configuration information", + "operationId": "v1CloudConfigsAwsUidClusterConfig", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1AwsCloudClusterConfigEntity" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster's cloud config uid", + "name": "configUid", + "in": "path", + "required": true + } + ] + }, + "/v1/cloudconfigs/aws/{configUid}/machinePools": { + "post": { + "tags": [ + "v1" + ], + "summary": "Creates an AWS cloud config's machine pool", + "operationId": "v1CloudConfigsAwsMachinePoolCreate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1AwsMachinePoolConfigEntity" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster's cloud config uid", + "name": "configUid", + "in": "path", + "required": true + } + ] + }, + "/v1/cloudconfigs/aws/{configUid}/machinePools/{machinePoolName}": { + "put": { + "tags": [ + "v1" + ], + "summary": "Updates the specified AWS cloud config's machine pool", + "operationId": "v1CloudConfigsAwsMachinePoolUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1AwsMachinePoolConfigEntity" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "delete": { + "tags": [ + "v1" + ], + "summary": "Deletes the specified machine pool", + "operationId": "v1CloudConfigsAwsMachinePoolDelete", + "responses": { + "204": { + "description": "The resource was deleted successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster's cloud config uid", + "name": "configUid", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Machine pool name", + "name": "machinePoolName", + "in": "path", + "required": true + } + ] + }, + "/v1/cloudconfigs/aws/{configUid}/machinePools/{machinePoolName}/machines": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves a list of AWS machines", + "operationId": "v1CloudConfigsAwsPoolMachinesList", + "parameters": [ + { + "type": "string", + "description": "Set of fields to be presented in the response with values. The fields are comma separated. Eg: metadata.uid,metadata.name", + "name": "fields", + "in": "query" + }, + { + "type": "string", + "description": "Filters can be combined with AND, OR operators with field path name. Eg: metadata.name=TestServiceANDspec.cloudType=aws\n\nServer will be restricted to certain fields based on the indexed data for each resource.", + "name": "filters", + "in": "query" + }, + { + "type": "string", + "description": "Specify the fields with sort order. 1 indicates ascending and -1 for descending. Eg: orderBy=metadata.name=1,metadata.uid=-1", + "name": "orderBy", + "in": "query" + }, + { + "type": "integer", + "format": "int64", + "default": 50, + "description": "limit is a maximum number of responses to return for a list call. Default and maximum value of the limit is 50.\nIf more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results.", + "name": "limit", + "in": "query" + }, + { + "type": "integer", + "format": "int64", + "description": "offset is the next index number from which the response will start. The response offset value can be used along with continue token for the pagination.", + "name": "offset", + "in": "query" + }, + { + "type": "string", + "description": "continue token to paginate the subsequent data items", + "name": "continue", + "in": "query" + } + ], + "responses": { + "200": { + "description": "An array of AWS machine items", + "schema": { + "$ref": "#/definitions/v1AwsMachines" + } + } + } + }, + "post": { + "tags": [ + "v1" + ], + "summary": "Adds the machine to cloud config's machine pool", + "operationId": "v1CloudConfigsAwsPoolMachinesAdd", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1AwsMachine" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster's cloud config uid", + "name": "configUid", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Machine pool name", + "name": "machinePoolName", + "in": "path", + "required": true + } + ] + }, + "/v1/cloudconfigs/aws/{configUid}/machinePools/{machinePoolName}/machines/{machineUid}": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the specified AWS machine", + "operationId": "v1CloudConfigsAwsPoolMachinesUidGet", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1AwsMachine" + } + } + } + }, + "put": { + "tags": [ + "v1" + ], + "summary": "Updates the specified machine to the cloud config's machine pool", + "operationId": "v1CloudConfigsAwsPoolMachinesUidUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1AwsMachine" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "delete": { + "tags": [ + "v1" + ], + "summary": "Deletes the specified AWS machine", + "operationId": "v1CloudConfigsAwsPoolMachinesUidDelete", + "responses": { + "204": { + "description": "The resource was deleted successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster's cloud config uid", + "name": "configUid", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Machine pool name", + "name": "machinePoolName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Machine uid", + "name": "machineUid", + "in": "path", + "required": true + } + ] + }, + "/v1/cloudconfigs/azure/{configUid}": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the specified Azure cloud config", + "operationId": "v1CloudConfigsAzureGet", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1AzureCloudConfig" + } + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster's cloud config uid", + "name": "configUid", + "in": "path", + "required": true + } + ] + }, + "/v1/cloudconfigs/azure/{configUid}/clusterConfig": { + "put": { + "tags": [ + "v1" + ], + "summary": "Updates the cluster configuration information", + "operationId": "v1CloudConfigsAzureUidClusterConfig", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1AzureCloudClusterConfigEntity" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster's cloud config uid", + "name": "configUid", + "in": "path", + "required": true + } + ] + }, + "/v1/cloudconfigs/azure/{configUid}/machinePools": { + "post": { + "tags": [ + "v1" + ], + "summary": "Creates an Azure cloud config's machine pool", + "operationId": "v1CloudConfigsAzureMachinePoolCreate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1AzureMachinePoolConfigEntity" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster's cloud config uid", + "name": "configUid", + "in": "path", + "required": true + } + ] + }, + "/v1/cloudconfigs/azure/{configUid}/machinePools/{machinePoolName}": { + "put": { + "tags": [ + "v1" + ], + "summary": "Updates the specified Azure cloud config's machine pool", + "operationId": "v1CloudConfigsAzureMachinePoolUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1AzureMachinePoolConfigEntity" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "delete": { + "tags": [ + "v1" + ], + "summary": "Deletes the specified machine pool", + "operationId": "v1CloudConfigsAzureMachinePoolDelete", + "responses": { + "204": { + "description": "The resource was deleted successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster's cloud config uid", + "name": "configUid", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Machine pool name", + "name": "machinePoolName", + "in": "path", + "required": true + } + ] + }, + "/v1/cloudconfigs/azure/{configUid}/machinePools/{machinePoolName}/machines": { + "get": { + "description": "Returns all the Azure machines restricted to the user role and filters.", + "tags": [ + "v1" + ], + "summary": "Retrieves a list of Azure machines", + "operationId": "v1CloudConfigsAzurePoolMachinesList", + "parameters": [ + { + "type": "string", + "description": "Set of fields to be presented in the response with values. The fields are comma separated. Eg: metadata.uid,metadata.name", + "name": "fields", + "in": "query" + }, + { + "type": "string", + "description": "Filters can be combined with AND, OR operators with field path name. Eg: metadata.name=TestServiceANDspec.cloudType=aws\n\nServer will be restricted to certain fields based on the indexed data for each resource.", + "name": "filters", + "in": "query" + }, + { + "type": "string", + "description": "Specify the fields with sort order. 1 indicates ascending and -1 for descending. Eg: orderBy=metadata.name=1,metadata.uid=-1", + "name": "orderBy", + "in": "query" + }, + { + "type": "integer", + "format": "int64", + "default": 50, + "description": "limit is a maximum number of responses to return for a list call. Default and maximum value of the limit is 50.\nIf more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results.", + "name": "limit", + "in": "query" + }, + { + "type": "integer", + "format": "int64", + "description": "offset is the next index number from which the response will start. The response offset value can be used along with continue token for the pagination.", + "name": "offset", + "in": "query" + }, + { + "type": "string", + "description": "continue token to paginate the subsequent data items", + "name": "continue", + "in": "query" + } + ], + "responses": { + "200": { + "description": "An array of AWS machine items", + "schema": { + "$ref": "#/definitions/v1AzureMachines" + } + } + } + }, + "post": { + "tags": [ + "v1" + ], + "summary": "Adds the machine to cloud config's machine pool", + "operationId": "v1CloudConfigsAzurePoolMachinesAdd", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1AzureMachine" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster's cloud config uid", + "name": "configUid", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Machine pool name", + "name": "machinePoolName", + "in": "path", + "required": true + } + ] + }, + "/v1/cloudconfigs/azure/{configUid}/machinePools/{machinePoolName}/machines/{machineUid}": { + "get": { + "description": "Returns a Azure machine for the specified uid.", + "tags": [ + "v1" + ], + "summary": "Returns the specified Azure machine", + "operationId": "v1CloudConfigsAzurePoolMachinesUidGet", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1AzureMachine" + } + } + } + }, + "put": { + "tags": [ + "v1" + ], + "summary": "Updates the specified machine to cloud config's machine pool", + "operationId": "v1CloudConfigsAzurePoolMachinesUidUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1AzureMachine" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "delete": { + "tags": [ + "v1" + ], + "summary": "Deletes the specified Azure machine", + "operationId": "v1CloudConfigsAzurePoolMachinesUidDelete", + "responses": { + "204": { + "description": "The resource was deleted successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster's cloud config uid", + "name": "configUid", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Machine pool name", + "name": "machinePoolName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Machine uid", + "name": "machineUid", + "in": "path", + "required": true + } + ] + }, + "/v1/cloudconfigs/cloudTypes/{cloudType}/{configUid}": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the specified Custom cloud config", + "operationId": "v1CloudConfigsCustomGet", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1CustomCloudConfig" + } + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster's cloud type", + "name": "cloudType", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Cluster's cloud config uid", + "name": "configUid", + "in": "path", + "required": true + } + ] + }, + "/v1/cloudconfigs/cloudTypes/{cloudType}/{configUid}/clusterConfig": { + "put": { + "tags": [ + "v1" + ], + "summary": "Updates the cluster configuration information", + "operationId": "v1CloudConfigsCustomUidClusterConfig", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1CustomCloudClusterConfigEntity" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster's cloud type", + "name": "cloudType", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Cluster's cloud config uid", + "name": "configUid", + "in": "path", + "required": true + } + ] + }, + "/v1/cloudconfigs/cloudTypes/{cloudType}/{configUid}/machinePools": { + "post": { + "tags": [ + "v1" + ], + "summary": "Creates an Custom cloud config's machine pool", + "operationId": "v1CloudConfigsCustomMachinePoolCreate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1CustomMachinePoolConfigEntity" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster's cloud type", + "name": "cloudType", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Cluster's cloud config uid", + "name": "configUid", + "in": "path", + "required": true + } + ] + }, + "/v1/cloudconfigs/cloudTypes/{cloudType}/{configUid}/machinePools/{machinePoolName}": { + "put": { + "tags": [ + "v1" + ], + "summary": "Updates the specified Custom cloud config's machine pool", + "operationId": "v1CloudConfigsCustomMachinePoolUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1CustomMachinePoolConfigEntity" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "delete": { + "tags": [ + "v1" + ], + "summary": "Deletes the specified machine pool", + "operationId": "v1CloudConfigsCustomMachinePoolDelete", + "responses": { + "204": { + "description": "The resource was deleted successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster's cloud type", + "name": "cloudType", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Cluster's cloud config uid", + "name": "configUid", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Machine pool name", + "name": "machinePoolName", + "in": "path", + "required": true + } + ] + }, + "/v1/cloudconfigs/cloudTypes/{cloudType}/{configUid}/machinePools/{machinePoolName}/machines": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves a list of Custom machines", + "operationId": "v1CloudConfigsCustomPoolMachinesList", + "parameters": [ + { + "type": "string", + "description": "Set of fields to be presented in the response with values. The fields are comma separated. Eg: metadata.uid,metadata.name", + "name": "fields", + "in": "query" + }, + { + "type": "string", + "description": "Filters can be combined with AND, OR operators with field path name. Eg: metadata.name=TestServiceANDspec.cloudType=aws\n\nServer will be restricted to certain fields based on the indexed data for each resource.", + "name": "filters", + "in": "query" + }, + { + "type": "string", + "description": "Specify the fields with sort order. 1 indicates ascending and -1 for descending. Eg: orderBy=metadata.name=1,metadata.uid=-1", + "name": "orderBy", + "in": "query" + }, + { + "type": "integer", + "format": "int64", + "default": 50, + "description": "limit is a maximum number of responses to return for a list call. Default and maximum value of the limit is 50.\nIf more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results.", + "name": "limit", + "in": "query" + }, + { + "type": "integer", + "format": "int64", + "description": "offset is the next index number from which the response will start. The response offset value can be used along with continue token for the pagination.", + "name": "offset", + "in": "query" + }, + { + "type": "string", + "description": "continue token to paginate the subsequent data items", + "name": "continue", + "in": "query" + } + ], + "responses": { + "200": { + "description": "An array of Custom machine items", + "schema": { + "$ref": "#/definitions/v1CustomMachines" + } + } + } + }, + "post": { + "tags": [ + "v1" + ], + "summary": "Adds the machine to cloud config's machine pool", + "operationId": "v1CloudConfigsCustomPoolMachinesAdd", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1CustomMachine" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster's cloud type", + "name": "cloudType", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Cluster's cloud config uid", + "name": "configUid", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Machine pool name", + "name": "machinePoolName", + "in": "path", + "required": true + } + ] + }, + "/v1/cloudconfigs/cloudTypes/{cloudType}/{configUid}/machinePools/{machinePoolName}/machines/{machineUid}": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the specified Custom machine", + "operationId": "v1CloudConfigsCustomPoolMachinesUidGet", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1CustomMachine" + } + } + } + }, + "put": { + "tags": [ + "v1" + ], + "summary": "Updates the specified machine to the cloud config's machine pool", + "operationId": "v1CloudConfigsCustomPoolMachinesUidUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1CustomMachine" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "delete": { + "tags": [ + "v1" + ], + "summary": "Deletes the specified Custom machine", + "operationId": "v1CloudConfigsCustomPoolMachinesUidDelete", + "responses": { + "204": { + "description": "The resource was deleted successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster's cloud type", + "name": "cloudType", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Cluster's cloud config uid", + "name": "configUid", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Machine pool name", + "name": "machinePoolName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Machine uid", + "name": "machineUid", + "in": "path", + "required": true + } + ] + }, + "/v1/cloudconfigs/edge-native/{configUid}": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the specified edge-native cloud config", + "operationId": "v1CloudConfigsEdgeNativeGet", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1EdgeNativeCloudConfig" + } + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster's cloud config uid", + "name": "configUid", + "in": "path", + "required": true + } + ] + }, + "/v1/cloudconfigs/edge-native/{configUid}/clusterConfig": { + "put": { + "tags": [ + "v1" + ], + "summary": "Updates the cluster configuration information", + "operationId": "v1CloudConfigsEdgeNativeUidClusterConfig", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1EdgeNativeCloudClusterConfigEntity" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster's cloud config uid", + "name": "configUid", + "in": "path", + "required": true + } + ] + }, + "/v1/cloudconfigs/edge-native/{configUid}/machinePools": { + "post": { + "tags": [ + "v1" + ], + "summary": "Creates a edge-native cloud config's machine pool", + "operationId": "v1CloudConfigsEdgeNativeMachinePoolCreate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1EdgeNativeMachinePoolConfigEntity" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster's cloud config uid", + "name": "configUid", + "in": "path", + "required": true + } + ] + }, + "/v1/cloudconfigs/edge-native/{configUid}/machinePools/{machinePoolName}": { + "put": { + "tags": [ + "v1" + ], + "summary": "Updates the specified edge-native cloud config's machine pool", + "operationId": "v1CloudConfigsEdgeNativeMachinePoolUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1EdgeNativeMachinePoolConfigEntity" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "delete": { + "tags": [ + "v1" + ], + "summary": "Deletes the specified machine pool", + "operationId": "v1CloudConfigsEdgeNativeMachinePoolDelete", + "responses": { + "204": { + "description": "The resource was deleted successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster's cloud config uid", + "name": "configUid", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Machine pool name", + "name": "machinePoolName", + "in": "path", + "required": true + } + ] + }, + "/v1/cloudconfigs/edge-native/{configUid}/machinePools/{machinePoolName}/machines": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves a list of edge-native machines", + "operationId": "v1CloudConfigsEdgeNativePoolMachinesList", + "responses": { + "200": { + "description": "An array of edge-native machine items", + "schema": { + "$ref": "#/definitions/v1EdgeNativeMachines" + } + } + } + }, + "post": { + "tags": [ + "v1" + ], + "summary": "Adds the edge-native machine to cloud config's machine pool", + "operationId": "v1CloudConfigsEdgeNativePoolMachinesAdd", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1EdgeNativeMachine" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster's cloud config uid", + "name": "configUid", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Machine pool name", + "name": "machinePoolName", + "in": "path", + "required": true + } + ] + }, + "/v1/cloudconfigs/edge-native/{configUid}/machinePools/{machinePoolName}/machines/{machineUid}": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the specified edge-native machine", + "operationId": "v1CloudConfigsEdgeNativePoolMachinesUidGet", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1EdgeNativeMachine" + } + } + } + }, + "put": { + "tags": [ + "v1" + ], + "summary": "Updates the specified machine to cloud config's machine pool", + "operationId": "v1CloudConfigsEdgeNativePoolMachinesUidUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1EdgeNativeMachine" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "delete": { + "tags": [ + "v1" + ], + "summary": "Deletes the specified edge-native machine", + "operationId": "v1CloudConfigsEdgeNativePoolMachinesUidDelete", + "responses": { + "204": { + "description": "The resource was deleted successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster's cloud config uid", + "name": "configUid", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Machine pool name", + "name": "machinePoolName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Machine uid", + "name": "machineUid", + "in": "path", + "required": true + } + ] + }, + "/v1/cloudconfigs/eks/{configUid}": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the specified EKS cloud config", + "operationId": "v1CloudConfigsEksGet", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1EksCloudConfig" + } + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster's cloud config uid", + "name": "configUid", + "in": "path", + "required": true + } + ] + }, + "/v1/cloudconfigs/eks/{configUid}/clusterConfig": { + "put": { + "tags": [ + "v1" + ], + "summary": "Updates the cluster configuration information", + "operationId": "v1CloudConfigsEksUidClusterConfig", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1EksCloudClusterConfigEntity" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster's cloud config uid", + "name": "configUid", + "in": "path", + "required": true + } + ] + }, + "/v1/cloudconfigs/eks/{configUid}/fargateProfiles": { + "put": { + "tags": [ + "v1" + ], + "summary": "Updates EKS cloud config's fargate profiles", + "operationId": "v1CloudConfigsEksUidFargateProfilesUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1EksFargateProfiles" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster's cloud config uid", + "name": "configUid", + "in": "path", + "required": true + } + ] + }, + "/v1/cloudconfigs/eks/{configUid}/machinePools": { + "post": { + "tags": [ + "v1" + ], + "summary": "Creates an EKS cloud config's machine pool", + "operationId": "v1CloudConfigsEksMachinePoolCreate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1EksMachinePoolConfigEntity" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster's cloud config uid", + "name": "configUid", + "in": "path", + "required": true + } + ] + }, + "/v1/cloudconfigs/eks/{configUid}/machinePools/{machinePoolName}": { + "put": { + "tags": [ + "v1" + ], + "summary": "Updates the specified EKS cloud config's machine pool", + "operationId": "v1CloudConfigsEksMachinePoolUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1EksMachinePoolConfigEntity" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "delete": { + "tags": [ + "v1" + ], + "summary": "Deletes the specified machine pool", + "operationId": "v1CloudConfigsEksMachinePoolDelete", + "responses": { + "204": { + "description": "The resource was deleted successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster's cloud config uid", + "name": "configUid", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Machine pool name", + "name": "machinePoolName", + "in": "path", + "required": true + } + ] + }, + "/v1/cloudconfigs/eks/{configUid}/machinePools/{machinePoolName}/machines": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves a list of EKS machines", + "operationId": "v1CloudConfigsEksPoolMachinesList", + "parameters": [ + { + "type": "string", + "description": "Set of fields to be presented in the response with values. The fields are comma separated. Eg: metadata.uid,metadata.name", + "name": "fields", + "in": "query" + }, + { + "type": "string", + "description": "Filters can be combined with AND, OR operators with field path name. Eg: metadata.name=TestServiceANDspec.cloudType=aws\n\nServer will be restricted to certain fields based on the indexed data for each resource.", + "name": "filters", + "in": "query" + }, + { + "type": "string", + "description": "Specify the fields with sort order. 1 indicates ascending and -1 for descending. Eg: orderBy=metadata.name=1,metadata.uid=-1", + "name": "orderBy", + "in": "query" + }, + { + "type": "integer", + "format": "int64", + "default": 50, + "description": "limit is a maximum number of responses to return for a list call. Default and maximum value of the limit is 50.\nIf more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results.", + "name": "limit", + "in": "query" + }, + { + "type": "integer", + "format": "int64", + "description": "offset is the next index number from which the response will start. The response offset value can be used along with continue token for the pagination.", + "name": "offset", + "in": "query" + }, + { + "type": "string", + "description": "continue token to paginate the subsequent data items", + "name": "continue", + "in": "query" + } + ], + "responses": { + "200": { + "description": "An array of EKS machine items", + "schema": { + "$ref": "#/definitions/v1AwsMachines" + } + } + } + }, + "post": { + "tags": [ + "v1" + ], + "summary": "Adds the machine to cloud config's machine pool", + "operationId": "v1CloudConfigsEksPoolMachinesAdd", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1AwsMachine" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster's cloud config uid", + "name": "configUid", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Machine pool name", + "name": "machinePoolName", + "in": "path", + "required": true + } + ] + }, + "/v1/cloudconfigs/eks/{configUid}/machinePools/{machinePoolName}/machines/{machineUid}": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the specified EKS machine", + "operationId": "v1CloudConfigsEksPoolMachinesUidGet", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1AwsMachine" + } + } + } + }, + "put": { + "tags": [ + "v1" + ], + "summary": "Updates the specified machine to the cloud config's machine pool", + "operationId": "v1CloudConfigsEksPoolMachinesUidUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1AwsMachine" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "delete": { + "tags": [ + "v1" + ], + "summary": "Deletes the specified EKS machine", + "operationId": "v1CloudConfigsEksPoolMachinesUidDelete", + "responses": { + "204": { + "description": "The resource was deleted successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster's cloud config uid", + "name": "configUid", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Machine pool name", + "name": "machinePoolName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Machine uid", + "name": "machineUid", + "in": "path", + "required": true + } + ] + }, + "/v1/cloudconfigs/gcp/{configUid}": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the specified GCP cloud config", + "operationId": "v1CloudConfigsGcpGet", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1GcpCloudConfig" + } + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster's cloud config uid", + "name": "configUid", + "in": "path", + "required": true + } + ] + }, + "/v1/cloudconfigs/gcp/{configUid}/clusterConfig": { + "put": { + "tags": [ + "v1" + ], + "summary": "Updates the cluster configuration information", + "operationId": "v1CloudConfigsGcpUidClusterConfig", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1GcpCloudClusterConfigEntity" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster's cloud config uid", + "name": "configUid", + "in": "path", + "required": true + } + ] + }, + "/v1/cloudconfigs/gcp/{configUid}/machinePools": { + "post": { + "tags": [ + "v1" + ], + "summary": "Creates a Gcp cloud config's machine pool", + "operationId": "v1CloudConfigsGcpMachinePoolCreate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1GcpMachinePoolConfigEntity" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster's cloud config uid", + "name": "configUid", + "in": "path", + "required": true + } + ] + }, + "/v1/cloudconfigs/gcp/{configUid}/machinePools/{machinePoolName}": { + "put": { + "tags": [ + "v1" + ], + "summary": "Updates the specified GCP cloud config's machine pool", + "operationId": "v1CloudConfigsGcpMachinePoolUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1GcpMachinePoolConfigEntity" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "delete": { + "tags": [ + "v1" + ], + "summary": "Deletes the specified machine pool", + "operationId": "v1CloudConfigsGcpMachinePoolDelete", + "responses": { + "204": { + "description": "The resource was deleted successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster's cloud config uid", + "name": "configUid", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Machine pool name", + "name": "machinePoolName", + "in": "path", + "required": true + } + ] + }, + "/v1/cloudconfigs/gcp/{configUid}/machinePools/{machinePoolName}/machines": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves a list of GCP machines", + "operationId": "v1CloudConfigsGcpPoolMachinesList", + "parameters": [ + { + "type": "string", + "description": "Set of fields to be presented in the response with values. The fields are comma separated. Eg: metadata.uid,metadata.name", + "name": "fields", + "in": "query" + }, + { + "type": "string", + "description": "Filters can be combined with AND, OR operators with field path name. Eg: metadata.name=TestServiceANDspec.cloudType=aws\n\nServer will be restricted to certain fields based on the indexed data for each resource.", + "name": "filters", + "in": "query" + }, + { + "type": "string", + "description": "Specify the fields with sort order. 1 indicates ascending and -1 for descending. Eg: orderBy=metadata.name=1,metadata.uid=-1", + "name": "orderBy", + "in": "query" + }, + { + "type": "integer", + "format": "int64", + "default": 50, + "description": "limit is a maximum number of responses to return for a list call. Default and maximum value of the limit is 50.\nIf more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results.", + "name": "limit", + "in": "query" + }, + { + "type": "integer", + "format": "int64", + "description": "offset is the next index number from which the response will start. The response offset value can be used along with continue token for the pagination.", + "name": "offset", + "in": "query" + }, + { + "type": "string", + "description": "continue token to paginate the subsequent data items", + "name": "continue", + "in": "query" + } + ], + "responses": { + "200": { + "description": "An array of GCP machine items", + "schema": { + "$ref": "#/definitions/v1GcpMachines" + } + } + } + }, + "post": { + "tags": [ + "v1" + ], + "summary": "Adds the machine to cloud config's machine pool", + "operationId": "v1CloudConfigsGcpPoolMachinesAdd", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1GcpMachine" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster's cloud config uid", + "name": "configUid", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Machine pool name", + "name": "machinePoolName", + "in": "path", + "required": true + } + ] + }, + "/v1/cloudconfigs/gcp/{configUid}/machinePools/{machinePoolName}/machines/{machineUid}": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the specified GCP machine", + "operationId": "v1CloudConfigsGcpPoolMachinesUidGet", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1GcpMachine" + } + } + } + }, + "put": { + "tags": [ + "v1" + ], + "summary": "Updates the specified machine to the cloud config's machine pool", + "operationId": "v1CloudConfigsGcpPoolMachinesUidUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1GcpMachine" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "delete": { + "tags": [ + "v1" + ], + "summary": "Deletes the specified GCP machine", + "operationId": "v1CloudConfigsGcpPoolMachinesUidDelete", + "responses": { + "204": { + "description": "The resource was deleted successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster's cloud config uid", + "name": "configUid", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Machine pool name", + "name": "machinePoolName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Machine uid", + "name": "machineUid", + "in": "path", + "required": true + } + ] + }, + "/v1/cloudconfigs/generic/{configUid}": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the specified Generic cloud config", + "operationId": "v1CloudConfigsGenericGet", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1GenericCloudConfig" + } + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster's cloud config uid", + "name": "configUid", + "in": "path", + "required": true + } + ] + }, + "/v1/cloudconfigs/generic/{configUid}/clusterConfig": { + "put": { + "tags": [ + "v1" + ], + "summary": "Updates the cluster configuration information", + "operationId": "v1CloudConfigsGenericUidClusterConfig", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1GenericCloudClusterConfigEntity" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster's cloud config uid", + "name": "configUid", + "in": "path", + "required": true + } + ] + }, + "/v1/cloudconfigs/generic/{configUid}/machinePools": { + "post": { + "tags": [ + "v1" + ], + "summary": "Creates a generic cloud config's machine pool", + "operationId": "v1CloudConfigsGenericMachinePoolCreate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1GenericMachinePoolConfigEntity" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster's cloud config uid", + "name": "configUid", + "in": "path", + "required": true + } + ] + }, + "/v1/cloudconfigs/generic/{configUid}/machinePools/{machinePoolName}": { + "put": { + "tags": [ + "v1" + ], + "summary": "Updates the specified generic cloud config's machine pool", + "operationId": "v1CloudConfigsGenericMachinePoolUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1GenericMachinePoolConfigEntity" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "delete": { + "tags": [ + "v1" + ], + "summary": "Deletes the specified machine pool", + "operationId": "v1CloudConfigsGenericMachinePoolDelete", + "responses": { + "204": { + "description": "The resource was deleted successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster's cloud config uid", + "name": "configUid", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Machine pool name", + "name": "machinePoolName", + "in": "path", + "required": true + } + ] + }, + "/v1/cloudconfigs/generic/{configUid}/machinePools/{machinePoolName}/machines": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves a list of Generic machines", + "operationId": "v1CloudConfigsGenericPoolMachinesList", + "parameters": [ + { + "type": "string", + "description": "Set of fields to be presented in the response with values. The fields are comma separated. Eg: metadata.uid,metadata.name", + "name": "fields", + "in": "query" + }, + { + "type": "string", + "description": "Filters can be combined with AND, OR operators with field path name. Eg: metadata.name=TestServiceANDspec.cloudType=aws\n\nServer will be restricted to certain fields based on the indexed data for each resource.", + "name": "filters", + "in": "query" + }, + { + "type": "string", + "description": "Specify the fields with sort order. 1 indicates ascending and -1 for descending. Eg: orderBy=metadata.name=1,metadata.uid=-1", + "name": "orderBy", + "in": "query" + }, + { + "type": "integer", + "format": "int64", + "default": 50, + "description": "limit is a maximum number of responses to return for a list call. Default and maximum value of the limit is 50.\nIf more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results.", + "name": "limit", + "in": "query" + }, + { + "type": "integer", + "format": "int64", + "description": "offset is the next index number from which the response will start. The response offset value can be used along with continue token for the pagination.", + "name": "offset", + "in": "query" + }, + { + "type": "string", + "description": "continue token to paginate the subsequent data items", + "name": "continue", + "in": "query" + } + ], + "responses": { + "200": { + "description": "An array of Generic machine items", + "schema": { + "$ref": "#/definitions/v1GenericMachines" + } + } + } + }, + "post": { + "tags": [ + "v1" + ], + "summary": "Adds the machine to cloud config's machine pool", + "operationId": "v1CloudConfigsGenericPoolMachinesAdd", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1GenericMachine" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster's cloud config uid", + "name": "configUid", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Machine pool name", + "name": "machinePoolName", + "in": "path", + "required": true + } + ] + }, + "/v1/cloudconfigs/generic/{configUid}/machinePools/{machinePoolName}/machines/{machineUid}": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the specified generic machine", + "operationId": "v1CloudConfigsGenericPoolMachinesUidGet", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1GenericMachine" + } + } + } + }, + "put": { + "tags": [ + "v1" + ], + "summary": "Updates the specified machine to the cloud config's machine pool", + "operationId": "v1CloudConfigsGenericPoolMachinesUidUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1GenericMachine" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "delete": { + "tags": [ + "v1" + ], + "summary": "Deletes the specified machine", + "operationId": "v1CloudConfigsGenericPoolMachinesUidDelete", + "responses": { + "204": { + "description": "The resource was deleted successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster's cloud config uid", + "name": "configUid", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Machine pool name", + "name": "machinePoolName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Machine uid", + "name": "machineUid", + "in": "path", + "required": true + } + ] + }, + "/v1/cloudconfigs/gke/{configUid}": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the specified GKE cloud config", + "operationId": "v1CloudConfigsGkeGet", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1GcpCloudConfig" + } + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster's cloud config uid", + "name": "configUid", + "in": "path", + "required": true + } + ] + }, + "/v1/cloudconfigs/gke/{configUid}/clusterConfig": { + "put": { + "tags": [ + "v1" + ], + "summary": "Updates the cluster configuration information", + "operationId": "v1CloudConfigsGkeUidClusterConfig", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1GcpCloudClusterConfigEntity" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster's cloud config uid", + "name": "configUid", + "in": "path", + "required": true + } + ] + }, + "/v1/cloudconfigs/gke/{configUid}/machinePools": { + "post": { + "tags": [ + "v1" + ], + "summary": "Creates an GKE cloud config's machine pool", + "operationId": "v1CloudConfigsGkeMachinePoolCreate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1GcpMachinePoolConfigEntity" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster's cloud config uid", + "name": "configUid", + "in": "path", + "required": true + } + ] + }, + "/v1/cloudconfigs/gke/{configUid}/machinePools/{machinePoolName}": { + "put": { + "tags": [ + "v1" + ], + "summary": "Updates the specified GKE cloud config's machine pool", + "operationId": "v1CloudConfigsGkeMachinePoolUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1GcpMachinePoolConfigEntity" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "delete": { + "tags": [ + "v1" + ], + "summary": "Deletes the specified machine pool", + "operationId": "v1CloudConfigsGkeMachinePoolDelete", + "responses": { + "204": { + "description": "The resource was deleted successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster's cloud config uid", + "name": "configUid", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Machine pool name", + "name": "machinePoolName", + "in": "path", + "required": true + } + ] + }, + "/v1/cloudconfigs/gke/{configUid}/machinePools/{machinePoolName}/machines": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves a list of GKE machines", + "operationId": "v1CloudConfigsGkePoolMachinesList", + "parameters": [ + { + "type": "string", + "description": "Set of fields to be presented in the response with values. The fields are comma separated. Eg: metadata.uid,metadata.name", + "name": "fields", + "in": "query" + }, + { + "type": "string", + "description": "Filters can be combined with AND, OR operators with field path name. Eg: metadata.name=TestServiceANDspec.cloudType=aws\n\nServer will be restricted to certain fields based on the indexed data for each resource.", + "name": "filters", + "in": "query" + }, + { + "type": "string", + "description": "Specify the fields with sort order. 1 indicates ascending and -1 for descending. Eg: orderBy=metadata.name=1,metadata.uid=-1", + "name": "orderBy", + "in": "query" + }, + { + "type": "integer", + "format": "int64", + "default": 50, + "description": "limit is a maximum number of responses to return for a list call. Default and maximum value of the limit is 50.\nIf more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results.", + "name": "limit", + "in": "query" + }, + { + "type": "integer", + "format": "int64", + "description": "offset is the next index number from which the response will start. The response offset value can be used along with continue token for the pagination.", + "name": "offset", + "in": "query" + }, + { + "type": "string", + "description": "continue token to paginate the subsequent data items", + "name": "continue", + "in": "query" + } + ], + "responses": { + "200": { + "description": "An array of GKE machine items", + "schema": { + "$ref": "#/definitions/v1GcpMachines" + } + } + } + }, + "post": { + "tags": [ + "v1" + ], + "summary": "Adds the machine to cloud config's machine pool", + "operationId": "v1CloudConfigsGkePoolMachinesAdd", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1GcpMachine" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster's cloud config uid", + "name": "configUid", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Machine pool name", + "name": "machinePoolName", + "in": "path", + "required": true + } + ] + }, + "/v1/cloudconfigs/gke/{configUid}/machinePools/{machinePoolName}/machines/{machineUid}": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the specified GKE machine", + "operationId": "v1CloudConfigsGkePoolMachinesUidGet", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1GcpMachine" + } + } + } + }, + "put": { + "tags": [ + "v1" + ], + "summary": "Updates the specified machine to the cloud config's machine pool", + "operationId": "v1CloudConfigsGkePoolMachinesUidUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1GcpMachine" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "delete": { + "tags": [ + "v1" + ], + "summary": "Deletes the specified Gcp machine", + "operationId": "v1CloudConfigsGkePoolMachinesUidDelete", + "responses": { + "204": { + "description": "The resource was deleted successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster's cloud config uid", + "name": "configUid", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Machine pool name", + "name": "machinePoolName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Machine uid", + "name": "machineUid", + "in": "path", + "required": true + } + ] + }, + "/v1/cloudconfigs/maas/{configUid}": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the specified Maas cloud config", + "operationId": "v1CloudConfigsMaasGet", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1MaasCloudConfig" + } + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster's cloud config uid", + "name": "configUid", + "in": "path", + "required": true + } + ] + }, + "/v1/cloudconfigs/maas/{configUid}/clusterConfig": { + "put": { + "tags": [ + "v1" + ], + "summary": "Updates the cluster configuration information", + "operationId": "v1CloudConfigsMaasUidClusterConfig", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1MaasCloudClusterConfigEntity" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster's cloud config uid", + "name": "configUid", + "in": "path", + "required": true + } + ] + }, + "/v1/cloudconfigs/maas/{configUid}/machinePools": { + "post": { + "tags": [ + "v1" + ], + "summary": "Creates an Maas cloud config's machine pool", + "operationId": "v1CloudConfigsMaasMachinePoolCreate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1MaasMachinePoolConfigEntity" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster's cloud config uid", + "name": "configUid", + "in": "path", + "required": true + } + ] + }, + "/v1/cloudconfigs/maas/{configUid}/machinePools/{machinePoolName}": { + "put": { + "tags": [ + "v1" + ], + "summary": "Updates the specified Maas cloud config's machine pool", + "operationId": "v1CloudConfigsMaasMachinePoolUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1MaasMachinePoolConfigEntity" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "delete": { + "tags": [ + "v1" + ], + "summary": "Deletes the specified machine pool", + "operationId": "v1CloudConfigsMaasMachinePoolDelete", + "responses": { + "204": { + "description": "The resource was deleted successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster's cloud config uid", + "name": "configUid", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Machine pool name", + "name": "machinePoolName", + "in": "path", + "required": true + } + ] + }, + "/v1/cloudconfigs/maas/{configUid}/machinePools/{machinePoolName}/machines": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves a list of Maas machines", + "operationId": "v1CloudConfigsMaasPoolMachinesList", + "parameters": [ + { + "type": "string", + "description": "Set of fields to be presented in the response with values. The fields are comma separated. Eg: metadata.uid,metadata.name", + "name": "fields", + "in": "query" + }, + { + "type": "string", + "description": "Filters can be combined with AND, OR operators with field path name. Eg: metadata.name=TestServiceANDspec.cloudType=aws\n\nServer will be restricted to certain fields based on the indexed data for each resource.", + "name": "filters", + "in": "query" + }, + { + "type": "string", + "description": "Specify the fields with sort order. 1 indicates ascending and -1 for descending. Eg: orderBy=metadata.name=1,metadata.uid=-1", + "name": "orderBy", + "in": "query" + }, + { + "type": "integer", + "format": "int64", + "default": 50, + "description": "limit is a maximum number of responses to return for a list call. Default and maximum value of the limit is 50.\nIf more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results.", + "name": "limit", + "in": "query" + }, + { + "type": "integer", + "format": "int64", + "description": "offset is the next index number from which the response will start. The response offset value can be used along with continue token for the pagination.", + "name": "offset", + "in": "query" + }, + { + "type": "string", + "description": "continue token to paginate the subsequent data items", + "name": "continue", + "in": "query" + } + ], + "responses": { + "200": { + "description": "An array of Maas machine items", + "schema": { + "$ref": "#/definitions/v1MaasMachines" + } + } + } + }, + "post": { + "tags": [ + "v1" + ], + "summary": "Adds the machine to cloud config's machine pool", + "operationId": "v1CloudConfigsMaasPoolMachinesAdd", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1MaasMachine" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster's cloud config uid", + "name": "configUid", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Machine pool name", + "name": "machinePoolName", + "in": "path", + "required": true + } + ] + }, + "/v1/cloudconfigs/maas/{configUid}/machinePools/{machinePoolName}/machines/{machineUid}": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the specified Maas machine", + "operationId": "v1CloudConfigsMaasPoolMachinesUidGet", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1MaasMachine" + } + } + } + }, + "put": { + "tags": [ + "v1" + ], + "summary": "Updates the specified machine to the cloud config's machine pool", + "operationId": "v1CloudConfigsMaasPoolMachinesUidUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1MaasMachine" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "delete": { + "tags": [ + "v1" + ], + "summary": "Deletes the specified Maas machine", + "operationId": "v1CloudConfigsMaasPoolMachinesUidDelete", + "responses": { + "204": { + "description": "The resource was deleted successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster's cloud config uid", + "name": "configUid", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Machine pool name", + "name": "machinePoolName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Machine uid", + "name": "machineUid", + "in": "path", + "required": true + } + ] + }, + "/v1/cloudconfigs/openstack/{configUid}": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the specified OpenStack cloud config", + "operationId": "v1CloudConfigsOpenStackGet", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1OpenStackCloudConfig" + } + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster's cloud config uid", + "name": "configUid", + "in": "path", + "required": true + } + ] + }, + "/v1/cloudconfigs/openstack/{configUid}/clusterConfig": { + "put": { + "tags": [ + "v1" + ], + "summary": "Updates the cluster configuration information", + "operationId": "v1CloudConfigsOpenStackUidClusterConfig", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1OpenStackCloudClusterConfigEntity" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster's cloud config uid", + "name": "configUid", + "in": "path", + "required": true + } + ] + }, + "/v1/cloudconfigs/openstack/{configUid}/machinePools": { + "post": { + "tags": [ + "v1" + ], + "summary": "Creates a OpenStack cloud config's machine pool", + "operationId": "v1CloudConfigsOpenStackMachinePoolCreate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1OpenStackMachinePoolConfigEntity" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster's cloud config uid", + "name": "configUid", + "in": "path", + "required": true + } + ] + }, + "/v1/cloudconfigs/openstack/{configUid}/machinePools/{machinePoolName}": { + "put": { + "tags": [ + "v1" + ], + "summary": "Updates the specified OpenStack cloud config's machine pool", + "operationId": "v1CloudConfigsOpenStackMachinePoolUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1OpenStackMachinePoolConfigEntity" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "delete": { + "tags": [ + "v1" + ], + "summary": "Deletes the specified machine pool", + "operationId": "v1CloudConfigsOpenStackMachinePoolDelete", + "responses": { + "204": { + "description": "The resource was deleted successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster's cloud config uid", + "name": "configUid", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Machine pool name", + "name": "machinePoolName", + "in": "path", + "required": true + } + ] + }, + "/v1/cloudconfigs/openstack/{configUid}/machinePools/{machinePoolName}/machines": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves a list of OpenStack machines", + "operationId": "v1CloudConfigsOpenStackPoolMachinesList", + "responses": { + "200": { + "description": "An array of OpenStack machine items", + "schema": { + "$ref": "#/definitions/v1OpenStackMachines" + } + } + } + }, + "post": { + "tags": [ + "v1" + ], + "summary": "Adds the OpenStack machine to cloud config's machine pool", + "operationId": "v1CloudConfigsOpenStackPoolMachinesAdd", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1OpenStackMachine" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster's cloud config uid", + "name": "configUid", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Machine pool name", + "name": "machinePoolName", + "in": "path", + "required": true + } + ] + }, + "/v1/cloudconfigs/openstack/{configUid}/machinePools/{machinePoolName}/machines/{machineUid}": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the specified OpenStack machine", + "operationId": "v1CloudConfigsOpenStackPoolMachinesUidGet", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1OpenStackMachine" + } + } + } + }, + "put": { + "tags": [ + "v1" + ], + "summary": "Updates the specified machine to cloud config's machine pool", + "operationId": "v1CloudConfigsOpenStackPoolMachinesUidUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1OpenStackMachine" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "delete": { + "tags": [ + "v1" + ], + "summary": "Deletes the specified OpenStack machine", + "operationId": "v1CloudConfigsOpenStackPoolMachinesUidDelete", + "responses": { + "204": { + "description": "The resource was deleted successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster's cloud config uid", + "name": "configUid", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Machine pool name", + "name": "machinePoolName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Machine uid", + "name": "machineUid", + "in": "path", + "required": true + } + ] + }, + "/v1/cloudconfigs/tke/{configUid}": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the specified TKE cloud config", + "operationId": "v1CloudConfigsTkeGet", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1TencentCloudConfig" + } + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster's cloud config uid", + "name": "configUid", + "in": "path", + "required": true + } + ] + }, + "/v1/cloudconfigs/tke/{configUid}/clusterConfig": { + "put": { + "tags": [ + "v1" + ], + "summary": "Updates the cluster configuration information", + "operationId": "v1CloudConfigsTkeUidClusterConfig", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1TencentCloudClusterConfigEntity" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster's cloud config uid", + "name": "configUid", + "in": "path", + "required": true + } + ] + }, + "/v1/cloudconfigs/tke/{configUid}/machinePools": { + "post": { + "tags": [ + "v1" + ], + "summary": "Creates an TKE cloud config's machine pool", + "operationId": "v1CloudConfigsTkeMachinePoolCreate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1TencentMachinePoolConfigEntity" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster's cloud config uid", + "name": "configUid", + "in": "path", + "required": true + } + ] + }, + "/v1/cloudconfigs/tke/{configUid}/machinePools/{machinePoolName}": { + "put": { + "tags": [ + "v1" + ], + "summary": "Updates the specified TKE cloud config's machine pool", + "operationId": "v1CloudConfigsTkeMachinePoolUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1TencentMachinePoolConfigEntity" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "delete": { + "tags": [ + "v1" + ], + "summary": "Deletes the specified machine pool", + "operationId": "v1CloudConfigsTkeMachinePoolDelete", + "responses": { + "204": { + "description": "The resource was deleted successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster's cloud config uid", + "name": "configUid", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Machine pool name", + "name": "machinePoolName", + "in": "path", + "required": true + } + ] + }, + "/v1/cloudconfigs/tke/{configUid}/machinePools/{machinePoolName}/machines": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves a list of TKE machines", + "operationId": "v1CloudConfigsTkePoolMachinesList", + "parameters": [ + { + "type": "string", + "description": "Set of fields to be presented in the response with values. The fields are comma separated. Eg: metadata.uid,metadata.name", + "name": "fields", + "in": "query" + }, + { + "type": "string", + "description": "Filters can be combined with AND, OR operators with field path name. Eg: metadata.name=TestServiceANDspec.cloudType=aws\n\nServer will be restricted to certain fields based on the indexed data for each resource.", + "name": "filters", + "in": "query" + }, + { + "type": "string", + "description": "Specify the fields with sort order. 1 indicates ascending and -1 for descending. Eg: orderBy=metadata.name=1,metadata.uid=-1", + "name": "orderBy", + "in": "query" + }, + { + "type": "integer", + "format": "int64", + "default": 50, + "description": "limit is a maximum number of responses to return for a list call. Default and maximum value of the limit is 50.\nIf more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results.", + "name": "limit", + "in": "query" + }, + { + "type": "integer", + "format": "int64", + "description": "offset is the next index number from which the response will start. The response offset value can be used along with continue token for the pagination.", + "name": "offset", + "in": "query" + }, + { + "type": "string", + "description": "continue token to paginate the subsequent data items", + "name": "continue", + "in": "query" + } + ], + "responses": { + "200": { + "description": "An array of TKE machine items", + "schema": { + "$ref": "#/definitions/v1TencentMachines" + } + } + } + }, + "post": { + "tags": [ + "v1" + ], + "summary": "Adds the machine to cloud config's machine pool", + "operationId": "v1CloudConfigsTkePoolMachinesAdd", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1TencentMachine" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster's cloud config uid", + "name": "configUid", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Machine pool name", + "name": "machinePoolName", + "in": "path", + "required": true + } + ] + }, + "/v1/cloudconfigs/tke/{configUid}/machinePools/{machinePoolName}/machines/{machineUid}": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the specified Tke machine", + "operationId": "v1CloudConfigsTkePoolMachinesUidGet", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1TencentMachine" + } + } + } + }, + "put": { + "tags": [ + "v1" + ], + "summary": "Updates the specified machine to the cloud config's machine pool", + "operationId": "v1CloudConfigsTkePoolMachinesUidUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1TencentMachine" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "delete": { + "tags": [ + "v1" + ], + "summary": "Deletes the specified Tencent machine", + "operationId": "v1CloudConfigsTkePoolMachinesUidDelete", + "responses": { + "204": { + "description": "The resource was deleted successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster's cloud config uid", + "name": "configUid", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Machine pool name", + "name": "machinePoolName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Machine uid", + "name": "machineUid", + "in": "path", + "required": true + } + ] + }, + "/v1/cloudconfigs/virtual/{configUid}": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the specified Virtual cloud config", + "operationId": "v1CloudConfigsVirtualGet", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1VirtualCloudConfig" + } + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster's cloud config uid", + "name": "configUid", + "in": "path", + "required": true + } + ] + }, + "/v1/cloudconfigs/virtual/{configUid}/clusterConfig": { + "put": { + "tags": [ + "v1" + ], + "summary": "Updates the cluster configuration information", + "operationId": "v1CloudConfigsVirtualUidClusterConfig", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1VirtualCloudClusterConfigEntity" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster's cloud config uid", + "name": "configUid", + "in": "path", + "required": true + } + ] + }, + "/v1/cloudconfigs/virtual/{configUid}/machinePools": { + "post": { + "tags": [ + "v1" + ], + "summary": "Creates a virtual cloud config's machine pool", + "operationId": "v1CloudConfigsVirtualMachinePoolCreate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1VirtualMachinePoolConfigEntity" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster's cloud config uid", + "name": "configUid", + "in": "path", + "required": true + } + ] + }, + "/v1/cloudconfigs/virtual/{configUid}/machinePools/{machinePoolName}": { + "put": { + "tags": [ + "v1" + ], + "summary": "Updates the specified virtual cloud config's machine pool", + "operationId": "v1CloudConfigsVirtualMachinePoolUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1VirtualMachinePoolConfigEntity" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "delete": { + "tags": [ + "v1" + ], + "summary": "Deletes the specified machine pool", + "operationId": "v1CloudConfigsVirtualMachinePoolDelete", + "responses": { + "204": { + "description": "The resource was deleted successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster's cloud config uid", + "name": "configUid", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Machine pool name", + "name": "machinePoolName", + "in": "path", + "required": true + } + ] + }, + "/v1/cloudconfigs/virtual/{configUid}/machinePools/{machinePoolName}/machines": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves a list of virtual machines", + "operationId": "v1CloudConfigsVirtualPoolMachinesList", + "parameters": [ + { + "type": "string", + "description": "Set of fields to be presented in the response with values. The fields are comma separated. Eg: metadata.uid,metadata.name", + "name": "fields", + "in": "query" + }, + { + "type": "string", + "description": "Filters can be combined with AND, OR operators with field path name. Eg: metadata.name=TestServiceANDspec.cloudType=aws\n\nServer will be restricted to certain fields based on the indexed data for each resource.", + "name": "filters", + "in": "query" + }, + { + "type": "string", + "description": "Specify the fields with sort order. 1 indicates ascending and -1 for descending. Eg: orderBy=metadata.name=1,metadata.uid=-1", + "name": "orderBy", + "in": "query" + }, + { + "type": "integer", + "format": "int64", + "default": 50, + "description": "limit is a maximum number of responses to return for a list call. Default and maximum value of the limit is 50.\nIf more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results.", + "name": "limit", + "in": "query" + }, + { + "type": "integer", + "format": "int64", + "description": "offset is the next index number from which the response will start. The response offset value can be used along with continue token for the pagination.", + "name": "offset", + "in": "query" + }, + { + "type": "string", + "description": "continue token to paginate the subsequent data items", + "name": "continue", + "in": "query" + } + ], + "responses": { + "200": { + "description": "An array of virtual machine items", + "schema": { + "$ref": "#/definitions/v1VirtualMachines" + } + } + } + }, + "post": { + "tags": [ + "v1" + ], + "summary": "Adds the machine to cloud config's machine pool", + "operationId": "v1CloudConfigsVirtualPoolMachinesAdd", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1VirtualMachine" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster's cloud config uid", + "name": "configUid", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Machine pool name", + "name": "machinePoolName", + "in": "path", + "required": true + } + ] + }, + "/v1/cloudconfigs/virtual/{configUid}/machinePools/{machinePoolName}/machines/{machineUid}": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the specified virtual machine", + "operationId": "v1CloudConfigsVirtualPoolMachinesUidGet", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1VirtualMachine" + } + } + } + }, + "put": { + "tags": [ + "v1" + ], + "summary": "Updates the specified machine to the cloud config's machine pool", + "operationId": "v1CloudConfigsVirtualPoolMachinesUidUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1VirtualMachine" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "delete": { + "tags": [ + "v1" + ], + "summary": "Deletes the specified virtual machine", + "operationId": "v1CloudConfigsVirtualPoolMachinesUidDelete", + "responses": { + "204": { + "description": "The resource was deleted successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster's cloud config uid", + "name": "configUid", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Machine pool name", + "name": "machinePoolName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Machine uid", + "name": "machineUid", + "in": "path", + "required": true + } + ] + }, + "/v1/cloudconfigs/virtual/{configUid}/resize": { + "put": { + "tags": [ + "v1" + ], + "summary": "Updates and resizes the virtual cluster", + "operationId": "v1CloudConfigsVirtualUidUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1VirtualClusterResize" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Specify virtual cloud config uid", + "name": "configUid", + "in": "path", + "required": true + } + ] + }, + "/v1/cloudconfigs/vsphere/{configUid}": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the specified vSphere cloud config", + "operationId": "v1CloudConfigsVsphereGet", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1VsphereCloudConfig" + } + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster's cloud config uid", + "name": "configUid", + "in": "path", + "required": true + } + ] + }, + "/v1/cloudconfigs/vsphere/{configUid}/clusterConfig": { + "put": { + "tags": [ + "v1" + ], + "summary": "Updates the cluster configuration information", + "operationId": "v1CloudConfigsVsphereUidClusterConfig", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1VsphereCloudClusterConfigEntity" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster's cloud config uid", + "name": "configUid", + "in": "path", + "required": true + } + ] + }, + "/v1/cloudconfigs/vsphere/{configUid}/machinePools": { + "post": { + "tags": [ + "v1" + ], + "summary": "Creates a vSphere cloud config's machine pool", + "operationId": "v1CloudConfigsVsphereMachinePoolCreate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1VsphereMachinePoolConfigEntity" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster's cloud config uid", + "name": "configUid", + "in": "path", + "required": true + } + ] + }, + "/v1/cloudconfigs/vsphere/{configUid}/machinePools/{machinePoolName}": { + "put": { + "tags": [ + "v1" + ], + "summary": "Updates the specified vSphere cloud config's machine pool", + "operationId": "v1CloudConfigsVsphereMachinePoolUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1VsphereMachinePoolConfigEntity" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "delete": { + "tags": [ + "v1" + ], + "summary": "Deletes the specified machine pool", + "operationId": "v1CloudConfigsVsphereMachinePoolDelete", + "responses": { + "204": { + "description": "The resource was deleted successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster's cloud config uid", + "name": "configUid", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Machine pool name", + "name": "machinePoolName", + "in": "path", + "required": true + } + ] + }, + "/v1/cloudconfigs/vsphere/{configUid}/machinePools/{machinePoolName}/machines": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves a list of vSphere machines", + "operationId": "v1CloudConfigsVspherePoolMachinesList", + "parameters": [ + { + "type": "string", + "description": "Set of fields to be presented in the response with values. The fields are comma separated. Eg: metadata.uid,metadata.name", + "name": "fields", + "in": "query" + }, + { + "type": "string", + "description": "Filters can be combined with AND, OR operators with field path name. Eg: metadata.name=TestServiceANDspec.cloudType=aws\n\nServer will be restricted to certain fields based on the indexed data for each resource.", + "name": "filters", + "in": "query" + }, + { + "type": "string", + "description": "Specify the fields with sort order. 1 indicates ascending and -1 for descending. Eg: orderBy=metadata.name=1,metadata.uid=-1", + "name": "orderBy", + "in": "query" + }, + { + "type": "integer", + "format": "int64", + "default": 50, + "description": "limit is a maximum number of responses to return for a list call. Default and maximum value of the limit is 50.\nIf more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results.", + "name": "limit", + "in": "query" + }, + { + "type": "integer", + "format": "int64", + "description": "offset is the next index number from which the response will start. The response offset value can be used along with continue token for the pagination.", + "name": "offset", + "in": "query" + }, + { + "type": "string", + "description": "continue token to paginate the subsequent data items", + "name": "continue", + "in": "query" + } + ], + "responses": { + "200": { + "description": "An array of vSphere machine items", + "schema": { + "$ref": "#/definitions/v1VsphereMachines" + } + } + } + }, + "post": { + "tags": [ + "v1" + ], + "summary": "Adds the vSphere machine to cloud config's machine pool", + "operationId": "v1CloudConfigsVspherePoolMachinesAdd", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1VsphereMachine" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster's cloud config uid", + "name": "configUid", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Machine pool name", + "name": "machinePoolName", + "in": "path", + "required": true + } + ] + }, + "/v1/cloudconfigs/vsphere/{configUid}/machinePools/{machinePoolName}/machines/{machineUid}": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the specified vSphere machine", + "operationId": "v1CloudConfigsVspherePoolMachinesUidGet", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1VsphereMachine" + } + } + } + }, + "put": { + "tags": [ + "v1" + ], + "summary": "Updates the specified machine to cloud config's machine pool", + "operationId": "v1CloudConfigsVspherePoolMachinesUidUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1VsphereMachine" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "delete": { + "tags": [ + "v1" + ], + "summary": "Deletes the specified vSphere machine", + "operationId": "v1CloudConfigsVspherePoolMachinesUidDelete", + "responses": { + "204": { + "description": "The resource was deleted successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster's cloud config uid", + "name": "configUid", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Machine pool name", + "name": "machinePoolName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Machine uid", + "name": "machineUid", + "in": "path", + "required": true + } + ] + }, + "/v1/cloudconfigs/{cloudType}/{configUid}/machinePools/{machinePoolName}/machines/{machineUid}/maintenance": { + "put": { + "tags": [ + "v1" + ], + "summary": "Updates the specified machine maintenance", + "operationId": "v1CloudConfigsMachinePoolsMachineUidMaintenanceUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1MachineMaintenance" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster's cloud config uid", + "name": "configUid", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Machine pool name", + "name": "machinePoolName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Machine uid", + "name": "machineUid", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Cloud type", + "name": "cloudType", + "in": "path", + "required": true + } + ] + }, + "/v1/cloudconfigs/{cloudType}/{configUid}/machinePools/{machinePoolName}/machines/{machineUid}/maintenance/status": { + "put": { + "tags": [ + "v1" + ], + "summary": "Updates the specified machine maintenance", + "operationId": "v1CloudConfigsMachinePoolsMachineUidMaintenanceStatusUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1MachineMaintenanceStatus" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster's cloud config uid", + "name": "configUid", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Machine pool name", + "name": "machinePoolName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Machine uid", + "name": "machineUid", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Cloud type", + "name": "cloudType", + "in": "path", + "required": true + } + ] + }, + "/v1/cloudconfigs/{configUid}/machinePools/machineUids": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the specified cloud config's machine pools and machine uid", + "operationId": "v1CloudConfigsMachinePoolsMachineUidsGet", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1MachinePoolsMachineUids" + } + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster's cloud config uid", + "name": "configUid", + "in": "path", + "required": true + } + ] + }, + "/v1/clouds/aws/account/sts": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves AWS external id and account id", + "operationId": "V1AwsAccountStsGet", + "parameters": [ + { + "enum": [ + "aws", + "aws-us-gov" + ], + "type": "string", + "default": "aws", + "description": "AWS accounts are scoped to a single partition. Allowed values [aws, aws-us-gov], Default values", + "name": "partition", + "in": "query" + } + ], + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/V1AwsAccountSts" + } + } + } + } + }, + "/v1/clouds/aws/account/validate": { + "post": { + "tags": [ + "v1" + ], + "summary": "Validate the specified AWS account credentials", + "operationId": "V1AwsAccountValidate", + "parameters": [ + { + "description": "Request payload to validate AWS cloud account", + "name": "awsCloudAccount", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1AwsCloudAccount" + } + } + ], + "responses": { + "204": { + "description": "Ok response without content", + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + } + }, + "/v1/clouds/aws/cloudwatch/validate": { + "post": { + "description": "Validates aws cloud watch credentials", + "tags": [ + "v1" + ], + "summary": "validates aws cloud watch credentials", + "operationId": "V1CloudsAwsCloudWatchValidate", + "parameters": [ + { + "description": "Request payload for cloud watch config", + "name": "cloudWatchConfig", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1.CloudWatchConfig" + } + } + ], + "responses": { + "204": { + "description": "Ok response without content", + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + } + }, + "/v1/clouds/aws/cost": { + "post": { + "tags": [ + "v1" + ], + "summary": "Retrieves AWS cloud account usage cost from cost explorer.", + "operationId": "v1AwsCloudCost", + "parameters": [ + { + "description": "Request payload for AWS cloud cost", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1AwsCloudCostSpec" + } + } + ], + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1AwsCloudCostSummary" + } + } + } + } + }, + "/v1/clouds/aws/imageIds/{imageId}/volumeSize": { + "get": { + "description": "Get AWS Volume Size", + "tags": [ + "v1" + ], + "summary": "Get AWS Volume Size", + "operationId": "V1AwsVolumeSizeGet", + "parameters": [ + { + "type": "string", + "description": "Specific AWS Region", + "name": "region", + "in": "query", + "required": true + }, + { + "type": "string", + "description": "Uid for the specific AWS cloud account", + "name": "cloudAccountUid", + "in": "query", + "required": true + }, + { + "type": "string", + "description": "AWS image id", + "name": "imageId", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1AwsVolumeSize" + } + } + } + } + }, + "/v1/clouds/aws/policies": { + "post": { + "tags": [ + "v1" + ], + "summary": "Retrieves a list of AWS policies for the specified account", + "operationId": "V1AwsIamPolicies", + "parameters": [ + { + "description": "Request payload for AWS Cloud Account", + "name": "account", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1AwsCloudAccount" + } + }, + { + "type": "string", + "description": "Uid for the specific AWS cloud account", + "name": "cloudAccountUid", + "in": "query" + } + ], + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1AwsPolicies" + } + } + } + } + }, + "/v1/clouds/aws/policyArns/validate": { + "post": { + "tags": [ + "v1" + ], + "summary": "Validate the aws policy arns validate", + "operationId": "V1AwsPolicyArnsValidate", + "parameters": [ + { + "description": "Request payload to validate AWS policy ARN", + "name": "spec", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1AwsPolicyArnsSpec" + } + }, + { + "type": "string", + "description": "Uid for the specific AWS cloud account", + "name": "cloudAccountUid", + "in": "query" + } + ], + "responses": { + "204": { + "description": "Ok response without content", + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + } + }, + "/v1/clouds/aws/properties/validate": { + "post": { + "tags": [ + "v1" + ], + "summary": "Validate AWS properties", + "operationId": "V1AwsPropertiesValidate", + "parameters": [ + { + "description": "Request payload for AWS properties validate spec", + "name": "properties", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/V1AwsPropertiesValidateSpec" + } + } + ], + "responses": { + "204": { + "description": "Ok response without content", + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + } + }, + "/v1/clouds/aws/regions": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves a list of AWS regions for the specified account", + "operationId": "V1AwsRegions", + "parameters": [ + { + "type": "string", + "description": "Uid for the specific AWS cloud account", + "name": "cloudAccountUid", + "in": "query", + "required": true + } + ], + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1AwsRegions" + } + } + } + } + }, + "/v1/clouds/aws/regions/{region}/availabilityzones": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves a list of AWS availability zones for the specified region", + "operationId": "V1AwsZones", + "parameters": [ + { + "type": "string", + "description": "Region for which zones are requested", + "name": "region", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Uid for the specific AWS cloud account", + "name": "cloudAccountUid", + "in": "query", + "required": true + } + ], + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1AwsAvailabilityZones" + } + } + } + } + }, + "/v1/clouds/aws/regions/{region}/copydefaultimages": { + "post": { + "tags": [ + "v1" + ], + "summary": "Copies the specified image from one region to another region", + "operationId": "V1AwsCopyImageFromDefaultRegion", + "parameters": [ + { + "type": "string", + "description": "Region to copy AWS image from", + "name": "region", + "in": "path", + "required": true + }, + { + "description": "Request payload to copy the AWS image", + "name": "spectroClusterAwsImageTag", + "in": "body", + "schema": { + "$ref": "#/definitions/v1AwsFindImageRequest" + } + } + ], + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1AsyncOperationIdEntity" + } + } + } + } + }, + "/v1/clouds/aws/regions/{region}/eksClusters/name/validate": { + "get": { + "description": "Returns no contents if aws cluster name is valid else error.", + "tags": [ + "v1" + ], + "summary": "Check if Aws cluster name is valid", + "operationId": "V1AwsClusterNameValidate", + "parameters": [ + { + "type": "string", + "description": "Uid for the specific AWS cloud account", + "name": "cloudAccountUid", + "in": "query", + "required": true + }, + { + "type": "string", + "description": "cluster name to be validated", + "name": "name", + "in": "query", + "required": true + }, + { + "type": "string", + "description": "Region for which cluster name is validated", + "name": "region", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "description": "Ok response without content", + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + } + }, + "/v1/clouds/aws/regions/{region}/images": { + "post": { + "tags": [ + "v1" + ], + "summary": "Returns AWS image for the specified AMI name", + "operationId": "V1AwsFindImage", + "parameters": [ + { + "type": "string", + "description": "Region to find AWS image", + "name": "region", + "in": "path", + "required": true + }, + { + "description": "Request payload to find the AWS image", + "name": "awsImageRequest", + "in": "body", + "schema": { + "$ref": "#/definitions/v1AwsFindImageRequest" + } + } + ], + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1AwsImage" + } + } + } + } + }, + "/v1/clouds/aws/regions/{region}/instancetypes": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves a list of AWS instance types", + "operationId": "V1AwsInstanceTypes", + "parameters": [ + { + "type": "string", + "description": "Region for which AWS instances are requested", + "name": "region", + "in": "path", + "required": true + }, + { + "type": "number", + "format": "double", + "description": "Filter for instances having cpu greater than or equal", + "name": "cpuGtEq", + "in": "query" + }, + { + "type": "number", + "format": "double", + "description": "Filter for instances having memory greater than or equal", + "name": "memoryGtEq", + "in": "query" + }, + { + "type": "number", + "format": "double", + "description": "Filter for instances having gpu greater than or equal", + "name": "gpuGtEq", + "in": "query" + }, + { + "type": "string", + "description": "Uid for the specific AWS cloud account", + "name": "cloudAccountUid", + "in": "query" + } + ], + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1AwsInstanceTypes" + } + } + } + } + }, + "/v1/clouds/aws/regions/{region}/keypairs": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves a list of AWS keypairs", + "operationId": "V1AwsKeyPairs", + "parameters": [ + { + "type": "string", + "description": "Region for which AWS key pairs are requested", + "name": "region", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Uid for the specific AWS cloud account", + "name": "cloudAccountUid", + "in": "query", + "required": true + } + ], + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1AwsKeyPairs" + } + } + } + } + }, + "/v1/clouds/aws/regions/{region}/keypairs/{keypair}/validate": { + "post": { + "tags": [ + "v1" + ], + "summary": "Validate the specified AWS keypair", + "operationId": "V1AwsKeyPairValidate", + "parameters": [ + { + "type": "string", + "description": "Region for which AWS key pairs is validated", + "name": "region", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Uid for the specific AWS cloud account", + "name": "cloudAccountUid", + "in": "query", + "required": true + }, + { + "type": "string", + "description": "AWS Key pair which is to be validated", + "name": "keypair", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "description": "Ok response without content", + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + } + }, + "/v1/clouds/aws/regions/{region}/kms/{keyId}": { + "get": { + "tags": [ + "v1" + ], + "summary": "Get AWS KMS key by Id", + "operationId": "V1AwsKmsKeyGet", + "parameters": [ + { + "type": "string", + "description": "Region for which AWS KMS key belongs", + "name": "region", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "The globally unique identifier for the KMS key", + "name": "keyId", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Uid for the specific AWS cloud account", + "name": "cloudAccountUid", + "in": "query", + "required": true + } + ], + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1AwsKmsKeyEntity" + } + } + } + } + }, + "/v1/clouds/aws/regions/{region}/kmskeys": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves a list of AWS KMS keys for the specified account", + "operationId": "V1AwsKmsKeys", + "parameters": [ + { + "type": "string", + "description": "Region for which AWS KMS key are requested", + "name": "region", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Uid for the specific AWS cloud account", + "name": "cloudAccountUid", + "in": "query", + "required": true + } + ], + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1AwsKmsKeys" + } + } + } + } + }, + "/v1/clouds/aws/regions/{region}/kmskeys/validate": { + "get": { + "tags": [ + "v1" + ], + "summary": "Validate an Aws KMS key for the specified account", + "operationId": "V1AwsKmsKeyValidate", + "parameters": [ + { + "type": "string", + "description": "Region for which AWS KMS key is validated", + "name": "region", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Uid for the specific AWS cloud account", + "name": "cloudAccountUid", + "in": "query", + "required": true + }, + { + "type": "string", + "description": "AWS KEY ARN for validation", + "name": "keyArn", + "in": "query", + "required": true + } + ], + "responses": { + "204": { + "description": "Ok response without content", + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + } + }, + "/v1/clouds/aws/regions/{region}/storagetypes": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves a list of AWS storage types", + "operationId": "V1AwsStorageTypes", + "parameters": [ + { + "type": "string", + "description": "Region for which AWS storage types are requested", + "name": "region", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1AwsStorageTypes" + } + } + } + } + }, + "/v1/clouds/aws/regions/{region}/vpcs": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves a list of VPCs for the specified account", + "operationId": "V1AwsVpcs", + "parameters": [ + { + "type": "string", + "description": "Region for which VPCs are requested", + "name": "region", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Uid for the specific AWS cloud account", + "name": "cloudAccountUid", + "in": "query", + "required": true + } + ], + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1AwsVpcs" + } + } + } + } + }, + "/v1/clouds/aws/s3/validate": { + "post": { + "tags": [ + "v1" + ], + "summary": "Validate the AWS S3 bucket", + "operationId": "V1AwsS3Validate", + "parameters": [ + { + "description": "AWS S3 bucket credentials", + "name": "awsS3Credential", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1AwsS3BucketCredentials" + } + } + ], + "responses": { + "204": { + "description": "Ok response without content", + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + } + }, + "/v1/clouds/aws/securitygroups": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves a list of AWS security groups for the specified account", + "operationId": "V1AwsSecurityGroups", + "parameters": [ + { + "type": "string", + "description": "Uid for the specific AWS cloud account", + "name": "cloudAccountUid", + "in": "query" + }, + { + "type": "string", + "description": "Region for which security groups are requested", + "name": "region", + "in": "query", + "required": true + }, + { + "type": "string", + "description": "Vpc Id for which security groups are requested", + "name": "vpcId", + "in": "query", + "required": true + } + ], + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1AwsSecurityGroups" + } + } + } + } + }, + "/v1/clouds/aws/volumeTypes": { + "get": { + "description": "List all AWS Volume Types", + "tags": [ + "v1" + ], + "summary": "Get all AWS Volume Types", + "operationId": "V1AwsVolumeTypesGet", + "parameters": [ + { + "type": "string", + "description": "Specific AWS Region", + "name": "region", + "in": "query", + "required": true + } + ], + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1AWSVolumeTypes" + } + } + } + } + }, + "/v1/clouds/azure/account/validate": { + "post": { + "description": "Returns no contents if account is valid else error.", + "tags": [ + "v1" + ], + "summary": "Check if Azure account is valid", + "operationId": "V1AzureAccountValidate", + "parameters": [ + { + "description": "Request payload for Azure cloud account", + "name": "azureCloudAccount", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1AzureCloudAccount" + } + } + ], + "responses": { + "204": { + "description": "Ok response without content", + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + } + }, + "/v1/clouds/azure/groups": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves a list of Azure groups", + "operationId": "V1AzureGroups", + "parameters": [ + { + "type": "string", + "description": "Uid for the specific Azure cloud account", + "name": "cloudAccountUid", + "in": "query" + } + ], + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1AzureGroups" + } + } + } + } + }, + "/v1/clouds/azure/regions": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves a list of Azure regions", + "operationId": "V1AzureRegions", + "parameters": [ + { + "type": "string", + "description": "Uid for the specific Azure cloud account", + "name": "cloudAccountUid", + "in": "query" + }, + { + "type": "string", + "description": "SubscriptionId for which resources is requested", + "name": "subscriptionId", + "in": "query" + } + ], + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1AzureRegions" + } + } + } + } + }, + "/v1/clouds/azure/regions/{region}/instancetypes": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves a list of Azure instance types", + "operationId": "V1AzureInstanceTypes", + "parameters": [ + { + "type": "string", + "description": "Region for which Azure instance types are requested", + "name": "region", + "in": "path", + "required": true + }, + { + "type": "number", + "format": "double", + "description": "Filter for instances having cpu greater than or equal", + "name": "cpuGtEq", + "in": "query" + }, + { + "type": "number", + "format": "double", + "description": "Filter for instances having memory greater than or equal", + "name": "memoryGtEq", + "in": "query" + }, + { + "type": "number", + "format": "double", + "description": "Filter for instances having gpu greater than or equal", + "name": "gpuGtEq", + "in": "query" + } + ], + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1AzureInstanceTypes" + } + } + } + } + }, + "/v1/clouds/azure/regions/{region}/storagetypes": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves a list of Azure storage types", + "operationId": "V1AzureStorageTypes", + "parameters": [ + { + "type": "string", + "description": "Region for which Azure storage types are requested", + "name": "region", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1AzureStorageTypes" + } + } + } + } + }, + "/v1/clouds/azure/regions/{region}/subscriptions/{subscriptionId}/aksClusters/name/validate": { + "get": { + "description": "Returns no contents if Azure cluster name is valid else error.", + "tags": [ + "v1" + ], + "summary": "Check if Azure cluster name is valid", + "operationId": "V1AzureClusterNameValidate", + "parameters": [ + { + "type": "string", + "description": "Uid for the specific Azure cloud account", + "name": "cloudAccountUid", + "in": "query", + "required": true + }, + { + "type": "string", + "description": "cluster name to be validated", + "name": "name", + "in": "query", + "required": true + }, + { + "type": "string", + "description": "region in which cluster name is to be validated", + "name": "region", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "subscriptionId in which cluster name is to be validated", + "name": "subscriptionId", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "resourceGroup in which cluster name is to be validated", + "name": "resourceGroup", + "in": "query", + "required": true + } + ], + "responses": { + "204": { + "description": "Ok response without content", + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + } + }, + "/v1/clouds/azure/regions/{region}/subscriptions/{subscriptionId}/networks": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves a list of Azure virtual network list for the sepcified account", + "operationId": "V1AzureVirtualNetworkList", + "parameters": [ + { + "type": "string", + "description": "Uid for the specific Azure cloud account", + "name": "cloudAccountUid", + "in": "query", + "required": true + }, + { + "type": "string", + "description": "Region for which Azure virtual networks are requested", + "name": "region", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Uid for which Azure virtual networks are requested", + "name": "subscriptionId", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Resource group for which Azure virtual networks are requested", + "name": "resourceGroup", + "in": "query" + } + ], + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1AzureVirtualNetworkList" + } + } + } + } + }, + "/v1/clouds/azure/regions/{region}/subscriptions/{subscriptionId}/resourceGroups": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves a list of Azure resource group for the specified account", + "operationId": "V1AzureResourceGroupList", + "parameters": [ + { + "type": "string", + "description": "Uid for the specific Azure cloud account", + "name": "cloudAccountUid", + "in": "query", + "required": true + }, + { + "type": "string", + "description": "Region for which Azure resource group are requested", + "name": "region", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Uid for which Azure resource group are requested", + "name": "subscriptionId", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1AzureResourceGroupList" + } + } + } + } + }, + "/v1/clouds/azure/regions/{region}/zones": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves a list of Azure zones for the specified region", + "operationId": "V1AzureZones", + "parameters": [ + { + "type": "string", + "description": "Region for which Azure zones are requested", + "name": "region", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Uid for the specific Azure cloud account", + "name": "cloudAccountUid", + "in": "query" + }, + { + "type": "string", + "description": "subscriptionId of azure account", + "name": "subscriptionId", + "in": "query" + } + ], + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1AzureZoneEntity" + } + } + } + } + }, + "/v1/clouds/azure/resourceGroups/{resourceGroup}/privateDnsZones": { + "get": { + "description": "Returns Azure private DNS zones", + "tags": [ + "v1" + ], + "summary": "Get Azure private DNS zones for the given resource group", + "operationId": "V1AzurePrivateDnsZones", + "parameters": [ + { + "type": "string", + "description": "resourceGroup for which Azure private dns zones are requested", + "name": "resourceGroup", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Uid for the specific Azure cloud account", + "name": "cloudAccountUid", + "in": "query", + "required": true + }, + { + "type": "string", + "description": "subscriptionId for which Azure private dns zones are requested", + "name": "subscriptionId", + "in": "query", + "required": true + } + ], + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1AzurePrivateDnsZones" + } + } + } + } + }, + "/v1/clouds/azure/resourceGroups/{resourceGroup}/storageAccounts": { + "get": { + "description": "Returns Azure storage accounts.", + "tags": [ + "v1" + ], + "summary": "Get Azure storage accounts", + "operationId": "V1AzureStorageAccounts", + "parameters": [ + { + "type": "string", + "description": "resourceGroup for which Azure storage accounts are requested", + "name": "resourceGroup", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Uid for the specific Azure cloud account", + "name": "cloudAccountUid", + "in": "query" + }, + { + "type": "string", + "description": "subscriptionId for which Azure storage accounts are requested", + "name": "subscriptionId", + "in": "query", + "required": true + } + ], + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1AzureStorageAccounts" + } + } + } + } + }, + "/v1/clouds/azure/resourceGroups/{resourceGroup}/storageAccounts/{storageAccountName}/containers": { + "get": { + "description": "Returns Azure storage containers for the given account.", + "tags": [ + "v1" + ], + "summary": "Get Azure storage containers", + "operationId": "V1AzureStorageContainers", + "parameters": [ + { + "type": "string", + "description": "resourceGroup for which Azure storage accounts are requested", + "name": "resourceGroup", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Uid for the specific Azure cloud account", + "name": "cloudAccountUid", + "in": "query" + }, + { + "type": "string", + "description": "subscriptionId for which Azure storage accounts are requested", + "name": "subscriptionId", + "in": "query", + "required": true + }, + { + "type": "string", + "description": "resourceGroup for which Azure storage accounts are requested", + "name": "storageAccountName", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1AzureStorageContainers" + } + } + } + } + }, + "/v1/clouds/azure/storageaccounttypes": { + "get": { + "description": "Returns Azure storage account types.", + "tags": [ + "v1" + ], + "summary": "Get Azure storage account types", + "operationId": "V1AzureStorageAccountTypes", + "parameters": [ + { + "type": "string", + "description": "Region for which Azure storage account types are requested", + "name": "region", + "in": "query" + } + ], + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1AzureStorageAccountEntity" + } + } + } + } + }, + "/v1/clouds/azure/subscriptions": { + "get": { + "description": "Returns list of Azure subscription list.", + "tags": [ + "v1" + ], + "summary": "Retrieves a list of Azure subscription list for the specified account", + "operationId": "V1AzureSubscriptionList", + "parameters": [ + { + "type": "string", + "description": "Uid for the specific Azure cloud account", + "name": "cloudAccountUid", + "in": "query", + "required": true + } + ], + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1AzureSubscriptionList" + } + } + } + } + }, + "/v1/clouds/azure/vhds/{vhd}/url": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the Azure vhd url for the specified vhd location", + "operationId": "V1AzureVhdUrl", + "parameters": [ + { + "type": "string", + "description": "vhd location for which Azure vhd url is requested", + "name": "vhd", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1AzureVhdUrlEntity" + } + } + } + } + }, + "/v1/clouds/cloudTypes": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the custom cloud types", + "operationId": "V1CustomCloudTypesGet", + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1CustomCloudTypes" + } + } + } + } + }, + "/v1/clouds/cloudTypes/register": { + "post": { + "tags": [ + "v1" + ], + "summary": "Registers the custom cloud type", + "operationId": "V1CustomCloudTypeRegister", + "parameters": [ + { + "description": "Request payload to register custom cloud type", + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1CustomCloudRequestEntity" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + } + }, + "/v1/clouds/cloudTypes/{cloudType}": { + "delete": { + "tags": [ + "v1" + ], + "summary": "Deletes the custom cloud type", + "operationId": "V1CustomCloudTypesDelete", + "parameters": [ + { + "type": "string", + "description": "Unique cloud type", + "name": "cloudType", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "description": "The resource was deleted successfully" + } + } + } + }, + "/v1/clouds/cloudTypes/{cloudType}/cloudAccountKeys": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns valid keys for the cloud account used for custom cloud type", + "operationId": "V1CustomCloudTypeCloudAccountKeysGet", + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1CustomCloudTypeCloudAccountKeys" + } + } + } + }, + "put": { + "tags": [ + "v1" + ], + "summary": "Update the custom cloud type cloud account keys", + "operationId": "V1CustomCloudTypeCloudAccountKeysUpdate", + "parameters": [ + { + "description": "Request payload for custom cloud meta entity", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1CustomCloudTypeCloudAccountKeys" + } + } + ], + "responses": { + "204": { + "description": "Ok response without content", + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Unique cloud type", + "name": "cloudType", + "in": "path", + "required": true + } + ] + }, + "/v1/clouds/cloudTypes/{cloudType}/content/bootstrap": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the custom cloud type bootstrap", + "operationId": "V1CustomCloudTypeBootstrapGet", + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1CustomCloudTypeContentResponse" + } + } + } + }, + "put": { + "consumes": [ + "multipart/form-data" + ], + "tags": [ + "v1" + ], + "summary": "Update the custom cloud type bootstrap", + "operationId": "V1CustomCloudTypeBootstrapUpdate", + "parameters": [ + { + "type": "file", + "name": "fileName", + "in": "formData" + } + ], + "responses": { + "204": { + "description": "Ok response without content", + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + }, + "delete": { + "tags": [ + "v1" + ], + "summary": "Delete the custom cloud type bootstrap", + "operationId": "V1CustomCloudTypeBootstrapDelete", + "responses": { + "204": { + "description": "The resource was deleted successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Unique cloud type", + "name": "cloudType", + "in": "path", + "required": true + } + ] + }, + "/v1/clouds/cloudTypes/{cloudType}/content/cloudProvider": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the custom cloud type cloud provider", + "operationId": "V1CustomCloudTypeCloudProviderGet", + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1CustomCloudTypeContentResponse" + } + } + } + }, + "put": { + "consumes": [ + "multipart/form-data" + ], + "tags": [ + "v1" + ], + "summary": "Update the custom cloud type cloud provider", + "operationId": "V1CustomCloudTypeCloudProviderUpdate", + "parameters": [ + { + "type": "file", + "name": "fileName", + "in": "formData" + } + ], + "responses": { + "204": { + "description": "Ok response without content", + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + }, + "delete": { + "tags": [ + "v1" + ], + "summary": "Delete the custom cloud type cloud provider", + "operationId": "V1CustomCloudTypeCloudProviderDelete", + "responses": { + "204": { + "description": "The resource was deleted successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Unique cloud type", + "name": "cloudType", + "in": "path", + "required": true + } + ] + }, + "/v1/clouds/cloudTypes/{cloudType}/content/controlPlane": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the custom cloud type control plane", + "operationId": "V1CustomCloudTypeControlPlaneGet", + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1CustomCloudTypeContentResponse" + } + } + } + }, + "put": { + "consumes": [ + "multipart/form-data" + ], + "tags": [ + "v1" + ], + "summary": "Update the custom cloud type control plane", + "operationId": "V1CustomCloudTypeControlPlaneUpdate", + "parameters": [ + { + "type": "file", + "name": "fileName", + "in": "formData" + } + ], + "responses": { + "204": { + "description": "Ok response without content", + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + }, + "delete": { + "tags": [ + "v1" + ], + "summary": "Delete the custom cloud type control plane", + "operationId": "V1CustomCloudTypeControlPlaneDelete", + "responses": { + "204": { + "description": "The resource was deleted successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Unique cloud type", + "name": "cloudType", + "in": "path", + "required": true + } + ] + }, + "/v1/clouds/cloudTypes/{cloudType}/content/templates/clusterTemplate": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the custom cloud type cluster template", + "operationId": "V1CustomCloudTypeClusterTemplateGet", + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1CustomCloudTypeContentResponse" + } + } + } + }, + "put": { + "consumes": [ + "multipart/form-data" + ], + "tags": [ + "v1" + ], + "summary": "Update the custom cloud type cluster template", + "operationId": "V1CustomCloudTypeClusterTemplateUpdate", + "parameters": [ + { + "type": "file", + "name": "fileName", + "in": "formData" + } + ], + "responses": { + "204": { + "description": "Ok response without content", + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + }, + "delete": { + "tags": [ + "v1" + ], + "summary": "Delete the custom cloud type cluster template", + "operationId": "V1CustomCloudTypeClusterTemplateDelete", + "responses": { + "204": { + "description": "The resource was deleted successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Unique cloud type", + "name": "cloudType", + "in": "path", + "required": true + } + ] + }, + "/v1/clouds/cloudTypes/{cloudType}/content/templates/controlPlanePoolTemplate": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the custom cloud type controlPlane pool template", + "operationId": "V1CustomCloudTypeControlPlanePoolTemplateGet", + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1CustomCloudTypeContentResponse" + } + } + } + }, + "put": { + "consumes": [ + "multipart/form-data" + ], + "tags": [ + "v1" + ], + "summary": "Update the custom cloud type controlPlane pool template", + "operationId": "V1CustomCloudTypeControlPlanePoolTemplateUpdate", + "parameters": [ + { + "type": "file", + "name": "fileName", + "in": "formData" + } + ], + "responses": { + "204": { + "description": "Ok response without content", + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + }, + "delete": { + "tags": [ + "v1" + ], + "summary": "Delete the custom cloud type controlPlane pool template", + "operationId": "V1CustomCloudTypeControlPlanePoolTemplateDelete", + "responses": { + "204": { + "description": "The resource was deleted successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Unique cloud type", + "name": "cloudType", + "in": "path", + "required": true + } + ] + }, + "/v1/clouds/cloudTypes/{cloudType}/content/templates/workerPoolTemplate": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the custom cloud type worker pool template", + "operationId": "V1CustomCloudTypeWorkerPoolTemplateGet", + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1CustomCloudTypeContentResponse" + } + } + } + }, + "put": { + "consumes": [ + "multipart/form-data" + ], + "tags": [ + "v1" + ], + "summary": "Update the custom cloud type worker pool template", + "operationId": "V1CustomCloudTypeWorkerPoolTemplateUpdate", + "parameters": [ + { + "type": "file", + "name": "fileName", + "in": "formData" + } + ], + "responses": { + "204": { + "description": "Ok response without content", + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + }, + "delete": { + "tags": [ + "v1" + ], + "summary": "Delete the custom cloud type worker pool template", + "operationId": "V1CustomCloudTypeWorkerPoolTemplateDelete", + "responses": { + "204": { + "description": "The resource was deleted successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Unique cloud type", + "name": "cloudType", + "in": "path", + "required": true + } + ] + }, + "/v1/clouds/cloudTypes/{cloudType}/logo": { + "get": { + "produces": [ + "application/octet-stream" + ], + "tags": [ + "v1" + ], + "summary": "Returns the custom cloud type logo", + "operationId": "V1CustomCloudTypeLogoGet", + "responses": { + "200": { + "description": "Download the logo", + "schema": { + "type": "string", + "format": "binary" + }, + "headers": { + "Content-Disposition": { + "type": "string" + } + } + } + } + }, + "put": { + "consumes": [ + "multipart/form-data" + ], + "tags": [ + "v1" + ], + "summary": "Update the custom cloud type logo", + "operationId": "V1CustomCloudTypeLogoUpdate", + "parameters": [ + { + "type": "file", + "name": "fileName", + "in": "formData" + } + ], + "responses": { + "204": { + "description": "Ok response without content", + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Unique cloud type", + "name": "cloudType", + "in": "path", + "required": true + } + ] + }, + "/v1/clouds/cloudTypes/{cloudType}/meta": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the custom cloud type meta", + "operationId": "V1CustomCloudTypeMetaGet", + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1CustomCloudMetaEntity" + } + } + } + }, + "put": { + "tags": [ + "v1" + ], + "summary": "Update the custom cloud type meta", + "operationId": "V1CustomCloudTypeMetaUpdate", + "parameters": [ + { + "description": "Request payload for custom cloud meta entity", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1CustomCloudRequestEntity" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Unique cloud type", + "name": "cloudType", + "in": "path", + "required": true + } + ] + }, + "/v1/clouds/eks/properties/validate": { + "post": { + "tags": [ + "v1" + ], + "summary": "Validate EKS properties", + "operationId": "V1EksPropertiesValidate", + "parameters": [ + { + "description": "Request payload for EKS properties validate spec", + "name": "properties", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/V1EksPropertiesValidateSpec" + } + } + ], + "responses": { + "204": { + "description": "Ok response without content", + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + } + }, + "/v1/clouds/gcp/account/validate": { + "post": { + "tags": [ + "v1" + ], + "summary": "Validate the specified GCP account credentials", + "operationId": "V1GcpAccountValidate", + "parameters": [ + { + "description": "Uid for the specific GCP cloud account", + "name": "gcpCloudAccount", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1GcpCloudAccountValidateEntity" + } + } + ], + "responses": { + "204": { + "description": "Ok response without content", + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + } + }, + "/v1/clouds/gcp/azs/validate": { + "post": { + "tags": [ + "v1" + ], + "summary": "Validate the specified GCP az", + "operationId": "V1GcpAzValidate", + "parameters": [ + { + "description": "Uid for the specific GCP cloud account", + "name": "entity", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1AzValidateEntity" + } + } + ], + "responses": { + "204": { + "description": "Ok response without content", + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + } + }, + "/v1/clouds/gcp/bucketname/validate": { + "post": { + "tags": [ + "v1" + ], + "summary": "Validate the specified GCP bucket name credentials", + "operationId": "V1GcpBucketNameValidate", + "parameters": [ + { + "description": "Request payload for GCP account name validate", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1GcpAccountNameValidateSpec" + } + } + ], + "responses": { + "204": { + "description": "Ok response without content", + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + } + }, + "/v1/clouds/gcp/image/container/validate": { + "get": { + "tags": [ + "v1" + ], + "summary": "Validates the image with tag", + "operationId": "V1GcpContainerImageValidate", + "parameters": [ + { + "type": "string", + "description": "image path in the container", + "name": "imagePath", + "in": "query", + "required": true + }, + { + "type": "string", + "description": "tag in the GCP container", + "name": "tag", + "in": "query", + "required": true + } + ], + "responses": { + "204": { + "description": "Ok response without content", + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + } + }, + "/v1/clouds/gcp/images/{imageName}/url": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the Gcp image url for the specified image location", + "operationId": "V1GcpImageUrl", + "parameters": [ + { + "type": "string", + "description": "imageName for which GCP image url is requested", + "name": "imageName", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1GcpImageUrlEntity" + } + } + } + } + }, + "/v1/clouds/gcp/projects": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves a list of GCP projects for the specified account", + "operationId": "V1GcpProjects", + "parameters": [ + { + "type": "string", + "description": "Uid for the specific GCP cloud account", + "name": "cloudAccountUid", + "in": "query", + "required": true + } + ], + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1GcpProjects" + } + } + } + } + }, + "/v1/clouds/gcp/projects/{project}/regions": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves a list of GCP regions", + "operationId": "V1GcpRegions", + "parameters": [ + { + "type": "string", + "description": "Uid for the specific GCP cloud account", + "name": "cloudAccountUid", + "in": "query", + "required": true + }, + { + "type": "string", + "description": "Project Name for which GCP zones are requested", + "name": "project", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1GcpRegions" + } + } + } + } + }, + "/v1/clouds/gcp/projects/{project}/regions/{region}/networks": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves a list of GCP networks for the specified account", + "operationId": "V1GcpNetworks", + "parameters": [ + { + "type": "string", + "description": "Uid for the specific GCP cloud account", + "name": "cloudAccountUid", + "in": "query", + "required": true + }, + { + "type": "string", + "description": "Region for which GCP networks are requested", + "name": "region", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Project Name for which GCP networks are requested", + "name": "project", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1GcpNetworks" + } + } + } + } + }, + "/v1/clouds/gcp/projects/{project}/regions/{region}/zones": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves a list of GCP zones for the specified account and region", + "operationId": "V1GcpZones", + "parameters": [ + { + "type": "string", + "description": "Uid for the specific GCP cloud account", + "name": "cloudAccountUid", + "in": "query", + "required": true + }, + { + "type": "string", + "description": "Region for which GCP zones are requested", + "name": "region", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Project Name for which GCP zones are requested", + "name": "project", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1GcpZones" + } + } + } + } + }, + "/v1/clouds/gcp/projects/{project}/validate": { + "post": { + "tags": [ + "v1" + ], + "summary": "Validate the specified GCP project", + "operationId": "V1GcpProjectValidate", + "parameters": [ + { + "type": "string", + "description": "GCP project uid", + "name": "project", + "in": "path", + "required": true + }, + { + "description": "Uid for the specific GCP cloud account", + "name": "cloudAccountUid", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1CloudAccountUidEntity" + } + } + ], + "responses": { + "204": { + "description": "Ok response without content", + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + } + }, + "/v1/clouds/gcp/projects/{project}/zones": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves a list of GCP zones for the specified account", + "operationId": "V1GcpAvailabilityZones", + "parameters": [ + { + "type": "string", + "description": "Uid for the specific GCP cloud account", + "name": "cloudAccountUid", + "in": "query", + "required": true + }, + { + "type": "string", + "description": "Project Name for which GCP zones are requested", + "name": "project", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1GcpZones" + } + } + } + } + }, + "/v1/clouds/gcp/properties/validate": { + "post": { + "tags": [ + "v1" + ], + "summary": "Validate GCP properties", + "operationId": "V1GcpPropertiesValidate", + "parameters": [ + { + "description": "Request payload for GCP properties validate spec", + "name": "properties", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/V1GcpPropertiesValidateSpec" + } + } + ], + "responses": { + "204": { + "description": "Ok response without content", + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + } + }, + "/v1/clouds/gcp/regions/{region}/instancetypes": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves a list of GCP instance types", + "operationId": "V1GcpInstanceTypes", + "parameters": [ + { + "type": "string", + "description": "Region for which GCP instance types are requested", + "name": "region", + "in": "path", + "required": true + }, + { + "type": "number", + "format": "double", + "description": "Filter for instances having cpu greater than or equal", + "name": "cpuGtEq", + "in": "query" + }, + { + "type": "number", + "format": "double", + "description": "Filter for instances having memory greater than or equal", + "name": "memoryGtEq", + "in": "query" + }, + { + "type": "number", + "format": "double", + "description": "Filter for instances having gpu greater than or equal", + "name": "gpuGtEq", + "in": "query" + } + ], + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1GcpInstanceTypes" + } + } + } + } + }, + "/v1/clouds/gcp/regions/{region}/storagetypes": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves a list of Gcp storage types", + "operationId": "V1GcpStorageTypes", + "parameters": [ + { + "type": "string", + "description": "Region for which GCP storage types are requested", + "name": "region", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1GcpStorageTypes" + } + } + } + } + }, + "/v1/clouds/maas/account/validate": { + "post": { + "description": "Returns no contents if account is valid else error.", + "tags": [ + "v1" + ], + "summary": "Check if Maas account is valid", + "operationId": "V1MaasAccountValidate", + "parameters": [ + { + "description": "Request payload for Maas cloud account", + "name": "account", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1MaasCloudAccount" + } + } + ], + "responses": { + "204": { + "description": "Ok response without content", + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + } + }, + "/v1/clouds/maas/azs": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves a list of Maas zones for a particular account uid", + "operationId": "V1MaasZonesGet", + "parameters": [ + { + "type": "string", + "description": "Uid for the specific Maas cloud account", + "name": "cloudAccountUid", + "in": "query" + } + ], + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1MaasZones" + } + } + } + } + }, + "/v1/clouds/maas/domains": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves a list of Maas domains", + "operationId": "V1MaasDomainsGet", + "parameters": [ + { + "type": "string", + "description": "Uid for the specific Maas cloud account", + "name": "cloudAccountUid", + "in": "query" + } + ], + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1MaasDomains" + } + } + } + } + }, + "/v1/clouds/maas/resourcePools": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves a list of Maas pools for a particular account uid", + "operationId": "V1MaasPoolsGet", + "parameters": [ + { + "type": "string", + "description": "Uid for the specific Maas cloud account", + "name": "cloudAccountUid", + "in": "query" + } + ], + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1MaasPools" + } + } + } + } + }, + "/v1/clouds/maas/subnets": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves a list of Maas subnets for a particular account uid", + "operationId": "V1MaasSubnetsGet", + "parameters": [ + { + "type": "string", + "description": "Uid for the specific Maas cloud account", + "name": "cloudAccountUid", + "in": "query" + } + ], + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1MaasSubnets" + } + } + } + } + }, + "/v1/clouds/maas/tags": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves a list of Maas tags for a particular account uid", + "operationId": "V1MaasTagsGet", + "parameters": [ + { + "type": "string", + "description": "Uid for the specific Maas cloud account", + "name": "cloudAccountUid", + "in": "query" + } + ], + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1MaasTags" + } + } + } + } + }, + "/v1/clouds/openstack/account/validate": { + "post": { + "description": "Returns no contents if account is valid else error.", + "tags": [ + "v1" + ], + "summary": "Check if OpenStack account is valid", + "operationId": "V1OpenStackAccountValidate", + "parameters": [ + { + "description": "Request payload for OpenStack cloud account", + "name": "openstackCloudAccount", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1OpenStackCloudAccount" + } + } + ], + "responses": { + "204": { + "description": "Ok response without content", + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + } + }, + "/v1/clouds/openstack/azs": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves a list of OpenStack azs for a particular account uid", + "operationId": "V1OpenStackAzsGet", + "parameters": [ + { + "type": "string", + "description": "Uid for the specific OpenStack cloud account", + "name": "cloudAccountUid", + "in": "query" + }, + { + "type": "string", + "description": "project for which OpenStack azs are requested", + "name": "project", + "in": "query" + }, + { + "type": "string", + "description": "region for which OpenStack azs are requested", + "name": "region", + "in": "query" + }, + { + "type": "string", + "description": "domain for which OpenStack azs are requested", + "name": "domain", + "in": "query" + } + ], + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1OpenStackAzs" + } + } + } + } + }, + "/v1/clouds/openstack/flavors": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the OpenStack flavors", + "operationId": "V1OpenStackFlavorsGet", + "parameters": [ + { + "type": "string", + "description": "Uid for the specific OpenStack cloud account", + "name": "cloudAccountUid", + "in": "query" + }, + { + "type": "string", + "description": "project for which OpenStack flavors are requested", + "name": "project", + "in": "query" + }, + { + "type": "string", + "description": "region for which OpenStack flavors are requested", + "name": "region", + "in": "query" + }, + { + "type": "string", + "description": "domain for which OpenStack flavors are requested", + "name": "domain", + "in": "query" + } + ], + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1OpenStackFlavors" + } + } + } + } + }, + "/v1/clouds/openstack/keypairs": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the OpenStack keypair", + "operationId": "V1OpenStackKeypairsGet", + "parameters": [ + { + "type": "string", + "description": "Uid for the specific OpenStack cloud account", + "name": "cloudAccountUid", + "in": "query" + }, + { + "type": "string", + "description": "project for which OpenStack keypairs are requested", + "name": "project", + "in": "query" + }, + { + "type": "string", + "description": "region for which OpenStack keypairs are requested", + "name": "region", + "in": "query" + }, + { + "type": "string", + "description": "domain for which OpenStack keypairs are requested", + "name": "domain", + "in": "query" + } + ], + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1OpenStackKeypairs" + } + } + } + } + }, + "/v1/clouds/openstack/networks": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the OpenStack networks", + "operationId": "V1OpenStackNetworksGet", + "parameters": [ + { + "type": "string", + "description": "Uid for the specific OpenStack cloud account", + "name": "cloudAccountUid", + "in": "query" + }, + { + "type": "string", + "description": "project for which OpenStack networks are requested", + "name": "project", + "in": "query" + }, + { + "type": "string", + "description": "region for which OpenStack networks are requested", + "name": "region", + "in": "query" + }, + { + "type": "string", + "description": "domain for which OpenStack networks are requested", + "name": "domain", + "in": "query" + } + ], + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1OpenStackNetworks" + } + } + } + } + }, + "/v1/clouds/openstack/projects": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the OpenStack projects", + "operationId": "V1OpenStackProjectsGet", + "parameters": [ + { + "type": "string", + "description": "Uid for the specific OpenStack cloud account", + "name": "cloudAccountUid", + "in": "query" + } + ], + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1OpenStackProjects" + } + } + } + } + }, + "/v1/clouds/openstack/regions": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the OpenStack regions", + "operationId": "V1OpenStackRegionsGet", + "parameters": [ + { + "type": "string", + "description": "Uid for the specific OpenStack cloud account", + "name": "cloudAccountUid", + "in": "query" + } + ], + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1OpenStackRegions" + } + } + } + } + }, + "/v1/clouds/tencent/account/validate": { + "post": { + "tags": [ + "v1" + ], + "summary": "Validate the specified Tencent account credentials", + "operationId": "V1TencentAccountValidate", + "parameters": [ + { + "description": "Request payload to validate tencent cloud account", + "name": "account", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1TencentCloudAccount" + } + } + ], + "responses": { + "204": { + "description": "Ok response without content", + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + } + }, + "/v1/clouds/tencent/regions": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves a list of Tencent regions for the specified account", + "operationId": "V1TencentRegions", + "parameters": [ + { + "type": "string", + "description": "Uid for the specific Tencent cloud account", + "name": "cloudAccountUid", + "in": "query", + "required": true + } + ], + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1TencentRegions" + } + } + } + } + }, + "/v1/clouds/tencent/regions/{region}/instancetypes": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves a list of Tencent instance types", + "operationId": "V1TencentInstanceTypes", + "parameters": [ + { + "type": "string", + "description": "Region for which tencent instances are listed", + "name": "region", + "in": "path", + "required": true + }, + { + "type": "number", + "format": "double", + "description": "Filter for instances having cpu greater than or equal", + "name": "cpuGtEq", + "in": "query" + }, + { + "type": "number", + "format": "double", + "description": "Filter for instances having memory greater than or equal", + "name": "memoryGtEq", + "in": "query" + }, + { + "type": "number", + "format": "double", + "description": "Filter for instances having gpu greater than or equal", + "name": "gpuGtEq", + "in": "query" + }, + { + "type": "string", + "description": "Uid for the specific tencent cloud account", + "name": "cloudAccountUid", + "in": "query", + "required": true + } + ], + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1TencentInstanceTypes" + } + } + } + } + }, + "/v1/clouds/tencent/regions/{region}/keypairs": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves a list of keypairs for the specified account", + "operationId": "V1TencentKeypairs", + "parameters": [ + { + "type": "string", + "description": "Region for which keypairs are requested", + "name": "region", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Uid for the specific Tencent cloud account", + "name": "cloudAccountUid", + "in": "query", + "required": true + } + ], + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1TencentKeypairs" + } + } + } + } + }, + "/v1/clouds/tencent/regions/{region}/securitygroups": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves a list of secutity groups for the specified account", + "operationId": "V1TencentSecurityGroups", + "parameters": [ + { + "type": "string", + "description": "Region for which security groups are requested", + "name": "region", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Uid for the specific Tencent cloud account", + "name": "cloudAccountUid", + "in": "query", + "required": true + } + ], + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1TencentSecurityGroups" + } + } + } + } + }, + "/v1/clouds/tencent/regions/{region}/storagetypes": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves a list of Tencent storage types", + "operationId": "V1TencentStorageTypes", + "parameters": [ + { + "type": "string", + "description": "Region for which tencent storages are listed", + "name": "region", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Uid for the specific tencent cloud account", + "name": "cloudAccountUid", + "in": "query", + "required": true + }, + { + "type": "string", + "description": "Zone for which tencent storages are listed", + "name": "zone", + "in": "query", + "required": true + } + ], + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1TencentStorageTypes" + } + } + } + } + }, + "/v1/clouds/tencent/regions/{region}/vpcs": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves a list of VPCs for the specified account", + "operationId": "V1TencentVpcs", + "parameters": [ + { + "type": "string", + "description": "Region for which VPCs are requested", + "name": "region", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Uid for the specific Tencent cloud account", + "name": "cloudAccountUid", + "in": "query", + "required": true + } + ], + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1TencentVpcs" + } + } + } + } + }, + "/v1/clouds/tencent/regions/{region}/zones": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves a list of Tencent availability zones for the specified region", + "operationId": "V1TencentZones", + "parameters": [ + { + "type": "string", + "description": "Region for which zones are requested", + "name": "region", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Uid for the specific Tencent cloud account", + "name": "cloudAccountUid", + "in": "query", + "required": true + } + ], + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1TencentAvailabilityZones" + } + } + } + } + }, + "/v1/clouds/vsphere/account/validate": { + "post": { + "description": "Returns no contents if account is valid else error.", + "tags": [ + "v1" + ], + "summary": "Check if Vsphere account is valid", + "operationId": "V1VsphereAccountValidate", + "parameters": [ + { + "description": "Request payload for VSphere cloud account", + "name": "vsphereCloudAccount", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1VsphereCloudAccount" + } + } + ], + "responses": { + "204": { + "description": "Ok response without content", + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + } + }, + "/v1/clouds/vsphere/datacenters": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the vsphere data centers", + "operationId": "V1VsphereDatacenters", + "parameters": [ + { + "type": "string", + "description": "Uid for the specific OpenStack cloud account", + "name": "cloudAccountUid", + "in": "query" + } + ], + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1VsphereDatacenters" + } + } + } + } + }, + "/v1/clouds/vsphere/datacenters/{uid}/computeclusters/{computecluster}": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the resources for vsphere compute cluster", + "operationId": "V1VsphereComputeClusterResources", + "parameters": [ + { + "type": "string", + "description": "Uid for the specific VSphere cloud account", + "name": "cloudAccountUid", + "in": "query", + "required": true + }, + { + "type": "string", + "description": "computecluster for which resources is requested", + "name": "computecluster", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "VSphere datacenter uid for which resources is requested", + "name": "uid", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1VsphereComputeClusterResources" + } + } + } + } + }, + "/v1/clouds/vsphere/env": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves vsphere env", + "operationId": "V1VsphereEnv", + "parameters": [ + { + "description": "Request payload for VSphere cloud account", + "name": "vsphereCloudAccount", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1VsphereCloudAccount" + } + } + ], + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1VsphereEnv" + } + } + } + } + }, + "/v1/clouds/{cloudType}/instance/spotprice": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves the cloud instance spot price based on zone and timestamp for a specific cloud", + "operationId": "V1CloudInstanceSpotPriceGet", + "parameters": [ + { + "type": "string", + "description": "Cloud type [aws/azure/gcp/tencent]", + "name": "cloudType", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Instance type for a specific cloud type", + "name": "instanceType", + "in": "query", + "required": true + }, + { + "type": "string", + "description": "Availability zone for a specific cloud type", + "name": "zone", + "in": "query", + "required": true + }, + { + "type": "string", + "format": "date-time", + "description": "Time is a wrapper around time.Time which supports correct marshaling to YAML and JSON. Wrappers are provided for many of the factory methods that the time package offers.", + "name": "timestamp", + "in": "query" + } + ], + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1CloudSpotPrice" + } + } + } + } + }, + "/v1/clouds/{cloud}/compute/{type}/rate": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the cloud compute rate", + "operationId": "V1CloudComputeRate", + "parameters": [ + { + "type": "string", + "description": "cloud for which compute rate is requested", + "name": "cloud", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "instance type for which compute rate is requested", + "name": "type", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "region for which compute rate is requested", + "name": "region", + "in": "query", + "required": true + } + ], + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1CloudCost" + } + } + } + } + }, + "/v1/clouds/{cloud}/storage/{type}/rate": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the cloud storage rate", + "operationId": "V1CloudStorageRate", + "parameters": [ + { + "type": "string", + "description": "cloud for which compute rate is requested", + "name": "cloud", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "storage type for which compute rate is requested", + "name": "type", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "region for which compute rate is requested", + "name": "region", + "in": "query", + "required": true + }, + { + "type": "integer", + "description": "maxDiskType for which compute rate is requested", + "name": "maxDiskType", + "in": "query" + } + ], + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1CloudCost" + } + } + } + } + }, + "/v1/clustergroups": { + "post": { + "tags": [ + "v1" + ], + "summary": "Create cluster groups", + "operationId": "v1ClusterGroupsCreate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1ClusterGroupEntity" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + } + }, + "/v1/clustergroups/developerCredit/usage/{scope}": { + "get": { + "tags": [ + "v1" + ], + "summary": "Get cluster group developer credit usage by scope", + "operationId": "v1ClusterGroupsDeveloperCreditUsageGet", + "responses": { + "200": { + "description": "Cluster group developer credit usage", + "schema": { + "$ref": "#/definitions/v1ClusterGroupsDeveloperCreditUsage" + } + } + } + }, + "parameters": [ + { + "enum": [ + "system", + "tenant" + ], + "type": "string", + "name": "scope", + "in": "path", + "required": true + } + ] + }, + "/v1/clustergroups/hostCluster": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves a list of cluster groups host cluster summary", + "operationId": "v1ClusterGroupsHostClusterSummary", + "responses": { + "200": { + "description": "An array of cluster groups of host cluster type summary", + "schema": { + "$ref": "#/definitions/v1ClusterGroupsHostClusterSummary" + } + } + } + } + }, + "/v1/clustergroups/hostCluster/metadata": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves a list of cluster groups host cluster metadata", + "operationId": "v1ClusterGroupsHostClusterMetadata", + "responses": { + "200": { + "description": "An array of cluster groups host cluster metadata items", + "schema": { + "$ref": "#/definitions/v1ClusterGroupsHostClusterMetadata" + } + } + } + } + }, + "/v1/clustergroups/validate/name": { + "get": { + "tags": [ + "v1" + ], + "summary": "Validates the cluster groups name", + "operationId": "v1ClusterGroupsValidateName", + "parameters": [ + { + "type": "string", + "name": "name", + "in": "query", + "required": true + } + ], + "responses": { + "204": { + "description": "Ok response without content", + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + } + }, + "/v1/clustergroups/{uid}": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the specified cluster groups", + "operationId": "v1ClusterGroupsUidGet", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1ClusterGroup" + } + } + } + }, + "delete": { + "tags": [ + "v1" + ], + "summary": "Deletes the specified cluster group", + "operationId": "v1ClusterGroupsUidDelete", + "responses": { + "204": { + "description": "The resource was deleted successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/clustergroups/{uid}/hostCluster": { + "put": { + "tags": [ + "v1" + ], + "summary": "Updates cluster reference and host cluster config", + "operationId": "v1ClusterGroupsUidHostClusterUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1ClusterGroupHostClusterEntity" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/clustergroups/{uid}/meta": { + "put": { + "tags": [ + "v1" + ], + "summary": "Updates the specified cluster groups meta", + "operationId": "v1ClusterGroupsUidMetaUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1ObjectMeta" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/clustergroups/{uid}/packs/resolvedValues": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the specified clustergroup's profile packs resolved values", + "operationId": "v1ClusterGroupsUidPacksResolvedValuesGet", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1SpectroClusterProfilesResolvedValues" + } + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster group uid", + "name": "uid", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1SpectroClusterProfilesParamReferenceEntity" + } + } + ] + }, + "/v1/clustergroups/{uid}/profiles": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the associated profiles of a specified cluster group", + "operationId": "v1ClusterGroupsUidProfilesGet", + "parameters": [ + { + "type": "string", + "description": "includes pack meta such as schema, presets", + "name": "includePackMeta", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1SpectroClusterProfileList" + } + } + } + }, + "put": { + "tags": [ + "v1" + ], + "summary": "Updates the specified cluster groups profiles", + "operationId": "v1ClusterGroupsUidProfilesUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1SpectroClusterProfiles" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "ClusterGroup uid", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/clusterprofiles": { + "post": { + "tags": [ + "v1" + ], + "summary": "Creates a cluster profile", + "operationId": "v1ClusterProfilesCreate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1ClusterProfileEntity" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + } + }, + "/v1/clusterprofiles/bulk": { + "delete": { + "tags": [ + "v1" + ], + "summary": "Deletes list of cluster profiles", + "operationId": "v1ClusterProfilesBulkDelete", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1BulkDeleteRequest" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1BulkDeleteResponse" + } + } + } + } + }, + "/v1/clusterprofiles/import": { + "post": { + "tags": [ + "v1" + ], + "summary": "Imports a cluster profile", + "operationId": "v1ClusterProfilesImport", + "parameters": [ + { + "type": "boolean", + "description": "If true then cluster profile will be published post successful import", + "name": "publish", + "in": "query" + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1ClusterProfileImportEntity" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + } + }, + "/v1/clusterprofiles/import/file": { + "post": { + "consumes": [ + "multipart/form-data" + ], + "tags": [ + "v1" + ], + "summary": "Imports a cluster profile via file", + "operationId": "v1ClusterProfilesImportFile", + "parameters": [ + { + "type": "boolean", + "description": "If true then cluster profile will be published post successful import", + "name": "publish", + "in": "query" + }, + { + "type": "file", + "description": "Cluster profile import file", + "name": "importFile", + "in": "formData" + }, + { + "enum": [ + "yaml", + "json" + ], + "type": "string", + "default": "json", + "description": "Cluster profile import file format [\"yaml\", \"json\"]", + "name": "format", + "in": "query" + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + } + }, + "/v1/clusterprofiles/import/validate": { + "post": { + "tags": [ + "v1" + ], + "summary": "Validates cluster profile import", + "operationId": "v1ClusterProfilesImportValidate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1ClusterProfileImportEntity" + } + } + ], + "responses": { + "200": { + "description": "Cluster profile import validated response", + "schema": { + "$ref": "#/definitions/v1ClusterProfileImportEntity" + } + } + } + } + }, + "/v1/clusterprofiles/macros": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves a list of macros", + "operationId": "v1MacrosList", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1Macros" + } + } + } + } + }, + "/v1/clusterprofiles/validate/name": { + "get": { + "description": "Validates the cluster profile name and version", + "tags": [ + "v1" + ], + "summary": "Validates the cluster profile metadata", + "operationId": "v1ClusterProfilesValidateNameVersion", + "parameters": [ + { + "type": "string", + "description": "Cluster profile name", + "name": "name", + "in": "query" + }, + { + "type": "string", + "description": "Cluster profile version", + "name": "version", + "in": "query" + } + ], + "responses": { + "204": { + "description": "Ok response without content", + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + } + }, + "/v1/clusterprofiles/validate/packs": { + "post": { + "tags": [ + "v1" + ], + "summary": "Validates cluster profile packs", + "operationId": "v1ClusterProfilesValidatePacks", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1ClusterProfileTemplateDraft" + } + } + ], + "responses": { + "200": { + "description": "Cluster profile packs validation response", + "schema": { + "$ref": "#/definitions/v1ClusterProfileValidatorResponse" + } + } + } + } + }, + "/v1/clusterprofiles/{uid}": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns a specified cluster profile", + "operationId": "v1ClusterProfilesGet", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1ClusterProfile" + } + } + } + }, + "put": { + "tags": [ + "v1" + ], + "summary": "Updates the specified cluster profile", + "operationId": "v1ClusterProfilesUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1ClusterProfileUpdateEntity" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "delete": { + "tags": [ + "v1" + ], + "summary": "Deletes the specified cluster profile", + "operationId": "v1ClusterProfilesDelete", + "responses": { + "204": { + "description": "The resource was deleted successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster profile uid", + "name": "uid", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Comma seperated pack meta such as schema, presets", + "name": "includePackMeta", + "in": "query" + } + ] + }, + "/v1/clusterprofiles/{uid}/clone": { + "post": { + "tags": [ + "v1" + ], + "summary": "Creates a clone of the specified cluster profile", + "operationId": "v1ClusterProfilesUidClone", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1ClusterProfileCloneEntity" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster profile uid", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/clusterprofiles/{uid}/clone/validate": { + "post": { + "description": "Validates the cloned cluster profile name, version and target project uid", + "tags": [ + "v1" + ], + "summary": "Validates the cluster profile clone", + "operationId": "v1ClusterProfilesUidCloneValidate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1ClusterProfileCloneMetaInputEntity" + } + } + ], + "responses": { + "204": { + "description": "Ok response without content", + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster profile uid", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/clusterprofiles/{uid}/export": { + "get": { + "produces": [ + "application/octet-stream" + ], + "tags": [ + "v1" + ], + "summary": "Export the specified cluster profile", + "operationId": "V1ClusterProfilesUidExport", + "responses": { + "200": { + "description": "Exports cluster profile as a file", + "schema": { + "type": "string", + "format": "binary" + }, + "headers": { + "Content-Disposition": { + "type": "string" + } + } + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster profile uid", + "name": "uid", + "in": "path", + "required": true + }, + { + "enum": [ + "yaml", + "json" + ], + "type": "string", + "default": "json", + "description": "Cluster profile export file format [ \"yaml\", \"json\" ]", + "name": "format", + "in": "query" + } + ] + }, + "/v1/clusterprofiles/{uid}/export/terraform": { + "get": { + "produces": [ + "application/octet-stream" + ], + "tags": [ + "v1" + ], + "summary": "Downloads the specified cluster profile", + "operationId": "V1ClusterProfilesUidExportTerraform", + "responses": { + "200": { + "description": "Downloads cluster profile export file", + "schema": { + "type": "string", + "format": "binary" + }, + "headers": { + "Content-Disposition": { + "type": "string" + } + } + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster profile uid", + "name": "uid", + "in": "path", + "required": true + }, + { + "enum": [ + "yaml", + "json" + ], + "type": "string", + "default": "yaml", + "description": "Cluster profile export file format [ \"yaml\", \"json\" ]", + "name": "format", + "in": "query" + } + ] + }, + "/v1/clusterprofiles/{uid}/metadata": { + "patch": { + "tags": [ + "v1" + ], + "summary": "Updates the specified cluster profile metadata", + "operationId": "v1ClusterProfilesUidMetadataUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1ProfileMetaEntity" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster profile uid", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/clusterprofiles/{uid}/packRefs": { + "patch": { + "tags": [ + "v1" + ], + "summary": "Updates cluster profile packs ref", + "operationId": "v1ClusterProfilesPacksRefUpdate", + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster profile uid", + "name": "uid", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Cluster profile notification uid", + "name": "notify", + "in": "query" + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1ClusterProfileNotificationUpdateEntity" + } + } + ] + }, + "/v1/clusterprofiles/{uid}/packs": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the specified cluster profile packs", + "operationId": "v1ClusterProfilesUidPacksGet", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1ClusterProfilePacksEntities" + } + } + } + }, + "post": { + "tags": [ + "v1" + ], + "summary": "Adds a new pack to the specified cluster profile and returns the created pack uid", + "operationId": "v1ClusterProfilesUidPacksAdd", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1PackInputEntity" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster profile uid", + "name": "uid", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Comma seperated pack meta such as schema, presets", + "name": "includePackMeta", + "in": "query" + } + ] + }, + "/v1/clusterprofiles/{uid}/packs/manifests": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the specified cluster profile pack manifests", + "operationId": "v1ClusterProfilesUidPacksManifestsGet", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1ClusterProfilePacksManifests" + } + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster profile uid", + "name": "uid", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Comma seperated pack meta such as schema, presets", + "name": "includePackMeta", + "in": "query" + } + ] + }, + "/v1/clusterprofiles/{uid}/packs/resolvedValues": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the specified cluster profile packs resolved values", + "operationId": "v1ClusterProfilesUidPacksResolvedValuesGet", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1PackResolvedValues" + } + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster profile uid", + "name": "uid", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1PackParamsEntity" + } + } + ] + }, + "/v1/clusterprofiles/{uid}/packs/{packName}": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the specified cluster profile pack", + "operationId": "V1ClusterProfilesUidPacksNameGet", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1PackRefSummaryResponse" + } + } + } + }, + "put": { + "tags": [ + "v1" + ], + "summary": "Updates the specified pack information in the cluster profile", + "operationId": "v1ClusterProfilesUidPacksNameUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1PackUpdateEntity" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "delete": { + "tags": [ + "v1" + ], + "summary": "Deletes the specified pack information in the cluster profile", + "operationId": "v1ClusterProfilesUidPacksNameDelete", + "responses": { + "204": { + "description": "The resource was deleted successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster profile uid", + "name": "uid", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Cluster profile pack name", + "name": "packName", + "in": "path", + "required": true + } + ] + }, + "/v1/clusterprofiles/{uid}/packs/{packName}/config": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the specified cluster profile pack configuration", + "operationId": "v1ClusterProfilesUidPacksConfigGet", + "parameters": [ + { + "type": "string", + "description": "cluster profile uid", + "name": "uid", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Cluster profile pack name", + "name": "packName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Cluster profile pack uid", + "name": "packUid", + "in": "query", + "required": true + } + ], + "responses": { + "200": { + "description": "An array of cluster profile pack configurations", + "schema": { + "$ref": "#/definitions/v1ClusterProfilePackConfigList" + } + } + } + } + }, + "/v1/clusterprofiles/{uid}/packs/{packName}/manifests": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the associated manifests for the specified profile's pack", + "operationId": "v1ClusterProfilesUidPacksUidManifests", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1ManifestEntities" + } + } + } + }, + "post": { + "tags": [ + "v1" + ], + "summary": "Adds manifest to the profiles packs and returns the added manifests uid", + "operationId": "v1ClusterProfilesUidPacksNameManifestsAdd", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1ManifestInputEntity" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster profile uid", + "name": "uid", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Cluster profile pack name", + "name": "packName", + "in": "path", + "required": true + } + ] + }, + "/v1/clusterprofiles/{uid}/packs/{packName}/manifests/{manifestUid}": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the specified cluster profile pack manifest", + "operationId": "v1ClusterProfilesUidPacksNameManifestsUidGet", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1ManifestEntity" + } + } + } + }, + "put": { + "tags": [ + "v1" + ], + "summary": "Updates the specified manifest of the profile's pack", + "operationId": "v1ClusterProfilesUidPacksNameManifestsUidUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1ManifestInputEntity" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "delete": { + "tags": [ + "v1" + ], + "summary": "Deletes the specified cluster profile pack manifest", + "operationId": "v1ClusterProfilesUidPacksNameManifestsUidDelete", + "responses": { + "204": { + "description": "The resource was deleted successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster profile uid", + "name": "uid", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Cluster profile pack name", + "name": "packName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Cluster profile pack manifest uid", + "name": "manifestUid", + "in": "path", + "required": true + } + ] + }, + "/v1/clusterprofiles/{uid}/publish": { + "patch": { + "description": "Publish the draft cluster profile with next revision, the current draft cluster profile will be marked to published\nand the draft cluster profile will be set to null in the cluster profile template.\n", + "tags": [ + "v1" + ], + "summary": "Publishes the specified cluster profile", + "operationId": "v1ClusterProfilesPublish", + "responses": { + "204": { + "description": "Cluster profile published successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster profile uid", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/clusterprofiles/{uid}/spc/download": { + "get": { + "produces": [ + "application/octet-stream" + ], + "tags": [ + "v1" + ], + "summary": "Downloads the specified cluster profile", + "operationId": "v1ClusterProfilesUidSpcDownload", + "responses": { + "200": { + "description": "Download cluster profile archive file", + "schema": { + "type": "string", + "format": "binary" + }, + "headers": { + "Content-Disposition": { + "type": "string" + } + } + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster profile uid", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/clusterprofiles/{uid}/validate/packs": { + "post": { + "tags": [ + "v1" + ], + "summary": "Validates specified cluster profile packs", + "operationId": "v1ClusterProfilesUidValidatePacks", + "parameters": [ + { + "type": "string", + "description": "Cluster profile uid", + "name": "uid", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1ClusterProfileTemplateDraft" + } + } + ], + "responses": { + "200": { + "description": "Cluster profile packs validation response", + "schema": { + "$ref": "#/definitions/v1ClusterProfileValidatorResponse" + } + } + } + } + }, + "/v1/clusterprofiles/{uid}/variables": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieve a list of variables defined for the cluster profile", + "operationId": "V1ClusterProfilesUidVariablesGet", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1Variables" + } + } + } + }, + "put": { + "tags": [ + "v1" + ], + "summary": "Update the variables defined for a cluster profile", + "operationId": "V1ClusterProfilesUidVariablesPut", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1Variables" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "delete": { + "tags": [ + "v1" + ], + "summary": "Deletes the specified cluster profile variables", + "operationId": "V1ClusterProfilesUidVariablesDelete", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1VariableNames" + } + } + ], + "responses": { + "204": { + "description": "The resource was deleted successfully" + } + } + }, + "patch": { + "tags": [ + "v1" + ], + "summary": "Update specific variables defined for a cluster profile", + "operationId": "V1ClusterProfilesUidVariablesPatch", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1Variables" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster profile uid", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/dashboard/appDeployments": { + "post": { + "tags": [ + "v1" + ], + "summary": "Retrieves a list of application deployments filter summary Supported filter fields - [\"appDeploymentName\", \"clusterUid\", \"tags\"] Supported sort fields - [\"appDeploymentName\", \"creationTimestamp\", \"lastModifiedTimestamp\"]", + "operationId": "v1DashboardAppDeployments", + "parameters": [ + { + "maximum": 50, + "type": "integer", + "format": "int64", + "description": "limit is a maximum number of responses to return for a list call. Maximum value of the limit is 50.\nIf more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results.", + "name": "limit", + "in": "query" + }, + { + "type": "integer", + "format": "int64", + "description": "offset is the next index number from which the response will start. The response offset value can be used along with continue token for the pagination.", + "name": "offset", + "in": "query" + }, + { + "type": "string", + "description": "continue token to paginate the subsequent data items", + "name": "continue", + "in": "query" + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1AppDeploymentsFilterSpec" + } + } + ], + "responses": { + "200": { + "description": "An array of application deployment summary items", + "schema": { + "$ref": "#/definitions/v1AppDeploymentsSummary" + } + } + } + } + }, + "/v1/dashboard/appProfiles": { + "post": { + "tags": [ + "v1" + ], + "summary": "Retrieves a list of application profiles filter summary Supported filter fields - [\"profileName\", \"tags\"] Supported sort fields - [\"profileName\", \"creationTimestamp\", \"lastModifiedTimestamp\"]", + "operationId": "v1DashboardAppProfiles", + "parameters": [ + { + "maximum": 50, + "type": "integer", + "format": "int64", + "description": "limit is a maximum number of responses to return for a list call. Maximum value of the limit is 50.\nIf more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results.", + "name": "limit", + "in": "query" + }, + { + "type": "integer", + "format": "int64", + "description": "offset is the next index number from which the response will start. The response offset value can be used along with continue token for the pagination.", + "name": "offset", + "in": "query" + }, + { + "type": "string", + "description": "continue token to paginate the subsequent data items", + "name": "continue", + "in": "query" + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1AppProfilesFilterSpec" + } + } + ], + "responses": { + "200": { + "description": "An array of application profiles summary items", + "schema": { + "$ref": "#/definitions/v1AppProfilesSummary" + } + } + } + } + }, + "/v1/dashboard/appProfiles/metadata": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves a list of application profile metadata", + "operationId": "v1DashboardAppProfilesMetadata", + "responses": { + "200": { + "description": "An array of application profile summary items", + "schema": { + "$ref": "#/definitions/v1AppProfilesMetadata" + } + } + } + } + }, + "/v1/dashboard/appliances/metadata": { + "post": { + "tags": [ + "v1" + ], + "summary": "Retrieves a list of edgehosts summary", + "operationId": "v1EdgeHostsMetadata", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1EdgeHostsMetadataFilter" + } + } + ], + "responses": { + "200": { + "description": "An array of edgehost summary items", + "schema": { + "$ref": "#/definitions/v1EdgeHostsMetadataSummary" + } + } + } + } + }, + "/v1/dashboard/cloudaccounts/metadata": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves a list of cloud accounts metadata", + "operationId": "v1DashboardCloudAccountsMetadata", + "parameters": [ + { + "type": "string", + "name": "environment", + "in": "query" + } + ], + "responses": { + "200": { + "description": "An array of cloud accounts summary items", + "schema": { + "$ref": "#/definitions/v1CloudAccountsMetadata" + } + } + } + } + }, + "/v1/dashboard/clustergroups/{uid}/hostClusters": { + "post": { + "tags": [ + "v1" + ], + "summary": "Retrieves a list of cluster summary for a given cluster group", + "operationId": "v1ClusterGroupUidHostClustersSummary", + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "default": 50, + "description": "limit is a maximum number of responses to return for a list call. Default and maximum value of the limit is 50.\nIf more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results.", + "name": "limit", + "in": "query" + }, + { + "type": "integer", + "format": "int64", + "description": "offset is the next index number from which the response will start. The response offset value can be used along with continue token for the pagination.", + "name": "offset", + "in": "query" + }, + { + "type": "string", + "description": "continue token to paginate the subsequent data items", + "name": "continue", + "in": "query" + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1SearchFilterSummarySpec" + } + } + ], + "responses": { + "200": { + "description": "An array of cluster summary items", + "schema": { + "$ref": "#/definitions/v1SpectroClustersSummary" + } + } + } + } + }, + "/v1/dashboard/clustergroups/{uid}/virtualClusters": { + "post": { + "tags": [ + "v1" + ], + "summary": "Retrieves a list of cluster summary for a given cluster group", + "operationId": "v1ClusterGroupUidVirtualClustersSummary", + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "default": 50, + "description": "limit is a maximum number of responses to return for a list call. Default and maximum value of the limit is 50.\nIf more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results.", + "name": "limit", + "in": "query" + }, + { + "type": "integer", + "format": "int64", + "description": "offset is the next index number from which the response will start. The response offset value can be used along with continue token for the pagination.", + "name": "offset", + "in": "query" + }, + { + "type": "string", + "description": "continue token to paginate the subsequent data items", + "name": "continue", + "in": "query" + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1SearchFilterSummarySpec" + } + } + ], + "responses": { + "200": { + "description": "An array of cluster summary items", + "schema": { + "$ref": "#/definitions/v1SpectroClustersSummary" + } + } + } + } + }, + "/v1/dashboard/clusterprofiles": { + "post": { + "tags": [ + "v1" + ], + "summary": "Retrieves a list of cluster profiles filter summary Supported filter fields - [\"profileName\", \"tags\", \"profileType\", \"environment\"] Supported sort fields - [\"profileName\", \"environment\", \"profileType\", \"creationTimestamp\", \"lastModifiedTimestamp\"]", + "operationId": "v1ClusterProfilesFilterSummary", + "parameters": [ + { + "maximum": 50, + "type": "integer", + "format": "int64", + "description": "limit is a maximum number of responses to return for a list call. Maximum value of the limit is 50.\nIf more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results.", + "name": "limit", + "in": "query" + }, + { + "type": "integer", + "format": "int64", + "description": "offset is the next index number from which the response will start. The response offset value can be used along with continue token for the pagination.", + "name": "offset", + "in": "query" + }, + { + "type": "string", + "description": "continue token to paginate the subsequent data items", + "name": "continue", + "in": "query" + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1ClusterProfilesFilterSpec" + } + } + ], + "responses": { + "200": { + "description": "An array of cluster profiles summary items", + "schema": { + "$ref": "#/definitions/v1ClusterProfilesSummary" + } + } + } + } + }, + "/v1/dashboard/clusterprofiles/metadata": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves a list of cluster profiles metadata", + "operationId": "v1ClusterProfilesMetadata", + "responses": { + "200": { + "description": "An array of cluster summary items", + "schema": { + "$ref": "#/definitions/v1ClusterProfilesMetadata" + } + } + } + } + }, + "/v1/dashboard/clusterprofiles/{uid}": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves a specified cluster profile summary", + "operationId": "v1ClusterProfilesUidSummary", + "responses": { + "200": { + "description": "Cluster profile summary response", + "schema": { + "$ref": "#/definitions/v1ClusterProfileSummary" + } + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/dashboard/edgehosts/search": { + "post": { + "tags": [ + "v1" + ], + "summary": "Retrieves a list of Edgehosts summary with provided search filter. Supported fields as per schema /v1/dashboard/edgehosts/search/schema", + "operationId": "v1DashboardEdgehostsSearch", + "parameters": [ + { + "maximum": 50, + "type": "integer", + "format": "int64", + "description": "limit is a maximum number of responses to return for a list call. Maximum value of the limit is 50.\nIf more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results.", + "name": "limit", + "in": "query" + }, + { + "type": "integer", + "format": "int64", + "description": "offset is the next index number from which the response will start. The response offset value can be used along with continue token for the pagination.", + "name": "offset", + "in": "query" + }, + { + "type": "string", + "description": "continue token to paginate the subsequent data items", + "name": "continue", + "in": "query" + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1SearchFilterSummarySpec" + } + } + ], + "responses": { + "200": { + "description": "An array of edgehost summary items", + "schema": { + "$ref": "#/definitions/v1EdgeHostsSearchSummary" + } + } + } + } + }, + "/v1/dashboard/edgehosts/search/schema": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves a schema for the Edgehost search filter", + "operationId": "v1DashboardEdgehostsSearchSchemaGet", + "responses": { + "200": { + "description": "An array of schema items", + "schema": { + "$ref": "#/definitions/v1SearchFilterSchemaSpec" + } + } + } + } + }, + "/v1/dashboard/pcgs/search": { + "post": { + "tags": [ + "v1" + ], + "summary": "Retrieves a list of PCG summary with provided search filter. Supported fields as per schema /v1/dashboard/pcgs/search/schema", + "operationId": "v1DashboardPcgsSearchSummary", + "parameters": [ + { + "maximum": 50, + "type": "integer", + "format": "int64", + "description": "limit is a maximum number of responses to return for a list call. Maximum value of the limit is 50.\nIf more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results.", + "name": "limit", + "in": "query" + }, + { + "type": "integer", + "format": "int64", + "description": "offset is the next index number from which the response will start. The response offset value can be used along with continue token for the pagination.", + "name": "offset", + "in": "query" + }, + { + "type": "string", + "description": "continue token to paginate the subsequent data items", + "name": "continue", + "in": "query" + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1SearchFilterSummarySpec" + } + } + ], + "responses": { + "200": { + "description": "An array of cluster summary items", + "schema": { + "$ref": "#/definitions/v1PcgsSummary" + } + } + } + } + }, + "/v1/dashboard/pcgs/search/schema": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves a schema for the PCG search filter", + "operationId": "v1DashboardPcgSearchSchemaGet", + "responses": { + "200": { + "description": "An array of schema items", + "schema": { + "$ref": "#/definitions/v1SearchFilterSchemaSpec" + } + } + } + } + }, + "/v1/dashboard/projects": { + "post": { + "tags": [ + "v1" + ], + "operationId": "v1ProjectsFilterSummary", + "parameters": [ + { + "type": "integer", + "format": "int64", + "default": 50, + "description": "limit is a maximum number of responses to return for a list call. Default and maximum value of the limit is 50.\nIf more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results.", + "name": "limit", + "in": "query" + }, + { + "type": "integer", + "format": "int64", + "description": "offset is the next index number from which the response will start. The response offset value can be used along with continue token for the pagination.", + "name": "offset", + "in": "query" + }, + { + "type": "string", + "description": "continue token to paginate the subsequent data items", + "name": "continue", + "in": "query" + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1ProjectsFilterSpec" + } + } + ], + "responses": { + "200": { + "description": "An array of project filter summary items", + "schema": { + "$ref": "#/definitions/v1ProjectsSummary" + } + } + } + } + }, + "/v1/dashboard/projects/metadata": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves a list of projects metadata", + "operationId": "v1ProjectsMetadata", + "parameters": [ + { + "type": "string", + "description": "Name of the project", + "name": "name", + "in": "query" + } + ], + "responses": { + "200": { + "description": "An array of project metadata items", + "schema": { + "$ref": "#/definitions/v1ProjectsMetadata" + } + } + } + } + }, + "/v1/dashboard/spectroclusters/cost": { + "post": { + "tags": [ + "v1" + ], + "summary": "Retrieves spectro clusters cloud cost summary information", + "operationId": "v1DashboardSpectroClustersCostSummary", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1SpectroClusterCloudCostSummarySpec" + } + } + ], + "responses": { + "200": { + "description": "An array of resources cloud cost summary items", + "schema": { + "$ref": "#/definitions/v1ResourcesCloudCostSummary" + } + } + } + } + }, + "/v1/dashboard/spectroclusters/filters/workspace": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves a list of running, non rbac configured clusters in a workspace", + "operationId": "v1SpectroClustersFiltersWorkspace", + "parameters": [ + { + "type": "integer", + "format": "int64", + "default": 50, + "description": "limit is a maximum number of responses to return for a list call. Default and maximum value of the limit is 50.\nIf more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results.", + "name": "limit", + "in": "query" + }, + { + "type": "integer", + "format": "int64", + "description": "offset is the next index number from which the response will start. The response offset value can be used along with continue token for the pagination.", + "name": "offset", + "in": "query" + }, + { + "type": "string", + "description": "continue token to paginate the subsequent data items", + "name": "continue", + "in": "query" + } + ], + "responses": { + "200": { + "description": "An array of cluster summary items", + "schema": { + "$ref": "#/definitions/v1SpectroClustersSummary" + } + } + } + } + }, + "/v1/dashboard/spectroclusters/metadata": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves a list of cluster summary metadata", + "operationId": "v1SpectroClustersMetadataGet", + "parameters": [ + { + "enum": [ + "hostclusters", + "strictHostclusters" + ], + "type": "string", + "name": "quickFilter", + "in": "query" + } + ], + "responses": { + "200": { + "description": "An array of cluster summary items", + "schema": { + "$ref": "#/definitions/v1SpectroClustersMetadata" + } + } + } + }, + "post": { + "tags": [ + "v1" + ], + "summary": "Retrieves a list of cluster summary", + "operationId": "v1SpectroClustersMetadata", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1SpectroClusterMetadataSpec" + } + } + ], + "responses": { + "200": { + "description": "An array of cluster summary items", + "schema": { + "$ref": "#/definitions/v1SpectroClustersMetadata" + } + } + } + } + }, + "/v1/dashboard/spectroclusters/metadata/search": { + "post": { + "tags": [ + "v1" + ], + "summary": "Retrieves a list of cluster metadata with provided search filter spec Supported sort fields - [\"environment\", \"clusterName\", \"clusterState\", \"creationTimestamp\", \"lastModifiedTimestamp\"]", + "operationId": "v1SpectroClustersMetadataSearch", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1SearchFilterSummarySpec" + } + } + ], + "responses": { + "200": { + "description": "An array of cluster summary meta items", + "schema": { + "$ref": "#/definitions/v1SpectroClustersMetadataSearch" + } + } + } + } + }, + "/v1/dashboard/spectroclusters/metadata/search/schema": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves a schema for the cluster metadata search filter", + "operationId": "v1SpectroClustersMetadataSearchSchema", + "responses": { + "200": { + "description": "An array of cluster meta schema items", + "schema": { + "$ref": "#/definitions/v1SearchFilterSchemaSpec" + } + } + } + } + }, + "/v1/dashboard/spectroclusters/repaveStatus": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves a list of clusters with the desired repave state", + "operationId": "v1DashboardSpectroClustersRepaveList", + "parameters": [ + { + "maximum": 50, + "type": "integer", + "format": "int64", + "description": "limit is a maximum number of responses to return for a list call. Maximum value of the limit is 50.\nIf more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results.", + "name": "limit", + "in": "query" + }, + { + "type": "integer", + "format": "int64", + "description": "offset is the next index number from which the response will start. The response offset value can be used along with continue token for the pagination.", + "name": "offset", + "in": "query" + }, + { + "type": "string", + "description": "continue token to paginate the subsequent data items", + "name": "continue", + "in": "query" + }, + { + "enum": [ + "Pending", + "Approved", + "Reverted" + ], + "type": "string", + "default": "Pending", + "name": "repaveState", + "in": "query" + } + ], + "responses": { + "200": { + "description": "An array of cluster summary items", + "schema": { + "$ref": "#/definitions/v1SpectroClustersSummary" + } + } + } + } + }, + "/v1/dashboard/spectroclusters/resources/consumption": { + "post": { + "tags": [ + "v1" + ], + "summary": "Retrieves spectro clusters resource consumption", + "operationId": "v1SpectroClustersResourcesConsumption", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1ResourceConsumptionSpec" + } + } + ], + "responses": { + "200": { + "description": "An array of resource consumption data items", + "schema": { + "$ref": "#/definitions/v1ResourcesConsumption" + } + } + } + } + }, + "/v1/dashboard/spectroclusters/resources/cost": { + "post": { + "tags": [ + "v1" + ], + "summary": "Retrieves spectro clusters resources cost summary information", + "operationId": "v1SpectroClustersResourcesCostSummary", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1ResourceCostSummarySpec" + } + } + ], + "responses": { + "200": { + "description": "An array of resources cost summary items", + "schema": { + "$ref": "#/definitions/v1ResourcesCostSummary" + } + } + } + } + }, + "/v1/dashboard/spectroclusters/resources/usage": { + "post": { + "tags": [ + "v1" + ], + "summary": "Retrieves spectro clusters resources usage summary information", + "operationId": "v1SpectroClustersResourcesUsageSummary", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1ResourceUsageSummarySpec" + } + } + ], + "responses": { + "200": { + "description": "An array of resources usage summary items", + "schema": { + "$ref": "#/definitions/v1ResourcesUsageSummary" + } + } + } + } + }, + "/v1/dashboard/spectroclusters/search": { + "post": { + "tags": [ + "v1" + ], + "summary": "Retrieves a list of cluster summary with provided search filter spec Supported sort fields - [\"environment\", \"clusterName\", \"memoryUsage\", \"healthState\", \"creationTimestamp\", \"lastModifiedTimestamp\"]", + "operationId": "v1SpectroClustersSearchFilterSummary", + "parameters": [ + { + "maximum": 50, + "type": "integer", + "format": "int64", + "description": "limit is a maximum number of responses to return for a list call. Maximum value of the limit is 50.\nIf more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results.", + "name": "limit", + "in": "query" + }, + { + "type": "integer", + "format": "int64", + "description": "offset is the next index number from which the response will start. The response offset value can be used along with continue token for the pagination.", + "name": "offset", + "in": "query" + }, + { + "type": "string", + "description": "continue token to paginate the subsequent data items", + "name": "continue", + "in": "query" + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1SearchFilterSummarySpec" + } + } + ], + "responses": { + "200": { + "description": "An array of cluster summary items", + "schema": { + "$ref": "#/definitions/v1SpectroClustersSummary" + } + } + } + } + }, + "/v1/dashboard/spectroclusters/search/export": { + "get": { + "produces": [ + "application/octet-stream" + ], + "tags": [ + "v1" + ], + "summary": "Export and download the list of cluster summary with matching search filter and download as a file(csv)", + "operationId": "v1DashboardClustersSearchSummaryExportGet", + "parameters": [ + { + "type": "string", + "name": "encodedFilter", + "in": "query" + }, + { + "enum": [ + "csv" + ], + "type": "string", + "default": "csv", + "name": "format", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "file" + }, + "headers": { + "Content-Disposition": { + "type": "string" + }, + "Content-Type": { + "type": "string" + } + } + } + } + }, + "post": { + "produces": [ + "application/octet-stream" + ], + "tags": [ + "v1" + ], + "summary": "Export the list of cluster summary with matching search filter and download as a file(csv) Supported sort fields - [\"environment\", \"clusterName\", \"healthState\", \"creationTimestamp\", \"lastModifiedTimestamp\"]", + "operationId": "v1DashboardClustersSearchSummaryExport", + "parameters": [ + { + "enum": [ + "csv" + ], + "type": "string", + "default": "csv", + "name": "format", + "in": "query" + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1SearchFilterSummarySpec" + } + } + ], + "responses": { + "200": { + "description": "download file", + "schema": { + "type": "string", + "format": "binary" + }, + "headers": { + "Content-Disposition": { + "type": "string" + } + } + } + } + } + }, + "/v1/dashboard/spectroclusters/search/input": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves a supported input values for the cluster search filter", + "operationId": "v1DashboardSpectroClustersSearchInput", + "responses": { + "200": { + "description": "An array of cluster search filter input items", + "schema": { + "$ref": "#/definitions/v1ClusterSearchInputSpec" + } + } + } + } + }, + "/v1/dashboard/spectroclusters/search/schema": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves a schema for the cluster search filter", + "operationId": "v1SpectroClustersSearchSchema", + "responses": { + "200": { + "description": "An array of cluster filter schema items", + "schema": { + "$ref": "#/definitions/v1SearchFilterSchemaSpec" + } + } + } + } + }, + "/v1/dashboard/spectroclusters/vms": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves a list of Virtual machine enabled clusters", + "operationId": "V1DashboardVMEnabledClustersList", + "responses": { + "200": { + "description": "An array of schema items", + "schema": { + "$ref": "#/definitions/v1VMClusters" + } + } + } + } + }, + "/v1/dashboard/spectroclusters/{uid}": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the specified cluster summary", + "operationId": "v1SpectroClustersSummaryUid", + "responses": { + "200": { + "description": "An spectro cluster summary", + "schema": { + "$ref": "#/definitions/v1SpectroClusterUidSummary" + } + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/dashboard/spectroclusters/{uid}/cost": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves the specified cluster cost summary", + "operationId": "v1SpectroClustersUidCostSummary", + "parameters": [ + { + "type": "string", + "format": "date-time", + "description": "Time is a wrapper around time.Time which supports correct marshaling to YAML and JSON. Wrappers are provided for many of the factory methods that the time package offers.", + "name": "startTime", + "in": "query" + }, + { + "type": "string", + "format": "date-time", + "description": "Time is a wrapper around time.Time which supports correct marshaling to YAML and JSON. Wrappers are provided for many of the factory methods that the time package offers.", + "name": "endTime", + "in": "query" + }, + { + "minimum": 60, + "type": "integer", + "format": "int32", + "description": "period in minutes, group the data point by the specified period", + "name": "period", + "in": "query" + } + ], + "responses": { + "200": { + "description": "An spectro cluster cost summary", + "schema": { + "$ref": "#/definitions/v1SpectroClusterCostSummary" + } + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/dashboard/spectroclusters/{uid}/overview": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the specified cluster summary overview", + "operationId": "v1SpectroClustersSummaryUidOverview", + "responses": { + "200": { + "description": "An spectro cluster summary overview", + "schema": { + "$ref": "#/definitions/v1SpectroClusterUidSummary" + } + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/dashboard/spectroclusters/{uid}/resources/consumption": { + "post": { + "tags": [ + "v1" + ], + "summary": "Retrieves specified spectro cluster resource consumption", + "operationId": "v1SpectroClustersUidResourcesConsumption", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1ResourceConsumptionSpec" + } + } + ], + "responses": { + "200": { + "description": "An array of resource consumption data items", + "schema": { + "$ref": "#/definitions/v1ResourcesConsumption" + } + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/dashboard/spectroclusters/{uid}/workloads": { + "post": { + "tags": [ + "v1" + ], + "summary": "Retrieves specified cluster workloads", + "operationId": "v1DashboardSpectroClustersUidWorkloads", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1ClusterWorkloadsSpec" + } + } + ], + "responses": { + "200": { + "description": "An array of cluster workloads", + "schema": { + "$ref": "#/definitions/v1ClusterWorkload" + } + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/dashboard/spectroclusters/{uid}/workloads/clusterrolebinding": { + "post": { + "tags": [ + "v1" + ], + "summary": "Retrieves specified cluster workload clusterrolebindings", + "operationId": "v1DashboardSpectroClustersUidWorkloadsClusterRoleBinding", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1ClusterWorkloadsSpec" + } + } + ], + "responses": { + "200": { + "description": "An array of cluster workload clusterrolebindings", + "schema": { + "$ref": "#/definitions/v1ClusterWorkloadRoleBindings" + } + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/dashboard/spectroclusters/{uid}/workloads/cronjob": { + "post": { + "tags": [ + "v1" + ], + "summary": "Retrieves specified cluster workload cronjobs", + "operationId": "v1DashboardSpectroClustersUidWorkloadsCronJob", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1ClusterWorkloadsSpec" + } + } + ], + "responses": { + "200": { + "description": "An array of cluster workload cronjobs", + "schema": { + "$ref": "#/definitions/v1ClusterWorkloadCronJobs" + } + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/dashboard/spectroclusters/{uid}/workloads/daemonset": { + "post": { + "tags": [ + "v1" + ], + "summary": "Retrieves specified cluster workload daemonsets", + "operationId": "v1DashboardSpectroClustersUidWorkloadsDaemonSet", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1ClusterWorkloadsSpec" + } + } + ], + "responses": { + "200": { + "description": "An array of cluster workload daemonsets", + "schema": { + "$ref": "#/definitions/v1ClusterWorkloadDaemonSets" + } + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/dashboard/spectroclusters/{uid}/workloads/deployment": { + "post": { + "tags": [ + "v1" + ], + "summary": "Retrieves specified cluster workload deployments", + "operationId": "v1DashboardSpectroClustersUidWorkloadsDeployment", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1ClusterWorkloadsSpec" + } + } + ], + "responses": { + "200": { + "description": "An array of cluster workload deployments", + "schema": { + "$ref": "#/definitions/v1ClusterWorkloadDeployments" + } + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/dashboard/spectroclusters/{uid}/workloads/job": { + "post": { + "tags": [ + "v1" + ], + "summary": "Retrieves specified cluster workload jobs", + "operationId": "v1DashboardSpectroClustersUidWorkloadsJob", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1ClusterWorkloadsSpec" + } + } + ], + "responses": { + "200": { + "description": "An array of cluster workload jobs", + "schema": { + "$ref": "#/definitions/v1ClusterWorkloadJobs" + } + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/dashboard/spectroclusters/{uid}/workloads/namespace": { + "post": { + "tags": [ + "v1" + ], + "summary": "Retrieves specified cluster workload namespaces", + "operationId": "v1DashboardSpectroClustersUidWorkloadsNamespace", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1ClusterWorkloadsSpec" + } + } + ], + "responses": { + "200": { + "description": "An array of cluster workload namespaces", + "schema": { + "$ref": "#/definitions/v1ClusterWorkloadNamespaces" + } + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/dashboard/spectroclusters/{uid}/workloads/pod": { + "post": { + "tags": [ + "v1" + ], + "summary": "Retrieves specified cluster workload pods", + "operationId": "v1DashboardSpectroClustersUidWorkloadsPod", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1ClusterWorkloadsSpec" + } + } + ], + "responses": { + "200": { + "description": "An array of cluster workload pods", + "schema": { + "$ref": "#/definitions/v1ClusterWorkloadPods" + } + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/dashboard/spectroclusters/{uid}/workloads/rolebinding": { + "post": { + "tags": [ + "v1" + ], + "summary": "Retrieves specified cluster workload rolebindings", + "operationId": "v1DashboardSpectroClustersUidWorkloadsRoleBinding", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1ClusterWorkloadsSpec" + } + } + ], + "responses": { + "200": { + "description": "An array of cluster workload rolebindings", + "schema": { + "$ref": "#/definitions/v1ClusterWorkloadRoleBindings" + } + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/dashboard/spectroclusters/{uid}/workloads/statefulset": { + "post": { + "tags": [ + "v1" + ], + "summary": "Retrieves specified cluster workload statefulsets", + "operationId": "v1DashboardSpectroClustersUidWorkloadsStatefulSet", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1ClusterWorkloadsSpec" + } + } + ], + "responses": { + "200": { + "description": "An array of cluster workload statefulsets", + "schema": { + "$ref": "#/definitions/v1ClusterWorkloadStatefulSets" + } + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/dashboard/workspaces": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves a list of workspace", + "operationId": "v1DashboardWorkspacesList", + "responses": { + "200": { + "description": "An array of workspace", + "schema": { + "$ref": "#/definitions/v1DashboardWorkspaces" + } + } + } + } + }, + "/v1/dashboard/workspaces/{uid}/spectroclusters/workloads/clusterrolebinding": { + "post": { + "tags": [ + "v1" + ], + "summary": "Retrieves specified workspace clusters workload clusterrolebindings", + "operationId": "v1DashboardWorkspacesUidSpectroClustersWorkloadsClusterRoleBinding", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1WorkspaceWorkloadsSpec" + } + } + ], + "responses": { + "200": { + "description": "An array of clusters workload clusterrolebindings", + "schema": { + "$ref": "#/definitions/v1WorkspaceClustersWorkloadRoleBindings" + } + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/dashboard/workspaces/{uid}/spectroclusters/workloads/cronjob": { + "post": { + "tags": [ + "v1" + ], + "summary": "Retrieves specified workspace clusters workload cronjobs", + "operationId": "v1DashboardWorkspacesUidSpectroClustersWorkloadsCronJob", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1WorkspaceWorkloadsSpec" + } + } + ], + "responses": { + "200": { + "description": "An array of clusters workload cronjobs", + "schema": { + "$ref": "#/definitions/v1WorkspaceClustersWorkloadCronJobs" + } + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/dashboard/workspaces/{uid}/spectroclusters/workloads/daemonset": { + "post": { + "tags": [ + "v1" + ], + "summary": "Retrieves specified workspace clusters workload daemonsets", + "operationId": "v1DashboardWorkspacesUidSpectroClustersWorkloadsDaemonSet", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1WorkspaceWorkloadsSpec" + } + } + ], + "responses": { + "200": { + "description": "An array of clusters workload daemonsets", + "schema": { + "$ref": "#/definitions/v1WorkspaceClustersWorkloadDaemonSets" + } + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/dashboard/workspaces/{uid}/spectroclusters/workloads/deployment": { + "post": { + "tags": [ + "v1" + ], + "summary": "Retrieves specified workspace clusters workload deployments", + "operationId": "v1DashboardWorkspacesUidSpectroClustersWorkloadsDeployment", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1WorkspaceWorkloadsSpec" + } + } + ], + "responses": { + "200": { + "description": "An array of clusters workload deployments", + "schema": { + "$ref": "#/definitions/v1WorkspaceClustersWorkloadDeployments" + } + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/dashboard/workspaces/{uid}/spectroclusters/workloads/job": { + "post": { + "tags": [ + "v1" + ], + "summary": "Retrieves specified workspace clusters workload jobs", + "operationId": "v1DashboardWorkspacesUidSpectroClustersWorkloadsJob", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1WorkspaceWorkloadsSpec" + } + } + ], + "responses": { + "200": { + "description": "An array of clusters workload jobs", + "schema": { + "$ref": "#/definitions/v1WorkspaceClustersWorkloadJobs" + } + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/dashboard/workspaces/{uid}/spectroclusters/workloads/namespace": { + "post": { + "tags": [ + "v1" + ], + "summary": "Retrieves specified workspace clusters workload namespaces", + "operationId": "v1DashboardWorkspacesUidSpectroClustersWorkloadsNamespace", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1WorkspaceWorkloadsSpec" + } + } + ], + "responses": { + "200": { + "description": "An array of clusters workload namespaces", + "schema": { + "$ref": "#/definitions/v1WorkspaceClustersWorkloadNamespaces" + } + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/dashboard/workspaces/{uid}/spectroclusters/workloads/pod": { + "post": { + "tags": [ + "v1" + ], + "summary": "Retrieves specified workspace clusters workload pods", + "operationId": "v1DashboardWorkspacesUidSpectroClustersWorkloadsPod", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1WorkspaceWorkloadsSpec" + } + } + ], + "responses": { + "200": { + "description": "An array of clusters workload pods", + "schema": { + "$ref": "#/definitions/v1WorkspaceClustersWorkloadPods" + } + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/dashboard/workspaces/{uid}/spectroclusters/workloads/rolebinding": { + "post": { + "tags": [ + "v1" + ], + "summary": "Retrieves specified workspace clusters workload rolebindings", + "operationId": "v1DashboardWorkspacesUidSpectroClustersWorkloadsRoleBinding", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1WorkspaceWorkloadsSpec" + } + } + ], + "responses": { + "200": { + "description": "An array of clusters workload rolebindings", + "schema": { + "$ref": "#/definitions/v1WorkspaceClustersWorkloadRoleBindings" + } + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/dashboard/workspaces/{uid}/spectroclusters/workloads/statefulset": { + "post": { + "tags": [ + "v1" + ], + "summary": "Retrieves specified workspace clusters workload statefulsets", + "operationId": "v1DashboardWorkspacesUidSpectroClustersWorkloadsStatefulSet", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1WorkspaceWorkloadsSpec" + } + } + ], + "responses": { + "200": { + "description": "An array of clusters workload statefulsets", + "schema": { + "$ref": "#/definitions/v1WorkspaceClustersWorkloadStatefulSets" + } + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/datasinks/cloudwatch": { + "post": { + "description": "Sync data to cloud watch", + "tags": [ + "v1" + ], + "summary": "sync data to cloud watch", + "operationId": "V1DataSinksCloudWatchSink", + "parameters": [ + { + "description": "Request payload for cloud watch config", + "name": "dataSinkCloudWatchConfig", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1.DataSinkCloudWatchConfig" + } + } + ], + "responses": { + "204": { + "description": "Ok response without content", + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + } + }, + "/v1/edgehosts": { + "post": { + "tags": [ + "v1" + ], + "summary": "Create the edge host device", + "operationId": "v1EdgeHostDevicesCreate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1EdgeHostDeviceEntity" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + } + }, + "/v1/edgehosts/metadata": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves a list of edge hosts metadata matching the filter condition", + "operationId": "v1EdgeHostsMetadataQuickFilterGet", + "parameters": [ + { + "enum": [ + "libvirt", + "edge-native", + "vsphere" + ], + "type": "string", + "name": "type", + "in": "query" + }, + { + "enum": [ + "unusedEdgeHosts" + ], + "type": "string", + "name": "quickFilter", + "in": "query" + } + ], + "responses": { + "200": { + "description": "An array of edge host metadata", + "schema": { + "$ref": "#/definitions/v1EdgeHostsMeta" + } + } + } + } + }, + "/v1/edgehosts/register": { + "post": { + "tags": [ + "v1" + ], + "summary": "Registers the edge host device", + "operationId": "v1EdgeHostDevicesRegister", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1EdgeHostDevice" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1EdgeHostDevice" + } + } + } + } + }, + "/v1/edgehosts/tags": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves a list of edge hosts tags", + "operationId": "v1EdgeHostsTagsGet", + "responses": { + "200": { + "description": "An array of edge hosts tags", + "schema": { + "$ref": "#/definitions/v1EdgeHostsTags" + } + } + } + } + }, + "/v1/edgehosts/tokens": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves a list of edge tokens", + "operationId": "v1EdgeTokensList", + "responses": { + "200": { + "description": "An array of edge tokens", + "schema": { + "$ref": "#/definitions/v1EdgeTokens" + } + } + } + }, + "post": { + "tags": [ + "v1" + ], + "summary": "Create the edge token", + "operationId": "v1EdgeTokensCreate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1EdgeTokenEntity" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + } + }, + "/v1/edgehosts/tokens/{uid}": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the specified edge token", + "operationId": "v1EdgeTokensUidGet", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1EdgeToken" + } + } + } + }, + "put": { + "tags": [ + "v1" + ], + "summary": "Updates the specified edge token", + "operationId": "v1EdgeTokensUidUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1EdgeTokenUpdate" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "delete": { + "tags": [ + "v1" + ], + "summary": "Deletes the specified edge token", + "operationId": "v1EdgeTokensUidDelete", + "responses": { + "204": { + "description": "The resource was deleted successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Edge token uid", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/edgehosts/tokens/{uid}/state": { + "put": { + "tags": [ + "v1" + ], + "summary": "Revoke or re-activate the edge token access", + "operationId": "v1EdgeTokensUidState", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1EdgeTokenActiveState" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Edge token uid", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/edgehosts/{uid}": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the specified edge host device", + "operationId": "v1EdgeHostDevicesUidGet", + "parameters": [ + { + "type": "boolean", + "default": false, + "description": "resolve pack values if set to true", + "name": "resolvePackValues", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1EdgeHostDevice" + } + } + } + }, + "put": { + "tags": [ + "v1" + ], + "summary": "Updates the specified edge host device", + "operationId": "v1EdgeHostDevicesUidUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1EdgeHostDevice" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "delete": { + "tags": [ + "v1" + ], + "summary": "Deletes the specified edge host device", + "operationId": "v1EdgeHostDevicesUidDelete", + "responses": { + "204": { + "description": "The resource was deleted successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/edgehosts/{uid}/cluster/associate": { + "delete": { + "tags": [ + "v1" + ], + "summary": "Deassociate the clusters to the edge host", + "operationId": "v1EdgeHostDevicesUidClusterDeassociate", + "responses": { + "204": { + "description": "The resource was deleted successfully" + } + } + }, + "patch": { + "tags": [ + "v1" + ], + "summary": "Associate the clusters to the edge host", + "operationId": "v1EdgeHostDevicesUidClusterAssociate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1EdgeHostClusterEntity" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/edgehosts/{uid}/health": { + "patch": { + "tags": [ + "v1" + ], + "summary": "Updates the edge host health", + "operationId": "v1EdgeHostDevicesHealthUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1EdgeHostHealth" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/edgehosts/{uid}/hostCheckSum": { + "patch": { + "tags": [ + "v1" + ], + "summary": "Update the specified edge host device host check sum", + "operationId": "v1EdgeHostDeviceHostCheckSumUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1EdgeHostDeviceHostCheckSum" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/edgehosts/{uid}/hostPairingKey": { + "patch": { + "tags": [ + "v1" + ], + "summary": "Update the specified edge host device host pairing key", + "operationId": "v1EdgeHostDeviceHostPairingKeyUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1EdgeHostDeviceHostPairingKey" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/edgehosts/{uid}/meta": { + "put": { + "tags": [ + "v1" + ], + "summary": "Updates the specified edge host device meta", + "operationId": "v1EdgeHostDevicesUidMetaUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1EdgeHostDeviceMetaUpdateEntity" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/edgehosts/{uid}/pack/manifests/{manifestUid}": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the specified edge host's manifest", + "operationId": "v1EdgeHostDevicesUidPackManifestsUidGet", + "parameters": [ + { + "type": "string", + "description": "edge host uid", + "name": "uid", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "manifest uid which is part of the pack ref", + "name": "manifestUid", + "in": "path", + "required": true + }, + { + "type": "boolean", + "default": false, + "description": "resolve pack manifest values if set to true", + "name": "resolveManifestValues", + "in": "query" + } + ], + "responses": { + "200": { + "description": "Pack manifest content", + "schema": { + "$ref": "#/definitions/v1Manifest" + } + } + } + } + }, + "/v1/edgehosts/{uid}/packs/status": { + "patch": { + "tags": [ + "v1" + ], + "summary": "Patch update specified edge host's packs status", + "operationId": "v1EdgeHostDevicesUidPacksStatusPatch", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1SpectroClusterPacksStatusEntity" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/edgehosts/{uid}/profiles": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the associated profiles of a specified edge host device", + "operationId": "v1EdgeHostDevicesUidProfilesGet", + "parameters": [ + { + "type": "string", + "description": "includes pack meta such as schema, presets", + "name": "includePackMeta", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1SpectroClusterProfileList" + } + } + } + }, + "put": { + "tags": [ + "v1" + ], + "summary": "Associate cluster profiles to the specified edge host device", + "operationId": "v1EdgeHostDevicesUidProfilesUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1SpectroClusterProfiles" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/edgehosts/{uid}/reset": { + "put": { + "tags": [ + "v1" + ], + "summary": "Reset the cluster through edge host", + "operationId": "V1EdgeHostsUidReset", + "responses": { + "204": { + "description": "Ok response without content", + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Edge host uid", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/edgehosts/{uid}/spc/download": { + "get": { + "produces": [ + "application/octet-stream" + ], + "tags": [ + "v1" + ], + "summary": "Download the specified edge host device spc", + "operationId": "v1EdgeHostDevicesUidSpcDownload", + "responses": { + "200": { + "description": "download spc archive file", + "schema": { + "type": "string", + "format": "binary" + }, + "headers": { + "Content-Disposition": { + "type": "string" + } + } + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/edgehosts/{uid}/vsphere/properties": { + "put": { + "tags": [ + "v1" + ], + "summary": "Updates the specified edge host device vsphere properties", + "operationId": "v1EdgeHostDevicesUidVspherePropertiesUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1EdgeHostVsphereCloudProperties" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/events/components": { + "get": { + "description": "Returns a paginated list of component events based on request parameters", + "tags": [ + "v1" + ], + "summary": "Returns a paginated list of component events based on request parameters", + "operationId": "v1EventsComponentsList", + "parameters": [ + { + "type": "string", + "description": "Set of fields to be presented in the response with values. The fields are comma separated. Eg: metadata.uid,metadata.name", + "name": "fields", + "in": "query" + }, + { + "type": "string", + "description": "Filters can be combined with AND, OR operators with field path name. Eg: metadata.name=TestServiceANDspec.cloudType=aws\n\nServer will be restricted to certain fields based on the indexed data for each resource.", + "name": "filters", + "in": "query" + }, + { + "type": "string", + "description": "Specify the fields with sort order. 1 indicates ascending and -1 for descending. Eg: orderBy=metadata.name=1,metadata.uid=-1", + "name": "orderBy", + "in": "query" + }, + { + "type": "integer", + "format": "int64", + "default": 50, + "description": "limit is a maximum number of responses to return for a list call. Default and maximum value of the limit is 50.\nIf more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results.", + "name": "limit", + "in": "query" + }, + { + "type": "integer", + "format": "int64", + "description": "offset is the next index number from which the response will start. The response offset value can be used along with continue token for the pagination.", + "name": "offset", + "in": "query" + }, + { + "type": "string", + "description": "continue token to paginate the subsequent data items", + "name": "continue", + "in": "query" + } + ], + "responses": { + "200": { + "description": "An array of component events items", + "schema": { + "$ref": "#/definitions/v1Events" + } + } + } + }, + "post": { + "description": "Creates a component event", + "tags": [ + "v1" + ], + "summary": "Creates a component event", + "operationId": "v1EventsComponentsCreate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1Event" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + } + }, + "/v1/events/components/bulk": { + "post": { + "description": "Creates the component events in bulk", + "tags": [ + "v1" + ], + "summary": "Creates the component events in bulk", + "operationId": "v1EventsComponentsCreateBulk", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1BulkEvents" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uids" + } + } + } + } + }, + "/v1/events/components/{objectKind}/{objectUid}": { + "get": { + "description": "Returns a list of components events for the specified related object", + "tags": [ + "v1" + ], + "summary": "Returns a list of components events for the specified related object", + "operationId": "v1EventsComponentsObjTypeUidList", + "parameters": [ + { + "type": "string", + "description": "Set of fields to be presented in the response with values. The fields are comma separated. Eg: metadata.uid,metadata.name", + "name": "fields", + "in": "query" + }, + { + "type": "string", + "description": "Filters can be combined with AND, OR operators with field path name. Eg: metadata.name=TestServiceANDspec.cloudType=aws\n\nServer will be restricted to certain fields based on the indexed data for each resource.", + "name": "filters", + "in": "query" + }, + { + "type": "string", + "description": "Specify the fields with sort order. 1 indicates ascending and -1 for descending. Eg: orderBy=metadata.name=1,metadata.uid=-1", + "name": "orderBy", + "in": "query" + }, + { + "type": "integer", + "format": "int64", + "default": 50, + "description": "limit is a maximum number of responses to return for a list call. Default and maximum value of the limit is 50.\nIf more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results.", + "name": "limit", + "in": "query" + }, + { + "type": "integer", + "format": "int64", + "description": "offset is the next index number from which the response will start. The response offset value can be used along with continue token for the pagination.", + "name": "offset", + "in": "query" + }, + { + "type": "string", + "description": "continue token to paginate the subsequent data items", + "name": "continue", + "in": "query" + } + ], + "responses": { + "200": { + "description": "An array of component event items", + "schema": { + "$ref": "#/definitions/v1Events" + } + } + } + }, + "delete": { + "tags": [ + "v1" + ], + "summary": "Delete all the components events for the specified related object", + "operationId": "v1EventsComponentsObjTypeUidDelete", + "responses": { + "204": { + "description": "The resource was deleted successfully" + } + } + }, + "parameters": [ + { + "enum": [ + "spectrocluster", + "edgehost" + ], + "type": "string", + "description": "Describes the related object uid for which events has to be fetched", + "name": "objectKind", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Describes the related object kind for which events has to be fetched", + "name": "objectUid", + "in": "path", + "required": true + } + ] + }, + "/v1/features": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves the list of features", + "operationId": "v1FeaturesList", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1Features" + } + } + } + } + }, + "/v1/features/{uid}": { + "put": { + "tags": [ + "v1" + ], + "summary": "Update a feature", + "operationId": "v1FeaturesUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1FeatureUpdate" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Specify the feature uid", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/filters": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns a list of Filters", + "operationId": "v1FiltersList", + "parameters": [ + { + "type": "integer", + "format": "int64", + "default": 50, + "description": "limit is a maximum number of responses to return for a list call. Default and maximum value of the limit is 50.\nIf more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results.", + "name": "limit", + "in": "query" + }, + { + "type": "integer", + "format": "int64", + "description": "offset is the next index number from which the response will start. The response offset value can be used along with continue token for the pagination.", + "name": "offset", + "in": "query" + }, + { + "type": "string", + "description": "continue token to paginate the subsequent data items", + "name": "continue", + "in": "query" + } + ], + "responses": { + "200": { + "description": "An array of filters", + "schema": { + "$ref": "#/definitions/v1FiltersSummary" + } + } + } + } + }, + "/v1/filters/metadata": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns a list of Filters metadata", + "operationId": "v1FiltersMetadata", + "parameters": [ + { + "type": "string", + "description": "filterType can be - [tag, meta, resource]", + "name": "filterType", + "in": "query" + } + ], + "responses": { + "200": { + "description": "An array of filters", + "schema": { + "$ref": "#/definitions/v1FiltersMetadata" + } + } + } + } + }, + "/v1/filters/tag": { + "post": { + "tags": [ + "v1" + ], + "summary": "Creates a Tag filter", + "operationId": "v1TagFiltersCreate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1TagFilter" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + } + }, + "/v1/filters/tag/{uid}": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the specified Filter object", + "operationId": "v1TagFilterUidGet", + "responses": { + "200": { + "description": "A Filter object", + "schema": { + "$ref": "#/definitions/v1TagFilterSummary" + } + } + } + }, + "put": { + "tags": [ + "v1" + ], + "summary": "Updates a Tag filter", + "operationId": "v1TagFilterUidUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1TagFilter" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "delete": { + "tags": [ + "v1" + ], + "summary": "Delete the specified Filter object", + "operationId": "v1TagFilterUidDelete", + "responses": { + "204": { + "description": "The resource was deleted successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/metrics/{resourceKind}/values": { + "get": { + "description": "Returns all the metrics for a given resource kind", + "tags": [ + "v1" + ], + "summary": "Retrieves the list of metrics for a specified resource kind", + "operationId": "v1MetricsList", + "parameters": [ + { + "enum": [ + "pod", + "namespace", + "spectrocluster", + "machine", + "project" + ], + "type": "string", + "name": "resourceKind", + "in": "path", + "required": true + }, + { + "type": "string", + "default": "all", + "name": "metricKind", + "in": "query" + }, + { + "type": "string", + "format": "date-time", + "description": "Time is a wrapper around time.Time which supports correct marshaling to YAML and JSON. Wrappers are provided for many of the factory methods that the time package offers.", + "name": "startTime", + "in": "query" + }, + { + "type": "string", + "format": "date-time", + "description": "Time is a wrapper around time.Time which supports correct marshaling to YAML and JSON. Wrappers are provided for many of the factory methods that the time package offers.", + "name": "endTime", + "in": "query" + }, + { + "type": "integer", + "format": "int32", + "default": 1, + "name": "period", + "in": "query" + }, + { + "type": "boolean", + "default": false, + "description": "Deprecated. includeMasterMachines in boolean, group the data point by including control plane nodes if set to true", + "name": "includeMasterMachines", + "in": "query" + }, + { + "type": "boolean", + "default": false, + "description": "includeControlPlaneMachines in boolean, group the data point by including control plane nodes if set to true", + "name": "includeControlPlaneMachines", + "in": "query" + }, + { + "type": "boolean", + "default": false, + "description": "if true then api returns only aggregation values, else api returns all data points by default", + "name": "discrete", + "in": "query" + }, + { + "type": "string", + "name": "spectroClusterUid", + "in": "query" + } + ], + "responses": { + "200": { + "description": "An array of metric items", + "schema": { + "$ref": "#/definitions/v1MetricTimeSeriesList" + } + } + } + } + }, + "/v1/metrics/{resourceKind}/{resourceUid}/values": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the metrics for a specified resource uid", + "operationId": "v1MetricsUidList", + "parameters": [ + { + "enum": [ + "pod", + "namespace", + "spectrocluster", + "machine", + "project" + ], + "type": "string", + "name": "resourceKind", + "in": "path", + "required": true + }, + { + "type": "string", + "name": "resourceUid", + "in": "path", + "required": true + }, + { + "type": "string", + "default": "all", + "description": "multiple metric kinds can be provided with comma separated", + "name": "metricKind", + "in": "query" + }, + { + "type": "string", + "format": "date-time", + "description": "Time is a wrapper around time.Time which supports correct marshaling to YAML and JSON. Wrappers are provided for many of the factory methods that the time package offers.", + "name": "startTime", + "in": "query" + }, + { + "type": "string", + "format": "date-time", + "description": "Time is a wrapper around time.Time which supports correct marshaling to YAML and JSON. Wrappers are provided for many of the factory methods that the time package offers.", + "name": "endTime", + "in": "query" + }, + { + "type": "integer", + "format": "int32", + "default": 1, + "description": "period in minutes, group the data point by the specified period", + "name": "period", + "in": "query" + }, + { + "type": "boolean", + "default": false, + "description": "Deprecated. includeMasterMachines in boolean, group the data point by including control plane nodes if set to true", + "name": "includeMasterMachines", + "in": "query" + }, + { + "type": "boolean", + "default": false, + "description": "includeControlPlaneMachines in boolean, group the data point by including control plane nodes if set to true", + "name": "includeControlPlaneMachines", + "in": "query" + }, + { + "type": "boolean", + "default": false, + "description": "if true then api returns only aggregation values, else api returns all data points by default", + "name": "discrete", + "in": "query" + } + ], + "responses": { + "200": { + "description": "An array of metric items", + "schema": { + "$ref": "#/definitions/v1MetricTimeSeries" + } + } + } + }, + "delete": { + "tags": [ + "v1" + ], + "summary": "Deletes the metrics of the specified resource", + "operationId": "v1MetricsUidDelete", + "parameters": [ + { + "enum": [ + "pod", + "namespace", + "spectrocluster", + "machine", + "project" + ], + "type": "string", + "name": "resourceKind", + "in": "path", + "required": true + }, + { + "type": "string", + "name": "resourceUid", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "description": "The resource was deleted successfully" + } + } + } + }, + "/v1/notifications/": { + "get": { + "description": "Returns a paginated list of notifications based on request parameters", + "tags": [ + "v1" + ], + "summary": "Returns a paginated list of notifications based on request parameters", + "operationId": "v1NotificationsList", + "parameters": [ + { + "type": "string", + "description": "Set of fields to be presented in the response with values. The fields are comma separated. Eg: metadata.uid,metadata.name", + "name": "fields", + "in": "query" + }, + { + "type": "string", + "description": "Filters can be combined with AND, OR operators with field path name. Eg: metadata.name=TestServiceANDspec.cloudType=aws\n\nServer will be restricted to certain fields based on the indexed data for each resource.", + "name": "filters", + "in": "query" + }, + { + "type": "string", + "description": "Specify the fields with sort order. 1 indicates ascending and -1 for descending. Eg: orderBy=metadata.name=1,metadata.uid=-1", + "name": "orderBy", + "in": "query" + }, + { + "type": "integer", + "format": "int64", + "default": 50, + "description": "limit is a maximum number of responses to return for a list call. Default and maximum value of the limit is 50.\nIf more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results.", + "name": "limit", + "in": "query" + }, + { + "type": "integer", + "format": "int64", + "description": "offset is the next index number from which the response will start. The response offset value can be used along with continue token for the pagination.", + "name": "offset", + "in": "query" + }, + { + "type": "string", + "description": "continue token to paginate the subsequent data items", + "name": "continue", + "in": "query" + } + ], + "responses": { + "200": { + "description": "An array of notification items", + "schema": { + "$ref": "#/definitions/v1Notifications" + } + } + } + } + }, + "/v1/notifications/events": { + "post": { + "description": "Creates a notification event", + "tags": [ + "v1" + ], + "summary": "Creates a notification event", + "operationId": "v1NotificationsEventCreate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1NotificationEvent" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + } + }, + "/v1/notifications/{objectKind}/{objectUid}": { + "get": { + "description": "Returns a list of notifications for the specified related object", + "tags": [ + "v1" + ], + "summary": "Returns a list of notifications for the specified related object", + "operationId": "v1NotificationsObjTypeUidList", + "parameters": [ + { + "type": "string", + "description": "Set of fields to be presented in the response with values. The fields are comma separated. Eg: metadata.uid,metadata.name", + "name": "fields", + "in": "query" + }, + { + "type": "string", + "description": "Filters can be combined with AND, OR operators with field path name. Eg: metadata.name=TestServiceANDspec.cloudType=aws\n\nServer will be restricted to certain fields based on the indexed data for each resource.", + "name": "filters", + "in": "query" + }, + { + "type": "string", + "description": "Specify the fields with sort order. 1 indicates ascending and -1 for descending. Eg: orderBy=metadata.name=1,metadata.uid=-1", + "name": "orderBy", + "in": "query" + }, + { + "type": "integer", + "format": "int64", + "default": 50, + "description": "limit is a maximum number of responses to return for a list call. Default and maximum value of the limit is 50.\nIf more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results.", + "name": "limit", + "in": "query" + }, + { + "type": "integer", + "format": "int64", + "description": "offset is the next index number from which the response will start. The response offset value can be used along with continue token for the pagination.", + "name": "offset", + "in": "query" + }, + { + "type": "string", + "description": "continue token to paginate the subsequent data items", + "name": "continue", + "in": "query" + } + ], + "responses": { + "200": { + "description": "An array of component event items", + "schema": { + "$ref": "#/definitions/v1Notifications" + } + } + } + }, + "parameters": [ + { + "enum": [ + "spectrocluster", + "clusterprofile", + "appdeployment" + ], + "type": "string", + "description": "Describes the related object kind for which notifications have to be fetched", + "name": "objectKind", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Describes the related object uid for which notifications have to be fetched", + "name": "objectUid", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Describes a way to fetch \"done\" notifications", + "name": "isDone", + "in": "query" + } + ] + }, + "/v1/notifications/{uid}/ack": { + "patch": { + "description": "Updates the specified notification for the acknowledgment", + "tags": [ + "v1" + ], + "summary": "Updates the specified notification for the acknowledgment", + "operationId": "v1NotificationsUidAck", + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Describes acknowledging notification uid", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/notifications/{uid}/done": { + "patch": { + "description": "Updates the specified notification action as done", + "tags": [ + "v1" + ], + "summary": "Updates the specified notification action as done", + "operationId": "v1NotificationsUidDone", + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Describes notification uid", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/overlords": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves a list of overlords owned by the tenant", + "operationId": "v1OverlordsList", + "parameters": [ + { + "type": "string", + "name": "name", + "in": "query" + } + ], + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1Overlords" + } + } + } + } + }, + "/v1/overlords/maas/manifest": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the manifests required for the private gateway installation", + "operationId": "V1OverlordsMaasManifest", + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1OverlordManifest" + } + } + } + }, + "parameters": [ + { + "type": "string", + "name": "pairingCode", + "in": "query", + "required": true + } + ] + }, + "/v1/overlords/maas/{uid}/account": { + "put": { + "tags": [ + "v1" + ], + "summary": "update the maas cloudaccount for the private gateway", + "operationId": "v1OverlordsUidMaasAccountUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1OverlordMaasAccountEntity" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "post": { + "tags": [ + "v1" + ], + "summary": "create the maas cloudaccount for the private gateway", + "operationId": "v1OverlordsUidMaasAccountCreate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1OverlordMaasAccountCreate" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/overlords/maas/{uid}/account/validate": { + "post": { + "tags": [ + "v1" + ], + "summary": "validate the maas cloudaccount for the private gateway", + "operationId": "v1OverlordsUidMaasAccountValidate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "properties": { + "account": { + "$ref": "#/definitions/v1MaasCloudAccount" + } + } + } + } + ], + "responses": { + "204": { + "description": "Ok response without content", + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/overlords/maas/{uid}/cloudconfig": { + "put": { + "tags": [ + "v1" + ], + "summary": "update the maas cloud config for the private gateway", + "operationId": "V1OverlordsUidMaasCloudConfigUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1OverlordMaasCloudConfig" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "post": { + "tags": [ + "v1" + ], + "summary": "create the maas cloud config for the private gateway", + "operationId": "V1OverlordsUidMaasCloudConfigCreate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1OverlordMaasCloudConfig" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/overlords/maas/{uid}/clusterprofile": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the specified maas private gateway cluster profile", + "operationId": "v1OverlordsUidMaasClusterProfile", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1ClusterProfile" + } + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/overlords/migrate": { + "post": { + "tags": [ + "v1" + ], + "summary": "migrate all the clusters from source overlord to target overlord", + "operationId": "V1OverlordsMigrate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1OverlordMigrateEntity" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + } + }, + "/v1/overlords/openstack/manifest": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the manifests required for the private gateway installation", + "operationId": "v1OverlordsOpenStackManifest", + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1OverlordManifest" + } + } + } + }, + "parameters": [ + { + "type": "string", + "name": "pairingCode", + "in": "query", + "required": true + } + ] + }, + "/v1/overlords/openstack/{uid}/account": { + "put": { + "tags": [ + "v1" + ], + "summary": "update the OpenStack cloudaccount for the private gateway", + "operationId": "v1OverlordsUidOpenStackAccountUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1OverlordOpenStackAccountEntity" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "post": { + "tags": [ + "v1" + ], + "summary": "create the OpenStack cloudaccount for the private gateway", + "operationId": "v1OverlordsUidOpenStackAccountCreate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1OverlordOpenStackAccountCreate" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/overlords/openstack/{uid}/account/validate": { + "post": { + "tags": [ + "v1" + ], + "summary": "validate the OpenStack cloudaccount for the private gateway", + "operationId": "v1OverlordsUidOpenStackAccountValidate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "properties": { + "account": { + "$ref": "#/definitions/v1OpenStackCloudAccount" + } + } + } + } + ], + "responses": { + "204": { + "description": "Ok response without content", + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/overlords/openstack/{uid}/cloudconfig": { + "put": { + "tags": [ + "v1" + ], + "summary": "update the OpenStack cloud config for the private gateway", + "operationId": "v1OverlordsUidOpenStackCloudConfigUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1OverlordOpenStackCloudConfig" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "post": { + "tags": [ + "v1" + ], + "summary": "create the OpenStack cloud config for the private gateway", + "operationId": "v1OverlordsUidOpenStackCloudConfigCreate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1OverlordOpenStackCloudConfig" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/overlords/openstack/{uid}/clusterprofile": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the specified OpenStack private gateway cluster profile", + "operationId": "v1OverlordsUidOpenStackClusterProfile", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1ClusterProfile" + } + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/overlords/pairing/code": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the pairing code for the private gateway", + "operationId": "v1OverlordsPairingCode", + "parameters": [ + { + "enum": [ + "vsphere", + "openstack", + "maas" + ], + "type": "string", + "name": "cloudType", + "in": "query" + } + ], + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1PairingCode" + } + } + } + } + }, + "/v1/overlords/vsphere/manifest": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the manifests required for the private gateway installation", + "operationId": "v1OverlordsVsphereManifest", + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1OverlordManifest" + } + } + } + }, + "parameters": [ + { + "type": "string", + "name": "pairingCode", + "in": "query", + "required": true + } + ] + }, + "/v1/overlords/vsphere/ova": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns overlord's ova information", + "operationId": "v1OverlordsVsphereOvaGet", + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1OverloadVsphereOva" + } + } + } + } + }, + "/v1/overlords/vsphere/{uid}/account": { + "put": { + "tags": [ + "v1" + ], + "summary": "update the vSphere cloudaccount for the private gateway", + "operationId": "v1OverlordsUidVsphereAccountUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1OverlordVsphereAccountEntity" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "post": { + "tags": [ + "v1" + ], + "summary": "create the vSphere cloudaccount for the private gateway", + "operationId": "v1OverlordsUidVsphereAccountCreate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1OverlordVsphereAccountCreate" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/overlords/vsphere/{uid}/account/validate": { + "post": { + "tags": [ + "v1" + ], + "summary": "validate the vSphere cloudaccount for the private gateway", + "operationId": "v1OverlordsUidVsphereAccountValidate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "properties": { + "account": { + "$ref": "#/definitions/v1VsphereCloudAccount" + } + } + } + } + ], + "responses": { + "204": { + "description": "Ok response without content", + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/overlords/vsphere/{uid}/cloudconfig": { + "put": { + "tags": [ + "v1" + ], + "summary": "update the vSphere cloud config for the private gateway", + "operationId": "v1OverlordsUidVsphereCloudConfigUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1OverlordVsphereCloudConfig" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "post": { + "tags": [ + "v1" + ], + "summary": "create the vSphere cloud config for the private gateway", + "operationId": "v1OverlordsUidVsphereCloudConfigCreate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1OverlordVsphereCloudConfig" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/overlords/vsphere/{uid}/clusterprofile": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the specified vsphere private gateway cluster profile", + "operationId": "v1OverlordsUidVsphereClusterProfile", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1ClusterProfile" + } + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/overlords/vsphere/{uid}/pools": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves a list of IP Pools for the specified private gateway", + "operationId": "v1OverlordsUidPoolsList", + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1IpPools" + } + } + } + }, + "post": { + "tags": [ + "v1" + ], + "summary": "Creates an IP pool defintion for the sepcified private gateway", + "operationId": "v1OverlordsUidPoolCreate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1IpPoolInputEntity" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/overlords/vsphere/{uid}/pools/{poolUid}": { + "put": { + "tags": [ + "v1" + ], + "summary": "Updates the private gateways's specified IP Pool data", + "operationId": "v1OverlordsUidPoolUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1IpPoolInputEntity" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "delete": { + "tags": [ + "v1" + ], + "summary": "Deletes the private gateways's specified IP Pool data", + "operationId": "v1OverlordsUidPoolDelete", + "responses": { + "204": { + "description": "The resource was deleted successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + }, + { + "type": "string", + "name": "poolUid", + "in": "path", + "required": true + } + ] + }, + "/v1/overlords/vsphere/{uid}/properties/computecluster/resources": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves the vSphere computecluster resources for the specified private gateway's account", + "operationId": "v1OverlordsUidVsphereComputeclusterRes", + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1VsphereComputeClusterResources" + } + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + }, + { + "type": "string", + "name": "datacenter", + "in": "query", + "required": true + }, + { + "type": "string", + "name": "computecluster", + "in": "query", + "required": true + } + ] + }, + "/v1/overlords/vsphere/{uid}/properties/datacenters": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves the vSphere datacenters \u0026 datacluster for the specified private gateway's account", + "operationId": "v1OverlordsUidVsphereDatacenters", + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1VsphereDatacenters" + } + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/overlords/{uid}": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the specified private gateway's for the given uid", + "operationId": "v1OverlordsUidGet", + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1Overlord" + } + } + } + }, + "delete": { + "tags": [ + "v1" + ], + "summary": "delete the private gateway", + "operationId": "v1OverlordsUidDelete", + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1DeletedMsg" + } + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/overlords/{uid}/metadata": { + "put": { + "tags": [ + "v1" + ], + "summary": "update the private gateway's metadata", + "operationId": "v1OverlordsUidMetadataUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1ObjectMetaInputEntitySchema" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/overlords/{uid}/reset": { + "put": { + "tags": [ + "v1" + ], + "summary": "reset the private gateway by disaaociating the private gateway's resources", + "operationId": "v1OverlordsUidReset", + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1UpdatedMsg" + } + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/packs": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves a list of packs", + "operationId": "v1PacksSummaryList", + "parameters": [ + { + "type": "string", + "description": "Set of fields to be presented in the response with values. The fields are comma separated. Eg: metadata.uid,metadata.name", + "name": "fields", + "in": "query" + }, + { + "type": "string", + "description": "Filters can be combined with AND, OR operators with field path name. Eg: metadata.name=TestServiceANDspec.cloudType=aws\n\nServer will be restricted to certain fields based on the indexed data for each resource.", + "name": "filters", + "in": "query" + }, + { + "type": "string", + "description": "Specify the fields with sort order. 1 indicates ascending and -1 for descending. Eg: orderBy=metadata.name=1,metadata.uid=-1", + "name": "orderBy", + "in": "query" + }, + { + "type": "integer", + "format": "int64", + "default": 50, + "description": "limit is a maximum number of responses to return for a list call. Default and maximum value of the limit is 50.\nIf more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results.", + "name": "limit", + "in": "query" + }, + { + "type": "integer", + "format": "int64", + "description": "offset is the next index number from which the response will start. The response offset value can be used along with continue token for the pagination.", + "name": "offset", + "in": "query" + }, + { + "type": "string", + "description": "continue token to paginate the subsequent data items", + "name": "continue", + "in": "query" + } + ], + "responses": { + "200": { + "description": "An array of pack summary items", + "schema": { + "$ref": "#/definitions/v1PackSummaries" + } + } + } + }, + "delete": { + "tags": [ + "v1" + ], + "summary": "Deletes the packs", + "operationId": "v1PacksSummaryDelete", + "parameters": [ + { + "type": "string", + "description": "Filters can be combined with AND, OR operators with field path name. Eg: metadata.name=TestServiceANDspec.cloudType=aws\n\nServer will be restricted to certain fields based on the indexed data for each resource.", + "name": "filters", + "in": "query" + } + ], + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1DeleteMeta" + } + } + } + } + }, + "/v1/packs/search": { + "post": { + "tags": [ + "v1" + ], + "summary": "Retrieves a list of packs based on filter", + "operationId": "v1PacksSearch", + "parameters": [ + { + "type": "integer", + "format": "int64", + "default": 50, + "description": "limit is a maximum number of responses to return for a list call. Default and maximum value of the limit is 50.\nIf more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results.", + "name": "limit", + "in": "query" + }, + { + "type": "integer", + "format": "int64", + "description": "offset is the next index number from which the response will start. The response offset value can be used along with continue token for the pagination.", + "name": "offset", + "in": "query" + }, + { + "type": "string", + "description": "continue token to paginate the subsequent data items", + "name": "continue", + "in": "query" + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1PacksFilterSpec" + } + } + ], + "responses": { + "200": { + "description": "An array of pack summary items", + "schema": { + "$ref": "#/definitions/v1PackMetadataList" + } + } + } + } + }, + "/v1/packs/{packName}/registries/{registryUid}": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves a list of packs", + "operationId": "v1PacksNameRegistryUidList", + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1PackTagEntity" + } + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Pack registry uid", + "name": "registryUid", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Pack name", + "name": "packName", + "in": "path", + "required": true + }, + { + "type": "string", + "default": "all", + "description": "Pack cloud type", + "name": "cloudType", + "in": "query" + }, + { + "type": "string", + "description": "Pack layer", + "name": "layer", + "in": "query" + }, + { + "type": "string", + "description": "Comma seperated pack states. Example values are \"deprecated\" \"deprecated,disabled\". If states is not specified or empty then by default API will return all packs except \"disabled\" packs", + "name": "states", + "in": "query" + } + ] + }, + "/v1/packs/{packUid}/logo": { + "get": { + "produces": [ + "image/png", + "image/gif", + "image/jpeg" + ], + "tags": [ + "v1" + ], + "summary": "Returns the logo for a specified pack", + "operationId": "v1PacksPackUidLogo", + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "string", + "format": "binary" + }, + "headers": { + "Cache-Control": { + "type": "string", + "description": "Cache control directive for the response" + }, + "Expires": { + "type": "string" + } + } + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Pack uid", + "name": "packUid", + "in": "path", + "required": true + } + ] + }, + "/v1/packs/{uid}": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the specified pack", + "operationId": "v1PacksUid", + "responses": { + "200": { + "description": "A pack for the specified uid", + "schema": { + "$ref": "#/definitions/v1PackTagEntity" + } + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Pack uid", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/packs/{uid}/readme": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the readme of a specified pack", + "operationId": "v1PacksUidReadme", + "responses": { + "200": { + "description": "Readme describes the documentation of the specified pack", + "schema": { + "$ref": "#/definitions/v1PackReadme" + } + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Pack uid", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/pcg/selfHosted": { + "post": { + "tags": [ + "v1" + ], + "summary": "Returns the private gateway manifest link", + "operationId": "v1PcgSelfHosted", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1PcgSelfHostedParams" + } + } + ], + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1PcgServiceKubectlCommands" + } + } + } + } + }, + "/v1/pcg/{uid}/register": { + "post": { + "tags": [ + "v1" + ], + "summary": "Registers the pcg", + "operationId": "v1PcgUidRegister", + "parameters": [ + { + "name": "pairingCode", + "in": "body", + "schema": { + "$ref": "#/definitions/v1PairingCode" + } + }, + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "description": "Ok response without content", + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + } + }, + "/v1/pcg/{uid}/services/ally/manifest": { + "get": { + "produces": [ + "application/octet-stream" + ], + "tags": [ + "v1" + ], + "summary": "Returns the pcg ally manifest", + "operationId": "v1PcgUidAllyManifestGet", + "responses": { + "200": { + "description": "download file", + "schema": { + "type": "string", + "format": "binary" + }, + "headers": { + "Content-Disposition": { + "type": "string" + } + } + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/pcg/{uid}/services/jet/manifest": { + "get": { + "produces": [ + "application/octet-stream" + ], + "tags": [ + "v1" + ], + "summary": "Returns the pcg jet manifest", + "operationId": "v1PcgUidJetManifestGet", + "responses": { + "200": { + "description": "download file", + "schema": { + "type": "string", + "format": "binary" + }, + "headers": { + "Content-Disposition": { + "type": "string" + } + } + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/permissions": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves a list of permissions", + "operationId": "v1PermissionsList", + "parameters": [ + { + "enum": [ + "system", + "tenant", + "project", + "resource" + ], + "type": "string", + "name": "scope", + "in": "query" + } + ], + "responses": { + "200": { + "description": "An array of permissions", + "schema": { + "$ref": "#/definitions/v1Permissions" + } + } + } + } + }, + "/v1/projects": { + "post": { + "tags": [ + "v1" + ], + "summary": "Creates a project", + "operationId": "v1ProjectsCreate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1ProjectEntity" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + } + }, + "/v1/projects/alerts": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves a list of supported alerts for a project", + "operationId": "v1ProjectsAlerts", + "responses": { + "200": { + "description": "An array of alert components", + "schema": { + "$ref": "#/definitions/v1ProjectAlertComponents" + } + } + } + } + }, + "/v1/projects/{uid}": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the specified project", + "operationId": "v1ProjectsUidGet", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1Project" + } + } + } + }, + "put": { + "tags": [ + "v1" + ], + "summary": "Updates the specified project", + "operationId": "v1ProjectsUidUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1ProjectEntity" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "delete": { + "tags": [ + "v1" + ], + "summary": "Deletes the specified project", + "operationId": "v1ProjectsUidDelete", + "parameters": [ + { + "type": "boolean", + "name": "cleanupProjectResources", + "in": "query" + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1ProjectCleanup" + } + } + ], + "responses": { + "204": { + "description": "The resource was deleted successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/projects/{uid}/alerts/{component}": { + "put": { + "tags": [ + "v1" + ], + "summary": "Upsert the specified alert to the specified project", + "operationId": "v1ProjectsUidAlertUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1AlertEntity" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "post": { + "tags": [ + "v1" + ], + "summary": "Create the specified alert to the specified project", + "operationId": "v1ProjectsUidAlertCreate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1Channel" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + }, + "delete": { + "tags": [ + "v1" + ], + "summary": "Deletes the specified alert to the specified project", + "operationId": "v1ProjectsUidAlertDelete", + "responses": { + "204": { + "description": "The resource was deleted successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + }, + { + "type": "string", + "name": "component", + "in": "path", + "required": true + } + ] + }, + "/v1/projects/{uid}/alerts/{component}/{alertUid}": { + "get": { + "tags": [ + "v1" + ], + "summary": "Get the specified alert of the specified project", + "operationId": "v1ProjectsUidAlertsUidGet", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1Channel" + } + } + } + }, + "put": { + "tags": [ + "v1" + ], + "summary": "Update the specified alert of the specified project", + "operationId": "v1ProjectsUidAlertsUidUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1Channel" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "delete": { + "tags": [ + "v1" + ], + "summary": "Deletes the specified alert of the specified project", + "operationId": "v1ProjectsUidAlertsUidDelete", + "responses": { + "204": { + "description": "The resource was deleted successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + }, + { + "type": "string", + "name": "component", + "in": "path", + "required": true + }, + { + "type": "string", + "name": "alertUid", + "in": "path", + "required": true + } + ] + }, + "/v1/projects/{uid}/macros": { + "get": { + "tags": [ + "v1" + ], + "summary": "List the macros of the specified project", + "operationId": "v1ProjectsUidMacrosList", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1Macros" + } + } + } + }, + "put": { + "tags": [ + "v1" + ], + "summary": "Update the macros of the specified project", + "operationId": "v1ProjectsUidMacrosUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1Macros" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "post": { + "tags": [ + "v1" + ], + "summary": "Create or add new macros for the specified project", + "operationId": "v1ProjectsUidMacrosCreate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1Macros" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "delete": { + "tags": [ + "v1" + ], + "summary": "Delete the macros for the specified project by macro name", + "operationId": "v1ProjectsUidMacrosDeleteByMacroName", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1Macros" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "patch": { + "tags": [ + "v1" + ], + "summary": "Update the macros for the specified project by macro name", + "operationId": "v1ProjectsUidMacrosUpdateByMacroName", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1Macros" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/projects/{uid}/meta": { + "put": { + "tags": [ + "v1" + ], + "summary": "Update the metadata of the specified project", + "operationId": "v1ProjectsUidMetaUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1ObjectMeta" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/projects/{uid}/preferences/clusterSettings": { + "get": { + "tags": [ + "v1" + ], + "summary": "Get project cluster settings", + "operationId": "v1ProjectClusterSettingsGet", + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1ProjectClusterSettings" + } + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/projects/{uid}/preferences/clusterSettings/nodesAutoRemediationSetting": { + "put": { + "tags": [ + "v1" + ], + "summary": "Update project clusters nodes auto remediation setting", + "operationId": "v1ProjectClustersNodesAutoRemediationSettingUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1NodesAutoRemediationSettings" + } + } + ], + "responses": { + "204": { + "description": "Ok response without content", + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/projects/{uid}/teams": { + "put": { + "tags": [ + "v1" + ], + "summary": "Update the teams association to the specified project", + "operationId": "v1ProjectsUidTeamsUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1ProjectTeamsEntity" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/projects/{uid}/users": { + "put": { + "tags": [ + "v1" + ], + "summary": "Update the users association to the specified project", + "operationId": "v1ProjectsUidUsersUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1ProjectUsersEntity" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/projects/{uid}/validate": { + "delete": { + "tags": [ + "v1" + ], + "summary": "Validate and returns active resource of project before delete", + "operationId": "v1ProjectsUidValidate", + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1ProjectActiveResources" + } + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/registries/helm": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves a list of Helm registries", + "operationId": "v1RegistriesHelmList", + "parameters": [ + { + "type": "string", + "description": "Set of fields to be presented in the response with values. The fields are comma separated. Eg: metadata.uid,metadata.name", + "name": "fields", + "in": "query" + }, + { + "type": "string", + "description": "Filters can be combined with AND, OR operators with field path name. Eg: metadata.name=TestServiceANDspec.cloudType=aws\n\nServer will be restricted to certain fields based on the indexed data for each resource.", + "name": "filters", + "in": "query" + }, + { + "type": "string", + "description": "Specify the fields with sort order. 1 indicates ascending and -1 for descending. Eg: orderBy=metadata.name=1,metadata.uid=-1", + "name": "orderBy", + "in": "query" + }, + { + "type": "integer", + "format": "int64", + "default": 50, + "description": "limit is a maximum number of responses to return for a list call. Default and maximum value of the limit is 50.\nIf more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results.", + "name": "limit", + "in": "query" + }, + { + "type": "integer", + "format": "int64", + "description": "offset is the next index number from which the response will start. The response offset value can be used along with continue token for the pagination.", + "name": "offset", + "in": "query" + }, + { + "type": "string", + "description": "continue token to paginate the subsequent data items", + "name": "continue", + "in": "query" + } + ], + "responses": { + "200": { + "description": "An array of registry items", + "schema": { + "$ref": "#/definitions/v1HelmRegistries" + } + } + } + }, + "post": { + "tags": [ + "v1" + ], + "summary": "Creates a helm registry", + "operationId": "v1RegistriesHelmCreate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1HelmRegistryEntity" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + }, + "parameters": [ + { + "enum": [ + "system", + "tenant", + "all" + ], + "type": "string", + "default": "all", + "name": "scope", + "in": "query" + } + ] + }, + "/v1/registries/helm/summary": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves a list of helm registries as summary", + "operationId": "v1RegistriesHelmSummaryList", + "parameters": [ + { + "type": "string", + "description": "Set of fields to be presented in the response with values. The fields are comma separated. Eg: metadata.uid,metadata.name", + "name": "fields", + "in": "query" + }, + { + "type": "string", + "description": "Filters can be combined with AND, OR operators with field path name. Eg: metadata.name=TestServiceANDspec.cloudType=aws\n\nServer will be restricted to certain fields based on the indexed data for each resource.", + "name": "filters", + "in": "query" + }, + { + "type": "string", + "description": "Specify the fields with sort order. 1 indicates ascending and -1 for descending. Eg: orderBy=metadata.name=1,metadata.uid=-1", + "name": "orderBy", + "in": "query" + }, + { + "type": "integer", + "format": "int64", + "default": 50, + "description": "limit is a maximum number of responses to return for a list call. Default and maximum value of the limit is 50.\nIf more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results.", + "name": "limit", + "in": "query" + }, + { + "type": "integer", + "format": "int64", + "description": "offset is the next index number from which the response will start. The response offset value can be used along with continue token for the pagination.", + "name": "offset", + "in": "query" + }, + { + "type": "string", + "description": "continue token to paginate the subsequent data items", + "name": "continue", + "in": "query" + } + ], + "responses": { + "200": { + "description": "An array of registry items", + "schema": { + "$ref": "#/definitions/v1HelmRegistriesSummary" + } + } + } + }, + "parameters": [ + { + "enum": [ + "system", + "tenant", + "all" + ], + "type": "string", + "default": "all", + "name": "scope", + "in": "query" + } + ] + }, + "/v1/registries/helm/validate": { + "post": { + "description": "Returns no contents if helm registry is valid else error.", + "tags": [ + "v1" + ], + "summary": "Check if helm registry is valid", + "operationId": "V1RegistriesHelmValidate", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1HelmRegistrySpec" + } + } + ], + "responses": { + "204": { + "description": "Ok response without content", + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + } + }, + "/v1/registries/helm/{uid}": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the specified Helm registry", + "operationId": "v1RegistriesHelmUidGet", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1HelmRegistry" + } + } + } + }, + "put": { + "tags": [ + "v1" + ], + "summary": "Updates the specified helm registry", + "operationId": "v1RegistriesHelmUidUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1HelmRegistry" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "delete": { + "tags": [ + "v1" + ], + "summary": "Deletes the specified helm registry", + "operationId": "v1RegistriesHelmUidDelete", + "responses": { + "204": { + "description": "The resource was deleted successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/registries/helm/{uid}/sync": { + "post": { + "description": "Sync all the helm charts from the registry", + "tags": [ + "v1" + ], + "summary": "Sync Helm registry", + "operationId": "v1RegistriesHelmUidSync", + "responses": { + "202": { + "description": "Ok response without content", + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + }, + { + "type": "boolean", + "default": false, + "name": "forceSync", + "in": "query" + } + ] + }, + "/v1/registries/helm/{uid}/sync/status": { + "get": { + "description": "Get the sync status for the specified helm registry", + "tags": [ + "v1" + ], + "summary": "Get helm registry sync status", + "operationId": "v1RegistriesHelmUidSyncStatus", + "responses": { + "200": { + "description": "Helm registry sync status", + "schema": { + "$ref": "#/definitions/v1RegistrySyncStatus" + } + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/registries/metadata": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves a list of registries metadata", + "operationId": "v1RegistriesMetadata", + "responses": { + "200": { + "description": "An array of registry metadata items", + "schema": { + "$ref": "#/definitions/v1RegistriesMetadata" + } + } + } + }, + "parameters": [ + { + "enum": [ + "system", + "tenant", + "all" + ], + "type": "string", + "default": "all", + "name": "scope", + "in": "query" + } + ] + }, + "/v1/registries/oci/basic": { + "post": { + "tags": [ + "v1" + ], + "summary": "Creates a basic oci registry", + "operationId": "v1BasicOciRegistriesCreate", + "parameters": [ + { + "type": "boolean", + "default": false, + "name": "skipPackSync", + "in": "query" + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1BasicOciRegistry" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + } + }, + "/v1/registries/oci/basic/validate": { + "post": { + "description": "Returns no contents if oci registry is valid else error.", + "tags": [ + "v1" + ], + "summary": "Check if oci registry is valid", + "operationId": "v1BasicOciRegistriesValidate", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1BasicOciRegistrySpec" + } + } + ], + "responses": { + "204": { + "description": "Ok response without content", + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + } + }, + "/v1/registries/oci/ecr": { + "post": { + "tags": [ + "v1" + ], + "summary": "Creates a ecr registry", + "operationId": "v1EcrRegistriesCreate", + "parameters": [ + { + "type": "boolean", + "default": false, + "name": "skipPackSync", + "in": "query" + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1EcrRegistry" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + } + }, + "/v1/registries/oci/ecr/validate": { + "post": { + "description": "Returns no contents if ecr registry is valid else error.", + "tags": [ + "v1" + ], + "summary": "Check if ecr registry is valid", + "operationId": "v1EcrRegistriesValidate", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1EcrRegistrySpec" + } + } + ], + "responses": { + "204": { + "description": "Ok response without content", + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + } + }, + "/v1/registries/oci/image": { + "get": { + "tags": [ + "v1" + ], + "summary": "Creates a image registry", + "operationId": "v1OciImageRegistryGet", + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1OciImageRegistry" + } + } + } + } + }, + "/v1/registries/oci/summary": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves a oci registries summary", + "operationId": "v1OciRegistriesSummary", + "responses": { + "200": { + "description": "An array of oci registry items", + "schema": { + "$ref": "#/definitions/v1OciRegistries" + } + } + } + } + }, + "/v1/registries/oci/{uid}": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the information of specified oci registry", + "operationId": "v1OciRegistriesGet", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1OciRegistryEntity" + } + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + }, + { + "type": "string", + "name": "clusterUid", + "in": "query" + } + ] + }, + "/v1/registries/oci/{uid}/basic": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the basic oci registry", + "operationId": "v1BasicOciRegistriesUidGet", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1BasicOciRegistry" + } + } + } + }, + "put": { + "tags": [ + "v1" + ], + "summary": "Updates the specified basic oci registry", + "operationId": "v1BasicOciRegistriesUidUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1BasicOciRegistry" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "delete": { + "tags": [ + "v1" + ], + "summary": "Deletes the specified basic oci registry", + "operationId": "v1BasicOciRegistriesUidDelete", + "responses": { + "204": { + "description": "The resource was deleted successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/registries/oci/{uid}/basic/sync": { + "post": { + "description": "Sync all the content from the oci registry", + "tags": [ + "v1" + ], + "summary": "Sync oci registry", + "operationId": "v1BasicOciRegistriesUidSync", + "responses": { + "202": { + "description": "Ok response without content", + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + }, + { + "type": "boolean", + "default": false, + "name": "forceSync", + "in": "query" + } + ] + }, + "/v1/registries/oci/{uid}/basic/sync/status": { + "get": { + "description": "Get sync status for the oci specified registry", + "tags": [ + "v1" + ], + "summary": "Get oci registry sync status", + "operationId": "v1BasicOciRegistriesUidSyncStatus", + "responses": { + "200": { + "description": "Oci registry sync status", + "schema": { + "$ref": "#/definitions/v1RegistrySyncStatus" + } + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/registries/oci/{uid}/ecr": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the specified ecr registry", + "operationId": "v1EcrRegistriesUidGet", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1EcrRegistry" + } + } + } + }, + "put": { + "tags": [ + "v1" + ], + "summary": "Updates the specified ecr registry", + "operationId": "v1EcrRegistriesUidUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1EcrRegistry" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "delete": { + "tags": [ + "v1" + ], + "summary": "Deletes the specified ecr registry", + "operationId": "v1EcrRegistriesUidDelete", + "responses": { + "204": { + "description": "The resource was deleted successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/registries/oci/{uid}/ecr/sync": { + "post": { + "description": "Sync all the content from the ecr registry", + "tags": [ + "v1" + ], + "summary": "Sync ecr registry", + "operationId": "v1EcrRegistriesUidSync", + "responses": { + "202": { + "description": "Ok response without content", + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + }, + { + "type": "boolean", + "default": false, + "name": "forceSync", + "in": "query" + } + ] + }, + "/v1/registries/oci/{uid}/ecr/sync/status": { + "get": { + "description": "Get sync status for the ecr specified registry", + "tags": [ + "v1" + ], + "summary": "Get ecr registry sync status", + "operationId": "v1EcrRegistriesUidSyncStatus", + "responses": { + "200": { + "description": "Ecr registry sync status", + "schema": { + "$ref": "#/definitions/v1RegistrySyncStatus" + } + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/registries/pack": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves a list of Pack registries", + "operationId": "v1RegistriesPackList", + "parameters": [ + { + "type": "string", + "description": "Set of fields to be presented in the response with values. The fields are comma separated. Eg: metadata.uid,metadata.name", + "name": "fields", + "in": "query" + }, + { + "type": "string", + "description": "Filters can be combined with AND, OR operators with field path name. Eg: metadata.name=TestServiceANDspec.cloudType=aws\n\nServer will be restricted to certain fields based on the indexed data for each resource.", + "name": "filters", + "in": "query" + }, + { + "type": "string", + "description": "Specify the fields with sort order. 1 indicates ascending and -1 for descending. Eg: orderBy=metadata.name=1,metadata.uid=-1", + "name": "orderBy", + "in": "query" + }, + { + "type": "integer", + "format": "int64", + "default": 50, + "description": "limit is a maximum number of responses to return for a list call. Default and maximum value of the limit is 50.\nIf more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results.", + "name": "limit", + "in": "query" + }, + { + "type": "integer", + "format": "int64", + "description": "offset is the next index number from which the response will start. The response offset value can be used along with continue token for the pagination.", + "name": "offset", + "in": "query" + }, + { + "type": "string", + "description": "continue token to paginate the subsequent data items", + "name": "continue", + "in": "query" + } + ], + "responses": { + "200": { + "description": "An array of registry items", + "schema": { + "$ref": "#/definitions/v1PackRegistries" + } + } + } + }, + "post": { + "tags": [ + "v1" + ], + "summary": "Creates a pack registry", + "operationId": "v1RegistriesPackCreate", + "parameters": [ + { + "type": "boolean", + "default": false, + "name": "skipPackSync", + "in": "query" + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1PackRegistry" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + }, + "parameters": [ + { + "enum": [ + "system", + "tenant", + "all" + ], + "type": "string", + "default": "all", + "name": "scope", + "in": "query" + } + ] + }, + "/v1/registries/pack/summary": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves a list of pack registries as summary", + "operationId": "v1RegistriesPackSummaryList", + "parameters": [ + { + "type": "string", + "description": "Set of fields to be presented in the response with values. The fields are comma separated. Eg: metadata.uid,metadata.name", + "name": "fields", + "in": "query" + }, + { + "type": "string", + "description": "Filters can be combined with AND, OR operators with field path name. Eg: metadata.name=TestServiceANDspec.cloudType=aws\n\nServer will be restricted to certain fields based on the indexed data for each resource.", + "name": "filters", + "in": "query" + }, + { + "type": "string", + "description": "Specify the fields with sort order. 1 indicates ascending and -1 for descending. Eg: orderBy=metadata.name=1,metadata.uid=-1", + "name": "orderBy", + "in": "query" + }, + { + "type": "integer", + "format": "int64", + "default": 50, + "description": "limit is a maximum number of responses to return for a list call. Default and maximum value of the limit is 50.\nIf more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results.", + "name": "limit", + "in": "query" + }, + { + "type": "integer", + "format": "int64", + "description": "offset is the next index number from which the response will start. The response offset value can be used along with continue token for the pagination.", + "name": "offset", + "in": "query" + }, + { + "type": "string", + "description": "continue token to paginate the subsequent data items", + "name": "continue", + "in": "query" + } + ], + "responses": { + "200": { + "description": "An array of registry items", + "schema": { + "$ref": "#/definitions/v1PackRegistriesSummary" + } + } + } + }, + "parameters": [ + { + "enum": [ + "system", + "tenant", + "all" + ], + "type": "string", + "default": "all", + "name": "scope", + "in": "query" + } + ] + }, + "/v1/registries/pack/validate": { + "post": { + "description": "Returns no contents if pack registry is valid else error.", + "tags": [ + "v1" + ], + "summary": "Check if pack registry is valid", + "operationId": "V1RegistriesPackValidate", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1PackRegistrySpec" + } + } + ], + "responses": { + "204": { + "description": "Ok response without content", + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + } + }, + "/v1/registries/pack/{uid}": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the specified Pack registry", + "operationId": "v1RegistriesPackUidGet", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1PackRegistry" + } + } + } + }, + "put": { + "tags": [ + "v1" + ], + "summary": "Updates the specified pack registry", + "operationId": "v1RegistriesPackUidUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1PackRegistry" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "delete": { + "tags": [ + "v1" + ], + "summary": "Deletes the specified pack registry", + "operationId": "v1RegistriesPackUidDelete", + "responses": { + "204": { + "description": "The resource was deleted successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/registries/pack/{uid}/sync": { + "post": { + "description": "Sync all the packs from the registry", + "tags": [ + "v1" + ], + "summary": "Sync Pack registry", + "operationId": "v1RegistriesPackUidSync", + "responses": { + "202": { + "description": "Ok response without content", + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + }, + { + "type": "boolean", + "default": false, + "name": "forceSync", + "in": "query" + } + ] + }, + "/v1/registries/pack/{uid}/sync/status": { + "get": { + "description": "Get sync status for the pack specified registry", + "tags": [ + "v1" + ], + "summary": "Get pack registry sync status", + "operationId": "v1RegistriesPackUidSyncStatus", + "responses": { + "200": { + "description": "Pack registry sync status", + "schema": { + "$ref": "#/definitions/v1RegistrySyncStatus" + } + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/registries/{registryName}/config": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the specified system scope registry configuration", + "operationId": "v1RegistriesNameConfigGet", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1RegistryConfigEntity" + } + } + } + }, + "parameters": [ + { + "type": "string", + "name": "registryName", + "in": "path", + "required": true + } + ] + }, + "/v1/registries/{uid}": { + "delete": { + "tags": [ + "v1" + ], + "summary": "Deletes the specified registry", + "operationId": "v1RegistriesUidDelete", + "responses": { + "204": { + "description": "The resource was deleted successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/roles": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves a list of roles", + "operationId": "v1RolesList", + "parameters": [ + { + "type": "string", + "description": "Set of fields to be presented in the response with values. The fields are comma separated. Eg: metadata.uid,metadata.name", + "name": "fields", + "in": "query" + }, + { + "type": "string", + "description": "Filters can be combined with AND, OR operators with field path name. Eg: metadata.name=TestServiceANDspec.cloudType=aws\n\nServer will be restricted to certain fields based on the indexed data for each resource.", + "name": "filters", + "in": "query" + }, + { + "type": "string", + "description": "Specify the fields with sort order. 1 indicates ascending and -1 for descending. Eg: orderBy=metadata.name=1,metadata.uid=-1", + "name": "orderBy", + "in": "query" + }, + { + "type": "integer", + "format": "int64", + "default": 50, + "description": "limit is a maximum number of responses to return for a list call. Default and maximum value of the limit is 50.\nIf more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results.", + "name": "limit", + "in": "query" + }, + { + "type": "integer", + "format": "int64", + "description": "offset is the next index number from which the response will start. The response offset value can be used along with continue token for the pagination.", + "name": "offset", + "in": "query" + }, + { + "type": "string", + "description": "continue token to paginate the subsequent data items", + "name": "continue", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1Roles" + } + } + } + }, + "post": { + "tags": [ + "v1" + ], + "summary": "Creates a role with specified permissions", + "operationId": "v1RolesCreate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1Role" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + } + }, + "/v1/roles/{uid}": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the specified role", + "operationId": "v1RolesUidGet", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1Role" + } + } + } + }, + "put": { + "tags": [ + "v1" + ], + "summary": "Updates the specified role", + "operationId": "v1RolesUidUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1Role" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "delete": { + "tags": [ + "v1" + ], + "summary": "Deletes the specified role", + "operationId": "v1RolesUidDelete", + "responses": { + "204": { + "description": "The resource was deleted successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/roles/{uid}/clone": { + "post": { + "tags": [ + "v1" + ], + "summary": "Clone the role", + "operationId": "v1RolesClone", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1RoleClone" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/services/{serviceName}/version": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns a latest version for a given service name", + "operationId": "v1ServiceVersionGet", + "parameters": [ + { + "enum": [ + "ally", + "jet", + "palette", + "ambit", + "ally-lite", + "palette-lite", + "crony", + "tick", + "edge", + "lodge", + "level", + "edgeconfig", + "firth", + "stylus" + ], + "type": "string", + "description": "service name", + "name": "serviceName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "spectro cluster uid", + "name": "clusterUid", + "in": "query" + }, + { + "type": "string", + "description": "edge host uid", + "name": "edgeHostUid", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1ServiceVersion" + } + } + } + } + }, + "/v1/services/{serviceName}/versions/{version}/manifest": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns a service manifest for a given service name and version", + "operationId": "v1ServiceManifestGet", + "parameters": [ + { + "enum": [ + "ally", + "jet", + "palette", + "ambit", + "ally-lite", + "palette-lite", + "crony", + "tick", + "edge", + "lodge", + "level", + "edgeconfig", + "firth", + "stylus" + ], + "type": "string", + "description": "service name", + "name": "serviceName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "service version", + "name": "version", + "in": "path", + "required": true + }, + { + "enum": [ + "apply", + "delete", + "resources" + ], + "type": "string", + "description": "action type", + "name": "action", + "in": "query", + "required": true + }, + { + "type": "string", + "description": "resource file name", + "name": "resourceFilename", + "in": "query" + }, + { + "type": "string", + "description": "spectro cluster uid", + "name": "clusterUid", + "in": "query" + }, + { + "type": "string", + "description": "edge host uid", + "name": "edgeHostUid", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1ServiceManifest" + } + } + } + } + }, + "/v1/spectroclusters/aks": { + "post": { + "tags": [ + "v1" + ], + "summary": "Creates an AKS cluster", + "operationId": "v1SpectroClustersAksCreate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1SpectroAzureClusterEntity" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + } + }, + "/v1/spectroclusters/aks/rate": { + "post": { + "tags": [ + "v1" + ], + "summary": "Get AKS cluster estimated rate information", + "operationId": "v1SpectroClustersAksRate", + "parameters": [ + { + "enum": [ + "hourly", + "monthly", + "yearly" + ], + "type": "string", + "default": "hourly", + "name": "periodType", + "in": "query" + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1SpectroAzureClusterRateEntity" + } + } + ], + "responses": { + "200": { + "description": "Aks Cluster estimated rate response", + "schema": { + "$ref": "#/definitions/v1SpectroClusterRate" + } + } + } + } + }, + "/v1/spectroclusters/aks/validate": { + "post": { + "tags": [ + "v1" + ], + "summary": "Validates AKS cluster create operation", + "operationId": "v1SpectroClustersAksValidate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1SpectroAzureClusterEntity" + } + } + ], + "responses": { + "200": { + "description": "Aks Cluster validation response", + "schema": { + "$ref": "#/definitions/v1SpectroClusterValidatorResponse" + } + } + } + } + }, + "/v1/spectroclusters/aws": { + "post": { + "tags": [ + "v1" + ], + "summary": "Creates an AWS cluster", + "operationId": "v1SpectroClustersAwsCreate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1SpectroAwsClusterEntity" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + } + }, + "/v1/spectroclusters/aws/import": { + "post": { + "tags": [ + "v1" + ], + "summary": "Imports an AWS cluster", + "operationId": "v1SpectroClustersAwsImport", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1SpectroAwsClusterImportEntity" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + } + }, + "/v1/spectroclusters/aws/rate": { + "post": { + "tags": [ + "v1" + ], + "summary": "Get AWS cluster estimated rate information", + "operationId": "v1SpectroClustersAwsRate", + "parameters": [ + { + "enum": [ + "hourly", + "monthly", + "yearly" + ], + "type": "string", + "default": "hourly", + "name": "periodType", + "in": "query" + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1SpectroAwsClusterRateEntity" + } + } + ], + "responses": { + "200": { + "description": "Aws Cluster estimated rate response", + "schema": { + "$ref": "#/definitions/v1SpectroClusterRate" + } + } + } + } + }, + "/v1/spectroclusters/aws/validate": { + "post": { + "tags": [ + "v1" + ], + "summary": "Validates AWS cluster create operation", + "operationId": "v1SpectroClustersAwsValidate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1SpectroAwsClusterEntity" + } + } + ], + "responses": { + "200": { + "description": "Aws Cluster validation response", + "schema": { + "$ref": "#/definitions/v1SpectroClusterValidatorResponse" + } + } + } + } + }, + "/v1/spectroclusters/azure": { + "post": { + "tags": [ + "v1" + ], + "summary": "Creates an Azure cluster", + "operationId": "v1SpectroClustersAzureCreate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1SpectroAzureClusterEntity" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + } + }, + "/v1/spectroclusters/azure/import": { + "post": { + "tags": [ + "v1" + ], + "summary": "Imports an Azure cluster", + "operationId": "v1SpectroClustersAzureImport", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1SpectroAzureClusterImportEntity" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + } + }, + "/v1/spectroclusters/azure/rate": { + "post": { + "tags": [ + "v1" + ], + "summary": "Get Azure cluster estimated rate information", + "operationId": "v1SpectroClustersAzureRate", + "parameters": [ + { + "enum": [ + "hourly", + "monthly", + "yearly" + ], + "type": "string", + "default": "hourly", + "name": "periodType", + "in": "query" + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1SpectroAzureClusterRateEntity" + } + } + ], + "responses": { + "200": { + "description": "Azure Cluster estimated rate response", + "schema": { + "$ref": "#/definitions/v1SpectroClusterRate" + } + } + } + } + }, + "/v1/spectroclusters/azure/validate": { + "post": { + "tags": [ + "v1" + ], + "summary": "Validates Azure cluster create operation", + "operationId": "v1SpectroClustersAzureValidate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1SpectroAzureClusterEntity" + } + } + ], + "responses": { + "200": { + "description": "Azure Cluster validation response", + "schema": { + "$ref": "#/definitions/v1SpectroClusterValidatorResponse" + } + } + } + } + }, + "/v1/spectroclusters/cloudTypes/{cloudType}": { + "post": { + "tags": [ + "v1" + ], + "summary": "Creates a Custom cluster", + "operationId": "v1SpectroClustersCustomCreate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1SpectroCustomClusterEntity" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster's cloud type", + "name": "cloudType", + "in": "path", + "required": true + } + ] + }, + "/v1/spectroclusters/cloudTypes/{cloudType}/validate": { + "post": { + "tags": [ + "v1" + ], + "summary": "Validates Custom cluster create operation", + "operationId": "v1SpectroClustersCustomValidate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1SpectroCustomClusterEntity" + } + } + ], + "responses": { + "200": { + "description": "Custom Cluster validation response", + "schema": { + "$ref": "#/definitions/v1SpectroClusterValidatorResponse" + } + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster's cloud type", + "name": "cloudType", + "in": "path", + "required": true + } + ] + }, + "/v1/spectroclusters/config/edgeInstaller": { + "get": { + "tags": [ + "v1" + ], + "summary": "Cluster configuration for the edge installer", + "operationId": "v1SpectroClustersConfigEdgeInstaller", + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1ClusterEdgeInstallerConfig" + } + } + } + } + }, + "/v1/spectroclusters/edge-native": { + "post": { + "tags": [ + "v1" + ], + "summary": "Creates an EdgeNative cluster", + "operationId": "v1SpectroClustersEdgeNativeCreate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1SpectroEdgeNativeClusterEntity" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + } + }, + "/v1/spectroclusters/edge-native/import": { + "post": { + "tags": [ + "v1" + ], + "summary": "Imports an EdgeNative cluster", + "operationId": "v1SpectroClustersEdgeNativeImport", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1SpectroEdgeNativeClusterImportEntity" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + } + }, + "/v1/spectroclusters/edge-native/rate": { + "post": { + "tags": [ + "v1" + ], + "summary": "Get edge-native cluster estimated rate information", + "operationId": "v1SpectroClustersEdgeNativeRate", + "parameters": [ + { + "enum": [ + "hourly", + "monthly", + "yearly" + ], + "type": "string", + "default": "hourly", + "name": "periodType", + "in": "query" + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1SpectroEdgeNativeClusterRateEntity" + } + } + ], + "responses": { + "200": { + "description": "EdgeNative Cluster estimated rate response", + "schema": { + "$ref": "#/definitions/v1SpectroClusterRate" + } + } + } + } + }, + "/v1/spectroclusters/edge-native/validate": { + "post": { + "tags": [ + "v1" + ], + "summary": "Validates edge-native cluster create operation", + "operationId": "v1SpectroClustersEdgeNativeValidate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1SpectroEdgeNativeClusterEntity" + } + } + ], + "responses": { + "200": { + "description": "EdgeNative Cluster validation response", + "schema": { + "$ref": "#/definitions/v1SpectroClusterValidatorResponse" + } + } + } + } + }, + "/v1/spectroclusters/eks": { + "post": { + "tags": [ + "v1" + ], + "summary": "Creates an EKS cluster", + "operationId": "v1SpectroClustersEksCreate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1SpectroEksClusterEntity" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + } + }, + "/v1/spectroclusters/eks/rate": { + "post": { + "tags": [ + "v1" + ], + "summary": "Get EKS cluster estimated rate information", + "operationId": "v1SpectroClustersEksRate", + "parameters": [ + { + "enum": [ + "hourly", + "monthly", + "yearly" + ], + "type": "string", + "default": "hourly", + "name": "periodType", + "in": "query" + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1SpectroEksClusterRateEntity" + } + } + ], + "responses": { + "200": { + "description": "Eks Cluster estimated rate response", + "schema": { + "$ref": "#/definitions/v1SpectroClusterRate" + } + } + } + } + }, + "/v1/spectroclusters/eks/validate": { + "post": { + "tags": [ + "v1" + ], + "summary": "Validates EKS cluster create operation", + "operationId": "v1SpectroClustersEksValidate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1SpectroEksClusterEntity" + } + } + ], + "responses": { + "200": { + "description": "Eks Cluster validation response", + "schema": { + "$ref": "#/definitions/v1SpectroClusterValidatorResponse" + } + } + } + } + }, + "/v1/spectroclusters/features/backup/locations/{uid}": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the cluster object references based on locationUid", + "operationId": "V1ClusterFeatureBackupLocationUidGet", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1ClusterRefs" + } + } + } + }, + "put": { + "tags": [ + "v1" + ], + "summary": "Change cluster backup location", + "operationId": "V1ClusterFeatureBackupLocationUidChange", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1ClusterBackupLocationType" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/spectroclusters/features/logFetcher/{uid}/download": { + "get": { + "produces": [ + "application/octet-stream" + ], + "tags": [ + "v1" + ], + "summary": "Download log fetcher logs for cluster by log fetcher uid", + "operationId": "v1ClusterFeatureLogFetcherLogDownload", + "parameters": [ + { + "type": "string", + "name": "fileName", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "file" + }, + "headers": { + "Content-Disposition": { + "type": "string" + }, + "Content-Type": { + "type": "string" + } + } + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster uid for which log is requested", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/spectroclusters/features/logFetcher/{uid}/log": { + "post": { + "consumes": [ + "multipart/form-data" + ], + "tags": [ + "v1" + ], + "summary": "Update log fetcher logs by log fetcher uid", + "operationId": "v1ClusterFeatureLogFetcherLogUpdate", + "parameters": [ + { + "type": "file", + "description": "Log file by agent", + "name": "fileName", + "in": "formData" + }, + { + "type": "string", + "description": "Unique request Id", + "name": "requestId", + "in": "query" + } + ], + "responses": { + "204": { + "description": "Ok response without content", + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster uid for which log is requested", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/spectroclusters/gcp": { + "post": { + "tags": [ + "v1" + ], + "summary": "Creates a GCP cluster", + "operationId": "v1SpectroClustersGcpCreate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1SpectroGcpClusterEntity" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + } + }, + "/v1/spectroclusters/gcp/import": { + "post": { + "tags": [ + "v1" + ], + "summary": "Imports a GCP cluster", + "operationId": "v1SpectroClustersGcpImport", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1SpectroGcpClusterImportEntity" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + } + }, + "/v1/spectroclusters/gcp/rate": { + "post": { + "tags": [ + "v1" + ], + "summary": "Get GCP cluster estimated rate information", + "operationId": "v1SpectroClustersGcpRate", + "parameters": [ + { + "enum": [ + "hourly", + "monthly", + "yearly" + ], + "type": "string", + "default": "hourly", + "name": "periodType", + "in": "query" + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1SpectroGcpClusterRateEntity" + } + } + ], + "responses": { + "200": { + "description": "Gcp Cluster estimated rate response", + "schema": { + "$ref": "#/definitions/v1SpectroClusterRate" + } + } + } + } + }, + "/v1/spectroclusters/gcp/validate": { + "post": { + "tags": [ + "v1" + ], + "summary": "Validates GCP cluster create operation", + "operationId": "v1SpectroClustersGcpValidate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1SpectroGcpClusterEntity" + } + } + ], + "responses": { + "200": { + "description": "Gcp Cluster validation response", + "schema": { + "$ref": "#/definitions/v1SpectroClusterValidatorResponse" + } + } + } + } + }, + "/v1/spectroclusters/generic/import": { + "post": { + "description": "The machines information will be captured, whereas the cloud specific configuration info will not be retrieved", + "tags": [ + "v1" + ], + "summary": "Imports a cluster of any cloud type in generic way", + "operationId": "v1SpectroClustersGenericImport", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1SpectroGenericClusterImportEntity" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + } + }, + "/v1/spectroclusters/generic/rate": { + "post": { + "tags": [ + "v1" + ], + "summary": "Get generic cluster estimated rate information", + "operationId": "v1SpectroClustersGenericRate", + "parameters": [ + { + "enum": [ + "hourly", + "monthly", + "yearly" + ], + "type": "string", + "default": "hourly", + "name": "periodType", + "in": "query" + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1SpectroGenericClusterRateEntity" + } + } + ], + "responses": { + "200": { + "description": "Genric Cluster estimated rate response", + "schema": { + "$ref": "#/definitions/v1SpectroClusterRate" + } + } + } + } + }, + "/v1/spectroclusters/gke": { + "post": { + "tags": [ + "v1" + ], + "summary": "Creates an GKE cluster", + "operationId": "v1SpectroClustersGkeCreate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1SpectroGcpClusterEntity" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + } + }, + "/v1/spectroclusters/gke/rate": { + "post": { + "tags": [ + "v1" + ], + "summary": "Get GKE cluster estimated rate information", + "operationId": "v1SpectroClustersGkeRate", + "parameters": [ + { + "enum": [ + "hourly", + "monthly", + "yearly" + ], + "type": "string", + "default": "hourly", + "name": "periodType", + "in": "query" + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1SpectroGcpClusterRateEntity" + } + } + ], + "responses": { + "200": { + "description": "Gke Cluster estimated rate response", + "schema": { + "$ref": "#/definitions/v1SpectroClusterRate" + } + } + } + } + }, + "/v1/spectroclusters/gke/validate": { + "post": { + "tags": [ + "v1" + ], + "summary": "Validates GKE cluster create operation", + "operationId": "v1SpectroClustersGkeValidate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1SpectroGcpClusterEntity" + } + } + ], + "responses": { + "200": { + "description": "Gke Cluster validation response", + "schema": { + "$ref": "#/definitions/v1SpectroClusterValidatorResponse" + } + } + } + } + }, + "/v1/spectroclusters/maas": { + "post": { + "tags": [ + "v1" + ], + "summary": "Creates a MAAS cluster", + "operationId": "v1SpectroClustersMaasCreate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1SpectroMaasClusterEntity" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + } + }, + "/v1/spectroclusters/maas/import": { + "post": { + "tags": [ + "v1" + ], + "summary": "Imports a Maas cluster", + "operationId": "v1SpectroClustersMaasImport", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1SpectroMaasClusterImportEntity" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + } + }, + "/v1/spectroclusters/maas/rate": { + "post": { + "tags": [ + "v1" + ], + "summary": "Get maas cluster estimated rate information", + "operationId": "v1SpectroClustersMaasRate", + "parameters": [ + { + "enum": [ + "hourly", + "monthly", + "yearly" + ], + "type": "string", + "default": "hourly", + "name": "periodType", + "in": "query" + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1SpectroMaasClusterRateEntity" + } + } + ], + "responses": { + "200": { + "description": "Maas Cluster estimated rate response", + "schema": { + "$ref": "#/definitions/v1SpectroClusterRate" + } + } + } + } + }, + "/v1/spectroclusters/maas/validate": { + "post": { + "tags": [ + "v1" + ], + "summary": "Validates MAAS cluster create operation", + "operationId": "v1SpectroClustersMaasValidate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1SpectroMaasClusterEntity" + } + } + ], + "responses": { + "200": { + "description": "Maas Cluster validation response", + "schema": { + "$ref": "#/definitions/v1SpectroClusterValidatorResponse" + } + } + } + } + }, + "/v1/spectroclusters/openstack": { + "post": { + "tags": [ + "v1" + ], + "summary": "Creates a OpenStack cluster", + "operationId": "v1SpectroClustersOpenStackCreate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1SpectroOpenStackClusterEntity" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + } + }, + "/v1/spectroclusters/openstack/import": { + "post": { + "tags": [ + "v1" + ], + "summary": "Imports an OpenStack cluster", + "operationId": "v1SpectroClustersOpenStackImport", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1SpectroOpenStackClusterImportEntity" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + } + }, + "/v1/spectroclusters/openstack/rate": { + "post": { + "tags": [ + "v1" + ], + "summary": "Get openstack cluster estimated rate information", + "operationId": "v1SpectroClustersOpenStackRate", + "parameters": [ + { + "enum": [ + "hourly", + "monthly", + "yearly" + ], + "type": "string", + "default": "hourly", + "name": "periodType", + "in": "query" + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1SpectroOpenStackClusterRateEntity" + } + } + ], + "responses": { + "200": { + "description": "Openstack Cluster estimated rate response", + "schema": { + "$ref": "#/definitions/v1SpectroClusterRate" + } + } + } + } + }, + "/v1/spectroclusters/openstack/validate": { + "post": { + "tags": [ + "v1" + ], + "summary": "Validates OpenStack cluster create operation", + "operationId": "v1SpectroClustersOpenStackValidate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1SpectroOpenStackClusterEntity" + } + } + ], + "responses": { + "200": { + "description": "vSphere Cluster validation response", + "schema": { + "$ref": "#/definitions/v1SpectroClusterValidatorResponse" + } + } + } + } + }, + "/v1/spectroclusters/spc/download": { + "post": { + "produces": [ + "application/octet-stream" + ], + "tags": [ + "v1" + ], + "summary": "Downloads the cluster definition archive file", + "operationId": "v1SpectroClustersSpcDownload", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1ClusterDefinitionEntity" + } + } + ], + "responses": { + "200": { + "description": "Cluster definition archive file", + "schema": { + "type": "string", + "format": "binary" + }, + "headers": { + "Content-Disposition": { + "type": "string" + } + } + } + } + } + }, + "/v1/spectroclusters/tke": { + "post": { + "tags": [ + "v1" + ], + "summary": "Creates a Tke cluster", + "operationId": "v1SpectroClustersTkeCreate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1SpectroTencentClusterEntity" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + } + }, + "/v1/spectroclusters/tke/rate": { + "post": { + "tags": [ + "v1" + ], + "summary": "Get TKE cluster estimated rate information", + "operationId": "v1SpectroClustersTkeRate", + "parameters": [ + { + "enum": [ + "hourly", + "monthly", + "yearly" + ], + "type": "string", + "default": "hourly", + "name": "periodType", + "in": "query" + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1SpectroTencentClusterRateEntity" + } + } + ], + "responses": { + "200": { + "description": "Tke Cluster estimated rate response", + "schema": { + "$ref": "#/definitions/v1SpectroClusterRate" + } + } + } + } + }, + "/v1/spectroclusters/tke/validate": { + "post": { + "tags": [ + "v1" + ], + "summary": "Validates TKE cluster create operation", + "operationId": "v1SpectroClustersTkeValidate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1SpectroTencentClusterEntity" + } + } + ], + "responses": { + "200": { + "description": "Tke Cluster validation response", + "schema": { + "$ref": "#/definitions/v1SpectroClusterValidatorResponse" + } + } + } + } + }, + "/v1/spectroclusters/upgrade/settings": { + "get": { + "tags": [ + "v1" + ], + "summary": "Get cluster settings by context", + "operationId": "v1SpectroClustersUpgradeSettingsGet", + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1ClusterUpgradeSettingsEntity" + } + } + } + }, + "post": { + "tags": [ + "v1" + ], + "summary": "Update all clusters upgrade settings", + "operationId": "v1SpectroClustersUpgradeSettings", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1ClusterUpgradeSettingsEntity" + } + } + ], + "responses": { + "204": { + "description": "Ok response without content", + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + } + }, + "/v1/spectroclusters/validate/name": { + "get": { + "tags": [ + "v1" + ], + "summary": "Validates the cluster name", + "operationId": "v1SpectroClustersValidateName", + "parameters": [ + { + "type": "string", + "description": "Cluster name", + "name": "name", + "in": "query" + } + ], + "responses": { + "204": { + "description": "Ok response without content", + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + } + }, + "/v1/spectroclusters/validate/packs": { + "post": { + "tags": [ + "v1" + ], + "summary": "Validates spectro cluster packs", + "operationId": "v1SpectroClustersValidatePacks", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1SpectroClusterPacksEntity" + } + } + ], + "responses": { + "200": { + "description": "Cluster packs validation response", + "schema": { + "$ref": "#/definitions/v1SpectroClusterValidatorResponse" + } + } + } + } + }, + "/v1/spectroclusters/virtual": { + "post": { + "tags": [ + "v1" + ], + "summary": "Creates a virtual cluster", + "operationId": "v1SpectroClustersVirtualCreate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1SpectroVirtualClusterEntity" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + } + }, + "/v1/spectroclusters/virtual/packs/values": { + "get": { + "tags": [ + "v1" + ], + "summary": "Get the cluster pack values yaml", + "operationId": "v1VirtualClustersPacksValues", + "parameters": [ + { + "enum": [ + "k3s", + "cncf_k8s" + ], + "type": "string", + "default": "k3s", + "description": "Kubernetes distribution type", + "name": "kubernetesDistroType", + "in": "query" + } + ], + "responses": { + "200": { + "description": "Successful response", + "schema": { + "$ref": "#/definitions/v1ClusterVirtualPacksValues" + } + } + } + } + }, + "/v1/spectroclusters/virtual/validate": { + "post": { + "tags": [ + "v1" + ], + "summary": "Validates virtual cluster create operation", + "operationId": "v1SpectroClustersVirtualValidate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1SpectroVirtualClusterEntity" + } + } + ], + "responses": { + "200": { + "description": "Virtual Cluster validation response", + "schema": { + "$ref": "#/definitions/v1SpectroClusterValidatorResponse" + } + } + } + } + }, + "/v1/spectroclusters/vsphere": { + "post": { + "tags": [ + "v1" + ], + "summary": "Creates a vSphere cluster", + "operationId": "v1SpectroClustersVsphereCreate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1SpectroVsphereClusterEntity" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + } + }, + "/v1/spectroclusters/vsphere/import": { + "post": { + "tags": [ + "v1" + ], + "summary": "Imports a vSphere cluster", + "operationId": "v1SpectroClustersVsphereImport", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1SpectroVsphereClusterImportEntity" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + } + }, + "/v1/spectroclusters/vsphere/rate": { + "post": { + "tags": [ + "v1" + ], + "summary": "Get vSphere cluster estimated rate information", + "operationId": "v1SpectroClustersVsphereRate", + "parameters": [ + { + "enum": [ + "hourly", + "monthly", + "yearly" + ], + "type": "string", + "default": "hourly", + "name": "periodType", + "in": "query" + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1SpectroVsphereClusterRateEntity" + } + } + ], + "responses": { + "200": { + "description": "Vsphere Cluster estimated rate response", + "schema": { + "$ref": "#/definitions/v1SpectroClusterRate" + } + } + } + } + }, + "/v1/spectroclusters/vsphere/validate": { + "post": { + "tags": [ + "v1" + ], + "summary": "Validates vSphere cluster create operation", + "operationId": "v1SpectroClustersVsphereValidate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1SpectroVsphereClusterEntity" + } + } + ], + "responses": { + "200": { + "description": "vSphere Cluster validation response", + "schema": { + "$ref": "#/definitions/v1SpectroClusterValidatorResponse" + } + } + } + } + }, + "/v1/spectroclusters/{uid}": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the specified cluster", + "operationId": "v1SpectroClustersGet", + "parameters": [ + { + "type": "string", + "description": "Comma separated tags like system,profile", + "name": "includeTags", + "in": "query" + }, + { + "type": "boolean", + "default": false, + "description": "Resolve pack values if set to true", + "name": "resolvePackValues", + "in": "query" + }, + { + "type": "string", + "description": "Includes pack meta such as schema, presets", + "name": "includePackMeta", + "in": "query" + }, + { + "type": "string", + "description": "Filter cluster profile templates by profileType", + "name": "profileType", + "in": "query" + }, + { + "type": "boolean", + "default": false, + "description": "Include non spectro labels in the cluster labels if set to true", + "name": "includeNonSpectroLabels", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1SpectroCluster" + } + } + } + }, + "delete": { + "tags": [ + "v1" + ], + "summary": "Deletes the specified cluster", + "operationId": "v1SpectroClustersDelete", + "parameters": [ + { + "type": "boolean", + "description": "If set to true the cluster will be force deleted and user has to manually clean up the provisioned cloud resources", + "name": "forceDelete", + "in": "query" + } + ], + "responses": { + "204": { + "description": "The resource was deleted successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster uid", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/spectroclusters/{uid}/assets": { + "get": { + "tags": [ + "v1" + ], + "summary": "Get the cluster asset doc", + "operationId": "v1SpectroClustersUidAssetsGet", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1SpectroClusterAssetEntity" + } + } + } + }, + "post": { + "tags": [ + "v1" + ], + "summary": "Associate the assets for the cluster", + "operationId": "v1SpectroClustersUidAssets", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1SpectroClusterAssetEntity" + } + } + ], + "responses": { + "204": { + "description": "Ok response without content", + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/spectroclusters/{uid}/assets/adminKubeconfig": { + "get": { + "produces": [ + "application/octet-stream" + ], + "tags": [ + "v1" + ], + "summary": "Returns the specified cluster's kube config file", + "operationId": "v1SpectroClustersUidAdminKubeConfig", + "responses": { + "200": { + "description": "download file", + "schema": { + "type": "string", + "format": "binary" + }, + "headers": { + "Content-Disposition": { + "type": "string" + } + } + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster uid", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/spectroclusters/{uid}/assets/frpKubeconfig": { + "get": { + "produces": [ + "application/octet-stream" + ], + "tags": [ + "v1" + ], + "summary": "Returns the specified cluster's frp kube config file", + "operationId": "v1SpectroClustersUidFrpKubeConfigGet", + "responses": { + "200": { + "description": "download file", + "schema": { + "type": "string", + "format": "binary" + }, + "headers": { + "Content-Disposition": { + "type": "string" + } + } + } + } + }, + "put": { + "tags": [ + "v1" + ], + "summary": "Updates the cluster's frp kube config data", + "operationId": "v1SpectroClustersUidFrpKubeConfigUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1SpectroClusterAssetFrpKubeConfig" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "delete": { + "tags": [ + "v1" + ], + "summary": "Deletes the cluster's frp kube config client data", + "operationId": "v1SpectroClustersUidFrpKubeConfigDelete", + "responses": { + "204": { + "description": "The resource was deleted successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster uid", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/spectroclusters/{uid}/assets/kubeconfig": { + "get": { + "produces": [ + "application/octet-stream" + ], + "tags": [ + "v1" + ], + "summary": "Returns the specified cluster's kube config file", + "operationId": "v1SpectroClustersUidKubeConfig", + "parameters": [ + { + "type": "boolean", + "default": true, + "description": "FRP (reverse-proxy) based kube config will be returned if available", + "name": "frp", + "in": "query" + } + ], + "responses": { + "200": { + "description": "download file", + "schema": { + "type": "string", + "format": "binary" + }, + "headers": { + "Content-Disposition": { + "type": "string" + } + } + } + } + }, + "put": { + "tags": [ + "v1" + ], + "summary": "Updates the cluster's manifest data", + "operationId": "v1SpectroClustersUidKubeConfigUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1SpectroClusterAssetKubeConfig" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster uid", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/spectroclusters/{uid}/assets/kubeconfigclient": { + "get": { + "produces": [ + "application/octet-stream" + ], + "tags": [ + "v1" + ], + "summary": "Returns the specified cluster's kube config client file", + "operationId": "v1SpectroClustersUidKubeConfigClientGet", + "responses": { + "200": { + "description": "download file", + "schema": { + "type": "string", + "format": "binary" + }, + "headers": { + "Content-Disposition": { + "type": "string" + } + } + } + } + }, + "put": { + "tags": [ + "v1" + ], + "summary": "Updates the cluster's kube config client data", + "operationId": "v1SpectroClustersUidKubeConfigClientUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1SpectroClusterAssetKubeConfigClient" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "delete": { + "tags": [ + "v1" + ], + "summary": "Deletes the cluster's kube config client data", + "operationId": "v1SpectroClustersUidKubeConfigClientDelete", + "responses": { + "204": { + "description": "The resource was deleted successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster uid", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/spectroclusters/{uid}/assets/manifest": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the specified cluster's manifest data", + "operationId": "v1SpectroClustersUidManifestGet", + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "string" + } + } + } + }, + "put": { + "tags": [ + "v1" + ], + "summary": "Updates the specified cluster's manifest data", + "operationId": "v1SpectroClustersUidManifestUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1SpectroClusterAssetManifest" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster uid", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/spectroclusters/{uid}/clusterConfig/clusterMetaAttribute": { + "patch": { + "tags": [ + "v1" + ], + "summary": "Updates the specified cluster meta attribute", + "operationId": "v1SpectroClustersUidClusterMetaAttributeUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1ClusterMetaAttributeEntity" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster uid", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/spectroclusters/{uid}/clusterConfig/controlPlaneHealthCheckTimeout": { + "patch": { + "tags": [ + "v1" + ], + "summary": "Updates the specified cluster controlPlane health check timeout", + "operationId": "V1ControlPlaneHealthCheckTimeoutUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1ControlPlaneHealthCheckTimeoutEntity" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster uid", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/spectroclusters/{uid}/clusterConfig/hostCluster": { + "patch": { + "tags": [ + "v1" + ], + "summary": "Updates the specified cluster host config", + "operationId": "V1HostClusterConfigUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1HostClusterConfigEntity" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster uid", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/spectroclusters/{uid}/clusterConfig/lifecycleConfig": { + "patch": { + "tags": [ + "v1" + ], + "summary": "Updates the specified cluster Life cycle configuration", + "operationId": "v1SpectroClustersUidLifecycleConfigUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1LifecycleConfigEntity" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster uid", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/spectroclusters/{uid}/clusterConfig/osPatch": { + "patch": { + "tags": [ + "v1" + ], + "summary": "Updates the specified cluster OS patch configuration", + "operationId": "v1SpectroClustersUidOsPatchUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1OsPatchEntity" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster uid", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/spectroclusters/{uid}/config/namespaces": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves namespaces for the specified cluster", + "operationId": "v1SpectroClustersUidConfigNamespacesGet", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1ClusterNamespaceResources" + } + } + } + }, + "put": { + "tags": [ + "v1" + ], + "summary": "Updates namespaces for the specified cluster", + "operationId": "v1SpectroClustersUidConfigNamespacesUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1ClusterNamespaceResourcesUpdateEntity" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster uid", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/spectroclusters/{uid}/config/namespaces/{namespaceUid}": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves the specified namespace of the cluster", + "operationId": "v1SpectroClustersUidConfigNamespacesUidGet", + "responses": { + "200": { + "description": "Cluster's namespace response", + "schema": { + "$ref": "#/definitions/v1ClusterNamespaceResource" + } + } + } + }, + "put": { + "tags": [ + "v1" + ], + "summary": "Updates the specified namespace of the cluster", + "operationId": "v1SpectroClustersUidConfigNamespacesUidUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1ClusterNamespaceResourceInputEntity" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster uid", + "name": "uid", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Cluster namespace uid", + "name": "namespaceUid", + "in": "path", + "required": true + } + ] + }, + "/v1/spectroclusters/{uid}/config/rbacs": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves RBAC information for the specified cluster", + "operationId": "v1SpectroClustersUidConfigRbacsGet", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1ClusterRbacs" + } + } + } + }, + "put": { + "tags": [ + "v1" + ], + "summary": "Updates RBAC information for the specified cluster", + "operationId": "v1SpectroClustersUidConfigRbacsUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1ClusterRbacResourcesUpdateEntity" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster uid", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/spectroclusters/{uid}/config/rbacs/{rbacUid}": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves the specified RBAC of the cluster", + "operationId": "v1SpectroClustersUidConfigRbacsUidGet", + "responses": { + "200": { + "description": "Cluster's RBAC response", + "schema": { + "$ref": "#/definitions/v1ClusterRbac" + } + } + } + }, + "put": { + "tags": [ + "v1" + ], + "summary": "Updates the specified RBAC of the cluster", + "operationId": "v1SpectroClustersUidConfigRbacsUidUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1ClusterRbacInputEntity" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster uid", + "name": "uid", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "RBAC resource uid", + "name": "rbacUid", + "in": "path", + "required": true + } + ] + }, + "/v1/spectroclusters/{uid}/download": { + "get": { + "produces": [ + "application/octet-stream" + ], + "tags": [ + "v1" + ], + "summary": "Download the specified cluster", + "operationId": "v1SpectroClustersUidDownload", + "responses": { + "200": { + "description": "download cluster archive file", + "schema": { + "type": "string", + "format": "binary" + }, + "headers": { + "Content-Disposition": { + "type": "string" + } + } + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster uid", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/spectroclusters/{uid}/edge-native/edgeHosts": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves a list of edge host of edge-native cluster", + "operationId": "v1EdgeNativeClustersHostsList", + "responses": { + "200": { + "description": "List of edge host device", + "schema": { + "$ref": "#/definitions/v1EdgeHostDevices" + } + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster uid", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/spectroclusters/{uid}/features/backup": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the cluster backup result", + "operationId": "v1ClusterFeatureBackupGet", + "parameters": [ + { + "type": "string", + "name": "backupRequestUid", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1ClusterBackup" + } + } + } + }, + "put": { + "tags": [ + "v1" + ], + "summary": "Update cluster backup settings", + "operationId": "v1ClusterFeatureBackupUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1ClusterBackupConfig" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "post": { + "tags": [ + "v1" + ], + "summary": "Create cluster backup settings", + "operationId": "v1ClusterFeatureBackupCreate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1ClusterBackupConfig" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + }, + "delete": { + "tags": [ + "v1" + ], + "summary": "Reset cluster backup schedule settings", + "operationId": "v1ClusterFeatureBackupScheduleReset", + "responses": { + "204": { + "description": "The resource was deleted successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/spectroclusters/{uid}/features/backup/onDemand": { + "post": { + "tags": [ + "v1" + ], + "summary": "Create on demand cluster backup", + "operationId": "v1ClusterFeatureBackupOnDemandCreate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1ClusterBackupConfig" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/spectroclusters/{uid}/features/backup/{backupName}/request/{requestUid}": { + "delete": { + "tags": [ + "v1" + ], + "summary": "Delete cluster backup", + "operationId": "v1ClusterFeatureBackupDelete", + "responses": { + "204": { + "description": "The resource was deleted successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + }, + { + "type": "string", + "name": "backupName", + "in": "path", + "required": true + }, + { + "type": "string", + "name": "requestUid", + "in": "path", + "required": true + } + ] + }, + "/v1/spectroclusters/{uid}/features/complianceScan": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the compliance scan of cluster, if driverType is provided then specific status of driverType will be returned", + "operationId": "v1ClusterFeatureComplianceScanGet", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1ClusterComplianceScan" + } + } + } + }, + "put": { + "tags": [ + "v1" + ], + "summary": "Update cluster compliance scan settings", + "operationId": "v1ClusterFeatureComplianceScanUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1ClusterComplianceScheduleConfig" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "post": { + "tags": [ + "v1" + ], + "summary": "Create cluster compliance scan", + "operationId": "v1ClusterFeatureComplianceScanCreate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1ClusterComplianceScheduleConfig" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/spectroclusters/{uid}/features/complianceScan/logs/drivers": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the compliance scan log by cluster uid and driver type", + "operationId": "v1ClusterFeatureComplianceScanLogsGet", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1ClusterComplianceScanLogs" + } + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/spectroclusters/{uid}/features/complianceScan/logs/drivers/kubeBench": { + "put": { + "tags": [ + "v1" + ], + "summary": "Update the KubeBench compliance scan log by uid", + "operationId": "v1ClusterFeatureScanKubeBenchLogUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1KubeBenchEntity" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/spectroclusters/{uid}/features/complianceScan/logs/drivers/kubeHunter": { + "put": { + "tags": [ + "v1" + ], + "summary": "Update the KubeHunter compliance scan log by uid", + "operationId": "v1ClusterFeatureScanKubeHunterLogUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1KubeHunterEntity" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/spectroclusters/{uid}/features/complianceScan/logs/drivers/sonobuoy": { + "put": { + "tags": [ + "v1" + ], + "summary": "Update the Sonobuoy compliance scan log by uid", + "operationId": "v1ClusterFeatureScanSonobuoyLogUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1SonobuoyEntity" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/spectroclusters/{uid}/features/complianceScan/logs/drivers/syft": { + "patch": { + "tags": [ + "v1" + ], + "summary": "Update the Syft compliance scan log by uid", + "operationId": "v1ClusterFeatureScanSyftLogUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1SyftEntity" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/spectroclusters/{uid}/features/complianceScan/logs/{logUid}": { + "delete": { + "tags": [ + "v1" + ], + "summary": "Delete the compliance scan log by uid", + "operationId": "v1ClusterFeatureComplianceScanLogDelete", + "responses": { + "204": { + "description": "The resource was deleted successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + }, + { + "type": "string", + "name": "logUid", + "in": "path", + "required": true + } + ] + }, + "/v1/spectroclusters/{uid}/features/complianceScan/logs/{logUid}/drivers/kubeBench": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the KubeBench compliance scan log by uid", + "operationId": "v1ClusterFeatureKubeBenchLogGet", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1ClusterScanLogKubeBench" + } + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + }, + { + "type": "string", + "name": "logUid", + "in": "path", + "required": true + }, + { + "type": "string", + "name": "reportId", + "in": "query" + } + ] + }, + "/v1/spectroclusters/{uid}/features/complianceScan/logs/{logUid}/drivers/kubeHunter": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the KubeHunter compliance scan log by uid", + "operationId": "v1ClusterFeatureKubeHunterLogGet", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1ClusterScanLogKubeHunter" + } + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + }, + { + "type": "string", + "name": "logUid", + "in": "path", + "required": true + }, + { + "type": "string", + "name": "reportId", + "in": "query" + } + ] + }, + "/v1/spectroclusters/{uid}/features/complianceScan/logs/{logUid}/drivers/sonobuoy": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the Sonobuoy compliance scan log by uid", + "operationId": "v1ClusterFeatureSonobuoyLogGet", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1ClusterScanLogSonobuoy" + } + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + }, + { + "type": "string", + "name": "logUid", + "in": "path", + "required": true + }, + { + "type": "string", + "name": "reportId", + "in": "query" + } + ] + }, + "/v1/spectroclusters/{uid}/features/complianceScan/logs/{logUid}/drivers/syft": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the Syft compliance scan log by uid", + "operationId": "v1ClusterFeatureSyftLogGet", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1ClusterScanLogSyft" + } + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + }, + { + "type": "string", + "name": "logUid", + "in": "path", + "required": true + } + ] + }, + "/v1/spectroclusters/{uid}/features/complianceScan/logs/{logUid}/drivers/syft/sbom": { + "get": { + "produces": [ + "application/octet-stream" + ], + "tags": [ + "v1" + ], + "summary": "Returns the image sbom of syft scan log of cluster", + "operationId": "v1SyftScanLogImageSBOMGet", + "responses": { + "200": { + "description": "download file", + "schema": { + "type": "string", + "format": "binary" + }, + "headers": { + "Content-Disposition": { + "type": "string" + } + } + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + }, + { + "type": "string", + "name": "logUid", + "in": "path", + "required": true + }, + { + "type": "string", + "name": "image", + "in": "query", + "required": true + } + ] + }, + "/v1/spectroclusters/{uid}/features/complianceScan/logs/{logUid}/drivers/{driver}/download": { + "get": { + "produces": [ + "application/octet-stream" + ], + "tags": [ + "v1" + ], + "summary": "Downloads the driver cluster logs", + "operationId": "v1ClusterFeatureDriverLogDownload", + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "file" + }, + "headers": { + "Content-Disposition": { + "type": "string" + }, + "Content-Type": { + "type": "string" + } + } + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + }, + { + "type": "string", + "name": "logUid", + "in": "path", + "required": true + }, + { + "enum": [ + "kubeBench", + "kubeHunter", + "sonobuoy", + "syft" + ], + "type": "string", + "name": "driver", + "in": "path", + "required": true + }, + { + "type": "string", + "default": "pdf", + "name": "fileFormat", + "in": "query" + } + ] + }, + "/v1/spectroclusters/{uid}/features/complianceScan/onDemand": { + "post": { + "tags": [ + "v1" + ], + "summary": "Create on demand cluster compliance scan", + "operationId": "v1ClusterFeatureComplianceScanOnDemandCreate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1ClusterComplianceOnDemandConfig" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/spectroclusters/{uid}/features/helmCharts": { + "get": { + "tags": [ + "v1" + ], + "summary": "Get the installed helm charts of a specified cluster", + "operationId": "v1ClusterFeatureHelmChartsGet", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1ClusterHelmCharts" + } + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/spectroclusters/{uid}/features/logFetcher": { + "get": { + "tags": [ + "v1" + ], + "summary": "Get the log fetcher for cluster", + "operationId": "v1ClusterFeatureLogFetcherGet", + "parameters": [ + { + "type": "string", + "name": "requestId", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1ClusterLogFetcher" + } + } + } + }, + "post": { + "tags": [ + "v1" + ], + "summary": "Create the log fetcher for cluster", + "operationId": "v1ClusterFeatureLogFetcherCreate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1ClusterLogFetcherRequest" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster uid for which log is requested", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/spectroclusters/{uid}/features/manifests": { + "get": { + "tags": [ + "v1" + ], + "summary": "Get the installed manifests of a specified cluster", + "operationId": "v1ClusterFeatureManifestsGet", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1ClusterManifests" + } + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/spectroclusters/{uid}/features/restore": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the cluster restore of cluster", + "operationId": "v1ClusterFeatureRestoreGet", + "parameters": [ + { + "type": "string", + "name": "restoreRequestUid", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1ClusterRestore" + } + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/spectroclusters/{uid}/features/restore/onDemand": { + "post": { + "tags": [ + "v1" + ], + "summary": "Create on demand cluster restore", + "operationId": "v1ClusterFeatureRestoreOnDemandCreate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1ClusterRestoreConfig" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/spectroclusters/{uid}/import/manifest": { + "get": { + "produces": [ + "application/octet-stream" + ], + "tags": [ + "v1" + ], + "summary": "Returns the specified cluster's import manifest file", + "operationId": "v1SpectroClustersUidImportManifest", + "responses": { + "200": { + "description": "download file", + "schema": { + "type": "string", + "format": "binary" + }, + "headers": { + "Content-Disposition": { + "type": "string" + } + } + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/spectroclusters/{uid}/import/upgrade": { + "patch": { + "tags": [ + "v1" + ], + "summary": "Upgrade the specified imported read only cluster with full permissions", + "operationId": "v1SpectroClustersUidImportUpgradePatch", + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster uid", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/spectroclusters/{uid}/k8certificates": { + "get": { + "tags": [ + "v1" + ], + "summary": "Get K8Certificate for spectro cluster", + "operationId": "v1SpectroClustersK8Certificate", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1MachineCertificates" + } + } + } + }, + "put": { + "tags": [ + "v1" + ], + "summary": "Update K8Certificate for spectro cluster", + "operationId": "v1SpectroClustersK8CertificateUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1SpectroClusterK8sCertificate" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster uid", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/spectroclusters/{uid}/k8certificates/renew": { + "patch": { + "tags": [ + "v1" + ], + "summary": "Sets the cluster control plane nodes Kubernetes certificates for renewal", + "operationId": "v1SpectroClustersCertificatesRenew", + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster uid", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/spectroclusters/{uid}/kubectl/redirect": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the specified cluster's kube config file", + "operationId": "V1SpectroClustersUidKubeCtlRedirect", + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1SpectroClusterKubeCtlRedirect" + } + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster uid", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/spectroclusters/{uid}/location": { + "put": { + "tags": [ + "v1" + ], + "summary": "Associate the assets for the cluster", + "operationId": "v1SpectroClustersUidLocationPut", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1SpectroClusterLocationInputEntity" + } + } + ], + "responses": { + "204": { + "description": "Ok response without content", + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster uid", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/spectroclusters/{uid}/metadata": { + "patch": { + "tags": [ + "v1" + ], + "summary": "Update the specified spectro cluster metadata", + "operationId": "v1SpectroClustersUidMetadataUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1ObjectMetaInputEntitySchema" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster uid", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/spectroclusters/{uid}/namespaces": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns available namespaces for the cluster", + "operationId": "v1ClusterNamespacesGet", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1ClusterNamespaces" + } + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + }, + { + "type": "boolean", + "default": false, + "name": "skipEmptyNamespaces", + "in": "query" + } + ] + }, + "/v1/spectroclusters/{uid}/oidc": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns k8s spectrocluster oidc", + "operationId": "V1SpectroClustersUidOIDC", + "parameters": [ + { + "type": "string", + "description": "spc uid", + "name": "uid", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1SpectroClusterOidcSpec" + } + } + } + } + }, + "/v1/spectroclusters/{uid}/oidc/dashboard/url": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns k8s dashboard url", + "operationId": "V1SpectroClustersUidOIDCDashboardUrl", + "parameters": [ + { + "type": "string", + "description": "spc uid", + "name": "uid", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1SectroClusterK8sDashboardUrl" + } + } + } + } + }, + "/v1/spectroclusters/{uid}/pack/manifests/{manifestUid}": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the specified cluster's manifest", + "operationId": "v1SpectroClustersUidPackManifestsUidGet", + "parameters": [ + { + "type": "string", + "description": "cluster uid", + "name": "uid", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "manifest uid which is part of the pack ref", + "name": "manifestUid", + "in": "path", + "required": true + }, + { + "type": "boolean", + "default": false, + "description": "resolve pack manifest values if set to true", + "name": "resolveManifestValues", + "in": "query" + } + ], + "responses": { + "200": { + "description": "Pack manifest content", + "schema": { + "$ref": "#/definitions/v1Manifest" + } + } + } + } + }, + "/v1/spectroclusters/{uid}/pack/properties": { + "get": { + "tags": [ + "v1" + ], + "summary": "Get specified cluster pack properties", + "operationId": "v1SpectroClustersUidPackProperties", + "parameters": [ + { + "type": "string", + "description": "Cluster uid", + "name": "uid", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Pack layer", + "name": "layer", + "in": "query", + "required": true + }, + { + "type": "string", + "description": "Pack values yaml field path", + "name": "fieldPath", + "in": "query", + "required": true + }, + { + "type": "string", + "description": "Pack name", + "name": "name", + "in": "query" + }, + { + "type": "boolean", + "default": true, + "description": "Is the macros need to be resolved", + "name": "resolveMacros", + "in": "query" + } + ], + "responses": { + "200": { + "description": "Cluster's pack properties response", + "schema": { + "$ref": "#/definitions/v1SpectroClusterPackProperties" + } + } + } + } + }, + "/v1/spectroclusters/{uid}/packRefs": { + "patch": { + "tags": [ + "v1" + ], + "summary": "Updates the cluster's pack references", + "operationId": "v1SpectroClustersPacksRefUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1ClusterNotificationUpdateEntity" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + }, + { + "type": "string", + "name": "notify", + "in": "query" + } + ] + }, + "/v1/spectroclusters/{uid}/packs/resolvedValues": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the specified cluster's packs resolved values", + "operationId": "v1SpectroClustersUidPacksResolvedValuesGet", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1SpectroClusterProfilesResolvedValues" + } + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster uid", + "name": "uid", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1SpectroClusterProfilesParamReferenceEntity" + } + } + ] + }, + "/v1/spectroclusters/{uid}/packs/status": { + "patch": { + "tags": [ + "v1" + ], + "summary": "Patch update specified cluster's packs status", + "operationId": "v1SpectroClustersUidPacksStatusPatch", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1SpectroClusterPacksStatusEntity" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster uid", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/spectroclusters/{uid}/profileUpdates": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the profile updates of a specified cluster", + "operationId": "v1SpectroClustersGetProfileUpdates", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1SpectroClusterProfileUpdates" + } + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster uid", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/spectroclusters/{uid}/profiles": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the associated profiles of a specified cluster", + "operationId": "v1SpectroClustersGetProfiles", + "parameters": [ + { + "type": "string", + "description": "includes pack meta such as schema, presets", + "name": "includePackMeta", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1SpectroClusterProfileList" + } + } + } + }, + "put": { + "tags": [ + "v1" + ], + "summary": "Associate cluster profiles to the specified cluster", + "operationId": "v1SpectroClustersUpdateProfiles", + "parameters": [ + { + "type": "boolean", + "default": false, + "description": "Resolve pending cluster notification if set to true", + "name": "resolveNotification", + "in": "query" + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1SpectroClusterProfiles" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "delete": { + "tags": [ + "v1" + ], + "summary": "Remove cluster profiles from the specified cluster", + "operationId": "v1SpectroClustersDeleteProfiles", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1SpectroClusterProfilesDeleteEntity" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "patch": { + "tags": [ + "v1" + ], + "summary": "Patch cluster profiles to the specified cluster", + "operationId": "v1SpectroClustersPatchProfiles", + "parameters": [ + { + "type": "boolean", + "default": false, + "description": "Resolve pending cluster notification if set to true", + "name": "resolveNotification", + "in": "query" + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1SpectroClusterProfiles" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster uid", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/spectroclusters/{uid}/profiles/packs/manifests": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the associated profile's pack manifests of a specified cluster", + "operationId": "v1SpectroClustersGetProfilesPacksManifests", + "parameters": [ + { + "type": "string", + "description": "Includes pack meta such as schema, presets", + "name": "includePackMeta", + "in": "query" + }, + { + "type": "boolean", + "default": false, + "description": "Resolve pack macro variables if set to true", + "name": "resolveMacros", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1SpectroClusterProfilesPacksManifests" + } + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster uid", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/spectroclusters/{uid}/profiles/{profileUid}/packs/{packName}/config": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the specified cluster's profile pack configuration", + "operationId": "v1SpectroClustersUidProfilesUidPacksConfigGet", + "parameters": [ + { + "type": "string", + "description": "cluster uid", + "name": "uid", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "profile uid", + "name": "profileUid", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "pack name", + "name": "packName", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "An array of cluster pack values", + "schema": { + "$ref": "#/definitions/v1SpectroClusterPackConfigList" + } + } + } + } + }, + "/v1/spectroclusters/{uid}/profiles/{profileUid}/packs/{packName}/manifests": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the associated profiles pack manifests of the specified cluster", + "operationId": "v1SpectroClustersProfilesUidPackManifestsGet", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1PackManifests" + } + } + } + }, + "put": { + "tags": [ + "v1" + ], + "summary": "Updates cluster profiles pack manifests to the specified cluster", + "operationId": "v1SpectroClustersProfilesUidPackManifestsUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1ManifestRefInputEntities" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster uid", + "name": "uid", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Cluster profile uid", + "name": "profileUid", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Name of the pack", + "name": "packName", + "in": "path", + "required": true + } + ] + }, + "/v1/spectroclusters/{uid}/rate": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the estimated rate of the specified cluster", + "operationId": "v1SpectroClustersUidRate", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1SpectroClusterRate" + } + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster uid", + "name": "uid", + "in": "path", + "required": true + }, + { + "enum": [ + "hourly", + "monthly", + "yearly" + ], + "type": "string", + "default": "hourly", + "description": "Period type [hourly, monthly, yearly]", + "name": "periodType", + "in": "query" + } + ] + }, + "/v1/spectroclusters/{uid}/repave/approve": { + "patch": { + "tags": [ + "v1" + ], + "summary": "Returns the spectrocluster repave approve update", + "operationId": "v1SpectroClustersUidRepaveApproveUpdate", + "parameters": [ + { + "type": "string", + "description": "cluster uid", + "name": "uid", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + } + }, + "/v1/spectroclusters/{uid}/repave/status": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the spectrocluster repave", + "operationId": "v1SpectroClustersUidRepaveGet", + "parameters": [ + { + "type": "string", + "description": "cluster uid", + "name": "uid", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "Returns cluster repave status", + "schema": { + "$ref": "#/definitions/v1SpectroClusterRepave" + } + } + } + } + }, + "/v1/spectroclusters/{uid}/reset": { + "put": { + "tags": [ + "v1" + ], + "summary": "reset the cluster s by deleting machine pools and condtions", + "operationId": "V1SpectroClustersUidReset", + "responses": { + "204": { + "description": "Ok response without content", + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster uid", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/spectroclusters/{uid}/status": { + "get": { + "tags": [ + "v1" + ], + "summary": "Get the cluster's status", + "operationId": "v1SpectroClustersUidStatus", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1SpectroClusterStatusEntity" + } + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster uid", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/spectroclusters/{uid}/status/condition": { + "put": { + "tags": [ + "v1" + ], + "summary": "Updates the specified cluster status condition", + "operationId": "v1SpectroClustersUpdateStatusCondition", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1ClusterCondition" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/spectroclusters/{uid}/status/conditions": { + "patch": { + "tags": [ + "v1" + ], + "summary": "Updates the specified cluster status conditions", + "operationId": "v1SpectroClustersUpdateStatusConditions", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/v1ClusterCondition" + } + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/spectroclusters/{uid}/status/endpoints": { + "put": { + "tags": [ + "v1" + ], + "summary": "Updates the specified cluster's service endpoints information", + "operationId": "v1SpectroClustersUpdateStatusEndpoints", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/v1ApiEndpoint" + } + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/spectroclusters/{uid}/status/imported": { + "patch": { + "tags": [ + "v1" + ], + "summary": "Updates the specified cluster status as imported", + "operationId": "v1SpectroClustersUpdateStatusImported", + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/spectroclusters/{uid}/status/services": { + "put": { + "tags": [ + "v1" + ], + "summary": "Updates the specified cluster's services information", + "operationId": "v1SpectroClustersUpdateStatusServices", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/v1LoadBalancerService" + } + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/spectroclusters/{uid}/status/spcApply": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the SPC apply information for the agent", + "operationId": "v1SpectroClustersUidStatusSpcApplyGet", + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1SpcApply" + } + } + } + }, + "post": { + "tags": [ + "v1" + ], + "summary": "Set the CanBeApplied to true on the spcApply status. CanBeApplied indicates the agent to orchestrate the spc changes", + "operationId": "v1SpectroClustersUidStatusSpcApply", + "responses": { + "202": { + "description": "Ok response without content", + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/spectroclusters/{uid}/status/spcApply/patchTime": { + "patch": { + "tags": [ + "v1" + ], + "summary": "Updates the agent patch time for the SPC changes", + "operationId": "v1SpectroClustersUidStatusSpcPatchTime", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1SpcPatchTimeEntity" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/spectroclusters/{uid}/status/upgrades": { + "put": { + "tags": [ + "v1" + ], + "summary": "Updates the cluster's upgrade status", + "operationId": "v1SpectroClustersUidUpgradesPut", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1SpectroClusterUidUpgrades" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/spectroclusters/{uid}/upgrade/settings": { + "post": { + "tags": [ + "v1" + ], + "summary": "Update specific cluster upgrade settings", + "operationId": "v1SpectroClustersUidUpgradeSettings", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1ClusterUpgradeSettingsEntity" + } + } + ], + "responses": { + "204": { + "description": "Ok response without content", + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster uid", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/spectroclusters/{uid}/validate/packs": { + "post": { + "tags": [ + "v1" + ], + "summary": "Validates cluster packs", + "operationId": "v1SpectroClustersUidValidatePacks", + "parameters": [ + { + "type": "string", + "description": "cluster uid", + "name": "uid", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1SpectroClusterPacksEntity" + } + } + ], + "responses": { + "200": { + "description": "Cluster packs validation response", + "schema": { + "$ref": "#/definitions/v1SpectroClusterValidatorResponse" + } + } + } + } + }, + "/v1/spectroclusters/{uid}/validate/repave": { + "post": { + "tags": [ + "v1" + ], + "summary": "Validates if cluster gets repaved for the specified packs", + "operationId": "v1SpectroClustersUidValidateRepave", + "parameters": [ + { + "type": "string", + "description": "cluster uid", + "name": "uid", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1SpectroClusterPacksEntity" + } + } + ], + "responses": { + "200": { + "description": "Cluster repave validation response", + "schema": { + "$ref": "#/definitions/v1SpectroClusterRepaveValidationResponse" + } + } + } + } + }, + "/v1/spectroclusters/{uid}/variables": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieve a list of variables associated with the cluster", + "operationId": "v1SpectroClustersUidVariablesGet", + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1Variables" + } + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster uid for which variables need to be retrieved", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/spectroclusters/{uid}/vms": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the list of virtual machines", + "operationId": "v1SpectroClustersVMList", + "parameters": [ + { + "type": "array", + "items": { + "type": "string" + }, + "collectionFormat": "csv", + "description": "Namespace names, comma separated value (ex: dev,test). If namespace is empty it returns the specific resource under all namespace", + "name": "namespace", + "in": "query" + }, + { + "type": "integer", + "format": "int64", + "default": 50, + "description": "limit is a maximum number of responses to return for a list call. Default and maximum value of the limit is 50.\nIf more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results.", + "name": "limit", + "in": "query" + }, + { + "type": "string", + "description": "continue token to paginate the subsequent data items", + "name": "continue", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1ClusterVirtualMachineList" + } + } + } + }, + "post": { + "tags": [ + "v1" + ], + "summary": "Create virtual machine", + "operationId": "v1SpectroClustersVMCreate", + "parameters": [ + { + "type": "string", + "description": "Namespace name", + "name": "namespace", + "in": "query", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1ClusterVirtualMachine" + } + } + ], + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1ClusterVirtualMachine" + } + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster uid", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/spectroclusters/{uid}/vms/snapshot": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the list of snapshots of given namespaces", + "operationId": "v1ClusterVMSnapshotsList", + "parameters": [ + { + "type": "array", + "items": { + "type": "string" + }, + "collectionFormat": "csv", + "description": "vmName is comma separated value (ex: name1,name2).", + "name": "vmName", + "in": "query" + }, + { + "type": "array", + "items": { + "type": "string" + }, + "collectionFormat": "csv", + "description": "Namespace names, comma separated value (ex: dev,test). If namespace is empty it returns the specific resource under all namespace", + "name": "namespace", + "in": "query" + }, + { + "type": "integer", + "format": "int64", + "default": 50, + "description": "limit is a maximum number of responses to return for a list call. Default and maximum value of the limit is 50.\nIf more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results.", + "name": "limit", + "in": "query" + }, + { + "type": "string", + "description": "continue token to paginate the subsequent data items", + "name": "continue", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1VirtualMachineSnapshotList" + } + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster uid", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/spectroclusters/{uid}/vms/{vmName}": { + "get": { + "tags": [ + "v1" + ], + "summary": "Get virtual machine", + "operationId": "v1SpectroClustersVMGet", + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1ClusterVirtualMachine" + } + } + } + }, + "put": { + "tags": [ + "v1" + ], + "summary": "Updates the specified virtual machine of the cluster", + "operationId": "v1SpectroClustersVMUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1ClusterVirtualMachine" + } + } + ], + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1ClusterVirtualMachine" + } + } + } + }, + "delete": { + "tags": [ + "v1" + ], + "summary": "Deletes the virtual machine", + "operationId": "v1SpectroClustersVMDelete", + "responses": { + "204": { + "description": "The resource was deleted successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster uid", + "name": "uid", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Virtual Machine name", + "name": "vmName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Namespace name", + "name": "namespace", + "in": "query", + "required": true + } + ] + }, + "/v1/spectroclusters/{uid}/vms/{vmName}/addVolume": { + "put": { + "tags": [ + "v1" + ], + "summary": "Add volume to the virtual machine instance", + "operationId": "v1SpectroClustersVMAddVolume", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1VMAddVolumeEntity" + } + } + ], + "responses": { + "204": { + "description": "Ok response without content", + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster uid", + "name": "uid", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Virtual Machine name", + "name": "vmName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Namespace name", + "name": "namespace", + "in": "query", + "required": true + } + ] + }, + "/v1/spectroclusters/{uid}/vms/{vmName}/clone": { + "post": { + "tags": [ + "v1" + ], + "summary": "Clone virtual machine", + "operationId": "v1SpectroClustersVMClone", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1SpectroClusterVMCloneEntity" + } + } + ], + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1ClusterVirtualMachine" + } + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster uid", + "name": "uid", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Virtual Machine name", + "name": "vmName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Namespace name", + "name": "namespace", + "in": "query", + "required": true + } + ] + }, + "/v1/spectroclusters/{uid}/vms/{vmName}/migrate": { + "put": { + "tags": [ + "v1" + ], + "summary": "Migrate the virtual machine", + "operationId": "v1SpectroClustersVMMigrate", + "responses": { + "204": { + "description": "Ok response without content", + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster uid", + "name": "uid", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Virtual Machine name", + "name": "vmName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Namespace name", + "name": "namespace", + "in": "query", + "required": true + } + ] + }, + "/v1/spectroclusters/{uid}/vms/{vmName}/pause": { + "put": { + "tags": [ + "v1" + ], + "summary": "Pause the virtual machine instance", + "operationId": "v1SpectroClustersVMPause", + "responses": { + "204": { + "description": "Ok response without content", + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster uid", + "name": "uid", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Virtual Machine name", + "name": "vmName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Namespace name", + "name": "namespace", + "in": "query", + "required": true + } + ] + }, + "/v1/spectroclusters/{uid}/vms/{vmName}/removeVolume": { + "put": { + "tags": [ + "v1" + ], + "summary": "Remove volume from the virtual machine instance", + "operationId": "v1SpectroClustersVMRemoveVolume", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1VMRemoveVolumeEntity" + } + } + ], + "responses": { + "204": { + "description": "Ok response without content", + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster uid", + "name": "uid", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Virtual Machine name", + "name": "vmName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Namespace name", + "name": "namespace", + "in": "query", + "required": true + } + ] + }, + "/v1/spectroclusters/{uid}/vms/{vmName}/restart": { + "put": { + "tags": [ + "v1" + ], + "summary": "Restart the virtual machine", + "operationId": "v1SpectroClustersVMRestart", + "responses": { + "204": { + "description": "Ok response without content", + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster uid", + "name": "uid", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Virtual Machine name", + "name": "vmName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Namespace name", + "name": "namespace", + "in": "query", + "required": true + } + ] + }, + "/v1/spectroclusters/{uid}/vms/{vmName}/resume": { + "put": { + "tags": [ + "v1" + ], + "summary": "Resume the virtual machine instance", + "operationId": "v1SpectroClustersVMResume", + "responses": { + "204": { + "description": "Ok response without content", + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster uid", + "name": "uid", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Virtual Machine name", + "name": "vmName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Namespace name", + "name": "namespace", + "in": "query", + "required": true + } + ] + }, + "/v1/spectroclusters/{uid}/vms/{vmName}/snapshot": { + "post": { + "tags": [ + "v1" + ], + "summary": "Create snapshot of virtual machine", + "operationId": "v1VMSnapshotCreate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1VirtualMachineSnapshot" + } + } + ], + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1VirtualMachineSnapshot" + } + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster uid", + "name": "uid", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Virtual Machine name", + "name": "vmName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Namespace name of virtual machine", + "name": "namespace", + "in": "query", + "required": true + } + ] + }, + "/v1/spectroclusters/{uid}/vms/{vmName}/snapshot/{snapshotName}": { + "get": { + "tags": [ + "v1" + ], + "summary": "Get virtual machine snapshot", + "operationId": "v1VMSnapshotGet", + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1VirtualMachineSnapshot" + } + } + } + }, + "put": { + "tags": [ + "v1" + ], + "summary": "Updates the specified snapshot of a virtual machine", + "operationId": "v1VMSnapshotUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1VirtualMachineSnapshot" + } + } + ], + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1VirtualMachineSnapshot" + } + } + } + }, + "delete": { + "tags": [ + "v1" + ], + "summary": "Delete the snapshot of virtual machine", + "operationId": "v1VMSnapshotDelete", + "responses": { + "204": { + "description": "The resource was deleted successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster uid", + "name": "uid", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Virtual Machine name", + "name": "vmName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Snapshot name", + "name": "snapshotName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Namespace name", + "name": "namespace", + "in": "query", + "required": true + } + ] + }, + "/v1/spectroclusters/{uid}/vms/{vmName}/start": { + "put": { + "tags": [ + "v1" + ], + "summary": "Start the virtual machine", + "operationId": "v1SpectroClustersVMStart", + "responses": { + "204": { + "description": "Ok response without content", + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster uid", + "name": "uid", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Virtual Machine name", + "name": "vmName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Namespace name", + "name": "namespace", + "in": "query", + "required": true + } + ] + }, + "/v1/spectroclusters/{uid}/vms/{vmName}/stop": { + "put": { + "tags": [ + "v1" + ], + "summary": "Stop the virtual machine", + "operationId": "v1SpectroClustersVMStop", + "responses": { + "204": { + "description": "Ok response without content", + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster uid", + "name": "uid", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Virtual Machine name", + "name": "vmName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Namespace name", + "name": "namespace", + "in": "query", + "required": true + } + ] + }, + "/v1/spectroclusters/{uid}/workloads/sync": { + "post": { + "description": "Sync specified cluster workload", + "tags": [ + "v1" + ], + "summary": "Sync specified cluster workload", + "operationId": "v1SpectroClustersUidWorkloadsSync", + "responses": { + "202": { + "description": "Ok response without content", + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/spectroclusters/{uid}/workloads/{workloadKind}/sync": { + "post": { + "tags": [ + "v1" + ], + "summary": "Sync specified cluster workload", + "operationId": "v1SpectroClustersUidWorkloadsKindSync", + "responses": { + "202": { + "description": "Ok response without content", + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster uid", + "name": "uid", + "in": "path", + "required": true + }, + { + "enum": [ + "namespace", + "pod", + "deployment", + "statefulset", + "daemonset", + "job", + "cronjob", + "rolebinding", + "clusterrolebinding" + ], + "type": "string", + "description": "Workload kind", + "name": "workloadKind", + "in": "path", + "required": true + } + ] + }, + "/v1/system/config/reverseproxy": { + "get": { + "tags": [ + "v1", + "system", + "private", + "docs-show" + ], + "summary": "get the system config reverse proxy", + "operationId": "V1SystemConfigReverseProxyGet", + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1SystemReverseProxy" + } + } + } + }, + "put": { + "tags": [ + "v1", + "system", + "private", + "docs-show" + ], + "summary": "updates the system config reverse proxy", + "operationId": "V1SystemConfigReverseProxyUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1SystemReverseProxy" + } + } + ], + "responses": { + "204": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1Updated" + } + } + } + } + }, + "/v1/system/passwords/blocklist": { + "delete": { + "tags": [ + "v1", + "system", + "docs-show" + ], + "summary": "Delete a list of block listed passwords", + "operationId": "V1PasswordsBlockListDelete", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/V1PasswordsBlockList" + } + } + ], + "responses": { + "204": { + "description": "The resource was deleted successfully" + } + } + }, + "patch": { + "tags": [ + "v1", + "system", + "docs-show" + ], + "summary": "List of block listed passwords", + "operationId": "V1PasswordsBlockListUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/V1PasswordsBlockList" + } + } + ], + "responses": { + "204": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1Updated" + } + } + } + } + }, + "/v1/teams": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves a list of teams", + "operationId": "v1TeamsList", + "parameters": [ + { + "type": "string", + "description": "Set of fields to be presented in the response with values. The fields are comma separated. Eg: metadata.uid,metadata.name", + "name": "fields", + "in": "query" + }, + { + "type": "string", + "description": "Filters can be combined with AND, OR operators with field path name. Eg: metadata.name=TestServiceANDspec.cloudType=aws\n\nServer will be restricted to certain fields based on the indexed data for each resource.", + "name": "filters", + "in": "query" + }, + { + "type": "string", + "description": "Specify the fields with sort order. 1 indicates ascending and -1 for descending. Eg: orderBy=metadata.name=1,metadata.uid=-1", + "name": "orderBy", + "in": "query" + }, + { + "type": "integer", + "format": "int64", + "default": 50, + "description": "limit is a maximum number of responses to return for a list call. Default and maximum value of the limit is 50.\nIf more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results.", + "name": "limit", + "in": "query" + }, + { + "type": "integer", + "format": "int64", + "description": "offset is the next index number from which the response will start. The response offset value can be used along with continue token for the pagination.", + "name": "offset", + "in": "query" + }, + { + "type": "string", + "description": "continue token to paginate the subsequent data items", + "name": "continue", + "in": "query" + } + ], + "responses": { + "200": { + "description": "An array of teams", + "schema": { + "$ref": "#/definitions/v1Teams" + } + } + } + }, + "post": { + "tags": [ + "v1" + ], + "summary": "Creates a team with the specified users and roles", + "operationId": "v1TeamsCreate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1Team" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + } + }, + "/v1/teams/summary": { + "post": { + "tags": [ + "v1" + ], + "summary": "Retrieves a list of teams summary with provided filter spec", + "operationId": "v1TeamsSummaryGet", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1TeamsSummarySpec" + } + } + ], + "responses": { + "200": { + "description": "An array of teams summary items", + "schema": { + "$ref": "#/definitions/v1TeamsSummaryList" + } + } + } + } + }, + "/v1/teams/{uid}": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the sepcified team", + "operationId": "v1TeamsUidGet", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1Team" + } + } + } + }, + "put": { + "tags": [ + "v1" + ], + "summary": "Updates the sepcified team", + "operationId": "v1TeamsUidUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1Team" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "delete": { + "tags": [ + "v1" + ], + "summary": "Deletes the specified team", + "operationId": "v1TeamsUidDelete", + "responses": { + "204": { + "description": "The resource was deleted successfully" + } + } + }, + "patch": { + "tags": [ + "v1" + ], + "summary": "Patches the specified team", + "operationId": "v1TeamsUidPatch", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1TeamPatch" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/teams/{uid}/projects": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the specified team's project and roles data", + "operationId": "v1TeamsProjectRoles", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1ProjectRolesEntity" + } + } + } + }, + "put": { + "tags": [ + "v1" + ], + "summary": "Updates the projects and roles for the specified team", + "operationId": "v1TeamsProjectRolesPut", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1ProjectRolesPatch" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/teams/{uid}/resourceRoles": { + "get": { + "description": "Returns resource roles for team", + "tags": [ + "v1" + ], + "summary": "Returns the specified individual and resource roles for a team", + "operationId": "v1TeamsUidResourceRoles", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1ResourceRoles" + } + } + } + }, + "post": { + "description": "Resource roles added to specific team", + "tags": [ + "v1" + ], + "summary": "Add resource roles for team", + "operationId": "v1TeamsUidResourceRolesCreate", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1ResourceRolesUpdateEntity" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/teams/{uid}/resourceRoles/{resourceRoleUid}": { + "delete": { + "tags": [ + "v1" + ], + "summary": "Deleted the resource roles from team", + "operationId": "v1TeamsUidResourceRolesUidDelete", + "responses": { + "204": { + "description": "The resource was deleted successfully" + } + } + }, + "patch": { + "description": "Specific resource roles fo team is updated", + "tags": [ + "v1" + ], + "summary": "Updates the resource roles for team", + "operationId": "v1TeamsResourceRolesUidUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1ResourceRolesUpdateEntity" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + }, + { + "type": "string", + "name": "resourceRoleUid", + "in": "path", + "required": true + } + ] + }, + "/v1/teams/{uid}/roles": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the specified team's tenant roles", + "operationId": "V1TeamsUidTenantRolesGet", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1TeamTenantRolesEntity" + } + } + } + }, + "put": { + "tags": [ + "v1" + ], + "summary": "Updates the tenant roles of the specified team", + "operationId": "V1TeamsUidTenantRolesUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1TeamTenantRolesUpdate" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/tenants/{tenantUid}/address": { + "patch": { + "tags": [ + "v1" + ], + "summary": "Update tenant address", + "operationId": "v1PatchTenantAddress", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1TenantAddressPatch" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "name": "tenantUid", + "in": "path", + "required": true + } + ] + }, + "/v1/tenants/{tenantUid}/assets/certs": { + "get": { + "tags": [ + "v1" + ], + "summary": "lists the certificates for the tenant", + "operationId": "V1TenantUIdAssetsCertsList", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1TenantAssetCerts" + } + } + } + }, + "post": { + "tags": [ + "v1" + ], + "summary": "create the tenant certificate", + "operationId": "V1TenantUidAssetsCertsCreate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1TenantAssetCert" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + }, + "parameters": [ + { + "type": "string", + "name": "tenantUid", + "in": "path", + "required": true + } + ] + }, + "/v1/tenants/{tenantUid}/assets/certs/{certificateUid}": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the ca certificate for the tenant", + "operationId": "V1TenantUidAssetsCertsUidGet", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1TenantAssetCert" + } + } + } + }, + "put": { + "tags": [ + "v1" + ], + "summary": "updates the tenant certificate", + "operationId": "V1TenantUidAssetsCertsUidUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1TenantAssetCert" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "delete": { + "tags": [ + "v1" + ], + "summary": "deletes the tenant certificate", + "operationId": "V1TenantUidAssetsCertsUidDelete", + "responses": { + "204": { + "description": "The resource was deleted successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "name": "tenantUid", + "in": "path", + "required": true + }, + { + "type": "string", + "name": "certificateUid", + "in": "path", + "required": true + } + ] + }, + "/v1/tenants/{tenantUid}/assets/dataSinks": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns data sink config of tenant", + "operationId": "V1TenantUidAssetsDataSinksGet", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1DataSinkConfig" + } + } + } + }, + "put": { + "tags": [ + "v1" + ], + "summary": "updates the tenant data sink config", + "operationId": "V1TenantUidAssetsDataSinksUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1DataSinkConfig" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "post": { + "tags": [ + "v1" + ], + "summary": "create data sink config", + "operationId": "V1TenantUidAssetsDataSinksCreate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1DataSinkConfig" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + }, + "delete": { + "tags": [ + "v1" + ], + "summary": "deletes the tenant data sink config", + "operationId": "V1TenantUidAssetsDataSinksDelete", + "responses": { + "204": { + "description": "The resource was deleted successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "name": "tenantUid", + "in": "path", + "required": true + } + ] + }, + "/v1/tenants/{tenantUid}/authTokenSettings": { + "get": { + "tags": [ + "v1" + ], + "summary": "Get tenant auth token settings", + "operationId": "v1TenantUidAuthTokenSettingsGet", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1AuthTokenSettings" + } + } + } + }, + "put": { + "tags": [ + "v1" + ], + "summary": "Update tenant auth token settings", + "operationId": "v1TenantUidAuthTokenSettingsUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1AuthTokenSettings" + } + } + ], + "responses": { + "204": { + "description": "Ok response without content", + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + }, + "parameters": [ + { + "type": "string", + "name": "tenantUid", + "in": "path", + "required": true + } + ] + }, + "/v1/tenants/{tenantUid}/contract/accept": { + "patch": { + "tags": [ + "v1" + ], + "summary": "Tenant to accept the contract agreement", + "operationId": "v1TenantsUidContractAccept", + "responses": { + "204": { + "description": "Ok response without content", + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + }, + "parameters": [ + { + "type": "string", + "name": "tenantUid", + "in": "path", + "required": true + } + ] + }, + "/v1/tenants/{tenantUid}/creditAccount/aws": { + "get": { + "tags": [ + "v1" + ], + "summary": "Get the credit accounts for the tenants with free tier access", + "operationId": "v1TenantsCreditAccountGet", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1AwsCreditAccountEntity" + } + } + } + }, + "delete": { + "tags": [ + "v1" + ], + "summary": "Deletes the aws credit account for tenants", + "operationId": "v1TenantsCreditAccountDelete", + "parameters": [ + { + "type": "boolean", + "default": false, + "name": "forceDelete", + "in": "query" + } + ], + "responses": { + "204": { + "description": "The resource was deleted successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "name": "tenantUid", + "in": "path", + "required": true + } + ] + }, + "/v1/tenants/{tenantUid}/domains": { + "get": { + "tags": [ + "v1" + ], + "summary": "retrieves the domains for tenant", + "operationId": "V1TenantUidDomainsGet", + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1TenantDomains" + } + } + } + }, + "post": { + "tags": [ + "v1" + ], + "summary": "creates or updates domains for tenant", + "operationId": "V1TenantUidDomainsUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1TenantDomains" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "name": "tenantUid", + "in": "path", + "required": true + } + ] + }, + "/v1/tenants/{tenantUid}/emailId": { + "patch": { + "tags": [ + "v1" + ], + "summary": "Update tenant emailId", + "operationId": "v1PatchTenantEmailId", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1TenantEmailPatch" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "name": "tenantUid", + "in": "path", + "required": true + } + ] + }, + "/v1/tenants/{tenantUid}/freemium": { + "get": { + "tags": [ + "v1" + ], + "summary": "Get tenant level freemium configuration", + "operationId": "v1TenantFreemiumGet", + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1TenantFreemium" + } + } + } + }, + "put": { + "tags": [ + "v1" + ], + "summary": "Update tenant freemium configuration", + "operationId": "v1TenantFreemiumUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1TenantFreemium" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "name": "tenantUid", + "in": "path", + "required": true + } + ] + }, + "/v1/tenants/{tenantUid}/freemiumUsage": { + "get": { + "tags": [ + "v1" + ], + "summary": "Get tenant freemium usage", + "operationId": "v1TenantFreemiumUsageGet", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1TenantFreemiumUsage" + } + } + } + }, + "parameters": [ + { + "type": "string", + "name": "tenantUid", + "in": "path", + "required": true + } + ] + }, + "/v1/tenants/{tenantUid}/invoices/{invoiceUid}": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns a specified invoice", + "operationId": "v1InvoicesUidGet", + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1Invoice" + } + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Specify the tenant uid", + "name": "tenantUid", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Specify the invoice uid", + "name": "invoiceUid", + "in": "path", + "required": true + } + ] + }, + "/v1/tenants/{tenantUid}/invoices/{invoiceUid}/report/invoice/pdf": { + "get": { + "produces": [ + "application/octet-stream" + ], + "tags": [ + "v1" + ], + "summary": "Downloads the specified invoice report", + "operationId": "V1InvoiceUidReportInvoicePdf", + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "file" + }, + "headers": { + "Content-Disposition": { + "type": "string" + }, + "Content-Type": { + "type": "string" + } + } + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Specify the tenant uid", + "name": "tenantUid", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Specify the invoice uid", + "name": "invoiceUid", + "in": "path", + "required": true + } + ] + }, + "/v1/tenants/{tenantUid}/invoices/{invoiceUid}/report/pdf": { + "get": { + "produces": [ + "application/octet-stream" + ], + "tags": [ + "v1" + ], + "summary": "Downloads the specified monthly invoice report", + "operationId": "V1InvoiceUidReportPdf", + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "file" + }, + "headers": { + "Content-Disposition": { + "type": "string" + }, + "Content-Type": { + "type": "string" + } + } + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Specify the tenant uid", + "name": "tenantUid", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Specify the invoice uid", + "name": "invoiceUid", + "in": "path", + "required": true + } + ] + }, + "/v1/tenants/{tenantUid}/invoices/{invoiceUid}/report/usage/pdf": { + "get": { + "produces": [ + "application/octet-stream" + ], + "tags": [ + "v1" + ], + "summary": "Downloads the specified tenant usage", + "operationId": "V1InvoiceUidReportUsagePdf", + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "file" + }, + "headers": { + "Content-Disposition": { + "type": "string" + }, + "Content-Type": { + "type": "string" + } + } + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Specify the tenant uid", + "name": "tenantUid", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Specify the invoice uid", + "name": "invoiceUid", + "in": "path", + "required": true + } + ] + }, + "/v1/tenants/{tenantUid}/loginBanner": { + "get": { + "tags": [ + "v1" + ], + "summary": "Get tenant login banner settings", + "operationId": "v1TenantUidLoginBannerGet", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1LoginBannerSettings" + } + } + } + }, + "put": { + "tags": [ + "v1" + ], + "summary": "Update tenant login banner settings", + "operationId": "v1TenantUidLoginBannerUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1LoginBannerSettings" + } + } + ], + "responses": { + "204": { + "description": "Ok response without content", + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + }, + "parameters": [ + { + "type": "string", + "name": "tenantUid", + "in": "path", + "required": true + } + ] + }, + "/v1/tenants/{tenantUid}/macros": { + "get": { + "tags": [ + "v1" + ], + "summary": "List the macros of the specified tenant", + "operationId": "v1TenantsUidMacrosList", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1Macros" + } + } + } + }, + "put": { + "tags": [ + "v1" + ], + "summary": "Update the macros of the specified tenant", + "operationId": "v1TenantsUidMacrosUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1Macros" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "post": { + "tags": [ + "v1" + ], + "summary": "Create or add new macros for the specified tenant", + "operationId": "v1TenantsUidMacrosCreate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1Macros" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "delete": { + "tags": [ + "v1" + ], + "summary": "Delete the macros for the specified tenant by given macro name", + "operationId": "v1TenantsUidMacrosDeleteByMacroName", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1Macros" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "patch": { + "tags": [ + "v1" + ], + "summary": "Update the macros for the specified tenant by given macro name", + "operationId": "v1TenantsUidMacrosUpdateByMacroName", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1Macros" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "name": "tenantUid", + "in": "path", + "required": true + } + ] + }, + "/v1/tenants/{tenantUid}/oidc/config": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the oidc Spec for tenant", + "operationId": "V1TenantUidOidcConfigGet", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1TenantOidcClientSpec" + } + } + } + }, + "post": { + "tags": [ + "v1" + ], + "summary": "Associates the oidc Spec for the tenant", + "operationId": "V1TenantUidOidcConfigUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1TenantOidcClientSpec" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "name": "tenantUid", + "in": "path", + "required": true + } + ] + }, + "/v1/tenants/{tenantUid}/password/policy": { + "post": { + "tags": [ + "v1" + ], + "summary": "creates or updates a password policy for tenant", + "operationId": "V1TenantUidPasswordPolicyUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1TenantPasswordPolicyEntity" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "name": "tenantUid", + "in": "path", + "required": true + } + ] + }, + "/v1/tenants/{tenantUid}/preferences/clusterGroup": { + "get": { + "tags": [ + "v1" + ], + "summary": "Get is cluster group enabled for a specific tenant", + "operationId": "V1TenantPrefClusterGroupGet", + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1TenantEnableClusterGroup" + } + } + } + }, + "put": { + "tags": [ + "v1" + ], + "summary": "Enable or Disable cluster group for a specific tenant", + "operationId": "V1TenantPrefClusterGroupUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1TenantEnableClusterGroup" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "name": "tenantUid", + "in": "path", + "required": true + } + ] + }, + "/v1/tenants/{tenantUid}/preferences/clusterSettings": { + "get": { + "tags": [ + "v1" + ], + "summary": "Get tenant cluster settings", + "operationId": "v1TenantClusterSettingsGet", + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1TenantClusterSettings" + } + } + } + }, + "parameters": [ + { + "type": "string", + "name": "tenantUid", + "in": "path", + "required": true + } + ] + }, + "/v1/tenants/{tenantUid}/preferences/clusterSettings/nodesAutoRemediationSetting": { + "put": { + "tags": [ + "v1" + ], + "summary": "Update tenant clusters nodes auto remediation setting", + "operationId": "v1TenantClustersNodesAutoRemediationSettingUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1NodesAutoRemediationSettings" + } + } + ], + "responses": { + "204": { + "description": "Ok response without content", + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + }, + "parameters": [ + { + "type": "string", + "name": "tenantUid", + "in": "path", + "required": true + } + ] + }, + "/v1/tenants/{tenantUid}/preferences/developerCredit": { + "get": { + "tags": [ + "v1" + ], + "summary": "Get developer credit enabled for a specific tenant", + "operationId": "V1TenantDeveloperCreditGet", + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1DeveloperCredit" + } + } + } + }, + "put": { + "tags": [ + "v1" + ], + "summary": "update developer credit for a specific tenant", + "operationId": "V1TenantDeveloperCreditUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1DeveloperCredit" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "name": "tenantUid", + "in": "path", + "required": true + } + ] + }, + "/v1/tenants/{tenantUid}/preferences/fips": { + "get": { + "tags": [ + "v1" + ], + "summary": "Get tenant fips settings", + "operationId": "v1TenantFipsSettingsGet", + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1FipsSettings" + } + } + } + }, + "put": { + "tags": [ + "v1" + ], + "summary": "Update tenant fips setting", + "operationId": "v1TenantFipsSettingsUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1FipsSettings" + } + } + ], + "responses": { + "204": { + "description": "Ok response without content", + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + }, + "parameters": [ + { + "type": "string", + "name": "tenantUid", + "in": "path", + "required": true + } + ] + }, + "/v1/tenants/{tenantUid}/rateConfig": { + "get": { + "tags": [ + "v1" + ], + "summary": "Get all rate config for public and private cloud", + "operationId": "v1RateConfigGet", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1RateConfig" + } + } + } + }, + "put": { + "tags": [ + "v1" + ], + "summary": "updates the rate config for public and private cloud", + "operationId": "v1RateConfigUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1RateConfig" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "name": "tenantUid", + "in": "path", + "required": true + } + ] + }, + "/v1/tenants/{tenantUid}/resourceLimits": { + "get": { + "tags": [ + "v1" + ], + "summary": "Get tenant level resource limits configuration", + "operationId": "v1TenantResourceLimitsGet", + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1TenantResourceLimits" + } + } + } + }, + "patch": { + "tags": [ + "v1" + ], + "summary": "Update tenant resource limits configuration", + "operationId": "v1TenantResourceLimitsUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1TenantResourceLimitsEntity" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "name": "tenantUid", + "in": "path", + "required": true + } + ] + }, + "/v1/tenants/{tenantUid}/saml/config": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the specified service provider metadata and Saml Spec for tenant", + "operationId": "V1TenantUidSamlConfigSpecGet", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1TenantSamlSpec" + } + } + } + }, + "post": { + "tags": [ + "v1" + ], + "summary": "Associates the specified federation metadata for the tenant", + "operationId": "V1TenantUidSamlConfigUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1TenantSamlRequestSpec" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "name": "tenantUid", + "in": "path", + "required": true + } + ] + }, + "/v1/tenants/{tenantUid}/sso/auth/providers": { + "get": { + "tags": [ + "v1" + ], + "summary": "get sso logins for the tenants", + "operationId": "V1TenantUidSsoAuthProvidersGet", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1TenantSsoAuthProvidersEntity" + } + } + } + }, + "post": { + "tags": [ + "v1" + ], + "summary": "enable sso logins for the tenants", + "operationId": "V1TenantUidSsoAuthProvidersUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1TenantSsoAuthProvidersEntity" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "name": "tenantUid", + "in": "path", + "required": true + } + ] + }, + "/v1/users": { + "get": { + "description": "Lists users the given user context", + "tags": [ + "v1" + ], + "summary": "Lists users", + "operationId": "v1UsersList", + "parameters": [ + { + "type": "string", + "description": "Set of fields to be presented in the response with values. The fields are comma separated. Eg: metadata.uid,metadata.name", + "name": "fields", + "in": "query" + }, + { + "type": "string", + "description": "Filters can be combined with AND, OR operators with field path name. Eg: metadata.name=TestServiceANDspec.cloudType=aws\n\nServer will be restricted to certain fields based on the indexed data for each resource.", + "name": "filters", + "in": "query" + }, + { + "type": "string", + "description": "Specify the fields with sort order. 1 indicates ascending and -1 for descending. Eg: orderBy=metadata.name=1,metadata.uid=-1", + "name": "orderBy", + "in": "query" + }, + { + "type": "integer", + "format": "int64", + "default": 50, + "description": "limit is a maximum number of responses to return for a list call. Default and maximum value of the limit is 50.\nIf more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results.", + "name": "limit", + "in": "query" + }, + { + "type": "integer", + "format": "int64", + "description": "offset is the next index number from which the response will start. The response offset value can be used along with continue token for the pagination.", + "name": "offset", + "in": "query" + }, + { + "type": "string", + "description": "continue token to paginate the subsequent data items", + "name": "continue", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1Users" + } + } + } + }, + "post": { + "description": "A user is created for the given user context", + "tags": [ + "v1" + ], + "summary": "Create User", + "operationId": "v1UsersCreate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1UserEntity" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + } + }, + "/v1/users/assets/locations": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the specified users location", + "operationId": "v1UsersAssetsLocationGet", + "parameters": [ + { + "type": "string", + "description": "Filters can be combined with AND, OR operators with field path name. Eg: metadata.name=TestServiceANDspec.cloudType=aws\n\nServer will be restricted to certain fields based on the indexed data for each resource.", + "name": "filters", + "in": "query" + }, + { + "type": "string", + "description": "Specify the fields with sort order. 1 indicates ascending and -1 for descending. Eg: orderBy=metadata.name=1,metadata.uid=-1", + "name": "orderBy", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1UserAssetsLocations" + } + } + } + } + }, + "/v1/users/assets/locations/azure": { + "post": { + "tags": [ + "v1" + ], + "summary": "Create a Azure location", + "operationId": "v1UsersAssetsLocationAzureCreate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1UserAssetsLocationAzure" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + } + }, + "/v1/users/assets/locations/azure/{uid}": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the specified Azure location", + "operationId": "v1UsersAssetsLocationAzureGet", + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1UserAssetsLocationAzure" + } + } + } + }, + "put": { + "tags": [ + "v1" + ], + "summary": "Updates the specified Azure location", + "operationId": "v1UsersAssetsLocationAzureUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1UserAssetsLocationAzure" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Specify the Azure location uid", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/users/assets/locations/gcp": { + "post": { + "tags": [ + "v1" + ], + "summary": "Create a GCP location", + "operationId": "v1UsersAssetsLocationGcpCreate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1UserAssetsLocationGcp" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + } + }, + "/v1/users/assets/locations/gcp/{uid}": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the specified GCP location", + "operationId": "v1UsersAssetsLocationGcpGet", + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1UserAssetsLocationGcp" + } + } + } + }, + "put": { + "tags": [ + "v1" + ], + "summary": "Updates the specified GCP location", + "operationId": "v1UsersAssetsLocationGcpUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1UserAssetsLocationGcp" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Specify the GCP location uid", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/users/assets/locations/minio": { + "post": { + "tags": [ + "v1" + ], + "summary": "Create a MinIO location", + "operationId": "v1UsersAssetsLocationMinioCreate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1UserAssetsLocationS3" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + } + }, + "/v1/users/assets/locations/minio/{uid}": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the specified MinIO location", + "operationId": "v1UsersAssetsLocationMinioGet", + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1UserAssetsLocationS3" + } + } + } + }, + "put": { + "tags": [ + "v1" + ], + "summary": "Updates the specified MinIO location", + "operationId": "v1UsersAssetsLocationMinioUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1UserAssetsLocationS3" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Specify the MinIO location uid", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/users/assets/locations/s3": { + "post": { + "tags": [ + "v1" + ], + "summary": "Create a S3 location", + "operationId": "v1UsersAssetsLocationS3Create", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1UserAssetsLocationS3" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + } + }, + "/v1/users/assets/locations/s3/{uid}": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the specified S3 location", + "operationId": "v1UsersAssetsLocationS3Get", + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1UserAssetsLocationS3" + } + } + } + }, + "put": { + "tags": [ + "v1" + ], + "summary": "Updates the specified S3 location", + "operationId": "v1UsersAssetsLocationS3Update", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1UserAssetsLocationS3" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "delete": { + "tags": [ + "v1" + ], + "summary": "Returns the specified S3 location", + "operationId": "v1UsersAssetsLocationS3Delete", + "responses": { + "204": { + "description": "The resource was deleted successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Specify the S3 location uid", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/users/assets/locations/{type}/{uid}/default": { + "patch": { + "tags": [ + "v1" + ], + "summary": "Update the default backup location", + "operationId": "v1UsersAssetsLocationDefaultUpdate", + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Specify the location uid", + "name": "uid", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Specify the location type [aws/azure/gcp/minio/s3]", + "name": "type", + "in": "path", + "required": true + } + ] + }, + "/v1/users/assets/locations/{uid}": { + "delete": { + "tags": [ + "v1" + ], + "summary": "Deletes the specified location", + "operationId": "v1UsersAssetsLocationDelete", + "responses": { + "204": { + "description": "The resource was deleted successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Specify the location uid", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/users/assets/sshkeys": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the SSH keys", + "operationId": "v1UsersAssetsSshGet", + "parameters": [ + { + "type": "string", + "description": "Filters can be combined with AND, OR operators with field path name. Eg: metadata.name=TestServiceANDspec.cloudType=aws\n\nServer will be restricted to certain fields based on the indexed data for each resource.", + "name": "filters", + "in": "query" + }, + { + "type": "string", + "description": "Specify the fields with sort order. 1 indicates ascending and -1 for descending. Eg: orderBy=metadata.name=1,metadata.uid=-1", + "name": "orderBy", + "in": "query" + } + ], + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1UserAssetsSsh" + } + } + } + }, + "post": { + "tags": [ + "v1" + ], + "summary": "Creates a SSH key", + "operationId": "v1UserAssetsSshCreate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1UserAssetSshEntity" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + } + }, + "/v1/users/assets/sshkeys/{uid}": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the specified user ssh key", + "operationId": "v1UsersAssetSshGetUid", + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1UserAssetSsh" + } + } + } + }, + "put": { + "tags": [ + "v1" + ], + "summary": "Updates the specified user ssh key", + "operationId": "v1UsersAssetSshUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1UserAssetSsh" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "delete": { + "tags": [ + "v1" + ], + "summary": "Returns the specified user ssh key", + "operationId": "v1UsersAssetSshDelete", + "responses": { + "204": { + "description": "The resource was deleted successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Specify the SSH key uid", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/users/assets/vsphere/dnsMapping": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the specified vSphere DNS mapping", + "operationId": "v1VsphereMappingGet", + "parameters": [ + { + "type": "string", + "description": "Specify the vSphere gateway uid", + "name": "gatewayUid", + "in": "query", + "required": true + }, + { + "type": "string", + "description": "Specify the vSphere datacenter name", + "name": "datacenter", + "in": "query", + "required": true + }, + { + "type": "string", + "description": "Specify the vSphere network name", + "name": "network", + "in": "query", + "required": true + } + ], + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1VsphereDnsMapping" + } + } + } + } + }, + "/v1/users/assets/vsphere/dnsMappings": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the specified vSphere DNS mappings", + "operationId": "v1VsphereDnsMappingsGet", + "parameters": [ + { + "type": "string", + "description": "Filters can be combined with AND, OR operators with field path name. Eg: metadata.name=TestServiceANDspec.cloudType=aws\n\nServer will be restricted to certain fields based on the indexed data for each resource.", + "name": "filters", + "in": "query" + }, + { + "type": "string", + "description": "Specify the fields with sort order. 1 indicates ascending and -1 for descending. Eg: orderBy=metadata.name=1,metadata.uid=-1", + "name": "orderBy", + "in": "query" + } + ], + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1VsphereDnsMappings" + } + } + } + }, + "post": { + "tags": [ + "v1" + ], + "summary": "Create a vSphere DNS mapping", + "operationId": "v1VsphereDnsMappingCreate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1VsphereDnsMapping" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + } + }, + "/v1/users/assets/vsphere/dnsMappings/{uid}": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the specified vSphere DNS mapping", + "operationId": "v1VsphereDnsMappingGet", + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1VsphereDnsMapping" + } + } + } + }, + "put": { + "tags": [ + "v1" + ], + "summary": "Updates the specified vSphere DNS mapping", + "operationId": "v1VsphereDnsMappingUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1VsphereDnsMapping" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "delete": { + "tags": [ + "v1" + ], + "summary": "Deletes the specified vSphere DNS mapping", + "operationId": "v1VsphereDnsMappingDelete", + "responses": { + "204": { + "description": "The resource was deleted successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Specify the vSphere DNS mapping uid", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/users/auth/tokens/revoke": { + "post": { + "tags": [ + "v1" + ], + "summary": "Revoke access of specific token(s)", + "operationId": "v1UsersAuthTokensRevoke", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1AuthTokenRevoke" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + } + }, + "/v1/users/config/scar": { + "get": { + "tags": [ + "v1" + ], + "summary": "Get the system Spectro repository. Restricted to edge services", + "operationId": "V1UsersConfigScarGet", + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1SystemScarSpec" + } + } + } + } + }, + "/v1/users/info": { + "get": { + "description": "Returns a basic information of User for the specified uid.", + "tags": [ + "v1" + ], + "summary": "Returns the base information of specified User", + "operationId": "v1UsersInfoGet", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1UserInfo" + } + } + } + } + }, + "/v1/users/kubectl/session/{sessionUid}": { + "get": { + "description": "gets users kubectl session", + "tags": [ + "v1" + ], + "summary": "gets users kubectl session", + "operationId": "V1UsersKubectlSessionUid", + "parameters": [ + { + "type": "string", + "name": "sessionUid", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1UserKubectlSession" + } + } + } + } + }, + "/v1/users/meta": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves a list of users metadata", + "operationId": "v1UsersMetadata", + "responses": { + "200": { + "description": "An array of users metadata items", + "schema": { + "$ref": "#/definitions/v1UsersMetadata" + } + } + } + } + }, + "/v1/users/password/change": { + "patch": { + "description": "User password change request via current password and emailId", + "tags": [ + "v1" + ], + "summary": "User password change request using the user emailId", + "operationId": "V1UsersPasswordChange", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "type": "object", + "required": [ + "newPassword", + "emailId", + "currentPassword" + ], + "properties": { + "currentPassword": { + "type": "string" + }, + "emailId": { + "type": "string" + }, + "newPassword": { + "type": "string" + } + } + } + } + ], + "responses": { + "204": { + "description": "Ok response without content", + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + } + }, + "/v1/users/password/reset": { + "patch": { + "description": "User password request will be sent to the supplied emailId", + "tags": [ + "v1" + ], + "summary": "User password reset request using the email id", + "operationId": "v1UsersEmailPasswordReset", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "type": "object", + "required": [ + "emailId" + ], + "properties": { + "emailId": { + "type": "string" + } + } + } + } + ], + "responses": { + "204": { + "description": "Ok response without content", + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + } + }, + "/v1/users/summary": { + "post": { + "tags": [ + "v1" + ], + "summary": "Retrieves a list of users summary with provided filter spec", + "operationId": "v1UsersSummaryGet", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1UsersSummarySpec" + } + } + ], + "responses": { + "200": { + "description": "An array of users summary items", + "schema": { + "$ref": "#/definitions/v1UsersSummaryList" + } + } + } + } + }, + "/v1/users/system/features": { + "get": { + "description": "Returns the users system feature", + "tags": [ + "v1" + ], + "summary": "Returns the users system feature", + "operationId": "v1UsersSystemFeature", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1SystemFeatures" + } + } + } + } + }, + "/v1/users/system/macros": { + "get": { + "tags": [ + "v1" + ], + "summary": "List the macros of the system", + "operationId": "v1UsersSystemMacrosList", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1Macros" + } + } + } + }, + "put": { + "tags": [ + "v1" + ], + "summary": "Update the macros of the system", + "operationId": "v1UsersSystemMacrosUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1Macros" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "post": { + "tags": [ + "v1" + ], + "summary": "Create or add new macros for the system user", + "operationId": "v1UsersSystemMacrosCreate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1Macros" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "delete": { + "tags": [ + "v1" + ], + "summary": "Delete the macros for the system user by macro name", + "operationId": "v1UsersSystemMacrosDeleteByMacroName", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1Macros" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "patch": { + "tags": [ + "v1" + ], + "summary": "Update the macros for the system user by macro name", + "operationId": "v1UsersSystemMacrosUpdateByMacroName", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1Macros" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + } + }, + "/v1/users/{uid}": { + "get": { + "description": "Returns a User for the specified uid.", + "tags": [ + "v1" + ], + "summary": "Returns the specified User", + "operationId": "v1UsersUidGet", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1User" + } + } + } + }, + "put": { + "description": "A user is created for the given user context", + "tags": [ + "v1" + ], + "summary": "Update User", + "operationId": "v1UsersUidUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1UserUpdateEntity" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "delete": { + "description": "Deletes the specified User for given uid", + "tags": [ + "v1" + ], + "summary": "Deletes the specified User", + "operationId": "v1UsersUidDelete", + "responses": { + "204": { + "description": "The resource was deleted successfully" + } + } + }, + "patch": { + "description": "User is patched for the specified information", + "tags": [ + "v1" + ], + "summary": "Patches the specified User", + "operationId": "v1UsersUidPatch", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1UserPatch" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/users/{uid}/password/change": { + "patch": { + "description": "User password change request via current password", + "tags": [ + "v1" + ], + "summary": "User password change request using the user uid", + "operationId": "v1UsersUidPasswordChange", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "type": "object", + "required": [ + "newPassword" + ], + "properties": { + "currentPassword": { + "type": "string" + }, + "newPassword": { + "type": "string" + } + } + } + } + ], + "responses": { + "204": { + "description": "Ok response without content", + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/users/{uid}/password/reset": { + "patch": { + "description": "User password reset request, will send the password reset option through the emailId", + "tags": [ + "v1" + ], + "summary": "User password reset request using the user uid", + "operationId": "v1UsersUidPasswordReset", + "responses": { + "204": { + "description": "Ok response without content", + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/users/{uid}/projects": { + "get": { + "description": "Returns a User with projects and roles", + "tags": [ + "v1" + ], + "summary": "Returns the specified User Projects and Roles information", + "operationId": "v1UsersProjectRoles", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1ProjectRolesEntity" + } + } + } + }, + "put": { + "description": "User is updated with projects and roles", + "tags": [ + "v1" + ], + "summary": "Updates the projects and roles for user", + "operationId": "v1UsersProjectRolesPut", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1ProjectRolesPatch" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/users/{uid}/resourceRoles": { + "get": { + "description": "Returns resource roles for user", + "tags": [ + "v1" + ], + "summary": "Returns the specified individual and resource roles for a user", + "operationId": "v1UsersUidResourceRoles", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1ResourceRoles" + } + } + } + }, + "post": { + "description": "Resource roles added to specific user", + "tags": [ + "v1" + ], + "summary": "Add resource roles for user", + "operationId": "v1UsersUidResourceRolesCreate", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1ResourceRolesUpdateEntity" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/users/{uid}/resourceRoles/{resourceRoleUid}": { + "delete": { + "tags": [ + "v1" + ], + "summary": "Deleted the resource roles from user", + "operationId": "v1UsersUidResourceRolesUidDelete", + "responses": { + "204": { + "description": "The resource was deleted successfully" + } + } + }, + "patch": { + "description": "Specific resource roles fo user is updated", + "tags": [ + "v1" + ], + "summary": "Updates the resource roles for user", + "operationId": "v1UsersResourceRolesUidUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1ResourceRolesUpdateEntity" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + }, + { + "type": "string", + "name": "resourceRoleUid", + "in": "path", + "required": true + } + ] + }, + "/v1/users/{uid}/roles": { + "get": { + "description": "Returns roles clubbed from team", + "tags": [ + "v1" + ], + "summary": "Returns the specified individual and team roles for a user", + "operationId": "v1UsersUidRoles", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1UserRolesEntity" + } + } + } + }, + "put": { + "description": "User is updated with roles", + "tags": [ + "v1" + ], + "summary": "Updates the roles for user", + "operationId": "v1UsersUidRolesUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1UserRoleUIDs" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/users/{uid}/status/loginMode": { + "patch": { + "tags": [ + "v1" + ], + "summary": "Users status login mode", + "operationId": "v1UsersStatusLoginMode", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1UserStatusLoginMode" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/workspaces": { + "post": { + "tags": [ + "v1" + ], + "summary": "Create workspace", + "operationId": "v1WorkspacesCreate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1WorkspaceEntity" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + } + }, + "/v1/workspaces/teams/{teamUid}/roles": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the specified team's workspaces and roles data", + "operationId": "v1TeamsWorkspaceGetRoles", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1WorkspaceScopeRoles" + } + } + } + }, + "put": { + "tags": [ + "v1" + ], + "summary": "Updates the workspace roles for the specified team", + "operationId": "v1TeamsWorkspaceRolesPut", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1WorkspacesRolesPatch" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "name": "teamUid", + "in": "path", + "required": true + } + ] + }, + "/v1/workspaces/users/{userUid}/roles": { + "get": { + "description": "Returns a User with workspaces and roles", + "tags": [ + "v1" + ], + "summary": "Returns the specified User workspaces and Roles information", + "operationId": "v1UsersWorkspaceGetRoles", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1WorkspaceScopeRoles" + } + } + } + }, + "put": { + "description": "User is updated with workspace roles", + "tags": [ + "v1" + ], + "summary": "Updates the workspace roles for user", + "operationId": "v1UsersWorkspaceRolesPut", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1WorkspacesRolesPatch" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "name": "userUid", + "in": "path", + "required": true + } + ] + }, + "/v1/workspaces/validate/name": { + "get": { + "tags": [ + "v1" + ], + "summary": "Validates the workspace name", + "operationId": "v1WorkspacesValidateName", + "parameters": [ + { + "type": "string", + "name": "name", + "in": "query", + "required": true + } + ], + "responses": { + "204": { + "description": "Ok response without content", + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + } + }, + "/v1/workspaces/{uid}": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the specified workspace", + "operationId": "v1WorkspacesUidGet", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1Workspace" + } + } + } + }, + "delete": { + "tags": [ + "v1" + ], + "summary": "Deletes the specified workspace", + "operationId": "v1WorkspacesUidDelete", + "responses": { + "204": { + "description": "The resource was deleted successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/workspaces/{uid}/backup": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the workspace backup result", + "operationId": "v1WorkspaceOpsBackupGet", + "parameters": [ + { + "type": "string", + "name": "backupRequestUid", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1WorkspaceBackup" + } + } + } + }, + "put": { + "tags": [ + "v1" + ], + "summary": "Update workspace backup settings", + "operationId": "v1WorkspaceOpsBackupUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1WorkspaceBackupConfigEntity" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "post": { + "tags": [ + "v1" + ], + "summary": "Create workspace backup settings", + "operationId": "v1WorkspaceOpsBackupCreate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1WorkspaceBackupConfigEntity" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + }, + "delete": { + "tags": [ + "v1" + ], + "summary": "Delete workspace backup", + "operationId": "v1WorkspaceOpsBackupDelete", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1WorkspaceBackupDeleteEntity" + } + } + ], + "responses": { + "204": { + "description": "The resource was deleted successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/workspaces/{uid}/backup/onDemand": { + "post": { + "tags": [ + "v1" + ], + "summary": "Create On demand Workspace Backup", + "operationId": "v1WorkspaceOpsBackupOnDemandCreate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1WorkspaceBackupConfigEntity" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/workspaces/{uid}/clusterNamespaces": { + "put": { + "tags": [ + "v1" + ], + "summary": "Updates the specified workspace namespaces", + "operationId": "v1WorkspacesUidClusterNamespacesUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1WorkspaceClusterNamespacesEntity" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/workspaces/{uid}/clusterRbacs": { + "post": { + "tags": [ + "v1" + ], + "summary": "Create cluster rbac in workspace", + "operationId": "v1WorkspacesClusterRbacCreate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1ClusterRbac" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/workspaces/{uid}/clusterRbacs/{clusterRbacUid}": { + "put": { + "tags": [ + "v1" + ], + "summary": "Updates the specified workspace cluster rbac", + "operationId": "v1WorkspacesUidClusterRbacUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1ClusterRbac" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "delete": { + "tags": [ + "v1" + ], + "summary": "Deletes the specified workspace cluster rbac", + "operationId": "v1WorkspacesUidClusterRbacDelete", + "responses": { + "204": { + "description": "The resource was deleted successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + }, + { + "type": "string", + "name": "clusterRbacUid", + "in": "path", + "required": true + } + ] + }, + "/v1/workspaces/{uid}/meta": { + "put": { + "tags": [ + "v1" + ], + "summary": "Updates the specified workspace meta", + "operationId": "v1WorkspacesUidMetaUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1ObjectMeta" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/workspaces/{uid}/restore": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the workspace restore result", + "operationId": "v1WorkspaceOpsRestoreGet", + "parameters": [ + { + "type": "string", + "name": "restoreRequestUid", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1WorkspaceRestore" + } + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/workspaces/{uid}/restore/onDemand": { + "post": { + "tags": [ + "v1" + ], + "summary": "Create On demand Workspace Restore", + "operationId": "v1WorkspaceOpsRestoreOnDemandCreate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1WorkspaceRestoreConfigEntity" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + } + }, + "definitions": { + "V1AwsAccountSts": { + "description": "AWS cloud account sts", + "type": "object", + "properties": { + "accountId": { + "description": "A 12-digit number, such as 123456789012, that uniquely identifies an AWS account", + "type": "string" + }, + "externalId": { + "description": "It can be passed to the AssumeRole API of the STS. It can be used in the condition element in a role's trust policy, allowing the role to be assumed only when a certain value is present in the external ID", + "type": "string" + }, + "partition": { + "$ref": "#/definitions/v1AwsPartition" + } + } + }, + "V1AwsPropertiesValidateSpec": { + "description": "AWS properties validate spec", + "type": "object", + "properties": { + "region": { + "type": "string" + }, + "sshKeyName": { + "type": "string" + } + } + }, + "V1EksPropertiesValidateSpec": { + "description": "Eks properties validate spec", + "type": "object", + "properties": { + "cloudAccountUid": { + "type": "string" + }, + "name": { + "type": "string" + }, + "region": { + "type": "string" + }, + "sshKeyName": { + "type": "string" + }, + "subnets": { + "type": "array", + "items": { + "type": "string" + } + }, + "vpcId": { + "type": "string" + } + } + }, + "V1GcpPropertiesValidateSpec": { + "description": "Gcp properties validate spec", + "type": "object", + "properties": { + "azs": { + "type": "array", + "items": { + "type": "string" + } + }, + "cloudAccountUid": { + "type": "string" + }, + "projectId": { + "type": "string" + }, + "region": { + "type": "string" + } + } + }, + "V1PasswordsBlockList": { + "description": "List of blocklisted passwords", + "type": "object", + "properties": { + "spec": { + "$ref": "#/definitions/v1PasswordsBlockListEntity" + } + } + }, + "v1.AzureAccountEntitySpec": { + "type": "object", + "properties": { + "clientCloud": { + "description": "Contains configuration for Azure cloud", + "type": "string", + "default": "public", + "enum": [ + "azure-china", + "azure-government", + "public" + ] + }, + "clientId": { + "type": "string" + }, + "clientSecret": { + "type": "string" + }, + "subscriptionId": { + "type": "string" + }, + "tenantId": { + "type": "string" + } + } + }, + "v1.CloudWatchConfig": { + "description": "Cloud watch config entity", + "type": "object", + "properties": { + "credentials": { + "$ref": "#/definitions/v1AwsCloudAccount" + }, + "group": { + "description": "Name of the group", + "type": "string" + }, + "region": { + "description": "Name of the region", + "type": "string" + }, + "stream": { + "description": "Name of the stream", + "type": "string" + } + } + }, + "v1.DataSinkCloudWatchConfig": { + "description": "Data sink cloud watch config", + "type": "object", + "properties": { + "payload": { + "$ref": "#/definitions/v1.DataSinkPayloads" + }, + "spec": { + "$ref": "#/definitions/v1.CloudWatchConfig" + } + } + }, + "v1.DataSinkPayload": { + "description": "Data sink payload entity", + "type": "object", + "properties": { + "refUid": { + "description": "RefUid of the data sink payload", + "type": "string" + }, + "timestamp": { + "$ref": "#/definitions/v1Time" + } + }, + "additionalProperties": { + "type": "object" + } + }, + "v1.DataSinkPayloads": { + "description": "List of data sink payload entities", + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1.DataSinkPayload" + } + }, + "v1.GcpAccountEntitySpec": { + "type": "object", + "properties": { + "jsonCredentials": { + "type": "string" + }, + "jsonCredentialsFileUid": { + "type": "string" + } + } + }, + "v1AADProfile": { + "description": "AADProfile - AAD integration is managed by AKS.", + "type": "object", + "required": [ + "managed", + "adminGroupObjectIDs" + ], + "properties": { + "adminGroupObjectIDs": { + "description": "AdminGroupObjectIDs - AAD group object IDs that will have admin role of the cluster.", + "type": "array", + "items": { + "type": "string" + } + }, + "managed": { + "description": "Managed - Whether to enable managed AAD.", + "type": "boolean", + "x-omitempty": false + } + } + }, + "v1APIEndpoint": { + "description": "APIEndpoint represents a reachable Kubernetes API endpoint.", + "type": "object", + "required": [ + "host", + "port" + ], + "properties": { + "host": { + "description": "The hostname on which the API server is serving.", + "type": "string" + }, + "port": { + "description": "The port on which the API server is serving.", + "type": "integer", + "format": "int32" + } + } + }, + "v1APIServerAccessProfile": { + "description": "APIServerAccessProfile - access profile for AKS API server.", + "type": "object", + "properties": { + "authorizedIPRanges": { + "description": "AuthorizedIPRanges - Authorized IP Ranges to kubernetes API server.", + "type": "array", + "items": { + "type": "string", + "default": "" + } + }, + "enablePrivateCluster": { + "description": "EnablePrivateCluster - Whether to create the cluster as a private cluster or not.", + "type": "boolean" + }, + "enablePrivateClusterPublicFQDN": { + "description": "EnablePrivateClusterPublicFQDN - Whether to create additional public FQDN for private cluster or not.", + "type": "boolean" + }, + "privateDNSZone": { + "description": "PrivateDNSZone - Private dns zone mode for private cluster.", + "type": "string" + } + } + }, + "v1AWSVolumeTypes": { + "description": "AWS Volume Types", + "type": "object", + "properties": { + "volumeTypes": { + "type": "array", + "items": { + "$ref": "#/definitions/v1AwsVolumeType" + } + } + } + }, + "v1AclMeta": { + "description": "Resource access control information (Read-only response data)", + "type": "object", + "properties": { + "ownerUid": { + "description": "User or service uid which created the resource", + "type": "string" + }, + "projectUid": { + "description": "Project's uid if the resource is under a project", + "type": "string" + }, + "tenantUid": { + "description": "Tenant's uid", + "type": "string" + } + } + }, + "v1Address": { + "description": "Tenant Address", + "type": "object", + "properties": { + "addressLine1": { + "type": "string" + }, + "addressLine2": { + "type": "string" + }, + "city": { + "type": "string" + }, + "country": { + "type": "string" + }, + "pincode": { + "type": "string" + }, + "state": { + "type": "string" + } + } + }, + "v1Alert": { + "type": "object", + "properties": { + "channels": { + "type": "array", + "items": { + "$ref": "#/definitions/v1Channel" + } + }, + "component": { + "type": "string" + } + } + }, + "v1AlertEntity": { + "type": "object", + "properties": { + "channels": { + "type": "array", + "items": { + "$ref": "#/definitions/v1Channel" + } + } + } + }, + "v1AlertNotificationStatus": { + "type": "object", + "properties": { + "isSucceeded": { + "type": "boolean", + "x-omitempty": false + }, + "message": { + "type": "string" + }, + "time": { + "$ref": "#/definitions/v1Time" + } + } + }, + "v1ApiEndpoint": { + "description": "APIEndpoint represents a reachable Kubernetes API endpoint.", + "type": "object", + "required": [ + "host", + "port" + ], + "properties": { + "host": { + "description": "The hostname on which the API server is serving.", + "type": "string" + }, + "port": { + "description": "The port on which the API server is serving.", + "type": "integer", + "format": "int32" + } + } + }, + "v1ApiKey": { + "description": "API key information", + "type": "object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/v1ApiKeySpec" + }, + "status": { + "$ref": "#/definitions/v1ApiKeyStatus" + } + } + }, + "v1ApiKeyActiveState": { + "properties": { + "isActive": { + "description": "API key active state", + "type": "boolean" + } + } + }, + "v1ApiKeyCreateResponse": { + "description": "Response of create API key", + "type": "object", + "properties": { + "apiKey": { + "description": "Api key is used for authentication", + "type": "string" + }, + "uid": { + "description": "User uid", + "type": "string" + } + } + }, + "v1ApiKeyEntity": { + "description": "API key request payload", + "type": "object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/v1ApiKeySpecEntity" + } + } + }, + "v1ApiKeySpec": { + "description": "API key specification", + "type": "object", + "properties": { + "expiry": { + "description": "API key expiry date", + "$ref": "#/definitions/v1Time" + }, + "key": { + "description": "Deprecated: API key field will be no longer available", + "type": "string" + }, + "user": { + "description": "User to whom the API key is created", + "$ref": "#/definitions/v1ApiKeyUser" + } + } + }, + "v1ApiKeySpecEntity": { + "description": "API key specification", + "type": "object", + "properties": { + "expiry": { + "description": "API key expiry date", + "$ref": "#/definitions/v1Time" + }, + "userUid": { + "description": "User to whom the API key has to be created", + "type": "string" + } + } + }, + "v1ApiKeySpecUpdate": { + "description": "API key update request specification", + "properties": { + "expiry": { + "description": "API key expiry date", + "$ref": "#/definitions/v1Time" + } + } + }, + "v1ApiKeyStatus": { + "description": "API key status", + "type": "object", + "properties": { + "isActive": { + "description": "API key active state", + "type": "boolean" + } + } + }, + "v1ApiKeyUpdate": { + "description": "API key update request payload", + "type": "object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/v1ApiKeySpecUpdate" + } + } + }, + "v1ApiKeyUser": { + "description": "API key user information", + "type": "object", + "properties": { + "firstName": { + "description": "First name of user", + "type": "string" + }, + "lastName": { + "description": "Last name of user", + "type": "string" + }, + "uid": { + "description": "User uid", + "type": "string" + } + } + }, + "v1ApiKeys": { + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": { + "description": "List of API keys", + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1ApiKey" + } + } + } + }, + "v1AppDeployment": { + "description": "Application deployment response", + "type": "object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/v1AppDeploymentSpec" + }, + "status": { + "$ref": "#/definitions/v1AppDeploymentStatus" + } + } + }, + "v1AppDeploymentClusterGroupConfigEntity": { + "description": "Application deployment cluster group config", + "type": "object", + "properties": { + "targetSpec": { + "$ref": "#/definitions/v1AppDeploymentClusterGroupTargetSpec" + } + } + }, + "v1AppDeploymentClusterGroupEntity": { + "description": "Application deployment cluster group request payload", + "type": "object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectMetaInputEntity" + }, + "spec": { + "$ref": "#/definitions/v1AppDeploymentClusterGroupSpec" + } + } + }, + "v1AppDeploymentClusterGroupSpec": { + "description": "Application deployment cluster group spec", + "type": "object", + "properties": { + "config": { + "$ref": "#/definitions/v1AppDeploymentClusterGroupConfigEntity" + }, + "profile": { + "$ref": "#/definitions/v1AppDeploymentProfileEntity" + } + } + }, + "v1AppDeploymentClusterGroupTargetSpec": { + "description": "Application deployment cluster group target spec", + "type": "object", + "required": [ + "clusterName", + "clusterGroupUid" + ], + "properties": { + "clusterGroupUid": { + "description": "Application deployment cluster group uid", + "type": "string" + }, + "clusterLimits": { + "$ref": "#/definitions/v1AppDeploymentTargetClusterLimits" + }, + "clusterName": { + "description": "Application deployment virtual cluster name", + "type": "string" + } + } + }, + "v1AppDeploymentClusterHealth": { + "description": "Application deployment cluster health status", + "properties": { + "state": { + "type": "string" + } + } + }, + "v1AppDeploymentClusterRef": { + "description": "Application deployment cluster reference", + "type": "object", + "properties": { + "deploymentClusterType": { + "description": "Application deployment source cluster type[ \"virtualCluster\", \"hostCluster\" ]", + "type": "string", + "enum": [ + "virtual", + "host" + ] + }, + "name": { + "description": "Application deployment cluster name", + "type": "string" + }, + "uid": { + "description": "Application deployment cluster uid", + "type": "string" + } + } + }, + "v1AppDeploymentClusterRefSummary": { + "description": "Application deployment cluster reference", + "properties": { + "deploymentClusterType": { + "description": "Application deployment source cluster type[ \"virtualCluster\", \"hostCluster\" ]", + "type": "string", + "enum": [ + "virtual", + "host" + ] + }, + "name": { + "description": "Application deployment source cluster name", + "type": "string" + }, + "uid": { + "description": "Application deployment source cluster uid", + "type": "string" + } + } + }, + "v1AppDeploymentClusterStatus": { + "description": "Application deployment cluster status", + "properties": { + "health": { + "$ref": "#/definitions/v1AppDeploymentClusterHealth" + }, + "state": { + "type": "string" + } + } + }, + "v1AppDeploymentConfig": { + "description": "Application deployment config response", + "type": "object", + "properties": { + "target": { + "$ref": "#/definitions/v1AppDeploymentTargetConfig" + } + } + }, + "v1AppDeploymentConfigSummary": { + "description": "Application deployment config summary", + "properties": { + "target": { + "$ref": "#/definitions/v1AppDeploymentTargetConfigSummary" + } + } + }, + "v1AppDeploymentFilterSpec": { + "description": "Application deployment filter spec", + "properties": { + "appDeploymentName": { + "$ref": "#/definitions/v1FilterString" + }, + "clusterUids": { + "$ref": "#/definitions/v1FilterArray" + }, + "tags": { + "$ref": "#/definitions/v1FilterArray" + } + } + }, + "v1AppDeploymentNotifications": { + "description": "Application deployment notifications", + "properties": { + "isAvailable": { + "type": "boolean", + "x-omitempty": false + } + } + }, + "v1AppDeploymentProfile": { + "description": "Application deployment profile", + "type": "object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1AppDeploymentProfileMeta" + }, + "template": { + "$ref": "#/definitions/v1AppProfileTemplate" + } + } + }, + "v1AppDeploymentProfileEntity": { + "description": "Application deployment profile request payload", + "type": "object", + "required": [ + "appProfileUid" + ], + "properties": { + "appProfileUid": { + "description": "Application deployment profile uid", + "type": "string" + } + } + }, + "v1AppDeploymentProfileMeta": { + "description": "Application deployment profile metadata", + "type": "object", + "properties": { + "name": { + "description": "Application deployment profile name", + "type": "string" + }, + "uid": { + "description": "Application deployment profile uid", + "type": "string" + }, + "version": { + "description": "Application deployment profile version", + "type": "string" + } + } + }, + "v1AppDeploymentProfileMetadataSummary": { + "description": "Application deployment profile metadata summary", + "properties": { + "name": { + "type": "string" + }, + "uid": { + "type": "string" + }, + "version": { + "type": "string" + } + } + }, + "v1AppDeploymentProfileSpec": { + "description": "Application deployment profile spec", + "type": "object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1AppDeploymentProfileMeta" + }, + "template": { + "$ref": "#/definitions/v1AppProfileTemplateSpec" + } + } + }, + "v1AppDeploymentProfileSummary": { + "description": "Application deployment profile summary", + "properties": { + "metadata": { + "$ref": "#/definitions/v1AppDeploymentProfileMetadataSummary" + }, + "template": { + "$ref": "#/definitions/v1AppProfileTemplateSummary" + } + } + }, + "v1AppDeploymentProfileVersion": { + "description": "Application deployment profile version", + "type": "object", + "properties": { + "uid": { + "description": "Application deployment profile uid", + "type": "string" + }, + "version": { + "description": "Application deployment profile version", + "type": "string" + } + } + }, + "v1AppDeploymentProfileVersions": { + "description": "Application deployment profile versions", + "type": "object", + "properties": { + "availableVersions": { + "description": "Application deployment profile available versions", + "type": "array", + "items": { + "$ref": "#/definitions/v1AppDeploymentProfileVersion" + } + }, + "latestVersions": { + "description": "Application deployment profile latest versions", + "type": "array", + "items": { + "$ref": "#/definitions/v1AppDeploymentProfileVersion" + } + }, + "metadata": { + "$ref": "#/definitions/v1AppDeploymentProfileMeta" + } + } + }, + "v1AppDeploymentSortFields": { + "type": "string", + "enum": [ + "appDeploymentName", + "creationTimestamp", + "lastModifiedTimestamp" + ], + "x-nullable": true + }, + "v1AppDeploymentSortSpec": { + "properties": { + "field": { + "$ref": "#/definitions/v1AppDeploymentSortFields" + }, + "order": { + "$ref": "#/definitions/v1SortOrder" + } + } + }, + "v1AppDeploymentSpec": { + "description": "Application deployment spec", + "type": "object", + "properties": { + "config": { + "$ref": "#/definitions/v1AppDeploymentConfig" + }, + "profile": { + "$ref": "#/definitions/v1AppDeploymentProfile" + } + } + }, + "v1AppDeploymentStatus": { + "description": "Application deployment status", + "type": "object", + "properties": { + "appTiers": { + "description": "Application deployment tiers", + "type": "array", + "items": { + "$ref": "#/definitions/v1ClusterPackStatus" + } + }, + "lifecycleStatus": { + "$ref": "#/definitions/v1LifecycleStatus" + }, + "state": { + "description": "Application deployment state [ \"Pending\", \"Deploying\", \"Deployed\", \"Updating\" ]", + "type": "string" + } + } + }, + "v1AppDeploymentStatusSummary": { + "description": "Application deployment status summary", + "type": "object", + "properties": { + "cluster": { + "$ref": "#/definitions/v1AppDeploymentClusterStatus" + }, + "notifications": { + "$ref": "#/definitions/v1AppDeploymentNotifications" + }, + "state": { + "type": "string" + } + } + }, + "v1AppDeploymentSummary": { + "description": "Application deployment summary", + "type": "object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "description": "Application deployment spec summary", + "type": "object", + "properties": { + "config": { + "$ref": "#/definitions/v1AppDeploymentConfigSummary" + }, + "profile": { + "$ref": "#/definitions/v1AppDeploymentProfileSummary" + } + } + }, + "status": { + "$ref": "#/definitions/v1AppDeploymentStatusSummary" + } + } + }, + "v1AppDeploymentTargetClusterLimits": { + "description": "Application deployment target cluster limits", + "properties": { + "cpu": { + "description": "CPU cores", + "type": "integer", + "format": "int32" + }, + "memoryMiB": { + "description": "Memory in MiB", + "type": "integer", + "format": "int32" + }, + "storageGiB": { + "description": "Storage in GiB", + "type": "integer", + "format": "int32" + } + } + }, + "v1AppDeploymentTargetConfig": { + "description": "Application deployment target config response", + "type": "object", + "properties": { + "clusterRef": { + "$ref": "#/definitions/v1AppDeploymentClusterRef" + }, + "envRef": { + "$ref": "#/definitions/v1AppDeploymentTargetEnvironmentRef" + } + } + }, + "v1AppDeploymentTargetConfigSummary": { + "description": "Application deployment target config summary", + "properties": { + "clusterRef": { + "$ref": "#/definitions/v1AppDeploymentClusterRefSummary" + } + } + }, + "v1AppDeploymentTargetEnvironmentRef": { + "description": "Application deployment target environment reference", + "type": "object", + "properties": { + "name": { + "description": "Application deployment target resource name", + "type": "string" + }, + "type": { + "description": "Application deployment target resource type [ \"nestedCluster\", \"clusterGroup\" ]", + "type": "string" + }, + "uid": { + "description": "Application deployment target resource uid", + "type": "string" + } + } + }, + "v1AppDeploymentVirtualClusterConfigEntity": { + "description": "Application deployment virtual cluster config", + "type": "object", + "properties": { + "targetSpec": { + "$ref": "#/definitions/v1AppDeploymentVirtualClusterTargetSpec" + } + } + }, + "v1AppDeploymentVirtualClusterEntity": { + "description": "Application deployment virtual cluster request payload", + "type": "object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectMetaInputEntity" + }, + "spec": { + "$ref": "#/definitions/v1AppDeploymentVirtualClusterSpec" + } + } + }, + "v1AppDeploymentVirtualClusterSpec": { + "description": "Application deployment virtual cluster spec", + "type": "object", + "properties": { + "config": { + "$ref": "#/definitions/v1AppDeploymentVirtualClusterConfigEntity" + }, + "profile": { + "$ref": "#/definitions/v1AppDeploymentProfileEntity" + } + } + }, + "v1AppDeploymentVirtualClusterTargetSpec": { + "description": "Application deployment virtual cluster target spec", + "type": "object", + "required": [ + "clusterUid" + ], + "properties": { + "clusterUid": { + "description": "Application deployment virtual cluster uid", + "type": "string" + } + } + }, + "v1AppDeploymentsFilterSpec": { + "description": "Application deployment filter summary spec", + "properties": { + "filter": { + "$ref": "#/definitions/v1AppDeploymentFilterSpec" + }, + "sort": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1AppDeploymentSortSpec" + } + } + } + }, + "v1AppDeploymentsSummary": { + "type": "object", + "properties": { + "appDeployments": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1AppDeploymentSummary" + } + }, + "listmeta": { + "$ref": "#/definitions/v1ListMetaData" + } + } + }, + "v1AppProfile": { + "description": "Application profile response", + "type": "object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "type": "object", + "properties": { + "parentUid": { + "description": "Application profile parent profile uid", + "type": "string" + }, + "template": { + "$ref": "#/definitions/v1AppProfileTemplate" + }, + "version": { + "description": "Application profile version", + "type": "string" + }, + "versions": { + "description": "Application profile versions list", + "type": "array", + "items": { + "$ref": "#/definitions/v1AppProfileVersion" + } + } + } + }, + "status": { + "description": "Application profile status", + "type": "object", + "properties": { + "inUseApps": { + "description": "Application profile apps array", + "type": "array", + "items": { + "$ref": "#/definitions/v1ObjectResReference" + } + } + } + } + } + }, + "v1AppProfileCloneEntity": { + "description": "Application profile clone request payload", + "type": "object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1AppProfileCloneMetaInputEntity" + } + } + }, + "v1AppProfileCloneMetaInputEntity": { + "description": "Application profile clone metadata", + "type": "object", + "required": [ + "name" + ], + "properties": { + "name": { + "description": "Application profile name", + "type": "string" + }, + "target": { + "$ref": "#/definitions/v1AppProfileCloneTarget" + }, + "version": { + "description": "Application profile version", + "type": "string" + } + } + }, + "v1AppProfileCloneTarget": { + "description": "Application profile clone target", + "type": "object", + "properties": { + "projectUid": { + "description": "Application profile clone target project uid", + "type": "string" + } + } + }, + "v1AppProfileEntity": { + "description": "Application profile request payload", + "type": "object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectMetaInputEntity" + }, + "spec": { + "description": "Application profile spec", + "type": "object", + "properties": { + "template": { + "$ref": "#/definitions/v1AppProfileTemplateEntity" + }, + "version": { + "description": "Application profile version", + "type": "string" + } + } + } + } + }, + "v1AppProfileFilterSpec": { + "description": "Application profile filter spec", + "properties": { + "profileName": { + "$ref": "#/definitions/v1FilterString" + }, + "tags": { + "$ref": "#/definitions/v1FilterArray" + }, + "version": { + "$ref": "#/definitions/v1FilterVersionString" + } + } + }, + "v1AppProfileMetaEntity": { + "description": "Application profile metadata request payload", + "type": "object", + "required": [ + "metadata" + ], + "properties": { + "metadata": { + "$ref": "#/definitions/v1AppProfileMetaUpdateEntity" + }, + "version": { + "description": "Application profile version", + "type": "string" + } + } + }, + "v1AppProfileMetaUpdateEntity": { + "description": "Application profile metadata update request payload", + "type": "object", + "properties": { + "annotations": { + "description": "Application profile annotations", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "labels": { + "description": "Application profile labels", + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + }, + "v1AppProfileMetadata": { + "description": "Application profile metadata summary", + "type": "object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectEntity" + }, + "spec": { + "properties": { + "version": { + "type": "string" + } + } + } + } + }, + "v1AppProfileSortFields": { + "type": "string", + "enum": [ + "profileName", + "creationTimestamp", + "lastModifiedTimestamp" + ], + "x-nullable": true + }, + "v1AppProfileSortSpec": { + "properties": { + "field": { + "$ref": "#/definitions/v1AppProfileSortFields" + }, + "order": { + "$ref": "#/definitions/v1SortOrder" + } + } + }, + "v1AppProfileSummary": { + "description": "Application profile summary", + "type": "object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "description": "Application profile spec summary", + "type": "object", + "properties": { + "parentUid": { + "type": "string" + }, + "template": { + "$ref": "#/definitions/v1AppProfileTemplateSummary" + }, + "version": { + "type": "string" + }, + "versions": { + "description": "Application profile's list of all the versions", + "type": "array", + "items": { + "$ref": "#/definitions/v1AppProfileVersion" + } + } + } + } + } + }, + "v1AppProfileTemplate": { + "description": "Application profile template information", + "type": "object", + "properties": { + "appTiers": { + "description": "Application profile tiers", + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1AppTierRef" + } + }, + "registryRefs": { + "description": "Application profile registries reference", + "type": "array", + "items": { + "$ref": "#/definitions/v1ObjectReference" + } + } + } + }, + "v1AppProfileTemplateEntity": { + "description": "Application profile template spec", + "type": "object", + "properties": { + "appTiers": { + "description": "Application profile tiers", + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1AppTierEntity" + } + } + } + }, + "v1AppProfileTemplateSpec": { + "description": "Application profile template specs", + "type": "object", + "properties": { + "appTiers": { + "description": "Application profile tiers", + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1AppTier" + } + }, + "registryRefs": { + "description": "Application profile registries reference", + "type": "array", + "items": { + "$ref": "#/definitions/v1ObjectReference" + } + } + } + }, + "v1AppProfileTemplateSummary": { + "description": "Application profile template summary", + "type": "object", + "properties": { + "appTiers": { + "type": "array", + "items": { + "$ref": "#/definitions/v1AppTierSummary" + } + } + } + }, + "v1AppProfileTiers": { + "description": "Application profile tiers information", + "type": "object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/v1AppProfileTiersSpec" + } + } + }, + "v1AppProfileTiersSpec": { + "description": "Application profile tiers information", + "type": "object", + "properties": { + "appTiers": { + "description": "Application profile tiers", + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1AppTier" + } + } + } + }, + "v1AppProfileVersion": { + "description": "Application profile version", + "type": "object", + "properties": { + "uid": { + "type": "string" + }, + "version": { + "type": "string" + } + } + }, + "v1AppProfilesFilterSpec": { + "description": "Application profile filter summary spec", + "properties": { + "filter": { + "$ref": "#/definitions/v1AppProfileFilterSpec" + }, + "sort": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1AppProfileSortSpec" + } + } + } + }, + "v1AppProfilesMetadata": { + "type": "object", + "properties": { + "appProfiles": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1AppProfileMetadata" + } + } + } + }, + "v1AppProfilesSummary": { + "type": "object", + "properties": { + "appProfiles": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1AppProfileSummary" + } + }, + "listmeta": { + "$ref": "#/definitions/v1ListMetaData" + } + } + }, + "v1AppTier": { + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/v1AppTierSpec" + } + } + }, + "v1AppTierEntity": { + "description": "Application tier request payload", + "type": "object", + "required": [ + "name" + ], + "properties": { + "containerRegistryUid": { + "description": "Application tier container registry uid", + "type": "string" + }, + "installOrder": { + "description": "Application tier installation order", + "type": "integer", + "format": "int32" + }, + "manifests": { + "description": "Application tier manifests", + "type": "array", + "items": { + "$ref": "#/definitions/v1ManifestInputEntity" + } + }, + "name": { + "description": "Application tier name", + "type": "string" + }, + "properties": { + "description": "Application tier properties", + "type": "array", + "items": { + "$ref": "#/definitions/v1AppTierPropertyEntity" + } + }, + "registryUid": { + "description": "Application tier registry uid", + "type": "string" + }, + "sourceAppTierUid": { + "description": "Application tier source pack uid", + "type": "string" + }, + "type": { + "$ref": "#/definitions/v1AppTierType" + }, + "values": { + "description": "Application tier configuration values in yaml format", + "type": "string" + }, + "version": { + "description": "Application tier version", + "type": "string" + } + } + }, + "v1AppTierManifests": { + "description": "Application tier manifests data", + "properties": { + "manifests": { + "description": "Application tier manifests array", + "type": "array", + "items": { + "$ref": "#/definitions/v1Manifest" + } + } + } + }, + "v1AppTierPatchEntity": { + "description": "Application tier patch request payload", + "properties": { + "appTier": { + "$ref": "#/definitions/v1AppTierEntity" + }, + "replaceWithAppTier": { + "description": "Application tier UID to be replaced with new tier", + "type": "string" + } + } + }, + "v1AppTierProperty": { + "description": "Application tier property object", + "properties": { + "format": { + "description": "Application tier property format", + "type": "string" + }, + "name": { + "description": "Application tier property name", + "type": "string" + }, + "type": { + "description": "Application tier property data type", + "type": "string" + }, + "value": { + "description": "Application tier property value", + "type": "string" + } + } + }, + "v1AppTierPropertyEntity": { + "description": "Application tier property object", + "properties": { + "name": { + "description": "Application tier property name", + "type": "string" + }, + "value": { + "description": "Application tier property value", + "type": "string" + } + } + }, + "v1AppTierRef": { + "description": "Application tier reference", + "type": "object", + "properties": { + "name": { + "description": "Application tier name", + "type": "string" + }, + "type": { + "$ref": "#/definitions/v1AppTierType" + }, + "uid": { + "description": "Application tier uid to uniquely identify the tier", + "type": "string" + }, + "version": { + "description": "Application tier version", + "type": "string" + } + } + }, + "v1AppTierResolvedValues": { + "description": "Application tier resolved macro values", + "properties": { + "resolved": { + "description": "Application tier resolved macro values map", + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + }, + "v1AppTierSourceSummary": { + "description": "Application profile's tier source information", + "properties": { + "addonSubType": { + "type": "string" + }, + "addonType": { + "type": "string" + }, + "logoUrl": { + "type": "string" + }, + "name": { + "type": "string" + }, + "type": { + "type": "string" + }, + "uid": { + "type": "string" + } + } + }, + "v1AppTierSpec": { + "description": "Application tier specs", + "type": "object", + "properties": { + "containerRegistryUid": { + "description": "Application tier container registry uid", + "type": "string" + }, + "installOrder": { + "description": "Application tier installation order", + "type": "integer", + "format": "int32" + }, + "manifests": { + "description": "Application tier attached manifest content in yaml format", + "type": "array", + "items": { + "$ref": "#/definitions/v1ObjectReference" + } + }, + "properties": { + "description": "Application tier properties", + "type": "array", + "items": { + "$ref": "#/definitions/v1AppTierProperty" + } + }, + "registryUid": { + "description": "Registry uid", + "type": "string" + }, + "sourceAppTierUid": { + "description": "Application tier source pack uid", + "type": "string" + }, + "type": { + "description": "Application tier type", + "$ref": "#/definitions/v1AppTierType" + }, + "values": { + "description": "Application tier configuration values in yaml format", + "type": "string" + }, + "version": { + "description": "Application tier version", + "type": "string" + } + } + }, + "v1AppTierSummary": { + "description": "Application profile's tier summary", + "properties": { + "name": { + "type": "string" + }, + "source": { + "$ref": "#/definitions/v1AppTierSourceSummary" + }, + "type": { + "type": "string" + }, + "uid": { + "type": "string" + }, + "version": { + "type": "string" + } + } + }, + "v1AppTierType": { + "type": "string", + "default": "manifest", + "enum": [ + "manifest", + "helm", + "operator-instance", + "container" + ] + }, + "v1AppTierUpdateEntity": { + "description": "Application tier update request payload", + "type": "object", + "properties": { + "containerRegistryUid": { + "description": "Application tier container registry uid", + "type": "string" + }, + "installOrder": { + "description": "Application tier installation order", + "type": "integer", + "format": "int32" + }, + "manifests": { + "description": "Application tier manifests", + "type": "array", + "items": { + "$ref": "#/definitions/v1ManifestRefUpdateEntity" + } + }, + "name": { + "description": "Application tier name", + "type": "string" + }, + "properties": { + "description": "Application tier properties", + "type": "array", + "items": { + "$ref": "#/definitions/v1AppTierPropertyEntity" + } + }, + "values": { + "description": "Application tier configuration values in yaml format", + "type": "string" + }, + "version": { + "description": "Application tier version", + "type": "string" + } + } + }, + "v1ArchType": { + "type": "string", + "default": "amd64", + "enum": [ + "amd64", + "arm64" + ] + }, + "v1AsyncOperationIdEntity": { + "description": "Async operation id", + "type": "object", + "properties": { + "operationId": { + "description": "OperationId for a particular sync operation id", + "type": "string" + } + } + }, + "v1Audit": { + "description": "Audit response payload", + "type": "object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/v1AuditSpec" + } + } + }, + "v1AuditActor": { + "description": "Audit actor object", + "properties": { + "actorType": { + "type": "string", + "enum": [ + "user", + "system", + "service" + ] + }, + "project": { + "$ref": "#/definitions/v1ProjectMeta" + }, + "serviceName": { + "type": "string" + }, + "user": { + "$ref": "#/definitions/v1UserMeta" + } + } + }, + "v1AuditMsgUpdate": { + "description": "Audit user message update request payload", + "type": "object", + "properties": { + "userMsg": { + "description": "User message", + "type": "string", + "maxLength": 255, + "minLength": 3 + } + } + }, + "v1AuditResourceReference": { + "description": "Audit resource reference object", + "type": "object", + "required": [ + "uid" + ], + "properties": { + "kind": { + "description": "Audit resource type", + "type": "string" + }, + "label": { + "description": "Audit resource label", + "type": "string" + }, + "name": { + "description": "Audit resource name", + "type": "string" + }, + "uid": { + "description": "Audit resource uid", + "type": "string" + } + } + }, + "v1AuditSpec": { + "description": "Audit specifications", + "properties": { + "actionMsg": { + "description": "Audit action message", + "type": "string" + }, + "actionType": { + "type": "string", + "enum": [ + "create", + "update", + "delete", + "publish", + "deploy" + ] + }, + "actor": { + "$ref": "#/definitions/v1AuditActor" + }, + "contentMsg": { + "description": "Audit content message", + "type": "string" + }, + "resource": { + "$ref": "#/definitions/v1AuditResourceReference" + }, + "userMsg": { + "description": "Audit user message", + "type": "string" + } + } + }, + "v1AuditSysMsg": { + "description": "Audit system message", + "type": "object", + "properties": { + "actionMsg": { + "description": "Audit resource action message", + "type": "string" + }, + "contentMsg": { + "description": "Audit resource content message", + "type": "string" + } + } + }, + "v1Audits": { + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": { + "description": "List of audit message", + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1Audit" + } + }, + "listmeta": { + "$ref": "#/definitions/v1ListMetaData" + } + } + }, + "v1AuthLogin": { + "description": "Describes the credential details required for authentication", + "type": "object", + "properties": { + "emailId": { + "description": "Describes the email id required for the user to authenticate", + "type": "string" + }, + "org": { + "description": "Describes the user's organization name to login", + "type": "string" + }, + "password": { + "description": "Describes the password required for the user to authenticate", + "type": "string", + "format": "password" + } + } + }, + "v1AuthTokenRevoke": { + "properties": { + "tokens": { + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + } + } + } + }, + "v1AuthTokenSettings": { + "description": "System auth token settings", + "properties": { + "expiryTimeMinutes": { + "description": "Auth token expiry time in minutes", + "type": "integer", + "format": "int32", + "maximum": 1440, + "minimum": 15, + "x-omitempty": false + } + } + }, + "v1AwsAMI": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "os": { + "type": "string" + }, + "region": { + "type": "string" + }, + "state": { + "type": "string" + } + } + }, + "v1AwsAccount": { + "description": "Aws cloud account information", + "type": "object", + "properties": { + "apiVersion": { + "type": "string" + }, + "kind": { + "type": "string" + }, + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/v1AwsCloudAccount" + }, + "status": { + "$ref": "#/definitions/v1CloudAccountStatus" + } + } + }, + "v1AwsAccounts": { + "description": "List of AWS accounts", + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1AwsAccount" + } + }, + "listmeta": { + "$ref": "#/definitions/v1ListMetaData" + } + } + }, + "v1AwsAmiReference": { + "description": "AMI is the reference to the AMI from which to create the machine instance", + "type": "object", + "properties": { + "eksOptimizedLookupType": { + "description": "EKSOptimizedLookupType If specified, will look up an EKS Optimized image in SSM Parameter store", + "type": "string", + "enum": [ + "AmazonLinux", + "AmazonLinuxGPU" + ] + }, + "id": { + "description": "ID of resource", + "type": "string" + } + } + }, + "v1AwsAvailabilityZone": { + "description": "Distinct locations within an AWS Region that are engineered to be isolated from failures in other Zones", + "type": "object", + "properties": { + "name": { + "description": "AWS availability zone name", + "type": "string" + }, + "state": { + "description": "AWS availability zone state", + "type": "string" + }, + "zoneId": { + "description": "AWS availability zone id", + "type": "string" + } + } + }, + "v1AwsAvailabilityZones": { + "type": "object", + "required": [ + "zones" + ], + "properties": { + "zones": { + "description": "List of AWS Zones", + "type": "array", + "items": { + "$ref": "#/definitions/v1AwsAvailabilityZone" + } + } + } + }, + "v1AwsCloudAccount": { + "description": "AWS cloud account which includes access key and secret key in case of 'secret' credentials type. It includes policyARNS, ARN and externalId in case of sts. Partition is a group of AWS Region and Service objects", + "type": "object", + "properties": { + "accessKey": { + "description": "AWS account access key", + "type": "string" + }, + "credentialType": { + "$ref": "#/definitions/v1AwsCloudAccountCredentialType" + }, + "partition": { + "description": "AWS accounts are scoped to a single partition. Allowed values [aws, aws-us-gov], Default values", + "type": "string", + "default": "aws", + "enum": [ + "aws", + "aws-us-gov" + ] + }, + "policyARNs": { + "description": "List of policy ARNs required in case of credentialType sts.", + "type": "array", + "items": { + "type": "string" + } + }, + "secretKey": { + "description": "AWS account secret key", + "type": "string" + }, + "sts": { + "description": "AWS STS credentials in case of credentialType sts, will be empty in case of credential type secret", + "$ref": "#/definitions/v1AwsStsCredentials" + } + } + }, + "v1AwsCloudAccountCredentialType": { + "description": "Allowed Values [secret, sts]. STS type will be used for role assumption for sts type, accessKey/secretKey contains the source account, Arn is the target account.", + "type": "string", + "default": "secret", + "enum": [ + "secret", + "sts" + ] + }, + "v1AwsCloudClusterConfigEntity": { + "description": "AWS cloud cluster config entity", + "type": "object", + "properties": { + "clusterConfig": { + "$ref": "#/definitions/v1AwsClusterConfig" + } + } + }, + "v1AwsCloudConfig": { + "description": "AwsCloudConfig is the Schema for the awscloudconfigs API", + "type": "object", + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + "type": "string" + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/v1AwsCloudConfigSpec" + }, + "status": { + "$ref": "#/definitions/v1AwsCloudConfigStatus" + } + } + }, + "v1AwsCloudConfigSpec": { + "description": "AwsCloudConfigSpec defines the cloud configuration input by user This will translate to clusterspec/machinespec for cluster-api", + "type": "object", + "properties": { + "cloudAccountRef": { + "description": "cloudAccountRef should point to the secret which contains AwsCloudAccount", + "$ref": "#/definitions/v1ObjectReference" + }, + "clusterConfig": { + "$ref": "#/definitions/v1AwsClusterConfig" + }, + "machinePoolConfig": { + "type": "array", + "items": { + "$ref": "#/definitions/v1AwsMachinePoolConfig" + } + } + } + }, + "v1AwsCloudConfigStatus": { + "description": "AwsCloudConfigStatus defines the observed state of AwsCloudConfig The cloudimage info built by Mold is stored here image should be mapped to a specific machinepool", + "type": "object", + "properties": { + "ansibleRoleDigest": { + "description": "For mold controller to identify if is there any changes in Pack", + "type": "string" + }, + "conditions": { + "type": "array", + "items": { + "$ref": "#/definitions/v1ClusterCondition" + } + }, + "images": { + "description": "Images array items should be 1-to-1 mapping to Spec.MachinePoolConfig", + "type": "array", + "items": { + "$ref": "#/definitions/v1AwsAMI" + } + }, + "isAddonLayer": { + "description": "addon layers present in spc", + "type": "boolean" + }, + "roleDigest": { + "description": "this map will be for ansible roles present in eack pack", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "sourceImageId": { + "description": "sourceImageId, it can be from packref's annotations or from pack.json", + "type": "string" + }, + "useCapiImage": { + "description": "PackerVariableDigest string `json:\"packerDigest,omitempty\"` If no ansible roles found in Packs then Mold should tell Drive to use capi image and not create custom image, because there is nothing to add", + "type": "boolean" + } + } + }, + "v1AwsCloudCostSpec": { + "description": "Aws cloud account usage cost payload spec", + "type": "object", + "required": [ + "credentials" + ], + "properties": { + "accountId": { + "description": "AccountId of AWS cloud cost", + "type": "string" + }, + "credentials": { + "$ref": "#/definitions/v1AwsCloudAccount" + }, + "filter": { + "$ref": "#/definitions/v1AwsCloudCostSpecFilter" + } + } + }, + "v1AwsCloudCostSpecFilter": { + "description": "Aws cloud account usage cost payload filter. startTime and endTime should be within 12 months range from now.", + "type": "object", + "required": [ + "startTime" + ], + "properties": { + "endTime": { + "$ref": "#/definitions/v1Time" + }, + "iamUserId": { + "description": "IAM UserId of AWS account", + "type": "string" + }, + "startTime": { + "$ref": "#/definitions/v1Time" + } + } + }, + "v1AwsCloudCostSummary": { + "description": "AWS cloud account usage cost summary response data", + "type": "object", + "properties": { + "cost": { + "$ref": "#/definitions/v1AwsCloudCostSummaryCloudCost" + } + } + }, + "v1AwsCloudCostSummaryCloudCost": { + "description": "AWS cloud account usage cost summary of monthlyCosts and totalCost", + "type": "object", + "properties": { + "monthlyCosts": { + "description": "Monthly cost of AWS cost", + "type": "array", + "items": { + "$ref": "#/definitions/v1AwsCloudCostSummaryMonthlyCost" + } + }, + "total": { + "description": "Total cost of AWS cost", + "type": "number", + "format": "float64", + "x-omitempty": false + } + } + }, + "v1AwsCloudCostSummaryMonthlyCost": { + "type": "object", + "properties": { + "amount": { + "description": "Amount for aws cloud cost", + "type": "number", + "format": "float64", + "x-omitempty": false + }, + "timestamp": { + "description": "Time duration for aws cloud cost", + "type": "integer" + } + } + }, + "v1AwsClusterConfig": { + "description": "Cluster level configuration for aws cloud and applicable for all the machine pools", + "type": "object", + "required": [ + "region" + ], + "properties": { + "bastionDisabled": { + "description": "Create bastion node option we have earlier supported creation of bastion by default capa seems to favour session manager against bastion node https://github.com/kubernetes-sigs/cluster-api-provider-aws/issues/947", + "type": "boolean" + }, + "controlPlaneLoadBalancer": { + "description": "ControlPlaneLoadBalancer specifies how API server elb will be configured, this field is optional, not provided, \"\", default =\u003e \"Internet-facing\" \"Internet-facing\" =\u003e \"Internet-facing\" \"internal\" =\u003e \"internal\" For spectro saas setup we require to talk to the apiserver from our cluster so ControlPlaneLoadBalancer should be \"\", not provided or \"Internet-facing\"", + "type": "string" + }, + "region": { + "type": "string" + }, + "sshKeyName": { + "type": "string" + }, + "vpcId": { + "description": "VPC Id to deploy cluster into should have one public and one private subnet for the the cluster creation, this field is optional, If VPC Id is not provided a fully managed VPC will be created", + "type": "string" + } + } + }, + "v1AwsCreditAccountEntity": { + "type": "object", + "properties": { + "creditLimitInDollars": { + "type": "number", + "format": "float64", + "x-omitempty": false + }, + "creditUsedInDollars": { + "type": "number", + "format": "float64", + "x-omitempty": false + }, + "loginCredentials": { + "$ref": "#/definitions/v1AwsLoginCredentials" + }, + "userCloudAccount": { + "$ref": "#/definitions/v1AwsUserCloudAccount" + } + } + }, + "v1AwsFindImageRequest": { + "description": "AWS image name and credentials", + "type": "object", + "properties": { + "amiName": { + "description": "AWS image ami name", + "type": "string" + }, + "awsAccount": { + "$ref": "#/definitions/v1AwsCloudAccount" + } + } + }, + "v1AwsIamPolicy": { + "description": "Aws policy", + "type": "object", + "properties": { + "arn": { + "type": "string" + }, + "policyId": { + "type": "string" + }, + "policyName": { + "type": "string" + } + } + }, + "v1AwsImage": { + "description": "AWS image name and ami", + "type": "object", + "properties": { + "id": { + "description": "AWS image id", + "type": "string" + }, + "name": { + "description": "AWS image name", + "type": "string" + }, + "owner": { + "description": "AWS image owner id", + "type": "string" + } + } + }, + "v1AwsInstanceTypes": { + "description": "List of AWS instance types", + "type": "object", + "properties": { + "instanceTypes": { + "type": "array", + "items": { + "$ref": "#/definitions/v1InstanceType" + } + } + } + }, + "v1AwsKeyPairs": { + "description": "List of AWS keypairs", + "type": "object", + "properties": { + "keyNames": { + "description": "Array of Aws Keypair names", + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "v1AwsKmsKey": { + "description": "AWS KMS Key - gives you centralized control over the cryptographic keys used to protect your data.", + "type": "object", + "required": [ + "keyId", + "keyArn" + ], + "properties": { + "keyAlias": { + "description": "AWS KMS alias", + "type": "string" + }, + "keyArn": { + "description": "AWS KMS arn", + "type": "string" + }, + "keyId": { + "description": "AWS KMS keyid", + "type": "string" + } + } + }, + "v1AwsKmsKeyEntity": { + "description": "List of AWS Keys", + "type": "object", + "properties": { + "awsAccountId": { + "description": "The twelve-digit account ID of the Amazon Web Services account that owns the KMS key", + "type": "string" + }, + "enabled": { + "description": "Specifies whether the KMS key is enabled.", + "type": "boolean" + }, + "keyId": { + "description": "The globally unique identifier for the KMS key", + "type": "string" + } + } + }, + "v1AwsKmsKeys": { + "description": "List of AWS Keys", + "type": "object", + "required": [ + "kmsKeys" + ], + "properties": { + "kmsKeys": { + "type": "array", + "items": { + "$ref": "#/definitions/v1AwsKmsKey" + } + } + } + }, + "v1AwsLaunchTemplate": { + "description": "AWSLaunchTemplate specifies the launch template to use to create the managed node group", + "type": "object", + "properties": { + "additionalSecurityGroups": { + "description": "AdditionalSecurityGroups is an array of references to security groups that should be applied to the instances", + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1AwsResourceReference" + } + }, + "ami": { + "$ref": "#/definitions/v1AwsAmiReference" + }, + "imageLookupBaseOS": { + "description": "ImageLookupBaseOS is the name of the base operating system to use for image lookup the AMI is not set", + "type": "string" + }, + "imageLookupFormat": { + "description": "ImageLookupFormat is the AMI naming format to look up the image", + "type": "string" + }, + "imageLookupOrg": { + "description": "ImageLookupOrg is the AWS Organization ID to use for image lookup if AMI is not set", + "type": "string" + }, + "rootVolume": { + "$ref": "#/definitions/v1AwsRootVolume" + } + } + }, + "v1AwsLoginCredentials": { + "type": "object", + "properties": { + "iamUser": { + "type": "string" + }, + "password": { + "type": "string", + "format": "password" + } + } + }, + "v1AwsMachine": { + "description": "AWS cloud VM definition", + "type": "object", + "properties": { + "apiVersion": { + "type": "string" + }, + "kind": { + "type": "string" + }, + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/v1AwsMachineSpec" + }, + "status": { + "$ref": "#/definitions/v1CloudMachineStatus" + } + } + }, + "v1AwsMachinePoolCloudConfigEntity": { + "type": "object", + "required": [ + "instanceType" + ], + "properties": { + "additionalSecurityGroups": { + "description": "Additional Security groups", + "type": "array", + "items": { + "$ref": "#/definitions/v1AwsResourceReference" + } + }, + "azs": { + "type": "array", + "items": { + "type": "string" + } + }, + "capacityType": { + "description": "EC2 instance capacity type", + "type": "string", + "default": "on-demand", + "enum": [ + "on-demand", + "spot" + ] + }, + "instanceType": { + "description": "instance type", + "type": "string" + }, + "rootDeviceSize": { + "description": "rootDeviceSize in GBs", + "type": "integer", + "format": "int64", + "maximum": 2000, + "minimum": 1 + }, + "spotMarketOptions": { + "description": "SpotMarketOptions allows users to configure instances to be run using AWS Spot instances.", + "$ref": "#/definitions/v1SpotMarketOptions" + }, + "subnets": { + "type": "array", + "items": { + "$ref": "#/definitions/v1AwsSubnetEntity" + } + } + } + }, + "v1AwsMachinePoolConfig": { + "type": "object", + "required": [ + "isControlPlane" + ], + "properties": { + "additionalLabels": { + "description": "additionalLabels", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "additionalSecurityGroups": { + "description": "Additional Security groups", + "type": "array", + "items": { + "$ref": "#/definitions/v1AwsResourceReference" + } + }, + "additionalTags": { + "description": "AdditionalTags is an optional set of tags to add to resources managed by the provider, in addition to the ones added by default. For eg., tags for EKS nodeGroup or EKS NodegroupIAMRole", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "azs": { + "description": "AZs is only used for dynamic placement", + "type": "array", + "items": { + "type": "string" + } + }, + "capacityType": { + "description": "EC2 instance capacity type", + "type": "string", + "default": "on-demand", + "enum": [ + "on-demand", + "spot" + ] + }, + "instanceConfig": { + "$ref": "#/definitions/v1InstanceConfig" + }, + "instanceType": { + "description": "instance type", + "type": "string" + }, + "isControlPlane": { + "description": "whether this pool is for control plane", + "type": "boolean", + "x-omitempty": false + }, + "labels": { + "description": "labels for this pool, example: control-plane/worker, gpu, windows", + "type": "array", + "items": { + "type": "string" + } + }, + "machinePoolProperties": { + "$ref": "#/definitions/v1MachinePoolProperties" + }, + "maxSize": { + "description": "max size of the pool, for scaling", + "type": "integer", + "format": "int32" + }, + "minSize": { + "description": "min size of the pool, for scaling", + "type": "integer", + "format": "int32" + }, + "name": { + "type": "string" + }, + "nodeRepaveInterval": { + "description": "Minimum number of seconds a node should be Ready, before the next node is selected for repave. Applicable only for workerpools in infrastructure cluster", + "type": "integer", + "format": "int32" + }, + "rootDeviceSize": { + "description": "rootDeviceSize in GBs", + "type": "integer", + "format": "int64" + }, + "size": { + "description": "size of the pool, number of machines", + "type": "integer", + "format": "int32" + }, + "spotMarketOptions": { + "description": "SpotMarketOptions allows users to configure instances to be run using AWS Spot instances.", + "$ref": "#/definitions/v1SpotMarketOptions" + }, + "subnetIds": { + "description": "AZ to subnet mapping filled by ally from hubble SubnetIDs [\"us-west-2d\"] = \"subnet-079b6061\" This field is optional If we don't provide a subnetId then by default the first private subnet from the AZ will be picked up for deployment", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "taints": { + "description": "control plane or worker taints", + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1Taint" + } + }, + "updateStrategy": { + "description": "rolling update strategy for this machinepool if not specified, will use ScaleOut", + "$ref": "#/definitions/v1UpdateStrategy" + }, + "useControlPlaneAsWorker": { + "description": "if IsControlPlane==true \u0026\u0026 useControlPlaneAsWorker==true, then will remove control plane taint this will not be used for worker pools", + "type": "boolean", + "x-omitempty": false + } + } + }, + "v1AwsMachinePoolConfigEntity": { + "type": "object", + "required": [ + "cloudConfig" + ], + "properties": { + "cloudConfig": { + "$ref": "#/definitions/v1AwsMachinePoolCloudConfigEntity" + }, + "poolConfig": { + "$ref": "#/definitions/v1MachinePoolConfigEntity" + } + } + }, + "v1AwsMachineSpec": { + "description": "AWS cloud VM definition spec", + "type": "object", + "required": [ + "instanceType", + "vpcId", + "ami" + ], + "properties": { + "additionalSecurityGroups": { + "description": "Additional Security groups", + "type": "array", + "items": { + "$ref": "#/definitions/v1AwsResourceReference" + } + }, + "ami": { + "type": "string" + }, + "az": { + "type": "string" + }, + "dnsName": { + "type": "string" + }, + "iamProfile": { + "type": "string" + }, + "instanceType": { + "type": "string" + }, + "nics": { + "type": "array", + "items": { + "$ref": "#/definitions/v1AwsNic" + } + }, + "phase": { + "type": "string" + }, + "sshKeyName": { + "type": "string" + }, + "subnetId": { + "type": "string" + }, + "type": { + "type": "string" + }, + "vpcId": { + "type": "string" + } + } + }, + "v1AwsMachines": { + "description": "AWS machine list", + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1AwsMachine" + } + }, + "listmeta": { + "$ref": "#/definitions/v1ListMetaData" + } + } + }, + "v1AwsNic": { + "description": "AWS network interface", + "type": "object", + "properties": { + "index": { + "type": "integer", + "format": "int8" + }, + "privateIPs": { + "type": "array", + "items": { + "type": "string" + } + }, + "publicIp": { + "type": "string" + } + } + }, + "v1AwsPartition": { + "description": "AWS accounts are scoped to a single partition. Allowed values [aws, aws-us-gov], Default values", + "type": "string", + "default": "aws", + "enum": [ + "aws", + "aws-us-gov" + ] + }, + "v1AwsPolicies": { + "type": "object", + "required": [ + "policies" + ], + "properties": { + "policies": { + "type": "array", + "items": { + "$ref": "#/definitions/v1AwsIamPolicy" + } + } + } + }, + "v1AwsPolicyArnsSpec": { + "description": "Aws policy ARNs spec", + "type": "object", + "required": [ + "policyArns", + "account" + ], + "properties": { + "account": { + "$ref": "#/definitions/v1AwsCloudAccount" + }, + "policyArns": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "v1AwsRegion": { + "description": "AWS region which represents separate geographic area.", + "type": "object", + "properties": { + "endpoint": { + "description": "AWS offer a regional endpoint that can used to make requests", + "type": "string" + }, + "name": { + "description": "Name of the AWS region", + "type": "string" + }, + "optInStatus": { + "description": "Enable your account to operate in the particular regions", + "type": "string" + } + } + }, + "v1AwsRegions": { + "type": "object", + "required": [ + "regions" + ], + "properties": { + "regions": { + "description": "List of AWS regions", + "type": "array", + "items": { + "$ref": "#/definitions/v1AwsRegion" + } + } + } + }, + "v1AwsResourceFilter": { + "description": "Filter is a filter used to identify an AWS resource", + "type": "object", + "properties": { + "name": { + "description": "Name of the filter. Filter names are case-sensitive", + "type": "string" + }, + "values": { + "description": "Values includes one or more filter values. Filter values are case-sensitive", + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + } + } + } + }, + "v1AwsResourceReference": { + "description": "AWSResourceReference is a reference to a specific AWS resource by ID or filters", + "type": "object", + "properties": { + "arn": { + "description": "ARN of resource", + "type": "string" + }, + "filters": { + "description": "Filters is a set of key/value pairs used to identify a resource", + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1AwsResourceFilter" + } + }, + "id": { + "description": "ID of resource", + "type": "string" + } + } + }, + "v1AwsRootVolume": { + "description": "Volume encapsulates the configuration options for the storage device.", + "type": "object", + "properties": { + "deviceName": { + "description": "Device name", + "type": "string" + }, + "encrypted": { + "description": "EncryptionKey is the KMS key to use to encrypt the volume. Can be either a KMS key ID or ARN", + "type": "boolean" + }, + "encryptionKey": { + "description": "EncryptionKey is the KMS key to use to encrypt the volume. Can be either a KMS key ID or ARN", + "type": "string" + }, + "iops": { + "description": "IOPS is the number of IOPS requested for the disk. Not applicable to all types", + "type": "integer", + "format": "int64" + }, + "throughput": { + "description": "Throughput to provision in MiB/s supported for the volume type. Not applicable to all types.", + "type": "integer", + "format": "int64" + }, + "type": { + "description": "Type is the type of the volume (e.g. gp2, io1, etc...)", + "type": "string" + } + } + }, + "v1AwsS3BucketCredentials": { + "description": "AWS S3 Bucket credentials", + "type": "object", + "required": [ + "credentials", + "bucket", + "region" + ], + "properties": { + "bucket": { + "description": "Name of AWS S3 bucket", + "type": "string" + }, + "credentials": { + "$ref": "#/definitions/v1AwsCloudAccount" + }, + "folder": { + "description": "Name of the folder in the specified AWS S3 bucket.", + "type": "string" + }, + "region": { + "description": "Name of the available AWS region.", + "type": "string" + } + } + }, + "v1AwsSecurityGroups": { + "type": "object", + "required": [ + "groups" + ], + "properties": { + "groups": { + "type": "array", + "items": { + "$ref": "#/definitions/v1AwsSecuritygroup" + } + } + } + }, + "v1AwsSecuritygroup": { + "description": "Aws security group", + "type": "object", + "properties": { + "groupId": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "ownerId": { + "type": "string" + } + } + }, + "v1AwsStorageTypes": { + "type": "object", + "properties": { + "storageTypes": { + "description": "List of AWS storage types", + "type": "array", + "items": { + "$ref": "#/definitions/v1StorageType" + } + } + } + }, + "v1AwsStsCredentials": { + "description": "Aws sts credentials", + "type": "object", + "properties": { + "arn": { + "description": "Arn for the aws sts credentials in cloud account", + "type": "string" + }, + "externalId": { + "description": "ExternalId for the aws sts credentials in cloud account", + "type": "string" + } + } + }, + "v1AwsSubnet": { + "description": "A subnet is a range of IP addresses in a AWS VPC", + "properties": { + "az": { + "description": "Every subnet can only be associated with only one Availability Zone", + "type": "string" + }, + "isPrivate": { + "description": "Is this subnet private", + "type": "boolean" + }, + "mapPublicIpOnLaunch": { + "description": "Indicates whether instances launched in this subnet receive a public IPv4 address.", + "type": "boolean", + "x-omitempty": false + }, + "name": { + "description": "Name of the subnet", + "type": "string" + }, + "subnetId": { + "description": "Id of the subnet", + "type": "string" + } + } + }, + "v1AwsSubnetEntity": { + "properties": { + "az": { + "type": "string" + }, + "id": { + "type": "string" + } + } + }, + "v1AwsUserCloudAccount": { + "properties": { + "accountId": { + "type": "string" + }, + "cloudAccount": { + "$ref": "#/definitions/v1AwsCloudAccount" + } + } + }, + "v1AwsVolumeSize": { + "description": "AWS Volume Size entity", + "type": "object", + "properties": { + "sizeGB": { + "description": "AWS volume size", + "type": "integer" + } + } + }, + "v1AwsVolumeType": { + "description": "AWS Volume Type entity", + "type": "object", + "properties": { + "id": { + "description": "AWS volume type id", + "type": "string" + }, + "maxIops": { + "description": "Iops through put of volume type", + "type": "string" + }, + "maxThroughPut": { + "description": "Max through put of volume type", + "type": "string" + }, + "name": { + "description": "AWS Volume Type Name", + "type": "string" + } + } + }, + "v1AwsVpc": { + "description": "A virtual network dedicated to a AWS account", + "type": "object", + "required": [ + "vpcId" + ], + "properties": { + "cidrBlock": { + "type": "string" + }, + "name": { + "description": "Name of the virtual network", + "type": "string" + }, + "subnets": { + "description": "List of subnets associated to a AWS VPC", + "type": "array", + "items": { + "$ref": "#/definitions/v1AwsSubnet" + } + }, + "vpcId": { + "description": "Id of the virtual network", + "type": "string" + } + } + }, + "v1AwsVpcs": { + "description": "List of AWS VPCs", + "type": "object", + "required": [ + "vpcs" + ], + "properties": { + "vpcs": { + "type": "array", + "items": { + "$ref": "#/definitions/v1AwsVpc" + } + } + } + }, + "v1AzValidateEntity": { + "description": "Az validate entity", + "type": "object", + "properties": { + "azs": { + "description": "Gcp Azs", + "type": "array", + "items": { + "type": "string" + } + }, + "project": { + "description": "Gcp project", + "type": "string" + }, + "region": { + "description": "Gcp region", + "type": "string" + }, + "uid": { + "description": "Cloud account uid", + "type": "string" + } + } + }, + "v1AzureAccount": { + "description": "Azure account information", + "type": "object", + "properties": { + "apiVersion": { + "description": "Cloud account api version", + "type": "string" + }, + "kind": { + "description": "Cloud account kind", + "type": "string" + }, + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/v1AzureCloudAccount" + }, + "status": { + "$ref": "#/definitions/v1CloudAccountStatus" + } + } + }, + "v1AzureAccounts": { + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1AzureAccount" + } + }, + "listmeta": { + "$ref": "#/definitions/v1ListMetaData" + } + } + }, + "v1AzureAvailabilityZone": { + "description": "Azure availability zone", + "type": "object", + "properties": { + "name": { + "description": "Azure availability zone name", + "type": "string" + } + } + }, + "v1AzureCloudAccount": { + "type": "object", + "required": [ + "tenantId", + "clientId", + "clientSecret" + ], + "properties": { + "azureEnvironment": { + "description": "Contains configuration for Azure cloud", + "type": "string", + "default": "AzurePublicCloud", + "enum": [ + "AzureChinaCloud", + "AzurePublicCloud", + "AzureUSGovernment", + "AzureUSGovernmentCloud" + ] + }, + "clientId": { + "description": "Client ID(Directory ID) is a unique identifier generated by Azure AD that is tied to an application", + "type": "string" + }, + "clientSecret": { + "description": "ClientSecret is the secret associated with Client", + "type": "string" + }, + "settings": { + "description": "Palette internal cloud settings", + "$ref": "#/definitions/v1CloudAccountSettings" + }, + "tenantId": { + "description": "Tenant ID is the ID for the Azure AD tenant that the user belongs to.", + "type": "string" + }, + "tenantName": { + "description": "Tenant ID is the ID for the Azure AD tenant that the user belongs to.", + "type": "string" + } + } + }, + "v1AzureCloudClusterConfigEntity": { + "description": "Azure cloud cluster config entity", + "type": "object", + "properties": { + "clusterConfig": { + "$ref": "#/definitions/v1AzureClusterConfig" + } + } + }, + "v1AzureCloudConfig": { + "description": "AzureCloudConfig is the Schema for the azurecloudconfigs API", + "type": "object", + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + "type": "string" + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/v1AzureCloudConfigSpec" + }, + "status": { + "$ref": "#/definitions/v1AzureCloudConfigStatus" + } + } + }, + "v1AzureCloudConfigSpec": { + "description": "AzureCloudConfigSpec defines the cloud configuration input by user This will translate to clusterspec/machinespec for cluster-api", + "type": "object", + "properties": { + "cloudAccountRef": { + "description": "cloudAccountRef should point to the secret which contains AzureCloudAccount", + "$ref": "#/definitions/v1ObjectReference" + }, + "clusterConfig": { + "$ref": "#/definitions/v1AzureClusterConfig" + }, + "machinePoolConfig": { + "type": "array", + "items": { + "$ref": "#/definitions/v1AzureMachinePoolConfig" + } + } + } + }, + "v1AzureCloudConfigStatus": { + "description": "AzureCloudConfigStatus defines the observed state of AzureCloudConfig The cloudimage info built by Mold is stored here image should be mapped to a specific machinepool", + "type": "object", + "properties": { + "ansibleRoleDigest": { + "description": "For mold controller to identify if is there any changes in Pack", + "type": "string" + }, + "conditions": { + "description": "spectroAnsibleProvisioner: should be added only once, subsequent recocile will use the same provisioner SpectroAnsiblePacker bool `json:\"spectroAnsiblePacker,omitempty\"`", + "type": "array", + "items": { + "$ref": "#/definitions/v1ClusterCondition" + } + }, + "images": { + "description": "Images array items should be 1-to-1 mapping to Spec.MachinePoolConfig", + "$ref": "#/definitions/v1AzureImage" + }, + "isAddonLayer": { + "description": "addon layers present in spc", + "type": "boolean" + }, + "roleDigest": { + "description": "this map will be for ansible roles present in eack pack", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "sourceImageId": { + "description": "sourceImageId, it can be from packref's annotations or from pack.json", + "type": "string" + }, + "useCapiImage": { + "description": "PackerVariableDigest string `json:\"packerDigest,omitempty\"` If no ansible roles found in Packs then Mold should tell Drive to use capi image and not create custom image, because there is nothing to add", + "type": "boolean" + }, + "vhdImage": { + "$ref": "#/definitions/v1AzureVHDImage" + } + } + }, + "v1AzureClusterConfig": { + "description": "Cluster level configuration for Azure cloud and applicable for all the machine pools", + "type": "object", + "required": [ + "subscriptionId", + "location", + "sshKey" + ], + "properties": { + "aadProfile": { + "description": "AadProfile is Azure Active Directory configuration to integrate with AKS for aad authentication.", + "$ref": "#/definitions/v1AADProfile" + }, + "apiServerAccessProfile": { + "description": "APIServerAccessProfile is the access profile for AKS API server.", + "$ref": "#/definitions/v1APIServerAccessProfile" + }, + "containerName": { + "type": "string" + }, + "controlPlaneSubnet": { + "description": "Subnet for Kubernetes control-plane node", + "$ref": "#/definitions/v1Subnet" + }, + "enablePrivateCluster": { + "description": "Deprecated. use apiServerAccessProfile.enablePrivateCluster", + "type": "boolean" + }, + "infraLBConfig": { + "description": "APIServerLB is the configuration for the control-plane load balancer.", + "$ref": "#/definitions/v1InfraLBConfig" + }, + "location": { + "description": "Location is the Azure datacenter location", + "type": "string" + }, + "resourceGroup": { + "type": "string" + }, + "sshKey": { + "type": "string" + }, + "storageAccountName": { + "type": "string" + }, + "subscriptionId": { + "description": "Subscription ID is unique identifier for the subscription used to access Azure services", + "type": "string" + }, + "vnetCidrBlock": { + "type": "string" + }, + "vnetName": { + "description": "VNETName is the virtual network in which the cluster is to be provisioned.", + "type": "string" + }, + "vnetResourceGroup": { + "type": "string" + }, + "workerSubnet": { + "description": "Subnet for Kubernetes worker node", + "$ref": "#/definitions/v1Subnet" + } + } + }, + "v1AzureGroup": { + "description": "Azure group entity", + "type": "object", + "properties": { + "id": { + "description": "Azure group id", + "type": "string" + }, + "name": { + "description": "Azure group name", + "type": "string" + } + } + }, + "v1AzureGroups": { + "description": "List of Azure groups", + "type": "object", + "required": [ + "groups" + ], + "properties": { + "groups": { + "type": "array", + "items": { + "$ref": "#/definitions/v1AzureGroup" + } + } + } + }, + "v1AzureImage": { + "description": "Refers to Azure Shared Gallery image", + "type": "object", + "properties": { + "gallery": { + "type": "string" + }, + "name": { + "type": "string" + }, + "resourceGroup": { + "type": "string" + }, + "state": { + "type": "string" + }, + "subscriptionID": { + "type": "string" + }, + "version": { + "type": "string" + } + } + }, + "v1AzureInstanceTypes": { + "description": "List of Azure instance types", + "type": "object", + "properties": { + "instanceTypes": { + "type": "array", + "items": { + "$ref": "#/definitions/v1InstanceType" + } + } + } + }, + "v1AzureMachine": { + "description": "Azure cloud VM definition", + "type": "object", + "properties": { + "apiVersion": { + "type": "string" + }, + "kind": { + "type": "string" + }, + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/v1AzureMachineSpec" + }, + "status": { + "$ref": "#/definitions/v1CloudMachineStatus" + } + } + }, + "v1AzureMachinePoolCloudConfigEntity": { + "type": "object", + "properties": { + "azs": { + "type": "array", + "items": { + "type": "string" + } + }, + "instanceType": { + "description": "Instance type stands for VMSize in Azure", + "type": "string" + }, + "isSystemNodePool": { + "description": "whether this pool is for system node Pool", + "type": "boolean" + }, + "osDisk": { + "$ref": "#/definitions/v1AzureOSDisk" + } + } + }, + "v1AzureMachinePoolConfig": { + "type": "object", + "required": [ + "isControlPlane" + ], + "properties": { + "additionalLabels": { + "description": "additionalLabels", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "additionalTags": { + "description": "AdditionalTags is an optional set of tags to add to resources managed by the provider, in addition to the ones added by default. For eg., tags for EKS nodeGroup or EKS NodegroupIAMRole", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "azs": { + "type": "array", + "items": { + "type": "string" + } + }, + "instanceConfig": { + "$ref": "#/definitions/v1InstanceConfig" + }, + "instanceType": { + "description": "Instance type stands for VMSize in Azure", + "type": "string" + }, + "isControlPlane": { + "description": "whether this pool is for control plane", + "type": "boolean", + "x-omitempty": false + }, + "isSystemNodePool": { + "description": "whether this pool is for system node Pool", + "type": "boolean", + "x-omitempty": false + }, + "labels": { + "description": "labels for this pool, example: control-plane/worker, gpu, windows", + "type": "array", + "items": { + "type": "string" + } + }, + "machinePoolProperties": { + "$ref": "#/definitions/v1MachinePoolProperties" + }, + "maxSize": { + "description": "max size of the pool, for scaling", + "type": "integer", + "format": "int32" + }, + "minSize": { + "description": "min size of the pool, for scaling", + "type": "integer", + "format": "int32" + }, + "name": { + "type": "string" + }, + "nodeRepaveInterval": { + "description": "Minimum number of seconds a node should be Ready, before the next node is selected for repave. Applicable only for workerpools in infrastructure cluster", + "type": "integer", + "format": "int32" + }, + "osDisk": { + "$ref": "#/definitions/v1AzureOSDisk" + }, + "osType": { + "type": "string", + "$ref": "#/definitions/v1OsType" + }, + "size": { + "description": "size of the pool, number of machines", + "type": "integer", + "format": "int32" + }, + "spotVMOptions": { + "description": "SpotVMOptions allows the ability to specify the Machine should use a Spot VM", + "$ref": "#/definitions/v1SpotVMOptions" + }, + "taints": { + "description": "control plane or worker taints", + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1Taint" + } + }, + "updateStrategy": { + "description": "rolling update strategy for this machinepool if not specified, will use ScaleOut", + "$ref": "#/definitions/v1UpdateStrategy" + }, + "useControlPlaneAsWorker": { + "description": "if IsControlPlane==true \u0026\u0026 useControlPlaneAsWorker==true, then will remove control plane taint this will not be used for worker pools", + "type": "boolean", + "x-omitempty": false + } + } + }, + "v1AzureMachinePoolConfigEntity": { + "type": "object", + "required": [ + "cloudConfig" + ], + "properties": { + "cloudConfig": { + "$ref": "#/definitions/v1AzureMachinePoolCloudConfigEntity" + }, + "managedPoolConfig": { + "$ref": "#/definitions/v1AzureManagedMachinePoolConfig" + }, + "poolConfig": { + "$ref": "#/definitions/v1MachinePoolConfigEntity" + } + } + }, + "v1AzureMachineSpec": { + "description": "Azure cloud VM definition spec", + "type": "object", + "required": [ + "instanceType", + "location", + "osDisk" + ], + "properties": { + "additionalTags": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "allocatePublicIP": { + "type": "boolean" + }, + "availabilityZone": { + "$ref": "#/definitions/v1AzureMachineSpecAvailabilityZone" + }, + "image": { + "$ref": "#/definitions/v1AzureMachineSpecImage" + }, + "instanceType": { + "type": "string" + }, + "location": { + "type": "string" + }, + "nics": { + "type": "array", + "items": { + "$ref": "#/definitions/v1AzureNic" + } + }, + "osDisk": { + "$ref": "#/definitions/v1AzureOSDisk" + }, + "sshPublicKey": { + "type": "string" + } + } + }, + "v1AzureMachineSpecAvailabilityZone": { + "description": "Azure Machine Spec Availability zone", + "type": "object", + "properties": { + "enabled": { + "type": "boolean" + }, + "id": { + "type": "string" + } + } + }, + "v1AzureMachineSpecImage": { + "description": "Azure Machine Spec Image", + "type": "object", + "properties": { + "gallery": { + "type": "string" + }, + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "offer": { + "type": "string" + }, + "publisher": { + "type": "string" + }, + "resourceGroup": { + "type": "string" + }, + "sku": { + "type": "string" + }, + "subscriptionId": { + "type": "string" + }, + "version": { + "type": "string" + } + } + }, + "v1AzureMachines": { + "description": "Azure machine list", + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1AzureMachine" + } + }, + "listmeta": { + "$ref": "#/definitions/v1ListMetaData" + } + } + }, + "v1AzureManagedMachinePoolConfig": { + "type": "object", + "properties": { + "isSystemNodePool": { + "description": "whether this pool is for system node Pool", + "type": "boolean", + "x-omitempty": false + }, + "osType": { + "type": "string", + "$ref": "#/definitions/v1OsType" + } + } + }, + "v1AzureNic": { + "description": "AWS network interface", + "type": "object", + "properties": { + "index": { + "type": "integer", + "format": "int8" + }, + "privateIPs": { + "type": "array", + "items": { + "type": "string" + } + }, + "publicIp": { + "type": "string" + } + } + }, + "v1AzureOSDisk": { + "type": "object", + "properties": { + "diskSizeGB": { + "type": "integer", + "format": "int32" + }, + "managedDisk": { + "$ref": "#/definitions/v1ManagedDisk" + }, + "osType": { + "type": "string", + "$ref": "#/definitions/v1OsType" + } + } + }, + "v1AzurePrivateDnsZone": { + "description": "Azure Private DNS zone entity", + "type": "object", + "properties": { + "id": { + "description": "Fully qualified resource Id for the resource", + "type": "string" + }, + "location": { + "description": "The Azure Region where the resource lives", + "type": "string" + }, + "name": { + "description": "The name of the resource", + "type": "string" + } + } + }, + "v1AzurePrivateDnsZones": { + "description": "List of Azure storage accounts", + "type": "object", + "properties": { + "privateDnsZones": { + "type": "array", + "items": { + "$ref": "#/definitions/v1AzurePrivateDnsZone" + } + } + } + }, + "v1AzureRegion": { + "description": "Azure region entity", + "type": "object", + "properties": { + "displayName": { + "description": "Azure region displayname", + "type": "string" + }, + "name": { + "description": "Azure region name", + "type": "string" + }, + "zones": { + "description": "List of zones associated to a particular Azure region", + "type": "array", + "items": { + "$ref": "#/definitions/v1AzureAvailabilityZone" + } + } + } + }, + "v1AzureRegions": { + "description": "List of Azure regions", + "type": "object", + "required": [ + "regions" + ], + "properties": { + "regions": { + "type": "array", + "items": { + "$ref": "#/definitions/v1AzureRegion" + } + } + } + }, + "v1AzureResourceGroupList": { + "description": "List of Azure resource group", + "type": "object", + "properties": { + "resourceGroupList": { + "type": "array", + "items": { + "$ref": "#/definitions/v1ResourceGroup" + } + } + } + }, + "v1AzureStorageAccountEntity": { + "description": "Azure Storage Account Entity", + "type": "object", + "properties": { + "storageAccountTypes": { + "type": "array", + "items": { + "$ref": "#/definitions/v1StorageAccountEntity" + } + } + } + }, + "v1AzureStorageAccounts": { + "description": "List of Azure storage accounts", + "type": "object", + "properties": { + "accounts": { + "type": "array", + "items": { + "$ref": "#/definitions/v1StorageAccount" + } + } + } + }, + "v1AzureStorageConfig": { + "description": "Azure storage config object", + "type": "object", + "required": [ + "resourceGroup", + "containerName", + "storageName", + "credentials" + ], + "properties": { + "containerName": { + "description": "Azure container name", + "type": "string" + }, + "credentials": { + "description": "Azure cloud account credentials", + "$ref": "#/definitions/v1.AzureAccountEntitySpec" + }, + "resourceGroup": { + "description": "Azure resource group name, to which the storage account is mapped", + "type": "string" + }, + "sku": { + "description": "Azure sku", + "type": "string" + }, + "storageName": { + "description": "Azure storage name", + "type": "string" + } + } + }, + "v1AzureStorageContainers": { + "description": "List of Azure storage containers", + "type": "object", + "properties": { + "containers": { + "type": "array", + "items": { + "$ref": "#/definitions/v1StorageContainer" + } + } + } + }, + "v1AzureStorageTypes": { + "description": "List of Azure storage types", + "type": "object", + "properties": { + "storageTypes": { + "type": "array", + "items": { + "$ref": "#/definitions/v1StorageType" + } + } + } + }, + "v1AzureSubscriptionList": { + "description": "List of Azure subscription", + "type": "object", + "properties": { + "subscriptionList": { + "type": "array", + "items": { + "$ref": "#/definitions/v1Subscription" + } + } + } + }, + "v1AzureVHDImage": { + "description": "Mold always create VHD image for custom image, and this can be use as golden images", + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "os": { + "type": "string" + }, + "region": { + "type": "string" + }, + "state": { + "type": "string" + } + } + }, + "v1AzureVhdUrlEntity": { + "description": "Azure vhd url entity", + "type": "object", + "properties": { + "name": { + "description": "The name of the resource", + "type": "string" + }, + "url": { + "description": "The url of the Azure Vhd", + "type": "string" + } + } + }, + "v1AzureVirtualNetworkList": { + "description": "List of Azure virtual network", + "type": "object", + "properties": { + "virtualNetworkList": { + "type": "array", + "items": { + "$ref": "#/definitions/v1VirtualNetwork" + } + } + } + }, + "v1AzureZoneEntity": { + "description": "List of Azure zone", + "type": "object", + "properties": { + "zoneList": { + "type": "array", + "items": { + "$ref": "#/definitions/v1ZoneEntity" + } + } + } + }, + "v1BackupLocationConfig": { + "description": "Backup location configuration", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string" + }, + "uid": { + "type": "string" + } + } + }, + "v1BackupRestoreStatusMeta": { + "description": "Backup restored status", + "properties": { + "backupName": { + "type": "string" + }, + "destinationClusterRef": { + "$ref": "#/definitions/v1ResourceReference" + }, + "restoreState": { + "type": "string" + } + } + }, + "v1BackupState": { + "description": "Backup state", + "properties": { + "backupTime": { + "$ref": "#/definitions/v1Time" + }, + "deleteState": { + "type": "string" + }, + "msg": { + "type": "string" + }, + "state": { + "type": "string" + } + } + }, + "v1BackupStatusConfig": { + "description": "Backup config", + "properties": { + "includeAllDisks": { + "type": "boolean" + }, + "includeClusterResources": { + "type": "boolean" + }, + "namespaces": { + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + } + } + } + }, + "v1BackupStatusMeta": { + "description": "Backup status meta", + "properties": { + "backupName": { + "type": "string" + }, + "backupState": { + "$ref": "#/definitions/v1BackupState" + }, + "backupedNamespaces": { + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + } + }, + "expiryDate": { + "$ref": "#/definitions/v1Time" + } + } + }, + "v1BasicOciRegistry": { + "description": "Basic oci registry information", + "type": "object", + "properties": { + "kind": { + "type": "string" + }, + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/v1BasicOciRegistrySpec" + } + } + }, + "v1BasicOciRegistrySpec": { + "description": "Basic oci registry spec", + "type": "object", + "required": [ + "endpoint", + "auth" + ], + "properties": { + "auth": { + "$ref": "#/definitions/v1RegistryAuth" + }, + "baseContentPath": { + "description": "OCI registry content base path", + "type": "string" + }, + "basePath": { + "description": "OCI registry api base path", + "type": "string" + }, + "endpoint": { + "description": "OCI registry endpoint", + "type": "string" + }, + "providerType": { + "type": "string", + "default": "helm", + "enum": [ + "helm", + "zarf", + "pack" + ] + }, + "registryUid": { + "description": "Basic oci registry uid", + "type": "string" + }, + "scope": { + "type": "string" + } + } + }, + "v1BulkDeleteFailure": { + "properties": { + "errMsg": { + "type": "string" + }, + "name": { + "type": "string" + }, + "uid": { + "type": "string" + } + } + }, + "v1BulkDeleteRequest": { + "required": [ + "uids" + ], + "properties": { + "uids": { + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + } + } + } + }, + "v1BulkDeleteResponse": { + "properties": { + "deletedCount": { + "type": "integer", + "x-omitempty": false + }, + "failures": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1BulkDeleteFailure" + }, + "x-omitempty": false + }, + "isSucceeded": { + "type": "boolean", + "x-omitempty": false + }, + "message": { + "type": "string", + "x-omitempty": false + } + } + }, + "v1BulkEvents": { + "description": "Describes a list component events' details", + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1Event" + } + }, + "v1CPU": { + "type": "object", + "properties": { + "cores": { + "description": "number of cpu cores", + "type": "integer", + "format": "int32" + } + } + }, + "v1Cert": { + "type": "object", + "properties": { + "certificate": { + "type": "string", + "x-omitempty": false + }, + "isCA": { + "type": "boolean", + "x-omitempty": false + }, + "key": { + "type": "string", + "x-omitempty": false + } + } + }, + "v1Certificate": { + "description": "Certificate details", + "type": "object", + "properties": { + "expiry": { + "description": "Certificate expiry time", + "$ref": "#/definitions/v1Time" + }, + "name": { + "type": "string" + } + } + }, + "v1CertificateAuthority": { + "description": "Certificate Authority", + "type": "object", + "properties": { + "certificates": { + "type": "array", + "items": { + "$ref": "#/definitions/v1Certificate" + } + }, + "expiry": { + "description": "Certificate expiry time", + "$ref": "#/definitions/v1Time" + }, + "name": { + "type": "string" + } + } + }, + "v1Channel": { + "type": "object", + "properties": { + "alertAllUsers": { + "type": "boolean", + "x-omitempty": false + }, + "createdBy": { + "type": "string" + }, + "http": { + "type": "object", + "properties": { + "body": { + "type": "string" + }, + "headers": { + "additionalProperties": { + "type": "string" + } + }, + "method": { + "type": "string" + }, + "url": { + "type": "string" + } + } + }, + "identifiers": { + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + } + }, + "isActive": { + "type": "boolean", + "x-omitempty": false + }, + "status": { + "$ref": "#/definitions/v1AlertNotificationStatus" + }, + "type": { + "type": "string", + "enum": [ + "email", + "app", + "http" + ] + }, + "uid": { + "type": "string" + } + } + }, + "v1CloudAccountMeta": { + "description": "Cloud account meta information", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "uid": { + "type": "string" + } + } + }, + "v1CloudAccountMetadata": { + "description": "Cloud account metadata summary", + "properties": { + "kind": { + "type": "string" + }, + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + } + } + }, + "v1CloudAccountSettings": { + "description": "Cloud account settings", + "type": "object", + "properties": { + "disablePropertiesRequest": { + "description": "Will disable certain properties request to cloud and the input is collected directly from the user", + "type": "boolean", + "x-omitempty": false + } + } + }, + "v1CloudAccountStatus": { + "description": "Status of the account", + "type": "object", + "properties": { + "state": { + "description": "Cloud account status", + "type": "string" + } + } + }, + "v1CloudAccountSummary": { + "description": "Cloud account summary", + "type": "object", + "properties": { + "kind": { + "type": "string" + }, + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "specSummary": { + "description": "Cloud account spec summary", + "type": "object", + "properties": { + "accountId": { + "type": "string" + } + } + }, + "status": { + "$ref": "#/definitions/v1CloudAccountStatus" + } + } + }, + "v1CloudAccountUidEntity": { + "description": "Cloud account uid entity", + "type": "object", + "properties": { + "uid": { + "description": "Cloud account uid", + "type": "string" + } + } + }, + "v1CloudAccountsMetadata": { + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1CloudAccountMetadata" + } + } + } + }, + "v1CloudAccountsPatch": { + "type": "array", + "items": { + "$ref": "#/definitions/v1HttpPatch" + } + }, + "v1CloudAccountsSummary": { + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1CloudAccountSummary" + } + }, + "listmeta": { + "$ref": "#/definitions/v1ListMetaData" + } + } + }, + "v1CloudCategory": { + "description": "Cloud category description", + "type": "string", + "default": "cloud", + "enum": [ + "datacenter", + "cloud", + "edge" + ] + }, + "v1CloudConfigMeta": { + "type": "object", + "properties": { + "cloudType": { + "type": "string" + }, + "machinePools": { + "description": "Machine pool meta information", + "type": "array", + "items": { + "$ref": "#/definitions/v1MachinePoolMeta" + } + }, + "uid": { + "description": "Cluster's cloud config uid", + "type": "string" + } + } + }, + "v1CloudCost": { + "description": "Cloud cost information", + "type": "object", + "properties": { + "compute": { + "type": "number", + "format": "float64", + "x-omitempty": false + }, + "storage": { + "type": "number", + "format": "float64", + "x-omitempty": false + }, + "total": { + "type": "number", + "format": "float64", + "x-omitempty": false + } + } + }, + "v1CloudCostDataPoint": { + "description": "Cloud cost data point information", + "type": "object", + "properties": { + "compute": { + "type": "number", + "format": "float64", + "x-omitempty": false + }, + "storage": { + "type": "number", + "format": "float64", + "x-omitempty": false + }, + "timestamp": { + "type": "number", + "format": "int64" + }, + "total": { + "type": "number", + "format": "float64", + "x-omitempty": false + } + } + }, + "v1CloudInstanceRateConfig": { + "description": "Cloud instance rate config", + "properties": { + "computeRateProportion": { + "type": "number", + "format": "float" + }, + "memoryRateProportion": { + "type": "number", + "format": "float" + } + } + }, + "v1CloudMachineStatus": { + "description": "cloud machine status", + "type": "object", + "properties": { + "health": { + "$ref": "#/definitions/v1MachineHealth" + }, + "instanceState": { + "type": "string", + "enum": [ + "Pending", + "Provisioning", + "Provisioned", + "Running", + "Deleting", + "Deleted", + "Failed", + "Unknown" + ] + }, + "maintenanceStatus": { + "$ref": "#/definitions/v1MachineMaintenanceStatus" + } + } + }, + "v1CloudRate": { + "description": "Cloud estimated rate information", + "type": "object", + "properties": { + "compute": { + "$ref": "#/definitions/v1ComputeRate" + }, + "storage": { + "type": "array", + "items": { + "$ref": "#/definitions/v1StorageRate" + } + }, + "total": { + "type": "number", + "format": "float64", + "x-omitempty": false + } + } + }, + "v1CloudResourceMetadata": { + "description": "Cloud resource metadata", + "type": "object", + "properties": { + "instanceTypes": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/v1InstanceType" + } + }, + "storageTypes": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/v1StorageType" + } + } + } + }, + "v1CloudSpotPrice": { + "description": "Spot price entity of a particular cloud type", + "type": "object", + "properties": { + "spotPrice": { + "description": "Spot price of a resource for a particular cloud", + "type": "number", + "format": "float64", + "x-omitempty": false + } + } + }, + "v1CloudWatch": { + "type": "object", + "properties": { + "credentials": { + "$ref": "#/definitions/v1AwsCloudAccount" + }, + "group": { + "type": "string" + }, + "region": { + "type": "string" + }, + "stream": { + "type": "string" + } + } + }, + "v1ClusterBackup": { + "description": "Cluster Backup", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/v1ClusterBackupSpec" + }, + "status": { + "$ref": "#/definitions/v1ClusterBackupStatus" + } + } + }, + "v1ClusterBackupConfig": { + "description": "Cluster backup config", + "properties": { + "backupLocationName": { + "type": "string" + }, + "backupLocationUid": { + "type": "string" + }, + "backupName": { + "type": "string" + }, + "backupPrefix": { + "type": "string" + }, + "durationInHours": { + "type": "number", + "format": "int64" + }, + "includeAllDisks": { + "type": "boolean" + }, + "includeClusterResources": { + "type": "boolean" + }, + "locationType": { + "type": "string" + }, + "namespaces": { + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + } + }, + "schedule": { + "$ref": "#/definitions/v1ClusterFeatureSchedule" + } + } + }, + "v1ClusterBackupLocationType": { + "description": "Cluster backup location type", + "required": [ + "locationType" + ], + "properties": { + "locationType": { + "type": "string" + } + } + }, + "v1ClusterBackupSpec": { + "description": "Cluster Backup Spec", + "properties": { + "clusterUid": { + "type": "string" + }, + "config": { + "$ref": "#/definitions/v1ClusterBackupConfig" + } + } + }, + "v1ClusterBackupStatus": { + "description": "Cluster Backup Status", + "properties": { + "clusterBackupStatuses": { + "type": "array", + "items": { + "$ref": "#/definitions/v1ClusterBackupStatusMeta" + } + } + } + }, + "v1ClusterBackupStatusMeta": { + "description": "Cluster Backup Status Meta", + "properties": { + "actor": { + "$ref": "#/definitions/v1ClusterFeatureActor" + }, + "backupConfig": { + "$ref": "#/definitions/v1BackupStatusConfig" + }, + "backupLocationConfig": { + "$ref": "#/definitions/v1BackupLocationConfig" + }, + "backupRequestUid": { + "type": "string" + }, + "backupStatusMeta": { + "type": "array", + "items": { + "$ref": "#/definitions/v1BackupStatusMeta" + } + }, + "restoreStatusMeta": { + "type": "array", + "items": { + "$ref": "#/definitions/v1BackupRestoreStatusMeta" + } + }, + "state": { + "type": "string" + } + } + }, + "v1ClusterComplianceOnDemandConfig": { + "description": "Cluster compliance scan on demand configuration", + "properties": { + "kubeBench": { + "$ref": "#/definitions/v1ClusterComplianceScanKubeBenchConfig" + }, + "kubeHunter": { + "$ref": "#/definitions/v1ClusterComplianceScanKubeHunterConfig" + }, + "sonobuoy": { + "$ref": "#/definitions/v1ClusterComplianceScanSonobuoyConfig" + }, + "syft": { + "$ref": "#/definitions/v1ClusterComplianceScanSyftConfig" + } + } + }, + "v1ClusterComplianceScan": { + "description": "Cluster Compliance Scan", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/v1ClusterComplianceScanSpec" + } + } + }, + "v1ClusterComplianceScanKubeBenchConfig": { + "description": "Cluster compliance scan config for kube bench driver", + "properties": { + "runScan": { + "type": "boolean" + } + } + }, + "v1ClusterComplianceScanKubeBenchScheduleConfig": { + "description": "Cluster compliance scan schedule config for kube bench driver", + "properties": { + "schedule": { + "$ref": "#/definitions/v1ClusterFeatureSchedule" + } + } + }, + "v1ClusterComplianceScanKubeHunterConfig": { + "description": "Cluster compliance scan config for kube hunter driver", + "properties": { + "runScan": { + "type": "boolean" + } + } + }, + "v1ClusterComplianceScanKubeHunterScheduleConfig": { + "description": "Cluster compliance scan schedule config for kube hunter driver", + "properties": { + "schedule": { + "$ref": "#/definitions/v1ClusterFeatureSchedule" + } + } + }, + "v1ClusterComplianceScanLogSpec": { + "description": "Cluster compliance scan logs spec", + "properties": { + "clusterUid": { + "type": "string" + }, + "driverType": { + "type": "string" + } + } + }, + "v1ClusterComplianceScanLogs": { + "description": "Cluster compliance scan Logs", + "properties": { + "kubeBenchLogs": { + "type": "array", + "items": { + "$ref": "#/definitions/v1ClusterScanLogKubeBench" + } + }, + "kubeHunterLogs": { + "type": "array", + "items": { + "$ref": "#/definitions/v1ClusterScanLogKubeHunter" + } + }, + "sonobuoyLogs": { + "type": "array", + "items": { + "$ref": "#/definitions/v1ClusterScanLogSonobuoy" + } + }, + "syftLogs": { + "type": "array", + "items": { + "$ref": "#/definitions/v1ClusterScanLogSyft" + } + } + } + }, + "v1ClusterComplianceScanSonobuoyConfig": { + "description": "Cluster compliance scan config for sonobuoy driver", + "properties": { + "runScan": { + "type": "boolean" + } + } + }, + "v1ClusterComplianceScanSonobuoyScheduleConfig": { + "description": "Cluster compliance scan schedule config for sonobuoy driver", + "properties": { + "schedule": { + "$ref": "#/definitions/v1ClusterFeatureSchedule" + } + } + }, + "v1ClusterComplianceScanSpec": { + "description": "Cluster compliance scan Spec", + "properties": { + "clusterUid": { + "type": "string" + }, + "driverSpec": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/v1ComplianceScanDriverSpec" + } + } + } + }, + "v1ClusterComplianceScanSyftConfig": { + "description": "Cluster compliance scan config for syft driver", + "properties": { + "config": { + "$ref": "#/definitions/v1ClusterComplianceScanSyftDriverConfig" + }, + "runScan": { + "type": "boolean" + } + } + }, + "v1ClusterComplianceScanSyftDriverConfig": { + "description": "Cluster compliance scan specification", + "properties": { + "format": { + "type": "string", + "enum": [ + "cyclonedx-json", + "github-json", + "spdx-json", + "syft-json" + ] + }, + "labelSelector": { + "type": "string" + }, + "location": { + "$ref": "#/definitions/v1ObjectEntity" + }, + "namespace": { + "type": "string" + }, + "podName": { + "type": "string" + }, + "scope": { + "type": "string", + "enum": [ + "cluster", + "namespace", + "label-selector", + "pod" + ] + } + } + }, + "v1ClusterComplianceScheduleConfig": { + "description": "Cluster compliance scan schedule configuration", + "properties": { + "kubeBench": { + "$ref": "#/definitions/v1ClusterComplianceScanKubeBenchScheduleConfig" + }, + "kubeHunter": { + "$ref": "#/definitions/v1ClusterComplianceScanKubeHunterScheduleConfig" + }, + "sonobuoy": { + "$ref": "#/definitions/v1ClusterComplianceScanSonobuoyScheduleConfig" + } + } + }, + "v1ClusterCondition": { + "type": "object", + "required": [ + "type", + "status" + ], + "properties": { + "lastProbeTime": { + "$ref": "#/definitions/v1Time" + }, + "lastTransitionTime": { + "$ref": "#/definitions/v1Time" + }, + "message": { + "description": "Human-readable message indicating details about last transition.", + "type": "string" + }, + "reason": { + "description": "Unique, one-word, CamelCase reason for the condition's last transition.", + "type": "string" + }, + "status": { + "type": "string" + }, + "type": { + "type": "string" + } + } + }, + "v1ClusterConfig": { + "type": "object", + "properties": { + "clusterMetaAttribute": { + "description": "ClusterMetaAttribute contains additional cluster metadata information.", + "type": "string" + }, + "clusterRbac": { + "description": "Deprecated. Use clusterResources", + "type": "array", + "items": { + "$ref": "#/definitions/v1ResourceReference" + } + }, + "clusterResources": { + "description": "ClusterResources defines the managment of namespace resource allocations, role bindings.", + "$ref": "#/definitions/v1ClusterResources" + }, + "controlPlaneHealthCheckTimeout": { + "description": "ControlPlaneHealthCheckTimeout is the timeout to check for ready state of the control plane nodes. If the node is not ready within the time out set, the node will be deleted and a new node will be launched.", + "type": "string" + }, + "hostClusterConfig": { + "description": "HostClusterConfiguration defines the configuration of host clusters, where virtual clusters be deployed", + "$ref": "#/definitions/v1HostClusterConfig" + }, + "lifecycleConfig": { + "$ref": "#/definitions/v1LifecycleConfig" + }, + "machineHealthConfig": { + "description": "MachineHealthCheckConfig defines the healthcheck timeouts for the node. The timeouts are configured by the user to overide the default healthchecks.", + "$ref": "#/definitions/v1MachineHealthCheckConfig" + }, + "machineManagementConfig": { + "description": "MachineManagementConfig defines the management configurations for the node. Patching OS security updates etc can be configured by user.", + "$ref": "#/definitions/v1MachineManagementConfig" + }, + "updateWorkerPoolsInParallel": { + "description": "UpdateWorkerPoolsInParallel is used to decide if the update of workerpools happen in parallel. When this flag is false, the workerpools are updated sequentially.", + "type": "boolean" + } + } + }, + "v1ClusterConfigEntity": { + "type": "object", + "properties": { + "clusterMetaAttribute": { + "description": "ClusterMetaAttribute can be used to set additional cluster metadata information.", + "type": "string" + }, + "controlPlaneHealthCheckTimeout": { + "type": "string" + }, + "hostClusterConfig": { + "$ref": "#/definitions/v1HostClusterConfig" + }, + "lifecycleConfig": { + "$ref": "#/definitions/v1LifecycleConfig" + }, + "location": { + "$ref": "#/definitions/v1ClusterLocation" + }, + "machineManagementConfig": { + "$ref": "#/definitions/v1MachineManagementConfig" + }, + "resources": { + "$ref": "#/definitions/v1ClusterResourcesEntity" + }, + "updateWorkerPoolsInParallel": { + "type": "boolean" + } + } + }, + "v1ClusterConfigResponse": { + "type": "object", + "properties": { + "hostClusterConfig": { + "description": "HostClusterConfig defines the configuration entity of host clusters config entity", + "$ref": "#/definitions/v1HostClusterConfigResponse" + } + } + }, + "v1ClusterDefinitionEntity": { + "description": "Cluster definition entity", + "type": "object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectMetaInputEntity" + }, + "spec": { + "$ref": "#/definitions/v1ClusterDefinitionSpecEntity" + } + } + }, + "v1ClusterDefinitionProfileEntity": { + "description": "Cluster definition profile entity", + "type": "object", + "required": [ + "uid" + ], + "properties": { + "packs": { + "description": "Cluster profile packs array", + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1PackValuesEntity" + } + }, + "uid": { + "description": "Cluster profile uid", + "type": "string" + } + } + }, + "v1ClusterDefinitionSpecEntity": { + "description": "Cluster definition spec entity", + "type": "object", + "required": [ + "profiles", + "cloudType" + ], + "properties": { + "cloudType": { + "type": "string" + }, + "profiles": { + "description": "Cluster definition profiles", + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1ClusterDefinitionProfileEntity" + } + } + } + }, + "v1ClusterEdgeInstallerConfig": { + "properties": { + "installerDownloadLinks": { + "additionalProperties": { + "type": "string" + } + } + } + }, + "v1ClusterFeatureActor": { + "description": "Compliance Scan actor", + "properties": { + "actorType": { + "type": "string" + }, + "uid": { + "type": "string" + } + } + }, + "v1ClusterFeatureSchedule": { + "description": "Cluster feature schedule", + "properties": { + "scheduledRunTime": { + "type": "string" + } + } + }, + "v1ClusterFips": { + "properties": { + "mode": { + "$ref": "#/definitions/v1ClusterFipsMode" + } + } + }, + "v1ClusterFipsMode": { + "type": "string", + "default": "none", + "enum": [ + "full", + "none", + "partial", + "unknown" + ] + }, + "v1ClusterGroup": { + "description": "Cluster group information", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/v1ClusterGroupSpec" + }, + "status": { + "$ref": "#/definitions/v1ClusterGroupStatus" + } + } + }, + "v1ClusterGroupClusterRef": { + "description": "Cluster group cluster reference", + "properties": { + "clusterName": { + "type": "string" + }, + "clusterUid": { + "type": "string" + } + } + }, + "v1ClusterGroupClustersConfig": { + "description": "Clusters config of cluster group", + "properties": { + "endpointType": { + "description": "Host cluster endpoint type", + "type": "string", + "enum": [ + "Ingress", + "LoadBalancer" + ] + }, + "hostClustersConfig": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1ClusterGroupHostClusterConfig" + } + }, + "kubernetesDistroType": { + "$ref": "#/definitions/v1ClusterKubernetesDistroType" + }, + "limitConfig": { + "$ref": "#/definitions/v1ClusterGroupLimitConfig" + }, + "values": { + "type": "string" + } + } + }, + "v1ClusterGroupEntity": { + "description": "Cluster group information", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/v1ClusterGroupSpecEntity" + } + } + }, + "v1ClusterGroupHostClusterConfig": { + "properties": { + "clusterUid": { + "type": "string" + }, + "endpointConfig": { + "description": "host cluster endpoint configuration", + "$ref": "#/definitions/v1HostClusterEndpointConfig" + } + } + }, + "v1ClusterGroupHostClusterEntity": { + "description": "Clusters and clusters config of cluster group", + "properties": { + "clusterRefs": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1ClusterGroupClusterRef" + } + }, + "clustersConfig": { + "$ref": "#/definitions/v1ClusterGroupClustersConfig" + } + } + }, + "v1ClusterGroupLimitConfig": { + "description": "Cluster group limit config", + "properties": { + "cpu": { + "description": "Deprecated. Use field cpuMilliCore", + "type": "integer", + "format": "int32" + }, + "cpuMilliCore": { + "description": "CPU in milli cores", + "type": "integer", + "format": "int32" + }, + "memory": { + "description": "Deprecated. Use field memoryMiB", + "type": "integer", + "format": "int32" + }, + "memoryMiB": { + "description": "Memory in MiB", + "type": "integer", + "format": "int32" + }, + "overSubscription": { + "description": "Over subscription percentage", + "type": "integer", + "format": "int32" + }, + "storageGiB": { + "description": "Storage in GiB", + "type": "integer", + "format": "int32" + } + } + }, + "v1ClusterGroupResource": { + "description": "Cluster group resource allocated and usage information", + "properties": { + "allocated": { + "type": "number", + "format": "float64", + "x-omitempty": false + }, + "used": { + "type": "number", + "format": "float64", + "x-omitempty": false + } + } + }, + "v1ClusterGroupSpec": { + "description": "Cluster group specifications", + "properties": { + "clusterProfileTemplates": { + "description": "ClusterProfileTemplate is a copy of the draft version or latest published version of the clusterprofileSpec. It consists of list of add on profiles at a cluster group level which will be enforced on all virtual cluster. ClusterProfileTemplate will be updated from the clusterprofile pointed by ClusterProfileRef", + "type": "array", + "items": { + "$ref": "#/definitions/v1ClusterProfileTemplate" + } + }, + "clusterRefs": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1ClusterGroupClusterRef" + } + }, + "clustersConfig": { + "$ref": "#/definitions/v1ClusterGroupClustersConfig" + }, + "type": { + "type": "string", + "enum": [ + "hostCluster" + ] + } + } + }, + "v1ClusterGroupSpecEntity": { + "description": "Cluster group specifications request entity", + "properties": { + "clusterRefs": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1ClusterGroupClusterRef" + } + }, + "clustersConfig": { + "$ref": "#/definitions/v1ClusterGroupClustersConfig" + }, + "profiles": { + "type": "array", + "items": { + "$ref": "#/definitions/v1SpectroClusterProfileEntity" + } + }, + "type": { + "type": "string", + "enum": [ + "hostCluster" + ] + } + } + }, + "v1ClusterGroupStatus": { + "description": "Cluster group status", + "properties": { + "isActive": { + "type": "boolean", + "x-omitempty": false + } + } + }, + "v1ClusterGroupSummary": { + "description": "Cluster group summay", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/v1ClusterGroupSummarySpec" + } + } + }, + "v1ClusterGroupSummarySpec": { + "description": "Cluster group summay spec", + "properties": { + "clusterProfileTemplates": { + "type": "array", + "items": { + "$ref": "#/definitions/v1ClusterProfileTemplateMeta" + } + }, + "cpu": { + "description": "Deprecated", + "$ref": "#/definitions/v1ClusterGroupResource" + }, + "endpointType": { + "type": "string", + "enum": [ + "Ingress", + "LoadBalancer" + ] + }, + "hostClusters": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1ObjectResReference" + } + }, + "hostClustersCount": { + "type": "integer", + "x-omitempty": false + }, + "memory": { + "description": "Deprecated", + "$ref": "#/definitions/v1ClusterGroupResource" + }, + "scope": { + "type": "string" + }, + "virtualClustersCount": { + "type": "integer", + "x-omitempty": false + } + } + }, + "v1ClusterGroupsDeveloperCreditUsage": { + "description": "Cluster group resource allocated and usage information", + "properties": { + "allocatedCredit": { + "$ref": "#/definitions/v1DeveloperCredit" + }, + "usedCredit": { + "$ref": "#/definitions/v1DeveloperCredit" + } + } + }, + "v1ClusterGroupsHostClusterMetadata": { + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1ObjectScopeEntity" + } + } + } + }, + "v1ClusterGroupsHostClusterSummary": { + "type": "object", + "required": [ + "summaries" + ], + "properties": { + "summaries": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1ClusterGroupSummary" + } + } + } + }, + "v1ClusterHelmChart": { + "description": "Cluster helm chart metadata", + "properties": { + "localName": { + "type": "string" + }, + "matchedRegistries": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1ClusterHelmRegistry" + } + }, + "name": { + "type": "string" + }, + "values": { + "type": "string" + }, + "version": { + "type": "string" + } + } + }, + "v1ClusterHelmCharts": { + "description": "Cluster helm charts metadata", + "properties": { + "charts": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1ClusterHelmChart" + } + } + } + }, + "v1ClusterHelmRegistry": { + "description": "Cluster helm registry information", + "properties": { + "name": { + "type": "string" + }, + "uid": { + "type": "string" + } + } + }, + "v1ClusterImport": { + "type": "object", + "properties": { + "importLink": { + "description": "import link to download and install ally-lite, palette-lite", + "type": "string" + }, + "isBrownfield": { + "description": "Deprecated. Use the 'spec.clusterType'", + "type": "boolean", + "x-omitempty": false + }, + "state": { + "description": "cluster import status", + "type": "string" + } + } + }, + "v1ClusterKubeBenchLogStatus": { + "description": "Cluster compliance scan KubeBench Log Status", + "properties": { + "actor": { + "$ref": "#/definitions/v1ClusterFeatureActor" + }, + "message": { + "type": "string" + }, + "reports": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/v1KubeBenchReport" + } + }, + "requestUid": { + "type": "string" + }, + "scanTime": { + "$ref": "#/definitions/v1ClusterScanTime" + }, + "state": { + "type": "string" + } + } + }, + "v1ClusterKubeHunterLogStatus": { + "description": "Cluster compliance scan KubeHunter Log Status", + "properties": { + "actor": { + "$ref": "#/definitions/v1ClusterFeatureActor" + }, + "message": { + "type": "string" + }, + "reports": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/v1KubeHunterReport" + } + }, + "requestUid": { + "type": "string" + }, + "scanTime": { + "$ref": "#/definitions/v1ClusterScanTime" + }, + "state": { + "type": "string" + } + } + }, + "v1ClusterKubernetesDistroType": { + "type": "string", + "default": "k3s", + "enum": [ + "k3s", + "cncf_k8s" + ] + }, + "v1ClusterLocation": { + "description": "Cluster location information", + "type": "object", + "properties": { + "countryCode": { + "description": "country code for cluster location", + "type": "string" + }, + "countryName": { + "description": "country name for cluster location", + "type": "string" + }, + "geoLoc": { + "$ref": "#/definitions/v1GeolocationLatlong" + }, + "regionCode": { + "description": "region code for cluster location", + "type": "string" + }, + "regionName": { + "description": "region name for cluster location", + "type": "string" + } + } + }, + "v1ClusterLogFetcher": { + "description": "Cluster Log Fetcher", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/v1ClusterLogFetcherSpec" + }, + "status": { + "$ref": "#/definitions/v1ClusterLogFetcherStatus" + } + } + }, + "v1ClusterLogFetcherK8sRequest": { + "description": "Cluster Log Fetcher K8s", + "properties": { + "labelSelector": { + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + } + }, + "namespaces": { + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + } + } + } + }, + "v1ClusterLogFetcherNodeRequest": { + "description": "Cluster Log Fetcher Node Request", + "properties": { + "logs": { + "description": "Array of logs", + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + } + } + } + }, + "v1ClusterLogFetcherRequest": { + "description": "Cluster Log Fetcher Request", + "properties": { + "duration": { + "description": "Duration for which log is requested", + "type": "integer", + "format": "int64", + "default": 10 + }, + "k8s": { + "$ref": "#/definitions/v1ClusterLogFetcherK8sRequest" + }, + "mode": { + "description": "Accepted Values - [\"cluster\", \"app\"]. if \"app\" then logs will be fetched from the virtual cluster", + "type": "string", + "default": "cluster", + "enum": [ + "cluster", + "app" + ] + }, + "noOfLines": { + "description": "No of lines of logs requested", + "type": "integer", + "format": "int64", + "default": 1000 + }, + "node": { + "$ref": "#/definitions/v1ClusterLogFetcherNodeRequest" + } + } + }, + "v1ClusterLogFetcherSpec": { + "description": "Cluster Log Fetcher Spec", + "properties": { + "clusterUid": { + "type": "string" + }, + "log": { + "type": "string" + } + } + }, + "v1ClusterLogFetcherStatus": { + "description": "Cluster Log Fetcher Status", + "properties": { + "state": { + "type": "string" + } + } + }, + "v1ClusterManifest": { + "description": "Cluster manifest information", + "properties": { + "content": { + "type": "string" + }, + "name": { + "type": "string" + }, + "namespace": { + "type": "string" + }, + "type": { + "type": "string" + } + } + }, + "v1ClusterManifests": { + "description": "Cluster manifests information", + "properties": { + "manifests": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1ClusterManifest" + } + } + } + }, + "v1ClusterMetaAttributeEntity": { + "description": "Cluster additional metadata entity", + "type": "object", + "properties": { + "clusterMetaAttribute": { + "type": "string" + } + } + }, + "v1ClusterMetaSpecLocation": { + "description": "Cluster location information", + "type": "object", + "properties": { + "coordinates": { + "type": "array", + "items": { + "type": "number", + "format": "float64" + } + }, + "countryCode": { + "type": "string" + }, + "countryName": { + "type": "string" + }, + "regionCode": { + "type": "string" + }, + "regionName": { + "type": "string" + } + } + }, + "v1ClusterMetaStatusCost": { + "description": "Cluster meta Cost information", + "type": "object", + "properties": { + "total": { + "type": "number", + "format": "float64", + "x-omitempty": false + } + } + }, + "v1ClusterMetaStatusHealth": { + "description": "Cluster meta health information", + "type": "object", + "properties": { + "isHeartBeatFailed": { + "type": "boolean", + "x-omitempty": false + }, + "state": { + "type": "string" + } + } + }, + "v1ClusterMetaStatusUpdates": { + "description": "Cluster meta updates information", + "type": "object", + "properties": { + "isUpdatesPending": { + "type": "boolean", + "x-omitempty": false + } + } + }, + "v1ClusterNamespace": { + "description": "Cluster's namespace", + "properties": { + "namespace": { + "type": "string" + }, + "pvcCount": { + "type": "number", + "format": "int32" + } + } + }, + "v1ClusterNamespaceResource": { + "description": "Cluster Namespace resource defintion", + "type": "object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/v1ClusterNamespaceSpec" + }, + "status": { + "$ref": "#/definitions/v1ClusterNamespaceStatus" + } + } + }, + "v1ClusterNamespaceResourceAllocation": { + "description": "Cluster namespace resource allocation", + "properties": { + "cpuCores": { + "type": "number", + "minimum": 0, + "exclusiveMinimum": true + }, + "memoryMiB": { + "type": "number", + "minimum": 0, + "exclusiveMinimum": true + } + } + }, + "v1ClusterNamespaceResourceInputEntity": { + "description": "Cluster Namespace resource defintion", + "type": "object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectMetaUpdateEntity" + }, + "spec": { + "$ref": "#/definitions/v1ClusterNamespaceSpec" + } + } + }, + "v1ClusterNamespaceResources": { + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1ClusterNamespaceResource" + } + } + } + }, + "v1ClusterNamespaceResourcesUpdateEntity": { + "type": "object", + "properties": { + "namespaces": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1ClusterNamespaceResourceInputEntity" + } + } + } + }, + "v1ClusterNamespaceSpec": { + "description": "Cluster namespace spec", + "properties": { + "isRegex": { + "type": "boolean", + "x-omitempty": false + }, + "relatedObject": { + "$ref": "#/definitions/v1RelatedObject" + }, + "resourceAllocation": { + "$ref": "#/definitions/v1ClusterNamespaceResourceAllocation" + } + } + }, + "v1ClusterNamespaceStatus": { + "description": "Cluster namespace status", + "properties": { + "errors": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1ClusterResourceError" + } + } + } + }, + "v1ClusterNamespaces": { + "description": "Cluster's available namespaces", + "properties": { + "namespaces": { + "type": "array", + "items": { + "$ref": "#/definitions/v1ClusterNamespace" + } + } + } + }, + "v1ClusterNotificationStatus": { + "description": "Cluster notifications status", + "properties": { + "isAvailable": { + "type": "boolean", + "x-omitempty": false + } + } + }, + "v1ClusterNotificationUpdateEntity": { + "description": "Cluster input for notification update", + "type": "object", + "properties": { + "profiles": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1ClusterProfileNotificationUpdateEntity" + } + }, + "spcApplySettings": { + "$ref": "#/definitions/v1SpcApplySettings" + } + } + }, + "v1ClusterPackManifestStatus": { + "type": "object", + "properties": { + "condition": { + "$ref": "#/definitions/v1ClusterCondition" + }, + "name": { + "type": "string" + }, + "uid": { + "type": "string" + } + } + }, + "v1ClusterPackStatus": { + "type": "object", + "properties": { + "condition": { + "$ref": "#/definitions/v1ClusterCondition" + }, + "endTime": { + "$ref": "#/definitions/v1Time" + }, + "manifests": { + "type": "array", + "items": { + "$ref": "#/definitions/v1ClusterPackManifestStatus" + } + }, + "name": { + "type": "string" + }, + "profileUid": { + "type": "string" + }, + "services": { + "type": "array", + "items": { + "$ref": "#/definitions/v1LoadBalancerService" + } + }, + "startTime": { + "$ref": "#/definitions/v1Time" + }, + "type": { + "type": "string" + }, + "version": { + "type": "string" + } + } + }, + "v1ClusterProfile": { + "description": "ClusterProfile is the Schema for the clusterprofiles API", + "type": "object", + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + "type": "string" + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/v1ClusterProfileSpec" + }, + "status": { + "$ref": "#/definitions/v1ClusterProfileStatus" + } + } + }, + "v1ClusterProfileCloneEntity": { + "description": "Cluster profile clone request payload", + "type": "object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ClusterProfileCloneMetaInputEntity" + } + } + }, + "v1ClusterProfileCloneMetaInputEntity": { + "description": "Cluster profile clone metadata", + "type": "object", + "required": [ + "name" + ], + "properties": { + "name": { + "description": "Cloned cluster profile name", + "type": "string" + }, + "target": { + "$ref": "#/definitions/v1ClusterProfileCloneTarget" + }, + "version": { + "description": "Cloned cluster profile version", + "type": "string" + } + } + }, + "v1ClusterProfileCloneTarget": { + "description": "Cluster profile clone meta input entity", + "type": "object", + "required": [ + "scope" + ], + "properties": { + "projectUid": { + "description": "Cloned cluster profile project uid", + "type": "string" + }, + "scope": { + "$ref": "#/definitions/v1Scope" + } + } + }, + "v1ClusterProfileEntity": { + "description": "Cluster profile request payload", + "type": "object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "type": "object", + "properties": { + "template": { + "$ref": "#/definitions/v1ClusterProfileTemplateDraft" + }, + "variables": { + "description": "List of unique variable fields defined for a cluster profile with schema constraints", + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1Variable" + } + }, + "version": { + "description": "Cluster profile version", + "type": "string" + } + } + } + } + }, + "v1ClusterProfileFilterSpec": { + "description": "Cluster profile filter spec", + "properties": { + "environment": { + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + } + }, + "fips": { + "$ref": "#/definitions/v1ClusterFipsMode" + }, + "profileName": { + "$ref": "#/definitions/v1FilterString" + }, + "profileType": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1ProfileType" + } + }, + "scope": { + "$ref": "#/definitions/v1ClusterProfileScope" + }, + "tags": { + "$ref": "#/definitions/v1FilterArray" + }, + "version": { + "$ref": "#/definitions/v1FilterVersionString" + } + } + }, + "v1ClusterProfileFips": { + "description": "Cluster profile fips compliance status", + "properties": { + "mode": { + "$ref": "#/definitions/v1ClusterFipsMode" + } + } + }, + "v1ClusterProfileImportEntity": { + "description": "Cluster profile import request payload", + "type": "object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ClusterProfileMetadataImportEntity" + }, + "spec": { + "$ref": "#/definitions/v1ClusterProfileSpecImportEntity" + } + } + }, + "v1ClusterProfileMetadata": { + "description": "Cluster profile filter spec", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectEntity" + }, + "spec": { + "properties": { + "cloudType": { + "type": "string" + }, + "version": { + "type": "string" + } + } + } + } + }, + "v1ClusterProfileMetadataImportEntity": { + "description": "Cluster profile import metadata", + "type": "object", + "properties": { + "description": { + "description": "Cluster profile description", + "type": "string" + }, + "labels": { + "description": "Cluster profile labels", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "name": { + "description": "Cluster profile name", + "type": "string" + } + } + }, + "v1ClusterProfileNotificationUpdateEntity": { + "description": "Cluster profile notification update request payload", + "type": "object", + "properties": { + "packs": { + "description": "Cluster profile packs array", + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1PackManifestUpdateEntity" + } + }, + "uid": { + "description": "Cluster profile uid", + "type": "string" + } + } + }, + "v1ClusterProfilePackConfigList": { + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": { + "description": "Cluster profile packs array", + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1PackConfig" + } + } + } + }, + "v1ClusterProfilePackManifests": { + "description": "Cluster profile pack manifests", + "type": "object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/v1PackManifestsSpec" + }, + "status": { + "$ref": "#/definitions/v1PackSummaryStatus" + } + } + }, + "v1ClusterProfilePackSummary": { + "description": "Cluster profile packs summary about the deprecated, disabled, deleted packs count", + "type": "object", + "properties": { + "deleted": { + "description": "Total count of deleted packs in a cluster profile", + "type": "number", + "x-omitempty": false + }, + "deprecated": { + "description": "Total count of deprecated packs in a cluster profile", + "type": "number", + "x-omitempty": false + }, + "disabled": { + "description": "Total count of disabled packs in a cluster profile", + "type": "number", + "x-omitempty": false + } + } + }, + "v1ClusterProfilePacksEntities": { + "description": "List of cluster profile packs", + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": { + "description": "Cluster profile packs array", + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1ClusterProfilePacksEntity" + } + } + } + }, + "v1ClusterProfilePacksEntity": { + "description": "Cluster profile packs object", + "type": "object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/v1PackSummarySpec" + }, + "status": { + "$ref": "#/definitions/v1PackSummaryStatus" + } + } + }, + "v1ClusterProfilePacksManifests": { + "description": "Cluster profile pack manifests", + "type": "object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "type": "object", + "properties": { + "packs": { + "description": "Cluster profile packs array", + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1ClusterProfilePackManifests" + } + } + } + } + } + }, + "v1ClusterProfileScope": { + "type": "string", + "enum": [ + "system", + "tenant", + "project" + ] + }, + "v1ClusterProfileSortFields": { + "type": "string", + "enum": [ + "profileName", + "environment", + "profileType", + "creationTimestamp", + "lastModifiedTimestamp" + ], + "x-nullable": true + }, + "v1ClusterProfileSortSpec": { + "properties": { + "field": { + "$ref": "#/definitions/v1ClusterProfileSortFields" + }, + "order": { + "$ref": "#/definitions/v1SortOrder" + } + } + }, + "v1ClusterProfileSpec": { + "description": "ClusterProfileTemplate can be in draft mode, or published mode User only see the latest published template, and (or) the draft template User can apply either the draft version or the latest published version to a cluster when user create a draft version, just copy the Published template, increment the version, and keep changing the draft template without increment the draft version when user publish a draft, the version is fixed, and won't be able to make any modification on published template For each clusterprofile that has a published version, there will be a ClusterProfileArchive automatically created when user publish a draft, the published version will also be copied over to the corresponding ClusterProfileArchive it is just in case in the future for whatever reason we may want to expose earlier versions", + "type": "object", + "properties": { + "draft": { + "$ref": "#/definitions/v1ClusterProfileTemplate" + }, + "published": { + "$ref": "#/definitions/v1ClusterProfileTemplate" + }, + "version": { + "type": "string" + }, + "versions": { + "description": "Cluster profile's list of all the versions", + "type": "array", + "items": { + "$ref": "#/definitions/v1ClusterProfileVersion" + } + } + } + }, + "v1ClusterProfileSpecEntity": { + "description": "Cluster profile update spec", + "type": "object", + "properties": { + "version": { + "description": "Cluster profile version", + "type": "string" + } + } + }, + "v1ClusterProfileSpecImportEntity": { + "description": "Cluster profile import spec", + "type": "object", + "properties": { + "template": { + "$ref": "#/definitions/v1ClusterProfileTemplateImportEntity" + }, + "variables": { + "description": "List of unique variable fields defined for a cluster profile with schema constraints", + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1Variable" + } + }, + "version": { + "description": "Cluster profile version", + "type": "string" + } + } + }, + "v1ClusterProfileStatus": { + "description": "ClusterProfileStatus defines the observed state of ClusterProfile", + "type": "object", + "properties": { + "hasUserMacros": { + "description": "If it is true then profile pack values has a reference to user defined macros", + "type": "boolean", + "x-omitempty": false + }, + "inUseClusterUids": { + "description": "Deprecated. Use inUseClusters", + "type": "array", + "items": { + "type": "string" + } + }, + "inUseClusters": { + "type": "array", + "items": { + "$ref": "#/definitions/v1ObjectResReference" + } + }, + "isPublished": { + "type": "boolean", + "x-omitempty": false + } + } + }, + "v1ClusterProfileStatusSummary": { + "description": "ClusterProfileStatusSummary defines the observed state of ClusterProfile", + "type": "object", + "properties": { + "fips": { + "$ref": "#/definitions/v1ClusterProfileFips" + }, + "inUseClusterUids": { + "description": "Deprecated. Use inUseClusters", + "type": "array", + "items": { + "type": "string" + } + }, + "inUseClusters": { + "type": "array", + "items": { + "$ref": "#/definitions/v1ObjectEntity" + } + }, + "isPublished": { + "type": "boolean", + "x-omitempty": false + }, + "pack": { + "$ref": "#/definitions/v1ClusterProfilePackSummary" + } + } + }, + "v1ClusterProfileSummary": { + "description": "Cluster profile summary", + "type": "object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "specSummary": { + "description": "Cluster profile spec summary", + "type": "object", + "properties": { + "draft": { + "$ref": "#/definitions/v1ClusterProfileTemplateSummary" + }, + "published": { + "$ref": "#/definitions/v1ClusterProfileTemplateSummary" + }, + "version": { + "description": "Cluster profile's latest version", + "type": "string" + }, + "versions": { + "description": "Cluster profile's list of all the versions", + "type": "array", + "items": { + "$ref": "#/definitions/v1ClusterProfileVersion" + } + } + } + }, + "status": { + "$ref": "#/definitions/v1ClusterProfileStatusSummary" + } + } + }, + "v1ClusterProfileTemplate": { + "description": "ClusterProfileTemplate contains details of a clusterprofile definition", + "type": "object", + "properties": { + "cloudType": { + "type": "string" + }, + "name": { + "type": "string" + }, + "packServerRefs": { + "description": "PackServerRefs is only used on Hubble side it is reference to pack registry servers which PackRef belongs to in hubble, pack server is a top level object, so use a reference to point to it packs within a clusterprofile can come from different pack servers, so this is an array", + "type": "array", + "items": { + "$ref": "#/definitions/v1ObjectReference" + } + }, + "packServerSecret": { + "description": "This secret is used only on Palette side use case is similar to k8s image pull secret this single secret internally should contains all the pack servers in PackServerRefs if empty, means no credential is needed to access the pack server For spectro saas, Ally will set this field before pass to palette", + "type": "string" + }, + "packs": { + "description": "Packs definitions here are final definitions. If ClonedFrom and ParamsOverwrite is present, then Packs are the final merge result of ClonedFrom and ParamsOverwrite So orchestration engine will just take the Packs and do the work, no need to worry about parameters merge", + "type": "array", + "items": { + "$ref": "#/definitions/v1PackRef" + } + }, + "profileVersion": { + "description": "version start from 1.0.0, matching the index of ClusterProfileSpec.Versions[] will be used by clusterSpec to identify which version is applied to the cluster", + "type": "string" + }, + "relatedObject": { + "description": "RelatedObject refers to the type of object(clustergroup, cluster or edgeHost) the cluster profile is associated with", + "$ref": "#/definitions/v1ObjectReference" + }, + "type": { + "type": "string" + }, + "uid": { + "type": "string" + }, + "version": { + "description": "Deprecated. Use profileVersion", + "type": "integer", + "format": "int32" + } + } + }, + "v1ClusterProfileTemplateDraft": { + "description": "Cluster profile template spec", + "type": "object", + "properties": { + "cloudType": { + "type": "string" + }, + "packs": { + "description": "Cluster profile packs array", + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1PackManifestEntity" + } + }, + "type": { + "$ref": "#/definitions/v1ProfileType" + } + } + }, + "v1ClusterProfileTemplateImportEntity": { + "description": "Cluster profile import template", + "type": "object", + "properties": { + "cloudType": { + "description": "Cluster profile cloud type", + "type": "string" + }, + "packs": { + "description": "Cluster profile packs array", + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1PackImportEntity" + } + }, + "type": { + "description": "Cluster profile type [ \"cluster\", \"infra\", \"add-on\", \"system\" ]", + "type": "string" + } + } + }, + "v1ClusterProfileTemplateMeta": { + "description": "Cluster profile template meta information", + "type": "object", + "properties": { + "cloudType": { + "type": "string" + }, + "name": { + "description": "Cluster profile name", + "type": "string" + }, + "packs": { + "description": "Cluster profile packs array", + "type": "array", + "items": { + "$ref": "#/definitions/v1PackRef" + } + }, + "scope": { + "description": "scope or context(system, tenant or project)", + "type": "string" + }, + "type": { + "description": "Cluster profile type [ \"cluster\", \"infra\", \"add-on\", \"system\" ]", + "type": "string" + }, + "uid": { + "description": "Cluster profile uid", + "type": "string" + }, + "version": { + "type": "integer", + "format": "int32" + } + } + }, + "v1ClusterProfileTemplateSummary": { + "description": "Cluster profile template summary", + "type": "object", + "properties": { + "cloudType": { + "type": "string" + }, + "packs": { + "type": "array", + "items": { + "$ref": "#/definitions/v1PackRefSummary" + } + }, + "type": { + "type": "string" + } + } + }, + "v1ClusterProfileTemplateUpdate": { + "description": "Cluster profile template update spec", + "type": "object", + "properties": { + "packs": { + "description": "Cluster profile packs array", + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1PackManifestUpdateEntity" + } + }, + "type": { + "$ref": "#/definitions/v1ProfileType" + } + } + }, + "v1ClusterProfileUpdateEntity": { + "description": "Cluster profile update request payload", + "type": "object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "description": "Cluster profile update spec", + "type": "object", + "properties": { + "template": { + "$ref": "#/definitions/v1ClusterProfileTemplateUpdate" + }, + "version": { + "description": "Cluster profile version", + "type": "string" + } + } + } + } + }, + "v1ClusterProfileValidatorResponse": { + "description": "Cluster profile validator response", + "type": "object", + "properties": { + "packs": { + "$ref": "#/definitions/v1ConstraintValidatorResponse" + } + } + }, + "v1ClusterProfileVersion": { + "description": "Cluster profile with version", + "properties": { + "uid": { + "type": "string" + }, + "version": { + "type": "string" + } + } + }, + "v1ClusterProfilesFilterSpec": { + "description": "Spectro cluster filter summary spec", + "properties": { + "filter": { + "$ref": "#/definitions/v1ClusterProfileFilterSpec" + }, + "sort": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1ClusterProfileSortSpec" + } + } + } + }, + "v1ClusterProfilesMetadata": { + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1ClusterProfileMetadata" + } + } + } + }, + "v1ClusterProfilesSummary": { + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1ClusterProfileSummary" + } + }, + "listmeta": { + "$ref": "#/definitions/v1ListMetaData" + } + } + }, + "v1ClusterProxySpec": { + "description": "cluster proxy config spec", + "type": "object", + "properties": { + "caContainerMountPath": { + "description": "Location to mount Proxy CA cert inside container", + "type": "string" + }, + "caHostPath": { + "description": "Location for Proxy CA cert on host nodes", + "type": "string" + }, + "httpProxy": { + "description": "URL for HTTP requests unless overridden by NoProxy", + "type": "string" + }, + "httpsProxy": { + "description": "HTTPS requests unless overridden by NoProxy", + "type": "string" + }, + "noProxy": { + "description": "NoProxy represents the NO_PROXY or no_proxy environment", + "type": "string" + } + } + }, + "v1ClusterRbac": { + "description": "Cluster RBAC role binding defintion", + "type": "object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/v1ClusterRbacSpec" + }, + "status": { + "$ref": "#/definitions/v1ClusterRbacStatus" + } + } + }, + "v1ClusterRbacBinding": { + "description": "Cluster RBAC binding", + "type": "object", + "properties": { + "namespace": { + "type": "string" + }, + "role": { + "$ref": "#/definitions/v1ClusterRoleRef" + }, + "subjects": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1ClusterRbacSubjects" + } + }, + "type": { + "type": "string", + "enum": [ + "RoleBinding", + "ClusterRoleBinding" + ] + } + } + }, + "v1ClusterRbacInputEntity": { + "description": "Cluster RBAC role binding defintion", + "type": "object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectMetaUpdateEntity" + }, + "spec": { + "$ref": "#/definitions/v1ClusterRbacSpec" + } + } + }, + "v1ClusterRbacResourcesUpdateEntity": { + "type": "object", + "properties": { + "rbacs": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1ClusterRbacInputEntity" + } + } + } + }, + "v1ClusterRbacSpec": { + "description": "Cluster RBAC spec", + "type": "object", + "properties": { + "bindings": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1ClusterRbacBinding" + } + }, + "relatedObject": { + "$ref": "#/definitions/v1RelatedObject" + } + } + }, + "v1ClusterRbacStatus": { + "description": "Cluster rbac status", + "properties": { + "errors": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1ClusterResourceError" + } + } + } + }, + "v1ClusterRbacSubjects": { + "description": "Cluster role ref", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "namespace": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "User", + "Group", + "ServiceAccount" + ] + } + } + }, + "v1ClusterRbacs": { + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1ClusterRbac" + } + } + } + }, + "v1ClusterRefs": { + "description": "Cluster Object References", + "properties": { + "clusters": { + "type": "array", + "items": { + "$ref": "#/definitions/v1ObjectReference" + } + } + } + }, + "v1ClusterRepaveSource": { + "type": "string", + "enum": [ + "user", + "hubble", + "palette", + "stylus" + ] + }, + "v1ClusterRepaveState": { + "type": "string", + "default": "Pending", + "enum": [ + "Pending", + "Approved", + "Reverted" + ] + }, + "v1ClusterRepaveStatus": { + "description": "Cluster repave status", + "properties": { + "state": { + "$ref": "#/definitions/v1ClusterRepaveState" + } + } + }, + "v1ClusterResourceAllocation": { + "description": "Workspace resource allocation", + "properties": { + "clusterUid": { + "type": "string" + }, + "resourceAllocation": { + "$ref": "#/definitions/v1WorkspaceResourceAllocation" + } + } + }, + "v1ClusterResourceError": { + "description": "Cluster resource error", + "properties": { + "msg": { + "type": "string" + }, + "name": { + "type": "string" + }, + "resourceType": { + "type": "string" + } + } + }, + "v1ClusterResources": { + "type": "object", + "properties": { + "namespaces": { + "description": "Cluster namespaces", + "type": "array", + "items": { + "$ref": "#/definitions/v1ResourceReference" + } + }, + "rbacs": { + "description": "Cluster RBAC role bindings", + "type": "array", + "items": { + "$ref": "#/definitions/v1ResourceReference" + } + } + } + }, + "v1ClusterResourcesEntity": { + "type": "object", + "properties": { + "namespaces": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1ClusterNamespaceResourceInputEntity" + } + }, + "rbacs": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1ClusterRbacInputEntity" + } + } + } + }, + "v1ClusterRestore": { + "description": "Cluster Restore", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/v1ClusterRestoreSpec" + }, + "status": { + "$ref": "#/definitions/v1ClusterRestoreStatus" + } + } + }, + "v1ClusterRestoreConfig": { + "description": "Cluster restore config", + "required": [ + "backupRequestUid", + "backupName", + "destinationClusterUid" + ], + "properties": { + "backupName": { + "type": "string" + }, + "backupRequestUid": { + "type": "string" + }, + "destinationClusterUid": { + "type": "string" + }, + "includeClusterResources": { + "type": "boolean" + }, + "includeNamespaces": { + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + } + }, + "preserveNodePorts": { + "type": "boolean" + }, + "restorePVs": { + "type": "boolean" + } + } + }, + "v1ClusterRestoreSpec": { + "description": "Cluster Restore Spec", + "properties": { + "clusterUid": { + "type": "string" + } + } + }, + "v1ClusterRestoreStatus": { + "description": "Cluster Restore Status", + "properties": { + "clusterRestoreStatuses": { + "type": "array", + "items": { + "$ref": "#/definitions/v1ClusterRestoreStatusMeta" + } + } + } + }, + "v1ClusterRestoreStatusMeta": { + "description": "Cluster Restore Status Meta", + "properties": { + "actor": { + "$ref": "#/definitions/v1ClusterFeatureActor" + }, + "backupName": { + "type": "string" + }, + "backupRequestUid": { + "type": "string" + }, + "restoreRequestUid": { + "type": "string" + }, + "restoreStatusMeta": { + "$ref": "#/definitions/v1RestoreStatusMeta" + }, + "sourceClusterRef": { + "$ref": "#/definitions/v1ResourceReference" + }, + "state": { + "type": "string" + } + } + }, + "v1ClusterRoleRef": { + "description": "Cluster role ref", + "type": "object", + "properties": { + "kind": { + "type": "string", + "enum": [ + "Role", + "ClusterRole" + ] + }, + "name": { + "type": "string" + } + } + }, + "v1ClusterScanLogKubeBench": { + "description": "Cluster compliance scan KubeBench Log", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/v1ClusterComplianceScanLogSpec" + }, + "status": { + "$ref": "#/definitions/v1ClusterKubeBenchLogStatus" + } + } + }, + "v1ClusterScanLogKubeHunter": { + "description": "Cluster compliance scan KubeHunter Log", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/v1ClusterComplianceScanLogSpec" + }, + "status": { + "$ref": "#/definitions/v1ClusterKubeHunterLogStatus" + } + } + }, + "v1ClusterScanLogSonobuoy": { + "description": "Cluster compliance scan Sonobuoy Log", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/v1ClusterComplianceScanLogSpec" + }, + "status": { + "$ref": "#/definitions/v1ClusterSonobuoyLogStatus" + } + } + }, + "v1ClusterScanLogSyft": { + "description": "Cluster Compliance Scan Syft Log", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/v1ClusterComplianceScanLogSpec" + }, + "status": { + "$ref": "#/definitions/v1ClusterSyftLogStatus" + } + } + }, + "v1ClusterScanTime": { + "description": "Cluster compliance scan Time", + "properties": { + "endTime": { + "$ref": "#/definitions/v1Time" + }, + "startTime": { + "$ref": "#/definitions/v1Time" + } + } + }, + "v1ClusterSearchInputSpec": { + "properties": { + "inputs": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/v1ClusterSearchInputSpecProperty" + } + } + } + }, + "v1ClusterSearchInputSpecProperty": { + "properties": { + "values": { + "type": "array", + "items": { + "$ref": "#/definitions/v1ObjectEntity" + }, + "x-omitempty": true + } + } + }, + "v1ClusterSonobuoyLogStatus": { + "description": "Cluster compliance scan Sonobuoy Log Status", + "properties": { + "actor": { + "$ref": "#/definitions/v1ClusterFeatureActor" + }, + "message": { + "type": "string" + }, + "reports": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/v1SonobuoyReport" + } + }, + "requestUid": { + "type": "string" + }, + "scanTime": { + "$ref": "#/definitions/v1ClusterScanTime" + }, + "state": { + "type": "string" + } + } + }, + "v1ClusterSyftLogStatus": { + "description": "Cluster compliance scan Syft Log Status", + "properties": { + "actor": { + "$ref": "#/definitions/v1ClusterFeatureActor" + }, + "location": { + "$ref": "#/definitions/v1ObjectEntity" + }, + "message": { + "type": "string" + }, + "reports": { + "type": "array", + "items": { + "$ref": "#/definitions/v1SyftReport" + } + }, + "requestUid": { + "type": "string" + }, + "scanContext": { + "$ref": "#/definitions/v1SyftScanContext" + }, + "scanTime": { + "$ref": "#/definitions/v1ClusterScanTime" + }, + "state": { + "type": "string" + } + } + }, + "v1ClusterType": { + "type": "string", + "default": "PureManage", + "enum": [ + "PureManage", + "PureAttach" + ] + }, + "v1ClusterUpgradeSettingsEntity": { + "properties": { + "spectroComponents": { + "type": "string", + "enum": [ + "lock", + "unlock" + ] + } + } + }, + "v1ClusterUsageSummary": { + "description": "Cluster usage summary", + "type": "object", + "properties": { + "cpuCores": { + "type": "number", + "x-omitempty": false + }, + "isAlloy": { + "type": "boolean", + "x-omitempty": false + }, + "name": { + "type": "string" + }, + "uid": { + "type": "string" + } + } + }, + "v1ClusterVirtualMachine": { + "description": "VirtualMachine handles the VirtualMachines that are not running\nor are in a stopped state\nThe VirtualMachine contains the template to create the\nVirtualMachineInstance. It also mirrors the running state of the created\nVirtualMachineInstance in its status.", + "required": [ + "spec" + ], + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values.", + "type": "string" + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase.", + "type": "string" + }, + "metadata": { + "$ref": "#/definitions/v1VmObjectMeta" + }, + "spec": { + "$ref": "#/definitions/v1ClusterVirtualMachineSpec" + }, + "status": { + "$ref": "#/definitions/v1ClusterVirtualMachineStatus" + } + } + }, + "v1ClusterVirtualMachineList": { + "description": "VirtualMachineList is a list of virtual machines", + "type": "object", + "required": [ + "items" + ], + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values.", + "type": "string" + }, + "items": { + "type": "array", + "items": { + "$ref": "#/definitions/v1ClusterVirtualMachine" + } + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "$ref": "#/definitions/v1VmListMeta" + } + } + }, + "v1ClusterVirtualMachineSpec": { + "description": "VirtualMachineSpec describes how the proper VirtualMachine should look like", + "type": "object", + "required": [ + "template" + ], + "properties": { + "dataVolumeTemplates": { + "description": "dataVolumeTemplates is a list of dataVolumes that the VirtualMachineInstance template can reference. DataVolumes in this list are dynamically created for the VirtualMachine and are tied to the VirtualMachine's life-cycle.", + "type": "array", + "items": { + "$ref": "#/definitions/v1VmDataVolumeTemplateSpec" + } + }, + "instancetype": { + "$ref": "#/definitions/v1VmInstancetypeMatcher" + }, + "preference": { + "$ref": "#/definitions/v1VmPreferenceMatcher" + }, + "runStrategy": { + "description": "Running state indicates the requested running state of the VirtualMachineInstance mutually exclusive with Running", + "type": "string" + }, + "running": { + "description": "Running controls whether the associatied VirtualMachineInstance is created or not Mutually exclusive with RunStrategy", + "type": "boolean" + }, + "template": { + "$ref": "#/definitions/v1VmVirtualMachineInstanceTemplateSpec" + } + } + }, + "v1ClusterVirtualMachineStatus": { + "description": "VirtualMachineStatus represents the status returned by the controller to describe how the VirtualMachine is doing", + "type": "object", + "properties": { + "conditions": { + "description": "Hold the state information of the VirtualMachine and its VirtualMachineInstance", + "type": "array", + "items": { + "$ref": "#/definitions/v1VmVirtualMachineCondition" + } + }, + "created": { + "description": "Created indicates if the virtual machine is created in the cluster", + "type": "boolean" + }, + "memoryDumpRequest": { + "$ref": "#/definitions/v1VmVirtualMachineMemoryDumpRequest" + }, + "printableStatus": { + "description": "PrintableStatus is a human readable, high-level representation of the status of the virtual machine", + "type": "string" + }, + "ready": { + "description": "Ready indicates if the virtual machine is running and ready", + "type": "boolean" + }, + "restoreInProgress": { + "description": "RestoreInProgress is the name of the VirtualMachineRestore currently executing", + "type": "string" + }, + "snapshotInProgress": { + "description": "SnapshotInProgress is the name of the VirtualMachineSnapshot currently executing", + "type": "string" + }, + "startFailure": { + "$ref": "#/definitions/v1VmVirtualMachineStartFailure" + }, + "stateChangeRequests": { + "description": "StateChangeRequests indicates a list of actions that should be taken on a VMI e.g. stop a specific VMI then start a new one.", + "type": "array", + "items": { + "$ref": "#/definitions/v1VmVirtualMachineStateChangeRequest" + } + }, + "volumeRequests": { + "description": "VolumeRequests indicates a list of volumes add or remove from the VMI template and hotplug on an active running VMI.", + "type": "array", + "items": { + "$ref": "#/definitions/v1VmVirtualMachineVolumeRequest" + }, + "x-kubernetes-list-type": "atomic" + }, + "volumeSnapshotStatuses": { + "description": "VolumeSnapshotStatuses indicates a list of statuses whether snapshotting is supported by each volume.", + "type": "array", + "items": { + "$ref": "#/definitions/v1VmVolumeSnapshotStatus" + } + } + }, + "x-nullable": true + }, + "v1ClusterVirtualPacksValue": { + "description": "Virtual cluster packs value", + "type": "object", + "properties": { + "distroType": { + "type": "string" + }, + "layer": { + "type": "string" + }, + "values": { + "type": "string" + } + } + }, + "v1ClusterVirtualPacksValues": { + "description": "Virtual cluster packs values", + "type": "object", + "properties": { + "packs": { + "type": "array", + "items": { + "$ref": "#/definitions/v1ClusterVirtualPacksValue" + } + } + } + }, + "v1ClusterWorkload": { + "description": "Cluster workload summary", + "type": "object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectMetaInputEntity" + }, + "spec": { + "$ref": "#/definitions/v1ClusterWorkloadSpec" + } + } + }, + "v1ClusterWorkloadCondition": { + "description": "Cluster workload condition", + "type": "object", + "properties": { + "lastTransitionTime": { + "$ref": "#/definitions/v1Time" + }, + "lastUpdateTime": { + "$ref": "#/definitions/v1Time" + }, + "message": { + "type": "string" + }, + "reason": { + "type": "string" + }, + "status": { + "type": "string" + }, + "type": { + "type": "string" + } + } + }, + "v1ClusterWorkloadCronJob": { + "description": "Cluster workload cronjob summary", + "type": "object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ClusterWorkloadMetadata" + }, + "spec": { + "$ref": "#/definitions/v1ClusterWorkloadCronJobSpec" + }, + "status": { + "$ref": "#/definitions/v1ClusterWorkloadCronJobStatus" + } + } + }, + "v1ClusterWorkloadCronJobSpec": { + "description": "Cluster workload cronjob spec", + "type": "object", + "properties": { + "schedule": { + "type": "string" + } + } + }, + "v1ClusterWorkloadCronJobStatus": { + "description": "Cluster workload cronjob status", + "type": "object", + "properties": { + "lastScheduleTime": { + "$ref": "#/definitions/v1Time" + } + } + }, + "v1ClusterWorkloadCronJobs": { + "description": "Cluster workload cronjobs summary", + "type": "object", + "properties": { + "cronJobs": { + "type": "array", + "items": { + "$ref": "#/definitions/v1ClusterWorkloadCronJob" + } + } + } + }, + "v1ClusterWorkloadDaemonSet": { + "description": "Cluster workload daemonset summary", + "type": "object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ClusterWorkloadMetadata" + }, + "status": { + "$ref": "#/definitions/v1ClusterWorkloadDaemonSetStatus" + } + } + }, + "v1ClusterWorkloadDaemonSetStatus": { + "description": "Cluster workload daemonset status", + "type": "object", + "properties": { + "available": { + "type": "integer", + "format": "int32" + }, + "currentScheduled": { + "type": "integer", + "format": "int32" + }, + "desiredScheduled": { + "type": "integer", + "format": "int32" + }, + "misScheduled": { + "type": "integer", + "format": "int32" + }, + "ready": { + "type": "integer", + "format": "int32" + }, + "updatedScheduled": { + "type": "integer", + "format": "int32" + } + } + }, + "v1ClusterWorkloadDaemonSets": { + "description": "Cluster workload daemonset summary", + "type": "object", + "properties": { + "daemonSets": { + "type": "array", + "items": { + "$ref": "#/definitions/v1ClusterWorkloadDaemonSet" + } + } + } + }, + "v1ClusterWorkloadDeployment": { + "description": "Cluster workload deployment summary", + "type": "object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ClusterWorkloadMetadata" + }, + "status": { + "$ref": "#/definitions/v1ClusterWorkloadDeploymentStatus" + } + } + }, + "v1ClusterWorkloadDeploymentStatus": { + "description": "Cluster workload deployment status", + "type": "object", + "properties": { + "replicas": { + "$ref": "#/definitions/v1ClusterWorkloadReplicaStatus" + } + } + }, + "v1ClusterWorkloadDeployments": { + "description": "Cluster workload deployments summary", + "type": "object", + "properties": { + "deployments": { + "type": "array", + "items": { + "$ref": "#/definitions/v1ClusterWorkloadDeployment" + } + } + } + }, + "v1ClusterWorkloadJob": { + "description": "Cluster workload job summary", + "type": "object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ClusterWorkloadMetadata" + }, + "status": { + "$ref": "#/definitions/v1ClusterWorkloadJobStatus" + } + } + }, + "v1ClusterWorkloadJobStatus": { + "description": "Cluster workload job status", + "type": "object", + "properties": { + "completionTime": { + "$ref": "#/definitions/v1Time" + }, + "conditions": { + "type": "array", + "items": { + "$ref": "#/definitions/v1ClusterWorkloadCondition" + } + }, + "startTime": { + "$ref": "#/definitions/v1Time" + }, + "succeeded": { + "type": "integer", + "format": "int32" + } + } + }, + "v1ClusterWorkloadJobs": { + "description": "Cluster workload jobs summary", + "type": "object", + "properties": { + "jobs": { + "type": "array", + "items": { + "$ref": "#/definitions/v1ClusterWorkloadJob" + } + } + } + }, + "v1ClusterWorkloadMetadata": { + "description": "Cluster workload metadata", + "type": "object", + "properties": { + "creationTimestamp": { + "$ref": "#/definitions/v1Time" + }, + "entity": { + "$ref": "#/definitions/v1ClusterWorkloadRef" + }, + "labels": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "namespace": { + "type": "string" + } + } + }, + "v1ClusterWorkloadNamespace": { + "description": "Cluster workload namespace summary", + "type": "object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ClusterWorkloadMetadata" + }, + "status": { + "$ref": "#/definitions/v1ClusterWorkloadNamespaceStatus" + } + } + }, + "v1ClusterWorkloadNamespaceStatus": { + "description": "Cluster workload namespace status", + "type": "object", + "properties": { + "phase": { + "type": "string" + } + } + }, + "v1ClusterWorkloadNamespaces": { + "description": "Cluster workload namespaces summary", + "properties": { + "namespaces": { + "type": "array", + "items": { + "$ref": "#/definitions/v1ClusterWorkloadNamespace" + } + } + } + }, + "v1ClusterWorkloadPod": { + "description": "Cluster workload pod summary", + "type": "object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ClusterWorkloadPodMetadata" + }, + "spec": { + "$ref": "#/definitions/v1ClusterWorkloadPodSpec" + }, + "status": { + "$ref": "#/definitions/v1ClusterWorkloadPodStatus" + } + } + }, + "v1ClusterWorkloadPodContainer": { + "description": "Cluster workload pod container", + "type": "object", + "properties": { + "image": { + "type": "string" + }, + "name": { + "type": "string" + }, + "resources": { + "$ref": "#/definitions/v1ClusterWorkloadPodContainerResources" + } + } + }, + "v1ClusterWorkloadPodContainerResource": { + "description": "Cluster workload pod container resource", + "type": "object", + "properties": { + "cpu": { + "type": "integer", + "format": "int32", + "x-omitempty": false + }, + "cpuUnit": { + "type": "string" + }, + "memory": { + "type": "integer", + "format": "int64", + "x-omitempty": false + }, + "memoryUnit": { + "type": "string" + } + } + }, + "v1ClusterWorkloadPodContainerResources": { + "description": "Cluster workload pod container resources", + "type": "object", + "properties": { + "limits": { + "$ref": "#/definitions/v1ClusterWorkloadPodContainerResource" + }, + "requests": { + "$ref": "#/definitions/v1ClusterWorkloadPodContainerResource" + } + } + }, + "v1ClusterWorkloadPodContainerState": { + "description": "Cluster workload pod container state", + "type": "object", + "properties": { + "exitCode": { + "type": "integer", + "format": "int32", + "x-omitempty": false + }, + "finishedAt": { + "$ref": "#/definitions/v1Time" + }, + "reason": { + "type": "string" + }, + "startedAt": { + "$ref": "#/definitions/v1Time" + }, + "state": { + "type": "string" + } + } + }, + "v1ClusterWorkloadPodContainerStatus": { + "description": "Cluster workload pod container status", + "type": "object", + "properties": { + "image": { + "type": "string" + }, + "name": { + "type": "string" + }, + "ready": { + "type": "boolean", + "x-omitempty": false + }, + "restartCount": { + "type": "integer", + "format": "int32", + "x-omitempty": false + }, + "started": { + "type": "boolean", + "x-omitempty": false + }, + "state": { + "$ref": "#/definitions/v1ClusterWorkloadPodContainerState" + } + } + }, + "v1ClusterWorkloadPodMetadata": { + "description": "Cluster workload pod metadata", + "type": "object", + "properties": { + "associatedRefs": { + "type": "array", + "items": { + "$ref": "#/definitions/v1ClusterWorkloadRef" + } + }, + "creationTimestamp": { + "$ref": "#/definitions/v1Time" + }, + "entity": { + "$ref": "#/definitions/v1ClusterWorkloadRef" + }, + "labels": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "machineUid": { + "type": "string" + }, + "namespace": { + "type": "string" + }, + "nodename": { + "type": "string" + } + } + }, + "v1ClusterWorkloadPodSpec": { + "description": "Cluster workload pod spec", + "type": "object", + "properties": { + "containers": { + "type": "array", + "items": { + "$ref": "#/definitions/v1ClusterWorkloadPodContainer" + } + }, + "volumes": { + "type": "array", + "items": { + "$ref": "#/definitions/v1ClusterWorkloadPodVolume" + } + } + } + }, + "v1ClusterWorkloadPodStatus": { + "description": "Cluster workload pod status", + "type": "object", + "properties": { + "containers": { + "type": "array", + "items": { + "$ref": "#/definitions/v1ClusterWorkloadPodContainerStatus" + } + }, + "phase": { + "type": "string" + }, + "podIp": { + "type": "string" + }, + "qosClass": { + "type": "string" + } + } + }, + "v1ClusterWorkloadPodVolume": { + "description": "Cluster workload pod volume", + "type": "object", + "properties": { + "name": { + "type": "string" + } + } + }, + "v1ClusterWorkloadPods": { + "description": "Cluster workload pods summary", + "properties": { + "pods": { + "type": "array", + "items": { + "$ref": "#/definitions/v1ClusterWorkloadPod" + } + } + } + }, + "v1ClusterWorkloadRef": { + "description": "Cluster workload ref", + "type": "object", + "properties": { + "kind": { + "type": "string" + }, + "name": { + "type": "string" + }, + "uid": { + "type": "string" + } + } + }, + "v1ClusterWorkloadReplicaStatus": { + "description": "Cluster workload replica status", + "type": "object", + "properties": { + "available": { + "type": "integer", + "format": "int32", + "x-omitempty": false + }, + "ready": { + "type": "integer", + "format": "int32", + "x-omitempty": false + }, + "total": { + "type": "integer", + "format": "int32", + "x-omitempty": false + }, + "updated": { + "type": "integer", + "format": "int32", + "x-omitempty": false + } + } + }, + "v1ClusterWorkloadRoleBinding": { + "description": "Cluster workload rbac binding summary", + "type": "object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ClusterWorkloadMetadata" + }, + "spec": { + "$ref": "#/definitions/v1ClusterRbacBinding" + } + } + }, + "v1ClusterWorkloadRoleBindings": { + "description": "Cluster workload rbac bindings summary", + "type": "object", + "properties": { + "bindings": { + "type": "array", + "items": { + "$ref": "#/definitions/v1ClusterWorkloadRoleBinding" + } + } + } + }, + "v1ClusterWorkloadSpec": { + "description": "Cluster workload spec", + "type": "object", + "properties": { + "clusterroleBindings": { + "type": "array", + "items": { + "$ref": "#/definitions/v1ClusterWorkloadRoleBinding" + } + }, + "cronJobs": { + "type": "array", + "items": { + "$ref": "#/definitions/v1ClusterWorkloadCronJob" + } + }, + "daemonSets": { + "type": "array", + "items": { + "$ref": "#/definitions/v1ClusterWorkloadDaemonSet" + } + }, + "deployments": { + "type": "array", + "items": { + "$ref": "#/definitions/v1ClusterWorkloadDeployment" + } + }, + "jobs": { + "type": "array", + "items": { + "$ref": "#/definitions/v1ClusterWorkloadJob" + } + }, + "pods": { + "type": "array", + "items": { + "$ref": "#/definitions/v1ClusterWorkloadPod" + } + }, + "roleBindings": { + "type": "array", + "items": { + "$ref": "#/definitions/v1ClusterWorkloadRoleBinding" + } + }, + "statefulSets": { + "type": "array", + "items": { + "$ref": "#/definitions/v1ClusterWorkloadStatefulSet" + } + } + } + }, + "v1ClusterWorkloadStatefulSet": { + "description": "Cluster workload statefulset summary", + "type": "object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ClusterWorkloadMetadata" + }, + "status": { + "$ref": "#/definitions/v1ClusterWorkloadStatefulSetStatus" + } + } + }, + "v1ClusterWorkloadStatefulSetStatus": { + "description": "Cluster workload statefulset status", + "type": "object", + "properties": { + "replicas": { + "$ref": "#/definitions/v1ClusterWorkloadReplicaStatus" + } + } + }, + "v1ClusterWorkloadStatefulSets": { + "description": "Cluster workload statefulsets summary", + "type": "object", + "properties": { + "statefulSets": { + "type": "array", + "items": { + "$ref": "#/definitions/v1ClusterWorkloadStatefulSet" + } + } + } + }, + "v1ClusterWorkloadsFilter": { + "description": "Cluster workloads filter", + "type": "object", + "properties": { + "namespaces": { + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + } + } + } + }, + "v1ClusterWorkloadsSpec": { + "description": "Cluster workloads spec", + "type": "object", + "properties": { + "filter": { + "$ref": "#/definitions/v1ClusterWorkloadsFilter" + } + } + }, + "v1ComplianceScanConfig": { + "description": "Compliance Scan config", + "properties": { + "schedule": { + "$ref": "#/definitions/v1ClusterFeatureSchedule" + } + } + }, + "v1ComplianceScanDriverSpec": { + "description": "Compliance Scan driver spec", + "properties": { + "config": { + "$ref": "#/definitions/v1ComplianceScanConfig" + }, + "isClusterConfig": { + "type": "boolean" + } + } + }, + "v1ComputeMetrics": { + "description": "Compute metrics", + "type": "object", + "properties": { + "lastUpdatedTime": { + "$ref": "#/definitions/v1Time" + }, + "limit": { + "type": "number", + "x-omitempty": false + }, + "request": { + "type": "number", + "x-omitempty": false + }, + "total": { + "type": "number", + "x-omitempty": false + }, + "unit": { + "type": "string" + }, + "usage": { + "type": "number", + "x-omitempty": false + } + } + }, + "v1ComputeRate": { + "description": "Compute estimated rate information", + "type": "object", + "properties": { + "rate": { + "type": "number", + "format": "float64", + "x-omitempty": false + }, + "type": { + "type": "string" + } + } + }, + "v1ConstraintError": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + } + } + }, + "v1ConstraintValidatorResponse": { + "description": "Constraint validator response", + "type": "object", + "properties": { + "results": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1ConstraintValidatorResult" + } + } + } + }, + "v1ConstraintValidatorResult": { + "description": "Constraint validator result", + "type": "object", + "properties": { + "displayName": { + "type": "string" + }, + "errors": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1ConstraintError" + } + }, + "name": { + "type": "string" + } + } + }, + "v1ControlPlaneEndPoint": { + "type": "object", + "properties": { + "ddnsSearchDomain": { + "description": "DDNSSearchDomain is the search domain used for resolving IP addresses when the EndpointType is DDNS. This search domain is appended to the generated Hostname to obtain the complete DNS name for the endpoint. If Host is already a DDNS FQDN, DDNSSearchDomain is not required", + "type": "string" + }, + "host": { + "description": "IP or FQDN(External/DDNS)", + "type": "string" + }, + "type": { + "description": "VIP or External", + "type": "string", + "enum": [ + "VIP", + "External", + "DDNS" + ] + } + } + }, + "v1ControlPlaneHealthCheckTimeoutEntity": { + "type": "object", + "properties": { + "controlPlaneHealthCheckTimeout": { + "description": "ControlPlaneHealthCheckTimeout is the timeout to check for ready state of the control plane nodes", + "type": "string" + } + } + }, + "v1CustomAccount": { + "description": "Custom account information", + "type": "object", + "properties": { + "apiVersion": { + "description": "Cloud account api version", + "type": "string" + }, + "kind": { + "description": "Cloud account kind", + "type": "string" + }, + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/v1CustomCloudAccount" + }, + "status": { + "$ref": "#/definitions/v1CloudAccountStatus" + } + } + }, + "v1CustomAccountEntity": { + "description": "Custom account information", + "type": "object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectMetaInputEntity" + }, + "spec": { + "$ref": "#/definitions/v1CustomCloudAccount" + } + } + }, + "v1CustomAccounts": { + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1CustomAccount" + } + }, + "listmeta": { + "$ref": "#/definitions/v1ListMetaData" + } + } + }, + "v1CustomCloudAccount": { + "type": "object", + "required": [ + "credentials" + ], + "properties": { + "credentials": { + "description": "Cloud account credentials", + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + }, + "v1CustomCloudClusterConfigEntity": { + "description": "Custom cloud cluster config entity", + "type": "object", + "properties": { + "clusterConfig": { + "$ref": "#/definitions/v1CustomClusterConfig" + } + } + }, + "v1CustomCloudConfig": { + "description": "CustomCloudConfig is the Schema for the custom cloudconfigs API", + "type": "object", + "properties": { + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/v1CustomCloudConfigSpec" + } + } + }, + "v1CustomCloudConfigSpec": { + "description": "CustomCloudConfigSpec defines the cloud configuration input by user This will translate to clusterspec/machinespec for cluster-api", + "type": "object", + "properties": { + "cloudAccountRef": { + "description": "cloudAccountRef should point to the secret which contains CustomCloudAccount", + "$ref": "#/definitions/v1ObjectReference" + }, + "clusterConfig": { + "$ref": "#/definitions/v1CustomClusterConfig" + }, + "machinePoolConfig": { + "type": "array", + "items": { + "$ref": "#/definitions/v1CustomMachinePoolConfig" + } + } + } + }, + "v1CustomCloudMetaEntity": { + "description": "Custom cloud meta entity", + "type": "object", + "properties": { + "metadata": { + "description": "Custom cloud metadata", + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/v1CustomCloudMetaSpecEntity" + } + } + }, + "v1CustomCloudMetaSpecEntity": { + "description": "Custom cloud spec response entity", + "type": "object", + "properties": { + "cloudCategory": { + "$ref": "#/definitions/v1CloudCategory" + }, + "displayName": { + "description": "Custom cloud displayName", + "type": "string" + }, + "isManaged": { + "description": "If the custom cloud is a managed cluster", + "type": "boolean" + }, + "logo": { + "description": "Custom cloud logo", + "type": "string" + } + } + }, + "v1CustomCloudRateConfig": { + "description": "Private cloud rate config", + "properties": { + "cloudType": { + "type": "string" + }, + "rateConfig": { + "$ref": "#/definitions/v1PrivateCloudRateConfig" + } + } + }, + "v1CustomCloudRequestEntity": { + "description": "Custom cloud request entity", + "type": "object", + "properties": { + "metadata": { + "description": "Custom cloud metadata", + "$ref": "#/definitions/v1ObjectMetaInputEntity" + }, + "spec": { + "$ref": "#/definitions/v1CustomCloudSpecEntity" + } + } + }, + "v1CustomCloudSpecEntity": { + "description": "Custom cloud request entity spec", + "type": "object", + "properties": { + "cloudCategory": { + "$ref": "#/definitions/v1CloudCategory" + }, + "displayName": { + "description": "Custom cloud displayName", + "type": "string" + }, + "isControlPlaneManaged": { + "description": "If the custom cloud is a managed cluster", + "type": "boolean" + }, + "logo": { + "description": "Custom cloud logo", + "type": "string" + } + } + }, + "v1CustomCloudType": { + "type": "object", + "properties": { + "cloudCategory": { + "$ref": "#/definitions/v1CloudCategory" + }, + "cloudFamily": { + "description": "Cloud grouping as family", + "type": "string" + }, + "displayName": { + "description": "Custom cloudtype displayName", + "type": "string" + }, + "isCustom": { + "description": "If it is a custom cloudtype", + "type": "boolean", + "x-omitempty": false + }, + "isManaged": { + "description": "If custom cloudtype is managed", + "type": "boolean", + "x-omitempty": false + }, + "isVertex": { + "description": "If cloud is support for Vertex env", + "type": "boolean", + "x-omitempty": false + }, + "logo": { + "description": "Custom cloudtype logo", + "type": "string" + }, + "name": { + "description": "Custom cloudtype name", + "type": "string" + } + } + }, + "v1CustomCloudTypeCloudAccountKeys": { + "description": "Custom cloudType custom cloud account keys", + "type": "object", + "properties": { + "keys": { + "description": "Array of custom cloud type cloud account keys", + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "v1CustomCloudTypeContentResponse": { + "description": "Custom cloudType content response", + "type": "object", + "properties": { + "yaml": { + "description": "custom cloud type content", + "type": "string" + } + } + }, + "v1CustomCloudTypes": { + "description": "Custom cloudType content response", + "type": "object", + "properties": { + "cloudTypes": { + "description": "Array of custom cloud types", + "type": "array", + "items": { + "$ref": "#/definitions/v1CustomCloudType" + } + } + } + }, + "v1CustomClusterConfig": { + "description": "Cluster level configuration for Custom cloud and applicable for all the machine pools", + "type": "object", + "required": [ + "values" + ], + "properties": { + "values": { + "description": "YAML string for Cluster and CloudCluster", + "type": "string" + } + } + }, + "v1CustomClusterConfigEntity": { + "type": "object", + "properties": { + "location": { + "$ref": "#/definitions/v1ClusterLocation" + }, + "machineManagementConfig": { + "$ref": "#/definitions/v1MachineManagementConfig" + }, + "resources": { + "$ref": "#/definitions/v1ClusterResourcesEntity" + } + } + }, + "v1CustomInstanceType": { + "type": "object", + "properties": { + "diskGiB": { + "description": "DiskGiB is the size of a custom machine's disk, in GiB", + "type": "integer", + "format": "int32" + }, + "memoryMiB": { + "description": "MemoryMiB is the size of a custom machine's memory, in MiB", + "type": "integer", + "format": "int64" + }, + "name": { + "type": "string" + }, + "numCPUs": { + "description": "NumCPUs is the number in a custom machine", + "type": "integer", + "format": "int32" + } + } + }, + "v1CustomMachine": { + "description": "Custom cloud VM definition", + "type": "object", + "properties": { + "apiVersion": { + "type": "string" + }, + "kind": { + "type": "string" + }, + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/v1CustomMachineSpec" + }, + "status": { + "$ref": "#/definitions/v1CloudMachineStatus" + } + } + }, + "v1CustomMachinePoolBaseConfigEntity": { + "description": "Machine pool configuration for the custom cluster", + "type": "object", + "properties": { + "additionalLabels": { + "description": "Additional labels to be part of the machine pool", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "isControlPlane": { + "description": "Whether this pool is for control plane", + "type": "boolean", + "x-omitempty": false + }, + "taints": { + "description": "control plane or worker taints", + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1Taint" + } + }, + "useControlPlaneAsWorker": { + "description": "If IsControlPlane==true \u0026\u0026 useControlPlaneAsWorker==true, then will remove control plane taint this will not be used for worker pools", + "type": "boolean", + "x-omitempty": false + } + } + }, + "v1CustomMachinePoolCloudConfigEntity": { + "type": "object", + "properties": { + "values": { + "description": "Machine pool configuration as yaml content", + "type": "string" + } + } + }, + "v1CustomMachinePoolConfig": { + "type": "object", + "required": [ + "isControlPlane" + ], + "properties": { + "additionalLabels": { + "description": "additionalLabels", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "isControlPlane": { + "description": "whether this pool is for control plane", + "type": "boolean", + "x-omitempty": false + }, + "name": { + "type": "string" + }, + "size": { + "description": "size of the pool, number of machines", + "type": "integer", + "format": "int32" + }, + "taints": { + "description": "control plane or worker taints", + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1Taint" + } + }, + "useControlPlaneAsWorker": { + "description": "if IsControlPlane==true \u0026\u0026 useControlPlaneAsWorker==true, then will remove control plane taint this will not be used for worker pools", + "type": "boolean", + "x-omitempty": false + }, + "values": { + "description": "YAML string for machine", + "type": "string" + } + } + }, + "v1CustomMachinePoolConfigEntity": { + "type": "object", + "required": [ + "cloudConfig" + ], + "properties": { + "cloudConfig": { + "$ref": "#/definitions/v1CustomMachinePoolCloudConfigEntity" + }, + "poolConfig": { + "$ref": "#/definitions/v1CustomMachinePoolBaseConfigEntity" + } + } + }, + "v1CustomMachineSpec": { + "description": "Custom cloud VM definition spec", + "properties": { + "cloudType": { + "type": "string" + }, + "hostName": { + "type": "string" + }, + "imageId": { + "type": "string" + }, + "instanceType": { + "$ref": "#/definitions/v1CustomInstanceType" + }, + "nics": { + "type": "array", + "items": { + "$ref": "#/definitions/v1CustomNic" + } + }, + "sshKeyName": { + "type": "string" + } + } + }, + "v1CustomMachines": { + "description": "List of Custom machines", + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1CustomMachine" + } + }, + "listmeta": { + "$ref": "#/definitions/v1ListMetaData" + } + } + }, + "v1CustomNic": { + "description": "Custom network interface", + "type": "object", + "properties": { + "index": { + "type": "integer", + "format": "int8" + }, + "networkName": { + "type": "string" + }, + "privateIPs": { + "type": "array", + "items": { + "type": "string" + } + }, + "publicIp": { + "type": "string" + } + } + }, + "v1DashboardWorkspace": { + "description": "Workspace information", + "properties": { + "meta": { + "$ref": "#/definitions/v1DashboardWorkspaceMeta" + }, + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/v1DashboardWorkspaceSpec" + }, + "status": { + "$ref": "#/definitions/v1DashboardWorkspaceStatus" + } + } + }, + "v1DashboardWorkspaceAllocation": { + "description": "Workspace allocation", + "properties": { + "cpu": { + "$ref": "#/definitions/v1DashboardWorkspaceResourceAllocation" + }, + "memory": { + "$ref": "#/definitions/v1DashboardWorkspaceResourceAllocation" + } + } + }, + "v1DashboardWorkspaceClusterRef": { + "description": "Workspace cluster reference", + "properties": { + "name": { + "type": "string" + }, + "uid": { + "type": "string" + } + } + }, + "v1DashboardWorkspaceMeta": { + "description": "Deprecated. Workspace meta data", + "properties": { + "clusterNames": { + "description": "Deprecated. Use clusterRefs", + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + } + }, + "clusterRefs": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1DashboardWorkspaceClusterRef" + } + }, + "creationTime": { + "$ref": "#/definitions/v1Time" + }, + "name": { + "type": "string" + }, + "namespaces": { + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + } + }, + "uid": { + "type": "string" + } + } + }, + "v1DashboardWorkspaceNamespaceAllocation": { + "description": "Workspace namespace allocation", + "properties": { + "name": { + "type": "string" + }, + "total": { + "$ref": "#/definitions/v1DashboardWorkspaceAllocation" + } + } + }, + "v1DashboardWorkspaceQuota": { + "description": "Workspace resource quota", + "properties": { + "resourceAllocation": { + "$ref": "#/definitions/v1DashboardWorkspaceQuotaResourceAllocation" + } + } + }, + "v1DashboardWorkspaceQuotaResourceAllocation": { + "description": "Workspace quota resource allocation", + "properties": { + "cpu": { + "type": "number", + "minimum": 0, + "exclusiveMinimum": true + }, + "memory": { + "type": "number", + "minimum": 0, + "exclusiveMinimum": true + } + } + }, + "v1DashboardWorkspaceResourceAllocation": { + "description": "Workspace resource allocation", + "properties": { + "allocated": { + "type": "number", + "format": "float64", + "x-omitempty": false + }, + "usage": { + "type": "number", + "format": "float64", + "x-omitempty": false + } + } + }, + "v1DashboardWorkspaceSpec": { + "description": "Workspace spec summary", + "properties": { + "clusterRefs": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1DashboardWorkspaceClusterRef" + } + }, + "namespaces": { + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + } + }, + "quota": { + "$ref": "#/definitions/v1DashboardWorkspaceQuota" + } + } + }, + "v1DashboardWorkspaceStatus": { + "description": "Workspace status", + "properties": { + "namespaces": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1DashboardWorkspaceNamespaceAllocation" + } + }, + "total": { + "$ref": "#/definitions/v1DashboardWorkspaceAllocation" + } + } + }, + "v1DashboardWorkspaces": { + "type": "object", + "required": [ + "items" + ], + "properties": { + "cpuUnit": { + "type": "string" + }, + "items": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1DashboardWorkspace" + } + }, + "memoryUnit": { + "type": "string" + } + } + }, + "v1DataSinkConfig": { + "description": "Data sink", + "type": "object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/v1DataSinkSpec" + } + } + }, + "v1DataSinkSpec": { + "type": "object", + "properties": { + "auditDataSinks": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1DataSinkableSpec" + } + } + } + }, + "v1DataSinkableSpec": { + "type": "object", + "properties": { + "cloudWatch": { + "$ref": "#/definitions/v1CloudWatch" + }, + "type": { + "type": "string", + "enum": [ + "cloudwatch" + ] + } + } + }, + "v1DeleteMeta": { + "description": "Properties to send back after deletion operation", + "properties": { + "count": { + "type": "integer", + "format": "int64" + }, + "items": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + }, + "v1DeletedMsg": { + "description": "Deleted response with message", + "properties": { + "msg": { + "type": "string" + } + } + }, + "v1DeveloperCredit": { + "description": "Credits allocated for each tenant/user", + "properties": { + "cpu": { + "description": "cpu in cores", + "type": "number", + "format": "int32", + "x-omitempty": false + }, + "memoryGiB": { + "description": "memory in GiB", + "type": "number", + "format": "int32", + "x-omitempty": false + }, + "storageGiB": { + "description": "storage in GiB", + "type": "integer", + "format": "int32", + "x-omitempty": false + }, + "virtualClustersLimit": { + "description": "number of active virtual clusters", + "type": "number", + "format": "int32", + "x-omitempty": false + } + } + }, + "v1DeviceSpec": { + "description": "DeviceSpec defines the desired state of Device", + "type": "object", + "properties": { + "archType": { + "description": "Architecture type of the edge host", + "type": "string", + "default": "amd64", + "enum": [ + "arm64", + "amd64" + ] + }, + "cpu": { + "$ref": "#/definitions/v1CPU" + }, + "disks": { + "type": "array", + "items": { + "$ref": "#/definitions/v1Disk" + } + }, + "gpus": { + "type": "array", + "items": { + "$ref": "#/definitions/v1GPUDeviceSpec" + } + }, + "memory": { + "$ref": "#/definitions/v1Memory" + }, + "nics": { + "type": "array", + "items": { + "$ref": "#/definitions/v1Nic" + } + }, + "os": { + "$ref": "#/definitions/v1OS" + } + } + }, + "v1Disk": { + "type": "object", + "properties": { + "controller": { + "type": "string" + }, + "partitions": { + "type": "array", + "items": { + "$ref": "#/definitions/v1Partition" + } + }, + "size": { + "description": "Size in GB", + "type": "integer", + "format": "int32" + }, + "vendor": { + "type": "string" + } + } + }, + "v1EcrRegistry": { + "description": "Ecr registry information", + "type": "object", + "properties": { + "kind": { + "type": "string" + }, + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/v1EcrRegistrySpec" + } + } + }, + "v1EcrRegistrySpec": { + "description": "Ecr registry spec", + "type": "object", + "required": [ + "endpoint", + "isPrivate" + ], + "properties": { + "baseContentPath": { + "description": "OCI ecr registry content base path", + "type": "string" + }, + "credentials": { + "$ref": "#/definitions/v1AwsCloudAccount" + }, + "defaultRegion": { + "type": "string" + }, + "endpoint": { + "type": "string" + }, + "isPrivate": { + "type": "boolean" + }, + "providerType": { + "type": "string", + "default": "helm", + "enum": [ + "helm", + "pack" + ] + }, + "registryUid": { + "description": "Ecr registry uid", + "type": "string" + }, + "scope": { + "type": "string" + }, + "tls": { + "$ref": "#/definitions/v1TlsConfiguration" + } + } + }, + "v1EdgeHost": { + "description": "EdgeHost is the underlying appliance", + "type": "object", + "required": [ + "hostUid", + "hostAddress" + ], + "properties": { + "disableAutoRegister": { + "description": "Set to true if auto register is disabled for the device", + "type": "boolean", + "x-omitempty": false + }, + "hostAddress": { + "description": "HostAddress is a FQDN or IP address of the Host", + "type": "string" + }, + "hostAuthToken": { + "description": "HostAuthToken to authorize auto registration", + "type": "string", + "x-omitempty": false + }, + "hostChecksum": { + "description": "HostChecksum is the checksum provided by the edge host, to be persisted in SaaS", + "type": "string", + "x-omitempty": false + }, + "hostIdentity": { + "description": "HostIdentity is the identity to access the edge host", + "$ref": "#/definitions/v1EdgeHostIdentity" + }, + "hostPairingKey": { + "description": "HostPairingKey is the one-time pairing key to pair the edge host with the device registered in SaaS", + "type": "string", + "format": "password", + "x-omitempty": false + }, + "hostUid": { + "description": "HostUid is the ID of the EdgeHost", + "type": "string" + }, + "macAddress": { + "description": "Mac address of edgehost", + "type": "string", + "x-omitempty": false + }, + "project": { + "description": "ProjectUid where the edgehost will be placed during auto registration", + "x-omitempty": false, + "$ref": "#/definitions/v1ObjectEntity" + } + } + }, + "v1EdgeHostCloudProperties": { + "description": "Additional cloud properties of the edge host (applicable based on the cloud type)", + "type": "object", + "properties": { + "vsphere": { + "$ref": "#/definitions/v1EdgeHostVsphereCloudProperties" + } + } + }, + "v1EdgeHostClusterEntity": { + "type": "object", + "properties": { + "clusterUid": { + "type": "string" + } + } + }, + "v1EdgeHostDevice": { + "properties": { + "aclmeta": { + "$ref": "#/definitions/v1AclMeta" + }, + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/v1EdgeHostDeviceSpec" + }, + "status": { + "$ref": "#/definitions/v1EdgeHostDeviceStatus" + } + } + }, + "v1EdgeHostDeviceEntity": { + "description": "Edge host device information", + "type": "object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectTagsEntity" + }, + "spec": { + "$ref": "#/definitions/v1EdgeHostDeviceSpecEntity" + } + } + }, + "v1EdgeHostDeviceHostCheckSum": { + "type": "object", + "properties": { + "hostCheckSum": { + "type": "string" + } + } + }, + "v1EdgeHostDeviceHostPairingKey": { + "type": "object", + "properties": { + "hostPairingKey": { + "type": "string", + "format": "password" + } + } + }, + "v1EdgeHostDeviceMetaUpdateEntity": { + "description": "Edge host device uid and name", + "type": "object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectTagsEntity" + } + } + }, + "v1EdgeHostDeviceSpec": { + "description": "EdgeHostDeviceSpec defines the desired state of EdgeHostDevice", + "type": "object", + "properties": { + "cloudProperties": { + "$ref": "#/definitions/v1EdgeHostCloudProperties" + }, + "clusterProfileTemplates": { + "type": "array", + "items": { + "$ref": "#/definitions/v1ClusterProfileTemplate" + } + }, + "device": { + "$ref": "#/definitions/v1DeviceSpec" + }, + "host": { + "$ref": "#/definitions/v1EdgeHost" + }, + "properties": { + "$ref": "#/definitions/v1EdgeHostProperties" + }, + "service": { + "$ref": "#/definitions/v1ServiceSpec" + }, + "type": { + "description": "Deprecated. Cloudtype of the provisioned edge host", + "type": "string", + "enum": [ + "libvirt", + "vsphere", + "edge-native" + ] + }, + "version": { + "type": "string" + } + } + }, + "v1EdgeHostDeviceSpecEntity": { + "description": "Edge host device spec", + "type": "object", + "properties": { + "archType": { + "$ref": "#/definitions/v1ArchType" + }, + "hostPairingKey": { + "type": "string", + "format": "password" + } + } + }, + "v1EdgeHostDeviceStatus": { + "description": "EdgeHostDeviceStatus defines the observed state of EdgeHostDevice", + "type": "object", + "properties": { + "health": { + "$ref": "#/definitions/v1EdgeHostHealth" + }, + "inUseClusters": { + "type": "array", + "items": { + "$ref": "#/definitions/v1ObjectEntity" + } + }, + "packs": { + "type": "array", + "items": { + "$ref": "#/definitions/v1ClusterPackStatus" + } + }, + "profileStatus": { + "$ref": "#/definitions/v1ProfileStatus" + }, + "serviceAuthToken": { + "type": "string" + }, + "state": { + "type": "string", + "enum": [ + "ready", + "unpaired", + "in-use" + ] + } + } + }, + "v1EdgeHostDevices": { + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1EdgeHostDevice" + } + }, + "listmeta": { + "$ref": "#/definitions/v1ListMetaData" + } + } + }, + "v1EdgeHostHealth": { + "description": "EdgeHostHealth defines the desired health state of EdgeHostDevice", + "properties": { + "agentVersion": { + "type": "string" + }, + "message": { + "type": "string" + }, + "state": { + "type": "string", + "enum": [ + "healthy", + "unhealthy" + ] + } + } + }, + "v1EdgeHostIdentity": { + "properties": { + "caCert": { + "description": "CACert is the client CA certificate", + "type": "string" + }, + "mode": { + "description": "Mode indicates a system or session connection to the host", + "type": "string" + }, + "socketPath": { + "description": "SocketPath is an optional path to the socket on the host, if not using defaults", + "type": "string" + }, + "sshSecret": { + "description": "SSHSecret to the secret containing ssh-username", + "$ref": "#/definitions/v1EdgeHostSSHSecret" + } + } + }, + "v1EdgeHostMeta": { + "type": "object", + "properties": { + "archType": { + "$ref": "#/definitions/v1ArchType" + }, + "edgeHostType": { + "type": "string", + "enum": [ + "libvirt", + "edge-native", + "vsphere" + ] + }, + "healthState": { + "type": "string" + }, + "name": { + "type": "string" + }, + "state": { + "type": "string" + }, + "uid": { + "type": "string" + } + } + }, + "v1EdgeHostNetwork": { + "description": "Network defines the network configuration for a virtual machine", + "type": "object", + "required": [ + "networkName", + "networkType" + ], + "properties": { + "networkName": { + "description": "NetworkName of the network where this machine will be connected", + "type": "string" + }, + "networkType": { + "description": "NetworkType specifies the type of network", + "type": "string", + "enum": [ + "default", + "bridge" + ] + } + } + }, + "v1EdgeHostProperties": { + "description": "Additional properties of edge host", + "properties": { + "networks": { + "type": "array", + "items": { + "$ref": "#/definitions/v1EdgeHostNetwork" + } + }, + "storagePools": { + "type": "array", + "items": { + "$ref": "#/definitions/v1EdgeHostStoragePool" + } + } + } + }, + "v1EdgeHostSSHSecret": { + "type": "object", + "properties": { + "name": { + "description": "SSH secret name", + "type": "string" + }, + "privateKey": { + "description": "Private Key to access the host", + "type": "string" + } + } + }, + "v1EdgeHostSpecHost": { + "description": "Host specifications", + "properties": { + "hostAddress": { + "description": "HostAddress is a FQDN or IP address of the Host", + "type": "string" + }, + "macAddress": { + "type": "string" + } + } + }, + "v1EdgeHostState": { + "type": "string", + "enum": [ + "ready", + "unpaired", + "in-use" + ] + }, + "v1EdgeHostStoragePool": { + "description": "StoragePool is the storage pool for the vm image", + "properties": { + "name": { + "type": "string" + } + } + }, + "v1EdgeHostVsphereCloudProperties": { + "description": "Vsphere cloud properties of edge host", + "properties": { + "datacenters": { + "type": "array", + "items": { + "$ref": "#/definitions/v1VsphereCloudDatacenter" + } + } + } + }, + "v1EdgeHostsMeta": { + "type": "object", + "properties": { + "edgeHosts": { + "type": "array", + "items": { + "$ref": "#/definitions/v1EdgeHostMeta" + } + } + } + }, + "v1EdgeHostsMetadata": { + "type": "object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/v1EdgeHostsMetadataSpec" + }, + "status": { + "$ref": "#/definitions/v1EdgeHostsMetadataStatus" + } + } + }, + "v1EdgeHostsMetadataFilter": { + "description": "Edge host metadata spec", + "properties": { + "filter": { + "$ref": "#/definitions/v1EdgeHostsMetadataFilterSpec" + }, + "sort": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1EdgeHostsMetadataSortSpec" + } + } + } + }, + "v1EdgeHostsMetadataFilterSpec": { + "description": "Edge hosts metadata filter spec", + "properties": { + "name": { + "$ref": "#/definitions/v1FilterString" + }, + "states": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1EdgeHostState" + } + } + } + }, + "v1EdgeHostsMetadataSortFields": { + "type": "string", + "enum": [ + "name", + "state", + "creationTimestamp", + "lastModifiedTimestamp" + ], + "x-nullable": true + }, + "v1EdgeHostsMetadataSortSpec": { + "properties": { + "field": { + "$ref": "#/definitions/v1EdgeHostsMetadataSortFields" + }, + "order": { + "$ref": "#/definitions/v1SortOrder" + } + } + }, + "v1EdgeHostsMetadataSpec": { + "type": "object", + "properties": { + "clusterProfileTemplates": { + "type": "array", + "items": { + "$ref": "#/definitions/v1ProfileTemplateSummary" + } + }, + "device": { + "$ref": "#/definitions/v1DeviceSpec" + }, + "host": { + "$ref": "#/definitions/v1EdgeHostSpecHost" + }, + "projectMeta": { + "$ref": "#/definitions/v1ProjectMeta" + }, + "type": { + "type": "string" + } + } + }, + "v1EdgeHostsMetadataStatus": { + "type": "object", + "properties": { + "health": { + "$ref": "#/definitions/v1EdgeHostHealth" + }, + "inUseClusters": { + "type": "array", + "items": { + "$ref": "#/definitions/v1ObjectEntity" + } + }, + "state": { + "$ref": "#/definitions/v1EdgeHostState" + } + } + }, + "v1EdgeHostsMetadataSummary": { + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1EdgeHostsMetadata" + } + } + } + }, + "v1EdgeHostsSearchSummary": { + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1EdgeHostsMetadata" + } + }, + "listmeta": { + "$ref": "#/definitions/v1ListMetaData" + } + } + }, + "v1EdgeHostsTags": { + "type": "object", + "properties": { + "tags": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "v1EdgeNativeCloudClusterConfigEntity": { + "description": "EdgeNative cloud cluster config entity", + "type": "object", + "properties": { + "clusterConfig": { + "$ref": "#/definitions/v1EdgeNativeClusterConfig" + } + } + }, + "v1EdgeNativeCloudConfig": { + "description": "EdgeNativeCloudConfig is the Schema for the edgenativecloudconfigs API", + "type": "object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/v1EdgeNativeCloudConfigSpec" + }, + "status": { + "$ref": "#/definitions/v1EdgeNativeCloudConfigStatus" + } + } + }, + "v1EdgeNativeCloudConfigSpec": { + "description": "EdgeNativeCloudConfigSpec defines the desired state of EdgeNativeCloudConfig", + "type": "object", + "required": [ + "clusterConfig", + "machinePoolConfig" + ], + "properties": { + "clusterConfig": { + "$ref": "#/definitions/v1EdgeNativeClusterConfig" + }, + "machinePoolConfig": { + "type": "array", + "items": { + "$ref": "#/definitions/v1EdgeNativeMachinePoolConfig" + } + } + } + }, + "v1EdgeNativeCloudConfigStatus": { + "description": "EdgeNativeCloudConfigStatus defines the observed state of EdgeNativeCloudConfig", + "type": "object", + "properties": { + "conditions": { + "type": "array", + "items": { + "$ref": "#/definitions/v1ClusterCondition" + } + }, + "nodeImage": { + "type": "string" + }, + "sourceImageId": { + "description": "SourceImageId can be from packref's annotations or from pack.json", + "type": "string" + } + } + }, + "v1EdgeNativeClusterConfig": { + "description": "EdgeNativeClusterConfig definnes Edge Native Cluster specific Spec", + "type": "object", + "properties": { + "controlPlaneEndpoint": { + "description": "ControlPlaneEndpoint is the control plane endpoint, which can be an IP or FQDN", + "$ref": "#/definitions/v1EdgeNativeControlPlaneEndPoint" + }, + "ntpServers": { + "description": "NTPServers is a list of NTP servers to use instead of the machine image's default NTP server list", + "type": "array", + "items": { + "type": "string", + "default": "" + } + }, + "overlayNetworkConfiguration": { + "description": "OverlayNetworkConfiguration is the configuration for the overlay network", + "$ref": "#/definitions/v1EdgeNativeOverlayNetworkConfiguration" + }, + "sshKeys": { + "description": "SSHKeys specifies a list of ssh authorized keys to access the vms as a 'spectro' user", + "type": "array", + "items": { + "type": "string", + "default": "" + } + }, + "staticIp": { + "description": "StaticIP indicates if IP allocation type is static IP. DHCP is the default allocation type", + "type": "boolean" + } + } + }, + "v1EdgeNativeControlPlaneEndPoint": { + "type": "object", + "properties": { + "ddnsSearchDomain": { + "description": "DDNSSearchDomain is the search domain used for resolving IP addresses when the EndpointType is DDNS. This search domain is appended to the generated Hostname to obtain the complete DNS name for the endpoint. If Host is already a DDNS FQDN, DDNSSearchDomain is not required", + "type": "string" + }, + "host": { + "description": "Host is FQDN(DDNS) or IP", + "type": "string" + }, + "type": { + "description": "Type indicates DDNS or VIP", + "type": "string" + } + } + }, + "v1EdgeNativeHost": { + "description": "EdgeNativeHost is the underlying appliance", + "type": "object", + "required": [ + "hostUid", + "hostAddress" + ], + "properties": { + "IsCandidateCaption": { + "description": "Is Edge host nominated as candidate", + "type": "boolean", + "default": false, + "x-omitempty": false + }, + "caCert": { + "description": "CACert for TLS connections", + "type": "string" + }, + "hostAddress": { + "description": "HostAddress is a FQDN or IP address of the Host", + "type": "string", + "default": "" + }, + "hostName": { + "description": "Qualified name of host", + "type": "string", + "default": "" + }, + "hostUid": { + "description": "HostUid is the ID of the EdgeHost", + "type": "string", + "default": "" + }, + "nic": { + "description": "Edge native nic", + "$ref": "#/definitions/v1Nic" + }, + "nicName": { + "description": "Deprecated. Edge host nic name", + "type": "string" + }, + "staticIP": { + "description": "Deprecated. Edge host static IP", + "type": "string" + }, + "twoNodeCandidatePriority": { + "description": "Set the edgehost candidate priority as primary or secondary, if the edgehost is nominated as two node candidate", + "type": "string", + "enum": [ + "primary", + "secondary" + ] + } + } + }, + "v1EdgeNativeInstanceType": { + "description": "EdgeNativeInstanceType defines the instance configuration for a docker container node", + "type": "object", + "properties": { + "diskGiB": { + "description": "DiskGiB is the size of a virtual machine's disk", + "type": "integer", + "format": "int32" + }, + "memoryMiB": { + "description": "MemoryMiB is the size of a virtual machine's memory, in MiB", + "type": "integer", + "format": "int32" + }, + "name": { + "description": "Name is the instance name", + "type": "string" + }, + "numCPUs": { + "description": "NumCPUs is the number of CPUs", + "type": "integer", + "format": "int32" + } + } + }, + "v1EdgeNativeMachine": { + "description": "EdgeNative cloud VM definition", + "properties": { + "apiVersion": { + "type": "string" + }, + "kind": { + "type": "string" + }, + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/v1EdgeNativeMachineSpec" + }, + "status": { + "$ref": "#/definitions/v1CloudMachineStatus" + } + } + }, + "v1EdgeNativeMachinePoolCloudConfigEntity": { + "required": [ + "edgeHosts" + ], + "properties": { + "edgeHosts": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1EdgeNativeMachinePoolHostEntity" + } + } + } + }, + "v1EdgeNativeMachinePoolConfig": { + "type": "object", + "required": [ + "hosts" + ], + "properties": { + "additionalLabels": { + "description": "AdditionalLabels", + "type": "object", + "additionalProperties": { + "type": "string", + "default": "" + } + }, + "additionalTags": { + "description": "AdditionalTags is an optional set of tags to add to resources managed by the provider, in addition to the ones added by default. For eg., tags for EKS nodeGroup or EKS NodegroupIAMRole", + "type": "object", + "additionalProperties": { + "type": "string", + "default": "" + } + }, + "hosts": { + "type": "array", + "items": { + "$ref": "#/definitions/v1EdgeNativeHost" + } + }, + "isControlPlane": { + "description": "whether this pool is for control plane", + "type": "boolean" + }, + "labels": { + "description": "labels for this pool, example: control-plane/worker, gpu, windows", + "type": "array", + "items": { + "type": "string", + "default": "" + } + }, + "machinePoolProperties": { + "$ref": "#/definitions/v1MachinePoolProperties" + }, + "maxSize": { + "description": "max size of the pool, for scaling", + "type": "integer", + "format": "int32" + }, + "minSize": { + "description": "min size of the pool, for scaling", + "type": "integer", + "format": "int32" + }, + "name": { + "type": "string" + }, + "nodeRepaveInterval": { + "description": "Minimum number of seconds a node should be Ready, before the next node is selected for repave. Applicable only for workerpools in infrastructure cluster", + "type": "integer", + "format": "int32" + }, + "osType": { + "description": "the os type for the pool, must be supported by the provider", + "type": "string" + }, + "size": { + "description": "size of the pool, number of machines", + "type": "integer", + "format": "int32" + }, + "taints": { + "description": "control plane or worker taints", + "type": "array", + "items": { + "$ref": "#/definitions/v1Taint" + } + }, + "updateStrategy": { + "description": "rolling update strategy for this machinepool if not specified, will use ScaleOut", + "$ref": "#/definitions/v1UpdateStrategy" + }, + "useControlPlaneAsWorker": { + "description": "if IsControlPlane==true \u0026\u0026 useControlPlaneAsWorker==true, then will remove control plane taint this will not be used for worker pools", + "type": "boolean" + } + } + }, + "v1EdgeNativeMachinePoolConfigEntity": { + "type": "object", + "properties": { + "cloudConfig": { + "$ref": "#/definitions/v1EdgeNativeMachinePoolCloudConfigEntity" + }, + "poolConfig": { + "$ref": "#/definitions/v1MachinePoolConfigEntity" + } + } + }, + "v1EdgeNativeMachinePoolHostEntity": { + "required": [ + "hostUid" + ], + "properties": { + "hostName": { + "description": "Edge host name", + "type": "string" + }, + "hostUid": { + "description": "Edge host id", + "type": "string" + }, + "nic": { + "description": "Edge native nic", + "$ref": "#/definitions/v1Nic" + }, + "nicName": { + "description": "Deprecated - Edge host nic name", + "type": "string" + }, + "staticIP": { + "description": "Deprecated - Edge host static IP", + "type": "string" + }, + "twoNodeCandidatePriority": { + "description": "Set the edgehost candidate priority as primary or secondary, if the edgehost is nominated as two node candidate", + "type": "string", + "enum": [ + "primary", + "secondary" + ] + } + } + }, + "v1EdgeNativeMachineSpec": { + "description": "EdgeNative cloud VM definition spec", + "type": "object", + "properties": { + "edgeHostUid": { + "type": "string" + }, + "instanceType": { + "$ref": "#/definitions/v1EdgeNativeInstanceType" + }, + "nics": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1EdgeNativeNic" + } + } + } + }, + "v1EdgeNativeMachines": { + "description": "EdgeNative machine list", + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1EdgeNativeMachine" + } + } + } + }, + "v1EdgeNativeNic": { + "description": "Generic network interface", + "type": "object", + "properties": { + "index": { + "type": "integer", + "format": "int8" + }, + "networkName": { + "type": "string" + }, + "privateIPs": { + "type": "array", + "items": { + "type": "string" + } + }, + "publicIp": { + "type": "string" + } + } + }, + "v1EdgeNativeOverlayNetworkConfiguration": { + "type": "object", + "properties": { + "cidr": { + "description": "CIDR is the CIDR of the overlay network", + "type": "string" + }, + "enable": { + "description": "Enable is a flag to enable overlay network", + "type": "boolean", + "x-omitempty": false + } + } + }, + "v1EdgeToken": { + "description": "Edge token information", + "type": "object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/v1EdgeTokenSpec" + }, + "status": { + "$ref": "#/definitions/v1EdgeTokenStatus" + } + } + }, + "v1EdgeTokenActiveState": { + "description": "Edge token active state", + "properties": { + "isActive": { + "description": "Set to 'true', if the token is active", + "type": "boolean" + } + } + }, + "v1EdgeTokenEntity": { + "description": "Edge token request payload", + "type": "object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/v1EdgeTokenSpecEntity" + } + } + }, + "v1EdgeTokenProject": { + "description": "Edge token project information", + "type": "object", + "properties": { + "name": { + "description": "Project name", + "type": "string" + }, + "uid": { + "description": "Project uid", + "type": "string" + } + } + }, + "v1EdgeTokenSpec": { + "description": "Edge token specification", + "type": "object", + "properties": { + "defaultProject": { + "description": "Default project where the edgehost will be placed on the token authorization", + "$ref": "#/definitions/v1EdgeTokenProject" + }, + "expiry": { + "description": "Edge token expiry date", + "$ref": "#/definitions/v1Time" + }, + "token": { + "description": "Edge token", + "type": "string" + } + } + }, + "v1EdgeTokenSpecEntity": { + "description": "Edge token specification", + "type": "object", + "properties": { + "defaultProjectUid": { + "description": "Default project where the edgehost will be placed on the token authorization", + "type": "string" + }, + "expiry": { + "description": "Edge token expiry date", + "$ref": "#/definitions/v1Time" + } + } + }, + "v1EdgeTokenSpecUpdate": { + "description": "Edge token spec to be updated", + "properties": { + "defaultProjectUid": { + "description": "Default project where the edgehost will be placed on the token authorization", + "type": "string" + }, + "expiry": { + "$ref": "#/definitions/v1Time" + } + } + }, + "v1EdgeTokenStatus": { + "description": "Edge token status", + "type": "object", + "properties": { + "isActive": { + "description": "Set to 'true', if the token is active", + "type": "boolean", + "x-omitempty": false + } + } + }, + "v1EdgeTokenUpdate": { + "description": "Edge token update request payload", + "type": "object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/v1EdgeTokenSpecUpdate" + } + } + }, + "v1EdgeTokens": { + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": { + "description": "List of edge tokens", + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1EdgeToken" + } + } + } + }, + "v1EksAddon": { + "description": "EksAddon represents a EKS addon", + "type": "object", + "required": [ + "name", + "version" + ], + "properties": { + "conflictResolution": { + "description": "ConflictResolution is used to declare what should happen if there are parameter conflicts.", + "type": "string" + }, + "name": { + "description": "Name is the name of the addon", + "type": "string" + }, + "serviceAccountRoleARN": { + "description": "ServiceAccountRoleArn is the ARN of an IAM role to bind to the addons service account", + "type": "string" + }, + "version": { + "description": "Version is the version of the addon to use", + "type": "string" + } + } + }, + "v1EksCloudClusterConfigEntity": { + "description": "EKS cloud cluster config entity", + "type": "object", + "properties": { + "clusterConfig": { + "$ref": "#/definitions/v1EksClusterConfig" + } + } + }, + "v1EksCloudConfig": { + "description": "EksCloudConfig is the Schema for the ekscloudconfigs API", + "type": "object", + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + "type": "string" + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/v1EksCloudConfigSpec" + } + } + }, + "v1EksCloudConfigSpec": { + "description": "EksCloudConfigSpec defines the cloud configuration input by user", + "type": "object", + "properties": { + "cloudAccountRef": { + "description": "cloudAccountRef should point to the secret which contains EksCloudAccount", + "$ref": "#/definitions/v1ObjectReference" + }, + "clusterConfig": { + "$ref": "#/definitions/v1EksClusterConfig" + }, + "fargateProfiles": { + "type": "array", + "items": { + "$ref": "#/definitions/v1FargateProfile" + } + }, + "machinePoolConfig": { + "type": "array", + "items": { + "$ref": "#/definitions/v1EksMachinePoolConfig" + } + } + } + }, + "v1EksClusterConfig": { + "description": "EksClusterConfig defines EKS specific config", + "type": "object", + "required": [ + "region" + ], + "properties": { + "addons": { + "description": "Addons defines the EKS addons to enable with the EKS cluster. This may be required for brownfield clusters", + "type": "array", + "items": { + "$ref": "#/definitions/v1EksAddon" + } + }, + "bastionDisabled": { + "description": "BastionDisabled is the option to disable bastion node", + "type": "boolean" + }, + "controlPlaneLoadBalancer": { + "description": "ControlPlaneLoadBalancer specifies how API server elb will be configured, this field is optional, not provided, \"\", default =\u003e \"Internet-facing\" \"Internet-facing\" =\u003e \"Internet-facing\" \"internal\" =\u003e \"internal\" For spectro saas setup we require to talk to the apiserver from our cluster so ControlPlaneLoadBalancer should be \"\", not provided or \"Internet-facing\"", + "type": "string" + }, + "encryptionConfig": { + "description": "EncryptionConfig specifies the encryption configuration for the cluster", + "$ref": "#/definitions/v1EncryptionConfig" + }, + "endpointAccess": { + "description": "Endpoints specifies access to this cluster's control plane endpoints", + "$ref": "#/definitions/v1EksClusterConfigEndpointAccess" + }, + "region": { + "description": "The AWS Region the cluster lives in.", + "type": "string" + }, + "sshKeyName": { + "description": "SSHKeyName specifies which EC2 SSH key can be used to access machines.", + "type": "string" + }, + "vpcId": { + "description": "VPC Id to deploy cluster into should have one public and one private subnet for the the cluster creation, this field is optional, If VPC Id is not provided a fully managed VPC will be created", + "type": "string" + } + } + }, + "v1EksClusterConfigEndpointAccess": { + "description": "EndpointAccess specifies how control plane endpoints are accessible", + "type": "object", + "properties": { + "private": { + "description": "Private points VPC-internal control plane access to the private endpoint", + "type": "boolean" + }, + "privateCIDRs": { + "description": "PrivateCIDRs specifies which blocks can access the private endpoint", + "type": "array", + "items": { + "type": "string" + } + }, + "public": { + "description": "Public controls whether control plane endpoints are publicly accessible", + "type": "boolean" + }, + "publicCIDRs": { + "description": "PublicCIDRs specifies which blocks can access the public endpoint", + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "v1EksFargateProfiles": { + "description": "Fargate profiles", + "type": "object", + "properties": { + "fargateProfiles": { + "type": "array", + "items": { + "$ref": "#/definitions/v1FargateProfile" + } + } + } + }, + "v1EksMachineCloudConfigEntity": { + "properties": { + "awsLaunchTemplate": { + "$ref": "#/definitions/v1AwsLaunchTemplate" + }, + "azs": { + "type": "array", + "items": { + "type": "string" + } + }, + "capacityType": { + "description": "EC2 instance capacity type", + "type": "string", + "default": "on-demand", + "enum": [ + "on-demand", + "spot" + ] + }, + "enableAwsLaunchTemplate": { + "description": "flag to know if aws launch template is enabled", + "type": "boolean" + }, + "instanceType": { + "description": "instance type", + "type": "string" + }, + "rootDeviceSize": { + "description": "rootDeviceSize in GBs", + "type": "integer", + "format": "int64", + "maximum": 2000, + "minimum": 1 + }, + "spotMarketOptions": { + "description": "SpotMarketOptions allows users to configure instances to be run using AWS Spot instances.", + "$ref": "#/definitions/v1SpotMarketOptions" + }, + "subnets": { + "type": "array", + "items": { + "$ref": "#/definitions/v1EksSubnetEntity" + } + } + } + }, + "v1EksMachinePoolConfig": { + "type": "object", + "required": [ + "isControlPlane" + ], + "properties": { + "additionalLabels": { + "description": "additionalLabels", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "additionalTags": { + "description": "AdditionalTags is an optional set of tags to add to resources managed by the provider, in addition to the ones added by default. For eg., tags for EKS nodeGroup or EKS NodegroupIAMRole", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "awsLaunchTemplate": { + "$ref": "#/definitions/v1AwsLaunchTemplate" + }, + "azs": { + "description": "AZs is only used for dynamic placement", + "type": "array", + "items": { + "type": "string" + } + }, + "capacityType": { + "description": "EC2 instance capacity type", + "type": "string", + "default": "on-demand", + "enum": [ + "on-demand", + "spot" + ] + }, + "enableAwsLaunchTemplate": { + "description": "flag to know if aws launch template is enabled", + "type": "boolean" + }, + "instanceConfig": { + "$ref": "#/definitions/v1InstanceConfig" + }, + "instanceType": { + "description": "instance type", + "type": "string" + }, + "isControlPlane": { + "description": "whether this pool is for control plane", + "type": "boolean", + "x-omitempty": false + }, + "labels": { + "description": "labels for this pool, example: control-plane/worker, gpu, windows", + "type": "array", + "items": { + "type": "string" + } + }, + "machinePoolProperties": { + "$ref": "#/definitions/v1MachinePoolProperties" + }, + "maxSize": { + "description": "max size of the pool, for scaling", + "type": "integer", + "format": "int32" + }, + "minSize": { + "description": "min size of the pool, for scaling", + "type": "integer", + "format": "int32" + }, + "name": { + "type": "string" + }, + "nodeRepaveInterval": { + "description": "Minimum number of seconds a node should be Ready, before the next node is selected for repave. Applicable only for workerpools in infrastructure cluster", + "type": "integer", + "format": "int32" + }, + "rootDeviceSize": { + "description": "rootDeviceSize in GBs", + "type": "integer", + "format": "int64" + }, + "size": { + "description": "size of the pool, number of machines", + "type": "integer", + "format": "int32" + }, + "spotMarketOptions": { + "description": "SpotMarketOptions allows users to configure instances to be run using AWS Spot instances.", + "$ref": "#/definitions/v1SpotMarketOptions" + }, + "subnetIds": { + "description": "AZ to subnet mapping filled by ally from hubble SubnetIDs [\"us-west-2d\"] = \"subnet-079b6061\" This field is optional If we don't provide a subnetId then by default the first private subnet from the AZ will be picked up for deployment", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "taints": { + "description": "control plane or worker taints", + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1Taint" + } + }, + "updateStrategy": { + "description": "rolling update strategy for this machinepool if not specified, will use ScaleOut", + "$ref": "#/definitions/v1UpdateStrategy" + }, + "useControlPlaneAsWorker": { + "description": "if IsControlPlane==true \u0026\u0026 useControlPlaneAsWorker==true, then will remove control plane taint this will not be used for worker pools", + "type": "boolean", + "x-omitempty": false + } + } + }, + "v1EksMachinePoolConfigEntity": { + "properties": { + "cloudConfig": { + "$ref": "#/definitions/v1EksMachineCloudConfigEntity" + }, + "poolConfig": { + "$ref": "#/definitions/v1MachinePoolConfigEntity" + } + } + }, + "v1EksSubnetEntity": { + "properties": { + "az": { + "type": "string" + }, + "id": { + "type": "string" + } + } + }, + "v1EncryptionConfig": { + "description": "EncryptionConfig specifies the encryption configuration for the EKS clsuter.", + "type": "object", + "properties": { + "isEnabled": { + "description": "Is encryption configuration enabled for the cluster", + "type": "boolean" + }, + "provider": { + "description": "Provider specifies the ARN or alias of the CMK (in AWS KMS)", + "type": "string" + }, + "resources": { + "description": "Resources specifies the resources to be encrypted", + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "v1Event": { + "description": "Describes the component event details", + "type": "object", + "properties": { + "involvedObject": { + "description": "Describes object involved in event generation", + "type": "object", + "$ref": "#/definitions/v1ObjectReference" + }, + "message": { + "description": "Describes message associated with the event", + "type": "string" + }, + "metadata": { + "type": "object", + "$ref": "#/definitions/v1ObjectMeta" + }, + "reason": { + "description": "Describes the reason for the event", + "type": "string" + }, + "relatedObject": { + "description": "Describes object related to the event", + "type": "object", + "$ref": "#/definitions/v1EventRelatedObject" + }, + "severity": { + "description": "Describes the gravitas for the event", + "type": "string" + }, + "source": { + "description": "Describes the origin for the event", + "type": "object", + "$ref": "#/definitions/v1EventSource" + } + } + }, + "v1EventRelatedObject": { + "description": "Object for which the event is related", + "type": "object", + "properties": { + "kind": { + "type": "string", + "enum": [ + "spectrocluster", + "edgehost" + ] + }, + "name": { + "type": "string" + }, + "uid": { + "type": "string" + } + } + }, + "v1EventSource": { + "description": "Describes the origin for the event", + "type": "object", + "properties": { + "component": { + "description": "Describes the component where event originated", + "type": "string" + }, + "host": { + "description": "Describes the host where event originated", + "type": "string" + } + } + }, + "v1Events": { + "description": "An array of component events items", + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": { + "description": "Describes a list of returned component events", + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1Event" + } + }, + "listmeta": { + "description": "Describes the meta information about the component event lists", + "$ref": "#/definitions/v1ListMetaData" + } + } + }, + "v1FargateProfile": { + "description": "FargateProfile defines the desired state of FargateProfile", + "type": "object", + "required": [ + "name" + ], + "properties": { + "additionalTags": { + "description": "AdditionalTags is an optional set of tags to add to AWS resources managed by the AWS provider, in addition to the ones added by default.", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "name": { + "description": "name specifies the profile name.", + "type": "string" + }, + "selectors": { + "description": "Selectors specify fargate pod selectors.", + "type": "array", + "items": { + "$ref": "#/definitions/v1FargateSelector" + } + }, + "subnetIds": { + "description": "SubnetIDs specifies which subnets are used for the auto scaling group of this nodegroup.", + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "v1FargateSelector": { + "description": "FargateSelector specifies a selector for pods that should run on this fargate pool", + "type": "object", + "required": [ + "namespace" + ], + "properties": { + "labels": { + "description": "Labels specifies which pod labels this selector should match.", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "namespace": { + "description": "Namespace specifies which namespace this selector should match.", + "type": "string" + } + } + }, + "v1Feature": { + "description": "Feature response", + "type": "object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/v1FeatureSpec" + } + } + }, + "v1FeatureSpec": { + "description": "Feature spec", + "properties": { + "description": { + "description": "Feature description", + "type": "string" + }, + "docLink": { + "description": "Feature doc link", + "type": "string" + }, + "key": { + "description": "Feature key", + "type": "string" + } + } + }, + "v1FeatureUpdate": { + "description": "Feature update spec", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectMetaInputEntity" + }, + "spec": { + "$ref": "#/definitions/v1FeatureUpdateSpec" + } + } + }, + "v1FeatureUpdateSpec": { + "description": "Feature update spec", + "properties": { + "description": { + "description": "Feature description", + "type": "string" + }, + "docLink": { + "description": "Feature doc link", + "type": "string" + } + } + }, + "v1Features": { + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": { + "description": "List of features", + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1Feature" + } + } + } + }, + "v1FilterArray": { + "type": "object", + "properties": { + "beginsWith": { + "type": "array", + "items": { + "type": "string" + }, + "x-nullable": true + }, + "eq": { + "type": "array", + "items": { + "type": "string" + }, + "x-nullable": true + }, + "ignoreCase": { + "type": "boolean", + "default": true + }, + "ne": { + "type": "array", + "items": { + "type": "string" + }, + "x-nullable": true + } + } + }, + "v1FilterMetadata": { + "description": "Filter metadata object", + "type": "object", + "properties": { + "filterType": { + "type": "string" + }, + "name": { + "type": "string" + }, + "uid": { + "type": "string" + } + } + }, + "v1FilterString": { + "type": "object", + "properties": { + "beginsWith": { + "type": "string", + "x-nullable": true + }, + "contains": { + "type": "string", + "x-nullable": true + }, + "eq": { + "type": "string", + "x-nullable": true + }, + "ignoreCase": { + "type": "boolean", + "default": true + }, + "ne": { + "type": "string", + "x-nullable": true + } + } + }, + "v1FilterSummary": { + "description": "Filter summary object", + "type": "object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/v1FilterSummarySpec" + } + } + }, + "v1FilterSummarySpec": { + "properties": { + "filterType": { + "type": "string" + } + } + }, + "v1FilterVersionString": { + "type": "object", + "properties": { + "beginsWith": { + "type": "string", + "x-nullable": true + }, + "eq": { + "type": "string", + "x-nullable": true + }, + "gt": { + "type": "string", + "x-nullable": true + }, + "lt": { + "type": "string", + "x-nullable": true + }, + "ne": { + "type": "string", + "x-nullable": true + } + } + }, + "v1FiltersMetadata": { + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1FilterMetadata" + } + } + } + }, + "v1FiltersSummary": { + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1FilterSummary" + } + }, + "listmeta": { + "$ref": "#/definitions/v1ListMetaData" + } + } + }, + "v1FipsSettings": { + "description": "FIPS configuration", + "properties": { + "fipsClusterFeatureConfig": { + "$ref": "#/definitions/v1NonFipsConfig" + }, + "fipsClusterImportConfig": { + "$ref": "#/definitions/v1NonFipsConfig" + }, + "fipsPackConfig": { + "$ref": "#/definitions/v1NonFipsConfig" + } + } + }, + "v1FreemiumUsage": { + "type": "object", + "properties": { + "usage": { + "type": "number", + "format": "float64", + "x-omitempty": false + } + } + }, + "v1FreemiumUsageLimit": { + "type": "object", + "properties": { + "activeClusters": { + "type": "integer", + "x-omitempty": false + }, + "overageUsage": { + "type": "number", + "x-omitempty": false + }, + "usage": { + "type": "number", + "format": "float64", + "x-omitempty": false + } + } + }, + "v1GPUDeviceSpec": { + "type": "object", + "properties": { + "addresses": { + "description": "Addresses is a map of PCI device entry name to its addresses.\nExample entry would be \"11:00.0 VGA compatible controller [0300]: NVIDIA\nCorporation Device [10de:1eb1] (rev a1)\"- \u003e 0000_11_00_0\" The address is\nBDF (Bus Device Function) identifier format seperated by underscores. The\nfirst 4 bits are almost always 0000. In the above example 11 is Bus, 00\nis Device,0 is function. The values of these addreses are expected in hexadecimal\nformat\n", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "model": { + "description": "Model is the model of GPU, for a given vendor, for eg., TU104GL [Tesla T4]", + "type": "string" + }, + "vendor": { + "description": "Vendor is the GPU vendor, for eg., NVIDIA or AMD", + "type": "string" + } + } + }, + "v1GcpAccount": { + "description": "GCP account information", + "type": "object", + "properties": { + "apiVersion": { + "description": "Cloud account api version", + "type": "string" + }, + "kind": { + "description": "Cloud account kind", + "type": "string" + }, + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/v1GcpAccountSpec" + }, + "status": { + "$ref": "#/definitions/v1CloudAccountStatus" + } + } + }, + "v1GcpAccountEntity": { + "description": "GCP account information", + "type": "object", + "properties": { + "apiVersion": { + "description": "Cloud account api version", + "type": "string" + }, + "kind": { + "description": "Cloud account kind", + "type": "string" + }, + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/v1GcpAccountEntitySpec" + }, + "status": { + "$ref": "#/definitions/v1CloudAccountStatus" + } + } + }, + "v1GcpAccountEntitySpec": { + "type": "object", + "properties": { + "jsonCredentials": { + "description": "Gcp cloud account json credentials", + "type": "string" + }, + "jsonCredentialsFileUid": { + "description": "Reference of the credentials stored in the file", + "type": "string" + } + } + }, + "v1GcpAccountNameValidateSpec": { + "description": "Gcp cloud account name validate spec", + "type": "object", + "required": [ + "credentials", + "bucketName" + ], + "properties": { + "bucketName": { + "description": "Bucket name in the GCP", + "type": "string" + }, + "credentials": { + "$ref": "#/definitions/v1GcpAccountValidateSpec" + }, + "projectId": { + "description": "ProjectId in the GCP", + "type": "string" + } + } + }, + "v1GcpAccountSpec": { + "type": "object", + "properties": { + "jsonCredentials": { + "description": "Gcp cloud account json credentials", + "type": "string" + }, + "jsonCredentialsFileName": { + "description": "Reference of the credentials stored in the file", + "type": "string" + } + } + }, + "v1GcpAccountValidateSpec": { + "description": "Gcp cloud account entity which takes json credentials or reference to the file where credentials are stored", + "type": "object", + "properties": { + "jsonCredentials": { + "description": "Gcp cloud account json credentials", + "type": "string" + }, + "jsonCredentialsFileUid": { + "description": "Reference of the credentials stored in the file", + "type": "string" + } + } + }, + "v1GcpAccounts": { + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1GcpAccount" + } + }, + "listmeta": { + "$ref": "#/definitions/v1ListMetaData" + } + } + }, + "v1GcpCloudAccountValidateEntity": { + "description": "Gcp cloud account spec", + "type": "object", + "properties": { + "spec": { + "$ref": "#/definitions/v1GcpAccountValidateSpec" + } + } + }, + "v1GcpCloudClusterConfigEntity": { + "description": "Gcp cloud cluster config entity", + "type": "object", + "properties": { + "clusterConfig": { + "$ref": "#/definitions/v1GcpClusterConfig" + } + } + }, + "v1GcpCloudConfig": { + "description": "GcpCloudConfig is the Schema for the gcpcloudconfigs API", + "type": "object", + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + "type": "string" + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/v1GcpCloudConfigSpec" + }, + "status": { + "$ref": "#/definitions/v1GcpCloudConfigStatus" + } + } + }, + "v1GcpCloudConfigSpec": { + "description": "GcpCloudConfigSpec defines the cloud configuration input by user This will translate to clusterspec/machinespec for cluster-api", + "type": "object", + "properties": { + "cloudAccountRef": { + "description": "cloudAccountRef should point to the secret which contains GcpCloudAccount", + "$ref": "#/definitions/v1ObjectReference" + }, + "clusterConfig": { + "$ref": "#/definitions/v1GcpClusterConfig" + }, + "machinePoolConfig": { + "type": "array", + "items": { + "$ref": "#/definitions/v1GcpMachinePoolConfig" + } + } + } + }, + "v1GcpCloudConfigStatus": { + "description": "GcpCloudConfigStatus defines the observed state of GcpCloudConfig The cloudimage info built by Mold is stored here image should be mapped to a specific machinepool", + "type": "object", + "properties": { + "ansibleRoleDigest": { + "description": "For mold controller to identify if is there any changes in Pack", + "type": "string" + }, + "conditions": { + "description": "spectroAnsibleProvisioner: should be added only once, subsequent recocile will use the same provisioner SpectroAnsiblePacker bool `json:\"spectroAnsiblePacker,omitempty\"`", + "type": "array", + "items": { + "$ref": "#/definitions/v1ClusterCondition" + } + }, + "images": { + "description": "Images array items should be 1-to-1 mapping to Spec.MachinePoolConfig", + "$ref": "#/definitions/v1GcpImage" + }, + "isAddonLayer": { + "description": "addon layers present in spc", + "type": "boolean" + }, + "roleDigest": { + "description": "this map will be for ansible roles present in each pack", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "sourceImageId": { + "description": "sourceImageId, it can be from packref's annotations or from pack.json", + "type": "string" + }, + "useCapiImage": { + "description": "PackerVariableDigest string `json:\"packerDigest,omitempty\"` If no ansible roles found in Packs then Mold should tell Drive to use capi image and not create custom image, because there is nothing to add", + "type": "boolean" + } + } + }, + "v1GcpClusterConfig": { + "description": "Cluster level configuration for gcp cloud and applicable for all the machine pools", + "type": "object", + "required": [ + "project", + "region" + ], + "properties": { + "managedClusterConfig": { + "$ref": "#/definitions/v1GcpManagedClusterConfig" + }, + "network": { + "description": "NetworkName if empty would create VPC Network in auto mode. If provided, custom VPC network will be used", + "type": "string" + }, + "project": { + "description": "Name of the project in which cluster is to be deployed", + "type": "string" + }, + "region": { + "description": "GCP region for the cluster", + "type": "string" + } + } + }, + "v1GcpImage": { + "description": "Refers to GCP image", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "os": { + "type": "string" + }, + "region": { + "type": "string" + }, + "state": { + "type": "string" + } + } + }, + "v1GcpImageUrlEntity": { + "description": "Gcp image url entity", + "type": "object", + "properties": { + "imageFamily": { + "description": "The name of the image family to which this image belongs", + "type": "string" + }, + "imageUrl": { + "description": "Server-defined URL for the resource", + "type": "string" + }, + "name": { + "description": "Name of the resource", + "type": "string" + } + } + }, + "v1GcpInstanceTypes": { + "description": "Retrieves a list of GCP instance types", + "type": "object", + "properties": { + "instanceTypes": { + "description": "List of GCP instance types", + "type": "array", + "items": { + "$ref": "#/definitions/v1InstanceType" + } + } + } + }, + "v1GcpMachine": { + "description": "GCP cloud VM definition", + "type": "object", + "properties": { + "apiVersion": { + "type": "string" + }, + "kind": { + "type": "string" + }, + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/v1GcpMachineSpec" + }, + "status": { + "$ref": "#/definitions/v1CloudMachineStatus" + } + } + }, + "v1GcpMachinePoolCloudConfigEntity": { + "type": "object", + "required": [ + "instanceType" + ], + "properties": { + "azs": { + "type": "array", + "items": { + "type": "string" + } + }, + "instanceType": { + "type": "string" + }, + "rootDeviceSize": { + "description": "Size of root volume in GB. Default is 30GB", + "type": "integer", + "format": "int64" + }, + "subnet": { + "description": "Subnet specifies the subnetwork to use for given instance. If not specified, the first subnet from the cluster region and network is used", + "type": "string" + }, + "subnets": { + "type": "array", + "items": { + "$ref": "#/definitions/v1GcpSubnetEntity" + } + } + } + }, + "v1GcpMachinePoolConfig": { + "type": "object", + "required": [ + "isControlPlane", + "instanceType" + ], + "properties": { + "additionalLabels": { + "description": "additionalLabels", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "additionalTags": { + "description": "AdditionalTags is an optional set of tags to add to resources managed by the provider, in addition to the ones added by default. For eg., tags for EKS nodeGroup or EKS NodegroupIAMRole", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "azs": { + "type": "array", + "items": { + "type": "string" + } + }, + "instanceConfig": { + "$ref": "#/definitions/v1InstanceConfig" + }, + "instanceType": { + "type": "string" + }, + "isControlPlane": { + "description": "whether this pool is for control plane", + "type": "boolean" + }, + "labels": { + "description": "labels for this pool, example: control-plane/worker, gpu, windows", + "type": "array", + "items": { + "type": "string" + } + }, + "machinePoolProperties": { + "$ref": "#/definitions/v1MachinePoolProperties" + }, + "maxSize": { + "description": "max size of the pool, for scaling", + "type": "integer", + "format": "int32" + }, + "minSize": { + "description": "min size of the pool, for scaling", + "type": "integer", + "format": "int32" + }, + "name": { + "type": "string" + }, + "nodeRepaveInterval": { + "description": "Minimum number of seconds a node should be Ready, before the next node is selected for repave. Applicable only for workerpools in infrastructure cluster", + "type": "integer", + "format": "int32" + }, + "rootDeviceSize": { + "description": "Size of root volume in GB. Default is 30GB", + "type": "integer", + "format": "int64" + }, + "size": { + "description": "size of the pool, number of machines", + "type": "integer", + "format": "int32" + }, + "subnet": { + "description": "Subnet specifies the subnetwork to use for given instance. If not specified, the first subnet from the cluster region and network is used", + "type": "string" + }, + "subnetIds": { + "description": "AZ to subnet mapping filled by ally from hubble SubnetIDs [\"us-west-2d\"] = \"subnet-079b6061\" This field is optional If we don't provide a subnetId then by default the first private subnet from the AZ will be picked up for deployment", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "taints": { + "description": "control plane or worker taints", + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1Taint" + } + }, + "updateStrategy": { + "description": "rolling update strategy for this machinepool if not specified, will use ScaleOut", + "$ref": "#/definitions/v1UpdateStrategy" + }, + "useControlPlaneAsWorker": { + "description": "if IsControlPlane==true \u0026\u0026 useControlPlaneAsWorker==true, then will remove control plane taint this will not be used for worker pools", + "type": "boolean" + } + } + }, + "v1GcpMachinePoolConfigEntity": { + "type": "object", + "required": [ + "cloudConfig" + ], + "properties": { + "cloudConfig": { + "$ref": "#/definitions/v1GcpMachinePoolCloudConfigEntity" + }, + "poolConfig": { + "$ref": "#/definitions/v1MachinePoolConfigEntity" + } + } + }, + "v1GcpMachineSpec": { + "description": "GCP cloud VM definition spec", + "type": "object", + "required": [ + "instanceType" + ], + "properties": { + "image": { + "type": "string" + }, + "instanceConfig": { + "$ref": "#/definitions/v1InstanceConfig" + }, + "instanceType": { + "type": "string" + }, + "nics": { + "type": "array", + "items": { + "$ref": "#/definitions/v1GcpNic" + } + }, + "project": { + "type": "string" + }, + "region": { + "type": "string" + }, + "rootDeviceSize": { + "type": "integer", + "format": "int64" + }, + "zone": { + "type": "string" + } + } + }, + "v1GcpMachines": { + "description": "GCP machine list", + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1GcpMachine" + } + }, + "listmeta": { + "$ref": "#/definitions/v1ListMetaData" + } + } + }, + "v1GcpManagedClusterConfig": { + "description": "GCP managed cluster config", + "type": "object", + "properties": { + "enableAutoPilot": { + "description": "EnableAutopilot indicates whether to enable autopilot for this GKE cluster", + "type": "boolean" + }, + "location": { + "description": "Can be Region or Zone", + "type": "string" + } + } + }, + "v1GcpNetwork": { + "description": "GCP network enity is a virtual version of a physical network", + "type": "object", + "properties": { + "name": { + "description": "GCP network name", + "type": "string" + }, + "subnets": { + "description": "List of GCP subnet", + "type": "array", + "items": { + "$ref": "#/definitions/v1GcpSubnet" + } + } + } + }, + "v1GcpNetworks": { + "description": "List of GCP networks", + "type": "object", + "properties": { + "networks": { + "type": "array", + "items": { + "$ref": "#/definitions/v1GcpNetwork" + } + } + } + }, + "v1GcpNic": { + "description": "GCP network interface", + "type": "object", + "properties": { + "index": { + "type": "integer", + "format": "int8" + }, + "networkName": { + "type": "string" + }, + "privateIPs": { + "type": "array", + "items": { + "type": "string" + } + }, + "publicIp": { + "type": "string" + } + } + }, + "v1GcpProject": { + "description": "GCP project organizes all Google Cloud resources", + "type": "object", + "properties": { + "id": { + "description": "GCP project id", + "type": "string" + }, + "name": { + "description": "GCP project name", + "type": "string" + } + } + }, + "v1GcpProjects": { + "description": "List of GCP Projects", + "type": "object", + "properties": { + "projects": { + "description": "List of GCP Projects", + "type": "array", + "items": { + "$ref": "#/definitions/v1GcpProject" + } + } + } + }, + "v1GcpRegion": { + "description": "Geographical region made up of zones where you can host your GCP resources", + "type": "object", + "properties": { + "name": { + "description": "GCP region name", + "type": "string" + }, + "status": { + "description": "GCP region status", + "type": "string" + } + } + }, + "v1GcpRegions": { + "description": "List of GCP Regions", + "type": "object", + "properties": { + "regions": { + "type": "array", + "items": { + "$ref": "#/definitions/v1GcpRegion" + } + } + } + }, + "v1GcpStorageConfig": { + "description": "GCP storage config object", + "type": "object", + "required": [ + "bucketName", + "credentials" + ], + "properties": { + "bucketName": { + "description": "GCP storage bucket name", + "type": "string" + }, + "credentials": { + "description": "GCP cloud account credentials", + "$ref": "#/definitions/v1.GcpAccountEntitySpec" + }, + "projectId": { + "description": "GCP project id", + "type": "string" + } + } + }, + "v1GcpStorageTypes": { + "description": "List of GCP storage types", + "type": "object", + "properties": { + "storageTypes": { + "type": "array", + "items": { + "$ref": "#/definitions/v1StorageType" + } + } + } + }, + "v1GcpSubnet": { + "description": "Subnets are regional resources, and have IP address ranges associated with them", + "type": "object", + "properties": { + "id": { + "description": "GCP subnet id", + "type": "string" + }, + "name": { + "description": "GCP subnet name", + "type": "string" + } + } + }, + "v1GcpSubnetEntity": { + "properties": { + "az": { + "type": "string" + }, + "id": { + "type": "string" + } + } + }, + "v1GcpZone": { + "description": "A zone is a deployment area for Google Cloud resources within a region", + "type": "object", + "properties": { + "name": { + "description": "GCP zone name", + "type": "string" + } + } + }, + "v1GcpZones": { + "description": "List of GCP zones", + "type": "object", + "properties": { + "zones": { + "type": "array", + "items": { + "$ref": "#/definitions/v1GcpZone" + } + } + } + }, + "v1GenericCloudClusterConfigEntity": { + "description": "Generic cloud cluster config entity", + "type": "object", + "properties": { + "clusterConfig": { + "$ref": "#/definitions/v1GenericClusterConfig" + } + } + }, + "v1GenericCloudConfig": { + "description": "Generic CloudConfig for all cloud types", + "properties": { + "kind": { + "type": "string" + }, + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/v1GenericCloudConfigSpec" + } + } + }, + "v1GenericCloudConfigSpec": { + "description": "Generic CloudConfig spec for all cloud types", + "type": "object", + "properties": { + "cloudAccountRef": { + "description": "Cloud account reference is optional and dynamically handled based on the kind", + "$ref": "#/definitions/v1ObjectReference" + }, + "clusterConfig": { + "$ref": "#/definitions/v1GenericClusterConfig" + }, + "edgeHostRefs": { + "description": "Appliances (Edge Host) uids", + "type": "array", + "items": { + "$ref": "#/definitions/v1ObjectReference" + } + }, + "machinePoolConfig": { + "type": "array", + "items": { + "$ref": "#/definitions/v1GenericMachinePoolConfig" + } + } + } + }, + "v1GenericClusterConfig": { + "description": "Generic cluster config", + "type": "object", + "properties": { + "instanceType": { + "$ref": "#/definitions/v1GenericInstanceType" + }, + "region": { + "description": "cluster region information", + "type": "string" + } + } + }, + "v1GenericInstanceType": { + "type": "object", + "properties": { + "diskGiB": { + "description": "DiskGiB is the size of a virtual machine's disk, in GiB", + "type": "integer", + "format": "int32" + }, + "memoryMiB": { + "description": "MemoryMiB is the size of a virtual machine's memory, in MiB", + "type": "integer", + "format": "int64" + }, + "name": { + "type": "string" + }, + "numCPUs": { + "description": "NumCPUs is the number of virtual processors in a virtual machine", + "type": "integer", + "format": "int32" + } + } + }, + "v1GenericMachine": { + "description": "Generic cloud VM definition", + "properties": { + "apiVersion": { + "type": "string" + }, + "kind": { + "type": "string" + }, + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/v1GenericMachineSpec" + }, + "status": { + "$ref": "#/definitions/v1CloudMachineStatus" + } + } + }, + "v1GenericMachinePoolConfig": { + "type": "object", + "required": [ + "isControlPlane" + ], + "properties": { + "instanceType": { + "type": "string" + }, + "isControlPlane": { + "description": "whether this pool is for control plane", + "type": "boolean" + }, + "labels": { + "description": "labels for this pool, example: control-plane/worker, gpu, windows", + "type": "array", + "items": { + "type": "string" + } + }, + "name": { + "type": "string" + }, + "rootDeviceSize": { + "description": "Size of root volume in GB. Default is 30GB", + "type": "integer", + "format": "int64" + }, + "size": { + "description": "size of the pool, number of machines", + "type": "integer", + "format": "int32" + }, + "useControlPlaneAsWorker": { + "description": "if IsControlPlane==true \u0026\u0026 useControlPlaneAsWorker==true, then will remove control plane taint this will not be used for worker pools", + "type": "boolean" + } + } + }, + "v1GenericMachinePoolConfigEntity": { + "properties": { + "cloudConfig": { + "$ref": "#/definitions/v1GenericClusterConfig" + }, + "poolConfig": { + "$ref": "#/definitions/v1MachinePoolConfigEntity" + } + } + }, + "v1GenericMachineSpec": { + "description": "Generic cloud VM definition spec", + "properties": { + "hostName": { + "type": "string" + }, + "imageId": { + "type": "string" + }, + "instanceType": { + "$ref": "#/definitions/v1GenericInstanceType" + }, + "nics": { + "type": "array", + "items": { + "$ref": "#/definitions/v1GenericNic" + } + }, + "sshKeyName": { + "type": "string" + } + } + }, + "v1GenericMachines": { + "description": "Generic machine list", + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1GenericMachine" + } + }, + "listmeta": { + "$ref": "#/definitions/v1ListMetaData" + } + } + }, + "v1GenericNic": { + "description": "Generic network interface", + "type": "object", + "properties": { + "index": { + "type": "integer", + "format": "int8" + }, + "networkName": { + "type": "string" + }, + "privateIPs": { + "type": "array", + "items": { + "type": "string" + } + }, + "publicIp": { + "type": "string" + } + } + }, + "v1GeolocationLatlong": { + "description": "Geolocation Latlong entity", + "type": "object", + "properties": { + "latitude": { + "description": "Latitude of a resource", + "type": "number", + "format": "float64", + "x-omitempty": false + }, + "longitude": { + "description": "Longitude of a resource", + "type": "number", + "format": "float64", + "x-omitempty": false + } + } + }, + "v1GitRepoFileContent": { + "type": "object", + "properties": { + "content": { + "type": "string" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "repoName": { + "type": "string" + }, + "sha": { + "type": "string" + } + } + }, + "v1HelmChartOption": { + "description": "If chart options are provided then the specified chart is validated first and synced immediately. If the specified chart is not found in the specified registry then creation is cancelled.", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "version": { + "type": "string" + } + } + }, + "v1HelmRegistries": { + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1HelmRegistry" + } + }, + "listmeta": { + "$ref": "#/definitions/v1ListMetaData" + } + } + }, + "v1HelmRegistriesSummary": { + "description": "Helm Registries Summary", + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1HelmRegistrySummary" + } + }, + "listmeta": { + "$ref": "#/definitions/v1ListMetaData" + } + } + }, + "v1HelmRegistry": { + "description": "Helm registry information", + "type": "object", + "properties": { + "apiVersion": { + "type": "string" + }, + "kind": { + "type": "string" + }, + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/v1HelmRegistrySpec" + }, + "status": { + "$ref": "#/definitions/v1HelmRegistryStatus" + } + } + }, + "v1HelmRegistryCreateOption": { + "description": "Helm registry create options", + "type": "object", + "properties": { + "charts": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1HelmChartOption" + } + }, + "skipSync": { + "type": "boolean" + } + } + }, + "v1HelmRegistryEntity": { + "description": "Helm registry information", + "type": "object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/v1HelmRegistrySpecEntity" + } + } + }, + "v1HelmRegistrySpec": { + "description": "Helm registry credentials spec", + "type": "object", + "required": [ + "endpoint", + "auth" + ], + "properties": { + "auth": { + "$ref": "#/definitions/v1RegistryAuth" + }, + "endpoint": { + "type": "string" + }, + "isPrivate": { + "type": "boolean", + "x-omitempty": false + }, + "name": { + "type": "string" + }, + "registryUid": { + "description": "Helm registry uid", + "type": "string" + }, + "scope": { + "type": "string" + } + } + }, + "v1HelmRegistrySpecEntity": { + "description": "Helm registry credentials spec", + "type": "object", + "required": [ + "endpoint", + "auth" + ], + "properties": { + "auth": { + "$ref": "#/definitions/v1RegistryAuth" + }, + "createOption": { + "$ref": "#/definitions/v1HelmRegistryCreateOption" + }, + "endpoint": { + "type": "string" + }, + "isPrivate": { + "type": "boolean" + }, + "name": { + "type": "string" + }, + "scope": { + "type": "string" + } + } + }, + "v1HelmRegistrySpecSummary": { + "description": "Helm Registry spec summary", + "type": "object", + "properties": { + "endpoint": { + "type": "string" + }, + "isPrivate": { + "type": "boolean", + "x-omitempty": false + }, + "scope": { + "type": "string" + } + } + }, + "v1HelmRegistryStatus": { + "description": "Status of the helm registry", + "type": "object", + "properties": { + "helmSyncStatus": { + "$ref": "#/definitions/v1RegistrySyncStatus" + } + } + }, + "v1HelmRegistryStatusSummary": { + "description": "Helm registry status summary", + "properties": { + "sync": { + "$ref": "#/definitions/v1RegistrySyncStatus" + } + } + }, + "v1HelmRegistrySummary": { + "description": "Helm Registry summary", + "type": "object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/v1HelmRegistrySpecSummary" + }, + "status": { + "$ref": "#/definitions/v1HelmRegistryStatusSummary" + } + } + }, + "v1HostClusterConfig": { + "properties": { + "clusterEndpoint": { + "description": "host cluster configuration", + "$ref": "#/definitions/v1HostClusterEndpoint" + }, + "clusterGroup": { + "description": "cluster group reference", + "$ref": "#/definitions/v1ObjectReference" + }, + "hostCluster": { + "description": "host cluster reference", + "$ref": "#/definitions/v1ObjectReference" + }, + "isHostCluster": { + "description": "is enabled as host cluster", + "type": "boolean", + "default": false, + "x-omitempty": false + } + } + }, + "v1HostClusterConfigEntity": { + "type": "object", + "properties": { + "hostClusterConfig": { + "$ref": "#/definitions/v1HostClusterConfig" + } + } + }, + "v1HostClusterConfigResponse": { + "properties": { + "clusterGroup": { + "description": "cluster group reference", + "$ref": "#/definitions/v1ObjectReference" + } + } + }, + "v1HostClusterEndpoint": { + "properties": { + "config": { + "$ref": "#/definitions/v1HostClusterEndpointConfig" + }, + "type": { + "description": "is enabled as host cluster", + "type": "string", + "enum": [ + "Ingress", + "LoadBalancer" + ] + } + } + }, + "v1HostClusterEndpointConfig": { + "properties": { + "ingressConfig": { + "$ref": "#/definitions/v1IngressConfig" + }, + "loadBalancerConfig": { + "$ref": "#/definitions/v1LoadBalancerConfig" + } + } + }, + "v1HttpPatch": { + "type": "object", + "required": [ + "op", + "path" + ], + "properties": { + "from": { + "description": "A path to the pointer from which reference will be taken", + "type": "string" + }, + "op": { + "description": "The operation to be performed", + "type": "string", + "enum": [ + "add", + "remove", + "replace", + "move", + "copy" + ] + }, + "path": { + "description": "A path to the pointer on which operation will be done", + "type": "string" + }, + "value": { + "description": "The value to be used within the operations.", + "type": "object" + } + } + }, + "v1IPPool": { + "description": "IPPool defines static IPs available. Gateway, Prefix, Nameserver, if defined, will be default values for all Pools", + "type": "object", + "properties": { + "gateway": { + "description": "Gateway is the gateway ip address", + "type": "string" + }, + "nameserver": { + "description": "Nameserver provide information for dns resolvation", + "$ref": "#/definitions/v1Nameserver" + }, + "pools": { + "description": "Pools contains the list of IP addresses pools", + "type": "array", + "items": { + "$ref": "#/definitions/v1Pool" + } + }, + "prefix": { + "description": "Prefix is the mask of the network as integer (max 128)", + "type": "integer", + "format": "int32" + }, + "uid": { + "description": "UID is the UID of this IPPool, used by Hubble", + "type": "string" + } + } + }, + "v1IdentityProvider": { + "description": "Describes a predefined Identity Provider (IDP)", + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + } + }, + "v1IdentityProviders": { + "description": "Describes a list of predefined Identity Provider (IDP)", + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1IdentityProvider" + } + }, + "v1ImportClusterConfig": { + "type": "object", + "properties": { + "importMode": { + "description": "If the importMode is empty then cluster is imported with full permission mode. By default importMode is empty and cluster is imported in full permission mode.", + "type": "string", + "enum": [ + "read-only" + ] + }, + "proxy": { + "description": "Cluster proxy settings", + "$ref": "#/definitions/v1ClusterProxySpec" + } + } + }, + "v1ImportEdgeHostConfig": { + "type": "object", + "properties": { + "edgeHostUid": { + "description": "Deprecated. Use 'edgeHostUids' field", + "type": "string" + }, + "edgeHostUids": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "v1InfraLBConfig": { + "type": "object", + "properties": { + "apiServerLB": { + "description": "APIServerLB is the configuration for the control-plane load balancer.", + "$ref": "#/definitions/v1LoadBalancerSpec" + } + } + }, + "v1IngressConfig": { + "description": "Ingress configuration for exposing the virtual cluster's kube-apiserver", + "properties": { + "host": { + "type": "string" + }, + "port": { + "type": "integer", + "format": "int64" + } + } + }, + "v1InstanceConfig": { + "properties": { + "category": { + "type": "string" + }, + "cpuSet": { + "type": "integer", + "format": "int64" + }, + "diskGiB": { + "type": "integer", + "format": "int64" + }, + "memoryMiB": { + "description": "MemoryMiB is the size of a virtual machine's memory, in MiB", + "type": "integer", + "format": "int64" + }, + "name": { + "type": "string" + }, + "numCPUs": { + "description": "NumCPUs is the number of virtual processors in a virtual machine", + "type": "integer", + "format": "int32" + } + } + }, + "v1InstanceCost": { + "description": "Instance cost entity", + "type": "object", + "properties": { + "price": { + "description": "Array of cloud instance price", + "type": "array", + "items": { + "$ref": "#/definitions/v1InstancePrice" + } + } + } + }, + "v1InstancePrice": { + "description": "Cloud instance price", + "type": "object", + "properties": { + "onDemand": { + "description": "OnDemand price of instance", + "type": "number", + "format": "double" + }, + "os": { + "description": "Os associated with instance price. Allowed values - [linux, windows]", + "type": "string", + "enum": [ + "linux", + "windows" + ] + }, + "spot": { + "description": "Spot price of instance", + "type": "number", + "format": "double" + } + } + }, + "v1InstanceType": { + "description": "Cloud Instance type details", + "type": "object", + "properties": { + "category": { + "description": "Category of instance type", + "type": "string", + "x-go-name": "Category" + }, + "cost": { + "$ref": "#/definitions/v1InstanceCost" + }, + "cpu": { + "description": "Cpu of instance type", + "type": "number", + "format": "double", + "x-go-name": "Cpu" + }, + "gpu": { + "description": "Gpu of instance type", + "type": "number", + "format": "double", + "x-go-name": "Gpu" + }, + "memory": { + "description": "Memory of instance type", + "type": "number", + "format": "double", + "x-go-name": "Memory" + }, + "nonSupportedZones": { + "description": "Non supported zones of the instance in a particular region", + "type": "array", + "items": { + "type": "string" + } + }, + "price": { + "description": "Price of instance type", + "type": "number", + "format": "double", + "x-go-name": "Price" + }, + "supportedArchitectures": { + "description": "Supported architecture of the instance", + "type": "array", + "items": { + "type": "string" + } + }, + "type": { + "description": "Type of instance type", + "type": "string", + "x-go-name": "Type" + } + } + }, + "v1Invoice": { + "description": "Invoice object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/v1InvoiceSpec" + }, + "status": { + "$ref": "#/definitions/v1InvoiceStatus" + } + } + }, + "v1InvoiceBillingPeriod": { + "description": "Invoice billing period object", + "properties": { + "end": { + "$ref": "#/definitions/v1Time" + }, + "start": { + "$ref": "#/definitions/v1Time" + } + } + }, + "v1InvoiceCredits": { + "description": "Invoice credits object", + "properties": { + "alloyFreeCredits": { + "description": "Credits allocated for import clusters", + "type": "number", + "format": "int64" + }, + "pureFreeCredits": { + "description": "Credits allocated for managed clusters", + "type": "number", + "format": "int64" + } + } + }, + "v1InvoicePlan": { + "description": "Invoice plan object", + "properties": { + "freeCredits": { + "description": "List of free credits", + "type": "array", + "items": { + "$ref": "#/definitions/v1InvoicePlanCredit" + } + }, + "plantype": { + "type": "string", + "enum": [ + "Trial", + "MonthlyOnDemand", + "AnnualSubscription" + ] + }, + "slaCredits": { + "description": "List of SLA credits", + "type": "array", + "items": { + "$ref": "#/definitions/v1InvoicePlanCredit" + } + } + } + }, + "v1InvoicePlanCredit": { + "description": "Invoice plan credit object", + "properties": { + "planCredit": { + "$ref": "#/definitions/v1PlanCredit" + }, + "totalCpuCoreHours": { + "description": "Total used cpu core hours", + "type": "number", + "format": "int64" + } + } + }, + "v1InvoiceProduct": { + "description": "Product invoice object", + "properties": { + "alloy": { + "$ref": "#/definitions/v1InvoiceProductData" + }, + "pure": { + "$ref": "#/definitions/v1InvoiceProductData" + } + } + }, + "v1InvoiceProductData": { + "description": "Product invoice data", + "properties": { + "allocatedCredits": { + "description": "Allocated credits", + "type": "number", + "format": "int64" + }, + "amount": { + "description": "Total amount", + "type": "number", + "format": "float64" + }, + "billableCredits": { + "description": "Credits to be billed", + "type": "number", + "format": "float64" + }, + "breachedCredits": { + "description": "Credits that are exceeds the allocated credits", + "type": "number", + "format": "float64" + }, + "discount": { + "description": "Applied discount", + "type": "number", + "format": "int64" + }, + "freeCredits": { + "description": "Allocated free credits", + "type": "number", + "format": "int64" + }, + "overageLimitPercentage": { + "description": "Allowed overage limit in percentage", + "type": "number", + "format": "int8" + }, + "tierName": { + "description": "Tier name", + "type": "string" + }, + "tierPrice": { + "description": "Tier price", + "type": "number", + "format": "float64" + }, + "totalUsedCredits": { + "description": "Total used credits", + "type": "number", + "format": "float64" + }, + "usedCredits": { + "description": "Used credits", + "type": "number", + "format": "float64" + } + } + }, + "v1InvoiceProject": { + "description": "Invoice project object", + "properties": { + "amount": { + "description": "Billing amount for the project", + "type": "number", + "format": "float64" + }, + "projectName": { + "description": "Name of the project", + "type": "string" + }, + "projectUid": { + "description": "Project identifier", + "type": "string" + }, + "usage": { + "description": "Usage by the project", + "$ref": "#/definitions/v1ProjectUsage" + } + } + }, + "v1InvoiceSpec": { + "description": "Invoice specification", + "properties": { + "address": { + "$ref": "#/definitions/v1Address" + }, + "billingPeriod": { + "$ref": "#/definitions/v1InvoiceBillingPeriod" + }, + "credits": { + "$ref": "#/definitions/v1InvoiceCredits" + }, + "envType": { + "description": "Environment type [Trial,MonthlyOnDemand,AnnualSubscription,OnPrem]", + "type": "string" + }, + "month": { + "description": "Month for which invoice is generated", + "$ref": "#/definitions/v1Time" + }, + "paymentUnit": { + "type": "string", + "enum": [ + "usd" + ] + }, + "plan": { + "$ref": "#/definitions/v1InvoicePlan" + } + } + }, + "v1InvoiceState": { + "description": "Invoice state object", + "properties": { + "paymentMsg": { + "description": "Payment status message", + "type": "string" + }, + "state": { + "type": "string", + "enum": [ + "Paid", + "PaymentPending", + "PaymentInProgress", + "PaymentFailed" + ] + }, + "timestamp": { + "description": "Time on which the state has been updated", + "$ref": "#/definitions/v1Time" + } + } + }, + "v1InvoiceStatus": { + "description": "Invoice Status", + "properties": { + "billableAmount": { + "description": "Total billable amount", + "type": "number", + "format": "float64" + }, + "productInvoice": { + "$ref": "#/definitions/v1InvoiceProduct" + }, + "projects": { + "description": "List of project invoices", + "type": "array", + "items": { + "$ref": "#/definitions/v1InvoiceProject" + } + }, + "states": { + "description": "List of invoice states", + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1InvoiceState" + } + }, + "stripeInvoiceId": { + "description": "Stripe invoice uid", + "type": "string" + } + } + }, + "v1IpPoolEntity": { + "description": "IP Pool entity definition", + "type": "object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "type": "object", + "properties": { + "pool": { + "$ref": "#/definitions/v1Pool" + }, + "priavetGatewayUid": { + "type": "string" + }, + "restrictToSingleCluster": { + "description": "if true, restricts this IP pool to be used by single cluster at any time", + "type": "boolean", + "x-omitempty": false + } + } + }, + "status": { + "$ref": "#/definitions/v1IpPoolStatus" + } + } + }, + "v1IpPoolInputEntity": { + "description": "IP Pool input entity definition", + "type": "object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "type": "object", + "required": [ + "pool" + ], + "properties": { + "pool": { + "$ref": "#/definitions/v1Pool" + }, + "restrictToSingleCluster": { + "description": "if true, restricts this IP pool to be used by single cluster at any time", + "type": "boolean" + } + } + } + } + }, + "v1IpPoolStatus": { + "description": "IP Pool status", + "type": "object", + "properties": { + "allottedIps": { + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + } + }, + "associatedClusters": { + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + } + }, + "inUse": { + "type": "boolean", + "x-omitempty": false + } + } + }, + "v1IpPools": { + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1IpPoolEntity" + } + } + } + }, + "v1K8MachineCertificate": { + "description": "K8 Certificates for control plane nodes", + "type": "object", + "properties": { + "certificateAuthorities": { + "description": "Applicable certificate authorities", + "type": "array", + "items": { + "$ref": "#/definitions/v1k8CertificateAuthority" + } + }, + "name": { + "type": "string" + } + } + }, + "v1KubeBenchEntity": { + "description": "KubeBench response", + "required": [ + "requestUid", + "status", + "reports" + ], + "properties": { + "reports": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/v1KubeBenchReportEntity" + } + }, + "requestUid": { + "type": "string" + }, + "status": { + "type": "string", + "enum": [ + "Completed", + "InProgress", + "Failed", + "Initiated" + ] + } + } + }, + "v1KubeBenchLog": { + "description": "Compliance Scan KubeBench Log", + "properties": { + "description": { + "type": "string" + }, + "expected": { + "type": "string" + }, + "remediation": { + "type": "string" + }, + "state": { + "type": "string" + }, + "testId": { + "type": "string" + }, + "value": { + "type": "string" + } + } + }, + "v1KubeBenchLogEntity": { + "description": "KubeBench log", + "properties": { + "description": { + "type": "string" + }, + "expected": { + "type": "string" + }, + "remediation": { + "type": "string" + }, + "state": { + "type": "string" + }, + "testId": { + "type": "string" + }, + "value": { + "type": "string" + } + } + }, + "v1KubeBenchReport": { + "description": "Compliance Scan KubeBench Report", + "properties": { + "fail": { + "type": "integer", + "format": "int32" + }, + "info": { + "type": "integer", + "format": "int32" + }, + "logs": { + "type": "array", + "items": { + "$ref": "#/definitions/v1KubeBenchLog" + } + }, + "name": { + "type": "string" + }, + "pass": { + "type": "integer", + "format": "int32" + }, + "time": { + "$ref": "#/definitions/v1Time" + }, + "type": { + "type": "string" + }, + "warn": { + "type": "integer", + "format": "int32" + } + } + }, + "v1KubeBenchReportEntity": { + "description": "KubeBench report", + "properties": { + "fail": { + "type": "integer", + "format": "int32" + }, + "info": { + "type": "integer", + "format": "int32" + }, + "logs": { + "type": "array", + "items": { + "$ref": "#/definitions/v1KubeBenchLogEntity" + } + }, + "name": { + "type": "string" + }, + "pass": { + "type": "integer", + "format": "int32" + }, + "time": { + "$ref": "#/definitions/v1Time" + }, + "type": { + "type": "string" + }, + "warn": { + "type": "integer", + "format": "int32" + } + } + }, + "v1KubeHunterEntity": { + "description": "KubeHunter response", + "required": [ + "requestUid", + "status", + "reports" + ], + "properties": { + "reports": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/v1KubeHunterReportEntity" + } + }, + "requestUid": { + "type": "string" + }, + "status": { + "type": "string", + "enum": [ + "Completed", + "InProgress", + "Failed", + "Initiated" + ] + } + } + }, + "v1KubeHunterLog": { + "description": "Compliance Scan KubeHunter Log", + "properties": { + "description": { + "type": "string" + }, + "evidence": { + "type": "string" + }, + "reference": { + "type": "string" + }, + "severity": { + "type": "string" + }, + "testId": { + "type": "string" + }, + "vulnerability": { + "type": "string" + } + } + }, + "v1KubeHunterLogEntity": { + "description": "KubeHunter log", + "properties": { + "description": { + "type": "string" + }, + "evidence": { + "type": "string" + }, + "reference": { + "type": "string" + }, + "severity": { + "type": "string" + }, + "testId": { + "type": "string" + }, + "vulnerability": { + "type": "string" + } + } + }, + "v1KubeHunterReport": { + "description": "Compliance Scan KubeHunter Report", + "properties": { + "logs": { + "type": "array", + "items": { + "$ref": "#/definitions/v1KubeHunterLog" + } + }, + "time": { + "$ref": "#/definitions/v1Time" + }, + "vulnerabilites": { + "$ref": "#/definitions/v1KubeHunterVulnerabilities" + } + } + }, + "v1KubeHunterReportEntity": { + "description": "KubeHunter report", + "properties": { + "logs": { + "type": "array", + "items": { + "$ref": "#/definitions/v1KubeHunterLogEntity" + } + }, + "time": { + "$ref": "#/definitions/v1Time" + }, + "vulnerabilities": { + "$ref": "#/definitions/v1KubeHunterVulnerabilityDataEntity" + } + } + }, + "v1KubeHunterVulnerabilities": { + "description": "Compliance Scan KubeHunter Vulnerabilities", + "properties": { + "high": { + "type": "integer", + "format": "int32" + }, + "low": { + "type": "integer", + "format": "int32" + }, + "medium": { + "type": "integer", + "format": "int32" + } + } + }, + "v1KubeHunterVulnerabilityDataEntity": { + "description": "KubeHunter vulnerability data", + "properties": { + "high": { + "type": "integer", + "format": "int32" + }, + "low": { + "type": "integer", + "format": "int32" + }, + "medium": { + "type": "integer", + "format": "int32" + } + } + }, + "v1KubeMeta": { + "description": "Spectro cluster kube meta", + "type": "object", + "properties": { + "hasKubeConfig": { + "type": "boolean", + "x-omitempty": false + }, + "hasKubeConfigClient": { + "type": "boolean", + "x-omitempty": false + }, + "hasManifest": { + "type": "boolean", + "x-omitempty": false + }, + "kubernetesVersion": { + "type": "string" + } + } + }, + "v1LifecycleConfig": { + "properties": { + "pause": { + "description": "enable pause life cycle config", + "type": "boolean", + "default": false, + "x-omitempty": false + } + } + }, + "v1LifecycleConfigEntity": { + "type": "object", + "properties": { + "lifecycleConfig": { + "$ref": "#/definitions/v1LifecycleConfig" + } + } + }, + "v1LifecycleStatus": { + "properties": { + "msg": { + "description": "error or success msg of lifecycle", + "type": "string" + }, + "status": { + "description": "lifecycle status", + "type": "string", + "enum": [ + "Pausing", + "Paused", + "Resuming", + "Running", + "Error" + ] + } + } + }, + "v1ListMetaData": { + "description": "ListMeta describes metadata for the resource listing", + "type": "object", + "properties": { + "continue": { + "description": "Next token for the pagination. Next token is equal to empty string indicates end of result set.", + "type": "string", + "x-omitempty": false + }, + "count": { + "description": "Total count of the resources which might change during pagination based on the resources addition or deletion", + "type": "integer", + "x-omitempty": false + }, + "limit": { + "description": "Number of records feteched", + "type": "integer", + "x-omitempty": false + }, + "offset": { + "description": "The next offset for the pagination. Starting index for which next request will be placed.", + "type": "integer", + "x-omitempty": false + } + } + }, + "v1LoadBalancerConfig": { + "description": "Load balancer configuration for exposing the virtual cluster's kube-apiserver", + "properties": { + "externalIPs": { + "type": "array", + "items": { + "type": "string" + } + }, + "externalTrafficPolicy": { + "type": "string" + }, + "loadBalancerSourceRanges": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "v1LoadBalancerService": { + "type": "object", + "properties": { + "host": { + "description": "IP or Host from svc.Status.LoadBalancerStatus.Ingress", + "type": "string" + }, + "name": { + "description": "name of the loadbalancer service", + "type": "string" + }, + "ports": { + "description": "port this service exposed", + "type": "array", + "items": { + "$ref": "#/definitions/v1ServicePort" + } + } + } + }, + "v1LoadBalancerSpec": { + "description": "LoadBalancerSpec defines an Azure load balancer.", + "type": "object", + "properties": { + "apiServerLBStaticIP": { + "type": "string" + }, + "ipAllocationMethod": { + "type": "string", + "default": "Dynamic", + "enum": [ + "Static", + "Dynamic" + ] + }, + "privateDNSName": { + "type": "string" + }, + "type": { + "description": "Load Balancer type", + "type": "string", + "default": "Public", + "enum": [ + "Internal", + "Public" + ] + } + } + }, + "v1LocationType": { + "description": "Location type", + "type": "string", + "default": "s3", + "enum": [ + "s3", + "gcp", + "minio" + ] + }, + "v1LoginBannerSettings": { + "properties": { + "Message": { + "description": "Login banner message displayed to the user", + "type": "string", + "x-omitempty": false + }, + "isEnabled": { + "description": "Set to 'true' if login banner has to be displayed for user", + "type": "boolean", + "x-omitempty": false + }, + "title": { + "description": "Banner title displayed to the user", + "type": "string", + "x-omitempty": false + } + } + }, + "v1LoginResponse": { + "description": "Returns the allowed login method and information with the organization details", + "type": "object", + "properties": { + "appEnv": { + "description": "Describes the env type. Possible values [ saas, self-hosted, quick-start, enterprise, airgap]", + "type": "string" + }, + "authType": { + "description": "Describes the default mode of authentication. Possible values [password, sso]", + "type": "string", + "enum": [ + "password", + "sso" + ] + }, + "orgName": { + "description": "Organization name.", + "type": "string" + }, + "redirectUrl": { + "description": "Describes the default redirect Url for authentication. If authType is sso, it will have tenant configured saml/oidc idp url else it will be users organization url", + "type": "string", + "x-omitempty": false + }, + "rootDomain": { + "description": "Describes the domain url on which the saas is available", + "type": "string" + }, + "securityMode": { + "description": "Describes which security mode is enabled", + "type": "string" + }, + "ssoLogins": { + "description": "Just Inside. Describes the allowed social logins", + "$ref": "#/definitions/v1SsoLogins" + }, + "totalTenants": { + "description": "Describes the total number of tenant present in the system", + "type": "number", + "format": "int64" + } + } + }, + "v1MaasAccount": { + "description": "Maas cloud account information", + "type": "object", + "properties": { + "apiVersion": { + "type": "string" + }, + "kind": { + "type": "string" + }, + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/v1MaasCloudAccount" + }, + "status": { + "$ref": "#/definitions/v1CloudAccountStatus" + } + } + }, + "v1MaasAccounts": { + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1MaasAccount" + } + }, + "listmeta": { + "$ref": "#/definitions/v1ListMetaData" + } + } + }, + "v1MaasCloudAccount": { + "type": "object", + "required": [ + "apiKey", + "apiEndpoint" + ], + "properties": { + "apiEndpoint": { + "type": "string" + }, + "apiKey": { + "type": "string" + }, + "preferredSubnets": { + "description": "list of preferred subnets order in the list reflects order in which subnets will be selected for ip address selection in apiserver dns endpoint this way user can specify external or preferable subnet \"10.11.130.0/24,10.10.10.0/24\"", + "type": "array", + "items": { + "type": "string", + "default": "" + } + } + } + }, + "v1MaasCloudClusterConfigEntity": { + "description": "Maas cloud cluster config entity", + "type": "object", + "properties": { + "clusterConfig": { + "$ref": "#/definitions/v1MaasClusterConfig" + } + } + }, + "v1MaasCloudConfig": { + "description": "MaasCloudConfig is the Schema for the maascloudconfigs API", + "type": "object", + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + "type": "string" + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/v1MaasCloudConfigSpec" + }, + "status": { + "$ref": "#/definitions/v1MaasCloudConfigStatus" + } + } + }, + "v1MaasCloudConfigSpec": { + "description": "MaasCloudConfigSpec defines the cloud configuration input by user This will translate to clusterspec/machinespec for cluster-api", + "type": "object", + "properties": { + "cloudAccountRef": { + "description": "cloudAccountRef should point to the secret which contains MaasCloudAccount", + "$ref": "#/definitions/v1ObjectReference" + }, + "clusterConfig": { + "$ref": "#/definitions/v1MaasClusterConfig" + }, + "machinePoolConfig": { + "type": "array", + "items": { + "$ref": "#/definitions/v1MaasMachinePoolConfig" + } + } + } + }, + "v1MaasCloudConfigStatus": { + "description": "MaasCloudConfigStatus defines the observed state of MaasCloudConfig The cloudimage info built by Mold is stored here image should be mapped to a specific machinepool", + "type": "object", + "properties": { + "ansibleRoleDigest": { + "description": "For mold controller to identify if is there any changes in Pack", + "type": "string" + }, + "conditions": { + "type": "array", + "items": { + "$ref": "#/definitions/v1ClusterCondition" + } + }, + "isAddonLayer": { + "description": "addon layers present in spc", + "type": "boolean" + }, + "nodeImage": { + "$ref": "#/definitions/v1MaasImage" + }, + "roleDigest": { + "description": "this map will be for ansible roles present in eack pack", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "sourceImageId": { + "description": "sourceImageId, it can be from packref's annotations or from pack.json", + "type": "string" + }, + "useCapiImage": { + "description": "PackerVariableDigest string `json:\"packerDigest,omitempty\"` If no ansible roles found in Packs then Mold should tell Drive to use capi image and not create custom image, because there is nothing to add", + "type": "boolean" + } + } + }, + "v1MaasClusterConfig": { + "description": "Cluster level configuration for MAAS cloud and applicable for all the machine pools", + "type": "object", + "required": [ + "domain" + ], + "properties": { + "domain": { + "description": "Domain name of the cluster to be provisioned", + "type": "string" + }, + "sshKeys": { + "description": "SSH keys specifies a list of ssh authorized keys for the 'spectro' user", + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "v1MaasDomain": { + "description": "Maas domain", + "type": "object", + "properties": { + "name": { + "description": "Name of Maas domain", + "type": "string" + } + } + }, + "v1MaasDomains": { + "description": "List of Maas domains", + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1MaasDomain" + } + } + } + }, + "v1MaasImage": { + "description": "Name of the image", + "type": "object", + "properties": { + "name": { + "description": "full path of the image template location it contains datacenter/folder/templatename etc eg: /mydc/vm/template/spectro/workerpool-1-centos", + "type": "string" + }, + "state": { + "type": "string" + } + } + }, + "v1MaasInstanceType": { + "type": "object", + "properties": { + "minCPU": { + "description": "Minimum CPU cores", + "type": "integer", + "format": "int32" + }, + "minMemInMB": { + "description": "Minimum memory in MiB", + "type": "integer", + "format": "int32" + } + } + }, + "v1MaasMachine": { + "description": "Maas cloud VM definition", + "type": "object", + "properties": { + "apiVersion": { + "type": "string" + }, + "kind": { + "type": "string" + }, + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/v1MaasMachineSpec" + }, + "status": { + "$ref": "#/definitions/v1CloudMachineStatus" + } + } + }, + "v1MaasMachineConfigEntity": { + "type": "object", + "properties": { + "azs": { + "description": "for control plane pool, this will be the failure domains for kcp", + "type": "array", + "items": { + "type": "string" + } + }, + "instanceType": { + "$ref": "#/definitions/v1MaasInstanceType" + }, + "resourcePool": { + "type": "string" + } + } + }, + "v1MaasMachinePoolCloudConfigEntity": { + "type": "object", + "required": [ + "instanceType", + "resourcePool" + ], + "properties": { + "azs": { + "type": "array", + "items": { + "type": "string" + } + }, + "instanceType": { + "$ref": "#/definitions/v1MaasInstanceType" + }, + "resourcePool": { + "description": "the resource pool", + "type": "string" + }, + "tags": { + "description": "Tags in maas environment", + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "v1MaasMachinePoolConfig": { + "type": "object", + "required": [ + "instanceType" + ], + "properties": { + "additionalLabels": { + "description": "additionalLabels", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "additionalTags": { + "description": "AdditionalTags is an optional set of tags to add to resources managed by the provider, in addition to the ones added by default. For eg., tags for EKS nodeGroup or EKS NodegroupIAMRole", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "azs": { + "type": "array", + "items": { + "type": "string" + } + }, + "instanceType": { + "description": "InstanceType defines the required CPU, Memory", + "$ref": "#/definitions/v1MaasInstanceType" + }, + "isControlPlane": { + "description": "whether this pool is for control plane", + "type": "boolean" + }, + "labels": { + "description": "labels for this pool, example: control-plane/worker, gpu, windows", + "type": "array", + "items": { + "type": "string" + } + }, + "machinePoolProperties": { + "$ref": "#/definitions/v1MachinePoolProperties" + }, + "maxSize": { + "description": "max size of the pool, for scaling", + "type": "integer", + "format": "int32" + }, + "minSize": { + "description": "min size of the pool, for scaling", + "type": "integer", + "format": "int32" + }, + "name": { + "type": "string" + }, + "nodeRepaveInterval": { + "description": "Minimum number of seconds a node should be Ready, before the next node is selected for repave. Applicable only for workerpools in infrastructure cluster", + "type": "integer", + "format": "int32" + }, + "resourcePool": { + "type": "string" + }, + "size": { + "description": "size of the pool, number of machines", + "type": "integer", + "format": "int32" + }, + "tags": { + "description": "Tags in maas environment", + "type": "array", + "items": { + "type": "string" + } + }, + "taints": { + "description": "control plane or worker taints", + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1Taint" + } + }, + "updateStrategy": { + "description": "rolling update strategy for this machinepool if not specified, will use ScaleOut", + "$ref": "#/definitions/v1UpdateStrategy" + }, + "useControlPlaneAsWorker": { + "description": "if IsControlPlane==true \u0026\u0026 useControlPlaneAsWorker==true, then will remove control plane taint this will not be used for worker pools", + "type": "boolean" + } + } + }, + "v1MaasMachinePoolConfigEntity": { + "type": "object", + "required": [ + "cloudConfig" + ], + "properties": { + "cloudConfig": { + "$ref": "#/definitions/v1MaasMachinePoolCloudConfigEntity" + }, + "poolConfig": { + "$ref": "#/definitions/v1MachinePoolConfigEntity" + } + } + }, + "v1MaasMachineSpec": { + "description": "Maas cloud VM definition spec", + "type": "object", + "properties": { + "az": { + "type": "string" + }, + "hostname": { + "type": "string" + }, + "nics": { + "type": "array", + "items": { + "$ref": "#/definitions/v1MaasNic" + } + } + } + }, + "v1MaasMachines": { + "description": "List of MAAS machines", + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1MaasMachine" + } + }, + "listmeta": { + "$ref": "#/definitions/v1ListMetaData" + } + } + }, + "v1MaasNic": { + "description": "Maas network interface", + "type": "object", + "properties": { + "index": { + "type": "integer", + "format": "int8" + }, + "privateIPs": { + "type": "array", + "items": { + "type": "string" + } + }, + "publicIp": { + "type": "string" + } + } + }, + "v1MaasPool": { + "description": "Maas pool", + "type": "object", + "properties": { + "description": { + "description": "Description of Maas domain", + "type": "string" + }, + "name": { + "description": "Name of Maas pool", + "type": "string" + } + } + }, + "v1MaasPools": { + "description": "List of Maas pools", + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1MaasPool" + } + } + } + }, + "v1MaasSubnet": { + "description": "Maas subnet", + "type": "object", + "properties": { + "id": { + "description": "Id of Maas subnet", + "type": "integer" + }, + "name": { + "description": "Name of Maas subnet", + "type": "string" + }, + "space": { + "description": "Space associated with Maas subnet", + "type": "string" + }, + "vlans": { + "$ref": "#/definitions/v1MaasVlan" + } + } + }, + "v1MaasSubnets": { + "description": "List of Maas subnets", + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1MaasSubnet" + } + } + } + }, + "v1MaasTag": { + "description": "Maas tag", + "type": "object", + "properties": { + "comment": { + "description": "Comment on Maas tag", + "type": "string" + }, + "definition": { + "description": "Definition of Maas tag", + "type": "string" + }, + "kernelOpts": { + "description": "Kernel Opts on Maas tag", + "type": "string" + }, + "name": { + "description": "Name of Maas tag", + "type": "string" + }, + "resourceUri": { + "description": "Description of Maas tag", + "type": "string" + } + } + }, + "v1MaasTags": { + "description": "List of Maas tags", + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1MaasTag" + } + } + } + }, + "v1MaasVlan": { + "description": "Maas vlan entity", + "type": "object", + "properties": { + "fabric": { + "description": "Fabric associated with Maas Vlan", + "type": "string" + }, + "id": { + "description": "Id of Maas Vlan", + "type": "integer" + }, + "name": { + "description": "Name of Maas Vlan", + "type": "string" + } + } + }, + "v1MaasZone": { + "description": "Maas zone", + "type": "object", + "properties": { + "description": { + "description": "Description of Maas domain", + "type": "string" + }, + "name": { + "description": "Name of Maas zone", + "type": "string" + } + } + }, + "v1MaasZones": { + "description": "List of Maas zones", + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1MaasZone" + } + } + } + }, + "v1MachineCertificate": { + "description": "K8 Certificates for control plane nodes", + "type": "object", + "properties": { + "certificateAuthorities": { + "description": "Applicable certificate authorities", + "type": "array", + "items": { + "$ref": "#/definitions/v1CertificateAuthority" + } + }, + "name": { + "type": "string" + } + } + }, + "v1MachineCertificates": { + "description": "K8 Certificates for all the cluster's control plane nodes", + "type": "object", + "properties": { + "machineCertificates": { + "type": "array", + "items": { + "$ref": "#/definitions/v1MachineCertificate" + } + } + } + }, + "v1MachineHealth": { + "description": "Machine health state", + "type": "object", + "properties": { + "conditions": { + "type": "array", + "items": { + "$ref": "#/definitions/v1MachineHealthCondition" + } + }, + "lastHeartBeatTimestamp": { + "$ref": "#/definitions/v1Time" + }, + "state": { + "type": "string" + } + } + }, + "v1MachineHealthCheckConfig": { + "type": "object", + "properties": { + "healthCheckMaxUnhealthy": { + "description": "HealthCheckMaxUnhealthy is the value above which, if current nodes are unhealthy remediation will not be triggered Can be an absolute int64 number or a percentage string Default value is 100%, i.e by default it is disabled", + "type": "string" + }, + "networkReadyHealthCheckDuration": { + "description": "NetworkReadyHealthCheckDuration is the timeout to check for the network availability. If the network is not available in the given available time, beyond the timeout check a node will be killed and a new node will be created. Default time is 10m", + "type": "string" + }, + "nodeReadyHealthCheckDuration": { + "description": "NodeReadyHealthCheckDuration is the timeout to check for the node ready state. If the node is not ready within the time out set, the node will be deleted and a new node will be launched. Default time is 10m", + "type": "string" + } + } + }, + "v1MachineHealthCondition": { + "description": "Machine health condition", + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "reason": { + "type": "string" + }, + "status": { + "type": "string" + }, + "type": { + "type": "string" + } + } + }, + "v1MachineMaintenance": { + "type": "object", + "properties": { + "action": { + "description": "Machine maintenance mode action", + "type": "string", + "enum": [ + "cordon", + "uncordon" + ] + } + } + }, + "v1MachineMaintenanceStatus": { + "description": "Machine maintenance status", + "type": "object", + "properties": { + "action": { + "type": "string" + }, + "message": { + "type": "string" + }, + "state": { + "type": "string" + } + } + }, + "v1MachineManagementConfig": { + "type": "object", + "properties": { + "osPatchConfig": { + "description": "OS patch config contains properties to patch node os with latest security packages. \nIf OsPatchConfig is not provided then node os will not be patched with latest security updates.\nNote: For edge based cluster (like edge-native type) the osPatchConfig is NOT applicable, the values will be ignored.\n", + "$ref": "#/definitions/v1OsPatchConfig" + } + } + }, + "v1MachinePoolConfigEntity": { + "description": "Machine pool configuration for the cluster", + "type": "object", + "required": [ + "name", + "size", + "labels" + ], + "properties": { + "additionalLabels": { + "description": "Additional labels to be part of the machine pool", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "additionalTags": { + "description": "AdditionalTags is an optional set of tags to add to resources managed by the provider, in addition to the ones added by default. For eg., tags for EKS nodeGroup or EKS NodegroupIAMRole", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "isControlPlane": { + "description": "Whether this pool is for control plane", + "type": "boolean", + "x-omitempty": false + }, + "labels": { + "description": "Labels for this machine pool, example: control-plane/worker, gpu, windows", + "type": "array", + "items": { + "type": "string" + } + }, + "machinePoolProperties": { + "$ref": "#/definitions/v1MachinePoolProperties" + }, + "maxSize": { + "description": "Max size of the pool, for scaling", + "type": "integer", + "format": "int32" + }, + "minSize": { + "description": "Min size of the pool, for scaling", + "type": "integer", + "format": "int32" + }, + "name": { + "type": "string" + }, + "nodeRepaveInterval": { + "description": "Minimum number of seconds a node should be Ready, before the next node is selected for repave. Applicable only for workerpools in infrastructure cluster", + "type": "integer", + "format": "int32" + }, + "size": { + "description": "Size of the pool, number of nodes/machines", + "type": "integer", + "format": "int32" + }, + "taints": { + "description": "control plane or worker taints", + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1Taint" + } + }, + "updateStrategy": { + "description": "Rolling update strategy for this machine pool if not specified, will use ScaleOut", + "$ref": "#/definitions/v1UpdateStrategy" + }, + "useControlPlaneAsWorker": { + "description": "If IsControlPlane==true \u0026\u0026 useControlPlaneAsWorker==true, then will remove control plane taint this will not be used for worker pools", + "type": "boolean", + "x-omitempty": false + } + } + }, + "v1MachinePoolMeta": { + "type": "object", + "properties": { + "cloudType": { + "type": "string" + }, + "healthy": { + "description": "number of healthy machines", + "type": "integer", + "format": "int32", + "x-omitempty": false + }, + "infraProfileTemplate": { + "description": "InfraClusterProfile contains OS/Kernel for this NodePool", + "$ref": "#/definitions/v1ClusterProfileTemplateMeta" + }, + "isControlPlane": { + "description": "whether this pool is for control plane", + "type": "boolean", + "x-omitempty": false + }, + "labels": { + "description": "labels for this pool, example: control-plane/worker, gpu, windows", + "type": "array", + "items": { + "type": "string" + } + }, + "maintenanceMode": { + "description": "number of machines under maintenance", + "type": "integer", + "format": "int32", + "x-omitempty": false + }, + "size": { + "description": "size of the pool, number of machines", + "type": "integer", + "format": "int32", + "x-omitempty": false + } + } + }, + "v1MachinePoolProperties": { + "description": "Machine pool specific properties", + "type": "object", + "properties": { + "archType": { + "description": "Architecture type of the pool. Default value is 'amd64'", + "x-omitempty": false, + "$ref": "#/definitions/v1ArchType" + } + } + }, + "v1MachinePoolRate": { + "description": "Machine pool estimated rate information", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "nodesCount": { + "type": "integer", + "format": "int32" + }, + "rate": { + "$ref": "#/definitions/v1CloudRate" + } + } + }, + "v1MachinePoolsMachineUids": { + "properties": { + "machinePools": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/v1MachineUids" + } + } + } + }, + "v1MachineUids": { + "properties": { + "machineUids": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "v1Macro": { + "properties": { + "name": { + "type": "string" + }, + "value": { + "type": "string" + } + } + }, + "v1Macros": { + "properties": { + "macros": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1Macro" + } + } + } + }, + "v1ManagedDisk": { + "type": "object", + "properties": { + "storageAccountType": { + "type": "string" + } + } + }, + "v1Manifest": { + "description": "Manifest object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/v1ManifestPublishedSpec" + } + } + }, + "v1ManifestData": { + "description": "Published manifest object", + "type": "object", + "properties": { + "content": { + "description": "Manifest content in yaml", + "type": "string" + }, + "digest": { + "description": "Manifest digest", + "type": "string" + } + } + }, + "v1ManifestEntities": { + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": { + "description": "Manifests array", + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1ManifestEntity" + } + } + } + }, + "v1ManifestEntity": { + "description": "Manifest object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/v1ManifestSpec" + } + } + }, + "v1ManifestInputEntity": { + "description": "Manifest request payload", + "properties": { + "content": { + "description": "Manifest content", + "type": "string" + }, + "name": { + "description": "Manifest name", + "type": "string" + } + } + }, + "v1ManifestPublishedSpec": { + "description": "Manifest spec", + "properties": { + "published": { + "$ref": "#/definitions/v1ManifestData" + } + } + }, + "v1ManifestRefInputEntities": { + "description": "Pack manifests input params", + "properties": { + "manifests": { + "description": "Pack manifests array", + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1ManifestRefInputEntity" + } + } + } + }, + "v1ManifestRefInputEntity": { + "description": "Manifest request payload", + "properties": { + "content": { + "description": "Manifest content in yaml", + "type": "string" + }, + "uid": { + "description": "Manifest uid", + "type": "string" + } + } + }, + "v1ManifestRefUpdateEntity": { + "description": "Manifest update request payload", + "required": [ + "name" + ], + "properties": { + "content": { + "description": "Manifest content in yaml", + "type": "string" + }, + "name": { + "description": "Manifest name", + "type": "string" + }, + "uid": { + "description": "Manifest uid", + "type": "string" + } + } + }, + "v1ManifestSpec": { + "description": "Manifest spec", + "type": "object", + "properties": { + "draft": { + "$ref": "#/definitions/v1ManifestData" + }, + "published": { + "$ref": "#/definitions/v1ManifestData" + } + } + }, + "v1ManifestSummary": { + "description": "Manifest object", + "properties": { + "content": { + "description": "Manifest content in yaml", + "type": "string" + }, + "name": { + "description": "Manifest name", + "type": "string" + }, + "uid": { + "description": "Manifest uid", + "type": "string" + } + } + }, + "v1Memory": { + "type": "object", + "properties": { + "sizeInMB": { + "description": "memory size in bytes", + "type": "integer", + "format": "int64" + } + } + }, + "v1MetricAggregation": { + "description": "Aggregation values", + "type": "object", + "properties": { + "avg": { + "type": "number", + "x-omitempty": false + }, + "count": { + "type": "number", + "format": "int64", + "x-omitempty": false + }, + "max": { + "type": "number", + "x-omitempty": false + }, + "min": { + "type": "number", + "x-omitempty": false + }, + "sum": { + "type": "number", + "x-omitempty": false + } + } + }, + "v1MetricMetadata": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "uid": { + "type": "string" + } + } + }, + "v1MetricPoint": { + "description": "Metric Info", + "type": "object", + "properties": { + "avg": { + "type": "number" + }, + "count": { + "type": "number", + "format": "int64" + }, + "max": { + "type": "number" + }, + "min": { + "type": "number" + }, + "sum": { + "type": "number" + }, + "timestamp": { + "type": "number", + "format": "int64" + }, + "value": { + "type": "number", + "x-omitempty": false + } + } + }, + "v1MetricTimeSeries": { + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1Metrics" + } + } + } + }, + "v1MetricTimeSeriesList": { + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1MetricsList" + } + } + } + }, + "v1Metrics": { + "type": "object", + "properties": { + "aggregation": { + "$ref": "#/definitions/v1MetricAggregation" + }, + "kind": { + "type": "string" + }, + "points": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1MetricPoint" + } + }, + "unit": { + "type": "string" + } + } + }, + "v1MetricsList": { + "type": "object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1MetricMetadata" + }, + "metrics": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1Metrics" + } + } + } + }, + "v1Nameserver": { + "description": "Nameserver define search domains and nameserver addresses", + "type": "object", + "properties": { + "addresses": { + "type": "array", + "items": { + "type": "string" + } + }, + "search": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "v1NestedCloudConfigStatus": { + "description": "Defines the status of virtual cloud config", + "type": "object", + "properties": { + "conditions": { + "type": "array", + "items": { + "$ref": "#/definitions/v1ClusterCondition" + }, + "x-kubernetes-patch-merge-key": "type", + "x-kubernetes-patch-strategy": "merge" + }, + "isAddonLayer": { + "description": "addon layers present in spc", + "type": "boolean" + } + } + }, + "v1Nic": { + "type": "object", + "properties": { + "dns": { + "type": "array", + "items": { + "type": "string" + } + }, + "gateway": { + "type": "string" + }, + "ip": { + "type": "string" + }, + "isDefault": { + "type": "boolean" + }, + "macAddr": { + "type": "string" + }, + "nicName": { + "type": "string" + }, + "subnet": { + "type": "string" + } + } + }, + "v1NodesAutoRemediationSettings": { + "properties": { + "disableNodesAutoRemediation": { + "type": "boolean", + "x-omitempty": false + }, + "isEnabled": { + "type": "boolean", + "x-omitempty": false + } + } + }, + "v1NonFipsConfig": { + "description": "Non-FIPS configuration", + "properties": { + "mode": { + "description": "enable or disable the non FIPS complaint", + "type": "string", + "default": "nonFipsDisabled", + "enum": [ + "nonFipsEnabled", + "nonFipsDisabled" + ] + } + } + }, + "v1Notification": { + "description": "Describes event notification and action definition", + "type": "object", + "properties": { + "action": { + "description": "Describes actions for the notification", + "type": "object", + "$ref": "#/definitions/v1NotificationAction" + }, + "metadata": { + "type": "object", + "$ref": "#/definitions/v1ObjectMeta" + }, + "relatedObject": { + "type": "object", + "$ref": "#/definitions/v1RelatedObject" + }, + "source": { + "description": "Describes origin info for the notification", + "type": "object", + "$ref": "#/definitions/v1NotificationSource" + }, + "type": { + "description": "Describes type of notification. Possible values [NotificationPackUpdate, NotificationPackRegistryUpdate, NotificationNone]", + "type": "string", + "enum": [ + "NotificationPackUpdate", + "NotificationPackRegistryUpdate", + "NotificationNone" + ] + } + } + }, + "v1NotificationAction": { + "description": "Describes actions for the notification", + "type": "object", + "properties": { + "ack": { + "description": "Describes the acknowledgement status for the notification", + "type": "boolean", + "x-omitempty": false + }, + "actionMessage": { + "description": "Describes information related to notification action", + "type": "string" + }, + "actionType": { + "description": "Describes action type for the notification. Possible Values [NotifyActionPacksUpdate, NotifyActionClusterProfileUpdate, NotifyActionPackRegistryUpdate, NotifyActionClusterUpdate, NotifyActionNone]", + "type": "string", + "enum": [ + "NotifyActionPacksUpdate", + "NotifyActionClusterProfileUpdate", + "NotifyActionPackRegistryUpdate", + "NotifyActionClusterUpdate", + "NotifyActionNone" + ] + }, + "events": { + "description": "Describes the events happened for the notifications", + "type": "object", + "additionalProperties": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "isDone": { + "description": "Describes the \"Done\" status for the notification", + "type": "boolean", + "x-omitempty": false + }, + "isInfo": { + "description": "Describes the notification as a information", + "type": "boolean", + "x-omitempty": false + }, + "link": { + "type": "string" + } + } + }, + "v1NotificationEvent": { + "description": "Describes notification event details", + "type": "object", + "properties": { + "component": { + "description": "Describes component of notification event", + "type": "string" + }, + "digest": { + "description": "Describes notification event digest", + "type": "string" + }, + "message": { + "description": "Describes a information for the notification event", + "type": "string" + }, + "meta": { + "description": "Describes a event messages with meta digest as the key", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "type": { + "description": "Describes notification event type", + "type": "string", + "enum": [ + "NotificationPackSync", + "NotificationClusterProfileSync" + ] + } + } + }, + "v1NotificationSource": { + "description": "Describes origin info for the notification", + "type": "object", + "properties": { + "component": { + "description": "Describes component where notification originated", + "type": "string" + } + } + }, + "v1Notifications": { + "description": "Describe a list of generated notifications", + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": { + "description": "Describe a list of generated notifications", + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1Notification" + } + }, + "listmeta": { + "description": "Describes the meta information about the notification lists", + "$ref": "#/definitions/v1ListMetaData" + } + } + }, + "v1OS": { + "type": "object", + "properties": { + "family": { + "type": "string" + }, + "version": { + "type": "string" + } + } + }, + "v1ObjectEntity": { + "description": "Object identity meta", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "uid": { + "type": "string" + } + } + }, + "v1ObjectMeta": { + "description": "ObjectMeta is metadata that all persisted resources must have, which includes all objects users must create.", + "type": "object", + "properties": { + "annotations": { + "description": "Annotations is an unstructured key value map stored with a resource that may be set by external tools to store and retrieve arbitrary metadata. They are not queryable and should be preserved when modifying objects. More info: http://kubernetes.io/docs/user-guide/annotations", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "creationTimestamp": { + "description": "CreationTimestamp is a timestamp representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations. Clients may not set this value. It is represented in RFC3339 form and is in UTC.\n\nPopulated by the system. Read-only. Null for lists. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", + "$ref": "#/definitions/v1Time" + }, + "deletionTimestamp": { + "description": "DeletionTimestamp is RFC 3339 date and time at which this resource will be deleted. This field is set by the server when a graceful deletion is requested by the user, and is not directly settable by a client. The resource is expected to be deleted (no longer visible from resource lists, and not reachable by name) after the time in this field, once the finalizers list is empty. As long as the finalizers list contains items, deletion is blocked. Once the deletionTimestamp is set, this value may not be unset or be set further into the future, although it may be shortened or the resource may be deleted prior to this time. For example, a user may request that a pod is deleted in 30 seconds. The Kubelet will react by sending a graceful termination signal to the containers in the pod. After that 30 seconds, the Kubelet will send a hard termination signal (SIGKILL) to the container and after cleanup, remove the pod from the API. In the presence of network partitions, this object may still exist after this timestamp, until an administrator or automated process can determine the resource is fully terminated. If not set, graceful deletion of the object has not been requested.\n\nPopulated by the system when a graceful deletion is requested. Read-only. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", + "$ref": "#/definitions/v1Time" + }, + "labels": { + "description": "Map of string keys and values that can be used to organize and categorize (scope and select) objects. May match selectors of replication controllers and services. More info: http://kubernetes.io/docs/user-guide/labels", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "lastModifiedTimestamp": { + "description": "LastModifiedTimestamp is a timestamp representing the server time when this object was last modified. It is not guaranteed to be set in happens-before order across separate operations. Clients may not set this value. It is represented in RFC3339 form and is in UTC.\n\nPopulated by the system. Read-only. Null for lists. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", + "$ref": "#/definitions/v1Time" + }, + "name": { + "description": "Name must be unique within a namespace. Is required when creating resources, although some resources may allow a client to request the generation of an appropriate name automatically. Name is primarily intended for creation idempotence and configuration definition. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/identifiers#names", + "type": "string" + }, + "uid": { + "description": "UID is the unique in time and space value for this object. It is typically generated by the server on successful creation of a resource and is not allowed to change on PUT operations.\n\nPopulated by the system. Read-only. More info: http://kubernetes.io/docs/user-guide/identifiers#uids", + "type": "string" + } + } + }, + "v1ObjectMetaInputEntity": { + "description": "ObjectMeta input entity for object creation", + "type": "object", + "properties": { + "annotations": { + "description": "Annotations is an unstructured key value map stored with a resource that may be set by external tools to store and retrieve arbitrary metadata. They are not queryable and should be preserved when modifying objects. More info: http://kubernetes.io/docs/user-guide/annotations", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "labels": { + "description": "Map of string keys and values that can be used to organize and categorize (scope and select) objects. May match selectors of replication controllers and services. More info: http://kubernetes.io/docs/user-guide/labels", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "name": { + "description": "Name must be unique within a namespace. Is required when creating resources, although some resources may allow a client to request the generation of an appropriate name automatically. Name is primarily intended for creation idempotence and configuration definition. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/identifiers#names", + "type": "string" + } + } + }, + "v1ObjectMetaInputEntitySchema": { + "description": "Resource metadata", + "type": "object", + "required": [ + "metadata" + ], + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectMetaInputEntity" + } + } + }, + "v1ObjectMetaUpdateEntity": { + "description": "ObjectMeta update entity with uid as input", + "type": "object", + "properties": { + "annotations": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "labels": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "name": { + "type": "string" + }, + "uid": { + "type": "string" + } + } + }, + "v1ObjectReference": { + "description": "ObjectReference contains enough information to let you inspect or modify the referred object.", + "type": "object", + "properties": { + "kind": { + "description": "Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", + "type": "string" + }, + "name": { + "description": "Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names", + "type": "string" + }, + "uid": { + "description": "UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids", + "type": "string" + } + } + }, + "v1ObjectResReference": { + "description": "Object resource reference", + "type": "object", + "properties": { + "kind": { + "type": "string" + }, + "name": { + "type": "string" + }, + "projectUid": { + "type": "string" + }, + "tenantUid": { + "type": "string" + }, + "uid": { + "type": "string" + } + } + }, + "v1ObjectScopeEntity": { + "description": "Object scope identity meta", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "scope": { + "type": "string" + }, + "uid": { + "type": "string" + } + } + }, + "v1ObjectTagsEntity": { + "description": "Object identity meta with tags", + "type": "object", + "properties": { + "labels": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "name": { + "type": "string" + }, + "uid": { + "type": "string" + } + } + }, + "v1OciImageRegistry": { + "description": "Oci Image Registry", + "type": "object", + "properties": { + "baseContentPath": { + "description": "baseContentPath is the root path for the registry content", + "type": "string" + }, + "caCert": { + "type": "string" + }, + "endpoint": { + "type": "string" + }, + "insecureSkipVerify": { + "type": "boolean" + }, + "mirrorRegistries": { + "description": "mirrorRegistries contains the array of image sources like gcr.io, ghcr.io, docker.io", + "type": "string" + }, + "name": { + "type": "string" + }, + "password": { + "type": "string" + }, + "username": { + "type": "string" + } + } + }, + "v1OciRegistries": { + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1OciRegistry" + } + } + } + }, + "v1OciRegistry": { + "description": "Oci registry information", + "type": "object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/v1OciRegistrySpec" + }, + "status": { + "$ref": "#/definitions/v1OciRegistryStatusSummary" + } + } + }, + "v1OciRegistryEntity": { + "description": "Oci registry credentials", + "type": "object", + "properties": { + "auth": { + "$ref": "#/definitions/v1RegistryAuth" + }, + "defaultRegion": { + "type": "string" + }, + "endpoint": { + "type": "string" + }, + "providerType": { + "type": "string" + }, + "scope": { + "type": "string" + }, + "type": { + "type": "string" + } + } + }, + "v1OciRegistrySpec": { + "description": "Image registry spec", + "type": "object", + "properties": { + "defaultRegion": { + "type": "string" + }, + "endpoint": { + "type": "string" + }, + "isPrivate": { + "type": "boolean" + }, + "providerType": { + "type": "string" + }, + "registryType": { + "type": "string" + }, + "scope": { + "type": "string" + } + } + }, + "v1OciRegistryStatusSummary": { + "description": "OCI registry status summary", + "properties": { + "sync": { + "$ref": "#/definitions/v1RegistrySyncStatus" + } + } + }, + "v1OidcIssuerTls": { + "type": "object", + "properties": { + "caCertificateBase64": { + "type": "string", + "x-omitempty": false + }, + "insecureSkipVerify": { + "type": "boolean", + "default": false, + "x-omitempty": false + } + } + }, + "v1OpenStackAccount": { + "description": "OpenStack account information", + "type": "object", + "properties": { + "apiVersion": { + "description": "Cloud account api version", + "type": "string" + }, + "kind": { + "description": "Cloud account kind", + "type": "string" + }, + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/v1OpenStackCloudAccount" + }, + "status": { + "$ref": "#/definitions/v1CloudAccountStatus" + } + } + }, + "v1OpenStackAccounts": { + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1OpenStackAccount" + } + }, + "listmeta": { + "$ref": "#/definitions/v1ListMetaData" + } + } + }, + "v1OpenStackAz": { + "description": "OpenStack az entity", + "type": "object", + "properties": { + "name": { + "description": "Name of OpenStack az", + "type": "string" + } + } + }, + "v1OpenStackAzs": { + "description": "List of OpenStack azs", + "type": "object", + "required": [ + "azs" + ], + "properties": { + "azs": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1OpenStackAz" + } + } + } + }, + "v1OpenStackCloudAccount": { + "description": "auth-url,project,username,password,domain,cacert etc", + "type": "object", + "required": [ + "identityEndpoint", + "username", + "password" + ], + "properties": { + "caCert": { + "description": "Ca cert for OpenStack", + "type": "string" + }, + "defaultDomain": { + "description": "Default Domain name", + "type": "string" + }, + "defaultProject": { + "description": "Default Project name", + "type": "string" + }, + "identityEndpoint": { + "description": "Identity endpoint for OpenStack", + "type": "string" + }, + "insecure": { + "description": "For self signed certs in IdentityEndpoint", + "type": "boolean" + }, + "parentRegion": { + "description": "Parent region of OpenStack", + "type": "string" + }, + "password": { + "description": "Password of OpenStack account", + "type": "string" + }, + "username": { + "description": "Username of OpenStack account", + "type": "string" + } + } + }, + "v1OpenStackCloudClusterConfigEntity": { + "description": "Openstack cloud cluster config entity", + "type": "object", + "properties": { + "clusterConfig": { + "$ref": "#/definitions/v1OpenStackClusterConfig" + } + } + }, + "v1OpenStackCloudConfig": { + "description": "OpenStackCloudConfig is the Schema for the OpenStackcloudconfigs API", + "type": "object", + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + "type": "string" + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/v1OpenStackCloudConfigSpec" + }, + "status": { + "$ref": "#/definitions/v1OpenStackCloudConfigStatus" + } + } + }, + "v1OpenStackCloudConfigSpec": { + "description": "OpenStackCloudConfigSpec defines the cloud configuration input by user This will translate to clusterspec/machinespec for cluster-api", + "type": "object", + "properties": { + "cloudAccountRef": { + "description": "cloudAccountRef should point to the secret which contains OpenStackCloudAccount", + "$ref": "#/definitions/v1ObjectReference" + }, + "clusterConfig": { + "$ref": "#/definitions/v1OpenStackClusterConfig" + }, + "machinePoolConfig": { + "type": "array", + "items": { + "$ref": "#/definitions/v1OpenStackMachinePoolConfig" + } + } + } + }, + "v1OpenStackCloudConfigStatus": { + "description": "OpenStackCloudConfigStatus defines the observed state of OpenStackCloudConfig The cloudimage info built by Mold is stored here image should be mapped to a specific machinepool", + "type": "object", + "properties": { + "conditions": { + "type": "array", + "items": { + "$ref": "#/definitions/v1ClusterCondition" + } + }, + "nodeImage": { + "type": "string" + }, + "sourceImageId": { + "description": "sourceImageId, it can be from packref's annotations or from pack.json", + "type": "string" + }, + "useCapiImage": { + "type": "boolean" + } + } + }, + "v1OpenStackClusterConfig": { + "description": "Cluster level configuration for OpenStack cloud and applicable for all the machine pools", + "type": "object", + "properties": { + "bastionDisabled": { + "description": "Create bastion node option we have earlier supported creation of bastion by default", + "type": "boolean" + }, + "dnsNameservers": { + "description": "DNSNameservers is the list of nameservers for OpenStack Subnet being created. Set this value when you need create a new network/subnet while the access through DNS is required.", + "type": "array", + "items": { + "type": "string" + } + }, + "domain": { + "$ref": "#/definitions/v1OpenStackResource" + }, + "network": { + "description": "For static placement", + "$ref": "#/definitions/v1OpenStackResource" + }, + "nodeCidr": { + "description": "For dynamic provision NodeCIDR is the OpenStack Subnet to be created. Cluster actuator will create a network, a subnet with NodeCIDR, and a router connected to this subnet. If you leave this empty, no network will be created.", + "type": "string" + }, + "project": { + "$ref": "#/definitions/v1OpenStackResource" + }, + "region": { + "type": "string" + }, + "sshKeyName": { + "type": "string" + }, + "subnet": { + "$ref": "#/definitions/v1OpenStackResource" + } + } + }, + "v1OpenStackDomain": { + "description": "OpenStack domain. A Domain is a collection of projects, users, and roles", + "type": "object", + "properties": { + "description": { + "description": "Description is the description of the Domain", + "type": "string" + }, + "id": { + "description": "ID is the unique ID of the domain", + "type": "string" + }, + "name": { + "description": "Name is the name of the domain", + "type": "string" + } + } + }, + "v1OpenStackFlavor": { + "description": "OpenStack flavor entity. Flavor represent (virtual) hardware configurations for server resources", + "type": "object", + "properties": { + "disk": { + "description": "Disk is the amount of root disk, measured in GB", + "type": "integer" + }, + "ephemeral": { + "description": "Ephemeral is the amount of ephemeral disk space, measured in GB", + "type": "integer" + }, + "id": { + "description": "ID is the flavor's unique ID", + "type": "string" + }, + "memory": { + "description": "Amount of memory, measured in MB", + "type": "integer" + }, + "name": { + "description": "Name is the name of the flavor", + "type": "string" + }, + "vcpus": { + "description": "VCPUs indicates how many (virtual) CPUs are available for this flavor", + "type": "integer" + } + } + }, + "v1OpenStackFlavors": { + "description": "List of OpenStack flavours", + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1OpenStackFlavor" + } + } + } + }, + "v1OpenStackKeypair": { + "description": "OpenStack keypair. KeyPair is an SSH key known to the OpenStack Cloud that is available to be injected into servers", + "type": "object", + "properties": { + "name": { + "description": "Name is used to refer to this keypair from other services within this region", + "type": "string" + }, + "publicKey": { + "description": "PublicKey is the public key from this pair, in OpenSSH format", + "type": "string" + } + } + }, + "v1OpenStackKeypairs": { + "description": "List of OpenStack keypairs", + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1OpenStackKeypair" + } + } + } + }, + "v1OpenStackMachine": { + "description": "OpenStack cloud VM definition", + "type": "object", + "properties": { + "apiVersion": { + "type": "string" + }, + "kind": { + "type": "string" + }, + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/v1OpenStackMachineSpec" + }, + "status": { + "$ref": "#/definitions/v1CloudMachineStatus" + } + } + }, + "v1OpenStackMachineConfigEntity": { + "type": "object", + "required": [ + "flavorConfig" + ], + "properties": { + "azs": { + "description": "for control plane pool, this will be the failure domains for kcp", + "type": "array", + "items": { + "type": "string" + } + }, + "flavorConfig": { + "$ref": "#/definitions/v1OpenstackFlavorConfig" + } + } + }, + "v1OpenStackMachinePoolCloudConfigEntity": { + "type": "object", + "required": [ + "flavorConfig" + ], + "properties": { + "azs": { + "description": "for control plane pool, this will be the failure domains for kcp", + "type": "array", + "items": { + "type": "string" + } + }, + "diskGiB": { + "description": "Root disk size", + "type": "integer", + "format": "int32" + }, + "flavorConfig": { + "$ref": "#/definitions/v1OpenstackFlavorConfig" + }, + "subnet": { + "$ref": "#/definitions/v1OpenStackResource" + } + } + }, + "v1OpenStackMachinePoolConfig": { + "type": "object", + "required": [ + "flavorConfig" + ], + "properties": { + "additionalLabels": { + "description": "additionalLabels", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "additionalTags": { + "description": "AdditionalTags is an optional set of tags to add to resources managed by the provider, in addition to the ones added by default. For eg., tags for EKS nodeGroup or EKS NodegroupIAMRole", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "azs": { + "description": "for control plane pool, this will be the failure domains for kcp", + "type": "array", + "items": { + "type": "string" + } + }, + "diskGiB": { + "description": "DiskGiB is used to configure rootVolume, the volume metadata to boot from", + "type": "integer", + "format": "int32" + }, + "flavor": { + "description": "Openstack flavor name, only return argument", + "type": "string" + }, + "flavorConfig": { + "description": "Openstack flavor configuration, input argument", + "$ref": "#/definitions/v1OpenstackFlavorConfig" + }, + "image": { + "type": "string" + }, + "isControlPlane": { + "description": "whether this pool is for control plane", + "type": "boolean" + }, + "labels": { + "description": "labels for this pool, example: control-plane/worker, gpu, windows", + "type": "array", + "items": { + "type": "string" + } + }, + "machinePoolProperties": { + "$ref": "#/definitions/v1MachinePoolProperties" + }, + "maxSize": { + "description": "max size of the pool, for scaling", + "type": "integer", + "format": "int32" + }, + "minSize": { + "description": "min size of the pool, for scaling", + "type": "integer", + "format": "int32" + }, + "name": { + "type": "string" + }, + "nodeRepaveInterval": { + "description": "Minimum number of seconds a node should be Ready, before the next node is selected for repave. Applicable only for workerpools in infrastructure cluster", + "type": "integer", + "format": "int32" + }, + "size": { + "description": "size of the pool, number of machines", + "type": "integer", + "format": "int32" + }, + "subnet": { + "$ref": "#/definitions/v1OpenStackResource" + }, + "taints": { + "description": "control plane or worker taints", + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1Taint" + } + }, + "updateStrategy": { + "description": "rolling update strategy for this machinepool if not specified, will use ScaleOut", + "$ref": "#/definitions/v1UpdateStrategy" + }, + "useControlPlaneAsWorker": { + "description": "if IsControlPlane==true \u0026\u0026 useControlPlaneAsWorker==true, then will remove control plane taint this will not be used for worker pools", + "type": "boolean" + } + } + }, + "v1OpenStackMachinePoolConfigEntity": { + "type": "object", + "required": [ + "cloudConfig" + ], + "properties": { + "cloudConfig": { + "$ref": "#/definitions/v1OpenStackMachinePoolCloudConfigEntity" + }, + "poolConfig": { + "$ref": "#/definitions/v1MachinePoolConfigEntity" + } + } + }, + "v1OpenStackMachineSpec": { + "description": "OpenStack cloud VM definition spec", + "type": "object", + "required": [ + "instanceType", + "nics" + ], + "properties": { + "az": { + "type": "string" + }, + "image": { + "type": "string" + }, + "instanceType": { + "description": "Instance flavor of the machine with cpu and memory info", + "$ref": "#/definitions/v1GenericInstanceType" + }, + "nics": { + "type": "array", + "items": { + "$ref": "#/definitions/v1OpenStackNic" + } + }, + "projectId": { + "type": "string" + }, + "securityGroups": { + "type": "array", + "items": { + "type": "string" + } + }, + "sshKeyName": { + "type": "string" + } + } + }, + "v1OpenStackMachines": { + "description": "OpenStack machine list", + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1OpenStackMachine" + } + } + } + }, + "v1OpenStackNetwork": { + "description": "OpenStack network", + "type": "object", + "properties": { + "description": { + "description": "Description of OpenStack network", + "type": "string" + }, + "id": { + "description": "Id of OpenStack network", + "type": "string" + }, + "name": { + "description": "Name of OpenStack network", + "type": "string" + }, + "subnets": { + "description": "Subnets associated with OpenStack network", + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1OpenStackSubnet" + } + } + } + }, + "v1OpenStackNetworks": { + "description": "List of OpenStack networks", + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1OpenStackNetwork" + } + } + } + }, + "v1OpenStackNic": { + "description": "OpenStack network interface", + "type": "object", + "required": [ + "networkName" + ], + "properties": { + "index": { + "type": "integer", + "format": "int8" + }, + "networkName": { + "type": "string" + }, + "privateIPs": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "v1OpenStackProject": { + "description": "Project represents an OpenStack Identity Project", + "type": "object", + "properties": { + "description": { + "description": "Description is the description of the project", + "type": "string" + }, + "domainId": { + "description": "DomainID is the domain ID the project belongs to", + "type": "string" + }, + "id": { + "description": "ID is the unique ID of the project", + "type": "string" + }, + "name": { + "description": "Name is the name of the project", + "type": "string" + }, + "parentProjectId": { + "description": "ParentID is the parent_id of the project", + "type": "string" + } + } + }, + "v1OpenStackProjects": { + "description": "Array of OpenStack projects", + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1OpenStackProject" + } + } + } + }, + "v1OpenStackRegion": { + "description": "OpenStack region entity", + "type": "object", + "properties": { + "description": { + "description": "Description of OpenStack region", + "type": "string" + }, + "id": { + "description": "Id of OpenStack region", + "type": "string" + }, + "parentRegionId": { + "description": "Parent region id of OpenStack region", + "type": "string" + } + } + }, + "v1OpenStackRegions": { + "description": "List of OpenStack regions and domains", + "type": "object", + "required": [ + "regions", + "domains" + ], + "properties": { + "domains": { + "description": "List of OpenStack domains", + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1OpenStackDomain" + } + }, + "regions": { + "description": "List of OpenStack regions", + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1OpenStackRegion" + } + } + } + }, + "v1OpenStackResource": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + } + }, + "v1OpenStackSubnet": { + "description": "OpenStack subnet entity", + "type": "object", + "properties": { + "description": { + "description": "Description for the network", + "type": "string" + }, + "id": { + "description": "UUID for the network", + "type": "string" + }, + "name": { + "description": "Human-readable name for the network. Might not be unique", + "type": "string" + } + } + }, + "v1OpenstackFlavorConfig": { + "required": [ + "name" + ], + "properties": { + "diskGiB": { + "description": "DiskGiB is the size of a virtual machine's disk, in GiB.", + "type": "integer", + "format": "int32" + }, + "memoryMiB": { + "description": "MemoryMiB is the size of a virtual machine's memory, in MiB.", + "type": "integer", + "format": "int64" + }, + "name": { + "description": "Openstack flavor name", + "type": "string" + }, + "numCPUs": { + "description": "NumCPUs is the number of virtual processors in a virtual machine.", + "type": "integer", + "format": "int32" + } + } + }, + "v1Organization": { + "description": "Describes user's organization details", + "type": "object", + "properties": { + "authType": { + "description": "Describes user's enabled authorization mode", + "type": "string" + }, + "name": { + "description": "Describes user's organization name", + "type": "string" + }, + "redirectUrl": { + "description": "Describes user's organization authentication url", + "type": "string" + }, + "ssoLogins": { + "description": "Describes a list of allowed social logins for the organization", + "$ref": "#/definitions/v1SsoLogins" + } + } + }, + "v1Organizations": { + "description": "Returns a list of user's organizations details and login methods", + "type": "object", + "properties": { + "organizations": { + "description": "Describes a list of user's organization", + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1Organization" + } + } + } + }, + "v1OsPatchConfig": { + "type": "object", + "properties": { + "onDemandPatchAfter": { + "description": "OnDemandPatchAfter is the desired time for one time on-demand patch", + "$ref": "#/definitions/v1Time" + }, + "patchOnBoot": { + "description": "PatchOnBoot indicates need to do patch when node first boot up, only once", + "type": "boolean", + "x-omitempty": false + }, + "rebootIfRequired": { + "description": "Reboot once the OS patch is applied", + "type": "boolean", + "x-omitempty": false + }, + "schedule": { + "description": "The schedule at which security patches will be applied to OS. Schedule should be in Cron format, see https://en.wikipedia.org/wiki/Cron for more help.", + "type": "string" + } + } + }, + "v1OsPatchEntity": { + "type": "object", + "properties": { + "osPatchConfig": { + "$ref": "#/definitions/v1OsPatchConfig" + } + } + }, + "v1OsType": { + "type": "string", + "default": "Linux", + "enum": [ + "Linux", + "Windows" + ] + }, + "v1OverloadSpec": { + "description": "Overload spec", + "type": "object", + "properties": { + "cloudAccountUid": { + "type": "string", + "x-omitempty": false + }, + "ipAddress": { + "type": "string" + }, + "ipPools": { + "type": "array", + "items": { + "$ref": "#/definitions/v1IpPoolEntity" + } + }, + "isSelfHosted": { + "type": "boolean" + }, + "isSystem": { + "type": "boolean" + }, + "spectroClusterUid": { + "type": "string", + "x-omitempty": false + }, + "tenantUid": { + "type": "string" + } + } + }, + "v1OverloadStatus": { + "description": "Overload status", + "type": "object", + "properties": { + "health": { + "$ref": "#/definitions/v1SpectroClusterHealthStatus" + }, + "isActive": { + "type": "boolean", + "x-omitempty": false + }, + "isReady": { + "type": "boolean", + "x-omitempty": false + }, + "kubectlCommands": { + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + } + }, + "notifications": { + "$ref": "#/definitions/v1ClusterNotificationStatus" + }, + "state": { + "type": "string" + } + } + }, + "v1OverloadVsphereOva": { + "description": "Overload ova details", + "type": "object", + "properties": { + "location": { + "type": "string", + "x-omitempty": false + } + } + }, + "v1Overlord": { + "description": "Overlord defintiion", + "type": "object", + "properties": { + "kind": { + "type": "string" + }, + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/v1OverloadSpec" + }, + "status": { + "$ref": "#/definitions/v1OverloadStatus" + } + } + }, + "v1OverlordMaasAccountCreate": { + "properties": { + "account": { + "$ref": "#/definitions/v1MaasCloudAccount" + }, + "name": { + "description": "Name for the private gateway \u0026 cloud account", + "type": "string" + }, + "shareWithProjects": { + "type": "boolean", + "x-omitempty": false + } + } + }, + "v1OverlordMaasAccountEntity": { + "properties": { + "account": { + "$ref": "#/definitions/v1MaasCloudAccount" + }, + "shareWithProjects": { + "type": "boolean", + "x-omitempty": false + } + } + }, + "v1OverlordMaasCloudConfig": { + "properties": { + "clusterConfig": { + "$ref": "#/definitions/v1MaasClusterConfig" + }, + "clusterProfiles": { + "description": "Cluster profiles pack configuration for private gateway cluster", + "type": "array", + "items": { + "$ref": "#/definitions/v1SpectroClusterProfileEntity" + } + }, + "clusterSettings": { + "description": "clusterSettings is the generic configuration related to a cluster like OS patch, Rbac, Namespace allocation", + "$ref": "#/definitions/v1ClusterConfigEntity" + }, + "machineConfig": { + "$ref": "#/definitions/v1MaasMachineConfigEntity" + }, + "size": { + "description": "size of the pool, number of machines", + "type": "integer", + "format": "int32" + } + } + }, + "v1OverlordManifest": { + "description": "overlord manifest", + "type": "object", + "properties": { + "manifest": { + "type": "string" + } + } + }, + "v1OverlordMigrateEntity": { + "properties": { + "sourceUid": { + "type": "string" + }, + "targetUid": { + "type": "string" + } + } + }, + "v1OverlordOpenStackAccountCreate": { + "properties": { + "account": { + "$ref": "#/definitions/v1OpenStackCloudAccount" + }, + "name": { + "description": "Name for the private gateway \u0026 cloud account", + "type": "string" + }, + "shareWithProjects": { + "type": "boolean", + "x-omitempty": false + } + } + }, + "v1OverlordOpenStackAccountEntity": { + "properties": { + "account": { + "$ref": "#/definitions/v1OpenStackCloudAccount" + }, + "shareWithProjects": { + "type": "boolean", + "x-omitempty": false + } + } + }, + "v1OverlordOpenStackCloudConfig": { + "properties": { + "clusterConfig": { + "$ref": "#/definitions/v1OpenStackClusterConfig" + }, + "clusterProfiles": { + "description": "Cluster profiles pack configuration for private gateway cluster", + "type": "array", + "items": { + "$ref": "#/definitions/v1SpectroClusterProfileEntity" + } + }, + "clusterSettings": { + "description": "clusterSettings is the generic configuration related to a cluster like OS patch, Rbac, Namespace allocation", + "$ref": "#/definitions/v1ClusterConfigEntity" + }, + "machineConfig": { + "$ref": "#/definitions/v1OpenStackMachineConfigEntity" + }, + "size": { + "description": "size of the pool, number of machines", + "type": "integer", + "format": "int32" + } + } + }, + "v1OverlordVsphereAccountCreate": { + "properties": { + "account": { + "$ref": "#/definitions/v1VsphereCloudAccount" + }, + "name": { + "description": "Name for the private gateway \u0026 cloud account", + "type": "string" + }, + "shareWithProjects": { + "type": "boolean", + "x-omitempty": false + } + } + }, + "v1OverlordVsphereAccountEntity": { + "properties": { + "account": { + "$ref": "#/definitions/v1VsphereCloudAccount" + }, + "shareWithProjects": { + "type": "boolean", + "x-omitempty": false + } + } + }, + "v1OverlordVsphereCloudConfig": { + "properties": { + "clusterConfig": { + "$ref": "#/definitions/v1VsphereOverlordClusterConfigEntity" + }, + "clusterProfiles": { + "description": "Cluster profiles pack configuration for private gateway cluster", + "type": "array", + "items": { + "$ref": "#/definitions/v1SpectroClusterProfileEntity" + } + }, + "clusterSettings": { + "description": "clusterSettings is the generic configuration related to a cluster like OS patch, Rbac, Namespace allocation", + "$ref": "#/definitions/v1ClusterConfigEntity" + }, + "size": { + "description": "size of the pool, number of machines", + "type": "integer", + "format": "int32" + } + } + }, + "v1Overlords": { + "description": "Array of Overlords", + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1Overlord" + } + } + } + }, + "v1PackConfig": { + "description": "Pack configuration", + "type": "object", + "properties": { + "spec": { + "$ref": "#/definitions/v1PackConfigSpec" + } + } + }, + "v1PackConfigSpec": { + "type": "object", + "properties": { + "associatedObject": { + "type": "string" + }, + "isValuesOverridden": { + "type": "boolean", + "x-omitempty": false + }, + "manifests": { + "type": "array", + "items": { + "$ref": "#/definitions/v1PackManifestRef" + } + }, + "name": { + "type": "string" + }, + "packUid": { + "type": "string" + }, + "scope": { + "type": "string" + }, + "tag": { + "type": "string" + }, + "type": { + "type": "string" + }, + "values": { + "type": "string" + }, + "version": { + "type": "string" + } + } + }, + "v1PackDependency": { + "description": "Pack template dependency", + "type": "object", + "properties": { + "layer": { + "description": "Pack template dependency pack layer", + "type": "string" + }, + "name": { + "description": "Pack template dependency pack name", + "type": "string" + }, + "readOnly": { + "description": "If true then dependency pack values can't be overridden", + "type": "boolean" + } + } + }, + "v1PackDependencyMeta": { + "description": "Pack dependency metadata", + "type": "object", + "properties": { + "displayName": { + "description": "Pack display name", + "type": "string" + }, + "logoUrl": { + "description": "Pack logo url", + "type": "string" + }, + "name": { + "description": "Pack name", + "type": "string" + }, + "registryUid": { + "description": "Pack registry uid", + "type": "string" + }, + "uid": { + "description": "Pack uid", + "type": "string" + }, + "version": { + "description": "Pack version", + "type": "string" + } + } + }, + "v1PackEntity": { + "description": "Pack object", + "type": "object", + "required": [ + "uid", + "name" + ], + "properties": { + "layer": { + "description": "Pack layer", + "type": "string" + }, + "name": { + "description": "Pack name", + "type": "string" + }, + "tag": { + "description": "Pack tag", + "type": "string" + }, + "type": { + "$ref": "#/definitions/v1PackType" + }, + "uid": { + "description": "Pack uid", + "type": "string" + }, + "values": { + "description": "values represents the values.yaml used as input parameters either Params OR Values should be used, not both If both applied at the same time, will only use Values", + "type": "string" + } + } + }, + "v1PackFilterSpec": { + "description": "Packs filter spec", + "properties": { + "addOnSubType": { + "description": "Pack add-on sub type such as monitoring, db etc", + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + } + }, + "addOnType": { + "description": "Pack add-on type such as logging, monitoring, security etc", + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + } + }, + "displayName": { + "$ref": "#/definitions/v1FilterString" + }, + "environment": { + "description": "Pack supported cloud types", + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + } + }, + "isFips": { + "description": "isFips compliant", + "type": "boolean" + }, + "layer": { + "description": "Pack layer", + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1PackLayer" + } + }, + "name": { + "$ref": "#/definitions/v1FilterString" + }, + "registryUid": { + "description": "Pack registry uid", + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + } + }, + "source": { + "description": "The source filter describes the creation origin/source of the pack. Ex. source can be \"spectrocloud\" or \"community\"", + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + } + }, + "state": { + "description": "Pack state such as deprecated or disabled", + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + } + }, + "type": { + "description": "Pack type", + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1PackType" + } + } + } + }, + "v1PackImportEntity": { + "description": "Pack import request payload", + "type": "object", + "properties": { + "layer": { + "description": "Pack layer [ \"os\", \"k8s\", \"cni\", \"csi\", \"addon\" ]", + "type": "string" + }, + "manifests": { + "description": "Pack manifests array", + "type": "array", + "items": { + "$ref": "#/definitions/v1PackManifestImportEntity" + } + }, + "name": { + "description": "Pack name", + "type": "string" + }, + "registry": { + "$ref": "#/definitions/v1PackRegistryImportEntity" + }, + "tag": { + "description": "Pack version tag", + "type": "string" + }, + "type": { + "description": "Pack type [ \"spectro\", \"helm\", \"manifest\", \"oci\" ]", + "type": "string" + }, + "values": { + "description": "Pack values are the customizable configurations for the pack", + "type": "string" + }, + "version": { + "description": "Pack version", + "type": "string" + } + } + }, + "v1PackInputEntity": { + "description": "Pack request payload", + "properties": { + "pack": { + "$ref": "#/definitions/v1PackManifestEntity" + } + } + }, + "v1PackLayer": { + "type": "string", + "enum": [ + "kernel", + "os", + "k8s", + "cni", + "csi", + "addon" + ] + }, + "v1PackManifestEntity": { + "description": "Pack request payload", + "type": "object", + "required": [ + "name" + ], + "properties": { + "layer": { + "description": "Pack layer", + "type": "string" + }, + "manifests": { + "description": "Pack manifests are additional content as part of the profile", + "type": "array", + "items": { + "$ref": "#/definitions/v1ManifestInputEntity" + } + }, + "name": { + "description": "Pack name", + "type": "string" + }, + "registryUid": { + "description": "Pack registry uid", + "type": "string" + }, + "tag": { + "description": "Pack tag", + "type": "string" + }, + "type": { + "$ref": "#/definitions/v1PackType" + }, + "uid": { + "description": "Pack uid", + "type": "string" + }, + "values": { + "description": "Pack values represents the values.yaml used as input parameters either Params OR Values should be used, not both If both applied at the same time, will only use Values", + "type": "string" + } + } + }, + "v1PackManifestImportEntity": { + "description": "Pack manifest import objct", + "type": "object", + "properties": { + "content": { + "description": "Pack manifest content in yaml", + "type": "string" + }, + "name": { + "description": "Pack manifest name", + "type": "string" + } + } + }, + "v1PackManifestRef": { + "type": "object", + "properties": { + "digest": { + "type": "string" + }, + "isOverridden": { + "type": "boolean", + "x-omitempty": false + }, + "name": { + "type": "string" + }, + "parentUid": { + "type": "string" + }, + "uid": { + "type": "string" + } + } + }, + "v1PackManifestUpdateEntity": { + "description": "Pack input entity with values to overwrite and manifests for the intial creation", + "type": "object", + "required": [ + "name" + ], + "properties": { + "layer": { + "description": "Pack layer", + "type": "string" + }, + "manifests": { + "description": "Pack manifests are additional content as part of the profile", + "type": "array", + "items": { + "$ref": "#/definitions/v1ManifestRefUpdateEntity" + } + }, + "name": { + "description": "Pack name", + "type": "string" + }, + "registryUid": { + "description": "Pack registry uid", + "type": "string" + }, + "tag": { + "description": "Pack tag", + "type": "string" + }, + "type": { + "$ref": "#/definitions/v1PackType" + }, + "uid": { + "description": "Pack uid", + "type": "string" + }, + "values": { + "description": "Pack values represents the values.yaml used as input parameters either Params OR Values should be used, not both If both applied at the same time, will only use Values", + "type": "string" + } + } + }, + "v1PackManifests": { + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": { + "description": "Manifests array", + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1Manifest" + } + } + } + }, + "v1PackManifestsSpec": { + "description": "Pack manifests spec", + "type": "object", + "properties": { + "addonType": { + "description": "Pack add-on type such as logging, monitoring, security etc", + "type": "string" + }, + "annotations": { + "description": "Pack annotations is used to allow pack to add more arbitrary configurations", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "cloudTypes": { + "description": "Pack supported cloud types", + "type": "array", + "items": { + "type": "string" + } + }, + "digest": { + "description": "Pack digest", + "type": "string" + }, + "displayName": { + "description": "Pack display name", + "type": "string" + }, + "eol": { + "description": "Pack end of life, date format: yyyy-MM-dd", + "type": "string" + }, + "group": { + "description": "Pack group", + "type": "string" + }, + "layer": { + "$ref": "#/definitions/v1PackLayer" + }, + "logoUrl": { + "description": "Pack logo url", + "type": "string" + }, + "manifests": { + "description": "Pack manifests are additional content as part of the cluster profile", + "type": "array", + "items": { + "$ref": "#/definitions/v1ManifestSummary" + } + }, + "name": { + "description": "Pack name", + "type": "string" + }, + "presets": { + "description": "Pack presets are the set of configurations applied on user selection of presets", + "type": "array", + "items": { + "$ref": "#/definitions/v1PackPreset" + } + }, + "registryUid": { + "description": "Pack registry uid", + "type": "string" + }, + "schema": { + "description": "Pack schema contains constraints such as data type, format, hints for the pack values", + "type": "array", + "items": { + "$ref": "#/definitions/v1PackSchema" + } + }, + "type": { + "$ref": "#/definitions/v1PackType" + }, + "values": { + "description": "Pack values", + "type": "string" + }, + "version": { + "description": "Pack version", + "type": "string" + } + } + }, + "v1PackMetadata": { + "description": "Pack metadata object", + "type": "object", + "properties": { + "apiVersion": { + "description": "Pack api version", + "type": "string" + }, + "kind": { + "description": "Pack kind", + "type": "string" + }, + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/v1PackMetadataSpec" + } + } + }, + "v1PackMetadataList": { + "description": "List of packs metadata", + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": { + "description": "Packs metadata array", + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1PackMetadata" + } + }, + "listmeta": { + "$ref": "#/definitions/v1ListMetaData" + } + } + }, + "v1PackMetadataSpec": { + "description": "Pack metadata spec", + "type": "object", + "properties": { + "addonSubType": { + "description": "Pack add-on sub type such as monitoring, db etc", + "type": "string" + }, + "addonType": { + "description": "Pack add-on type such as logging, monitoring, security etc", + "type": "string" + }, + "cloudTypes": { + "description": "Pack supported cloud types", + "type": "array", + "items": { + "type": "string" + } + }, + "displayName": { + "description": "Pack display name", + "type": "string" + }, + "group": { + "description": "Pack group", + "type": "string" + }, + "layer": { + "$ref": "#/definitions/v1PackLayer" + }, + "name": { + "description": "Pack name", + "type": "string" + }, + "registries": { + "description": "Pack registries array", + "type": "array", + "items": { + "$ref": "#/definitions/v1RegistryPackMetadata" + } + }, + "type": { + "$ref": "#/definitions/v1PackType" + } + } + }, + "v1PackParamsEntity": { + "description": "Pack params request payload", + "properties": { + "references": { + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + } + } + } + }, + "v1PackPreset": { + "description": "PackPreset defines the preset pack values", + "type": "object", + "properties": { + "add": { + "type": "string", + "x-omitempty": false + }, + "displayName": { + "type": "string", + "x-omitempty": false + }, + "group": { + "type": "string", + "x-omitempty": false + }, + "name": { + "type": "string", + "x-omitempty": false + }, + "remove": { + "type": "array", + "items": { + "type": "string" + }, + "x-omitempty": false + } + } + }, + "v1PackReadme": { + "properties": { + "readme": { + "description": "Readme describes the documentation of the specified pack", + "type": "string" + } + } + }, + "v1PackRef": { + "description": "PackRef server/name:tag to point to a pack PackRef is used when construct a ClusterProfile PackSpec is used for UI to render the parameters form ClusterProfile will not know inner details of a pack ClusterProfile only contain pack name:tag, and the param values user entered for it", + "type": "object", + "required": [ + "layer", + "name" + ], + "properties": { + "annotations": { + "description": "Annotations is used to allow packref to add more arbitrary information one example is to add git reference for values.yaml", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "digest": { + "description": "digest is used to specify the version should be installed by palette when pack upgrade available, change this digest to trigger upgrade", + "type": "string" + }, + "inValidReason": { + "type": "string" + }, + "isInvalid": { + "description": "pack is invalid when the associated tag is deleted from the registry", + "type": "boolean" + }, + "layer": { + "type": "string", + "enum": [ + "kernel", + "os", + "k8s", + "cni", + "csi", + "addon" + ] + }, + "logo": { + "description": "path to the pack logo", + "type": "string" + }, + "manifests": { + "type": "array", + "items": { + "$ref": "#/definitions/v1ObjectReference" + } + }, + "name": { + "description": "pack name", + "type": "string" + }, + "packUid": { + "description": "PackUID is Hubble packUID, not palette Pack.UID It is used by Hubble only.", + "type": "string" + }, + "params": { + "description": "params passed as env variables to be consumed at installation time", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "presets": { + "type": "array", + "items": { + "$ref": "#/definitions/v1PackPreset" + } + }, + "registryUid": { + "description": "pack registry uid", + "type": "string" + }, + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/v1PackSchema" + } + }, + "server": { + "description": "pack registry server or helm repo", + "type": "string" + }, + "tag": { + "description": "pack tag", + "type": "string" + }, + "type": { + "description": "type of the pack", + "type": "string", + "enum": [ + "spectro", + "helm", + "manifest" + ] + }, + "values": { + "description": "values represents the values.yaml used as input parameters either Params OR Values should be used, not both If both applied at the same time, will only use Values", + "type": "string" + }, + "version": { + "description": "pack version", + "type": "string" + } + } + }, + "v1PackRefSummary": { + "description": "Pack ref summary", + "properties": { + "addonType": { + "type": "string" + }, + "annotations": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "displayName": { + "type": "string" + }, + "layer": { + "$ref": "#/definitions/v1PackLayer" + }, + "logoUrl": { + "type": "string" + }, + "name": { + "type": "string" + }, + "packUid": { + "type": "string" + }, + "tag": { + "type": "string" + }, + "type": { + "type": "string" + }, + "version": { + "type": "string" + } + } + }, + "v1PackRefSummaryResponse": { + "description": "Pack summary response", + "type": "object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/v1PackRefSummarySpec" + } + } + }, + "v1PackRefSummarySpec": { + "description": "Pack summary spec", + "properties": { + "macros": { + "$ref": "#/definitions/v1PackResolvedValues" + }, + "pack": { + "$ref": "#/definitions/v1PackSummarySpec" + }, + "registry": { + "$ref": "#/definitions/v1RegistryMetadata" + } + } + }, + "v1PackRegistries": { + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1PackRegistry" + } + }, + "listmeta": { + "$ref": "#/definitions/v1ListMetaData" + } + } + }, + "v1PackRegistriesSummary": { + "description": "Pack Registries Summary", + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1PackRegistrySummary" + } + }, + "listmeta": { + "$ref": "#/definitions/v1ListMetaData" + } + } + }, + "v1PackRegistry": { + "description": "Pack registry information", + "type": "object", + "properties": { + "apiVersion": { + "type": "string" + }, + "kind": { + "type": "string" + }, + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/v1PackRegistrySpec" + }, + "status": { + "$ref": "#/definitions/v1PackRegistryStatus" + } + } + }, + "v1PackRegistryImportEntity": { + "description": "Pack registry import entity", + "type": "object", + "properties": { + "matchingRegistries": { + "type": "array", + "items": { + "$ref": "#/definitions/v1PackRegistryMetadata" + } + }, + "metadata": { + "$ref": "#/definitions/v1PackRegistryMetadata" + } + } + }, + "v1PackRegistryMetadata": { + "description": "Pack registry metadata", + "type": "object", + "properties": { + "isPrivate": { + "description": "If true then pack registry is private and is not accessible for the pack sync", + "type": "boolean", + "x-omitempty": false + }, + "kind": { + "description": "Pack registry kind [ \"pack\", \"helm\", \"oci\" ]", + "type": "string" + }, + "name": { + "description": "Pack registry name", + "type": "string" + }, + "providerType": { + "description": "OCI registry provider type [ \"helm\", \"pack\", \"zarf\" ]", + "type": "string" + }, + "uid": { + "description": "Pack registry uid", + "type": "string" + } + } + }, + "v1PackRegistrySpec": { + "description": "Pack registry credentials spec", + "type": "object", + "required": [ + "endpoint", + "auth" + ], + "properties": { + "auth": { + "$ref": "#/definitions/v1RegistryAuth" + }, + "endpoint": { + "type": "string" + }, + "name": { + "type": "string" + }, + "private": { + "type": "boolean", + "x-omitempty": false + }, + "registryUid": { + "description": "Pack registry uid", + "type": "string" + }, + "scope": { + "type": "string" + } + } + }, + "v1PackRegistrySpecSummary": { + "description": "Pack Registry spec summary", + "type": "object", + "properties": { + "endpoint": { + "type": "string" + }, + "private": { + "type": "boolean", + "x-omitempty": false + }, + "scope": { + "type": "string" + } + } + }, + "v1PackRegistryStatus": { + "description": "Status of the pack registry", + "type": "object", + "properties": { + "packSyncStatus": { + "$ref": "#/definitions/v1RegistrySyncStatus" + } + } + }, + "v1PackRegistryStatusSummary": { + "description": "Pack registry status summary", + "type": "object", + "properties": { + "sync": { + "$ref": "#/definitions/v1RegistrySyncStatus" + } + } + }, + "v1PackRegistrySummary": { + "description": "Pack Registry summary", + "type": "object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/v1PackRegistrySpecSummary" + }, + "status": { + "$ref": "#/definitions/v1PackRegistryStatusSummary" + } + } + }, + "v1PackResolvedValues": { + "description": "Pack resolved values", + "properties": { + "resolved": { + "description": "Pack resolved values map", + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + }, + "v1PackSchema": { + "description": "PackSchema defines the schema definition, hints for the pack values", + "type": "object", + "properties": { + "format": { + "type": "string", + "x-omitempty": false + }, + "hints": { + "type": "array", + "items": { + "type": "string" + }, + "x-omitempty": false + }, + "listOptions": { + "type": "array", + "items": { + "type": "string" + }, + "x-omitempty": false + }, + "name": { + "type": "string", + "x-omitempty": false + }, + "readonly": { + "type": "boolean", + "x-omitempty": false + }, + "regex": { + "type": "string", + "x-omitempty": false + }, + "required": { + "type": "boolean", + "x-omitempty": false + }, + "type": { + "type": "string", + "x-omitempty": false + } + } + }, + "v1PackSortFields": { + "description": "Packs sort by fields", + "type": "string", + "enum": [ + "name", + "type", + "layer", + "addOnType", + "displayName" + ], + "x-nullable": true + }, + "v1PackSortSpec": { + "description": "Packs sort spec", + "properties": { + "field": { + "$ref": "#/definitions/v1PackSortFields" + }, + "order": { + "$ref": "#/definitions/v1SortOrder" + } + } + }, + "v1PackSummaries": { + "description": "List of packs", + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": { + "description": "Packs array", + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1PackSummary" + } + }, + "listmeta": { + "$ref": "#/definitions/v1ListMetaData" + } + } + }, + "v1PackSummary": { + "description": "Pack summary object", + "type": "object", + "properties": { + "apiVersion": { + "description": "Pack api version", + "type": "string" + }, + "kind": { + "description": "Pack kind", + "type": "string" + }, + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/v1PackSummarySpec" + }, + "status": { + "$ref": "#/definitions/v1PackSummaryStatus" + } + } + }, + "v1PackSummarySpec": { + "description": "Pack object", + "type": "object", + "properties": { + "addonSubType": { + "description": "Pack add-on sub type such as monitoring, db etc", + "type": "string" + }, + "addonType": { + "description": "Pack add-on type such as logging, monitoring, security etc", + "type": "string" + }, + "annotations": { + "description": "Pack annotations is used to allow pack to add more arbitrary configurations", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "cloudTypes": { + "description": "Pack supported cloud types", + "type": "array", + "items": { + "type": "string" + } + }, + "digest": { + "description": "Pack digest", + "type": "string" + }, + "displayName": { + "description": "Pack display name", + "type": "string" + }, + "eol": { + "description": "Pack end of life, date format: yyyy-MM-dd", + "type": "string" + }, + "group": { + "description": "Pack group", + "type": "string" + }, + "layer": { + "$ref": "#/definitions/v1PackLayer" + }, + "logoUrl": { + "description": "Pack logo url", + "type": "string" + }, + "manifests": { + "description": "Pack manifests are additional content as part of the cluster profile", + "type": "array", + "items": { + "$ref": "#/definitions/v1ObjectReference" + } + }, + "name": { + "description": "Pack name", + "type": "string" + }, + "presets": { + "description": "Pack presets are the set of configurations applied on user selection of presets", + "type": "array", + "items": { + "$ref": "#/definitions/v1PackPreset" + } + }, + "registryUid": { + "description": "Pack registry uid", + "type": "string" + }, + "schema": { + "description": "Pack schema contains constraints such as data type, format, hints for the pack values", + "type": "array", + "items": { + "$ref": "#/definitions/v1PackSchema" + } + }, + "template": { + "$ref": "#/definitions/v1PackTemplate" + }, + "type": { + "$ref": "#/definitions/v1PackType" + }, + "values": { + "description": "Pack values", + "type": "string" + }, + "version": { + "description": "Pack version", + "type": "string" + } + } + }, + "v1PackSummaryStatus": { + "description": "Pack status", + "type": "object" + }, + "v1PackTagEntity": { + "description": "Pack object", + "type": "object", + "properties": { + "addonSubType": { + "description": "Pack add-on sub type such as monitoring, db etc", + "type": "string" + }, + "addonType": { + "description": "Pack add-on type such as logging, monitoring, security etc", + "type": "string" + }, + "cloudTypes": { + "description": "Pack supported cloud types", + "type": "array", + "items": { + "type": "string" + } + }, + "displayName": { + "description": "Pack display name", + "type": "string" + }, + "layer": { + "$ref": "#/definitions/v1PackLayer" + }, + "logoUrl": { + "description": "Pack logo url", + "type": "string" + }, + "name": { + "description": "Pack name", + "type": "string" + }, + "packValues": { + "description": "Pack values array", + "type": "array", + "items": { + "$ref": "#/definitions/v1PackUidValues" + } + }, + "registryUid": { + "description": "Pack registry uid", + "type": "string" + }, + "tags": { + "description": "Pack version tags array", + "type": "array", + "items": { + "$ref": "#/definitions/v1PackTags" + } + } + } + }, + "v1PackTags": { + "type": "object", + "properties": { + "group": { + "description": "Pack group", + "type": "string" + }, + "packUid": { + "description": "Pack uid", + "type": "string" + }, + "parentTags": { + "description": "Pack version parent tags", + "type": "array", + "items": { + "type": "string" + } + }, + "tag": { + "description": "Pack version tag", + "type": "string" + }, + "version": { + "description": "Pack version", + "type": "string" + } + } + }, + "v1PackTemplate": { + "description": "Pack template configuration", + "properties": { + "manifest": { + "description": "Pack template manifest content", + "type": "string" + }, + "parameters": { + "$ref": "#/definitions/v1PackTemplateParameters" + }, + "values": { + "description": "Pack template values", + "type": "string" + } + } + }, + "v1PackTemplateParameter": { + "description": "Pack template parameter", + "properties": { + "description": { + "description": "Pack template parameter description", + "type": "string" + }, + "displayName": { + "description": "Pack template parameter display name", + "type": "string" + }, + "format": { + "description": "Pack template parameter format", + "type": "string" + }, + "hidden": { + "description": "Pack template parameter hidden flag, if true then the parameter is hidden in the UI", + "type": "boolean" + }, + "listOptions": { + "description": "Pack template parameter list options as string array", + "type": "array", + "items": { + "type": "string" + } + }, + "name": { + "description": "Pack template parameter name", + "type": "string" + }, + "optional": { + "description": "Pack template parameter optional flag, if true then the parameter value is not mandatory", + "type": "boolean" + }, + "options": { + "description": "Pack template parameter options array", + "type": "object", + "additionalProperties": { + "type": "object", + "$ref": "#/definitions/v1PackTemplateParameterOption" + } + }, + "readOnly": { + "description": "Pack template parameter readonly flag, if true then the parameter value can't be overridden", + "type": "boolean" + }, + "regex": { + "description": "Pack template parameter regex, if set then parameter value must match with specified regex", + "type": "string" + }, + "targetKey": { + "description": "Pack template parameter target key which is mapped to the key defined in the pack values", + "type": "string" + }, + "type": { + "description": "Pack template parameter data type", + "type": "string" + }, + "value": { + "description": "Pack template parameter value", + "type": "string" + } + } + }, + "v1PackTemplateParameterOption": { + "description": "Pack template parameter option", + "type": "object", + "properties": { + "dependencies": { + "description": "Pack template parameter dependencies", + "type": "array", + "items": { + "$ref": "#/definitions/v1PackDependency" + } + }, + "description": { + "description": "Pack template parameter description", + "type": "string" + }, + "label": { + "description": "Pack template parameter label", + "type": "string" + } + } + }, + "v1PackTemplateParameters": { + "description": "Pack template parameters", + "properties": { + "inputParameters": { + "description": "Pack template input parameters array", + "type": "array", + "items": { + "$ref": "#/definitions/v1PackTemplateParameter" + } + }, + "outputParameters": { + "description": "Pack template output parameters array", + "type": "array", + "items": { + "$ref": "#/definitions/v1PackTemplateParameter" + } + } + } + }, + "v1PackType": { + "type": "string", + "default": "spectro", + "enum": [ + "spectro", + "helm", + "manifest", + "oci" + ] + }, + "v1PackUidValues": { + "type": "object", + "properties": { + "annotations": { + "description": "Pack annotations is used to allow pack to add more arbitrary configurations", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "dependencies": { + "description": "Pack dependencies array", + "type": "array", + "items": { + "$ref": "#/definitions/v1PackDependencyMeta" + } + }, + "packUid": { + "description": "Pack uid", + "type": "string" + }, + "presets": { + "description": "Pack presets are the set of configurations applied on user selection of presets", + "type": "array", + "items": { + "$ref": "#/definitions/v1PackPreset" + } + }, + "readme": { + "description": "Readme describes the documentation of the specified pack", + "type": "string" + }, + "schema": { + "description": "Pack schema contains constraints such as data type, format, hints for the pack values", + "type": "array", + "items": { + "$ref": "#/definitions/v1PackSchema" + } + }, + "template": { + "$ref": "#/definitions/v1PackTemplate" + }, + "values": { + "description": "Pack values represents the values.yaml used as input parameters", + "type": "string" + } + } + }, + "v1PackUpdateEntity": { + "description": "Pack update request payload", + "properties": { + "pack": { + "$ref": "#/definitions/v1PackEntity" + } + } + }, + "v1PackValuesEntity": { + "description": "Pack values entity to refer the existing pack for the values override", + "type": "object", + "required": [ + "name" + ], + "properties": { + "manifests": { + "description": "Pack manifests are additional content as part of the profile", + "type": "array", + "items": { + "$ref": "#/definitions/v1ManifestRefUpdateEntity" + } + }, + "name": { + "description": "Pack name", + "type": "string" + }, + "tag": { + "description": "Pack version tag", + "type": "string" + }, + "type": { + "$ref": "#/definitions/v1PackType" + }, + "values": { + "description": "Pack values represents the values.yaml used as input parameters either Params OR Values should be used, not both If both applied at the same time, will only use Values", + "type": "string" + } + } + }, + "v1PacksFilterSpec": { + "description": "Packs filter spec", + "properties": { + "filter": { + "$ref": "#/definitions/v1PackFilterSpec" + }, + "sort": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1PackSortSpec" + } + } + } + }, + "v1PairingCode": { + "description": "Pairing code response", + "type": "object", + "properties": { + "pairingCode": { + "type": "string" + } + } + }, + "v1Partition": { + "type": "object", + "properties": { + "fileSystemType": { + "type": "string" + }, + "freeSpace": { + "type": "integer", + "format": "int32" + }, + "mountPoint": { + "type": "string" + }, + "totalSpace": { + "type": "integer", + "format": "int32" + }, + "usedSpace": { + "type": "integer", + "format": "int32" + } + } + }, + "v1PasswordsBlockListEntity": { + "description": "List of block listed passwords", + "type": "object", + "properties": { + "passwords": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "v1PcgSelfHostedParams": { + "properties": { + "cloudType": { + "type": "string" + }, + "name": { + "type": "string" + } + } + }, + "v1PcgServiceKubectlCommands": { + "description": "Array of kubectl commands", + "type": "object", + "required": [ + "kubectlCommands" + ], + "properties": { + "kubectlCommands": { + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + } + }, + "overlordUid": { + "type": "string" + } + } + }, + "v1PcgsSummary": { + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1Overlord" + } + }, + "listmeta": { + "$ref": "#/definitions/v1ListMetaData" + } + } + }, + "v1Permission": { + "description": "Permission information", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "permissions": { + "type": "array", + "items": { + "type": "string" + } + }, + "scope": { + "$ref": "#/definitions/v1Scope" + } + } + }, + "v1Permissions": { + "description": "Array of permissions", + "type": "array", + "items": { + "$ref": "#/definitions/v1Permission" + } + }, + "v1PlanCredit": { + "description": "Plan Credit", + "required": [ + "type" + ], + "properties": { + "cpuCoreHours": { + "type": "number", + "format": "int64", + "x-omitempty": false + }, + "creditUid": { + "type": "string" + }, + "expiry": { + "description": "credit expiry time", + "$ref": "#/definitions/v1Time" + }, + "name": { + "type": "string" + }, + "start": { + "description": "credit start time", + "$ref": "#/definitions/v1Time" + }, + "type": { + "type": "string", + "enum": [ + "Pure", + "Alloy" + ] + } + } + }, + "v1PodAntiAffinity": { + "description": "Pod anti affinity is a group of inter pod anti affinity scheduling rules.", + "type": "object", + "properties": { + "preferredDuringSchedulingIgnoredDuringExecution": { + "description": "The scheduler will prefer to schedule pods to nodes that satisfy the anti-affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling anti-affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding \"weight\" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred.", + "type": "array", + "items": { + "$ref": "#/definitions/v1VmWeightedPodAffinityTerm" + } + }, + "requiredDuringSchedulingIgnoredDuringExecution": { + "description": "If the anti-affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the anti-affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied.", + "type": "array", + "items": { + "$ref": "#/definitions/v1VmPodAffinityTerm" + } + } + } + }, + "v1Pool": { + "description": "Pool defines IP ranges or with CIDR for available IPs Gateway, Prefix and Nameserver if provided, will overwrite values in IPPool", + "type": "object", + "properties": { + "end": { + "description": "End is the last IP address that can be rendered. It is used as a validation that the rendered IP is in bound.", + "type": "string" + }, + "gateway": { + "description": "Gateway is the gateway ip address", + "type": "string" + }, + "nameserver": { + "description": "Nameserver provide information for dns resolvation", + "$ref": "#/definitions/v1Nameserver" + }, + "prefix": { + "description": "Prefix is the mask of the network as integer (max 128)", + "type": "integer", + "format": "int32" + }, + "start": { + "description": "Start is the first ip address that can be rendered", + "type": "string" + }, + "subnet": { + "description": "Subnet is used to validate that the rendered IP is in bounds. eg: 192.168.0.0/24 If Start value is not given, start value is derived from the subnet ip incremented by 1 (start value is `192.168.0.1` for subnet `192.168.0.0/24`)", + "type": "string" + } + } + }, + "v1PrivateCloudRateConfig": { + "description": "Private cloud rate config", + "properties": { + "cpuUnitPricePerHour": { + "type": "number", + "format": "float64" + }, + "gpuUnitPricePerHour": { + "type": "number", + "format": "float64" + }, + "memoryUnitPriceGiBPerHour": { + "type": "number", + "format": "float64" + }, + "storageUnitPriceGiBPerHour": { + "type": "number", + "format": "float64" + } + } + }, + "v1ProfileMetaEntity": { + "description": "Cluster profile metadata request payload", + "type": "object", + "required": [ + "metadata" + ], + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectMetaInputEntity" + }, + "spec": { + "$ref": "#/definitions/v1ClusterProfileSpecEntity" + } + } + }, + "v1ProfileResolvedValues": { + "description": "Cluster profile resolved pack values", + "properties": { + "resolved": { + "description": "Cluster profile pack resolved values", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "uid": { + "description": "Cluster profile uid", + "type": "string" + } + } + }, + "v1ProfileStatus": { + "type": "object", + "properties": { + "hasUserMacros": { + "description": "If it is true then profile pack values has a reference to user defined macros", + "type": "boolean", + "x-omitempty": false + } + } + }, + "v1ProfileTemplateSummary": { + "description": "Edge host clusterprofile template summary", + "type": "object", + "properties": { + "cloudType": { + "type": "string" + }, + "name": { + "type": "string" + }, + "packs": { + "type": "array", + "items": { + "$ref": "#/definitions/v1PackRefSummary" + } + }, + "type": { + "type": "string" + }, + "uid": { + "type": "string" + }, + "version": { + "type": "string" + } + } + }, + "v1ProfileType": { + "type": "string", + "default": "cluster", + "enum": [ + "cluster", + "infra", + "add-on", + "system" + ] + }, + "v1Project": { + "description": "Project information", + "type": "object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/v1ProjectSpec" + }, + "status": { + "$ref": "#/definitions/v1ProjectStatus" + } + } + }, + "v1ProjectActiveAppDeployment": { + "description": "Active app deployment", + "type": "object", + "properties": { + "appRef": { + "$ref": "#/definitions/v1ObjectEntity" + }, + "state": { + "type": "string" + } + } + }, + "v1ProjectActiveAppDeployments": { + "description": "Active app deployment", + "type": "object", + "properties": { + "apps": { + "type": "array", + "items": { + "$ref": "#/definitions/v1ProjectActiveAppDeployment" + } + }, + "count": { + "type": "integer", + "format": "int32" + } + } + }, + "v1ProjectActiveCluster": { + "description": "Active clusters", + "type": "object", + "properties": { + "clusterRef": { + "$ref": "#/definitions/v1ObjectEntity" + }, + "state": { + "type": "string" + } + } + }, + "v1ProjectActiveClusters": { + "description": "Active clusters", + "type": "object", + "properties": { + "clusters": { + "type": "array", + "items": { + "$ref": "#/definitions/v1ProjectActiveCluster" + } + }, + "count": { + "type": "integer", + "format": "int32" + } + } + }, + "v1ProjectActiveResources": { + "description": "Active project resources", + "type": "object", + "properties": { + "appDeployments": { + "$ref": "#/definitions/v1ProjectActiveAppDeployments" + }, + "clusters": { + "$ref": "#/definitions/v1ProjectActiveClusters" + }, + "virtualClusters": { + "$ref": "#/definitions/v1ProjectActiveClusters" + } + } + }, + "v1ProjectAlertComponent": { + "description": "Project alert component", + "type": "object", + "properties": { + "description": { + "type": "string" + }, + "name": { + "type": "string" + }, + "supportedChannels": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "v1ProjectAlertComponents": { + "description": "Supported project alerts component", + "type": "object", + "properties": { + "components": { + "type": "array", + "items": { + "$ref": "#/definitions/v1ProjectAlertComponent" + } + } + } + }, + "v1ProjectCleanUpStatus": { + "description": "Project cleanup status", + "type": "object", + "properties": { + "cleanedResources": { + "type": "array", + "items": { + "type": "string" + } + }, + "msg": { + "type": "string" + }, + "state": { + "type": "string" + } + } + }, + "v1ProjectCleanup": { + "description": "Project delete request payload", + "properties": { + "deletingClusterDurationThresholdInMin": { + "type": "integer", + "format": "int32" + }, + "provisioningClusterDurationThresholdInMin": { + "type": "integer", + "format": "int32" + } + } + }, + "v1ProjectClusterSettings": { + "properties": { + "nodesAutoRemediationSetting": { + "$ref": "#/definitions/v1NodesAutoRemediationSettings" + }, + "tenantClusterSettings": { + "$ref": "#/definitions/v1TenantClusterSettings" + } + } + }, + "v1ProjectEntity": { + "description": "Project information", + "type": "object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/v1ProjectEntitySpec" + } + } + }, + "v1ProjectEntitySpec": { + "description": "Project specifications", + "properties": { + "logoUid": { + "type": "string" + }, + "teams": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1TeamRoleMap" + } + }, + "users": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1UserRoleMap" + } + } + } + }, + "v1ProjectFilterSortFields": { + "type": "string", + "enum": [ + "name", + "creationTimestamp", + "lastModifiedTimestamp" + ], + "x-nullable": true + }, + "v1ProjectFilterSortSpec": { + "properties": { + "field": { + "$ref": "#/definitions/v1ProjectFilterSortFields" + }, + "order": { + "$ref": "#/definitions/v1SortOrder" + } + } + }, + "v1ProjectFilterSpec": { + "description": "Project filter spec", + "properties": { + "name": { + "$ref": "#/definitions/v1FilterString" + } + } + }, + "v1ProjectMeta": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "uid": { + "type": "string" + } + } + }, + "v1ProjectMetadata": { + "description": "Project metadata", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectEntity" + } + } + }, + "v1ProjectRolesEntity": { + "type": "object", + "properties": { + "projects": { + "type": "array", + "items": { + "$ref": "#/definitions/v1UidRoleSummary" + } + } + } + }, + "v1ProjectRolesPatch": { + "type": "object", + "properties": { + "projects": { + "type": "array", + "items": { + "type": "object", + "properties": { + "projectUid": { + "type": "string" + }, + "roles": { + "type": "array", + "items": { + "type": "string" + } + } + } + } + } + } + }, + "v1ProjectSpec": { + "description": "Project specifications", + "properties": { + "alerts": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1Alert" + } + }, + "logoUrl": { + "type": "string" + }, + "teams": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1TeamRoleMap" + } + }, + "users": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1UserRoleMap" + } + } + } + }, + "v1ProjectSpecSummary": { + "type": "object", + "properties": { + "logoUrl": { + "type": "string" + }, + "teams": { + "type": "array", + "items": { + "$ref": "#/definitions/v1UidSummary" + } + }, + "users": { + "type": "array", + "items": { + "$ref": "#/definitions/v1UidSummary" + } + } + } + }, + "v1ProjectStatus": { + "description": "Project status", + "properties": { + "cleanUpStatus": { + "$ref": "#/definitions/v1ProjectCleanUpStatus" + }, + "isDisabled": { + "type": "boolean" + } + } + }, + "v1ProjectStatusSummary": { + "description": "Project status summary", + "type": "object", + "properties": { + "clustersHealth": { + "$ref": "#/definitions/v1SpectroClustersHealth" + }, + "status": { + "$ref": "#/definitions/v1ProjectStatus" + }, + "usage": { + "$ref": "#/definitions/v1ProjectUsageSummary" + } + } + }, + "v1ProjectSummary": { + "description": "Project summary", + "type": "object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "specSummary": { + "description": "Project spec summary", + "$ref": "#/definitions/v1ProjectSpecSummary" + }, + "status": { + "description": "Project status summary", + "$ref": "#/definitions/v1ProjectStatusSummary" + } + } + }, + "v1ProjectTeamsEntity": { + "properties": { + "teams": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1TeamRoleMap" + } + } + } + }, + "v1ProjectUsage": { + "description": "Project usage object", + "properties": { + "alloy": { + "$ref": "#/definitions/v1ProjectUsageData" + }, + "pure": { + "$ref": "#/definitions/v1ProjectUsageData" + } + } + }, + "v1ProjectUsageData": { + "description": "Project usage data object", + "properties": { + "amount": { + "description": "Billing amount for the project", + "type": "number", + "format": "float64" + }, + "tierPrice": { + "description": "Tier price based on the usage", + "type": "number", + "format": "float64" + }, + "usedCredits": { + "description": "Project used credits", + "type": "number", + "format": "float64" + } + } + }, + "v1ProjectUsageSummary": { + "description": "Project usage summary", + "type": "object", + "properties": { + "alloyCpuCores": { + "type": "number", + "x-omitempty": false + }, + "clusters": { + "type": "array", + "items": { + "$ref": "#/definitions/v1ClusterUsageSummary" + } + }, + "pureCpuCores": { + "type": "number", + "x-omitempty": false + } + } + }, + "v1ProjectUsersEntity": { + "properties": { + "users": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1UserRoleMap" + } + } + } + }, + "v1ProjectsFilterSpec": { + "description": "Project filter summary spec", + "properties": { + "filter": { + "$ref": "#/definitions/v1ProjectFilterSpec" + }, + "sort": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1ProjectFilterSortSpec" + } + } + } + }, + "v1ProjectsMetadata": { + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1ProjectMetadata" + } + } + } + }, + "v1ProjectsSummary": { + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1ProjectSummary" + } + }, + "listmeta": { + "$ref": "#/definitions/v1ListMetaData" + } + } + }, + "v1ProjectsWorkspaces": { + "description": "List projects and its workspaces", + "properties": { + "name": { + "type": "string" + }, + "uid": { + "type": "string" + }, + "workspaces": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1WorkspacesRoles" + } + } + } + }, + "v1PublicCloudRateConfig": { + "description": "Public cloud rate config", + "properties": { + "computeOptimized": { + "$ref": "#/definitions/v1CloudInstanceRateConfig" + }, + "memoryOptimized": { + "$ref": "#/definitions/v1CloudInstanceRateConfig" + } + } + }, + "v1RateConfig": { + "description": "Rate config", + "properties": { + "aws": { + "$ref": "#/definitions/v1PublicCloudRateConfig" + }, + "azure": { + "$ref": "#/definitions/v1PublicCloudRateConfig" + }, + "custom": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1CustomCloudRateConfig" + } + }, + "edge": { + "$ref": "#/definitions/v1PrivateCloudRateConfig" + }, + "edgeNative": { + "$ref": "#/definitions/v1PrivateCloudRateConfig" + }, + "gcp": { + "$ref": "#/definitions/v1PublicCloudRateConfig" + }, + "generic": { + "$ref": "#/definitions/v1PrivateCloudRateConfig" + }, + "libvirt": { + "$ref": "#/definitions/v1PrivateCloudRateConfig" + }, + "maas": { + "$ref": "#/definitions/v1PrivateCloudRateConfig" + }, + "openstack": { + "$ref": "#/definitions/v1PrivateCloudRateConfig" + }, + "vsphere": { + "$ref": "#/definitions/v1PrivateCloudRateConfig" + } + } + }, + "v1RegistriesMetadata": { + "description": "Pack Registries Metadata", + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1RegistryMetadata" + } + } + } + }, + "v1RegistryAuth": { + "description": "Auth credentials of the registry", + "type": "object", + "properties": { + "password": { + "type": "string", + "format": "password" + }, + "tls": { + "$ref": "#/definitions/v1TlsConfiguration" + }, + "token": { + "type": "string", + "format": "password" + }, + "type": { + "type": "string", + "enum": [ + "noAuth", + "basic", + "token" + ] + }, + "username": { + "type": "string" + } + } + }, + "v1RegistryConfigEntity": { + "description": "Registry configuration entity", + "type": "object", + "properties": { + "config": { + "$ref": "#/definitions/v1RegistryConfiguration" + } + } + }, + "v1RegistryConfiguration": { + "description": "Registry configuration", + "type": "object", + "properties": { + "auth": { + "$ref": "#/definitions/v1RegistryAuth" + }, + "endpoint": { + "type": "string" + }, + "name": { + "type": "string" + } + } + }, + "v1RegistryMetadata": { + "description": "Registry meta", + "type": "object", + "properties": { + "isDefault": { + "type": "boolean", + "x-omitempty": false + }, + "isPrivate": { + "type": "boolean", + "x-omitempty": false + }, + "kind": { + "type": "string" + }, + "name": { + "type": "string" + }, + "scope": { + "type": "string" + }, + "uid": { + "type": "string" + } + } + }, + "v1RegistryPackMetadata": { + "description": "Registry metadata information", + "properties": { + "annotations": { + "description": "Pack annotations is used to allow pack to add more arbitrary configurations", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "latestPackUid": { + "description": "Latest pack uid", + "type": "string" + }, + "latestVersion": { + "description": "Pack latest version", + "type": "string" + }, + "logoUrl": { + "description": "Pack logo url", + "type": "string" + }, + "name": { + "description": "Pack registry name", + "type": "string" + }, + "scope": { + "description": "Pack registry scope", + "type": "string" + }, + "uid": { + "description": "Pack registry uid", + "type": "string" + } + } + }, + "v1RegistrySyncStatus": { + "description": "Status of the registry sync", + "type": "object", + "properties": { + "lastRunTime": { + "$ref": "#/definitions/v1Time" + }, + "lastSyncedTime": { + "$ref": "#/definitions/v1Time" + }, + "message": { + "type": "string" + }, + "status": { + "type": "string" + } + } + }, + "v1RelatedObject": { + "description": "Object for which the resource is related", + "type": "object", + "properties": { + "kind": { + "type": "string", + "enum": [ + "spectrocluster", + "machine", + "cloudconfig", + "clusterprofile", + "pack", + "appprofile", + "appdeployment", + "edgehost" + ] + }, + "name": { + "type": "string" + }, + "uid": { + "type": "string" + } + } + }, + "v1ResourceCloudCostSummary": { + "description": "Resource cloud cost summary information", + "type": "object", + "properties": { + "data": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1CloudCostDataPoint" + } + }, + "entity": { + "$ref": "#/definitions/v1ResourceReference" + }, + "total": { + "$ref": "#/definitions/v1ResourceTotalCloudCost" + } + } + }, + "v1ResourceConsumption": { + "description": "Resource consumption information", + "type": "object", + "properties": { + "associatedResources": { + "type": "array", + "items": { + "$ref": "#/definitions/v1ResourceReference" + } + }, + "data": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1ResourceConsumptionDataPoint" + } + }, + "entity": { + "$ref": "#/definitions/v1ResourceReference" + }, + "total": { + "$ref": "#/definitions/v1ResourceTotalConsumptionData" + } + } + }, + "v1ResourceConsumptionData": { + "description": "Resource cosumption data", + "type": "object", + "properties": { + "cpu": { + "type": "number", + "format": "float64", + "x-omitempty": false + }, + "memory": { + "type": "number", + "format": "float64", + "x-omitempty": false + } + } + }, + "v1ResourceConsumptionDataPoint": { + "description": "Resource cosumption data point", + "type": "object", + "properties": { + "allotted": { + "$ref": "#/definitions/v1ResourceConsumptionData" + }, + "timestamp": { + "type": "number", + "format": "int64" + }, + "usage": { + "$ref": "#/definitions/v1ResourceConsumptionData" + } + } + }, + "v1ResourceConsumptionFilter": { + "description": "Resource consumption filter", + "type": "object", + "properties": { + "clouds": { + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + } + }, + "clusters": { + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + } + }, + "endTime": { + "$ref": "#/definitions/v1Time" + }, + "includeControlPlaneMachines": { + "type": "boolean" + }, + "includeMasterMachines": { + "description": "Deprecated. Use includeControlPlaneMachines", + "type": "boolean" + }, + "namespaces": { + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + } + }, + "projects": { + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + } + }, + "startTime": { + "$ref": "#/definitions/v1Time" + }, + "workspaces": { + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + } + } + } + }, + "v1ResourceConsumptionOptions": { + "description": "Resource consumption options", + "type": "object", + "properties": { + "enableSummaryView": { + "type": "boolean", + "default": true + }, + "groupBy": { + "type": "string", + "default": "namespace", + "enum": [ + "tenant", + "project", + "workspace", + "cluster", + "namespace", + "cloud" + ] + }, + "period": { + "type": "integer", + "format": "int32", + "default": 60 + } + } + }, + "v1ResourceConsumptionSpec": { + "description": "Resource consumption spec", + "type": "object", + "properties": { + "filter": { + "$ref": "#/definitions/v1ResourceConsumptionFilter" + }, + "options": { + "$ref": "#/definitions/v1ResourceConsumptionOptions" + } + } + }, + "v1ResourceCost": { + "description": "Resource Cost information", + "type": "object", + "properties": { + "cloud": { + "$ref": "#/definitions/v1CloudCost" + }, + "total": { + "type": "number", + "format": "float64", + "x-omitempty": false + } + } + }, + "v1ResourceCostDataPoint": { + "description": "Resource cost data point", + "type": "object", + "properties": { + "cpu": { + "type": "number", + "format": "float64", + "x-omitempty": false + }, + "memory": { + "type": "number", + "format": "float64", + "x-omitempty": false + }, + "storage": { + "type": "number", + "format": "float64", + "x-omitempty": false + }, + "timestamp": { + "type": "number", + "format": "int64" + }, + "total": { + "type": "number", + "format": "float64", + "x-omitempty": false + } + } + }, + "v1ResourceCostSummary": { + "description": "Resource cost summary information", + "type": "object", + "properties": { + "associatedResources": { + "type": "array", + "items": { + "$ref": "#/definitions/v1ResourceReference" + } + }, + "data": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1ResourceCostDataPoint" + } + }, + "entity": { + "$ref": "#/definitions/v1ResourceReference" + }, + "total": { + "$ref": "#/definitions/v1ResourceTotalCost" + } + } + }, + "v1ResourceCostSummaryFilter": { + "description": "Resource cost summary filter", + "type": "object", + "properties": { + "clouds": { + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + } + }, + "clusters": { + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + } + }, + "endTime": { + "$ref": "#/definitions/v1Time" + }, + "includeControlPlaneMachines": { + "type": "boolean" + }, + "includeMasterMachines": { + "description": "Deprecated. Use includeControlPlaneMachines", + "type": "boolean" + }, + "namespaces": { + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + } + }, + "projects": { + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + } + }, + "startTime": { + "$ref": "#/definitions/v1Time" + }, + "workspaces": { + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + } + } + } + }, + "v1ResourceCostSummaryOptions": { + "description": "Resource cost summary options", + "type": "object", + "properties": { + "enableSummaryView": { + "type": "boolean", + "default": true + }, + "groupBy": { + "type": "string", + "default": "cluster", + "enum": [ + "tenant", + "project", + "workspace", + "cluster", + "namespace", + "deployment", + "cloud" + ] + }, + "period": { + "type": "integer", + "format": "int32", + "default": 60 + } + } + }, + "v1ResourceCostSummarySpec": { + "description": "Resource cost summary spec", + "type": "object", + "properties": { + "filter": { + "$ref": "#/definitions/v1ResourceCostSummaryFilter" + }, + "options": { + "$ref": "#/definitions/v1ResourceCostSummaryOptions" + } + } + }, + "v1ResourceGroup": { + "description": "Azure resource Group is a container that holds related resources for an Azure solution", + "type": "object", + "properties": { + "id": { + "description": "The ID of the resource group", + "type": "string" + }, + "location": { + "description": "The location of the resource group. It cannot be changed after the resource group has been created", + "type": "string" + }, + "name": { + "description": "The type of the resource group", + "type": "string" + } + } + }, + "v1ResourceLimitType": { + "type": "string", + "enum": [ + "user", + "project", + "apiKey", + "team", + "role", + "cloudaccount", + "clusterprofile", + "workspace", + "registry", + "privategateway", + "location", + "certificate", + "macro", + "sshkey", + "alert", + "spectrocluster", + "edgehost", + "appprofile", + "appdeployment", + "edgetoken", + "clustergroup", + "filter", + "systemadmin" + ] + }, + "v1ResourceReference": { + "type": "object", + "required": [ + "uid" + ], + "properties": { + "kind": { + "type": "string" + }, + "name": { + "type": "string" + }, + "uid": { + "type": "string" + } + } + }, + "v1ResourceRoles": { + "type": "object", + "properties": { + "resourceRoles": { + "type": "array", + "items": { + "$ref": "#/definitions/v1ResourceRolesEntity" + } + } + } + }, + "v1ResourceRolesEntity": { + "type": "object", + "properties": { + "filterRefs": { + "type": "array", + "items": { + "$ref": "#/definitions/v1UidSummary" + } + }, + "projectUids": { + "type": "array", + "items": { + "$ref": "#/definitions/v1UidSummary" + } + }, + "roles": { + "type": "array", + "items": { + "$ref": "#/definitions/v1UidSummary" + } + }, + "uid": { + "type": "string" + } + } + }, + "v1ResourceRolesUpdateEntity": { + "type": "object", + "properties": { + "filterRefs": { + "type": "array", + "items": { + "type": "string" + } + }, + "projectUids": { + "type": "array", + "items": { + "type": "string" + } + }, + "roles": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "v1ResourceTotalCloudCost": { + "description": "Resource total cloud cost information", + "type": "object", + "properties": { + "compute": { + "type": "number", + "format": "float64", + "x-omitempty": false + }, + "storage": { + "type": "number", + "format": "float64", + "x-omitempty": false + }, + "total": { + "type": "number", + "format": "float64", + "x-omitempty": false + } + } + }, + "v1ResourceTotalConsumptionData": { + "description": "Resource total cosumption data", + "type": "object", + "properties": { + "allotted": { + "$ref": "#/definitions/v1ResourceConsumptionData" + }, + "usage": { + "$ref": "#/definitions/v1ResourceConsumptionData" + } + } + }, + "v1ResourceTotalCost": { + "description": "Resource total cost information", + "type": "object", + "properties": { + "cpu": { + "type": "number", + "format": "float64", + "x-omitempty": false + }, + "memory": { + "type": "number", + "format": "float64", + "x-omitempty": false + }, + "storage": { + "type": "number", + "format": "float64", + "x-omitempty": false + }, + "total": { + "type": "number", + "format": "float64", + "x-omitempty": false + } + } + }, + "v1ResourceUsageDataPoint": { + "description": "Resource usage data point", + "type": "object", + "properties": { + "baremetal": { + "$ref": "#/definitions/v1ResourceUsageMeteringDataPoint" + }, + "cpu": { + "type": "number", + "format": "float64", + "x-omitempty": false + }, + "edgehost": { + "$ref": "#/definitions/v1ResourceUsageMeteringDataPoint" + }, + "memory": { + "type": "number", + "format": "float64", + "x-omitempty": false + }, + "timestamp": { + "type": "number", + "format": "int64" + } + } + }, + "v1ResourceUsageMeteringDataPoint": { + "description": "min and max count for machines \u0026 edgehost for the given period", + "type": "object", + "properties": { + "activeEdgehosts": { + "type": "number", + "format": "int64" + }, + "activeMachines": { + "type": "number", + "format": "int64" + }, + "maxEdgehosts": { + "type": "number", + "format": "int64" + }, + "maxMachines": { + "type": "number", + "format": "int64" + } + } + }, + "v1ResourceUsageSummary": { + "description": "Resource usage summary information", + "type": "object", + "properties": { + "associatedResources": { + "type": "array", + "items": { + "$ref": "#/definitions/v1ResourceReference" + } + }, + "data": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1ResourceUsageDataPoint" + } + }, + "entity": { + "$ref": "#/definitions/v1ResourceReference" + } + } + }, + "v1ResourceUsageSummaryFilter": { + "description": "Resource usage summary filter", + "type": "object", + "properties": { + "clouds": { + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + } + }, + "clusters": { + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + } + }, + "endTime": { + "$ref": "#/definitions/v1Time" + }, + "includeControlPlaneMachines": { + "type": "boolean" + }, + "includeMasterMachines": { + "description": "Deprecated. Use includeControlPlaneMachines", + "type": "boolean" + }, + "namespaces": { + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + } + }, + "pods": { + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + } + }, + "projects": { + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + } + }, + "startTime": { + "$ref": "#/definitions/v1Time" + }, + "workload": { + "$ref": "#/definitions/v1ResourceWorkloadFilter" + }, + "workspaces": { + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + } + } + } + }, + "v1ResourceUsageSummaryOptions": { + "description": "Resource usage summary options", + "type": "object", + "properties": { + "enableSummaryView": { + "type": "boolean", + "default": true + }, + "groupBy": { + "type": "string", + "default": "cluster", + "enum": [ + "tenant", + "project", + "workspace", + "cluster", + "namespace", + "deployment", + "statefulset", + "daemonset", + "pod", + "cloud" + ] + }, + "includeMeteringInfo": { + "type": "boolean", + "default": false + }, + "period": { + "type": "integer", + "format": "int32", + "default": 60 + } + } + }, + "v1ResourceUsageSummarySpec": { + "description": "Resource usage summary spec", + "type": "object", + "properties": { + "filter": { + "$ref": "#/definitions/v1ResourceUsageSummaryFilter" + }, + "options": { + "$ref": "#/definitions/v1ResourceUsageSummaryOptions" + } + } + }, + "v1ResourceWorkloadFilter": { + "description": "Workload resource filter", + "type": "object", + "properties": { + "names": { + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + } + }, + "type": { + "type": "string", + "default": "all", + "enum": [ + "deployment", + "statefulset", + "daemonset", + "all" + ] + } + } + }, + "v1ResourcesCloudCostSummary": { + "description": "Resources cloud cost summary information", + "type": "object", + "properties": { + "resources": { + "type": "array", + "items": { + "$ref": "#/definitions/v1ResourceCloudCostSummary" + } + }, + "total": { + "$ref": "#/definitions/v1ResourceTotalCloudCost" + } + } + }, + "v1ResourcesConsumption": { + "description": "Resources consumption information", + "type": "object", + "properties": { + "cpuUnit": { + "type": "string" + }, + "memoryUnit": { + "type": "string" + }, + "resources": { + "type": "array", + "items": { + "$ref": "#/definitions/v1ResourceConsumption" + } + }, + "total": { + "$ref": "#/definitions/v1ResourceTotalConsumptionData" + } + } + }, + "v1ResourcesCostSummary": { + "description": "Resources cost summary information", + "type": "object", + "properties": { + "resources": { + "type": "array", + "items": { + "$ref": "#/definitions/v1ResourceCostSummary" + } + }, + "total": { + "$ref": "#/definitions/v1ResourceTotalCost" + } + } + }, + "v1ResourcesUsageSummary": { + "description": "Resources usage summary information", + "type": "object", + "properties": { + "cpuUnit": { + "type": "string" + }, + "memoryUnit": { + "type": "string" + }, + "resources": { + "type": "array", + "items": { + "$ref": "#/definitions/v1ResourceUsageSummary" + } + } + } + }, + "v1RestoreStatusMeta": { + "description": "Restore status meta", + "properties": { + "isSucceeded": { + "type": "boolean" + }, + "msg": { + "type": "string" + }, + "restoreTime": { + "$ref": "#/definitions/v1Time" + } + } + }, + "v1Role": { + "description": "Role", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/v1RoleSpec" + }, + "status": { + "$ref": "#/definitions/v1RoleStatus" + } + } + }, + "v1RoleClone": { + "description": "Role clone specifications", + "properties": { + "metadata": { + "$ref": "#/definitions/v1RoleCloneMetadata" + } + } + }, + "v1RoleCloneMetadata": { + "description": "Role clone metadata", + "properties": { + "name": { + "type": "string" + } + } + }, + "v1RoleSpec": { + "description": "Role specifications", + "properties": { + "permissions": { + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + } + }, + "scope": { + "$ref": "#/definitions/v1Scope" + }, + "type": { + "type": "string", + "enum": [ + "system", + "user" + ] + } + } + }, + "v1RoleStatus": { + "description": "Role status", + "properties": { + "isEnabled": { + "description": "Specifies if role account is enabled/disabled", + "type": "boolean", + "x-omitempty": false + } + } + }, + "v1Roles": { + "description": "Array of Roles", + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1Role" + } + }, + "listmeta": { + "$ref": "#/definitions/v1ListMetaData" + } + } + }, + "v1S3StorageConfig": { + "description": "S3 storage config object", + "type": "object", + "required": [ + "bucketName", + "region", + "credentials" + ], + "properties": { + "bucketName": { + "description": "S3 storage bucket name", + "type": "string" + }, + "caCert": { + "description": "CA Certificate", + "type": "string" + }, + "credentials": { + "description": "AWS cloud account credentials", + "$ref": "#/definitions/v1AwsCloudAccount" + }, + "region": { + "description": "AWS region name", + "type": "string" + }, + "s3ForcePathStyle": { + "type": "boolean", + "default": true + }, + "s3Url": { + "description": "Custom hosted S3 URL", + "type": "string" + }, + "useRestic": { + "description": "Set to 'true', to use Restic plugin for the backup", + "type": "boolean", + "default": true + } + } + }, + "v1Scope": { + "type": "string", + "enum": [ + "system", + "tenant", + "project", + "resource" + ] + }, + "v1SearchFilterBoolCondition": { + "properties": { + "value": { + "type": "boolean" + } + } + }, + "v1SearchFilterCondition": { + "properties": { + "bool": { + "$ref": "#/definitions/v1SearchFilterBoolCondition" + }, + "date": { + "$ref": "#/definitions/v1SearchFilterDateCondition" + }, + "float": { + "$ref": "#/definitions/v1SearchFilterFloatCondition" + }, + "int": { + "$ref": "#/definitions/v1SearchFilterIntegerCondition" + }, + "keyValue": { + "$ref": "#/definitions/v1SearchFilterKeyValueCondition" + }, + "string": { + "$ref": "#/definitions/v1SearchFilterStringCondition" + } + } + }, + "v1SearchFilterConjunctionOperator": { + "type": "string", + "enum": [ + "and", + "or" + ], + "x-nullable": true + }, + "v1SearchFilterDateCondition": { + "properties": { + "match": { + "$ref": "#/definitions/v1SearchFilterDateConditionMatch" + }, + "negation": { + "type": "boolean" + }, + "operator": { + "$ref": "#/definitions/v1SearchFilterDateOperator" + } + } + }, + "v1SearchFilterDateConditionMatch": { + "properties": { + "conjunction": { + "$ref": "#/definitions/v1SearchFilterConjunctionOperator" + }, + "values": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1Time" + } + } + } + }, + "v1SearchFilterDateOperator": { + "type": "string", + "enum": [ + "eq", + "gt", + "gte", + "lt", + "lte", + "range" + ] + }, + "v1SearchFilterFloatCondition": { + "properties": { + "match": { + "$ref": "#/definitions/v1SearchFilterFloatConditionMatch" + }, + "negation": { + "type": "boolean" + }, + "operator": { + "$ref": "#/definitions/v1SearchFilterIntegerOperator" + } + } + }, + "v1SearchFilterFloatConditionMatch": { + "properties": { + "conjunction": { + "$ref": "#/definitions/v1SearchFilterConjunctionOperator" + }, + "values": { + "type": "array", + "uniqueItems": true, + "items": { + "type": "number", + "format": "float64" + } + } + } + }, + "v1SearchFilterGroup": { + "properties": { + "conjunction": { + "$ref": "#/definitions/v1SearchFilterConjunctionOperator" + }, + "filters": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1SearchFilterItem" + } + } + } + }, + "v1SearchFilterIntegerCondition": { + "properties": { + "match": { + "$ref": "#/definitions/v1SearchFilterIntegerConditionMatch" + }, + "negation": { + "type": "boolean" + }, + "operator": { + "$ref": "#/definitions/v1SearchFilterIntegerOperator" + } + } + }, + "v1SearchFilterIntegerConditionMatch": { + "properties": { + "conjunction": { + "$ref": "#/definitions/v1SearchFilterConjunctionOperator" + }, + "values": { + "type": "array", + "uniqueItems": true, + "items": { + "type": "integer" + } + } + } + }, + "v1SearchFilterIntegerOperator": { + "type": "string", + "enum": [ + "eq", + "gt", + "gte", + "lt", + "lte" + ] + }, + "v1SearchFilterItem": { + "properties": { + "condition": { + "$ref": "#/definitions/v1SearchFilterCondition" + }, + "property": { + "type": "string" + }, + "type": { + "$ref": "#/definitions/v1SearchFilterPropertyType" + } + } + }, + "v1SearchFilterKeyValueCondition": { + "properties": { + "ignoreCase": { + "type": "boolean" + }, + "key": { + "type": "string" + }, + "match": { + "$ref": "#/definitions/v1SearchFilterKeyValueConditionMatch" + }, + "negation": { + "type": "boolean" + }, + "operator": { + "$ref": "#/definitions/v1SearchFilterStringOperator" + } + } + }, + "v1SearchFilterKeyValueConditionMatch": { + "properties": { + "conjunction": { + "$ref": "#/definitions/v1SearchFilterConjunctionOperator" + }, + "values": { + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + } + } + } + }, + "v1SearchFilterKeyValueOperator": { + "type": "string", + "enum": [ + "eq" + ] + }, + "v1SearchFilterPropertyType": { + "type": "string", + "enum": [ + "string", + "int", + "float", + "bool", + "date", + "keyValue" + ] + }, + "v1SearchFilterSchemaSpec": { + "properties": { + "schema": { + "$ref": "#/definitions/v1SearchFilterSchemaSpecProperties" + } + } + }, + "v1SearchFilterSchemaSpecEnumValue": { + "properties": { + "displayValue": { + "type": "string" + }, + "value": { + "type": "string" + } + } + }, + "v1SearchFilterSchemaSpecProperties": { + "properties": { + "properties": { + "type": "array", + "items": { + "$ref": "#/definitions/v1SearchFilterSchemaSpecProperty" + } + } + } + }, + "v1SearchFilterSchemaSpecProperty": { + "properties": { + "default": { + "type": "string", + "x-order": 6 + }, + "displayName": { + "type": "string", + "x-order": 2 + }, + "enum": { + "type": "array", + "items": { + "type": "string" + }, + "x-omitempty": true, + "x-order": 4 + }, + "enumValues": { + "type": "array", + "items": { + "$ref": "#/definitions/v1SearchFilterSchemaSpecEnumValue" + }, + "x-omitempty": true, + "x-order": 5 + }, + "hideDisplay": { + "type": "boolean", + "x-order": 1 + }, + "maxFloatVal": { + "type": "number", + "format": "float64", + "x-order": 10 + }, + "maxIntVal": { + "type": "integer", + "format": "int32", + "x-order": 8 + }, + "minFloatVal": { + "type": "number", + "format": "float64", + "x-order": 9 + }, + "minIntVal": { + "type": "integer", + "format": "int32", + "x-order": 7 + }, + "name": { + "type": "string", + "x-order": 0 + }, + "type": { + "type": "string", + "x-order": 3 + } + } + }, + "v1SearchFilterSortSpec": { + "properties": { + "field": { + "$ref": "#/definitions/v1SearchSortFields" + }, + "order": { + "$ref": "#/definitions/v1SortOrder" + } + } + }, + "v1SearchFilterSpec": { + "properties": { + "conjunction": { + "$ref": "#/definitions/v1SearchFilterConjunctionOperator" + }, + "filterGroups": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1SearchFilterGroup" + } + } + } + }, + "v1SearchFilterStringCondition": { + "properties": { + "ignoreCase": { + "type": "boolean" + }, + "match": { + "$ref": "#/definitions/v1SearchFilterStringConditionMatch" + }, + "negation": { + "type": "boolean" + }, + "operator": { + "$ref": "#/definitions/v1SearchFilterStringOperator" + } + } + }, + "v1SearchFilterStringConditionMatch": { + "properties": { + "conjunction": { + "$ref": "#/definitions/v1SearchFilterConjunctionOperator" + }, + "values": { + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + } + } + } + }, + "v1SearchFilterStringOperator": { + "type": "string", + "enum": [ + "eq", + "contains", + "beginsWith" + ] + }, + "v1SearchFilterSummarySpec": { + "description": "Spectro cluster search filter summary spec", + "properties": { + "filter": { + "$ref": "#/definitions/v1SearchFilterSpec" + }, + "sort": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1SearchFilterSortSpec" + } + } + } + }, + "v1SearchSortFields": { + "type": "string", + "enum": [ + "environment", + "clusterName", + "clusterState", + "healthState", + "creationTimestamp", + "lastModifiedTimestamp" + ], + "x-nullable": true + }, + "v1SectroClusterK8sDashboardUrl": { + "description": "Service version information", + "type": "object", + "properties": { + "url": { + "type": "string" + } + } + }, + "v1ServiceManifest": { + "description": "Service manifest information", + "type": "object", + "properties": { + "apiVersion": { + "type": "string" + }, + "kind": { + "type": "string" + }, + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/v1ServiceManifestSpec" + } + } + }, + "v1ServiceManifestSpec": { + "type": "object", + "properties": { + "manifests": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1GitRepoFileContent" + } + }, + "name": { + "type": "string" + }, + "version": { + "type": "string" + } + } + }, + "v1ServicePort": { + "type": "object", + "required": [ + "port" + ], + "properties": { + "port": { + "description": "The port that will be exposed by this service.", + "type": "integer", + "format": "int32" + }, + "protocol": { + "type": "string" + } + } + }, + "v1ServiceSpec": { + "description": "ServiceSpec defines the specification of service registering edge", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "version": { + "type": "string" + } + } + }, + "v1ServiceVersion": { + "description": "Service version information", + "type": "object", + "properties": { + "apiVersion": { + "type": "string" + }, + "kind": { + "type": "string" + }, + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/v1ServiceVersionSpec" + } + } + }, + "v1ServiceVersionSpec": { + "type": "object", + "properties": { + "latestVersion": { + "$ref": "#/definitions/v1GitRepoFileContent" + }, + "name": { + "type": "string" + } + } + }, + "v1SonobuoyEntity": { + "description": "Sonobuoy response", + "required": [ + "requestUid", + "status", + "reports" + ], + "properties": { + "reports": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/v1SonobuoyReportEntity" + } + }, + "requestUid": { + "type": "string" + }, + "status": { + "type": "string", + "enum": [ + "Completed", + "InProgress", + "Failed", + "Initiated" + ] + } + } + }, + "v1SonobuoyLog": { + "description": "Compliance Scan Sonobuoy Log", + "properties": { + "description": { + "type": "string" + }, + "msg": { + "type": "string" + }, + "output": { + "type": "string" + }, + "path": { + "type": "string" + }, + "state": { + "type": "string" + } + } + }, + "v1SonobuoyLogEntity": { + "description": "Sonobuoy log", + "properties": { + "description": { + "type": "string" + }, + "msg": { + "type": "string" + }, + "output": { + "type": "string" + }, + "path": { + "type": "string" + }, + "state": { + "type": "string" + } + } + }, + "v1SonobuoyReport": { + "description": "Compliance Scan Sonobuoy Report", + "properties": { + "fail": { + "type": "integer", + "format": "int32" + }, + "logs": { + "type": "array", + "items": { + "$ref": "#/definitions/v1SonobuoyLog" + } + }, + "node": { + "type": "string" + }, + "pass": { + "type": "integer", + "format": "int32" + }, + "plugin": { + "type": "string" + }, + "status": { + "type": "string" + }, + "total": { + "type": "integer", + "format": "int32" + } + } + }, + "v1SonobuoyReportEntity": { + "description": "Sonobuoy report", + "properties": { + "fail": { + "type": "integer", + "format": "int32" + }, + "logs": { + "type": "array", + "items": { + "$ref": "#/definitions/v1SonobuoyLogEntity" + } + }, + "node": { + "type": "string" + }, + "pass": { + "type": "integer", + "format": "int32" + }, + "plugin": { + "type": "string" + }, + "status": { + "type": "string" + }, + "total": { + "type": "integer", + "format": "int32" + } + } + }, + "v1SortOrder": { + "type": "string", + "default": "asc", + "enum": [ + "asc", + "desc" + ] + }, + "v1SpcApply": { + "type": "object", + "properties": { + "actionType": { + "type": "string", + "enum": [ + "DownloadAndInstall", + "DownloadAndInstallLater" + ] + }, + "canBeApplied": { + "description": "If it is true then Agent can apply the changes to the palette", + "type": "boolean", + "x-omitempty": false + }, + "crdDigest": { + "type": "string" + }, + "lastModifiedTime": { + "$ref": "#/definitions/v1Time" + }, + "patchAppliedTime": { + "$ref": "#/definitions/v1Time" + }, + "spcHash": { + "type": "string" + }, + "spcInfraHash": { + "type": "string" + } + } + }, + "v1SpcApplySettings": { + "type": "object", + "properties": { + "actionType": { + "type": "string", + "enum": [ + "DownloadAndInstall", + "DownloadAndInstallLater" + ] + } + } + }, + "v1SpcPatchTimeEntity": { + "type": "object", + "properties": { + "clusterHash": { + "type": "string" + }, + "patchTime": { + "$ref": "#/definitions/v1Time" + } + } + }, + "v1SpectroAwsClusterEntity": { + "description": "AWS cluster request payload for create and update", + "type": "object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "type": "object", + "required": [ + "cloudType", + "cloudAccountUid", + "cloudConfig" + ], + "properties": { + "cloudAccountUid": { + "description": "Cloud account uid to be used for cluster provisioning", + "type": "string" + }, + "cloudConfig": { + "$ref": "#/definitions/v1AwsClusterConfig" + }, + "clusterConfig": { + "description": "General cluster configuration like health, patching settings, namespace resource allocation, rbac", + "$ref": "#/definitions/v1ClusterConfigEntity" + }, + "clusterType": { + "$ref": "#/definitions/v1ClusterType" + }, + "machinepoolconfig": { + "type": "array", + "items": { + "$ref": "#/definitions/v1AwsMachinePoolConfigEntity" + } + }, + "policies": { + "$ref": "#/definitions/v1SpectroClusterPolicies" + }, + "profiles": { + "type": "array", + "items": { + "$ref": "#/definitions/v1SpectroClusterProfileEntity" + } + } + } + } + } + }, + "v1SpectroAwsClusterImportEntity": { + "description": "Spectro AWS cluster import request payload", + "type": "object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectMetaInputEntity" + }, + "spec": { + "type": "object", + "properties": { + "clusterConfig": { + "$ref": "#/definitions/v1ImportClusterConfig" + } + } + } + } + }, + "v1SpectroAwsClusterRateEntity": { + "description": "Spectro AWS cluster request payload for estimating rate", + "type": "object", + "properties": { + "cloudConfig": { + "$ref": "#/definitions/v1AwsClusterConfig" + }, + "machinepoolconfig": { + "type": "array", + "items": { + "$ref": "#/definitions/v1AwsMachinePoolConfigEntity" + } + } + } + }, + "v1SpectroAzureClusterEntity": { + "description": "Azure cluster request payload for create and update", + "type": "object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "type": "object", + "required": [ + "cloudType", + "cloudAccountUid", + "cloudConfig" + ], + "properties": { + "cloudAccountUid": { + "description": "Cloud account uid to be used for cluster provisioning", + "type": "string" + }, + "cloudConfig": { + "$ref": "#/definitions/v1AzureClusterConfig" + }, + "clusterConfig": { + "description": "General cluster configuration like health, patching settings, namespace resource allocation, rbac", + "$ref": "#/definitions/v1ClusterConfigEntity" + }, + "machinepoolconfig": { + "type": "array", + "items": { + "$ref": "#/definitions/v1AzureMachinePoolConfigEntity" + } + }, + "policies": { + "$ref": "#/definitions/v1SpectroClusterPolicies" + }, + "profiles": { + "type": "array", + "items": { + "$ref": "#/definitions/v1SpectroClusterProfileEntity" + } + } + } + } + } + }, + "v1SpectroAzureClusterImportEntity": { + "description": "Spectro Azure cluster import request payload", + "type": "object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectMetaInputEntity" + }, + "spec": { + "type": "object", + "properties": { + "clusterConfig": { + "$ref": "#/definitions/v1ImportClusterConfig" + } + } + } + } + }, + "v1SpectroAzureClusterRateEntity": { + "description": "Spectro Azure cluster request payload for estimating rate", + "type": "object", + "properties": { + "cloudConfig": { + "$ref": "#/definitions/v1AzureClusterConfig" + }, + "machinepoolconfig": { + "type": "array", + "items": { + "$ref": "#/definitions/v1AzureMachinePoolConfigEntity" + } + } + } + }, + "v1SpectroCluster": { + "description": "SpectroCluster is the Schema for the spectroclusters API", + "type": "object", + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + "type": "string" + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/v1SpectroClusterSpec" + }, + "status": { + "$ref": "#/definitions/v1SpectroClusterStatus" + } + } + }, + "v1SpectroClusterAddOnService": { + "description": "Spectro cluster addon service", + "properties": { + "endpoint": { + "type": "string" + }, + "name": { + "type": "string" + } + } + }, + "v1SpectroClusterAddOnServiceSummary": { + "description": "Spectro cluster status summary", + "properties": { + "endpoint": { + "type": "string" + }, + "name": { + "type": "string" + } + } + }, + "v1SpectroClusterAssetEntity": { + "description": "Cluster asset", + "type": "object", + "properties": { + "spec": { + "type": "object", + "properties": { + "frpKubeconfig": { + "type": "string" + }, + "kubeconfig": { + "type": "string" + }, + "kubeconfigclient": { + "type": "string" + }, + "manifest": { + "type": "string" + } + } + } + } + }, + "v1SpectroClusterAssetFrpKubeConfig": { + "description": "Cluster asset Frp Kube Config", + "type": "object", + "properties": { + "frpKubeconfig": { + "type": "string" + } + } + }, + "v1SpectroClusterAssetKubeConfig": { + "description": "Cluster asset Kube Config", + "type": "object", + "properties": { + "kubeconfig": { + "type": "string" + } + } + }, + "v1SpectroClusterAssetKubeConfigClient": { + "description": "Cluster asset Kube Config Client", + "type": "object", + "properties": { + "kubeconfigclient": { + "type": "string" + } + } + }, + "v1SpectroClusterAssetManifest": { + "description": "Cluster asset", + "type": "object", + "properties": { + "manifest": { + "type": "string" + } + } + }, + "v1SpectroClusterCloudCost": { + "description": "Spectro cluster cloud cost information", + "type": "object", + "properties": { + "cost": { + "$ref": "#/definitions/v1ResourceCost" + }, + "data": { + "type": "array", + "items": { + "$ref": "#/definitions/v1CloudCostDataPoint" + } + } + } + }, + "v1SpectroClusterCloudCostSummaryFilter": { + "description": "Spectro cluster cloud cost summary filter", + "type": "object", + "properties": { + "clouds": { + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + } + }, + "endTime": { + "$ref": "#/definitions/v1Time" + }, + "projects": { + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + } + }, + "startTime": { + "$ref": "#/definitions/v1Time" + }, + "workspaces": { + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + } + } + } + }, + "v1SpectroClusterCloudCostSummaryOptions": { + "description": "Spectro cluster cloud cost summary options", + "type": "object", + "properties": { + "groupBy": { + "type": "string", + "default": "project", + "enum": [ + "tenant", + "project", + "cloud", + "cluster" + ] + }, + "period": { + "type": "integer", + "format": "int32", + "default": 1440 + } + } + }, + "v1SpectroClusterCloudCostSummarySpec": { + "description": "Spectro cluster cloud cost summary spec", + "type": "object", + "properties": { + "filter": { + "$ref": "#/definitions/v1SpectroClusterCloudCostSummaryFilter" + }, + "options": { + "$ref": "#/definitions/v1SpectroClusterCloudCostSummaryOptions" + } + } + }, + "v1SpectroClusterCost": { + "description": "Spectro cluster cost information", + "type": "object", + "properties": { + "cloud": { + "$ref": "#/definitions/v1SpectroClusterCloudCost" + }, + "cost": { + "$ref": "#/definitions/v1ResourceCost" + }, + "name": { + "type": "string" + }, + "uid": { + "type": "string" + } + } + }, + "v1SpectroClusterCostSummary": { + "type": "object", + "properties": { + "cluster": { + "$ref": "#/definitions/v1SpectroClusterCost" + }, + "endTime": { + "$ref": "#/definitions/v1Time" + }, + "period": { + "type": "integer", + "format": "int32" + }, + "startTime": { + "$ref": "#/definitions/v1Time" + } + } + }, + "v1SpectroClusterHealthCondition": { + "description": "Spectro cluster health condition", + "properties": { + "message": { + "type": "string" + }, + "relatedObject": { + "type": "object", + "$ref": "#/definitions/v1RelatedObject" + }, + "type": { + "type": "string" + } + } + }, + "v1SpectroClusterHealthStatus": { + "description": "Spectro cluster health status", + "properties": { + "agentVersion": { + "type": "string" + }, + "conditions": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1SpectroClusterHealthCondition" + } + }, + "lastHeartBeatTimestamp": { + "$ref": "#/definitions/v1Time" + }, + "state": { + "type": "string" + } + } + }, + "v1SpectroClusterK8sCertificate": { + "description": "K8 Certificates for all the cluster's control plane nodes", + "type": "object", + "properties": { + "machineCertificates": { + "type": "array", + "items": { + "$ref": "#/definitions/v1K8MachineCertificate" + } + } + } + }, + "v1SpectroClusterKubeCtlRedirect": { + "description": "Active resources of tenant", + "type": "object", + "properties": { + "redirectUri": { + "type": "string" + } + } + }, + "v1SpectroClusterLocationInputEntity": { + "description": "Cluster location", + "type": "object", + "properties": { + "location": { + "$ref": "#/definitions/v1ClusterLocation" + } + } + }, + "v1SpectroClusterMetaSummary": { + "description": "Spectro cluster meta summary", + "type": "object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "specSummary": { + "description": "Spectro cluster meta summary", + "type": "object", + "properties": { + "archType": { + "description": "Architecture type of the cluster", + "type": "array", + "items": { + "type": "string", + "default": "amd64", + "enum": [ + "arm64", + "amd64" + ] + } + }, + "cloudAccountUid": { + "type": "string" + }, + "cloudRegion": { + "type": "string" + }, + "cloudType": { + "type": "string" + }, + "clusterType": { + "type": "string" + }, + "importMode": { + "type": "string" + }, + "location": { + "$ref": "#/definitions/v1ClusterMetaSpecLocation" + }, + "projectMeta": { + "$ref": "#/definitions/v1ProjectMeta" + }, + "tags": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "status": { + "description": "Spectro cluster meta status summary", + "properties": { + "cost": { + "$ref": "#/definitions/v1ClusterMetaStatusCost" + }, + "fips": { + "$ref": "#/definitions/v1ClusterFips" + }, + "health": { + "$ref": "#/definitions/v1ClusterMetaStatusHealth" + }, + "state": { + "type": "string" + }, + "updates": { + "$ref": "#/definitions/v1ClusterMetaStatusUpdates" + } + } + } + } + }, + "v1SpectroClusterMetadataFilterSpec": { + "description": "Spectro cluster filter spec", + "properties": { + "environment": { + "type": "string" + }, + "includeVirtual": { + "type": "boolean", + "default": false + }, + "isAlloy": { + "description": "isAlloy is renamed to isImported", + "type": "boolean", + "default": false + }, + "isImportReadOnly": { + "type": "boolean", + "default": true + }, + "isImported": { + "type": "boolean", + "default": false + }, + "name": { + "$ref": "#/definitions/v1FilterString" + }, + "state": { + "type": "string" + } + } + }, + "v1SpectroClusterMetadataSpec": { + "description": "Spectro cluster metadata spec", + "properties": { + "filter": { + "$ref": "#/definitions/v1SpectroClusterMetadataFilterSpec" + }, + "sort": { + "type": "string", + "enum": [ + "environment", + "state", + "name" + ], + "x-nullable": true + } + } + }, + "v1SpectroClusterMetrics": { + "description": "Spectro cluster metrics", + "properties": { + "cpu": { + "$ref": "#/definitions/v1ComputeMetrics" + }, + "memory": { + "$ref": "#/definitions/v1ComputeMetrics" + } + } + }, + "v1SpectroClusterOidcClaims": { + "type": "object", + "properties": { + "Email": { + "type": "string", + "x-omitempty": false + }, + "FirstName": { + "type": "string", + "x-omitempty": false + }, + "LastName": { + "type": "string", + "x-omitempty": false + }, + "SpectroTeam": { + "type": "string", + "x-omitempty": false + } + } + }, + "v1SpectroClusterOidcIssuerTlsSpec": { + "type": "object", + "properties": { + "caCertificateBase64": { + "type": "string", + "x-omitempty": false + }, + "insecureSkipVerify": { + "type": "boolean", + "default": false, + "x-omitempty": false + } + } + }, + "v1SpectroClusterOidcSpec": { + "type": "object", + "properties": { + "clientId": { + "type": "string", + "x-omitempty": false + }, + "clientSecret": { + "type": "string", + "x-omitempty": false + }, + "issuerTls": { + "$ref": "#/definitions/v1SpectroClusterOidcIssuerTlsSpec" + }, + "issuerUrl": { + "description": "the issuer is the URL identifier for the service", + "type": "string", + "x-omitempty": false + }, + "requiredClaims": { + "$ref": "#/definitions/v1SpectroClusterOidcClaims" + }, + "scopes": { + "type": "array", + "items": { + "type": "string" + }, + "x-omitempty": false + } + } + }, + "v1SpectroClusterPackCondition": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "reason": { + "type": "string" + }, + "status": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "ReadyForInstall", + "Installed", + "Ready", + "Error", + "UpgradeAvailable", + "WaitingForOtherLayers" + ] + } + } + }, + "v1SpectroClusterPackConfigList": { + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1PackConfig" + } + } + } + }, + "v1SpectroClusterPackDiff": { + "description": "Cluster pack difference", + "type": "object", + "properties": { + "current": { + "$ref": "#/definitions/v1PackRef" + }, + "diffConfigKeys": { + "type": "array", + "items": { + "type": "string" + } + }, + "target": { + "$ref": "#/definitions/v1PackRef" + } + } + }, + "v1SpectroClusterPackProperties": { + "description": "Cluster pack properties response", + "type": "object", + "properties": { + "yaml": { + "type": "string", + "x-omitempty": false + } + } + }, + "v1SpectroClusterPackStatusEntity": { + "type": "object", + "properties": { + "condition": { + "description": "Pack deployment status conditions", + "$ref": "#/definitions/v1SpectroClusterPackCondition" + }, + "endTime": { + "description": "Pack deployment end time", + "$ref": "#/definitions/v1Time" + }, + "name": { + "description": "Pack name", + "type": "string" + }, + "profileUid": { + "description": "Cluster profile uid", + "type": "string" + }, + "startTime": { + "description": "Pack deployment start time", + "$ref": "#/definitions/v1Time" + }, + "type": { + "$ref": "#/definitions/v1PackType" + }, + "version": { + "description": "pack version", + "type": "string" + } + } + }, + "v1SpectroClusterPacksEntity": { + "description": "Cluster entity for pack refs validate", + "type": "object", + "properties": { + "profiles": { + "type": "array", + "items": { + "$ref": "#/definitions/v1SpectroClusterProfileEntity" + } + } + } + }, + "v1SpectroClusterPacksStatusEntity": { + "type": "object", + "properties": { + "packs": { + "type": "array", + "items": { + "$ref": "#/definitions/v1SpectroClusterPackStatusEntity" + } + } + } + }, + "v1SpectroClusterPolicies": { + "description": "Cluster policies", + "type": "object", + "properties": { + "backupPolicy": { + "$ref": "#/definitions/v1ClusterBackupConfig" + }, + "scanPolicy": { + "$ref": "#/definitions/v1ClusterComplianceScheduleConfig" + } + } + }, + "v1SpectroClusterProfile": { + "description": "Cluster profile response", + "type": "object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/v1SpectroClusterProfileSpec" + } + } + }, + "v1SpectroClusterProfileEntity": { + "description": "Cluster profile request payload", + "type": "object", + "properties": { + "packValues": { + "description": "Cluster profile packs array", + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1PackValuesEntity" + } + }, + "replaceWithProfile": { + "description": "Cluster profile uid to be replaced with new profile", + "type": "string" + }, + "uid": { + "description": "Cluster profile uid", + "type": "string" + }, + "variables": { + "type": "array", + "items": { + "$ref": "#/definitions/v1SpectroClusterVariable" + } + } + } + }, + "v1SpectroClusterProfileList": { + "type": "object", + "required": [ + "profiles" + ], + "properties": { + "profiles": { + "type": "array", + "items": { + "$ref": "#/definitions/v1SpectroClusterProfile" + } + } + } + }, + "v1SpectroClusterProfileSpec": { + "description": "Cluster profile spec response", + "type": "object", + "properties": { + "cloudType": { + "description": "Cluster profile cloud type", + "type": "string" + }, + "packs": { + "description": "Cluster profile packs array", + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1ClusterProfilePacksEntity" + } + }, + "relatedObject": { + "description": "RelatedObject refers to the type of object(clustergroup, cluster or edgeHost) the cluster profile is associated with", + "$ref": "#/definitions/v1ObjectReference" + }, + "type": { + "description": "Cluster profile type [ \"cluster\", \"infra\", \"add-on\", \"system\" ]", + "type": "string" + }, + "version": { + "description": "Cluster profile version", + "type": "integer", + "format": "int32" + } + } + }, + "v1SpectroClusterProfileUpdates": { + "type": "object", + "properties": { + "profiles": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1ClusterProfileTemplate" + } + } + } + }, + "v1SpectroClusterProfileValidatorResponse": { + "description": "Cluster profile validator response", + "type": "object", + "properties": { + "packs": { + "$ref": "#/definitions/v1ConstraintValidatorResponse" + }, + "uid": { + "description": "Cluster profile uid", + "type": "string" + } + } + }, + "v1SpectroClusterProfiles": { + "type": "object", + "required": [ + "profiles" + ], + "properties": { + "profiles": { + "type": "array", + "items": { + "$ref": "#/definitions/v1SpectroClusterProfileEntity" + } + }, + "spcApplySettings": { + "$ref": "#/definitions/v1SpcApplySettings" + } + } + }, + "v1SpectroClusterProfilesDeleteEntity": { + "type": "object", + "properties": { + "profileUids": { + "description": "Cluster's profile uid list", + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + } + } + } + }, + "v1SpectroClusterProfilesPacksManifests": { + "type": "object", + "required": [ + "profiles" + ], + "properties": { + "profiles": { + "type": "array", + "items": { + "$ref": "#/definitions/v1ClusterProfilePacksManifests" + } + } + } + }, + "v1SpectroClusterProfilesParamReferenceEntity": { + "description": "Cluster profiles param reference entity", + "type": "object", + "properties": { + "references": { + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + } + } + } + }, + "v1SpectroClusterProfilesResolvedValues": { + "description": "Cluster profiles resolved values response", + "type": "object", + "properties": { + "profiles": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1ProfileResolvedValues" + } + } + } + }, + "v1SpectroClusterRate": { + "description": "Cluster estimated rate information", + "type": "object", + "properties": { + "machinePools": { + "type": "array", + "items": { + "$ref": "#/definitions/v1MachinePoolRate" + } + }, + "name": { + "type": "string" + }, + "rate": { + "$ref": "#/definitions/v1TotalClusterRate" + }, + "resourceMetadata": { + "$ref": "#/definitions/v1CloudResourceMetadata" + } + } + }, + "v1SpectroClusterRepave": { + "description": "Spectro cluster repave status information", + "type": "object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/v1SpectroClusterRepaveSpec" + }, + "status": { + "$ref": "#/definitions/v1SpectroClusterRepaveStatus" + } + } + }, + "v1SpectroClusterRepaveReason": { + "description": "Cluster repave reason description", + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "pack": { + "$ref": "#/definitions/v1SpectroClusterPackDiff" + } + } + }, + "v1SpectroClusterRepaveSpec": { + "type": "object", + "properties": { + "reasons": { + "description": "Spectro cluster repave reasons", + "type": "array", + "items": { + "$ref": "#/definitions/v1SpectroClusterRepaveReason" + } + }, + "source": { + "$ref": "#/definitions/v1ClusterRepaveSource" + }, + "spectroClusterUid": { + "type": "string" + } + } + }, + "v1SpectroClusterRepaveStatus": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "repaveTransitionTime": { + "$ref": "#/definitions/v1Time" + }, + "state": { + "$ref": "#/definitions/v1ClusterRepaveState" + } + } + }, + "v1SpectroClusterRepaveValidationResponse": { + "description": "Cluster repave validation response", + "type": "object", + "properties": { + "isRepaveRequired": { + "description": "If true then the pack changes can cause cluster repave", + "type": "boolean", + "x-omitempty": false + }, + "reasons": { + "type": "array", + "items": { + "$ref": "#/definitions/v1SpectroClusterRepaveReason" + } + } + } + }, + "v1SpectroClusterSpec": { + "description": "SpectroClusterSpec defines the desired state of SpectroCluster", + "type": "object", + "properties": { + "cloudConfigRef": { + "description": "CloudConfigRef point to the cloud configuration for the cluster, input by user Ref types are: AwsCloudConfig/VsphereCloudConfig/BaremetalConfig/ etc this user config will be used to generate cloud specific cluster/machine spec for cluster-api For VM, it will contain information needed to launch VMs, like cloud account, instance type For BM, it will contain actual baremetal machines", + "$ref": "#/definitions/v1ObjectReference" + }, + "cloudType": { + "type": "string" + }, + "clusterConfig": { + "description": "ClusterConfig is the configuration related to a general cluster. Configuration related to the health of the cluster.", + "$ref": "#/definitions/v1ClusterConfig" + }, + "clusterProfileTemplates": { + "description": "When a cluster created from a clusterprofile at t1, ClusterProfileTemplate is a copy of the draft version or latest published version of the clusterprofileSpec.clusterprofileTemplate then clusterprofile may evolve to v2 at t2, but before user decide to upgrade the cluster, it will stay as it is when user decide to upgrade, clusterProfileTemplate will be updated from the clusterprofile pointed by ClusterProfileRef", + "type": "array", + "items": { + "$ref": "#/definitions/v1ClusterProfileTemplate" + } + }, + "clusterType": { + "type": "string", + "enum": [ + "PureManage", + "AlloyMonitor", + "AlloyAssist", + "AlloyExtend" + ] + } + } + }, + "v1SpectroClusterState": { + "description": "Spectrocluster state entity", + "type": "object", + "properties": { + "state": { + "description": "Spectrocluster state", + "type": "string" + } + } + }, + "v1SpectroClusterStatus": { + "description": "SpectroClusterStatus", + "type": "object", + "properties": { + "abortTimestamp": { + "$ref": "#/definitions/v1Time" + }, + "addOnServices": { + "type": "array", + "items": { + "$ref": "#/definitions/v1SpectroClusterAddOnService" + } + }, + "apiEndpoints": { + "type": "array", + "items": { + "$ref": "#/definitions/v1APIEndpoint" + } + }, + "clusterImport": { + "$ref": "#/definitions/v1ClusterImport" + }, + "conditions": { + "type": "array", + "items": { + "$ref": "#/definitions/v1ClusterCondition" + } + }, + "fips": { + "$ref": "#/definitions/v1ClusterFips" + }, + "location": { + "$ref": "#/definitions/v1ClusterLocation" + }, + "packs": { + "type": "array", + "items": { + "$ref": "#/definitions/v1ClusterPackStatus" + } + }, + "profileStatus": { + "$ref": "#/definitions/v1ProfileStatus" + }, + "repave": { + "$ref": "#/definitions/v1ClusterRepaveStatus" + }, + "services": { + "type": "array", + "items": { + "$ref": "#/definitions/v1LoadBalancerService" + } + }, + "spcApply": { + "$ref": "#/definitions/v1SpcApply" + }, + "state": { + "description": "current operational state", + "type": "string" + }, + "upgrades": { + "type": "array", + "items": { + "$ref": "#/definitions/v1Upgrades" + } + }, + "virtual": { + "$ref": "#/definitions/v1Virtual" + } + } + }, + "v1SpectroClusterStatusEntity": { + "description": "Spectrocluster status entity", + "type": "object", + "properties": { + "status": { + "$ref": "#/definitions/v1SpectroClusterState" + } + } + }, + "v1SpectroClusterSummary": { + "description": "Spectro cluster summary", + "type": "object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "specSummary": { + "description": "Spectro cluster spec summary", + "type": "object", + "properties": { + "archTypes": { + "description": "Architecture type of the cluster", + "type": "array", + "items": { + "$ref": "#/definitions/v1ArchType" + } + }, + "cloudAccountMeta": { + "$ref": "#/definitions/v1CloudAccountMeta" + }, + "cloudConfig": { + "$ref": "#/definitions/v1CloudConfigMeta" + }, + "clusterConfig": { + "$ref": "#/definitions/v1ClusterConfigResponse" + }, + "clusterProfileTemplate": { + "$ref": "#/definitions/v1ClusterProfileTemplateMeta" + }, + "clusterProfileTemplates": { + "type": "array", + "items": { + "$ref": "#/definitions/v1ClusterProfileTemplateMeta" + } + }, + "projectMeta": { + "$ref": "#/definitions/v1ProjectMeta" + } + } + }, + "status": { + "description": "Spectro cluster status summary", + "properties": { + "clusterImport": { + "$ref": "#/definitions/v1ClusterImport" + }, + "cost": { + "$ref": "#/definitions/v1ResourceCost" + }, + "fips": { + "$ref": "#/definitions/v1ClusterFips" + }, + "health": { + "$ref": "#/definitions/v1SpectroClusterHealthStatus" + }, + "hourlyRate": { + "$ref": "#/definitions/v1ResourceCost" + }, + "location": { + "$ref": "#/definitions/v1ClusterMetaSpecLocation" + }, + "metrics": { + "$ref": "#/definitions/v1SpectroClusterMetrics" + }, + "notifications": { + "$ref": "#/definitions/v1ClusterNotificationStatus" + }, + "repave": { + "$ref": "#/definitions/v1ClusterRepaveStatus" + }, + "state": { + "type": "string" + }, + "virtual": { + "$ref": "#/definitions/v1Virtual" + } + } + } + } + }, + "v1SpectroClusterUidStatusSummary": { + "description": "Spectro cluster status summary", + "properties": { + "abortTimestamp": { + "$ref": "#/definitions/v1Time" + }, + "addOnServices": { + "type": "array", + "items": { + "$ref": "#/definitions/v1SpectroClusterAddOnServiceSummary" + } + }, + "apiEndpoints": { + "type": "array", + "items": { + "$ref": "#/definitions/v1APIEndpoint" + } + }, + "clusterImport": { + "$ref": "#/definitions/v1ClusterImport" + }, + "conditions": { + "type": "array", + "items": { + "$ref": "#/definitions/v1ClusterCondition" + } + }, + "cost": { + "$ref": "#/definitions/v1ResourceCost" + }, + "fips": { + "$ref": "#/definitions/v1ClusterFips" + }, + "health": { + "$ref": "#/definitions/v1SpectroClusterHealthStatus" + }, + "hourlyRate": { + "$ref": "#/definitions/v1ResourceCost" + }, + "kubeMeta": { + "$ref": "#/definitions/v1KubeMeta" + }, + "location": { + "$ref": "#/definitions/v1ClusterMetaSpecLocation" + }, + "metrics": { + "$ref": "#/definitions/v1SpectroClusterMetrics" + }, + "notifications": { + "$ref": "#/definitions/v1ClusterNotificationStatus" + }, + "packs": { + "type": "array", + "items": { + "$ref": "#/definitions/v1ClusterPackStatus" + } + }, + "services": { + "type": "array", + "items": { + "$ref": "#/definitions/v1LoadBalancerService" + } + }, + "spcApply": { + "$ref": "#/definitions/v1SpcApply" + }, + "state": { + "description": "current operational state", + "type": "string" + }, + "upgrades": { + "type": "array", + "items": { + "$ref": "#/definitions/v1Upgrades" + } + }, + "virtual": { + "$ref": "#/definitions/v1Virtual" + }, + "workspaces": { + "type": "array", + "items": { + "$ref": "#/definitions/v1ResourceReference" + } + } + } + }, + "v1SpectroClusterUidSummary": { + "description": "Spectro cluster summary", + "type": "object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "description": "Spectro cluster spec summary", + "type": "object", + "properties": { + "archTypes": { + "description": "Architecture types of the cluster", + "type": "array", + "items": { + "$ref": "#/definitions/v1ArchType" + } + }, + "cloudConfig": { + "$ref": "#/definitions/v1CloudConfigMeta" + }, + "cloudaccount": { + "$ref": "#/definitions/v1CloudAccountMeta" + }, + "clusterProfileTemplate": { + "$ref": "#/definitions/v1ClusterProfileTemplateMeta" + }, + "clusterProfileTemplates": { + "type": "array", + "items": { + "$ref": "#/definitions/v1ClusterProfileTemplateMeta" + } + } + } + }, + "status": { + "$ref": "#/definitions/v1SpectroClusterUidStatusSummary" + } + } + }, + "v1SpectroClusterUidUpgrades": { + "description": "Cluster status upgrades", + "type": "object", + "properties": { + "upgrades": { + "type": "array", + "items": { + "$ref": "#/definitions/v1Upgrades" + } + } + } + }, + "v1SpectroClusterVMCloneEntity": { + "type": "object", + "required": [ + "cloneName" + ], + "properties": { + "annotationFilters": { + "description": "Annotation filters", + "type": "array", + "items": { + "type": "string" + } + }, + "cloneName": { + "description": "Cloning Virtual machine's name", + "type": "string" + }, + "labelFilters": { + "description": "Label filters", + "type": "array", + "items": { + "type": "string" + } + }, + "newMacAddresses": { + "description": "NewMacAddresses manually sets that target interfaces' mac addresses. The key is the interface name and the value is the new mac address. If this field is not specified, a new MAC address will be generated automatically, as for any interface that is not included in this map", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "newSMBiosSerial": { + "description": "NewSMBiosSerial manually sets that target's SMbios serial. If this field is not specified, a new serial will be generated automatically.", + "type": "string" + } + } + }, + "v1SpectroClusterValidatorResponse": { + "description": "Cluster validator response", + "type": "object", + "properties": { + "machinePools": { + "$ref": "#/definitions/v1ConstraintValidatorResponse" + }, + "profiles": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1SpectroClusterProfileValidatorResponse" + } + } + } + }, + "v1SpectroClusterVariable": { + "description": "Variable with value which will be used within the packs of cluster profile", + "type": "object", + "required": [ + "name" + ], + "properties": { + "name": { + "description": "Variable name", + "type": "string" + }, + "value": { + "description": "Actual value of the variable to be used within the cluster", + "type": "string" + } + } + }, + "v1SpectroClustersHealth": { + "description": "Spectro Clusters health data", + "type": "object", + "properties": { + "errored": { + "type": "integer", + "format": "int32", + "x-omitempty": false + }, + "healthy": { + "type": "integer", + "format": "int32", + "x-omitempty": false + }, + "running": { + "type": "integer", + "format": "int32", + "x-omitempty": false + }, + "unhealthy": { + "type": "integer", + "format": "int32", + "x-omitempty": false + } + } + }, + "v1SpectroClustersMetadata": { + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1ObjectMeta" + } + } + } + }, + "v1SpectroClustersMetadataSearch": { + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1SpectroClusterMetaSummary" + } + }, + "listmeta": { + "$ref": "#/definitions/v1ListMetaData" + } + } + }, + "v1SpectroClustersSummary": { + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1SpectroClusterSummary" + } + }, + "listmeta": { + "$ref": "#/definitions/v1ListMetaData" + } + } + }, + "v1SpectroCustomClusterEntity": { + "description": "Custom cluster request payload for create and update", + "type": "object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectMetaInputEntity" + }, + "spec": { + "type": "object", + "required": [ + "cloudType", + "cloudAccountUid", + "cloudConfig" + ], + "properties": { + "cloudAccountUid": { + "description": "Cloud account uid to be used for cluster provisioning", + "type": "string" + }, + "cloudConfig": { + "$ref": "#/definitions/v1CustomClusterConfig" + }, + "clusterConfig": { + "description": "General cluster configuration like patching settings, namespace resource allocation, rbac", + "$ref": "#/definitions/v1CustomClusterConfigEntity" + }, + "clusterType": { + "$ref": "#/definitions/v1ClusterType" + }, + "machinepoolconfig": { + "type": "array", + "items": { + "$ref": "#/definitions/v1CustomMachinePoolConfigEntity" + } + }, + "profiles": { + "type": "array", + "items": { + "$ref": "#/definitions/v1SpectroClusterProfileEntity" + } + } + } + } + } + }, + "v1SpectroEdgeNativeClusterEntity": { + "description": "EdgeNative cluster create or update request payload", + "type": "object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "type": "object", + "properties": { + "cloudConfig": { + "$ref": "#/definitions/v1EdgeNativeClusterConfig" + }, + "clusterConfig": { + "description": "General cluster configuration like health, patching settings, namespace resource allocation, rbac", + "$ref": "#/definitions/v1ClusterConfigEntity" + }, + "machinepoolconfig": { + "type": "array", + "items": { + "$ref": "#/definitions/v1EdgeNativeMachinePoolConfigEntity" + } + }, + "policies": { + "$ref": "#/definitions/v1SpectroClusterPolicies" + }, + "profiles": { + "type": "array", + "items": { + "$ref": "#/definitions/v1SpectroClusterProfileEntity" + } + } + } + } + } + }, + "v1SpectroEdgeNativeClusterImportEntity": { + "description": "Spectro EdgeNative cluster import request payload", + "type": "object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectMetaInputEntity" + }, + "spec": { + "type": "object", + "properties": { + "clusterConfig": { + "$ref": "#/definitions/v1ImportClusterConfig" + } + } + } + } + }, + "v1SpectroEdgeNativeClusterRateEntity": { + "description": "Edge-native cluster request payload for estimating rate", + "type": "object", + "properties": { + "cloudConfig": { + "$ref": "#/definitions/v1EdgeNativeClusterConfig" + }, + "machinepoolconfig": { + "type": "array", + "items": { + "$ref": "#/definitions/v1EdgeNativeMachinePoolConfigEntity" + } + } + } + }, + "v1SpectroEksClusterEntity": { + "description": "Spectro EKS cluster request payload for create and update", + "type": "object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "type": "object", + "required": [ + "cloudAccountUid", + "cloudConfig" + ], + "properties": { + "cloudAccountUid": { + "description": "Cloud account uid to be used for cluster provisioning", + "type": "string" + }, + "cloudConfig": { + "$ref": "#/definitions/v1EksClusterConfig" + }, + "clusterConfig": { + "description": "General cluster configuration like health, patching settings, namespace resource allocation, rbac", + "$ref": "#/definitions/v1ClusterConfigEntity" + }, + "fargateProfiles": { + "type": "array", + "items": { + "$ref": "#/definitions/v1FargateProfile" + } + }, + "machinepoolconfig": { + "type": "array", + "items": { + "$ref": "#/definitions/v1EksMachinePoolConfigEntity" + } + }, + "policies": { + "$ref": "#/definitions/v1SpectroClusterPolicies" + }, + "profiles": { + "type": "array", + "items": { + "$ref": "#/definitions/v1SpectroClusterProfileEntity" + } + } + } + } + } + }, + "v1SpectroEksClusterRateEntity": { + "description": "Spectro EKS cluster request payload for estimating rate", + "type": "object", + "properties": { + "cloudConfig": { + "$ref": "#/definitions/v1EksClusterConfig" + }, + "machinepoolconfig": { + "type": "array", + "items": { + "$ref": "#/definitions/v1EksMachinePoolConfigEntity" + } + } + } + }, + "v1SpectroGcpClusterEntity": { + "description": "GCP cluster request payload for create and update", + "type": "object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "type": "object", + "required": [ + "cloudType", + "cloudAccountUid", + "cloudConfig" + ], + "properties": { + "cloudAccountUid": { + "description": "Cloud account uid to be used for cluster provisioning", + "type": "string" + }, + "cloudConfig": { + "$ref": "#/definitions/v1GcpClusterConfig" + }, + "clusterConfig": { + "description": "General cluster configuration like health, patching settings, namespace resource allocation, rbac", + "$ref": "#/definitions/v1ClusterConfigEntity" + }, + "machinepoolconfig": { + "type": "array", + "items": { + "$ref": "#/definitions/v1GcpMachinePoolConfigEntity" + } + }, + "policies": { + "$ref": "#/definitions/v1SpectroClusterPolicies" + }, + "profiles": { + "type": "array", + "items": { + "$ref": "#/definitions/v1SpectroClusterProfileEntity" + } + } + } + } + } + }, + "v1SpectroGcpClusterImportEntity": { + "description": "Spectro GCP cluster import request payload", + "type": "object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectMetaInputEntity" + }, + "spec": { + "type": "object", + "properties": { + "clusterConfig": { + "$ref": "#/definitions/v1ImportClusterConfig" + } + } + } + } + }, + "v1SpectroGcpClusterRateEntity": { + "description": "Gcp cluster request payload for estimating rate", + "type": "object", + "properties": { + "cloudConfig": { + "$ref": "#/definitions/v1GcpClusterConfig" + }, + "machinepoolconfig": { + "type": "array", + "items": { + "$ref": "#/definitions/v1GcpMachinePoolConfigEntity" + } + } + } + }, + "v1SpectroGenericClusterImportEntity": { + "description": "Spectro generic cluster import request payload", + "type": "object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectMetaInputEntity" + }, + "spec": { + "type": "object", + "properties": { + "clusterConfig": { + "$ref": "#/definitions/v1ImportClusterConfig" + }, + "edgeConfig": { + "$ref": "#/definitions/v1ImportEdgeHostConfig" + } + } + } + } + }, + "v1SpectroGenericClusterRateEntity": { + "description": "Generic cluster request payload for estimating rate", + "type": "object", + "properties": { + "cloudConfig": { + "$ref": "#/definitions/v1GenericClusterConfig" + }, + "machinepoolconfig": { + "type": "array", + "items": { + "$ref": "#/definitions/v1GenericMachinePoolConfigEntity" + } + } + } + }, + "v1SpectroMaasClusterEntity": { + "description": "Spectro Maas cluster request payload for create and update", + "type": "object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "type": "object", + "required": [ + "cloudType", + "cloudAccountUid", + "cloudConfig" + ], + "properties": { + "cloudAccountUid": { + "description": "Cloud account uid to be used for cluster provisioning", + "type": "string" + }, + "cloudConfig": { + "$ref": "#/definitions/v1MaasClusterConfig" + }, + "clusterConfig": { + "description": "General cluster configuration like health, patching settings, namespace resource allocation, rbac", + "$ref": "#/definitions/v1ClusterConfigEntity" + }, + "machinepoolconfig": { + "type": "array", + "items": { + "$ref": "#/definitions/v1MaasMachinePoolConfigEntity" + } + }, + "policies": { + "$ref": "#/definitions/v1SpectroClusterPolicies" + }, + "profiles": { + "type": "array", + "items": { + "$ref": "#/definitions/v1SpectroClusterProfileEntity" + } + } + } + } + } + }, + "v1SpectroMaasClusterImportEntity": { + "description": "Spectro maas cluster import request payload", + "type": "object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectMetaInputEntity" + }, + "spec": { + "type": "object", + "properties": { + "clusterConfig": { + "$ref": "#/definitions/v1ImportClusterConfig" + } + } + } + } + }, + "v1SpectroMaasClusterRateEntity": { + "description": "Maas cluster request payload for estimating rate", + "type": "object", + "properties": { + "cloudConfig": { + "$ref": "#/definitions/v1MaasClusterConfig" + }, + "machinepoolconfig": { + "type": "array", + "items": { + "$ref": "#/definitions/v1MaasMachinePoolConfigEntity" + } + } + } + }, + "v1SpectroOpenStackClusterEntity": { + "description": "OpenStack cluster request payload for create and update", + "type": "object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "type": "object", + "required": [ + "cloudAccountUid", + "cloudConfig" + ], + "properties": { + "cloudAccountUid": { + "description": "Cloud account uid to be used for cluster provisioning", + "type": "string" + }, + "cloudConfig": { + "$ref": "#/definitions/v1OpenStackClusterConfig" + }, + "clusterConfig": { + "description": "General cluster configuration like health, patching settings, namespace resource allocation, rbac", + "$ref": "#/definitions/v1ClusterConfigEntity" + }, + "machinepoolconfig": { + "type": "array", + "items": { + "$ref": "#/definitions/v1OpenStackMachinePoolConfigEntity" + } + }, + "policies": { + "$ref": "#/definitions/v1SpectroClusterPolicies" + }, + "profiles": { + "type": "array", + "items": { + "$ref": "#/definitions/v1SpectroClusterProfileEntity" + } + } + } + } + } + }, + "v1SpectroOpenStackClusterImportEntity": { + "description": "Spectro OpenStack cluster import request payload", + "type": "object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectMetaInputEntity" + }, + "spec": { + "type": "object", + "properties": { + "clusterConfig": { + "$ref": "#/definitions/v1ImportClusterConfig" + } + } + } + } + }, + "v1SpectroOpenStackClusterRateEntity": { + "description": "Openstack cluster request payload for estimating rate", + "type": "object", + "properties": { + "cloudConfig": { + "$ref": "#/definitions/v1OpenStackClusterConfig" + }, + "machinepoolconfig": { + "type": "array", + "items": { + "$ref": "#/definitions/v1OpenStackMachinePoolConfigEntity" + } + } + } + }, + "v1SpectroTencentClusterEntity": { + "description": "Tencent cluster request payload for create and update", + "type": "object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "type": "object", + "required": [ + "cloudType", + "cloudAccountUid", + "cloudConfig" + ], + "properties": { + "cloudAccountUid": { + "description": "Cloud account uid to be used for cluster provisioning", + "type": "string" + }, + "cloudConfig": { + "$ref": "#/definitions/v1TencentClusterConfig" + }, + "clusterConfig": { + "description": "General cluster configuration like health, patching settings, namespace resource allocation, rbac", + "$ref": "#/definitions/v1ClusterConfigEntity" + }, + "machinepoolconfig": { + "type": "array", + "items": { + "$ref": "#/definitions/v1TencentMachinePoolConfigEntity" + } + }, + "policies": { + "$ref": "#/definitions/v1SpectroClusterPolicies" + }, + "profiles": { + "type": "array", + "items": { + "$ref": "#/definitions/v1SpectroClusterProfileEntity" + } + } + } + } + } + }, + "v1SpectroTencentClusterRateEntity": { + "description": "Spectro Tencent cluster request payload for estimating rate", + "type": "object", + "properties": { + "cloudConfig": { + "$ref": "#/definitions/v1TencentClusterConfig" + }, + "machinepoolconfig": { + "type": "array", + "items": { + "$ref": "#/definitions/v1TencentMachinePoolConfigEntity" + } + } + } + }, + "v1SpectroVirtualClusterEntity": { + "description": "Spectro virtual cluster request payload for create and update", + "type": "object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "type": "object", + "required": [ + "cloudType", + "clusterConfig" + ], + "properties": { + "cloudConfig": { + "$ref": "#/definitions/v1VirtualClusterConfig" + }, + "clusterConfig": { + "description": "General cluster configuration like health, patching settings, namespace resource allocation, rbac", + "$ref": "#/definitions/v1ClusterConfigEntity" + }, + "machinepoolconfig": { + "type": "array", + "items": { + "$ref": "#/definitions/v1VirtualMachinePoolConfigEntity" + } + }, + "policies": { + "$ref": "#/definitions/v1SpectroClusterPolicies" + }, + "profiles": { + "type": "array", + "items": { + "$ref": "#/definitions/v1SpectroClusterProfileEntity" + } + } + } + } + } + }, + "v1SpectroVsphereClusterEntity": { + "description": "vSphere cluster request payload for create and update", + "type": "object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "type": "object", + "required": [ + "cloudConfig" + ], + "properties": { + "cloudAccountUid": { + "description": "Cloud account uid to be used for cluster provisioning", + "type": "string" + }, + "cloudConfig": { + "$ref": "#/definitions/v1VsphereClusterConfigEntity" + }, + "clusterConfig": { + "description": "General cluster configuration like health, patching settings, namespace resource allocation, rbac", + "$ref": "#/definitions/v1ClusterConfigEntity" + }, + "edgeHostUid": { + "description": "Appliance (Edge Host) uid for Edge env", + "type": "string" + }, + "machinepoolconfig": { + "type": "array", + "items": { + "$ref": "#/definitions/v1VsphereMachinePoolConfigEntity" + } + }, + "policies": { + "$ref": "#/definitions/v1SpectroClusterPolicies" + }, + "profiles": { + "type": "array", + "items": { + "$ref": "#/definitions/v1SpectroClusterProfileEntity" + } + } + } + } + } + }, + "v1SpectroVsphereClusterImportEntity": { + "description": "Spectro Vsphere cluster import request payload", + "type": "object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectMetaInputEntity" + }, + "spec": { + "type": "object", + "properties": { + "clusterConfig": { + "$ref": "#/definitions/v1ImportClusterConfig" + } + } + } + } + }, + "v1SpectroVsphereClusterRateEntity": { + "description": "Vsphere cluster request payload for estimating rate", + "type": "object", + "properties": { + "cloudConfig": { + "$ref": "#/definitions/v1VsphereClusterConfigEntity" + }, + "machinepoolconfig": { + "type": "array", + "items": { + "$ref": "#/definitions/v1VsphereMachinePoolConfigEntity" + } + } + } + }, + "v1SpotMarketOptions": { + "description": "SpotMarketOptions defines the options available to a user when configuring Machines to run on Spot instances. Most users should provide an empty struct.", + "type": "object", + "properties": { + "maxPrice": { + "description": "MaxPrice defines the maximum price the user is willing to pay for Spot VM instances", + "type": "string" + } + } + }, + "v1SpotVMOptions": { + "description": "SpotVMOptions defines the options relevant to running the Machine on Spot VMs", + "type": "object", + "properties": { + "maxPrice": { + "description": "MaxPrice defines the maximum price the user is willing to pay for Spot VM instances", + "type": "string" + } + } + }, + "v1SsoLogin": { + "description": "Describes the allowed sso login details", + "type": "object", + "properties": { + "displayName": { + "description": "Describes the display name for the sso login", + "type": "string" + }, + "logo": { + "description": "Describes the url path for the sso login", + "type": "string" + }, + "name": { + "description": "Describes the processed name for the sso login", + "type": "string" + }, + "redirectUri": { + "description": "Describes the sso login url for the authentication", + "type": "string" + } + } + }, + "v1SsoLogins": { + "description": "Describes the allowed sso logins", + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1SsoLogin" + } + }, + "v1StorageAccount": { + "description": "Azure storage account provides a unique namespace for your Azure resources", + "type": "object", + "properties": { + "id": { + "description": "Fully qualified resource ID for the resource", + "type": "string" + }, + "kind": { + "description": "The kind of the resource", + "type": "string" + }, + "location": { + "description": "The geo-location where the resource lives", + "type": "string" + }, + "name": { + "description": "The name of the resource", + "type": "string" + } + } + }, + "v1StorageAccountEntity": { + "description": "Azure storage account entity", + "type": "object", + "properties": { + "id": { + "description": "Azure storage account id", + "type": "string" + }, + "name": { + "description": "Azure storage account name", + "type": "string" + } + } + }, + "v1StorageContainer": { + "description": "Azure storage container organizes a set of blobs, similar to a directory in a file system", + "type": "object", + "properties": { + "id": { + "description": "Fully qualified resource ID for the resource.", + "type": "string" + }, + "name": { + "description": "The name of the resource", + "type": "string" + }, + "type": { + "description": "The type of the resource. E.g. \"Microsoft.Compute/virtualMachines\"", + "type": "string" + } + } + }, + "v1StorageCost": { + "description": "Cloud storage cost", + "type": "object", + "properties": { + "discountedUsage": { + "description": "Cloud storage upper limit which is free.", + "type": "string" + }, + "price": { + "description": "Array of cloud storage range prices", + "type": "array", + "items": { + "$ref": "#/definitions/v1StoragePrice" + } + } + } + }, + "v1StoragePrice": { + "description": "Cloud storage price within an upper limit.", + "type": "object", + "properties": { + "limit": { + "description": "Upper limit of cloud storage usage", + "type": "string" + }, + "price": { + "description": "Price of cloud storage type", + "type": "string" + } + } + }, + "v1StorageRate": { + "description": "Storage estimated rate information", + "type": "object", + "properties": { + "iops": { + "type": "number", + "format": "float64" + }, + "rate": { + "type": "number", + "format": "float64", + "x-omitempty": false + }, + "sizeGB": { + "type": "number", + "format": "float64" + }, + "throughput": { + "type": "number", + "format": "float64" + }, + "type": { + "type": "string" + } + } + }, + "v1StorageType": { + "description": "Cloud cloud Storage type details", + "type": "object", + "properties": { + "cost": { + "$ref": "#/definitions/v1StorageCost" + }, + "iopsCost": { + "$ref": "#/definitions/v1StorageCost" + }, + "kind": { + "description": "kind of storage type", + "type": "string" + }, + "name": { + "description": "Name of the storage type", + "type": "string" + }, + "throughputCost": { + "$ref": "#/definitions/v1StorageCost" + } + } + }, + "v1Subnet": { + "type": "object", + "properties": { + "cidrBlock": { + "description": "CidrBlock is the CIDR block to be used when the provider creates a managed Vnet.", + "type": "string" + }, + "name": { + "type": "string" + }, + "securityGroupName": { + "description": "Network Security Group(NSG) to be attached to subnet. NSG for a control plane subnet, should allow inbound to port 6443, as port 6443 is used by kubeadm to bootstrap the control planes", + "type": "string" + } + } + }, + "v1Subscription": { + "description": "Azure Subscription Type", + "type": "object", + "properties": { + "authorizationSource": { + "description": "The authorization source of the request. Valid values are one or more combinations of Legacy, RoleBased, Bypassed, Direct and Management", + "type": "string" + }, + "displayName": { + "description": "The subscription display name", + "type": "string" + }, + "state": { + "description": "The subscription state. Possible values are Enabled, Warned, PastDue, Disabled, and Deleted.", + "type": "string" + }, + "subscriptionId": { + "description": "The subscription ID", + "type": "string" + } + } + }, + "v1SyftDependency": { + "description": "Compliance Scan Syft Dependency", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string" + }, + "version": { + "type": "string" + } + } + }, + "v1SyftDependencyEntity": { + "description": "Syft dependency", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string" + }, + "version": { + "type": "string" + } + } + }, + "v1SyftEntity": { + "description": "Syft response", + "required": [ + "requestUid", + "status", + "report" + ], + "properties": { + "report": { + "$ref": "#/definitions/v1SyftReportEntity" + }, + "requestUid": { + "type": "string" + }, + "status": { + "type": "string", + "enum": [ + "Completed", + "InProgress", + "Failed", + "Initiated" + ] + } + } + }, + "v1SyftImageContext": { + "description": "Compliance Scan Syft Image Context", + "properties": { + "containerName": { + "type": "string" + }, + "namespace": { + "type": "string" + }, + "podName": { + "type": "string" + } + } + }, + "v1SyftReport": { + "description": "Compliance Scan Syft Report", + "properties": { + "dependencies": { + "type": "array", + "items": { + "$ref": "#/definitions/v1SyftDependency" + } + }, + "image": { + "type": "string" + }, + "imageContexts": { + "type": "array", + "items": { + "$ref": "#/definitions/v1SyftImageContext" + } + }, + "isSBOMExist": { + "type": "boolean" + }, + "state": { + "type": "string" + }, + "time": { + "$ref": "#/definitions/v1Time" + }, + "vulnerabilities": { + "type": "array", + "items": { + "$ref": "#/definitions/v1SyftVulnerability" + } + }, + "vulnerabilitySummary": { + "$ref": "#/definitions/v1SyftVulnerabilitySummary" + } + } + }, + "v1SyftReportEntity": { + "description": "Syft report", + "properties": { + "batchNo": { + "type": "integer", + "format": "int32" + }, + "batchSize": { + "type": "integer", + "format": "int32" + }, + "dependencies": { + "type": "array", + "items": { + "$ref": "#/definitions/v1SyftDependencyEntity" + } + }, + "image": { + "type": "string" + }, + "imageContexts": { + "type": "array", + "items": { + "$ref": "#/definitions/v1SyftImageContext" + } + }, + "sbom": { + "type": "string" + }, + "time": { + "$ref": "#/definitions/v1Time" + }, + "vulnerabilities": { + "type": "array", + "items": { + "$ref": "#/definitions/v1SyftVulnerabilityEntity" + } + }, + "vulnerabilitySummary": { + "$ref": "#/definitions/v1SyftVulnerabilitySummaryEntity" + } + } + }, + "v1SyftScanContext": { + "description": "Compliance Scan Syft Context", + "properties": { + "format": { + "type": "string" + }, + "labelSelector": { + "type": "string" + }, + "namespace": { + "type": "string" + }, + "podName": { + "type": "string" + }, + "scope": { + "type": "string" + } + } + }, + "v1SyftVulnerability": { + "description": "Compliance Scan Syft Vulnerability", + "properties": { + "fixedIn": { + "type": "string" + }, + "installed": { + "type": "string" + }, + "name": { + "type": "string" + }, + "severity": { + "type": "string" + }, + "type": { + "type": "string" + }, + "vulnerability": { + "type": "string" + } + } + }, + "v1SyftVulnerabilityEntity": { + "description": "Syft vulnerability", + "properties": { + "fixedIn": { + "type": "string" + }, + "installed": { + "type": "string" + }, + "name": { + "type": "string" + }, + "severity": { + "type": "string" + }, + "type": { + "type": "string" + }, + "vulnerability": { + "type": "string" + } + } + }, + "v1SyftVulnerabilitySummary": { + "description": "Compliance Scan Syft Vulnerability Summary", + "properties": { + "critical": { + "type": "integer", + "format": "int32" + }, + "high": { + "type": "integer", + "format": "int32" + }, + "low": { + "type": "integer", + "format": "int32" + }, + "medium": { + "type": "integer", + "format": "int32" + }, + "negligible": { + "type": "integer", + "format": "int32" + }, + "unknown": { + "type": "integer", + "format": "int32" + } + } + }, + "v1SyftVulnerabilitySummaryEntity": { + "description": "Syft vulnerability summary", + "properties": { + "critical": { + "type": "integer", + "format": "int32" + }, + "high": { + "type": "integer", + "format": "int32" + }, + "low": { + "type": "integer", + "format": "int32" + }, + "medium": { + "type": "integer", + "format": "int32" + }, + "negligible": { + "type": "integer", + "format": "int32" + }, + "unknown": { + "type": "integer", + "format": "int32" + } + } + }, + "v1SystemFeature": { + "type": "object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/v1SystemFeaturesSpec" + } + } + }, + "v1SystemFeatures": { + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": { + "description": "List of system features", + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1SystemFeature" + } + } + } + }, + "v1SystemFeaturesSpec": { + "type": "object", + "properties": { + "description": { + "description": "Feature description", + "type": "string" + }, + "docLink": { + "description": "Feature doc link", + "type": "string" + }, + "isAllowed": { + "description": "Flag which specifies if feature is allowed or not", + "type": "boolean", + "x-omitempty": false + }, + "key": { + "description": "Unique Feature key", + "type": "string" + } + } + }, + "v1SystemGitAuthSpec": { + "description": "system git auth account specifications", + "properties": { + "_type": { + "type": "string" + }, + "password": { + "type": "string" + }, + "token": { + "type": "string" + }, + "username": { + "$ref": "#/definitions/v1SystemGitAuthSpec" + } + } + }, + "v1SystemReverseProxy": { + "description": "system config reverse proxy", + "properties": { + "caCert": { + "type": "string" + }, + "clientCert": { + "type": "string" + }, + "clientKey": { + "type": "string" + }, + "port": { + "type": "integer" + }, + "protocol": { + "type": "string", + "enum": [ + "http", + "https" + ] + }, + "server": { + "type": "string" + }, + "vHostPort": { + "type": "integer" + } + } + }, + "v1SystemScarSpec": { + "description": "system scar config spec", + "type": "object", + "properties": { + "baseContentPath": { + "type": "string" + }, + "caCert": { + "type": "string" + }, + "endpoint": { + "type": "string" + }, + "insecureVerify": { + "type": "boolean" + }, + "password": { + "type": "string" + }, + "username": { + "type": "string" + } + } + }, + "v1TagFilter": { + "description": "Tag Filter create spec", + "type": "object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectMetaInputEntity" + }, + "spec": { + "$ref": "#/definitions/v1TagFilterSpec" + } + } + }, + "v1TagFilterGroup": { + "properties": { + "conjunction": { + "$ref": "#/definitions/v1SearchFilterConjunctionOperator" + }, + "filters": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1TagFilterItem" + } + } + } + }, + "v1TagFilterItem": { + "properties": { + "key": { + "type": "string" + }, + "negation": { + "type": "boolean" + }, + "operator": { + "$ref": "#/definitions/v1SearchFilterKeyValueOperator" + }, + "values": { + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + } + } + } + }, + "v1TagFilterSpec": { + "description": "Filter create spec", + "type": "object", + "properties": { + "filterGroup": { + "$ref": "#/definitions/v1TagFilterGroup" + } + } + }, + "v1TagFilterSummary": { + "description": "Filter summary object", + "type": "object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/v1TagFilterSpec" + } + } + }, + "v1Taint": { + "description": "Taint", + "type": "object", + "properties": { + "effect": { + "type": "string", + "enum": [ + "NoSchedule", + "PreferNoSchedule", + "NoExecute" + ] + }, + "key": { + "description": "The taint key to be applied to a node", + "type": "string" + }, + "timeAdded": { + "$ref": "#/definitions/v1Time" + }, + "value": { + "description": "The taint value corresponding to the taint key.", + "type": "string" + } + } + }, + "v1Team": { + "description": "Team information", + "type": "object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/v1TeamSpec" + }, + "status": { + "$ref": "#/definitions/v1TeamStatus" + } + } + }, + "v1TeamPatch": { + "type": "array", + "items": { + "$ref": "#/definitions/v1HttpPatch" + } + }, + "v1TeamRoleMap": { + "properties": { + "roles": { + "type": "array", + "items": { + "type": "string" + } + }, + "teamId": { + "type": "string" + } + } + }, + "v1TeamSpec": { + "description": "Team specifications", + "properties": { + "roles": { + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + } + }, + "sources": { + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + } + }, + "users": { + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + } + } + } + }, + "v1TeamSpecSummary": { + "type": "object", + "properties": { + "emailId": { + "type": "string" + }, + "projects": { + "type": "array", + "items": { + "$ref": "#/definitions/v1UidSummary" + } + }, + "roles": { + "type": "array", + "items": { + "$ref": "#/definitions/v1UidSummary" + } + }, + "users": { + "type": "array", + "items": { + "$ref": "#/definitions/v1UidSummary" + } + } + } + }, + "v1TeamStatus": { + "description": "Team status", + "type": "object" + }, + "v1TeamSummary": { + "description": "Team summary", + "type": "object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/v1TeamSpecSummary" + }, + "status": { + "$ref": "#/definitions/v1TeamStatus" + } + } + }, + "v1TeamSummarySortFields": { + "type": "string", + "enum": [ + "name", + "creationTimestamp" + ], + "x-nullable": true + }, + "v1TeamSummarySortSpec": { + "properties": { + "field": { + "$ref": "#/definitions/v1TeamSummarySortFields" + }, + "order": { + "$ref": "#/definitions/v1SortOrder" + } + } + }, + "v1TeamTenantRolesEntity": { + "type": "object", + "properties": { + "roles": { + "type": "array", + "items": { + "$ref": "#/definitions/v1UidSummary" + } + } + } + }, + "v1TeamTenantRolesUpdate": { + "type": "object", + "properties": { + "roles": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "v1Teams": { + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1Team" + } + }, + "listmeta": { + "$ref": "#/definitions/v1ListMetaData" + } + } + }, + "v1TeamsFilterSpec": { + "description": "Teams filter spec", + "properties": { + "name": { + "$ref": "#/definitions/v1FilterString" + } + } + }, + "v1TeamsSummaryList": { + "description": "Returns Team summary", + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1TeamSummary" + } + } + } + }, + "v1TeamsSummarySpec": { + "description": "Teams filter summary spec", + "properties": { + "filter": { + "$ref": "#/definitions/v1TeamsFilterSpec" + }, + "sort": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1TeamSummarySortSpec" + } + } + } + }, + "v1TenantAddressPatch": { + "description": "Tenant Address", + "type": "object", + "properties": { + "address": { + "$ref": "#/definitions/v1Address" + } + } + }, + "v1TenantAssetCert": { + "description": "tenant cert", + "type": "object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/v1Cert" + } + } + }, + "v1TenantAssetCerts": { + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1TenantAssetCert" + } + } + } + }, + "v1TenantClusterSettings": { + "properties": { + "nodesAutoRemediationSetting": { + "$ref": "#/definitions/v1NodesAutoRemediationSettings" + } + } + }, + "v1TenantDomains": { + "description": "Tenant domains", + "type": "object", + "properties": { + "domains": { + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + } + } + } + }, + "v1TenantEmailPatch": { + "description": "Tenant EmailId", + "type": "object", + "properties": { + "emailId": { + "type": "string" + } + } + }, + "v1TenantEnableClusterGroup": { + "description": "Enable or Disable cluster group for a tenant", + "properties": { + "hideSystemClusterGroups": { + "type": "boolean", + "x-omitempty": false + }, + "isClusterGroupEnabled": { + "description": "Deprecated. Use hideSystemClusterGroups field", + "type": "boolean", + "x-omitempty": false + } + } + }, + "v1TenantFreemium": { + "description": "Tenant freemium configuration", + "properties": { + "activeClustersLimit": { + "type": "integer", + "x-omitempty": false + }, + "isFreemium": { + "type": "boolean", + "x-omitempty": false + }, + "isUnlimited": { + "type": "boolean", + "x-omitempty": false + }, + "overageUsageLimit": { + "type": "number", + "format": "float64", + "x-omitempty": false + }, + "totalUsageLimit": { + "type": "number", + "format": "float64", + "x-omitempty": false + } + } + }, + "v1TenantFreemiumUsage": { + "type": "object", + "properties": { + "isFreemium": { + "type": "boolean", + "x-omitempty": false + }, + "isUnlimited": { + "type": "boolean", + "x-omitempty": false + }, + "limit": { + "$ref": "#/definitions/v1FreemiumUsageLimit" + }, + "usage": { + "$ref": "#/definitions/v1FreemiumUsage" + } + } + }, + "v1TenantOidcClaims": { + "type": "object", + "properties": { + "Email": { + "type": "string", + "x-omitempty": false + }, + "FirstName": { + "type": "string", + "x-omitempty": false + }, + "LastName": { + "type": "string", + "x-omitempty": false + }, + "SpectroTeam": { + "type": "string", + "x-omitempty": false + } + } + }, + "v1TenantOidcClientSpec": { + "description": "Tenant", + "type": "object", + "properties": { + "callbackUrl": { + "type": "string", + "x-omitempty": false + }, + "clientId": { + "type": "string", + "x-omitempty": false + }, + "clientSecret": { + "type": "string", + "x-omitempty": false + }, + "defaultTeams": { + "type": "array", + "items": { + "type": "string" + }, + "x-omitempty": false + }, + "isSsoEnabled": { + "type": "boolean", + "x-omitempty": false + }, + "issuerTls": { + "$ref": "#/definitions/v1OidcIssuerTls" + }, + "issuerUrl": { + "description": "the issuer is the URL identifier for the service", + "type": "string", + "x-omitempty": false + }, + "logoutUrl": { + "type": "string", + "x-omitempty": false + }, + "requiredClaims": { + "$ref": "#/definitions/v1TenantOidcClaims" + }, + "scopes": { + "type": "array", + "items": { + "type": "string" + }, + "x-omitempty": false + }, + "scopesDelimiter": { + "type": "string", + "x-omitempty": false + }, + "syncSsoTeams": { + "type": "boolean", + "x-omitempty": false + } + } + }, + "v1TenantPasswordPolicyEntity": { + "description": "Tenant Password Policy Entity", + "type": "object", + "properties": { + "creationTimestamp": { + "$ref": "#/definitions/v1Time" + }, + "expiryDurationInDays": { + "type": "integer" + }, + "firstReminderInDays": { + "type": "integer" + }, + "isRegex": { + "type": "boolean" + }, + "minLength": { + "type": "integer" + }, + "minNumOfBlockLetters": { + "type": "integer" + }, + "minNumOfDigits": { + "type": "integer" + }, + "minNumOfSmallLetters": { + "type": "integer" + }, + "minNumOfSpecialCharacters": { + "type": "integer" + }, + "regex": { + "type": "string" + }, + "updateTimestamp": { + "$ref": "#/definitions/v1Time" + } + } + }, + "v1TenantResourceLimit": { + "properties": { + "kind": { + "type": "string", + "$ref": "#/definitions/v1ResourceLimitType" + }, + "label": { + "type": "string" + }, + "limit": { + "type": "number", + "format": "int64", + "x-omitempty": false + }, + "maxLimit": { + "type": "number", + "format": "int64", + "x-omitempty": false + } + } + }, + "v1TenantResourceLimitEntity": { + "properties": { + "kind": { + "type": "string", + "x-omitempty": false, + "$ref": "#/definitions/v1ResourceLimitType" + }, + "limit": { + "type": "number", + "format": "int64", + "x-omitempty": false + } + } + }, + "v1TenantResourceLimits": { + "description": "Tenant resource limits", + "properties": { + "resources": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1TenantResourceLimit" + } + } + } + }, + "v1TenantResourceLimitsEntity": { + "description": "Tenant resource limits. Supported resources keys are 'user','project','apiKey','team','role','cloudaccount','clusterprofile','workspace','registry','privategateway','location','certificate','macro','sshkey','alert','spectrocluster','edgehost'.", + "properties": { + "resources": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1TenantResourceLimitEntity" + } + } + } + }, + "v1TenantSamlRequestSpec": { + "description": "Tenant", + "type": "object", + "properties": { + "attributes": { + "type": "array", + "items": { + "$ref": "#/definitions/v1TenantSamlSpecAttribute" + } + }, + "defaultTeams": { + "type": "array", + "items": { + "type": "string" + } + }, + "federationMetadata": { + "type": "string" + }, + "identityProvider": { + "type": "string" + }, + "isSingleLogoutEnabled": { + "type": "boolean" + }, + "isSsoEnabled": { + "type": "boolean" + }, + "nameIdFormat": { + "type": "string" + }, + "syncSsoTeams": { + "type": "boolean" + } + } + }, + "v1TenantSamlSpec": { + "description": "Tenant", + "type": "object", + "properties": { + "acsUrl": { + "type": "string" + }, + "attributes": { + "type": "array", + "items": { + "$ref": "#/definitions/v1TenantSamlSpecAttribute" + } + }, + "audienceUrl": { + "description": "same as entity id", + "type": "string" + }, + "certificate": { + "description": "certificate for slo", + "type": "string" + }, + "defaultTeams": { + "type": "array", + "items": { + "type": "string" + } + }, + "entityId": { + "type": "string" + }, + "federationMetadata": { + "type": "string" + }, + "identityProvider": { + "type": "string" + }, + "isSingleLogoutEnabled": { + "type": "boolean", + "x-omitempty": false + }, + "isSsoEnabled": { + "type": "boolean", + "x-omitempty": false + }, + "issuer": { + "description": "same as entity id", + "type": "string" + }, + "nameIdFormat": { + "type": "string" + }, + "serviceProviderMetadata": { + "type": "string" + }, + "singleLogoutUrl": { + "description": "slo url", + "type": "string", + "x-omitempty": false + }, + "syncSsoTeams": { + "type": "boolean", + "x-omitempty": false + } + } + }, + "v1TenantSamlSpecAttribute": { + "type": "object", + "properties": { + "attributeValue": { + "type": "string" + }, + "mappedAttribute": { + "type": "string" + }, + "name": { + "type": "string" + }, + "nameFormat": { + "type": "string" + } + } + }, + "v1TenantSsoAuthProvidersEntity": { + "type": "object", + "properties": { + "isEnabled": { + "type": "boolean", + "x-omitempty": false + }, + "ssoLogins": { + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + } + } + } + }, + "v1TencentAccount": { + "description": "Tencent cloud account information", + "type": "object", + "properties": { + "apiVersion": { + "description": "Cloud account api version", + "type": "string" + }, + "kind": { + "description": "Cloud account kind", + "type": "string" + }, + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/v1TencentCloudAccount" + }, + "status": { + "$ref": "#/definitions/v1CloudAccountStatus" + } + } + }, + "v1TencentAccounts": { + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1TencentAccount" + } + }, + "listmeta": { + "$ref": "#/definitions/v1ListMetaData" + } + } + }, + "v1TencentAvailabilityZone": { + "description": "Tencent availability zone", + "type": "object", + "properties": { + "name": { + "description": "Tencent availability zone name", + "type": "string" + }, + "state": { + "description": "Tencent availability zone state", + "type": "string" + }, + "zoneId": { + "description": "Tencent availability zone id", + "type": "string" + } + } + }, + "v1TencentAvailabilityZones": { + "description": "List of Tencent Availability zones", + "type": "object", + "required": [ + "zones" + ], + "properties": { + "zones": { + "type": "array", + "items": { + "$ref": "#/definitions/v1TencentAvailabilityZone" + } + } + } + }, + "v1TencentCloudAccount": { + "type": "object", + "required": [ + "secretId", + "secretKey" + ], + "properties": { + "secretId": { + "description": "Tencent api secretID", + "type": "string" + }, + "secretKey": { + "description": "Tencent api secret key", + "type": "string" + } + } + }, + "v1TencentCloudClusterConfigEntity": { + "description": "Tencent cloud cluster config entity", + "type": "object", + "properties": { + "clusterConfig": { + "$ref": "#/definitions/v1TencentClusterConfig" + } + } + }, + "v1TencentCloudConfig": { + "description": "TencentCloudConfig is the Schema for the tencentcloudconfigs API", + "type": "object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/v1TencentCloudConfigSpec" + } + } + }, + "v1TencentCloudConfigSpec": { + "description": "TencentCloudConfigSpec defines the cloud configuration input by user This will translate to clusterspec/machinespec for cluster-api", + "type": "object", + "properties": { + "cloudAccountRef": { + "description": "cloudAccountRef should point to the secret which contains TencentCloudAccount", + "$ref": "#/definitions/v1ObjectReference" + }, + "clusterConfig": { + "$ref": "#/definitions/v1TencentClusterConfig" + }, + "machinePoolConfig": { + "type": "array", + "items": { + "$ref": "#/definitions/v1TencentMachinePoolConfig" + } + } + } + }, + "v1TencentClusterConfig": { + "description": "Cluster level configuration for tencent cloud and applicable for all the machine pools", + "type": "object", + "required": [ + "region" + ], + "properties": { + "endpointAccess": { + "description": "Endpoints specifies access to this cluster's control plane endpoints", + "$ref": "#/definitions/v1TkeEndpointAccess" + }, + "region": { + "type": "string" + }, + "sshKeyIDs": { + "type": "array", + "items": { + "type": "string" + } + }, + "vpcID": { + "description": "VPC Id to deploy cluster into should have one public and one private subnet for the the cluster creation, this field is optional, If VPC Id is not provided a fully managed VPC will be created", + "type": "string" + } + } + }, + "v1TencentInstanceTypes": { + "description": "List of Tencent instance types", + "type": "object", + "properties": { + "instanceTypes": { + "type": "array", + "items": { + "$ref": "#/definitions/v1InstanceType" + } + } + } + }, + "v1TencentKeypair": { + "description": "Tencent Keypair entity", + "type": "object", + "properties": { + "id": { + "description": "Tencent keypair id", + "type": "string" + }, + "name": { + "description": "Tencent keypair name", + "type": "string" + }, + "publickey": { + "description": "Tencent public key", + "type": "string" + } + } + }, + "v1TencentKeypairs": { + "description": "List of Tencent keypairs", + "type": "object", + "properties": { + "keypairs": { + "type": "array", + "items": { + "$ref": "#/definitions/v1TencentKeypair" + } + } + } + }, + "v1TencentMachine": { + "description": "Tencent cloud VM definition", + "type": "object", + "properties": { + "apiVersion": { + "type": "string" + }, + "kind": { + "type": "string" + }, + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/v1TencentMachineSpec" + }, + "status": { + "$ref": "#/definitions/v1CloudMachineStatus" + } + } + }, + "v1TencentMachinePoolCloudConfigEntity": { + "type": "object", + "properties": { + "azs": { + "type": "array", + "items": { + "type": "string" + } + }, + "instanceType": { + "description": "instance type", + "type": "string" + }, + "rootDeviceSize": { + "description": "rootDeviceSize in GBs", + "type": "integer", + "format": "int64", + "maximum": 2000, + "minimum": 1 + }, + "subnetIds": { + "description": "AZ to subnet mapping filled by ally from hubble SubnetIDs [\"ap-guangzhou-6\"] = \"subnet-079b6061\" This field is optional If we don't provide a subnetId then by default the first subnet from the AZ will be picked up for deployment", + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + }, + "v1TencentMachinePoolConfig": { + "type": "object", + "properties": { + "additionalLabels": { + "description": "AdditionalLabels", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "additionalTags": { + "description": "AdditionalTags is an optional set of tags to add to resources managed by the provider, in addition to the ones added by default. For eg., tags for EKS nodeGroup or EKS NodegroupIAMRole", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "azs": { + "description": "AZs is only used for dynamic placement", + "type": "array", + "items": { + "type": "string" + } + }, + "instanceConfig": { + "$ref": "#/definitions/v1InstanceConfig" + }, + "instanceType": { + "description": "instance type", + "type": "string" + }, + "isControlPlane": { + "description": "whether this pool is for control plane", + "type": "boolean" + }, + "labels": { + "description": "labels for this pool, example: control-plane/worker, gpu, windows", + "type": "array", + "items": { + "type": "string" + } + }, + "machinePoolProperties": { + "$ref": "#/definitions/v1MachinePoolProperties" + }, + "maxSize": { + "description": "max size of the pool, for scaling", + "type": "integer", + "format": "int32" + }, + "minSize": { + "description": "min size of the pool, for scaling", + "type": "integer", + "format": "int32" + }, + "name": { + "type": "string" + }, + "nodeRepaveInterval": { + "description": "Minimum number of seconds a node should be Ready, before the next node is selected for repave. Applicable only for workerpools in infrastructure cluster", + "type": "integer", + "format": "int32" + }, + "rootDeviceSize": { + "description": "rootDeviceSize in GBs", + "type": "integer", + "format": "int64" + }, + "size": { + "description": "size of the pool, number of machines", + "type": "integer", + "format": "int32" + }, + "subnetIds": { + "description": "AZ to subnet mapping filled by ally from hubble SubnetIDs [\"ap-guangzhou-6\"] = \"subnet-079b6061\" This field is optional If we don't provide a subnetId then by default the first subnet from the AZ will be picked up for deployment", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "taints": { + "description": "control plane or worker taints", + "type": "array", + "items": { + "$ref": "#/definitions/v1Taint" + } + }, + "updateStrategy": { + "description": "rolling update strategy for this machinepool if not specified, will use ScaleOut", + "$ref": "#/definitions/v1UpdateStrategy" + }, + "useControlPlaneAsWorker": { + "description": "if IsControlPlane==true \u0026\u0026 useControlPlaneAsWorker==true, then will remove control plane taint this will not be used for worker pools", + "type": "boolean" + } + } + }, + "v1TencentMachinePoolConfigEntity": { + "type": "object", + "required": [ + "cloudConfig" + ], + "properties": { + "cloudConfig": { + "$ref": "#/definitions/v1TencentMachinePoolCloudConfigEntity" + }, + "poolConfig": { + "$ref": "#/definitions/v1MachinePoolConfigEntity" + } + } + }, + "v1TencentMachineSpec": { + "description": "Tencent cloud VM definition spec", + "type": "object", + "required": [ + "nics", + "instanceType", + "imageId" + ], + "properties": { + "dnsName": { + "type": "string" + }, + "imageId": { + "type": "string" + }, + "instanceType": { + "type": "string" + }, + "nics": { + "type": "array", + "items": { + "$ref": "#/definitions/v1TencentNic" + } + }, + "securityGroups": { + "type": "array", + "items": { + "type": "string" + } + }, + "subnetId": { + "type": "string" + }, + "type": { + "type": "string" + }, + "vpcId": { + "type": "string" + }, + "zoneId": { + "type": "string" + } + } + }, + "v1TencentMachines": { + "description": "Tencent machine list", + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1TencentMachine" + } + }, + "listmeta": { + "$ref": "#/definitions/v1ListMetaData" + } + } + }, + "v1TencentNic": { + "description": "Tencent network interface", + "type": "object", + "properties": { + "index": { + "type": "integer", + "format": "int8" + }, + "privateIPs": { + "type": "array", + "items": { + "type": "string" + } + }, + "publicIp": { + "type": "string" + } + } + }, + "v1TencentRegion": { + "description": "Tencent region entity", + "type": "object", + "properties": { + "name": { + "description": "Name of tencent region", + "type": "string" + }, + "state": { + "description": "State of tencent region", + "type": "string" + } + } + }, + "v1TencentRegions": { + "description": "List of tencent regions", + "type": "object", + "required": [ + "regions" + ], + "properties": { + "regions": { + "description": "Tencent regions entity", + "type": "array", + "items": { + "$ref": "#/definitions/v1TencentRegion" + } + } + } + }, + "v1TencentSecurityGroup": { + "description": "Tencent Security Group. A security group is a virtual firewall that features stateful data packet filtering", + "type": "object", + "properties": { + "id": { + "description": "Tencent security group id", + "type": "string" + }, + "isDefault": { + "description": "Whether it is the default security group, the default security group does not support deletion.", + "type": "boolean" + }, + "name": { + "description": "Tencent security group name", + "type": "string" + }, + "projectId": { + "description": "Tencent security group associated to a project", + "type": "string" + } + } + }, + "v1TencentSecurityGroups": { + "description": "List of Tencent security groups", + "type": "object", + "properties": { + "groups": { + "type": "array", + "items": { + "$ref": "#/definitions/v1TencentSecurityGroup" + } + } + } + }, + "v1TencentStorageTypes": { + "description": "List of Tencent storage types", + "type": "object", + "properties": { + "storageTypes": { + "type": "array", + "items": { + "$ref": "#/definitions/v1StorageType" + } + } + } + }, + "v1TencentSubnet": { + "description": "Tencent Subnet entity", + "type": "object", + "properties": { + "az": { + "description": "Availability zone associated with tencent subnet", + "type": "string" + }, + "cidrBlock": { + "description": "Tencent subnet CIDR. The CIDR notation consists of an IP address, a slash character ('/') and a decimal number from 0 to 32", + "type": "string" + }, + "name": { + "description": "Tencent subnet name", + "type": "string" + }, + "subnetId": { + "description": "Tencent subnet id", + "type": "string" + } + } + }, + "v1TencentVpc": { + "description": "Tencent VPC entity", + "type": "object", + "required": [ + "vpcId" + ], + "properties": { + "cidrBlock": { + "description": "Tencent VPC CIDR. The CIDR notation consists of an IP address, a slash character ('/') and a decimal number from 0 to 32", + "type": "string" + }, + "name": { + "description": "Tencent VPC name", + "type": "string" + }, + "subnets": { + "type": "array", + "items": { + "$ref": "#/definitions/v1TencentSubnet" + } + }, + "vpcId": { + "description": "Tencent VPC id", + "type": "string" + } + } + }, + "v1TencentVpcs": { + "description": "List of Tencent VPCs", + "type": "object", + "required": [ + "vpcs" + ], + "properties": { + "vpcs": { + "type": "array", + "items": { + "$ref": "#/definitions/v1TencentVpc" + } + } + } + }, + "v1Time": { + "description": "Time is a wrapper around time.Time which supports correct marshaling to YAML and JSON. Wrappers are provided for many of the factory methods that the time package offers.", + "type": "string", + "format": "date-time" + }, + "v1TkeEndpointAccess": { + "description": "TKEEndpointAccess specifies how control plane endpoints are accessible", + "type": "object", + "properties": { + "IsExtranet": { + "description": "IsExtranet Whether it is external network access (TRUE external network access FALSE internal network access, default value: FALSE)", + "type": "boolean" + }, + "private": { + "description": "Private points VPC-internal control plane access to the private endpoint", + "type": "boolean" + }, + "privateCIDR": { + "description": "Deprecated. PrivateCIDRs specifies which blocks can access the public endpoint", + "type": "string" + }, + "public": { + "description": "Public controls whether control plane endpoints are publicly accessible", + "type": "boolean" + }, + "publicCIDRs": { + "description": "Deprecated. PublicCIDRs specifies which blocks can access the public endpoint", + "type": "array", + "items": { + "type": "string" + } + }, + "securityGroup": { + "description": "Tencent security group", + "type": "string" + }, + "subnetId": { + "description": "Tencent Subnet", + "type": "string" + } + } + }, + "v1TlsConfiguration": { + "description": "TLS configuration", + "type": "object", + "properties": { + "ca": { + "type": "string" + }, + "certificate": { + "type": "string" + }, + "enabled": { + "type": "boolean", + "x-omitempty": false + }, + "insecureSkipVerify": { + "type": "boolean", + "x-omitempty": false + }, + "key": { + "type": "string" + } + } + }, + "v1TotalClusterRate": { + "description": "Cluster total estimated rate information", + "type": "object", + "properties": { + "compute": { + "type": "number", + "format": "float64", + "x-omitempty": false + }, + "storage": { + "type": "number", + "format": "float64", + "x-omitempty": false + }, + "total": { + "type": "number", + "format": "float64", + "x-omitempty": false + } + } + }, + "v1Uid": { + "type": "object", + "required": [ + "uid" + ], + "properties": { + "uid": { + "type": "string" + } + } + }, + "v1UidRoleSummary": { + "type": "object", + "properties": { + "inheritedRoles": { + "type": "array", + "items": { + "$ref": "#/definitions/v1UidSummary" + } + }, + "name": { + "type": "string" + }, + "roles": { + "type": "array", + "items": { + "$ref": "#/definitions/v1UidSummary" + } + }, + "uid": { + "type": "string" + } + } + }, + "v1UidSummary": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "uid": { + "type": "string" + } + } + }, + "v1Uids": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1Uid" + } + }, + "v1UpdateStrategy": { + "description": "UpdatesStrategy will be used to translate to RollingUpdateStrategy of a MachineDeployment We'll start with default values for the translation, can expose more details later Following is details of parameters translated from the type ScaleOut =\u003e maxSurge=1, maxUnavailable=0 ScaleIn =\u003e maxSurge=0, maxUnavailable=1", + "type": "object", + "properties": { + "type": { + "description": "update strategy, either ScaleOut or ScaleIn if empty, will default to RollingUpdateScaleOut", + "type": "string", + "enum": [ + "RollingUpdateScaleOut", + "RollingUpdateScaleIn" + ] + } + } + }, + "v1Updated": { + "description": "The resource was updated successfully" + }, + "v1UpdatedMsg": { + "description": "Update response with message", + "properties": { + "msg": { + "type": "string" + } + } + }, + "v1Upgrades": { + "description": "Upgrades represent the reason of the last upgrade that took place", + "type": "object", + "properties": { + "reason": { + "type": "array", + "items": { + "type": "string" + } + }, + "timestamp": { + "$ref": "#/definitions/v1Time" + } + } + }, + "v1User": { + "description": "User", + "type": "object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/v1UserSpec" + }, + "status": { + "$ref": "#/definitions/v1UserStatus" + } + } + }, + "v1UserAssetSsh": { + "description": "SSH key information", + "type": "object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/v1UserAssetSshSpec" + } + } + }, + "v1UserAssetSshEntity": { + "description": "SSH Key request payload", + "type": "object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectMetaInputEntity" + }, + "spec": { + "$ref": "#/definitions/v1UserAssetSshSpec" + } + } + }, + "v1UserAssetSshSpec": { + "description": "SSH key specification", + "type": "object", + "properties": { + "publicKey": { + "type": "string" + } + } + }, + "v1UserAssetsLocation": { + "description": "Location object", + "type": "object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/v1UserAssetsLocationSpec" + } + } + }, + "v1UserAssetsLocationAzure": { + "description": "Azure location object", + "type": "object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectMetaInputEntity" + }, + "spec": { + "$ref": "#/definitions/v1UserAssetsLocationAzureSpec" + } + } + }, + "v1UserAssetsLocationAzureSpec": { + "description": "Azure location specification", + "type": "object", + "required": [ + "config" + ], + "properties": { + "config": { + "$ref": "#/definitions/v1AzureStorageConfig" + }, + "isDefault": { + "description": "Set to 'true', if location has to be set as default", + "type": "boolean" + }, + "type": { + "description": "Azure location type [azure]", + "type": "string" + } + } + }, + "v1UserAssetsLocationGcp": { + "description": "GCP location object", + "type": "object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectMetaInputEntity" + }, + "spec": { + "$ref": "#/definitions/v1UserAssetsLocationGcpSpec" + } + } + }, + "v1UserAssetsLocationGcpSpec": { + "description": "GCP location specification", + "type": "object", + "required": [ + "config" + ], + "properties": { + "config": { + "$ref": "#/definitions/v1GcpStorageConfig" + }, + "isDefault": { + "description": "Set to 'true', if location has to be set as default", + "type": "boolean" + }, + "type": { + "description": "GCP location type [gcp]", + "type": "string" + } + } + }, + "v1UserAssetsLocationS3": { + "description": "S3 location object", + "type": "object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectMetaInputEntity" + }, + "spec": { + "$ref": "#/definitions/v1UserAssetsLocationS3Spec" + } + } + }, + "v1UserAssetsLocationS3Spec": { + "description": "S3 location specification", + "type": "object", + "required": [ + "config" + ], + "properties": { + "config": { + "$ref": "#/definitions/v1S3StorageConfig" + }, + "isDefault": { + "description": "Set to 'true', if location has to be set as default", + "type": "boolean" + }, + "type": { + "description": "S3 location type [s3/minio]", + "type": "string" + } + } + }, + "v1UserAssetsLocationSpec": { + "description": "Location specification", + "type": "object", + "properties": { + "isDefault": { + "type": "boolean" + }, + "storage": { + "$ref": "#/definitions/v1LocationType" + }, + "type": { + "type": "string" + } + } + }, + "v1UserAssetsLocations": { + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": { + "description": "List of locations", + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1UserAssetsLocation" + } + } + } + }, + "v1UserAssetsSsh": { + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": { + "description": "List of SSH keys", + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1UserAssetSsh" + } + } + } + }, + "v1UserEntity": { + "description": "User", + "type": "object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/v1UserSpecEntity" + } + } + }, + "v1UserInfo": { + "description": "User basic information", + "properties": { + "orgName": { + "description": "Organization name", + "type": "string" + }, + "tenantUid": { + "type": "string" + }, + "userUid": { + "type": "string" + } + } + }, + "v1UserKubectlSession": { + "type": "object", + "properties": { + "clusterUid": { + "type": "string" + }, + "creationTime": { + "type": "string" + }, + "isActive": { + "type": "boolean" + }, + "podIp": { + "type": "string" + }, + "podName": { + "type": "string" + }, + "port": { + "type": "string" + }, + "projectUid": { + "type": "string" + }, + "sessionUid": { + "type": "string" + }, + "shellyCluster": { + "type": "string" + }, + "tenantClusterEndpoint": { + "type": "string" + }, + "userName": { + "type": "string" + }, + "userUid": { + "type": "string" + } + } + }, + "v1UserMeta": { + "type": "object", + "properties": { + "emailId": { + "type": "string" + }, + "firstName": { + "type": "string" + }, + "lastName": { + "type": "string" + }, + "org": { + "type": "string" + }, + "uid": { + "type": "string" + } + } + }, + "v1UserMetaEntity": { + "description": "User meta entity", + "type": "object", + "properties": { + "emailId": { + "type": "string" + }, + "name": { + "type": "string" + }, + "uid": { + "type": "string" + } + } + }, + "v1UserPatch": { + "type": "array", + "items": { + "$ref": "#/definitions/v1HttpPatch" + } + }, + "v1UserRoleMap": { + "properties": { + "roles": { + "type": "array", + "items": { + "type": "string" + } + }, + "userId": { + "type": "string" + } + } + }, + "v1UserRoleUIDs": { + "type": "object", + "properties": { + "roles": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "v1UserRolesEntity": { + "type": "object", + "properties": { + "inheritedRoles": { + "type": "array", + "items": { + "$ref": "#/definitions/v1UidSummary" + } + }, + "roles": { + "type": "array", + "items": { + "$ref": "#/definitions/v1UidSummary" + } + } + } + }, + "v1UserSpec": { + "description": "User specifications", + "properties": { + "emailId": { + "description": "User's email id", + "type": "string" + }, + "firstName": { + "type": "string" + }, + "lastName": { + "type": "string" + }, + "roles": { + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + } + } + } + }, + "v1UserSpecEntity": { + "description": "User Entity input", + "type": "object", + "properties": { + "emailId": { + "type": "string" + }, + "firstName": { + "type": "string" + }, + "lastName": { + "type": "string" + }, + "loginMode": { + "type": "string" + }, + "roles": { + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + } + }, + "teams": { + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + } + } + } + }, + "v1UserSpecSummary": { + "type": "object", + "properties": { + "emailId": { + "type": "string" + }, + "firstName": { + "type": "string" + }, + "lastName": { + "type": "string" + }, + "projects": { + "description": "Deprecated.", + "type": "array", + "items": { + "$ref": "#/definitions/v1UidSummary" + } + }, + "projectsCount": { + "type": "integer", + "format": "int32", + "x-omitempty": false + }, + "roles": { + "type": "array", + "items": { + "$ref": "#/definitions/v1UidSummary" + } + }, + "teams": { + "type": "array", + "items": { + "$ref": "#/definitions/v1UidSummary" + } + } + } + }, + "v1UserStatus": { + "description": "User status", + "properties": { + "activationLink": { + "description": "provides the link to activate or reset the user password", + "type": "string", + "x-omitempty": false + }, + "isActive": { + "description": "Specifies if user account is active/disabled", + "type": "boolean", + "x-omitempty": false + }, + "isPasswordResetting": { + "description": "Specifies if user in multi org requested password reset", + "type": "boolean", + "x-omitempty": false + }, + "lastSignIn": { + "description": "user's last sign in time", + "$ref": "#/definitions/v1Time" + } + } + }, + "v1UserStatusLoginMode": { + "type": "object", + "properties": { + "loginMode": { + "type": "string", + "enum": [ + "dev", + "devops" + ] + } + } + }, + "v1UserSummary": { + "description": "User summary", + "type": "object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/v1UserSpecSummary" + }, + "status": { + "$ref": "#/definitions/v1UserStatus" + } + } + }, + "v1UserSummarySortFields": { + "type": "string", + "enum": [ + "name", + "creationTimestamp" + ], + "x-nullable": true + }, + "v1UserSummarySortSpec": { + "properties": { + "field": { + "$ref": "#/definitions/v1UserSummarySortFields" + }, + "order": { + "$ref": "#/definitions/v1SortOrder" + } + } + }, + "v1UserToken": { + "description": "Returns the Authorization token. To be used for further api calls", + "type": "object", + "properties": { + "Authorization": { + "description": "Describes the authentication token in jwt format.", + "type": "string" + }, + "isMfa": { + "description": "Indicates the authentication flow using MFA", + "type": "boolean", + "x-omitempty": false + } + } + }, + "v1UserUpdateEntity": { + "description": "User", + "type": "object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/v1UserUpdateSpecEntity" + } + } + }, + "v1UserUpdateSpecEntity": { + "description": "User Entity input", + "type": "object", + "properties": { + "emailId": { + "type": "string" + }, + "firstName": { + "type": "string" + }, + "lastName": { + "type": "string" + }, + "roles": { + "description": "Deprecated. Use 'v1/users/{uid}/roles' API to assign roles.", + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + } + } + } + }, + "v1Users": { + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1User" + } + }, + "listmeta": { + "$ref": "#/definitions/v1ListMetaData" + } + } + }, + "v1UsersFilterSpec": { + "description": "Users filter spec", + "properties": { + "emailId": { + "$ref": "#/definitions/v1FilterString" + }, + "name": { + "$ref": "#/definitions/v1FilterString" + } + } + }, + "v1UsersMetadata": { + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1UserMetaEntity" + } + } + } + }, + "v1UsersSummaryList": { + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1UserSummary" + } + } + } + }, + "v1UsersSummarySpec": { + "description": "Users filter summary spec", + "properties": { + "filter": { + "$ref": "#/definitions/v1UsersFilterSpec" + }, + "sort": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1UserSummarySortSpec" + } + } + } + }, + "v1VMAddVolumeEntity": { + "type": "object", + "required": [ + "addVolumeOptions" + ], + "properties": { + "addVolumeOptions": { + "description": "Parameters required to add volume to virtual machine/virtual machine instance", + "$ref": "#/definitions/v1VmAddVolumeOptions" + }, + "dataVolumeTemplate": { + "description": "dataVolumeTemplates is a list of dataVolumes that the VirtualMachineInstance template can reference. DataVolumes in this list are dynamically created for the VirtualMachine and are tied to the VirtualMachine's life-cycle.", + "$ref": "#/definitions/v1VmDataVolumeTemplateSpec" + }, + "persist": { + "description": "If 'true' add the disk to the Virtual Machine \u0026 Virtual Machine Instance, else add the disk to the Virtual Machine Instance only", + "type": "boolean" + } + } + }, + "v1VMCluster": { + "description": "VM Dashboard enabled Spectro cluster", + "type": "object", + "properties": { + "metadata": { + "properties": { + "name": { + "type": "string" + }, + "projectUid": { + "type": "string" + }, + "uid": { + "type": "string" + } + } + }, + "spec": { + "description": "Spectro cluster spec", + "type": "object", + "properties": { + "cloudType": { + "type": "string" + } + } + }, + "status": { + "description": "Spectro cluster status", + "properties": { + "clusterState": { + "type": "string" + } + } + } + } + }, + "v1VMClusters": { + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1VMCluster" + } + } + } + }, + "v1VMRemoveVolumeEntity": { + "type": "object", + "required": [ + "removeVolumeOptions" + ], + "properties": { + "persist": { + "description": "If 'true' remove the disk from the Virtual Machine \u0026 Virtual Machine Instance, else remove the disk from the Virtual Machine Instance only", + "type": "boolean" + }, + "removeVolumeOptions": { + "description": "Parameters required to remove volume from virtual machine/virtual machine instance", + "$ref": "#/definitions/v1VmRemoveVolumeOptions" + } + } + }, + "v1Variable": { + "description": "Unique variable field with schema definition", + "type": "object", + "required": [ + "name" + ], + "properties": { + "defaultValue": { + "description": "The default value of the variable", + "type": "string" + }, + "description": { + "description": "Variable description", + "type": "string" + }, + "displayName": { + "description": "Unique display name of the variable", + "type": "string" + }, + "format": { + "$ref": "#/definitions/v1VariableFormat" + }, + "hidden": { + "description": "If true, then variable will be hidden for overriding the value. By default the hidden flag will be set to false", + "type": "boolean", + "x-omitempty": false + }, + "immutable": { + "description": "If true, then variable value can't be editable. By default the immutable flag will be set to false", + "type": "boolean", + "x-omitempty": false + }, + "isSensitive": { + "description": "If true, then default value will be masked. By default the isSensitive flag will be set to false", + "type": "boolean", + "x-omitempty": false + }, + "name": { + "description": "Variable name", + "type": "string" + }, + "regex": { + "description": "Regular expression pattern which the variable value must match", + "type": "string" + }, + "required": { + "description": "Flag to specify if the variable is optional or mandatory. If it is mandatory then default value must be provided", + "type": "boolean", + "x-omitempty": false + } + } + }, + "v1VariableFormat": { + "description": "Format type of the variable value", + "type": "string", + "default": "string", + "enum": [ + "string", + "number", + "boolean", + "ipv4", + "ipv4cidr", + "ipv6", + "version" + ] + }, + "v1VariableNames": { + "required": [ + "variables" + ], + "properties": { + "variables": { + "description": "Array of variable names", + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + } + } + } + }, + "v1Variables": { + "type": "object", + "properties": { + "variables": { + "description": "List of unique variable fields with schema constraints", + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1Variable" + } + } + } + }, + "v1Virtual": { + "properties": { + "appDeployments": { + "description": "list of apps deployed on the virtual cluster", + "type": "array", + "items": { + "$ref": "#/definitions/v1ObjectResReference" + } + }, + "clusterGroup": { + "description": "cluster group details of virtual cluster", + "$ref": "#/definitions/v1ObjectResReference" + }, + "hostCluster": { + "description": "host cluster reference", + "$ref": "#/definitions/v1ObjectResReference" + }, + "lifecycleStatus": { + "description": "cluster life cycle status of virtual cluster", + "$ref": "#/definitions/v1LifecycleStatus" + }, + "state": { + "description": "cluster virtual host status", + "type": "string" + }, + "virtualClusters": { + "description": "list of virtual clusters deployed on the cluster", + "type": "array", + "items": { + "$ref": "#/definitions/v1ObjectResReference" + } + } + } + }, + "v1VirtualCloudClusterConfigEntity": { + "description": "Virtual cloud cluster config entity", + "type": "object", + "properties": { + "clusterConfig": { + "$ref": "#/definitions/v1VirtualClusterConfig" + } + } + }, + "v1VirtualCloudConfig": { + "description": "VirtualCloudConfig is the Schema for the virtual cloudconfigs API", + "type": "object", + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + "type": "string" + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/v1VirtualCloudConfigSpec" + }, + "status": { + "$ref": "#/definitions/v1NestedCloudConfigStatus" + } + } + }, + "v1VirtualCloudConfigSpec": { + "description": "VirtualCloudConfigSpec defines the cloud configuration input by user This will translate to clusterspec for cluster-api.", + "type": "object", + "required": [ + "clusterConfig", + "hostClusterUid", + "machinePoolConfig" + ], + "properties": { + "clusterConfig": { + "$ref": "#/definitions/v1VirtualClusterConfig" + }, + "hostClusterUid": { + "type": "string" + }, + "machinePoolConfig": { + "type": "array", + "items": { + "$ref": "#/definitions/v1VirtualMachinePoolConfig" + } + } + } + }, + "v1VirtualClusterConfig": { + "description": "Cluster level configuration for virtual cluster", + "type": "object", + "properties": { + "controlPlaneEndpoint": { + "$ref": "#/definitions/v1APIEndpoint" + }, + "helmRelease": { + "$ref": "#/definitions/v1VirtualClusterHelmRelease" + }, + "kubernetesVersion": { + "type": "string", + "default": "" + } + } + }, + "v1VirtualClusterHelmChart": { + "type": "object", + "properties": { + "name": { + "type": "string", + "default": "" + }, + "repo": { + "type": "string", + "default": "" + }, + "version": { + "type": "string", + "default": "" + } + } + }, + "v1VirtualClusterHelmRelease": { + "type": "object", + "properties": { + "chart": { + "$ref": "#/definitions/v1VirtualClusterHelmChart" + }, + "values": { + "type": "string", + "default": "" + } + } + }, + "v1VirtualClusterResize": { + "type": "object", + "required": [ + "instanceType" + ], + "properties": { + "instanceType": { + "$ref": "#/definitions/v1VirtualInstanceType" + } + } + }, + "v1VirtualInstanceType": { + "type": "object", + "properties": { + "maxCPU": { + "description": "Maximum CPU cores", + "type": "integer", + "format": "int32" + }, + "maxMemInMiB": { + "description": "Maximum memory in MiB", + "type": "integer", + "format": "int32" + }, + "maxStorageGiB": { + "description": "Maximum storage in GiB", + "type": "integer", + "format": "int32" + }, + "minCPU": { + "description": "Minimum CPU cores", + "type": "integer", + "format": "int32" + }, + "minMemInMiB": { + "description": "Minimum memory in MiB", + "type": "integer", + "format": "int32" + }, + "minStorageGiB": { + "description": "Minimum storage in GiB", + "type": "integer", + "format": "int32" + } + } + }, + "v1VirtualMachine": { + "description": "Virtual cloud machine definition", + "type": "object", + "properties": { + "kind": { + "type": "string" + }, + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/v1VirtualMachineSpec" + }, + "status": { + "$ref": "#/definitions/v1CloudMachineStatus" + } + } + }, + "v1VirtualMachinePoolCloudConfigEntity": { + "type": "object", + "required": [ + "instanceType" + ], + "properties": { + "instanceType": { + "$ref": "#/definitions/v1VirtualInstanceType" + } + } + }, + "v1VirtualMachinePoolConfig": { + "type": "object", + "required": [ + "instanceType" + ], + "properties": { + "additionalLabels": { + "description": "additionalLabels", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "additionalTags": { + "description": "AdditionalTags is an optional set of tags to add to resources managed by the provider, in addition to the ones added by default. For eg., tags for EKS nodeGroup or EKS NodegroupIAMRole", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "azs": { + "type": "array", + "items": { + "type": "string" + } + }, + "instanceType": { + "description": "InstanceType defines the required CPU, Memory", + "$ref": "#/definitions/v1VirtualInstanceType" + }, + "isControlPlane": { + "description": "whether this pool is for control plane", + "type": "boolean" + }, + "labels": { + "description": "labels for this pool, example: control-plane/worker, gpu, windows", + "type": "array", + "items": { + "type": "string" + } + }, + "machinePoolProperties": { + "$ref": "#/definitions/v1MachinePoolProperties" + }, + "maxSize": { + "description": "max size of the pool, for scaling", + "type": "integer", + "format": "int32" + }, + "minSize": { + "description": "min size of the pool, for scaling", + "type": "integer", + "format": "int32" + }, + "name": { + "type": "string" + }, + "resourcePool": { + "type": "string" + }, + "size": { + "description": "size of the pool, number of machines", + "type": "integer", + "format": "int32" + }, + "taints": { + "description": "control plane or worker taints", + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1Taint" + } + }, + "updateStrategy": { + "description": "rolling update strategy for this machinepool if not specified, will use ScaleOut", + "$ref": "#/definitions/v1UpdateStrategy" + }, + "useControlPlaneAsWorker": { + "description": "if IsControlPlane==true \u0026\u0026 useControlPlaneAsWorker==true, then will remove control plane taint this will not be used for worker pools", + "type": "boolean" + } + } + }, + "v1VirtualMachinePoolConfigEntity": { + "type": "object", + "required": [ + "cloudConfig" + ], + "properties": { + "cloudConfig": { + "$ref": "#/definitions/v1VirtualMachinePoolCloudConfigEntity" + } + } + }, + "v1VirtualMachineSnapshot": { + "description": "VirtualMachineSnapshot defines the operation of snapshotting a VM", + "type": "object", + "required": [ + "spec" + ], + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + "type": "string" + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "$ref": "#/definitions/v1VmObjectMeta" + }, + "spec": { + "$ref": "#/definitions/v1VirtualMachineSnapshotSpec" + }, + "status": { + "$ref": "#/definitions/v1VirtualMachineSnapshotStatus" + } + } + }, + "v1VirtualMachineSnapshotList": { + "description": "VirtualMachineSnapshotList is a list of VirtualMachineSnapshot resources", + "type": "object", + "required": [ + "metadata", + "items" + ], + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + "type": "string" + }, + "items": { + "type": "array", + "items": { + "$ref": "#/definitions/v1VirtualMachineSnapshot" + } + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "$ref": "#/definitions/v1VmListMeta" + } + } + }, + "v1VirtualMachineSnapshotSpec": { + "description": "VirtualMachineSnapshotSpec is the spec for a VirtualMachineSnapshot resource", + "type": "object", + "required": [ + "source" + ], + "properties": { + "deletionPolicy": { + "type": "string" + }, + "failureDeadline": { + "$ref": "#/definitions/v1VmDuration" + }, + "source": { + "$ref": "#/definitions/v1VmTypedLocalObjectReference" + } + } + }, + "v1VirtualMachineSnapshotStatus": { + "description": "VirtualMachineSnapshotStatus is the status for a VirtualMachineSnapshot resource", + "type": "object", + "properties": { + "conditions": { + "type": "array", + "items": { + "$ref": "#/definitions/v1VmCondition" + } + }, + "creationTime": { + "$ref": "#/definitions/v1Time" + }, + "error": { + "$ref": "#/definitions/v1VmError" + }, + "indications": { + "type": "array", + "items": { + "type": "string" + }, + "x-kubernetes-list-type": "set" + }, + "phase": { + "type": "string" + }, + "readyToUse": { + "type": "boolean" + }, + "snapshotVolumes": { + "$ref": "#/definitions/v1VmSnapshotVolumesLists" + }, + "sourceUID": { + "type": "string" + }, + "virtualMachineSnapshotContentName": { + "type": "string" + } + }, + "x-nullable": true + }, + "v1VirtualMachineSpec": { + "description": "Virtual cloud machine definition spec", + "type": "object", + "properties": { + "hostname": { + "type": "string" + } + } + }, + "v1VirtualMachines": { + "description": "List of virtual machines", + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1VirtualMachine" + } + }, + "listmeta": { + "$ref": "#/definitions/v1ListMetaData" + } + } + }, + "v1VirtualNetwork": { + "description": "Azure virtual network is the fundamental building block for your private network in Azure.", + "type": "object", + "properties": { + "addressSpaces": { + "description": "Location of the virtual network", + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + } + }, + "id": { + "description": "The ID of the resource group", + "type": "string" + }, + "location": { + "description": "Location of the virtual network", + "type": "string" + }, + "name": { + "description": "Name of the virtual network", + "type": "string" + }, + "subnets": { + "description": "List of subnets associated with Azure VPC", + "type": "array", + "items": { + "$ref": "#/definitions/v1Subnet" + } + }, + "type": { + "description": "Type of the virtual network", + "type": "string" + } + } + }, + "v1VmAccessCredential": { + "description": "AccessCredential represents a credential source that can be used to authorize remote access to the vm guest Only one of its members may be specified.", + "type": "object", + "properties": { + "sshPublicKey": { + "$ref": "#/definitions/v1VmSshPublicKeyAccessCredential" + }, + "userPassword": { + "$ref": "#/definitions/v1VmUserPasswordAccessCredential" + } + } + }, + "v1VmAccessCredentialSecretSource": { + "type": "object", + "required": [ + "secretName" + ], + "properties": { + "secretName": { + "description": "SecretName represents the name of the secret in the VMI's namespace", + "type": "string" + } + } + }, + "v1VmAddVolumeOptions": { + "description": "AddVolumeOptions is provided when dynamically hot plugging a volume and disk", + "type": "object", + "required": [ + "name", + "disk", + "volumeSource" + ], + "properties": { + "disk": { + "$ref": "#/definitions/v1VmDisk" + }, + "dryRun": { + "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", + "type": "array", + "items": { + "type": "string" + }, + "x-kubernetes-list-type": "atomic" + }, + "name": { + "description": "Name represents the name that will be used to map the disk to the corresponding volume. This overrides any name set inside the Disk struct itself.", + "type": "string" + }, + "volumeSource": { + "$ref": "#/definitions/v1VmHotplugVolumeSource" + } + } + }, + "v1VmAffinity": { + "description": "Affinity is a group of affinity scheduling rules.", + "type": "object", + "properties": { + "nodeAffinity": { + "$ref": "#/definitions/v1VmNodeAffinity" + }, + "podAffinity": { + "$ref": "#/definitions/v1VmPodAffinity" + }, + "podAntiAffinity": { + "$ref": "#/definitions/v1PodAntiAffinity" + } + } + }, + "v1VmBIOS": { + "description": "If set (default), BIOS will be used.", + "type": "object", + "properties": { + "useSerial": { + "description": "If set, the BIOS output will be transmitted over serial", + "type": "boolean" + } + } + }, + "v1VmBlockSize": { + "description": "BlockSize provides the option to change the block size presented to the VM for a disk. Only one of its members may be specified.", + "type": "object", + "properties": { + "custom": { + "$ref": "#/definitions/v1VmCustomBlockSize" + }, + "matchVolume": { + "$ref": "#/definitions/v1VmFeatureState" + } + } + }, + "v1VmBootloader": { + "description": "Represents the firmware blob used to assist in the domain creation process. Used for setting the QEMU BIOS file path for the libvirt domain.", + "type": "object", + "properties": { + "bios": { + "$ref": "#/definitions/v1VmBIOS" + }, + "efi": { + "$ref": "#/definitions/v1VmEFI" + } + } + }, + "v1VmCDRomTarget": { + "type": "object", + "properties": { + "bus": { + "description": "Bus indicates the type of disk device to emulate. supported values: virtio, sata, scsi.", + "type": "string" + }, + "readonly": { + "description": "ReadOnly. Defaults to true.", + "type": "boolean" + }, + "tray": { + "description": "Tray indicates if the tray of the device is open or closed. Allowed values are \"open\" and \"closed\". Defaults to closed.", + "type": "string" + } + } + }, + "v1VmChassis": { + "description": "Chassis specifies the chassis info passed to the domain.", + "type": "object", + "properties": { + "asset": { + "type": "string" + }, + "manufacturer": { + "type": "string" + }, + "serial": { + "type": "string" + }, + "sku": { + "type": "string" + }, + "version": { + "type": "string" + } + } + }, + "v1VmClientPassthroughDevices": { + "description": "Represent a subset of client devices that can be accessed by VMI. At the moment only, USB devices using Usbredir's library and tooling. Another fit would be a smartcard with libcacard.\n\nThe struct is currently empty as there is no immediate request for user-facing APIs. This structure simply turns on USB redirection of UsbClientPassthroughMaxNumberOf devices.", + "type": "object" + }, + "v1VmClock": { + "description": "Represents the clock and timers of a vmi.", + "type": "object", + "properties": { + "timer": { + "$ref": "#/definitions/v1VmTimer" + }, + "timezone": { + "description": "Timezone sets the guest clock to the specified timezone. Zone name follows the TZ environment variable format (e.g. 'America/New_York').", + "type": "string" + }, + "utc": { + "$ref": "#/definitions/v1VmClockOffsetUTC" + } + } + }, + "v1VmClockOffsetUTC": { + "description": "UTC sets the guest clock to UTC on each boot.", + "type": "object", + "properties": { + "offsetSeconds": { + "description": "OffsetSeconds specifies an offset in seconds, relative to UTC. If set, guest changes to the clock will be kept during reboots and not reset.", + "type": "integer", + "format": "int32" + } + } + }, + "v1VmCloudInitConfigDriveSource": { + "description": "Represents a cloud-init config drive user data source. More info: https://cloudinit.readthedocs.io/en/latest/topics/datasources/configdrive.html", + "type": "object", + "properties": { + "networkData": { + "description": "NetworkData contains config drive inline cloud-init networkdata.", + "type": "string" + }, + "networkDataBase64": { + "description": "NetworkDataBase64 contains config drive cloud-init networkdata as a base64 encoded string.", + "type": "string" + }, + "networkDataSecretRef": { + "$ref": "#/definitions/v1VmLocalObjectReference" + }, + "secretRef": { + "$ref": "#/definitions/v1VmLocalObjectReference" + }, + "userData": { + "description": "UserData contains config drive inline cloud-init userdata.", + "type": "string" + }, + "userDataBase64": { + "description": "UserDataBase64 contains config drive cloud-init userdata as a base64 encoded string.", + "type": "string" + } + } + }, + "v1VmCloudInitNoCloudSource": { + "description": "Represents a cloud-init nocloud user data source. More info: http://cloudinit.readthedocs.io/en/latest/topics/datasources/nocloud.html", + "type": "object", + "properties": { + "networkData": { + "description": "NetworkData contains NoCloud inline cloud-init networkdata.", + "type": "string" + }, + "networkDataBase64": { + "description": "NetworkDataBase64 contains NoCloud cloud-init networkdata as a base64 encoded string.", + "type": "string" + }, + "networkDataSecretRef": { + "$ref": "#/definitions/v1VmLocalObjectReference" + }, + "secretRef": { + "$ref": "#/definitions/v1VmLocalObjectReference" + }, + "userData": { + "description": "UserData contains NoCloud inline cloud-init userdata.", + "type": "string" + }, + "userDataBase64": { + "description": "UserDataBase64 contains NoCloud cloud-init userdata as a base64 encoded string.", + "type": "string" + } + } + }, + "v1VmCondition": { + "description": "Condition defines conditions", + "type": "object", + "required": [ + "type", + "status" + ], + "properties": { + "lastProbeTime": { + "type": "string" + }, + "lastTransitionTime": { + "type": "string" + }, + "message": { + "type": "string" + }, + "reason": { + "type": "string" + }, + "status": { + "type": "string" + }, + "type": { + "type": "string" + } + } + }, + "v1VmConfigDriveSshPublicKeyAccessCredentialPropagation": { + "type": "object" + }, + "v1VmConfigMapVolumeSource": { + "description": "ConfigMapVolumeSource adapts a ConfigMap into a volume. More info: https://kubernetes.io/docs/concepts/storage/volumes/#configmap", + "type": "object", + "properties": { + "name": { + "description": "Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names", + "type": "string" + }, + "optional": { + "description": "Specify whether the ConfigMap or it's keys must be defined", + "type": "boolean" + }, + "volumeLabel": { + "description": "The volume label of the resulting disk inside the VMI. Different bootstrapping mechanisms require different values. Typical values are \"cidata\" (cloud-init), \"config-2\" (cloud-init) or \"OEMDRV\" (kickstart).", + "type": "string" + } + } + }, + "v1VmContainerDiskSource": { + "description": "Represents a docker image with an embedded disk.", + "type": "object", + "required": [ + "image" + ], + "properties": { + "image": { + "description": "Image is the name of the image with the embedded disk.", + "type": "string" + }, + "imagePullPolicy": { + "description": "Image pull policy. One of Always, Never, IfNotPresent. Defaults to Always if :latest tag is specified, or IfNotPresent otherwise. Cannot be updated. More info: https://kubernetes.io/docs/concepts/containers/images#updating-images", + "type": "string" + }, + "imagePullSecret": { + "description": "ImagePullSecret is the name of the Docker registry secret required to pull the image. The secret must already exist.", + "type": "string" + }, + "path": { + "description": "Path defines the path to disk file in the container", + "type": "string" + } + } + }, + "v1VmCoreDataVolumeSource": { + "type": "object", + "required": [ + "name" + ], + "properties": { + "hotpluggable": { + "description": "Hotpluggable indicates whether the volume can be hotplugged and hotunplugged.", + "type": "boolean" + }, + "name": { + "description": "Name of both the DataVolume and the PVC in the same namespace. After PVC population the DataVolume is garbage collected by default.", + "type": "string" + } + } + }, + "v1VmCoreResourceRequirements": { + "description": "ResourceRequirements describes the compute resource requirements.", + "type": "object", + "properties": { + "limits": { + "description": "Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/", + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/v1VmQuantity" + } + }, + "requests": { + "description": "Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/", + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/v1VmQuantity" + } + } + } + }, + "v1VmCpu": { + "description": "CPU allows specifying the CPU topology.", + "type": "object", + "properties": { + "cores": { + "description": "Cores specifies the number of cores inside the vmi. Must be a value greater or equal 1.", + "type": "integer", + "format": "int64" + }, + "dedicatedCpuPlacement": { + "description": "DedicatedCPUPlacement requests the scheduler to place the VirtualMachineInstance on a node with enough dedicated pCPUs and pin the vCPUs to it.", + "type": "boolean" + }, + "features": { + "description": "Features specifies the CPU features list inside the VMI.", + "type": "array", + "items": { + "$ref": "#/definitions/v1VmCpuFeature" + } + }, + "isolateEmulatorThread": { + "description": "IsolateEmulatorThread requests one more dedicated pCPU to be allocated for the VMI to place the emulator thread on it.", + "type": "boolean" + }, + "model": { + "description": "Model specifies the CPU model inside the VMI. List of available models https://github.com/libvirt/libvirt/tree/master/src/cpu_map. It is possible to specify special cases like \"host-passthrough\" to get the same CPU as the node and \"host-model\" to get CPU closest to the node one. Defaults to host-model.", + "type": "string" + }, + "numa": { + "$ref": "#/definitions/v1VmNUMA" + }, + "realtime": { + "$ref": "#/definitions/v1VmRealtime" + }, + "sockets": { + "description": "Sockets specifies the number of sockets inside the vmi. Must be a value greater or equal 1.", + "type": "integer", + "format": "int64" + }, + "threads": { + "description": "Threads specifies the number of threads inside the vmi. Must be a value greater or equal 1.", + "type": "integer", + "format": "int64" + } + } + }, + "v1VmCpuFeature": { + "description": "CPUFeature allows specifying a CPU feature.", + "type": "object", + "required": [ + "name" + ], + "properties": { + "name": { + "description": "Name of the CPU feature", + "type": "string" + }, + "policy": { + "description": "Policy is the CPU feature attribute which can have the following attributes: force - The virtual CPU will claim the feature is supported regardless of it being supported by host CPU. require - Guest creation will fail unless the feature is supported by the host CPU or the hypervisor is able to emulate it. optional - The feature will be supported by virtual CPU if and only if it is supported by host CPU. disable - The feature will not be supported by virtual CPU. forbid - Guest creation will fail if the feature is supported by host CPU. Defaults to require", + "type": "string" + } + } + }, + "v1VmCustomBlockSize": { + "description": "CustomBlockSize represents the desired logical and physical block size for a VM disk.", + "type": "object", + "required": [ + "logical", + "physical" + ], + "properties": { + "logical": { + "type": "integer", + "format": "int32" + }, + "physical": { + "type": "integer", + "format": "int32" + } + } + }, + "v1VmDHCPOptions": { + "description": "Extra DHCP options to use in the interface.", + "type": "object", + "properties": { + "bootFileName": { + "description": "If specified will pass option 67 to interface's DHCP server", + "type": "string" + }, + "ntpServers": { + "description": "If specified will pass the configured NTP server to the VM via DHCP option 042.", + "type": "array", + "items": { + "type": "string" + } + }, + "privateOptions": { + "description": "If specified will pass extra DHCP options for private use, range: 224-254", + "type": "array", + "items": { + "$ref": "#/definitions/v1VmDHCPPrivateOptions" + } + }, + "tftpServerName": { + "description": "If specified will pass option 66 to interface's DHCP server", + "type": "string" + } + } + }, + "v1VmDHCPPrivateOptions": { + "description": "DHCPExtraOptions defines Extra DHCP options for a VM.", + "type": "object", + "required": [ + "option", + "value" + ], + "properties": { + "option": { + "description": "Option is an Integer value from 224-254 Required.", + "type": "integer", + "format": "int32" + }, + "value": { + "description": "Value is a String value for the Option provided Required.", + "type": "string" + } + } + }, + "v1VmDataVolumeBlankImage": { + "description": "DataVolumeBlankImage provides the parameters to create a new raw blank image for the PVC", + "type": "object" + }, + "v1VmDataVolumeCheckpoint": { + "description": "DataVolumeCheckpoint defines a stage in a warm migration.", + "type": "object", + "required": [ + "previous", + "current" + ], + "properties": { + "current": { + "description": "Current is the identifier of the snapshot created for this checkpoint.", + "type": "string" + }, + "previous": { + "description": "Previous is the identifier of the snapshot from the previous checkpoint.", + "type": "string" + } + } + }, + "v1VmDataVolumeSource": { + "description": "DataVolumeSource represents the source for our Data Volume, this can be HTTP, Imageio, S3, Registry or an existing PVC", + "type": "object", + "properties": { + "blank": { + "$ref": "#/definitions/v1VmDataVolumeBlankImage" + }, + "http": { + "$ref": "#/definitions/v1VmDataVolumeSourceHttp" + }, + "imageio": { + "$ref": "#/definitions/v1VmDataVolumeSourceImageIO" + }, + "pvc": { + "$ref": "#/definitions/v1VmDataVolumeSourcePVC" + }, + "registry": { + "$ref": "#/definitions/v1VmDataVolumeSourceRegistry" + }, + "s3": { + "$ref": "#/definitions/v1VmDataVolumeSourceS3" + }, + "upload": { + "$ref": "#/definitions/v1VmDataVolumeSourceUpload" + }, + "vddk": { + "$ref": "#/definitions/v1VmDataVolumeSourceVDDK" + } + } + }, + "v1VmDataVolumeSourceHttp": { + "description": "DataVolumeSourceHTTP can be either an http or https endpoint, with an optional basic auth user name and password, and an optional configmap containing additional CAs", + "type": "object", + "required": [ + "url" + ], + "properties": { + "certConfigMap": { + "description": "CertConfigMap is a configmap reference, containing a Certificate Authority(CA) public key, and a base64 encoded pem certificate", + "type": "string" + }, + "extraHeaders": { + "description": "ExtraHeaders is a list of strings containing extra headers to include with HTTP transfer requests", + "type": "array", + "items": { + "type": "string" + } + }, + "secretExtraHeaders": { + "description": "SecretExtraHeaders is a list of Secret references, each containing an extra HTTP header that may include sensitive information", + "type": "array", + "items": { + "type": "string" + } + }, + "secretRef": { + "description": "SecretRef A Secret reference, the secret should contain accessKeyId (user name) base64 encoded, and secretKey (password) also base64 encoded", + "type": "string" + }, + "url": { + "description": "URL is the URL of the http(s) endpoint", + "type": "string" + } + } + }, + "v1VmDataVolumeSourceImageIO": { + "description": "DataVolumeSourceImageIO provides the parameters to create a Data Volume from an imageio source", + "type": "object", + "required": [ + "url", + "diskId" + ], + "properties": { + "certConfigMap": { + "description": "CertConfigMap provides a reference to the CA cert", + "type": "string" + }, + "diskId": { + "description": "DiskID provides id of a disk to be imported", + "type": "string" + }, + "secretRef": { + "description": "SecretRef provides the secret reference needed to access the ovirt-engine", + "type": "string" + }, + "url": { + "description": "URL is the URL of the ovirt-engine", + "type": "string" + } + } + }, + "v1VmDataVolumeSourcePVC": { + "description": "DataVolumeSourcePVC provides the parameters to create a Data Volume from an existing PVC", + "type": "object", + "required": [ + "namespace", + "name" + ], + "properties": { + "name": { + "description": "The name of the source PVC", + "type": "string" + }, + "namespace": { + "description": "The namespace of the source PVC", + "type": "string" + } + } + }, + "v1VmDataVolumeSourceRef": { + "description": "DataVolumeSourceRef defines an indirect reference to the source of data for the DataVolume", + "type": "object", + "required": [ + "kind", + "name" + ], + "properties": { + "kind": { + "description": "The kind of the source reference, currently only \"DataSource\" is supported", + "type": "string" + }, + "name": { + "description": "The name of the source reference", + "type": "string" + }, + "namespace": { + "description": "The namespace of the source reference, defaults to the DataVolume namespace", + "type": "string" + } + } + }, + "v1VmDataVolumeSourceRegistry": { + "description": "DataVolumeSourceRegistry provides the parameters to create a Data Volume from an registry source", + "type": "object", + "properties": { + "certConfigMap": { + "description": "CertConfigMap provides a reference to the Registry certs", + "type": "string" + }, + "imageStream": { + "description": "ImageStream is the name of image stream for import", + "type": "string" + }, + "pullMethod": { + "description": "PullMethod can be either \"pod\" (default import), or \"node\" (node docker cache based import)", + "type": "string" + }, + "secretRef": { + "description": "SecretRef provides the secret reference needed to access the Registry source", + "type": "string" + }, + "url": { + "description": "URL is the url of the registry source (starting with the scheme: docker, oci-archive)", + "type": "string" + } + } + }, + "v1VmDataVolumeSourceS3": { + "description": "DataVolumeSourceS3 provides the parameters to create a Data Volume from an S3 source", + "type": "object", + "required": [ + "url" + ], + "properties": { + "certConfigMap": { + "description": "CertConfigMap is a configmap reference, containing a Certificate Authority(CA) public key, and a base64 encoded pem certificate", + "type": "string" + }, + "secretRef": { + "description": "SecretRef provides the secret reference needed to access the S3 source", + "type": "string" + }, + "url": { + "description": "URL is the url of the S3 source", + "type": "string" + } + } + }, + "v1VmDataVolumeSourceUpload": { + "description": "DataVolumeSourceUpload provides the parameters to create a Data Volume by uploading the source", + "type": "object" + }, + "v1VmDataVolumeSourceVDDK": { + "description": "DataVolumeSourceVDDK provides the parameters to create a Data Volume from a Vmware source", + "type": "object", + "properties": { + "backingFile": { + "description": "BackingFile is the path to the virtual hard disk to migrate from vCenter/ESXi", + "type": "string" + }, + "initImageURL": { + "description": "InitImageURL is an optional URL to an image containing an extracted VDDK library, overrides v2v-vmware config map", + "type": "string" + }, + "secretRef": { + "description": "SecretRef provides a reference to a secret containing the username and password needed to access the vCenter or ESXi host", + "type": "string" + }, + "thumbprint": { + "description": "Thumbprint is the certificate thumbprint of the vCenter or ESXi host", + "type": "string" + }, + "url": { + "description": "URL is the URL of the vCenter or ESXi host with the VM to migrate", + "type": "string" + }, + "uuid": { + "description": "UUID is the UUID of the virtual machine that the backing file is attached to in vCenter/ESXi", + "type": "string" + } + } + }, + "v1VmDataVolumeSpec": { + "description": "DataVolumeSpec defines the DataVolume type specification", + "type": "object", + "properties": { + "checkpoints": { + "description": "Checkpoints is a list of DataVolumeCheckpoints, representing stages in a multistage import.", + "type": "array", + "items": { + "$ref": "#/definitions/v1VmDataVolumeCheckpoint" + } + }, + "contentType": { + "description": "DataVolumeContentType options: \"kubevirt\", \"archive\"", + "type": "string" + }, + "finalCheckpoint": { + "description": "FinalCheckpoint indicates whether the current DataVolumeCheckpoint is the final checkpoint.", + "type": "boolean" + }, + "preallocation": { + "description": "Preallocation controls whether storage for DataVolumes should be allocated in advance.", + "type": "boolean" + }, + "priorityClassName": { + "description": "PriorityClassName for Importer, Cloner and Uploader pod", + "type": "string" + }, + "pvc": { + "$ref": "#/definitions/v1VmPersistentVolumeClaimSpec" + }, + "source": { + "$ref": "#/definitions/v1VmDataVolumeSource" + }, + "sourceRef": { + "$ref": "#/definitions/v1VmDataVolumeSourceRef" + }, + "storage": { + "$ref": "#/definitions/v1VmStorageSpec" + } + } + }, + "v1VmDataVolumeTemplateSpec": { + "type": "object", + "required": [ + "spec" + ], + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values.", + "type": "string" + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase.", + "type": "string" + }, + "metadata": { + "$ref": "#/definitions/v1VmObjectMeta" + }, + "spec": { + "$ref": "#/definitions/v1VmDataVolumeSpec" + } + } + }, + "v1VmDevices": { + "type": "object", + "properties": { + "autoattachGraphicsDevice": { + "description": "Whether to attach the default graphics device or not. VNC will not be available if set to false. Defaults to true.", + "type": "boolean" + }, + "autoattachInputDevice": { + "description": "Whether to attach an Input Device. Defaults to false.", + "type": "boolean" + }, + "autoattachMemBalloon": { + "description": "Whether to attach the Memory balloon device with default period. Period can be adjusted in virt-config. Defaults to true.", + "type": "boolean" + }, + "autoattachPodInterface": { + "description": "Whether to attach a pod network interface. Defaults to true.", + "type": "boolean" + }, + "autoattachSerialConsole": { + "description": "Whether to attach the default serial console or not. Serial console access will not be available if set to false. Defaults to true.", + "type": "boolean" + }, + "autoattachVSOCK": { + "description": "Whether to attach the VSOCK CID to the VM or not. VSOCK access will be available if set to true. Defaults to false.", + "type": "boolean" + }, + "blockMultiQueue": { + "description": "Whether or not to enable virtio multi-queue for block devices. Defaults to false.", + "type": "boolean" + }, + "clientPassthrough": { + "$ref": "#/definitions/v1VmClientPassthroughDevices" + }, + "disableHotplug": { + "description": "DisableHotplug disabled the ability to hotplug disks.", + "type": "boolean" + }, + "disks": { + "description": "Disks describes disks, cdroms and luns which are connected to the vmi.", + "type": "array", + "items": { + "$ref": "#/definitions/v1VmDisk" + } + }, + "filesystems": { + "description": "Filesystems describes filesystem which is connected to the vmi.", + "type": "array", + "items": { + "$ref": "#/definitions/v1VmFilesystem" + }, + "x-kubernetes-list-type": "atomic" + }, + "gpus": { + "description": "Whether to attach a GPU device to the vmi.", + "type": "array", + "items": { + "$ref": "#/definitions/v1VmGPU" + }, + "x-kubernetes-list-type": "atomic" + }, + "hostDevices": { + "description": "Whether to attach a host device to the vmi.", + "type": "array", + "items": { + "$ref": "#/definitions/v1VmHostDevice" + }, + "x-kubernetes-list-type": "atomic" + }, + "inputs": { + "description": "Inputs describe input devices", + "type": "array", + "items": { + "$ref": "#/definitions/v1VmInput" + } + }, + "interfaces": { + "description": "Interfaces describe network interfaces which are added to the vmi.", + "type": "array", + "items": { + "$ref": "#/definitions/v1VmInterface" + } + }, + "networkInterfaceMultiqueue": { + "description": "If specified, virtual network interfaces configured with a virtio bus will also enable the vhost multiqueue feature for network devices. The number of queues created depends on additional factors of the VirtualMachineInstance, like the number of guest CPUs.", + "type": "boolean" + }, + "rng": { + "$ref": "#/definitions/v1VmRng" + }, + "sound": { + "$ref": "#/definitions/v1VmSoundDevice" + }, + "tpm": { + "$ref": "#/definitions/v1VmTPMDevice" + }, + "useVirtioTransitional": { + "description": "Fall back to legacy virtio 0.9 support if virtio bus is selected on devices. This is helpful for old machines like CentOS6 or RHEL6 which do not understand virtio_non_transitional (virtio 1.0).", + "type": "boolean" + }, + "watchdog": { + "$ref": "#/definitions/v1VmWatchdog" + } + } + }, + "v1VmDisk": { + "type": "object", + "required": [ + "name" + ], + "properties": { + "blockSize": { + "$ref": "#/definitions/v1VmBlockSize" + }, + "bootOrder": { + "description": "BootOrder is an integer value \u003e 0, used to determine ordering of boot devices. Lower values take precedence. Each disk or interface that has a boot order must have a unique value. Disks without a boot order are not tried if a disk with a boot order exists.", + "type": "integer", + "format": "int32" + }, + "cache": { + "description": "Cache specifies which kvm disk cache mode should be used. Supported values are: CacheNone, CacheWriteThrough.", + "type": "string" + }, + "cdrom": { + "$ref": "#/definitions/v1VmCDRomTarget" + }, + "dedicatedIOThread": { + "description": "dedicatedIOThread indicates this disk should have an exclusive IO Thread. Enabling this implies useIOThreads = true. Defaults to false.", + "type": "boolean" + }, + "disk": { + "$ref": "#/definitions/v1VmDiskTarget" + }, + "io": { + "description": "IO specifies which QEMU disk IO mode should be used. Supported values are: native, default, threads.", + "type": "string" + }, + "lun": { + "$ref": "#/definitions/v1VmLunTarget" + }, + "name": { + "description": "Name is the device name", + "type": "string" + }, + "serial": { + "description": "Serial provides the ability to specify a serial number for the disk device.", + "type": "string" + }, + "shareable": { + "description": "If specified the disk is made sharable and multiple write from different VMs are permitted", + "type": "boolean" + }, + "tag": { + "description": "If specified, disk address and its tag will be provided to the guest via config drive metadata", + "type": "string" + } + } + }, + "v1VmDiskTarget": { + "type": "object", + "properties": { + "bus": { + "description": "Bus indicates the type of disk device to emulate. supported values: virtio, sata, scsi, usb.", + "type": "string" + }, + "pciAddress": { + "description": "If specified, the virtual disk will be placed on the guests pci address with the specified PCI address. For example: 0000:81:01.10", + "type": "string" + }, + "readonly": { + "description": "ReadOnly. Defaults to false.", + "type": "boolean" + } + } + }, + "v1VmDomainSpec": { + "type": "object", + "required": [ + "devices" + ], + "properties": { + "chassis": { + "$ref": "#/definitions/v1VmChassis" + }, + "clock": { + "$ref": "#/definitions/v1VmClock" + }, + "cpu": { + "$ref": "#/definitions/v1VmCpu" + }, + "devices": { + "$ref": "#/definitions/v1VmDevices" + }, + "features": { + "$ref": "#/definitions/v1VmFeatures" + }, + "firmware": { + "$ref": "#/definitions/v1VmFirmware" + }, + "ioThreadsPolicy": { + "description": "Controls whether or not disks will share IOThreads. Omitting IOThreadsPolicy disables use of IOThreads. One of: shared, auto", + "type": "string" + }, + "launchSecurity": { + "$ref": "#/definitions/v1VmLaunchSecurity" + }, + "machine": { + "$ref": "#/definitions/v1VmMachine" + }, + "memory": { + "$ref": "#/definitions/v1VmMemory" + }, + "resources": { + "$ref": "#/definitions/v1VmResourceRequirements" + } + } + }, + "v1VmDownwardApiVolumeFile": { + "description": "DownwardAPIVolumeFile represents information to create the file containing the pod field", + "type": "object", + "required": [ + "path" + ], + "properties": { + "fieldRef": { + "$ref": "#/definitions/v1VmObjectFieldSelector" + }, + "mode": { + "description": "Optional: mode bits used to set permissions on this file, must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. If not specified, the volume defaultMode will be used. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.", + "type": "integer", + "format": "int32" + }, + "path": { + "description": "Required: Path is the relative path name of the file to be created. Must not be absolute or contain the '..' path. Must be utf-8 encoded. The first item of the relative path must not start with '..'", + "type": "string" + }, + "resourceFieldRef": { + "$ref": "#/definitions/v1VmResourceFieldSelector" + } + } + }, + "v1VmDownwardApiVolumeSource": { + "description": "DownwardAPIVolumeSource represents a volume containing downward API info.", + "type": "object", + "properties": { + "fields": { + "description": "Fields is a list of downward API volume file", + "type": "array", + "items": { + "$ref": "#/definitions/v1VmDownwardApiVolumeFile" + } + }, + "volumeLabel": { + "description": "The volume label of the resulting disk inside the VMI. Different bootstrapping mechanisms require different values. Typical values are \"cidata\" (cloud-init), \"config-2\" (cloud-init) or \"OEMDRV\" (kickstart).", + "type": "string" + } + } + }, + "v1VmDownwardMetricsVolumeSource": { + "description": "DownwardMetricsVolumeSource adds a very small disk to VMIs which contains a limited view of host and guest metrics. The disk content is compatible with vhostmd (https://github.com/vhostmd/vhostmd) and vm-dump-metrics.", + "type": "object" + }, + "v1VmDuration": { + "description": "Duration is a wrapper around time.Duration which supports correct marshaling to YAML and JSON. In particular, it marshals into strings, which can be used as map keys in json.", + "type": "string" + }, + "v1VmEFI": { + "description": "If set, EFI will be used instead of BIOS.", + "type": "object", + "properties": { + "secureBoot": { + "description": "If set, SecureBoot will be enabled and the OVMF roms will be swapped for SecureBoot-enabled ones. Requires SMM to be enabled. Defaults to true", + "type": "boolean" + } + } + }, + "v1VmEmptyDiskSource": { + "description": "EmptyDisk represents a temporary disk which shares the vmis lifecycle.", + "type": "object", + "required": [ + "capacity" + ], + "properties": { + "capacity": { + "$ref": "#/definitions/v1VmQuantity" + } + } + }, + "v1VmEphemeralVolumeSource": { + "type": "object", + "properties": { + "persistentVolumeClaim": { + "$ref": "#/definitions/v1VmPersistentVolumeClaimVolumeSource" + } + } + }, + "v1VmError": { + "description": "Error is the last error encountered during the snapshot/restore", + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "time": { + "$ref": "#/definitions/v1Time" + } + } + }, + "v1VmExecAction": { + "description": "ExecAction describes a \"run in container\" action.", + "type": "object", + "properties": { + "command": { + "description": "Command is the command line to execute inside the container, the working directory for the command is root ('/') in the container's filesystem. The command is simply exec'd, it is not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use a shell, you need to explicitly call out to that shell. Exit status of 0 is treated as live/healthy and non-zero is unhealthy.", + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "v1VmFeatureApiC": { + "type": "object", + "properties": { + "enabled": { + "description": "Enabled determines if the feature should be enabled or disabled on the guest. Defaults to true.", + "type": "boolean" + }, + "endOfInterrupt": { + "description": "EndOfInterrupt enables the end of interrupt notification in the guest. Defaults to false.", + "type": "boolean" + } + } + }, + "v1VmFeatureHyperv": { + "description": "Hyperv specific features.", + "type": "object", + "properties": { + "evmcs": { + "$ref": "#/definitions/v1VmFeatureState" + }, + "frequencies": { + "$ref": "#/definitions/v1VmFeatureState" + }, + "ipi": { + "$ref": "#/definitions/v1VmFeatureState" + }, + "reenlightenment": { + "$ref": "#/definitions/v1VmFeatureState" + }, + "relaxed": { + "$ref": "#/definitions/v1VmFeatureState" + }, + "reset": { + "$ref": "#/definitions/v1VmFeatureState" + }, + "runtime": { + "$ref": "#/definitions/v1VmFeatureState" + }, + "spinlocks": { + "$ref": "#/definitions/v1VmFeatureSpinlocks" + }, + "synic": { + "$ref": "#/definitions/v1VmFeatureState" + }, + "synictimer": { + "$ref": "#/definitions/v1VmSyNICTimer" + }, + "tlbflush": { + "$ref": "#/definitions/v1VmFeatureState" + }, + "vapic": { + "$ref": "#/definitions/v1VmFeatureState" + }, + "vendorid": { + "$ref": "#/definitions/v1VmFeatureVendorId" + }, + "vpindex": { + "$ref": "#/definitions/v1VmFeatureState" + } + } + }, + "v1VmFeatureKVm": { + "type": "object", + "properties": { + "hidden": { + "description": "Hide the KVM hypervisor from standard MSR based discovery. Defaults to false", + "type": "boolean" + } + } + }, + "v1VmFeatureSpinlocks": { + "type": "object", + "properties": { + "enabled": { + "description": "Enabled determines if the feature should be enabled or disabled on the guest. Defaults to true.", + "type": "boolean" + }, + "spinlocks": { + "description": "Retries indicates the number of retries. Must be a value greater or equal 4096. Defaults to 4096.", + "type": "integer", + "format": "int64" + } + } + }, + "v1VmFeatureState": { + "description": "Represents if a feature is enabled or disabled.", + "type": "object", + "properties": { + "enabled": { + "description": "Enabled determines if the feature should be enabled or disabled on the guest. Defaults to true.", + "type": "boolean" + } + } + }, + "v1VmFeatureVendorId": { + "type": "object", + "properties": { + "enabled": { + "description": "Enabled determines if the feature should be enabled or disabled on the guest. Defaults to true.", + "type": "boolean" + }, + "vendorid": { + "description": "VendorID sets the hypervisor vendor id, visible to the vmi. String up to twelve characters.", + "type": "string" + } + } + }, + "v1VmFeatures": { + "type": "object", + "properties": { + "acpi": { + "$ref": "#/definitions/v1VmFeatureState" + }, + "apic": { + "$ref": "#/definitions/v1VmFeatureApiC" + }, + "hyperv": { + "$ref": "#/definitions/v1VmFeatureHyperv" + }, + "kvm": { + "$ref": "#/definitions/v1VmFeatureKVm" + }, + "pvspinlock": { + "$ref": "#/definitions/v1VmFeatureState" + }, + "smm": { + "$ref": "#/definitions/v1VmFeatureState" + } + } + }, + "v1VmFieldsV1": { + "description": "FieldsV1 stores a set of fields in a data structure like a Trie, in JSON format.\n\nEach key is either a '.' representing the field itself, and will always map to an empty set, or a string representing a sub-field or item. The string will follow one of these four formats: 'f:\u003cname\u003e', where \u003cname\u003e is the name of a field in a struct, or key in a map 'v:\u003cvalue\u003e', where \u003cvalue\u003e is the exact json formatted value of a list item 'i:\\\u003cindex\u003e', where \\\u003cindex\u003e is position of a item in a list 'k:\u003ckeys\u003e', where \u003ckeys\u003e is a map of a list item's key fields to their unique values If a key maps to an empty Fields value, the field that key represents is part of the set.\n\nThe exact format is defined in sigs.k8s.io/structured-merge-diff", + "type": "object", + "properties": { + "Raw": { + "type": "array", + "items": { + "type": "string", + "format": "byte" + } + } + } + }, + "v1VmFilesystem": { + "type": "object", + "required": [ + "name", + "virtiofs" + ], + "properties": { + "name": { + "description": "Name is the device name", + "type": "string" + }, + "virtiofs": { + "$ref": "#/definitions/v1VmFilesystemVirtiofs" + } + } + }, + "v1VmFilesystemVirtiofs": { + "type": "object" + }, + "v1VmFirmware": { + "type": "object", + "properties": { + "bootloader": { + "$ref": "#/definitions/v1VmBootloader" + }, + "kernelBoot": { + "$ref": "#/definitions/v1VmKernelBoot" + }, + "serial": { + "description": "The system-serial-number in SMBIOS", + "type": "string" + }, + "uuid": { + "description": "UUID reported by the vmi bios. Defaults to a random generated uid.", + "type": "string" + } + } + }, + "v1VmGPU": { + "type": "object", + "required": [ + "name", + "deviceName" + ], + "properties": { + "deviceName": { + "type": "string" + }, + "name": { + "description": "Name of the GPU device as exposed by a device plugin", + "type": "string" + }, + "tag": { + "description": "If specified, the virtual network interface address and its tag will be provided to the guest via config drive", + "type": "string" + }, + "virtualGPUOptions": { + "$ref": "#/definitions/v1VmVGPUOptions" + } + } + }, + "v1VmGuestAgentPing": { + "description": "GuestAgentPing configures the guest-agent based ping probe", + "type": "object" + }, + "v1VmHPETTimer": { + "type": "object", + "properties": { + "present": { + "description": "Enabled set to false makes sure that the machine type or a preset can't add the timer. Defaults to true.", + "type": "boolean" + }, + "tickPolicy": { + "description": "TickPolicy determines what happens when QEMU misses a deadline for injecting a tick to the guest. One of \"delay\", \"catchup\", \"merge\", \"discard\".", + "type": "string" + } + } + }, + "v1VmHostDevice": { + "type": "object", + "required": [ + "name", + "deviceName" + ], + "properties": { + "deviceName": { + "description": "DeviceName is the resource name of the host device exposed by a device plugin", + "type": "string" + }, + "name": { + "type": "string" + }, + "tag": { + "description": "If specified, the virtual network interface address and its tag will be provided to the guest via config drive", + "type": "string" + } + } + }, + "v1VmHostDisk": { + "description": "Represents a disk created on the cluster level", + "type": "object", + "required": [ + "path", + "type" + ], + "properties": { + "capacity": { + "$ref": "#/definitions/v1VmQuantity" + }, + "path": { + "description": "The path to HostDisk image located on the cluster", + "type": "string" + }, + "shared": { + "description": "Shared indicate whether the path is shared between nodes", + "type": "boolean" + }, + "type": { + "description": "Contains information if disk.img exists or should be created allowed options are 'Disk' and 'DiskOrCreate'", + "type": "string" + } + } + }, + "v1VmHotplugVolumeSource": { + "description": "HotplugVolumeSource Represents the source of a volume to mount which are capable of being hotplugged on a live running VMI. Only one of its members may be specified.", + "type": "object", + "properties": { + "dataVolume": { + "$ref": "#/definitions/v1VmCoreDataVolumeSource" + }, + "persistentVolumeClaim": { + "$ref": "#/definitions/v1VmPersistentVolumeClaimVolumeSource" + } + } + }, + "v1VmHttpGetAction": { + "description": "HTTPGetAction describes an action based on HTTP Get requests.", + "type": "object", + "required": [ + "port" + ], + "properties": { + "host": { + "description": "Host name to connect to, defaults to the pod IP. You probably want to set \"Host\" in httpHeaders instead.", + "type": "string" + }, + "httpHeaders": { + "description": "Custom headers to set in the request. HTTP allows repeated headers.", + "type": "array", + "items": { + "$ref": "#/definitions/v1VmHttpHeader" + } + }, + "path": { + "description": "Path to access on the HTTP server.", + "type": "string" + }, + "port": { + "description": "Name or number of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME.", + "type": [ + "string", + "number" + ] + }, + "scheme": { + "description": "Scheme to use for connecting to the host. Defaults to HTTP.", + "type": "string" + } + } + }, + "v1VmHttpHeader": { + "description": "HTTPHeader describes a custom header to be used in HTTP probes", + "type": "object", + "required": [ + "name", + "value" + ], + "properties": { + "name": { + "description": "The header field name", + "type": "string" + }, + "value": { + "description": "The header field value", + "type": "string" + } + } + }, + "v1VmHugepages": { + "description": "Hugepages allow to use hugepages for the VirtualMachineInstance instead of regular memory.", + "type": "object", + "properties": { + "pageSize": { + "description": "PageSize specifies the hugepage size, for x86_64 architecture valid values are 1Gi and 2Mi.", + "type": "string" + } + } + }, + "v1VmHypervTimer": { + "type": "object", + "properties": { + "present": { + "description": "Enabled set to false makes sure that the machine type or a preset can't add the timer. Defaults to true.", + "type": "boolean" + } + } + }, + "v1VmI6300ESBWatchdog": { + "description": "i6300esb watchdog device.", + "type": "object", + "properties": { + "action": { + "description": "The action to take. Valid values are poweroff, reset, shutdown. Defaults to reset.", + "type": "string" + } + } + }, + "v1VmInput": { + "type": "object", + "required": [ + "type", + "name" + ], + "properties": { + "bus": { + "description": "Bus indicates the bus of input device to emulate. Supported values: virtio, usb.", + "type": "string" + }, + "name": { + "description": "Name is the device name", + "type": "string" + }, + "type": { + "description": "Type indicated the type of input device. Supported values: tablet.", + "type": "string" + } + } + }, + "v1VmInstancetypeMatcher": { + "description": "InstancetypeMatcher references a instancetype that is used to fill fields in the VMI template.", + "type": "object", + "properties": { + "inferFromVolume": { + "description": "InferFromVolume lists the name of a volume that should be used to infer or discover the instancetype to be used through known annotations on the underlying resource. Once applied to the InstancetypeMatcher this field is removed.", + "type": "string" + }, + "kind": { + "description": "Kind specifies which instancetype resource is referenced. Allowed values are: \"VirtualMachineInstancetype\" and \"VirtualMachineClusterInstancetype\". If not specified, \"VirtualMachineClusterInstancetype\" is used by default.", + "type": "string" + }, + "name": { + "description": "Name is the name of the VirtualMachineInstancetype or VirtualMachineClusterInstancetype", + "type": "string" + }, + "revisionName": { + "description": "RevisionName specifies a ControllerRevision containing a specific copy of the VirtualMachineInstancetype or VirtualMachineClusterInstancetype to be used. This is initially captured the first time the instancetype is applied to the VirtualMachineInstance.", + "type": "string" + } + } + }, + "v1VmInterface": { + "type": "object", + "required": [ + "name" + ], + "properties": { + "acpiIndex": { + "description": "If specified, the ACPI index is used to provide network interface device naming, that is stable across changes in PCI addresses assigned to the device. This value is required to be unique across all devices and be between 1 and (16*1024-1).", + "type": "integer", + "format": "int32" + }, + "bootOrder": { + "description": "BootOrder is an integer value \u003e 0, used to determine ordering of boot devices. Lower values take precedence. Each interface or disk that has a boot order must have a unique value. Interfaces without a boot order are not tried.", + "type": "integer", + "format": "int32" + }, + "bridge": { + "$ref": "#/definitions/v1VmInterfaceBridge" + }, + "dhcpOptions": { + "$ref": "#/definitions/v1VmDHCPOptions" + }, + "macAddress": { + "description": "Interface MAC address. For example: de:ad:00:00:be:af or DE-AD-00-00-BE-AF.", + "type": "string" + }, + "macvtap": { + "$ref": "#/definitions/v1VmInterfaceMacvtap" + }, + "masquerade": { + "$ref": "#/definitions/v1VmInterfaceMasquerade" + }, + "model": { + "description": "Interface model. One of: e1000, e1000e, ne2k_pci, pcnet, rtl8139, virtio. Defaults to virtio.", + "type": "string" + }, + "name": { + "description": "Logical name of the interface as well as a reference to the associated networks. Must match the Name of a Network.", + "type": "string" + }, + "passt": { + "$ref": "#/definitions/v1VmInterfacePasst" + }, + "pciAddress": { + "description": "If specified, the virtual network interface will be placed on the guests pci address with the specified PCI address. For example: 0000:81:01.10", + "type": "string" + }, + "ports": { + "description": "List of ports to be forwarded to the virtual machine.", + "type": "array", + "items": { + "$ref": "#/definitions/v1VmPort" + } + }, + "slirp": { + "$ref": "#/definitions/v1VmInterfaceSlirp" + }, + "sriov": { + "$ref": "#/definitions/v1VmInterfaceSRIOV" + }, + "tag": { + "description": "If specified, the virtual network interface address and its tag will be provided to the guest via config drive", + "type": "string" + } + } + }, + "v1VmInterfaceBridge": { + "description": "InterfaceBridge connects to a given network via a linux bridge.", + "type": "object" + }, + "v1VmInterfaceMacvtap": { + "description": "InterfaceMacvtap connects to a given network by extending the Kubernetes node's L2 networks via a macvtap interface.", + "type": "object" + }, + "v1VmInterfaceMasquerade": { + "description": "InterfaceMasquerade connects to a given network using netfilter rules to nat the traffic.", + "type": "object" + }, + "v1VmInterfacePasst": { + "description": "InterfacePasst connects to a given network.", + "type": "object" + }, + "v1VmInterfaceSRIOV": { + "description": "InterfaceSRIOV connects to a given network by passing-through an SR-IOV PCI device via vfio.", + "type": "object" + }, + "v1VmInterfaceSlirp": { + "description": "InterfaceSlirp connects to a given network using QEMU user networking mode.", + "type": "object" + }, + "v1VmKVmTimer": { + "type": "object", + "properties": { + "present": { + "description": "Enabled set to false makes sure that the machine type or a preset can't add the timer. Defaults to true.", + "type": "boolean" + } + } + }, + "v1VmKernelBoot": { + "description": "Represents the firmware blob used to assist in the kernel boot process. Used for setting the kernel, initrd and command line arguments", + "type": "object", + "properties": { + "container": { + "$ref": "#/definitions/v1VmKernelBootContainer" + }, + "kernelArgs": { + "description": "Arguments to be passed to the kernel at boot time", + "type": "string" + } + } + }, + "v1VmKernelBootContainer": { + "description": "If set, the VM will be booted from the defined kernel / initrd.", + "type": "object", + "required": [ + "image" + ], + "properties": { + "image": { + "description": "Image that contains initrd / kernel files.", + "type": "string" + }, + "imagePullPolicy": { + "description": "Image pull policy. One of Always, Never, IfNotPresent. Defaults to Always if :latest tag is specified, or IfNotPresent otherwise. Cannot be updated. More info: https://kubernetes.io/docs/concepts/containers/images#updating-images", + "type": "string" + }, + "imagePullSecret": { + "description": "ImagePullSecret is the name of the Docker registry secret required to pull the image. The secret must already exist.", + "type": "string" + }, + "initrdPath": { + "description": "the fully-qualified path to the ramdisk image in the host OS", + "type": "string" + }, + "kernelPath": { + "description": "The fully-qualified path to the kernel image in the host OS", + "type": "string" + } + } + }, + "v1VmLabelSelector": { + "description": "A label selector is a label query over a set of resources. The result of matchLabels and matchExpressions are ANDed. An empty label selector matches all objects. A null label selector matches no objects.", + "type": "object", + "properties": { + "matchExpressions": { + "description": "matchExpressions is a list of label selector requirements. The requirements are ANDed.", + "type": "array", + "items": { + "$ref": "#/definitions/v1VmLabelSelectorRequirement" + } + }, + "matchLabels": { + "description": "matchLabels is a map of key-value pairs. A single key-value in the matchLabels map is equivalent to an element of matchExpressions, whose key field is \"key\", the operator is \"In\", and the values array contains only \"value\". The requirements are ANDed.", + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + }, + "v1VmLabelSelectorRequirement": { + "description": "A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values.", + "type": "object", + "required": [ + "key", + "operator" + ], + "properties": { + "key": { + "description": "key is the label key that the selector applies to.", + "type": "string", + "x-kubernetes-patch-merge-key": "key", + "x-kubernetes-patch-strategy": "merge" + }, + "operator": { + "description": "operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.", + "type": "string" + }, + "values": { + "description": "values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch.", + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "v1VmLaunchSecurity": { + "type": "object", + "properties": { + "sev": { + "$ref": "#/definitions/v1VmSEV" + } + } + }, + "v1VmListMeta": { + "description": "ListMeta describes metadata that synthetic resources must have, including lists and various status objects. A resource may have only one of {ObjectMeta, ListMeta}.", + "type": "object", + "properties": { + "continue": { + "description": "continue may be set if the user set a limit on the number of items returned, and indicates that the server has more data available. The value is opaque and may be used to issue another request to the endpoint that served this list to retrieve the next set of available objects. Continuing a consistent list may not be possible if the server configuration has changed or more than a few minutes have passed. The resourceVersion field returned when using this continue value will be identical to the value in the first response, unless you have received this token from an error message.", + "type": "string" + }, + "remainingItemCount": { + "description": "remainingItemCount is the number of subsequent items in the list which are not included in this list response. If the list request contained label or field selectors, then the number of remaining items is unknown and the field will be left unset and omitted during serialization. If the list is complete (either because it is not chunking or because this is the last chunk), then there are no more remaining items and this field will be left unset and omitted during serialization. Servers older than v1.15 do not set this field. The intended use of the remainingItemCount is *estimating* the size of a collection. Clients should not rely on the remainingItemCount to be set or to be exact.", + "type": "integer", + "format": "int64" + }, + "resourceVersion": { + "description": "String that identifies the server's internal version of this object that can be used by clients to determine when objects have changed. Value must be treated as opaque by clients and passed unmodified back to the server. Populated by the system. Read-only.", + "type": "string" + }, + "selfLink": { + "description": "selfLink is a URL representing this object. Populated by the system. Read-only.\n\nDEPRECATED Kubernetes will stop propagating this field in 1.20 release and the field is planned to be removed in 1.21 release.", + "type": "string" + } + } + }, + "v1VmLocalObjectReference": { + "description": "LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace.", + "type": "object", + "properties": { + "name": { + "description": "Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names", + "type": "string" + } + } + }, + "v1VmLunTarget": { + "type": "object", + "properties": { + "bus": { + "description": "Bus indicates the type of disk device to emulate. supported values: virtio, sata, scsi.", + "type": "string" + }, + "readonly": { + "description": "ReadOnly. Defaults to false.", + "type": "boolean" + } + } + }, + "v1VmMachine": { + "type": "object", + "properties": { + "type": { + "description": "QEMU machine type is the actual chipset of the VirtualMachineInstance.", + "type": "string" + } + } + }, + "v1VmManagedFieldsEntry": { + "description": "ManagedFieldsEntry is a workflow-id, a FieldSet and the group version of the resource that the fieldset applies to.", + "type": "object", + "properties": { + "apiVersion": { + "description": "APIVersion defines the version of this resource that this field set applies to. The format is \"group/version\" just like the top-level APIVersion field. It is necessary to track the version of a field set because it cannot be automatically converted.", + "type": "string" + }, + "fieldsType": { + "description": "FieldsType is the discriminator for the different fields format and version. There is currently only one possible value: \"FieldsV1\"", + "type": "string" + }, + "fieldsV1": { + "$ref": "#/definitions/v1VmFieldsV1" + }, + "manager": { + "description": "Manager is an identifier of the workflow managing these fields.", + "type": "string" + }, + "operation": { + "description": "Operation is the type of operation which lead to this ManagedFieldsEntry being created. The only valid values for this field are 'Apply' and 'Update'.", + "type": "string" + }, + "subresource": { + "description": "Subresource is the name of the subresource used to update that object, or empty string if the object was updated through the main resource. The value of this field is used to distinguish between managers, even if they share the same name. For example, a status update will be distinct from a regular update using the same manager name. Note that the APIVersion field is not related to the Subresource field and it always corresponds to the version of the main resource.", + "type": "string" + }, + "time": { + "$ref": "#/definitions/v1Time" + } + } + }, + "v1VmMemory": { + "description": "Memory allows specifying the VirtualMachineInstance memory features.", + "type": "object", + "properties": { + "guest": { + "$ref": "#/definitions/v1VmQuantity" + }, + "hugepages": { + "$ref": "#/definitions/v1VmHugepages" + } + } + }, + "v1VmMemoryDumpVolumeSource": { + "type": "object", + "required": [ + "claimName" + ], + "properties": { + "claimName": { + "description": "ClaimName is the name of a PersistentVolumeClaim in the same namespace as the pod using this volume. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims", + "type": "string" + }, + "hotpluggable": { + "description": "Hotpluggable indicates whether the volume can be hotplugged and hotunplugged.", + "type": "boolean" + }, + "readOnly": { + "description": "Will force the ReadOnly setting in VolumeMounts. Default false.", + "type": "boolean" + } + } + }, + "v1VmMultusNetwork": { + "description": "Represents the multus cni network.", + "type": "object", + "required": [ + "networkName" + ], + "properties": { + "default": { + "description": "Select the default network and add it to the multus-cni.io/default-network annotation.", + "type": "boolean" + }, + "networkName": { + "description": "References to a NetworkAttachmentDefinition CRD object. Format: \u003cnetworkName\u003e, \u003cnamespace\u003e/\u003cnetworkName\u003e. If namespace is not specified, VMI namespace is assumed.", + "type": "string" + } + } + }, + "v1VmNUMA": { + "type": "object", + "properties": { + "guestMappingPassthrough": { + "$ref": "#/definitions/v1VmNUMAGuestMappingPassthrough" + } + } + }, + "v1VmNUMAGuestMappingPassthrough": { + "description": "NUMAGuestMappingPassthrough instructs kubevirt to model numa topology which is compatible with the CPU pinning on the guest. This will result in a subset of the node numa topology being passed through, ensuring that virtual numa nodes and their memory never cross boundaries coming from the node numa mapping.", + "type": "object" + }, + "v1VmNetwork": { + "description": "Network represents a network type and a resource that should be connected to the vm.", + "type": "object", + "required": [ + "name" + ], + "properties": { + "multus": { + "$ref": "#/definitions/v1VmMultusNetwork" + }, + "name": { + "description": "Network name. Must be a DNS_LABEL and unique within the vm. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names", + "type": "string" + }, + "pod": { + "$ref": "#/definitions/v1VmPodNetwork" + } + } + }, + "v1VmNodeAffinity": { + "description": "Node affinity is a group of node affinity scheduling rules.", + "type": "object", + "properties": { + "preferredDuringSchedulingIgnoredDuringExecution": { + "description": "The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding \"weight\" to the sum if the node matches the corresponding matchExpressions; the node(s) with the highest sum are the most preferred.", + "type": "array", + "items": { + "$ref": "#/definitions/v1VmPreferredSchedulingTerm" + } + }, + "requiredDuringSchedulingIgnoredDuringExecution": { + "$ref": "#/definitions/v1VmNodeSelector" + } + } + }, + "v1VmNodeSelector": { + "description": "A node selector represents the union of the results of one or more label queries over a set of nodes; that is, it represents the OR of the selectors represented by the node selector terms.", + "type": "object", + "required": [ + "nodeSelectorTerms" + ], + "properties": { + "nodeSelectorTerms": { + "description": "Required. A list of node selector terms. The terms are ORed.", + "type": "array", + "items": { + "$ref": "#/definitions/v1VmNodeSelectorTerm" + } + } + } + }, + "v1VmNodeSelectorRequirement": { + "description": "A node selector requirement is a selector that contains values, a key, and an operator that relates the key and values.", + "type": "object", + "required": [ + "key", + "operator" + ], + "properties": { + "key": { + "description": "The label key that the selector applies to.", + "type": "string" + }, + "operator": { + "description": "Represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt.", + "type": "string" + }, + "values": { + "description": "An array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. If the operator is Gt or Lt, the values array must have a single element, which will be interpreted as an integer. This array is replaced during a strategic merge patch.", + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "v1VmNodeSelectorTerm": { + "description": "A null or empty node selector term matches no objects. The requirements of them are ANDed. The TopologySelectorTerm type implements a subset of the NodeSelectorTerm.", + "type": "object", + "properties": { + "matchExpressions": { + "description": "A list of node selector requirements by node's labels.", + "type": "array", + "items": { + "$ref": "#/definitions/v1VmNodeSelectorRequirement" + } + }, + "matchFields": { + "description": "A list of node selector requirements by node's fields.", + "type": "array", + "items": { + "$ref": "#/definitions/v1VmNodeSelectorRequirement" + } + } + } + }, + "v1VmObjectFieldSelector": { + "description": "ObjectFieldSelector selects an APIVersioned field of an object.", + "type": "object", + "required": [ + "fieldPath" + ], + "properties": { + "apiVersion": { + "description": "Version of the schema the FieldPath is written in terms of, defaults to \"v1\".", + "type": "string" + }, + "fieldPath": { + "description": "Path of the field to select in the specified API version.", + "type": "string" + } + } + }, + "v1VmObjectMeta": { + "description": "ObjectMeta is metadata that all persisted resources must have, which includes all objects users must create.", + "type": "object", + "properties": { + "annotations": { + "description": "Annotations is an unstructured key value map stored with a resource that may be set by external tools to store and retrieve arbitrary metadata. They are not queryable and should be preserved when modifying objects. More info: http://kubernetes.io/docs/user-guide/annotations", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "clusterName": { + "description": "The name of the cluster which the object belongs to. This is used to distinguish resources with same name and namespace in different clusters. This field is not set anywhere right now and apiserver is going to ignore it if set in create or update request.", + "type": "string" + }, + "creationTimestamp": { + "description": "CreationTimestamp is a timestamp representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations. Clients may not set this value. It is represented in RFC3339 form and is in UTC.\n\nPopulated by the system. Read-only. Null for lists. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + "type": "string" + }, + "deletionGracePeriodSeconds": { + "description": "Number of seconds allowed for this object to gracefully terminate before it will be removed from the system. Only set when deletionTimestamp is also set. May only be shortened. Read-only.", + "type": "integer", + "format": "int64" + }, + "deletionTimestamp": { + "description": "DeletionTimestamp is RFC 3339 date and time at which this resource will be deleted. This field is set by the server when a graceful deletion is requested by the user, and is not directly settable by a client. The resource is expected to be deleted (no longer visible from resource lists, and not reachable by name) after the time in this field, once the finalizers list is empty. As long as the finalizers list contains items, deletion is blocked. Once the deletionTimestamp is set, this value may not be unset or be set further into the future, although it may be shortened or the resource may be deleted prior to this time. For example, a user may request that a pod is deleted in 30 seconds. The Kubelet will react by sending a graceful termination signal to the containers in the pod. After that 30 seconds, the Kubelet will send a hard termination signal (SIGKILL) to the container and after cleanup, remove the pod from the API. In the presence of network partitions, this object may still exist after this timestamp, until an administrator or automated process can determine the resource is fully terminated. If not set, graceful deletion of the object has not been requested.\n\nPopulated by the system when a graceful deletion is requested. Read-only. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + "type": "string", + "format": "date-time", + "x-nullable": true + }, + "finalizers": { + "description": "Must be empty before the object is deleted from the registry. Each entry is an identifier for the responsible component that will remove the entry from the list. If the deletionTimestamp of the object is non-nil, entries in this list can only be removed. Finalizers may be processed and removed in any order. Order is NOT enforced because it introduces significant risk of stuck finalizers. finalizers is a shared field, any actor with permission can reorder it. If the finalizer list is processed in order, then this can lead to a situation in which the component responsible for the first finalizer in the list is waiting for a signal (field value, external system, or other) produced by a component responsible for a finalizer later in the list, resulting in a deadlock. Without enforced ordering finalizers are free to order amongst themselves and are not vulnerable to ordering changes in the list.", + "type": "array", + "items": { + "type": "string" + }, + "x-kubernetes-patch-strategy": "merge" + }, + "generateName": { + "description": "GenerateName is an optional prefix, used by the server, to generate a unique name ONLY IF the Name field has not been provided. If this field is used, the name returned to the client will be different than the name passed. This value will also be combined with a unique suffix. The provided value has the same validation rules as the Name field, and may be truncated by the length of the suffix required to make the value unique on the server.\n\nIf this field is specified and the generated name exists, the server will NOT return a 409 - instead, it will either return 201 Created or 500 with Reason ServerTimeout indicating a unique name could not be found in the time allotted, and the client should retry (optionally after the time indicated in the Retry-After header).\n\nApplied only if Name is not specified.", + "type": "string" + }, + "generation": { + "description": "A sequence number representing a specific generation of the desired state. Populated by the system. Read-only.", + "type": "integer", + "format": "int64" + }, + "labels": { + "description": "Map of string keys and values that can be used to organize and categorize (scope and select) objects. May match selectors of replication controllers and services. More info: http://kubernetes.io/docs/user-guide/labels", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "managedFields": { + "description": "ManagedFields maps workflow-id and version to the set of fields that are managed by that workflow. This is mostly for internal housekeeping, and users typically shouldn't need to set or understand this field. A workflow can be the user's name, a controller's name, or the name of a specific apply path like \"ci-cd\". The set of fields is always in the version that the workflow used when modifying the object.", + "type": "array", + "items": { + "$ref": "#/definitions/v1VmManagedFieldsEntry" + } + }, + "name": { + "description": "Name must be unique within a namespace. Is required when creating resources, although some resources may allow a client to request the generation of an appropriate name automatically. Name is primarily intended for creation idempotence and configuration definition. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/identifiers#names", + "type": "string" + }, + "namespace": { + "description": "Namespace defines the space within which each name must be unique. An empty namespace is equivalent to the \"default\" namespace, but \"default\" is the canonical representation. Not all objects are required to be scoped to a namespace - the value of this field for those objects will be empty.\nMust be a DNS_LABEL. Cannot be updated.", + "type": "string" + }, + "ownerReferences": { + "description": "List of objects depended by this object. If ALL objects in the list have been deleted, this object will be garbage collected. If this object is managed by a controller, then an entry in this list will point to this controller, with the controller field set to true. There cannot be more than one managing controller.", + "type": "array", + "items": { + "$ref": "#/definitions/v1VmOwnerReference" + }, + "x-kubernetes-patch-merge-key": "uid", + "x-kubernetes-patch-strategy": "merge" + }, + "resourceVersion": { + "description": "An opaque value that represents the internal version of this object that can be used by clients to determine when objects have changed. May be used for optimistic concurrency, change detection, and the watch operation on a resource or set of resources. Clients must treat these values as opaque and passed unmodified back to the server. They may only be valid for a particular resource or set of resources.\nPopulated by the system. Read-only. Value must be treated as opaque by clients.", + "type": "string" + }, + "selfLink": { + "description": "SelfLink is a URL representing this object. Populated by the system. Read-only.\nDEPRECATED Kubernetes will stop propagating this field in 1.20 release and the field is planned to be removed in 1.21 release.", + "type": "string" + }, + "uid": { + "description": "UID is the unique in time and space value for this object. It is typically generated by the server on successful creation of a resource and is not allowed to change on PUT operations.\nPopulated by the system. Read-only.", + "type": "string" + } + } + }, + "v1VmOwnerReference": { + "description": "OwnerReference contains enough information to let you identify an owning object. An owning object must be in the same namespace as the dependent, or be cluster-scoped, so there is no namespace field.", + "type": "object", + "required": [ + "apiVersion", + "kind", + "name", + "uid" + ], + "properties": { + "apiVersion": { + "description": "API version of the referent.", + "type": "string" + }, + "blockOwnerDeletion": { + "description": "If true, AND if the owner has the \"foregroundDeletion\" finalizer, then the owner cannot be deleted from the key-value store until this reference is removed. Defaults to false. To set this field, a user needs \"delete\" permission of the owner, otherwise 422 (Unprocessable Entity) will be returned.", + "type": "boolean" + }, + "controller": { + "description": "If true, this reference points to the managing controller.", + "type": "boolean" + }, + "kind": { + "description": "Kind of the referent.", + "type": "string" + }, + "name": { + "description": "Name of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#names", + "type": "string" + }, + "uid": { + "description": "UID of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#uids", + "type": "string" + } + } + }, + "v1VmPITTimer": { + "type": "object", + "properties": { + "present": { + "description": "Enabled set to false makes sure that the machine type or a preset can't add the timer. Defaults to true.", + "type": "boolean" + }, + "tickPolicy": { + "description": "TickPolicy determines what happens when QEMU misses a deadline for injecting a tick to the guest. One of \"delay\", \"catchup\", \"discard\".", + "type": "string" + } + } + }, + "v1VmPersistentVolumeClaimSpec": { + "description": "PersistentVolumeClaimSpec describes the common attributes of storage devices and allows a Source for provider-specific attributes", + "type": "object", + "properties": { + "accessModes": { + "description": "AccessModes contains the desired access modes the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1", + "type": "array", + "items": { + "type": "string" + } + }, + "dataSource": { + "$ref": "#/definitions/v1VmTypedLocalObjectReference" + }, + "dataSourceRef": { + "$ref": "#/definitions/v1VmTypedLocalObjectReference" + }, + "resources": { + "$ref": "#/definitions/v1VmCoreResourceRequirements" + }, + "selector": { + "$ref": "#/definitions/v1VmLabelSelector" + }, + "storageClassName": { + "description": "Name of the StorageClass required by the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1", + "type": "string" + }, + "volumeMode": { + "description": "volumeMode defines what type of volume is required by the claim. Value of Filesystem is implied when not included in claim spec.", + "type": "string" + }, + "volumeName": { + "description": "VolumeName is the binding reference to the PersistentVolume backing this claim.", + "type": "string" + } + } + }, + "v1VmPersistentVolumeClaimVolumeSource": { + "description": "PersistentVolumeClaimVolumeSource represents a reference to a PersistentVolumeClaim in the same namespace. Directly attached to the vmi via qemu. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims", + "type": "object", + "required": [ + "claimName" + ], + "properties": { + "claimName": { + "description": "ClaimName is the name of a PersistentVolumeClaim in the same namespace as the pod using this volume. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims", + "type": "string" + }, + "hotpluggable": { + "description": "Hotpluggable indicates whether the volume can be hotplugged and hotunplugged.", + "type": "boolean" + }, + "readOnly": { + "description": "Will force the ReadOnly setting in VolumeMounts. Default false.", + "type": "boolean" + } + } + }, + "v1VmPodAffinity": { + "description": "Pod affinity is a group of inter pod affinity scheduling rules.", + "type": "object", + "properties": { + "preferredDuringSchedulingIgnoredDuringExecution": { + "description": "The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding \"weight\" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred.", + "type": "array", + "items": { + "$ref": "#/definitions/v1VmWeightedPodAffinityTerm" + } + }, + "requiredDuringSchedulingIgnoredDuringExecution": { + "description": "If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied.", + "type": "array", + "items": { + "$ref": "#/definitions/v1VmPodAffinityTerm" + } + } + } + }, + "v1VmPodAffinityTerm": { + "description": "Defines a set of pods (namely those matching the labelSelector relative to the given namespace(s)) that this pod should be co-located (affinity) or not co-located (anti-affinity) with, where co-located is defined as running on a node whose value of the label with key \u003ctopologyKey\u003e matches that of any node on which a pod of the set of pods is running", + "type": "object", + "required": [ + "topologyKey" + ], + "properties": { + "labelSelector": { + "$ref": "#/definitions/v1VmLabelSelector" + }, + "namespaceSelector": { + "$ref": "#/definitions/v1VmLabelSelector" + }, + "namespaces": { + "description": "namespaces specifies a static list of namespace names that the term applies to. The term is applied to the union of the namespaces listed in this field and the ones selected by namespaceSelector. null or empty namespaces list and null namespaceSelector means \"this pod's namespace\"", + "type": "array", + "items": { + "type": "string" + } + }, + "topologyKey": { + "description": "This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching the labelSelector in the specified namespaces, where co-located is defined as running on a node whose value of the label with key topologyKey matches that of any node on which any of the selected pods is running. Empty topologyKey is not allowed.", + "type": "string" + } + } + }, + "v1VmPodDnsConfig": { + "description": "PodDNSConfig defines the DNS parameters of a pod in addition to those generated from DNSPolicy.", + "type": "object", + "properties": { + "nameservers": { + "description": "A list of DNS name server IP addresses. This will be appended to the base nameservers generated from DNSPolicy. Duplicated nameservers will be removed.", + "type": "array", + "items": { + "type": "string" + } + }, + "options": { + "description": "A list of DNS resolver options. This will be merged with the base options generated from DNSPolicy. Duplicated entries will be removed. Resolution options given in Options will override those that appear in the base DNSPolicy.", + "type": "array", + "items": { + "$ref": "#/definitions/v1VmPodDnsConfigOption" + } + }, + "searches": { + "description": "A list of DNS search domains for host-name lookup. This will be appended to the base search paths generated from DNSPolicy. Duplicated search paths will be removed.", + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "v1VmPodDnsConfigOption": { + "description": "PodDNSConfigOption defines DNS resolver options of a pod.", + "type": "object", + "properties": { + "name": { + "description": "Required.", + "type": "string" + }, + "value": { + "type": "string" + } + } + }, + "v1VmPodNetwork": { + "description": "Represents the stock pod network interface.", + "type": "object", + "properties": { + "vmIPv6NetworkCIDR": { + "description": "IPv6 CIDR for the vm network. Defaults to fd10:0:2::/120 if not specified.", + "type": "string" + }, + "vmNetworkCIDR": { + "description": "CIDR for vm network. Default 10.0.2.0/24 if not specified.", + "type": "string" + } + } + }, + "v1VmPort": { + "description": "Port represents a port to expose from the virtual machine. Default protocol TCP. The port field is mandatory", + "type": "object", + "required": [ + "port" + ], + "properties": { + "name": { + "description": "If specified, this must be an IANA_SVC_NAME and unique within the pod. Each named port in a pod must have a unique name. Name for the port that can be referred to by services.", + "type": "string" + }, + "port": { + "description": "Number of port to expose for the virtual machine. This must be a valid port number, 0 \u003c x \u003c 65536.", + "type": "integer", + "format": "int32" + }, + "protocol": { + "description": "Protocol for port. Must be UDP or TCP. Defaults to \"TCP\".", + "type": "string" + } + } + }, + "v1VmPreferenceMatcher": { + "description": "PreferenceMatcher references a set of preference that is used to fill fields in the VMI template.", + "type": "object", + "properties": { + "inferFromVolume": { + "description": "InferFromVolume lists the name of a volume that should be used to infer or discover the preference to be used through known annotations on the underlying resource. Once applied to the PreferenceMatcher this field is removed.", + "type": "string" + }, + "kind": { + "description": "Kind specifies which preference resource is referenced. Allowed values are: \"VirtualMachinePreference\" and \"VirtualMachineClusterPreference\". If not specified, \"VirtualMachineClusterPreference\" is used by default.", + "type": "string" + }, + "name": { + "description": "Name is the name of the VirtualMachinePreference or VirtualMachineClusterPreference", + "type": "string" + }, + "revisionName": { + "description": "RevisionName specifies a ControllerRevision containing a specific copy of the VirtualMachinePreference or VirtualMachineClusterPreference to be used. This is initially captured the first time the instancetype is applied to the VirtualMachineInstance.", + "type": "string" + } + } + }, + "v1VmPreferredSchedulingTerm": { + "description": "An empty preferred scheduling term matches all objects with implicit weight 0 (i.e. it's a no-op). A null preferred scheduling term matches no objects (i.e. is also a no-op).", + "type": "object", + "required": [ + "weight", + "preference" + ], + "properties": { + "preference": { + "$ref": "#/definitions/v1VmNodeSelectorTerm" + }, + "weight": { + "description": "Weight associated with matching the corresponding nodeSelectorTerm, in the range 1-100.", + "type": "integer", + "format": "int32" + } + } + }, + "v1VmProbe": { + "description": "Probe describes a health check to be performed against a VirtualMachineInstance to determine whether it is alive or ready to receive traffic.", + "type": "object", + "properties": { + "exec": { + "$ref": "#/definitions/v1VmExecAction" + }, + "failureThreshold": { + "description": "Minimum consecutive failures for the probe to be considered failed after having succeeded. Defaults to 3. Minimum value is 1.", + "type": "integer", + "format": "int32" + }, + "guestAgentPing": { + "$ref": "#/definitions/v1VmGuestAgentPing" + }, + "httpGet": { + "$ref": "#/definitions/v1VmHttpGetAction" + }, + "initialDelaySeconds": { + "description": "Number of seconds after the VirtualMachineInstance has started before liveness probes are initiated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes", + "type": "integer", + "format": "int32" + }, + "periodSeconds": { + "description": "How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1.", + "type": "integer", + "format": "int32" + }, + "successThreshold": { + "description": "Minimum consecutive successes for the probe to be considered successful after having failed. Defaults to 1. Must be 1 for liveness. Minimum value is 1.", + "type": "integer", + "format": "int32" + }, + "tcpSocket": { + "$ref": "#/definitions/v1VmTcpSocketAction" + }, + "timeoutSeconds": { + "description": "Number of seconds after which the probe times out. For exec probes the timeout fails the probe but does not terminate the command running on the guest. This means a blocking command can result in an increasing load on the guest. A small buffer will be added to the resulting workload exec probe to compensate for delays caused by the qemu guest exec mechanism. Defaults to 1 second. Minimum value is 1. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes", + "type": "integer", + "format": "int32" + } + } + }, + "v1VmQemuGuestAgentSshPublicKeyAccessCredentialPropagation": { + "type": "object", + "required": [ + "users" + ], + "properties": { + "users": { + "description": "Users represents a list of guest users that should have the ssh public keys added to their authorized_keys file.", + "type": "array", + "items": { + "type": "string" + }, + "x-kubernetes-list-type": "set" + } + } + }, + "v1VmQemuGuestAgentUserPasswordAccessCredentialPropagation": { + "type": "object" + }, + "v1VmQuantity": { + "description": "Quantity is a fixed-point representation of a number. It provides convenient marshaling/unmarshaling in JSON and YAML, in addition to String() and AsInt64() accessors.\n\nThe serialization format is:\n\n\u003cquantity\u003e ::= \u003csignedNumber\u003e\u003csuffix\u003e\n (Note that \u003csuffix\u003e may be empty, from the \"\" case in \u003cdecimalSI\u003e.)\n\u003cdigit\u003e ::= 0 | 1 | ... | 9 \u003cdigits\u003e ::= \u003cdigit\u003e | \u003cdigit\u003e\u003cdigits\u003e \u003cnumber\u003e ::= \u003cdigits\u003e | \u003cdigits\u003e.\u003cdigits\u003e | \u003cdigits\u003e. | .\u003cdigits\u003e \u003csign\u003e ::= \"+\" | \"-\" \u003csignedNumber\u003e ::= \u003cnumber\u003e | \u003csign\u003e\u003cnumber\u003e \u003csuffix\u003e ::= \u003cbinarySI\u003e | \u003cdecimalExponent\u003e | \u003cdecimalSI\u003e \u003cbinarySI\u003e ::= Ki | Mi | Gi | Ti | Pi | Ei\n (International System of units; See: http://physics.nist.gov/cuu/Units/binary.html)\n\u003cdecimalSI\u003e ::= m | \"\" | k | M | G | T | P | E\n (Note that 1024 = 1Ki but 1000 = 1k; I didn't choose the capitalization.)\n\u003cdecimalExponent\u003e ::= \"e\" \u003csignedNumber\u003e | \"E\" \u003csignedNumber\u003e\n\nNo matter which of the three exponent forms is used, no quantity may represent a number greater than 2^63-1 in magnitude, nor may it have more than 3 decimal places. Numbers larger or more precise will be capped or rounded up. (E.g.: 0.1m will rounded up to 1m.) This may be extended in the future if we require larger or smaller quantities.\n\nWhen a Quantity is parsed from a string, it will remember the type of suffix it had, and will use the same type again when it is serialized.\n\nBefore serializing, Quantity will be put in \"canonical form\". This means that Exponent/suffix will be adjusted up or down (with a corresponding increase or decrease in Mantissa) such that:\n a. No precision is lost\n b. No fractional digits will be emitted\n c. The exponent (or suffix) is as large as possible.\nThe sign will be omitted unless the number is negative.\n\nExamples:\n 1.5 will be serialized as \"1500m\"\n 1.5Gi will be serialized as \"1536Mi\"\n\nNote that the quantity will NEVER be internally represented by a floating point number. That is the whole point of this exercise.\n\nNon-canonical values will still parse as long as they are well formed, but will be re-emitted in their canonical form. (So always use canonical form, or don't diff.)\n\nThis format is intended to make it difficult to use these numbers without writing some sort of special handling code in the hopes that that will cause implementors to also use a fixed point implementation.", + "type": "string" + }, + "v1VmRTCTimer": { + "type": "object", + "properties": { + "present": { + "description": "Enabled set to false makes sure that the machine type or a preset can't add the timer. Defaults to true.", + "type": "boolean" + }, + "tickPolicy": { + "description": "TickPolicy determines what happens when QEMU misses a deadline for injecting a tick to the guest. One of \"delay\", \"catchup\".", + "type": "string" + }, + "track": { + "description": "Track the guest or the wall clock.", + "type": "string" + } + } + }, + "v1VmRealtime": { + "description": "Realtime holds the tuning knobs specific for realtime workloads.", + "type": "object", + "properties": { + "mask": { + "description": "Mask defines the vcpu mask expression that defines which vcpus are used for realtime. Format matches libvirt's expressions. Example: \"0-3,^1\",\"0,2,3\",\"2-3\"", + "type": "string" + } + } + }, + "v1VmRemoveVolumeOptions": { + "description": "RemoveVolumeOptions is provided when dynamically hot unplugging volume and disk", + "type": "object", + "required": [ + "name" + ], + "properties": { + "dryRun": { + "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", + "type": "array", + "items": { + "type": "string" + }, + "x-kubernetes-list-type": "atomic" + }, + "name": { + "description": "Name represents the name that maps to both the disk and volume that should be removed", + "type": "string" + } + } + }, + "v1VmResourceFieldSelector": { + "description": "ResourceFieldSelector represents container resources (cpu, memory) and their output format", + "type": "object", + "required": [ + "resource" + ], + "properties": { + "containerName": { + "description": "Container name: required for volumes, optional for env vars", + "type": "string" + }, + "divisor": { + "$ref": "#/definitions/v1VmQuantity" + }, + "resource": { + "description": "Required: resource to select", + "type": "string" + } + } + }, + "v1VmResourceRequirements": { + "type": "object", + "properties": { + "limits": { + "description": "Limits describes the maximum amount of compute resources allowed. Valid resource keys are \"memory\" and \"cpu\".", + "type": "object" + }, + "overcommitGuestOverhead": { + "description": "Don't ask the scheduler to take the guest-management overhead into account. Instead put the overhead only into the container's memory limit. This can lead to crashes if all memory is in use on a node. Defaults to false.", + "type": "boolean" + }, + "requests": { + "description": "Requests is a description of the initial vmi resources. Valid resource keys are \"memory\" and \"cpu\".", + "type": "object" + } + } + }, + "v1VmRng": { + "description": "Rng represents the random device passed from host", + "type": "object" + }, + "v1VmSEV": { + "type": "object" + }, + "v1VmSecretVolumeSource": { + "description": "SecretVolumeSource adapts a Secret into a volume.", + "type": "object", + "properties": { + "optional": { + "description": "Specify whether the Secret or it's keys must be defined", + "type": "boolean" + }, + "secretName": { + "description": "Name of the secret in the pod's namespace to use. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret", + "type": "string" + }, + "volumeLabel": { + "description": "The volume label of the resulting disk inside the VMI. Different bootstrapping mechanisms require different values. Typical values are \"cidata\" (cloud-init), \"config-2\" (cloud-init) or \"OEMDRV\" (kickstart).", + "type": "string" + } + } + }, + "v1VmServiceAccountVolumeSource": { + "description": "ServiceAccountVolumeSource adapts a ServiceAccount into a volume.", + "type": "object", + "properties": { + "serviceAccountName": { + "description": "Name of the service account in the pod's namespace to use. More info: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/", + "type": "string" + } + } + }, + "v1VmSnapshotVolumesLists": { + "description": "SnapshotVolumesLists includes the list of volumes which were included in the snapshot and volumes which were excluded from the snapshot", + "type": "object", + "properties": { + "excludedVolumes": { + "type": "array", + "items": { + "type": "string" + }, + "x-kubernetes-list-type": "set" + }, + "includedVolumes": { + "type": "array", + "items": { + "type": "string" + }, + "x-kubernetes-list-type": "set" + } + } + }, + "v1VmSoundDevice": { + "description": "Represents the user's configuration to emulate sound cards in the VMI.", + "type": "object", + "required": [ + "name" + ], + "properties": { + "model": { + "description": "We only support ich9 or ac97. If SoundDevice is not set: No sound card is emulated. If SoundDevice is set but Model is not: ich9", + "type": "string" + }, + "name": { + "description": "User's defined name for this sound device", + "type": "string" + } + } + }, + "v1VmSshPublicKeyAccessCredential": { + "description": "SSHPublicKeyAccessCredential represents a source and propagation method for injecting ssh public keys into a vm guest", + "type": "object", + "required": [ + "source", + "propagationMethod" + ], + "properties": { + "propagationMethod": { + "$ref": "#/definitions/v1VmSshPublicKeyAccessCredentialPropagationMethod" + }, + "source": { + "$ref": "#/definitions/v1VmSshPublicKeyAccessCredentialSource" + } + } + }, + "v1VmSshPublicKeyAccessCredentialPropagationMethod": { + "description": "SSHPublicKeyAccessCredentialPropagationMethod represents the method used to inject a ssh public key into the vm guest. Only one of its members may be specified.", + "type": "object", + "properties": { + "configDrive": { + "$ref": "#/definitions/v1VmConfigDriveSshPublicKeyAccessCredentialPropagation" + }, + "qemuGuestAgent": { + "$ref": "#/definitions/v1VmQemuGuestAgentSshPublicKeyAccessCredentialPropagation" + } + } + }, + "v1VmSshPublicKeyAccessCredentialSource": { + "description": "SSHPublicKeyAccessCredentialSource represents where to retrieve the ssh key credentials Only one of its members may be specified.", + "type": "object", + "properties": { + "secret": { + "$ref": "#/definitions/v1VmAccessCredentialSecretSource" + } + } + }, + "v1VmStorageSpec": { + "description": "StorageSpec defines the Storage type specification", + "type": "object", + "properties": { + "accessModes": { + "description": "AccessModes contains the desired access modes the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1", + "type": "array", + "items": { + "type": "string" + } + }, + "dataSource": { + "$ref": "#/definitions/v1VmTypedLocalObjectReference" + }, + "resources": { + "$ref": "#/definitions/v1VmCoreResourceRequirements" + }, + "selector": { + "$ref": "#/definitions/v1VmLabelSelector" + }, + "storageClassName": { + "description": "Name of the StorageClass required by the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1", + "type": "string" + }, + "volumeMode": { + "description": "volumeMode defines what type of volume is required by the claim. Value of Filesystem is implied when not included in claim spec.", + "type": "string" + }, + "volumeName": { + "description": "VolumeName is the binding reference to the PersistentVolume backing this claim.", + "type": "string" + } + } + }, + "v1VmSyNICTimer": { + "type": "object", + "properties": { + "direct": { + "$ref": "#/definitions/v1VmFeatureState" + }, + "enabled": { + "type": "boolean" + } + } + }, + "v1VmSysprepSource": { + "description": "Represents a Sysprep volume source.", + "type": "object", + "properties": { + "configMap": { + "$ref": "#/definitions/v1VmLocalObjectReference" + }, + "secret": { + "$ref": "#/definitions/v1VmLocalObjectReference" + } + } + }, + "v1VmTPMDevice": { + "type": "object" + }, + "v1VmTcpSocketAction": { + "description": "TCPSocketAction describes an action based on opening a socket", + "type": "object", + "required": [ + "port" + ], + "properties": { + "host": { + "description": "Optional: Host name to connect to, defaults to the pod IP.", + "type": "string" + }, + "port": { + "description": "Number or name of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME.", + "type": [ + "string", + "number" + ] + } + } + }, + "v1VmTimer": { + "description": "Represents all available timers in a vmi.", + "type": "object", + "properties": { + "hpet": { + "$ref": "#/definitions/v1VmHPETTimer" + }, + "hyperv": { + "$ref": "#/definitions/v1VmHypervTimer" + }, + "kvm": { + "$ref": "#/definitions/v1VmKVmTimer" + }, + "pit": { + "$ref": "#/definitions/v1VmPITTimer" + }, + "rtc": { + "$ref": "#/definitions/v1VmRTCTimer" + } + } + }, + "v1VmToleration": { + "description": "The pod this Toleration is attached to tolerates any taint that matches the triple \u003ckey,value,effect\u003e using the matching operator \u003coperator\u003e.", + "type": "object", + "properties": { + "effect": { + "description": "Effect indicates the taint effect to match. Empty means match all taint effects. When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute.", + "type": "string" + }, + "key": { + "description": "Key is the taint key that the toleration applies to. Empty means match all taint keys. If the key is empty, operator must be Exists; this combination means to match all values and all keys.", + "type": "string" + }, + "operator": { + "description": "Operator represents a key's relationship to the value. Valid operators are Exists and Equal. Defaults to Equal. Exists is equivalent to wildcard for value, so that a pod can tolerate all taints of a particular category.", + "type": "string" + }, + "tolerationSeconds": { + "description": "TolerationSeconds represents the period of time the toleration (which must be of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default, it is not set, which means tolerate the taint forever (do not evict). Zero and negative values will be treated as 0 (evict immediately) by the system.", + "type": "integer", + "format": "int64" + }, + "value": { + "description": "Value is the taint value the toleration matches to. If the operator is Exists, the value should be empty, otherwise just a regular string.", + "type": "string" + } + } + }, + "v1VmTopologySpreadConstraint": { + "description": "TopologySpreadConstraint specifies how to spread matching pods among the given topology.", + "type": "object", + "required": [ + "maxSkew", + "topologyKey", + "whenUnsatisfiable" + ], + "properties": { + "labelSelector": { + "$ref": "#/definitions/v1VmLabelSelector" + }, + "maxSkew": { + "description": "MaxSkew describes the degree to which pods may be unevenly distributed. When `whenUnsatisfiable=DoNotSchedule`, it is the maximum permitted difference between the number of matching pods in the target topology and the global minimum. For example, in a 3-zone cluster, MaxSkew is set to 1, and pods with the same labelSelector spread as 1/1/0: | zone1 | zone2 | zone3 | | P | P | | - if MaxSkew is 1, incoming pod can only be scheduled to zone3 to become 1/1/1; scheduling it onto zone1(zone2) would make the ActualSkew(2-0) on zone1(zone2) violate MaxSkew(1). - if MaxSkew is 2, incoming pod can be scheduled onto any zone. When `whenUnsatisfiable=ScheduleAnyway`, it is used to give higher precedence to topologies that satisfy it. It's a required field. Default value is 1 and 0 is not allowed.", + "type": "integer", + "format": "int32" + }, + "topologyKey": { + "description": "TopologyKey is the key of node labels. Nodes that have a label with this key and identical values are considered to be in the same topology. We consider each \u003ckey, value\u003e as a \"bucket\", and try to put balanced number of pods into each bucket. It's a required field.", + "type": "string" + }, + "whenUnsatisfiable": { + "description": "WhenUnsatisfiable indicates how to deal with a pod if it doesn't satisfy the spread constraint. - DoNotSchedule (default) tells the scheduler not to schedule it. - ScheduleAnyway tells the scheduler to schedule the pod in any location,\n but giving higher precedence to topologies that would help reduce the\n skew.\nA constraint is considered \"Unsatisfiable\" for an incoming pod if and only if every possible node assignment for that pod would violate \"MaxSkew\" on some topology. For example, in a 3-zone cluster, MaxSkew is set to 1, and pods with the same labelSelector spread as 3/1/1: | zone1 | zone2 | zone3 | | P P P | P | P | If WhenUnsatisfiable is set to DoNotSchedule, incoming pod can only be scheduled to zone2(zone3) to become 3/2/1(3/1/2) as ActualSkew(2-1) on zone2(zone3) satisfies MaxSkew(1). In other words, the cluster can still be imbalanced, but scheduler won't make it *more* imbalanced. It's a required field.", + "type": "string" + } + } + }, + "v1VmTypedLocalObjectReference": { + "description": "TypedLocalObjectReference contains enough information to let you locate the typed referenced object inside the same namespace.", + "type": "object", + "required": [ + "kind", + "name" + ], + "properties": { + "apiGroup": { + "description": "APIGroup is the group for the resource being referenced. If APIGroup is not specified, the specified Kind must be in the core API group. For any other third-party types, APIGroup is required.", + "type": "string" + }, + "kind": { + "description": "Kind is the type of resource being referenced", + "type": "string" + }, + "name": { + "description": "Name is the name of resource being referenced", + "type": "string" + } + } + }, + "v1VmUserPasswordAccessCredential": { + "description": "UserPasswordAccessCredential represents a source and propagation method for injecting user passwords into a vm guest Only one of its members may be specified.", + "type": "object", + "required": [ + "source", + "propagationMethod" + ], + "properties": { + "propagationMethod": { + "$ref": "#/definitions/v1VmUserPasswordAccessCredentialPropagationMethod" + }, + "source": { + "$ref": "#/definitions/v1VmUserPasswordAccessCredentialSource" + } + } + }, + "v1VmUserPasswordAccessCredentialPropagationMethod": { + "description": "UserPasswordAccessCredentialPropagationMethod represents the method used to inject a user passwords into the vm guest. Only one of its members may be specified.", + "type": "object", + "properties": { + "qemuGuestAgent": { + "$ref": "#/definitions/v1VmQemuGuestAgentUserPasswordAccessCredentialPropagation" + } + } + }, + "v1VmUserPasswordAccessCredentialSource": { + "description": "UserPasswordAccessCredentialSource represents where to retrieve the user password credentials Only one of its members may be specified.", + "type": "object", + "properties": { + "secret": { + "$ref": "#/definitions/v1VmAccessCredentialSecretSource" + } + } + }, + "v1VmVGPUDisplayOptions": { + "type": "object", + "properties": { + "enabled": { + "description": "Enabled determines if a display addapter backed by a vGPU should be enabled or disabled on the guest. Defaults to true.", + "type": "boolean" + }, + "ramFB": { + "$ref": "#/definitions/v1VmFeatureState" + } + } + }, + "v1VmVGPUOptions": { + "type": "object", + "properties": { + "display": { + "$ref": "#/definitions/v1VmVGPUDisplayOptions" + } + } + }, + "v1VmVirtualMachineCondition": { + "description": "VirtualMachineCondition represents the state of VirtualMachine", + "type": "object", + "required": [ + "type", + "status" + ], + "properties": { + "lastProbeTime": { + "type": "string" + }, + "lastTransitionTime": { + "type": "string" + }, + "message": { + "type": "string" + }, + "reason": { + "type": "string" + }, + "status": { + "type": "string" + }, + "type": { + "type": "string" + } + } + }, + "v1VmVirtualMachineInstanceSpec": { + "description": "VirtualMachineInstanceSpec is a description of a VirtualMachineInstance.", + "type": "object", + "required": [ + "domain" + ], + "properties": { + "accessCredentials": { + "description": "Specifies a set of public keys to inject into the vm guest", + "type": "array", + "items": { + "$ref": "#/definitions/v1VmAccessCredential" + }, + "x-kubernetes-list-type": "atomic" + }, + "affinity": { + "$ref": "#/definitions/v1VmAffinity" + }, + "dnsConfig": { + "$ref": "#/definitions/v1VmPodDnsConfig" + }, + "dnsPolicy": { + "description": "Set DNS policy for the pod. Defaults to \"ClusterFirst\". Valid values are 'ClusterFirstWithHostNet', 'ClusterFirst', 'Default' or 'None'. DNS parameters given in DNSConfig will be merged with the policy selected with DNSPolicy. To have DNS options set along with hostNetwork, you have to specify DNS policy explicitly to 'ClusterFirstWithHostNet'.", + "type": "string" + }, + "domain": { + "$ref": "#/definitions/v1VmDomainSpec" + }, + "evictionStrategy": { + "description": "EvictionStrategy can be set to \"LiveMigrate\" if the VirtualMachineInstance should be migrated instead of shut-off in case of a node drain.", + "type": "string" + }, + "hostname": { + "description": "Specifies the hostname of the vmi If not specified, the hostname will be set to the name of the vmi, if dhcp or cloud-init is configured properly.", + "type": "string" + }, + "livenessProbe": { + "$ref": "#/definitions/v1VmProbe" + }, + "networks": { + "description": "List of networks that can be attached to a vm's virtual interface.", + "type": "array", + "items": { + "$ref": "#/definitions/v1VmNetwork" + } + }, + "nodeSelector": { + "description": "NodeSelector is a selector which must be true for the vmi to fit on a node. Selector which must match a node's labels for the vmi to be scheduled on that node. More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "priorityClassName": { + "description": "If specified, indicates the pod's priority. If not specified, the pod priority will be default or zero if there is no default.", + "type": "string" + }, + "readinessProbe": { + "$ref": "#/definitions/v1VmProbe" + }, + "schedulerName": { + "description": "If specified, the VMI will be dispatched by specified scheduler. If not specified, the VMI will be dispatched by default scheduler.", + "type": "string" + }, + "startStrategy": { + "description": "StartStrategy can be set to \"Paused\" if Virtual Machine should be started in paused state.", + "type": "string" + }, + "subdomain": { + "description": "If specified, the fully qualified vmi hostname will be \"\u003chostname\u003e.\u003csubdomain\u003e.\u003cpod namespace\u003e.svc.\u003ccluster domain\u003e\". If not specified, the vmi will not have a domainname at all. The DNS entry will resolve to the vmi, no matter if the vmi itself can pick up a hostname.", + "type": "string" + }, + "terminationGracePeriodSeconds": { + "description": "Grace period observed after signalling a VirtualMachineInstance to stop after which the VirtualMachineInstance is force terminated.", + "type": "integer", + "format": "int64" + }, + "tolerations": { + "description": "If toleration is specified, obey all the toleration rules.", + "type": "array", + "items": { + "$ref": "#/definitions/v1VmToleration" + } + }, + "topologySpreadConstraints": { + "description": "TopologySpreadConstraints describes how a group of VMIs will be spread across a given topology domains. K8s scheduler will schedule VMI pods in a way which abides by the constraints.", + "type": "array", + "items": { + "$ref": "#/definitions/v1VmTopologySpreadConstraint" + }, + "x-kubernetes-list-map-keys": [ + "topologyKey", + "whenUnsatisfiable" + ], + "x-kubernetes-list-type": "map", + "x-kubernetes-patch-merge-key": "topologyKey", + "x-kubernetes-patch-strategy": "merge" + }, + "volumes": { + "description": "List of volumes that can be mounted by disks belonging to the vmi.", + "type": "array", + "items": { + "$ref": "#/definitions/v1VmVolume" + } + } + } + }, + "v1VmVirtualMachineInstanceTemplateSpec": { + "type": "object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1VmObjectMeta" + }, + "spec": { + "$ref": "#/definitions/v1VmVirtualMachineInstanceSpec" + } + } + }, + "v1VmVirtualMachineMemoryDumpRequest": { + "description": "VirtualMachineMemoryDumpRequest represent the memory dump request phase and info", + "type": "object", + "required": [ + "claimName", + "phase" + ], + "properties": { + "claimName": { + "description": "ClaimName is the name of the pvc that will contain the memory dump", + "type": "string" + }, + "endTimestamp": { + "$ref": "#/definitions/v1Time" + }, + "fileName": { + "description": "FileName represents the name of the output file", + "type": "string" + }, + "message": { + "description": "Message is a detailed message about failure of the memory dump", + "type": "string" + }, + "phase": { + "description": "Phase represents the memory dump phase", + "type": "string" + }, + "remove": { + "description": "Remove represents request of dissociating the memory dump pvc", + "type": "boolean" + }, + "startTimestamp": { + "$ref": "#/definitions/v1Time" + } + } + }, + "v1VmVirtualMachineStartFailure": { + "description": "VirtualMachineStartFailure tracks VMIs which failed to transition successfully to running using the VM status", + "type": "object", + "properties": { + "consecutiveFailCount": { + "type": "integer", + "format": "int32" + }, + "lastFailedVMIUID": { + "type": "string" + }, + "retryAfterTimestamp": { + "$ref": "#/definitions/v1Time" + } + } + }, + "v1VmVirtualMachineStateChangeRequest": { + "type": "object", + "required": [ + "action" + ], + "properties": { + "action": { + "description": "Indicates the type of action that is requested. e.g. Start or Stop", + "type": "string" + }, + "data": { + "description": "Provides additional data in order to perform the Action", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "uid": { + "description": "Indicates the UUID of an existing Virtual Machine Instance that this change request applies to -- if applicable", + "type": "string" + } + } + }, + "v1VmVirtualMachineVolumeRequest": { + "type": "object", + "properties": { + "addVolumeOptions": { + "$ref": "#/definitions/v1VmAddVolumeOptions" + }, + "removeVolumeOptions": { + "$ref": "#/definitions/v1VmRemoveVolumeOptions" + } + } + }, + "v1VmVolume": { + "description": "Volume represents a named volume in a vmi.", + "type": "object", + "required": [ + "name" + ], + "properties": { + "cloudInitConfigDrive": { + "$ref": "#/definitions/v1VmCloudInitConfigDriveSource" + }, + "cloudInitNoCloud": { + "$ref": "#/definitions/v1VmCloudInitNoCloudSource" + }, + "configMap": { + "$ref": "#/definitions/v1VmConfigMapVolumeSource" + }, + "containerDisk": { + "$ref": "#/definitions/v1VmContainerDiskSource" + }, + "dataVolume": { + "$ref": "#/definitions/v1VmCoreDataVolumeSource" + }, + "downwardAPI": { + "$ref": "#/definitions/v1VmDownwardApiVolumeSource" + }, + "downwardMetrics": { + "$ref": "#/definitions/v1VmDownwardMetricsVolumeSource" + }, + "emptyDisk": { + "$ref": "#/definitions/v1VmEmptyDiskSource" + }, + "ephemeral": { + "$ref": "#/definitions/v1VmEphemeralVolumeSource" + }, + "hostDisk": { + "$ref": "#/definitions/v1VmHostDisk" + }, + "memoryDump": { + "$ref": "#/definitions/v1VmMemoryDumpVolumeSource" + }, + "name": { + "description": "Volume's name. Must be a DNS_LABEL and unique within the vmi. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names", + "type": "string" + }, + "persistentVolumeClaim": { + "$ref": "#/definitions/v1VmPersistentVolumeClaimVolumeSource" + }, + "secret": { + "$ref": "#/definitions/v1VmSecretVolumeSource" + }, + "serviceAccount": { + "$ref": "#/definitions/v1VmServiceAccountVolumeSource" + }, + "sysprep": { + "$ref": "#/definitions/v1VmSysprepSource" + } + } + }, + "v1VmVolumeSnapshotStatus": { + "type": "object", + "required": [ + "name", + "enabled" + ], + "properties": { + "enabled": { + "description": "True if the volume supports snapshotting", + "type": "boolean" + }, + "name": { + "description": "Volume name", + "type": "string" + }, + "reason": { + "description": "Empty if snapshotting is enabled, contains reason otherwise", + "type": "string" + } + } + }, + "v1VmWatchdog": { + "description": "Named watchdog device.", + "type": "object", + "required": [ + "name" + ], + "properties": { + "i6300esb": { + "$ref": "#/definitions/v1VmI6300ESBWatchdog" + }, + "name": { + "description": "Name of the watchdog.", + "type": "string" + } + } + }, + "v1VmWeightedPodAffinityTerm": { + "description": "The weights of all of the matched WeightedPodAffinityTerm fields are added per-node to find the most preferred node(s)", + "type": "object", + "required": [ + "weight", + "podAffinityTerm" + ], + "properties": { + "podAffinityTerm": { + "$ref": "#/definitions/v1VmPodAffinityTerm" + }, + "weight": { + "description": "weight associated with matching the corresponding podAffinityTerm, in the range 1-100.", + "type": "integer", + "format": "int32" + } + } + }, + "v1VsphereAccount": { + "description": "VSphere account information", + "type": "object", + "properties": { + "apiVersion": { + "description": "Cloud account api version", + "type": "string" + }, + "kind": { + "description": "Cloud account kind", + "type": "string" + }, + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/v1VsphereCloudAccount" + }, + "status": { + "$ref": "#/definitions/v1CloudAccountStatus" + } + } + }, + "v1VsphereAccounts": { + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1VsphereAccount" + } + }, + "listmeta": { + "$ref": "#/definitions/v1ListMetaData" + } + } + }, + "v1VsphereCloudAccount": { + "type": "object", + "required": [ + "vcenterServer", + "username", + "password" + ], + "properties": { + "insecure": { + "description": "Insecure is a flag that controls whether or not to validate the vSphere server's certificate.", + "type": "boolean", + "x-omitempty": false + }, + "password": { + "type": "string" + }, + "username": { + "type": "string" + }, + "vcenterServer": { + "description": "VcenterServer is the address of the vSphere endpoint", + "type": "string" + } + } + }, + "v1VsphereCloudClusterConfigEntity": { + "description": "vSphere cloud cluster config entity", + "type": "object", + "properties": { + "clusterConfig": { + "$ref": "#/definitions/v1VsphereClusterConfigEntity" + } + } + }, + "v1VsphereCloudConfig": { + "description": "VsphereCloudConfig is the Schema for the vspherecloudconfigs API", + "type": "object", + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + "type": "string" + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/v1VsphereCloudConfigSpec" + }, + "status": { + "$ref": "#/definitions/v1VsphereCloudConfigStatus" + } + } + }, + "v1VsphereCloudConfigSpec": { + "description": "VsphereCloudConfigSpec defines the desired state of VsphereCloudConfig", + "type": "object", + "required": [ + "clusterConfig", + "machinePoolConfig" + ], + "properties": { + "cloudAccountRef": { + "description": "cloudAccountRef should point to the secret which contains VsphereCloudAccount", + "$ref": "#/definitions/v1ObjectReference" + }, + "clusterConfig": { + "$ref": "#/definitions/v1VsphereClusterConfig" + }, + "edgeHostRef": { + "description": "Appliance (Edge Host) uid for Edge env", + "$ref": "#/definitions/v1ObjectReference" + }, + "machinePoolConfig": { + "type": "array", + "items": { + "$ref": "#/definitions/v1VsphereMachinePoolConfig" + } + } + } + }, + "v1VsphereCloudConfigStatus": { + "description": "VsphereCloudConfigStatus defines the observed state of VsphereCloudConfig", + "type": "object", + "properties": { + "ansibleDigest": { + "type": "string" + }, + "conditions": { + "type": "array", + "items": { + "$ref": "#/definitions/v1ClusterCondition" + } + }, + "isAddonLayer": { + "description": "addon layers present in spc", + "type": "boolean" + }, + "lastOVACreated": { + "type": "string" + }, + "lastVMExported": { + "type": "string" + }, + "nodeImage": { + "$ref": "#/definitions/v1VsphereImage" + }, + "roleDigest": { + "description": "this map will be for ansible roles present in eack pack", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "sourceImageId": { + "description": "sourceImageId, it can be from packref's annotations or from pack.json", + "type": "string" + }, + "uploadOvaS3": { + "description": "UploadOVAS3 will hold last image name which uploaded to S3", + "type": "string" + }, + "useCapiImage": { + "description": "If no ansible roles found in Packs then Mold should tell Drive to use capi image and not create custom image, because there is nothing to add", + "type": "boolean" + } + } + }, + "v1VsphereCloudDatacenter": { + "description": "Vsphere datacenter", + "type": "object", + "properties": { + "computeClusters": { + "type": "array", + "items": { + "$ref": "#/definitions/v1VsphereComputeCluster" + } + }, + "folders": { + "type": "array", + "items": { + "type": "string" + } + }, + "name": { + "type": "string" + } + } + }, + "v1VsphereClusterConfig": { + "type": "object", + "required": [ + "placement" + ], + "properties": { + "controlPlaneEndpoint": { + "description": "The optional control plane endpoint, which can be an IP or FQDN", + "$ref": "#/definitions/v1ControlPlaneEndPoint" + }, + "ntpServers": { + "description": "NTPServers is a list of NTP servers to use instead of the machine image's default NTP server list.", + "type": "array", + "items": { + "type": "string" + } + }, + "placement": { + "description": "Placement configuration Placement config in ClusterConfig serve as default values for each MachinePool", + "$ref": "#/definitions/v1VspherePlacementConfig" + }, + "sshKeys": { + "description": "SSHKeys specifies a list of ssh authorized keys for the 'spectro' user", + "type": "array", + "items": { + "type": "string" + } + }, + "staticIp": { + "description": "whether this cluster should use dhcp or static IP, if false, use DHCP if this is set, then all machinepools should have staticIP with provided IPPool adding this as an additional standalone flag without relating to placement.Nework main reason is to enable more validation for placement.Network.StaticIP which should come together with valid Network.IPPool and Network.Name", + "type": "boolean" + } + } + }, + "v1VsphereClusterConfigEntity": { + "type": "object", + "required": [ + "placement" + ], + "properties": { + "controlPlaneEndpoint": { + "description": "The optional control plane endpoint, which can be an IP or FQDN", + "$ref": "#/definitions/v1ControlPlaneEndPoint" + }, + "ntpServers": { + "description": "NTPServers is a list of NTP servers to use instead of the machine image's default NTP server list.", + "type": "array", + "items": { + "type": "string" + } + }, + "placement": { + "description": "Placement configuration Placement config in ClusterConfig serve as default values for each MachinePool", + "$ref": "#/definitions/v1VspherePlacementConfigEntity" + }, + "sshKeys": { + "description": "SSHKeys specifies a list of ssh authorized keys for the 'spectro' user", + "type": "array", + "items": { + "type": "string" + } + }, + "staticIp": { + "description": "whether this cluster should use dhcp or static IP, if false, use DHCP if this is set, then all machinepools should have staticIP with provided IPPool adding this as an additional standalone flag without relating to placement.Nework main reason is to enable more validation for placement.Network.StaticIP which should come together with valid Network.IPPool and Network.Name", + "type": "boolean" + } + } + }, + "v1VsphereComputeCluster": { + "description": "Vsphere compute cluster", + "type": "object", + "properties": { + "datastores": { + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + } + }, + "name": { + "type": "string" + }, + "networks": { + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + } + }, + "resourcePools": { + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + } + } + } + }, + "v1VsphereComputeClusterResources": { + "description": "Datacenter and its resources like datastore, resoucepool, folders", + "type": "object", + "properties": { + "computecluster": { + "$ref": "#/definitions/v1VsphereComputeCluster" + }, + "datacenter": { + "description": "Name of the datacenter", + "type": "string" + } + } + }, + "v1VsphereDatacenter": { + "description": "List of Datacenter with computeclusters", + "type": "object", + "properties": { + "computeclusters": { + "description": "List of the VSphere compute clusters in datacenter", + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + } + }, + "datacenter": { + "description": "name of the datacenter of the VSphere", + "type": "string" + }, + "folders": { + "description": "List of the VSphere folders in datacenter", + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + } + } + } + }, + "v1VsphereDatacenters": { + "description": "List of Datacenters with computeclusters", + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": { + "description": "List of associated datacenters", + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1VsphereDatacenter" + } + } + } + }, + "v1VsphereDnsMapping": { + "description": "VSphere DNS Mapping", + "type": "object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/v1VsphereDnsMappingSpec" + } + } + }, + "v1VsphereDnsMappingSpec": { + "description": "VSphere DNS Mapping Spec", + "type": "object", + "required": [ + "privateGatewayUid", + "datacenter", + "network", + "dnsName" + ], + "properties": { + "datacenter": { + "description": "VSphere datacenter name", + "type": "string" + }, + "dnsName": { + "description": "VSphere DNS name", + "type": "string" + }, + "network": { + "description": "VSphere network name", + "type": "string" + }, + "networkUrl": { + "description": "VSphere network URL", + "type": "string", + "readOnly": true + }, + "privateGatewayUid": { + "description": "VSphere private gateway uid", + "type": "string" + } + } + }, + "v1VsphereDnsMappings": { + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": { + "description": "List of vSphere DNS mapping", + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1VsphereDnsMapping" + } + } + } + }, + "v1VsphereEnv": { + "description": "Vsphere environment entity", + "type": "object", + "properties": { + "version": { + "description": "Version of vsphere environment", + "type": "string" + } + } + }, + "v1VsphereImage": { + "description": "A generated Image should always be a template which resides inside vsphere Will not generate a OVA file out of the image OVA can be used as a base input of the os pack, that's internal to the pack", + "type": "object", + "properties": { + "fullPath": { + "description": "full path of the image template location it contains datacenter/folder/templatename etc eg: /mydc/vm/template/spectro/workerpool-1-centos", + "type": "string" + }, + "state": { + "type": "string" + } + } + }, + "v1VsphereInstanceType": { + "type": "object", + "required": [ + "numCPUs", + "memoryMiB", + "diskGiB" + ], + "properties": { + "diskGiB": { + "description": "DiskGiB is the size of a virtual machine's disk, in GiB. Defaults to the analogue property value in the template from which this machine is cloned.", + "type": "integer", + "format": "int32" + }, + "memoryMiB": { + "description": "MemoryMiB is the size of a virtual machine's memory, in MiB. Defaults to the analogue property value in the template from which this machine is cloned.", + "type": "integer", + "format": "int64" + }, + "numCPUs": { + "description": "NumCPUs is the number of virtual processors in a virtual machine. Defaults to the analogue property value in the template from which this machine is cloned.", + "type": "integer", + "format": "int32" + } + } + }, + "v1VsphereMachine": { + "description": "vSphere cloud VM definition", + "type": "object", + "properties": { + "apiVersion": { + "type": "string" + }, + "kind": { + "type": "string" + }, + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/v1VsphereMachineSpec" + }, + "status": { + "$ref": "#/definitions/v1CloudMachineStatus" + } + } + }, + "v1VsphereMachinePoolCloudConfigEntity": { + "properties": { + "instanceType": { + "$ref": "#/definitions/v1VsphereInstanceType" + }, + "placements": { + "description": "Placements configuration Placements If defined, will replace default values defined in VsphereClusterConfig Array means one MachinePool can span across multiple vsphere compute cluster", + "type": "array", + "items": { + "$ref": "#/definitions/v1VspherePlacementConfigEntity" + } + } + } + }, + "v1VsphereMachinePoolConfig": { + "type": "object", + "required": [ + "isControlPlane", + "instanceType" + ], + "properties": { + "additionalLabels": { + "description": "additionalLabels", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "additionalTags": { + "description": "AdditionalTags is an optional set of tags to add to resources managed by the provider, in addition to the ones added by default. For eg., tags for EKS nodeGroup or EKS NodegroupIAMRole", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "instanceType": { + "description": "InstanceType defines the required CPU, Memory, Storage", + "$ref": "#/definitions/v1VsphereInstanceType" + }, + "isControlPlane": { + "description": "whether this pool is for control plane", + "type": "boolean", + "x-omitempty": false + }, + "labels": { + "description": "labels for this pool, example: control-plane/worker, gpu, windows", + "type": "array", + "items": { + "type": "string" + } + }, + "machinePoolProperties": { + "$ref": "#/definitions/v1MachinePoolProperties" + }, + "maxSize": { + "description": "max size of the pool, for scaling", + "type": "integer", + "format": "int32" + }, + "minSize": { + "description": "min size of the pool, for scaling", + "type": "integer", + "format": "int32" + }, + "name": { + "type": "string" + }, + "nodeRepaveInterval": { + "description": "Minimum number of seconds a node should be Ready, before the next node is selected for repave. Applicable only for workerpools in infrastructure cluster", + "type": "integer", + "format": "int32" + }, + "placements": { + "description": "Placements configuration Placements If defined, will replace default values defined in VsphereClusterConfig Array means one MachinePool can span across multiple vsphere compute cluster", + "type": "array", + "items": { + "$ref": "#/definitions/v1VspherePlacementConfig" + } + }, + "size": { + "description": "size of the pool, number of machines", + "type": "integer", + "format": "int32" + }, + "taints": { + "description": "control plane or worker taints", + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1Taint" + } + }, + "updateStrategy": { + "description": "rolling update strategy for this machinepool if not specified, will use ScaleOut", + "$ref": "#/definitions/v1UpdateStrategy" + }, + "useControlPlaneAsWorker": { + "description": "if IsControlPlane==true \u0026\u0026 useControlPlaneAsWorker==true, then will remove control plane taint this will not be used for worker pools", + "type": "boolean", + "x-omitempty": false + } + } + }, + "v1VsphereMachinePoolConfigEntity": { + "type": "object", + "required": [ + "cloudConfig" + ], + "properties": { + "cloudConfig": { + "$ref": "#/definitions/v1VsphereMachinePoolCloudConfigEntity" + }, + "poolConfig": { + "$ref": "#/definitions/v1MachinePoolConfigEntity" + } + } + }, + "v1VsphereMachineSpec": { + "description": "vSphere cloud VM definition spec", + "type": "object", + "required": [ + "vcenterServer", + "nics", + "placement" + ], + "properties": { + "images": { + "type": "array", + "items": { + "$ref": "#/definitions/v1VsphereImage" + } + }, + "instanceType": { + "$ref": "#/definitions/v1VsphereInstanceType" + }, + "nics": { + "type": "array", + "items": { + "$ref": "#/definitions/v1VsphereNic" + } + }, + "ntpServers": { + "description": "NTPServers is a list of NTP servers to use instead of the machine image's default NTP server list.", + "type": "array", + "items": { + "type": "string" + } + }, + "placement": { + "description": "Placement configuration", + "$ref": "#/definitions/v1VspherePlacementConfig" + }, + "vcenterServer": { + "description": "VcenterServer is the address of the vSphere endpoint", + "type": "string" + } + } + }, + "v1VsphereMachines": { + "description": "vSphere machine list", + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1VsphereMachine" + } + }, + "listmeta": { + "$ref": "#/definitions/v1ListMetaData" + } + } + }, + "v1VsphereNetworkConfig": { + "type": "object", + "required": [ + "networkName" + ], + "properties": { + "ipPool": { + "description": "when staticIP=true, need to provide IPPool", + "$ref": "#/definitions/v1IPPool" + }, + "networkName": { + "description": "NetworkName is the name of the network in which VMs are created/located.", + "type": "string" + }, + "parentPoolRef": { + "description": "ParentPoolRef reference to the ParentPool which allocates IPs for this IPPool", + "$ref": "#/definitions/v1ObjectReference" + }, + "staticIp": { + "description": "support dhcp or static IP, if false, use DHCP", + "type": "boolean" + } + } + }, + "v1VsphereNetworkConfigEntity": { + "type": "object", + "required": [ + "networkName" + ], + "properties": { + "networkName": { + "description": "NetworkName is the name of the network in which VMs are created/located.", + "type": "string" + }, + "parentPoolUid": { + "description": "ParentPoolRef Uid to the ParentPool which allocates IPs for this IPPool", + "type": "string" + }, + "staticIp": { + "description": "support dhcp or static IP, if false, use DHCP", + "type": "boolean" + } + } + }, + "v1VsphereNic": { + "description": "vSphere network interface", + "type": "object", + "required": [ + "networkName" + ], + "properties": { + "index": { + "type": "integer", + "format": "int8" + }, + "macAddress": { + "type": "string" + }, + "networkName": { + "type": "string" + }, + "privateIPs": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "v1VsphereOverlordClusterConfigEntity": { + "type": "object", + "properties": { + "controlPlaneEndpoint": { + "description": "The optional control plane endpoint, which can be an IP or FQDN", + "$ref": "#/definitions/v1ControlPlaneEndPoint" + }, + "ntpServers": { + "description": "NTPServers is a list of NTP servers to use instead of the machine image's default NTP server list.", + "type": "array", + "items": { + "type": "string" + } + }, + "placements": { + "description": "Placements configuration Placements If defined, will replace default values defined in VsphereClusterConfig Array means one MachinePool can span across multiple vsphere compute cluster", + "type": "array", + "items": { + "$ref": "#/definitions/v1VspherePlacementConfigEntity" + } + }, + "sshKeys": { + "description": "SSHKeys specifies a list of ssh authorized keys for the 'spectro' user", + "type": "array", + "items": { + "type": "string" + } + }, + "staticIp": { + "description": "whether this cluster should use dhcp or static IP, if false, use DHCP if this is set, then all machinepools should have staticIP with provided IPPool adding this as an additional standalone flag without relating to placement.Nework main reason is to enable more validation for placement.Network.StaticIP which should come together with valid Network.IPPool and Network.Name", + "type": "boolean" + } + } + }, + "v1VspherePlacementConfig": { + "description": "Both ClusterConfig and MachinePoolConfig will have PlacementConfig MachinePoolconfig.Placements will overwrite values defined in ClusterConfig Currently the convention is: Datacenter / Folder / ImageTemplateFolder / Network should be defined at ClusterConfig Cluster / ResourcePool / Datastore / Network is defined at MachinePool ClusterConfig Network should only indicate use DHCP or not MachinePool Network should contain the actual network and IPPool", + "type": "object", + "properties": { + "cluster": { + "description": "Cluster is the computecluster in vsphere", + "type": "string" + }, + "datacenter": { + "description": "Datacenter is the name or inventory path of the datacenter where this machine's VM is created/located.", + "type": "string" + }, + "datastore": { + "description": "Datastore is the datastore in which VMs are created/located.", + "type": "string" + }, + "folder": { + "description": "Folder is the folder in which VMs are created/located.", + "type": "string" + }, + "imageTemplateFolder": { + "description": "ImageTemplateFolder is the folder in which VMs templates are created/located. if empty will use default value spectro-templates", + "type": "string" + }, + "network": { + "description": "network info", + "$ref": "#/definitions/v1VsphereNetworkConfig" + }, + "resourcePool": { + "description": "ResourcePool is the resource pool within the above computecluster Cluster", + "type": "string" + }, + "storagePolicyName": { + "description": "StoragePolicyName of the storage policy to use with this Virtual Machine", + "type": "string" + }, + "uid": { + "description": "UID for this placement", + "type": "string" + } + } + }, + "v1VspherePlacementConfigEntity": { + "description": "Both ClusterConfig and MachinePoolConfig will have PlacementConfig MachinePoolconfig.Placements will overwrite values defined in ClusterConfig Currently the convention is: Datacenter / Folder / ImageTemplateFolder / Network should be defined at ClusterConfig Cluster / ResourcePool / Datastore / Network is defined at MachinePool ClusterConfig Network should only indicate use DHCP or not MachinePool Network should contain the actual network and IPPool", + "type": "object", + "properties": { + "cluster": { + "description": "Cluster is the computecluster in vsphere", + "type": "string" + }, + "datacenter": { + "description": "Datacenter is the name or inventory path of the datacenter where this machine's VM is created/located.", + "type": "string" + }, + "datastore": { + "description": "Datastore is the datastore in which VMs are created/located.", + "type": "string" + }, + "folder": { + "description": "Folder is the folder in which VMs are created/located.", + "type": "string" + }, + "imageTemplateFolder": { + "description": "ImageTemplateFolder is the folder in which VMs templates are created/located. if empty will use default value spectro-templates", + "type": "string" + }, + "network": { + "description": "network info", + "$ref": "#/definitions/v1VsphereNetworkConfigEntity" + }, + "resourcePool": { + "description": "ResourcePool is the resource pool within the above computecluster Cluster", + "type": "string" + }, + "storagePolicyName": { + "description": "StoragePolicyName of the storage policy to use with this Virtual Machine", + "type": "string" + }, + "uid": { + "description": "UID for this placement", + "type": "string" + } + } + }, + "v1Workspace": { + "description": "Workspace information", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/v1WorkspaceSpec" + }, + "status": { + "$ref": "#/definitions/v1WorkspaceStatus" + } + } + }, + "v1WorkspaceBackup": { + "description": "Workspace backup", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/v1WorkspaceBackupSpec" + }, + "status": { + "$ref": "#/definitions/v1WorkspaceBackupStatus" + } + } + }, + "v1WorkspaceBackupClusterRef": { + "description": "Workspace backup cluster ref", + "properties": { + "backupName": { + "type": "string" + }, + "clusterUid": { + "type": "string" + } + } + }, + "v1WorkspaceBackupConfig": { + "description": "Workspace backup config", + "properties": { + "backupConfig": { + "$ref": "#/definitions/v1ClusterBackupConfig" + }, + "clusterUids": { + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + } + }, + "includeAllClusters": { + "type": "boolean" + } + } + }, + "v1WorkspaceBackupConfigEntity": { + "description": "Cluster backup config", + "properties": { + "backupConfig": { + "$ref": "#/definitions/v1ClusterBackupConfig" + }, + "clusterUids": { + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + } + }, + "includeAllClusters": { + "type": "boolean" + } + } + }, + "v1WorkspaceBackupDeleteEntity": { + "description": "Cluster backup delete config", + "properties": { + "clusterConfigs": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1WorkspaceBackupClusterRef" + } + }, + "requestUid": { + "type": "string" + } + } + }, + "v1WorkspaceBackupSpec": { + "description": "Workspace backup spec", + "properties": { + "config": { + "$ref": "#/definitions/v1WorkspaceBackupConfig" + }, + "workspaceUid": { + "type": "string" + } + } + }, + "v1WorkspaceBackupState": { + "description": "Workspace backup state", + "properties": { + "deleteState": { + "type": "string" + }, + "state": { + "type": "string" + } + } + }, + "v1WorkspaceBackupStatus": { + "description": "Workspace backup status", + "properties": { + "workspaceBackupStatuses": { + "type": "array", + "items": { + "$ref": "#/definitions/v1WorkspaceBackupStatusMeta" + } + } + } + }, + "v1WorkspaceBackupStatusConfig": { + "description": "Workspace backup status config", + "properties": { + "backupName": { + "type": "string" + }, + "durationInHours": { + "type": "number", + "format": "int64" + }, + "includeAllDisks": { + "type": "boolean" + }, + "includeClusterResources": { + "type": "boolean" + }, + "namespaces": { + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + } + } + } + }, + "v1WorkspaceBackupStatusMeta": { + "description": "Workspace backup status meta", + "properties": { + "actor": { + "$ref": "#/definitions/v1ClusterFeatureActor" + }, + "requestUid": { + "type": "string" + }, + "workspaceBackupConfig": { + "$ref": "#/definitions/v1WorkspaceClusterBackupConfig" + } + } + }, + "v1WorkspaceClusterBackupConfig": { + "description": "Workspace cluster backup config", + "properties": { + "backupName": { + "type": "string" + }, + "backupState": { + "$ref": "#/definitions/v1WorkspaceBackupState" + }, + "backupTime": { + "$ref": "#/definitions/v1Time" + }, + "clusterBackupRefs": { + "type": "array", + "items": { + "$ref": "#/definitions/v1WorkspaceClusterBackupResponse" + } + }, + "config": { + "$ref": "#/definitions/v1WorkspaceBackupStatusConfig" + }, + "requestTime": { + "$ref": "#/definitions/v1Time" + } + } + }, + "v1WorkspaceClusterBackupResponse": { + "description": "Workspace cluster backup response", + "properties": { + "backupStatusMeta": { + "$ref": "#/definitions/v1BackupStatusMeta" + }, + "backupUid": { + "type": "string" + }, + "clusterName": { + "type": "string" + }, + "clusterUid": { + "type": "string" + } + } + }, + "v1WorkspaceClusterNamespace": { + "description": "Workspace cluster namespace", + "properties": { + "image": { + "$ref": "#/definitions/v1WorkspaceNamespaceImage" + }, + "isRegex": { + "type": "boolean", + "x-omitempty": false + }, + "name": { + "type": "string" + }, + "namespaceResourceAllocation": { + "$ref": "#/definitions/v1WorkspaceNamespaceResourceAllocation" + } + } + }, + "v1WorkspaceClusterNamespacesEntity": { + "description": "Workspace cluster namespaces update entity", + "properties": { + "clusterNamespaces": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1WorkspaceClusterNamespace" + } + }, + "clusterRefs": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1WorkspaceClusterRef" + } + }, + "quota": { + "$ref": "#/definitions/v1WorkspaceQuota" + } + } + }, + "v1WorkspaceClusterRef": { + "description": "Workspace cluster reference", + "properties": { + "clusterName": { + "type": "string" + }, + "clusterUid": { + "type": "string" + } + } + }, + "v1WorkspaceClusterRestoreConfig": { + "description": "Workspace cluster restore config", + "properties": { + "backupName": { + "type": "string" + }, + "clusterRestoreRefs": { + "type": "array", + "items": { + "$ref": "#/definitions/v1WorkspaceClusterRestoreResponse" + } + }, + "restoreState": { + "$ref": "#/definitions/v1WorkspaceRestoreState" + }, + "restoreTime": { + "$ref": "#/definitions/v1Time" + } + } + }, + "v1WorkspaceClusterRestoreResponse": { + "description": "Workspace cluster restore response", + "properties": { + "backupName": { + "type": "string" + }, + "clusterName": { + "type": "string" + }, + "clusterUid": { + "type": "string" + }, + "restoreStatusMeta": { + "$ref": "#/definitions/v1WorkspaceClusterRestoreState" + }, + "restoreUid": { + "type": "string" + } + } + }, + "v1WorkspaceClusterRestoreState": { + "description": "Workspace cluster restore state", + "properties": { + "msg": { + "type": "string" + }, + "restoreTime": { + "$ref": "#/definitions/v1Time" + }, + "state": { + "type": "string" + } + } + }, + "v1WorkspaceClusterWorkloadCronJobs": { + "description": "Workspace cluster workload cronjobs summary", + "type": "object", + "properties": { + "cronjobs": { + "type": "array", + "items": { + "$ref": "#/definitions/v1ClusterWorkloadCronJob" + } + }, + "metadata": { + "$ref": "#/definitions/v1RelatedObject" + } + } + }, + "v1WorkspaceClusterWorkloadDaemonSets": { + "description": "Workspace cluster workload daemonsets summary", + "type": "object", + "properties": { + "daemonSets": { + "type": "array", + "items": { + "$ref": "#/definitions/v1ClusterWorkloadDaemonSet" + } + }, + "metadata": { + "$ref": "#/definitions/v1RelatedObject" + } + } + }, + "v1WorkspaceClusterWorkloadDeployments": { + "description": "Workspace cluster workload deployments summary", + "type": "object", + "properties": { + "deployments": { + "type": "array", + "items": { + "$ref": "#/definitions/v1ClusterWorkloadDeployment" + } + }, + "metadata": { + "$ref": "#/definitions/v1RelatedObject" + } + } + }, + "v1WorkspaceClusterWorkloadJobs": { + "description": "Workspace cluster workload jobs summary", + "type": "object", + "properties": { + "jobs": { + "type": "array", + "items": { + "$ref": "#/definitions/v1ClusterWorkloadJob" + } + }, + "metadata": { + "$ref": "#/definitions/v1RelatedObject" + } + } + }, + "v1WorkspaceClusterWorkloadNamespaces": { + "description": "Workspace cluster workload namespaces summary", + "type": "object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1RelatedObject" + }, + "namespaces": { + "type": "array", + "items": { + "$ref": "#/definitions/v1ClusterWorkloadNamespace" + } + } + } + }, + "v1WorkspaceClusterWorkloadPods": { + "description": "Workspace cluster workload pods summary", + "type": "object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1RelatedObject" + }, + "pods": { + "type": "array", + "items": { + "$ref": "#/definitions/v1ClusterWorkloadPod" + } + } + } + }, + "v1WorkspaceClusterWorkloadRoleBindings": { + "description": "Workspace cluster workload rbac bindings summary", + "type": "object", + "properties": { + "bindings": { + "type": "array", + "items": { + "$ref": "#/definitions/v1ClusterWorkloadRoleBinding" + } + }, + "metadata": { + "$ref": "#/definitions/v1RelatedObject" + } + } + }, + "v1WorkspaceClusterWorkloadStatefulSets": { + "description": "Workspace cluster workload statefulsets summary", + "type": "object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1RelatedObject" + }, + "statefulSets": { + "type": "array", + "items": { + "$ref": "#/definitions/v1ClusterWorkloadStatefulSet" + } + } + } + }, + "v1WorkspaceClustersWorkloadCronJobs": { + "description": "Workspace clusters workload cronjobs summary", + "type": "object", + "properties": { + "clusters": { + "type": "array", + "items": { + "$ref": "#/definitions/v1WorkspaceClusterWorkloadCronJobs" + } + }, + "metadata": { + "$ref": "#/definitions/v1ObjectMetaInputEntity" + } + } + }, + "v1WorkspaceClustersWorkloadDaemonSets": { + "description": "Workspace clusters workload statefulsets summary", + "type": "object", + "properties": { + "clusters": { + "type": "array", + "items": { + "$ref": "#/definitions/v1WorkspaceClusterWorkloadDaemonSets" + } + }, + "metadata": { + "$ref": "#/definitions/v1ObjectMetaInputEntity" + } + } + }, + "v1WorkspaceClustersWorkloadDeployments": { + "description": "Workspace clusters workload deployments summary", + "type": "object", + "properties": { + "clusters": { + "type": "array", + "items": { + "$ref": "#/definitions/v1WorkspaceClusterWorkloadDeployments" + } + }, + "metadata": { + "$ref": "#/definitions/v1ObjectMetaInputEntity" + } + } + }, + "v1WorkspaceClustersWorkloadJobs": { + "description": "Workspace clusters workload jobs summary", + "type": "object", + "properties": { + "clusters": { + "type": "array", + "items": { + "$ref": "#/definitions/v1WorkspaceClusterWorkloadJobs" + } + }, + "metadata": { + "$ref": "#/definitions/v1ObjectMetaInputEntity" + } + } + }, + "v1WorkspaceClustersWorkloadNamespaces": { + "description": "Workspace clusters workload namespaces summary", + "type": "object", + "properties": { + "clusters": { + "type": "array", + "items": { + "$ref": "#/definitions/v1WorkspaceClusterWorkloadNamespaces" + } + }, + "metadata": { + "$ref": "#/definitions/v1ObjectMetaInputEntity" + } + } + }, + "v1WorkspaceClustersWorkloadPods": { + "description": "Workspace clusters workload pods summary", + "type": "object", + "properties": { + "clusters": { + "type": "array", + "items": { + "$ref": "#/definitions/v1WorkspaceClusterWorkloadPods" + } + }, + "metadata": { + "$ref": "#/definitions/v1ObjectMetaInputEntity" + } + } + }, + "v1WorkspaceClustersWorkloadRoleBindings": { + "description": "Workspace clusters workload rbac bindings summary", + "type": "object", + "properties": { + "clusters": { + "type": "array", + "items": { + "$ref": "#/definitions/v1WorkspaceClusterWorkloadRoleBindings" + } + }, + "metadata": { + "$ref": "#/definitions/v1ObjectMetaInputEntity" + } + } + }, + "v1WorkspaceClustersWorkloadStatefulSets": { + "description": "Workspace clusters workload statefulsets summary", + "type": "object", + "properties": { + "clusters": { + "type": "array", + "items": { + "$ref": "#/definitions/v1WorkspaceClusterWorkloadStatefulSets" + } + }, + "metadata": { + "$ref": "#/definitions/v1ObjectMetaInputEntity" + } + } + }, + "v1WorkspaceEntity": { + "description": "Workspace information", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/v1WorkspaceSpec" + } + } + }, + "v1WorkspaceError": { + "description": "Workspace error", + "properties": { + "clusterUid": { + "type": "string" + }, + "msg": { + "type": "string" + }, + "name": { + "type": "string" + }, + "resourceType": { + "type": "string" + } + } + }, + "v1WorkspaceNamespaceImage": { + "description": "Workspace namespace image information", + "properties": { + "blackListedImages": { + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + } + } + } + }, + "v1WorkspaceNamespaceResourceAllocation": { + "description": "Workspace namespace resource allocation", + "properties": { + "clusterResourceAllocations": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1ClusterResourceAllocation" + } + }, + "defaultResourceAllocation": { + "$ref": "#/definitions/v1WorkspaceResourceAllocation" + } + } + }, + "v1WorkspacePolicies": { + "description": "Workspace policies", + "properties": { + "backupPolicy": { + "$ref": "#/definitions/v1WorkspaceBackupConfigEntity" + } + } + }, + "v1WorkspaceQuota": { + "description": "Workspace resource quota", + "properties": { + "resourceAllocation": { + "$ref": "#/definitions/v1WorkspaceResourceAllocation" + } + } + }, + "v1WorkspaceResourceAllocation": { + "description": "Workspace resource allocation", + "properties": { + "cpuCores": { + "type": "number", + "minimum": -1, + "x-omitempty": false + }, + "memoryMiB": { + "type": "number", + "minimum": -1, + "x-omitempty": false + } + } + }, + "v1WorkspaceRestore": { + "description": "Workspace restore", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/v1WorkspaceRestoreSpec" + }, + "status": { + "$ref": "#/definitions/v1WorkspaceRestoreStatus" + } + } + }, + "v1WorkspaceRestoreConfig": { + "description": "Workspace cluster restore config", + "required": [ + "backupName", + "sourceClusterUid" + ], + "properties": { + "backupName": { + "type": "string" + }, + "includeClusterResources": { + "type": "boolean" + }, + "includeNamespaces": { + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + } + }, + "preserveNodePorts": { + "type": "boolean" + }, + "restorePVs": { + "type": "boolean" + }, + "sourceClusterUid": { + "type": "string" + } + } + }, + "v1WorkspaceRestoreConfigEntity": { + "description": "Cluster restore config", + "required": [ + "backupRequestUid" + ], + "properties": { + "backupRequestUid": { + "type": "string" + }, + "restoreConfigs": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1WorkspaceRestoreConfig" + } + } + } + }, + "v1WorkspaceRestoreSpec": { + "description": "Workspace restore spec", + "properties": { + "workspaceUid": { + "type": "string" + } + } + }, + "v1WorkspaceRestoreState": { + "description": "Workspace restore state", + "properties": { + "deleteState": { + "type": "string" + }, + "state": { + "type": "string" + } + } + }, + "v1WorkspaceRestoreStatus": { + "description": "Workspace restore status", + "properties": { + "workspaceRestoreStatuses": { + "type": "array", + "items": { + "$ref": "#/definitions/v1WorkspaceRestoreStatusMeta" + } + } + } + }, + "v1WorkspaceRestoreStatusMeta": { + "description": "Workspace restore status meta", + "properties": { + "actor": { + "$ref": "#/definitions/v1ClusterFeatureActor" + }, + "requestUid": { + "type": "string" + }, + "workspaceRestoreConfig": { + "$ref": "#/definitions/v1WorkspaceClusterRestoreConfig" + } + } + }, + "v1WorkspaceRolesPatch": { + "type": "object", + "properties": { + "roles": { + "type": "array", + "items": { + "type": "string" + } + }, + "uid": { + "type": "string" + } + } + }, + "v1WorkspaceRolesUidSummary": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "uid": { + "type": "string" + } + } + }, + "v1WorkspaceScopeRoles": { + "description": "List all workspaces with the roles assigned to the users", + "properties": { + "projects": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1ProjectsWorkspaces" + } + } + } + }, + "v1WorkspaceSpec": { + "description": "Workspace specifications", + "properties": { + "clusterNamespaces": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1WorkspaceClusterNamespace" + } + }, + "clusterRbacs": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1ClusterRbac" + } + }, + "clusterRefs": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1WorkspaceClusterRef" + } + }, + "policies": { + "$ref": "#/definitions/v1WorkspacePolicies" + }, + "quota": { + "$ref": "#/definitions/v1WorkspaceQuota" + } + } + }, + "v1WorkspaceStatus": { + "description": "Workspace status", + "properties": { + "errors": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1WorkspaceError" + } + } + } + }, + "v1WorkspaceWorkloadsFilter": { + "description": "Workspace workloads filter", + "type": "object", + "properties": { + "clusters": { + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + } + }, + "namespaces": { + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + } + } + } + }, + "v1WorkspaceWorkloadsSpec": { + "description": "Workspace workloads spec", + "type": "object", + "properties": { + "filter": { + "$ref": "#/definitions/v1WorkspaceWorkloadsFilter" + } + } + }, + "v1WorkspacesRoles": { + "description": "Workspace users and their roles", + "properties": { + "inheritedRoles": { + "type": "array", + "items": { + "$ref": "#/definitions/v1WorkspaceRolesUidSummary" + } + }, + "name": { + "type": "string" + }, + "roles": { + "type": "array", + "items": { + "$ref": "#/definitions/v1WorkspaceRolesUidSummary" + } + }, + "uid": { + "type": "string" + } + } + }, + "v1WorkspacesRolesPatch": { + "type": "object", + "properties": { + "workspaces": { + "type": "array", + "items": { + "$ref": "#/definitions/v1WorkspaceRolesPatch" + } + } + } + }, + "v1ZoneEntity": { + "description": "Azure availability zone entity", + "type": "object", + "properties": { + "id": { + "description": "Azure availability zone id", + "type": "string" + } + } + }, + "v1k8CertificateAuthority": { + "description": "K8 Certificate Authority", + "type": "object", + "properties": { + "certificates": { + "type": "array", + "items": { + "$ref": "#/definitions/v1Certificate" + } + }, + "expiry": { + "description": "Certificate expiry time", + "$ref": "#/definitions/v1Time" + }, + "name": { + "type": "string" + } + } + } + }, + "securityDefinitions": { + "ApiKey": { + "description": "API key authorization where API key can be generated from Palette console under Profile \u003e My API Keys", + "type": "apiKey", + "name": "ApiKey", + "in": "header" + }, + "Authorization": { + "description": "JWT token authorization obtained using /v1/auth/authenticate api", + "type": "apiKey", + "name": "Authorization", + "in": "header" + } + } +} \ No newline at end of file diff --git a/api/spec/palette.json b/api/spec/palette.json new file mode 100644 index 00000000..0945133a --- /dev/null +++ b/api/spec/palette.json @@ -0,0 +1,60498 @@ +{ + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "schemes": [ + "http", + "https" + ], + "swagger": "2.0", + "info": { + "title": "Palette APIs - 4.4", + "version": "v1" + }, + "paths": { + "/v1/apiKeys": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves a list of API keys", + "operationId": "v1ApiKeysList", + "responses": { + "200": { + "description": "Retrieves a list of API keys", + "schema": { + "$ref": "#/definitions/v1ApiKeys" + } + } + } + }, + "post": { + "tags": [ + "v1" + ], + "summary": "Create an API key", + "operationId": "v1ApiKeysCreate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1ApiKeyEntity" + } + } + ], + "responses": { + "201": { + "description": "APIKey Created successfully", + "schema": { + "$ref": "#/definitions/v1ApiKeyCreateResponse" + } + } + } + } + }, + "/v1/apiKeys/{uid}": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the specified API key", + "operationId": "v1ApiKeysUidGet", + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1ApiKey" + } + } + } + }, + "put": { + "tags": [ + "v1" + ], + "summary": "Update the specified API key", + "operationId": "v1ApiKeysUidUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1ApiKeyUpdate" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "delete": { + "tags": [ + "v1" + ], + "summary": "Deletes the specified API key", + "operationId": "v1ApiKeysUidDelete", + "responses": { + "204": { + "description": "The resource was deleted successfully" + } + } + }, + "patch": { + "tags": [ + "v1" + ], + "summary": "Activate or de-active the specified API key", + "operationId": "v1ApiKeysUidActiveState", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1ApiKeyActiveState" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Specify API key uid", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/apiKeys/{uid}/state": { + "put": { + "tags": [ + "v1" + ], + "summary": "Revoke or re-activate the API key access", + "operationId": "v1ApiKeysUidState", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1ApiKeyActiveState" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Specify API key uid", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/appDeployments": { + "post": { + "tags": [ + "v1" + ], + "summary": "Creates a application deployment in the virtual cluster", + "operationId": "v1AppDeploymentsVirtualClusterCreate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1AppDeploymentVirtualClusterEntity" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + } + }, + "/v1/appDeployments/clusterGroup": { + "post": { + "tags": [ + "v1" + ], + "summary": "Creates a application deployment in one of virtual clusters in the cluster group", + "operationId": "v1AppDeploymentsClusterGroupCreate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1AppDeploymentClusterGroupEntity" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + } + }, + "/v1/appDeployments/{uid}": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the specified application deployment", + "operationId": "v1AppDeploymentsUidGet", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1AppDeployment" + } + } + } + }, + "delete": { + "tags": [ + "v1" + ], + "summary": "Deletes the specified application deployment", + "operationId": "v1AppDeploymentsUidDelete", + "responses": { + "204": { + "description": "The resource was deleted successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Application deployment uid", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/appDeployments/{uid}/profile": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns profile of the specified application deployment", + "operationId": "v1AppDeploymentsUidProfileGet", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1AppDeploymentProfileSpec" + } + } + } + }, + "put": { + "tags": [ + "v1" + ], + "summary": "Updates the specified application deployment profile", + "operationId": "v1AppDeploymentsUidProfileUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1AppDeploymentProfileEntity" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Application deployment uid", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/appDeployments/{uid}/profile/apply": { + "patch": { + "tags": [ + "v1" + ], + "summary": "Apply the application deployment profile updates", + "operationId": "v1AppDeploymentsUidProfileApply", + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Application deployment uid", + "name": "uid", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Application deployment notification uid", + "name": "notify", + "in": "query" + } + ] + }, + "/v1/appDeployments/{uid}/profile/tiers/{tierUid}": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the specified application deployment profile tier information", + "operationId": "v1AppDeploymentsProfileTiersUidGet", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1AppTier" + } + } + } + }, + "put": { + "tags": [ + "v1" + ], + "summary": "Updates the specified application deployment profile tier information", + "operationId": "v1AppDeploymentsProfileTiersUidUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1AppTierUpdateEntity" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Application deployment uid", + "name": "uid", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Application deployment tier uid", + "name": "tierUid", + "in": "path", + "required": true + } + ] + }, + "/v1/appDeployments/{uid}/profile/tiers/{tierUid}/manifests": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves a list of manifests of the specified application deployment profile tier", + "operationId": "v1AppDeploymentsProfileTiersUidManifestsGet", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1AppTierManifests" + } + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Application deployment uid", + "name": "uid", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Application deployment tier uid", + "name": "tierUid", + "in": "path", + "required": true + } + ] + }, + "/v1/appDeployments/{uid}/profile/tiers/{tierUid}/manifests/{manifestUid}": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the specified application deployment tier manifest information", + "operationId": "v1AppDeploymentsProfileTiersManifestsUidGet", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1Manifest" + } + } + } + }, + "put": { + "tags": [ + "v1" + ], + "summary": "Updates the specified application deployment tier manifest information", + "operationId": "v1AppDeploymentsProfileTiersManifestsUidUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1ManifestRefUpdateEntity" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Application deployment uid", + "name": "uid", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Application deployment tier uid", + "name": "tierUid", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Application deployment tier manifest uid", + "name": "manifestUid", + "in": "path", + "required": true + } + ] + }, + "/v1/appDeployments/{uid}/profile/versions": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves a list of profile versions of the specified application deployment", + "operationId": "v1AppDeploymentsUidProfileVersionsGet", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1AppDeploymentProfileVersions" + } + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Application deployment uid", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/appProfiles": { + "post": { + "tags": [ + "v1" + ], + "summary": "Creates a application profile", + "operationId": "v1AppProfilesCreate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1AppProfileEntity" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + } + }, + "/v1/appProfiles/macros": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves a list of application profile macros", + "operationId": "v1AppProfilesMacrosList", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1Macros" + } + } + } + } + }, + "/v1/appProfiles/{uid}": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the specified application profile", + "operationId": "v1AppProfilesUidGet", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1AppProfile" + } + } + } + }, + "put": { + "tags": [ + "v1" + ], + "summary": "Updates the specified application profile", + "operationId": "v1AppProfilesUidUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1AppProfileEntity" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "delete": { + "tags": [ + "v1" + ], + "summary": "Deletes the specified application profile", + "operationId": "v1AppProfilesUidDelete", + "responses": { + "204": { + "description": "The resource was deleted successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/appProfiles/{uid}/clone": { + "post": { + "tags": [ + "v1" + ], + "summary": "Clones the specified application profile", + "operationId": "v1AppProfilesUidClone", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1AppProfileCloneEntity" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Application profile uid", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/appProfiles/{uid}/clone/validate": { + "post": { + "tags": [ + "v1" + ], + "summary": "Validates the specified application profile clone", + "operationId": "v1AppProfilesUidCloneValidate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1AppProfileCloneMetaInputEntity" + } + } + ], + "responses": { + "204": { + "description": "Ok response without content", + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Application profile uid", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/appProfiles/{uid}/metadata": { + "patch": { + "tags": [ + "v1" + ], + "summary": "Updates the specified application profile metadata", + "operationId": "v1AppProfilesUidMetadataUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1AppProfileMetaEntity" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Application profile uid", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/appProfiles/{uid}/tiers": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves a list of tiers of the specified application profile", + "operationId": "v1AppProfilesUidTiersGet", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1AppProfileTiers" + } + } + } + }, + "post": { + "tags": [ + "v1" + ], + "summary": "Adds tier to the specified application profile", + "operationId": "v1AppProfilesUidTiersCreate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1AppTierEntity" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + }, + "patch": { + "tags": [ + "v1" + ], + "summary": "Updates app tier of the specified application profile", + "operationId": "v1AppProfilesUidTiersPatch", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1AppTierPatchEntity" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Application profile uid", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/appProfiles/{uid}/tiers/{tierUid}": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the specified application profile tier information", + "operationId": "v1AppProfilesUidTiersUidGet", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1AppTier" + } + } + } + }, + "put": { + "tags": [ + "v1" + ], + "summary": "Updates the specified application profile tier", + "operationId": "v1AppProfilesUidTiersUidUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1AppTierUpdateEntity" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "delete": { + "tags": [ + "v1" + ], + "summary": "Deletes the specified application profile tier", + "operationId": "v1AppProfilesUidTiersUidDelete", + "responses": { + "204": { + "description": "The resource was deleted successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Application profile uid", + "name": "uid", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Application profile tier uid", + "name": "tierUid", + "in": "path", + "required": true + } + ] + }, + "/v1/appProfiles/{uid}/tiers/{tierUid}/manifests": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves a list of manifests of the specified application profile tier", + "operationId": "v1AppProfilesUidTiersUidManifestsGet", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1AppTierManifests" + } + } + } + }, + "post": { + "tags": [ + "v1" + ], + "summary": "Adds manifest to the specified application profile tier", + "operationId": "v1AppProfilesUidTiersUidManifestsCreate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1ManifestInputEntity" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Application profile uid", + "name": "uid", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Application profile tier uid", + "name": "tierUid", + "in": "path", + "required": true + } + ] + }, + "/v1/appProfiles/{uid}/tiers/{tierUid}/manifests/{manifestUid}": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the specified application profile tier manifest information", + "operationId": "v1AppProfilesUidTiersUidManifestsUidGet", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1Manifest" + } + } + } + }, + "put": { + "tags": [ + "v1" + ], + "summary": "Updates the specified application profile tier manifest information", + "operationId": "v1AppProfilesUidTiersUidManifestsUidUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1ManifestRefUpdateEntity" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "delete": { + "tags": [ + "v1" + ], + "summary": "Deletes the specified application profile tier manifest", + "operationId": "v1AppProfilesUidTiersUidManifestsUidDelete", + "responses": { + "204": { + "description": "The resource was deleted successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Application profile uid", + "name": "uid", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Application profile tier uid", + "name": "tierUid", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Application profile tier manifest uid", + "name": "manifestUid", + "in": "path", + "required": true + } + ] + }, + "/v1/appProfiles/{uid}/tiers/{tierUid}/resolvedValues": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the specified application profile tier resolved values", + "operationId": "v1AppProfilesUidTiersUidResolvedValuesGet", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1AppTierResolvedValues" + } + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Application profile uid", + "name": "uid", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Application profile tier uid", + "name": "tierUid", + "in": "path", + "required": true + } + ] + }, + "/v1/audits": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves the list of audit logs", + "operationId": "v1AuditsList", + "parameters": [ + { + "type": "string", + "format": "date-time", + "description": "Time is a wrapper around time.Time which supports correct marshaling to YAML and JSON. Wrappers are provided for many of the factory methods that the time package offers.", + "name": "startTime", + "in": "query" + }, + { + "type": "string", + "format": "date-time", + "description": "Time is a wrapper around time.Time which supports correct marshaling to YAML and JSON. Wrappers are provided for many of the factory methods that the time package offers.", + "name": "endTime", + "in": "query" + }, + { + "type": "string", + "description": "Specify the user uid, to retrieve the specific user audit logs", + "name": "userUid", + "in": "query" + }, + { + "type": "string", + "description": "Specify the project uid, to retrieve the specific project audit logs", + "name": "projectUid", + "in": "query" + }, + { + "type": "string", + "description": "Specify the tenant uid, to retrieve the specific tenant audit logs", + "name": "tenantUid", + "in": "query" + }, + { + "type": "string", + "description": "Specify the resource name, to retrieve the specific resource audit logs", + "name": "resourceKind", + "in": "query" + }, + { + "type": "string", + "description": "Specify the resource uid, to retrieve the specific resource audit logs", + "name": "resourceUid", + "in": "query" + }, + { + "enum": [ + "create", + "update", + "delete", + "publish", + "deploy" + ], + "type": "string", + "name": "actionType", + "in": "query" + }, + { + "type": "integer", + "format": "int64", + "default": 50, + "description": "limit is a maximum number of responses to return for a list call. Default and maximum value of the limit is 50.\nIf more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results.", + "name": "limit", + "in": "query" + }, + { + "type": "integer", + "format": "int64", + "description": "offset is the next index number from which the response will start. The response offset value can be used along with continue token for the pagination.", + "name": "offset", + "in": "query" + }, + { + "type": "string", + "description": "continue token to paginate the subsequent data items", + "name": "continue", + "in": "query" + } + ], + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1Audits" + } + } + } + } + }, + "/v1/audits/{uid}": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the specified audit log", + "operationId": "v1AuditsUidGet", + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1Audit" + } + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Specify the audit uid", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/audits/{uid}/sysMsg": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the specified system audit message", + "operationId": "v1AuditsUidGetSysMsg", + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1AuditSysMsg" + } + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Specify the audit uid", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/audits/{uid}/userMsg": { + "patch": { + "tags": [ + "v1" + ], + "summary": "Updates the specified user message for the specified audit", + "operationId": "v1AuditsUidMsgUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1AuditMsgUpdate" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Specify the audit uid", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/auth/authenticate": { + "post": { + "description": "Creates a authentication request with the specified credentials", + "tags": [ + "v1" + ], + "summary": "Authenticates the user for the specified crendentials", + "operationId": "v1Authenticate", + "parameters": [ + { + "type": "boolean", + "default": true, + "description": "Describes a way to set cookie from backend.", + "name": "setCookie", + "in": "query" + }, + { + "description": "Describes the credential details required for authentication", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1AuthLogin" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1UserToken" + } + } + } + } + }, + "/v1/auth/org": { + "get": { + "description": "Returns the allowed login method and information with the organization details", + "tags": [ + "v1" + ], + "summary": "Returns the user organization details", + "operationId": "v1AuthOrg", + "parameters": [ + { + "type": "string", + "name": "orgName", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1LoginResponse" + } + } + } + } + }, + "/v1/auth/org/{org}/oidc/callback": { + "get": { + "description": "Returns the Authorization token for the palette. This is called by the IDP as a callback url after IDP authenticates the user with its server.", + "tags": [ + "v1" + ], + "summary": "Idp authorization code callback", + "operationId": "V1OidcCallback", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1UserToken" + } + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Organization name", + "name": "org", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Describes temporary and very short lived code sent by IDP to validate the token", + "name": "code", + "in": "query" + }, + { + "type": "string", + "description": "Describes a state to validate and associate request and response", + "name": "state", + "in": "query" + }, + { + "type": "string", + "description": "Describes a error code in case the IDP is not able to validate and authenticates the user", + "name": "error", + "in": "query" + }, + { + "type": "string", + "description": "Describes a error in case the IDP is not able to validate and authenticates the user", + "name": "error_description", + "in": "query" + } + ] + }, + "/v1/auth/org/{org}/oidc/logout": { + "get": { + "description": "Returns No Content. Works as a callback url after the IDP logout from their server.", + "tags": [ + "v1" + ], + "summary": "Identity provider logout url for the Oidc", + "operationId": "V1OidcLogout", + "responses": { + "204": { + "description": "Ok response without content", + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Organization name", + "name": "org", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Describes a state to validate and associate request and response", + "name": "state", + "in": "query" + } + ] + }, + "/v1/auth/org/{org}/saml/callback": { + "post": { + "description": "Returns the Authorization token for the palette. This is called by the SAML based IDP as a callback url after IDP authenticates the user with its server.", + "consumes": [ + "application/x-www-form-urlencoded" + ], + "tags": [ + "v1" + ], + "summary": "Identity provider callback url for the SMAL authentication", + "operationId": "V1SamlCallback", + "parameters": [ + { + "type": "string", + "description": "Describe the SAML compliant response sent by IDP which will be validated by Palette", + "name": "SAMLResponse", + "in": "formData" + }, + { + "type": "string", + "description": "Describes a state to validate and associate request and response", + "name": "RelayState", + "in": "formData" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1UserToken" + } + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Organization name", + "name": "org", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Deprecated.", + "name": "authToken", + "in": "query" + } + ] + }, + "/v1/auth/org/{org}/saml/logout": { + "post": { + "description": "Returns No Content. Works as a callback url after the IDP logout from their server.", + "consumes": [ + "application/x-www-form-urlencoded" + ], + "tags": [ + "v1" + ], + "summary": "Identity provider logout url for the SMAL", + "operationId": "V1SamlLogout", + "parameters": [ + { + "type": "string", + "description": "Describe the SAML compliant response sent by IDP which will be validated by Palette to perform logout.", + "name": "SAMLResponse", + "in": "formData" + } + ], + "responses": { + "204": { + "description": "Ok response without content", + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Organization name", + "name": "org", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Deprecated.", + "name": "authToken", + "in": "query" + } + ] + }, + "/v1/auth/orgs": { + "get": { + "description": "Returns a list of user's organizations details and login methods", + "tags": [ + "v1" + ], + "summary": "Returns a list of user's organizations", + "operationId": "V1AuthOrgs", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1Organizations" + } + } + } + } + }, + "/v1/auth/password/{passwordToken}/activate": { + "patch": { + "description": "Updates and Activates user password with the help of password token", + "tags": [ + "v1" + ], + "summary": "Updates and Activates the specified user password using the password token", + "operationId": "v1PasswordActivate", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "type": "object", + "required": [ + "password" + ], + "properties": { + "password": { + "description": "Describes the new password for the user", + "type": "string", + "format": "password" + } + } + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Describes the expirable password token for the user to be used for authentication of user", + "name": "passwordToken", + "in": "path", + "required": true + } + ] + }, + "/v1/auth/password/{passwordToken}/reset": { + "patch": { + "description": "Updates the new user password with the help of password token", + "tags": [ + "v1" + ], + "summary": "Resets the user password using the password token", + "operationId": "v1PasswordReset", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "type": "object", + "required": [ + "password" + ], + "properties": { + "password": { + "description": "Describes the new password for the user", + "type": "string", + "format": "password" + } + } + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Describes the expirable password token for the user to be used for authentication of user", + "name": "passwordToken", + "in": "path", + "required": true + } + ] + }, + "/v1/auth/refresh/{token}": { + "get": { + "description": "Returns a new token within refresh timeout and same session id is maintained", + "tags": [ + "v1" + ], + "summary": "Refreshes authentication token", + "operationId": "v1AuthRefresh", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1UserToken" + } + } + } + }, + "parameters": [ + { + "type": "boolean", + "default": true, + "description": "Describes a way to set cookie from backend.", + "name": "setCookie", + "in": "query" + }, + { + "type": "string", + "description": "Non expired Authorization token", + "name": "token", + "in": "path", + "required": true + } + ] + }, + "/v1/auth/sso/idps": { + "get": { + "description": "Returns a list of predefined Identity Provider (IDP)", + "tags": [ + "v1" + ], + "summary": "Returns a list of predefined Identity Provider (IDP)", + "operationId": "V1SsoIdps", + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1IdentityProviders" + } + } + } + } + }, + "/v1/auth/sso/logins": { + "get": { + "description": "Returns a list of supported sso logins and their authentication mechanism", + "tags": [ + "v1" + ], + "summary": "Returns a list of supported sso logins", + "operationId": "V1SsoLogins", + "parameters": [ + { + "type": "string", + "name": "org", + "in": "query" + } + ], + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1SsoLogins" + } + } + } + } + }, + "/v1/auth/sso/providers": { + "get": { + "description": "Returns a list of supported sso auth providers", + "tags": [ + "v1" + ], + "summary": "Returns a list of supported sso auth providers", + "operationId": "V1AuthSsoProviders", + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1SsoLogins" + } + } + } + } + }, + "/v1/auth/sso/{ssoApp}/callback": { + "get": { + "description": "Returns Authorization token. Works as a callback url for the system defined sso apps", + "tags": [ + "v1" + ], + "summary": "Returns Authorization token. Works as a callback url for the system defined sso apps", + "operationId": "V1SsoCallback", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1UserToken" + } + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Describes the sso app use to login into the system", + "name": "ssoApp", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Describes temporary and very short lived code sent by IDP to validate the token", + "name": "code", + "in": "query" + }, + { + "type": "string", + "description": "Describes a state to validate and associate request and response", + "name": "state", + "in": "query" + }, + { + "type": "string", + "description": "Describes a error code in case the IDP is not able to validate and authenticates the user", + "name": "error", + "in": "query" + }, + { + "type": "string", + "description": "Describes a error in case the IDP is not able to validate and authenticates the user", + "name": "error_description", + "in": "query" + } + ] + }, + "/v1/auth/user/org/forgot": { + "get": { + "description": "Returns No Content. Sends the user organization(s) information via email", + "tags": [ + "v1" + ], + "summary": "Returns No Content. Sends the user organization information via email", + "operationId": "V1AuthUserOrgForgot", + "parameters": [ + { + "type": "string", + "description": "Describes user's email id for sending organzation(s) details via email.", + "name": "emailId", + "in": "query", + "required": true + } + ], + "responses": { + "204": { + "description": "Ok response without content", + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + } + }, + "/v1/auth/user/password/reset": { + "post": { + "description": "Creates request to reset password via email. Password reset email will be sent to the user. Sends 204 No Content.", + "tags": [ + "v1" + ], + "summary": "Creates request to reset password via email", + "operationId": "v1PasswordResetRequest", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "type": "object", + "required": [ + "emailId" + ], + "properties": { + "emailId": { + "description": "Describes email if for which password reset email has to be sent", + "type": "string" + } + } + } + } + ], + "responses": { + "204": { + "description": "Ok response without content", + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + } + }, + "/v1/cloudaccounts/aws": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves a list of AWS cloud accounts", + "operationId": "v1CloudAccountsAwsList", + "parameters": [ + { + "type": "string", + "description": "Set of fields to be presented in the response with values. The fields are comma separated. Eg: metadata.uid,metadata.name", + "name": "fields", + "in": "query" + }, + { + "type": "string", + "description": "Filters can be combined with AND, OR operators with field path name. Eg: metadata.name=TestServiceANDspec.cloudType=aws\n\nServer will be restricted to certain fields based on the indexed data for each resource.", + "name": "filters", + "in": "query" + }, + { + "type": "string", + "description": "Specify the fields with sort order. 1 indicates ascending and -1 for descending. Eg: orderBy=metadata.name=1,metadata.uid=-1", + "name": "orderBy", + "in": "query" + }, + { + "type": "integer", + "format": "int64", + "default": 50, + "description": "limit is a maximum number of responses to return for a list call. Default and maximum value of the limit is 50.\nIf more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results.", + "name": "limit", + "in": "query" + }, + { + "type": "integer", + "format": "int64", + "description": "offset is the next index number from which the response will start. The response offset value can be used along with continue token for the pagination.", + "name": "offset", + "in": "query" + }, + { + "type": "string", + "description": "continue token to paginate the subsequent data items", + "name": "continue", + "in": "query" + } + ], + "responses": { + "200": { + "description": "An array of cloud account items", + "schema": { + "$ref": "#/definitions/v1AwsAccounts" + } + } + } + }, + "post": { + "tags": [ + "v1" + ], + "summary": "Creates an AWS cloud account", + "operationId": "v1CloudAccountsAwsCreate", + "parameters": [ + { + "description": "Request payload to validate AWS cloud account", + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1AwsAccount" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + } + }, + "/v1/cloudaccounts/aws/{uid}": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the specified AWS account", + "operationId": "v1CloudAccountsAwsGet", + "parameters": [ + { + "type": "boolean", + "default": false, + "name": "assumeCredentials", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1AwsAccount" + } + } + } + }, + "put": { + "tags": [ + "v1" + ], + "summary": "Updates the specified AWS account", + "operationId": "v1CloudAccountsAwsUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1AwsAccount" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "delete": { + "tags": [ + "v1" + ], + "summary": "Deletes the specified AWS account", + "operationId": "v1CloudAccountsAwsDelete", + "responses": { + "204": { + "description": "The resource was deleted successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "AWS cloud account uid", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/cloudaccounts/azure": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves a list of azure cloud accounts", + "operationId": "v1CloudAccountsAzureList", + "parameters": [ + { + "type": "string", + "description": "Set of fields to be presented in the response with values. The fields are comma separated. Eg: metadata.uid,metadata.name", + "name": "fields", + "in": "query" + }, + { + "type": "string", + "description": "Filters can be combined with AND, OR operators with field path name. Eg: metadata.name=TestServiceANDspec.cloudType=aws\n\nServer will be restricted to certain fields based on the indexed data for each resource.", + "name": "filters", + "in": "query" + }, + { + "type": "string", + "description": "Specify the fields with sort order. 1 indicates ascending and -1 for descending. Eg: orderBy=metadata.name=1,metadata.uid=-1", + "name": "orderBy", + "in": "query" + }, + { + "type": "integer", + "format": "int64", + "default": 50, + "description": "limit is a maximum number of responses to return for a list call. Default and maximum value of the limit is 50.\nIf more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results.", + "name": "limit", + "in": "query" + }, + { + "type": "integer", + "format": "int64", + "description": "offset is the next index number from which the response will start. The response offset value can be used along with continue token for the pagination.", + "name": "offset", + "in": "query" + }, + { + "type": "string", + "description": "continue token to paginate the subsequent data items", + "name": "continue", + "in": "query" + } + ], + "responses": { + "200": { + "description": "An array of azure cloud account items", + "schema": { + "$ref": "#/definitions/v1AzureAccounts" + } + } + } + }, + "post": { + "tags": [ + "v1" + ], + "summary": "Create azure cloud account", + "operationId": "v1CloudAccountsAzureCreate", + "parameters": [ + { + "description": "Request payload to validate Azure cloud account", + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1AzureAccount" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + } + }, + "/v1/cloudaccounts/azure/{uid}": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the specified azure cloud account", + "operationId": "v1CloudAccountsAzureGet", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1AzureAccount" + } + } + } + }, + "put": { + "tags": [ + "v1" + ], + "summary": "Updates the specified azure account", + "operationId": "v1CloudAccountsAzureUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1AzureAccount" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "delete": { + "tags": [ + "v1" + ], + "summary": "Deletes the specified azure account", + "operationId": "v1CloudAccountsAzureDelete", + "responses": { + "204": { + "description": "The resource was deleted successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Azure cloud account uid", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/cloudaccounts/cloudTypes/{cloudType}": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves a list of cloud accounts by cloud type", + "operationId": "v1CloudAccountsCustomList", + "parameters": [ + { + "type": "string", + "description": "Set of fields to be presented in the response with values. The fields are comma separated. Eg: metadata.uid,metadata.name", + "name": "fields", + "in": "query" + }, + { + "type": "string", + "description": "Filters can be combined with AND, OR operators with field path name. Eg: metadata.name=TestServiceANDspec.cloudType=aws\n\nServer will be restricted to certain fields based on the indexed data for each resource.", + "name": "filters", + "in": "query" + }, + { + "type": "string", + "description": "Specify the fields with sort order. 1 indicates ascending and -1 for descending. Eg: orderBy=metadata.name=1,metadata.uid=-1", + "name": "orderBy", + "in": "query" + }, + { + "type": "integer", + "format": "int64", + "default": 50, + "description": "limit is a maximum number of responses to return for a list call. Default and maximum value of the limit is 50.\nIf more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results.", + "name": "limit", + "in": "query" + }, + { + "type": "integer", + "format": "int64", + "description": "offset is the next index number from which the response will start. The response offset value can be used along with continue token for the pagination.", + "name": "offset", + "in": "query" + }, + { + "type": "string", + "description": "continue token to paginate the subsequent data items", + "name": "continue", + "in": "query" + } + ], + "responses": { + "200": { + "description": "An array of cloud account by specified cloud type items", + "schema": { + "$ref": "#/definitions/v1CustomAccounts" + } + } + } + }, + "post": { + "tags": [ + "v1" + ], + "summary": "Creates an cloud account of specific cloud type", + "operationId": "v1CloudAccountsCustomCreate", + "parameters": [ + { + "description": "Request payload to validate Custom cloud account", + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1CustomAccountEntity" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Custom cloud type", + "name": "cloudType", + "in": "path", + "required": true + } + ] + }, + "/v1/cloudaccounts/cloudTypes/{cloudType}/{uid}": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the specified account by cloud type", + "operationId": "v1CloudAccountsCustomGet", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1CustomAccount" + } + } + } + }, + "put": { + "tags": [ + "v1" + ], + "summary": "Updates the specified account by cloud type", + "operationId": "v1CloudAccountsCustomUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1CustomAccountEntity" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "delete": { + "tags": [ + "v1" + ], + "summary": "Deletes the specified account by cloud type", + "operationId": "v1CloudAccountsCustomDelete", + "responses": { + "204": { + "description": "The resource was deleted successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Custom cloud account uid", + "name": "uid", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Custom cloud type", + "name": "cloudType", + "in": "path", + "required": true + } + ] + }, + "/v1/cloudaccounts/gcp": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves a list of gcp cloud accounts", + "operationId": "v1CloudAccountsGcpList", + "parameters": [ + { + "type": "string", + "description": "Set of fields to be presented in the response with values. The fields are comma separated. Eg: metadata.uid,metadata.name", + "name": "fields", + "in": "query" + }, + { + "type": "string", + "description": "Filters can be combined with AND, OR operators with field path name. Eg: metadata.name=TestServiceANDspec.cloudType=aws\n\nServer will be restricted to certain fields based on the indexed data for each resource.", + "name": "filters", + "in": "query" + }, + { + "type": "string", + "description": "Specify the fields with sort order. 1 indicates ascending and -1 for descending. Eg: orderBy=metadata.name=1,metadata.uid=-1", + "name": "orderBy", + "in": "query" + }, + { + "type": "integer", + "format": "int64", + "default": 50, + "description": "limit is a maximum number of responses to return for a list call. Default and maximum value of the limit is 50.\nIf more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results.", + "name": "limit", + "in": "query" + }, + { + "type": "integer", + "format": "int64", + "description": "offset is the next index number from which the response will start. The response offset value can be used along with continue token for the pagination.", + "name": "offset", + "in": "query" + }, + { + "type": "string", + "description": "continue token to paginate the subsequent data items", + "name": "continue", + "in": "query" + } + ], + "responses": { + "200": { + "description": "An array of gcp cloud account items", + "schema": { + "$ref": "#/definitions/v1GcpAccounts" + } + } + } + }, + "post": { + "tags": [ + "v1" + ], + "summary": "Creates a GCP cloud account", + "operationId": "v1CloudAccountsGcpCreate", + "parameters": [ + { + "description": "Request payload to validate GCP cloud account", + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1GcpAccountEntity" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + } + }, + "/v1/cloudaccounts/gcp/{uid}": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the specified GCP cloud account", + "operationId": "v1CloudAccountsGcpGet", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1GcpAccount" + } + } + } + }, + "put": { + "tags": [ + "v1" + ], + "summary": "Updates the specified GCP account", + "operationId": "v1CloudAccountsGcpUpdate", + "parameters": [ + { + "description": "Request payload to validate GCP cloud account", + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1GcpAccountEntity" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "delete": { + "tags": [ + "v1" + ], + "summary": "Deletes the specified GCP account", + "operationId": "v1CloudAccountsGcpDelete", + "responses": { + "204": { + "description": "The resource was deleted successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "GCP cloud account uid", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/cloudaccounts/maas": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves a list of Maas cloud accounts", + "operationId": "v1CloudAccountsMaasList", + "parameters": [ + { + "type": "string", + "description": "Set of fields to be presented in the response with values. The fields are comma separated. Eg: metadata.uid,metadata.name", + "name": "fields", + "in": "query" + }, + { + "type": "string", + "description": "Filters can be combined with AND, OR operators with field path name. Eg: metadata.name=TestServiceANDspec.cloudType=aws\n\nServer will be restricted to certain fields based on the indexed data for each resource.", + "name": "filters", + "in": "query" + }, + { + "type": "string", + "description": "Specify the fields with sort order. 1 indicates ascending and -1 for descending. Eg: orderBy=metadata.name=1,metadata.uid=-1", + "name": "orderBy", + "in": "query" + }, + { + "type": "integer", + "format": "int64", + "default": 50, + "description": "limit is a maximum number of responses to return for a list call. Default and maximum value of the limit is 50.\nIf more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results.", + "name": "limit", + "in": "query" + }, + { + "type": "integer", + "format": "int64", + "description": "offset is the next index number from which the response will start. The response offset value can be used along with continue token for the pagination.", + "name": "offset", + "in": "query" + }, + { + "type": "string", + "description": "continue token to paginate the subsequent data items", + "name": "continue", + "in": "query" + } + ], + "responses": { + "200": { + "description": "An array of cloud account items", + "schema": { + "$ref": "#/definitions/v1MaasAccounts" + } + } + } + }, + "post": { + "tags": [ + "v1" + ], + "summary": "Creates an Maas cloud account", + "operationId": "v1CloudAccountsMaasCreate", + "parameters": [ + { + "description": "Request payload to validate Maas cloud account", + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1MaasAccount" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + } + }, + "/v1/cloudaccounts/maas/{uid}": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the specified Maas account", + "operationId": "v1CloudAccountsMaasGet", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1MaasAccount" + } + } + } + }, + "put": { + "tags": [ + "v1" + ], + "summary": "Updates the specified Maas account", + "operationId": "v1CloudAccountsMaasUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1MaasAccount" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "delete": { + "tags": [ + "v1" + ], + "summary": "Deletes the specified Maas account", + "operationId": "v1CloudAccountsMaasDelete", + "responses": { + "204": { + "description": "The resource was deleted successfully" + } + } + }, + "patch": { + "tags": [ + "v1" + ], + "summary": "Patches the specified CloudAccount Maas", + "operationId": "v1CloudAccountsMaasPatch", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1CloudAccountsPatch" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Maas cloud account uid", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/cloudaccounts/maas/{uid}/properties/azs": { + "get": { + "tags": [ + "v1" + ], + "summary": "Get the maas azs for a given account", + "operationId": "v1MaasAccountsUidAzs", + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1MaasZones" + } + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/cloudaccounts/maas/{uid}/properties/domains": { + "get": { + "tags": [ + "v1" + ], + "summary": "Get the maas domains for a given account", + "operationId": "v1MaasAccountsUidDomains", + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1MaasDomains" + } + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/cloudaccounts/maas/{uid}/properties/resourcePools": { + "get": { + "tags": [ + "v1" + ], + "summary": "Get the maas pools for a given account", + "operationId": "v1MaasAccountsUidPools", + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1MaasPools" + } + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/cloudaccounts/maas/{uid}/properties/subnets": { + "get": { + "tags": [ + "v1" + ], + "summary": "Get the maas subnets for a given account", + "operationId": "v1MaasAccountsUidSubnets", + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1MaasSubnets" + } + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/cloudaccounts/maas/{uid}/properties/tags": { + "get": { + "tags": [ + "v1" + ], + "summary": "Get the maas tags for a given account", + "operationId": "v1MaasAccountsUidTags", + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1MaasTags" + } + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/cloudaccounts/openstack": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves a list of OpenStack cloud accounts", + "operationId": "v1CloudAccountsOpenStackList", + "parameters": [ + { + "type": "string", + "description": "Set of fields to be presented in the response with values. The fields are comma separated. Eg: metadata.uid,metadata.name", + "name": "fields", + "in": "query" + }, + { + "type": "string", + "description": "Filters can be combined with AND, OR operators with field path name. Eg: metadata.name=TestServiceANDspec.cloudType=aws\n\nServer will be restricted to certain fields based on the indexed data for each resource.", + "name": "filters", + "in": "query" + }, + { + "type": "string", + "description": "Specify the fields with sort order. 1 indicates ascending and -1 for descending. Eg: orderBy=metadata.name=1,metadata.uid=-1", + "name": "orderBy", + "in": "query" + }, + { + "type": "integer", + "format": "int64", + "default": 50, + "description": "limit is a maximum number of responses to return for a list call. Default and maximum value of the limit is 50.\nIf more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results.", + "name": "limit", + "in": "query" + }, + { + "type": "integer", + "format": "int64", + "description": "offset is the next index number from which the response will start. The response offset value can be used along with continue token for the pagination.", + "name": "offset", + "in": "query" + }, + { + "type": "string", + "description": "continue token to paginate the subsequent data items", + "name": "continue", + "in": "query" + } + ], + "responses": { + "200": { + "description": "An array of cloud account items", + "schema": { + "$ref": "#/definitions/v1OpenStackAccounts" + } + } + } + }, + "post": { + "tags": [ + "v1" + ], + "summary": "Creates a OpenStack cloud account", + "operationId": "v1CloudAccountsOpenStackCreate", + "parameters": [ + { + "description": "Request payload to validate OpenStack cloud account", + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1OpenStackAccount" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + } + }, + "/v1/cloudaccounts/openstack/{uid}": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the specified OpenStack account", + "operationId": "v1CloudAccountsOpenStackGet", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1OpenStackAccount" + } + } + } + }, + "put": { + "tags": [ + "v1" + ], + "summary": "Updates the specified OpenStack account", + "operationId": "v1CloudAccountsOpenStackUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1OpenStackAccount" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "delete": { + "tags": [ + "v1" + ], + "summary": "Deletes the specified OpenStack account", + "operationId": "v1CloudAccountsOpenStackDelete", + "responses": { + "204": { + "description": "The resource was deleted successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "OpenStack cloud account uid", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/cloudaccounts/openstack/{uid}/properties/azs": { + "get": { + "tags": [ + "v1" + ], + "summary": "Get the openstack azs for a given account and region", + "operationId": "v1OpenstackAccountsUidAzs", + "parameters": [ + { + "type": "string", + "name": "region", + "in": "query" + }, + { + "type": "string", + "name": "project", + "in": "query" + }, + { + "type": "string", + "name": "domain", + "in": "query" + } + ], + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1OpenStackAzs" + } + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/cloudaccounts/openstack/{uid}/properties/flavors": { + "get": { + "tags": [ + "v1" + ], + "summary": "Get the openstack keypairs for a given account and scope", + "operationId": "v1OpenstackAccountsUidFlavors", + "parameters": [ + { + "type": "string", + "name": "project", + "in": "query" + }, + { + "type": "string", + "name": "region", + "in": "query" + }, + { + "type": "string", + "name": "domain", + "in": "query" + } + ], + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1OpenStackFlavors" + } + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/cloudaccounts/openstack/{uid}/properties/keypairs": { + "get": { + "tags": [ + "v1" + ], + "summary": "Get the openstack keypairs for a given account and scope", + "operationId": "v1OpenstackAccountsUidKeypairs", + "parameters": [ + { + "type": "string", + "name": "project", + "in": "query" + }, + { + "type": "string", + "name": "region", + "in": "query" + }, + { + "type": "string", + "name": "domain", + "in": "query" + } + ], + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1OpenStackKeypairs" + } + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/cloudaccounts/openstack/{uid}/properties/networks": { + "get": { + "tags": [ + "v1" + ], + "summary": "Get the openstack networks for a given account and scope", + "operationId": "v1OpenstackAccountsUidNetworks", + "parameters": [ + { + "type": "string", + "name": "project", + "in": "query" + }, + { + "type": "string", + "name": "region", + "in": "query" + }, + { + "type": "string", + "name": "domain", + "in": "query" + } + ], + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1OpenStackNetworks" + } + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/cloudaccounts/openstack/{uid}/properties/projects": { + "get": { + "tags": [ + "v1" + ], + "summary": "Get the openstack projects for a given account", + "operationId": "v1OpenstackAccountsUidProjects", + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1OpenStackProjects" + } + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/cloudaccounts/openstack/{uid}/properties/regions": { + "get": { + "tags": [ + "v1" + ], + "summary": "Get the openstack regions for a given account", + "operationId": "v1OpenstackAccountsUidRegions", + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1OpenStackRegions" + } + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/cloudaccounts/summary": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves a list of cloud accounts summary", + "operationId": "v1CloudAccountsListSummary", + "parameters": [ + { + "type": "string", + "description": "Filters can be combined with AND, OR operators with field path name. Eg: metadata.name=TestServiceANDspec.cloudType=aws\n\nServer will be restricted to certain fields based on the indexed data for each resource.", + "name": "filters", + "in": "query" + }, + { + "type": "string", + "description": "Specify the fields with sort order. 1 indicates ascending and -1 for descending. Eg: orderBy=metadata.name=1,metadata.uid=-1", + "name": "orderBy", + "in": "query" + }, + { + "type": "integer", + "format": "int64", + "default": 50, + "description": "limit is a maximum number of responses to return for a list call. Default and maximum value of the limit is 50.\nIf more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results.", + "name": "limit", + "in": "query" + }, + { + "type": "integer", + "format": "int64", + "description": "offset is the next index number from which the response will start. The response offset value can be used along with continue token for the pagination.", + "name": "offset", + "in": "query" + }, + { + "type": "string", + "description": "continue token to paginate the subsequent data items", + "name": "continue", + "in": "query" + } + ], + "responses": { + "200": { + "description": "An array of cloud account summary items", + "schema": { + "$ref": "#/definitions/v1CloudAccountsSummary" + } + } + } + } + }, + "/v1/cloudaccounts/tencent": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves a list of Tencent cloud accounts", + "operationId": "v1CloudAccountsTencentList", + "parameters": [ + { + "type": "string", + "description": "Set of fields to be presented in the response with values. The fields are comma separated. Eg: metadata.uid,metadata.name", + "name": "fields", + "in": "query" + }, + { + "type": "string", + "description": "Filters can be combined with AND, OR operators with field path name. Eg: metadata.name=TestServiceANDspec.cloudType=aws\n\nServer will be restricted to certain fields based on the indexed data for each resource.", + "name": "filters", + "in": "query" + }, + { + "type": "string", + "description": "Specify the fields with sort order. 1 indicates ascending and -1 for descending. Eg: orderBy=metadata.name=1,metadata.uid=-1", + "name": "orderBy", + "in": "query" + }, + { + "type": "integer", + "format": "int64", + "default": 50, + "description": "limit is a maximum number of responses to return for a list call. Default and maximum value of the limit is 50.\nIf more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results.", + "name": "limit", + "in": "query" + }, + { + "type": "integer", + "format": "int64", + "description": "offset is the next index number from which the response will start. The response offset value can be used along with continue token for the pagination.", + "name": "offset", + "in": "query" + }, + { + "type": "string", + "description": "continue token to paginate the subsequent data items", + "name": "continue", + "in": "query" + } + ], + "responses": { + "200": { + "description": "An array of cloud account items", + "schema": { + "$ref": "#/definitions/v1TencentAccounts" + } + } + } + }, + "post": { + "tags": [ + "v1" + ], + "summary": "Creates an Tencent cloud account", + "operationId": "v1CloudAccountsTencentCreate", + "parameters": [ + { + "description": "Request payload to validate Tencent cloud account", + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1TencentAccount" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + } + }, + "/v1/cloudaccounts/tencent/{uid}": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the specified Tencent account", + "operationId": "v1CloudAccountsTencentGet", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1TencentAccount" + } + } + } + }, + "put": { + "tags": [ + "v1" + ], + "summary": "Updates the specified Tencent account", + "operationId": "v1CloudAccountsTencentUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1TencentAccount" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "delete": { + "tags": [ + "v1" + ], + "summary": "Deletes the specified Tencent account", + "operationId": "v1CloudAccountsTencentDelete", + "responses": { + "204": { + "description": "The resource was deleted successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Tencent cloud account uid", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/cloudaccounts/vsphere": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves a list of vSphere cloud accounts", + "operationId": "v1CloudAccountsVsphereList", + "parameters": [ + { + "type": "string", + "description": "Set of fields to be presented in the response with values. The fields are comma separated. Eg: metadata.uid,metadata.name", + "name": "fields", + "in": "query" + }, + { + "type": "string", + "description": "Filters can be combined with AND, OR operators with field path name. Eg: metadata.name=TestServiceANDspec.cloudType=aws\n\nServer will be restricted to certain fields based on the indexed data for each resource.", + "name": "filters", + "in": "query" + }, + { + "type": "string", + "description": "Specify the fields with sort order. 1 indicates ascending and -1 for descending. Eg: orderBy=metadata.name=1,metadata.uid=-1", + "name": "orderBy", + "in": "query" + }, + { + "type": "integer", + "format": "int64", + "default": 50, + "description": "limit is a maximum number of responses to return for a list call. Default and maximum value of the limit is 50.\nIf more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results.", + "name": "limit", + "in": "query" + }, + { + "type": "integer", + "format": "int64", + "description": "offset is the next index number from which the response will start. The response offset value can be used along with continue token for the pagination.", + "name": "offset", + "in": "query" + }, + { + "type": "string", + "description": "continue token to paginate the subsequent data items", + "name": "continue", + "in": "query" + } + ], + "responses": { + "200": { + "description": "An array of cloud account items", + "schema": { + "$ref": "#/definitions/v1VsphereAccounts" + } + } + } + }, + "post": { + "tags": [ + "v1" + ], + "summary": "Creates a vSphere cloud account", + "operationId": "v1CloudAccountsVsphereCreate", + "parameters": [ + { + "description": "Request payload to validate VSphere cloud account", + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1VsphereAccount" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + } + }, + "/v1/cloudaccounts/vsphere/{uid}": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the specified vSphere account", + "operationId": "v1CloudAccountsVsphereGet", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1VsphereAccount" + } + } + } + }, + "put": { + "tags": [ + "v1" + ], + "summary": "Updates the specified VSphere account", + "operationId": "v1CloudAccountsVsphereUpdate", + "parameters": [ + { + "description": "Request payload to validate VSphere cloud account", + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1VsphereAccount" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "delete": { + "tags": [ + "v1" + ], + "summary": "Deletes the specified vSphere account", + "operationId": "v1CloudAccountsVsphereDelete", + "responses": { + "204": { + "description": "The resource was deleted successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "VSphere cloud account uid", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/cloudaccounts/vsphere/{uid}/properties/computecluster/resources": { + "get": { + "tags": [ + "v1" + ], + "summary": "Get the vSphere computecluster resources for the given overlord account", + "operationId": "v1VsphereAccountsUidClusterRes", + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1VsphereComputeClusterResources" + } + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + }, + { + "type": "string", + "name": "datacenter", + "in": "query", + "required": true + }, + { + "type": "string", + "name": "computecluster", + "in": "query", + "required": true + }, + { + "type": "boolean", + "name": "useQualifiedNetworkName", + "in": "query" + } + ] + }, + "/v1/cloudaccounts/vsphere/{uid}/properties/datacenters": { + "get": { + "tags": [ + "v1" + ], + "summary": "Get the vSphere datacenters \u0026 datacluster for the given overlord account", + "operationId": "v1VsphereAccountsUidDatacenters", + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1VsphereDatacenters" + } + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/cloudaccounts/{uid}/geoLocation": { + "patch": { + "tags": [ + "v1" + ], + "summary": "Update the geolocation annotation", + "operationId": "v1AccountsGeolocationPatch", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1GeolocationLatlong" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/cloudconfigs/aks/{configUid}": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the specified AKS cloud config", + "operationId": "v1CloudConfigsAksGet", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1AzureCloudConfig" + } + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster's cloud config uid", + "name": "configUid", + "in": "path", + "required": true + } + ] + }, + "/v1/cloudconfigs/aks/{configUid}/clusterConfig": { + "put": { + "tags": [ + "v1" + ], + "summary": "Updates the cluster configuration information", + "operationId": "v1CloudConfigsAksUidClusterConfig", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1AzureCloudClusterConfigEntity" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster's cloud config uid", + "name": "configUid", + "in": "path", + "required": true + } + ] + }, + "/v1/cloudconfigs/aks/{configUid}/machinePools": { + "post": { + "tags": [ + "v1" + ], + "summary": "Creates an AKS cloud config's machine pool", + "operationId": "v1CloudConfigsAksMachinePoolCreate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1AzureMachinePoolConfigEntity" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster's cloud config uid", + "name": "configUid", + "in": "path", + "required": true + } + ] + }, + "/v1/cloudconfigs/aks/{configUid}/machinePools/{machinePoolName}": { + "put": { + "tags": [ + "v1" + ], + "summary": "Updates the specified AKS cloud config's machine pool", + "operationId": "v1CloudConfigsAksMachinePoolUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1AzureMachinePoolConfigEntity" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "delete": { + "tags": [ + "v1" + ], + "summary": "Deletes the specified machine pool", + "operationId": "v1CloudConfigsAksMachinePoolDelete", + "responses": { + "204": { + "description": "The resource was deleted successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster's cloud config uid", + "name": "configUid", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Machine pool name", + "name": "machinePoolName", + "in": "path", + "required": true + } + ] + }, + "/v1/cloudconfigs/aks/{configUid}/machinePools/{machinePoolName}/machines": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves a list of AKS machines", + "operationId": "v1CloudConfigsAksPoolMachinesList", + "parameters": [ + { + "type": "string", + "description": "Set of fields to be presented in the response with values. The fields are comma separated. Eg: metadata.uid,metadata.name", + "name": "fields", + "in": "query" + }, + { + "type": "string", + "description": "Filters can be combined with AND, OR operators with field path name. Eg: metadata.name=TestServiceANDspec.cloudType=aws\n\nServer will be restricted to certain fields based on the indexed data for each resource.", + "name": "filters", + "in": "query" + }, + { + "type": "string", + "description": "Specify the fields with sort order. 1 indicates ascending and -1 for descending. Eg: orderBy=metadata.name=1,metadata.uid=-1", + "name": "orderBy", + "in": "query" + }, + { + "type": "integer", + "format": "int64", + "default": 50, + "description": "limit is a maximum number of responses to return for a list call. Default and maximum value of the limit is 50.\nIf more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results.", + "name": "limit", + "in": "query" + }, + { + "type": "integer", + "format": "int64", + "description": "offset is the next index number from which the response will start. The response offset value can be used along with continue token for the pagination.", + "name": "offset", + "in": "query" + }, + { + "type": "string", + "description": "continue token to paginate the subsequent data items", + "name": "continue", + "in": "query" + } + ], + "responses": { + "200": { + "description": "An array of AKS machine items", + "schema": { + "$ref": "#/definitions/v1AzureMachines" + } + } + } + }, + "post": { + "tags": [ + "v1" + ], + "summary": "Adds the machine to cloud config's machine pool", + "operationId": "v1CloudConfigsAksPoolMachinesAdd", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1AzureMachine" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster's cloud config uid", + "name": "configUid", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Machine pool name", + "name": "machinePoolName", + "in": "path", + "required": true + } + ] + }, + "/v1/cloudconfigs/aks/{configUid}/machinePools/{machinePoolName}/machines/{machineUid}": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the specified AKS machine", + "operationId": "v1CloudConfigsAksPoolMachinesUidGet", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1AzureMachine" + } + } + } + }, + "put": { + "tags": [ + "v1" + ], + "summary": "Updates the specified machine to the cloud config's machine pool", + "operationId": "v1CloudConfigsAksPoolMachinesUidUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1AzureMachine" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "delete": { + "tags": [ + "v1" + ], + "summary": "Deletes the specified Azure machine", + "operationId": "v1CloudConfigsAksPoolMachinesUidDelete", + "responses": { + "204": { + "description": "The resource was deleted successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster's cloud config uid", + "name": "configUid", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Machine pool name", + "name": "machinePoolName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Machine uid", + "name": "machineUid", + "in": "path", + "required": true + } + ] + }, + "/v1/cloudconfigs/aws/{configUid}": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the specified AWS cloud config", + "operationId": "v1CloudConfigsAwsGet", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1AwsCloudConfig" + } + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster's cloud config uid", + "name": "configUid", + "in": "path", + "required": true + } + ] + }, + "/v1/cloudconfigs/aws/{configUid}/clusterConfig": { + "put": { + "tags": [ + "v1" + ], + "summary": "Updates the cluster configuration information", + "operationId": "v1CloudConfigsAwsUidClusterConfig", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1AwsCloudClusterConfigEntity" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster's cloud config uid", + "name": "configUid", + "in": "path", + "required": true + } + ] + }, + "/v1/cloudconfigs/aws/{configUid}/machinePools": { + "post": { + "tags": [ + "v1" + ], + "summary": "Creates an AWS cloud config's machine pool", + "operationId": "v1CloudConfigsAwsMachinePoolCreate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1AwsMachinePoolConfigEntity" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster's cloud config uid", + "name": "configUid", + "in": "path", + "required": true + } + ] + }, + "/v1/cloudconfigs/aws/{configUid}/machinePools/{machinePoolName}": { + "put": { + "tags": [ + "v1" + ], + "summary": "Updates the specified AWS cloud config's machine pool", + "operationId": "v1CloudConfigsAwsMachinePoolUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1AwsMachinePoolConfigEntity" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "delete": { + "tags": [ + "v1" + ], + "summary": "Deletes the specified machine pool", + "operationId": "v1CloudConfigsAwsMachinePoolDelete", + "responses": { + "204": { + "description": "The resource was deleted successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster's cloud config uid", + "name": "configUid", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Machine pool name", + "name": "machinePoolName", + "in": "path", + "required": true + } + ] + }, + "/v1/cloudconfigs/aws/{configUid}/machinePools/{machinePoolName}/machines": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves a list of AWS machines", + "operationId": "v1CloudConfigsAwsPoolMachinesList", + "parameters": [ + { + "type": "string", + "description": "Set of fields to be presented in the response with values. The fields are comma separated. Eg: metadata.uid,metadata.name", + "name": "fields", + "in": "query" + }, + { + "type": "string", + "description": "Filters can be combined with AND, OR operators with field path name. Eg: metadata.name=TestServiceANDspec.cloudType=aws\n\nServer will be restricted to certain fields based on the indexed data for each resource.", + "name": "filters", + "in": "query" + }, + { + "type": "string", + "description": "Specify the fields with sort order. 1 indicates ascending and -1 for descending. Eg: orderBy=metadata.name=1,metadata.uid=-1", + "name": "orderBy", + "in": "query" + }, + { + "type": "integer", + "format": "int64", + "default": 50, + "description": "limit is a maximum number of responses to return for a list call. Default and maximum value of the limit is 50.\nIf more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results.", + "name": "limit", + "in": "query" + }, + { + "type": "integer", + "format": "int64", + "description": "offset is the next index number from which the response will start. The response offset value can be used along with continue token for the pagination.", + "name": "offset", + "in": "query" + }, + { + "type": "string", + "description": "continue token to paginate the subsequent data items", + "name": "continue", + "in": "query" + } + ], + "responses": { + "200": { + "description": "An array of AWS machine items", + "schema": { + "$ref": "#/definitions/v1AwsMachines" + } + } + } + }, + "post": { + "tags": [ + "v1" + ], + "summary": "Adds the machine to cloud config's machine pool", + "operationId": "v1CloudConfigsAwsPoolMachinesAdd", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1AwsMachine" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster's cloud config uid", + "name": "configUid", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Machine pool name", + "name": "machinePoolName", + "in": "path", + "required": true + } + ] + }, + "/v1/cloudconfigs/aws/{configUid}/machinePools/{machinePoolName}/machines/{machineUid}": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the specified AWS machine", + "operationId": "v1CloudConfigsAwsPoolMachinesUidGet", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1AwsMachine" + } + } + } + }, + "put": { + "tags": [ + "v1" + ], + "summary": "Updates the specified machine to the cloud config's machine pool", + "operationId": "v1CloudConfigsAwsPoolMachinesUidUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1AwsMachine" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "delete": { + "tags": [ + "v1" + ], + "summary": "Deletes the specified AWS machine", + "operationId": "v1CloudConfigsAwsPoolMachinesUidDelete", + "responses": { + "204": { + "description": "The resource was deleted successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster's cloud config uid", + "name": "configUid", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Machine pool name", + "name": "machinePoolName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Machine uid", + "name": "machineUid", + "in": "path", + "required": true + } + ] + }, + "/v1/cloudconfigs/azure/{configUid}": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the specified Azure cloud config", + "operationId": "v1CloudConfigsAzureGet", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1AzureCloudConfig" + } + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster's cloud config uid", + "name": "configUid", + "in": "path", + "required": true + } + ] + }, + "/v1/cloudconfigs/azure/{configUid}/clusterConfig": { + "put": { + "tags": [ + "v1" + ], + "summary": "Updates the cluster configuration information", + "operationId": "v1CloudConfigsAzureUidClusterConfig", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1AzureCloudClusterConfigEntity" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster's cloud config uid", + "name": "configUid", + "in": "path", + "required": true + } + ] + }, + "/v1/cloudconfigs/azure/{configUid}/machinePools": { + "post": { + "tags": [ + "v1" + ], + "summary": "Creates an Azure cloud config's machine pool", + "operationId": "v1CloudConfigsAzureMachinePoolCreate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1AzureMachinePoolConfigEntity" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster's cloud config uid", + "name": "configUid", + "in": "path", + "required": true + } + ] + }, + "/v1/cloudconfigs/azure/{configUid}/machinePools/{machinePoolName}": { + "put": { + "tags": [ + "v1" + ], + "summary": "Updates the specified Azure cloud config's machine pool", + "operationId": "v1CloudConfigsAzureMachinePoolUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1AzureMachinePoolConfigEntity" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "delete": { + "tags": [ + "v1" + ], + "summary": "Deletes the specified machine pool", + "operationId": "v1CloudConfigsAzureMachinePoolDelete", + "responses": { + "204": { + "description": "The resource was deleted successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster's cloud config uid", + "name": "configUid", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Machine pool name", + "name": "machinePoolName", + "in": "path", + "required": true + } + ] + }, + "/v1/cloudconfigs/azure/{configUid}/machinePools/{machinePoolName}/machines": { + "get": { + "description": "Returns all the Azure machines restricted to the user role and filters.", + "tags": [ + "v1" + ], + "summary": "Retrieves a list of Azure machines", + "operationId": "v1CloudConfigsAzurePoolMachinesList", + "parameters": [ + { + "type": "string", + "description": "Set of fields to be presented in the response with values. The fields are comma separated. Eg: metadata.uid,metadata.name", + "name": "fields", + "in": "query" + }, + { + "type": "string", + "description": "Filters can be combined with AND, OR operators with field path name. Eg: metadata.name=TestServiceANDspec.cloudType=aws\n\nServer will be restricted to certain fields based on the indexed data for each resource.", + "name": "filters", + "in": "query" + }, + { + "type": "string", + "description": "Specify the fields with sort order. 1 indicates ascending and -1 for descending. Eg: orderBy=metadata.name=1,metadata.uid=-1", + "name": "orderBy", + "in": "query" + }, + { + "type": "integer", + "format": "int64", + "default": 50, + "description": "limit is a maximum number of responses to return for a list call. Default and maximum value of the limit is 50.\nIf more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results.", + "name": "limit", + "in": "query" + }, + { + "type": "integer", + "format": "int64", + "description": "offset is the next index number from which the response will start. The response offset value can be used along with continue token for the pagination.", + "name": "offset", + "in": "query" + }, + { + "type": "string", + "description": "continue token to paginate the subsequent data items", + "name": "continue", + "in": "query" + } + ], + "responses": { + "200": { + "description": "An array of AWS machine items", + "schema": { + "$ref": "#/definitions/v1AzureMachines" + } + } + } + }, + "post": { + "tags": [ + "v1" + ], + "summary": "Adds the machine to cloud config's machine pool", + "operationId": "v1CloudConfigsAzurePoolMachinesAdd", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1AzureMachine" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster's cloud config uid", + "name": "configUid", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Machine pool name", + "name": "machinePoolName", + "in": "path", + "required": true + } + ] + }, + "/v1/cloudconfigs/azure/{configUid}/machinePools/{machinePoolName}/machines/{machineUid}": { + "get": { + "description": "Returns a Azure machine for the specified uid.", + "tags": [ + "v1" + ], + "summary": "Returns the specified Azure machine", + "operationId": "v1CloudConfigsAzurePoolMachinesUidGet", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1AzureMachine" + } + } + } + }, + "put": { + "tags": [ + "v1" + ], + "summary": "Updates the specified machine to cloud config's machine pool", + "operationId": "v1CloudConfigsAzurePoolMachinesUidUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1AzureMachine" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "delete": { + "tags": [ + "v1" + ], + "summary": "Deletes the specified Azure machine", + "operationId": "v1CloudConfigsAzurePoolMachinesUidDelete", + "responses": { + "204": { + "description": "The resource was deleted successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster's cloud config uid", + "name": "configUid", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Machine pool name", + "name": "machinePoolName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Machine uid", + "name": "machineUid", + "in": "path", + "required": true + } + ] + }, + "/v1/cloudconfigs/cloudTypes/{cloudType}/{configUid}": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the specified Custom cloud config", + "operationId": "v1CloudConfigsCustomGet", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1CustomCloudConfig" + } + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster's cloud type", + "name": "cloudType", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Cluster's cloud config uid", + "name": "configUid", + "in": "path", + "required": true + } + ] + }, + "/v1/cloudconfigs/cloudTypes/{cloudType}/{configUid}/clusterConfig": { + "put": { + "tags": [ + "v1" + ], + "summary": "Updates the cluster configuration information", + "operationId": "v1CloudConfigsCustomUidClusterConfig", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1CustomCloudClusterConfigEntity" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster's cloud type", + "name": "cloudType", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Cluster's cloud config uid", + "name": "configUid", + "in": "path", + "required": true + } + ] + }, + "/v1/cloudconfigs/cloudTypes/{cloudType}/{configUid}/machinePools": { + "post": { + "tags": [ + "v1" + ], + "summary": "Creates an Custom cloud config's machine pool", + "operationId": "v1CloudConfigsCustomMachinePoolCreate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1CustomMachinePoolConfigEntity" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster's cloud type", + "name": "cloudType", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Cluster's cloud config uid", + "name": "configUid", + "in": "path", + "required": true + } + ] + }, + "/v1/cloudconfigs/cloudTypes/{cloudType}/{configUid}/machinePools/{machinePoolName}": { + "put": { + "tags": [ + "v1" + ], + "summary": "Updates the specified Custom cloud config's machine pool", + "operationId": "v1CloudConfigsCustomMachinePoolUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1CustomMachinePoolConfigEntity" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "delete": { + "tags": [ + "v1" + ], + "summary": "Deletes the specified machine pool", + "operationId": "v1CloudConfigsCustomMachinePoolDelete", + "responses": { + "204": { + "description": "The resource was deleted successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster's cloud type", + "name": "cloudType", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Cluster's cloud config uid", + "name": "configUid", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Machine pool name", + "name": "machinePoolName", + "in": "path", + "required": true + } + ] + }, + "/v1/cloudconfigs/cloudTypes/{cloudType}/{configUid}/machinePools/{machinePoolName}/machines": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves a list of Custom machines", + "operationId": "v1CloudConfigsCustomPoolMachinesList", + "parameters": [ + { + "type": "string", + "description": "Set of fields to be presented in the response with values. The fields are comma separated. Eg: metadata.uid,metadata.name", + "name": "fields", + "in": "query" + }, + { + "type": "string", + "description": "Filters can be combined with AND, OR operators with field path name. Eg: metadata.name=TestServiceANDspec.cloudType=aws\n\nServer will be restricted to certain fields based on the indexed data for each resource.", + "name": "filters", + "in": "query" + }, + { + "type": "string", + "description": "Specify the fields with sort order. 1 indicates ascending and -1 for descending. Eg: orderBy=metadata.name=1,metadata.uid=-1", + "name": "orderBy", + "in": "query" + }, + { + "type": "integer", + "format": "int64", + "default": 50, + "description": "limit is a maximum number of responses to return for a list call. Default and maximum value of the limit is 50.\nIf more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results.", + "name": "limit", + "in": "query" + }, + { + "type": "integer", + "format": "int64", + "description": "offset is the next index number from which the response will start. The response offset value can be used along with continue token for the pagination.", + "name": "offset", + "in": "query" + }, + { + "type": "string", + "description": "continue token to paginate the subsequent data items", + "name": "continue", + "in": "query" + } + ], + "responses": { + "200": { + "description": "An array of Custom machine items", + "schema": { + "$ref": "#/definitions/v1CustomMachines" + } + } + } + }, + "post": { + "tags": [ + "v1" + ], + "summary": "Adds the machine to cloud config's machine pool", + "operationId": "v1CloudConfigsCustomPoolMachinesAdd", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1CustomMachine" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster's cloud type", + "name": "cloudType", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Cluster's cloud config uid", + "name": "configUid", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Machine pool name", + "name": "machinePoolName", + "in": "path", + "required": true + } + ] + }, + "/v1/cloudconfigs/cloudTypes/{cloudType}/{configUid}/machinePools/{machinePoolName}/machines/{machineUid}": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the specified Custom machine", + "operationId": "v1CloudConfigsCustomPoolMachinesUidGet", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1CustomMachine" + } + } + } + }, + "put": { + "tags": [ + "v1" + ], + "summary": "Updates the specified machine to the cloud config's machine pool", + "operationId": "v1CloudConfigsCustomPoolMachinesUidUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1CustomMachine" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "delete": { + "tags": [ + "v1" + ], + "summary": "Deletes the specified Custom machine", + "operationId": "v1CloudConfigsCustomPoolMachinesUidDelete", + "responses": { + "204": { + "description": "The resource was deleted successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster's cloud type", + "name": "cloudType", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Cluster's cloud config uid", + "name": "configUid", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Machine pool name", + "name": "machinePoolName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Machine uid", + "name": "machineUid", + "in": "path", + "required": true + } + ] + }, + "/v1/cloudconfigs/edge-native/{configUid}": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the specified edge-native cloud config", + "operationId": "v1CloudConfigsEdgeNativeGet", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1EdgeNativeCloudConfig" + } + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster's cloud config uid", + "name": "configUid", + "in": "path", + "required": true + } + ] + }, + "/v1/cloudconfigs/edge-native/{configUid}/clusterConfig": { + "put": { + "tags": [ + "v1" + ], + "summary": "Updates the cluster configuration information", + "operationId": "v1CloudConfigsEdgeNativeUidClusterConfig", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1EdgeNativeCloudClusterConfigEntity" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster's cloud config uid", + "name": "configUid", + "in": "path", + "required": true + } + ] + }, + "/v1/cloudconfigs/edge-native/{configUid}/machinePools": { + "post": { + "tags": [ + "v1" + ], + "summary": "Creates a edge-native cloud config's machine pool", + "operationId": "v1CloudConfigsEdgeNativeMachinePoolCreate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1EdgeNativeMachinePoolConfigEntity" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster's cloud config uid", + "name": "configUid", + "in": "path", + "required": true + } + ] + }, + "/v1/cloudconfigs/edge-native/{configUid}/machinePools/{machinePoolName}": { + "put": { + "tags": [ + "v1" + ], + "summary": "Updates the specified edge-native cloud config's machine pool", + "operationId": "v1CloudConfigsEdgeNativeMachinePoolUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1EdgeNativeMachinePoolConfigEntity" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "delete": { + "tags": [ + "v1" + ], + "summary": "Deletes the specified machine pool", + "operationId": "v1CloudConfigsEdgeNativeMachinePoolDelete", + "responses": { + "204": { + "description": "The resource was deleted successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster's cloud config uid", + "name": "configUid", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Machine pool name", + "name": "machinePoolName", + "in": "path", + "required": true + } + ] + }, + "/v1/cloudconfigs/edge-native/{configUid}/machinePools/{machinePoolName}/machines": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves a list of edge-native machines", + "operationId": "v1CloudConfigsEdgeNativePoolMachinesList", + "responses": { + "200": { + "description": "An array of edge-native machine items", + "schema": { + "$ref": "#/definitions/v1EdgeNativeMachines" + } + } + } + }, + "post": { + "tags": [ + "v1" + ], + "summary": "Adds the edge-native machine to cloud config's machine pool", + "operationId": "v1CloudConfigsEdgeNativePoolMachinesAdd", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1EdgeNativeMachine" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster's cloud config uid", + "name": "configUid", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Machine pool name", + "name": "machinePoolName", + "in": "path", + "required": true + } + ] + }, + "/v1/cloudconfigs/edge-native/{configUid}/machinePools/{machinePoolName}/machines/{machineUid}": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the specified edge-native machine", + "operationId": "v1CloudConfigsEdgeNativePoolMachinesUidGet", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1EdgeNativeMachine" + } + } + } + }, + "put": { + "tags": [ + "v1" + ], + "summary": "Updates the specified machine to cloud config's machine pool", + "operationId": "v1CloudConfigsEdgeNativePoolMachinesUidUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1EdgeNativeMachine" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "delete": { + "tags": [ + "v1" + ], + "summary": "Deletes the specified edge-native machine", + "operationId": "v1CloudConfigsEdgeNativePoolMachinesUidDelete", + "responses": { + "204": { + "description": "The resource was deleted successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster's cloud config uid", + "name": "configUid", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Machine pool name", + "name": "machinePoolName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Machine uid", + "name": "machineUid", + "in": "path", + "required": true + } + ] + }, + "/v1/cloudconfigs/eks/{configUid}": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the specified EKS cloud config", + "operationId": "v1CloudConfigsEksGet", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1EksCloudConfig" + } + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster's cloud config uid", + "name": "configUid", + "in": "path", + "required": true + } + ] + }, + "/v1/cloudconfigs/eks/{configUid}/clusterConfig": { + "put": { + "tags": [ + "v1" + ], + "summary": "Updates the cluster configuration information", + "operationId": "v1CloudConfigsEksUidClusterConfig", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1EksCloudClusterConfigEntity" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster's cloud config uid", + "name": "configUid", + "in": "path", + "required": true + } + ] + }, + "/v1/cloudconfigs/eks/{configUid}/fargateProfiles": { + "put": { + "tags": [ + "v1" + ], + "summary": "Updates EKS cloud config's fargate profiles", + "operationId": "v1CloudConfigsEksUidFargateProfilesUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1EksFargateProfiles" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster's cloud config uid", + "name": "configUid", + "in": "path", + "required": true + } + ] + }, + "/v1/cloudconfigs/eks/{configUid}/machinePools": { + "post": { + "tags": [ + "v1" + ], + "summary": "Creates an EKS cloud config's machine pool", + "operationId": "v1CloudConfigsEksMachinePoolCreate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1EksMachinePoolConfigEntity" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster's cloud config uid", + "name": "configUid", + "in": "path", + "required": true + } + ] + }, + "/v1/cloudconfigs/eks/{configUid}/machinePools/{machinePoolName}": { + "put": { + "tags": [ + "v1" + ], + "summary": "Updates the specified EKS cloud config's machine pool", + "operationId": "v1CloudConfigsEksMachinePoolUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1EksMachinePoolConfigEntity" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "delete": { + "tags": [ + "v1" + ], + "summary": "Deletes the specified machine pool", + "operationId": "v1CloudConfigsEksMachinePoolDelete", + "responses": { + "204": { + "description": "The resource was deleted successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster's cloud config uid", + "name": "configUid", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Machine pool name", + "name": "machinePoolName", + "in": "path", + "required": true + } + ] + }, + "/v1/cloudconfigs/eks/{configUid}/machinePools/{machinePoolName}/machines": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves a list of EKS machines", + "operationId": "v1CloudConfigsEksPoolMachinesList", + "parameters": [ + { + "type": "string", + "description": "Set of fields to be presented in the response with values. The fields are comma separated. Eg: metadata.uid,metadata.name", + "name": "fields", + "in": "query" + }, + { + "type": "string", + "description": "Filters can be combined with AND, OR operators with field path name. Eg: metadata.name=TestServiceANDspec.cloudType=aws\n\nServer will be restricted to certain fields based on the indexed data for each resource.", + "name": "filters", + "in": "query" + }, + { + "type": "string", + "description": "Specify the fields with sort order. 1 indicates ascending and -1 for descending. Eg: orderBy=metadata.name=1,metadata.uid=-1", + "name": "orderBy", + "in": "query" + }, + { + "type": "integer", + "format": "int64", + "default": 50, + "description": "limit is a maximum number of responses to return for a list call. Default and maximum value of the limit is 50.\nIf more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results.", + "name": "limit", + "in": "query" + }, + { + "type": "integer", + "format": "int64", + "description": "offset is the next index number from which the response will start. The response offset value can be used along with continue token for the pagination.", + "name": "offset", + "in": "query" + }, + { + "type": "string", + "description": "continue token to paginate the subsequent data items", + "name": "continue", + "in": "query" + } + ], + "responses": { + "200": { + "description": "An array of EKS machine items", + "schema": { + "$ref": "#/definitions/v1AwsMachines" + } + } + } + }, + "post": { + "tags": [ + "v1" + ], + "summary": "Adds the machine to cloud config's machine pool", + "operationId": "v1CloudConfigsEksPoolMachinesAdd", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1AwsMachine" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster's cloud config uid", + "name": "configUid", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Machine pool name", + "name": "machinePoolName", + "in": "path", + "required": true + } + ] + }, + "/v1/cloudconfigs/eks/{configUid}/machinePools/{machinePoolName}/machines/{machineUid}": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the specified EKS machine", + "operationId": "v1CloudConfigsEksPoolMachinesUidGet", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1AwsMachine" + } + } + } + }, + "put": { + "tags": [ + "v1" + ], + "summary": "Updates the specified machine to the cloud config's machine pool", + "operationId": "v1CloudConfigsEksPoolMachinesUidUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1AwsMachine" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "delete": { + "tags": [ + "v1" + ], + "summary": "Deletes the specified EKS machine", + "operationId": "v1CloudConfigsEksPoolMachinesUidDelete", + "responses": { + "204": { + "description": "The resource was deleted successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster's cloud config uid", + "name": "configUid", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Machine pool name", + "name": "machinePoolName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Machine uid", + "name": "machineUid", + "in": "path", + "required": true + } + ] + }, + "/v1/cloudconfigs/gcp/{configUid}": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the specified GCP cloud config", + "operationId": "v1CloudConfigsGcpGet", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1GcpCloudConfig" + } + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster's cloud config uid", + "name": "configUid", + "in": "path", + "required": true + } + ] + }, + "/v1/cloudconfigs/gcp/{configUid}/clusterConfig": { + "put": { + "tags": [ + "v1" + ], + "summary": "Updates the cluster configuration information", + "operationId": "v1CloudConfigsGcpUidClusterConfig", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1GcpCloudClusterConfigEntity" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster's cloud config uid", + "name": "configUid", + "in": "path", + "required": true + } + ] + }, + "/v1/cloudconfigs/gcp/{configUid}/machinePools": { + "post": { + "tags": [ + "v1" + ], + "summary": "Creates a Gcp cloud config's machine pool", + "operationId": "v1CloudConfigsGcpMachinePoolCreate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1GcpMachinePoolConfigEntity" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster's cloud config uid", + "name": "configUid", + "in": "path", + "required": true + } + ] + }, + "/v1/cloudconfigs/gcp/{configUid}/machinePools/{machinePoolName}": { + "put": { + "tags": [ + "v1" + ], + "summary": "Updates the specified GCP cloud config's machine pool", + "operationId": "v1CloudConfigsGcpMachinePoolUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1GcpMachinePoolConfigEntity" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "delete": { + "tags": [ + "v1" + ], + "summary": "Deletes the specified machine pool", + "operationId": "v1CloudConfigsGcpMachinePoolDelete", + "responses": { + "204": { + "description": "The resource was deleted successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster's cloud config uid", + "name": "configUid", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Machine pool name", + "name": "machinePoolName", + "in": "path", + "required": true + } + ] + }, + "/v1/cloudconfigs/gcp/{configUid}/machinePools/{machinePoolName}/machines": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves a list of GCP machines", + "operationId": "v1CloudConfigsGcpPoolMachinesList", + "parameters": [ + { + "type": "string", + "description": "Set of fields to be presented in the response with values. The fields are comma separated. Eg: metadata.uid,metadata.name", + "name": "fields", + "in": "query" + }, + { + "type": "string", + "description": "Filters can be combined with AND, OR operators with field path name. Eg: metadata.name=TestServiceANDspec.cloudType=aws\n\nServer will be restricted to certain fields based on the indexed data for each resource.", + "name": "filters", + "in": "query" + }, + { + "type": "string", + "description": "Specify the fields with sort order. 1 indicates ascending and -1 for descending. Eg: orderBy=metadata.name=1,metadata.uid=-1", + "name": "orderBy", + "in": "query" + }, + { + "type": "integer", + "format": "int64", + "default": 50, + "description": "limit is a maximum number of responses to return for a list call. Default and maximum value of the limit is 50.\nIf more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results.", + "name": "limit", + "in": "query" + }, + { + "type": "integer", + "format": "int64", + "description": "offset is the next index number from which the response will start. The response offset value can be used along with continue token for the pagination.", + "name": "offset", + "in": "query" + }, + { + "type": "string", + "description": "continue token to paginate the subsequent data items", + "name": "continue", + "in": "query" + } + ], + "responses": { + "200": { + "description": "An array of GCP machine items", + "schema": { + "$ref": "#/definitions/v1GcpMachines" + } + } + } + }, + "post": { + "tags": [ + "v1" + ], + "summary": "Adds the machine to cloud config's machine pool", + "operationId": "v1CloudConfigsGcpPoolMachinesAdd", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1GcpMachine" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster's cloud config uid", + "name": "configUid", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Machine pool name", + "name": "machinePoolName", + "in": "path", + "required": true + } + ] + }, + "/v1/cloudconfigs/gcp/{configUid}/machinePools/{machinePoolName}/machines/{machineUid}": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the specified GCP machine", + "operationId": "v1CloudConfigsGcpPoolMachinesUidGet", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1GcpMachine" + } + } + } + }, + "put": { + "tags": [ + "v1" + ], + "summary": "Updates the specified machine to the cloud config's machine pool", + "operationId": "v1CloudConfigsGcpPoolMachinesUidUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1GcpMachine" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "delete": { + "tags": [ + "v1" + ], + "summary": "Deletes the specified GCP machine", + "operationId": "v1CloudConfigsGcpPoolMachinesUidDelete", + "responses": { + "204": { + "description": "The resource was deleted successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster's cloud config uid", + "name": "configUid", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Machine pool name", + "name": "machinePoolName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Machine uid", + "name": "machineUid", + "in": "path", + "required": true + } + ] + }, + "/v1/cloudconfigs/generic/{configUid}": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the specified Generic cloud config", + "operationId": "v1CloudConfigsGenericGet", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1GenericCloudConfig" + } + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster's cloud config uid", + "name": "configUid", + "in": "path", + "required": true + } + ] + }, + "/v1/cloudconfigs/generic/{configUid}/clusterConfig": { + "put": { + "tags": [ + "v1" + ], + "summary": "Updates the cluster configuration information", + "operationId": "v1CloudConfigsGenericUidClusterConfig", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1GenericCloudClusterConfigEntity" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster's cloud config uid", + "name": "configUid", + "in": "path", + "required": true + } + ] + }, + "/v1/cloudconfigs/generic/{configUid}/machinePools": { + "post": { + "tags": [ + "v1" + ], + "summary": "Creates a generic cloud config's machine pool", + "operationId": "v1CloudConfigsGenericMachinePoolCreate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1GenericMachinePoolConfigEntity" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster's cloud config uid", + "name": "configUid", + "in": "path", + "required": true + } + ] + }, + "/v1/cloudconfigs/generic/{configUid}/machinePools/{machinePoolName}": { + "put": { + "tags": [ + "v1" + ], + "summary": "Updates the specified generic cloud config's machine pool", + "operationId": "v1CloudConfigsGenericMachinePoolUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1GenericMachinePoolConfigEntity" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "delete": { + "tags": [ + "v1" + ], + "summary": "Deletes the specified machine pool", + "operationId": "v1CloudConfigsGenericMachinePoolDelete", + "responses": { + "204": { + "description": "The resource was deleted successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster's cloud config uid", + "name": "configUid", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Machine pool name", + "name": "machinePoolName", + "in": "path", + "required": true + } + ] + }, + "/v1/cloudconfigs/generic/{configUid}/machinePools/{machinePoolName}/machines": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves a list of Generic machines", + "operationId": "v1CloudConfigsGenericPoolMachinesList", + "parameters": [ + { + "type": "string", + "description": "Set of fields to be presented in the response with values. The fields are comma separated. Eg: metadata.uid,metadata.name", + "name": "fields", + "in": "query" + }, + { + "type": "string", + "description": "Filters can be combined with AND, OR operators with field path name. Eg: metadata.name=TestServiceANDspec.cloudType=aws\n\nServer will be restricted to certain fields based on the indexed data for each resource.", + "name": "filters", + "in": "query" + }, + { + "type": "string", + "description": "Specify the fields with sort order. 1 indicates ascending and -1 for descending. Eg: orderBy=metadata.name=1,metadata.uid=-1", + "name": "orderBy", + "in": "query" + }, + { + "type": "integer", + "format": "int64", + "default": 50, + "description": "limit is a maximum number of responses to return for a list call. Default and maximum value of the limit is 50.\nIf more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results.", + "name": "limit", + "in": "query" + }, + { + "type": "integer", + "format": "int64", + "description": "offset is the next index number from which the response will start. The response offset value can be used along with continue token for the pagination.", + "name": "offset", + "in": "query" + }, + { + "type": "string", + "description": "continue token to paginate the subsequent data items", + "name": "continue", + "in": "query" + } + ], + "responses": { + "200": { + "description": "An array of Generic machine items", + "schema": { + "$ref": "#/definitions/v1GenericMachines" + } + } + } + }, + "post": { + "tags": [ + "v1" + ], + "summary": "Adds the machine to cloud config's machine pool", + "operationId": "v1CloudConfigsGenericPoolMachinesAdd", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1GenericMachine" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster's cloud config uid", + "name": "configUid", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Machine pool name", + "name": "machinePoolName", + "in": "path", + "required": true + } + ] + }, + "/v1/cloudconfigs/generic/{configUid}/machinePools/{machinePoolName}/machines/{machineUid}": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the specified generic machine", + "operationId": "v1CloudConfigsGenericPoolMachinesUidGet", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1GenericMachine" + } + } + } + }, + "put": { + "tags": [ + "v1" + ], + "summary": "Updates the specified machine to the cloud config's machine pool", + "operationId": "v1CloudConfigsGenericPoolMachinesUidUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1GenericMachine" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "delete": { + "tags": [ + "v1" + ], + "summary": "Deletes the specified machine", + "operationId": "v1CloudConfigsGenericPoolMachinesUidDelete", + "responses": { + "204": { + "description": "The resource was deleted successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster's cloud config uid", + "name": "configUid", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Machine pool name", + "name": "machinePoolName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Machine uid", + "name": "machineUid", + "in": "path", + "required": true + } + ] + }, + "/v1/cloudconfigs/gke/{configUid}": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the specified GKE cloud config", + "operationId": "v1CloudConfigsGkeGet", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1GcpCloudConfig" + } + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster's cloud config uid", + "name": "configUid", + "in": "path", + "required": true + } + ] + }, + "/v1/cloudconfigs/gke/{configUid}/clusterConfig": { + "put": { + "tags": [ + "v1" + ], + "summary": "Updates the cluster configuration information", + "operationId": "v1CloudConfigsGkeUidClusterConfig", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1GcpCloudClusterConfigEntity" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster's cloud config uid", + "name": "configUid", + "in": "path", + "required": true + } + ] + }, + "/v1/cloudconfigs/gke/{configUid}/machinePools": { + "post": { + "tags": [ + "v1" + ], + "summary": "Creates an GKE cloud config's machine pool", + "operationId": "v1CloudConfigsGkeMachinePoolCreate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1GcpMachinePoolConfigEntity" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster's cloud config uid", + "name": "configUid", + "in": "path", + "required": true + } + ] + }, + "/v1/cloudconfigs/gke/{configUid}/machinePools/{machinePoolName}": { + "put": { + "tags": [ + "v1" + ], + "summary": "Updates the specified GKE cloud config's machine pool", + "operationId": "v1CloudConfigsGkeMachinePoolUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1GcpMachinePoolConfigEntity" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "delete": { + "tags": [ + "v1" + ], + "summary": "Deletes the specified machine pool", + "operationId": "v1CloudConfigsGkeMachinePoolDelete", + "responses": { + "204": { + "description": "The resource was deleted successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster's cloud config uid", + "name": "configUid", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Machine pool name", + "name": "machinePoolName", + "in": "path", + "required": true + } + ] + }, + "/v1/cloudconfigs/gke/{configUid}/machinePools/{machinePoolName}/machines": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves a list of GKE machines", + "operationId": "v1CloudConfigsGkePoolMachinesList", + "parameters": [ + { + "type": "string", + "description": "Set of fields to be presented in the response with values. The fields are comma separated. Eg: metadata.uid,metadata.name", + "name": "fields", + "in": "query" + }, + { + "type": "string", + "description": "Filters can be combined with AND, OR operators with field path name. Eg: metadata.name=TestServiceANDspec.cloudType=aws\n\nServer will be restricted to certain fields based on the indexed data for each resource.", + "name": "filters", + "in": "query" + }, + { + "type": "string", + "description": "Specify the fields with sort order. 1 indicates ascending and -1 for descending. Eg: orderBy=metadata.name=1,metadata.uid=-1", + "name": "orderBy", + "in": "query" + }, + { + "type": "integer", + "format": "int64", + "default": 50, + "description": "limit is a maximum number of responses to return for a list call. Default and maximum value of the limit is 50.\nIf more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results.", + "name": "limit", + "in": "query" + }, + { + "type": "integer", + "format": "int64", + "description": "offset is the next index number from which the response will start. The response offset value can be used along with continue token for the pagination.", + "name": "offset", + "in": "query" + }, + { + "type": "string", + "description": "continue token to paginate the subsequent data items", + "name": "continue", + "in": "query" + } + ], + "responses": { + "200": { + "description": "An array of GKE machine items", + "schema": { + "$ref": "#/definitions/v1GcpMachines" + } + } + } + }, + "post": { + "tags": [ + "v1" + ], + "summary": "Adds the machine to cloud config's machine pool", + "operationId": "v1CloudConfigsGkePoolMachinesAdd", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1GcpMachine" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster's cloud config uid", + "name": "configUid", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Machine pool name", + "name": "machinePoolName", + "in": "path", + "required": true + } + ] + }, + "/v1/cloudconfigs/gke/{configUid}/machinePools/{machinePoolName}/machines/{machineUid}": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the specified GKE machine", + "operationId": "v1CloudConfigsGkePoolMachinesUidGet", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1GcpMachine" + } + } + } + }, + "put": { + "tags": [ + "v1" + ], + "summary": "Updates the specified machine to the cloud config's machine pool", + "operationId": "v1CloudConfigsGkePoolMachinesUidUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1GcpMachine" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "delete": { + "tags": [ + "v1" + ], + "summary": "Deletes the specified Gcp machine", + "operationId": "v1CloudConfigsGkePoolMachinesUidDelete", + "responses": { + "204": { + "description": "The resource was deleted successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster's cloud config uid", + "name": "configUid", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Machine pool name", + "name": "machinePoolName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Machine uid", + "name": "machineUid", + "in": "path", + "required": true + } + ] + }, + "/v1/cloudconfigs/maas/{configUid}": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the specified Maas cloud config", + "operationId": "v1CloudConfigsMaasGet", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1MaasCloudConfig" + } + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster's cloud config uid", + "name": "configUid", + "in": "path", + "required": true + } + ] + }, + "/v1/cloudconfigs/maas/{configUid}/clusterConfig": { + "put": { + "tags": [ + "v1" + ], + "summary": "Updates the cluster configuration information", + "operationId": "v1CloudConfigsMaasUidClusterConfig", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1MaasCloudClusterConfigEntity" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster's cloud config uid", + "name": "configUid", + "in": "path", + "required": true + } + ] + }, + "/v1/cloudconfigs/maas/{configUid}/machinePools": { + "post": { + "tags": [ + "v1" + ], + "summary": "Creates an Maas cloud config's machine pool", + "operationId": "v1CloudConfigsMaasMachinePoolCreate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1MaasMachinePoolConfigEntity" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster's cloud config uid", + "name": "configUid", + "in": "path", + "required": true + } + ] + }, + "/v1/cloudconfigs/maas/{configUid}/machinePools/{machinePoolName}": { + "put": { + "tags": [ + "v1" + ], + "summary": "Updates the specified Maas cloud config's machine pool", + "operationId": "v1CloudConfigsMaasMachinePoolUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1MaasMachinePoolConfigEntity" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "delete": { + "tags": [ + "v1" + ], + "summary": "Deletes the specified machine pool", + "operationId": "v1CloudConfigsMaasMachinePoolDelete", + "responses": { + "204": { + "description": "The resource was deleted successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster's cloud config uid", + "name": "configUid", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Machine pool name", + "name": "machinePoolName", + "in": "path", + "required": true + } + ] + }, + "/v1/cloudconfigs/maas/{configUid}/machinePools/{machinePoolName}/machines": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves a list of Maas machines", + "operationId": "v1CloudConfigsMaasPoolMachinesList", + "parameters": [ + { + "type": "string", + "description": "Set of fields to be presented in the response with values. The fields are comma separated. Eg: metadata.uid,metadata.name", + "name": "fields", + "in": "query" + }, + { + "type": "string", + "description": "Filters can be combined with AND, OR operators with field path name. Eg: metadata.name=TestServiceANDspec.cloudType=aws\n\nServer will be restricted to certain fields based on the indexed data for each resource.", + "name": "filters", + "in": "query" + }, + { + "type": "string", + "description": "Specify the fields with sort order. 1 indicates ascending and -1 for descending. Eg: orderBy=metadata.name=1,metadata.uid=-1", + "name": "orderBy", + "in": "query" + }, + { + "type": "integer", + "format": "int64", + "default": 50, + "description": "limit is a maximum number of responses to return for a list call. Default and maximum value of the limit is 50.\nIf more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results.", + "name": "limit", + "in": "query" + }, + { + "type": "integer", + "format": "int64", + "description": "offset is the next index number from which the response will start. The response offset value can be used along with continue token for the pagination.", + "name": "offset", + "in": "query" + }, + { + "type": "string", + "description": "continue token to paginate the subsequent data items", + "name": "continue", + "in": "query" + } + ], + "responses": { + "200": { + "description": "An array of Maas machine items", + "schema": { + "$ref": "#/definitions/v1MaasMachines" + } + } + } + }, + "post": { + "tags": [ + "v1" + ], + "summary": "Adds the machine to cloud config's machine pool", + "operationId": "v1CloudConfigsMaasPoolMachinesAdd", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1MaasMachine" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster's cloud config uid", + "name": "configUid", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Machine pool name", + "name": "machinePoolName", + "in": "path", + "required": true + } + ] + }, + "/v1/cloudconfigs/maas/{configUid}/machinePools/{machinePoolName}/machines/{machineUid}": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the specified Maas machine", + "operationId": "v1CloudConfigsMaasPoolMachinesUidGet", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1MaasMachine" + } + } + } + }, + "put": { + "tags": [ + "v1" + ], + "summary": "Updates the specified machine to the cloud config's machine pool", + "operationId": "v1CloudConfigsMaasPoolMachinesUidUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1MaasMachine" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "delete": { + "tags": [ + "v1" + ], + "summary": "Deletes the specified Maas machine", + "operationId": "v1CloudConfigsMaasPoolMachinesUidDelete", + "responses": { + "204": { + "description": "The resource was deleted successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster's cloud config uid", + "name": "configUid", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Machine pool name", + "name": "machinePoolName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Machine uid", + "name": "machineUid", + "in": "path", + "required": true + } + ] + }, + "/v1/cloudconfigs/openstack/{configUid}": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the specified OpenStack cloud config", + "operationId": "v1CloudConfigsOpenStackGet", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1OpenStackCloudConfig" + } + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster's cloud config uid", + "name": "configUid", + "in": "path", + "required": true + } + ] + }, + "/v1/cloudconfigs/openstack/{configUid}/clusterConfig": { + "put": { + "tags": [ + "v1" + ], + "summary": "Updates the cluster configuration information", + "operationId": "v1CloudConfigsOpenStackUidClusterConfig", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1OpenStackCloudClusterConfigEntity" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster's cloud config uid", + "name": "configUid", + "in": "path", + "required": true + } + ] + }, + "/v1/cloudconfigs/openstack/{configUid}/machinePools": { + "post": { + "tags": [ + "v1" + ], + "summary": "Creates a OpenStack cloud config's machine pool", + "operationId": "v1CloudConfigsOpenStackMachinePoolCreate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1OpenStackMachinePoolConfigEntity" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster's cloud config uid", + "name": "configUid", + "in": "path", + "required": true + } + ] + }, + "/v1/cloudconfigs/openstack/{configUid}/machinePools/{machinePoolName}": { + "put": { + "tags": [ + "v1" + ], + "summary": "Updates the specified OpenStack cloud config's machine pool", + "operationId": "v1CloudConfigsOpenStackMachinePoolUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1OpenStackMachinePoolConfigEntity" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "delete": { + "tags": [ + "v1" + ], + "summary": "Deletes the specified machine pool", + "operationId": "v1CloudConfigsOpenStackMachinePoolDelete", + "responses": { + "204": { + "description": "The resource was deleted successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster's cloud config uid", + "name": "configUid", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Machine pool name", + "name": "machinePoolName", + "in": "path", + "required": true + } + ] + }, + "/v1/cloudconfigs/openstack/{configUid}/machinePools/{machinePoolName}/machines": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves a list of OpenStack machines", + "operationId": "v1CloudConfigsOpenStackPoolMachinesList", + "responses": { + "200": { + "description": "An array of OpenStack machine items", + "schema": { + "$ref": "#/definitions/v1OpenStackMachines" + } + } + } + }, + "post": { + "tags": [ + "v1" + ], + "summary": "Adds the OpenStack machine to cloud config's machine pool", + "operationId": "v1CloudConfigsOpenStackPoolMachinesAdd", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1OpenStackMachine" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster's cloud config uid", + "name": "configUid", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Machine pool name", + "name": "machinePoolName", + "in": "path", + "required": true + } + ] + }, + "/v1/cloudconfigs/openstack/{configUid}/machinePools/{machinePoolName}/machines/{machineUid}": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the specified OpenStack machine", + "operationId": "v1CloudConfigsOpenStackPoolMachinesUidGet", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1OpenStackMachine" + } + } + } + }, + "put": { + "tags": [ + "v1" + ], + "summary": "Updates the specified machine to cloud config's machine pool", + "operationId": "v1CloudConfigsOpenStackPoolMachinesUidUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1OpenStackMachine" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "delete": { + "tags": [ + "v1" + ], + "summary": "Deletes the specified OpenStack machine", + "operationId": "v1CloudConfigsOpenStackPoolMachinesUidDelete", + "responses": { + "204": { + "description": "The resource was deleted successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster's cloud config uid", + "name": "configUid", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Machine pool name", + "name": "machinePoolName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Machine uid", + "name": "machineUid", + "in": "path", + "required": true + } + ] + }, + "/v1/cloudconfigs/tke/{configUid}": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the specified TKE cloud config", + "operationId": "v1CloudConfigsTkeGet", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1TencentCloudConfig" + } + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster's cloud config uid", + "name": "configUid", + "in": "path", + "required": true + } + ] + }, + "/v1/cloudconfigs/tke/{configUid}/clusterConfig": { + "put": { + "tags": [ + "v1" + ], + "summary": "Updates the cluster configuration information", + "operationId": "v1CloudConfigsTkeUidClusterConfig", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1TencentCloudClusterConfigEntity" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster's cloud config uid", + "name": "configUid", + "in": "path", + "required": true + } + ] + }, + "/v1/cloudconfigs/tke/{configUid}/machinePools": { + "post": { + "tags": [ + "v1" + ], + "summary": "Creates an TKE cloud config's machine pool", + "operationId": "v1CloudConfigsTkeMachinePoolCreate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1TencentMachinePoolConfigEntity" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster's cloud config uid", + "name": "configUid", + "in": "path", + "required": true + } + ] + }, + "/v1/cloudconfigs/tke/{configUid}/machinePools/{machinePoolName}": { + "put": { + "tags": [ + "v1" + ], + "summary": "Updates the specified TKE cloud config's machine pool", + "operationId": "v1CloudConfigsTkeMachinePoolUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1TencentMachinePoolConfigEntity" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "delete": { + "tags": [ + "v1" + ], + "summary": "Deletes the specified machine pool", + "operationId": "v1CloudConfigsTkeMachinePoolDelete", + "responses": { + "204": { + "description": "The resource was deleted successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster's cloud config uid", + "name": "configUid", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Machine pool name", + "name": "machinePoolName", + "in": "path", + "required": true + } + ] + }, + "/v1/cloudconfigs/tke/{configUid}/machinePools/{machinePoolName}/machines": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves a list of TKE machines", + "operationId": "v1CloudConfigsTkePoolMachinesList", + "parameters": [ + { + "type": "string", + "description": "Set of fields to be presented in the response with values. The fields are comma separated. Eg: metadata.uid,metadata.name", + "name": "fields", + "in": "query" + }, + { + "type": "string", + "description": "Filters can be combined with AND, OR operators with field path name. Eg: metadata.name=TestServiceANDspec.cloudType=aws\n\nServer will be restricted to certain fields based on the indexed data for each resource.", + "name": "filters", + "in": "query" + }, + { + "type": "string", + "description": "Specify the fields with sort order. 1 indicates ascending and -1 for descending. Eg: orderBy=metadata.name=1,metadata.uid=-1", + "name": "orderBy", + "in": "query" + }, + { + "type": "integer", + "format": "int64", + "default": 50, + "description": "limit is a maximum number of responses to return for a list call. Default and maximum value of the limit is 50.\nIf more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results.", + "name": "limit", + "in": "query" + }, + { + "type": "integer", + "format": "int64", + "description": "offset is the next index number from which the response will start. The response offset value can be used along with continue token for the pagination.", + "name": "offset", + "in": "query" + }, + { + "type": "string", + "description": "continue token to paginate the subsequent data items", + "name": "continue", + "in": "query" + } + ], + "responses": { + "200": { + "description": "An array of TKE machine items", + "schema": { + "$ref": "#/definitions/v1TencentMachines" + } + } + } + }, + "post": { + "tags": [ + "v1" + ], + "summary": "Adds the machine to cloud config's machine pool", + "operationId": "v1CloudConfigsTkePoolMachinesAdd", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1TencentMachine" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster's cloud config uid", + "name": "configUid", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Machine pool name", + "name": "machinePoolName", + "in": "path", + "required": true + } + ] + }, + "/v1/cloudconfigs/tke/{configUid}/machinePools/{machinePoolName}/machines/{machineUid}": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the specified Tke machine", + "operationId": "v1CloudConfigsTkePoolMachinesUidGet", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1TencentMachine" + } + } + } + }, + "put": { + "tags": [ + "v1" + ], + "summary": "Updates the specified machine to the cloud config's machine pool", + "operationId": "v1CloudConfigsTkePoolMachinesUidUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1TencentMachine" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "delete": { + "tags": [ + "v1" + ], + "summary": "Deletes the specified Tencent machine", + "operationId": "v1CloudConfigsTkePoolMachinesUidDelete", + "responses": { + "204": { + "description": "The resource was deleted successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster's cloud config uid", + "name": "configUid", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Machine pool name", + "name": "machinePoolName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Machine uid", + "name": "machineUid", + "in": "path", + "required": true + } + ] + }, + "/v1/cloudconfigs/virtual/{configUid}": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the specified Virtual cloud config", + "operationId": "v1CloudConfigsVirtualGet", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1VirtualCloudConfig" + } + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster's cloud config uid", + "name": "configUid", + "in": "path", + "required": true + } + ] + }, + "/v1/cloudconfigs/virtual/{configUid}/clusterConfig": { + "put": { + "tags": [ + "v1" + ], + "summary": "Updates the cluster configuration information", + "operationId": "v1CloudConfigsVirtualUidClusterConfig", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1VirtualCloudClusterConfigEntity" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster's cloud config uid", + "name": "configUid", + "in": "path", + "required": true + } + ] + }, + "/v1/cloudconfigs/virtual/{configUid}/machinePools": { + "post": { + "tags": [ + "v1" + ], + "summary": "Creates a virtual cloud config's machine pool", + "operationId": "v1CloudConfigsVirtualMachinePoolCreate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1VirtualMachinePoolConfigEntity" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster's cloud config uid", + "name": "configUid", + "in": "path", + "required": true + } + ] + }, + "/v1/cloudconfigs/virtual/{configUid}/machinePools/{machinePoolName}": { + "put": { + "tags": [ + "v1" + ], + "summary": "Updates the specified virtual cloud config's machine pool", + "operationId": "v1CloudConfigsVirtualMachinePoolUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1VirtualMachinePoolConfigEntity" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "delete": { + "tags": [ + "v1" + ], + "summary": "Deletes the specified machine pool", + "operationId": "v1CloudConfigsVirtualMachinePoolDelete", + "responses": { + "204": { + "description": "The resource was deleted successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster's cloud config uid", + "name": "configUid", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Machine pool name", + "name": "machinePoolName", + "in": "path", + "required": true + } + ] + }, + "/v1/cloudconfigs/virtual/{configUid}/machinePools/{machinePoolName}/machines": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves a list of virtual machines", + "operationId": "v1CloudConfigsVirtualPoolMachinesList", + "parameters": [ + { + "type": "string", + "description": "Set of fields to be presented in the response with values. The fields are comma separated. Eg: metadata.uid,metadata.name", + "name": "fields", + "in": "query" + }, + { + "type": "string", + "description": "Filters can be combined with AND, OR operators with field path name. Eg: metadata.name=TestServiceANDspec.cloudType=aws\n\nServer will be restricted to certain fields based on the indexed data for each resource.", + "name": "filters", + "in": "query" + }, + { + "type": "string", + "description": "Specify the fields with sort order. 1 indicates ascending and -1 for descending. Eg: orderBy=metadata.name=1,metadata.uid=-1", + "name": "orderBy", + "in": "query" + }, + { + "type": "integer", + "format": "int64", + "default": 50, + "description": "limit is a maximum number of responses to return for a list call. Default and maximum value of the limit is 50.\nIf more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results.", + "name": "limit", + "in": "query" + }, + { + "type": "integer", + "format": "int64", + "description": "offset is the next index number from which the response will start. The response offset value can be used along with continue token for the pagination.", + "name": "offset", + "in": "query" + }, + { + "type": "string", + "description": "continue token to paginate the subsequent data items", + "name": "continue", + "in": "query" + } + ], + "responses": { + "200": { + "description": "An array of virtual machine items", + "schema": { + "$ref": "#/definitions/v1VirtualMachines" + } + } + } + }, + "post": { + "tags": [ + "v1" + ], + "summary": "Adds the machine to cloud config's machine pool", + "operationId": "v1CloudConfigsVirtualPoolMachinesAdd", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1VirtualMachine" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster's cloud config uid", + "name": "configUid", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Machine pool name", + "name": "machinePoolName", + "in": "path", + "required": true + } + ] + }, + "/v1/cloudconfigs/virtual/{configUid}/machinePools/{machinePoolName}/machines/{machineUid}": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the specified virtual machine", + "operationId": "v1CloudConfigsVirtualPoolMachinesUidGet", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1VirtualMachine" + } + } + } + }, + "put": { + "tags": [ + "v1" + ], + "summary": "Updates the specified machine to the cloud config's machine pool", + "operationId": "v1CloudConfigsVirtualPoolMachinesUidUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1VirtualMachine" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "delete": { + "tags": [ + "v1" + ], + "summary": "Deletes the specified virtual machine", + "operationId": "v1CloudConfigsVirtualPoolMachinesUidDelete", + "responses": { + "204": { + "description": "The resource was deleted successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster's cloud config uid", + "name": "configUid", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Machine pool name", + "name": "machinePoolName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Machine uid", + "name": "machineUid", + "in": "path", + "required": true + } + ] + }, + "/v1/cloudconfigs/virtual/{configUid}/resize": { + "put": { + "tags": [ + "v1" + ], + "summary": "Updates and resizes the virtual cluster", + "operationId": "v1CloudConfigsVirtualUidUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1VirtualClusterResize" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Specify virtual cloud config uid", + "name": "configUid", + "in": "path", + "required": true + } + ] + }, + "/v1/cloudconfigs/vsphere/{configUid}": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the specified vSphere cloud config", + "operationId": "v1CloudConfigsVsphereGet", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1VsphereCloudConfig" + } + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster's cloud config uid", + "name": "configUid", + "in": "path", + "required": true + } + ] + }, + "/v1/cloudconfigs/vsphere/{configUid}/clusterConfig": { + "put": { + "tags": [ + "v1" + ], + "summary": "Updates the cluster configuration information", + "operationId": "v1CloudConfigsVsphereUidClusterConfig", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1VsphereCloudClusterConfigEntity" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster's cloud config uid", + "name": "configUid", + "in": "path", + "required": true + } + ] + }, + "/v1/cloudconfigs/vsphere/{configUid}/machinePools": { + "post": { + "tags": [ + "v1" + ], + "summary": "Creates a vSphere cloud config's machine pool", + "operationId": "v1CloudConfigsVsphereMachinePoolCreate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1VsphereMachinePoolConfigEntity" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster's cloud config uid", + "name": "configUid", + "in": "path", + "required": true + } + ] + }, + "/v1/cloudconfigs/vsphere/{configUid}/machinePools/{machinePoolName}": { + "put": { + "tags": [ + "v1" + ], + "summary": "Updates the specified vSphere cloud config's machine pool", + "operationId": "v1CloudConfigsVsphereMachinePoolUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1VsphereMachinePoolConfigEntity" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "delete": { + "tags": [ + "v1" + ], + "summary": "Deletes the specified machine pool", + "operationId": "v1CloudConfigsVsphereMachinePoolDelete", + "responses": { + "204": { + "description": "The resource was deleted successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster's cloud config uid", + "name": "configUid", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Machine pool name", + "name": "machinePoolName", + "in": "path", + "required": true + } + ] + }, + "/v1/cloudconfigs/vsphere/{configUid}/machinePools/{machinePoolName}/machines": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves a list of vSphere machines", + "operationId": "v1CloudConfigsVspherePoolMachinesList", + "parameters": [ + { + "type": "string", + "description": "Set of fields to be presented in the response with values. The fields are comma separated. Eg: metadata.uid,metadata.name", + "name": "fields", + "in": "query" + }, + { + "type": "string", + "description": "Filters can be combined with AND, OR operators with field path name. Eg: metadata.name=TestServiceANDspec.cloudType=aws\n\nServer will be restricted to certain fields based on the indexed data for each resource.", + "name": "filters", + "in": "query" + }, + { + "type": "string", + "description": "Specify the fields with sort order. 1 indicates ascending and -1 for descending. Eg: orderBy=metadata.name=1,metadata.uid=-1", + "name": "orderBy", + "in": "query" + }, + { + "type": "integer", + "format": "int64", + "default": 50, + "description": "limit is a maximum number of responses to return for a list call. Default and maximum value of the limit is 50.\nIf more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results.", + "name": "limit", + "in": "query" + }, + { + "type": "integer", + "format": "int64", + "description": "offset is the next index number from which the response will start. The response offset value can be used along with continue token for the pagination.", + "name": "offset", + "in": "query" + }, + { + "type": "string", + "description": "continue token to paginate the subsequent data items", + "name": "continue", + "in": "query" + } + ], + "responses": { + "200": { + "description": "An array of vSphere machine items", + "schema": { + "$ref": "#/definitions/v1VsphereMachines" + } + } + } + }, + "post": { + "tags": [ + "v1" + ], + "summary": "Adds the vSphere machine to cloud config's machine pool", + "operationId": "v1CloudConfigsVspherePoolMachinesAdd", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1VsphereMachine" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster's cloud config uid", + "name": "configUid", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Machine pool name", + "name": "machinePoolName", + "in": "path", + "required": true + } + ] + }, + "/v1/cloudconfigs/vsphere/{configUid}/machinePools/{machinePoolName}/machines/{machineUid}": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the specified vSphere machine", + "operationId": "v1CloudConfigsVspherePoolMachinesUidGet", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1VsphereMachine" + } + } + } + }, + "put": { + "tags": [ + "v1" + ], + "summary": "Updates the specified machine to cloud config's machine pool", + "operationId": "v1CloudConfigsVspherePoolMachinesUidUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1VsphereMachine" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "delete": { + "tags": [ + "v1" + ], + "summary": "Deletes the specified vSphere machine", + "operationId": "v1CloudConfigsVspherePoolMachinesUidDelete", + "responses": { + "204": { + "description": "The resource was deleted successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster's cloud config uid", + "name": "configUid", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Machine pool name", + "name": "machinePoolName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Machine uid", + "name": "machineUid", + "in": "path", + "required": true + } + ] + }, + "/v1/cloudconfigs/{cloudType}/{configUid}/machinePools/{machinePoolName}/machines/{machineUid}/maintenance": { + "put": { + "tags": [ + "v1" + ], + "summary": "Updates the specified machine maintenance", + "operationId": "v1CloudConfigsMachinePoolsMachineUidMaintenanceUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1MachineMaintenance" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster's cloud config uid", + "name": "configUid", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Machine pool name", + "name": "machinePoolName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Machine uid", + "name": "machineUid", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Cloud type", + "name": "cloudType", + "in": "path", + "required": true + } + ] + }, + "/v1/cloudconfigs/{cloudType}/{configUid}/machinePools/{machinePoolName}/machines/{machineUid}/maintenance/status": { + "put": { + "tags": [ + "v1" + ], + "summary": "Updates the specified machine maintenance", + "operationId": "v1CloudConfigsMachinePoolsMachineUidMaintenanceStatusUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1MachineMaintenanceStatus" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster's cloud config uid", + "name": "configUid", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Machine pool name", + "name": "machinePoolName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Machine uid", + "name": "machineUid", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Cloud type", + "name": "cloudType", + "in": "path", + "required": true + } + ] + }, + "/v1/cloudconfigs/{configUid}/machinePools/machineUids": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the specified cloud config's machine pools and machine uid", + "operationId": "v1CloudConfigsMachinePoolsMachineUidsGet", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1MachinePoolsMachineUids" + } + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster's cloud config uid", + "name": "configUid", + "in": "path", + "required": true + } + ] + }, + "/v1/clouds/aws/account/sts": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves AWS external id and account id", + "operationId": "V1AwsAccountStsGet", + "parameters": [ + { + "enum": [ + "aws", + "aws-us-gov" + ], + "type": "string", + "default": "aws", + "description": "AWS accounts are scoped to a single partition. Allowed values [aws, aws-us-gov], Default values", + "name": "partition", + "in": "query" + } + ], + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/V1AwsAccountSts" + } + } + } + } + }, + "/v1/clouds/aws/account/validate": { + "post": { + "tags": [ + "v1" + ], + "summary": "Validate the specified AWS account credentials", + "operationId": "V1AwsAccountValidate", + "parameters": [ + { + "description": "Request payload to validate AWS cloud account", + "name": "awsCloudAccount", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1AwsCloudAccount" + } + } + ], + "responses": { + "204": { + "description": "Ok response without content", + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + } + }, + "/v1/clouds/aws/cloudwatch/validate": { + "post": { + "description": "Validates aws cloud watch credentials", + "tags": [ + "v1" + ], + "summary": "validates aws cloud watch credentials", + "operationId": "V1CloudsAwsCloudWatchValidate", + "parameters": [ + { + "description": "Request payload for cloud watch config", + "name": "cloudWatchConfig", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1.CloudWatchConfig" + } + } + ], + "responses": { + "204": { + "description": "Ok response without content", + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + } + }, + "/v1/clouds/aws/cost": { + "post": { + "tags": [ + "v1" + ], + "summary": "Retrieves AWS cloud account usage cost from cost explorer.", + "operationId": "v1AwsCloudCost", + "parameters": [ + { + "description": "Request payload for AWS cloud cost", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1AwsCloudCostSpec" + } + } + ], + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1AwsCloudCostSummary" + } + } + } + } + }, + "/v1/clouds/aws/imageIds/{imageId}/volumeSize": { + "get": { + "description": "Get AWS Volume Size", + "tags": [ + "v1" + ], + "summary": "Get AWS Volume Size", + "operationId": "V1AwsVolumeSizeGet", + "parameters": [ + { + "type": "string", + "description": "Specific AWS Region", + "name": "region", + "in": "query", + "required": true + }, + { + "type": "string", + "description": "Uid for the specific AWS cloud account", + "name": "cloudAccountUid", + "in": "query", + "required": true + }, + { + "type": "string", + "description": "AWS image id", + "name": "imageId", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1AwsVolumeSize" + } + } + } + } + }, + "/v1/clouds/aws/policies": { + "post": { + "tags": [ + "v1" + ], + "summary": "Retrieves a list of AWS policies for the specified account", + "operationId": "V1AwsIamPolicies", + "parameters": [ + { + "description": "Request payload for AWS Cloud Account", + "name": "account", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1AwsCloudAccount" + } + }, + { + "type": "string", + "description": "Uid for the specific AWS cloud account", + "name": "cloudAccountUid", + "in": "query" + } + ], + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1AwsPolicies" + } + } + } + } + }, + "/v1/clouds/aws/policyArns/validate": { + "post": { + "tags": [ + "v1" + ], + "summary": "Validate the aws policy arns validate", + "operationId": "V1AwsPolicyArnsValidate", + "parameters": [ + { + "description": "Request payload to validate AWS policy ARN", + "name": "spec", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1AwsPolicyArnsSpec" + } + }, + { + "type": "string", + "description": "Uid for the specific AWS cloud account", + "name": "cloudAccountUid", + "in": "query" + } + ], + "responses": { + "204": { + "description": "Ok response without content", + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + } + }, + "/v1/clouds/aws/properties/validate": { + "post": { + "tags": [ + "v1" + ], + "summary": "Validate AWS properties", + "operationId": "V1AwsPropertiesValidate", + "parameters": [ + { + "description": "Request payload for AWS properties validate spec", + "name": "properties", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/V1AwsPropertiesValidateSpec" + } + } + ], + "responses": { + "204": { + "description": "Ok response without content", + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + } + }, + "/v1/clouds/aws/regions": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves a list of AWS regions for the specified account", + "operationId": "V1AwsRegions", + "parameters": [ + { + "type": "string", + "description": "Uid for the specific AWS cloud account", + "name": "cloudAccountUid", + "in": "query", + "required": true + } + ], + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1AwsRegions" + } + } + } + } + }, + "/v1/clouds/aws/regions/{region}/availabilityzones": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves a list of AWS availability zones for the specified region", + "operationId": "V1AwsZones", + "parameters": [ + { + "type": "string", + "description": "Region for which zones are requested", + "name": "region", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Uid for the specific AWS cloud account", + "name": "cloudAccountUid", + "in": "query", + "required": true + } + ], + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1AwsAvailabilityZones" + } + } + } + } + }, + "/v1/clouds/aws/regions/{region}/copydefaultimages": { + "post": { + "tags": [ + "v1" + ], + "summary": "Copies the specified image from one region to another region", + "operationId": "V1AwsCopyImageFromDefaultRegion", + "parameters": [ + { + "type": "string", + "description": "Region to copy AWS image from", + "name": "region", + "in": "path", + "required": true + }, + { + "description": "Request payload to copy the AWS image", + "name": "spectroClusterAwsImageTag", + "in": "body", + "schema": { + "$ref": "#/definitions/v1AwsFindImageRequest" + } + } + ], + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1AsyncOperationIdEntity" + } + } + } + } + }, + "/v1/clouds/aws/regions/{region}/eksClusters/name/validate": { + "get": { + "description": "Returns no contents if aws cluster name is valid else error.", + "tags": [ + "v1" + ], + "summary": "Check if Aws cluster name is valid", + "operationId": "V1AwsClusterNameValidate", + "parameters": [ + { + "type": "string", + "description": "Uid for the specific AWS cloud account", + "name": "cloudAccountUid", + "in": "query", + "required": true + }, + { + "type": "string", + "description": "cluster name to be validated", + "name": "name", + "in": "query", + "required": true + }, + { + "type": "string", + "description": "Region for which cluster name is validated", + "name": "region", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "description": "Ok response without content", + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + } + }, + "/v1/clouds/aws/regions/{region}/images": { + "post": { + "tags": [ + "v1" + ], + "summary": "Returns AWS image for the specified AMI name", + "operationId": "V1AwsFindImage", + "parameters": [ + { + "type": "string", + "description": "Region to find AWS image", + "name": "region", + "in": "path", + "required": true + }, + { + "description": "Request payload to find the AWS image", + "name": "awsImageRequest", + "in": "body", + "schema": { + "$ref": "#/definitions/v1AwsFindImageRequest" + } + } + ], + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1AwsImage" + } + } + } + } + }, + "/v1/clouds/aws/regions/{region}/instancetypes": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves a list of AWS instance types", + "operationId": "V1AwsInstanceTypes", + "parameters": [ + { + "type": "string", + "description": "Region for which AWS instances are requested", + "name": "region", + "in": "path", + "required": true + }, + { + "type": "number", + "format": "double", + "description": "Filter for instances having cpu greater than or equal", + "name": "cpuGtEq", + "in": "query" + }, + { + "type": "number", + "format": "double", + "description": "Filter for instances having memory greater than or equal", + "name": "memoryGtEq", + "in": "query" + }, + { + "type": "number", + "format": "double", + "description": "Filter for instances having gpu greater than or equal", + "name": "gpuGtEq", + "in": "query" + }, + { + "type": "string", + "description": "Uid for the specific AWS cloud account", + "name": "cloudAccountUid", + "in": "query" + } + ], + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1AwsInstanceTypes" + } + } + } + } + }, + "/v1/clouds/aws/regions/{region}/keypairs": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves a list of AWS keypairs", + "operationId": "V1AwsKeyPairs", + "parameters": [ + { + "type": "string", + "description": "Region for which AWS key pairs are requested", + "name": "region", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Uid for the specific AWS cloud account", + "name": "cloudAccountUid", + "in": "query", + "required": true + } + ], + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1AwsKeyPairs" + } + } + } + } + }, + "/v1/clouds/aws/regions/{region}/keypairs/{keypair}/validate": { + "post": { + "tags": [ + "v1" + ], + "summary": "Validate the specified AWS keypair", + "operationId": "V1AwsKeyPairValidate", + "parameters": [ + { + "type": "string", + "description": "Region for which AWS key pairs is validated", + "name": "region", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Uid for the specific AWS cloud account", + "name": "cloudAccountUid", + "in": "query", + "required": true + }, + { + "type": "string", + "description": "AWS Key pair which is to be validated", + "name": "keypair", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "description": "Ok response without content", + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + } + }, + "/v1/clouds/aws/regions/{region}/kms/{keyId}": { + "get": { + "tags": [ + "v1" + ], + "summary": "Get AWS KMS key by Id", + "operationId": "V1AwsKmsKeyGet", + "parameters": [ + { + "type": "string", + "description": "Region for which AWS KMS key belongs", + "name": "region", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "The globally unique identifier for the KMS key", + "name": "keyId", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Uid for the specific AWS cloud account", + "name": "cloudAccountUid", + "in": "query", + "required": true + } + ], + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1AwsKmsKeyEntity" + } + } + } + } + }, + "/v1/clouds/aws/regions/{region}/kmskeys": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves a list of AWS KMS keys for the specified account", + "operationId": "V1AwsKmsKeys", + "parameters": [ + { + "type": "string", + "description": "Region for which AWS KMS key are requested", + "name": "region", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Uid for the specific AWS cloud account", + "name": "cloudAccountUid", + "in": "query", + "required": true + } + ], + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1AwsKmsKeys" + } + } + } + } + }, + "/v1/clouds/aws/regions/{region}/kmskeys/validate": { + "get": { + "tags": [ + "v1" + ], + "summary": "Validate an Aws KMS key for the specified account", + "operationId": "V1AwsKmsKeyValidate", + "parameters": [ + { + "type": "string", + "description": "Region for which AWS KMS key is validated", + "name": "region", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Uid for the specific AWS cloud account", + "name": "cloudAccountUid", + "in": "query", + "required": true + }, + { + "type": "string", + "description": "AWS KEY ARN for validation", + "name": "keyArn", + "in": "query", + "required": true + } + ], + "responses": { + "204": { + "description": "Ok response without content", + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + } + }, + "/v1/clouds/aws/regions/{region}/storagetypes": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves a list of AWS storage types", + "operationId": "V1AwsStorageTypes", + "parameters": [ + { + "type": "string", + "description": "Region for which AWS storage types are requested", + "name": "region", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1AwsStorageTypes" + } + } + } + } + }, + "/v1/clouds/aws/regions/{region}/vpcs": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves a list of VPCs for the specified account", + "operationId": "V1AwsVpcs", + "parameters": [ + { + "type": "string", + "description": "Region for which VPCs are requested", + "name": "region", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Uid for the specific AWS cloud account", + "name": "cloudAccountUid", + "in": "query", + "required": true + } + ], + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1AwsVpcs" + } + } + } + } + }, + "/v1/clouds/aws/s3/validate": { + "post": { + "tags": [ + "v1" + ], + "summary": "Validate the AWS S3 bucket", + "operationId": "V1AwsS3Validate", + "parameters": [ + { + "description": "AWS S3 bucket credentials", + "name": "awsS3Credential", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1AwsS3BucketCredentials" + } + } + ], + "responses": { + "204": { + "description": "Ok response without content", + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + } + }, + "/v1/clouds/aws/securitygroups": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves a list of AWS security groups for the specified account", + "operationId": "V1AwsSecurityGroups", + "parameters": [ + { + "type": "string", + "description": "Uid for the specific AWS cloud account", + "name": "cloudAccountUid", + "in": "query" + }, + { + "type": "string", + "description": "Region for which security groups are requested", + "name": "region", + "in": "query", + "required": true + }, + { + "type": "string", + "description": "Vpc Id for which security groups are requested", + "name": "vpcId", + "in": "query", + "required": true + } + ], + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1AwsSecurityGroups" + } + } + } + } + }, + "/v1/clouds/aws/volumeTypes": { + "get": { + "description": "List all AWS Volume Types", + "tags": [ + "v1" + ], + "summary": "Get all AWS Volume Types", + "operationId": "V1AwsVolumeTypesGet", + "parameters": [ + { + "type": "string", + "description": "Specific AWS Region", + "name": "region", + "in": "query", + "required": true + } + ], + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1AWSVolumeTypes" + } + } + } + } + }, + "/v1/clouds/azure/account/validate": { + "post": { + "description": "Returns no contents if account is valid else error.", + "tags": [ + "v1" + ], + "summary": "Check if Azure account is valid", + "operationId": "V1AzureAccountValidate", + "parameters": [ + { + "description": "Request payload for Azure cloud account", + "name": "azureCloudAccount", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1AzureCloudAccount" + } + } + ], + "responses": { + "204": { + "description": "Ok response without content", + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + } + }, + "/v1/clouds/azure/groups": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves a list of Azure groups", + "operationId": "V1AzureGroups", + "parameters": [ + { + "type": "string", + "description": "Uid for the specific Azure cloud account", + "name": "cloudAccountUid", + "in": "query" + } + ], + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1AzureGroups" + } + } + } + } + }, + "/v1/clouds/azure/regions": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves a list of Azure regions", + "operationId": "V1AzureRegions", + "parameters": [ + { + "type": "string", + "description": "Uid for the specific Azure cloud account", + "name": "cloudAccountUid", + "in": "query" + }, + { + "type": "string", + "description": "SubscriptionId for which resources is requested", + "name": "subscriptionId", + "in": "query" + } + ], + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1AzureRegions" + } + } + } + } + }, + "/v1/clouds/azure/regions/{region}/instancetypes": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves a list of Azure instance types", + "operationId": "V1AzureInstanceTypes", + "parameters": [ + { + "type": "string", + "description": "Region for which Azure instance types are requested", + "name": "region", + "in": "path", + "required": true + }, + { + "type": "number", + "format": "double", + "description": "Filter for instances having cpu greater than or equal", + "name": "cpuGtEq", + "in": "query" + }, + { + "type": "number", + "format": "double", + "description": "Filter for instances having memory greater than or equal", + "name": "memoryGtEq", + "in": "query" + }, + { + "type": "number", + "format": "double", + "description": "Filter for instances having gpu greater than or equal", + "name": "gpuGtEq", + "in": "query" + } + ], + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1AzureInstanceTypes" + } + } + } + } + }, + "/v1/clouds/azure/regions/{region}/storagetypes": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves a list of Azure storage types", + "operationId": "V1AzureStorageTypes", + "parameters": [ + { + "type": "string", + "description": "Region for which Azure storage types are requested", + "name": "region", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1AzureStorageTypes" + } + } + } + } + }, + "/v1/clouds/azure/regions/{region}/subscriptions/{subscriptionId}/aksClusters/name/validate": { + "get": { + "description": "Returns no contents if Azure cluster name is valid else error.", + "tags": [ + "v1" + ], + "summary": "Check if Azure cluster name is valid", + "operationId": "V1AzureClusterNameValidate", + "parameters": [ + { + "type": "string", + "description": "Uid for the specific Azure cloud account", + "name": "cloudAccountUid", + "in": "query", + "required": true + }, + { + "type": "string", + "description": "cluster name to be validated", + "name": "name", + "in": "query", + "required": true + }, + { + "type": "string", + "description": "region in which cluster name is to be validated", + "name": "region", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "subscriptionId in which cluster name is to be validated", + "name": "subscriptionId", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "resourceGroup in which cluster name is to be validated", + "name": "resourceGroup", + "in": "query", + "required": true + } + ], + "responses": { + "204": { + "description": "Ok response without content", + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + } + }, + "/v1/clouds/azure/regions/{region}/subscriptions/{subscriptionId}/networks": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves a list of Azure virtual network list for the sepcified account", + "operationId": "V1AzureVirtualNetworkList", + "parameters": [ + { + "type": "string", + "description": "Uid for the specific Azure cloud account", + "name": "cloudAccountUid", + "in": "query", + "required": true + }, + { + "type": "string", + "description": "Region for which Azure virtual networks are requested", + "name": "region", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Uid for which Azure virtual networks are requested", + "name": "subscriptionId", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Resource group for which Azure virtual networks are requested", + "name": "resourceGroup", + "in": "query" + } + ], + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1AzureVirtualNetworkList" + } + } + } + } + }, + "/v1/clouds/azure/regions/{region}/subscriptions/{subscriptionId}/resourceGroups": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves a list of Azure resource group for the specified account", + "operationId": "V1AzureResourceGroupList", + "parameters": [ + { + "type": "string", + "description": "Uid for the specific Azure cloud account", + "name": "cloudAccountUid", + "in": "query", + "required": true + }, + { + "type": "string", + "description": "Region for which Azure resource group are requested", + "name": "region", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Uid for which Azure resource group are requested", + "name": "subscriptionId", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1AzureResourceGroupList" + } + } + } + } + }, + "/v1/clouds/azure/regions/{region}/zones": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves a list of Azure zones for the specified region", + "operationId": "V1AzureZones", + "parameters": [ + { + "type": "string", + "description": "Region for which Azure zones are requested", + "name": "region", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Uid for the specific Azure cloud account", + "name": "cloudAccountUid", + "in": "query" + }, + { + "type": "string", + "description": "subscriptionId of azure account", + "name": "subscriptionId", + "in": "query" + } + ], + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1AzureZoneEntity" + } + } + } + } + }, + "/v1/clouds/azure/resourceGroups/{resourceGroup}/privateDnsZones": { + "get": { + "description": "Returns Azure private DNS zones", + "tags": [ + "v1" + ], + "summary": "Get Azure private DNS zones for the given resource group", + "operationId": "V1AzurePrivateDnsZones", + "parameters": [ + { + "type": "string", + "description": "resourceGroup for which Azure private dns zones are requested", + "name": "resourceGroup", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Uid for the specific Azure cloud account", + "name": "cloudAccountUid", + "in": "query", + "required": true + }, + { + "type": "string", + "description": "subscriptionId for which Azure private dns zones are requested", + "name": "subscriptionId", + "in": "query", + "required": true + } + ], + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1AzurePrivateDnsZones" + } + } + } + } + }, + "/v1/clouds/azure/resourceGroups/{resourceGroup}/storageAccounts": { + "get": { + "description": "Returns Azure storage accounts.", + "tags": [ + "v1" + ], + "summary": "Get Azure storage accounts", + "operationId": "V1AzureStorageAccounts", + "parameters": [ + { + "type": "string", + "description": "resourceGroup for which Azure storage accounts are requested", + "name": "resourceGroup", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Uid for the specific Azure cloud account", + "name": "cloudAccountUid", + "in": "query" + }, + { + "type": "string", + "description": "subscriptionId for which Azure storage accounts are requested", + "name": "subscriptionId", + "in": "query", + "required": true + } + ], + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1AzureStorageAccounts" + } + } + } + } + }, + "/v1/clouds/azure/resourceGroups/{resourceGroup}/storageAccounts/{storageAccountName}/containers": { + "get": { + "description": "Returns Azure storage containers for the given account.", + "tags": [ + "v1" + ], + "summary": "Get Azure storage containers", + "operationId": "V1AzureStorageContainers", + "parameters": [ + { + "type": "string", + "description": "resourceGroup for which Azure storage accounts are requested", + "name": "resourceGroup", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Uid for the specific Azure cloud account", + "name": "cloudAccountUid", + "in": "query" + }, + { + "type": "string", + "description": "subscriptionId for which Azure storage accounts are requested", + "name": "subscriptionId", + "in": "query", + "required": true + }, + { + "type": "string", + "description": "resourceGroup for which Azure storage accounts are requested", + "name": "storageAccountName", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1AzureStorageContainers" + } + } + } + } + }, + "/v1/clouds/azure/storageaccounttypes": { + "get": { + "description": "Returns Azure storage account types.", + "tags": [ + "v1" + ], + "summary": "Get Azure storage account types", + "operationId": "V1AzureStorageAccountTypes", + "parameters": [ + { + "type": "string", + "description": "Region for which Azure storage account types are requested", + "name": "region", + "in": "query" + } + ], + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1AzureStorageAccountEntity" + } + } + } + } + }, + "/v1/clouds/azure/subscriptions": { + "get": { + "description": "Returns list of Azure subscription list.", + "tags": [ + "v1" + ], + "summary": "Retrieves a list of Azure subscription list for the specified account", + "operationId": "V1AzureSubscriptionList", + "parameters": [ + { + "type": "string", + "description": "Uid for the specific Azure cloud account", + "name": "cloudAccountUid", + "in": "query", + "required": true + } + ], + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1AzureSubscriptionList" + } + } + } + } + }, + "/v1/clouds/azure/vhds/{vhd}/url": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the Azure vhd url for the specified vhd location", + "operationId": "V1AzureVhdUrl", + "parameters": [ + { + "type": "string", + "description": "vhd location for which Azure vhd url is requested", + "name": "vhd", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1AzureVhdUrlEntity" + } + } + } + } + }, + "/v1/clouds/cloudTypes": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the custom cloud types", + "operationId": "V1CustomCloudTypesGet", + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1CustomCloudTypes" + } + } + } + } + }, + "/v1/clouds/cloudTypes/register": { + "post": { + "tags": [ + "v1" + ], + "summary": "Registers the custom cloud type", + "operationId": "V1CustomCloudTypeRegister", + "parameters": [ + { + "description": "Request payload to register custom cloud type", + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1CustomCloudRequestEntity" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + } + }, + "/v1/clouds/cloudTypes/{cloudType}": { + "delete": { + "tags": [ + "v1" + ], + "summary": "Deletes the custom cloud type", + "operationId": "V1CustomCloudTypesDelete", + "parameters": [ + { + "type": "string", + "description": "Unique cloud type", + "name": "cloudType", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "description": "The resource was deleted successfully" + } + } + } + }, + "/v1/clouds/cloudTypes/{cloudType}/cloudAccountKeys": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns valid keys for the cloud account used for custom cloud type", + "operationId": "V1CustomCloudTypeCloudAccountKeysGet", + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1CustomCloudTypeCloudAccountKeys" + } + } + } + }, + "put": { + "tags": [ + "v1" + ], + "summary": "Update the custom cloud type cloud account keys", + "operationId": "V1CustomCloudTypeCloudAccountKeysUpdate", + "parameters": [ + { + "description": "Request payload for custom cloud meta entity", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1CustomCloudTypeCloudAccountKeys" + } + } + ], + "responses": { + "204": { + "description": "Ok response without content", + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Unique cloud type", + "name": "cloudType", + "in": "path", + "required": true + } + ] + }, + "/v1/clouds/cloudTypes/{cloudType}/content/bootstrap": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the custom cloud type bootstrap", + "operationId": "V1CustomCloudTypeBootstrapGet", + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1CustomCloudTypeContentResponse" + } + } + } + }, + "put": { + "consumes": [ + "multipart/form-data" + ], + "tags": [ + "v1" + ], + "summary": "Update the custom cloud type bootstrap", + "operationId": "V1CustomCloudTypeBootstrapUpdate", + "parameters": [ + { + "type": "file", + "name": "fileName", + "in": "formData" + } + ], + "responses": { + "204": { + "description": "Ok response without content", + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + }, + "delete": { + "tags": [ + "v1" + ], + "summary": "Delete the custom cloud type bootstrap", + "operationId": "V1CustomCloudTypeBootstrapDelete", + "responses": { + "204": { + "description": "The resource was deleted successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Unique cloud type", + "name": "cloudType", + "in": "path", + "required": true + } + ] + }, + "/v1/clouds/cloudTypes/{cloudType}/content/cloudProvider": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the custom cloud type cloud provider", + "operationId": "V1CustomCloudTypeCloudProviderGet", + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1CustomCloudTypeContentResponse" + } + } + } + }, + "put": { + "consumes": [ + "multipart/form-data" + ], + "tags": [ + "v1" + ], + "summary": "Update the custom cloud type cloud provider", + "operationId": "V1CustomCloudTypeCloudProviderUpdate", + "parameters": [ + { + "type": "file", + "name": "fileName", + "in": "formData" + } + ], + "responses": { + "204": { + "description": "Ok response without content", + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + }, + "delete": { + "tags": [ + "v1" + ], + "summary": "Delete the custom cloud type cloud provider", + "operationId": "V1CustomCloudTypeCloudProviderDelete", + "responses": { + "204": { + "description": "The resource was deleted successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Unique cloud type", + "name": "cloudType", + "in": "path", + "required": true + } + ] + }, + "/v1/clouds/cloudTypes/{cloudType}/content/controlPlane": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the custom cloud type control plane", + "operationId": "V1CustomCloudTypeControlPlaneGet", + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1CustomCloudTypeContentResponse" + } + } + } + }, + "put": { + "consumes": [ + "multipart/form-data" + ], + "tags": [ + "v1" + ], + "summary": "Update the custom cloud type control plane", + "operationId": "V1CustomCloudTypeControlPlaneUpdate", + "parameters": [ + { + "type": "file", + "name": "fileName", + "in": "formData" + } + ], + "responses": { + "204": { + "description": "Ok response without content", + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + }, + "delete": { + "tags": [ + "v1" + ], + "summary": "Delete the custom cloud type control plane", + "operationId": "V1CustomCloudTypeControlPlaneDelete", + "responses": { + "204": { + "description": "The resource was deleted successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Unique cloud type", + "name": "cloudType", + "in": "path", + "required": true + } + ] + }, + "/v1/clouds/cloudTypes/{cloudType}/content/templates/clusterTemplate": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the custom cloud type cluster template", + "operationId": "V1CustomCloudTypeClusterTemplateGet", + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1CustomCloudTypeContentResponse" + } + } + } + }, + "put": { + "consumes": [ + "multipart/form-data" + ], + "tags": [ + "v1" + ], + "summary": "Update the custom cloud type cluster template", + "operationId": "V1CustomCloudTypeClusterTemplateUpdate", + "parameters": [ + { + "type": "file", + "name": "fileName", + "in": "formData" + } + ], + "responses": { + "204": { + "description": "Ok response without content", + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + }, + "delete": { + "tags": [ + "v1" + ], + "summary": "Delete the custom cloud type cluster template", + "operationId": "V1CustomCloudTypeClusterTemplateDelete", + "responses": { + "204": { + "description": "The resource was deleted successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Unique cloud type", + "name": "cloudType", + "in": "path", + "required": true + } + ] + }, + "/v1/clouds/cloudTypes/{cloudType}/content/templates/controlPlanePoolTemplate": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the custom cloud type controlPlane pool template", + "operationId": "V1CustomCloudTypeControlPlanePoolTemplateGet", + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1CustomCloudTypeContentResponse" + } + } + } + }, + "put": { + "consumes": [ + "multipart/form-data" + ], + "tags": [ + "v1" + ], + "summary": "Update the custom cloud type controlPlane pool template", + "operationId": "V1CustomCloudTypeControlPlanePoolTemplateUpdate", + "parameters": [ + { + "type": "file", + "name": "fileName", + "in": "formData" + } + ], + "responses": { + "204": { + "description": "Ok response without content", + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + }, + "delete": { + "tags": [ + "v1" + ], + "summary": "Delete the custom cloud type controlPlane pool template", + "operationId": "V1CustomCloudTypeControlPlanePoolTemplateDelete", + "responses": { + "204": { + "description": "The resource was deleted successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Unique cloud type", + "name": "cloudType", + "in": "path", + "required": true + } + ] + }, + "/v1/clouds/cloudTypes/{cloudType}/content/templates/workerPoolTemplate": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the custom cloud type worker pool template", + "operationId": "V1CustomCloudTypeWorkerPoolTemplateGet", + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1CustomCloudTypeContentResponse" + } + } + } + }, + "put": { + "consumes": [ + "multipart/form-data" + ], + "tags": [ + "v1" + ], + "summary": "Update the custom cloud type worker pool template", + "operationId": "V1CustomCloudTypeWorkerPoolTemplateUpdate", + "parameters": [ + { + "type": "file", + "name": "fileName", + "in": "formData" + } + ], + "responses": { + "204": { + "description": "Ok response without content", + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + }, + "delete": { + "tags": [ + "v1" + ], + "summary": "Delete the custom cloud type worker pool template", + "operationId": "V1CustomCloudTypeWorkerPoolTemplateDelete", + "responses": { + "204": { + "description": "The resource was deleted successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Unique cloud type", + "name": "cloudType", + "in": "path", + "required": true + } + ] + }, + "/v1/clouds/cloudTypes/{cloudType}/logo": { + "get": { + "produces": [ + "application/octet-stream" + ], + "tags": [ + "v1" + ], + "summary": "Returns the custom cloud type logo", + "operationId": "V1CustomCloudTypeLogoGet", + "responses": { + "200": { + "description": "Download the logo", + "schema": { + "type": "string", + "format": "binary" + }, + "headers": { + "Content-Disposition": { + "type": "string" + } + } + } + } + }, + "put": { + "consumes": [ + "multipart/form-data" + ], + "tags": [ + "v1" + ], + "summary": "Update the custom cloud type logo", + "operationId": "V1CustomCloudTypeLogoUpdate", + "parameters": [ + { + "type": "file", + "name": "fileName", + "in": "formData" + } + ], + "responses": { + "204": { + "description": "Ok response without content", + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Unique cloud type", + "name": "cloudType", + "in": "path", + "required": true + } + ] + }, + "/v1/clouds/cloudTypes/{cloudType}/meta": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the custom cloud type meta", + "operationId": "V1CustomCloudTypeMetaGet", + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1CustomCloudMetaEntity" + } + } + } + }, + "put": { + "tags": [ + "v1" + ], + "summary": "Update the custom cloud type meta", + "operationId": "V1CustomCloudTypeMetaUpdate", + "parameters": [ + { + "description": "Request payload for custom cloud meta entity", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1CustomCloudRequestEntity" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Unique cloud type", + "name": "cloudType", + "in": "path", + "required": true + } + ] + }, + "/v1/clouds/eks/properties/validate": { + "post": { + "tags": [ + "v1" + ], + "summary": "Validate EKS properties", + "operationId": "V1EksPropertiesValidate", + "parameters": [ + { + "description": "Request payload for EKS properties validate spec", + "name": "properties", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/V1EksPropertiesValidateSpec" + } + } + ], + "responses": { + "204": { + "description": "Ok response without content", + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + } + }, + "/v1/clouds/gcp/account/validate": { + "post": { + "tags": [ + "v1" + ], + "summary": "Validate the specified GCP account credentials", + "operationId": "V1GcpAccountValidate", + "parameters": [ + { + "description": "Uid for the specific GCP cloud account", + "name": "gcpCloudAccount", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1GcpCloudAccountValidateEntity" + } + } + ], + "responses": { + "204": { + "description": "Ok response without content", + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + } + }, + "/v1/clouds/gcp/azs/validate": { + "post": { + "tags": [ + "v1" + ], + "summary": "Validate the specified GCP az", + "operationId": "V1GcpAzValidate", + "parameters": [ + { + "description": "Uid for the specific GCP cloud account", + "name": "entity", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1AzValidateEntity" + } + } + ], + "responses": { + "204": { + "description": "Ok response without content", + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + } + }, + "/v1/clouds/gcp/bucketname/validate": { + "post": { + "tags": [ + "v1" + ], + "summary": "Validate the specified GCP bucket name credentials", + "operationId": "V1GcpBucketNameValidate", + "parameters": [ + { + "description": "Request payload for GCP account name validate", + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1GcpAccountNameValidateSpec" + } + } + ], + "responses": { + "204": { + "description": "Ok response without content", + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + } + }, + "/v1/clouds/gcp/image/container/validate": { + "get": { + "tags": [ + "v1" + ], + "summary": "Validates the image with tag", + "operationId": "V1GcpContainerImageValidate", + "parameters": [ + { + "type": "string", + "description": "image path in the container", + "name": "imagePath", + "in": "query", + "required": true + }, + { + "type": "string", + "description": "tag in the GCP container", + "name": "tag", + "in": "query", + "required": true + } + ], + "responses": { + "204": { + "description": "Ok response without content", + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + } + }, + "/v1/clouds/gcp/images/{imageName}/url": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the Gcp image url for the specified image location", + "operationId": "V1GcpImageUrl", + "parameters": [ + { + "type": "string", + "description": "imageName for which GCP image url is requested", + "name": "imageName", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1GcpImageUrlEntity" + } + } + } + } + }, + "/v1/clouds/gcp/projects": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves a list of GCP projects for the specified account", + "operationId": "V1GcpProjects", + "parameters": [ + { + "type": "string", + "description": "Uid for the specific GCP cloud account", + "name": "cloudAccountUid", + "in": "query", + "required": true + } + ], + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1GcpProjects" + } + } + } + } + }, + "/v1/clouds/gcp/projects/{project}/regions": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves a list of GCP regions", + "operationId": "V1GcpRegions", + "parameters": [ + { + "type": "string", + "description": "Uid for the specific GCP cloud account", + "name": "cloudAccountUid", + "in": "query", + "required": true + }, + { + "type": "string", + "description": "Project Name for which GCP zones are requested", + "name": "project", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1GcpRegions" + } + } + } + } + }, + "/v1/clouds/gcp/projects/{project}/regions/{region}/networks": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves a list of GCP networks for the specified account", + "operationId": "V1GcpNetworks", + "parameters": [ + { + "type": "string", + "description": "Uid for the specific GCP cloud account", + "name": "cloudAccountUid", + "in": "query", + "required": true + }, + { + "type": "string", + "description": "Region for which GCP networks are requested", + "name": "region", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Project Name for which GCP networks are requested", + "name": "project", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1GcpNetworks" + } + } + } + } + }, + "/v1/clouds/gcp/projects/{project}/regions/{region}/zones": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves a list of GCP zones for the specified account and region", + "operationId": "V1GcpZones", + "parameters": [ + { + "type": "string", + "description": "Uid for the specific GCP cloud account", + "name": "cloudAccountUid", + "in": "query", + "required": true + }, + { + "type": "string", + "description": "Region for which GCP zones are requested", + "name": "region", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Project Name for which GCP zones are requested", + "name": "project", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1GcpZones" + } + } + } + } + }, + "/v1/clouds/gcp/projects/{project}/validate": { + "post": { + "tags": [ + "v1" + ], + "summary": "Validate the specified GCP project", + "operationId": "V1GcpProjectValidate", + "parameters": [ + { + "type": "string", + "description": "GCP project uid", + "name": "project", + "in": "path", + "required": true + }, + { + "description": "Uid for the specific GCP cloud account", + "name": "cloudAccountUid", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1CloudAccountUidEntity" + } + } + ], + "responses": { + "204": { + "description": "Ok response without content", + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + } + }, + "/v1/clouds/gcp/projects/{project}/zones": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves a list of GCP zones for the specified account", + "operationId": "V1GcpAvailabilityZones", + "parameters": [ + { + "type": "string", + "description": "Uid for the specific GCP cloud account", + "name": "cloudAccountUid", + "in": "query", + "required": true + }, + { + "type": "string", + "description": "Project Name for which GCP zones are requested", + "name": "project", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1GcpZones" + } + } + } + } + }, + "/v1/clouds/gcp/properties/validate": { + "post": { + "tags": [ + "v1" + ], + "summary": "Validate GCP properties", + "operationId": "V1GcpPropertiesValidate", + "parameters": [ + { + "description": "Request payload for GCP properties validate spec", + "name": "properties", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/V1GcpPropertiesValidateSpec" + } + } + ], + "responses": { + "204": { + "description": "Ok response without content", + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + } + }, + "/v1/clouds/gcp/regions/{region}/instancetypes": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves a list of GCP instance types", + "operationId": "V1GcpInstanceTypes", + "parameters": [ + { + "type": "string", + "description": "Region for which GCP instance types are requested", + "name": "region", + "in": "path", + "required": true + }, + { + "type": "number", + "format": "double", + "description": "Filter for instances having cpu greater than or equal", + "name": "cpuGtEq", + "in": "query" + }, + { + "type": "number", + "format": "double", + "description": "Filter for instances having memory greater than or equal", + "name": "memoryGtEq", + "in": "query" + }, + { + "type": "number", + "format": "double", + "description": "Filter for instances having gpu greater than or equal", + "name": "gpuGtEq", + "in": "query" + } + ], + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1GcpInstanceTypes" + } + } + } + } + }, + "/v1/clouds/gcp/regions/{region}/storagetypes": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves a list of Gcp storage types", + "operationId": "V1GcpStorageTypes", + "parameters": [ + { + "type": "string", + "description": "Region for which GCP storage types are requested", + "name": "region", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1GcpStorageTypes" + } + } + } + } + }, + "/v1/clouds/maas/account/validate": { + "post": { + "description": "Returns no contents if account is valid else error.", + "tags": [ + "v1" + ], + "summary": "Check if Maas account is valid", + "operationId": "V1MaasAccountValidate", + "parameters": [ + { + "description": "Request payload for Maas cloud account", + "name": "account", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1MaasCloudAccount" + } + } + ], + "responses": { + "204": { + "description": "Ok response without content", + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + } + }, + "/v1/clouds/maas/azs": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves a list of Maas zones for a particular account uid", + "operationId": "V1MaasZonesGet", + "parameters": [ + { + "type": "string", + "description": "Uid for the specific Maas cloud account", + "name": "cloudAccountUid", + "in": "query" + } + ], + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1MaasZones" + } + } + } + } + }, + "/v1/clouds/maas/domains": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves a list of Maas domains", + "operationId": "V1MaasDomainsGet", + "parameters": [ + { + "type": "string", + "description": "Uid for the specific Maas cloud account", + "name": "cloudAccountUid", + "in": "query" + } + ], + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1MaasDomains" + } + } + } + } + }, + "/v1/clouds/maas/resourcePools": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves a list of Maas pools for a particular account uid", + "operationId": "V1MaasPoolsGet", + "parameters": [ + { + "type": "string", + "description": "Uid for the specific Maas cloud account", + "name": "cloudAccountUid", + "in": "query" + } + ], + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1MaasPools" + } + } + } + } + }, + "/v1/clouds/maas/subnets": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves a list of Maas subnets for a particular account uid", + "operationId": "V1MaasSubnetsGet", + "parameters": [ + { + "type": "string", + "description": "Uid for the specific Maas cloud account", + "name": "cloudAccountUid", + "in": "query" + } + ], + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1MaasSubnets" + } + } + } + } + }, + "/v1/clouds/maas/tags": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves a list of Maas tags for a particular account uid", + "operationId": "V1MaasTagsGet", + "parameters": [ + { + "type": "string", + "description": "Uid for the specific Maas cloud account", + "name": "cloudAccountUid", + "in": "query" + } + ], + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1MaasTags" + } + } + } + } + }, + "/v1/clouds/openstack/account/validate": { + "post": { + "description": "Returns no contents if account is valid else error.", + "tags": [ + "v1" + ], + "summary": "Check if OpenStack account is valid", + "operationId": "V1OpenStackAccountValidate", + "parameters": [ + { + "description": "Request payload for OpenStack cloud account", + "name": "openstackCloudAccount", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1OpenStackCloudAccount" + } + } + ], + "responses": { + "204": { + "description": "Ok response without content", + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + } + }, + "/v1/clouds/openstack/azs": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves a list of OpenStack azs for a particular account uid", + "operationId": "V1OpenStackAzsGet", + "parameters": [ + { + "type": "string", + "description": "Uid for the specific OpenStack cloud account", + "name": "cloudAccountUid", + "in": "query" + }, + { + "type": "string", + "description": "project for which OpenStack azs are requested", + "name": "project", + "in": "query" + }, + { + "type": "string", + "description": "region for which OpenStack azs are requested", + "name": "region", + "in": "query" + }, + { + "type": "string", + "description": "domain for which OpenStack azs are requested", + "name": "domain", + "in": "query" + } + ], + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1OpenStackAzs" + } + } + } + } + }, + "/v1/clouds/openstack/flavors": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the OpenStack flavors", + "operationId": "V1OpenStackFlavorsGet", + "parameters": [ + { + "type": "string", + "description": "Uid for the specific OpenStack cloud account", + "name": "cloudAccountUid", + "in": "query" + }, + { + "type": "string", + "description": "project for which OpenStack flavors are requested", + "name": "project", + "in": "query" + }, + { + "type": "string", + "description": "region for which OpenStack flavors are requested", + "name": "region", + "in": "query" + }, + { + "type": "string", + "description": "domain for which OpenStack flavors are requested", + "name": "domain", + "in": "query" + } + ], + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1OpenStackFlavors" + } + } + } + } + }, + "/v1/clouds/openstack/keypairs": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the OpenStack keypair", + "operationId": "V1OpenStackKeypairsGet", + "parameters": [ + { + "type": "string", + "description": "Uid for the specific OpenStack cloud account", + "name": "cloudAccountUid", + "in": "query" + }, + { + "type": "string", + "description": "project for which OpenStack keypairs are requested", + "name": "project", + "in": "query" + }, + { + "type": "string", + "description": "region for which OpenStack keypairs are requested", + "name": "region", + "in": "query" + }, + { + "type": "string", + "description": "domain for which OpenStack keypairs are requested", + "name": "domain", + "in": "query" + } + ], + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1OpenStackKeypairs" + } + } + } + } + }, + "/v1/clouds/openstack/networks": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the OpenStack networks", + "operationId": "V1OpenStackNetworksGet", + "parameters": [ + { + "type": "string", + "description": "Uid for the specific OpenStack cloud account", + "name": "cloudAccountUid", + "in": "query" + }, + { + "type": "string", + "description": "project for which OpenStack networks are requested", + "name": "project", + "in": "query" + }, + { + "type": "string", + "description": "region for which OpenStack networks are requested", + "name": "region", + "in": "query" + }, + { + "type": "string", + "description": "domain for which OpenStack networks are requested", + "name": "domain", + "in": "query" + } + ], + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1OpenStackNetworks" + } + } + } + } + }, + "/v1/clouds/openstack/projects": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the OpenStack projects", + "operationId": "V1OpenStackProjectsGet", + "parameters": [ + { + "type": "string", + "description": "Uid for the specific OpenStack cloud account", + "name": "cloudAccountUid", + "in": "query" + } + ], + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1OpenStackProjects" + } + } + } + } + }, + "/v1/clouds/openstack/regions": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the OpenStack regions", + "operationId": "V1OpenStackRegionsGet", + "parameters": [ + { + "type": "string", + "description": "Uid for the specific OpenStack cloud account", + "name": "cloudAccountUid", + "in": "query" + } + ], + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1OpenStackRegions" + } + } + } + } + }, + "/v1/clouds/tencent/account/validate": { + "post": { + "tags": [ + "v1" + ], + "summary": "Validate the specified Tencent account credentials", + "operationId": "V1TencentAccountValidate", + "parameters": [ + { + "description": "Request payload to validate tencent cloud account", + "name": "account", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1TencentCloudAccount" + } + } + ], + "responses": { + "204": { + "description": "Ok response without content", + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + } + }, + "/v1/clouds/tencent/regions": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves a list of Tencent regions for the specified account", + "operationId": "V1TencentRegions", + "parameters": [ + { + "type": "string", + "description": "Uid for the specific Tencent cloud account", + "name": "cloudAccountUid", + "in": "query", + "required": true + } + ], + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1TencentRegions" + } + } + } + } + }, + "/v1/clouds/tencent/regions/{region}/instancetypes": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves a list of Tencent instance types", + "operationId": "V1TencentInstanceTypes", + "parameters": [ + { + "type": "string", + "description": "Region for which tencent instances are listed", + "name": "region", + "in": "path", + "required": true + }, + { + "type": "number", + "format": "double", + "description": "Filter for instances having cpu greater than or equal", + "name": "cpuGtEq", + "in": "query" + }, + { + "type": "number", + "format": "double", + "description": "Filter for instances having memory greater than or equal", + "name": "memoryGtEq", + "in": "query" + }, + { + "type": "number", + "format": "double", + "description": "Filter for instances having gpu greater than or equal", + "name": "gpuGtEq", + "in": "query" + }, + { + "type": "string", + "description": "Uid for the specific tencent cloud account", + "name": "cloudAccountUid", + "in": "query", + "required": true + } + ], + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1TencentInstanceTypes" + } + } + } + } + }, + "/v1/clouds/tencent/regions/{region}/keypairs": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves a list of keypairs for the specified account", + "operationId": "V1TencentKeypairs", + "parameters": [ + { + "type": "string", + "description": "Region for which keypairs are requested", + "name": "region", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Uid for the specific Tencent cloud account", + "name": "cloudAccountUid", + "in": "query", + "required": true + } + ], + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1TencentKeypairs" + } + } + } + } + }, + "/v1/clouds/tencent/regions/{region}/securitygroups": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves a list of secutity groups for the specified account", + "operationId": "V1TencentSecurityGroups", + "parameters": [ + { + "type": "string", + "description": "Region for which security groups are requested", + "name": "region", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Uid for the specific Tencent cloud account", + "name": "cloudAccountUid", + "in": "query", + "required": true + } + ], + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1TencentSecurityGroups" + } + } + } + } + }, + "/v1/clouds/tencent/regions/{region}/storagetypes": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves a list of Tencent storage types", + "operationId": "V1TencentStorageTypes", + "parameters": [ + { + "type": "string", + "description": "Region for which tencent storages are listed", + "name": "region", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Uid for the specific tencent cloud account", + "name": "cloudAccountUid", + "in": "query", + "required": true + }, + { + "type": "string", + "description": "Zone for which tencent storages are listed", + "name": "zone", + "in": "query", + "required": true + } + ], + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1TencentStorageTypes" + } + } + } + } + }, + "/v1/clouds/tencent/regions/{region}/vpcs": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves a list of VPCs for the specified account", + "operationId": "V1TencentVpcs", + "parameters": [ + { + "type": "string", + "description": "Region for which VPCs are requested", + "name": "region", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Uid for the specific Tencent cloud account", + "name": "cloudAccountUid", + "in": "query", + "required": true + } + ], + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1TencentVpcs" + } + } + } + } + }, + "/v1/clouds/tencent/regions/{region}/zones": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves a list of Tencent availability zones for the specified region", + "operationId": "V1TencentZones", + "parameters": [ + { + "type": "string", + "description": "Region for which zones are requested", + "name": "region", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Uid for the specific Tencent cloud account", + "name": "cloudAccountUid", + "in": "query", + "required": true + } + ], + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1TencentAvailabilityZones" + } + } + } + } + }, + "/v1/clouds/vsphere/account/validate": { + "post": { + "description": "Returns no contents if account is valid else error.", + "tags": [ + "v1" + ], + "summary": "Check if Vsphere account is valid", + "operationId": "V1VsphereAccountValidate", + "parameters": [ + { + "description": "Request payload for VSphere cloud account", + "name": "vsphereCloudAccount", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1VsphereCloudAccount" + } + } + ], + "responses": { + "204": { + "description": "Ok response without content", + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + } + }, + "/v1/clouds/vsphere/datacenters": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the vsphere data centers", + "operationId": "V1VsphereDatacenters", + "parameters": [ + { + "type": "string", + "description": "Uid for the specific OpenStack cloud account", + "name": "cloudAccountUid", + "in": "query" + } + ], + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1VsphereDatacenters" + } + } + } + } + }, + "/v1/clouds/vsphere/datacenters/{uid}/computeclusters/{computecluster}": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the resources for vsphere compute cluster", + "operationId": "V1VsphereComputeClusterResources", + "parameters": [ + { + "type": "string", + "description": "Uid for the specific VSphere cloud account", + "name": "cloudAccountUid", + "in": "query", + "required": true + }, + { + "type": "string", + "description": "computecluster for which resources is requested", + "name": "computecluster", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "VSphere datacenter uid for which resources is requested", + "name": "uid", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1VsphereComputeClusterResources" + } + } + } + } + }, + "/v1/clouds/vsphere/env": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves vsphere env", + "operationId": "V1VsphereEnv", + "parameters": [ + { + "description": "Request payload for VSphere cloud account", + "name": "vsphereCloudAccount", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1VsphereCloudAccount" + } + } + ], + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1VsphereEnv" + } + } + } + } + }, + "/v1/clouds/{cloudType}/instance/spotprice": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves the cloud instance spot price based on zone and timestamp for a specific cloud", + "operationId": "V1CloudInstanceSpotPriceGet", + "parameters": [ + { + "type": "string", + "description": "Cloud type [aws/azure/gcp/tencent]", + "name": "cloudType", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Instance type for a specific cloud type", + "name": "instanceType", + "in": "query", + "required": true + }, + { + "type": "string", + "description": "Availability zone for a specific cloud type", + "name": "zone", + "in": "query", + "required": true + }, + { + "type": "string", + "format": "date-time", + "description": "Time is a wrapper around time.Time which supports correct marshaling to YAML and JSON. Wrappers are provided for many of the factory methods that the time package offers.", + "name": "timestamp", + "in": "query" + } + ], + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1CloudSpotPrice" + } + } + } + } + }, + "/v1/clouds/{cloud}/compute/{type}/rate": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the cloud compute rate", + "operationId": "V1CloudComputeRate", + "parameters": [ + { + "type": "string", + "description": "cloud for which compute rate is requested", + "name": "cloud", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "instance type for which compute rate is requested", + "name": "type", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "region for which compute rate is requested", + "name": "region", + "in": "query", + "required": true + } + ], + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1CloudCost" + } + } + } + } + }, + "/v1/clouds/{cloud}/storage/{type}/rate": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the cloud storage rate", + "operationId": "V1CloudStorageRate", + "parameters": [ + { + "type": "string", + "description": "cloud for which compute rate is requested", + "name": "cloud", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "storage type for which compute rate is requested", + "name": "type", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "region for which compute rate is requested", + "name": "region", + "in": "query", + "required": true + }, + { + "type": "integer", + "description": "maxDiskType for which compute rate is requested", + "name": "maxDiskType", + "in": "query" + } + ], + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1CloudCost" + } + } + } + } + }, + "/v1/clustergroups": { + "post": { + "tags": [ + "v1" + ], + "summary": "Create cluster groups", + "operationId": "v1ClusterGroupsCreate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1ClusterGroupEntity" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + } + }, + "/v1/clustergroups/developerCredit/usage/{scope}": { + "get": { + "tags": [ + "v1" + ], + "summary": "Get cluster group developer credit usage by scope", + "operationId": "v1ClusterGroupsDeveloperCreditUsageGet", + "responses": { + "200": { + "description": "Cluster group developer credit usage", + "schema": { + "$ref": "#/definitions/v1ClusterGroupsDeveloperCreditUsage" + } + } + } + }, + "parameters": [ + { + "enum": [ + "system", + "tenant" + ], + "type": "string", + "name": "scope", + "in": "path", + "required": true + } + ] + }, + "/v1/clustergroups/hostCluster": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves a list of cluster groups host cluster summary", + "operationId": "v1ClusterGroupsHostClusterSummary", + "responses": { + "200": { + "description": "An array of cluster groups of host cluster type summary", + "schema": { + "$ref": "#/definitions/v1ClusterGroupsHostClusterSummary" + } + } + } + } + }, + "/v1/clustergroups/hostCluster/metadata": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves a list of cluster groups host cluster metadata", + "operationId": "v1ClusterGroupsHostClusterMetadata", + "responses": { + "200": { + "description": "An array of cluster groups host cluster metadata items", + "schema": { + "$ref": "#/definitions/v1ClusterGroupsHostClusterMetadata" + } + } + } + } + }, + "/v1/clustergroups/validate/name": { + "get": { + "tags": [ + "v1" + ], + "summary": "Validates the cluster groups name", + "operationId": "v1ClusterGroupsValidateName", + "parameters": [ + { + "type": "string", + "name": "name", + "in": "query", + "required": true + } + ], + "responses": { + "204": { + "description": "Ok response without content", + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + } + }, + "/v1/clustergroups/{uid}": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the specified cluster groups", + "operationId": "v1ClusterGroupsUidGet", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1ClusterGroup" + } + } + } + }, + "delete": { + "tags": [ + "v1" + ], + "summary": "Deletes the specified cluster group", + "operationId": "v1ClusterGroupsUidDelete", + "responses": { + "204": { + "description": "The resource was deleted successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/clustergroups/{uid}/hostCluster": { + "put": { + "tags": [ + "v1" + ], + "summary": "Updates cluster reference and host cluster config", + "operationId": "v1ClusterGroupsUidHostClusterUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1ClusterGroupHostClusterEntity" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/clustergroups/{uid}/meta": { + "put": { + "tags": [ + "v1" + ], + "summary": "Updates the specified cluster groups meta", + "operationId": "v1ClusterGroupsUidMetaUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1ObjectMeta" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/clustergroups/{uid}/packs/resolvedValues": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the specified clustergroup's profile packs resolved values", + "operationId": "v1ClusterGroupsUidPacksResolvedValuesGet", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1SpectroClusterProfilesResolvedValues" + } + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster group uid", + "name": "uid", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1SpectroClusterProfilesParamReferenceEntity" + } + } + ] + }, + "/v1/clustergroups/{uid}/profiles": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the associated profiles of a specified cluster group", + "operationId": "v1ClusterGroupsUidProfilesGet", + "parameters": [ + { + "type": "string", + "description": "includes pack meta such as schema, presets", + "name": "includePackMeta", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1SpectroClusterProfileList" + } + } + } + }, + "put": { + "tags": [ + "v1" + ], + "summary": "Updates the specified cluster groups profiles", + "operationId": "v1ClusterGroupsUidProfilesUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1SpectroClusterProfiles" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "ClusterGroup uid", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/clusterprofiles": { + "post": { + "tags": [ + "v1" + ], + "summary": "Creates a cluster profile", + "operationId": "v1ClusterProfilesCreate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1ClusterProfileEntity" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + } + }, + "/v1/clusterprofiles/bulk": { + "delete": { + "tags": [ + "v1" + ], + "summary": "Deletes list of cluster profiles", + "operationId": "v1ClusterProfilesBulkDelete", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1BulkDeleteRequest" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1BulkDeleteResponse" + } + } + } + } + }, + "/v1/clusterprofiles/import": { + "post": { + "tags": [ + "v1" + ], + "summary": "Imports a cluster profile", + "operationId": "v1ClusterProfilesImport", + "parameters": [ + { + "type": "boolean", + "description": "If true then cluster profile will be published post successful import", + "name": "publish", + "in": "query" + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1ClusterProfileImportEntity" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + } + }, + "/v1/clusterprofiles/import/file": { + "post": { + "consumes": [ + "multipart/form-data" + ], + "tags": [ + "v1" + ], + "summary": "Imports a cluster profile via file", + "operationId": "v1ClusterProfilesImportFile", + "parameters": [ + { + "type": "boolean", + "description": "If true then cluster profile will be published post successful import", + "name": "publish", + "in": "query" + }, + { + "type": "file", + "description": "Cluster profile import file", + "name": "importFile", + "in": "formData" + }, + { + "enum": [ + "yaml", + "json" + ], + "type": "string", + "default": "json", + "description": "Cluster profile import file format [\"yaml\", \"json\"]", + "name": "format", + "in": "query" + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + } + }, + "/v1/clusterprofiles/import/validate": { + "post": { + "tags": [ + "v1" + ], + "summary": "Validates cluster profile import", + "operationId": "v1ClusterProfilesImportValidate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1ClusterProfileImportEntity" + } + } + ], + "responses": { + "200": { + "description": "Cluster profile import validated response", + "schema": { + "$ref": "#/definitions/v1ClusterProfileImportEntity" + } + } + } + } + }, + "/v1/clusterprofiles/macros": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves a list of macros", + "operationId": "v1MacrosList", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1Macros" + } + } + } + } + }, + "/v1/clusterprofiles/validate/name": { + "get": { + "description": "Validates the cluster profile name and version", + "tags": [ + "v1" + ], + "summary": "Validates the cluster profile metadata", + "operationId": "v1ClusterProfilesValidateNameVersion", + "parameters": [ + { + "type": "string", + "description": "Cluster profile name", + "name": "name", + "in": "query" + }, + { + "type": "string", + "description": "Cluster profile version", + "name": "version", + "in": "query" + } + ], + "responses": { + "204": { + "description": "Ok response without content", + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + } + }, + "/v1/clusterprofiles/validate/packs": { + "post": { + "tags": [ + "v1" + ], + "summary": "Validates cluster profile packs", + "operationId": "v1ClusterProfilesValidatePacks", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1ClusterProfileTemplateDraft" + } + } + ], + "responses": { + "200": { + "description": "Cluster profile packs validation response", + "schema": { + "$ref": "#/definitions/v1ClusterProfileValidatorResponse" + } + } + } + } + }, + "/v1/clusterprofiles/{uid}": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns a specified cluster profile", + "operationId": "v1ClusterProfilesGet", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1ClusterProfile" + } + } + } + }, + "put": { + "tags": [ + "v1" + ], + "summary": "Updates the specified cluster profile", + "operationId": "v1ClusterProfilesUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1ClusterProfileUpdateEntity" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "delete": { + "tags": [ + "v1" + ], + "summary": "Deletes the specified cluster profile", + "operationId": "v1ClusterProfilesDelete", + "responses": { + "204": { + "description": "The resource was deleted successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster profile uid", + "name": "uid", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Comma seperated pack meta such as schema, presets", + "name": "includePackMeta", + "in": "query" + } + ] + }, + "/v1/clusterprofiles/{uid}/clone": { + "post": { + "tags": [ + "v1" + ], + "summary": "Creates a clone of the specified cluster profile", + "operationId": "v1ClusterProfilesUidClone", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1ClusterProfileCloneEntity" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster profile uid", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/clusterprofiles/{uid}/clone/validate": { + "post": { + "description": "Validates the cloned cluster profile name, version and target project uid", + "tags": [ + "v1" + ], + "summary": "Validates the cluster profile clone", + "operationId": "v1ClusterProfilesUidCloneValidate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1ClusterProfileCloneMetaInputEntity" + } + } + ], + "responses": { + "204": { + "description": "Ok response without content", + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster profile uid", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/clusterprofiles/{uid}/export": { + "get": { + "produces": [ + "application/octet-stream" + ], + "tags": [ + "v1" + ], + "summary": "Export the specified cluster profile", + "operationId": "V1ClusterProfilesUidExport", + "responses": { + "200": { + "description": "Exports cluster profile as a file", + "schema": { + "type": "string", + "format": "binary" + }, + "headers": { + "Content-Disposition": { + "type": "string" + } + } + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster profile uid", + "name": "uid", + "in": "path", + "required": true + }, + { + "enum": [ + "yaml", + "json" + ], + "type": "string", + "default": "json", + "description": "Cluster profile export file format [ \"yaml\", \"json\" ]", + "name": "format", + "in": "query" + } + ] + }, + "/v1/clusterprofiles/{uid}/export/terraform": { + "get": { + "produces": [ + "application/octet-stream" + ], + "tags": [ + "v1" + ], + "summary": "Downloads the specified cluster profile", + "operationId": "V1ClusterProfilesUidExportTerraform", + "responses": { + "200": { + "description": "Downloads cluster profile export file", + "schema": { + "type": "string", + "format": "binary" + }, + "headers": { + "Content-Disposition": { + "type": "string" + } + } + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster profile uid", + "name": "uid", + "in": "path", + "required": true + }, + { + "enum": [ + "yaml", + "json" + ], + "type": "string", + "default": "yaml", + "description": "Cluster profile export file format [ \"yaml\", \"json\" ]", + "name": "format", + "in": "query" + } + ] + }, + "/v1/clusterprofiles/{uid}/metadata": { + "patch": { + "tags": [ + "v1" + ], + "summary": "Updates the specified cluster profile metadata", + "operationId": "v1ClusterProfilesUidMetadataUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1ProfileMetaEntity" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster profile uid", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/clusterprofiles/{uid}/packRefs": { + "patch": { + "tags": [ + "v1" + ], + "summary": "Updates cluster profile packs ref", + "operationId": "v1ClusterProfilesPacksRefUpdate", + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster profile uid", + "name": "uid", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Cluster profile notification uid", + "name": "notify", + "in": "query" + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1ClusterProfileNotificationUpdateEntity" + } + } + ] + }, + "/v1/clusterprofiles/{uid}/packs": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the specified cluster profile packs", + "operationId": "v1ClusterProfilesUidPacksGet", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1ClusterProfilePacksEntities" + } + } + } + }, + "post": { + "tags": [ + "v1" + ], + "summary": "Adds a new pack to the specified cluster profile and returns the created pack uid", + "operationId": "v1ClusterProfilesUidPacksAdd", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1PackInputEntity" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster profile uid", + "name": "uid", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Comma seperated pack meta such as schema, presets", + "name": "includePackMeta", + "in": "query" + } + ] + }, + "/v1/clusterprofiles/{uid}/packs/manifests": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the specified cluster profile pack manifests", + "operationId": "v1ClusterProfilesUidPacksManifestsGet", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1ClusterProfilePacksManifests" + } + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster profile uid", + "name": "uid", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Comma seperated pack meta such as schema, presets", + "name": "includePackMeta", + "in": "query" + } + ] + }, + "/v1/clusterprofiles/{uid}/packs/resolvedValues": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the specified cluster profile packs resolved values", + "operationId": "v1ClusterProfilesUidPacksResolvedValuesGet", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1PackResolvedValues" + } + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster profile uid", + "name": "uid", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1PackParamsEntity" + } + } + ] + }, + "/v1/clusterprofiles/{uid}/packs/{packName}": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the specified cluster profile pack", + "operationId": "V1ClusterProfilesUidPacksNameGet", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1PackRefSummaryResponse" + } + } + } + }, + "put": { + "tags": [ + "v1" + ], + "summary": "Updates the specified pack information in the cluster profile", + "operationId": "v1ClusterProfilesUidPacksNameUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1PackUpdateEntity" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "delete": { + "tags": [ + "v1" + ], + "summary": "Deletes the specified pack information in the cluster profile", + "operationId": "v1ClusterProfilesUidPacksNameDelete", + "responses": { + "204": { + "description": "The resource was deleted successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster profile uid", + "name": "uid", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Cluster profile pack name", + "name": "packName", + "in": "path", + "required": true + } + ] + }, + "/v1/clusterprofiles/{uid}/packs/{packName}/config": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the specified cluster profile pack configuration", + "operationId": "v1ClusterProfilesUidPacksConfigGet", + "parameters": [ + { + "type": "string", + "description": "cluster profile uid", + "name": "uid", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Cluster profile pack name", + "name": "packName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Cluster profile pack uid", + "name": "packUid", + "in": "query", + "required": true + } + ], + "responses": { + "200": { + "description": "An array of cluster profile pack configurations", + "schema": { + "$ref": "#/definitions/v1ClusterProfilePackConfigList" + } + } + } + } + }, + "/v1/clusterprofiles/{uid}/packs/{packName}/manifests": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the associated manifests for the specified profile's pack", + "operationId": "v1ClusterProfilesUidPacksUidManifests", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1ManifestEntities" + } + } + } + }, + "post": { + "tags": [ + "v1" + ], + "summary": "Adds manifest to the profiles packs and returns the added manifests uid", + "operationId": "v1ClusterProfilesUidPacksNameManifestsAdd", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1ManifestInputEntity" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster profile uid", + "name": "uid", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Cluster profile pack name", + "name": "packName", + "in": "path", + "required": true + } + ] + }, + "/v1/clusterprofiles/{uid}/packs/{packName}/manifests/{manifestUid}": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the specified cluster profile pack manifest", + "operationId": "v1ClusterProfilesUidPacksNameManifestsUidGet", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1ManifestEntity" + } + } + } + }, + "put": { + "tags": [ + "v1" + ], + "summary": "Updates the specified manifest of the profile's pack", + "operationId": "v1ClusterProfilesUidPacksNameManifestsUidUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1ManifestInputEntity" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "delete": { + "tags": [ + "v1" + ], + "summary": "Deletes the specified cluster profile pack manifest", + "operationId": "v1ClusterProfilesUidPacksNameManifestsUidDelete", + "responses": { + "204": { + "description": "The resource was deleted successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster profile uid", + "name": "uid", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Cluster profile pack name", + "name": "packName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Cluster profile pack manifest uid", + "name": "manifestUid", + "in": "path", + "required": true + } + ] + }, + "/v1/clusterprofiles/{uid}/publish": { + "patch": { + "description": "Publish the draft cluster profile with next revision, the current draft cluster profile will be marked to published\nand the draft cluster profile will be set to null in the cluster profile template.\n", + "tags": [ + "v1" + ], + "summary": "Publishes the specified cluster profile", + "operationId": "v1ClusterProfilesPublish", + "responses": { + "204": { + "description": "Cluster profile published successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster profile uid", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/clusterprofiles/{uid}/spc/download": { + "get": { + "produces": [ + "application/octet-stream" + ], + "tags": [ + "v1" + ], + "summary": "Downloads the specified cluster profile", + "operationId": "v1ClusterProfilesUidSpcDownload", + "responses": { + "200": { + "description": "Download cluster profile archive file", + "schema": { + "type": "string", + "format": "binary" + }, + "headers": { + "Content-Disposition": { + "type": "string" + } + } + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster profile uid", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/clusterprofiles/{uid}/validate/packs": { + "post": { + "tags": [ + "v1" + ], + "summary": "Validates specified cluster profile packs", + "operationId": "v1ClusterProfilesUidValidatePacks", + "parameters": [ + { + "type": "string", + "description": "Cluster profile uid", + "name": "uid", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1ClusterProfileTemplateDraft" + } + } + ], + "responses": { + "200": { + "description": "Cluster profile packs validation response", + "schema": { + "$ref": "#/definitions/v1ClusterProfileValidatorResponse" + } + } + } + } + }, + "/v1/clusterprofiles/{uid}/variables": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieve a list of variables defined for the cluster profile", + "operationId": "V1ClusterProfilesUidVariablesGet", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1Variables" + } + } + } + }, + "put": { + "tags": [ + "v1" + ], + "summary": "Update the variables defined for a cluster profile", + "operationId": "V1ClusterProfilesUidVariablesPut", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1Variables" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "delete": { + "tags": [ + "v1" + ], + "summary": "Deletes the specified cluster profile variables", + "operationId": "V1ClusterProfilesUidVariablesDelete", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1VariableNames" + } + } + ], + "responses": { + "204": { + "description": "The resource was deleted successfully" + } + } + }, + "patch": { + "tags": [ + "v1" + ], + "summary": "Update specific variables defined for a cluster profile", + "operationId": "V1ClusterProfilesUidVariablesPatch", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1Variables" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster profile uid", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/dashboard/appDeployments": { + "post": { + "tags": [ + "v1" + ], + "summary": "Retrieves a list of application deployments filter summary Supported filter fields - [\"appDeploymentName\", \"clusterUid\", \"tags\"] Supported sort fields - [\"appDeploymentName\", \"creationTimestamp\", \"lastModifiedTimestamp\"]", + "operationId": "v1DashboardAppDeployments", + "parameters": [ + { + "maximum": 50, + "type": "integer", + "format": "int64", + "description": "limit is a maximum number of responses to return for a list call. Maximum value of the limit is 50.\nIf more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results.", + "name": "limit", + "in": "query" + }, + { + "type": "integer", + "format": "int64", + "description": "offset is the next index number from which the response will start. The response offset value can be used along with continue token for the pagination.", + "name": "offset", + "in": "query" + }, + { + "type": "string", + "description": "continue token to paginate the subsequent data items", + "name": "continue", + "in": "query" + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1AppDeploymentsFilterSpec" + } + } + ], + "responses": { + "200": { + "description": "An array of application deployment summary items", + "schema": { + "$ref": "#/definitions/v1AppDeploymentsSummary" + } + } + } + } + }, + "/v1/dashboard/appProfiles": { + "post": { + "tags": [ + "v1" + ], + "summary": "Retrieves a list of application profiles filter summary Supported filter fields - [\"profileName\", \"tags\"] Supported sort fields - [\"profileName\", \"creationTimestamp\", \"lastModifiedTimestamp\"]", + "operationId": "v1DashboardAppProfiles", + "parameters": [ + { + "maximum": 50, + "type": "integer", + "format": "int64", + "description": "limit is a maximum number of responses to return for a list call. Maximum value of the limit is 50.\nIf more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results.", + "name": "limit", + "in": "query" + }, + { + "type": "integer", + "format": "int64", + "description": "offset is the next index number from which the response will start. The response offset value can be used along with continue token for the pagination.", + "name": "offset", + "in": "query" + }, + { + "type": "string", + "description": "continue token to paginate the subsequent data items", + "name": "continue", + "in": "query" + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1AppProfilesFilterSpec" + } + } + ], + "responses": { + "200": { + "description": "An array of application profiles summary items", + "schema": { + "$ref": "#/definitions/v1AppProfilesSummary" + } + } + } + } + }, + "/v1/dashboard/appProfiles/metadata": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves a list of application profile metadata", + "operationId": "v1DashboardAppProfilesMetadata", + "responses": { + "200": { + "description": "An array of application profile summary items", + "schema": { + "$ref": "#/definitions/v1AppProfilesMetadata" + } + } + } + } + }, + "/v1/dashboard/appliances/metadata": { + "post": { + "tags": [ + "v1" + ], + "summary": "Retrieves a list of edgehosts summary", + "operationId": "v1EdgeHostsMetadata", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1EdgeHostsMetadataFilter" + } + } + ], + "responses": { + "200": { + "description": "An array of edgehost summary items", + "schema": { + "$ref": "#/definitions/v1EdgeHostsMetadataSummary" + } + } + } + } + }, + "/v1/dashboard/cloudaccounts/metadata": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves a list of cloud accounts metadata", + "operationId": "v1DashboardCloudAccountsMetadata", + "parameters": [ + { + "type": "string", + "name": "environment", + "in": "query" + } + ], + "responses": { + "200": { + "description": "An array of cloud accounts summary items", + "schema": { + "$ref": "#/definitions/v1CloudAccountsMetadata" + } + } + } + } + }, + "/v1/dashboard/clustergroups/{uid}/hostClusters": { + "post": { + "tags": [ + "v1" + ], + "summary": "Retrieves a list of cluster summary for a given cluster group", + "operationId": "v1ClusterGroupUidHostClustersSummary", + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "default": 50, + "description": "limit is a maximum number of responses to return for a list call. Default and maximum value of the limit is 50.\nIf more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results.", + "name": "limit", + "in": "query" + }, + { + "type": "integer", + "format": "int64", + "description": "offset is the next index number from which the response will start. The response offset value can be used along with continue token for the pagination.", + "name": "offset", + "in": "query" + }, + { + "type": "string", + "description": "continue token to paginate the subsequent data items", + "name": "continue", + "in": "query" + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1SearchFilterSummarySpec" + } + } + ], + "responses": { + "200": { + "description": "An array of cluster summary items", + "schema": { + "$ref": "#/definitions/v1SpectroClustersSummary" + } + } + } + } + }, + "/v1/dashboard/clustergroups/{uid}/virtualClusters": { + "post": { + "tags": [ + "v1" + ], + "summary": "Retrieves a list of cluster summary for a given cluster group", + "operationId": "v1ClusterGroupUidVirtualClustersSummary", + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "default": 50, + "description": "limit is a maximum number of responses to return for a list call. Default and maximum value of the limit is 50.\nIf more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results.", + "name": "limit", + "in": "query" + }, + { + "type": "integer", + "format": "int64", + "description": "offset is the next index number from which the response will start. The response offset value can be used along with continue token for the pagination.", + "name": "offset", + "in": "query" + }, + { + "type": "string", + "description": "continue token to paginate the subsequent data items", + "name": "continue", + "in": "query" + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1SearchFilterSummarySpec" + } + } + ], + "responses": { + "200": { + "description": "An array of cluster summary items", + "schema": { + "$ref": "#/definitions/v1SpectroClustersSummary" + } + } + } + } + }, + "/v1/dashboard/clusterprofiles": { + "post": { + "tags": [ + "v1" + ], + "summary": "Retrieves a list of cluster profiles filter summary Supported filter fields - [\"profileName\", \"tags\", \"profileType\", \"environment\"] Supported sort fields - [\"profileName\", \"environment\", \"profileType\", \"creationTimestamp\", \"lastModifiedTimestamp\"]", + "operationId": "v1ClusterProfilesFilterSummary", + "parameters": [ + { + "maximum": 50, + "type": "integer", + "format": "int64", + "description": "limit is a maximum number of responses to return for a list call. Maximum value of the limit is 50.\nIf more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results.", + "name": "limit", + "in": "query" + }, + { + "type": "integer", + "format": "int64", + "description": "offset is the next index number from which the response will start. The response offset value can be used along with continue token for the pagination.", + "name": "offset", + "in": "query" + }, + { + "type": "string", + "description": "continue token to paginate the subsequent data items", + "name": "continue", + "in": "query" + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1ClusterProfilesFilterSpec" + } + } + ], + "responses": { + "200": { + "description": "An array of cluster profiles summary items", + "schema": { + "$ref": "#/definitions/v1ClusterProfilesSummary" + } + } + } + } + }, + "/v1/dashboard/clusterprofiles/metadata": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves a list of cluster profiles metadata", + "operationId": "v1ClusterProfilesMetadata", + "responses": { + "200": { + "description": "An array of cluster summary items", + "schema": { + "$ref": "#/definitions/v1ClusterProfilesMetadata" + } + } + } + } + }, + "/v1/dashboard/clusterprofiles/{uid}": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves a specified cluster profile summary", + "operationId": "v1ClusterProfilesUidSummary", + "responses": { + "200": { + "description": "Cluster profile summary response", + "schema": { + "$ref": "#/definitions/v1ClusterProfileSummary" + } + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/dashboard/edgehosts/search": { + "post": { + "tags": [ + "v1" + ], + "summary": "Retrieves a list of Edgehosts summary with provided search filter. Supported fields as per schema /v1/dashboard/edgehosts/search/schema", + "operationId": "v1DashboardEdgehostsSearch", + "parameters": [ + { + "maximum": 50, + "type": "integer", + "format": "int64", + "description": "limit is a maximum number of responses to return for a list call. Maximum value of the limit is 50.\nIf more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results.", + "name": "limit", + "in": "query" + }, + { + "type": "integer", + "format": "int64", + "description": "offset is the next index number from which the response will start. The response offset value can be used along with continue token for the pagination.", + "name": "offset", + "in": "query" + }, + { + "type": "string", + "description": "continue token to paginate the subsequent data items", + "name": "continue", + "in": "query" + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1SearchFilterSummarySpec" + } + } + ], + "responses": { + "200": { + "description": "An array of edgehost summary items", + "schema": { + "$ref": "#/definitions/v1EdgeHostsSearchSummary" + } + } + } + } + }, + "/v1/dashboard/edgehosts/search/schema": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves a schema for the Edgehost search filter", + "operationId": "v1DashboardEdgehostsSearchSchemaGet", + "responses": { + "200": { + "description": "An array of schema items", + "schema": { + "$ref": "#/definitions/v1SearchFilterSchemaSpec" + } + } + } + } + }, + "/v1/dashboard/pcgs/search": { + "post": { + "tags": [ + "v1" + ], + "summary": "Retrieves a list of PCG summary with provided search filter. Supported fields as per schema /v1/dashboard/pcgs/search/schema", + "operationId": "v1DashboardPcgsSearchSummary", + "parameters": [ + { + "maximum": 50, + "type": "integer", + "format": "int64", + "description": "limit is a maximum number of responses to return for a list call. Maximum value of the limit is 50.\nIf more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results.", + "name": "limit", + "in": "query" + }, + { + "type": "integer", + "format": "int64", + "description": "offset is the next index number from which the response will start. The response offset value can be used along with continue token for the pagination.", + "name": "offset", + "in": "query" + }, + { + "type": "string", + "description": "continue token to paginate the subsequent data items", + "name": "continue", + "in": "query" + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1SearchFilterSummarySpec" + } + } + ], + "responses": { + "200": { + "description": "An array of cluster summary items", + "schema": { + "$ref": "#/definitions/v1PcgsSummary" + } + } + } + } + }, + "/v1/dashboard/pcgs/search/schema": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves a schema for the PCG search filter", + "operationId": "v1DashboardPcgSearchSchemaGet", + "responses": { + "200": { + "description": "An array of schema items", + "schema": { + "$ref": "#/definitions/v1SearchFilterSchemaSpec" + } + } + } + } + }, + "/v1/dashboard/projects": { + "post": { + "tags": [ + "v1" + ], + "operationId": "v1ProjectsFilterSummary", + "parameters": [ + { + "type": "integer", + "format": "int64", + "default": 50, + "description": "limit is a maximum number of responses to return for a list call. Default and maximum value of the limit is 50.\nIf more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results.", + "name": "limit", + "in": "query" + }, + { + "type": "integer", + "format": "int64", + "description": "offset is the next index number from which the response will start. The response offset value can be used along with continue token for the pagination.", + "name": "offset", + "in": "query" + }, + { + "type": "string", + "description": "continue token to paginate the subsequent data items", + "name": "continue", + "in": "query" + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1ProjectsFilterSpec" + } + } + ], + "responses": { + "200": { + "description": "An array of project filter summary items", + "schema": { + "$ref": "#/definitions/v1ProjectsSummary" + } + } + } + } + }, + "/v1/dashboard/projects/metadata": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves a list of projects metadata", + "operationId": "v1ProjectsMetadata", + "parameters": [ + { + "type": "string", + "description": "Name of the project", + "name": "name", + "in": "query" + } + ], + "responses": { + "200": { + "description": "An array of project metadata items", + "schema": { + "$ref": "#/definitions/v1ProjectsMetadata" + } + } + } + } + }, + "/v1/dashboard/spectroclusters/cost": { + "post": { + "tags": [ + "v1" + ], + "summary": "Retrieves spectro clusters cloud cost summary information", + "operationId": "v1DashboardSpectroClustersCostSummary", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1SpectroClusterCloudCostSummarySpec" + } + } + ], + "responses": { + "200": { + "description": "An array of resources cloud cost summary items", + "schema": { + "$ref": "#/definitions/v1ResourcesCloudCostSummary" + } + } + } + } + }, + "/v1/dashboard/spectroclusters/filters/workspace": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves a list of running, non rbac configured clusters in a workspace", + "operationId": "v1SpectroClustersFiltersWorkspace", + "parameters": [ + { + "type": "integer", + "format": "int64", + "default": 50, + "description": "limit is a maximum number of responses to return for a list call. Default and maximum value of the limit is 50.\nIf more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results.", + "name": "limit", + "in": "query" + }, + { + "type": "integer", + "format": "int64", + "description": "offset is the next index number from which the response will start. The response offset value can be used along with continue token for the pagination.", + "name": "offset", + "in": "query" + }, + { + "type": "string", + "description": "continue token to paginate the subsequent data items", + "name": "continue", + "in": "query" + } + ], + "responses": { + "200": { + "description": "An array of cluster summary items", + "schema": { + "$ref": "#/definitions/v1SpectroClustersSummary" + } + } + } + } + }, + "/v1/dashboard/spectroclusters/metadata": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves a list of cluster summary metadata", + "operationId": "v1SpectroClustersMetadataGet", + "parameters": [ + { + "enum": [ + "hostclusters", + "strictHostclusters" + ], + "type": "string", + "name": "quickFilter", + "in": "query" + } + ], + "responses": { + "200": { + "description": "An array of cluster summary items", + "schema": { + "$ref": "#/definitions/v1SpectroClustersMetadata" + } + } + } + }, + "post": { + "tags": [ + "v1" + ], + "summary": "Retrieves a list of cluster summary", + "operationId": "v1SpectroClustersMetadata", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1SpectroClusterMetadataSpec" + } + } + ], + "responses": { + "200": { + "description": "An array of cluster summary items", + "schema": { + "$ref": "#/definitions/v1SpectroClustersMetadata" + } + } + } + } + }, + "/v1/dashboard/spectroclusters/metadata/search": { + "post": { + "tags": [ + "v1" + ], + "summary": "Retrieves a list of cluster metadata with provided search filter spec Supported sort fields - [\"environment\", \"clusterName\", \"clusterState\", \"creationTimestamp\", \"lastModifiedTimestamp\"]", + "operationId": "v1SpectroClustersMetadataSearch", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1SearchFilterSummarySpec" + } + } + ], + "responses": { + "200": { + "description": "An array of cluster summary meta items", + "schema": { + "$ref": "#/definitions/v1SpectroClustersMetadataSearch" + } + } + } + } + }, + "/v1/dashboard/spectroclusters/metadata/search/schema": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves a schema for the cluster metadata search filter", + "operationId": "v1SpectroClustersMetadataSearchSchema", + "responses": { + "200": { + "description": "An array of cluster meta schema items", + "schema": { + "$ref": "#/definitions/v1SearchFilterSchemaSpec" + } + } + } + } + }, + "/v1/dashboard/spectroclusters/repaveStatus": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves a list of clusters with the desired repave state", + "operationId": "v1DashboardSpectroClustersRepaveList", + "parameters": [ + { + "maximum": 50, + "type": "integer", + "format": "int64", + "description": "limit is a maximum number of responses to return for a list call. Maximum value of the limit is 50.\nIf more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results.", + "name": "limit", + "in": "query" + }, + { + "type": "integer", + "format": "int64", + "description": "offset is the next index number from which the response will start. The response offset value can be used along with continue token for the pagination.", + "name": "offset", + "in": "query" + }, + { + "type": "string", + "description": "continue token to paginate the subsequent data items", + "name": "continue", + "in": "query" + }, + { + "enum": [ + "Pending", + "Approved", + "Reverted" + ], + "type": "string", + "default": "Pending", + "name": "repaveState", + "in": "query" + } + ], + "responses": { + "200": { + "description": "An array of cluster summary items", + "schema": { + "$ref": "#/definitions/v1SpectroClustersSummary" + } + } + } + } + }, + "/v1/dashboard/spectroclusters/resources/consumption": { + "post": { + "tags": [ + "v1" + ], + "summary": "Retrieves spectro clusters resource consumption", + "operationId": "v1SpectroClustersResourcesConsumption", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1ResourceConsumptionSpec" + } + } + ], + "responses": { + "200": { + "description": "An array of resource consumption data items", + "schema": { + "$ref": "#/definitions/v1ResourcesConsumption" + } + } + } + } + }, + "/v1/dashboard/spectroclusters/resources/cost": { + "post": { + "tags": [ + "v1" + ], + "summary": "Retrieves spectro clusters resources cost summary information", + "operationId": "v1SpectroClustersResourcesCostSummary", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1ResourceCostSummarySpec" + } + } + ], + "responses": { + "200": { + "description": "An array of resources cost summary items", + "schema": { + "$ref": "#/definitions/v1ResourcesCostSummary" + } + } + } + } + }, + "/v1/dashboard/spectroclusters/resources/usage": { + "post": { + "tags": [ + "v1" + ], + "summary": "Retrieves spectro clusters resources usage summary information", + "operationId": "v1SpectroClustersResourcesUsageSummary", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1ResourceUsageSummarySpec" + } + } + ], + "responses": { + "200": { + "description": "An array of resources usage summary items", + "schema": { + "$ref": "#/definitions/v1ResourcesUsageSummary" + } + } + } + } + }, + "/v1/dashboard/spectroclusters/search": { + "post": { + "tags": [ + "v1" + ], + "summary": "Retrieves a list of cluster summary with provided search filter spec Supported sort fields - [\"environment\", \"clusterName\", \"memoryUsage\", \"healthState\", \"creationTimestamp\", \"lastModifiedTimestamp\"]", + "operationId": "v1SpectroClustersSearchFilterSummary", + "parameters": [ + { + "maximum": 50, + "type": "integer", + "format": "int64", + "description": "limit is a maximum number of responses to return for a list call. Maximum value of the limit is 50.\nIf more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results.", + "name": "limit", + "in": "query" + }, + { + "type": "integer", + "format": "int64", + "description": "offset is the next index number from which the response will start. The response offset value can be used along with continue token for the pagination.", + "name": "offset", + "in": "query" + }, + { + "type": "string", + "description": "continue token to paginate the subsequent data items", + "name": "continue", + "in": "query" + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1SearchFilterSummarySpec" + } + } + ], + "responses": { + "200": { + "description": "An array of cluster summary items", + "schema": { + "$ref": "#/definitions/v1SpectroClustersSummary" + } + } + } + } + }, + "/v1/dashboard/spectroclusters/search/export": { + "get": { + "produces": [ + "application/octet-stream" + ], + "tags": [ + "v1" + ], + "summary": "Export and download the list of cluster summary with matching search filter and download as a file(csv)", + "operationId": "v1DashboardClustersSearchSummaryExportGet", + "parameters": [ + { + "type": "string", + "name": "encodedFilter", + "in": "query" + }, + { + "enum": [ + "csv" + ], + "type": "string", + "default": "csv", + "name": "format", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "file" + }, + "headers": { + "Content-Disposition": { + "type": "string" + }, + "Content-Type": { + "type": "string" + } + } + } + } + }, + "post": { + "produces": [ + "application/octet-stream" + ], + "tags": [ + "v1" + ], + "summary": "Export the list of cluster summary with matching search filter and download as a file(csv) Supported sort fields - [\"environment\", \"clusterName\", \"healthState\", \"creationTimestamp\", \"lastModifiedTimestamp\"]", + "operationId": "v1DashboardClustersSearchSummaryExport", + "parameters": [ + { + "enum": [ + "csv" + ], + "type": "string", + "default": "csv", + "name": "format", + "in": "query" + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1SearchFilterSummarySpec" + } + } + ], + "responses": { + "200": { + "description": "download file", + "schema": { + "type": "string", + "format": "binary" + }, + "headers": { + "Content-Disposition": { + "type": "string" + } + } + } + } + } + }, + "/v1/dashboard/spectroclusters/search/input": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves a supported input values for the cluster search filter", + "operationId": "v1DashboardSpectroClustersSearchInput", + "responses": { + "200": { + "description": "An array of cluster search filter input items", + "schema": { + "$ref": "#/definitions/v1ClusterSearchInputSpec" + } + } + } + } + }, + "/v1/dashboard/spectroclusters/search/schema": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves a schema for the cluster search filter", + "operationId": "v1SpectroClustersSearchSchema", + "responses": { + "200": { + "description": "An array of cluster filter schema items", + "schema": { + "$ref": "#/definitions/v1SearchFilterSchemaSpec" + } + } + } + } + }, + "/v1/dashboard/spectroclusters/vms": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves a list of Virtual machine enabled clusters", + "operationId": "V1DashboardVMEnabledClustersList", + "responses": { + "200": { + "description": "An array of schema items", + "schema": { + "$ref": "#/definitions/v1VMClusters" + } + } + } + } + }, + "/v1/dashboard/spectroclusters/{uid}": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the specified cluster summary", + "operationId": "v1SpectroClustersSummaryUid", + "responses": { + "200": { + "description": "An spectro cluster summary", + "schema": { + "$ref": "#/definitions/v1SpectroClusterUidSummary" + } + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/dashboard/spectroclusters/{uid}/cost": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves the specified cluster cost summary", + "operationId": "v1SpectroClustersUidCostSummary", + "parameters": [ + { + "type": "string", + "format": "date-time", + "description": "Time is a wrapper around time.Time which supports correct marshaling to YAML and JSON. Wrappers are provided for many of the factory methods that the time package offers.", + "name": "startTime", + "in": "query" + }, + { + "type": "string", + "format": "date-time", + "description": "Time is a wrapper around time.Time which supports correct marshaling to YAML and JSON. Wrappers are provided for many of the factory methods that the time package offers.", + "name": "endTime", + "in": "query" + }, + { + "minimum": 60, + "type": "integer", + "format": "int32", + "description": "period in minutes, group the data point by the specified period", + "name": "period", + "in": "query" + } + ], + "responses": { + "200": { + "description": "An spectro cluster cost summary", + "schema": { + "$ref": "#/definitions/v1SpectroClusterCostSummary" + } + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/dashboard/spectroclusters/{uid}/overview": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the specified cluster summary overview", + "operationId": "v1SpectroClustersSummaryUidOverview", + "responses": { + "200": { + "description": "An spectro cluster summary overview", + "schema": { + "$ref": "#/definitions/v1SpectroClusterUidSummary" + } + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/dashboard/spectroclusters/{uid}/resources/consumption": { + "post": { + "tags": [ + "v1" + ], + "summary": "Retrieves specified spectro cluster resource consumption", + "operationId": "v1SpectroClustersUidResourcesConsumption", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1ResourceConsumptionSpec" + } + } + ], + "responses": { + "200": { + "description": "An array of resource consumption data items", + "schema": { + "$ref": "#/definitions/v1ResourcesConsumption" + } + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/dashboard/spectroclusters/{uid}/workloads": { + "post": { + "tags": [ + "v1" + ], + "summary": "Retrieves specified cluster workloads", + "operationId": "v1DashboardSpectroClustersUidWorkloads", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1ClusterWorkloadsSpec" + } + } + ], + "responses": { + "200": { + "description": "An array of cluster workloads", + "schema": { + "$ref": "#/definitions/v1ClusterWorkload" + } + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/dashboard/spectroclusters/{uid}/workloads/clusterrolebinding": { + "post": { + "tags": [ + "v1" + ], + "summary": "Retrieves specified cluster workload clusterrolebindings", + "operationId": "v1DashboardSpectroClustersUidWorkloadsClusterRoleBinding", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1ClusterWorkloadsSpec" + } + } + ], + "responses": { + "200": { + "description": "An array of cluster workload clusterrolebindings", + "schema": { + "$ref": "#/definitions/v1ClusterWorkloadRoleBindings" + } + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/dashboard/spectroclusters/{uid}/workloads/cronjob": { + "post": { + "tags": [ + "v1" + ], + "summary": "Retrieves specified cluster workload cronjobs", + "operationId": "v1DashboardSpectroClustersUidWorkloadsCronJob", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1ClusterWorkloadsSpec" + } + } + ], + "responses": { + "200": { + "description": "An array of cluster workload cronjobs", + "schema": { + "$ref": "#/definitions/v1ClusterWorkloadCronJobs" + } + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/dashboard/spectroclusters/{uid}/workloads/daemonset": { + "post": { + "tags": [ + "v1" + ], + "summary": "Retrieves specified cluster workload daemonsets", + "operationId": "v1DashboardSpectroClustersUidWorkloadsDaemonSet", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1ClusterWorkloadsSpec" + } + } + ], + "responses": { + "200": { + "description": "An array of cluster workload daemonsets", + "schema": { + "$ref": "#/definitions/v1ClusterWorkloadDaemonSets" + } + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/dashboard/spectroclusters/{uid}/workloads/deployment": { + "post": { + "tags": [ + "v1" + ], + "summary": "Retrieves specified cluster workload deployments", + "operationId": "v1DashboardSpectroClustersUidWorkloadsDeployment", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1ClusterWorkloadsSpec" + } + } + ], + "responses": { + "200": { + "description": "An array of cluster workload deployments", + "schema": { + "$ref": "#/definitions/v1ClusterWorkloadDeployments" + } + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/dashboard/spectroclusters/{uid}/workloads/job": { + "post": { + "tags": [ + "v1" + ], + "summary": "Retrieves specified cluster workload jobs", + "operationId": "v1DashboardSpectroClustersUidWorkloadsJob", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1ClusterWorkloadsSpec" + } + } + ], + "responses": { + "200": { + "description": "An array of cluster workload jobs", + "schema": { + "$ref": "#/definitions/v1ClusterWorkloadJobs" + } + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/dashboard/spectroclusters/{uid}/workloads/namespace": { + "post": { + "tags": [ + "v1" + ], + "summary": "Retrieves specified cluster workload namespaces", + "operationId": "v1DashboardSpectroClustersUidWorkloadsNamespace", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1ClusterWorkloadsSpec" + } + } + ], + "responses": { + "200": { + "description": "An array of cluster workload namespaces", + "schema": { + "$ref": "#/definitions/v1ClusterWorkloadNamespaces" + } + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/dashboard/spectroclusters/{uid}/workloads/pod": { + "post": { + "tags": [ + "v1" + ], + "summary": "Retrieves specified cluster workload pods", + "operationId": "v1DashboardSpectroClustersUidWorkloadsPod", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1ClusterWorkloadsSpec" + } + } + ], + "responses": { + "200": { + "description": "An array of cluster workload pods", + "schema": { + "$ref": "#/definitions/v1ClusterWorkloadPods" + } + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/dashboard/spectroclusters/{uid}/workloads/rolebinding": { + "post": { + "tags": [ + "v1" + ], + "summary": "Retrieves specified cluster workload rolebindings", + "operationId": "v1DashboardSpectroClustersUidWorkloadsRoleBinding", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1ClusterWorkloadsSpec" + } + } + ], + "responses": { + "200": { + "description": "An array of cluster workload rolebindings", + "schema": { + "$ref": "#/definitions/v1ClusterWorkloadRoleBindings" + } + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/dashboard/spectroclusters/{uid}/workloads/statefulset": { + "post": { + "tags": [ + "v1" + ], + "summary": "Retrieves specified cluster workload statefulsets", + "operationId": "v1DashboardSpectroClustersUidWorkloadsStatefulSet", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1ClusterWorkloadsSpec" + } + } + ], + "responses": { + "200": { + "description": "An array of cluster workload statefulsets", + "schema": { + "$ref": "#/definitions/v1ClusterWorkloadStatefulSets" + } + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/dashboard/workspaces": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves a list of workspace", + "operationId": "v1DashboardWorkspacesList", + "responses": { + "200": { + "description": "An array of workspace", + "schema": { + "$ref": "#/definitions/v1DashboardWorkspaces" + } + } + } + } + }, + "/v1/dashboard/workspaces/{uid}/spectroclusters/workloads/clusterrolebinding": { + "post": { + "tags": [ + "v1" + ], + "summary": "Retrieves specified workspace clusters workload clusterrolebindings", + "operationId": "v1DashboardWorkspacesUidSpectroClustersWorkloadsClusterRoleBinding", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1WorkspaceWorkloadsSpec" + } + } + ], + "responses": { + "200": { + "description": "An array of clusters workload clusterrolebindings", + "schema": { + "$ref": "#/definitions/v1WorkspaceClustersWorkloadRoleBindings" + } + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/dashboard/workspaces/{uid}/spectroclusters/workloads/cronjob": { + "post": { + "tags": [ + "v1" + ], + "summary": "Retrieves specified workspace clusters workload cronjobs", + "operationId": "v1DashboardWorkspacesUidSpectroClustersWorkloadsCronJob", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1WorkspaceWorkloadsSpec" + } + } + ], + "responses": { + "200": { + "description": "An array of clusters workload cronjobs", + "schema": { + "$ref": "#/definitions/v1WorkspaceClustersWorkloadCronJobs" + } + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/dashboard/workspaces/{uid}/spectroclusters/workloads/daemonset": { + "post": { + "tags": [ + "v1" + ], + "summary": "Retrieves specified workspace clusters workload daemonsets", + "operationId": "v1DashboardWorkspacesUidSpectroClustersWorkloadsDaemonSet", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1WorkspaceWorkloadsSpec" + } + } + ], + "responses": { + "200": { + "description": "An array of clusters workload daemonsets", + "schema": { + "$ref": "#/definitions/v1WorkspaceClustersWorkloadDaemonSets" + } + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/dashboard/workspaces/{uid}/spectroclusters/workloads/deployment": { + "post": { + "tags": [ + "v1" + ], + "summary": "Retrieves specified workspace clusters workload deployments", + "operationId": "v1DashboardWorkspacesUidSpectroClustersWorkloadsDeployment", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1WorkspaceWorkloadsSpec" + } + } + ], + "responses": { + "200": { + "description": "An array of clusters workload deployments", + "schema": { + "$ref": "#/definitions/v1WorkspaceClustersWorkloadDeployments" + } + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/dashboard/workspaces/{uid}/spectroclusters/workloads/job": { + "post": { + "tags": [ + "v1" + ], + "summary": "Retrieves specified workspace clusters workload jobs", + "operationId": "v1DashboardWorkspacesUidSpectroClustersWorkloadsJob", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1WorkspaceWorkloadsSpec" + } + } + ], + "responses": { + "200": { + "description": "An array of clusters workload jobs", + "schema": { + "$ref": "#/definitions/v1WorkspaceClustersWorkloadJobs" + } + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/dashboard/workspaces/{uid}/spectroclusters/workloads/namespace": { + "post": { + "tags": [ + "v1" + ], + "summary": "Retrieves specified workspace clusters workload namespaces", + "operationId": "v1DashboardWorkspacesUidSpectroClustersWorkloadsNamespace", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1WorkspaceWorkloadsSpec" + } + } + ], + "responses": { + "200": { + "description": "An array of clusters workload namespaces", + "schema": { + "$ref": "#/definitions/v1WorkspaceClustersWorkloadNamespaces" + } + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/dashboard/workspaces/{uid}/spectroclusters/workloads/pod": { + "post": { + "tags": [ + "v1" + ], + "summary": "Retrieves specified workspace clusters workload pods", + "operationId": "v1DashboardWorkspacesUidSpectroClustersWorkloadsPod", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1WorkspaceWorkloadsSpec" + } + } + ], + "responses": { + "200": { + "description": "An array of clusters workload pods", + "schema": { + "$ref": "#/definitions/v1WorkspaceClustersWorkloadPods" + } + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/dashboard/workspaces/{uid}/spectroclusters/workloads/rolebinding": { + "post": { + "tags": [ + "v1" + ], + "summary": "Retrieves specified workspace clusters workload rolebindings", + "operationId": "v1DashboardWorkspacesUidSpectroClustersWorkloadsRoleBinding", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1WorkspaceWorkloadsSpec" + } + } + ], + "responses": { + "200": { + "description": "An array of clusters workload rolebindings", + "schema": { + "$ref": "#/definitions/v1WorkspaceClustersWorkloadRoleBindings" + } + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/dashboard/workspaces/{uid}/spectroclusters/workloads/statefulset": { + "post": { + "tags": [ + "v1" + ], + "summary": "Retrieves specified workspace clusters workload statefulsets", + "operationId": "v1DashboardWorkspacesUidSpectroClustersWorkloadsStatefulSet", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1WorkspaceWorkloadsSpec" + } + } + ], + "responses": { + "200": { + "description": "An array of clusters workload statefulsets", + "schema": { + "$ref": "#/definitions/v1WorkspaceClustersWorkloadStatefulSets" + } + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/datasinks/cloudwatch": { + "post": { + "description": "Sync data to cloud watch", + "tags": [ + "v1" + ], + "summary": "sync data to cloud watch", + "operationId": "V1DataSinksCloudWatchSink", + "parameters": [ + { + "description": "Request payload for cloud watch config", + "name": "dataSinkCloudWatchConfig", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1.DataSinkCloudWatchConfig" + } + } + ], + "responses": { + "204": { + "description": "Ok response without content", + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + } + }, + "/v1/edgehosts": { + "post": { + "tags": [ + "v1" + ], + "summary": "Create the edge host device", + "operationId": "v1EdgeHostDevicesCreate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1EdgeHostDeviceEntity" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + } + }, + "/v1/edgehosts/metadata": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves a list of edge hosts metadata matching the filter condition", + "operationId": "v1EdgeHostsMetadataQuickFilterGet", + "parameters": [ + { + "enum": [ + "libvirt", + "edge-native", + "vsphere" + ], + "type": "string", + "name": "type", + "in": "query" + }, + { + "enum": [ + "unusedEdgeHosts" + ], + "type": "string", + "name": "quickFilter", + "in": "query" + } + ], + "responses": { + "200": { + "description": "An array of edge host metadata", + "schema": { + "$ref": "#/definitions/v1EdgeHostsMeta" + } + } + } + } + }, + "/v1/edgehosts/register": { + "post": { + "tags": [ + "v1" + ], + "summary": "Registers the edge host device", + "operationId": "v1EdgeHostDevicesRegister", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1EdgeHostDevice" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1EdgeHostDevice" + } + } + } + } + }, + "/v1/edgehosts/tags": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves a list of edge hosts tags", + "operationId": "v1EdgeHostsTagsGet", + "responses": { + "200": { + "description": "An array of edge hosts tags", + "schema": { + "$ref": "#/definitions/v1EdgeHostsTags" + } + } + } + } + }, + "/v1/edgehosts/tokens": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves a list of edge tokens", + "operationId": "v1EdgeTokensList", + "responses": { + "200": { + "description": "An array of edge tokens", + "schema": { + "$ref": "#/definitions/v1EdgeTokens" + } + } + } + }, + "post": { + "tags": [ + "v1" + ], + "summary": "Create the edge token", + "operationId": "v1EdgeTokensCreate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1EdgeTokenEntity" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + } + }, + "/v1/edgehosts/tokens/{uid}": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the specified edge token", + "operationId": "v1EdgeTokensUidGet", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1EdgeToken" + } + } + } + }, + "put": { + "tags": [ + "v1" + ], + "summary": "Updates the specified edge token", + "operationId": "v1EdgeTokensUidUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1EdgeTokenUpdate" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "delete": { + "tags": [ + "v1" + ], + "summary": "Deletes the specified edge token", + "operationId": "v1EdgeTokensUidDelete", + "responses": { + "204": { + "description": "The resource was deleted successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Edge token uid", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/edgehosts/tokens/{uid}/state": { + "put": { + "tags": [ + "v1" + ], + "summary": "Revoke or re-activate the edge token access", + "operationId": "v1EdgeTokensUidState", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1EdgeTokenActiveState" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Edge token uid", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/edgehosts/{uid}": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the specified edge host device", + "operationId": "v1EdgeHostDevicesUidGet", + "parameters": [ + { + "type": "boolean", + "default": false, + "description": "resolve pack values if set to true", + "name": "resolvePackValues", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1EdgeHostDevice" + } + } + } + }, + "put": { + "tags": [ + "v1" + ], + "summary": "Updates the specified edge host device", + "operationId": "v1EdgeHostDevicesUidUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1EdgeHostDevice" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "delete": { + "tags": [ + "v1" + ], + "summary": "Deletes the specified edge host device", + "operationId": "v1EdgeHostDevicesUidDelete", + "responses": { + "204": { + "description": "The resource was deleted successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/edgehosts/{uid}/cluster/associate": { + "delete": { + "tags": [ + "v1" + ], + "summary": "Deassociate the clusters to the edge host", + "operationId": "v1EdgeHostDevicesUidClusterDeassociate", + "responses": { + "204": { + "description": "The resource was deleted successfully" + } + } + }, + "patch": { + "tags": [ + "v1" + ], + "summary": "Associate the clusters to the edge host", + "operationId": "v1EdgeHostDevicesUidClusterAssociate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1EdgeHostClusterEntity" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/edgehosts/{uid}/health": { + "patch": { + "tags": [ + "v1" + ], + "summary": "Updates the edge host health", + "operationId": "v1EdgeHostDevicesHealthUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1EdgeHostHealth" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/edgehosts/{uid}/hostCheckSum": { + "patch": { + "tags": [ + "v1" + ], + "summary": "Update the specified edge host device host check sum", + "operationId": "v1EdgeHostDeviceHostCheckSumUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1EdgeHostDeviceHostCheckSum" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/edgehosts/{uid}/hostPairingKey": { + "patch": { + "tags": [ + "v1" + ], + "summary": "Update the specified edge host device host pairing key", + "operationId": "v1EdgeHostDeviceHostPairingKeyUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1EdgeHostDeviceHostPairingKey" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/edgehosts/{uid}/meta": { + "put": { + "tags": [ + "v1" + ], + "summary": "Updates the specified edge host device meta", + "operationId": "v1EdgeHostDevicesUidMetaUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1EdgeHostDeviceMetaUpdateEntity" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/edgehosts/{uid}/pack/manifests/{manifestUid}": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the specified edge host's manifest", + "operationId": "v1EdgeHostDevicesUidPackManifestsUidGet", + "parameters": [ + { + "type": "string", + "description": "edge host uid", + "name": "uid", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "manifest uid which is part of the pack ref", + "name": "manifestUid", + "in": "path", + "required": true + }, + { + "type": "boolean", + "default": false, + "description": "resolve pack manifest values if set to true", + "name": "resolveManifestValues", + "in": "query" + } + ], + "responses": { + "200": { + "description": "Pack manifest content", + "schema": { + "$ref": "#/definitions/v1Manifest" + } + } + } + } + }, + "/v1/edgehosts/{uid}/packs/status": { + "patch": { + "tags": [ + "v1" + ], + "summary": "Patch update specified edge host's packs status", + "operationId": "v1EdgeHostDevicesUidPacksStatusPatch", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1SpectroClusterPacksStatusEntity" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/edgehosts/{uid}/profiles": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the associated profiles of a specified edge host device", + "operationId": "v1EdgeHostDevicesUidProfilesGet", + "parameters": [ + { + "type": "string", + "description": "includes pack meta such as schema, presets", + "name": "includePackMeta", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1SpectroClusterProfileList" + } + } + } + }, + "put": { + "tags": [ + "v1" + ], + "summary": "Associate cluster profiles to the specified edge host device", + "operationId": "v1EdgeHostDevicesUidProfilesUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1SpectroClusterProfiles" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/edgehosts/{uid}/reset": { + "put": { + "tags": [ + "v1" + ], + "summary": "Reset the cluster through edge host", + "operationId": "V1EdgeHostsUidReset", + "responses": { + "204": { + "description": "Ok response without content", + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Edge host uid", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/edgehosts/{uid}/spc/download": { + "get": { + "produces": [ + "application/octet-stream" + ], + "tags": [ + "v1" + ], + "summary": "Download the specified edge host device spc", + "operationId": "v1EdgeHostDevicesUidSpcDownload", + "responses": { + "200": { + "description": "download spc archive file", + "schema": { + "type": "string", + "format": "binary" + }, + "headers": { + "Content-Disposition": { + "type": "string" + } + } + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/edgehosts/{uid}/vsphere/properties": { + "put": { + "tags": [ + "v1" + ], + "summary": "Updates the specified edge host device vsphere properties", + "operationId": "v1EdgeHostDevicesUidVspherePropertiesUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1EdgeHostVsphereCloudProperties" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/events/components": { + "get": { + "description": "Returns a paginated list of component events based on request parameters", + "tags": [ + "v1" + ], + "summary": "Returns a paginated list of component events based on request parameters", + "operationId": "v1EventsComponentsList", + "parameters": [ + { + "type": "string", + "description": "Set of fields to be presented in the response with values. The fields are comma separated. Eg: metadata.uid,metadata.name", + "name": "fields", + "in": "query" + }, + { + "type": "string", + "description": "Filters can be combined with AND, OR operators with field path name. Eg: metadata.name=TestServiceANDspec.cloudType=aws\n\nServer will be restricted to certain fields based on the indexed data for each resource.", + "name": "filters", + "in": "query" + }, + { + "type": "string", + "description": "Specify the fields with sort order. 1 indicates ascending and -1 for descending. Eg: orderBy=metadata.name=1,metadata.uid=-1", + "name": "orderBy", + "in": "query" + }, + { + "type": "integer", + "format": "int64", + "default": 50, + "description": "limit is a maximum number of responses to return for a list call. Default and maximum value of the limit is 50.\nIf more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results.", + "name": "limit", + "in": "query" + }, + { + "type": "integer", + "format": "int64", + "description": "offset is the next index number from which the response will start. The response offset value can be used along with continue token for the pagination.", + "name": "offset", + "in": "query" + }, + { + "type": "string", + "description": "continue token to paginate the subsequent data items", + "name": "continue", + "in": "query" + } + ], + "responses": { + "200": { + "description": "An array of component events items", + "schema": { + "$ref": "#/definitions/v1Events" + } + } + } + }, + "post": { + "description": "Creates a component event", + "tags": [ + "v1" + ], + "summary": "Creates a component event", + "operationId": "v1EventsComponentsCreate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1Event" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + } + }, + "/v1/events/components/bulk": { + "post": { + "description": "Creates the component events in bulk", + "tags": [ + "v1" + ], + "summary": "Creates the component events in bulk", + "operationId": "v1EventsComponentsCreateBulk", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1BulkEvents" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uids" + } + } + } + } + }, + "/v1/events/components/{objectKind}/{objectUid}": { + "get": { + "description": "Returns a list of components events for the specified related object", + "tags": [ + "v1" + ], + "summary": "Returns a list of components events for the specified related object", + "operationId": "v1EventsComponentsObjTypeUidList", + "parameters": [ + { + "type": "string", + "description": "Set of fields to be presented in the response with values. The fields are comma separated. Eg: metadata.uid,metadata.name", + "name": "fields", + "in": "query" + }, + { + "type": "string", + "description": "Filters can be combined with AND, OR operators with field path name. Eg: metadata.name=TestServiceANDspec.cloudType=aws\n\nServer will be restricted to certain fields based on the indexed data for each resource.", + "name": "filters", + "in": "query" + }, + { + "type": "string", + "description": "Specify the fields with sort order. 1 indicates ascending and -1 for descending. Eg: orderBy=metadata.name=1,metadata.uid=-1", + "name": "orderBy", + "in": "query" + }, + { + "type": "integer", + "format": "int64", + "default": 50, + "description": "limit is a maximum number of responses to return for a list call. Default and maximum value of the limit is 50.\nIf more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results.", + "name": "limit", + "in": "query" + }, + { + "type": "integer", + "format": "int64", + "description": "offset is the next index number from which the response will start. The response offset value can be used along with continue token for the pagination.", + "name": "offset", + "in": "query" + }, + { + "type": "string", + "description": "continue token to paginate the subsequent data items", + "name": "continue", + "in": "query" + } + ], + "responses": { + "200": { + "description": "An array of component event items", + "schema": { + "$ref": "#/definitions/v1Events" + } + } + } + }, + "delete": { + "tags": [ + "v1" + ], + "summary": "Delete all the components events for the specified related object", + "operationId": "v1EventsComponentsObjTypeUidDelete", + "responses": { + "204": { + "description": "The resource was deleted successfully" + } + } + }, + "parameters": [ + { + "enum": [ + "spectrocluster", + "edgehost" + ], + "type": "string", + "description": "Describes the related object uid for which events has to be fetched", + "name": "objectKind", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Describes the related object kind for which events has to be fetched", + "name": "objectUid", + "in": "path", + "required": true + } + ] + }, + "/v1/features": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves the list of features", + "operationId": "v1FeaturesList", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1Features" + } + } + } + } + }, + "/v1/features/{uid}": { + "put": { + "tags": [ + "v1" + ], + "summary": "Update a feature", + "operationId": "v1FeaturesUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1FeatureUpdate" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Specify the feature uid", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/filters": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns a list of Filters", + "operationId": "v1FiltersList", + "parameters": [ + { + "type": "integer", + "format": "int64", + "default": 50, + "description": "limit is a maximum number of responses to return for a list call. Default and maximum value of the limit is 50.\nIf more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results.", + "name": "limit", + "in": "query" + }, + { + "type": "integer", + "format": "int64", + "description": "offset is the next index number from which the response will start. The response offset value can be used along with continue token for the pagination.", + "name": "offset", + "in": "query" + }, + { + "type": "string", + "description": "continue token to paginate the subsequent data items", + "name": "continue", + "in": "query" + } + ], + "responses": { + "200": { + "description": "An array of filters", + "schema": { + "$ref": "#/definitions/v1FiltersSummary" + } + } + } + } + }, + "/v1/filters/metadata": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns a list of Filters metadata", + "operationId": "v1FiltersMetadata", + "parameters": [ + { + "type": "string", + "description": "filterType can be - [tag, meta, resource]", + "name": "filterType", + "in": "query" + } + ], + "responses": { + "200": { + "description": "An array of filters", + "schema": { + "$ref": "#/definitions/v1FiltersMetadata" + } + } + } + } + }, + "/v1/filters/tag": { + "post": { + "tags": [ + "v1" + ], + "summary": "Creates a Tag filter", + "operationId": "v1TagFiltersCreate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1TagFilter" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + } + }, + "/v1/filters/tag/{uid}": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the specified Filter object", + "operationId": "v1TagFilterUidGet", + "responses": { + "200": { + "description": "A Filter object", + "schema": { + "$ref": "#/definitions/v1TagFilterSummary" + } + } + } + }, + "put": { + "tags": [ + "v1" + ], + "summary": "Updates a Tag filter", + "operationId": "v1TagFilterUidUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1TagFilter" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "delete": { + "tags": [ + "v1" + ], + "summary": "Delete the specified Filter object", + "operationId": "v1TagFilterUidDelete", + "responses": { + "204": { + "description": "The resource was deleted successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/metrics/{resourceKind}/values": { + "get": { + "description": "Returns all the metrics for a given resource kind", + "tags": [ + "v1" + ], + "summary": "Retrieves the list of metrics for a specified resource kind", + "operationId": "v1MetricsList", + "parameters": [ + { + "enum": [ + "pod", + "namespace", + "spectrocluster", + "machine", + "project" + ], + "type": "string", + "name": "resourceKind", + "in": "path", + "required": true + }, + { + "type": "string", + "default": "all", + "name": "metricKind", + "in": "query" + }, + { + "type": "string", + "format": "date-time", + "description": "Time is a wrapper around time.Time which supports correct marshaling to YAML and JSON. Wrappers are provided for many of the factory methods that the time package offers.", + "name": "startTime", + "in": "query" + }, + { + "type": "string", + "format": "date-time", + "description": "Time is a wrapper around time.Time which supports correct marshaling to YAML and JSON. Wrappers are provided for many of the factory methods that the time package offers.", + "name": "endTime", + "in": "query" + }, + { + "type": "integer", + "format": "int32", + "default": 1, + "name": "period", + "in": "query" + }, + { + "type": "boolean", + "default": false, + "description": "Deprecated. includeMasterMachines in boolean, group the data point by including control plane nodes if set to true", + "name": "includeMasterMachines", + "in": "query" + }, + { + "type": "boolean", + "default": false, + "description": "includeControlPlaneMachines in boolean, group the data point by including control plane nodes if set to true", + "name": "includeControlPlaneMachines", + "in": "query" + }, + { + "type": "boolean", + "default": false, + "description": "if true then api returns only aggregation values, else api returns all data points by default", + "name": "discrete", + "in": "query" + }, + { + "type": "string", + "name": "spectroClusterUid", + "in": "query" + } + ], + "responses": { + "200": { + "description": "An array of metric items", + "schema": { + "$ref": "#/definitions/v1MetricTimeSeriesList" + } + } + } + } + }, + "/v1/metrics/{resourceKind}/{resourceUid}/values": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the metrics for a specified resource uid", + "operationId": "v1MetricsUidList", + "parameters": [ + { + "enum": [ + "pod", + "namespace", + "spectrocluster", + "machine", + "project" + ], + "type": "string", + "name": "resourceKind", + "in": "path", + "required": true + }, + { + "type": "string", + "name": "resourceUid", + "in": "path", + "required": true + }, + { + "type": "string", + "default": "all", + "description": "multiple metric kinds can be provided with comma separated", + "name": "metricKind", + "in": "query" + }, + { + "type": "string", + "format": "date-time", + "description": "Time is a wrapper around time.Time which supports correct marshaling to YAML and JSON. Wrappers are provided for many of the factory methods that the time package offers.", + "name": "startTime", + "in": "query" + }, + { + "type": "string", + "format": "date-time", + "description": "Time is a wrapper around time.Time which supports correct marshaling to YAML and JSON. Wrappers are provided for many of the factory methods that the time package offers.", + "name": "endTime", + "in": "query" + }, + { + "type": "integer", + "format": "int32", + "default": 1, + "description": "period in minutes, group the data point by the specified period", + "name": "period", + "in": "query" + }, + { + "type": "boolean", + "default": false, + "description": "Deprecated. includeMasterMachines in boolean, group the data point by including control plane nodes if set to true", + "name": "includeMasterMachines", + "in": "query" + }, + { + "type": "boolean", + "default": false, + "description": "includeControlPlaneMachines in boolean, group the data point by including control plane nodes if set to true", + "name": "includeControlPlaneMachines", + "in": "query" + }, + { + "type": "boolean", + "default": false, + "description": "if true then api returns only aggregation values, else api returns all data points by default", + "name": "discrete", + "in": "query" + } + ], + "responses": { + "200": { + "description": "An array of metric items", + "schema": { + "$ref": "#/definitions/v1MetricTimeSeries" + } + } + } + }, + "delete": { + "tags": [ + "v1" + ], + "summary": "Deletes the metrics of the specified resource", + "operationId": "v1MetricsUidDelete", + "parameters": [ + { + "enum": [ + "pod", + "namespace", + "spectrocluster", + "machine", + "project" + ], + "type": "string", + "name": "resourceKind", + "in": "path", + "required": true + }, + { + "type": "string", + "name": "resourceUid", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "description": "The resource was deleted successfully" + } + } + } + }, + "/v1/notifications/": { + "get": { + "description": "Returns a paginated list of notifications based on request parameters", + "tags": [ + "v1" + ], + "summary": "Returns a paginated list of notifications based on request parameters", + "operationId": "v1NotificationsList", + "parameters": [ + { + "type": "string", + "description": "Set of fields to be presented in the response with values. The fields are comma separated. Eg: metadata.uid,metadata.name", + "name": "fields", + "in": "query" + }, + { + "type": "string", + "description": "Filters can be combined with AND, OR operators with field path name. Eg: metadata.name=TestServiceANDspec.cloudType=aws\n\nServer will be restricted to certain fields based on the indexed data for each resource.", + "name": "filters", + "in": "query" + }, + { + "type": "string", + "description": "Specify the fields with sort order. 1 indicates ascending and -1 for descending. Eg: orderBy=metadata.name=1,metadata.uid=-1", + "name": "orderBy", + "in": "query" + }, + { + "type": "integer", + "format": "int64", + "default": 50, + "description": "limit is a maximum number of responses to return for a list call. Default and maximum value of the limit is 50.\nIf more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results.", + "name": "limit", + "in": "query" + }, + { + "type": "integer", + "format": "int64", + "description": "offset is the next index number from which the response will start. The response offset value can be used along with continue token for the pagination.", + "name": "offset", + "in": "query" + }, + { + "type": "string", + "description": "continue token to paginate the subsequent data items", + "name": "continue", + "in": "query" + } + ], + "responses": { + "200": { + "description": "An array of notification items", + "schema": { + "$ref": "#/definitions/v1Notifications" + } + } + } + } + }, + "/v1/notifications/events": { + "post": { + "description": "Creates a notification event", + "tags": [ + "v1" + ], + "summary": "Creates a notification event", + "operationId": "v1NotificationsEventCreate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1NotificationEvent" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + } + }, + "/v1/notifications/{objectKind}/{objectUid}": { + "get": { + "description": "Returns a list of notifications for the specified related object", + "tags": [ + "v1" + ], + "summary": "Returns a list of notifications for the specified related object", + "operationId": "v1NotificationsObjTypeUidList", + "parameters": [ + { + "type": "string", + "description": "Set of fields to be presented in the response with values. The fields are comma separated. Eg: metadata.uid,metadata.name", + "name": "fields", + "in": "query" + }, + { + "type": "string", + "description": "Filters can be combined with AND, OR operators with field path name. Eg: metadata.name=TestServiceANDspec.cloudType=aws\n\nServer will be restricted to certain fields based on the indexed data for each resource.", + "name": "filters", + "in": "query" + }, + { + "type": "string", + "description": "Specify the fields with sort order. 1 indicates ascending and -1 for descending. Eg: orderBy=metadata.name=1,metadata.uid=-1", + "name": "orderBy", + "in": "query" + }, + { + "type": "integer", + "format": "int64", + "default": 50, + "description": "limit is a maximum number of responses to return for a list call. Default and maximum value of the limit is 50.\nIf more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results.", + "name": "limit", + "in": "query" + }, + { + "type": "integer", + "format": "int64", + "description": "offset is the next index number from which the response will start. The response offset value can be used along with continue token for the pagination.", + "name": "offset", + "in": "query" + }, + { + "type": "string", + "description": "continue token to paginate the subsequent data items", + "name": "continue", + "in": "query" + } + ], + "responses": { + "200": { + "description": "An array of component event items", + "schema": { + "$ref": "#/definitions/v1Notifications" + } + } + } + }, + "parameters": [ + { + "enum": [ + "spectrocluster", + "clusterprofile", + "appdeployment" + ], + "type": "string", + "description": "Describes the related object kind for which notifications have to be fetched", + "name": "objectKind", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Describes the related object uid for which notifications have to be fetched", + "name": "objectUid", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Describes a way to fetch \"done\" notifications", + "name": "isDone", + "in": "query" + } + ] + }, + "/v1/notifications/{uid}/ack": { + "patch": { + "description": "Updates the specified notification for the acknowledgment", + "tags": [ + "v1" + ], + "summary": "Updates the specified notification for the acknowledgment", + "operationId": "v1NotificationsUidAck", + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Describes acknowledging notification uid", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/notifications/{uid}/done": { + "patch": { + "description": "Updates the specified notification action as done", + "tags": [ + "v1" + ], + "summary": "Updates the specified notification action as done", + "operationId": "v1NotificationsUidDone", + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Describes notification uid", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/overlords": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves a list of overlords owned by the tenant", + "operationId": "v1OverlordsList", + "parameters": [ + { + "type": "string", + "name": "name", + "in": "query" + } + ], + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1Overlords" + } + } + } + } + }, + "/v1/overlords/maas/manifest": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the manifests required for the private gateway installation", + "operationId": "V1OverlordsMaasManifest", + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1OverlordManifest" + } + } + } + }, + "parameters": [ + { + "type": "string", + "name": "pairingCode", + "in": "query", + "required": true + } + ] + }, + "/v1/overlords/maas/{uid}/account": { + "put": { + "tags": [ + "v1" + ], + "summary": "update the maas cloudaccount for the private gateway", + "operationId": "v1OverlordsUidMaasAccountUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1OverlordMaasAccountEntity" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "post": { + "tags": [ + "v1" + ], + "summary": "create the maas cloudaccount for the private gateway", + "operationId": "v1OverlordsUidMaasAccountCreate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1OverlordMaasAccountCreate" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/overlords/maas/{uid}/account/validate": { + "post": { + "tags": [ + "v1" + ], + "summary": "validate the maas cloudaccount for the private gateway", + "operationId": "v1OverlordsUidMaasAccountValidate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "properties": { + "account": { + "$ref": "#/definitions/v1MaasCloudAccount" + } + } + } + } + ], + "responses": { + "204": { + "description": "Ok response without content", + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/overlords/maas/{uid}/cloudconfig": { + "put": { + "tags": [ + "v1" + ], + "summary": "update the maas cloud config for the private gateway", + "operationId": "V1OverlordsUidMaasCloudConfigUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1OverlordMaasCloudConfig" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "post": { + "tags": [ + "v1" + ], + "summary": "create the maas cloud config for the private gateway", + "operationId": "V1OverlordsUidMaasCloudConfigCreate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1OverlordMaasCloudConfig" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/overlords/maas/{uid}/clusterprofile": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the specified maas private gateway cluster profile", + "operationId": "v1OverlordsUidMaasClusterProfile", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1ClusterProfile" + } + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/overlords/migrate": { + "post": { + "tags": [ + "v1" + ], + "summary": "migrate all the clusters from source overlord to target overlord", + "operationId": "V1OverlordsMigrate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1OverlordMigrateEntity" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + } + }, + "/v1/overlords/openstack/manifest": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the manifests required for the private gateway installation", + "operationId": "v1OverlordsOpenStackManifest", + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1OverlordManifest" + } + } + } + }, + "parameters": [ + { + "type": "string", + "name": "pairingCode", + "in": "query", + "required": true + } + ] + }, + "/v1/overlords/openstack/{uid}/account": { + "put": { + "tags": [ + "v1" + ], + "summary": "update the OpenStack cloudaccount for the private gateway", + "operationId": "v1OverlordsUidOpenStackAccountUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1OverlordOpenStackAccountEntity" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "post": { + "tags": [ + "v1" + ], + "summary": "create the OpenStack cloudaccount for the private gateway", + "operationId": "v1OverlordsUidOpenStackAccountCreate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1OverlordOpenStackAccountCreate" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/overlords/openstack/{uid}/account/validate": { + "post": { + "tags": [ + "v1" + ], + "summary": "validate the OpenStack cloudaccount for the private gateway", + "operationId": "v1OverlordsUidOpenStackAccountValidate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "properties": { + "account": { + "$ref": "#/definitions/v1OpenStackCloudAccount" + } + } + } + } + ], + "responses": { + "204": { + "description": "Ok response without content", + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/overlords/openstack/{uid}/cloudconfig": { + "put": { + "tags": [ + "v1" + ], + "summary": "update the OpenStack cloud config for the private gateway", + "operationId": "v1OverlordsUidOpenStackCloudConfigUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1OverlordOpenStackCloudConfig" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "post": { + "tags": [ + "v1" + ], + "summary": "create the OpenStack cloud config for the private gateway", + "operationId": "v1OverlordsUidOpenStackCloudConfigCreate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1OverlordOpenStackCloudConfig" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/overlords/openstack/{uid}/clusterprofile": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the specified OpenStack private gateway cluster profile", + "operationId": "v1OverlordsUidOpenStackClusterProfile", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1ClusterProfile" + } + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/overlords/pairing/code": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the pairing code for the private gateway", + "operationId": "v1OverlordsPairingCode", + "parameters": [ + { + "enum": [ + "vsphere", + "openstack", + "maas" + ], + "type": "string", + "name": "cloudType", + "in": "query" + } + ], + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1PairingCode" + } + } + } + } + }, + "/v1/overlords/vsphere/manifest": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the manifests required for the private gateway installation", + "operationId": "v1OverlordsVsphereManifest", + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1OverlordManifest" + } + } + } + }, + "parameters": [ + { + "type": "string", + "name": "pairingCode", + "in": "query", + "required": true + } + ] + }, + "/v1/overlords/vsphere/ova": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns overlord's ova information", + "operationId": "v1OverlordsVsphereOvaGet", + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1OverloadVsphereOva" + } + } + } + } + }, + "/v1/overlords/vsphere/{uid}/account": { + "put": { + "tags": [ + "v1" + ], + "summary": "update the vSphere cloudaccount for the private gateway", + "operationId": "v1OverlordsUidVsphereAccountUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1OverlordVsphereAccountEntity" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "post": { + "tags": [ + "v1" + ], + "summary": "create the vSphere cloudaccount for the private gateway", + "operationId": "v1OverlordsUidVsphereAccountCreate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1OverlordVsphereAccountCreate" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/overlords/vsphere/{uid}/account/validate": { + "post": { + "tags": [ + "v1" + ], + "summary": "validate the vSphere cloudaccount for the private gateway", + "operationId": "v1OverlordsUidVsphereAccountValidate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "properties": { + "account": { + "$ref": "#/definitions/v1VsphereCloudAccount" + } + } + } + } + ], + "responses": { + "204": { + "description": "Ok response without content", + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/overlords/vsphere/{uid}/cloudconfig": { + "put": { + "tags": [ + "v1" + ], + "summary": "update the vSphere cloud config for the private gateway", + "operationId": "v1OverlordsUidVsphereCloudConfigUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1OverlordVsphereCloudConfig" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "post": { + "tags": [ + "v1" + ], + "summary": "create the vSphere cloud config for the private gateway", + "operationId": "v1OverlordsUidVsphereCloudConfigCreate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1OverlordVsphereCloudConfig" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/overlords/vsphere/{uid}/clusterprofile": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the specified vsphere private gateway cluster profile", + "operationId": "v1OverlordsUidVsphereClusterProfile", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1ClusterProfile" + } + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/overlords/vsphere/{uid}/pools": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves a list of IP Pools for the specified private gateway", + "operationId": "v1OverlordsUidPoolsList", + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1IpPools" + } + } + } + }, + "post": { + "tags": [ + "v1" + ], + "summary": "Creates an IP pool defintion for the sepcified private gateway", + "operationId": "v1OverlordsUidPoolCreate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1IpPoolInputEntity" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/overlords/vsphere/{uid}/pools/{poolUid}": { + "put": { + "tags": [ + "v1" + ], + "summary": "Updates the private gateways's specified IP Pool data", + "operationId": "v1OverlordsUidPoolUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1IpPoolInputEntity" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "delete": { + "tags": [ + "v1" + ], + "summary": "Deletes the private gateways's specified IP Pool data", + "operationId": "v1OverlordsUidPoolDelete", + "responses": { + "204": { + "description": "The resource was deleted successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + }, + { + "type": "string", + "name": "poolUid", + "in": "path", + "required": true + } + ] + }, + "/v1/overlords/vsphere/{uid}/properties/computecluster/resources": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves the vSphere computecluster resources for the specified private gateway's account", + "operationId": "v1OverlordsUidVsphereComputeclusterRes", + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1VsphereComputeClusterResources" + } + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + }, + { + "type": "string", + "name": "datacenter", + "in": "query", + "required": true + }, + { + "type": "string", + "name": "computecluster", + "in": "query", + "required": true + } + ] + }, + "/v1/overlords/vsphere/{uid}/properties/datacenters": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves the vSphere datacenters \u0026 datacluster for the specified private gateway's account", + "operationId": "v1OverlordsUidVsphereDatacenters", + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1VsphereDatacenters" + } + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/overlords/{uid}": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the specified private gateway's for the given uid", + "operationId": "v1OverlordsUidGet", + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1Overlord" + } + } + } + }, + "delete": { + "tags": [ + "v1" + ], + "summary": "delete the private gateway", + "operationId": "v1OverlordsUidDelete", + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1DeletedMsg" + } + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/overlords/{uid}/metadata": { + "put": { + "tags": [ + "v1" + ], + "summary": "update the private gateway's metadata", + "operationId": "v1OverlordsUidMetadataUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1ObjectMetaInputEntitySchema" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/overlords/{uid}/reset": { + "put": { + "tags": [ + "v1" + ], + "summary": "reset the private gateway by disaaociating the private gateway's resources", + "operationId": "v1OverlordsUidReset", + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1UpdatedMsg" + } + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/packs": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves a list of packs", + "operationId": "v1PacksSummaryList", + "parameters": [ + { + "type": "string", + "description": "Set of fields to be presented in the response with values. The fields are comma separated. Eg: metadata.uid,metadata.name", + "name": "fields", + "in": "query" + }, + { + "type": "string", + "description": "Filters can be combined with AND, OR operators with field path name. Eg: metadata.name=TestServiceANDspec.cloudType=aws\n\nServer will be restricted to certain fields based on the indexed data for each resource.", + "name": "filters", + "in": "query" + }, + { + "type": "string", + "description": "Specify the fields with sort order. 1 indicates ascending and -1 for descending. Eg: orderBy=metadata.name=1,metadata.uid=-1", + "name": "orderBy", + "in": "query" + }, + { + "type": "integer", + "format": "int64", + "default": 50, + "description": "limit is a maximum number of responses to return for a list call. Default and maximum value of the limit is 50.\nIf more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results.", + "name": "limit", + "in": "query" + }, + { + "type": "integer", + "format": "int64", + "description": "offset is the next index number from which the response will start. The response offset value can be used along with continue token for the pagination.", + "name": "offset", + "in": "query" + }, + { + "type": "string", + "description": "continue token to paginate the subsequent data items", + "name": "continue", + "in": "query" + } + ], + "responses": { + "200": { + "description": "An array of pack summary items", + "schema": { + "$ref": "#/definitions/v1PackSummaries" + } + } + } + }, + "delete": { + "tags": [ + "v1" + ], + "summary": "Deletes the packs", + "operationId": "v1PacksSummaryDelete", + "parameters": [ + { + "type": "string", + "description": "Filters can be combined with AND, OR operators with field path name. Eg: metadata.name=TestServiceANDspec.cloudType=aws\n\nServer will be restricted to certain fields based on the indexed data for each resource.", + "name": "filters", + "in": "query" + } + ], + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1DeleteMeta" + } + } + } + } + }, + "/v1/packs/search": { + "post": { + "tags": [ + "v1" + ], + "summary": "Retrieves a list of packs based on filter", + "operationId": "v1PacksSearch", + "parameters": [ + { + "type": "integer", + "format": "int64", + "default": 50, + "description": "limit is a maximum number of responses to return for a list call. Default and maximum value of the limit is 50.\nIf more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results.", + "name": "limit", + "in": "query" + }, + { + "type": "integer", + "format": "int64", + "description": "offset is the next index number from which the response will start. The response offset value can be used along with continue token for the pagination.", + "name": "offset", + "in": "query" + }, + { + "type": "string", + "description": "continue token to paginate the subsequent data items", + "name": "continue", + "in": "query" + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1PacksFilterSpec" + } + } + ], + "responses": { + "200": { + "description": "An array of pack summary items", + "schema": { + "$ref": "#/definitions/v1PackMetadataList" + } + } + } + } + }, + "/v1/packs/{packName}/registries/{registryUid}": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves a list of packs", + "operationId": "v1PacksNameRegistryUidList", + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1PackTagEntity" + } + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Pack registry uid", + "name": "registryUid", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Pack name", + "name": "packName", + "in": "path", + "required": true + }, + { + "type": "string", + "default": "all", + "description": "Pack cloud type", + "name": "cloudType", + "in": "query" + }, + { + "type": "string", + "description": "Pack layer", + "name": "layer", + "in": "query" + }, + { + "type": "string", + "description": "Comma seperated pack states. Example values are \"deprecated\" \"deprecated,disabled\". If states is not specified or empty then by default API will return all packs except \"disabled\" packs", + "name": "states", + "in": "query" + } + ] + }, + "/v1/packs/{packUid}/logo": { + "get": { + "produces": [ + "image/png", + "image/gif", + "image/jpeg" + ], + "tags": [ + "v1" + ], + "summary": "Returns the logo for a specified pack", + "operationId": "v1PacksPackUidLogo", + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "string", + "format": "binary" + }, + "headers": { + "Cache-Control": { + "type": "string", + "description": "Cache control directive for the response" + }, + "Expires": { + "type": "string" + } + } + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Pack uid", + "name": "packUid", + "in": "path", + "required": true + } + ] + }, + "/v1/packs/{uid}": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the specified pack", + "operationId": "v1PacksUid", + "responses": { + "200": { + "description": "A pack for the specified uid", + "schema": { + "$ref": "#/definitions/v1PackTagEntity" + } + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Pack uid", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/packs/{uid}/readme": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the readme of a specified pack", + "operationId": "v1PacksUidReadme", + "responses": { + "200": { + "description": "Readme describes the documentation of the specified pack", + "schema": { + "$ref": "#/definitions/v1PackReadme" + } + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Pack uid", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/pcg/selfHosted": { + "post": { + "tags": [ + "v1" + ], + "summary": "Returns the private gateway manifest link", + "operationId": "v1PcgSelfHosted", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1PcgSelfHostedParams" + } + } + ], + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1PcgServiceKubectlCommands" + } + } + } + } + }, + "/v1/pcg/{uid}/register": { + "post": { + "tags": [ + "v1" + ], + "summary": "Registers the pcg", + "operationId": "v1PcgUidRegister", + "parameters": [ + { + "name": "pairingCode", + "in": "body", + "schema": { + "$ref": "#/definitions/v1PairingCode" + } + }, + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "description": "Ok response without content", + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + } + }, + "/v1/pcg/{uid}/services/ally/manifest": { + "get": { + "produces": [ + "application/octet-stream" + ], + "tags": [ + "v1" + ], + "summary": "Returns the pcg ally manifest", + "operationId": "v1PcgUidAllyManifestGet", + "responses": { + "200": { + "description": "download file", + "schema": { + "type": "string", + "format": "binary" + }, + "headers": { + "Content-Disposition": { + "type": "string" + } + } + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/pcg/{uid}/services/jet/manifest": { + "get": { + "produces": [ + "application/octet-stream" + ], + "tags": [ + "v1" + ], + "summary": "Returns the pcg jet manifest", + "operationId": "v1PcgUidJetManifestGet", + "responses": { + "200": { + "description": "download file", + "schema": { + "type": "string", + "format": "binary" + }, + "headers": { + "Content-Disposition": { + "type": "string" + } + } + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/permissions": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves a list of permissions", + "operationId": "v1PermissionsList", + "parameters": [ + { + "enum": [ + "system", + "tenant", + "project", + "resource" + ], + "type": "string", + "name": "scope", + "in": "query" + } + ], + "responses": { + "200": { + "description": "An array of permissions", + "schema": { + "$ref": "#/definitions/v1Permissions" + } + } + } + } + }, + "/v1/projects": { + "post": { + "tags": [ + "v1" + ], + "summary": "Creates a project", + "operationId": "v1ProjectsCreate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1ProjectEntity" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + } + }, + "/v1/projects/alerts": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves a list of supported alerts for a project", + "operationId": "v1ProjectsAlerts", + "responses": { + "200": { + "description": "An array of alert components", + "schema": { + "$ref": "#/definitions/v1ProjectAlertComponents" + } + } + } + } + }, + "/v1/projects/{uid}": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the specified project", + "operationId": "v1ProjectsUidGet", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1Project" + } + } + } + }, + "put": { + "tags": [ + "v1" + ], + "summary": "Updates the specified project", + "operationId": "v1ProjectsUidUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1ProjectEntity" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "delete": { + "tags": [ + "v1" + ], + "summary": "Deletes the specified project", + "operationId": "v1ProjectsUidDelete", + "parameters": [ + { + "type": "boolean", + "name": "cleanupProjectResources", + "in": "query" + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1ProjectCleanup" + } + } + ], + "responses": { + "204": { + "description": "The resource was deleted successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/projects/{uid}/alerts/{component}": { + "put": { + "tags": [ + "v1" + ], + "summary": "Upsert the specified alert to the specified project", + "operationId": "v1ProjectsUidAlertUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1AlertEntity" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "post": { + "tags": [ + "v1" + ], + "summary": "Create the specified alert to the specified project", + "operationId": "v1ProjectsUidAlertCreate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1Channel" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + }, + "delete": { + "tags": [ + "v1" + ], + "summary": "Deletes the specified alert to the specified project", + "operationId": "v1ProjectsUidAlertDelete", + "responses": { + "204": { + "description": "The resource was deleted successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + }, + { + "type": "string", + "name": "component", + "in": "path", + "required": true + } + ] + }, + "/v1/projects/{uid}/alerts/{component}/{alertUid}": { + "get": { + "tags": [ + "v1" + ], + "summary": "Get the specified alert of the specified project", + "operationId": "v1ProjectsUidAlertsUidGet", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1Channel" + } + } + } + }, + "put": { + "tags": [ + "v1" + ], + "summary": "Update the specified alert of the specified project", + "operationId": "v1ProjectsUidAlertsUidUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1Channel" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "delete": { + "tags": [ + "v1" + ], + "summary": "Deletes the specified alert of the specified project", + "operationId": "v1ProjectsUidAlertsUidDelete", + "responses": { + "204": { + "description": "The resource was deleted successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + }, + { + "type": "string", + "name": "component", + "in": "path", + "required": true + }, + { + "type": "string", + "name": "alertUid", + "in": "path", + "required": true + } + ] + }, + "/v1/projects/{uid}/macros": { + "get": { + "tags": [ + "v1" + ], + "summary": "List the macros of the specified project", + "operationId": "v1ProjectsUidMacrosList", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1Macros" + } + } + } + }, + "put": { + "tags": [ + "v1" + ], + "summary": "Update the macros of the specified project", + "operationId": "v1ProjectsUidMacrosUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1Macros" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "post": { + "tags": [ + "v1" + ], + "summary": "Create or add new macros for the specified project", + "operationId": "v1ProjectsUidMacrosCreate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1Macros" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "delete": { + "tags": [ + "v1" + ], + "summary": "Delete the macros for the specified project by macro name", + "operationId": "v1ProjectsUidMacrosDeleteByMacroName", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1Macros" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "patch": { + "tags": [ + "v1" + ], + "summary": "Update the macros for the specified project by macro name", + "operationId": "v1ProjectsUidMacrosUpdateByMacroName", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1Macros" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/projects/{uid}/meta": { + "put": { + "tags": [ + "v1" + ], + "summary": "Update the metadata of the specified project", + "operationId": "v1ProjectsUidMetaUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1ObjectMeta" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/projects/{uid}/preferences/clusterSettings": { + "get": { + "tags": [ + "v1" + ], + "summary": "Get project cluster settings", + "operationId": "v1ProjectClusterSettingsGet", + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1ProjectClusterSettings" + } + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/projects/{uid}/preferences/clusterSettings/nodesAutoRemediationSetting": { + "put": { + "tags": [ + "v1" + ], + "summary": "Update project clusters nodes auto remediation setting", + "operationId": "v1ProjectClustersNodesAutoRemediationSettingUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1NodesAutoRemediationSettings" + } + } + ], + "responses": { + "204": { + "description": "Ok response without content", + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/projects/{uid}/teams": { + "put": { + "tags": [ + "v1" + ], + "summary": "Update the teams association to the specified project", + "operationId": "v1ProjectsUidTeamsUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1ProjectTeamsEntity" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/projects/{uid}/users": { + "put": { + "tags": [ + "v1" + ], + "summary": "Update the users association to the specified project", + "operationId": "v1ProjectsUidUsersUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1ProjectUsersEntity" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/projects/{uid}/validate": { + "delete": { + "tags": [ + "v1" + ], + "summary": "Validate and returns active resource of project before delete", + "operationId": "v1ProjectsUidValidate", + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1ProjectActiveResources" + } + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/registries/helm": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves a list of Helm registries", + "operationId": "v1RegistriesHelmList", + "parameters": [ + { + "type": "string", + "description": "Set of fields to be presented in the response with values. The fields are comma separated. Eg: metadata.uid,metadata.name", + "name": "fields", + "in": "query" + }, + { + "type": "string", + "description": "Filters can be combined with AND, OR operators with field path name. Eg: metadata.name=TestServiceANDspec.cloudType=aws\n\nServer will be restricted to certain fields based on the indexed data for each resource.", + "name": "filters", + "in": "query" + }, + { + "type": "string", + "description": "Specify the fields with sort order. 1 indicates ascending and -1 for descending. Eg: orderBy=metadata.name=1,metadata.uid=-1", + "name": "orderBy", + "in": "query" + }, + { + "type": "integer", + "format": "int64", + "default": 50, + "description": "limit is a maximum number of responses to return for a list call. Default and maximum value of the limit is 50.\nIf more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results.", + "name": "limit", + "in": "query" + }, + { + "type": "integer", + "format": "int64", + "description": "offset is the next index number from which the response will start. The response offset value can be used along with continue token for the pagination.", + "name": "offset", + "in": "query" + }, + { + "type": "string", + "description": "continue token to paginate the subsequent data items", + "name": "continue", + "in": "query" + } + ], + "responses": { + "200": { + "description": "An array of registry items", + "schema": { + "$ref": "#/definitions/v1HelmRegistries" + } + } + } + }, + "post": { + "tags": [ + "v1" + ], + "summary": "Creates a helm registry", + "operationId": "v1RegistriesHelmCreate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1HelmRegistryEntity" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + }, + "parameters": [ + { + "enum": [ + "system", + "tenant", + "all" + ], + "type": "string", + "default": "all", + "name": "scope", + "in": "query" + } + ] + }, + "/v1/registries/helm/summary": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves a list of helm registries as summary", + "operationId": "v1RegistriesHelmSummaryList", + "parameters": [ + { + "type": "string", + "description": "Set of fields to be presented in the response with values. The fields are comma separated. Eg: metadata.uid,metadata.name", + "name": "fields", + "in": "query" + }, + { + "type": "string", + "description": "Filters can be combined with AND, OR operators with field path name. Eg: metadata.name=TestServiceANDspec.cloudType=aws\n\nServer will be restricted to certain fields based on the indexed data for each resource.", + "name": "filters", + "in": "query" + }, + { + "type": "string", + "description": "Specify the fields with sort order. 1 indicates ascending and -1 for descending. Eg: orderBy=metadata.name=1,metadata.uid=-1", + "name": "orderBy", + "in": "query" + }, + { + "type": "integer", + "format": "int64", + "default": 50, + "description": "limit is a maximum number of responses to return for a list call. Default and maximum value of the limit is 50.\nIf more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results.", + "name": "limit", + "in": "query" + }, + { + "type": "integer", + "format": "int64", + "description": "offset is the next index number from which the response will start. The response offset value can be used along with continue token for the pagination.", + "name": "offset", + "in": "query" + }, + { + "type": "string", + "description": "continue token to paginate the subsequent data items", + "name": "continue", + "in": "query" + } + ], + "responses": { + "200": { + "description": "An array of registry items", + "schema": { + "$ref": "#/definitions/v1HelmRegistriesSummary" + } + } + } + }, + "parameters": [ + { + "enum": [ + "system", + "tenant", + "all" + ], + "type": "string", + "default": "all", + "name": "scope", + "in": "query" + } + ] + }, + "/v1/registries/helm/validate": { + "post": { + "description": "Returns no contents if helm registry is valid else error.", + "tags": [ + "v1" + ], + "summary": "Check if helm registry is valid", + "operationId": "V1RegistriesHelmValidate", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1HelmRegistrySpec" + } + } + ], + "responses": { + "204": { + "description": "Ok response without content", + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + } + }, + "/v1/registries/helm/{uid}": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the specified Helm registry", + "operationId": "v1RegistriesHelmUidGet", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1HelmRegistry" + } + } + } + }, + "put": { + "tags": [ + "v1" + ], + "summary": "Updates the specified helm registry", + "operationId": "v1RegistriesHelmUidUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1HelmRegistry" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "delete": { + "tags": [ + "v1" + ], + "summary": "Deletes the specified helm registry", + "operationId": "v1RegistriesHelmUidDelete", + "responses": { + "204": { + "description": "The resource was deleted successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/registries/helm/{uid}/sync": { + "post": { + "description": "Sync all the helm charts from the registry", + "tags": [ + "v1" + ], + "summary": "Sync Helm registry", + "operationId": "v1RegistriesHelmUidSync", + "responses": { + "202": { + "description": "Ok response without content", + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + }, + { + "type": "boolean", + "default": false, + "name": "forceSync", + "in": "query" + } + ] + }, + "/v1/registries/helm/{uid}/sync/status": { + "get": { + "description": "Get the sync status for the specified helm registry", + "tags": [ + "v1" + ], + "summary": "Get helm registry sync status", + "operationId": "v1RegistriesHelmUidSyncStatus", + "responses": { + "200": { + "description": "Helm registry sync status", + "schema": { + "$ref": "#/definitions/v1RegistrySyncStatus" + } + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/registries/metadata": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves a list of registries metadata", + "operationId": "v1RegistriesMetadata", + "responses": { + "200": { + "description": "An array of registry metadata items", + "schema": { + "$ref": "#/definitions/v1RegistriesMetadata" + } + } + } + }, + "parameters": [ + { + "enum": [ + "system", + "tenant", + "all" + ], + "type": "string", + "default": "all", + "name": "scope", + "in": "query" + } + ] + }, + "/v1/registries/oci/basic": { + "post": { + "tags": [ + "v1" + ], + "summary": "Creates a basic oci registry", + "operationId": "v1BasicOciRegistriesCreate", + "parameters": [ + { + "type": "boolean", + "default": false, + "name": "skipPackSync", + "in": "query" + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1BasicOciRegistry" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + } + }, + "/v1/registries/oci/basic/validate": { + "post": { + "description": "Returns no contents if oci registry is valid else error.", + "tags": [ + "v1" + ], + "summary": "Check if oci registry is valid", + "operationId": "v1BasicOciRegistriesValidate", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1BasicOciRegistrySpec" + } + } + ], + "responses": { + "204": { + "description": "Ok response without content", + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + } + }, + "/v1/registries/oci/ecr": { + "post": { + "tags": [ + "v1" + ], + "summary": "Creates a ecr registry", + "operationId": "v1EcrRegistriesCreate", + "parameters": [ + { + "type": "boolean", + "default": false, + "name": "skipPackSync", + "in": "query" + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1EcrRegistry" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + } + }, + "/v1/registries/oci/ecr/validate": { + "post": { + "description": "Returns no contents if ecr registry is valid else error.", + "tags": [ + "v1" + ], + "summary": "Check if ecr registry is valid", + "operationId": "v1EcrRegistriesValidate", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1EcrRegistrySpec" + } + } + ], + "responses": { + "204": { + "description": "Ok response without content", + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + } + }, + "/v1/registries/oci/image": { + "get": { + "tags": [ + "v1" + ], + "summary": "Creates a image registry", + "operationId": "v1OciImageRegistryGet", + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1OciImageRegistry" + } + } + } + } + }, + "/v1/registries/oci/summary": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves a oci registries summary", + "operationId": "v1OciRegistriesSummary", + "responses": { + "200": { + "description": "An array of oci registry items", + "schema": { + "$ref": "#/definitions/v1OciRegistries" + } + } + } + } + }, + "/v1/registries/oci/{uid}": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the information of specified oci registry", + "operationId": "v1OciRegistriesGet", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1OciRegistryEntity" + } + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + }, + { + "type": "string", + "name": "clusterUid", + "in": "query" + } + ] + }, + "/v1/registries/oci/{uid}/basic": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the basic oci registry", + "operationId": "v1BasicOciRegistriesUidGet", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1BasicOciRegistry" + } + } + } + }, + "put": { + "tags": [ + "v1" + ], + "summary": "Updates the specified basic oci registry", + "operationId": "v1BasicOciRegistriesUidUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1BasicOciRegistry" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "delete": { + "tags": [ + "v1" + ], + "summary": "Deletes the specified basic oci registry", + "operationId": "v1BasicOciRegistriesUidDelete", + "responses": { + "204": { + "description": "The resource was deleted successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/registries/oci/{uid}/basic/sync": { + "post": { + "description": "Sync all the content from the oci registry", + "tags": [ + "v1" + ], + "summary": "Sync oci registry", + "operationId": "v1BasicOciRegistriesUidSync", + "responses": { + "202": { + "description": "Ok response without content", + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + }, + { + "type": "boolean", + "default": false, + "name": "forceSync", + "in": "query" + } + ] + }, + "/v1/registries/oci/{uid}/basic/sync/status": { + "get": { + "description": "Get sync status for the oci specified registry", + "tags": [ + "v1" + ], + "summary": "Get oci registry sync status", + "operationId": "v1BasicOciRegistriesUidSyncStatus", + "responses": { + "200": { + "description": "Oci registry sync status", + "schema": { + "$ref": "#/definitions/v1RegistrySyncStatus" + } + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/registries/oci/{uid}/ecr": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the specified ecr registry", + "operationId": "v1EcrRegistriesUidGet", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1EcrRegistry" + } + } + } + }, + "put": { + "tags": [ + "v1" + ], + "summary": "Updates the specified ecr registry", + "operationId": "v1EcrRegistriesUidUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1EcrRegistry" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "delete": { + "tags": [ + "v1" + ], + "summary": "Deletes the specified ecr registry", + "operationId": "v1EcrRegistriesUidDelete", + "responses": { + "204": { + "description": "The resource was deleted successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/registries/oci/{uid}/ecr/sync": { + "post": { + "description": "Sync all the content from the ecr registry", + "tags": [ + "v1" + ], + "summary": "Sync ecr registry", + "operationId": "v1EcrRegistriesUidSync", + "responses": { + "202": { + "description": "Ok response without content", + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + }, + { + "type": "boolean", + "default": false, + "name": "forceSync", + "in": "query" + } + ] + }, + "/v1/registries/oci/{uid}/ecr/sync/status": { + "get": { + "description": "Get sync status for the ecr specified registry", + "tags": [ + "v1" + ], + "summary": "Get ecr registry sync status", + "operationId": "v1EcrRegistriesUidSyncStatus", + "responses": { + "200": { + "description": "Ecr registry sync status", + "schema": { + "$ref": "#/definitions/v1RegistrySyncStatus" + } + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/registries/pack": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves a list of Pack registries", + "operationId": "v1RegistriesPackList", + "parameters": [ + { + "type": "string", + "description": "Set of fields to be presented in the response with values. The fields are comma separated. Eg: metadata.uid,metadata.name", + "name": "fields", + "in": "query" + }, + { + "type": "string", + "description": "Filters can be combined with AND, OR operators with field path name. Eg: metadata.name=TestServiceANDspec.cloudType=aws\n\nServer will be restricted to certain fields based on the indexed data for each resource.", + "name": "filters", + "in": "query" + }, + { + "type": "string", + "description": "Specify the fields with sort order. 1 indicates ascending and -1 for descending. Eg: orderBy=metadata.name=1,metadata.uid=-1", + "name": "orderBy", + "in": "query" + }, + { + "type": "integer", + "format": "int64", + "default": 50, + "description": "limit is a maximum number of responses to return for a list call. Default and maximum value of the limit is 50.\nIf more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results.", + "name": "limit", + "in": "query" + }, + { + "type": "integer", + "format": "int64", + "description": "offset is the next index number from which the response will start. The response offset value can be used along with continue token for the pagination.", + "name": "offset", + "in": "query" + }, + { + "type": "string", + "description": "continue token to paginate the subsequent data items", + "name": "continue", + "in": "query" + } + ], + "responses": { + "200": { + "description": "An array of registry items", + "schema": { + "$ref": "#/definitions/v1PackRegistries" + } + } + } + }, + "post": { + "tags": [ + "v1" + ], + "summary": "Creates a pack registry", + "operationId": "v1RegistriesPackCreate", + "parameters": [ + { + "type": "boolean", + "default": false, + "name": "skipPackSync", + "in": "query" + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1PackRegistry" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + }, + "parameters": [ + { + "enum": [ + "system", + "tenant", + "all" + ], + "type": "string", + "default": "all", + "name": "scope", + "in": "query" + } + ] + }, + "/v1/registries/pack/summary": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves a list of pack registries as summary", + "operationId": "v1RegistriesPackSummaryList", + "parameters": [ + { + "type": "string", + "description": "Set of fields to be presented in the response with values. The fields are comma separated. Eg: metadata.uid,metadata.name", + "name": "fields", + "in": "query" + }, + { + "type": "string", + "description": "Filters can be combined with AND, OR operators with field path name. Eg: metadata.name=TestServiceANDspec.cloudType=aws\n\nServer will be restricted to certain fields based on the indexed data for each resource.", + "name": "filters", + "in": "query" + }, + { + "type": "string", + "description": "Specify the fields with sort order. 1 indicates ascending and -1 for descending. Eg: orderBy=metadata.name=1,metadata.uid=-1", + "name": "orderBy", + "in": "query" + }, + { + "type": "integer", + "format": "int64", + "default": 50, + "description": "limit is a maximum number of responses to return for a list call. Default and maximum value of the limit is 50.\nIf more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results.", + "name": "limit", + "in": "query" + }, + { + "type": "integer", + "format": "int64", + "description": "offset is the next index number from which the response will start. The response offset value can be used along with continue token for the pagination.", + "name": "offset", + "in": "query" + }, + { + "type": "string", + "description": "continue token to paginate the subsequent data items", + "name": "continue", + "in": "query" + } + ], + "responses": { + "200": { + "description": "An array of registry items", + "schema": { + "$ref": "#/definitions/v1PackRegistriesSummary" + } + } + } + }, + "parameters": [ + { + "enum": [ + "system", + "tenant", + "all" + ], + "type": "string", + "default": "all", + "name": "scope", + "in": "query" + } + ] + }, + "/v1/registries/pack/validate": { + "post": { + "description": "Returns no contents if pack registry is valid else error.", + "tags": [ + "v1" + ], + "summary": "Check if pack registry is valid", + "operationId": "V1RegistriesPackValidate", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1PackRegistrySpec" + } + } + ], + "responses": { + "204": { + "description": "Ok response without content", + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + } + }, + "/v1/registries/pack/{uid}": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the specified Pack registry", + "operationId": "v1RegistriesPackUidGet", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1PackRegistry" + } + } + } + }, + "put": { + "tags": [ + "v1" + ], + "summary": "Updates the specified pack registry", + "operationId": "v1RegistriesPackUidUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1PackRegistry" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "delete": { + "tags": [ + "v1" + ], + "summary": "Deletes the specified pack registry", + "operationId": "v1RegistriesPackUidDelete", + "responses": { + "204": { + "description": "The resource was deleted successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/registries/pack/{uid}/sync": { + "post": { + "description": "Sync all the packs from the registry", + "tags": [ + "v1" + ], + "summary": "Sync Pack registry", + "operationId": "v1RegistriesPackUidSync", + "responses": { + "202": { + "description": "Ok response without content", + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + }, + { + "type": "boolean", + "default": false, + "name": "forceSync", + "in": "query" + } + ] + }, + "/v1/registries/pack/{uid}/sync/status": { + "get": { + "description": "Get sync status for the pack specified registry", + "tags": [ + "v1" + ], + "summary": "Get pack registry sync status", + "operationId": "v1RegistriesPackUidSyncStatus", + "responses": { + "200": { + "description": "Pack registry sync status", + "schema": { + "$ref": "#/definitions/v1RegistrySyncStatus" + } + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/registries/{registryName}/config": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the specified system scope registry configuration", + "operationId": "v1RegistriesNameConfigGet", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1RegistryConfigEntity" + } + } + } + }, + "parameters": [ + { + "type": "string", + "name": "registryName", + "in": "path", + "required": true + } + ] + }, + "/v1/registries/{uid}": { + "delete": { + "tags": [ + "v1" + ], + "summary": "Deletes the specified registry", + "operationId": "v1RegistriesUidDelete", + "responses": { + "204": { + "description": "The resource was deleted successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/roles": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves a list of roles", + "operationId": "v1RolesList", + "parameters": [ + { + "type": "string", + "description": "Set of fields to be presented in the response with values. The fields are comma separated. Eg: metadata.uid,metadata.name", + "name": "fields", + "in": "query" + }, + { + "type": "string", + "description": "Filters can be combined with AND, OR operators with field path name. Eg: metadata.name=TestServiceANDspec.cloudType=aws\n\nServer will be restricted to certain fields based on the indexed data for each resource.", + "name": "filters", + "in": "query" + }, + { + "type": "string", + "description": "Specify the fields with sort order. 1 indicates ascending and -1 for descending. Eg: orderBy=metadata.name=1,metadata.uid=-1", + "name": "orderBy", + "in": "query" + }, + { + "type": "integer", + "format": "int64", + "default": 50, + "description": "limit is a maximum number of responses to return for a list call. Default and maximum value of the limit is 50.\nIf more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results.", + "name": "limit", + "in": "query" + }, + { + "type": "integer", + "format": "int64", + "description": "offset is the next index number from which the response will start. The response offset value can be used along with continue token for the pagination.", + "name": "offset", + "in": "query" + }, + { + "type": "string", + "description": "continue token to paginate the subsequent data items", + "name": "continue", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1Roles" + } + } + } + }, + "post": { + "tags": [ + "v1" + ], + "summary": "Creates a role with specified permissions", + "operationId": "v1RolesCreate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1Role" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + } + }, + "/v1/roles/{uid}": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the specified role", + "operationId": "v1RolesUidGet", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1Role" + } + } + } + }, + "put": { + "tags": [ + "v1" + ], + "summary": "Updates the specified role", + "operationId": "v1RolesUidUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1Role" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "delete": { + "tags": [ + "v1" + ], + "summary": "Deletes the specified role", + "operationId": "v1RolesUidDelete", + "responses": { + "204": { + "description": "The resource was deleted successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/roles/{uid}/clone": { + "post": { + "tags": [ + "v1" + ], + "summary": "Clone the role", + "operationId": "v1RolesClone", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1RoleClone" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/services/{serviceName}/version": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns a latest version for a given service name", + "operationId": "v1ServiceVersionGet", + "parameters": [ + { + "enum": [ + "ally", + "jet", + "palette", + "ambit", + "ally-lite", + "palette-lite", + "crony", + "tick", + "edge", + "lodge", + "level", + "edgeconfig", + "firth", + "stylus" + ], + "type": "string", + "description": "service name", + "name": "serviceName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "spectro cluster uid", + "name": "clusterUid", + "in": "query" + }, + { + "type": "string", + "description": "edge host uid", + "name": "edgeHostUid", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1ServiceVersion" + } + } + } + } + }, + "/v1/services/{serviceName}/versions/{version}/manifest": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns a service manifest for a given service name and version", + "operationId": "v1ServiceManifestGet", + "parameters": [ + { + "enum": [ + "ally", + "jet", + "palette", + "ambit", + "ally-lite", + "palette-lite", + "crony", + "tick", + "edge", + "lodge", + "level", + "edgeconfig", + "firth", + "stylus" + ], + "type": "string", + "description": "service name", + "name": "serviceName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "service version", + "name": "version", + "in": "path", + "required": true + }, + { + "enum": [ + "apply", + "delete", + "resources" + ], + "type": "string", + "description": "action type", + "name": "action", + "in": "query", + "required": true + }, + { + "type": "string", + "description": "resource file name", + "name": "resourceFilename", + "in": "query" + }, + { + "type": "string", + "description": "spectro cluster uid", + "name": "clusterUid", + "in": "query" + }, + { + "type": "string", + "description": "edge host uid", + "name": "edgeHostUid", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1ServiceManifest" + } + } + } + } + }, + "/v1/spectroclusters/aks": { + "post": { + "tags": [ + "v1" + ], + "summary": "Creates an AKS cluster", + "operationId": "v1SpectroClustersAksCreate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1SpectroAzureClusterEntity" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + } + }, + "/v1/spectroclusters/aks/rate": { + "post": { + "tags": [ + "v1" + ], + "summary": "Get AKS cluster estimated rate information", + "operationId": "v1SpectroClustersAksRate", + "parameters": [ + { + "enum": [ + "hourly", + "monthly", + "yearly" + ], + "type": "string", + "default": "hourly", + "name": "periodType", + "in": "query" + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1SpectroAzureClusterRateEntity" + } + } + ], + "responses": { + "200": { + "description": "Aks Cluster estimated rate response", + "schema": { + "$ref": "#/definitions/v1SpectroClusterRate" + } + } + } + } + }, + "/v1/spectroclusters/aks/validate": { + "post": { + "tags": [ + "v1" + ], + "summary": "Validates AKS cluster create operation", + "operationId": "v1SpectroClustersAksValidate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1SpectroAzureClusterEntity" + } + } + ], + "responses": { + "200": { + "description": "Aks Cluster validation response", + "schema": { + "$ref": "#/definitions/v1SpectroClusterValidatorResponse" + } + } + } + } + }, + "/v1/spectroclusters/aws": { + "post": { + "tags": [ + "v1" + ], + "summary": "Creates an AWS cluster", + "operationId": "v1SpectroClustersAwsCreate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1SpectroAwsClusterEntity" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + } + }, + "/v1/spectroclusters/aws/import": { + "post": { + "tags": [ + "v1" + ], + "summary": "Imports an AWS cluster", + "operationId": "v1SpectroClustersAwsImport", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1SpectroAwsClusterImportEntity" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + } + }, + "/v1/spectroclusters/aws/rate": { + "post": { + "tags": [ + "v1" + ], + "summary": "Get AWS cluster estimated rate information", + "operationId": "v1SpectroClustersAwsRate", + "parameters": [ + { + "enum": [ + "hourly", + "monthly", + "yearly" + ], + "type": "string", + "default": "hourly", + "name": "periodType", + "in": "query" + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1SpectroAwsClusterRateEntity" + } + } + ], + "responses": { + "200": { + "description": "Aws Cluster estimated rate response", + "schema": { + "$ref": "#/definitions/v1SpectroClusterRate" + } + } + } + } + }, + "/v1/spectroclusters/aws/validate": { + "post": { + "tags": [ + "v1" + ], + "summary": "Validates AWS cluster create operation", + "operationId": "v1SpectroClustersAwsValidate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1SpectroAwsClusterEntity" + } + } + ], + "responses": { + "200": { + "description": "Aws Cluster validation response", + "schema": { + "$ref": "#/definitions/v1SpectroClusterValidatorResponse" + } + } + } + } + }, + "/v1/spectroclusters/azure": { + "post": { + "tags": [ + "v1" + ], + "summary": "Creates an Azure cluster", + "operationId": "v1SpectroClustersAzureCreate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1SpectroAzureClusterEntity" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + } + }, + "/v1/spectroclusters/azure/import": { + "post": { + "tags": [ + "v1" + ], + "summary": "Imports an Azure cluster", + "operationId": "v1SpectroClustersAzureImport", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1SpectroAzureClusterImportEntity" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + } + }, + "/v1/spectroclusters/azure/rate": { + "post": { + "tags": [ + "v1" + ], + "summary": "Get Azure cluster estimated rate information", + "operationId": "v1SpectroClustersAzureRate", + "parameters": [ + { + "enum": [ + "hourly", + "monthly", + "yearly" + ], + "type": "string", + "default": "hourly", + "name": "periodType", + "in": "query" + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1SpectroAzureClusterRateEntity" + } + } + ], + "responses": { + "200": { + "description": "Azure Cluster estimated rate response", + "schema": { + "$ref": "#/definitions/v1SpectroClusterRate" + } + } + } + } + }, + "/v1/spectroclusters/azure/validate": { + "post": { + "tags": [ + "v1" + ], + "summary": "Validates Azure cluster create operation", + "operationId": "v1SpectroClustersAzureValidate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1SpectroAzureClusterEntity" + } + } + ], + "responses": { + "200": { + "description": "Azure Cluster validation response", + "schema": { + "$ref": "#/definitions/v1SpectroClusterValidatorResponse" + } + } + } + } + }, + "/v1/spectroclusters/cloudTypes/{cloudType}": { + "post": { + "tags": [ + "v1" + ], + "summary": "Creates a Custom cluster", + "operationId": "v1SpectroClustersCustomCreate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1SpectroCustomClusterEntity" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster's cloud type", + "name": "cloudType", + "in": "path", + "required": true + } + ] + }, + "/v1/spectroclusters/cloudTypes/{cloudType}/validate": { + "post": { + "tags": [ + "v1" + ], + "summary": "Validates Custom cluster create operation", + "operationId": "v1SpectroClustersCustomValidate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1SpectroCustomClusterEntity" + } + } + ], + "responses": { + "200": { + "description": "Custom Cluster validation response", + "schema": { + "$ref": "#/definitions/v1SpectroClusterValidatorResponse" + } + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster's cloud type", + "name": "cloudType", + "in": "path", + "required": true + } + ] + }, + "/v1/spectroclusters/config/edgeInstaller": { + "get": { + "tags": [ + "v1" + ], + "summary": "Cluster configuration for the edge installer", + "operationId": "v1SpectroClustersConfigEdgeInstaller", + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1ClusterEdgeInstallerConfig" + } + } + } + } + }, + "/v1/spectroclusters/edge-native": { + "post": { + "tags": [ + "v1" + ], + "summary": "Creates an EdgeNative cluster", + "operationId": "v1SpectroClustersEdgeNativeCreate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1SpectroEdgeNativeClusterEntity" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + } + }, + "/v1/spectroclusters/edge-native/import": { + "post": { + "tags": [ + "v1" + ], + "summary": "Imports an EdgeNative cluster", + "operationId": "v1SpectroClustersEdgeNativeImport", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1SpectroEdgeNativeClusterImportEntity" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + } + }, + "/v1/spectroclusters/edge-native/rate": { + "post": { + "tags": [ + "v1" + ], + "summary": "Get edge-native cluster estimated rate information", + "operationId": "v1SpectroClustersEdgeNativeRate", + "parameters": [ + { + "enum": [ + "hourly", + "monthly", + "yearly" + ], + "type": "string", + "default": "hourly", + "name": "periodType", + "in": "query" + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1SpectroEdgeNativeClusterRateEntity" + } + } + ], + "responses": { + "200": { + "description": "EdgeNative Cluster estimated rate response", + "schema": { + "$ref": "#/definitions/v1SpectroClusterRate" + } + } + } + } + }, + "/v1/spectroclusters/edge-native/validate": { + "post": { + "tags": [ + "v1" + ], + "summary": "Validates edge-native cluster create operation", + "operationId": "v1SpectroClustersEdgeNativeValidate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1SpectroEdgeNativeClusterEntity" + } + } + ], + "responses": { + "200": { + "description": "EdgeNative Cluster validation response", + "schema": { + "$ref": "#/definitions/v1SpectroClusterValidatorResponse" + } + } + } + } + }, + "/v1/spectroclusters/eks": { + "post": { + "tags": [ + "v1" + ], + "summary": "Creates an EKS cluster", + "operationId": "v1SpectroClustersEksCreate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1SpectroEksClusterEntity" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + } + }, + "/v1/spectroclusters/eks/rate": { + "post": { + "tags": [ + "v1" + ], + "summary": "Get EKS cluster estimated rate information", + "operationId": "v1SpectroClustersEksRate", + "parameters": [ + { + "enum": [ + "hourly", + "monthly", + "yearly" + ], + "type": "string", + "default": "hourly", + "name": "periodType", + "in": "query" + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1SpectroEksClusterRateEntity" + } + } + ], + "responses": { + "200": { + "description": "Eks Cluster estimated rate response", + "schema": { + "$ref": "#/definitions/v1SpectroClusterRate" + } + } + } + } + }, + "/v1/spectroclusters/eks/validate": { + "post": { + "tags": [ + "v1" + ], + "summary": "Validates EKS cluster create operation", + "operationId": "v1SpectroClustersEksValidate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1SpectroEksClusterEntity" + } + } + ], + "responses": { + "200": { + "description": "Eks Cluster validation response", + "schema": { + "$ref": "#/definitions/v1SpectroClusterValidatorResponse" + } + } + } + } + }, + "/v1/spectroclusters/features/backup/locations/{uid}": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the cluster object references based on locationUid", + "operationId": "V1ClusterFeatureBackupLocationUidGet", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1ClusterRefs" + } + } + } + }, + "put": { + "tags": [ + "v1" + ], + "summary": "Change cluster backup location", + "operationId": "V1ClusterFeatureBackupLocationUidChange", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1ClusterBackupLocationType" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/spectroclusters/features/logFetcher/{uid}/download": { + "get": { + "produces": [ + "application/octet-stream" + ], + "tags": [ + "v1" + ], + "summary": "Download log fetcher logs for cluster by log fetcher uid", + "operationId": "v1ClusterFeatureLogFetcherLogDownload", + "parameters": [ + { + "type": "string", + "name": "fileName", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "file" + }, + "headers": { + "Content-Disposition": { + "type": "string" + }, + "Content-Type": { + "type": "string" + } + } + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster uid for which log is requested", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/spectroclusters/features/logFetcher/{uid}/log": { + "post": { + "consumes": [ + "multipart/form-data" + ], + "tags": [ + "v1" + ], + "summary": "Update log fetcher logs by log fetcher uid", + "operationId": "v1ClusterFeatureLogFetcherLogUpdate", + "parameters": [ + { + "type": "file", + "description": "Log file by agent", + "name": "fileName", + "in": "formData" + }, + { + "type": "string", + "description": "Unique request Id", + "name": "requestId", + "in": "query" + } + ], + "responses": { + "204": { + "description": "Ok response without content", + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster uid for which log is requested", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/spectroclusters/gcp": { + "post": { + "tags": [ + "v1" + ], + "summary": "Creates a GCP cluster", + "operationId": "v1SpectroClustersGcpCreate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1SpectroGcpClusterEntity" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + } + }, + "/v1/spectroclusters/gcp/import": { + "post": { + "tags": [ + "v1" + ], + "summary": "Imports a GCP cluster", + "operationId": "v1SpectroClustersGcpImport", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1SpectroGcpClusterImportEntity" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + } + }, + "/v1/spectroclusters/gcp/rate": { + "post": { + "tags": [ + "v1" + ], + "summary": "Get GCP cluster estimated rate information", + "operationId": "v1SpectroClustersGcpRate", + "parameters": [ + { + "enum": [ + "hourly", + "monthly", + "yearly" + ], + "type": "string", + "default": "hourly", + "name": "periodType", + "in": "query" + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1SpectroGcpClusterRateEntity" + } + } + ], + "responses": { + "200": { + "description": "Gcp Cluster estimated rate response", + "schema": { + "$ref": "#/definitions/v1SpectroClusterRate" + } + } + } + } + }, + "/v1/spectroclusters/gcp/validate": { + "post": { + "tags": [ + "v1" + ], + "summary": "Validates GCP cluster create operation", + "operationId": "v1SpectroClustersGcpValidate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1SpectroGcpClusterEntity" + } + } + ], + "responses": { + "200": { + "description": "Gcp Cluster validation response", + "schema": { + "$ref": "#/definitions/v1SpectroClusterValidatorResponse" + } + } + } + } + }, + "/v1/spectroclusters/generic/import": { + "post": { + "description": "The machines information will be captured, whereas the cloud specific configuration info will not be retrieved", + "tags": [ + "v1" + ], + "summary": "Imports a cluster of any cloud type in generic way", + "operationId": "v1SpectroClustersGenericImport", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1SpectroGenericClusterImportEntity" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + } + }, + "/v1/spectroclusters/generic/rate": { + "post": { + "tags": [ + "v1" + ], + "summary": "Get generic cluster estimated rate information", + "operationId": "v1SpectroClustersGenericRate", + "parameters": [ + { + "enum": [ + "hourly", + "monthly", + "yearly" + ], + "type": "string", + "default": "hourly", + "name": "periodType", + "in": "query" + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1SpectroGenericClusterRateEntity" + } + } + ], + "responses": { + "200": { + "description": "Genric Cluster estimated rate response", + "schema": { + "$ref": "#/definitions/v1SpectroClusterRate" + } + } + } + } + }, + "/v1/spectroclusters/gke": { + "post": { + "tags": [ + "v1" + ], + "summary": "Creates an GKE cluster", + "operationId": "v1SpectroClustersGkeCreate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1SpectroGcpClusterEntity" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + } + }, + "/v1/spectroclusters/gke/rate": { + "post": { + "tags": [ + "v1" + ], + "summary": "Get GKE cluster estimated rate information", + "operationId": "v1SpectroClustersGkeRate", + "parameters": [ + { + "enum": [ + "hourly", + "monthly", + "yearly" + ], + "type": "string", + "default": "hourly", + "name": "periodType", + "in": "query" + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1SpectroGcpClusterRateEntity" + } + } + ], + "responses": { + "200": { + "description": "Gke Cluster estimated rate response", + "schema": { + "$ref": "#/definitions/v1SpectroClusterRate" + } + } + } + } + }, + "/v1/spectroclusters/gke/validate": { + "post": { + "tags": [ + "v1" + ], + "summary": "Validates GKE cluster create operation", + "operationId": "v1SpectroClustersGkeValidate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1SpectroGcpClusterEntity" + } + } + ], + "responses": { + "200": { + "description": "Gke Cluster validation response", + "schema": { + "$ref": "#/definitions/v1SpectroClusterValidatorResponse" + } + } + } + } + }, + "/v1/spectroclusters/maas": { + "post": { + "tags": [ + "v1" + ], + "summary": "Creates a MAAS cluster", + "operationId": "v1SpectroClustersMaasCreate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1SpectroMaasClusterEntity" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + } + }, + "/v1/spectroclusters/maas/import": { + "post": { + "tags": [ + "v1" + ], + "summary": "Imports a Maas cluster", + "operationId": "v1SpectroClustersMaasImport", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1SpectroMaasClusterImportEntity" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + } + }, + "/v1/spectroclusters/maas/rate": { + "post": { + "tags": [ + "v1" + ], + "summary": "Get maas cluster estimated rate information", + "operationId": "v1SpectroClustersMaasRate", + "parameters": [ + { + "enum": [ + "hourly", + "monthly", + "yearly" + ], + "type": "string", + "default": "hourly", + "name": "periodType", + "in": "query" + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1SpectroMaasClusterRateEntity" + } + } + ], + "responses": { + "200": { + "description": "Maas Cluster estimated rate response", + "schema": { + "$ref": "#/definitions/v1SpectroClusterRate" + } + } + } + } + }, + "/v1/spectroclusters/maas/validate": { + "post": { + "tags": [ + "v1" + ], + "summary": "Validates MAAS cluster create operation", + "operationId": "v1SpectroClustersMaasValidate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1SpectroMaasClusterEntity" + } + } + ], + "responses": { + "200": { + "description": "Maas Cluster validation response", + "schema": { + "$ref": "#/definitions/v1SpectroClusterValidatorResponse" + } + } + } + } + }, + "/v1/spectroclusters/openstack": { + "post": { + "tags": [ + "v1" + ], + "summary": "Creates a OpenStack cluster", + "operationId": "v1SpectroClustersOpenStackCreate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1SpectroOpenStackClusterEntity" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + } + }, + "/v1/spectroclusters/openstack/import": { + "post": { + "tags": [ + "v1" + ], + "summary": "Imports an OpenStack cluster", + "operationId": "v1SpectroClustersOpenStackImport", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1SpectroOpenStackClusterImportEntity" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + } + }, + "/v1/spectroclusters/openstack/rate": { + "post": { + "tags": [ + "v1" + ], + "summary": "Get openstack cluster estimated rate information", + "operationId": "v1SpectroClustersOpenStackRate", + "parameters": [ + { + "enum": [ + "hourly", + "monthly", + "yearly" + ], + "type": "string", + "default": "hourly", + "name": "periodType", + "in": "query" + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1SpectroOpenStackClusterRateEntity" + } + } + ], + "responses": { + "200": { + "description": "Openstack Cluster estimated rate response", + "schema": { + "$ref": "#/definitions/v1SpectroClusterRate" + } + } + } + } + }, + "/v1/spectroclusters/openstack/validate": { + "post": { + "tags": [ + "v1" + ], + "summary": "Validates OpenStack cluster create operation", + "operationId": "v1SpectroClustersOpenStackValidate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1SpectroOpenStackClusterEntity" + } + } + ], + "responses": { + "200": { + "description": "vSphere Cluster validation response", + "schema": { + "$ref": "#/definitions/v1SpectroClusterValidatorResponse" + } + } + } + } + }, + "/v1/spectroclusters/spc/download": { + "post": { + "produces": [ + "application/octet-stream" + ], + "tags": [ + "v1" + ], + "summary": "Downloads the cluster definition archive file", + "operationId": "v1SpectroClustersSpcDownload", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1ClusterDefinitionEntity" + } + } + ], + "responses": { + "200": { + "description": "Cluster definition archive file", + "schema": { + "type": "string", + "format": "binary" + }, + "headers": { + "Content-Disposition": { + "type": "string" + } + } + } + } + } + }, + "/v1/spectroclusters/tke": { + "post": { + "tags": [ + "v1" + ], + "summary": "Creates a Tke cluster", + "operationId": "v1SpectroClustersTkeCreate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1SpectroTencentClusterEntity" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + } + }, + "/v1/spectroclusters/tke/rate": { + "post": { + "tags": [ + "v1" + ], + "summary": "Get TKE cluster estimated rate information", + "operationId": "v1SpectroClustersTkeRate", + "parameters": [ + { + "enum": [ + "hourly", + "monthly", + "yearly" + ], + "type": "string", + "default": "hourly", + "name": "periodType", + "in": "query" + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1SpectroTencentClusterRateEntity" + } + } + ], + "responses": { + "200": { + "description": "Tke Cluster estimated rate response", + "schema": { + "$ref": "#/definitions/v1SpectroClusterRate" + } + } + } + } + }, + "/v1/spectroclusters/tke/validate": { + "post": { + "tags": [ + "v1" + ], + "summary": "Validates TKE cluster create operation", + "operationId": "v1SpectroClustersTkeValidate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1SpectroTencentClusterEntity" + } + } + ], + "responses": { + "200": { + "description": "Tke Cluster validation response", + "schema": { + "$ref": "#/definitions/v1SpectroClusterValidatorResponse" + } + } + } + } + }, + "/v1/spectroclusters/upgrade/settings": { + "get": { + "tags": [ + "v1" + ], + "summary": "Get cluster settings by context", + "operationId": "v1SpectroClustersUpgradeSettingsGet", + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1ClusterUpgradeSettingsEntity" + } + } + } + }, + "post": { + "tags": [ + "v1" + ], + "summary": "Update all clusters upgrade settings", + "operationId": "v1SpectroClustersUpgradeSettings", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1ClusterUpgradeSettingsEntity" + } + } + ], + "responses": { + "204": { + "description": "Ok response without content", + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + } + }, + "/v1/spectroclusters/validate/name": { + "get": { + "tags": [ + "v1" + ], + "summary": "Validates the cluster name", + "operationId": "v1SpectroClustersValidateName", + "parameters": [ + { + "type": "string", + "description": "Cluster name", + "name": "name", + "in": "query" + } + ], + "responses": { + "204": { + "description": "Ok response without content", + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + } + }, + "/v1/spectroclusters/validate/packs": { + "post": { + "tags": [ + "v1" + ], + "summary": "Validates spectro cluster packs", + "operationId": "v1SpectroClustersValidatePacks", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1SpectroClusterPacksEntity" + } + } + ], + "responses": { + "200": { + "description": "Cluster packs validation response", + "schema": { + "$ref": "#/definitions/v1SpectroClusterValidatorResponse" + } + } + } + } + }, + "/v1/spectroclusters/virtual": { + "post": { + "tags": [ + "v1" + ], + "summary": "Creates a virtual cluster", + "operationId": "v1SpectroClustersVirtualCreate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1SpectroVirtualClusterEntity" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + } + }, + "/v1/spectroclusters/virtual/packs/values": { + "get": { + "tags": [ + "v1" + ], + "summary": "Get the cluster pack values yaml", + "operationId": "v1VirtualClustersPacksValues", + "parameters": [ + { + "enum": [ + "k3s", + "cncf_k8s" + ], + "type": "string", + "default": "k3s", + "description": "Kubernetes distribution type", + "name": "kubernetesDistroType", + "in": "query" + } + ], + "responses": { + "200": { + "description": "Successful response", + "schema": { + "$ref": "#/definitions/v1ClusterVirtualPacksValues" + } + } + } + } + }, + "/v1/spectroclusters/virtual/validate": { + "post": { + "tags": [ + "v1" + ], + "summary": "Validates virtual cluster create operation", + "operationId": "v1SpectroClustersVirtualValidate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1SpectroVirtualClusterEntity" + } + } + ], + "responses": { + "200": { + "description": "Virtual Cluster validation response", + "schema": { + "$ref": "#/definitions/v1SpectroClusterValidatorResponse" + } + } + } + } + }, + "/v1/spectroclusters/vsphere": { + "post": { + "tags": [ + "v1" + ], + "summary": "Creates a vSphere cluster", + "operationId": "v1SpectroClustersVsphereCreate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1SpectroVsphereClusterEntity" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + } + }, + "/v1/spectroclusters/vsphere/import": { + "post": { + "tags": [ + "v1" + ], + "summary": "Imports a vSphere cluster", + "operationId": "v1SpectroClustersVsphereImport", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1SpectroVsphereClusterImportEntity" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + } + }, + "/v1/spectroclusters/vsphere/rate": { + "post": { + "tags": [ + "v1" + ], + "summary": "Get vSphere cluster estimated rate information", + "operationId": "v1SpectroClustersVsphereRate", + "parameters": [ + { + "enum": [ + "hourly", + "monthly", + "yearly" + ], + "type": "string", + "default": "hourly", + "name": "periodType", + "in": "query" + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1SpectroVsphereClusterRateEntity" + } + } + ], + "responses": { + "200": { + "description": "Vsphere Cluster estimated rate response", + "schema": { + "$ref": "#/definitions/v1SpectroClusterRate" + } + } + } + } + }, + "/v1/spectroclusters/vsphere/validate": { + "post": { + "tags": [ + "v1" + ], + "summary": "Validates vSphere cluster create operation", + "operationId": "v1SpectroClustersVsphereValidate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1SpectroVsphereClusterEntity" + } + } + ], + "responses": { + "200": { + "description": "vSphere Cluster validation response", + "schema": { + "$ref": "#/definitions/v1SpectroClusterValidatorResponse" + } + } + } + } + }, + "/v1/spectroclusters/{uid}": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the specified cluster", + "operationId": "v1SpectroClustersGet", + "parameters": [ + { + "type": "string", + "description": "Comma separated tags like system,profile", + "name": "includeTags", + "in": "query" + }, + { + "type": "boolean", + "default": false, + "description": "Resolve pack values if set to true", + "name": "resolvePackValues", + "in": "query" + }, + { + "type": "string", + "description": "Includes pack meta such as schema, presets", + "name": "includePackMeta", + "in": "query" + }, + { + "type": "string", + "description": "Filter cluster profile templates by profileType", + "name": "profileType", + "in": "query" + }, + { + "type": "boolean", + "default": false, + "description": "Include non spectro labels in the cluster labels if set to true", + "name": "includeNonSpectroLabels", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1SpectroCluster" + } + } + } + }, + "delete": { + "tags": [ + "v1" + ], + "summary": "Deletes the specified cluster", + "operationId": "v1SpectroClustersDelete", + "parameters": [ + { + "type": "boolean", + "description": "If set to true the cluster will be force deleted and user has to manually clean up the provisioned cloud resources", + "name": "forceDelete", + "in": "query" + } + ], + "responses": { + "204": { + "description": "The resource was deleted successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster uid", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/spectroclusters/{uid}/assets": { + "get": { + "tags": [ + "v1" + ], + "summary": "Get the cluster asset doc", + "operationId": "v1SpectroClustersUidAssetsGet", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1SpectroClusterAssetEntity" + } + } + } + }, + "post": { + "tags": [ + "v1" + ], + "summary": "Associate the assets for the cluster", + "operationId": "v1SpectroClustersUidAssets", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1SpectroClusterAssetEntity" + } + } + ], + "responses": { + "204": { + "description": "Ok response without content", + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/spectroclusters/{uid}/assets/adminKubeconfig": { + "get": { + "produces": [ + "application/octet-stream" + ], + "tags": [ + "v1" + ], + "summary": "Returns the specified cluster's kube config file", + "operationId": "v1SpectroClustersUidAdminKubeConfig", + "responses": { + "200": { + "description": "download file", + "schema": { + "type": "string", + "format": "binary" + }, + "headers": { + "Content-Disposition": { + "type": "string" + } + } + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster uid", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/spectroclusters/{uid}/assets/frpKubeconfig": { + "get": { + "produces": [ + "application/octet-stream" + ], + "tags": [ + "v1" + ], + "summary": "Returns the specified cluster's frp kube config file", + "operationId": "v1SpectroClustersUidFrpKubeConfigGet", + "responses": { + "200": { + "description": "download file", + "schema": { + "type": "string", + "format": "binary" + }, + "headers": { + "Content-Disposition": { + "type": "string" + } + } + } + } + }, + "put": { + "tags": [ + "v1" + ], + "summary": "Updates the cluster's frp kube config data", + "operationId": "v1SpectroClustersUidFrpKubeConfigUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1SpectroClusterAssetFrpKubeConfig" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "delete": { + "tags": [ + "v1" + ], + "summary": "Deletes the cluster's frp kube config client data", + "operationId": "v1SpectroClustersUidFrpKubeConfigDelete", + "responses": { + "204": { + "description": "The resource was deleted successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster uid", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/spectroclusters/{uid}/assets/kubeconfig": { + "get": { + "produces": [ + "application/octet-stream" + ], + "tags": [ + "v1" + ], + "summary": "Returns the specified cluster's kube config file", + "operationId": "v1SpectroClustersUidKubeConfig", + "parameters": [ + { + "type": "boolean", + "default": true, + "description": "FRP (reverse-proxy) based kube config will be returned if available", + "name": "frp", + "in": "query" + } + ], + "responses": { + "200": { + "description": "download file", + "schema": { + "type": "string", + "format": "binary" + }, + "headers": { + "Content-Disposition": { + "type": "string" + } + } + } + } + }, + "put": { + "tags": [ + "v1" + ], + "summary": "Updates the cluster's manifest data", + "operationId": "v1SpectroClustersUidKubeConfigUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1SpectroClusterAssetKubeConfig" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster uid", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/spectroclusters/{uid}/assets/kubeconfigclient": { + "get": { + "produces": [ + "application/octet-stream" + ], + "tags": [ + "v1" + ], + "summary": "Returns the specified cluster's kube config client file", + "operationId": "v1SpectroClustersUidKubeConfigClientGet", + "responses": { + "200": { + "description": "download file", + "schema": { + "type": "string", + "format": "binary" + }, + "headers": { + "Content-Disposition": { + "type": "string" + } + } + } + } + }, + "put": { + "tags": [ + "v1" + ], + "summary": "Updates the cluster's kube config client data", + "operationId": "v1SpectroClustersUidKubeConfigClientUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1SpectroClusterAssetKubeConfigClient" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "delete": { + "tags": [ + "v1" + ], + "summary": "Deletes the cluster's kube config client data", + "operationId": "v1SpectroClustersUidKubeConfigClientDelete", + "responses": { + "204": { + "description": "The resource was deleted successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster uid", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/spectroclusters/{uid}/assets/manifest": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the specified cluster's manifest data", + "operationId": "v1SpectroClustersUidManifestGet", + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "string" + } + } + } + }, + "put": { + "tags": [ + "v1" + ], + "summary": "Updates the specified cluster's manifest data", + "operationId": "v1SpectroClustersUidManifestUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1SpectroClusterAssetManifest" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster uid", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/spectroclusters/{uid}/clusterConfig/clusterMetaAttribute": { + "patch": { + "tags": [ + "v1" + ], + "summary": "Updates the specified cluster meta attribute", + "operationId": "v1SpectroClustersUidClusterMetaAttributeUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1ClusterMetaAttributeEntity" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster uid", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/spectroclusters/{uid}/clusterConfig/controlPlaneHealthCheckTimeout": { + "patch": { + "tags": [ + "v1" + ], + "summary": "Updates the specified cluster controlPlane health check timeout", + "operationId": "V1ControlPlaneHealthCheckTimeoutUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1ControlPlaneHealthCheckTimeoutEntity" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster uid", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/spectroclusters/{uid}/clusterConfig/hostCluster": { + "patch": { + "tags": [ + "v1" + ], + "summary": "Updates the specified cluster host config", + "operationId": "V1HostClusterConfigUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1HostClusterConfigEntity" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster uid", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/spectroclusters/{uid}/clusterConfig/lifecycleConfig": { + "patch": { + "tags": [ + "v1" + ], + "summary": "Updates the specified cluster Life cycle configuration", + "operationId": "v1SpectroClustersUidLifecycleConfigUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1LifecycleConfigEntity" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster uid", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/spectroclusters/{uid}/clusterConfig/osPatch": { + "patch": { + "tags": [ + "v1" + ], + "summary": "Updates the specified cluster OS patch configuration", + "operationId": "v1SpectroClustersUidOsPatchUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1OsPatchEntity" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster uid", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/spectroclusters/{uid}/config/namespaces": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves namespaces for the specified cluster", + "operationId": "v1SpectroClustersUidConfigNamespacesGet", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1ClusterNamespaceResources" + } + } + } + }, + "put": { + "tags": [ + "v1" + ], + "summary": "Updates namespaces for the specified cluster", + "operationId": "v1SpectroClustersUidConfigNamespacesUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1ClusterNamespaceResourcesUpdateEntity" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster uid", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/spectroclusters/{uid}/config/namespaces/{namespaceUid}": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves the specified namespace of the cluster", + "operationId": "v1SpectroClustersUidConfigNamespacesUidGet", + "responses": { + "200": { + "description": "Cluster's namespace response", + "schema": { + "$ref": "#/definitions/v1ClusterNamespaceResource" + } + } + } + }, + "put": { + "tags": [ + "v1" + ], + "summary": "Updates the specified namespace of the cluster", + "operationId": "v1SpectroClustersUidConfigNamespacesUidUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1ClusterNamespaceResourceInputEntity" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster uid", + "name": "uid", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Cluster namespace uid", + "name": "namespaceUid", + "in": "path", + "required": true + } + ] + }, + "/v1/spectroclusters/{uid}/config/rbacs": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves RBAC information for the specified cluster", + "operationId": "v1SpectroClustersUidConfigRbacsGet", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1ClusterRbacs" + } + } + } + }, + "put": { + "tags": [ + "v1" + ], + "summary": "Updates RBAC information for the specified cluster", + "operationId": "v1SpectroClustersUidConfigRbacsUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1ClusterRbacResourcesUpdateEntity" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster uid", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/spectroclusters/{uid}/config/rbacs/{rbacUid}": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves the specified RBAC of the cluster", + "operationId": "v1SpectroClustersUidConfigRbacsUidGet", + "responses": { + "200": { + "description": "Cluster's RBAC response", + "schema": { + "$ref": "#/definitions/v1ClusterRbac" + } + } + } + }, + "put": { + "tags": [ + "v1" + ], + "summary": "Updates the specified RBAC of the cluster", + "operationId": "v1SpectroClustersUidConfigRbacsUidUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1ClusterRbacInputEntity" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster uid", + "name": "uid", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "RBAC resource uid", + "name": "rbacUid", + "in": "path", + "required": true + } + ] + }, + "/v1/spectroclusters/{uid}/download": { + "get": { + "produces": [ + "application/octet-stream" + ], + "tags": [ + "v1" + ], + "summary": "Download the specified cluster", + "operationId": "v1SpectroClustersUidDownload", + "responses": { + "200": { + "description": "download cluster archive file", + "schema": { + "type": "string", + "format": "binary" + }, + "headers": { + "Content-Disposition": { + "type": "string" + } + } + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster uid", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/spectroclusters/{uid}/edge-native/edgeHosts": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves a list of edge host of edge-native cluster", + "operationId": "v1EdgeNativeClustersHostsList", + "responses": { + "200": { + "description": "List of edge host device", + "schema": { + "$ref": "#/definitions/v1EdgeHostDevices" + } + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster uid", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/spectroclusters/{uid}/features/backup": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the cluster backup result", + "operationId": "v1ClusterFeatureBackupGet", + "parameters": [ + { + "type": "string", + "name": "backupRequestUid", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1ClusterBackup" + } + } + } + }, + "put": { + "tags": [ + "v1" + ], + "summary": "Update cluster backup settings", + "operationId": "v1ClusterFeatureBackupUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1ClusterBackupConfig" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "post": { + "tags": [ + "v1" + ], + "summary": "Create cluster backup settings", + "operationId": "v1ClusterFeatureBackupCreate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1ClusterBackupConfig" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + }, + "delete": { + "tags": [ + "v1" + ], + "summary": "Reset cluster backup schedule settings", + "operationId": "v1ClusterFeatureBackupScheduleReset", + "responses": { + "204": { + "description": "The resource was deleted successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/spectroclusters/{uid}/features/backup/onDemand": { + "post": { + "tags": [ + "v1" + ], + "summary": "Create on demand cluster backup", + "operationId": "v1ClusterFeatureBackupOnDemandCreate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1ClusterBackupConfig" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/spectroclusters/{uid}/features/backup/{backupName}/request/{requestUid}": { + "delete": { + "tags": [ + "v1" + ], + "summary": "Delete cluster backup", + "operationId": "v1ClusterFeatureBackupDelete", + "responses": { + "204": { + "description": "The resource was deleted successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + }, + { + "type": "string", + "name": "backupName", + "in": "path", + "required": true + }, + { + "type": "string", + "name": "requestUid", + "in": "path", + "required": true + } + ] + }, + "/v1/spectroclusters/{uid}/features/complianceScan": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the compliance scan of cluster, if driverType is provided then specific status of driverType will be returned", + "operationId": "v1ClusterFeatureComplianceScanGet", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1ClusterComplianceScan" + } + } + } + }, + "put": { + "tags": [ + "v1" + ], + "summary": "Update cluster compliance scan settings", + "operationId": "v1ClusterFeatureComplianceScanUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1ClusterComplianceScheduleConfig" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "post": { + "tags": [ + "v1" + ], + "summary": "Create cluster compliance scan", + "operationId": "v1ClusterFeatureComplianceScanCreate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1ClusterComplianceScheduleConfig" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/spectroclusters/{uid}/features/complianceScan/logs/drivers": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the compliance scan log by cluster uid and driver type", + "operationId": "v1ClusterFeatureComplianceScanLogsGet", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1ClusterComplianceScanLogs" + } + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/spectroclusters/{uid}/features/complianceScan/logs/drivers/kubeBench": { + "put": { + "tags": [ + "v1" + ], + "summary": "Update the KubeBench compliance scan log by uid", + "operationId": "v1ClusterFeatureScanKubeBenchLogUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1KubeBenchEntity" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/spectroclusters/{uid}/features/complianceScan/logs/drivers/kubeHunter": { + "put": { + "tags": [ + "v1" + ], + "summary": "Update the KubeHunter compliance scan log by uid", + "operationId": "v1ClusterFeatureScanKubeHunterLogUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1KubeHunterEntity" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/spectroclusters/{uid}/features/complianceScan/logs/drivers/sonobuoy": { + "put": { + "tags": [ + "v1" + ], + "summary": "Update the Sonobuoy compliance scan log by uid", + "operationId": "v1ClusterFeatureScanSonobuoyLogUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1SonobuoyEntity" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/spectroclusters/{uid}/features/complianceScan/logs/drivers/syft": { + "patch": { + "tags": [ + "v1" + ], + "summary": "Update the Syft compliance scan log by uid", + "operationId": "v1ClusterFeatureScanSyftLogUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1SyftEntity" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/spectroclusters/{uid}/features/complianceScan/logs/{logUid}": { + "delete": { + "tags": [ + "v1" + ], + "summary": "Delete the compliance scan log by uid", + "operationId": "v1ClusterFeatureComplianceScanLogDelete", + "responses": { + "204": { + "description": "The resource was deleted successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + }, + { + "type": "string", + "name": "logUid", + "in": "path", + "required": true + } + ] + }, + "/v1/spectroclusters/{uid}/features/complianceScan/logs/{logUid}/drivers/kubeBench": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the KubeBench compliance scan log by uid", + "operationId": "v1ClusterFeatureKubeBenchLogGet", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1ClusterScanLogKubeBench" + } + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + }, + { + "type": "string", + "name": "logUid", + "in": "path", + "required": true + }, + { + "type": "string", + "name": "reportId", + "in": "query" + } + ] + }, + "/v1/spectroclusters/{uid}/features/complianceScan/logs/{logUid}/drivers/kubeHunter": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the KubeHunter compliance scan log by uid", + "operationId": "v1ClusterFeatureKubeHunterLogGet", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1ClusterScanLogKubeHunter" + } + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + }, + { + "type": "string", + "name": "logUid", + "in": "path", + "required": true + }, + { + "type": "string", + "name": "reportId", + "in": "query" + } + ] + }, + "/v1/spectroclusters/{uid}/features/complianceScan/logs/{logUid}/drivers/sonobuoy": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the Sonobuoy compliance scan log by uid", + "operationId": "v1ClusterFeatureSonobuoyLogGet", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1ClusterScanLogSonobuoy" + } + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + }, + { + "type": "string", + "name": "logUid", + "in": "path", + "required": true + }, + { + "type": "string", + "name": "reportId", + "in": "query" + } + ] + }, + "/v1/spectroclusters/{uid}/features/complianceScan/logs/{logUid}/drivers/syft": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the Syft compliance scan log by uid", + "operationId": "v1ClusterFeatureSyftLogGet", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1ClusterScanLogSyft" + } + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + }, + { + "type": "string", + "name": "logUid", + "in": "path", + "required": true + } + ] + }, + "/v1/spectroclusters/{uid}/features/complianceScan/logs/{logUid}/drivers/syft/sbom": { + "get": { + "produces": [ + "application/octet-stream" + ], + "tags": [ + "v1" + ], + "summary": "Returns the image sbom of syft scan log of cluster", + "operationId": "v1SyftScanLogImageSBOMGet", + "responses": { + "200": { + "description": "download file", + "schema": { + "type": "string", + "format": "binary" + }, + "headers": { + "Content-Disposition": { + "type": "string" + } + } + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + }, + { + "type": "string", + "name": "logUid", + "in": "path", + "required": true + }, + { + "type": "string", + "name": "image", + "in": "query", + "required": true + } + ] + }, + "/v1/spectroclusters/{uid}/features/complianceScan/logs/{logUid}/drivers/{driver}/download": { + "get": { + "produces": [ + "application/octet-stream" + ], + "tags": [ + "v1" + ], + "summary": "Downloads the driver cluster logs", + "operationId": "v1ClusterFeatureDriverLogDownload", + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "file" + }, + "headers": { + "Content-Disposition": { + "type": "string" + }, + "Content-Type": { + "type": "string" + } + } + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + }, + { + "type": "string", + "name": "logUid", + "in": "path", + "required": true + }, + { + "enum": [ + "kubeBench", + "kubeHunter", + "sonobuoy", + "syft" + ], + "type": "string", + "name": "driver", + "in": "path", + "required": true + }, + { + "type": "string", + "default": "pdf", + "name": "fileFormat", + "in": "query" + } + ] + }, + "/v1/spectroclusters/{uid}/features/complianceScan/onDemand": { + "post": { + "tags": [ + "v1" + ], + "summary": "Create on demand cluster compliance scan", + "operationId": "v1ClusterFeatureComplianceScanOnDemandCreate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1ClusterComplianceOnDemandConfig" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/spectroclusters/{uid}/features/helmCharts": { + "get": { + "tags": [ + "v1" + ], + "summary": "Get the installed helm charts of a specified cluster", + "operationId": "v1ClusterFeatureHelmChartsGet", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1ClusterHelmCharts" + } + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/spectroclusters/{uid}/features/logFetcher": { + "get": { + "tags": [ + "v1" + ], + "summary": "Get the log fetcher for cluster", + "operationId": "v1ClusterFeatureLogFetcherGet", + "parameters": [ + { + "type": "string", + "name": "requestId", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1ClusterLogFetcher" + } + } + } + }, + "post": { + "tags": [ + "v1" + ], + "summary": "Create the log fetcher for cluster", + "operationId": "v1ClusterFeatureLogFetcherCreate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1ClusterLogFetcherRequest" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster uid for which log is requested", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/spectroclusters/{uid}/features/manifests": { + "get": { + "tags": [ + "v1" + ], + "summary": "Get the installed manifests of a specified cluster", + "operationId": "v1ClusterFeatureManifestsGet", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1ClusterManifests" + } + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/spectroclusters/{uid}/features/restore": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the cluster restore of cluster", + "operationId": "v1ClusterFeatureRestoreGet", + "parameters": [ + { + "type": "string", + "name": "restoreRequestUid", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1ClusterRestore" + } + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/spectroclusters/{uid}/features/restore/onDemand": { + "post": { + "tags": [ + "v1" + ], + "summary": "Create on demand cluster restore", + "operationId": "v1ClusterFeatureRestoreOnDemandCreate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1ClusterRestoreConfig" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/spectroclusters/{uid}/import/manifest": { + "get": { + "produces": [ + "application/octet-stream" + ], + "tags": [ + "v1" + ], + "summary": "Returns the specified cluster's import manifest file", + "operationId": "v1SpectroClustersUidImportManifest", + "responses": { + "200": { + "description": "download file", + "schema": { + "type": "string", + "format": "binary" + }, + "headers": { + "Content-Disposition": { + "type": "string" + } + } + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/spectroclusters/{uid}/import/upgrade": { + "patch": { + "tags": [ + "v1" + ], + "summary": "Upgrade the specified imported read only cluster with full permissions", + "operationId": "v1SpectroClustersUidImportUpgradePatch", + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster uid", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/spectroclusters/{uid}/k8certificates": { + "get": { + "tags": [ + "v1" + ], + "summary": "Get K8Certificate for spectro cluster", + "operationId": "v1SpectroClustersK8Certificate", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1MachineCertificates" + } + } + } + }, + "put": { + "tags": [ + "v1" + ], + "summary": "Update K8Certificate for spectro cluster", + "operationId": "v1SpectroClustersK8CertificateUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1SpectroClusterK8sCertificate" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster uid", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/spectroclusters/{uid}/k8certificates/renew": { + "patch": { + "tags": [ + "v1" + ], + "summary": "Sets the cluster control plane nodes Kubernetes certificates for renewal", + "operationId": "v1SpectroClustersCertificatesRenew", + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster uid", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/spectroclusters/{uid}/kubectl/redirect": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the specified cluster's kube config file", + "operationId": "V1SpectroClustersUidKubeCtlRedirect", + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1SpectroClusterKubeCtlRedirect" + } + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster uid", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/spectroclusters/{uid}/location": { + "put": { + "tags": [ + "v1" + ], + "summary": "Associate the assets for the cluster", + "operationId": "v1SpectroClustersUidLocationPut", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1SpectroClusterLocationInputEntity" + } + } + ], + "responses": { + "204": { + "description": "Ok response without content", + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster uid", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/spectroclusters/{uid}/metadata": { + "patch": { + "tags": [ + "v1" + ], + "summary": "Update the specified spectro cluster metadata", + "operationId": "v1SpectroClustersUidMetadataUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1ObjectMetaInputEntitySchema" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster uid", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/spectroclusters/{uid}/namespaces": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns available namespaces for the cluster", + "operationId": "v1ClusterNamespacesGet", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1ClusterNamespaces" + } + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + }, + { + "type": "boolean", + "default": false, + "name": "skipEmptyNamespaces", + "in": "query" + } + ] + }, + "/v1/spectroclusters/{uid}/oidc": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns k8s spectrocluster oidc", + "operationId": "V1SpectroClustersUidOIDC", + "parameters": [ + { + "type": "string", + "description": "spc uid", + "name": "uid", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1SpectroClusterOidcSpec" + } + } + } + } + }, + "/v1/spectroclusters/{uid}/oidc/dashboard/url": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns k8s dashboard url", + "operationId": "V1SpectroClustersUidOIDCDashboardUrl", + "parameters": [ + { + "type": "string", + "description": "spc uid", + "name": "uid", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1SectroClusterK8sDashboardUrl" + } + } + } + } + }, + "/v1/spectroclusters/{uid}/pack/manifests/{manifestUid}": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the specified cluster's manifest", + "operationId": "v1SpectroClustersUidPackManifestsUidGet", + "parameters": [ + { + "type": "string", + "description": "cluster uid", + "name": "uid", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "manifest uid which is part of the pack ref", + "name": "manifestUid", + "in": "path", + "required": true + }, + { + "type": "boolean", + "default": false, + "description": "resolve pack manifest values if set to true", + "name": "resolveManifestValues", + "in": "query" + } + ], + "responses": { + "200": { + "description": "Pack manifest content", + "schema": { + "$ref": "#/definitions/v1Manifest" + } + } + } + } + }, + "/v1/spectroclusters/{uid}/pack/properties": { + "get": { + "tags": [ + "v1" + ], + "summary": "Get specified cluster pack properties", + "operationId": "v1SpectroClustersUidPackProperties", + "parameters": [ + { + "type": "string", + "description": "Cluster uid", + "name": "uid", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Pack layer", + "name": "layer", + "in": "query", + "required": true + }, + { + "type": "string", + "description": "Pack values yaml field path", + "name": "fieldPath", + "in": "query", + "required": true + }, + { + "type": "string", + "description": "Pack name", + "name": "name", + "in": "query" + }, + { + "type": "boolean", + "default": true, + "description": "Is the macros need to be resolved", + "name": "resolveMacros", + "in": "query" + } + ], + "responses": { + "200": { + "description": "Cluster's pack properties response", + "schema": { + "$ref": "#/definitions/v1SpectroClusterPackProperties" + } + } + } + } + }, + "/v1/spectroclusters/{uid}/packRefs": { + "patch": { + "tags": [ + "v1" + ], + "summary": "Updates the cluster's pack references", + "operationId": "v1SpectroClustersPacksRefUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1ClusterNotificationUpdateEntity" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + }, + { + "type": "string", + "name": "notify", + "in": "query" + } + ] + }, + "/v1/spectroclusters/{uid}/packs/resolvedValues": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the specified cluster's packs resolved values", + "operationId": "v1SpectroClustersUidPacksResolvedValuesGet", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1SpectroClusterProfilesResolvedValues" + } + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster uid", + "name": "uid", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1SpectroClusterProfilesParamReferenceEntity" + } + } + ] + }, + "/v1/spectroclusters/{uid}/packs/status": { + "patch": { + "tags": [ + "v1" + ], + "summary": "Patch update specified cluster's packs status", + "operationId": "v1SpectroClustersUidPacksStatusPatch", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1SpectroClusterPacksStatusEntity" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster uid", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/spectroclusters/{uid}/profileUpdates": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the profile updates of a specified cluster", + "operationId": "v1SpectroClustersGetProfileUpdates", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1SpectroClusterProfileUpdates" + } + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster uid", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/spectroclusters/{uid}/profiles": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the associated profiles of a specified cluster", + "operationId": "v1SpectroClustersGetProfiles", + "parameters": [ + { + "type": "string", + "description": "includes pack meta such as schema, presets", + "name": "includePackMeta", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1SpectroClusterProfileList" + } + } + } + }, + "put": { + "tags": [ + "v1" + ], + "summary": "Associate cluster profiles to the specified cluster", + "operationId": "v1SpectroClustersUpdateProfiles", + "parameters": [ + { + "type": "boolean", + "default": false, + "description": "Resolve pending cluster notification if set to true", + "name": "resolveNotification", + "in": "query" + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1SpectroClusterProfiles" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "delete": { + "tags": [ + "v1" + ], + "summary": "Remove cluster profiles from the specified cluster", + "operationId": "v1SpectroClustersDeleteProfiles", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1SpectroClusterProfilesDeleteEntity" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "patch": { + "tags": [ + "v1" + ], + "summary": "Patch cluster profiles to the specified cluster", + "operationId": "v1SpectroClustersPatchProfiles", + "parameters": [ + { + "type": "boolean", + "default": false, + "description": "Resolve pending cluster notification if set to true", + "name": "resolveNotification", + "in": "query" + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1SpectroClusterProfiles" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster uid", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/spectroclusters/{uid}/profiles/packs/manifests": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the associated profile's pack manifests of a specified cluster", + "operationId": "v1SpectroClustersGetProfilesPacksManifests", + "parameters": [ + { + "type": "string", + "description": "Includes pack meta such as schema, presets", + "name": "includePackMeta", + "in": "query" + }, + { + "type": "boolean", + "default": false, + "description": "Resolve pack macro variables if set to true", + "name": "resolveMacros", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1SpectroClusterProfilesPacksManifests" + } + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster uid", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/spectroclusters/{uid}/profiles/{profileUid}/packs/{packName}/config": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the specified cluster's profile pack configuration", + "operationId": "v1SpectroClustersUidProfilesUidPacksConfigGet", + "parameters": [ + { + "type": "string", + "description": "cluster uid", + "name": "uid", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "profile uid", + "name": "profileUid", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "pack name", + "name": "packName", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "An array of cluster pack values", + "schema": { + "$ref": "#/definitions/v1SpectroClusterPackConfigList" + } + } + } + } + }, + "/v1/spectroclusters/{uid}/profiles/{profileUid}/packs/{packName}/manifests": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the associated profiles pack manifests of the specified cluster", + "operationId": "v1SpectroClustersProfilesUidPackManifestsGet", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1PackManifests" + } + } + } + }, + "put": { + "tags": [ + "v1" + ], + "summary": "Updates cluster profiles pack manifests to the specified cluster", + "operationId": "v1SpectroClustersProfilesUidPackManifestsUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1ManifestRefInputEntities" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster uid", + "name": "uid", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Cluster profile uid", + "name": "profileUid", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Name of the pack", + "name": "packName", + "in": "path", + "required": true + } + ] + }, + "/v1/spectroclusters/{uid}/rate": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the estimated rate of the specified cluster", + "operationId": "v1SpectroClustersUidRate", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1SpectroClusterRate" + } + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster uid", + "name": "uid", + "in": "path", + "required": true + }, + { + "enum": [ + "hourly", + "monthly", + "yearly" + ], + "type": "string", + "default": "hourly", + "description": "Period type [hourly, monthly, yearly]", + "name": "periodType", + "in": "query" + } + ] + }, + "/v1/spectroclusters/{uid}/repave/approve": { + "patch": { + "tags": [ + "v1" + ], + "summary": "Returns the spectrocluster repave approve update", + "operationId": "v1SpectroClustersUidRepaveApproveUpdate", + "parameters": [ + { + "type": "string", + "description": "cluster uid", + "name": "uid", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + } + }, + "/v1/spectroclusters/{uid}/repave/status": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the spectrocluster repave", + "operationId": "v1SpectroClustersUidRepaveGet", + "parameters": [ + { + "type": "string", + "description": "cluster uid", + "name": "uid", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "Returns cluster repave status", + "schema": { + "$ref": "#/definitions/v1SpectroClusterRepave" + } + } + } + } + }, + "/v1/spectroclusters/{uid}/reset": { + "put": { + "tags": [ + "v1" + ], + "summary": "reset the cluster s by deleting machine pools and condtions", + "operationId": "V1SpectroClustersUidReset", + "responses": { + "204": { + "description": "Ok response without content", + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster uid", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/spectroclusters/{uid}/status": { + "get": { + "tags": [ + "v1" + ], + "summary": "Get the cluster's status", + "operationId": "v1SpectroClustersUidStatus", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1SpectroClusterStatusEntity" + } + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster uid", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/spectroclusters/{uid}/status/condition": { + "put": { + "tags": [ + "v1" + ], + "summary": "Updates the specified cluster status condition", + "operationId": "v1SpectroClustersUpdateStatusCondition", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1ClusterCondition" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/spectroclusters/{uid}/status/conditions": { + "patch": { + "tags": [ + "v1" + ], + "summary": "Updates the specified cluster status conditions", + "operationId": "v1SpectroClustersUpdateStatusConditions", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/v1ClusterCondition" + } + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/spectroclusters/{uid}/status/endpoints": { + "put": { + "tags": [ + "v1" + ], + "summary": "Updates the specified cluster's service endpoints information", + "operationId": "v1SpectroClustersUpdateStatusEndpoints", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/v1ApiEndpoint" + } + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/spectroclusters/{uid}/status/imported": { + "patch": { + "tags": [ + "v1" + ], + "summary": "Updates the specified cluster status as imported", + "operationId": "v1SpectroClustersUpdateStatusImported", + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/spectroclusters/{uid}/status/services": { + "put": { + "tags": [ + "v1" + ], + "summary": "Updates the specified cluster's services information", + "operationId": "v1SpectroClustersUpdateStatusServices", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/v1LoadBalancerService" + } + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/spectroclusters/{uid}/status/spcApply": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the SPC apply information for the agent", + "operationId": "v1SpectroClustersUidStatusSpcApplyGet", + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1SpcApply" + } + } + } + }, + "post": { + "tags": [ + "v1" + ], + "summary": "Set the CanBeApplied to true on the spcApply status. CanBeApplied indicates the agent to orchestrate the spc changes", + "operationId": "v1SpectroClustersUidStatusSpcApply", + "responses": { + "202": { + "description": "Ok response without content", + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/spectroclusters/{uid}/status/spcApply/patchTime": { + "patch": { + "tags": [ + "v1" + ], + "summary": "Updates the agent patch time for the SPC changes", + "operationId": "v1SpectroClustersUidStatusSpcPatchTime", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1SpcPatchTimeEntity" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/spectroclusters/{uid}/status/upgrades": { + "put": { + "tags": [ + "v1" + ], + "summary": "Updates the cluster's upgrade status", + "operationId": "v1SpectroClustersUidUpgradesPut", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1SpectroClusterUidUpgrades" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/spectroclusters/{uid}/upgrade/settings": { + "post": { + "tags": [ + "v1" + ], + "summary": "Update specific cluster upgrade settings", + "operationId": "v1SpectroClustersUidUpgradeSettings", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1ClusterUpgradeSettingsEntity" + } + } + ], + "responses": { + "204": { + "description": "Ok response without content", + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster uid", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/spectroclusters/{uid}/validate/packs": { + "post": { + "tags": [ + "v1" + ], + "summary": "Validates cluster packs", + "operationId": "v1SpectroClustersUidValidatePacks", + "parameters": [ + { + "type": "string", + "description": "cluster uid", + "name": "uid", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1SpectroClusterPacksEntity" + } + } + ], + "responses": { + "200": { + "description": "Cluster packs validation response", + "schema": { + "$ref": "#/definitions/v1SpectroClusterValidatorResponse" + } + } + } + } + }, + "/v1/spectroclusters/{uid}/validate/repave": { + "post": { + "tags": [ + "v1" + ], + "summary": "Validates if cluster gets repaved for the specified packs", + "operationId": "v1SpectroClustersUidValidateRepave", + "parameters": [ + { + "type": "string", + "description": "cluster uid", + "name": "uid", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1SpectroClusterPacksEntity" + } + } + ], + "responses": { + "200": { + "description": "Cluster repave validation response", + "schema": { + "$ref": "#/definitions/v1SpectroClusterRepaveValidationResponse" + } + } + } + } + }, + "/v1/spectroclusters/{uid}/variables": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieve a list of variables associated with the cluster", + "operationId": "v1SpectroClustersUidVariablesGet", + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1Variables" + } + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster uid for which variables need to be retrieved", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/spectroclusters/{uid}/vms": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the list of virtual machines", + "operationId": "v1SpectroClustersVMList", + "parameters": [ + { + "type": "array", + "items": { + "type": "string" + }, + "collectionFormat": "csv", + "description": "Namespace names, comma separated value (ex: dev,test). If namespace is empty it returns the specific resource under all namespace", + "name": "namespace", + "in": "query" + }, + { + "type": "integer", + "format": "int64", + "default": 50, + "description": "limit is a maximum number of responses to return for a list call. Default and maximum value of the limit is 50.\nIf more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results.", + "name": "limit", + "in": "query" + }, + { + "type": "string", + "description": "continue token to paginate the subsequent data items", + "name": "continue", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1ClusterVirtualMachineList" + } + } + } + }, + "post": { + "tags": [ + "v1" + ], + "summary": "Create virtual machine", + "operationId": "v1SpectroClustersVMCreate", + "parameters": [ + { + "type": "string", + "description": "Namespace name", + "name": "namespace", + "in": "query", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1ClusterVirtualMachine" + } + } + ], + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1ClusterVirtualMachine" + } + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster uid", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/spectroclusters/{uid}/vms/snapshot": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the list of snapshots of given namespaces", + "operationId": "v1ClusterVMSnapshotsList", + "parameters": [ + { + "type": "array", + "items": { + "type": "string" + }, + "collectionFormat": "csv", + "description": "vmName is comma separated value (ex: name1,name2).", + "name": "vmName", + "in": "query" + }, + { + "type": "array", + "items": { + "type": "string" + }, + "collectionFormat": "csv", + "description": "Namespace names, comma separated value (ex: dev,test). If namespace is empty it returns the specific resource under all namespace", + "name": "namespace", + "in": "query" + }, + { + "type": "integer", + "format": "int64", + "default": 50, + "description": "limit is a maximum number of responses to return for a list call. Default and maximum value of the limit is 50.\nIf more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results.", + "name": "limit", + "in": "query" + }, + { + "type": "string", + "description": "continue token to paginate the subsequent data items", + "name": "continue", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1VirtualMachineSnapshotList" + } + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster uid", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/spectroclusters/{uid}/vms/{vmName}": { + "get": { + "tags": [ + "v1" + ], + "summary": "Get virtual machine", + "operationId": "v1SpectroClustersVMGet", + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1ClusterVirtualMachine" + } + } + } + }, + "put": { + "tags": [ + "v1" + ], + "summary": "Updates the specified virtual machine of the cluster", + "operationId": "v1SpectroClustersVMUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1ClusterVirtualMachine" + } + } + ], + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1ClusterVirtualMachine" + } + } + } + }, + "delete": { + "tags": [ + "v1" + ], + "summary": "Deletes the virtual machine", + "operationId": "v1SpectroClustersVMDelete", + "responses": { + "204": { + "description": "The resource was deleted successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster uid", + "name": "uid", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Virtual Machine name", + "name": "vmName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Namespace name", + "name": "namespace", + "in": "query", + "required": true + } + ] + }, + "/v1/spectroclusters/{uid}/vms/{vmName}/addVolume": { + "put": { + "tags": [ + "v1" + ], + "summary": "Add volume to the virtual machine instance", + "operationId": "v1SpectroClustersVMAddVolume", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1VMAddVolumeEntity" + } + } + ], + "responses": { + "204": { + "description": "Ok response without content", + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster uid", + "name": "uid", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Virtual Machine name", + "name": "vmName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Namespace name", + "name": "namespace", + "in": "query", + "required": true + } + ] + }, + "/v1/spectroclusters/{uid}/vms/{vmName}/clone": { + "post": { + "tags": [ + "v1" + ], + "summary": "Clone virtual machine", + "operationId": "v1SpectroClustersVMClone", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1SpectroClusterVMCloneEntity" + } + } + ], + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1ClusterVirtualMachine" + } + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster uid", + "name": "uid", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Virtual Machine name", + "name": "vmName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Namespace name", + "name": "namespace", + "in": "query", + "required": true + } + ] + }, + "/v1/spectroclusters/{uid}/vms/{vmName}/migrate": { + "put": { + "tags": [ + "v1" + ], + "summary": "Migrate the virtual machine", + "operationId": "v1SpectroClustersVMMigrate", + "responses": { + "204": { + "description": "Ok response without content", + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster uid", + "name": "uid", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Virtual Machine name", + "name": "vmName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Namespace name", + "name": "namespace", + "in": "query", + "required": true + } + ] + }, + "/v1/spectroclusters/{uid}/vms/{vmName}/pause": { + "put": { + "tags": [ + "v1" + ], + "summary": "Pause the virtual machine instance", + "operationId": "v1SpectroClustersVMPause", + "responses": { + "204": { + "description": "Ok response without content", + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster uid", + "name": "uid", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Virtual Machine name", + "name": "vmName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Namespace name", + "name": "namespace", + "in": "query", + "required": true + } + ] + }, + "/v1/spectroclusters/{uid}/vms/{vmName}/removeVolume": { + "put": { + "tags": [ + "v1" + ], + "summary": "Remove volume from the virtual machine instance", + "operationId": "v1SpectroClustersVMRemoveVolume", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1VMRemoveVolumeEntity" + } + } + ], + "responses": { + "204": { + "description": "Ok response without content", + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster uid", + "name": "uid", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Virtual Machine name", + "name": "vmName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Namespace name", + "name": "namespace", + "in": "query", + "required": true + } + ] + }, + "/v1/spectroclusters/{uid}/vms/{vmName}/restart": { + "put": { + "tags": [ + "v1" + ], + "summary": "Restart the virtual machine", + "operationId": "v1SpectroClustersVMRestart", + "responses": { + "204": { + "description": "Ok response without content", + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster uid", + "name": "uid", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Virtual Machine name", + "name": "vmName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Namespace name", + "name": "namespace", + "in": "query", + "required": true + } + ] + }, + "/v1/spectroclusters/{uid}/vms/{vmName}/resume": { + "put": { + "tags": [ + "v1" + ], + "summary": "Resume the virtual machine instance", + "operationId": "v1SpectroClustersVMResume", + "responses": { + "204": { + "description": "Ok response without content", + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster uid", + "name": "uid", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Virtual Machine name", + "name": "vmName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Namespace name", + "name": "namespace", + "in": "query", + "required": true + } + ] + }, + "/v1/spectroclusters/{uid}/vms/{vmName}/snapshot": { + "post": { + "tags": [ + "v1" + ], + "summary": "Create snapshot of virtual machine", + "operationId": "v1VMSnapshotCreate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1VirtualMachineSnapshot" + } + } + ], + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1VirtualMachineSnapshot" + } + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster uid", + "name": "uid", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Virtual Machine name", + "name": "vmName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Namespace name of virtual machine", + "name": "namespace", + "in": "query", + "required": true + } + ] + }, + "/v1/spectroclusters/{uid}/vms/{vmName}/snapshot/{snapshotName}": { + "get": { + "tags": [ + "v1" + ], + "summary": "Get virtual machine snapshot", + "operationId": "v1VMSnapshotGet", + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1VirtualMachineSnapshot" + } + } + } + }, + "put": { + "tags": [ + "v1" + ], + "summary": "Updates the specified snapshot of a virtual machine", + "operationId": "v1VMSnapshotUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1VirtualMachineSnapshot" + } + } + ], + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1VirtualMachineSnapshot" + } + } + } + }, + "delete": { + "tags": [ + "v1" + ], + "summary": "Delete the snapshot of virtual machine", + "operationId": "v1VMSnapshotDelete", + "responses": { + "204": { + "description": "The resource was deleted successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster uid", + "name": "uid", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Virtual Machine name", + "name": "vmName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Snapshot name", + "name": "snapshotName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Namespace name", + "name": "namespace", + "in": "query", + "required": true + } + ] + }, + "/v1/spectroclusters/{uid}/vms/{vmName}/start": { + "put": { + "tags": [ + "v1" + ], + "summary": "Start the virtual machine", + "operationId": "v1SpectroClustersVMStart", + "responses": { + "204": { + "description": "Ok response without content", + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster uid", + "name": "uid", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Virtual Machine name", + "name": "vmName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Namespace name", + "name": "namespace", + "in": "query", + "required": true + } + ] + }, + "/v1/spectroclusters/{uid}/vms/{vmName}/stop": { + "put": { + "tags": [ + "v1" + ], + "summary": "Stop the virtual machine", + "operationId": "v1SpectroClustersVMStop", + "responses": { + "204": { + "description": "Ok response without content", + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster uid", + "name": "uid", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Virtual Machine name", + "name": "vmName", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Namespace name", + "name": "namespace", + "in": "query", + "required": true + } + ] + }, + "/v1/spectroclusters/{uid}/workloads/sync": { + "post": { + "description": "Sync specified cluster workload", + "tags": [ + "v1" + ], + "summary": "Sync specified cluster workload", + "operationId": "v1SpectroClustersUidWorkloadsSync", + "responses": { + "202": { + "description": "Ok response without content", + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/spectroclusters/{uid}/workloads/{workloadKind}/sync": { + "post": { + "tags": [ + "v1" + ], + "summary": "Sync specified cluster workload", + "operationId": "v1SpectroClustersUidWorkloadsKindSync", + "responses": { + "202": { + "description": "Ok response without content", + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Cluster uid", + "name": "uid", + "in": "path", + "required": true + }, + { + "enum": [ + "namespace", + "pod", + "deployment", + "statefulset", + "daemonset", + "job", + "cronjob", + "rolebinding", + "clusterrolebinding" + ], + "type": "string", + "description": "Workload kind", + "name": "workloadKind", + "in": "path", + "required": true + } + ] + }, + "/v1/system/config/reverseproxy": { + "get": { + "tags": [ + "v1", + "system", + "private", + "docs-show" + ], + "summary": "get the system config reverse proxy", + "operationId": "V1SystemConfigReverseProxyGet", + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1SystemReverseProxy" + } + } + } + }, + "put": { + "tags": [ + "v1", + "system", + "private", + "docs-show" + ], + "summary": "updates the system config reverse proxy", + "operationId": "V1SystemConfigReverseProxyUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1SystemReverseProxy" + } + } + ], + "responses": { + "204": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1Updated" + } + } + } + } + }, + "/v1/system/passwords/blocklist": { + "delete": { + "tags": [ + "v1", + "system", + "docs-show" + ], + "summary": "Delete a list of block listed passwords", + "operationId": "V1PasswordsBlockListDelete", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/V1PasswordsBlockList" + } + } + ], + "responses": { + "204": { + "description": "The resource was deleted successfully" + } + } + }, + "patch": { + "tags": [ + "v1", + "system", + "docs-show" + ], + "summary": "List of block listed passwords", + "operationId": "V1PasswordsBlockListUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/V1PasswordsBlockList" + } + } + ], + "responses": { + "204": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1Updated" + } + } + } + } + }, + "/v1/teams": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves a list of teams", + "operationId": "v1TeamsList", + "parameters": [ + { + "type": "string", + "description": "Set of fields to be presented in the response with values. The fields are comma separated. Eg: metadata.uid,metadata.name", + "name": "fields", + "in": "query" + }, + { + "type": "string", + "description": "Filters can be combined with AND, OR operators with field path name. Eg: metadata.name=TestServiceANDspec.cloudType=aws\n\nServer will be restricted to certain fields based on the indexed data for each resource.", + "name": "filters", + "in": "query" + }, + { + "type": "string", + "description": "Specify the fields with sort order. 1 indicates ascending and -1 for descending. Eg: orderBy=metadata.name=1,metadata.uid=-1", + "name": "orderBy", + "in": "query" + }, + { + "type": "integer", + "format": "int64", + "default": 50, + "description": "limit is a maximum number of responses to return for a list call. Default and maximum value of the limit is 50.\nIf more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results.", + "name": "limit", + "in": "query" + }, + { + "type": "integer", + "format": "int64", + "description": "offset is the next index number from which the response will start. The response offset value can be used along with continue token for the pagination.", + "name": "offset", + "in": "query" + }, + { + "type": "string", + "description": "continue token to paginate the subsequent data items", + "name": "continue", + "in": "query" + } + ], + "responses": { + "200": { + "description": "An array of teams", + "schema": { + "$ref": "#/definitions/v1Teams" + } + } + } + }, + "post": { + "tags": [ + "v1" + ], + "summary": "Creates a team with the specified users and roles", + "operationId": "v1TeamsCreate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1Team" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + } + }, + "/v1/teams/summary": { + "post": { + "tags": [ + "v1" + ], + "summary": "Retrieves a list of teams summary with provided filter spec", + "operationId": "v1TeamsSummaryGet", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1TeamsSummarySpec" + } + } + ], + "responses": { + "200": { + "description": "An array of teams summary items", + "schema": { + "$ref": "#/definitions/v1TeamsSummaryList" + } + } + } + } + }, + "/v1/teams/{uid}": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the sepcified team", + "operationId": "v1TeamsUidGet", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1Team" + } + } + } + }, + "put": { + "tags": [ + "v1" + ], + "summary": "Updates the sepcified team", + "operationId": "v1TeamsUidUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1Team" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "delete": { + "tags": [ + "v1" + ], + "summary": "Deletes the specified team", + "operationId": "v1TeamsUidDelete", + "responses": { + "204": { + "description": "The resource was deleted successfully" + } + } + }, + "patch": { + "tags": [ + "v1" + ], + "summary": "Patches the specified team", + "operationId": "v1TeamsUidPatch", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1TeamPatch" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/teams/{uid}/projects": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the specified team's project and roles data", + "operationId": "v1TeamsProjectRoles", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1ProjectRolesEntity" + } + } + } + }, + "put": { + "tags": [ + "v1" + ], + "summary": "Updates the projects and roles for the specified team", + "operationId": "v1TeamsProjectRolesPut", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1ProjectRolesPatch" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/teams/{uid}/resourceRoles": { + "get": { + "description": "Returns resource roles for team", + "tags": [ + "v1" + ], + "summary": "Returns the specified individual and resource roles for a team", + "operationId": "v1TeamsUidResourceRoles", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1ResourceRoles" + } + } + } + }, + "post": { + "description": "Resource roles added to specific team", + "tags": [ + "v1" + ], + "summary": "Add resource roles for team", + "operationId": "v1TeamsUidResourceRolesCreate", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1ResourceRolesUpdateEntity" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/teams/{uid}/resourceRoles/{resourceRoleUid}": { + "delete": { + "tags": [ + "v1" + ], + "summary": "Deleted the resource roles from team", + "operationId": "v1TeamsUidResourceRolesUidDelete", + "responses": { + "204": { + "description": "The resource was deleted successfully" + } + } + }, + "patch": { + "description": "Specific resource roles fo team is updated", + "tags": [ + "v1" + ], + "summary": "Updates the resource roles for team", + "operationId": "v1TeamsResourceRolesUidUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1ResourceRolesUpdateEntity" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + }, + { + "type": "string", + "name": "resourceRoleUid", + "in": "path", + "required": true + } + ] + }, + "/v1/teams/{uid}/roles": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the specified team's tenant roles", + "operationId": "V1TeamsUidTenantRolesGet", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1TeamTenantRolesEntity" + } + } + } + }, + "put": { + "tags": [ + "v1" + ], + "summary": "Updates the tenant roles of the specified team", + "operationId": "V1TeamsUidTenantRolesUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1TeamTenantRolesUpdate" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/tenants/{tenantUid}/address": { + "patch": { + "tags": [ + "v1" + ], + "summary": "Update tenant address", + "operationId": "v1PatchTenantAddress", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1TenantAddressPatch" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "name": "tenantUid", + "in": "path", + "required": true + } + ] + }, + "/v1/tenants/{tenantUid}/assets/certs": { + "get": { + "tags": [ + "v1" + ], + "summary": "lists the certificates for the tenant", + "operationId": "V1TenantUIdAssetsCertsList", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1TenantAssetCerts" + } + } + } + }, + "post": { + "tags": [ + "v1" + ], + "summary": "create the tenant certificate", + "operationId": "V1TenantUidAssetsCertsCreate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1TenantAssetCert" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + }, + "parameters": [ + { + "type": "string", + "name": "tenantUid", + "in": "path", + "required": true + } + ] + }, + "/v1/tenants/{tenantUid}/assets/certs/{certificateUid}": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the ca certificate for the tenant", + "operationId": "V1TenantUidAssetsCertsUidGet", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1TenantAssetCert" + } + } + } + }, + "put": { + "tags": [ + "v1" + ], + "summary": "updates the tenant certificate", + "operationId": "V1TenantUidAssetsCertsUidUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1TenantAssetCert" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "delete": { + "tags": [ + "v1" + ], + "summary": "deletes the tenant certificate", + "operationId": "V1TenantUidAssetsCertsUidDelete", + "responses": { + "204": { + "description": "The resource was deleted successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "name": "tenantUid", + "in": "path", + "required": true + }, + { + "type": "string", + "name": "certificateUid", + "in": "path", + "required": true + } + ] + }, + "/v1/tenants/{tenantUid}/assets/dataSinks": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns data sink config of tenant", + "operationId": "V1TenantUidAssetsDataSinksGet", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1DataSinkConfig" + } + } + } + }, + "put": { + "tags": [ + "v1" + ], + "summary": "updates the tenant data sink config", + "operationId": "V1TenantUidAssetsDataSinksUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1DataSinkConfig" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "post": { + "tags": [ + "v1" + ], + "summary": "create data sink config", + "operationId": "V1TenantUidAssetsDataSinksCreate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1DataSinkConfig" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + }, + "delete": { + "tags": [ + "v1" + ], + "summary": "deletes the tenant data sink config", + "operationId": "V1TenantUidAssetsDataSinksDelete", + "responses": { + "204": { + "description": "The resource was deleted successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "name": "tenantUid", + "in": "path", + "required": true + } + ] + }, + "/v1/tenants/{tenantUid}/authTokenSettings": { + "get": { + "tags": [ + "v1" + ], + "summary": "Get tenant auth token settings", + "operationId": "v1TenantUidAuthTokenSettingsGet", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1AuthTokenSettings" + } + } + } + }, + "put": { + "tags": [ + "v1" + ], + "summary": "Update tenant auth token settings", + "operationId": "v1TenantUidAuthTokenSettingsUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1AuthTokenSettings" + } + } + ], + "responses": { + "204": { + "description": "Ok response without content", + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + }, + "parameters": [ + { + "type": "string", + "name": "tenantUid", + "in": "path", + "required": true + } + ] + }, + "/v1/tenants/{tenantUid}/contract/accept": { + "patch": { + "tags": [ + "v1" + ], + "summary": "Tenant to accept the contract agreement", + "operationId": "v1TenantsUidContractAccept", + "responses": { + "204": { + "description": "Ok response without content", + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + }, + "parameters": [ + { + "type": "string", + "name": "tenantUid", + "in": "path", + "required": true + } + ] + }, + "/v1/tenants/{tenantUid}/creditAccount/aws": { + "get": { + "tags": [ + "v1" + ], + "summary": "Get the credit accounts for the tenants with free tier access", + "operationId": "v1TenantsCreditAccountGet", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1AwsCreditAccountEntity" + } + } + } + }, + "delete": { + "tags": [ + "v1" + ], + "summary": "Deletes the aws credit account for tenants", + "operationId": "v1TenantsCreditAccountDelete", + "parameters": [ + { + "type": "boolean", + "default": false, + "name": "forceDelete", + "in": "query" + } + ], + "responses": { + "204": { + "description": "The resource was deleted successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "name": "tenantUid", + "in": "path", + "required": true + } + ] + }, + "/v1/tenants/{tenantUid}/domains": { + "get": { + "tags": [ + "v1" + ], + "summary": "retrieves the domains for tenant", + "operationId": "V1TenantUidDomainsGet", + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1TenantDomains" + } + } + } + }, + "post": { + "tags": [ + "v1" + ], + "summary": "creates or updates domains for tenant", + "operationId": "V1TenantUidDomainsUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1TenantDomains" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "name": "tenantUid", + "in": "path", + "required": true + } + ] + }, + "/v1/tenants/{tenantUid}/emailId": { + "patch": { + "tags": [ + "v1" + ], + "summary": "Update tenant emailId", + "operationId": "v1PatchTenantEmailId", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1TenantEmailPatch" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "name": "tenantUid", + "in": "path", + "required": true + } + ] + }, + "/v1/tenants/{tenantUid}/freemium": { + "get": { + "tags": [ + "v1" + ], + "summary": "Get tenant level freemium configuration", + "operationId": "v1TenantFreemiumGet", + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1TenantFreemium" + } + } + } + }, + "put": { + "tags": [ + "v1" + ], + "summary": "Update tenant freemium configuration", + "operationId": "v1TenantFreemiumUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1TenantFreemium" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "name": "tenantUid", + "in": "path", + "required": true + } + ] + }, + "/v1/tenants/{tenantUid}/freemiumUsage": { + "get": { + "tags": [ + "v1" + ], + "summary": "Get tenant freemium usage", + "operationId": "v1TenantFreemiumUsageGet", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1TenantFreemiumUsage" + } + } + } + }, + "parameters": [ + { + "type": "string", + "name": "tenantUid", + "in": "path", + "required": true + } + ] + }, + "/v1/tenants/{tenantUid}/invoices/{invoiceUid}": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns a specified invoice", + "operationId": "v1InvoicesUidGet", + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1Invoice" + } + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Specify the tenant uid", + "name": "tenantUid", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Specify the invoice uid", + "name": "invoiceUid", + "in": "path", + "required": true + } + ] + }, + "/v1/tenants/{tenantUid}/invoices/{invoiceUid}/report/invoice/pdf": { + "get": { + "produces": [ + "application/octet-stream" + ], + "tags": [ + "v1" + ], + "summary": "Downloads the specified invoice report", + "operationId": "V1InvoiceUidReportInvoicePdf", + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "file" + }, + "headers": { + "Content-Disposition": { + "type": "string" + }, + "Content-Type": { + "type": "string" + } + } + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Specify the tenant uid", + "name": "tenantUid", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Specify the invoice uid", + "name": "invoiceUid", + "in": "path", + "required": true + } + ] + }, + "/v1/tenants/{tenantUid}/invoices/{invoiceUid}/report/pdf": { + "get": { + "produces": [ + "application/octet-stream" + ], + "tags": [ + "v1" + ], + "summary": "Downloads the specified monthly invoice report", + "operationId": "V1InvoiceUidReportPdf", + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "file" + }, + "headers": { + "Content-Disposition": { + "type": "string" + }, + "Content-Type": { + "type": "string" + } + } + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Specify the tenant uid", + "name": "tenantUid", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Specify the invoice uid", + "name": "invoiceUid", + "in": "path", + "required": true + } + ] + }, + "/v1/tenants/{tenantUid}/invoices/{invoiceUid}/report/usage/pdf": { + "get": { + "produces": [ + "application/octet-stream" + ], + "tags": [ + "v1" + ], + "summary": "Downloads the specified tenant usage", + "operationId": "V1InvoiceUidReportUsagePdf", + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "file" + }, + "headers": { + "Content-Disposition": { + "type": "string" + }, + "Content-Type": { + "type": "string" + } + } + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Specify the tenant uid", + "name": "tenantUid", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Specify the invoice uid", + "name": "invoiceUid", + "in": "path", + "required": true + } + ] + }, + "/v1/tenants/{tenantUid}/loginBanner": { + "get": { + "tags": [ + "v1" + ], + "summary": "Get tenant login banner settings", + "operationId": "v1TenantUidLoginBannerGet", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1LoginBannerSettings" + } + } + } + }, + "put": { + "tags": [ + "v1" + ], + "summary": "Update tenant login banner settings", + "operationId": "v1TenantUidLoginBannerUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1LoginBannerSettings" + } + } + ], + "responses": { + "204": { + "description": "Ok response without content", + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + }, + "parameters": [ + { + "type": "string", + "name": "tenantUid", + "in": "path", + "required": true + } + ] + }, + "/v1/tenants/{tenantUid}/macros": { + "get": { + "tags": [ + "v1" + ], + "summary": "List the macros of the specified tenant", + "operationId": "v1TenantsUidMacrosList", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1Macros" + } + } + } + }, + "put": { + "tags": [ + "v1" + ], + "summary": "Update the macros of the specified tenant", + "operationId": "v1TenantsUidMacrosUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1Macros" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "post": { + "tags": [ + "v1" + ], + "summary": "Create or add new macros for the specified tenant", + "operationId": "v1TenantsUidMacrosCreate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1Macros" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "delete": { + "tags": [ + "v1" + ], + "summary": "Delete the macros for the specified tenant by given macro name", + "operationId": "v1TenantsUidMacrosDeleteByMacroName", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1Macros" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "patch": { + "tags": [ + "v1" + ], + "summary": "Update the macros for the specified tenant by given macro name", + "operationId": "v1TenantsUidMacrosUpdateByMacroName", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1Macros" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "name": "tenantUid", + "in": "path", + "required": true + } + ] + }, + "/v1/tenants/{tenantUid}/oidc/config": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the oidc Spec for tenant", + "operationId": "V1TenantUidOidcConfigGet", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1TenantOidcClientSpec" + } + } + } + }, + "post": { + "tags": [ + "v1" + ], + "summary": "Associates the oidc Spec for the tenant", + "operationId": "V1TenantUidOidcConfigUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1TenantOidcClientSpec" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "name": "tenantUid", + "in": "path", + "required": true + } + ] + }, + "/v1/tenants/{tenantUid}/password/policy": { + "post": { + "tags": [ + "v1" + ], + "summary": "creates or updates a password policy for tenant", + "operationId": "V1TenantUidPasswordPolicyUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1TenantPasswordPolicyEntity" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "name": "tenantUid", + "in": "path", + "required": true + } + ] + }, + "/v1/tenants/{tenantUid}/preferences/clusterGroup": { + "get": { + "tags": [ + "v1" + ], + "summary": "Get is cluster group enabled for a specific tenant", + "operationId": "V1TenantPrefClusterGroupGet", + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1TenantEnableClusterGroup" + } + } + } + }, + "put": { + "tags": [ + "v1" + ], + "summary": "Enable or Disable cluster group for a specific tenant", + "operationId": "V1TenantPrefClusterGroupUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1TenantEnableClusterGroup" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "name": "tenantUid", + "in": "path", + "required": true + } + ] + }, + "/v1/tenants/{tenantUid}/preferences/clusterSettings": { + "get": { + "tags": [ + "v1" + ], + "summary": "Get tenant cluster settings", + "operationId": "v1TenantClusterSettingsGet", + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1TenantClusterSettings" + } + } + } + }, + "parameters": [ + { + "type": "string", + "name": "tenantUid", + "in": "path", + "required": true + } + ] + }, + "/v1/tenants/{tenantUid}/preferences/clusterSettings/nodesAutoRemediationSetting": { + "put": { + "tags": [ + "v1" + ], + "summary": "Update tenant clusters nodes auto remediation setting", + "operationId": "v1TenantClustersNodesAutoRemediationSettingUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1NodesAutoRemediationSettings" + } + } + ], + "responses": { + "204": { + "description": "Ok response without content", + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + }, + "parameters": [ + { + "type": "string", + "name": "tenantUid", + "in": "path", + "required": true + } + ] + }, + "/v1/tenants/{tenantUid}/preferences/developerCredit": { + "get": { + "tags": [ + "v1" + ], + "summary": "Get developer credit enabled for a specific tenant", + "operationId": "V1TenantDeveloperCreditGet", + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1DeveloperCredit" + } + } + } + }, + "put": { + "tags": [ + "v1" + ], + "summary": "update developer credit for a specific tenant", + "operationId": "V1TenantDeveloperCreditUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1DeveloperCredit" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "name": "tenantUid", + "in": "path", + "required": true + } + ] + }, + "/v1/tenants/{tenantUid}/preferences/fips": { + "get": { + "tags": [ + "v1" + ], + "summary": "Get tenant fips settings", + "operationId": "v1TenantFipsSettingsGet", + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1FipsSettings" + } + } + } + }, + "put": { + "tags": [ + "v1" + ], + "summary": "Update tenant fips setting", + "operationId": "v1TenantFipsSettingsUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1FipsSettings" + } + } + ], + "responses": { + "204": { + "description": "Ok response without content", + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + }, + "parameters": [ + { + "type": "string", + "name": "tenantUid", + "in": "path", + "required": true + } + ] + }, + "/v1/tenants/{tenantUid}/rateConfig": { + "get": { + "tags": [ + "v1" + ], + "summary": "Get all rate config for public and private cloud", + "operationId": "v1RateConfigGet", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1RateConfig" + } + } + } + }, + "put": { + "tags": [ + "v1" + ], + "summary": "updates the rate config for public and private cloud", + "operationId": "v1RateConfigUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1RateConfig" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "name": "tenantUid", + "in": "path", + "required": true + } + ] + }, + "/v1/tenants/{tenantUid}/resourceLimits": { + "get": { + "tags": [ + "v1" + ], + "summary": "Get tenant level resource limits configuration", + "operationId": "v1TenantResourceLimitsGet", + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1TenantResourceLimits" + } + } + } + }, + "patch": { + "tags": [ + "v1" + ], + "summary": "Update tenant resource limits configuration", + "operationId": "v1TenantResourceLimitsUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1TenantResourceLimitsEntity" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "name": "tenantUid", + "in": "path", + "required": true + } + ] + }, + "/v1/tenants/{tenantUid}/saml/config": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the specified service provider metadata and Saml Spec for tenant", + "operationId": "V1TenantUidSamlConfigSpecGet", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1TenantSamlSpec" + } + } + } + }, + "post": { + "tags": [ + "v1" + ], + "summary": "Associates the specified federation metadata for the tenant", + "operationId": "V1TenantUidSamlConfigUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1TenantSamlRequestSpec" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "name": "tenantUid", + "in": "path", + "required": true + } + ] + }, + "/v1/tenants/{tenantUid}/sso/auth/providers": { + "get": { + "tags": [ + "v1" + ], + "summary": "get sso logins for the tenants", + "operationId": "V1TenantUidSsoAuthProvidersGet", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1TenantSsoAuthProvidersEntity" + } + } + } + }, + "post": { + "tags": [ + "v1" + ], + "summary": "enable sso logins for the tenants", + "operationId": "V1TenantUidSsoAuthProvidersUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1TenantSsoAuthProvidersEntity" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "name": "tenantUid", + "in": "path", + "required": true + } + ] + }, + "/v1/users": { + "get": { + "description": "Lists users the given user context", + "tags": [ + "v1" + ], + "summary": "Lists users", + "operationId": "v1UsersList", + "parameters": [ + { + "type": "string", + "description": "Set of fields to be presented in the response with values. The fields are comma separated. Eg: metadata.uid,metadata.name", + "name": "fields", + "in": "query" + }, + { + "type": "string", + "description": "Filters can be combined with AND, OR operators with field path name. Eg: metadata.name=TestServiceANDspec.cloudType=aws\n\nServer will be restricted to certain fields based on the indexed data for each resource.", + "name": "filters", + "in": "query" + }, + { + "type": "string", + "description": "Specify the fields with sort order. 1 indicates ascending and -1 for descending. Eg: orderBy=metadata.name=1,metadata.uid=-1", + "name": "orderBy", + "in": "query" + }, + { + "type": "integer", + "format": "int64", + "default": 50, + "description": "limit is a maximum number of responses to return for a list call. Default and maximum value of the limit is 50.\nIf more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results.", + "name": "limit", + "in": "query" + }, + { + "type": "integer", + "format": "int64", + "description": "offset is the next index number from which the response will start. The response offset value can be used along with continue token for the pagination.", + "name": "offset", + "in": "query" + }, + { + "type": "string", + "description": "continue token to paginate the subsequent data items", + "name": "continue", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1Users" + } + } + } + }, + "post": { + "description": "A user is created for the given user context", + "tags": [ + "v1" + ], + "summary": "Create User", + "operationId": "v1UsersCreate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1UserEntity" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + } + }, + "/v1/users/assets/locations": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the specified users location", + "operationId": "v1UsersAssetsLocationGet", + "parameters": [ + { + "type": "string", + "description": "Filters can be combined with AND, OR operators with field path name. Eg: metadata.name=TestServiceANDspec.cloudType=aws\n\nServer will be restricted to certain fields based on the indexed data for each resource.", + "name": "filters", + "in": "query" + }, + { + "type": "string", + "description": "Specify the fields with sort order. 1 indicates ascending and -1 for descending. Eg: orderBy=metadata.name=1,metadata.uid=-1", + "name": "orderBy", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1UserAssetsLocations" + } + } + } + } + }, + "/v1/users/assets/locations/azure": { + "post": { + "tags": [ + "v1" + ], + "summary": "Create a Azure location", + "operationId": "v1UsersAssetsLocationAzureCreate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1UserAssetsLocationAzure" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + } + }, + "/v1/users/assets/locations/azure/{uid}": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the specified Azure location", + "operationId": "v1UsersAssetsLocationAzureGet", + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1UserAssetsLocationAzure" + } + } + } + }, + "put": { + "tags": [ + "v1" + ], + "summary": "Updates the specified Azure location", + "operationId": "v1UsersAssetsLocationAzureUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1UserAssetsLocationAzure" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Specify the Azure location uid", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/users/assets/locations/gcp": { + "post": { + "tags": [ + "v1" + ], + "summary": "Create a GCP location", + "operationId": "v1UsersAssetsLocationGcpCreate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1UserAssetsLocationGcp" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + } + }, + "/v1/users/assets/locations/gcp/{uid}": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the specified GCP location", + "operationId": "v1UsersAssetsLocationGcpGet", + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1UserAssetsLocationGcp" + } + } + } + }, + "put": { + "tags": [ + "v1" + ], + "summary": "Updates the specified GCP location", + "operationId": "v1UsersAssetsLocationGcpUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1UserAssetsLocationGcp" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Specify the GCP location uid", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/users/assets/locations/minio": { + "post": { + "tags": [ + "v1" + ], + "summary": "Create a MinIO location", + "operationId": "v1UsersAssetsLocationMinioCreate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1UserAssetsLocationS3" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + } + }, + "/v1/users/assets/locations/minio/{uid}": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the specified MinIO location", + "operationId": "v1UsersAssetsLocationMinioGet", + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1UserAssetsLocationS3" + } + } + } + }, + "put": { + "tags": [ + "v1" + ], + "summary": "Updates the specified MinIO location", + "operationId": "v1UsersAssetsLocationMinioUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1UserAssetsLocationS3" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Specify the MinIO location uid", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/users/assets/locations/s3": { + "post": { + "tags": [ + "v1" + ], + "summary": "Create a S3 location", + "operationId": "v1UsersAssetsLocationS3Create", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1UserAssetsLocationS3" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + } + }, + "/v1/users/assets/locations/s3/{uid}": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the specified S3 location", + "operationId": "v1UsersAssetsLocationS3Get", + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1UserAssetsLocationS3" + } + } + } + }, + "put": { + "tags": [ + "v1" + ], + "summary": "Updates the specified S3 location", + "operationId": "v1UsersAssetsLocationS3Update", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1UserAssetsLocationS3" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "delete": { + "tags": [ + "v1" + ], + "summary": "Returns the specified S3 location", + "operationId": "v1UsersAssetsLocationS3Delete", + "responses": { + "204": { + "description": "The resource was deleted successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Specify the S3 location uid", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/users/assets/locations/{type}/{uid}/default": { + "patch": { + "tags": [ + "v1" + ], + "summary": "Update the default backup location", + "operationId": "v1UsersAssetsLocationDefaultUpdate", + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Specify the location uid", + "name": "uid", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Specify the location type [aws/azure/gcp/minio/s3]", + "name": "type", + "in": "path", + "required": true + } + ] + }, + "/v1/users/assets/locations/{uid}": { + "delete": { + "tags": [ + "v1" + ], + "summary": "Deletes the specified location", + "operationId": "v1UsersAssetsLocationDelete", + "responses": { + "204": { + "description": "The resource was deleted successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Specify the location uid", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/users/assets/sshkeys": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the SSH keys", + "operationId": "v1UsersAssetsSshGet", + "parameters": [ + { + "type": "string", + "description": "Filters can be combined with AND, OR operators with field path name. Eg: metadata.name=TestServiceANDspec.cloudType=aws\n\nServer will be restricted to certain fields based on the indexed data for each resource.", + "name": "filters", + "in": "query" + }, + { + "type": "string", + "description": "Specify the fields with sort order. 1 indicates ascending and -1 for descending. Eg: orderBy=metadata.name=1,metadata.uid=-1", + "name": "orderBy", + "in": "query" + } + ], + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1UserAssetsSsh" + } + } + } + }, + "post": { + "tags": [ + "v1" + ], + "summary": "Creates a SSH key", + "operationId": "v1UserAssetsSshCreate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1UserAssetSshEntity" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + } + }, + "/v1/users/assets/sshkeys/{uid}": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the specified user ssh key", + "operationId": "v1UsersAssetSshGetUid", + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1UserAssetSsh" + } + } + } + }, + "put": { + "tags": [ + "v1" + ], + "summary": "Updates the specified user ssh key", + "operationId": "v1UsersAssetSshUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1UserAssetSsh" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "delete": { + "tags": [ + "v1" + ], + "summary": "Returns the specified user ssh key", + "operationId": "v1UsersAssetSshDelete", + "responses": { + "204": { + "description": "The resource was deleted successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Specify the SSH key uid", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/users/assets/vsphere/dnsMapping": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the specified vSphere DNS mapping", + "operationId": "v1VsphereMappingGet", + "parameters": [ + { + "type": "string", + "description": "Specify the vSphere gateway uid", + "name": "gatewayUid", + "in": "query", + "required": true + }, + { + "type": "string", + "description": "Specify the vSphere datacenter name", + "name": "datacenter", + "in": "query", + "required": true + }, + { + "type": "string", + "description": "Specify the vSphere network name", + "name": "network", + "in": "query", + "required": true + } + ], + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1VsphereDnsMapping" + } + } + } + } + }, + "/v1/users/assets/vsphere/dnsMappings": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the specified vSphere DNS mappings", + "operationId": "v1VsphereDnsMappingsGet", + "parameters": [ + { + "type": "string", + "description": "Filters can be combined with AND, OR operators with field path name. Eg: metadata.name=TestServiceANDspec.cloudType=aws\n\nServer will be restricted to certain fields based on the indexed data for each resource.", + "name": "filters", + "in": "query" + }, + { + "type": "string", + "description": "Specify the fields with sort order. 1 indicates ascending and -1 for descending. Eg: orderBy=metadata.name=1,metadata.uid=-1", + "name": "orderBy", + "in": "query" + } + ], + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1VsphereDnsMappings" + } + } + } + }, + "post": { + "tags": [ + "v1" + ], + "summary": "Create a vSphere DNS mapping", + "operationId": "v1VsphereDnsMappingCreate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1VsphereDnsMapping" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + } + }, + "/v1/users/assets/vsphere/dnsMappings/{uid}": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the specified vSphere DNS mapping", + "operationId": "v1VsphereDnsMappingGet", + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1VsphereDnsMapping" + } + } + } + }, + "put": { + "tags": [ + "v1" + ], + "summary": "Updates the specified vSphere DNS mapping", + "operationId": "v1VsphereDnsMappingUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1VsphereDnsMapping" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "delete": { + "tags": [ + "v1" + ], + "summary": "Deletes the specified vSphere DNS mapping", + "operationId": "v1VsphereDnsMappingDelete", + "responses": { + "204": { + "description": "The resource was deleted successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "description": "Specify the vSphere DNS mapping uid", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/users/auth/tokens/revoke": { + "post": { + "tags": [ + "v1" + ], + "summary": "Revoke access of specific token(s)", + "operationId": "v1UsersAuthTokensRevoke", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1AuthTokenRevoke" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + } + }, + "/v1/users/config/scar": { + "get": { + "tags": [ + "v1" + ], + "summary": "Get the system Spectro repository. Restricted to edge services", + "operationId": "V1UsersConfigScarGet", + "responses": { + "200": { + "description": "(empty)", + "schema": { + "$ref": "#/definitions/v1SystemScarSpec" + } + } + } + } + }, + "/v1/users/info": { + "get": { + "description": "Returns a basic information of User for the specified uid.", + "tags": [ + "v1" + ], + "summary": "Returns the base information of specified User", + "operationId": "v1UsersInfoGet", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1UserInfo" + } + } + } + } + }, + "/v1/users/kubectl/session/{sessionUid}": { + "get": { + "description": "gets users kubectl session", + "tags": [ + "v1" + ], + "summary": "gets users kubectl session", + "operationId": "V1UsersKubectlSessionUid", + "parameters": [ + { + "type": "string", + "name": "sessionUid", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1UserKubectlSession" + } + } + } + } + }, + "/v1/users/meta": { + "get": { + "tags": [ + "v1" + ], + "summary": "Retrieves a list of users metadata", + "operationId": "v1UsersMetadata", + "responses": { + "200": { + "description": "An array of users metadata items", + "schema": { + "$ref": "#/definitions/v1UsersMetadata" + } + } + } + } + }, + "/v1/users/password/change": { + "patch": { + "description": "User password change request via current password and emailId", + "tags": [ + "v1" + ], + "summary": "User password change request using the user emailId", + "operationId": "V1UsersPasswordChange", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "type": "object", + "required": [ + "newPassword", + "emailId", + "currentPassword" + ], + "properties": { + "currentPassword": { + "type": "string" + }, + "emailId": { + "type": "string" + }, + "newPassword": { + "type": "string" + } + } + } + } + ], + "responses": { + "204": { + "description": "Ok response without content", + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + } + }, + "/v1/users/password/reset": { + "patch": { + "description": "User password request will be sent to the supplied emailId", + "tags": [ + "v1" + ], + "summary": "User password reset request using the email id", + "operationId": "v1UsersEmailPasswordReset", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "type": "object", + "required": [ + "emailId" + ], + "properties": { + "emailId": { + "type": "string" + } + } + } + } + ], + "responses": { + "204": { + "description": "Ok response without content", + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + } + }, + "/v1/users/summary": { + "post": { + "tags": [ + "v1" + ], + "summary": "Retrieves a list of users summary with provided filter spec", + "operationId": "v1UsersSummaryGet", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1UsersSummarySpec" + } + } + ], + "responses": { + "200": { + "description": "An array of users summary items", + "schema": { + "$ref": "#/definitions/v1UsersSummaryList" + } + } + } + } + }, + "/v1/users/system/features": { + "get": { + "description": "Returns the users system feature", + "tags": [ + "v1" + ], + "summary": "Returns the users system feature", + "operationId": "v1UsersSystemFeature", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1SystemFeatures" + } + } + } + } + }, + "/v1/users/system/macros": { + "get": { + "tags": [ + "v1" + ], + "summary": "List the macros of the system", + "operationId": "v1UsersSystemMacrosList", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1Macros" + } + } + } + }, + "put": { + "tags": [ + "v1" + ], + "summary": "Update the macros of the system", + "operationId": "v1UsersSystemMacrosUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1Macros" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "post": { + "tags": [ + "v1" + ], + "summary": "Create or add new macros for the system user", + "operationId": "v1UsersSystemMacrosCreate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1Macros" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "delete": { + "tags": [ + "v1" + ], + "summary": "Delete the macros for the system user by macro name", + "operationId": "v1UsersSystemMacrosDeleteByMacroName", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1Macros" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "patch": { + "tags": [ + "v1" + ], + "summary": "Update the macros for the system user by macro name", + "operationId": "v1UsersSystemMacrosUpdateByMacroName", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1Macros" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + } + }, + "/v1/users/{uid}": { + "get": { + "description": "Returns a User for the specified uid.", + "tags": [ + "v1" + ], + "summary": "Returns the specified User", + "operationId": "v1UsersUidGet", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1User" + } + } + } + }, + "put": { + "description": "A user is created for the given user context", + "tags": [ + "v1" + ], + "summary": "Update User", + "operationId": "v1UsersUidUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1UserUpdateEntity" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "delete": { + "description": "Deletes the specified User for given uid", + "tags": [ + "v1" + ], + "summary": "Deletes the specified User", + "operationId": "v1UsersUidDelete", + "responses": { + "204": { + "description": "The resource was deleted successfully" + } + } + }, + "patch": { + "description": "User is patched for the specified information", + "tags": [ + "v1" + ], + "summary": "Patches the specified User", + "operationId": "v1UsersUidPatch", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1UserPatch" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/users/{uid}/password/change": { + "patch": { + "description": "User password change request via current password", + "tags": [ + "v1" + ], + "summary": "User password change request using the user uid", + "operationId": "v1UsersUidPasswordChange", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "type": "object", + "required": [ + "newPassword" + ], + "properties": { + "currentPassword": { + "type": "string" + }, + "newPassword": { + "type": "string" + } + } + } + } + ], + "responses": { + "204": { + "description": "Ok response without content", + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/users/{uid}/password/reset": { + "patch": { + "description": "User password reset request, will send the password reset option through the emailId", + "tags": [ + "v1" + ], + "summary": "User password reset request using the user uid", + "operationId": "v1UsersUidPasswordReset", + "responses": { + "204": { + "description": "Ok response without content", + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/users/{uid}/projects": { + "get": { + "description": "Returns a User with projects and roles", + "tags": [ + "v1" + ], + "summary": "Returns the specified User Projects and Roles information", + "operationId": "v1UsersProjectRoles", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1ProjectRolesEntity" + } + } + } + }, + "put": { + "description": "User is updated with projects and roles", + "tags": [ + "v1" + ], + "summary": "Updates the projects and roles for user", + "operationId": "v1UsersProjectRolesPut", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1ProjectRolesPatch" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/users/{uid}/resourceRoles": { + "get": { + "description": "Returns resource roles for user", + "tags": [ + "v1" + ], + "summary": "Returns the specified individual and resource roles for a user", + "operationId": "v1UsersUidResourceRoles", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1ResourceRoles" + } + } + } + }, + "post": { + "description": "Resource roles added to specific user", + "tags": [ + "v1" + ], + "summary": "Add resource roles for user", + "operationId": "v1UsersUidResourceRolesCreate", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1ResourceRolesUpdateEntity" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/users/{uid}/resourceRoles/{resourceRoleUid}": { + "delete": { + "tags": [ + "v1" + ], + "summary": "Deleted the resource roles from user", + "operationId": "v1UsersUidResourceRolesUidDelete", + "responses": { + "204": { + "description": "The resource was deleted successfully" + } + } + }, + "patch": { + "description": "Specific resource roles fo user is updated", + "tags": [ + "v1" + ], + "summary": "Updates the resource roles for user", + "operationId": "v1UsersResourceRolesUidUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1ResourceRolesUpdateEntity" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + }, + { + "type": "string", + "name": "resourceRoleUid", + "in": "path", + "required": true + } + ] + }, + "/v1/users/{uid}/roles": { + "get": { + "description": "Returns roles clubbed from team", + "tags": [ + "v1" + ], + "summary": "Returns the specified individual and team roles for a user", + "operationId": "v1UsersUidRoles", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1UserRolesEntity" + } + } + } + }, + "put": { + "description": "User is updated with roles", + "tags": [ + "v1" + ], + "summary": "Updates the roles for user", + "operationId": "v1UsersUidRolesUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1UserRoleUIDs" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/users/{uid}/status/loginMode": { + "patch": { + "tags": [ + "v1" + ], + "summary": "Users status login mode", + "operationId": "v1UsersStatusLoginMode", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1UserStatusLoginMode" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/workspaces": { + "post": { + "tags": [ + "v1" + ], + "summary": "Create workspace", + "operationId": "v1WorkspacesCreate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1WorkspaceEntity" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + } + }, + "/v1/workspaces/teams/{teamUid}/roles": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the specified team's workspaces and roles data", + "operationId": "v1TeamsWorkspaceGetRoles", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1WorkspaceScopeRoles" + } + } + } + }, + "put": { + "tags": [ + "v1" + ], + "summary": "Updates the workspace roles for the specified team", + "operationId": "v1TeamsWorkspaceRolesPut", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1WorkspacesRolesPatch" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "name": "teamUid", + "in": "path", + "required": true + } + ] + }, + "/v1/workspaces/users/{userUid}/roles": { + "get": { + "description": "Returns a User with workspaces and roles", + "tags": [ + "v1" + ], + "summary": "Returns the specified User workspaces and Roles information", + "operationId": "v1UsersWorkspaceGetRoles", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1WorkspaceScopeRoles" + } + } + } + }, + "put": { + "description": "User is updated with workspace roles", + "tags": [ + "v1" + ], + "summary": "Updates the workspace roles for user", + "operationId": "v1UsersWorkspaceRolesPut", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1WorkspacesRolesPatch" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "name": "userUid", + "in": "path", + "required": true + } + ] + }, + "/v1/workspaces/validate/name": { + "get": { + "tags": [ + "v1" + ], + "summary": "Validates the workspace name", + "operationId": "v1WorkspacesValidateName", + "parameters": [ + { + "type": "string", + "name": "name", + "in": "query", + "required": true + } + ], + "responses": { + "204": { + "description": "Ok response without content", + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + } + }, + "/v1/workspaces/{uid}": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the specified workspace", + "operationId": "v1WorkspacesUidGet", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1Workspace" + } + } + } + }, + "delete": { + "tags": [ + "v1" + ], + "summary": "Deletes the specified workspace", + "operationId": "v1WorkspacesUidDelete", + "responses": { + "204": { + "description": "The resource was deleted successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/workspaces/{uid}/backup": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the workspace backup result", + "operationId": "v1WorkspaceOpsBackupGet", + "parameters": [ + { + "type": "string", + "name": "backupRequestUid", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1WorkspaceBackup" + } + } + } + }, + "put": { + "tags": [ + "v1" + ], + "summary": "Update workspace backup settings", + "operationId": "v1WorkspaceOpsBackupUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1WorkspaceBackupConfigEntity" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "post": { + "tags": [ + "v1" + ], + "summary": "Create workspace backup settings", + "operationId": "v1WorkspaceOpsBackupCreate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1WorkspaceBackupConfigEntity" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + }, + "delete": { + "tags": [ + "v1" + ], + "summary": "Delete workspace backup", + "operationId": "v1WorkspaceOpsBackupDelete", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1WorkspaceBackupDeleteEntity" + } + } + ], + "responses": { + "204": { + "description": "The resource was deleted successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/workspaces/{uid}/backup/onDemand": { + "post": { + "tags": [ + "v1" + ], + "summary": "Create On demand Workspace Backup", + "operationId": "v1WorkspaceOpsBackupOnDemandCreate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1WorkspaceBackupConfigEntity" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/workspaces/{uid}/clusterNamespaces": { + "put": { + "tags": [ + "v1" + ], + "summary": "Updates the specified workspace namespaces", + "operationId": "v1WorkspacesUidClusterNamespacesUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1WorkspaceClusterNamespacesEntity" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/workspaces/{uid}/clusterRbacs": { + "post": { + "tags": [ + "v1" + ], + "summary": "Create cluster rbac in workspace", + "operationId": "v1WorkspacesClusterRbacCreate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1ClusterRbac" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/workspaces/{uid}/clusterRbacs/{clusterRbacUid}": { + "put": { + "tags": [ + "v1" + ], + "summary": "Updates the specified workspace cluster rbac", + "operationId": "v1WorkspacesUidClusterRbacUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1ClusterRbac" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "delete": { + "tags": [ + "v1" + ], + "summary": "Deletes the specified workspace cluster rbac", + "operationId": "v1WorkspacesUidClusterRbacDelete", + "responses": { + "204": { + "description": "The resource was deleted successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + }, + { + "type": "string", + "name": "clusterRbacUid", + "in": "path", + "required": true + } + ] + }, + "/v1/workspaces/{uid}/meta": { + "put": { + "tags": [ + "v1" + ], + "summary": "Updates the specified workspace meta", + "operationId": "v1WorkspacesUidMetaUpdate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1ObjectMeta" + } + } + ], + "responses": { + "204": { + "description": "The resource was updated successfully" + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/workspaces/{uid}/restore": { + "get": { + "tags": [ + "v1" + ], + "summary": "Returns the workspace restore result", + "operationId": "v1WorkspaceOpsRestoreGet", + "parameters": [ + { + "type": "string", + "name": "restoreRequestUid", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1WorkspaceRestore" + } + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + }, + "/v1/workspaces/{uid}/restore/onDemand": { + "post": { + "tags": [ + "v1" + ], + "summary": "Create On demand Workspace Restore", + "operationId": "v1WorkspaceOpsRestoreOnDemandCreate", + "parameters": [ + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/v1WorkspaceRestoreConfigEntity" + } + } + ], + "responses": { + "201": { + "description": "Created successfully", + "schema": { + "$ref": "#/definitions/v1Uid" + }, + "headers": { + "AuditUid": { + "type": "string", + "description": "Audit uid for the request" + } + } + } + } + }, + "parameters": [ + { + "type": "string", + "name": "uid", + "in": "path", + "required": true + } + ] + } + }, + "definitions": { + "V1AwsAccountSts": { + "description": "AWS cloud account sts", + "type": "object", + "properties": { + "accountId": { + "description": "A 12-digit number, such as 123456789012, that uniquely identifies an AWS account", + "type": "string" + }, + "externalId": { + "description": "It can be passed to the AssumeRole API of the STS. It can be used in the condition element in a role's trust policy, allowing the role to be assumed only when a certain value is present in the external ID", + "type": "string" + }, + "partition": { + "$ref": "#/definitions/v1AwsPartition" + } + } + }, + "V1AwsPropertiesValidateSpec": { + "description": "AWS properties validate spec", + "type": "object", + "properties": { + "region": { + "type": "string" + }, + "sshKeyName": { + "type": "string" + } + } + }, + "V1EksPropertiesValidateSpec": { + "description": "Eks properties validate spec", + "type": "object", + "properties": { + "cloudAccountUid": { + "type": "string" + }, + "name": { + "type": "string" + }, + "region": { + "type": "string" + }, + "sshKeyName": { + "type": "string" + }, + "subnets": { + "type": "array", + "items": { + "type": "string" + } + }, + "vpcId": { + "type": "string" + } + } + }, + "V1Error": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "details": { + "type": "object" + }, + "message": { + "type": "string" + }, + "ref": { + "type": "string" + } + } + }, + "V1GcpPropertiesValidateSpec": { + "description": "Gcp properties validate spec", + "type": "object", + "properties": { + "azs": { + "type": "array", + "items": { + "type": "string" + } + }, + "cloudAccountUid": { + "type": "string" + }, + "projectId": { + "type": "string" + }, + "region": { + "type": "string" + } + } + }, + "V1PasswordsBlockList": { + "description": "List of blocklisted passwords", + "type": "object", + "properties": { + "spec": { + "$ref": "#/definitions/v1PasswordsBlockListEntity" + } + } + }, + "v1.AzureAccountEntitySpec": { + "type": "object", + "properties": { + "clientCloud": { + "description": "Contains configuration for Azure cloud", + "type": "string", + "default": "public", + "enum": [ + "azure-china", + "azure-government", + "public" + ] + }, + "clientId": { + "type": "string" + }, + "clientSecret": { + "type": "string" + }, + "subscriptionId": { + "type": "string" + }, + "tenantId": { + "type": "string" + } + } + }, + "v1.CloudWatchConfig": { + "description": "Cloud watch config entity", + "type": "object", + "properties": { + "credentials": { + "$ref": "#/definitions/v1AwsCloudAccount" + }, + "group": { + "description": "Name of the group", + "type": "string" + }, + "region": { + "description": "Name of the region", + "type": "string" + }, + "stream": { + "description": "Name of the stream", + "type": "string" + } + } + }, + "v1.DataSinkCloudWatchConfig": { + "description": "Data sink cloud watch config", + "type": "object", + "properties": { + "payload": { + "$ref": "#/definitions/v1.DataSinkPayloads" + }, + "spec": { + "$ref": "#/definitions/v1.CloudWatchConfig" + } + } + }, + "v1.DataSinkPayload": { + "description": "Data sink payload entity", + "type": "object", + "properties": { + "refUid": { + "description": "RefUid of the data sink payload", + "type": "string" + }, + "timestamp": { + "$ref": "#/definitions/v1Time" + } + }, + "additionalProperties": { + "type": "object" + } + }, + "v1.DataSinkPayloads": { + "description": "List of data sink payload entities", + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1.DataSinkPayload" + } + }, + "v1.GcpAccountEntitySpec": { + "type": "object", + "properties": { + "jsonCredentials": { + "type": "string" + }, + "jsonCredentialsFileUid": { + "type": "string" + } + } + }, + "v1AADProfile": { + "description": "AADProfile - AAD integration is managed by AKS.", + "type": "object", + "required": [ + "managed", + "adminGroupObjectIDs" + ], + "properties": { + "adminGroupObjectIDs": { + "description": "AdminGroupObjectIDs - AAD group object IDs that will have admin role of the cluster.", + "type": "array", + "items": { + "type": "string" + } + }, + "managed": { + "description": "Managed - Whether to enable managed AAD.", + "type": "boolean", + "x-omitempty": false + } + } + }, + "v1APIEndpoint": { + "description": "APIEndpoint represents a reachable Kubernetes API endpoint.", + "type": "object", + "required": [ + "host", + "port" + ], + "properties": { + "host": { + "description": "The hostname on which the API server is serving.", + "type": "string" + }, + "port": { + "description": "The port on which the API server is serving.", + "type": "integer", + "format": "int32" + } + } + }, + "v1APIServerAccessProfile": { + "description": "APIServerAccessProfile - access profile for AKS API server.", + "type": "object", + "properties": { + "authorizedIPRanges": { + "description": "AuthorizedIPRanges - Authorized IP Ranges to kubernetes API server.", + "type": "array", + "items": { + "type": "string", + "default": "" + } + }, + "enablePrivateCluster": { + "description": "EnablePrivateCluster - Whether to create the cluster as a private cluster or not.", + "type": "boolean" + }, + "enablePrivateClusterPublicFQDN": { + "description": "EnablePrivateClusterPublicFQDN - Whether to create additional public FQDN for private cluster or not.", + "type": "boolean" + }, + "privateDNSZone": { + "description": "PrivateDNSZone - Private dns zone mode for private cluster.", + "type": "string" + } + } + }, + "v1AWSVolumeTypes": { + "description": "AWS Volume Types", + "type": "object", + "properties": { + "volumeTypes": { + "type": "array", + "items": { + "$ref": "#/definitions/v1AwsVolumeType" + } + } + } + }, + "v1AclMeta": { + "description": "Resource access control information (Read-only response data)", + "type": "object", + "properties": { + "ownerUid": { + "description": "User or service uid which created the resource", + "type": "string" + }, + "projectUid": { + "description": "Project's uid if the resource is under a project", + "type": "string" + }, + "tenantUid": { + "description": "Tenant's uid", + "type": "string" + } + } + }, + "v1Address": { + "description": "Tenant Address", + "type": "object", + "properties": { + "addressLine1": { + "type": "string" + }, + "addressLine2": { + "type": "string" + }, + "city": { + "type": "string" + }, + "country": { + "type": "string" + }, + "pincode": { + "type": "string" + }, + "state": { + "type": "string" + } + } + }, + "v1Alert": { + "type": "object", + "properties": { + "channels": { + "type": "array", + "items": { + "$ref": "#/definitions/v1Channel" + } + }, + "component": { + "type": "string" + } + } + }, + "v1AlertEntity": { + "type": "object", + "properties": { + "channels": { + "type": "array", + "items": { + "$ref": "#/definitions/v1Channel" + } + } + } + }, + "v1AlertNotificationStatus": { + "type": "object", + "properties": { + "isSucceeded": { + "type": "boolean", + "x-omitempty": false + }, + "message": { + "type": "string" + }, + "time": { + "$ref": "#/definitions/v1Time" + } + } + }, + "v1ApiEndpoint": { + "description": "APIEndpoint represents a reachable Kubernetes API endpoint.", + "type": "object", + "required": [ + "host", + "port" + ], + "properties": { + "host": { + "description": "The hostname on which the API server is serving.", + "type": "string" + }, + "port": { + "description": "The port on which the API server is serving.", + "type": "integer", + "format": "int32" + } + } + }, + "v1ApiKey": { + "description": "API key information", + "type": "object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/v1ApiKeySpec" + }, + "status": { + "$ref": "#/definitions/v1ApiKeyStatus" + } + } + }, + "v1ApiKeyActiveState": { + "properties": { + "isActive": { + "description": "API key active state", + "type": "boolean" + } + } + }, + "v1ApiKeyCreateResponse": { + "description": "Response of create API key", + "type": "object", + "properties": { + "apiKey": { + "description": "Api key is used for authentication", + "type": "string" + }, + "uid": { + "description": "User uid", + "type": "string" + } + } + }, + "v1ApiKeyEntity": { + "description": "API key request payload", + "type": "object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/v1ApiKeySpecEntity" + } + } + }, + "v1ApiKeySpec": { + "description": "API key specification", + "type": "object", + "properties": { + "expiry": { + "description": "API key expiry date", + "$ref": "#/definitions/v1Time" + }, + "key": { + "description": "Deprecated: API key field will be no longer available", + "type": "string" + }, + "user": { + "description": "User to whom the API key is created", + "$ref": "#/definitions/v1ApiKeyUser" + } + } + }, + "v1ApiKeySpecEntity": { + "description": "API key specification", + "type": "object", + "properties": { + "expiry": { + "description": "API key expiry date", + "$ref": "#/definitions/v1Time" + }, + "userUid": { + "description": "User to whom the API key has to be created", + "type": "string" + } + } + }, + "v1ApiKeySpecUpdate": { + "description": "API key update request specification", + "properties": { + "expiry": { + "description": "API key expiry date", + "$ref": "#/definitions/v1Time" + } + } + }, + "v1ApiKeyStatus": { + "description": "API key status", + "type": "object", + "properties": { + "isActive": { + "description": "API key active state", + "type": "boolean" + } + } + }, + "v1ApiKeyUpdate": { + "description": "API key update request payload", + "type": "object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/v1ApiKeySpecUpdate" + } + } + }, + "v1ApiKeyUser": { + "description": "API key user information", + "type": "object", + "properties": { + "firstName": { + "description": "First name of user", + "type": "string" + }, + "lastName": { + "description": "Last name of user", + "type": "string" + }, + "uid": { + "description": "User uid", + "type": "string" + } + } + }, + "v1ApiKeys": { + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": { + "description": "List of API keys", + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1ApiKey" + } + } + } + }, + "v1AppDeployment": { + "description": "Application deployment response", + "type": "object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/v1AppDeploymentSpec" + }, + "status": { + "$ref": "#/definitions/v1AppDeploymentStatus" + } + } + }, + "v1AppDeploymentClusterGroupConfigEntity": { + "description": "Application deployment cluster group config", + "type": "object", + "properties": { + "targetSpec": { + "$ref": "#/definitions/v1AppDeploymentClusterGroupTargetSpec" + } + } + }, + "v1AppDeploymentClusterGroupEntity": { + "description": "Application deployment cluster group request payload", + "type": "object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectMetaInputEntity" + }, + "spec": { + "$ref": "#/definitions/v1AppDeploymentClusterGroupSpec" + } + } + }, + "v1AppDeploymentClusterGroupSpec": { + "description": "Application deployment cluster group spec", + "type": "object", + "properties": { + "config": { + "$ref": "#/definitions/v1AppDeploymentClusterGroupConfigEntity" + }, + "profile": { + "$ref": "#/definitions/v1AppDeploymentProfileEntity" + } + } + }, + "v1AppDeploymentClusterGroupTargetSpec": { + "description": "Application deployment cluster group target spec", + "type": "object", + "required": [ + "clusterName", + "clusterGroupUid" + ], + "properties": { + "clusterGroupUid": { + "description": "Application deployment cluster group uid", + "type": "string" + }, + "clusterLimits": { + "$ref": "#/definitions/v1AppDeploymentTargetClusterLimits" + }, + "clusterName": { + "description": "Application deployment virtual cluster name", + "type": "string" + } + } + }, + "v1AppDeploymentClusterHealth": { + "description": "Application deployment cluster health status", + "properties": { + "state": { + "type": "string" + } + } + }, + "v1AppDeploymentClusterRef": { + "description": "Application deployment cluster reference", + "type": "object", + "properties": { + "deploymentClusterType": { + "description": "Application deployment source cluster type[ \"virtualCluster\", \"hostCluster\" ]", + "type": "string", + "enum": [ + "virtual", + "host" + ] + }, + "name": { + "description": "Application deployment cluster name", + "type": "string" + }, + "uid": { + "description": "Application deployment cluster uid", + "type": "string" + } + } + }, + "v1AppDeploymentClusterRefSummary": { + "description": "Application deployment cluster reference", + "properties": { + "deploymentClusterType": { + "description": "Application deployment source cluster type[ \"virtualCluster\", \"hostCluster\" ]", + "type": "string", + "enum": [ + "virtual", + "host" + ] + }, + "name": { + "description": "Application deployment source cluster name", + "type": "string" + }, + "uid": { + "description": "Application deployment source cluster uid", + "type": "string" + } + } + }, + "v1AppDeploymentClusterStatus": { + "description": "Application deployment cluster status", + "properties": { + "health": { + "$ref": "#/definitions/v1AppDeploymentClusterHealth" + }, + "state": { + "type": "string" + } + } + }, + "v1AppDeploymentConfig": { + "description": "Application deployment config response", + "type": "object", + "properties": { + "target": { + "$ref": "#/definitions/v1AppDeploymentTargetConfig" + } + } + }, + "v1AppDeploymentConfigSummary": { + "description": "Application deployment config summary", + "properties": { + "target": { + "$ref": "#/definitions/v1AppDeploymentTargetConfigSummary" + } + } + }, + "v1AppDeploymentFilterSpec": { + "description": "Application deployment filter spec", + "properties": { + "appDeploymentName": { + "$ref": "#/definitions/v1FilterString" + }, + "clusterUids": { + "$ref": "#/definitions/v1FilterArray" + }, + "tags": { + "$ref": "#/definitions/v1FilterArray" + } + } + }, + "v1AppDeploymentNotifications": { + "description": "Application deployment notifications", + "properties": { + "isAvailable": { + "type": "boolean", + "x-omitempty": false + } + } + }, + "v1AppDeploymentProfile": { + "description": "Application deployment profile", + "type": "object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1AppDeploymentProfileMeta" + }, + "template": { + "$ref": "#/definitions/v1AppProfileTemplate" + } + } + }, + "v1AppDeploymentProfileEntity": { + "description": "Application deployment profile request payload", + "type": "object", + "required": [ + "appProfileUid" + ], + "properties": { + "appProfileUid": { + "description": "Application deployment profile uid", + "type": "string" + } + } + }, + "v1AppDeploymentProfileMeta": { + "description": "Application deployment profile metadata", + "type": "object", + "properties": { + "name": { + "description": "Application deployment profile name", + "type": "string" + }, + "uid": { + "description": "Application deployment profile uid", + "type": "string" + }, + "version": { + "description": "Application deployment profile version", + "type": "string" + } + } + }, + "v1AppDeploymentProfileMetadataSummary": { + "description": "Application deployment profile metadata summary", + "properties": { + "name": { + "type": "string" + }, + "uid": { + "type": "string" + }, + "version": { + "type": "string" + } + } + }, + "v1AppDeploymentProfileSpec": { + "description": "Application deployment profile spec", + "type": "object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1AppDeploymentProfileMeta" + }, + "template": { + "$ref": "#/definitions/v1AppProfileTemplateSpec" + } + } + }, + "v1AppDeploymentProfileSummary": { + "description": "Application deployment profile summary", + "properties": { + "metadata": { + "$ref": "#/definitions/v1AppDeploymentProfileMetadataSummary" + }, + "template": { + "$ref": "#/definitions/v1AppProfileTemplateSummary" + } + } + }, + "v1AppDeploymentProfileVersion": { + "description": "Application deployment profile version", + "type": "object", + "properties": { + "uid": { + "description": "Application deployment profile uid", + "type": "string" + }, + "version": { + "description": "Application deployment profile version", + "type": "string" + } + } + }, + "v1AppDeploymentProfileVersions": { + "description": "Application deployment profile versions", + "type": "object", + "properties": { + "availableVersions": { + "description": "Application deployment profile available versions", + "type": "array", + "items": { + "$ref": "#/definitions/v1AppDeploymentProfileVersion" + } + }, + "latestVersions": { + "description": "Application deployment profile latest versions", + "type": "array", + "items": { + "$ref": "#/definitions/v1AppDeploymentProfileVersion" + } + }, + "metadata": { + "$ref": "#/definitions/v1AppDeploymentProfileMeta" + } + } + }, + "v1AppDeploymentSortFields": { + "type": "string", + "enum": [ + "appDeploymentName", + "creationTimestamp", + "lastModifiedTimestamp" + ], + "x-nullable": true + }, + "v1AppDeploymentSortSpec": { + "properties": { + "field": { + "$ref": "#/definitions/v1AppDeploymentSortFields" + }, + "order": { + "$ref": "#/definitions/v1SortOrder" + } + } + }, + "v1AppDeploymentSpec": { + "description": "Application deployment spec", + "type": "object", + "properties": { + "config": { + "$ref": "#/definitions/v1AppDeploymentConfig" + }, + "profile": { + "$ref": "#/definitions/v1AppDeploymentProfile" + } + } + }, + "v1AppDeploymentStatus": { + "description": "Application deployment status", + "type": "object", + "properties": { + "appTiers": { + "description": "Application deployment tiers", + "type": "array", + "items": { + "$ref": "#/definitions/v1ClusterPackStatus" + } + }, + "lifecycleStatus": { + "$ref": "#/definitions/v1LifecycleStatus" + }, + "state": { + "description": "Application deployment state [ \"Pending\", \"Deploying\", \"Deployed\", \"Updating\" ]", + "type": "string" + } + } + }, + "v1AppDeploymentStatusSummary": { + "description": "Application deployment status summary", + "type": "object", + "properties": { + "cluster": { + "$ref": "#/definitions/v1AppDeploymentClusterStatus" + }, + "notifications": { + "$ref": "#/definitions/v1AppDeploymentNotifications" + }, + "state": { + "type": "string" + } + } + }, + "v1AppDeploymentSummary": { + "description": "Application deployment summary", + "type": "object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "description": "Application deployment spec summary", + "type": "object", + "properties": { + "config": { + "$ref": "#/definitions/v1AppDeploymentConfigSummary" + }, + "profile": { + "$ref": "#/definitions/v1AppDeploymentProfileSummary" + } + } + }, + "status": { + "$ref": "#/definitions/v1AppDeploymentStatusSummary" + } + } + }, + "v1AppDeploymentTargetClusterLimits": { + "description": "Application deployment target cluster limits", + "properties": { + "cpu": { + "description": "CPU cores", + "type": "integer", + "format": "int32" + }, + "memoryMiB": { + "description": "Memory in MiB", + "type": "integer", + "format": "int32" + }, + "storageGiB": { + "description": "Storage in GiB", + "type": "integer", + "format": "int32" + } + } + }, + "v1AppDeploymentTargetConfig": { + "description": "Application deployment target config response", + "type": "object", + "properties": { + "clusterRef": { + "$ref": "#/definitions/v1AppDeploymentClusterRef" + }, + "envRef": { + "$ref": "#/definitions/v1AppDeploymentTargetEnvironmentRef" + } + } + }, + "v1AppDeploymentTargetConfigSummary": { + "description": "Application deployment target config summary", + "properties": { + "clusterRef": { + "$ref": "#/definitions/v1AppDeploymentClusterRefSummary" + } + } + }, + "v1AppDeploymentTargetEnvironmentRef": { + "description": "Application deployment target environment reference", + "type": "object", + "properties": { + "name": { + "description": "Application deployment target resource name", + "type": "string" + }, + "type": { + "description": "Application deployment target resource type [ \"nestedCluster\", \"clusterGroup\" ]", + "type": "string" + }, + "uid": { + "description": "Application deployment target resource uid", + "type": "string" + } + } + }, + "v1AppDeploymentVirtualClusterConfigEntity": { + "description": "Application deployment virtual cluster config", + "type": "object", + "properties": { + "targetSpec": { + "$ref": "#/definitions/v1AppDeploymentVirtualClusterTargetSpec" + } + } + }, + "v1AppDeploymentVirtualClusterEntity": { + "description": "Application deployment virtual cluster request payload", + "type": "object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectMetaInputEntity" + }, + "spec": { + "$ref": "#/definitions/v1AppDeploymentVirtualClusterSpec" + } + } + }, + "v1AppDeploymentVirtualClusterSpec": { + "description": "Application deployment virtual cluster spec", + "type": "object", + "properties": { + "config": { + "$ref": "#/definitions/v1AppDeploymentVirtualClusterConfigEntity" + }, + "profile": { + "$ref": "#/definitions/v1AppDeploymentProfileEntity" + } + } + }, + "v1AppDeploymentVirtualClusterTargetSpec": { + "description": "Application deployment virtual cluster target spec", + "type": "object", + "required": [ + "clusterUid" + ], + "properties": { + "clusterUid": { + "description": "Application deployment virtual cluster uid", + "type": "string" + } + } + }, + "v1AppDeploymentsFilterSpec": { + "description": "Application deployment filter summary spec", + "properties": { + "filter": { + "$ref": "#/definitions/v1AppDeploymentFilterSpec" + }, + "sort": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1AppDeploymentSortSpec" + } + } + } + }, + "v1AppDeploymentsSummary": { + "type": "object", + "properties": { + "appDeployments": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1AppDeploymentSummary" + } + }, + "listmeta": { + "$ref": "#/definitions/v1ListMetaData" + } + } + }, + "v1AppProfile": { + "description": "Application profile response", + "type": "object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "type": "object", + "properties": { + "parentUid": { + "description": "Application profile parent profile uid", + "type": "string" + }, + "template": { + "$ref": "#/definitions/v1AppProfileTemplate" + }, + "version": { + "description": "Application profile version", + "type": "string" + }, + "versions": { + "description": "Application profile versions list", + "type": "array", + "items": { + "$ref": "#/definitions/v1AppProfileVersion" + } + } + } + }, + "status": { + "description": "Application profile status", + "type": "object", + "properties": { + "inUseApps": { + "description": "Application profile apps array", + "type": "array", + "items": { + "$ref": "#/definitions/v1ObjectResReference" + } + } + } + } + } + }, + "v1AppProfileCloneEntity": { + "description": "Application profile clone request payload", + "type": "object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1AppProfileCloneMetaInputEntity" + } + } + }, + "v1AppProfileCloneMetaInputEntity": { + "description": "Application profile clone metadata", + "type": "object", + "required": [ + "name" + ], + "properties": { + "name": { + "description": "Application profile name", + "type": "string" + }, + "target": { + "$ref": "#/definitions/v1AppProfileCloneTarget" + }, + "version": { + "description": "Application profile version", + "type": "string" + } + } + }, + "v1AppProfileCloneTarget": { + "description": "Application profile clone target", + "type": "object", + "properties": { + "projectUid": { + "description": "Application profile clone target project uid", + "type": "string" + } + } + }, + "v1AppProfileEntity": { + "description": "Application profile request payload", + "type": "object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectMetaInputEntity" + }, + "spec": { + "description": "Application profile spec", + "type": "object", + "properties": { + "template": { + "$ref": "#/definitions/v1AppProfileTemplateEntity" + }, + "version": { + "description": "Application profile version", + "type": "string" + } + } + } + } + }, + "v1AppProfileFilterSpec": { + "description": "Application profile filter spec", + "properties": { + "profileName": { + "$ref": "#/definitions/v1FilterString" + }, + "tags": { + "$ref": "#/definitions/v1FilterArray" + }, + "version": { + "$ref": "#/definitions/v1FilterVersionString" + } + } + }, + "v1AppProfileMetaEntity": { + "description": "Application profile metadata request payload", + "type": "object", + "required": [ + "metadata" + ], + "properties": { + "metadata": { + "$ref": "#/definitions/v1AppProfileMetaUpdateEntity" + }, + "version": { + "description": "Application profile version", + "type": "string" + } + } + }, + "v1AppProfileMetaUpdateEntity": { + "description": "Application profile metadata update request payload", + "type": "object", + "properties": { + "annotations": { + "description": "Application profile annotations", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "labels": { + "description": "Application profile labels", + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + }, + "v1AppProfileMetadata": { + "description": "Application profile metadata summary", + "type": "object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectEntity" + }, + "spec": { + "properties": { + "version": { + "type": "string" + } + } + } + } + }, + "v1AppProfileSortFields": { + "type": "string", + "enum": [ + "profileName", + "creationTimestamp", + "lastModifiedTimestamp" + ], + "x-nullable": true + }, + "v1AppProfileSortSpec": { + "properties": { + "field": { + "$ref": "#/definitions/v1AppProfileSortFields" + }, + "order": { + "$ref": "#/definitions/v1SortOrder" + } + } + }, + "v1AppProfileSummary": { + "description": "Application profile summary", + "type": "object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "description": "Application profile spec summary", + "type": "object", + "properties": { + "parentUid": { + "type": "string" + }, + "template": { + "$ref": "#/definitions/v1AppProfileTemplateSummary" + }, + "version": { + "type": "string" + }, + "versions": { + "description": "Application profile's list of all the versions", + "type": "array", + "items": { + "$ref": "#/definitions/v1AppProfileVersion" + } + } + } + } + } + }, + "v1AppProfileTemplate": { + "description": "Application profile template information", + "type": "object", + "properties": { + "appTiers": { + "description": "Application profile tiers", + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1AppTierRef" + } + }, + "registryRefs": { + "description": "Application profile registries reference", + "type": "array", + "items": { + "$ref": "#/definitions/v1ObjectReference" + } + } + } + }, + "v1AppProfileTemplateEntity": { + "description": "Application profile template spec", + "type": "object", + "properties": { + "appTiers": { + "description": "Application profile tiers", + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1AppTierEntity" + } + } + } + }, + "v1AppProfileTemplateSpec": { + "description": "Application profile template specs", + "type": "object", + "properties": { + "appTiers": { + "description": "Application profile tiers", + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1AppTier" + } + }, + "registryRefs": { + "description": "Application profile registries reference", + "type": "array", + "items": { + "$ref": "#/definitions/v1ObjectReference" + } + } + } + }, + "v1AppProfileTemplateSummary": { + "description": "Application profile template summary", + "type": "object", + "properties": { + "appTiers": { + "type": "array", + "items": { + "$ref": "#/definitions/v1AppTierSummary" + } + } + } + }, + "v1AppProfileTiers": { + "description": "Application profile tiers information", + "type": "object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/v1AppProfileTiersSpec" + } + } + }, + "v1AppProfileTiersSpec": { + "description": "Application profile tiers information", + "type": "object", + "properties": { + "appTiers": { + "description": "Application profile tiers", + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1AppTier" + } + } + } + }, + "v1AppProfileVersion": { + "description": "Application profile version", + "type": "object", + "properties": { + "uid": { + "type": "string" + }, + "version": { + "type": "string" + } + } + }, + "v1AppProfilesFilterSpec": { + "description": "Application profile filter summary spec", + "properties": { + "filter": { + "$ref": "#/definitions/v1AppProfileFilterSpec" + }, + "sort": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1AppProfileSortSpec" + } + } + } + }, + "v1AppProfilesMetadata": { + "type": "object", + "properties": { + "appProfiles": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1AppProfileMetadata" + } + } + } + }, + "v1AppProfilesSummary": { + "type": "object", + "properties": { + "appProfiles": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1AppProfileSummary" + } + }, + "listmeta": { + "$ref": "#/definitions/v1ListMetaData" + } + } + }, + "v1AppTier": { + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/v1AppTierSpec" + } + } + }, + "v1AppTierEntity": { + "description": "Application tier request payload", + "type": "object", + "required": [ + "name" + ], + "properties": { + "containerRegistryUid": { + "description": "Application tier container registry uid", + "type": "string" + }, + "installOrder": { + "description": "Application tier installation order", + "type": "integer", + "format": "int32" + }, + "manifests": { + "description": "Application tier manifests", + "type": "array", + "items": { + "$ref": "#/definitions/v1ManifestInputEntity" + } + }, + "name": { + "description": "Application tier name", + "type": "string" + }, + "properties": { + "description": "Application tier properties", + "type": "array", + "items": { + "$ref": "#/definitions/v1AppTierPropertyEntity" + } + }, + "registryUid": { + "description": "Application tier registry uid", + "type": "string" + }, + "sourceAppTierUid": { + "description": "Application tier source pack uid", + "type": "string" + }, + "type": { + "$ref": "#/definitions/v1AppTierType" + }, + "values": { + "description": "Application tier configuration values in yaml format", + "type": "string" + }, + "version": { + "description": "Application tier version", + "type": "string" + } + } + }, + "v1AppTierManifests": { + "description": "Application tier manifests data", + "properties": { + "manifests": { + "description": "Application tier manifests array", + "type": "array", + "items": { + "$ref": "#/definitions/v1Manifest" + } + } + } + }, + "v1AppTierPatchEntity": { + "description": "Application tier patch request payload", + "properties": { + "appTier": { + "$ref": "#/definitions/v1AppTierEntity" + }, + "replaceWithAppTier": { + "description": "Application tier UID to be replaced with new tier", + "type": "string" + } + } + }, + "v1AppTierProperty": { + "description": "Application tier property object", + "properties": { + "format": { + "description": "Application tier property format", + "type": "string" + }, + "name": { + "description": "Application tier property name", + "type": "string" + }, + "type": { + "description": "Application tier property data type", + "type": "string" + }, + "value": { + "description": "Application tier property value", + "type": "string" + } + } + }, + "v1AppTierPropertyEntity": { + "description": "Application tier property object", + "properties": { + "name": { + "description": "Application tier property name", + "type": "string" + }, + "value": { + "description": "Application tier property value", + "type": "string" + } + } + }, + "v1AppTierRef": { + "description": "Application tier reference", + "type": "object", + "properties": { + "name": { + "description": "Application tier name", + "type": "string" + }, + "type": { + "$ref": "#/definitions/v1AppTierType" + }, + "uid": { + "description": "Application tier uid to uniquely identify the tier", + "type": "string" + }, + "version": { + "description": "Application tier version", + "type": "string" + } + } + }, + "v1AppTierResolvedValues": { + "description": "Application tier resolved macro values", + "properties": { + "resolved": { + "description": "Application tier resolved macro values map", + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + }, + "v1AppTierSourceSummary": { + "description": "Application profile's tier source information", + "properties": { + "addonSubType": { + "type": "string" + }, + "addonType": { + "type": "string" + }, + "logoUrl": { + "type": "string" + }, + "name": { + "type": "string" + }, + "type": { + "type": "string" + }, + "uid": { + "type": "string" + } + } + }, + "v1AppTierSpec": { + "description": "Application tier specs", + "type": "object", + "properties": { + "containerRegistryUid": { + "description": "Application tier container registry uid", + "type": "string" + }, + "installOrder": { + "description": "Application tier installation order", + "type": "integer", + "format": "int32" + }, + "manifests": { + "description": "Application tier attached manifest content in yaml format", + "type": "array", + "items": { + "$ref": "#/definitions/v1ObjectReference" + } + }, + "properties": { + "description": "Application tier properties", + "type": "array", + "items": { + "$ref": "#/definitions/v1AppTierProperty" + } + }, + "registryUid": { + "description": "Registry uid", + "type": "string" + }, + "sourceAppTierUid": { + "description": "Application tier source pack uid", + "type": "string" + }, + "type": { + "description": "Application tier type", + "$ref": "#/definitions/v1AppTierType" + }, + "values": { + "description": "Application tier configuration values in yaml format", + "type": "string" + }, + "version": { + "description": "Application tier version", + "type": "string" + } + } + }, + "v1AppTierSummary": { + "description": "Application profile's tier summary", + "properties": { + "name": { + "type": "string" + }, + "source": { + "$ref": "#/definitions/v1AppTierSourceSummary" + }, + "type": { + "type": "string" + }, + "uid": { + "type": "string" + }, + "version": { + "type": "string" + } + } + }, + "v1AppTierType": { + "type": "string", + "default": "manifest", + "enum": [ + "manifest", + "helm", + "operator-instance", + "container" + ] + }, + "v1AppTierUpdateEntity": { + "description": "Application tier update request payload", + "type": "object", + "properties": { + "containerRegistryUid": { + "description": "Application tier container registry uid", + "type": "string" + }, + "installOrder": { + "description": "Application tier installation order", + "type": "integer", + "format": "int32" + }, + "manifests": { + "description": "Application tier manifests", + "type": "array", + "items": { + "$ref": "#/definitions/v1ManifestRefUpdateEntity" + } + }, + "name": { + "description": "Application tier name", + "type": "string" + }, + "properties": { + "description": "Application tier properties", + "type": "array", + "items": { + "$ref": "#/definitions/v1AppTierPropertyEntity" + } + }, + "values": { + "description": "Application tier configuration values in yaml format", + "type": "string" + }, + "version": { + "description": "Application tier version", + "type": "string" + } + } + }, + "v1ArchType": { + "type": "string", + "default": "amd64", + "enum": [ + "amd64", + "arm64" + ] + }, + "v1AsyncOperationIdEntity": { + "description": "Async operation id", + "type": "object", + "properties": { + "operationId": { + "description": "OperationId for a particular sync operation id", + "type": "string" + } + } + }, + "v1Audit": { + "description": "Audit response payload", + "type": "object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/v1AuditSpec" + } + } + }, + "v1AuditActor": { + "description": "Audit actor object", + "properties": { + "actorType": { + "type": "string", + "enum": [ + "user", + "system", + "service" + ] + }, + "project": { + "$ref": "#/definitions/v1ProjectMeta" + }, + "serviceName": { + "type": "string" + }, + "user": { + "$ref": "#/definitions/v1UserMeta" + } + } + }, + "v1AuditMsgUpdate": { + "description": "Audit user message update request payload", + "type": "object", + "properties": { + "userMsg": { + "description": "User message", + "type": "string", + "maxLength": 255, + "minLength": 3 + } + } + }, + "v1AuditResourceReference": { + "description": "Audit resource reference object", + "type": "object", + "required": [ + "uid" + ], + "properties": { + "kind": { + "description": "Audit resource type", + "type": "string" + }, + "label": { + "description": "Audit resource label", + "type": "string" + }, + "name": { + "description": "Audit resource name", + "type": "string" + }, + "uid": { + "description": "Audit resource uid", + "type": "string" + } + } + }, + "v1AuditSpec": { + "description": "Audit specifications", + "properties": { + "actionMsg": { + "description": "Audit action message", + "type": "string" + }, + "actionType": { + "type": "string", + "enum": [ + "create", + "update", + "delete", + "publish", + "deploy" + ] + }, + "actor": { + "$ref": "#/definitions/v1AuditActor" + }, + "contentMsg": { + "description": "Audit content message", + "type": "string" + }, + "resource": { + "$ref": "#/definitions/v1AuditResourceReference" + }, + "userMsg": { + "description": "Audit user message", + "type": "string" + } + } + }, + "v1AuditSysMsg": { + "description": "Audit system message", + "type": "object", + "properties": { + "actionMsg": { + "description": "Audit resource action message", + "type": "string" + }, + "contentMsg": { + "description": "Audit resource content message", + "type": "string" + } + } + }, + "v1Audits": { + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": { + "description": "List of audit message", + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1Audit" + } + }, + "listmeta": { + "$ref": "#/definitions/v1ListMetaData" + } + } + }, + "v1AuthLogin": { + "description": "Describes the credential details required for authentication", + "type": "object", + "properties": { + "emailId": { + "description": "Describes the email id required for the user to authenticate", + "type": "string" + }, + "org": { + "description": "Describes the user's organization name to login", + "type": "string" + }, + "password": { + "description": "Describes the password required for the user to authenticate", + "type": "string", + "format": "password" + } + } + }, + "v1AuthTokenRevoke": { + "properties": { + "tokens": { + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + } + } + } + }, + "v1AuthTokenSettings": { + "description": "System auth token settings", + "properties": { + "expiryTimeMinutes": { + "description": "Auth token expiry time in minutes", + "type": "integer", + "format": "int32", + "maximum": 1440, + "minimum": 15, + "x-omitempty": false + } + } + }, + "v1AwsAMI": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "os": { + "type": "string" + }, + "region": { + "type": "string" + }, + "state": { + "type": "string" + } + } + }, + "v1AwsAccount": { + "description": "Aws cloud account information", + "type": "object", + "properties": { + "apiVersion": { + "type": "string" + }, + "kind": { + "type": "string" + }, + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/v1AwsCloudAccount" + }, + "status": { + "$ref": "#/definitions/v1CloudAccountStatus" + } + } + }, + "v1AwsAccounts": { + "description": "List of AWS accounts", + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1AwsAccount" + } + }, + "listmeta": { + "$ref": "#/definitions/v1ListMetaData" + } + } + }, + "v1AwsAmiReference": { + "description": "AMI is the reference to the AMI from which to create the machine instance", + "type": "object", + "properties": { + "eksOptimizedLookupType": { + "description": "EKSOptimizedLookupType If specified, will look up an EKS Optimized image in SSM Parameter store", + "type": "string", + "enum": [ + "AmazonLinux", + "AmazonLinuxGPU" + ] + }, + "id": { + "description": "ID of resource", + "type": "string" + } + } + }, + "v1AwsAvailabilityZone": { + "description": "Distinct locations within an AWS Region that are engineered to be isolated from failures in other Zones", + "type": "object", + "properties": { + "name": { + "description": "AWS availability zone name", + "type": "string" + }, + "state": { + "description": "AWS availability zone state", + "type": "string" + }, + "zoneId": { + "description": "AWS availability zone id", + "type": "string" + } + } + }, + "v1AwsAvailabilityZones": { + "type": "object", + "required": [ + "zones" + ], + "properties": { + "zones": { + "description": "List of AWS Zones", + "type": "array", + "items": { + "$ref": "#/definitions/v1AwsAvailabilityZone" + } + } + } + }, + "v1AwsCloudAccount": { + "description": "AWS cloud account which includes access key and secret key in case of 'secret' credentials type. It includes policyARNS, ARN and externalId in case of sts. Partition is a group of AWS Region and Service objects", + "type": "object", + "properties": { + "accessKey": { + "description": "AWS account access key", + "type": "string" + }, + "credentialType": { + "$ref": "#/definitions/v1AwsCloudAccountCredentialType" + }, + "partition": { + "description": "AWS accounts are scoped to a single partition. Allowed values [aws, aws-us-gov], Default values", + "type": "string", + "default": "aws", + "enum": [ + "aws", + "aws-us-gov" + ] + }, + "policyARNs": { + "description": "List of policy ARNs required in case of credentialType sts.", + "type": "array", + "items": { + "type": "string" + } + }, + "secretKey": { + "description": "AWS account secret key", + "type": "string" + }, + "sts": { + "description": "AWS STS credentials in case of credentialType sts, will be empty in case of credential type secret", + "$ref": "#/definitions/v1AwsStsCredentials" + } + } + }, + "v1AwsCloudAccountCredentialType": { + "description": "Allowed Values [secret, sts]. STS type will be used for role assumption for sts type, accessKey/secretKey contains the source account, Arn is the target account.", + "type": "string", + "default": "secret", + "enum": [ + "secret", + "sts" + ] + }, + "v1AwsCloudClusterConfigEntity": { + "description": "AWS cloud cluster config entity", + "type": "object", + "properties": { + "clusterConfig": { + "$ref": "#/definitions/v1AwsClusterConfig" + } + } + }, + "v1AwsCloudConfig": { + "description": "AwsCloudConfig is the Schema for the awscloudconfigs API", + "type": "object", + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + "type": "string" + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/v1AwsCloudConfigSpec" + }, + "status": { + "$ref": "#/definitions/v1AwsCloudConfigStatus" + } + } + }, + "v1AwsCloudConfigSpec": { + "description": "AwsCloudConfigSpec defines the cloud configuration input by user This will translate to clusterspec/machinespec for cluster-api", + "type": "object", + "properties": { + "cloudAccountRef": { + "description": "cloudAccountRef should point to the secret which contains AwsCloudAccount", + "$ref": "#/definitions/v1ObjectReference" + }, + "clusterConfig": { + "$ref": "#/definitions/v1AwsClusterConfig" + }, + "machinePoolConfig": { + "type": "array", + "items": { + "$ref": "#/definitions/v1AwsMachinePoolConfig" + } + } + } + }, + "v1AwsCloudConfigStatus": { + "description": "AwsCloudConfigStatus defines the observed state of AwsCloudConfig The cloudimage info built by Mold is stored here image should be mapped to a specific machinepool", + "type": "object", + "properties": { + "ansibleRoleDigest": { + "description": "For mold controller to identify if is there any changes in Pack", + "type": "string" + }, + "conditions": { + "type": "array", + "items": { + "$ref": "#/definitions/v1ClusterCondition" + } + }, + "images": { + "description": "Images array items should be 1-to-1 mapping to Spec.MachinePoolConfig", + "type": "array", + "items": { + "$ref": "#/definitions/v1AwsAMI" + } + }, + "isAddonLayer": { + "description": "addon layers present in spc", + "type": "boolean" + }, + "roleDigest": { + "description": "this map will be for ansible roles present in eack pack", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "sourceImageId": { + "description": "sourceImageId, it can be from packref's annotations or from pack.json", + "type": "string" + }, + "useCapiImage": { + "description": "PackerVariableDigest string `json:\"packerDigest,omitempty\"` If no ansible roles found in Packs then Mold should tell Drive to use capi image and not create custom image, because there is nothing to add", + "type": "boolean" + } + } + }, + "v1AwsCloudCostSpec": { + "description": "Aws cloud account usage cost payload spec", + "type": "object", + "required": [ + "credentials" + ], + "properties": { + "accountId": { + "description": "AccountId of AWS cloud cost", + "type": "string" + }, + "credentials": { + "$ref": "#/definitions/v1AwsCloudAccount" + }, + "filter": { + "$ref": "#/definitions/v1AwsCloudCostSpecFilter" + } + } + }, + "v1AwsCloudCostSpecFilter": { + "description": "Aws cloud account usage cost payload filter. startTime and endTime should be within 12 months range from now.", + "type": "object", + "required": [ + "startTime" + ], + "properties": { + "endTime": { + "$ref": "#/definitions/v1Time" + }, + "iamUserId": { + "description": "IAM UserId of AWS account", + "type": "string" + }, + "startTime": { + "$ref": "#/definitions/v1Time" + } + } + }, + "v1AwsCloudCostSummary": { + "description": "AWS cloud account usage cost summary response data", + "type": "object", + "properties": { + "cost": { + "$ref": "#/definitions/v1AwsCloudCostSummaryCloudCost" + } + } + }, + "v1AwsCloudCostSummaryCloudCost": { + "description": "AWS cloud account usage cost summary of monthlyCosts and totalCost", + "type": "object", + "properties": { + "monthlyCosts": { + "description": "Monthly cost of AWS cost", + "type": "array", + "items": { + "$ref": "#/definitions/v1AwsCloudCostSummaryMonthlyCost" + } + }, + "total": { + "description": "Total cost of AWS cost", + "type": "number", + "format": "float64", + "x-omitempty": false + } + } + }, + "v1AwsCloudCostSummaryMonthlyCost": { + "type": "object", + "properties": { + "amount": { + "description": "Amount for aws cloud cost", + "type": "number", + "format": "float64", + "x-omitempty": false + }, + "timestamp": { + "description": "Time duration for aws cloud cost", + "type": "integer" + } + } + }, + "v1AwsClusterConfig": { + "description": "Cluster level configuration for aws cloud and applicable for all the machine pools", + "type": "object", + "required": [ + "region" + ], + "properties": { + "bastionDisabled": { + "description": "Create bastion node option we have earlier supported creation of bastion by default capa seems to favour session manager against bastion node https://github.com/kubernetes-sigs/cluster-api-provider-aws/issues/947", + "type": "boolean" + }, + "controlPlaneLoadBalancer": { + "description": "ControlPlaneLoadBalancer specifies how API server elb will be configured, this field is optional, not provided, \"\", default =\u003e \"Internet-facing\" \"Internet-facing\" =\u003e \"Internet-facing\" \"internal\" =\u003e \"internal\" For spectro saas setup we require to talk to the apiserver from our cluster so ControlPlaneLoadBalancer should be \"\", not provided or \"Internet-facing\"", + "type": "string" + }, + "region": { + "type": "string" + }, + "sshKeyName": { + "type": "string" + }, + "vpcId": { + "description": "VPC Id to deploy cluster into should have one public and one private subnet for the the cluster creation, this field is optional, If VPC Id is not provided a fully managed VPC will be created", + "type": "string" + } + } + }, + "v1AwsCreditAccountEntity": { + "type": "object", + "properties": { + "creditLimitInDollars": { + "type": "number", + "format": "float64", + "x-omitempty": false + }, + "creditUsedInDollars": { + "type": "number", + "format": "float64", + "x-omitempty": false + }, + "loginCredentials": { + "$ref": "#/definitions/v1AwsLoginCredentials" + }, + "userCloudAccount": { + "$ref": "#/definitions/v1AwsUserCloudAccount" + } + } + }, + "v1AwsFindImageRequest": { + "description": "AWS image name and credentials", + "type": "object", + "properties": { + "amiName": { + "description": "AWS image ami name", + "type": "string" + }, + "awsAccount": { + "$ref": "#/definitions/v1AwsCloudAccount" + } + } + }, + "v1AwsIamPolicy": { + "description": "Aws policy", + "type": "object", + "properties": { + "arn": { + "type": "string" + }, + "policyId": { + "type": "string" + }, + "policyName": { + "type": "string" + } + } + }, + "v1AwsImage": { + "description": "AWS image name and ami", + "type": "object", + "properties": { + "id": { + "description": "AWS image id", + "type": "string" + }, + "name": { + "description": "AWS image name", + "type": "string" + }, + "owner": { + "description": "AWS image owner id", + "type": "string" + } + } + }, + "v1AwsInstanceTypes": { + "description": "List of AWS instance types", + "type": "object", + "properties": { + "instanceTypes": { + "type": "array", + "items": { + "$ref": "#/definitions/v1InstanceType" + } + } + } + }, + "v1AwsKeyPairs": { + "description": "List of AWS keypairs", + "type": "object", + "properties": { + "keyNames": { + "description": "Array of Aws Keypair names", + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "v1AwsKmsKey": { + "description": "AWS KMS Key - gives you centralized control over the cryptographic keys used to protect your data.", + "type": "object", + "required": [ + "keyId", + "keyArn" + ], + "properties": { + "keyAlias": { + "description": "AWS KMS alias", + "type": "string" + }, + "keyArn": { + "description": "AWS KMS arn", + "type": "string" + }, + "keyId": { + "description": "AWS KMS keyid", + "type": "string" + } + } + }, + "v1AwsKmsKeyEntity": { + "description": "List of AWS Keys", + "type": "object", + "properties": { + "awsAccountId": { + "description": "The twelve-digit account ID of the Amazon Web Services account that owns the KMS key", + "type": "string" + }, + "enabled": { + "description": "Specifies whether the KMS key is enabled.", + "type": "boolean" + }, + "keyId": { + "description": "The globally unique identifier for the KMS key", + "type": "string" + } + } + }, + "v1AwsKmsKeys": { + "description": "List of AWS Keys", + "type": "object", + "required": [ + "kmsKeys" + ], + "properties": { + "kmsKeys": { + "type": "array", + "items": { + "$ref": "#/definitions/v1AwsKmsKey" + } + } + } + }, + "v1AwsLaunchTemplate": { + "description": "AWSLaunchTemplate specifies the launch template to use to create the managed node group", + "type": "object", + "properties": { + "additionalSecurityGroups": { + "description": "AdditionalSecurityGroups is an array of references to security groups that should be applied to the instances", + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1AwsResourceReference" + } + }, + "ami": { + "$ref": "#/definitions/v1AwsAmiReference" + }, + "imageLookupBaseOS": { + "description": "ImageLookupBaseOS is the name of the base operating system to use for image lookup the AMI is not set", + "type": "string" + }, + "imageLookupFormat": { + "description": "ImageLookupFormat is the AMI naming format to look up the image", + "type": "string" + }, + "imageLookupOrg": { + "description": "ImageLookupOrg is the AWS Organization ID to use for image lookup if AMI is not set", + "type": "string" + }, + "rootVolume": { + "$ref": "#/definitions/v1AwsRootVolume" + } + } + }, + "v1AwsLoginCredentials": { + "type": "object", + "properties": { + "iamUser": { + "type": "string" + }, + "password": { + "type": "string", + "format": "password" + } + } + }, + "v1AwsMachine": { + "description": "AWS cloud VM definition", + "type": "object", + "properties": { + "apiVersion": { + "type": "string" + }, + "kind": { + "type": "string" + }, + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/v1AwsMachineSpec" + }, + "status": { + "$ref": "#/definitions/v1CloudMachineStatus" + } + } + }, + "v1AwsMachinePoolCloudConfigEntity": { + "type": "object", + "required": [ + "instanceType" + ], + "properties": { + "additionalSecurityGroups": { + "description": "Additional Security groups", + "type": "array", + "items": { + "$ref": "#/definitions/v1AwsResourceReference" + } + }, + "azs": { + "type": "array", + "items": { + "type": "string" + } + }, + "capacityType": { + "description": "EC2 instance capacity type", + "type": "string", + "default": "on-demand", + "enum": [ + "on-demand", + "spot" + ] + }, + "instanceType": { + "description": "instance type", + "type": "string" + }, + "rootDeviceSize": { + "description": "rootDeviceSize in GBs", + "type": "integer", + "format": "int64", + "maximum": 2000, + "minimum": 1 + }, + "spotMarketOptions": { + "description": "SpotMarketOptions allows users to configure instances to be run using AWS Spot instances.", + "$ref": "#/definitions/v1SpotMarketOptions" + }, + "subnets": { + "type": "array", + "items": { + "$ref": "#/definitions/v1AwsSubnetEntity" + } + } + } + }, + "v1AwsMachinePoolConfig": { + "type": "object", + "required": [ + "isControlPlane" + ], + "properties": { + "additionalLabels": { + "description": "additionalLabels", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "additionalSecurityGroups": { + "description": "Additional Security groups", + "type": "array", + "items": { + "$ref": "#/definitions/v1AwsResourceReference" + } + }, + "additionalTags": { + "description": "AdditionalTags is an optional set of tags to add to resources managed by the provider, in addition to the ones added by default. For eg., tags for EKS nodeGroup or EKS NodegroupIAMRole", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "azs": { + "description": "AZs is only used for dynamic placement", + "type": "array", + "items": { + "type": "string" + } + }, + "capacityType": { + "description": "EC2 instance capacity type", + "type": "string", + "default": "on-demand", + "enum": [ + "on-demand", + "spot" + ] + }, + "instanceConfig": { + "$ref": "#/definitions/v1InstanceConfig" + }, + "instanceType": { + "description": "instance type", + "type": "string" + }, + "isControlPlane": { + "description": "whether this pool is for control plane", + "type": "boolean", + "x-omitempty": false + }, + "labels": { + "description": "labels for this pool, example: control-plane/worker, gpu, windows", + "type": "array", + "items": { + "type": "string" + } + }, + "machinePoolProperties": { + "$ref": "#/definitions/v1MachinePoolProperties" + }, + "maxSize": { + "description": "max size of the pool, for scaling", + "type": "integer", + "format": "int32" + }, + "minSize": { + "description": "min size of the pool, for scaling", + "type": "integer", + "format": "int32" + }, + "name": { + "type": "string" + }, + "nodeRepaveInterval": { + "description": "Minimum number of seconds a node should be Ready, before the next node is selected for repave. Applicable only for workerpools in infrastructure cluster", + "type": "integer", + "format": "int32" + }, + "rootDeviceSize": { + "description": "rootDeviceSize in GBs", + "type": "integer", + "format": "int64" + }, + "size": { + "description": "size of the pool, number of machines", + "type": "integer", + "format": "int32" + }, + "spotMarketOptions": { + "description": "SpotMarketOptions allows users to configure instances to be run using AWS Spot instances.", + "$ref": "#/definitions/v1SpotMarketOptions" + }, + "subnetIds": { + "description": "AZ to subnet mapping filled by ally from hubble SubnetIDs [\"us-west-2d\"] = \"subnet-079b6061\" This field is optional If we don't provide a subnetId then by default the first private subnet from the AZ will be picked up for deployment", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "taints": { + "description": "control plane or worker taints", + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1Taint" + } + }, + "updateStrategy": { + "description": "rolling update strategy for this machinepool if not specified, will use ScaleOut", + "$ref": "#/definitions/v1UpdateStrategy" + }, + "useControlPlaneAsWorker": { + "description": "if IsControlPlane==true \u0026\u0026 useControlPlaneAsWorker==true, then will remove control plane taint this will not be used for worker pools", + "type": "boolean", + "x-omitempty": false + } + } + }, + "v1AwsMachinePoolConfigEntity": { + "type": "object", + "required": [ + "cloudConfig" + ], + "properties": { + "cloudConfig": { + "$ref": "#/definitions/v1AwsMachinePoolCloudConfigEntity" + }, + "poolConfig": { + "$ref": "#/definitions/v1MachinePoolConfigEntity" + } + } + }, + "v1AwsMachineSpec": { + "description": "AWS cloud VM definition spec", + "type": "object", + "required": [ + "instanceType", + "vpcId", + "ami" + ], + "properties": { + "additionalSecurityGroups": { + "description": "Additional Security groups", + "type": "array", + "items": { + "$ref": "#/definitions/v1AwsResourceReference" + } + }, + "ami": { + "type": "string" + }, + "az": { + "type": "string" + }, + "dnsName": { + "type": "string" + }, + "iamProfile": { + "type": "string" + }, + "instanceType": { + "type": "string" + }, + "nics": { + "type": "array", + "items": { + "$ref": "#/definitions/v1AwsNic" + } + }, + "phase": { + "type": "string" + }, + "sshKeyName": { + "type": "string" + }, + "subnetId": { + "type": "string" + }, + "type": { + "type": "string" + }, + "vpcId": { + "type": "string" + } + } + }, + "v1AwsMachines": { + "description": "AWS machine list", + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1AwsMachine" + } + }, + "listmeta": { + "$ref": "#/definitions/v1ListMetaData" + } + } + }, + "v1AwsNic": { + "description": "AWS network interface", + "type": "object", + "properties": { + "index": { + "type": "integer", + "format": "int8" + }, + "privateIPs": { + "type": "array", + "items": { + "type": "string" + } + }, + "publicIp": { + "type": "string" + } + } + }, + "v1AwsPartition": { + "description": "AWS accounts are scoped to a single partition. Allowed values [aws, aws-us-gov], Default values", + "type": "string", + "default": "aws", + "enum": [ + "aws", + "aws-us-gov" + ] + }, + "v1AwsPolicies": { + "type": "object", + "required": [ + "policies" + ], + "properties": { + "policies": { + "type": "array", + "items": { + "$ref": "#/definitions/v1AwsIamPolicy" + } + } + } + }, + "v1AwsPolicyArnsSpec": { + "description": "Aws policy ARNs spec", + "type": "object", + "required": [ + "policyArns", + "account" + ], + "properties": { + "account": { + "$ref": "#/definitions/v1AwsCloudAccount" + }, + "policyArns": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "v1AwsRegion": { + "description": "AWS region which represents separate geographic area.", + "type": "object", + "properties": { + "endpoint": { + "description": "AWS offer a regional endpoint that can used to make requests", + "type": "string" + }, + "name": { + "description": "Name of the AWS region", + "type": "string" + }, + "optInStatus": { + "description": "Enable your account to operate in the particular regions", + "type": "string" + } + } + }, + "v1AwsRegions": { + "type": "object", + "required": [ + "regions" + ], + "properties": { + "regions": { + "description": "List of AWS regions", + "type": "array", + "items": { + "$ref": "#/definitions/v1AwsRegion" + } + } + } + }, + "v1AwsResourceFilter": { + "description": "Filter is a filter used to identify an AWS resource", + "type": "object", + "properties": { + "name": { + "description": "Name of the filter. Filter names are case-sensitive", + "type": "string" + }, + "values": { + "description": "Values includes one or more filter values. Filter values are case-sensitive", + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + } + } + } + }, + "v1AwsResourceReference": { + "description": "AWSResourceReference is a reference to a specific AWS resource by ID or filters", + "type": "object", + "properties": { + "arn": { + "description": "ARN of resource", + "type": "string" + }, + "filters": { + "description": "Filters is a set of key/value pairs used to identify a resource", + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1AwsResourceFilter" + } + }, + "id": { + "description": "ID of resource", + "type": "string" + } + } + }, + "v1AwsRootVolume": { + "description": "Volume encapsulates the configuration options for the storage device.", + "type": "object", + "properties": { + "deviceName": { + "description": "Device name", + "type": "string" + }, + "encrypted": { + "description": "EncryptionKey is the KMS key to use to encrypt the volume. Can be either a KMS key ID or ARN", + "type": "boolean" + }, + "encryptionKey": { + "description": "EncryptionKey is the KMS key to use to encrypt the volume. Can be either a KMS key ID or ARN", + "type": "string" + }, + "iops": { + "description": "IOPS is the number of IOPS requested for the disk. Not applicable to all types", + "type": "integer", + "format": "int64" + }, + "throughput": { + "description": "Throughput to provision in MiB/s supported for the volume type. Not applicable to all types.", + "type": "integer", + "format": "int64" + }, + "type": { + "description": "Type is the type of the volume (e.g. gp2, io1, etc...)", + "type": "string" + } + } + }, + "v1AwsS3BucketCredentials": { + "description": "AWS S3 Bucket credentials", + "type": "object", + "required": [ + "credentials", + "bucket", + "region" + ], + "properties": { + "bucket": { + "description": "Name of AWS S3 bucket", + "type": "string" + }, + "credentials": { + "$ref": "#/definitions/v1AwsCloudAccount" + }, + "folder": { + "description": "Name of the folder in the specified AWS S3 bucket.", + "type": "string" + }, + "region": { + "description": "Name of the available AWS region.", + "type": "string" + } + } + }, + "v1AwsSecurityGroups": { + "type": "object", + "required": [ + "groups" + ], + "properties": { + "groups": { + "type": "array", + "items": { + "$ref": "#/definitions/v1AwsSecuritygroup" + } + } + } + }, + "v1AwsSecuritygroup": { + "description": "Aws security group", + "type": "object", + "properties": { + "groupId": { + "type": "string" + }, + "groupName": { + "type": "string" + }, + "ownerId": { + "type": "string" + } + } + }, + "v1AwsStorageTypes": { + "type": "object", + "properties": { + "storageTypes": { + "description": "List of AWS storage types", + "type": "array", + "items": { + "$ref": "#/definitions/v1StorageType" + } + } + } + }, + "v1AwsStsCredentials": { + "description": "Aws sts credentials", + "type": "object", + "properties": { + "arn": { + "description": "Arn for the aws sts credentials in cloud account", + "type": "string" + }, + "externalId": { + "description": "ExternalId for the aws sts credentials in cloud account", + "type": "string" + } + } + }, + "v1AwsSubnet": { + "description": "A subnet is a range of IP addresses in a AWS VPC", + "properties": { + "az": { + "description": "Every subnet can only be associated with only one Availability Zone", + "type": "string" + }, + "isPrivate": { + "description": "Is this subnet private", + "type": "boolean" + }, + "mapPublicIpOnLaunch": { + "description": "Indicates whether instances launched in this subnet receive a public IPv4 address.", + "type": "boolean", + "x-omitempty": false + }, + "name": { + "description": "Name of the subnet", + "type": "string" + }, + "subnetId": { + "description": "Id of the subnet", + "type": "string" + } + } + }, + "v1AwsSubnetEntity": { + "properties": { + "az": { + "type": "string" + }, + "id": { + "type": "string" + } + } + }, + "v1AwsUserCloudAccount": { + "properties": { + "accountId": { + "type": "string" + }, + "cloudAccount": { + "$ref": "#/definitions/v1AwsCloudAccount" + } + } + }, + "v1AwsVolumeSize": { + "description": "AWS Volume Size entity", + "type": "object", + "properties": { + "sizeGB": { + "description": "AWS volume size", + "type": "integer" + } + } + }, + "v1AwsVolumeType": { + "description": "AWS Volume Type entity", + "type": "object", + "properties": { + "id": { + "description": "AWS volume type id", + "type": "string" + }, + "maxIops": { + "description": "Iops through put of volume type", + "type": "string" + }, + "maxThroughPut": { + "description": "Max through put of volume type", + "type": "string" + }, + "name": { + "description": "AWS Volume Type Name", + "type": "string" + } + } + }, + "v1AwsVpc": { + "description": "A virtual network dedicated to a AWS account", + "type": "object", + "required": [ + "vpcId" + ], + "properties": { + "cidrBlock": { + "type": "string" + }, + "name": { + "description": "Name of the virtual network", + "type": "string" + }, + "subnets": { + "description": "List of subnets associated to a AWS VPC", + "type": "array", + "items": { + "$ref": "#/definitions/v1AwsSubnet" + } + }, + "vpcId": { + "description": "Id of the virtual network", + "type": "string" + } + } + }, + "v1AwsVpcs": { + "description": "List of AWS VPCs", + "type": "object", + "required": [ + "vpcs" + ], + "properties": { + "vpcs": { + "type": "array", + "items": { + "$ref": "#/definitions/v1AwsVpc" + } + } + } + }, + "v1AzValidateEntity": { + "description": "Az validate entity", + "type": "object", + "properties": { + "azs": { + "description": "Gcp Azs", + "type": "array", + "items": { + "type": "string" + } + }, + "project": { + "description": "Gcp project", + "type": "string" + }, + "region": { + "description": "Gcp region", + "type": "string" + }, + "uid": { + "description": "Cloud account uid", + "type": "string" + } + } + }, + "v1AzureAccount": { + "description": "Azure account information", + "type": "object", + "properties": { + "apiVersion": { + "description": "Cloud account api version", + "type": "string" + }, + "kind": { + "description": "Cloud account kind", + "type": "string" + }, + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/v1AzureCloudAccount" + }, + "status": { + "$ref": "#/definitions/v1CloudAccountStatus" + } + } + }, + "v1AzureAccounts": { + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1AzureAccount" + } + }, + "listmeta": { + "$ref": "#/definitions/v1ListMetaData" + } + } + }, + "v1AzureAvailabilityZone": { + "description": "Azure availability zone", + "type": "object", + "properties": { + "name": { + "description": "Azure availability zone name", + "type": "string" + } + } + }, + "v1AzureCloudAccount": { + "type": "object", + "required": [ + "tenantId", + "clientId", + "clientSecret" + ], + "properties": { + "azureEnvironment": { + "description": "Contains configuration for Azure cloud", + "type": "string", + "default": "AzurePublicCloud", + "enum": [ + "AzureChinaCloud", + "AzurePublicCloud", + "AzureUSGovernment", + "AzureUSGovernmentCloud" + ] + }, + "clientId": { + "description": "Client ID(Directory ID) is a unique identifier generated by Azure AD that is tied to an application", + "type": "string" + }, + "clientSecret": { + "description": "ClientSecret is the secret associated with Client", + "type": "string" + }, + "settings": { + "description": "Palette internal cloud settings", + "$ref": "#/definitions/v1CloudAccountSettings" + }, + "tenantId": { + "description": "Tenant ID is the ID for the Azure AD tenant that the user belongs to.", + "type": "string" + }, + "tenantName": { + "description": "Tenant ID is the ID for the Azure AD tenant that the user belongs to.", + "type": "string" + } + } + }, + "v1AzureCloudClusterConfigEntity": { + "description": "Azure cloud cluster config entity", + "type": "object", + "properties": { + "clusterConfig": { + "$ref": "#/definitions/v1AzureClusterConfig" + } + } + }, + "v1AzureCloudConfig": { + "description": "AzureCloudConfig is the Schema for the azurecloudconfigs API", + "type": "object", + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + "type": "string" + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/v1AzureCloudConfigSpec" + }, + "status": { + "$ref": "#/definitions/v1AzureCloudConfigStatus" + } + } + }, + "v1AzureCloudConfigSpec": { + "description": "AzureCloudConfigSpec defines the cloud configuration input by user This will translate to clusterspec/machinespec for cluster-api", + "type": "object", + "properties": { + "cloudAccountRef": { + "description": "cloudAccountRef should point to the secret which contains AzureCloudAccount", + "$ref": "#/definitions/v1ObjectReference" + }, + "clusterConfig": { + "$ref": "#/definitions/v1AzureClusterConfig" + }, + "machinePoolConfig": { + "type": "array", + "items": { + "$ref": "#/definitions/v1AzureMachinePoolConfig" + } + } + } + }, + "v1AzureCloudConfigStatus": { + "description": "AzureCloudConfigStatus defines the observed state of AzureCloudConfig The cloudimage info built by Mold is stored here image should be mapped to a specific machinepool", + "type": "object", + "properties": { + "ansibleRoleDigest": { + "description": "For mold controller to identify if is there any changes in Pack", + "type": "string" + }, + "conditions": { + "description": "spectroAnsibleProvisioner: should be added only once, subsequent recocile will use the same provisioner SpectroAnsiblePacker bool `json:\"spectroAnsiblePacker,omitempty\"`", + "type": "array", + "items": { + "$ref": "#/definitions/v1ClusterCondition" + } + }, + "images": { + "description": "Images array items should be 1-to-1 mapping to Spec.MachinePoolConfig", + "$ref": "#/definitions/v1AzureImage" + }, + "isAddonLayer": { + "description": "addon layers present in spc", + "type": "boolean" + }, + "roleDigest": { + "description": "this map will be for ansible roles present in eack pack", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "sourceImageId": { + "description": "sourceImageId, it can be from packref's annotations or from pack.json", + "type": "string" + }, + "useCapiImage": { + "description": "PackerVariableDigest string `json:\"packerDigest,omitempty\"` If no ansible roles found in Packs then Mold should tell Drive to use capi image and not create custom image, because there is nothing to add", + "type": "boolean" + }, + "vhdImage": { + "$ref": "#/definitions/v1AzureVHDImage" + } + } + }, + "v1AzureClusterConfig": { + "description": "Cluster level configuration for Azure cloud and applicable for all the machine pools", + "type": "object", + "required": [ + "subscriptionId", + "location", + "sshKey" + ], + "properties": { + "aadProfile": { + "description": "AadProfile is Azure Active Directory configuration to integrate with AKS for aad authentication.", + "$ref": "#/definitions/v1AADProfile" + }, + "apiServerAccessProfile": { + "description": "APIServerAccessProfile is the access profile for AKS API server.", + "$ref": "#/definitions/v1APIServerAccessProfile" + }, + "containerName": { + "type": "string" + }, + "controlPlaneSubnet": { + "description": "Subnet for Kubernetes control-plane node", + "$ref": "#/definitions/v1Subnet" + }, + "enablePrivateCluster": { + "description": "Deprecated. use apiServerAccessProfile.enablePrivateCluster", + "type": "boolean" + }, + "infraLBConfig": { + "description": "APIServerLB is the configuration for the control-plane load balancer.", + "$ref": "#/definitions/v1InfraLBConfig" + }, + "location": { + "description": "Location is the Azure datacenter location", + "type": "string" + }, + "resourceGroup": { + "type": "string" + }, + "sshKey": { + "type": "string" + }, + "storageAccountName": { + "type": "string" + }, + "subscriptionId": { + "description": "Subscription ID is unique identifier for the subscription used to access Azure services", + "type": "string" + }, + "vnetCidrBlock": { + "type": "string" + }, + "vnetName": { + "description": "VNETName is the virtual network in which the cluster is to be provisioned.", + "type": "string" + }, + "vnetResourceGroup": { + "type": "string" + }, + "workerSubnet": { + "description": "Subnet for Kubernetes worker node", + "$ref": "#/definitions/v1Subnet" + } + } + }, + "v1AzureGroup": { + "description": "Azure group entity", + "type": "object", + "properties": { + "id": { + "description": "Azure group id", + "type": "string" + }, + "name": { + "description": "Azure group name", + "type": "string" + } + } + }, + "v1AzureGroups": { + "description": "List of Azure groups", + "type": "object", + "required": [ + "groups" + ], + "properties": { + "groups": { + "type": "array", + "items": { + "$ref": "#/definitions/v1AzureGroup" + } + } + } + }, + "v1AzureImage": { + "description": "Refers to Azure Shared Gallery image", + "type": "object", + "properties": { + "gallery": { + "type": "string" + }, + "name": { + "type": "string" + }, + "resourceGroup": { + "type": "string" + }, + "state": { + "type": "string" + }, + "subscriptionID": { + "type": "string" + }, + "version": { + "type": "string" + } + } + }, + "v1AzureInstanceTypes": { + "description": "List of Azure instance types", + "type": "object", + "properties": { + "instanceTypes": { + "type": "array", + "items": { + "$ref": "#/definitions/v1InstanceType" + } + } + } + }, + "v1AzureMachine": { + "description": "Azure cloud VM definition", + "type": "object", + "properties": { + "apiVersion": { + "type": "string" + }, + "kind": { + "type": "string" + }, + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/v1AzureMachineSpec" + }, + "status": { + "$ref": "#/definitions/v1CloudMachineStatus" + } + } + }, + "v1AzureMachinePoolCloudConfigEntity": { + "type": "object", + "properties": { + "azs": { + "type": "array", + "items": { + "type": "string" + } + }, + "instanceType": { + "description": "Instance type stands for VMSize in Azure", + "type": "string" + }, + "isSystemNodePool": { + "description": "whether this pool is for system node Pool", + "type": "boolean" + }, + "osDisk": { + "$ref": "#/definitions/v1AzureOSDisk" + } + } + }, + "v1AzureMachinePoolConfig": { + "type": "object", + "required": [ + "isControlPlane" + ], + "properties": { + "additionalLabels": { + "description": "additionalLabels", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "additionalTags": { + "description": "AdditionalTags is an optional set of tags to add to resources managed by the provider, in addition to the ones added by default. For eg., tags for EKS nodeGroup or EKS NodegroupIAMRole", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "azs": { + "type": "array", + "items": { + "type": "string" + } + }, + "instanceConfig": { + "$ref": "#/definitions/v1InstanceConfig" + }, + "instanceType": { + "description": "Instance type stands for VMSize in Azure", + "type": "string" + }, + "isControlPlane": { + "description": "whether this pool is for control plane", + "type": "boolean", + "x-omitempty": false + }, + "isSystemNodePool": { + "description": "whether this pool is for system node Pool", + "type": "boolean", + "x-omitempty": false + }, + "labels": { + "description": "labels for this pool, example: control-plane/worker, gpu, windows", + "type": "array", + "items": { + "type": "string" + } + }, + "machinePoolProperties": { + "$ref": "#/definitions/v1MachinePoolProperties" + }, + "maxSize": { + "description": "max size of the pool, for scaling", + "type": "integer", + "format": "int32" + }, + "minSize": { + "description": "min size of the pool, for scaling", + "type": "integer", + "format": "int32" + }, + "name": { + "type": "string" + }, + "nodeRepaveInterval": { + "description": "Minimum number of seconds a node should be Ready, before the next node is selected for repave. Applicable only for workerpools in infrastructure cluster", + "type": "integer", + "format": "int32" + }, + "osDisk": { + "$ref": "#/definitions/v1AzureOSDisk" + }, + "osType": { + "type": "string", + "$ref": "#/definitions/v1OsType" + }, + "size": { + "description": "size of the pool, number of machines", + "type": "integer", + "format": "int32" + }, + "spotVMOptions": { + "description": "SpotVMOptions allows the ability to specify the Machine should use a Spot VM", + "$ref": "#/definitions/v1SpotVMOptions" + }, + "taints": { + "description": "control plane or worker taints", + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1Taint" + } + }, + "updateStrategy": { + "description": "rolling update strategy for this machinepool if not specified, will use ScaleOut", + "$ref": "#/definitions/v1UpdateStrategy" + }, + "useControlPlaneAsWorker": { + "description": "if IsControlPlane==true \u0026\u0026 useControlPlaneAsWorker==true, then will remove control plane taint this will not be used for worker pools", + "type": "boolean", + "x-omitempty": false + } + } + }, + "v1AzureMachinePoolConfigEntity": { + "type": "object", + "required": [ + "cloudConfig" + ], + "properties": { + "cloudConfig": { + "$ref": "#/definitions/v1AzureMachinePoolCloudConfigEntity" + }, + "managedPoolConfig": { + "$ref": "#/definitions/v1AzureManagedMachinePoolConfig" + }, + "poolConfig": { + "$ref": "#/definitions/v1MachinePoolConfigEntity" + } + } + }, + "v1AzureMachineSpec": { + "description": "Azure cloud VM definition spec", + "type": "object", + "required": [ + "instanceType", + "location", + "osDisk" + ], + "properties": { + "additionalTags": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "allocatePublicIP": { + "type": "boolean" + }, + "availabilityZone": { + "$ref": "#/definitions/v1AzureMachineSpecAvailabilityZone" + }, + "image": { + "$ref": "#/definitions/v1AzureMachineSpecImage" + }, + "instanceType": { + "type": "string" + }, + "location": { + "type": "string" + }, + "nics": { + "type": "array", + "items": { + "$ref": "#/definitions/v1AzureNic" + } + }, + "osDisk": { + "$ref": "#/definitions/v1AzureOSDisk" + }, + "sshPublicKey": { + "type": "string" + } + } + }, + "v1AzureMachineSpecAvailabilityZone": { + "description": "Azure Machine Spec Availability zone", + "type": "object", + "properties": { + "enabled": { + "type": "boolean" + }, + "id": { + "type": "string" + } + } + }, + "v1AzureMachineSpecImage": { + "description": "Azure Machine Spec Image", + "type": "object", + "properties": { + "gallery": { + "type": "string" + }, + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "offer": { + "type": "string" + }, + "publisher": { + "type": "string" + }, + "resourceGroup": { + "type": "string" + }, + "sku": { + "type": "string" + }, + "subscriptionId": { + "type": "string" + }, + "version": { + "type": "string" + } + } + }, + "v1AzureMachines": { + "description": "Azure machine list", + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1AzureMachine" + } + }, + "listmeta": { + "$ref": "#/definitions/v1ListMetaData" + } + } + }, + "v1AzureManagedMachinePoolConfig": { + "type": "object", + "properties": { + "isSystemNodePool": { + "description": "whether this pool is for system node Pool", + "type": "boolean", + "x-omitempty": false + }, + "osType": { + "type": "string", + "$ref": "#/definitions/v1OsType" + } + } + }, + "v1AzureNic": { + "description": "AWS network interface", + "type": "object", + "properties": { + "index": { + "type": "integer", + "format": "int8" + }, + "privateIPs": { + "type": "array", + "items": { + "type": "string" + } + }, + "publicIp": { + "type": "string" + } + } + }, + "v1AzureOSDisk": { + "type": "object", + "properties": { + "diskSizeGB": { + "type": "integer", + "format": "int32" + }, + "managedDisk": { + "$ref": "#/definitions/v1ManagedDisk" + }, + "osType": { + "type": "string", + "$ref": "#/definitions/v1OsType" + } + } + }, + "v1AzurePrivateDnsZone": { + "description": "Azure Private DNS zone entity", + "type": "object", + "properties": { + "id": { + "description": "Fully qualified resource Id for the resource", + "type": "string" + }, + "location": { + "description": "The Azure Region where the resource lives", + "type": "string" + }, + "name": { + "description": "The name of the resource", + "type": "string" + } + } + }, + "v1AzurePrivateDnsZones": { + "description": "List of Azure storage accounts", + "type": "object", + "properties": { + "privateDnsZones": { + "type": "array", + "items": { + "$ref": "#/definitions/v1AzurePrivateDnsZone" + } + } + } + }, + "v1AzureRegion": { + "description": "Azure region entity", + "type": "object", + "properties": { + "displayName": { + "description": "Azure region displayname", + "type": "string" + }, + "name": { + "description": "Azure region name", + "type": "string" + }, + "zones": { + "description": "List of zones associated to a particular Azure region", + "type": "array", + "items": { + "$ref": "#/definitions/v1AzureAvailabilityZone" + } + } + } + }, + "v1AzureRegions": { + "description": "List of Azure regions", + "type": "object", + "required": [ + "regions" + ], + "properties": { + "regions": { + "type": "array", + "items": { + "$ref": "#/definitions/v1AzureRegion" + } + } + } + }, + "v1AzureResourceGroupList": { + "description": "List of Azure resource group", + "type": "object", + "properties": { + "resourceGroupList": { + "type": "array", + "items": { + "$ref": "#/definitions/v1ResourceGroup" + } + } + } + }, + "v1AzureStorageAccountEntity": { + "description": "Azure Storage Account Entity", + "type": "object", + "properties": { + "storageAccountTypes": { + "type": "array", + "items": { + "$ref": "#/definitions/v1StorageAccountEntity" + } + } + } + }, + "v1AzureStorageAccounts": { + "description": "List of Azure storage accounts", + "type": "object", + "properties": { + "accounts": { + "type": "array", + "items": { + "$ref": "#/definitions/v1StorageAccount" + } + } + } + }, + "v1AzureStorageConfig": { + "description": "Azure storage config object", + "type": "object", + "required": [ + "resourceGroup", + "containerName", + "storageName", + "credentials" + ], + "properties": { + "containerName": { + "description": "Azure container name", + "type": "string" + }, + "credentials": { + "description": "Azure cloud account credentials", + "$ref": "#/definitions/v1.AzureAccountEntitySpec" + }, + "resourceGroup": { + "description": "Azure resource group name, to which the storage account is mapped", + "type": "string" + }, + "sku": { + "description": "Azure sku", + "type": "string" + }, + "storageName": { + "description": "Azure storage name", + "type": "string" + } + } + }, + "v1AzureStorageContainers": { + "description": "List of Azure storage containers", + "type": "object", + "properties": { + "containers": { + "type": "array", + "items": { + "$ref": "#/definitions/v1StorageContainer" + } + } + } + }, + "v1AzureStorageTypes": { + "description": "List of Azure storage types", + "type": "object", + "properties": { + "storageTypes": { + "type": "array", + "items": { + "$ref": "#/definitions/v1StorageType" + } + } + } + }, + "v1AzureSubscriptionList": { + "description": "List of Azure subscription", + "type": "object", + "properties": { + "subscriptionList": { + "type": "array", + "items": { + "$ref": "#/definitions/v1Subscription" + } + } + } + }, + "v1AzureVHDImage": { + "description": "Mold always create VHD image for custom image, and this can be use as golden images", + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "os": { + "type": "string" + }, + "region": { + "type": "string" + }, + "state": { + "type": "string" + } + } + }, + "v1AzureVhdUrlEntity": { + "description": "Azure vhd url entity", + "type": "object", + "properties": { + "name": { + "description": "The name of the resource", + "type": "string" + }, + "url": { + "description": "The url of the Azure Vhd", + "type": "string" + } + } + }, + "v1AzureVirtualNetworkList": { + "description": "List of Azure virtual network", + "type": "object", + "properties": { + "virtualNetworkList": { + "type": "array", + "items": { + "$ref": "#/definitions/v1VirtualNetwork" + } + } + } + }, + "v1AzureZoneEntity": { + "description": "List of Azure zone", + "type": "object", + "properties": { + "zoneList": { + "type": "array", + "items": { + "$ref": "#/definitions/v1ZoneEntity" + } + } + } + }, + "v1BackupLocationConfig": { + "description": "Backup location configuration", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string" + }, + "uid": { + "type": "string" + } + } + }, + "v1BackupRestoreStatusMeta": { + "description": "Backup restored status", + "properties": { + "backupName": { + "type": "string" + }, + "destinationClusterRef": { + "$ref": "#/definitions/v1ResourceReference" + }, + "restoreState": { + "type": "string" + } + } + }, + "v1BackupState": { + "description": "Backup state", + "properties": { + "backupTime": { + "$ref": "#/definitions/v1Time" + }, + "deleteState": { + "type": "string" + }, + "msg": { + "type": "string" + }, + "state": { + "type": "string" + } + } + }, + "v1BackupStatusConfig": { + "description": "Backup config", + "properties": { + "includeAllDisks": { + "type": "boolean" + }, + "includeClusterResources": { + "type": "boolean" + }, + "namespaces": { + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + } + } + } + }, + "v1BackupStatusMeta": { + "description": "Backup status meta", + "properties": { + "backupName": { + "type": "string" + }, + "backupState": { + "$ref": "#/definitions/v1BackupState" + }, + "backupedNamespaces": { + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + } + }, + "expiryDate": { + "$ref": "#/definitions/v1Time" + } + } + }, + "v1BasicOciRegistry": { + "description": "Basic oci registry information", + "type": "object", + "properties": { + "kind": { + "type": "string" + }, + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/v1BasicOciRegistrySpec" + } + } + }, + "v1BasicOciRegistrySpec": { + "description": "Basic oci registry spec", + "type": "object", + "required": [ + "endpoint", + "auth" + ], + "properties": { + "auth": { + "$ref": "#/definitions/v1RegistryAuth" + }, + "baseContentPath": { + "description": "OCI registry content base path", + "type": "string" + }, + "basePath": { + "description": "OCI registry api base path", + "type": "string" + }, + "endpoint": { + "description": "OCI registry endpoint", + "type": "string" + }, + "providerType": { + "type": "string", + "default": "helm", + "enum": [ + "helm", + "zarf", + "pack" + ] + }, + "registryUid": { + "description": "Basic oci registry uid", + "type": "string" + }, + "scope": { + "type": "string" + } + } + }, + "v1BulkDeleteFailure": { + "properties": { + "errMsg": { + "type": "string" + }, + "name": { + "type": "string" + }, + "uid": { + "type": "string" + } + } + }, + "v1BulkDeleteRequest": { + "required": [ + "uids" + ], + "properties": { + "uids": { + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + } + } + } + }, + "v1BulkDeleteResponse": { + "properties": { + "deletedCount": { + "type": "integer", + "x-omitempty": false + }, + "failures": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1BulkDeleteFailure" + }, + "x-omitempty": false + }, + "isSucceeded": { + "type": "boolean", + "x-omitempty": false + }, + "message": { + "type": "string", + "x-omitempty": false + } + } + }, + "v1BulkEvents": { + "description": "Describes a list component events' details", + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1Event" + } + }, + "v1CPU": { + "type": "object", + "properties": { + "cores": { + "description": "number of cpu cores", + "type": "integer", + "format": "int32" + } + } + }, + "v1Cert": { + "type": "object", + "properties": { + "certificate": { + "type": "string", + "x-omitempty": false + }, + "isCA": { + "type": "boolean", + "x-omitempty": false + }, + "key": { + "type": "string", + "x-omitempty": false + } + } + }, + "v1Certificate": { + "description": "Certificate details", + "type": "object", + "properties": { + "expiry": { + "description": "Certificate expiry time", + "$ref": "#/definitions/v1Time" + }, + "name": { + "type": "string" + } + } + }, + "v1CertificateAuthority": { + "description": "Certificate Authority", + "type": "object", + "properties": { + "certificates": { + "type": "array", + "items": { + "$ref": "#/definitions/v1Certificate" + } + }, + "expiry": { + "description": "Certificate expiry time", + "$ref": "#/definitions/v1Time" + }, + "name": { + "type": "string" + } + } + }, + "v1Channel": { + "type": "object", + "properties": { + "alertAllUsers": { + "type": "boolean", + "x-omitempty": false + }, + "createdBy": { + "type": "string" + }, + "http": { + "type": "object", + "properties": { + "body": { + "type": "string" + }, + "headers": { + "additionalProperties": { + "type": "string" + } + }, + "method": { + "type": "string" + }, + "url": { + "type": "string" + } + } + }, + "identifiers": { + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + } + }, + "isActive": { + "type": "boolean", + "x-omitempty": false + }, + "status": { + "$ref": "#/definitions/v1AlertNotificationStatus" + }, + "type": { + "type": "string", + "enum": [ + "email", + "app", + "http" + ] + }, + "uid": { + "type": "string" + } + } + }, + "v1CloudAccountMeta": { + "description": "Cloud account meta information", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "uid": { + "type": "string" + } + } + }, + "v1CloudAccountMetadata": { + "description": "Cloud account metadata summary", + "properties": { + "kind": { + "type": "string" + }, + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + } + } + }, + "v1CloudAccountSettings": { + "description": "Cloud account settings", + "type": "object", + "properties": { + "disablePropertiesRequest": { + "description": "Will disable certain properties request to cloud and the input is collected directly from the user", + "type": "boolean", + "x-omitempty": false + } + } + }, + "v1CloudAccountStatus": { + "description": "Status of the account", + "type": "object", + "properties": { + "state": { + "description": "Cloud account status", + "type": "string" + } + } + }, + "v1CloudAccountSummary": { + "description": "Cloud account summary", + "type": "object", + "properties": { + "kind": { + "type": "string" + }, + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "specSummary": { + "description": "Cloud account spec summary", + "type": "object", + "properties": { + "accountId": { + "type": "string" + } + } + }, + "status": { + "$ref": "#/definitions/v1CloudAccountStatus" + } + } + }, + "v1CloudAccountUidEntity": { + "description": "Cloud account uid entity", + "type": "object", + "properties": { + "uid": { + "description": "Cloud account uid", + "type": "string" + } + } + }, + "v1CloudAccountsMetadata": { + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1CloudAccountMetadata" + } + } + } + }, + "v1CloudAccountsPatch": { + "type": "array", + "items": { + "$ref": "#/definitions/v1HttpPatch" + } + }, + "v1CloudAccountsSummary": { + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1CloudAccountSummary" + } + }, + "listmeta": { + "$ref": "#/definitions/v1ListMetaData" + } + } + }, + "v1CloudCategory": { + "description": "Cloud category description", + "type": "string", + "default": "cloud", + "enum": [ + "datacenter", + "cloud", + "edge" + ] + }, + "v1CloudConfigMeta": { + "type": "object", + "properties": { + "cloudType": { + "type": "string" + }, + "machinePools": { + "description": "Machine pool meta information", + "type": "array", + "items": { + "$ref": "#/definitions/v1MachinePoolMeta" + } + }, + "uid": { + "description": "Cluster's cloud config uid", + "type": "string" + } + } + }, + "v1CloudCost": { + "description": "Cloud cost information", + "type": "object", + "properties": { + "compute": { + "type": "number", + "format": "float64", + "x-omitempty": false + }, + "storage": { + "type": "number", + "format": "float64", + "x-omitempty": false + }, + "total": { + "type": "number", + "format": "float64", + "x-omitempty": false + } + } + }, + "v1CloudCostDataPoint": { + "description": "Cloud cost data point information", + "type": "object", + "properties": { + "compute": { + "type": "number", + "format": "float64", + "x-omitempty": false + }, + "storage": { + "type": "number", + "format": "float64", + "x-omitempty": false + }, + "timestamp": { + "type": "number", + "format": "int64" + }, + "total": { + "type": "number", + "format": "float64", + "x-omitempty": false + } + } + }, + "v1CloudInstanceRateConfig": { + "description": "Cloud instance rate config", + "properties": { + "computeRateProportion": { + "type": "number", + "format": "float" + }, + "memoryRateProportion": { + "type": "number", + "format": "float" + } + } + }, + "v1CloudMachineStatus": { + "description": "cloud machine status", + "type": "object", + "properties": { + "health": { + "$ref": "#/definitions/v1MachineHealth" + }, + "instanceState": { + "type": "string", + "enum": [ + "Pending", + "Provisioning", + "Provisioned", + "Running", + "Deleting", + "Deleted", + "Failed", + "Unknown" + ] + }, + "maintenanceStatus": { + "$ref": "#/definitions/v1MachineMaintenanceStatus" + } + } + }, + "v1CloudRate": { + "description": "Cloud estimated rate information", + "type": "object", + "properties": { + "compute": { + "$ref": "#/definitions/v1ComputeRate" + }, + "storage": { + "type": "array", + "items": { + "$ref": "#/definitions/v1StorageRate" + } + }, + "total": { + "type": "number", + "format": "float64", + "x-omitempty": false + } + } + }, + "v1CloudResourceMetadata": { + "description": "Cloud resource metadata", + "type": "object", + "properties": { + "instanceTypes": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/v1InstanceType" + } + }, + "storageTypes": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/v1StorageType" + } + } + } + }, + "v1CloudSpotPrice": { + "description": "Spot price entity of a particular cloud type", + "type": "object", + "properties": { + "spotPrice": { + "description": "Spot price of a resource for a particular cloud", + "type": "number", + "format": "float64", + "x-omitempty": false + } + } + }, + "v1CloudWatch": { + "type": "object", + "properties": { + "credentials": { + "$ref": "#/definitions/v1AwsCloudAccount" + }, + "group": { + "type": "string" + }, + "region": { + "type": "string" + }, + "stream": { + "type": "string" + } + } + }, + "v1ClusterBackup": { + "description": "Cluster Backup", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/v1ClusterBackupSpec" + }, + "status": { + "$ref": "#/definitions/v1ClusterBackupStatus" + } + } + }, + "v1ClusterBackupConfig": { + "description": "Cluster backup config", + "properties": { + "backupLocationName": { + "type": "string" + }, + "backupLocationUid": { + "type": "string" + }, + "backupName": { + "type": "string" + }, + "backupPrefix": { + "type": "string" + }, + "durationInHours": { + "type": "number", + "format": "int64" + }, + "includeAllDisks": { + "type": "boolean" + }, + "includeClusterResources": { + "type": "boolean" + }, + "locationType": { + "type": "string" + }, + "namespaces": { + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + } + }, + "schedule": { + "$ref": "#/definitions/v1ClusterFeatureSchedule" + } + } + }, + "v1ClusterBackupLocationType": { + "description": "Cluster backup location type", + "required": [ + "locationType" + ], + "properties": { + "locationType": { + "type": "string" + } + } + }, + "v1ClusterBackupSpec": { + "description": "Cluster Backup Spec", + "properties": { + "clusterUid": { + "type": "string" + }, + "config": { + "$ref": "#/definitions/v1ClusterBackupConfig" + } + } + }, + "v1ClusterBackupStatus": { + "description": "Cluster Backup Status", + "properties": { + "clusterBackupStatuses": { + "type": "array", + "items": { + "$ref": "#/definitions/v1ClusterBackupStatusMeta" + } + } + } + }, + "v1ClusterBackupStatusMeta": { + "description": "Cluster Backup Status Meta", + "properties": { + "actor": { + "$ref": "#/definitions/v1ClusterFeatureActor" + }, + "backupConfig": { + "$ref": "#/definitions/v1BackupStatusConfig" + }, + "backupLocationConfig": { + "$ref": "#/definitions/v1BackupLocationConfig" + }, + "backupRequestUid": { + "type": "string" + }, + "backupStatusMeta": { + "type": "array", + "items": { + "$ref": "#/definitions/v1BackupStatusMeta" + } + }, + "restoreStatusMeta": { + "type": "array", + "items": { + "$ref": "#/definitions/v1BackupRestoreStatusMeta" + } + }, + "state": { + "type": "string" + } + } + }, + "v1ClusterComplianceOnDemandConfig": { + "description": "Cluster compliance scan on demand configuration", + "properties": { + "kubeBench": { + "$ref": "#/definitions/v1ClusterComplianceScanKubeBenchConfig" + }, + "kubeHunter": { + "$ref": "#/definitions/v1ClusterComplianceScanKubeHunterConfig" + }, + "sonobuoy": { + "$ref": "#/definitions/v1ClusterComplianceScanSonobuoyConfig" + }, + "syft": { + "$ref": "#/definitions/v1ClusterComplianceScanSyftConfig" + } + } + }, + "v1ClusterComplianceScan": { + "description": "Cluster Compliance Scan", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/v1ClusterComplianceScanSpec" + } + } + }, + "v1ClusterComplianceScanKubeBenchConfig": { + "description": "Cluster compliance scan config for kube bench driver", + "properties": { + "runScan": { + "type": "boolean" + } + } + }, + "v1ClusterComplianceScanKubeBenchScheduleConfig": { + "description": "Cluster compliance scan schedule config for kube bench driver", + "properties": { + "schedule": { + "$ref": "#/definitions/v1ClusterFeatureSchedule" + } + } + }, + "v1ClusterComplianceScanKubeHunterConfig": { + "description": "Cluster compliance scan config for kube hunter driver", + "properties": { + "runScan": { + "type": "boolean" + } + } + }, + "v1ClusterComplianceScanKubeHunterScheduleConfig": { + "description": "Cluster compliance scan schedule config for kube hunter driver", + "properties": { + "schedule": { + "$ref": "#/definitions/v1ClusterFeatureSchedule" + } + } + }, + "v1ClusterComplianceScanLogSpec": { + "description": "Cluster compliance scan logs spec", + "properties": { + "clusterUid": { + "type": "string" + }, + "driverType": { + "type": "string" + } + } + }, + "v1ClusterComplianceScanLogs": { + "description": "Cluster compliance scan Logs", + "properties": { + "kubeBenchLogs": { + "type": "array", + "items": { + "$ref": "#/definitions/v1ClusterScanLogKubeBench" + } + }, + "kubeHunterLogs": { + "type": "array", + "items": { + "$ref": "#/definitions/v1ClusterScanLogKubeHunter" + } + }, + "sonobuoyLogs": { + "type": "array", + "items": { + "$ref": "#/definitions/v1ClusterScanLogSonobuoy" + } + }, + "syftLogs": { + "type": "array", + "items": { + "$ref": "#/definitions/v1ClusterScanLogSyft" + } + } + } + }, + "v1ClusterComplianceScanSonobuoyConfig": { + "description": "Cluster compliance scan config for sonobuoy driver", + "properties": { + "runScan": { + "type": "boolean" + } + } + }, + "v1ClusterComplianceScanSonobuoyScheduleConfig": { + "description": "Cluster compliance scan schedule config for sonobuoy driver", + "properties": { + "schedule": { + "$ref": "#/definitions/v1ClusterFeatureSchedule" + } + } + }, + "v1ClusterComplianceScanSpec": { + "description": "Cluster compliance scan Spec", + "properties": { + "clusterUid": { + "type": "string" + }, + "driverSpec": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/v1ComplianceScanDriverSpec" + } + } + } + }, + "v1ClusterComplianceScanSyftConfig": { + "description": "Cluster compliance scan config for syft driver", + "properties": { + "config": { + "$ref": "#/definitions/v1ClusterComplianceScanSyftDriverConfig" + }, + "runScan": { + "type": "boolean" + } + } + }, + "v1ClusterComplianceScanSyftDriverConfig": { + "description": "Cluster compliance scan specification", + "properties": { + "format": { + "type": "string", + "enum": [ + "cyclonedx-json", + "github-json", + "spdx-json", + "syft-json" + ] + }, + "labelSelector": { + "type": "string" + }, + "location": { + "$ref": "#/definitions/v1ObjectEntity" + }, + "namespace": { + "type": "string" + }, + "podName": { + "type": "string" + }, + "scope": { + "type": "string", + "enum": [ + "cluster", + "namespace", + "label-selector", + "pod" + ] + } + } + }, + "v1ClusterComplianceScheduleConfig": { + "description": "Cluster compliance scan schedule configuration", + "properties": { + "kubeBench": { + "$ref": "#/definitions/v1ClusterComplianceScanKubeBenchScheduleConfig" + }, + "kubeHunter": { + "$ref": "#/definitions/v1ClusterComplianceScanKubeHunterScheduleConfig" + }, + "sonobuoy": { + "$ref": "#/definitions/v1ClusterComplianceScanSonobuoyScheduleConfig" + } + } + }, + "v1ClusterCondition": { + "type": "object", + "required": [ + "type", + "status" + ], + "properties": { + "lastProbeTime": { + "$ref": "#/definitions/v1Time" + }, + "lastTransitionTime": { + "$ref": "#/definitions/v1Time" + }, + "message": { + "description": "Human-readable message indicating details about last transition.", + "type": "string" + }, + "reason": { + "description": "Unique, one-word, CamelCase reason for the condition's last transition.", + "type": "string" + }, + "status": { + "type": "string" + }, + "type": { + "type": "string" + } + } + }, + "v1ClusterConfig": { + "type": "object", + "properties": { + "clusterMetaAttribute": { + "description": "ClusterMetaAttribute contains additional cluster metadata information.", + "type": "string" + }, + "clusterRbac": { + "description": "Deprecated. Use clusterResources", + "type": "array", + "items": { + "$ref": "#/definitions/v1ResourceReference" + } + }, + "clusterResources": { + "description": "ClusterResources defines the managment of namespace resource allocations, role bindings.", + "$ref": "#/definitions/v1ClusterResources" + }, + "controlPlaneHealthCheckTimeout": { + "description": "ControlPlaneHealthCheckTimeout is the timeout to check for ready state of the control plane nodes. If the node is not ready within the time out set, the node will be deleted and a new node will be launched.", + "type": "string" + }, + "hostClusterConfig": { + "description": "HostClusterConfiguration defines the configuration of host clusters, where virtual clusters be deployed", + "$ref": "#/definitions/v1HostClusterConfig" + }, + "lifecycleConfig": { + "$ref": "#/definitions/v1LifecycleConfig" + }, + "machineHealthConfig": { + "description": "MachineHealthCheckConfig defines the healthcheck timeouts for the node. The timeouts are configured by the user to overide the default healthchecks.", + "$ref": "#/definitions/v1MachineHealthCheckConfig" + }, + "machineManagementConfig": { + "description": "MachineManagementConfig defines the management configurations for the node. Patching OS security updates etc can be configured by user.", + "$ref": "#/definitions/v1MachineManagementConfig" + }, + "updateWorkerPoolsInParallel": { + "description": "UpdateWorkerPoolsInParallel is used to decide if the update of workerpools happen in parallel. When this flag is false, the workerpools are updated sequentially.", + "type": "boolean" + } + } + }, + "v1ClusterConfigEntity": { + "type": "object", + "properties": { + "clusterMetaAttribute": { + "description": "ClusterMetaAttribute can be used to set additional cluster metadata information.", + "type": "string" + }, + "controlPlaneHealthCheckTimeout": { + "type": "string" + }, + "hostClusterConfig": { + "$ref": "#/definitions/v1HostClusterConfig" + }, + "lifecycleConfig": { + "$ref": "#/definitions/v1LifecycleConfig" + }, + "location": { + "$ref": "#/definitions/v1ClusterLocation" + }, + "machineManagementConfig": { + "$ref": "#/definitions/v1MachineManagementConfig" + }, + "resources": { + "$ref": "#/definitions/v1ClusterResourcesEntity" + }, + "updateWorkerPoolsInParallel": { + "type": "boolean" + } + } + }, + "v1ClusterConfigResponse": { + "type": "object", + "properties": { + "hostClusterConfig": { + "description": "HostClusterConfig defines the configuration entity of host clusters config entity", + "$ref": "#/definitions/v1HostClusterConfigResponse" + } + } + }, + "v1ClusterDefinitionEntity": { + "description": "Cluster definition entity", + "type": "object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectMetaInputEntity" + }, + "spec": { + "$ref": "#/definitions/v1ClusterDefinitionSpecEntity" + } + } + }, + "v1ClusterDefinitionProfileEntity": { + "description": "Cluster definition profile entity", + "type": "object", + "required": [ + "uid" + ], + "properties": { + "packs": { + "description": "Cluster profile packs array", + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1PackValuesEntity" + } + }, + "uid": { + "description": "Cluster profile uid", + "type": "string" + } + } + }, + "v1ClusterDefinitionSpecEntity": { + "description": "Cluster definition spec entity", + "type": "object", + "required": [ + "profiles", + "cloudType" + ], + "properties": { + "cloudType": { + "type": "string" + }, + "profiles": { + "description": "Cluster definition profiles", + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1ClusterDefinitionProfileEntity" + } + } + } + }, + "v1ClusterEdgeInstallerConfig": { + "properties": { + "installerDownloadLinks": { + "additionalProperties": { + "type": "string" + } + } + } + }, + "v1ClusterFeatureActor": { + "description": "Compliance Scan actor", + "properties": { + "actorType": { + "type": "string" + }, + "uid": { + "type": "string" + } + } + }, + "v1ClusterFeatureSchedule": { + "description": "Cluster feature schedule", + "properties": { + "scheduledRunTime": { + "type": "string" + } + } + }, + "v1ClusterFips": { + "properties": { + "mode": { + "$ref": "#/definitions/v1ClusterFipsMode" + } + } + }, + "v1ClusterFipsMode": { + "type": "string", + "default": "none", + "enum": [ + "full", + "none", + "partial", + "unknown" + ] + }, + "v1ClusterGroup": { + "description": "Cluster group information", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/v1ClusterGroupSpec" + }, + "status": { + "$ref": "#/definitions/v1ClusterGroupStatus" + } + } + }, + "v1ClusterGroupClusterRef": { + "description": "Cluster group cluster reference", + "properties": { + "clusterName": { + "type": "string" + }, + "clusterUid": { + "type": "string" + } + } + }, + "v1ClusterGroupClustersConfig": { + "description": "Clusters config of cluster group", + "properties": { + "endpointType": { + "description": "Host cluster endpoint type", + "type": "string", + "enum": [ + "Ingress", + "LoadBalancer" + ] + }, + "hostClustersConfig": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1ClusterGroupHostClusterConfig" + } + }, + "kubernetesDistroType": { + "$ref": "#/definitions/v1ClusterKubernetesDistroType" + }, + "limitConfig": { + "$ref": "#/definitions/v1ClusterGroupLimitConfig" + }, + "values": { + "type": "string" + } + } + }, + "v1ClusterGroupEntity": { + "description": "Cluster group information", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/v1ClusterGroupSpecEntity" + } + } + }, + "v1ClusterGroupHostClusterConfig": { + "properties": { + "clusterUid": { + "type": "string" + }, + "endpointConfig": { + "description": "host cluster endpoint configuration", + "$ref": "#/definitions/v1HostClusterEndpointConfig" + } + } + }, + "v1ClusterGroupHostClusterEntity": { + "description": "Clusters and clusters config of cluster group", + "properties": { + "clusterRefs": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1ClusterGroupClusterRef" + } + }, + "clustersConfig": { + "$ref": "#/definitions/v1ClusterGroupClustersConfig" + } + } + }, + "v1ClusterGroupLimitConfig": { + "description": "Cluster group limit config", + "properties": { + "cpu": { + "description": "Deprecated. Use field cpuMilliCore", + "type": "integer", + "format": "int32" + }, + "cpuMilliCore": { + "description": "CPU in milli cores", + "type": "integer", + "format": "int32" + }, + "memory": { + "description": "Deprecated. Use field memoryMiB", + "type": "integer", + "format": "int32" + }, + "memoryMiB": { + "description": "Memory in MiB", + "type": "integer", + "format": "int32" + }, + "overSubscription": { + "description": "Over subscription percentage", + "type": "integer", + "format": "int32" + }, + "storageGiB": { + "description": "Storage in GiB", + "type": "integer", + "format": "int32" + } + } + }, + "v1ClusterGroupResource": { + "description": "Cluster group resource allocated and usage information", + "properties": { + "allocated": { + "type": "number", + "format": "float64", + "x-omitempty": false + }, + "used": { + "type": "number", + "format": "float64", + "x-omitempty": false + } + } + }, + "v1ClusterGroupSpec": { + "description": "Cluster group specifications", + "properties": { + "clusterProfileTemplates": { + "description": "ClusterProfileTemplate is a copy of the draft version or latest published version of the clusterprofileSpec. It consists of list of add on profiles at a cluster group level which will be enforced on all virtual cluster. ClusterProfileTemplate will be updated from the clusterprofile pointed by ClusterProfileRef", + "type": "array", + "items": { + "$ref": "#/definitions/v1ClusterProfileTemplate" + } + }, + "clusterRefs": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1ClusterGroupClusterRef" + } + }, + "clustersConfig": { + "$ref": "#/definitions/v1ClusterGroupClustersConfig" + }, + "type": { + "type": "string", + "enum": [ + "hostCluster" + ] + } + } + }, + "v1ClusterGroupSpecEntity": { + "description": "Cluster group specifications request entity", + "properties": { + "clusterRefs": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1ClusterGroupClusterRef" + } + }, + "clustersConfig": { + "$ref": "#/definitions/v1ClusterGroupClustersConfig" + }, + "profiles": { + "type": "array", + "items": { + "$ref": "#/definitions/v1SpectroClusterProfileEntity" + } + }, + "type": { + "type": "string", + "enum": [ + "hostCluster" + ] + } + } + }, + "v1ClusterGroupStatus": { + "description": "Cluster group status", + "properties": { + "isActive": { + "type": "boolean", + "x-omitempty": false + } + } + }, + "v1ClusterGroupSummary": { + "description": "Cluster group summay", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/v1ClusterGroupSummarySpec" + } + } + }, + "v1ClusterGroupSummarySpec": { + "description": "Cluster group summay spec", + "properties": { + "clusterProfileTemplates": { + "type": "array", + "items": { + "$ref": "#/definitions/v1ClusterProfileTemplateMeta" + } + }, + "cpu": { + "description": "Deprecated", + "$ref": "#/definitions/v1ClusterGroupResource" + }, + "endpointType": { + "type": "string", + "enum": [ + "Ingress", + "LoadBalancer" + ] + }, + "hostClusters": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1ObjectResReference" + } + }, + "hostClustersCount": { + "type": "integer", + "x-omitempty": false + }, + "memory": { + "description": "Deprecated", + "$ref": "#/definitions/v1ClusterGroupResource" + }, + "scope": { + "type": "string" + }, + "virtualClustersCount": { + "type": "integer", + "x-omitempty": false + } + } + }, + "v1ClusterGroupsDeveloperCreditUsage": { + "description": "Cluster group resource allocated and usage information", + "properties": { + "allocatedCredit": { + "$ref": "#/definitions/v1DeveloperCredit" + }, + "usedCredit": { + "$ref": "#/definitions/v1DeveloperCredit" + } + } + }, + "v1ClusterGroupsHostClusterMetadata": { + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1ObjectScopeEntity" + } + } + } + }, + "v1ClusterGroupsHostClusterSummary": { + "type": "object", + "required": [ + "summaries" + ], + "properties": { + "summaries": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1ClusterGroupSummary" + } + } + } + }, + "v1ClusterHelmChart": { + "description": "Cluster helm chart metadata", + "properties": { + "localName": { + "type": "string" + }, + "matchedRegistries": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1ClusterHelmRegistry" + } + }, + "name": { + "type": "string" + }, + "values": { + "type": "string" + }, + "version": { + "type": "string" + } + } + }, + "v1ClusterHelmCharts": { + "description": "Cluster helm charts metadata", + "properties": { + "charts": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1ClusterHelmChart" + } + } + } + }, + "v1ClusterHelmRegistry": { + "description": "Cluster helm registry information", + "properties": { + "name": { + "type": "string" + }, + "uid": { + "type": "string" + } + } + }, + "v1ClusterImport": { + "type": "object", + "properties": { + "importLink": { + "description": "import link to download and install ally-lite, palette-lite", + "type": "string" + }, + "isBrownfield": { + "description": "Deprecated. Use the 'spec.clusterType'", + "type": "boolean", + "x-omitempty": false + }, + "state": { + "description": "cluster import status", + "type": "string" + } + } + }, + "v1ClusterKubeBenchLogStatus": { + "description": "Cluster compliance scan KubeBench Log Status", + "properties": { + "actor": { + "$ref": "#/definitions/v1ClusterFeatureActor" + }, + "message": { + "type": "string" + }, + "reports": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/v1KubeBenchReport" + } + }, + "requestUid": { + "type": "string" + }, + "scanTime": { + "$ref": "#/definitions/v1ClusterScanTime" + }, + "state": { + "type": "string" + } + } + }, + "v1ClusterKubeHunterLogStatus": { + "description": "Cluster compliance scan KubeHunter Log Status", + "properties": { + "actor": { + "$ref": "#/definitions/v1ClusterFeatureActor" + }, + "message": { + "type": "string" + }, + "reports": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/v1KubeHunterReport" + } + }, + "requestUid": { + "type": "string" + }, + "scanTime": { + "$ref": "#/definitions/v1ClusterScanTime" + }, + "state": { + "type": "string" + } + } + }, + "v1ClusterKubernetesDistroType": { + "type": "string", + "default": "k3s", + "enum": [ + "k3s", + "cncf_k8s" + ] + }, + "v1ClusterLocation": { + "description": "Cluster location information", + "type": "object", + "properties": { + "countryCode": { + "description": "country code for cluster location", + "type": "string" + }, + "countryName": { + "description": "country name for cluster location", + "type": "string" + }, + "geoLoc": { + "$ref": "#/definitions/v1GeolocationLatlong" + }, + "regionCode": { + "description": "region code for cluster location", + "type": "string" + }, + "regionName": { + "description": "region name for cluster location", + "type": "string" + } + } + }, + "v1ClusterLogFetcher": { + "description": "Cluster Log Fetcher", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/v1ClusterLogFetcherSpec" + }, + "status": { + "$ref": "#/definitions/v1ClusterLogFetcherStatus" + } + } + }, + "v1ClusterLogFetcherK8sRequest": { + "description": "Cluster Log Fetcher K8s", + "properties": { + "labelSelector": { + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + } + }, + "namespaces": { + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + } + } + } + }, + "v1ClusterLogFetcherNodeRequest": { + "description": "Cluster Log Fetcher Node Request", + "properties": { + "logs": { + "description": "Array of logs", + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + } + } + } + }, + "v1ClusterLogFetcherRequest": { + "description": "Cluster Log Fetcher Request", + "properties": { + "duration": { + "description": "Duration for which log is requested", + "type": "integer", + "format": "int64", + "default": 10 + }, + "k8s": { + "$ref": "#/definitions/v1ClusterLogFetcherK8sRequest" + }, + "mode": { + "description": "Accepted Values - [\"cluster\", \"app\"]. if \"app\" then logs will be fetched from the virtual cluster", + "type": "string", + "default": "cluster", + "enum": [ + "cluster", + "app" + ] + }, + "noOfLines": { + "description": "No of lines of logs requested", + "type": "integer", + "format": "int64", + "default": 1000 + }, + "node": { + "$ref": "#/definitions/v1ClusterLogFetcherNodeRequest" + } + } + }, + "v1ClusterLogFetcherSpec": { + "description": "Cluster Log Fetcher Spec", + "properties": { + "clusterUid": { + "type": "string" + }, + "log": { + "type": "string" + } + } + }, + "v1ClusterLogFetcherStatus": { + "description": "Cluster Log Fetcher Status", + "properties": { + "state": { + "type": "string" + } + } + }, + "v1ClusterManifest": { + "description": "Cluster manifest information", + "properties": { + "content": { + "type": "string" + }, + "name": { + "type": "string" + }, + "namespace": { + "type": "string" + }, + "type": { + "type": "string" + } + } + }, + "v1ClusterManifests": { + "description": "Cluster manifests information", + "properties": { + "manifests": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1ClusterManifest" + } + } + } + }, + "v1ClusterMetaAttributeEntity": { + "description": "Cluster additional metadata entity", + "type": "object", + "properties": { + "clusterMetaAttribute": { + "type": "string" + } + } + }, + "v1ClusterMetaSpecLocation": { + "description": "Cluster location information", + "type": "object", + "properties": { + "coordinates": { + "type": "array", + "items": { + "type": "number", + "format": "float64" + } + }, + "countryCode": { + "type": "string" + }, + "countryName": { + "type": "string" + }, + "regionCode": { + "type": "string" + }, + "regionName": { + "type": "string" + } + } + }, + "v1ClusterMetaStatusCost": { + "description": "Cluster meta Cost information", + "type": "object", + "properties": { + "total": { + "type": "number", + "format": "float64", + "x-omitempty": false + } + } + }, + "v1ClusterMetaStatusHealth": { + "description": "Cluster meta health information", + "type": "object", + "properties": { + "isHeartBeatFailed": { + "type": "boolean", + "x-omitempty": false + }, + "state": { + "type": "string" + } + } + }, + "v1ClusterMetaStatusUpdates": { + "description": "Cluster meta updates information", + "type": "object", + "properties": { + "isUpdatesPending": { + "type": "boolean", + "x-omitempty": false + } + } + }, + "v1ClusterNamespace": { + "description": "Cluster's namespace", + "properties": { + "namespace": { + "type": "string" + }, + "pvcCount": { + "type": "number", + "format": "int32" + } + } + }, + "v1ClusterNamespaceResource": { + "description": "Cluster Namespace resource defintion", + "type": "object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/v1ClusterNamespaceSpec" + }, + "status": { + "$ref": "#/definitions/v1ClusterNamespaceStatus" + } + } + }, + "v1ClusterNamespaceResourceAllocation": { + "description": "Cluster namespace resource allocation", + "properties": { + "cpuCores": { + "type": "number", + "minimum": 0, + "exclusiveMinimum": true + }, + "memoryMiB": { + "type": "number", + "minimum": 0, + "exclusiveMinimum": true + } + } + }, + "v1ClusterNamespaceResourceInputEntity": { + "description": "Cluster Namespace resource defintion", + "type": "object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectMetaUpdateEntity" + }, + "spec": { + "$ref": "#/definitions/v1ClusterNamespaceSpec" + } + } + }, + "v1ClusterNamespaceResources": { + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1ClusterNamespaceResource" + } + } + } + }, + "v1ClusterNamespaceResourcesUpdateEntity": { + "type": "object", + "properties": { + "namespaces": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1ClusterNamespaceResourceInputEntity" + } + } + } + }, + "v1ClusterNamespaceSpec": { + "description": "Cluster namespace spec", + "properties": { + "isRegex": { + "type": "boolean", + "x-omitempty": false + }, + "relatedObject": { + "$ref": "#/definitions/v1RelatedObject" + }, + "resourceAllocation": { + "$ref": "#/definitions/v1ClusterNamespaceResourceAllocation" + } + } + }, + "v1ClusterNamespaceStatus": { + "description": "Cluster namespace status", + "properties": { + "errors": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1ClusterResourceError" + } + } + } + }, + "v1ClusterNamespaces": { + "description": "Cluster's available namespaces", + "properties": { + "namespaces": { + "type": "array", + "items": { + "$ref": "#/definitions/v1ClusterNamespace" + } + } + } + }, + "v1ClusterNotificationStatus": { + "description": "Cluster notifications status", + "properties": { + "isAvailable": { + "type": "boolean", + "x-omitempty": false + } + } + }, + "v1ClusterNotificationUpdateEntity": { + "description": "Cluster input for notification update", + "type": "object", + "properties": { + "profiles": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1ClusterProfileNotificationUpdateEntity" + } + }, + "spcApplySettings": { + "$ref": "#/definitions/v1SpcApplySettings" + } + } + }, + "v1ClusterPackManifestStatus": { + "type": "object", + "properties": { + "condition": { + "$ref": "#/definitions/v1ClusterCondition" + }, + "name": { + "type": "string" + }, + "uid": { + "type": "string" + } + } + }, + "v1ClusterPackStatus": { + "type": "object", + "properties": { + "condition": { + "$ref": "#/definitions/v1ClusterCondition" + }, + "endTime": { + "$ref": "#/definitions/v1Time" + }, + "manifests": { + "type": "array", + "items": { + "$ref": "#/definitions/v1ClusterPackManifestStatus" + } + }, + "name": { + "type": "string" + }, + "profileUid": { + "type": "string" + }, + "services": { + "type": "array", + "items": { + "$ref": "#/definitions/v1LoadBalancerService" + } + }, + "startTime": { + "$ref": "#/definitions/v1Time" + }, + "type": { + "type": "string" + }, + "version": { + "type": "string" + } + } + }, + "v1ClusterProfile": { + "description": "ClusterProfile is the Schema for the clusterprofiles API", + "type": "object", + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + "type": "string" + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/v1ClusterProfileSpec" + }, + "status": { + "$ref": "#/definitions/v1ClusterProfileStatus" + } + } + }, + "v1ClusterProfileCloneEntity": { + "description": "Cluster profile clone request payload", + "type": "object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ClusterProfileCloneMetaInputEntity" + } + } + }, + "v1ClusterProfileCloneMetaInputEntity": { + "description": "Cluster profile clone metadata", + "type": "object", + "required": [ + "name" + ], + "properties": { + "name": { + "description": "Cloned cluster profile name", + "type": "string" + }, + "target": { + "$ref": "#/definitions/v1ClusterProfileCloneTarget" + }, + "version": { + "description": "Cloned cluster profile version", + "type": "string" + } + } + }, + "v1ClusterProfileCloneTarget": { + "description": "Cluster profile clone meta input entity", + "type": "object", + "required": [ + "scope" + ], + "properties": { + "projectUid": { + "description": "Cloned cluster profile project uid", + "type": "string" + }, + "scope": { + "$ref": "#/definitions/v1Scope" + } + } + }, + "v1ClusterProfileEntity": { + "description": "Cluster profile request payload", + "type": "object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "type": "object", + "properties": { + "template": { + "$ref": "#/definitions/v1ClusterProfileTemplateDraft" + }, + "variables": { + "description": "List of unique variable fields defined for a cluster profile with schema constraints", + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1Variable" + } + }, + "version": { + "description": "Cluster profile version", + "type": "string" + } + } + } + } + }, + "v1ClusterProfileFilterSpec": { + "description": "Cluster profile filter spec", + "properties": { + "environment": { + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + } + }, + "fips": { + "$ref": "#/definitions/v1ClusterFipsMode" + }, + "profileName": { + "$ref": "#/definitions/v1FilterString" + }, + "profileType": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1ProfileType" + } + }, + "scope": { + "$ref": "#/definitions/v1ClusterProfileScope" + }, + "tags": { + "$ref": "#/definitions/v1FilterArray" + }, + "version": { + "$ref": "#/definitions/v1FilterVersionString" + } + } + }, + "v1ClusterProfileFips": { + "description": "Cluster profile fips compliance status", + "properties": { + "mode": { + "$ref": "#/definitions/v1ClusterFipsMode" + } + } + }, + "v1ClusterProfileImportEntity": { + "description": "Cluster profile import request payload", + "type": "object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ClusterProfileMetadataImportEntity" + }, + "spec": { + "$ref": "#/definitions/v1ClusterProfileSpecImportEntity" + } + } + }, + "v1ClusterProfileMetadata": { + "description": "Cluster profile filter spec", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectEntity" + }, + "spec": { + "properties": { + "cloudType": { + "type": "string" + }, + "version": { + "type": "string" + } + } + } + } + }, + "v1ClusterProfileMetadataImportEntity": { + "description": "Cluster profile import metadata", + "type": "object", + "properties": { + "description": { + "description": "Cluster profile description", + "type": "string" + }, + "labels": { + "description": "Cluster profile labels", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "name": { + "description": "Cluster profile name", + "type": "string" + } + } + }, + "v1ClusterProfileNotificationUpdateEntity": { + "description": "Cluster profile notification update request payload", + "type": "object", + "properties": { + "packs": { + "description": "Cluster profile packs array", + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1PackManifestUpdateEntity" + } + }, + "uid": { + "description": "Cluster profile uid", + "type": "string" + } + } + }, + "v1ClusterProfilePackConfigList": { + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": { + "description": "Cluster profile packs array", + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1PackConfig" + } + } + } + }, + "v1ClusterProfilePackManifests": { + "description": "Cluster profile pack manifests", + "type": "object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/v1PackManifestsSpec" + }, + "status": { + "$ref": "#/definitions/v1PackSummaryStatus" + } + } + }, + "v1ClusterProfilePackSummary": { + "description": "Cluster profile packs summary about the deprecated, disabled, deleted packs count", + "type": "object", + "properties": { + "deleted": { + "description": "Total count of deleted packs in a cluster profile", + "type": "number", + "x-omitempty": false + }, + "deprecated": { + "description": "Total count of deprecated packs in a cluster profile", + "type": "number", + "x-omitempty": false + }, + "disabled": { + "description": "Total count of disabled packs in a cluster profile", + "type": "number", + "x-omitempty": false + } + } + }, + "v1ClusterProfilePacksEntities": { + "description": "List of cluster profile packs", + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": { + "description": "Cluster profile packs array", + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1ClusterProfilePacksEntity" + } + } + } + }, + "v1ClusterProfilePacksEntity": { + "description": "Cluster profile packs object", + "type": "object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/v1PackSummarySpec" + }, + "status": { + "$ref": "#/definitions/v1PackSummaryStatus" + } + } + }, + "v1ClusterProfilePacksManifests": { + "description": "Cluster profile pack manifests", + "type": "object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "type": "object", + "properties": { + "packs": { + "description": "Cluster profile packs array", + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1ClusterProfilePackManifests" + } + } + } + } + } + }, + "v1ClusterProfileScope": { + "type": "string", + "enum": [ + "system", + "tenant", + "project" + ] + }, + "v1ClusterProfileSortFields": { + "type": "string", + "enum": [ + "profileName", + "environment", + "profileType", + "creationTimestamp", + "lastModifiedTimestamp" + ], + "x-nullable": true + }, + "v1ClusterProfileSortSpec": { + "properties": { + "field": { + "$ref": "#/definitions/v1ClusterProfileSortFields" + }, + "order": { + "$ref": "#/definitions/v1SortOrder" + } + } + }, + "v1ClusterProfileSpec": { + "description": "ClusterProfileTemplate can be in draft mode, or published mode User only see the latest published template, and (or) the draft template User can apply either the draft version or the latest published version to a cluster when user create a draft version, just copy the Published template, increment the version, and keep changing the draft template without increment the draft version when user publish a draft, the version is fixed, and won't be able to make any modification on published template For each clusterprofile that has a published version, there will be a ClusterProfileArchive automatically created when user publish a draft, the published version will also be copied over to the corresponding ClusterProfileArchive it is just in case in the future for whatever reason we may want to expose earlier versions", + "type": "object", + "properties": { + "draft": { + "$ref": "#/definitions/v1ClusterProfileTemplate" + }, + "published": { + "$ref": "#/definitions/v1ClusterProfileTemplate" + }, + "version": { + "type": "string" + }, + "versions": { + "description": "Cluster profile's list of all the versions", + "type": "array", + "items": { + "$ref": "#/definitions/v1ClusterProfileVersion" + } + } + } + }, + "v1ClusterProfileSpecEntity": { + "description": "Cluster profile update spec", + "type": "object", + "properties": { + "version": { + "description": "Cluster profile version", + "type": "string" + } + } + }, + "v1ClusterProfileSpecImportEntity": { + "description": "Cluster profile import spec", + "type": "object", + "properties": { + "template": { + "$ref": "#/definitions/v1ClusterProfileTemplateImportEntity" + }, + "variables": { + "description": "List of unique variable fields defined for a cluster profile with schema constraints", + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1Variable" + } + }, + "version": { + "description": "Cluster profile version", + "type": "string" + } + } + }, + "v1ClusterProfileStatus": { + "description": "ClusterProfileStatus defines the observed state of ClusterProfile", + "type": "object", + "properties": { + "hasUserMacros": { + "description": "If it is true then profile pack values has a reference to user defined macros", + "type": "boolean", + "x-omitempty": false + }, + "inUseClusterUids": { + "description": "Deprecated. Use inUseClusters", + "type": "array", + "items": { + "type": "string" + } + }, + "inUseClusters": { + "type": "array", + "items": { + "$ref": "#/definitions/v1ObjectResReference" + } + }, + "isPublished": { + "type": "boolean", + "x-omitempty": false + } + } + }, + "v1ClusterProfileStatusSummary": { + "description": "ClusterProfileStatusSummary defines the observed state of ClusterProfile", + "type": "object", + "properties": { + "fips": { + "$ref": "#/definitions/v1ClusterProfileFips" + }, + "inUseClusterUids": { + "description": "Deprecated. Use inUseClusters", + "type": "array", + "items": { + "type": "string" + } + }, + "inUseClusters": { + "type": "array", + "items": { + "$ref": "#/definitions/v1ObjectEntity" + } + }, + "isPublished": { + "type": "boolean", + "x-omitempty": false + }, + "pack": { + "$ref": "#/definitions/v1ClusterProfilePackSummary" + } + } + }, + "v1ClusterProfileSummary": { + "description": "Cluster profile summary", + "type": "object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "specSummary": { + "description": "Cluster profile spec summary", + "type": "object", + "properties": { + "draft": { + "$ref": "#/definitions/v1ClusterProfileTemplateSummary" + }, + "published": { + "$ref": "#/definitions/v1ClusterProfileTemplateSummary" + }, + "version": { + "description": "Cluster profile's latest version", + "type": "string" + }, + "versions": { + "description": "Cluster profile's list of all the versions", + "type": "array", + "items": { + "$ref": "#/definitions/v1ClusterProfileVersion" + } + } + } + }, + "status": { + "$ref": "#/definitions/v1ClusterProfileStatusSummary" + } + } + }, + "v1ClusterProfileTemplate": { + "description": "ClusterProfileTemplate contains details of a clusterprofile definition", + "type": "object", + "properties": { + "cloudType": { + "type": "string" + }, + "name": { + "type": "string" + }, + "packServerRefs": { + "description": "PackServerRefs is only used on Hubble side it is reference to pack registry servers which PackRef belongs to in hubble, pack server is a top level object, so use a reference to point to it packs within a clusterprofile can come from different pack servers, so this is an array", + "type": "array", + "items": { + "$ref": "#/definitions/v1ObjectReference" + } + }, + "packServerSecret": { + "description": "This secret is used only on Palette side use case is similar to k8s image pull secret this single secret internally should contains all the pack servers in PackServerRefs if empty, means no credential is needed to access the pack server For spectro saas, Ally will set this field before pass to palette", + "type": "string" + }, + "packs": { + "description": "Packs definitions here are final definitions. If ClonedFrom and ParamsOverwrite is present, then Packs are the final merge result of ClonedFrom and ParamsOverwrite So orchestration engine will just take the Packs and do the work, no need to worry about parameters merge", + "type": "array", + "items": { + "$ref": "#/definitions/v1PackRef" + } + }, + "profileVersion": { + "description": "version start from 1.0.0, matching the index of ClusterProfileSpec.Versions[] will be used by clusterSpec to identify which version is applied to the cluster", + "type": "string" + }, + "relatedObject": { + "description": "RelatedObject refers to the type of object(clustergroup, cluster or edgeHost) the cluster profile is associated with", + "$ref": "#/definitions/v1ObjectReference" + }, + "type": { + "type": "string" + }, + "uid": { + "type": "string" + }, + "version": { + "description": "Deprecated. Use profileVersion", + "type": "integer", + "format": "int32" + } + } + }, + "v1ClusterProfileTemplateDraft": { + "description": "Cluster profile template spec", + "type": "object", + "properties": { + "cloudType": { + "type": "string" + }, + "packs": { + "description": "Cluster profile packs array", + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1PackManifestEntity" + } + }, + "type": { + "$ref": "#/definitions/v1ProfileType" + } + } + }, + "v1ClusterProfileTemplateImportEntity": { + "description": "Cluster profile import template", + "type": "object", + "properties": { + "cloudType": { + "description": "Cluster profile cloud type", + "type": "string" + }, + "packs": { + "description": "Cluster profile packs array", + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1PackImportEntity" + } + }, + "type": { + "description": "Cluster profile type [ \"cluster\", \"infra\", \"add-on\", \"system\" ]", + "type": "string" + } + } + }, + "v1ClusterProfileTemplateMeta": { + "description": "Cluster profile template meta information", + "type": "object", + "properties": { + "cloudType": { + "type": "string" + }, + "name": { + "description": "Cluster profile name", + "type": "string" + }, + "packs": { + "description": "Cluster profile packs array", + "type": "array", + "items": { + "$ref": "#/definitions/v1PackRef" + } + }, + "scope": { + "description": "scope or context(system, tenant or project)", + "type": "string" + }, + "type": { + "description": "Cluster profile type [ \"cluster\", \"infra\", \"add-on\", \"system\" ]", + "type": "string" + }, + "uid": { + "description": "Cluster profile uid", + "type": "string" + }, + "version": { + "type": "integer", + "format": "int32" + } + } + }, + "v1ClusterProfileTemplateSummary": { + "description": "Cluster profile template summary", + "type": "object", + "properties": { + "cloudType": { + "type": "string" + }, + "packs": { + "type": "array", + "items": { + "$ref": "#/definitions/v1PackRefSummary" + } + }, + "type": { + "type": "string" + } + } + }, + "v1ClusterProfileTemplateUpdate": { + "description": "Cluster profile template update spec", + "type": "object", + "properties": { + "packs": { + "description": "Cluster profile packs array", + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1PackManifestUpdateEntity" + } + }, + "type": { + "$ref": "#/definitions/v1ProfileType" + } + } + }, + "v1ClusterProfileUpdateEntity": { + "description": "Cluster profile update request payload", + "type": "object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "description": "Cluster profile update spec", + "type": "object", + "properties": { + "template": { + "$ref": "#/definitions/v1ClusterProfileTemplateUpdate" + }, + "version": { + "description": "Cluster profile version", + "type": "string" + } + } + } + } + }, + "v1ClusterProfileValidatorResponse": { + "description": "Cluster profile validator response", + "type": "object", + "properties": { + "packs": { + "$ref": "#/definitions/v1ConstraintValidatorResponse" + } + } + }, + "v1ClusterProfileVersion": { + "description": "Cluster profile with version", + "properties": { + "uid": { + "type": "string" + }, + "version": { + "type": "string" + } + } + }, + "v1ClusterProfilesFilterSpec": { + "description": "Spectro cluster filter summary spec", + "properties": { + "filter": { + "$ref": "#/definitions/v1ClusterProfileFilterSpec" + }, + "sort": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1ClusterProfileSortSpec" + } + } + } + }, + "v1ClusterProfilesMetadata": { + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1ClusterProfileMetadata" + } + } + } + }, + "v1ClusterProfilesSummary": { + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1ClusterProfileSummary" + } + }, + "listmeta": { + "$ref": "#/definitions/v1ListMetaData" + } + } + }, + "v1ClusterProxySpec": { + "description": "cluster proxy config spec", + "type": "object", + "properties": { + "caContainerMountPath": { + "description": "Location to mount Proxy CA cert inside container", + "type": "string" + }, + "caHostPath": { + "description": "Location for Proxy CA cert on host nodes", + "type": "string" + }, + "httpProxy": { + "description": "URL for HTTP requests unless overridden by NoProxy", + "type": "string" + }, + "httpsProxy": { + "description": "HTTPS requests unless overridden by NoProxy", + "type": "string" + }, + "noProxy": { + "description": "NoProxy represents the NO_PROXY or no_proxy environment", + "type": "string" + } + } + }, + "v1ClusterRbac": { + "description": "Cluster RBAC role binding defintion", + "type": "object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/v1ClusterRbacSpec" + }, + "status": { + "$ref": "#/definitions/v1ClusterRbacStatus" + } + } + }, + "v1ClusterRbacBinding": { + "description": "Cluster RBAC binding", + "type": "object", + "properties": { + "namespace": { + "type": "string" + }, + "role": { + "$ref": "#/definitions/v1ClusterRoleRef" + }, + "subjects": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1ClusterRbacSubjects" + } + }, + "type": { + "type": "string", + "enum": [ + "RoleBinding", + "ClusterRoleBinding" + ] + } + } + }, + "v1ClusterRbacInputEntity": { + "description": "Cluster RBAC role binding defintion", + "type": "object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectMetaUpdateEntity" + }, + "spec": { + "$ref": "#/definitions/v1ClusterRbacSpec" + } + } + }, + "v1ClusterRbacResourcesUpdateEntity": { + "type": "object", + "properties": { + "rbacs": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1ClusterRbacInputEntity" + } + } + } + }, + "v1ClusterRbacSpec": { + "description": "Cluster RBAC spec", + "type": "object", + "properties": { + "bindings": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1ClusterRbacBinding" + } + }, + "relatedObject": { + "$ref": "#/definitions/v1RelatedObject" + } + } + }, + "v1ClusterRbacStatus": { + "description": "Cluster rbac status", + "properties": { + "errors": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1ClusterResourceError" + } + } + } + }, + "v1ClusterRbacSubjects": { + "description": "Cluster role ref", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "namespace": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "User", + "Group", + "ServiceAccount" + ] + } + } + }, + "v1ClusterRbacs": { + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1ClusterRbac" + } + } + } + }, + "v1ClusterRefs": { + "description": "Cluster Object References", + "properties": { + "clusters": { + "type": "array", + "items": { + "$ref": "#/definitions/v1ObjectReference" + } + } + } + }, + "v1ClusterRepaveSource": { + "type": "string", + "enum": [ + "user", + "hubble", + "palette", + "stylus" + ] + }, + "v1ClusterRepaveState": { + "type": "string", + "default": "Pending", + "enum": [ + "Pending", + "Approved", + "Reverted" + ] + }, + "v1ClusterRepaveStatus": { + "description": "Cluster repave status", + "properties": { + "state": { + "$ref": "#/definitions/v1ClusterRepaveState" + } + } + }, + "v1ClusterResourceAllocation": { + "description": "Workspace resource allocation", + "properties": { + "clusterUid": { + "type": "string" + }, + "resourceAllocation": { + "$ref": "#/definitions/v1WorkspaceResourceAllocation" + } + } + }, + "v1ClusterResourceError": { + "description": "Cluster resource error", + "properties": { + "msg": { + "type": "string" + }, + "name": { + "type": "string" + }, + "resourceType": { + "type": "string" + } + } + }, + "v1ClusterResources": { + "type": "object", + "properties": { + "namespaces": { + "description": "Cluster namespaces", + "type": "array", + "items": { + "$ref": "#/definitions/v1ResourceReference" + } + }, + "rbacs": { + "description": "Cluster RBAC role bindings", + "type": "array", + "items": { + "$ref": "#/definitions/v1ResourceReference" + } + } + } + }, + "v1ClusterResourcesEntity": { + "type": "object", + "properties": { + "namespaces": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1ClusterNamespaceResourceInputEntity" + } + }, + "rbacs": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1ClusterRbacInputEntity" + } + } + } + }, + "v1ClusterRestore": { + "description": "Cluster Restore", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/v1ClusterRestoreSpec" + }, + "status": { + "$ref": "#/definitions/v1ClusterRestoreStatus" + } + } + }, + "v1ClusterRestoreConfig": { + "description": "Cluster restore config", + "required": [ + "backupRequestUid", + "backupName", + "destinationClusterUid" + ], + "properties": { + "backupName": { + "type": "string" + }, + "backupRequestUid": { + "type": "string" + }, + "destinationClusterUid": { + "type": "string" + }, + "includeClusterResources": { + "type": "boolean" + }, + "includeNamespaces": { + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + } + }, + "preserveNodePorts": { + "type": "boolean" + }, + "restorePVs": { + "type": "boolean" + } + } + }, + "v1ClusterRestoreSpec": { + "description": "Cluster Restore Spec", + "properties": { + "clusterUid": { + "type": "string" + } + } + }, + "v1ClusterRestoreStatus": { + "description": "Cluster Restore Status", + "properties": { + "clusterRestoreStatuses": { + "type": "array", + "items": { + "$ref": "#/definitions/v1ClusterRestoreStatusMeta" + } + } + } + }, + "v1ClusterRestoreStatusMeta": { + "description": "Cluster Restore Status Meta", + "properties": { + "actor": { + "$ref": "#/definitions/v1ClusterFeatureActor" + }, + "backupName": { + "type": "string" + }, + "backupRequestUid": { + "type": "string" + }, + "restoreRequestUid": { + "type": "string" + }, + "restoreStatusMeta": { + "$ref": "#/definitions/v1RestoreStatusMeta" + }, + "sourceClusterRef": { + "$ref": "#/definitions/v1ResourceReference" + }, + "state": { + "type": "string" + } + } + }, + "v1ClusterRoleRef": { + "description": "Cluster role ref", + "type": "object", + "properties": { + "kind": { + "type": "string", + "enum": [ + "Role", + "ClusterRole" + ] + }, + "name": { + "type": "string" + } + } + }, + "v1ClusterScanLogKubeBench": { + "description": "Cluster compliance scan KubeBench Log", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/v1ClusterComplianceScanLogSpec" + }, + "status": { + "$ref": "#/definitions/v1ClusterKubeBenchLogStatus" + } + } + }, + "v1ClusterScanLogKubeHunter": { + "description": "Cluster compliance scan KubeHunter Log", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/v1ClusterComplianceScanLogSpec" + }, + "status": { + "$ref": "#/definitions/v1ClusterKubeHunterLogStatus" + } + } + }, + "v1ClusterScanLogSonobuoy": { + "description": "Cluster compliance scan Sonobuoy Log", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/v1ClusterComplianceScanLogSpec" + }, + "status": { + "$ref": "#/definitions/v1ClusterSonobuoyLogStatus" + } + } + }, + "v1ClusterScanLogSyft": { + "description": "Cluster Compliance Scan Syft Log", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/v1ClusterComplianceScanLogSpec" + }, + "status": { + "$ref": "#/definitions/v1ClusterSyftLogStatus" + } + } + }, + "v1ClusterScanTime": { + "description": "Cluster compliance scan Time", + "properties": { + "endTime": { + "$ref": "#/definitions/v1Time" + }, + "startTime": { + "$ref": "#/definitions/v1Time" + } + } + }, + "v1ClusterSearchInputSpec": { + "properties": { + "inputs": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/v1ClusterSearchInputSpecProperty" + } + } + } + }, + "v1ClusterSearchInputSpecProperty": { + "properties": { + "values": { + "type": "array", + "items": { + "$ref": "#/definitions/v1ObjectEntity" + }, + "x-omitempty": true + } + } + }, + "v1ClusterSonobuoyLogStatus": { + "description": "Cluster compliance scan Sonobuoy Log Status", + "properties": { + "actor": { + "$ref": "#/definitions/v1ClusterFeatureActor" + }, + "message": { + "type": "string" + }, + "reports": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/v1SonobuoyReport" + } + }, + "requestUid": { + "type": "string" + }, + "scanTime": { + "$ref": "#/definitions/v1ClusterScanTime" + }, + "state": { + "type": "string" + } + } + }, + "v1ClusterSyftLogStatus": { + "description": "Cluster compliance scan Syft Log Status", + "properties": { + "actor": { + "$ref": "#/definitions/v1ClusterFeatureActor" + }, + "location": { + "$ref": "#/definitions/v1ObjectEntity" + }, + "message": { + "type": "string" + }, + "reports": { + "type": "array", + "items": { + "$ref": "#/definitions/v1SyftReport" + } + }, + "requestUid": { + "type": "string" + }, + "scanContext": { + "$ref": "#/definitions/v1SyftScanContext" + }, + "scanTime": { + "$ref": "#/definitions/v1ClusterScanTime" + }, + "state": { + "type": "string" + } + } + }, + "v1ClusterType": { + "type": "string", + "default": "PureManage", + "enum": [ + "PureManage", + "PureAttach" + ] + }, + "v1ClusterUpgradeSettingsEntity": { + "properties": { + "spectroComponents": { + "type": "string", + "enum": [ + "lock", + "unlock" + ] + } + } + }, + "v1ClusterUsageSummary": { + "description": "Cluster usage summary", + "type": "object", + "properties": { + "cpuCores": { + "type": "number", + "x-omitempty": false + }, + "isAlloy": { + "type": "boolean", + "x-omitempty": false + }, + "name": { + "type": "string" + }, + "uid": { + "type": "string" + } + } + }, + "v1ClusterVirtualMachine": { + "description": "VirtualMachine handles the VirtualMachines that are not running\nor are in a stopped state\nThe VirtualMachine contains the template to create the\nVirtualMachineInstance. It also mirrors the running state of the created\nVirtualMachineInstance in its status.", + "required": [ + "spec" + ], + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values.", + "type": "string" + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase.", + "type": "string" + }, + "metadata": { + "$ref": "#/definitions/v1VmObjectMeta" + }, + "spec": { + "$ref": "#/definitions/v1ClusterVirtualMachineSpec" + }, + "status": { + "$ref": "#/definitions/v1ClusterVirtualMachineStatus" + } + } + }, + "v1ClusterVirtualMachineList": { + "description": "VirtualMachineList is a list of virtual machines", + "type": "object", + "required": [ + "items" + ], + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values.", + "type": "string" + }, + "items": { + "type": "array", + "items": { + "$ref": "#/definitions/v1ClusterVirtualMachine" + } + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "$ref": "#/definitions/v1VmListMeta" + } + } + }, + "v1ClusterVirtualMachineSpec": { + "description": "VirtualMachineSpec describes how the proper VirtualMachine should look like", + "type": "object", + "required": [ + "template" + ], + "properties": { + "dataVolumeTemplates": { + "description": "dataVolumeTemplates is a list of dataVolumes that the VirtualMachineInstance template can reference. DataVolumes in this list are dynamically created for the VirtualMachine and are tied to the VirtualMachine's life-cycle.", + "type": "array", + "items": { + "$ref": "#/definitions/v1VmDataVolumeTemplateSpec" + } + }, + "instancetype": { + "$ref": "#/definitions/v1VmInstancetypeMatcher" + }, + "preference": { + "$ref": "#/definitions/v1VmPreferenceMatcher" + }, + "runStrategy": { + "description": "Running state indicates the requested running state of the VirtualMachineInstance mutually exclusive with Running", + "type": "string" + }, + "running": { + "description": "Running controls whether the associatied VirtualMachineInstance is created or not Mutually exclusive with RunStrategy", + "type": "boolean" + }, + "template": { + "$ref": "#/definitions/v1VmVirtualMachineInstanceTemplateSpec" + } + } + }, + "v1ClusterVirtualMachineStatus": { + "description": "VirtualMachineStatus represents the status returned by the controller to describe how the VirtualMachine is doing", + "type": "object", + "properties": { + "conditions": { + "description": "Hold the state information of the VirtualMachine and its VirtualMachineInstance", + "type": "array", + "items": { + "$ref": "#/definitions/v1VmVirtualMachineCondition" + } + }, + "created": { + "description": "Created indicates if the virtual machine is created in the cluster", + "type": "boolean" + }, + "memoryDumpRequest": { + "$ref": "#/definitions/v1VmVirtualMachineMemoryDumpRequest" + }, + "printableStatus": { + "description": "PrintableStatus is a human readable, high-level representation of the status of the virtual machine", + "type": "string" + }, + "ready": { + "description": "Ready indicates if the virtual machine is running and ready", + "type": "boolean" + }, + "restoreInProgress": { + "description": "RestoreInProgress is the name of the VirtualMachineRestore currently executing", + "type": "string" + }, + "snapshotInProgress": { + "description": "SnapshotInProgress is the name of the VirtualMachineSnapshot currently executing", + "type": "string" + }, + "startFailure": { + "$ref": "#/definitions/v1VmVirtualMachineStartFailure" + }, + "stateChangeRequests": { + "description": "StateChangeRequests indicates a list of actions that should be taken on a VMI e.g. stop a specific VMI then start a new one.", + "type": "array", + "items": { + "$ref": "#/definitions/v1VmVirtualMachineStateChangeRequest" + } + }, + "volumeRequests": { + "description": "VolumeRequests indicates a list of volumes add or remove from the VMI template and hotplug on an active running VMI.", + "type": "array", + "items": { + "$ref": "#/definitions/v1VmVirtualMachineVolumeRequest" + }, + "x-kubernetes-list-type": "atomic" + }, + "volumeSnapshotStatuses": { + "description": "VolumeSnapshotStatuses indicates a list of statuses whether snapshotting is supported by each volume.", + "type": "array", + "items": { + "$ref": "#/definitions/v1VmVolumeSnapshotStatus" + } + } + }, + "x-nullable": true + }, + "v1ClusterVirtualPacksValue": { + "description": "Virtual cluster packs value", + "type": "object", + "properties": { + "distroType": { + "type": "string" + }, + "layer": { + "type": "string" + }, + "values": { + "type": "string" + } + } + }, + "v1ClusterVirtualPacksValues": { + "description": "Virtual cluster packs values", + "type": "object", + "properties": { + "packs": { + "type": "array", + "items": { + "$ref": "#/definitions/v1ClusterVirtualPacksValue" + } + } + } + }, + "v1ClusterWorkload": { + "description": "Cluster workload summary", + "type": "object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectMetaInputEntity" + }, + "spec": { + "$ref": "#/definitions/v1ClusterWorkloadSpec" + } + } + }, + "v1ClusterWorkloadCondition": { + "description": "Cluster workload condition", + "type": "object", + "properties": { + "lastTransitionTime": { + "$ref": "#/definitions/v1Time" + }, + "lastUpdateTime": { + "$ref": "#/definitions/v1Time" + }, + "message": { + "type": "string" + }, + "reason": { + "type": "string" + }, + "status": { + "type": "string" + }, + "type": { + "type": "string" + } + } + }, + "v1ClusterWorkloadCronJob": { + "description": "Cluster workload cronjob summary", + "type": "object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ClusterWorkloadMetadata" + }, + "spec": { + "$ref": "#/definitions/v1ClusterWorkloadCronJobSpec" + }, + "status": { + "$ref": "#/definitions/v1ClusterWorkloadCronJobStatus" + } + } + }, + "v1ClusterWorkloadCronJobSpec": { + "description": "Cluster workload cronjob spec", + "type": "object", + "properties": { + "schedule": { + "type": "string" + } + } + }, + "v1ClusterWorkloadCronJobStatus": { + "description": "Cluster workload cronjob status", + "type": "object", + "properties": { + "lastScheduleTime": { + "$ref": "#/definitions/v1Time" + } + } + }, + "v1ClusterWorkloadCronJobs": { + "description": "Cluster workload cronjobs summary", + "type": "object", + "properties": { + "cronJobs": { + "type": "array", + "items": { + "$ref": "#/definitions/v1ClusterWorkloadCronJob" + } + } + } + }, + "v1ClusterWorkloadDaemonSet": { + "description": "Cluster workload daemonset summary", + "type": "object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ClusterWorkloadMetadata" + }, + "status": { + "$ref": "#/definitions/v1ClusterWorkloadDaemonSetStatus" + } + } + }, + "v1ClusterWorkloadDaemonSetStatus": { + "description": "Cluster workload daemonset status", + "type": "object", + "properties": { + "available": { + "type": "integer", + "format": "int32" + }, + "currentScheduled": { + "type": "integer", + "format": "int32" + }, + "desiredScheduled": { + "type": "integer", + "format": "int32" + }, + "misScheduled": { + "type": "integer", + "format": "int32" + }, + "ready": { + "type": "integer", + "format": "int32" + }, + "updatedScheduled": { + "type": "integer", + "format": "int32" + } + } + }, + "v1ClusterWorkloadDaemonSets": { + "description": "Cluster workload daemonset summary", + "type": "object", + "properties": { + "daemonSets": { + "type": "array", + "items": { + "$ref": "#/definitions/v1ClusterWorkloadDaemonSet" + } + } + } + }, + "v1ClusterWorkloadDeployment": { + "description": "Cluster workload deployment summary", + "type": "object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ClusterWorkloadMetadata" + }, + "status": { + "$ref": "#/definitions/v1ClusterWorkloadDeploymentStatus" + } + } + }, + "v1ClusterWorkloadDeploymentStatus": { + "description": "Cluster workload deployment status", + "type": "object", + "properties": { + "replicas": { + "$ref": "#/definitions/v1ClusterWorkloadReplicaStatus" + } + } + }, + "v1ClusterWorkloadDeployments": { + "description": "Cluster workload deployments summary", + "type": "object", + "properties": { + "deployments": { + "type": "array", + "items": { + "$ref": "#/definitions/v1ClusterWorkloadDeployment" + } + } + } + }, + "v1ClusterWorkloadJob": { + "description": "Cluster workload job summary", + "type": "object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ClusterWorkloadMetadata" + }, + "status": { + "$ref": "#/definitions/v1ClusterWorkloadJobStatus" + } + } + }, + "v1ClusterWorkloadJobStatus": { + "description": "Cluster workload job status", + "type": "object", + "properties": { + "completionTime": { + "$ref": "#/definitions/v1Time" + }, + "conditions": { + "type": "array", + "items": { + "$ref": "#/definitions/v1ClusterWorkloadCondition" + } + }, + "startTime": { + "$ref": "#/definitions/v1Time" + }, + "succeeded": { + "type": "integer", + "format": "int32" + } + } + }, + "v1ClusterWorkloadJobs": { + "description": "Cluster workload jobs summary", + "type": "object", + "properties": { + "jobs": { + "type": "array", + "items": { + "$ref": "#/definitions/v1ClusterWorkloadJob" + } + } + } + }, + "v1ClusterWorkloadMetadata": { + "description": "Cluster workload metadata", + "type": "object", + "properties": { + "creationTimestamp": { + "$ref": "#/definitions/v1Time" + }, + "entity": { + "$ref": "#/definitions/v1ClusterWorkloadRef" + }, + "labels": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "namespace": { + "type": "string" + } + } + }, + "v1ClusterWorkloadNamespace": { + "description": "Cluster workload namespace summary", + "type": "object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ClusterWorkloadMetadata" + }, + "status": { + "$ref": "#/definitions/v1ClusterWorkloadNamespaceStatus" + } + } + }, + "v1ClusterWorkloadNamespaceStatus": { + "description": "Cluster workload namespace status", + "type": "object", + "properties": { + "phase": { + "type": "string" + } + } + }, + "v1ClusterWorkloadNamespaces": { + "description": "Cluster workload namespaces summary", + "properties": { + "namespaces": { + "type": "array", + "items": { + "$ref": "#/definitions/v1ClusterWorkloadNamespace" + } + } + } + }, + "v1ClusterWorkloadPod": { + "description": "Cluster workload pod summary", + "type": "object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ClusterWorkloadPodMetadata" + }, + "spec": { + "$ref": "#/definitions/v1ClusterWorkloadPodSpec" + }, + "status": { + "$ref": "#/definitions/v1ClusterWorkloadPodStatus" + } + } + }, + "v1ClusterWorkloadPodContainer": { + "description": "Cluster workload pod container", + "type": "object", + "properties": { + "image": { + "type": "string" + }, + "name": { + "type": "string" + }, + "resources": { + "$ref": "#/definitions/v1ClusterWorkloadPodContainerResources" + } + } + }, + "v1ClusterWorkloadPodContainerResource": { + "description": "Cluster workload pod container resource", + "type": "object", + "properties": { + "cpu": { + "type": "integer", + "format": "int32", + "x-omitempty": false + }, + "cpuUnit": { + "type": "string" + }, + "memory": { + "type": "integer", + "format": "int64", + "x-omitempty": false + }, + "memoryUnit": { + "type": "string" + } + } + }, + "v1ClusterWorkloadPodContainerResources": { + "description": "Cluster workload pod container resources", + "type": "object", + "properties": { + "limits": { + "$ref": "#/definitions/v1ClusterWorkloadPodContainerResource" + }, + "requests": { + "$ref": "#/definitions/v1ClusterWorkloadPodContainerResource" + } + } + }, + "v1ClusterWorkloadPodContainerState": { + "description": "Cluster workload pod container state", + "type": "object", + "properties": { + "exitCode": { + "type": "integer", + "format": "int32", + "x-omitempty": false + }, + "finishedAt": { + "$ref": "#/definitions/v1Time" + }, + "reason": { + "type": "string" + }, + "startedAt": { + "$ref": "#/definitions/v1Time" + }, + "state": { + "type": "string" + } + } + }, + "v1ClusterWorkloadPodContainerStatus": { + "description": "Cluster workload pod container status", + "type": "object", + "properties": { + "image": { + "type": "string" + }, + "name": { + "type": "string" + }, + "ready": { + "type": "boolean", + "x-omitempty": false + }, + "restartCount": { + "type": "integer", + "format": "int32", + "x-omitempty": false + }, + "started": { + "type": "boolean", + "x-omitempty": false + }, + "state": { + "$ref": "#/definitions/v1ClusterWorkloadPodContainerState" + } + } + }, + "v1ClusterWorkloadPodMetadata": { + "description": "Cluster workload pod metadata", + "type": "object", + "properties": { + "associatedRefs": { + "type": "array", + "items": { + "$ref": "#/definitions/v1ClusterWorkloadRef" + } + }, + "creationTimestamp": { + "$ref": "#/definitions/v1Time" + }, + "entity": { + "$ref": "#/definitions/v1ClusterWorkloadRef" + }, + "labels": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "machineUid": { + "type": "string" + }, + "namespace": { + "type": "string" + }, + "nodename": { + "type": "string" + } + } + }, + "v1ClusterWorkloadPodSpec": { + "description": "Cluster workload pod spec", + "type": "object", + "properties": { + "containers": { + "type": "array", + "items": { + "$ref": "#/definitions/v1ClusterWorkloadPodContainer" + } + }, + "volumes": { + "type": "array", + "items": { + "$ref": "#/definitions/v1ClusterWorkloadPodVolume" + } + } + } + }, + "v1ClusterWorkloadPodStatus": { + "description": "Cluster workload pod status", + "type": "object", + "properties": { + "containers": { + "type": "array", + "items": { + "$ref": "#/definitions/v1ClusterWorkloadPodContainerStatus" + } + }, + "phase": { + "type": "string" + }, + "podIp": { + "type": "string" + }, + "qosClass": { + "type": "string" + } + } + }, + "v1ClusterWorkloadPodVolume": { + "description": "Cluster workload pod volume", + "type": "object", + "properties": { + "name": { + "type": "string" + } + } + }, + "v1ClusterWorkloadPods": { + "description": "Cluster workload pods summary", + "properties": { + "pods": { + "type": "array", + "items": { + "$ref": "#/definitions/v1ClusterWorkloadPod" + } + } + } + }, + "v1ClusterWorkloadRef": { + "description": "Cluster workload ref", + "type": "object", + "properties": { + "kind": { + "type": "string" + }, + "name": { + "type": "string" + }, + "uid": { + "type": "string" + } + } + }, + "v1ClusterWorkloadReplicaStatus": { + "description": "Cluster workload replica status", + "type": "object", + "properties": { + "available": { + "type": "integer", + "format": "int32", + "x-omitempty": false + }, + "ready": { + "type": "integer", + "format": "int32", + "x-omitempty": false + }, + "total": { + "type": "integer", + "format": "int32", + "x-omitempty": false + }, + "updated": { + "type": "integer", + "format": "int32", + "x-omitempty": false + } + } + }, + "v1ClusterWorkloadRoleBinding": { + "description": "Cluster workload rbac binding summary", + "type": "object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ClusterWorkloadMetadata" + }, + "spec": { + "$ref": "#/definitions/v1ClusterRbacBinding" + } + } + }, + "v1ClusterWorkloadRoleBindings": { + "description": "Cluster workload rbac bindings summary", + "type": "object", + "properties": { + "bindings": { + "type": "array", + "items": { + "$ref": "#/definitions/v1ClusterWorkloadRoleBinding" + } + } + } + }, + "v1ClusterWorkloadSpec": { + "description": "Cluster workload spec", + "type": "object", + "properties": { + "clusterroleBindings": { + "type": "array", + "items": { + "$ref": "#/definitions/v1ClusterWorkloadRoleBinding" + } + }, + "cronJobs": { + "type": "array", + "items": { + "$ref": "#/definitions/v1ClusterWorkloadCronJob" + } + }, + "daemonSets": { + "type": "array", + "items": { + "$ref": "#/definitions/v1ClusterWorkloadDaemonSet" + } + }, + "deployments": { + "type": "array", + "items": { + "$ref": "#/definitions/v1ClusterWorkloadDeployment" + } + }, + "jobs": { + "type": "array", + "items": { + "$ref": "#/definitions/v1ClusterWorkloadJob" + } + }, + "pods": { + "type": "array", + "items": { + "$ref": "#/definitions/v1ClusterWorkloadPod" + } + }, + "roleBindings": { + "type": "array", + "items": { + "$ref": "#/definitions/v1ClusterWorkloadRoleBinding" + } + }, + "statefulSets": { + "type": "array", + "items": { + "$ref": "#/definitions/v1ClusterWorkloadStatefulSet" + } + } + } + }, + "v1ClusterWorkloadStatefulSet": { + "description": "Cluster workload statefulset summary", + "type": "object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ClusterWorkloadMetadata" + }, + "status": { + "$ref": "#/definitions/v1ClusterWorkloadStatefulSetStatus" + } + } + }, + "v1ClusterWorkloadStatefulSetStatus": { + "description": "Cluster workload statefulset status", + "type": "object", + "properties": { + "replicas": { + "$ref": "#/definitions/v1ClusterWorkloadReplicaStatus" + } + } + }, + "v1ClusterWorkloadStatefulSets": { + "description": "Cluster workload statefulsets summary", + "type": "object", + "properties": { + "statefulSets": { + "type": "array", + "items": { + "$ref": "#/definitions/v1ClusterWorkloadStatefulSet" + } + } + } + }, + "v1ClusterWorkloadsFilter": { + "description": "Cluster workloads filter", + "type": "object", + "properties": { + "namespaces": { + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + } + } + } + }, + "v1ClusterWorkloadsSpec": { + "description": "Cluster workloads spec", + "type": "object", + "properties": { + "filter": { + "$ref": "#/definitions/v1ClusterWorkloadsFilter" + } + } + }, + "v1ComplianceScanConfig": { + "description": "Compliance Scan config", + "properties": { + "schedule": { + "$ref": "#/definitions/v1ClusterFeatureSchedule" + } + } + }, + "v1ComplianceScanDriverSpec": { + "description": "Compliance Scan driver spec", + "properties": { + "config": { + "$ref": "#/definitions/v1ComplianceScanConfig" + }, + "isClusterConfig": { + "type": "boolean" + } + } + }, + "v1ComputeMetrics": { + "description": "Compute metrics", + "type": "object", + "properties": { + "lastUpdatedTime": { + "$ref": "#/definitions/v1Time" + }, + "limit": { + "type": "number", + "x-omitempty": false + }, + "request": { + "type": "number", + "x-omitempty": false + }, + "total": { + "type": "number", + "x-omitempty": false + }, + "unit": { + "type": "string" + }, + "usage": { + "type": "number", + "x-omitempty": false + } + } + }, + "v1ComputeRate": { + "description": "Compute estimated rate information", + "type": "object", + "properties": { + "rate": { + "type": "number", + "format": "float64", + "x-omitempty": false + }, + "type": { + "type": "string" + } + } + }, + "v1ConstraintError": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + } + } + }, + "v1ConstraintValidatorResponse": { + "description": "Constraint validator response", + "type": "object", + "properties": { + "results": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1ConstraintValidatorResult" + } + } + } + }, + "v1ConstraintValidatorResult": { + "description": "Constraint validator result", + "type": "object", + "properties": { + "displayName": { + "type": "string" + }, + "errors": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1ConstraintError" + } + }, + "name": { + "type": "string" + } + } + }, + "v1ControlPlaneEndPoint": { + "type": "object", + "properties": { + "ddnsSearchDomain": { + "description": "DDNSSearchDomain is the search domain used for resolving IP addresses when the EndpointType is DDNS. This search domain is appended to the generated Hostname to obtain the complete DNS name for the endpoint. If Host is already a DDNS FQDN, DDNSSearchDomain is not required", + "type": "string" + }, + "host": { + "description": "IP or FQDN(External/DDNS)", + "type": "string" + }, + "type": { + "description": "VIP or External", + "type": "string", + "enum": [ + "VIP", + "External", + "DDNS" + ] + } + } + }, + "v1ControlPlaneHealthCheckTimeoutEntity": { + "type": "object", + "properties": { + "controlPlaneHealthCheckTimeout": { + "description": "ControlPlaneHealthCheckTimeout is the timeout to check for ready state of the control plane nodes", + "type": "string" + } + } + }, + "v1CustomAccount": { + "description": "Custom account information", + "type": "object", + "properties": { + "apiVersion": { + "description": "Cloud account api version", + "type": "string" + }, + "kind": { + "description": "Cloud account kind", + "type": "string" + }, + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/v1CustomCloudAccount" + }, + "status": { + "$ref": "#/definitions/v1CloudAccountStatus" + } + } + }, + "v1CustomAccountEntity": { + "description": "Custom account information", + "type": "object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectMetaInputEntity" + }, + "spec": { + "$ref": "#/definitions/v1CustomCloudAccount" + } + } + }, + "v1CustomAccounts": { + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1CustomAccount" + } + }, + "listmeta": { + "$ref": "#/definitions/v1ListMetaData" + } + } + }, + "v1CustomCloudAccount": { + "type": "object", + "required": [ + "credentials" + ], + "properties": { + "credentials": { + "description": "Cloud account credentials", + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + }, + "v1CustomCloudClusterConfigEntity": { + "description": "Custom cloud cluster config entity", + "type": "object", + "properties": { + "clusterConfig": { + "$ref": "#/definitions/v1CustomClusterConfig" + } + } + }, + "v1CustomCloudConfig": { + "description": "CustomCloudConfig is the Schema for the custom cloudconfigs API", + "type": "object", + "properties": { + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/v1CustomCloudConfigSpec" + } + } + }, + "v1CustomCloudConfigSpec": { + "description": "CustomCloudConfigSpec defines the cloud configuration input by user This will translate to clusterspec/machinespec for cluster-api", + "type": "object", + "properties": { + "cloudAccountRef": { + "description": "cloudAccountRef should point to the secret which contains CustomCloudAccount", + "$ref": "#/definitions/v1ObjectReference" + }, + "clusterConfig": { + "$ref": "#/definitions/v1CustomClusterConfig" + }, + "machinePoolConfig": { + "type": "array", + "items": { + "$ref": "#/definitions/v1CustomMachinePoolConfig" + } + } + } + }, + "v1CustomCloudMetaEntity": { + "description": "Custom cloud meta entity", + "type": "object", + "properties": { + "metadata": { + "description": "Custom cloud metadata", + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/v1CustomCloudMetaSpecEntity" + } + } + }, + "v1CustomCloudMetaSpecEntity": { + "description": "Custom cloud spec response entity", + "type": "object", + "properties": { + "cloudCategory": { + "$ref": "#/definitions/v1CloudCategory" + }, + "displayName": { + "description": "Custom cloud displayName", + "type": "string" + }, + "isManaged": { + "description": "If the custom cloud is a managed cluster", + "type": "boolean" + }, + "logo": { + "description": "Custom cloud logo", + "type": "string" + } + } + }, + "v1CustomCloudRateConfig": { + "description": "Private cloud rate config", + "properties": { + "cloudType": { + "type": "string" + }, + "rateConfig": { + "$ref": "#/definitions/v1PrivateCloudRateConfig" + } + } + }, + "v1CustomCloudRequestEntity": { + "description": "Custom cloud request entity", + "type": "object", + "properties": { + "metadata": { + "description": "Custom cloud metadata", + "$ref": "#/definitions/v1ObjectMetaInputEntity" + }, + "spec": { + "$ref": "#/definitions/v1CustomCloudSpecEntity" + } + } + }, + "v1CustomCloudSpecEntity": { + "description": "Custom cloud request entity spec", + "type": "object", + "properties": { + "cloudCategory": { + "$ref": "#/definitions/v1CloudCategory" + }, + "displayName": { + "description": "Custom cloud displayName", + "type": "string" + }, + "isControlPlaneManaged": { + "description": "If the custom cloud is a managed cluster", + "type": "boolean" + }, + "logo": { + "description": "Custom cloud logo", + "type": "string" + } + } + }, + "v1CustomCloudType": { + "type": "object", + "properties": { + "cloudCategory": { + "$ref": "#/definitions/v1CloudCategory" + }, + "cloudFamily": { + "description": "Cloud grouping as family", + "type": "string" + }, + "displayName": { + "description": "Custom cloudtype displayName", + "type": "string" + }, + "isCustom": { + "description": "If it is a custom cloudtype", + "type": "boolean", + "x-omitempty": false + }, + "isManaged": { + "description": "If custom cloudtype is managed", + "type": "boolean", + "x-omitempty": false + }, + "isVertex": { + "description": "If cloud is support for Vertex env", + "type": "boolean", + "x-omitempty": false + }, + "logo": { + "description": "Custom cloudtype logo", + "type": "string" + }, + "name": { + "description": "Custom cloudtype name", + "type": "string" + } + } + }, + "v1CustomCloudTypeCloudAccountKeys": { + "description": "Custom cloudType custom cloud account keys", + "type": "object", + "properties": { + "keys": { + "description": "Array of custom cloud type cloud account keys", + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "v1CustomCloudTypeContentResponse": { + "description": "Custom cloudType content response", + "type": "object", + "properties": { + "yaml": { + "description": "custom cloud type content", + "type": "string" + } + } + }, + "v1CustomCloudTypes": { + "description": "Custom cloudType content response", + "type": "object", + "properties": { + "cloudTypes": { + "description": "Array of custom cloud types", + "type": "array", + "items": { + "$ref": "#/definitions/v1CustomCloudType" + } + } + } + }, + "v1CustomClusterConfig": { + "description": "Cluster level configuration for Custom cloud and applicable for all the machine pools", + "type": "object", + "required": [ + "values" + ], + "properties": { + "values": { + "description": "YAML string for Cluster and CloudCluster", + "type": "string" + } + } + }, + "v1CustomClusterConfigEntity": { + "type": "object", + "properties": { + "location": { + "$ref": "#/definitions/v1ClusterLocation" + }, + "machineManagementConfig": { + "$ref": "#/definitions/v1MachineManagementConfig" + }, + "resources": { + "$ref": "#/definitions/v1ClusterResourcesEntity" + } + } + }, + "v1CustomInstanceType": { + "type": "object", + "properties": { + "diskGiB": { + "description": "DiskGiB is the size of a custom machine's disk, in GiB", + "type": "integer", + "format": "int32" + }, + "memoryMiB": { + "description": "MemoryMiB is the size of a custom machine's memory, in MiB", + "type": "integer", + "format": "int64" + }, + "name": { + "type": "string" + }, + "numCPUs": { + "description": "NumCPUs is the number in a custom machine", + "type": "integer", + "format": "int32" + } + } + }, + "v1CustomMachine": { + "description": "Custom cloud VM definition", + "type": "object", + "properties": { + "apiVersion": { + "type": "string" + }, + "kind": { + "type": "string" + }, + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/v1CustomMachineSpec" + }, + "status": { + "$ref": "#/definitions/v1CloudMachineStatus" + } + } + }, + "v1CustomMachinePoolBaseConfigEntity": { + "description": "Machine pool configuration for the custom cluster", + "type": "object", + "properties": { + "additionalLabels": { + "description": "Additional labels to be part of the machine pool", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "isControlPlane": { + "description": "Whether this pool is for control plane", + "type": "boolean", + "x-omitempty": false + }, + "taints": { + "description": "control plane or worker taints", + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1Taint" + } + }, + "useControlPlaneAsWorker": { + "description": "If IsControlPlane==true \u0026\u0026 useControlPlaneAsWorker==true, then will remove control plane taint this will not be used for worker pools", + "type": "boolean", + "x-omitempty": false + } + } + }, + "v1CustomMachinePoolCloudConfigEntity": { + "type": "object", + "properties": { + "values": { + "description": "Machine pool configuration as yaml content", + "type": "string" + } + } + }, + "v1CustomMachinePoolConfig": { + "type": "object", + "required": [ + "isControlPlane" + ], + "properties": { + "additionalLabels": { + "description": "additionalLabels", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "isControlPlane": { + "description": "whether this pool is for control plane", + "type": "boolean", + "x-omitempty": false + }, + "name": { + "type": "string" + }, + "size": { + "description": "size of the pool, number of machines", + "type": "integer", + "format": "int32" + }, + "taints": { + "description": "control plane or worker taints", + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1Taint" + } + }, + "useControlPlaneAsWorker": { + "description": "if IsControlPlane==true \u0026\u0026 useControlPlaneAsWorker==true, then will remove control plane taint this will not be used for worker pools", + "type": "boolean", + "x-omitempty": false + }, + "values": { + "description": "YAML string for machine", + "type": "string" + } + } + }, + "v1CustomMachinePoolConfigEntity": { + "type": "object", + "required": [ + "cloudConfig" + ], + "properties": { + "cloudConfig": { + "$ref": "#/definitions/v1CustomMachinePoolCloudConfigEntity" + }, + "poolConfig": { + "$ref": "#/definitions/v1CustomMachinePoolBaseConfigEntity" + } + } + }, + "v1CustomMachineSpec": { + "description": "Custom cloud VM definition spec", + "properties": { + "cloudType": { + "type": "string" + }, + "hostName": { + "type": "string" + }, + "imageId": { + "type": "string" + }, + "instanceType": { + "$ref": "#/definitions/v1CustomInstanceType" + }, + "nics": { + "type": "array", + "items": { + "$ref": "#/definitions/v1CustomNic" + } + }, + "sshKeyName": { + "type": "string" + } + } + }, + "v1CustomMachines": { + "description": "List of Custom machines", + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1CustomMachine" + } + }, + "listmeta": { + "$ref": "#/definitions/v1ListMetaData" + } + } + }, + "v1CustomNic": { + "description": "Custom network interface", + "type": "object", + "properties": { + "index": { + "type": "integer", + "format": "int8" + }, + "networkName": { + "type": "string" + }, + "privateIPs": { + "type": "array", + "items": { + "type": "string" + } + }, + "publicIp": { + "type": "string" + } + } + }, + "v1DashboardWorkspace": { + "description": "Workspace information", + "properties": { + "meta": { + "$ref": "#/definitions/v1DashboardWorkspaceMeta" + }, + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/v1DashboardWorkspaceSpec" + }, + "status": { + "$ref": "#/definitions/v1DashboardWorkspaceStatus" + } + } + }, + "v1DashboardWorkspaceAllocation": { + "description": "Workspace allocation", + "properties": { + "cpu": { + "$ref": "#/definitions/v1DashboardWorkspaceResourceAllocation" + }, + "memory": { + "$ref": "#/definitions/v1DashboardWorkspaceResourceAllocation" + } + } + }, + "v1DashboardWorkspaceClusterRef": { + "description": "Workspace cluster reference", + "properties": { + "name": { + "type": "string" + }, + "uid": { + "type": "string" + } + } + }, + "v1DashboardWorkspaceMeta": { + "description": "Deprecated. Workspace meta data", + "properties": { + "clusterNames": { + "description": "Deprecated. Use clusterRefs", + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + } + }, + "clusterRefs": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1DashboardWorkspaceClusterRef" + } + }, + "creationTime": { + "$ref": "#/definitions/v1Time" + }, + "name": { + "type": "string" + }, + "namespaces": { + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + } + }, + "uid": { + "type": "string" + } + } + }, + "v1DashboardWorkspaceNamespaceAllocation": { + "description": "Workspace namespace allocation", + "properties": { + "name": { + "type": "string" + }, + "total": { + "$ref": "#/definitions/v1DashboardWorkspaceAllocation" + } + } + }, + "v1DashboardWorkspaceQuota": { + "description": "Workspace resource quota", + "properties": { + "resourceAllocation": { + "$ref": "#/definitions/v1DashboardWorkspaceQuotaResourceAllocation" + } + } + }, + "v1DashboardWorkspaceQuotaResourceAllocation": { + "description": "Workspace quota resource allocation", + "properties": { + "cpu": { + "type": "number", + "minimum": 0, + "exclusiveMinimum": true + }, + "memory": { + "type": "number", + "minimum": 0, + "exclusiveMinimum": true + } + } + }, + "v1DashboardWorkspaceResourceAllocation": { + "description": "Workspace resource allocation", + "properties": { + "allocated": { + "type": "number", + "format": "float64", + "x-omitempty": false + }, + "usage": { + "type": "number", + "format": "float64", + "x-omitempty": false + } + } + }, + "v1DashboardWorkspaceSpec": { + "description": "Workspace spec summary", + "properties": { + "clusterRefs": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1DashboardWorkspaceClusterRef" + } + }, + "namespaces": { + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + } + }, + "quota": { + "$ref": "#/definitions/v1DashboardWorkspaceQuota" + } + } + }, + "v1DashboardWorkspaceStatus": { + "description": "Workspace status", + "properties": { + "namespaces": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1DashboardWorkspaceNamespaceAllocation" + } + }, + "total": { + "$ref": "#/definitions/v1DashboardWorkspaceAllocation" + } + } + }, + "v1DashboardWorkspaces": { + "type": "object", + "required": [ + "items" + ], + "properties": { + "cpuUnit": { + "type": "string" + }, + "items": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1DashboardWorkspace" + } + }, + "memoryUnit": { + "type": "string" + } + } + }, + "v1DataSinkConfig": { + "description": "Data sink", + "type": "object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/v1DataSinkSpec" + } + } + }, + "v1DataSinkSpec": { + "type": "object", + "properties": { + "auditDataSinks": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1DataSinkableSpec" + } + } + } + }, + "v1DataSinkableSpec": { + "type": "object", + "properties": { + "cloudWatch": { + "$ref": "#/definitions/v1CloudWatch" + }, + "type": { + "type": "string", + "enum": [ + "cloudwatch" + ] + } + } + }, + "v1DeleteMeta": { + "description": "Properties to send back after deletion operation", + "properties": { + "count": { + "type": "integer", + "format": "int64" + }, + "items": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + }, + "v1DeletedMsg": { + "description": "Deleted response with message", + "properties": { + "msg": { + "type": "string" + } + } + }, + "v1DeveloperCredit": { + "description": "Credits allocated for each tenant/user", + "properties": { + "cpu": { + "description": "cpu in cores", + "type": "number", + "format": "int32", + "x-omitempty": false + }, + "memoryGiB": { + "description": "memory in GiB", + "type": "number", + "format": "int32", + "x-omitempty": false + }, + "storageGiB": { + "description": "storage in GiB", + "type": "integer", + "format": "int32", + "x-omitempty": false + }, + "virtualClustersLimit": { + "description": "number of active virtual clusters", + "type": "number", + "format": "int32", + "x-omitempty": false + } + } + }, + "v1DeviceSpec": { + "description": "DeviceSpec defines the desired state of Device", + "type": "object", + "properties": { + "archType": { + "description": "Architecture type of the edge host", + "type": "string", + "default": "amd64", + "enum": [ + "arm64", + "amd64" + ] + }, + "cpu": { + "$ref": "#/definitions/v1CPU" + }, + "disks": { + "type": "array", + "items": { + "$ref": "#/definitions/v1Disk" + } + }, + "gpus": { + "type": "array", + "items": { + "$ref": "#/definitions/v1GPUDeviceSpec" + } + }, + "memory": { + "$ref": "#/definitions/v1Memory" + }, + "nics": { + "type": "array", + "items": { + "$ref": "#/definitions/v1Nic" + } + }, + "os": { + "$ref": "#/definitions/v1OS" + } + } + }, + "v1Disk": { + "type": "object", + "properties": { + "controller": { + "type": "string" + }, + "partitions": { + "type": "array", + "items": { + "$ref": "#/definitions/v1Partition" + } + }, + "size": { + "description": "Size in GB", + "type": "integer", + "format": "int32" + }, + "vendor": { + "type": "string" + } + } + }, + "v1EcrRegistry": { + "description": "Ecr registry information", + "type": "object", + "properties": { + "kind": { + "type": "string" + }, + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/v1EcrRegistrySpec" + } + } + }, + "v1EcrRegistrySpec": { + "description": "Ecr registry spec", + "type": "object", + "required": [ + "endpoint", + "isPrivate" + ], + "properties": { + "baseContentPath": { + "description": "OCI ecr registry content base path", + "type": "string" + }, + "credentials": { + "$ref": "#/definitions/v1AwsCloudAccount" + }, + "defaultRegion": { + "type": "string" + }, + "endpoint": { + "type": "string" + }, + "isPrivate": { + "type": "boolean" + }, + "providerType": { + "type": "string", + "default": "helm", + "enum": [ + "helm", + "pack" + ] + }, + "registryUid": { + "description": "Ecr registry uid", + "type": "string" + }, + "scope": { + "type": "string" + }, + "tls": { + "$ref": "#/definitions/v1TlsConfiguration" + } + } + }, + "v1EdgeHost": { + "description": "EdgeHost is the underlying appliance", + "type": "object", + "required": [ + "hostUid", + "hostAddress" + ], + "properties": { + "disableAutoRegister": { + "description": "Set to true if auto register is disabled for the device", + "type": "boolean", + "x-omitempty": false + }, + "hostAddress": { + "description": "HostAddress is a FQDN or IP address of the Host", + "type": "string" + }, + "hostAuthToken": { + "description": "HostAuthToken to authorize auto registration", + "type": "string", + "x-omitempty": false + }, + "hostChecksum": { + "description": "HostChecksum is the checksum provided by the edge host, to be persisted in SaaS", + "type": "string", + "x-omitempty": false + }, + "hostIdentity": { + "description": "HostIdentity is the identity to access the edge host", + "$ref": "#/definitions/v1EdgeHostIdentity" + }, + "hostPairingKey": { + "description": "HostPairingKey is the one-time pairing key to pair the edge host with the device registered in SaaS", + "type": "string", + "format": "password", + "x-omitempty": false + }, + "hostUid": { + "description": "HostUid is the ID of the EdgeHost", + "type": "string" + }, + "macAddress": { + "description": "Mac address of edgehost", + "type": "string", + "x-omitempty": false + }, + "project": { + "description": "ProjectUid where the edgehost will be placed during auto registration", + "x-omitempty": false, + "$ref": "#/definitions/v1ObjectEntity" + } + } + }, + "v1EdgeHostCloudProperties": { + "description": "Additional cloud properties of the edge host (applicable based on the cloud type)", + "type": "object", + "properties": { + "vsphere": { + "$ref": "#/definitions/v1EdgeHostVsphereCloudProperties" + } + } + }, + "v1EdgeHostClusterEntity": { + "type": "object", + "properties": { + "clusterUid": { + "type": "string" + } + } + }, + "v1EdgeHostDevice": { + "properties": { + "aclmeta": { + "$ref": "#/definitions/v1AclMeta" + }, + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/v1EdgeHostDeviceSpec" + }, + "status": { + "$ref": "#/definitions/v1EdgeHostDeviceStatus" + } + } + }, + "v1EdgeHostDeviceEntity": { + "description": "Edge host device information", + "type": "object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectTagsEntity" + }, + "spec": { + "$ref": "#/definitions/v1EdgeHostDeviceSpecEntity" + } + } + }, + "v1EdgeHostDeviceHostCheckSum": { + "type": "object", + "properties": { + "hostCheckSum": { + "type": "string" + } + } + }, + "v1EdgeHostDeviceHostPairingKey": { + "type": "object", + "properties": { + "hostPairingKey": { + "type": "string", + "format": "password" + } + } + }, + "v1EdgeHostDeviceMetaUpdateEntity": { + "description": "Edge host device uid and name", + "type": "object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectTagsEntity" + } + } + }, + "v1EdgeHostDeviceSpec": { + "description": "EdgeHostDeviceSpec defines the desired state of EdgeHostDevice", + "type": "object", + "properties": { + "cloudProperties": { + "$ref": "#/definitions/v1EdgeHostCloudProperties" + }, + "clusterProfileTemplates": { + "type": "array", + "items": { + "$ref": "#/definitions/v1ClusterProfileTemplate" + } + }, + "device": { + "$ref": "#/definitions/v1DeviceSpec" + }, + "host": { + "$ref": "#/definitions/v1EdgeHost" + }, + "properties": { + "$ref": "#/definitions/v1EdgeHostProperties" + }, + "service": { + "$ref": "#/definitions/v1ServiceSpec" + }, + "type": { + "description": "Deprecated. Cloudtype of the provisioned edge host", + "type": "string", + "enum": [ + "libvirt", + "vsphere", + "edge-native" + ] + }, + "version": { + "type": "string" + } + } + }, + "v1EdgeHostDeviceSpecEntity": { + "description": "Edge host device spec", + "type": "object", + "properties": { + "archType": { + "$ref": "#/definitions/v1ArchType" + }, + "hostPairingKey": { + "type": "string", + "format": "password" + } + } + }, + "v1EdgeHostDeviceStatus": { + "description": "EdgeHostDeviceStatus defines the observed state of EdgeHostDevice", + "type": "object", + "properties": { + "health": { + "$ref": "#/definitions/v1EdgeHostHealth" + }, + "inUseClusters": { + "type": "array", + "items": { + "$ref": "#/definitions/v1ObjectEntity" + } + }, + "packs": { + "type": "array", + "items": { + "$ref": "#/definitions/v1ClusterPackStatus" + } + }, + "profileStatus": { + "$ref": "#/definitions/v1ProfileStatus" + }, + "serviceAuthToken": { + "type": "string" + }, + "state": { + "type": "string", + "enum": [ + "ready", + "unpaired", + "in-use" + ] + } + } + }, + "v1EdgeHostDevices": { + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1EdgeHostDevice" + } + }, + "listmeta": { + "$ref": "#/definitions/v1ListMetaData" + } + } + }, + "v1EdgeHostHealth": { + "description": "EdgeHostHealth defines the desired health state of EdgeHostDevice", + "properties": { + "agentVersion": { + "type": "string" + }, + "message": { + "type": "string" + }, + "state": { + "type": "string", + "enum": [ + "healthy", + "unhealthy" + ] + } + } + }, + "v1EdgeHostIdentity": { + "properties": { + "caCert": { + "description": "CACert is the client CA certificate", + "type": "string" + }, + "mode": { + "description": "Mode indicates a system or session connection to the host", + "type": "string" + }, + "socketPath": { + "description": "SocketPath is an optional path to the socket on the host, if not using defaults", + "type": "string" + }, + "sshSecret": { + "description": "SSHSecret to the secret containing ssh-username", + "$ref": "#/definitions/v1EdgeHostSSHSecret" + } + } + }, + "v1EdgeHostMeta": { + "type": "object", + "properties": { + "archType": { + "$ref": "#/definitions/v1ArchType" + }, + "edgeHostType": { + "type": "string", + "enum": [ + "libvirt", + "edge-native", + "vsphere" + ] + }, + "healthState": { + "type": "string" + }, + "name": { + "type": "string" + }, + "state": { + "type": "string" + }, + "uid": { + "type": "string" + } + } + }, + "v1EdgeHostNetwork": { + "description": "Network defines the network configuration for a virtual machine", + "type": "object", + "required": [ + "networkName", + "networkType" + ], + "properties": { + "networkName": { + "description": "NetworkName of the network where this machine will be connected", + "type": "string" + }, + "networkType": { + "description": "NetworkType specifies the type of network", + "type": "string", + "enum": [ + "default", + "bridge" + ] + } + } + }, + "v1EdgeHostProperties": { + "description": "Additional properties of edge host", + "properties": { + "networks": { + "type": "array", + "items": { + "$ref": "#/definitions/v1EdgeHostNetwork" + } + }, + "storagePools": { + "type": "array", + "items": { + "$ref": "#/definitions/v1EdgeHostStoragePool" + } + } + } + }, + "v1EdgeHostSSHSecret": { + "type": "object", + "properties": { + "name": { + "description": "SSH secret name", + "type": "string" + }, + "privateKey": { + "description": "Private Key to access the host", + "type": "string" + } + } + }, + "v1EdgeHostSpecHost": { + "description": "Host specifications", + "properties": { + "hostAddress": { + "description": "HostAddress is a FQDN or IP address of the Host", + "type": "string" + }, + "macAddress": { + "type": "string" + } + } + }, + "v1EdgeHostState": { + "type": "string", + "enum": [ + "ready", + "unpaired", + "in-use" + ] + }, + "v1EdgeHostStoragePool": { + "description": "StoragePool is the storage pool for the vm image", + "properties": { + "name": { + "type": "string" + } + } + }, + "v1EdgeHostVsphereCloudProperties": { + "description": "Vsphere cloud properties of edge host", + "properties": { + "datacenters": { + "type": "array", + "items": { + "$ref": "#/definitions/v1VsphereCloudDatacenter" + } + } + } + }, + "v1EdgeHostsMeta": { + "type": "object", + "properties": { + "edgeHosts": { + "type": "array", + "items": { + "$ref": "#/definitions/v1EdgeHostMeta" + } + } + } + }, + "v1EdgeHostsMetadata": { + "type": "object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/v1EdgeHostsMetadataSpec" + }, + "status": { + "$ref": "#/definitions/v1EdgeHostsMetadataStatus" + } + } + }, + "v1EdgeHostsMetadataFilter": { + "description": "Edge host metadata spec", + "properties": { + "filter": { + "$ref": "#/definitions/v1EdgeHostsMetadataFilterSpec" + }, + "sort": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1EdgeHostsMetadataSortSpec" + } + } + } + }, + "v1EdgeHostsMetadataFilterSpec": { + "description": "Edge hosts metadata filter spec", + "properties": { + "name": { + "$ref": "#/definitions/v1FilterString" + }, + "states": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1EdgeHostState" + } + } + } + }, + "v1EdgeHostsMetadataSortFields": { + "type": "string", + "enum": [ + "name", + "state", + "creationTimestamp", + "lastModifiedTimestamp" + ], + "x-nullable": true + }, + "v1EdgeHostsMetadataSortSpec": { + "properties": { + "field": { + "$ref": "#/definitions/v1EdgeHostsMetadataSortFields" + }, + "order": { + "$ref": "#/definitions/v1SortOrder" + } + } + }, + "v1EdgeHostsMetadataSpec": { + "type": "object", + "properties": { + "clusterProfileTemplates": { + "type": "array", + "items": { + "$ref": "#/definitions/v1ProfileTemplateSummary" + } + }, + "device": { + "$ref": "#/definitions/v1DeviceSpec" + }, + "host": { + "$ref": "#/definitions/v1EdgeHostSpecHost" + }, + "projectMeta": { + "$ref": "#/definitions/v1ProjectMeta" + }, + "type": { + "type": "string" + } + } + }, + "v1EdgeHostsMetadataStatus": { + "type": "object", + "properties": { + "health": { + "$ref": "#/definitions/v1EdgeHostHealth" + }, + "inUseClusters": { + "type": "array", + "items": { + "$ref": "#/definitions/v1ObjectEntity" + } + }, + "state": { + "$ref": "#/definitions/v1EdgeHostState" + } + } + }, + "v1EdgeHostsMetadataSummary": { + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1EdgeHostsMetadata" + } + } + } + }, + "v1EdgeHostsSearchSummary": { + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1EdgeHostsMetadata" + } + }, + "listmeta": { + "$ref": "#/definitions/v1ListMetaData" + } + } + }, + "v1EdgeHostsTags": { + "type": "object", + "properties": { + "tags": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "v1EdgeNativeCloudClusterConfigEntity": { + "description": "EdgeNative cloud cluster config entity", + "type": "object", + "properties": { + "clusterConfig": { + "$ref": "#/definitions/v1EdgeNativeClusterConfig" + } + } + }, + "v1EdgeNativeCloudConfig": { + "description": "EdgeNativeCloudConfig is the Schema for the edgenativecloudconfigs API", + "type": "object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/v1EdgeNativeCloudConfigSpec" + }, + "status": { + "$ref": "#/definitions/v1EdgeNativeCloudConfigStatus" + } + } + }, + "v1EdgeNativeCloudConfigSpec": { + "description": "EdgeNativeCloudConfigSpec defines the desired state of EdgeNativeCloudConfig", + "type": "object", + "required": [ + "clusterConfig", + "machinePoolConfig" + ], + "properties": { + "clusterConfig": { + "$ref": "#/definitions/v1EdgeNativeClusterConfig" + }, + "machinePoolConfig": { + "type": "array", + "items": { + "$ref": "#/definitions/v1EdgeNativeMachinePoolConfig" + } + } + } + }, + "v1EdgeNativeCloudConfigStatus": { + "description": "EdgeNativeCloudConfigStatus defines the observed state of EdgeNativeCloudConfig", + "type": "object", + "properties": { + "conditions": { + "type": "array", + "items": { + "$ref": "#/definitions/v1ClusterCondition" + } + }, + "nodeImage": { + "type": "string" + }, + "sourceImageId": { + "description": "SourceImageId can be from packref's annotations or from pack.json", + "type": "string" + } + } + }, + "v1EdgeNativeClusterConfig": { + "description": "EdgeNativeClusterConfig definnes Edge Native Cluster specific Spec", + "type": "object", + "properties": { + "controlPlaneEndpoint": { + "description": "ControlPlaneEndpoint is the control plane endpoint, which can be an IP or FQDN", + "$ref": "#/definitions/v1EdgeNativeControlPlaneEndPoint" + }, + "ntpServers": { + "description": "NTPServers is a list of NTP servers to use instead of the machine image's default NTP server list", + "type": "array", + "items": { + "type": "string", + "default": "" + } + }, + "overlayNetworkConfiguration": { + "description": "OverlayNetworkConfiguration is the configuration for the overlay network", + "$ref": "#/definitions/v1EdgeNativeOverlayNetworkConfiguration" + }, + "sshKeys": { + "description": "SSHKeys specifies a list of ssh authorized keys to access the vms as a 'spectro' user", + "type": "array", + "items": { + "type": "string", + "default": "" + } + }, + "staticIp": { + "description": "StaticIP indicates if IP allocation type is static IP. DHCP is the default allocation type", + "type": "boolean" + } + } + }, + "v1EdgeNativeControlPlaneEndPoint": { + "type": "object", + "properties": { + "ddnsSearchDomain": { + "description": "DDNSSearchDomain is the search domain used for resolving IP addresses when the EndpointType is DDNS. This search domain is appended to the generated Hostname to obtain the complete DNS name for the endpoint. If Host is already a DDNS FQDN, DDNSSearchDomain is not required", + "type": "string" + }, + "host": { + "description": "Host is FQDN(DDNS) or IP", + "type": "string" + }, + "type": { + "description": "Type indicates DDNS or VIP", + "type": "string" + } + } + }, + "v1EdgeNativeHost": { + "description": "EdgeNativeHost is the underlying appliance", + "type": "object", + "required": [ + "hostUid", + "hostAddress" + ], + "properties": { + "IsCandidateCaption": { + "description": "Is Edge host nominated as candidate", + "type": "boolean", + "default": false, + "x-omitempty": false + }, + "caCert": { + "description": "CACert for TLS connections", + "type": "string" + }, + "hostAddress": { + "description": "HostAddress is a FQDN or IP address of the Host", + "type": "string", + "default": "" + }, + "hostName": { + "description": "Qualified name of host", + "type": "string", + "default": "" + }, + "hostUid": { + "description": "HostUid is the ID of the EdgeHost", + "type": "string", + "default": "" + }, + "nic": { + "description": "Edge native nic", + "$ref": "#/definitions/v1Nic" + }, + "nicName": { + "description": "Deprecated. Edge host nic name", + "type": "string" + }, + "staticIP": { + "description": "Deprecated. Edge host static IP", + "type": "string" + }, + "twoNodeCandidatePriority": { + "description": "Set the edgehost candidate priority as primary or secondary, if the edgehost is nominated as two node candidate", + "type": "string", + "enum": [ + "primary", + "secondary" + ] + } + } + }, + "v1EdgeNativeInstanceType": { + "description": "EdgeNativeInstanceType defines the instance configuration for a docker container node", + "type": "object", + "properties": { + "diskGiB": { + "description": "DiskGiB is the size of a virtual machine's disk", + "type": "integer", + "format": "int32" + }, + "memoryMiB": { + "description": "MemoryMiB is the size of a virtual machine's memory, in MiB", + "type": "integer", + "format": "int32" + }, + "name": { + "description": "Name is the instance name", + "type": "string" + }, + "numCPUs": { + "description": "NumCPUs is the number of CPUs", + "type": "integer", + "format": "int32" + } + } + }, + "v1EdgeNativeMachine": { + "description": "EdgeNative cloud VM definition", + "properties": { + "apiVersion": { + "type": "string" + }, + "kind": { + "type": "string" + }, + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/v1EdgeNativeMachineSpec" + }, + "status": { + "$ref": "#/definitions/v1CloudMachineStatus" + } + } + }, + "v1EdgeNativeMachinePoolCloudConfigEntity": { + "required": [ + "edgeHosts" + ], + "properties": { + "edgeHosts": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1EdgeNativeMachinePoolHostEntity" + } + } + } + }, + "v1EdgeNativeMachinePoolConfig": { + "type": "object", + "required": [ + "hosts" + ], + "properties": { + "additionalLabels": { + "description": "AdditionalLabels", + "type": "object", + "additionalProperties": { + "type": "string", + "default": "" + } + }, + "additionalTags": { + "description": "AdditionalTags is an optional set of tags to add to resources managed by the provider, in addition to the ones added by default. For eg., tags for EKS nodeGroup or EKS NodegroupIAMRole", + "type": "object", + "additionalProperties": { + "type": "string", + "default": "" + } + }, + "hosts": { + "type": "array", + "items": { + "$ref": "#/definitions/v1EdgeNativeHost" + } + }, + "isControlPlane": { + "description": "whether this pool is for control plane", + "type": "boolean" + }, + "labels": { + "description": "labels for this pool, example: control-plane/worker, gpu, windows", + "type": "array", + "items": { + "type": "string", + "default": "" + } + }, + "machinePoolProperties": { + "$ref": "#/definitions/v1MachinePoolProperties" + }, + "maxSize": { + "description": "max size of the pool, for scaling", + "type": "integer", + "format": "int32" + }, + "minSize": { + "description": "min size of the pool, for scaling", + "type": "integer", + "format": "int32" + }, + "name": { + "type": "string" + }, + "nodeRepaveInterval": { + "description": "Minimum number of seconds a node should be Ready, before the next node is selected for repave. Applicable only for workerpools in infrastructure cluster", + "type": "integer", + "format": "int32" + }, + "osType": { + "description": "the os type for the pool, must be supported by the provider", + "type": "string" + }, + "size": { + "description": "size of the pool, number of machines", + "type": "integer", + "format": "int32" + }, + "taints": { + "description": "control plane or worker taints", + "type": "array", + "items": { + "$ref": "#/definitions/v1Taint" + } + }, + "updateStrategy": { + "description": "rolling update strategy for this machinepool if not specified, will use ScaleOut", + "$ref": "#/definitions/v1UpdateStrategy" + }, + "useControlPlaneAsWorker": { + "description": "if IsControlPlane==true \u0026\u0026 useControlPlaneAsWorker==true, then will remove control plane taint this will not be used for worker pools", + "type": "boolean" + } + } + }, + "v1EdgeNativeMachinePoolConfigEntity": { + "type": "object", + "properties": { + "cloudConfig": { + "$ref": "#/definitions/v1EdgeNativeMachinePoolCloudConfigEntity" + }, + "poolConfig": { + "$ref": "#/definitions/v1MachinePoolConfigEntity" + } + } + }, + "v1EdgeNativeMachinePoolHostEntity": { + "required": [ + "hostUid" + ], + "properties": { + "hostName": { + "description": "Edge host name", + "type": "string" + }, + "hostUid": { + "description": "Edge host id", + "type": "string" + }, + "nic": { + "description": "Edge native nic", + "$ref": "#/definitions/v1Nic" + }, + "nicName": { + "description": "Deprecated - Edge host nic name", + "type": "string" + }, + "staticIP": { + "description": "Deprecated - Edge host static IP", + "type": "string" + }, + "twoNodeCandidatePriority": { + "description": "Set the edgehost candidate priority as primary or secondary, if the edgehost is nominated as two node candidate", + "type": "string", + "enum": [ + "primary", + "secondary" + ] + } + } + }, + "v1EdgeNativeMachineSpec": { + "description": "EdgeNative cloud VM definition spec", + "type": "object", + "properties": { + "edgeHostUid": { + "type": "string" + }, + "instanceType": { + "$ref": "#/definitions/v1EdgeNativeInstanceType" + }, + "nics": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1EdgeNativeNic" + } + } + } + }, + "v1EdgeNativeMachines": { + "description": "EdgeNative machine list", + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1EdgeNativeMachine" + } + } + } + }, + "v1EdgeNativeNic": { + "description": "Generic network interface", + "type": "object", + "properties": { + "index": { + "type": "integer", + "format": "int8" + }, + "networkName": { + "type": "string" + }, + "privateIPs": { + "type": "array", + "items": { + "type": "string" + } + }, + "publicIp": { + "type": "string" + } + } + }, + "v1EdgeNativeOverlayNetworkConfiguration": { + "type": "object", + "properties": { + "cidr": { + "description": "CIDR is the CIDR of the overlay network", + "type": "string" + }, + "enable": { + "description": "Enable is a flag to enable overlay network", + "type": "boolean", + "x-omitempty": false + } + } + }, + "v1EdgeToken": { + "description": "Edge token information", + "type": "object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/v1EdgeTokenSpec" + }, + "status": { + "$ref": "#/definitions/v1EdgeTokenStatus" + } + } + }, + "v1EdgeTokenActiveState": { + "description": "Edge token active state", + "properties": { + "isActive": { + "description": "Set to 'true', if the token is active", + "type": "boolean" + } + } + }, + "v1EdgeTokenEntity": { + "description": "Edge token request payload", + "type": "object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/v1EdgeTokenSpecEntity" + } + } + }, + "v1EdgeTokenProject": { + "description": "Edge token project information", + "type": "object", + "properties": { + "name": { + "description": "Project name", + "type": "string" + }, + "uid": { + "description": "Project uid", + "type": "string" + } + } + }, + "v1EdgeTokenSpec": { + "description": "Edge token specification", + "type": "object", + "properties": { + "defaultProject": { + "description": "Default project where the edgehost will be placed on the token authorization", + "$ref": "#/definitions/v1EdgeTokenProject" + }, + "expiry": { + "description": "Edge token expiry date", + "$ref": "#/definitions/v1Time" + }, + "token": { + "description": "Edge token", + "type": "string" + } + } + }, + "v1EdgeTokenSpecEntity": { + "description": "Edge token specification", + "type": "object", + "properties": { + "defaultProjectUid": { + "description": "Default project where the edgehost will be placed on the token authorization", + "type": "string" + }, + "expiry": { + "description": "Edge token expiry date", + "$ref": "#/definitions/v1Time" + } + } + }, + "v1EdgeTokenSpecUpdate": { + "description": "Edge token spec to be updated", + "properties": { + "defaultProjectUid": { + "description": "Default project where the edgehost will be placed on the token authorization", + "type": "string" + }, + "expiry": { + "$ref": "#/definitions/v1Time" + } + } + }, + "v1EdgeTokenStatus": { + "description": "Edge token status", + "type": "object", + "properties": { + "isActive": { + "description": "Set to 'true', if the token is active", + "type": "boolean", + "x-omitempty": false + } + } + }, + "v1EdgeTokenUpdate": { + "description": "Edge token update request payload", + "type": "object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/v1EdgeTokenSpecUpdate" + } + } + }, + "v1EdgeTokens": { + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": { + "description": "List of edge tokens", + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1EdgeToken" + } + } + } + }, + "v1EksAddon": { + "description": "EksAddon represents a EKS addon", + "type": "object", + "required": [ + "name", + "version" + ], + "properties": { + "conflictResolution": { + "description": "ConflictResolution is used to declare what should happen if there are parameter conflicts.", + "type": "string" + }, + "name": { + "description": "Name is the name of the addon", + "type": "string" + }, + "serviceAccountRoleARN": { + "description": "ServiceAccountRoleArn is the ARN of an IAM role to bind to the addons service account", + "type": "string" + }, + "version": { + "description": "Version is the version of the addon to use", + "type": "string" + } + } + }, + "v1EksCloudClusterConfigEntity": { + "description": "EKS cloud cluster config entity", + "type": "object", + "properties": { + "clusterConfig": { + "$ref": "#/definitions/v1EksClusterConfig" + } + } + }, + "v1EksCloudConfig": { + "description": "EksCloudConfig is the Schema for the ekscloudconfigs API", + "type": "object", + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + "type": "string" + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/v1EksCloudConfigSpec" + } + } + }, + "v1EksCloudConfigSpec": { + "description": "EksCloudConfigSpec defines the cloud configuration input by user", + "type": "object", + "properties": { + "cloudAccountRef": { + "description": "cloudAccountRef should point to the secret which contains EksCloudAccount", + "$ref": "#/definitions/v1ObjectReference" + }, + "clusterConfig": { + "$ref": "#/definitions/v1EksClusterConfig" + }, + "fargateProfiles": { + "type": "array", + "items": { + "$ref": "#/definitions/v1FargateProfile" + } + }, + "machinePoolConfig": { + "type": "array", + "items": { + "$ref": "#/definitions/v1EksMachinePoolConfig" + } + } + } + }, + "v1EksClusterConfig": { + "description": "EksClusterConfig defines EKS specific config", + "type": "object", + "required": [ + "region" + ], + "properties": { + "addons": { + "description": "Addons defines the EKS addons to enable with the EKS cluster. This may be required for brownfield clusters", + "type": "array", + "items": { + "$ref": "#/definitions/v1EksAddon" + } + }, + "bastionDisabled": { + "description": "BastionDisabled is the option to disable bastion node", + "type": "boolean" + }, + "controlPlaneLoadBalancer": { + "description": "ControlPlaneLoadBalancer specifies how API server elb will be configured, this field is optional, not provided, \"\", default =\u003e \"Internet-facing\" \"Internet-facing\" =\u003e \"Internet-facing\" \"internal\" =\u003e \"internal\" For spectro saas setup we require to talk to the apiserver from our cluster so ControlPlaneLoadBalancer should be \"\", not provided or \"Internet-facing\"", + "type": "string" + }, + "encryptionConfig": { + "description": "EncryptionConfig specifies the encryption configuration for the cluster", + "$ref": "#/definitions/v1EncryptionConfig" + }, + "endpointAccess": { + "description": "Endpoints specifies access to this cluster's control plane endpoints", + "$ref": "#/definitions/v1EksClusterConfigEndpointAccess" + }, + "region": { + "description": "The AWS Region the cluster lives in.", + "type": "string" + }, + "sshKeyName": { + "description": "SSHKeyName specifies which EC2 SSH key can be used to access machines.", + "type": "string" + }, + "vpcId": { + "description": "VPC Id to deploy cluster into should have one public and one private subnet for the the cluster creation, this field is optional, If VPC Id is not provided a fully managed VPC will be created", + "type": "string" + } + } + }, + "v1EksClusterConfigEndpointAccess": { + "description": "EndpointAccess specifies how control plane endpoints are accessible", + "type": "object", + "properties": { + "private": { + "description": "Private points VPC-internal control plane access to the private endpoint", + "type": "boolean" + }, + "privateCIDRs": { + "description": "PrivateCIDRs specifies which blocks can access the private endpoint", + "type": "array", + "items": { + "type": "string" + } + }, + "public": { + "description": "Public controls whether control plane endpoints are publicly accessible", + "type": "boolean" + }, + "publicCIDRs": { + "description": "PublicCIDRs specifies which blocks can access the public endpoint", + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "v1EksFargateProfiles": { + "description": "Fargate profiles", + "type": "object", + "properties": { + "fargateProfiles": { + "type": "array", + "items": { + "$ref": "#/definitions/v1FargateProfile" + } + } + } + }, + "v1EksMachineCloudConfigEntity": { + "properties": { + "awsLaunchTemplate": { + "$ref": "#/definitions/v1AwsLaunchTemplate" + }, + "azs": { + "type": "array", + "items": { + "type": "string" + } + }, + "capacityType": { + "description": "EC2 instance capacity type", + "type": "string", + "default": "on-demand", + "enum": [ + "on-demand", + "spot" + ] + }, + "enableAwsLaunchTemplate": { + "description": "flag to know if aws launch template is enabled", + "type": "boolean" + }, + "instanceType": { + "description": "instance type", + "type": "string" + }, + "rootDeviceSize": { + "description": "rootDeviceSize in GBs", + "type": "integer", + "format": "int64", + "maximum": 2000, + "minimum": 1 + }, + "spotMarketOptions": { + "description": "SpotMarketOptions allows users to configure instances to be run using AWS Spot instances.", + "$ref": "#/definitions/v1SpotMarketOptions" + }, + "subnets": { + "type": "array", + "items": { + "$ref": "#/definitions/v1EksSubnetEntity" + } + } + } + }, + "v1EksMachinePoolConfig": { + "type": "object", + "required": [ + "isControlPlane" + ], + "properties": { + "additionalLabels": { + "description": "additionalLabels", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "additionalTags": { + "description": "AdditionalTags is an optional set of tags to add to resources managed by the provider, in addition to the ones added by default. For eg., tags for EKS nodeGroup or EKS NodegroupIAMRole", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "awsLaunchTemplate": { + "$ref": "#/definitions/v1AwsLaunchTemplate" + }, + "azs": { + "description": "AZs is only used for dynamic placement", + "type": "array", + "items": { + "type": "string" + } + }, + "capacityType": { + "description": "EC2 instance capacity type", + "type": "string", + "default": "on-demand", + "enum": [ + "on-demand", + "spot" + ] + }, + "enableAwsLaunchTemplate": { + "description": "flag to know if aws launch template is enabled", + "type": "boolean" + }, + "instanceConfig": { + "$ref": "#/definitions/v1InstanceConfig" + }, + "instanceType": { + "description": "instance type", + "type": "string" + }, + "isControlPlane": { + "description": "whether this pool is for control plane", + "type": "boolean", + "x-omitempty": false + }, + "labels": { + "description": "labels for this pool, example: control-plane/worker, gpu, windows", + "type": "array", + "items": { + "type": "string" + } + }, + "machinePoolProperties": { + "$ref": "#/definitions/v1MachinePoolProperties" + }, + "maxSize": { + "description": "max size of the pool, for scaling", + "type": "integer", + "format": "int32" + }, + "minSize": { + "description": "min size of the pool, for scaling", + "type": "integer", + "format": "int32" + }, + "name": { + "type": "string" + }, + "nodeRepaveInterval": { + "description": "Minimum number of seconds a node should be Ready, before the next node is selected for repave. Applicable only for workerpools in infrastructure cluster", + "type": "integer", + "format": "int32" + }, + "rootDeviceSize": { + "description": "rootDeviceSize in GBs", + "type": "integer", + "format": "int64" + }, + "size": { + "description": "size of the pool, number of machines", + "type": "integer", + "format": "int32" + }, + "spotMarketOptions": { + "description": "SpotMarketOptions allows users to configure instances to be run using AWS Spot instances.", + "$ref": "#/definitions/v1SpotMarketOptions" + }, + "subnetIds": { + "description": "AZ to subnet mapping filled by ally from hubble SubnetIDs [\"us-west-2d\"] = \"subnet-079b6061\" This field is optional If we don't provide a subnetId then by default the first private subnet from the AZ will be picked up for deployment", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "taints": { + "description": "control plane or worker taints", + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1Taint" + } + }, + "updateStrategy": { + "description": "rolling update strategy for this machinepool if not specified, will use ScaleOut", + "$ref": "#/definitions/v1UpdateStrategy" + }, + "useControlPlaneAsWorker": { + "description": "if IsControlPlane==true \u0026\u0026 useControlPlaneAsWorker==true, then will remove control plane taint this will not be used for worker pools", + "type": "boolean", + "x-omitempty": false + } + } + }, + "v1EksMachinePoolConfigEntity": { + "properties": { + "cloudConfig": { + "$ref": "#/definitions/v1EksMachineCloudConfigEntity" + }, + "poolConfig": { + "$ref": "#/definitions/v1MachinePoolConfigEntity" + } + } + }, + "v1EksSubnetEntity": { + "properties": { + "az": { + "type": "string" + }, + "id": { + "type": "string" + } + } + }, + "v1EncryptionConfig": { + "description": "EncryptionConfig specifies the encryption configuration for the EKS clsuter.", + "type": "object", + "properties": { + "isEnabled": { + "description": "Is encryption configuration enabled for the cluster", + "type": "boolean" + }, + "provider": { + "description": "Provider specifies the ARN or alias of the CMK (in AWS KMS)", + "type": "string" + }, + "resources": { + "description": "Resources specifies the resources to be encrypted", + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "v1Event": { + "description": "Describes the component event details", + "type": "object", + "properties": { + "involvedObject": { + "description": "Describes object involved in event generation", + "type": "object", + "$ref": "#/definitions/v1ObjectReference" + }, + "message": { + "description": "Describes message associated with the event", + "type": "string" + }, + "metadata": { + "type": "object", + "$ref": "#/definitions/v1ObjectMeta" + }, + "reason": { + "description": "Describes the reason for the event", + "type": "string" + }, + "relatedObject": { + "description": "Describes object related to the event", + "type": "object", + "$ref": "#/definitions/v1EventRelatedObject" + }, + "severity": { + "description": "Describes the gravitas for the event", + "type": "string" + }, + "source": { + "description": "Describes the origin for the event", + "type": "object", + "$ref": "#/definitions/v1EventSource" + } + } + }, + "v1EventRelatedObject": { + "description": "Object for which the event is related", + "type": "object", + "properties": { + "kind": { + "type": "string", + "enum": [ + "spectrocluster", + "edgehost" + ] + }, + "name": { + "type": "string" + }, + "uid": { + "type": "string" + } + } + }, + "v1EventSource": { + "description": "Describes the origin for the event", + "type": "object", + "properties": { + "component": { + "description": "Describes the component where event originated", + "type": "string" + }, + "host": { + "description": "Describes the host where event originated", + "type": "string" + } + } + }, + "v1Events": { + "description": "An array of component events items", + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": { + "description": "Describes a list of returned component events", + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1Event" + } + }, + "listmeta": { + "description": "Describes the meta information about the component event lists", + "$ref": "#/definitions/v1ListMetaData" + } + } + }, + "v1FargateProfile": { + "description": "FargateProfile defines the desired state of FargateProfile", + "type": "object", + "required": [ + "name" + ], + "properties": { + "additionalTags": { + "description": "AdditionalTags is an optional set of tags to add to AWS resources managed by the AWS provider, in addition to the ones added by default.", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "name": { + "description": "name specifies the profile name.", + "type": "string" + }, + "selectors": { + "description": "Selectors specify fargate pod selectors.", + "type": "array", + "items": { + "$ref": "#/definitions/v1FargateSelector" + } + }, + "subnetIds": { + "description": "SubnetIDs specifies which subnets are used for the auto scaling group of this nodegroup.", + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "v1FargateSelector": { + "description": "FargateSelector specifies a selector for pods that should run on this fargate pool", + "type": "object", + "required": [ + "namespace" + ], + "properties": { + "labels": { + "description": "Labels specifies which pod labels this selector should match.", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "namespace": { + "description": "Namespace specifies which namespace this selector should match.", + "type": "string" + } + } + }, + "v1Feature": { + "description": "Feature response", + "type": "object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/v1FeatureSpec" + } + } + }, + "v1FeatureSpec": { + "description": "Feature spec", + "properties": { + "description": { + "description": "Feature description", + "type": "string" + }, + "docLink": { + "description": "Feature doc link", + "type": "string" + }, + "key": { + "description": "Feature key", + "type": "string" + } + } + }, + "v1FeatureUpdate": { + "description": "Feature update spec", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectMetaInputEntity" + }, + "spec": { + "$ref": "#/definitions/v1FeatureUpdateSpec" + } + } + }, + "v1FeatureUpdateSpec": { + "description": "Feature update spec", + "properties": { + "description": { + "description": "Feature description", + "type": "string" + }, + "docLink": { + "description": "Feature doc link", + "type": "string" + } + } + }, + "v1Features": { + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": { + "description": "List of features", + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1Feature" + } + } + } + }, + "v1FilterArray": { + "type": "object", + "properties": { + "beginsWith": { + "type": "array", + "items": { + "type": "string" + }, + "x-nullable": true + }, + "eq": { + "type": "array", + "items": { + "type": "string" + }, + "x-nullable": true + }, + "ignoreCase": { + "type": "boolean", + "default": true + }, + "ne": { + "type": "array", + "items": { + "type": "string" + }, + "x-nullable": true + } + } + }, + "v1FilterMetadata": { + "description": "Filter metadata object", + "type": "object", + "properties": { + "filterType": { + "type": "string" + }, + "name": { + "type": "string" + }, + "uid": { + "type": "string" + } + } + }, + "v1FilterString": { + "type": "object", + "properties": { + "beginsWith": { + "type": "string", + "x-nullable": true + }, + "contains": { + "type": "string", + "x-nullable": true + }, + "eq": { + "type": "string", + "x-nullable": true + }, + "ignoreCase": { + "type": "boolean", + "default": true + }, + "ne": { + "type": "string", + "x-nullable": true + } + } + }, + "v1FilterSummary": { + "description": "Filter summary object", + "type": "object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/v1FilterSummarySpec" + } + } + }, + "v1FilterSummarySpec": { + "properties": { + "filterType": { + "type": "string" + } + } + }, + "v1FilterVersionString": { + "type": "object", + "properties": { + "beginsWith": { + "type": "string", + "x-nullable": true + }, + "eq": { + "type": "string", + "x-nullable": true + }, + "gt": { + "type": "string", + "x-nullable": true + }, + "lt": { + "type": "string", + "x-nullable": true + }, + "ne": { + "type": "string", + "x-nullable": true + } + } + }, + "v1FiltersMetadata": { + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1FilterMetadata" + } + } + } + }, + "v1FiltersSummary": { + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1FilterSummary" + } + }, + "listmeta": { + "$ref": "#/definitions/v1ListMetaData" + } + } + }, + "v1FipsSettings": { + "description": "FIPS configuration", + "properties": { + "fipsClusterFeatureConfig": { + "$ref": "#/definitions/v1NonFipsConfig" + }, + "fipsClusterImportConfig": { + "$ref": "#/definitions/v1NonFipsConfig" + }, + "fipsPackConfig": { + "$ref": "#/definitions/v1NonFipsConfig" + } + } + }, + "v1FreemiumUsage": { + "type": "object", + "properties": { + "usage": { + "type": "number", + "format": "float64", + "x-omitempty": false + } + } + }, + "v1FreemiumUsageLimit": { + "type": "object", + "properties": { + "activeClusters": { + "type": "integer", + "x-omitempty": false + }, + "overageUsage": { + "type": "number", + "x-omitempty": false + }, + "usage": { + "type": "number", + "format": "float64", + "x-omitempty": false + } + } + }, + "v1GPUDeviceSpec": { + "type": "object", + "properties": { + "addresses": { + "description": "Addresses is a map of PCI device entry name to its addresses.\nExample entry would be \"11:00.0 VGA compatible controller [0300]: NVIDIA\nCorporation Device [10de:1eb1] (rev a1)\"- \u003e 0000_11_00_0\" The address is\nBDF (Bus Device Function) identifier format seperated by underscores. The\nfirst 4 bits are almost always 0000. In the above example 11 is Bus, 00\nis Device,0 is function. The values of these addreses are expected in hexadecimal\nformat\n", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "model": { + "description": "Model is the model of GPU, for a given vendor, for eg., TU104GL [Tesla T4]", + "type": "string" + }, + "vendor": { + "description": "Vendor is the GPU vendor, for eg., NVIDIA or AMD", + "type": "string" + } + } + }, + "v1GcpAccount": { + "description": "GCP account information", + "type": "object", + "properties": { + "apiVersion": { + "description": "Cloud account api version", + "type": "string" + }, + "kind": { + "description": "Cloud account kind", + "type": "string" + }, + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/v1GcpAccountSpec" + }, + "status": { + "$ref": "#/definitions/v1CloudAccountStatus" + } + } + }, + "v1GcpAccountEntity": { + "description": "GCP account information", + "type": "object", + "properties": { + "apiVersion": { + "description": "Cloud account api version", + "type": "string" + }, + "kind": { + "description": "Cloud account kind", + "type": "string" + }, + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/v1GcpAccountEntitySpec" + }, + "status": { + "$ref": "#/definitions/v1CloudAccountStatus" + } + } + }, + "v1GcpAccountEntitySpec": { + "type": "object", + "properties": { + "jsonCredentials": { + "description": "Gcp cloud account json credentials", + "type": "string" + }, + "jsonCredentialsFileUid": { + "description": "Reference of the credentials stored in the file", + "type": "string" + } + } + }, + "v1GcpAccountNameValidateSpec": { + "description": "Gcp cloud account name validate spec", + "type": "object", + "required": [ + "credentials", + "bucketName" + ], + "properties": { + "bucketName": { + "description": "Bucket name in the GCP", + "type": "string" + }, + "credentials": { + "$ref": "#/definitions/v1GcpAccountValidateSpec" + }, + "projectId": { + "description": "ProjectId in the GCP", + "type": "string" + } + } + }, + "v1GcpAccountSpec": { + "type": "object", + "properties": { + "jsonCredentials": { + "description": "Gcp cloud account json credentials", + "type": "string" + }, + "jsonCredentialsFileName": { + "description": "Reference of the credentials stored in the file", + "type": "string" + } + } + }, + "v1GcpAccountValidateSpec": { + "description": "Gcp cloud account entity which takes json credentials or reference to the file where credentials are stored", + "type": "object", + "properties": { + "jsonCredentials": { + "description": "Gcp cloud account json credentials", + "type": "string" + }, + "jsonCredentialsFileUid": { + "description": "Reference of the credentials stored in the file", + "type": "string" + } + } + }, + "v1GcpAccounts": { + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1GcpAccount" + } + }, + "listmeta": { + "$ref": "#/definitions/v1ListMetaData" + } + } + }, + "v1GcpCloudAccountValidateEntity": { + "description": "Gcp cloud account spec", + "type": "object", + "properties": { + "spec": { + "$ref": "#/definitions/v1GcpAccountValidateSpec" + } + } + }, + "v1GcpCloudClusterConfigEntity": { + "description": "Gcp cloud cluster config entity", + "type": "object", + "properties": { + "clusterConfig": { + "$ref": "#/definitions/v1GcpClusterConfig" + } + } + }, + "v1GcpCloudConfig": { + "description": "GcpCloudConfig is the Schema for the gcpcloudconfigs API", + "type": "object", + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + "type": "string" + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/v1GcpCloudConfigSpec" + }, + "status": { + "$ref": "#/definitions/v1GcpCloudConfigStatus" + } + } + }, + "v1GcpCloudConfigSpec": { + "description": "GcpCloudConfigSpec defines the cloud configuration input by user This will translate to clusterspec/machinespec for cluster-api", + "type": "object", + "properties": { + "cloudAccountRef": { + "description": "cloudAccountRef should point to the secret which contains GcpCloudAccount", + "$ref": "#/definitions/v1ObjectReference" + }, + "clusterConfig": { + "$ref": "#/definitions/v1GcpClusterConfig" + }, + "machinePoolConfig": { + "type": "array", + "items": { + "$ref": "#/definitions/v1GcpMachinePoolConfig" + } + } + } + }, + "v1GcpCloudConfigStatus": { + "description": "GcpCloudConfigStatus defines the observed state of GcpCloudConfig The cloudimage info built by Mold is stored here image should be mapped to a specific machinepool", + "type": "object", + "properties": { + "ansibleRoleDigest": { + "description": "For mold controller to identify if is there any changes in Pack", + "type": "string" + }, + "conditions": { + "description": "spectroAnsibleProvisioner: should be added only once, subsequent recocile will use the same provisioner SpectroAnsiblePacker bool `json:\"spectroAnsiblePacker,omitempty\"`", + "type": "array", + "items": { + "$ref": "#/definitions/v1ClusterCondition" + } + }, + "images": { + "description": "Images array items should be 1-to-1 mapping to Spec.MachinePoolConfig", + "$ref": "#/definitions/v1GcpImage" + }, + "isAddonLayer": { + "description": "addon layers present in spc", + "type": "boolean" + }, + "roleDigest": { + "description": "this map will be for ansible roles present in each pack", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "sourceImageId": { + "description": "sourceImageId, it can be from packref's annotations or from pack.json", + "type": "string" + }, + "useCapiImage": { + "description": "PackerVariableDigest string `json:\"packerDigest,omitempty\"` If no ansible roles found in Packs then Mold should tell Drive to use capi image and not create custom image, because there is nothing to add", + "type": "boolean" + } + } + }, + "v1GcpClusterConfig": { + "description": "Cluster level configuration for gcp cloud and applicable for all the machine pools", + "type": "object", + "required": [ + "project", + "region" + ], + "properties": { + "managedClusterConfig": { + "$ref": "#/definitions/v1GcpManagedClusterConfig" + }, + "network": { + "description": "NetworkName if empty would create VPC Network in auto mode. If provided, custom VPC network will be used", + "type": "string" + }, + "project": { + "description": "Name of the project in which cluster is to be deployed", + "type": "string" + }, + "region": { + "description": "GCP region for the cluster", + "type": "string" + } + } + }, + "v1GcpImage": { + "description": "Refers to GCP image", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "os": { + "type": "string" + }, + "region": { + "type": "string" + }, + "state": { + "type": "string" + } + } + }, + "v1GcpImageUrlEntity": { + "description": "Gcp image url entity", + "type": "object", + "properties": { + "imageFamily": { + "description": "The name of the image family to which this image belongs", + "type": "string" + }, + "imageUrl": { + "description": "Server-defined URL for the resource", + "type": "string" + }, + "name": { + "description": "Name of the resource", + "type": "string" + } + } + }, + "v1GcpInstanceTypes": { + "description": "Retrieves a list of GCP instance types", + "type": "object", + "properties": { + "instanceTypes": { + "description": "List of GCP instance types", + "type": "array", + "items": { + "$ref": "#/definitions/v1InstanceType" + } + } + } + }, + "v1GcpMachine": { + "description": "GCP cloud VM definition", + "type": "object", + "properties": { + "apiVersion": { + "type": "string" + }, + "kind": { + "type": "string" + }, + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/v1GcpMachineSpec" + }, + "status": { + "$ref": "#/definitions/v1CloudMachineStatus" + } + } + }, + "v1GcpMachinePoolCloudConfigEntity": { + "type": "object", + "required": [ + "instanceType" + ], + "properties": { + "azs": { + "type": "array", + "items": { + "type": "string" + } + }, + "instanceType": { + "type": "string" + }, + "rootDeviceSize": { + "description": "Size of root volume in GB. Default is 30GB", + "type": "integer", + "format": "int64" + }, + "subnet": { + "description": "Subnet specifies the subnetwork to use for given instance. If not specified, the first subnet from the cluster region and network is used", + "type": "string" + }, + "subnets": { + "type": "array", + "items": { + "$ref": "#/definitions/v1GcpSubnetEntity" + } + } + } + }, + "v1GcpMachinePoolConfig": { + "type": "object", + "required": [ + "isControlPlane", + "instanceType" + ], + "properties": { + "additionalLabels": { + "description": "additionalLabels", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "additionalTags": { + "description": "AdditionalTags is an optional set of tags to add to resources managed by the provider, in addition to the ones added by default. For eg., tags for EKS nodeGroup or EKS NodegroupIAMRole", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "azs": { + "type": "array", + "items": { + "type": "string" + } + }, + "instanceConfig": { + "$ref": "#/definitions/v1InstanceConfig" + }, + "instanceType": { + "type": "string" + }, + "isControlPlane": { + "description": "whether this pool is for control plane", + "type": "boolean" + }, + "labels": { + "description": "labels for this pool, example: control-plane/worker, gpu, windows", + "type": "array", + "items": { + "type": "string" + } + }, + "machinePoolProperties": { + "$ref": "#/definitions/v1MachinePoolProperties" + }, + "maxSize": { + "description": "max size of the pool, for scaling", + "type": "integer", + "format": "int32" + }, + "minSize": { + "description": "min size of the pool, for scaling", + "type": "integer", + "format": "int32" + }, + "name": { + "type": "string" + }, + "nodeRepaveInterval": { + "description": "Minimum number of seconds a node should be Ready, before the next node is selected for repave. Applicable only for workerpools in infrastructure cluster", + "type": "integer", + "format": "int32" + }, + "rootDeviceSize": { + "description": "Size of root volume in GB. Default is 30GB", + "type": "integer", + "format": "int64" + }, + "size": { + "description": "size of the pool, number of machines", + "type": "integer", + "format": "int32" + }, + "subnet": { + "description": "Subnet specifies the subnetwork to use for given instance. If not specified, the first subnet from the cluster region and network is used", + "type": "string" + }, + "subnetIds": { + "description": "AZ to subnet mapping filled by ally from hubble SubnetIDs [\"us-west-2d\"] = \"subnet-079b6061\" This field is optional If we don't provide a subnetId then by default the first private subnet from the AZ will be picked up for deployment", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "taints": { + "description": "control plane or worker taints", + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1Taint" + } + }, + "updateStrategy": { + "description": "rolling update strategy for this machinepool if not specified, will use ScaleOut", + "$ref": "#/definitions/v1UpdateStrategy" + }, + "useControlPlaneAsWorker": { + "description": "if IsControlPlane==true \u0026\u0026 useControlPlaneAsWorker==true, then will remove control plane taint this will not be used for worker pools", + "type": "boolean" + } + } + }, + "v1GcpMachinePoolConfigEntity": { + "type": "object", + "required": [ + "cloudConfig" + ], + "properties": { + "cloudConfig": { + "$ref": "#/definitions/v1GcpMachinePoolCloudConfigEntity" + }, + "poolConfig": { + "$ref": "#/definitions/v1MachinePoolConfigEntity" + } + } + }, + "v1GcpMachineSpec": { + "description": "GCP cloud VM definition spec", + "type": "object", + "required": [ + "instanceType" + ], + "properties": { + "image": { + "type": "string" + }, + "instanceConfig": { + "$ref": "#/definitions/v1InstanceConfig" + }, + "instanceType": { + "type": "string" + }, + "nics": { + "type": "array", + "items": { + "$ref": "#/definitions/v1GcpNic" + } + }, + "project": { + "type": "string" + }, + "region": { + "type": "string" + }, + "rootDeviceSize": { + "type": "integer", + "format": "int64" + }, + "zone": { + "type": "string" + } + } + }, + "v1GcpMachines": { + "description": "GCP machine list", + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1GcpMachine" + } + }, + "listmeta": { + "$ref": "#/definitions/v1ListMetaData" + } + } + }, + "v1GcpManagedClusterConfig": { + "description": "GCP managed cluster config", + "type": "object", + "properties": { + "enableAutoPilot": { + "description": "EnableAutopilot indicates whether to enable autopilot for this GKE cluster", + "type": "boolean" + }, + "location": { + "description": "Can be Region or Zone", + "type": "string" + } + } + }, + "v1GcpNetwork": { + "description": "GCP network enity is a virtual version of a physical network", + "type": "object", + "properties": { + "name": { + "description": "GCP network name", + "type": "string" + }, + "subnets": { + "description": "List of GCP subnet", + "type": "array", + "items": { + "$ref": "#/definitions/v1GcpSubnet" + } + } + } + }, + "v1GcpNetworks": { + "description": "List of GCP networks", + "type": "object", + "properties": { + "networks": { + "type": "array", + "items": { + "$ref": "#/definitions/v1GcpNetwork" + } + } + } + }, + "v1GcpNic": { + "description": "GCP network interface", + "type": "object", + "properties": { + "index": { + "type": "integer", + "format": "int8" + }, + "networkName": { + "type": "string" + }, + "privateIPs": { + "type": "array", + "items": { + "type": "string" + } + }, + "publicIp": { + "type": "string" + } + } + }, + "v1GcpProject": { + "description": "GCP project organizes all Google Cloud resources", + "type": "object", + "properties": { + "id": { + "description": "GCP project id", + "type": "string" + }, + "name": { + "description": "GCP project name", + "type": "string" + } + } + }, + "v1GcpProjects": { + "description": "List of GCP Projects", + "type": "object", + "properties": { + "projects": { + "description": "List of GCP Projects", + "type": "array", + "items": { + "$ref": "#/definitions/v1GcpProject" + } + } + } + }, + "v1GcpRegion": { + "description": "Geographical region made up of zones where you can host your GCP resources", + "type": "object", + "properties": { + "name": { + "description": "GCP region name", + "type": "string" + }, + "status": { + "description": "GCP region status", + "type": "string" + } + } + }, + "v1GcpRegions": { + "description": "List of GCP Regions", + "type": "object", + "properties": { + "regions": { + "type": "array", + "items": { + "$ref": "#/definitions/v1GcpRegion" + } + } + } + }, + "v1GcpStorageConfig": { + "description": "GCP storage config object", + "type": "object", + "required": [ + "bucketName", + "credentials" + ], + "properties": { + "bucketName": { + "description": "GCP storage bucket name", + "type": "string" + }, + "credentials": { + "description": "GCP cloud account credentials", + "$ref": "#/definitions/v1.GcpAccountEntitySpec" + }, + "projectId": { + "description": "GCP project id", + "type": "string" + } + } + }, + "v1GcpStorageTypes": { + "description": "List of GCP storage types", + "type": "object", + "properties": { + "storageTypes": { + "type": "array", + "items": { + "$ref": "#/definitions/v1StorageType" + } + } + } + }, + "v1GcpSubnet": { + "description": "Subnets are regional resources, and have IP address ranges associated with them", + "type": "object", + "properties": { + "id": { + "description": "GCP subnet id", + "type": "string" + }, + "name": { + "description": "GCP subnet name", + "type": "string" + } + } + }, + "v1GcpSubnetEntity": { + "properties": { + "az": { + "type": "string" + }, + "id": { + "type": "string" + } + } + }, + "v1GcpZone": { + "description": "A zone is a deployment area for Google Cloud resources within a region", + "type": "object", + "properties": { + "name": { + "description": "GCP zone name", + "type": "string" + } + } + }, + "v1GcpZones": { + "description": "List of GCP zones", + "type": "object", + "properties": { + "zones": { + "type": "array", + "items": { + "$ref": "#/definitions/v1GcpZone" + } + } + } + }, + "v1GenericCloudClusterConfigEntity": { + "description": "Generic cloud cluster config entity", + "type": "object", + "properties": { + "clusterConfig": { + "$ref": "#/definitions/v1GenericClusterConfig" + } + } + }, + "v1GenericCloudConfig": { + "description": "Generic CloudConfig for all cloud types", + "properties": { + "kind": { + "type": "string" + }, + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/v1GenericCloudConfigSpec" + } + } + }, + "v1GenericCloudConfigSpec": { + "description": "Generic CloudConfig spec for all cloud types", + "type": "object", + "properties": { + "cloudAccountRef": { + "description": "Cloud account reference is optional and dynamically handled based on the kind", + "$ref": "#/definitions/v1ObjectReference" + }, + "clusterConfig": { + "$ref": "#/definitions/v1GenericClusterConfig" + }, + "edgeHostRefs": { + "description": "Appliances (Edge Host) uids", + "type": "array", + "items": { + "$ref": "#/definitions/v1ObjectReference" + } + }, + "machinePoolConfig": { + "type": "array", + "items": { + "$ref": "#/definitions/v1GenericMachinePoolConfig" + } + } + } + }, + "v1GenericClusterConfig": { + "description": "Generic cluster config", + "type": "object", + "properties": { + "instanceType": { + "$ref": "#/definitions/v1GenericInstanceType" + }, + "region": { + "description": "cluster region information", + "type": "string" + } + } + }, + "v1GenericInstanceType": { + "type": "object", + "properties": { + "diskGiB": { + "description": "DiskGiB is the size of a virtual machine's disk, in GiB", + "type": "integer", + "format": "int32" + }, + "memoryMiB": { + "description": "MemoryMiB is the size of a virtual machine's memory, in MiB", + "type": "integer", + "format": "int64" + }, + "name": { + "type": "string" + }, + "numCPUs": { + "description": "NumCPUs is the number of virtual processors in a virtual machine", + "type": "integer", + "format": "int32" + } + } + }, + "v1GenericMachine": { + "description": "Generic cloud VM definition", + "properties": { + "apiVersion": { + "type": "string" + }, + "kind": { + "type": "string" + }, + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/v1GenericMachineSpec" + }, + "status": { + "$ref": "#/definitions/v1CloudMachineStatus" + } + } + }, + "v1GenericMachinePoolConfig": { + "type": "object", + "required": [ + "isControlPlane" + ], + "properties": { + "instanceType": { + "type": "string" + }, + "isControlPlane": { + "description": "whether this pool is for control plane", + "type": "boolean" + }, + "labels": { + "description": "labels for this pool, example: control-plane/worker, gpu, windows", + "type": "array", + "items": { + "type": "string" + } + }, + "name": { + "type": "string" + }, + "rootDeviceSize": { + "description": "Size of root volume in GB. Default is 30GB", + "type": "integer", + "format": "int64" + }, + "size": { + "description": "size of the pool, number of machines", + "type": "integer", + "format": "int32" + }, + "useControlPlaneAsWorker": { + "description": "if IsControlPlane==true \u0026\u0026 useControlPlaneAsWorker==true, then will remove control plane taint this will not be used for worker pools", + "type": "boolean" + } + } + }, + "v1GenericMachinePoolConfigEntity": { + "properties": { + "cloudConfig": { + "$ref": "#/definitions/v1GenericClusterConfig" + }, + "poolConfig": { + "$ref": "#/definitions/v1MachinePoolConfigEntity" + } + } + }, + "v1GenericMachineSpec": { + "description": "Generic cloud VM definition spec", + "properties": { + "hostName": { + "type": "string" + }, + "imageId": { + "type": "string" + }, + "instanceType": { + "$ref": "#/definitions/v1GenericInstanceType" + }, + "nics": { + "type": "array", + "items": { + "$ref": "#/definitions/v1GenericNic" + } + }, + "sshKeyName": { + "type": "string" + } + } + }, + "v1GenericMachines": { + "description": "Generic machine list", + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1GenericMachine" + } + }, + "listmeta": { + "$ref": "#/definitions/v1ListMetaData" + } + } + }, + "v1GenericNic": { + "description": "Generic network interface", + "type": "object", + "properties": { + "index": { + "type": "integer", + "format": "int8" + }, + "networkName": { + "type": "string" + }, + "privateIPs": { + "type": "array", + "items": { + "type": "string" + } + }, + "publicIp": { + "type": "string" + } + } + }, + "v1GeolocationLatlong": { + "description": "Geolocation Latlong entity", + "type": "object", + "properties": { + "latitude": { + "description": "Latitude of a resource", + "type": "number", + "format": "float64", + "x-omitempty": false + }, + "longitude": { + "description": "Longitude of a resource", + "type": "number", + "format": "float64", + "x-omitempty": false + } + } + }, + "v1GitRepoFileContent": { + "type": "object", + "properties": { + "content": { + "type": "string" + }, + "name": { + "type": "string" + }, + "path": { + "type": "string" + }, + "repoName": { + "type": "string" + }, + "sha": { + "type": "string" + } + } + }, + "v1HelmChartOption": { + "description": "If chart options are provided then the specified chart is validated first and synced immediately. If the specified chart is not found in the specified registry then creation is cancelled.", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "version": { + "type": "string" + } + } + }, + "v1HelmRegistries": { + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1HelmRegistry" + } + }, + "listmeta": { + "$ref": "#/definitions/v1ListMetaData" + } + } + }, + "v1HelmRegistriesSummary": { + "description": "Helm Registries Summary", + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1HelmRegistrySummary" + } + }, + "listmeta": { + "$ref": "#/definitions/v1ListMetaData" + } + } + }, + "v1HelmRegistry": { + "description": "Helm registry information", + "type": "object", + "properties": { + "apiVersion": { + "type": "string" + }, + "kind": { + "type": "string" + }, + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/v1HelmRegistrySpec" + }, + "status": { + "$ref": "#/definitions/v1HelmRegistryStatus" + } + } + }, + "v1HelmRegistryCreateOption": { + "description": "Helm registry create options", + "type": "object", + "properties": { + "charts": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1HelmChartOption" + } + }, + "skipSync": { + "type": "boolean" + } + } + }, + "v1HelmRegistryEntity": { + "description": "Helm registry information", + "type": "object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/v1HelmRegistrySpecEntity" + } + } + }, + "v1HelmRegistrySpec": { + "description": "Helm registry credentials spec", + "type": "object", + "required": [ + "endpoint", + "auth" + ], + "properties": { + "auth": { + "$ref": "#/definitions/v1RegistryAuth" + }, + "endpoint": { + "type": "string" + }, + "isPrivate": { + "type": "boolean", + "x-omitempty": false + }, + "name": { + "type": "string" + }, + "registryUid": { + "description": "Helm registry uid", + "type": "string" + }, + "scope": { + "type": "string" + } + } + }, + "v1HelmRegistrySpecEntity": { + "description": "Helm registry credentials spec", + "type": "object", + "required": [ + "endpoint", + "auth" + ], + "properties": { + "auth": { + "$ref": "#/definitions/v1RegistryAuth" + }, + "createOption": { + "$ref": "#/definitions/v1HelmRegistryCreateOption" + }, + "endpoint": { + "type": "string" + }, + "isPrivate": { + "type": "boolean" + }, + "name": { + "type": "string" + }, + "scope": { + "type": "string" + } + } + }, + "v1HelmRegistrySpecSummary": { + "description": "Helm Registry spec summary", + "type": "object", + "properties": { + "endpoint": { + "type": "string" + }, + "isPrivate": { + "type": "boolean", + "x-omitempty": false + }, + "scope": { + "type": "string" + } + } + }, + "v1HelmRegistryStatus": { + "description": "Status of the helm registry", + "type": "object", + "properties": { + "helmSyncStatus": { + "$ref": "#/definitions/v1RegistrySyncStatus" + } + } + }, + "v1HelmRegistryStatusSummary": { + "description": "Helm registry status summary", + "properties": { + "sync": { + "$ref": "#/definitions/v1RegistrySyncStatus" + } + } + }, + "v1HelmRegistrySummary": { + "description": "Helm Registry summary", + "type": "object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/v1HelmRegistrySpecSummary" + }, + "status": { + "$ref": "#/definitions/v1HelmRegistryStatusSummary" + } + } + }, + "v1HostClusterConfig": { + "properties": { + "clusterEndpoint": { + "description": "host cluster configuration", + "$ref": "#/definitions/v1HostClusterEndpoint" + }, + "clusterGroup": { + "description": "cluster group reference", + "$ref": "#/definitions/v1ObjectReference" + }, + "hostCluster": { + "description": "host cluster reference", + "$ref": "#/definitions/v1ObjectReference" + }, + "isHostCluster": { + "description": "is enabled as host cluster", + "type": "boolean", + "default": false, + "x-omitempty": false + } + } + }, + "v1HostClusterConfigEntity": { + "type": "object", + "properties": { + "hostClusterConfig": { + "$ref": "#/definitions/v1HostClusterConfig" + } + } + }, + "v1HostClusterConfigResponse": { + "properties": { + "clusterGroup": { + "description": "cluster group reference", + "$ref": "#/definitions/v1ObjectReference" + } + } + }, + "v1HostClusterEndpoint": { + "properties": { + "config": { + "$ref": "#/definitions/v1HostClusterEndpointConfig" + }, + "type": { + "description": "is enabled as host cluster", + "type": "string", + "enum": [ + "Ingress", + "LoadBalancer" + ] + } + } + }, + "v1HostClusterEndpointConfig": { + "properties": { + "ingressConfig": { + "$ref": "#/definitions/v1IngressConfig" + }, + "loadBalancerConfig": { + "$ref": "#/definitions/v1LoadBalancerConfig" + } + } + }, + "v1HttpPatch": { + "type": "object", + "required": [ + "op", + "path" + ], + "properties": { + "from": { + "description": "A path to the pointer from which reference will be taken", + "type": "string" + }, + "op": { + "description": "The operation to be performed", + "type": "string", + "enum": [ + "add", + "remove", + "replace", + "move", + "copy" + ] + }, + "path": { + "description": "A path to the pointer on which operation will be done", + "type": "string" + }, + "value": { + "description": "The value to be used within the operations.", + "type": "object" + } + } + }, + "v1IPPool": { + "description": "IPPool defines static IPs available. Gateway, Prefix, Nameserver, if defined, will be default values for all Pools", + "type": "object", + "properties": { + "gateway": { + "description": "Gateway is the gateway ip address", + "type": "string" + }, + "nameserver": { + "description": "Nameserver provide information for dns resolvation", + "$ref": "#/definitions/v1Nameserver" + }, + "pools": { + "description": "Pools contains the list of IP addresses pools", + "type": "array", + "items": { + "$ref": "#/definitions/v1Pool" + } + }, + "prefix": { + "description": "Prefix is the mask of the network as integer (max 128)", + "type": "integer", + "format": "int32" + }, + "uid": { + "description": "UID is the UID of this IPPool, used by Hubble", + "type": "string" + } + } + }, + "v1IdentityProvider": { + "description": "Describes a predefined Identity Provider (IDP)", + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + } + }, + "v1IdentityProviders": { + "description": "Describes a list of predefined Identity Provider (IDP)", + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1IdentityProvider" + } + }, + "v1ImportClusterConfig": { + "type": "object", + "properties": { + "importMode": { + "description": "If the importMode is empty then cluster is imported with full permission mode. By default importMode is empty and cluster is imported in full permission mode.", + "type": "string", + "enum": [ + "read-only" + ] + }, + "proxy": { + "description": "Cluster proxy settings", + "$ref": "#/definitions/v1ClusterProxySpec" + } + } + }, + "v1ImportEdgeHostConfig": { + "type": "object", + "properties": { + "edgeHostUid": { + "description": "Deprecated. Use 'edgeHostUids' field", + "type": "string" + }, + "edgeHostUids": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "v1InfraLBConfig": { + "type": "object", + "properties": { + "apiServerLB": { + "description": "APIServerLB is the configuration for the control-plane load balancer.", + "$ref": "#/definitions/v1LoadBalancerSpec" + } + } + }, + "v1IngressConfig": { + "description": "Ingress configuration for exposing the virtual cluster's kube-apiserver", + "properties": { + "host": { + "type": "string" + }, + "port": { + "type": "integer", + "format": "int64" + } + } + }, + "v1InstanceConfig": { + "properties": { + "category": { + "type": "string" + }, + "cpuSet": { + "type": "integer", + "format": "int64" + }, + "diskGiB": { + "type": "integer", + "format": "int64" + }, + "memoryMiB": { + "description": "MemoryMiB is the size of a virtual machine's memory, in MiB", + "type": "integer", + "format": "int64" + }, + "name": { + "type": "string" + }, + "numCPUs": { + "description": "NumCPUs is the number of virtual processors in a virtual machine", + "type": "integer", + "format": "int32" + } + } + }, + "v1InstanceCost": { + "description": "Instance cost entity", + "type": "object", + "properties": { + "price": { + "description": "Array of cloud instance price", + "type": "array", + "items": { + "$ref": "#/definitions/v1InstancePrice" + } + } + } + }, + "v1InstancePrice": { + "description": "Cloud instance price", + "type": "object", + "properties": { + "onDemand": { + "description": "OnDemand price of instance", + "type": "number", + "format": "double" + }, + "os": { + "description": "Os associated with instance price. Allowed values - [linux, windows]", + "type": "string", + "enum": [ + "linux", + "windows" + ] + }, + "spot": { + "description": "Spot price of instance", + "type": "number", + "format": "double" + } + } + }, + "v1InstanceType": { + "description": "Cloud Instance type details", + "type": "object", + "properties": { + "category": { + "description": "Category of instance type", + "type": "string", + "x-go-name": "Category" + }, + "cost": { + "$ref": "#/definitions/v1InstanceCost" + }, + "cpu": { + "description": "Cpu of instance type", + "type": "number", + "format": "double", + "x-go-name": "Cpu" + }, + "gpu": { + "description": "Gpu of instance type", + "type": "number", + "format": "double", + "x-go-name": "Gpu" + }, + "memory": { + "description": "Memory of instance type", + "type": "number", + "format": "double", + "x-go-name": "Memory" + }, + "nonSupportedZones": { + "description": "Non supported zones of the instance in a particular region", + "type": "array", + "items": { + "type": "string" + } + }, + "price": { + "description": "Price of instance type", + "type": "number", + "format": "double", + "x-go-name": "Price" + }, + "supportedArchitectures": { + "description": "Supported architecture of the instance", + "type": "array", + "items": { + "type": "string" + } + }, + "type": { + "description": "Type of instance type", + "type": "string", + "x-go-name": "Type" + } + } + }, + "v1Invoice": { + "description": "Invoice object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/v1InvoiceSpec" + }, + "status": { + "$ref": "#/definitions/v1InvoiceStatus" + } + } + }, + "v1InvoiceBillingPeriod": { + "description": "Invoice billing period object", + "properties": { + "end": { + "$ref": "#/definitions/v1Time" + }, + "start": { + "$ref": "#/definitions/v1Time" + } + } + }, + "v1InvoiceCredits": { + "description": "Invoice credits object", + "properties": { + "alloyFreeCredits": { + "description": "Credits allocated for import clusters", + "type": "number", + "format": "int64" + }, + "pureFreeCredits": { + "description": "Credits allocated for managed clusters", + "type": "number", + "format": "int64" + } + } + }, + "v1InvoicePlan": { + "description": "Invoice plan object", + "properties": { + "freeCredits": { + "description": "List of free credits", + "type": "array", + "items": { + "$ref": "#/definitions/v1InvoicePlanCredit" + } + }, + "plantype": { + "type": "string", + "enum": [ + "Trial", + "MonthlyOnDemand", + "AnnualSubscription" + ] + }, + "slaCredits": { + "description": "List of SLA credits", + "type": "array", + "items": { + "$ref": "#/definitions/v1InvoicePlanCredit" + } + } + } + }, + "v1InvoicePlanCredit": { + "description": "Invoice plan credit object", + "properties": { + "planCredit": { + "$ref": "#/definitions/v1PlanCredit" + }, + "totalCpuCoreHours": { + "description": "Total used cpu core hours", + "type": "number", + "format": "int64" + } + } + }, + "v1InvoiceProduct": { + "description": "Product invoice object", + "properties": { + "alloy": { + "$ref": "#/definitions/v1InvoiceProductData" + }, + "pure": { + "$ref": "#/definitions/v1InvoiceProductData" + } + } + }, + "v1InvoiceProductData": { + "description": "Product invoice data", + "properties": { + "allocatedCredits": { + "description": "Allocated credits", + "type": "number", + "format": "int64" + }, + "amount": { + "description": "Total amount", + "type": "number", + "format": "float64" + }, + "billableCredits": { + "description": "Credits to be billed", + "type": "number", + "format": "float64" + }, + "breachedCredits": { + "description": "Credits that are exceeds the allocated credits", + "type": "number", + "format": "float64" + }, + "discount": { + "description": "Applied discount", + "type": "number", + "format": "int64" + }, + "freeCredits": { + "description": "Allocated free credits", + "type": "number", + "format": "int64" + }, + "overageLimitPercentage": { + "description": "Allowed overage limit in percentage", + "type": "number", + "format": "int8" + }, + "tierName": { + "description": "Tier name", + "type": "string" + }, + "tierPrice": { + "description": "Tier price", + "type": "number", + "format": "float64" + }, + "totalUsedCredits": { + "description": "Total used credits", + "type": "number", + "format": "float64" + }, + "usedCredits": { + "description": "Used credits", + "type": "number", + "format": "float64" + } + } + }, + "v1InvoiceProject": { + "description": "Invoice project object", + "properties": { + "amount": { + "description": "Billing amount for the project", + "type": "number", + "format": "float64" + }, + "projectName": { + "description": "Name of the project", + "type": "string" + }, + "projectUid": { + "description": "Project identifier", + "type": "string" + }, + "usage": { + "description": "Usage by the project", + "$ref": "#/definitions/v1ProjectUsage" + } + } + }, + "v1InvoiceSpec": { + "description": "Invoice specification", + "properties": { + "address": { + "$ref": "#/definitions/v1Address" + }, + "billingPeriod": { + "$ref": "#/definitions/v1InvoiceBillingPeriod" + }, + "credits": { + "$ref": "#/definitions/v1InvoiceCredits" + }, + "envType": { + "description": "Environment type [Trial,MonthlyOnDemand,AnnualSubscription,OnPrem]", + "type": "string" + }, + "month": { + "description": "Month for which invoice is generated", + "$ref": "#/definitions/v1Time" + }, + "paymentUnit": { + "type": "string", + "enum": [ + "usd" + ] + }, + "plan": { + "$ref": "#/definitions/v1InvoicePlan" + } + } + }, + "v1InvoiceState": { + "description": "Invoice state object", + "properties": { + "paymentMsg": { + "description": "Payment status message", + "type": "string" + }, + "state": { + "type": "string", + "enum": [ + "Paid", + "PaymentPending", + "PaymentInProgress", + "PaymentFailed" + ] + }, + "timestamp": { + "description": "Time on which the state has been updated", + "$ref": "#/definitions/v1Time" + } + } + }, + "v1InvoiceStatus": { + "description": "Invoice Status", + "properties": { + "billableAmount": { + "description": "Total billable amount", + "type": "number", + "format": "float64" + }, + "productInvoice": { + "$ref": "#/definitions/v1InvoiceProduct" + }, + "projects": { + "description": "List of project invoices", + "type": "array", + "items": { + "$ref": "#/definitions/v1InvoiceProject" + } + }, + "states": { + "description": "List of invoice states", + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1InvoiceState" + } + }, + "stripeInvoiceId": { + "description": "Stripe invoice uid", + "type": "string" + } + } + }, + "v1IpPoolEntity": { + "description": "IP Pool entity definition", + "type": "object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "type": "object", + "properties": { + "pool": { + "$ref": "#/definitions/v1Pool" + }, + "priavetGatewayUid": { + "type": "string" + }, + "restrictToSingleCluster": { + "description": "if true, restricts this IP pool to be used by single cluster at any time", + "type": "boolean", + "x-omitempty": false + } + } + }, + "status": { + "$ref": "#/definitions/v1IpPoolStatus" + } + } + }, + "v1IpPoolInputEntity": { + "description": "IP Pool input entity definition", + "type": "object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "type": "object", + "required": [ + "pool" + ], + "properties": { + "pool": { + "$ref": "#/definitions/v1Pool" + }, + "restrictToSingleCluster": { + "description": "if true, restricts this IP pool to be used by single cluster at any time", + "type": "boolean" + } + } + } + } + }, + "v1IpPoolStatus": { + "description": "IP Pool status", + "type": "object", + "properties": { + "allottedIps": { + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + } + }, + "associatedClusters": { + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + } + }, + "inUse": { + "type": "boolean", + "x-omitempty": false + } + } + }, + "v1IpPools": { + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1IpPoolEntity" + } + } + } + }, + "v1K8MachineCertificate": { + "description": "K8 Certificates for control plane nodes", + "type": "object", + "properties": { + "certificateAuthorities": { + "description": "Applicable certificate authorities", + "type": "array", + "items": { + "$ref": "#/definitions/v1k8CertificateAuthority" + } + }, + "name": { + "type": "string" + } + } + }, + "v1KubeBenchEntity": { + "description": "KubeBench response", + "required": [ + "requestUid", + "status", + "reports" + ], + "properties": { + "reports": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/v1KubeBenchReportEntity" + } + }, + "requestUid": { + "type": "string" + }, + "status": { + "type": "string", + "enum": [ + "Completed", + "InProgress", + "Failed", + "Initiated" + ] + } + } + }, + "v1KubeBenchLog": { + "description": "Compliance Scan KubeBench Log", + "properties": { + "description": { + "type": "string" + }, + "expected": { + "type": "string" + }, + "remediation": { + "type": "string" + }, + "state": { + "type": "string" + }, + "testId": { + "type": "string" + }, + "value": { + "type": "string" + } + } + }, + "v1KubeBenchLogEntity": { + "description": "KubeBench log", + "properties": { + "description": { + "type": "string" + }, + "expected": { + "type": "string" + }, + "remediation": { + "type": "string" + }, + "state": { + "type": "string" + }, + "testId": { + "type": "string" + }, + "value": { + "type": "string" + } + } + }, + "v1KubeBenchReport": { + "description": "Compliance Scan KubeBench Report", + "properties": { + "fail": { + "type": "integer", + "format": "int32" + }, + "info": { + "type": "integer", + "format": "int32" + }, + "logs": { + "type": "array", + "items": { + "$ref": "#/definitions/v1KubeBenchLog" + } + }, + "name": { + "type": "string" + }, + "pass": { + "type": "integer", + "format": "int32" + }, + "time": { + "$ref": "#/definitions/v1Time" + }, + "type": { + "type": "string" + }, + "warn": { + "type": "integer", + "format": "int32" + } + } + }, + "v1KubeBenchReportEntity": { + "description": "KubeBench report", + "properties": { + "fail": { + "type": "integer", + "format": "int32" + }, + "info": { + "type": "integer", + "format": "int32" + }, + "logs": { + "type": "array", + "items": { + "$ref": "#/definitions/v1KubeBenchLogEntity" + } + }, + "name": { + "type": "string" + }, + "pass": { + "type": "integer", + "format": "int32" + }, + "time": { + "$ref": "#/definitions/v1Time" + }, + "type": { + "type": "string" + }, + "warn": { + "type": "integer", + "format": "int32" + } + } + }, + "v1KubeHunterEntity": { + "description": "KubeHunter response", + "required": [ + "requestUid", + "status", + "reports" + ], + "properties": { + "reports": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/v1KubeHunterReportEntity" + } + }, + "requestUid": { + "type": "string" + }, + "status": { + "type": "string", + "enum": [ + "Completed", + "InProgress", + "Failed", + "Initiated" + ] + } + } + }, + "v1KubeHunterLog": { + "description": "Compliance Scan KubeHunter Log", + "properties": { + "description": { + "type": "string" + }, + "evidence": { + "type": "string" + }, + "reference": { + "type": "string" + }, + "severity": { + "type": "string" + }, + "testId": { + "type": "string" + }, + "vulnerability": { + "type": "string" + } + } + }, + "v1KubeHunterLogEntity": { + "description": "KubeHunter log", + "properties": { + "description": { + "type": "string" + }, + "evidence": { + "type": "string" + }, + "reference": { + "type": "string" + }, + "severity": { + "type": "string" + }, + "testId": { + "type": "string" + }, + "vulnerability": { + "type": "string" + } + } + }, + "v1KubeHunterReport": { + "description": "Compliance Scan KubeHunter Report", + "properties": { + "logs": { + "type": "array", + "items": { + "$ref": "#/definitions/v1KubeHunterLog" + } + }, + "time": { + "$ref": "#/definitions/v1Time" + }, + "vulnerabilites": { + "$ref": "#/definitions/v1KubeHunterVulnerabilities" + } + } + }, + "v1KubeHunterReportEntity": { + "description": "KubeHunter report", + "properties": { + "logs": { + "type": "array", + "items": { + "$ref": "#/definitions/v1KubeHunterLogEntity" + } + }, + "time": { + "$ref": "#/definitions/v1Time" + }, + "vulnerabilities": { + "$ref": "#/definitions/v1KubeHunterVulnerabilityDataEntity" + } + } + }, + "v1KubeHunterVulnerabilities": { + "description": "Compliance Scan KubeHunter Vulnerabilities", + "properties": { + "high": { + "type": "integer", + "format": "int32" + }, + "low": { + "type": "integer", + "format": "int32" + }, + "medium": { + "type": "integer", + "format": "int32" + } + } + }, + "v1KubeHunterVulnerabilityDataEntity": { + "description": "KubeHunter vulnerability data", + "properties": { + "high": { + "type": "integer", + "format": "int32" + }, + "low": { + "type": "integer", + "format": "int32" + }, + "medium": { + "type": "integer", + "format": "int32" + } + } + }, + "v1KubeMeta": { + "description": "Spectro cluster kube meta", + "type": "object", + "properties": { + "hasKubeConfig": { + "type": "boolean", + "x-omitempty": false + }, + "hasKubeConfigClient": { + "type": "boolean", + "x-omitempty": false + }, + "hasManifest": { + "type": "boolean", + "x-omitempty": false + }, + "kubernetesVersion": { + "type": "string" + } + } + }, + "v1LifecycleConfig": { + "properties": { + "pause": { + "description": "enable pause life cycle config", + "type": "boolean", + "default": false, + "x-omitempty": false + } + } + }, + "v1LifecycleConfigEntity": { + "type": "object", + "properties": { + "lifecycleConfig": { + "$ref": "#/definitions/v1LifecycleConfig" + } + } + }, + "v1LifecycleStatus": { + "properties": { + "msg": { + "description": "error or success msg of lifecycle", + "type": "string" + }, + "status": { + "description": "lifecycle status", + "type": "string", + "enum": [ + "Pausing", + "Paused", + "Resuming", + "Running", + "Error" + ] + } + } + }, + "v1ListMetaData": { + "description": "ListMeta describes metadata for the resource listing", + "type": "object", + "properties": { + "continue": { + "description": "Next token for the pagination. Next token is equal to empty string indicates end of result set.", + "type": "string", + "x-omitempty": false + }, + "count": { + "description": "Total count of the resources which might change during pagination based on the resources addition or deletion", + "type": "integer", + "x-omitempty": false + }, + "limit": { + "description": "Number of records feteched", + "type": "integer", + "x-omitempty": false + }, + "offset": { + "description": "The next offset for the pagination. Starting index for which next request will be placed.", + "type": "integer", + "x-omitempty": false + } + } + }, + "v1LoadBalancerConfig": { + "description": "Load balancer configuration for exposing the virtual cluster's kube-apiserver", + "properties": { + "externalIPs": { + "type": "array", + "items": { + "type": "string" + } + }, + "externalTrafficPolicy": { + "type": "string" + }, + "loadBalancerSourceRanges": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "v1LoadBalancerService": { + "type": "object", + "properties": { + "host": { + "description": "IP or Host from svc.Status.LoadBalancerStatus.Ingress", + "type": "string" + }, + "name": { + "description": "name of the loadbalancer service", + "type": "string" + }, + "ports": { + "description": "port this service exposed", + "type": "array", + "items": { + "$ref": "#/definitions/v1ServicePort" + } + } + } + }, + "v1LoadBalancerSpec": { + "description": "LoadBalancerSpec defines an Azure load balancer.", + "type": "object", + "properties": { + "apiServerLBStaticIP": { + "type": "string" + }, + "ipAllocationMethod": { + "type": "string", + "default": "Dynamic", + "enum": [ + "Static", + "Dynamic" + ] + }, + "privateDNSName": { + "type": "string" + }, + "type": { + "description": "Load Balancer type", + "type": "string", + "default": "Public", + "enum": [ + "Internal", + "Public" + ] + } + } + }, + "v1LocationType": { + "description": "Location type", + "type": "string", + "default": "s3", + "enum": [ + "s3", + "gcp", + "minio" + ] + }, + "v1LoginBannerSettings": { + "properties": { + "Message": { + "description": "Login banner message displayed to the user", + "type": "string", + "x-omitempty": false + }, + "isEnabled": { + "description": "Set to 'true' if login banner has to be displayed for user", + "type": "boolean", + "x-omitempty": false + }, + "title": { + "description": "Banner title displayed to the user", + "type": "string", + "x-omitempty": false + } + } + }, + "v1LoginResponse": { + "description": "Returns the allowed login method and information with the organization details", + "type": "object", + "properties": { + "appEnv": { + "description": "Describes the env type. Possible values [ saas, self-hosted, quick-start, enterprise, airgap]", + "type": "string" + }, + "authType": { + "description": "Describes the default mode of authentication. Possible values [password, sso]", + "type": "string", + "enum": [ + "password", + "sso" + ] + }, + "orgName": { + "description": "Organization name.", + "type": "string" + }, + "redirectUrl": { + "description": "Describes the default redirect Url for authentication. If authType is sso, it will have tenant configured saml/oidc idp url else it will be users organization url", + "type": "string", + "x-omitempty": false + }, + "rootDomain": { + "description": "Describes the domain url on which the saas is available", + "type": "string" + }, + "securityMode": { + "description": "Describes which security mode is enabled", + "type": "string" + }, + "ssoLogins": { + "description": "Just Inside. Describes the allowed social logins", + "$ref": "#/definitions/v1SsoLogins" + }, + "totalTenants": { + "description": "Describes the total number of tenant present in the system", + "type": "number", + "format": "int64" + } + } + }, + "v1MaasAccount": { + "description": "Maas cloud account information", + "type": "object", + "properties": { + "apiVersion": { + "type": "string" + }, + "kind": { + "type": "string" + }, + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/v1MaasCloudAccount" + }, + "status": { + "$ref": "#/definitions/v1CloudAccountStatus" + } + } + }, + "v1MaasAccounts": { + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1MaasAccount" + } + }, + "listmeta": { + "$ref": "#/definitions/v1ListMetaData" + } + } + }, + "v1MaasCloudAccount": { + "type": "object", + "required": [ + "apiKey", + "apiEndpoint" + ], + "properties": { + "apiEndpoint": { + "type": "string" + }, + "apiKey": { + "type": "string" + }, + "preferredSubnets": { + "description": "list of preferred subnets order in the list reflects order in which subnets will be selected for ip address selection in apiserver dns endpoint this way user can specify external or preferable subnet \"10.11.130.0/24,10.10.10.0/24\"", + "type": "array", + "items": { + "type": "string", + "default": "" + } + } + } + }, + "v1MaasCloudClusterConfigEntity": { + "description": "Maas cloud cluster config entity", + "type": "object", + "properties": { + "clusterConfig": { + "$ref": "#/definitions/v1MaasClusterConfig" + } + } + }, + "v1MaasCloudConfig": { + "description": "MaasCloudConfig is the Schema for the maascloudconfigs API", + "type": "object", + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + "type": "string" + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/v1MaasCloudConfigSpec" + }, + "status": { + "$ref": "#/definitions/v1MaasCloudConfigStatus" + } + } + }, + "v1MaasCloudConfigSpec": { + "description": "MaasCloudConfigSpec defines the cloud configuration input by user This will translate to clusterspec/machinespec for cluster-api", + "type": "object", + "properties": { + "cloudAccountRef": { + "description": "cloudAccountRef should point to the secret which contains MaasCloudAccount", + "$ref": "#/definitions/v1ObjectReference" + }, + "clusterConfig": { + "$ref": "#/definitions/v1MaasClusterConfig" + }, + "machinePoolConfig": { + "type": "array", + "items": { + "$ref": "#/definitions/v1MaasMachinePoolConfig" + } + } + } + }, + "v1MaasCloudConfigStatus": { + "description": "MaasCloudConfigStatus defines the observed state of MaasCloudConfig The cloudimage info built by Mold is stored here image should be mapped to a specific machinepool", + "type": "object", + "properties": { + "ansibleRoleDigest": { + "description": "For mold controller to identify if is there any changes in Pack", + "type": "string" + }, + "conditions": { + "type": "array", + "items": { + "$ref": "#/definitions/v1ClusterCondition" + } + }, + "isAddonLayer": { + "description": "addon layers present in spc", + "type": "boolean" + }, + "nodeImage": { + "$ref": "#/definitions/v1MaasImage" + }, + "roleDigest": { + "description": "this map will be for ansible roles present in eack pack", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "sourceImageId": { + "description": "sourceImageId, it can be from packref's annotations or from pack.json", + "type": "string" + }, + "useCapiImage": { + "description": "PackerVariableDigest string `json:\"packerDigest,omitempty\"` If no ansible roles found in Packs then Mold should tell Drive to use capi image and not create custom image, because there is nothing to add", + "type": "boolean" + } + } + }, + "v1MaasClusterConfig": { + "description": "Cluster level configuration for MAAS cloud and applicable for all the machine pools", + "type": "object", + "required": [ + "domain" + ], + "properties": { + "domain": { + "description": "Domain name of the cluster to be provisioned", + "type": "string" + }, + "sshKeys": { + "description": "SSH keys specifies a list of ssh authorized keys for the 'spectro' user", + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "v1MaasDomain": { + "description": "Maas domain", + "type": "object", + "properties": { + "name": { + "description": "Name of Maas domain", + "type": "string" + } + } + }, + "v1MaasDomains": { + "description": "List of Maas domains", + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1MaasDomain" + } + } + } + }, + "v1MaasImage": { + "description": "Name of the image", + "type": "object", + "properties": { + "name": { + "description": "full path of the image template location it contains datacenter/folder/templatename etc eg: /mydc/vm/template/spectro/workerpool-1-centos", + "type": "string" + }, + "state": { + "type": "string" + } + } + }, + "v1MaasInstanceType": { + "type": "object", + "properties": { + "minCPU": { + "description": "Minimum CPU cores", + "type": "integer", + "format": "int32" + }, + "minMemInMB": { + "description": "Minimum memory in MiB", + "type": "integer", + "format": "int32" + } + } + }, + "v1MaasMachine": { + "description": "Maas cloud VM definition", + "type": "object", + "properties": { + "apiVersion": { + "type": "string" + }, + "kind": { + "type": "string" + }, + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/v1MaasMachineSpec" + }, + "status": { + "$ref": "#/definitions/v1CloudMachineStatus" + } + } + }, + "v1MaasMachineConfigEntity": { + "type": "object", + "properties": { + "azs": { + "description": "for control plane pool, this will be the failure domains for kcp", + "type": "array", + "items": { + "type": "string" + } + }, + "instanceType": { + "$ref": "#/definitions/v1MaasInstanceType" + }, + "resourcePool": { + "type": "string" + } + } + }, + "v1MaasMachinePoolCloudConfigEntity": { + "type": "object", + "required": [ + "instanceType", + "resourcePool" + ], + "properties": { + "azs": { + "type": "array", + "items": { + "type": "string" + } + }, + "instanceType": { + "$ref": "#/definitions/v1MaasInstanceType" + }, + "resourcePool": { + "description": "the resource pool", + "type": "string" + }, + "tags": { + "description": "Tags in maas environment", + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "v1MaasMachinePoolConfig": { + "type": "object", + "required": [ + "instanceType" + ], + "properties": { + "additionalLabels": { + "description": "additionalLabels", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "additionalTags": { + "description": "AdditionalTags is an optional set of tags to add to resources managed by the provider, in addition to the ones added by default. For eg., tags for EKS nodeGroup or EKS NodegroupIAMRole", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "azs": { + "type": "array", + "items": { + "type": "string" + } + }, + "instanceType": { + "description": "InstanceType defines the required CPU, Memory", + "$ref": "#/definitions/v1MaasInstanceType" + }, + "isControlPlane": { + "description": "whether this pool is for control plane", + "type": "boolean" + }, + "labels": { + "description": "labels for this pool, example: control-plane/worker, gpu, windows", + "type": "array", + "items": { + "type": "string" + } + }, + "machinePoolProperties": { + "$ref": "#/definitions/v1MachinePoolProperties" + }, + "maxSize": { + "description": "max size of the pool, for scaling", + "type": "integer", + "format": "int32" + }, + "minSize": { + "description": "min size of the pool, for scaling", + "type": "integer", + "format": "int32" + }, + "name": { + "type": "string" + }, + "nodeRepaveInterval": { + "description": "Minimum number of seconds a node should be Ready, before the next node is selected for repave. Applicable only for workerpools in infrastructure cluster", + "type": "integer", + "format": "int32" + }, + "resourcePool": { + "type": "string" + }, + "size": { + "description": "size of the pool, number of machines", + "type": "integer", + "format": "int32" + }, + "tags": { + "description": "Tags in maas environment", + "type": "array", + "items": { + "type": "string" + } + }, + "taints": { + "description": "control plane or worker taints", + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1Taint" + } + }, + "updateStrategy": { + "description": "rolling update strategy for this machinepool if not specified, will use ScaleOut", + "$ref": "#/definitions/v1UpdateStrategy" + }, + "useControlPlaneAsWorker": { + "description": "if IsControlPlane==true \u0026\u0026 useControlPlaneAsWorker==true, then will remove control plane taint this will not be used for worker pools", + "type": "boolean" + } + } + }, + "v1MaasMachinePoolConfigEntity": { + "type": "object", + "required": [ + "cloudConfig" + ], + "properties": { + "cloudConfig": { + "$ref": "#/definitions/v1MaasMachinePoolCloudConfigEntity" + }, + "poolConfig": { + "$ref": "#/definitions/v1MachinePoolConfigEntity" + } + } + }, + "v1MaasMachineSpec": { + "description": "Maas cloud VM definition spec", + "type": "object", + "properties": { + "az": { + "type": "string" + }, + "hostname": { + "type": "string" + }, + "nics": { + "type": "array", + "items": { + "$ref": "#/definitions/v1MaasNic" + } + } + } + }, + "v1MaasMachines": { + "description": "List of MAAS machines", + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1MaasMachine" + } + }, + "listmeta": { + "$ref": "#/definitions/v1ListMetaData" + } + } + }, + "v1MaasNic": { + "description": "Maas network interface", + "type": "object", + "properties": { + "index": { + "type": "integer", + "format": "int8" + }, + "privateIPs": { + "type": "array", + "items": { + "type": "string" + } + }, + "publicIp": { + "type": "string" + } + } + }, + "v1MaasPool": { + "description": "Maas pool", + "type": "object", + "properties": { + "description": { + "description": "Description of Maas domain", + "type": "string" + }, + "name": { + "description": "Name of Maas pool", + "type": "string" + } + } + }, + "v1MaasPools": { + "description": "List of Maas pools", + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1MaasPool" + } + } + } + }, + "v1MaasSubnet": { + "description": "Maas subnet", + "type": "object", + "properties": { + "id": { + "description": "Id of Maas subnet", + "type": "integer" + }, + "name": { + "description": "Name of Maas subnet", + "type": "string" + }, + "space": { + "description": "Space associated with Maas subnet", + "type": "string" + }, + "vlans": { + "$ref": "#/definitions/v1MaasVlan" + } + } + }, + "v1MaasSubnets": { + "description": "List of Maas subnets", + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1MaasSubnet" + } + } + } + }, + "v1MaasTag": { + "description": "Maas tag", + "type": "object", + "properties": { + "comment": { + "description": "Comment on Maas tag", + "type": "string" + }, + "definition": { + "description": "Definition of Maas tag", + "type": "string" + }, + "kernelOpts": { + "description": "Kernel Opts on Maas tag", + "type": "string" + }, + "name": { + "description": "Name of Maas tag", + "type": "string" + }, + "resourceUri": { + "description": "Description of Maas tag", + "type": "string" + } + } + }, + "v1MaasTags": { + "description": "List of Maas tags", + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1MaasTag" + } + } + } + }, + "v1MaasVlan": { + "description": "Maas vlan entity", + "type": "object", + "properties": { + "fabric": { + "description": "Fabric associated with Maas Vlan", + "type": "string" + }, + "id": { + "description": "Id of Maas Vlan", + "type": "integer" + }, + "name": { + "description": "Name of Maas Vlan", + "type": "string" + } + } + }, + "v1MaasZone": { + "description": "Maas zone", + "type": "object", + "properties": { + "description": { + "description": "Description of Maas domain", + "type": "string" + }, + "name": { + "description": "Name of Maas zone", + "type": "string" + } + } + }, + "v1MaasZones": { + "description": "List of Maas zones", + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1MaasZone" + } + } + } + }, + "v1MachineCertificate": { + "description": "K8 Certificates for control plane nodes", + "type": "object", + "properties": { + "certificateAuthorities": { + "description": "Applicable certificate authorities", + "type": "array", + "items": { + "$ref": "#/definitions/v1CertificateAuthority" + } + }, + "name": { + "type": "string" + } + } + }, + "v1MachineCertificates": { + "description": "K8 Certificates for all the cluster's control plane nodes", + "type": "object", + "properties": { + "machineCertificates": { + "type": "array", + "items": { + "$ref": "#/definitions/v1MachineCertificate" + } + } + } + }, + "v1MachineHealth": { + "description": "Machine health state", + "type": "object", + "properties": { + "conditions": { + "type": "array", + "items": { + "$ref": "#/definitions/v1MachineHealthCondition" + } + }, + "lastHeartBeatTimestamp": { + "$ref": "#/definitions/v1Time" + }, + "state": { + "type": "string" + } + } + }, + "v1MachineHealthCheckConfig": { + "type": "object", + "properties": { + "healthCheckMaxUnhealthy": { + "description": "HealthCheckMaxUnhealthy is the value above which, if current nodes are unhealthy remediation will not be triggered Can be an absolute int64 number or a percentage string Default value is 100%, i.e by default it is disabled", + "type": "string" + }, + "networkReadyHealthCheckDuration": { + "description": "NetworkReadyHealthCheckDuration is the timeout to check for the network availability. If the network is not available in the given available time, beyond the timeout check a node will be killed and a new node will be created. Default time is 10m", + "type": "string" + }, + "nodeReadyHealthCheckDuration": { + "description": "NodeReadyHealthCheckDuration is the timeout to check for the node ready state. If the node is not ready within the time out set, the node will be deleted and a new node will be launched. Default time is 10m", + "type": "string" + } + } + }, + "v1MachineHealthCondition": { + "description": "Machine health condition", + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "reason": { + "type": "string" + }, + "status": { + "type": "string" + }, + "type": { + "type": "string" + } + } + }, + "v1MachineMaintenance": { + "type": "object", + "properties": { + "action": { + "description": "Machine maintenance mode action", + "type": "string", + "enum": [ + "cordon", + "uncordon" + ] + } + } + }, + "v1MachineMaintenanceStatus": { + "description": "Machine maintenance status", + "type": "object", + "properties": { + "action": { + "type": "string" + }, + "message": { + "type": "string" + }, + "state": { + "type": "string" + } + } + }, + "v1MachineManagementConfig": { + "type": "object", + "properties": { + "osPatchConfig": { + "description": "OS patch config contains properties to patch node os with latest security packages. \nIf OsPatchConfig is not provided then node os will not be patched with latest security updates.\nNote: For edge based cluster (like edge-native type) the osPatchConfig is NOT applicable, the values will be ignored.\n", + "$ref": "#/definitions/v1OsPatchConfig" + } + } + }, + "v1MachinePoolConfigEntity": { + "description": "Machine pool configuration for the cluster", + "type": "object", + "required": [ + "name", + "size", + "labels" + ], + "properties": { + "additionalLabels": { + "description": "Additional labels to be part of the machine pool", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "additionalTags": { + "description": "AdditionalTags is an optional set of tags to add to resources managed by the provider, in addition to the ones added by default. For eg., tags for EKS nodeGroup or EKS NodegroupIAMRole", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "isControlPlane": { + "description": "Whether this pool is for control plane", + "type": "boolean", + "x-omitempty": false + }, + "labels": { + "description": "Labels for this machine pool, example: control-plane/worker, gpu, windows", + "type": "array", + "items": { + "type": "string" + } + }, + "machinePoolProperties": { + "$ref": "#/definitions/v1MachinePoolProperties" + }, + "maxSize": { + "description": "Max size of the pool, for scaling", + "type": "integer", + "format": "int32" + }, + "minSize": { + "description": "Min size of the pool, for scaling", + "type": "integer", + "format": "int32" + }, + "name": { + "type": "string" + }, + "nodeRepaveInterval": { + "description": "Minimum number of seconds a node should be Ready, before the next node is selected for repave. Applicable only for workerpools in infrastructure cluster", + "type": "integer", + "format": "int32" + }, + "size": { + "description": "Size of the pool, number of nodes/machines", + "type": "integer", + "format": "int32" + }, + "taints": { + "description": "control plane or worker taints", + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1Taint" + } + }, + "updateStrategy": { + "description": "Rolling update strategy for this machine pool if not specified, will use ScaleOut", + "$ref": "#/definitions/v1UpdateStrategy" + }, + "useControlPlaneAsWorker": { + "description": "If IsControlPlane==true \u0026\u0026 useControlPlaneAsWorker==true, then will remove control plane taint this will not be used for worker pools", + "type": "boolean", + "x-omitempty": false + } + } + }, + "v1MachinePoolMeta": { + "type": "object", + "properties": { + "cloudType": { + "type": "string" + }, + "healthy": { + "description": "number of healthy machines", + "type": "integer", + "format": "int32", + "x-omitempty": false + }, + "infraProfileTemplate": { + "description": "InfraClusterProfile contains OS/Kernel for this NodePool", + "$ref": "#/definitions/v1ClusterProfileTemplateMeta" + }, + "isControlPlane": { + "description": "whether this pool is for control plane", + "type": "boolean", + "x-omitempty": false + }, + "labels": { + "description": "labels for this pool, example: control-plane/worker, gpu, windows", + "type": "array", + "items": { + "type": "string" + } + }, + "maintenanceMode": { + "description": "number of machines under maintenance", + "type": "integer", + "format": "int32", + "x-omitempty": false + }, + "size": { + "description": "size of the pool, number of machines", + "type": "integer", + "format": "int32", + "x-omitempty": false + } + } + }, + "v1MachinePoolProperties": { + "description": "Machine pool specific properties", + "type": "object", + "properties": { + "archType": { + "description": "Architecture type of the pool. Default value is 'amd64'", + "x-omitempty": false, + "$ref": "#/definitions/v1ArchType" + } + } + }, + "v1MachinePoolRate": { + "description": "Machine pool estimated rate information", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "nodesCount": { + "type": "integer", + "format": "int32" + }, + "rate": { + "$ref": "#/definitions/v1CloudRate" + } + } + }, + "v1MachinePoolsMachineUids": { + "properties": { + "machinePools": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/v1MachineUids" + } + } + } + }, + "v1MachineUids": { + "properties": { + "machineUids": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "v1Macro": { + "properties": { + "name": { + "type": "string" + }, + "value": { + "type": "string" + } + } + }, + "v1Macros": { + "properties": { + "macros": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1Macro" + } + } + } + }, + "v1ManagedDisk": { + "type": "object", + "properties": { + "storageAccountType": { + "type": "string" + } + } + }, + "v1Manifest": { + "description": "Manifest object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/v1ManifestPublishedSpec" + } + } + }, + "v1ManifestData": { + "description": "Published manifest object", + "type": "object", + "properties": { + "content": { + "description": "Manifest content in yaml", + "type": "string" + }, + "digest": { + "description": "Manifest digest", + "type": "string" + } + } + }, + "v1ManifestEntities": { + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": { + "description": "Manifests array", + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1ManifestEntity" + } + } + } + }, + "v1ManifestEntity": { + "description": "Manifest object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/v1ManifestSpec" + } + } + }, + "v1ManifestInputEntity": { + "description": "Manifest request payload", + "properties": { + "content": { + "description": "Manifest content", + "type": "string" + }, + "name": { + "description": "Manifest name", + "type": "string" + } + } + }, + "v1ManifestPublishedSpec": { + "description": "Manifest spec", + "properties": { + "published": { + "$ref": "#/definitions/v1ManifestData" + } + } + }, + "v1ManifestRefInputEntities": { + "description": "Pack manifests input params", + "properties": { + "manifests": { + "description": "Pack manifests array", + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1ManifestRefInputEntity" + } + } + } + }, + "v1ManifestRefInputEntity": { + "description": "Manifest request payload", + "properties": { + "content": { + "description": "Manifest content in yaml", + "type": "string" + }, + "uid": { + "description": "Manifest uid", + "type": "string" + } + } + }, + "v1ManifestRefUpdateEntity": { + "description": "Manifest update request payload", + "required": [ + "name" + ], + "properties": { + "content": { + "description": "Manifest content in yaml", + "type": "string" + }, + "name": { + "description": "Manifest name", + "type": "string" + }, + "uid": { + "description": "Manifest uid", + "type": "string" + } + } + }, + "v1ManifestSpec": { + "description": "Manifest spec", + "type": "object", + "properties": { + "draft": { + "$ref": "#/definitions/v1ManifestData" + }, + "published": { + "$ref": "#/definitions/v1ManifestData" + } + } + }, + "v1ManifestSummary": { + "description": "Manifest object", + "properties": { + "content": { + "description": "Manifest content in yaml", + "type": "string" + }, + "name": { + "description": "Manifest name", + "type": "string" + }, + "uid": { + "description": "Manifest uid", + "type": "string" + } + } + }, + "v1Memory": { + "type": "object", + "properties": { + "sizeInMB": { + "description": "memory size in bytes", + "type": "integer", + "format": "int64" + } + } + }, + "v1MetricAggregation": { + "description": "Aggregation values", + "type": "object", + "properties": { + "avg": { + "type": "number", + "x-omitempty": false + }, + "count": { + "type": "number", + "format": "int64", + "x-omitempty": false + }, + "max": { + "type": "number", + "x-omitempty": false + }, + "min": { + "type": "number", + "x-omitempty": false + }, + "sum": { + "type": "number", + "x-omitempty": false + } + } + }, + "v1MetricMetadata": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "uid": { + "type": "string" + } + } + }, + "v1MetricPoint": { + "description": "Metric Info", + "type": "object", + "properties": { + "avg": { + "type": "number" + }, + "count": { + "type": "number", + "format": "int64" + }, + "max": { + "type": "number" + }, + "min": { + "type": "number" + }, + "sum": { + "type": "number" + }, + "timestamp": { + "type": "number", + "format": "int64" + }, + "value": { + "type": "number", + "x-omitempty": false + } + } + }, + "v1MetricTimeSeries": { + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1Metrics" + } + } + } + }, + "v1MetricTimeSeriesList": { + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1MetricsList" + } + } + } + }, + "v1Metrics": { + "type": "object", + "properties": { + "aggregation": { + "$ref": "#/definitions/v1MetricAggregation" + }, + "kind": { + "type": "string" + }, + "points": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1MetricPoint" + } + }, + "unit": { + "type": "string" + } + } + }, + "v1MetricsList": { + "type": "object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1MetricMetadata" + }, + "metrics": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1Metrics" + } + } + } + }, + "v1Nameserver": { + "description": "Nameserver define search domains and nameserver addresses", + "type": "object", + "properties": { + "addresses": { + "type": "array", + "items": { + "type": "string" + } + }, + "search": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "v1NestedCloudConfigStatus": { + "description": "Defines the status of virtual cloud config", + "type": "object", + "properties": { + "conditions": { + "type": "array", + "items": { + "$ref": "#/definitions/v1ClusterCondition" + }, + "x-kubernetes-patch-merge-key": "type", + "x-kubernetes-patch-strategy": "merge" + }, + "isAddonLayer": { + "description": "addon layers present in spc", + "type": "boolean" + } + } + }, + "v1Nic": { + "type": "object", + "properties": { + "dns": { + "type": "array", + "items": { + "type": "string" + } + }, + "gateway": { + "type": "string" + }, + "ip": { + "type": "string" + }, + "isDefault": { + "type": "boolean" + }, + "macAddr": { + "type": "string" + }, + "nicName": { + "type": "string" + }, + "subnet": { + "type": "string" + } + } + }, + "v1NodesAutoRemediationSettings": { + "properties": { + "disableNodesAutoRemediation": { + "type": "boolean", + "x-omitempty": false + }, + "isEnabled": { + "type": "boolean", + "x-omitempty": false + } + } + }, + "v1NonFipsConfig": { + "description": "Non-FIPS configuration", + "properties": { + "mode": { + "description": "enable or disable the non FIPS complaint", + "type": "string", + "default": "nonFipsDisabled", + "enum": [ + "nonFipsEnabled", + "nonFipsDisabled" + ] + } + } + }, + "v1Notification": { + "description": "Describes event notification and action definition", + "type": "object", + "properties": { + "action": { + "description": "Describes actions for the notification", + "type": "object", + "$ref": "#/definitions/v1NotificationAction" + }, + "metadata": { + "type": "object", + "$ref": "#/definitions/v1ObjectMeta" + }, + "relatedObject": { + "type": "object", + "$ref": "#/definitions/v1RelatedObject" + }, + "source": { + "description": "Describes origin info for the notification", + "type": "object", + "$ref": "#/definitions/v1NotificationSource" + }, + "type": { + "description": "Describes type of notification. Possible values [NotificationPackUpdate, NotificationPackRegistryUpdate, NotificationNone]", + "type": "string", + "enum": [ + "NotificationPackUpdate", + "NotificationPackRegistryUpdate", + "NotificationNone" + ] + } + } + }, + "v1NotificationAction": { + "description": "Describes actions for the notification", + "type": "object", + "properties": { + "ack": { + "description": "Describes the acknowledgement status for the notification", + "type": "boolean", + "x-omitempty": false + }, + "actionMessage": { + "description": "Describes information related to notification action", + "type": "string" + }, + "actionType": { + "description": "Describes action type for the notification. Possible Values [NotifyActionPacksUpdate, NotifyActionClusterProfileUpdate, NotifyActionPackRegistryUpdate, NotifyActionClusterUpdate, NotifyActionNone]", + "type": "string", + "enum": [ + "NotifyActionPacksUpdate", + "NotifyActionClusterProfileUpdate", + "NotifyActionPackRegistryUpdate", + "NotifyActionClusterUpdate", + "NotifyActionNone" + ] + }, + "events": { + "description": "Describes the events happened for the notifications", + "type": "object", + "additionalProperties": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "isDone": { + "description": "Describes the \"Done\" status for the notification", + "type": "boolean", + "x-omitempty": false + }, + "isInfo": { + "description": "Describes the notification as a information", + "type": "boolean", + "x-omitempty": false + }, + "link": { + "type": "string" + } + } + }, + "v1NotificationEvent": { + "description": "Describes notification event details", + "type": "object", + "properties": { + "component": { + "description": "Describes component of notification event", + "type": "string" + }, + "digest": { + "description": "Describes notification event digest", + "type": "string" + }, + "message": { + "description": "Describes a information for the notification event", + "type": "string" + }, + "meta": { + "description": "Describes a event messages with meta digest as the key", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "type": { + "description": "Describes notification event type", + "type": "string", + "enum": [ + "NotificationPackSync", + "NotificationClusterProfileSync" + ] + } + } + }, + "v1NotificationSource": { + "description": "Describes origin info for the notification", + "type": "object", + "properties": { + "component": { + "description": "Describes component where notification originated", + "type": "string" + } + } + }, + "v1Notifications": { + "description": "Describe a list of generated notifications", + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": { + "description": "Describe a list of generated notifications", + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1Notification" + } + }, + "listmeta": { + "description": "Describes the meta information about the notification lists", + "$ref": "#/definitions/v1ListMetaData" + } + } + }, + "v1OS": { + "type": "object", + "properties": { + "family": { + "type": "string" + }, + "version": { + "type": "string" + } + } + }, + "v1ObjectEntity": { + "description": "Object identity meta", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "uid": { + "type": "string" + } + } + }, + "v1ObjectMeta": { + "description": "ObjectMeta is metadata that all persisted resources must have, which includes all objects users must create.", + "type": "object", + "properties": { + "annotations": { + "description": "Annotations is an unstructured key value map stored with a resource that may be set by external tools to store and retrieve arbitrary metadata. They are not queryable and should be preserved when modifying objects. More info: http://kubernetes.io/docs/user-guide/annotations", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "creationTimestamp": { + "description": "CreationTimestamp is a timestamp representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations. Clients may not set this value. It is represented in RFC3339 form and is in UTC.\n\nPopulated by the system. Read-only. Null for lists. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", + "$ref": "#/definitions/v1Time" + }, + "deletionTimestamp": { + "description": "DeletionTimestamp is RFC 3339 date and time at which this resource will be deleted. This field is set by the server when a graceful deletion is requested by the user, and is not directly settable by a client. The resource is expected to be deleted (no longer visible from resource lists, and not reachable by name) after the time in this field, once the finalizers list is empty. As long as the finalizers list contains items, deletion is blocked. Once the deletionTimestamp is set, this value may not be unset or be set further into the future, although it may be shortened or the resource may be deleted prior to this time. For example, a user may request that a pod is deleted in 30 seconds. The Kubelet will react by sending a graceful termination signal to the containers in the pod. After that 30 seconds, the Kubelet will send a hard termination signal (SIGKILL) to the container and after cleanup, remove the pod from the API. In the presence of network partitions, this object may still exist after this timestamp, until an administrator or automated process can determine the resource is fully terminated. If not set, graceful deletion of the object has not been requested.\n\nPopulated by the system when a graceful deletion is requested. Read-only. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", + "$ref": "#/definitions/v1Time" + }, + "labels": { + "description": "Map of string keys and values that can be used to organize and categorize (scope and select) objects. May match selectors of replication controllers and services. More info: http://kubernetes.io/docs/user-guide/labels", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "lastModifiedTimestamp": { + "description": "LastModifiedTimestamp is a timestamp representing the server time when this object was last modified. It is not guaranteed to be set in happens-before order across separate operations. Clients may not set this value. It is represented in RFC3339 form and is in UTC.\n\nPopulated by the system. Read-only. Null for lists. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", + "$ref": "#/definitions/v1Time" + }, + "name": { + "description": "Name must be unique within a namespace. Is required when creating resources, although some resources may allow a client to request the generation of an appropriate name automatically. Name is primarily intended for creation idempotence and configuration definition. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/identifiers#names", + "type": "string" + }, + "uid": { + "description": "UID is the unique in time and space value for this object. It is typically generated by the server on successful creation of a resource and is not allowed to change on PUT operations.\n\nPopulated by the system. Read-only. More info: http://kubernetes.io/docs/user-guide/identifiers#uids", + "type": "string" + } + } + }, + "v1ObjectMetaInputEntity": { + "description": "ObjectMeta input entity for object creation", + "type": "object", + "properties": { + "annotations": { + "description": "Annotations is an unstructured key value map stored with a resource that may be set by external tools to store and retrieve arbitrary metadata. They are not queryable and should be preserved when modifying objects. More info: http://kubernetes.io/docs/user-guide/annotations", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "labels": { + "description": "Map of string keys and values that can be used to organize and categorize (scope and select) objects. May match selectors of replication controllers and services. More info: http://kubernetes.io/docs/user-guide/labels", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "name": { + "description": "Name must be unique within a namespace. Is required when creating resources, although some resources may allow a client to request the generation of an appropriate name automatically. Name is primarily intended for creation idempotence and configuration definition. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/identifiers#names", + "type": "string" + } + } + }, + "v1ObjectMetaInputEntitySchema": { + "description": "Resource metadata", + "type": "object", + "required": [ + "metadata" + ], + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectMetaInputEntity" + } + } + }, + "v1ObjectMetaUpdateEntity": { + "description": "ObjectMeta update entity with uid as input", + "type": "object", + "properties": { + "annotations": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "labels": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "name": { + "type": "string" + }, + "uid": { + "type": "string" + } + } + }, + "v1ObjectReference": { + "description": "ObjectReference contains enough information to let you inspect or modify the referred object.", + "type": "object", + "properties": { + "kind": { + "description": "Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", + "type": "string" + }, + "name": { + "description": "Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names", + "type": "string" + }, + "uid": { + "description": "UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids", + "type": "string" + } + } + }, + "v1ObjectResReference": { + "description": "Object resource reference", + "type": "object", + "properties": { + "kind": { + "type": "string" + }, + "name": { + "type": "string" + }, + "projectUid": { + "type": "string" + }, + "tenantUid": { + "type": "string" + }, + "uid": { + "type": "string" + } + } + }, + "v1ObjectScopeEntity": { + "description": "Object scope identity meta", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "scope": { + "type": "string" + }, + "uid": { + "type": "string" + } + } + }, + "v1ObjectTagsEntity": { + "description": "Object identity meta with tags", + "type": "object", + "properties": { + "labels": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "name": { + "type": "string" + }, + "uid": { + "type": "string" + } + } + }, + "v1OciImageRegistry": { + "description": "Oci Image Registry", + "type": "object", + "properties": { + "baseContentPath": { + "description": "baseContentPath is the root path for the registry content", + "type": "string" + }, + "caCert": { + "type": "string" + }, + "endpoint": { + "type": "string" + }, + "insecureSkipVerify": { + "type": "boolean" + }, + "mirrorRegistries": { + "description": "mirrorRegistries contains the array of image sources like gcr.io, ghcr.io, docker.io", + "type": "string" + }, + "name": { + "type": "string" + }, + "password": { + "type": "string" + }, + "username": { + "type": "string" + } + } + }, + "v1OciRegistries": { + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1OciRegistry" + } + } + } + }, + "v1OciRegistry": { + "description": "Oci registry information", + "type": "object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/v1OciRegistrySpec" + }, + "status": { + "$ref": "#/definitions/v1OciRegistryStatusSummary" + } + } + }, + "v1OciRegistryEntity": { + "description": "Oci registry credentials", + "type": "object", + "properties": { + "auth": { + "$ref": "#/definitions/v1RegistryAuth" + }, + "defaultRegion": { + "type": "string" + }, + "endpoint": { + "type": "string" + }, + "providerType": { + "type": "string" + }, + "scope": { + "type": "string" + }, + "type": { + "type": "string" + } + } + }, + "v1OciRegistrySpec": { + "description": "Image registry spec", + "type": "object", + "properties": { + "defaultRegion": { + "type": "string" + }, + "endpoint": { + "type": "string" + }, + "isPrivate": { + "type": "boolean" + }, + "providerType": { + "type": "string" + }, + "registryType": { + "type": "string" + }, + "scope": { + "type": "string" + } + } + }, + "v1OciRegistryStatusSummary": { + "description": "OCI registry status summary", + "properties": { + "sync": { + "$ref": "#/definitions/v1RegistrySyncStatus" + } + } + }, + "v1OidcIssuerTls": { + "type": "object", + "properties": { + "caCertificateBase64": { + "type": "string", + "x-omitempty": false + }, + "insecureSkipVerify": { + "type": "boolean", + "default": false, + "x-omitempty": false + } + } + }, + "v1OpenStackAccount": { + "description": "OpenStack account information", + "type": "object", + "properties": { + "apiVersion": { + "description": "Cloud account api version", + "type": "string" + }, + "kind": { + "description": "Cloud account kind", + "type": "string" + }, + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/v1OpenStackCloudAccount" + }, + "status": { + "$ref": "#/definitions/v1CloudAccountStatus" + } + } + }, + "v1OpenStackAccounts": { + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1OpenStackAccount" + } + }, + "listmeta": { + "$ref": "#/definitions/v1ListMetaData" + } + } + }, + "v1OpenStackAz": { + "description": "OpenStack az entity", + "type": "object", + "properties": { + "name": { + "description": "Name of OpenStack az", + "type": "string" + } + } + }, + "v1OpenStackAzs": { + "description": "List of OpenStack azs", + "type": "object", + "required": [ + "azs" + ], + "properties": { + "azs": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1OpenStackAz" + } + } + } + }, + "v1OpenStackCloudAccount": { + "description": "auth-url,project,username,password,domain,cacert etc", + "type": "object", + "required": [ + "identityEndpoint", + "username", + "password" + ], + "properties": { + "caCert": { + "description": "Ca cert for OpenStack", + "type": "string" + }, + "defaultDomain": { + "description": "Default Domain name", + "type": "string" + }, + "defaultProject": { + "description": "Default Project name", + "type": "string" + }, + "identityEndpoint": { + "description": "Identity endpoint for OpenStack", + "type": "string" + }, + "insecure": { + "description": "For self signed certs in IdentityEndpoint", + "type": "boolean" + }, + "parentRegion": { + "description": "Parent region of OpenStack", + "type": "string" + }, + "password": { + "description": "Password of OpenStack account", + "type": "string" + }, + "username": { + "description": "Username of OpenStack account", + "type": "string" + } + } + }, + "v1OpenStackCloudClusterConfigEntity": { + "description": "Openstack cloud cluster config entity", + "type": "object", + "properties": { + "clusterConfig": { + "$ref": "#/definitions/v1OpenStackClusterConfig" + } + } + }, + "v1OpenStackCloudConfig": { + "description": "OpenStackCloudConfig is the Schema for the OpenStackcloudconfigs API", + "type": "object", + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + "type": "string" + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/v1OpenStackCloudConfigSpec" + }, + "status": { + "$ref": "#/definitions/v1OpenStackCloudConfigStatus" + } + } + }, + "v1OpenStackCloudConfigSpec": { + "description": "OpenStackCloudConfigSpec defines the cloud configuration input by user This will translate to clusterspec/machinespec for cluster-api", + "type": "object", + "properties": { + "cloudAccountRef": { + "description": "cloudAccountRef should point to the secret which contains OpenStackCloudAccount", + "$ref": "#/definitions/v1ObjectReference" + }, + "clusterConfig": { + "$ref": "#/definitions/v1OpenStackClusterConfig" + }, + "machinePoolConfig": { + "type": "array", + "items": { + "$ref": "#/definitions/v1OpenStackMachinePoolConfig" + } + } + } + }, + "v1OpenStackCloudConfigStatus": { + "description": "OpenStackCloudConfigStatus defines the observed state of OpenStackCloudConfig The cloudimage info built by Mold is stored here image should be mapped to a specific machinepool", + "type": "object", + "properties": { + "conditions": { + "type": "array", + "items": { + "$ref": "#/definitions/v1ClusterCondition" + } + }, + "nodeImage": { + "type": "string" + }, + "sourceImageId": { + "description": "sourceImageId, it can be from packref's annotations or from pack.json", + "type": "string" + }, + "useCapiImage": { + "type": "boolean" + } + } + }, + "v1OpenStackClusterConfig": { + "description": "Cluster level configuration for OpenStack cloud and applicable for all the machine pools", + "type": "object", + "properties": { + "bastionDisabled": { + "description": "Create bastion node option we have earlier supported creation of bastion by default", + "type": "boolean" + }, + "dnsNameservers": { + "description": "DNSNameservers is the list of nameservers for OpenStack Subnet being created. Set this value when you need create a new network/subnet while the access through DNS is required.", + "type": "array", + "items": { + "type": "string" + } + }, + "domain": { + "$ref": "#/definitions/v1OpenStackResource" + }, + "network": { + "description": "For static placement", + "$ref": "#/definitions/v1OpenStackResource" + }, + "nodeCidr": { + "description": "For dynamic provision NodeCIDR is the OpenStack Subnet to be created. Cluster actuator will create a network, a subnet with NodeCIDR, and a router connected to this subnet. If you leave this empty, no network will be created.", + "type": "string" + }, + "project": { + "$ref": "#/definitions/v1OpenStackResource" + }, + "region": { + "type": "string" + }, + "sshKeyName": { + "type": "string" + }, + "subnet": { + "$ref": "#/definitions/v1OpenStackResource" + } + } + }, + "v1OpenStackDomain": { + "description": "OpenStack domain. A Domain is a collection of projects, users, and roles", + "type": "object", + "properties": { + "description": { + "description": "Description is the description of the Domain", + "type": "string" + }, + "id": { + "description": "ID is the unique ID of the domain", + "type": "string" + }, + "name": { + "description": "Name is the name of the domain", + "type": "string" + } + } + }, + "v1OpenStackFlavor": { + "description": "OpenStack flavor entity. Flavor represent (virtual) hardware configurations for server resources", + "type": "object", + "properties": { + "disk": { + "description": "Disk is the amount of root disk, measured in GB", + "type": "integer" + }, + "ephemeral": { + "description": "Ephemeral is the amount of ephemeral disk space, measured in GB", + "type": "integer" + }, + "id": { + "description": "ID is the flavor's unique ID", + "type": "string" + }, + "memory": { + "description": "Amount of memory, measured in MB", + "type": "integer" + }, + "name": { + "description": "Name is the name of the flavor", + "type": "string" + }, + "vcpus": { + "description": "VCPUs indicates how many (virtual) CPUs are available for this flavor", + "type": "integer" + } + } + }, + "v1OpenStackFlavors": { + "description": "List of OpenStack flavours", + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1OpenStackFlavor" + } + } + } + }, + "v1OpenStackKeypair": { + "description": "OpenStack keypair. KeyPair is an SSH key known to the OpenStack Cloud that is available to be injected into servers", + "type": "object", + "properties": { + "name": { + "description": "Name is used to refer to this keypair from other services within this region", + "type": "string" + }, + "publicKey": { + "description": "PublicKey is the public key from this pair, in OpenSSH format", + "type": "string" + } + } + }, + "v1OpenStackKeypairs": { + "description": "List of OpenStack keypairs", + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1OpenStackKeypair" + } + } + } + }, + "v1OpenStackMachine": { + "description": "OpenStack cloud VM definition", + "type": "object", + "properties": { + "apiVersion": { + "type": "string" + }, + "kind": { + "type": "string" + }, + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/v1OpenStackMachineSpec" + }, + "status": { + "$ref": "#/definitions/v1CloudMachineStatus" + } + } + }, + "v1OpenStackMachineConfigEntity": { + "type": "object", + "required": [ + "flavorConfig" + ], + "properties": { + "azs": { + "description": "for control plane pool, this will be the failure domains for kcp", + "type": "array", + "items": { + "type": "string" + } + }, + "flavorConfig": { + "$ref": "#/definitions/v1OpenstackFlavorConfig" + } + } + }, + "v1OpenStackMachinePoolCloudConfigEntity": { + "type": "object", + "required": [ + "flavorConfig" + ], + "properties": { + "azs": { + "description": "for control plane pool, this will be the failure domains for kcp", + "type": "array", + "items": { + "type": "string" + } + }, + "diskGiB": { + "description": "Root disk size", + "type": "integer", + "format": "int32" + }, + "flavorConfig": { + "$ref": "#/definitions/v1OpenstackFlavorConfig" + }, + "subnet": { + "$ref": "#/definitions/v1OpenStackResource" + } + } + }, + "v1OpenStackMachinePoolConfig": { + "type": "object", + "required": [ + "flavorConfig" + ], + "properties": { + "additionalLabels": { + "description": "additionalLabels", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "additionalTags": { + "description": "AdditionalTags is an optional set of tags to add to resources managed by the provider, in addition to the ones added by default. For eg., tags for EKS nodeGroup or EKS NodegroupIAMRole", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "azs": { + "description": "for control plane pool, this will be the failure domains for kcp", + "type": "array", + "items": { + "type": "string" + } + }, + "diskGiB": { + "description": "DiskGiB is used to configure rootVolume, the volume metadata to boot from", + "type": "integer", + "format": "int32" + }, + "flavor": { + "description": "Openstack flavor name, only return argument", + "type": "string" + }, + "flavorConfig": { + "description": "Openstack flavor configuration, input argument", + "$ref": "#/definitions/v1OpenstackFlavorConfig" + }, + "image": { + "type": "string" + }, + "isControlPlane": { + "description": "whether this pool is for control plane", + "type": "boolean" + }, + "labels": { + "description": "labels for this pool, example: control-plane/worker, gpu, windows", + "type": "array", + "items": { + "type": "string" + } + }, + "machinePoolProperties": { + "$ref": "#/definitions/v1MachinePoolProperties" + }, + "maxSize": { + "description": "max size of the pool, for scaling", + "type": "integer", + "format": "int32" + }, + "minSize": { + "description": "min size of the pool, for scaling", + "type": "integer", + "format": "int32" + }, + "name": { + "type": "string" + }, + "nodeRepaveInterval": { + "description": "Minimum number of seconds a node should be Ready, before the next node is selected for repave. Applicable only for workerpools in infrastructure cluster", + "type": "integer", + "format": "int32" + }, + "size": { + "description": "size of the pool, number of machines", + "type": "integer", + "format": "int32" + }, + "subnet": { + "$ref": "#/definitions/v1OpenStackResource" + }, + "taints": { + "description": "control plane or worker taints", + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1Taint" + } + }, + "updateStrategy": { + "description": "rolling update strategy for this machinepool if not specified, will use ScaleOut", + "$ref": "#/definitions/v1UpdateStrategy" + }, + "useControlPlaneAsWorker": { + "description": "if IsControlPlane==true \u0026\u0026 useControlPlaneAsWorker==true, then will remove control plane taint this will not be used for worker pools", + "type": "boolean" + } + } + }, + "v1OpenStackMachinePoolConfigEntity": { + "type": "object", + "required": [ + "cloudConfig" + ], + "properties": { + "cloudConfig": { + "$ref": "#/definitions/v1OpenStackMachinePoolCloudConfigEntity" + }, + "poolConfig": { + "$ref": "#/definitions/v1MachinePoolConfigEntity" + } + } + }, + "v1OpenStackMachineSpec": { + "description": "OpenStack cloud VM definition spec", + "type": "object", + "required": [ + "instanceType", + "nics" + ], + "properties": { + "az": { + "type": "string" + }, + "image": { + "type": "string" + }, + "instanceType": { + "description": "Instance flavor of the machine with cpu and memory info", + "$ref": "#/definitions/v1GenericInstanceType" + }, + "nics": { + "type": "array", + "items": { + "$ref": "#/definitions/v1OpenStackNic" + } + }, + "projectId": { + "type": "string" + }, + "securityGroups": { + "type": "array", + "items": { + "type": "string" + } + }, + "sshKeyName": { + "type": "string" + } + } + }, + "v1OpenStackMachines": { + "description": "OpenStack machine list", + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1OpenStackMachine" + } + } + } + }, + "v1OpenStackNetwork": { + "description": "OpenStack network", + "type": "object", + "properties": { + "description": { + "description": "Description of OpenStack network", + "type": "string" + }, + "id": { + "description": "Id of OpenStack network", + "type": "string" + }, + "name": { + "description": "Name of OpenStack network", + "type": "string" + }, + "subnets": { + "description": "Subnets associated with OpenStack network", + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1OpenStackSubnet" + } + } + } + }, + "v1OpenStackNetworks": { + "description": "List of OpenStack networks", + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1OpenStackNetwork" + } + } + } + }, + "v1OpenStackNic": { + "description": "OpenStack network interface", + "type": "object", + "required": [ + "networkName" + ], + "properties": { + "index": { + "type": "integer", + "format": "int8" + }, + "networkName": { + "type": "string" + }, + "privateIPs": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "v1OpenStackProject": { + "description": "Project represents an OpenStack Identity Project", + "type": "object", + "properties": { + "description": { + "description": "Description is the description of the project", + "type": "string" + }, + "domainId": { + "description": "DomainID is the domain ID the project belongs to", + "type": "string" + }, + "id": { + "description": "ID is the unique ID of the project", + "type": "string" + }, + "name": { + "description": "Name is the name of the project", + "type": "string" + }, + "parentProjectId": { + "description": "ParentID is the parent_id of the project", + "type": "string" + } + } + }, + "v1OpenStackProjects": { + "description": "Array of OpenStack projects", + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1OpenStackProject" + } + } + } + }, + "v1OpenStackRegion": { + "description": "OpenStack region entity", + "type": "object", + "properties": { + "description": { + "description": "Description of OpenStack region", + "type": "string" + }, + "id": { + "description": "Id of OpenStack region", + "type": "string" + }, + "parentRegionId": { + "description": "Parent region id of OpenStack region", + "type": "string" + } + } + }, + "v1OpenStackRegions": { + "description": "List of OpenStack regions and domains", + "type": "object", + "required": [ + "regions", + "domains" + ], + "properties": { + "domains": { + "description": "List of OpenStack domains", + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1OpenStackDomain" + } + }, + "regions": { + "description": "List of OpenStack regions", + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1OpenStackRegion" + } + } + } + }, + "v1OpenStackResource": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + } + }, + "v1OpenStackSubnet": { + "description": "OpenStack subnet entity", + "type": "object", + "properties": { + "description": { + "description": "Description for the network", + "type": "string" + }, + "id": { + "description": "UUID for the network", + "type": "string" + }, + "name": { + "description": "Human-readable name for the network. Might not be unique", + "type": "string" + } + } + }, + "v1OpenstackFlavorConfig": { + "required": [ + "name" + ], + "properties": { + "diskGiB": { + "description": "DiskGiB is the size of a virtual machine's disk, in GiB.", + "type": "integer", + "format": "int32" + }, + "memoryMiB": { + "description": "MemoryMiB is the size of a virtual machine's memory, in MiB.", + "type": "integer", + "format": "int64" + }, + "name": { + "description": "Openstack flavor name", + "type": "string" + }, + "numCPUs": { + "description": "NumCPUs is the number of virtual processors in a virtual machine.", + "type": "integer", + "format": "int32" + } + } + }, + "v1Organization": { + "description": "Describes user's organization details", + "type": "object", + "properties": { + "authType": { + "description": "Describes user's enabled authorization mode", + "type": "string" + }, + "name": { + "description": "Describes user's organization name", + "type": "string" + }, + "redirectUrl": { + "description": "Describes user's organization authentication url", + "type": "string" + }, + "ssoLogins": { + "description": "Describes a list of allowed social logins for the organization", + "$ref": "#/definitions/v1SsoLogins" + } + } + }, + "v1Organizations": { + "description": "Returns a list of user's organizations details and login methods", + "type": "object", + "properties": { + "organizations": { + "description": "Describes a list of user's organization", + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1Organization" + } + } + } + }, + "v1OsPatchConfig": { + "type": "object", + "properties": { + "onDemandPatchAfter": { + "description": "OnDemandPatchAfter is the desired time for one time on-demand patch", + "$ref": "#/definitions/v1Time" + }, + "patchOnBoot": { + "description": "PatchOnBoot indicates need to do patch when node first boot up, only once", + "type": "boolean", + "x-omitempty": false + }, + "rebootIfRequired": { + "description": "Reboot once the OS patch is applied", + "type": "boolean", + "x-omitempty": false + }, + "schedule": { + "description": "The schedule at which security patches will be applied to OS. Schedule should be in Cron format, see https://en.wikipedia.org/wiki/Cron for more help.", + "type": "string" + } + } + }, + "v1OsPatchEntity": { + "type": "object", + "properties": { + "osPatchConfig": { + "$ref": "#/definitions/v1OsPatchConfig" + } + } + }, + "v1OsType": { + "type": "string", + "default": "Linux", + "enum": [ + "Linux", + "Windows" + ] + }, + "v1OverloadSpec": { + "description": "Overload spec", + "type": "object", + "properties": { + "cloudAccountUid": { + "type": "string", + "x-omitempty": false + }, + "ipAddress": { + "type": "string" + }, + "ipPools": { + "type": "array", + "items": { + "$ref": "#/definitions/v1IpPoolEntity" + } + }, + "isSelfHosted": { + "type": "boolean" + }, + "isSystem": { + "type": "boolean" + }, + "spectroClusterUid": { + "type": "string", + "x-omitempty": false + }, + "tenantUid": { + "type": "string" + } + } + }, + "v1OverloadStatus": { + "description": "Overload status", + "type": "object", + "properties": { + "health": { + "$ref": "#/definitions/v1SpectroClusterHealthStatus" + }, + "isActive": { + "type": "boolean", + "x-omitempty": false + }, + "isReady": { + "type": "boolean", + "x-omitempty": false + }, + "kubectlCommands": { + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + } + }, + "notifications": { + "$ref": "#/definitions/v1ClusterNotificationStatus" + }, + "state": { + "type": "string" + } + } + }, + "v1OverloadVsphereOva": { + "description": "Overload ova details", + "type": "object", + "properties": { + "location": { + "type": "string", + "x-omitempty": false + } + } + }, + "v1Overlord": { + "description": "Overlord defintiion", + "type": "object", + "properties": { + "kind": { + "type": "string" + }, + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/v1OverloadSpec" + }, + "status": { + "$ref": "#/definitions/v1OverloadStatus" + } + } + }, + "v1OverlordMaasAccountCreate": { + "properties": { + "account": { + "$ref": "#/definitions/v1MaasCloudAccount" + }, + "name": { + "description": "Name for the private gateway \u0026 cloud account", + "type": "string" + }, + "shareWithProjects": { + "type": "boolean", + "x-omitempty": false + } + } + }, + "v1OverlordMaasAccountEntity": { + "properties": { + "account": { + "$ref": "#/definitions/v1MaasCloudAccount" + }, + "shareWithProjects": { + "type": "boolean", + "x-omitempty": false + } + } + }, + "v1OverlordMaasCloudConfig": { + "properties": { + "clusterConfig": { + "$ref": "#/definitions/v1MaasClusterConfig" + }, + "clusterProfiles": { + "description": "Cluster profiles pack configuration for private gateway cluster", + "type": "array", + "items": { + "$ref": "#/definitions/v1SpectroClusterProfileEntity" + } + }, + "clusterSettings": { + "description": "clusterSettings is the generic configuration related to a cluster like OS patch, Rbac, Namespace allocation", + "$ref": "#/definitions/v1ClusterConfigEntity" + }, + "machineConfig": { + "$ref": "#/definitions/v1MaasMachineConfigEntity" + }, + "size": { + "description": "size of the pool, number of machines", + "type": "integer", + "format": "int32" + } + } + }, + "v1OverlordManifest": { + "description": "overlord manifest", + "type": "object", + "properties": { + "manifest": { + "type": "string" + } + } + }, + "v1OverlordMigrateEntity": { + "properties": { + "sourceUid": { + "type": "string" + }, + "targetUid": { + "type": "string" + } + } + }, + "v1OverlordOpenStackAccountCreate": { + "properties": { + "account": { + "$ref": "#/definitions/v1OpenStackCloudAccount" + }, + "name": { + "description": "Name for the private gateway \u0026 cloud account", + "type": "string" + }, + "shareWithProjects": { + "type": "boolean", + "x-omitempty": false + } + } + }, + "v1OverlordOpenStackAccountEntity": { + "properties": { + "account": { + "$ref": "#/definitions/v1OpenStackCloudAccount" + }, + "shareWithProjects": { + "type": "boolean", + "x-omitempty": false + } + } + }, + "v1OverlordOpenStackCloudConfig": { + "properties": { + "clusterConfig": { + "$ref": "#/definitions/v1OpenStackClusterConfig" + }, + "clusterProfiles": { + "description": "Cluster profiles pack configuration for private gateway cluster", + "type": "array", + "items": { + "$ref": "#/definitions/v1SpectroClusterProfileEntity" + } + }, + "clusterSettings": { + "description": "clusterSettings is the generic configuration related to a cluster like OS patch, Rbac, Namespace allocation", + "$ref": "#/definitions/v1ClusterConfigEntity" + }, + "machineConfig": { + "$ref": "#/definitions/v1OpenStackMachineConfigEntity" + }, + "size": { + "description": "size of the pool, number of machines", + "type": "integer", + "format": "int32" + } + } + }, + "v1OverlordVsphereAccountCreate": { + "properties": { + "account": { + "$ref": "#/definitions/v1VsphereCloudAccount" + }, + "name": { + "description": "Name for the private gateway \u0026 cloud account", + "type": "string" + }, + "shareWithProjects": { + "type": "boolean", + "x-omitempty": false + } + } + }, + "v1OverlordVsphereAccountEntity": { + "properties": { + "account": { + "$ref": "#/definitions/v1VsphereCloudAccount" + }, + "shareWithProjects": { + "type": "boolean", + "x-omitempty": false + } + } + }, + "v1OverlordVsphereCloudConfig": { + "properties": { + "clusterConfig": { + "$ref": "#/definitions/v1VsphereOverlordClusterConfigEntity" + }, + "clusterProfiles": { + "description": "Cluster profiles pack configuration for private gateway cluster", + "type": "array", + "items": { + "$ref": "#/definitions/v1SpectroClusterProfileEntity" + } + }, + "clusterSettings": { + "description": "clusterSettings is the generic configuration related to a cluster like OS patch, Rbac, Namespace allocation", + "$ref": "#/definitions/v1ClusterConfigEntity" + }, + "size": { + "description": "size of the pool, number of machines", + "type": "integer", + "format": "int32" + } + } + }, + "v1Overlords": { + "description": "Array of Overlords", + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1Overlord" + } + } + } + }, + "v1PackConfig": { + "description": "Pack configuration", + "type": "object", + "properties": { + "spec": { + "$ref": "#/definitions/v1PackConfigSpec" + } + } + }, + "v1PackConfigSpec": { + "type": "object", + "properties": { + "associatedObject": { + "type": "string" + }, + "isValuesOverridden": { + "type": "boolean", + "x-omitempty": false + }, + "manifests": { + "type": "array", + "items": { + "$ref": "#/definitions/v1PackManifestRef" + } + }, + "name": { + "type": "string" + }, + "packUid": { + "type": "string" + }, + "scope": { + "type": "string" + }, + "tag": { + "type": "string" + }, + "type": { + "type": "string" + }, + "values": { + "type": "string" + }, + "version": { + "type": "string" + } + } + }, + "v1PackDependency": { + "description": "Pack template dependency", + "type": "object", + "properties": { + "layer": { + "description": "Pack template dependency pack layer", + "type": "string" + }, + "name": { + "description": "Pack template dependency pack name", + "type": "string" + }, + "readOnly": { + "description": "If true then dependency pack values can't be overridden", + "type": "boolean" + } + } + }, + "v1PackDependencyMeta": { + "description": "Pack dependency metadata", + "type": "object", + "properties": { + "displayName": { + "description": "Pack display name", + "type": "string" + }, + "logoUrl": { + "description": "Pack logo url", + "type": "string" + }, + "name": { + "description": "Pack name", + "type": "string" + }, + "registryUid": { + "description": "Pack registry uid", + "type": "string" + }, + "uid": { + "description": "Pack uid", + "type": "string" + }, + "version": { + "description": "Pack version", + "type": "string" + } + } + }, + "v1PackEntity": { + "description": "Pack object", + "type": "object", + "required": [ + "uid", + "name" + ], + "properties": { + "layer": { + "description": "Pack layer", + "type": "string" + }, + "name": { + "description": "Pack name", + "type": "string" + }, + "tag": { + "description": "Pack tag", + "type": "string" + }, + "type": { + "$ref": "#/definitions/v1PackType" + }, + "uid": { + "description": "Pack uid", + "type": "string" + }, + "values": { + "description": "values represents the values.yaml used as input parameters either Params OR Values should be used, not both If both applied at the same time, will only use Values", + "type": "string" + } + } + }, + "v1PackFilterSpec": { + "description": "Packs filter spec", + "properties": { + "addOnSubType": { + "description": "Pack add-on sub type such as monitoring, db etc", + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + } + }, + "addOnType": { + "description": "Pack add-on type such as logging, monitoring, security etc", + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + } + }, + "displayName": { + "$ref": "#/definitions/v1FilterString" + }, + "environment": { + "description": "Pack supported cloud types", + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + } + }, + "isFips": { + "description": "isFips compliant", + "type": "boolean" + }, + "layer": { + "description": "Pack layer", + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1PackLayer" + } + }, + "name": { + "$ref": "#/definitions/v1FilterString" + }, + "registryUid": { + "description": "Pack registry uid", + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + } + }, + "source": { + "description": "The source filter describes the creation origin/source of the pack. Ex. source can be \"spectrocloud\" or \"community\"", + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + } + }, + "state": { + "description": "Pack state such as deprecated or disabled", + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + } + }, + "type": { + "description": "Pack type", + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1PackType" + } + } + } + }, + "v1PackImportEntity": { + "description": "Pack import request payload", + "type": "object", + "properties": { + "layer": { + "description": "Pack layer [ \"os\", \"k8s\", \"cni\", \"csi\", \"addon\" ]", + "type": "string" + }, + "manifests": { + "description": "Pack manifests array", + "type": "array", + "items": { + "$ref": "#/definitions/v1PackManifestImportEntity" + } + }, + "name": { + "description": "Pack name", + "type": "string" + }, + "registry": { + "$ref": "#/definitions/v1PackRegistryImportEntity" + }, + "tag": { + "description": "Pack version tag", + "type": "string" + }, + "type": { + "description": "Pack type [ \"spectro\", \"helm\", \"manifest\", \"oci\" ]", + "type": "string" + }, + "values": { + "description": "Pack values are the customizable configurations for the pack", + "type": "string" + }, + "version": { + "description": "Pack version", + "type": "string" + } + } + }, + "v1PackInputEntity": { + "description": "Pack request payload", + "properties": { + "pack": { + "$ref": "#/definitions/v1PackManifestEntity" + } + } + }, + "v1PackLayer": { + "type": "string", + "enum": [ + "kernel", + "os", + "k8s", + "cni", + "csi", + "addon" + ] + }, + "v1PackManifestEntity": { + "description": "Pack request payload", + "type": "object", + "required": [ + "name" + ], + "properties": { + "layer": { + "description": "Pack layer", + "type": "string" + }, + "manifests": { + "description": "Pack manifests are additional content as part of the profile", + "type": "array", + "items": { + "$ref": "#/definitions/v1ManifestInputEntity" + } + }, + "name": { + "description": "Pack name", + "type": "string" + }, + "registryUid": { + "description": "Pack registry uid", + "type": "string" + }, + "tag": { + "description": "Pack tag", + "type": "string" + }, + "type": { + "$ref": "#/definitions/v1PackType" + }, + "uid": { + "description": "Pack uid", + "type": "string" + }, + "values": { + "description": "Pack values represents the values.yaml used as input parameters either Params OR Values should be used, not both If both applied at the same time, will only use Values", + "type": "string" + } + } + }, + "v1PackManifestImportEntity": { + "description": "Pack manifest import objct", + "type": "object", + "properties": { + "content": { + "description": "Pack manifest content in yaml", + "type": "string" + }, + "name": { + "description": "Pack manifest name", + "type": "string" + } + } + }, + "v1PackManifestRef": { + "type": "object", + "properties": { + "digest": { + "type": "string" + }, + "isOverridden": { + "type": "boolean", + "x-omitempty": false + }, + "name": { + "type": "string" + }, + "parentUid": { + "type": "string" + }, + "uid": { + "type": "string" + } + } + }, + "v1PackManifestUpdateEntity": { + "description": "Pack input entity with values to overwrite and manifests for the intial creation", + "type": "object", + "required": [ + "name" + ], + "properties": { + "layer": { + "description": "Pack layer", + "type": "string" + }, + "manifests": { + "description": "Pack manifests are additional content as part of the profile", + "type": "array", + "items": { + "$ref": "#/definitions/v1ManifestRefUpdateEntity" + } + }, + "name": { + "description": "Pack name", + "type": "string" + }, + "registryUid": { + "description": "Pack registry uid", + "type": "string" + }, + "tag": { + "description": "Pack tag", + "type": "string" + }, + "type": { + "$ref": "#/definitions/v1PackType" + }, + "uid": { + "description": "Pack uid", + "type": "string" + }, + "values": { + "description": "Pack values represents the values.yaml used as input parameters either Params OR Values should be used, not both If both applied at the same time, will only use Values", + "type": "string" + } + } + }, + "v1PackManifests": { + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": { + "description": "Manifests array", + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1Manifest" + } + } + } + }, + "v1PackManifestsSpec": { + "description": "Pack manifests spec", + "type": "object", + "properties": { + "addonType": { + "description": "Pack add-on type such as logging, monitoring, security etc", + "type": "string" + }, + "annotations": { + "description": "Pack annotations is used to allow pack to add more arbitrary configurations", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "cloudTypes": { + "description": "Pack supported cloud types", + "type": "array", + "items": { + "type": "string" + } + }, + "digest": { + "description": "Pack digest", + "type": "string" + }, + "displayName": { + "description": "Pack display name", + "type": "string" + }, + "eol": { + "description": "Pack end of life, date format: yyyy-MM-dd", + "type": "string" + }, + "group": { + "description": "Pack group", + "type": "string" + }, + "layer": { + "$ref": "#/definitions/v1PackLayer" + }, + "logoUrl": { + "description": "Pack logo url", + "type": "string" + }, + "manifests": { + "description": "Pack manifests are additional content as part of the cluster profile", + "type": "array", + "items": { + "$ref": "#/definitions/v1ManifestSummary" + } + }, + "name": { + "description": "Pack name", + "type": "string" + }, + "presets": { + "description": "Pack presets are the set of configurations applied on user selection of presets", + "type": "array", + "items": { + "$ref": "#/definitions/v1PackPreset" + } + }, + "registryUid": { + "description": "Pack registry uid", + "type": "string" + }, + "schema": { + "description": "Pack schema contains constraints such as data type, format, hints for the pack values", + "type": "array", + "items": { + "$ref": "#/definitions/v1PackSchema" + } + }, + "type": { + "$ref": "#/definitions/v1PackType" + }, + "values": { + "description": "Pack values", + "type": "string" + }, + "version": { + "description": "Pack version", + "type": "string" + } + } + }, + "v1PackMetadata": { + "description": "Pack metadata object", + "type": "object", + "properties": { + "apiVersion": { + "description": "Pack api version", + "type": "string" + }, + "kind": { + "description": "Pack kind", + "type": "string" + }, + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/v1PackMetadataSpec" + } + } + }, + "v1PackMetadataList": { + "description": "List of packs metadata", + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": { + "description": "Packs metadata array", + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1PackMetadata" + } + }, + "listmeta": { + "$ref": "#/definitions/v1ListMetaData" + } + } + }, + "v1PackMetadataSpec": { + "description": "Pack metadata spec", + "type": "object", + "properties": { + "addonSubType": { + "description": "Pack add-on sub type such as monitoring, db etc", + "type": "string" + }, + "addonType": { + "description": "Pack add-on type such as logging, monitoring, security etc", + "type": "string" + }, + "cloudTypes": { + "description": "Pack supported cloud types", + "type": "array", + "items": { + "type": "string" + } + }, + "displayName": { + "description": "Pack display name", + "type": "string" + }, + "group": { + "description": "Pack group", + "type": "string" + }, + "layer": { + "$ref": "#/definitions/v1PackLayer" + }, + "name": { + "description": "Pack name", + "type": "string" + }, + "registries": { + "description": "Pack registries array", + "type": "array", + "items": { + "$ref": "#/definitions/v1RegistryPackMetadata" + } + }, + "type": { + "$ref": "#/definitions/v1PackType" + } + } + }, + "v1PackParamsEntity": { + "description": "Pack params request payload", + "properties": { + "references": { + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + } + } + } + }, + "v1PackPreset": { + "description": "PackPreset defines the preset pack values", + "type": "object", + "properties": { + "add": { + "type": "string", + "x-omitempty": false + }, + "displayName": { + "type": "string", + "x-omitempty": false + }, + "group": { + "type": "string", + "x-omitempty": false + }, + "name": { + "type": "string", + "x-omitempty": false + }, + "remove": { + "type": "array", + "items": { + "type": "string" + }, + "x-omitempty": false + } + } + }, + "v1PackReadme": { + "properties": { + "readme": { + "description": "Readme describes the documentation of the specified pack", + "type": "string" + } + } + }, + "v1PackRef": { + "description": "PackRef server/name:tag to point to a pack PackRef is used when construct a ClusterProfile PackSpec is used for UI to render the parameters form ClusterProfile will not know inner details of a pack ClusterProfile only contain pack name:tag, and the param values user entered for it", + "type": "object", + "required": [ + "layer", + "name" + ], + "properties": { + "annotations": { + "description": "Annotations is used to allow packref to add more arbitrary information one example is to add git reference for values.yaml", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "digest": { + "description": "digest is used to specify the version should be installed by palette when pack upgrade available, change this digest to trigger upgrade", + "type": "string" + }, + "inValidReason": { + "type": "string" + }, + "isInvalid": { + "description": "pack is invalid when the associated tag is deleted from the registry", + "type": "boolean" + }, + "layer": { + "type": "string", + "enum": [ + "kernel", + "os", + "k8s", + "cni", + "csi", + "addon" + ] + }, + "logo": { + "description": "path to the pack logo", + "type": "string" + }, + "manifests": { + "type": "array", + "items": { + "$ref": "#/definitions/v1ObjectReference" + } + }, + "name": { + "description": "pack name", + "type": "string" + }, + "packUid": { + "description": "PackUID is Hubble packUID, not palette Pack.UID It is used by Hubble only.", + "type": "string" + }, + "params": { + "description": "params passed as env variables to be consumed at installation time", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "presets": { + "type": "array", + "items": { + "$ref": "#/definitions/v1PackPreset" + } + }, + "registryUid": { + "description": "pack registry uid", + "type": "string" + }, + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/v1PackSchema" + } + }, + "server": { + "description": "pack registry server or helm repo", + "type": "string" + }, + "tag": { + "description": "pack tag", + "type": "string" + }, + "type": { + "description": "type of the pack", + "type": "string", + "enum": [ + "spectro", + "helm", + "manifest" + ] + }, + "values": { + "description": "values represents the values.yaml used as input parameters either Params OR Values should be used, not both If both applied at the same time, will only use Values", + "type": "string" + }, + "version": { + "description": "pack version", + "type": "string" + } + } + }, + "v1PackRefSummary": { + "description": "Pack ref summary", + "properties": { + "addonType": { + "type": "string" + }, + "annotations": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "displayName": { + "type": "string" + }, + "layer": { + "$ref": "#/definitions/v1PackLayer" + }, + "logoUrl": { + "type": "string" + }, + "name": { + "type": "string" + }, + "packUid": { + "type": "string" + }, + "tag": { + "type": "string" + }, + "type": { + "type": "string" + }, + "version": { + "type": "string" + } + } + }, + "v1PackRefSummaryResponse": { + "description": "Pack summary response", + "type": "object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/v1PackRefSummarySpec" + } + } + }, + "v1PackRefSummarySpec": { + "description": "Pack summary spec", + "properties": { + "macros": { + "$ref": "#/definitions/v1PackResolvedValues" + }, + "pack": { + "$ref": "#/definitions/v1PackSummarySpec" + }, + "registry": { + "$ref": "#/definitions/v1RegistryMetadata" + } + } + }, + "v1PackRegistries": { + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1PackRegistry" + } + }, + "listmeta": { + "$ref": "#/definitions/v1ListMetaData" + } + } + }, + "v1PackRegistriesSummary": { + "description": "Pack Registries Summary", + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1PackRegistrySummary" + } + }, + "listmeta": { + "$ref": "#/definitions/v1ListMetaData" + } + } + }, + "v1PackRegistry": { + "description": "Pack registry information", + "type": "object", + "properties": { + "apiVersion": { + "type": "string" + }, + "kind": { + "type": "string" + }, + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/v1PackRegistrySpec" + }, + "status": { + "$ref": "#/definitions/v1PackRegistryStatus" + } + } + }, + "v1PackRegistryImportEntity": { + "description": "Pack registry import entity", + "type": "object", + "properties": { + "matchingRegistries": { + "type": "array", + "items": { + "$ref": "#/definitions/v1PackRegistryMetadata" + } + }, + "metadata": { + "$ref": "#/definitions/v1PackRegistryMetadata" + } + } + }, + "v1PackRegistryMetadata": { + "description": "Pack registry metadata", + "type": "object", + "properties": { + "isPrivate": { + "description": "If true then pack registry is private and is not accessible for the pack sync", + "type": "boolean", + "x-omitempty": false + }, + "kind": { + "description": "Pack registry kind [ \"pack\", \"helm\", \"oci\" ]", + "type": "string" + }, + "name": { + "description": "Pack registry name", + "type": "string" + }, + "providerType": { + "description": "OCI registry provider type [ \"helm\", \"pack\", \"zarf\" ]", + "type": "string" + }, + "uid": { + "description": "Pack registry uid", + "type": "string" + } + } + }, + "v1PackRegistrySpec": { + "description": "Pack registry credentials spec", + "type": "object", + "required": [ + "endpoint", + "auth" + ], + "properties": { + "auth": { + "$ref": "#/definitions/v1RegistryAuth" + }, + "endpoint": { + "type": "string" + }, + "name": { + "type": "string" + }, + "private": { + "type": "boolean", + "x-omitempty": false + }, + "registryUid": { + "description": "Pack registry uid", + "type": "string" + }, + "scope": { + "type": "string" + } + } + }, + "v1PackRegistrySpecSummary": { + "description": "Pack Registry spec summary", + "type": "object", + "properties": { + "endpoint": { + "type": "string" + }, + "private": { + "type": "boolean", + "x-omitempty": false + }, + "scope": { + "type": "string" + } + } + }, + "v1PackRegistryStatus": { + "description": "Status of the pack registry", + "type": "object", + "properties": { + "packSyncStatus": { + "$ref": "#/definitions/v1RegistrySyncStatus" + } + } + }, + "v1PackRegistryStatusSummary": { + "description": "Pack registry status summary", + "type": "object", + "properties": { + "sync": { + "$ref": "#/definitions/v1RegistrySyncStatus" + } + } + }, + "v1PackRegistrySummary": { + "description": "Pack Registry summary", + "type": "object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/v1PackRegistrySpecSummary" + }, + "status": { + "$ref": "#/definitions/v1PackRegistryStatusSummary" + } + } + }, + "v1PackResolvedValues": { + "description": "Pack resolved values", + "properties": { + "resolved": { + "description": "Pack resolved values map", + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + }, + "v1PackSchema": { + "description": "PackSchema defines the schema definition, hints for the pack values", + "type": "object", + "properties": { + "format": { + "type": "string", + "x-omitempty": false + }, + "hints": { + "type": "array", + "items": { + "type": "string" + }, + "x-omitempty": false + }, + "listOptions": { + "type": "array", + "items": { + "type": "string" + }, + "x-omitempty": false + }, + "name": { + "type": "string", + "x-omitempty": false + }, + "readonly": { + "type": "boolean", + "x-omitempty": false + }, + "regex": { + "type": "string", + "x-omitempty": false + }, + "required": { + "type": "boolean", + "x-omitempty": false + }, + "type": { + "type": "string", + "x-omitempty": false + } + } + }, + "v1PackSortFields": { + "description": "Packs sort by fields", + "type": "string", + "enum": [ + "name", + "type", + "layer", + "addOnType", + "displayName" + ], + "x-nullable": true + }, + "v1PackSortSpec": { + "description": "Packs sort spec", + "properties": { + "field": { + "$ref": "#/definitions/v1PackSortFields" + }, + "order": { + "$ref": "#/definitions/v1SortOrder" + } + } + }, + "v1PackSummaries": { + "description": "List of packs", + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": { + "description": "Packs array", + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1PackSummary" + } + }, + "listmeta": { + "$ref": "#/definitions/v1ListMetaData" + } + } + }, + "v1PackSummary": { + "description": "Pack summary object", + "type": "object", + "properties": { + "apiVersion": { + "description": "Pack api version", + "type": "string" + }, + "kind": { + "description": "Pack kind", + "type": "string" + }, + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/v1PackSummarySpec" + }, + "status": { + "$ref": "#/definitions/v1PackSummaryStatus" + } + } + }, + "v1PackSummarySpec": { + "description": "Pack object", + "type": "object", + "properties": { + "addonSubType": { + "description": "Pack add-on sub type such as monitoring, db etc", + "type": "string" + }, + "addonType": { + "description": "Pack add-on type such as logging, monitoring, security etc", + "type": "string" + }, + "annotations": { + "description": "Pack annotations is used to allow pack to add more arbitrary configurations", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "cloudTypes": { + "description": "Pack supported cloud types", + "type": "array", + "items": { + "type": "string" + } + }, + "digest": { + "description": "Pack digest", + "type": "string" + }, + "displayName": { + "description": "Pack display name", + "type": "string" + }, + "eol": { + "description": "Pack end of life, date format: yyyy-MM-dd", + "type": "string" + }, + "group": { + "description": "Pack group", + "type": "string" + }, + "layer": { + "$ref": "#/definitions/v1PackLayer" + }, + "logoUrl": { + "description": "Pack logo url", + "type": "string" + }, + "manifests": { + "description": "Pack manifests are additional content as part of the cluster profile", + "type": "array", + "items": { + "$ref": "#/definitions/v1ObjectReference" + } + }, + "name": { + "description": "Pack name", + "type": "string" + }, + "presets": { + "description": "Pack presets are the set of configurations applied on user selection of presets", + "type": "array", + "items": { + "$ref": "#/definitions/v1PackPreset" + } + }, + "registryUid": { + "description": "Pack registry uid", + "type": "string" + }, + "schema": { + "description": "Pack schema contains constraints such as data type, format, hints for the pack values", + "type": "array", + "items": { + "$ref": "#/definitions/v1PackSchema" + } + }, + "template": { + "$ref": "#/definitions/v1PackTemplate" + }, + "type": { + "$ref": "#/definitions/v1PackType" + }, + "values": { + "description": "Pack values", + "type": "string" + }, + "version": { + "description": "Pack version", + "type": "string" + } + } + }, + "v1PackSummaryStatus": { + "description": "Pack status", + "type": "object" + }, + "v1PackTagEntity": { + "description": "Pack object", + "type": "object", + "properties": { + "addonSubType": { + "description": "Pack add-on sub type such as monitoring, db etc", + "type": "string" + }, + "addonType": { + "description": "Pack add-on type such as logging, monitoring, security etc", + "type": "string" + }, + "cloudTypes": { + "description": "Pack supported cloud types", + "type": "array", + "items": { + "type": "string" + } + }, + "displayName": { + "description": "Pack display name", + "type": "string" + }, + "layer": { + "$ref": "#/definitions/v1PackLayer" + }, + "logoUrl": { + "description": "Pack logo url", + "type": "string" + }, + "name": { + "description": "Pack name", + "type": "string" + }, + "packValues": { + "description": "Pack values array", + "type": "array", + "items": { + "$ref": "#/definitions/v1PackUidValues" + } + }, + "registryUid": { + "description": "Pack registry uid", + "type": "string" + }, + "tags": { + "description": "Pack version tags array", + "type": "array", + "items": { + "$ref": "#/definitions/v1PackTags" + } + } + } + }, + "v1PackTags": { + "type": "object", + "properties": { + "group": { + "description": "Pack group", + "type": "string" + }, + "packUid": { + "description": "Pack uid", + "type": "string" + }, + "parentTags": { + "description": "Pack version parent tags", + "type": "array", + "items": { + "type": "string" + } + }, + "tag": { + "description": "Pack version tag", + "type": "string" + }, + "version": { + "description": "Pack version", + "type": "string" + } + } + }, + "v1PackTemplate": { + "description": "Pack template configuration", + "properties": { + "manifest": { + "description": "Pack template manifest content", + "type": "string" + }, + "parameters": { + "$ref": "#/definitions/v1PackTemplateParameters" + }, + "values": { + "description": "Pack template values", + "type": "string" + } + } + }, + "v1PackTemplateParameter": { + "description": "Pack template parameter", + "properties": { + "description": { + "description": "Pack template parameter description", + "type": "string" + }, + "displayName": { + "description": "Pack template parameter display name", + "type": "string" + }, + "format": { + "description": "Pack template parameter format", + "type": "string" + }, + "hidden": { + "description": "Pack template parameter hidden flag, if true then the parameter is hidden in the UI", + "type": "boolean" + }, + "listOptions": { + "description": "Pack template parameter list options as string array", + "type": "array", + "items": { + "type": "string" + } + }, + "name": { + "description": "Pack template parameter name", + "type": "string" + }, + "optional": { + "description": "Pack template parameter optional flag, if true then the parameter value is not mandatory", + "type": "boolean" + }, + "options": { + "description": "Pack template parameter options array", + "type": "object", + "additionalProperties": { + "type": "object", + "$ref": "#/definitions/v1PackTemplateParameterOption" + } + }, + "readOnly": { + "description": "Pack template parameter readonly flag, if true then the parameter value can't be overridden", + "type": "boolean" + }, + "regex": { + "description": "Pack template parameter regex, if set then parameter value must match with specified regex", + "type": "string" + }, + "targetKey": { + "description": "Pack template parameter target key which is mapped to the key defined in the pack values", + "type": "string" + }, + "type": { + "description": "Pack template parameter data type", + "type": "string" + }, + "value": { + "description": "Pack template parameter value", + "type": "string" + } + } + }, + "v1PackTemplateParameterOption": { + "description": "Pack template parameter option", + "type": "object", + "properties": { + "dependencies": { + "description": "Pack template parameter dependencies", + "type": "array", + "items": { + "$ref": "#/definitions/v1PackDependency" + } + }, + "description": { + "description": "Pack template parameter description", + "type": "string" + }, + "label": { + "description": "Pack template parameter label", + "type": "string" + } + } + }, + "v1PackTemplateParameters": { + "description": "Pack template parameters", + "properties": { + "inputParameters": { + "description": "Pack template input parameters array", + "type": "array", + "items": { + "$ref": "#/definitions/v1PackTemplateParameter" + } + }, + "outputParameters": { + "description": "Pack template output parameters array", + "type": "array", + "items": { + "$ref": "#/definitions/v1PackTemplateParameter" + } + } + } + }, + "v1PackType": { + "type": "string", + "default": "spectro", + "enum": [ + "spectro", + "helm", + "manifest", + "oci" + ] + }, + "v1PackUidValues": { + "type": "object", + "properties": { + "annotations": { + "description": "Pack annotations is used to allow pack to add more arbitrary configurations", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "dependencies": { + "description": "Pack dependencies array", + "type": "array", + "items": { + "$ref": "#/definitions/v1PackDependencyMeta" + } + }, + "packUid": { + "description": "Pack uid", + "type": "string" + }, + "presets": { + "description": "Pack presets are the set of configurations applied on user selection of presets", + "type": "array", + "items": { + "$ref": "#/definitions/v1PackPreset" + } + }, + "readme": { + "description": "Readme describes the documentation of the specified pack", + "type": "string" + }, + "schema": { + "description": "Pack schema contains constraints such as data type, format, hints for the pack values", + "type": "array", + "items": { + "$ref": "#/definitions/v1PackSchema" + } + }, + "template": { + "$ref": "#/definitions/v1PackTemplate" + }, + "values": { + "description": "Pack values represents the values.yaml used as input parameters", + "type": "string" + } + } + }, + "v1PackUpdateEntity": { + "description": "Pack update request payload", + "properties": { + "pack": { + "$ref": "#/definitions/v1PackEntity" + } + } + }, + "v1PackValuesEntity": { + "description": "Pack values entity to refer the existing pack for the values override", + "type": "object", + "required": [ + "name" + ], + "properties": { + "manifests": { + "description": "Pack manifests are additional content as part of the profile", + "type": "array", + "items": { + "$ref": "#/definitions/v1ManifestRefUpdateEntity" + } + }, + "name": { + "description": "Pack name", + "type": "string" + }, + "tag": { + "description": "Pack version tag", + "type": "string" + }, + "type": { + "$ref": "#/definitions/v1PackType" + }, + "values": { + "description": "Pack values represents the values.yaml used as input parameters either Params OR Values should be used, not both If both applied at the same time, will only use Values", + "type": "string" + } + } + }, + "v1PacksFilterSpec": { + "description": "Packs filter spec", + "properties": { + "filter": { + "$ref": "#/definitions/v1PackFilterSpec" + }, + "sort": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1PackSortSpec" + } + } + } + }, + "v1PairingCode": { + "description": "Pairing code response", + "type": "object", + "properties": { + "pairingCode": { + "type": "string" + } + } + }, + "v1Partition": { + "type": "object", + "properties": { + "fileSystemType": { + "type": "string" + }, + "freeSpace": { + "type": "integer", + "format": "int32" + }, + "mountPoint": { + "type": "string" + }, + "totalSpace": { + "type": "integer", + "format": "int32" + }, + "usedSpace": { + "type": "integer", + "format": "int32" + } + } + }, + "v1PasswordsBlockListEntity": { + "description": "List of block listed passwords", + "type": "object", + "properties": { + "passwords": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "v1PcgSelfHostedParams": { + "properties": { + "cloudType": { + "type": "string" + }, + "name": { + "type": "string" + } + } + }, + "v1PcgServiceKubectlCommands": { + "description": "Array of kubectl commands", + "type": "object", + "required": [ + "kubectlCommands" + ], + "properties": { + "kubectlCommands": { + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + } + }, + "overlordUid": { + "type": "string" + } + } + }, + "v1PcgsSummary": { + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1Overlord" + } + }, + "listmeta": { + "$ref": "#/definitions/v1ListMetaData" + } + } + }, + "v1Permission": { + "description": "Permission information", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "permissions": { + "type": "array", + "items": { + "type": "string" + } + }, + "scope": { + "$ref": "#/definitions/v1Scope" + } + } + }, + "v1Permissions": { + "description": "Array of permissions", + "type": "array", + "items": { + "$ref": "#/definitions/v1Permission" + } + }, + "v1PlanCredit": { + "description": "Plan Credit", + "required": [ + "type" + ], + "properties": { + "cpuCoreHours": { + "type": "number", + "format": "int64", + "x-omitempty": false + }, + "creditUid": { + "type": "string" + }, + "expiry": { + "description": "credit expiry time", + "$ref": "#/definitions/v1Time" + }, + "name": { + "type": "string" + }, + "start": { + "description": "credit start time", + "$ref": "#/definitions/v1Time" + }, + "type": { + "type": "string", + "enum": [ + "Pure", + "Alloy" + ] + } + } + }, + "v1PodAntiAffinity": { + "description": "Pod anti affinity is a group of inter pod anti affinity scheduling rules.", + "type": "object", + "properties": { + "preferredDuringSchedulingIgnoredDuringExecution": { + "description": "The scheduler will prefer to schedule pods to nodes that satisfy the anti-affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling anti-affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding \"weight\" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred.", + "type": "array", + "items": { + "$ref": "#/definitions/v1VmWeightedPodAffinityTerm" + } + }, + "requiredDuringSchedulingIgnoredDuringExecution": { + "description": "If the anti-affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the anti-affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied.", + "type": "array", + "items": { + "$ref": "#/definitions/v1VmPodAffinityTerm" + } + } + } + }, + "v1Pool": { + "description": "Pool defines IP ranges or with CIDR for available IPs Gateway, Prefix and Nameserver if provided, will overwrite values in IPPool", + "type": "object", + "properties": { + "end": { + "description": "End is the last IP address that can be rendered. It is used as a validation that the rendered IP is in bound.", + "type": "string" + }, + "gateway": { + "description": "Gateway is the gateway ip address", + "type": "string" + }, + "nameserver": { + "description": "Nameserver provide information for dns resolvation", + "$ref": "#/definitions/v1Nameserver" + }, + "prefix": { + "description": "Prefix is the mask of the network as integer (max 128)", + "type": "integer", + "format": "int32" + }, + "start": { + "description": "Start is the first ip address that can be rendered", + "type": "string" + }, + "subnet": { + "description": "Subnet is used to validate that the rendered IP is in bounds. eg: 192.168.0.0/24 If Start value is not given, start value is derived from the subnet ip incremented by 1 (start value is `192.168.0.1` for subnet `192.168.0.0/24`)", + "type": "string" + } + } + }, + "v1PrivateCloudRateConfig": { + "description": "Private cloud rate config", + "properties": { + "cpuUnitPricePerHour": { + "type": "number", + "format": "float64" + }, + "gpuUnitPricePerHour": { + "type": "number", + "format": "float64" + }, + "memoryUnitPriceGiBPerHour": { + "type": "number", + "format": "float64" + }, + "storageUnitPriceGiBPerHour": { + "type": "number", + "format": "float64" + } + } + }, + "v1ProfileMetaEntity": { + "description": "Cluster profile metadata request payload", + "type": "object", + "required": [ + "metadata" + ], + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectMetaInputEntity" + }, + "spec": { + "$ref": "#/definitions/v1ClusterProfileSpecEntity" + } + } + }, + "v1ProfileResolvedValues": { + "description": "Cluster profile resolved pack values", + "properties": { + "resolved": { + "description": "Cluster profile pack resolved values", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "uid": { + "description": "Cluster profile uid", + "type": "string" + } + } + }, + "v1ProfileStatus": { + "type": "object", + "properties": { + "hasUserMacros": { + "description": "If it is true then profile pack values has a reference to user defined macros", + "type": "boolean", + "x-omitempty": false + } + } + }, + "v1ProfileTemplateSummary": { + "description": "Edge host clusterprofile template summary", + "type": "object", + "properties": { + "cloudType": { + "type": "string" + }, + "name": { + "type": "string" + }, + "packs": { + "type": "array", + "items": { + "$ref": "#/definitions/v1PackRefSummary" + } + }, + "type": { + "type": "string" + }, + "uid": { + "type": "string" + }, + "version": { + "type": "string" + } + } + }, + "v1ProfileType": { + "type": "string", + "default": "cluster", + "enum": [ + "cluster", + "infra", + "add-on", + "system" + ] + }, + "v1Project": { + "description": "Project information", + "type": "object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/v1ProjectSpec" + }, + "status": { + "$ref": "#/definitions/v1ProjectStatus" + } + } + }, + "v1ProjectActiveAppDeployment": { + "description": "Active app deployment", + "type": "object", + "properties": { + "appRef": { + "$ref": "#/definitions/v1ObjectEntity" + }, + "state": { + "type": "string" + } + } + }, + "v1ProjectActiveAppDeployments": { + "description": "Active app deployment", + "type": "object", + "properties": { + "apps": { + "type": "array", + "items": { + "$ref": "#/definitions/v1ProjectActiveAppDeployment" + } + }, + "count": { + "type": "integer", + "format": "int32" + } + } + }, + "v1ProjectActiveCluster": { + "description": "Active clusters", + "type": "object", + "properties": { + "clusterRef": { + "$ref": "#/definitions/v1ObjectEntity" + }, + "state": { + "type": "string" + } + } + }, + "v1ProjectActiveClusters": { + "description": "Active clusters", + "type": "object", + "properties": { + "clusters": { + "type": "array", + "items": { + "$ref": "#/definitions/v1ProjectActiveCluster" + } + }, + "count": { + "type": "integer", + "format": "int32" + } + } + }, + "v1ProjectActiveResources": { + "description": "Active project resources", + "type": "object", + "properties": { + "appDeployments": { + "$ref": "#/definitions/v1ProjectActiveAppDeployments" + }, + "clusters": { + "$ref": "#/definitions/v1ProjectActiveClusters" + }, + "virtualClusters": { + "$ref": "#/definitions/v1ProjectActiveClusters" + } + } + }, + "v1ProjectAlertComponent": { + "description": "Project alert component", + "type": "object", + "properties": { + "description": { + "type": "string" + }, + "name": { + "type": "string" + }, + "supportedChannels": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "v1ProjectAlertComponents": { + "description": "Supported project alerts component", + "type": "object", + "properties": { + "components": { + "type": "array", + "items": { + "$ref": "#/definitions/v1ProjectAlertComponent" + } + } + } + }, + "v1ProjectCleanUpStatus": { + "description": "Project cleanup status", + "type": "object", + "properties": { + "cleanedResources": { + "type": "array", + "items": { + "type": "string" + } + }, + "msg": { + "type": "string" + }, + "state": { + "type": "string" + } + } + }, + "v1ProjectCleanup": { + "description": "Project delete request payload", + "properties": { + "deletingClusterDurationThresholdInMin": { + "type": "integer", + "format": "int32" + }, + "provisioningClusterDurationThresholdInMin": { + "type": "integer", + "format": "int32" + } + } + }, + "v1ProjectClusterSettings": { + "properties": { + "nodesAutoRemediationSetting": { + "$ref": "#/definitions/v1NodesAutoRemediationSettings" + }, + "tenantClusterSettings": { + "$ref": "#/definitions/v1TenantClusterSettings" + } + } + }, + "v1ProjectEntity": { + "description": "Project information", + "type": "object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/v1ProjectEntitySpec" + } + } + }, + "v1ProjectEntitySpec": { + "description": "Project specifications", + "properties": { + "logoUid": { + "type": "string" + }, + "teams": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1TeamRoleMap" + } + }, + "users": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1UserRoleMap" + } + } + } + }, + "v1ProjectFilterSortFields": { + "type": "string", + "enum": [ + "name", + "creationTimestamp", + "lastModifiedTimestamp" + ], + "x-nullable": true + }, + "v1ProjectFilterSortSpec": { + "properties": { + "field": { + "$ref": "#/definitions/v1ProjectFilterSortFields" + }, + "order": { + "$ref": "#/definitions/v1SortOrder" + } + } + }, + "v1ProjectFilterSpec": { + "description": "Project filter spec", + "properties": { + "name": { + "$ref": "#/definitions/v1FilterString" + } + } + }, + "v1ProjectMeta": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "uid": { + "type": "string" + } + } + }, + "v1ProjectMetadata": { + "description": "Project metadata", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectEntity" + } + } + }, + "v1ProjectRolesEntity": { + "type": "object", + "properties": { + "projects": { + "type": "array", + "items": { + "$ref": "#/definitions/v1UidRoleSummary" + } + } + } + }, + "v1ProjectRolesPatch": { + "type": "object", + "properties": { + "projects": { + "type": "array", + "items": { + "type": "object", + "properties": { + "projectUid": { + "type": "string" + }, + "roles": { + "type": "array", + "items": { + "type": "string" + } + } + } + } + } + } + }, + "v1ProjectSpec": { + "description": "Project specifications", + "properties": { + "alerts": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1Alert" + } + }, + "logoUrl": { + "type": "string" + }, + "teams": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1TeamRoleMap" + } + }, + "users": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1UserRoleMap" + } + } + } + }, + "v1ProjectSpecSummary": { + "type": "object", + "properties": { + "logoUrl": { + "type": "string" + }, + "teams": { + "type": "array", + "items": { + "$ref": "#/definitions/v1UidSummary" + } + }, + "users": { + "type": "array", + "items": { + "$ref": "#/definitions/v1UidSummary" + } + } + } + }, + "v1ProjectStatus": { + "description": "Project status", + "properties": { + "cleanUpStatus": { + "$ref": "#/definitions/v1ProjectCleanUpStatus" + }, + "isDisabled": { + "type": "boolean" + } + } + }, + "v1ProjectStatusSummary": { + "description": "Project status summary", + "type": "object", + "properties": { + "clustersHealth": { + "$ref": "#/definitions/v1SpectroClustersHealth" + }, + "status": { + "$ref": "#/definitions/v1ProjectStatus" + }, + "usage": { + "$ref": "#/definitions/v1ProjectUsageSummary" + } + } + }, + "v1ProjectSummary": { + "description": "Project summary", + "type": "object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "specSummary": { + "description": "Project spec summary", + "$ref": "#/definitions/v1ProjectSpecSummary" + }, + "status": { + "description": "Project status summary", + "$ref": "#/definitions/v1ProjectStatusSummary" + } + } + }, + "v1ProjectTeamsEntity": { + "properties": { + "teams": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1TeamRoleMap" + } + } + } + }, + "v1ProjectUsage": { + "description": "Project usage object", + "properties": { + "alloy": { + "$ref": "#/definitions/v1ProjectUsageData" + }, + "pure": { + "$ref": "#/definitions/v1ProjectUsageData" + } + } + }, + "v1ProjectUsageData": { + "description": "Project usage data object", + "properties": { + "amount": { + "description": "Billing amount for the project", + "type": "number", + "format": "float64" + }, + "tierPrice": { + "description": "Tier price based on the usage", + "type": "number", + "format": "float64" + }, + "usedCredits": { + "description": "Project used credits", + "type": "number", + "format": "float64" + } + } + }, + "v1ProjectUsageSummary": { + "description": "Project usage summary", + "type": "object", + "properties": { + "alloyCpuCores": { + "type": "number", + "x-omitempty": false + }, + "clusters": { + "type": "array", + "items": { + "$ref": "#/definitions/v1ClusterUsageSummary" + } + }, + "pureCpuCores": { + "type": "number", + "x-omitempty": false + } + } + }, + "v1ProjectUsersEntity": { + "properties": { + "users": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1UserRoleMap" + } + } + } + }, + "v1ProjectsFilterSpec": { + "description": "Project filter summary spec", + "properties": { + "filter": { + "$ref": "#/definitions/v1ProjectFilterSpec" + }, + "sort": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1ProjectFilterSortSpec" + } + } + } + }, + "v1ProjectsMetadata": { + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1ProjectMetadata" + } + } + } + }, + "v1ProjectsSummary": { + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1ProjectSummary" + } + }, + "listmeta": { + "$ref": "#/definitions/v1ListMetaData" + } + } + }, + "v1ProjectsWorkspaces": { + "description": "List projects and its workspaces", + "properties": { + "name": { + "type": "string" + }, + "uid": { + "type": "string" + }, + "workspaces": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1WorkspacesRoles" + } + } + } + }, + "v1PublicCloudRateConfig": { + "description": "Public cloud rate config", + "properties": { + "computeOptimized": { + "$ref": "#/definitions/v1CloudInstanceRateConfig" + }, + "memoryOptimized": { + "$ref": "#/definitions/v1CloudInstanceRateConfig" + } + } + }, + "v1RateConfig": { + "description": "Rate config", + "properties": { + "aws": { + "$ref": "#/definitions/v1PublicCloudRateConfig" + }, + "azure": { + "$ref": "#/definitions/v1PublicCloudRateConfig" + }, + "custom": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1CustomCloudRateConfig" + } + }, + "edge": { + "$ref": "#/definitions/v1PrivateCloudRateConfig" + }, + "edgeNative": { + "$ref": "#/definitions/v1PrivateCloudRateConfig" + }, + "gcp": { + "$ref": "#/definitions/v1PublicCloudRateConfig" + }, + "generic": { + "$ref": "#/definitions/v1PrivateCloudRateConfig" + }, + "libvirt": { + "$ref": "#/definitions/v1PrivateCloudRateConfig" + }, + "maas": { + "$ref": "#/definitions/v1PrivateCloudRateConfig" + }, + "openstack": { + "$ref": "#/definitions/v1PrivateCloudRateConfig" + }, + "vsphere": { + "$ref": "#/definitions/v1PrivateCloudRateConfig" + } + } + }, + "v1RegistriesMetadata": { + "description": "Pack Registries Metadata", + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1RegistryMetadata" + } + } + } + }, + "v1RegistryAuth": { + "description": "Auth credentials of the registry", + "type": "object", + "properties": { + "password": { + "type": "string", + "format": "password" + }, + "tls": { + "$ref": "#/definitions/v1TlsConfiguration" + }, + "token": { + "type": "string", + "format": "password" + }, + "type": { + "type": "string", + "enum": [ + "noAuth", + "basic", + "token" + ] + }, + "username": { + "type": "string" + } + } + }, + "v1RegistryConfigEntity": { + "description": "Registry configuration entity", + "type": "object", + "properties": { + "config": { + "$ref": "#/definitions/v1RegistryConfiguration" + } + } + }, + "v1RegistryConfiguration": { + "description": "Registry configuration", + "type": "object", + "properties": { + "auth": { + "$ref": "#/definitions/v1RegistryAuth" + }, + "endpoint": { + "type": "string" + }, + "name": { + "type": "string" + } + } + }, + "v1RegistryMetadata": { + "description": "Registry meta", + "type": "object", + "properties": { + "isDefault": { + "type": "boolean", + "x-omitempty": false + }, + "isPrivate": { + "type": "boolean", + "x-omitempty": false + }, + "kind": { + "type": "string" + }, + "name": { + "type": "string" + }, + "scope": { + "type": "string" + }, + "uid": { + "type": "string" + } + } + }, + "v1RegistryPackMetadata": { + "description": "Registry metadata information", + "properties": { + "annotations": { + "description": "Pack annotations is used to allow pack to add more arbitrary configurations", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "latestPackUid": { + "description": "Latest pack uid", + "type": "string" + }, + "latestVersion": { + "description": "Pack latest version", + "type": "string" + }, + "logoUrl": { + "description": "Pack logo url", + "type": "string" + }, + "name": { + "description": "Pack registry name", + "type": "string" + }, + "scope": { + "description": "Pack registry scope", + "type": "string" + }, + "uid": { + "description": "Pack registry uid", + "type": "string" + } + } + }, + "v1RegistrySyncStatus": { + "description": "Status of the registry sync", + "type": "object", + "properties": { + "lastRunTime": { + "$ref": "#/definitions/v1Time" + }, + "lastSyncedTime": { + "$ref": "#/definitions/v1Time" + }, + "message": { + "type": "string" + }, + "status": { + "type": "string" + } + } + }, + "v1RelatedObject": { + "description": "Object for which the resource is related", + "type": "object", + "properties": { + "kind": { + "type": "string", + "enum": [ + "spectrocluster", + "machine", + "cloudconfig", + "clusterprofile", + "pack", + "appprofile", + "appdeployment", + "edgehost" + ] + }, + "name": { + "type": "string" + }, + "uid": { + "type": "string" + } + } + }, + "v1ResourceCloudCostSummary": { + "description": "Resource cloud cost summary information", + "type": "object", + "properties": { + "data": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1CloudCostDataPoint" + } + }, + "entity": { + "$ref": "#/definitions/v1ResourceReference" + }, + "total": { + "$ref": "#/definitions/v1ResourceTotalCloudCost" + } + } + }, + "v1ResourceConsumption": { + "description": "Resource consumption information", + "type": "object", + "properties": { + "associatedResources": { + "type": "array", + "items": { + "$ref": "#/definitions/v1ResourceReference" + } + }, + "data": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1ResourceConsumptionDataPoint" + } + }, + "entity": { + "$ref": "#/definitions/v1ResourceReference" + }, + "total": { + "$ref": "#/definitions/v1ResourceTotalConsumptionData" + } + } + }, + "v1ResourceConsumptionData": { + "description": "Resource cosumption data", + "type": "object", + "properties": { + "cpu": { + "type": "number", + "format": "float64", + "x-omitempty": false + }, + "memory": { + "type": "number", + "format": "float64", + "x-omitempty": false + } + } + }, + "v1ResourceConsumptionDataPoint": { + "description": "Resource cosumption data point", + "type": "object", + "properties": { + "allotted": { + "$ref": "#/definitions/v1ResourceConsumptionData" + }, + "timestamp": { + "type": "number", + "format": "int64" + }, + "usage": { + "$ref": "#/definitions/v1ResourceConsumptionData" + } + } + }, + "v1ResourceConsumptionFilter": { + "description": "Resource consumption filter", + "type": "object", + "properties": { + "clouds": { + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + } + }, + "clusters": { + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + } + }, + "endTime": { + "$ref": "#/definitions/v1Time" + }, + "includeControlPlaneMachines": { + "type": "boolean" + }, + "includeMasterMachines": { + "description": "Deprecated. Use includeControlPlaneMachines", + "type": "boolean" + }, + "namespaces": { + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + } + }, + "projects": { + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + } + }, + "startTime": { + "$ref": "#/definitions/v1Time" + }, + "workspaces": { + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + } + } + } + }, + "v1ResourceConsumptionOptions": { + "description": "Resource consumption options", + "type": "object", + "properties": { + "enableSummaryView": { + "type": "boolean", + "default": true + }, + "groupBy": { + "type": "string", + "default": "namespace", + "enum": [ + "tenant", + "project", + "workspace", + "cluster", + "namespace", + "cloud" + ] + }, + "period": { + "type": "integer", + "format": "int32", + "default": 60 + } + } + }, + "v1ResourceConsumptionSpec": { + "description": "Resource consumption spec", + "type": "object", + "properties": { + "filter": { + "$ref": "#/definitions/v1ResourceConsumptionFilter" + }, + "options": { + "$ref": "#/definitions/v1ResourceConsumptionOptions" + } + } + }, + "v1ResourceCost": { + "description": "Resource Cost information", + "type": "object", + "properties": { + "cloud": { + "$ref": "#/definitions/v1CloudCost" + }, + "total": { + "type": "number", + "format": "float64", + "x-omitempty": false + } + } + }, + "v1ResourceCostDataPoint": { + "description": "Resource cost data point", + "type": "object", + "properties": { + "cpu": { + "type": "number", + "format": "float64", + "x-omitempty": false + }, + "memory": { + "type": "number", + "format": "float64", + "x-omitempty": false + }, + "storage": { + "type": "number", + "format": "float64", + "x-omitempty": false + }, + "timestamp": { + "type": "number", + "format": "int64" + }, + "total": { + "type": "number", + "format": "float64", + "x-omitempty": false + } + } + }, + "v1ResourceCostSummary": { + "description": "Resource cost summary information", + "type": "object", + "properties": { + "associatedResources": { + "type": "array", + "items": { + "$ref": "#/definitions/v1ResourceReference" + } + }, + "data": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1ResourceCostDataPoint" + } + }, + "entity": { + "$ref": "#/definitions/v1ResourceReference" + }, + "total": { + "$ref": "#/definitions/v1ResourceTotalCost" + } + } + }, + "v1ResourceCostSummaryFilter": { + "description": "Resource cost summary filter", + "type": "object", + "properties": { + "clouds": { + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + } + }, + "clusters": { + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + } + }, + "endTime": { + "$ref": "#/definitions/v1Time" + }, + "includeControlPlaneMachines": { + "type": "boolean" + }, + "includeMasterMachines": { + "description": "Deprecated. Use includeControlPlaneMachines", + "type": "boolean" + }, + "namespaces": { + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + } + }, + "projects": { + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + } + }, + "startTime": { + "$ref": "#/definitions/v1Time" + }, + "workspaces": { + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + } + } + } + }, + "v1ResourceCostSummaryOptions": { + "description": "Resource cost summary options", + "type": "object", + "properties": { + "enableSummaryView": { + "type": "boolean", + "default": true + }, + "groupBy": { + "type": "string", + "default": "cluster", + "enum": [ + "tenant", + "project", + "workspace", + "cluster", + "namespace", + "deployment", + "cloud" + ] + }, + "period": { + "type": "integer", + "format": "int32", + "default": 60 + } + } + }, + "v1ResourceCostSummarySpec": { + "description": "Resource cost summary spec", + "type": "object", + "properties": { + "filter": { + "$ref": "#/definitions/v1ResourceCostSummaryFilter" + }, + "options": { + "$ref": "#/definitions/v1ResourceCostSummaryOptions" + } + } + }, + "v1ResourceGroup": { + "description": "Azure resource Group is a container that holds related resources for an Azure solution", + "type": "object", + "properties": { + "id": { + "description": "The ID of the resource group", + "type": "string" + }, + "location": { + "description": "The location of the resource group. It cannot be changed after the resource group has been created", + "type": "string" + }, + "name": { + "description": "The type of the resource group", + "type": "string" + } + } + }, + "v1ResourceLimitType": { + "type": "string", + "enum": [ + "user", + "project", + "apiKey", + "team", + "role", + "cloudaccount", + "clusterprofile", + "workspace", + "registry", + "privategateway", + "location", + "certificate", + "macro", + "sshkey", + "alert", + "spectrocluster", + "edgehost", + "appprofile", + "appdeployment", + "edgetoken", + "clustergroup", + "filter", + "systemadmin" + ] + }, + "v1ResourceReference": { + "type": "object", + "required": [ + "uid" + ], + "properties": { + "kind": { + "type": "string" + }, + "name": { + "type": "string" + }, + "uid": { + "type": "string" + } + } + }, + "v1ResourceRoles": { + "type": "object", + "properties": { + "resourceRoles": { + "type": "array", + "items": { + "$ref": "#/definitions/v1ResourceRolesEntity" + } + } + } + }, + "v1ResourceRolesEntity": { + "type": "object", + "properties": { + "filterRefs": { + "type": "array", + "items": { + "$ref": "#/definitions/v1UidSummary" + } + }, + "projectUids": { + "type": "array", + "items": { + "$ref": "#/definitions/v1UidSummary" + } + }, + "roles": { + "type": "array", + "items": { + "$ref": "#/definitions/v1UidSummary" + } + }, + "uid": { + "type": "string" + } + } + }, + "v1ResourceRolesUpdateEntity": { + "type": "object", + "properties": { + "filterRefs": { + "type": "array", + "items": { + "type": "string" + } + }, + "projectUids": { + "type": "array", + "items": { + "type": "string" + } + }, + "roles": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "v1ResourceTotalCloudCost": { + "description": "Resource total cloud cost information", + "type": "object", + "properties": { + "compute": { + "type": "number", + "format": "float64", + "x-omitempty": false + }, + "storage": { + "type": "number", + "format": "float64", + "x-omitempty": false + }, + "total": { + "type": "number", + "format": "float64", + "x-omitempty": false + } + } + }, + "v1ResourceTotalConsumptionData": { + "description": "Resource total cosumption data", + "type": "object", + "properties": { + "allotted": { + "$ref": "#/definitions/v1ResourceConsumptionData" + }, + "usage": { + "$ref": "#/definitions/v1ResourceConsumptionData" + } + } + }, + "v1ResourceTotalCost": { + "description": "Resource total cost information", + "type": "object", + "properties": { + "cpu": { + "type": "number", + "format": "float64", + "x-omitempty": false + }, + "memory": { + "type": "number", + "format": "float64", + "x-omitempty": false + }, + "storage": { + "type": "number", + "format": "float64", + "x-omitempty": false + }, + "total": { + "type": "number", + "format": "float64", + "x-omitempty": false + } + } + }, + "v1ResourceUsageDataPoint": { + "description": "Resource usage data point", + "type": "object", + "properties": { + "baremetal": { + "$ref": "#/definitions/v1ResourceUsageMeteringDataPoint" + }, + "cpu": { + "type": "number", + "format": "float64", + "x-omitempty": false + }, + "edgehost": { + "$ref": "#/definitions/v1ResourceUsageMeteringDataPoint" + }, + "memory": { + "type": "number", + "format": "float64", + "x-omitempty": false + }, + "timestamp": { + "type": "number", + "format": "int64" + } + } + }, + "v1ResourceUsageMeteringDataPoint": { + "description": "min and max count for machines \u0026 edgehost for the given period", + "type": "object", + "properties": { + "activeEdgehosts": { + "type": "number", + "format": "int64" + }, + "activeMachines": { + "type": "number", + "format": "int64" + }, + "maxEdgehosts": { + "type": "number", + "format": "int64" + }, + "maxMachines": { + "type": "number", + "format": "int64" + } + } + }, + "v1ResourceUsageSummary": { + "description": "Resource usage summary information", + "type": "object", + "properties": { + "associatedResources": { + "type": "array", + "items": { + "$ref": "#/definitions/v1ResourceReference" + } + }, + "data": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1ResourceUsageDataPoint" + } + }, + "entity": { + "$ref": "#/definitions/v1ResourceReference" + } + } + }, + "v1ResourceUsageSummaryFilter": { + "description": "Resource usage summary filter", + "type": "object", + "properties": { + "clouds": { + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + } + }, + "clusters": { + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + } + }, + "endTime": { + "$ref": "#/definitions/v1Time" + }, + "includeControlPlaneMachines": { + "type": "boolean" + }, + "includeMasterMachines": { + "description": "Deprecated. Use includeControlPlaneMachines", + "type": "boolean" + }, + "namespaces": { + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + } + }, + "pods": { + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + } + }, + "projects": { + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + } + }, + "startTime": { + "$ref": "#/definitions/v1Time" + }, + "workload": { + "$ref": "#/definitions/v1ResourceWorkloadFilter" + }, + "workspaces": { + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + } + } + } + }, + "v1ResourceUsageSummaryOptions": { + "description": "Resource usage summary options", + "type": "object", + "properties": { + "enableSummaryView": { + "type": "boolean", + "default": true + }, + "groupBy": { + "type": "string", + "default": "cluster", + "enum": [ + "tenant", + "project", + "workspace", + "cluster", + "namespace", + "deployment", + "statefulset", + "daemonset", + "pod", + "cloud" + ] + }, + "includeMeteringInfo": { + "type": "boolean", + "default": false + }, + "period": { + "type": "integer", + "format": "int32", + "default": 60 + } + } + }, + "v1ResourceUsageSummarySpec": { + "description": "Resource usage summary spec", + "type": "object", + "properties": { + "filter": { + "$ref": "#/definitions/v1ResourceUsageSummaryFilter" + }, + "options": { + "$ref": "#/definitions/v1ResourceUsageSummaryOptions" + } + } + }, + "v1ResourceWorkloadFilter": { + "description": "Workload resource filter", + "type": "object", + "properties": { + "names": { + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + } + }, + "type": { + "type": "string", + "default": "all", + "enum": [ + "deployment", + "statefulset", + "daemonset", + "all" + ] + } + } + }, + "v1ResourcesCloudCostSummary": { + "description": "Resources cloud cost summary information", + "type": "object", + "properties": { + "resources": { + "type": "array", + "items": { + "$ref": "#/definitions/v1ResourceCloudCostSummary" + } + }, + "total": { + "$ref": "#/definitions/v1ResourceTotalCloudCost" + } + } + }, + "v1ResourcesConsumption": { + "description": "Resources consumption information", + "type": "object", + "properties": { + "cpuUnit": { + "type": "string" + }, + "memoryUnit": { + "type": "string" + }, + "resources": { + "type": "array", + "items": { + "$ref": "#/definitions/v1ResourceConsumption" + } + }, + "total": { + "$ref": "#/definitions/v1ResourceTotalConsumptionData" + } + } + }, + "v1ResourcesCostSummary": { + "description": "Resources cost summary information", + "type": "object", + "properties": { + "resources": { + "type": "array", + "items": { + "$ref": "#/definitions/v1ResourceCostSummary" + } + }, + "total": { + "$ref": "#/definitions/v1ResourceTotalCost" + } + } + }, + "v1ResourcesUsageSummary": { + "description": "Resources usage summary information", + "type": "object", + "properties": { + "cpuUnit": { + "type": "string" + }, + "memoryUnit": { + "type": "string" + }, + "resources": { + "type": "array", + "items": { + "$ref": "#/definitions/v1ResourceUsageSummary" + } + } + } + }, + "v1RestoreStatusMeta": { + "description": "Restore status meta", + "properties": { + "isSucceeded": { + "type": "boolean" + }, + "msg": { + "type": "string" + }, + "restoreTime": { + "$ref": "#/definitions/v1Time" + } + } + }, + "v1Role": { + "description": "Role", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/v1RoleSpec" + }, + "status": { + "$ref": "#/definitions/v1RoleStatus" + } + } + }, + "v1RoleClone": { + "description": "Role clone specifications", + "properties": { + "metadata": { + "$ref": "#/definitions/v1RoleCloneMetadata" + } + } + }, + "v1RoleCloneMetadata": { + "description": "Role clone metadata", + "properties": { + "name": { + "type": "string" + } + } + }, + "v1RoleSpec": { + "description": "Role specifications", + "properties": { + "permissions": { + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + } + }, + "scope": { + "$ref": "#/definitions/v1Scope" + }, + "type": { + "type": "string", + "enum": [ + "system", + "user" + ] + } + } + }, + "v1RoleStatus": { + "description": "Role status", + "properties": { + "isEnabled": { + "description": "Specifies if role account is enabled/disabled", + "type": "boolean", + "x-omitempty": false + } + } + }, + "v1Roles": { + "description": "Array of Roles", + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1Role" + } + }, + "listmeta": { + "$ref": "#/definitions/v1ListMetaData" + } + } + }, + "v1S3StorageConfig": { + "description": "S3 storage config object", + "type": "object", + "required": [ + "bucketName", + "region", + "credentials" + ], + "properties": { + "bucketName": { + "description": "S3 storage bucket name", + "type": "string" + }, + "caCert": { + "description": "CA Certificate", + "type": "string" + }, + "credentials": { + "description": "AWS cloud account credentials", + "$ref": "#/definitions/v1AwsCloudAccount" + }, + "region": { + "description": "AWS region name", + "type": "string" + }, + "s3ForcePathStyle": { + "type": "boolean", + "default": true + }, + "s3Url": { + "description": "Custom hosted S3 URL", + "type": "string" + }, + "useRestic": { + "description": "Set to 'true', to use Restic plugin for the backup", + "type": "boolean", + "default": true + } + } + }, + "v1Scope": { + "type": "string", + "enum": [ + "system", + "tenant", + "project", + "resource" + ] + }, + "v1SearchFilterBoolCondition": { + "properties": { + "value": { + "type": "boolean" + } + } + }, + "v1SearchFilterCondition": { + "properties": { + "bool": { + "$ref": "#/definitions/v1SearchFilterBoolCondition" + }, + "date": { + "$ref": "#/definitions/v1SearchFilterDateCondition" + }, + "float": { + "$ref": "#/definitions/v1SearchFilterFloatCondition" + }, + "int": { + "$ref": "#/definitions/v1SearchFilterIntegerCondition" + }, + "keyValue": { + "$ref": "#/definitions/v1SearchFilterKeyValueCondition" + }, + "string": { + "$ref": "#/definitions/v1SearchFilterStringCondition" + } + } + }, + "v1SearchFilterConjunctionOperator": { + "type": "string", + "enum": [ + "and", + "or" + ], + "x-nullable": true + }, + "v1SearchFilterDateCondition": { + "properties": { + "match": { + "$ref": "#/definitions/v1SearchFilterDateConditionMatch" + }, + "negation": { + "type": "boolean" + }, + "operator": { + "$ref": "#/definitions/v1SearchFilterDateOperator" + } + } + }, + "v1SearchFilterDateConditionMatch": { + "properties": { + "conjunction": { + "$ref": "#/definitions/v1SearchFilterConjunctionOperator" + }, + "values": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1Time" + } + } + } + }, + "v1SearchFilterDateOperator": { + "type": "string", + "enum": [ + "eq", + "gt", + "gte", + "lt", + "lte", + "range" + ] + }, + "v1SearchFilterFloatCondition": { + "properties": { + "match": { + "$ref": "#/definitions/v1SearchFilterFloatConditionMatch" + }, + "negation": { + "type": "boolean" + }, + "operator": { + "$ref": "#/definitions/v1SearchFilterIntegerOperator" + } + } + }, + "v1SearchFilterFloatConditionMatch": { + "properties": { + "conjunction": { + "$ref": "#/definitions/v1SearchFilterConjunctionOperator" + }, + "values": { + "type": "array", + "uniqueItems": true, + "items": { + "type": "number", + "format": "float64" + } + } + } + }, + "v1SearchFilterGroup": { + "properties": { + "conjunction": { + "$ref": "#/definitions/v1SearchFilterConjunctionOperator" + }, + "filters": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1SearchFilterItem" + } + } + } + }, + "v1SearchFilterIntegerCondition": { + "properties": { + "match": { + "$ref": "#/definitions/v1SearchFilterIntegerConditionMatch" + }, + "negation": { + "type": "boolean" + }, + "operator": { + "$ref": "#/definitions/v1SearchFilterIntegerOperator" + } + } + }, + "v1SearchFilterIntegerConditionMatch": { + "properties": { + "conjunction": { + "$ref": "#/definitions/v1SearchFilterConjunctionOperator" + }, + "values": { + "type": "array", + "uniqueItems": true, + "items": { + "type": "integer" + } + } + } + }, + "v1SearchFilterIntegerOperator": { + "type": "string", + "enum": [ + "eq", + "gt", + "gte", + "lt", + "lte" + ] + }, + "v1SearchFilterItem": { + "properties": { + "condition": { + "$ref": "#/definitions/v1SearchFilterCondition" + }, + "property": { + "type": "string" + }, + "type": { + "$ref": "#/definitions/v1SearchFilterPropertyType" + } + } + }, + "v1SearchFilterKeyValueCondition": { + "properties": { + "ignoreCase": { + "type": "boolean" + }, + "key": { + "type": "string" + }, + "match": { + "$ref": "#/definitions/v1SearchFilterKeyValueConditionMatch" + }, + "negation": { + "type": "boolean" + }, + "operator": { + "$ref": "#/definitions/v1SearchFilterStringOperator" + } + } + }, + "v1SearchFilterKeyValueConditionMatch": { + "properties": { + "conjunction": { + "$ref": "#/definitions/v1SearchFilterConjunctionOperator" + }, + "values": { + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + } + } + } + }, + "v1SearchFilterKeyValueOperator": { + "type": "string", + "enum": [ + "eq" + ] + }, + "v1SearchFilterPropertyType": { + "type": "string", + "enum": [ + "string", + "int", + "float", + "bool", + "date", + "keyValue" + ] + }, + "v1SearchFilterSchemaSpec": { + "properties": { + "schema": { + "$ref": "#/definitions/v1SearchFilterSchemaSpecProperties" + } + } + }, + "v1SearchFilterSchemaSpecEnumValue": { + "properties": { + "displayValue": { + "type": "string" + }, + "value": { + "type": "string" + } + } + }, + "v1SearchFilterSchemaSpecProperties": { + "properties": { + "properties": { + "type": "array", + "items": { + "$ref": "#/definitions/v1SearchFilterSchemaSpecProperty" + } + } + } + }, + "v1SearchFilterSchemaSpecProperty": { + "properties": { + "default": { + "type": "string", + "x-order": 6 + }, + "displayName": { + "type": "string", + "x-order": 2 + }, + "enum": { + "type": "array", + "items": { + "type": "string" + }, + "x-omitempty": true, + "x-order": 4 + }, + "enumValues": { + "type": "array", + "items": { + "$ref": "#/definitions/v1SearchFilterSchemaSpecEnumValue" + }, + "x-omitempty": true, + "x-order": 5 + }, + "hideDisplay": { + "type": "boolean", + "x-order": 1 + }, + "maxFloatVal": { + "type": "number", + "format": "float64", + "x-order": 10 + }, + "maxIntVal": { + "type": "integer", + "format": "int32", + "x-order": 8 + }, + "minFloatVal": { + "type": "number", + "format": "float64", + "x-order": 9 + }, + "minIntVal": { + "type": "integer", + "format": "int32", + "x-order": 7 + }, + "name": { + "type": "string", + "x-order": 0 + }, + "type": { + "type": "string", + "x-order": 3 + } + } + }, + "v1SearchFilterSortSpec": { + "properties": { + "field": { + "$ref": "#/definitions/v1SearchSortFields" + }, + "order": { + "$ref": "#/definitions/v1SortOrder" + } + } + }, + "v1SearchFilterSpec": { + "properties": { + "conjunction": { + "$ref": "#/definitions/v1SearchFilterConjunctionOperator" + }, + "filterGroups": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1SearchFilterGroup" + } + } + } + }, + "v1SearchFilterStringCondition": { + "properties": { + "ignoreCase": { + "type": "boolean" + }, + "match": { + "$ref": "#/definitions/v1SearchFilterStringConditionMatch" + }, + "negation": { + "type": "boolean" + }, + "operator": { + "$ref": "#/definitions/v1SearchFilterStringOperator" + } + } + }, + "v1SearchFilterStringConditionMatch": { + "properties": { + "conjunction": { + "$ref": "#/definitions/v1SearchFilterConjunctionOperator" + }, + "values": { + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + } + } + } + }, + "v1SearchFilterStringOperator": { + "type": "string", + "enum": [ + "eq", + "contains", + "beginsWith" + ] + }, + "v1SearchFilterSummarySpec": { + "description": "Spectro cluster search filter summary spec", + "properties": { + "filter": { + "$ref": "#/definitions/v1SearchFilterSpec" + }, + "sort": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1SearchFilterSortSpec" + } + } + } + }, + "v1SearchSortFields": { + "type": "string", + "enum": [ + "environment", + "clusterName", + "clusterState", + "healthState", + "creationTimestamp", + "lastModifiedTimestamp" + ], + "x-nullable": true + }, + "v1SectroClusterK8sDashboardUrl": { + "description": "Service version information", + "type": "object", + "properties": { + "url": { + "type": "string" + } + } + }, + "v1ServiceManifest": { + "description": "Service manifest information", + "type": "object", + "properties": { + "apiVersion": { + "type": "string" + }, + "kind": { + "type": "string" + }, + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/v1ServiceManifestSpec" + } + } + }, + "v1ServiceManifestSpec": { + "type": "object", + "properties": { + "manifests": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1GitRepoFileContent" + } + }, + "name": { + "type": "string" + }, + "version": { + "type": "string" + } + } + }, + "v1ServicePort": { + "type": "object", + "required": [ + "port" + ], + "properties": { + "port": { + "description": "The port that will be exposed by this service.", + "type": "integer", + "format": "int32" + }, + "protocol": { + "type": "string" + } + } + }, + "v1ServiceSpec": { + "description": "ServiceSpec defines the specification of service registering edge", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "version": { + "type": "string" + } + } + }, + "v1ServiceVersion": { + "description": "Service version information", + "type": "object", + "properties": { + "apiVersion": { + "type": "string" + }, + "kind": { + "type": "string" + }, + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/v1ServiceVersionSpec" + } + } + }, + "v1ServiceVersionSpec": { + "type": "object", + "properties": { + "latestVersion": { + "$ref": "#/definitions/v1GitRepoFileContent" + }, + "name": { + "type": "string" + } + } + }, + "v1SonobuoyEntity": { + "description": "Sonobuoy response", + "required": [ + "requestUid", + "status", + "reports" + ], + "properties": { + "reports": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/v1SonobuoyReportEntity" + } + }, + "requestUid": { + "type": "string" + }, + "status": { + "type": "string", + "enum": [ + "Completed", + "InProgress", + "Failed", + "Initiated" + ] + } + } + }, + "v1SonobuoyLog": { + "description": "Compliance Scan Sonobuoy Log", + "properties": { + "description": { + "type": "string" + }, + "msg": { + "type": "string" + }, + "output": { + "type": "string" + }, + "path": { + "type": "string" + }, + "state": { + "type": "string" + } + } + }, + "v1SonobuoyLogEntity": { + "description": "Sonobuoy log", + "properties": { + "description": { + "type": "string" + }, + "msg": { + "type": "string" + }, + "output": { + "type": "string" + }, + "path": { + "type": "string" + }, + "state": { + "type": "string" + } + } + }, + "v1SonobuoyReport": { + "description": "Compliance Scan Sonobuoy Report", + "properties": { + "fail": { + "type": "integer", + "format": "int32" + }, + "logs": { + "type": "array", + "items": { + "$ref": "#/definitions/v1SonobuoyLog" + } + }, + "node": { + "type": "string" + }, + "pass": { + "type": "integer", + "format": "int32" + }, + "plugin": { + "type": "string" + }, + "status": { + "type": "string" + }, + "total": { + "type": "integer", + "format": "int32" + } + } + }, + "v1SonobuoyReportEntity": { + "description": "Sonobuoy report", + "properties": { + "fail": { + "type": "integer", + "format": "int32" + }, + "logs": { + "type": "array", + "items": { + "$ref": "#/definitions/v1SonobuoyLogEntity" + } + }, + "node": { + "type": "string" + }, + "pass": { + "type": "integer", + "format": "int32" + }, + "plugin": { + "type": "string" + }, + "status": { + "type": "string" + }, + "total": { + "type": "integer", + "format": "int32" + } + } + }, + "v1SortOrder": { + "type": "string", + "default": "asc", + "enum": [ + "asc", + "desc" + ] + }, + "v1SpcApply": { + "type": "object", + "properties": { + "actionType": { + "type": "string", + "enum": [ + "DownloadAndInstall", + "DownloadAndInstallLater" + ] + }, + "canBeApplied": { + "description": "If it is true then Agent can apply the changes to the palette", + "type": "boolean", + "x-omitempty": false + }, + "crdDigest": { + "type": "string" + }, + "lastModifiedTime": { + "$ref": "#/definitions/v1Time" + }, + "patchAppliedTime": { + "$ref": "#/definitions/v1Time" + }, + "spcHash": { + "type": "string" + }, + "spcInfraHash": { + "type": "string" + } + } + }, + "v1SpcApplySettings": { + "type": "object", + "properties": { + "actionType": { + "type": "string", + "enum": [ + "DownloadAndInstall", + "DownloadAndInstallLater" + ] + } + } + }, + "v1SpcPatchTimeEntity": { + "type": "object", + "properties": { + "clusterHash": { + "type": "string" + }, + "patchTime": { + "$ref": "#/definitions/v1Time" + } + } + }, + "v1SpectroAwsClusterEntity": { + "description": "AWS cluster request payload for create and update", + "type": "object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "type": "object", + "required": [ + "cloudType", + "cloudAccountUid", + "cloudConfig" + ], + "properties": { + "cloudAccountUid": { + "description": "Cloud account uid to be used for cluster provisioning", + "type": "string" + }, + "cloudConfig": { + "$ref": "#/definitions/v1AwsClusterConfig" + }, + "clusterConfig": { + "description": "General cluster configuration like health, patching settings, namespace resource allocation, rbac", + "$ref": "#/definitions/v1ClusterConfigEntity" + }, + "clusterType": { + "$ref": "#/definitions/v1ClusterType" + }, + "machinepoolconfig": { + "type": "array", + "items": { + "$ref": "#/definitions/v1AwsMachinePoolConfigEntity" + } + }, + "policies": { + "$ref": "#/definitions/v1SpectroClusterPolicies" + }, + "profiles": { + "type": "array", + "items": { + "$ref": "#/definitions/v1SpectroClusterProfileEntity" + } + } + } + } + } + }, + "v1SpectroAwsClusterImportEntity": { + "description": "Spectro AWS cluster import request payload", + "type": "object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectMetaInputEntity" + }, + "spec": { + "type": "object", + "properties": { + "clusterConfig": { + "$ref": "#/definitions/v1ImportClusterConfig" + } + } + } + } + }, + "v1SpectroAwsClusterRateEntity": { + "description": "Spectro AWS cluster request payload for estimating rate", + "type": "object", + "properties": { + "cloudConfig": { + "$ref": "#/definitions/v1AwsClusterConfig" + }, + "machinepoolconfig": { + "type": "array", + "items": { + "$ref": "#/definitions/v1AwsMachinePoolConfigEntity" + } + } + } + }, + "v1SpectroAzureClusterEntity": { + "description": "Azure cluster request payload for create and update", + "type": "object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "type": "object", + "required": [ + "cloudType", + "cloudAccountUid", + "cloudConfig" + ], + "properties": { + "cloudAccountUid": { + "description": "Cloud account uid to be used for cluster provisioning", + "type": "string" + }, + "cloudConfig": { + "$ref": "#/definitions/v1AzureClusterConfig" + }, + "clusterConfig": { + "description": "General cluster configuration like health, patching settings, namespace resource allocation, rbac", + "$ref": "#/definitions/v1ClusterConfigEntity" + }, + "machinepoolconfig": { + "type": "array", + "items": { + "$ref": "#/definitions/v1AzureMachinePoolConfigEntity" + } + }, + "policies": { + "$ref": "#/definitions/v1SpectroClusterPolicies" + }, + "profiles": { + "type": "array", + "items": { + "$ref": "#/definitions/v1SpectroClusterProfileEntity" + } + } + } + } + } + }, + "v1SpectroAzureClusterImportEntity": { + "description": "Spectro Azure cluster import request payload", + "type": "object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectMetaInputEntity" + }, + "spec": { + "type": "object", + "properties": { + "clusterConfig": { + "$ref": "#/definitions/v1ImportClusterConfig" + } + } + } + } + }, + "v1SpectroAzureClusterRateEntity": { + "description": "Spectro Azure cluster request payload for estimating rate", + "type": "object", + "properties": { + "cloudConfig": { + "$ref": "#/definitions/v1AzureClusterConfig" + }, + "machinepoolconfig": { + "type": "array", + "items": { + "$ref": "#/definitions/v1AzureMachinePoolConfigEntity" + } + } + } + }, + "v1SpectroCluster": { + "description": "SpectroCluster is the Schema for the spectroclusters API", + "type": "object", + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + "type": "string" + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/v1SpectroClusterSpec" + }, + "status": { + "$ref": "#/definitions/v1SpectroClusterStatus" + } + } + }, + "v1SpectroClusterAddOnService": { + "description": "Spectro cluster addon service", + "properties": { + "endpoint": { + "type": "string" + }, + "name": { + "type": "string" + } + } + }, + "v1SpectroClusterAddOnServiceSummary": { + "description": "Spectro cluster status summary", + "properties": { + "endpoint": { + "type": "string" + }, + "name": { + "type": "string" + } + } + }, + "v1SpectroClusterAssetEntity": { + "description": "Cluster asset", + "type": "object", + "properties": { + "spec": { + "type": "object", + "properties": { + "frpKubeconfig": { + "type": "string" + }, + "kubeconfig": { + "type": "string" + }, + "kubeconfigclient": { + "type": "string" + }, + "manifest": { + "type": "string" + } + } + } + } + }, + "v1SpectroClusterAssetFrpKubeConfig": { + "description": "Cluster asset Frp Kube Config", + "type": "object", + "properties": { + "frpKubeconfig": { + "type": "string" + } + } + }, + "v1SpectroClusterAssetKubeConfig": { + "description": "Cluster asset Kube Config", + "type": "object", + "properties": { + "kubeconfig": { + "type": "string" + } + } + }, + "v1SpectroClusterAssetKubeConfigClient": { + "description": "Cluster asset Kube Config Client", + "type": "object", + "properties": { + "kubeconfigclient": { + "type": "string" + } + } + }, + "v1SpectroClusterAssetManifest": { + "description": "Cluster asset", + "type": "object", + "properties": { + "manifest": { + "type": "string" + } + } + }, + "v1SpectroClusterCloudCost": { + "description": "Spectro cluster cloud cost information", + "type": "object", + "properties": { + "cost": { + "$ref": "#/definitions/v1ResourceCost" + }, + "data": { + "type": "array", + "items": { + "$ref": "#/definitions/v1CloudCostDataPoint" + } + } + } + }, + "v1SpectroClusterCloudCostSummaryFilter": { + "description": "Spectro cluster cloud cost summary filter", + "type": "object", + "properties": { + "clouds": { + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + } + }, + "endTime": { + "$ref": "#/definitions/v1Time" + }, + "projects": { + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + } + }, + "startTime": { + "$ref": "#/definitions/v1Time" + }, + "workspaces": { + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + } + } + } + }, + "v1SpectroClusterCloudCostSummaryOptions": { + "description": "Spectro cluster cloud cost summary options", + "type": "object", + "properties": { + "groupBy": { + "type": "string", + "default": "project", + "enum": [ + "tenant", + "project", + "cloud", + "cluster" + ] + }, + "period": { + "type": "integer", + "format": "int32", + "default": 1440 + } + } + }, + "v1SpectroClusterCloudCostSummarySpec": { + "description": "Spectro cluster cloud cost summary spec", + "type": "object", + "properties": { + "filter": { + "$ref": "#/definitions/v1SpectroClusterCloudCostSummaryFilter" + }, + "options": { + "$ref": "#/definitions/v1SpectroClusterCloudCostSummaryOptions" + } + } + }, + "v1SpectroClusterCost": { + "description": "Spectro cluster cost information", + "type": "object", + "properties": { + "cloud": { + "$ref": "#/definitions/v1SpectroClusterCloudCost" + }, + "cost": { + "$ref": "#/definitions/v1ResourceCost" + }, + "name": { + "type": "string" + }, + "uid": { + "type": "string" + } + } + }, + "v1SpectroClusterCostSummary": { + "type": "object", + "properties": { + "cluster": { + "$ref": "#/definitions/v1SpectroClusterCost" + }, + "endTime": { + "$ref": "#/definitions/v1Time" + }, + "period": { + "type": "integer", + "format": "int32" + }, + "startTime": { + "$ref": "#/definitions/v1Time" + } + } + }, + "v1SpectroClusterHealthCondition": { + "description": "Spectro cluster health condition", + "properties": { + "message": { + "type": "string" + }, + "relatedObject": { + "type": "object", + "$ref": "#/definitions/v1RelatedObject" + }, + "type": { + "type": "string" + } + } + }, + "v1SpectroClusterHealthStatus": { + "description": "Spectro cluster health status", + "properties": { + "agentVersion": { + "type": "string" + }, + "conditions": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1SpectroClusterHealthCondition" + } + }, + "lastHeartBeatTimestamp": { + "$ref": "#/definitions/v1Time" + }, + "state": { + "type": "string" + } + } + }, + "v1SpectroClusterK8sCertificate": { + "description": "K8 Certificates for all the cluster's control plane nodes", + "type": "object", + "properties": { + "machineCertificates": { + "type": "array", + "items": { + "$ref": "#/definitions/v1K8MachineCertificate" + } + } + } + }, + "v1SpectroClusterKubeCtlRedirect": { + "description": "Active resources of tenant", + "type": "object", + "properties": { + "redirectUri": { + "type": "string" + } + } + }, + "v1SpectroClusterLocationInputEntity": { + "description": "Cluster location", + "type": "object", + "properties": { + "location": { + "$ref": "#/definitions/v1ClusterLocation" + } + } + }, + "v1SpectroClusterMetaSummary": { + "description": "Spectro cluster meta summary", + "type": "object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "specSummary": { + "description": "Spectro cluster meta summary", + "type": "object", + "properties": { + "archType": { + "description": "Architecture type of the cluster", + "type": "array", + "items": { + "type": "string", + "default": "amd64", + "enum": [ + "arm64", + "amd64" + ] + } + }, + "cloudAccountUid": { + "type": "string" + }, + "cloudRegion": { + "type": "string" + }, + "cloudType": { + "type": "string" + }, + "clusterType": { + "type": "string" + }, + "importMode": { + "type": "string" + }, + "location": { + "$ref": "#/definitions/v1ClusterMetaSpecLocation" + }, + "projectMeta": { + "$ref": "#/definitions/v1ProjectMeta" + }, + "tags": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "status": { + "description": "Spectro cluster meta status summary", + "properties": { + "cost": { + "$ref": "#/definitions/v1ClusterMetaStatusCost" + }, + "fips": { + "$ref": "#/definitions/v1ClusterFips" + }, + "health": { + "$ref": "#/definitions/v1ClusterMetaStatusHealth" + }, + "state": { + "type": "string" + }, + "updates": { + "$ref": "#/definitions/v1ClusterMetaStatusUpdates" + } + } + } + } + }, + "v1SpectroClusterMetadataFilterSpec": { + "description": "Spectro cluster filter spec", + "properties": { + "environment": { + "type": "string" + }, + "includeVirtual": { + "type": "boolean", + "default": false + }, + "isAlloy": { + "description": "isAlloy is renamed to isImported", + "type": "boolean", + "default": false + }, + "isImportReadOnly": { + "type": "boolean", + "default": true + }, + "isImported": { + "type": "boolean", + "default": false + }, + "name": { + "$ref": "#/definitions/v1FilterString" + }, + "state": { + "type": "string" + } + } + }, + "v1SpectroClusterMetadataSpec": { + "description": "Spectro cluster metadata spec", + "properties": { + "filter": { + "$ref": "#/definitions/v1SpectroClusterMetadataFilterSpec" + }, + "sort": { + "type": "string", + "enum": [ + "environment", + "state", + "name" + ], + "x-nullable": true + } + } + }, + "v1SpectroClusterMetrics": { + "description": "Spectro cluster metrics", + "properties": { + "cpu": { + "$ref": "#/definitions/v1ComputeMetrics" + }, + "memory": { + "$ref": "#/definitions/v1ComputeMetrics" + } + } + }, + "v1SpectroClusterOidcClaims": { + "type": "object", + "properties": { + "Email": { + "type": "string", + "x-omitempty": false + }, + "FirstName": { + "type": "string", + "x-omitempty": false + }, + "LastName": { + "type": "string", + "x-omitempty": false + }, + "SpectroTeam": { + "type": "string", + "x-omitempty": false + } + } + }, + "v1SpectroClusterOidcIssuerTlsSpec": { + "type": "object", + "properties": { + "caCertificateBase64": { + "type": "string", + "x-omitempty": false + }, + "insecureSkipVerify": { + "type": "boolean", + "default": false, + "x-omitempty": false + } + } + }, + "v1SpectroClusterOidcSpec": { + "type": "object", + "properties": { + "clientId": { + "type": "string", + "x-omitempty": false + }, + "clientSecret": { + "type": "string", + "x-omitempty": false + }, + "issuerTls": { + "$ref": "#/definitions/v1SpectroClusterOidcIssuerTlsSpec" + }, + "issuerUrl": { + "description": "the issuer is the URL identifier for the service", + "type": "string", + "x-omitempty": false + }, + "requiredClaims": { + "$ref": "#/definitions/v1SpectroClusterOidcClaims" + }, + "scopes": { + "type": "array", + "items": { + "type": "string" + }, + "x-omitempty": false + } + } + }, + "v1SpectroClusterPackCondition": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "reason": { + "type": "string" + }, + "status": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "ReadyForInstall", + "Installed", + "Ready", + "Error", + "UpgradeAvailable", + "WaitingForOtherLayers" + ] + } + } + }, + "v1SpectroClusterPackConfigList": { + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1PackConfig" + } + } + } + }, + "v1SpectroClusterPackDiff": { + "description": "Cluster pack difference", + "type": "object", + "properties": { + "current": { + "$ref": "#/definitions/v1PackRef" + }, + "diffConfigKeys": { + "type": "array", + "items": { + "type": "string" + } + }, + "target": { + "$ref": "#/definitions/v1PackRef" + } + } + }, + "v1SpectroClusterPackProperties": { + "description": "Cluster pack properties response", + "type": "object", + "properties": { + "yaml": { + "type": "string", + "x-omitempty": false + } + } + }, + "v1SpectroClusterPackStatusEntity": { + "type": "object", + "properties": { + "condition": { + "description": "Pack deployment status conditions", + "$ref": "#/definitions/v1SpectroClusterPackCondition" + }, + "endTime": { + "description": "Pack deployment end time", + "$ref": "#/definitions/v1Time" + }, + "name": { + "description": "Pack name", + "type": "string" + }, + "profileUid": { + "description": "Cluster profile uid", + "type": "string" + }, + "startTime": { + "description": "Pack deployment start time", + "$ref": "#/definitions/v1Time" + }, + "type": { + "$ref": "#/definitions/v1PackType" + }, + "version": { + "description": "pack version", + "type": "string" + } + } + }, + "v1SpectroClusterPacksEntity": { + "description": "Cluster entity for pack refs validate", + "type": "object", + "properties": { + "profiles": { + "type": "array", + "items": { + "$ref": "#/definitions/v1SpectroClusterProfileEntity" + } + } + } + }, + "v1SpectroClusterPacksStatusEntity": { + "type": "object", + "properties": { + "packs": { + "type": "array", + "items": { + "$ref": "#/definitions/v1SpectroClusterPackStatusEntity" + } + } + } + }, + "v1SpectroClusterPolicies": { + "description": "Cluster policies", + "type": "object", + "properties": { + "backupPolicy": { + "$ref": "#/definitions/v1ClusterBackupConfig" + }, + "scanPolicy": { + "$ref": "#/definitions/v1ClusterComplianceScheduleConfig" + } + } + }, + "v1SpectroClusterProfile": { + "description": "Cluster profile response", + "type": "object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/v1SpectroClusterProfileSpec" + } + } + }, + "v1SpectroClusterProfileEntity": { + "description": "Cluster profile request payload", + "type": "object", + "properties": { + "packValues": { + "description": "Cluster profile packs array", + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1PackValuesEntity" + } + }, + "replaceWithProfile": { + "description": "Cluster profile uid to be replaced with new profile", + "type": "string" + }, + "uid": { + "description": "Cluster profile uid", + "type": "string" + }, + "variables": { + "type": "array", + "items": { + "$ref": "#/definitions/v1SpectroClusterVariable" + } + } + } + }, + "v1SpectroClusterProfileList": { + "type": "object", + "required": [ + "profiles" + ], + "properties": { + "profiles": { + "type": "array", + "items": { + "$ref": "#/definitions/v1SpectroClusterProfile" + } + } + } + }, + "v1SpectroClusterProfileSpec": { + "description": "Cluster profile spec response", + "type": "object", + "properties": { + "cloudType": { + "description": "Cluster profile cloud type", + "type": "string" + }, + "packs": { + "description": "Cluster profile packs array", + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1ClusterProfilePacksEntity" + } + }, + "relatedObject": { + "description": "RelatedObject refers to the type of object(clustergroup, cluster or edgeHost) the cluster profile is associated with", + "$ref": "#/definitions/v1ObjectReference" + }, + "type": { + "description": "Cluster profile type [ \"cluster\", \"infra\", \"add-on\", \"system\" ]", + "type": "string" + }, + "version": { + "description": "Cluster profile version", + "type": "integer", + "format": "int32" + } + } + }, + "v1SpectroClusterProfileUpdates": { + "type": "object", + "properties": { + "profiles": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1ClusterProfileTemplate" + } + } + } + }, + "v1SpectroClusterProfileValidatorResponse": { + "description": "Cluster profile validator response", + "type": "object", + "properties": { + "packs": { + "$ref": "#/definitions/v1ConstraintValidatorResponse" + }, + "uid": { + "description": "Cluster profile uid", + "type": "string" + } + } + }, + "v1SpectroClusterProfiles": { + "type": "object", + "required": [ + "profiles" + ], + "properties": { + "profiles": { + "type": "array", + "items": { + "$ref": "#/definitions/v1SpectroClusterProfileEntity" + } + }, + "spcApplySettings": { + "$ref": "#/definitions/v1SpcApplySettings" + } + } + }, + "v1SpectroClusterProfilesDeleteEntity": { + "type": "object", + "properties": { + "profileUids": { + "description": "Cluster's profile uid list", + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + } + } + } + }, + "v1SpectroClusterProfilesPacksManifests": { + "type": "object", + "required": [ + "profiles" + ], + "properties": { + "profiles": { + "type": "array", + "items": { + "$ref": "#/definitions/v1ClusterProfilePacksManifests" + } + } + } + }, + "v1SpectroClusterProfilesParamReferenceEntity": { + "description": "Cluster profiles param reference entity", + "type": "object", + "properties": { + "references": { + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + } + } + } + }, + "v1SpectroClusterProfilesResolvedValues": { + "description": "Cluster profiles resolved values response", + "type": "object", + "properties": { + "profiles": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1ProfileResolvedValues" + } + } + } + }, + "v1SpectroClusterRate": { + "description": "Cluster estimated rate information", + "type": "object", + "properties": { + "machinePools": { + "type": "array", + "items": { + "$ref": "#/definitions/v1MachinePoolRate" + } + }, + "name": { + "type": "string" + }, + "rate": { + "$ref": "#/definitions/v1TotalClusterRate" + }, + "resourceMetadata": { + "$ref": "#/definitions/v1CloudResourceMetadata" + } + } + }, + "v1SpectroClusterRepave": { + "description": "Spectro cluster repave status information", + "type": "object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/v1SpectroClusterRepaveSpec" + }, + "status": { + "$ref": "#/definitions/v1SpectroClusterRepaveStatus" + } + } + }, + "v1SpectroClusterRepaveReason": { + "description": "Cluster repave reason description", + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "pack": { + "$ref": "#/definitions/v1SpectroClusterPackDiff" + } + } + }, + "v1SpectroClusterRepaveSpec": { + "type": "object", + "properties": { + "reasons": { + "description": "Spectro cluster repave reasons", + "type": "array", + "items": { + "$ref": "#/definitions/v1SpectroClusterRepaveReason" + } + }, + "source": { + "$ref": "#/definitions/v1ClusterRepaveSource" + }, + "spectroClusterUid": { + "type": "string" + } + } + }, + "v1SpectroClusterRepaveStatus": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "repaveTransitionTime": { + "$ref": "#/definitions/v1Time" + }, + "state": { + "$ref": "#/definitions/v1ClusterRepaveState" + } + } + }, + "v1SpectroClusterRepaveValidationResponse": { + "description": "Cluster repave validation response", + "type": "object", + "properties": { + "isRepaveRequired": { + "description": "If true then the pack changes can cause cluster repave", + "type": "boolean", + "x-omitempty": false + }, + "reasons": { + "type": "array", + "items": { + "$ref": "#/definitions/v1SpectroClusterRepaveReason" + } + } + } + }, + "v1SpectroClusterSpec": { + "description": "SpectroClusterSpec defines the desired state of SpectroCluster", + "type": "object", + "properties": { + "cloudConfigRef": { + "description": "CloudConfigRef point to the cloud configuration for the cluster, input by user Ref types are: AwsCloudConfig/VsphereCloudConfig/BaremetalConfig/ etc this user config will be used to generate cloud specific cluster/machine spec for cluster-api For VM, it will contain information needed to launch VMs, like cloud account, instance type For BM, it will contain actual baremetal machines", + "$ref": "#/definitions/v1ObjectReference" + }, + "cloudType": { + "type": "string" + }, + "clusterConfig": { + "description": "ClusterConfig is the configuration related to a general cluster. Configuration related to the health of the cluster.", + "$ref": "#/definitions/v1ClusterConfig" + }, + "clusterProfileTemplates": { + "description": "When a cluster created from a clusterprofile at t1, ClusterProfileTemplate is a copy of the draft version or latest published version of the clusterprofileSpec.clusterprofileTemplate then clusterprofile may evolve to v2 at t2, but before user decide to upgrade the cluster, it will stay as it is when user decide to upgrade, clusterProfileTemplate will be updated from the clusterprofile pointed by ClusterProfileRef", + "type": "array", + "items": { + "$ref": "#/definitions/v1ClusterProfileTemplate" + } + }, + "clusterType": { + "type": "string", + "enum": [ + "PureManage", + "AlloyMonitor", + "AlloyAssist", + "AlloyExtend" + ] + } + } + }, + "v1SpectroClusterState": { + "description": "Spectrocluster state entity", + "type": "object", + "properties": { + "state": { + "description": "Spectrocluster state", + "type": "string" + } + } + }, + "v1SpectroClusterStatus": { + "description": "SpectroClusterStatus", + "type": "object", + "properties": { + "abortTimestamp": { + "$ref": "#/definitions/v1Time" + }, + "addOnServices": { + "type": "array", + "items": { + "$ref": "#/definitions/v1SpectroClusterAddOnService" + } + }, + "apiEndpoints": { + "type": "array", + "items": { + "$ref": "#/definitions/v1APIEndpoint" + } + }, + "clusterImport": { + "$ref": "#/definitions/v1ClusterImport" + }, + "conditions": { + "type": "array", + "items": { + "$ref": "#/definitions/v1ClusterCondition" + } + }, + "fips": { + "$ref": "#/definitions/v1ClusterFips" + }, + "location": { + "$ref": "#/definitions/v1ClusterLocation" + }, + "packs": { + "type": "array", + "items": { + "$ref": "#/definitions/v1ClusterPackStatus" + } + }, + "profileStatus": { + "$ref": "#/definitions/v1ProfileStatus" + }, + "repave": { + "$ref": "#/definitions/v1ClusterRepaveStatus" + }, + "services": { + "type": "array", + "items": { + "$ref": "#/definitions/v1LoadBalancerService" + } + }, + "spcApply": { + "$ref": "#/definitions/v1SpcApply" + }, + "state": { + "description": "current operational state", + "type": "string" + }, + "upgrades": { + "type": "array", + "items": { + "$ref": "#/definitions/v1Upgrades" + } + }, + "virtual": { + "$ref": "#/definitions/v1Virtual" + } + } + }, + "v1SpectroClusterStatusEntity": { + "description": "Spectrocluster status entity", + "type": "object", + "properties": { + "status": { + "$ref": "#/definitions/v1SpectroClusterState" + } + } + }, + "v1SpectroClusterSummary": { + "description": "Spectro cluster summary", + "type": "object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "specSummary": { + "description": "Spectro cluster spec summary", + "type": "object", + "properties": { + "archTypes": { + "description": "Architecture type of the cluster", + "type": "array", + "items": { + "$ref": "#/definitions/v1ArchType" + } + }, + "cloudAccountMeta": { + "$ref": "#/definitions/v1CloudAccountMeta" + }, + "cloudConfig": { + "$ref": "#/definitions/v1CloudConfigMeta" + }, + "clusterConfig": { + "$ref": "#/definitions/v1ClusterConfigResponse" + }, + "clusterProfileTemplate": { + "$ref": "#/definitions/v1ClusterProfileTemplateMeta" + }, + "clusterProfileTemplates": { + "type": "array", + "items": { + "$ref": "#/definitions/v1ClusterProfileTemplateMeta" + } + }, + "projectMeta": { + "$ref": "#/definitions/v1ProjectMeta" + } + } + }, + "status": { + "description": "Spectro cluster status summary", + "properties": { + "clusterImport": { + "$ref": "#/definitions/v1ClusterImport" + }, + "cost": { + "$ref": "#/definitions/v1ResourceCost" + }, + "fips": { + "$ref": "#/definitions/v1ClusterFips" + }, + "health": { + "$ref": "#/definitions/v1SpectroClusterHealthStatus" + }, + "hourlyRate": { + "$ref": "#/definitions/v1ResourceCost" + }, + "location": { + "$ref": "#/definitions/v1ClusterMetaSpecLocation" + }, + "metrics": { + "$ref": "#/definitions/v1SpectroClusterMetrics" + }, + "notifications": { + "$ref": "#/definitions/v1ClusterNotificationStatus" + }, + "repave": { + "$ref": "#/definitions/v1ClusterRepaveStatus" + }, + "state": { + "type": "string" + }, + "virtual": { + "$ref": "#/definitions/v1Virtual" + } + } + } + } + }, + "v1SpectroClusterUidStatusSummary": { + "description": "Spectro cluster status summary", + "properties": { + "abortTimestamp": { + "$ref": "#/definitions/v1Time" + }, + "addOnServices": { + "type": "array", + "items": { + "$ref": "#/definitions/v1SpectroClusterAddOnServiceSummary" + } + }, + "apiEndpoints": { + "type": "array", + "items": { + "$ref": "#/definitions/v1APIEndpoint" + } + }, + "clusterImport": { + "$ref": "#/definitions/v1ClusterImport" + }, + "conditions": { + "type": "array", + "items": { + "$ref": "#/definitions/v1ClusterCondition" + } + }, + "cost": { + "$ref": "#/definitions/v1ResourceCost" + }, + "fips": { + "$ref": "#/definitions/v1ClusterFips" + }, + "health": { + "$ref": "#/definitions/v1SpectroClusterHealthStatus" + }, + "hourlyRate": { + "$ref": "#/definitions/v1ResourceCost" + }, + "kubeMeta": { + "$ref": "#/definitions/v1KubeMeta" + }, + "location": { + "$ref": "#/definitions/v1ClusterMetaSpecLocation" + }, + "metrics": { + "$ref": "#/definitions/v1SpectroClusterMetrics" + }, + "notifications": { + "$ref": "#/definitions/v1ClusterNotificationStatus" + }, + "packs": { + "type": "array", + "items": { + "$ref": "#/definitions/v1ClusterPackStatus" + } + }, + "services": { + "type": "array", + "items": { + "$ref": "#/definitions/v1LoadBalancerService" + } + }, + "spcApply": { + "$ref": "#/definitions/v1SpcApply" + }, + "state": { + "description": "current operational state", + "type": "string" + }, + "upgrades": { + "type": "array", + "items": { + "$ref": "#/definitions/v1Upgrades" + } + }, + "virtual": { + "$ref": "#/definitions/v1Virtual" + }, + "workspaces": { + "type": "array", + "items": { + "$ref": "#/definitions/v1ResourceReference" + } + } + } + }, + "v1SpectroClusterUidSummary": { + "description": "Spectro cluster summary", + "type": "object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "description": "Spectro cluster spec summary", + "type": "object", + "properties": { + "archTypes": { + "description": "Architecture types of the cluster", + "type": "array", + "items": { + "$ref": "#/definitions/v1ArchType" + } + }, + "cloudConfig": { + "$ref": "#/definitions/v1CloudConfigMeta" + }, + "cloudaccount": { + "$ref": "#/definitions/v1CloudAccountMeta" + }, + "clusterProfileTemplate": { + "$ref": "#/definitions/v1ClusterProfileTemplateMeta" + }, + "clusterProfileTemplates": { + "type": "array", + "items": { + "$ref": "#/definitions/v1ClusterProfileTemplateMeta" + } + } + } + }, + "status": { + "$ref": "#/definitions/v1SpectroClusterUidStatusSummary" + } + } + }, + "v1SpectroClusterUidUpgrades": { + "description": "Cluster status upgrades", + "type": "object", + "properties": { + "upgrades": { + "type": "array", + "items": { + "$ref": "#/definitions/v1Upgrades" + } + } + } + }, + "v1SpectroClusterVMCloneEntity": { + "type": "object", + "required": [ + "cloneName" + ], + "properties": { + "annotationFilters": { + "description": "Annotation filters", + "type": "array", + "items": { + "type": "string" + } + }, + "cloneName": { + "description": "Cloning Virtual machine's name", + "type": "string" + }, + "labelFilters": { + "description": "Label filters", + "type": "array", + "items": { + "type": "string" + } + }, + "newMacAddresses": { + "description": "NewMacAddresses manually sets that target interfaces' mac addresses. The key is the interface name and the value is the new mac address. If this field is not specified, a new MAC address will be generated automatically, as for any interface that is not included in this map", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "newSMBiosSerial": { + "description": "NewSMBiosSerial manually sets that target's SMbios serial. If this field is not specified, a new serial will be generated automatically.", + "type": "string" + } + } + }, + "v1SpectroClusterValidatorResponse": { + "description": "Cluster validator response", + "type": "object", + "properties": { + "machinePools": { + "$ref": "#/definitions/v1ConstraintValidatorResponse" + }, + "profiles": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1SpectroClusterProfileValidatorResponse" + } + } + } + }, + "v1SpectroClusterVariable": { + "description": "Variable with value which will be used within the packs of cluster profile", + "type": "object", + "required": [ + "name" + ], + "properties": { + "name": { + "description": "Variable name", + "type": "string" + }, + "value": { + "description": "Actual value of the variable to be used within the cluster", + "type": "string" + } + } + }, + "v1SpectroClustersHealth": { + "description": "Spectro Clusters health data", + "type": "object", + "properties": { + "errored": { + "type": "integer", + "format": "int32", + "x-omitempty": false + }, + "healthy": { + "type": "integer", + "format": "int32", + "x-omitempty": false + }, + "running": { + "type": "integer", + "format": "int32", + "x-omitempty": false + }, + "unhealthy": { + "type": "integer", + "format": "int32", + "x-omitempty": false + } + } + }, + "v1SpectroClustersMetadata": { + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1ObjectMeta" + } + } + } + }, + "v1SpectroClustersMetadataSearch": { + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1SpectroClusterMetaSummary" + } + }, + "listmeta": { + "$ref": "#/definitions/v1ListMetaData" + } + } + }, + "v1SpectroClustersSummary": { + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1SpectroClusterSummary" + } + }, + "listmeta": { + "$ref": "#/definitions/v1ListMetaData" + } + } + }, + "v1SpectroCustomClusterEntity": { + "description": "Custom cluster request payload for create and update", + "type": "object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectMetaInputEntity" + }, + "spec": { + "type": "object", + "required": [ + "cloudType", + "cloudAccountUid", + "cloudConfig" + ], + "properties": { + "cloudAccountUid": { + "description": "Cloud account uid to be used for cluster provisioning", + "type": "string" + }, + "cloudConfig": { + "$ref": "#/definitions/v1CustomClusterConfig" + }, + "clusterConfig": { + "description": "General cluster configuration like patching settings, namespace resource allocation, rbac", + "$ref": "#/definitions/v1CustomClusterConfigEntity" + }, + "clusterType": { + "$ref": "#/definitions/v1ClusterType" + }, + "machinepoolconfig": { + "type": "array", + "items": { + "$ref": "#/definitions/v1CustomMachinePoolConfigEntity" + } + }, + "profiles": { + "type": "array", + "items": { + "$ref": "#/definitions/v1SpectroClusterProfileEntity" + } + } + } + } + } + }, + "v1SpectroEdgeNativeClusterEntity": { + "description": "EdgeNative cluster create or update request payload", + "type": "object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "type": "object", + "properties": { + "cloudConfig": { + "$ref": "#/definitions/v1EdgeNativeClusterConfig" + }, + "clusterConfig": { + "description": "General cluster configuration like health, patching settings, namespace resource allocation, rbac", + "$ref": "#/definitions/v1ClusterConfigEntity" + }, + "machinepoolconfig": { + "type": "array", + "items": { + "$ref": "#/definitions/v1EdgeNativeMachinePoolConfigEntity" + } + }, + "policies": { + "$ref": "#/definitions/v1SpectroClusterPolicies" + }, + "profiles": { + "type": "array", + "items": { + "$ref": "#/definitions/v1SpectroClusterProfileEntity" + } + } + } + } + } + }, + "v1SpectroEdgeNativeClusterImportEntity": { + "description": "Spectro EdgeNative cluster import request payload", + "type": "object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectMetaInputEntity" + }, + "spec": { + "type": "object", + "properties": { + "clusterConfig": { + "$ref": "#/definitions/v1ImportClusterConfig" + } + } + } + } + }, + "v1SpectroEdgeNativeClusterRateEntity": { + "description": "Edge-native cluster request payload for estimating rate", + "type": "object", + "properties": { + "cloudConfig": { + "$ref": "#/definitions/v1EdgeNativeClusterConfig" + }, + "machinepoolconfig": { + "type": "array", + "items": { + "$ref": "#/definitions/v1EdgeNativeMachinePoolConfigEntity" + } + } + } + }, + "v1SpectroEksClusterEntity": { + "description": "Spectro EKS cluster request payload for create and update", + "type": "object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "type": "object", + "required": [ + "cloudAccountUid", + "cloudConfig" + ], + "properties": { + "cloudAccountUid": { + "description": "Cloud account uid to be used for cluster provisioning", + "type": "string" + }, + "cloudConfig": { + "$ref": "#/definitions/v1EksClusterConfig" + }, + "clusterConfig": { + "description": "General cluster configuration like health, patching settings, namespace resource allocation, rbac", + "$ref": "#/definitions/v1ClusterConfigEntity" + }, + "fargateProfiles": { + "type": "array", + "items": { + "$ref": "#/definitions/v1FargateProfile" + } + }, + "machinepoolconfig": { + "type": "array", + "items": { + "$ref": "#/definitions/v1EksMachinePoolConfigEntity" + } + }, + "policies": { + "$ref": "#/definitions/v1SpectroClusterPolicies" + }, + "profiles": { + "type": "array", + "items": { + "$ref": "#/definitions/v1SpectroClusterProfileEntity" + } + } + } + } + } + }, + "v1SpectroEksClusterRateEntity": { + "description": "Spectro EKS cluster request payload for estimating rate", + "type": "object", + "properties": { + "cloudConfig": { + "$ref": "#/definitions/v1EksClusterConfig" + }, + "machinepoolconfig": { + "type": "array", + "items": { + "$ref": "#/definitions/v1EksMachinePoolConfigEntity" + } + } + } + }, + "v1SpectroGcpClusterEntity": { + "description": "GCP cluster request payload for create and update", + "type": "object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "type": "object", + "required": [ + "cloudType", + "cloudAccountUid", + "cloudConfig" + ], + "properties": { + "cloudAccountUid": { + "description": "Cloud account uid to be used for cluster provisioning", + "type": "string" + }, + "cloudConfig": { + "$ref": "#/definitions/v1GcpClusterConfig" + }, + "clusterConfig": { + "description": "General cluster configuration like health, patching settings, namespace resource allocation, rbac", + "$ref": "#/definitions/v1ClusterConfigEntity" + }, + "machinepoolconfig": { + "type": "array", + "items": { + "$ref": "#/definitions/v1GcpMachinePoolConfigEntity" + } + }, + "policies": { + "$ref": "#/definitions/v1SpectroClusterPolicies" + }, + "profiles": { + "type": "array", + "items": { + "$ref": "#/definitions/v1SpectroClusterProfileEntity" + } + } + } + } + } + }, + "v1SpectroGcpClusterImportEntity": { + "description": "Spectro GCP cluster import request payload", + "type": "object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectMetaInputEntity" + }, + "spec": { + "type": "object", + "properties": { + "clusterConfig": { + "$ref": "#/definitions/v1ImportClusterConfig" + } + } + } + } + }, + "v1SpectroGcpClusterRateEntity": { + "description": "Gcp cluster request payload for estimating rate", + "type": "object", + "properties": { + "cloudConfig": { + "$ref": "#/definitions/v1GcpClusterConfig" + }, + "machinepoolconfig": { + "type": "array", + "items": { + "$ref": "#/definitions/v1GcpMachinePoolConfigEntity" + } + } + } + }, + "v1SpectroGenericClusterImportEntity": { + "description": "Spectro generic cluster import request payload", + "type": "object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectMetaInputEntity" + }, + "spec": { + "type": "object", + "properties": { + "clusterConfig": { + "$ref": "#/definitions/v1ImportClusterConfig" + }, + "edgeConfig": { + "$ref": "#/definitions/v1ImportEdgeHostConfig" + } + } + } + } + }, + "v1SpectroGenericClusterRateEntity": { + "description": "Generic cluster request payload for estimating rate", + "type": "object", + "properties": { + "cloudConfig": { + "$ref": "#/definitions/v1GenericClusterConfig" + }, + "machinepoolconfig": { + "type": "array", + "items": { + "$ref": "#/definitions/v1GenericMachinePoolConfigEntity" + } + } + } + }, + "v1SpectroMaasClusterEntity": { + "description": "Spectro Maas cluster request payload for create and update", + "type": "object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "type": "object", + "required": [ + "cloudType", + "cloudAccountUid", + "cloudConfig" + ], + "properties": { + "cloudAccountUid": { + "description": "Cloud account uid to be used for cluster provisioning", + "type": "string" + }, + "cloudConfig": { + "$ref": "#/definitions/v1MaasClusterConfig" + }, + "clusterConfig": { + "description": "General cluster configuration like health, patching settings, namespace resource allocation, rbac", + "$ref": "#/definitions/v1ClusterConfigEntity" + }, + "machinepoolconfig": { + "type": "array", + "items": { + "$ref": "#/definitions/v1MaasMachinePoolConfigEntity" + } + }, + "policies": { + "$ref": "#/definitions/v1SpectroClusterPolicies" + }, + "profiles": { + "type": "array", + "items": { + "$ref": "#/definitions/v1SpectroClusterProfileEntity" + } + } + } + } + } + }, + "v1SpectroMaasClusterImportEntity": { + "description": "Spectro maas cluster import request payload", + "type": "object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectMetaInputEntity" + }, + "spec": { + "type": "object", + "properties": { + "clusterConfig": { + "$ref": "#/definitions/v1ImportClusterConfig" + } + } + } + } + }, + "v1SpectroMaasClusterRateEntity": { + "description": "Maas cluster request payload for estimating rate", + "type": "object", + "properties": { + "cloudConfig": { + "$ref": "#/definitions/v1MaasClusterConfig" + }, + "machinepoolconfig": { + "type": "array", + "items": { + "$ref": "#/definitions/v1MaasMachinePoolConfigEntity" + } + } + } + }, + "v1SpectroOpenStackClusterEntity": { + "description": "OpenStack cluster request payload for create and update", + "type": "object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "type": "object", + "required": [ + "cloudAccountUid", + "cloudConfig" + ], + "properties": { + "cloudAccountUid": { + "description": "Cloud account uid to be used for cluster provisioning", + "type": "string" + }, + "cloudConfig": { + "$ref": "#/definitions/v1OpenStackClusterConfig" + }, + "clusterConfig": { + "description": "General cluster configuration like health, patching settings, namespace resource allocation, rbac", + "$ref": "#/definitions/v1ClusterConfigEntity" + }, + "machinepoolconfig": { + "type": "array", + "items": { + "$ref": "#/definitions/v1OpenStackMachinePoolConfigEntity" + } + }, + "policies": { + "$ref": "#/definitions/v1SpectroClusterPolicies" + }, + "profiles": { + "type": "array", + "items": { + "$ref": "#/definitions/v1SpectroClusterProfileEntity" + } + } + } + } + } + }, + "v1SpectroOpenStackClusterImportEntity": { + "description": "Spectro OpenStack cluster import request payload", + "type": "object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectMetaInputEntity" + }, + "spec": { + "type": "object", + "properties": { + "clusterConfig": { + "$ref": "#/definitions/v1ImportClusterConfig" + } + } + } + } + }, + "v1SpectroOpenStackClusterRateEntity": { + "description": "Openstack cluster request payload for estimating rate", + "type": "object", + "properties": { + "cloudConfig": { + "$ref": "#/definitions/v1OpenStackClusterConfig" + }, + "machinepoolconfig": { + "type": "array", + "items": { + "$ref": "#/definitions/v1OpenStackMachinePoolConfigEntity" + } + } + } + }, + "v1SpectroTencentClusterEntity": { + "description": "Tencent cluster request payload for create and update", + "type": "object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "type": "object", + "required": [ + "cloudType", + "cloudAccountUid", + "cloudConfig" + ], + "properties": { + "cloudAccountUid": { + "description": "Cloud account uid to be used for cluster provisioning", + "type": "string" + }, + "cloudConfig": { + "$ref": "#/definitions/v1TencentClusterConfig" + }, + "clusterConfig": { + "description": "General cluster configuration like health, patching settings, namespace resource allocation, rbac", + "$ref": "#/definitions/v1ClusterConfigEntity" + }, + "machinepoolconfig": { + "type": "array", + "items": { + "$ref": "#/definitions/v1TencentMachinePoolConfigEntity" + } + }, + "policies": { + "$ref": "#/definitions/v1SpectroClusterPolicies" + }, + "profiles": { + "type": "array", + "items": { + "$ref": "#/definitions/v1SpectroClusterProfileEntity" + } + } + } + } + } + }, + "v1SpectroTencentClusterRateEntity": { + "description": "Spectro Tencent cluster request payload for estimating rate", + "type": "object", + "properties": { + "cloudConfig": { + "$ref": "#/definitions/v1TencentClusterConfig" + }, + "machinepoolconfig": { + "type": "array", + "items": { + "$ref": "#/definitions/v1TencentMachinePoolConfigEntity" + } + } + } + }, + "v1SpectroVirtualClusterEntity": { + "description": "Spectro virtual cluster request payload for create and update", + "type": "object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "type": "object", + "required": [ + "cloudType", + "clusterConfig" + ], + "properties": { + "cloudConfig": { + "$ref": "#/definitions/v1VirtualClusterConfig" + }, + "clusterConfig": { + "description": "General cluster configuration like health, patching settings, namespace resource allocation, rbac", + "$ref": "#/definitions/v1ClusterConfigEntity" + }, + "machinepoolconfig": { + "type": "array", + "items": { + "$ref": "#/definitions/v1VirtualMachinePoolConfigEntity" + } + }, + "policies": { + "$ref": "#/definitions/v1SpectroClusterPolicies" + }, + "profiles": { + "type": "array", + "items": { + "$ref": "#/definitions/v1SpectroClusterProfileEntity" + } + } + } + } + } + }, + "v1SpectroVsphereClusterEntity": { + "description": "vSphere cluster request payload for create and update", + "type": "object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "type": "object", + "required": [ + "cloudConfig" + ], + "properties": { + "cloudAccountUid": { + "description": "Cloud account uid to be used for cluster provisioning", + "type": "string" + }, + "cloudConfig": { + "$ref": "#/definitions/v1VsphereClusterConfigEntity" + }, + "clusterConfig": { + "description": "General cluster configuration like health, patching settings, namespace resource allocation, rbac", + "$ref": "#/definitions/v1ClusterConfigEntity" + }, + "edgeHostUid": { + "description": "Appliance (Edge Host) uid for Edge env", + "type": "string" + }, + "machinepoolconfig": { + "type": "array", + "items": { + "$ref": "#/definitions/v1VsphereMachinePoolConfigEntity" + } + }, + "policies": { + "$ref": "#/definitions/v1SpectroClusterPolicies" + }, + "profiles": { + "type": "array", + "items": { + "$ref": "#/definitions/v1SpectroClusterProfileEntity" + } + } + } + } + } + }, + "v1SpectroVsphereClusterImportEntity": { + "description": "Spectro Vsphere cluster import request payload", + "type": "object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectMetaInputEntity" + }, + "spec": { + "type": "object", + "properties": { + "clusterConfig": { + "$ref": "#/definitions/v1ImportClusterConfig" + } + } + } + } + }, + "v1SpectroVsphereClusterRateEntity": { + "description": "Vsphere cluster request payload for estimating rate", + "type": "object", + "properties": { + "cloudConfig": { + "$ref": "#/definitions/v1VsphereClusterConfigEntity" + }, + "machinepoolconfig": { + "type": "array", + "items": { + "$ref": "#/definitions/v1VsphereMachinePoolConfigEntity" + } + } + } + }, + "v1SpotMarketOptions": { + "description": "SpotMarketOptions defines the options available to a user when configuring Machines to run on Spot instances. Most users should provide an empty struct.", + "type": "object", + "properties": { + "maxPrice": { + "description": "MaxPrice defines the maximum price the user is willing to pay for Spot VM instances", + "type": "string" + } + } + }, + "v1SpotVMOptions": { + "description": "SpotVMOptions defines the options relevant to running the Machine on Spot VMs", + "type": "object", + "properties": { + "maxPrice": { + "description": "MaxPrice defines the maximum price the user is willing to pay for Spot VM instances", + "type": "string" + } + } + }, + "v1SsoLogin": { + "description": "Describes the allowed sso login details", + "type": "object", + "properties": { + "displayName": { + "description": "Describes the display name for the sso login", + "type": "string" + }, + "logo": { + "description": "Describes the url path for the sso login", + "type": "string" + }, + "name": { + "description": "Describes the processed name for the sso login", + "type": "string" + }, + "redirectUri": { + "description": "Describes the sso login url for the authentication", + "type": "string" + } + } + }, + "v1SsoLogins": { + "description": "Describes the allowed sso logins", + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1SsoLogin" + } + }, + "v1StorageAccount": { + "description": "Azure storage account provides a unique namespace for your Azure resources", + "type": "object", + "properties": { + "id": { + "description": "Fully qualified resource ID for the resource", + "type": "string" + }, + "kind": { + "description": "The kind of the resource", + "type": "string" + }, + "location": { + "description": "The geo-location where the resource lives", + "type": "string" + }, + "name": { + "description": "The name of the resource", + "type": "string" + } + } + }, + "v1StorageAccountEntity": { + "description": "Azure storage account entity", + "type": "object", + "properties": { + "id": { + "description": "Azure storage account id", + "type": "string" + }, + "name": { + "description": "Azure storage account name", + "type": "string" + } + } + }, + "v1StorageContainer": { + "description": "Azure storage container organizes a set of blobs, similar to a directory in a file system", + "type": "object", + "properties": { + "id": { + "description": "Fully qualified resource ID for the resource.", + "type": "string" + }, + "name": { + "description": "The name of the resource", + "type": "string" + }, + "type": { + "description": "The type of the resource. E.g. \"Microsoft.Compute/virtualMachines\"", + "type": "string" + } + } + }, + "v1StorageCost": { + "description": "Cloud storage cost", + "type": "object", + "properties": { + "discountedUsage": { + "description": "Cloud storage upper limit which is free.", + "type": "string" + }, + "price": { + "description": "Array of cloud storage range prices", + "type": "array", + "items": { + "$ref": "#/definitions/v1StoragePrice" + } + } + } + }, + "v1StoragePrice": { + "description": "Cloud storage price within an upper limit.", + "type": "object", + "properties": { + "limit": { + "description": "Upper limit of cloud storage usage", + "type": "string" + }, + "price": { + "description": "Price of cloud storage type", + "type": "string" + } + } + }, + "v1StorageRate": { + "description": "Storage estimated rate information", + "type": "object", + "properties": { + "iops": { + "type": "number", + "format": "float64" + }, + "rate": { + "type": "number", + "format": "float64", + "x-omitempty": false + }, + "sizeGB": { + "type": "number", + "format": "float64" + }, + "throughput": { + "type": "number", + "format": "float64" + }, + "type": { + "type": "string" + } + } + }, + "v1StorageType": { + "description": "Cloud cloud Storage type details", + "type": "object", + "properties": { + "cost": { + "$ref": "#/definitions/v1StorageCost" + }, + "iopsCost": { + "$ref": "#/definitions/v1StorageCost" + }, + "kind": { + "description": "kind of storage type", + "type": "string" + }, + "name": { + "description": "Name of the storage type", + "type": "string" + }, + "throughputCost": { + "$ref": "#/definitions/v1StorageCost" + } + } + }, + "v1Subnet": { + "type": "object", + "properties": { + "cidrBlock": { + "description": "CidrBlock is the CIDR block to be used when the provider creates a managed Vnet.", + "type": "string" + }, + "name": { + "type": "string" + }, + "securityGroupName": { + "description": "Network Security Group(NSG) to be attached to subnet. NSG for a control plane subnet, should allow inbound to port 6443, as port 6443 is used by kubeadm to bootstrap the control planes", + "type": "string" + } + } + }, + "v1Subscription": { + "description": "Azure Subscription Type", + "type": "object", + "properties": { + "authorizationSource": { + "description": "The authorization source of the request. Valid values are one or more combinations of Legacy, RoleBased, Bypassed, Direct and Management", + "type": "string" + }, + "displayName": { + "description": "The subscription display name", + "type": "string" + }, + "state": { + "description": "The subscription state. Possible values are Enabled, Warned, PastDue, Disabled, and Deleted.", + "type": "string" + }, + "subscriptionId": { + "description": "The subscription ID", + "type": "string" + } + } + }, + "v1SyftDependency": { + "description": "Compliance Scan Syft Dependency", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string" + }, + "version": { + "type": "string" + } + } + }, + "v1SyftDependencyEntity": { + "description": "Syft dependency", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string" + }, + "version": { + "type": "string" + } + } + }, + "v1SyftEntity": { + "description": "Syft response", + "required": [ + "requestUid", + "status", + "report" + ], + "properties": { + "report": { + "$ref": "#/definitions/v1SyftReportEntity" + }, + "requestUid": { + "type": "string" + }, + "status": { + "type": "string", + "enum": [ + "Completed", + "InProgress", + "Failed", + "Initiated" + ] + } + } + }, + "v1SyftImageContext": { + "description": "Compliance Scan Syft Image Context", + "properties": { + "containerName": { + "type": "string" + }, + "namespace": { + "type": "string" + }, + "podName": { + "type": "string" + } + } + }, + "v1SyftReport": { + "description": "Compliance Scan Syft Report", + "properties": { + "dependencies": { + "type": "array", + "items": { + "$ref": "#/definitions/v1SyftDependency" + } + }, + "image": { + "type": "string" + }, + "imageContexts": { + "type": "array", + "items": { + "$ref": "#/definitions/v1SyftImageContext" + } + }, + "isSBOMExist": { + "type": "boolean" + }, + "state": { + "type": "string" + }, + "time": { + "$ref": "#/definitions/v1Time" + }, + "vulnerabilities": { + "type": "array", + "items": { + "$ref": "#/definitions/v1SyftVulnerability" + } + }, + "vulnerabilitySummary": { + "$ref": "#/definitions/v1SyftVulnerabilitySummary" + } + } + }, + "v1SyftReportEntity": { + "description": "Syft report", + "properties": { + "batchNo": { + "type": "integer", + "format": "int32" + }, + "batchSize": { + "type": "integer", + "format": "int32" + }, + "dependencies": { + "type": "array", + "items": { + "$ref": "#/definitions/v1SyftDependencyEntity" + } + }, + "image": { + "type": "string" + }, + "imageContexts": { + "type": "array", + "items": { + "$ref": "#/definitions/v1SyftImageContext" + } + }, + "sbom": { + "type": "string" + }, + "time": { + "$ref": "#/definitions/v1Time" + }, + "vulnerabilities": { + "type": "array", + "items": { + "$ref": "#/definitions/v1SyftVulnerabilityEntity" + } + }, + "vulnerabilitySummary": { + "$ref": "#/definitions/v1SyftVulnerabilitySummaryEntity" + } + } + }, + "v1SyftScanContext": { + "description": "Compliance Scan Syft Context", + "properties": { + "format": { + "type": "string" + }, + "labelSelector": { + "type": "string" + }, + "namespace": { + "type": "string" + }, + "podName": { + "type": "string" + }, + "scope": { + "type": "string" + } + } + }, + "v1SyftVulnerability": { + "description": "Compliance Scan Syft Vulnerability", + "properties": { + "fixedIn": { + "type": "string" + }, + "installed": { + "type": "string" + }, + "name": { + "type": "string" + }, + "severity": { + "type": "string" + }, + "type": { + "type": "string" + }, + "vulnerability": { + "type": "string" + } + } + }, + "v1SyftVulnerabilityEntity": { + "description": "Syft vulnerability", + "properties": { + "fixedIn": { + "type": "string" + }, + "installed": { + "type": "string" + }, + "name": { + "type": "string" + }, + "severity": { + "type": "string" + }, + "type": { + "type": "string" + }, + "vulnerability": { + "type": "string" + } + } + }, + "v1SyftVulnerabilitySummary": { + "description": "Compliance Scan Syft Vulnerability Summary", + "properties": { + "critical": { + "type": "integer", + "format": "int32" + }, + "high": { + "type": "integer", + "format": "int32" + }, + "low": { + "type": "integer", + "format": "int32" + }, + "medium": { + "type": "integer", + "format": "int32" + }, + "negligible": { + "type": "integer", + "format": "int32" + }, + "unknown": { + "type": "integer", + "format": "int32" + } + } + }, + "v1SyftVulnerabilitySummaryEntity": { + "description": "Syft vulnerability summary", + "properties": { + "critical": { + "type": "integer", + "format": "int32" + }, + "high": { + "type": "integer", + "format": "int32" + }, + "low": { + "type": "integer", + "format": "int32" + }, + "medium": { + "type": "integer", + "format": "int32" + }, + "negligible": { + "type": "integer", + "format": "int32" + }, + "unknown": { + "type": "integer", + "format": "int32" + } + } + }, + "v1SystemFeature": { + "type": "object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/v1SystemFeaturesSpec" + } + } + }, + "v1SystemFeatures": { + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": { + "description": "List of system features", + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1SystemFeature" + } + } + } + }, + "v1SystemFeaturesSpec": { + "type": "object", + "properties": { + "description": { + "description": "Feature description", + "type": "string" + }, + "docLink": { + "description": "Feature doc link", + "type": "string" + }, + "isAllowed": { + "description": "Flag which specifies if feature is allowed or not", + "type": "boolean", + "x-omitempty": false + }, + "key": { + "description": "Unique Feature key", + "type": "string" + } + } + }, + "v1SystemGitAuthSpec": { + "description": "system git auth account specifications", + "properties": { + "_type": { + "type": "string" + }, + "password": { + "type": "string" + }, + "token": { + "type": "string" + }, + "username": { + "$ref": "#/definitions/v1SystemGitAuthSpec" + } + } + }, + "v1SystemReverseProxy": { + "description": "system config reverse proxy", + "properties": { + "caCert": { + "type": "string" + }, + "clientCert": { + "type": "string" + }, + "clientKey": { + "type": "string" + }, + "port": { + "type": "integer" + }, + "protocol": { + "type": "string", + "enum": [ + "http", + "https" + ] + }, + "server": { + "type": "string" + }, + "vHostPort": { + "type": "integer" + } + } + }, + "v1SystemScarSpec": { + "description": "system scar config spec", + "type": "object", + "properties": { + "baseContentPath": { + "type": "string" + }, + "caCert": { + "type": "string" + }, + "endpoint": { + "type": "string" + }, + "insecureVerify": { + "type": "boolean" + }, + "password": { + "type": "string" + }, + "username": { + "type": "string" + } + } + }, + "v1TagFilter": { + "description": "Tag Filter create spec", + "type": "object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectMetaInputEntity" + }, + "spec": { + "$ref": "#/definitions/v1TagFilterSpec" + } + } + }, + "v1TagFilterGroup": { + "properties": { + "conjunction": { + "$ref": "#/definitions/v1SearchFilterConjunctionOperator" + }, + "filters": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1TagFilterItem" + } + } + } + }, + "v1TagFilterItem": { + "properties": { + "key": { + "type": "string" + }, + "negation": { + "type": "boolean" + }, + "operator": { + "$ref": "#/definitions/v1SearchFilterKeyValueOperator" + }, + "values": { + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + } + } + } + }, + "v1TagFilterSpec": { + "description": "Filter create spec", + "type": "object", + "properties": { + "filterGroup": { + "$ref": "#/definitions/v1TagFilterGroup" + } + } + }, + "v1TagFilterSummary": { + "description": "Filter summary object", + "type": "object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/v1TagFilterSpec" + } + } + }, + "v1Taint": { + "description": "Taint", + "type": "object", + "properties": { + "effect": { + "type": "string", + "enum": [ + "NoSchedule", + "PreferNoSchedule", + "NoExecute" + ] + }, + "key": { + "description": "The taint key to be applied to a node", + "type": "string" + }, + "timeAdded": { + "$ref": "#/definitions/v1Time" + }, + "value": { + "description": "The taint value corresponding to the taint key.", + "type": "string" + } + } + }, + "v1Team": { + "description": "Team information", + "type": "object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/v1TeamSpec" + }, + "status": { + "$ref": "#/definitions/v1TeamStatus" + } + } + }, + "v1TeamPatch": { + "type": "array", + "items": { + "$ref": "#/definitions/v1HttpPatch" + } + }, + "v1TeamRoleMap": { + "properties": { + "roles": { + "type": "array", + "items": { + "type": "string" + } + }, + "teamId": { + "type": "string" + } + } + }, + "v1TeamSpec": { + "description": "Team specifications", + "properties": { + "roles": { + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + } + }, + "sources": { + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + } + }, + "users": { + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + } + } + } + }, + "v1TeamSpecSummary": { + "type": "object", + "properties": { + "emailId": { + "type": "string" + }, + "projects": { + "type": "array", + "items": { + "$ref": "#/definitions/v1UidSummary" + } + }, + "roles": { + "type": "array", + "items": { + "$ref": "#/definitions/v1UidSummary" + } + }, + "users": { + "type": "array", + "items": { + "$ref": "#/definitions/v1UidSummary" + } + } + } + }, + "v1TeamStatus": { + "description": "Team status", + "type": "object" + }, + "v1TeamSummary": { + "description": "Team summary", + "type": "object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/v1TeamSpecSummary" + }, + "status": { + "$ref": "#/definitions/v1TeamStatus" + } + } + }, + "v1TeamSummarySortFields": { + "type": "string", + "enum": [ + "name", + "creationTimestamp" + ], + "x-nullable": true + }, + "v1TeamSummarySortSpec": { + "properties": { + "field": { + "$ref": "#/definitions/v1TeamSummarySortFields" + }, + "order": { + "$ref": "#/definitions/v1SortOrder" + } + } + }, + "v1TeamTenantRolesEntity": { + "type": "object", + "properties": { + "roles": { + "type": "array", + "items": { + "$ref": "#/definitions/v1UidSummary" + } + } + } + }, + "v1TeamTenantRolesUpdate": { + "type": "object", + "properties": { + "roles": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "v1Teams": { + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1Team" + } + }, + "listmeta": { + "$ref": "#/definitions/v1ListMetaData" + } + } + }, + "v1TeamsFilterSpec": { + "description": "Teams filter spec", + "properties": { + "name": { + "$ref": "#/definitions/v1FilterString" + } + } + }, + "v1TeamsSummaryList": { + "description": "Returns Team summary", + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1TeamSummary" + } + } + } + }, + "v1TeamsSummarySpec": { + "description": "Teams filter summary spec", + "properties": { + "filter": { + "$ref": "#/definitions/v1TeamsFilterSpec" + }, + "sort": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1TeamSummarySortSpec" + } + } + } + }, + "v1TenantAddressPatch": { + "description": "Tenant Address", + "type": "object", + "properties": { + "address": { + "$ref": "#/definitions/v1Address" + } + } + }, + "v1TenantAssetCert": { + "description": "tenant cert", + "type": "object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/v1Cert" + } + } + }, + "v1TenantAssetCerts": { + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1TenantAssetCert" + } + } + } + }, + "v1TenantClusterSettings": { + "properties": { + "nodesAutoRemediationSetting": { + "$ref": "#/definitions/v1NodesAutoRemediationSettings" + } + } + }, + "v1TenantDomains": { + "description": "Tenant domains", + "type": "object", + "properties": { + "domains": { + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + } + } + } + }, + "v1TenantEmailPatch": { + "description": "Tenant EmailId", + "type": "object", + "properties": { + "emailId": { + "type": "string" + } + } + }, + "v1TenantEnableClusterGroup": { + "description": "Enable or Disable cluster group for a tenant", + "properties": { + "hideSystemClusterGroups": { + "type": "boolean", + "x-omitempty": false + }, + "isClusterGroupEnabled": { + "description": "Deprecated. Use hideSystemClusterGroups field", + "type": "boolean", + "x-omitempty": false + } + } + }, + "v1TenantFreemium": { + "description": "Tenant freemium configuration", + "properties": { + "activeClustersLimit": { + "type": "integer", + "x-omitempty": false + }, + "isFreemium": { + "type": "boolean", + "x-omitempty": false + }, + "isUnlimited": { + "type": "boolean", + "x-omitempty": false + }, + "overageUsageLimit": { + "type": "number", + "format": "float64", + "x-omitempty": false + }, + "totalUsageLimit": { + "type": "number", + "format": "float64", + "x-omitempty": false + } + } + }, + "v1TenantFreemiumUsage": { + "type": "object", + "properties": { + "isFreemium": { + "type": "boolean", + "x-omitempty": false + }, + "isUnlimited": { + "type": "boolean", + "x-omitempty": false + }, + "limit": { + "$ref": "#/definitions/v1FreemiumUsageLimit" + }, + "usage": { + "$ref": "#/definitions/v1FreemiumUsage" + } + } + }, + "v1TenantOidcClaims": { + "type": "object", + "properties": { + "Email": { + "type": "string", + "x-omitempty": false + }, + "FirstName": { + "type": "string", + "x-omitempty": false + }, + "LastName": { + "type": "string", + "x-omitempty": false + }, + "SpectroTeam": { + "type": "string", + "x-omitempty": false + } + } + }, + "v1TenantOidcClientSpec": { + "description": "Tenant", + "type": "object", + "properties": { + "callbackUrl": { + "type": "string", + "x-omitempty": false + }, + "clientId": { + "type": "string", + "x-omitempty": false + }, + "clientSecret": { + "type": "string", + "x-omitempty": false + }, + "defaultTeams": { + "type": "array", + "items": { + "type": "string" + }, + "x-omitempty": false + }, + "isSsoEnabled": { + "type": "boolean", + "x-omitempty": false + }, + "issuerTls": { + "$ref": "#/definitions/v1OidcIssuerTls" + }, + "issuerUrl": { + "description": "the issuer is the URL identifier for the service", + "type": "string", + "x-omitempty": false + }, + "logoutUrl": { + "type": "string", + "x-omitempty": false + }, + "requiredClaims": { + "$ref": "#/definitions/v1TenantOidcClaims" + }, + "scopes": { + "type": "array", + "items": { + "type": "string" + }, + "x-omitempty": false + }, + "scopesDelimiter": { + "type": "string", + "x-omitempty": false + }, + "syncSsoTeams": { + "type": "boolean", + "x-omitempty": false + } + } + }, + "v1TenantPasswordPolicyEntity": { + "description": "Tenant Password Policy Entity", + "type": "object", + "properties": { + "creationTimestamp": { + "$ref": "#/definitions/v1Time" + }, + "expiryDurationInDays": { + "type": "integer" + }, + "firstReminderInDays": { + "type": "integer" + }, + "isRegex": { + "type": "boolean" + }, + "minLength": { + "type": "integer" + }, + "minNumOfBlockLetters": { + "type": "integer" + }, + "minNumOfDigits": { + "type": "integer" + }, + "minNumOfSmallLetters": { + "type": "integer" + }, + "minNumOfSpecialCharacters": { + "type": "integer" + }, + "regex": { + "type": "string" + }, + "updateTimestamp": { + "$ref": "#/definitions/v1Time" + } + } + }, + "v1TenantResourceLimit": { + "properties": { + "kind": { + "type": "string", + "$ref": "#/definitions/v1ResourceLimitType" + }, + "label": { + "type": "string" + }, + "limit": { + "type": "number", + "format": "int64", + "x-omitempty": false + }, + "maxLimit": { + "type": "number", + "format": "int64", + "x-omitempty": false + } + } + }, + "v1TenantResourceLimitEntity": { + "properties": { + "kind": { + "type": "string", + "x-omitempty": false, + "$ref": "#/definitions/v1ResourceLimitType" + }, + "limit": { + "type": "number", + "format": "int64", + "x-omitempty": false + } + } + }, + "v1TenantResourceLimits": { + "description": "Tenant resource limits", + "properties": { + "resources": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1TenantResourceLimit" + } + } + } + }, + "v1TenantResourceLimitsEntity": { + "description": "Tenant resource limits. Supported resources keys are 'user','project','apiKey','team','role','cloudaccount','clusterprofile','workspace','registry','privategateway','location','certificate','macro','sshkey','alert','spectrocluster','edgehost'.", + "properties": { + "resources": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1TenantResourceLimitEntity" + } + } + } + }, + "v1TenantSamlRequestSpec": { + "description": "Tenant", + "type": "object", + "properties": { + "attributes": { + "type": "array", + "items": { + "$ref": "#/definitions/v1TenantSamlSpecAttribute" + } + }, + "defaultTeams": { + "type": "array", + "items": { + "type": "string" + } + }, + "federationMetadata": { + "type": "string" + }, + "identityProvider": { + "type": "string" + }, + "isSingleLogoutEnabled": { + "type": "boolean" + }, + "isSsoEnabled": { + "type": "boolean" + }, + "nameIdFormat": { + "type": "string" + }, + "syncSsoTeams": { + "type": "boolean" + } + } + }, + "v1TenantSamlSpec": { + "description": "Tenant", + "type": "object", + "properties": { + "acsUrl": { + "type": "string" + }, + "attributes": { + "type": "array", + "items": { + "$ref": "#/definitions/v1TenantSamlSpecAttribute" + } + }, + "audienceUrl": { + "description": "same as entity id", + "type": "string" + }, + "certificate": { + "description": "certificate for slo", + "type": "string" + }, + "defaultTeams": { + "type": "array", + "items": { + "type": "string" + } + }, + "entityId": { + "type": "string" + }, + "federationMetadata": { + "type": "string" + }, + "identityProvider": { + "type": "string" + }, + "isSingleLogoutEnabled": { + "type": "boolean", + "x-omitempty": false + }, + "isSsoEnabled": { + "type": "boolean", + "x-omitempty": false + }, + "issuer": { + "description": "same as entity id", + "type": "string" + }, + "nameIdFormat": { + "type": "string" + }, + "serviceProviderMetadata": { + "type": "string" + }, + "singleLogoutUrl": { + "description": "slo url", + "type": "string", + "x-omitempty": false + }, + "syncSsoTeams": { + "type": "boolean", + "x-omitempty": false + } + } + }, + "v1TenantSamlSpecAttribute": { + "type": "object", + "properties": { + "attributeValue": { + "type": "string" + }, + "mappedAttribute": { + "type": "string" + }, + "name": { + "type": "string" + }, + "nameFormat": { + "type": "string" + } + } + }, + "v1TenantSsoAuthProvidersEntity": { + "type": "object", + "properties": { + "isEnabled": { + "type": "boolean", + "x-omitempty": false + }, + "ssoLogins": { + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + } + } + } + }, + "v1TencentAccount": { + "description": "Tencent cloud account information", + "type": "object", + "properties": { + "apiVersion": { + "description": "Cloud account api version", + "type": "string" + }, + "kind": { + "description": "Cloud account kind", + "type": "string" + }, + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/v1TencentCloudAccount" + }, + "status": { + "$ref": "#/definitions/v1CloudAccountStatus" + } + } + }, + "v1TencentAccounts": { + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1TencentAccount" + } + }, + "listmeta": { + "$ref": "#/definitions/v1ListMetaData" + } + } + }, + "v1TencentAvailabilityZone": { + "description": "Tencent availability zone", + "type": "object", + "properties": { + "name": { + "description": "Tencent availability zone name", + "type": "string" + }, + "state": { + "description": "Tencent availability zone state", + "type": "string" + }, + "zoneId": { + "description": "Tencent availability zone id", + "type": "string" + } + } + }, + "v1TencentAvailabilityZones": { + "description": "List of Tencent Availability zones", + "type": "object", + "required": [ + "zones" + ], + "properties": { + "zones": { + "type": "array", + "items": { + "$ref": "#/definitions/v1TencentAvailabilityZone" + } + } + } + }, + "v1TencentCloudAccount": { + "type": "object", + "required": [ + "secretId", + "secretKey" + ], + "properties": { + "secretId": { + "description": "Tencent api secretID", + "type": "string" + }, + "secretKey": { + "description": "Tencent api secret key", + "type": "string" + } + } + }, + "v1TencentCloudClusterConfigEntity": { + "description": "Tencent cloud cluster config entity", + "type": "object", + "properties": { + "clusterConfig": { + "$ref": "#/definitions/v1TencentClusterConfig" + } + } + }, + "v1TencentCloudConfig": { + "description": "TencentCloudConfig is the Schema for the tencentcloudconfigs API", + "type": "object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/v1TencentCloudConfigSpec" + } + } + }, + "v1TencentCloudConfigSpec": { + "description": "TencentCloudConfigSpec defines the cloud configuration input by user This will translate to clusterspec/machinespec for cluster-api", + "type": "object", + "properties": { + "cloudAccountRef": { + "description": "cloudAccountRef should point to the secret which contains TencentCloudAccount", + "$ref": "#/definitions/v1ObjectReference" + }, + "clusterConfig": { + "$ref": "#/definitions/v1TencentClusterConfig" + }, + "machinePoolConfig": { + "type": "array", + "items": { + "$ref": "#/definitions/v1TencentMachinePoolConfig" + } + } + } + }, + "v1TencentClusterConfig": { + "description": "Cluster level configuration for tencent cloud and applicable for all the machine pools", + "type": "object", + "required": [ + "region" + ], + "properties": { + "endpointAccess": { + "description": "Endpoints specifies access to this cluster's control plane endpoints", + "$ref": "#/definitions/v1TkeEndpointAccess" + }, + "region": { + "type": "string" + }, + "sshKeyIDs": { + "type": "array", + "items": { + "type": "string" + } + }, + "vpcID": { + "description": "VPC Id to deploy cluster into should have one public and one private subnet for the the cluster creation, this field is optional, If VPC Id is not provided a fully managed VPC will be created", + "type": "string" + } + } + }, + "v1TencentInstanceTypes": { + "description": "List of Tencent instance types", + "type": "object", + "properties": { + "instanceTypes": { + "type": "array", + "items": { + "$ref": "#/definitions/v1InstanceType" + } + } + } + }, + "v1TencentKeypair": { + "description": "Tencent Keypair entity", + "type": "object", + "properties": { + "id": { + "description": "Tencent keypair id", + "type": "string" + }, + "name": { + "description": "Tencent keypair name", + "type": "string" + }, + "publickey": { + "description": "Tencent public key", + "type": "string" + } + } + }, + "v1TencentKeypairs": { + "description": "List of Tencent keypairs", + "type": "object", + "properties": { + "keypairs": { + "type": "array", + "items": { + "$ref": "#/definitions/v1TencentKeypair" + } + } + } + }, + "v1TencentMachine": { + "description": "Tencent cloud VM definition", + "type": "object", + "properties": { + "apiVersion": { + "type": "string" + }, + "kind": { + "type": "string" + }, + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/v1TencentMachineSpec" + }, + "status": { + "$ref": "#/definitions/v1CloudMachineStatus" + } + } + }, + "v1TencentMachinePoolCloudConfigEntity": { + "type": "object", + "properties": { + "azs": { + "type": "array", + "items": { + "type": "string" + } + }, + "instanceType": { + "description": "instance type", + "type": "string" + }, + "rootDeviceSize": { + "description": "rootDeviceSize in GBs", + "type": "integer", + "format": "int64", + "maximum": 2000, + "minimum": 1 + }, + "subnetIds": { + "description": "AZ to subnet mapping filled by ally from hubble SubnetIDs [\"ap-guangzhou-6\"] = \"subnet-079b6061\" This field is optional If we don't provide a subnetId then by default the first subnet from the AZ will be picked up for deployment", + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + }, + "v1TencentMachinePoolConfig": { + "type": "object", + "properties": { + "additionalLabels": { + "description": "AdditionalLabels", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "additionalTags": { + "description": "AdditionalTags is an optional set of tags to add to resources managed by the provider, in addition to the ones added by default. For eg., tags for EKS nodeGroup or EKS NodegroupIAMRole", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "azs": { + "description": "AZs is only used for dynamic placement", + "type": "array", + "items": { + "type": "string" + } + }, + "instanceConfig": { + "$ref": "#/definitions/v1InstanceConfig" + }, + "instanceType": { + "description": "instance type", + "type": "string" + }, + "isControlPlane": { + "description": "whether this pool is for control plane", + "type": "boolean" + }, + "labels": { + "description": "labels for this pool, example: control-plane/worker, gpu, windows", + "type": "array", + "items": { + "type": "string" + } + }, + "machinePoolProperties": { + "$ref": "#/definitions/v1MachinePoolProperties" + }, + "maxSize": { + "description": "max size of the pool, for scaling", + "type": "integer", + "format": "int32" + }, + "minSize": { + "description": "min size of the pool, for scaling", + "type": "integer", + "format": "int32" + }, + "name": { + "type": "string" + }, + "nodeRepaveInterval": { + "description": "Minimum number of seconds a node should be Ready, before the next node is selected for repave. Applicable only for workerpools in infrastructure cluster", + "type": "integer", + "format": "int32" + }, + "rootDeviceSize": { + "description": "rootDeviceSize in GBs", + "type": "integer", + "format": "int64" + }, + "size": { + "description": "size of the pool, number of machines", + "type": "integer", + "format": "int32" + }, + "subnetIds": { + "description": "AZ to subnet mapping filled by ally from hubble SubnetIDs [\"ap-guangzhou-6\"] = \"subnet-079b6061\" This field is optional If we don't provide a subnetId then by default the first subnet from the AZ will be picked up for deployment", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "taints": { + "description": "control plane or worker taints", + "type": "array", + "items": { + "$ref": "#/definitions/v1Taint" + } + }, + "updateStrategy": { + "description": "rolling update strategy for this machinepool if not specified, will use ScaleOut", + "$ref": "#/definitions/v1UpdateStrategy" + }, + "useControlPlaneAsWorker": { + "description": "if IsControlPlane==true \u0026\u0026 useControlPlaneAsWorker==true, then will remove control plane taint this will not be used for worker pools", + "type": "boolean" + } + } + }, + "v1TencentMachinePoolConfigEntity": { + "type": "object", + "required": [ + "cloudConfig" + ], + "properties": { + "cloudConfig": { + "$ref": "#/definitions/v1TencentMachinePoolCloudConfigEntity" + }, + "poolConfig": { + "$ref": "#/definitions/v1MachinePoolConfigEntity" + } + } + }, + "v1TencentMachineSpec": { + "description": "Tencent cloud VM definition spec", + "type": "object", + "required": [ + "nics", + "instanceType", + "imageId" + ], + "properties": { + "dnsName": { + "type": "string" + }, + "imageId": { + "type": "string" + }, + "instanceType": { + "type": "string" + }, + "nics": { + "type": "array", + "items": { + "$ref": "#/definitions/v1TencentNic" + } + }, + "securityGroups": { + "type": "array", + "items": { + "type": "string" + } + }, + "subnetId": { + "type": "string" + }, + "type": { + "type": "string" + }, + "vpcId": { + "type": "string" + }, + "zoneId": { + "type": "string" + } + } + }, + "v1TencentMachines": { + "description": "Tencent machine list", + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1TencentMachine" + } + }, + "listmeta": { + "$ref": "#/definitions/v1ListMetaData" + } + } + }, + "v1TencentNic": { + "description": "Tencent network interface", + "type": "object", + "properties": { + "index": { + "type": "integer", + "format": "int8" + }, + "privateIPs": { + "type": "array", + "items": { + "type": "string" + } + }, + "publicIp": { + "type": "string" + } + } + }, + "v1TencentRegion": { + "description": "Tencent region entity", + "type": "object", + "properties": { + "name": { + "description": "Name of tencent region", + "type": "string" + }, + "state": { + "description": "State of tencent region", + "type": "string" + } + } + }, + "v1TencentRegions": { + "description": "List of tencent regions", + "type": "object", + "required": [ + "regions" + ], + "properties": { + "regions": { + "description": "Tencent regions entity", + "type": "array", + "items": { + "$ref": "#/definitions/v1TencentRegion" + } + } + } + }, + "v1TencentSecurityGroup": { + "description": "Tencent Security Group. A security group is a virtual firewall that features stateful data packet filtering", + "type": "object", + "properties": { + "id": { + "description": "Tencent security group id", + "type": "string" + }, + "isDefault": { + "description": "Whether it is the default security group, the default security group does not support deletion.", + "type": "boolean" + }, + "name": { + "description": "Tencent security group name", + "type": "string" + }, + "projectId": { + "description": "Tencent security group associated to a project", + "type": "string" + } + } + }, + "v1TencentSecurityGroups": { + "description": "List of Tencent security groups", + "type": "object", + "properties": { + "groups": { + "type": "array", + "items": { + "$ref": "#/definitions/v1TencentSecurityGroup" + } + } + } + }, + "v1TencentStorageTypes": { + "description": "List of Tencent storage types", + "type": "object", + "properties": { + "storageTypes": { + "type": "array", + "items": { + "$ref": "#/definitions/v1StorageType" + } + } + } + }, + "v1TencentSubnet": { + "description": "Tencent Subnet entity", + "type": "object", + "properties": { + "az": { + "description": "Availability zone associated with tencent subnet", + "type": "string" + }, + "cidrBlock": { + "description": "Tencent subnet CIDR. The CIDR notation consists of an IP address, a slash character ('/') and a decimal number from 0 to 32", + "type": "string" + }, + "name": { + "description": "Tencent subnet name", + "type": "string" + }, + "subnetId": { + "description": "Tencent subnet id", + "type": "string" + } + } + }, + "v1TencentVpc": { + "description": "Tencent VPC entity", + "type": "object", + "required": [ + "vpcId" + ], + "properties": { + "cidrBlock": { + "description": "Tencent VPC CIDR. The CIDR notation consists of an IP address, a slash character ('/') and a decimal number from 0 to 32", + "type": "string" + }, + "name": { + "description": "Tencent VPC name", + "type": "string" + }, + "subnets": { + "type": "array", + "items": { + "$ref": "#/definitions/v1TencentSubnet" + } + }, + "vpcId": { + "description": "Tencent VPC id", + "type": "string" + } + } + }, + "v1TencentVpcs": { + "description": "List of Tencent VPCs", + "type": "object", + "required": [ + "vpcs" + ], + "properties": { + "vpcs": { + "type": "array", + "items": { + "$ref": "#/definitions/v1TencentVpc" + } + } + } + }, + "v1Time": { + "description": "Time is a wrapper around time.Time which supports correct marshaling to YAML and JSON. Wrappers are provided for many of the factory methods that the time package offers.", + "type": "string", + "format": "date-time" + }, + "v1TkeEndpointAccess": { + "description": "TKEEndpointAccess specifies how control plane endpoints are accessible", + "type": "object", + "properties": { + "IsExtranet": { + "description": "IsExtranet Whether it is external network access (TRUE external network access FALSE internal network access, default value: FALSE)", + "type": "boolean" + }, + "private": { + "description": "Private points VPC-internal control plane access to the private endpoint", + "type": "boolean" + }, + "privateCIDR": { + "description": "Deprecated. PrivateCIDRs specifies which blocks can access the public endpoint", + "type": "string" + }, + "public": { + "description": "Public controls whether control plane endpoints are publicly accessible", + "type": "boolean" + }, + "publicCIDRs": { + "description": "Deprecated. PublicCIDRs specifies which blocks can access the public endpoint", + "type": "array", + "items": { + "type": "string" + } + }, + "securityGroup": { + "description": "Tencent security group", + "type": "string" + }, + "subnetId": { + "description": "Tencent Subnet", + "type": "string" + } + } + }, + "v1TlsConfiguration": { + "description": "TLS configuration", + "type": "object", + "properties": { + "ca": { + "type": "string" + }, + "certificate": { + "type": "string" + }, + "enabled": { + "type": "boolean", + "x-omitempty": false + }, + "insecureSkipVerify": { + "type": "boolean", + "x-omitempty": false + }, + "key": { + "type": "string" + } + } + }, + "v1TotalClusterRate": { + "description": "Cluster total estimated rate information", + "type": "object", + "properties": { + "compute": { + "type": "number", + "format": "float64", + "x-omitempty": false + }, + "storage": { + "type": "number", + "format": "float64", + "x-omitempty": false + }, + "total": { + "type": "number", + "format": "float64", + "x-omitempty": false + } + } + }, + "v1Uid": { + "type": "object", + "required": [ + "uid" + ], + "properties": { + "uid": { + "type": "string" + } + } + }, + "v1UidRoleSummary": { + "type": "object", + "properties": { + "inheritedRoles": { + "type": "array", + "items": { + "$ref": "#/definitions/v1UidSummary" + } + }, + "name": { + "type": "string" + }, + "roles": { + "type": "array", + "items": { + "$ref": "#/definitions/v1UidSummary" + } + }, + "uid": { + "type": "string" + } + } + }, + "v1UidSummary": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "uid": { + "type": "string" + } + } + }, + "v1Uids": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1Uid" + } + }, + "v1UpdateStrategy": { + "description": "UpdatesStrategy will be used to translate to RollingUpdateStrategy of a MachineDeployment We'll start with default values for the translation, can expose more details later Following is details of parameters translated from the type ScaleOut =\u003e maxSurge=1, maxUnavailable=0 ScaleIn =\u003e maxSurge=0, maxUnavailable=1", + "type": "object", + "properties": { + "type": { + "description": "update strategy, either ScaleOut or ScaleIn if empty, will default to RollingUpdateScaleOut", + "type": "string", + "enum": [ + "RollingUpdateScaleOut", + "RollingUpdateScaleIn" + ] + } + } + }, + "v1Updated": { + "description": "The resource was updated successfully" + }, + "v1UpdatedMsg": { + "description": "Update response with message", + "properties": { + "msg": { + "type": "string" + } + } + }, + "v1Upgrades": { + "description": "Upgrades represent the reason of the last upgrade that took place", + "type": "object", + "properties": { + "reason": { + "type": "array", + "items": { + "type": "string" + } + }, + "timestamp": { + "$ref": "#/definitions/v1Time" + } + } + }, + "v1User": { + "description": "User", + "type": "object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/v1UserSpec" + }, + "status": { + "$ref": "#/definitions/v1UserStatus" + } + } + }, + "v1UserAssetSsh": { + "description": "SSH key information", + "type": "object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/v1UserAssetSshSpec" + } + } + }, + "v1UserAssetSshEntity": { + "description": "SSH Key request payload", + "type": "object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectMetaInputEntity" + }, + "spec": { + "$ref": "#/definitions/v1UserAssetSshSpec" + } + } + }, + "v1UserAssetSshSpec": { + "description": "SSH key specification", + "type": "object", + "properties": { + "publicKey": { + "type": "string" + } + } + }, + "v1UserAssetsLocation": { + "description": "Location object", + "type": "object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/v1UserAssetsLocationSpec" + } + } + }, + "v1UserAssetsLocationAzure": { + "description": "Azure location object", + "type": "object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectMetaInputEntity" + }, + "spec": { + "$ref": "#/definitions/v1UserAssetsLocationAzureSpec" + } + } + }, + "v1UserAssetsLocationAzureSpec": { + "description": "Azure location specification", + "type": "object", + "required": [ + "config" + ], + "properties": { + "config": { + "$ref": "#/definitions/v1AzureStorageConfig" + }, + "isDefault": { + "description": "Set to 'true', if location has to be set as default", + "type": "boolean" + }, + "type": { + "description": "Azure location type [azure]", + "type": "string" + } + } + }, + "v1UserAssetsLocationGcp": { + "description": "GCP location object", + "type": "object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectMetaInputEntity" + }, + "spec": { + "$ref": "#/definitions/v1UserAssetsLocationGcpSpec" + } + } + }, + "v1UserAssetsLocationGcpSpec": { + "description": "GCP location specification", + "type": "object", + "required": [ + "config" + ], + "properties": { + "config": { + "$ref": "#/definitions/v1GcpStorageConfig" + }, + "isDefault": { + "description": "Set to 'true', if location has to be set as default", + "type": "boolean" + }, + "type": { + "description": "GCP location type [gcp]", + "type": "string" + } + } + }, + "v1UserAssetsLocationS3": { + "description": "S3 location object", + "type": "object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectMetaInputEntity" + }, + "spec": { + "$ref": "#/definitions/v1UserAssetsLocationS3Spec" + } + } + }, + "v1UserAssetsLocationS3Spec": { + "description": "S3 location specification", + "type": "object", + "required": [ + "config" + ], + "properties": { + "config": { + "$ref": "#/definitions/v1S3StorageConfig" + }, + "isDefault": { + "description": "Set to 'true', if location has to be set as default", + "type": "boolean" + }, + "type": { + "description": "S3 location type [s3/minio]", + "type": "string" + } + } + }, + "v1UserAssetsLocationSpec": { + "description": "Location specification", + "type": "object", + "properties": { + "isDefault": { + "type": "boolean" + }, + "storage": { + "$ref": "#/definitions/v1LocationType" + }, + "type": { + "type": "string" + } + } + }, + "v1UserAssetsLocations": { + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": { + "description": "List of locations", + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1UserAssetsLocation" + } + } + } + }, + "v1UserAssetsSsh": { + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": { + "description": "List of SSH keys", + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1UserAssetSsh" + } + } + } + }, + "v1UserEntity": { + "description": "User", + "type": "object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/v1UserSpecEntity" + } + } + }, + "v1UserInfo": { + "description": "User basic information", + "properties": { + "orgName": { + "description": "Organization name", + "type": "string" + }, + "tenantUid": { + "type": "string" + }, + "userUid": { + "type": "string" + } + } + }, + "v1UserKubectlSession": { + "type": "object", + "properties": { + "clusterUid": { + "type": "string" + }, + "creationTime": { + "type": "string" + }, + "isActive": { + "type": "boolean" + }, + "podIp": { + "type": "string" + }, + "podName": { + "type": "string" + }, + "port": { + "type": "string" + }, + "projectUid": { + "type": "string" + }, + "sessionUid": { + "type": "string" + }, + "shellyCluster": { + "type": "string" + }, + "tenantClusterEndpoint": { + "type": "string" + }, + "userName": { + "type": "string" + }, + "userUid": { + "type": "string" + } + } + }, + "v1UserMeta": { + "type": "object", + "properties": { + "emailId": { + "type": "string" + }, + "firstName": { + "type": "string" + }, + "lastName": { + "type": "string" + }, + "org": { + "type": "string" + }, + "uid": { + "type": "string" + } + } + }, + "v1UserMetaEntity": { + "description": "User meta entity", + "type": "object", + "properties": { + "emailId": { + "type": "string" + }, + "name": { + "type": "string" + }, + "uid": { + "type": "string" + } + } + }, + "v1UserPatch": { + "type": "array", + "items": { + "$ref": "#/definitions/v1HttpPatch" + } + }, + "v1UserRoleMap": { + "properties": { + "roles": { + "type": "array", + "items": { + "type": "string" + } + }, + "userId": { + "type": "string" + } + } + }, + "v1UserRoleUIDs": { + "type": "object", + "properties": { + "roles": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "v1UserRolesEntity": { + "type": "object", + "properties": { + "inheritedRoles": { + "type": "array", + "items": { + "$ref": "#/definitions/v1UidSummary" + } + }, + "roles": { + "type": "array", + "items": { + "$ref": "#/definitions/v1UidSummary" + } + } + } + }, + "v1UserSpec": { + "description": "User specifications", + "properties": { + "emailId": { + "description": "User's email id", + "type": "string" + }, + "firstName": { + "type": "string" + }, + "lastName": { + "type": "string" + }, + "roles": { + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + } + } + } + }, + "v1UserSpecEntity": { + "description": "User Entity input", + "type": "object", + "properties": { + "emailId": { + "type": "string" + }, + "firstName": { + "type": "string" + }, + "lastName": { + "type": "string" + }, + "loginMode": { + "type": "string" + }, + "roles": { + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + } + }, + "teams": { + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + } + } + } + }, + "v1UserSpecSummary": { + "type": "object", + "properties": { + "emailId": { + "type": "string" + }, + "firstName": { + "type": "string" + }, + "lastName": { + "type": "string" + }, + "projects": { + "description": "Deprecated.", + "type": "array", + "items": { + "$ref": "#/definitions/v1UidSummary" + } + }, + "projectsCount": { + "type": "integer", + "format": "int32", + "x-omitempty": false + }, + "roles": { + "type": "array", + "items": { + "$ref": "#/definitions/v1UidSummary" + } + }, + "teams": { + "type": "array", + "items": { + "$ref": "#/definitions/v1UidSummary" + } + } + } + }, + "v1UserStatus": { + "description": "User status", + "properties": { + "activationLink": { + "description": "provides the link to activate or reset the user password", + "type": "string", + "x-omitempty": false + }, + "isActive": { + "description": "Specifies if user account is active/disabled", + "type": "boolean", + "x-omitempty": false + }, + "isPasswordResetting": { + "description": "Specifies if user in multi org requested password reset", + "type": "boolean", + "x-omitempty": false + }, + "lastSignIn": { + "description": "user's last sign in time", + "$ref": "#/definitions/v1Time" + } + } + }, + "v1UserStatusLoginMode": { + "type": "object", + "properties": { + "loginMode": { + "type": "string", + "enum": [ + "dev", + "devops" + ] + } + } + }, + "v1UserSummary": { + "description": "User summary", + "type": "object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/v1UserSpecSummary" + }, + "status": { + "$ref": "#/definitions/v1UserStatus" + } + } + }, + "v1UserSummarySortFields": { + "type": "string", + "enum": [ + "name", + "creationTimestamp" + ], + "x-nullable": true + }, + "v1UserSummarySortSpec": { + "properties": { + "field": { + "$ref": "#/definitions/v1UserSummarySortFields" + }, + "order": { + "$ref": "#/definitions/v1SortOrder" + } + } + }, + "v1UserToken": { + "description": "Returns the Authorization token. To be used for further api calls", + "type": "object", + "properties": { + "Authorization": { + "description": "Describes the authentication token in jwt format.", + "type": "string" + }, + "isMfa": { + "description": "Indicates the authentication flow using MFA", + "type": "boolean", + "x-omitempty": false + } + } + }, + "v1UserUpdateEntity": { + "description": "User", + "type": "object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/v1UserUpdateSpecEntity" + } + } + }, + "v1UserUpdateSpecEntity": { + "description": "User Entity input", + "type": "object", + "properties": { + "emailId": { + "type": "string" + }, + "firstName": { + "type": "string" + }, + "lastName": { + "type": "string" + }, + "roles": { + "description": "Deprecated. Use 'v1/users/{uid}/roles' API to assign roles.", + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + } + } + } + }, + "v1Users": { + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1User" + } + }, + "listmeta": { + "$ref": "#/definitions/v1ListMetaData" + } + } + }, + "v1UsersFilterSpec": { + "description": "Users filter spec", + "properties": { + "emailId": { + "$ref": "#/definitions/v1FilterString" + }, + "name": { + "$ref": "#/definitions/v1FilterString" + } + } + }, + "v1UsersMetadata": { + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1UserMetaEntity" + } + } + } + }, + "v1UsersSummaryList": { + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1UserSummary" + } + } + } + }, + "v1UsersSummarySpec": { + "description": "Users filter summary spec", + "properties": { + "filter": { + "$ref": "#/definitions/v1UsersFilterSpec" + }, + "sort": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1UserSummarySortSpec" + } + } + } + }, + "v1VMAddVolumeEntity": { + "type": "object", + "required": [ + "addVolumeOptions" + ], + "properties": { + "addVolumeOptions": { + "description": "Parameters required to add volume to virtual machine/virtual machine instance", + "$ref": "#/definitions/v1VmAddVolumeOptions" + }, + "dataVolumeTemplate": { + "description": "dataVolumeTemplates is a list of dataVolumes that the VirtualMachineInstance template can reference. DataVolumes in this list are dynamically created for the VirtualMachine and are tied to the VirtualMachine's life-cycle.", + "$ref": "#/definitions/v1VmDataVolumeTemplateSpec" + }, + "persist": { + "description": "If 'true' add the disk to the Virtual Machine \u0026 Virtual Machine Instance, else add the disk to the Virtual Machine Instance only", + "type": "boolean" + } + } + }, + "v1VMCluster": { + "description": "VM Dashboard enabled Spectro cluster", + "type": "object", + "properties": { + "metadata": { + "properties": { + "name": { + "type": "string" + }, + "projectUid": { + "type": "string" + }, + "uid": { + "type": "string" + } + } + }, + "spec": { + "description": "Spectro cluster spec", + "type": "object", + "properties": { + "cloudType": { + "type": "string" + } + } + }, + "status": { + "description": "Spectro cluster status", + "properties": { + "clusterState": { + "type": "string" + } + } + } + } + }, + "v1VMClusters": { + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1VMCluster" + } + } + } + }, + "v1VMRemoveVolumeEntity": { + "type": "object", + "required": [ + "removeVolumeOptions" + ], + "properties": { + "persist": { + "description": "If 'true' remove the disk from the Virtual Machine \u0026 Virtual Machine Instance, else remove the disk from the Virtual Machine Instance only", + "type": "boolean" + }, + "removeVolumeOptions": { + "description": "Parameters required to remove volume from virtual machine/virtual machine instance", + "$ref": "#/definitions/v1VmRemoveVolumeOptions" + } + } + }, + "v1Variable": { + "description": "Unique variable field with schema definition", + "type": "object", + "required": [ + "name" + ], + "properties": { + "defaultValue": { + "description": "The default value of the variable", + "type": "string" + }, + "description": { + "description": "Variable description", + "type": "string" + }, + "displayName": { + "description": "Unique display name of the variable", + "type": "string" + }, + "format": { + "$ref": "#/definitions/v1VariableFormat" + }, + "hidden": { + "description": "If true, then variable will be hidden for overriding the value. By default the hidden flag will be set to false", + "type": "boolean", + "x-omitempty": false + }, + "immutable": { + "description": "If true, then variable value can't be editable. By default the immutable flag will be set to false", + "type": "boolean", + "x-omitempty": false + }, + "isSensitive": { + "description": "If true, then default value will be masked. By default the isSensitive flag will be set to false", + "type": "boolean", + "x-omitempty": false + }, + "name": { + "description": "Variable name", + "type": "string" + }, + "regex": { + "description": "Regular expression pattern which the variable value must match", + "type": "string" + }, + "required": { + "description": "Flag to specify if the variable is optional or mandatory. If it is mandatory then default value must be provided", + "type": "boolean", + "x-omitempty": false + } + } + }, + "v1VariableFormat": { + "description": "Format type of the variable value", + "type": "string", + "default": "string", + "enum": [ + "string", + "number", + "boolean", + "ipv4", + "ipv4cidr", + "ipv6", + "version" + ] + }, + "v1VariableNames": { + "required": [ + "variables" + ], + "properties": { + "variables": { + "description": "Array of variable names", + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + } + } + } + }, + "v1Variables": { + "type": "object", + "properties": { + "variables": { + "description": "List of unique variable fields with schema constraints", + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1Variable" + } + } + } + }, + "v1Virtual": { + "properties": { + "appDeployments": { + "description": "list of apps deployed on the virtual cluster", + "type": "array", + "items": { + "$ref": "#/definitions/v1ObjectResReference" + } + }, + "clusterGroup": { + "description": "cluster group details of virtual cluster", + "$ref": "#/definitions/v1ObjectResReference" + }, + "hostCluster": { + "description": "host cluster reference", + "$ref": "#/definitions/v1ObjectResReference" + }, + "lifecycleStatus": { + "description": "cluster life cycle status of virtual cluster", + "$ref": "#/definitions/v1LifecycleStatus" + }, + "state": { + "description": "cluster virtual host status", + "type": "string" + }, + "virtualClusters": { + "description": "list of virtual clusters deployed on the cluster", + "type": "array", + "items": { + "$ref": "#/definitions/v1ObjectResReference" + } + } + } + }, + "v1VirtualCloudClusterConfigEntity": { + "description": "Virtual cloud cluster config entity", + "type": "object", + "properties": { + "clusterConfig": { + "$ref": "#/definitions/v1VirtualClusterConfig" + } + } + }, + "v1VirtualCloudConfig": { + "description": "VirtualCloudConfig is the Schema for the virtual cloudconfigs API", + "type": "object", + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + "type": "string" + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/v1VirtualCloudConfigSpec" + }, + "status": { + "$ref": "#/definitions/v1NestedCloudConfigStatus" + } + } + }, + "v1VirtualCloudConfigSpec": { + "description": "VirtualCloudConfigSpec defines the cloud configuration input by user This will translate to clusterspec for cluster-api.", + "type": "object", + "required": [ + "clusterConfig", + "hostClusterUid", + "machinePoolConfig" + ], + "properties": { + "clusterConfig": { + "$ref": "#/definitions/v1VirtualClusterConfig" + }, + "hostClusterUid": { + "type": "string" + }, + "machinePoolConfig": { + "type": "array", + "items": { + "$ref": "#/definitions/v1VirtualMachinePoolConfig" + } + } + } + }, + "v1VirtualClusterConfig": { + "description": "Cluster level configuration for virtual cluster", + "type": "object", + "properties": { + "controlPlaneEndpoint": { + "$ref": "#/definitions/v1APIEndpoint" + }, + "helmRelease": { + "$ref": "#/definitions/v1VirtualClusterHelmRelease" + }, + "kubernetesVersion": { + "type": "string", + "default": "" + } + } + }, + "v1VirtualClusterHelmChart": { + "type": "object", + "properties": { + "name": { + "type": "string", + "default": "" + }, + "repo": { + "type": "string", + "default": "" + }, + "version": { + "type": "string", + "default": "" + } + } + }, + "v1VirtualClusterHelmRelease": { + "type": "object", + "properties": { + "chart": { + "$ref": "#/definitions/v1VirtualClusterHelmChart" + }, + "values": { + "type": "string", + "default": "" + } + } + }, + "v1VirtualClusterResize": { + "type": "object", + "required": [ + "instanceType" + ], + "properties": { + "instanceType": { + "$ref": "#/definitions/v1VirtualInstanceType" + } + } + }, + "v1VirtualInstanceType": { + "type": "object", + "properties": { + "maxCPU": { + "description": "Maximum CPU cores", + "type": "integer", + "format": "int32" + }, + "maxMemInMiB": { + "description": "Maximum memory in MiB", + "type": "integer", + "format": "int32" + }, + "maxStorageGiB": { + "description": "Maximum storage in GiB", + "type": "integer", + "format": "int32" + }, + "minCPU": { + "description": "Minimum CPU cores", + "type": "integer", + "format": "int32" + }, + "minMemInMiB": { + "description": "Minimum memory in MiB", + "type": "integer", + "format": "int32" + }, + "minStorageGiB": { + "description": "Minimum storage in GiB", + "type": "integer", + "format": "int32" + } + } + }, + "v1VirtualMachine": { + "description": "Virtual cloud machine definition", + "type": "object", + "properties": { + "kind": { + "type": "string" + }, + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/v1VirtualMachineSpec" + }, + "status": { + "$ref": "#/definitions/v1CloudMachineStatus" + } + } + }, + "v1VirtualMachinePoolCloudConfigEntity": { + "type": "object", + "required": [ + "instanceType" + ], + "properties": { + "instanceType": { + "$ref": "#/definitions/v1VirtualInstanceType" + } + } + }, + "v1VirtualMachinePoolConfig": { + "type": "object", + "required": [ + "instanceType" + ], + "properties": { + "additionalLabels": { + "description": "additionalLabels", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "additionalTags": { + "description": "AdditionalTags is an optional set of tags to add to resources managed by the provider, in addition to the ones added by default. For eg., tags for EKS nodeGroup or EKS NodegroupIAMRole", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "azs": { + "type": "array", + "items": { + "type": "string" + } + }, + "instanceType": { + "description": "InstanceType defines the required CPU, Memory", + "$ref": "#/definitions/v1VirtualInstanceType" + }, + "isControlPlane": { + "description": "whether this pool is for control plane", + "type": "boolean" + }, + "labels": { + "description": "labels for this pool, example: control-plane/worker, gpu, windows", + "type": "array", + "items": { + "type": "string" + } + }, + "machinePoolProperties": { + "$ref": "#/definitions/v1MachinePoolProperties" + }, + "maxSize": { + "description": "max size of the pool, for scaling", + "type": "integer", + "format": "int32" + }, + "minSize": { + "description": "min size of the pool, for scaling", + "type": "integer", + "format": "int32" + }, + "name": { + "type": "string" + }, + "resourcePool": { + "type": "string" + }, + "size": { + "description": "size of the pool, number of machines", + "type": "integer", + "format": "int32" + }, + "taints": { + "description": "control plane or worker taints", + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1Taint" + } + }, + "updateStrategy": { + "description": "rolling update strategy for this machinepool if not specified, will use ScaleOut", + "$ref": "#/definitions/v1UpdateStrategy" + }, + "useControlPlaneAsWorker": { + "description": "if IsControlPlane==true \u0026\u0026 useControlPlaneAsWorker==true, then will remove control plane taint this will not be used for worker pools", + "type": "boolean" + } + } + }, + "v1VirtualMachinePoolConfigEntity": { + "type": "object", + "required": [ + "cloudConfig" + ], + "properties": { + "cloudConfig": { + "$ref": "#/definitions/v1VirtualMachinePoolCloudConfigEntity" + } + } + }, + "v1VirtualMachineSnapshot": { + "description": "VirtualMachineSnapshot defines the operation of snapshotting a VM", + "type": "object", + "required": [ + "spec" + ], + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + "type": "string" + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "$ref": "#/definitions/v1VmObjectMeta" + }, + "spec": { + "$ref": "#/definitions/v1VirtualMachineSnapshotSpec" + }, + "status": { + "$ref": "#/definitions/v1VirtualMachineSnapshotStatus" + } + } + }, + "v1VirtualMachineSnapshotList": { + "description": "VirtualMachineSnapshotList is a list of VirtualMachineSnapshot resources", + "type": "object", + "required": [ + "metadata", + "items" + ], + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + "type": "string" + }, + "items": { + "type": "array", + "items": { + "$ref": "#/definitions/v1VirtualMachineSnapshot" + } + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "$ref": "#/definitions/v1VmListMeta" + } + } + }, + "v1VirtualMachineSnapshotSpec": { + "description": "VirtualMachineSnapshotSpec is the spec for a VirtualMachineSnapshot resource", + "type": "object", + "required": [ + "source" + ], + "properties": { + "deletionPolicy": { + "type": "string" + }, + "failureDeadline": { + "$ref": "#/definitions/v1VmDuration" + }, + "source": { + "$ref": "#/definitions/v1VmTypedLocalObjectReference" + } + } + }, + "v1VirtualMachineSnapshotStatus": { + "description": "VirtualMachineSnapshotStatus is the status for a VirtualMachineSnapshot resource", + "type": "object", + "properties": { + "conditions": { + "type": "array", + "items": { + "$ref": "#/definitions/v1VmCondition" + } + }, + "creationTime": { + "$ref": "#/definitions/v1Time" + }, + "error": { + "$ref": "#/definitions/v1VmError" + }, + "indications": { + "type": "array", + "items": { + "type": "string" + }, + "x-kubernetes-list-type": "set" + }, + "phase": { + "type": "string" + }, + "readyToUse": { + "type": "boolean" + }, + "snapshotVolumes": { + "$ref": "#/definitions/v1VmSnapshotVolumesLists" + }, + "sourceUID": { + "type": "string" + }, + "virtualMachineSnapshotContentName": { + "type": "string" + } + }, + "x-nullable": true + }, + "v1VirtualMachineSpec": { + "description": "Virtual cloud machine definition spec", + "type": "object", + "properties": { + "hostname": { + "type": "string" + } + } + }, + "v1VirtualMachines": { + "description": "List of virtual machines", + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1VirtualMachine" + } + }, + "listmeta": { + "$ref": "#/definitions/v1ListMetaData" + } + } + }, + "v1VirtualNetwork": { + "description": "Azure virtual network is the fundamental building block for your private network in Azure.", + "type": "object", + "properties": { + "addressSpaces": { + "description": "Location of the virtual network", + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + } + }, + "id": { + "description": "The ID of the resource group", + "type": "string" + }, + "location": { + "description": "Location of the virtual network", + "type": "string" + }, + "name": { + "description": "Name of the virtual network", + "type": "string" + }, + "subnets": { + "description": "List of subnets associated with Azure VPC", + "type": "array", + "items": { + "$ref": "#/definitions/v1Subnet" + } + }, + "type": { + "description": "Type of the virtual network", + "type": "string" + } + } + }, + "v1VmAccessCredential": { + "description": "AccessCredential represents a credential source that can be used to authorize remote access to the vm guest Only one of its members may be specified.", + "type": "object", + "properties": { + "sshPublicKey": { + "$ref": "#/definitions/v1VmSshPublicKeyAccessCredential" + }, + "userPassword": { + "$ref": "#/definitions/v1VmUserPasswordAccessCredential" + } + } + }, + "v1VmAccessCredentialSecretSource": { + "type": "object", + "required": [ + "secretName" + ], + "properties": { + "secretName": { + "description": "SecretName represents the name of the secret in the VMI's namespace", + "type": "string" + } + } + }, + "v1VmAddVolumeOptions": { + "description": "AddVolumeOptions is provided when dynamically hot plugging a volume and disk", + "type": "object", + "required": [ + "name", + "disk", + "volumeSource" + ], + "properties": { + "disk": { + "$ref": "#/definitions/v1VmDisk" + }, + "dryRun": { + "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", + "type": "array", + "items": { + "type": "string" + }, + "x-kubernetes-list-type": "atomic" + }, + "name": { + "description": "Name represents the name that will be used to map the disk to the corresponding volume. This overrides any name set inside the Disk struct itself.", + "type": "string" + }, + "volumeSource": { + "$ref": "#/definitions/v1VmHotplugVolumeSource" + } + } + }, + "v1VmAffinity": { + "description": "Affinity is a group of affinity scheduling rules.", + "type": "object", + "properties": { + "nodeAffinity": { + "$ref": "#/definitions/v1VmNodeAffinity" + }, + "podAffinity": { + "$ref": "#/definitions/v1VmPodAffinity" + }, + "podAntiAffinity": { + "$ref": "#/definitions/v1PodAntiAffinity" + } + } + }, + "v1VmBIOS": { + "description": "If set (default), BIOS will be used.", + "type": "object", + "properties": { + "useSerial": { + "description": "If set, the BIOS output will be transmitted over serial", + "type": "boolean" + } + } + }, + "v1VmBlockSize": { + "description": "BlockSize provides the option to change the block size presented to the VM for a disk. Only one of its members may be specified.", + "type": "object", + "properties": { + "custom": { + "$ref": "#/definitions/v1VmCustomBlockSize" + }, + "matchVolume": { + "$ref": "#/definitions/v1VmFeatureState" + } + } + }, + "v1VmBootloader": { + "description": "Represents the firmware blob used to assist in the domain creation process. Used for setting the QEMU BIOS file path for the libvirt domain.", + "type": "object", + "properties": { + "bios": { + "$ref": "#/definitions/v1VmBIOS" + }, + "efi": { + "$ref": "#/definitions/v1VmEFI" + } + } + }, + "v1VmCDRomTarget": { + "type": "object", + "properties": { + "bus": { + "description": "Bus indicates the type of disk device to emulate. supported values: virtio, sata, scsi.", + "type": "string" + }, + "readonly": { + "description": "ReadOnly. Defaults to true.", + "type": "boolean" + }, + "tray": { + "description": "Tray indicates if the tray of the device is open or closed. Allowed values are \"open\" and \"closed\". Defaults to closed.", + "type": "string" + } + } + }, + "v1VmChassis": { + "description": "Chassis specifies the chassis info passed to the domain.", + "type": "object", + "properties": { + "asset": { + "type": "string" + }, + "manufacturer": { + "type": "string" + }, + "serial": { + "type": "string" + }, + "sku": { + "type": "string" + }, + "version": { + "type": "string" + } + } + }, + "v1VmClientPassthroughDevices": { + "description": "Represent a subset of client devices that can be accessed by VMI. At the moment only, USB devices using Usbredir's library and tooling. Another fit would be a smartcard with libcacard.\n\nThe struct is currently empty as there is no immediate request for user-facing APIs. This structure simply turns on USB redirection of UsbClientPassthroughMaxNumberOf devices.", + "type": "object" + }, + "v1VmClock": { + "description": "Represents the clock and timers of a vmi.", + "type": "object", + "properties": { + "timer": { + "$ref": "#/definitions/v1VmTimer" + }, + "timezone": { + "description": "Timezone sets the guest clock to the specified timezone. Zone name follows the TZ environment variable format (e.g. 'America/New_York').", + "type": "string" + }, + "utc": { + "$ref": "#/definitions/v1VmClockOffsetUTC" + } + } + }, + "v1VmClockOffsetUTC": { + "description": "UTC sets the guest clock to UTC on each boot.", + "type": "object", + "properties": { + "offsetSeconds": { + "description": "OffsetSeconds specifies an offset in seconds, relative to UTC. If set, guest changes to the clock will be kept during reboots and not reset.", + "type": "integer", + "format": "int32" + } + } + }, + "v1VmCloudInitConfigDriveSource": { + "description": "Represents a cloud-init config drive user data source. More info: https://cloudinit.readthedocs.io/en/latest/topics/datasources/configdrive.html", + "type": "object", + "properties": { + "networkData": { + "description": "NetworkData contains config drive inline cloud-init networkdata.", + "type": "string" + }, + "networkDataBase64": { + "description": "NetworkDataBase64 contains config drive cloud-init networkdata as a base64 encoded string.", + "type": "string" + }, + "networkDataSecretRef": { + "$ref": "#/definitions/v1VmLocalObjectReference" + }, + "secretRef": { + "$ref": "#/definitions/v1VmLocalObjectReference" + }, + "userData": { + "description": "UserData contains config drive inline cloud-init userdata.", + "type": "string" + }, + "userDataBase64": { + "description": "UserDataBase64 contains config drive cloud-init userdata as a base64 encoded string.", + "type": "string" + } + } + }, + "v1VmCloudInitNoCloudSource": { + "description": "Represents a cloud-init nocloud user data source. More info: http://cloudinit.readthedocs.io/en/latest/topics/datasources/nocloud.html", + "type": "object", + "properties": { + "networkData": { + "description": "NetworkData contains NoCloud inline cloud-init networkdata.", + "type": "string" + }, + "networkDataBase64": { + "description": "NetworkDataBase64 contains NoCloud cloud-init networkdata as a base64 encoded string.", + "type": "string" + }, + "networkDataSecretRef": { + "$ref": "#/definitions/v1VmLocalObjectReference" + }, + "secretRef": { + "$ref": "#/definitions/v1VmLocalObjectReference" + }, + "userData": { + "description": "UserData contains NoCloud inline cloud-init userdata.", + "type": "string" + }, + "userDataBase64": { + "description": "UserDataBase64 contains NoCloud cloud-init userdata as a base64 encoded string.", + "type": "string" + } + } + }, + "v1VmCondition": { + "description": "Condition defines conditions", + "type": "object", + "required": [ + "type", + "status" + ], + "properties": { + "lastProbeTime": { + "type": "string" + }, + "lastTransitionTime": { + "type": "string" + }, + "message": { + "type": "string" + }, + "reason": { + "type": "string" + }, + "status": { + "type": "string" + }, + "type": { + "type": "string" + } + } + }, + "v1VmConfigDriveSshPublicKeyAccessCredentialPropagation": { + "type": "object" + }, + "v1VmConfigMapVolumeSource": { + "description": "ConfigMapVolumeSource adapts a ConfigMap into a volume. More info: https://kubernetes.io/docs/concepts/storage/volumes/#configmap", + "type": "object", + "properties": { + "name": { + "description": "Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names", + "type": "string" + }, + "optional": { + "description": "Specify whether the ConfigMap or it's keys must be defined", + "type": "boolean" + }, + "volumeLabel": { + "description": "The volume label of the resulting disk inside the VMI. Different bootstrapping mechanisms require different values. Typical values are \"cidata\" (cloud-init), \"config-2\" (cloud-init) or \"OEMDRV\" (kickstart).", + "type": "string" + } + } + }, + "v1VmContainerDiskSource": { + "description": "Represents a docker image with an embedded disk.", + "type": "object", + "required": [ + "image" + ], + "properties": { + "image": { + "description": "Image is the name of the image with the embedded disk.", + "type": "string" + }, + "imagePullPolicy": { + "description": "Image pull policy. One of Always, Never, IfNotPresent. Defaults to Always if :latest tag is specified, or IfNotPresent otherwise. Cannot be updated. More info: https://kubernetes.io/docs/concepts/containers/images#updating-images", + "type": "string" + }, + "imagePullSecret": { + "description": "ImagePullSecret is the name of the Docker registry secret required to pull the image. The secret must already exist.", + "type": "string" + }, + "path": { + "description": "Path defines the path to disk file in the container", + "type": "string" + } + } + }, + "v1VmCoreDataVolumeSource": { + "type": "object", + "required": [ + "name" + ], + "properties": { + "hotpluggable": { + "description": "Hotpluggable indicates whether the volume can be hotplugged and hotunplugged.", + "type": "boolean" + }, + "name": { + "description": "Name of both the DataVolume and the PVC in the same namespace. After PVC population the DataVolume is garbage collected by default.", + "type": "string" + } + } + }, + "v1VmCoreResourceRequirements": { + "description": "ResourceRequirements describes the compute resource requirements.", + "type": "object", + "properties": { + "limits": { + "description": "Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/", + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/v1VmQuantity" + } + }, + "requests": { + "description": "Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/", + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/v1VmQuantity" + } + } + } + }, + "v1VmCpu": { + "description": "CPU allows specifying the CPU topology.", + "type": "object", + "properties": { + "cores": { + "description": "Cores specifies the number of cores inside the vmi. Must be a value greater or equal 1.", + "type": "integer", + "format": "int64" + }, + "dedicatedCpuPlacement": { + "description": "DedicatedCPUPlacement requests the scheduler to place the VirtualMachineInstance on a node with enough dedicated pCPUs and pin the vCPUs to it.", + "type": "boolean" + }, + "features": { + "description": "Features specifies the CPU features list inside the VMI.", + "type": "array", + "items": { + "$ref": "#/definitions/v1VmCpuFeature" + } + }, + "isolateEmulatorThread": { + "description": "IsolateEmulatorThread requests one more dedicated pCPU to be allocated for the VMI to place the emulator thread on it.", + "type": "boolean" + }, + "model": { + "description": "Model specifies the CPU model inside the VMI. List of available models https://github.com/libvirt/libvirt/tree/master/src/cpu_map. It is possible to specify special cases like \"host-passthrough\" to get the same CPU as the node and \"host-model\" to get CPU closest to the node one. Defaults to host-model.", + "type": "string" + }, + "numa": { + "$ref": "#/definitions/v1VmNUMA" + }, + "realtime": { + "$ref": "#/definitions/v1VmRealtime" + }, + "sockets": { + "description": "Sockets specifies the number of sockets inside the vmi. Must be a value greater or equal 1.", + "type": "integer", + "format": "int64" + }, + "threads": { + "description": "Threads specifies the number of threads inside the vmi. Must be a value greater or equal 1.", + "type": "integer", + "format": "int64" + } + } + }, + "v1VmCpuFeature": { + "description": "CPUFeature allows specifying a CPU feature.", + "type": "object", + "required": [ + "name" + ], + "properties": { + "name": { + "description": "Name of the CPU feature", + "type": "string" + }, + "policy": { + "description": "Policy is the CPU feature attribute which can have the following attributes: force - The virtual CPU will claim the feature is supported regardless of it being supported by host CPU. require - Guest creation will fail unless the feature is supported by the host CPU or the hypervisor is able to emulate it. optional - The feature will be supported by virtual CPU if and only if it is supported by host CPU. disable - The feature will not be supported by virtual CPU. forbid - Guest creation will fail if the feature is supported by host CPU. Defaults to require", + "type": "string" + } + } + }, + "v1VmCustomBlockSize": { + "description": "CustomBlockSize represents the desired logical and physical block size for a VM disk.", + "type": "object", + "required": [ + "logical", + "physical" + ], + "properties": { + "logical": { + "type": "integer", + "format": "int32" + }, + "physical": { + "type": "integer", + "format": "int32" + } + } + }, + "v1VmDHCPOptions": { + "description": "Extra DHCP options to use in the interface.", + "type": "object", + "properties": { + "bootFileName": { + "description": "If specified will pass option 67 to interface's DHCP server", + "type": "string" + }, + "ntpServers": { + "description": "If specified will pass the configured NTP server to the VM via DHCP option 042.", + "type": "array", + "items": { + "type": "string" + } + }, + "privateOptions": { + "description": "If specified will pass extra DHCP options for private use, range: 224-254", + "type": "array", + "items": { + "$ref": "#/definitions/v1VmDHCPPrivateOptions" + } + }, + "tftpServerName": { + "description": "If specified will pass option 66 to interface's DHCP server", + "type": "string" + } + } + }, + "v1VmDHCPPrivateOptions": { + "description": "DHCPExtraOptions defines Extra DHCP options for a VM.", + "type": "object", + "required": [ + "option", + "value" + ], + "properties": { + "option": { + "description": "Option is an Integer value from 224-254 Required.", + "type": "integer", + "format": "int32" + }, + "value": { + "description": "Value is a String value for the Option provided Required.", + "type": "string" + } + } + }, + "v1VmDataVolumeBlankImage": { + "description": "DataVolumeBlankImage provides the parameters to create a new raw blank image for the PVC", + "type": "object" + }, + "v1VmDataVolumeCheckpoint": { + "description": "DataVolumeCheckpoint defines a stage in a warm migration.", + "type": "object", + "required": [ + "previous", + "current" + ], + "properties": { + "current": { + "description": "Current is the identifier of the snapshot created for this checkpoint.", + "type": "string" + }, + "previous": { + "description": "Previous is the identifier of the snapshot from the previous checkpoint.", + "type": "string" + } + } + }, + "v1VmDataVolumeSource": { + "description": "DataVolumeSource represents the source for our Data Volume, this can be HTTP, Imageio, S3, Registry or an existing PVC", + "type": "object", + "properties": { + "blank": { + "$ref": "#/definitions/v1VmDataVolumeBlankImage" + }, + "http": { + "$ref": "#/definitions/v1VmDataVolumeSourceHttp" + }, + "imageio": { + "$ref": "#/definitions/v1VmDataVolumeSourceImageIO" + }, + "pvc": { + "$ref": "#/definitions/v1VmDataVolumeSourcePVC" + }, + "registry": { + "$ref": "#/definitions/v1VmDataVolumeSourceRegistry" + }, + "s3": { + "$ref": "#/definitions/v1VmDataVolumeSourceS3" + }, + "upload": { + "$ref": "#/definitions/v1VmDataVolumeSourceUpload" + }, + "vddk": { + "$ref": "#/definitions/v1VmDataVolumeSourceVDDK" + } + } + }, + "v1VmDataVolumeSourceHttp": { + "description": "DataVolumeSourceHTTP can be either an http or https endpoint, with an optional basic auth user name and password, and an optional configmap containing additional CAs", + "type": "object", + "required": [ + "url" + ], + "properties": { + "certConfigMap": { + "description": "CertConfigMap is a configmap reference, containing a Certificate Authority(CA) public key, and a base64 encoded pem certificate", + "type": "string" + }, + "extraHeaders": { + "description": "ExtraHeaders is a list of strings containing extra headers to include with HTTP transfer requests", + "type": "array", + "items": { + "type": "string" + } + }, + "secretExtraHeaders": { + "description": "SecretExtraHeaders is a list of Secret references, each containing an extra HTTP header that may include sensitive information", + "type": "array", + "items": { + "type": "string" + } + }, + "secretRef": { + "description": "SecretRef A Secret reference, the secret should contain accessKeyId (user name) base64 encoded, and secretKey (password) also base64 encoded", + "type": "string" + }, + "url": { + "description": "URL is the URL of the http(s) endpoint", + "type": "string" + } + } + }, + "v1VmDataVolumeSourceImageIO": { + "description": "DataVolumeSourceImageIO provides the parameters to create a Data Volume from an imageio source", + "type": "object", + "required": [ + "url", + "diskId" + ], + "properties": { + "certConfigMap": { + "description": "CertConfigMap provides a reference to the CA cert", + "type": "string" + }, + "diskId": { + "description": "DiskID provides id of a disk to be imported", + "type": "string" + }, + "secretRef": { + "description": "SecretRef provides the secret reference needed to access the ovirt-engine", + "type": "string" + }, + "url": { + "description": "URL is the URL of the ovirt-engine", + "type": "string" + } + } + }, + "v1VmDataVolumeSourcePVC": { + "description": "DataVolumeSourcePVC provides the parameters to create a Data Volume from an existing PVC", + "type": "object", + "required": [ + "namespace", + "name" + ], + "properties": { + "name": { + "description": "The name of the source PVC", + "type": "string" + }, + "namespace": { + "description": "The namespace of the source PVC", + "type": "string" + } + } + }, + "v1VmDataVolumeSourceRef": { + "description": "DataVolumeSourceRef defines an indirect reference to the source of data for the DataVolume", + "type": "object", + "required": [ + "kind", + "name" + ], + "properties": { + "kind": { + "description": "The kind of the source reference, currently only \"DataSource\" is supported", + "type": "string" + }, + "name": { + "description": "The name of the source reference", + "type": "string" + }, + "namespace": { + "description": "The namespace of the source reference, defaults to the DataVolume namespace", + "type": "string" + } + } + }, + "v1VmDataVolumeSourceRegistry": { + "description": "DataVolumeSourceRegistry provides the parameters to create a Data Volume from an registry source", + "type": "object", + "properties": { + "certConfigMap": { + "description": "CertConfigMap provides a reference to the Registry certs", + "type": "string" + }, + "imageStream": { + "description": "ImageStream is the name of image stream for import", + "type": "string" + }, + "pullMethod": { + "description": "PullMethod can be either \"pod\" (default import), or \"node\" (node docker cache based import)", + "type": "string" + }, + "secretRef": { + "description": "SecretRef provides the secret reference needed to access the Registry source", + "type": "string" + }, + "url": { + "description": "URL is the url of the registry source (starting with the scheme: docker, oci-archive)", + "type": "string" + } + } + }, + "v1VmDataVolumeSourceS3": { + "description": "DataVolumeSourceS3 provides the parameters to create a Data Volume from an S3 source", + "type": "object", + "required": [ + "url" + ], + "properties": { + "certConfigMap": { + "description": "CertConfigMap is a configmap reference, containing a Certificate Authority(CA) public key, and a base64 encoded pem certificate", + "type": "string" + }, + "secretRef": { + "description": "SecretRef provides the secret reference needed to access the S3 source", + "type": "string" + }, + "url": { + "description": "URL is the url of the S3 source", + "type": "string" + } + } + }, + "v1VmDataVolumeSourceUpload": { + "description": "DataVolumeSourceUpload provides the parameters to create a Data Volume by uploading the source", + "type": "object" + }, + "v1VmDataVolumeSourceVDDK": { + "description": "DataVolumeSourceVDDK provides the parameters to create a Data Volume from a Vmware source", + "type": "object", + "properties": { + "backingFile": { + "description": "BackingFile is the path to the virtual hard disk to migrate from vCenter/ESXi", + "type": "string" + }, + "initImageURL": { + "description": "InitImageURL is an optional URL to an image containing an extracted VDDK library, overrides v2v-vmware config map", + "type": "string" + }, + "secretRef": { + "description": "SecretRef provides a reference to a secret containing the username and password needed to access the vCenter or ESXi host", + "type": "string" + }, + "thumbprint": { + "description": "Thumbprint is the certificate thumbprint of the vCenter or ESXi host", + "type": "string" + }, + "url": { + "description": "URL is the URL of the vCenter or ESXi host with the VM to migrate", + "type": "string" + }, + "uuid": { + "description": "UUID is the UUID of the virtual machine that the backing file is attached to in vCenter/ESXi", + "type": "string" + } + } + }, + "v1VmDataVolumeSpec": { + "description": "DataVolumeSpec defines the DataVolume type specification", + "type": "object", + "properties": { + "checkpoints": { + "description": "Checkpoints is a list of DataVolumeCheckpoints, representing stages in a multistage import.", + "type": "array", + "items": { + "$ref": "#/definitions/v1VmDataVolumeCheckpoint" + } + }, + "contentType": { + "description": "DataVolumeContentType options: \"kubevirt\", \"archive\"", + "type": "string" + }, + "finalCheckpoint": { + "description": "FinalCheckpoint indicates whether the current DataVolumeCheckpoint is the final checkpoint.", + "type": "boolean" + }, + "preallocation": { + "description": "Preallocation controls whether storage for DataVolumes should be allocated in advance.", + "type": "boolean" + }, + "priorityClassName": { + "description": "PriorityClassName for Importer, Cloner and Uploader pod", + "type": "string" + }, + "pvc": { + "$ref": "#/definitions/v1VmPersistentVolumeClaimSpec" + }, + "source": { + "$ref": "#/definitions/v1VmDataVolumeSource" + }, + "sourceRef": { + "$ref": "#/definitions/v1VmDataVolumeSourceRef" + }, + "storage": { + "$ref": "#/definitions/v1VmStorageSpec" + } + } + }, + "v1VmDataVolumeTemplateSpec": { + "type": "object", + "required": [ + "spec" + ], + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values.", + "type": "string" + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase.", + "type": "string" + }, + "metadata": { + "$ref": "#/definitions/v1VmObjectMeta" + }, + "spec": { + "$ref": "#/definitions/v1VmDataVolumeSpec" + } + } + }, + "v1VmDevices": { + "type": "object", + "properties": { + "autoattachGraphicsDevice": { + "description": "Whether to attach the default graphics device or not. VNC will not be available if set to false. Defaults to true.", + "type": "boolean" + }, + "autoattachInputDevice": { + "description": "Whether to attach an Input Device. Defaults to false.", + "type": "boolean" + }, + "autoattachMemBalloon": { + "description": "Whether to attach the Memory balloon device with default period. Period can be adjusted in virt-config. Defaults to true.", + "type": "boolean" + }, + "autoattachPodInterface": { + "description": "Whether to attach a pod network interface. Defaults to true.", + "type": "boolean" + }, + "autoattachSerialConsole": { + "description": "Whether to attach the default serial console or not. Serial console access will not be available if set to false. Defaults to true.", + "type": "boolean" + }, + "autoattachVSOCK": { + "description": "Whether to attach the VSOCK CID to the VM or not. VSOCK access will be available if set to true. Defaults to false.", + "type": "boolean" + }, + "blockMultiQueue": { + "description": "Whether or not to enable virtio multi-queue for block devices. Defaults to false.", + "type": "boolean" + }, + "clientPassthrough": { + "$ref": "#/definitions/v1VmClientPassthroughDevices" + }, + "disableHotplug": { + "description": "DisableHotplug disabled the ability to hotplug disks.", + "type": "boolean" + }, + "disks": { + "description": "Disks describes disks, cdroms and luns which are connected to the vmi.", + "type": "array", + "items": { + "$ref": "#/definitions/v1VmDisk" + } + }, + "filesystems": { + "description": "Filesystems describes filesystem which is connected to the vmi.", + "type": "array", + "items": { + "$ref": "#/definitions/v1VmFilesystem" + }, + "x-kubernetes-list-type": "atomic" + }, + "gpus": { + "description": "Whether to attach a GPU device to the vmi.", + "type": "array", + "items": { + "$ref": "#/definitions/v1VmGPU" + }, + "x-kubernetes-list-type": "atomic" + }, + "hostDevices": { + "description": "Whether to attach a host device to the vmi.", + "type": "array", + "items": { + "$ref": "#/definitions/v1VmHostDevice" + }, + "x-kubernetes-list-type": "atomic" + }, + "inputs": { + "description": "Inputs describe input devices", + "type": "array", + "items": { + "$ref": "#/definitions/v1VmInput" + } + }, + "interfaces": { + "description": "Interfaces describe network interfaces which are added to the vmi.", + "type": "array", + "items": { + "$ref": "#/definitions/v1VmInterface" + } + }, + "networkInterfaceMultiqueue": { + "description": "If specified, virtual network interfaces configured with a virtio bus will also enable the vhost multiqueue feature for network devices. The number of queues created depends on additional factors of the VirtualMachineInstance, like the number of guest CPUs.", + "type": "boolean" + }, + "rng": { + "$ref": "#/definitions/v1VmRng" + }, + "sound": { + "$ref": "#/definitions/v1VmSoundDevice" + }, + "tpm": { + "$ref": "#/definitions/v1VmTPMDevice" + }, + "useVirtioTransitional": { + "description": "Fall back to legacy virtio 0.9 support if virtio bus is selected on devices. This is helpful for old machines like CentOS6 or RHEL6 which do not understand virtio_non_transitional (virtio 1.0).", + "type": "boolean" + }, + "watchdog": { + "$ref": "#/definitions/v1VmWatchdog" + } + } + }, + "v1VmDisk": { + "type": "object", + "required": [ + "name" + ], + "properties": { + "blockSize": { + "$ref": "#/definitions/v1VmBlockSize" + }, + "bootOrder": { + "description": "BootOrder is an integer value \u003e 0, used to determine ordering of boot devices. Lower values take precedence. Each disk or interface that has a boot order must have a unique value. Disks without a boot order are not tried if a disk with a boot order exists.", + "type": "integer", + "format": "int32" + }, + "cache": { + "description": "Cache specifies which kvm disk cache mode should be used. Supported values are: CacheNone, CacheWriteThrough.", + "type": "string" + }, + "cdrom": { + "$ref": "#/definitions/v1VmCDRomTarget" + }, + "dedicatedIOThread": { + "description": "dedicatedIOThread indicates this disk should have an exclusive IO Thread. Enabling this implies useIOThreads = true. Defaults to false.", + "type": "boolean" + }, + "disk": { + "$ref": "#/definitions/v1VmDiskTarget" + }, + "io": { + "description": "IO specifies which QEMU disk IO mode should be used. Supported values are: native, default, threads.", + "type": "string" + }, + "lun": { + "$ref": "#/definitions/v1VmLunTarget" + }, + "name": { + "description": "Name is the device name", + "type": "string" + }, + "serial": { + "description": "Serial provides the ability to specify a serial number for the disk device.", + "type": "string" + }, + "shareable": { + "description": "If specified the disk is made sharable and multiple write from different VMs are permitted", + "type": "boolean" + }, + "tag": { + "description": "If specified, disk address and its tag will be provided to the guest via config drive metadata", + "type": "string" + } + } + }, + "v1VmDiskTarget": { + "type": "object", + "properties": { + "bus": { + "description": "Bus indicates the type of disk device to emulate. supported values: virtio, sata, scsi, usb.", + "type": "string" + }, + "pciAddress": { + "description": "If specified, the virtual disk will be placed on the guests pci address with the specified PCI address. For example: 0000:81:01.10", + "type": "string" + }, + "readonly": { + "description": "ReadOnly. Defaults to false.", + "type": "boolean" + } + } + }, + "v1VmDomainSpec": { + "type": "object", + "required": [ + "devices" + ], + "properties": { + "chassis": { + "$ref": "#/definitions/v1VmChassis" + }, + "clock": { + "$ref": "#/definitions/v1VmClock" + }, + "cpu": { + "$ref": "#/definitions/v1VmCpu" + }, + "devices": { + "$ref": "#/definitions/v1VmDevices" + }, + "features": { + "$ref": "#/definitions/v1VmFeatures" + }, + "firmware": { + "$ref": "#/definitions/v1VmFirmware" + }, + "ioThreadsPolicy": { + "description": "Controls whether or not disks will share IOThreads. Omitting IOThreadsPolicy disables use of IOThreads. One of: shared, auto", + "type": "string" + }, + "launchSecurity": { + "$ref": "#/definitions/v1VmLaunchSecurity" + }, + "machine": { + "$ref": "#/definitions/v1VmMachine" + }, + "memory": { + "$ref": "#/definitions/v1VmMemory" + }, + "resources": { + "$ref": "#/definitions/v1VmResourceRequirements" + } + } + }, + "v1VmDownwardApiVolumeFile": { + "description": "DownwardAPIVolumeFile represents information to create the file containing the pod field", + "type": "object", + "required": [ + "path" + ], + "properties": { + "fieldRef": { + "$ref": "#/definitions/v1VmObjectFieldSelector" + }, + "mode": { + "description": "Optional: mode bits used to set permissions on this file, must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. If not specified, the volume defaultMode will be used. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.", + "type": "integer", + "format": "int32" + }, + "path": { + "description": "Required: Path is the relative path name of the file to be created. Must not be absolute or contain the '..' path. Must be utf-8 encoded. The first item of the relative path must not start with '..'", + "type": "string" + }, + "resourceFieldRef": { + "$ref": "#/definitions/v1VmResourceFieldSelector" + } + } + }, + "v1VmDownwardApiVolumeSource": { + "description": "DownwardAPIVolumeSource represents a volume containing downward API info.", + "type": "object", + "properties": { + "fields": { + "description": "Fields is a list of downward API volume file", + "type": "array", + "items": { + "$ref": "#/definitions/v1VmDownwardApiVolumeFile" + } + }, + "volumeLabel": { + "description": "The volume label of the resulting disk inside the VMI. Different bootstrapping mechanisms require different values. Typical values are \"cidata\" (cloud-init), \"config-2\" (cloud-init) or \"OEMDRV\" (kickstart).", + "type": "string" + } + } + }, + "v1VmDownwardMetricsVolumeSource": { + "description": "DownwardMetricsVolumeSource adds a very small disk to VMIs which contains a limited view of host and guest metrics. The disk content is compatible with vhostmd (https://github.com/vhostmd/vhostmd) and vm-dump-metrics.", + "type": "object" + }, + "v1VmDuration": { + "description": "Duration is a wrapper around time.Duration which supports correct marshaling to YAML and JSON. In particular, it marshals into strings, which can be used as map keys in json.", + "type": "string" + }, + "v1VmEFI": { + "description": "If set, EFI will be used instead of BIOS.", + "type": "object", + "properties": { + "secureBoot": { + "description": "If set, SecureBoot will be enabled and the OVMF roms will be swapped for SecureBoot-enabled ones. Requires SMM to be enabled. Defaults to true", + "type": "boolean" + } + } + }, + "v1VmEmptyDiskSource": { + "description": "EmptyDisk represents a temporary disk which shares the vmis lifecycle.", + "type": "object", + "required": [ + "capacity" + ], + "properties": { + "capacity": { + "$ref": "#/definitions/v1VmQuantity" + } + } + }, + "v1VmEphemeralVolumeSource": { + "type": "object", + "properties": { + "persistentVolumeClaim": { + "$ref": "#/definitions/v1VmPersistentVolumeClaimVolumeSource" + } + } + }, + "v1VmError": { + "description": "Error is the last error encountered during the snapshot/restore", + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "time": { + "$ref": "#/definitions/v1Time" + } + } + }, + "v1VmExecAction": { + "description": "ExecAction describes a \"run in container\" action.", + "type": "object", + "properties": { + "command": { + "description": "Command is the command line to execute inside the container, the working directory for the command is root ('/') in the container's filesystem. The command is simply exec'd, it is not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use a shell, you need to explicitly call out to that shell. Exit status of 0 is treated as live/healthy and non-zero is unhealthy.", + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "v1VmFeatureApiC": { + "type": "object", + "properties": { + "enabled": { + "description": "Enabled determines if the feature should be enabled or disabled on the guest. Defaults to true.", + "type": "boolean" + }, + "endOfInterrupt": { + "description": "EndOfInterrupt enables the end of interrupt notification in the guest. Defaults to false.", + "type": "boolean" + } + } + }, + "v1VmFeatureHyperv": { + "description": "Hyperv specific features.", + "type": "object", + "properties": { + "evmcs": { + "$ref": "#/definitions/v1VmFeatureState" + }, + "frequencies": { + "$ref": "#/definitions/v1VmFeatureState" + }, + "ipi": { + "$ref": "#/definitions/v1VmFeatureState" + }, + "reenlightenment": { + "$ref": "#/definitions/v1VmFeatureState" + }, + "relaxed": { + "$ref": "#/definitions/v1VmFeatureState" + }, + "reset": { + "$ref": "#/definitions/v1VmFeatureState" + }, + "runtime": { + "$ref": "#/definitions/v1VmFeatureState" + }, + "spinlocks": { + "$ref": "#/definitions/v1VmFeatureSpinlocks" + }, + "synic": { + "$ref": "#/definitions/v1VmFeatureState" + }, + "synictimer": { + "$ref": "#/definitions/v1VmSyNICTimer" + }, + "tlbflush": { + "$ref": "#/definitions/v1VmFeatureState" + }, + "vapic": { + "$ref": "#/definitions/v1VmFeatureState" + }, + "vendorid": { + "$ref": "#/definitions/v1VmFeatureVendorId" + }, + "vpindex": { + "$ref": "#/definitions/v1VmFeatureState" + } + } + }, + "v1VmFeatureKVm": { + "type": "object", + "properties": { + "hidden": { + "description": "Hide the KVM hypervisor from standard MSR based discovery. Defaults to false", + "type": "boolean" + } + } + }, + "v1VmFeatureSpinlocks": { + "type": "object", + "properties": { + "enabled": { + "description": "Enabled determines if the feature should be enabled or disabled on the guest. Defaults to true.", + "type": "boolean" + }, + "spinlocks": { + "description": "Retries indicates the number of retries. Must be a value greater or equal 4096. Defaults to 4096.", + "type": "integer", + "format": "int64" + } + } + }, + "v1VmFeatureState": { + "description": "Represents if a feature is enabled or disabled.", + "type": "object", + "properties": { + "enabled": { + "description": "Enabled determines if the feature should be enabled or disabled on the guest. Defaults to true.", + "type": "boolean" + } + } + }, + "v1VmFeatureVendorId": { + "type": "object", + "properties": { + "enabled": { + "description": "Enabled determines if the feature should be enabled or disabled on the guest. Defaults to true.", + "type": "boolean" + }, + "vendorid": { + "description": "VendorID sets the hypervisor vendor id, visible to the vmi. String up to twelve characters.", + "type": "string" + } + } + }, + "v1VmFeatures": { + "type": "object", + "properties": { + "acpi": { + "$ref": "#/definitions/v1VmFeatureState" + }, + "apic": { + "$ref": "#/definitions/v1VmFeatureApiC" + }, + "hyperv": { + "$ref": "#/definitions/v1VmFeatureHyperv" + }, + "kvm": { + "$ref": "#/definitions/v1VmFeatureKVm" + }, + "pvspinlock": { + "$ref": "#/definitions/v1VmFeatureState" + }, + "smm": { + "$ref": "#/definitions/v1VmFeatureState" + } + } + }, + "v1VmFieldsV1": { + "description": "FieldsV1 stores a set of fields in a data structure like a Trie, in JSON format.\n\nEach key is either a '.' representing the field itself, and will always map to an empty set, or a string representing a sub-field or item. The string will follow one of these four formats: 'f:\u003cname\u003e', where \u003cname\u003e is the name of a field in a struct, or key in a map 'v:\u003cvalue\u003e', where \u003cvalue\u003e is the exact json formatted value of a list item 'i:\\\u003cindex\u003e', where \\\u003cindex\u003e is position of a item in a list 'k:\u003ckeys\u003e', where \u003ckeys\u003e is a map of a list item's key fields to their unique values If a key maps to an empty Fields value, the field that key represents is part of the set.\n\nThe exact format is defined in sigs.k8s.io/structured-merge-diff", + "type": "object", + "properties": { + "Raw": { + "type": "array", + "items": { + "type": "string", + "format": "byte" + } + } + } + }, + "v1VmFilesystem": { + "type": "object", + "required": [ + "name", + "virtiofs" + ], + "properties": { + "name": { + "description": "Name is the device name", + "type": "string" + }, + "virtiofs": { + "$ref": "#/definitions/v1VmFilesystemVirtiofs" + } + } + }, + "v1VmFilesystemVirtiofs": { + "type": "object" + }, + "v1VmFirmware": { + "type": "object", + "properties": { + "bootloader": { + "$ref": "#/definitions/v1VmBootloader" + }, + "kernelBoot": { + "$ref": "#/definitions/v1VmKernelBoot" + }, + "serial": { + "description": "The system-serial-number in SMBIOS", + "type": "string" + }, + "uuid": { + "description": "UUID reported by the vmi bios. Defaults to a random generated uid.", + "type": "string" + } + } + }, + "v1VmGPU": { + "type": "object", + "required": [ + "name", + "deviceName" + ], + "properties": { + "deviceName": { + "type": "string" + }, + "name": { + "description": "Name of the GPU device as exposed by a device plugin", + "type": "string" + }, + "tag": { + "description": "If specified, the virtual network interface address and its tag will be provided to the guest via config drive", + "type": "string" + }, + "virtualGPUOptions": { + "$ref": "#/definitions/v1VmVGPUOptions" + } + } + }, + "v1VmGuestAgentPing": { + "description": "GuestAgentPing configures the guest-agent based ping probe", + "type": "object" + }, + "v1VmHPETTimer": { + "type": "object", + "properties": { + "present": { + "description": "Enabled set to false makes sure that the machine type or a preset can't add the timer. Defaults to true.", + "type": "boolean" + }, + "tickPolicy": { + "description": "TickPolicy determines what happens when QEMU misses a deadline for injecting a tick to the guest. One of \"delay\", \"catchup\", \"merge\", \"discard\".", + "type": "string" + } + } + }, + "v1VmHostDevice": { + "type": "object", + "required": [ + "name", + "deviceName" + ], + "properties": { + "deviceName": { + "description": "DeviceName is the resource name of the host device exposed by a device plugin", + "type": "string" + }, + "name": { + "type": "string" + }, + "tag": { + "description": "If specified, the virtual network interface address and its tag will be provided to the guest via config drive", + "type": "string" + } + } + }, + "v1VmHostDisk": { + "description": "Represents a disk created on the cluster level", + "type": "object", + "required": [ + "path", + "type" + ], + "properties": { + "capacity": { + "$ref": "#/definitions/v1VmQuantity" + }, + "path": { + "description": "The path to HostDisk image located on the cluster", + "type": "string" + }, + "shared": { + "description": "Shared indicate whether the path is shared between nodes", + "type": "boolean" + }, + "type": { + "description": "Contains information if disk.img exists or should be created allowed options are 'Disk' and 'DiskOrCreate'", + "type": "string" + } + } + }, + "v1VmHotplugVolumeSource": { + "description": "HotplugVolumeSource Represents the source of a volume to mount which are capable of being hotplugged on a live running VMI. Only one of its members may be specified.", + "type": "object", + "properties": { + "dataVolume": { + "$ref": "#/definitions/v1VmCoreDataVolumeSource" + }, + "persistentVolumeClaim": { + "$ref": "#/definitions/v1VmPersistentVolumeClaimVolumeSource" + } + } + }, + "v1VmHttpGetAction": { + "description": "HTTPGetAction describes an action based on HTTP Get requests.", + "type": "object", + "required": [ + "port" + ], + "properties": { + "host": { + "description": "Host name to connect to, defaults to the pod IP. You probably want to set \"Host\" in httpHeaders instead.", + "type": "string" + }, + "httpHeaders": { + "description": "Custom headers to set in the request. HTTP allows repeated headers.", + "type": "array", + "items": { + "$ref": "#/definitions/v1VmHttpHeader" + } + }, + "path": { + "description": "Path to access on the HTTP server.", + "type": "string" + }, + "port": { + "description": "Name or number of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME.", + "type": [ + "string", + "number" + ] + }, + "scheme": { + "description": "Scheme to use for connecting to the host. Defaults to HTTP.", + "type": "string" + } + } + }, + "v1VmHttpHeader": { + "description": "HTTPHeader describes a custom header to be used in HTTP probes", + "type": "object", + "required": [ + "name", + "value" + ], + "properties": { + "name": { + "description": "The header field name", + "type": "string" + }, + "value": { + "description": "The header field value", + "type": "string" + } + } + }, + "v1VmHugepages": { + "description": "Hugepages allow to use hugepages for the VirtualMachineInstance instead of regular memory.", + "type": "object", + "properties": { + "pageSize": { + "description": "PageSize specifies the hugepage size, for x86_64 architecture valid values are 1Gi and 2Mi.", + "type": "string" + } + } + }, + "v1VmHypervTimer": { + "type": "object", + "properties": { + "present": { + "description": "Enabled set to false makes sure that the machine type or a preset can't add the timer. Defaults to true.", + "type": "boolean" + } + } + }, + "v1VmI6300ESBWatchdog": { + "description": "i6300esb watchdog device.", + "type": "object", + "properties": { + "action": { + "description": "The action to take. Valid values are poweroff, reset, shutdown. Defaults to reset.", + "type": "string" + } + } + }, + "v1VmInput": { + "type": "object", + "required": [ + "type", + "name" + ], + "properties": { + "bus": { + "description": "Bus indicates the bus of input device to emulate. Supported values: virtio, usb.", + "type": "string" + }, + "name": { + "description": "Name is the device name", + "type": "string" + }, + "type": { + "description": "Type indicated the type of input device. Supported values: tablet.", + "type": "string" + } + } + }, + "v1VmInstancetypeMatcher": { + "description": "InstancetypeMatcher references a instancetype that is used to fill fields in the VMI template.", + "type": "object", + "properties": { + "inferFromVolume": { + "description": "InferFromVolume lists the name of a volume that should be used to infer or discover the instancetype to be used through known annotations on the underlying resource. Once applied to the InstancetypeMatcher this field is removed.", + "type": "string" + }, + "kind": { + "description": "Kind specifies which instancetype resource is referenced. Allowed values are: \"VirtualMachineInstancetype\" and \"VirtualMachineClusterInstancetype\". If not specified, \"VirtualMachineClusterInstancetype\" is used by default.", + "type": "string" + }, + "name": { + "description": "Name is the name of the VirtualMachineInstancetype or VirtualMachineClusterInstancetype", + "type": "string" + }, + "revisionName": { + "description": "RevisionName specifies a ControllerRevision containing a specific copy of the VirtualMachineInstancetype or VirtualMachineClusterInstancetype to be used. This is initially captured the first time the instancetype is applied to the VirtualMachineInstance.", + "type": "string" + } + } + }, + "v1VmInterface": { + "type": "object", + "required": [ + "name" + ], + "properties": { + "acpiIndex": { + "description": "If specified, the ACPI index is used to provide network interface device naming, that is stable across changes in PCI addresses assigned to the device. This value is required to be unique across all devices and be between 1 and (16*1024-1).", + "type": "integer", + "format": "int32" + }, + "bootOrder": { + "description": "BootOrder is an integer value \u003e 0, used to determine ordering of boot devices. Lower values take precedence. Each interface or disk that has a boot order must have a unique value. Interfaces without a boot order are not tried.", + "type": "integer", + "format": "int32" + }, + "bridge": { + "$ref": "#/definitions/v1VmInterfaceBridge" + }, + "dhcpOptions": { + "$ref": "#/definitions/v1VmDHCPOptions" + }, + "macAddress": { + "description": "Interface MAC address. For example: de:ad:00:00:be:af or DE-AD-00-00-BE-AF.", + "type": "string" + }, + "macvtap": { + "$ref": "#/definitions/v1VmInterfaceMacvtap" + }, + "masquerade": { + "$ref": "#/definitions/v1VmInterfaceMasquerade" + }, + "model": { + "description": "Interface model. One of: e1000, e1000e, ne2k_pci, pcnet, rtl8139, virtio. Defaults to virtio.", + "type": "string" + }, + "name": { + "description": "Logical name of the interface as well as a reference to the associated networks. Must match the Name of a Network.", + "type": "string" + }, + "passt": { + "$ref": "#/definitions/v1VmInterfacePasst" + }, + "pciAddress": { + "description": "If specified, the virtual network interface will be placed on the guests pci address with the specified PCI address. For example: 0000:81:01.10", + "type": "string" + }, + "ports": { + "description": "List of ports to be forwarded to the virtual machine.", + "type": "array", + "items": { + "$ref": "#/definitions/v1VmPort" + } + }, + "slirp": { + "$ref": "#/definitions/v1VmInterfaceSlirp" + }, + "sriov": { + "$ref": "#/definitions/v1VmInterfaceSRIOV" + }, + "tag": { + "description": "If specified, the virtual network interface address and its tag will be provided to the guest via config drive", + "type": "string" + } + } + }, + "v1VmInterfaceBridge": { + "description": "InterfaceBridge connects to a given network via a linux bridge.", + "type": "object" + }, + "v1VmInterfaceMacvtap": { + "description": "InterfaceMacvtap connects to a given network by extending the Kubernetes node's L2 networks via a macvtap interface.", + "type": "object" + }, + "v1VmInterfaceMasquerade": { + "description": "InterfaceMasquerade connects to a given network using netfilter rules to nat the traffic.", + "type": "object" + }, + "v1VmInterfacePasst": { + "description": "InterfacePasst connects to a given network.", + "type": "object" + }, + "v1VmInterfaceSRIOV": { + "description": "InterfaceSRIOV connects to a given network by passing-through an SR-IOV PCI device via vfio.", + "type": "object" + }, + "v1VmInterfaceSlirp": { + "description": "InterfaceSlirp connects to a given network using QEMU user networking mode.", + "type": "object" + }, + "v1VmKVmTimer": { + "type": "object", + "properties": { + "present": { + "description": "Enabled set to false makes sure that the machine type or a preset can't add the timer. Defaults to true.", + "type": "boolean" + } + } + }, + "v1VmKernelBoot": { + "description": "Represents the firmware blob used to assist in the kernel boot process. Used for setting the kernel, initrd and command line arguments", + "type": "object", + "properties": { + "container": { + "$ref": "#/definitions/v1VmKernelBootContainer" + }, + "kernelArgs": { + "description": "Arguments to be passed to the kernel at boot time", + "type": "string" + } + } + }, + "v1VmKernelBootContainer": { + "description": "If set, the VM will be booted from the defined kernel / initrd.", + "type": "object", + "required": [ + "image" + ], + "properties": { + "image": { + "description": "Image that contains initrd / kernel files.", + "type": "string" + }, + "imagePullPolicy": { + "description": "Image pull policy. One of Always, Never, IfNotPresent. Defaults to Always if :latest tag is specified, or IfNotPresent otherwise. Cannot be updated. More info: https://kubernetes.io/docs/concepts/containers/images#updating-images", + "type": "string" + }, + "imagePullSecret": { + "description": "ImagePullSecret is the name of the Docker registry secret required to pull the image. The secret must already exist.", + "type": "string" + }, + "initrdPath": { + "description": "the fully-qualified path to the ramdisk image in the host OS", + "type": "string" + }, + "kernelPath": { + "description": "The fully-qualified path to the kernel image in the host OS", + "type": "string" + } + } + }, + "v1VmLabelSelector": { + "description": "A label selector is a label query over a set of resources. The result of matchLabels and matchExpressions are ANDed. An empty label selector matches all objects. A null label selector matches no objects.", + "type": "object", + "properties": { + "matchExpressions": { + "description": "matchExpressions is a list of label selector requirements. The requirements are ANDed.", + "type": "array", + "items": { + "$ref": "#/definitions/v1VmLabelSelectorRequirement" + } + }, + "matchLabels": { + "description": "matchLabels is a map of key-value pairs. A single key-value in the matchLabels map is equivalent to an element of matchExpressions, whose key field is \"key\", the operator is \"In\", and the values array contains only \"value\". The requirements are ANDed.", + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + }, + "v1VmLabelSelectorRequirement": { + "description": "A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values.", + "type": "object", + "required": [ + "key", + "operator" + ], + "properties": { + "key": { + "description": "key is the label key that the selector applies to.", + "type": "string", + "x-kubernetes-patch-merge-key": "key", + "x-kubernetes-patch-strategy": "merge" + }, + "operator": { + "description": "operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.", + "type": "string" + }, + "values": { + "description": "values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch.", + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "v1VmLaunchSecurity": { + "type": "object", + "properties": { + "sev": { + "$ref": "#/definitions/v1VmSEV" + } + } + }, + "v1VmListMeta": { + "description": "ListMeta describes metadata that synthetic resources must have, including lists and various status objects. A resource may have only one of {ObjectMeta, ListMeta}.", + "type": "object", + "properties": { + "continue": { + "description": "continue may be set if the user set a limit on the number of items returned, and indicates that the server has more data available. The value is opaque and may be used to issue another request to the endpoint that served this list to retrieve the next set of available objects. Continuing a consistent list may not be possible if the server configuration has changed or more than a few minutes have passed. The resourceVersion field returned when using this continue value will be identical to the value in the first response, unless you have received this token from an error message.", + "type": "string" + }, + "remainingItemCount": { + "description": "remainingItemCount is the number of subsequent items in the list which are not included in this list response. If the list request contained label or field selectors, then the number of remaining items is unknown and the field will be left unset and omitted during serialization. If the list is complete (either because it is not chunking or because this is the last chunk), then there are no more remaining items and this field will be left unset and omitted during serialization. Servers older than v1.15 do not set this field. The intended use of the remainingItemCount is *estimating* the size of a collection. Clients should not rely on the remainingItemCount to be set or to be exact.", + "type": "integer", + "format": "int64" + }, + "resourceVersion": { + "description": "String that identifies the server's internal version of this object that can be used by clients to determine when objects have changed. Value must be treated as opaque by clients and passed unmodified back to the server. Populated by the system. Read-only.", + "type": "string" + }, + "selfLink": { + "description": "selfLink is a URL representing this object. Populated by the system. Read-only.\n\nDEPRECATED Kubernetes will stop propagating this field in 1.20 release and the field is planned to be removed in 1.21 release.", + "type": "string" + } + } + }, + "v1VmLocalObjectReference": { + "description": "LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace.", + "type": "object", + "properties": { + "name": { + "description": "Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names", + "type": "string" + } + } + }, + "v1VmLunTarget": { + "type": "object", + "properties": { + "bus": { + "description": "Bus indicates the type of disk device to emulate. supported values: virtio, sata, scsi.", + "type": "string" + }, + "readonly": { + "description": "ReadOnly. Defaults to false.", + "type": "boolean" + } + } + }, + "v1VmMachine": { + "type": "object", + "properties": { + "type": { + "description": "QEMU machine type is the actual chipset of the VirtualMachineInstance.", + "type": "string" + } + } + }, + "v1VmManagedFieldsEntry": { + "description": "ManagedFieldsEntry is a workflow-id, a FieldSet and the group version of the resource that the fieldset applies to.", + "type": "object", + "properties": { + "apiVersion": { + "description": "APIVersion defines the version of this resource that this field set applies to. The format is \"group/version\" just like the top-level APIVersion field. It is necessary to track the version of a field set because it cannot be automatically converted.", + "type": "string" + }, + "fieldsType": { + "description": "FieldsType is the discriminator for the different fields format and version. There is currently only one possible value: \"FieldsV1\"", + "type": "string" + }, + "fieldsV1": { + "$ref": "#/definitions/v1VmFieldsV1" + }, + "manager": { + "description": "Manager is an identifier of the workflow managing these fields.", + "type": "string" + }, + "operation": { + "description": "Operation is the type of operation which lead to this ManagedFieldsEntry being created. The only valid values for this field are 'Apply' and 'Update'.", + "type": "string" + }, + "subresource": { + "description": "Subresource is the name of the subresource used to update that object, or empty string if the object was updated through the main resource. The value of this field is used to distinguish between managers, even if they share the same name. For example, a status update will be distinct from a regular update using the same manager name. Note that the APIVersion field is not related to the Subresource field and it always corresponds to the version of the main resource.", + "type": "string" + }, + "time": { + "$ref": "#/definitions/v1Time" + } + } + }, + "v1VmMemory": { + "description": "Memory allows specifying the VirtualMachineInstance memory features.", + "type": "object", + "properties": { + "guest": { + "$ref": "#/definitions/v1VmQuantity" + }, + "hugepages": { + "$ref": "#/definitions/v1VmHugepages" + } + } + }, + "v1VmMemoryDumpVolumeSource": { + "type": "object", + "required": [ + "claimName" + ], + "properties": { + "claimName": { + "description": "ClaimName is the name of a PersistentVolumeClaim in the same namespace as the pod using this volume. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims", + "type": "string" + }, + "hotpluggable": { + "description": "Hotpluggable indicates whether the volume can be hotplugged and hotunplugged.", + "type": "boolean" + }, + "readOnly": { + "description": "Will force the ReadOnly setting in VolumeMounts. Default false.", + "type": "boolean" + } + } + }, + "v1VmMultusNetwork": { + "description": "Represents the multus cni network.", + "type": "object", + "required": [ + "networkName" + ], + "properties": { + "default": { + "description": "Select the default network and add it to the multus-cni.io/default-network annotation.", + "type": "boolean" + }, + "networkName": { + "description": "References to a NetworkAttachmentDefinition CRD object. Format: \u003cnetworkName\u003e, \u003cnamespace\u003e/\u003cnetworkName\u003e. If namespace is not specified, VMI namespace is assumed.", + "type": "string" + } + } + }, + "v1VmNUMA": { + "type": "object", + "properties": { + "guestMappingPassthrough": { + "$ref": "#/definitions/v1VmNUMAGuestMappingPassthrough" + } + } + }, + "v1VmNUMAGuestMappingPassthrough": { + "description": "NUMAGuestMappingPassthrough instructs kubevirt to model numa topology which is compatible with the CPU pinning on the guest. This will result in a subset of the node numa topology being passed through, ensuring that virtual numa nodes and their memory never cross boundaries coming from the node numa mapping.", + "type": "object" + }, + "v1VmNetwork": { + "description": "Network represents a network type and a resource that should be connected to the vm.", + "type": "object", + "required": [ + "name" + ], + "properties": { + "multus": { + "$ref": "#/definitions/v1VmMultusNetwork" + }, + "name": { + "description": "Network name. Must be a DNS_LABEL and unique within the vm. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names", + "type": "string" + }, + "pod": { + "$ref": "#/definitions/v1VmPodNetwork" + } + } + }, + "v1VmNodeAffinity": { + "description": "Node affinity is a group of node affinity scheduling rules.", + "type": "object", + "properties": { + "preferredDuringSchedulingIgnoredDuringExecution": { + "description": "The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding \"weight\" to the sum if the node matches the corresponding matchExpressions; the node(s) with the highest sum are the most preferred.", + "type": "array", + "items": { + "$ref": "#/definitions/v1VmPreferredSchedulingTerm" + } + }, + "requiredDuringSchedulingIgnoredDuringExecution": { + "$ref": "#/definitions/v1VmNodeSelector" + } + } + }, + "v1VmNodeSelector": { + "description": "A node selector represents the union of the results of one or more label queries over a set of nodes; that is, it represents the OR of the selectors represented by the node selector terms.", + "type": "object", + "required": [ + "nodeSelectorTerms" + ], + "properties": { + "nodeSelectorTerms": { + "description": "Required. A list of node selector terms. The terms are ORed.", + "type": "array", + "items": { + "$ref": "#/definitions/v1VmNodeSelectorTerm" + } + } + } + }, + "v1VmNodeSelectorRequirement": { + "description": "A node selector requirement is a selector that contains values, a key, and an operator that relates the key and values.", + "type": "object", + "required": [ + "key", + "operator" + ], + "properties": { + "key": { + "description": "The label key that the selector applies to.", + "type": "string" + }, + "operator": { + "description": "Represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt.", + "type": "string" + }, + "values": { + "description": "An array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. If the operator is Gt or Lt, the values array must have a single element, which will be interpreted as an integer. This array is replaced during a strategic merge patch.", + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "v1VmNodeSelectorTerm": { + "description": "A null or empty node selector term matches no objects. The requirements of them are ANDed. The TopologySelectorTerm type implements a subset of the NodeSelectorTerm.", + "type": "object", + "properties": { + "matchExpressions": { + "description": "A list of node selector requirements by node's labels.", + "type": "array", + "items": { + "$ref": "#/definitions/v1VmNodeSelectorRequirement" + } + }, + "matchFields": { + "description": "A list of node selector requirements by node's fields.", + "type": "array", + "items": { + "$ref": "#/definitions/v1VmNodeSelectorRequirement" + } + } + } + }, + "v1VmObjectFieldSelector": { + "description": "ObjectFieldSelector selects an APIVersioned field of an object.", + "type": "object", + "required": [ + "fieldPath" + ], + "properties": { + "apiVersion": { + "description": "Version of the schema the FieldPath is written in terms of, defaults to \"v1\".", + "type": "string" + }, + "fieldPath": { + "description": "Path of the field to select in the specified API version.", + "type": "string" + } + } + }, + "v1VmObjectMeta": { + "description": "ObjectMeta is metadata that all persisted resources must have, which includes all objects users must create.", + "type": "object", + "properties": { + "annotations": { + "description": "Annotations is an unstructured key value map stored with a resource that may be set by external tools to store and retrieve arbitrary metadata. They are not queryable and should be preserved when modifying objects. More info: http://kubernetes.io/docs/user-guide/annotations", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "clusterName": { + "description": "The name of the cluster which the object belongs to. This is used to distinguish resources with same name and namespace in different clusters. This field is not set anywhere right now and apiserver is going to ignore it if set in create or update request.", + "type": "string" + }, + "creationTimestamp": { + "description": "CreationTimestamp is a timestamp representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations. Clients may not set this value. It is represented in RFC3339 form and is in UTC.\n\nPopulated by the system. Read-only. Null for lists. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + "type": "string" + }, + "deletionGracePeriodSeconds": { + "description": "Number of seconds allowed for this object to gracefully terminate before it will be removed from the system. Only set when deletionTimestamp is also set. May only be shortened. Read-only.", + "type": "integer", + "format": "int64" + }, + "deletionTimestamp": { + "description": "DeletionTimestamp is RFC 3339 date and time at which this resource will be deleted. This field is set by the server when a graceful deletion is requested by the user, and is not directly settable by a client. The resource is expected to be deleted (no longer visible from resource lists, and not reachable by name) after the time in this field, once the finalizers list is empty. As long as the finalizers list contains items, deletion is blocked. Once the deletionTimestamp is set, this value may not be unset or be set further into the future, although it may be shortened or the resource may be deleted prior to this time. For example, a user may request that a pod is deleted in 30 seconds. The Kubelet will react by sending a graceful termination signal to the containers in the pod. After that 30 seconds, the Kubelet will send a hard termination signal (SIGKILL) to the container and after cleanup, remove the pod from the API. In the presence of network partitions, this object may still exist after this timestamp, until an administrator or automated process can determine the resource is fully terminated. If not set, graceful deletion of the object has not been requested.\n\nPopulated by the system when a graceful deletion is requested. Read-only. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + "type": "string", + "format": "date-time", + "x-nullable": true + }, + "finalizers": { + "description": "Must be empty before the object is deleted from the registry. Each entry is an identifier for the responsible component that will remove the entry from the list. If the deletionTimestamp of the object is non-nil, entries in this list can only be removed. Finalizers may be processed and removed in any order. Order is NOT enforced because it introduces significant risk of stuck finalizers. finalizers is a shared field, any actor with permission can reorder it. If the finalizer list is processed in order, then this can lead to a situation in which the component responsible for the first finalizer in the list is waiting for a signal (field value, external system, or other) produced by a component responsible for a finalizer later in the list, resulting in a deadlock. Without enforced ordering finalizers are free to order amongst themselves and are not vulnerable to ordering changes in the list.", + "type": "array", + "items": { + "type": "string" + }, + "x-kubernetes-patch-strategy": "merge" + }, + "generateName": { + "description": "GenerateName is an optional prefix, used by the server, to generate a unique name ONLY IF the Name field has not been provided. If this field is used, the name returned to the client will be different than the name passed. This value will also be combined with a unique suffix. The provided value has the same validation rules as the Name field, and may be truncated by the length of the suffix required to make the value unique on the server.\n\nIf this field is specified and the generated name exists, the server will NOT return a 409 - instead, it will either return 201 Created or 500 with Reason ServerTimeout indicating a unique name could not be found in the time allotted, and the client should retry (optionally after the time indicated in the Retry-After header).\n\nApplied only if Name is not specified.", + "type": "string" + }, + "generation": { + "description": "A sequence number representing a specific generation of the desired state. Populated by the system. Read-only.", + "type": "integer", + "format": "int64" + }, + "labels": { + "description": "Map of string keys and values that can be used to organize and categorize (scope and select) objects. May match selectors of replication controllers and services. More info: http://kubernetes.io/docs/user-guide/labels", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "managedFields": { + "description": "ManagedFields maps workflow-id and version to the set of fields that are managed by that workflow. This is mostly for internal housekeeping, and users typically shouldn't need to set or understand this field. A workflow can be the user's name, a controller's name, or the name of a specific apply path like \"ci-cd\". The set of fields is always in the version that the workflow used when modifying the object.", + "type": "array", + "items": { + "$ref": "#/definitions/v1VmManagedFieldsEntry" + } + }, + "name": { + "description": "Name must be unique within a namespace. Is required when creating resources, although some resources may allow a client to request the generation of an appropriate name automatically. Name is primarily intended for creation idempotence and configuration definition. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/identifiers#names", + "type": "string" + }, + "namespace": { + "description": "Namespace defines the space within which each name must be unique. An empty namespace is equivalent to the \"default\" namespace, but \"default\" is the canonical representation. Not all objects are required to be scoped to a namespace - the value of this field for those objects will be empty.\nMust be a DNS_LABEL. Cannot be updated.", + "type": "string" + }, + "ownerReferences": { + "description": "List of objects depended by this object. If ALL objects in the list have been deleted, this object will be garbage collected. If this object is managed by a controller, then an entry in this list will point to this controller, with the controller field set to true. There cannot be more than one managing controller.", + "type": "array", + "items": { + "$ref": "#/definitions/v1VmOwnerReference" + }, + "x-kubernetes-patch-merge-key": "uid", + "x-kubernetes-patch-strategy": "merge" + }, + "resourceVersion": { + "description": "An opaque value that represents the internal version of this object that can be used by clients to determine when objects have changed. May be used for optimistic concurrency, change detection, and the watch operation on a resource or set of resources. Clients must treat these values as opaque and passed unmodified back to the server. They may only be valid for a particular resource or set of resources.\nPopulated by the system. Read-only. Value must be treated as opaque by clients.", + "type": "string" + }, + "selfLink": { + "description": "SelfLink is a URL representing this object. Populated by the system. Read-only.\nDEPRECATED Kubernetes will stop propagating this field in 1.20 release and the field is planned to be removed in 1.21 release.", + "type": "string" + }, + "uid": { + "description": "UID is the unique in time and space value for this object. It is typically generated by the server on successful creation of a resource and is not allowed to change on PUT operations.\nPopulated by the system. Read-only.", + "type": "string" + } + } + }, + "v1VmOwnerReference": { + "description": "OwnerReference contains enough information to let you identify an owning object. An owning object must be in the same namespace as the dependent, or be cluster-scoped, so there is no namespace field.", + "type": "object", + "required": [ + "apiVersion", + "kind", + "name", + "uid" + ], + "properties": { + "apiVersion": { + "description": "API version of the referent.", + "type": "string" + }, + "blockOwnerDeletion": { + "description": "If true, AND if the owner has the \"foregroundDeletion\" finalizer, then the owner cannot be deleted from the key-value store until this reference is removed. Defaults to false. To set this field, a user needs \"delete\" permission of the owner, otherwise 422 (Unprocessable Entity) will be returned.", + "type": "boolean" + }, + "controller": { + "description": "If true, this reference points to the managing controller.", + "type": "boolean" + }, + "kind": { + "description": "Kind of the referent.", + "type": "string" + }, + "name": { + "description": "Name of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#names", + "type": "string" + }, + "uid": { + "description": "UID of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#uids", + "type": "string" + } + } + }, + "v1VmPITTimer": { + "type": "object", + "properties": { + "present": { + "description": "Enabled set to false makes sure that the machine type or a preset can't add the timer. Defaults to true.", + "type": "boolean" + }, + "tickPolicy": { + "description": "TickPolicy determines what happens when QEMU misses a deadline for injecting a tick to the guest. One of \"delay\", \"catchup\", \"discard\".", + "type": "string" + } + } + }, + "v1VmPersistentVolumeClaimSpec": { + "description": "PersistentVolumeClaimSpec describes the common attributes of storage devices and allows a Source for provider-specific attributes", + "type": "object", + "properties": { + "accessModes": { + "description": "AccessModes contains the desired access modes the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1", + "type": "array", + "items": { + "type": "string" + } + }, + "dataSource": { + "$ref": "#/definitions/v1VmTypedLocalObjectReference" + }, + "dataSourceRef": { + "$ref": "#/definitions/v1VmTypedLocalObjectReference" + }, + "resources": { + "$ref": "#/definitions/v1VmCoreResourceRequirements" + }, + "selector": { + "$ref": "#/definitions/v1VmLabelSelector" + }, + "storageClassName": { + "description": "Name of the StorageClass required by the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1", + "type": "string" + }, + "volumeMode": { + "description": "volumeMode defines what type of volume is required by the claim. Value of Filesystem is implied when not included in claim spec.", + "type": "string" + }, + "volumeName": { + "description": "VolumeName is the binding reference to the PersistentVolume backing this claim.", + "type": "string" + } + } + }, + "v1VmPersistentVolumeClaimVolumeSource": { + "description": "PersistentVolumeClaimVolumeSource represents a reference to a PersistentVolumeClaim in the same namespace. Directly attached to the vmi via qemu. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims", + "type": "object", + "required": [ + "claimName" + ], + "properties": { + "claimName": { + "description": "ClaimName is the name of a PersistentVolumeClaim in the same namespace as the pod using this volume. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims", + "type": "string" + }, + "hotpluggable": { + "description": "Hotpluggable indicates whether the volume can be hotplugged and hotunplugged.", + "type": "boolean" + }, + "readOnly": { + "description": "Will force the ReadOnly setting in VolumeMounts. Default false.", + "type": "boolean" + } + } + }, + "v1VmPodAffinity": { + "description": "Pod affinity is a group of inter pod affinity scheduling rules.", + "type": "object", + "properties": { + "preferredDuringSchedulingIgnoredDuringExecution": { + "description": "The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding \"weight\" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred.", + "type": "array", + "items": { + "$ref": "#/definitions/v1VmWeightedPodAffinityTerm" + } + }, + "requiredDuringSchedulingIgnoredDuringExecution": { + "description": "If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied.", + "type": "array", + "items": { + "$ref": "#/definitions/v1VmPodAffinityTerm" + } + } + } + }, + "v1VmPodAffinityTerm": { + "description": "Defines a set of pods (namely those matching the labelSelector relative to the given namespace(s)) that this pod should be co-located (affinity) or not co-located (anti-affinity) with, where co-located is defined as running on a node whose value of the label with key \u003ctopologyKey\u003e matches that of any node on which a pod of the set of pods is running", + "type": "object", + "required": [ + "topologyKey" + ], + "properties": { + "labelSelector": { + "$ref": "#/definitions/v1VmLabelSelector" + }, + "namespaceSelector": { + "$ref": "#/definitions/v1VmLabelSelector" + }, + "namespaces": { + "description": "namespaces specifies a static list of namespace names that the term applies to. The term is applied to the union of the namespaces listed in this field and the ones selected by namespaceSelector. null or empty namespaces list and null namespaceSelector means \"this pod's namespace\"", + "type": "array", + "items": { + "type": "string" + } + }, + "topologyKey": { + "description": "This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching the labelSelector in the specified namespaces, where co-located is defined as running on a node whose value of the label with key topologyKey matches that of any node on which any of the selected pods is running. Empty topologyKey is not allowed.", + "type": "string" + } + } + }, + "v1VmPodDnsConfig": { + "description": "PodDNSConfig defines the DNS parameters of a pod in addition to those generated from DNSPolicy.", + "type": "object", + "properties": { + "nameservers": { + "description": "A list of DNS name server IP addresses. This will be appended to the base nameservers generated from DNSPolicy. Duplicated nameservers will be removed.", + "type": "array", + "items": { + "type": "string" + } + }, + "options": { + "description": "A list of DNS resolver options. This will be merged with the base options generated from DNSPolicy. Duplicated entries will be removed. Resolution options given in Options will override those that appear in the base DNSPolicy.", + "type": "array", + "items": { + "$ref": "#/definitions/v1VmPodDnsConfigOption" + } + }, + "searches": { + "description": "A list of DNS search domains for host-name lookup. This will be appended to the base search paths generated from DNSPolicy. Duplicated search paths will be removed.", + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "v1VmPodDnsConfigOption": { + "description": "PodDNSConfigOption defines DNS resolver options of a pod.", + "type": "object", + "properties": { + "name": { + "description": "Required.", + "type": "string" + }, + "value": { + "type": "string" + } + } + }, + "v1VmPodNetwork": { + "description": "Represents the stock pod network interface.", + "type": "object", + "properties": { + "vmIPv6NetworkCIDR": { + "description": "IPv6 CIDR for the vm network. Defaults to fd10:0:2::/120 if not specified.", + "type": "string" + }, + "vmNetworkCIDR": { + "description": "CIDR for vm network. Default 10.0.2.0/24 if not specified.", + "type": "string" + } + } + }, + "v1VmPort": { + "description": "Port represents a port to expose from the virtual machine. Default protocol TCP. The port field is mandatory", + "type": "object", + "required": [ + "port" + ], + "properties": { + "name": { + "description": "If specified, this must be an IANA_SVC_NAME and unique within the pod. Each named port in a pod must have a unique name. Name for the port that can be referred to by services.", + "type": "string" + }, + "port": { + "description": "Number of port to expose for the virtual machine. This must be a valid port number, 0 \u003c x \u003c 65536.", + "type": "integer", + "format": "int32" + }, + "protocol": { + "description": "Protocol for port. Must be UDP or TCP. Defaults to \"TCP\".", + "type": "string" + } + } + }, + "v1VmPreferenceMatcher": { + "description": "PreferenceMatcher references a set of preference that is used to fill fields in the VMI template.", + "type": "object", + "properties": { + "inferFromVolume": { + "description": "InferFromVolume lists the name of a volume that should be used to infer or discover the preference to be used through known annotations on the underlying resource. Once applied to the PreferenceMatcher this field is removed.", + "type": "string" + }, + "kind": { + "description": "Kind specifies which preference resource is referenced. Allowed values are: \"VirtualMachinePreference\" and \"VirtualMachineClusterPreference\". If not specified, \"VirtualMachineClusterPreference\" is used by default.", + "type": "string" + }, + "name": { + "description": "Name is the name of the VirtualMachinePreference or VirtualMachineClusterPreference", + "type": "string" + }, + "revisionName": { + "description": "RevisionName specifies a ControllerRevision containing a specific copy of the VirtualMachinePreference or VirtualMachineClusterPreference to be used. This is initially captured the first time the instancetype is applied to the VirtualMachineInstance.", + "type": "string" + } + } + }, + "v1VmPreferredSchedulingTerm": { + "description": "An empty preferred scheduling term matches all objects with implicit weight 0 (i.e. it's a no-op). A null preferred scheduling term matches no objects (i.e. is also a no-op).", + "type": "object", + "required": [ + "weight", + "preference" + ], + "properties": { + "preference": { + "$ref": "#/definitions/v1VmNodeSelectorTerm" + }, + "weight": { + "description": "Weight associated with matching the corresponding nodeSelectorTerm, in the range 1-100.", + "type": "integer", + "format": "int32" + } + } + }, + "v1VmProbe": { + "description": "Probe describes a health check to be performed against a VirtualMachineInstance to determine whether it is alive or ready to receive traffic.", + "type": "object", + "properties": { + "exec": { + "$ref": "#/definitions/v1VmExecAction" + }, + "failureThreshold": { + "description": "Minimum consecutive failures for the probe to be considered failed after having succeeded. Defaults to 3. Minimum value is 1.", + "type": "integer", + "format": "int32" + }, + "guestAgentPing": { + "$ref": "#/definitions/v1VmGuestAgentPing" + }, + "httpGet": { + "$ref": "#/definitions/v1VmHttpGetAction" + }, + "initialDelaySeconds": { + "description": "Number of seconds after the VirtualMachineInstance has started before liveness probes are initiated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes", + "type": "integer", + "format": "int32" + }, + "periodSeconds": { + "description": "How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1.", + "type": "integer", + "format": "int32" + }, + "successThreshold": { + "description": "Minimum consecutive successes for the probe to be considered successful after having failed. Defaults to 1. Must be 1 for liveness. Minimum value is 1.", + "type": "integer", + "format": "int32" + }, + "tcpSocket": { + "$ref": "#/definitions/v1VmTcpSocketAction" + }, + "timeoutSeconds": { + "description": "Number of seconds after which the probe times out. For exec probes the timeout fails the probe but does not terminate the command running on the guest. This means a blocking command can result in an increasing load on the guest. A small buffer will be added to the resulting workload exec probe to compensate for delays caused by the qemu guest exec mechanism. Defaults to 1 second. Minimum value is 1. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes", + "type": "integer", + "format": "int32" + } + } + }, + "v1VmQemuGuestAgentSshPublicKeyAccessCredentialPropagation": { + "type": "object", + "required": [ + "users" + ], + "properties": { + "users": { + "description": "Users represents a list of guest users that should have the ssh public keys added to their authorized_keys file.", + "type": "array", + "items": { + "type": "string" + }, + "x-kubernetes-list-type": "set" + } + } + }, + "v1VmQemuGuestAgentUserPasswordAccessCredentialPropagation": { + "type": "object" + }, + "v1VmQuantity": { + "description": "Quantity is a fixed-point representation of a number. It provides convenient marshaling/unmarshaling in JSON and YAML, in addition to String() and AsInt64() accessors.\n\nThe serialization format is:\n\n\u003cquantity\u003e ::= \u003csignedNumber\u003e\u003csuffix\u003e\n (Note that \u003csuffix\u003e may be empty, from the \"\" case in \u003cdecimalSI\u003e.)\n\u003cdigit\u003e ::= 0 | 1 | ... | 9 \u003cdigits\u003e ::= \u003cdigit\u003e | \u003cdigit\u003e\u003cdigits\u003e \u003cnumber\u003e ::= \u003cdigits\u003e | \u003cdigits\u003e.\u003cdigits\u003e | \u003cdigits\u003e. | .\u003cdigits\u003e \u003csign\u003e ::= \"+\" | \"-\" \u003csignedNumber\u003e ::= \u003cnumber\u003e | \u003csign\u003e\u003cnumber\u003e \u003csuffix\u003e ::= \u003cbinarySI\u003e | \u003cdecimalExponent\u003e | \u003cdecimalSI\u003e \u003cbinarySI\u003e ::= Ki | Mi | Gi | Ti | Pi | Ei\n (International System of units; See: http://physics.nist.gov/cuu/Units/binary.html)\n\u003cdecimalSI\u003e ::= m | \"\" | k | M | G | T | P | E\n (Note that 1024 = 1Ki but 1000 = 1k; I didn't choose the capitalization.)\n\u003cdecimalExponent\u003e ::= \"e\" \u003csignedNumber\u003e | \"E\" \u003csignedNumber\u003e\n\nNo matter which of the three exponent forms is used, no quantity may represent a number greater than 2^63-1 in magnitude, nor may it have more than 3 decimal places. Numbers larger or more precise will be capped or rounded up. (E.g.: 0.1m will rounded up to 1m.) This may be extended in the future if we require larger or smaller quantities.\n\nWhen a Quantity is parsed from a string, it will remember the type of suffix it had, and will use the same type again when it is serialized.\n\nBefore serializing, Quantity will be put in \"canonical form\". This means that Exponent/suffix will be adjusted up or down (with a corresponding increase or decrease in Mantissa) such that:\n a. No precision is lost\n b. No fractional digits will be emitted\n c. The exponent (or suffix) is as large as possible.\nThe sign will be omitted unless the number is negative.\n\nExamples:\n 1.5 will be serialized as \"1500m\"\n 1.5Gi will be serialized as \"1536Mi\"\n\nNote that the quantity will NEVER be internally represented by a floating point number. That is the whole point of this exercise.\n\nNon-canonical values will still parse as long as they are well formed, but will be re-emitted in their canonical form. (So always use canonical form, or don't diff.)\n\nThis format is intended to make it difficult to use these numbers without writing some sort of special handling code in the hopes that that will cause implementors to also use a fixed point implementation.", + "type": "string" + }, + "v1VmRTCTimer": { + "type": "object", + "properties": { + "present": { + "description": "Enabled set to false makes sure that the machine type or a preset can't add the timer. Defaults to true.", + "type": "boolean" + }, + "tickPolicy": { + "description": "TickPolicy determines what happens when QEMU misses a deadline for injecting a tick to the guest. One of \"delay\", \"catchup\".", + "type": "string" + }, + "track": { + "description": "Track the guest or the wall clock.", + "type": "string" + } + } + }, + "v1VmRealtime": { + "description": "Realtime holds the tuning knobs specific for realtime workloads.", + "type": "object", + "properties": { + "mask": { + "description": "Mask defines the vcpu mask expression that defines which vcpus are used for realtime. Format matches libvirt's expressions. Example: \"0-3,^1\",\"0,2,3\",\"2-3\"", + "type": "string" + } + } + }, + "v1VmRemoveVolumeOptions": { + "description": "RemoveVolumeOptions is provided when dynamically hot unplugging volume and disk", + "type": "object", + "required": [ + "name" + ], + "properties": { + "dryRun": { + "description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed", + "type": "array", + "items": { + "type": "string" + }, + "x-kubernetes-list-type": "atomic" + }, + "name": { + "description": "Name represents the name that maps to both the disk and volume that should be removed", + "type": "string" + } + } + }, + "v1VmResourceFieldSelector": { + "description": "ResourceFieldSelector represents container resources (cpu, memory) and their output format", + "type": "object", + "required": [ + "resource" + ], + "properties": { + "containerName": { + "description": "Container name: required for volumes, optional for env vars", + "type": "string" + }, + "divisor": { + "$ref": "#/definitions/v1VmQuantity" + }, + "resource": { + "description": "Required: resource to select", + "type": "string" + } + } + }, + "v1VmResourceRequirements": { + "type": "object", + "properties": { + "limits": { + "description": "Limits describes the maximum amount of compute resources allowed. Valid resource keys are \"memory\" and \"cpu\".", + "type": "object" + }, + "overcommitGuestOverhead": { + "description": "Don't ask the scheduler to take the guest-management overhead into account. Instead put the overhead only into the container's memory limit. This can lead to crashes if all memory is in use on a node. Defaults to false.", + "type": "boolean" + }, + "requests": { + "description": "Requests is a description of the initial vmi resources. Valid resource keys are \"memory\" and \"cpu\".", + "type": "object" + } + } + }, + "v1VmRng": { + "description": "Rng represents the random device passed from host", + "type": "object" + }, + "v1VmSEV": { + "type": "object" + }, + "v1VmSecretVolumeSource": { + "description": "SecretVolumeSource adapts a Secret into a volume.", + "type": "object", + "properties": { + "optional": { + "description": "Specify whether the Secret or it's keys must be defined", + "type": "boolean" + }, + "secretName": { + "description": "Name of the secret in the pod's namespace to use. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret", + "type": "string" + }, + "volumeLabel": { + "description": "The volume label of the resulting disk inside the VMI. Different bootstrapping mechanisms require different values. Typical values are \"cidata\" (cloud-init), \"config-2\" (cloud-init) or \"OEMDRV\" (kickstart).", + "type": "string" + } + } + }, + "v1VmServiceAccountVolumeSource": { + "description": "ServiceAccountVolumeSource adapts a ServiceAccount into a volume.", + "type": "object", + "properties": { + "serviceAccountName": { + "description": "Name of the service account in the pod's namespace to use. More info: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/", + "type": "string" + } + } + }, + "v1VmSnapshotVolumesLists": { + "description": "SnapshotVolumesLists includes the list of volumes which were included in the snapshot and volumes which were excluded from the snapshot", + "type": "object", + "properties": { + "excludedVolumes": { + "type": "array", + "items": { + "type": "string" + }, + "x-kubernetes-list-type": "set" + }, + "includedVolumes": { + "type": "array", + "items": { + "type": "string" + }, + "x-kubernetes-list-type": "set" + } + } + }, + "v1VmSoundDevice": { + "description": "Represents the user's configuration to emulate sound cards in the VMI.", + "type": "object", + "required": [ + "name" + ], + "properties": { + "model": { + "description": "We only support ich9 or ac97. If SoundDevice is not set: No sound card is emulated. If SoundDevice is set but Model is not: ich9", + "type": "string" + }, + "name": { + "description": "User's defined name for this sound device", + "type": "string" + } + } + }, + "v1VmSshPublicKeyAccessCredential": { + "description": "SSHPublicKeyAccessCredential represents a source and propagation method for injecting ssh public keys into a vm guest", + "type": "object", + "required": [ + "source", + "propagationMethod" + ], + "properties": { + "propagationMethod": { + "$ref": "#/definitions/v1VmSshPublicKeyAccessCredentialPropagationMethod" + }, + "source": { + "$ref": "#/definitions/v1VmSshPublicKeyAccessCredentialSource" + } + } + }, + "v1VmSshPublicKeyAccessCredentialPropagationMethod": { + "description": "SSHPublicKeyAccessCredentialPropagationMethod represents the method used to inject a ssh public key into the vm guest. Only one of its members may be specified.", + "type": "object", + "properties": { + "configDrive": { + "$ref": "#/definitions/v1VmConfigDriveSshPublicKeyAccessCredentialPropagation" + }, + "qemuGuestAgent": { + "$ref": "#/definitions/v1VmQemuGuestAgentSshPublicKeyAccessCredentialPropagation" + } + } + }, + "v1VmSshPublicKeyAccessCredentialSource": { + "description": "SSHPublicKeyAccessCredentialSource represents where to retrieve the ssh key credentials Only one of its members may be specified.", + "type": "object", + "properties": { + "secret": { + "$ref": "#/definitions/v1VmAccessCredentialSecretSource" + } + } + }, + "v1VmStorageSpec": { + "description": "StorageSpec defines the Storage type specification", + "type": "object", + "properties": { + "accessModes": { + "description": "AccessModes contains the desired access modes the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1", + "type": "array", + "items": { + "type": "string" + } + }, + "dataSource": { + "$ref": "#/definitions/v1VmTypedLocalObjectReference" + }, + "resources": { + "$ref": "#/definitions/v1VmCoreResourceRequirements" + }, + "selector": { + "$ref": "#/definitions/v1VmLabelSelector" + }, + "storageClassName": { + "description": "Name of the StorageClass required by the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1", + "type": "string" + }, + "volumeMode": { + "description": "volumeMode defines what type of volume is required by the claim. Value of Filesystem is implied when not included in claim spec.", + "type": "string" + }, + "volumeName": { + "description": "VolumeName is the binding reference to the PersistentVolume backing this claim.", + "type": "string" + } + } + }, + "v1VmSyNICTimer": { + "type": "object", + "properties": { + "direct": { + "$ref": "#/definitions/v1VmFeatureState" + }, + "enabled": { + "type": "boolean" + } + } + }, + "v1VmSysprepSource": { + "description": "Represents a Sysprep volume source.", + "type": "object", + "properties": { + "configMap": { + "$ref": "#/definitions/v1VmLocalObjectReference" + }, + "secret": { + "$ref": "#/definitions/v1VmLocalObjectReference" + } + } + }, + "v1VmTPMDevice": { + "type": "object" + }, + "v1VmTcpSocketAction": { + "description": "TCPSocketAction describes an action based on opening a socket", + "type": "object", + "required": [ + "port" + ], + "properties": { + "host": { + "description": "Optional: Host name to connect to, defaults to the pod IP.", + "type": "string" + }, + "port": { + "description": "Number or name of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME.", + "type": [ + "string", + "number" + ] + } + } + }, + "v1VmTimer": { + "description": "Represents all available timers in a vmi.", + "type": "object", + "properties": { + "hpet": { + "$ref": "#/definitions/v1VmHPETTimer" + }, + "hyperv": { + "$ref": "#/definitions/v1VmHypervTimer" + }, + "kvm": { + "$ref": "#/definitions/v1VmKVmTimer" + }, + "pit": { + "$ref": "#/definitions/v1VmPITTimer" + }, + "rtc": { + "$ref": "#/definitions/v1VmRTCTimer" + } + } + }, + "v1VmToleration": { + "description": "The pod this Toleration is attached to tolerates any taint that matches the triple \u003ckey,value,effect\u003e using the matching operator \u003coperator\u003e.", + "type": "object", + "properties": { + "effect": { + "description": "Effect indicates the taint effect to match. Empty means match all taint effects. When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute.", + "type": "string" + }, + "key": { + "description": "Key is the taint key that the toleration applies to. Empty means match all taint keys. If the key is empty, operator must be Exists; this combination means to match all values and all keys.", + "type": "string" + }, + "operator": { + "description": "Operator represents a key's relationship to the value. Valid operators are Exists and Equal. Defaults to Equal. Exists is equivalent to wildcard for value, so that a pod can tolerate all taints of a particular category.", + "type": "string" + }, + "tolerationSeconds": { + "description": "TolerationSeconds represents the period of time the toleration (which must be of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default, it is not set, which means tolerate the taint forever (do not evict). Zero and negative values will be treated as 0 (evict immediately) by the system.", + "type": "integer", + "format": "int64" + }, + "value": { + "description": "Value is the taint value the toleration matches to. If the operator is Exists, the value should be empty, otherwise just a regular string.", + "type": "string" + } + } + }, + "v1VmTopologySpreadConstraint": { + "description": "TopologySpreadConstraint specifies how to spread matching pods among the given topology.", + "type": "object", + "required": [ + "maxSkew", + "topologyKey", + "whenUnsatisfiable" + ], + "properties": { + "labelSelector": { + "$ref": "#/definitions/v1VmLabelSelector" + }, + "maxSkew": { + "description": "MaxSkew describes the degree to which pods may be unevenly distributed. When `whenUnsatisfiable=DoNotSchedule`, it is the maximum permitted difference between the number of matching pods in the target topology and the global minimum. For example, in a 3-zone cluster, MaxSkew is set to 1, and pods with the same labelSelector spread as 1/1/0: | zone1 | zone2 | zone3 | | P | P | | - if MaxSkew is 1, incoming pod can only be scheduled to zone3 to become 1/1/1; scheduling it onto zone1(zone2) would make the ActualSkew(2-0) on zone1(zone2) violate MaxSkew(1). - if MaxSkew is 2, incoming pod can be scheduled onto any zone. When `whenUnsatisfiable=ScheduleAnyway`, it is used to give higher precedence to topologies that satisfy it. It's a required field. Default value is 1 and 0 is not allowed.", + "type": "integer", + "format": "int32" + }, + "topologyKey": { + "description": "TopologyKey is the key of node labels. Nodes that have a label with this key and identical values are considered to be in the same topology. We consider each \u003ckey, value\u003e as a \"bucket\", and try to put balanced number of pods into each bucket. It's a required field.", + "type": "string" + }, + "whenUnsatisfiable": { + "description": "WhenUnsatisfiable indicates how to deal with a pod if it doesn't satisfy the spread constraint. - DoNotSchedule (default) tells the scheduler not to schedule it. - ScheduleAnyway tells the scheduler to schedule the pod in any location,\n but giving higher precedence to topologies that would help reduce the\n skew.\nA constraint is considered \"Unsatisfiable\" for an incoming pod if and only if every possible node assignment for that pod would violate \"MaxSkew\" on some topology. For example, in a 3-zone cluster, MaxSkew is set to 1, and pods with the same labelSelector spread as 3/1/1: | zone1 | zone2 | zone3 | | P P P | P | P | If WhenUnsatisfiable is set to DoNotSchedule, incoming pod can only be scheduled to zone2(zone3) to become 3/2/1(3/1/2) as ActualSkew(2-1) on zone2(zone3) satisfies MaxSkew(1). In other words, the cluster can still be imbalanced, but scheduler won't make it *more* imbalanced. It's a required field.", + "type": "string" + } + } + }, + "v1VmTypedLocalObjectReference": { + "description": "TypedLocalObjectReference contains enough information to let you locate the typed referenced object inside the same namespace.", + "type": "object", + "required": [ + "kind", + "name" + ], + "properties": { + "apiGroup": { + "description": "APIGroup is the group for the resource being referenced. If APIGroup is not specified, the specified Kind must be in the core API group. For any other third-party types, APIGroup is required.", + "type": "string" + }, + "kind": { + "description": "Kind is the type of resource being referenced", + "type": "string" + }, + "name": { + "description": "Name is the name of resource being referenced", + "type": "string" + } + } + }, + "v1VmUserPasswordAccessCredential": { + "description": "UserPasswordAccessCredential represents a source and propagation method for injecting user passwords into a vm guest Only one of its members may be specified.", + "type": "object", + "required": [ + "source", + "propagationMethod" + ], + "properties": { + "propagationMethod": { + "$ref": "#/definitions/v1VmUserPasswordAccessCredentialPropagationMethod" + }, + "source": { + "$ref": "#/definitions/v1VmUserPasswordAccessCredentialSource" + } + } + }, + "v1VmUserPasswordAccessCredentialPropagationMethod": { + "description": "UserPasswordAccessCredentialPropagationMethod represents the method used to inject a user passwords into the vm guest. Only one of its members may be specified.", + "type": "object", + "properties": { + "qemuGuestAgent": { + "$ref": "#/definitions/v1VmQemuGuestAgentUserPasswordAccessCredentialPropagation" + } + } + }, + "v1VmUserPasswordAccessCredentialSource": { + "description": "UserPasswordAccessCredentialSource represents where to retrieve the user password credentials Only one of its members may be specified.", + "type": "object", + "properties": { + "secret": { + "$ref": "#/definitions/v1VmAccessCredentialSecretSource" + } + } + }, + "v1VmVGPUDisplayOptions": { + "type": "object", + "properties": { + "enabled": { + "description": "Enabled determines if a display addapter backed by a vGPU should be enabled or disabled on the guest. Defaults to true.", + "type": "boolean" + }, + "ramFB": { + "$ref": "#/definitions/v1VmFeatureState" + } + } + }, + "v1VmVGPUOptions": { + "type": "object", + "properties": { + "display": { + "$ref": "#/definitions/v1VmVGPUDisplayOptions" + } + } + }, + "v1VmVirtualMachineCondition": { + "description": "VirtualMachineCondition represents the state of VirtualMachine", + "type": "object", + "required": [ + "type", + "status" + ], + "properties": { + "lastProbeTime": { + "type": "string" + }, + "lastTransitionTime": { + "type": "string" + }, + "message": { + "type": "string" + }, + "reason": { + "type": "string" + }, + "status": { + "type": "string" + }, + "type": { + "type": "string" + } + } + }, + "v1VmVirtualMachineInstanceSpec": { + "description": "VirtualMachineInstanceSpec is a description of a VirtualMachineInstance.", + "type": "object", + "required": [ + "domain" + ], + "properties": { + "accessCredentials": { + "description": "Specifies a set of public keys to inject into the vm guest", + "type": "array", + "items": { + "$ref": "#/definitions/v1VmAccessCredential" + }, + "x-kubernetes-list-type": "atomic" + }, + "affinity": { + "$ref": "#/definitions/v1VmAffinity" + }, + "dnsConfig": { + "$ref": "#/definitions/v1VmPodDnsConfig" + }, + "dnsPolicy": { + "description": "Set DNS policy for the pod. Defaults to \"ClusterFirst\". Valid values are 'ClusterFirstWithHostNet', 'ClusterFirst', 'Default' or 'None'. DNS parameters given in DNSConfig will be merged with the policy selected with DNSPolicy. To have DNS options set along with hostNetwork, you have to specify DNS policy explicitly to 'ClusterFirstWithHostNet'.", + "type": "string" + }, + "domain": { + "$ref": "#/definitions/v1VmDomainSpec" + }, + "evictionStrategy": { + "description": "EvictionStrategy can be set to \"LiveMigrate\" if the VirtualMachineInstance should be migrated instead of shut-off in case of a node drain.", + "type": "string" + }, + "hostname": { + "description": "Specifies the hostname of the vmi If not specified, the hostname will be set to the name of the vmi, if dhcp or cloud-init is configured properly.", + "type": "string" + }, + "livenessProbe": { + "$ref": "#/definitions/v1VmProbe" + }, + "networks": { + "description": "List of networks that can be attached to a vm's virtual interface.", + "type": "array", + "items": { + "$ref": "#/definitions/v1VmNetwork" + } + }, + "nodeSelector": { + "description": "NodeSelector is a selector which must be true for the vmi to fit on a node. Selector which must match a node's labels for the vmi to be scheduled on that node. More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "priorityClassName": { + "description": "If specified, indicates the pod's priority. If not specified, the pod priority will be default or zero if there is no default.", + "type": "string" + }, + "readinessProbe": { + "$ref": "#/definitions/v1VmProbe" + }, + "schedulerName": { + "description": "If specified, the VMI will be dispatched by specified scheduler. If not specified, the VMI will be dispatched by default scheduler.", + "type": "string" + }, + "startStrategy": { + "description": "StartStrategy can be set to \"Paused\" if Virtual Machine should be started in paused state.", + "type": "string" + }, + "subdomain": { + "description": "If specified, the fully qualified vmi hostname will be \"\u003chostname\u003e.\u003csubdomain\u003e.\u003cpod namespace\u003e.svc.\u003ccluster domain\u003e\". If not specified, the vmi will not have a domainname at all. The DNS entry will resolve to the vmi, no matter if the vmi itself can pick up a hostname.", + "type": "string" + }, + "terminationGracePeriodSeconds": { + "description": "Grace period observed after signalling a VirtualMachineInstance to stop after which the VirtualMachineInstance is force terminated.", + "type": "integer", + "format": "int64" + }, + "tolerations": { + "description": "If toleration is specified, obey all the toleration rules.", + "type": "array", + "items": { + "$ref": "#/definitions/v1VmToleration" + } + }, + "topologySpreadConstraints": { + "description": "TopologySpreadConstraints describes how a group of VMIs will be spread across a given topology domains. K8s scheduler will schedule VMI pods in a way which abides by the constraints.", + "type": "array", + "items": { + "$ref": "#/definitions/v1VmTopologySpreadConstraint" + }, + "x-kubernetes-list-map-keys": [ + "topologyKey", + "whenUnsatisfiable" + ], + "x-kubernetes-list-type": "map", + "x-kubernetes-patch-merge-key": "topologyKey", + "x-kubernetes-patch-strategy": "merge" + }, + "volumes": { + "description": "List of volumes that can be mounted by disks belonging to the vmi.", + "type": "array", + "items": { + "$ref": "#/definitions/v1VmVolume" + } + } + } + }, + "v1VmVirtualMachineInstanceTemplateSpec": { + "type": "object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1VmObjectMeta" + }, + "spec": { + "$ref": "#/definitions/v1VmVirtualMachineInstanceSpec" + } + } + }, + "v1VmVirtualMachineMemoryDumpRequest": { + "description": "VirtualMachineMemoryDumpRequest represent the memory dump request phase and info", + "type": "object", + "required": [ + "claimName", + "phase" + ], + "properties": { + "claimName": { + "description": "ClaimName is the name of the pvc that will contain the memory dump", + "type": "string" + }, + "endTimestamp": { + "$ref": "#/definitions/v1Time" + }, + "fileName": { + "description": "FileName represents the name of the output file", + "type": "string" + }, + "message": { + "description": "Message is a detailed message about failure of the memory dump", + "type": "string" + }, + "phase": { + "description": "Phase represents the memory dump phase", + "type": "string" + }, + "remove": { + "description": "Remove represents request of dissociating the memory dump pvc", + "type": "boolean" + }, + "startTimestamp": { + "$ref": "#/definitions/v1Time" + } + } + }, + "v1VmVirtualMachineStartFailure": { + "description": "VirtualMachineStartFailure tracks VMIs which failed to transition successfully to running using the VM status", + "type": "object", + "properties": { + "consecutiveFailCount": { + "type": "integer", + "format": "int32" + }, + "lastFailedVMIUID": { + "type": "string" + }, + "retryAfterTimestamp": { + "$ref": "#/definitions/v1Time" + } + } + }, + "v1VmVirtualMachineStateChangeRequest": { + "type": "object", + "required": [ + "action" + ], + "properties": { + "action": { + "description": "Indicates the type of action that is requested. e.g. Start or Stop", + "type": "string" + }, + "data": { + "description": "Provides additional data in order to perform the Action", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "uid": { + "description": "Indicates the UUID of an existing Virtual Machine Instance that this change request applies to -- if applicable", + "type": "string" + } + } + }, + "v1VmVirtualMachineVolumeRequest": { + "type": "object", + "properties": { + "addVolumeOptions": { + "$ref": "#/definitions/v1VmAddVolumeOptions" + }, + "removeVolumeOptions": { + "$ref": "#/definitions/v1VmRemoveVolumeOptions" + } + } + }, + "v1VmVolume": { + "description": "Volume represents a named volume in a vmi.", + "type": "object", + "required": [ + "name" + ], + "properties": { + "cloudInitConfigDrive": { + "$ref": "#/definitions/v1VmCloudInitConfigDriveSource" + }, + "cloudInitNoCloud": { + "$ref": "#/definitions/v1VmCloudInitNoCloudSource" + }, + "configMap": { + "$ref": "#/definitions/v1VmConfigMapVolumeSource" + }, + "containerDisk": { + "$ref": "#/definitions/v1VmContainerDiskSource" + }, + "dataVolume": { + "$ref": "#/definitions/v1VmCoreDataVolumeSource" + }, + "downwardAPI": { + "$ref": "#/definitions/v1VmDownwardApiVolumeSource" + }, + "downwardMetrics": { + "$ref": "#/definitions/v1VmDownwardMetricsVolumeSource" + }, + "emptyDisk": { + "$ref": "#/definitions/v1VmEmptyDiskSource" + }, + "ephemeral": { + "$ref": "#/definitions/v1VmEphemeralVolumeSource" + }, + "hostDisk": { + "$ref": "#/definitions/v1VmHostDisk" + }, + "memoryDump": { + "$ref": "#/definitions/v1VmMemoryDumpVolumeSource" + }, + "name": { + "description": "Volume's name. Must be a DNS_LABEL and unique within the vmi. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names", + "type": "string" + }, + "persistentVolumeClaim": { + "$ref": "#/definitions/v1VmPersistentVolumeClaimVolumeSource" + }, + "secret": { + "$ref": "#/definitions/v1VmSecretVolumeSource" + }, + "serviceAccount": { + "$ref": "#/definitions/v1VmServiceAccountVolumeSource" + }, + "sysprep": { + "$ref": "#/definitions/v1VmSysprepSource" + } + } + }, + "v1VmVolumeSnapshotStatus": { + "type": "object", + "required": [ + "name", + "enabled" + ], + "properties": { + "enabled": { + "description": "True if the volume supports snapshotting", + "type": "boolean" + }, + "name": { + "description": "Volume name", + "type": "string" + }, + "reason": { + "description": "Empty if snapshotting is enabled, contains reason otherwise", + "type": "string" + } + } + }, + "v1VmWatchdog": { + "description": "Named watchdog device.", + "type": "object", + "required": [ + "name" + ], + "properties": { + "i6300esb": { + "$ref": "#/definitions/v1VmI6300ESBWatchdog" + }, + "name": { + "description": "Name of the watchdog.", + "type": "string" + } + } + }, + "v1VmWeightedPodAffinityTerm": { + "description": "The weights of all of the matched WeightedPodAffinityTerm fields are added per-node to find the most preferred node(s)", + "type": "object", + "required": [ + "weight", + "podAffinityTerm" + ], + "properties": { + "podAffinityTerm": { + "$ref": "#/definitions/v1VmPodAffinityTerm" + }, + "weight": { + "description": "weight associated with matching the corresponding podAffinityTerm, in the range 1-100.", + "type": "integer", + "format": "int32" + } + } + }, + "v1VsphereAccount": { + "description": "VSphere account information", + "type": "object", + "properties": { + "apiVersion": { + "description": "Cloud account api version", + "type": "string" + }, + "kind": { + "description": "Cloud account kind", + "type": "string" + }, + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/v1VsphereCloudAccount" + }, + "status": { + "$ref": "#/definitions/v1CloudAccountStatus" + } + } + }, + "v1VsphereAccounts": { + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1VsphereAccount" + } + }, + "listmeta": { + "$ref": "#/definitions/v1ListMetaData" + } + } + }, + "v1VsphereCloudAccount": { + "type": "object", + "required": [ + "vcenterServer", + "username", + "password" + ], + "properties": { + "insecure": { + "description": "Insecure is a flag that controls whether or not to validate the vSphere server's certificate.", + "type": "boolean", + "x-omitempty": false + }, + "password": { + "type": "string" + }, + "username": { + "type": "string" + }, + "vcenterServer": { + "description": "VcenterServer is the address of the vSphere endpoint", + "type": "string" + } + } + }, + "v1VsphereCloudClusterConfigEntity": { + "description": "vSphere cloud cluster config entity", + "type": "object", + "properties": { + "clusterConfig": { + "$ref": "#/definitions/v1VsphereClusterConfigEntity" + } + } + }, + "v1VsphereCloudConfig": { + "description": "VsphereCloudConfig is the Schema for the vspherecloudconfigs API", + "type": "object", + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + "type": "string" + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/v1VsphereCloudConfigSpec" + }, + "status": { + "$ref": "#/definitions/v1VsphereCloudConfigStatus" + } + } + }, + "v1VsphereCloudConfigSpec": { + "description": "VsphereCloudConfigSpec defines the desired state of VsphereCloudConfig", + "type": "object", + "required": [ + "clusterConfig", + "machinePoolConfig" + ], + "properties": { + "cloudAccountRef": { + "description": "cloudAccountRef should point to the secret which contains VsphereCloudAccount", + "$ref": "#/definitions/v1ObjectReference" + }, + "clusterConfig": { + "$ref": "#/definitions/v1VsphereClusterConfig" + }, + "edgeHostRef": { + "description": "Appliance (Edge Host) uid for Edge env", + "$ref": "#/definitions/v1ObjectReference" + }, + "machinePoolConfig": { + "type": "array", + "items": { + "$ref": "#/definitions/v1VsphereMachinePoolConfig" + } + } + } + }, + "v1VsphereCloudConfigStatus": { + "description": "VsphereCloudConfigStatus defines the observed state of VsphereCloudConfig", + "type": "object", + "properties": { + "ansibleDigest": { + "type": "string" + }, + "conditions": { + "type": "array", + "items": { + "$ref": "#/definitions/v1ClusterCondition" + } + }, + "isAddonLayer": { + "description": "addon layers present in spc", + "type": "boolean" + }, + "lastOVACreated": { + "type": "string" + }, + "lastVMExported": { + "type": "string" + }, + "nodeImage": { + "$ref": "#/definitions/v1VsphereImage" + }, + "roleDigest": { + "description": "this map will be for ansible roles present in eack pack", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "sourceImageId": { + "description": "sourceImageId, it can be from packref's annotations or from pack.json", + "type": "string" + }, + "uploadOvaS3": { + "description": "UploadOVAS3 will hold last image name which uploaded to S3", + "type": "string" + }, + "useCapiImage": { + "description": "If no ansible roles found in Packs then Mold should tell Drive to use capi image and not create custom image, because there is nothing to add", + "type": "boolean" + } + } + }, + "v1VsphereCloudDatacenter": { + "description": "Vsphere datacenter", + "type": "object", + "properties": { + "computeClusters": { + "type": "array", + "items": { + "$ref": "#/definitions/v1VsphereComputeCluster" + } + }, + "folders": { + "type": "array", + "items": { + "type": "string" + } + }, + "name": { + "type": "string" + } + } + }, + "v1VsphereClusterConfig": { + "type": "object", + "required": [ + "placement" + ], + "properties": { + "controlPlaneEndpoint": { + "description": "The optional control plane endpoint, which can be an IP or FQDN", + "$ref": "#/definitions/v1ControlPlaneEndPoint" + }, + "ntpServers": { + "description": "NTPServers is a list of NTP servers to use instead of the machine image's default NTP server list.", + "type": "array", + "items": { + "type": "string" + } + }, + "placement": { + "description": "Placement configuration Placement config in ClusterConfig serve as default values for each MachinePool", + "$ref": "#/definitions/v1VspherePlacementConfig" + }, + "sshKeys": { + "description": "SSHKeys specifies a list of ssh authorized keys for the 'spectro' user", + "type": "array", + "items": { + "type": "string" + } + }, + "staticIp": { + "description": "whether this cluster should use dhcp or static IP, if false, use DHCP if this is set, then all machinepools should have staticIP with provided IPPool adding this as an additional standalone flag without relating to placement.Nework main reason is to enable more validation for placement.Network.StaticIP which should come together with valid Network.IPPool and Network.Name", + "type": "boolean" + } + } + }, + "v1VsphereClusterConfigEntity": { + "type": "object", + "required": [ + "placement" + ], + "properties": { + "controlPlaneEndpoint": { + "description": "The optional control plane endpoint, which can be an IP or FQDN", + "$ref": "#/definitions/v1ControlPlaneEndPoint" + }, + "ntpServers": { + "description": "NTPServers is a list of NTP servers to use instead of the machine image's default NTP server list.", + "type": "array", + "items": { + "type": "string" + } + }, + "placement": { + "description": "Placement configuration Placement config in ClusterConfig serve as default values for each MachinePool", + "$ref": "#/definitions/v1VspherePlacementConfigEntity" + }, + "sshKeys": { + "description": "SSHKeys specifies a list of ssh authorized keys for the 'spectro' user", + "type": "array", + "items": { + "type": "string" + } + }, + "staticIp": { + "description": "whether this cluster should use dhcp or static IP, if false, use DHCP if this is set, then all machinepools should have staticIP with provided IPPool adding this as an additional standalone flag without relating to placement.Nework main reason is to enable more validation for placement.Network.StaticIP which should come together with valid Network.IPPool and Network.Name", + "type": "boolean" + } + } + }, + "v1VsphereComputeCluster": { + "description": "Vsphere compute cluster", + "type": "object", + "properties": { + "datastores": { + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + } + }, + "name": { + "type": "string" + }, + "networks": { + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + } + }, + "resourcePools": { + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + } + } + } + }, + "v1VsphereComputeClusterResources": { + "description": "Datacenter and its resources like datastore, resoucepool, folders", + "type": "object", + "properties": { + "computecluster": { + "$ref": "#/definitions/v1VsphereComputeCluster" + }, + "datacenter": { + "description": "Name of the datacenter", + "type": "string" + } + } + }, + "v1VsphereDatacenter": { + "description": "List of Datacenter with computeclusters", + "type": "object", + "properties": { + "computeclusters": { + "description": "List of the VSphere compute clusters in datacenter", + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + } + }, + "datacenter": { + "description": "name of the datacenter of the VSphere", + "type": "string" + }, + "folders": { + "description": "List of the VSphere folders in datacenter", + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + } + } + } + }, + "v1VsphereDatacenters": { + "description": "List of Datacenters with computeclusters", + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": { + "description": "List of associated datacenters", + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1VsphereDatacenter" + } + } + } + }, + "v1VsphereDnsMapping": { + "description": "VSphere DNS Mapping", + "type": "object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/v1VsphereDnsMappingSpec" + } + } + }, + "v1VsphereDnsMappingSpec": { + "description": "VSphere DNS Mapping Spec", + "type": "object", + "required": [ + "privateGatewayUid", + "datacenter", + "network", + "dnsName" + ], + "properties": { + "datacenter": { + "description": "VSphere datacenter name", + "type": "string" + }, + "dnsName": { + "description": "VSphere DNS name", + "type": "string" + }, + "network": { + "description": "VSphere network name", + "type": "string" + }, + "networkUrl": { + "description": "VSphere network URL", + "type": "string", + "readOnly": true + }, + "privateGatewayUid": { + "description": "VSphere private gateway uid", + "type": "string" + } + } + }, + "v1VsphereDnsMappings": { + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": { + "description": "List of vSphere DNS mapping", + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1VsphereDnsMapping" + } + } + } + }, + "v1VsphereEnv": { + "description": "Vsphere environment entity", + "type": "object", + "properties": { + "version": { + "description": "Version of vsphere environment", + "type": "string" + } + } + }, + "v1VsphereImage": { + "description": "A generated Image should always be a template which resides inside vsphere Will not generate a OVA file out of the image OVA can be used as a base input of the os pack, that's internal to the pack", + "type": "object", + "properties": { + "fullPath": { + "description": "full path of the image template location it contains datacenter/folder/templatename etc eg: /mydc/vm/template/spectro/workerpool-1-centos", + "type": "string" + }, + "state": { + "type": "string" + } + } + }, + "v1VsphereInstanceType": { + "type": "object", + "required": [ + "numCPUs", + "memoryMiB", + "diskGiB" + ], + "properties": { + "diskGiB": { + "description": "DiskGiB is the size of a virtual machine's disk, in GiB. Defaults to the analogue property value in the template from which this machine is cloned.", + "type": "integer", + "format": "int32" + }, + "memoryMiB": { + "description": "MemoryMiB is the size of a virtual machine's memory, in MiB. Defaults to the analogue property value in the template from which this machine is cloned.", + "type": "integer", + "format": "int64" + }, + "numCPUs": { + "description": "NumCPUs is the number of virtual processors in a virtual machine. Defaults to the analogue property value in the template from which this machine is cloned.", + "type": "integer", + "format": "int32" + } + } + }, + "v1VsphereMachine": { + "description": "vSphere cloud VM definition", + "type": "object", + "properties": { + "apiVersion": { + "type": "string" + }, + "kind": { + "type": "string" + }, + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/v1VsphereMachineSpec" + }, + "status": { + "$ref": "#/definitions/v1CloudMachineStatus" + } + } + }, + "v1VsphereMachinePoolCloudConfigEntity": { + "properties": { + "instanceType": { + "$ref": "#/definitions/v1VsphereInstanceType" + }, + "placements": { + "description": "Placements configuration Placements If defined, will replace default values defined in VsphereClusterConfig Array means one MachinePool can span across multiple vsphere compute cluster", + "type": "array", + "items": { + "$ref": "#/definitions/v1VspherePlacementConfigEntity" + } + } + } + }, + "v1VsphereMachinePoolConfig": { + "type": "object", + "required": [ + "isControlPlane", + "instanceType" + ], + "properties": { + "additionalLabels": { + "description": "additionalLabels", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "additionalTags": { + "description": "AdditionalTags is an optional set of tags to add to resources managed by the provider, in addition to the ones added by default. For eg., tags for EKS nodeGroup or EKS NodegroupIAMRole", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "instanceType": { + "description": "InstanceType defines the required CPU, Memory, Storage", + "$ref": "#/definitions/v1VsphereInstanceType" + }, + "isControlPlane": { + "description": "whether this pool is for control plane", + "type": "boolean", + "x-omitempty": false + }, + "labels": { + "description": "labels for this pool, example: control-plane/worker, gpu, windows", + "type": "array", + "items": { + "type": "string" + } + }, + "machinePoolProperties": { + "$ref": "#/definitions/v1MachinePoolProperties" + }, + "maxSize": { + "description": "max size of the pool, for scaling", + "type": "integer", + "format": "int32" + }, + "minSize": { + "description": "min size of the pool, for scaling", + "type": "integer", + "format": "int32" + }, + "name": { + "type": "string" + }, + "nodeRepaveInterval": { + "description": "Minimum number of seconds a node should be Ready, before the next node is selected for repave. Applicable only for workerpools in infrastructure cluster", + "type": "integer", + "format": "int32" + }, + "placements": { + "description": "Placements configuration Placements If defined, will replace default values defined in VsphereClusterConfig Array means one MachinePool can span across multiple vsphere compute cluster", + "type": "array", + "items": { + "$ref": "#/definitions/v1VspherePlacementConfig" + } + }, + "size": { + "description": "size of the pool, number of machines", + "type": "integer", + "format": "int32" + }, + "taints": { + "description": "control plane or worker taints", + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1Taint" + } + }, + "updateStrategy": { + "description": "rolling update strategy for this machinepool if not specified, will use ScaleOut", + "$ref": "#/definitions/v1UpdateStrategy" + }, + "useControlPlaneAsWorker": { + "description": "if IsControlPlane==true \u0026\u0026 useControlPlaneAsWorker==true, then will remove control plane taint this will not be used for worker pools", + "type": "boolean", + "x-omitempty": false + } + } + }, + "v1VsphereMachinePoolConfigEntity": { + "type": "object", + "required": [ + "cloudConfig" + ], + "properties": { + "cloudConfig": { + "$ref": "#/definitions/v1VsphereMachinePoolCloudConfigEntity" + }, + "poolConfig": { + "$ref": "#/definitions/v1MachinePoolConfigEntity" + } + } + }, + "v1VsphereMachineSpec": { + "description": "vSphere cloud VM definition spec", + "type": "object", + "required": [ + "vcenterServer", + "nics", + "placement" + ], + "properties": { + "images": { + "type": "array", + "items": { + "$ref": "#/definitions/v1VsphereImage" + } + }, + "instanceType": { + "$ref": "#/definitions/v1VsphereInstanceType" + }, + "nics": { + "type": "array", + "items": { + "$ref": "#/definitions/v1VsphereNic" + } + }, + "ntpServers": { + "description": "NTPServers is a list of NTP servers to use instead of the machine image's default NTP server list.", + "type": "array", + "items": { + "type": "string" + } + }, + "placement": { + "description": "Placement configuration", + "$ref": "#/definitions/v1VspherePlacementConfig" + }, + "vcenterServer": { + "description": "VcenterServer is the address of the vSphere endpoint", + "type": "string" + } + } + }, + "v1VsphereMachines": { + "description": "vSphere machine list", + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1VsphereMachine" + } + }, + "listmeta": { + "$ref": "#/definitions/v1ListMetaData" + } + } + }, + "v1VsphereNetworkConfig": { + "type": "object", + "required": [ + "networkName" + ], + "properties": { + "ipPool": { + "description": "when staticIP=true, need to provide IPPool", + "$ref": "#/definitions/v1IPPool" + }, + "networkName": { + "description": "NetworkName is the name of the network in which VMs are created/located.", + "type": "string" + }, + "parentPoolRef": { + "description": "ParentPoolRef reference to the ParentPool which allocates IPs for this IPPool", + "$ref": "#/definitions/v1ObjectReference" + }, + "staticIp": { + "description": "support dhcp or static IP, if false, use DHCP", + "type": "boolean" + } + } + }, + "v1VsphereNetworkConfigEntity": { + "type": "object", + "required": [ + "networkName" + ], + "properties": { + "networkName": { + "description": "NetworkName is the name of the network in which VMs are created/located.", + "type": "string" + }, + "parentPoolUid": { + "description": "ParentPoolRef Uid to the ParentPool which allocates IPs for this IPPool", + "type": "string" + }, + "staticIp": { + "description": "support dhcp or static IP, if false, use DHCP", + "type": "boolean" + } + } + }, + "v1VsphereNic": { + "description": "vSphere network interface", + "type": "object", + "required": [ + "networkName" + ], + "properties": { + "index": { + "type": "integer", + "format": "int8" + }, + "macAddress": { + "type": "string" + }, + "networkName": { + "type": "string" + }, + "privateIPs": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "v1VsphereOverlordClusterConfigEntity": { + "type": "object", + "properties": { + "controlPlaneEndpoint": { + "description": "The optional control plane endpoint, which can be an IP or FQDN", + "$ref": "#/definitions/v1ControlPlaneEndPoint" + }, + "ntpServers": { + "description": "NTPServers is a list of NTP servers to use instead of the machine image's default NTP server list.", + "type": "array", + "items": { + "type": "string" + } + }, + "placements": { + "description": "Placements configuration Placements If defined, will replace default values defined in VsphereClusterConfig Array means one MachinePool can span across multiple vsphere compute cluster", + "type": "array", + "items": { + "$ref": "#/definitions/v1VspherePlacementConfigEntity" + } + }, + "sshKeys": { + "description": "SSHKeys specifies a list of ssh authorized keys for the 'spectro' user", + "type": "array", + "items": { + "type": "string" + } + }, + "staticIp": { + "description": "whether this cluster should use dhcp or static IP, if false, use DHCP if this is set, then all machinepools should have staticIP with provided IPPool adding this as an additional standalone flag without relating to placement.Nework main reason is to enable more validation for placement.Network.StaticIP which should come together with valid Network.IPPool and Network.Name", + "type": "boolean" + } + } + }, + "v1VspherePlacementConfig": { + "description": "Both ClusterConfig and MachinePoolConfig will have PlacementConfig MachinePoolconfig.Placements will overwrite values defined in ClusterConfig Currently the convention is: Datacenter / Folder / ImageTemplateFolder / Network should be defined at ClusterConfig Cluster / ResourcePool / Datastore / Network is defined at MachinePool ClusterConfig Network should only indicate use DHCP or not MachinePool Network should contain the actual network and IPPool", + "type": "object", + "properties": { + "cluster": { + "description": "Cluster is the computecluster in vsphere", + "type": "string" + }, + "datacenter": { + "description": "Datacenter is the name or inventory path of the datacenter where this machine's VM is created/located.", + "type": "string" + }, + "datastore": { + "description": "Datastore is the datastore in which VMs are created/located.", + "type": "string" + }, + "folder": { + "description": "Folder is the folder in which VMs are created/located.", + "type": "string" + }, + "imageTemplateFolder": { + "description": "ImageTemplateFolder is the folder in which VMs templates are created/located. if empty will use default value spectro-templates", + "type": "string" + }, + "network": { + "description": "network info", + "$ref": "#/definitions/v1VsphereNetworkConfig" + }, + "resourcePool": { + "description": "ResourcePool is the resource pool within the above computecluster Cluster", + "type": "string" + }, + "storagePolicyName": { + "description": "StoragePolicyName of the storage policy to use with this Virtual Machine", + "type": "string" + }, + "uid": { + "description": "UID for this placement", + "type": "string" + } + } + }, + "v1VspherePlacementConfigEntity": { + "description": "Both ClusterConfig and MachinePoolConfig will have PlacementConfig MachinePoolconfig.Placements will overwrite values defined in ClusterConfig Currently the convention is: Datacenter / Folder / ImageTemplateFolder / Network should be defined at ClusterConfig Cluster / ResourcePool / Datastore / Network is defined at MachinePool ClusterConfig Network should only indicate use DHCP or not MachinePool Network should contain the actual network and IPPool", + "type": "object", + "properties": { + "cluster": { + "description": "Cluster is the computecluster in vsphere", + "type": "string" + }, + "datacenter": { + "description": "Datacenter is the name or inventory path of the datacenter where this machine's VM is created/located.", + "type": "string" + }, + "datastore": { + "description": "Datastore is the datastore in which VMs are created/located.", + "type": "string" + }, + "folder": { + "description": "Folder is the folder in which VMs are created/located.", + "type": "string" + }, + "imageTemplateFolder": { + "description": "ImageTemplateFolder is the folder in which VMs templates are created/located. if empty will use default value spectro-templates", + "type": "string" + }, + "network": { + "description": "network info", + "$ref": "#/definitions/v1VsphereNetworkConfigEntity" + }, + "resourcePool": { + "description": "ResourcePool is the resource pool within the above computecluster Cluster", + "type": "string" + }, + "storagePolicyName": { + "description": "StoragePolicyName of the storage policy to use with this Virtual Machine", + "type": "string" + }, + "uid": { + "description": "UID for this placement", + "type": "string" + } + } + }, + "v1Workspace": { + "description": "Workspace information", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/v1WorkspaceSpec" + }, + "status": { + "$ref": "#/definitions/v1WorkspaceStatus" + } + } + }, + "v1WorkspaceBackup": { + "description": "Workspace backup", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/v1WorkspaceBackupSpec" + }, + "status": { + "$ref": "#/definitions/v1WorkspaceBackupStatus" + } + } + }, + "v1WorkspaceBackupClusterRef": { + "description": "Workspace backup cluster ref", + "properties": { + "backupName": { + "type": "string" + }, + "clusterUid": { + "type": "string" + } + } + }, + "v1WorkspaceBackupConfig": { + "description": "Workspace backup config", + "properties": { + "backupConfig": { + "$ref": "#/definitions/v1ClusterBackupConfig" + }, + "clusterUids": { + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + } + }, + "includeAllClusters": { + "type": "boolean" + } + } + }, + "v1WorkspaceBackupConfigEntity": { + "description": "Cluster backup config", + "properties": { + "backupConfig": { + "$ref": "#/definitions/v1ClusterBackupConfig" + }, + "clusterUids": { + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + } + }, + "includeAllClusters": { + "type": "boolean" + } + } + }, + "v1WorkspaceBackupDeleteEntity": { + "description": "Cluster backup delete config", + "properties": { + "clusterConfigs": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1WorkspaceBackupClusterRef" + } + }, + "requestUid": { + "type": "string" + } + } + }, + "v1WorkspaceBackupSpec": { + "description": "Workspace backup spec", + "properties": { + "config": { + "$ref": "#/definitions/v1WorkspaceBackupConfig" + }, + "workspaceUid": { + "type": "string" + } + } + }, + "v1WorkspaceBackupState": { + "description": "Workspace backup state", + "properties": { + "deleteState": { + "type": "string" + }, + "state": { + "type": "string" + } + } + }, + "v1WorkspaceBackupStatus": { + "description": "Workspace backup status", + "properties": { + "workspaceBackupStatuses": { + "type": "array", + "items": { + "$ref": "#/definitions/v1WorkspaceBackupStatusMeta" + } + } + } + }, + "v1WorkspaceBackupStatusConfig": { + "description": "Workspace backup status config", + "properties": { + "backupName": { + "type": "string" + }, + "durationInHours": { + "type": "number", + "format": "int64" + }, + "includeAllDisks": { + "type": "boolean" + }, + "includeClusterResources": { + "type": "boolean" + }, + "namespaces": { + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + } + } + } + }, + "v1WorkspaceBackupStatusMeta": { + "description": "Workspace backup status meta", + "properties": { + "actor": { + "$ref": "#/definitions/v1ClusterFeatureActor" + }, + "requestUid": { + "type": "string" + }, + "workspaceBackupConfig": { + "$ref": "#/definitions/v1WorkspaceClusterBackupConfig" + } + } + }, + "v1WorkspaceClusterBackupConfig": { + "description": "Workspace cluster backup config", + "properties": { + "backupName": { + "type": "string" + }, + "backupState": { + "$ref": "#/definitions/v1WorkspaceBackupState" + }, + "backupTime": { + "$ref": "#/definitions/v1Time" + }, + "clusterBackupRefs": { + "type": "array", + "items": { + "$ref": "#/definitions/v1WorkspaceClusterBackupResponse" + } + }, + "config": { + "$ref": "#/definitions/v1WorkspaceBackupStatusConfig" + }, + "requestTime": { + "$ref": "#/definitions/v1Time" + } + } + }, + "v1WorkspaceClusterBackupResponse": { + "description": "Workspace cluster backup response", + "properties": { + "backupStatusMeta": { + "$ref": "#/definitions/v1BackupStatusMeta" + }, + "backupUid": { + "type": "string" + }, + "clusterName": { + "type": "string" + }, + "clusterUid": { + "type": "string" + } + } + }, + "v1WorkspaceClusterNamespace": { + "description": "Workspace cluster namespace", + "properties": { + "image": { + "$ref": "#/definitions/v1WorkspaceNamespaceImage" + }, + "isRegex": { + "type": "boolean", + "x-omitempty": false + }, + "name": { + "type": "string" + }, + "namespaceResourceAllocation": { + "$ref": "#/definitions/v1WorkspaceNamespaceResourceAllocation" + } + } + }, + "v1WorkspaceClusterNamespacesEntity": { + "description": "Workspace cluster namespaces update entity", + "properties": { + "clusterNamespaces": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1WorkspaceClusterNamespace" + } + }, + "clusterRefs": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1WorkspaceClusterRef" + } + }, + "quota": { + "$ref": "#/definitions/v1WorkspaceQuota" + } + } + }, + "v1WorkspaceClusterRef": { + "description": "Workspace cluster reference", + "properties": { + "clusterName": { + "type": "string" + }, + "clusterUid": { + "type": "string" + } + } + }, + "v1WorkspaceClusterRestoreConfig": { + "description": "Workspace cluster restore config", + "properties": { + "backupName": { + "type": "string" + }, + "clusterRestoreRefs": { + "type": "array", + "items": { + "$ref": "#/definitions/v1WorkspaceClusterRestoreResponse" + } + }, + "restoreState": { + "$ref": "#/definitions/v1WorkspaceRestoreState" + }, + "restoreTime": { + "$ref": "#/definitions/v1Time" + } + } + }, + "v1WorkspaceClusterRestoreResponse": { + "description": "Workspace cluster restore response", + "properties": { + "backupName": { + "type": "string" + }, + "clusterName": { + "type": "string" + }, + "clusterUid": { + "type": "string" + }, + "restoreStatusMeta": { + "$ref": "#/definitions/v1WorkspaceClusterRestoreState" + }, + "restoreUid": { + "type": "string" + } + } + }, + "v1WorkspaceClusterRestoreState": { + "description": "Workspace cluster restore state", + "properties": { + "msg": { + "type": "string" + }, + "restoreTime": { + "$ref": "#/definitions/v1Time" + }, + "state": { + "type": "string" + } + } + }, + "v1WorkspaceClusterWorkloadCronJobs": { + "description": "Workspace cluster workload cronjobs summary", + "type": "object", + "properties": { + "cronjobs": { + "type": "array", + "items": { + "$ref": "#/definitions/v1ClusterWorkloadCronJob" + } + }, + "metadata": { + "$ref": "#/definitions/v1RelatedObject" + } + } + }, + "v1WorkspaceClusterWorkloadDaemonSets": { + "description": "Workspace cluster workload daemonsets summary", + "type": "object", + "properties": { + "daemonSets": { + "type": "array", + "items": { + "$ref": "#/definitions/v1ClusterWorkloadDaemonSet" + } + }, + "metadata": { + "$ref": "#/definitions/v1RelatedObject" + } + } + }, + "v1WorkspaceClusterWorkloadDeployments": { + "description": "Workspace cluster workload deployments summary", + "type": "object", + "properties": { + "deployments": { + "type": "array", + "items": { + "$ref": "#/definitions/v1ClusterWorkloadDeployment" + } + }, + "metadata": { + "$ref": "#/definitions/v1RelatedObject" + } + } + }, + "v1WorkspaceClusterWorkloadJobs": { + "description": "Workspace cluster workload jobs summary", + "type": "object", + "properties": { + "jobs": { + "type": "array", + "items": { + "$ref": "#/definitions/v1ClusterWorkloadJob" + } + }, + "metadata": { + "$ref": "#/definitions/v1RelatedObject" + } + } + }, + "v1WorkspaceClusterWorkloadNamespaces": { + "description": "Workspace cluster workload namespaces summary", + "type": "object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1RelatedObject" + }, + "namespaces": { + "type": "array", + "items": { + "$ref": "#/definitions/v1ClusterWorkloadNamespace" + } + } + } + }, + "v1WorkspaceClusterWorkloadPods": { + "description": "Workspace cluster workload pods summary", + "type": "object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1RelatedObject" + }, + "pods": { + "type": "array", + "items": { + "$ref": "#/definitions/v1ClusterWorkloadPod" + } + } + } + }, + "v1WorkspaceClusterWorkloadRoleBindings": { + "description": "Workspace cluster workload rbac bindings summary", + "type": "object", + "properties": { + "bindings": { + "type": "array", + "items": { + "$ref": "#/definitions/v1ClusterWorkloadRoleBinding" + } + }, + "metadata": { + "$ref": "#/definitions/v1RelatedObject" + } + } + }, + "v1WorkspaceClusterWorkloadStatefulSets": { + "description": "Workspace cluster workload statefulsets summary", + "type": "object", + "properties": { + "metadata": { + "$ref": "#/definitions/v1RelatedObject" + }, + "statefulSets": { + "type": "array", + "items": { + "$ref": "#/definitions/v1ClusterWorkloadStatefulSet" + } + } + } + }, + "v1WorkspaceClustersWorkloadCronJobs": { + "description": "Workspace clusters workload cronjobs summary", + "type": "object", + "properties": { + "clusters": { + "type": "array", + "items": { + "$ref": "#/definitions/v1WorkspaceClusterWorkloadCronJobs" + } + }, + "metadata": { + "$ref": "#/definitions/v1ObjectMetaInputEntity" + } + } + }, + "v1WorkspaceClustersWorkloadDaemonSets": { + "description": "Workspace clusters workload statefulsets summary", + "type": "object", + "properties": { + "clusters": { + "type": "array", + "items": { + "$ref": "#/definitions/v1WorkspaceClusterWorkloadDaemonSets" + } + }, + "metadata": { + "$ref": "#/definitions/v1ObjectMetaInputEntity" + } + } + }, + "v1WorkspaceClustersWorkloadDeployments": { + "description": "Workspace clusters workload deployments summary", + "type": "object", + "properties": { + "clusters": { + "type": "array", + "items": { + "$ref": "#/definitions/v1WorkspaceClusterWorkloadDeployments" + } + }, + "metadata": { + "$ref": "#/definitions/v1ObjectMetaInputEntity" + } + } + }, + "v1WorkspaceClustersWorkloadJobs": { + "description": "Workspace clusters workload jobs summary", + "type": "object", + "properties": { + "clusters": { + "type": "array", + "items": { + "$ref": "#/definitions/v1WorkspaceClusterWorkloadJobs" + } + }, + "metadata": { + "$ref": "#/definitions/v1ObjectMetaInputEntity" + } + } + }, + "v1WorkspaceClustersWorkloadNamespaces": { + "description": "Workspace clusters workload namespaces summary", + "type": "object", + "properties": { + "clusters": { + "type": "array", + "items": { + "$ref": "#/definitions/v1WorkspaceClusterWorkloadNamespaces" + } + }, + "metadata": { + "$ref": "#/definitions/v1ObjectMetaInputEntity" + } + } + }, + "v1WorkspaceClustersWorkloadPods": { + "description": "Workspace clusters workload pods summary", + "type": "object", + "properties": { + "clusters": { + "type": "array", + "items": { + "$ref": "#/definitions/v1WorkspaceClusterWorkloadPods" + } + }, + "metadata": { + "$ref": "#/definitions/v1ObjectMetaInputEntity" + } + } + }, + "v1WorkspaceClustersWorkloadRoleBindings": { + "description": "Workspace clusters workload rbac bindings summary", + "type": "object", + "properties": { + "clusters": { + "type": "array", + "items": { + "$ref": "#/definitions/v1WorkspaceClusterWorkloadRoleBindings" + } + }, + "metadata": { + "$ref": "#/definitions/v1ObjectMetaInputEntity" + } + } + }, + "v1WorkspaceClustersWorkloadStatefulSets": { + "description": "Workspace clusters workload statefulsets summary", + "type": "object", + "properties": { + "clusters": { + "type": "array", + "items": { + "$ref": "#/definitions/v1WorkspaceClusterWorkloadStatefulSets" + } + }, + "metadata": { + "$ref": "#/definitions/v1ObjectMetaInputEntity" + } + } + }, + "v1WorkspaceEntity": { + "description": "Workspace information", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/v1WorkspaceSpec" + } + } + }, + "v1WorkspaceError": { + "description": "Workspace error", + "properties": { + "clusterUid": { + "type": "string" + }, + "msg": { + "type": "string" + }, + "name": { + "type": "string" + }, + "resourceType": { + "type": "string" + } + } + }, + "v1WorkspaceNamespaceImage": { + "description": "Workspace namespace image information", + "properties": { + "blackListedImages": { + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + } + } + } + }, + "v1WorkspaceNamespaceResourceAllocation": { + "description": "Workspace namespace resource allocation", + "properties": { + "clusterResourceAllocations": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1ClusterResourceAllocation" + } + }, + "defaultResourceAllocation": { + "$ref": "#/definitions/v1WorkspaceResourceAllocation" + } + } + }, + "v1WorkspacePolicies": { + "description": "Workspace policies", + "properties": { + "backupPolicy": { + "$ref": "#/definitions/v1WorkspaceBackupConfigEntity" + } + } + }, + "v1WorkspaceQuota": { + "description": "Workspace resource quota", + "properties": { + "resourceAllocation": { + "$ref": "#/definitions/v1WorkspaceResourceAllocation" + } + } + }, + "v1WorkspaceResourceAllocation": { + "description": "Workspace resource allocation", + "properties": { + "cpuCores": { + "type": "number", + "minimum": -1, + "x-omitempty": false + }, + "memoryMiB": { + "type": "number", + "minimum": -1, + "x-omitempty": false + } + } + }, + "v1WorkspaceRestore": { + "description": "Workspace restore", + "properties": { + "metadata": { + "$ref": "#/definitions/v1ObjectMeta" + }, + "spec": { + "$ref": "#/definitions/v1WorkspaceRestoreSpec" + }, + "status": { + "$ref": "#/definitions/v1WorkspaceRestoreStatus" + } + } + }, + "v1WorkspaceRestoreConfig": { + "description": "Workspace cluster restore config", + "required": [ + "backupName", + "sourceClusterUid" + ], + "properties": { + "backupName": { + "type": "string" + }, + "includeClusterResources": { + "type": "boolean" + }, + "includeNamespaces": { + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + } + }, + "preserveNodePorts": { + "type": "boolean" + }, + "restorePVs": { + "type": "boolean" + }, + "sourceClusterUid": { + "type": "string" + } + } + }, + "v1WorkspaceRestoreConfigEntity": { + "description": "Cluster restore config", + "required": [ + "backupRequestUid" + ], + "properties": { + "backupRequestUid": { + "type": "string" + }, + "restoreConfigs": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1WorkspaceRestoreConfig" + } + } + } + }, + "v1WorkspaceRestoreSpec": { + "description": "Workspace restore spec", + "properties": { + "workspaceUid": { + "type": "string" + } + } + }, + "v1WorkspaceRestoreState": { + "description": "Workspace restore state", + "properties": { + "deleteState": { + "type": "string" + }, + "state": { + "type": "string" + } + } + }, + "v1WorkspaceRestoreStatus": { + "description": "Workspace restore status", + "properties": { + "workspaceRestoreStatuses": { + "type": "array", + "items": { + "$ref": "#/definitions/v1WorkspaceRestoreStatusMeta" + } + } + } + }, + "v1WorkspaceRestoreStatusMeta": { + "description": "Workspace restore status meta", + "properties": { + "actor": { + "$ref": "#/definitions/v1ClusterFeatureActor" + }, + "requestUid": { + "type": "string" + }, + "workspaceRestoreConfig": { + "$ref": "#/definitions/v1WorkspaceClusterRestoreConfig" + } + } + }, + "v1WorkspaceRolesPatch": { + "type": "object", + "properties": { + "roles": { + "type": "array", + "items": { + "type": "string" + } + }, + "uid": { + "type": "string" + } + } + }, + "v1WorkspaceRolesUidSummary": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "uid": { + "type": "string" + } + } + }, + "v1WorkspaceScopeRoles": { + "description": "List all workspaces with the roles assigned to the users", + "properties": { + "projects": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1ProjectsWorkspaces" + } + } + } + }, + "v1WorkspaceSpec": { + "description": "Workspace specifications", + "properties": { + "clusterNamespaces": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1WorkspaceClusterNamespace" + } + }, + "clusterRbacs": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1ClusterRbac" + } + }, + "clusterRefs": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1WorkspaceClusterRef" + } + }, + "policies": { + "$ref": "#/definitions/v1WorkspacePolicies" + }, + "quota": { + "$ref": "#/definitions/v1WorkspaceQuota" + } + } + }, + "v1WorkspaceStatus": { + "description": "Workspace status", + "properties": { + "errors": { + "type": "array", + "uniqueItems": true, + "items": { + "$ref": "#/definitions/v1WorkspaceError" + } + } + } + }, + "v1WorkspaceWorkloadsFilter": { + "description": "Workspace workloads filter", + "type": "object", + "properties": { + "clusters": { + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + } + }, + "namespaces": { + "type": "array", + "uniqueItems": true, + "items": { + "type": "string" + } + } + } + }, + "v1WorkspaceWorkloadsSpec": { + "description": "Workspace workloads spec", + "type": "object", + "properties": { + "filter": { + "$ref": "#/definitions/v1WorkspaceWorkloadsFilter" + } + } + }, + "v1WorkspacesRoles": { + "description": "Workspace users and their roles", + "properties": { + "inheritedRoles": { + "type": "array", + "items": { + "$ref": "#/definitions/v1WorkspaceRolesUidSummary" + } + }, + "name": { + "type": "string" + }, + "roles": { + "type": "array", + "items": { + "$ref": "#/definitions/v1WorkspaceRolesUidSummary" + } + }, + "uid": { + "type": "string" + } + } + }, + "v1WorkspacesRolesPatch": { + "type": "object", + "properties": { + "workspaces": { + "type": "array", + "items": { + "$ref": "#/definitions/v1WorkspaceRolesPatch" + } + } + } + }, + "v1ZoneEntity": { + "description": "Azure availability zone entity", + "type": "object", + "properties": { + "id": { + "description": "Azure availability zone id", + "type": "string" + } + } + }, + "v1k8CertificateAuthority": { + "description": "K8 Certificate Authority", + "type": "object", + "properties": { + "certificates": { + "type": "array", + "items": { + "$ref": "#/definitions/v1Certificate" + } + }, + "expiry": { + "description": "Certificate expiry time", + "$ref": "#/definitions/v1Time" + }, + "name": { + "type": "string" + } + } + } + }, + "securityDefinitions": { + "ApiKey": { + "description": "API key authorization where API key can be generated from Palette console under Profile \u003e My API Keys", + "type": "apiKey", + "name": "ApiKey", + "in": "header" + }, + "Authorization": { + "description": "JWT token authorization obtained using /v1/auth/authenticate api", + "type": "apiKey", + "name": "Authorization", + "in": "header" + } + } +} \ No newline at end of file diff --git a/api/swagger/templates/client/client.gotmpl b/api/swagger/templates/client/client.gotmpl new file mode 100644 index 00000000..6279f0cc --- /dev/null +++ b/api/swagger/templates/client/client.gotmpl @@ -0,0 +1,119 @@ +// Code generated by go-swagger; DO NOT EDIT. + + +{{ if .Copyright -}}// {{ comment .Copyright -}}{{ end }} + + +package {{ .Name }} + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "net/http" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" + + {{ imports .DefaultImports }} +) + +// New creates a new {{ humanize .Name }} API client. +func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { + return &Client{transport: transport, formats: formats} +} + +/* +Client {{ if .Summary }}{{ .Summary }}{{ if .Description }} + +{{ blockcomment .Description }}{{ end }}{{ else if .Description}}{{ blockcomment .Description }}{{ else }}for {{ humanize .Name }} API{{ end }} +*/ +type Client struct { + transport runtime.ClientTransport + formats strfmt.Registry +} + +// ClientService is the interface for Client methods +type ClientService interface { + {{ range .Operations }} + {{ pascalize .Name }}(params *{{ pascalize .Name }}Params{{ if .Authorized }}, authInfo runtime.ClientAuthInfoWriter{{end}}{{ if .HasStreamingResponse }}, writer io.Writer{{ end }}) {{ if .SuccessResponse }}({{ range .SuccessResponses }}*{{ pascalize .Name }}, {{ end }}{{ end }}error{{ if .SuccessResponse }}){{ end }} + {{ end }} + + SetTransport(transport runtime.ClientTransport) +} + +{{ range .Operations }} +/* + {{ pascalize .Name }} {{ if .Summary }}{{ pluralizeFirstWord (humanize .Summary) }}{{ if .Description }} + + {{ blockcomment .Description }}{{ end }}{{ else if .Description}}{{ blockcomment .Description }}{{ else }}{{ humanize .Name }} API{{ end }} +*/ +func (a *Client) {{ pascalize .Name }}(params *{{ pascalize .Name }}Params{{ if .Authorized }}, authInfo runtime.ClientAuthInfoWriter{{end}}{{ if .HasStreamingResponse }}, writer io.Writer{{ end }}) {{ if .SuccessResponse }}({{ range .SuccessResponses }}*{{ pascalize .Name }}, {{ end }}{{ end }}error{{ if .SuccessResponse }}){{ end }} { + // TODO: Validate the params before sending + if params == nil { + params = New{{ pascalize .Name }}Params() + } + {{ $length := len .SuccessResponses }} + {{ if .SuccessResponse }}result{{else}}_{{ end }}, err := a.transport.Submit(&runtime.ClientOperation{ + ID: {{ printf "%q" .Name }}, + Method: {{ printf "%q" .Method }}, + PathPattern: {{ printf "%q" .Path }}, + ProducesMediaTypes: {{ printf "%#v" .ProducesMediaTypes }}, + ConsumesMediaTypes: {{ printf "%#v" .ConsumesMediaTypes }}, + Schemes: {{ printf "%#v" .Schemes }}, + Params: params, + Reader: &{{ pascalize .Name }}Reader{formats: a.formats{{ if .HasStreamingResponse }}, writer: writer{{ end }}},{{ if .Authorized }} + AuthInfo: authInfo,{{ end}} + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return {{ if .SuccessResponse }}{{ padSurround "nil" "nil" 0 $length }}, {{ end }}err + } + {{- if .SuccessResponse }} + {{- if eq $length 1 }} + success, ok := result.(*{{ pascalize .SuccessResponse.Name }}) + if ok { + return success,nil + } + // unexpected success response + {{- if .DefaultResponse }}{{/* if a default response is provided, fill this and return an error */}} + unexpectedSuccess := result.(*{{ pascalize .DefaultResponse.Name }}) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) + {{- else }} + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for {{ .Name }}: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) + {{- end }} + {{- else }}{{/* several possible success responses */}} + switch value := result.(type) { + {{- range $i, $v := .SuccessResponses }} + case *{{ pascalize $v.Name }}: + return {{ padSurround "value" "nil" $i $length }}, nil + {{- end }} + } + {{- if .DefaultResponse }}{{/* if a default response is provided, fill this and return an error */}} + // unexpected success response + unexpectedSuccess := result.(*{{ pascalize .DefaultResponse.Name }}) + return {{ padSurround "nil" "nil" 0 $length }}, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) + {{- else }} + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for {{ $.Name }}: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) + {{- end }} + {{- end }} + {{- else }} + return nil + {{- end }} +} +{{- end }} + +// SetTransport changes the transport on the client +func (a *Client) SetTransport(transport runtime.ClientTransport) { + a.transport = transport +} diff --git a/api/swagger/templates/client/facade.gotmpl b/api/swagger/templates/client/facade.gotmpl new file mode 100644 index 00000000..287a75f9 --- /dev/null +++ b/api/swagger/templates/client/facade.gotmpl @@ -0,0 +1,129 @@ +// Code generated by go-swagger; DO NOT EDIT. + + +{{ if .Copyright -}}// {{ comment .Copyright -}}{{ end }} + + +package {{ .Package }} + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + + +import ( + "net/http" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + httptransport "github.com/go-openapi/runtime/client" + "github.com/go-openapi/spec" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + + {{ imports .DefaultImports }} + {{ imports .Imports }} +) + +// Default {{ humanize .Name }} HTTP client. +var Default = NewHTTPClient(nil) + +const ( + // DefaultHost is the default Host + // found in Meta (info) section of spec file + DefaultHost string = {{ printf "%#v" .Host }} + // DefaultBasePath is the default BasePath + // found in Meta (info) section of spec file + DefaultBasePath string = {{ printf "%#v" .BasePath }} +) + +// DefaultSchemes are the default schemes found in Meta (info) section of spec file +var DefaultSchemes = {{ printf "%#v" .Schemes }} + +// NewHTTPClient creates a new {{ humanize .Name }} HTTP client. +func NewHTTPClient(formats strfmt.Registry) *{{ pascalize .Name }} { + return NewHTTPClientWithConfig(formats, nil) +} + +// NewHTTPClientWithConfig creates a new {{ humanize .Name }} HTTP client, +// using a customizable transport config. +func NewHTTPClientWithConfig(formats strfmt.Registry, cfg *TransportConfig) *{{ pascalize .Name }} { + // ensure nullable parameters have default + if cfg == nil { + cfg = DefaultTransportConfig() + } + + // create transport and client + transport := httptransport.New(cfg.Host, cfg.BasePath, cfg.Schemes) + return New(transport, formats) +} + +// New creates a new {{ humanize .Name }} client +func New(transport runtime.ClientTransport, formats strfmt.Registry) *{{ pascalize .Name }} { + // ensure nullable parameters have default + if formats == nil { + formats = strfmt.Default + } + + cli := new({{ pascalize .Name }}) + cli.Transport = transport + {{- range .OperationGroups }} + cli.{{ pascalize .Name }} = {{ .PackageAlias }}.New(transport, formats) + {{- end }} + return cli +} + +// DefaultTransportConfig creates a TransportConfig with the +// default settings taken from the meta section of the spec file. +func DefaultTransportConfig() *TransportConfig { + return &TransportConfig { + Host: DefaultHost, + BasePath: DefaultBasePath, + Schemes: DefaultSchemes, + } +} + +// TransportConfig contains the transport related info, +// found in the meta section of the spec file. +type TransportConfig struct { + Host string + BasePath string + Schemes []string +} + +// WithHost overrides the default host, +// provided by the meta section of the spec file. +func (cfg *TransportConfig) WithHost(host string) *TransportConfig { + cfg.Host = host + return cfg +} + +// WithBasePath overrides the default basePath, +// provided by the meta section of the spec file. +func (cfg *TransportConfig) WithBasePath(basePath string) *TransportConfig { + cfg.BasePath = basePath + return cfg +} + +// WithSchemes overrides the default schemes, +// provided by the meta section of the spec file. +func (cfg *TransportConfig) WithSchemes(schemes []string) *TransportConfig { + cfg.Schemes = schemes + return cfg +} + +// {{ pascalize .Name }} is a client for {{ humanize .Name }} +type {{ pascalize .Name }} struct { + {{ range .OperationGroups }} + {{ pascalize .Name }} {{ .PackageAlias }}.ClientService + {{ end }} + Transport runtime.ClientTransport +} + + +// SetTransport changes the transport on the client and all its subresources +func (c *{{pascalize .Name}}) SetTransport(transport runtime.ClientTransport) { + c.Transport = transport + {{- range .OperationGroups }} + c.{{ pascalize .Name }}.SetTransport(transport) + {{- end }} +} diff --git a/api/swagger/templates/client/parameter.gotmpl b/api/swagger/templates/client/parameter.gotmpl new file mode 100644 index 00000000..d031f5f8 --- /dev/null +++ b/api/swagger/templates/client/parameter.gotmpl @@ -0,0 +1,247 @@ +// Code generated by go-swagger; DO NOT EDIT. + + +{{ if .Copyright -}}// {{ comment .Copyright -}}{{ end }} + + +package {{ .Package }} + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" + + {{ imports .DefaultImports }} +) + +// New{{ pascalize .Name }}Params creates a new {{ pascalize .Name }}Params object +// with the default values initialized. +func New{{ pascalize .Name }}Params() *{{ pascalize .Name }}Params { + {{ if .Params }}var ( + {{ range .Params }}{{ if .HasDefault }}{{ if not .IsFileParam }}{{ varname .ID}}Default = {{ if .IsPrimitive}}{{.GoType}}({{ end}}{{ printf "%#v" .Default }}{{ if .IsPrimitive }}){{ end }} + {{ end }}{{ end }}{{end}} + ){{ end }} + return &{{ pascalize .Name}}Params{ + {{ range .Params }}{{ if .HasDefault }}{{ pascalize .Name}}: {{ if and (not .IsArray) (not .IsMap) (not .HasDiscriminator) (or .IsNullable ) }}&{{ end }}{{ varname .ID }}Default, + {{ end }}{{ end }} + {{ camelize .TimeoutName }}: cr.DefaultTimeout, + } +} + +// New{{ pascalize .Name }}ParamsWithTimeout creates a new {{ pascalize .Name }}Params object +// with the default values initialized, and the ability to set a timeout on a request +func New{{ pascalize .Name }}ParamsWithTimeout(timeout time.Duration) *{{ pascalize .Name }}Params { + {{ if .Params }}var ( + {{ range .Params }}{{ if .HasDefault }}{{ if not .IsFileParam }}{{ varname .ID}}Default = {{ if .IsPrimitive}}{{.GoType}}({{ end}}{{ printf "%#v" .Default }}{{ if .IsPrimitive }}){{ end }} + {{ end }}{{ end }}{{end}} + ){{ end }} + return &{{ pascalize .Name}}Params{ + {{ range .Params }}{{ if .HasDefault }}{{ pascalize .ID}}: {{ if and (not .IsArray) (not .IsMap) (not .HasDiscriminator) (or .IsNullable ) }}&{{ end }}{{ varname .ID }}Default, + {{ end }}{{ end }} + {{ camelize .TimeoutName }}: timeout, + } +} + +// New{{ pascalize .Name }}ParamsWithContext creates a new {{ pascalize .Name }}Params object +// with the default values initialized, and the ability to set a context for a request +func New{{ pascalize .Name }}ParamsWithContext(ctx context.Context) *{{ pascalize .Name }}Params { + {{ if .Params }}var ( + {{ range .Params }}{{ if .HasDefault }}{{ if not .IsFileParam }}{{ camelize .Name}}Default = {{ if .IsPrimitive}}{{.GoType}}({{ end}}{{ printf "%#v" .Default }}{{ if .IsPrimitive }}){{ end }} + {{ end }}{{ end }}{{end}} + ){{ end }} + return &{{ pascalize .Name}}Params{ + {{ range .Params }}{{ if .HasDefault }}{{ pascalize .Name}}: {{ if and (not .IsArray) (not .IsMap) (not .HasDiscriminator) (or .IsNullable ) }}&{{ end }}{{ camelize .Name }}Default, + {{ end }}{{ end }} + Context: ctx, + } +} + +// New{{ pascalize .Name }}ParamsWithHTTPClient creates a new {{ pascalize .Name }}Params object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func New{{ pascalize .Name }}ParamsWithHTTPClient(client *http.Client) *{{ pascalize .Name }}Params { + {{ if .Params }}var ( + {{ range .Params }}{{ if .HasDefault }}{{ if not .IsFileParam }}{{ camelize .Name}}Default = {{ if .IsPrimitive}}{{.GoType}}({{ end}}{{ printf "%#v" .Default }}{{ if .IsPrimitive }}){{ end }} + {{ end }}{{ end }}{{end}} + ){{ end }} + return &{{ pascalize .Name}}Params{ + {{ range .Params }}{{ if .HasDefault }}{{ pascalize .Name}}: {{ if and (not .IsArray) (not .IsMap) (not .HasDiscriminator) (or .IsNullable ) }}&{{ end }}{{ camelize .Name }}Default, + {{ end }}{{ end }}HTTPClient: client, + } +} + +/*{{ pascalize .Name }}Params contains all the parameters to send to the API endpoint +for the {{ humanize .Name }} operation typically these are written to a http.Request +*/ +type {{ pascalize .Name }}Params struct { + + {{ range .Params }}/*{{ pascalize .Name }}{{if .Description }} + {{ blockcomment .Description }} + + {{ end }}*/ + {{ pascalize .ID }} {{ if and (not .IsArray) (not .IsMap) (not .HasDiscriminator) (not .IsInterface) (not .IsStream) (or .IsNullable ) }}*{{ end }}{{ if not .IsFileParam }}{{ .GoType }}{{ else }}runtime.NamedReadCloser{{end}} + {{ end }} + + {{ camelize .TimeoutName }} time.Duration + Context context.Context + HTTPClient *http.Client +} + +// With{{ pascalize .TimeoutName }} adds the timeout to the {{ humanize .Name }} params +func ({{ .ReceiverName }} *{{ pascalize .Name }}Params) With{{ pascalize .TimeoutName }}(timeout time.Duration) *{{ pascalize .Name }}Params { + {{ .ReceiverName }}.Set{{ pascalize .TimeoutName }}(timeout) + return {{ .ReceiverName }} +} + +// Set{{ pascalize .TimeoutName }} adds the timeout to the {{ humanize .Name }} params +func ({{ .ReceiverName }} *{{ pascalize .Name }}Params) Set{{ pascalize .TimeoutName }}(timeout time.Duration) { + {{ .ReceiverName }}.{{ camelize .TimeoutName }} = timeout +} + +// WithContext adds the context to the {{ humanize .Name }} params +func ({{ .ReceiverName }} *{{ pascalize .Name }}Params) WithContext(ctx context.Context) *{{ pascalize .Name }}Params { + {{ .ReceiverName }}.SetContext(ctx) + return {{ .ReceiverName }} +} + +// SetContext adds the context to the {{ humanize .Name }} params +func ({{ .ReceiverName }} *{{ pascalize .Name }}Params) SetContext(ctx context.Context) { + {{ .ReceiverName }}.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the {{ humanize .Name }} params +func ({{ .ReceiverName }} *{{ pascalize .Name }}Params) WithHTTPClient(client *http.Client) *{{ pascalize .Name }}Params { + {{ .ReceiverName }}.SetHTTPClient(client) + return {{ .ReceiverName }} +} + +// SetHTTPClient adds the HTTPClient to the {{ humanize .Name }} params +func ({{ .ReceiverName }} *{{ pascalize .Name }}Params) SetHTTPClient(client *http.Client) { + {{ .ReceiverName }}.HTTPClient = client +} + +{{ range .Params }} +// With{{ pascalize .ID }} adds the {{ varname .Name }} to the {{ humanize $.Name }} params +func ({{ $.ReceiverName }} *{{ pascalize $.Name }}Params) With{{ pascalize .ID }}({{ varname .Name }} {{ if and (not .IsArray) (not .IsMap) (not .HasDiscriminator) (not .IsStream) (or .IsNullable ) }}*{{ end }}{{ if not .IsFileParam }}{{ .GoType }}{{ else }}runtime.NamedReadCloser{{ end }}) *{{ pascalize $.Name }}Params { + {{ $.ReceiverName }}.Set{{ pascalize .ID }}({{ varname .Name }}) + return {{ .ReceiverName }} +} + +// Set{{ pascalize .ID }} adds the {{ camelize .Name }} to the {{ humanize $.Name }} params +func ({{ $.ReceiverName }} *{{ pascalize $.Name }}Params) Set{{ pascalize .ID }}({{ varname .Name }} {{ if and (not .IsArray) (not .IsMap) (not .HasDiscriminator) (not .IsStream) (or .IsNullable ) }}*{{ end }}{{ if not .IsFileParam }}{{ .GoType }}{{ else }}runtime.NamedReadCloser{{ end }}) { + {{ $.ReceiverName }}.{{ pascalize .ID }} = {{ varname .Name }} +} + +{{ end }} +// WriteToRequest writes these params to a swagger request +func ({{ .ReceiverName }} *{{ pascalize .Name }}Params) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout({{ .ReceiverName }}.{{ camelize .TimeoutName }}); err != nil { + return err + } + var res []error + {{range .Params}} + + {{if not (or .IsArray .IsMap .IsBodyParam) }} + {{ if and .IsNullable (not .AllowEmptyValue) }}if {{ .ValueExpression }} != nil { {{ end}} + {{ if .IsQueryParam }} + // query param {{ .Name }} + {{ if .IsNullable }}var qr{{ pascalize .Name }} {{ .GoType }} + if {{ .ValueExpression }} != nil { + qr{{ pascalize .Name }} = *{{ .ValueExpression }} + }{{ else }}qr{{ pascalize .Name }} := {{ .ValueExpression }}{{ end}} + q{{ pascalize .Name}} := {{ if .Formatter }}{{ .Formatter }}(qr{{ pascalize .Name }}){{ else }}qr{{ pascalize .Name }}{{ if .IsCustomFormatter }}.String(){{end}}{{end}}{{ if not .AllowEmptyValue }} + if q{{ pascalize .Name }} != "" { {{ end }} + if err := r.SetQueryParam({{ printf "%q" .Name }}, q{{ pascalize .Name }}); err != nil { + return err + } + {{ if not .AllowEmptyValue }}}{{ end }} + {{ else if .IsPathParam }} + // path param {{ .Name }} + if err := r.SetPathParam({{ printf "%q" .Name }}, {{ if .Formatter }}{{ .Formatter }}({{ if .IsNullable }}*{{end}}{{ .ValueExpression }}){{ else }}{{ if and (not .IsCustomFormatter) .IsNullable }}*{{end}}{{ .ValueExpression }}{{ if .IsCustomFormatter }}.String(){{end}}{{end}}); err != nil { + return err + } + {{ else if .IsHeaderParam }} + // header param {{ .Name }} + if err := r.SetHeaderParam({{ printf "%q" .Name }}, {{ if .Formatter }}{{ .Formatter }}({{ if .IsNullable }}*{{end}}{{ .ValueExpression }}){{ else }}{{ if and (not .IsCustomFormatter) .IsNullable }}*{{end}}{{ .ValueExpression }}{{ if .IsCustomFormatter }}.String(){{end}}{{end}}); err != nil { + return err + } + {{ else if .IsFormParam }} + {{ if .IsFileParam }} + {{ if .IsNullable}} + if {{ .ValueExpression }} != nil { + {{end}} + // form file param {{ .Name }} + if err := r.SetFileParam({{ printf "%q" .Name }}, {{ .ValueExpression }}); err != nil { + return err + } + {{ if .IsNullable}} + } + {{ end }} + {{ else }} + // form param {{ .Name }} + {{ if .IsNullable }}var fr{{ pascalize .Name }} {{ .GoType }} + if {{ .ValueExpression }} != nil { + fr{{ pascalize .Name }} = *{{ .ValueExpression }} + }{{ else }}fr{{ pascalize .Name }} := {{ .ValueExpression }}{{ end}} + f{{ pascalize .Name}} := {{ if .Formatter }}{{ .Formatter }}(fr{{ pascalize .Name }}){{ else }}fr{{ pascalize .Name }}{{ if .IsCustomFormatter }}.String(){{end}}{{end}}{{ if not .AllowEmptyValue }} + if f{{ pascalize .Name }} != "" { {{ end }} + if err := r.SetFormParam({{ printf "%q" .Name }}, f{{ pascalize .Name }}); err != nil { + return err + } + {{ if not .AllowEmptyValue }}}{{ end }} + {{ end }} + {{ end }} + {{ if and .IsNullable (not .AllowEmptyValue) }}}{{end}} + {{else if .IsArray }} + {{ if not .IsBodyParam }}{{ if .Child }}{{ if or .Child.Formatter .Child.IsCustomFormatter }}var values{{ pascalize .Name }} []string + for _, v := range {{ if and (not .IsArray) (not .IsMap) (not .IsStream) (.IsNullable) }}*{{end}}{{ .ValueExpression }} { + values{{ pascalize .Name }} = append(values{{ pascalize .Name }}, {{ .Child.Formatter }}{{ if .Child.Formatter }}({{ end }}v{{ if .Child.IsCustomFormatter }}.String(){{ end }}{{ if .Child.Formatter }}){{ end }}) + } + {{ else }}values{{ pascalize .Name }} := {{ if and (not .IsArray) (not .IsStream) (not .IsMap) (.IsNullable) }}*{{end}}{{ .ValueExpression }}{{ end }} + {{ else }}values{{ pascalize .Name }} := {{ if and (not .IsArray) (not .IsStream) (not .IsMap) (.IsNullable) }}*{{end}}{{ .ValueExpression }}{{ end }} + joined{{ pascalize .Name}} := swag.JoinByFormat(values{{ pascalize .Name }}, "{{.CollectionFormat}}") + {{ if .IsQueryParam }}// query array param {{ .Name }} + if err := r.SetQueryParam({{ printf "%q" .Name }}, joined{{ pascalize .Name }}...); err != nil { + return err + } + {{ else if and .IsFormParam }}// form array param {{ .Name }} + if err := r.SetFormParam({{ printf "%q" .Name }}, joined{{ pascalize .Name }}...); err != nil { + return err + } + {{ else if and .IsPathParam }}// path array param {{ .Name }} + // SetPathParam does not support variadric arguments, since we used JoinByFormat + // we can send the first item in the array as it's all the items of the previous + // array joined together + if len(joined{{ pascalize .Name }}) > 0 { + if err := r.SetPathParam({{ printf "%q" .Name }}, joined{{ pascalize .Name }}[0]); err != nil { + return err + } + } + {{ end }}{{ end }} + + {{ end }} + + {{if .IsBodyParam}} + {{ if or .Schema.IsInterface .Schema.IsStream (and .Schema.IsArray .Child) (and .Schema.IsMap .Child) (and .Schema.IsNullable (not .HasDiscriminator)) }} if {{ .ValueExpression }} != nil { {{end}} + if err := r.SetBodyParam({{ .ValueExpression }}); err != nil { + return err + } + {{ if or .Schema.IsInterface .Schema.IsStream (and .Schema.IsArray .Child) (and .Schema.IsMap .Child) (and .Schema.IsNullable (not .HasDiscriminator)) }} } {{end}} + {{end}} + + {{end}} + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/swagger/templates/client/response.gotmpl b/api/swagger/templates/client/response.gotmpl new file mode 100644 index 00000000..3f848773 --- /dev/null +++ b/api/swagger/templates/client/response.gotmpl @@ -0,0 +1,160 @@ +{{ define "clientresponse" }}// New{{ pascalize .Name }} creates a {{ pascalize .Name }} with default headers values +func New{{ pascalize .Name }}({{ if eq .Code -1 }}code int{{ end }}{{ if .Schema }}{{ if and (eq .Code -1) .Schema.IsStream }}, {{end}}{{ if .Schema.IsStream }}writer io.Writer{{ end }}{{ end }}) *{{ pascalize .Name }} { + return &{{ pascalize .Name }}{ + {{ if eq .Code -1 }}_statusCode: code, + {{ end }}{{ range .Headers }}{{ if .HasDefault }}{{ pascalize .Name }}: {{ printf "%#v" .Default }}, + {{ end }}{{ end }}{{ if .Schema }}{{ if .Schema.IsStream }}Payload: writer, + {{ end }}{{ end }}} +} + +/*{{ pascalize .Name}} handles this case with default header values. + +{{ if .Description }}{{ blockcomment .Description }}{{else}}{{ pascalize .Name }} {{ humanize .Name }}{{end}} +*/ +type {{ pascalize .Name }} struct { + {{ if eq .Code -1 }} + _statusCode int + + {{ end }}{{ range .Headers }}{{ if .Description }}/*{{ blockcomment .Description }} + */{{ end }} + {{ pascalize .Name }} {{ .GoType }} + {{ end }} + {{ if .Schema }} + Payload {{ if and (not .Schema.IsBaseType) (not .Schema.IsInterface) .Schema.IsComplexObject (not .Schema.IsStream) }}*{{ end }}{{ if (not .Schema.IsStream) }}{{ .Schema.GoType }}{{ else }}io.Writer{{end}} + {{ end }} +}{{ if eq .Code -1 }} + +// Code gets the status code for the {{ humanize .Name }} response +func ({{ .ReceiverName }} *{{ pascalize .Name }}) Code() int { + return {{ .ReceiverName }}._statusCode +} +{{ end }} + + +func ({{ .ReceiverName }} *{{ pascalize .Name }}) Error() string { + return fmt.Sprintf("[{{ upper .Method }} {{ .Path }}][%d] {{ if .Name }}{{ .Name }} {{ else }}unknown error {{ end }}{{ if .Schema }} %+v{{ end }}", {{ if eq .Code -1 }}{{ .ReceiverName }}._statusCode{{ else }}{{ .Code }}{{ end }}{{ if .Schema }}, o.Payload{{ end }}) +} + +{{ if .Schema }} +func ({{ .ReceiverName }} *{{ pascalize .Name }}) GetPayload() {{ if and (not .Schema.IsBaseType) (not .Schema.IsInterface) .Schema.IsComplexObject (not .Schema.IsStream) }}*{{ end }}{{ if (not .Schema.IsStream) }}{{ .Schema.GoType }}{{ else }}io.Writer{{end}} { + return o.Payload +} +{{ end }} + +func ({{ .ReceiverName }} *{{ pascalize .Name }}) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + {{ range .Headers }} + // response header {{.Name}} + {{if .Converter }}{{ camelize .Name }}, err := {{ .Converter }}(response.GetHeader("{{ .Name }}")) + if err != nil { + return errors.InvalidType({{ .Path }}, "header", "{{ .GoType }}", response.GetHeader("{{ .Name }}")) + } + {{ .ReceiverName }}.{{ pascalize .Name }} = {{ camelize .Name }} + {{ else if .IsCustomFormatter }} + {{ camelize .Name }}, err := formats.Parse({{ printf "%q" .SwaggerFormat }}, response.GetHeader("{{ .Name }}")) + if err != nil { + return errors.InvalidType({{ .Path }}, "header", "{{ .GoType }}", response.GetHeader("{{ .Name }}")) + } + {{ .ReceiverName }}.{{ pascalize .Name }} = *({{ camelize .Name }}.(*{{ .GoType }})) + {{ else}}{{ .ReceiverName }}.{{ pascalize .Name }} = response.GetHeader("{{ .Name }}") + {{end}} + {{ end }} + {{ if .Schema }} + {{ if .Schema.IsBaseType }} + // response payload as interface type + payload, err := {{ toPackageName .ModelsPackage }}.Unmarshal{{ dropPackage .Schema.GoType }}{{ if .Schema.IsArray}}Slice{{ end }}(response.Body(), consumer) + if err != nil { + return err + } + {{ .ReceiverName }}.Payload = payload + {{ else if .Schema.IsComplexObject }} + {{ .ReceiverName }}.Payload = new({{ .Schema.GoType }}) + {{ end }}{{ if not .Schema.IsBaseType }} + // response payload + if err := consumer.Consume(response.Body(), {{ if not (or .Schema.IsComplexObject .Schema.IsStream) }}&{{ end}}{{ .ReceiverName }}.Payload); err != nil && err != io.EOF { + return err + } + {{ end }}{{ end }} + return nil +} +{{ end }}// Code generated by go-swagger; DO NOT EDIT. + + +{{ if .Copyright -}}// {{ comment .Copyright -}}{{ end }} + + +package {{ .Package }} + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + + +import ( + "io" + "net/http" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" + + {{ imports .DefaultImports }} +) + +// {{ pascalize .Name }}Reader is a Reader for the {{ pascalize .Name }} structure. +type {{ pascalize .Name }}Reader struct { + formats strfmt.Registry{{ if .HasStreamingResponse }} + writer io.Writer{{ end }} +} + +// ReadResponse reads a server response into the received {{ .ReceiverName }}. +func ({{ .ReceiverName }} *{{ pascalize .Name }}Reader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + {{- if .Responses}} + switch response.Code() { + {{- end }} + {{- range .Responses }} + case {{ .Code }}: + result := New{{ pascalize .Name }}({{ if .Schema }}{{ if .Schema.IsStream }}{{ $.ReceiverName }}.writer{{ end }}{{ end }}) + if err := result.readResponse(response, consumer, {{ $.ReceiverName }}.formats); err != nil { + return nil, err + } + return {{ if .IsSuccess }}result, nil{{else}}nil, result{{end}} + {{- end }} + {{- if .DefaultResponse }} + {{- with .DefaultResponse }} + {{- if $.Responses}} + default: + {{- end }} + result := New{{ pascalize .Name }}(response.Code(){{ if .Schema }}{{ if .Schema.IsStream }}, {{ $.ReceiverName }}.writer{{ end }}{{ end }}) + if err := result.readResponse(response, consumer, {{ $.ReceiverName }}.formats); err != nil { + return nil, err + } + if response.Code() / 100 == 2 { + return result, nil + } + return nil, result + {{- end }} + {{- else }} + {{ if $.Responses}} + default: + {{- end }} + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + {{- end }} + {{- if .Responses}} + } + {{- end }} +} + +{{ range .Responses }} +{{ template "clientresponse" . }} +{{ end }} +{{ if .DefaultResponse }} +{{ template "clientresponse" .DefaultResponse }} +{{ end }} + +{{ range .ExtraSchemas }} +/*{{ pascalize .Name }} {{ template "docstring" . }} +swagger:model {{ .Name }} +*/ +{{- template "schema" . }} +{{- end }} diff --git a/client/account.go b/client/account.go index 8a5bd2c6..86a506c2 100644 --- a/client/account.go +++ b/client/account.go @@ -3,8 +3,8 @@ package client import ( "fmt" - clientv1 "github.com/spectrocloud/palette-api-go/client/v1" - "github.com/spectrocloud/palette-api-go/models" + clientv1 "github.com/spectrocloud/palette-sdk-go/api/client/v1" + "github.com/spectrocloud/palette-sdk-go/api/models" "github.com/spectrocloud/palette-sdk-go/client/apiutil" ) diff --git a/client/account_aws.go b/client/account_aws.go index fd53a314..440fded9 100644 --- a/client/account_aws.go +++ b/client/account_aws.go @@ -1,8 +1,8 @@ package client import ( - clientv1 "github.com/spectrocloud/palette-api-go/client/v1" - "github.com/spectrocloud/palette-api-go/models" + clientv1 "github.com/spectrocloud/palette-sdk-go/api/client/v1" + "github.com/spectrocloud/palette-sdk-go/api/models" "github.com/spectrocloud/palette-sdk-go/client/apiutil" ) diff --git a/client/account_azure.go b/client/account_azure.go index 10eb72ae..47747d82 100644 --- a/client/account_azure.go +++ b/client/account_azure.go @@ -1,8 +1,8 @@ package client import ( - clientv1 "github.com/spectrocloud/palette-api-go/client/v1" - "github.com/spectrocloud/palette-api-go/models" + clientv1 "github.com/spectrocloud/palette-sdk-go/api/client/v1" + "github.com/spectrocloud/palette-sdk-go/api/models" "github.com/spectrocloud/palette-sdk-go/client/apiutil" ) diff --git a/client/account_custom_cloud.go b/client/account_custom_cloud.go index baa7e51c..dcf22920 100644 --- a/client/account_custom_cloud.go +++ b/client/account_custom_cloud.go @@ -3,8 +3,8 @@ package client import ( "fmt" - clientv1 "github.com/spectrocloud/palette-api-go/client/v1" - "github.com/spectrocloud/palette-api-go/models" + clientv1 "github.com/spectrocloud/palette-sdk-go/api/client/v1" + "github.com/spectrocloud/palette-sdk-go/api/models" "github.com/spectrocloud/palette-sdk-go/client/apiutil" ) diff --git a/client/account_gcp.go b/client/account_gcp.go index 0e9d64ee..e2325313 100644 --- a/client/account_gcp.go +++ b/client/account_gcp.go @@ -1,8 +1,8 @@ package client import ( - clientv1 "github.com/spectrocloud/palette-api-go/client/v1" - "github.com/spectrocloud/palette-api-go/models" + clientv1 "github.com/spectrocloud/palette-sdk-go/api/client/v1" + "github.com/spectrocloud/palette-sdk-go/api/models" "github.com/spectrocloud/palette-sdk-go/client/apiutil" ) diff --git a/client/account_maas.go b/client/account_maas.go index 209fae87..b8201437 100644 --- a/client/account_maas.go +++ b/client/account_maas.go @@ -1,8 +1,8 @@ package client import ( - clientv1 "github.com/spectrocloud/palette-api-go/client/v1" - "github.com/spectrocloud/palette-api-go/models" + clientv1 "github.com/spectrocloud/palette-sdk-go/api/client/v1" + "github.com/spectrocloud/palette-sdk-go/api/models" "github.com/spectrocloud/palette-sdk-go/client/apiutil" ) diff --git a/client/account_openstack.go b/client/account_openstack.go index 7e3e1e89..12b1712f 100644 --- a/client/account_openstack.go +++ b/client/account_openstack.go @@ -1,8 +1,8 @@ package client import ( - clientv1 "github.com/spectrocloud/palette-api-go/client/v1" - "github.com/spectrocloud/palette-api-go/models" + clientv1 "github.com/spectrocloud/palette-sdk-go/api/client/v1" + "github.com/spectrocloud/palette-sdk-go/api/models" "github.com/spectrocloud/palette-sdk-go/client/apiutil" ) diff --git a/client/account_tke.go b/client/account_tke.go index 5812293f..7b8bb456 100644 --- a/client/account_tke.go +++ b/client/account_tke.go @@ -1,8 +1,8 @@ package client import ( - clientv1 "github.com/spectrocloud/palette-api-go/client/v1" - "github.com/spectrocloud/palette-api-go/models" + clientv1 "github.com/spectrocloud/palette-sdk-go/api/client/v1" + "github.com/spectrocloud/palette-sdk-go/api/models" "github.com/spectrocloud/palette-sdk-go/client/apiutil" ) diff --git a/client/account_vsphere.go b/client/account_vsphere.go index fd361125..9f4a785a 100644 --- a/client/account_vsphere.go +++ b/client/account_vsphere.go @@ -1,8 +1,8 @@ package client import ( - clientv1 "github.com/spectrocloud/palette-api-go/client/v1" - "github.com/spectrocloud/palette-api-go/models" + clientv1 "github.com/spectrocloud/palette-sdk-go/api/client/v1" + "github.com/spectrocloud/palette-sdk-go/api/models" "github.com/spectrocloud/palette-sdk-go/client/apiutil" ) diff --git a/client/addon_deployment_update.go b/client/addon_deployment_update.go index 853b455b..6452c6b2 100644 --- a/client/addon_deployment_update.go +++ b/client/addon_deployment_update.go @@ -5,8 +5,8 @@ import ( "math/rand" "time" - clientv1 "github.com/spectrocloud/palette-api-go/client/v1" - "github.com/spectrocloud/palette-api-go/models" + clientv1 "github.com/spectrocloud/palette-sdk-go/api/client/v1" + "github.com/spectrocloud/palette-sdk-go/api/models" ) // UpdateAddonDeployment updates the addon deployment for a cluster. diff --git a/client/alert.go b/client/alert.go index b435bddc..e5d01c1a 100644 --- a/client/alert.go +++ b/client/alert.go @@ -1,8 +1,8 @@ package client import ( - clientv1 "github.com/spectrocloud/palette-api-go/client/v1" - "github.com/spectrocloud/palette-api-go/models" + clientv1 "github.com/spectrocloud/palette-sdk-go/api/client/v1" + "github.com/spectrocloud/palette-sdk-go/api/models" ) // CreateAlert creates a new alert. diff --git a/client/apiutil/apiutil.go b/client/apiutil/apiutil.go index cd3f3dee..76bc8704 100644 --- a/client/apiutil/apiutil.go +++ b/client/apiutil/apiutil.go @@ -8,8 +8,8 @@ import ( "hash/fnv" "strconv" - "github.com/spectrocloud/palette-api-go/apiutil/transport" - "github.com/spectrocloud/palette-api-go/models" + "github.com/spectrocloud/palette-sdk-go/api/apiutil/transport" + "github.com/spectrocloud/palette-sdk-go/api/models" ) // IsBase64 returns a boolean indicating whether a string is base64 encoded. diff --git a/client/appliance.go b/client/appliance.go index d045e1d2..e6dd4529 100644 --- a/client/appliance.go +++ b/client/appliance.go @@ -3,9 +3,9 @@ package client import ( "fmt" - "github.com/spectrocloud/gomi/pkg/ptr" - clientv1 "github.com/spectrocloud/palette-api-go/client/v1" - "github.com/spectrocloud/palette-api-go/models" + clientv1 "github.com/spectrocloud/palette-sdk-go/api/client/v1" + "github.com/spectrocloud/palette-sdk-go/api/models" + "github.com/spectrocloud/palette-sdk-go/client/apiutil" "github.com/spectrocloud/palette-sdk-go/client/herr" ) @@ -29,7 +29,7 @@ func (h *V1Client) SearchApplianceSummaries(filter *models.V1SearchFilterSpec, s if resp.Payload.Listmeta.Continue == "" { isContinue = false } - params.WithContinue(ptr.StringPtr(resp.Payload.Listmeta.Continue)) + params.WithContinue(apiutil.Ptr(resp.Payload.Listmeta.Continue)) } return hosts, nil } diff --git a/client/application.go b/client/application.go index c5064d4c..1976c940 100644 --- a/client/application.go +++ b/client/application.go @@ -1,8 +1,8 @@ package client import ( - clientv1 "github.com/spectrocloud/palette-api-go/client/v1" - "github.com/spectrocloud/palette-api-go/models" + clientv1 "github.com/spectrocloud/palette-sdk-go/api/client/v1" + "github.com/spectrocloud/palette-sdk-go/api/models" "github.com/spectrocloud/palette-sdk-go/client/apiutil" ) diff --git a/client/application_profile.go b/client/application_profile.go index 4d22e4b3..1b1fd055 100644 --- a/client/application_profile.go +++ b/client/application_profile.go @@ -5,8 +5,8 @@ import ( "github.com/pkg/errors" - clientv1 "github.com/spectrocloud/palette-api-go/client/v1" - "github.com/spectrocloud/palette-api-go/models" + clientv1 "github.com/spectrocloud/palette-sdk-go/api/client/v1" + "github.com/spectrocloud/palette-sdk-go/api/models" "github.com/spectrocloud/palette-sdk-go/client/apiutil" "github.com/spectrocloud/palette-sdk-go/client/herr" ) diff --git a/client/backup_storage_location.go b/client/backup_storage_location.go index 8923285d..88ca8875 100644 --- a/client/backup_storage_location.go +++ b/client/backup_storage_location.go @@ -1,8 +1,8 @@ package client import ( - clientv1 "github.com/spectrocloud/palette-api-go/client/v1" - "github.com/spectrocloud/palette-api-go/models" + clientv1 "github.com/spectrocloud/palette-sdk-go/api/client/v1" + "github.com/spectrocloud/palette-sdk-go/api/models" ) // ListBackupStorageLocation returns a list of all backup storage locations. diff --git a/client/client.go b/client/client.go index 6ceac748..3dc4feb5 100644 --- a/client/client.go +++ b/client/client.go @@ -9,9 +9,9 @@ import ( openapiclient "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" - "github.com/spectrocloud/palette-api-go/apiutil/transport" - clientv1 "github.com/spectrocloud/palette-api-go/client/v1" - "github.com/spectrocloud/palette-api-go/models" + "github.com/spectrocloud/palette-sdk-go/api/apiutil/transport" + clientv1 "github.com/spectrocloud/palette-sdk-go/api/client/v1" + "github.com/spectrocloud/palette-sdk-go/api/models" ) // V1Client is a client for the Spectro Cloud API. diff --git a/client/cluster.go b/client/cluster.go index 261363c8..e72cfe90 100644 --- a/client/cluster.go +++ b/client/cluster.go @@ -8,8 +8,8 @@ import ( "path/filepath" "strings" - clientv1 "github.com/spectrocloud/palette-api-go/client/v1" - "github.com/spectrocloud/palette-api-go/models" + clientv1 "github.com/spectrocloud/palette-sdk-go/api/client/v1" + "github.com/spectrocloud/palette-sdk-go/api/models" "github.com/spectrocloud/palette-sdk-go/client/apiutil" "github.com/spectrocloud/palette-sdk-go/client/herr" ) diff --git a/client/cluster_aks.go b/client/cluster_aks.go index 05c8cfaf..d1469b1f 100644 --- a/client/cluster_aks.go +++ b/client/cluster_aks.go @@ -3,8 +3,8 @@ package client import ( "time" - clientv1 "github.com/spectrocloud/palette-api-go/client/v1" - "github.com/spectrocloud/palette-api-go/models" + clientv1 "github.com/spectrocloud/palette-sdk-go/api/client/v1" + "github.com/spectrocloud/palette-sdk-go/api/models" "github.com/spectrocloud/palette-sdk-go/client/apiutil" ) diff --git a/client/cluster_aws.go b/client/cluster_aws.go index 2d6cf7d4..bb7e0850 100644 --- a/client/cluster_aws.go +++ b/client/cluster_aws.go @@ -1,8 +1,8 @@ package client import ( - clientv1 "github.com/spectrocloud/palette-api-go/client/v1" - "github.com/spectrocloud/palette-api-go/models" + clientv1 "github.com/spectrocloud/palette-sdk-go/api/client/v1" + "github.com/spectrocloud/palette-sdk-go/api/models" "github.com/spectrocloud/palette-sdk-go/client/apiutil" ) diff --git a/client/cluster_azure.go b/client/cluster_azure.go index 50196567..ea213015 100644 --- a/client/cluster_azure.go +++ b/client/cluster_azure.go @@ -1,8 +1,8 @@ package client import ( - clientv1 "github.com/spectrocloud/palette-api-go/client/v1" - "github.com/spectrocloud/palette-api-go/models" + clientv1 "github.com/spectrocloud/palette-sdk-go/api/client/v1" + "github.com/spectrocloud/palette-sdk-go/api/models" "github.com/spectrocloud/palette-sdk-go/client/apiutil" ) diff --git a/client/cluster_backup_config.go b/client/cluster_backup_config.go index 6045727c..58c76697 100644 --- a/client/cluster_backup_config.go +++ b/client/cluster_backup_config.go @@ -1,8 +1,8 @@ package client import ( - clientv1 "github.com/spectrocloud/palette-api-go/client/v1" - "github.com/spectrocloud/palette-api-go/models" + clientv1 "github.com/spectrocloud/palette-sdk-go/api/client/v1" + "github.com/spectrocloud/palette-sdk-go/api/models" "github.com/spectrocloud/palette-sdk-go/client/herr" ) diff --git a/client/cluster_custom_cloud.go b/client/cluster_custom_cloud.go index f4ba3a8d..588b64f8 100644 --- a/client/cluster_custom_cloud.go +++ b/client/cluster_custom_cloud.go @@ -1,8 +1,8 @@ package client import ( - clientv1 "github.com/spectrocloud/palette-api-go/client/v1" - "github.com/spectrocloud/palette-api-go/models" + clientv1 "github.com/spectrocloud/palette-sdk-go/api/client/v1" + "github.com/spectrocloud/palette-sdk-go/api/models" ) // CreateClusterCustomCloud creates a custom cloud cluster. diff --git a/client/cluster_edge_native.go b/client/cluster_edge_native.go index 4fe095db..0ff7bb10 100644 --- a/client/cluster_edge_native.go +++ b/client/cluster_edge_native.go @@ -4,8 +4,8 @@ import ( "errors" "fmt" - clientv1 "github.com/spectrocloud/palette-api-go/client/v1" - "github.com/spectrocloud/palette-api-go/models" + clientv1 "github.com/spectrocloud/palette-sdk-go/api/client/v1" + "github.com/spectrocloud/palette-sdk-go/api/models" "github.com/spectrocloud/palette-sdk-go/client/apiutil" ) diff --git a/client/cluster_edge_vsphere.go b/client/cluster_edge_vsphere.go index c7544ead..a3e63e06 100644 --- a/client/cluster_edge_vsphere.go +++ b/client/cluster_edge_vsphere.go @@ -1,8 +1,8 @@ package client import ( - clientv1 "github.com/spectrocloud/palette-api-go/client/v1" - "github.com/spectrocloud/palette-api-go/models" + clientv1 "github.com/spectrocloud/palette-sdk-go/api/client/v1" + "github.com/spectrocloud/palette-sdk-go/api/models" "github.com/spectrocloud/palette-sdk-go/client/apiutil" ) diff --git a/client/cluster_eks.go b/client/cluster_eks.go index 8be1bbaa..96473e8a 100644 --- a/client/cluster_eks.go +++ b/client/cluster_eks.go @@ -3,8 +3,8 @@ package client import ( "time" - clientv1 "github.com/spectrocloud/palette-api-go/client/v1" - "github.com/spectrocloud/palette-api-go/models" + clientv1 "github.com/spectrocloud/palette-sdk-go/api/client/v1" + "github.com/spectrocloud/palette-sdk-go/api/models" "github.com/spectrocloud/palette-sdk-go/client/apiutil" ) diff --git a/client/cluster_gcp.go b/client/cluster_gcp.go index e2a923fd..31eab2cf 100644 --- a/client/cluster_gcp.go +++ b/client/cluster_gcp.go @@ -1,8 +1,8 @@ package client import ( - clientv1 "github.com/spectrocloud/palette-api-go/client/v1" - "github.com/spectrocloud/palette-api-go/models" + clientv1 "github.com/spectrocloud/palette-sdk-go/api/client/v1" + "github.com/spectrocloud/palette-sdk-go/api/models" "github.com/spectrocloud/palette-sdk-go/client/apiutil" ) diff --git a/client/cluster_gke.go b/client/cluster_gke.go index 5a99c564..2b6ae6b1 100644 --- a/client/cluster_gke.go +++ b/client/cluster_gke.go @@ -1,8 +1,8 @@ package client import ( - clientv1 "github.com/spectrocloud/palette-api-go/client/v1" - "github.com/spectrocloud/palette-api-go/models" + clientv1 "github.com/spectrocloud/palette-sdk-go/api/client/v1" + "github.com/spectrocloud/palette-sdk-go/api/models" ) // CreateClusterGke creates a GKE cluster. diff --git a/client/cluster_group.go b/client/cluster_group.go index 96ecf43e..f9a127c4 100644 --- a/client/cluster_group.go +++ b/client/cluster_group.go @@ -1,8 +1,8 @@ package client import ( - clientv1 "github.com/spectrocloud/palette-api-go/client/v1" - "github.com/spectrocloud/palette-api-go/models" + clientv1 "github.com/spectrocloud/palette-sdk-go/api/client/v1" + "github.com/spectrocloud/palette-sdk-go/api/models" "github.com/spectrocloud/palette-sdk-go/client/apiutil" ) diff --git a/client/cluster_host_config.go b/client/cluster_host_config.go index 61bf7326..6ca27e6c 100644 --- a/client/cluster_host_config.go +++ b/client/cluster_host_config.go @@ -1,8 +1,8 @@ package client import ( - clientv1 "github.com/spectrocloud/palette-api-go/client/v1" - "github.com/spectrocloud/palette-api-go/models" + clientv1 "github.com/spectrocloud/palette-sdk-go/api/client/v1" + "github.com/spectrocloud/palette-sdk-go/api/models" ) // UpdateClusterHostConfig updates an existing cluster's virtual cluster hosting config. diff --git a/client/cluster_location_config.go b/client/cluster_location_config.go index e70540cb..71dc9641 100644 --- a/client/cluster_location_config.go +++ b/client/cluster_location_config.go @@ -1,8 +1,8 @@ package client import ( - clientv1 "github.com/spectrocloud/palette-api-go/client/v1" - "github.com/spectrocloud/palette-api-go/models" + clientv1 "github.com/spectrocloud/palette-sdk-go/api/client/v1" + "github.com/spectrocloud/palette-sdk-go/api/models" ) // GetClusterLocationConfig returns a cluster's location config. diff --git a/client/cluster_maas.go b/client/cluster_maas.go index 5abcee45..07bcf5f8 100644 --- a/client/cluster_maas.go +++ b/client/cluster_maas.go @@ -1,8 +1,8 @@ package client import ( - clientv1 "github.com/spectrocloud/palette-api-go/client/v1" - "github.com/spectrocloud/palette-api-go/models" + clientv1 "github.com/spectrocloud/palette-sdk-go/api/client/v1" + "github.com/spectrocloud/palette-sdk-go/api/models" "github.com/spectrocloud/palette-sdk-go/client/apiutil" ) diff --git a/client/cluster_metadata_config.go b/client/cluster_metadata_config.go index 9fe1afcc..a69bc212 100644 --- a/client/cluster_metadata_config.go +++ b/client/cluster_metadata_config.go @@ -1,8 +1,8 @@ package client import ( - clientv1 "github.com/spectrocloud/palette-api-go/client/v1" - "github.com/spectrocloud/palette-api-go/models" + clientv1 "github.com/spectrocloud/palette-sdk-go/api/client/v1" + "github.com/spectrocloud/palette-sdk-go/api/models" ) // UpdateClusterMetadata updates an existing cluster's metadata: annotations, labels, and name. diff --git a/client/cluster_namespace_config.go b/client/cluster_namespace_config.go index 8f631265..86a4943e 100644 --- a/client/cluster_namespace_config.go +++ b/client/cluster_namespace_config.go @@ -1,8 +1,8 @@ package client import ( - clientv1 "github.com/spectrocloud/palette-api-go/client/v1" - "github.com/spectrocloud/palette-api-go/models" + clientv1 "github.com/spectrocloud/palette-sdk-go/api/client/v1" + "github.com/spectrocloud/palette-sdk-go/api/models" "github.com/spectrocloud/palette-sdk-go/client/herr" ) diff --git a/client/cluster_openstack.go b/client/cluster_openstack.go index 6306162d..913d29fa 100644 --- a/client/cluster_openstack.go +++ b/client/cluster_openstack.go @@ -1,8 +1,8 @@ package client import ( - clientv1 "github.com/spectrocloud/palette-api-go/client/v1" - "github.com/spectrocloud/palette-api-go/models" + clientv1 "github.com/spectrocloud/palette-sdk-go/api/client/v1" + "github.com/spectrocloud/palette-sdk-go/api/models" "github.com/spectrocloud/palette-sdk-go/client/herr" ) diff --git a/client/cluster_ospatch_config.go b/client/cluster_ospatch_config.go index 4bf99253..082d597d 100644 --- a/client/cluster_ospatch_config.go +++ b/client/cluster_ospatch_config.go @@ -1,8 +1,8 @@ package client import ( - clientv1 "github.com/spectrocloud/palette-api-go/client/v1" - "github.com/spectrocloud/palette-api-go/models" + clientv1 "github.com/spectrocloud/palette-sdk-go/api/client/v1" + "github.com/spectrocloud/palette-sdk-go/api/models" ) // UpdateClusterOsPatchConfig updates an existing cluster's OS patching configuration. diff --git a/client/cluster_profile.go b/client/cluster_profile.go index b2b37447..46c6a436 100644 --- a/client/cluster_profile.go +++ b/client/cluster_profile.go @@ -6,8 +6,8 @@ import ( "io" "os" - clientv1 "github.com/spectrocloud/palette-api-go/client/v1" - "github.com/spectrocloud/palette-api-go/models" + clientv1 "github.com/spectrocloud/palette-sdk-go/api/client/v1" + "github.com/spectrocloud/palette-sdk-go/api/models" "github.com/spectrocloud/palette-sdk-go/client/apiutil" ) diff --git a/client/cluster_profile_import.go b/client/cluster_profile_import.go index b3713b96..084389bf 100644 --- a/client/cluster_profile_import.go +++ b/client/cluster_profile_import.go @@ -2,9 +2,10 @@ package client import ( "github.com/go-openapi/runtime" - "github.com/spectrocloud/palette-api-go/models" - clientv1 "github.com/spectrocloud/palette-api-go/client/v1" + "github.com/spectrocloud/palette-sdk-go/api/models" + + clientv1 "github.com/spectrocloud/palette-sdk-go/api/client/v1" "github.com/spectrocloud/palette-sdk-go/client/apiutil" ) diff --git a/client/cluster_rbac_config.go b/client/cluster_rbac_config.go index c3f3ca98..43311fca 100644 --- a/client/cluster_rbac_config.go +++ b/client/cluster_rbac_config.go @@ -1,8 +1,8 @@ package client import ( - clientv1 "github.com/spectrocloud/palette-api-go/client/v1" - "github.com/spectrocloud/palette-api-go/models" + clientv1 "github.com/spectrocloud/palette-sdk-go/api/client/v1" + "github.com/spectrocloud/palette-sdk-go/api/models" "github.com/spectrocloud/palette-sdk-go/client/herr" ) diff --git a/client/cluster_scan_config.go b/client/cluster_scan_config.go index 2e3036a1..877899c7 100644 --- a/client/cluster_scan_config.go +++ b/client/cluster_scan_config.go @@ -1,8 +1,8 @@ package client import ( - clientv1 "github.com/spectrocloud/palette-api-go/client/v1" - "github.com/spectrocloud/palette-api-go/models" + clientv1 "github.com/spectrocloud/palette-sdk-go/api/client/v1" + "github.com/spectrocloud/palette-sdk-go/api/models" "github.com/spectrocloud/palette-sdk-go/client/herr" ) diff --git a/client/cluster_tke.go b/client/cluster_tke.go index efc6ac2f..fe4f0535 100644 --- a/client/cluster_tke.go +++ b/client/cluster_tke.go @@ -1,8 +1,8 @@ package client import ( - clientv1 "github.com/spectrocloud/palette-api-go/client/v1" - "github.com/spectrocloud/palette-api-go/models" + clientv1 "github.com/spectrocloud/palette-sdk-go/api/client/v1" + "github.com/spectrocloud/palette-sdk-go/api/models" "github.com/spectrocloud/palette-sdk-go/client/apiutil" ) diff --git a/client/cluster_virtual.go b/client/cluster_virtual.go index b69edf6d..a1dc6b81 100644 --- a/client/cluster_virtual.go +++ b/client/cluster_virtual.go @@ -1,8 +1,8 @@ package client import ( - clientv1 "github.com/spectrocloud/palette-api-go/client/v1" - "github.com/spectrocloud/palette-api-go/models" + clientv1 "github.com/spectrocloud/palette-sdk-go/api/client/v1" + "github.com/spectrocloud/palette-sdk-go/api/models" "github.com/spectrocloud/palette-sdk-go/client/apiutil" ) diff --git a/client/cluster_vsphere.go b/client/cluster_vsphere.go index adf44cb0..00fbea4a 100644 --- a/client/cluster_vsphere.go +++ b/client/cluster_vsphere.go @@ -1,8 +1,8 @@ package client import ( - clientv1 "github.com/spectrocloud/palette-api-go/client/v1" - "github.com/spectrocloud/palette-api-go/models" + clientv1 "github.com/spectrocloud/palette-sdk-go/api/client/v1" + "github.com/spectrocloud/palette-sdk-go/api/models" "github.com/spectrocloud/palette-sdk-go/client/apiutil" ) diff --git a/client/datavolume.go b/client/datavolume.go index 1806e296..93fdde39 100644 --- a/client/datavolume.go +++ b/client/datavolume.go @@ -3,8 +3,8 @@ package client import ( "fmt" - clientv1 "github.com/spectrocloud/palette-api-go/client/v1" - "github.com/spectrocloud/palette-api-go/models" + clientv1 "github.com/spectrocloud/palette-sdk-go/api/client/v1" + "github.com/spectrocloud/palette-sdk-go/api/models" ) // CreateDataVolume creates a new data volume. diff --git a/client/events.go b/client/events.go index ab71aa56..4484ac2c 100644 --- a/client/events.go +++ b/client/events.go @@ -3,8 +3,8 @@ package client import ( "time" - clientv1 "github.com/spectrocloud/palette-api-go/client/v1" - "github.com/spectrocloud/palette-api-go/models" + clientv1 "github.com/spectrocloud/palette-sdk-go/api/client/v1" + "github.com/spectrocloud/palette-sdk-go/api/models" ) // GetEvents retrieves events for a given object. diff --git a/client/filter.go b/client/filter.go index 31eaef46..b532dbf1 100644 --- a/client/filter.go +++ b/client/filter.go @@ -3,8 +3,8 @@ package client import ( "fmt" - clientv1 "github.com/spectrocloud/palette-api-go/client/v1" - "github.com/spectrocloud/palette-api-go/models" + clientv1 "github.com/spectrocloud/palette-sdk-go/api/client/v1" + "github.com/spectrocloud/palette-sdk-go/api/models" "github.com/spectrocloud/palette-sdk-go/client/apiutil" ) diff --git a/client/herr/errors_test.go b/client/herr/errors_test.go index bfbded96..754d66f4 100644 --- a/client/herr/errors_test.go +++ b/client/herr/errors_test.go @@ -6,8 +6,8 @@ import ( "github.com/stretchr/testify/assert" - "github.com/spectrocloud/palette-api-go/apiutil/transport" - "github.com/spectrocloud/palette-api-go/models" + "github.com/spectrocloud/palette-sdk-go/api/apiutil/transport" + "github.com/spectrocloud/palette-sdk-go/api/models" ) func TestIsNotFound(t *testing.T) { diff --git a/client/macro.go b/client/macro.go index 26206154..71bae619 100644 --- a/client/macro.go +++ b/client/macro.go @@ -1,8 +1,8 @@ package client import ( - clientv1 "github.com/spectrocloud/palette-api-go/client/v1" - "github.com/spectrocloud/palette-api-go/models" + clientv1 "github.com/spectrocloud/palette-sdk-go/api/client/v1" + "github.com/spectrocloud/palette-sdk-go/api/models" "github.com/spectrocloud/palette-sdk-go/client/apiutil" ) diff --git a/client/macros.go b/client/macros.go index 99cc728d..9a696083 100644 --- a/client/macros.go +++ b/client/macros.go @@ -3,8 +3,8 @@ package client import ( "fmt" - clientv1 "github.com/spectrocloud/palette-api-go/client/v1" - "github.com/spectrocloud/palette-api-go/models" + clientv1 "github.com/spectrocloud/palette-sdk-go/api/client/v1" + "github.com/spectrocloud/palette-sdk-go/api/models" ) // CreateMacros creates a new macro. diff --git a/client/node_actions.go b/client/node_actions.go index 9c973a15..bdbeb6ef 100644 --- a/client/node_actions.go +++ b/client/node_actions.go @@ -1,8 +1,8 @@ package client import ( - clientv1 "github.com/spectrocloud/palette-api-go/client/v1" - "github.com/spectrocloud/palette-api-go/models" + clientv1 "github.com/spectrocloud/palette-sdk-go/api/client/v1" + "github.com/spectrocloud/palette-sdk-go/api/models" ) // GetMaintenanceStatus defines a function type that retrieves the maintenance status of a machine. diff --git a/client/organization.go b/client/organization.go index 2bb12da1..1d7b0fe0 100644 --- a/client/organization.go +++ b/client/organization.go @@ -1,8 +1,8 @@ package client import ( - clientv1 "github.com/spectrocloud/palette-api-go/client/v1" - "github.com/spectrocloud/palette-api-go/models" + clientv1 "github.com/spectrocloud/palette-sdk-go/api/client/v1" + "github.com/spectrocloud/palette-sdk-go/api/models" ) // GetOrganizationByName retrieves an organization by name. diff --git a/client/pack.go b/client/pack.go index 182a6d73..912a8954 100644 --- a/client/pack.go +++ b/client/pack.go @@ -3,8 +3,8 @@ package client import ( "strings" - clientv1 "github.com/spectrocloud/palette-api-go/client/v1" - "github.com/spectrocloud/palette-api-go/models" + clientv1 "github.com/spectrocloud/palette-sdk-go/api/client/v1" + "github.com/spectrocloud/palette-sdk-go/api/models" "github.com/spectrocloud/palette-sdk-go/client/apiutil" ) diff --git a/client/private_cloud_gateway.go b/client/private_cloud_gateway.go index ec3dac37..0657bfaf 100644 --- a/client/private_cloud_gateway.go +++ b/client/private_cloud_gateway.go @@ -4,8 +4,8 @@ import ( "errors" "fmt" - clientv1 "github.com/spectrocloud/palette-api-go/client/v1" - "github.com/spectrocloud/palette-api-go/models" + clientv1 "github.com/spectrocloud/palette-sdk-go/api/client/v1" + "github.com/spectrocloud/palette-sdk-go/api/models" "github.com/spectrocloud/palette-sdk-go/client/apiutil" ) diff --git a/client/project.go b/client/project.go index 8839e96a..3cb2fa83 100644 --- a/client/project.go +++ b/client/project.go @@ -3,8 +3,8 @@ package client import ( "fmt" - clientv1 "github.com/spectrocloud/palette-api-go/client/v1" - "github.com/spectrocloud/palette-api-go/models" + clientv1 "github.com/spectrocloud/palette-sdk-go/api/client/v1" + "github.com/spectrocloud/palette-sdk-go/api/models" ) // CRUDL operations on projects are all tenant scoped. diff --git a/client/registry.go b/client/registry.go index 68a6a513..44dfd16d 100644 --- a/client/registry.go +++ b/client/registry.go @@ -3,8 +3,8 @@ package client import ( "fmt" - clientv1 "github.com/spectrocloud/palette-api-go/client/v1" - "github.com/spectrocloud/palette-api-go/models" + clientv1 "github.com/spectrocloud/palette-sdk-go/api/client/v1" + "github.com/spectrocloud/palette-sdk-go/api/models" "github.com/spectrocloud/palette-sdk-go/client/apiutil" ) diff --git a/client/role.go b/client/role.go index e13199e4..2bd0a13f 100644 --- a/client/role.go +++ b/client/role.go @@ -3,8 +3,8 @@ package client import ( "fmt" - clientv1 "github.com/spectrocloud/palette-api-go/client/v1" - "github.com/spectrocloud/palette-api-go/models" + clientv1 "github.com/spectrocloud/palette-sdk-go/api/client/v1" + "github.com/spectrocloud/palette-sdk-go/api/models" ) // CRUDL operations on roles are all tenant scoped. diff --git a/client/search.go b/client/search.go index f51337e1..f787f070 100644 --- a/client/search.go +++ b/client/search.go @@ -1,7 +1,7 @@ package client import ( - "github.com/spectrocloud/palette-api-go/models" + "github.com/spectrocloud/palette-sdk-go/api/models" ) func and() *models.V1SearchFilterConjunctionOperator { diff --git a/client/ssh_key.go b/client/ssh_key.go index cdffb2a9..8987fb8b 100644 --- a/client/ssh_key.go +++ b/client/ssh_key.go @@ -3,8 +3,8 @@ package client import ( "fmt" - clientv1 "github.com/spectrocloud/palette-api-go/client/v1" - "github.com/spectrocloud/palette-api-go/models" + clientv1 "github.com/spectrocloud/palette-sdk-go/api/client/v1" + "github.com/spectrocloud/palette-sdk-go/api/models" ) // CreateSSHKey creates a new SSH key. diff --git a/client/team.go b/client/team.go index 41c16125..512a9ae5 100644 --- a/client/team.go +++ b/client/team.go @@ -1,8 +1,8 @@ package client import ( - clientv1 "github.com/spectrocloud/palette-api-go/client/v1" - "github.com/spectrocloud/palette-api-go/models" + clientv1 "github.com/spectrocloud/palette-sdk-go/api/client/v1" + "github.com/spectrocloud/palette-sdk-go/api/models" ) // CRUDL operations on teams are all tenant scoped. diff --git a/client/user.go b/client/user.go index d61e9810..89c1f66d 100644 --- a/client/user.go +++ b/client/user.go @@ -3,8 +3,8 @@ package client import ( "fmt" - clientv1 "github.com/spectrocloud/palette-api-go/client/v1" - "github.com/spectrocloud/palette-api-go/models" + clientv1 "github.com/spectrocloud/palette-sdk-go/api/client/v1" + "github.com/spectrocloud/palette-sdk-go/api/models" "github.com/spectrocloud/palette-sdk-go/client/apiutil" ) diff --git a/client/virtual_machine.go b/client/virtual_machine.go index 67a90c0d..03ba8f95 100644 --- a/client/virtual_machine.go +++ b/client/virtual_machine.go @@ -4,8 +4,8 @@ import ( "errors" "fmt" - clientv1 "github.com/spectrocloud/palette-api-go/client/v1" - "github.com/spectrocloud/palette-api-go/models" + clientv1 "github.com/spectrocloud/palette-sdk-go/api/client/v1" + "github.com/spectrocloud/palette-sdk-go/api/models" ) // CreateVirtualMachine creates a new virtual machine. diff --git a/client/virtual_machine_clone.go b/client/virtual_machine_clone.go index b4a15193..b0624c33 100644 --- a/client/virtual_machine_clone.go +++ b/client/virtual_machine_clone.go @@ -3,8 +3,8 @@ package client import ( "errors" - clientv1 "github.com/spectrocloud/palette-api-go/client/v1" - "github.com/spectrocloud/palette-api-go/models" + clientv1 "github.com/spectrocloud/palette-sdk-go/api/client/v1" + "github.com/spectrocloud/palette-sdk-go/api/models" ) // CloneVirtualMachine clones a virtual machine. diff --git a/client/virtual_machine_common.go b/client/virtual_machine_common.go index 9b70ed84..1c3c6588 100644 --- a/client/virtual_machine_common.go +++ b/client/virtual_machine_common.go @@ -1,8 +1,8 @@ package client import ( - clientv1 "github.com/spectrocloud/palette-api-go/client/v1" - "github.com/spectrocloud/palette-api-go/models" + clientv1 "github.com/spectrocloud/palette-sdk-go/api/client/v1" + "github.com/spectrocloud/palette-sdk-go/api/models" ) // IsVMExists checks if a virtual machine exists. diff --git a/client/virtual_machine_lifecycle.go b/client/virtual_machine_lifecycle.go index a26a6a59..6c67ee1e 100644 --- a/client/virtual_machine_lifecycle.go +++ b/client/virtual_machine_lifecycle.go @@ -3,7 +3,7 @@ package client import ( "fmt" - clientv1 "github.com/spectrocloud/palette-api-go/client/v1" + clientv1 "github.com/spectrocloud/palette-sdk-go/api/client/v1" ) // StartVirtualMachine starts a virtual machine. diff --git a/client/virtual_machine_migration.go b/client/virtual_machine_migration.go index ae8b2fa5..45a9035e 100644 --- a/client/virtual_machine_migration.go +++ b/client/virtual_machine_migration.go @@ -3,7 +3,7 @@ package client import ( "fmt" - clientv1 "github.com/spectrocloud/palette-api-go/client/v1" + clientv1 "github.com/spectrocloud/palette-sdk-go/api/client/v1" ) // MigrateVirtualMachineNodeToNode migrates a virtual machine from one node to another. diff --git a/client/workspace.go b/client/workspace.go index fd89d8f4..312e23c9 100644 --- a/client/workspace.go +++ b/client/workspace.go @@ -1,8 +1,8 @@ package client import ( - clientv1 "github.com/spectrocloud/palette-api-go/client/v1" - "github.com/spectrocloud/palette-api-go/models" + clientv1 "github.com/spectrocloud/palette-sdk-go/api/client/v1" + "github.com/spectrocloud/palette-sdk-go/api/models" "github.com/spectrocloud/palette-sdk-go/client/apiutil" ) diff --git a/examples/list_clusters.go b/examples/list_clusters.go index e9074db4..b813a57a 100644 --- a/examples/list_clusters.go +++ b/examples/list_clusters.go @@ -4,7 +4,7 @@ import ( "fmt" "os" - "github.com/spectrocloud/palette-api-go/models" + "github.com/spectrocloud/palette-sdk-go/api/models" "github.com/spectrocloud/palette-sdk-go/client" ) diff --git a/go.mod b/go.mod index b34b03d3..ba96372d 100644 --- a/go.mod +++ b/go.mod @@ -3,28 +3,27 @@ module github.com/spectrocloud/palette-sdk-go go 1.22.5 require ( + github.com/go-errors/errors v1.5.1 + github.com/go-openapi/errors v0.22.0 github.com/go-openapi/runtime v0.28.0 github.com/go-openapi/strfmt v0.23.0 + github.com/go-openapi/swag v0.23.0 + github.com/go-openapi/validate v0.24.0 github.com/pkg/errors v0.9.1 - github.com/spectrocloud/gomi v1.14.0 - github.com/spectrocloud/palette-api-go v0.2.6 + github.com/sirupsen/logrus v1.9.3 github.com/stretchr/testify v1.9.0 ) require ( github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 // indirect github.com/davecgh/go-spew v1.1.1 // indirect - github.com/go-errors/errors v1.5.1 // indirect github.com/go-logr/logr v1.4.2 // indirect github.com/go-logr/stdr v1.2.2 // indirect github.com/go-openapi/analysis v0.23.0 // indirect - github.com/go-openapi/errors v0.22.0 // indirect github.com/go-openapi/jsonpointer v0.21.0 // indirect github.com/go-openapi/jsonreference v0.21.0 // indirect github.com/go-openapi/loads v0.22.0 // indirect github.com/go-openapi/spec v0.21.0 // indirect - github.com/go-openapi/swag v0.23.0 // indirect - github.com/go-openapi/validate v0.24.0 // indirect github.com/google/uuid v1.6.0 // indirect github.com/josharian/intern v1.0.0 // indirect github.com/mailru/easyjson v0.7.7 // indirect @@ -32,7 +31,6 @@ require ( github.com/oklog/ulid v1.3.1 // indirect github.com/opentracing/opentracing-go v1.2.0 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/sirupsen/logrus v1.9.3 // indirect go.mongodb.org/mongo-driver v1.16.0 // indirect go.opentelemetry.io/otel v1.28.0 // indirect go.opentelemetry.io/otel/metric v1.28.0 // indirect @@ -41,5 +39,3 @@ require ( golang.org/x/sys v0.22.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) - -//replace github.com/spectrocloud/palette-api-go => ../palette-api-go diff --git a/go.sum b/go.sum index aeea2317..323d0caa 100644 --- a/go.sum +++ b/go.sum @@ -1,555 +1,68 @@ -cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= -cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= -cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= -cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= -cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= -cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= -cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4= -cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M= -cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= -cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= -cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= -cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= -cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= -cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= -cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= -cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= -cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= -cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= -cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= -cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= -dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= -emperror.dev/errors v0.7.0/go.mod h1:X4dljzQehaz3WfBKc6c7bR+ve2ZsRzbBkFBF+HTcW0M= -github.com/AlecAivazis/survey/v2 v2.0.4/go.mod h1:WYBhg6f0y/fNYUuesWQc0PKbJcEliGcYHB9sNT3Bg74= -github.com/Azure/azure-sdk-for-go v42.0.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= -github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78/go.mod h1:LmzpDX56iTiv29bbRTIsUNlaFfuhWRQBWjQdVyAevI8= -github.com/Azure/go-autorest/autorest v0.9.0/go.mod h1:xyHB1BMZT0cuDHU7I0+g046+BFDTQ8rEZB0s4Yfa6bI= -github.com/Azure/go-autorest/autorest v0.9.3/go.mod h1:GsRuLYvwzLjjjRoWEIyMUaYq8GNUx2nRB378IPt/1p0= -github.com/Azure/go-autorest/autorest v0.10.0/go.mod h1:/FALq9T/kS7b5J5qsQ+RSTUdAmGFqi0vUdVNNx8q630= -github.com/Azure/go-autorest/autorest/adal v0.5.0/go.mod h1:8Z9fGy2MpX0PvDjB1pEgQTmVqjGhiHBW7RJJEciWzS0= -github.com/Azure/go-autorest/autorest/adal v0.8.0/go.mod h1:Z6vX6WXXuyieHAXwMj0S6HY6e6wcHn37qQMBQlvY3lc= -github.com/Azure/go-autorest/autorest/adal v0.8.1/go.mod h1:ZjhuQClTqx435SRJ2iMlOxPYt3d2C/T/7TiQCVZSn3Q= -github.com/Azure/go-autorest/autorest/adal v0.8.2/go.mod h1:ZjhuQClTqx435SRJ2iMlOxPYt3d2C/T/7TiQCVZSn3Q= -github.com/Azure/go-autorest/autorest/azure/auth v0.4.2/go.mod h1:90gmfKdlmKgfjUpnCEpOJzsUEjrWDSLwHIG73tSXddM= -github.com/Azure/go-autorest/autorest/azure/cli v0.3.1/go.mod h1:ZG5p860J94/0kI9mNJVoIoLgXcirM2gF5i2kWloofxw= -github.com/Azure/go-autorest/autorest/date v0.1.0/go.mod h1:plvfp3oPSKwf2DNjlBjWF/7vwR+cUD/ELuzDCXwHUVA= -github.com/Azure/go-autorest/autorest/date v0.2.0/go.mod h1:vcORJHLJEh643/Ioh9+vPmf1Ij9AEBM5FuBIXLmIy0g= -github.com/Azure/go-autorest/autorest/mocks v0.1.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= -github.com/Azure/go-autorest/autorest/mocks v0.2.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= -github.com/Azure/go-autorest/autorest/mocks v0.3.0/go.mod h1:a8FDP3DYzQ4RYfVAxAN3SVSiiO77gL2j2ronKKP0syM= -github.com/Azure/go-autorest/autorest/to v0.3.0/go.mod h1:MgwOyqaIuKdG4TL/2ywSsIWKAfJfgHDo8ObuUk3t5sA= -github.com/Azure/go-autorest/autorest/validation v0.2.0/go.mod h1:3EEqHnBxQGHXRYq3HT1WyXAvT7LLY3tl70hw6tQIbjI= -github.com/Azure/go-autorest/logger v0.1.0/go.mod h1:oExouG+K6PryycPJfVSxi/koC6LSNgds39diKLz7Vrc= -github.com/Azure/go-autorest/tracing v0.5.0/go.mod h1:r/s2XiOKccPW3HrqB+W0TQzfbtp2fGCgRFtBroKn4Dk= -github.com/BurntSushi/toml v0.3.0/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= -github.com/MakeNowJust/heredoc v1.0.0/go.mod h1:mG5amYoWBHf8vpLOuehzbGGw0EHxpZZ6lCpQ4fNJ8LE= -github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ= -github.com/Netflix/go-expect v0.0.0-20180615182759-c93bf25de8e8/go.mod h1:oX5x61PbNXchhh0oikYAH+4Pcfw5LKv21+Jnpr6r6Pc= -github.com/Netflix/go-expect v0.0.0-20180928190340-9d1f4485533b/go.mod h1:oX5x61PbNXchhh0oikYAH+4Pcfw5LKv21+Jnpr6r6Pc= -github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= -github.com/PuerkitoBio/purell v1.0.0/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= -github.com/PuerkitoBio/purell v1.1.0/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= -github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= -github.com/PuerkitoBio/urlesc v0.0.0-20160726150825-5bd2802263f2/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= -github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= -github.com/agnivade/levenshtein v1.0.1/go.mod h1:CURSv5d9Uaml+FovSIICkLbAUZ9S4RqaHDIsdSBg7lM= -github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= -github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= -github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= -github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= -github.com/alessio/shellescape v0.0.0-20190409004728-b115ca0f9053/go.mod h1:xW8sBma2LE3QxFSzCnH9qe6gAE2yO9GvQaWwX89HxbE= -github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883/go.mod h1:rCTlJbsFo29Kk6CurOXKm700vrz8f0KW0JNfpkRJY/8= -github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= -github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= -github.com/asaskevich/govalidator v0.0.0-20180720115003-f9ffefc3facf/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= -github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 h1:DklsrG3dyBCFEj5IhUbnKptjxatkF07cF2ak3yi77so= github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2/go.mod h1:WaHUgvxTVq04UNunO+XhnAqY/wQc+bxr74GqbsZ/Jqw= -github.com/aws/aws-sdk-go v1.34.16/go.mod h1:5zCpMtNQVjRREroY7sYe8lOMRSxkhG6MZveU8YkpAk0= -github.com/awslabs/goformation/v4 v4.11.0/go.mod h1:GcJULxCJfloT+3pbqCluXftdEK2AD/UqpS3hkaaBntg= -github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= -github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= -github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= -github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= -github.com/bifurcation/mint v0.0.0-20180715133206-93c51c6ce115/go.mod h1:zVt7zX3K/aDCk9Tj+VM7YymsX66ERvzCJzw8rFCX2JU= -github.com/blang/semver v3.5.0+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= -github.com/blang/semver v3.5.1+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= -github.com/briandowns/spinner v0.0.0-20181029155426-195c31b675a7/go.mod h1:hw/JEQBIE+c/BLI4aKM8UU8v+ZqrD3h7HC27kKt8JQU= -github.com/caddyserver/caddy v1.0.3/go.mod h1:G+ouvOY32gENkJC+jhgl62TyhvqEsFaDiZ4uw0RzP1E= -github.com/cenkalti/backoff v2.1.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= -github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= -github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= -github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/cheekybits/genny v0.0.0-20170328200008-9127e812e1e9/go.mod h1:+tQajlRqAUrPI7DOSpB0XAqZYtQakVtB7wXkRAgjxjQ= -github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= -github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= -github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= -github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= -github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= -github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= -github.com/coredns/corefile-migration v1.0.7/go.mod h1:OFwBp/Wc9dJt5cAZzHWMNhK1r5L0p0jDwIBc6j8NC8E= -github.com/coredns/corefile-migration v1.0.10/go.mod h1:RMy/mXdeDlYwzt0vdMEJvT2hGJ2I86/eO0UdXmH9XNI= -github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= -github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= -github.com/coreos/etcd v3.3.13+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= -github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk= -github.com/coreos/go-oidc v2.1.0+incompatible/go.mod h1:CgnwVTmzoESiwO9qyAFEMiHoZ1nMCKZlZ9V6mm3/LKc= -github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= -github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= -github.com/coreos/go-systemd v0.0.0-20180511133405-39ca1b05acc7/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= -github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= -github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= -github.com/coreos/pkg v0.0.0-20180108230652-97fdf19511ea/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= -github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= -github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= -github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= -github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= -github.com/davecgh/go-spew v0.0.0-20151105211317-5215b55f46b2/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-xdr v0.0.0-20161123171359-e6a2ba005892/go.mod h1:CTDl0pzVzE5DEzZhPfvhY/9sPFMQIxaJ9VAMs9AagrE= -github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= -github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= -github.com/dimchansky/utfbom v1.1.0/go.mod h1:rO41eb7gLfo8SF1jd9F8HplJm1Fewwi4mQvIirEdv+8= -github.com/docker/distribution v2.7.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= -github.com/docker/docker v0.7.3-0.20190327010347-be7ac8be2ae0/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= -github.com/docker/go-units v0.3.3/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= -github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= -github.com/docker/spdystream v0.0.0-20160310174837-449fdfce4d96/go.mod h1:Qh8CwZgvJUkLughtfhJv5dyTYa91l1fOUCrgjqmcifM= -github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE= -github.com/drone/envsubst v1.0.3-0.20200709223903-efdb65b94e5a/go.mod h1:N2jZmlMufstn1KEqvbHjw40h1KyTmnVzHcSc9bFiJ2g= -github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= -github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= -github.com/elazarl/goproxy v0.0.0-20170405201442-c4fc26588b6e/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc= -github.com/emicklei/go-restful v0.0.0-20170410110728-ff4f55a20633/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= -github.com/emicklei/go-restful v2.9.5+incompatible/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= -github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= -github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= -github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= -github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/evanphx/json-patch v4.2.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= -github.com/evanphx/json-patch v4.5.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= -github.com/evanphx/json-patch v4.9.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= -github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= -github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568/go.mod h1:xEzjJPgXI435gkrCt3MPfRiAkVrwSbHsst4LCFVfpJc= -github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= -github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= -github.com/ghodss/yaml v0.0.0-20150909031657-73d445a93680/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= -github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= -github.com/globalsign/mgo v0.0.0-20180905125535-1ca0a4f7cbcb/go.mod h1:xkRDCp4j0OGD1HRkm4kmhM+pmpv3AKq5SU7GMg4oO/Q= -github.com/globalsign/mgo v0.0.0-20181015135952-eeefdecb41b8/go.mod h1:xkRDCp4j0OGD1HRkm4kmhM+pmpv3AKq5SU7GMg4oO/Q= -github.com/go-acme/lego v2.5.0+incompatible/go.mod h1:yzMNe9CasVUhkquNvti5nAtPmG94USbYxYrZfTkIn0M= github.com/go-errors/errors v1.5.1 h1:ZwEMSLRCapFLflTpT7NKaAc7ukJ8ZPEjzlxt8rPN8bk= github.com/go-errors/errors v1.5.1/go.mod h1:sIVyrIiJhuEF+Pj9Ebtd6P/rEYROXFi3BopGUQ5a5Og= -github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= -github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= -github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= -github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= -github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= -github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= -github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= -github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7sIas= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY= github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= -github.com/go-logr/zapr v0.1.0/go.mod h1:tabnROwaDl0UNxkVeFRbY8bwB37GwRv0P8lg6aAiEnk= -github.com/go-openapi/analysis v0.0.0-20180825180245-b006789cd277/go.mod h1:k70tL6pCuVxPJOHXQ+wIac1FUrvNkHolPie/cLEU6hI= -github.com/go-openapi/analysis v0.17.0/go.mod h1:IowGgpVeD0vNm45So8nr+IcQ3pxVtpRoBWb8PVZO0ik= -github.com/go-openapi/analysis v0.18.0/go.mod h1:IowGgpVeD0vNm45So8nr+IcQ3pxVtpRoBWb8PVZO0ik= -github.com/go-openapi/analysis v0.19.2/go.mod h1:3P1osvZa9jKjb8ed2TPng3f0i/UY9snX6gxi44djMjk= -github.com/go-openapi/analysis v0.19.5/go.mod h1:hkEAkxagaIvIP7VTn8ygJNkd4kAYON2rCu0v0ObL0AU= github.com/go-openapi/analysis v0.23.0 h1:aGday7OWupfMs+LbmLZG4k0MYXIANxcuBTYUC03zFCU= github.com/go-openapi/analysis v0.23.0/go.mod h1:9mz9ZWaSlV8TvjQHLl2mUW2PbZtemkE8yA5v22ohupo= -github.com/go-openapi/errors v0.17.0/go.mod h1:LcZQpmvG4wyF5j4IhA73wkLFQg+QJXOQHVjmcZxhka0= -github.com/go-openapi/errors v0.18.0/go.mod h1:LcZQpmvG4wyF5j4IhA73wkLFQg+QJXOQHVjmcZxhka0= -github.com/go-openapi/errors v0.19.2/go.mod h1:qX0BLWsyaKfvhluLejVpVNwNRdXZhEbTA4kxxpKBC94= github.com/go-openapi/errors v0.22.0 h1:c4xY/OLxUBSTiepAg3j/MHuAv5mJhnf53LLMWFB+u/w= github.com/go-openapi/errors v0.22.0/go.mod h1:J3DmZScxCDufmIMsdOuDHxJbdOGC0xtUynjIx092vXE= -github.com/go-openapi/jsonpointer v0.0.0-20160704185906-46af16f9f7b1/go.mod h1:+35s3my2LFTysnkMfxsJBAMHj/DoqoB9knIWoYG/Vk0= -github.com/go-openapi/jsonpointer v0.17.0/go.mod h1:cOnomiV+CVVwFLk0A/MExoFMjwdsUdVpsRhURCKh+3M= -github.com/go-openapi/jsonpointer v0.18.0/go.mod h1:cOnomiV+CVVwFLk0A/MExoFMjwdsUdVpsRhURCKh+3M= -github.com/go-openapi/jsonpointer v0.19.2/go.mod h1:3akKfEdA7DF1sugOqz1dVQHBcuDBPKZGEoHC/NkiQRg= -github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= github.com/go-openapi/jsonpointer v0.21.0 h1:YgdVicSA9vH5RiHs9TZW5oyafXZFc6+2Vc1rr/O9oNQ= github.com/go-openapi/jsonpointer v0.21.0/go.mod h1:IUyH9l/+uyhIYQ/PXVA41Rexl+kOkAPDdXEYns6fzUY= -github.com/go-openapi/jsonreference v0.0.0-20160704190145-13c6e3589ad9/go.mod h1:W3Z9FmVs9qj+KR4zFKmDPGiLdk1D9Rlm7cyMvf57TTg= -github.com/go-openapi/jsonreference v0.17.0/go.mod h1:g4xxGn04lDIRh0GJb5QlpE3HfopLOL6uZrK/VgnsK9I= -github.com/go-openapi/jsonreference v0.18.0/go.mod h1:g4xxGn04lDIRh0GJb5QlpE3HfopLOL6uZrK/VgnsK9I= -github.com/go-openapi/jsonreference v0.19.2/go.mod h1:jMjeRr2HHw6nAVajTXJ4eiUwohSTlpa0o73RUL1owJc= -github.com/go-openapi/jsonreference v0.19.3/go.mod h1:rjx6GuL8TTa9VaixXglHmQmIL98+wF9xc8zWvFonSJ8= github.com/go-openapi/jsonreference v0.21.0 h1:Rs+Y7hSXT83Jacb7kFyjn4ijOuVGSvOdF2+tg1TRrwQ= github.com/go-openapi/jsonreference v0.21.0/go.mod h1:LmZmgsrTkVg9LG4EaHeY8cBDslNPMo06cago5JNLkm4= -github.com/go-openapi/loads v0.17.0/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf7AC+0+OOU= -github.com/go-openapi/loads v0.18.0/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf7AC+0+OOU= -github.com/go-openapi/loads v0.19.0/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf7AC+0+OOU= -github.com/go-openapi/loads v0.19.2/go.mod h1:QAskZPMX5V0C2gvfkGZzJlINuP7Hx/4+ix5jWFxsNPs= -github.com/go-openapi/loads v0.19.4/go.mod h1:zZVHonKd8DXyxyw4yfnVjPzBjIQcLt0CCsn0N0ZrQsk= github.com/go-openapi/loads v0.22.0 h1:ECPGd4jX1U6NApCGG1We+uEozOAvXvJSF4nnwHZ8Aco= github.com/go-openapi/loads v0.22.0/go.mod h1:yLsaTCS92mnSAZX5WWoxszLj0u+Ojl+Zs5Stn1oF+rs= -github.com/go-openapi/runtime v0.0.0-20180920151709-4f900dc2ade9/go.mod h1:6v9a6LTXWQCdL8k1AO3cvqx5OtZY/Y9wKTgaoP6YRfA= -github.com/go-openapi/runtime v0.19.0/go.mod h1:OwNfisksmmaZse4+gpV3Ne9AyMOlP1lt4sK4FXt0O64= -github.com/go-openapi/runtime v0.19.4/go.mod h1:X277bwSUBxVlCYR3r7xgZZGKVvBd/29gLDlFGtJ8NL4= github.com/go-openapi/runtime v0.28.0 h1:gpPPmWSNGo214l6n8hzdXYhPuJcGtziTOgUpvsFWGIQ= github.com/go-openapi/runtime v0.28.0/go.mod h1:QN7OzcS+XuYmkQLw05akXk0jRH/eZ3kb18+1KwW9gyc= -github.com/go-openapi/spec v0.0.0-20160808142527-6aced65f8501/go.mod h1:J8+jY1nAiCcj+friV/PDoE1/3eeccG9LYBs0tYvLOWc= -github.com/go-openapi/spec v0.17.0/go.mod h1:XkF/MOi14NmjsfZ8VtAKf8pIlbZzyoTvZsdfssdxcBI= -github.com/go-openapi/spec v0.18.0/go.mod h1:XkF/MOi14NmjsfZ8VtAKf8pIlbZzyoTvZsdfssdxcBI= -github.com/go-openapi/spec v0.19.2/go.mod h1:sCxk3jxKgioEJikev4fgkNmwS+3kuYdJtcsZsD5zxMY= -github.com/go-openapi/spec v0.19.3/go.mod h1:FpwSN1ksY1eteniUU7X0N/BgJ7a4WvBFVA8Lj9mJglo= github.com/go-openapi/spec v0.21.0 h1:LTVzPc3p/RzRnkQqLRndbAzjY0d0BCL72A6j3CdL9ZY= github.com/go-openapi/spec v0.21.0/go.mod h1:78u6VdPw81XU44qEWGhtr982gJ5BWg2c0I5XwVMotYk= -github.com/go-openapi/strfmt v0.17.0/go.mod h1:P82hnJI0CXkErkXi8IKjPbNBM6lV6+5pLP5l494TcyU= -github.com/go-openapi/strfmt v0.18.0/go.mod h1:P82hnJI0CXkErkXi8IKjPbNBM6lV6+5pLP5l494TcyU= -github.com/go-openapi/strfmt v0.19.0/go.mod h1:+uW+93UVvGGq2qGaZxdDeJqSAqBqBdl+ZPMF/cC8nDY= -github.com/go-openapi/strfmt v0.19.3/go.mod h1:0yX7dbo8mKIvc3XSKp7MNfxw4JytCfCD6+bY1AVL9LU= github.com/go-openapi/strfmt v0.23.0 h1:nlUS6BCqcnAk0pyhi9Y+kdDVZdZMHfEKQiS4HaMgO/c= github.com/go-openapi/strfmt v0.23.0/go.mod h1:NrtIpfKtWIygRkKVsxh7XQMDQW5HKQl6S5ik2elW+K4= -github.com/go-openapi/swag v0.0.0-20160704191624-1d0bd113de87/go.mod h1:DXUve3Dpr1UfpPtxFw+EFuQ41HhCWZfha5jSVRG7C7I= -github.com/go-openapi/swag v0.17.0/go.mod h1:AByQ+nYG6gQg71GINrmuDXCPWdL640yX49/kXLo40Tg= -github.com/go-openapi/swag v0.18.0/go.mod h1:AByQ+nYG6gQg71GINrmuDXCPWdL640yX49/kXLo40Tg= -github.com/go-openapi/swag v0.19.2/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= -github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= github.com/go-openapi/swag v0.23.0 h1:vsEVJDUo2hPJ2tu0/Xc+4noaxyEffXNIs3cOULZ+GrE= github.com/go-openapi/swag v0.23.0/go.mod h1:esZ8ITTYEsH1V2trKHjAN8Ai7xHb8RV+YSZ577vPjgQ= -github.com/go-openapi/validate v0.18.0/go.mod h1:Uh4HdOzKt19xGIGm1qHf/ofbX1YQ4Y+MYsct2VUrAJ4= -github.com/go-openapi/validate v0.19.2/go.mod h1:1tRCw7m3jtI8eNWEEliiAqUIcBztB2KDnRCRMUi7GTA= -github.com/go-openapi/validate v0.19.5/go.mod h1:8DJv2CVJQ6kGNpFW6eV9N3JviE1C85nY1c2z52x1Gk4= github.com/go-openapi/validate v0.24.0 h1:LdfDKwNbpB6Vn40xhTdNZAnfLECL81w+VX3BumrGD58= github.com/go-openapi/validate v0.24.0/go.mod h1:iyeX1sEufmv3nPbBdX3ieNviWnOZaJ1+zquzJEf2BAQ= -github.com/go-sql-driver/mysql v1.5.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= -github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= -github.com/gobuffalo/flect v0.2.2/go.mod h1:vmkQwuZYhN5Pc4ljYQZzP+1sq+NEkK+lh20jmEmX3jc= -github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= -github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= -github.com/gogo/protobuf v1.2.2-0.20190723190241-65acae22fc9d/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= -github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= -github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= -github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/protobuf v0.0.0-20161109072736-4bd1920723d7/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= -github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= -github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= -github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= -github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= -github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= -github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= -github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= -github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= -github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= -github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= -github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= -github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -github.com/google/go-github v17.0.0+incompatible/go.mod h1:zLgOLi98H3fifZn+44m+umXrS52loVEgC2AApnigrVQ= -github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck= -github.com/google/goexpect v0.0.0-20200703111054-623d5ca06f56/go.mod h1:qtE5aAEkt0vOSA84DBh8aJsz6riL8ONfqfULY7lBjqc= -github.com/google/gofuzz v0.0.0-20161122191042-44d81051d367/go.mod h1:HP5RmnzzSNb993RKQDq4+1A4ia9nllfqcQFTQJedwGI= -github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/google/goterm v0.0.0-20190703233501-fc88cf888a3f/go.mod h1:nOFQdrUlIlx6M6ODdSpBj1NVA+VgLC6kmw60mkw34H4= -github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= -github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= -github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= -github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= -github.com/google/uuid v0.0.0-20170306145142-6a5e28554805/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= -github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= -github.com/googleapis/gnostic v0.0.0-20170729233727-0c5108395e2d/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY= -github.com/googleapis/gnostic v0.3.1/go.mod h1:on+2t9HRStVgn95RSsFWFz+6Q0Snyqv1awfrALZdbtU= -github.com/gophercloud/gophercloud v0.1.0/go.mod h1:vxM41WHh5uqHVBMZHzuwNOHh8XEoIEcSTewFxm1c5g8= -github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= -github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= -github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= -github.com/gorilla/websocket v1.4.1/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= -github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= -github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= -github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= -github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= -github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= -github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= -github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4= -github.com/hashicorp/golang-lru v0.0.0-20180201235237-0fb14efe8c47/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= -github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= -github.com/hinshun/vt10x v0.0.0-20180616224451-1954e6464174/go.mod h1:DqJ97dSdRW1W22yXSB90986pcOyQ7r45iio1KN2ez1A= -github.com/hinshun/vt10x v0.0.0-20180809195222-d55458df857c/go.mod h1:DqJ97dSdRW1W22yXSB90986pcOyQ7r45iio1KN2ez1A= -github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= -github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= -github.com/imdario/mergo v0.3.5/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= -github.com/imdario/mergo v0.3.6/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= -github.com/imdario/mergo v0.3.8/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= -github.com/imdario/mergo v0.3.9/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= -github.com/inconshreveable/go-update v0.0.0-20160112193335-8152e7eb6ccf/go.mod h1:hyb9oH7vZsitZCiBt0ZvifOrB+qc8PS5IiilCIb87rg= -github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= -github.com/jimstudt/http-authentication v0.0.0-20140401203705-3eca13d6893a/go.mod h1:wK6yTYYcgjHE1Z1QtXACPDjcFJyBskHEdagmnq3vsP8= -github.com/jmespath/go-jmespath v0.3.0/go.mod h1:9QtRXoHjLGCJ5IBSaohpXITPlowMeeYCZ7fLUTSywik= -github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= -github.com/json-iterator/go v0.0.0-20180612202835-f2b4162afba3/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= -github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= -github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/json-iterator/go v1.1.8/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= -github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= -github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= -github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= -github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51/go.mod h1:CzGEWj7cYgsdH8dAjBGEr58BoE7ScuLd+fwFZ44+/x8= -github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= -github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= -github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= -github.com/klauspost/cpuid v1.2.0/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek= -github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= -github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= -github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= -github.com/kr/pty v1.1.4/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= -github.com/kr/pty v1.1.5/go.mod h1:9r2w37qlBe7rQ6e1fg1S/9xpWHSnaqNdHD3WcMdbPDA= -github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= -github.com/kylelemons/godebug v0.0.0-20170820004349-d65d576e9348/go.mod h1:B69LEHPfb2qLo0BaaOLcbitczOKLWTsrBG9LczfCD4k= -github.com/lithammer/dedent v1.1.0/go.mod h1:jrXYCQtgg0nJiN+StA2KgR7w6CiQNv9Fd/Z9BP0jIOc= -github.com/lucas-clemente/aes12 v0.0.0-20171027163421-cd47fb39b79f/go.mod h1:JpH9J1c9oX6otFSgdUHwUBUizmKlrMjxWnIAjff4m04= -github.com/lucas-clemente/quic-clients v0.1.0/go.mod h1:y5xVIEoObKqULIKivu+gD/LU90pL73bTdtQjPBvtCBk= -github.com/lucas-clemente/quic-go v0.10.2/go.mod h1:hvaRS9IHjFLMq76puFJeWNfmn+H70QZ/CXoxqw9bzao= -github.com/lucas-clemente/quic-go-certificates v0.0.0-20160823095156-d2f86524cced/go.mod h1:NCcRLrOTZbzhZvixZLlERbJtDtYsmMw8Jc4vS8Z0g58= -github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= -github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= -github.com/mailru/easyjson v0.0.0-20160728113105-d5b7844b561a/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= -github.com/mailru/easyjson v0.0.0-20180823135443-60711f1a8329/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= -github.com/mailru/easyjson v0.0.0-20190312143242-1de009706dbe/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= -github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= -github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= -github.com/mailru/easyjson v0.7.0/go.mod h1:KAzv3t3aY1NaHWoQz1+4F1ccyAH66Jk7yos7ldAVICs= github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0= github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= -github.com/marten-seemann/qtls v0.2.3/go.mod h1:xzjG7avBwGGbdZ8dTGxlBnLArsVKLvwmjgmPuiQEcYk= -github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= -github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= -github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= -github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= -github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= -github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= -github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= -github.com/metal3-io/ip-address-manager v0.0.5-0.20201106071001-0154c6a93a65/go.mod h1:I/7lYFfNkKCrMjdQGN2J6JNifKF7uVZMujyvAYt/B5A= -github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b/go.mod h1:01TrycV0kFyexm33Z7vhZRXopbI8J3TDReVlkTgMUxE= -github.com/mholt/certmagic v0.6.2-0.20190624175158-6a42ef9fe8c2/go.mod h1:g4cOPxcjV0oFq3qwpjSA30LReKD8AoIfwAY9VvG35NY= -github.com/miekg/dns v1.1.3/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= -github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= -github.com/mitchellh/go-wordwrap v1.0.0/go.mod h1:ZXFpozHsX6DPmq2I0TCekCxypsnAUbP2oI0UX1GXzOo= -github.com/mitchellh/mapstructure v1.0.0/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= -github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= -github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/reflect2 v0.0.0-20180320133207-05fbef0ca5da/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= -github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= -github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= -github.com/munnerz/goautoneg v0.0.0-20120707110453-a547fc61f48d/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= -github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= -github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= -github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw= -github.com/naoina/go-stringutil v0.1.0/go.mod h1:XJ2SJL9jCtBh+P9q5btrd/Ylo8XwT/h1USek5+NqSA0= -github.com/naoina/toml v0.1.1/go.mod h1:NBIhNtsFMo3G2szEBne+bO4gS192HuIYRqfvOWb4i1E= -github.com/nats-io/cliprompts/v2 v2.0.0-20191226174129-372d79b36768/go.mod h1:oweZn7AeaVJYKlNHfCIhznJVsdySLSng55vfuINE/d0= -github.com/nats-io/jwt v0.2.6/go.mod h1:mQxQ0uHQ9FhEVPIcTSKwx2lqZEpXWWcCgA7R6NrWvvY= -github.com/nats-io/jwt v0.3.0/go.mod h1:fRYCDE99xlTsqUzISS1Bi75UBJ6ljOJQOAAu5VglpSg= -github.com/nats-io/jwt v0.3.2/go.mod h1:/euKqTS1ZD+zzjYrY7pseZrTtWQSjujC7xjPc8wL6eU= -github.com/nats-io/nats-server/v2 v2.0.1-0.20190625001713-2db76bde3329/go.mod h1:RyVdsHHvY4B6c9pWG+uRLpZ0h0XsqiuKp2XCTurP5LI= -github.com/nats-io/nats.go v1.8.1/go.mod h1:BrFz9vVn0fU3AcH9Vn4Kd7W0NpJ651tD5omQ3M8LwxM= -github.com/nats-io/nats.go v1.9.1/go.mod h1:ZjDU1L/7fJ09jvUSRVBR2e7+RnLiiIQyqyzEE/Zbp4w= -github.com/nats-io/nkeys v0.0.2/go.mod h1:dab7URMsZm6Z/jp9Z5UGa87Uutgc2mVpXLC4B7TDb/4= -github.com/nats-io/nkeys v0.1.0/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= -github.com/nats-io/nkeys v0.1.3/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= -github.com/nats-io/nsc v0.0.0-20200214185329-116bfd8472cc/go.mod h1:kBPhRctX+5Lcp850xhCo0j5O1oK7ugklfXFqLDLIVbg= -github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c= -github.com/nicksnyder/go-i18n/v2 v2.0.2/go.mod h1:JXS4+OKhbcwDoVTEj0sLFWL1vOwec2g/YBAxZ9owJqY= -github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= github.com/oklog/ulid v1.3.1 h1:EGfNDEx6MqHz8B3uNV6QAib1UR2Lm97sHi3ocA6ESJ4= github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= -github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= -github.com/onsi/ginkgo v0.0.0-20170829012221-11459a886d9c/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.5.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.8.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.10.1/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.11.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.12.0/go.mod h1:oUhWkIvk5aDxtKvDDuw8gItl8pKl42LzjC9KZE0HfGg= -github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= -github.com/onsi/ginkgo v1.12.2/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= -github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= -github.com/onsi/gomega v1.2.0/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= -github.com/onsi/gomega v1.4.2/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= -github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= -github.com/onsi/gomega v1.5.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= -github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= -github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= -github.com/onsi/gomega v1.8.1/go.mod h1:Ho0h+IUsWyvy1OpqCwxlQ/21gkhVunqlU8fDGcoTdcA= -github.com/onsi/gomega v1.9.0/go.mod h1:Ho0h+IUsWyvy1OpqCwxlQ/21gkhVunqlU8fDGcoTdcA= -github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= -github.com/opencontainers/go-digest v1.0.0-rc1/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= -github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= github.com/opentracing/opentracing-go v1.2.0 h1:uEJPy/1a5RIPAJ0Ov+OIO8OxWu77jEv+1B0VhjKrZUs= github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc= -github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= -github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= -github.com/pelletier/go-toml v1.6.0/go.mod h1:5N711Q9dKgbdkxHL+MEfF31hpT7l0S0s/t2kKREewys= -github.com/pelletier/go-toml v1.7.0/go.mod h1:vwGMzjaWMwyfHwgIBhI2YUM4fB6nL6lVAvS1LBMMhTE= -github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= -github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/errors v0.9.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pmezard/go-difflib v0.0.0-20151028094244-d8ed2627bdf0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/pquerna/cachecontrol v0.0.0-20171018203845-0dec1b30a021/go.mod h1:prYjPmNq4d1NPVmpShWobRqXY3q7Vp+80DqgxxUrUIA= -github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= -github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDft0ttaMvbicHlPoso= -github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= -github.com/prometheus/client_golang v1.5.0/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU= -github.com/prometheus/client_golang v1.5.1/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU= -github.com/prometheus/client_golang v1.6.0/go.mod h1:ZLOG9ck3JLRdB5MgO8f+lLTe83AXG6ro35rLTxvnIl4= -github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= -github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= -github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= -github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= -github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4= -github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= -github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= -github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= -github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= -github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= -github.com/prometheus/procfs v0.0.11/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= -github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= -github.com/remyoudompheng/bigfft v0.0.0-20170806203942-52369c62f446/go.mod h1:uYEyJGbgTkfkS4+E/PavXkNJcbFIpEtjt2B0KDQ5+9M= -github.com/rhysd/go-github-selfupdate v1.1.0/go.mod h1:jbfShZ+Nl3IHUgr77kwQjObcWf1z961UAoD6p5LrPBU= -github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= -github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M= github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA= -github.com/russross/blackfriday v0.0.0-20170610170232-067529f716f4/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= -github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= -github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= -github.com/sanathkr/go-yaml v0.0.0-20170819195128-ed9d249f429b/go.mod h1:8458kAagoME2+LN5//WxE71ysZ3B7r22fdgb7qVmXSY= -github.com/sanathkr/yaml v0.0.0-20170819201035-0056894fa522/go.mod h1:tQTYKOQgxoH3v6dEmdHiz4JG+nbxWwM5fgPQUpSZqVQ= -github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= -github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= -github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= -github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= -github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= -github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= -github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= -github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= -github.com/spectrocloud/gomi v1.14.0 h1:XwOqPssfX1D1tRr1EzUgRULrdncubZG1O/zp/7DuSyU= -github.com/spectrocloud/gomi v1.14.0/go.mod h1:rPAwipFWzjYkTfx44KmQazP1NR2cnHe7HSFZkc63mf4= -github.com/spectrocloud/palette-api-go v0.2.6 h1:TWkNqrAJqrJMdQSM+4bk0oHuxQ2J4FEtcUgZhpJ4Tu4= -github.com/spectrocloud/palette-api-go v0.2.6/go.mod h1:eVUuGUStbOI/gvWluNJzVcCy8vnRye3MqpWDlr94ui8= -github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= -github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= -github.com/spf13/cast v1.2.0/go.mod h1:r2rcYCSwa1IExKTDiTfzaxqT2FNHs8hODu4LnUfgKEg= -github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= -github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= -github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU= -github.com/spf13/cobra v0.0.6/go.mod h1:/6GTrnGXV9HjY+aR4k0oJ5tcvakLuG6EuKReYlHNrgE= -github.com/spf13/cobra v1.0.0/go.mod h1:/6GTrnGXV9HjY+aR4k0oJ5tcvakLuG6EuKReYlHNrgE= -github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= -github.com/spf13/pflag v0.0.0-20170130214245-9ff6c6923cff/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= -github.com/spf13/pflag v1.0.1/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= -github.com/spf13/pflag v1.0.2/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= -github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= -github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= -github.com/spf13/viper v1.2.1/go.mod h1:P4AexN0a+C9tGAnUFNwDMYYZv3pjFuvmeiMyKRaNVlI= -github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s= -github.com/spf13/viper v1.4.0/go.mod h1:PTJ7Z/lr49W6bUbkmS1V3by4uWynFiR9p7+dSq/yZzE= -github.com/spf13/viper v1.6.2/go.mod h1:t3iDnF5Jlj76alVNuyFBk5oUMCvsrkbvZK0WQdfDi5k= -github.com/spf13/viper v1.6.3/go.mod h1:jUMtyi0/lB5yZH/FjyGAoH7IMNrIhlBf6pXZmbMDvzw= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= -github.com/stretchr/testify v0.0.0-20151208002404-e3a8ff8ce365/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= -github.com/stretchr/testify v1.2.1/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= -github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= -github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= -github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= -github.com/tcnksm/go-gitconfig v0.1.2/go.mod h1:/8EhP4H7oJZdIPyT+/UIsG87kTzrzM4UsLGSItWYCpE= -github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= -github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= -github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= -github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc= -github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= -github.com/ulikunitz/xz v0.5.5/go.mod h1:2bypXElzHzzJZwzH67Y6wb67pO62Rzfn7BSiF4ABRW8= -github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= -github.com/vektah/gqlparser v1.1.2/go.mod h1:1ycwN7Ij5njmMkPPAOaRFY4rET2Enx7IkVv3vaXspKw= -github.com/vmware/govmomi v0.23.1/go.mod h1:Y+Wq4lst78L85Ge/F8+ORXIWiKYqaro1vhAulACy9Lc= -github.com/vmware/vmw-guestinfo v0.0.0-20170707015358-25eff159a728/go.mod h1:x9oS4Wk2s2u4tS29nEaDLdzvuHdB19CvSGJjPgkZJNk= -github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= -github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ= -github.com/xeipuuv/gojsonschema v0.0.0-20181112162635-ac52e6811b56/go.mod h1:5yf86TLmAcydyeJq5YvxkGPE2fm/u4myDekKRoLuqhs= -github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= -github.com/xlab/tablewriter v0.0.0-20160610135559-80b567a11ad5/go.mod h1:fVwOndYN3s5IaGlMucfgxwMhqwcaJtlGejBU6zX6Yxw= -github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= -github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= -go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= -go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738/go.mod h1:dnLIgRNXwCJa5e+c6mIZCrds/GIG4ncV9HhK5PX7jPg= -go.mongodb.org/mongo-driver v1.0.3/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= -go.mongodb.org/mongo-driver v1.1.1/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= -go.mongodb.org/mongo-driver v1.1.2/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= go.mongodb.org/mongo-driver v1.16.0 h1:tpRsfBJMROVHKpdGyc1BBEzzjDUWjItxbVSZ8Ls4BQ4= go.mongodb.org/mongo-driver v1.16.0/go.mod h1:oB6AhJQvFQL4LEHyXi6aJzQJtBiTQHiAd83l0GdFaiw= -go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= -go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= -go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opentelemetry.io/otel v1.28.0 h1:/SqNcYk+idO0CxKEUOtKQClMK/MimZihKYMruSMViUo= go.opentelemetry.io/otel v1.28.0/go.mod h1:q68ijF8Fc8CnMHKyzqL6akLO46ePnjkgfIMIjUIX9z4= go.opentelemetry.io/otel/metric v1.28.0 h1:f0HGvSl1KRAU1DLgLGFjrwVyismPlnuU6JD6bOeuA5Q= @@ -558,374 +71,14 @@ go.opentelemetry.io/otel/sdk v1.24.0 h1:YMPPDNymmQN3ZgczicBY3B6sf9n62Dlj9pWD3ucg go.opentelemetry.io/otel/sdk v1.24.0/go.mod h1:KVrIYw6tEubO9E96HQpcmpTKDVn9gdv35HoYiQWGDFg= go.opentelemetry.io/otel/trace v1.28.0 h1:GhQ9cUuQGmNDd5BTCP2dAvv75RdMxEfTmYejp+lkx9g= go.opentelemetry.io/otel/trace v1.28.0/go.mod h1:jPyXzNPg6da9+38HEwElrQiHlVMTnVfM3/yv2OlIHaI= -go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= -go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= -go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= -go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= -go.uber.org/multierr v1.4.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4= -go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA= -go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= -golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20190123085648-057139ce5d2b/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20190211182817-74369b46fc67/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20190228161510-8dd112bcdc25/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20190320223903-b7391e95e576/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20190506204251-e1dfcc566284/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190530122614-20be4c3c3ed5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190611184440-5c40567a22f8/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190617133340-57b3e21c3d56/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20191206172530-e9b2fee46413/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20200220183623-bac4c82f6975/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20200302210943-78000ba7a073/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20200510223506-06a226fb4e37/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20190125153040-c74c464bbbf2/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20190312203227-4b39c73a6495/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= -golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= -golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= -golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= -golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= -golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= -golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= -golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= -golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= -golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= -golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= -golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= -golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= -golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= -golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= -golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= -golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= -golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= -golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/net v0.0.0-20170114055629-f2499483f923/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181005035420-146acd28ed58/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181108082009-03003ca0c849/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190125091013-d26f9f9a57f3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190320064053-1272bf9dcd53/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190328230028-74de082e2cca/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190522155817-f3200d17e092/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= -golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= -golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20191004110552-13f9640d40b9/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= -golang.org/x/oauth2 v0.0.0-20181106182150-f42d05182288/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= -golang.org/x/oauth2 v0.0.0-20181203162652-d668ce993890/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= -golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.7.0 h1:YsImfSBoP9QPYL0xyKJPq0gcaJdG3rInoqxTWbfQu9M= golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= -golang.org/x/sys v0.0.0-20170830134202-bb24a47a89ea/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20180906133057-8cf3aee42992/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190124100055-b90733256f2e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190209173611-3b5209105503/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190228124157-a34e9553db1e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190321052220-f7bb7a8bee54/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190530182044-ad28b68e88f1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190616124812-15dcb6c0061f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190922100055-0a153f010e69/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200420163511-1957bb5e6d1f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200519105757-fe76b779f299/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.22.0 h1:RI27ohtqKCnwULzJLqkv897zojh5/DwS/ENaMzUOaWI= golang.org/x/sys v0.22.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/text v0.0.0-20160726164857-2910a502d2bf/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= -golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20200416051211-89c76fbcd5d1/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181011042414-1f849cf54d09/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190125232054-d66bd3c5d5a6/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190206041539-40960b6deb8e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= -golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190614205625-5aca471b1d59/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190617190820-da514acc4774/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20190920225731-5eefd052ad72/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -gomodules.xyz/jsonpatch/v2 v2.0.1/go.mod h1:IhYNNY4jnS53ZnfE4PAmpKtDpTCj1JFXc+3mwe7XcUU= -gomodules.xyz/jsonpatch/v2 v2.1.0/go.mod h1:IhYNNY4jnS53ZnfE4PAmpKtDpTCj1JFXc+3mwe7XcUU= -gonum.org/v1/gonum v0.0.0-20190331200053-3d26580ed485/go.mod h1:2ltnJ7xHfj0zHS40VVPYEAAMTa3ZGguvHGBSJeRWqE0= -gonum.org/v1/netlib v0.0.0-20190313105609-8cb42192e0e0/go.mod h1:wa6Ws7BG/ESfp6dHfk7C6KdzKA7wR7u/rKwOGE66zvw= -gonum.org/v1/netlib v0.0.0-20190331212654-76723241ea4e/go.mod h1:kS+toOQn6AQKjmKJ7gzohV1XkqsFehRA2FbsbkopSuQ= -google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= -google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= -google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= -google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= -google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.22.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= -google.golang.org/appengine v1.3.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= -google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= -google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= -google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= -google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= -google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA= -google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= -google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= -google.golang.org/grpc v1.21.0/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= -google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= -google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= -google.golang.org/grpc v1.23.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= -google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= -google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= -google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= -google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= -google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= -google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= -google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= -google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= -gopkg.in/cheggaaa/pb.v1 v1.0.25/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= -gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= -gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= -gopkg.in/gcfg.v1 v1.2.3/go.mod h1:yesOnuUOFQAhST5vPY4nbZsb/huCgGGXlipJsBn0b3o= -gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= -gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= -gopkg.in/mcuadros/go-syslog.v2 v2.2.1/go.mod h1:l5LPIyOOyIdQquNg+oU6Z3524YwrcqEm0aKH+5zpt2U= -gopkg.in/natefinch/lumberjack.v2 v2.0.0/go.mod h1:l0ndWWf7gzL7RNwBG7wST/UCcT4T24xpD6X8LsfU/+k= -gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= -gopkg.in/square/go-jose.v2 v2.2.2/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= -gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= -gopkg.in/validator.v2 v2.0.0-20191107172027-c3144fdedc21/go.mod h1:o4V0GXN9/CAmCsvJ0oXYZvrZOe7syiDZSN1GWGZTGzc= -gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI= -gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= -gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.7/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v3 v3.0.0-20200121175148-a6ecf24a6d71/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= -honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= -honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -k8s.io/api v0.17.2/go.mod h1:BS9fjjLc4CMuqfSO8vgbHPKMt5+SF0ET6u/RVDihTo4= -k8s.io/api v0.17.8/go.mod h1:N++Llhs8kCixMUoCaXXAyMMPbo8dDVnh+IQ36xZV2/0= -k8s.io/api v0.17.9/go.mod h1:avJJAA1fSV6tnbCGW2K+S+ilDFW7WpNr5BScoiZ1M1U= -k8s.io/apiextensions-apiserver v0.17.2/go.mod h1:4KdMpjkEjjDI2pPfBA15OscyNldHWdBCfsWMDWAmSTs= -k8s.io/apiextensions-apiserver v0.17.8/go.mod h1:5H/i0XiKizIE9SkoAQaU/ou31JJBIffbsT0ALA18GmE= -k8s.io/apiextensions-apiserver v0.17.9/go.mod h1:p2C9cDflVAUPMl5/QOMHxnSzQWF/cDqu7AP2KUXHHMA= -k8s.io/apimachinery v0.17.0/go.mod h1:b9qmWdKlLuU9EBh+06BtLcSf/Mu89rWL33naRxs1uZg= -k8s.io/apimachinery v0.17.2/go.mod h1:b9qmWdKlLuU9EBh+06BtLcSf/Mu89rWL33naRxs1uZg= -k8s.io/apimachinery v0.17.8/go.mod h1:Lg8zZ5iC/O8UjCqW6DNhcQG2m4TdjF9kwG3891OWbbA= -k8s.io/apimachinery v0.17.9/go.mod h1:Lg8zZ5iC/O8UjCqW6DNhcQG2m4TdjF9kwG3891OWbbA= -k8s.io/apiserver v0.17.2/go.mod h1:lBmw/TtQdtxvrTk0e2cgtOxHizXI+d0mmGQURIHQZlo= -k8s.io/apiserver v0.17.8/go.mod h1:XU2YBi1I/v/P1R5lb0lEwSQ1rnXE01k7yxVtdIWH4Lo= -k8s.io/apiserver v0.17.9/go.mod h1:Qaxd3EbeoPRBHVMtFyuKNAObqP6VAkzIMyWYz8KuE2k= -k8s.io/client-go v0.17.2/go.mod h1:QAzRgsa0C2xl4/eVpeVAZMvikCn8Nm81yqVx3Kk9XYI= -k8s.io/client-go v0.17.8/go.mod h1:SJsDS64AAtt9VZyeaQMb4Ck5etCitZ/FwajWdzua5eY= -k8s.io/client-go v0.17.9/go.mod h1:3cM92qAd1XknA5IRkRfpJhl9OQjkYy97ZEUio70wVnI= -k8s.io/cluster-bootstrap v0.17.2/go.mod h1:qiazpAM05fjAc+PEkrY8HSUhKlJSMBuLnVUSO6nvZL4= -k8s.io/cluster-bootstrap v0.17.8/go.mod h1:SC9J2Lt/MBOkxcCB04+5mYULLfDQL5kdM0BjtKaVCVU= -k8s.io/cluster-bootstrap v0.17.9/go.mod h1:Q6nXn/sqVfMvT1VIJVPxFboYAoqH06PCjZnaYzbpZC0= -k8s.io/code-generator v0.17.2/go.mod h1:DVmfPQgxQENqDIzVR2ddLXMH34qeszkKSdH/N+s+38s= -k8s.io/code-generator v0.17.8/go.mod h1:iiHz51+oTx+Z9D0vB3CH3O4HDDPWrvZyUgUYaIE9h9M= -k8s.io/code-generator v0.17.9/go.mod h1:iiHz51+oTx+Z9D0vB3CH3O4HDDPWrvZyUgUYaIE9h9M= -k8s.io/component-base v0.17.2/go.mod h1:zMPW3g5aH7cHJpKYQ/ZsGMcgbsA/VyhEugF3QT1awLs= -k8s.io/component-base v0.17.8/go.mod h1:xfNNdTAMsYzdiAa8vXnqDhRVSEgkfza0iMt0FrZDY7s= -k8s.io/component-base v0.17.9/go.mod h1:Wg22ePDK0mfTa+bEFgZHGwr0h40lXnYy6D7D+f7itFk= -k8s.io/gengo v0.0.0-20190128074634-0689ccc1d7d6/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= -k8s.io/gengo v0.0.0-20190822140433-26a664648505/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= -k8s.io/klog v0.0.0-20181102134211-b9b56d5dfc92/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= -k8s.io/klog v0.3.0/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= -k8s.io/klog v1.0.0/go.mod h1:4Bi6QPql/J/LkTDqv7R/cd3hPo4k2DG6Ptcz060Ez5I= -k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE= -k8s.io/kube-openapi v0.0.0-20191107075043-30be4d16710a/go.mod h1:1TqjTSzOxsLGIKfj0lK8EeCP7K1iUG65v09OM0/WG5E= -k8s.io/kube-openapi v0.0.0-20200121204235-bf4fb3bd569c/go.mod h1:GRQhZsXIAJ1xR0C9bd8UpWHZ5plfAS9fzPjJuQ6JL3E= -k8s.io/kube-openapi v0.0.0-20200410145947-bcb3869e6f29/go.mod h1:F+5wygcW0wmRTnM3cOgIqGivxkwSWIWT5YdsDbeAOaU= -k8s.io/utils v0.0.0-20191114184206-e782cd3c129f/go.mod h1:sZAwmy6armz5eXlNoLmJcl4F1QuKu7sr+mFQ0byX7Ew= -k8s.io/utils v0.0.0-20200229041039-0a110f9eb7ab/go.mod h1:sZAwmy6armz5eXlNoLmJcl4F1QuKu7sr+mFQ0byX7Ew= -k8s.io/utils v0.0.0-20200619165400-6e3d28b6ed19/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= -modernc.org/cc v1.0.0/go.mod h1:1Sk4//wdnYJiUIxnW8ddKpaOJCF37yAdqYnkxUpaYxw= -modernc.org/golex v1.0.0/go.mod h1:b/QX9oBD/LhixY6NDh+IdGv17hgB+51fET1i2kPSmvk= -modernc.org/mathutil v1.0.0/go.mod h1:wU0vUrJsVWBZ4P6e7xtFJEhFSNsfRLJ8H458uRjg03k= -modernc.org/strutil v1.0.0/go.mod h1:lstksw84oURvj9y3tn8lGvRxyRC1S2+g5uuIzNfIOBs= -modernc.org/xc v1.0.0/go.mod h1:mRNCo0bvLjGhHO9WsyuKVU4q0ceiDDDoEeWDJHrNx8I= -rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= -rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= -rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= -sigs.k8s.io/cluster-api v0.3.2/go.mod h1:PkmtV10dmmSmBSpR28c5UxDvWRszTxj+p9KLrb8JVZ8= -sigs.k8s.io/cluster-api v0.3.6/go.mod h1:joh0d0Xu2VGQa3knsf2ZIHyOLX7puUp8LvJjyneeCb8= -sigs.k8s.io/cluster-api v0.3.7/go.mod h1:G6gscKzZTGhMOOF3rDZXCxsLIbhVaacbjaiikB/rBmA= -sigs.k8s.io/cluster-api v0.3.10/go.mod h1:XBBDBiaczcyNlH4D7FNjSKc5bBofYRppfg0ZgaP2x1U= -sigs.k8s.io/cluster-api-provider-aws v0.6.0/go.mod h1:flUafYKWtwr0ZQsto27x9hakCi7U3/ke35a4S4ZY8mc= -sigs.k8s.io/cluster-api-provider-azure v0.4.4/go.mod h1:6raeLxfTNcwooc/jBL3h6xBlkVuNYHY9oeqKD1/rgJ0= -sigs.k8s.io/cluster-api-provider-gcp v0.2.0-alpha.2.0.20200715164437-e6d7ba5bfbb1/go.mod h1:XPSGEgpHVJbNpUlhPkcQeA2j4W4SD4/iDb04zCPvD9E= -sigs.k8s.io/cluster-api-provider-vsphere v0.7.1/go.mod h1:kEw5oUAuc2mxH1/6z+kQKnXde9JrWS4g933DoP0ra3w= -sigs.k8s.io/controller-runtime v0.5.1/go.mod h1:Uojny7gvg55YLQnEGnPzRE3dC4ik2tRlZJgOUCWXAV4= -sigs.k8s.io/controller-runtime v0.5.2/go.mod h1:JZUwSMVbxDupo0lTJSSFP5pimEyxGynROImSsqIOx1A= -sigs.k8s.io/controller-runtime v0.5.8/go.mod h1:UI/unU7Q+mo/rWBrND0NAaVNj/Xjh/+aqSv/M3njpmo= -sigs.k8s.io/controller-runtime v0.5.9/go.mod h1:UI/unU7Q+mo/rWBrND0NAaVNj/Xjh/+aqSv/M3njpmo= -sigs.k8s.io/controller-runtime v0.5.11/go.mod h1:OTqxLuz7gVcrq+BHGUgedRu6b2VIKCEc7Pu4Jbwui0A= -sigs.k8s.io/kind v0.7.1-0.20200303021537-981bd80d3802/go.mod h1:HIZ3PWUezpklcjkqpFbnYOqaqsAE1JeCTEwkgvPLXjk= -sigs.k8s.io/structured-merge-diff v0.0.0-20190525122527-15d366b2352e/go.mod h1:wWxsB5ozmmv/SG7nM11ayaAW51xMvak/t1r0CSlcokI= -sigs.k8s.io/structured-merge-diff v1.0.1-0.20191108220359-b1b620dd3f06/go.mod h1:/ULNhyfzRopfcjskuui0cTITekDduZ7ycKN3oUT9R18= -sigs.k8s.io/structured-merge-diff/v2 v2.0.1/go.mod h1:Wb7vfKAodbKgf6tn1Kl0VvGj7mRH6DGaRcixXEJXTsE= -sigs.k8s.io/structured-merge-diff/v3 v3.0.0-20200116222232-67a7b8c61874/go.mod h1:PlARxl6Hbt/+BC80dRLi1qAmnMqwqDg62YvvVkZjemw= -sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= -sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc=